commit f40ddce88593482919761f74910f42f4b84c004b Author: Linus Torvalds Date: Sun Feb 14 14:32:24 2021 -0800 Linux 5.11 commit 28a17338738839494752c5da3e12c889a55219db Merge: ab30c7f9c3ca2 dbeb02a0bc41b Author: Linus Torvalds Date: Sun Feb 14 11:50:31 2021 -0800 Merge branch 'for-rc8-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds Pull LED fix from Pavel Machek: "One-liner fixing a build problem" * 'for-rc8-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds: leds: rt8515: add V4L2_FLASH_LED_CLASS dependency commit ab30c7f9c3ca2599f5ab3e4d29ae56453c8668e5 Merge: c553021498640 fe968c41ac4f4 Author: Linus Torvalds Date: Sun Feb 14 11:36:32 2021 -0800 Merge tag 'kbuild-fixes-v5.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - Fix CONFIG_TRIM_UNUSED_KSYMS build for ppc64 - Use pkg-config for scripts/sign-file.c CFLAGS * tag 'kbuild-fixes-v5.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: scripts: set proper OpenSSL include dir also for sign-file sparc: remove wrong comment from arch/sparc/include/asm/Kbuild kbuild: fix CONFIG_TRIM_UNUSED_KSYMS build for ppc64 commit c553021498640050340924bd62fa580e253467ac Merge: 358feceebbf68 70245f86c109e Author: Linus Torvalds Date: Sun Feb 14 11:10:55 2021 -0800 Merge tag 'x86_urgent_for_v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Borislav Petkov: "I kinda knew while typing 'I hope this is the last batch of x86/urgent updates' last week, Murphy was reading too and uttered 'Hold my beer!'. So here's more fixes... Thanks Murphy. Anyway, three more x86/urgent fixes for 5.11 final. We should be finally ready (famous last words). :-) - An SGX use after free fix - A fix for the fix to disable CET instrumentation generation for kernel code. We forgot 32-bit, which we seem to do very often nowadays - A Xen PV fix to irqdomain init ordering" * tag 'x86_urgent_for_v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/pci: Create PCI/MSI irqdomain after x86_init.pci.arch_init() x86/build: Disable CET instrumentation in the kernel for 32-bit too x86/sgx: Maintain encl->refcount for each encl->mm_list entry commit dbeb02a0bc41b9e9b9c05e460890351efecf1352 Author: Arnd Bergmann Date: Thu Feb 4 16:39:44 2021 +0100 leds: rt8515: add V4L2_FLASH_LED_CLASS dependency The leds-rt8515 driver can optionall use the v4l2 flash led class, but it causes a link error when that class is in a loadable module and the rt8515 driver itself is built-in: ld.lld: error: undefined symbol: v4l2_flash_init >>> referenced by leds-rt8515.c >>> leds/flash/leds-rt8515.o:(rt8515_probe) in archive drivers/built-in.a Adding 'depends on V4L2_FLASH_LED_CLASS' in Kconfig would avoid that, but it would make it impossible to use the driver without the v4l2 support. Add the same dependency that the other users of this class have instead, which just prevents the broken configuration. Fixes: e1c6edcbea13 ("leds: rt8515: Add Richtek RT8515 LED driver") Signed-off-by: Arnd Bergmann Reviewed-by: Linus Walleij Signed-off-by: Pavel Machek commit fe968c41ac4f4ec9ffe3c4cf16b72285f5e9674f Author: Rolf Eike Beer Date: Fri Feb 12 08:22:27 2021 +0100 scripts: set proper OpenSSL include dir also for sign-file Fixes: 2cea4a7a1885 ("scripts: use pkg-config to locate libcrypto") Signed-off-by: Rolf Eike Beer Cc: stable@vger.kernel.org # 5.6.x Signed-off-by: Masahiro Yamada commit 27dad89bab2d71a8c4b13b497054db33d264b281 Author: Masahiro Yamada Date: Thu Jan 28 09:51:03 2021 +0900 sparc: remove wrong comment from arch/sparc/include/asm/Kbuild These are NOT exported to userspace. The headers listed in arch/sparc/include/uapi/asm/Kbuild are exported. Signed-off-by: Masahiro Yamada commit 358feceebbf68f33c44c6650d14455389e65282d Merge: 0001ec9b1418f 245090ab2636c Author: Linus Torvalds Date: Sat Feb 13 14:25:22 2021 -0800 Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fix from Stephen Boyd: "One small fix for the Allwinner clk driver so that display clks figure out the correct rate to use. This fixes displays running 4k@60Hz and some other resolutions that haven't been exercised and fully understood until now" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: sunxi-ng: mp: fix parent rate change flag check commit 0001ec9b1418f01a6dd44a83a1caa4b4f3d11f29 Merge: ac30d8ce28d61 f852c596f2ee6 Author: Linus Torvalds Date: Sat Feb 13 14:14:47 2021 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fix from James Bottomley: "One fix for scsi_debug that fixes a memory leak on module removal" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: scsi_debug: Fix a memory leak commit ac30d8ce28d61c05ac3a8b1452e889371136f3af Merge: 25cbda4677941 74bdd45c85d02 Author: Linus Torvalds Date: Sat Feb 13 12:25:42 2021 -0800 Merge branch 'for-5.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup fixes from Tejun Heo: "Two cgroup fixes: - fix a NULL deref when trying to poll PSI in the root cgroup - fix confusing controller parsing corner case when mounting cgroup v1 hierarchies And doc / maintainer file updates" * 'for-5.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup: update PSI file description in docs cgroup: fix psi monitor for root cgroup MAINTAINERS: Update my email address MAINTAINERS: Remove stale URLs for cpuset cgroup-v1: add disabled controller check in cgroup1_parse_param() commit 25cbda46779418e5ae435707675a312c99a16dff Merge: 8cc8e6aaf27db ade9679c159d5 Author: Linus Torvalds Date: Sat Feb 13 12:04:18 2021 -0800 Merge branch 'akpm' (patches from Andrew) Merge fixes from Andrew Morton: "6 patches. Subsystems affected by this patch series: mm/pagemap, scripts, MAINTAINERS, and h8300" * emailed patches from Andrew Morton : h8300: fix PREEMPTION build, TI_PRE_COUNT undefined MAINTAINERS: add Andrey Konovalov to KASAN reviewers MAINTAINERS: update Andrey Konovalov's email address MAINTAINERS: update KASAN file list scripts/recordmcount.pl: support big endian for ARCH sh m68k: make __pfn_to_phys() and __phys_to_pfn() available for !MMU commit 8cc8e6aaf27db47985f9e1c24ac2f7393390971e Merge: e42ee56fe5975 3d6a3d3a2a7a3 Author: Linus Torvalds Date: Sat Feb 13 11:59:10 2021 -0800 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fix from Wolfram Sang: "One more I2C driver bugfix" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: stm32f7: fix configuration of the digital filter commit e42ee56fe59759023cb252fabb3d6f279fe8cec8 Merge: 7989807dc0c95 83c68bbcb6ac2 Author: Linus Torvalds Date: Sat Feb 13 11:55:29 2021 -0800 Merge tag 'for-5.11-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fix from David Sterba: "A regression fix caused by a refactoring in 5.11. A corrupted superblock wouldn't be detected by checksum verification due to wrongly placed initialization of the checksum length, thus making memcmp always work" * tag 'for-5.11-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: initialize fs_info::csum_size earlier in open_ctree commit ade9679c159d5bbe14fb7e59e97daf6062872e2b Author: Randy Dunlap Date: Fri Feb 12 20:52:54 2021 -0800 h8300: fix PREEMPTION build, TI_PRE_COUNT undefined Fix a build error for undefined 'TI_PRE_COUNT' by adding it to asm-offsets.c. h8300-linux-ld: arch/h8300/kernel/entry.o: in function `resume_kernel': (.text+0x29a): undefined reference to `TI_PRE_COUNT' Link: https://lkml.kernel.org/r/20210212021650.22740-1-rdunlap@infradead.org Fixes: df2078b8daa7 ("h8300: Low level entry") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Cc: Yoshinori Sato Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fee92a765fbcc9412680228f8fdc425ab9c8151e Author: Andrey Konovalov Date: Fri Feb 12 20:52:50 2021 -0800 MAINTAINERS: add Andrey Konovalov to KASAN reviewers Add my personal email address to KASAN reviewers list. Link: https://lkml.kernel.org/r/c1ce89a7aae0e2d6852249c280b1eb59aeac30c0.1613150186.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Marco Elver Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 872fad10f8340207a2a6896a1311c5c7b50d2e11 Author: Andrey Konovalov Date: Fri Feb 12 20:52:47 2021 -0800 MAINTAINERS: update Andrey Konovalov's email address Use my personal email address. Link: https://lkml.kernel.org/r/b0ec98dabbc12336c162788f5ccde97045a0d65e.1613150186.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Marco Elver Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 30d320f089d8e1ad369375e02cf62fbe5da18e85 Author: Andrey Konovalov Date: Fri Feb 12 20:52:44 2021 -0800 MAINTAINERS: update KASAN file list Account for the following files: - lib/Kconfig.kasan - lib/test_kasan_module.c - arch/arm64/include/asm/mte-kasan.h Link: https://lkml.kernel.org/r/7f9771d97b34d396bfdc4e288ad93486bb865a06.1613150186.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Marco Elver Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 93ca696376dd3d44b9e5eae835ffbc84772023ec Author: Rong Chen Date: Fri Feb 12 20:52:41 2021 -0800 scripts/recordmcount.pl: support big endian for ARCH sh The kernel test robot reported the following issue: CC [M] drivers/soc/litex/litex_soc_ctrl.o sh4-linux-objcopy: Unable to change endianness of input file(s) sh4-linux-ld: cannot find drivers/soc/litex/.tmp_gl_litex_soc_ctrl.o: No such file or directory sh4-linux-objcopy: 'drivers/soc/litex/.tmp_mx_litex_soc_ctrl.o': No such file The problem is that the format of input file is elf32-shbig-linux, but sh4-linux-objcopy wants to output a file which format is elf32-sh-linux: $ sh4-linux-objdump -d drivers/soc/litex/litex_soc_ctrl.o | grep format drivers/soc/litex/litex_soc_ctrl.o: file format elf32-shbig-linux Link: https://lkml.kernel.org/r/20210210150435.2171567-1-rong.a.chen@intel.com Link: https://lore.kernel.org/linux-mm/202101261118.GbbYSlHu-lkp@intel.com Signed-off-by: Rong Chen Reported-by: kernel test robot Cc: Yoshinori Sato Cc: Rich Felker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3c62cfdd10c44221050b4b94cfdf8707d31fea53 Author: Mike Rapoport Date: Fri Feb 12 20:52:38 2021 -0800 m68k: make __pfn_to_phys() and __phys_to_pfn() available for !MMU Recent changes that obsoleted DISCONTIGMEM on m68k switched the MMU variant to use generic definitions of __pfn_to_phys() and __phys_to_pfn(), but missed the !MMU variant which caused a build failure: drivers/media/common/videobuf2/videobuf2-dma-contig.c: In function 'vb2_dc_get_userptr': drivers/media/common/videobuf2/videobuf2-dma-contig.c:509:5: error: implicit declaration of function '__pfn_to_phys' [-Werror=implicit-function-declaration] 509 | __pfn_to_phys(nums[0]), size, buf->dma_dir, 0); | ^~~~~~~~~~~~~ cc1: some warnings being treated as errors Enable __pfn_to_phys() and __phys_to_pfn() on !MMU builds. Link: https://lkml.kernel.org/r/20210211232202.GS299309@linux.ibm.com Fixes: 4bfc848e0981 ("m68k/mm: enable use of generic memory_model.h for !DISCONTIGMEM") Signed-off-by: Mike Rapoport Reported-by: kernel test robot Cc: Geert Uytterhoeven Cc: Greg Ungerer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7989807dc0c95c4b787698eba10905a5baac42e8 Merge: c6d8570e4d642 a738c93fb1c17 Author: Linus Torvalds Date: Fri Feb 12 14:45:39 2021 -0800 Merge tag '5.11-rc7-smb3-github' of git://github.com/smfrench/smb3-kernel Pull cifs fixes from Steve French: "Four small smb3 fixes to the new mount API (including a particularly important one for DFS links). These were found in testing this week of additional DFS scenarios, and a user testing of an apache container problem" * tag '5.11-rc7-smb3-github' of git://github.com/smfrench/smb3-kernel: cifs: Set CIFS_MOUNT_USE_PREFIX_PATH flag on setting cifs_sb->prepath. cifs: In the new mount api we get the full devname as source= cifs: do not disable noperm if multiuser mount option is not provided cifs: fix dfs-links commit c6d8570e4d642a0c0bfbe7362ffa1b1433c72db1 Merge: a81bfdf8bf539 92c75f7594d50 Author: Linus Torvalds Date: Fri Feb 12 11:48:02 2021 -0800 Merge tag 'io_uring-5.11-2021-02-12' of git://git.kernel.dk/linux-block Pull io_uring fix from Jens Axboe: "Revert of a patch from this release that caused a regression" * tag 'io_uring-5.11-2021-02-12' of git://git.kernel.dk/linux-block: Revert "io_uring: don't take fs for recvmsg/sendmsg" commit a81bfdf8bf5396824d7d139560180854cb599b06 Merge: e77a6817d4135 551c81853d6d3 Author: Linus Torvalds Date: Fri Feb 12 11:29:06 2021 -0800 Merge tag 'drm-fixes-2021-02-12' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Regular fixes for final, there is a ttm regression fix, dp-mst fix, one amdgpu revert, two i915 fixes, and some misc fixes for sun4i, xlnx, and vc4. All pretty quiet and don't think we have any known outstanding regressions. ttm: - page pool regression fix. dp_mst: - don't report un-attached ports as connected amdgpu: - blank screen fix i915: - ensure Type-C FIA is powered when initializing - fix overlay frontbuffer tracking sun4i: - tcon1 sync polarity fix - always set HDMI clock rate - fix H6 HDMI PHY config - fix H6 max frequency vc4: - fix buffer overflow xlnx: - fix memory leak" * tag 'drm-fixes-2021-02-12' of git://anongit.freedesktop.org/drm/drm: drm/ttm: make sure pool pages are cleared drm/sun4i: dw-hdmi: Fix max. frequency for H6 drm/sun4i: Fix H6 HDMI PHY configuration drm/sun4i: dw-hdmi: always set clock rate drm/sun4i: tcon: set sync polarity for tcon1 channel drm/i915: Fix overlay frontbuffer tracking Revert "drm/amd/display: Update NV1x SR latency values" drm/i915/tgl+: Make sure TypeC FIA is powered up when initializing it drm/dp_mst: Don't report ports connected if nothing is attached to them drm/xlnx: fix kmemleak by sending vblank_event in atomic_disable drm/vc4: hvs: Fix buffer overflow with the dlist handling commit e77a6817d413589be35461d0cd5a431a6794b3b9 Merge: 2dbbaae5f7b38 b220c049d5196 Author: Linus Torvalds Date: Fri Feb 12 11:16:17 2021 -0800 Merge tag 'trace-v5.11-rc7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fix from Steven Rostedt: "Fix buffer overflow in trace event filter. It was reported that if an trace event was larger than a page and was filtered, that it caused memory corruption. The reason is that filtered events first go into a buffer to test the filter before being written into the ring buffer. Unfortunately, this write did not check the size" * tag 'trace-v5.11-rc7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Check length before giving out the filter buffer commit 2dbbaae5f7b3855697e2decc5de79c7574403254 Merge: f951625980412 c4295ab0b485b Author: Linus Torvalds Date: Fri Feb 12 11:12:58 2021 -0800 Merge tag 'for-linus-5.11-rc8-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fix from Juergen Gross: "A single fix for an issue introduced this development cycle: when running as a Xen guest on Arm systems the kernel will hang during boot" * tag 'for-linus-5.11-rc8-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: arm/xen: Don't probe xenbus as part of an early initcall commit f9516259804123c416c4a9de40bc2e14d686478e Merge: 93908500b8da0 3da3cc1b5f471 Author: Linus Torvalds Date: Fri Feb 12 11:07:29 2021 -0800 Merge tag 'riscv-for-linus-5.11-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fix from Palmer Dabbelt: "A single fix this week: the removal of the GPIO reset method for the Ethernet phy on the HiFive Unleashed. This returns to relying on the bootloader's phy reset sequence, which we'll have to continue doing until we can sort out how to get the Linux phy driver to perform the special reset dance required for this phy" * tag 'riscv-for-linus-5.11-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: Revert "dts: phy: add GPIO number and active state used for phy reset" commit 93908500b8da0423c9f0511130c8ab86d59576a0 Merge: dcc0b49040c70 68d54ceeec0e5 Author: Linus Torvalds Date: Fri Feb 12 11:03:30 2021 -0800 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fix from Catalin Marinas: "Fix PTRACE_PEEKMTETAGS access to an mmapped region before the first write" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: mte: Allow PTRACE_PEEKMTETAGS access to the zero page commit 68d54ceeec0e5fee4fb8048e6a04c193f32525ca Author: Catalin Marinas Date: Wed Feb 10 18:03:16 2021 +0000 arm64: mte: Allow PTRACE_PEEKMTETAGS access to the zero page The ptrace(PTRACE_PEEKMTETAGS) implementation checks whether the user page has valid tags (mapped with PROT_MTE) by testing the PG_mte_tagged page flag. If this bit is cleared, ptrace(PTRACE_PEEKMTETAGS) returns -EIO. A newly created (PROT_MTE) mapping points to the zero page which had its tags zeroed during cpu_enable_mte(). If there were no prior writes to this mapping, ptrace(PTRACE_PEEKMTETAGS) fails with -EIO since the zero page does not have the PG_mte_tagged flag set. Set PG_mte_tagged on the zero page when its tags are cleared during boot. In addition, to avoid ptrace(PTRACE_PEEKMTETAGS) succeeding on !PROT_MTE mappings pointing to the zero page, change the __access_remote_tags() check to (vm_flags & VM_MTE) instead of PG_mte_tagged. Signed-off-by: Catalin Marinas Fixes: 34bfeea4a9e9 ("arm64: mte: Clear the tags when a page is mapped in user-space with PROT_MTE") Cc: # 5.10.x Cc: Will Deacon Reported-by: Luis Machado Tested-by: Luis Machado Reviewed-by: Vincenzo Frascino Link: https://lore.kernel.org/r/20210210180316.23654-1-catalin.marinas@arm.com commit 83c68bbcb6ac2dbbcaf12e2281a29a9f73b97d0f Author: Su Yue Date: Thu Feb 11 16:38:28 2021 +0800 btrfs: initialize fs_info::csum_size earlier in open_ctree User reported that btrfs-progs misc-tests/028-superblock-recover fails: [TEST/misc] 028-superblock-recover unexpected success: mounted fs with corrupted superblock test failed for case 028-superblock-recover The test case expects that a broken image with bad superblock will be rejected to be mounted. However, the test image just passed csum check of superblock and was successfully mounted. Commit 55fc29bed8dd ("btrfs: use cached value of fs_info::csum_size everywhere") replaces all calls to btrfs_super_csum_size by fs_info::csum_size. The calls include the place where fs_info->csum_size is not initialized. So btrfs_check_super_csum() passes because memcmp() with len 0 always returns 0. Fix it by caching csum size in btrfs_fs_info::csum_size once we know the csum type in superblock is valid in open_ctree(). Link: https://github.com/kdave/btrfs-progs/issues/250 Fixes: 55fc29bed8dd ("btrfs: use cached value of fs_info::csum_size everywhere") Signed-off-by: Su Yue Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3d6a3d3a2a7a3a60a824e7c04e95fd50dec57812 Author: Alain Volmat Date: Fri Feb 5 09:51:40 2021 +0100 i2c: stm32f7: fix configuration of the digital filter The digital filter related computation are present in the driver however the programming of the filter within the IP is missing. The maximum value for the DNF is wrong and should be 15 instead of 16. Fixes: aeb068c57214 ("i2c: i2c-stm32f7: add driver") Signed-off-by: Alain Volmat Signed-off-by: Pierre-Yves MORDRET Signed-off-by: Wolfram Sang commit 551c81853d6d3ff016269d62612e7cd0a53104ab Merge: 0594bc74be82d 811ee9dff5807 Author: Dave Airlie Date: Fri Feb 12 13:38:31 2021 +1000 Merge branch 'drm-misc-fixes' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes (I've pulled from a non-tag to get the ttm regression fix) drm-misc-fixes-2021-02-10: * dp_mst: Don't report un-attached ports as connected * sun4i: tcon1 sync polarity fix; Always set HDMI clock rate; Fix H6 HDMI PHY config; Fix H6 max frequency * vc4: Fix buffer overflow * xlnx: Fix memory leak * ttm: page pool regression fix. Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/YCPo6g3gDxD3P//h@linux-uq9g commit 245090ab2636c0869527ce563afbfb8aff29e825 Author: Jernej Skrabec Date: Tue Feb 9 18:58:56 2021 +0100 clk: sunxi-ng: mp: fix parent rate change flag check CLK_SET_RATE_PARENT flag is checked on parent clock instead of current one. Fix that. Fixes: 3f790433c3cb ("clk: sunxi-ng: Adjust MP clock parent rate when allowed") Reviewed-by: Chen-Yu Tsai Tested-by: Andre Heider Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20210209175900.7092-2-jernej.skrabec@siol.net Acked-by: Maxime Ripard Signed-off-by: Stephen Boyd commit 0594bc74be82d0ce50e90de29475b331c1e83382 Merge: d92d3d8f4cc6a 5feba0e905c49 Author: Dave Airlie Date: Fri Feb 12 10:16:58 2021 +1000 Merge tag 'drm-intel-fixes-2021-02-11' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes drm/i915 fixes for v5.11 final: - Ensure Type-C FIA is powered when initializing - Fix overlay frontbuffer tracking Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87r1lnc78t.fsf@intel.com commit d92d3d8f4cc6a9aa8b8f8c229d4b9c43d6eded40 Merge: 92bf22614b21a cf050f96e0970 Author: Dave Airlie Date: Fri Feb 12 09:51:15 2021 +1000 Merge tag 'amd-drm-fixes-5.11-2021-02-10' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-5.11-2021-02-10: amdgpu: - Blank screen fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210210223508.4428-1-alexander.deucher@amd.com commit dcc0b49040c70ad827a7f3d58a21b01fdb14e749 Merge: c05263df6c1ab 8c511eff18272 Author: Linus Torvalds Date: Thu Feb 11 15:41:07 2021 -0800 Merge tag 'powerpc-5.11-8' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fix from Michael Ellerman: "One fix for a regression seen in io_uring, introduced by our support for KUAP (Kernel User Access Prevention) with the Hash MMU. Thanks to Aneesh Kumar K.V, and Zorro Lang" * tag 'powerpc-5.11-8' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/kuap: Allow kernel thread to access userspace after kthread_use_mm commit b220c049d5196dd94d992dd2dc8cba1a5e6123bf Author: Steven Rostedt (VMware) Date: Wed Feb 10 11:53:22 2021 -0500 tracing: Check length before giving out the filter buffer When filters are used by trace events, a page is allocated on each CPU and used to copy the trace event fields to this page before writing to the ring buffer. The reason to use the filter and not write directly into the ring buffer is because a filter may discard the event and there's more overhead on discarding from the ring buffer than the extra copy. The problem here is that there is no check against the size being allocated when using this page. If an event asks for more than a page size while being filtered, it will get only a page, leading to the caller writing more that what was allocated. Check the length of the request, and if it is more than PAGE_SIZE minus the header default back to allocating from the ring buffer directly. The ring buffer may reject the event if its too big anyway, but it wont overflow. Link: https://lore.kernel.org/ath10k/1612839593-2308-1-git-send-email-wgong@codeaurora.org/ Cc: stable@vger.kernel.org Fixes: 0fc1b09ff1ff4 ("tracing: Use temp buffer when filtering events") Reported-by: Wen Gong Signed-off-by: Steven Rostedt (VMware) commit c05263df6c1ab82277cc3b2778b183b469a71a60 Merge: 291009f656e8e 28dc10eb77a2d Author: Linus Torvalds Date: Thu Feb 11 11:21:08 2021 -0800 Merge tag 'gpio-fixes-for-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio fixes from Bartosz Golaszewski: "This is hopefully the last batch of fixes for this release cycle. We have a minor fix for a Kconfig regression as well as fixes for older bugs in gpio-ep93xx: - don't build gpio-mxs unconditionally with COMPILE_TEST enabled - fix two problems with interrupt handling in gpio-ep93xx" * tag 'gpio-fixes-for-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpio: ep93xx: Fix single irqchip with multi gpiochips gpio: ep93xx: fix BUG_ON port F usage gpio: mxs: GPIO_MXS should not default to y unconditionally commit 29500f15b54b63ad0ea60b58e85144262bd24df2 Author: Masahiro Yamada Date: Thu Feb 11 15:14:16 2021 +0900 kbuild: fix CONFIG_TRIM_UNUSED_KSYMS build for ppc64 Stephen Rothwell reported a build error on ppc64 when CONFIG_TRIM_UNUSED_KSYMS is enabled. Jessica Yu pointed out the cause of the error with the reference to the ppc64 ELF ABI: "Symbol names with a dot (.) prefix are reserved for holding entry point addresses. The value of a symbol named ".FN", if it exists, is the entry point of the function "FN". As it turned out, CONFIG_TRIM_UNUSED_KSYMS has never worked for ppc64, but this issue has been unnoticed until recently because this option depends on !UNUSED_SYMBOLS hence is disabled by all{mod,yes}config. (Then, it was uncovered by another patch removing UNUSED_SYMBOLS.) Removing the dot prefix in scripts/gen_autoksyms.sh fixes the issue. Please note it must be done before 'sort -u' because modules have both ._mcount and _mcount undefined when CONFIG_FUNCTION_TRACER=y. Link: https://lore.kernel.org/lkml/20210209210843.3af66662@canb.auug.org.au/ Reported-by: Stephen Rothwell Signed-off-by: Masahiro Yamada Tested-by: Jessica Yu commit a738c93fb1c17e386a09304b517b1c6b2a6a5a8b Author: Shyam Prasad N Date: Thu Feb 11 03:26:54 2021 -0800 cifs: Set CIFS_MOUNT_USE_PREFIX_PATH flag on setting cifs_sb->prepath. While debugging another issue today, Steve and I noticed that if a subdir for a file share is already mounted on the client, any new mount of any other subdir (or the file share root) of the same share results in sharing the cifs superblock, which e.g. can result in incorrect device name. While setting prefix path for the root of a cifs_sb, CIFS_MOUNT_USE_PREFIX_PATH flag should also be set. Without it, prepath is not even considered in some places, and output of "mount" and various /proc/<>/*mount* related options can be missing part of the device name. Signed-off-by: Shyam Prasad N Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit af1a3d2ba9543e99d78914d8fb88b61d0531d9a1 Author: Ronnie Sahlberg Date: Thu Feb 11 16:06:16 2021 +1000 cifs: In the new mount api we get the full devname as source= so we no longer need to handle or parse the UNC= and prefixpath= options that mount.cifs are generating. This also fixes a bug in the mount command option where the devname would be truncated into just //server/share because we were looking at the truncated UNC value and not the full path. I.e. in the mount command output the devive //server/share/path would show up as just //server/share Signed-off-by: Ronnie Sahlberg Reviewed-by: Shyam Prasad N Signed-off-by: Steve French commit 811ee9dff58072742644da2c07641728f5e078e4 Author: Christian König Date: Wed Feb 10 14:24:27 2021 +0100 drm/ttm: make sure pool pages are cleared The old implementation wasn't consistend on this. But it looks like we depend on this so better bring it back. Signed-off-by: Christian König Reported-and-tested-by: Mike Galbraith Fixes: d099fc8f540a ("drm/ttm: new TT backend allocation pool v3") Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210210160549.1462-1-christian.koenig@amd.com commit c4295ab0b485b8bc50d2264bcae2acd06f25caaf Author: Julien Grall Date: Wed Feb 10 17:06:54 2021 +0000 arm/xen: Don't probe xenbus as part of an early initcall After Commit 3499ba8198cad ("xen: Fix event channel callback via INTX/GSI"), xenbus_probe() will be called too early on Arm. This will recent to a guest hang during boot. If the hang wasn't there, we would have ended up to call xenbus_probe() twice (the second time is in xenbus_probe_initcall()). We don't need to initialize xenbus_probe() early for Arm guest. Therefore, the call in xen_guest_init() is now removed. After this change, there is no more external caller for xenbus_probe(). So the function is turned to a static one. Interestingly there were two prototypes for it. Cc: stable@vger.kernel.org Fixes: 3499ba8198cad ("xen: Fix event channel callback via INTX/GSI") Reported-by: Ian Jackson Signed-off-by: Julien Grall Reviewed-by: David Woodhouse Reviewed-by: Stefano Stabellini Link: https://lore.kernel.org/r/20210210170654.5377-1-julien@xen.org Signed-off-by: Juergen Gross commit 3da3cc1b5f47115b16b5ffeeb4bf09ec331b0164 Author: Palmer Dabbelt Date: Thu Feb 4 19:41:12 2021 -0800 Revert "dts: phy: add GPIO number and active state used for phy reset" VSC8541 phys need a special reset sequence, which the driver doesn't currentlny support. As a result enabling the reset via GPIO essentially guarnteees that the device won't work correctly. We've been relying on bootloaders to reset the device for years, with this revert we'll go back to doing so until we can sort out how to get the reset sequence into the kernel. This reverts commit a0fa9d727043da2238432471e85de0bdb8a8df65. Fixes: a0fa9d727043 ("dts: phy: add GPIO number and active state used for phy reset") Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt commit 70245f86c109e0eafb92ea9653184c0e44b4b35c Author: Thomas Gleixner Date: Wed Feb 10 16:27:41 2021 +0100 x86/pci: Create PCI/MSI irqdomain after x86_init.pci.arch_init() Invoking x86_init.irqs.create_pci_msi_domain() before x86_init.pci.arch_init() breaks XEN PV. The XEN_PV specific pci.arch_init() function overrides the default create_pci_msi_domain() which is obviously too late. As a consequence the XEN PV PCI/MSI allocation goes through the native path which runs out of vectors and causes malfunction. Invoke it after x86_init.pci.arch_init(). Fixes: 6b15ffa07dc3 ("x86/irq: Initialize PCI/MSI domain at PCI init time") Reported-by: Juergen Gross Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/87pn18djte.fsf@nanos.tec.linutronix.de commit 291009f656e8eaebbdfd3a8d99f6b190a9ce9deb Merge: a3961497bd9c7 d11a1d08a082a Author: Linus Torvalds Date: Wed Feb 10 12:03:35 2021 -0800 Merge tag 'pm-5.11-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "Address a performance regression related to scale-invariance on x86 that may prevent turbo CPU frequencies from being used in certain workloads on systems using acpi-cpufreq as the CPU performance scaling driver and schedutil as the scaling governor" * tag 'pm-5.11-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: ACPI: Update arch scale-invariance max perf ratio if CPPC is not there cpufreq: ACPI: Extend frequency tables to cover boost frequencies commit a3961497bd9c7ca94212922a46729a9410568eb8 Merge: 708c2e4181420 fe0af09074bfe Author: Linus Torvalds Date: Wed Feb 10 11:58:21 2021 -0800 Merge tag 'acpi-5.11-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fix from Rafael Wysocki: "Revert a problematic ACPICA commit that changed the code to attempt to update memory regions which may be read-only on some systems (Ard Biesheuvel)" * tag 'acpi-5.11-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: Revert "ACPICA: Interpreter: fix memory leak by using existing buffer" commit 708c2e41814209e5dde27c61ad032f4c1ed3624b Merge: 6016bf19b3854 b6c14d7a83802 Author: Linus Torvalds Date: Wed Feb 10 11:51:25 2021 -0800 Merge tag 'dmaengine-fix2-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine Pull dmaengine fixes from Vinod Koul: "Some late fixes for dmaengine: Core: - fix channel device_node deletion Driver fixes: - dw: revert of runtime pm enabling - idxd: device state fix, interrupt completion and list corruption - ti: resource leak * tag 'dmaengine-fix2-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: dmaengine dw: Revert "dmaengine: dw: Enable runtime PM" dmaengine: idxd: check device state before issue command dmaengine: ti: k3-udma: Fix a resource leak in an error handling path dmaengine: move channel device_node deletion to driver dmaengine: idxd: fix misc interrupt completion dmaengine: idxd: Fix list corruption in description completion commit 92c75f7594d5060a4cb240f0e987a802f8486b11 Author: Jens Axboe Date: Wed Feb 10 12:37:58 2021 -0700 Revert "io_uring: don't take fs for recvmsg/sendmsg" This reverts commit 10cad2c40dcb04bb46b2bf399e00ca5ea93d36b0. Petr reports that with this commit in place, io_uring fails the chroot test (CVE-202-29373). We do need to retain ->fs for send/recvmsg, so revert this commit. Reported-by: Petr Vorel Signed-off-by: Jens Axboe commit 6016bf19b3854b6e70ba9278a7ca0fce75278d3a Merge: 4b16b656b1ce0 b8776f14a4704 Author: Linus Torvalds Date: Wed Feb 10 11:33:39 2021 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from David Miller: "Another pile of networing fixes: 1) ath9k build error fix from Arnd Bergmann 2) dma memory leak fix in mediatec driver from Lorenzo Bianconi. 3) bpf int3 kprobe fix from Alexei Starovoitov. 4) bpf stackmap integer overflow fix from Bui Quang Minh. 5) Add usb device ids for Cinterion MV31 to qmi_qwwan driver, from Christoph Schemmel. 6) Don't update deleted entry in xt_recent netfilter module, from Jazsef Kadlecsik. 7) Use after free in nftables, fix from Pablo Neira Ayuso. 8) Header checksum fix in flowtable from Sven Auhagen. 9) Validate user controlled length in qrtr code, from Sabyrzhan Tasbolatov. 10) Fix race in xen/netback, from Juergen Gross, 11) New device ID in cxgb4, from Raju Rangoju. 12) Fix ring locking in rxrpc release call, from David Howells. 13) Don't return LAPB error codes from x25_open(), from Xie He. 14) Missing error returns in gsi_channel_setup() from Alex Elder. 15) Get skb_copy_and_csum_datagram working properly with odd segment sizes, from Willem de Bruijn. 16) Missing RFS/RSS table init in enetc driver, from Vladimir Oltean. 17) Do teardown on probe failure in DSA, from Vladimir Oltean. 18) Fix compilation failures of txtimestamp selftest, from Vadim Fedorenko. 19) Limit rx per-napi gro queue size to fix latency regression, from Eric Dumazet. 20) dpaa_eth xdp fixes from Camelia Groza. 21) Missing txq mode update when switching CBS off, in stmmac driver, from Mohammad Athari Bin Ismail. 22) Failover pending logic fix in ibmvnic driver, from Sukadev Bhattiprolu. 23) Null deref fix in vmw_vsock, from Norbert Slusarek. 24) Missing verdict update in xdp paths of ena driver, from Shay Agroskin. 25) seq_file iteration fix in sctp from Neil Brown. 26) bpf 32-bit src register truncation fix on div/mod, from Daniel Borkmann. 27) Fix jmp32 pruning in bpf verifier, from Daniel Borkmann. 28) Fix locking in vsock_shutdown(), from Stefano Garzarella. 29) Various missing index bound checks in hns3 driver, from Yufeng Mo. 30) Flush ports on .phylink_mac_link_down() in dsa felix driver, from Vladimir Oltean. 31) Don't mix up stp and mrp port states in bridge layer, from Horatiu Vultur. 32) Fix locking during netif_tx_disable(), from Edwin Peer" * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (45 commits) bpf: Fix 32 bit src register truncation on div/mod bpf: Fix verifier jmp32 pruning decision logic bpf: Fix verifier jsgt branch analysis on max bound vsock: fix locking in vsock_shutdown() net: hns3: add a check for index in hclge_get_rss_key() net: hns3: add a check for tqp_index in hclge_get_ring_chain_from_mbx() net: hns3: add a check for queue_id in hclge_reset_vf_queue() net: dsa: felix: implement port flushing on .phylink_mac_link_down switchdev: mrp: Remove SWITCHDEV_ATTR_ID_MRP_PORT_STAT bridge: mrp: Fix the usage of br_mrp_port_switchdev_set_state net: watchdog: hold device global xmit lock during tx disable netfilter: nftables: relax check for stateful expressions in set definition netfilter: conntrack: skip identical origin tuple in same zone only vsock/virtio: update credit only if socket is not closed net: fix iteration for sctp transport seq_files net: ena: Update XDP verdict upon failure net/vmw_vsock: improve locking in vsock_connect_timeout() net/vmw_vsock: fix NULL pointer dereference ibmvnic: Clear failover_pending if unable to schedule net: stmmac: set TxQ mode back to DCB after disabling CBS ... commit 4b16b656b1ce04868a31af65c846cf97823d32c5 Merge: ef7d0b5999384 a35d8f016e0b6 Author: Linus Torvalds Date: Wed Feb 10 11:22:41 2021 -0800 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "14 patches. Subsystems affected by this patch series: mm (kasan, mremap, tmpfs, selftests, memcg, and slub), MAINTAINERS, squashfs, nilfs2, and firmware" * emailed patches from Andrew Morton : nilfs2: make splice write available again mm, slub: better heuristic for number of cpus when calculating slab order Revert "mm: memcontrol: avoid workload stalls when lowering memory.high" MAINTAINERS: update Andrey Ryabinin's email address selftests/vm: rename file run_vmtests to run_vmtests.sh tmpfs: disallow CONFIG_TMPFS_INODE64 on alpha tmpfs: disallow CONFIG_TMPFS_INODE64 on s390 mm/mremap: fix BUILD_BUG_ON() error in get_extent firmware_loader: align .builtin_fw to 8 kasan: fix stack traces dependency for HW_TAGS squashfs: add more sanity checks in xattr id lookup squashfs: add more sanity checks in inode lookup squashfs: add more sanity checks in id lookup squashfs: avoid out of bounds writes in decompressors commit a35d8f016e0b68634035217d06d1c53863456b50 Author: Joachim Henke Date: Tue Feb 9 13:42:36 2021 -0800 nilfs2: make splice write available again Since 5.10, splice() or sendfile() to NILFS2 return EINVAL. This was caused by commit 36e2c7421f02 ("fs: don't allow splice read/write without explicit ops"). This patch initializes the splice_write field in file_operations, like most file systems do, to restore the functionality. Link: https://lkml.kernel.org/r/1612784101-14353-1-git-send-email-konishi.ryusuke@gmail.com Signed-off-by: Joachim Henke Signed-off-by: Ryusuke Konishi Tested-by: Ryusuke Konishi Cc: [5.10+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3286222fc609dea27bd16ac02c55d3f1c3190063 Author: Vlastimil Babka Date: Tue Feb 9 13:42:32 2021 -0800 mm, slub: better heuristic for number of cpus when calculating slab order When creating a new kmem cache, SLUB determines how large the slab pages will based on number of inputs, including the number of CPUs in the system. Larger slab pages mean that more objects can be allocated/free from per-cpu slabs before accessing shared structures, but also potentially more memory can be wasted due to low slab usage and fragmentation. The rough idea of using number of CPUs is that larger systems will be more likely to benefit from reduced contention, and also should have enough memory to spare. Number of CPUs used to be determined as nr_cpu_ids, which is number of possible cpus, but on some systems many will never be onlined, thus commit 045ab8c9487b ("mm/slub: let number of online CPUs determine the slub page order") changed it to nr_online_cpus(). However, for kmem caches created early before CPUs are onlined, this may lead to permamently low slab page sizes. Vincent reports a regression [1] of hackbench on arm64 systems: "I'm facing significant performances regression on a large arm64 server system (224 CPUs). Regressions is also present on small arm64 system (8 CPUs) but in a far smaller order of magnitude On 224 CPUs system : 9 iterations of hackbench -l 16000 -g 16 v5.11-rc4 : 9.135sec (+/- 0.45%) v5.11-rc4 + revert this patch: 3.173sec (+/- 0.48%) v5.10: 3.136sec (+/- 0.40%)" Mel reports a regression [2] of hackbench on x86_64, with lockstat suggesting page allocator contention: "i.e. the patch incurs a 7% to 32% performance penalty. This bisected cleanly yesterday when I was looking for the regression and then found the thread. Numerous caches change size. For example, kmalloc-512 goes from order-0 (vanilla) to order-2 with the revert. So mostly this is down to the number of times SLUB calls into the page allocator which only caches order-0 pages on a per-cpu basis" Clearly num_online_cpus() doesn't work too early in bootup. We could change the order dynamically in a memory hotplug callback, but runtime order changing for existing kmem caches has been already shown as dangerous, and removed in 32a6f409b693 ("mm, slub: remove runtime allocation order changes"). It could be resurrected in a safe manner with some effort, but to fix the regression we need something simpler. We could use num_present_cpus() that should be the number of physically present CPUs even before they are onlined. That would work for PowerPC [3], which triggered the original commit, but that still doesn't work on arm64 [4] as explained in [5]. So this patch tries to determine the best available value without specific arch knowledge. - num_present_cpus() if the number is larger than 1, as that means the arch is likely setting it properly - nr_cpu_ids otherwise This should fix the reported regressions while also keeping the effect of 045ab8c9487b for PowerPC systems. It's possible there are configurations where num_present_cpus() is 1 during boot while nr_cpu_ids is at the same time bloated, so these (if they exist) would keep the large orders based on nr_cpu_ids as was before 045ab8c9487b. [1] https://lore.kernel.org/linux-mm/CAKfTPtA_JgMf_+zdFbcb_V9rM7JBWNPjAz9irgwFj7Rou=xzZg@mail.gmail.com/ [2] https://lore.kernel.org/linux-mm/20210128134512.GF3592@techsingularity.net/ [3] https://lore.kernel.org/linux-mm/20210123051607.GC2587010@in.ibm.com/ [4] https://lore.kernel.org/linux-mm/CAKfTPtAjyVmS5VYvU6DBxg4-JEo5bdmWbngf-03YsY18cmWv_g@mail.gmail.com/ [5] https://lore.kernel.org/linux-mm/20210126230305.GD30941@willie-the-truck/ Link: https://lkml.kernel.org/r/20210208134108.22286-1-vbabka@suse.cz Fixes: 045ab8c9487b ("mm/slub: let number of online CPUs determine the slub page order") Signed-off-by: Vlastimil Babka Reported-by: Vincent Guittot Reported-by: Mel Gorman Tested-by: Mel Gorman Tested-by: Vincent Guittot Cc: Catalin Marinas Cc: Aneesh Kumar K.V Cc: Bharata B Rao Cc: Christoph Lameter Cc: Roman Gushchin Cc: Johannes Weiner Cc: Joonsoo Kim Cc: Jann Horn Cc: Michal Hocko Cc: David Rientjes Cc: Shakeel Butt Cc: Will Deacon Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 28dc10eb77a2db7681b08e3b109764bbe469e347 Author: Nikita Shubin Date: Tue Feb 9 16:31:05 2021 +0300 gpio: ep93xx: Fix single irqchip with multi gpiochips Fixes the following warnings which results in interrupts disabled on port B/F: gpio gpiochip1: (B): detected irqchip that is shared with multiple gpiochips: please fix the driver. gpio gpiochip5: (F): detected irqchip that is shared with multiple gpiochips: please fix the driver. - added separate irqchip for each interrupt capable gpiochip - provided unique names for each irqchip Fixes: d2b091961510 ("gpio: ep93xx: Pass irqchip when adding gpiochip") Cc: Signed-off-by: Nikita Shubin Tested-by: Alexander Sverdlin Signed-off-by: Bartosz Golaszewski commit 8b81a7ab8055d01d827ef66374b126eeac3bd108 Author: Nikita Shubin Date: Tue Feb 9 16:31:04 2021 +0300 gpio: ep93xx: fix BUG_ON port F usage Two index spaces and ep93xx_gpio_port are confusing. Instead add a separate struct to store necessary data and remove ep93xx_gpio_port. - add struct to store IRQ related data for each IRQ capable chip - replace offset array with defined offsets - add IRQ registers offset for each IRQ capable chip into ep93xx_gpio_banks ------------[ cut here ]------------ kernel BUG at drivers/gpio/gpio-ep93xx.c:64! ---[ end trace 3f6544e133e9f5ae ]--- Fixes: fd935fc421e74 ("gpio: ep93xx: Do not pingpong irq numbers") Cc: Reviewed-by: Alexander Sverdlin Tested-by: Alexander Sverdlin Signed-off-by: Nikita Shubin Signed-off-by: Bartosz Golaszewski commit 97c6e28d388a5000d780d2a63c32f422827f5aa3 Author: Geert Uytterhoeven Date: Mon Feb 8 15:51:53 2021 +0100 gpio: mxs: GPIO_MXS should not default to y unconditionally Merely enabling CONFIG_COMPILE_TEST should not enable additional code. To fix this, restrict the automatic enabling of GPIO_MXS to ARCH_MXS, and ask the user in case of compile-testing. Fixes: 6876ca311bfca5d7 ("gpio: mxs: add COMPILE_TEST support for GPIO_MXS") Cc: Signed-off-by: Geert Uytterhoeven Signed-off-by: Bartosz Golaszewski commit 1926a0508d8947cf081280d85ff035300dc71da7 Author: Jernej Skrabec Date: Tue Feb 9 18:59:00 2021 +0100 drm/sun4i: dw-hdmi: Fix max. frequency for H6 It turns out that reasoning for lowering max. supported frequency is wrong. Scrambling works just fine. Several now fixed bugs prevented proper functioning, even with rates lower than 340 MHz. Issues were just more pronounced with higher frequencies. Fix that by allowing max. supported frequency in HW and fix the comment. Fixes: cd9063757a22 ("drm/sun4i: DW HDMI: Lower max. supported rate for H6") Reviewed-by: Chen-Yu Tsai Tested-by: Andre Heider Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210209175900.7092-6-jernej.skrabec@siol.net commit 6a155216c48f2f65c8dcb02c4c27549c170d24a9 Author: Jernej Skrabec Date: Tue Feb 9 18:58:59 2021 +0100 drm/sun4i: Fix H6 HDMI PHY configuration As it turns out, vendor HDMI PHY driver for H6 has a pretty big table of predefined values for various pixel clocks. However, most of them are not useful/tested because they come from reference driver code. Vendor PHY driver is concerned with only few of those, namely 27 MHz, 74.25 MHz, 148.5 MHz, 297 MHz and 594 MHz. These are all frequencies for standard CEA modes. Fix sun50i_h6_cur_ctr and sun50i_h6_phy_config with the values only for aforementioned frequencies. Table sun50i_h6_mpll_cfg doesn't need to be changed because values are actually frequency dependent and not so much SoC dependent. See i.MX6 documentation for explanation of those values for similar PHY. Fixes: c71c9b2fee17 ("drm/sun4i: Add support for Synopsys HDMI PHY") Tested-by: Andre Heider Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210209175900.7092-5-jernej.skrabec@siol.net commit 36b53581fe0dc2e25b67de4e58920307f22d195a Author: Jernej Skrabec Date: Tue Feb 9 18:58:58 2021 +0100 drm/sun4i: dw-hdmi: always set clock rate As expected, HDMI controller clock should always match pixel clock. In the past, changing HDMI controller rate would seemingly worsen situation. However, that was the result of other bugs which are now fixed. Fix that by removing set_rate quirk and always set clock rate. Fixes: 40bb9d3147b2 ("drm/sun4i: Add support for H6 DW HDMI controller") Reviewed-by: Chen-Yu Tsai Tested-by: Andre Heider Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210209175900.7092-4-jernej.skrabec@siol.net commit 50791f5d7b6a14b388f46c8885f71d1b98216d1d Author: Jernej Skrabec Date: Tue Feb 9 18:58:57 2021 +0100 drm/sun4i: tcon: set sync polarity for tcon1 channel Channel 1 has polarity bits for vsync and hsync signals but driver never sets them. It turns out that with pre-HDMI2 controllers seemingly there is no issue if polarity is not set. However, with HDMI2 controllers (H6) there often comes to de-synchronization due to phase shift. This causes flickering screen. It's safe to assume that similar issues might happen also with pre-HDMI2 controllers. Solve issue with setting vsync and hsync polarity. Note that display stacks with tcon top have polarity bits actually in tcon0 polarity register. Fixes: 9026e0d122ac ("drm: Add Allwinner A10 Display Engine support") Reviewed-by: Chen-Yu Tsai Tested-by: Andre Heider Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210209175900.7092-3-jernej.skrabec@siol.net commit 5feba0e905c495a217aea9db4ea91093d8fe5dde Author: Ville Syrjälä Date: Tue Feb 9 04:19:17 2021 +0200 drm/i915: Fix overlay frontbuffer tracking We don't have a persistent fb holding a reference to the frontbuffer object, so every time we do the get+put we throw the frontbuffer object immediately away. And so the next time around we get a pristine frontbuffer object with bits==0 even for the old vma. This confuses the frontbuffer tracking code which understandably expects the old frontbuffer to have the overlay's bit set. Fix this by hanging on to the frontbuffer reference until the next flip. And just to make this a bit more clear let's track the frontbuffer explicitly instead of just grabbing it via the old vma. Cc: stable@vger.kernel.org Cc: Chris Wilson Cc: Joonas Lahtinen Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/1136 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210209021918.16234-2-ville.syrjala@linux.intel.com Fixes: 8e7cb1799b4f ("drm/i915: Extract intel_frontbuffer active tracking") Reviewed-by: Chris Wilson (cherry picked from commit 553c23bdb4775130f333f07a51b047276bc53f79) Signed-off-by: Jani Nikula commit cf050f96e0970a557601953ed7269d07a7885078 Author: Alex Deucher Date: Wed Feb 3 14:03:50 2021 -0500 Revert "drm/amd/display: Update NV1x SR latency values" This reverts commit 4a3dea8932d3b1199680d2056dd91d31d94d70b7. This causes blank screens for some users. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1482 Cc: Alvin Lee Cc: Jun Lei Cc: Rodrigo Siqueira Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit b8776f14a47046796fe078c4a2e691f58e00ae06 Merge: 450bbc3395185 e88b2c6e5a4d9 Author: David S. Miller Date: Tue Feb 9 18:55:17 2021 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2021-02-10 The following pull-request contains BPF updates for your *net* tree. We've added 5 non-merge commits during the last 8 day(s) which contain a total of 3 files changed, 22 insertions(+), 21 deletions(-). The main changes are: 1) Fix missed execution of kprobes BPF progs when kprobe is firing via int3, from Alexei Starovoitov. 2) Fix potential integer overflow in map max_entries for stackmap on 32 bit archs, from Bui Quang Minh. 3) Fix a verifier pruning and a insn rewrite issue related to 32 bit ops, from Daniel Borkmann. ==================== Signed-off-by: David S. Miller c# Please enter a commit message to explain why this merge is necessary, commit a0f85e38a3c23a334d9ea111cfa4fcfa4b3f9b64 Author: Ronnie Sahlberg Date: Wed Feb 10 11:55:47 2021 +1000 cifs: do not disable noperm if multiuser mount option is not provided Fixes small regression in implementation of new mount API. Signed-off-by: Ronnie Sahlberg Reported-by: Hyunchul Lee Tested-by: Hyunchul Lee Signed-off-by: Steve French commit e82553c10b0899994153f9bf0af333c0a1550fd7 Author: Johannes Weiner Date: Tue Feb 9 13:42:28 2021 -0800 Revert "mm: memcontrol: avoid workload stalls when lowering memory.high" This reverts commit 536d3bf261a2fc3b05b3e91e7eef7383443015cf, as it can cause writers to memory.high to get stuck in the kernel forever, performing page reclaim and consuming excessive amounts of CPU cycles. Before the patch, a write to memory.high would first put the new limit in place for the workload, and then reclaim the requested delta. After the patch, the kernel tries to reclaim the delta before putting the new limit into place, in order to not overwhelm the workload with a sudden, large excess over the limit. However, if reclaim is actively racing with new allocations from the uncurbed workload, it can keep the write() working inside the kernel indefinitely. This is causing problems in Facebook production. A privileged system-level daemon that adjusts memory.high for various workloads running on a host can get unexpectedly stuck in the kernel and essentially turn into a sort of involuntary kswapd for one of the workloads. We've observed that daemon busy-spin in a write() for minutes at a time, neglecting its other duties on the system, and expending privileged system resources on behalf of a workload. To remedy this, we have first considered changing the reclaim logic to break out after a couple of loops - whether the workload has converged to the new limit or not - and bound the write() call this way. However, the root cause that inspired the sequence change in the first place has been fixed through other means, and so a revert back to the proven limit-setting sequence, also used by memory.max, is preferable. The sequence was changed to avoid extreme latencies in the workload when the limit was lowered: the sudden, large excess created by the limit lowering would erroneously trigger the penalty sleeping code that is meant to throttle excessive growth from below. Allocating threads could end up sleeping long after the write() had already reclaimed the delta for which they were being punished. However, erroneous throttling also caused problems in other scenarios at around the same time. This resulted in commit b3ff92916af3 ("mm, memcg: reclaim more aggressively before high allocator throttling"), included in the same release as the offending commit. When allocating threads now encounter large excess caused by a racing write() to memory.high, instead of entering punitive sleeps, they will simply be tasked with helping reclaim down the excess, and will be held no longer than it takes to accomplish that. This is in line with regular limit enforcement - i.e. if the workload allocates up against or over an otherwise unchanged limit from below. With the patch breaking userspace, and the root cause addressed by other means already, revert it again. Link: https://lkml.kernel.org/r/20210122184341.292461-1-hannes@cmpxchg.org Fixes: 536d3bf261a2 ("mm: memcontrol: avoid workload stalls when lowering memory.high") Signed-off-by: Johannes Weiner Reported-by: Tejun Heo Acked-by: Chris Down Acked-by: Michal Hocko Cc: Roman Gushchin Cc: Shakeel Butt Cc: Michal Koutný Cc: [5.8+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a0c2eb0a4387322ebc629c01f5adb2d957c343fe Author: Andrey Ryabinin Date: Tue Feb 9 13:42:24 2021 -0800 MAINTAINERS: update Andrey Ryabinin's email address Update my email, @virtuozzo.com will stop working shortly. Link: https://lkml.kernel.org/r/20210204223904.3824-1-ryabinin.a.a@gmail.com Signed-off-by: Andrey Ryabinin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d52db800846f66d98a4e14c39cf88a06bcd9985f Author: Rong Chen Date: Tue Feb 9 13:42:21 2021 -0800 selftests/vm: rename file run_vmtests to run_vmtests.sh Commit c2aa8afc36fa has renamed run_vmtests in Makefile, but the file still uses the old name. The kernel test robot reported the following issue: # selftests: vm: run_vmtests.sh # Warning: file run_vmtests.sh is missing! not ok 1 selftests: vm: run_vmtests.sh Link: https://lkml.kernel.org/r/20210205085507.1479894-1-rong.a.chen@intel.com Fixes: c2aa8afc36fa (selftests/vm: rename run_vmtests --> run_vmtests.sh) Signed-off-by: Rong Chen Reported-by: kernel test robot Reviewed-by: John Hubbard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ad69c389ec110ea54f8b0c0884b255340ef1c736 Author: Seth Forshee Date: Tue Feb 9 13:42:17 2021 -0800 tmpfs: disallow CONFIG_TMPFS_INODE64 on alpha As with s390, alpha is a 64-bit architecture with a 32-bit ino_t. With CONFIG_TMPFS_INODE64=y tmpfs mounts will get 64-bit inode numbers and display "inode64" in the mount options, whereas passing "inode64" in the mount options will fail. This leads to erroneous behaviours such as this: # mkdir mnt # mount -t tmpfs nodev mnt # mount -o remount,rw mnt mount: /home/ubuntu/mnt: mount point not mounted or bad option. Prevent CONFIG_TMPFS_INODE64 from being selected on alpha. Link: https://lkml.kernel.org/r/20210208215726.608197-1-seth.forshee@canonical.com Fixes: ea3271f7196c ("tmpfs: support 64-bit inums per-sb") Signed-off-by: Seth Forshee Acked-by: Hugh Dickins Cc: Chris Down Cc: Amir Goldstein Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: [5.9+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b85a7a8bb5736998b8a681937a9749b350c17988 Author: Seth Forshee Date: Tue Feb 9 13:42:14 2021 -0800 tmpfs: disallow CONFIG_TMPFS_INODE64 on s390 Currently there is an assumption in tmpfs that 64-bit architectures also have a 64-bit ino_t. This is not true on s390 which has a 32-bit ino_t. With CONFIG_TMPFS_INODE64=y tmpfs mounts will get 64-bit inode numbers and display "inode64" in the mount options, but passing the "inode64" mount option will fail. This leads to the following behavior: # mkdir mnt # mount -t tmpfs nodev mnt # mount -o remount,rw mnt mount: /home/ubuntu/mnt: mount point not mounted or bad option. As mount sees "inode64" in the mount options and thus passes it in the options for the remount. So prevent CONFIG_TMPFS_INODE64 from being selected on s390. Link: https://lkml.kernel.org/r/20210205230620.518245-1-seth.forshee@canonical.com Fixes: ea3271f7196c ("tmpfs: support 64-bit inums per-sb") Signed-off-by: Seth Forshee Acked-by: Hugh Dickins Cc: Chris Down Cc: Hugh Dickins Cc: Amir Goldstein Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: [5.9+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a30a29091b5a6d4c64b5fc77040720a65e2dd4e6 Author: Arnd Bergmann Date: Tue Feb 9 13:42:10 2021 -0800 mm/mremap: fix BUILD_BUG_ON() error in get_extent clang can't evaluate this function argument at compile time when the function is not inlined, which leads to a link time failure: ld.lld: error: undefined symbol: __compiletime_assert_414 >>> referenced by mremap.c >>> mremap.o:(get_extent) in archive mm/built-in.a Mark the function as __always_inline to avoid it. Link: https://lkml.kernel.org/r/20201230154104.522605-1-arnd@kernel.org Fixes: 9ad9718bfa41 ("mm/mremap: calculate extent in one place") Signed-off-by: Arnd Bergmann Tested-by: Nick Desaulniers Reviewed-by: Nathan Chancellor Tested-by: Sedat Dilek Cc: Kirill A. Shutemov" Cc: Wei Yang Cc: Vlastimil Babka Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Brian Geffon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 793f49a87aae24e5bcf92ad98d764153fc936570 Author: Fangrui Song Date: Tue Feb 9 13:42:07 2021 -0800 firmware_loader: align .builtin_fw to 8 arm64 references the start address of .builtin_fw (__start_builtin_fw) with a pair of R_AARCH64_ADR_PREL_PG_HI21/R_AARCH64_LDST64_ABS_LO12_NC relocations. The compiler is allowed to emit the R_AARCH64_LDST64_ABS_LO12_NC relocation because struct builtin_fw in include/linux/firmware.h is 8-byte aligned. The R_AARCH64_LDST64_ABS_LO12_NC relocation requires the address to be a multiple of 8, which may not be the case if .builtin_fw is empty. Unconditionally align .builtin_fw to fix the linker error. 32-bit architectures could use ALIGN(4) but that would add unnecessary complexity, so just use ALIGN(8). Link: https://lkml.kernel.org/r/20201208054646.2913063-1-maskray@google.com Link: https://github.com/ClangBuiltLinux/linux/issues/1204 Fixes: 5658c76 ("firmware: allow firmware files to be built into kernel image") Signed-off-by: Fangrui Song Reported-by: kernel test robot Acked-by: Arnd Bergmann Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers Tested-by: Douglas Anderson Acked-by: Nathan Chancellor Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1cc4cdb521f9689183474bc89eefc451ac44fa1c Author: Andrey Konovalov Date: Tue Feb 9 13:42:03 2021 -0800 kasan: fix stack traces dependency for HW_TAGS Currently, whether the alloc/free stack traces collection is enabled by default for hardware tag-based KASAN depends on CONFIG_DEBUG_KERNEL. The intention for this dependency was to only enable collection on slow debug kernels due to a significant perf and memory impact. As it turns out, CONFIG_DEBUG_KERNEL is not considered a debug option and is enabled on many productions kernels including Android and Ubuntu. As the result, this dependency is pointless and only complicates the code and documentation. Having stack traces collection disabled by default would make the hardware mode work differently to to the software ones, which is confusing. This change removes the dependency and enables stack traces collection by default. Looking into the future, this default might makes sense for production kernels, assuming we implement a fast stack trace collection approach. Link: https://lkml.kernel.org/r/6678d77ceffb71f1cff2cf61560e2ffe7bb6bfe9.1612808820.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Cc: Catalin Marinas Cc: Vincenzo Frascino Cc: Dmitry Vyukov Cc: Alexander Potapenko Cc: Will Deacon Cc: Andrey Ryabinin Cc: Peter Collingbourne Cc: Evgenii Stepanov Cc: Branislav Rankov Cc: Kevin Brodsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 506220d2ba21791314af569211ffd8870b8208fa Author: Phillip Lougher Date: Tue Feb 9 13:42:00 2021 -0800 squashfs: add more sanity checks in xattr id lookup Sysbot has reported a warning where a kmalloc() attempt exceeds the maximum limit. This has been identified as corruption of the xattr_ids count when reading the xattr id lookup table. This patch adds a number of additional sanity checks to detect this corruption and others. 1. It checks for a corrupted xattr index read from the inode. This could be because the metadata block is uncompressed, or because the "compression" bit has been corrupted (turning a compressed block into an uncompressed block). This would cause an out of bounds read. 2. It checks against corruption of the xattr_ids count. This can either lead to the above kmalloc failure, or a smaller than expected table to be read. 3. It checks the contents of the index table for corruption. [phillip@squashfs.org.uk: fix checkpatch issue] Link: https://lkml.kernel.org/r/270245655.754655.1612770082682@webmail.123-reg.co.uk Link: https://lkml.kernel.org/r/20210204130249.4495-5-phillip@squashfs.org.uk Signed-off-by: Phillip Lougher Reported-by: syzbot+2ccea6339d368360800d@syzkaller.appspotmail.com Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit eabac19e40c095543def79cb6ffeb3a8588aaff4 Author: Phillip Lougher Date: Tue Feb 9 13:41:56 2021 -0800 squashfs: add more sanity checks in inode lookup Sysbot has reported an "slab-out-of-bounds read" error which has been identified as being caused by a corrupted "ino_num" value read from the inode. This could be because the metadata block is uncompressed, or because the "compression" bit has been corrupted (turning a compressed block into an uncompressed block). This patch adds additional sanity checks to detect this, and the following corruption. 1. It checks against corruption of the inodes count. This can either lead to a larger table to be read, or a smaller than expected table to be read. In the case of a too large inodes count, this would often have been trapped by the existing sanity checks, but this patch introduces a more exact check, which can identify too small values. 2. It checks the contents of the index table for corruption. [phillip@squashfs.org.uk: fix checkpatch issue] Link: https://lkml.kernel.org/r/527909353.754618.1612769948607@webmail.123-reg.co.uk Link: https://lkml.kernel.org/r/20210204130249.4495-4-phillip@squashfs.org.uk Signed-off-by: Phillip Lougher Reported-by: syzbot+04419e3ff19d2970ea28@syzkaller.appspotmail.com Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f37aa4c7366e23f91b81d00bafd6a7ab54e4a381 Author: Phillip Lougher Date: Tue Feb 9 13:41:53 2021 -0800 squashfs: add more sanity checks in id lookup Sysbot has reported a number of "slab-out-of-bounds reads" and "use-after-free read" errors which has been identified as being caused by a corrupted index value read from the inode. This could be because the metadata block is uncompressed, or because the "compression" bit has been corrupted (turning a compressed block into an uncompressed block). This patch adds additional sanity checks to detect this, and the following corruption. 1. It checks against corruption of the ids count. This can either lead to a larger table to be read, or a smaller than expected table to be read. In the case of a too large ids count, this would often have been trapped by the existing sanity checks, but this patch introduces a more exact check, which can identify too small values. 2. It checks the contents of the index table for corruption. Link: https://lkml.kernel.org/r/20210204130249.4495-3-phillip@squashfs.org.uk Signed-off-by: Phillip Lougher Reported-by: syzbot+b06d57ba83f604522af2@syzkaller.appspotmail.com Reported-by: syzbot+c021ba012da41ee9807c@syzkaller.appspotmail.com Reported-by: syzbot+5024636e8b5fd19f0f19@syzkaller.appspotmail.com Reported-by: syzbot+bcbc661df46657d0fa4f@syzkaller.appspotmail.com Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e812cbbbbbb15adbbbee176baa1e8bda53059bf0 Author: Phillip Lougher Date: Tue Feb 9 13:41:50 2021 -0800 squashfs: avoid out of bounds writes in decompressors Patch series "Squashfs: fix BIO migration regression and add sanity checks". Patch [1/4] fixes a regression introduced by the "migrate from ll_rw_block usage to BIO" patch, which has produced a number of Sysbot/Syzkaller reports. Patches [2/4], [3/4], and [4/4] fix a number of filesystem corruption issues which have produced Sysbot reports in the id, inode and xattr lookup code. Each patch has been tested against the Sysbot reproducers using the given kernel configuration. They have the appropriate "Reported-by:" lines added. Additionally, all of the reproducer filesystems are indirectly fixed by patch [4/4] due to the fact they all have xattr corruption which is now detected there. Additional testing with other configurations and architectures (32bit, big endian), and normal filesystems has also been done to trap any inadvertent regressions caused by the additional sanity checks. This patch (of 4): This is a regression introduced by the patch "migrate from ll_rw_block usage to BIO". Sysbot/Syskaller has reported a number of "out of bounds writes" and "unable to handle kernel paging request in squashfs_decompress" errors which have been identified as a regression introduced by the above patch. Specifically, the patch removed the following sanity check if (length < 0 || length > output->length || (index + length) > msblk->bytes_used) This check did two things: 1. It ensured any reads were not beyond the end of the filesystem 2. It ensured that the "length" field read from the filesystem was within the expected maximum length. Without this any corrupted values can over-run allocated buffers. Link: https://lkml.kernel.org/r/20210204130249.4495-1-phillip@squashfs.org.uk Link: https://lkml.kernel.org/r/20210204130249.4495-2-phillip@squashfs.org.uk Fixes: 93e72b3c612adc ("squashfs: migrate from ll_rw_block usage to BIO") Reported-by: syzbot+6fba78f99b9afd4b5634@syzkaller.appspotmail.com Signed-off-by: Phillip Lougher Cc: Philippe Liard Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ef7d0b599938450c54a8dc0aa4b954d73d9a9370 Merge: e0756cfc7d7cd 291b5c9870fc5 Author: Linus Torvalds Date: Tue Feb 9 17:19:56 2021 -0800 Merge tag 'i3c/fixes-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux Pull i3c fix from Alexandre Belloni: "A single build warning fix" * tag 'i3c/fixes-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux: i3c/master/mipi-i3c-hci: Fix position of __maybe_unused in i3c_hci_of_match commit e88b2c6e5a4d9ce30d75391e4d950da74bb2bd90 Author: Daniel Borkmann Date: Tue Feb 9 18:46:10 2021 +0000 bpf: Fix 32 bit src register truncation on div/mod While reviewing a different fix, John and I noticed an oddity in one of the BPF program dumps that stood out, for example: # bpftool p d x i 13 0: (b7) r0 = 808464450 1: (b4) w4 = 808464432 2: (bc) w0 = w0 3: (15) if r0 == 0x0 goto pc+1 4: (9c) w4 %= w0 [...] In line 2 we noticed that the mov32 would 32 bit truncate the original src register for the div/mod operation. While for the two operations the dst register is typically marked unknown e.g. from adjust_scalar_min_max_vals() the src register is not, and thus verifier keeps tracking original bounds, simplified: 0: R1=ctx(id=0,off=0,imm=0) R10=fp0 0: (b7) r0 = -1 1: R0_w=invP-1 R1=ctx(id=0,off=0,imm=0) R10=fp0 1: (b7) r1 = -1 2: R0_w=invP-1 R1_w=invP-1 R10=fp0 2: (3c) w0 /= w1 3: R0_w=invP(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff)) R1_w=invP-1 R10=fp0 3: (77) r1 >>= 32 4: R0_w=invP(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff)) R1_w=invP4294967295 R10=fp0 4: (bf) r0 = r1 5: R0_w=invP4294967295 R1_w=invP4294967295 R10=fp0 5: (95) exit processed 6 insns (limit 1000000) max_states_per_insn 0 total_states 0 peak_states 0 mark_read 0 Runtime result of r0 at exit is 0 instead of expected -1. Remove the verifier mov32 src rewrite in div/mod and replace it with a jmp32 test instead. After the fix, we result in the following code generation when having dividend r1 and divisor r6: div, 64 bit: div, 32 bit: 0: (b7) r6 = 8 0: (b7) r6 = 8 1: (b7) r1 = 8 1: (b7) r1 = 8 2: (55) if r6 != 0x0 goto pc+2 2: (56) if w6 != 0x0 goto pc+2 3: (ac) w1 ^= w1 3: (ac) w1 ^= w1 4: (05) goto pc+1 4: (05) goto pc+1 5: (3f) r1 /= r6 5: (3c) w1 /= w6 6: (b7) r0 = 0 6: (b7) r0 = 0 7: (95) exit 7: (95) exit mod, 64 bit: mod, 32 bit: 0: (b7) r6 = 8 0: (b7) r6 = 8 1: (b7) r1 = 8 1: (b7) r1 = 8 2: (15) if r6 == 0x0 goto pc+1 2: (16) if w6 == 0x0 goto pc+1 3: (9f) r1 %= r6 3: (9c) w1 %= w6 4: (b7) r0 = 0 4: (b7) r0 = 0 5: (95) exit 5: (95) exit x86 in particular can throw a 'divide error' exception for div instruction not only for divisor being zero, but also for the case when the quotient is too large for the designated register. For the edx:eax and rdx:rax dividend pair it is not an issue in x86 BPF JIT since we always zero edx (rdx). Hence really the only protection needed is against divisor being zero. Fixes: 68fda450a7df ("bpf: fix 32-bit divide by zero") Co-developed-by: John Fastabend Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov commit fd675184fc7abfd1e1c52d23e8e900676b5a1c1a Author: Daniel Borkmann Date: Fri Feb 5 20:48:21 2021 +0100 bpf: Fix verifier jmp32 pruning decision logic Anatoly has been fuzzing with kBdysch harness and reported a hang in one of the outcomes: func#0 @0 0: R1=ctx(id=0,off=0,imm=0) R10=fp0 0: (b7) r0 = 808464450 1: R0_w=invP808464450 R1=ctx(id=0,off=0,imm=0) R10=fp0 1: (b4) w4 = 808464432 2: R0_w=invP808464450 R1=ctx(id=0,off=0,imm=0) R4_w=invP808464432 R10=fp0 2: (9c) w4 %= w0 3: R0_w=invP808464450 R1=ctx(id=0,off=0,imm=0) R4_w=invP(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff)) R10=fp0 3: (66) if w4 s> 0x30303030 goto pc+0 R0_w=invP808464450 R1=ctx(id=0,off=0,imm=0) R4_w=invP(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff),s32_max_value=808464432) R10=fp0 4: R0_w=invP808464450 R1=ctx(id=0,off=0,imm=0) R4_w=invP(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff),s32_max_value=808464432) R10=fp0 4: (7f) r0 >>= r0 5: R0_w=invP(id=0) R1=ctx(id=0,off=0,imm=0) R4_w=invP(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff),s32_max_value=808464432) R10=fp0 5: (9c) w4 %= w0 6: R0_w=invP(id=0) R1=ctx(id=0,off=0,imm=0) R4_w=invP(id=0) R10=fp0 6: (66) if w0 s> 0x3030 goto pc+0 R0_w=invP(id=0,s32_max_value=12336) R1=ctx(id=0,off=0,imm=0) R4_w=invP(id=0) R10=fp0 7: R0=invP(id=0,s32_max_value=12336) R1=ctx(id=0,off=0,imm=0) R4=invP(id=0) R10=fp0 7: (d6) if w0 s<= 0x303030 goto pc+1 9: R0=invP(id=0,s32_max_value=12336) R1=ctx(id=0,off=0,imm=0) R4=invP(id=0) R10=fp0 9: (95) exit propagating r0 from 6 to 7: safe 4: R0_w=invP808464450 R1=ctx(id=0,off=0,imm=0) R4_w=invP(id=0,umin_value=808464433,umax_value=2147483647,var_off=(0x0; 0x7fffffff)) R10=fp0 4: (7f) r0 >>= r0 5: R0_w=invP(id=0) R1=ctx(id=0,off=0,imm=0) R4_w=invP(id=0,umin_value=808464433,umax_value=2147483647,var_off=(0x0; 0x7fffffff)) R10=fp0 5: (9c) w4 %= w0 6: R0_w=invP(id=0) R1=ctx(id=0,off=0,imm=0) R4_w=invP(id=0) R10=fp0 6: (66) if w0 s> 0x3030 goto pc+0 R0_w=invP(id=0,s32_max_value=12336) R1=ctx(id=0,off=0,imm=0) R4_w=invP(id=0) R10=fp0 propagating r0 7: safe propagating r0 from 6 to 7: safe processed 15 insns (limit 1000000) max_states_per_insn 0 total_states 1 peak_states 1 mark_read 1 The underlying program was xlated as follows: # bpftool p d x i 10 0: (b7) r0 = 808464450 1: (b4) w4 = 808464432 2: (bc) w0 = w0 3: (15) if r0 == 0x0 goto pc+1 4: (9c) w4 %= w0 5: (66) if w4 s> 0x30303030 goto pc+0 6: (7f) r0 >>= r0 7: (bc) w0 = w0 8: (15) if r0 == 0x0 goto pc+1 9: (9c) w4 %= w0 10: (66) if w0 s> 0x3030 goto pc+0 11: (d6) if w0 s<= 0x303030 goto pc+1 12: (05) goto pc-1 13: (95) exit The verifier rewrote original instructions it recognized as dead code with 'goto pc-1', but reality differs from verifier simulation in that we are actually able to trigger a hang due to hitting the 'goto pc-1' instructions. Taking a closer look at the verifier analysis, the reason is that it misjudges its pruning decision at the first 'from 6 to 7: safe' occasion. What happens is that while both old/cur registers are marked as precise, they get misjudged for the jmp32 case as range_within() yields true, meaning that the prior verification path with a wider register bound could be verified successfully and therefore the current path with a narrower register bound is deemed safe as well whereas in reality it's not. R0 old/cur path's bounds compare as follows: old: smin_value=0x8000000000000000,smax_value=0x7fffffffffffffff,umin_value=0x0,umax_value=0xffffffffffffffff,var_off=(0x0; 0xffffffffffffffff) cur: smin_value=0x8000000000000000,smax_value=0x7fffffff7fffffff,umin_value=0x0,umax_value=0xffffffff7fffffff,var_off=(0x0; 0xffffffff7fffffff) old: s32_min_value=0x80000000,s32_max_value=0x00003030,u32_min_value=0x00000000,u32_max_value=0xffffffff cur: s32_min_value=0x00003031,s32_max_value=0x7fffffff,u32_min_value=0x00003031,u32_max_value=0x7fffffff The 64 bit bounds generally look okay and while the information that got propagated from 32 to 64 bit looks correct as well, it's not precise enough for judging a conditional jmp32. Given the latter only operates on subregisters we also need to take these into account as well for a range_within() probe in order to be able to prune paths. Extending the range_within() constraint to both bounds will be able to tell us that the old signed 32 bit bounds are not wider than the cur signed 32 bit bounds. With the fix in place, the program will now verify the 'goto' branch case as it should have been: [...] 6: R0_w=invP(id=0) R1=ctx(id=0,off=0,imm=0) R4_w=invP(id=0) R10=fp0 6: (66) if w0 s> 0x3030 goto pc+0 R0_w=invP(id=0,s32_max_value=12336) R1=ctx(id=0,off=0,imm=0) R4_w=invP(id=0) R10=fp0 7: R0=invP(id=0,s32_max_value=12336) R1=ctx(id=0,off=0,imm=0) R4=invP(id=0) R10=fp0 7: (d6) if w0 s<= 0x303030 goto pc+1 9: R0=invP(id=0,s32_max_value=12336) R1=ctx(id=0,off=0,imm=0) R4=invP(id=0) R10=fp0 9: (95) exit 7: R0_w=invP(id=0,smax_value=9223372034707292159,umax_value=18446744071562067967,var_off=(0x0; 0xffffffff7fffffff),s32_min_value=12337,u32_min_value=12337,u32_max_value=2147483647) R1=ctx(id=0,off=0,imm=0) R4_w=invP(id=0) R10=fp0 7: (d6) if w0 s<= 0x303030 goto pc+1 R0_w=invP(id=0,smax_value=9223372034707292159,umax_value=18446744071562067967,var_off=(0x0; 0xffffffff7fffffff),s32_min_value=3158065,u32_min_value=3158065,u32_max_value=2147483647) R1=ctx(id=0,off=0,imm=0) R4_w=invP(id=0) R10=fp0 8: R0_w=invP(id=0,smax_value=9223372034707292159,umax_value=18446744071562067967,var_off=(0x0; 0xffffffff7fffffff),s32_min_value=3158065,u32_min_value=3158065,u32_max_value=2147483647) R1=ctx(id=0,off=0,imm=0) R4_w=invP(id=0) R10=fp0 8: (30) r0 = *(u8 *)skb[808464432] BPF_LD_[ABS|IND] uses reserved fields processed 11 insns (limit 1000000) max_states_per_insn 1 total_states 1 peak_states 1 mark_read 1 The bug is quite subtle in the sense that when verifier would determine that a given branch is dead code, it would (here: wrongly) remove these instructions from the program and hard-wire the taken branch for privileged programs instead of the 'goto pc-1' rewrites which will cause hard to debug problems. Fixes: 3f50f132d840 ("bpf: Verifier, do explicit ALU32 bounds tracking") Reported-by: Anatoly Trosinenko Signed-off-by: Daniel Borkmann Reviewed-by: John Fastabend Acked-by: Alexei Starovoitov commit ee114dd64c0071500345439fc79dd5e0f9d106ed Author: Daniel Borkmann Date: Fri Feb 5 17:20:14 2021 +0100 bpf: Fix verifier jsgt branch analysis on max bound Fix incorrect is_branch{32,64}_taken() analysis for the jsgt case. The return code for both will tell the caller whether a given conditional jump is taken or not, e.g. 1 means branch will be taken [for the involved registers] and the goto target will be executed, 0 means branch will not be taken and instead we fall-through to the next insn, and last but not least a -1 denotes that it is not known at verification time whether a branch will be taken or not. Now while the jsgt has the branch-taken case correct with reg->s32_min_value > sval, the branch-not-taken case is off-by-one when testing for reg->s32_max_value < sval since the branch will also be taken for reg->s32_max_value == sval. The jgt branch analysis, for example, gets this right. Fixes: 3f50f132d840 ("bpf: Verifier, do explicit ALU32 bounds tracking") Fixes: 4f7b3e82589e ("bpf: improve verifier branch analysis") Signed-off-by: Daniel Borkmann Reviewed-by: John Fastabend Acked-by: Alexei Starovoitov commit 450bbc3395185963b133177a9ddae305dae7c5fa Merge: 1c5fae9c9a092 664899e85c131 Author: David S. Miller Date: Tue Feb 9 15:55:59 2021 -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) nf_conntrack_tuple_taken() needs to recheck zone for NAT clash resolution, from Florian Westphal. 2) Restore support for stateful expressions when set definition specifies no stateful expressions. ==================== Signed-off-by: David S. Miller commit 1c5fae9c9a092574398a17facc31c533791ef232 Author: Stefano Garzarella Date: Tue Feb 9 09:52:19 2021 +0100 vsock: fix locking in vsock_shutdown() In vsock_shutdown() we touched some socket fields without holding the socket lock, such as 'state' and 'sk_flags'. Also, after the introduction of multi-transport, we are accessing 'vsk->transport' in vsock_send_shutdown() without holding the lock and this call can be made while the connection is in progress, so the transport can change in the meantime. To avoid issues, we hold the socket lock when we enter in vsock_shutdown() and release it when we leave. Among the transports that implement the 'shutdown' callback, only hyperv_transport acquired the lock. Since the caller now holds it, we no longer take it. Fixes: d021c344051a ("VSOCK: Introduce VM Sockets") Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller commit 49c2547b82c6da8875d375e3544354e8bd7cf082 Merge: eb4733d7cffc5 532cfc0df1e4d Author: David S. Miller Date: Tue Feb 9 15:20:43 2021 -0800 Merge branch 'hns3-fixes' Huazhong Tan says: ==================== net: hns3: fixes for -net The parameters sent from vf may be unreliable. If these parameters are used directly, memory overwriting may occur. So this series adds some checks for this case. ==================== Signed-off-by: David S. Miller commit 532cfc0df1e4d68e74522ef4a0dcbf6ebbe68287 Author: Yufeng Mo Date: Tue Feb 9 17:03:07 2021 +0800 net: hns3: add a check for index in hclge_get_rss_key() The index is received from vf, if use it directly, an out-of-bound issue may be caused, so add a check for this index before using it in hclge_get_rss_key(). Fixes: a638b1d8cc87 ("net: hns3: fix get VF RSS issue") Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 326334aad024a60f46dc5e7dbe1efe32da3ca66f Author: Yufeng Mo Date: Tue Feb 9 17:03:06 2021 +0800 net: hns3: add a check for tqp_index in hclge_get_ring_chain_from_mbx() The tqp_index is received from vf, if use it directly, an out-of-bound issue may be caused, so add a check for this tqp_index before using it in hclge_get_ring_chain_from_mbx(). Fixes: 84e095d64ed9 ("net: hns3: Change PF to add ring-vect binding & resetQ to mailbox") Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 67a69f84cab60484f02eb8cbc7a76edffbb28a25 Author: Yufeng Mo Date: Tue Feb 9 17:03:05 2021 +0800 net: hns3: add a check for queue_id in hclge_reset_vf_queue() The queue_id is received from vf, if use it directly, an out-of-bound issue may be caused, so add a check for this queue_id before using it in hclge_reset_vf_queue(). Fixes: 1a426f8b40fc ("net: hns3: fix the VF queue reset flow error") Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit eb4733d7cffc547e08fe5a216e4f03663bb71108 Author: Vladimir Oltean Date: Mon Feb 8 19:36:27 2021 +0200 net: dsa: felix: implement port flushing on .phylink_mac_link_down There are several issues which may be seen when the link goes down while forwarding traffic, all of which can be attributed to the fact that the port flushing procedure from the reference manual was not closely followed. With flow control enabled on both the ingress port and the egress port, it may happen when a link goes down that Ethernet packets are in flight. In flow control mode, frames are held back and not dropped. When there is enough traffic in flight (example: iperf3 TCP), then the ingress port might enter congestion and never exit that state. This is a problem, because it is the egress port's link that went down, and that has caused the inability of the ingress port to send packets to any other port. This is solved by flushing the egress port's queues when it goes down. There is also a problem when performing stream splitting for IEEE 802.1CB traffic (not yet upstream, but a sort of multicast, basically). There, if one port from the destination ports mask goes down, splitting the stream towards the other destinations will no longer be performed. This can be traced down to this line: ocelot_port_writel(ocelot_port, 0, DEV_MAC_ENA_CFG); which should have been instead, as per the reference manual: ocelot_port_rmwl(ocelot_port, 0, DEV_MAC_ENA_CFG_RX_ENA, DEV_MAC_ENA_CFG); Basically only DEV_MAC_ENA_CFG_RX_ENA should be disabled, but not DEV_MAC_ENA_CFG_TX_ENA - I don't have further insight into why that is the case, but apparently multicasting to several ports will cause issues if at least one of them doesn't have DEV_MAC_ENA_CFG_TX_ENA set. I am not sure what the state of the Ocelot VSC7514 driver is, but probably not as bad as Felix/Seville, since VSC7514 uses phylib and has the following in ocelot_adjust_link: if (!phydev->link) return; therefore the port is not really put down when the link is lost, unlike the DSA drivers which use .phylink_mac_link_down for that. Nonetheless, I put ocelot_port_flush() in the common ocelot.c because it needs to access some registers from drivers/net/ethernet/mscc/ocelot_rew.h which are not exported in include/soc/mscc/ and a bugfix patch should probably not move headers around. Fixes: bdeced75b13f ("net: dsa: felix: Add PCS operations for PHYLINK") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 2f51312bebb77962a518b4c6de777dd378b6110a Author: Imre Deak Date: Mon Feb 8 17:43:03 2021 +0200 drm/i915/tgl+: Make sure TypeC FIA is powered up when initializing it The TypeC FIA can be powered down if the TC-COLD power state is allowed, so block the TC-COLD state when initializing the FIA. Note that this isn't needed on ICL where the FIA is never modular and which has no generic way to block TC-COLD (except for platforms with a legacy TypeC port and on those too only via these legacy ports, not via a DP-alt/TBT port). Cc: # v5.10+ Cc: José Roberto de Souza Reported-by: Paul Menzel Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/3027 Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20210208154303.6839-1-imre.deak@intel.com Reviewed-by: Jos� Roberto de Souza (cherry picked from commit f48993e5d26b079e8c80fff002499a213dbdb1b4) Signed-off-by: Jani Nikula commit abd4af47d3fb64157133bd35de25d39a21a31122 Author: Ronnie Sahlberg Date: Mon Feb 8 16:48:31 2021 +1000 cifs: fix dfs-links This fixes a regression following dfs links that was introduced in the patch series for the new mount api. Signed-off-by: Ronnie Sahlberg Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit 256b92af784d5043eeb7d559b6d5963dcc2ecb10 Author: Borislav Petkov Date: Mon Feb 8 16:43:30 2021 +0100 x86/build: Disable CET instrumentation in the kernel for 32-bit too Commit 20bf2b378729 ("x86/build: Disable CET instrumentation in the kernel") disabled CET instrumentation which gets added by default by the Ubuntu gcc9 and 10 by default, but did that only for 64-bit builds. It would still fail when building a 32-bit target. So disable CET for all x86 builds. Fixes: 20bf2b378729 ("x86/build: Disable CET instrumentation in the kernel") Reported-by: AC Signed-off-by: Borislav Petkov Acked-by: Josh Poimboeuf Tested-by: AC Link: https://lkml.kernel.org/r/YCCIgMHkzh/xT4ex@arch-chirva.localdomain commit f852c596f2ee6f0eb364ea8f28f89da6da0ae7b5 Author: Maurizio Lombardi Date: Mon Feb 8 12:17:34 2021 +0100 scsi: scsi_debug: Fix a memory leak The sdebug_q_arr pointer must be freed when the module is unloaded. $ cat /sys/kernel/debug/kmemleak unreferenced object 0xffff888e1cfb0000 (size 4096): comm "modprobe", pid 165555, jiffies 4325987516 (age 685.194s) 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: [<00000000458f4f5d>] 0xffffffffc06702d9 [<000000003edc4b1f>] do_one_initcall+0xe9/0x57d [<00000000da7d518c>] do_init_module+0x1d1/0x6f0 [<000000009a6a9248>] load_module+0x36bd/0x4f50 [<00000000ddb0c3ce>] __do_sys_init_module+0x1db/0x260 [<000000009532db57>] do_syscall_64+0xa5/0x420 [<000000002916b13d>] entry_SYSCALL_64_after_hwframe+0x6a/0xdf Fixes: 87c715dcde63 ("scsi: scsi_debug: Add per_host_store option") Link: https://lore.kernel.org/r/20210208111734.34034-1-mlombard@redhat.com Acked-by: Douglas Gilbert Signed-off-by: Maurizio Lombardi Signed-off-by: Martin K. Petersen commit 6bbc088d6ebfd5a4284641dbe8413ebab0dfeb8c Merge: 3aa6bce9af0e2 059d2a1004981 Author: David S. Miller Date: Mon Feb 8 16:20:58 2021 -0800 Merge branch 'bridge-mrp' Horatiu Vultur says: ==================== bridge: mrp: Fix br_mrp_port_switchdev_set_state Based on the discussion here[1], there was a problem with the function br_mrp_port_switchdev_set_state. The problem was that it was called both with BR_STATE* and BR_MRP_PORT_STATE* types. This patch series fixes this issue and removes SWITCHDEV_ATTR_ID_MRP_PORT_STAT because is not used anymore. [1] https://www.spinics.net/lists/netdev/msg714816.html ==================== Signed-off-by: David S. Miller commit 059d2a1004981dce19f0127dabc1b4ec927d202a Author: Horatiu Vultur Date: Sat Feb 6 22:47:34 2021 +0100 switchdev: mrp: Remove SWITCHDEV_ATTR_ID_MRP_PORT_STAT Now that MRP started to use also SWITCHDEV_ATTR_ID_PORT_STP_STATE to notify HW, then SWITCHDEV_ATTR_ID_MRP_PORT_STAT is not used anywhere else, therefore we can remove it. Fixes: c284b545900830 ("switchdev: mrp: Extend switchdev API to offload MRP") Signed-off-by: Horatiu Vultur Signed-off-by: David S. Miller commit b2bdba1cbc84cadb14393d0101a5bfd38d342e0a Author: Horatiu Vultur Date: Sat Feb 6 22:47:33 2021 +0100 bridge: mrp: Fix the usage of br_mrp_port_switchdev_set_state The function br_mrp_port_switchdev_set_state was called both with MRP port state and STP port state, which is an issue because they don't match exactly. Therefore, update the function to be used only with STP port state and use the id SWITCHDEV_ATTR_ID_PORT_STP_STATE. The choice of using STP over MRP is that the drivers already implement SWITCHDEV_ATTR_ID_PORT_STP_STATE and already in SW we update the port STP state. Fixes: 9a9f26e8f7ea30 ("bridge: mrp: Connect MRP API with the switchdev API") Fixes: fadd409136f0f2 ("bridge: switchdev: mrp: Implement MRP API for switchdev") Fixes: 2f1a11ae11d222 ("bridge: mrp: Add MRP interface.") Reported-by: Rasmus Villemoes Signed-off-by: Horatiu Vultur Signed-off-by: David S. Miller commit 3aa6bce9af0e25b735c9c1263739a5639a336ae8 Author: Edwin Peer Date: Fri Feb 5 17:37:32 2021 -0800 net: watchdog: hold device global xmit lock during tx disable Prevent netif_tx_disable() running concurrently with dev_watchdog() by taking the device global xmit lock. Otherwise, the recommended: netif_carrier_off(dev); netif_tx_disable(dev); driver shutdown sequence can happen after the watchdog has already checked carrier, resulting in possible false alarms. This is because netif_tx_lock() only sets the frozen bit without maintaining the locks on the individual queues. Fixes: c3f26a269c24 ("netdev: Fix lockdep warnings in multiqueue configurations.") Signed-off-by: Edwin Peer Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 664899e85c1312e51d2761e7f8b2f25d053e8489 Author: Pablo Neira Ayuso Date: Mon Feb 8 13:20:47 2021 +0100 netfilter: nftables: relax check for stateful expressions in set definition Restore the original behaviour where users are allowed to add an element with any stateful expression if the set definition specifies no stateful expressions. Make sure upper maximum number of stateful expressions of NFT_SET_EXPR_MAX is not reached. Fixes: 8cfd9b0f8515 ("netfilter: nftables: generalize set expressions support") Fixes: 48b0ae046ee9 ("netfilter: nftables: netlink support for several set element expressions") Signed-off-by: Pablo Neira Ayuso commit 07998281c268592963e1cd623fe6ab0270b65ae4 Author: Florian Westphal Date: Fri Feb 5 12:56:43 2021 +0100 netfilter: conntrack: skip identical origin tuple in same zone only The origin skip check needs to re-test the zone. Else, we might skip a colliding tuple in the reply direction. This only occurs when using 'directional zones' where origin tuples reside in different zones but the reply tuples share the same zone. This causes the new conntrack entry to be dropped at confirmation time because NAT clash resolution was elided. Fixes: 4e35c1cb9460240 ("netfilter: nf_nat: skip nat clash resolution for same-origin entries") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit ce7536bc7398e2ae552d2fabb7e0e371a9f1fe46 Author: Stefano Garzarella Date: Mon Feb 8 15:44:54 2021 +0100 vsock/virtio: update credit only if socket is not closed If the socket is closed or is being released, some resources used by virtio_transport_space_update() such as 'vsk->trans' may be released. To avoid a use after free bug we should only update the available credit when we are sure the socket is still open and we have the lock held. Fixes: 06a8fc78367d ("VSOCK: Introduce virtio_vsock_common.ko") Signed-off-by: Stefano Garzarella Acked-by: Michael S. Tsirkin Link: https://lore.kernel.org/r/20210208144454.84438-1-sgarzare@redhat.com Signed-off-by: Jakub Kicinski commit e0756cfc7d7cd08c98a53b6009c091a3f6a50be6 Merge: 92bf22614b21a 256cfdd6fdf70 Author: Linus Torvalds Date: Mon Feb 8 11:32:39 2021 -0800 Merge tag 'trace-v5.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fix from Steven Rostedt: "Fix output of top level event tracing 'enable' file. When writing a tool for enabling events in the tracing system, an anomaly was discovered. The top level event 'enable' file would never show '1' when all events were enabled. The system and event 'enable' files worked as expected. The reason was because the top level event 'enable' file included the 'ftrace' tracer events, which are not controlled by the 'enable' file and would cause the output to be wrong. This appears to have been a bug since it was created" * tag 'trace-v5.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Do not count ftrace events in top level enable output commit af8085f3a4712c57d0dd415ad543bac85780375c Author: NeilBrown Date: Fri Feb 5 11:36:30 2021 +1100 net: fix iteration for sctp transport seq_files The sctp transport seq_file iterators take a reference to the transport in the ->start and ->next functions and releases the reference in the ->show function. The preferred handling for such resources is to release them in the subsequent ->next or ->stop function call. Since Commit 1f4aace60b0e ("fs/seq_file.c: simplify seq_file iteration code and interface") there is no guarantee that ->show will be called after ->next, so this function can now leak references. So move the sctp_transport_put() call to ->next and ->stop. Fixes: 1f4aace60b0e ("fs/seq_file.c: simplify seq_file iteration code and interface") Reported-by: Xin Long Signed-off-by: NeilBrown Acked-by: Marcelo Ricardo Leitner Signed-off-by: Jakub Kicinski commit 2ade0d60939bcd54197c133b03b460fe62a4ec47 Author: Jarkko Sakkinen Date: Mon Feb 8 00:14:01 2021 +0200 x86/sgx: Maintain encl->refcount for each encl->mm_list entry This has been shown in tests: [ +0.000008] WARNING: CPU: 3 PID: 7620 at kernel/rcu/srcutree.c:374 cleanup_srcu_struct+0xed/0x100 This is essentially a use-after free, although SRCU notices it as an SRCU cleanup in an invalid context. == Background == SGX has a data structure (struct sgx_encl_mm) which keeps per-mm SGX metadata. This is separate from struct sgx_encl because, in theory, an enclave can be mapped from more than one mm. sgx_encl_mm includes a pointer back to the sgx_encl. This means that sgx_encl must have a longer lifetime than all of the sgx_encl_mm's that point to it. That's usually the case: sgx_encl_mm is freed only after the mmu_notifier is unregistered in sgx_release(). However, there's a race. If the process is exiting, sgx_mmu_notifier_release() can be called in parallel with sgx_release() instead of being called *by* it. The mmu_notifier path keeps encl_mm alive past when sgx_encl can be freed. This inverts the lifetime rules and means that sgx_mmu_notifier_release() can access a freed sgx_encl. == Fix == Increase encl->refcount when encl_mm->encl is established. Release this reference when encl_mm is freed. This ensures that encl outlives encl_mm. [ bp: Massage commit message. ] Fixes: 1728ab54b4be ("x86/sgx: Add a page reclaimer") Reported-by: Haitao Huang Signed-off-by: Jarkko Sakkinen Signed-off-by: Borislav Petkov Acked-by: Dave Hansen Link: https://lkml.kernel.org/r/20210207221401.29933-1-jarkko@kernel.org commit fe0af09074bfeb46a35357e67635eefe33cdfc49 Author: Ard Biesheuvel Date: Sat Feb 6 09:49:37 2021 +0100 Revert "ACPICA: Interpreter: fix memory leak by using existing buffer" This reverts commit 32cf1a12cad43358e47dac8014379c2f33dfbed4. The 'exisitng buffer' in this case is the firmware provided table, and we should not modify that in place. This fixes a crash on arm64 with initrd table overrides, in which case the DSDT is not mapped with read/write permissions. Reported-by: Shawn Guo Signed-off-by: Ard Biesheuvel Tested-by: Shawn Guo Signed-off-by: Rafael J. Wysocki commit d11a1d08a082a7dc0ada423d2b2e26e9b6f2525c Author: Rafael J. Wysocki Date: Thu Feb 4 18:34:32 2021 +0100 cpufreq: ACPI: Update arch scale-invariance max perf ratio if CPPC is not there If the maximum performance level taken for computing the arch_max_freq_ratio value used in the x86 scale-invariance code is higher than the one corresponding to the cpuinfo.max_freq value coming from the acpi_cpufreq driver, the scale-invariant utilization falls below 100% even if the CPU runs at cpuinfo.max_freq or slightly faster, which causes the schedutil governor to select a frequency below cpuinfo.max_freq. That frequency corresponds to a frequency table entry below the maximum performance level necessary to get to the "boost" range of CPU frequencies which prevents "boost" frequencies from being used in some workloads. While this issue is related to scale-invariance, it may be amplified by commit db865272d9c4 ("cpufreq: Avoid configuring old governors as default with intel_pstate") from the 5.10 development cycle which made it extremely easy to default to schedutil even if the preferred driver is acpi_cpufreq as long as intel_pstate is built too, because the mere presence of the latter effectively removes the ondemand governor from the defaults. Distro kernels are likely to include both intel_pstate and acpi_cpufreq on x86, so their users who cannot use intel_pstate or choose to use acpi_cpufreq may easily be affectecd by this issue. If CPPC is available, it can be used to address this issue by extending the frequency tables created by acpi_cpufreq to cover the entire available frequency range (including "boost" frequencies) for each CPU, but if CPPC is not there, acpi_cpufreq has no idea what the maximum "boost" frequency is and the frequency tables created by it cannot be extended in a meaningful way, so in that case make it ask the arch scale-invariance code to to use the "nominal" performance level for CPU utilization scaling in order to avoid the issue at hand. Fixes: db865272d9c4 ("cpufreq: Avoid configuring old governors as default with intel_pstate") Signed-off-by: Rafael J. Wysocki Reviewed-by: Giovanni Gherdovich Acked-by: Peter Zijlstra (Intel) commit 3c55e94c0adea4a5389c4b80f6ae9927dd6a4501 Author: Rafael J. Wysocki Date: Thu Feb 4 18:25:37 2021 +0100 cpufreq: ACPI: Extend frequency tables to cover boost frequencies A severe performance regression on AMD EPYC processors when using the schedutil scaling governor was discovered by Phoronix.com and attributed to the following commits: 41ea667227ba ("x86, sched: Calculate frequency invariance for AMD systems") 976df7e5730e ("x86, sched: Use midpoint of max_boost and max_P for frequency invariance on AMD EPYC") The source of the problem is that the maximum performance level taken for computing the arch_max_freq_ratio value used in the x86 scale- invariance code is higher than the one corresponding to the cpuinfo.max_freq value coming from the acpi_cpufreq driver. This effectively causes the scale-invariant utilization to fall below 100% even if the CPU runs at cpuinfo.max_freq or slightly faster, so the schedutil governor selects a frequency below cpuinfo.max_freq then. That frequency corresponds to a frequency table entry below the maximum performance level necessary to get to the "boost" range of CPU frequencies. However, if the cpuinfo.max_freq value coming from acpi_cpufreq was higher, the schedutil governor would select higher frequencies which in turn would allow acpi_cpufreq to set more adequate performance levels and to get to the "boost" range of CPU frequencies more often. This issue affects any systems where acpi_cpufreq is used and the "boost" (or "turbo") frequencies are enabled, not just AMD EPYC. Moreover, commit db865272d9c4 ("cpufreq: Avoid configuring old governors as default with intel_pstate") from the 5.10 development cycle made it extremely easy to default to schedutil even if the preferred driver is acpi_cpufreq as long as intel_pstate is built too, because the mere presence of the latter effectively removes the ondemand governor from the defaults. Distro kernels are likely to include both intel_pstate and acpi_cpufreq on x86, so their users who cannot use intel_pstate or choose to use acpi_cpufreq may easily be affectecd by this issue. To address this issue, extend the frequency table constructed by acpi_cpufreq for each CPU to cover the entire range of available frequencies (including the "boost" ones) if CPPC is available and indicates that "boost" (or "turbo") frequencies are enabled. That causes cpuinfo.max_freq to become the maximum "boost" frequency of the given CPU (instead of the maximum frequency returned by the ACPI _PSS object that corresponds to the "nominal" performance level). Fixes: 41ea667227ba ("x86, sched: Calculate frequency invariance for AMD systems") Fixes: 976df7e5730e ("x86, sched: Use midpoint of max_boost and max_P for frequency invariance on AMD EPYC") Fixes: db865272d9c4 ("cpufreq: Avoid configuring old governors as default with intel_pstate") Link: https://www.phoronix.com/scan.php?page=article&item=linux511-amd-schedutil&num=1 Link: https://lore.kernel.org/linux-pm/20210203135321.12253-2-ggherdovich@suse.cz/ Reported-by: Michael Larabel Diagnosed-by: Giovanni Gherdovich Signed-off-by: Rafael J. Wysocki Tested-by: Giovanni Gherdovich Reviewed-by: Giovanni Gherdovich Tested-by: Michael Larabel commit b6c14d7a83802046f7098e9bae78fbde23affa74 Author: Cezary Rojewski Date: Wed Feb 3 20:19:24 2021 +0100 dmaengine dw: Revert "dmaengine: dw: Enable runtime PM" This reverts commit 842067940a3e3fc008a60fee388e000219b32632. For some solutions e.g. sound/soc/intel/catpt, DW DMA is part of a compound device (in that very example, domains: ADSP, SSP0, SSP1, DMA0 and DMA1 are part of a single entity) rather than being a standalone one. Driver for said device may enlist DMA to transfer data during suspend or resume sequences. Manipulating RPM explicitly in dw's DMA request and release channel functions causes suspend() to also invoke resume() for the exact same device. Similar situation occurs for resume() sequence. Effectively renders device dysfunctional after first suspend() attempt. Revert the change to address the problem. Fixes: 842067940a3e ("dmaengine: dw: Enable runtime PM") Cc: Andy Shevchenko Signed-off-by: Cezary Rojewski Acked-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210203191924.15706-1-cezary.rojewski@intel.com Signed-off-by: Vinod Koul commit 92bf22614b21a2706f4993b278017e437f7785b3 Author: Linus Torvalds Date: Sun Feb 7 13:57:38 2021 -0800 Linux 5.11-rc7 commit b75dba7f472ca6c2dd0b8ee41f5a4b5a45539306 Merge: ff92acb220c50 7018c897c2f24 Author: Linus Torvalds Date: Sun Feb 7 10:45:26 2021 -0800 Merge tag 'libnvdimm-fixes-5.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm fixes from Dan Williams: "A fix for a crash scenario that has been present since the initial merge, a minor regression in sysfs attribute visibility, and a fix for some flexible array warnings. The bulk of this pull is an update to the libnvdimm unit test infrastructure to test non-ACPI platforms. Given there is zero regression risk for test updates, and the tests enable validation of bits headed towards the next merge window, I saw no reason to hold the new tests back. Santosh originally submitted this before the v5.11 window opened. Summary: - Fix a crash when sysfs accesses race 'dimm' driver probe/remove. - Fix a regression in 'resource' attribute visibility necessary for mapping badblocks and other physical address interrogations. - Fix some flexible array warnings - Expand the unit test infrastructure for non-ACPI platforms" * tag 'libnvdimm-fixes-5.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: libnvdimm/dimm: Avoid race between probe and available_slots_show() ndtest: Add papr health related flags ndtest: Add nvdimm control functions ndtest: Add regions and mappings to the test buses ndtest: Add dimm attributes ndtest: Add dimms to the two buses ndtest: Add compatability string to treat it as PAPR family testing/nvdimm: Add test module for non-nfit platforms libnvdimm/namespace: Fix visibility of namespace resource attribute libnvdimm/pmem: Remove unused header ACPI: NFIT: Fix flexible_array.cocci warnings commit ff92acb220c506f14aea384a07b130b87ac1489a Merge: fc6c0ae53af40 9f5f8ec501656 Author: Linus Torvalds Date: Sun Feb 7 10:40:48 2021 -0800 Merge tag 'dma-mapping-5.11-2' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping fix from Christoph Hellwig: "Fix a 32 vs 64-bit padding issue in the new benchmark code (Barry Song)" * tag 'dma-mapping-5.11-2' of git://git.infradead.org/users/hch/dma-mapping: dma-mapping: benchmark: use u8 for reserved field in uAPI structure commit fc6c0ae53af40f4cd86a504a71778d924cef43df Merge: c6792d44d8f08 4c7bcb51ae25f Author: Linus Torvalds Date: Sun Feb 7 10:25:01 2021 -0800 Merge tag 'irq_urgent_for_v5.11_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Borislav Petkov: - Prevent device managed IRQ allocation helpers from returning IRQ 0 - A fix for MSI activation of PCI endpoints with multiple MSIs * tag 'irq_urgent_for_v5.11_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq: Prevent [devm_]irq_alloc_desc from returning irq 0 genirq/msi: Activate Multi-MSI early when MSI_FLAG_ACTIVATE_EARLY is set commit c6792d44d8f08451047051351dfdcc8332a028e3 Merge: 6fed85df5d097 36a6c843fd0d8 Author: Linus Torvalds Date: Sun Feb 7 10:16:24 2021 -0800 Merge tag 'core_urgent_for_v5.11_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull syscall entry fixes from Borislav Petkov: - For syscall user dispatch, separate prctl operation from syscall redirection range specification before the API has been made official in 5.11. - Ensure tasks using the generic syscall code do trap after returning from a syscall when single-stepping is requested. * tag 'core_urgent_for_v5.11_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: entry: Use different define for selector variable in SUD entry: Ensure trap after single-step on system call return commit 6fed85df5d097298d265dfcc31cf1e0c1633f41e Merge: 814daadbf09a3 2452483d9546d Author: Linus Torvalds Date: Sun Feb 7 10:03:43 2021 -0800 Merge tag 'sched_urgent_for_v5.11_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fix from Borislav Petkov: "Revert an attempt to not spread IRQ threads on isolated CPUs which has a bunch of problems" * tag 'sched_urgent_for_v5.11_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: Revert "lib: Restrict cpumask_local_spread to houskeeping CPUs" commit 814daadbf09a364ec22f5aba769e01d8fa339c31 Merge: e24f9c5f6e312 24c242ec7abb3 Author: Linus Torvalds Date: Sun Feb 7 09:55:26 2021 -0800 Merge tag 'timers_urgent_for_v5.11_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fixes from Borislav Petkov: "Two more timers-related fixes for v5.11: - Use a freezable workqueue for RTC sync because the sync can happen at any time and trigger suspend assertion checks in the i2c subsystem. - Correct a previous RTC validation change to check only bit 6 in register D because some Intel machines use bits 0-5" * tag 'timers_urgent_for_v5.11_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: ntp: Use freezable workqueue for RTC synchronization rtc: mc146818: Dont test for bit 0-5 in Register D commit e24f9c5f6e3127a0679d5ba5575a181b80f219c9 Merge: 2db138bb9fa10 816ef8d7a2c41 Author: Linus Torvalds Date: Sun Feb 7 09:40:47 2021 -0800 Merge tag 'x86_urgent_for_v5.11_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Borislav Petkov: "I hope this is the last batch of x86/urgent updates for this round: - Remove superfluous EFI PGD range checks which lead to those assertions failing with certain kernel configs and LLVM. - Disable setting breakpoints on facilities involved in #DB exception handling to avoid infinite loops. - Add extra serialization to non-serializing MSRs (IA32_TSC_DEADLINE and x2 APIC MSRs) to adhere to SDM's recommendation and avoid any theoretical issues. - Re-add the EPB MSR reading on turbostat so that it works on older kernels which don't have the corresponding EPB sysfs file. - Add Alder Lake to the list of CPUs which support split lock. - Fix %dr6 register handling in order to be able to set watchpoints with gdb again. - Disable CET instrumentation in the kernel so that gcc doesn't add ENDBR64 to kernel code and thus confuse tracing" * tag 'x86_urgent_for_v5.11_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/efi: Remove EFI PGD build time checks x86/debug: Prevent data breakpoints on cpu_dr7 x86/debug: Prevent data breakpoints on __per_cpu_offset x86/apic: Add extra serialization for non-serializing MSRs tools/power/turbostat: Fallback to an MSR read for EPB x86/split_lock: Enable the split lock feature on another Alder Lake CPU x86/debug: Fix DR6 handling x86/build: Disable CET instrumentation in the kernel commit 2db138bb9fa10f5652f55d3c3f427af54626a086 Merge: 825b5991a46ef efe6e30680672 Author: Linus Torvalds Date: Sun Feb 7 09:37:37 2021 -0800 Merge tag 'kbuild-fixes-v5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - Use the 'python3' command to invoke python scripts because some distributions do not provide the 'python' command any more. - Clean-up and update documents - Use pkg-config to search libcrypto - Fix duplicated debug flags - Ignore some more stubs in scripts/kallsyms.c * tag 'kbuild-fixes-v5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kallsyms: fix nonconverging kallsyms table with lld kbuild: fix duplicated flags in DEBUG_CFLAGS scripts/clang-tools: switch explicitly to Python 3 kbuild: remove PYTHON variable Documentation/llvm: Add a section about supported architectures Revert "checkpatch: add check for keyword 'boolean' in Kconfig definitions" scripts: use pkg-config to locate libcrypto kconfig: mconf: fix HOSTCC call doc: gcc-plugins: update gcc-plugins.rst kbuild: simplify GCC_PLUGINS enablement in dummy-tools/gcc Documentation/Kbuild: Remove references to gcc-plugin.sh scripts: switch explicitly to Python 3 commit 825b5991a46ef28a05a4646c8fe1ae5cef7c7828 Merge: f7455e5d6897f 21b200d091826 Author: Linus Torvalds Date: Sat Feb 6 15:26:28 2021 -0800 Merge tag '5.11-rc6-smb3' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "Three small smb3 fixes for stable" * tag '5.11-rc6-smb3' of git://git.samba.org/sfrench/cifs-2.6: cifs: report error instead of invalid when revalidating a dentry fails smb3: fix crediting for compounding when only one request in flight smb3: Fix out-of-bounds bug in SMB2_negotiate() commit f7455e5d6897f275aaf5b6d964103ba295ac0cdd Merge: f06279ea1908b de5f4b8f634be Author: Linus Torvalds Date: Sat Feb 6 15:18:10 2021 -0800 Merge tag 'riscv-for-linus-5.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: "A handful of fixes for this week: - A fix to avoid evalating the VA twice in virt_addr_valid, which fixes some WARNs under DEBUG_VIRTUAL. - Two fixes related to STRICT_KERNEL_RWX: one that fixes some permissions when strict is disabled, and one to fix some alignment issues when strict is enabled. - A fix to disallow the selection of MAXPHYSMEM_2GB on RV32, which isn't valid any more but may still show up in some oldconfigs. We still have the HiFive Unleashed ethernet phy reset regression, so there will likely be something coming next week" * tag 'riscv-for-linus-5.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: RISC-V: Define MAXPHYSMEM_1GB only for RV32 riscv: Align on L1_CACHE_BYTES when STRICT_KERNEL_RWX RISC-V: Fix .init section permission update riscv: virt_addr_valid must check the address belongs to linear mapping commit f06279ea1908b9cd2d22645dc6d492e612b82744 Merge: 4a7859ea098bd 24321ac668e45 Author: Linus Torvalds Date: Sat Feb 6 15:14:39 2021 -0800 Merge tag 'powerpc-5.11-7' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - A fix for a change we made to __kernel_sigtramp_rt64() which confused glibc's backtrace logic, and also changed the semantics of that symbol, which was arguably an ABI break. - A fix for a stack overwrite in our VSX instruction emulation. - A couple of fixes for the Makefile logic in the new C VDSO. Thanks to Masahiro Yamada, Naveen N. Rao, Raoni Fassina Firmino, and Ravi Bangoria. * tag 'powerpc-5.11-7' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/64/signal: Fix regression in __kernel_sigtramp_rt64() semantics powerpc/vdso64: remove meaningless vgettimeofday.o build rule powerpc/vdso: fix unnecessary rebuilds of vgettimeofday.o powerpc/sstep: Fix array out of bound warning commit 4a7859ea098bdf9282cdc34e859c3b185fdb31a4 Merge: 368afecbfb5e9 4d62e81b60d40 Author: Linus Torvalds Date: Sat Feb 6 15:07:51 2021 -0800 Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM fixes from Russell King: - Fix latent bug with DC21285 (Footbridge PCI bridge) configuration accessors that affects GCC >= 4.9.2 - Fix misplaced tegra_uart_config in decompressor - Ensure signal page contents are initialised - Fix kexec oops * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: kexec: fix oops after TLB are invalidated ARM: ensure the signal page contains defined contents ARM: 9043/1: tegra: Fix misplaced tegra_uart_config in decompressor ARM: footbridge: fix dc21285 PCI configuration accessors commit 225353c070fda18a23785e34e1eec2be508a3a3c Author: Shay Agroskin Date: Fri Feb 5 21:51:14 2021 +0200 net: ena: Update XDP verdict upon failure The verdict returned from ena_xdp_execute() is used to determine the fate of the RX buffer's page. In case of XDP Redirect/TX error the verdict should be set to XDP_ABORTED, otherwise the page won't be freed. Fixes: a318c70ad152 ("net: ena: introduce XDP redirect implementation") Signed-off-by: Shay Agroskin Signed-off-by: Jakub Kicinski commit 3d0bc44d39bca615b72637e340317b7899b7f911 Author: Norbert Slusarek Date: Fri Feb 5 13:14:05 2021 +0100 net/vmw_vsock: improve locking in vsock_connect_timeout() A possible locking issue in vsock_connect_timeout() was recognized by Eric Dumazet which might cause a null pointer dereference in vsock_transport_cancel_pkt(). This patch assures that vsock_transport_cancel_pkt() will be called within the lock, so a race condition won't occur which could result in vsk->transport to be set to NULL. Fixes: 380feae0def7 ("vsock: cancel packets when failing to connect") Reported-by: Eric Dumazet Signed-off-by: Norbert Slusarek Reviewed-by: Stefano Garzarella Link: https://lore.kernel.org/r/trinity-f8e0937a-cf0e-4d80-a76e-d9a958ba3ef1-1612535522360@3c-app-gmx-bap12 Signed-off-by: Jakub Kicinski commit 5d1cbcc990f18edaddddef26677073c4e6fad7b7 Author: Norbert Slusarek Date: Fri Feb 5 13:12:06 2021 +0100 net/vmw_vsock: fix NULL pointer dereference In vsock_stream_connect(), a thread will enter schedule_timeout(). While being scheduled out, another thread can enter vsock_stream_connect() as well and set vsk->transport to NULL. In case a signal was sent, the first thread can leave schedule_timeout() and vsock_transport_cancel_pkt() will be called right after. Inside vsock_transport_cancel_pkt(), a null dereference will happen on transport->cancel_pkt. Fixes: c0cfa2d8a788 ("vsock: add multi-transports support") Signed-off-by: Norbert Slusarek Reviewed-by: Stefano Garzarella Link: https://lore.kernel.org/r/trinity-c2d6cede-bfb1-44e2-85af-1fbc7f541715-1612535117028@3c-app-gmx-bap12 Signed-off-by: Jakub Kicinski commit 368afecbfb5e9f590108208ed4491c094945c364 Merge: 7c2d18357f2c4 f670e9f9c8cac Author: Linus Torvalds Date: Sat Feb 6 14:59:07 2021 -0800 Merge tag 'usb-5.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some small, last-minute, USB driver fixes for 5.11-rc7 They all resolve issues reported, or are a few new device ids for some drivers. They include: - new device ids for some usb-serial drivers - xhci fixes for a variety of reported problems - dwc3 driver bugfixes - dwc2 driver bugfixes - usblp driver bugfix - thunderbolt bugfix - few other tiny fixes All have been in linux-next with no reported issues" * tag 'usb-5.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: dwc2: Fix endpoint direction check in ep_from_windex usb: dwc3: fix clock issue during resume in OTG mode xhci: fix bounce buffer usage for non-sg list case usb: host: xhci: mvebu: make USB 3.0 PHY optional for Armada 3720 usb: xhci-mtk: break loop when find the endpoint to drop usb: xhci-mtk: skip dropping bandwidth of unchecked endpoints usb: renesas_usbhs: Clear pipe running flag in usbhs_pkt_pop() USB: gadget: legacy: fix an error code in eth_bind() thunderbolt: Fix possible NULL pointer dereference in tb_acpi_add_link() USB: serial: option: Adding support for Cinterion MV31 usb: xhci-mtk: fix unreleased bandwidth data usb: gadget: aspeed: add missing of_node_put USB: usblp: don't call usb_set_interface if there's a single alt USB: serial: cp210x: add pid/vid for WSDA-200-USB USB: serial: cp210x: add new VID/PID for supporting Teraoka AD2000 commit 7c2d18357f2c4d26e727e76245e297ffdbc03097 Merge: 964d069f93c44 9bbd77d5bbc9a Author: Linus Torvalds Date: Sat Feb 6 14:57:23 2021 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: "Nothing terribly interesting, just a few fixups" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: xpad - sync supported devices with fork on GitHub Input: ariel-pwrbutton - remove unused variable ariel_pwrbutton_id_table Input: goodix - add support for Goodix GT9286 chip dt-bindings: input: touchscreen: goodix: Add binding for GT9286 IC dt-bindings: input: adc-keys: clarify description Input: ili210x - implement pressure reporting for ILI251x Input: i8042 - unbreak Pegatron C15B Input: st1232 - wait until device is ready before reading resolution Input: st1232 - do not read more bytes than needed Input: st1232 - fix off-by-one error in resolution handling commit 964d069f93c4468b220f7e15fac7a3f7bd6d13ec Merge: eec79181212c9 8c65830ae1629 Author: Linus Torvalds Date: Sat Feb 6 14:42:52 2021 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fix from James Bottomley: "One fix in drivers (lpfc) that stops an oops on resource exhaustion" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: lpfc: Fix EEH encountering oops with NVMe traffic commit eec79181212c9c2670423400a9e78bb1f0c0075d Merge: 860b45dae9699 ea8465e611022 Author: Linus Torvalds Date: Sat Feb 6 14:40:27 2021 -0800 Merge tag 'block-5.11-2021-02-05' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "A few small regression fixes: - NVMe pull request from Christoph: - more quirks for buggy devices (Thorsten Leemhuis, Claus Stovgaard) - update the email address for Keith (Keith Busch) - fix an out of bounds access in nvmet-tcp (Sagi Grimberg) - Regression fix for BFQ shallow depth calculations introduced in this merge window (Lin)" * tag 'block-5.11-2021-02-05' of git://git.kernel.dk/linux-block: nvmet-tcp: fix out-of-bounds access when receiving multiple h2cdata PDUs bfq-iosched: Revert "bfq: Fix computation of shallow depth" update the email address for Keith Bush nvme-pci: ignore the subsysem NQN on Phison E16 nvme-pci: avoid the deepest sleep state on Kingston A2000 SSDs commit 860b45dae969966a52b4dd0470d8fca8479e4e4b Merge: 1e0d27fce010b aec18a57edad5 Author: Linus Torvalds Date: Sat Feb 6 14:37:24 2021 -0800 Merge tag 'io_uring-5.11-2021-02-05' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: "Two small fixes that should go into 5.11: - task_work resource drop fix (Pavel) - identity COW fix (Xiaoguang)" * tag 'io_uring-5.11-2021-02-05' of git://git.kernel.dk/linux-block: io_uring: drop mm/files between task_work_submit io_uring: don't modify identity's files uncess identity is cowed commit ef66a1eace968ff22a35f45e6e8ec36b668b6116 Author: Sukadev Bhattiprolu Date: Tue Feb 2 21:08:02 2021 -0800 ibmvnic: Clear failover_pending if unable to schedule Normally we clear the failover_pending flag when processing the reset. But if we are unable to schedule a failover reset we must clear the flag ourselves. We could fail to schedule the reset if we are in PROBING state (eg: when booting via kexec) or because we could not allocate memory. Thanks to Cris Forno for helping isolate the problem and for testing. Fixes: 1d8504937478 ("powerpc/vnic: Extend "failover pending" window") Signed-off-by: Sukadev Bhattiprolu Tested-by: Cristobal Forno Link: https://lore.kernel.org/r/20210203050802.680772-1-sukadev@linux.ibm.com Signed-off-by: Jakub Kicinski commit 2da4b24b1dfbf06c7dc7fd45de258e007e1c5ef5 Merge: f317e2ea8c887 93a1d4791c10d Author: Jakub Kicinski Date: Sat Feb 6 09:27:20 2021 -0800 Merge tag 'wireless-drivers-2021-02-05' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for v5.11 Third, and most likely the last, set of fixes for v5.11. Two very small fixes. ath9k * fix build regression related to LEDS_CLASS mt76 * fix a memory leak * tag 'wireless-drivers-2021-02-05' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers: mt76: dma: fix a possible memory leak in mt76_add_fragment() ath9k: fix build error with LEDS_CLASS=m ==================== Link: https://lore.kernel.org/r/20210205163434.14D94C433ED@smtp.codeaurora.org Signed-off-by: Jakub Kicinski commit 816ef8d7a2c4182e19bc06ab65751cb9e3951e94 Author: Borislav Petkov Date: Fri Feb 5 11:31:31 2021 +0100 x86/efi: Remove EFI PGD build time checks With CONFIG_X86_5LEVEL, CONFIG_UBSAN and CONFIG_UBSAN_UNSIGNED_OVERFLOW enabled, clang fails the build with x86_64-linux-ld: arch/x86/platform/efi/efi_64.o: in function `efi_sync_low_kernel_mappings': efi_64.c:(.text+0x22c): undefined reference to `__compiletime_assert_354' which happens due to -fsanitize=unsigned-integer-overflow being enabled: -fsanitize=unsigned-integer-overflow: Unsigned integer overflow, where the result of an unsigned integer computation cannot be represented in its type. Unlike signed integer overflow, this is not undefined behavior, but it is often unintentional. This sanitizer does not check for lossy implicit conversions performed before such a computation (see -fsanitize=implicit-conversion). and that fires when the (intentional) EFI_VA_START/END defines overflow an unsigned long, leading to the assertion expressions not getting optimized away (on GCC they do)... However, those checks are superfluous: the runtime services mapping code already makes sure the ranges don't overshoot EFI_VA_END as the EFI mapping range is hardcoded. On each runtime services call, it is switched to the EFI-specific PGD and even if mappings manage to escape that last PGD, this won't remain unnoticed for long. So rip them out. See https://github.com/ClangBuiltLinux/linux/issues/256 for more info. Reported-by: Arnd Bergmann Signed-off-by: Borislav Petkov Reviewed-by: Nathan Chancellor Acked-by: Ard Biesheuvel Tested-by: Nick Desaulniers Tested-by: Nathan Chancellor Link: http://lkml.kernel.org/r/20210107223424.4135538-1-arnd@kernel.org commit 8c511eff1827239f24ded212b1bcda7ca5b16203 Author: Aneesh Kumar K.V Date: Sat Feb 6 08:26:34 2021 +0530 powerpc/kuap: Allow kernel thread to access userspace after kthread_use_mm This fix the bad fault reported by KUAP when io_wqe_worker access userspace. Bug: Read fault blocked by KUAP! WARNING: CPU: 1 PID: 101841 at arch/powerpc/mm/fault.c:229 __do_page_fault+0x6b4/0xcd0 NIP [c00000000009e7e4] __do_page_fault+0x6b4/0xcd0 LR [c00000000009e7e0] __do_page_fault+0x6b0/0xcd0 .......... Call Trace: [c000000016367330] [c00000000009e7e0] __do_page_fault+0x6b0/0xcd0 (unreliable) [c0000000163673e0] [c00000000009ee3c] do_page_fault+0x3c/0x120 [c000000016367430] [c00000000000c848] handle_page_fault+0x10/0x2c --- interrupt: 300 at iov_iter_fault_in_readable+0x148/0x6f0 .......... NIP [c0000000008e8228] iov_iter_fault_in_readable+0x148/0x6f0 LR [c0000000008e834c] iov_iter_fault_in_readable+0x26c/0x6f0 interrupt: 300 [c0000000163677e0] [c0000000007154a0] iomap_write_actor+0xc0/0x280 [c000000016367880] [c00000000070fc94] iomap_apply+0x1c4/0x780 [c000000016367990] [c000000000710330] iomap_file_buffered_write+0xa0/0x120 [c0000000163679e0] [c00800000040791c] xfs_file_buffered_aio_write+0x314/0x5e0 [xfs] [c000000016367a90] [c0000000006d74bc] io_write+0x10c/0x460 [c000000016367bb0] [c0000000006d80e4] io_issue_sqe+0x8d4/0x1200 [c000000016367c70] [c0000000006d8ad0] io_wq_submit_work+0xc0/0x250 [c000000016367cb0] [c0000000006e2578] io_worker_handle_work+0x498/0x800 [c000000016367d40] [c0000000006e2cdc] io_wqe_worker+0x3fc/0x4f0 [c000000016367da0] [c0000000001cb0a4] kthread+0x1c4/0x1d0 [c000000016367e10] [c00000000000dbf0] ret_from_kernel_thread+0x5c/0x6c The kernel consider thread AMR value for kernel thread to be AMR_KUAP_BLOCKED. Hence access to userspace is denied. This of course not correct and we should allow userspace access after kthread_use_mm(). To be precise, kthread_use_mm() should inherit the AMR value of the operating address space. But, the AMR value is thread-specific and we inherit the address space and not thread access restrictions. Because of this ignore AMR value when accessing userspace via kernel thread. current_thread_amr/iamr() are updated, because we use them in the below stack. .... [ 530.710838] CPU: 13 PID: 5587 Comm: io_wqe_worker-0 Tainted: G D 5.11.0-rc6+ #3 .... NIP [c0000000000aa0c8] pkey_access_permitted+0x28/0x90 LR [c0000000004b9278] gup_pte_range+0x188/0x420 --- interrupt: 700 [c00000001c4ef3f0] [0000000000000000] 0x0 (unreliable) [c00000001c4ef490] [c0000000004bd39c] gup_pgd_range+0x3ac/0xa20 [c00000001c4ef5a0] [c0000000004bdd44] internal_get_user_pages_fast+0x334/0x410 [c00000001c4ef620] [c000000000852028] iov_iter_get_pages+0xf8/0x5c0 [c00000001c4ef6a0] [c0000000007da44c] bio_iov_iter_get_pages+0xec/0x700 [c00000001c4ef770] [c0000000006a325c] iomap_dio_bio_actor+0x2ac/0x4f0 [c00000001c4ef810] [c00000000069cd94] iomap_apply+0x2b4/0x740 [c00000001c4ef920] [c0000000006a38b8] __iomap_dio_rw+0x238/0x5c0 [c00000001c4ef9d0] [c0000000006a3c60] iomap_dio_rw+0x20/0x80 [c00000001c4ef9f0] [c008000001927a30] xfs_file_dio_aio_write+0x1f8/0x650 [xfs] [c00000001c4efa60] [c0080000019284dc] xfs_file_write_iter+0xc4/0x130 [xfs] [c00000001c4efa90] [c000000000669984] io_write+0x104/0x4b0 [c00000001c4efbb0] [c00000000066cea4] io_issue_sqe+0x3d4/0xf50 [c00000001c4efc60] [c000000000670200] io_wq_submit_work+0xb0/0x2f0 [c00000001c4efcb0] [c000000000674268] io_worker_handle_work+0x248/0x4a0 [c00000001c4efd30] [c0000000006746e8] io_wqe_worker+0x228/0x2a0 [c00000001c4efda0] [c00000000019d994] kthread+0x1b4/0x1c0 Fixes: 48a8ab4eeb82 ("powerpc/book3s64/pkeys: Don't update SPRN_AMR when in kernel mode.") Reported-by: Zorro Lang Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210206025634.521979-1-aneesh.kumar@linux.ibm.com commit f317e2ea8c88737aa36228167b2292baef3f0430 Author: Mohammad Athari Bin Ismail Date: Thu Feb 4 22:03:16 2021 +0800 net: stmmac: set TxQ mode back to DCB after disabling CBS When disable CBS, mode_to_use parameter is not updated even the operation mode of Tx Queue is changed to Data Centre Bridging (DCB). Therefore, when tc_setup_cbs() function is called to re-enable CBS, the operation mode of Tx Queue remains at DCB, which causing CBS fails to work. This patch updates the value of mode_to_use parameter to MTL_QUEUE_DCB after operation mode of Tx Queue is changed to DCB in stmmac_dma_qmode() callback function. Fixes: 1f705bc61aee ("net: stmmac: Add support for CBS QDISC") Suggested-by: Vinicius Costa Gomes Signed-off-by: Mohammad Athari Bin Ismail Signed-off-by: Song, Yoong Siang Reviewed-by: Jesse Brandeburg Acked-by: Vinicius Costa Gomes Link: https://lore.kernel.org/r/1612447396-20351-1-git-send-email-yoong.siang.song@intel.com Signed-off-by: Jakub Kicinski commit fb6221a2013ff7612c61b25bf92c757d6b3abd65 Merge: 8dc1c444df193 0a9946cca1a30 Author: Jakub Kicinski Date: Fri Feb 5 19:58:35 2021 -0800 Merge branch 'dpaa_eth-a050385-erratum-workaround-fixes-under-xdp' Camelia Groza says: ==================== dpaa_eth: A050385 erratum workaround fixes under XDP This series addresses issue with the current workaround for the A050385 erratum in XDP scenarios. The first patch makes sure the xdp_frame structure stored at the start of new buffers isn't overwritten. The second patch decreases the required data alignment value, thus preventing unnecessary realignments. The third patch moves the data in place to align it, instead of allocating a new buffer for each frame that breaks the alignment rules, thus bringing an up to 40% performance increase. With this change, the impact of the erratum workaround is reduced in many cases to a single digit decrease, and to lower double digits in single flow scenarios. Changes in v2: - guarantee enough tailroom is available for the shared_info in 1/3 ==================== Link: https://lore.kernel.org/r/cover.1612456902.git.camelia.groza@nxp.com Signed-off-by: Jakub Kicinski commit 0a9946cca1a30b7236a86757da9df2222eb73ee0 Author: Camelia Groza Date: Thu Feb 4 18:49:28 2021 +0200 dpaa_eth: try to move the data in place for the A050385 erratum The XDP frame's headroom might be large enough to accommodate the xdpf backpointer as well as shifting the data to an aligned address. Try this first before resorting to allocating a new buffer and copying the data. Suggested-by: Maciej Fijalkowski Signed-off-by: Camelia Groza Acked-by: Maciej Fijalkowski Acked-by: Madalin Bucur Signed-off-by: Jakub Kicinski commit c2b0e8455eb76135f505dda81a8869e60f37a861 Author: Camelia Groza Date: Thu Feb 4 18:49:27 2021 +0200 dpaa_eth: reduce data alignment requirements for the A050385 erratum The 256 byte data alignment is required for preventing DMA transaction splits when crossing 4K page boundaries. Since XDP deals only with page sized buffers or less, this restriction isn't needed. Instead, the data only needs to be aligned to 64 bytes to prevent DMA transaction splits. These lessened restrictions can increase performance by widening the pool of permitted data alignments and preventing unnecessary realignments. Fixes: ae680bcbd06a ("dpaa_eth: implement the A050385 erratum workaround for XDP") Signed-off-by: Camelia Groza Acked-by: Maciej Fijalkowski Acked-by: Madalin Bucur Signed-off-by: Jakub Kicinski commit 275a9c72b420e5051b0e92e49b26bef06c196f29 Author: Camelia Groza Date: Thu Feb 4 18:49:26 2021 +0200 dpaa_eth: reserve space for the xdp_frame under the A050385 erratum When the erratum workaround is triggered, the newly created xdp_frame structure is stored at the start of the newly allocated buffer. Avoid the structure from being overwritten by explicitly reserving enough space in the buffer for storing it. Account for the fact that the structure's size might increase in time by aligning the headroom to DPAA_FD_DATA_ALIGNMENT bytes, thus guaranteeing the data's alignment. Fixes: ae680bcbd06a ("dpaa_eth: implement the A050385 erratum workaround for XDP") Signed-off-by: Camelia Groza Acked-by: Maciej Fijalkowski Acked-by: Madalin Bucur Signed-off-by: Jakub Kicinski commit 8dc1c444df193701910f5e80b5d4caaf705a8fb0 Author: Eric Dumazet Date: Thu Feb 4 13:31:46 2021 -0800 net: gro: do not keep too many GRO packets in napi->rx_list Commit c80794323e82 ("net: Fix packet reordering caused by GRO and listified RX cooperation") had the unfortunate effect of adding latencies in common workloads. Before the patch, GRO packets were immediately passed to upper stacks. After the patch, we can accumulate quite a lot of GRO packets (depdending on NAPI budget). My fix is counting in napi->rx_count number of segments instead of number of logical packets. Fixes: c80794323e82 ("net: Fix packet reordering caused by GRO and listified RX cooperation") Signed-off-by: Eric Dumazet Bisected-by: John Sperbeck Tested-by: Jian Yang Cc: Maxim Mikityanskiy Reviewed-by: Saeed Mahameed Reviewed-by: Edward Cree Reviewed-by: Alexander Lobakin Link: https://lore.kernel.org/r/20210204213146.4192368-1-eric.dumazet@gmail.com Signed-off-by: Jakub Kicinski commit 36a6c843fd0d8e02506681577e96dabd203dd8e8 Author: Gabriel Krisman Bertazi Date: Fri Feb 5 13:43:21 2021 -0500 entry: Use different define for selector variable in SUD Michael Kerrisk suggested that, from an API perspective, it is a bad idea to share the PR_SYS_DISPATCH_ defines between the prctl operation and the selector variable. Therefore, define two new constants to be used by SUD's selector variable and update the corresponding documentation and test cases. While this changes the API syscall user dispatch has never been part of a Linux release, it will show up for the first time in 5.11. Suggested-by: Michael Kerrisk (man-pages) Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210205184321.2062251-1-krisman@collabora.com commit 6342adcaa683c2b705c24ed201dc11b35854c88d Author: Gabriel Krisman Bertazi Date: Wed Feb 3 13:00:48 2021 -0500 entry: Ensure trap after single-step on system call return Commit 299155244770 ("entry: Drop usage of TIF flags in the generic syscall code") introduced a bug on architectures using the generic syscall entry code, in which processes stopped by PTRACE_SYSCALL do not trap on syscall return after receiving a TIF_SINGLESTEP. The reason is that the meaning of TIF_SINGLESTEP flag is overloaded to cause the trap after a system call is executed, but since the above commit, the syscall call handler only checks for the SYSCALL_WORK flags on the exit work. Split the meaning of TIF_SINGLESTEP such that it only means single-step mode, and create a new type of SYSCALL_WORK to request a trap immediately after a syscall in single-step mode. In the current implementation, the SYSCALL_WORK flag shadows the TIF_SINGLESTEP flag for simplicity. Update x86 to flip this bit when a tracer enables single stepping. Fixes: 299155244770 ("entry: Drop usage of TIF flags in the generic syscall code") Suggested-by: Linus Torvalds Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Thomas Gleixner Tested-by: Kyle Huey Link: https://lore.kernel.org/r/87h7mtc9pr.fsf_-_@collabora.com commit 2452483d9546de1c540f330469dc4042ff089731 Author: Thomas Gleixner Date: Fri Feb 5 23:28:29 2021 +0100 Revert "lib: Restrict cpumask_local_spread to houskeeping CPUs" This reverts commit 1abdfe706a579a702799fce465bceb9fb01d407c. This change is broken and not solving any problem it claims to solve. Robin reported that cpumask_local_spread() now returns any cpu out of cpu_possible_mask in case that NOHZ_FULL is disabled (runtime or compile time). It can also return any offline or not-present CPU in the housekeeping mask. Before that it was returning a CPU out of online_cpu_mask. While the function is racy against CPU hotplug if the caller does not protect against it, the actual use cases are not caring much about it as they use it mostly as hint for: - the user space affinity hint which is unused by the kernel - memory node selection which is just suboptimal - network queue affinity which might fail but is handled gracefully But the occasional fail vs. hotplug is very different from returning anything from possible_cpu_mask which can have a large amount of offline CPUs obviously. The changelog of the commit claims: "The current implementation of cpumask_local_spread() does not respect the isolated CPUs, i.e., even if a CPU has been isolated for Real-Time task, it will return it to the caller for pinning of its IRQ threads. Having these unwanted IRQ threads on an isolated CPU adds up to a latency overhead." The only correct part of this changelog is: "The current implementation of cpumask_local_spread() does not respect the isolated CPUs." Everything else is just disjunct from reality. Reported-by: Robin Murphy Signed-off-by: Thomas Gleixner Cc: Nitesh Narayan Lal Cc: Marcelo Tosatti Cc: abelits@marvell.com Cc: davem@davemloft.net Link: https://lore.kernel.org/r/87y2g26tnt.fsf@nanos.tec.linutronix.de commit 1e0d27fce010b0a4a9e595506b6ede75934c31be Merge: 17fbcdf9f163e 654eb3f2a009a Author: Linus Torvalds Date: Fri Feb 5 13:07:27 2021 -0800 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "18 patches. Subsystems affected by this patch series: mm (hugetlb, compaction, vmalloc, shmem, memblock, pagecache, kasan, and hugetlb), mailmap, gcov, ubsan, and MAINTAINERS" * emailed patches from Andrew Morton : MAINTAINERS/.mailmap: use my @kernel.org address mm: hugetlb: fix missing put_page in gather_surplus_pages() ubsan: implement __ubsan_handle_alignment_assumption kasan: make addr_has_metadata() return true for valid addresses kasan: add explicit preconditions to kasan_report() mm/filemap: add missing mem_cgroup_uncharge() to __add_to_page_cache_locked() mailmap: add entries for Manivannan Sadhasivam mailmap: fix name/email for Viresh Kumar memblock: do not start bottom-up allocations with kernel_end mm: thp: fix MADV_REMOVE deadlock on shmem THP init/gcov: allow CONFIG_CONSTRUCTORS on UML to fix module gcov mm/vmalloc: separate put pages and flush VM flags mm, compaction: move high_pfn to the for loop scope mm: migrate: do not migrate HugeTLB page whose refcount is one mm: hugetlb: remove VM_BUG_ON_PAGE from page_huge_active mm: hugetlb: fix a race between isolating and freeing page mm: hugetlb: fix a race between freeing and dissolving the page mm: hugetlbfs: fix cannot migrate the fallocated HugeTLB page commit 256cfdd6fdf70c6fcf0f7c8ddb0ebd73ce8f3bc9 Author: Steven Rostedt (VMware) Date: Fri Feb 5 15:40:04 2021 -0500 tracing: Do not count ftrace events in top level enable output The file /sys/kernel/tracing/events/enable is used to enable all events by echoing in "1", or disabling all events when echoing in "0". To know if all events are enabled, disabled, or some are enabled but not all of them, cating the file should show either "1" (all enabled), "0" (all disabled), or "X" (some enabled but not all of them). This works the same as the "enable" files in the individule system directories (like tracing/events/sched/enable). But when all events are enabled, the top level "enable" file shows "X". The reason is that its checking the "ftrace" events, which are special events that only exist for their format files. These include the format for the function tracer events, that are enabled when the function tracer is enabled, but not by the "enable" file. The check includes these events, which will always be disabled, and even though all true events are enabled, the top level "enable" file will show "X" instead of "1". To fix this, have the check test the event's flags to see if it has the "IGNORE_ENABLE" flag set, and if so, not test it. Cc: stable@vger.kernel.org Fixes: 553552ce1796c ("tracing: Combine event filter_active and enable into single flags field") Reported-by: "Yordan Karadzhov (VMware)" Signed-off-by: Steven Rostedt (VMware) commit 4c7bcb51ae25f79e3733982e5d0cd8ce8640ddfc Author: Hans de Goede Date: Mon Dec 21 19:56:47 2020 +0100 genirq: Prevent [devm_]irq_alloc_desc from returning irq 0 Since commit a85a6c86c25b ("driver core: platform: Clarify that IRQ 0 is invalid"), having a linux-irq with number 0 will trigger a WARN() when calling platform_get_irq*() to retrieve that linux-irq. Since [devm_]irq_alloc_desc allocs a single irq and since irq 0 is not used on some systems, it can return 0, triggering that WARN(). This happens e.g. on Intel Bay Trail and Cherry Trail devices using the LPE audio engine for HDMI audio: 0 is an invalid IRQ number WARNING: CPU: 3 PID: 472 at drivers/base/platform.c:238 platform_get_irq_optional+0x108/0x180 Modules linked in: snd_hdmi_lpe_audio(+) ... Call Trace: platform_get_irq+0x17/0x30 hdmi_lpe_audio_probe+0x4a/0x6c0 [snd_hdmi_lpe_audio] ---[ end trace ceece38854223a0b ]--- Change the 'from' parameter passed to __[devm_]irq_alloc_descs() by the [devm_]irq_alloc_desc macros from 0 to 1, so that these macros will no longer return 0. Fixes: a85a6c86c25b ("driver core: platform: Clarify that IRQ 0 is invalid") Signed-off-by: Hans de Goede Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20201221185647.226146-1-hdegoede@redhat.com commit 21b200d091826a83aafc95d847139b2b0582f6d1 Author: Aurelien Aptel Date: Fri Feb 5 15:42:48 2021 +0100 cifs: report error instead of invalid when revalidating a dentry fails Assuming - //HOST/a is mounted on /mnt - //HOST/b is mounted on /mnt/b On a slow connection, running 'df' and killing it while it's processing /mnt/b can make cifs_get_inode_info() returns -ERESTARTSYS. This triggers the following chain of events: => the dentry revalidation fail => dentry is put and released => superblock associated with the dentry is put => /mnt/b is unmounted This patch makes cifs_d_revalidate() return the error instead of 0 (invalid) when cifs_revalidate_dentry() fails, except for ENOENT (file deleted) and ESTALE (file recreated). Signed-off-by: Aurelien Aptel Suggested-by: Shyam Prasad N Reviewed-by: Shyam Prasad N CC: stable@vger.kernel.org Signed-off-by: Steve French commit 3943abf2dbfae9ea4d2da05c1db569a0603f76da Author: Lai Jiangshan Date: Thu Feb 4 23:27:07 2021 +0800 x86/debug: Prevent data breakpoints on cpu_dr7 local_db_save() is called at the start of exc_debug_kernel(), reads DR7 and disables breakpoints to prevent recursion. When running in a guest (X86_FEATURE_HYPERVISOR), local_db_save() reads the per-cpu variable cpu_dr7 to check whether a breakpoint is active or not before it accesses DR7. A data breakpoint on cpu_dr7 therefore results in infinite #DB recursion. Disallow data breakpoints on cpu_dr7 to prevent that. Fixes: 84b6a3491567a("x86/entry: Optimize local_db_save() for virt") Signed-off-by: Lai Jiangshan Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210204152708.21308-2-jiangshanlai@gmail.com commit c4bed4b96918ff1d062ee81fdae4d207da4fa9b0 Author: Lai Jiangshan Date: Thu Feb 4 23:27:06 2021 +0800 x86/debug: Prevent data breakpoints on __per_cpu_offset When FSGSBASE is enabled, paranoid_entry() fetches the per-CPU GSBASE value via __per_cpu_offset or pcpu_unit_offsets. When a data breakpoint is set on __per_cpu_offset[cpu] (read-write operation), the specific CPU will be stuck in an infinite #DB loop. RCU will try to send an NMI to the specific CPU, but it is not working either since NMI also relies on paranoid_entry(). Which means it's undebuggable. Fixes: eaad981291ee3("x86/entry/64: Introduce the FIND_PERCPU_BASE macro") Signed-off-by: Lai Jiangshan Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210204152708.21308-1-jiangshanlai@gmail.com commit 654eb3f2a009af1fc64b10442e559e0d1e50904a Author: Nathan Chancellor Date: Thu Feb 4 18:33:03 2021 -0800 MAINTAINERS/.mailmap: use my @kernel.org address Use my @kernel.org for all points of contact so that I am always accessible. Link: https://lkml.kernel.org/r/20210126212730.2097108-1-nathan@kernel.org Signed-off-by: Nathan Chancellor Acked-by: Nick Desaulniers Acked-by: Miguel Ojeda Cc: Sedat Dilek Cc: Lukas Bulwahn Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e558464be982af2546229dcbef746d24e942abaa Author: Muchun Song Date: Thu Feb 4 18:33:00 2021 -0800 mm: hugetlb: fix missing put_page in gather_surplus_pages() The VM_BUG_ON_PAGE avoids the generation of any code, even if that expression has side-effects when !CONFIG_DEBUG_VM. Link: https://lkml.kernel.org/r/20210126031009.96266-1-songmuchun@bytedance.com Fixes: e5dfacebe4a4 ("mm/hugetlb.c: just use put_page_testzero() instead of page_count()") Signed-off-by: Muchun Song Reviewed-by: Mike Kravetz Reviewed-by: Miaohe Lin Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 28abcc963149e06d956d95a18a85f4ba26af746f Author: Nathan Chancellor Date: Thu Feb 4 18:32:57 2021 -0800 ubsan: implement __ubsan_handle_alignment_assumption When building ARCH=mips 32r2el_defconfig with CONFIG_UBSAN_ALIGNMENT: ld.lld: error: undefined symbol: __ubsan_handle_alignment_assumption referenced by slab.h:557 (include/linux/slab.h:557) main.o:(do_initcalls) in archive init/built-in.a referenced by slab.h:448 (include/linux/slab.h:448) do_mounts_rd.o:(rd_load_image) in archive init/built-in.a referenced by slab.h:448 (include/linux/slab.h:448) do_mounts_rd.o:(identify_ramdisk_image) in archive init/built-in.a referenced 1579 more times Implement this for the kernel based on LLVM's handleAlignmentAssumptionImpl because the kernel is not linked against the compiler runtime. Link: https://github.com/ClangBuiltLinux/linux/issues/1245 Link: https://github.com/llvm/llvm-project/blob/llvmorg-11.0.1/compiler-rt/lib/ubsan/ubsan_handlers.cpp#L151-L190 Link: https://lkml.kernel.org/r/20210127224451.2587372-1-nathan@kernel.org Signed-off-by: Nathan Chancellor Acked-by: Kees Cook Reviewed-by: Nick Desaulniers Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b99acdcbfe3c8394ddd8b8d89d9bae2bbba4a459 Author: Vincenzo Frascino Date: Thu Feb 4 18:32:53 2021 -0800 kasan: make addr_has_metadata() return true for valid addresses Currently, addr_has_metadata() returns true for every address. An invalid address (e.g. NULL) passed to the function when, KASAN_HW_TAGS is enabled, leads to a kernel panic. Make addr_has_metadata() return true for valid addresses only. Note: KASAN_HW_TAGS support for vmalloc will be added with a future patch. Link: https://lkml.kernel.org/r/20210126134409.47894-3-vincenzo.frascino@arm.com Fixes: 2e903b91479782b7 ("kasan, arm64: implement HW_TAGS runtime") Signed-off-by: Vincenzo Frascino Reviewed-by: Andrey Konovalov Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Leon Romanovsky Cc: Catalin Marinas Cc: Mark Rutland Cc: Naresh Kamboju Cc: "Paul E . McKenney" Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 49c6631d3b4f61a7b5bb0453a885a12bfa06ffd8 Author: Vincenzo Frascino Date: Thu Feb 4 18:32:49 2021 -0800 kasan: add explicit preconditions to kasan_report() Patch series "kasan: Fix metadata detection for KASAN_HW_TAGS", v5. With the introduction of KASAN_HW_TAGS, kasan_report() currently assumes that every location in memory has valid metadata associated. This is due to the fact that addr_has_metadata() returns always true. As a consequence of this, an invalid address (e.g. NULL pointer address) passed to kasan_report() when KASAN_HW_TAGS is enabled, leads to a kernel panic. Example below, based on arm64: BUG: KASAN: invalid-access in 0x0 Read at addr 0000000000000000 by task swapper/0/1 Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 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 ... Call trace: mte_get_mem_tag+0x24/0x40 kasan_report+0x1a4/0x410 alsa_sound_last_init+0x8c/0xa4 do_one_initcall+0x50/0x1b0 kernel_init_freeable+0x1d4/0x23c kernel_init+0x14/0x118 ret_from_fork+0x10/0x34 Code: d65f03c0 9000f021 f9428021 b6cfff61 (d9600000) ---[ end trace 377c8bb45bdd3a1a ]--- hrtimer: interrupt took 48694256 ns note: swapper/0[1] exited with preempt_count 1 Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b SMP: stopping secondary CPUs Kernel Offset: 0x35abaf140000 from 0xffff800010000000 PHYS_OFFSET: 0x40000000 CPU features: 0x0a7e0152,61c0a030 Memory Limit: none ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b ]--- This series fixes the behavior of addr_has_metadata() that now returns true only when the address is valid. This patch (of 2): With the introduction of KASAN_HW_TAGS, kasan_report() accesses the metadata only when addr_has_metadata() succeeds. Add a comment to make sure that the preconditions to the function are explicitly clarified. Link: https://lkml.kernel.org/r/20210126134409.47894-1-vincenzo.frascino@arm.com Link: https://lkml.kernel.org/r/20210126134409.47894-2-vincenzo.frascino@arm.com Signed-off-by: Vincenzo Frascino Reviewed-by: Andrey Konovalov Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Leon Romanovsky Cc: Andrey Konovalov Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: "Paul E . McKenney" Cc: Naresh Kamboju Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit da74240eb3fcd806edb1643874363e954d9e948b Author: Waiman Long Date: Thu Feb 4 18:32:45 2021 -0800 mm/filemap: add missing mem_cgroup_uncharge() to __add_to_page_cache_locked() Commit 3fea5a499d57 ("mm: memcontrol: convert page cache to a new mem_cgroup_charge() API") introduced a bug in __add_to_page_cache_locked() causing the following splat: page dumped because: VM_BUG_ON_PAGE(page_memcg(page)) pages's memcg:ffff8889a4116000 ------------[ cut here ]------------ kernel BUG at mm/memcontrol.c:2924! invalid opcode: 0000 [#1] SMP KASAN PTI CPU: 35 PID: 12345 Comm: cat Tainted: G S W I 5.11.0-rc4-debug+ #1 Hardware name: HP HP Z8 G4 Workstation/81C7, BIOS P60 v01.25 12/06/2017 RIP: commit_charge+0xf4/0x130 Call Trace: mem_cgroup_charge+0x175/0x770 __add_to_page_cache_locked+0x712/0xad0 add_to_page_cache_lru+0xc5/0x1f0 cachefiles_read_or_alloc_pages+0x895/0x2e10 [cachefiles] __fscache_read_or_alloc_pages+0x6c0/0xa00 [fscache] __nfs_readpages_from_fscache+0x16d/0x630 [nfs] nfs_readpages+0x24e/0x540 [nfs] read_pages+0x5b1/0xc40 page_cache_ra_unbounded+0x460/0x750 generic_file_buffered_read_get_pages+0x290/0x1710 generic_file_buffered_read+0x2a9/0xc30 nfs_file_read+0x13f/0x230 [nfs] new_sync_read+0x3af/0x610 vfs_read+0x339/0x4b0 ksys_read+0xf1/0x1c0 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Before that commit, there was a try_charge() and commit_charge() in __add_to_page_cache_locked(). These two separated charge functions were replaced by a single mem_cgroup_charge(). However, it forgot to add a matching mem_cgroup_uncharge() when the xarray insertion failed with the page released back to the pool. Fix this by adding a mem_cgroup_uncharge() call when insertion error happens. Link: https://lkml.kernel.org/r/20210125042441.20030-1-longman@redhat.com Fixes: 3fea5a499d57 ("mm: memcontrol: convert page cache to a new mem_cgroup_charge() API") Signed-off-by: Waiman Long Reviewed-by: Alex Shi Acked-by: Johannes Weiner Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Muchun Song Cc: Michal Hocko Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9c41e526a56f2cf25816e58284f4a5f9c12ccef7 Author: Manivannan Sadhasivam Date: Thu Feb 4 18:32:42 2021 -0800 mailmap: add entries for Manivannan Sadhasivam Map my personal and work addresses to korg mail address. Link: https://lkml.kernel.org/r/20210201104640.108556-1-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4c415b9a710b6ebce6517f6d4cdc5c4c31cfd7d9 Author: Viresh Kumar Date: Thu Feb 4 18:32:39 2021 -0800 mailmap: fix name/email for Viresh Kumar For some of the patches the email id was misspelled to linaro.com instead of linaro.org and for others Viresh Kumar was written as "viresh kumar" (all small). Fix both with help of mailmap entries. Link: https://lkml.kernel.org/r/d6b80b210d7fe0ddc1d4d0b22eff9708c72ef8b3.1612178938.git.viresh.kumar@linaro.org Signed-off-by: Viresh Kumar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2dcb3964544177c51853a210b6ad400de78ef17d Author: Roman Gushchin Date: Thu Feb 4 18:32:36 2021 -0800 memblock: do not start bottom-up allocations with kernel_end With kaslr the kernel image is placed at a random place, so starting the bottom-up allocation with the kernel_end can result in an allocation failure and a warning like this one: hugetlb_cma: reserve 2048 MiB, up to 2048 MiB per node ------------[ cut here ]------------ memblock: bottom-up allocation failed, memory hotremove may be affected WARNING: CPU: 0 PID: 0 at mm/memblock.c:332 memblock_find_in_range_node+0x178/0x25a Modules linked in: CPU: 0 PID: 0 Comm: swapper Not tainted 5.10.0+ #1169 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-1.fc33 04/01/2014 RIP: 0010:memblock_find_in_range_node+0x178/0x25a Code: e9 6d ff ff ff 48 85 c0 0f 85 da 00 00 00 80 3d 9b 35 df 00 00 75 15 48 c7 c7 c0 75 59 88 c6 05 8b 35 df 00 01 e8 25 8a fa ff <0f> 0b 48 c7 44 24 20 ff ff ff ff 44 89 e6 44 89 ea 48 c7 c1 70 5c RSP: 0000:ffffffff88803d18 EFLAGS: 00010086 ORIG_RAX: 0000000000000000 RAX: 0000000000000000 RBX: 0000000240000000 RCX: 00000000ffffdfff RDX: 00000000ffffdfff RSI: 00000000ffffffea RDI: 0000000000000046 RBP: 0000000100000000 R08: ffffffff88922788 R09: 0000000000009ffb R10: 00000000ffffe000 R11: 3fffffffffffffff R12: 0000000000000000 R13: 0000000000000000 R14: 0000000080000000 R15: 00000001fb42c000 FS: 0000000000000000(0000) GS:ffffffff88f71000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffa080fb401000 CR3: 00000001fa80a000 CR4: 00000000000406b0 Call Trace: memblock_alloc_range_nid+0x8d/0x11e cma_declare_contiguous_nid+0x2c4/0x38c hugetlb_cma_reserve+0xdc/0x128 flush_tlb_one_kernel+0xc/0x20 native_set_fixmap+0x82/0xd0 flat_get_apic_id+0x5/0x10 register_lapic_address+0x8e/0x97 setup_arch+0x8a5/0xc3f start_kernel+0x66/0x547 load_ucode_bsp+0x4c/0xcd secondary_startup_64_no_verify+0xb0/0xbb random: get_random_bytes called from __warn+0xab/0x110 with crng_init=0 ---[ end trace f151227d0b39be70 ]--- At the same time, the kernel image is protected with memblock_reserve(), so we can just start searching at PAGE_SIZE. In this case the bottom-up allocation has the same chances to success as a top-down allocation, so there is no reason to fallback in the case of a failure. All together it simplifies the logic. Link: https://lkml.kernel.org/r/20201217201214.3414100-2-guro@fb.com Fixes: 8fabc623238e ("powerpc: Ensure that swiotlb buffer is allocated from low memory") Signed-off-by: Roman Gushchin Reviewed-by: Mike Rapoport Cc: Joonsoo Kim Cc: Michal Hocko Cc: Rik van Riel Cc: Wonhyuk Yang Cc: Thiago Jung Bauermann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1c2f67308af4c102b4e1e6cd6f69819ae59408e0 Author: Hugh Dickins Date: Thu Feb 4 18:32:31 2021 -0800 mm: thp: fix MADV_REMOVE deadlock on shmem THP Sergey reported deadlock between kswapd correctly doing its usual lock_page(page) followed by down_read(page->mapping->i_mmap_rwsem), and madvise(MADV_REMOVE) on an madvise(MADV_HUGEPAGE) area doing down_write(page->mapping->i_mmap_rwsem) followed by lock_page(page). This happened when shmem_fallocate(punch hole)'s unmap_mapping_range() reaches zap_pmd_range()'s call to __split_huge_pmd(). The same deadlock could occur when partially truncating a mapped huge tmpfs file, or using fallocate(FALLOC_FL_PUNCH_HOLE) on it. __split_huge_pmd()'s page lock was added in 5.8, to make sure that any concurrent use of reuse_swap_page() (holding page lock) could not catch the anon THP's mapcounts and swapcounts while they were being split. Fortunately, reuse_swap_page() is never applied to a shmem or file THP (not even by khugepaged, which checks PageSwapCache before calling), and anonymous THPs are never created in shmem or file areas: so that __split_huge_pmd()'s page lock can only be necessary for anonymous THPs, on which there is no risk of deadlock with i_mmap_rwsem. Link: https://lkml.kernel.org/r/alpine.LSU.2.11.2101161409470.2022@eggly.anvils Fixes: c444eb564fb1 ("mm: thp: make the THP mapcount atomic against __split_huge_pmd_locked()") Signed-off-by: Hugh Dickins Reported-by: Sergey Senozhatsky Reviewed-by: Andrea Arcangeli Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 55b6f763d8bcb5546997933105d66d3e6b080e6a Author: Johannes Berg Date: Thu Feb 4 18:32:28 2021 -0800 init/gcov: allow CONFIG_CONSTRUCTORS on UML to fix module gcov On ARCH=um, loading a module doesn't result in its constructors getting called, which breaks module gcov since the debugfs files are never registered. On the other hand, in-kernel constructors have already been called by the dynamic linker, so we can't call them again. Get out of this conundrum by allowing CONFIG_CONSTRUCTORS to be selected, but avoiding the in-kernel constructor calls. Also remove the "if !UML" from GCOV selecting CONSTRUCTORS now, since we really do want CONSTRUCTORS, just not kernel binary ones. Link: https://lkml.kernel.org/r/20210120172041.c246a2cac2fb.I1358f584b76f1898373adfed77f4462c8705b736@changeid Signed-off-by: Johannes Berg Reviewed-by: Peter Oberparleiter Cc: Arnd Bergmann Cc: Jessica Yu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4f6ec8602341e97b364e4e0d41a1ed08148f5e98 Author: Rick Edgecombe Date: Thu Feb 4 18:32:24 2021 -0800 mm/vmalloc: separate put pages and flush VM flags When VM_MAP_PUT_PAGES was added, it was defined with the same value as VM_FLUSH_RESET_PERMS. This doesn't seem like it will cause any big functional problems other than some excess flushing for VM_MAP_PUT_PAGES allocations. Redefine VM_MAP_PUT_PAGES to have its own value. Also, rearrange things so flags are less likely to be missed in the future. Link: https://lkml.kernel.org/r/20210122233706.9304-1-rick.p.edgecombe@intel.com Fixes: b944afc9d64d ("mm: add a VM_MAP_PUT_PAGES flag for vmap") Signed-off-by: Rick Edgecombe Suggested-by: Matthew Wilcox Cc: Miaohe Lin Cc: Christoph Hellwig Cc: Daniel Axtens Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 74e21484e40bb8ce0f9828bbfe1c9fc9b04249c6 Author: Rokudo Yan Date: Thu Feb 4 18:32:20 2021 -0800 mm, compaction: move high_pfn to the for loop scope In fast_isolate_freepages, high_pfn will be used if a prefered one (ie PFN >= low_fn) not found. But the high_pfn is not reset before searching an free area, so when it was used as freepage, it may from another free area searched before. As a result move_freelist_head(freelist, freepage) will have unexpected behavior (eg corrupt the MOVABLE freelist) Unable to handle kernel paging request at virtual address dead000000000200 Mem abort info: ESR = 0x96000044 Exception class = DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 Data abort info: ISV = 0, ISS = 0x00000044 CM = 0, WnR = 1 [dead000000000200] address between user and kernel address ranges -000|list_cut_before(inline) -000|move_freelist_head(inline) -000|fast_isolate_freepages(inline) -000|isolate_freepages(inline) -000|compaction_alloc(?, ?) -001|unmap_and_move(inline) -001|migrate_pages([NSD:0xFFFFFF80088CBBD0] from = 0xFFFFFF80088CBD88, [NSD:0xFFFFFF80088CBBC8] get_new_p -002|__read_once_size(inline) -002|static_key_count(inline) -002|static_key_false(inline) -002|trace_mm_compaction_migratepages(inline) -002|compact_zone(?, [NSD:0xFFFFFF80088CBCB0] capc = 0x0) -003|kcompactd_do_work(inline) -003|kcompactd([X19] p = 0xFFFFFF93227FBC40) -004|kthread([X20] _create = 0xFFFFFFE1AFB26380) -005|ret_from_fork(asm) The issue was reported on an smart phone product with 6GB ram and 3GB zram as swap device. This patch fixes the issue by reset high_pfn before searching each free area, which ensure freepage and freelist match when call move_freelist_head in fast_isolate_freepages(). Link: http://lkml.kernel.org/r/20190118175136.31341-12-mgorman@techsingularity.net Link: https://lkml.kernel.org/r/20210112094720.1238444-1-wu-yan@tcl.com Fixes: 5a811889de10f1eb ("mm, compaction: use free lists to quickly locate a migration target") Signed-off-by: Rokudo Yan Acked-by: Mel Gorman Acked-by: Vlastimil Babka Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 71a64f618be9594cd0645105c0989855c0f86d90 Author: Muchun Song Date: Thu Feb 4 18:32:17 2021 -0800 mm: migrate: do not migrate HugeTLB page whose refcount is one All pages isolated for the migration have an elevated reference count and therefore seeing a reference count equal to 1 means that the last user of the page has dropped the reference and the page has became unused and there doesn't make much sense to migrate it anymore. This has been done for regular pages and this patch does the same for hugetlb pages. Although the likelihood of the race is rather small for hugetlb pages it makes sense the two code paths in sync. Link: https://lkml.kernel.org/r/20210115124942.46403-2-songmuchun@bytedance.com Signed-off-by: Muchun Song Reviewed-by: Mike Kravetz Acked-by: Yang Shi Acked-by: Michal Hocko Reviewed-by: David Hildenbrand Reviewed-by: Oscar Salvador Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ecbf4724e6061b4b01be20f6d797d64d462b2bc8 Author: Muchun Song Date: Thu Feb 4 18:32:13 2021 -0800 mm: hugetlb: remove VM_BUG_ON_PAGE from page_huge_active The page_huge_active() can be called from scan_movable_pages() which do not hold a reference count to the HugeTLB page. So when we call page_huge_active() from scan_movable_pages(), the HugeTLB page can be freed parallel. Then we will trigger a BUG_ON which is in the page_huge_active() when CONFIG_DEBUG_VM is enabled. Just remove the VM_BUG_ON_PAGE. Link: https://lkml.kernel.org/r/20210115124942.46403-6-songmuchun@bytedance.com Fixes: 7e1f049efb86 ("mm: hugetlb: cleanup using paeg_huge_active()") Signed-off-by: Muchun Song Reviewed-by: Mike Kravetz Acked-by: Michal Hocko Reviewed-by: Oscar Salvador Cc: David Hildenbrand Cc: Yang Shi Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0eb2df2b5629794020f75e94655e1994af63f0d4 Author: Muchun Song Date: Thu Feb 4 18:32:10 2021 -0800 mm: hugetlb: fix a race between isolating and freeing page There is a race between isolate_huge_page() and __free_huge_page(). CPU0: CPU1: if (PageHuge(page)) put_page(page) __free_huge_page(page) spin_lock(&hugetlb_lock) update_and_free_page(page) set_compound_page_dtor(page, NULL_COMPOUND_DTOR) spin_unlock(&hugetlb_lock) isolate_huge_page(page) // trigger BUG_ON VM_BUG_ON_PAGE(!PageHead(page), page) spin_lock(&hugetlb_lock) page_huge_active(page) // trigger BUG_ON VM_BUG_ON_PAGE(!PageHuge(page), page) spin_unlock(&hugetlb_lock) When we isolate a HugeTLB page on CPU0. Meanwhile, we free it to the buddy allocator on CPU1. Then, we can trigger a BUG_ON on CPU0, because it is already freed to the buddy allocator. Link: https://lkml.kernel.org/r/20210115124942.46403-5-songmuchun@bytedance.com Fixes: c8721bbbdd36 ("mm: memory-hotplug: enable memory hotplug to handle hugepage") Signed-off-by: Muchun Song Reviewed-by: Mike Kravetz Acked-by: Michal Hocko Reviewed-by: Oscar Salvador Cc: David Hildenbrand Cc: Yang Shi Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7ffddd499ba6122b1a07828f023d1d67629aa017 Author: Muchun Song Date: Thu Feb 4 18:32:06 2021 -0800 mm: hugetlb: fix a race between freeing and dissolving the page There is a race condition between __free_huge_page() and dissolve_free_huge_page(). CPU0: CPU1: // page_count(page) == 1 put_page(page) __free_huge_page(page) dissolve_free_huge_page(page) spin_lock(&hugetlb_lock) // PageHuge(page) && !page_count(page) update_and_free_page(page) // page is freed to the buddy spin_unlock(&hugetlb_lock) spin_lock(&hugetlb_lock) clear_page_huge_active(page) enqueue_huge_page(page) // It is wrong, the page is already freed spin_unlock(&hugetlb_lock) The race window is between put_page() and dissolve_free_huge_page(). We should make sure that the page is already on the free list when it is dissolved. As a result __free_huge_page would corrupt page(s) already in the buddy allocator. Link: https://lkml.kernel.org/r/20210115124942.46403-4-songmuchun@bytedance.com Fixes: c8721bbbdd36 ("mm: memory-hotplug: enable memory hotplug to handle hugepage") Signed-off-by: Muchun Song Reviewed-by: Mike Kravetz Reviewed-by: Oscar Salvador Acked-by: Michal Hocko Cc: David Hildenbrand Cc: Yang Shi Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 585fc0d2871c9318c949fbf45b1f081edd489e96 Author: Muchun Song Date: Thu Feb 4 18:32:03 2021 -0800 mm: hugetlbfs: fix cannot migrate the fallocated HugeTLB page If a new hugetlb page is allocated during fallocate it will not be marked as active (set_page_huge_active) which will result in a later isolate_huge_page failure when the page migration code would like to move that page. Such a failure would be unexpected and wrong. Only export set_page_huge_active, just leave clear_page_huge_active as static. Because there are no external users. Link: https://lkml.kernel.org/r/20210115124942.46403-3-songmuchun@bytedance.com Fixes: 70c3547e36f5 (hugetlbfs: add hugetlbfs_fallocate()) Signed-off-by: Muchun Song Acked-by: Michal Hocko Reviewed-by: Mike Kravetz Reviewed-by: Oscar Salvador Cc: David Hildenbrand Cc: Yang Shi Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 17fbcdf9f163e6c404c65bb8c17cd8d7338cc3e7 Merge: 6157ce59bf318 bad4c6eb5eaa8 Author: Linus Torvalds Date: Fri Feb 5 10:11:14 2021 -0800 Merge tag 'nfsd-5.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux Pull nfsd fix from Chuck Lever: "Fix non-page-aligned NFS READs" * tag 'nfsd-5.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: SUNRPC: Fix NFS READs that start at non-page-aligned offsets commit 6157ce59bf318bd4ee23769c613cf5628d7f457b Merge: 97ba0c7413f83 031b91a5fe6f1 Author: Linus Torvalds Date: Fri Feb 5 10:03:01 2021 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Paolo Bonzini: "x86 has lots of small bugfixes, mostly one liners. It's quite late in 5.11-rc but none of them are related to this merge window; it's just bugs coming in at the wrong time. Of note among the others is "KVM: x86: Allow guests to see MSR_IA32_TSX_CTRL even if tsx=off" that fixes a live migration failure seen on distros that hadn't switched to tsx=off right away. ARM: - Avoid clobbering extra registers on initialisation" [ Sean Christopherson notes that commit 943dea8af21b ("KVM: x86: Update emulator context mode if SYSENTER xfers to 64-bit mode") should have had authorship credited to Jonny Barker, not to him. - Linus ] * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: x86: Set so called 'reserved CR3 bits in LM mask' at vCPU reset KVM: x86/mmu: Fix TDP MMU zap collapsible SPTEs KVM: x86: cleanup CR3 reserved bits checks KVM: SVM: Treat SVM as unsupported when running as an SEV guest KVM: x86: Update emulator context mode if SYSENTER xfers to 64-bit mode KVM: x86: Supplement __cr4_reserved_bits() with X86_FEATURE_PCID check KVM/x86: assign hva with the right value to vm_munmap the pages KVM: x86: Allow guests to see MSR_IA32_TSX_CTRL even if tsx=off Fix unsynchronized access to sev members through svm_register_enc_region KVM: Documentation: Fix documentation for nested. KVM: x86: fix CPUID entries returned by KVM_GET_CPUID2 ioctl KVM: arm64: Don't clobber x4 in __do_hyp_init commit 97ba0c7413f83ab3b43a5ba05362ecc837fce518 Merge: e07ce64d83046 4c9fb5d914080 Author: Linus Torvalds Date: Fri Feb 5 09:57:29 2021 -0800 Merge tag 'iommu-fixes-v5.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull IOMMU fix from Joerg Roedel: "Fix a possible NULL-ptr dereference in dev_iommu_priv_get() which is too easy to accidentially trigger from IOMMU drivers. In the current case the AMD IOMMU driver triggered it on some machines in the IO-page-fault path, so fix it once and for all" * tag 'iommu-fixes-v5.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu: Check dev->iommu in dev_iommu_priv_get() before dereferencing it commit e07ce64d83046178c9c0c35e9d230a9b178b62ef Merge: 2d8bdf5906580 b35ccebe3ef76 Author: Linus Torvalds Date: Fri Feb 5 09:54:20 2021 -0800 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull vdpa fix from Michael Tsirkin: "A bugfix in the mlx driver I got at the last minute" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: vdpa/mlx5: Restore the hardware used index after change map commit 2d8bdf5906580daf72364e0dac4517ac26d5b05d Merge: 8e91dd934be61 d7fb9c2420955 Author: Linus Torvalds Date: Fri Feb 5 09:53:11 2021 -0800 Merge tag 'mmc-v5.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "MMC core: - Limit retries when analyse of SDIO tuples fails MMC host: - sdhci: Fix linking err for sdhci-brcmstb" * tag 'mmc-v5.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: sdhci-pltfm: Fix linking err for sdhci-brcmstb mmc: core: Limit retries when analyse of SDIO tuples fails commit 8e91dd934be6131143df5db05fb06635581addf9 Merge: dd86e7fa07a3e 59854811c08cf Author: Linus Torvalds Date: Fri Feb 5 09:50:21 2021 -0800 Merge tag 'drm-fixes-2021-02-05-1' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Fixes for rc7, bit bigger than I'd like at this stage, but most of the i915 stuff and some amdgpu is destined for staging and I'd rather not hold it up, the i915 changes also pulled in a few precusor code movement patches to make things cleaner, but nothing seems that horrible, and I've checked over all of it. Otherwise there is a nouveau dma-api warning regression, and a ttm page allocation warning fix, and some fixes for a bridge chip, ttm: - fix huge page warning regression i915: - Skip vswing programming for TBT - Power up combo PHY lanes for HDMI - Fix double YUV range correction on HDR planes - Fix the MST PBN divider calculation - Fix LTTPR vswing/pre-emp setting in non-transparent mode - Move the breadcrumb to the signaler if completed upon cancel - Close race between enable_breadcrumbs and cancel_breadcrumbs - Drop lru bumping on display unpinning amdgpu: - Fix retry in gem create - Vangogh fixes - Fix for display from shared buffers - Various display fixes amdkfd: - Fix regression in buffer free nouveau: - fix DMA API warning regression drm/bridge/lontium-lt9611uxc: - EDID fixes - Don't handle hotplug events in IRQ handler" * tag 'drm-fixes-2021-02-05-1' of git://anongit.freedesktop.org/drm/drm: (29 commits) drm/nouveau: fix dma syncing warning with debugging on. drm/amd/display: Decrement refcount of dc_sink before reassignment drm/amd/display: Free atomic state after drm_atomic_commit drm/amd/display: Fix dc_sink kref count in emulated_link_detect drm/amd/display: Release DSC before acquiring drm/amd/display: Revert "Fix EDID parsing after resume from suspend" drm/amd/display: Add more Clock Sources to DCN2.1 drm/amd/display: reuse current context instead of recreating one drm/amd/display: Fix DPCD translation for LTTPR AUX_RD_INTERVAL drm/amdgpu: enable freesync for A+A configs drm/amd/pm: fill in the data member of v2 gpu metrics table for vangogh drm/amdgpu/gfx10: update CGTS_TCC_DISABLE and CGTS_USER_TCC_DISABLE register offsets for VGH drm/amdkfd: fix null pointer panic while free buffer in kfd drm/amdgpu: fix the issue that retry constantly once the buffer is oversize drm/i915/dp: Fix LTTPR vswing/pre-emp setting in non-transparent mode drm/i915/dp: Move intel_dp_set_signal_levels() to intel_dp_link_training.c drm/i915: Fix the MST PBN divider calculation drm/dp/mst: Export drm_dp_get_vc_payload_bw() drm/i915/gem: Drop lru bumping on display unpinning drm/i915/gt: Close race between enable_breadcrumbs and cancel_breadcrumbs ... commit 24c242ec7abb3d21fa0b1da6bb251521dc1717b5 Author: Geert Uytterhoeven Date: Mon Jan 25 15:30:39 2021 +0100 ntp: Use freezable workqueue for RTC synchronization The bug fixed by commit e3fab2f3de081e98 ("ntp: Fix RTC synchronization on 32-bit platforms") revealed an underlying issue: RTC synchronization may happen anytime, even while the system is partially suspended. On systems where the RTC is connected to an I2C bus, the I2C bus controller may already or still be suspended, triggering a WARNING during suspend or resume from s2ram: WARNING: CPU: 0 PID: 124 at drivers/i2c/i2c-core.h:54 __i2c_transfer+0x634/0x680 i2c i2c-6: Transfer while suspended [...] Workqueue: events_power_efficient sync_hw_clock [...] (__i2c_transfer) (i2c_transfer) (regmap_i2c_read) ... (da9063_rtc_set_time) (rtc_set_time) (sync_hw_clock) (process_one_work) Fix this race condition by using the freezable instead of the normal power-efficient workqueue. Signed-off-by: Geert Uytterhoeven Signed-off-by: Thomas Gleixner Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20210125143039.1051912-1-geert+renesas@glider.be commit b35ccebe3ef76168aa2edaa35809c0232cb3578e Author: Eli Cohen Date: Thu Feb 4 09:36:18 2021 +0200 vdpa/mlx5: Restore the hardware used index after change map When a change of memory map occurs, the hardware resources are destroyed and then re-created again with the new memory map. In such case, we need to restore the hardware available and used indices. The driver failed to restore the used index which is added here. Also, since the driver also fails to reset the available and used indices upon device reset, fix this here to avoid regression caused by the fact that used index may not be zero upon device reset. Fixes: 1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices") Signed-off-by: Eli Cohen Link: https://lore.kernel.org/r/20210204073618.36336-1-elic@nvidia.com Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit 91792bb8089b63b7b780251eb83939348ac58a64 Author: Pavel Shilovsky Date: Tue Feb 2 22:34:32 2021 -0600 smb3: fix crediting for compounding when only one request in flight Currently we try to guess if a compound request is going to succeed waiting for credits or not based on the number of requests in flight. This approach doesn't work correctly all the time because there may be only one request in flight which is going to bring multiple credits satisfying the compound request. Change the behavior to fail a request only if there are no requests in flight at all and proceed waiting for credits otherwise. Cc: # 5.1+ Signed-off-by: Pavel Shilovsky Reviewed-by: Tom Talpey Reviewed-by: Shyam Prasad N Signed-off-by: Steve French commit 9f5f8ec50165630cfc49897410b30997d4d677b5 Author: Barry Song Date: Sat Feb 6 00:33:24 2021 +1300 dma-mapping: benchmark: use u8 for reserved field in uAPI structure The original code put five u32 before a u64 expansion[10] array. Five is odd, this will cause trouble in the extension of the structure by adding new features. This patch moves to use u8 for reserved field to avoid future alignment risk. Meanwhile, it also clears the memory of struct map_benchmark in tools, otherwise, if users use old version to run on newer kernel, the random expansion value will cause side effect on newer kernel. Signed-off-by: Barry Song Signed-off-by: Christoph Hellwig commit 4d62e81b60d4025e2dfcd5ea531cc1394ce9226f Author: Russell King Date: Mon Feb 1 19:40:01 2021 +0000 ARM: kexec: fix oops after TLB are invalidated Giancarlo Ferrari reports the following oops while trying to use kexec: Unable to handle kernel paging request at virtual address 80112f38 pgd = fd7ef03e [80112f38] *pgd=0001141e(bad) Internal error: Oops: 80d [#1] PREEMPT SMP ARM ... This is caused by machine_kexec() trying to set the kernel text to be read/write, so it can poke values into the relocation code before copying it - and an interrupt occuring which changes the page tables. The subsequent writes then hit read-only sections that trigger a data abort resulting in the above oops. Fix this by copying the relocation code, and then writing the variables into the destination, thereby avoiding the need to make the kernel text read/write. Reported-by: Giancarlo Ferrari Tested-by: Giancarlo Ferrari Signed-off-by: Russell King commit 9c698bff66ab4914bb3d71da7dc6112519bde23e Author: Russell King Date: Fri Jan 29 10:19:07 2021 +0000 ARM: ensure the signal page contains defined contents Ensure that the signal page contains our poison instruction to increase the protection against ROP attacks and also contains well defined contents. Acked-by: Will Deacon Signed-off-by: Russell King commit f670e9f9c8cac716c3506c6bac9e997b27ad441a Author: Heiko Stuebner Date: Wed Jan 27 11:39:19 2021 +0100 usb: dwc2: Fix endpoint direction check in ep_from_windex dwc2_hsotg_process_req_status uses ep_from_windex() to retrieve the endpoint for the index provided in the wIndex request param. In a test-case with a rndis gadget running and sending a malformed packet to it like: dev.ctrl_transfer( 0x82, # bmRequestType 0x00, # bRequest 0x0000, # wValue 0x0001, # wIndex 0x00 # wLength ) it is possible to cause a crash: [ 217.533022] dwc2 ff300000.usb: dwc2_hsotg_process_req_status: USB_REQ_GET_STATUS [ 217.559003] Unable to handle kernel read from unreadable memory at virtual address 0000000000000088 ... [ 218.313189] Call trace: [ 218.330217] ep_from_windex+0x3c/0x54 [ 218.348565] usb_gadget_giveback_request+0x10/0x20 [ 218.368056] dwc2_hsotg_complete_request+0x144/0x184 This happens because ep_from_windex wants to compare the endpoint direction even if index_to_ep() didn't return an endpoint due to the direction not matching. The fix is easy insofar that the actual direction check is already happening when calling index_to_ep() which will return NULL if there is no endpoint for the targeted direction, so the offending check can go away completely. Fixes: c6f5c050e2a7 ("usb: dwc2: gadget: add bi-directional endpoint support") Cc: stable@vger.kernel.org Reported-by: Gerhard Klostermeier Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20210127103919.58215-1-heiko@sntech.de Signed-off-by: Greg Kroah-Hartman commit 0e5a3c8284a30f4c43fd81d7285528ece74563b5 Author: Gary Bisson Date: Mon Jan 25 17:19:34 2021 +0100 usb: dwc3: fix clock issue during resume in OTG mode Commit fe8abf332b8f ("usb: dwc3: support clocks and resets for DWC3 core") introduced clock support and a new function named dwc3_core_init_for_resume() which enables the clock before calling dwc3_core_init() during resume as clocks get disabled during suspend. Unfortunately in this commit the DWC3_GCTL_PRTCAP_OTG case was forgotten and therefore during resume, a platform could call dwc3_core_init() without re-enabling the clocks first, preventing to resume properly. So update the resume path to call dwc3_core_init_for_resume() as it should. Fixes: fe8abf332b8f ("usb: dwc3: support clocks and resets for DWC3 core") Cc: stable@vger.kernel.org Signed-off-by: Gary Bisson Link: https://lore.kernel.org/r/20210125161934.527820-1-gary.bisson@boundarydevices.com Signed-off-by: Greg Kroah-Hartman commit efe6e3068067212b85c2d0474b5ee3b2d0c7adab Author: Arnd Bergmann Date: Thu Feb 4 16:29:47 2021 +0100 kallsyms: fix nonconverging kallsyms table with lld ARM randconfig builds with lld sometimes show a build failure from kallsyms: Inconsistent kallsyms data Try make KALLSYMS_EXTRA_PASS=1 as a workaround The problem is the veneers/thunks getting added by the linker extend the symbol table, which in turn leads to more veneers being needed, so it may take a few extra iterations to converge. This bug has been fixed multiple times before, but comes back every time a new symbol name is used. lld uses a different set of identifiers from ld.bfd, so the additional ones need to be added as well. I looked through the sources and found that arm64 and mips define similar prefixes, so I'm adding those as well, aside from the ones I observed. I'm not sure about powerpc64, which seems to already be handled through a section match, but if it comes back, the "__long_branch_" and "__plt_" prefixes would have to get added as well. Signed-off-by: Arnd Bergmann Signed-off-by: Masahiro Yamada commit 315da87c0f99a4741a639782d59dae44878199f5 Author: Masahiro Yamada Date: Wed Feb 3 16:52:39 2021 +0900 kbuild: fix duplicated flags in DEBUG_CFLAGS Sedat Dilek noticed duplicated flags in DEBUG_CFLAGS when building deb-pkg with CONFIG_DEBUG_INFO. For example, 'make CC=clang bindeb-pkg' reproduces the issue. Kbuild recurses to the top Makefile for some targets such as package builds. With commit 121c5d08d53c ("kbuild: Only add -fno-var-tracking-assignments for old GCC versions") applied, DEBUG_CFLAGS is now reset only when CONFIG_CC_IS_GCC=y. Fix it to reset DEBUG_CFLAGS all the time. Fixes: 121c5d08d53c ("kbuild: Only add -fno-var-tracking-assignments for old GCC versions") Reported-by: Sedat Dilek Signed-off-by: Masahiro Yamada Tested-by: Sedat Dilek Reviewed-by: Mark Wielaard Reviewed-by: Nathan Chancellor commit b3d2c7b876d450e1d2624fd67658acc96465a9e6 Merge: 647b8dd518466 8d6bca156e47d Author: Jakub Kicinski Date: Thu Feb 4 21:36:59 2021 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net 1) Fix combination of --reap and --update in xt_recent that triggers UAF, from Jozsef Kadlecsik. 2) Fix current year in nft_meta selftest, from Fabian Frederick. 3) Fix possible UAF in the netns destroy path of nftables. 4) Fix incorrect checksum calculation when mangling ports in flowtable, from Sven Auhagen. * git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf: netfilter: flowtable: fix tcp and udp header checksum update netfilter: nftables: fix possible UAF over chains from packet path in netns selftests: netfilter: fix current year netfilter: xt_recent: Fix attempt to update deleted entry ==================== Link: https://lore.kernel.org/r/20210205001727.2125-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski commit 647b8dd5184665432cc8a2b5bca46a201f690c37 Author: Vadim Fedorenko Date: Thu Feb 4 20:50:34 2021 +0300 selftests: txtimestamp: fix compilation issue PACKET_TX_TIMESTAMP is defined in if_packet.h but it is not included in test. Include it instead of otherwise the error of redefinition arrives. Also fix the compiler warning about ambiguous control flow by adding explicit braces. Fixes: 8fe2f761cae9 ("net-timestamp: expand documentation") Suggested-by: Willem de Bruijn Signed-off-by: Vadim Fedorenko Acked-by: Willem de Bruijn Link: https://lore.kernel.org/r/1612461034-24524-1-git-send-email-vfedorenko@novek.ru Signed-off-by: Jakub Kicinski commit 8fd54a73b7cda11548154451bdb4bde6d8ff74c7 Author: Vladimir Oltean Date: Thu Feb 4 18:33:51 2021 +0200 net: dsa: call teardown method on probe failure Since teardown is supposed to undo the effects of the setup method, it should be called in the error path for dsa_switch_setup, not just in dsa_switch_teardown. Fixes: 5e3f847a02aa ("net: dsa: Add teardown callback for drivers") Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20210204163351.2929670-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 07bf34a50e327975b21a9dee64d220c3dcb72ee9 Author: Vladimir Oltean Date: Thu Feb 4 15:45:11 2021 +0200 net: enetc: initialize the RFS and RSS memories Michael tried to enable Advanced Error Reporting through the ENETC's Root Complex Event Collector, and the system started spitting out single bit correctable ECC errors coming from the ENETC interfaces: pcieport 0000:00:1f.0: AER: Multiple Corrected error received: 0000:00:00.0 fsl_enetc 0000:00:00.0: PCIe Bus Error: severity=Corrected, type=Transaction Layer, (Receiver ID) fsl_enetc 0000:00:00.0: device [1957:e100] error status/mask=00004000/00000000 fsl_enetc 0000:00:00.0: [14] CorrIntErr fsl_enetc 0000:00:00.1: PCIe Bus Error: severity=Corrected, type=Transaction Layer, (Receiver ID) fsl_enetc 0000:00:00.1: device [1957:e100] error status/mask=00004000/00000000 fsl_enetc 0000:00:00.1: [14] CorrIntErr Further investigating the port correctable memory error detect register (PCMEDR) shows that these AER errors have an associated SOURCE_ID of 6 (RFS/RSS): $ devmem 0x1f8010e10 32 0xC0000006 $ devmem 0x1f8050e10 32 0xC0000006 Discussion with the hardware design engineers reveals that on LS1028A, the hardware does not do initialization of that RFS/RSS memory, and that software should clear/initialize the entire table before starting to operate. That comes as a bit of a surprise, since the driver does not do initialization of the RFS memory. Also, the initialization of the Receive Side Scaling is done only partially. Even though the entire ENETC IP has a single shared flow steering memory, the flow steering service should returns matches only for TCAM entries that are within the range of the Station Interface that is doing the search. Therefore, it should be sufficient for a Station Interface to initialize all of its own entries in order to avoid any ECC errors, and only the Station Interfaces in use should need initialization. There are Physical Station Interfaces associated with PCIe PFs and Virtual Station Interfaces associated with PCIe VFs. We let the PF driver initialize the entire port's memory, which includes the RFS entries which are going to be used by the VF. Reported-by: Michael Walle Fixes: d4fd0404c1c9 ("enetc: Introduce basic PF and VF ENETC ethernet drivers") Signed-off-by: Vladimir Oltean Tested-by: Michael Walle Reviewed-by: Jesse Brandeburg Link: https://lore.kernel.org/r/20210204134511.2640309-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 12bc8dfb83b5292fe387b795210018b7632ee08b Author: Andrea Parri (Microsoft) Date: Wed Feb 3 12:36:02 2021 +0100 hv_netvsc: Reset the RSC count if NVSP_STAT_FAIL in netvsc_receive() Commit 44144185951a0f ("hv_netvsc: Add validation for untrusted Hyper-V values") added validation to rndis_filter_receive_data() (and rndis_filter_receive()) which introduced NVSP_STAT_FAIL-scenarios where the count is not updated/reset. Fix this omission, and prevent similar scenarios from occurring in the future. Reported-by: Juan Vazquez Signed-off-by: Andrea Parri (Microsoft) Fixes: 44144185951a0f ("hv_netvsc: Add validation for untrusted Hyper-V values") Reviewed-by: Jesse Brandeburg Link: https://lore.kernel.org/r/20210203113602.558916-1-parri.andrea@gmail.com Signed-off-by: Jakub Kicinski commit 52cbd23a119c6ebf40a527e53f3402d2ea38eccb Author: Willem de Bruijn Date: Wed Feb 3 14:29:52 2021 -0500 udp: fix skb_copy_and_csum_datagram with odd segment sizes When iteratively computing a checksum with csum_block_add, track the offset "pos" to correctly rotate in csum_block_add when offset is odd. The open coded implementation of skb_copy_and_csum_datagram did this. With the switch to __skb_datagram_iter calling csum_and_copy_to_iter, pos was reinitialized to 0 on each call. Bring back the pos by passing it along with the csum to the callback. Changes v1->v2 - pass csum value, instead of csump pointer (Alexander Duyck) Link: https://lore.kernel.org/netdev/20210128152353.GB27281@optiplex/ Fixes: 950fcaecd5cc ("datagram: consolidate datagram copy to iter helpers") Reported-by: Oliver Graute Signed-off-by: Willem de Bruijn Reviewed-by: Alexander Duyck Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20210203192952.1849843-1-willemdebruijn.kernel@gmail.com Signed-off-by: Jakub Kicinski commit 1d23a56b0296d29e7047b41fe0a42a001036160d Author: Alex Elder Date: Wed Feb 3 19:06:55 2021 -0600 net: ipa: set error code in gsi_channel_setup() In gsi_channel_setup(), we check to see if the configuration data contains any information about channels that are not supported by the hardware. If one is found, we abort the setup process, but the error code (ret) is not set in this case. Fix this bug. Fixes: 650d1603825d8 ("soc: qcom: ipa: the generic software interface") Reported-by: Dan Carpenter Signed-off-by: Alex Elder Link: https://lore.kernel.org/r/20210204010655.15619-1-elder@linaro.org Signed-off-by: Jakub Kicinski commit 81b8be68ef8e8915d0cc6cedd2ac425c74a24813 Author: Xie He Date: Tue Feb 2 23:15:41 2021 -0800 net: hdlc_x25: Return meaningful error code in x25_open It's not meaningful to pass on LAPB error codes to HDLC code or other parts of the system, because they will not understand the error codes. Instead, use system-wide recognizable error codes. Fixes: f362e5fe0f1f ("wan/hdlc_x25: make lapb params configurable") Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Xie He Acked-by: Martin Schiller Link: https://lore.kernel.org/r/20210203071541.86138-1-xie.he.0141@gmail.com Signed-off-by: Jakub Kicinski commit 7b5eab57cac45e270a0ad624ba157c5b30b3d44d Author: David Howells Date: Wed Feb 3 08:47:56 2021 +0000 rxrpc: Fix clearance of Tx/Rx ring when releasing a call At the end of rxrpc_release_call(), rxrpc_cleanup_ring() is called to clear the Rx/Tx skbuff ring, but this doesn't lock the ring whilst it's accessing it. Unfortunately, rxrpc_resend() might be trying to retransmit a packet concurrently with this - and whilst it does lock the ring, this isn't protection against rxrpc_cleanup_call(). Fix this by removing the call to rxrpc_cleanup_ring() from rxrpc_release_call(). rxrpc_cleanup_ring() will be called again anyway from rxrpc_cleanup_call(). The earlier call is just an optimisation to recycle skbuffs more quickly. Alternative solutions include rxrpc_release_call() could try to cancel the work item or wait for it to complete or rxrpc_cleanup_ring() could lock when accessing the ring (which would require a bh lock). This can produce a report like the following: BUG: KASAN: use-after-free in rxrpc_send_data_packet+0x19b4/0x1e70 net/rxrpc/output.c:372 Read of size 4 at addr ffff888011606e04 by task kworker/0:0/5 ... Workqueue: krxrpcd rxrpc_process_call Call Trace: ... kasan_report.cold+0x79/0xd5 mm/kasan/report.c:413 rxrpc_send_data_packet+0x19b4/0x1e70 net/rxrpc/output.c:372 rxrpc_resend net/rxrpc/call_event.c:266 [inline] rxrpc_process_call+0x1634/0x1f60 net/rxrpc/call_event.c:412 process_one_work+0x98d/0x15f0 kernel/workqueue.c:2275 ... Allocated by task 2318: ... sock_alloc_send_pskb+0x793/0x920 net/core/sock.c:2348 rxrpc_send_data+0xb51/0x2bf0 net/rxrpc/sendmsg.c:358 rxrpc_do_sendmsg+0xc03/0x1350 net/rxrpc/sendmsg.c:744 rxrpc_sendmsg+0x420/0x630 net/rxrpc/af_rxrpc.c:560 ... Freed by task 2318: ... kfree_skb+0x140/0x3f0 net/core/skbuff.c:704 rxrpc_free_skb+0x11d/0x150 net/rxrpc/skbuff.c:78 rxrpc_cleanup_ring net/rxrpc/call_object.c:485 [inline] rxrpc_release_call+0x5dd/0x860 net/rxrpc/call_object.c:552 rxrpc_release_calls_on_socket+0x21c/0x300 net/rxrpc/call_object.c:579 rxrpc_release_sock net/rxrpc/af_rxrpc.c:885 [inline] rxrpc_release+0x263/0x5a0 net/rxrpc/af_rxrpc.c:916 __sock_release+0xcd/0x280 net/socket.c:597 ... The buggy address belongs to the object at ffff888011606dc0 which belongs to the cache skbuff_head_cache of size 232 Fixes: 248f219cb8bc ("rxrpc: Rewrite the data and ack handling code") Reported-by: syzbot+174de899852504e4a74a@syzkaller.appspotmail.com Reported-by: syzbot+3d1c772efafd3c38d007@syzkaller.appspotmail.com Signed-off-by: David Howells cc: Hillf Danton Link: https://lore.kernel.org/r/161234207610.653119.5287360098400436976.stgit@warthog.procyon.org.uk Signed-off-by: Jakub Kicinski commit 3401e4aa43a540881cc97190afead650e709c418 Author: Raju Rangoju Date: Tue Feb 2 23:55:11 2021 +0530 cxgb4: Add new T6 PCI device id 0x6092 Signed-off-by: Raju Rangoju Link: https://lore.kernel.org/r/20210202182511.8109-1-rajur@chelsio.com Signed-off-by: Jakub Kicinski commit 59854811c08cfbdf52d79231666e7c07c46ff338 Merge: cfd4951f935c5 88ebe1f572e28 Author: Dave Airlie Date: Fri Feb 5 11:03:27 2021 +1000 Merge tag 'drm-intel-fixes-2021-02-04' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes drm/i915 fixes for v5.11-rc7: - Skip vswing programming for TBT - Power up combo PHY lanes for HDMI - Fix double YUV range correction on HDR planes - Fix the MST PBN divider calculation - Fix LTTPR vswing/pre-emp setting in non-transparent mode - Move the breadcrumb to the signaler if completed upon cancel - Close race between enable_breadcrumbs and cancel_breadcrumbs - Drop lru bumping on display unpinning Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87bld0f36b.fsf@intel.com commit dd86e7fa07a3ec33c92c957ea7b642c4702516a0 Merge: 5c279c4cf206e 40fb68c7725ae Author: Linus Torvalds Date: Thu Feb 4 16:05:40 2021 -0800 Merge tag 'pci-v5.11-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fix from Bjorn Helgaas: "Revert ASPM suspend/resume fix that regressed NVMe devices (Bjorn Helgaas)" * tag 'pci-v5.11-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: Revert "PCI/ASPM: Save/restore L1SS Capability for suspend/resume" commit cfd4951f935c5504e887ed80abaafba210cc0a44 Merge: 6fc5e3022f0ed 8e92bb0fa75bc Author: Dave Airlie Date: Fri Feb 5 09:29:15 2021 +1000 Merge tag 'amd-drm-fixes-5.11-2021-02-03' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-5.11-2021-02-03: amdgpu: - Fix retry in gem create - Vangogh fixes - Fix for display from shared buffers - Various display fixes amdkfd: - Fix regression in buffer free Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210204041300.4425-1-alexander.deucher@amd.com commit aec18a57edad562d620f7d19016de1fc0cc2208c Author: Pavel Begunkov Date: Thu Feb 4 19:22:46 2021 +0000 io_uring: drop mm/files between task_work_submit Since SQPOLL task can be shared and so task_work entries can be a mix of them, we need to drop mm and files before trying to issue next request. Cc: stable@vger.kernel.org # 5.10+ Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit ec7d8e7dd3a59528e305a18e93f1cb98f7faf83b Author: Juergen Gross Date: Tue Feb 2 08:09:38 2021 +0100 xen/netback: avoid race in xenvif_rx_ring_slots_available() Since commit 23025393dbeb3b8b3 ("xen/netback: use lateeoi irq binding") xenvif_rx_ring_slots_available() is no longer called only from the rx queue kernel thread, so it needs to access the rx queue with the associated queue held. Reported-by: Igor Druzhinin Fixes: 23025393dbeb3b8b3 ("xen/netback: use lateeoi irq binding") Signed-off-by: Juergen Gross Acked-by: Wei Liu Link: https://lore.kernel.org/r/20210202070938.7863-1-jgross@suse.com Signed-off-by: Jakub Kicinski commit 25a068b8e9a4eb193d755d58efcb3c98928636e0 Author: Dave Hansen Date: Thu Mar 5 09:47:08 2020 -0800 x86/apic: Add extra serialization for non-serializing MSRs Jan Kiszka reported that the x2apic_wrmsr_fence() function uses a plain MFENCE while the Intel SDM (10.12.3 MSR Access in x2APIC Mode) calls for MFENCE; LFENCE. Short summary: we have special MSRs that have weaker ordering than all the rest. Add fencing consistent with current SDM recommendations. This is not known to cause any issues in practice, only in theory. Longer story below: The reason the kernel uses a different semantic is that the SDM changed (roughly in late 2017). The SDM changed because folks at Intel were auditing all of the recommended fences in the SDM and realized that the x2apic fences were insufficient. Why was the pain MFENCE judged insufficient? WRMSR itself is normally a serializing instruction. No fences are needed because the instruction itself serializes everything. But, there are explicit exceptions for this serializing behavior written into the WRMSR instruction documentation for two classes of MSRs: IA32_TSC_DEADLINE and the X2APIC MSRs. Back to x2apic: WRMSR is *not* serializing in this specific case. But why is MFENCE insufficient? MFENCE makes writes visible, but only affects load/store instructions. WRMSR is unfortunately not a load/store instruction and is unaffected by MFENCE. This means that a non-serializing WRMSR could be reordered by the CPU to execute before the writes made visible by the MFENCE have even occurred in the first place. This means that an x2apic IPI could theoretically be triggered before there is any (visible) data to process. Does this affect anything in practice? I honestly don't know. It seems quite possible that by the time an interrupt gets to consume the (not yet) MFENCE'd data, it has become visible, mostly by accident. To be safe, add the SDM-recommended fences for all x2apic WRMSRs. This also leaves open the question of the _other_ weakly-ordered WRMSR: MSR_IA32_TSC_DEADLINE. While it has the same ordering architecture as the x2APIC MSRs, it seems substantially less likely to be a problem in practice. While writes to the in-memory Local Vector Table (LVT) might theoretically be reordered with respect to a weakly-ordered WRMSR like TSC_DEADLINE, the SDM has this to say: In x2APIC mode, the WRMSR instruction is used to write to the LVT entry. The processor ensures the ordering of this write and any subsequent WRMSR to the deadline; no fencing is required. But, that might still leave xAPIC exposed. The safest thing to do for now is to add the extra, recommended LFENCE. [ bp: Massage commit message, fix typos, drop accidentally added newline to tools/arch/x86/include/asm/barrier.h. ] Reported-by: Jan Kiszka Signed-off-by: Dave Hansen Signed-off-by: Borislav Petkov Acked-by: Peter Zijlstra (Intel) Acked-by: Thomas Gleixner Cc: Link: https://lkml.kernel.org/r/20200305174708.F77040DD@viggo.jf.intel.com commit 5c279c4cf206e03995e04fd3404fa95ffd243a97 Author: Mike Rapoport Date: Thu Feb 4 20:12:37 2021 +0200 Revert "x86/setup: don't remove E820_TYPE_RAM for pfn 0" This reverts commit bde9cfa3afe4324ec251e4af80ebf9b7afaf7afe. Changing the first memory page type from E820_TYPE_RESERVED to E820_TYPE_RAM makes it a part of "System RAM" resource rather than a reserved resource and this in turn causes devmem_is_allowed() to treat is as area that can be accessed but it is filled with zeroes instead of the actual data as previously. The change in /dev/mem output causes lilo to fail as was reported at slakware users forum, and probably other legacy applications will experience similar problems. Link: https://www.linuxquestions.org/questions/slackware-14/slackware-current-lilo-vesa-warnings-after-recent-updates-4175689617/#post6214439 Signed-off-by: Mike Rapoport Cc: stable@kernel.org Signed-off-by: Linus Torvalds commit 927002ed29e2dda6dfacb87fe582d5495a03f096 Merge: 4cb2c00c43b3f 0f347aa07f15b Author: Linus Torvalds Date: Thu Feb 4 10:08:30 2021 -0800 Merge tag 'acpi-5.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fix from Rafael Wysocki: "Address recent regression causing battery devices to be never bound to a driver on some systems (Hans de Goede)" * tag 'acpi-5.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: scan: Fix battery devices sometimes never binding commit 4cb2c00c43b3fe88b32f29df4f76da1b92c33224 Merge: 61556703b610a 335d3fc57941e Author: Linus Torvalds Date: Thu Feb 4 10:01:17 2021 -0800 Merge tag 'ovl-fixes-5.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs Pull overlayfs fixes from Miklos Szeredi: - Fix capability conversion and minor overlayfs bugs that are related to the unprivileged overlay mounts introduced in this cycle. - Fix two recent (v5.10) and one old (v4.10) bug. - Clean up security xattr copy-up (related to a SELinux regression). * tag 'ovl-fixes-5.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: ovl: implement volatile-specific fsync error behaviour ovl: skip getxattr of security labels ovl: fix dentry leak in ovl_get_redirect ovl: avoid deadlock on directory ioctl cap: fix conversions on getxattr ovl: perform vfs_getxattr() with mounter creds ovl: add warning on user_ns mismatch commit 031b91a5fe6f1ce61b7617614ddde9ed61e252be Author: Sean Christopherson Date: Wed Feb 3 16:01:06 2021 -0800 KVM: x86: Set so called 'reserved CR3 bits in LM mask' at vCPU reset Set cr3_lm_rsvd_bits, which is effectively an invalid GPA mask, at vCPU reset. The reserved bits check needs to be done even if userspace never configures the guest's CPUID model. Cc: stable@vger.kernel.org Fixes: 0107973a80ad ("KVM: x86: Introduce cr3_lm_rsvd_bits in kvm_vcpu_arch") Signed-off-by: Sean Christopherson Message-Id: <20210204000117.3303214-2-seanjc@google.com> Signed-off-by: Paolo Bonzini commit ea8465e611022a04d85393f776874911a9fc0a2b Merge: 388c705b95f23 cb8563f5c735a Author: Jens Axboe Date: Thu Feb 4 08:24:16 2021 -0700 Merge branch 'nvme-5.11' of git://git.infradead.org/nvme into block-5.11 Pull NVMe fixes from Christoph. * 'nvme-5.11' of git://git.infradead.org/nvme: nvmet-tcp: fix out-of-bounds access when receiving multiple h2cdata PDUs update the email address for Keith Bush nvme-pci: ignore the subsysem NQN on Phison E16 nvme-pci: avoid the deepest sleep state on Kingston A2000 SSDs commit d7e10d47691d1702db1cd1edcc689d3031eefc67 Author: Xiaoguang Wang Date: Thu Feb 4 17:20:56 2021 +0800 io_uring: don't modify identity's files uncess identity is cowed Abaci Robot reported following panic: BUG: kernel NULL pointer dereference, address: 0000000000000000 PGD 800000010ef3f067 P4D 800000010ef3f067 PUD 10d9df067 PMD 0 Oops: 0002 [#1] SMP PTI CPU: 0 PID: 1869 Comm: io_wqe_worker-0 Not tainted 5.11.0-rc3+ #1 Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011 RIP: 0010:put_files_struct+0x1b/0x120 Code: 24 18 c7 00 f4 ff ff ff e9 4d fd ff ff 66 90 0f 1f 44 00 00 41 57 41 56 49 89 fe 41 55 41 54 55 53 48 83 ec 08 e8 b5 6b db ff 41 ff 0e 74 13 48 83 c4 08 5b 5d 41 5c 41 5d 41 5e 41 5f e9 9c RSP: 0000:ffffc90002147d48 EFLAGS: 00010293 RAX: 0000000000000000 RBX: ffff88810d9a5300 RCX: 0000000000000000 RDX: ffff88810d87c280 RSI: ffffffff8144ba6b RDI: 0000000000000000 RBP: 0000000000000080 R08: 0000000000000001 R09: ffffffff81431500 R10: ffff8881001be000 R11: 0000000000000000 R12: ffff88810ac2f800 R13: ffff88810af38a00 R14: 0000000000000000 R15: ffff8881057130c0 FS: 0000000000000000(0000) GS:ffff88813bc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 000000010dbaa002 CR4: 00000000003706f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __io_clean_op+0x10c/0x2a0 io_dismantle_req+0x3c7/0x600 __io_free_req+0x34/0x280 io_put_req+0x63/0xb0 io_worker_handle_work+0x60e/0x830 ? io_wqe_worker+0x135/0x520 io_wqe_worker+0x158/0x520 ? __kthread_parkme+0x96/0xc0 ? io_worker_handle_work+0x830/0x830 kthread+0x134/0x180 ? kthread_create_worker_on_cpu+0x90/0x90 ret_from_fork+0x1f/0x30 Modules linked in: CR2: 0000000000000000 ---[ end trace c358ca86af95b1e7 ]--- I guess case below can trigger above panic: there're two threads which operates different io_uring ctxs and share same sqthread identity, and later one thread exits, io_uring_cancel_task_requests() will clear task->io_uring->identity->files to be NULL in sqpoll mode, then another ctx that uses same identity will panic. Indeed we don't need to clear task->io_uring->identity->files here, io_grab_identity() should handle identity->files changes well, if task->io_uring->identity->files is not equal to current->files, io_cow_identity() should handle this changes well. Cc: stable@vger.kernel.org # 5.5+ Reported-by: Abaci Robot Signed-off-by: Xiaoguang Wang Reviewed-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 87aa9ec939ec7277b730786e19c161c9194cc8ca Author: Ben Gardon Date: Tue Feb 2 10:57:16 2021 -0800 KVM: x86/mmu: Fix TDP MMU zap collapsible SPTEs There is a bug in the TDP MMU function to zap SPTEs which could be replaced with a larger mapping which prevents the function from doing anything. Fix this by correctly zapping the last level SPTEs. Cc: stable@vger.kernel.org Fixes: 14881998566d ("kvm: x86/mmu: Support disabling dirty logging for the tdp MMU") Signed-off-by: Ben Gardon Message-Id: <20210202185734.1680553-11-bgardon@google.com> Signed-off-by: Paolo Bonzini commit d795cc02a297df80910cf4ba23147680d15d8a7d Author: Vadim Fedorenko Date: Wed Feb 3 23:37:14 2021 +0300 selftests/tls: fix selftest with CHACHA20-POLY1305 TLS selftests were broken also because of use of structure that was not exported to UAPI. Fix by defining the union in tests. Fixes: 4f336e88a870 (selftests/tls: add CHACHA20-POLY1305 to tls selftests) Reported-by: Rong Chen Signed-off-by: Vadim Fedorenko Link: https://lore.kernel.org/r/1612384634-5377-1-git-send-email-vfedorenko@novek.ru Signed-off-by: Jakub Kicinski commit 6fc5e3022f0edd8243a9e53ab187a3787bf2d108 Merge: f295c8cfec833 2b1b3e544f65f Author: Dave Airlie Date: Thu Feb 4 12:31:06 2021 +1000 Merge tag 'drm-misc-fixes-2021-02-02' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes * drm/bridge/lontium-lt9611uxc: EDID fixes; Don't handle hotplug events in IRQ handler * drm/ttm: Use _GFP_NOWARN for huge pages Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/YBlHU4sc/5GHpXpg@linux-uq9g commit 2a80c15812372e554474b1dba0b1d8e467af295d Author: Sabyrzhan Tasbolatov Date: Tue Feb 2 15:20:59 2021 +0600 net/qrtr: restrict user-controlled length in qrtr_tun_write_iter() syzbot found WARNING in qrtr_tun_write_iter [1] when write_iter length exceeds KMALLOC_MAX_SIZE causing order >= MAX_ORDER condition. Additionally, there is no check for 0 length write. [1] WARNING: mm/page_alloc.c:5011 [..] Call Trace: alloc_pages_current+0x18c/0x2a0 mm/mempolicy.c:2267 alloc_pages include/linux/gfp.h:547 [inline] kmalloc_order+0x2e/0xb0 mm/slab_common.c:837 kmalloc_order_trace+0x14/0x120 mm/slab_common.c:853 kmalloc include/linux/slab.h:557 [inline] kzalloc include/linux/slab.h:682 [inline] qrtr_tun_write_iter+0x8a/0x180 net/qrtr/tun.c:83 call_write_iter include/linux/fs.h:1901 [inline] Reported-by: syzbot+c2a7e5c5211605a90865@syzkaller.appspotmail.com Signed-off-by: Sabyrzhan Tasbolatov Link: https://lore.kernel.org/r/20210202092059.1361381-1-snovitoll@gmail.com Signed-off-by: Jakub Kicinski commit 8d6bca156e47d68551750a384b3ff49384c67be3 Author: Sven Auhagen Date: Tue Feb 2 18:01:16 2021 +0100 netfilter: flowtable: fix tcp and udp header checksum update When updating the tcp or udp header checksum on port nat the function inet_proto_csum_replace2 with the last parameter pseudohdr as true. This leads to an error in the case that GRO is used and packets are split up in GSO. The tcp or udp checksum of all packets is incorrect. The error is probably masked due to the fact the most network driver implement tcp/udp checksum offloading. It also only happens when GRO is applied and not on single packets. The error is most visible when using a pppoe connection which is not triggering the tcp/udp checksum offload. Fixes: ac2a66665e23 ("netfilter: add generic flow table infrastructure") Signed-off-by: Sven Auhagen Signed-off-by: Pablo Neira Ayuso commit 767d1216bff82507c945e92fe719dff2083bb2f4 Author: Pablo Neira Ayuso Date: Tue Feb 2 16:07:37 2021 +0100 netfilter: nftables: fix possible UAF over chains from packet path in netns Although hooks are released via call_rcu(), chain and rule objects are immediately released while packets are still walking over these bits. This patch adds the .pre_exit callback which is invoked before synchronize_rcu() in the netns framework to stay safe. Remove a comment which is not valid anymore since the core does not use synchronize_net() anymore since 8c873e219970 ("netfilter: core: free hooks with call_rcu"). Suggested-by: Florian Westphal Fixes: df05ef874b28 ("netfilter: nf_tables: release objects on netns destruction") Signed-off-by: Pablo Neira Ayuso commit a3005b0f83f217c888393c6bf9cd36e3d1616bca Author: Fabian Frederick Date: Sat Jan 30 11:14:25 2021 +0100 selftests: netfilter: fix current year use date %Y instead of %G to read current year Problem appeared when running lkp-tests on 01/01/2021 Fixes: 48d072c4e8cd ("selftests: netfilter: add time counter check") Reported-by: kernel test robot Signed-off-by: Fabian Frederick Signed-off-by: Pablo Neira Ayuso commit b1bdde33b72366da20d10770ab7a49fe87b5e190 Author: Jozsef Kadlecsik Date: Fri Jan 29 20:57:43 2021 +0100 netfilter: xt_recent: Fix attempt to update deleted entry When both --reap and --update flag are specified, there's a code path at which the entry to be updated is reaped beforehand, which then leads to kernel crash. Reap only entries which won't be updated. Fixes kernel bugzilla #207773. Link: https://bugzilla.kernel.org/show_bug.cgi?id=207773 Reported-by: Reindl Harald Fixes: 0079c5aee348 ("netfilter: xt_recent: add an entry reaper") Signed-off-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso commit a4dc7eee9106a9d2a6e08b442db19677aa9699c7 Author: Christoph Schemmel Date: Tue Feb 2 09:45:23 2021 +0100 NET: usb: qmi_wwan: Adding support for Cinterion MV31 Adding support for Cinterion MV31 with PID 0x00B7. T: Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 11 Spd=5000 MxCh= 0 D: Ver= 3.20 Cls=ef(misc ) Sub=02 Prot=01 MxPS= 9 #Cfgs= 1 P: Vendor=1e2d ProdID=00b7 Rev=04.14 S: Manufacturer=Cinterion S: Product=Cinterion USB Mobile Broadband S: SerialNumber=b3246eed C: #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=896mA I: If#=0x0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan I: If#=0x1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#=0x3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option Signed-off-by: Christoph Schemmel Link: https://lore.kernel.org/r/20210202084523.4371-1-christoph.schemmel@gmail.com Signed-off-by: Jakub Kicinski commit f295c8cfec833c2707ff1512da10d65386dde7af Author: Dave Airlie Date: Mon Feb 1 10:56:32 2021 +1000 drm/nouveau: fix dma syncing warning with debugging on. Since I wrote the below patch if you run a debug kernel you can a dma debug warning like: nouveau 0000:1f:00.0: DMA-API: device driver tries to sync DMA memory it has not allocated [device address=0x000000016e012000] [size=4096 bytes] The old nouveau code wasn't consolidate the pages like the ttm code, but the dma-debug expects the sync code to give it the same base/range pairs as the allocator. Fix the nouveau sync code to consolidate pages before calling the sync code. Fixes: bd549d35b4be0 ("nouveau: use ttm populate mapping functions. (v2)") Reported-by: Lyude Paul Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/417588/ commit 6183f4d3a0a2ad230511987c6c362ca43ec0055f Author: Bui Quang Minh Date: Wed Jan 27 06:36:53 2021 +0000 bpf: Check for integer overflow when using roundup_pow_of_two() On 32-bit architecture, roundup_pow_of_two() can return 0 when the argument has upper most bit set due to resulting 1UL << 32. Add a check for this case. Fixes: d5a3b1f69186 ("bpf: introduce BPF_MAP_TYPE_STACK_TRACE") Signed-off-by: Bui Quang Minh Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210127063653.3576-1-minhquangbui99@gmail.com commit 873e5bb9fbd99e4a26c448b5c7af942a6d7aa60d Author: Imre Deak Date: Mon Feb 1 14:01:42 2021 +0200 drm/dp_mst: Don't report ports connected if nothing is attached to them Reporting a port as connected if nothing is attached to them leads to any i2c transactions on this port trying to use an uninitialized i2c adapter, fix this. Let's account for this case even if branch devices have no good reason to report a port as plugged with their peer device type set to 'none'. Fixes: db1a07956968 ("drm/dp_mst: Handle SST-only branch device case") References: https://gitlab.freedesktop.org/drm/intel/-/issues/2987 References: https://gitlab.freedesktop.org/drm/intel/-/issues/1963 Cc: Wayne Lin Cc: Lyude Paul Cc: # v5.5+ Cc: intel-gfx@lists.freedesktop.org Signed-off-by: Imre Deak Reviewed-by: Lyude Paul Reported-by: Thiago Macieira Link: https://patchwork.freedesktop.org/patch/msgid/20210201120145.350258-1-imre.deak@intel.com commit 61556703b610a104de324e4f061dc6cf7b218b46 Merge: 3afe9076a7c19 7f3414226b58b Author: Linus Torvalds Date: Wed Feb 3 11:56:58 2021 -0800 Merge tag 'for-linus-5.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml Pull UML fixes from Richard Weinberger: - Make sure to set a default console, otherwise ttynull is selected - Revert initial ARCH_HAS_SET_MEMORY support, this needs more work - Fix a regression due to ubd refactoring - Various small fixes * tag 'for-linus-5.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml: um: time: fix initialization in time-travel mode um: fix os_idle_sleep() to not hang Revert "um: support some of ARCH_HAS_SET_MEMORY" Revert "um: allocate a guard page to helper threads" um: virtio: free vu_dev only with the contained struct device um: kmsg_dumper: always dump when not tty console um: stdio_console: Make preferred console um: return error from ioremap() um: ubd: fix command line handling of ubd commit 3afe9076a7c19140b789d144d0ba1e9be2db4265 Merge: dbc15d24f9fa6 22cd5edb2d9c6 Author: Linus Torvalds Date: Wed Feb 3 11:03:40 2021 -0800 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Catalin Marinas: "Fix the arm64 linear map range detection for tagged addresses and replace the bitwise operations with subtract (virt_addr_valid(), __is_lm_address(), __lm_to_phys())" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: Use simpler arithmetics for the linear map macros arm64: Do not pass tagged addresses to __is_lm_address() commit dbc15d24f9fa6f25723ef750b65b98bfcd3d3910 Merge: 54fe3ffef0ebb c8b186a8d54d7 Author: Linus Torvalds Date: Wed Feb 3 10:02:00 2021 -0800 Merge tag 'trace-v5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: - Initialize tracing-graph-pause at task creation, not start of function tracing, to avoid corrupting the pause counter. - Set "pause-on-trace" for latency tracers as that option breaks their output (regression). - Fix the wrong error return for setting kretprobes on future modules (before they are loaded). - Fix re-registering the same kretprobe. - Add missing value check for added RCU variable reload. * tag 'trace-v5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracepoint: Fix race between tracing and removing tracepoint kretprobe: Avoid re-registration of the same kretprobe earlier tracing/kprobe: Fix to support kretprobe events on unloaded modules tracing: Use pause-on-trace with the latency tracers fgraph: Initialize tracing_graph_pause at task creation commit 54fe3ffef0ebb60b1273d0d7b047ee9b4723cc61 Merge: 40615974f88a9 459630a3ebb41 Author: Linus Torvalds Date: Wed Feb 3 09:50:59 2021 -0800 Merge tag 'arm-soc-fixes-v5.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC fixes from Arnd Bergmann: "The code fixes in this round are all for the Texas Instruments OMAP platform, addressing several regressions related to the ti-sysc interconnect changes that was merged in linux-5.11 and one recently introduced RCU usage warning. Tero Kristo updates his maintainer file entries as he is changing to a new employer. The other changes are for devicetree files across eight different platforms: TI OMAP: - multiple gpio related one-line fixes Allwinner/sunxi: - ARM: dts: sun7i: a20: bananapro: Fix ethernet phy-mode - soc: sunxi: mbus: Remove DE2 display engine compatibles NXP lpc32xx: - ARM: dts: lpc32xx: Revert set default clock rate of HCLK PLL STMicroelectronics stm32 - multiple minor fixes for DHCOM/DHCOR boards NXP Layerscape: - Fix DCFG address range on LS1046A SoC Amlogic meson: - fix reboot issue on odroid C4 - revert an ethernet change that caused a regression - meson-g12: Set FL-adj property value Rockchip: - multiple minor fixes on 64-bit rockchip machines Qualcomm: - Regression fixes for Lenovo Yoga touchpad and for interconnect configuration - Boot fixes for 'LPASS' clock configuration on two machines" * tag 'arm-soc-fixes-v5.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (31 commits) ARM: dts: lpc32xx: Revert set default clock rate of HCLK PLL ARM: dts: sun7i: a20: bananapro: Fix ethernet phy-mode arm64: dts: ls1046a: fix dcfg address range soc: sunxi: mbus: Remove DE2 display engine compatibles arm64: dts: meson: switch TFLASH_VDD_EN pin to open drain on Odroid-C4 Revert "arm64: dts: amlogic: add missing ethernet reset ID" arm64: dts: rockchip: Disable display for NanoPi R2S ARM: dts: omap4-droid4: Fix lost keypad slide interrupts for droid4 arm64: dts: rockchip: remove interrupt-names property from rk3399 vdec node drivers: bus: simple-pm-bus: Fix compatibility with simple-bus for auxdata ARM: OMAP2+: Fix booting for am335x after moving to simple-pm-bus ARM: OMAP2+: Fix suspcious RCU usage splats for omap_enter_idle_coupled ARM: dts: stm32: Fix GPIO hog flags on DHCOM DRC02 ARM: dts: stm32: Fix GPIO hog flags on DHCOM PicoITX ARM: dts: stm32: Fix GPIO hog names on DHCOM ARM: dts: stm32: Disable optional TSC2004 on DRC02 board ARM: dts: stm32: Disable WP on DHCOM uSD slot ARM: dts: stm32: Connect card-detect signal on DHCOM ARM: dts: stm32: Fix polarity of the DH DRC02 uSD card detect arm64: dts: qcom: sdm845: Reserve LPASS clocks in gcc ... commit 40615974f88a918d01606ba27d75de2ff50b8d4e Merge: 4aa2fb4ef799b c07ea8d0b170c Author: Linus Torvalds Date: Wed Feb 3 09:44:22 2021 -0800 Merge tag 'gpio-fixes-for-v5.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio fixes from Bartosz Golaszewski: "Some more fixes from the GPIO subsystem for this release. This time it's only core fixes: - fix a memory leak in error path in gpiolib - clear debounce period in output mode in the character device code - remove shadowed variable" * tag 'gpio-fixes-for-v5.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpio: gpiolib: remove shadowed variable gpiolib: free device name on error path to fix kmemleak gpiolib: cdev: clear debounce period if line set to output commit 4aa2fb4ef799b01dd5d2dcc3970344a9a036c1f2 Merge: 3aaf0a27ffc29 215164bfb7144 Author: Linus Torvalds Date: Wed Feb 3 09:39:13 2021 -0800 Merge tag 'platform-drivers-x86-v5.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver fixes from Hans de Goede: "Two last minute small but important fixes. The hp-wmi change fixes an issue which is actively being hit by users: https://bugzilla.redhat.com/show_bug.cgi?id=1918255 https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3564 And the dell-wmi-sysman patch fixes a bug in the new dell-wmi-sysman driver which causes some systems to hang at boot when the driver loads" * tag 'platform-drivers-x86-v5.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86: dell-wmi-sysman: fix a NULL pointer dereference platform/x86: hp-wmi: Disable tablet-mode reporting by default commit cb8563f5c735a042ea2dd7df1ad55ae06d63ffeb Author: Sagi Grimberg Date: Wed Feb 3 01:20:25 2021 -0800 nvmet-tcp: fix out-of-bounds access when receiving multiple h2cdata PDUs When the host sends multiple h2cdata PDUs, we keep track on the receive progress and calculate the scatterlist index and offsets. The issue is that sg_offset should only be kept for the first iov entry we map in the iovec as this is the difference between our cursor and the sg entry offset itself. In addition, the sg index was calculated wrong because we should not round up when dividing the command byte offset with PAG_SIZE. Fixes: 872d26a391da ("nvmet-tcp: add NVMe over TCP target driver") Reported-by: Narayan Ayalasomayajula Tested-by: Narayan Ayalasomayajula Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 548f1191d86ccb9bde2a5305988877b7584c01eb Author: Alexei Starovoitov Date: Tue Feb 2 23:06:36 2021 -0800 bpf: Unbreak BPF_PROG_TYPE_KPROBE when kprobe is called via do_int3 The commit 0d00449c7a28 ("x86: Replace ist_enter() with nmi_enter()") converted do_int3 handler to be "NMI-like". That made old if (in_nmi()) check abort execution of bpf programs attached to kprobe when kprobe is firing via int3 (For example when kprobe is placed in the middle of the function). Remove the check to restore user visible behavior. Fixes: 0d00449c7a28 ("x86: Replace ist_enter() with nmi_enter()") Reported-by: Nikolay Borisov Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Tested-by: Nikolay Borisov Reviewed-by: Masami Hiramatsu Link: https://lore.kernel.org/bpf/20210203070636.70926-1-alexei.starovoitov@gmail.com commit d4a610635400ccc382792f6be69427078541c678 Author: Mathias Nyman Date: Wed Feb 3 13:37:02 2021 +0200 xhci: fix bounce buffer usage for non-sg list case xhci driver may in some special cases need to copy small amounts of payload data to a bounce buffer in order to meet the boundary and alignment restrictions set by the xHCI specification. In the majority of these cases the data is in a sg list, and driver incorrectly assumed data is always in urb->sg when using the bounce buffer. If data instead is contiguous, and in urb->transfer_buffer, we may still need to bounce buffer a small part if data starts very close (less than packet size) to a 64k boundary. Check if sg list is used before copying data to/from it. Fixes: f9c589e142d0 ("xhci: TD-fragment, align the unsplittable case with a bounce buffer") Cc: stable@vger.kernel.org Reported-by: Andreas Hartmann Tested-by: Andreas Hartmann Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20210203113702.436762-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 89e3becd8f821e507052e012d2559dcda59f538e Author: Dave Jiang Date: Mon Feb 1 08:26:14 2021 -0700 dmaengine: idxd: check device state before issue command Add device state check before executing command. Without the check the command can be issued while device is in halt state and causes the driver to block while waiting for the completion of the command. Reported-by: Sanjay Kumar Signed-off-by: Dave Jiang Tested-by: Sanjay Kumar Fixes: 0d5c10b4c84d ("dmaengine: idxd: add work queue drain support") Link: https://lore.kernel.org/r/161219313921.2976211.12222625226450097465.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 7f1b11ba3564a391169420d98162987a12d0795d Author: Borislav Petkov Date: Thu Jan 28 20:28:56 2021 +0100 tools/power/turbostat: Fallback to an MSR read for EPB Commit 6d6501d912a9 ("tools/power/turbostat: Read energy_perf_bias from sysfs") converted turbostat to read the energy_perf_bias value from sysfs. However, older kernels which do not have that file yet, would fail. For those, fall back to the MSR reading. Fixes: 6d6501d912a9 ("tools/power/turbostat: Read energy_perf_bias from sysfs") Reported-by: Artem Bityutskiy Signed-off-by: Borislav Petkov Tested-by: Artem Bityutskiy Link: https://lkml.kernel.org/r/20210127132444.981120-1-dedekind1@gmail.com commit a7e02f7796c163ac8297b30223bf24bade9f8a50 Author: Quanyang Wang Date: Tue Feb 2 14:41:21 2021 +0800 drm/xlnx: fix kmemleak by sending vblank_event in atomic_disable When running xrandr to change resolution of DP, the kmemleak as below can be observed: unreferenced object 0xffff00080a351000 (size 256): comm "Xorg", pid 248, jiffies 4294899614 (age 19.960s) hex dump (first 32 bytes): 98 a0 bc 01 08 00 ff ff 01 00 00 00 00 00 00 00 ................ ff ff ff ff 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<00000000e0bd0f69>] kmemleak_alloc+0x30/0x40 [<00000000cde2f318>] kmem_cache_alloc+0x3d4/0x588 [<0000000088ea9bd7>] drm_atomic_helper_setup_commit+0x84/0x5f8 [<000000002290a264>] drm_atomic_helper_commit+0x58/0x388 [<00000000f6ea78c3>] drm_atomic_commit+0x4c/0x60 [<00000000c8e0725e>] drm_atomic_connector_commit_dpms+0xe8/0x110 [<0000000020ade187>] drm_mode_obj_set_property_ioctl+0x1b0/0x450 [<00000000918206d6>] drm_connector_property_set_ioctl+0x3c/0x68 [<000000008d51e7a5>] drm_ioctl_kernel+0xc4/0x118 [<000000002a819b75>] drm_ioctl+0x214/0x448 [<000000008ca4e588>] __arm64_sys_ioctl+0xa8/0xf0 [<0000000034e15a35>] el0_svc_common.constprop.0+0x74/0x190 [<000000001b93d916>] do_el0_svc+0x24/0x90 [<00000000ce9230e0>] el0_svc+0x14/0x20 [<00000000e3607d82>] el0_sync_handler+0xb0/0xb8 [<000000003e79c15f>] el0_sync+0x174/0x180 This is because there is a scenario that a drm_crtc_commit commit is allocated but not freed. The drm subsystem require/release references to a CRTC commit by calling drm_crtc_commit_get/put, and when drm_crtc_commit_put find that commit.ref.refcount is zero, it will call __drm_crtc_commit_free to free this CRTC commit. Among these drm_crtc_commit_get/put pairs, there is a drm_crtc_commit_get in drm_atomic_helper_setup_commit as below: ... new_crtc_state->event->base.completion = &commit->flip_done; new_crtc_state->event->base.completion_release = release_crtc_commit; drm_crtc_commit_get(commit); ... This reference to the CRTC commit should be released at the function release_crtc_commit by calling e->completion_release(e->completion) in drm_send_event_locked. So we need to call drm_send_event_locked at two places: handling vblank event in the irq handler and the crtc disable helper. But in zynqmp_disp_crtc_atomic_disable, it only marks the flip is done and not call drm_crtc_commit_put. This result that the refcount of this commit is always non-zero and this commit will never be freed. Since the function drm_crtc_send_vblank_event has operations both sending a flip_done signal and releasing reference to the CRTC commit, let's use it instead. Signed-off-by: Quanyang Wang Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210202064121.173362-1-quanyang.wang@windriver.com commit 3241929b67d28c83945d3191c6816a3271fd6b85 Author: Pali Rohár Date: Mon Feb 1 16:08:03 2021 +0100 usb: host: xhci: mvebu: make USB 3.0 PHY optional for Armada 3720 Older ATF does not provide SMC call for USB 3.0 phy power on functionality and therefore initialization of xhci-hcd is failing when older version of ATF is used. In this case phy_power_on() function returns -EOPNOTSUPP. [ 3.108467] mvebu-a3700-comphy d0018300.phy: unsupported SMC call, try updating your firmware [ 3.117250] phy phy-d0018300.phy.0: phy poweron failed --> -95 [ 3.123465] xhci-hcd: probe of d0058000.usb failed with error -95 This patch introduces a new plat_setup callback for xhci platform drivers which is called prior calling usb_add_hcd() function. This function at its beginning skips PHY init if hcd->skip_phy_initialization is set. Current init_quirk callback for xhci platform drivers is called from xhci_plat_setup() function which is called after chip reset completes. It happens in the middle of the usb_add_hcd() function and therefore this callback cannot be used for setting if PHY init should be skipped or not. For Armada 3720 this patch introduce a new xhci_mvebu_a3700_plat_setup() function configured as a xhci platform plat_setup callback. This new function calls phy_power_on() and in case it returns -EOPNOTSUPP then XHCI_SKIP_PHY_INIT quirk is set to instruct xhci-plat to skip PHY initialization. This patch fixes above failure by ignoring 'not supported' error in xhci-hcd driver. In this case it is expected that phy is already power on. It fixes initialization of xhci-hcd on Espressobin boards where is older Marvell's Arm Trusted Firmware without SMC call for USB 3.0 phy power. This is regression introduced in commit bd3d25b07342 ("arm64: dts: marvell: armada-37xx: link USB hosts with their PHYs") where USB 3.0 phy was defined and therefore xhci-hcd on Espressobin with older ATF started failing. Fixes: bd3d25b07342 ("arm64: dts: marvell: armada-37xx: link USB hosts with their PHYs") Cc: # 5.1+: ea17a0f153af: phy: marvell: comphy: Convert internal SMCC firmware return codes to errno Cc: # 5.1+: f768e718911e: usb: host: xhci-plat: add priv quirk for skip PHY initialization Tested-by: Tomasz Maciej Nowak Tested-by: Yoshihiro Shimoda # On R-Car Reviewed-by: Yoshihiro Shimoda # xhci-plat Acked-by: Mathias Nyman Signed-off-by: Pali Rohár Link: https://lore.kernel.org/r/20210201150803.7305-1-pali@kernel.org Signed-off-by: Greg Kroah-Hartman commit 459630a3ebb4110c571f103fbc2d8120be001e39 Merge: 5638159f6d93b a900cac3750b9 Author: Arnd Bergmann Date: Wed Feb 3 11:24:01 2021 +0100 Merge tag 'sunxi-fixes-for-5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/fixes One fix for a phy-mode ethernet issue, and one to fix the display output on SoCs with the Display Engine 2 * tag 'sunxi-fixes-for-5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: ARM: dts: sun7i: a20: bananapro: Fix ethernet phy-mode soc: sunxi: mbus: Remove DE2 display engine compatibles Link: https://lore.kernel.org/r/f8298059-f9ca-43b4-9e29-35bc0e0c9b15.lettre@localhost Signed-off-by: Arnd Bergmann commit 5638159f6d93b99ec9743ac7f65563fca3cf413d Author: Alexandre Belloni Date: Wed Feb 3 10:03:20 2021 +0100 ARM: dts: lpc32xx: Revert set default clock rate of HCLK PLL This reverts commit c17e9377aa81664d94b4f2102559fcf2a01ec8e7. The lpc32xx clock driver is not able to actually change the PLL rate as this would require reparenting ARM_CLK, DDRAM_CLK, PERIPH_CLK to SYSCLK, then stop the PLL, update the register, restart the PLL and wait for the PLL to lock and finally reparent ARM_CLK, DDRAM_CLK, PERIPH_CLK to HCLK PLL. Currently, the HCLK driver simply updates the registers but this has no real effect and all the clock rate calculation end up being wrong. This is especially annoying for the peripheral (e.g. UARTs, I2C, SPI). Signed-off-by: Alexandre Belloni Tested-by: Gregory CLEMENT Link: https://lore.kernel.org/r/20210203090320.GA3760268@piout.net' Signed-off-by: Arnd Bergmann commit a900cac3750b9f0b8f5ed0503d9c6359532f644d Author: Hermann Lauer Date: Thu Jan 28 12:18:42 2021 +0100 ARM: dts: sun7i: a20: bananapro: Fix ethernet phy-mode BPi Pro needs TX and RX delay for Gbit to work reliable and avoid high packet loss rates. The realtek phy driver overrides the settings of the pull ups for the delays, so fix this for BananaPro. Fix the phy-mode description to correctly reflect this so that the implementation doesn't reconfigure the delays incorrectly. This happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e rx/tx delay config"). Fixes: 10662a33dcd9 ("ARM: dts: sun7i: Add dts file for Bananapro board") Signed-off-by: Hermann Lauer Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210128111842.GA11919@lemon.iwr.uni-heidelberg.de commit c1c35cf78bfab31b8cb455259524395c9e4c7cd6 Author: Paolo Bonzini Date: Fri Nov 13 08:30:38 2020 -0500 KVM: x86: cleanup CR3 reserved bits checks If not in long mode, the low bits of CR3 are reserved but not enforced to be zero, so remove those checks. If in long mode, however, the MBZ bits extend down to the highest physical address bit of the guest, excluding the encryption bit. Make the checks consistent with the above, and match them between nested_vmcb_checks and KVM_SET_SREGS. Cc: stable@vger.kernel.org Fixes: 761e41693465 ("KVM: nSVM: Check that MBZ bits in CR3 and CR4 are not set on vmrun of nested guests") Fixes: a780a3ea6282 ("KVM: X86: Fix reserved bits check for MOV to CR3") Reviewed-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit ccd85d90ce092bdb047a7f6580f3955393833b22 Author: Sean Christopherson Date: Tue Feb 2 13:20:17 2021 -0800 KVM: SVM: Treat SVM as unsupported when running as an SEV guest Don't let KVM load when running as an SEV guest, regardless of what CPUID says. Memory is encrypted with a key that is not accessible to the host (L0), thus it's impossible for L0 to emulate SVM, e.g. it'll see garbage when reading the VMCB. Technically, KVM could decrypt all memory that needs to be accessible to the L0 and use shadow paging so that L0 does not need to shadow NPT, but exposing such information to L0 largely defeats the purpose of running as an SEV guest. This can always be revisited if someone comes up with a use case for running VMs inside SEV guests. Note, VMLOAD, VMRUN, etc... will also #GP on GPAs with C-bit set, i.e. KVM is doomed even if the SEV guest is debuggable and the hypervisor is willing to decrypt the VMCB. This may or may not be fixed on CPUs that have the SVME_ADDR_CHK fix. Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20210202212017.2486595-1-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 388c705b95f23f317fa43e6abf9ff07b583b721a Author: Lin Feng Date: Tue Feb 2 07:18:23 2021 -0700 bfq-iosched: Revert "bfq: Fix computation of shallow depth" This reverts commit 6d4d273588378c65915acaf7b2ee74e9dd9c130a. bfq.limit_depth passes word_depths[] as shallow_depth down to sbitmap core sbitmap_get_shallow, which uses just the number to limit the scan depth of each bitmap word, formula: scan_percentage_for_each_word = shallow_depth / (1 << sbimap->shift) * 100% That means the comments's percentiles 50%, 75%, 18%, 37% of bfq are correct. But after commit patch 'bfq: Fix computation of shallow depth', we use sbitmap.depth instead, as a example in following case: sbitmap.depth = 256, map_nr = 4, shift = 6; sbitmap_word.depth = 64. The resulsts of computed bfqd->word_depths[] are {128, 192, 48, 96}, and three of the numbers exceed core dirver's 'sbitmap_word.depth=64' limit nothing. Signed-off-by: Lin Feng Reviewed-by: Jan Kara Signed-off-by: Jens Axboe commit de5f4b8f634beacf667e6eff334522601dd03b59 Author: Atish Patra Date: Fri Jan 29 11:00:38 2021 -0800 RISC-V: Define MAXPHYSMEM_1GB only for RV32 MAXPHYSMEM_1GB option was added for RV32 because RV32 only supports 1GB of maximum physical memory. This lead to few compilation errors reported by kernel test robot which created the following configuration combination which are not useful but can be configured. 1. MAXPHYSMEM_1GB & RV64 2, MAXPHYSMEM_2GB & RV32 Fix this by restricting MAXPHYSMEM_1GB for RV32 and MAXPHYSMEM_2GB only for RV64. Fixes: e557793799c5 ("RISC-V: Fix maximum allowed phsyical memory for RV32") Cc: stable@vger.kernel.org Reported-by: Randy Dunlap Acked-by: Randy Dunlap Tested-by: Geert Uytterhoeven Signed-off-by: Atish Patra Signed-off-by: Palmer Dabbelt commit eefb5f3ab2e8e0b3ef5eba5c5a9f33457741300d Author: Sebastien Van Cauwenberghe Date: Fri Jan 29 11:00:37 2021 -0800 riscv: Align on L1_CACHE_BYTES when STRICT_KERNEL_RWX Allows the sections to be aligned on smaller boundaries and therefore results in a smaller kernel image size. Signed-off-by: Sebastien Van Cauwenberghe Reviewed-by: Atish Patra Signed-off-by: Palmer Dabbelt commit f105ea9890f42137344f8c08548c895dc9294bd8 Author: Atish Patra Date: Fri Jan 29 11:00:36 2021 -0800 RISC-V: Fix .init section permission update .init section permission should only updated to non-execute if STRICT_KERNEL_RWX is enabled. Otherwise, this will lead to a kernel hang. Fixes: 19a00869028f ("RISC-V: Protect all kernel sections including init early") Cc: stable@vger.kernel.org Suggested-by: Geert Uytterhoeven Reported-by: Geert Uytterhoeven Signed-off-by: Atish Patra Reviewed-by: Atish Patra Signed-off-by: Palmer Dabbelt commit 2ab543823322b564f205cb15d0f0302803c87d11 Author: Alexandre Ghiti Date: Fri Jan 29 12:31:05 2021 -0500 riscv: virt_addr_valid must check the address belongs to linear mapping virt_addr_valid macro checks that a virtual address is valid, ie that the address belongs to the linear mapping and that the corresponding physical page exists. Add the missing check that ensures the virtual address belongs to the linear mapping, otherwise __virt_to_phys, when compiled with CONFIG_DEBUG_VIRTUAL enabled, raises a WARN that is interpreted as a kernel bug by syzbot. Signed-off-by: Alexandre Ghiti Reviewed-by: Atish Patra Signed-off-by: Palmer Dabbelt commit 074075aea2ff72dade5231b4ee9f2ab9a055f1ec Author: Masahiro Yamada Date: Tue Feb 2 15:06:04 2021 +0900 scripts/clang-tools: switch explicitly to Python 3 For the same reason as commit 51839e29cb59 ("scripts: switch explicitly to Python 3"), switch some more scripts, which I tested and confirmed working on Python 3. Signed-off-by: Masahiro Yamada Acked-by: Nathan Chancellor commit 8e92bb0fa75bca9a57e4aba2e36f67d8016a3053 Author: Victor Lu Date: Fri Jan 15 11:02:48 2021 -0500 drm/amd/display: Decrement refcount of dc_sink before reassignment [why] An old dc_sink state is causing a memory leak because it is missing a dc_sink_release before a new dc_sink is assigned back to aconnector->dc_sink. [how] Decrement the dc_sink refcount before reassigning it to a new dc_sink. Signed-off-by: Victor Lu Reviewed-by: Rodrigo Siqueira Acked-by: Anson Jacob Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 2abaa323d744011982b20b8f3886184d56d23946 Author: Victor Lu Date: Thu Jan 14 16:27:07 2021 -0500 drm/amd/display: Free atomic state after drm_atomic_commit [why] drm_atomic_commit was changed so that the caller must free their drm_atomic_state reference on successes. [how] Add drm_atomic_commit_put after drm_atomic_commit call in dm_force_atomic_commit. Signed-off-by: Victor Lu Reviewed-by: Roman Li Acked-by: Anson Jacob Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 3ddc818d9bb877c64f5c649beab97af86c403702 Author: Victor Lu Date: Thu Jan 14 22:24:14 2021 -0500 drm/amd/display: Fix dc_sink kref count in emulated_link_detect [why] prev_sink is not used anywhere else in the function and the reference to it from dc_link is replaced with a new dc_sink. [how] Change dc_sink_retain(prev_sink) to dc_sink_release(prev_sink). Signed-off-by: Victor Lu Reviewed-by: Nicholas Kazlauskas Acked-by: Anson Jacob Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 58180a0cc0c57fe62a799a112f95b60f6935bd96 Author: Mikita Lipski Date: Thu Jan 14 11:48:57 2021 -0500 drm/amd/display: Release DSC before acquiring [why] Need to unassign DSC from pipes that are not using it so other pipes can acquire it. That is needed for asic's that have unmatching number of DSC engines from the number of pipes. [how] Before acquiring dsc to stream resources, first remove it. Signed-off-by: Mikita Lipski Reviewed-by: Eryk Brol Acked-by: Anson Jacob Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 1a10e5244778169a5a53a527d7830cf0438132a1 Author: Stylon Wang Date: Tue Jan 5 11:29:34 2021 +0800 drm/amd/display: Revert "Fix EDID parsing after resume from suspend" This reverts commit b24bdc37d03a0478189e20a50286092840f414fa. It caused memory leak after S3 on 4K HDMI displays. Signed-off-by: Stylon Wang Reviewed-by: Rodrigo Siqueira Acked-by: Anson Jacob Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 1622711beebe887e4f0f8237fea1f09bb48e9a51 Author: Sung Lee Date: Fri Jan 15 13:53:15 2021 -0500 drm/amd/display: Add more Clock Sources to DCN2.1 [WHY] When enabling HDMI on ComboPHY, there are not enough clock sources to complete display detection. [HOW] Initialize more clock sources. Signed-off-by: Sung Lee Reviewed-by: Tony Cheng Acked-by: Anson Jacob Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 8866a67ab86cc0812e65c04f1ef02bcc41e24d68 Author: Bhawanpreet Lakha Date: Wed Jan 6 11:23:05 2021 -0500 drm/amd/display: reuse current context instead of recreating one [Why] Currently we discard the current context and recreate it. The current context is what is applied to the HW so we should be re-using this rather than creating a new context. Recreating the context can lead to mismatch between new context and the current context For example: gsl groups get changed when we create a new context this can cause issues in a multi display config (with flip immediate) because we don't align the existing gsl groups in the new and current context. If we reuse the current context the gsl group assignment stays the same. [How] Instead of discarding the current context, we instead just copy the current state and add/remove planes and streams. Signed-off-by: Bhawanpreet Lakha Reviewed-by: Nicholas Kazlauskas Acked-by: Anson Jacob Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 2b6b7ab4b1cabfbee1af5d818efcab5d51d62c7e Author: George Shen Date: Tue Dec 22 14:05:41 2020 -0500 drm/amd/display: Fix DPCD translation for LTTPR AUX_RD_INTERVAL [Why] The translation between the DPCD value and the specified AUX_RD_INTERVAL in the DP spec do not match. [How] Update values to match the spec. Signed-off-by: George Shen Reviewed-by: Wenjing Liu Acked-by: Anson Jacob Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit cd9b0159beb7787bec38eb339ed7bc167d83b4ff Author: Christian König Date: Wed Jan 27 13:20:40 2021 +0100 drm/amdgpu: enable freesync for A+A configs Some newer APUs can scanout directly from GTT, that saves us from allocating another bounce buffer in VRAM and enables freesync in such configurations. Without this patch creating a framebuffer from the imported BO will fail and userspace will fall back to a copy. Signed-off-by: Christian König Reviewed-by: Shashank Sharma Signed-off-by: Alex Deucher commit 53a5a2729470ac7a7f77a64be4ae87dc4aa80d39 Author: Xiaojian Du Date: Mon Feb 1 16:20:38 2021 +0800 drm/amd/pm: fill in the data member of v2 gpu metrics table for vangogh This patch is to fill in the data member of v2 gpu metrics table for vangogh. Signed-off-by: Xiaojian Du Reviewed-by: Kevin Wang Reviewed-by: Huang Rui Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit ea41bd232f167d6fd6505d54485826148b52e54a Author: chen gong Date: Fri Jan 29 15:37:45 2021 +0800 drm/amdgpu/gfx10: update CGTS_TCC_DISABLE and CGTS_USER_TCC_DISABLE register offsets for VGH For Vangogh: The offset of the CGTS_TCC_DISABLE is 0x5006 by calculation. The offset of the CGTS_USER_TCC_DISABLE is 0x5007 by calculation. Signed-off-by: chen gong Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit b99a8c8f239d76820bbed33c1a42c381cc1f16db Author: Huang Rui Date: Mon Feb 1 18:39:16 2021 +0800 drm/amdkfd: fix null pointer panic while free buffer in kfd In drm_gem_object_free, it will call funcs of drm buffer obj. So kfd_alloc should use amdgpu_gem_object_create instead of amdgpu_bo_create to initialize the funcs as amdgpu_gem_object_funcs. [ 396.231390] amdgpu: Release VA 0x7f76b4ada000 - 0x7f76b4add000 [ 396.231394] amdgpu: remove VA 0x7f76b4ada000 - 0x7f76b4add000 in entry 0000000085c24a47 [ 396.231408] BUG: kernel NULL pointer dereference, address: 0000000000000000 [ 396.231445] #PF: supervisor read access in kernel mode [ 396.231466] #PF: error_code(0x0000) - not-present page [ 396.231484] PGD 0 P4D 0 [ 396.231495] Oops: 0000 [#1] SMP NOPTI [ 396.231509] CPU: 7 PID: 1352 Comm: clinfo Tainted: G OE 5.11.0-rc2-custom #1 [ 396.231537] Hardware name: AMD Celadon-RN/Celadon-RN, BIOS WCD0401N_Weekly_20_04_0 04/01/2020 [ 396.231563] RIP: 0010:drm_gem_object_free+0xc/0x22 [drm] [ 396.231606] Code: eb ec 48 89 c3 eb e7 0f 1f 44 00 00 55 48 89 e5 48 8b bf 00 06 00 00 e8 72 0d 01 00 5d c3 0f 1f 44 00 00 48 8b 87 40 01 00 00 <48> 8b 00 48 85 c0 74 0b 55 48 89 e5 e8 54 37 7c db 5d c3 0f 0b c3 [ 396.231666] RSP: 0018:ffffb4704177fcf8 EFLAGS: 00010246 [ 396.231686] RAX: 0000000000000000 RBX: ffff993a0d0cc400 RCX: 0000000000003113 [ 396.231711] RDX: 0000000000000001 RSI: e9cda7a5d0791c6d RDI: ffff993a333a9058 [ 396.231736] RBP: ffffb4704177fdd0 R08: ffff993a03855858 R09: 0000000000000000 [ 396.231761] R10: ffff993a0d1f7158 R11: 0000000000000001 R12: 0000000000000000 [ 396.231785] R13: ffff993a0d0cc428 R14: 0000000000003000 R15: ffffb4704177fde0 [ 396.231811] FS: 00007f76b5730740(0000) GS:ffff993b275c0000(0000) knlGS:0000000000000000 [ 396.231840] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 396.231860] CR2: 0000000000000000 CR3: 000000016d2e2000 CR4: 0000000000350ee0 [ 396.231885] Call Trace: [ 396.231897] ? amdgpu_amdkfd_gpuvm_free_memory_of_gpu+0x24c/0x25f [amdgpu] [ 396.232056] ? __dynamic_dev_dbg+0xcd/0x100 [ 396.232076] kfd_ioctl_free_memory_of_gpu+0x91/0x102 [amdgpu] [ 396.232214] kfd_ioctl+0x211/0x35b [amdgpu] [ 396.232341] ? kfd_ioctl_get_queue_wave_state+0x52/0x52 [amdgpu] Fixes: 246cb7e49a70 ("drm/amdgpu: Introduce GEM object functions") Reviewed-by: Felix Kuehling Tested-by: Changfeng Signed-off-by: Huang Rui Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 89fa15ecdca7eb46a711476b961f70a74765bbe4 Author: Huang Rui Date: Sat Jan 30 17:14:30 2021 +0800 drm/amdgpu: fix the issue that retry constantly once the buffer is oversize We cannot modify initial_domain every time while the retry starts. That will cause the busy waiting that unable to switch to GTT while the vram is not enough. Fixes: f8aab60422c3 ("drm/amdgpu: Initialise drm_gem_object_funcs for imported BOs") Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 62c31574cdb770c78f67e7aa6e0b0244ad122901 Merge: 6102f9e700bb3 aa880c6f3ee6d Author: Arnd Bergmann Date: Tue Feb 2 17:45:14 2021 +0100 Merge tag 'imx-fixes-5.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes i.MX fixes for 5.11, round 3: - Fix DCFG address range on LS1046A SoC. * tag 'imx-fixes-5.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: arm64: dts: ls1046a: fix dcfg address range Link: https://lore.kernel.org/r/20210202071441.GP907@dragon Signed-off-by: Arnd Bergmann commit ebb22a05943666155e6da04407cc6e913974c78c Author: Thomas Gleixner Date: Mon Feb 1 20:24:17 2021 +0100 rtc: mc146818: Dont test for bit 0-5 in Register D The recent change to validate the RTC turned out to be overly tight. While it cures the problem on the reporters machine it breaks machines with Intel chipsets which use bit 0-5 of the D register. So check only for bit 6 being 0 which is the case on these Intel machines as well. Fixes: 211e5db19d15 ("rtc: mc146818: Detect and handle broken RTCs") Reported-by: Serge Belyshev Reported-by: Dirk Gouders Reported-by: Borislav Petkov Signed-off-by: Thomas Gleixner Tested-by: Dirk Gouders Tested-by: Len Brown Tested-by: Borislav Petkov Acked-by: Alexandre Belloni Link: https://lore.kernel.org/r/87zh0nbnha.fsf@nanos.tec.linutronix.de commit 3aaf0a27ffc29b19a62314edd684b9bc6346f9a8 Merge: 7d36ccd4bd078 1074f8ec288f5 Author: Linus Torvalds Date: Tue Feb 2 10:46:59 2021 -0800 Merge tag 'clang-format-for-linux-v5.11-rc7' of git://github.com/ojeda/linux Pull clang-format update from Miguel Ojeda: "Update with the latest for_each macro list" * tag 'clang-format-for-linux-v5.11-rc7' of git://github.com/ojeda/linux: clang-format: Update with the latest for_each macro list commit a50ea34d6dd00a12c9cd29cf7b0fa72816bffbcb Author: Chunfeng Yun Date: Tue Feb 2 16:38:24 2021 +0800 usb: xhci-mtk: break loop when find the endpoint to drop No need to check the following endpoints after finding the endpoint wanted to drop. Fixes: 54f6a8af3722 ("usb: xhci-mtk: skip dropping bandwidth of unchecked endpoints") Cc: stable Reported-by: Ikjoon Jang Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1612255104-5363-1-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 7d36ccd4bd07825775b512f654566d3e89e9cfd0 Merge: 2e02677e961fd d17405d52bacd Author: Linus Torvalds Date: Tue Feb 2 10:40:20 2021 -0800 Merge tag 'dma-mapping-5.11-1' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping fix from Christoph Hellwig: "Fix a kernel crash in the new dma-mapping benchmark test (Barry Song)" * tag 'dma-mapping-5.11-1' of git://git.infradead.org/users/hch/dma-mapping: dma-mapping: benchmark: fix kernel crash when dma_map_single fails commit 2e02677e961fd4b96d8cf106b5979e6a3cdb7362 Merge: a9925628727bb 710eb8e32d047 Author: Linus Torvalds Date: Tue Feb 2 10:35:33 2021 -0800 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull vdpa fix from Michael Tsirkin: "A single mlx bugfix" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: vdpa/mlx5: Fix memory key MTT population commit a9925628727bbbfbd7263cf7c7791709af84296e Merge: 88bb507a74ea7 6c9f18f294c4a Author: Linus Torvalds Date: Tue Feb 2 10:26:09 2021 -0800 Merge tag 'net-5.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Networking fixes for 5.11-rc7, including fixes from bpf and mac80211 trees. Current release - regressions: - ip_tunnel: fix mtu calculation - mlx5: fix function calculation for page trees Previous releases - regressions: - vsock: fix the race conditions in multi-transport support - neighbour: prevent a dead entry from updating gc_list - dsa: mv88e6xxx: override existent unicast portvec in port_fdb_add Previous releases - always broken: - bpf, cgroup: two copy_{from,to}_user() warn_on_once splats for BPF cgroup getsockopt infra when user space is trying to race against optlen, from Loris Reiff. - bpf: add missing fput() in BPF inode storage map update helper - udp: ipv4: manipulate network header of NATed UDP GRO fraglist - mac80211: fix station rate table updates on assoc - r8169: work around RTL8125 UDP HW bug - igc: report speed and duplex as unknown when device is runtime suspended - rxrpc: fix deadlock around release of dst cached on udp tunnel" * tag 'net-5.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (36 commits) net: hsr: align sup_multicast_addr in struct hsr_priv to u16 boundary net: ipa: fix two format specifier errors net: ipa: use the right accessor in ipa_endpoint_status_skip() net: ipa: be explicit about endianness net: ipa: add a missing __iomem attribute net: ipa: pass correct dma_handle to dma_free_coherent() r8169: fix WoL on shutdown if CONFIG_DEBUG_SHIRQ is set net/rds: restrict iovecs length for RDS_CMSG_RDMA_ARGS net: mvpp2: TCAM entry enable should be written after SRAM data net: lapb: Copy the skb before sending a packet net/mlx5e: Release skb in case of failure in tc update skb net/mlx5e: Update max_opened_tc also when channels are closed net/mlx5: Fix leak upon failure of rule creation net/mlx5: Fix function calculation for page trees docs: networking: swap words in icmp_errors_use_inbound_ifaddr doc udp: ipv4: manipulate network header of NATed UDP GRO fraglist net: ip_tunnel: fix mtu calculation vsock: fix the race conditions in multi-transport support net: sched: replaced invalid qdisc tree flush helper in qdisc_replace ibmvnic: device remove has higher precedence over reset ... commit 22cd5edb2d9c6d68b6ac0fc9584104d88710fa57 Author: Catalin Marinas Date: Mon Feb 1 19:06:34 2021 +0000 arm64: Use simpler arithmetics for the linear map macros Because of the tagged addresses, the __is_lm_address() and __lm_to_phys() macros grew to some harder to understand bitwise operations using PAGE_OFFSET. Since these macros only accept untagged addresses, use a simple subtract operation. Signed-off-by: Catalin Marinas Acked-by: Ard Biesheuvel Cc: Will Deacon Cc: Mark Rutland Link: https://lore.kernel.org/r/20210201190634.22942-3-catalin.marinas@arm.com commit 91cb2c8b072e00632adf463b78b44f123d46a0fa Author: Catalin Marinas Date: Mon Feb 1 19:06:33 2021 +0000 arm64: Do not pass tagged addresses to __is_lm_address() Commit 519ea6f1c82f ("arm64: Fix kernel address detection of __is_lm_address()") fixed the incorrect validation of addresses below PAGE_OFFSET. However, it no longer allowed tagged addresses to be passed to virt_addr_valid(). Fix this by explicitly resetting the pointer tag prior to invoking __is_lm_address(). This is consistent with the __lm_to_phys() macro. Fixes: 519ea6f1c82f ("arm64: Fix kernel address detection of __is_lm_address()") Signed-off-by: Catalin Marinas Acked-by: Ard Biesheuvel Cc: # 5.4.x Cc: Will Deacon Cc: Vincenzo Frascino Cc: Mark Rutland Link: https://lore.kernel.org/r/20210201190634.22942-2-catalin.marinas@arm.com commit 943dea8af21bd896e0d6c30ea221203fb3cd3265 Author: Sean Christopherson Date: Tue Feb 2 08:55:46 2021 -0800 KVM: x86: Update emulator context mode if SYSENTER xfers to 64-bit mode Set the emulator context to PROT64 if SYSENTER transitions from 32-bit userspace (compat mode) to a 64-bit kernel, otherwise the RIP update at the end of x86_emulate_insn() will incorrectly truncate the new RIP. Note, this bug is mostly limited to running an Intel virtual CPU model on an AMD physical CPU, as other combinations of virtual and physical CPUs do not trigger full emulation. On Intel CPUs, SYSENTER in compatibility mode is legal, and unconditionally transitions to 64-bit mode. On AMD CPUs, SYSENTER is illegal in compatibility mode and #UDs. If the vCPU is AMD, KVM injects a #UD on SYSENTER in compat mode. If the pCPU is Intel, SYSENTER will execute natively and not trigger #UD->VM-Exit (ignoring guest TLB shenanigans). Fixes: fede8076aab4 ("KVM: x86: handle wrap around 32-bit address space") Cc: stable@vger.kernel.org Signed-off-by: Jonny Barker [sean: wrote changelog] Signed-off-by: Sean Christopherson Message-Id: <20210202165546.2390296-1-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 6c9f18f294c4a1a6d8b1097e39c325481664ee1c Author: Andreas Oetken Date: Tue Feb 2 10:03:04 2021 +0100 net: hsr: align sup_multicast_addr in struct hsr_priv to u16 boundary sup_multicast_addr is passed to ether_addr_equal for address comparison which casts the address inputs to u16 leading to an unaligned access. Aligning the sup_multicast_addr to u16 boundary fixes the issue. Signed-off-by: Andreas Oetken Link: https://lore.kernel.org/r/20210202090304.2740471-1-ennoerlangen@gmail.com Signed-off-by: Jakub Kicinski commit 5a4cb546753ddf8f8182b441755c53f3111c5804 Merge: f2539e14f31ed a34ffec8af8ff Author: Jakub Kicinski Date: Tue Feb 2 08:51:25 2021 -0800 Merge tag 'mlx5-fixes-2021-02-01' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5 fixes 2021-02-01 Please note the first patch in this series ("Fix function calculation for page trees") is fixing a regression due to previous fix in net which you didn't include in your previous rc pr. So I hope this series will make it into your next rc pr, so mlx5 won't be broken in the next rc. * tag 'mlx5-fixes-2021-02-01' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux: net/mlx5e: Release skb in case of failure in tc update skb net/mlx5e: Update max_opened_tc also when channels are closed net/mlx5: Fix leak upon failure of rule creation net/mlx5: Fix function calculation for page trees ==================== Link: https://lore.kernel.org/r/20210202070703.617251-1-saeed@kernel.org Signed-off-by: Jakub Kicinski commit f2539e14f31ed1f888f9e469a41c71e496de1702 Merge: 4ace7a6e287b7 113b6ea09ccd4 Author: Jakub Kicinski Date: Tue Feb 2 08:48:17 2021 -0800 Merge branch 'net-ipa-a-few-bug-fixes' Alex Elder says: ==================== net: ipa: a few bug fixes This series fixes four minor bugs. The first two are things that sparse points out. All four are very simple and each patch should explain itself pretty well. ==================== Link: https://lore.kernel.org/r/20210201232609.3524451-1-elder@linaro.org Signed-off-by: Jakub Kicinski commit 113b6ea09ccd46157d8d37fa9fabf1ca2315e503 Author: Alex Elder Date: Mon Feb 1 17:26:09 2021 -0600 net: ipa: fix two format specifier errors Fix two format specifiers that used %lu for a size_t in "ipa_mem.c". Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit c13899f187285eaa5bfc30f8692888ba2e7765cb Author: Alex Elder Date: Mon Feb 1 17:26:08 2021 -0600 net: ipa: use the right accessor in ipa_endpoint_status_skip() When extracting the destination endpoint ID from the status in ipa_endpoint_status_skip(), u32_get_bits() is used. This happens to work, but it's wrong: the structure field is only 8 bits wide instead of 32. Fix this by using u8_get_bits() to get the destination endpoint ID. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 088f8a2396d813e7ee49272a1a59b55139c81e64 Author: Alex Elder Date: Mon Feb 1 17:26:07 2021 -0600 net: ipa: be explicit about endianness Sparse warns that the assignment of the metadata mask for a QMAP endpoint in ipa_endpoint_init_hdr_metadata_mask() is a bad assignment. We know we want the mask value to be big endian, even though the value we write is in host byte order. Use a __force tag to indicate we really mean it. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit e6cdd6d80baedadb96d7060a509f51769e53021d Author: Alex Elder Date: Mon Feb 1 17:26:06 2021 -0600 net: ipa: add a missing __iomem attribute The virt local variable in gsi_channel_state() does not have an __iomem attribute but should. Fix this. Signed-off-by: Alex Elder Reviewed-by: Amy Parker Signed-off-by: Jakub Kicinski commit 4ace7a6e287b7e3b33276cd9fe870c326f880480 Author: Dan Carpenter Date: Tue Feb 2 08:55:25 2021 +0300 net: ipa: pass correct dma_handle to dma_free_coherent() The "ring->addr = addr;" assignment is done a few lines later so we can't use "ring->addr" yet. The correct dma_handle is "addr". Fixes: 650d1603825d ("soc: qcom: ipa: the generic software interface") Signed-off-by: Dan Carpenter Reviewed-by: Alex Elder Link: https://lore.kernel.org/r/YBjpTU2oejkNIULT@mwanda Signed-off-by: Jakub Kicinski commit cc9f07a838c4988ed244d0907cb71d54b85482a5 Author: Heiner Kallweit Date: Mon Feb 1 21:50:56 2021 +0100 r8169: fix WoL on shutdown if CONFIG_DEBUG_SHIRQ is set So far phy_disconnect() is called before free_irq(). If CONFIG_DEBUG_SHIRQ is set and interrupt is shared, then free_irq() creates an "artificial" interrupt by calling the interrupt handler. The "link change" flag is set in the interrupt status register, causing phylib to eventually call phy_suspend(). Because the net_device is detached from the PHY already, the PHY driver can't recognize that WoL is configured and powers down the PHY. Fixes: f1e911d5d0df ("r8169: add basic phylib support") Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/fe732c2c-a473-9088-3974-df83cfbd6efd@gmail.com Signed-off-by: Jakub Kicinski commit a11148e6fcce2ae53f47f0a442d098d860b4f7db Author: Sabyrzhan Tasbolatov Date: Tue Feb 2 02:32:33 2021 +0600 net/rds: restrict iovecs length for RDS_CMSG_RDMA_ARGS syzbot found WARNING in rds_rdma_extra_size [1] when RDS_CMSG_RDMA_ARGS control message is passed with user-controlled 0x40001 bytes of args->nr_local, causing order >= MAX_ORDER condition. The exact value 0x40001 can be checked with UIO_MAXIOV which is 0x400. So for kcalloc() 0x400 iovecs with sizeof(struct rds_iovec) = 0x10 is the closest limit, with 0x10 leftover. Same condition is currently done in rds_cmsg_rdma_args(). [1] WARNING: mm/page_alloc.c:5011 [..] Call Trace: alloc_pages_current+0x18c/0x2a0 mm/mempolicy.c:2267 alloc_pages include/linux/gfp.h:547 [inline] kmalloc_order+0x2e/0xb0 mm/slab_common.c:837 kmalloc_order_trace+0x14/0x120 mm/slab_common.c:853 kmalloc_array include/linux/slab.h:592 [inline] kcalloc include/linux/slab.h:621 [inline] rds_rdma_extra_size+0xb2/0x3b0 net/rds/rdma.c:568 rds_rm_size net/rds/send.c:928 [inline] Reported-by: syzbot+1bd2b07f93745fa38425@syzkaller.appspotmail.com Signed-off-by: Sabyrzhan Tasbolatov Acked-by: Santosh Shilimkar Link: https://lore.kernel.org/r/20210201203233.1324704-1-snovitoll@gmail.com Signed-off-by: Jakub Kicinski commit 43f4a20a1266d393840ce010f547486d14cc0071 Author: Stefan Chulski Date: Mon Feb 1 11:35:39 2021 +0200 net: mvpp2: TCAM entry enable should be written after SRAM data Last TCAM data contains TCAM enable bit. It should be written after SRAM data before entry enabled. Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network unit") Signed-off-by: Stefan Chulski Link: https://lore.kernel.org/r/1612172139-28343-1-git-send-email-stefanc@marvell.com Signed-off-by: Jakub Kicinski commit 6102f9e700bb3fee2f37756514885e7b14a70ef6 Merge: e2fc2de8e1aac 2672b94d730c4 Author: Arnd Bergmann Date: Tue Feb 2 17:42:26 2021 +0100 Merge tag 'ti-k3-maintainer-for-v5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/nmenon/linux into arm/fixes Maintainer changes for TI for v5.12 merge window: - Tero switches to kernel.org address * tag 'ti-k3-maintainer-for-v5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/nmenon/linux: MAINTAINERS: Update my email address and maintainer level status Link: https://lore.kernel.org/r/20210130131411.afna4wj72r7xscqn@skinny Signed-off-by: Arnd Bergmann commit 88c7a9fd9bdd3e453f04018920964c6f848a591a Author: Xie He Date: Sun Jan 31 21:57:06 2021 -0800 net: lapb: Copy the skb before sending a packet When sending a packet, we will prepend it with an LAPB header. This modifies the shared parts of a cloned skb, so we should copy the skb rather than just clone it, before we prepend the header. In "Documentation/networking/driver.rst" (the 2nd point), it states that drivers shouldn't modify the shared parts of a cloned skb when transmitting. The "dev_queue_xmit_nit" function in "net/core/dev.c", which is called when an skb is being sent, clones the skb and sents the clone to AF_PACKET sockets. Because the LAPB drivers first remove a 1-byte pseudo-header before handing over the skb to us, if we don't copy the skb before prepending the LAPB header, the first byte of the packets received on AF_PACKET sockets can be corrupted. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Xie He Acked-by: Martin Schiller Link: https://lore.kernel.org/r/20210201055706.415842-1-xie.he.0141@gmail.com Signed-off-by: Jakub Kicinski commit f418bad6ccfa6f0ef6ebc783ba72bb9c5738574f Merge: 188fa104f2ba9 50af06d43eab6 Author: Jakub Kicinski Date: Tue Feb 2 08:37:00 2021 -0800 Merge tag 'mac80211-for-net-2021-02-02' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== Two fixes: - station rate tables were not updated correctly after association, leading to bad configuration - rtl8723bs (staging) was initializing data incorrectly after the previous fix and needed to move the init later * tag 'mac80211-for-net-2021-02-02' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211: staging: rtl8723bs: Move wiphy setup to after reading the regulatory settings from the chip mac80211: fix station rate table updates on assoc ==================== Link: https://lore.kernel.org/r/20210202143505.37610-1-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski commit facd93f4285c405f9a91b05166147cb39e860666 Author: Maxime Ripard Date: Fri Jan 29 17:06:47 2021 +0100 drm/vc4: hvs: Fix buffer overflow with the dlist handling Commit 0a038c1c29a7 ("drm/vc4: Move LBM creation out of vc4_plane_mode_set()") changed the LBM allocation logic from first allocating the LBM memory for the plane to running mode_set, adding a gap in the LBM, and then running the dlist allocation filling that gap. The gap was introduced by incrementing the dlist array index, but was never checking whether or not we were over the array length, leading eventually to memory corruptions if we ever crossed this limit. vc4_dlist_write had that logic though, and was reallocating a larger dlist array when reaching the end of the buffer. Let's share the logic between both functions. Cc: Boris Brezillon Cc: Eric Anholt Fixes: 0a038c1c29a7 ("drm/vc4: Move LBM creation out of vc4_plane_mode_set()") Signed-off-by: Maxime Ripard Acked-by: Thomas Zimmermann Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/20210129160647.128373-1-maxime@cerno.tech commit 88ebe1f572e284ecfe088648e0ae93803a75a459 Author: Imre Deak Date: Tue Dec 29 19:22:01 2020 +0200 drm/i915/dp: Fix LTTPR vswing/pre-emp setting in non-transparent mode The DP PHY vswing/pre-emphasis level programming the driver does is related to the DPTX -> first LTTPR link segment only. Accordingly it should be only programmed when link training the first LTTPR and kept as-is when training subsequent LTTPRs and the DPRX. For these latter PHYs the vs/pe levels will be set in response to writing the DP_TRAINING_LANEx_SET_PHY_REPEATERy DPCD registers (by an upstream LTTPR TX PHY snooping this write access of its downstream LTTPR/DPRX RX PHY). The above is also described in DP Standard v2.0 under 3.6.6.1. While at it simplify and add the LTTPR that is link trained to the debug message in intel_dp_set_signal_levels(). Fixes: b30edfd8d0b4 ("drm/i915: Switch to LTTPR non-transparent mode link training") Cc: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201229172201.4155327-2-imre.deak@intel.com (cherry picked from commit 67fba3f1c73b83569d171ae1fa463a537bbfe0a8) Signed-off-by: Jani Nikula commit 2051c890caa50f9d8658335cb9d39bfcb5680a7e Author: Imre Deak Date: Tue Dec 29 19:22:00 2020 +0200 drm/i915/dp: Move intel_dp_set_signal_levels() to intel_dp_link_training.c intel_dp_set_signal_levels() is needed for link training, so move it to intel_dp_link_training.c. Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201229172201.4155327-1-imre.deak@intel.com (cherry picked from commit 1c6e527d6947ea77bebabe15bbeaa765a87b70ca) Signed-off-by: Jani Nikula commit 882554042d138dbc6fb1a43017d0b9c3b38ee5f5 Author: Imre Deak Date: Mon Jan 25 19:36:36 2021 +0200 drm/i915: Fix the MST PBN divider calculation Atm the driver will calculate a wrong MST timeslots/MTP (aka time unit) value for MST streams if the link parameters (link rate or lane count) are limited in a way independent of the sink capabilities (reported by DPCD). One example of such a limitation is when a MUX between the sink and source connects only a limited number of lanes to the display and connects the rest of the lanes to other peripherals (USB). Another issue is that atm MST core calculates the divider based on the backwards compatible DPCD (at address 0x0000) vs. the extended capability info (at address 0x2200). This can result in leaving some part of the MST BW unused (For instance in case of the WD19TB dock). Fix the above two issues by calculating the PBN divider value based on the rate and lane count link parameters that the driver uses for all other computation. Bugzilla: https://gitlab.freedesktop.org/drm/intel/-/issues/2977 Cc: Lyude Paul Cc: Ville Syrjala Cc: Signed-off-by: Imre Deak Reviewed-by: Ville Syrjala Link: https://patchwork.freedesktop.org/patch/msgid/20210125173636.1733812-2-imre.deak@intel.com (cherry picked from commit b59c27cab257cfbff939615a87b72bce83925710) Signed-off-by: Jani Nikula commit 83404d581471775f37f85e5261ec0d09407d8bed Author: Imre Deak Date: Mon Jan 25 19:36:35 2021 +0200 drm/dp/mst: Export drm_dp_get_vc_payload_bw() This function will be needed by the next patch where the driver calculates the BW based on driver specific parameters, so export it. At the same time sanitize the function params, passing the more natural link rate instead of the encoding of the same rate. v2: - Fix function documentation. (Lyude) Cc: Lyude Paul Cc: Ville Syrjala Cc: Cc: dri-devel@lists.freedesktop.org Signed-off-by: Imre Deak Reviewed-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20210125173636.1733812-1-imre.deak@intel.com (cherry picked from commit a321fc2b4e60fc1b39517d26c8104351636a6062) Signed-off-by: Jani Nikula commit 4c9fb5d9140802db4db9f66c23887f43174e113c Author: Joerg Roedel Date: Tue Feb 2 15:54:19 2021 +0100 iommu: Check dev->iommu in dev_iommu_priv_get() before dereferencing it The dev_iommu_priv_get() needs a similar check to dev_iommu_fwspec_get() to make sure no NULL-ptr is dereferenced. Fixes: 05a0542b456e1 ("iommu/amd: Store dev_data as device iommu private data") Cc: stable@vger.kernel.org # v5.8+ Link: https://lore.kernel.org/r/20210202145419.29143-1-joro@8bytes.org Reference: https://bugzilla.kernel.org/show_bug.cgi?id=211241 Signed-off-by: Joerg Roedel commit c8b186a8d54d7e12d28e9f9686cb00ff18fc2ab2 Author: Alexey Kardashevskiy Date: Tue Feb 2 18:23:26 2021 +1100 tracepoint: Fix race between tracing and removing tracepoint When executing a tracepoint, the tracepoint's func is dereferenced twice - in __DO_TRACE() (where the returned pointer is checked) and later on in __traceiter_##_name where the returned pointer is dereferenced without checking which leads to races against tracepoint_removal_sync() and crashes. This adds a check before referencing the pointer in tracepoint_ptr_deref. Link: https://lkml.kernel.org/r/20210202072326.120557-1-aik@ozlabs.ru Cc: stable@vger.kernel.org Fixes: d25e37d89dd2f ("tracepoint: Optimize using static_call()") Acked-by: Peter Zijlstra (Intel) Signed-off-by: Alexey Kardashevskiy Signed-off-by: Steven Rostedt (VMware) commit 761c70a52586a9214b29026d384d2c01b73661a8 Author: Chris Wilson Date: Mon Jan 25 13:21:58 2021 +0000 drm/i915/gem: Drop lru bumping on display unpinning Simplify the frontbuffer unpin by removing the lock requirement. The LRU bumping was primarily to protect the GTT from being evicted and from frontbuffers being eagerly shrunk. Now we protect frontbuffers from the shrinker, and we avoid accidentally evicting from the GTT, so the benefit from bumping LRU is no more, and we can save more time by not. Reported-and-tested-by: Matti Hämäläinen Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2905 Fixes: c1793ba86a41 ("drm/i915: Add ww locking to pin_to_display_plane, v2.") Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210119214336.1463-6-chris@chris-wilson.co.uk (cherry picked from commit 14ca83eece9565a2d2177291ceb122982dc38420) Cc: Joonas Lahtinen Cc: Jani Nikula Cc: # v5.10+ Signed-off-by: Jani Nikula commit e4747cb3ec3c232d65c84cbe77633abd5871fda3 Author: Chris Wilson Date: Tue Jan 19 16:20:57 2021 +0000 drm/i915/gt: Close race between enable_breadcrumbs and cancel_breadcrumbs If we enable_breadcrumbs for a request while that request is being removed from HW; we may see that the request is active as we take the ce->signal_lock and proceed to attach the request to ce->signals. However, during unsubmission after marking the request as inactive, we see that the request has not yet been added to ce->signals and so skip the removal. Pull the check during cancel_breadcrumbs under the same spinlock as enabling so that we the two tests are consistent in enable/cancel. Otherwise, we may insert a request onto ce->signals that we expect should not be there: intel_context_remove_breadcrumbs:488 GEM_BUG_ON(!__i915_request_is_complete(rq)) While updating, we can note that we are always called with irqs-disabled, due to the engine->active.lock being held at the single caller, and so remove the irqsave/restore making it symmetric to enable_breadcrumbs. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2931 Fixes: c18636f76344 ("drm/i915: Remove requirement for holding i915_request.lock for breadcrumbs") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Andi Shyti Cc: # v5.10+ Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20210119162057.31097-1-chris@chris-wilson.co.uk (cherry picked from commit e7004ea4f5f528f5a5018f0b70cab36d25315498) Signed-off-by: Jani Nikula commit 9f5dc9974298aea9690c7a0f7007f1af37198230 Author: Chris Wilson Date: Thu Nov 26 14:04:07 2020 +0000 drm/i915/gt: Move the breadcrumb to the signaler if completed upon cancel If while we are cancelling the breadcrumb signaling, we find that the request is already completed, move it to the irq signaler and let it be signaled. v2: Tweak reference counting so that we only acquire a new reference on adding to a signal list, as opposed to a hidden i915_request_put of the caller's reference. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20201126140407.31952-5-chris@chris-wilson.co.uk (cherry picked from commit 85cc2917a3965a3a747a6407d6e3028cfeb1534e) Signed-off-by: Jani Nikula commit 24321ac668e452a4942598533d267805f291fdc9 Author: Raoni Fassina Firmino Date: Mon Feb 1 17:05:05 2021 -0300 powerpc/64/signal: Fix regression in __kernel_sigtramp_rt64() semantics Commit 0138ba5783ae ("powerpc/64/signal: Balance return predictor stack in signal trampoline") changed __kernel_sigtramp_rt64() VDSO and trampoline code, and introduced a regression in the way glibc's backtrace()[1] detects the signal-handler stack frame. Apart from the practical implications, __kernel_sigtramp_rt64() was a VDSO function with the semantics that it is a function you can call from userspace to end a signal handling. Now this semantics are no longer valid. I believe the aforementioned change affects all releases since 5.9. This patch tries to fix both the semantics and practical aspect of __kernel_sigtramp_rt64() returning it to the previous code, whilst keeping the intended behaviour of 0138ba5783ae by adding a new symbol to serve as the jump target from the kernel to the trampoline. Now the trampoline has two parts, a new entry point and the old return point. [1] https://lists.ozlabs.org/pipermail/linuxppc-dev/2021-January/223194.html Fixes: 0138ba5783ae ("powerpc/64/signal: Balance return predictor stack in signal trampoline") Cc: stable@vger.kernel.org # v5.9+ Signed-off-by: Raoni Fassina Firmino Acked-by: Nicholas Piggin [mpe: Minor tweaks to change log formatting, add stable tag] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210201200505.iz46ubcizipnkcxe@work-tp commit 00f9a08fbc3c703b71842a5425c1eb82053c8a70 Author: Andres Calderon Jaramillo Date: Tue Feb 2 10:45:53 2021 +0200 drm/i915/display: Prevent double YUV range correction on HDR planes Prevent the ICL HDR plane pipeline from performing YUV color range correction twice when the input is in limited range. This is done by removing the limited-range code from icl_program_input_csc(). Before this patch the following could happen: user space gives us a YUV buffer in limited range; per the pipeline in [1], the plane would first go through a "YUV Range correct" stage that expands the range; the plane would then go through the "Input CSC" stage which would also expand the range because icl_program_input_csc() would use a matrix and an offset that assume limited-range input; this would ultimately cause dark and light colors to appear darker and lighter than they should respectively. This is an issue because if a buffer switches between being scanned out and being composited with the GPU, the user will see a color difference. If this switching happens quickly and frequently, the user will perceive this as a flickering. [1] https://01.org/sites/default/files/documentation/intel-gfx-prm-osrc-icllp-vol12-displayengine_0.pdf#page=281 Cc: stable@vger.kernel.org Signed-off-by: Andres Calderon Jaramillo Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201215224219.3896256-1-andrescj@google.com (cherry picked from commit fed387572040e84ead53852a7820e30a30e515d0) Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210202084553.30691-1-ville.syrjala@linux.intel.com commit 46121fa7c2dc55bcbb729b6a2ab323aa1e8986cf Author: Keith Busch Date: Mon Feb 1 11:48:44 2021 -0800 update the email address for Keith Bush Redirect my older email addresses that are in the git logs. Signed-off-by: Keith Busch Signed-off-by: Christoph Hellwig commit c9e95c39280530200cdd0bbd2670e6334a81970b Author: Claus Stovgaard Date: Mon Feb 1 22:08:22 2021 +0100 nvme-pci: ignore the subsysem NQN on Phison E16 Tested both with Corsairs firmware 11.3 and 13.0 for the Corsairs MP600 and both have the issue as reported by the kernel. nvme nvme0: missing or invalid SUBNQN field. Signed-off-by: Claus Stovgaard Signed-off-by: Christoph Hellwig commit 538e4a8c571efdf131834431e0c14808bcfb1004 Author: Thorsten Leemhuis Date: Fri Jan 29 06:24:42 2021 +0100 nvme-pci: avoid the deepest sleep state on Kingston A2000 SSDs Some Kingston A2000 NVMe SSDs sooner or later get confused and stop working when they use the deepest APST sleep while running Linux. The system then crashes and one has to cold boot it to get the SSD working again. Kingston seems to known about this since at least mid-September 2020: https://bbs.archlinux.org/viewtopic.php?pid=1926994#p1926994 Someone working for a German company representing Kingston to the German press confirmed to me Kingston engineering is aware of the issue and investigating; the person stated that to their current knowledge only the deepest APST sleep state causes trouble. Therefore, make Linux avoid it for now by applying the NVME_QUIRK_NO_DEEPEST_PS to this SSD. I have two such SSDs, but it seems the problem doesn't occur with them. I hence couldn't verify if this patch really fixes the problem, but all the data in front of me suggests it should. This patch can easily be reverted or improved upon if a better solution surfaces. FWIW, there are many reports about the issue scattered around the web; most of the users disabled APST completely to make things work, some just made Linux avoid the deepest sleep state: https://bugzilla.kernel.org/show_bug.cgi?id=195039#c65 https://bugzilla.kernel.org/show_bug.cgi?id=195039#c73 https://bugzilla.kernel.org/show_bug.cgi?id=195039#c74 https://bugzilla.kernel.org/show_bug.cgi?id=195039#c78 https://bugzilla.kernel.org/show_bug.cgi?id=195039#c79 https://bugzilla.kernel.org/show_bug.cgi?id=195039#c80 https://askubuntu.com/questions/1222049/nvmekingston-a2000-sometimes-stops-giving-response-in-ubuntu-18-04dell-inspir https://community.acer.com/en/discussion/604326/m-2-nvme-ssd-aspire-517-51g-issue-compatibility-kingston-a2000-linux-ubuntu For the record, some data from 'nvme id-ctrl /dev/nvme0' NVME Identify Controller: vid : 0x2646 ssvid : 0x2646 mn : KINGSTON SA2000M81000G fr : S5Z42105 [...] ps 0 : mp:9.00W operational enlat:0 exlat:0 rrt:0 rrl:0 rwt:0 rwl:0 idle_power:- active_power:- ps 1 : mp:4.60W operational enlat:0 exlat:0 rrt:1 rrl:1 rwt:1 rwl:1 idle_power:- active_power:- ps 2 : mp:3.80W operational enlat:0 exlat:0 rrt:2 rrl:2 rwt:2 rwl:2 idle_power:- active_power:- ps 3 : mp:0.0450W non-operational enlat:2000 exlat:2000 rrt:3 rrl:3 rwt:3 rwl:3 idle_power:- active_power:- ps 4 : mp:0.0040W non-operational enlat:15000 exlat:15000 rrt:4 rrl:4 rwt:4 rwl:4 idle_power:- active_power:- Cc: stable@vger.kernel.org # 4.14+ Signed-off-by: Thorsten Leemhuis Signed-off-by: Christoph Hellwig commit fad9bae9ee5d578afbe6380c82e4715efaddf118 Author: Ville Syrjälä Date: Thu Jan 28 17:59:46 2021 +0200 drm/i915: Power up combo PHY lanes for for HDMI as well Currently we only explicitly power up the combo PHY lanes for DP. The spec says we should do it for HDMI as well. Cc: stable@vger.kernel.org Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210128155948.13678-3-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak (cherry picked from commit 1e0cb7bef35f0d1aed383bf69a209df218b807c9) Signed-off-by: Jani Nikula commit 425cbd1fce10d4d68188123404d1a302a6939e0a Author: Ville Syrjälä Date: Thu Jan 28 17:59:45 2021 +0200 drm/i915: Extract intel_ddi_power_up_lanes() Reduce the copypasta by pulling the combo PHY lane power up stuff into a helper. We'll have a third user soon. Cc: stable@vger.kernel.org Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210128155948.13678-2-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak (cherry picked from commit 5cdf706fb91a6e4e6af799bb957c4d598e6a067b) Signed-off-by: Jani Nikula commit eaf5bfe37db871031232d2bf2535b6ca92afbad8 Author: Ville Syrjälä Date: Thu Jan 28 17:59:44 2021 +0200 drm/i915: Skip vswing programming for TBT In thunderbolt mode the PHY is owned by the thunderbolt controller. We are not supposed to touch it. So skip the vswing programming as well (we already skipped the other steps not applicable to TBT). Touching this stuff could supposedly interfere with the PHY programming done by the thunderbolt controller. Cc: stable@vger.kernel.org Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210128155948.13678-1-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak (cherry picked from commit f8c6b615b921d8a1bcd74870f9105e62b0bceff3) Signed-off-by: Jani Nikula commit a34ffec8af8ff1c730697a99e09ec7b74a3423b6 Author: Maor Dickman Date: Sun Jan 31 18:47:15 2021 +0200 net/mlx5e: Release skb in case of failure in tc update skb In case of failure in tc update skb the packet is dropped without freeing the skb. Fixed by freeing the skb in case failure in tc update skb. Fixes: d6d27782864f ("net/mlx5: E-Switch, Restore chain id on miss") Fixes: c75690972228 ("net/mlx5e: Add tc chains offload support for nic flows") Signed-off-by: Maor Dickman Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 5a2ba25a55c4dc0f143567c99aede768b6628ebd Author: Maxim Mikityanskiy Date: Thu Jan 28 14:37:59 2021 +0200 net/mlx5e: Update max_opened_tc also when channels are closed max_opened_tc is used for stats, so that potentially non-zero stats won't disappear when num_tc decreases. However, mlx5e_setup_tc_mqprio fails to update it in the flow where channels are closed. This commit fixes it. The new value of priv->channels.params.num_tc is always checked on exit. In case of errors it will just be the old value, and in case of success it will be the updated value. Fixes: 05909babce53 ("net/mlx5e: Avoid reset netdev stats on configuration changes") Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit a5bfe6b4675e0eefbd9418055b5cc6e89af27eb4 Author: Maor Gottlieb Date: Wed Jan 20 17:41:18 2021 +0200 net/mlx5: Fix leak upon failure of rule creation When creation of a new rule that requires allocation of an FTE fails, need to call to tree_put_node on the FTE in order to release its' resource. Fixes: cefc23554fc2 ("net/mlx5: Fix FTE cleanup") Signed-off-by: Maor Gottlieb Reviewed-by: Alaa Hleihel Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit ed5e83a3c02948dad9dc4e68fb4e535baa5da630 Author: Daniel Jurgens Date: Mon Feb 1 18:11:10 2021 +0200 net/mlx5: Fix function calculation for page trees The function calculation always results in a value of 0. This works generally, but when the release all pages feature is enabled it will result in crashes. Fixes: 0aa128475d33 ("net/mlx5: Maintain separate page trees for ECPF and PF functions") Signed-off-by: Daniel Jurgens Reported-by: Colin Ian King Signed-off-by: Saeed Mahameed commit 8d8d1dbefc423d42d626cf5b81aac214870ebaab Author: Gustavo A. R. Silva Date: Mon Feb 1 20:36:54 2021 -0600 smb3: Fix out-of-bounds bug in SMB2_negotiate() While addressing some warnings generated by -Warray-bounds, I found this bug that was introduced back in 2017: CC [M] fs/cifs/smb2pdu.o fs/cifs/smb2pdu.c: In function ‘SMB2_negotiate’: fs/cifs/smb2pdu.c:822:16: warning: array subscript 1 is above array bounds of ‘__le16[1]’ {aka ‘short unsigned int[1]’} [-Warray-bounds] 822 | req->Dialects[1] = cpu_to_le16(SMB30_PROT_ID); | ~~~~~~~~~~~~~^~~ fs/cifs/smb2pdu.c:823:16: warning: array subscript 2 is above array bounds of ‘__le16[1]’ {aka ‘short unsigned int[1]’} [-Warray-bounds] 823 | req->Dialects[2] = cpu_to_le16(SMB302_PROT_ID); | ~~~~~~~~~~~~~^~~ fs/cifs/smb2pdu.c:824:16: warning: array subscript 3 is above array bounds of ‘__le16[1]’ {aka ‘short unsigned int[1]’} [-Warray-bounds] 824 | req->Dialects[3] = cpu_to_le16(SMB311_PROT_ID); | ~~~~~~~~~~~~~^~~ fs/cifs/smb2pdu.c:816:16: warning: array subscript 1 is above array bounds of ‘__le16[1]’ {aka ‘short unsigned int[1]’} [-Warray-bounds] 816 | req->Dialects[1] = cpu_to_le16(SMB302_PROT_ID); | ~~~~~~~~~~~~~^~~ At the time, the size of array _Dialects_ was changed from 1 to 3 in struct validate_negotiate_info_req, and then in 2019 it was changed from 3 to 4, but those changes were never made in struct smb2_negotiate_req, which has led to a 3 and a half years old out-of-bounds bug in function SMB2_negotiate() (fs/cifs/smb2pdu.c). Fix this by increasing the size of array _Dialects_ in struct smb2_negotiate_req to 4. Fixes: 9764c02fcbad ("SMB3: Add support for multidialect negotiate (SMB2.1 and later)") Fixes: d5c7076b772a ("smb3: add smb3.1.1 to default dialect list") Cc: stable@vger.kernel.org Signed-off-by: Gustavo A. R. Silva Signed-off-by: Steve French commit 188fa104f2ba93887777ded2e600ce16d60bc3d7 Merge: 3162820154554 f559a356043a5 Author: Jakub Kicinski Date: Mon Feb 1 20:23:44 2021 -0800 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2021-02-01 This series contains updates to igc and i40e drivers. Kai-Heng Feng fixes igc to report unknown speed and duplex during suspend as an attempted read will cause errors. Kevin Lo sets the default value to -IGC_ERR_NVM instead of success for writing shadow RAM as this could miss a timeout. Also propagates the return value for Flow Control configuration to properly pass on errors for igc. Aleksandr reverts commit 2ad1274fa35a ("i40e: don't report link up for a VF who hasn't enabled queues") as this can cause link flapping. * '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: i40e: Revert "i40e: don't report link up for a VF who hasn't enabled queues" igc: check return value of ret_val in igc_config_fc_after_link_up igc: set the default return value to -IGC_ERR_NVM in igc_write_nvm_srwr igc: Report speed and duplex as unknown when device is runtime suspended ==================== Link: https://lore.kernel.org/r/20210201214618.852831-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 31628201545548e1ef167f2c55eb6fd7d3562f12 Author: Vincent Bernat Date: Sat Jan 30 20:05:18 2021 +0100 docs: networking: swap words in icmp_errors_use_inbound_ifaddr doc Signed-off-by: Vincent Bernat Link: https://lore.kernel.org/r/20210130190518.854806-1-vincent@bernat.ch Signed-off-by: Jakub Kicinski commit c3df39ac9b0e3747bf8233ea9ce4ed5ceb3199d3 Author: Dongseok Yi Date: Sat Jan 30 08:13:27 2021 +0900 udp: ipv4: manipulate network header of NATed UDP GRO fraglist UDP/IP header of UDP GROed frag_skbs are not updated even after NAT forwarding. Only the header of head_skb from ip_finish_output_gso -> skb_gso_segment is updated but following frag_skbs are not updated. A call path skb_mac_gso_segment -> inet_gso_segment -> udp4_ufo_fragment -> __udp_gso_segment -> __udp_gso_segment_list does not try to update UDP/IP header of the segment list but copy only the MAC header. Update port, addr and check of each skb of the segment list in __udp_gso_segment_list. It covers both SNAT and DNAT. Fixes: 9fd1ff5d2ac7 (udp: Support UDP fraglist GRO/GSO.) Signed-off-by: Dongseok Yi Acked-by: Steffen Klassert Link: https://lore.kernel.org/r/1611962007-80092-1-git-send-email-dseok.yi@samsung.com Signed-off-by: Jakub Kicinski commit 28e104d00281ade30250b24e098bf50887671ea4 Author: Vadim Fedorenko Date: Sat Jan 30 01:27:47 2021 +0300 net: ip_tunnel: fix mtu calculation dev->hard_header_len for tunnel interface is set only when header_ops are set too and already contains full overhead of any tunnel encapsulation. That's why there is not need to use this overhead twice in mtu calc. Fixes: fdafed459998 ("ip_gre: set dev->hard_header_len and dev->needed_headroom properly") Reported-by: Slava Bacherikov Signed-off-by: Vadim Fedorenko Link: https://lore.kernel.org/r/1611959267-20536-1-git-send-email-vfedorenko@novek.ru Signed-off-by: Jakub Kicinski commit c518adafa39f37858697ac9309c6cf1805581446 Author: Alexander Popov Date: Mon Feb 1 11:47:19 2021 +0300 vsock: fix the race conditions in multi-transport support There are multiple similar bugs implicitly introduced by the commit c0cfa2d8a788fcf4 ("vsock: add multi-transports support") and commit 6a2c0962105ae8ce ("vsock: prevent transport modules unloading"). The bug pattern: [1] vsock_sock.transport pointer is copied to a local variable, [2] lock_sock() is called, [3] the local variable is used. VSOCK multi-transport support introduced the race condition: vsock_sock.transport value may change between [1] and [2]. Let's copy vsock_sock.transport pointer to local variables after the lock_sock() call. Fixes: c0cfa2d8a788fcf4 ("vsock: add multi-transports support") Signed-off-by: Alexander Popov Reviewed-by: Stefano Garzarella Reviewed-by: Jorgen Hansen Link: https://lore.kernel.org/r/20210201084719.2257066-1-alex.popov@linux.com Signed-off-by: Jakub Kicinski commit 938e0fcd3253efdef8924714158911286d08cfe1 Author: Alexander Ovechkin Date: Mon Feb 1 23:00:49 2021 +0300 net: sched: replaced invalid qdisc tree flush helper in qdisc_replace Commit e5f0e8f8e456 ("net: sched: introduce and use qdisc tree flush/purge helpers") introduced qdisc tree flush/purge helpers, but erroneously used flush helper instead of purge helper in qdisc_replace function. This issue was found in our CI, that tests various qdisc setups by configuring qdisc and sending data through it. Call of invalid helper sporadically leads to corruption of vt_tree/cf_tree of hfsc_class that causes kernel oops: Oops: 0000 [#1] SMP PTI CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.11.0-8f6859df #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.2-0-g5f4c7b1-prebuilt.qemu-project.org 04/01/2014 RIP: 0010:rb_insert_color+0x18/0x190 Code: c3 31 c0 c3 0f 1f 40 00 66 2e 0f 1f 84 00 00 00 00 00 48 8b 07 48 85 c0 0f 84 05 01 00 00 48 8b 10 f6 c2 01 0f 85 34 01 00 00 <48> 8b 4a 08 49 89 d0 48 39 c1 74 7d 48 85 c9 74 32 f6 01 01 75 2d RSP: 0018:ffffc900000b8bb0 EFLAGS: 00010246 RAX: ffff8881ef4c38b0 RBX: ffff8881d956e400 RCX: ffff8881ef4c38b0 RDX: 0000000000000000 RSI: ffff8881d956f0a8 RDI: ffff8881d956e4b0 RBP: 0000000000000000 R08: 000000d5c4e249da R09: 1600000000000000 R10: ffffc900000b8be0 R11: ffffc900000b8b28 R12: 0000000000000001 R13: 000000000000005a R14: ffff8881f0905000 R15: ffff8881f0387d00 FS: 0000000000000000(0000) GS:ffff8881f8b00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000008 CR3: 00000001f4796004 CR4: 0000000000060ee0 Call Trace: init_vf.isra.19+0xec/0x250 [sch_hfsc] hfsc_enqueue+0x245/0x300 [sch_hfsc] ? fib_rules_lookup+0x12a/0x1d0 ? __dev_queue_xmit+0x4b6/0x930 ? hfsc_delete_class+0x250/0x250 [sch_hfsc] __dev_queue_xmit+0x4b6/0x930 ? ip6_finish_output2+0x24d/0x590 ip6_finish_output2+0x24d/0x590 ? ip6_output+0x6c/0x130 ip6_output+0x6c/0x130 ? __ip6_finish_output+0x110/0x110 mld_sendpack+0x224/0x230 mld_ifc_timer_expire+0x186/0x2c0 ? igmp6_group_dropped+0x200/0x200 call_timer_fn+0x2d/0x150 run_timer_softirq+0x20c/0x480 ? tick_sched_do_timer+0x60/0x60 ? tick_sched_timer+0x37/0x70 __do_softirq+0xf7/0x2cb irq_exit+0xa0/0xb0 smp_apic_timer_interrupt+0x74/0x150 apic_timer_interrupt+0xf/0x20 Fixes: e5f0e8f8e456 ("net: sched: introduce and use qdisc tree flush/purge helpers") Signed-off-by: Alexander Ovechkin Reported-by: Alexander Kuznetsov Acked-by: Dmitry Monakhov Acked-by: Dmitry Yakunin Acked-by: Cong Wang Link: https://lore.kernel.org/r/20210201200049.299153-1-ovov@yandex-team.ru Signed-off-by: Jakub Kicinski commit 5e9eff5dfa460cd1a74b7c1fde4fced7c04383af Author: Lijun Pan Date: Thu Jan 28 22:34:01 2021 -0600 ibmvnic: device remove has higher precedence over reset Returning -EBUSY in ibmvnic_remove() does not actually hold the removal procedure since driver core doesn't care for the return value (see __device_release_driver() in drivers/base/dd.c calling dev->bus->remove()) though vio_bus_remove (in arch/powerpc/platforms/pseries/vio.c) records the return value and passes it on. [1] During the device removal precedure, checking for resetting bit is dropped so that we can continue executing all the cleanup calls in the rest of the remove function. Otherwise, it can cause latent memory leaks and kernel crashes. [1] https://lore.kernel.org/linuxppc-dev/20210117101242.dpwayq6wdgfdzirl@pengutronix.de/T/#m48f5befd96bc9842ece2a3ad14f4c27747206a53 Reported-by: Uwe Kleine-König Fixes: 7d7195a026ba ("ibmvnic: Do not process device remove during device reset") Signed-off-by: Lijun Pan Link: https://lore.kernel.org/r/20210129043402.95744-1-ljp@linux.ibm.com Signed-off-by: Jakub Kicinski commit f72f2fb8fb6be095b98af5d740ac50cffd0b0cae Author: DENG Qingfang Date: Sat Jan 30 21:43:34 2021 +0800 net: dsa: mv88e6xxx: override existent unicast portvec in port_fdb_add Having multiple destination ports for a unicast address does not make sense. Make port_db_load_purge override existent unicast portvec instead of adding a new port bit. Fixes: 884729399260 ("net: dsa: mv88e6xxx: handle multiple ports in ATU") Signed-off-by: DENG Qingfang Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/20210130134334.10243-1-dqfext@gmail.com Signed-off-by: Jakub Kicinski commit 7018c897c2f243d4b5f1b94bc6b4831a7eab80fb Author: Dan Williams Date: Mon Feb 1 16:20:40 2021 -0800 libnvdimm/dimm: Avoid race between probe and available_slots_show() Richard reports that the following test: (while true; do cat /sys/bus/nd/devices/nmem*/available_slots 2>&1 > /dev/null done) & while true; do for i in $(seq 0 4); do echo nmem$i > /sys/bus/nd/drivers/nvdimm/bind done for i in $(seq 0 4); do echo nmem$i > /sys/bus/nd/drivers/nvdimm/unbind done done ...fails with a crash signature like: divide error: 0000 [#1] SMP KASAN PTI RIP: 0010:nd_label_nfree+0x134/0x1a0 [libnvdimm] [..] Call Trace: available_slots_show+0x4e/0x120 [libnvdimm] dev_attr_show+0x42/0x80 ? memset+0x20/0x40 sysfs_kf_seq_show+0x218/0x410 The root cause is that available_slots_show() consults driver-data, but fails to synchronize against device-unbind setting up a TOCTOU race to access uninitialized memory. Validate driver-data under the device-lock. Fixes: 4d88a97aa9e8 ("libnvdimm, nvdimm: dimm driver and base libnvdimm device-driver infrastructure") Cc: Cc: Vishal Verma Cc: Dave Jiang Cc: Ira Weiny Cc: Coly Li Reported-by: Richard Palethorpe Acked-by: Richard Palethorpe Signed-off-by: Dan Williams commit f559a356043a55bab25a4c00505ea65c50a956fb Author: Aleksandr Loktionov Date: Sat Jan 23 00:22:23 2021 +0000 i40e: Revert "i40e: don't report link up for a VF who hasn't enabled queues" This reverts commit 2ad1274fa35ace5c6360762ba48d33b63da2396c VF queues were not brought up when PF was brought up after being downed if the VF driver disabled VFs queues during PF down. This could happen in some older or external VF driver implementations. The problem was that PF driver used vf->queues_enabled as a condition to decide what link-state it would send out which caused the issue. Remove the check for vf->queues_enabled in the VF link notify. Now VF will always be notified of the current link status. Also remove the queues_enabled member from i40e_vf structure as it is not used anymore. Otherwise VNF implementation was broken and caused a link flap. The original commit was a workaround to avoid breaking existing VFs though it's really a fault of the VF code not the PF. The commit should be safe to revert as all of the VFs we know of have been fixed. Also, since we now know there is a related bug in the workaround, removing it is preferred. Fixes: 2ad1274fa35a ("i40e: don't report link up for a VF who hasn't enabled") Signed-off-by: Aleksandr Loktionov Signed-off-by: Arkadiusz Kubalewski Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen commit 8acf417805a5f5c69e9ff66f14cab022c2755161 Author: Fenghua Yu Date: Mon Feb 1 19:00:07 2021 +0000 x86/split_lock: Enable the split lock feature on another Alder Lake CPU Add Alder Lake mobile processor to CPU list to enumerate and enable the split lock feature. Signed-off-by: Fenghua Yu Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Link: https://lkml.kernel.org/r/20210201190007.4031869-1-fenghua.yu@intel.com commit 88bb507a74ea7d75fa49edd421eaa710a7d80598 Merge: 1048ba83fb1c0 ef357e02b6c42 Author: Linus Torvalds Date: Mon Feb 1 11:15:57 2021 -0800 Merge tag 'media/v5.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: "The rockship rkisp1 driver will be promoted from staging in 5.11. While not too late, do a few uAPI changes which are needed to better support its functionalities" * tag 'media/v5.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: rockchip: rkisp1: extend uapi array sizes media: rockchip: rkisp1: carry ip version information media: rockchip: rkisp1: reduce number of histogram grid elements in uapi media: rkisp1: stats: mask the hist_bins values media: rkisp1: stats: remove a wrong cast to u8 media: rkisp1: uapi: change hist_bins array type from __u16 to __u32 commit 50af06d43eab6b09afc37aa7c8bbf69b14a3b2f7 Author: Hans de Goede Date: Mon Feb 1 16:29:56 2021 +0100 staging: rtl8723bs: Move wiphy setup to after reading the regulatory settings from the chip Commit 81f153faacd0 ("staging: rtl8723bs: fix wireless regulatory API misuse") moved the wiphy_apply_custom_regulatory() call to earlier in the driver's init-sequence, so that it gets called before wiphy_register(). But at this point in time the eFuses which code the regulatory-settings for the chip have not been read by the driver yet, causing _rtw_reg_apply_flags() to set the IEEE80211_CHAN_DISABLED flag on *all* channels. On the device where I initially tested the fix, a Jumper EZpad 7 tablet, this does not cause any problems because shortly after init the rtw_reg_notifier() gets called fixing things up. I guess this happens into response to receiving a (broadcast) packet with regulatory info from the access-point ? But on another device with a RTL8723BS wifi chip, an Acer Switch 10E (SW3-016), the rtw_reg_notifier() never gets called. I assume that some fuse has been set on this device to ignore regulatory info received from access-points. This means that on the Acer the driver is stuck in a state with all channels disabled, leading to non working Wifi. We cannot move the wiphy_apply_custom_regulatory() call back, because that call must be made before the wiphy_register() call. Instead move the entire rtw_wdev_alloc() call to after the Efuses have been read, fixing all channels being disabled in the initial channel-map. Fixes: 81f153faacd0 ("staging: rtl8723bs: fix wireless regulatory API misuse") Cc: Johannes Berg Signed-off-by: Hans de Goede Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20210201152956.370186-2-hdegoede@redhat.com Signed-off-by: Johannes Berg commit b881145642ce0bbe2be521e0882e72a5cebe93b8 Author: Kevin Lo Date: Thu Jan 7 14:10:38 2021 +0800 igc: check return value of ret_val in igc_config_fc_after_link_up Check return value from ret_val to make error check actually work. Fixes: 4eb8080143a9 ("igc: Add setup link functionality") Signed-off-by: Kevin Lo Acked-by: Sasha Neftin Signed-off-by: Tony Nguyen commit ebc8d125062e7dccb7922b2190b097c20d88ad96 Author: Kevin Lo Date: Sun Dec 20 22:18:19 2020 +0800 igc: set the default return value to -IGC_ERR_NVM in igc_write_nvm_srwr This patch sets the default return value to -IGC_ERR_NVM in igc_write_nvm_srwr. Without this change it wouldn't lead to a shadow RAM write EEWR timeout. Fixes: ab4056126813 ("igc: Add NVM support") Signed-off-by: Kevin Lo Signed-off-by: Tony Nguyen commit 2e99dedc73f004f650b197c9b269c15c7e01ad15 Author: Kai-Heng Feng Date: Wed Dec 2 15:50:17 2020 +0800 igc: Report speed and duplex as unknown when device is runtime suspended Similar to commit 165ae7a8feb5 ("igb: Report speed and duplex as unknown when device is runtime suspended"), if we try to read speed and duplex sysfs while the device is runtime suspended, igc will complain and stops working: [ 123.449883] igc 0000:03:00.0 enp3s0: PCIe link lost, device now detached [ 123.450052] BUG: kernel NULL pointer dereference, address: 0000000000000008 [ 123.450056] #PF: supervisor read access in kernel mode [ 123.450058] #PF: error_code(0x0000) - not-present page [ 123.450059] PGD 0 P4D 0 [ 123.450064] Oops: 0000 [#1] SMP NOPTI [ 123.450068] CPU: 0 PID: 2525 Comm: udevadm Tainted: G U W OE 5.10.0-1002-oem #2+rkl2-Ubuntu [ 123.450078] RIP: 0010:igc_rd32+0x1c/0x90 [igc] [ 123.450080] Code: c0 5d c3 b8 fd ff ff ff c3 0f 1f 44 00 00 0f 1f 44 00 00 55 89 f0 48 89 e5 41 56 41 55 41 54 49 89 c4 53 48 8b 57 08 48 01 d0 <44> 8b 28 41 83 fd ff 74 0c 5b 44 89 e8 41 5c 41 5d 4 [ 123.450083] RSP: 0018:ffffb0d100d6fcc0 EFLAGS: 00010202 [ 123.450085] RAX: 0000000000000008 RBX: ffffb0d100d6fd30 RCX: 0000000000000000 [ 123.450087] RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff945a12716c10 [ 123.450089] RBP: ffffb0d100d6fce0 R08: ffff945a12716550 R09: ffff945a09874000 [ 123.450090] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000008 [ 123.450092] R13: ffff945a12716000 R14: ffff945a037da280 R15: ffff945a037da290 [ 123.450094] FS: 00007f3b34c868c0(0000) GS:ffff945b89200000(0000) knlGS:0000000000000000 [ 123.450096] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 123.450098] CR2: 0000000000000008 CR3: 00000001144de006 CR4: 0000000000770ef0 [ 123.450100] PKRU: 55555554 [ 123.450101] Call Trace: [ 123.450111] igc_ethtool_get_link_ksettings+0xd6/0x1b0 [igc] [ 123.450118] __ethtool_get_link_ksettings+0x71/0xb0 [ 123.450123] duplex_show+0x74/0xc0 [ 123.450129] dev_attr_show+0x1d/0x40 [ 123.450134] sysfs_kf_seq_show+0xa1/0x100 [ 123.450137] kernfs_seq_show+0x27/0x30 [ 123.450142] seq_read+0xb7/0x400 [ 123.450148] ? common_file_perm+0x72/0x170 [ 123.450151] kernfs_fop_read+0x35/0x1b0 [ 123.450155] vfs_read+0xb5/0x1b0 [ 123.450157] ksys_read+0x67/0xe0 [ 123.450160] __x64_sys_read+0x1a/0x20 [ 123.450164] do_syscall_64+0x38/0x90 [ 123.450168] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 123.450170] RIP: 0033:0x7f3b351fe142 [ 123.450173] Code: c0 e9 c2 fe ff ff 50 48 8d 3d 3a ca 0a 00 e8 f5 19 02 00 0f 1f 44 00 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 0f 05 <48> 3d 00 f0 ff ff 77 56 c3 0f 1f 44 00 00 48 83 ec 28 48 89 54 24 [ 123.450174] RSP: 002b:00007fffef2ec138 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 [ 123.450177] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f3b351fe142 [ 123.450179] RDX: 0000000000001001 RSI: 00005644c047f070 RDI: 0000000000000003 [ 123.450180] RBP: 00007fffef2ec340 R08: 00005644c047f070 R09: 00007f3b352d9320 [ 123.450182] R10: 00005644c047c010 R11: 0000000000000246 R12: 00005644c047cbf0 [ 123.450184] R13: 00005644c047e6d0 R14: 0000000000000003 R15: 00007fffef2ec140 [ 123.450189] Modules linked in: rfcomm ccm cmac algif_hash algif_skcipher af_alg bnep toshiba_acpi industrialio toshiba_haps hp_accel lis3lv02d btusb btrtl btbcm btintel bluetooth ecdh_generic ecc joydev input_leds nls_iso8859_1 snd_sof_pci snd_sof_intel_byt snd_sof_intel_ipc snd_sof_intel_hda_common snd_soc_hdac_hda snd_hda_codec_hdmi snd_sof_xtensa_dsp snd_sof_intel_hda snd_sof snd_hda_ext_core snd_soc_acpi_intel_match snd_soc_acpi snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio snd_hda_intel snd_intel_dspcfg soundwire_intel soundwire_generic_allocation soundwire_cadence snd_hda_codec snd_hda_core ath10k_pci snd_hwdep intel_rapl_msr intel_rapl_common ath10k_core soundwire_bus snd_soc_core x86_pkg_temp_thermal ath intel_powerclamp snd_compress ac97_bus snd_pcm_dmaengine mac80211 snd_pcm coretemp snd_seq_midi snd_seq_midi_event snd_rawmidi kvm_intel cfg80211 snd_seq snd_seq_device snd_timer mei_hdcp kvm libarc4 snd crct10dif_pclmul ghash_clmulni_intel aesni_intel mei_me dell_wmi [ 123.450266] dell_smbios soundcore sparse_keymap dcdbas crypto_simd cryptd mei dell_uart_backlight glue_helper ee1004 wmi_bmof intel_wmi_thunderbolt dell_wmi_descriptor mac_hid efi_pstore acpi_pad acpi_tad intel_cstate sch_fq_codel parport_pc ppdev lp parport ip_tables x_tables autofs4 btrfs blake2b_generic raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear dm_mirror dm_region_hash dm_log hid_generic usbhid hid i915 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops cec crc32_pclmul rc_core drm intel_lpss_pci i2c_i801 ahci igc intel_lpss i2c_smbus idma64 xhci_pci libahci virt_dma xhci_pci_renesas wmi video pinctrl_tigerlake [ 123.450335] CR2: 0000000000000008 [ 123.450338] ---[ end trace 9f731e38b53c35cc ]--- The more generic approach will be wrap get_link_ksettings() with begin() and complete() callbacks, and calls runtime resume and runtime suspend routine respectively. However, igc is like igb, runtime resume routine uses rtnl_lock() which upper ethtool layer also uses. So to prevent a deadlock on rtnl, take a different approach, use pm_runtime_suspended() to avoid reading register while device is runtime suspended. Fixes: 8c5ad0dae93c ("igc: Add ethtool support") Signed-off-by: Kai-Heng Feng Acked-by: Sasha Neftin Signed-off-by: Tony Nguyen commit 0f347aa07f15b346a001e557f4a0a45069f7fa3d Author: Hans de Goede Date: Mon Feb 1 17:34:19 2021 +0100 ACPI: scan: Fix battery devices sometimes never binding With the new 2 step scanning process, which defers instantiating some ACPI-devices based on their _DEP to the second step, the following may happen: 1. During the first acpi_walk_namespace(acpi_bus_check_add) call acpi_scan_check_dep() gets called on the Battery ACPI dev handle and adds one or more deps for this handle to the acpi_dep_list 2. During the first acpi_bus_attach() call one or more of the suppliers of these deps get their driver attached and acpi_walk_dep_device_list(supplier_handle) gets called. At this point acpi_bus_get_device(dep->consumer) get called, but since the battery has DEPs it has not been instantiated during the first acpi_walk_namespace(acpi_bus_check_add), so the acpi_bus_get_device(dep->consumer) call fails. Before this commit, acpi_walk_dep_device_list() would now continue *without* removing the acpi_dep_data entry for this supplier,consumer pair from the acpi_dep_list. 3. During the second acpi_walk_namespace(acpi_bus_check_add) call an acpi_device gets instantiated for the battery and acpi_scan_dep_init() gets called to initialize its dep_unmet val. Before this commit, the dep_unmet count would include DEPs for suppliers for which acpi_walk_dep_device_list(supplier_handle) has already been called, so it will never become 0 and the ACPI battery driver will never get attached / bind. Fix the ACPI battery driver never binding in this scenario by making acpi_walk_dep_device_list() always remove matching acpi_dep_data entries independent of the acpi_bus_get_device(dep->consumer) call succeeding or not. Fixes: 71da201f38df ("ACPI: scan: Defer enumeration of devices with _DEP lists") Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit 4683d758f48e6ae87d3d3493ffa00aceb955ee16 Author: Vitaly Kuznetsov Date: Mon Feb 1 15:28:43 2021 +0100 KVM: x86: Supplement __cr4_reserved_bits() with X86_FEATURE_PCID check Commit 7a873e455567 ("KVM: selftests: Verify supported CR4 bits can be set before KVM_SET_CPUID2") reveals that KVM allows to set X86_CR4_PCIDE even when PCID support is missing: ==== Test Assertion Failure ==== x86_64/set_sregs_test.c:41: rc pid=6956 tid=6956 - Invalid argument 1 0x000000000040177d: test_cr4_feature_bit at set_sregs_test.c:41 2 0x00000000004014fc: main at set_sregs_test.c:119 3 0x00007f2d9346d041: ?? ??:0 4 0x000000000040164d: _start at ??:? KVM allowed unsupported CR4 bit (0x20000) Add X86_FEATURE_PCID feature check to __cr4_reserved_bits() to make kvm_is_valid_cr4() fail. Signed-off-by: Vitaly Kuznetsov Message-Id: <20210201142843.108190-1-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit b66f9bab1279c281c83dea077c5e808527e3ef69 Author: Zheng Zhan Liang Date: Mon Feb 1 13:53:10 2021 +0800 KVM/x86: assign hva with the right value to vm_munmap the pages Cc: Paolo Bonzini Cc: Wanpeng Li Cc: kvm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Zheng Zhan Liang Message-Id: <20210201055310.267029-1-zhengzhanliang@huorong.cn> Signed-off-by: Paolo Bonzini commit 7131636e7ea5b50ca910f8953f6365ef2d1f741c Author: Paolo Bonzini Date: Thu Jan 28 11:45:00 2021 -0500 KVM: x86: Allow guests to see MSR_IA32_TSX_CTRL even if tsx=off Userspace that does not know about KVM_GET_MSR_FEATURE_INDEX_LIST will generally use the default value for MSR_IA32_ARCH_CAPABILITIES. When this happens and the host has tsx=on, it is possible to end up with virtual machines that have HLE and RTM disabled, but TSX_CTRL available. If the fleet is then switched to tsx=off, kvm_get_arch_capabilities() will clear the ARCH_CAP_TSX_CTRL_MSR bit and it will not be possible to use the tsx=off hosts as migration destinations, even though the guests do not have TSX enabled. To allow this migration, allow guests to write to their TSX_CTRL MSR, while keeping the host MSR unchanged for the entire life of the guests. This ensures that TSX remains disabled and also saves MSR reads and writes, and it's okay to do because with tsx=off we know that guests will not have the HLE and RTM features in their CPUID. (If userspace sets bogus CPUID data, we do not expect HLE and RTM to work in guests anyway). Cc: stable@vger.kernel.org Fixes: cbbaa2727aa3 ("KVM: x86: fix presentation of TSX feature in ARCH_CAPABILITIES") Signed-off-by: Paolo Bonzini commit bad4c6eb5eaa8300e065bd4426727db5141d687d Author: Chuck Lever Date: Sun Jan 31 16:16:23 2021 -0500 SUNRPC: Fix NFS READs that start at non-page-aligned offsets Anj Duvnjak reports that the Kodi.tv NFS client is not able to read video files from a v5.10.11 Linux NFS server. The new sendpage-based TCP sendto logic was not attentive to non- zero page_base values. nfsd_splice_read() sets that field when a READ payload starts in the middle of a page. The Linux NFS client rarely emits an NFS READ that is not page- aligned. All of my testing so far has been with Linux clients, so I missed this one. Reported-by: A. Duvnjak BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=211471 Fixes: 4a85a6a3320b ("SUNRPC: Handle TCP socket sends with kernel_sendpage() again") Signed-off-by: Chuck Lever Tested-by: A. Duvnjak commit 9ad22e165994ccb64d85b68499eaef97342c175b Author: Peter Zijlstra Date: Thu Jan 28 22:16:27 2021 +0100 x86/debug: Fix DR6 handling Tom reported that one of the GDB test-cases failed, and Boris bisected it to commit: d53d9bc0cf78 ("x86/debug: Change thread.debugreg6 to thread.virtual_dr6") The debugging session led us to commit: 6c0aca288e72 ("x86: Ignore trap bits on single step exceptions") It turns out that TF and data breakpoints are both traps and will be merged, while instruction breakpoints are faults and will not be merged. This means 6c0aca288e72 is wrong, only TF and instruction breakpoints need to be excluded while TF and data breakpoints can be merged. [ bp: Massage commit message. ] Fixes: d53d9bc0cf78 ("x86/debug: Change thread.debugreg6 to thread.virtual_dr6") Fixes: 6c0aca288e72 ("x86: Ignore trap bits on single step exceptions") Reported-by: Tom de Vries Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Borislav Petkov Cc: Link: https://lkml.kernel.org/r/YBMAbQGACujjfz%2Bi@hirez.programming.kicks-ass.net Link: https://lkml.kernel.org/r/20210128211627.GB4348@worktop.programming.kicks-ass.net commit 18fe0fae61252b5ae6e26553e2676b5fac555951 Author: Felix Fietkau Date: Mon Feb 1 09:33:24 2021 +0100 mac80211: fix station rate table updates on assoc If the driver uses .sta_add, station entries are only uploaded after the sta is in assoc state. Fix early station rate table updates by deferring them until the sta has been uploaded. Cc: stable@vger.kernel.org Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20210201083324.3134-1-nbd@nbd.name [use rcu_access_pointer() instead since we won't dereference here] Signed-off-by: Johannes Berg commit 54f6a8af372213a254af6609758d99f7c0b6b5ad Author: Chunfeng Yun Date: Mon Feb 1 13:57:44 2021 +0800 usb: xhci-mtk: skip dropping bandwidth of unchecked endpoints For those unchecked endpoints, we don't allocate bandwidth for them, so no need free the bandwidth, otherwise will decrease the allocated bandwidth. Meanwhile use xhci_dbg() instead of dev_dbg() to print logs and rename bw_ep_list_new as bw_ep_chk_list. Fixes: 1d69f9d901ef ("usb: xhci-mtk: fix unreleased bandwidth data") Cc: stable Reviewed-and-tested-by: Ikjoon Jang Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1612159064-28413-1-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 9917f0e3cdba7b9f1a23f70e3f70b1a106be54a8 Author: Yoshihiro Shimoda Date: Mon Feb 1 21:47:20 2021 +0900 usb: renesas_usbhs: Clear pipe running flag in usbhs_pkt_pop() Should clear the pipe running flag in usbhs_pkt_pop(). Otherwise, we cannot use this pipe after dequeue was called while the pipe was running. Fixes: 8355b2b3082d ("usb: renesas_usbhs: fix the behavior of some usbhs_pkt_handle") Reported-by: Tho Vu Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1612183640-8898-1-git-send-email-yoshihiro.shimoda.uh@renesas.com Cc: stable Signed-off-by: Greg Kroah-Hartman commit 81219f80097ea7616211dddca5438283a05816d4 Merge: 3e1f4a2e1184a 4d395c5e74398 Author: Greg Kroah-Hartman Date: Mon Feb 1 14:04:50 2021 +0100 Merge tag 'thunderbolt-for-v5.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-linus Mika writes: thunderbolt: Fix for v5.11-rc7 A single fix for a possible NULL pointer dereference when adding device links from ACPI description. * tag 'thunderbolt-for-v5.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: thunderbolt: Fix possible NULL pointer dereference in tb_acpi_add_link() commit c07ea8d0b170c0cf6592a53981841c7973e142ea Author: Wolfram Sang Date: Tue Jan 5 11:59:14 2021 +0100 gpio: gpiolib: remove shadowed variable After refactoring, we had two variables for the same thing. Remove the second declaration, one is enough here. Found by cppcheck. drivers/gpio/gpiolib.c:2551:17: warning: Local variable 'ret' shadows outer variable [shadowVariable] Fixes: d377f56f34f5 ("gpio: gpiolib: Normalize return code variable name") Signed-off-by: Wolfram Sang Signed-off-by: Bartosz Golaszewski commit d7fb9c24209556478e65211d7a1f056f2d43cceb Author: Ulf Hansson Date: Tue Jan 26 10:43:13 2021 +0100 mmc: sdhci-pltfm: Fix linking err for sdhci-brcmstb The implementation of sdhci_pltfm_suspend() is only available when CONFIG_PM_SLEEP is set, which triggers a linking error: "undefined symbol: sdhci_pltfm_suspend" when building sdhci-brcmstb.c. Fix this by implementing the missing stubs when CONFIG_PM_SLEEP is unset. Reported-by: Arnd Bergmann Suggested-by: Florian Fainelli Fixes: 5b191dcba719 ("mmc: sdhci-brcmstb: Fix mmc timeout errors on S5 suspend") Cc: stable@vger.kernel.org Tested-By: Nicolas Schichan Acked-by: Arnd Bergmann Acked-by: Florian Fainelli Signed-off-by: Ulf Hansson commit f92e04f764b86e55e522988e6f4b6082d19a2721 Author: Fengnan Chang Date: Sat Jan 23 11:32:31 2021 +0800 mmc: core: Limit retries when analyse of SDIO tuples fails When analysing tuples fails we may loop indefinitely to retry. Let's avoid this by using a 10s timeout and bail if not completed earlier. Signed-off-by: Fengnan Chang Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210123033230.36442-1-fengnanchang@gmail.com Signed-off-by: Ulf Hansson commit d8d2d38275c1b2d3936c0d809e0559e88912fbb5 Author: Masahiro Yamada Date: Mon Feb 1 10:00:24 2021 +0900 kbuild: remove PYTHON variable Python retired in 2020, and some distributions do not provide the 'python' command any more. As in commit 51839e29cb59 ("scripts: switch explicitly to Python 3"), we need to use more specific 'python3' to invoke scripts even if they are written in a way compatible with both Python 2 and 3. This commit removes the variable 'PYTHON', and switches the existing users to 'PYTHON3'. BTW, PEP 394 (https://www.python.org/dev/peps/pep-0394/) is a helpful material. Signed-off-by: Masahiro Yamada commit 1048ba83fb1c00cd24172e23e8263972f6b5d9ac Author: Linus Torvalds Date: Sun Jan 31 13:50:09 2021 -0800 Linux 5.11-rc6 commit 215164bfb7144c5890dd8021ff06e486939862d4 Author: Mario Limonciello Date: Fri Jan 29 11:26:54 2021 -0600 platform/x86: dell-wmi-sysman: fix a NULL pointer dereference An upcoming Dell platform is causing a NULL pointer dereference in dell-wmi-sysman initialization. Validate that the input from BIOS matches correct ACPI types and abort module initialization if it fails. Signed-off-by: Mario Limonciello Tested-by: Perry Yuan Link: https://lore.kernel.org/r/20210129172654.2326751-1-mario.limonciello@dell.com [hdegoede@redhat.com: Drop redundant release_attributes_data() call] Signed-off-by: Hans de Goede commit ac8c6edd20bcb965b22ceb36752499b3d5cf5dd4 Merge: f5a376eddec42 355845b738e76 Author: Linus Torvalds Date: Sun Jan 31 11:57:37 2021 -0800 Merge tag 'efi-urgent-for-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI fix from Borislav Petkov: "A single fix from Lukas: handle boolean device properties imported from Apple firmware correctly" * tag 'efi-urgent-for-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: efi/apple-properties: Reinstate support for boolean properties commit f5a376eddec424f00e38aa19bd26c2febbfc934d Merge: 17b756d0376fd 0bab9cb2d980d Author: Linus Torvalds Date: Sun Jan 31 11:48:12 2021 -0800 Merge tag 'x86_entry_for_v5.11_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fix from Borislav Petkov: "A single fix for objtool to generate proper unwind info for newer toolchains which do not generate section symbols anymore. And a cleanup ontop. This was originally going to go during the next merge window but people can already trigger a build error with binutils-2.36 which doesn't emit section symbols - something which objtool relies on - so let's expedite it" * tag 'x86_entry_for_v5.11_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/entry: Remove put_ret_addr_in_rdi THUNK macro argument x86/entry: Emit a symbol for register restoring thunk commit 17b756d0376fd45f98abb6d758c3d5befb01e3fa Merge: f7ea44c7172ff 211e5db19d15a Author: Linus Torvalds Date: Sun Jan 31 11:40:57 2021 -0800 Merge tag 'timers-urgent-2021-01-31' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fix from Thomas Gleixner: "A fix for handling advertised, but non-existent 146818 RTCs correctly. With the recent UIP handling changes the time readout of non-existent RTCs hangs forever as the read returns always 0xFF which means the UIP bit is set. Sanity check the RTC before registering by checking the RTC_VALID register for correctness" * tag 'timers-urgent-2021-01-31' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: rtc: mc146818: Detect and handle broken RTCs commit f7ea44c7172ffcc13ed589163f5168bc54f3e039 Merge: b333a99e14d13 41c1a06d1d154 Author: Linus Torvalds Date: Sun Jan 31 11:39:32 2021 -0800 Merge tag 'core-urgent-2021-01-31' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull single stepping fix from Thomas Gleixner: "A single fix for the single step reporting regression caused by getting the condition wrong when moving SYSCALL_EMU away from TIF flags" [ There's apparently another problem too, fix pending ] * tag 'core-urgent-2021-01-31' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: entry: Unbreak single step reporting behaviour commit b333a99e14d133afe204f775e72cc119decda2ca Merge: 1188866d9cec4 4025c784c573c Author: Linus Torvalds Date: Sun Jan 31 11:37:43 2021 -0800 Merge tag 'powerpc-5.11-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fix from Michael Ellerman: "One fix for a bug in our soft interrupt masking, which could lead to interrupt replaying recursing, causing spurious interrupts. Thanks to Nicholas Piggin" * tag 'powerpc-5.11-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/64s: prevent recursive replay_soft_interrupts causing superfluous interrupt commit 1188866d9cec4987ee465b7a0815f0bcb946641e Merge: 29bd2d2100dcd de96c3943f591 Author: Linus Torvalds Date: Sun Jan 31 11:33:27 2021 -0800 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fix from Wolfram Sang: "Just one I2C driver update this time" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: mediatek: Move suspend and resume handling to NOIRQ phase commit 29bd2d2100dcd98455c5f2dff391a88c5b44a6b2 Merge: c178fae3a9f5b e1c6edcbea13d Author: Linus Torvalds Date: Sun Jan 31 11:23:35 2021 -0800 Merge branch 'for-rc-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds Pull LED fixes from Pavel Machek: "This pull is due to 'leds: trigger: fix potential deadlock with libata' -- people find the warn annoying. It also contains new driver and two trivial fixes" * 'for-rc-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds: leds: rt8515: Add Richtek RT8515 LED driver dt-bindings: leds: Add DT binding for Richtek RT8515 leds: trigger: fix potential deadlock with libata leds: leds-ariel: convert comma to semicolon leds: leds-lm3533: convert comma to semicolon commit c178fae3a9f5b4f2e6c9de34a1fbff1a2b455c46 Merge: 6642d600b541b e4a7d1f7707eb Author: Linus Torvalds Date: Sun Jan 31 11:19:12 2021 -0800 Merge tag 'nfs-for-5.11-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs Pull NFS client fixes from Trond Myklebust: - SUNRPC: Handle 0 length opaque XDR object data properly - Fix a layout segment leak in pnfs_layout_process() - pNFS/NFSv4: Update the layout barrier when we schedule a layoutreturn - pNFS/NFSv4: Improve rejection of out-of-order layouts - pNFS/NFSv4: Try to return invalid layout in pnfs_layout_process() * tag 'nfs-for-5.11-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: SUNRPC: Handle 0 length opaque XDR object data properly SUNRPC: Move simple_get_bytes and simple_get_netobj into private header pNFS/NFSv4: Improve rejection of out-of-order layouts pNFS/NFSv4: Update the layout barrier when we schedule a layoutreturn pNFS/NFSv4: Try to return invalid layout in pnfs_layout_process() pNFS/NFSv4: Fix a layout segment leak in pnfs_layout_process() commit 3e1f4a2e1184ae6ad7f4caf682ced9554141a0f4 Author: Dan Carpenter Date: Thu Jan 28 12:33:42 2021 +0300 USB: gadget: legacy: fix an error code in eth_bind() This code should return -ENOMEM if the allocation fails but it currently returns success. Fixes: 9b95236eebdb ("usb: gadget: ether: allocate and init otg descriptor by otg capabilities") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YBKE9rqVuJEOUWpW@mwanda Cc: stable Signed-off-by: Greg Kroah-Hartman commit e1c6edcbea13de025c3406645b4cce4ac3baf973 Author: Linus Walleij Date: Sun Jan 3 00:15:10 2021 +0100 leds: rt8515: Add Richtek RT8515 LED driver This adds a driver for the Richtek RT8515 dual channel torch/flash white LED driver. This LED driver is found in some mobile phones from Samsung such as the GT-S7710 and GT-I8190. A V4L interface is added. We do not have a proper datasheet for the RT8515 but it turns out that RT9387A has a public datasheet and is essentially the same chip. We designed the driver in accordance with this datasheet. The day someone needs to drive a RT9387A this driver can probably easily be augmented to handle that chip too. Sakari Ailus, Pavel Machek and Andy Shevchenko helped significantly in getting this driver right. Cc: Sakari Ailus Cc: newbytee@protonmail.com Cc: Stephan Gerhold Cc: linux-media@vger.kernel.org Cc: phone-devel@vger.kernel.org Reviewed-by: Sakari Ailus Signed-off-by: Linus Walleij Signed-off-by: Pavel Machek commit c8283eb79d879ef898f4224ba30e554f83904b0a Author: Linus Walleij Date: Sun Jan 3 00:15:09 2021 +0100 dt-bindings: leds: Add DT binding for Richtek RT8515 Add a YAML devicetree binding for the Richtek RT8515 dual channel flash/torch LED driver. Cc: Sakari Ailus Cc: newbytee@protonmail.com Cc: Stephan Gerhold Cc: phone-devel@vger.kernel.org Cc: linux-media@vger.kernel.org Cc: devicetree@vger.kernel.org Reviewed-by: Rob Herring Reviewed-by: Sakari Ailus Signed-off-by: Linus Walleij Signed-off-by: Pavel Machek commit 27af8e2c90fba242460b01fa020e6e19ed68c495 Author: Andrea Righi Date: Wed Nov 25 16:18:22 2020 +0100 leds: trigger: fix potential deadlock with libata We have the following potential deadlock condition: ======================================================== WARNING: possible irq lock inversion dependency detected 5.10.0-rc2+ #25 Not tainted -------------------------------------------------------- swapper/3/0 just changed the state of lock: ffff8880063bd618 (&host->lock){-...}-{2:2}, at: ata_bmdma_interrupt+0x27/0x200 but this lock took another, HARDIRQ-READ-unsafe lock in the past: (&trig->leddev_list_lock){.+.?}-{2:2} and interrupts could create inverse lock ordering between them. other info that might help us debug this: Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&trig->leddev_list_lock); local_irq_disable(); lock(&host->lock); lock(&trig->leddev_list_lock); lock(&host->lock); *** DEADLOCK *** no locks held by swapper/3/0. the shortest dependencies between 2nd lock and 1st lock: -> (&trig->leddev_list_lock){.+.?}-{2:2} ops: 46 { HARDIRQ-ON-R at: lock_acquire+0x15f/0x420 _raw_read_lock+0x42/0x90 led_trigger_event+0x2b/0x70 rfkill_global_led_trigger_worker+0x94/0xb0 process_one_work+0x240/0x560 worker_thread+0x58/0x3d0 kthread+0x151/0x170 ret_from_fork+0x1f/0x30 IN-SOFTIRQ-R at: lock_acquire+0x15f/0x420 _raw_read_lock+0x42/0x90 led_trigger_event+0x2b/0x70 kbd_bh+0x9e/0xc0 tasklet_action_common.constprop.0+0xe9/0x100 tasklet_action+0x22/0x30 __do_softirq+0xcc/0x46d run_ksoftirqd+0x3f/0x70 smpboot_thread_fn+0x116/0x1f0 kthread+0x151/0x170 ret_from_fork+0x1f/0x30 SOFTIRQ-ON-R at: lock_acquire+0x15f/0x420 _raw_read_lock+0x42/0x90 led_trigger_event+0x2b/0x70 rfkill_global_led_trigger_worker+0x94/0xb0 process_one_work+0x240/0x560 worker_thread+0x58/0x3d0 kthread+0x151/0x170 ret_from_fork+0x1f/0x30 INITIAL READ USE at: lock_acquire+0x15f/0x420 _raw_read_lock+0x42/0x90 led_trigger_event+0x2b/0x70 rfkill_global_led_trigger_worker+0x94/0xb0 process_one_work+0x240/0x560 worker_thread+0x58/0x3d0 kthread+0x151/0x170 ret_from_fork+0x1f/0x30 } ... key at: [] __key.0+0x0/0x10 ... acquired at: _raw_read_lock+0x42/0x90 led_trigger_blink_oneshot+0x3b/0x90 ledtrig_disk_activity+0x3c/0xa0 ata_qc_complete+0x26/0x450 ata_do_link_abort+0xa3/0xe0 ata_port_freeze+0x2e/0x40 ata_hsm_qc_complete+0x94/0xa0 ata_sff_hsm_move+0x177/0x7a0 ata_sff_pio_task+0xc7/0x1b0 process_one_work+0x240/0x560 worker_thread+0x58/0x3d0 kthread+0x151/0x170 ret_from_fork+0x1f/0x30 -> (&host->lock){-...}-{2:2} ops: 69 { IN-HARDIRQ-W at: lock_acquire+0x15f/0x420 _raw_spin_lock_irqsave+0x52/0xa0 ata_bmdma_interrupt+0x27/0x200 __handle_irq_event_percpu+0xd5/0x2b0 handle_irq_event+0x57/0xb0 handle_edge_irq+0x8c/0x230 asm_call_irq_on_stack+0xf/0x20 common_interrupt+0x100/0x1c0 asm_common_interrupt+0x1e/0x40 native_safe_halt+0xe/0x10 arch_cpu_idle+0x15/0x20 default_idle_call+0x59/0x1c0 do_idle+0x22c/0x2c0 cpu_startup_entry+0x20/0x30 start_secondary+0x11d/0x150 secondary_startup_64_no_verify+0xa6/0xab INITIAL USE at: lock_acquire+0x15f/0x420 _raw_spin_lock_irqsave+0x52/0xa0 ata_dev_init+0x54/0xe0 ata_link_init+0x8b/0xd0 ata_port_alloc+0x1f1/0x210 ata_host_alloc+0xf1/0x130 ata_host_alloc_pinfo+0x14/0xb0 ata_pci_sff_prepare_host+0x41/0xa0 ata_pci_bmdma_prepare_host+0x14/0x30 piix_init_one+0x21f/0x600 local_pci_probe+0x48/0x80 pci_device_probe+0x105/0x1c0 really_probe+0x221/0x490 driver_probe_device+0xe9/0x160 device_driver_attach+0xb2/0xc0 __driver_attach+0x91/0x150 bus_for_each_dev+0x81/0xc0 driver_attach+0x1e/0x20 bus_add_driver+0x138/0x1f0 driver_register+0x91/0xf0 __pci_register_driver+0x73/0x80 piix_init+0x1e/0x2e do_one_initcall+0x5f/0x2d0 kernel_init_freeable+0x26f/0x2cf kernel_init+0xe/0x113 ret_from_fork+0x1f/0x30 } ... key at: [] __key.6+0x0/0x10 ... acquired at: __lock_acquire+0x9da/0x2370 lock_acquire+0x15f/0x420 _raw_spin_lock_irqsave+0x52/0xa0 ata_bmdma_interrupt+0x27/0x200 __handle_irq_event_percpu+0xd5/0x2b0 handle_irq_event+0x57/0xb0 handle_edge_irq+0x8c/0x230 asm_call_irq_on_stack+0xf/0x20 common_interrupt+0x100/0x1c0 asm_common_interrupt+0x1e/0x40 native_safe_halt+0xe/0x10 arch_cpu_idle+0x15/0x20 default_idle_call+0x59/0x1c0 do_idle+0x22c/0x2c0 cpu_startup_entry+0x20/0x30 start_secondary+0x11d/0x150 secondary_startup_64_no_verify+0xa6/0xab This lockdep splat is reported after: commit e918188611f0 ("locking: More accurate annotations for read_lock()") To clarify: - read-locks are recursive only in interrupt context (when in_interrupt() returns true) - after acquiring host->lock in CPU1, another cpu (i.e. CPU2) may call write_lock(&trig->leddev_list_lock) that would be blocked by CPU0 that holds trig->leddev_list_lock in read-mode - when CPU1 (ata_ac_complete()) tries to read-lock trig->leddev_list_lock, it would be blocked by the write-lock waiter on CPU2 (because we are not in interrupt context, so the read-lock is not recursive) - at this point if an interrupt happens on CPU0 and ata_bmdma_interrupt() is executed it will try to acquire host->lock, that is held by CPU1, that is currently blocked by CPU2, so: * CPU0 blocked by CPU1 * CPU1 blocked by CPU2 * CPU2 blocked by CPU0 *** DEADLOCK *** The deadlock scenario is better represented by the following schema (thanks to Boqun Feng for the schema and the detailed explanation of the deadlock condition): CPU 0: CPU 1: CPU 2: ----- ----- ----- led_trigger_event(): read_lock(&trig->leddev_list_lock); ata_hsm_qc_complete(): spin_lock_irqsave(&host->lock); write_lock(&trig->leddev_list_lock); ata_port_freeze(): ata_do_link_abort(): ata_qc_complete(): ledtrig_disk_activity(): led_trigger_blink_oneshot(): read_lock(&trig->leddev_list_lock); // ^ not in in_interrupt() context, so could get blocked by CPU 2 ata_bmdma_interrupt(): spin_lock_irqsave(&host->lock); Fix by using read_lock_irqsave/irqrestore() in led_trigger_event(), so that no interrupt can happen in between, preventing the deadlock condition. Apply the same change to led_trigger_blink_setup() as well, since the same deadlock scenario can also happen in power_supply_update_bat_leds() -> led_trigger_blink() -> led_trigger_blink_setup() (workqueue context), and potentially prevent other similar usages. Link: https://lore.kernel.org/lkml/20201101092614.GB3989@xps-13-7390/ Fixes: eb25cb9956cc ("leds: convert IDE trigger to common disk trigger") Signed-off-by: Andrea Righi Signed-off-by: Pavel Machek commit 47854d2d2ba8f100c419557a7d9d8f155c0a1064 Author: Zheng Yongjun Date: Mon Dec 14 21:45:45 2020 +0800 leds: leds-ariel: convert comma to semicolon Replace a comma between expression statements by a semicolon. Signed-off-by: Zheng Yongjun Reviewed-by: Alexander Dahl Signed-off-by: Pavel Machek commit 4e04b11800194f2ec756b5f3e9f2e559df5a0b1e Author: Zheng Yongjun Date: Wed Dec 16 21:16:53 2020 +0800 leds: leds-lm3533: convert comma to semicolon Replace a comma between expression statements by a semicolon. Signed-off-by: Zheng Yongjun Signed-off-by: Pavel Machek commit 6642d600b541b81931fb1ab0c041b0d68f77be7e Merge: ad8b3c1e637cf 0d4873f9aa4ff Author: Linus Torvalds Date: Sat Jan 30 17:51:06 2021 -0800 Merge tag '5.11-rc5-smb3' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "Four cifs patches found in additional testing of the conversion to the new mount API: three small option processing ones, and one fixing domain based DFS referrals" * tag '5.11-rc5-smb3' of git://git.samba.org/sfrench/cifs-2.6: cifs: fix dfs domain referrals cifs: returning mount parm processing errors correctly cifs: fix mounts to subdirectories of target cifs: ignore auto and noauto options if given commit ad8b3c1e637cf7b827d26917034fa686af74896b Merge: 03e319e5465a2 aa2c24e7f415e Author: Linus Torvalds Date: Sat Jan 30 17:42:42 2021 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Two minor fixes in drivers. Both changing strings (one in a comment, one in a module help text) with no code impact" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: qla2xxx: Fix description for parameter ql2xenforce_iocb_limit scsi: target: iscsi: Fix typo in comment commit 03e319e5465a2da6fb188c77043775f2888df529 Merge: 8c947645151cc 1bea2a937dadd Author: Linus Torvalds Date: Sat Jan 30 16:39:36 2021 -0800 Merge tag 'for-linus' of git://github.com/openrisc/linux Pull OpenRISC fix from Stafford Horne: "Fix config dependencies for Litex SOC driver causing issues on um" * tag 'for-linus' of git://github.com/openrisc/linux: soc: litex: Properly depend on HAS_IOMEM commit 8c947645151cc2c279c75c7f640dd8f0fc0b9aa2 Merge: 3bf255315bed7 32ada6b0980d8 Author: Linus Torvalds Date: Sat Jan 30 11:53:14 2021 -0800 Merge tag 'devicetree-fixes-for-5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree fixes from Rob Herring: - Cleanups on properties with standard unit suffixes - Fix overwriting dma_range_map if there's no 'dma-ranges' property - Fix a bug when creating a /chosen node from ARM ATAGs - Add missing properties for TI j721e USB binding - Several doc reference updates due to DT schema conversions * tag 'devicetree-fixes-for-5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: dt-bindings: Cleanup standard unit properties of/device: Update dma_range_map only when dev has valid dma-ranges ARM: zImage: atags_to_fdt: Fix node names on added root nodes dt-bindings: usb: j721e: add ranges and dma-coherent props dt-bindings:iio:adc: update adc.yaml reference dt-bindings: memory: mediatek: update mediatek,smi-larb.yaml references dt-bindings: display: mediatek: update mediatek,dpi.yaml reference ASoC: audio-graph-card: update audio-graph-card.yaml reference commit 3bf255315bed7ccdde94603ec164d04dc5953ad9 Merge: e37c0fbabd8e1 e82080e1f4564 Author: Linus Torvalds Date: Sat Jan 30 11:48:57 2021 -0800 Merge tag 's390-5.11-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Vasily Gorbik: - Fix max number of VCPUs reported via ultravisor information sysfs interface. - Fix memory leaks during vfio-ap resources clean up on KVM pointer invalidation notification. - Fix potential specification exception by avoiding unnecessary interrupts disable after queue reset in vfio-ap. * tag 's390-5.11-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390: uv: Fix sysfs max number of VCPUs reporting s390/vfio-ap: No need to disable IRQ after queue reset s390/vfio-ap: clean up vfio_ap resources when KVM pointer invalidated commit e37c0fbabd8e1d50bdd6cd0a1a07b72e1048a9d0 Merge: 0e9bcda5d286f 336e8eb2a3cfe Author: Linus Torvalds Date: Sat Jan 30 11:46:27 2021 -0800 Merge tag 'riscv-for-linus-5.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fix from Palmer Dabbelt: "A fix to avoid initializing max_mapnr to be too large, which may manifest on NUMA systems" * tag 'riscv-for-linus-5.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: Fixup pfn_valid error with wrong max_mapnr commit eb4e8fac00d1e01ada5e57c05d24739156086677 Author: Chinmay Agarwal Date: Wed Jan 27 22:24:54 2021 +0530 neighbour: Prevent a dead entry from updating gc_list Following race condition was detected: - neigh_flush_dev() is under execution and calls neigh_mark_dead(n) marking the neighbour entry 'n' as dead. - Executing: __netif_receive_skb() -> __netif_receive_skb_core() -> arp_rcv() -> arp_process().arp_process() calls __neigh_lookup() which takes a reference on neighbour entry 'n'. - Moves further along neigh_flush_dev() and calls neigh_cleanup_and_release(n), but since reference count increased in t2, 'n' couldn't be destroyed. - Moves further along, arp_process() and calls neigh_update()-> __neigh_update() -> neigh_update_gc_list(), which adds the neighbour entry back in gc_list(neigh_mark_dead(), removed it earlier in t0 from gc_list) - arp_process() finally calls neigh_release(n), destroying the neighbour entry. This leads to 'n' still being part of gc_list, but the actual neighbour structure has been freed. The situation can be prevented from happening if we disallow a dead entry to have any possibility of updating gc_list. This is what the patch intends to achieve. Fixes: 9c29a2f55ec0 ("neighbor: Fix locking order for gc_list changes") Signed-off-by: Chinmay Agarwal Reviewed-by: Cong Wang Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20210127165453.GA20514@chinagar-linux.qualcomm.com Signed-off-by: Jakub Kicinski commit aa880c6f3ee6dbd0d5ab02026a514ff8ea0a3328 Author: Zyta Szpak Date: Thu Jan 21 16:52:37 2021 +0100 arm64: dts: ls1046a: fix dcfg address range Dcfg was overlapping with clockgen address space which resulted in failure in memory allocation for dcfg. According regs description dcfg size should not be bigger than 4KB. Signed-off-by: Zyta Szpak Fixes: 8126d88162a5 ("arm64: dts: add QorIQ LS1046A SoC support") Signed-off-by: Shawn Guo commit 045aef3acf38a490a741ba7bbfdc0d2cfa19d480 Merge: 1d69f9d901ef1 e478d6029dca9 Author: Greg Kroah-Hartman Date: Sat Jan 30 12:54:51 2021 +0100 Merge tag 'usb-serial-5.11-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial fixes for 5.11-rc6 Here are some new device-ids for 5.11-rc6. All but the option one have been in linux-next, and with no reported issues. * tag 'usb-serial-5.11-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: option: Adding support for Cinterion MV31 USB: serial: cp210x: add pid/vid for WSDA-200-USB USB: serial: cp210x: add new VID/PID for supporting Teraoka AD2000 commit 66f0a9e058fad50e569ad752be72e52701991fd5 Author: Masahiro Yamada Date: Thu Dec 24 02:11:42 2020 +0900 powerpc/vdso64: remove meaningless vgettimeofday.o build rule VDSO64 is only built for the 64-bit kernel, hence vgettimeofday.o is built by the generic rule in scripts/Makefile.build. This line does not provide anything useful. Signed-off-by: Masahiro Yamada Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201223171142.707053-2-masahiroy@kernel.org commit bce74491c3008e27dd6e8f79a83b4faa77a08f7e Author: Masahiro Yamada Date: Thu Dec 24 02:11:41 2020 +0900 powerpc/vdso: fix unnecessary rebuilds of vgettimeofday.o vgettimeofday.o is unnecessarily rebuilt. Adding it to 'targets' is not enough to fix the issue. Kbuild is correctly rebuilding it because the command line is changed. PowerPC builds each vdso directory twice; first in vdso_prepare to generate vdso{32,64}-offsets.h, second as part of the ordinary build process to embed vdso{32,64}.so.dbg into the kernel. The problem shows up when CONFIG_PPC_WERROR=y due to the following line in arch/powerpc/Kbuild: subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror In the preparation stage, Kbuild directly visits the vdso directories, hence it does not inherit subdir-ccflags-y. In the second descend, Kbuild adds -Werror, which results in the command line flipping with/without -Werror. It implies a potential danger; if a more critical flag that would impact the resulted vdso, the offsets recorded in the headers might be different from real offsets in the embedded vdso images. Removing the unneeded second descend solves the problem. Reported-by: Michael Ellerman Signed-off-by: Masahiro Yamada Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/linuxppc-dev/87tuslxhry.fsf@mpe.ellerman.id.au/ Link: https://lore.kernel.org/r/20201223171142.707053-1-masahiroy@kernel.org commit 344717a14cd7272f88346022a77742323346299e Author: Ravi Bangoria Date: Fri Jan 29 12:47:45 2021 +0530 powerpc/sstep: Fix array out of bound warning Compiling kernel with -Warray-bounds throws below warning: In function 'emulate_vsx_store': warning: array subscript is above array bounds [-Warray-bounds] buf.d[2] = byterev_8(reg->d[1]); ~~~~~^~~ buf.d[3] = byterev_8(reg->d[0]); ~~~~~^~~ Fix it by using temporary array variable 'union vsx_reg buf32[]' in that code block. Also, with element_size = 32, 'union vsx_reg *reg' is an array of size 2. So, use 'reg' as an array instead of pointer in the same code block. Fixes: af99da74333b ("powerpc/sstep: Support VSX vector paired storage access instructions") Suggested-by: Naveen N. Rao Signed-off-by: Ravi Bangoria Tested-by: Naveen N. Rao Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210129071745.111466-1-ravi.bangoria@linux.ibm.com commit 5399d52233c47905bbf97dcbaa2d7a9cc31670ba Author: David Howells Date: Fri Jan 29 23:53:50 2021 +0000 rxrpc: Fix deadlock around release of dst cached on udp tunnel AF_RXRPC sockets use UDP ports in encap mode. This causes socket and dst from an incoming packet to get stolen and attached to the UDP socket from whence it is leaked when that socket is closed. When a network namespace is removed, the wait for dst records to be cleaned up happens before the cleanup of the rxrpc and UDP socket, meaning that the wait never finishes. Fix this by moving the rxrpc (and, by dependence, the afs) private per-network namespace registrations to the device group rather than subsys group. This allows cached rxrpc local endpoints to be cleared and their UDP sockets closed before we try waiting for the dst records. The symptom is that lines looking like the following: unregister_netdevice: waiting for lo to become free get emitted at regular intervals after running something like the referenced syzbot test. Thanks to Vadim for tracking this down and work out the fix. Reported-by: syzbot+df400f2f24a1677cd7e0@syzkaller.appspotmail.com Reported-by: Vadim Fedorenko Fixes: 5271953cad31 ("rxrpc: Use the UDP encap_rcv hook") Signed-off-by: David Howells Acked-by: Vadim Fedorenko Link: https://lore.kernel.org/r/161196443016.3868642.5577440140646403533.stgit@warthog.procyon.org.uk Signed-off-by: Jakub Kicinski commit 8d520b4de3edca4f4fb242b5ddc659b6a9b9e65e Author: Heiner Kallweit Date: Thu Jan 28 23:01:54 2021 +0100 r8169: work around RTL8125 UDP hw bug It was reported that on RTL8125 network breaks under heavy UDP load, e.g. torrent traffic ([0], from comment 27). Realtek confirmed a hw bug and provided me with a test version of the r8125 driver including a workaround. Tests confirmed that the workaround fixes the issue. I modified the original version of the workaround to meet mainline code style. [0] https://bugzilla.kernel.org/show_bug.cgi?id=209839 v2: - rebased to net v3: - make rtl_skb_is_udp() more robust and use skb_header_pointer() to access the ip(v6) header v4: - remove dependency on ptp_classify.h - replace magic number with offsetof(struct udphdr, len) Fixes: f1bce4ad2f1c ("r8169: add support for RTL8125") Tested-by: xplo Signed-off-by: Heiner Kallweit Acked-by: Willem de Bruijn Link: https://lore.kernel.org/r/6e453d49-1801-e6de-d5f7-d7e6c7526c8f@gmail.com Signed-off-by: Jakub Kicinski commit 01365633bd1c836240f9bbf86bbeee749795480a Author: Ahmed S. Darwish Date: Thu Jan 28 20:48:02 2021 +0100 net: arcnet: Fix RESET flag handling The main arcnet interrupt handler calls arcnet_close() then arcnet_open(), if the RESET status flag is encountered. This is invalid: 1) In general, interrupt handlers should never call ->ndo_stop() and ->ndo_open() functions. They are usually full of blocking calls and other methods that are expected to be called only from drivers init and exit code paths. 2) arcnet_close() contains a del_timer_sync(). If the irq handler interrupts the to-be-deleted timer, del_timer_sync() will just loop forever. 3) arcnet_close() also calls tasklet_kill(), which has a warning if called from irq context. 4) For device reset, the sequence "arcnet_close(); arcnet_open();" is not complete. Some children arcnet drivers have special init/exit code sequences, which then embed a call to arcnet_open() and arcnet_close() accordingly. Check drivers/net/arcnet/com20020.c. Run the device RESET sequence from a scheduled workqueue instead. Signed-off-by: Ahmed S. Darwish Signed-off-by: Sebastian Andrzej Siewior Link: https://lore.kernel.org/r/20210128194802.727770-1-a.darwish@linutronix.de Signed-off-by: Jakub Kicinski commit 4c457e8cb75eda91906a4f89fc39bde3f9a43922 Author: Marc Zyngier Date: Sat Jan 23 12:27:59 2021 +0000 genirq/msi: Activate Multi-MSI early when MSI_FLAG_ACTIVATE_EARLY is set When MSI_FLAG_ACTIVATE_EARLY is set (which is the case for PCI), __msi_domain_alloc_irqs() performs the activation of the interrupt (which in the case of PCI results in the endpoint being programmed) as soon as the interrupt is allocated. But it appears that this is only done for the first vector, introducing an inconsistent behaviour for PCI Multi-MSI. Fix it by iterating over the number of vectors allocated to each MSI descriptor. This is easily achieved by introducing a new "for_each_msi_vector" iterator, together with a tiny bit of refactoring. Fixes: f3b0946d629c ("genirq/msi: Make sure PCI MSIs are activated early") Reported-by: Shameer Kolothum Signed-off-by: Marc Zyngier Signed-off-by: Thomas Gleixner Tested-by: Shameer Kolothum Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210123122759.1781359-1-maz@kernel.org commit 32ada6b0980d86133d080d62371a5787ea2ec5ed Author: Rob Herring Date: Thu Jan 28 13:45:15 2021 -0600 dt-bindings: Cleanup standard unit properties Properties with standard unit suffixes already have a type and don't need type definitions. They also default to a single entry, so 'maxItems: 1' can be dropped. adi,ad5758 is an oddball which defined an enum of arrays. While a valid schema, it is simpler as a whole to only define scalar constraints. Cc: Jean Delvare Cc: Lars-Peter Clausen Cc: Dmitry Torokhov Cc: Ulf Hansson Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Serge Semin Cc: linux-hwmon@vger.kernel.org Cc: linux-i2c@vger.kernel.org Cc: linux-iio@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-input@vger.kernel.org Cc: linux-mmc@vger.kernel.org Cc: netdev@vger.kernel.org Cc: linux-pm@vger.kernel.org Cc: linux-rtc@vger.kernel.org Cc: linux-serial@vger.kernel.org Cc: alsa-devel@alsa-project.org Cc: linux-watchdog@vger.kernel.org Signed-off-by: Rob Herring Acked-by: Guenter Roeck Acked-by: Mark Brown Acked-by: Wolfram Sang # for I2C Acked-by: Alexandre Belloni Acked-by: Greg Kroah-Hartman Acked-by: Sebastian Reichel # for power-supply Acked-by: Jonathan Cameron #for-iio Acked-by: Alexandre TORGUE Link: https://lore.kernel.org/r/20210128194515.743252-1-robh@kernel.org commit 0188b87899ffc4a1d36a0badbe77d56c92fd91dc Author: Wang ShaoBo Date: Thu Jan 28 20:44:27 2021 +0800 kretprobe: Avoid re-registration of the same kretprobe earlier Our system encountered a re-init error when re-registering same kretprobe, where the kretprobe_instance in rp->free_instances is illegally accessed after re-init. Implementation to avoid re-registration has been introduced for kprobe before, but lags for register_kretprobe(). We must check if kprobe has been re-registered before re-initializing kretprobe, otherwise it will destroy the data struct of kretprobe registered, which can lead to memory leak, system crash, also some unexpected behaviors. We use check_kprobe_rereg() to check if kprobe has been re-registered before running register_kretprobe()'s body, for giving a warning message and terminate registration process. Link: https://lkml.kernel.org/r/20210128124427.2031088-1-bobo.shaobowang@huawei.com Cc: stable@vger.kernel.org Fixes: 1f0ab40976460 ("kprobes: Prevent re-registration of the same kprobe") [ The above commit should have been done for kretprobes too ] Acked-by: Naveen N. Rao Acked-by: Ananth N Mavinakayanahalli Acked-by: Masami Hiramatsu Signed-off-by: Wang ShaoBo Signed-off-by: Cheng Jian Signed-off-by: Steven Rostedt (VMware) commit 0e9bcda5d286f4a26a5407bb38f55c55b453ecfb Merge: c05d51c773fb3 a1df829ead587 Author: Linus Torvalds Date: Fri Jan 29 13:59:24 2021 -0800 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Catalin Marinas: - Fix the virt_addr_valid() returning true for < PAGE_OFFSET addresses. - Do not blindly trust the DMA masks from ACPI/IORT. * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: ACPI/IORT: Do not blindly trust DMA masks from firmware arm64: Fix kernel address detection of __is_lm_address() commit c05d51c773fb365bdbd683b3e4e80679c8b8b176 Merge: 2ba1c4d1a4b5f 9ad6d91f056b9 Author: Linus Torvalds Date: Fri Jan 29 13:54:40 2021 -0800 Merge tag 'for-5.11-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "A few more fixes for a late rc: - fix lockdep complaint on 32bit arches and also remove an unsafe memory use due to device vs filesystem lifetime - two fixes for free space tree: * race during log replay and cache rebuild, now more likely to happen due to changes in this dev cycle * possible free space tree corruption with online conversion during initial tree population" * tag 'for-5.11-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: fix log replay failure due to race with space cache rebuild btrfs: fix lockdep warning due to seqcount_mutex on 32bit arch btrfs: fix possible free space tree corruption with online conversion commit 2ba1c4d1a4b5fb9961452286bdcad502b0c8b78a Merge: c0ec4ffc40939 cd92cdb9c8bcf Author: Linus Torvalds Date: Fri Jan 29 13:50:06 2021 -0800 Merge tag 'block-5.11-2021-01-29' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "All over the place fixes for this release: - blk-cgroup iteration teardown resched fix (Baolin) - NVMe pull request from Christoph: - add another Write Zeroes quirk (Chaitanya Kulkarni) - handle a no path available corner case (Daniel Wagner) - use the proper RCU aware list_add helper (Chao Leng) - bcache regression fix (Coly) - bdev->bd_size_lock IRQ fix. This will be fixed in drivers for 5.12, but for now, we'll make it IRQ safe (Damien) - null_blk zoned init fix (Damien) - add_partition() error handling fix (Dinghao) - s390 dasd kobject fix (Jan) - nbd fix for freezing queue while adding connections (Josef) - tag queueing regression fix (Ming) - revert of a patch that inadvertently meant that we regressed write performance on raid (Maxim)" * tag 'block-5.11-2021-01-29' of git://git.kernel.dk/linux-block: null_blk: cleanup zoned mode initialization nvme-core: use list_add_tail_rcu instead of list_add_tail for nvme_init_ns_head nvme-multipath: Early exit if no path is available nvme-pci: add the DISABLE_WRITE_ZEROES quirk for a SPCC device bcache: only check feature sets when sb->version >= BCACHE_SB_VERSION_CDEV_WITH_FEATURES block: fix bd_size_lock use blk-cgroup: Use cond_resched() when destroy blkgs Revert "block: simplify set_init_blocksize" to regain lost performance nbd: freeze the queue while we're adding connections s390/dasd: Fix inconsistent kobject removal block: Fix an error handling in add_partition blk-mq: test QUEUE_FLAG_HCTX_ACTIVE for sbitmap_shared in hctx_may_queue commit c0ec4ffc40939e9a5a5844ce455f2b5b66a005fd Merge: 8ef24c2011b77 3a7efd1ad269c Author: Linus Torvalds Date: Fri Jan 29 13:47:47 2021 -0800 Merge tag 'io_uring-5.11-2021-01-29' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: "We got the cancelation story sorted now, so for all intents and purposes, this should be it for 5.11 outside of any potential little fixes that may come in. This contains: - task_work task state fixes (Hao, Pavel) - Cancelation fixes (me, Pavel) - Fix for an inflight req patch in this release (Pavel) - Fix for a lock deadlock issue (Pavel)" * tag 'io_uring-5.11-2021-01-29' of git://git.kernel.dk/linux-block: io_uring: reinforce cancel on flush during exit io_uring: fix sqo ownership false positive warning io_uring: fix list corruption for splice file_get io_uring: fix flush cqring overflow list while TASK_INTERRUPTIBLE io_uring: fix wqe->lock/completion_lock deadlock io_uring: fix cancellation taking mutex while TASK_UNINTERRUPTIBLE io_uring: fix __io_uring_files_cancel() with TASK_UNINTERRUPTIBLE io_uring: only call io_cqring_ev_posted() if events were posted io_uring: if we see flush on exit, cancel related tasks commit 1bea2a937dadd188de70198b0cf3915e05a506e4 Author: David Gow Date: Tue Jan 26 19:36:04 2021 -0800 soc: litex: Properly depend on HAS_IOMEM The LiteX SOC controller driver makes use of IOMEM functions like devm_platform_ioremap_resource(), which are only available if CONFIG_HAS_IOMEM is defined. This causes the driver to be enable under make ARCH=um allyesconfig, even though it won't build. By adding a dependency on HAS_IOMEM, the driver will not be enabled on architectures which don't support it. Fixes: 22447a99c97e ("drivers/soc/litex: add LiteX SoC Controller driver") Signed-off-by: David Gow [shorne@gmail.com: Fix typo in commit message pointed out in review] Signed-off-by: Stafford Horne commit 8ef24c2011b77bd6344d16630d3cd95d63de63f8 Merge: 32b0c410cda19 29b32839725f8 Author: Linus Torvalds Date: Fri Jan 29 13:32:05 2021 -0800 Merge tag 'iommu-fixes-v5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull iommu fixes from Joerg Roedel: - AMD IOMMU fix to make sure features are detected before they are queried. - Intel IOMMU address alignment check fix for an IOLTB flushing command. - Performance fix for Intel IOMMU to make sure the code does not do full IOTLB flushes all the time. Those flushes are very expensive on emulated IOMMUs. * tag 'iommu-fixes-v5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/vt-d: Do not use flush-queue when caching-mode is on iommu/vt-d: Correctly check addr alignment in qi_flush_dev_iotlb_pasid() iommu/amd: Use IVHD EFR for early initialization of IOMMU features commit 32b0c410cda19df9f0e88edcae126d0a660cf8b9 Merge: 016decc0d836b fef9c8d28e28a Author: Linus Torvalds Date: Fri Jan 29 13:30:09 2021 -0800 Merge tag 'pm-5.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These fix a deadlock in the 'kexec jump' code and address a possible hibernation image creation issue. Specifics: - Fix a deadlock caused by attempting to acquire the same mutex twice in a row in the "kexec jump" code (Baoquan He) - Modify the hibernation image saving code to flush the unwritten data to the swap storage later so as to avoid failing to write the image signature which is possible in some cases (Laurent Badel)" * tag 'pm-5.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM: hibernate: flush swap writer after marking kernel: kexec: remove the lock operation of system_transition_mutex commit 016decc0d836b746faac03de5e1ac976c53a3958 Merge: 6305d15e013a7 b584b7e9630ac Author: Linus Torvalds Date: Fri Jan 29 13:23:21 2021 -0800 Merge tag 'acpi-5.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These fix the handling of notifications in the ACPI thermal driver and address a device enumeration issue leading to the presence of multiple 'MODALIAS=' entries in one uevent file in sysfs in some cases. Specifics: - Modify the ACPI thermal driver to avoid evaluating _TMP directly in its Notify () handler callback and running too many thermal checks for one thermal zone at the same time so as to address a work item accumulation issue observed on some systems that fail to shut down as a result of it (Rafael Wysocki) - Modify the ACPI uevent file creation code to avoid putting multiple 'MODALIAS=' entries in one uevent file in sysfs which breaks systemd-udevd (Kai-Heng Feng)" * tag 'acpi-5.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: thermal: Do not call acpi_thermal_check() directly ACPI: sysfs: Prefer "compatible" modalias commit 6305d15e013a70a7f1c4ee65d3e035cd705e3517 Merge: a9cbbb80e3e7d e0ecafede87eb Author: Linus Torvalds Date: Fri Jan 29 13:18:23 2021 -0800 Merge tag 'drm-fixes-2021-01-29' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Weekly fixes for graphics, nothing too major, nouveau has a few regression fixes for various fallout from header changes previously, vc4 has two fixes, two amdgpu, and a smattering of i915 fixes. All seems on course for a quieter rc7, fingers crossed. nouveau: - fix svm init conditions - fix nv50 modesetting regression - fix cursor plane modifiers - fix > 64x64 cursor regression vc4: - Fix LBM size calculation - Fix high resolutions for hvs5 i915: - Fix ICL MG PHY vswing - Fix subplatform handling - Fix selftest memleak - Clear CACHE_MODE prior to clearing residuals - Always flush the active worker before returning from the wait - Always try to reserve GGTT address 0x0 amdgpu: - Fix a fan control regression on some boards - Fix clang warning" * tag 'drm-fixes-2021-01-29' of git://anongit.freedesktop.org/drm/drm: drm/nouveau/kms/gk104-gp1xx: Fix > 64x64 cursors drm/nouveau/kms/nv50-: Report max cursor size to userspace drivers/nouveau/kms/nv50-: Reject format modifiers for cursor planes drm/nouveau/svm: fail NOUVEAU_SVM_INIT ioctl on unsupported devices drm/nouveau/dispnv50: Restore pushing of all data. amdgpu: fix clang build warning Revert "drm/amdgpu/swsmu: drop set_fan_speed_percent (v2)" drm/i915/gt: Always try to reserve GGTT address 0x0 drm/i915: Always flush the active worker before returning from the wait drm/i915/selftest: Fix potential memory leak drm/i915: Check for all subplatform bits drm/i915: Fix ICL MG PHY vswing handling drm/i915/gt: Clear CACHE_MODE prior to clearing residuals drm/vc4: Correct POS1_SCL for hvs5 drm/vc4: Correct lbm size and calculation drm/nouveau/nvif: fix method count when pushing an array commit a9cbbb80e3e7dd38ceac166e0698f161862a18ae Author: Linus Torvalds Date: Fri Jan 29 12:28:20 2021 -0800 tty: avoid using vfs_iocb_iter_write() for redirected console writes It turns out that the vfs_iocb_iter_{read,write}() functions are entirely broken, and don't actually use the passed-in file pointer for IO - only for the preparatory work (permission checking and for the write_iter function lookup). That worked fine for overlayfs, which always builds the new iocb with the same file pointer that it passes in, but in the general case it ends up doing nonsensical things (and could cause an iterator call that doesn't even match the passed-in file pointer). This subtly broke the tty conversion to write_iter in commit 9bb48c82aced ("tty: implement write_iter"), because the console redirection didn't actually end up redirecting anything, since the passed-in file pointer was basically ignored, and the actual write was done with the original non-redirected console tty after all. The main visible effect of this is that the console messages were no longer logged to /var/log/boot.log during graphical boot. Fix the issue by simply not using the vfs write "helper" function at all, and just redirecting the write entirely internally to the tty layer. Do the target writability permission checks when actually registering the target tty with TIOCCONS instead of at write time. Fixes: 9bb48c82aced ("tty: implement write_iter") Reported-and-tested-by: Hans de Goede Cc: Greg Kroah-Hartman Cc: stable@kernel.org Signed-off-by: Linus Torvalds commit ed4e9e615b7ec4992a4eba1643e62ec2d9d979db Author: Nathan Chancellor Date: Wed Jan 13 17:34:47 2021 -0700 Documentation/llvm: Add a section about supported architectures The most common question around building the Linux kernel with clang is "does it work?" and the answer has always been "it depends on your architecture, configuration, and LLVM version" with no hard answers for users wanting to experiment. LLVM support has significantly improved over the past couple of years, resulting in more architectures and configurations supported, and continuous integration has made it easier to see what works and what does not. Add a section that goes over what architectures are supported in the current kernel version, how they should be built (with just clang or the LLVM utilities as well), and the level of support they receive. This will make it easier for people to try out building their kernel with LLVM and reporting issues that come about from it. Suggested-by: Miguel Ojeda Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Masahiro Yamada commit 97c753e62e6c31a404183898d950d8c08d752dbd Author: Masami Hiramatsu Date: Thu Jan 28 00:37:51 2021 +0900 tracing/kprobe: Fix to support kretprobe events on unloaded modules Fix kprobe_on_func_entry() returns error code instead of false so that register_kretprobe() can return an appropriate error code. append_trace_kprobe() expects the kprobe registration returns -ENOENT when the target symbol is not found, and it checks whether the target module is unloaded or not. If the target module doesn't exist, it defers to probe the target symbol until the module is loaded. However, since register_kretprobe() returns -EINVAL instead of -ENOENT in that case, it always fail on putting the kretprobe event on unloaded modules. e.g. Kprobe event: /sys/kernel/debug/tracing # echo p xfs:xfs_end_io >> kprobe_events [ 16.515574] trace_kprobe: This probe might be able to register after target module is loaded. Continue. Kretprobe event: (p -> r) /sys/kernel/debug/tracing # echo r xfs:xfs_end_io >> kprobe_events sh: write error: Invalid argument /sys/kernel/debug/tracing # cat error_log [ 41.122514] trace_kprobe: error: Failed to register probe event Command: r xfs:xfs_end_io ^ To fix this bug, change kprobe_on_func_entry() to detect symbol lookup failure and return -ENOENT in that case. Otherwise it returns -EINVAL or 0 (succeeded, given address is on the entry). Link: https://lkml.kernel.org/r/161176187132.1067016.8118042342894378981.stgit@devnote2 Cc: stable@vger.kernel.org Fixes: 59158ec4aef7 ("tracing/kprobes: Check the probe on unloaded module correctly") Reported-by: Jianlin Lv Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit da7f84cdf02fd5f66864041f45018b328911b722 Author: Viktor Rosendahl Date: Tue Jan 19 17:43:43 2021 +0100 tracing: Use pause-on-trace with the latency tracers Eaerlier, tracing was disabled when reading the trace file. This behavior was changed with: commit 06e0a548bad0 ("tracing: Do not disable tracing when reading the trace file"). This doesn't seem to work with the latency tracers. The above mentioned commit dit not only change the behavior but also added an option to emulate the old behavior. The idea with this patch is to enable this pause-on-trace option when the latency tracers are used. Link: https://lkml.kernel.org/r/20210119164344.37500-2-Viktor.Rosendahl@bmw.de Cc: stable@vger.kernel.org Fixes: 06e0a548bad0 ("tracing: Do not disable tracing when reading the trace file") Signed-off-by: Viktor Rosendahl Signed-off-by: Steven Rostedt (VMware) commit 7e0a9220467dbcfdc5bc62825724f3e52e50ab31 Author: Steven Rostedt (VMware) Date: Fri Jan 29 10:13:53 2021 -0500 fgraph: Initialize tracing_graph_pause at task creation On some archs, the idle task can call into cpu_suspend(). The cpu_suspend() will disable or pause function graph tracing, as there's some paths in bringing down the CPU that can have issues with its return address being modified. The task_struct structure has a "tracing_graph_pause" atomic counter, that when set to something other than zero, the function graph tracer will not modify the return address. The problem is that the tracing_graph_pause counter is initialized when the function graph tracer is enabled. This can corrupt the counter for the idle task if it is suspended in these architectures. CPU 1 CPU 2 ----- ----- do_idle() cpu_suspend() pause_graph_tracing() task_struct->tracing_graph_pause++ (0 -> 1) start_graph_tracing() for_each_online_cpu(cpu) { ftrace_graph_init_idle_task(cpu) task-struct->tracing_graph_pause = 0 (1 -> 0) unpause_graph_tracing() task_struct->tracing_graph_pause-- (0 -> -1) The above should have gone from 1 to zero, and enabled function graph tracing again. But instead, it is set to -1, which keeps it disabled. There's no reason that the field tracing_graph_pause on the task_struct can not be initialized at boot up. Cc: stable@vger.kernel.org Fixes: 380c4b1411ccd ("tracing/function-graph-tracer: append the tracing_graph_flag") Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=211339 Reported-by: pierre.gondois@arm.com Signed-off-by: Steven Rostedt (VMware) commit 8c65830ae1629b03e5d65e9aafae7e2cf5f8b743 Author: James Smart Date: Wed Jan 27 14:16:01 2021 -0800 scsi: lpfc: Fix EEH encountering oops with NVMe traffic In testing, in a configuration with Redfish and native NVMe multipath when an EEH is injected, a kernel oops is being encountered: (unreliable) lpfc_nvme_ls_req+0x328/0x720 [lpfc] __nvme_fc_send_ls_req.constprop.13+0x1d8/0x3d0 [nvme_fc] nvme_fc_create_association+0x224/0xd10 [nvme_fc] nvme_fc_reset_ctrl_work+0x110/0x154 [nvme_fc] process_one_work+0x304/0x5d the NBMe transport is issuing a Disconnect LS request, which the driver receives and tries to post but the work queue used by the driver is already being torn down by the eeh. Fix by validating the validity of the work queue before proceeding with the LS transmit. Link: https://lore.kernel.org/r/20210127221601.84878-1-jsmart2021@gmail.com Reviewed-by: Ewan D. Milne Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 20bf2b378729c4a0366a53e2018a0b70ace94bcd Author: Josh Poimboeuf Date: Thu Jan 28 15:52:19 2021 -0600 x86/build: Disable CET instrumentation in the kernel With retpolines disabled, some configurations of GCC, and specifically the GCC versions 9 and 10 in Ubuntu will add Intel CET instrumentation to the kernel by default. That breaks certain tracing scenarios by adding a superfluous ENDBR64 instruction before the fentry call, for functions which can be called indirectly. CET instrumentation isn't currently necessary in the kernel, as CET is only supported in user space. Disable it unconditionally and move it into the x86's Makefile as CET/CFI... enablement should be a per-arch decision anyway. [ bp: Massage and extend commit message. ] Fixes: 29be86d7f9cb ("kbuild: add -fcf-protection=none when using retpoline flags") Reported-by: Nikolay Borisov Signed-off-by: Josh Poimboeuf Signed-off-by: Borislav Petkov Reviewed-by: Nikolay Borisov Tested-by: Nikolay Borisov Cc: Cc: Seth Forshee Cc: Masahiro Yamada Link: https://lkml.kernel.org/r/20210128215219.6kct3h2eiustncws@treble commit b584b7e9630acc65a4d01ff5f9090d1a0fb3bbb6 Merge: 81b704d3e4674 36af2d5c4433f Author: Rafael J. Wysocki Date: Fri Jan 29 16:28:48 2021 +0100 Merge branch 'acpi-sysfs' * acpi-sysfs: ACPI: sysfs: Prefer "compatible" modalias commit cd92cdb9c8bcfc27a8f28bcbf7c414a0ea79e5ec Author: Damien Le Moal Date: Fri Jan 29 23:47:25 2021 +0900 null_blk: cleanup zoned mode initialization To avoid potential compilation problems, replaced the badly written MB_TO_SECTS() macro (missing parenthesis around the argument use) with the inline function mb_to_sects(). And while at it, simplify the calculation of the total number of zones of the device using the round_up() macro. Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe commit 1074f8ec288f537f3b8462d09997a69b40f87e38 Author: Miguel Ojeda Date: Fri Jan 29 15:00:23 2021 +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 c351bb64cbe67029c68dea3adbec1b9508c6ff0f Author: Quanyang Wang Date: Fri Jan 29 16:19:17 2021 +0800 gpiolib: free device name on error path to fix kmemleak In gpiochip_add_data_with_key, we should check the return value of dev_set_name to ensure that device name is allocated successfully and then add a label on the error path to free device name to fix kmemleak as below: unreferenced object 0xc2d6fc40 (size 64): comm "kworker/0:1", pid 16, jiffies 4294937425 (age 65.120s) hex dump (first 32 bytes): 67 70 69 6f 63 68 69 70 30 00 1a c0 54 63 1a c0 gpiochip0...Tc.. 0c ed 84 c0 48 ed 84 c0 3c ee 84 c0 10 00 00 00 ....H...<....... backtrace: [<962810f7>] kobject_set_name_vargs+0x2c/0xa0 [] dev_set_name+0x2c/0x5c [<94abbca9>] gpiochip_add_data_with_key+0xfc/0xce8 [<5c4193e0>] omap_gpio_probe+0x33c/0x68c [<3402f137>] platform_probe+0x58/0xb8 [<7421e210>] really_probe+0xec/0x3b4 [<000f8ada>] driver_probe_device+0x58/0xb4 [<67e0f7f7>] bus_for_each_drv+0x80/0xd0 [<4de545dc>] __device_attach+0xe8/0x15c [<2e4431e7>] bus_probe_device+0x84/0x8c [] device_add+0x384/0x7c0 [<5aff2995>] of_platform_device_create_pdata+0x8c/0xb8 [<061c3483>] of_platform_bus_create+0x198/0x230 [<5ee6d42a>] of_platform_populate+0x60/0xb8 [<2647300f>] sysc_probe+0xd18/0x135c [<3402f137>] platform_probe+0x58/0xb8 Signed-off-by: Quanyang Wang Cc: stable@vger.kernel.org Signed-off-by: Bartosz Golaszewski commit 538eea5362a1179dfa7770dd2b6607dc30cc50c6 Author: Dmitry Osipenko Date: Tue Dec 15 16:16:44 2020 +0100 ARM: 9043/1: tegra: Fix misplaced tegra_uart_config in decompressor The tegra_uart_config of the DEBUG_LL code is now placed right at the start of the .text section after commit which enabled debug output in the decompressor. Tegra devices are not booting anymore if DEBUG_LL is enabled since tegra_uart_config data is executes as a code. Fix the misplaced tegra_uart_config storage by embedding it into the code. Cc: stable@vger.kernel.org Fixes: 2596a72d3384 ("ARM: 9009/1: uncompress: Enable debug in head.S") Reviewed-by: Linus Walleij Signed-off-by: Dmitry Osipenko Signed-off-by: Russell King commit 39d3454c3513840eb123b3913fda6903e45ce671 Author: Russell King Date: Sun Oct 18 09:39:21 2020 +0100 ARM: footbridge: fix dc21285 PCI configuration accessors Building with gcc 4.9.2 reveals a latent bug in the PCI accessors for Footbridge platforms, which causes a fatal alignment fault while accessing IO memory. Fix this by making the assembly volatile. Cc: stable@vger.kernel.org Signed-off-by: Russell King commit 06cc6e5dc659e1995804cbeda643d0fa45b68999 Merge: 909b447dcc45d 150a27328b681 Author: Jakub Kicinski Date: Thu Jan 28 21:07:44 2021 -0800 Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2021-01-29 1) Fix two copy_{from,to}_user() warn_on_once splats for BPF cgroup getsockopt infra when user space is trying to race against optlen, from Loris Reiff. 2) Fix a missing fput() in BPF inode storage map update helper, from Pan Bian. 3) Fix a build error on unresolved symbols on disabled networking / keys LSM hooks, from Mikko Ylinen. 4) Fix preload BPF prog build when the output directory from make points to a relative path, from Quentin Monnet. * https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: bpf, preload: Fix build when $(O) points to a relative path bpf: Drop disabled LSM hooks from the sleepable set bpf, inode_storage: Put file handler if no storage was found bpf, cgroup: Fix problematic bounds check bpf, cgroup: Fix optlen WARN_ON_ONCE toctou ==================== Link: https://lore.kernel.org/r/20210129001556.6648-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit 0d4873f9aa4ff8fc1d63a5755395b794d32ce046 Author: Ronnie Sahlberg Date: Thu Jan 28 21:35:10 2021 -0600 cifs: fix dfs domain referrals The new mount API requires additional changes to how DFS is handled. Additional testing of DFS uncovered problems with domain based DFS referrals (a follow on patch addresses DFS links) which this patch addresses. Signed-off-by: Ronnie Sahlberg Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit bec4c2968fce2f44ce62d05288a633cd99a722eb Merge: 909b447dcc45d 0b964446c63f9 Author: Linus Torvalds Date: Thu Jan 28 19:40:26 2021 -0800 Merge tag 'ecryptfs-5.11-rc6-setxattr-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs Pull ecryptfs fix from Tyler Hicks: "Fix a regression that resulted in two rounds of UID translations when setting v3 namespaced file capabilities in some configurations" * tag 'ecryptfs-5.11-rc6-setxattr-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs: ecryptfs: fix uid translation for setxattr on security.capability commit e0ecafede87eb1a3d1e708f0365fad0d59489285 Merge: 9a1054c32a778 00190bc087e79 Author: Dave Airlie Date: Fri Jan 29 11:36:38 2021 +1000 Merge tag 'amd-drm-fixes-5.11-2021-01-28' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-5.11-2021-01-28: amdgpu: - Fix a fan control regression on some boards - Fix clang warning Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210128191558.3821-1-alexander.deucher@amd.com commit 9a1054c32a7786eb2185224982ef7c9cc1c6f8c6 Merge: fb62b7b986729 489140b5ba2e7 Author: Dave Airlie Date: Fri Jan 29 11:33:37 2021 +1000 Merge tag 'drm-intel-fixes-2021-01-28' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes drm/i915 fixes for v5.11-rc6: - Fix ICL MG PHY vswing - Fix subplatform handling - Fix selftest memleak - Clear CACHE_MODE prior to clearing residuals - Always flush the active worker before returning from the wait - Always try to reserve GGTT address 0x0 Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87y2gdi3mp.fsf@intel.com commit fb62b7b986729334f8ea624f2c1ba1f7370eb0e0 Merge: 87bff7580044c f6b57101a6b31 Author: Dave Airlie Date: Fri Jan 29 11:32:30 2021 +1000 Merge tag 'drm-misc-fixes-2021-01-27' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Short summary of fixes pull (less than what git shortlog provides): * drm/vc4: Fix LBM size calculation; Fix high resolutions for hvs5 Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/YBEco1Vxeny8U/ca@linux-uq9g commit 87bff7580044ca574b1f434d68afabbc1d81e9a6 Merge: 6ee1d745b7c9f ba839b7598440 Author: Dave Airlie Date: Fri Jan 29 11:05:41 2021 +1000 Merge branch '04.01-ampere-lite' of git://github.com/skeggsb/linux into drm-fixes Mostly a regression fixes here, a couple of which could lead to display hanging, and have been affecting a number of users. Signed-off-by: Dave Airlie From: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/CACAvsv4Y0ZiAevSvgphLAOaZjFi75ECXqUD9ShBvRxZ6S-pb9Q@mail.gmail.com commit ba839b7598440a5d78550a115bac21b08d57cc32 Author: Lyude Paul Date: Mon Jan 18 20:54:14 2021 -0500 drm/nouveau/kms/gk104-gp1xx: Fix > 64x64 cursors While we do handle the additional cursor sizes introduced in NVE4, it looks like we accidentally broke this when converting over to use Nvidia's display headers. Since we now use NVVAL in dispnv50/head907d.c in order to format the value for the cursor layout and NVD9 only had one byte reserved vs. the 2 bytes reserved in later generations, we end up accidentally stripping the second bit in the cursor layout format parameter - causing us to set the wrong cursor size. This fixes that by adding our own curs_set hook for 917d which uses the NV917D headers. Cc: Martin Peres Cc: Jeremy Cline Cc: Simon Ser Cc: # v5.9+ Signed-off-by: Lyude Paul Fixes: ed0b86a90bf9 ("drm/nouveau/kms/nv50-: use NVIDIA's headers for core head_curs_set()") Signed-off-by: Ben Skeggs commit d3b2f0f7921c75b5f0de50e618e4bd165fded3e1 Author: Lyude Paul Date: Mon Jan 18 20:54:13 2021 -0500 drm/nouveau/kms/nv50-: Report max cursor size to userspace Cc: Martin Peres Cc: Jeremy Cline Cc: Simon Ser Signed-off-by: Lyude Paul Tested-by: Simon Ser Signed-off-by: Ben Skeggs commit 7c6d659868c77da9b518f32348160340dcdfa008 Author: Lyude Paul Date: Mon Jan 18 20:54:12 2021 -0500 drivers/nouveau/kms/nv50-: Reject format modifiers for cursor planes Nvidia hardware doesn't actually support using tiling formats with the cursor plane, only linear is allowed. In the future, we should write a testcase for this. Fixes: c586f30bf74c ("drm/nouveau/kms: Add format mod prop to base/ovly/nvdisp") Cc: James Jones Cc: Martin Peres Cc: Jeremy Cline Cc: Simon Ser Cc: # v5.8+ Signed-off-by: Lyude Paul Reviewed-by: Simon Ser Reviewed-by: James Jones Signed-off-by: Ben Skeggs commit dcd602cc5fe2803bf532d407cde24ba0b7808ff3 Author: Karol Herbst Date: Mon Jan 18 18:16:06 2021 +0100 drm/nouveau/svm: fail NOUVEAU_SVM_INIT ioctl on unsupported devices Fixes a crash when trying to create a channel on e.g. Turing GPUs when NOUVEAU_SVM_INIT was called before. Fixes: eeaf06ac1a558 ("drm/nouveau/svm: initial support for shared virtual memory") Signed-off-by: Karol Herbst Signed-off-by: Ben Skeggs commit fd55b61ebd31449549e14c33574825d64de2b29b Author: Bastian Beranek Date: Thu Jan 21 15:27:36 2021 +0100 drm/nouveau/dispnv50: Restore pushing of all data. Commit f844eb485eb056ad3b67e49f95cbc6c685a73db4 introduced a regression for NV50, which lead to visual artifacts, tearing and eventual crashes. In the changes of f844eb485eb056ad3b67e49f95cbc6c685a73db4 only the first line was correctly translated to the new NVIDIA header macros: - PUSH_NVSQ(push, NV827C, 0x0110, 0, - 0x0114, 0); + PUSH_MTHD(push, NV827C, SET_PROCESSING, + NVDEF(NV827C, SET_PROCESSING, USE_GAIN_OFS, DISABLE)); The lower part ("0x0114, 0") was probably omitted by accident. This patch restores the push of the missing data and fixes the regression. Signed-off-by: Bastian Beranek Fixes: f844eb485eb05 ("drm/nouveau/kms/nv50-: use NVIDIA's headers for wndw image_set()") Link: https://gitlab.freedesktop.org/drm/nouveau/-/issues/14 Signed-off-by: Ben Skeggs commit 3a7efd1ad269ccaf9c1423364d97c9661ba6dafa Author: Pavel Begunkov Date: Thu Jan 28 23:23:42 2021 +0000 io_uring: reinforce cancel on flush during exit What 84965ff8a84f0 ("io_uring: if we see flush on exit, cancel related tasks") really wants is to cancel all relevant REQ_F_INFLIGHT requests reliably. That can be achieved by io_uring_cancel_files(), but we'll miss it calling io_uring_cancel_task_requests(files=NULL) from io_uring_flush(), because it will go through __io_uring_cancel_task_requests(). Just always call io_uring_cancel_files() during cancel, it's good enough for now. Cc: stable@vger.kernel.org # 5.9+ Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 909b447dcc45db2f9bd5f495f1d16c419812e6df Merge: c64396cc36c6e b8323f7288abd Author: Linus Torvalds Date: Thu Jan 28 15:24:43 2021 -0800 Merge tag 'net-5.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Networking fixes including fixes from can, xfrm, wireless, wireless-drivers and netfilter trees. Nothing scary, Intel WiFi-related fixes seemed most notable to the users. Current release - regressions: - dsa: microchip: ksz8795: fix KSZ8794 port map again to program the CPU port correctly Current release - new code bugs: - iwlwifi: pcie: reschedule in long-running memory reads Previous releases - regressions: - iwlwifi: dbg: don't try to overwrite read-only FW data - iwlwifi: provide gso_type to GSO packets - octeontx2: make sure the buffer is 128 byte aligned - tcp: make TCP_USER_TIMEOUT accurate for zero window probes - xfrm: fix wraparound in xfrm_policy_addr_delta() - xfrm: fix oops in xfrm_replay_advance_bmp due to a race between CPUs in presence of packet reorder - tcp: fix TLP timer not set when CA_STATE changes from DISORDER to OPEN - wext: fix NULL-ptr-dereference with cfg80211's lack of commit() Previous releases - always broken: - igc: fix link speed advertising - stmmac: configure EHL PSE0 GbE and PSE1 GbE to 32 bits DMA addressing - team: protect features update by RCU to avoid deadlock - xfrm: fix disable_xfrm sysctl when used on xfrm interfaces themselves - fec: fix temporary RMII clock reset on link up - can: dev: prevent potential information leak in can_fill_info() Misc: - mrp: fix bad packing of MRP test packet structures - uapi: fix big endian definition of ipv6_rpl_sr_hdr - add David Ahern to IPv4/IPv6 maintainers" * tag 'net-5.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (86 commits) rxrpc: Fix memory leak in rxrpc_lookup_local mlxsw: spectrum_span: Do not overwrite policer configuration selftests: forwarding: Specify interface when invoking mausezahn stmmac: intel: Configure EHL PSE0 GbE and PSE1 GbE to 32 bits DMA addressing net: usb: cdc_ether: added support for Thales Cinterion PLSx3 modem family. ibmvnic: Ensure that CRQ entry read are correctly ordered MAINTAINERS: add missing header for bonding net: decnet: fix netdev refcount leaking on error path net: switchdev: don't set port_obj_info->handled true when -EOPNOTSUPP can: dev: prevent potential information leak in can_fill_info() net: fec: Fix temporary RMII clock reset on link up net: lapb: Add locking to the lapb module team: protect features update by RCU to avoid deadlock MAINTAINERS: add David Ahern to IPv4/IPv6 maintainers net/mlx5: CT: Fix incorrect removal of tuple_nat_node from nat rhashtable net/mlx5e: Revert parameters on errors when changing MTU and LRO state without reset net/mlx5e: Revert parameters on errors when changing trust state without reset net/mlx5e: Correctly handle changing the number of queues when the interface is down net/mlx5e: Fix CT rule + encap slow path offload and deletion net/mlx5e: Disable hw-tc-offload when MLX5_CLS_ACT config is disabled ... commit bd2f0b43c1c864fa653342c5c074bfcd29f10934 Author: Steve French Date: Thu Jan 28 16:43:03 2021 -0600 cifs: returning mount parm processing errors correctly During additional testing of the updated cifs.ko with the new mount API support, we found a few additional cases where we were logging errors, but not returning them to the user. For example: a) invalid security mechanisms b) invalid cache options c) unsupported rdma d) invalid smb dialect requested Fixes: 24e0a1eff9e2 ("cifs: switch to new mount api") Acked-by: Ronnie Sahlberg Signed-off-by: Steve French commit b8323f7288abd71794cd7b11a4c0a38b8637c8b5 Author: Takeshi Misawa Date: Thu Jan 28 10:48:36 2021 +0000 rxrpc: Fix memory leak in rxrpc_lookup_local Commit 9ebeddef58c4 ("rxrpc: rxrpc_peer needs to hold a ref on the rxrpc_local record") Then release ref in __rxrpc_put_peer and rxrpc_put_peer_locked. struct rxrpc_peer *rxrpc_alloc_peer(struct rxrpc_local *local, gfp_t gfp) - peer->local = local; + peer->local = rxrpc_get_local(local); rxrpc_discard_prealloc also need ref release in discarding. syzbot report: BUG: memory leak unreferenced object 0xffff8881080ddc00 (size 256): comm "syz-executor339", pid 8462, jiffies 4294942238 (age 12.350s) 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 0a 00 00 00 00 c0 00 08 81 88 ff ff ................ backtrace: [<000000002b6e495f>] kmalloc include/linux/slab.h:552 [inline] [<000000002b6e495f>] kzalloc include/linux/slab.h:682 [inline] [<000000002b6e495f>] rxrpc_alloc_local net/rxrpc/local_object.c:79 [inline] [<000000002b6e495f>] rxrpc_lookup_local+0x1c1/0x760 net/rxrpc/local_object.c:244 [<000000006b43a77b>] rxrpc_bind+0x174/0x240 net/rxrpc/af_rxrpc.c:149 [<00000000fd447a55>] afs_open_socket+0xdb/0x200 fs/afs/rxrpc.c:64 [<000000007fd8867c>] afs_net_init+0x2b4/0x340 fs/afs/main.c:126 [<0000000063d80ec1>] ops_init+0x4e/0x190 net/core/net_namespace.c:152 [<00000000073c5efa>] setup_net+0xde/0x2d0 net/core/net_namespace.c:342 [<00000000a6744d5b>] copy_net_ns+0x19f/0x3e0 net/core/net_namespace.c:483 [<0000000017d3aec3>] create_new_namespaces+0x199/0x4f0 kernel/nsproxy.c:110 [<00000000186271ef>] unshare_nsproxy_namespaces+0x9b/0x120 kernel/nsproxy.c:226 [<000000002de7bac4>] ksys_unshare+0x2fe/0x5c0 kernel/fork.c:2957 [<00000000349b12ba>] __do_sys_unshare kernel/fork.c:3025 [inline] [<00000000349b12ba>] __se_sys_unshare kernel/fork.c:3023 [inline] [<00000000349b12ba>] __x64_sys_unshare+0x12/0x20 kernel/fork.c:3023 [<000000006d178ef7>] do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 [<00000000637076d4>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: 9ebeddef58c4 ("rxrpc: rxrpc_peer needs to hold a ref on the rxrpc_local record") Signed-off-by: Takeshi Misawa Reported-and-tested-by: syzbot+305326672fed51b205f7@syzkaller.appspotmail.com Signed-off-by: David Howells Link: https://lore.kernel.org/r/161183091692.3506637.3206605651502458810.stgit@warthog.procyon.org.uk Signed-off-by: Jakub Kicinski commit 924b171c29e14296eb0f5810a8060df22c3aa937 Merge: 7cfc4486e7ea2 b6f6881aaf234 Author: Jakub Kicinski Date: Thu Jan 28 13:09:03 2021 -0800 Merge branch 'mlxsw-various-fixes' Ido Schimmel says: ==================== mlxsw: Various fixes Patch #1 fixes wrong invocation of mausezahn in a couple of selftests. The tests started failing after Fedora updated their libnet package from version 1.1.6 to 1.2.1. With the fix the tests pass regardless of libnet version. Patch #2 fixes an issue in the mirroring to CPU code that results in policer configuration being overwritten. ==================== Link: https://lore.kernel.org/r/20210128144820.3280295-1-idosch@idosch.org Signed-off-by: Jakub Kicinski commit b6f6881aaf2344bf35a4221810737abe5fd210af Author: Ido Schimmel Date: Thu Jan 28 16:48:20 2021 +0200 mlxsw: spectrum_span: Do not overwrite policer configuration The purpose of the delayed work in the SPAN module is to potentially update the destination port and various encapsulation parameters of SPAN agents that point to a VLAN device or a GRE tap. The destination port can change following the insertion of a new route, for example. SPAN agents that point to a physical port or the CPU port are static and never change throughout the lifetime of the SPAN agent. Therefore, skip over them in the delayed work. This fixes an issue where the delayed work overwrites the policer that was set on a SPAN agent pointing to the CPU. Modifying the delayed work to inherit the original policer configuration is error-prone, as the same will be needed for any new parameter. Fixes: 4039504e6a0c ("mlxsw: spectrum_span: Allow setting policer on a SPAN agent") Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit 11df27f7fdf02cc2bb354358ad482e1fdd690589 Author: Danielle Ratson Date: Thu Jan 28 16:48:19 2021 +0200 selftests: forwarding: Specify interface when invoking mausezahn Specify the interface through which packets should be transmitted so that the test will pass regardless of the libnet version against which mausezahn is linked. Fixes: cab14d1087d9 ("selftests: Add version of router_multipath.sh using nexthop objects") Fixes: 3d578d879517 ("selftests: forwarding: Test IPv4 weighted nexthops") Signed-off-by: Danielle Ratson Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit 7cfc4486e7ea25bd405df162d9c131ee5d4c6c93 Author: Voon Weifeng Date: Tue Jan 26 18:08:44 2021 +0800 stmmac: intel: Configure EHL PSE0 GbE and PSE1 GbE to 32 bits DMA addressing Fix an issue where dump stack is printed and Reset Adapter occurs when PSE0 GbE or/and PSE1 GbE is/are enabled. EHL PSE0 GbE and PSE1 GbE use 32 bits DMA addressing whereas EHL PCH GbE uses 64 bits DMA addressing. [ 25.535095] ------------[ cut here ]------------ [ 25.540276] NETDEV WATCHDOG: enp0s29f2 (intel-eth-pci): transmit queue 2 timed out [ 25.548749] WARNING: CPU: 2 PID: 0 at net/sched/sch_generic.c:443 dev_watchdog+0x259/0x260 [ 25.558004] Modules linked in: 8021q bnep bluetooth ecryptfs snd_hda_codec_hdmi intel_gpy marvell intel_ishtp_loader intel_ishtp_hid iTCO_wdt mei_hdcp iTCO_vendor_support x86_pkg_temp_thermal kvm_intel dwmac_intel stmmac kvm igb pcs_xpcs irqbypass phylink snd_hda_intel intel_rapl_msr pcspkr dca snd_hda_codec i915 i2c_i801 i2c_smbus libphy intel_ish_ipc snd_hda_core mei_me intel_ishtp mei spi_dw_pci 8250_lpss spi_dw thermal dw_dmac_core parport_pc tpm_crb tpm_tis parport tpm_tis_core tpm intel_pmc_core sch_fq_codel uhid fuse configfs snd_sof_pci snd_sof_intel_byt snd_sof_intel_ipc snd_sof_intel_hda_common snd_sof_xtensa_dsp snd_sof snd_soc_acpi_intel_match snd_soc_acpi snd_intel_dspcfg ledtrig_audio snd_soc_core snd_compress ac97_bus snd_pcm snd_timer snd soundcore [ 25.633795] CPU: 2 PID: 0 Comm: swapper/2 Tainted: G U 5.11.0-rc4-intel-lts-MISMAIL5+ #5 [ 25.644306] Hardware name: Intel Corporation Elkhart Lake Embedded Platform/ElkhartLake LPDDR4x T4 RVP1, BIOS EHLSFWI1.R00.2434.A00.2010231402 10/23/2020 [ 25.659674] RIP: 0010:dev_watchdog+0x259/0x260 [ 25.664650] Code: e8 3b 6b 60 ff eb 98 4c 89 ef c6 05 ec e7 bf 00 01 e8 fb e5 fa ff 89 d9 4c 89 ee 48 c7 c7 78 31 d2 9e 48 89 c2 e8 79 1b 18 00 <0f> 0b e9 77 ff ff ff 0f 1f 44 00 00 48 c7 47 08 00 00 00 00 48 c7 [ 25.685647] RSP: 0018:ffffb7ca80160eb8 EFLAGS: 00010286 [ 25.691498] RAX: 0000000000000000 RBX: 0000000000000002 RCX: 0000000000000103 [ 25.699483] RDX: 0000000080000103 RSI: 00000000000000f6 RDI: 00000000ffffffff [ 25.707465] RBP: ffff985709ce0440 R08: 0000000000000000 R09: c0000000ffffefff [ 25.715455] R10: ffffb7ca80160cf0 R11: ffffb7ca80160ce8 R12: ffff985709ce039c [ 25.723438] R13: ffff985709ce0000 R14: 0000000000000008 R15: ffff9857068af940 [ 25.731425] FS: 0000000000000000(0000) GS:ffff985864300000(0000) knlGS:0000000000000000 [ 25.740481] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 25.746913] CR2: 00005567f8bb76b8 CR3: 00000001f8e0a000 CR4: 0000000000350ee0 [ 25.754900] Call Trace: [ 25.757631] [ 25.759891] ? qdisc_put_unlocked+0x30/0x30 [ 25.764565] ? qdisc_put_unlocked+0x30/0x30 [ 25.769245] call_timer_fn+0x2e/0x140 [ 25.773346] run_timer_softirq+0x1f3/0x430 [ 25.777932] ? __hrtimer_run_queues+0x12c/0x2c0 [ 25.783005] ? ktime_get+0x3e/0xa0 [ 25.786812] __do_softirq+0xa6/0x2ef [ 25.790816] asm_call_irq_on_stack+0xf/0x20 [ 25.795501] [ 25.797852] do_softirq_own_stack+0x5d/0x80 [ 25.802538] irq_exit_rcu+0x94/0xb0 [ 25.806475] sysvec_apic_timer_interrupt+0x42/0xc0 [ 25.811836] asm_sysvec_apic_timer_interrupt+0x12/0x20 [ 25.817586] RIP: 0010:cpuidle_enter_state+0xd9/0x370 [ 25.823142] Code: 85 c0 0f 8f 0a 02 00 00 31 ff e8 22 d5 7e ff 45 84 ff 74 12 9c 58 f6 c4 02 0f 85 47 02 00 00 31 ff e8 7b a0 84 ff fb 45 85 f6 <0f> 88 ab 00 00 00 49 63 ce 48 2b 2c 24 48 89 c8 48 6b d1 68 48 c1 [ 25.844140] RSP: 0018:ffffb7ca800f7e80 EFLAGS: 00000206 [ 25.849996] RAX: ffff985864300000 RBX: 0000000000000003 RCX: 000000000000001f [ 25.857975] RDX: 00000005f2028ea8 RSI: ffffffff9ec5907f RDI: ffffffff9ec62a5d [ 25.865961] RBP: 00000005f2028ea8 R08: 0000000000000000 R09: 0000000000029d00 [ 25.873947] R10: 000000137b0e0508 R11: ffff9858643294e4 R12: ffff9858643336d0 [ 25.881935] R13: ffffffff9ef74b00 R14: 0000000000000003 R15: 0000000000000000 [ 25.889918] cpuidle_enter+0x29/0x40 [ 25.893922] do_idle+0x24a/0x290 [ 25.897536] cpu_startup_entry+0x19/0x20 [ 25.901930] start_secondary+0x128/0x160 [ 25.906326] secondary_startup_64_no_verify+0xb0/0xbb [ 25.911983] ---[ end trace b4c0c8195d0ba61f ]--- [ 25.917193] intel-eth-pci 0000:00:1d.2 enp0s29f2: Reset adapter. Fixes: 67c08ac4140a ("net: stmmac: add EHL PSE0 & PSE1 1Gbps PCI info and PCI ID") Signed-off-by: Voon Weifeng Co-developed-by: Mohammad Athari Bin Ismail Signed-off-by: Mohammad Athari Bin Ismail Link: https://lore.kernel.org/r/20210126100844.30326-1-mohammad.athari.ismail@intel.com Signed-off-by: Jakub Kicinski commit dad3a72f5eec966dbd714c1a657894ffd2a6f471 Author: Giacinto Cifelli Date: Tue Jan 26 05:42:45 2021 +0100 net: usb: cdc_ether: added support for Thales Cinterion PLSx3 modem family. lsusb -v for this device: Bus 003 Device 007: ID 1e2d:0069 Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 ? bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 idVendor 0x1e2d idProduct 0x0069 bcdDevice 0.00 iManufacturer 4 Cinterion Wireless Modules iProduct 3 PLSx3 iSerial 5 fa3c1419 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 352 bNumInterfaces 10 bConfigurationValue 1 iConfiguration 2 Cinterion Configuration bmAttributes 0xe0 Self Powered Remote Wakeup MaxPower 500mA Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 0 bInterfaceCount 2 bFunctionClass 2 Communications bFunctionSubClass 2 Abstract (modem) bFunctionProtocol 1 AT-commands (v.25ter) iFunction 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 2 Communications bInterfaceSubClass 2 Abstract (modem) bInterfaceProtocol 1 AT-commands (v.25ter) iInterface 0 CDC Header: bcdCDC 1.10 CDC ACM: bmCapabilities 0x02 line coding and serial state CDC Call Management: bmCapabilities 0x03 call management use DataInterface bDataInterface 1 CDC Union: bMasterInterface 0 bSlaveInterface 1 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 5 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 10 CDC Data bInterfaceSubClass 0 Unused bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x01 EP 1 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 2 bInterfaceCount 2 bFunctionClass 2 Communications bFunctionSubClass 2 Abstract (modem) bFunctionProtocol 1 AT-commands (v.25ter) iFunction 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 2 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 2 Communications bInterfaceSubClass 2 Abstract (modem) bInterfaceProtocol 1 AT-commands (v.25ter) iInterface 0 CDC Header: bcdCDC 1.10 CDC ACM: bmCapabilities 0x02 line coding and serial state CDC Call Management: bmCapabilities 0x03 call management use DataInterface bDataInterface 3 CDC Union: bMasterInterface 2 bSlaveInterface 3 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 5 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 10 CDC Data bInterfaceSubClass 0 Unused bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x84 EP 4 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 4 bInterfaceCount 2 bFunctionClass 2 Communications bFunctionSubClass 2 Abstract (modem) bFunctionProtocol 1 AT-commands (v.25ter) iFunction 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 4 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 2 Communications bInterfaceSubClass 2 Abstract (modem) bInterfaceProtocol 1 AT-commands (v.25ter) iInterface 0 CDC Header: bcdCDC 1.10 CDC ACM: bmCapabilities 0x02 line coding and serial state CDC Call Management: bmCapabilities 0x03 call management use DataInterface bDataInterface 5 CDC Union: bMasterInterface 4 bSlaveInterface 5 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x85 EP 5 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 5 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 5 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 10 CDC Data bInterfaceSubClass 0 Unused bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x86 EP 6 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x03 EP 3 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 6 bInterfaceCount 2 bFunctionClass 2 Communications bFunctionSubClass 2 Abstract (modem) bFunctionProtocol 1 AT-commands (v.25ter) iFunction 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 6 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 2 Communications bInterfaceSubClass 2 Abstract (modem) bInterfaceProtocol 1 AT-commands (v.25ter) iInterface 0 CDC Header: bcdCDC 1.10 CDC ACM: bmCapabilities 0x02 line coding and serial state CDC Call Management: bmCapabilities 0x03 call management use DataInterface bDataInterface 7 CDC Union: bMasterInterface 6 bSlaveInterface 7 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x87 EP 7 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 5 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 7 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 10 CDC Data bInterfaceSubClass 0 Unused bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x88 EP 8 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x04 EP 4 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 8 bInterfaceCount 2 bFunctionClass 2 Communications bFunctionSubClass 0 bFunctionProtocol 0 iFunction 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 8 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 2 Communications bInterfaceSubClass 6 Ethernet Networking bInterfaceProtocol 0 iInterface 0 CDC Header: bcdCDC 1.10 CDC Ethernet: iMacAddress 1 00A0C6C14190 bmEthernetStatistics 0x00000000 wMaxSegmentSize 16384 wNumberMCFilters 0x0001 bNumberPowerFilters 0 CDC Union: bMasterInterface 8 bSlaveInterface 9 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x89 EP 9 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 5 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 9 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 10 CDC Data bInterfaceSubClass 0 Unused bInterfaceProtocol 0 iInterface 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 9 bAlternateSetting 1 bNumEndpoints 2 bInterfaceClass 10 CDC Data bInterfaceSubClass 0 Unused bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x8a EP 10 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x05 EP 5 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Device Qualifier (for other device speed): bLength 10 bDescriptorType 6 bcdUSB 2.00 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 ? bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 bNumConfigurations 1 Device Status: 0x0000 (Bus Powered) Signed-off-by: Giacinto Cifelli Link: https://lore.kernel.org/r/20210126044245.8455-1-gciofono@gmail.com Signed-off-by: Jakub Kicinski commit c64396cc36c6e60704ab06c1fb1c4a46179c9120 Merge: e5ff2cb9cf67a 34b1a1ce1458f Author: Linus Torvalds Date: Thu Jan 28 11:18:43 2021 -0800 Merge tag 'locking-urgent-2021-01-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fixes from Thomas Gleixner: "A set of PI futex fixes: - Address a longstanding issue where the user space part of the PI futex is not writeable. The kernel returns with inconsistent state which can in the worst case result in a UAF of a tasks kernel stack. The solution is to establish consistent kernel state which makes future operations on the futex fail because user space and kernel space state are inconsistent. Not a problem as PI futexes fundamentaly require a functional RW mapping and if user space pulls the rug under it, then it can keep the pieces it asked for. - Address an issue where the return value is incorrect in case that the futex was acquired after a timeout/signal made the waiter drop out of the rtmutex wait. In one of the corner cases the kernel returned an error code despite having successfully acquired the futex" * tag 'locking-urgent-2021-01-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: futex: Handle faults correctly for PI futexes futex: Simplify fixup_pi_state_owner() futex: Use pi_state_update_owner() in put_pi_state() rtmutex: Remove unused argument from rt_mutex_proxy_unlock() futex: Provide and use pi_state_update_owner() futex: Replace pointless printk in fixup_owner() futex: Ensure the correct return value from futex_lock_pi() commit e2579c76fbc5eb2b4469ad2d460dfb3cdb8f5f1f Merge: 0df28cad06eb4 772ea326a4a00 Author: Jens Axboe Date: Thu Jan 28 11:57:33 2021 -0700 Merge tag 'nvme-5.11-2021-01-28' of git://git.infradead.org/nvme into block-5.11 Pull NVMe fixes from Christoph: "nvme fixes for 5.11: - add another Write Zeroes quirk (Chaitanya Kulkarni) - handle a no path available corner case (Daniel Wagner) - use the proper RCU aware list_add helper (Chao Leng)" * tag 'nvme-5.11-2021-01-28' of git://git.infradead.org/nvme: nvme-core: use list_add_tail_rcu instead of list_add_tail for nvme_init_ns_head nvme-multipath: Early exit if no path is available nvme-pci: add the DISABLE_WRITE_ZEROES quirk for a SPCC device commit 70b2c60d3797bffe182dddb9bb55975b9be5889a Author: Pavel Begunkov Date: Thu Jan 28 18:39:25 2021 +0000 io_uring: fix sqo ownership false positive warning WARNING: CPU: 0 PID: 21359 at fs/io_uring.c:9042 io_uring_cancel_task_requests+0xe55/0x10c0 fs/io_uring.c:9042 Call Trace: io_uring_flush+0x47b/0x6e0 fs/io_uring.c:9227 filp_close+0xb4/0x170 fs/open.c:1295 close_files fs/file.c:403 [inline] put_files_struct fs/file.c:418 [inline] put_files_struct+0x1cc/0x350 fs/file.c:415 exit_files+0x7e/0xa0 fs/file.c:435 do_exit+0xc22/0x2ae0 kernel/exit.c:820 do_group_exit+0x125/0x310 kernel/exit.c:922 get_signal+0x427/0x20f0 kernel/signal.c:2773 arch_do_signal_or_restart+0x2a8/0x1eb0 arch/x86/kernel/signal.c:811 handle_signal_work kernel/entry/common.c:147 [inline] exit_to_user_mode_loop kernel/entry/common.c:171 [inline] exit_to_user_mode_prepare+0x148/0x250 kernel/entry/common.c:201 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline] syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:302 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Now io_uring_cancel_task_requests() can be called not through file notes but directly, remove a WARN_ONCE() there that give us false positives. That check is not very important and we catch it in other places. Fixes: 84965ff8a84f0 ("io_uring: if we see flush on exit, cancel related tasks") Cc: stable@vger.kernel.org # 5.9+ Reported-by: syzbot+3e3d9bd0c6ce9efbc3ef@syzkaller.appspotmail.com Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit f609cbb8911e40e15f9055e8f945f926ac906924 Author: Pavel Begunkov Date: Thu Jan 28 18:39:24 2021 +0000 io_uring: fix list corruption for splice file_get kernel BUG at lib/list_debug.c:29! Call Trace: __list_add include/linux/list.h:67 [inline] list_add include/linux/list.h:86 [inline] io_file_get+0x8cc/0xdb0 fs/io_uring.c:6466 __io_splice_prep+0x1bc/0x530 fs/io_uring.c:3866 io_splice_prep fs/io_uring.c:3920 [inline] io_req_prep+0x3546/0x4e80 fs/io_uring.c:6081 io_queue_sqe+0x609/0x10d0 fs/io_uring.c:6628 io_submit_sqe fs/io_uring.c:6705 [inline] io_submit_sqes+0x1495/0x2720 fs/io_uring.c:6953 __do_sys_io_uring_enter+0x107d/0x1f30 fs/io_uring.c:9353 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 io_file_get() may be called from splice, and so REQ_F_INFLIGHT may already be set. Fixes: 02a13674fa0e8 ("io_uring: account io_uring internal files as REQ_F_INFLIGHT") Cc: stable@vger.kernel.org # 5.9+ Reported-by: syzbot+6879187cf57845801267@syzkaller.appspotmail.com Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 00190bc087e795290502dc51c5d32de85cb2c2b8 Author: Arnd Bergmann Date: Mon Jan 25 13:23:20 2021 +0100 amdgpu: fix clang build warning clang warns about the -mhard-float command line arguments on architectures that do not support this: clang: error: argument unused during compilation: '-mhard-float' [-Werror,-Wunused-command-line-argument] Move this into the gcc-specific arguments. Fixes: e77165bf7b02 ("drm/amd/display: Add DCN3 blocks to Makefile") Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher commit a119f87b86bcdf14a18ce39a899e97a1e9160f7f Author: Alex Deucher Date: Thu Jan 28 13:28:59 2021 -0500 Revert "drm/amdgpu/swsmu: drop set_fan_speed_percent (v2)" On some boards the rpm interface apparently does not work at all leading to the fan not spinning or spinning at strange speeds. Revert this for now to fix 5.10, 5.11. The follow on patch fixes this properly for 5.12. This reverts commit 8d6e65adc25e23fabbc5293b6cd320195c708dca. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1408 Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 772ea326a4a00b6b4b2c8f3606ad10c31f46c511 Author: Chao Leng Date: Thu Jan 28 11:33:51 2021 +0800 nvme-core: use list_add_tail_rcu instead of list_add_tail for nvme_init_ns_head The "list" of nvme_ns_head is used as rcu list, now in nvme_init_ns_head list_add_tail is used to add ns->siblings to the rcu list. It is not safe. Should use list_add_tail_rcu instead of list_add_tail. Signed-off-by: Chao Leng Signed-off-by: Christoph Hellwig commit d1bcf006a9d3d63c1bcb65a993cb13756954cd9c Author: Daniel Wagner Date: Wed Jan 27 11:30:33 2021 +0100 nvme-multipath: Early exit if no path is available nvme_round_robin_path() should test if the return ns pointer is valid. nvme_next_ns() will return a NULL pointer if there is no path left. Fixes: 75c10e732724 ("nvme-multipath: round-robin I/O policy") Signed-off-by: Daniel Wagner Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig commit 899199292b14b7c735808a37517de4dd2160c300 Author: Chaitanya Kulkarni Date: Mon Jan 25 21:19:16 2021 -0800 nvme-pci: add the DISABLE_WRITE_ZEROES quirk for a SPCC device This adds a quirk for SPCC 256GB NVMe 1.3 drive which fixes timeouts and I/O errors due to the fact that the controller does not properly handle the Write Zeroes command: [ 2745.659527] CPU: 2 PID: 0 Comm: swapper/2 Tainted: G E 5.10.6-BET #1 [ 2745.659528] Hardware name: System manufacturer System Product Name/PRIME X570-P, BIOS 3001 12/04/2020 [ 2776.138874] nvme nvme1: I/O 414 QID 3 timeout, aborting [ 2776.138886] nvme nvme1: I/O 415 QID 3 timeout, aborting [ 2776.138891] nvme nvme1: I/O 416 QID 3 timeout, aborting [ 2776.138895] nvme nvme1: I/O 417 QID 3 timeout, aborting [ 2776.138912] nvme nvme1: Abort status: 0x0 [ 2776.138921] nvme nvme1: I/O 428 QID 3 timeout, aborting [ 2776.138922] nvme nvme1: Abort status: 0x0 [ 2776.138925] nvme nvme1: Abort status: 0x0 [ 2776.138974] nvme nvme1: Abort status: 0x0 [ 2776.138977] nvme nvme1: Abort status: 0x0 [ 2806.346792] nvme nvme1: I/O 414 QID 3 timeout, reset controller [ 2806.363566] nvme nvme1: 15/0/0 default/read/poll queues [ 2836.554298] nvme nvme1: I/O 415 QID 3 timeout, disable controller [ 2836.672064] blk_update_request: I/O error, dev nvme1n1, sector 16350 op 0x9:(WRITE_ZEROES) flags 0x0 phys_seg 0 prio class 0 [ 2836.672072] blk_update_request: I/O error, dev nvme1n1, sector 16093 op 0x9:(WRITE_ZEROES) flags 0x0 phys_seg 0 prio class 0 [ 2836.672074] blk_update_request: I/O error, dev nvme1n1, sector 15836 op 0x9:(WRITE_ZEROES) flags 0x0 phys_seg 0 prio class 0 [ 2836.672076] blk_update_request: I/O error, dev nvme1n1, sector 15579 op 0x9:(WRITE_ZEROES) flags 0x0 phys_seg 0 prio class 0 [ 2836.672078] blk_update_request: I/O error, dev nvme1n1, sector 15322 op 0x9:(WRITE_ZEROES) flags 0x0 phys_seg 0 prio class 0 [ 2836.672080] blk_update_request: I/O error, dev nvme1n1, sector 15065 op 0x9:(WRITE_ZEROES) flags 0x0 phys_seg 0 prio class 0 [ 2836.672082] blk_update_request: I/O error, dev nvme1n1, sector 14808 op 0x9:(WRITE_ZEROES) flags 0x0 phys_seg 0 prio class 0 [ 2836.672083] blk_update_request: I/O error, dev nvme1n1, sector 14551 op 0x9:(WRITE_ZEROES) flags 0x0 phys_seg 0 prio class 0 [ 2836.672085] blk_update_request: I/O error, dev nvme1n1, sector 14294 op 0x9:(WRITE_ZEROES) flags 0x0 phys_seg 0 prio class 0 [ 2836.672087] blk_update_request: I/O error, dev nvme1n1, sector 14037 op 0x9:(WRITE_ZEROES) flags 0x0 phys_seg 0 prio class 0 [ 2836.672121] nvme nvme1: failed to mark controller live state [ 2836.672123] nvme nvme1: Removing after probe failure status: -19 [ 2836.689016] Aborting journal on device dm-0-8. [ 2836.689024] Buffer I/O error on dev dm-0, logical block 25198592, lost sync page write [ 2836.689027] JBD2: Error -5 detected when updating journal superblock for dm-0-8. Reported-by: Bradley Chapman Signed-off-by: Chaitanya Kulkarni Tested-by: Bradley Chapman Reviewed-by: Keith Busch Signed-off-by: Christoph Hellwig commit e5ff2cb9cf67a542f2ec7fb87e24934c88b32678 Merge: 228345bf98cd7 2e92493637a09 Author: Linus Torvalds Date: Thu Jan 28 10:08:08 2021 -0800 Merge tag 'for-linus-5.11-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: - A fix for a regression introduced in 5.11 resulting in Xen dom0 having problems to correctly initialize Xenstore. - A fix for avoiding WARN splats when booting as Xen dom0 with CONFIG_AMD_MEM_ENCRYPT enabled due to a missing trap handler for the #VC exception (even if the handler should never be called). - A fix for the Xen bklfront driver adapting to the correct but unexpected behavior of new qemu. * tag 'for-linus-5.11-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: x86/xen: avoid warning in Xen pv guest with CONFIG_AMD_MEM_ENCRYPT enabled xen: Fix XenStore initialisation for XS_LOCAL xen-blkfront: allow discard-* nodes to be optional commit 19a23da53932bc8011220bd8c410cb76012de004 Author: Peter Gonda Date: Wed Jan 27 08:15:24 2021 -0800 Fix unsynchronized access to sev members through svm_register_enc_region Grab kvm->lock before pinning memory when registering an encrypted region; sev_pin_memory() relies on kvm->lock being held to ensure correctness when checking and updating the number of pinned pages. Add a lockdep assertion to help prevent future regressions. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Paolo Bonzini Cc: Joerg Roedel Cc: Tom Lendacky Cc: Brijesh Singh Cc: Sean Christopherson Cc: x86@kernel.org Cc: kvm@vger.kernel.org Cc: stable@vger.kernel.org Cc: linux-kernel@vger.kernel.org Fixes: 1e80fdc09d12 ("KVM: SVM: Pin guest memory when SEV is active") Signed-off-by: Peter Gonda V2 - Fix up patch description - Correct file paths svm.c -> sev.c - Add unlock of kvm->lock on sev_pin_memory error V1 - https://lore.kernel.org/kvm/20210126185431.1824530-1-pgonda@google.com/ Message-Id: <20210127161524.2832400-1-pgonda@google.com> Signed-off-by: Paolo Bonzini commit ae000861b95cc4521c498430eb9c61ad62cea51c Author: Yu Zhang Date: Thu Jan 28 23:47:47 2021 +0800 KVM: Documentation: Fix documentation for nested. Nested VMX was enabled by default in commit 1e58e5e59148 ("KVM: VMX: enable nested virtualization by default"), which was merged in Linux 4.20. This patch is to fix the documentation accordingly. Signed-off-by: Yu Zhang Message-Id: <20210128154747.4242-1-yu.c.zhang@linux.intel.com> Signed-off-by: Paolo Bonzini commit 074489b77a37c61c0b090d63b2731a951064fd70 Merge: 181f494888d5b e500b805c39da Author: Paolo Bonzini Date: Thu Jan 28 13:02:49 2021 -0500 Merge tag 'kvmarm-fixes-5.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 fixes for 5.11, take #3 - Avoid clobbering extra registers on initialisation commit 228345bf98cd78f91d007478a51f9a471489e44a Merge: 7485e08eec4c8 96ec72a3425d1 Author: Linus Torvalds Date: Thu Jan 28 10:00:26 2021 -0800 Merge tag 'asm-generic-fixes-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic Pull ia64 fixes from Arnd Bergmann: "asm-generic/ia64 fixes, and mark as orphaned Commit 2b49ddcef297 ("ia64: convert to legacy_timer_tick") from my timer series I merged through the asm-generic tree caused a regression on all ia64 machines, as bisected by Adrian Glaubitz. Tony Luck is no longer really working on ia64, so instead of merging the fix through his tree, we ended up deciding that I'd merge the fix myself along a patch to mark the architecture as Orphaned and a compile time warning fix I made while working on the regression" [ HPE no longer accepts orders for new Itanium hardware, and Intel stopped accepting orders a year ago. While intel is still officially shipping chips until July 29, 2021, it's unlikely that any such orders actually exist. It's dead, Jim. - Linus ] * tag 'asm-generic-fixes-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: ia64: Mark architecture as orphaned ia64: fix xchg() warning ia64: fix timer cleanup regression commit 7485e08eec4c84b2e140aed5fccc36b6846789ec Merge: b0dfa64dcdc3e e49c24c8cd00e Author: Linus Torvalds Date: Thu Jan 28 09:57:33 2021 -0800 Merge tag 'arm-soc-fixes-v5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC fixes from Arnd Bergmann: "These are the current arm-soc bug fixes for linux-5.11. I already merged a larger set that just came in during the past three days but has not had much exposure in linux-next, but this is the subset I merged last week. Most of these are for the NXP i.MX platform (descriptions from their pull request): - Fix pcf2127 reset for imx7d-flex-concentrator board. - Fix i.MX6 suspend with Thumb-2 kernel. - Fix ethernet-phy address issue on imx6qdl-sr-som board. - Fix GPIO3 `gpio-ranges` on i.MX8MP. - Select SOC_BUS for IMX_SCU driver to fix build issue. - Fix backlight pwm on imx6qdl-kontron-samx6i which is lost from #pwm-cells conversion. - Fix duplicated bus node name for i.MX8MN SoC. - Fix reset register offset on LS1028A SoC. - Rename MMC node aliases for imx6q-tbs2910 to keep the MMC device index consistent with previous kernel version. - Selecting ARM_GIC_V3 on non-CP15 processors to fix one build failure with i.MX8M SoC driver. - Fix typos with status property on imx6qdl-kontron-samx6i board. - Fix duplicated regulator-name on imx6qdl-gw52xx board. Aside from i.MX, the bugfixes are all over the place: - Coccinelle found a refcount imbalance on integrator - defconfig fix for TI K3 - A boot regression fix for ST ux500 - A code preemption fix for the optee driver - USB DMA regression on Broadcom Stingray - A bogus boot time warning fix for at91 code" * tag 'arm-soc-fixes-v5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: MAINTAINERS: Include bcm2835 subsequents into search arm64: dts: broadcom: Fix USB DMA address translation for Stingray drivers: soc: atmel: add null entry at the end of at91_soc_allowed_list[] drivers: soc: atmel: Avoid calling at91_soc_init on non AT91 SoCs tee: optee: replace might_sleep with cond_resched firmware: imx: select SOC_BUS to fix firmware build arm64: dts: imx8mp: Correct the gpio ranges of gpio3 ARM: dts: imx6qdl-sr-som: fix some cubox-i platforms ARM: imx: build suspend-imx6.S with arm instruction set ARM: dts: imx7d-flex-concentrator: fix pcf2127 reset ARM: dts: ux500: Reserve memory carveouts arm64: defconfig: Drop unused K3 SoC specific options bus: arm-integrator-lm: Add of_node_put() before return statement ARM: dts: imx6qdl-gw52xx: fix duplicate regulator naming ARM: dts: imx6qdl-kontron-samx6i: fix i2c_lcd/cam default status ARM: imx: fix imx8m dependencies ARM: dts: tbs2910: rename MMC node aliases arm64: dts: ls1028a: fix the offset of the reset register arm64: dts: imx8mn: Fix duplicate node name ARM: dts: imx6qdl-kontron-samx6i: fix pwms for lcd-backlight commit b0dfa64dcdc3e168e3600a330762c294328741d5 Merge: 25221c99c593b f1b0a8ea9f12b Author: Linus Torvalds Date: Thu Jan 28 09:27:26 2021 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Jason Gunthorpe: "Several recent regressions and some bug fixes: - Typo corrupting the max_recv_sge for cxgb4 - Regression from re-using kernel enums as a HW AbI in vmw_pvrdma - Sleeping inside a spinlock in hns - Revert the attempt to fix devlink deadlocks as the fix is more buggy - Typo in sysfs_emit_at conversions - Revert the removal of VLAN support in rxe" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: Revert "RDMA/rxe: Remove VLAN code leftovers from RXE" RDMA/usnic: Fix misuse of sysfs_emit_at Revert "RDMA/mlx5: Fix devlink deadlock on net namespace deletion" RDMA/hns: Use mutex instead of spinlock for ida allocation RDMA/vmw_pvrdma: Fix network_hdr_type reported in WC RDMA/cxgb4: Fix the reported max_recv_sge value commit 25221c99c593bf888bd8faa67ca25b40f046e9f8 Merge: fc856f1df788d 179e8e47c02a1 Author: Linus Torvalds Date: Thu Jan 28 09:23:01 2021 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID fixes from Jiri Kosina: - NULL pointer dereference regression fix for Wacom driver (Jason Gerecke) - functional regression fix for pam handling on some Elan and Synaptics touchpads (Kai-Heng Feng) * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: HID: wacom: Correct NULL dereference on AES pen proximity HID: multitouch: Apply MT_QUIRK_CONFIDENCE quirk for multi-input devices commit c9b8cd6a39c48b2827c0925b648b221b5f8ef25d Author: Steve French Date: Thu Jan 28 11:20:22 2021 -0600 cifs: fix mounts to subdirectories of target The "prefixpath" mount option needs to be ignored which was missed in the recent conversion to the new mount API (prefixpath would be set by the mount helper if mounting a subdirectory of the root of a share e.g. //server/share/subdir) Fixes: 24e0a1eff9e2 ("cifs: switch to new mount api") Suggested-by: Ronnie Sahlberg Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg commit fc856f1df788dc9ad13f154167ae0b442e167950 Merge: a467b07361a11 e081863ab48d9 Author: Linus Torvalds Date: Thu Jan 28 09:18:05 2021 -0800 Merge tag 'media/v5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: - a V4L2 core regression at videobuf2 when checking for single-plane dmabuf - a change at uAPI header v4l2-subdev.h, fixing a breakage as BIT() macro is not available in userspace - fix some regressions at RC core due to the usage of microseconds everywhere on it - a fix for a race condition at RC core - a rename on a newly-introduced kAPI symbol (v4l2_get_link_rate), currently used only by a single driver - Regression fixes for rcar-vin, cedrus, ite-cir, hantro, css, venus, and cec drivers. * tag 'media/v5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: hantro: Fix reset_raw_fmt initialization media: cec: add stm32 driver media: cedrus: Fix H264 decoding media: v4l2-subdev.h: BIT() is not available in userspace media: Revert "media: videobuf2: Fix length check for single plane dmabuf queueing" media: rc: ite-cir: fix min_timeout calculation media: venus: core: Fix platform driver shutdown media: rc: fix timeout handling after switch to microsecond durations media: v4l: common: Fix naming of v4l2_get_link_rate media: rcar-vin: fix return, use ret instead of zero media: ccs: Get static data version minor correctly media: ccs-pll: Fix link frequency for C-PHY media: rc: ensure that uevent can be read directly after rc device register commit a467b07361a114473326590ec5a6f6b36b2d00c0 Merge: be4a338596a40 c361c5a6c559d Author: Linus Torvalds Date: Thu Jan 28 09:14:58 2021 -0800 Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fixes from Stephen Boyd: "A handful of clk driver fixes: - Build fix for CONFIG_PM=n in the mmp2 driver - Kconfig warning for unmet dependencies in the i.MX driver - Make the camera AHB clk always be enabled on qcom sc7180 - Use rate round down semantics for qcom sm8250 SD clks" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: mmp2: fix build without CONFIG_PM clk: qcom: gcc-sm250: Use floor ops for sdcc clks clk: imx: fix Kconfig warning for i.MX SCU clk clk: qcom: gcc-sc7180: Mark the camera abh clock always ON commit be4a338596a40b914d906dcfae94286841aceacc Merge: 757fed1d0898b 4961167bf7482 Author: Linus Torvalds Date: Thu Jan 28 09:06:52 2021 -0800 Merge tag 'sound-5.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Although the incoming fixes haven't settled down yet, all changes here are small and mostly device-specific fixes, so nothing look worrisome. - Yet another USB-audio regression fixes - HD-audio ID fix and device-specific quirks - SOF Intel / SoundWire fixes including topology - ASoC Qualcomm and Mediatek fixes" * tag 'sound-5.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (24 commits) ALSA: hda/via: Apply the workaround generically for Clevo machines ASoC: Intel: sof_sdw: set proper flags for Dell TGL-H SKU 0A5E ASoC: qcom: lpass: Fix out-of-bounds DAI ID lookup ASoC: mediatek: mt8192-mt6359: add format constraints for RT5682 ASoC: ak4458: correct reset polarity ASoC: SOF: SND_INTEL_DSP_CONFIG dependency ASoC: SOF: Intel: soundwire: fix select/depend unmet dependencies ALSA: hda: intel-dsp-config: add PCI id for TGL-H ALSA: usb-audio: workaround for iface reset issue ALSA: pcm: One more dependency for hw constraints ALSA: hda/realtek: Enable headset of ASUS B1400CEPE with ALC256 ASoC: Intel: Skylake: Zero snd_ctl_elem_value ASoC: Intel: Skylake: skl-topology: Fix OOPs ib skl_tplg_complete ASoC: qcom: Fix number of HDMI RDMA channels on sc7180 ASoC: mediatek: mt8183-da7219: ignore TDM DAI link by default ASoC: mediatek: mt8183-mt6358: ignore TDM DAI link by default ASoC: topology: Properly unregister DAI on removal ASoC: topology: Fix memory corruption in soc_tplg_denum_create_values() ASoC: qcom: lpass-ipq806x: fix bitwidth regmap field ASoC: AMD Renoir - refine DMI entries for some Lenovo products ... commit 757fed1d0898b893d7daa84183947c70f27632f3 Author: Wang Hai Date: Thu Jan 28 19:32:50 2021 +0800 Revert "mm/slub: fix a memory leak in sysfs_slab_add()" This reverts commit dde3c6b72a16c2db826f54b2d49bdea26c3534a2. syzbot report a double-free bug. The following case can cause this bug. - mm/slab_common.c: create_cache(): if the __kmem_cache_create() fails, it does: out_free_cache: kmem_cache_free(kmem_cache, s); - but __kmem_cache_create() - at least for slub() - will have done sysfs_slab_add(s) -> sysfs_create_group() .. fails .. -> kobject_del(&s->kobj); .. which frees s ... We can't remove the kmem_cache_free() in create_cache(), because other error cases of __kmem_cache_create() do not free this. So, revert the commit dde3c6b72a16 ("mm/slub: fix a memory leak in sysfs_slab_add()") to fix this. Reported-by: syzbot+d0bd96b4696c1ef67991@syzkaller.appspotmail.com Fixes: dde3c6b72a16 ("mm/slub: fix a memory leak in sysfs_slab_add()") Acked-by: Vlastimil Babka Signed-off-by: Wang Hai Cc: Signed-off-by: Linus Torvalds commit 19d51588125fb7abe258e85b412710486a3d9219 Author: Adam Harvey Date: Wed Jan 27 13:44:35 2021 -0800 cifs: ignore auto and noauto options if given In 24e0a1eff9e2, the noauto and auto options were missed when migrating to the new mount API. As a result, users with noauto in their fstab mount options are now unable to mount cifs filesystems, as they'll receive an "Unknown parameter" error. This restores the old behaviour of ignoring noauto and auto if they're given. Fixes: 24e0a1eff9e2 ("cifs: switch to new mount api") Signed-off-by: Adam Harvey Reviewed-by: Ronnie Sahlberg Signed-off-by: Steve French commit 0df28cad06eb41cc36bfea69d9c882fb567fd0d6 Author: Coly Li Date: Thu Jan 28 18:48:47 2021 +0800 bcache: only check feature sets when sb->version >= BCACHE_SB_VERSION_CDEV_WITH_FEATURES For super block version < BCACHE_SB_VERSION_CDEV_WITH_FEATURES, it doesn't make sense to check the feature sets. This patch checks super block version in bch_has_feature_* routines, if the version doesn't have feature sets yet, returns 0 (false) to the caller. Fixes: 5342fd425502 ("bcache: set bcache device into read-only mode for BCH_FEATURE_INCOMPAT_OBSO_LARGE_BUCKET") Fixes: ffa470327572 ("bcache: add bucket_size_hi into struct cache_sb_disk for large bucket") Cc: stable@vger.kernel.org # 5.9+ Reported-and-tested-by: Bockholdt Arne Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 0fe37724f8e70fa4cb72948f60fca553702df768 Author: Damien Le Moal Date: Thu Jan 28 15:36:19 2021 +0900 block: fix bd_size_lock use Some block device drivers, e.g. the skd driver, call set_capacity() with IRQ disabled. This results in lockdep ito complain about inconsistent lock states ("inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage") because set_capacity takes a block device bd_size_lock using the functions spin_lock() and spin_unlock(). Ensure a consistent locking state by replacing these calls with spin_lock_irqsave() and spin_lock_irqrestore(). The same applies to bdev_set_nr_sectors(). With this fix, all lockdep complaints are resolved. Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe commit 6c635caef410aa757befbd8857c1eadde5cc22ed Author: Baolin Wang Date: Thu Jan 28 13:58:15 2021 +0800 blk-cgroup: Use cond_resched() when destroy blkgs On !PREEMPT kernel, we can get below softlockup when doing stress testing with creating and destroying block cgroup repeatly. The reason is it may take a long time to acquire the queue's lock in the loop of blkcg_destroy_blkgs(), or the system can accumulate a huge number of blkgs in pathological cases. We can add a need_resched() check on each loop and release locks and do cond_resched() if true to avoid this issue, since the blkcg_destroy_blkgs() is not called from atomic contexts. [ 4757.010308] watchdog: BUG: soft lockup - CPU#11 stuck for 94s! [ 4757.010698] Call trace: [ 4757.010700]  blkcg_destroy_blkgs+0x68/0x150 [ 4757.010701]  cgwb_release_workfn+0x104/0x158 [ 4757.010702]  process_one_work+0x1bc/0x3f0 [ 4757.010704]  worker_thread+0x164/0x468 [ 4757.010705]  kthread+0x108/0x138 Suggested-by: Tejun Heo Signed-off-by: Baolin Wang Signed-off-by: Jens Axboe commit 29b32839725f8c89a41cb6ee054c85f3116ea8b5 Author: Nadav Amit Date: Wed Jan 27 09:53:17 2021 -0800 iommu/vt-d: Do not use flush-queue when caching-mode is on When an Intel IOMMU is virtualized, and a physical device is passed-through to the VM, changes of the virtual IOMMU need to be propagated to the physical IOMMU. The hypervisor therefore needs to monitor PTE mappings in the IOMMU page-tables. Intel specifications provide "caching-mode" capability that a virtual IOMMU uses to report that the IOMMU is virtualized and a TLB flush is needed after mapping to allow the hypervisor to propagate virtual IOMMU mappings to the physical IOMMU. To the best of my knowledge no real physical IOMMU reports "caching-mode" as turned on. Synchronizing the virtual and the physical IOMMU tables is expensive if the hypervisor is unaware which PTEs have changed, as the hypervisor is required to walk all the virtualized tables and look for changes. Consequently, domain flushes are much more expensive than page-specific flushes on virtualized IOMMUs with passthrough devices. The kernel therefore exploited the "caching-mode" indication to avoid domain flushing and use page-specific flushing in virtualized environments. See commit 78d5f0f500e6 ("intel-iommu: Avoid global flushes with caching mode.") This behavior changed after commit 13cf01744608 ("iommu/vt-d: Make use of iova deferred flushing"). Now, when batched TLB flushing is used (the default), full TLB domain flushes are performed frequently, requiring the hypervisor to perform expensive synchronization between the virtual TLB and the physical one. Getting batched TLB flushes to use page-specific invalidations again in such circumstances is not easy, since the TLB invalidation scheme assumes that "full" domain TLB flushes are performed for scalability. Disable batched TLB flushes when caching-mode is on, as the performance benefit from using batched TLB invalidations is likely to be much smaller than the overhead of the virtual-to-physical IOMMU page-tables synchronization. Fixes: 13cf01744608 ("iommu/vt-d: Make use of iova deferred flushing") Signed-off-by: Nadav Amit Cc: David Woodhouse Cc: Lu Baolu Cc: Joerg Roedel Cc: Will Deacon Cc: stable@vger.kernel.org Acked-by: Lu Baolu Link: https://lore.kernel.org/r/20210127175317.1600473-1-namit@vmware.com Signed-off-by: Joerg Roedel commit e2fc2de8e1aacef4c76f7a4b8c6162874d3e2801 Merge: fd28a52a4fce6 daf12bee07b9e Author: Arnd Bergmann Date: Thu Jan 28 13:58:19 2021 +0100 Merge tag 'amlogic-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into arm/fixes arm64: dts: amlogic fixes for v5.11-rc (round 3) - fix reboot issue on odroid C4 * tag 'amlogic-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: arm64: dts: meson: switch TFLASH_VDD_EN pin to open drain on Odroid-C4 Link: https://lore.kernel.org/r/7hk0ryi6rs.fsf@baylibre.com Signed-off-by: Arnd Bergmann commit fd28a52a4fce69b3abc2d4f1aca5bccdb3dffe2c Merge: f2d514b4f4282 19f6fe976a61f Author: Arnd Bergmann Date: Thu Jan 28 13:57:11 2021 +0100 Merge tag 'amlogic-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into arm/fixes arm64: dts: amlogic fixes for v5.11-rc (round 2) - fix ethernet resets * tag 'amlogic-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: Revert "arm64: dts: amlogic: add missing ethernet reset ID" Link: https://lore.kernel.org/r/7ho8hai7e6.fsf@baylibre.com Signed-off-by: Arnd Bergmann commit f2d514b4f428265e418e8fb46adebeb6c0717131 Merge: 2a3e487a3e538 74532de460ec6 Author: Arnd Bergmann Date: Thu Jan 28 13:55:34 2021 +0100 Merge tag 'v5.11-rockchip-dtsfixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/fixes Wrong irq number on px30 and cleanups of stuff on rk3399 regarding wrongly used dt properties and parts that shouldn't be enabled. * tag 'v5.11-rockchip-dtsfixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: Disable display for NanoPi R2S arm64: dts: rockchip: remove interrupt-names property from rk3399 vdec node arm64: dts: rockchip: Fix PCIe DT properties on rk3399 arm64: dts: rockchip: Use only supported PCIe link speed on Pinebook Pro arm64: dts: rockchip: fix vopl iommu irq on px30 Link: https://lore.kernel.org/r/5429065.DvuYhMxLoT@phil Signed-off-by: Arnd Bergmann commit 2a3e487a3e538b3a87d0a4ea71f185437c38e55e Merge: 082153866e660 177d8f1f7f47f Author: Arnd Bergmann Date: Thu Jan 28 13:52:45 2021 +0100 Merge tag 'omap-for-v5.11/fixes-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/fixes Fixes for omaps for v5.11-rc cycle The recent changes to switch SoCs to boot with ti-sysc interconnect target module driver and genpd caused few regressions: - The omap_prm reset driver needs to clear any reset bits deasserted by the bootloader or kexec boot for the three reset bit cases. Otherwise we can have an oops with accelerators starting to boot with potentially unconfigured MMU for example - Custom kernel configs are not automatically selecting simple-pm-bus driver that we now need to probe interconnects so we need to select it always - We are not passing legacy platform data in auxdata with simple-pm-bus like we do for simple-bus. We need to pass auxdata to simple-pm-bus so it can pass it to of_platform_populate() Then recent RCU changes started causing splats for cpuidle44xx that now need RCU_NONIDLE added to the calls in several places And then we have few device specific fixes: - We need to remove legacy spi-cs-hig for gta04 display to work, and set the gpio to active low - Omap1 specific ohci-omap needs to call gpio_free() - Droid4 needs to use padconf interrupt for the slider as the edge gpio interrupts may be lost for deeper idle states * tag 'omap-for-v5.11/fixes-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: omap4-droid4: Fix lost keypad slide interrupts for droid4 drivers: bus: simple-pm-bus: Fix compatibility with simple-bus for auxdata ARM: OMAP2+: Fix booting for am335x after moving to simple-pm-bus ARM: OMAP2+: Fix suspcious RCU usage splats for omap_enter_idle_coupled ARM: dts; gta04: SPI panel chip select is active low soc: ti: omap-prm: Fix boot time errors for rst_map_012 bits 0 and 1 ARM: OMAP1: OSK: fix ohci-omap breakage DTS: ARM: gta04: remove legacy spi-cs-high to make display work again Link: https://lore.kernel.org/r/pull-1611818709-243493@atomide.com Signed-off-by: Arnd Bergmann commit 41c1a06d1d1544bed9692ba72a5692454eee1945 Author: Yuxuan Shui Date: Sat Jan 23 03:21:32 2021 -0800 entry: Unbreak single step reporting behaviour The move of TIF_SYSCALL_EMU to SYSCALL_WORK_SYSCALL_EMU broke single step reporting. The original code reported the single step when TIF_SINGLESTEP was set and TIF_SYSCALL_EMU was not set. The SYSCALL_WORK conversion got the logic wrong and now the reporting only happens when both bits are set. Restore the original behaviour. [ tglx: Massaged changelog and dropped the pointless double negation ] Fixes: 64eb35f701f0 ("ptrace: Migrate TIF_SYSCALL_EMU to use SYSCALL_WORK flag") Signed-off-by: Yuxuan Shui Signed-off-by: Thomas Gleixner Reviewed-by: Gabriel Krisman Bertazi Link: https://lore.kernel.org/r/877do3gaq9.fsf@m5Zedd9JOGzJrf0 commit 4d395c5e74398f664405819330e5a298da37f655 Author: Mario Limonciello Date: Mon Oct 26 19:12:59 2020 +0300 thunderbolt: Fix possible NULL pointer dereference in tb_acpi_add_link() When we walk up the device hierarchy in tb_acpi_add_link() make sure we break the loop if the device has no parent. Otherwise we may crash the kernel by dereferencing a NULL pointer. Fixes: b2be2b05cf3b ("thunderbolt: Create device links from ACPI description") Cc: stable@vger.kernel.org Signed-off-by: Mario Limonciello Acked-by: Yehezkel Bernat Signed-off-by: Mika Westerberg commit 494b3688bb11a21af12e92a344a1313486693d47 Author: Lu Baolu Date: Tue Jan 19 12:35:00 2021 +0800 iommu/vt-d: Correctly check addr alignment in qi_flush_dev_iotlb_pasid() An incorrect address mask is being used in the qi_flush_dev_iotlb_pasid() to check the address alignment. This leads to a lot of spurious kernel warnings: [ 485.837093] DMAR: Invalidate non-aligned address 7f76f47f9000, order 0 [ 485.837098] DMAR: Invalidate non-aligned address 7f76f47f9000, order 0 [ 492.494145] qi_flush_dev_iotlb_pasid: 5734 callbacks suppressed [ 492.494147] DMAR: Invalidate non-aligned address 7f7728800000, order 11 [ 492.508965] DMAR: Invalidate non-aligned address 7f7728800000, order 11 Fix it by checking the alignment in right way. Fixes: 288d08e780088 ("iommu/vt-d: Handle non-page aligned address") Reported-and-tested-by: Guo Kaijie Signed-off-by: Lu Baolu Cc: Liu Yi L Link: https://lore.kernel.org/r/20210119043500.1539596-1-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 2b1b3e544f65f40df5eef99753e460a127910479 Author: Michel Dänzer Date: Thu Jan 28 10:53:46 2021 +0100 drm/ttm: Use __GFP_NOWARN for huge pages in ttm_pool_alloc_page Without __GFP_NOWARN, attempts at allocating huge pages can trigger dmesg splats like below (which are essentially noise, since TTM falls back to normal pages if it can't get a huge one). [ 9556.710241] clinfo: page allocation failure: order:9, mode:0x194dc2(GFP_HIGHUSER|__GFP_RETRY_MAYFAIL|__GFP_NORETRY|__GFP_ZERO|__GFP_NOMEMALLOC), nodemask=(null),cpuset=user.slice,mems_allowed=0 [ 9556.710259] CPU: 1 PID: 470821 Comm: clinfo Tainted: G E 5.10.10+ #4 [ 9556.710264] Hardware name: Micro-Star International Co., Ltd. MS-7A34/B350 TOMAHAWK (MS-7A34), BIOS 1.OR 11/29/2019 [ 9556.710268] Call Trace: [ 9556.710281] dump_stack+0x6b/0x83 [ 9556.710288] warn_alloc.cold+0x7b/0xdf [ 9556.710297] ? __alloc_pages_direct_compact+0x137/0x150 [ 9556.710303] __alloc_pages_slowpath.constprop.0+0xc1b/0xc50 [ 9556.710312] __alloc_pages_nodemask+0x2ec/0x320 [ 9556.710325] ttm_pool_alloc+0x2e4/0x5e0 [ttm] [ 9556.710332] ? kvmalloc_node+0x46/0x80 [ 9556.710341] ttm_tt_populate+0x37/0xe0 [ttm] [ 9556.710350] ttm_bo_handle_move_mem+0x142/0x180 [ttm] [ 9556.710359] ttm_bo_validate+0x11d/0x190 [ttm] [ 9556.710391] ? drm_vma_offset_add+0x2f/0x60 [drm] [ 9556.710399] ttm_bo_init_reserved+0x2a7/0x320 [ttm] [ 9556.710529] amdgpu_bo_do_create+0x1b8/0x500 [amdgpu] [ 9556.710657] ? amdgpu_bo_subtract_pin_size+0x60/0x60 [amdgpu] [ 9556.710663] ? get_page_from_freelist+0x11f9/0x1450 [ 9556.710789] amdgpu_bo_create+0x40/0x270 [amdgpu] [ 9556.710797] ? _raw_spin_unlock+0x16/0x30 [ 9556.710927] amdgpu_gem_create_ioctl+0x123/0x310 [amdgpu] [ 9556.711062] ? amdgpu_gem_force_release+0x150/0x150 [amdgpu] [ 9556.711098] drm_ioctl_kernel+0xaa/0xf0 [drm] [ 9556.711133] drm_ioctl+0x20f/0x3a0 [drm] [ 9556.711267] ? amdgpu_gem_force_release+0x150/0x150 [amdgpu] [ 9556.711276] ? preempt_count_sub+0x9b/0xd0 [ 9556.711404] amdgpu_drm_ioctl+0x49/0x80 [amdgpu] [ 9556.711411] __x64_sys_ioctl+0x83/0xb0 [ 9556.711417] do_syscall_64+0x33/0x80 [ 9556.711421] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: bf9eee249ac2 ("drm/ttm: stop using GFP_TRANSHUGE_LIGHT") Signed-off-by: Michel Dänzer Reviewed-by: Christian König Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/416353/ commit a44092e326d403c7878018ba532369f84d31dbfa Author: Suravee Suthikulpanit Date: Wed Jan 20 07:50:02 2021 -0600 iommu/amd: Use IVHD EFR for early initialization of IOMMU features IOMMU Extended Feature Register (EFR) is used to communicate the supported features for each IOMMU to the IOMMU driver. This is normally read from the PCI MMIO register offset 0x30, and used by the iommu_feature() helper function. However, there are certain scenarios where the information is needed prior to PCI initialization, and the iommu_feature() function is used prematurely w/o warning. This has caused incorrect initialization of IOMMU. This is the case for the commit 6d39bdee238f ("iommu/amd: Enforce 4k mapping for certain IOMMU data structures") Since, the EFR is also available in the IVHD header, and is available to the driver prior to PCI initialization. Therefore, default to using the IVHD EFR instead. Fixes: 6d39bdee238f ("iommu/amd: Enforce 4k mapping for certain IOMMU data structures") Signed-off-by: Suravee Suthikulpanit Tested-by: Brijesh Singh Reviewed-by: Robert Richter Link: https://lore.kernel.org/r/20210120135002.2682-1-suravee.suthikulpanit@amd.com Signed-off-by: Joerg Roedel commit bc6fa8676ebbf9c5285f80d7b831663aeabb90bb Author: Dmitry Baryshkov Date: Fri Jan 22 02:33:03 2021 +0300 drm/bridge/lontium-lt9611uxc: move HPD notification out of IRQ handler drm hotplug handling code (drm_client_dev_hotplug()) can wait on mutex, thus delaying further lt9611uxc IRQ events processing. It was observed occasionally during bootups, when drm_client_modeset_probe() was waiting for EDID ready event, which was delayed because IRQ handler was stuck trying to deliver hotplug event. Move hotplug notifications from IRQ handler to separate work to be able to process IRQ events without delays. Signed-off-by: Dmitry Baryshkov Fixes: 0cbbd5b1a012 ("drm: bridge: add support for lontium LT9611UXC bridge") Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20210121233303.1221784-4-dmitry.baryshkov@linaro.org commit 1bb7ab402da44e09b4bb3f31cfe24695cdb1b7df Author: Dmitry Baryshkov Date: Fri Jan 22 02:33:02 2021 +0300 drm/bridge/lontium-lt9611uxc: fix get_edid return code Return NULL pointer from get_edid() callback rather than ERR_PTR() pointer, as DRM code does NULL checks rather than IS_ERR(). Also while we are at it, return NULL if getting EDID timed out. Signed-off-by: Dmitry Baryshkov Fixes: 0cbbd5b1a012 ("drm: bridge: add support for lontium LT9611UXC bridge") Reviewed-by: Bjorn Andersson Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20210121233303.1221784-3-dmitry.baryshkov@linaro.org commit 053b1b287ccf734cc3b5a40b3b17a63185758c61 Author: Dmitry Baryshkov Date: Fri Jan 22 02:33:01 2021 +0300 drm/bridge/lontium-lt9611uxc: fix waiting for EDID to become available - Call wake_up() when EDID ready event is received to wake wait_event_interruptible_timeout() - Increase waiting timeout, reading EDID can take longer than 100ms, so let's be on a safe side. Signed-off-by: Dmitry Baryshkov Fixes: 0cbbd5b1a012 ("drm: bridge: add support for lontium LT9611UXC bridge") Reviewed-by: Bjorn Andersson Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20210121233303.1221784-2-dmitry.baryshkov@linaro.org commit ef357e02b6c420dc2d668ebf3165838c77358acd Author: Heiko Stuebner Date: Thu Jan 21 15:44:07 2021 +0100 media: rockchip: rkisp1: extend uapi array sizes Later variants of the rkisp1 block use more entries in some arrays: RKISP1_CIF_ISP_AE_MEAN_MAX 25 -> 81 RKISP1_CIF_ISP_HIST_BIN_N_MAX 16 -> 32 RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES 17 -> 34 RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE 25 -> 81 and we can still extend the uapi during the 5.11-rc cycle, so do that now to be on the safe side. V10 and V11 only need the smaller sizes, while V12 and V13 needed the larger sizes. When adding the bigger sizes make sure, values filled from hardware values and transmitted to userspace don't leak kernel data by zeroing them beforehand. Signed-off-by: Heiko Stuebner Signed-off-by: Dafna Hirschfeld Reviewed-by: Ezequiel Garcia Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit fc672d806bd77eff26117479e90ccdcfd2a8ecb4 Author: Heiko Stuebner Date: Thu Jan 21 15:44:06 2021 +0100 media: rockchip: rkisp1: carry ip version information The IP block evolved from its rk3288/rk3399 base and the vendor designates them with a numerical version. rk3399 for example is designated V10 probably meaning V1.0. There doesn't seem to be an actual version register we could read that information from, so allow the match_data to carry that information for future differentiation. Also carry that information in the hw_revision field of the media- controller API, so that userspace also has access to that. The added versions are: - V10: at least rk3288 + rk3399 - V11: seemingly unused as of now, but probably appeared in some soc - V12: at least rk3326 + px30 - V13: at least rk1808 [fix checkpatch warning don't use multiple blank lines] Signed-off-by: Heiko Stuebner Signed-off-by: Dafna Hirschfeld Reviewed-by: Ezequiel Garcia Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 66d81de7ea9d2b0775e5bfd5e770483a1c24b9ca Author: Heiko Stuebner Date: Thu Jan 21 15:44:05 2021 +0100 media: rockchip: rkisp1: reduce number of histogram grid elements in uapi The uapi right now specifies an array size of 28 but the actual number of elements is only 25 with the last 3 being unused. Reduce the array size to the correct number of elements and change the params code to iterate the array 25 times. Signed-off-by: Heiko Stuebner Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a802a0430b863f03bc01aaea2d2bf6ff464f03e7 Author: Dafna Hirschfeld Date: Thu Jan 21 15:44:04 2021 +0100 media: rkisp1: stats: mask the hist_bins values hist_bins is an array of type __u32. Each entry represents a 20 bit value. So mask out the unused bits. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a76f8dc8be471028540df24749e99a3ec0ac7c94 Author: Dafna Hirschfeld Date: Thu Jan 21 15:44:03 2021 +0100 media: rkisp1: stats: remove a wrong cast to u8 hist_bins is an array of type __u32. Each entry represent a 20 bit fixed point value as documented inline. The cast to u8 when setting the values is wrong. Remove it. Signed-off-by: Dafna Hirschfeld Reviewed-by: Heiko Stuebner Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 31f190e0ccac8b75d33fdc95a797c526cf9b149e Author: Dafna Hirschfeld Date: Thu Jan 21 15:44:02 2021 +0100 media: rkisp1: uapi: change hist_bins array type from __u16 to __u32 Each entry in the array is a 20 bits value composed of 16 bits unsigned integer and 4 bits fractional part. So the type should change to __u32. In addition add a documentation of how the measurements are done. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 530fe6bf0f9ff91e5156f0423ae8db8d106d0159 Author: Paul Kocialkowski Date: Fri Jan 15 18:58:31 2021 +0100 soc: sunxi: mbus: Remove DE2 display engine compatibles The DE2 display engine hardware takes physical addresses that do not need PHYS_BASE subtracted. As a result, they should not be present on the mbus driver match list. Remove them. This was tested on the A83T, along with the patch allowing the DMA range map to be non-NULL and restores a working display. Fixes: b4bdc4fbf8d0 ("soc: sunxi: Deal with the MBUS DMA offsets in a central place") Signed-off-by: Paul Kocialkowski Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210115175831.1184260-2-paul.kocialkowski@bootlin.com commit de96c3943f591018727b862f51953c1b6c55bcc3 Author: Qii Wang Date: Sat Jan 9 16:29:50 2021 +0800 i2c: mediatek: Move suspend and resume handling to NOIRQ phase Some i2c device driver indirectly uses I2C driver when it is now being suspended. The i2c devices driver is suspended during the NOIRQ phase and this cannot be changed due to other dependencies. Therefore, we also need to move the suspend handling for the I2C controller driver to the NOIRQ phase as well. Signed-off-by: Qii Wang Signed-off-by: Wolfram Sang commit 335d3fc57941e5c6164c69d439aec1cb7a800876 Author: Sargun Dhillon Date: Thu Jan 7 16:10:43 2021 -0800 ovl: implement volatile-specific fsync error behaviour Overlayfs's volatile option allows the user to bypass all forced sync calls to the upperdir filesystem. This comes at the cost of safety. We can never ensure that the user's data is intact, but we can make a best effort to expose whether or not the data is likely to be in a bad state. The best way to handle this in the time being is that if an overlayfs's upperdir experiences an error after a volatile mount occurs, that error will be returned on fsync, fdatasync, sync, and syncfs. This is contradictory to the traditional behaviour of VFS which fails the call once, and only raises an error if a subsequent fsync error has occurred, and been raised by the filesystem. One awkward aspect of the patch is that we have to manually set the superblock's errseq_t after the sync_fs callback as opposed to just returning an error from syncfs. This is because the call chain looks something like this: sys_syncfs -> sync_filesystem -> __sync_filesystem -> /* The return value is ignored here sb->s_op->sync_fs(sb) _sync_blockdev /* Where the VFS fetches the error to raise to userspace */ errseq_check_and_advance Because of this we call errseq_set every time the sync_fs callback occurs. Due to the nature of this seen / unseen dichotomy, if the upperdir is an inconsistent state at the initial mount time, overlayfs will refuse to mount, as overlayfs cannot get a snapshot of the upperdir's errseq that will increment on error until the user calls syncfs. Signed-off-by: Sargun Dhillon Suggested-by: Amir Goldstein Reviewed-by: Amir Goldstein Fixes: c86243b090bc ("ovl: provide a mount option "volatile"") Cc: stable@vger.kernel.org Reviewed-by: Vivek Goyal Reviewed-by: Jeff Layton Signed-off-by: Miklos Szeredi commit 03fedf93593c82538b18476d8c4f0e8f8435ea70 Author: Amir Goldstein Date: Sat Dec 19 12:16:08 2020 +0200 ovl: skip getxattr of security labels When inode has no listxattr op of its own (e.g. squashfs) vfs_listxattr calls the LSM inode_listsecurity hooks to list the xattrs that LSMs will intercept in inode_getxattr hooks. When selinux LSM is installed but not initialized, it will list the security.selinux xattr in inode_listsecurity, but will not intercept it in inode_getxattr. This results in -ENODATA for a getxattr call for an xattr returned by listxattr. This situation was manifested as overlayfs failure to copy up lower files from squashfs when selinux is built-in but not initialized, because ovl_copy_xattr() iterates the lower inode xattrs by vfs_listxattr() and vfs_getxattr(). ovl_copy_xattr() skips copy up of security labels that are indentified by inode_copy_up_xattr LSM hooks, but it does that after vfs_getxattr(). Since we are not going to copy them, skip vfs_getxattr() of the security labels. Reported-by: Michael Labriola Tested-by: Michael Labriola Link: https://lore.kernel.org/linux-unionfs/2nv9d47zt7.fsf@aldarion.sourceruckus.org/ Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi commit e04527fefba6e4e66492f122cf8cc6314f3cf3bf Author: Liangyan Date: Tue Dec 22 11:06:26 2020 +0800 ovl: fix dentry leak in ovl_get_redirect We need to lock d_parent->d_lock before dget_dlock, or this may have d_lockref updated parallelly like calltrace below which will cause dentry->d_lockref leak and risk a crash. CPU 0 CPU 1 ovl_set_redirect lookup_fast ovl_get_redirect __d_lookup dget_dlock //no lock protection here spin_lock(&dentry->d_lock) dentry->d_lockref.count++ dentry->d_lockref.count++ [   49.799059] PGD 800000061fed7067 P4D 800000061fed7067 PUD 61fec5067 PMD 0 [   49.799689] Oops: 0002 [#1] SMP PTI [   49.800019] CPU: 2 PID: 2332 Comm: node Not tainted 4.19.24-7.20.al7.x86_64 #1 [   49.800678] Hardware name: Alibaba Cloud Alibaba Cloud ECS, BIOS 8a46cfe 04/01/2014 [   49.801380] RIP: 0010:_raw_spin_lock+0xc/0x20 [   49.803470] RSP: 0018:ffffac6fc5417e98 EFLAGS: 00010246 [   49.803949] RAX: 0000000000000000 RBX: ffff93b8da3446c0 RCX: 0000000a00000000 [   49.804600] RDX: 0000000000000001 RSI: 000000000000000a RDI: 0000000000000088 [   49.805252] RBP: 0000000000000000 R08: 0000000000000000 R09: ffffffff993cf040 [   49.805898] R10: ffff93b92292e580 R11: ffffd27f188a4b80 R12: 0000000000000000 [   49.806548] R13: 00000000ffffff9c R14: 00000000fffffffe R15: ffff93b8da3446c0 [   49.807200] FS:  00007ffbedffb700(0000) GS:ffff93b927880000(0000) knlGS:0000000000000000 [   49.807935] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [   49.808461] CR2: 0000000000000088 CR3: 00000005e3f74006 CR4: 00000000003606a0 [   49.809113] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [   49.809758] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [   49.810410] Call Trace: [   49.810653]  d_delete+0x2c/0xb0 [   49.810951]  vfs_rmdir+0xfd/0x120 [   49.811264]  do_rmdir+0x14f/0x1a0 [   49.811573]  do_syscall_64+0x5b/0x190 [   49.811917]  entry_SYSCALL_64_after_hwframe+0x44/0xa9 [   49.812385] RIP: 0033:0x7ffbf505ffd7 [   49.814404] RSP: 002b:00007ffbedffada8 EFLAGS: 00000297 ORIG_RAX: 0000000000000054 [   49.815098] RAX: ffffffffffffffda RBX: 00007ffbedffb640 RCX: 00007ffbf505ffd7 [   49.815744] RDX: 0000000004449700 RSI: 0000000000000000 RDI: 0000000006c8cd50 [   49.816394] RBP: 00007ffbedffaea0 R08: 0000000000000000 R09: 0000000000017d0b [   49.817038] R10: 0000000000000000 R11: 0000000000000297 R12: 0000000000000012 [   49.817687] R13: 00000000072823d8 R14: 00007ffbedffb700 R15: 00000000072823d8 [   49.818338] Modules linked in: pvpanic cirrusfb button qemu_fw_cfg atkbd libps2 i8042 [   49.819052] CR2: 0000000000000088 [   49.819368] ---[ end trace 4e652b8aa299aa2d ]--- [   49.819796] RIP: 0010:_raw_spin_lock+0xc/0x20 [   49.821880] RSP: 0018:ffffac6fc5417e98 EFLAGS: 00010246 [   49.822363] RAX: 0000000000000000 RBX: ffff93b8da3446c0 RCX: 0000000a00000000 [   49.823008] RDX: 0000000000000001 RSI: 000000000000000a RDI: 0000000000000088 [   49.823658] RBP: 0000000000000000 R08: 0000000000000000 R09: ffffffff993cf040 [   49.825404] R10: ffff93b92292e580 R11: ffffd27f188a4b80 R12: 0000000000000000 [   49.827147] R13: 00000000ffffff9c R14: 00000000fffffffe R15: ffff93b8da3446c0 [   49.828890] FS:  00007ffbedffb700(0000) GS:ffff93b927880000(0000) knlGS:0000000000000000 [   49.830725] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [   49.832359] CR2: 0000000000000088 CR3: 00000005e3f74006 CR4: 00000000003606a0 [   49.834085] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [   49.835792] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Cc: Fixes: a6c606551141 ("ovl: redirect on rename-dir") Signed-off-by: Liangyan Reviewed-by: Joseph Qi Suggested-by: Al Viro Signed-off-by: Miklos Szeredi commit b854cc659dcb80f172cb35dbedc15d39d49c383f Author: Miklos Szeredi Date: Tue Jan 5 08:36:11 2021 +0800 ovl: avoid deadlock on directory ioctl The function ovl_dir_real_file() currently uses the inode lock to serialize writes to the od->upperfile field. However, this function will get called by ovl_ioctl_set_flags(), which utilizes the inode lock too. In this case ovl_dir_real_file() will try to claim a lock that is owned by a function in its call stack, which won't get released before ovl_dir_real_file() returns. Fix by replacing the open coded compare and exchange by an explicit atomic op. Fixes: 61536bed2149 ("ovl: support [S|G]ETFLAGS and FS[S|G]ETXATTR ioctls for directories") Cc: stable@vger.kernel.org # v5.10 Reported-by: Icenowy Zheng Tested-by: Icenowy Zheng Signed-off-by: Miklos Szeredi commit f2b00be488730522d0fb7a8a5de663febdcefe0a Author: Miklos Szeredi Date: Thu Jan 28 10:22:48 2021 +0100 cap: fix conversions on getxattr If a capability is stored on disk in v2 format cap_inode_getsecurity() will currently return in v2 format unconditionally. This is wrong: v2 cap should be equivalent to a v3 cap with zero rootid, and so the same conversions performed on it. If the rootid cannot be mapped, v3 is returned unconverted. Fix this so that both v2 and v3 return -EOVERFLOW if the rootid (or the owner of the fs user namespace in case of v2) cannot be mapped into the current user namespace. Signed-off-by: Miklos Szeredi Acked-by: "Eric W. Biederman" commit 554677b97257b0b69378bd74e521edb7e94769ff Author: Miklos Szeredi Date: Thu Jan 28 10:22:48 2021 +0100 ovl: perform vfs_getxattr() with mounter creds The vfs_getxattr() in ovl_xattr_set() is used to check whether an xattr exist on a lower layer file that is to be removed. If the xattr does not exist, then no need to copy up the file. This call of vfs_getxattr() wasn't wrapped in credential override, and this is probably okay. But for consitency wrap this instance as well. Reported-by: "Eric W. Biederman" Signed-off-by: Miklos Szeredi commit 9efb069de4ba748d284f6129e71de239f801053a Author: Miklos Szeredi Date: Thu Jan 28 10:22:48 2021 +0100 ovl: add warning on user_ns mismatch Currently there's no way to create an overlay filesystem outside of the current user namespace. Make sure that if this assumption changes it doesn't go unnoticed. Reported-by: "Eric W. Biederman" Signed-off-by: Miklos Szeredi commit 50f558a5fe16b385cf1427b2a96149f4f68952d9 Author: Santosh Sivaraj Date: Tue Dec 22 09:52:40 2020 +0530 ndtest: Add papr health related flags sysfs attibutes to show health related flags are added. Signed-off-by: Santosh Sivaraj Link: https://lore.kernel.org/r/20201222042240.2983755-8-santosh@fossix.org Signed-off-by: Dan Williams commit 14ccef10e53e4c303570d2ee2d49e45be1118e99 Author: Santosh Sivaraj Date: Tue Dec 22 09:52:39 2020 +0530 ndtest: Add nvdimm control functions Add functions to support ND_CMD_GET_CONFIG_SIZE, ND_CMD_SET_CONFIG_DATA and ND_CMD_GET_CONFIG_DATA. Signed-off-by: Santosh Sivaraj Link: https://lore.kernel.org/r/20201222042240.2983755-7-santosh@fossix.org Signed-off-by: Dan Williams commit 6fde2d4c8b25cec9589a4a58fd524b9d4e40c4b6 Author: Santosh Sivaraj Date: Tue Dec 22 09:52:38 2020 +0530 ndtest: Add regions and mappings to the test buses The bus config array is used to hold the regions and the respective mappings. This config based interface enables to change the dimm/region/namespace layouts easily. Signed-off-by: Santosh Sivaraj Link: https://lore.kernel.org/r/20201222042240.2983755-6-santosh@fossix.org Signed-off-by: Dan Williams commit 5e41396f723004a4e5710a0bb03259a443be1971 Author: Santosh Sivaraj Date: Tue Dec 22 09:52:37 2020 +0530 ndtest: Add dimm attributes This patch adds sysfs attributes for nvdimm and the dimm device. Signed-off-by: Santosh Sivaraj Link: https://lore.kernel.org/r/20201222042240.2983755-5-santosh@fossix.org Signed-off-by: Dan Williams commit 9399ab61ad82154911563dd8635c585e3f24b16a Author: Santosh Sivaraj Date: Tue Dec 22 09:52:36 2020 +0530 ndtest: Add dimms to the two buses A config array is used to hold the dimms for each bus. These dimms are registered with nvdimm, and new nvdimms are created on the buses. Signed-off-by: Santosh Sivaraj Link: https://lore.kernel.org/r/20201222042240.2983755-4-santosh@fossix.org Signed-off-by: Dan Williams commit 107b04e970cae754100efb99a5312c321208ca03 Author: Santosh Sivaraj Date: Tue Dec 22 09:52:35 2020 +0530 ndtest: Add compatability string to treat it as PAPR family Since this module is written to be platform agnostic, the module is made part of the PAPR_FAMILY. ndctl identifies the family using the compatible string inside of_node dir-entry. Signed-off-by: Santosh Sivaraj Link: https://lore.kernel.org/r/20201222042240.2983755-3-santosh@fossix.org Signed-off-by: Dan Williams commit 9a27e109a391c9021147553b97c3fe4356e2261c Author: Santosh Sivaraj Date: Tue Dec 22 09:52:34 2020 +0530 testing/nvdimm: Add test module for non-nfit platforms The current test module cannot be used for testing platforms (make check) that do not have support for NFIT. In order to get the ndctl tests working, we need a module which can emulate NVDIMM devices without relying on ACPI/NFIT. The aim of this proposed module is to implement a similar functionality to the existing module but without the ACPI dependencies. This RFC series is split into reviewable and compilable chunks. This patch adds a new driver and registers two nvdimm bus needed for ndctl make check. Signed-off-by: Santosh Sivaraj Link: https://lore.kernel.org/r/20201222042240.2983755-2-santosh@fossix.org Signed-off-by: Dan Williams commit 13f445d65955f388499f00851dc9a86280970f7c Author: Dan Williams Date: Tue Jan 12 23:35:50 2021 -0800 libnvdimm/namespace: Fix visibility of namespace resource attribute Legacy pmem namespaces lost support for the "resource" attribute when the code was cleaned up to put the permission visibility in the declaration. Restore this by listing 'resource' in the default attributes. A new ndctl regression test for pfn_to_online_page() corner cases builds on this fix. Fixes: bfd2e9140656 ("libnvdimm: Simplify root read-only definition for the 'resource' attribute") Cc: Vishal Verma Cc: Dave Jiang Cc: Ira Weiny Cc: Link: https://lore.kernel.org/r/161052334995.1805594.12054873528154362921.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams commit e478d6029dca9d8462f426aee0d32896ef64f10f Author: Christoph Schemmel Date: Wed Jan 27 20:58:46 2021 +0100 USB: serial: option: Adding support for Cinterion MV31 Adding support for Cinterion device MV31 for enumeration with PID 0x00B3 and 0x00B7. usb-devices output for 0x00B3 T: Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 6 Spd=5000 MxCh= 0 D: Ver= 3.20 Cls=ef(misc ) Sub=02 Prot=01 MxPS= 9 #Cfgs= 1 P: Vendor=1e2d ProdID=00b3 Rev=04.14 S: Manufacturer=Cinterion S: Product=Cinterion PID 0x00B3 USB Mobile Broadband S: SerialNumber=b3246eed C: #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=896mA I: If#=0x0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim I: If#=0x1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim I: If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#=0x3 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=ff Driver=cdc_wdm I: If#=0x4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#=0x5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option usb-devices output for 0x00B7 T: Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 5 Spd=5000 MxCh= 0 D: Ver= 3.20 Cls=ef(misc ) Sub=02 Prot=01 MxPS= 9 #Cfgs= 1 P: Vendor=1e2d ProdID=00b7 Rev=04.14 S: Manufacturer=Cinterion S: Product=Cinterion PID 0x00B3 USB Mobile Broadband S: SerialNumber=b3246eed C: #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=896mA I: If#=0x0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan I: If#=0x1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#=0x3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option Signed-off-by: Christoph Schemmel Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit 181f494888d5b178ffda41bed965f187d5e5c432 Author: Michael Roth Date: Wed Jan 27 20:44:51 2021 -0600 KVM: x86: fix CPUID entries returned by KVM_GET_CPUID2 ioctl Recent commit 255cbecfe0 modified struct kvm_vcpu_arch to make 'cpuid_entries' a pointer to an array of kvm_cpuid_entry2 entries rather than embedding the array in the struct. KVM_SET_CPUID and KVM_SET_CPUID2 were updated accordingly, but KVM_GET_CPUID2 was missed. As a result, KVM_GET_CPUID2 currently returns random fields from struct kvm_vcpu_arch to userspace rather than the expected CPUID values. Fix this by treating 'cpuid_entries' as a pointer when copying its contents to userspace buffer. Fixes: 255cbecfe0c9 ("KVM: x86: allocate vcpu->arch.cpuid_entries dynamically") Cc: Vitaly Kuznetsov Signed-off-by: Michael Roth Message-Id: <20210128024451.1816770-1-michael.roth@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit 93a1d4791c10d443bc67044def7efee2991d48b7 Author: Lorenzo Bianconi Date: Tue Jan 26 12:02:13 2021 +0100 mt76: dma: fix a possible memory leak in mt76_add_fragment() Fix a memory leak in mt76_add_fragment routine returning the buffer to the page_frag_cache when we receive a new fragment and the skb_shared_info frag array is full. Fixes: b102f0c522cf6 ("mt76: fix array overflow on receiving too many fragments for a packet") Signed-off-by: Lorenzo Bianconi Acked-by: Felix Fietkau Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/4f9dd73407da88b2a552517ce8db242d86bf4d5c.1611616130.git.lorenzo@kernel.org commit b64acb28da8394485f0762e657470c9fc33aca4d Author: Arnd Bergmann Date: Mon Jan 25 12:36:42 2021 +0100 ath9k: fix build error with LEDS_CLASS=m When CONFIG_ATH9K is built-in but LED support is in a loadable module, both ath9k drivers fails to link: x86_64-linux-ld: drivers/net/wireless/ath/ath9k/gpio.o: in function `ath_deinit_leds': gpio.c:(.text+0x36): undefined reference to `led_classdev_unregister' x86_64-linux-ld: drivers/net/wireless/ath/ath9k/gpio.o: in function `ath_init_leds': gpio.c:(.text+0x179): undefined reference to `led_classdev_register_ext' The problem is that the 'imply' keyword does not enforce any dependency but is only a weak hint to Kconfig to enable another symbol from a defconfig file. Change imply to a 'depends on LEDS_CLASS' that prevents the incorrect configuration but still allows building the driver without LED support. The 'select MAC80211_LEDS' is now ensures that the LED support is actually used if it is present, and the added Kconfig dependency on MAC80211_LEDS ensures that it cannot be enabled manually when it has no effect. Fixes: 197f466e93f5 ("ath9k_htc: Do not select MAC80211_LEDS by default") Signed-off-by: Arnd Bergmann Acked-by: Johannes Berg Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210125113654.2408057-1-arnd@kernel.org commit ae9162e2be767240065b2f16c3061fc0a3622f61 Author: Masahiro Yamada Date: Wed Jan 27 04:15:40 2021 +0900 Revert "checkpatch: add check for keyword 'boolean' in Kconfig definitions" This reverts commit 327953e9af6c59ad111b28359e59e3ec0cbd71b6. You cannot use 'boolean' since commit b92d804a5179 ("kconfig: drop 'boolean' keyword"). This check is no longer needed. Signed-off-by: Masahiro Yamada Acked-by: Joe Perches commit 2cea4a7a1885bd0c765089afc14f7ff0eb77864e Author: Rolf Eike Beer Date: Thu Nov 22 16:40:49 2018 +0100 scripts: use pkg-config to locate libcrypto Otherwise build fails if the headers are not in the default location. While at it also ask pkg-config for the libs, with fallback to the existing value. Signed-off-by: Rolf Eike Beer Cc: stable@vger.kernel.org # 5.6.x Signed-off-by: Masahiro Yamada commit 44a674d6f79867d5652026f1cc11f7ba8a390183 Merge: e41aec79e62fa e2194a1744e85 Author: Jakub Kicinski Date: Wed Jan 27 19:18:37 2021 -0800 Merge tag 'mlx5-fixes-2021-01-26' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5 fixes 2021-01-26 This series introduces some fixes to mlx5 driver. * tag 'mlx5-fixes-2021-01-26' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux: net/mlx5: CT: Fix incorrect removal of tuple_nat_node from nat rhashtable net/mlx5e: Revert parameters on errors when changing MTU and LRO state without reset net/mlx5e: Revert parameters on errors when changing trust state without reset net/mlx5e: Correctly handle changing the number of queues when the interface is down net/mlx5e: Fix CT rule + encap slow path offload and deletion net/mlx5e: Disable hw-tc-offload when MLX5_CLS_ACT config is disabled net/mlx5: Maintain separate page trees for ECPF and PF functions net/mlx5e: Fix IPSEC stats net/mlx5e: Reduce tc unsupported key print level net/mlx5e: free page before return net/mlx5e: E-switch, Fix rate calculation for overflow net/mlx5: Fix memory leak on flow table creation error flow ==================== Link: https://lore.kernel.org/r/20210126234345.202096-1-saeedm@nvidia.com Signed-off-by: Jakub Kicinski commit e41aec79e62fa50f940cf222d1e9577f14e149dc Author: Lijun Pan Date: Wed Jan 27 19:34:42 2021 -0600 ibmvnic: Ensure that CRQ entry read are correctly ordered Ensure that received Command-Response Queue (CRQ) entries are properly read in order by the driver. dma_rmb barrier has been added before accessing the CRQ descriptor to ensure the entire descriptor is read before processing. Fixes: 032c5e82847a ("Driver for IBM System i/p VNIC protocol") Signed-off-by: Lijun Pan Link: https://lore.kernel.org/r/20210128013442.88319-1-ljp@linux.ibm.com Signed-off-by: Jakub Kicinski commit 0f764eec3ea23b7b2c64fb54c9a219553921e93a Merge: 45a81464819aa ce5379963b288 Author: Jakub Kicinski Date: Wed Jan 27 17:53:45 2021 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net 1) Honor stateful expressions defined in the set from the dynset extension. The set definition provides a stateful expression that must be used by the dynset expression in case it is specified. 2) Missing timeout extension in the set element in the dynset extension leads to inconsistent ruleset listing, not allowing the user to restore timeout and expiration on ruleset reload. 3) Do not dump the stateful expression from the dynset extension if it coming from the set definition. * git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf: netfilter: nft_dynset: dump expressions when set definition contains no expressions netfilter: nft_dynset: add timeout extension to template netfilter: nft_dynset: honor stateful expressions in set definition ==================== Link: https://lore.kernel.org/r/20210127132512.5472-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski commit 45a81464819aa5ada8930157eca028d3fd197994 Merge: b770753c7b08f b552766c872f5 Author: Jakub Kicinski Date: Wed Jan 27 17:51:45 2021 -0800 Merge tag 'linux-can-fixes-for-5.11-20210127' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2021-01-27 The patch is by Dan Carpenter and fixes a potential information leak in can_fill_info(). * tag 'linux-can-fixes-for-5.11-20210127' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can: can: dev: prevent potential information leak in can_fill_info() ==================== Link: https://lore.kernel.org/r/20210127094028.2778793-1-mkl@pengutronix.de Signed-off-by: Jakub Kicinski commit b770753c7b08f1f6008d0d364180fc123f7b25e2 Author: Jakub Kicinski Date: Tue Jan 26 18:18:44 2021 -0800 MAINTAINERS: add missing header for bonding include/net/bonding.h is missing from bonding entry. Link: https://lore.kernel.org/r/20210127021844.4071706-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 5ae3a25b32eb94908cfb839d24f9c1bc77e0e08c Merge: 3f96d64497682 329a3678ec699 Author: Jakub Kicinski Date: Wed Jan 27 17:44:51 2021 -0800 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Anthony Nguyen says: ==================== Intel Wired LAN Driver Updates 2021-01-26 This series contains updates to the ice, i40e, and igc driver. Henry corrects setting an unspecified protocol to IPPROTO_NONE instead of 0 for IPv6 flexbytes filters for ice. Nick fixes the IPv6 extension header being processed incorrectly and updates the netdev->dev_addr if it exists in hardware as it may have been modified outside the ice driver. Brett ensures a user cannot request more channels than available LAN MSI-X and fixes the minimum allocation logic as it was incorrectly trying to use more MSI-X than allocated for ice. Stefan Assmann minimizes the delay between getting and using the VSI pointer to prevent a possible crash for i40e. Corinna Vinschen fixes link speed advertising for igc. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: igc: fix link speed advertising i40e: acquire VSI pointer only after VF is initialized ice: Fix MSI-X vector fallback logic ice: Don't allow more channels than LAN MSI-X available ice: update dev_addr in ice_set_mac_address even if HW filter exists ice: Implement flow for IPv6 next header (extension header) ice: fix FDir IPv6 flexbyte ==================== Link: https://lore.kernel.org/r/20210126221035.658124-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 3f96d644976825986a93b7b9fe6a9900a80f2e11 Author: Vadim Fedorenko Date: Tue Jan 26 03:02:14 2021 +0300 net: decnet: fix netdev refcount leaking on error path On building the route there is an assumption that the destination could be local. In this case loopback_dev is used to get the address. If the address is still cannot be retrieved dn_route_output_slow returns EADDRNOTAVAIL with loopback_dev reference taken. Cannot find hash for the fixes tag because this code was introduced long time ago. I don't think that this bug has ever fired but the patch is done just to have a consistent code base. Signed-off-by: Vadim Fedorenko Link: https://lore.kernel.org/r/1611619334-20955-1-git-send-email-vfedorenko@novek.ru Signed-off-by: Jakub Kicinski commit 20776b465c0c249f5e5b5b4fe077cd24ef1cda86 Author: Rasmus Villemoes Date: Mon Jan 25 13:41:16 2021 +0100 net: switchdev: don't set port_obj_info->handled true when -EOPNOTSUPP It's not true that switchdev_port_obj_notify() only inspects the ->handled field of "struct switchdev_notifier_port_obj_info" if call_switchdev_blocking_notifiers() returns 0 - there's a WARN_ON() triggering for a non-zero return combined with ->handled not being true. But the real problem here is that -EOPNOTSUPP is not being properly handled. The wrapper functions switchdev_handle_port_obj_add() et al change a return value of -EOPNOTSUPP to 0, and the treatment of ->handled in switchdev_port_obj_notify() seems to be designed to change that back to -EOPNOTSUPP in case nobody actually acted on the notifier (i.e., everybody returned -EOPNOTSUPP). Currently, as soon as some device down the stack passes the check_cb() check, ->handled gets set to true, which means that switchdev_port_obj_notify() cannot actually ever return -EOPNOTSUPP. This, for example, means that the detection of hardware offload support in the MRP code is broken: switchdev_port_obj_add() used by br_mrp_switchdev_send_ring_test() always returns 0, so since the MRP code thinks the generation of MRP test frames has been offloaded, no such frames are actually put on the wire. Similarly, br_mrp_switchdev_set_ring_role() also always returns 0, causing mrp->ring_role_offloaded to be set to 1. To fix this, continue to set ->handled true if any callback returns success or any error distinct from -EOPNOTSUPP. But if all the callbacks return -EOPNOTSUPP, make sure that ->handled stays false, so the logic in switchdev_port_obj_notify() can propagate that information. Fixes: 9a9f26e8f7ea ("bridge: mrp: Connect MRP API with the switchdev API") Fixes: f30f0601eb93 ("switchdev: Add helpers to aid traversal through lower devices") Reviewed-by: Petr Machata Signed-off-by: Rasmus Villemoes Link: https://lore.kernel.org/r/20210125124116.102928-1-rasmus.villemoes@prevas.dk Signed-off-by: Jakub Kicinski commit 89c7cb1608ac3c7ecc19436469f35ed12da97e1d Author: Yong Wu Date: Tue Jan 19 18:52:03 2021 +0800 of/device: Update dma_range_map only when dev has valid dma-ranges The commit e0d072782c73 ("dma-mapping: introduce DMA range map, supplanting dma_pfn_offset") always update dma_range_map even though it was already set, like in the sunxi_mbus driver. the issue is reported at [1]. This patch avoid this(Updating it only when dev has valid dma-ranges). Meanwhile, dma_range_map contains the devices' dma_ranges information, This patch moves dma_range_map before of_iommu_configure. The iommu driver may need to know the dma_address requirements of its iommu consumer devices. [1] https://lore.kernel.org/linux-arm-kernel/5c7946f3-b56e-da00-a750-be097c7ceb32@arm.com/ CC: Frank Rowand Fixes: e0d072782c73 ("dma-mapping: introduce DMA range map, supplanting dma_pfn_offset"), Suggested-by: Robin Murphy Signed-off-by: Yong Wu Signed-off-by: Paul Kocialkowski Reviewed-by: Rob Herring Reviewed-by: Robin Murphy Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210119105203.15530-1-yong.wu@mediatek.com commit 76c057c84d286140c6c416c3b4ba832cd1d8984e Merge: 2ab38c17aac10 00e35f2b0e8ac Author: Linus Torvalds Date: Wed Jan 27 11:06:15 2021 -0800 Merge branch 'parisc-5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc fixes from Helge Deller: "Two small fixes: - Fix linking error with 64-bit kernel when modules are disabled, reported by kernel test robot - Remove leftover reference to power_tasklet, by Davidlohr Bueso" * 'parisc-5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Enable -mlong-calls gcc option by default when !CONFIG_MODULES parisc: Remove leftover reference to the power_tasklet commit daf12bee07b9e2f38216f58aca7ac4e4e66a7146 Author: Marek Szyprowski Date: Fri Jan 22 06:52:18 2021 +0100 arm64: dts: meson: switch TFLASH_VDD_EN pin to open drain on Odroid-C4 For the proper reboot Odroid-C4 board requires to switch TFLASH_VDD_EN pin to the high impedance mode, otherwise the board is stuck in the middle of loading early stages of the bootloader from SD card. This can be achieved by using the OPEN_DRAIN flag instead of the ACTIVE_HIGH, what will leave the pin in input mode to achieve high state (pin has the pull-up) and solve the issue. Suggested-by: Neil Armstrong Fixes: 326e57518b0d ("arm64: dts: meson-sm1: add support for Hardkernel ODROID-C4") Signed-off-by: Marek Szyprowski Acked-by: Martin Blumenstingl Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20210122055218.27241-1-m.szyprowski@samsung.com commit d17405d52bacd14fe7fdbb10c0434934ea496914 Author: Barry Song Date: Mon Jan 25 14:13:06 2021 +1300 dma-mapping: benchmark: fix kernel crash when dma_map_single fails if dma_map_single() fails, kernel will give the below oops since task_struct has been destroyed and we are running into the memory corruption due to use-after-free in kthread_stop(): [ 48.095310] Unable to handle kernel paging request at virtual address 000000c473548040 [ 48.095736] Mem abort info: [ 48.095864] ESR = 0x96000004 [ 48.096025] EC = 0x25: DABT (current EL), IL = 32 bits [ 48.096268] SET = 0, FnV = 0 [ 48.096401] EA = 0, S1PTW = 0 [ 48.096538] Data abort info: [ 48.096659] ISV = 0, ISS = 0x00000004 [ 48.096820] CM = 0, WnR = 0 [ 48.097079] user pgtable: 4k pages, 48-bit VAs, pgdp=0000000104639000 [ 48.098099] [000000c473548040] pgd=0000000000000000, p4d=0000000000000000 [ 48.098832] Internal error: Oops: 96000004 [#1] PREEMPT SMP [ 48.099232] Modules linked in: [ 48.099387] CPU: 0 PID: 2 Comm: kthreadd Tainted: G W [ 48.099887] Hardware name: linux,dummy-virt (DT) [ 48.100078] pstate: 60000005 (nZCv daif -PAN -UAO -TCO BTYPE=--) [ 48.100516] pc : __kmalloc_node+0x214/0x368 [ 48.100944] lr : __kmalloc_node+0x1f4/0x368 [ 48.101458] sp : ffff800011f0bb80 [ 48.101843] x29: ffff800011f0bb80 x28: ffff0000c0098ec0 [ 48.102330] x27: 0000000000000000 x26: 00000000001d4600 [ 48.102648] x25: ffff0000c0098ec0 x24: ffff800011b6a000 [ 48.102988] x23: 00000000ffffffff x22: ffff0000c0098ec0 [ 48.103333] x21: ffff8000101d7a54 x20: 0000000000000dc0 [ 48.103657] x19: ffff0000c0001e00 x18: 0000000000000000 [ 48.104069] x17: 0000000000000000 x16: 0000000000000000 [ 48.105449] x15: 000001aa0304e7b9 x14: 00000000000003b1 [ 48.106401] x13: ffff8000122d5000 x12: ffff80001228d000 [ 48.107296] x11: ffff0000c0154340 x10: 0000000000000000 [ 48.107862] x9 : ffff80000fffffff x8 : ffff0000c473527f [ 48.108326] x7 : ffff800011e62f58 x6 : ffff0000c01c8ed8 [ 48.108778] x5 : ffff0000c0098ec0 x4 : 0000000000000000 [ 48.109223] x3 : 00000000001d4600 x2 : 0000000000000040 [ 48.109656] x1 : 0000000000000001 x0 : ff0000c473548000 [ 48.110104] Call trace: [ 48.110287] __kmalloc_node+0x214/0x368 [ 48.110493] __vmalloc_node_range+0xc4/0x298 [ 48.110805] copy_process+0x2c8/0x15c8 [ 48.111133] kernel_clone+0x5c/0x3c0 [ 48.111373] kernel_thread+0x64/0x90 [ 48.111604] kthreadd+0x158/0x368 [ 48.111810] ret_from_fork+0x10/0x30 [ 48.112336] Code: 17ffffe9 b9402a62 b94008a1 11000421 (f8626802) [ 48.112884] ---[ end trace d4890e21e75419d5 ]--- Signed-off-by: Barry Song Signed-off-by: Christoph Hellwig commit 6195ba09822c87cad09189bbf550d0fbe714687a Author: Hao Xu Date: Wed Jan 27 15:14:09 2021 +0800 io_uring: fix flush cqring overflow list while TASK_INTERRUPTIBLE Abaci reported the follow warning: [ 27.073425] do not call blocking ops when !TASK_RUNNING; state=1 set at [] prepare_to_wait_exclusive+0x3a/0xc0 [ 27.075805] WARNING: CPU: 0 PID: 951 at kernel/sched/core.c:7853 __might_sleep+0x80/0xa0 [ 27.077604] Modules linked in: [ 27.078379] CPU: 0 PID: 951 Comm: a.out Not tainted 5.11.0-rc3+ #1 [ 27.079637] Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011 [ 27.080852] RIP: 0010:__might_sleep+0x80/0xa0 [ 27.081835] Code: 65 48 8b 04 25 80 71 01 00 48 8b 90 c0 15 00 00 48 8b 70 18 48 c7 c7 08 39 95 82 c6 05 f9 5f de 08 01 48 89 d1 e8 00 c6 fa ff 0b eb bf 41 0f b6 f5 48 c7 c7 40 23 c9 82 e8 f3 48 ec 00 eb a7 [ 27.084521] RSP: 0018:ffffc90000fe3ce8 EFLAGS: 00010286 [ 27.085350] RAX: 0000000000000000 RBX: ffffffff82956083 RCX: 0000000000000000 [ 27.086348] RDX: ffff8881057a0000 RSI: ffffffff8118cc9e RDI: ffff88813bc28570 [ 27.087598] RBP: 00000000000003a7 R08: 0000000000000001 R09: 0000000000000001 [ 27.088819] R10: ffffc90000fe3e00 R11: 00000000fffef9f0 R12: 0000000000000000 [ 27.089819] R13: 0000000000000000 R14: ffff88810576eb80 R15: ffff88810576e800 [ 27.091058] FS: 00007f7b144cf740(0000) GS:ffff88813bc00000(0000) knlGS:0000000000000000 [ 27.092775] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 27.093796] CR2: 00000000022da7b8 CR3: 000000010b928002 CR4: 00000000003706f0 [ 27.094778] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 27.095780] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 27.097011] Call Trace: [ 27.097685] __mutex_lock+0x5d/0xa30 [ 27.098565] ? prepare_to_wait_exclusive+0x71/0xc0 [ 27.099412] ? io_cqring_overflow_flush.part.101+0x6d/0x70 [ 27.100441] ? lockdep_hardirqs_on_prepare+0xe9/0x1c0 [ 27.101537] ? _raw_spin_unlock_irqrestore+0x2d/0x40 [ 27.102656] ? trace_hardirqs_on+0x46/0x110 [ 27.103459] ? io_cqring_overflow_flush.part.101+0x6d/0x70 [ 27.104317] io_cqring_overflow_flush.part.101+0x6d/0x70 [ 27.105113] io_cqring_wait+0x36e/0x4d0 [ 27.105770] ? find_held_lock+0x28/0xb0 [ 27.106370] ? io_uring_remove_task_files+0xa0/0xa0 [ 27.107076] __x64_sys_io_uring_enter+0x4fb/0x640 [ 27.107801] ? rcu_read_lock_sched_held+0x59/0xa0 [ 27.108562] ? lockdep_hardirqs_on_prepare+0xe9/0x1c0 [ 27.109684] ? syscall_enter_from_user_mode+0x26/0x70 [ 27.110731] do_syscall_64+0x2d/0x40 [ 27.111296] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 27.112056] RIP: 0033:0x7f7b13dc8239 [ 27.112663] Code: 01 00 48 81 c4 80 00 00 00 e9 f1 fe ff ff 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 3d 01 f0 ff ff 73 01 c3 48 8b 0d 27 ec 2c 00 f7 d8 64 89 01 48 [ 27.115113] RSP: 002b:00007ffd6d7f5c88 EFLAGS: 00000286 ORIG_RAX: 00000000000001aa [ 27.116562] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f7b13dc8239 [ 27.117961] RDX: 000000000000478e RSI: 0000000000000000 RDI: 0000000000000003 [ 27.118925] RBP: 00007ffd6d7f5cb0 R08: 0000000020000040 R09: 0000000000000008 [ 27.119773] R10: 0000000000000001 R11: 0000000000000286 R12: 0000000000400480 [ 27.120614] R13: 00007ffd6d7f5d90 R14: 0000000000000000 R15: 0000000000000000 [ 27.121490] irq event stamp: 5635 [ 27.121946] hardirqs last enabled at (5643): [] console_unlock+0x5c4/0x740 [ 27.123476] hardirqs last disabled at (5652): [] console_unlock+0x4e7/0x740 [ 27.125192] softirqs last enabled at (5272): [] __do_softirq+0x3c5/0x5aa [ 27.126430] softirqs last disabled at (5267): [] asm_call_irq_on_stack+0xf/0x20 [ 27.127634] ---[ end trace 289d7e28fa60f928 ]--- This is caused by calling io_cqring_overflow_flush() which may sleep after calling prepare_to_wait_exclusive() which set task state to TASK_INTERRUPTIBLE Reported-by: Abaci Fixes: 6c503150ae33 ("io_uring: patch up IOPOLL overflow_flush sync") Reviewed-by: Pavel Begunkov Signed-off-by: Hao Xu Signed-off-by: Jens Axboe commit 8dc932d3e8afb65e12eba7495f046c83884c49bf Author: Maxim Mikityanskiy Date: Tue Jan 26 21:59:07 2021 +0200 Revert "block: simplify set_init_blocksize" to regain lost performance The cited commit introduced a serious regression with SATA write speed, as found by bisecting. This patch reverts this commit, which restores write speed back to the values observed before this commit. The performance tests were done on a Helios4 NAS (2nd batch) with 4 HDDs (WD8003FFBX) using dd (bs=1M count=2000). "Direct" is a test with a single HDD, the rest are different RAID levels built over the first partitions of 4 HDDs. Test results are in MB/s, R is read, W is write. | Direct | RAID0 | RAID10 f2 | RAID10 n2 | RAID6 ----------------+--------+-------+-----------+-----------+-------- 9011495c9466 | R:256 | R:313 | R:276 | R:313 | R:323 (before faulty) | W:254 | W:253 | W:195 | W:204 | W:117 ----------------+--------+-------+-----------+-----------+-------- 5ff9f19231a0 | R:257 | R:398 | R:312 | R:344 | R:391 (faulty commit) | W:154 | W:122 | W:67.7 | W:66.6 | W:67.2 ----------------+--------+-------+-----------+-----------+-------- 5.10.10 | R:256 | R:401 | R:312 | R:356 | R:375 unpatched | W:149 | W:123 | W:64 | W:64.1 | W:61.5 ----------------+--------+-------+-----------+-----------+-------- 5.10.10 | R:255 | R:396 | R:312 | R:340 | R:393 patched | W:247 | W:274 | W:220 | W:225 | W:121 Applying this patch doesn't hurt read performance, while improves the write speed by 1.5x - 3.5x (more impact on RAID tests). The write speed is restored back to the state before the faulty commit, and even a bit higher in RAID tests (which aren't HDD-bound on this device) - that is likely related to other optimizations done between the faulty commit and 5.10.10 which also improved the read speed. Signed-off-by: Maxim Mikityanskiy Fixes: 5ff9f19231a0 ("block: simplify set_init_blocksize") Cc: Christoph Hellwig Cc: Jens Axboe Acked-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 40fb68c7725aee024ed99ad38504f5d25820c6f0 Author: Bjorn Helgaas Date: Wed Jan 27 09:50:41 2021 -0600 Revert "PCI/ASPM: Save/restore L1SS Capability for suspend/resume" This reverts commit 4257f7e008ea394fcecc050f1569c3503b8bcc15. Kenneth reported that after 4257f7e008ea, he sees a torrent of disk I/O errors on his NVMe device after suspend/resume until a reboot. Link: https://lore.kernel.org/linux-pci/20201228040513.GA611645@bjorn-Precision-5520/ Reported-by: Kenneth R. Crudup Signed-off-by: Bjorn Helgaas commit 03a58ea5905fdbd93ff9e52e670d802600ba38cd Author: Kent Gibson Date: Thu Jan 21 22:10:38 2021 +0800 gpiolib: cdev: clear debounce period if line set to output When set_config changes a line from input to output debounce is implicitly disabled, as debounce makes no sense for outputs, but the debounce period is not being cleared and is still reported in the line info. So clear the debounce period when the debouncer is stopped in edge_detector_stop(). Fixes: 65cff7046406 ("gpiolib: cdev: support setting debounce") Cc: stable@vger.kernel.org Signed-off-by: Kent Gibson Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 2e92493637a09547734f92c62a2471f6f0cb9a2c Author: Juergen Gross Date: Mon Jan 25 14:42:07 2021 +0100 x86/xen: avoid warning in Xen pv guest with CONFIG_AMD_MEM_ENCRYPT enabled When booting a kernel which has been built with CONFIG_AMD_MEM_ENCRYPT enabled as a Xen pv guest a warning is issued for each processor: [ 5.964347] ------------[ cut here ]------------ [ 5.968314] WARNING: CPU: 0 PID: 1 at /home/gross/linux/head/arch/x86/xen/enlighten_pv.c:660 get_trap_addr+0x59/0x90 [ 5.972321] Modules linked in: [ 5.976313] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G W 5.11.0-rc5-default #75 [ 5.980313] Hardware name: Dell Inc. OptiPlex 9020/0PC5F7, BIOS A05 12/05/2013 [ 5.984313] RIP: e030:get_trap_addr+0x59/0x90 [ 5.988313] Code: 42 10 83 f0 01 85 f6 74 04 84 c0 75 1d b8 01 00 00 00 c3 48 3d 00 80 83 82 72 08 48 3d 20 81 83 82 72 0c b8 01 00 00 00 eb db <0f> 0b 31 c0 c3 48 2d 00 80 83 82 48 ba 72 1c c7 71 1c c7 71 1c 48 [ 5.992313] RSP: e02b:ffffc90040033d38 EFLAGS: 00010202 [ 5.996313] RAX: 0000000000000001 RBX: ffffffff82a141d0 RCX: ffffffff8222ec38 [ 6.000312] RDX: ffffffff8222ec38 RSI: 0000000000000005 RDI: ffffc90040033d40 [ 6.004313] RBP: ffff8881003984a0 R08: 0000000000000007 R09: ffff888100398000 [ 6.008312] R10: 0000000000000007 R11: ffffc90040246000 R12: ffff8884082182a8 [ 6.012313] R13: 0000000000000100 R14: 000000000000001d R15: ffff8881003982d0 [ 6.016316] FS: 0000000000000000(0000) GS:ffff888408200000(0000) knlGS:0000000000000000 [ 6.020313] CS: e030 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 6.024313] CR2: ffffc900020ef000 CR3: 000000000220a000 CR4: 0000000000050660 [ 6.028314] Call Trace: [ 6.032313] cvt_gate_to_trap.part.7+0x3f/0x90 [ 6.036313] ? asm_exc_double_fault+0x30/0x30 [ 6.040313] xen_convert_trap_info+0x87/0xd0 [ 6.044313] xen_pv_cpu_up+0x17a/0x450 [ 6.048313] bringup_cpu+0x2b/0xc0 [ 6.052313] ? cpus_read_trylock+0x50/0x50 [ 6.056313] cpuhp_invoke_callback+0x80/0x4c0 [ 6.060313] _cpu_up+0xa7/0x140 [ 6.064313] cpu_up+0x98/0xd0 [ 6.068313] bringup_nonboot_cpus+0x4f/0x60 [ 6.072313] smp_init+0x26/0x79 [ 6.076313] kernel_init_freeable+0x103/0x258 [ 6.080313] ? rest_init+0xd0/0xd0 [ 6.084313] kernel_init+0xa/0x110 [ 6.088313] ret_from_fork+0x1f/0x30 [ 6.092313] ---[ end trace be9ecf17dceeb4f3 ]--- Reason is that there is no Xen pv trap entry for X86_TRAP_VC. Fix that by adding a generic trap handler for unknown traps and wire all unknown bare metal handlers to this generic handler, which will just crash the system in case such a trap will ever happen. Fixes: 0786138c78e793 ("x86/sev-es: Add a Runtime #VC Exception Handler") Cc: # v5.10 Signed-off-by: Juergen Gross Reviewed-by: Andrew Cooper Signed-off-by: Juergen Gross commit a1df829ead5877d4a1061e976a50e2e665a16f24 Author: Moritz Fischer Date: Thu Jan 21 17:24:19 2021 -0800 ACPI/IORT: Do not blindly trust DMA masks from firmware Address issue observed on real world system with suboptimal IORT table where DMA masks of PCI devices would get set to 0 as result. iort_dma_setup() would query the root complex'/named component IORT entry for a DMA mask, and use that over the one the device has been configured with earlier. Ideally we want to use the minimum mask of what the IORT contains for the root complex and what the device was configured with. Fixes: 5ac65e8c8941 ("ACPI/IORT: Support address size limit for root complexes") Signed-off-by: Moritz Fischer Reviewed-by: Robin Murphy Acked-by: Lorenzo Pieralisi Link: https://lore.kernel.org/r/20210122012419.95010-1-mdf@kernel.org Signed-off-by: Catalin Marinas commit e82080e1f456467cc185fe65ee69fe9f9bd0b576 Author: Janosch Frank Date: Wed Jan 13 11:56:26 2021 -0500 s390: uv: Fix sysfs max number of VCPUs reporting The number reported by the query is N-1 and I think people reading the sysfs file would expect N instead. For users creating VMs there's no actual difference because KVM's limit is currently below the UV's limit. Signed-off-by: Janosch Frank Fixes: a0f60f8431999 ("s390/protvirt: Add sysfs firmware interface for Ultravisor information") Cc: stable@vger.kernel.org Reviewed-by: Claudio Imbrenda Acked-by: Cornelia Huck Signed-off-by: Vasily Gorbik commit 6c12a6384e0c0b96debd88b24028e58f2ebd417b Author: Tony Krowiak Date: Tue Dec 22 20:15:53 2020 -0500 s390/vfio-ap: No need to disable IRQ after queue reset The queues assigned to a matrix mediated device are currently reset when: * The VFIO_DEVICE_RESET ioctl is invoked * The mdev fd is closed by userspace (QEMU) * The mdev is removed from sysfs. Immediately after the reset of a queue, a call is made to disable interrupts for the queue. This is entirely unnecessary because the reset of a queue disables interrupts, so this will be removed. Furthermore, vfio_ap_irq_disable() does an unconditional PQAP/AQIC which can result in a specification exception (when the corresponding facility is not available), so this is actually a bugfix. Signed-off-by: Tony Krowiak [pasic@linux.ibm.com: minor rework before merging] Signed-off-by: Halil Pasic Fixes: ec89b55e3bce ("s390: ap: implement PAPQ AQIC interception in kernel") Cc: Signed-off-by: Vasily Gorbik commit f21916ec4826766463fe9fb55a5f43d2a365811d Author: Tony Krowiak Date: Tue Dec 22 20:20:13 2020 -0500 s390/vfio-ap: clean up vfio_ap resources when KVM pointer invalidated The vfio_ap device driver registers a group notifier with VFIO when the file descriptor for a VFIO mediated device for a KVM guest is opened to receive notification that the KVM pointer is set (VFIO_GROUP_NOTIFY_SET_KVM event). When the KVM pointer is set, the vfio_ap driver takes the following actions: 1. Stashes the KVM pointer in the vfio_ap_mdev struct that holds the state of the mediated device. 2. Calls the kvm_get_kvm() function to increment its reference counter. 3. Sets the function pointer to the function that handles interception of the instruction that enables/disables interrupt processing. 4. Sets the masks in the KVM guest's CRYCB to pass AP resources through to the guest. In order to avoid memory leaks, when the notifier is called to receive notification that the KVM pointer has been set to NULL, the vfio_ap device driver should reverse the actions taken when the KVM pointer was set. Fixes: 258287c994de ("s390: vfio-ap: implement mediated device open callback") Signed-off-by: Tony Krowiak Reviewed-by: Halil Pasic Reviewed-by: Cornelia Huck Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20201223012013.5418-1-akrowiak@linux.ibm.com Signed-off-by: Christian Borntraeger Signed-off-by: Vasily Gorbik commit b552766c872f5b0d90323b24e4c9e8fa67486dd5 Author: Dan Carpenter Date: Thu Jan 21 09:08:05 2021 +0300 can: dev: prevent potential information leak in can_fill_info() The "bec" struct isn't necessarily always initialized. For example, the mcp251xfd_get_berr_counter() function doesn't initialize anything if the interface is down. Fixes: 52c793f24054 ("can: netlink support for bus-error reporting and counters") Link: https://lore.kernel.org/r/YAkaRdRJncsJO8Ve@mwanda Signed-off-by: Dan Carpenter Signed-off-by: Marc Kleine-Budde commit 211e5db19d15a721b2953ea54b8f26c2963720eb Author: Thomas Gleixner Date: Tue Jan 26 18:02:11 2021 +0100 rtc: mc146818: Detect and handle broken RTCs The recent fix for handling the UIP bit unearthed another issue in the RTC code. If the RTC is advertised but the readout is straight 0xFF because it's not available, the old code just proceeded with crappy values, but the new code hangs because it waits for the UIP bit to become low. Add a sanity check in the RTC CMOS probe function which reads the RTC_VALID register (Register D) which should have bit 0-6 cleared. If that's not the case then fail to register the CMOS. Add the same check to mc146818_get_time(), warn once when the condition is true and invalidate the rtc_time data. Reported-by: Mickaël Salaün Signed-off-by: Thomas Gleixner Tested-by: Mickaël Salaün Acked-by: Alexandre Belloni Link: https://lore.kernel.org/r/87tur3fx7w.fsf@nanos.tec.linutronix.de commit 5f46400f7a6a4fad635d5a79e2aa5a04a30ffea1 Author: David Woodhouse Date: Tue Jan 26 17:01:49 2021 +0000 xen: Fix XenStore initialisation for XS_LOCAL In commit 3499ba8198ca ("xen: Fix event channel callback via INTX/GSI") I reworked the triggering of xenbus_probe(). I tried to simplify things by taking out the workqueue based startup triggered from wake_waiting(); the somewhat poorly named xenbus IRQ handler. I missed the fact that in the XS_LOCAL case (Dom0 starting its own xenstored or xenstore-stubdom, which happens after the kernel is booted completely), that IRQ-based trigger is still actually needed. So... put it back, except more cleanly. By just spawning a xenbus_probe thread which waits on xb_waitq and runs the probe the first time it gets woken, just as the workqueue-based hack did. This is actually a nicer approach for *all* the back ends with different interrupt methods, and we can switch them all over to that without the complex conditions for when to trigger it. But not in -rc6. This is the minimal fix for the regression, although it's a step in the right direction instead of doing a partial revert and actually putting the workqueue back. It's also simpler than the workqueue. Fixes: 3499ba8198ca ("xen: Fix event channel callback via INTX/GSI") Reported-by: Juergen Gross Signed-off-by: David Woodhouse Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/4c9af052a6e0f6485d1de43f2c38b1461996db99.camel@infradead.org Signed-off-by: Juergen Gross commit 907d1df30a51cc1a1d25414a00cde0494b83df7b Author: Pavel Begunkov Date: Tue Jan 26 23:35:10 2021 +0000 io_uring: fix wqe->lock/completion_lock deadlock Joseph reports following deadlock: CPU0: ... io_kill_linked_timeout // &ctx->completion_lock io_commit_cqring __io_queue_deferred __io_queue_async_work io_wq_enqueue io_wqe_enqueue // &wqe->lock CPU1: ... __io_uring_files_cancel io_wq_cancel_cb io_wqe_cancel_pending_work // &wqe->lock io_cancel_task_cb // &ctx->completion_lock Only __io_queue_deferred() calls queue_async_work() while holding ctx->completion_lock, enqueue drained requests via io_req_task_queue() instead. Cc: stable@vger.kernel.org # 5.9+ Reported-by: Joseph Qi Tested-by: Joseph Qi Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 2bd29748fca137e4fc01f1a40819e010d9d9cc2e Merge: b491e6a7391e3 c730ab423bfa1 Author: Jakub Kicinski Date: Tue Jan 26 18:23:39 2021 -0800 Merge branch 'net-fec-fix-temporary-rmii-clock-reset-on-link-up' Laurent Badel says: ==================== net: fec: Fix temporary RMII clock reset on link up v2: fixed a compilation warning The FEC drivers performs a "hardware reset" of the MAC module when the link is reported to be up. This causes a short glitch in the RMII clock due to the hardware reset clearing the receive control register which controls the MII mode. It seems that some link partners do not tolerate this glitch, and invalidate the link, which leads to a never-ending loop of negotiation-link up-link down events. This was observed with the iMX28 Soc and LAN8720/LAN8742 PHYs, with two Intel adapters I218-LM and X722-DA2 as link partners, though a number of other link partners do not seem to mind the clock glitch. Changing the hardware reset to a software reset (clearing bit 1 of the ECR register) cured the issue. Attempts to optimize fec_restart() in order to minimize the duration of the glitch were unsuccessful. Furthermore manually producing the glitch by setting MII mode and then back to RMII in two consecutive instructions, resulting in a clock glitch <10us in duration, was enough to cause the partner to invalidate the link. This strongly suggests that the root cause of the link being dropped is indeed the change in clock frequency. In an effort to minimize changes to driver, the patch proposes to use soft reset only for tested SoCs (iMX28) and only if the link is up. This preserves hardware reset in other situations, which might be required for proper setup of the MAC. ==================== Link: https://lore.kernel.org/r/20210125100745.5090-1-laurentbadel@eaton.com Signed-off-by: Jakub Kicinski commit c730ab423bfa1ae99b688a9abdedf74477d44955 Author: Laurent Badel Date: Mon Jan 25 11:07:45 2021 +0100 net: fec: Fix temporary RMII clock reset on link up fec_restart() does a hard reset of the MAC module when the link status changes to up. This temporarily resets the R_CNTRL register which controls the MII mode of the ENET_OUT clock. In the case of RMII, the clock frequency momentarily drops from 50MHz to 25MHz until the register is reconfigured. Some link partners do not tolerate this glitch and invalidate the link causing failure to establish a stable link when using PHY polling mode. Since as per IEEE802.3 the criteria for link validity are PHY-specific, what the partner should tolerate cannot be assumed, so avoid resetting the MII clock by using software reset instead of hardware reset when the link is up. This is generally relevant only if the SoC provides the clock to an external PHY and the PHY is configured for RMII. Signed-off-by: Laurent Badel Signed-off-by: Jakub Kicinski commit b491e6a7391e3ecdebdd7a097550195cc878924a Author: Xie He Date: Mon Jan 25 20:09:39 2021 -0800 net: lapb: Add locking to the lapb module In the lapb module, the timers may run concurrently with other code in this module, and there is currently no locking to prevent the code from racing on "struct lapb_cb". This patch adds locking to prevent racing. 1. Add "spinlock_t lock" to "struct lapb_cb"; Add "spin_lock_bh" and "spin_unlock_bh" to APIs, timer functions and notifier functions. 2. Add "bool t1timer_stop, t2timer_stop" to "struct lapb_cb" to make us able to ask running timers to abort; Modify "lapb_stop_t1timer" and "lapb_stop_t2timer" to make them able to abort running timers; Modify "lapb_t2timer_expiry" and "lapb_t1timer_expiry" to make them abort after they are stopped by "lapb_stop_t1timer", "lapb_stop_t2timer", and "lapb_start_t1timer", "lapb_start_t2timer". 3. Let lapb_unregister wait for other API functions and running timers to stop. 4. The lapb_device_event function calls lapb_disconnect_request. In order to avoid trying to hold the lock twice, add a new function named "__lapb_disconnect_request" which assumes the lock is held, and make it called by lapb_disconnect_request and lapb_device_event. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: Martin Schiller Signed-off-by: Xie He Link: https://lore.kernel.org/r/20210126040939.69995-1-xie.he.0141@gmail.com Signed-off-by: Jakub Kicinski commit 30596ae0547dbda469d31a2678d9072fb0a3fa27 Author: Rob Herring Date: Mon Jan 25 20:39:05 2021 -0600 ARM: zImage: atags_to_fdt: Fix node names on added root nodes Commit 7536c7e03e74 ("of/fdt: Remove redundant kbasename function call") exposed a bug creating DT nodes in the ATAGS to DT fixup code. Non-existent nodes would mistaken get created with a leading '/'. The problem was fdt_path_offset() takes a full path while creating a node with fdt_add_subnode() takes just the basename. Since this we only add root child nodes, we can just skip over the '/'. Fixes: 7536c7e03e74 ("of/fdt: Remove redundant kbasename function call") Reported-by: Chris Packham Cc: Qi Zheng Cc: Russell King Signed-off-by: Rob Herring Tested-by: Chris Packham Link: https://lore.kernel.org/r/20210126023905.1631161-1-robh@kernel.org commit f0947d0d21b219e03940b9be6628a43445c0de7a Author: Ivan Vecera Date: Mon Jan 25 08:44:16 2021 +0100 team: protect features update by RCU to avoid deadlock Function __team_compute_features() is protected by team->lock mutex when it is called from team_compute_features() used when features of an underlying device is changed. This causes a deadlock when NETDEV_FEAT_CHANGE notifier for underlying device is fired due to change propagated from team driver (e.g. MTU change). It's because callbacks like team_change_mtu() or team_vlan_rx_{add,del}_vid() protect their port list traversal by team->lock mutex. Example (r8169 case where this driver disables TSO for certain MTU values): ... [ 6391.348202] __mutex_lock.isra.6+0x2d0/0x4a0 [ 6391.358602] team_device_event+0x9d/0x160 [team] [ 6391.363756] notifier_call_chain+0x47/0x70 [ 6391.368329] netdev_update_features+0x56/0x60 [ 6391.373207] rtl8169_change_mtu+0x14/0x50 [r8169] [ 6391.378457] dev_set_mtu_ext+0xe1/0x1d0 [ 6391.387022] dev_set_mtu+0x52/0x90 [ 6391.390820] team_change_mtu+0x64/0xf0 [team] [ 6391.395683] dev_set_mtu_ext+0xe1/0x1d0 [ 6391.399963] do_setlink+0x231/0xf50 ... In fact team_compute_features() called from team_device_event() does not need to be protected by team->lock mutex and rcu_read_lock() is sufficient there for port list traversal. Fixes: 3d249d4ca7d0 ("net: introduce ethernet teaming device") Cc: Saeed Mahameed Signed-off-by: Ivan Vecera Reviewed-by: Cong Wang Reviewed-by: Jiri Pirko Link: https://lore.kernel.org/r/20210125074416.4056484-1-ivecera@redhat.com Signed-off-by: Jakub Kicinski commit 5cfeb5626d4acef8df993eceec442f7b54943976 Author: Jakub Kicinski Date: Fri Jan 22 09:32:20 2021 -0800 MAINTAINERS: add David Ahern to IPv4/IPv6 maintainers David has been the de-facto maintainer for much of the IP code for the last couple of years, let's make it official. Link: https://lore.kernel.org/r/20210122173220.3579491-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit e2194a1744e8594e82a861687808c1adca419b85 Author: Paul Blakey Date: Mon Jan 25 17:31:26 2021 +0200 net/mlx5: CT: Fix incorrect removal of tuple_nat_node from nat rhashtable If a non nat tuple entry is inserted just to the regular tuples rhashtable (ct_tuples_ht) and not to natted tuples rhashtable (ct_nat_tuples_ht). Commit bc562be9674b ("net/mlx5e: CT: Save ct entries tuples in hashtables") mixed up the return labels and names sot that on cleanup or failure we still try to remove for the natted tuples rhashtable. Fix that by correctly checking if a natted tuples insertion before removing it. While here make it more readable. Fixes: bc562be9674b ("net/mlx5e: CT: Save ct entries tuples in hashtables") Reviewed-by: Roi Dayan Signed-off-by: Paul Blakey Signed-off-by: Saeed Mahameed commit 8355060f5ec381abda77659f91f56302203df535 Author: Maxim Mikityanskiy Date: Fri Dec 11 16:05:01 2020 +0200 net/mlx5e: Revert parameters on errors when changing MTU and LRO state without reset Sometimes, channel params are changed without recreating the channels. It happens in two basic cases: when the channels are closed, and when the parameter being changed doesn't affect how channels are configured. Such changes invoke a hardware command that might fail. The whole operation should be reverted in such cases, but the code that restores the parameters' values in the driver was missing. This commit adds this handling. Fixes: 2e20a151205b ("net/mlx5e: Fail safe mtu and lro setting") Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 912c9b5fcca1ab65b806c19dd3b3cb12d73c6fe2 Author: Maxim Mikityanskiy Date: Thu Jan 14 12:34:01 2021 +0200 net/mlx5e: Revert parameters on errors when changing trust state without reset Trust state may be changed without recreating the channels. It happens when the channels are closed, and when channel parameters (min inline mode) stay the same after changing the trust state. Changing the trust state is a hardware command that may fail. The current code didn't restore the channel parameters to their old values if an error happened and the channels were closed. This commit adds handling for this case. Fixes: 6e0504c69811 ("net/mlx5e: Change inline mode correctly when changing trust state") Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 57ac4a31c48377a3e675b2a731ceacbefefcd34d Author: Maxim Mikityanskiy Date: Fri Dec 11 12:56:56 2020 +0200 net/mlx5e: Correctly handle changing the number of queues when the interface is down This commit addresses two issues related to changing the number of queues when the channels are closed: 1. Missing call to mlx5e_num_channels_changed to update real_num_tx_queues when the number of TCs is changed. 2. When mlx5e_num_channels_changed returns an error, the channel parameters must be reverted. Two Fixes: tags correspond to the first commits where these two issues were introduced. Fixes: 3909a12e7913 ("net/mlx5e: Fix configuration of XPS cpumasks and netdev queues in corner cases") Fixes: fa3748775b92 ("net/mlx5e: Handle errors from netif_set_real_num_{tx,rx}_queues") Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 89e394675818bde8e30e135611c506455fa03fb7 Author: Paul Blakey Date: Thu Jan 21 10:06:45 2021 +0200 net/mlx5e: Fix CT rule + encap slow path offload and deletion Currently, if a neighbour isn't valid when offloading tunnel encap rules, we offload the original match and replace the original action with "goto slow path" action. For this we use a temporary flow attribute based on the original flow attribute and then change the action. Flow flags, which among those is the CT flag, are still shared for the slow path rule offload, so we end up parsing this flow as a CT + goto slow path rule. Besides being unnecessary, CT action offload saves extra information in the passed flow attribute, such as created ct_flow and mod_hdr, which is lost onces the temporary flow attribute is freed. When a neigh is updated and is valid, we offload the original CT rule with original CT action, which again creates a ct_flow and mod_hdr and saves it in the flow's original attribute. Then we delete the slow path rule with a temporary flow attribute based on original updated flow attribute, and we free the relevant ct_flow and mod_hdr. Then when tc deletes this flow, we try to free the ct_flow and mod_hdr on the flow's attribute again. To fix the issue, skip all furture proccesing (CT/Sample/Split rules) in offload/unoffload of slow path rules. Call trace: [ 758.850525] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000218 [ 758.952987] Internal error: Oops: 96000005 [#1] PREEMPT SMP [ 758.964170] Modules linked in: act_csum(E) act_pedit(E) act_tunnel_key(E) act_ct(E) nf_flow_table(E) xt_nat(E) ip6table_filter(E) ip6table_nat(E) xt_comment(E) ip6_tables(E) xt_conntrack(E) xt_MASQUERADE(E) nf_conntrack_netlink(E) xt_addrtype(E) iptable_filter(E) iptable_nat(E) bpfilter(E) br_netfilter(E) bridge(E) stp(E) llc(E) xfrm_user(E) overlay(E) act_mirred(E) act_skbedit(E) rdma_ucm(OE) rdma_cm(OE) iw_cm(OE) ib_ipoib(OE) ib_cm(OE) ib_umad(OE) esp6_offload(E) esp6(E) esp4_offload(E) esp4(E) xfrm_algo(E) mlx5_ib(OE) ib_uverbs(OE) geneve(E) ip6_udp_tunnel(E) udp_tunnel(E) nfnetlink_cttimeout(E) nfnetlink(E) mlx5_core(OE) act_gact(E) cls_flower(E) sch_ingress(E) openvswitch(E) nsh(E) nf_conncount(E) nf_nat(E) mlxfw(OE) psample(E) nf_conntrack(E) nf_defrag_ipv4(E) vfio_mdev(E) mdev(E) ib_core(OE) mlx_compat(OE) crct10dif_ce(E) uio_pdrv_genirq(E) uio(E) i2c_mlx(E) mlxbf_pmc(E) sbsa_gwdt(E) mlxbf_gige(E) gpio_mlxbf2(E) mlxbf_pka(E) mlx_trio(E) mlx_bootctl(E) bluefield_edac(E) knem(O) [ 758.964225] ip_tables(E) mlxbf_tmfifo(E) ipv6(E) crc_ccitt(E) nf_defrag_ipv6(E) [ 759.154186] CPU: 5 PID: 122 Comm: kworker/u16:1 Tainted: G OE 5.4.60-mlnx.52.gde81e85 #1 [ 759.172870] Hardware name: https://www.mellanox.com BlueField SoC/BlueField SoC, BIOS BlueField:3.5.0-2-gc1b5d64 Jan 4 2021 [ 759.195466] Workqueue: mlx5e mlx5e_rep_neigh_update [mlx5_core] [ 759.207344] pstate: a0000005 (NzCv daif -PAN -UAO) [ 759.217003] pc : mlx5_del_flow_rules+0x5c/0x160 [mlx5_core] [ 759.228229] lr : mlx5_del_flow_rules+0x34/0x160 [mlx5_core] [ 759.405858] Call trace: [ 759.410804] mlx5_del_flow_rules+0x5c/0x160 [mlx5_core] [ 759.421337] __mlx5_eswitch_del_rule.isra.43+0x5c/0x1c8 [mlx5_core] [ 759.433963] mlx5_eswitch_del_offloaded_rule_ct+0x34/0x40 [mlx5_core] [ 759.446942] mlx5_tc_rule_delete_ct+0x68/0x74 [mlx5_core] [ 759.457821] mlx5_tc_ct_delete_flow+0x160/0x21c [mlx5_core] [ 759.469051] mlx5e_tc_unoffload_fdb_rules+0x158/0x168 [mlx5_core] [ 759.481325] mlx5e_tc_encap_flows_del+0x140/0x26c [mlx5_core] [ 759.492901] mlx5e_rep_update_flows+0x11c/0x1ec [mlx5_core] [ 759.504127] mlx5e_rep_neigh_update+0x160/0x200 [mlx5_core] [ 759.515314] process_one_work+0x178/0x400 [ 759.523350] worker_thread+0x58/0x3e8 [ 759.530685] kthread+0x100/0x12c [ 759.537152] ret_from_fork+0x10/0x18 [ 759.544320] Code: 97ffef55 51000673 3100067f 54ffff41 (b9421ab3) [ 759.556548] ---[ end trace fab818bb1085832d ]--- Fixes: 4c3844d9e97e ("net/mlx5e: CT: Introduce connection tracking") Signed-off-by: Paul Blakey Reviewed-by: Roi Dayan Reviewed-by: Vlad Buslov Signed-off-by: Saeed Mahameed commit 156878d0e697187c7d207ee6c22afe50b7f3678c Author: Maor Dickman Date: Sun Jan 24 17:21:25 2021 +0200 net/mlx5e: Disable hw-tc-offload when MLX5_CLS_ACT config is disabled The cited commit introduce new CONFIG_MLX5_CLS_ACT kconfig variable to control compilation of TC hardware offloads implementation. When this configuration is disabled the driver is still wrongly reports in ethtool that hw-tc-offload is supported. Fixed by reporting hw-tc-offload is supported only when CONFIG_MLX5_CLS_ACT is enabled. Fixes: d956873f908c ("net/mlx5e: Introduce kconfig var for TC support") Signed-off-by: Maor Dickman Reviewed-by: Vlad Buslov Signed-off-by: Saeed Mahameed commit 0aa128475d33d2d0095947eeab6b3e4d22dbd578 Author: Daniel Jurgens Date: Fri Jan 22 23:13:53 2021 +0200 net/mlx5: Maintain separate page trees for ECPF and PF functions Pages for the host PF and ECPF were stored in the same tree, so the ECPF pages were being freed along with the host PF's when the host driver unloaded. Combine the function ID and ECPF flag to use as an index into the x-array containing the trees to get a different tree for the host PF and ECPF. Fixes: c6168161f693 ("net/mlx5: Add support for release all pages event") Signed-off-by: Daniel Jurgens Signed-off-by: Saeed Mahameed commit 45c9a30835d84009dfe711f5c8836720767c286e Author: Maxim Mikityanskiy Date: Wed Nov 25 13:52:36 2020 +0200 net/mlx5e: Fix IPSEC stats When IPSEC offload isn't active, the number of stats is not zero, but the strings are not filled, leading to exposing stats with empty names. Fix this by using the same condition for NUM_STATS and FILL_STRS. Fixes: 0aab3e1b04ae ("net/mlx5e: IPSec, Expose IPsec HW stat only for supporting HW") Signed-off-by: Maxim Mikityanskiy Reviewed-by: Raed Salem Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 48470a90a42a64dd2f70743a149894a292b356e0 Author: Maor Dickman Date: Tue Jan 19 17:21:38 2021 +0200 net/mlx5e: Reduce tc unsupported key print level "Unsupported key used:" appears in kernel log when flows with unsupported key are used, arp fields for example. OpenVSwitch was changed to match on arp fields by default that caused this warning to appear in kernel log for every arp rule, which can be a lot. Fix by lowering print level from warning to debug. Fixes: e3a2b7ed018e ("net/mlx5e: Support offload cls_flower with drop action") Signed-off-by: Maor Dickman Reviewed-by: Roi Dayan Reviewed-by: Saeed Mahameed Signed-off-by: Saeed Mahameed commit 258ed19f075fbc834fe5d69d8b54983fc11e0d4a Author: Pan Bian Date: Wed Jan 20 20:58:30 2021 -0800 net/mlx5e: free page before return Instead of directly return, goto the error handling label to free allocated page. Fixes: 5f29458b77d5 ("net/mlx5e: Support dump callback in TX reporter") Signed-off-by: Pan Bian Reviewed-by: Leon Romanovsky Signed-off-by: Saeed Mahameed commit 1fe3e3166b35240615ab7f8276af2bbf2e51f559 Author: Parav Pandit Date: Tue Jan 12 16:13:22 2021 +0200 net/mlx5e: E-switch, Fix rate calculation for overflow rate_bytes_ps is a 64-bit field. It passed as 32-bit field to apply_police_params(). Due to this when police rate is higher than 4Gbps, 32-bit calculation ignores the carry. This results in incorrect rate configurationn the device. Fix it by performing 64-bit calculation. Fixes: fcb64c0f5640 ("net/mlx5: E-Switch, add ingress rate support") Signed-off-by: Parav Pandit Reviewed-by: Eli Cohen Signed-off-by: Saeed Mahameed commit 487c6ef81eb98d0a43cb08be91b1fcc9b4250626 Author: Roi Dayan Date: Tue Jan 12 14:04:29 2021 +0200 net/mlx5: Fix memory leak on flow table creation error flow When we create the ft object we also init rhltable in ft->fgs_hash. So in error flow before kfree of ft we need to destroy that rhltable. Fixes: 693c6883bbc4 ("net/mlx5: Add hash table for flow groups in flow table") Signed-off-by: Roi Dayan Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed commit c5e9e8d48acdf3b863282af7f6f6931d39526245 Merge: db22ce68a9c9c 81f153faacd04 Author: Jakub Kicinski Date: Tue Jan 26 15:23:17 2021 -0800 Merge tag 'mac80211-for-net-2021-01-26' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== A couple of fixes: * fix 160 MHz channel switch in mac80211 * fix a staging driver to not deadlock due to some recent cfg80211 changes * fix NULL-ptr deref if cfg80211 returns -EINPROGRESS to wext (syzbot) * pause TX in mac80211 in type change to prevent crashes (syzbot) * tag 'mac80211-for-net-2021-01-26' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211: staging: rtl8723bs: fix wireless regulatory API misuse mac80211: pause TX while changing interface type wext: fix NULL-ptr-dereference with cfg80211's lack of commit() mac80211: 160MHz with extended NSS BW in CSA ==================== Link: https://lore.kernel.org/r/20210126130529.75225-1-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski commit db22ce68a9c9c2e1966bb28c2f61770cf2800d98 Merge: 81a86e1bd8e70 0acb20a5438c3 Author: Jakub Kicinski Date: Tue Jan 26 15:16:39 2021 -0800 Merge tag 'wireless-drivers-2021-01-26' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for v5.11 Second set of fixes for v5.11. Like in last time we again have more fixes than usual Actually a bit too much for my liking in this state of the cycle, but due to unrelated challenges I was only able to submit them now. We have few important crash fixes, iwlwifi modifying read-only data being the most reported issue, and also smaller fixes to iwlwifi. mt76 * fix a clang warning about enum usage * fix rx buffer refcounting crash mt7601u * fix rx buffer refcounting crash * fix crash when unbplugging the device iwlwifi * fix a crash where we were modifying read-only firmware data * lots of smaller fixes all over the driver * tag 'wireless-drivers-2021-01-26' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers: (24 commits) mt7601u: fix kernel crash unplugging the device iwlwifi: queue: bail out on invalid freeing iwlwifi: mvm: guard against device removal in reprobe iwlwifi: Fix IWL_SUBDEVICE_NO_160 macro to use the correct bit. iwlwifi: mvm: clear IN_D3 after wowlan status cmd iwlwifi: pcie: add rules to match Qu with Hr2 iwlwifi: mvm: invalidate IDs of internal stations at mvm start iwlwifi: mvm: fix the return type for DSM functions 1 and 2 iwlwifi: pcie: reschedule in long-running memory reads iwlwifi: pcie: use jiffies for memory read spin time limit iwlwifi: pcie: fix context info memory leak iwlwifi: pcie: add a NULL check in iwl_pcie_txq_unmap iwlwifi: pcie: set LTR on more devices iwlwifi: queue: don't crash if txq->entries is NULL iwlwifi: fix the NMI flow for old devices iwlwifi: pnvm: don't try to load after failures iwlwifi: pnvm: don't skip everything when not reloading iwlwifi: pcie: avoid potential PNVM leaks iwlwifi: mvm: take mutex for calling iwl_mvm_get_sync_time() iwlwifi: mvm: skip power command when unbinding vif during CSA ... ==================== Link: https://lore.kernel.org/r/20210126092202.6A367C433CA@smtp.codeaurora.org Signed-off-by: Jakub Kicinski commit 81a86e1bd8e7060ebba1718b284d54f1238e9bf9 Author: Eric Dumazet Date: Mon Jan 25 07:09:49 2021 -0800 iwlwifi: provide gso_type to GSO packets net/core/tso.c got recent support for USO, and this broke iwlfifi because the driver implemented a limited form of GSO. Providing ->gso_type allows for skb_is_gso_tcp() to provide a correct result. Fixes: 3d5b459ba0e3 ("net: tso: add UDP segmentation support") Signed-off-by: Eric Dumazet Reported-by: Ben Greear Tested-by: Ben Greear Cc: Luca Coelho Cc: Johannes Berg Link: https://bugzilla.kernel.org/show_bug.cgi?id=209913 Link: https://lore.kernel.org/r/20210125150949.619309-1-eric.dumazet@gmail.com Signed-off-by: Jakub Kicinski commit 150a27328b681425c8cab239894a48f2aeb870e9 Author: Quentin Monnet Date: Tue Jan 26 16:13:20 2021 +0000 bpf, preload: Fix build when $(O) points to a relative path Building the kernel with CONFIG_BPF_PRELOAD, and by providing a relative path for the output directory, may fail with the following error: $ make O=build bindeb-pkg ... /.../linux/tools/scripts/Makefile.include:5: *** O=build does not exist. Stop. make[7]: *** [/.../linux/kernel/bpf/preload/Makefile:9: kernel/bpf/preload/libbpf.a] Error 2 make[6]: *** [/.../linux/scripts/Makefile.build:500: kernel/bpf/preload] Error 2 make[5]: *** [/.../linux/scripts/Makefile.build:500: kernel/bpf] Error 2 make[4]: *** [/.../linux/Makefile:1799: kernel] Error 2 make[4]: *** Waiting for unfinished jobs.... In the case above, for the "bindeb-pkg" target, the error is produced by the "dummy" check in Makefile.include, called from libbpf's Makefile. This check changes directory to $(PWD) before checking for the existence of $(O). But at this step we have $(PWD) pointing to "/.../linux/build", and $(O) pointing to "build". So the Makefile.include tries in fact to assert the existence of a directory named "/.../linux/build/build", which does not exist. Note that the error does not occur for all make targets and architectures combinations. This was observed on x86 for "bindeb-pkg", or for a regular build for UML [0]. Here are some details. The root Makefile recursively calls itself once, after changing directory to $(O). The content for the variable $(PWD) is preserved across recursive calls to make, so it is unchanged at this step. For "bindeb-pkg", $(PWD) is eventually updated because the target writes a new Makefile (as debian/rules) and calls it indirectly through dpkg-buildpackage. This script does not preserve $(PWD), which is reset to the current working directory when the target in debian/rules is called. Although not investigated, it seems likely that something similar causes UML to change its value for $(PWD). Non-trivial fixes could be to remove the use of $(PWD) from the "dummy" check, or to make sure that $(PWD) and $(O) are preserved or updated to always play well and form a valid $(PWD)/$(O) path across the different targets and architectures. Instead, we take a simpler approach and just update $(O) when calling libbpf's Makefile, so it points to an absolute path which should always resolve for the "dummy" check run (through includes) by that Makefile. David Gow previously posted a slightly different version of this patch as a RFC [0], two months ago or so. [0] https://lore.kernel.org/bpf/20201119085022.3606135-1-davidgow@google.com/t/#u Fixes: d71fa5c9763c ("bpf: Add kernel module with user mode driver that populates bpffs.") Reported-by: David Gow Signed-off-by: Quentin Monnet Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Cc: Brendan Higgins Cc: Masahiro Yamada Link: https://lore.kernel.org/bpf/20210126161320.24561-1-quentin@isovalent.com commit 329a3678ec69962aa67c91397efbd46d36635f91 Author: Corinna Vinschen Date: Tue Nov 17 20:50:40 2020 +0100 igc: fix link speed advertising Link speed advertising in igc has two problems: - When setting the advertisement via ethtool, the link speed is converted to the legacy 32 bit representation for the intel PHY code. This inadvertently drops ETHTOOL_LINK_MODE_2500baseT_Full_BIT (being beyond bit 31). As a result, any call to `ethtool -s ...' drops the 2500Mbit/s link speed from the PHY settings. Only reloading the driver alleviates that problem. Fix this by converting the ETHTOOL_LINK_MODE_2500baseT_Full_BIT to the Intel PHY ADVERTISE_2500_FULL bit explicitly. - Rather than checking the actual PHY setting, the .get_link_ksettings function always fills link_modes.advertising with all link speeds the device is capable of. Fix this by checking the PHY autoneg_advertised settings and report only the actually advertised speeds up to ethtool. Fixes: 8c5ad0dae93c ("igc: Add ethtool support") Signed-off-by: Corinna Vinschen Signed-off-by: Tony Nguyen commit 7f3414226b58b0df0426104c8ab5e8d50ae71d11 Author: Johannes Berg Date: Fri Jan 15 12:49:45 2021 +0100 um: time: fix initialization in time-travel mode In time-travel mode, since my previous patch, the start time was initialized too late, so that the system would read it before we set it, thus always starting system time at 0 (1970-01-01). This happens because timekeeping_init() reads the time and is called before time_init(). Unfortunately, I didn't see this before because I was testing it only with the RTC patch applied (and enabled), and then the time is read again by the RTC a little - after time_init() this time. Fix this by just doing the initialization whenever necessary. Fixes: 2701c1bd91dd ("um: time: Fix read_persistent_clock64() in time-travel") Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger commit 9868c2081d071f7c309796c8dffc94364fc07582 Author: Johannes Berg Date: Fri Jan 22 21:40:23 2021 +0100 um: fix os_idle_sleep() to not hang Changing os_idle_sleep() to use pause() (I accidentally described it as an empty select() in the commit log because I had changed it from that to pause() in a later revision) exposed a race condition in the idle code. The following can happen: timer_settime(0, 0, {it_interval={tv_sec=0, tv_nsec=0}, it_value={tv_sec=0, tv_nsec=624017}}, NULL) = 0 ... pause() and we now hang forever. This was previously possible as well, but it could never cause UML to hang for more than a second since we could only sleep for that much, so at most you'd notice a "hiccup" in the UML. Obviously, any sort of external interrupt also "saves" it and interrupts pause(). Fix this by properly handling the race, rather than papering over it again: - first, block SIGALRM, and obtain the old signal set - check the timer - suspend, waiting for any signal out of the old set, if, and only if, the timer will fire in the future - restore the old signal mask This ensures race-free operation: as it's blocked, the signal won't be delivered while we're looking at the timer even if it were to be triggered right _after_ we've returned from timer_gettime() with a non-zero value (telling us the timer will trigger). Thus, despite getting to sigsuspend() because timer_gettime() told us we're still waiting, we'll not hang because sigsuspend() will return immediately due to the pending signal. Fixes: 49da38a3ef33 ("um: Simplify os_idle_sleep() and sleep longer") Signed-off-by: Johannes Berg Acked-By: Anton Ivanov Signed-off-by: Richard Weinberger commit a31e9c4e7247d182192e9b85abbea498d63dd850 Author: Johannes Berg Date: Sun Jan 10 19:05:09 2021 +0100 Revert "um: support some of ARCH_HAS_SET_MEMORY" This reverts commit 963285b0b47a ("um: support some of ARCH_HAS_SET_MEMORY"), as it turns out that it's not only not working (due to um never using the protection bits in the page tables) but also corrupts the page tables if used on a non-vmalloc page, since um never allocates proper page tables for the 'physmem' in the first place. Fixing all this will take more effort, so for now revert it. Reported-by: Benjamin Berg Fixes: 963285b0b47a ("um: support some of ARCH_HAS_SET_MEMORY") Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger commit 2fcb4090cd7352665ecb756990a3087bfd86a295 Author: Johannes Berg Date: Sun Jan 10 19:05:08 2021 +0100 Revert "um: allocate a guard page to helper threads" This reverts commit ef4459a6da09 ("um: allocate a guard page to helper threads"), it's broken in multiple ways: 1) the free no longer matches the alloc; and 2) more importantly, the set_memory_ro() causes allocation of page tables for the normal memory that doesn't have any, and that later causes corruption and crashes (usually but not always in vfree()). We could fix the first bug and use vmalloc() to work around the second, but set_memory_ro() actually doesn't do anything either so I'll just revert that as well. Reported-by: Benjamin Berg Fixes: ef4459a6da09 ("um: allocate a guard page to helper threads") Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger commit f4172b084342fd3f9e38c10650ffe19eac30d8ce Author: Johannes Berg Date: Thu Jan 7 22:15:21 2021 +0100 um: virtio: free vu_dev only with the contained struct device Since struct device is refcounted, we shouldn't free the vu_dev immediately when it's removed from the platform device, but only when the references actually all go away. Move the freeing to the release to accomplish that. Fixes: 5d38f324993f ("um: drivers: Add virtio vhost-user driver") Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger commit e23fe90dec286cd77e9059033aa640fc45603602 Author: Thomas Meyer Date: Thu Jan 7 09:05:31 2021 +0100 um: kmsg_dumper: always dump when not tty console With the addition of the ttynull console driver, the chance that a console driver was already registerd did increase. Refine the logic when to dump the kernel message buffer: always dump the buffer, when the UML stdio console driver is not active and the preferred console. Signed-off-by: Thomas Meyer Signed-off-by: Richard Weinberger commit d7ffac33631b2f72ec4cbbf9a64be6aa011b5cfd Author: Thomas Meyer Date: Tue Jan 5 13:01:28 2021 +0100 um: stdio_console: Make preferred console The addition of the "ttynull" console driver did break the ordering of the UML stdio console driver. The UML stdio console driver is added in late_initcall (7), whereby the ttynull driver is added in device_initcall (6), which always does make the ttynull driver the default console. Fix it by explicitly adding the UML stdio console as the preferred console, in case no 'console=' command line option was specified. Signed-off-by: Thomas Meyer Signed-off-by: Richard Weinberger commit 1cdcfb44370b28187a0c33cdbcb4705103ed81aa Author: Johannes Berg Date: Thu Dec 17 13:15:56 2020 +0100 um: return error from ioremap() Back a few years ago, ioremap() was added to UML so that we'd not break the build for everything all the time. However, for some reason, v1 of the patch got applied, rather than the v2 that returned NULL, which was discussed here: https://lore.kernel.org/lkml/1495726955-27497-1-git-send-email-logang@deltatee.com/ Fix that now. Signed-off-by: Johannes Berg Acked-by: Arnd Bergmann Signed-off-by: Richard Weinberger commit 94c41b3a7c370b0d6afc5ace8fafa0531865a940 Author: Hajime Tazaki Date: Mon Dec 21 11:24:34 2020 +0900 um: ubd: fix command line handling of ubd This commit fixes a regression to handle command line parameters of ubd. With a simple line "./linux ubd0="./disk-ext4.img", it fails at ubd_setup_common(). The commit adds additional checks to the variables in order to properly parse the paremeters which previously worked. Fixes: ef3ba87cb7c9 ("um: ubd: Set device serial attribute from cmdline") Cc: Christopher Obbard Signed-off-by: Hajime Tazaki Acked-by: Christopher Obbard Signed-off-by: Richard Weinberger commit 082153866e6600e37a98d6fa21fbc347fa22f6a1 Merge: 3de834b29239f 5b5465dd947cb Author: Arnd Bergmann Date: Tue Jan 26 21:24:35 2021 +0100 Merge tag 'qcom-arm64-defconfig-fixes-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/fixes Qualcomm ARM64 defconfig fixes for v5.11 Devicetree patches for SDM845 introduced in v5.11 requires the platform's interconnect driver to be buildin, or the kernel will fail to provide a valid console when we hit userspace. * tag 'qcom-arm64-defconfig-fixes-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: arm64: defconfig: Make INTERCONNECT_QCOM_SDM845 builtin Link: https://lore.kernel.org/r/20210125232412.642834-1-bjorn.andersson@linaro.org Signed-off-by: Arnd Bergmann commit 3de834b29239fb752f042dd78c88158541202063 Merge: c25644d5db843 93f2a11580a97 Author: Arnd Bergmann Date: Tue Jan 26 21:23:59 2021 +0100 Merge tag 'qcom-arm64-fixes-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/fixes Qualcomm ARM64 fixes for 5.11 This fixes a regression in Lenovo Yoga C630, where the touchpad in some units stopped working, by re-enabling the "tsc2" device. It also marks the LPASS related clocks as protected to allow DB845c and the Lenovo Yoga C630 to boot even if CONFIG_SDM_LPASSCC_845 is enabled. * tag 'qcom-arm64-fixes-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: arm64: dts: qcom: sdm845: Reserve LPASS clocks in gcc arm64: dts: qcom: c630: keep both touchpad devices enabled Link: https://lore.kernel.org/r/20210125232039.642565-1-bjorn.andersson@linaro.org Signed-off-by: Arnd Bergmann commit c25644d5db8430514d14752148e69bf9f6c226de Merge: e6777b8d35dc1 7386a559caa64 Author: Arnd Bergmann Date: Tue Jan 26 21:23:36 2021 +0100 Merge tag 'amlogic-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into arm/fixes arm64: dts: amlogic: fixes for v5.11-rc - meson-g12: Set FL-adj property value * tag 'amlogic-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: arm64: dts: amlogic: meson-g12: Set FL-adj property value Link: https://lore.kernel.org/r/7hk0s0x3im.fsf@baylibre.com Signed-off-by: Arnd Bergmann commit e6777b8d35dc140033476b8f5ae21e8e5440baea Merge: e49c24c8cd00e 83d411224025a Author: Arnd Bergmann Date: Tue Jan 26 21:23:02 2021 +0100 Merge tag 'stm32-dt-for-v5.11-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into arm/fixes STM32 DT fixes for v5.11, round 1 Highlights: ----------- -Fixes are for DHCOM/DHCOR boards: - Fix DRC02 uSD card detect polarity - use uSD card detect on DHCOM - Disable uSD WP on DHCOM - Disable TSC2004 on DRC02 - Fix GPIO hogs on DHCOM boards * tag 'stm32-dt-for-v5.11-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32: ARM: dts: stm32: Fix GPIO hog flags on DHCOM DRC02 ARM: dts: stm32: Fix GPIO hog flags on DHCOM PicoITX ARM: dts: stm32: Fix GPIO hog names on DHCOM ARM: dts: stm32: Disable optional TSC2004 on DRC02 board ARM: dts: stm32: Disable WP on DHCOM uSD slot ARM: dts: stm32: Connect card-detect signal on DHCOM ARM: dts: stm32: Fix polarity of the DH DRC02 uSD card detect Link: https://lore.kernel.org/r/b7379980-857e-736a-85d8-58e2bd300141@foss.st.com Signed-off-by: Arnd Bergmann commit 2ab38c17aac10bf55ab3efde4c4db3893d8691d2 Author: Ævar Arnfjörð Bjarmason Date: Tue Jan 26 01:04:38 2021 +0100 mailmap: remove the "repo-abbrev" comment Remove the magical "repo-abbrev" comment added when this file was introduced in e0ab1ec9fcd3 ([PATCH] add .mailmap for proper git-shortlog output, 2007-02-14). It's been an undocumented feature of git-shortlog(1), originally added to git for Linus's use. Since then he's no longer using it[1], and I've removed the feature in git.git's 4e168333a87 (shortlog: remove unused(?) "repo-abbrev" feature, 2021-01-12). It's on the "master" branch, but not yet in a release version. Let's also remove it from linux.git, both as a heads-up to any potential users of it in linux.git whose use would be broken sooner than later by git itself, and because it'll eventually be entirely redundant. 1. https://lore.kernel.org/git/CAHk-=wixHyBKZVUcxq+NCWMbkrX0xnppb7UCopRWw1+oExYpYw@mail.gmail.com/ Acked-by: Linus Torvalds Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Linus Torvalds commit 00e35f2b0e8acb88d4e1aa96ff0490e3bfe46580 Author: Helge Deller Date: Tue Jan 26 20:16:21 2021 +0100 parisc: Enable -mlong-calls gcc option by default when !CONFIG_MODULES When building a kernel without module support, the CONFIG_MLONGCALL option needs to be enabled in order to reach symbols which are outside of a 22-bit branch. This patch changes the autodetection in the Kconfig script to always enable CONFIG_MLONGCALL when modules are disabled and uses a far call to preempt_schedule_irq() in intr_do_preempt() to reach the symbol in all cases. Signed-off-by: Helge Deller Reported-by: kernel test robot Cc: stable@vger.kernel.org # v5.6+ commit 4992eb41ab1b5d08479193afdc94f9678e5ded13 Merge: c7230a48ed5eb 9a78e15802a87 Author: Linus Torvalds Date: Tue Jan 26 11:10:14 2021 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: - x86 bugfixes - Documentation fixes - Avoid performance regression due to SEV-ES patches - ARM: - Don't allow tagged pointers to point to memslots - Filter out ARMv8.1+ PMU events on v8.0 hardware - Hide PMU registers from userspace when no PMU is configured - More PMU cleanups - Don't try to handle broken PSCI firmware - More sys_reg() to reg_to_encoding() conversions * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: x86: allow KVM_REQ_GET_NESTED_STATE_PAGES outside guest mode for VMX KVM: x86: Revert "KVM: x86: Mark GPRs dirty when written" KVM: SVM: Unconditionally sync GPRs to GHCB on VMRUN of SEV-ES guest KVM: nVMX: Sync unsync'd vmcs02 state to vmcs12 on migration kvm: tracing: Fix unmatched kvm_entry and kvm_exit events KVM: Documentation: Update description of KVM_{GET,CLEAR}_DIRTY_LOG KVM: x86: get smi pending status correctly KVM: x86/pmu: Fix HW_REF_CPU_CYCLES event pseudo-encoding in intel_arch_events[] KVM: x86/pmu: Fix UBSAN shift-out-of-bounds warning in intel_pmu_refresh() KVM: x86: Add more protection against undefined behavior in rsvd_bits() KVM: Documentation: Fix spec for KVM_CAP_ENABLE_CAP_VM KVM: Forbid the use of tagged userspace addresses for memslots KVM: arm64: Filter out v8.1+ events on v8.0 HW KVM: arm64: Compute TPIDR_EL2 ignoring MTE tag KVM: arm64: Use the reg_to_encoding() macro instead of sys_reg() KVM: arm64: Allow PSCI SYSTEM_OFF/RESET to return KVM: arm64: Simplify handling of absent PMU system registers KVM: arm64: Hide PMU registers from userspace when not available commit c7230a48ed5ebdda54867816303e974c154841d1 Merge: 5bec2487ff336 396cf2a46addd Author: Linus Torvalds Date: Tue Jan 26 11:03:30 2021 -0800 Merge tag 'spi-fix-v5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "One new device ID here, plus an error handling fix - nothing remarkable in either" * tag 'spi-fix-v5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spidev: Add cisco device compatible spi: altera: Fix memory leak on error path commit 5bec2487ff3361d96a96b74fceaf39ca54866adb Merge: 377bf660d07a4 14a71d509ac80 Author: Linus Torvalds Date: Tue Jan 26 10:59:01 2021 -0800 Merge tag 'regulator-fix-v5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "The main thing here is a change to make sure that we don't try to double resolve the supply of a regulator if we have two probes going on simultaneously, plus an incremental fix on top of that to resolve a lockdep issue it introduced. There's also a patch from Dmitry Osipenko adding stubs for some functions to avoid build issues in consumers in some configurations" * tag 'regulator-fix-v5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: Fix lockdep warning resolving supplies regulator: consumer: Add missing stubs to regulator/consumer.h regulator: core: avoid regulator_resolve_supply() race condition commit 0aa91f84b1804b59841c834128b2c15330a1ec59 Author: Davidlohr Bueso Date: Thu Jan 14 16:14:48 2021 -0800 parisc: Remove leftover reference to the power_tasklet This was removed long ago, back in: 6e16d9409e1 ([PARISC] Convert soft power switch driver to kthread) Signed-off-by: Davidlohr Bueso Signed-off-by: Helge Deller commit 67a3c6b3cc40bb217c3ff947a55053151a00fea0 Author: Stefan Assmann Date: Mon Nov 30 14:12:57 2020 +0100 i40e: acquire VSI pointer only after VF is initialized This change simplifies the VF initialization check and also minimizes the delay between acquiring the VSI pointer and using it. As known by the commit being fixed, there is a risk of the VSI pointer getting changed. Therefore minimize the delay between getting and using the pointer. Fixes: 9889707b06ac ("i40e: Fix crash caused by stress setting of VF MAC addresses") Signed-off-by: Stefan Assmann Reviewed-by: Jacob Keller Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen commit f3fe97f64384fa4073d9dc0278c4b351c92e295c Author: Brett Creeley Date: Thu Jan 21 10:38:06 2021 -0800 ice: Fix MSI-X vector fallback logic The current MSI-X enablement logic tries to enable best-case MSI-X vectors and if that fails we only support a bare-minimum set. This includes a single MSI-X for 1 Tx and 1 Rx queue and a single MSI-X for the OICR interrupt. Unfortunately, the driver fails to load when we don't get as many MSI-X as requested for a couple reasons. First, the code to allocate MSI-X in the driver tries to allocate num_online_cpus() MSI-X for LAN traffic without caring about the number of MSI-X actually enabled/requested from the kernel for LAN traffic. So, when calling ice_get_res() for the PF VSI, it returns failure because the number of available vectors is less than requested. Fix this by not allowing the PF VSI to allocation more than pf->num_lan_msix MSI-X vectors and pf->num_lan_msix Rx/Tx queues. Limiting the number of queues is done because we don't want more than 1 Tx/Rx queue per interrupt due to performance conerns. Second, the driver assigns pf->num_lan_msix = 2, to account for LAN traffic and the OICR. However, pf->num_lan_msix is only meant for LAN MSI-X. This is causing a failure when the PF VSI tries to allocate/reserve the minimum pf->num_lan_msix because the OICR MSI-X has already been reserved, so there may not be enough MSI-X vectors left. Fix this by setting pf->num_lan_msix = 1 for the failure case. Then the ICE_MIN_MSIX accounts for the LAN MSI-X and the OICR MSI-X needed for the failure case. Update the related defines used in ice_ena_msix_range() to align with the above behavior and remove the unused RDMA defines because RDMA is currently not supported. Also, remove the now incorrect comment. Fixes: 152b978a1f90 ("ice: Rework ice_ena_msix_range") Signed-off-by: Brett Creeley Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 943b881e35829403da638fcb34a959125deafef3 Author: Brett Creeley Date: Thu Jan 21 10:38:05 2021 -0800 ice: Don't allow more channels than LAN MSI-X available Currently users could create more channels than LAN MSI-X available. This is happening because there is no check against pf->num_lan_msix when checking the max allowed channels and will cause performance issues if multiple Tx and Rx queues are tied to a single MSI-X. Fix this by not allowing more channels than LAN MSI-X available in pf->num_lan_msix. Fixes: 87324e747fde ("ice: Implement ethtool ops for channels") Signed-off-by: Brett Creeley Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 13ed5e8a9b9ccd140a79e80283f69d724c9bb2be Author: Nick Nunley Date: Fri Nov 20 16:38:33 2020 -0800 ice: update dev_addr in ice_set_mac_address even if HW filter exists Fix the driver to copy the MAC address configured in ndo_set_mac_address into dev_addr, even if the MAC filter already exists in HW. In some situations (e.g. bonding) the netdev's dev_addr could have been modified outside of the driver, with no change to the HW filter, so the driver cannot assume that they match. Fixes: 757976ab16be ("ice: Fix check for removing/adding mac filters") Signed-off-by: Nick Nunley Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 1b0b0b581b945ee27beb70e8199270a22dd5a2f6 Author: Nick Nunley Date: Fri Nov 20 16:38:31 2020 -0800 ice: Implement flow for IPv6 next header (extension header) This patch is based on a similar change to i40e by Slawomir Laba: "i40e: Implement flow for IPv6 next header (extension header)". When a packet contains an IPv6 header with next header which is an extension header and not a protocol one, the kernel function skb_transport_header called with such sk_buff will return a pointer to the extension header and not to the TCP one. The above explained call caused a problem with packet processing for skb with encapsulation for tunnel with ICE_TX_CTX_EIPT_IPV6. The extension header was not skipped at all. The ipv6_skip_exthdr function does check if next header of the IPV6 header is an extension header and doesn't modify the l4_proto pointer if it points to a protocol header value so its safe to omit the comparison of exthdr and l4.hdr pointers. The ipv6_skip_exthdr can return value -1. This means that the skipping process failed and there is something wrong with the packet so it will be dropped. Fixes: a4e82a81f573 ("ice: Add support for tunnel offloads") Signed-off-by: Nick Nunley Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 29e2d9eb82647654abff150ff02fa1e07362214f Author: Henry Tieman Date: Fri Nov 20 16:38:30 2020 -0800 ice: fix FDir IPv6 flexbyte The packet classifier would occasionally misrecognize an IPv6 training packet when the next protocol field was 0. The correct value for unspecified protocol is IPPROTO_NONE. Fixes: 165d80d6adab ("ice: Support IPv6 Flow Director filters") Signed-off-by: Henry Tieman Reviewed-by: Paul Menzel Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 377bf660d07a47269510435d11f3b65d53edca20 Author: Linus Torvalds Date: Tue Jan 26 10:39:46 2021 -0800 Revert "mm: fix initialization of struct page for holes in memory layout" This reverts commit d3921cb8be29ce5668c64e23ffdaeec5f8c69399. Chris Wilson reports that it causes boot problems: "We have half a dozen or so different machines in CI that are silently failing to boot, that we believe is bisected to this patch" and the CI team confirmed that a revert fixed the issues. The cause is unknown for now, so let's revert it. Link: https://lore.kernel.org/lkml/161160687463.28991.354987542182281928@build.alporthouse.com/ Reported-and-tested-by: Chris Wilson Acked-by: Mike Rapoport Cc: Andrea Arcangeli Cc: Andrew Morton Signed-off-by: Linus Torvalds commit cf81c3abe1b84c4b82fbe771f72e6d181a3d1b7c Author: Enrico Weigelt, metux IT consult Date: Thu Jan 14 11:02:16 2021 +0100 kconfig: mconf: fix HOSTCC call Commit c0f975af1745 ("kconfig: Support building mconf with vendor sysroot ncurses") introduces a bug when HOSTCC contains parameters: the whole command line is treated as the program name (with spaces in it). Therefore, we have to remove the quotes. Fixes: c0f975af1745 ("kconfig: Support building mconf with vendor sysroot ncurses") Signed-off-by: Enrico Weigelt, metux IT consult Signed-off-by: Masahiro Yamada commit e081863ab48d9b2eee9e899cbd05752a2a30308d Author: Ricardo Ribalda Date: Thu Jan 14 14:03:16 2021 +0100 media: hantro: Fix reset_raw_fmt initialization raw_fmt->height in never initialized. But width in initialized twice. Fixes: 88d06362d1d05 ("media: hantro: Refactor for V4L2 API spec compliancy") Signed-off-by: Ricardo Ribalda Signed-off-by: Hans Verkuil Cc: Signed-off-by: Mauro Carvalho Chehab commit eaf18a4165141f04dd26f0c48a7e53438e5a3ea2 Author: Yannick Fertre Date: Fri Jan 15 15:31:44 2021 +0100 media: cec: add stm32 driver Missing stm32 directory to Makefile. Signed-off-by: Yannick Fertre Signed-off-by: Hans Verkuil Fixes: 4be5e8648b0c ("media: move CEC platform drivers to a separate directory") Cc: Signed-off-by: Mauro Carvalho Chehab commit 73bc0b0c2a96b31199da0ce6c3d04be81ef73bb9 Author: Jernej Skrabec Date: Wed Dec 23 12:06:59 2020 +0100 media: cedrus: Fix H264 decoding During H264 API overhaul subtle bug was introduced Cedrus driver. Progressive references have both, top and bottom reference flags set. Cedrus reference list expects only bottom reference flag and only when interlaced frames are decoded. However, due to a bug in Cedrus check, exclusivity is not tested and that flag is set also for progressive references. That causes "jumpy" background with many videos. Fix that by checking that only bottom reference flag is set in control and nothing else. Tested-by: Andre Heider Fixes: cfc8c3ed533e ("media: cedrus: h264: Properly configure reference field") Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil Cc: Signed-off-by: Mauro Carvalho Chehab commit a53e3c189cc6460b60e152af3fc24edf8e0ea9d2 Author: Hans Verkuil Date: Mon Jan 18 16:37:00 2021 +0100 media: v4l2-subdev.h: BIT() is not available in userspace The BIT macro is not available in userspace, so replace BIT(0) by 0x00000001. Signed-off-by: Hans Verkuil Fixes: 6446ec6cbf46 ("media: v4l2-subdev: add VIDIOC_SUBDEV_QUERYCAP ioctl") Cc: Signed-off-by: Mauro Carvalho Chehab commit 519ea6f1c82fcdc9842908155ae379de47818778 Author: Vincenzo Frascino Date: Tue Jan 26 13:40:56 2021 +0000 arm64: Fix kernel address detection of __is_lm_address() Currently, the __is_lm_address() check just masks out the top 12 bits of the address, but if they are 0, it still yields a true result. This has as a side effect that virt_addr_valid() returns true even for invalid virtual addresses (e.g. 0x0). Fix the detection checking that it's actually a kernel address starting at PAGE_OFFSET. Fixes: 68dd8ef32162 ("arm64: memory: Fix virt_addr_valid() using __is_lm_address()") Cc: # 5.4.x Cc: Will Deacon Suggested-by: Catalin Marinas Reviewed-by: Catalin Marinas Acked-by: Mark Rutland Signed-off-by: Vincenzo Frascino Link: https://lore.kernel.org/r/20210126134056.45747-1-vincenzo.frascino@arm.com Signed-off-by: Catalin Marinas commit fed1b6a00a191cad4dd843519b590e3d6ad9f843 Author: Christophe JAILLET Date: Sun Jan 24 08:09:23 2021 +0100 dmaengine: ti: k3-udma: Fix a resource leak in an error handling path In 'dma_pool_create()', we return -ENOMEM, but don't release the resources already allocated, as in all the other error handling paths. Go to 'err_res_free' instead of returning directly. Fixes: 017794739702 ("dmaengine: ti: k3-udma: Initial support for K3 BCDMA") Signed-off-by: Christophe JAILLET Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20210124070923.724479-1-christophe.jaillet@wanadoo.fr Signed-off-by: Vinod Koul commit 4961167bf7482944ca09a6f71263b9e47f949851 Author: Takashi Iwai Date: Tue Jan 26 17:56:03 2021 +0100 ALSA: hda/via: Apply the workaround generically for Clevo machines We've got another report indicating a similar problem wrt the power-saving behavior with VIA codec on Clevo machines. Let's apply the existing workaround generically to all Clevo devices with VIA codecs to cover all in once. BugLink: https://bugzilla.opensuse.org/show_bug.cgi?id=1181330 Cc: Link: https://lore.kernel.org/r/20210126165603.11683-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 78031381ae9c88f4f914d66154f4745122149c58 Author: Mikko Ylinen Date: Mon Jan 25 08:39:36 2021 +0200 bpf: Drop disabled LSM hooks from the sleepable set Some networking and keys LSM hooks are conditionally enabled and when building the new sleepable BPF LSM hooks with those LSM hooks disabled, the following build error occurs: BTFIDS vmlinux FAILED unresolved symbol bpf_lsm_socket_socketpair To fix the error, conditionally add the relevant networking/keys LSM hooks to the sleepable set. Fixes: 423f16108c9d8 ("bpf: Augment the set of sleepable LSM hooks") Signed-off-by: Mikko Ylinen Signed-off-by: Daniel Borkmann Acked-by: KP Singh Link: https://lore.kernel.org/bpf/20210125063936.89365-1-mikko.ylinen@linux.intel.com commit 19f6fe976a61f9afc289b062b7ef67f99b72e7b9 Author: Neil Armstrong Date: Tue Jan 26 09:09:51 2021 +0100 Revert "arm64: dts: amlogic: add missing ethernet reset ID" It has been reported on IRC and in KernelCI boot tests, this change breaks internal PHY support on the Amlogic G12A/SM1 Based boards. We suspect the added signal to reset more than the Ethernet MAC but also the MDIO/(RG)MII mux used to redirect the MAC signals to the internal PHY. This reverts commit f3362f0c18174a1f334a419ab7d567a36bd1b3f3 while we find and acceptable solution to cleanly reset the Ethernet MAC. Reported-by: Corentin Labbe Acked-by: Jérôme Brunet Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20210126080951.2383740-1-narmstrong@baylibre.com commit ca70f00bed6cb255b7a9b91aa18a2717c9217f70 Author: Pavel Begunkov Date: Tue Jan 26 15:28:27 2021 +0000 io_uring: fix cancellation taking mutex while TASK_UNINTERRUPTIBLE do not call blocking ops when !TASK_RUNNING; state=2 set at [<00000000ced9dbfc>] prepare_to_wait+0x1f4/0x3b0 kernel/sched/wait.c:262 WARNING: CPU: 1 PID: 19888 at kernel/sched/core.c:7853 __might_sleep+0xed/0x100 kernel/sched/core.c:7848 RIP: 0010:__might_sleep+0xed/0x100 kernel/sched/core.c:7848 Call Trace: __mutex_lock_common+0xc4/0x2ef0 kernel/locking/mutex.c:935 __mutex_lock kernel/locking/mutex.c:1103 [inline] mutex_lock_nested+0x1a/0x20 kernel/locking/mutex.c:1118 io_wq_submit_work+0x39a/0x720 fs/io_uring.c:6411 io_run_cancel fs/io-wq.c:856 [inline] io_wqe_cancel_pending_work fs/io-wq.c:990 [inline] io_wq_cancel_cb+0x614/0xcb0 fs/io-wq.c:1027 io_uring_cancel_files fs/io_uring.c:8874 [inline] io_uring_cancel_task_requests fs/io_uring.c:8952 [inline] __io_uring_files_cancel+0x115d/0x19e0 fs/io_uring.c:9038 io_uring_files_cancel include/linux/io_uring.h:51 [inline] do_exit+0x2e6/0x2490 kernel/exit.c:780 do_group_exit+0x168/0x2d0 kernel/exit.c:922 get_signal+0x16b5/0x2030 kernel/signal.c:2770 arch_do_signal_or_restart+0x8e/0x6a0 arch/x86/kernel/signal.c:811 handle_signal_work kernel/entry/common.c:147 [inline] exit_to_user_mode_loop kernel/entry/common.c:171 [inline] exit_to_user_mode_prepare+0xac/0x1e0 kernel/entry/common.c:201 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline] syscall_exit_to_user_mode+0x48/0x190 kernel/entry/common.c:302 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Rewrite io_uring_cancel_files() to mimic __io_uring_task_cancel()'s counting scheme, so it does all the heavy work before setting TASK_UNINTERRUPTIBLE. Cc: stable@vger.kernel.org # 5.9+ Reported-by: syzbot+f655445043a26a7cfab8@syzkaller.appspotmail.com Signed-off-by: Pavel Begunkov [axboe: fix inverted task check] Signed-off-by: Jens Axboe commit a1bb3cd58913338e1b627ea6b8c03c2ae82d293f Author: Pavel Begunkov Date: Tue Jan 26 15:28:26 2021 +0000 io_uring: fix __io_uring_files_cancel() with TASK_UNINTERRUPTIBLE If the tctx inflight number haven't changed because of cancellation, __io_uring_task_cancel() will continue leaving the task in TASK_UNINTERRUPTIBLE state, that's not expected by __io_uring_files_cancel(). Ensure we always call finish_wait() before retrying. Cc: stable@vger.kernel.org # 5.9+ Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 1d69f9d901ef14d81c3b004e3282b8cc7b456280 Author: Ikjoon Jang Date: Wed Jan 13 18:05:11 2021 +0800 usb: xhci-mtk: fix unreleased bandwidth data xhci-mtk needs XHCI_MTK_HOST quirk functions in add_endpoint() and drop_endpoint() to handle its own sw bandwidth management. It stores bandwidth data into an internal table every time add_endpoint() is called, and drops those in drop_endpoint(). But when bandwidth allocation fails at one endpoint, all earlier allocation from the same interface could still remain at the table. This patch moves bandwidth management codes to check_bandwidth() and reset_bandwidth() path. To do so, this patch also adds those functions to xhci_driver_overrides and lets mtk-xhci to release all failed endpoints in reset_bandwidth() path. Fixes: 08e469de87a2 ("usb: xhci-mtk: supports bandwidth scheduling with multi-TT") Signed-off-by: Ikjoon Jang Link: https://lore.kernel.org/r/20210113180444.v6.1.Id0d31b5f3ddf5e734d2ab11161ac5821921b1e1e@changeid Cc: stable Signed-off-by: Greg Kroah-Hartman commit a55a9a4c5c6253f6e4dea268af728664ac997790 Author: kernel test robot Date: Thu Jan 21 19:12:54 2021 +0100 usb: gadget: aspeed: add missing of_node_put Breaking out of for_each_child_of_node requires a put on the child value. Generated by: scripts/coccinelle/iterators/for_each_child.cocci Fixes: 82c2d81361ec ("coccinelle: iterators: Add for_each_child.cocci script") CC: Sumera Priyadarsini Reported-by: kernel test robot Signed-off-by: kernel test robot Signed-off-by: Julia Lawall Cc: stable Link: https://lore.kernel.org/r/alpine.DEB.2.22.394.2101211907060.14700@hadrien Signed-off-by: Greg Kroah-Hartman commit d8c6edfa3f4ee0d45d7ce5ef18d1245b78774b9d Author: Jeremy Figgins Date: Sat Jan 23 18:21:36 2021 -0600 USB: usblp: don't call usb_set_interface if there's a single alt Some devices, such as the Winbond Electronics Corp. Virtual Com Port (Vendor=0416, ProdId=5011), lockup when usb_set_interface() or usb_clear_halt() are called. This device has only a single altsetting, so it should not be necessary to call usb_set_interface(). Acked-by: Pete Zaitcev Signed-off-by: Jeremy Figgins Link: https://lore.kernel.org/r/YAy9kJhM/rG8EQXC@watson Cc: stable Signed-off-by: Greg Kroah-Hartman commit 34b1a1ce1458f50ef27c54e28eb9b1947012907a Author: Thomas Gleixner Date: Mon Jan 18 19:01:21 2021 +0100 futex: Handle faults correctly for PI futexes fixup_pi_state_owner() tries to ensure that the state of the rtmutex, pi_state and the user space value related to the PI futex are consistent before returning to user space. In case that the user space value update faults and the fault cannot be resolved by faulting the page in via fault_in_user_writeable() the function returns with -EFAULT and leaves the rtmutex and pi_state owner state inconsistent. A subsequent futex_unlock_pi() operates on the inconsistent pi_state and releases the rtmutex despite not owning it which can corrupt the RB tree of the rtmutex and cause a subsequent kernel stack use after free. It was suggested to loop forever in fixup_pi_state_owner() if the fault cannot be resolved, but that results in runaway tasks which is especially undesired when the problem happens due to a programming error and not due to malice. As the user space value cannot be fixed up, the proper solution is to make the rtmutex and the pi_state consistent so both have the same owner. This leaves the user space value out of sync. Any subsequent operation on the futex will fail because the 10th rule of PI futexes (pi_state owner and user space value are consistent) has been violated. As a consequence this removes the inept attempts of 'fixing' the situation in case that the current task owns the rtmutex when returning with an unresolvable fault by unlocking the rtmutex which left pi_state::owner and rtmutex::owner out of sync in a different and only slightly less dangerous way. Fixes: 1b7558e457ed ("futexes: fix fault handling in futex_lock_pi") Reported-by: gzobqq@gmail.com Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org commit f2dac39d93987f7de1e20b3988c8685523247ae2 Author: Thomas Gleixner Date: Tue Jan 19 16:26:38 2021 +0100 futex: Simplify fixup_pi_state_owner() Too many gotos already and an upcoming fix would make it even more unreadable. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org commit 6ccc84f917d33312eb2846bd7b567639f585ad6d Author: Thomas Gleixner Date: Wed Jan 20 11:35:19 2021 +0100 futex: Use pi_state_update_owner() in put_pi_state() No point in open coding it. This way it gains the extra sanity checks. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org commit 2156ac1934166d6deb6cd0f6ffc4c1076ec63697 Author: Thomas Gleixner Date: Wed Jan 20 11:32:07 2021 +0100 rtmutex: Remove unused argument from rt_mutex_proxy_unlock() Nothing uses the argument. Remove it as preparation to use pi_state_update_owner(). Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org commit c5cade200ab9a2a3be9e7f32a752c8d86b502ec7 Author: Thomas Gleixner Date: Tue Jan 19 15:21:35 2021 +0100 futex: Provide and use pi_state_update_owner() Updating pi_state::owner is done at several places with the same code. Provide a function for it and use that at the obvious places. This is also a preparation for a bug fix to avoid yet another copy of the same code or alternatively introducing a completely unpenetratable mess of gotos. Originally-by: Peter Zijlstra Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org commit 04b79c55201f02ffd675e1231d731365e335c307 Author: Thomas Gleixner Date: Tue Jan 19 16:06:10 2021 +0100 futex: Replace pointless printk in fixup_owner() If that unexpected case of inconsistent arguments ever happens then the futex state is left completely inconsistent and the printk is not really helpful. Replace it with a warning and make the state consistent. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org commit 12bb3f7f1b03d5913b3f9d4236a488aa7774dfe9 Author: Thomas Gleixner Date: Wed Jan 20 16:00:24 2021 +0100 futex: Ensure the correct return value from futex_lock_pi() In case that futex_lock_pi() was aborted by a signal or a timeout and the task returned without acquiring the rtmutex, but is the designated owner of the futex due to a concurrent futex_unlock_pi() fixup_owner() is invoked to establish consistent state. In that case it invokes fixup_pi_state_owner() which in turn tries to acquire the rtmutex again. If that succeeds then it does not propagate this success to fixup_owner() and futex_lock_pi() returns -EINTR or -ETIMEOUT despite having the futex locked. Return success from fixup_pi_state_owner() in all cases where the current task owns the rtmutex and therefore the futex and propagate it correctly through fixup_owner(). Fixup the other callsite which does not expect a positive return value. Fixes: c1e2f0eaf015 ("futex: Avoid violating the 10th rule of futex") Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org commit 489140b5ba2e7cc4b853c29e0591895ddb462a82 Author: Chris Wilson Date: Mon Jan 25 12:50:33 2021 +0000 drm/i915/gt: Always try to reserve GGTT address 0x0 Since writing to address 0 is a very common mistake, let's try to avoid putting anything sensitive there. References: https://gitlab.freedesktop.org/drm/intel/-/issues/2989 Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210125125033.23656-1-chris@chris-wilson.co.uk Cc: stable@vger.kernel.org (cherry picked from commit 56b429cc584c6ed8b895d8d8540959655db1ff73) Signed-off-by: Jani Nikula commit f6e98a1809faa02f40e0d089d6cfc1aa372a34c0 Author: Chris Wilson Date: Thu Jan 21 23:28:07 2021 +0000 drm/i915: Always flush the active worker before returning from the wait The first thing the active retirement worker does is decrement the i915_active count. The first thing we do during i915_active_wait is try to increment the i915_active count, but only if already active [non-zero]. The wait may see that the retirement is already started and so marked the i915_active as idle, and skip waiting for the retirement handler. However, the caller of i915_active_wait may immediately free the i915_active upon returning (e.g. i915_vma_destroy) so we must not return before the concurrent access from the worker is completed. We must always flush the worker. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2473 Fixes: 274cbf20fd10 ("drm/i915: Push the i915_active.retire into a worker") Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: Tvrtko Ursulin Cc: # v5.5+ Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210121232807.16618-1-chris@chris-wilson.co.uk (cherry picked from commit 977a372e972cb42799746c284035a33c64ebace9) Signed-off-by: Jani Nikula commit 3d480fe1befa0ef434f5c25199e7d45c26870555 Author: Pan Bian Date: Thu Jan 21 17:56:40 2021 -0800 drm/i915/selftest: Fix potential memory leak Object out is not released on path that no VMA instance found. The root cause is jumping to an unexpected label on the error path. Fixes: a47e788c2310 ("drm/i915/selftests: Exercise CS TLB invalidation") Signed-off-by: Pan Bian Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20210122015640.16002-1-bianpan2016@163.com (cherry picked from commit 2b015017d5cb01477a79ca184ac25c247d664568) Signed-off-by: Jani Nikula commit 8f6d08c9af284d74276da6681348e4673f13caea Author: Umesh Nerlige Ramappa Date: Thu Jan 21 16:19:35 2021 +0000 drm/i915: Check for all subplatform bits Current code is checking only 2 bits in the subplatform, but actually 3 bits are allocated for the field. Check all 3 bits. Fixes: 805446c8347c ("drm/i915: Introduce concept of a sub-platform") Cc: Tvrtko Ursulin Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Tvrtko Ursulin Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20210121161936.746591-1-tvrtko.ursulin@linux.intel.com (cherry picked from commit 27b695ee1af9bb36605e67055874ec081306ac28) Signed-off-by: Jani Nikula commit a2a5f5628e5494ca9353f761f7fe783dfa82fb9a Author: Ville Syrjälä Date: Mon Dec 7 22:35:11 2020 +0200 drm/i915: Fix ICL MG PHY vswing handling The MH PHY vswing table does have all the entries these days. Get rid of the old hacks in the code which claim otherwise. This hack was totally bogus anyway. The correct way to handle the lack of those two entries would have been to declare our max vswing and pre-emph to both be level 2. Cc: José Roberto de Souza Cc: Clinton Taylor Fixes: 9f7ffa297978 ("drm/i915/tc/icl: Update TC vswing tables") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201207203512.1718-1-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak Reviewed-by: José Roberto de Souza (cherry picked from commit 5ec346476e795089b7dac8ab9dcee30c8d80ad84) Signed-off-by: Jani Nikula commit ef99a60ffd9b918354e038bc5e61f007ff7e901d Author: Chris Wilson Date: Sun Jan 17 09:30:15 2021 +0000 drm/i915/gt: Clear CACHE_MODE prior to clearing residuals Since we do a bare context switch with no restore, the clear residual kernel runs on dirty state, and we must be careful to avoid executing with bad state from context registers inherited from a malicious client. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2955 Fixes: 09aa9e45863e ("drm/i915/gt: Restore clear-residual mitigations for Ivybridge, Baytrail") Testcase: igt/gem_ctx_isolation # ivb,vlv Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Akeem G Abodunrin Reviewed-by: Akeem G Abodunrin Link: https://patchwork.freedesktop.org/patch/msgid/20210117093015.29143-1-chris@chris-wilson.co.uk (cherry picked from commit ace44e13e577c2ae59980e9a6ff5ca253b1cf831) Signed-off-by: Jani Nikula commit 49951ae308e2d552839a930599163cb10ea423c2 Merge: c5b5ff607d6fe 5413dfd8ce0d5 Author: Takashi Iwai Date: Tue Jan 26 13:45:53 2021 +0100 Merge tag 'asoc-fix-v5.11-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v5.11 More fixes for v5.11, almost all driver specific issues including new device IDs - there's one error handling fix for the topology stuff too. commit 81f153faacd04c049e5482d6ff33daddc30ed44e Author: Johannes Berg Date: Tue Jan 26 11:54:09 2021 +0100 staging: rtl8723bs: fix wireless regulatory API misuse This code ends up calling wiphy_apply_custom_regulatory(), for which we document that it should be called before wiphy_register(). This driver doesn't do that, but calls it from ndo_open() with the RTNL held, which caused deadlocks. Since the driver just registers static regdomain data and then the notifier applies the channel changes if any, there's no reason for it to call this in ndo_open(), move it earlier to fix the deadlock. Reported-and-tested-by: Hans de Goede Fixes: 51d62f2f2c50 ("cfg80211: Save the regulatory domain with a lock") Link: https://lore.kernel.org/r/20210126115409.d5fd6f8fe042.Ib5823a6feb2e2aa01ca1a565d2505367f38ad246@changeid Acked-by: Greg Kroah-Hartman Signed-off-by: Johannes Berg commit 054c9939b4800a91475d8d89905827bf9e1ad97a Author: Johannes Berg Date: Fri Jan 22 17:11:16 2021 +0100 mac80211: pause TX while changing interface type syzbot reported a crash that happened when changing the interface type around a lot, and while it might have been easy to fix just the symptom there, a little deeper investigation found that really the reason is that we allowed packets to be transmitted while in the middle of changing the interface type. Disallow TX by stopping the queues while changing the type. Fixes: 34d4bc4d41d2 ("mac80211: support runtime interface type changes") Reported-by: syzbot+d7a3b15976bf7de2238a@syzkaller.appspotmail.com Link: https://lore.kernel.org/r/20210122171115.b321f98f4d4f.I6997841933c17b093535c31d29355be3c0c39628@changeid Signed-off-by: Johannes Berg commit 5122565188bae59d507d90a9a9fd2fd6107f4439 Author: Johannes Berg Date: Thu Jan 21 17:16:22 2021 +0100 wext: fix NULL-ptr-dereference with cfg80211's lack of commit() Since cfg80211 doesn't implement commit, we never really cared about that code there (and it's configured out w/o CONFIG_WIRELESS_EXT). After all, since it has no commit, it shouldn't return -EIWCOMMIT to indicate commit is needed. However, EIWCOMMIT is actually an alias for EINPROGRESS, which _can_ happen if e.g. we try to change the frequency but we're already in the process of connecting to some network, and drivers could return that value (or even cfg80211 itself might). This then causes us to crash because dev->wireless_handlers is NULL but we try to check dev->wireless_handlers->standard[0]. Fix this by also checking dev->wireless_handlers. Also simplify the code a little bit. Cc: stable@vger.kernel.org Reported-by: syzbot+444248c79e117bc99f46@syzkaller.appspotmail.com Reported-by: syzbot+8b2a88a09653d4084179@syzkaller.appspotmail.com Link: https://lore.kernel.org/r/20210121171621.2076e4a37d5a.I5d9c72220fe7bb133fb718751da0180a57ecba4e@changeid Signed-off-by: Johannes Berg commit 179e8e47c02a1950f1c556f2b854bdb2259078fb Author: Jason Gerecke Date: Thu Jan 21 10:46:49 2021 -0800 HID: wacom: Correct NULL dereference on AES pen proximity The recent commit to fix a memory leak introduced an inadvertant NULL pointer dereference. The `wacom_wac->pen_fifo` variable was never intialized, resuling in a crash whenever functions tried to use it. Since the FIFO is only used by AES pens (to buffer events from pen proximity until the hardware reports the pen serial number) this would have been easily overlooked without testing an AES device. This patch converts `wacom_wac->pen_fifo` over to a pointer (since the call to `devres_alloc` allocates memory for us) and ensures that we assign it to point to the allocated and initalized `pen_fifo` before the function returns. Link: https://github.com/linuxwacom/input-wacom/issues/230 Fixes: 37309f47e2f5 ("HID: wacom: Fix memory leakage caused by kfifo_alloc") CC: stable@vger.kernel.org # v4.19+ Signed-off-by: Jason Gerecke Tested-by: Ping Cheng Signed-off-by: Jiri Kosina commit 0549cd67b01016b579047bce045b386202a8bcfc Author: Roger Pau Monne Date: Tue Jan 19 11:57:27 2021 +0100 xen-blkfront: allow discard-* nodes to be optional This is inline with the specification described in blkif.h: * discard-granularity: should be set to the physical block size if node is not present. * discard-alignment, discard-secure: should be set to 0 if node not present. This was detected as QEMU would only create the discard-granularity node but not discard-alignment, and thus the setup done in blkfront_setup_discard would fail. Fix blkfront_setup_discard to not fail on missing nodes, and also fix blkif_set_queue_limits to set the discard granularity to the physical block size if none is specified in xenbus. Fixes: ed30bf317c5ce ('xen-blkfront: Handle discard requests.') Reported-by: Arthur Borsboom Signed-off-by: Roger Pau Monné Reviewed-by: Juergen Gross Tested-By: Arthur Borsboom Link: https://lore.kernel.org/r/20210119105727.95173-1-roger.pau@citrix.com Signed-off-by: Juergen Gross commit 0b964446c63f9d7d7cd1809ee39277b4f73916b5 Author: Miklos Szeredi Date: Tue Jan 19 17:22:03 2021 +0100 ecryptfs: fix uid translation for setxattr on security.capability Prior to commit 7c03e2cda4a5 ("vfs: move cap_convert_nscap() call into vfs_setxattr()") the translation of nscap->rootid did not take stacked filesystems (overlayfs and ecryptfs) into account. That patch fixed the overlay case, but made the ecryptfs case worse. Restore old the behavior for ecryptfs that existed before the overlayfs fix. This does not fix ecryptfs's handling of complex user namespace setups, but it does make sure existing setups don't regress. Reported-by: Eric W. Biederman Cc: Tyler Hicks Fixes: 7c03e2cda4a5 ("vfs: move cap_convert_nscap() call into vfs_setxattr()") Signed-off-by: Miklos Szeredi Signed-off-by: Tyler Hicks commit 9a78e15802a87de2b08dfd1bd88e855201d2c8fa Author: Paolo Bonzini Date: Fri Jan 8 11:43:08 2021 -0500 KVM: x86: allow KVM_REQ_GET_NESTED_STATE_PAGES outside guest mode for VMX VMX also uses KVM_REQ_GET_NESTED_STATE_PAGES for the Hyper-V eVMCS, which may need to be loaded outside guest mode. Therefore we cannot WARN in that case. However, that part of nested_get_vmcs12_pages is _not_ needed at vmentry time. Split it out of KVM_REQ_GET_NESTED_STATE_PAGES handling, so that both vmentry and migration (and in the latter case, independent of is_guest_mode) do the parts that are needed. Cc: # 5.10.x: f2c7ef3ba: KVM: nSVM: cancel KVM_REQ_GET_NESTED_STATE_PAGES Cc: # 5.10.x Signed-off-by: Paolo Bonzini commit aed89418de9a881419516fa0a5643577f521efc9 Author: Sean Christopherson Date: Fri Jan 22 15:50:48 2021 -0800 KVM: x86: Revert "KVM: x86: Mark GPRs dirty when written" Revert the dirty/available tracking of GPRs now that KVM copies the GPRs to the GHCB on any post-VMGEXIT VMRUN, even if a GPR is not dirty. Per commit de3cd117ed2f ("KVM: x86: Omit caching logic for always-available GPRs"), tracking for GPRs noticeably impacts KVM's code footprint. This reverts commit 1c04d8c986567c27c56c05205dceadc92efb14ff. Signed-off-by: Sean Christopherson Message-Id: <20210122235049.3107620-3-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 250091409a4ac567581c1f929eb39139b57b56ec Author: Sean Christopherson Date: Fri Jan 22 15:50:47 2021 -0800 KVM: SVM: Unconditionally sync GPRs to GHCB on VMRUN of SEV-ES guest Drop the per-GPR dirty checks when synchronizing GPRs to the GHCB, the GRPs' dirty bits are set from time zero and never cleared, i.e. will always be seen as dirty. The obvious alternative would be to clear the dirty bits when appropriate, but removing the dirty checks is desirable as it allows reverting GPR dirty+available tracking, which adds overhead to all flavors of x86 VMs. Note, unconditionally writing the GPRs in the GHCB is tacitly allowed by the GHCB spec, which allows the hypervisor (or guest) to provide unnecessary info; it's the guest's responsibility to consume only what it needs (the hypervisor is untrusted after all). The guest and hypervisor can supply additional state if desired but must not rely on that additional state being provided. Cc: Brijesh Singh Cc: Tom Lendacky Fixes: 291bd20d5d88 ("KVM: SVM: Add initial support for a VMGEXIT VMEXIT") Signed-off-by: Sean Christopherson Message-Id: <20210122235049.3107620-2-seanjc@google.com> Signed-off-by: Paolo Bonzini commit d51e1d3f6b4236e0352407d8a63f5c5f71ce193d Author: Maxim Levitsky Date: Thu Jan 14 22:54:47 2021 +0200 KVM: nVMX: Sync unsync'd vmcs02 state to vmcs12 on migration Even when we are outside the nested guest, some vmcs02 fields may not be in sync vs vmcs12. This is intentional, even across nested VM-exit, because the sync can be delayed until the nested hypervisor performs a VMCLEAR or a VMREAD/VMWRITE that affects those rarely accessed fields. However, during KVM_GET_NESTED_STATE, the vmcs12 has to be up to date to be able to restore it. To fix that, call copy_vmcs02_to_vmcs12_rare() before the vmcs12 contents are copied to userspace. Fixes: 7952d769c29ca ("KVM: nVMX: Sync rarely accessed guest fields only when needed") Reviewed-by: Sean Christopherson Signed-off-by: Maxim Levitsky Message-Id: <20210114205449.8715-2-mlevitsk@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit d95df9510679757bdfc22376d351cdf367b3a604 Author: Lorenzo Brescia Date: Wed Dec 23 14:45:07 2020 +0000 kvm: tracing: Fix unmatched kvm_entry and kvm_exit events On VMX, if we exit and then re-enter immediately without leaving the vmx_vcpu_run() function, the kvm_entry event is not logged. That means we will see one (or more) kvm_exit, without its (their) corresponding kvm_entry, as shown here: CPU-1979 [002] 89.871187: kvm_entry: vcpu 1 CPU-1979 [002] 89.871218: kvm_exit: reason MSR_WRITE CPU-1979 [002] 89.871259: kvm_exit: reason MSR_WRITE It also seems possible for a kvm_entry event to be logged, but then we leave vmx_vcpu_run() right away (if vmx->emulation_required is true). In this case, we will have a spurious kvm_entry event in the trace. Fix these situations by moving trace_kvm_entry() inside vmx_vcpu_run() (where trace_kvm_exit() already is). A trace obtained with this patch applied looks like this: CPU-14295 [000] 8388.395387: kvm_entry: vcpu 0 CPU-14295 [000] 8388.395392: kvm_exit: reason MSR_WRITE CPU-14295 [000] 8388.395393: kvm_entry: vcpu 0 CPU-14295 [000] 8388.395503: kvm_exit: reason EXTERNAL_INTERRUPT Of course, not calling trace_kvm_entry() in common x86 code any longer means that we need to adjust the SVM side of things too. Signed-off-by: Lorenzo Brescia Signed-off-by: Dario Faggioli Message-Id: <160873470698.11652.13483635328769030605.stgit@Wayrath> Signed-off-by: Paolo Bonzini commit 01ead84ccd23afadebe66aea0eda002ac29ca9be Author: Zenghui Yu Date: Tue Dec 8 12:34:39 2020 +0800 KVM: Documentation: Update description of KVM_{GET,CLEAR}_DIRTY_LOG Update various words, including the wrong parameter name and the vague description of the usage of "slot" field. Signed-off-by: Zenghui Yu Message-Id: <20201208043439.895-1-yuzenghui@huawei.com> Signed-off-by: Paolo Bonzini commit 1f7becf1b7e21794fc9d460765fe09679bc9b9e0 Author: Jay Zhou Date: Mon Jan 18 16:47:20 2021 +0800 KVM: x86: get smi pending status correctly The injection process of smi has two steps: Qemu KVM Step1: cpu->interrupt_request &= \ ~CPU_INTERRUPT_SMI; kvm_vcpu_ioctl(cpu, KVM_SMI) call kvm_vcpu_ioctl_smi() and kvm_make_request(KVM_REQ_SMI, vcpu); Step2: kvm_vcpu_ioctl(cpu, KVM_RUN, 0) call process_smi() if kvm_check_request(KVM_REQ_SMI, vcpu) is true, mark vcpu->arch.smi_pending = true; The vcpu->arch.smi_pending will be set true in step2, unfortunately if vcpu paused between step1 and step2, the kvm_run->immediate_exit will be set and vcpu has to exit to Qemu immediately during step2 before mark vcpu->arch.smi_pending true. During VM migration, Qemu will get the smi pending status from KVM using KVM_GET_VCPU_EVENTS ioctl at the downtime, then the smi pending status will be lost. Signed-off-by: Jay Zhou Signed-off-by: Shengen Zhuang Message-Id: <20210118084720.1585-1-jianjay.zhou@huawei.com> Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit 98dd2f108e448988d91e296173e773b06fb978b8 Author: Like Xu Date: Wed Dec 30 16:19:16 2020 +0800 KVM: x86/pmu: Fix HW_REF_CPU_CYCLES event pseudo-encoding in intel_arch_events[] The HW_REF_CPU_CYCLES event on the fixed counter 2 is pseudo-encoded as 0x0300 in the intel_perfmon_event_map[]. Correct its usage. Fixes: 62079d8a4312 ("KVM: PMU: add proper support for fixed counter 2") Signed-off-by: Like Xu Message-Id: <20201230081916.63417-1-like.xu@linux.intel.com> Reviewed-by: Sean Christopherson Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit e61ab2a320c3dfd6209efe18a575979e07470597 Author: Like Xu Date: Mon Jan 18 10:58:00 2021 +0800 KVM: x86/pmu: Fix UBSAN shift-out-of-bounds warning in intel_pmu_refresh() Since we know vPMU will not work properly when (1) the guest bit_width(s) of the [gp|fixed] counters are greater than the host ones, or (2) guest requested architectural events exceeds the range supported by the host, so we can setup a smaller left shift value and refresh the guest cpuid entry, thus fixing the following UBSAN shift-out-of-bounds warning: shift exponent 197 is too large for 64-bit type 'long long unsigned int' Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x107/0x163 lib/dump_stack.c:120 ubsan_epilogue+0xb/0x5a lib/ubsan.c:148 __ubsan_handle_shift_out_of_bounds.cold+0xb1/0x181 lib/ubsan.c:395 intel_pmu_refresh.cold+0x75/0x99 arch/x86/kvm/vmx/pmu_intel.c:348 kvm_vcpu_after_set_cpuid+0x65a/0xf80 arch/x86/kvm/cpuid.c:177 kvm_vcpu_ioctl_set_cpuid2+0x160/0x440 arch/x86/kvm/cpuid.c:308 kvm_arch_vcpu_ioctl+0x11b6/0x2d70 arch/x86/kvm/x86.c:4709 kvm_vcpu_ioctl+0x7b9/0xdb0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3386 vfs_ioctl fs/ioctl.c:48 [inline] __do_sys_ioctl fs/ioctl.c:753 [inline] __se_sys_ioctl fs/ioctl.c:739 [inline] __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:739 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Reported-by: syzbot+ae488dc136a4cc6ba32b@syzkaller.appspotmail.com Signed-off-by: Like Xu Message-Id: <20210118025800.34620-1-like.xu@linux.intel.com> Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit eb79cd00ce25974c21f34f1eeb92a580ff572971 Author: Sean Christopherson Date: Wed Jan 13 12:45:15 2021 -0800 KVM: x86: Add more protection against undefined behavior in rsvd_bits() Add compile-time asserts in rsvd_bits() to guard against KVM passing in garbage hardcoded values, and cap the upper bound at '63' for dynamic values to prevent generating a mask that would overflow a u64. Suggested-by: Paolo Bonzini Signed-off-by: Sean Christopherson Message-Id: <20210113204515.3473079-1-seanjc@google.com> Signed-off-by: Paolo Bonzini commit a10f373ad3c760dd40b41e2f69a800ee7b8da15e Author: Quentin Perret Date: Fri Jan 8 16:53:49 2021 +0000 KVM: Documentation: Fix spec for KVM_CAP_ENABLE_CAP_VM The documentation classifies KVM_ENABLE_CAP with KVM_CAP_ENABLE_CAP_VM as a vcpu ioctl, which is incorrect. Fix it by specifying it as a VM ioctl. Fixes: e5d83c74a580 ("kvm: make KVM_CAP_ENABLE_CAP_VM architecture agnostic") Signed-off-by: Quentin Perret Message-Id: <20210108165349.747359-1-qperret@google.com> Signed-off-by: Paolo Bonzini commit 615099b01eb7127fb2f4bc956171a6a0accf688b Merge: 7c53f6b671f4a 139bc8a6146d9 Author: Paolo Bonzini Date: Mon Jan 25 18:52:01 2021 -0500 Merge tag 'kvmarm-fixes-5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 fixes for 5.11, take #2 - Don't allow tagged pointers to point to memslots - Filter out ARMv8.1+ PMU events on v8.0 hardware - Hide PMU registers from userspace when no PMU is configured - More PMU cleanups - Don't try to handle broken PSCI firmware - More sys_reg() to reg_to_encoding() conversions commit 13391c60da3308ed9980de0168f74cce6c62ac1d Merge: f8ad8187c3b53 4f6543f28bb05 Author: Linus Torvalds Date: Mon Jan 25 15:26:51 2021 -0800 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 regression in the cesa driver" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: marvel/cesa - Fix tdma descriptor on 64-bit commit 07d46d93c9acdfe0614071d73c415dd5f745cc6e Author: Justin Iurman Date: Thu Jan 21 23:00:44 2021 +0100 uapi: fix big endian definition of ipv6_rpl_sr_hdr Following RFC 6554 [1], the current order of fields is wrong for big endian definition. Indeed, here is how the header looks like: +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Next Header | Hdr Ext Len | Routing Type | Segments Left | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | CmprI | CmprE | Pad | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ This patch reorders fields so that big endian definition is now correct. [1] https://tools.ietf.org/html/rfc6554#section-3 Fixes: cfa933d938d8 ("include: uapi: linux: add rpl sr header definition") Signed-off-by: Justin Iurman Signed-off-by: Jakub Kicinski commit 453b674178327950e8517172c82107c43af222e4 Author: Grygorii Strashko Date: Fri Jan 15 21:31:24 2021 +0200 dt-bindings: usb: j721e: add ranges and dma-coherent props Add missed 'ranges' and 'dma-coherent' properties as cdns-usb DT nodes has child node and DMA IO is coherent on TI K3 J721E/J7200 SoCs. This also fixes dtbs_check warning: cdns-usb@4104000: 'dma-coherent', 'ranges' do not match any of the regexes: '^usb@', 'pinctrl-[0-9]+' Signed-off-by: Grygorii Strashko Acked-by: Aswath Govindraju Reviewed-by: Aswath Govindraju Link: https://lore.kernel.org/r/20210115193124.5706-1-grygorii.strashko@ti.com Signed-off-by: Rob Herring commit 74532de460ec664e5a725507d1b59aa9e4d40776 Author: Robin Murphy Date: Wed Jan 20 23:41:39 2021 +0000 arm64: dts: rockchip: Disable display for NanoPi R2S NanoPi R2S is headless, so rightly does not enable any of the display interface hardware, which currently provokes an obnoxious error in the boot log from the fake DRM device failing to find anything to bind to. It probably isn't *too* hard to obviate the fake device shenanigans entirely with a bit of driver reshuffling, but for now let's just disable it here to shut up the spurious error. Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/c4553dfad1ad6792c4f22454c135ff55de77e2d6.1611186099.git.robin.murphy@arm.com Signed-off-by: Heiko Stuebner commit 9b6164342e981d751e69f5a165dd596ffcdfd6fe Author: Masahiro Yamada Date: Sat Jan 23 22:33:33 2021 +0900 doc: gcc-plugins: update gcc-plugins.rst This document was written a long time ago. Update it. [1] Drop the version information The range of the supported GCC versions are always changing. The current minimal GCC version is 4.9, and commit 1e860048c53e ("gcc-plugins: simplify GCC plugin-dev capability test") removed the old code accordingly. We do not need to mention specific version ranges like "all gcc versions from 4.5 to 6.0" since we forget to update the documentation when we raise the minimal compiler version. [2] Drop the C compiler statements Since commit 77342a02ff6e ("gcc-plugins: drop support for GCC <= 4.7") the GCC plugin infrastructure only supports g++. [3] Drop supported architectures As of v5.11-rc4, the infrastructure supports more architectures; arm, arm64, mips, powerpc, riscv, s390, um, and x86. (just grep "select HAVE_GCC_PLUGINS") Again, we miss to update this document when a new architecture is supported. Let's just say "only some architectures". [4] Update the apt-get example We are now discussing to bump the minimal version to GCC 5. The GCC 4.9 support will be removed sooner or later. Change the package example to gcc-10-plugin-dev while we are here. [5] Update the build target Since commit ce2fd53a10c7 ("kbuild: descend into scripts/gcc-plugins/ via scripts/Makefile"), "make gcc-plugins" is not supported. "make scripts" builds all the enabled plugins, including some other tools. [6] Update the steps for adding a new plugin At first, all CONFIG options for GCC plugins were located in arch/Kconfig. After commit 45332b1bdfdc ("gcc-plugins: split out Kconfig entries to scripts/gcc-plugins/Kconfig"), scripts/gcc-plugins/Kconfig became the central place to collect plugin CONFIG options. In my understanding, this requirement no longer exists because commit 9f671e58159a ("security: Create "kernel hardening" config area") moved some of plugin CONFIG options to another file. Find an appropriate place to add the new CONFIG. The sub-directory support was never used by anyone, and removed by commit c17d6179ad5a ("gcc-plugins: remove unused GCC_PLUGIN_SUBDIR"). Remove the useless $(src)/ prefix. Signed-off-by: Masahiro Yamada commit 67fbe02a5cebc3c653610f12e3c0424e58450153 Author: Hans de Goede Date: Wed Jan 20 13:49:41 2021 +0100 platform/x86: hp-wmi: Disable tablet-mode reporting by default Recently userspace has started making more use of SW_TABLET_MODE (when an input-dev reports this). Specifically recent GNOME3 versions will: 1. When SW_TABLET_MODE is reported and is reporting 0: 1.1 Disable accelerometer-based screen auto-rotation 1.2 Disable automatically showing the on-screen keyboard when a text-input field is focussed 2. When SW_TABLET_MODE is reported and is reporting 1: 2.1 Ignore input-events from the builtin keyboard and touchpad (this is for 360° hinges style 2-in-1s where the keyboard and touchpads are accessible on the back of the tablet when folded into tablet-mode) This means that claiming to support SW_TABLET_MODE when it does not actually work / reports correct values has bad side-effects. The check in the hp-wmi code which is used to decide if the input-dev should claim SW_TABLET_MODE support, only checks if the HPWMI_HARDWARE_QUERY is supported. It does *not* check if the hardware actually is capable of reporting SW_TABLET_MODE. This leads to the hp-wmi input-dev claiming SW_TABLET_MODE support, while in reality it will always report 0 as SW_TABLET_MODE value. This has been seen on a "HP ENVY x360 Convertible 15-cp0xxx" and this likely is the case on a whole lot of other HP models. This problem causes both auto-rotation and on-screen keyboard support to not work on affected x360 models. There is no easy fix for this, but since userspace expects SW_TABLET_MODE reporting to be reliable when advertised it is better to not claim/report SW_TABLET_MODE support at all, then to claim to support it while it does not work. To avoid the mentioned problems, add a new enable_tablet_mode_sw module-parameter which defaults to false. Note I've made this an int using the standard -1=auto, 0=off, 1=on triplett, with the hope that in the future we can come up with a better way to detect SW_TABLET_MODE support. ATM the default auto option just does the same as off. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1918255 Cc: Stefan Brüns Signed-off-by: Hans de Goede Acked-by: Mark Gross Link: https://lore.kernel.org/r/20210120124941.73409-1-hdegoede@redhat.com commit e4a7d1f7707eb44fd953a31dd59eff82009d879c Author: Dave Wysochanski Date: Thu Jan 21 16:17:24 2021 -0500 SUNRPC: Handle 0 length opaque XDR object data properly When handling an auth_gss downcall, it's possible to get 0-length opaque object for the acceptor. In the case of a 0-length XDR object, make sure simple_get_netobj() fills in dest->data = NULL, and does not continue to kmemdup() which will set dest->data = ZERO_SIZE_PTR for the acceptor. The trace event code can handle NULL but not ZERO_SIZE_PTR for a string, and so without this patch the rpcgss_context trace event will crash the kernel as follows: [ 162.887992] BUG: kernel NULL pointer dereference, address: 0000000000000010 [ 162.898693] #PF: supervisor read access in kernel mode [ 162.900830] #PF: error_code(0x0000) - not-present page [ 162.902940] PGD 0 P4D 0 [ 162.904027] Oops: 0000 [#1] SMP PTI [ 162.905493] CPU: 4 PID: 4321 Comm: rpc.gssd Kdump: loaded Not tainted 5.10.0 #133 [ 162.908548] Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011 [ 162.910978] RIP: 0010:strlen+0x0/0x20 [ 162.912505] Code: 48 89 f9 74 09 48 83 c1 01 80 39 00 75 f7 31 d2 44 0f b6 04 16 44 88 04 11 48 83 c2 01 45 84 c0 75 ee c3 0f 1f 80 00 00 00 00 <80> 3f 00 74 10 48 89 f8 48 83 c0 01 80 38 00 75 f7 48 29 f8 c3 31 [ 162.920101] RSP: 0018:ffffaec900c77d90 EFLAGS: 00010202 [ 162.922263] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00000000fffde697 [ 162.925158] RDX: 000000000000002f RSI: 0000000000000080 RDI: 0000000000000010 [ 162.928073] RBP: 0000000000000010 R08: 0000000000000e10 R09: 0000000000000000 [ 162.930976] R10: ffff8e698a590cb8 R11: 0000000000000001 R12: 0000000000000e10 [ 162.933883] R13: 00000000fffde697 R14: 000000010034d517 R15: 0000000000070028 [ 162.936777] FS: 00007f1e1eb93700(0000) GS:ffff8e6ab7d00000(0000) knlGS:0000000000000000 [ 162.940067] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 162.942417] CR2: 0000000000000010 CR3: 0000000104eba000 CR4: 00000000000406e0 [ 162.945300] Call Trace: [ 162.946428] trace_event_raw_event_rpcgss_context+0x84/0x140 [auth_rpcgss] [ 162.949308] ? __kmalloc_track_caller+0x35/0x5a0 [ 162.951224] ? gss_pipe_downcall+0x3a3/0x6a0 [auth_rpcgss] [ 162.953484] gss_pipe_downcall+0x585/0x6a0 [auth_rpcgss] [ 162.955953] rpc_pipe_write+0x58/0x70 [sunrpc] [ 162.957849] vfs_write+0xcb/0x2c0 [ 162.959264] ksys_write+0x68/0xe0 [ 162.960706] do_syscall_64+0x33/0x40 [ 162.962238] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 162.964346] RIP: 0033:0x7f1e1f1e57df Signed-off-by: Dave Wysochanski Signed-off-by: Trond Myklebust commit ba6dfce47c4d002d96cd02a304132fca76981172 Author: Dave Wysochanski Date: Thu Jan 21 16:17:23 2021 -0500 SUNRPC: Move simple_get_bytes and simple_get_netobj into private header Remove duplicated helper functions to parse opaque XDR objects and place inside new file net/sunrpc/auth_gss/auth_gss_internal.h. In the new file carry the license and copyright from the source file net/sunrpc/auth_gss/auth_gss.c. Finally, update the comment inside include/linux/sunrpc/xdr.h since lockd is not the only user of struct xdr_netobj. Signed-off-by: Dave Wysochanski Signed-off-by: Trond Myklebust commit f8ad8187c3b536ee2b10502a8340c014204a1af0 Author: Johannes Berg Date: Mon Jan 25 10:16:15 2021 +0100 fs/pipe: allow sendfile() to pipe again After commit 36e2c7421f02 ("fs: don't allow splice read/write without explicit ops") sendfile() could no longer send data from a real file to a pipe, breaking for example certain cgit setups (e.g. when running behind fcgiwrap), because in this case cgit will try to do exactly this: sendfile() to a pipe. Fix this by using iter_file_splice_write for the splice_write method of pipes, as suggested by Christoph. Cc: stable@vger.kernel.org Fixes: 36e2c7421f02 ("fs: don't allow splice read/write without explicit ops") Suggested-by: Christoph Hellwig Reviewed-by: Christoph Hellwig Tested-by: Johannes Berg Signed-off-by: Johannes Berg Signed-off-by: Linus Torvalds commit 9f12e37cae44a96132fc3031535a0b165486941a Author: Sami Tolvanen Date: Mon Jan 25 11:09:25 2021 -0800 Commit 9bb48c82aced ("tty: implement write_iter") converted the tty layer to use write_iter. Fix the redirected_tty_write declaration also in n_tty and change the comparisons to use write_iter instead of write. [ Also moved the declaration of redirected_tty_write() to the proper location in a header file. The reason for the bug was the bogus extern declaration in n_tty.c silently not matching the changed definition in tty_io.c, and because it wasn't in a shared header file, there was no cross-checking of the declaration. Sami noticed because Clang's Control Flow Integrity checking ended up incidentally noticing the inconsistent declaration. - Linus ] Fixes: 9bb48c82aced ("tty: implement write_iter") Signed-off-by: Sami Tolvanen Signed-off-by: Linus Torvalds commit 3490e333bda0709a5a2c9b7ab9b0209bb16619d8 Author: Mauro Carvalho Chehab Date: Wed Jan 13 11:59:24 2021 +0100 dt-bindings:iio:adc: update adc.yaml reference Changeset b70d154d6558 ("dt-bindings:iio:adc: convert adc.txt to yaml") renamed: Documentation/devicetree/bindings/iio/adc/adc.txt to: Documentation/devicetree/bindings/iio/adc/adc.yaml. Update its cross-reference accordingly. Signed-off-by: Mauro Carvalho Chehab Acked-by: Jonathan Cameron Link: https://lore.kernel.org/r/8e37dba8ae9099acd649bab8a1cf718caa4f3e6a.1610535350.git.mchehab+huawei@kernel.org Signed-off-by: Rob Herring commit c5dde04b9059c91515d609a41e9c1a148ee4d850 Author: Mauro Carvalho Chehab Date: Wed Jan 13 11:59:23 2021 +0100 dt-bindings: memory: mediatek: update mediatek,smi-larb.yaml references Changeset 27bb0e42855a ("dt-bindings: memory: mediatek: Convert SMI to DT schema") renamed: Documentation/devicetree/bindings/memory-controllers/mediatek,smi-larb.txt to: Documentation/devicetree/bindings/memory-controllers/mediatek,smi-larb.yaml. Update its cross-references accordingly. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/c70bd79b311a65babe7374eaf81974563400a943.1610535350.git.mchehab+huawei@kernel.org Signed-off-by: Rob Herring commit 601bd38ccd25e831865dd8442e3491fc8ce9604d Author: Mauro Carvalho Chehab Date: Wed Jan 13 11:59:22 2021 +0100 dt-bindings: display: mediatek: update mediatek,dpi.yaml reference Changeset 9273cf7d3942 ("dt-bindings: display: mediatek: convert the dpi bindings to yaml") renamed: Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.txt to: Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml. Update its cross-reference accordingly. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/3bf906f39b797d18800abd387187cce71296e5eb.1610535350.git.mchehab+huawei@kernel.org Signed-off-by: Rob Herring commit 0bc92e7f0d9ab06afacff7e5b0e08b5ce8f3f32f Author: Mauro Carvalho Chehab Date: Wed Jan 13 11:59:21 2021 +0100 ASoC: audio-graph-card: update audio-graph-card.yaml reference Changeset 97198614f6c3 ("ASoC: audio-graph-card: switch to yaml base Documentation") renamed: Documentation/devicetree/bindings/sound/audio-graph-card.txt to: Documentation/devicetree/bindings/sound/audio-graph-card.yaml. Update its cross-reference accordingly. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/8a779e6b9644d19c5d77b382059f6ccf9781434d.1610535350.git.mchehab+huawei@kernel.org Signed-off-by: Rob Herring commit 007ad27d7bafc6df36e1d6ad4a13f6d602376193 Merge: 6ee1d745b7c9f 61bb17da44a0b Author: Linus Torvalds Date: Mon Jan 25 10:19:40 2021 -0800 Merge tag 'printk-for-5.11-urgent-fixup' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux Pull printk fix from Petr Mladek: "The fix of a potential buffer overflow in 5.11-rc5 introduced another one. The trailing '\0' might be written up to the message "len" past the buffer. Fortunately, it is not that easy to hit. Most readers use 1kB buffers for a single message. Typical messages fit into the temporary buffer with enough reserve. Also readers do not rely on the '\0'. It is related to the previous fix. Some readers required the space for the trailing '\0'. We decided to write it there to avoid such regressions in the future. The most realistic victims are dumpers using kmsg_dump_get_buffer(). They are filling the entire buffer with as many messages as possible. They are typically used when handling panic()" * tag 'printk-for-5.11-urgent-fixup' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux: printk: fix string termination for record_print_text() commit b98e762e3d71e893b221f871825dc64694cfb258 Author: Josef Bacik Date: Mon Jan 25 12:21:02 2021 -0500 nbd: freeze the queue while we're adding connections When setting up a device, we can krealloc the config->socks array to add new sockets to the configuration. However if we happen to get a IO request in at this point even though we aren't setup we could hit a UAF, as we deref config->socks without any locking, assuming that the configuration was setup already and that ->socks is safe to access it as we have a reference on the configuration. But there's nothing really preventing IO from occurring at this point of the device setup, we don't want to incur the overhead of a lock to access ->socks when it will never change while the device is running. To fix this UAF scenario simply freeze the queue if we are adding sockets. This will protect us from this particular case without adding any additional overhead for the normal running case. Cc: stable@vger.kernel.org Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe commit fef9c8d28e28a808274a18fbd8cc2685817fd62a Author: Laurent Badel Date: Fri Jan 22 17:19:41 2021 +0100 PM: hibernate: flush swap writer after marking Flush the swap writer after, not before, marking the files, to ensure the signature is properly written. Fixes: 6f612af57821 ("PM / Hibernate: Group swap ops") Signed-off-by: Laurent Badel Cc: All applicable Signed-off-by: Rafael J. Wysocki commit 9ad6d91f056b99dbe59a262810cb342519ea8d39 Author: Filipe Manana Date: Fri Jan 22 19:07:45 2021 +0000 btrfs: fix log replay failure due to race with space cache rebuild After a sudden power failure we may end up with a space cache on disk that is not valid and needs to be rebuilt from scratch. If that happens, during log replay when we attempt to pin an extent buffer from a log tree, at btrfs_pin_extent_for_log_replay(), we do not wait for the space cache to be rebuilt through the call to: btrfs_cache_block_group(cache, 1); That is because that only waits for the task (work queue job) that loads the space cache to change the cache state from BTRFS_CACHE_FAST to any other value. That is ok when the space cache on disk exists and is valid, but when the cache is not valid and needs to be rebuilt, it ends up returning as soon as the cache state changes to BTRFS_CACHE_STARTED (done at caching_thread()). So this means that we can end up trying to unpin a range which is not yet marked as free in the block group. This results in the call to btrfs_remove_free_space() to return -EINVAL to btrfs_pin_extent_for_log_replay(), which in turn makes the log replay fail as well as mounting the filesystem. More specifically the -EINVAL comes from free_space_cache.c:remove_from_bitmap(), because the requested range is not marked as free space (ones in the bitmap), we have the following condition triggered: static noinline int remove_from_bitmap(struct btrfs_free_space_ctl *ctl, (...) if (ret < 0 || search_start != *offset) return -EINVAL; (...) It's the "search_start != *offset" that results in the condition being evaluated to true. When this happens we got the following in dmesg/syslog: [72383.415114] BTRFS: device fsid 32b95b69-0ea9-496a-9f02-3f5a56dc9322 devid 1 transid 1432 /dev/sdb scanned by mount (3816007) [72383.417837] BTRFS info (device sdb): disk space caching is enabled [72383.418536] BTRFS info (device sdb): has skinny extents [72383.423846] BTRFS info (device sdb): start tree-log replay [72383.426416] BTRFS warning (device sdb): block group 30408704 has wrong amount of free space [72383.427686] BTRFS warning (device sdb): failed to load free space cache for block group 30408704, rebuilding it now [72383.454291] BTRFS: error (device sdb) in btrfs_recover_log_trees:6203: errno=-22 unknown (Failed to pin buffers while recovering log root tree.) [72383.456725] BTRFS: error (device sdb) in btrfs_replay_log:2253: errno=-22 unknown (Failed to recover log tree) [72383.460241] BTRFS error (device sdb): open_ctree failed We also mark the range for the extent buffer in the excluded extents io tree. That is fine when the space cache is valid on disk and we can load it, in which case it causes no problems. However, for the case where we need to rebuild the space cache, because it is either invalid or it is missing, having the extent buffer range marked in the excluded extents io tree leads to a -EINVAL failure from the call to btrfs_remove_free_space(), resulting in the log replay and mount to fail. This is because by having the range marked in the excluded extents io tree, the caching thread ends up never adding the range of the extent buffer as free space in the block group since the calls to add_new_free_space(), called from load_extent_tree_free(), filter out any ranges that are marked as excluded extents. So fix this by making sure that during log replay we wait for the caching task to finish completely when we need to rebuild a space cache, and also drop the need to mark the extent buffer range in the excluded extents io tree, as well as clearing ranges from that tree at btrfs_finish_extent_commit(). This started to happen with some frequency on large filesystems having block groups with a lot of fragmentation since the recent commit e747853cae3ae3 ("btrfs: load free space cache asynchronously"), but in fact the issue has been there for years, it was just much less likely to happen. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit c41ec4529d3448df8998950d7bada757a1b321cf Author: Su Yue Date: Thu Jan 21 19:39:10 2021 +0800 btrfs: fix lockdep warning due to seqcount_mutex on 32bit arch This effectively reverts commit d5c8238849e7 ("btrfs: convert data_seqcount to seqcount_mutex_t"). While running fstests on 32 bits test box, many tests failed because of warnings in dmesg. One of those warnings (btrfs/003): [66.441317] WARNING: CPU: 6 PID: 9251 at include/linux/seqlock.h:279 btrfs_remove_chunk+0x58b/0x7b0 [btrfs] [66.441446] CPU: 6 PID: 9251 Comm: btrfs Tainted: G O 5.11.0-rc4-custom+ #5 [66.441449] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS ArchLinux 1.14.0-1 04/01/2014 [66.441451] EIP: btrfs_remove_chunk+0x58b/0x7b0 [btrfs] [66.441472] EAX: 00000000 EBX: 00000001 ECX: c576070c EDX: c6b15803 [66.441475] ESI: 10000000 EDI: 00000000 EBP: c56fbcfc ESP: c56fbc70 [66.441477] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 EFLAGS: 00010246 [66.441481] CR0: 80050033 CR2: 05c8da20 CR3: 04b20000 CR4: 00350ed0 [66.441485] Call Trace: [66.441510] btrfs_relocate_chunk+0xb1/0x100 [btrfs] [66.441529] ? btrfs_lookup_block_group+0x17/0x20 [btrfs] [66.441562] btrfs_balance+0x8ed/0x13b0 [btrfs] [66.441586] ? btrfs_ioctl_balance+0x333/0x3c0 [btrfs] [66.441619] ? __this_cpu_preempt_check+0xf/0x11 [66.441643] btrfs_ioctl_balance+0x333/0x3c0 [btrfs] [66.441664] ? btrfs_ioctl_get_supported_features+0x30/0x30 [btrfs] [66.441683] btrfs_ioctl+0x414/0x2ae0 [btrfs] [66.441700] ? __lock_acquire+0x35f/0x2650 [66.441717] ? lockdep_hardirqs_on+0x87/0x120 [66.441720] ? lockdep_hardirqs_on_prepare+0xd0/0x1e0 [66.441724] ? call_rcu+0x2d3/0x530 [66.441731] ? __might_fault+0x41/0x90 [66.441736] ? kvm_sched_clock_read+0x15/0x50 [66.441740] ? sched_clock+0x8/0x10 [66.441745] ? sched_clock_cpu+0x13/0x180 [66.441750] ? btrfs_ioctl_get_supported_features+0x30/0x30 [btrfs] [66.441750] ? btrfs_ioctl_get_supported_features+0x30/0x30 [btrfs] [66.441768] __ia32_sys_ioctl+0x165/0x8a0 [66.441773] ? __this_cpu_preempt_check+0xf/0x11 [66.441785] ? __might_fault+0x89/0x90 [66.441791] __do_fast_syscall_32+0x54/0x80 [66.441796] do_fast_syscall_32+0x32/0x70 [66.441801] do_SYSENTER_32+0x15/0x20 [66.441805] entry_SYSENTER_32+0x9f/0xf2 [66.441808] EIP: 0xab7b5549 [66.441814] EAX: ffffffda EBX: 00000003 ECX: c4009420 EDX: bfa91f5c [66.441816] ESI: 00000003 EDI: 00000001 EBP: 00000000 ESP: bfa91e98 [66.441818] DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 007b EFLAGS: 00000292 [66.441833] irq event stamp: 42579 [66.441835] hardirqs last enabled at (42585): [] console_unlock+0x495/0x590 [66.441838] hardirqs last disabled at (42590): [] console_unlock+0x405/0x590 [66.441840] softirqs last enabled at (41698): [] call_on_stack+0x1c/0x60 [66.441843] softirqs last disabled at (41681): [] call_on_stack+0x1c/0x60 ======================================================================== btrfs_remove_chunk+0x58b/0x7b0: __seqprop_mutex_assert at linux/./include/linux/seqlock.h:279 (inlined by) btrfs_device_set_bytes_used at linux/fs/btrfs/volumes.h:212 (inlined by) btrfs_remove_chunk at linux/fs/btrfs/volumes.c:2994 ======================================================================== The warning is produced by lockdep_assert_held() in __seqprop_mutex_assert() if CONFIG_LOCKDEP is enabled. And "olumes.c:2994 is btrfs_device_set_bytes_used() with mutex lock fs_info->chunk_mutex held already. After adding some debug prints, the cause was found that many __alloc_device() are called with NULL @fs_info (during scanning ioctl). Inside the function, btrfs_device_data_ordered_init() is expanded to seqcount_mutex_init(). In this scenario, its second parameter info->chunk_mutex is &NULL->chunk_mutex which equals to offsetof(struct btrfs_fs_info, chunk_mutex) unexpectedly. Thus, seqcount_mutex_init() is called in wrong way. And later btrfs_device_get/set helpers trigger lockdep warnings. The device and filesystem object lifetimes are different and we'd have to synchronize initialization of the btrfs_device::data_seqcount with the fs_info, possibly using some additional synchronization. It would still not prevent concurrent access to the seqcount lock when it's used for read and initialization. Commit d5c8238849e7 ("btrfs: convert data_seqcount to seqcount_mutex_t") does not mention a particular problem being fixed so revert should not cause any harm and we'll get the lockdep warning fixed. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=210139 Reported-by: Erhard F Fixes: d5c8238849e7 ("btrfs: convert data_seqcount to seqcount_mutex_t") CC: stable@vger.kernel.org # 5.10 CC: Davidlohr Bueso Signed-off-by: Su Yue Reviewed-by: David Sterba Signed-off-by: David Sterba commit 2f96e40212d435b328459ba6b3956395eed8fa9f Author: Josef Bacik Date: Fri Jan 15 16:26:17 2021 -0500 btrfs: fix possible free space tree corruption with online conversion While running btrfs/011 in a loop I would often ASSERT() while trying to add a new free space entry that already existed, or get an EEXIST while adding a new block to the extent tree, which is another indication of double allocation. This occurs because when we do the free space tree population, we create the new root and then populate the tree and commit the transaction. The problem is when you create a new root, the root node and commit root node are the same. During this initial transaction commit we will run all of the delayed refs that were paused during the free space tree generation, and thus begin to cache block groups. While caching block groups the caching thread will be reading from the main root for the free space tree, so as we make allocations we'll be changing the free space tree, which can cause us to add the same range twice which results in either the ASSERT(ret != -EEXIST); in __btrfs_add_free_space, or in a variety of different errors when running delayed refs because of a double allocation. Fix this by marking the fs_info as unsafe to load the free space tree, and fall back on the old slow method. We could be smarter than this, for example caching the block group while we're populating the free space tree, but since this is a serious problem I've opted for the simplest solution. CC: stable@vger.kernel.org # 4.9+ Fixes: a5ed91828518 ("Btrfs: implement the free space B-tree") Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 56c91a18432b631ca18438841fd1831ef756cabf Author: Baoquan He Date: Fri Jan 22 15:42:14 2021 +0800 kernel: kexec: remove the lock operation of system_transition_mutex Function kernel_kexec() is called with lock system_transition_mutex held in reboot system call. While inside kernel_kexec(), it will acquire system_transition_mutex agin. This will lead to dead lock. The dead lock should be easily triggered, it hasn't caused any failure report just because the feature 'kexec jump' is almost not used by anyone as far as I know. An inquiry can be made about who is using 'kexec jump' and where it's used. Before that, let's simply remove the lock operation inside CONFIG_KEXEC_JUMP ifdeffery scope. Fixes: 55f2503c3b69 ("PM / reboot: Eliminate race between reboot and suspend") Signed-off-by: Baoquan He Reported-by: Dan Carpenter Reviewed-by: Pingfan Liu Cc: 4.19+ # 4.19+ Signed-off-by: Rafael J. Wysocki commit ac55ad2b5fadb6af8826963d7d3331c9950a2608 Author: Jan Höppner Date: Mon Jan 18 17:55:18 2021 +0100 s390/dasd: Fix inconsistent kobject removal Our intention was to only remove path kobjects whenever a device is being set offline. However, one corner case was missing. If a device is disabled and enabled (using the IOCTLs BIODASDDISABLE and BIODASDENABLE respectively), the enabling process will call dasd_eckd_reload_device() which itself calls dasd_eckd_read_conf() in order to update path information. During that update, dasd_eckd_clear_conf_data() clears all old data and also removes all kobjects. This will leave us with an inconsistent state of path kobjects and a subsequent path verification leads to a failing kobject creation. Fix this by removing kobjects only in the context of offlining a device as initially intended. Fixes: 19508b204740 ("s390/dasd: Display FC Endpoint Security information via sysfs") Reported-by: Stefan Haberland Signed-off-by: Jan Höppner Reviewed-by: Stefan Haberland Reviewed-by: Cornelia Huck Signed-off-by: Jens Axboe commit 81b704d3e4674e09781d331df73d76675d5ad8cb Author: Rafael J. Wysocki Date: Thu Jan 14 19:34:22 2021 +0100 ACPI: thermal: Do not call acpi_thermal_check() directly Calling acpi_thermal_check() from acpi_thermal_notify() directly is problematic if _TMP triggers Notify () on the thermal zone for which it has been evaluated (which happens on some systems), because it causes a new acpi_thermal_notify() invocation to be queued up every time and if that takes place too often, an indefinite number of pending work items may accumulate in kacpi_notify_wq over time. Besides, it is not really useful to queue up a new invocation of acpi_thermal_check() if one of them is pending already. For these reasons, rework acpi_thermal_notify() to queue up a thermal check instead of calling acpi_thermal_check() directly and only allow one thermal check to be pending at a time. Moreover, only allow one acpi_thermal_check_fn() instance at a time to run thermal_zone_device_update() for one thermal zone and make it return early if it sees other instances running for the same thermal zone. While at it, fold acpi_thermal_check() into acpi_thermal_check_fn(), as it is only called from there after the other changes made here. [This issue appears to have been exposed by commit 6d25be5782e4 ("sched/core, workqueues: Distangle worker accounting from rq lock"), but it is unclear why it was not visible earlier.] BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=208877 Reported-by: Stephen Berman Diagnosed-by: Sebastian Andrzej Siewior Signed-off-by: Rafael J. Wysocki Reviewed-by: Sebastian Andrzej Siewior Tested-by: Stephen Berman Cc: All applicable commit 36af2d5c4433fb40ee2af912c4ac0a30991aecfc Author: Kai-Heng Feng Date: Fri Jan 22 20:53:02 2021 +0800 ACPI: sysfs: Prefer "compatible" modalias Commit 8765c5ba1949 ("ACPI / scan: Rework modalias creation when "compatible" is present") may create two "MODALIAS=" in one uevent file if specific conditions are met. This breaks systemd-udevd, which assumes each "key" in one uevent file to be unique. The internal implementation of systemd-udevd overwrites the first MODALIAS with the second one, so its kmod rule doesn't load the driver for the first MODALIAS. So if both the ACPI modalias and the OF modalias are present, use the latter to ensure that there will be only one MODALIAS. Link: https://github.com/systemd/systemd/pull/18163 Suggested-by: Mika Westerberg Fixes: 8765c5ba1949 ("ACPI / scan: Rework modalias creation when "compatible" is present") Signed-off-by: Kai-Heng Feng Reviewed-by: Mika Westerberg Reviewed-by: Greg Kroah-Hartman Cc: 4.1+ # 4.1+ [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit e500b805c39daff2670494fff94909d7e3d094d9 Author: Andrew Scull Date: Mon Jan 25 14:54:15 2021 +0000 KVM: arm64: Don't clobber x4 in __do_hyp_init arm_smccc_1_1_hvc() only adds write contraints for x0-3 in the inline assembly for the HVC instruction so make sure those are the only registers that change when __do_hyp_init is called. Tested-by: David Brazdil Signed-off-by: Andrew Scull Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210125145415.122439-3-ascull@google.com commit 5413dfd8ce0d5d997d442440701814a8ce7025d9 Merge: 9ad9bc59dde10 8a3fea95fab14 Author: Mark Brown Date: Mon Jan 25 14:15:12 2021 +0000 Merge series "ASoC: SOF: partial fix to Kconfig issues" from Pierre-Louis Bossart : We've had several reports of broken dependencies. The 'right' fix is to revisit the module dependencies as suggested by Arnd Bergmann. This is WIP at https://github.com/thesofproject/linux/pull/2683. Since this is taking longer than expected, I am only sharing quick fixes for now. Pierre-Louis Bossart (2): ASoC: SOF: Intel: soundwire: fix select/depend unmet dependencies ASoC: SOF: SND_INTEL_DSP_CONFIG dependency sound/soc/sof/intel/Kconfig | 3 ++- sound/soc/sof/sof-acpi-dev.c | 11 ++++++----- sound/soc/sof/sof-pci-dev.c | 10 ++++++---- 3 files changed, 14 insertions(+), 10 deletions(-) -- 2.25.1 commit 0acb20a5438c36e0cf2b8bf255f314b59fcca6ef Author: Lorenzo Bianconi Date: Sun Jan 17 22:46:01 2021 +0100 mt7601u: fix kernel crash unplugging the device The following crash log can occur unplugging the usb dongle since, after the urb poison in mt7601u_free_tx_queue(), usb_submit_urb() will always fail resulting in a skb kfree while the skb has been already queued. Fix the issue enqueuing the skb only if usb_submit_urb() succeed. Hardware name: Hewlett-Packard 500-539ng/2B2C, BIOS 80.06 04/01/2015 Workqueue: usb_hub_wq hub_event RIP: 0010:skb_trim+0x2c/0x30 RSP: 0000:ffffb4c88005bba8 EFLAGS: 00010206 RAX: 000000004ad483ee RBX: ffff9a236625dee0 RCX: 000000000000662f RDX: 000000000000000c RSI: 0000000000000000 RDI: ffff9a2343179300 RBP: ffff9a2343179300 R08: 0000000000000001 R09: 0000000000000000 R10: ffff9a23748f7840 R11: 0000000000000001 R12: ffff9a236625e4d4 R13: ffff9a236625dee0 R14: 0000000000001080 R15: 0000000000000008 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fd410a34ef8 CR3: 00000001416ee001 CR4: 00000000001706f0 Call Trace: mt7601u_tx_status+0x3e/0xa0 [mt7601u] mt7601u_dma_cleanup+0xca/0x110 [mt7601u] mt7601u_cleanup+0x22/0x30 [mt7601u] mt7601u_disconnect+0x22/0x60 [mt7601u] usb_unbind_interface+0x8a/0x270 ? kernfs_find_ns+0x35/0xd0 __device_release_driver+0x17a/0x230 device_release_driver+0x24/0x30 bus_remove_device+0xdb/0x140 device_del+0x18b/0x430 ? kobject_put+0x98/0x1d0 usb_disable_device+0xc6/0x1f0 usb_disconnect.cold+0x7e/0x20a hub_event+0xbf3/0x1870 process_one_work+0x1b6/0x350 worker_thread+0x53/0x3e0 ? process_one_work+0x350/0x350 kthread+0x11b/0x140 ? __kthread_bind_mask+0x60/0x60 ret_from_fork+0x22/0x30 Fixes: 23377c200b2eb ("mt7601u: fix possible memory leak when the device is disconnected") Signed-off-by: Lorenzo Bianconi Acked-by: Jakub Kicinski Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/3b85219f669a63a8ced1f43686de05915a580489.1610919247.git.lorenzo@kernel.org commit 0bed6a2a14afaae240cc431e49c260568488b51c Author: Johannes Berg Date: Fri Jan 22 14:52:42 2021 +0200 iwlwifi: queue: bail out on invalid freeing If we find an entry without an SKB, we currently continue, but that will just result in an infinite loop since we won't increment the read pointer, and will try the same thing over and over again. Fix this. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20210122144849.abe2dedcc3ac.Ia6b03f9eeb617fd819e56dd5376f4bb8edc7b98a@changeid commit 7a21b1d4a728a483f07c638ccd8610d4b4f12684 Author: Johannes Berg Date: Fri Jan 22 14:52:41 2021 +0200 iwlwifi: mvm: guard against device removal in reprobe If we get into a problem severe enough to attempt a reprobe, we schedule a worker to do that. However, if the problem gets more severe and the device is actually destroyed before this worker has a chance to run, we use a free device. Bump up the reference count of the device until the worker runs to avoid this situation. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20210122144849.871f0892e4b2.I94819e11afd68d875f3e242b98bef724b8236f1e@changeid commit 4886460c4d1576e85b12601b8b328278a483df86 Author: Matti Gottlieb Date: Fri Jan 22 14:52:40 2021 +0200 iwlwifi: Fix IWL_SUBDEVICE_NO_160 macro to use the correct bit. The bit that indicates if the device supports 160MHZ is bit #9. The macro checks bit #8. Fix IWL_SUBDEVICE_NO_160 macro to use the correct bit. Signed-off-by: Matti Gottlieb Fixes: d6f2134a3831 ("iwlwifi: add mac/rf types and 160MHz to the device tables") Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20210122144849.bddbf9b57a75.I16e09e2b1404b16bfff70852a5a654aa468579e2@changeid commit 96d2bfb7948a96709ba57084d64ac56c1730557c Author: Shaul Triebitz Date: Fri Jan 22 14:52:39 2021 +0200 iwlwifi: mvm: clear IN_D3 after wowlan status cmd In D3 resume flow, avoid the following race where sending packets before updating the sequence number (sequence number received from the wowlan status command response): Thread 1: __iwl_mvm_resume clears IWL_MVM_STATUS_IN_D3 and is cut by thread 2 before reaching iwl_mvm_query_wakeup_reasons. Thread 2: iwl_mvm_mac_itxq_xmit calls iwl_mvm_tx_skb since IWL_MVM_STATUS_IN_D3 is not set using a wrong sequence number. Thread 1: __iwl_mvm_resume continues and calls iwl_mvm_query_wakeup_reasons updating the sequence number received from the firmware. The next packet that will be sent now will cause sysassert 0x1096. Fix the bug by moving 'clear IWL_MVM_STATUS_IN_D3' to after sending the wowlan status command and updating the sequence number. Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20210122144849.fe927ec939c6.I103d3321fb55da7e6c6c51582cfadf94eb8b6c58@changeid commit 16062c12edb8ed2dfb15e6a914ff4edf858ab9e0 Author: Luca Coelho Date: Fri Jan 22 14:52:38 2021 +0200 iwlwifi: pcie: add rules to match Qu with Hr2 Until now we have been relying on matching the PCI ID and subsystem device ID in order to recognize Qu devices with Hr2. Add rules to match these devices, so that we don't have to add a new rule for every new ID we get. Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20210122144849.591ce253ddd8.Ia4b9cc2c535625890c6d6b560db97ee9f2d5ca3b@changeid commit e223e42aac30bf81f9302c676cdf58cf2bf36950 Author: Gregory Greenman Date: Fri Jan 22 14:52:37 2021 +0200 iwlwifi: mvm: invalidate IDs of internal stations at mvm start Having sta_id not set for aux_sta and snif_sta can potentially lead to a hard to debug issue in case remove station is called without an add. In this case sta_id 0, an unrelated regular station, will be removed. In fact, we do have a FW assert that occures rarely and from the debug data analysis it looks like sta_id 0 is removed by mistake, though it's hard to pinpoint the exact flow. The WARN_ON in this patch should help to find it. Signed-off-by: Gregory Greenman Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20210122144849.5dc6dd9b22d5.I2add1b5ad24d0d0a221de79d439c09f88fcaf15d@changeid commit aefbe5c445c7e2f0e082b086ba1e45502dac4b0e Author: Matt Chen Date: Fri Jan 22 14:52:36 2021 +0200 iwlwifi: mvm: fix the return type for DSM functions 1 and 2 The return type value of functions 1 and 2 were considered to be an integer inside a buffer, but they can also be only an integer, without the buffer. Fix the code in iwl_acpi_get_dsm_u8() to handle it as a single integer value, as well as packed inside a buffer. Signed-off-by: Matt Chen Fixes: 9db93491f29e ("iwlwifi: acpi: support device specific method (DSM)") Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20210122144849.5757092adcd6.Ic24524627b899c9a01af38107a62a626bdf5ae3a@changeid commit 3c4f6ecd93442f4376a58b38bb40ee0b8c46e0e6 Author: Pho Tran Date: Mon Jan 25 09:26:54 2021 +0000 USB: serial: cp210x: add pid/vid for WSDA-200-USB Information pid/vid of WSDA-200-USB, Lord corporation company: vid: 199b pid: ba30 Signed-off-by: Pho Tran [ johan: amend comment with product name ] Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit 3d372c4edfd4dffb7dea71c6b096fb414782b776 Author: Johannes Berg Date: Fri Jan 15 13:05:58 2021 +0200 iwlwifi: pcie: reschedule in long-running memory reads If we spin for a long time in memory reads that (for some reason in hardware) take a long time, then we'll eventually get messages such as watchdog: BUG: soft lockup - CPU#2 stuck for 24s! [kworker/2:2:272] This is because the reading really does take a very long time, and we don't schedule, so we're hogging the CPU with this task, at least if CONFIG_PREEMPT is not set, e.g. with CONFIG_PREEMPT_VOLUNTARY=y. Previously I misinterpreted the situation and thought that this was only going to happen if we had interrupts disabled, and then fixed this (which is good anyway, however), but that didn't always help; looking at it again now I realized that the spin unlock will only reschedule if CONFIG_PREEMPT is used. In order to avoid this issue, change the code to cond_resched() if we've been spinning for too long here. Signed-off-by: Johannes Berg Fixes: 04516706bb99 ("iwlwifi: pcie: limit memory read spin time") Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20210115130253.217a9d6a6a12.If964cb582ab0aaa94e81c4ff3b279eaafda0fd3f@changeid commit 6701317476bbfb1f341aa935ddf75eb73af784f9 Author: Johannes Berg Date: Fri Jan 15 13:05:57 2021 +0200 iwlwifi: pcie: use jiffies for memory read spin time limit There's no reason to use ktime_get() since we don't need any better precision than jiffies, and since we no longer disable interrupts around this code (when grabbing NIC access), jiffies will work fine. Use jiffies instead of ktime_get(). This cleanup is preparation for the following patch "iwlwifi: pcie: reschedule in long-running memory reads". The code gets simpler with the weird clock use etc. removed before we add cond_resched(). Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20210115130253.621c948b1fad.I3ee9f4bc4e74a0c9125d42fb7c35cd80df4698a1@changeid commit 2d6bc752cc2806366d9a4fd577b3f6c1f7a7e04e Author: Johannes Berg Date: Fri Jan 15 13:05:56 2021 +0200 iwlwifi: pcie: fix context info memory leak If the image loader allocation fails, we leak all the previously allocated memory. Fix this. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20210115130252.97172cbaa67c.I3473233d0ad01a71aa9400832fb2b9f494d88a11@changeid commit 98c7d21f957b10d9c07a3a60a3a5a8f326a197e5 Author: Emmanuel Grumbach Date: Fri Jan 15 13:05:55 2021 +0200 iwlwifi: pcie: add a NULL check in iwl_pcie_txq_unmap I hit a NULL pointer exception in this function when the init flow went really bad. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20210115130252.2e8da9f2c132.I0234d4b8ddaf70aaa5028a20c863255e05bc1f84@changeid commit ed0022da8bd9a3ba1c0e1497457be28d52afa7e1 Author: Johannes Berg Date: Fri Jan 15 13:05:54 2021 +0200 iwlwifi: pcie: set LTR on more devices To avoid completion timeouts during device boot, set up the LTR timeouts on more devices - similar to what we had before for AX210. This also corrects the AX210 workaround to be done only on discrete (non-integrated) devices, otherwise the registers have no effect. Signed-off-by: Johannes Berg Fixes: edb625208d84 ("iwlwifi: pcie: set LTR to avoid completion timeout") Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20210115130252.fb819e19530b.I0396f82922db66426f52fbb70d32a29c8fd66951@changeid commit 0f8d5656b3fd100c132b02aa72038f032fc6e30e Author: Emmanuel Grumbach Date: Fri Jan 15 13:05:53 2021 +0200 iwlwifi: queue: don't crash if txq->entries is NULL The code was really awkward, we would first dereference txq->entries when calling iwl_txq_genX_tfd_unmap and then we would check that txq->entries is non-NULL. Fix that by exiting if txq->entries is NULL. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20210115130252.173359fc236d.I75c7c2397d20df8d7fbc24cb16a5232d5c551889@changeid commit a800f95858d02a9174c48b4286c0799d3905890f Author: Emmanuel Grumbach Date: Fri Jan 15 13:05:52 2021 +0200 iwlwifi: fix the NMI flow for old devices I noticed that the flow that triggers an NMI on the firmware for old devices (tested on 7265) doesn't work. Apparently, the firmware / device is still in low power when we write the register that triggers the NMI. We call the "grab_nic_access" function to make sure the device is awake but that wasn't enough. I played with this and noticed that if we wait 1 ms after the device reports it is awake before we write to the NMI register, the device always sees our write and the firmware gets properly asserted. Triggering an NMI to the firmware can be done with the debugfs hook: echo 1 > /sys/kernel/debug/iwlwifi/0000\:00\:03.0/iwlmvm/fw_nmi What happened before is that the firmware would just stall without running its NMI routine. Because of that the driver wouldn't get the "firmware crashed" interrupt. After a while the driver would notice that the firmware is not responding to some command and it would read the error data from the firmware, but this data is populated in the NMI service routine in the firmware which was not called. So in the logs it looked like: iwlwifi 0000:00:03.0: Error sending REPLY_ERROR: time out after 2000ms. iwlwifi 0000:00:03.0: Current CMD queue read_ptr 33 write_ptr 34 iwlwifi 0000:00:03.0: Loaded firmware version: 29.09bd31e1.0 7265D-29.ucode iwlwifi 0000:00:03.0: 0x00000000 | ADVANCED_SYSASSERT iwlwifi 0000:00:03.0: 0x00000000 | trm_hw_status0 iwlwifi 0000:00:03.0: 0x00000000 | trm_hw_status1 iwlwifi 0000:00:03.0: 0x00000000 | branchlink2 iwlwifi 0000:00:03.0: 0x00000000 | interruptlink1 iwlwifi 0000:00:03.0: 0x00000000 | interruptlink2 iwlwifi 0000:00:03.0: 0x00000000 | data1 iwlwifi 0000:00:03.0: 0x00000000 | data2 iwlwifi 0000:00:03.0: 0x00000000 | data3 iwlwifi 0000:00:03.0: 0x00000000 | beacon time iwlwifi 0000:00:03.0: 0x00000000 | tsf low ... With this fix, immediately after we trigger the NMI to the firmware, we get the expected: iwlwifi 0000:00:03.0: Microcode SW error detected. Restarting 0x2000000. iwlwifi 0000:00:03.0: Start IWL Error Log Dump: iwlwifi 0000:00:03.0: Status: 0x00000040, count: 6 iwlwifi 0000:00:03.0: Loaded firmware version: 29.09bd31e1.0 7265D-29.ucode iwlwifi 0000:00:03.0: 0x00000084 | NMI_INTERRUPT_UNKNOWN iwlwifi 0000:00:03.0: 0x000002F1 | trm_hw_status0 iwlwifi 0000:00:03.0: 0x00000000 | trm_hw_status1 iwlwifi 0000:00:03.0: 0x00043D6C | branchlink2 iwlwifi 0000:00:03.0: 0x0004AFD6 | interruptlink1 iwlwifi 0000:00:03.0: 0x000008C4 | interruptlink2 iwlwifi 0000:00:03.0: 0x00000000 | data1 iwlwifi 0000:00:03.0: 0x00000080 | data2 iwlwifi 0000:00:03.0: 0x07030000 | data3 iwlwifi 0000:00:03.0: 0x003FD4C3 | beacon time iwlwifi 0000:00:03.0: 0x00C22AC3 | tsf low iwlwifi 0000:00:03.0: 0x00000000 | tsf hi iwlwifi 0000:00:03.0: 0x00000000 | time gp1 iwlwifi 0000:00:03.0: 0x00C22AC3 | time gp2 iwlwifi 0000:00:03.0: 0x00000001 | uCode revision type iwlwifi 0000:00:03.0: 0x0000001D | uCode version major Notice the first line: "Microcode SW error detected:" which is printed in the driver's ISR, which means that the driver actually got an interrupt from the firmware saying that it crashed. And then we have the properly populated error data. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20210115130252.70e67cc75d88.I6615cad4361862e7f3c9f2d3cafb6a8c61e16781@changeid commit 82a08d0cd7b503be426fb856a0fb73c9c976aae1 Author: Johannes Berg Date: Fri Jan 15 13:05:51 2021 +0200 iwlwifi: pnvm: don't try to load after failures If loading the PNVM file failed on the first try during the interface up, the file is unlikely to show up later, and we already don't try to reload it if it changes, so just don't try loading it again and again. This also fixes some issues where we may try to load it at resume time, which may not be possible yet. Signed-off-by: Johannes Berg Fixes: 6972592850c0 ("iwlwifi: read and parse PNVM file") Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20210115130252.5ac6828a0bbe.I7d308358b21d3c0c84b1086999dbc7267f86e219@changeid commit 1c58bed4b7f7551239b9005ad0a9a6566a3d9fbe Author: Johannes Berg Date: Fri Jan 15 13:05:50 2021 +0200 iwlwifi: pnvm: don't skip everything when not reloading Even if we don't reload the file from disk, we still need to trigger the PNVM load flow with the device; fix that. Signed-off-by: Johannes Berg Fixes: 6972592850c0 ("iwlwifi: read and parse PNVM file") Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20210115130252.85ef56c4ef8c.I3b853ce041a0755d45e448035bef1837995d191b@changeid commit 34b9434cd0d425330a0467e767f8d047ef62964d Author: Johannes Berg Date: Fri Jan 15 13:05:49 2021 +0200 iwlwifi: pcie: avoid potential PNVM leaks If we erroneously try to set the PNVM data again after it has already been set, we could leak the old DMA memory. Avoid that and warn, we shouldn't be doing this. Signed-off-by: Johannes Berg Fixes: 6972592850c0 ("iwlwifi: read and parse PNVM file") Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20210115130252.929c2d680429.I086b9490e6c005f3bcaa881b617e9f61908160f3@changeid commit 5c56d862c749669d45c256f581eac4244be00d4d Author: Johannes Berg Date: Fri Jan 15 13:05:48 2021 +0200 iwlwifi: mvm: take mutex for calling iwl_mvm_get_sync_time() We need to take the mutex to call iwl_mvm_get_sync_time(), do it. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20210115130252.4bb5ccf881a6.I62973cbb081e80aa5b0447a5c3b9c3251a65cf6b@changeid commit bf544e9aa570034e094a8a40d5f9e1e2c4916d18 Author: Sara Sharon Date: Fri Jan 15 13:05:47 2021 +0200 iwlwifi: mvm: skip power command when unbinding vif during CSA In the new CSA flow, we remain associated during CSA, but still do a unbind-bind to the vif. However, sending the power command right after when vif is unbound but still associated causes FW to assert (0x3400) since it cannot tell the LMAC id. Just skip this command, we will send it again in a bit, when assigning the new context. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20210115130252.64a2254ac5c3.Iaa3a9050bf3d7c9cd5beaf561e932e6defc12ec3@changeid commit 61bb17da44a0b6d079e68872e3569bb3eda17656 Merge: 535b6a122c6b4 08d60e5999540 Author: Petr Mladek Date: Mon Jan 25 14:29:35 2021 +0100 Merge branch 'printk-rework' into for-linus commit 396cf2a46adddbf51373e16225c1d25254310046 Author: Daniel Walker Date: Thu Jan 21 15:12:36 2021 -0800 spidev: Add cisco device compatible Add compatible string for Cisco device present on the Cisco Petra platform. Signed-off-by: Daniel Walker Cc: xe-linux-external@cisco.com Link: https://lore.kernel.org/r/20210121231237.30664-2-danielwa@cisco.com Signed-off-by: Mark Brown commit 9ad9bc59dde106e56dd59ce2bec7c1b08e1f0eb4 Author: Libin Yang Date: Mon Jan 25 10:11:17 2021 +0200 ASoC: Intel: sof_sdw: set proper flags for Dell TGL-H SKU 0A5E Add flag "SOF_RT711_JD_SRC_JD2", flag "SOF_RT715_DAI_ID_FIX" and "SOF_SDW_FOUR_SPK" to the Dell TGL-H based SKU "0A5E". Signed-off-by: Libin Yang Co-developed-by: Hui Wang Signed-off-by: Hui Wang Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20210125081117.814488-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 70041000450d0a071bf9931d634c8e2820340236 Author: Stephan Gerhold Date: Mon Jan 25 11:44:42 2021 +0100 ASoC: qcom: lpass: Fix out-of-bounds DAI ID lookup The "dai_id" given into LPAIF_INTFDMA_REG(...) is already the real DAI ID, not an index into v->dai_driver. Looking it up again seems entirely redundant. For IPQ806x (and SC7180 since commit 09a4f6f5d21c ("ASoC: dt-bindings: lpass: Fix and common up lpass dai ids") this is now often an out-of-bounds read because the indexes in the "dai_driver" array no longer match the actual DAI ID. Cc: Srinivasa Rao Mandadapu Cc: Srinivas Kandagatla Fixes: 7cb37b7bd0d3 ("ASoC: qcom: Add support for lpass hdmi driver") Signed-off-by: Stephan Gerhold Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210125104442.135899-1-stephan@gerhold.net Signed-off-by: Mark Brown commit 339f6c73d5abe85550a0c962edc8a5df1f2b4273 Author: Tzung-Bi Shih Date: Mon Jan 25 14:14:53 2021 +0800 ASoC: mediatek: mt8192-mt6359: add format constraints for RT5682 MT8192 determines the I2S clock rates according to the sampling rates. There is only 1 set of I2S in between MT8192 and RT5682. If playing and capturing via RT5682 in different sampling rates, the I2S data will be corrupted. Adds format constraints to the corresponding DAI links to make sure the sampling rates are symmetric. Fixes: 18b13ff23fab ("ASoC: mediatek: mt8192: add machine driver with mt6359, rt1015 and rt5682") Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20210125061453.1056535-1-tzungbi@google.com Signed-off-by: Mark Brown commit e953daeb68b1abd8a7d44902786349fdeef5c297 Author: Eliot Blennerhassett Date: Fri Jan 22 21:27:08 2021 +1300 ASoC: ak4458: correct reset polarity Reset (aka power off) happens when the reset gpio is made active. Change function name to ak4458_reset to match devicetree property "reset-gpios" Signed-off-by: Eliot Blennerhassett Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/ce650f47-4ff6-e486-7846-cc3d033f3601@blennerhassett.gen.nz Signed-off-by: Mark Brown commit 8a3fea95fab14dd19487d1e499eee3b3d1050d70 Author: Pierre-Louis Bossart Date: Thu Jan 21 18:57:25 2021 -0600 ASoC: SOF: SND_INTEL_DSP_CONFIG dependency The sof-pci-dev driver fails to link when built into the kernel and CONFIG_SND_INTEL_DSP_CONFIG is set to =m: arm-linux-gnueabi-ld: sound/soc/sof/sof-pci-dev.o: in function `sof_pci_probe': sof-pci-dev.c:(.text+0x1c): undefined reference to `snd_intel_dsp_driver_probe' As a temporary fix, use IS_REACHABLE to prevent the problem from happening. A more complete solution is to move this code to Intel-specific parts, restructure the drivers and Kconfig as discussed with Arnd Bergmann and Takashi Iwai. Fixes: 82d9d54a6c0e ("ALSA: hda: add Intel DSP configuration / probe code") Reported-by: Arnd Bergmann Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210122005725.94163-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit bd9038faa9d7f162b47e1577e35ec5eac39f9d90 Author: Pierre-Louis Bossart Date: Thu Jan 21 18:57:24 2021 -0600 ASoC: SOF: Intel: soundwire: fix select/depend unmet dependencies The LKP bot reports the following issue: WARNING: unmet direct dependencies detected for SOUNDWIRE_INTEL Depends on [m]: SOUNDWIRE [=m] && ACPI [=y] && SND_SOC [=y] Selected by [y]: - SND_SOC_SOF_INTEL_SOUNDWIRE [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_SOC_SOF_TOPLEVEL [=y] && SND_SOC_SOF_INTEL_TOPLEVEL [=y] && SND_SOC_SOF_INTEL_PCI [=y] This comes from having tristates being configured independently, when in practice the CONFIG_SOUNDWIRE needs to be aligned with the SOF choices: when the SOF code is compiled as built-in, the CONFIG_SOUNDWIRE also needs to be 'y'. The easiest fix is to replace the 'depends' with a 'select' and have a single user selection to activate SoundWire on Intel platforms. This still allows regmap to be compiled independently as a module. This is just a temporary fix, the select/depend usage will be revisited and the SOF Kconfig re-organized, as suggested by Arnd Bergman. Reported-by: kernel test robot Fixes: a115ab9b8b93e ('ASoC: SOF: Intel: add build support for SoundWire') Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210122005725.94163-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit f6b57101a6b31277a4bde1d8028c46e898bd2ff2 Author: Dom Cobley Date: Thu Jan 21 11:57:59 2021 +0100 drm/vc4: Correct POS1_SCL for hvs5 Fixes failure with 4096x1080 resolutions [ 284.315379] WARNING: CPU: 1 PID: 901 at drivers/gpu/drm/vc4/vc4_plane.c:981 vc4_plane_mode_set+0x1374/0x13c4 [ 284.315385] Modules linked in: ir_rc5_decoder rpivid_hevc(C) bcm2835_codec(C) bcm2835_isp(C) bcm2835_mmal_vchiq(C) bcm2835_gpiomem v4l2_mem2mem videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 videobuf2_common videodev mc cdc_acm xpad ir_rc6_decoder rc_rc6_mce gpio_ir_recv fuse [ 284.315509] CPU: 1 PID: 901 Comm: kodi.bin Tainted: G C 5.10.7 #1 [ 284.315514] Hardware name: BCM2711 [ 284.315518] Backtrace: [ 284.315533] [] (dump_backtrace) from [] (show_stack+0x20/0x24) [ 284.315540] r7:ffffffff r6:00000000 r5:68000013 r4:c18ecf1c [ 284.315549] [] (show_stack) from [] (dump_stack+0xc4/0xf0) [ 284.315558] [] (dump_stack) from [] (__warn+0xfc/0x158) [ 284.315564] r9:00000000 r8:00000009 r7:000003d5 r6:00000009 r5:c08cc7dc r4:c0fd09b8 [ 284.315572] [] (__warn) from [] (warn_slowpath_fmt+0x74/0xe4) [ 284.315577] r7:c08cc7dc r6:000003d5 r5:c0fd09b8 r4:00000000 [ 284.315584] [] (warn_slowpath_fmt) from [] (vc4_plane_mode_set+0x1374/0x13c4) [ 284.315589] r8:00000000 r7:00000000 r6:00001000 r5:c404c600 r4:c2e34600 [ 284.315596] [] (vc4_plane_mode_set) from [] (vc4_plane_atomic_check+0x40/0x1c0) [ 284.315601] r10:00000001 r9:c2e34600 r8:c0e67068 r7:c0fc44e0 r6:c2ce3640 r5:c3d636c0 [ 284.315605] r4:c2e34600 [ 284.315614] [] (vc4_plane_atomic_check) from [] (drm_atomic_helper_check_planes+0xec/0x1ec) [ 284.315620] r9:c2e34600 r8:c0e67068 r7:c0fc44e0 r6:c2ce3640 r5:c3d636c0 r4:00000006 [ 284.315627] [] (drm_atomic_helper_check_planes) from [] (drm_atomic_helper_check+0x54/0x9c) [ 284.315633] r9:c2e35400 r8:00000006 r7:00000000 r6:c2ba7800 r5:c3d636c0 r4:00000000 [ 284.315641] [] (drm_atomic_helper_check) from [] (vc4_atomic_check+0x25c/0x454) [ 284.315645] r7:00000000 r6:c2ba7800 r5:00000001 r4:c3d636c0 [ 284.315652] [] (vc4_atomic_check) from [] (drm_atomic_check_only+0x5cc/0x7e0) [ 284.315658] r10:c404c6c8 r9:ffffffff r8:c472c480 r7:00000003 r6:c3d636c0 r5:00000000 [ 284.315662] r4:0000003c r3:c08b7a4c [ 284.315670] [] (drm_atomic_check_only) from [] (drm_mode_atomic_ioctl+0x758/0xa7c) [ 284.315675] r10:c3d46000 r9:c3d636c0 r8:c2ce8a70 r7:027e3a54 r6:00000043 r5:c1fbb800 [ 284.315679] r4:0281a858 [ 284.315688] [] (drm_mode_atomic_ioctl) from [] (drm_ioctl_kernel+0xc4/0x108) [ 284.315693] r10:c03864bc r9:c1fbb800 r8:c3d47e64 r7:c089b308 r6:00000002 r5:c2ba7800 [ 284.315697] r4:00000000 [ 284.315705] [] (drm_ioctl_kernel) from [] (drm_ioctl+0x1e8/0x3a0) [ 284.315711] r9:c1fbb800 r8:000000bc r7:c3d47e64 r6:00000038 r5:c0e59570 r4:00000038 [ 284.315719] [] (drm_ioctl) from [] (sys_ioctl+0x35c/0x914) [ 284.315724] r10:c2d08200 r9:00000000 r8:c36fa300 r7:befdd870 r6:c03864bc r5:c36fa301 [ 284.315728] r4:c03864bc [ 284.315735] [] (sys_ioctl) from [] (ret_fast_syscall+0x0/0x28) [ 284.315739] Exception stack(0xc3d47fa8 to 0xc3d47ff0) [ 284.315745] 7fa0: 027eb750 befdd870 00000000 c03864bc befdd870 00000000 [ 284.315750] 7fc0: 027eb750 befdd870 c03864bc 00000036 027e3948 0281a640 0281a850 027e3a50 [ 284.315756] 7fe0: b4b64100 befdd844 b4b5ba2c b49c994c [ 284.315762] r10:00000036 r9:c3d46000 r8:c0200204 r7:00000036 r6:c03864bc r5:befdd870 [ 284.315765] r4:027eb750 Fixes: c54619b0bfb3 ("drm/vc4: Add support for the BCM2711 HVS5") Signed-off-by: Dom Cobley Signed-off-by: Maxime Ripard Reviewed-by: Dave Stevenson Tested-By: Lucas Nussbaum Tested-By: Ryutaroh Matsumoto Link: https://patchwork.freedesktop.org/patch/msgid/20210121105759.1262699-2-maxime@cerno.tech commit 78e5330329ee206d6aa4593a90320fd837f7966e Author: Dom Cobley Date: Thu Jan 21 11:57:58 2021 +0100 drm/vc4: Correct lbm size and calculation LBM base address is measured in units of pixels per cycle. That is 4 for 2711 (hvs5) and 2 for 2708. We are wasting 75% of lbm by indexing without the scaling. But we were also using too high a size for the lbm resulting in partial corruption (right hand side) of vertically scaled images, usually at 4K or lower resolutions with more layers. The physical RAM of LBM on 2711 is 8 * 1920 * 16 * 12-bit (pixels are stored 12-bits per component regardless of format). The LBM address indexes work in units of pixels per clock, so for 4 pixels per clock that means we have 32 * 1920 = 60K Fixes: c54619b0bfb3 ("drm/vc4: Add support for the BCM2711 HVS5") Signed-off-by: Dom Cobley Signed-off-by: Maxime Ripard Reviewed-by: Dave Stevenson Tested-By: Lucas Nussbaum Tested-By: Ryutaroh Matsumoto Link: https://patchwork.freedesktop.org/patch/msgid/20210121105759.1262699-1-maxime@cerno.tech commit c5b5ff607d6fe5f4284acabd07066f96ecf96ac4 Author: Bard Liao Date: Mon Jan 25 10:30:51 2021 +0200 ALSA: hda: intel-dsp-config: add PCI id for TGL-H Adding PCI id for TGL-H. Like for other TGL platforms, SOF is used if Soundwire codecs or PCH-DMIC is detected. Signed-off-by: Bard Liao Reviewed-by: Xiuli Pan Reviewed-by: Libin Yang Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20210125083051.828205-1-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai commit 08d60e5999540110576e7c1346d486220751b7f9 Author: John Ogness Date: Sun Jan 24 21:33:28 2021 +0106 printk: fix string termination for record_print_text() Commit f0e386ee0c0b ("printk: fix buffer overflow potential for print_text()") added string termination in record_print_text(). However it used the wrong base pointer for adding the terminator. This led to a 0-byte being written somewhere beyond the buffer. Use the correct base pointer when adding the terminator. Fixes: f0e386ee0c0b ("printk: fix buffer overflow potential for print_text()") Reported-by: Sven Schnelle Signed-off-by: John Ogness Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210124202728.4718-1-john.ogness@linutronix.de commit 794c613383433ffc4fceec8eaa081b9f1962e287 Author: Kai-Heng Feng Date: Mon Jan 18 21:45:23 2021 +0800 HID: multitouch: Apply MT_QUIRK_CONFIDENCE quirk for multi-input devices Palm ejection stops working on some Elan and Synaptics touchpad after commit 40d5bb87377a ("HID: multitouch: enable multi-input as a quirk for some devices"). The commit changes the mt_class from MT_CLS_WIN_8 to MT_CLS_WIN_8_FORCE_MULTI_INPUT, so MT_QUIRK_CONFIDENCE isn't applied anymore. So also apply the quirk since MT_CLS_WIN_8_FORCE_MULTI_INPUT is essentially MT_CLS_WIN_8. Fixes: 40d5bb87377a ("HID: multitouch: enable multi-input as a quirk for some devices") Cc: stable@vger.kernel.org Signed-off-by: Kai-Heng Feng Signed-off-by: Benjamin Tissoires commit 177d8f1f7f47fe7c18ceb1d87893890d7e9c95a7 Author: Tony Lindgren Date: Wed Dec 30 17:07:40 2020 +0200 ARM: dts: omap4-droid4: Fix lost keypad slide interrupts for droid4 We may lose edge interrupts for gpio banks other than the first gpio bank as they are not always powered. Instead, we must use the padconf interrupt as that is always powered. Note that we still also use the gpio for reading the pin state as that can't be done with the padconf device. Signed-off-by: Tony Lindgren commit ef49d40b61a3e18a11edd5eb1c30b0183af9e850 Author: Dinghao Liu Date: Sun Jan 17 16:50:17 2021 +0800 block: Fix an error handling in add_partition Once we have called device_initialize(), we should use put_device() to give up the reference on error, just like what we have done on failure of device_add(). Signed-off-by: Dinghao Liu Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 2569063c7140c65a0d0ad075e95ddfbcda9ba3c0 Author: Ming Lei Date: Sun Dec 27 19:34:58 2020 +0800 blk-mq: test QUEUE_FLAG_HCTX_ACTIVE for sbitmap_shared in hctx_may_queue In case of blk_mq_is_sbitmap_shared(), we should test QUEUE_FLAG_HCTX_ACTIVE against q->queue_flags instead of BLK_MQ_S_TAG_ACTIVE. So fix it. Cc: John Garry Cc: Kashyap Desai Fixes: f1b49fdc1c64 ("blk-mq: Record active_queues_shared_sbitmap per tag_set for when using shared sbitmap") Signed-off-by: Ming Lei Reviewed-by: John Garry Signed-off-by: Jens Axboe commit 9bbd77d5bbc9aff8cb74d805c31751f5f0691ba8 Author: Benjamin Valentin Date: Thu Jan 21 19:24:17 2021 -0800 Input: xpad - sync supported devices with fork on GitHub There is a fork of this driver on GitHub [0] that has been updated with new device IDs. Merge those into the mainline driver, so the out-of-tree fork is not needed for users of those devices anymore. [0] https://github.com/paroj/xpad Signed-off-by: Benjamin Valentin Link: https://lore.kernel.org/r/20210121142523.1b6b050f@rechenknecht2k11 Signed-off-by: Dmitry Torokhov commit d29b468da4f940bd2bff2628ba8d2d652671d244 Author: Trond Myklebust Date: Fri Jan 22 10:05:51 2021 -0500 pNFS/NFSv4: Improve rejection of out-of-order layouts If a layoutget ends up being reordered w.r.t. a layoutreturn, e.g. due to a layoutget-on-open not knowing a priori which file to lock, then we must assume the layout is no longer being considered valid state by the server. Incrementally improve our ability to reject such states by using the cached old stateid in conjunction with the plh_barrier to try to identify them. Signed-off-by: Trond Myklebust commit 1bcf34fdac5f8c2fcd16796495db75744612ca27 Author: Trond Myklebust Date: Thu Jan 21 13:51:50 2021 -0500 pNFS/NFSv4: Update the layout barrier when we schedule a layoutreturn When we're scheduling a layoutreturn, we need to ignore any further incoming layouts with sequence ids that are going to be affected by the layout return. Fixes: 44ea8dfce021 ("NFS/pnfs: Reference the layout cred in pnfs_prepare_layoutreturn()") Signed-off-by: Trond Myklebust commit 08bd8dbe88825760e953759d7ec212903a026c75 Author: Trond Myklebust Date: Thu Jan 21 17:11:42 2021 -0500 pNFS/NFSv4: Try to return invalid layout in pnfs_layout_process() If the server returns a new stateid that does not match the one in our cache, then try to return the one we hold instead of just invalidating it on the client side. This ensures that both client and server will agree that the stateid is invalid. Signed-off-by: Trond Myklebust commit 814b84971388cd5fb182f2e914265b3827758455 Author: Trond Myklebust Date: Thu Jan 21 16:34:37 2021 -0500 pNFS/NFSv4: Fix a layout segment leak in pnfs_layout_process() If the server returns a new stateid that does not match the one in our cache, then pnfs_layout_process() will leak the layout segments returned by pnfs_mark_layout_stateid_invalid(). Fixes: 9888d837f3cf ("pNFS: Force a retry of LAYOUTGET if the stateid doesn't match our cache") Signed-off-by: Trond Myklebust commit b18032bb0a883cd7edd22a7fe6c57e1059b81ed0 Author: Jens Axboe Date: Sun Jan 24 16:58:56 2021 -0700 io_uring: only call io_cqring_ev_posted() if events were posted This normally doesn't cause any extra harm, but it does mean that we'll increment the eventfd notification count, if one has been registered with the ring. This can confuse applications, when they see more notifications on the eventfd side than are available in the ring. Do the nice thing and only increment this count, if we actually posted (or even overflowed) events. Reported-and-tested-by: Dan Melnic Signed-off-by: Jens Axboe commit 84965ff8a84f0368b154c9b367b62e59c1193f30 Author: Jens Axboe Date: Sat Jan 23 15:51:11 2021 -0700 io_uring: if we see flush on exit, cancel related tasks Ensure we match tasks that belong to a dead or dying task as well, as we need to reap those in addition to those belonging to the exiting task. Cc: stable@vger.kernel.org # 5.9+ Reported-by: Josef Grieb Signed-off-by: Jens Axboe commit 6ee1d745b7c9fd573fba142a2efdad76a9f1cb04 Author: Linus Torvalds Date: Sun Jan 24 16:47:14 2021 -0800 Linux 5.11-rc5 commit 228a65d4544af5086bd167dcc5a0cb4fae2c42b4 Merge: ef7b1a0ea857a b89bc060b53e7 Author: Linus Torvalds Date: Sun Jan 24 13:52:02 2021 -0800 Merge tag 'sh-for-5.11' of git://git.libc.org/linux-sh Pull arch/sh updates from Rich Felker: "Cleanup and warning fixes" * tag 'sh-for-5.11' of git://git.libc.org/linux-sh: sh/intc: Restore devm_ioremap() alignment sh: mach-sh03: remove duplicate include arch: sh: remove duplicate include sh: Drop ARCH_NR_GPIOS definition sh: Remove unused HAVE_COPY_THREAD_TLS macro sh: remove CONFIG_IDE from most defconfig sh: mm: Convert to DEFINE_SHOW_ATTRIBUTE sh: intc: Convert to DEFINE_SHOW_ATTRIBUTE arch/sh: hyphenate Non-Uniform in Kconfig prompt sh: dma: fix kconfig dependency for G2_DMA commit ef7b1a0ea857af076ea64d131e95b59166ab6163 Merge: a692a610d7ed6 02a13674fa0e8 Author: Linus Torvalds Date: Sun Jan 24 12:30:14 2021 -0800 Merge tag 'io_uring-5.11-2021-01-24' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: "Still need a final cancelation fix that isn't quite done done, expected in the next day or two. That said, this contains: - Wakeup fix for IOPOLL requests - SQPOLL split close op handling fix - Ensure that any use of io_uring fd itself is marked as inflight - Short non-regular file read fix (Pavel) - Fix up bad false positive warning (Pavel) - SQPOLL fixes (Pavel) - In-flight removal fix (Pavel)" * tag 'io_uring-5.11-2021-01-24' of git://git.kernel.dk/linux-block: io_uring: account io_uring internal files as REQ_F_INFLIGHT io_uring: fix sleeping under spin in __io_clean_op io_uring: fix short read retries for non-reg files io_uring: fix SQPOLL IORING_OP_CLOSE cancelation state io_uring: fix skipping disabling sqo on exec io_uring: fix uring_flush in exit_files() warning io_uring: fix false positive sqo warning on flush io_uring: iopoll requests should also wake task ->in_idle state commit a692a610d7ed632cab31b61d6c350db68a10e574 Merge: 51306806426d0 97784481757fb Author: Linus Torvalds Date: Sun Jan 24 12:24:35 2021 -0800 Merge tag 'block-5.11-2021-01-24' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: - NVMe pull request from Christoph: - fix a status code in nvmet (Chaitanya Kulkarni) - avoid double completions in nvme-rdma/nvme-tcp (Chao Leng) - fix the CMB support to cope with NVMe 1.4 controllers (Klaus Jensen) - fix PRINFO handling in the passthrough ioctl (Revanth Rajashekar) - fix a double DMA unmap in nvme-pci - lightnvm error path leak fix (Pan) - MD pull request from Song: - Flush request fix (Xiao) * tag 'block-5.11-2021-01-24' of git://git.kernel.dk/linux-block: lightnvm: fix memory leak when submit fails nvme-pci: fix error unwind in nvme_map_data nvme-pci: refactor nvme_unmap_data md: Set prev_flush_start and flush_bio in an atomic way nvmet: set right status on error in id-ns handler nvme-pci: allow use of cmb on v1.4 controllers nvme-tcp: avoid request double completion for concurrent nvme_tcp_timeout nvme-rdma: avoid request double completion for concurrent nvme_rdma_timeout nvme: check the PRINFO bit before deciding the host buffer length commit 51306806426d0ffa4f9b11e65447092ae7d57ee7 Merge: fdbc80bdc4365 e82d891a63afe Author: Linus Torvalds Date: Sun Jan 24 12:16:34 2021 -0800 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "18 patches. Subsystems affected by this patch series: mm (pagealloc, memcg, kasan, memory-failure, and highmem), ubsan, proc, and MAINTAINERS" * emailed patches from Andrew Morton : MAINTAINERS: add a couple more files to the Clang/LLVM section proc_sysctl: fix oops caused by incorrect command parameters powerpc/mm/highmem: use __set_pte_at() for kmap_local() mips/mm/highmem: use set_pte() for kmap_local() mm/highmem: prepare for overriding set_pte_at() sparc/mm/highmem: flush cache and TLB mm: fix page reference leak in soft_offline_page() ubsan: disable unsigned-overflow check for i386 kasan, mm: fix resetting page_alloc tags for HW_TAGS kasan, mm: fix conflicts with init_on_alloc/free kasan: fix HW_TAGS boot parameters kasan: fix incorrect arguments passing in kasan_add_zero_shadow kasan: fix unaligned address is unhandled in kasan_remove_zero_shadow mm: fix numa stats for thp migration mm: memcg: fix memcg file_dirty numa stat mm: memcg/slab: optimize objcg stock draining mm: fix initialization of struct page for holes in memory layout x86/setup: don't remove E820_TYPE_RAM for pfn 0 commit fdbc80bdc4365078a0f7d65631171cb80e3ffd6e Merge: 443d11297b5c0 31b081066e9c8 Author: Linus Torvalds Date: Sun Jan 24 11:26:46 2021 -0800 Merge tag 'char-misc-5.11-rc5' 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.11-rc5: - habanalabs driver fixes - phy driver fixes - hwtracing driver fixes - rtsx cardreader driver fix All of these have been in linux-next with no reported issues" * tag 'char-misc-5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: misc: rtsx: init value of aspm_enabled habanalabs: disable FW events on device removal habanalabs: fix backward compatibility of idle check habanalabs: zero pci counters packet before submit to FW intel_th: pci: Add Alder Lake-P support stm class: Fix module init return on allocation failure habanalabs: prevent soft lockup during unmap habanalabs: fix reset process in case of failures habanalabs: fix dma_addr passed to dma_mmap_coherent phy: mediatek: allow compile-testing the dsi phy phy: cpcap-usb: Fix warning for missing regulator_disable PHY: Ingenic: fix unconditional build of phy-ingenic-usb commit 443d11297b5c00b9ce6ba6e67c766296c96f8945 Merge: 832bceefa08ef e020ff611ba9b Author: Linus Torvalds Date: Sun Jan 24 11:05:48 2021 -0800 Merge tag 'driver-core-5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fixes from Greg KH: "Here are some small driver core fixes for 5.11-rc5 that resolve some reported problems: - revert of a -rc1 patch that was causing problems with some machines - device link device name collision problem fix (busses only have to name devices unique to their bus, not unique to all busses) - kernfs splice bugfixes to resolve firmware loading problems for Qualcomm systems. - other tiny driver core fixes for minor issues reported. All of these have been in linux-next with no reported problems" * tag 'driver-core-5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: driver core: Fix device link device name collision driver core: Extend device_is_dependent() kernfs: wire up ->splice_read and ->splice_write kernfs: implement ->write_iter kernfs: implement ->read_iter Revert "driver core: Reorder devices on successful probe" Driver core: platform: Add extra error check in devm_platform_get_irqs_affinity() drivers core: Free dma_range_map when driver probe failed commit 832bceefa08ef830388c175911fe17e6ef0125b9 Merge: 4da81fa2108aa a1bfb0ccf94dc Author: Linus Torvalds Date: Sun Jan 24 11:02:01 2021 -0800 Merge tag 'staging-5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging/IIO driver fixes from Greg KH: "Here are some IIO driver fixes for 5.11-rc5 to resolve some reported problems. Nothing major, just a few small fixes, all of these have been in linux-next for a while and full details are in the shortlog" * tag 'staging-5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: iio: sx9310: Fix semtech,avg-pos-strength setting when > 16 iio: common: st_sensors: fix possible infinite loop in st_sensors_irq_thread iio: ad5504: Fix setting power-down state counter:ti-eqep: remove floor drivers: iio: temperature: Add delay after the addressed reset command in mlx90632.c iio: adc: ti_am335x_adc: remove omitted iio_kfifo_free() dt-bindings: iio: accel: bma255: Fix bmc150/bmi055 compatible iio: sx9310: Off by one in sx9310_read_thresh() commit 4da81fa2108aa46249768bfb04cea7c534fafdda Merge: 8f3bfd2181ecb 17749851eb9ca Author: Linus Torvalds Date: Sun Jan 24 10:56:45 2021 -0800 Merge tag 'tty-5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial fixes from Greg KH: "Here are three small tty/serial fixes for 5.11-rc5 to resolve reported problems: - two patches to fix up writing to ttys with splice - mvebu-uart driver fix for reported problem All of these have been in linux-next with no reported problems" * tag 'tty-5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: tty: fix up hung_up_tty_write() conversion tty: implement write_iter serial: mvebu-uart: fix tx lost characters at power off commit 8f3bfd2181ecb920e5f51e2a16c1ef65d6f50a5f Merge: e68061375f792 ef02684c4e67d Author: Linus Torvalds Date: Sun Jan 24 10:54:54 2021 -0800 Merge tag 'usb-5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some small USB driver fixes for 5.11-rc5. They resolve: - xhci issues for some reported problems - ehci driver issue for one specific device - USB gadget fixes for some reported problems - cdns3 driver fixes for issues reported - MAINTAINERS file update - thunderbolt minor fix All of these have been in linux-next with no reported issues" * tag 'usb-5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: bdc: Make bdc pci driver depend on BROKEN xhci: tegra: Delay for disabling LFPS detector xhci: make sure TRB is fully written before giving it to the controller usb: udc: core: Use lock when write to soft_connect USB: gadget: dummy-hcd: Fix errors in port-reset handling usb: gadget: aspeed: fix stop dma register setting. USB: ehci: fix an interrupt calltrace error ehci: fix EHCI host controller initialization sequence MAINTAINERS: update Peter Chen's email address thunderbolt: Drop duplicated 0x prefix from format string MAINTAINERS: Update address for Cadence USB3 driver usb: cdns3: imx: improve driver .remove API usb: cdns3: imx: fix can't create core device the second time issue usb: cdns3: imx: fix writing read-only memory issue commit e82d891a63afebefde5d26971768f5cb91627f73 Author: Nathan Chancellor Date: Sat Jan 23 21:02:21 2021 -0800 MAINTAINERS: add a couple more files to the Clang/LLVM section The K: entry should ensure that Nick and I always get CC'd on patches that touch these files but it is better to be explicit rather than implicit. Link: https://lkml.kernel.org/r/20210114004059.2129921-1-natechancellor@gmail.com Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 697edcb0e4eadc41645fe88c991fe6a206b1a08d Author: Xiaoming Ni Date: Sat Jan 23 21:02:16 2021 -0800 proc_sysctl: fix oops caused by incorrect command parameters The process_sysctl_arg() does not check whether val is empty before invoking strlen(val). If the command line parameter () is incorrectly configured and val is empty, oops is triggered. For example: "hung_task_panic=1" is incorrectly written as "hung_task_panic", oops is triggered. The call stack is as follows: Kernel command line: .... hung_task_panic ...... Call trace: __pi_strlen+0x10/0x98 parse_args+0x278/0x344 do_sysctl_args+0x8c/0xfc kernel_init+0x5c/0xf4 ret_from_fork+0x10/0x30 To fix it, check whether "val" is empty when "phram" is a sysctl field. Error codes are returned in the failure branch, and error logs are generated by parse_args(). Link: https://lkml.kernel.org/r/20210118133029.28580-1-nixiaoming@huawei.com Fixes: 3db978d480e2843 ("kernel/sysctl: support setting sysctl parameters from kernel command line") Signed-off-by: Xiaoming Ni Acked-by: Vlastimil Babka Cc: Luis Chamberlain Cc: Kees Cook Cc: Iurii Zaikin Cc: Alexey Dobriyan Cc: Michal Hocko Cc: Masami Hiramatsu Cc: Heiner Kallweit Cc: Randy Dunlap Cc: [5.8+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 785025820a6a565185ce9d47fdd8d23dbf91dee8 Author: Thomas Gleixner Date: Sat Jan 23 21:02:11 2021 -0800 powerpc/mm/highmem: use __set_pte_at() for kmap_local() The original PowerPC highmem mapping function used __set_pte_at() to denote that the mapping is per CPU. This got lost with the conversion to the generic implementation. Override the default map function. Link: https://lkml.kernel.org/r/20210112170411.281464308@linutronix.de Fixes: 47da42b27a56 ("powerpc/mm/highmem: Switch to generic kmap atomic") Signed-off-by: Thomas Gleixner Cc: Michael Ellerman Cc: Andreas Larsson Cc: "David S. Miller" Cc: Paul Cercueil Cc: Peter Zijlstra Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8c0d5d78f3596e203e9cd27563a8380649c03ad0 Author: Thomas Gleixner Date: Sat Jan 23 21:02:07 2021 -0800 mips/mm/highmem: use set_pte() for kmap_local() set_pte_at() on MIPS invokes update_cache() which might recurse into kmap_local(). Use set_pte() like the original MIPS highmem implementation did. Link: https://lkml.kernel.org/r/20210112170411.187513575@linutronix.de Fixes: a4c33e83bca1 ("mips/mm/highmem: Switch to generic kmap atomic") Signed-off-by: Thomas Gleixner Reported-by: Paul Cercueil Reported-by: Thomas Bogendoerfer Acked-by: Thomas Bogendoerfer Cc: Andreas Larsson Cc: "David S. Miller" Cc: Michael Ellerman Cc: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a1dce7fd2ade8e71e5f95e58b99aa512607f52b0 Author: Thomas Gleixner Date: Sat Jan 23 21:02:02 2021 -0800 mm/highmem: prepare for overriding set_pte_at() The generic kmap_local() map function uses set_pte_at(), but MIPS requires set_pte() and PowerPC wants __set_pte_at(). Provide arch_kmap_local_set_pte() and default it to set_pte_at(). Link: https://lkml.kernel.org/r/20210112170411.056306194@linutronix.de Signed-off-by: Thomas Gleixner Cc: Andreas Larsson Cc: "David S. Miller" Cc: Michael Ellerman Cc: Paul Cercueil Cc: Peter Zijlstra Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f99e02372af2e7ee72a6da497712ec9152964347 Author: Thomas Gleixner Date: Sat Jan 23 21:01:57 2021 -0800 sparc/mm/highmem: flush cache and TLB Patch series "mm/highmem: Fix fallout from generic kmap_local conversions". The kmap_local conversion wreckaged sparc, mips and powerpc as it missed some of the details in the original implementation. This patch (of 4): The recent conversion to the generic kmap_local infrastructure failed to assign the proper pre/post map/unmap flush operations for sparc. Sparc requires cache flush before map/unmap and tlb flush afterwards. Link: https://lkml.kernel.org/r/20210112170136.078559026@linutronix.de Link: https://lkml.kernel.org/r/20210112170410.905976187@linutronix.de Fixes: 3293efa97807 ("sparc/mm/highmem: Switch to generic kmap atomic") Signed-off-by: Thomas Gleixner Reported-by: Andreas Larsson Cc: "David S. Miller" Cc: Peter Zijlstra Cc: Paul Cercueil Cc: Thomas Bogendoerfer Cc: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dad4e5b390866ca902653df0daa864ae4b8d4147 Author: Dan Williams Date: Sat Jan 23 21:01:52 2021 -0800 mm: fix page reference leak in soft_offline_page() The conversion to move pfn_to_online_page() internal to soft_offline_page() missed that the get_user_pages() reference taken by the madvise() path needs to be dropped when pfn_to_online_page() fails. Note the direct sysfs-path to soft_offline_page() does not perform a get_user_pages() lookup. When soft_offline_page() is handed a pfn_valid() && !pfn_to_online_page() pfn the kernel hangs at dax-device shutdown due to a leaked reference. Link: https://lkml.kernel.org/r/161058501210.1840162.8108917599181157327.stgit@dwillia2-desk3.amr.corp.intel.com Fixes: feec24a6139d ("mm, soft-offline: convert parameter to pfn") Signed-off-by: Dan Williams Reviewed-by: David Hildenbrand Reviewed-by: Oscar Salvador Reviewed-by: Naoya Horiguchi Cc: Michal Hocko Cc: Qian Cai Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 251b5497c5c95e4548e3d33cbda3f638fea2c11e Author: Arnd Bergmann Date: Sat Jan 23 21:01:48 2021 -0800 ubsan: disable unsigned-overflow check for i386 Building ubsan kernels even for compile-testing introduced these warnings in my randconfig environment: crypto/blake2b_generic.c:98:13: error: stack frame size of 9636 bytes in function 'blake2b_compress' [-Werror,-Wframe-larger-than=] static void blake2b_compress(struct blake2b_state *S, crypto/sha512_generic.c:151:13: error: stack frame size of 1292 bytes in function 'sha512_generic_block_fn' [-Werror,-Wframe-larger-than=] static void sha512_generic_block_fn(struct sha512_state *sst, u8 const *src, lib/crypto/curve25519-fiat32.c:312:22: error: stack frame size of 2180 bytes in function 'fe_mul_impl' [-Werror,-Wframe-larger-than=] static noinline void fe_mul_impl(u32 out[10], const u32 in1[10], const u32 in2[10]) lib/crypto/curve25519-fiat32.c:444:22: error: stack frame size of 1588 bytes in function 'fe_sqr_impl' [-Werror,-Wframe-larger-than=] static noinline void fe_sqr_impl(u32 out[10], const u32 in1[10]) Further testing showed that this is caused by -fsanitize=unsigned-integer-overflow, but is isolated to the 32-bit x86 architecture. The one in blake2b immediately overflows the 8KB stack area architectures, so better ensure this never happens by disabling the option for 32-bit x86. Link: https://lkml.kernel.org/r/20210112202922.2454435-1-arnd@kernel.org Link: https://lore.kernel.org/lkml/20201230154749.746641-1-arnd@kernel.org/ Fixes: d0a3ac549f38 ("ubsan: enable for all*config builds") Signed-off-by: Arnd Bergmann Acked-by: Kees Cook Reviewed-by: Nathan Chancellor Cc: Nick Desaulniers Cc: Stephen Rothwell Cc: Marco Elver Cc: George Popescu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit acb35b177c71d3d39b9a3b9ea213d926235066e3 Author: Andrey Konovalov Date: Sat Jan 23 21:01:43 2021 -0800 kasan, mm: fix resetting page_alloc tags for HW_TAGS A previous commit added resetting KASAN page tags to kernel_init_free_pages() to avoid false-positives due to accesses to metadata with the hardware tag-based mode. That commit did reset page tags before the metadata access, but didn't restore them after. As the result, KASAN fails to detect bad accesses to page_alloc allocations on some configurations. Fix this by recovering the tag after the metadata access. Link: https://lkml.kernel.org/r/02b5bcd692e912c27d484030f666b350ad7e4ae4.1611074450.git.andreyknvl@google.com Fixes: aa1ef4d7b3f6 ("kasan, mm: reset tags when accessing metadata") Signed-off-by: Andrey Konovalov Cc: Dmitry Vyukov Cc: Alexander Potapenko Cc: Marco Elver Cc: Catalin Marinas Cc: Will Deacon Cc: Vincenzo Frascino Cc: Andrey Ryabinin Cc: Peter Collingbourne Cc: Evgenii Stepanov Cc: Branislav Rankov Cc: Kevin Brodsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ce5716c618524241a3cea821e18ee1e0d16f6c70 Author: Andrey Konovalov Date: Sat Jan 23 21:01:38 2021 -0800 kasan, mm: fix conflicts with init_on_alloc/free A few places where SLUB accesses object's data or metadata were missed in a previous patch. This leads to false positives with hardware tag-based KASAN when bulk allocations are used with init_on_alloc/free. Fix the false-positives by resetting pointer tags during these accesses. (The kasan_reset_tag call is removed from slab_alloc_node, as it's added into maybe_wipe_obj_freeptr.) Link: https://linux-review.googlesource.com/id/I50dd32838a666e173fe06c3c5c766f2c36aae901 Link: https://lkml.kernel.org/r/093428b5d2ca8b507f4a79f92f9929b35f7fada7.1610731872.git.andreyknvl@google.com Fixes: aa1ef4d7b3f67 ("kasan, mm: reset tags when accessing metadata") Signed-off-by: Andrey Konovalov Reported-by: Dmitry Vyukov Acked-by: Vlastimil Babka Cc: Catalin Marinas Cc: Vincenzo Frascino Cc: Alexander Potapenko Cc: Marco Elver Cc: Will Deacon Cc: Andrey Ryabinin Cc: Peter Collingbourne Cc: Evgenii Stepanov Cc: Branislav Rankov Cc: Kevin Brodsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 76bc99e81a7cb78a78e058107e4b5b1d8ed3c874 Author: Andrey Konovalov Date: Sat Jan 23 21:01:34 2021 -0800 kasan: fix HW_TAGS boot parameters The initially proposed KASAN command line parameters are redundant. This change drops the complex "kasan.mode=off/prod/full" parameter and adds a simpler kill switch "kasan=off/on" instead. The new parameter together with the already existing ones provides a cleaner way to express the same set of features. The full set of parameters with this change: kasan=off/on - whether KASAN is enabled kasan.fault=report/panic - whether to only print a report or also panic kasan.stacktrace=off/on - whether to collect alloc/free stack traces Default values: kasan=on kasan.fault=report kasan.stacktrace=on (if CONFIG_DEBUG_KERNEL=y) kasan.stacktrace=off (otherwise) Link: https://linux-review.googlesource.com/id/Ib3694ed90b1e8ccac6cf77dfd301847af4aba7b8 Link: https://lkml.kernel.org/r/4e9c4a4bdcadc168317deb2419144582a9be6e61.1610736745.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Vincenzo Frascino Reviewed-by: Marco Elver Cc: Dmitry Vyukov Cc: Alexander Potapenko Cc: Catalin Marinas Cc: Will Deacon Cc: Andrey Ryabinin Cc: Peter Collingbourne Cc: Evgenii Stepanov Cc: Branislav Rankov Cc: Kevin Brodsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5dabd1712cd056814f9ab15f1d68157ceb04e741 Author: Lecopzer Chen Date: Sat Jan 23 21:01:29 2021 -0800 kasan: fix incorrect arguments passing in kasan_add_zero_shadow kasan_remove_zero_shadow() shall use original virtual address, start and size, instead of shadow address. Link: https://lkml.kernel.org/r/20210103063847.5963-1-lecopzer@gmail.com Fixes: 0207df4fa1a86 ("kernel/memremap, kasan: make ZONE_DEVICE with work with KASAN") Signed-off-by: Lecopzer Chen Reviewed-by: Andrey Konovalov Cc: Andrey Ryabinin Cc: Dan Williams Cc: Dmitry Vyukov Cc: Alexander Potapenko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a11a496ee6e2ab6ed850233c96b94caf042af0b9 Author: Lecopzer Chen Date: Sat Jan 23 21:01:25 2021 -0800 kasan: fix unaligned address is unhandled in kasan_remove_zero_shadow During testing kasan_populate_early_shadow and kasan_remove_zero_shadow, if the shadow start and end address in kasan_remove_zero_shadow() is not aligned to PMD_SIZE, the remain unaligned PTE won't be removed. In the test case for kasan_remove_zero_shadow(): shadow_start: 0xffffffb802000000, shadow end: 0xffffffbfbe000000 3-level page table: PUD_SIZE: 0x40000000 PMD_SIZE: 0x200000 PAGE_SIZE: 4K 0xffffffbf80000000 ~ 0xffffffbfbdf80000 will not be removed because in kasan_remove_pud_table(), kasan_pmd_table(*pud) is true but the next address is 0xffffffbfbdf80000 which is not aligned to PUD_SIZE. In the correct condition, this should fallback to the next level kasan_remove_pmd_table() but the condition flow always continue to skip the unaligned part. Fix by correcting the condition when next and addr are neither aligned. Link: https://lkml.kernel.org/r/20210103135621.83129-1-lecopzer@gmail.com Fixes: 0207df4fa1a86 ("kernel/memremap, kasan: make ZONE_DEVICE with work with KASAN") Signed-off-by: Lecopzer Chen Cc: Andrey Ryabinin Cc: Dan Williams Cc: Dmitry Vyukov Cc: Alexander Potapenko Cc: YJ Chiang Cc: Andrey Konovalov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e68061375f792af245fefbc13e3e078fa92d3539 Merge: 32d43270ca0bb ce09ccc50208c Author: Linus Torvalds Date: Sun Jan 24 10:24:20 2021 -0800 Merge tag 'irq_urgent_for_v5.11_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Borislav Petkov: - Fix a kernel panic in mips-cpu due to invalid irq domain hierarchy. - Fix to not lose IPIs on bcm2836. - Fix for a bogus marking of ITS devices as shared due to unitialized stack variable. - Clear a phantom interrupt on qcom-pdc to unblock suspend. - Small cleanups, warning and build fixes. * tag 'irq_urgent_for_v5.11_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq: Export irq_check_status_bit() irqchip/mips-cpu: Set IPI domain parent chip irqchip/pruss: Simplify the TI_PRUSS_INTC Kconfig irqchip/loongson-liointc: Fix build warnings driver core: platform: Add extra error check in devm_platform_get_irqs_affinity() irqchip/bcm2836: Fix IPI acknowledgement after conversion to handle_percpu_devid_irq irqchip/irq-sl28cpld: Convert comma to semicolon genirq/msi: Initialize msi_alloc_info before calling msi_domain_prepare_irqs() commit 32d43270ca0bbb6240369a3cdecc3f3d43acbd29 Merge: 24c56ee06c4d4 1d489151e9f9d Author: Linus Torvalds Date: Sun Jan 24 10:17:03 2021 -0800 Merge tag 'objtool_urgent_for_v5.11_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool fixes from Borislav Petkov: - Adjust objtool to handle a recent binutils change to not generate unused symbols anymore. - Revert the fail-the-build-on-fatal-errors objtool strategy for now due to the ever-increasing matrix of supported toolchains/plugins and them causing too many such fatal errors currently. - Do not add empty symbols to objdump's rbtree to accommodate clang removing section symbols. * tag 'objtool_urgent_for_v5.11_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool: Don't fail on missing symbol table objtool: Don't fail the kernel build on fatal errors objtool: Don't add empty symbols to the rbtree commit 24c56ee06c4d4b410ac1d248869c14e391d66b8c Merge: 025929f46813c 741ba80f6f9a4 Author: Linus Torvalds Date: Sun Jan 24 10:09:20 2021 -0800 Merge tag 'sched_urgent_for_v5.11_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Borislav Petkov: - Correct the marking of kthreads which are supposed to run on a specific, single CPU vs such which are affine to only one CPU, mark per-cpu workqueue threads as such and make sure that marking "survives" CPU hotplug. Fix CPU hotplug issues with such kthreads. - A fix to not push away tasks on CPUs coming online. - Have workqueue CPU hotplug code use cpu_possible_mask when breaking affinity on CPU offlining so that pending workers can finish on newly arrived onlined CPUs too. - Dump tasks which haven't vacated a CPU which is currently being unplugged. - Register a special scale invariance callback which gets called on resume from RAM to read out APERF/MPERF after resume and thus make the schedutil scaling governor more precise. * tag 'sched_urgent_for_v5.11_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched: Relax the set_cpus_allowed_ptr() semantics sched: Fix CPU hotplug / tighten is_per_cpu_kthread() sched: Prepare to use balance_push in ttwu() workqueue: Restrict affinity change to rescuer workqueue: Tag bound workers with KTHREAD_IS_PER_CPU kthread: Extract KTHREAD_IS_PER_CPU sched: Don't run cpu-online with balance_push() enabled workqueue: Use cpu_possible_mask instead of cpu_active_mask to break affinity sched/core: Print out straggler tasks in sched_cpu_dying() x86: PM: Register syscore_ops for scale invariance commit 025929f46813c572d4ef0b379c704bf664e8a7a3 Merge: 17b6c49da37f5 e3fab2f3de081 Author: Linus Torvalds Date: Sun Jan 24 09:58:38 2021 -0800 Merge tag 'timers_urgent_for_v5.11_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fixes from Borislav Petkov: - Fix an integer overflow in the NTP RTC synchronization which led to the latter happening every 2 seconds instead of the intended every 11 minutes. - Get rid of now unused get_seconds(). * tag 'timers_urgent_for_v5.11_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: ntp: Fix RTC synchronization on 32-bit platforms timekeeping: Remove unused get_seconds() commit 17b6c49da37f5d57d76bf352d32b0ac498e7c133 Merge: 14c50a6618385 6e1239c13953f Author: Linus Torvalds Date: Sun Jan 24 09:46:05 2021 -0800 Merge tag 'x86_urgent_for_v5.11_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Borislav Petkov: - Add a new Intel model number for Alder Lake - Differentiate which aspects of the FPU state get saved/restored when the FPU is used in-kernel and fix a boot crash on K7 due to early MXCSR access before CR4.OSFXSR is even set. - A couple of noinstr annotation fixes - Correct die ID setting on AMD for users of topology information which need the correct die ID - A SEV-ES fix to handle string port IO to/from kernel memory properly * tag 'x86_urgent_for_v5.11_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/cpu: Add another Alder Lake CPU to the Intel family x86/mmx: Use KFPU_387 for MMX string operations x86/fpu: Add kernel_fpu_begin_mask() to selectively initialize state x86/topology: Make __max_die_per_package available unconditionally x86: __always_inline __{rd,wr}msr() x86/mce: Remove explicit/superfluous tracing locking/lockdep: Avoid noinstr warning for DEBUG_LOCKDEP locking/lockdep: Cure noinstr fail x86/sev: Fix nonistr violation x86/entry: Fix noinstr fail x86/cpu/amd: Set __max_die_per_package on AMD x86/sev-es: Handle string port IO to kernel memory properly commit 14c50a66183856672d822f25dbb73ad26d1e8f11 Merge: c509ce2378e19 08685be7761d6 Author: Linus Torvalds Date: Sun Jan 24 09:40:51 2021 -0800 Merge tag 'powerpc-5.11-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - Fix a bad interaction between the scv handling and the fallback L1D flush, which could lead to user register corruption. Only affects people using scv (~no one) on machines with old firmware that are missing the L1D flush. - Two small selftest fixes. Thanks to Eirik Fuller, Libor Pechacek, Nicholas Piggin, Sandipan Das, and Tulio Magno Quites Machado Filho. * tag 'powerpc-5.11-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/64s: fix scv entry fallback flush vs interrupt selftests/powerpc: Only test lwm/stmw on big endian selftests/powerpc: Fix exit status of pkey tests commit c509ce2378e196758095c292f7a1df826d971796 Merge: 4dcd3bcc2063a cb5021ca622fe Author: Linus Torvalds Date: Sun Jan 24 09:35:28 2021 -0800 Merge tag 'for-linus-2021-01-24' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux Pull misc fixes from Christian Brauner: - Jann reported sparse complaints because of a missing __user annotation in a helper we added way back when we added pidfd_send_signal() to avoid compat syscall handling. Fix it. - Yanfei replaces a reference in a comment to the _do_fork() helper I removed a while ago with a reference to the new kernel_clone() replacement - Alexander Guril added a simple coding style fix * tag 'for-linus-2021-01-24' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux: kthread: remove comments about old _do_fork() helper Kernel: fork.c: Fix coding style: Do not use {} around single-line statements signal: Add missing __user annotation to copy_siginfo_from_user_any commit 4dcd3bcc2063ad7bda2e84bd417f2f536e4c14ef Merge: e1ae4b0be1589 214a5ea081e77 Author: Linus Torvalds Date: Sun Jan 24 09:27:14 2021 -0800 Merge tag '5.11-rc4-smb3' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "An important signal handling patch for stable, and two small cleanup patches" * tag '5.11-rc4-smb3' of git://git.samba.org/sfrench/cifs-2.6: cifs: do not fail __smb_send_rqst if non-fatal signals are pending fs/cifs: Simplify bool comparison. fs/cifs: Assign boolean values to a bool variable commit 5c447d274f3746fbed6e695e7b9a2d7bd8b31b71 Author: Shakeel Butt Date: Sat Jan 23 21:01:15 2021 -0800 mm: fix numa stats for thp migration Currently the kernel is not correctly updating the numa stats for NR_FILE_PAGES and NR_SHMEM on THP migration. Fix that. For NR_FILE_DIRTY and NR_ZONE_WRITE_PENDING, although at the moment there is no need to handle THP migration as kernel still does not have write support for file THP but to be more future proof, this patch adds the THP support for those stats as well. Link: https://lkml.kernel.org/r/20210108155813.2914586-2-shakeelb@google.com Fixes: e71769ae52609 ("mm: enable thp migration for shmem thp") Signed-off-by: Shakeel Butt Acked-by: Yang Shi Reviewed-by: Roman Gushchin Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8a8792f600abacd7e1b9bb667759dca1c153f64c Author: Shakeel Butt Date: Sat Jan 23 21:01:11 2021 -0800 mm: memcg: fix memcg file_dirty numa stat The kernel updates the per-node NR_FILE_DIRTY stats on page migration but not the memcg numa stats. That was not an issue until recently the commit 5f9a4f4a7096 ("mm: memcontrol: add the missing numa_stat interface for cgroup v2") exposed numa stats for the memcg. So fix the file_dirty per-memcg numa stat. Link: https://lkml.kernel.org/r/20210108155813.2914586-1-shakeelb@google.com Fixes: 5f9a4f4a7096 ("mm: memcontrol: add the missing numa_stat interface for cgroup v2") Signed-off-by: Shakeel Butt Reviewed-by: Muchun Song Acked-by: Yang Shi Reviewed-by: Roman Gushchin Cc: Johannes Weiner Cc: Michal Hocko Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3de7d4f25a7438f09fef4e71ef111f1805cd8e7c Author: Roman Gushchin Date: Sat Jan 23 21:01:07 2021 -0800 mm: memcg/slab: optimize objcg stock draining Imran Khan reported a 16% regression in hackbench results caused by the commit f2fe7b09a52b ("mm: memcg/slab: charge individual slab objects instead of pages"). The regression is noticeable in the case of a consequent allocation of several relatively large slab objects, e.g. skb's. As soon as the amount of stocked bytes exceeds PAGE_SIZE, drain_obj_stock() and __memcg_kmem_uncharge() are called, and it leads to a number of atomic operations in page_counter_uncharge(). The corresponding call graph is below (provided by Imran Khan): |__alloc_skb | | | |__kmalloc_reserve.isra.61 | | | | | |__kmalloc_node_track_caller | | | | | | | |slab_pre_alloc_hook.constprop.88 | | | obj_cgroup_charge | | | | | | | | | |__memcg_kmem_charge | | | | | | | | | | | |page_counter_try_charge | | | | | | | | | |refill_obj_stock | | | | | | | | | | | |drain_obj_stock.isra.68 | | | | | | | | | | | | | |__memcg_kmem_uncharge | | | | | | | | | | | | | | | |page_counter_uncharge | | | | | | | | | | | | | | | | | |page_counter_cancel | | | | | | | | | | | |__slab_alloc | | | | | | | | | |___slab_alloc | | | | | | | | |slab_post_alloc_hook Instead of directly uncharging the accounted kernel memory, it's possible to refill the generic page-sized per-cpu stock instead. It's a much faster operation, especially on a default hierarchy. As a bonus, __memcg_kmem_uncharge_page() will also get faster, so the freeing of page-sized kernel allocations (e.g. large kmallocs) will become faster. A similar change has been done earlier for the socket memory by the commit 475d0487a2ad ("mm: memcontrol: use per-cpu stocks for socket memory uncharging"). Link: https://lkml.kernel.org/r/20210106042239.2860107-1-guro@fb.com Fixes: f2fe7b09a52b ("mm: memcg/slab: charge individual slab objects instead of pages") Signed-off-by: Roman Gushchin Reported-by: Imran Khan Tested-by: Imran Khan Reviewed-by: Shakeel Butt Reviewed-by: Michal Koutn Cc: Michal Koutný Cc: Johannes Weiner Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d3921cb8be29ce5668c64e23ffdaeec5f8c69399 Author: Mike Rapoport Date: Sat Jan 23 21:01:02 2021 -0800 mm: fix initialization of struct page for holes in memory layout There could be struct pages that are not backed by actual physical memory. This can happen when the actual memory bank is not a multiple of SECTION_SIZE or when an architecture does not register memory holes reserved by the firmware as memblock.memory. Such pages are currently initialized using init_unavailable_mem() function that iterates through PFNs in holes in memblock.memory and if there is a struct page corresponding to a PFN, the fields if this page are set to default values and the page is marked as Reserved. init_unavailable_mem() does not take into account zone and node the page belongs to and sets both zone and node links in struct page to zero. On a system that has firmware reserved holes in a zone above ZONE_DMA, for instance in a configuration below: # grep -A1 E820 /proc/iomem 7a17b000-7a216fff : Unknown E820 type 7a217000-7bffffff : System RAM unset zone link in struct page will trigger VM_BUG_ON_PAGE(!zone_spans_pfn(page_zone(page), pfn), page); because there are pages in both ZONE_DMA32 and ZONE_DMA (unset zone link in struct page) in the same pageblock. Update init_unavailable_mem() to use zone constraints defined by an architecture to properly setup the zone link and use node ID of the adjacent range in memblock.memory to set the node link. Link: https://lkml.kernel.org/r/20210111194017.22696-3-rppt@kernel.org Fixes: 73a6e474cb37 ("mm: memmap_init: iterate over memblock regions rather that check each PFN") Signed-off-by: Mike Rapoport Reported-by: Andrea Arcangeli Cc: Andrea Arcangeli Cc: Baoquan He Cc: Borislav Petkov Cc: David Hildenbrand Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Mel Gorman Cc: Michal Hocko Cc: Qian Cai Cc: Thomas Gleixner Cc: Vlastimil Babka Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bde9cfa3afe4324ec251e4af80ebf9b7afaf7afe Author: Mike Rapoport Date: Sat Jan 23 21:00:57 2021 -0800 x86/setup: don't remove E820_TYPE_RAM for pfn 0 Patch series "mm: fix initialization of struct page for holes in memory layout", v3. Commit 73a6e474cb37 ("mm: memmap_init: iterate over memblock regions rather that check each PFN") exposed several issues with the memory map initialization and these patches fix those issues. Initially there were crashes during compaction that Qian Cai reported back in April [1]. It seemed back then that the problem was fixed, but a few weeks ago Andrea Arcangeli hit the same bug [2] and there was an additional discussion at [3]. [1] https://lore.kernel.org/lkml/8C537EB7-85EE-4DCF-943E-3CC0ED0DF56D@lca.pw [2] https://lore.kernel.org/lkml/20201121194506.13464-1-aarcange@redhat.com [3] https://lore.kernel.org/mm-commits/20201206005401.qKuAVgOXr%akpm@linux-foundation.org This patch (of 2): The first 4Kb of memory is a BIOS owned area and to avoid its allocation for the kernel it was not listed in e820 tables as memory. As the result, pfn 0 was never recognised by the generic memory management and it is not a part of neither node 0 nor ZONE_DMA. If set_pfnblock_flags_mask() would be ever called for the pageblock corresponding to the first 2Mbytes of memory, having pfn 0 outside of ZONE_DMA would trigger VM_BUG_ON_PAGE(!zone_spans_pfn(page_zone(page), pfn), page); Along with reserving the first 4Kb in e820 tables, several first pages are reserved with memblock in several places during setup_arch(). These reservations are enough to ensure the kernel does not touch the BIOS area and it is not necessary to remove E820_TYPE_RAM for pfn 0. Remove the update of e820 table that changes the type of pfn 0 and move the comment describing why it was done to trim_low_memory_range() that reserves the beginning of the memory. Link: https://lkml.kernel.org/r/20210111194017.22696-2-rppt@kernel.org Signed-off-by: Mike Rapoport Cc: Baoquan He Cc: Borislav Petkov Cc: David Hildenbrand Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Mel Gorman Cc: Michal Hocko Cc: Qian Cai Cc: Thomas Gleixner Cc: Vlastimil Babka Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 02a13674fa0e8dd326de8b9f4514b41b03d99003 Author: Jens Axboe Date: Sat Jan 23 15:49:31 2021 -0700 io_uring: account io_uring internal files as REQ_F_INFLIGHT We need to actively cancel anything that introduces a potential circular loop, where io_uring holds a reference to itself. If the file in question is an io_uring file, then add the request to the inflight list. Cc: stable@vger.kernel.org # 5.9+ Signed-off-by: Jens Axboe commit 9d5c8190683a462dbc787658467a0da17011ea5f Author: Pavel Begunkov Date: Sun Jan 24 15:08:14 2021 +0000 io_uring: fix sleeping under spin in __io_clean_op [ 27.629441] BUG: sleeping function called from invalid context at fs/file.c:402 [ 27.631317] in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 1012, name: io_wqe_worker-0 [ 27.633220] 1 lock held by io_wqe_worker-0/1012: [ 27.634286] #0: ffff888105e26c98 (&ctx->completion_lock) {....}-{2:2}, at: __io_req_complete.part.102+0x30/0x70 [ 27.649249] Call Trace: [ 27.649874] dump_stack+0xac/0xe3 [ 27.650666] ___might_sleep+0x284/0x2c0 [ 27.651566] put_files_struct+0xb8/0x120 [ 27.652481] __io_clean_op+0x10c/0x2a0 [ 27.653362] __io_cqring_fill_event+0x2c1/0x350 [ 27.654399] __io_req_complete.part.102+0x41/0x70 [ 27.655464] io_openat2+0x151/0x300 [ 27.656297] io_issue_sqe+0x6c/0x14e0 [ 27.660991] io_wq_submit_work+0x7f/0x240 [ 27.662890] io_worker_handle_work+0x501/0x8a0 [ 27.664836] io_wqe_worker+0x158/0x520 [ 27.667726] kthread+0x134/0x180 [ 27.669641] ret_from_fork+0x1f/0x30 Instead of cleaning files on overflow, return back overflow cancellation into io_uring_cancel_files(). Previously it was racy to clean REQ_F_OVERFLOW flag, but we got rid of it, and can do it through repetitive attempts targeting all matching requests. Reported-by: Abaci Reported-by: Joseph Qi Cc: Xiaoguang Wang Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 4025c784c573cab7e3f84746cc82b8033923ec62 Author: Nicholas Piggin Date: Sat Jan 23 16:12:44 2021 +1000 powerpc/64s: prevent recursive replay_soft_interrupts causing superfluous interrupt When an asynchronous interrupt calls irq_exit, it checks for softirqs that may have been created, and runs them. Running softirqs enables local irqs, which can replay pending interrupts causing recursion in replay_soft_interrupts. This abridged trace shows how this can occur: ! NIP replay_soft_interrupts LR interrupt_exit_kernel_prepare Call Trace: interrupt_exit_kernel_prepare (unreliable) interrupt_return --- interrupt: ea0 at __rb_reserve_next NIP __rb_reserve_next LR __rb_reserve_next Call Trace: ring_buffer_lock_reserve trace_function function_trace_call ftrace_call __do_softirq irq_exit timer_interrupt ! replay_soft_interrupts interrupt_exit_kernel_prepare interrupt_return --- interrupt: ea0 at arch_local_irq_restore This can not be prevented easily, because softirqs must not block hard irqs, so it has to be dealt with. The recursion is bounded by design in the softirq code because softirq replay disables softirqs and loops around again to check for new softirqs created while it ran, so that's not a problem. However it does mess up interrupt replay state, causing superfluous interrupts when the second replay_soft_interrupts clears a pending interrupt, leaving it still set in the first call in the 'happened' local variable. Fix this by not caching a copy of irqs_happened across interrupt handler calls. Fixes: 3282a3da25bd ("powerpc/64: Implement soft interrupt replay in C") Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210123061244.2076145-1-npiggin@gmail.com commit 62d9f1a6945ba69c125e548e72a36d203b30596e Author: Pengcheng Yang Date: Sun Jan 24 13:07:14 2021 +0800 tcp: fix TLP timer not set when CA_STATE changes from DISORDER to OPEN Upon receiving a cumulative ACK that changes the congestion state from Disorder to Open, the TLP timer is not set. If the sender is app-limited, it can only wait for the RTO timer to expire and retransmit. The reason for this is that the TLP timer is set before the congestion state changes in tcp_ack(), so we delay the time point of calling tcp_set_xmit_timer() until after tcp_fastretrans_alert() returns and remove the FLAG_SET_XMIT_TIMER from ack_flag when the RACK reorder timer is set. This commit has two additional benefits: 1) Make sure to reset RTO according to RFC6298 when receiving ACK, to avoid spurious RTO caused by RTO timer early expires. 2) Reduce the xmit timer reschedule once per ACK when the RACK reorder timer is set. Fixes: df92c8394e6e ("tcp: fix xmit timer to only be reset if data ACKed/SACKed") Link: https://lore.kernel.org/netdev/1611311242-6675-1-git-send-email-yangpc@wangsu.com Signed-off-by: Pengcheng Yang Acked-by: Neal Cardwell Acked-by: Yuchung Cheng Cc: Eric Dumazet Link: https://lore.kernel.org/r/1611464834-23030-1-git-send-email-yangpc@wangsu.com Signed-off-by: Jakub Kicinski commit 344db93ae3ee69fc137bd6ed89a8ff1bf5b0db08 Author: Enke Chen Date: Fri Jan 22 11:13:06 2021 -0800 tcp: make TCP_USER_TIMEOUT accurate for zero window probes The TCP_USER_TIMEOUT is checked by the 0-window probe timer. As the timer has backoff with a max interval of about two minutes, the actual timeout for TCP_USER_TIMEOUT can be off by up to two minutes. In this patch the TCP_USER_TIMEOUT is made more accurate by taking it into account when computing the timer value for the 0-window probes. This patch is similar to and builds on top of the one that made TCP_USER_TIMEOUT accurate for RTOs in commit b701a99e431d ("tcp: Add tcp_clamp_rto_to_user_timeout() helper to improve accuracy"). Fixes: 9721e709fa68 ("tcp: simplify window probe aborting on USER_TIMEOUT") Signed-off-by: Enke Chen Reviewed-by: Neal Cardwell Signed-off-by: Eric Dumazet Link: https://lore.kernel.org/r/20210122191306.GA99540@localhost.localdomain Signed-off-by: Jakub Kicinski commit 3a30537cee233fb7da302491b28c832247d89bbe Author: Pan Bian Date: Thu Jan 21 07:27:48 2021 -0800 NFC: fix resource leak when target index is invalid Goto to the label put_dev instead of the label error to fix potential resource leak on path that the target index is invalid. Fixes: c4fbb6515a4d ("NFC: The core part should generate the target index") Signed-off-by: Pan Bian Link: https://lore.kernel.org/r/20210121152748.98409-1-bianpan2016@163.com Signed-off-by: Jakub Kicinski commit d8f923c3ab96dbbb4e3c22d1afc1dc1d3b195cd8 Author: Pan Bian Date: Thu Jan 21 07:37:45 2021 -0800 NFC: fix possible resource leak Put the device to avoid resource leak on path that the polling flag is invalid. Fixes: a831b9132065 ("NFC: Do not return EBUSY when stopping a poll that's already stopped") Signed-off-by: Pan Bian Link: https://lore.kernel.org/r/20210121153745.122184-1-bianpan2016@163.com Signed-off-by: Jakub Kicinski commit fc024c5c07aa2463d36e8c85943343741ba356b7 Author: Pali Rohár Date: Thu Jan 21 16:02:44 2021 +0100 doc: networking: ip-sysctl: Document conf/all/disable_ipv6 and conf/default/disable_ipv6 This patch adds documentation for sysctl conf/all/disable_ipv6 and conf/default/disable_ipv6 settings which is currently missing. Signed-off-by: Pali Rohár Link: https://lore.kernel.org/r/20210121150244.20483-1-pali@kernel.org Signed-off-by: Jakub Kicinski commit b6011966ac6f402847eb5326beee8da3a80405c7 Author: Pan Bian Date: Thu Jan 21 06:57:38 2021 -0800 chtls: Fix potential resource leak The dst entry should be released if no neighbour is found. Goto label free_dst to fix the issue. Besides, the check of ndev against NULL is redundant. Signed-off-by: Pan Bian Link: https://lore.kernel.org/r/20210121145738.51091-1-bianpan2016@163.com Signed-off-by: Jakub Kicinski commit cf3c46631e1637582f517a574c77cd6c05793817 Author: Pan Bian Date: Thu Jan 21 04:33:43 2021 -0800 net: dsa: bcm_sf2: put device node before return Put the device node dn before return error code on failure path. Fixes: 461cd1b03e32 ("net: dsa: bcm_sf2: Register our slave MDIO bus") Signed-off-by: Pan Bian Link: https://lore.kernel.org/r/20210121123343.26330-1-bianpan2016@163.com Signed-off-by: Jakub Kicinski commit 853c56b489f30c580b8667f9469049f0e43e7301 Merge: 0607a2cddb60f 6781939054a1a Author: Jakub Kicinski Date: Sat Jan 23 12:34:24 2021 -0800 Merge branch 'fix-and-move-definitions-of-mrp-data-structures' Rasmus Villemoes says: ==================== fix and move definitions of MRP data structures We unnecessarily included packet structures of MRP in a uAPI header. Turns out that some of them were in fact broken due to lack of packing, so let's take this chance to remove them completely. Leave it to user space to create its own, correct definitions. Said structures are not used in the user space <> kernel communication. ==================== Link: https://lore.kernel.org/r/20210121204037.61390-1-rasmus.villemoes@prevas.dk Signed-off-by: Jakub Kicinski commit 6781939054a1a161e06e7a7955a4846be770a711 Author: Rasmus Villemoes Date: Thu Jan 21 21:40:37 2021 +0100 net: mrp: move struct definitions out of uapi None of these are actually used in the kernel/userspace interface - there's a userspace component of implementing MRP, and userspace will need to construct certain frames to put on the wire, but there's no reason the kernel should provide the relevant definitions in a UAPI header. In fact, some of those definitions were broken until previous commit, so only keep the few that are actually referenced in the kernel code, and move them to the br_private_mrp.h header. Signed-off-by: Rasmus Villemoes Signed-off-by: Jakub Kicinski commit dc090de854b9d7fdbc6f4df70bd7fc1b43eeccf8 Author: Rasmus Villemoes Date: Thu Jan 21 21:40:36 2021 +0100 net: mrp: fix definitions of MRP test packets Wireshark says that the MRP test packets cannot be decoded - and the reason for that is that there's a two-byte hole filled with garbage between the "transitions" and "timestamp" members. So Wireshark decodes the two garbage bytes and the top two bytes of the timestamp written by the kernel as the timestamp value (which thus fluctuates wildly), and interprets the lower two bytes of the timestamp as a new (type, length) pair, which is of course broken. Even though this makes the timestamp field in the struct unaligned, it actually makes it end up on a 32 bit boundary in the frame as mandated by the standard, since it is preceded by a two byte TLV header. The struct definitions live under include/uapi/, but they are not really part of any kernel<->userspace API/ABI, so fixing the definitions by adding the packed attribute should not cause any compatibility issues. Signed-off-by: Rasmus Villemoes Reviewed-by: Horatiu Vultur Signed-off-by: Jakub Kicinski commit e1ae4b0be15891faf46d390e9f3dc9bd71a8cae1 Merge: 077e81d51d1fc b135b3358d73a Author: Linus Torvalds Date: Sat Jan 23 12:02:58 2021 -0800 Merge branch 'mtd/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux Pull mtd fixes from Miquel Raynal. * 'mtd/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: mtd: rawnand: omap: Use BCH private fields in the specific OOB layout mtd: spinand: Fix MTD_OPS_AUTO_OOB requests mtd: rawnand: intel: check the mtd name only after setting the variable mtd: rawnand: nandsim: Fix the logic when selecting Hamming soft ECC engine mtd: rawnand: gpmi: fix dst bit offset when extracting raw payload commit 077e81d51d1fce056b361c27b6cddd41e1469b9d Merge: 15cfb0f06db41 9ecd1d2b302b6 Author: Linus Torvalds Date: Sat Jan 23 11:43:02 2021 -0800 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "Another bunch of driver fixes" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: sprd: depend on COMMON_CLK to fix compile tests Revert "i2c: imx: Remove unused .id_table support" i2c: octeon: check correct size of maximum RECV_LEN packet i2c: tegra: Create i2c_writesl_vi() to use with VI I2C for filling TX FIFO i2c: bpmp-tegra: Ignore unknown I2C_M flags i2c: tegra: Wait for config load atomically while in ISR commit 15cfb0f06db41542ba16907a964874ea9cfe99b2 Merge: 929b979611f5d 764907293edc1 Author: Linus Torvalds Date: Sat Jan 23 11:35:02 2021 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Twelve minor fixes, all in drivers or doc. Most of the fixes are pretty obvious (although we had two goes to get the UFS sysfs doc right) and the biggest change is in the ufs driver which they've extensively tested" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: ibmvfc: Set default timeout to avoid crash during migration scsi: target: tcmu: Fix use-after-free of se_cmd->priv scsi: fnic: Fix memleak in vnic_dev_init_devcmd2 scsi: libfc: Avoid invoking response handler twice if ep is already completed scsi: scsi_transport_srp: Don't block target in failfast state scsi: docs: ABI: sysfs-driver-ufs: Rectify table formatting scsi: ufs: Fix tm request when non-fatal error happens scsi: ufs: Fix livelock of ufshcd_clear_ua_wluns() scsi: ibmvfc: Fix missing cast of ibmvfc_event pointer to u64 handle scsi: ufs: ufshcd-pltfrm depends on HAS_IOMEM scsi: megaraid_sas: Fix MEGASAS_IOC_FIRMWARE regression scsi: docs: ABI: sysfs-driver-ufs: Add DeepSleep power mode commit 929b979611f5d2a264a2c1b9fe84baa975828522 Merge: fe75a21824e78 2b8fdbbf1c616 Author: Linus Torvalds Date: Sat Jan 23 11:25:33 2021 -0800 Merge tag 'linux-kselftest-kunit-fixes-5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kunit fixes from Shuah : "Five fixes to the kunit tool and documentation from Daniel Latypov and David Gow" * tag 'linux-kselftest-kunit-fixes-5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: kunit: tool: move kunitconfig parsing into __init__, make it optional kunit: tool: fix minor typing issue with None status kunit: tool: surface and address more typing issues Documentation: kunit: include example of a parameterized test kunit: tool: Fix spelling of "diagnostic" in kunit_parser commit fe773b8711e3be4190994ea54bf7a5a0564245a1 Author: Takashi Iwai Date: Sat Jan 23 16:58:42 2021 +0100 ALSA: usb-audio: workaround for iface reset issue The recently introduced sample rate validation code seems causing a problem on some devices; namely, after performing this, the bus gets screwed and it influences even on other USB devices. As a quick workaround, perform it only for the necessary devices; currently MOTU devices are known to need the valid altset checks, so filter out other devices. Fixes: 93db51d06b32 ("ALSA: usb-audio: Check valid altsetting at parsing rates for UAC2/3") Reported-by: Jamie Heilman BugLink: https://bugzilla.suse.com/show_bug.cgi?id=1178203 Link: https://lore.kernel.org/r/20210123155842.22652-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 23b53d4417426edc7c3078e1c1530c242e496c1e Author: Takashi Iwai Date: Sat Jan 23 16:57:30 2021 +0100 ALSA: pcm: One more dependency for hw constraints The fix for a long-standing USB-audio bug required one more dependency variable to be added to the hw constraints. Unfortunately I didn't realize at debugging that the new addition may result in the overflow of the dependency array of each snd_pcm_hw_rule (up to three plus a sentinel), because USB-audio driver adds one more dependency only for a certain device and bus, hence it works as is for many devices. But in a bad case, a simple open always results in -EINVAL (with kernel WARNING if CONFIG_SND_DEBUG is set) no matter what is passed. Since the dependencies are real and unavoidable (USB-audio restricts the hw_params per looping over the format/rate/channels combos), the only good solution seems to raise the bar for one more dependency for snd_pcm_hw_rule -- so does this patch: now the hw constraint dependencies can be up to four. Fixes: 506c203cc3de ("ALSA: usb-audio: Fix hw constraints dependencies") Reported-by: Jamie Heilman Link: https://lore.kernel.org/r/20210123155730.22576-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit f4c3b83b75b91c5059726cb91e3165cc01764ce7 Author: Masahiro Yamada Date: Sat Jan 23 18:16:30 2021 +0900 kbuild: simplify GCC_PLUGINS enablement in dummy-tools/gcc With commit 1e860048c53e ("gcc-plugins: simplify GCC plugin-dev capability test") applied, this hunk can be way simplified because now scripts/gcc-plugins/Kconfig only checks plugin-version.h Signed-off-by: Masahiro Yamada commit 1cabe74f148f7b99d9f08274a62467f96c870f07 Author: Robert Karszniewicz Date: Fri Jan 22 19:04:13 2021 +0100 Documentation/Kbuild: Remove references to gcc-plugin.sh gcc-plugin.sh has been removed in commit 1e860048c53e ("gcc-plugins: simplify GCC plugin-dev capability test"). Signed-off-by: Robert Karszniewicz Reviewed-by: Kees Cook Signed-off-by: Masahiro Yamada commit 214a5ea081e77346e4963dd6d20c5539ff8b6ae6 Author: Ronnie Sahlberg Date: Thu Jan 21 08:22:48 2021 +1000 cifs: do not fail __smb_send_rqst if non-fatal signals are pending RHBZ 1848178 The original intent of returning an error in this function in the patch: "CIFS: Mask off signals when sending SMB packets" was to avoid interrupting packet send in the middle of sending the data (and thus breaking an SMB connection), but we also don't want to fail the request for non-fatal signals even before we have had a chance to try to send it (the reported problem could be reproduced e.g. by exiting a child process when the parent process was in the midst of calling futimens to update a file's timestamps). In addition, since the signal may remain pending when we enter the sending loop, we may end up not sending the whole packet before TCP buffers become full. In this case the code returns -EINTR but what we need here is to return -ERESTARTSYS instead to allow system calls to be restarted. Fixes: b30c74c73c78 ("CIFS: Mask off signals when sending SMB packets") Cc: stable@vger.kernel.org # v5.1+ Signed-off-by: Ronnie Sahlberg Reviewed-by: Pavel Shilovsky Signed-off-by: Steve French commit 336e8eb2a3cfe2285c314cd85630076da365f6c6 Author: Guo Ren Date: Thu Jan 21 14:31:17 2021 +0800 riscv: Fixup pfn_valid error with wrong max_mapnr The max_mapnr is the number of PFNs, not absolute PFN offset. Signed-off-by: Guo Ren Fixes: d0d8aae64566 ("RISC-V: Set maximum number of mapped pages correctly") Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt commit 0607a2cddb60f4548b55e28ac56a8d73493a45bb Author: Pan Bian Date: Wed Jan 20 04:20:37 2021 -0800 net: fec: put child node on error path Also decrement the reference count of child device on error path. Fixes: 3e782985cb3c ("net: ethernet: fec: Allow configuration of MDIO bus speed") Signed-off-by: Pan Bian Link: https://lore.kernel.org/r/20210120122037.83897-1-bianpan2016@163.com Signed-off-by: Jakub Kicinski commit 3765d86ffcd346913c372d69cdc05dc8d56119ac Author: Pan Bian Date: Wed Jan 20 03:07:44 2021 -0800 net: stmmac: dwmac-intel-plat: remove config data on error Remove the config data when rate setting fails. Fixes: 9efc9b2b04c7 ("net: stmmac: Add dwmac-intel-plat for GBE driver") Signed-off-by: Pan Bian Link: https://lore.kernel.org/r/20210120110745.36412-1-bianpan2016@163.com Signed-off-by: Jakub Kicinski commit db2805150a0f27c00ad286a29109397a7723adad Author: Kevin Hao Date: Thu Jan 21 15:09:06 2021 +0800 net: octeontx2: Make sure the buffer is 128 byte aligned The octeontx2 hardware needs the buffer to be 128 byte aligned. But in the current implementation of napi_alloc_frag(), it can't guarantee the return address is 128 byte aligned even the request size is a multiple of 128 bytes, so we have to request an extra 128 bytes and use the PTR_ALIGN() to make sure that the buffer is aligned correctly. Fixes: 7a36e4918e30 ("octeontx2-pf: Use the napi_alloc_frag() to alloc the pool buffers") Reported-by: Subbaraya Sundeep Signed-off-by: Kevin Hao Tested-by: Subbaraya Sundeep Link: https://lore.kernel.org/r/20210121070906.25380-1-haokexin@gmail.com Signed-off-by: Jakub Kicinski commit 7e0e63d09516e96994c879f07c5a3c3269d7015e Author: Giacinto Cifelli Date: Wed Jan 20 05:56:50 2021 +0100 net: usb: qmi_wwan: added support for Thales Cinterion PLSx3 modem family Bus 003 Device 009: ID 1e2d:006f Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 ? bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 idVendor 0x1e2d idProduct 0x006f bcdDevice 0.00 iManufacturer 3 Cinterion Wireless Modules iProduct 2 PLSx3 iSerial 4 fa3c1419 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 303 bNumInterfaces 9 bConfigurationValue 1 iConfiguration 1 Cinterion Configuration bmAttributes 0xe0 Self Powered Remote Wakeup MaxPower 500mA Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 0 bInterfaceCount 2 bFunctionClass 2 Communications bFunctionSubClass 2 Abstract (modem) bFunctionProtocol 1 AT-commands (v.25ter) iFunction 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 2 Communications bInterfaceSubClass 2 Abstract (modem) bInterfaceProtocol 1 AT-commands (v.25ter) iInterface 0 CDC Header: bcdCDC 1.10 CDC ACM: bmCapabilities 0x02 line coding and serial state CDC Call Management: bmCapabilities 0x03 call management use DataInterface bDataInterface 1 CDC Union: bMasterInterface 0 bSlaveInterface 1 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 5 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 10 CDC Data bInterfaceSubClass 0 Unused bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x01 EP 1 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 2 bInterfaceCount 2 bFunctionClass 2 Communications bFunctionSubClass 2 Abstract (modem) bFunctionProtocol 1 AT-commands (v.25ter) iFunction 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 2 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 2 Communications bInterfaceSubClass 2 Abstract (modem) bInterfaceProtocol 1 AT-commands (v.25ter) iInterface 0 CDC Header: bcdCDC 1.10 CDC ACM: bmCapabilities 0x02 line coding and serial state CDC Call Management: bmCapabilities 0x03 call management use DataInterface bDataInterface 3 CDC Union: bMasterInterface 2 bSlaveInterface 3 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 5 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 10 CDC Data bInterfaceSubClass 0 Unused bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x84 EP 4 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 4 bInterfaceCount 2 bFunctionClass 2 Communications bFunctionSubClass 2 Abstract (modem) bFunctionProtocol 1 AT-commands (v.25ter) iFunction 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 4 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 2 Communications bInterfaceSubClass 2 Abstract (modem) bInterfaceProtocol 1 AT-commands (v.25ter) iInterface 0 CDC Header: bcdCDC 1.10 CDC ACM: bmCapabilities 0x02 line coding and serial state CDC Call Management: bmCapabilities 0x03 call management use DataInterface bDataInterface 5 CDC Union: bMasterInterface 4 bSlaveInterface 5 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x85 EP 5 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 5 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 5 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 10 CDC Data bInterfaceSubClass 0 Unused bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x86 EP 6 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x03 EP 3 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 6 bInterfaceCount 2 bFunctionClass 2 Communications bFunctionSubClass 2 Abstract (modem) bFunctionProtocol 1 AT-commands (v.25ter) iFunction 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 6 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 2 Communications bInterfaceSubClass 2 Abstract (modem) bInterfaceProtocol 1 AT-commands (v.25ter) iInterface 0 CDC Header: bcdCDC 1.10 CDC ACM: bmCapabilities 0x02 line coding and serial state CDC Call Management: bmCapabilities 0x03 call management use DataInterface bDataInterface 7 CDC Union: bMasterInterface 6 bSlaveInterface 7 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x87 EP 7 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 5 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 7 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 10 CDC Data bInterfaceSubClass 0 Unused bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x88 EP 8 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x04 EP 4 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 8 bAlternateSetting 0 bNumEndpoints 3 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 255 Vendor Specific Subclass bInterfaceProtocol 255 Vendor Specific Protocol iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x89 EP 9 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 5 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x8a EP 10 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x05 EP 5 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Device Qualifier (for other device speed): bLength 10 bDescriptorType 6 bcdUSB 2.00 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 ? bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 bNumConfigurations 1 Device Status: 0x0000 (Bus Powered) Cc: stable@vger.kernel.org Signed-off-by: Giacinto Cifelli Acked-by: Bjørn Mork Link: https://lore.kernel.org/r/20210120045650.10855-1-gciofono@gmail.com Signed-off-by: Jakub Kicinski commit e49c24c8cd00ea9d7471520fff562fb4e7e9f61a Merge: 68e89bc868e19 82c082784e03a Author: Arnd Bergmann Date: Fri Jan 22 23:52:41 2021 +0100 Merge tag 'imx-fixes-5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes i.MX fixes for 5.11, round 2: - Fix pcf2127 reset for imx7d-flex-concentrator board. - Fix i.MX6 suspend with Thumb-2 kernel. - Fix ethernet-phy address issue on imx6qdl-sr-som board. - Fix GPIO3 `gpio-ranges` on i.MX8MP. - Select SOC_BUS for IMX_SCU driver to fix build issue. * tag 'imx-fixes-5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: firmware: imx: select SOC_BUS to fix firmware build arm64: dts: imx8mp: Correct the gpio ranges of gpio3 ARM: dts: imx6qdl-sr-som: fix some cubox-i platforms ARM: imx: build suspend-imx6.S with arm instruction set ARM: dts: imx7d-flex-concentrator: fix pcf2127 reset Link: https://lore.kernel.org/r/20210119091949.GD4356@dragon Signed-off-by: Arnd Bergmann commit 68e89bc868e190365930f914fdbe154064851ec9 Author: Stefan Wahren Date: Sun Jan 3 13:24:35 2021 +0100 MAINTAINERS: Include bcm2835 subsequents into search Change the bcm2835 maintainer info in order to handle subsequent SoCs. After this get_maintainers.pl provides the proper maintainers for irqchip-bcm2836. Signed-off-by: Stefan Wahren Signed-off-by: Florian Fainelli Signed-off-by: Arnd Bergmann commit da8ee66f56071aef0b5b0de41d2c2a97fa30c8a1 Author: Bharat Gooty Date: Tue Jan 19 11:04:44 2021 +0530 arm64: dts: broadcom: Fix USB DMA address translation for Stingray Add a non-empty dma-ranges so that DMA address translation happens. Fixes: 2013a4b684b6 ("arm64: dts: broadcom: clear the warnings caused by empty dma-ranges") Signed-off-by: Bharat Gooty Signed-off-by: Rayagonda Kokatanur Reviewed-by: Arnd Bergmann Acked-by: Ray Jui Signed-off-by: Florian Fainelli Signed-off-by: Arnd Bergmann commit 680896556805d3ad3fa47f6002b87b3041a45ac2 Author: Claudiu Beznea Date: Fri Jan 22 14:21:34 2021 +0200 drivers: soc: atmel: add null entry at the end of at91_soc_allowed_list[] of_match_node() calls __of_match_node() which loops though the entries of matches array. It stops when condition: (matches->name[0] || matches->type[0] || matches->compatible[0]) is false. Thus, add a null entry at the end of at91_soc_allowed_list[] array. Fixes: caab13b49604 ("drivers: soc: atmel: Avoid calling at91_soc_init on non AT91 SoCs") Cc: stable@vger.kernel.org #4.12+ Signed-off-by: Claudiu Beznea Signed-off-by: Arnd Bergmann commit fe75a21824e78405b8d812421974524092250c63 Merge: faba877b3bccb 809b1e4945774 Author: Linus Torvalds Date: Fri Jan 22 14:31:00 2021 -0800 Merge tag 'for-5.11/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fixes from Mike Snitzer: - Fix DM integrity crash if "recalculate" used without "internal_hash" - Fix DM integrity "recalculate" support to prevent recalculating checksums if we use internal_hash or journal_hash with a key (e.g. HMAC). Use of crypto as a means to prevent malicious corruption requires further changes and was never a design goal for dm-integrity's primary usecase of detecting accidental corruption. - Fix a benign dm-crypt copy-and-paste bug introduced as part of a fix that was merged for 5.11-rc4. - Fix DM core's dm_get_device() to avoid filesystem lookup to get block device (if possible). * tag 'for-5.11/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm: avoid filesystem lookup in dm_get_dev_t() dm crypt: fix copy and paste bug in crypt_alloc_req_aead dm integrity: conditionally disable "recalculate" feature dm integrity: fix a crash if "recalculate" used without "internal_hash" commit caab13b4960416b9fee83169a758eb0f31e65109 Author: Sudeep Holla Date: Fri Dec 11 13:58:46 2020 +0000 drivers: soc: atmel: Avoid calling at91_soc_init on non AT91 SoCs Since at91_soc_init is called unconditionally from atmel_soc_device_init, we get the following warning on all non AT91 SoCs: " AT91: Could not find identification node" Fix the same by filtering with allowed AT91 SoC list. Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: Ludovic Desroches Cc: stable@vger.kernel.org #4.12+ Signed-off-by: Sudeep Holla Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201211135846.1334322-1-sudeep.holla@arm.com Signed-off-by: Arnd Bergmann commit b9557caaf872271671bdc1ef003d72f421eb72f6 Author: Pan Bian Date: Wed Jan 20 18:08:56 2021 -0800 bpf, inode_storage: Put file handler if no storage was found Put file f if inode_storage_ptr() returns NULL. Fixes: 8ea636848aca ("bpf: Implement bpf_local_storage for inodes") Signed-off-by: Pan Bian Signed-off-by: Daniel Borkmann Acked-by: KP Singh Link: https://lore.kernel.org/bpf/20210121020856.25507-1-bianpan2016@163.com commit f4a2da755a7e1f5d845c52aee71336cee289935a Author: Loris Reiff Date: Fri Jan 22 17:42:32 2021 +0100 bpf, cgroup: Fix problematic bounds check Since ctx.optlen is signed, a larger value than max_value could be passed, as it is later on used as unsigned, which causes a WARN_ON_ONCE in the copy_to_user. Fixes: 0d01da6afc54 ("bpf: implement getsockopt and setsockopt hooks") Signed-off-by: Loris Reiff Signed-off-by: Daniel Borkmann Reviewed-by: Stanislav Fomichev Link: https://lore.kernel.org/bpf/20210122164232.61770-2-loris.reiff@liblor.ch commit bb8b81e396f7afbe7c50d789e2107512274d2a35 Author: Loris Reiff Date: Fri Jan 22 17:42:31 2021 +0100 bpf, cgroup: Fix optlen WARN_ON_ONCE toctou A toctou issue in `__cgroup_bpf_run_filter_getsockopt` can trigger a WARN_ON_ONCE in a check of `copy_from_user`. `*optlen` is checked to be non-negative in the individual getsockopt functions beforehand. Changing `*optlen` in a race to a negative value will result in a `copy_from_user(ctx.optval, optval, ctx.optlen)` with `ctx.optlen` being a negative integer. Fixes: 0d01da6afc54 ("bpf: implement getsockopt and setsockopt hooks") Signed-off-by: Loris Reiff Signed-off-by: Daniel Borkmann Reviewed-by: Stanislav Fomichev Link: https://lore.kernel.org/bpf/20210122164232.61770-1-loris.reiff@liblor.ch commit faba877b3bccb5af79f0cd8c6af93392030e6e41 Merge: 1c304c77f7cfc 8adc0a06d68a2 Author: Linus Torvalds Date: Fri Jan 22 13:55:00 2021 -0800 Merge tag 'perf-tools-fixes-v5.11-2-2021-01-22' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull more perf tools fixes from Arnaldo Carvalho de Melo: - Fix id index used in Intel PT for heterogeneous systems - Fix overrun issue in 'perf script' for dynamically-allocated PMU type number - Fix 'perf stat' metrics containing the 'duration_time' synthetic event - Fix system PMU 'perf stat' metrics * tag 'perf-tools-fixes-v5.11-2-2021-01-22' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: perf script: Fix overrun issue for dynamically-allocated PMU type number perf metricgroup: Fix system PMU metrics perf metricgroup: Fix for metrics containing duration_time perf evlist: Fix id index for heterogeneous systems commit 1c304c77f7cfc92572cd45cbf045ac2443423ea1 Merge: a9034304ff7b3 75bd4bff300b3 Author: Linus Torvalds Date: Fri Jan 22 13:51:17 2021 -0800 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Catalin Marinas: - Correctly mask out bits 63:60 in a kernel tag check fault address (specified as unknown by the architecture). Previously they were just zeroed but for kernel pointers they need to be all ones. - Fix a panic (unexpected kernel BRK exception) caused by kprobes being reentered due to an interrupt. * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: kprobes: Fix Uexpected kernel BRK exception at EL1 kasan, arm64: fix pointer tags in KASAN reports commit a9034304ff7b3569af4f159d0c1d4ba33d86cf47 Merge: df7da31d055f1 9d5ae6f3c50a6 Author: Linus Torvalds Date: Fri Jan 22 13:47:25 2021 -0800 Merge tag 'ceph-for-5.11-rc5' of git://github.com/ceph/ceph-client Pull ceph fixes from Ilya Dryomov: "A patch to zero out sensitive cryptographic data and two minor cleanups prompted by the fact that a bunch of code was moved in this cycle" * tag 'ceph-for-5.11-rc5' of git://github.com/ceph/ceph-client: libceph: fix "Boolean result is used in bitwise operation" warning libceph, ceph: disambiguate ceph_connection_operations handlers libceph: zero out session key and connection secret commit df7da31d055f13b00f062422cbee0ea994730813 Merge: 59a4560e85579 17cbe03872be8 Author: Linus Torvalds Date: Fri Jan 22 13:45:52 2021 -0800 Merge tag 'fixes-2021-01-22' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock Pull typo fix from Mike Rapoport: "Fix typo in comment of memblock_phys_alloc_try_nid()" * tag 'fixes-2021-01-22' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock: mm/memblock: Fix typo in comment of memblock_phys_alloc_try_nid() commit 59a4560e855798f9764b77777aeab796de1a171d Merge: 9887e9af2d58e b503087445ce7 Author: Linus Torvalds Date: Fri Jan 22 13:43:42 2021 -0800 Merge tag 'mmc-v5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "MMC core: - Fix initialization of block size when ext_csd isn't present MMC host: - sdhci-brcmstb: Fix mmc timeout errors on S5 suspend - sdhci-of-dwcmshc: Fix request accessing RPMB - sdhci-xenon: Fix 1.8v regulator stabilization" * tag 'mmc-v5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: core: don't initialize block size from ext_csd if not present mmc: sdhci-brcmstb: Fix mmc timeout errors on S5 suspend mmc: sdhci-xenon: fix 1.8v regulator stabilization mmc: sdhci-of-dwcmshc: fix rpmb access commit 9887e9af2d58e4021f1015bf804f5f226b3b2b1c Merge: 83d09ad4b9506 173aac2fef969 Author: Linus Torvalds Date: Fri Jan 22 13:38:40 2021 -0800 Merge tag 'platform-drivers-x86-v5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver fixes from Hans de Goede: "A small collection of bug-fixes and model-specific quirks" * tag 'platform-drivers-x86-v5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86: thinkpad_acpi: Add P53/73 firmware to fan_quirk_table for dual fan control platform/x86: hp-wmi: Don't log a warning on HPWMI_RET_UNKNOWN_COMMAND errors platform/x86: intel-vbtn: Drop HP Stream x360 Convertible PC 11 from allow-list platform/x86: ideapad-laptop: Disable touchpad_switch for ELAN0634 platform/x86: amd-pmc: Fix CONFIG_DEBUG_FS check platform/x86: thinkpad_acpi: correct palmsensor error checking platform/x86: intel-vbtn: Support for tablet mode on Dell Inspiron 7352 platform/x86: touchscreen_dmi: Add swap-x-y quirk for Goodix touchscreen on Estar Beauty HD tablet platform/x86: i2c-multi-instantiate: Don't create platform device for INT3515 ACPI nodes platform/surface: SURFACE_PLATFORMS should depend on ACPI platform/surface: surface_gpe: Fix non-PM_SLEEP build warnings tools/power/x86/intel-speed-select: Set higher of cpuinfo_max_freq or base_frequency tools/power/x86/intel-speed-select: Set scaling_max_freq to base_frequency commit 9a173346bd9e16ab19c7addb8862d95a5cea9feb Author: Pavel Begunkov Date: Thu Jan 21 12:01:08 2021 +0000 io_uring: fix short read retries for non-reg files Sockets and other non-regular files may actually expect short reads to happen, don't retry reads for them. Because non-reg files don't set FMODE_BUF_RASYNC and so it won't do second/retry do_read, we can filter out those cases after first do_read() attempt with ret>0. Cc: stable@vger.kernel.org # 5.9+ Suggested-by: Jens Axboe Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 607ec89ed18f49ca59689572659b9c0076f1991f Author: Jens Axboe Date: Tue Jan 19 10:10:54 2021 -0700 io_uring: fix SQPOLL IORING_OP_CLOSE cancelation state IORING_OP_CLOSE is special in terms of cancelation, since it has an intermediate state where we've removed the file descriptor but hasn't closed the file yet. For that reason, it's currently marked with IO_WQ_WORK_NO_CANCEL to prevent cancelation. This ensures that the op is always run even if canceled, to prevent leaving us with a live file but an fd that is gone. However, with SQPOLL, since a cancel request doesn't carry any resources on behalf of the request being canceled, if we cancel before any of the close op has been run, we can end up with io-wq not having the ->files assigned. This can result in the following oops reported by Joseph: BUG: kernel NULL pointer dereference, address: 00000000000000d8 PGD 800000010b76f067 P4D 800000010b76f067 PUD 10b462067 PMD 0 Oops: 0000 [#1] SMP PTI CPU: 1 PID: 1788 Comm: io_uring-sq Not tainted 5.11.0-rc4 #1 Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011 RIP: 0010:__lock_acquire+0x19d/0x18c0 Code: 00 00 8b 1d fd 56 dd 08 85 db 0f 85 43 05 00 00 48 c7 c6 98 7b 95 82 48 c7 c7 57 96 93 82 e8 9a bc f5 ff 0f 0b e9 2b 05 00 00 <48> 81 3f c0 ca 67 8a b8 00 00 00 00 41 0f 45 c0 89 04 24 e9 81 fe RSP: 0018:ffffc90001933828 EFLAGS: 00010002 RAX: 0000000000000001 RBX: 0000000000000001 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000000000d8 RBP: 0000000000000246 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: ffff888106e8a140 R15: 00000000000000d8 FS: 0000000000000000(0000) GS:ffff88813bd00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000000000d8 CR3: 0000000106efa004 CR4: 00000000003706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: lock_acquire+0x31a/0x440 ? close_fd_get_file+0x39/0x160 ? __lock_acquire+0x647/0x18c0 _raw_spin_lock+0x2c/0x40 ? close_fd_get_file+0x39/0x160 close_fd_get_file+0x39/0x160 io_issue_sqe+0x1334/0x14e0 ? lock_acquire+0x31a/0x440 ? __io_free_req+0xcf/0x2e0 ? __io_free_req+0x175/0x2e0 ? find_held_lock+0x28/0xb0 ? io_wq_submit_work+0x7f/0x240 io_wq_submit_work+0x7f/0x240 io_wq_cancel_cb+0x161/0x580 ? io_wqe_wake_worker+0x114/0x360 ? io_uring_get_socket+0x40/0x40 io_async_find_and_cancel+0x3b/0x140 io_issue_sqe+0xbe1/0x14e0 ? __lock_acquire+0x647/0x18c0 ? __io_queue_sqe+0x10b/0x5f0 __io_queue_sqe+0x10b/0x5f0 ? io_req_prep+0xdb/0x1150 ? mark_held_locks+0x6d/0xb0 ? mark_held_locks+0x6d/0xb0 ? io_queue_sqe+0x235/0x4b0 io_queue_sqe+0x235/0x4b0 io_submit_sqes+0xd7e/0x12a0 ? _raw_spin_unlock_irq+0x24/0x30 ? io_sq_thread+0x3ae/0x940 io_sq_thread+0x207/0x940 ? do_wait_intr_irq+0xc0/0xc0 ? __ia32_sys_io_uring_enter+0x650/0x650 kthread+0x134/0x180 ? kthread_create_worker_on_cpu+0x90/0x90 ret_from_fork+0x1f/0x30 Fix this by moving the IO_WQ_WORK_NO_CANCEL until _after_ we've modified the fdtable. Canceling before this point is totally fine, and running it in the io-wq context _after_ that point is also fine. For 5.12, we'll handle this internally and get rid of the no-cancel flag, as IORING_OP_CLOSE is the only user of it. Cc: stable@vger.kernel.org Fixes: b5dba59e0cf7 ("io_uring: add support for IORING_OP_CLOSE") Reported-by: "Abaci " Reviewed-and-tested-by: Joseph Qi Signed-off-by: Jens Axboe commit 75bd4bff300b3c5252d4a0e7a959569c62d1dbae Author: Qais Yousef Date: Fri Jan 22 11:09:09 2021 +0000 arm64: kprobes: Fix Uexpected kernel BRK exception at EL1 I was hitting the below panic continuously when attaching kprobes to scheduler functions [ 159.045212] Unexpected kernel BRK exception at EL1 [ 159.053753] Internal error: BRK handler: f2000006 [#1] PREEMPT SMP [ 159.059954] Modules linked in: [ 159.063025] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 5.11.0-rc4-00008-g1e2a199f6ccd #56 [rt-app] [1] Exiting.[ 159.071166] Hardware name: ARM Juno development board (r2) (DT) [ 159.079689] pstate: 600003c5 (nZCv DAIF -PAN -UAO -TCO BTYPE=--) [ 159.085723] pc : 0xffff80001624501c [ 159.089377] lr : attach_entity_load_avg+0x2ac/0x350 [ 159.094271] sp : ffff80001622b640 [rt-app] [0] Exiting.[ 159.097591] x29: ffff80001622b640 x28: 0000000000000001 [ 159.105515] x27: 0000000000000049 x26: ffff000800b79980 [ 159.110847] x25: ffff00097ef37840 x24: 0000000000000000 [ 159.116331] x23: 00000024eacec1ec x22: ffff00097ef12b90 [ 159.121663] x21: ffff00097ef37700 x20: ffff800010119170 [rt-app] [11] Exiting.[ 159.126995] x19: ffff00097ef37840 x18: 000000000000000e [ 159.135003] x17: 0000000000000001 x16: 0000000000000019 [ 159.140335] x15: 0000000000000000 x14: 0000000000000000 [ 159.145666] x13: 0000000000000002 x12: 0000000000000002 [ 159.150996] x11: ffff80001592f9f0 x10: 0000000000000060 [ 159.156327] x9 : ffff8000100f6f9c x8 : be618290de0999a1 [ 159.161659] x7 : ffff80096a4b1000 x6 : 0000000000000000 [ 159.166990] x5 : ffff00097ef37840 x4 : 0000000000000000 [ 159.172321] x3 : ffff000800328948 x2 : 0000000000000000 [ 159.177652] x1 : 0000002507d52fec x0 : ffff00097ef12b90 [ 159.182983] Call trace: [ 159.185433] 0xffff80001624501c [ 159.188581] update_load_avg+0x2d0/0x778 [ 159.192516] enqueue_task_fair+0x134/0xe20 [ 159.196625] enqueue_task+0x4c/0x2c8 [ 159.200211] ttwu_do_activate+0x70/0x138 [ 159.204147] sched_ttwu_pending+0xbc/0x160 [ 159.208253] flush_smp_call_function_queue+0x16c/0x320 [ 159.213408] generic_smp_call_function_single_interrupt+0x1c/0x28 [ 159.219521] ipi_handler+0x1e8/0x3c8 [ 159.223106] handle_percpu_devid_irq+0xd8/0x460 [ 159.227650] generic_handle_irq+0x38/0x50 [ 159.231672] __handle_domain_irq+0x6c/0xc8 [ 159.235781] gic_handle_irq+0xcc/0xf0 [ 159.239452] el1_irq+0xb4/0x180 [ 159.242600] rcu_is_watching+0x28/0x70 [ 159.246359] rcu_read_lock_held_common+0x44/0x88 [ 159.250991] rcu_read_lock_any_held+0x30/0xc0 [ 159.255360] kretprobe_dispatcher+0xc4/0xf0 [ 159.259555] __kretprobe_trampoline_handler+0xc0/0x150 [ 159.264710] trampoline_probe_handler+0x38/0x58 [ 159.269255] kretprobe_trampoline+0x70/0xc4 [ 159.273450] run_rebalance_domains+0x54/0x80 [ 159.277734] __do_softirq+0x164/0x684 [ 159.281406] irq_exit+0x198/0x1b8 [ 159.284731] __handle_domain_irq+0x70/0xc8 [ 159.288840] gic_handle_irq+0xb0/0xf0 [ 159.292510] el1_irq+0xb4/0x180 [ 159.295658] arch_cpu_idle+0x18/0x28 [ 159.299245] default_idle_call+0x9c/0x3e8 [ 159.303265] do_idle+0x25c/0x2a8 [ 159.306502] cpu_startup_entry+0x2c/0x78 [ 159.310436] secondary_start_kernel+0x160/0x198 [ 159.314984] Code: d42000c0 aa1e03e9 d42000c0 aa1e03e9 (d42000c0) After a bit of head scratching and debugging it turned out that it is due to kprobe handler being interrupted by a tick that causes us to go into (I think another) kprobe handler. The culprit was kprobe_breakpoint_ss_handler() returning DBG_HOOK_ERROR which leads to the Unexpected kernel BRK exception. Reverting commit ba090f9cafd5 ("arm64: kprobes: Remove redundant kprobe_step_ctx") seemed to fix the problem for me. Further analysis showed that kcb->kprobe_status is set to KPROBE_REENTER when the error occurs. By teaching kprobe_breakpoint_ss_handler() to handle this status I can no longer reproduce the problem. Fixes: ba090f9cafd5 ("arm64: kprobes: Remove redundant kprobe_step_ctx") Signed-off-by: Qais Yousef Acked-by: Will Deacon Acked-by: Masami Hiramatsu Link: https://lore.kernel.org/r/20210122110909.3324607-1-qais.yousef@arm.com Signed-off-by: Catalin Marinas commit 156d02914b7d2d53bf047235991b12bd6cbd7d40 Merge: 8a996b2d8a03b dcb3b06d9c34f Author: Arnd Bergmann Date: Fri Jan 22 15:13:07 2021 +0100 Merge tag 'optee-rcu-sched-trace-for-v5.11' of git://git.linaro.org/people/jens.wiklander/linux-tee into arm/fixes Fix rcu_sched trace from OP-TEE invoke Replaces might_sleep() with a conditional call to cond_resched() in order to avoid the rcu_sched trace in some corner cases. * tag 'optee-rcu-sched-trace-for-v5.11' of git://git.linaro.org/people/jens.wiklander/linux-tee: tee: optee: replace might_sleep with cond_resched Link: https://lore.kernel.org/r/20210122074234.GA1074747@jade Signed-off-by: Arnd Bergmann commit 741ba80f6f9a4702089c122129f22df9774b3e64 Author: Peter Zijlstra Date: Sat Jan 16 11:56:37 2021 +0100 sched: Relax the set_cpus_allowed_ptr() semantics Now that we have KTHREAD_IS_PER_CPU to denote the critical per-cpu tasks to retain during CPU offline, we can relax the warning in set_cpus_allowed_ptr(). Any spurious kthread that wants to get on at the last minute will get pushed off before it can run. While during CPU online there is no harm, and actual benefit, to allowing kthreads back on early, it simplifies hotplug code and fixes a number of outstanding races. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Lai jiangshan Reviewed-by: Valentin Schneider Tested-by: Valentin Schneider Link: https://lkml.kernel.org/r/20210121103507.240724591@infradead.org commit 5ba2ffba13a1e24e7b153683e97300f9cc6f605a Author: Peter Zijlstra Date: Tue Jan 12 11:28:16 2021 +0100 sched: Fix CPU hotplug / tighten is_per_cpu_kthread() Prior to commit 1cf12e08bc4d ("sched/hotplug: Consolidate task migration on CPU unplug") we'd leave any task on the dying CPU and break affinity and force them off at the very end. This scheme had to change in order to enable migrate_disable(). One cannot wait for migrate_disable() to complete while stuck in stop_machine(). Furthermore, since we need at the very least: idle, hotplug and stop threads at any point before stop_machine, we can't break affinity and/or push those away. Under the assumption that all per-cpu kthreads are sanely handled by CPU hotplug, the new code no long breaks affinity or migrates any of them (which then includes the critical ones above). However, there's an important difference between per-cpu kthreads and kthreads that happen to have a single CPU affinity which is lost. The latter class very much relies on the forced affinity breaking and migration semantics previously provided. Use the new kthread_is_per_cpu() infrastructure to tighten is_per_cpu_kthread() and fix the hot-unplug problems stemming from the change. Fixes: 1cf12e08bc4d ("sched/hotplug: Consolidate task migration on CPU unplug") Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Tested-by: Valentin Schneider Link: https://lkml.kernel.org/r/20210121103507.102416009@infradead.org commit 975707f227b07a8212060f94447171d15d7a681b Author: Peter Zijlstra Date: Wed Jan 20 15:05:41 2021 +0100 sched: Prepare to use balance_push in ttwu() In preparation of using the balance_push state in ttwu() we need it to provide a reliable and consistent state. The immediate problem is that rq->balance_callback gets cleared every schedule() and then re-set in the balance_push_callback() itself. This is not a reliable signal, so add a variable that stays set during the entire time. Also move setting it before the synchronize_rcu() in sched_cpu_deactivate(), such that we get guaranteed visibility to ttwu(), which is a preempt-disable region. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Tested-by: Valentin Schneider Link: https://lkml.kernel.org/r/20210121103506.966069627@infradead.org commit 640f17c82460e9724fd256f0a1f5d99e7ff0bda4 Author: Peter Zijlstra Date: Fri Jan 15 19:08:36 2021 +0100 workqueue: Restrict affinity change to rescuer create_worker() will already set the right affinity using kthread_bind_mask(), this means only the rescuer will need to change it's affinity. Howveer, while in cpu-hot-unplug a regular task is not allowed to run on online&&!active as it would be pushed away quite agressively. We need KTHREAD_IS_PER_CPU to survive in that environment. Therefore set the affinity after getting that magic flag. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Tested-by: Valentin Schneider Link: https://lkml.kernel.org/r/20210121103506.826629830@infradead.org commit 5c25b5ff89f004c30b04759dc34ace8585a4085f Author: Peter Zijlstra Date: Tue Jan 12 11:26:49 2021 +0100 workqueue: Tag bound workers with KTHREAD_IS_PER_CPU Mark the per-cpu workqueue workers as KTHREAD_IS_PER_CPU. Workqueues have unfortunate semantics in that per-cpu workers are not default flushed and parked during hotplug, however a subset does manual flush on hotplug and hard relies on them for correctness. Therefore play silly games.. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Tested-by: Valentin Schneider Link: https://lkml.kernel.org/r/20210121103506.693465814@infradead.org commit ac687e6e8c26181a33270efd1a2e2241377924b0 Author: Peter Zijlstra Date: Tue Jan 12 11:24:04 2021 +0100 kthread: Extract KTHREAD_IS_PER_CPU There is a need to distinguish geniune per-cpu kthreads from kthreads that happen to have a single CPU affinity. Geniune per-cpu kthreads are kthreads that are CPU affine for correctness, these will obviously have PF_KTHREAD set, but must also have PF_NO_SETAFFINITY set, lest userspace modify their affinity and ruins things. However, these two things are not sufficient, PF_NO_SETAFFINITY is also set on other tasks that have their affinities controlled through other means, like for instance workqueues. Therefore another bit is needed; it turns out kthread_create_per_cpu() already has such a bit: KTHREAD_IS_PER_CPU, which is used to make kthread_park()/kthread_unpark() work correctly. Expose this flag and remove the implicit setting of it from kthread_create_on_cpu(); the io_uring usage of it seems dubious at best. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Tested-by: Valentin Schneider Link: https://lkml.kernel.org/r/20210121103506.557620262@infradead.org commit 22f667c97aadbf481e2cae2d6feabdf431e27b31 Author: Peter Zijlstra Date: Fri Jan 15 18:17:45 2021 +0100 sched: Don't run cpu-online with balance_push() enabled We don't need to push away tasks when we come online, mark the push complete right before the CPU dies. XXX hotplug state machine has trouble with rollback here. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Tested-by: Valentin Schneider Link: https://lkml.kernel.org/r/20210121103506.415606087@infradead.org commit 547a77d02f8cfb345631ce23b5b548d27afa0fc4 Author: Lai Jiangshan Date: Mon Jan 11 23:26:33 2021 +0800 workqueue: Use cpu_possible_mask instead of cpu_active_mask to break affinity The scheduler won't break affinity for us any more, and we should "emulate" the same behavior when the scheduler breaks affinity for us. The behavior is "changing the cpumask to cpu_possible_mask". And there might be some other CPUs online later while the worker is still running with the pending work items. The worker should be allowed to use the later online CPUs as before and process the work items ASAP. If we use cpu_active_mask here, we can't achieve this goal but using cpu_possible_mask can. Fixes: 06249738a41a ("workqueue: Manually break affinity on hotplug") Signed-off-by: Lai Jiangshan Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Acked-by: Tejun Heo Tested-by: Paul E. McKenney Tested-by: Valentin Schneider Link: https://lkml.kernel.org/r/20210111152638.2417-4-jiangshanlai@gmail.com commit 36c6e17bf16922935a5a0dd073d5b032d34aa73d Author: Valentin Schneider Date: Wed Jan 13 18:31:41 2021 +0000 sched/core: Print out straggler tasks in sched_cpu_dying() Since commit 1cf12e08bc4d ("sched/hotplug: Consolidate task migration on CPU unplug") tasks are expected to move themselves out of a out-going CPU. For most tasks this will be done automagically via BALANCE_PUSH, but percpu kthreads will have to cooperate and move themselves away one way or another. Currently, some percpu kthreads (workqueues being a notable exemple) do not cooperate nicely and can end up on an out-going CPU at the time sched_cpu_dying() is invoked. Print the dying rq's tasks to shed some light on the stragglers. Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Tested-by: Valentin Schneider Link: https://lkml.kernel.org/r/20210113183141.11974-1-valentin.schneider@arm.com commit 14a71d509ac809dcf56d7e3ca376b15d17bd0ddd Author: Mark Brown Date: Fri Jan 22 13:20:42 2021 +0000 regulator: Fix lockdep warning resolving supplies With commit eaa7995c529b54 (regulator: core: avoid regulator_resolve_supply() race condition) we started holding the rdev lock while resolving supplies, an operation that requires holding the regulator_list_mutex. This results in lockdep warnings since in other places we take the list mutex then the mutex on an individual rdev. Since the goal is to make sure that we don't call set_supply() twice rather than a concern about the cost of resolution pull the rdev lock and check for duplicate resolution down to immediately before we do the set_supply() and drop it again once the allocation is done. Fixes: eaa7995c529b54 (regulator: core: avoid regulator_resolve_supply() race condition) Reported-by: Marek Szyprowski Tested-by: Marek Szyprowski Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20210122132042.10306-1-broonie@kernel.org Signed-off-by: Mark Brown commit 31b081066e9c8f4a931a3d20dc0c6ca63c595c44 Author: Ricky Wu Date: Fri Jan 22 16:19:06 2021 +0800 misc: rtsx: init value of aspm_enabled make sure ASPM state sync with pcr->aspm_enabled init value pcr->aspm_enabled Cc: stable@vger.kernel.org Signed-off-by: Ricky Wu Link: https://lore.kernel.org/r/20210122081906.19100-1-ricky_wu@realtek.com Fixes: d928061c3143 ("misc: rtsx: modify en/disable aspm function") Signed-off-by: Greg Kroah-Hartman commit 17749851eb9ca2298e7c3b81aae4228961b36f28 Author: Linus Torvalds Date: Thu Jan 21 10:04:27 2021 -0800 tty: fix up hung_up_tty_write() conversion In commit "tty: implement write_iter", I left the write_iter conversion of the hung up tty case alone, because I incorrectly thought it didn't matter. Jiri showed me the errors of my ways, and pointed out the problems with that incomplete conversion. Fix it all up. Reported-by: Jiri Slaby Signed-off-by: Linus Torvalds Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/CAHk-=wh+-rGsa=xruEWdg_fJViFG8rN9bpLrfLz=_yBYh2tBhA@mail.gmail.com Signed-off-by: Greg Kroah-Hartman commit 9ecd1d2b302b600351fac50779f43fcb680c1a16 Author: Krzysztof Kozlowski Date: Sun Jan 17 12:43:13 2021 +0100 i2c: sprd: depend on COMMON_CLK to fix compile tests The I2C_SPRD uses Common Clock Framework thus it cannot be built on platforms without it (e.g. compile test on MIPS with LANTIQ): /usr/bin/mips-linux-gnu-ld: drivers/i2c/busses/i2c-sprd.o: in function `sprd_i2c_probe': i2c-sprd.c:(.text.sprd_i2c_probe+0x254): undefined reference to `clk_set_parent' Fixes: 4a2d5f663dab ("i2c: Enable compile testing for more drivers") Reported-by: kernel test robot Signed-off-by: Krzysztof Kozlowski Reviewed-by: Baolin Wang Signed-off-by: Wolfram Sang commit 5de3b9430221b11a5e1fc2f5687af80777c8392a Author: Jian-Hong Pan Date: Fri Jan 22 13:47:06 2021 +0800 ALSA: hda/realtek: Enable headset of ASUS B1400CEPE with ALC256 ASUS B1400CEPE laptop's headset audio is not enabled until ALC256_FIXUP_ASUS_HPE quirk is applied. Here is the original pin node values: 0x12 0x40000000 0x13 0x411111f0 0x14 0x90170110 0x18 0x411111f0 0x19 0x411111f0 0x1a 0x411111f0 0x1b 0x411111f0 0x1d 0x40461b45 0x1e 0x411111f0 0x21 0x04211020 Signed-off-by: Jian-Hong Pan Cc: Link: https://lore.kernel.org/r/20210122054705.48804-1-jhp@endlessos.org Signed-off-by: Takashi Iwai commit a4166340a6e4d501c9e3aee81c20a269726ecde0 Author: Fabio Estevam Date: Tue Jan 19 23:41:23 2021 -0300 Revert "i2c: imx: Remove unused .id_table support" Coldfire platforms are non-DT users of this driver, so keep the .id_table support. This reverts commit c610199cd392e6e2d41811ef83d85355c1b862b3. Fixes: c610199cd392 (i2c: imx: Remove unused .id_table support") Reported-by: Sascha Hauer Signed-off-by: Fabio Estevam Signed-off-by: Wolfram Sang commit 4f6543f28bb05433d87b6de6c21e9c14c35ecf33 Author: Herbert Xu Date: Wed Jan 20 16:40:45 2021 +1100 crypto: marvel/cesa - Fix tdma descriptor on 64-bit The patch that added src_dma/dst_dma to struct mv_cesa_tdma_desc is broken on 64-bit systems as the size of the descriptor has been changed. This patch fixes it by using u32 instead of dma_addr_t. Fixes: e62291c1d9f4 ("crypto: marvell/cesa - Fix sparse warnings") Cc: Reported-by: Sven Auhagen Signed-off-by: Herbert Xu commit 83d09ad4b950651a95d37697f1493c00d888d0db Merge: 36ada25026357 031c7a8cd6fc5 Author: Linus Torvalds Date: Thu Jan 21 18:35:02 2021 -0800 Merge tag 'for-linus' of git://github.com/openrisc/linux Pull OpenRISC fixes from Stafford Horne: - Compiler warning fixup for new Litex SoC driver - Sparse warning fixup for iounmap * tag 'for-linus' of git://github.com/openrisc/linux: openrisc: io: Add missing __iomem annotation to iounmap() soc: litex: Fix compile warning when device tree is not configured commit 36ada25026357c855d5839166f78017509824b77 Merge: 9f29bd8b2e713 06ee38dc2aab3 Author: Linus Torvalds Date: Thu Jan 21 17:16:10 2021 -0800 Merge tag 'drm-fixes-2021-01-22' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Regular fixes pull, nothing too major in here, just some core fixes, one vc4, bunch of i915 and a bunch of amdgpu. core: - atomic: Release state on error - syncobj: Fix use-after-free - ttm: Don't use GFP_TRANSHUGE_LIGTH - vram-helper: Fix memory leak in vmap vc4: - Unify driver naming for PCM i915: - HDCP fixes - PMU wakeref fix - Fix HWSP validity race - Fix DP protocol converter accidental 4:4:4->4:2:0 conversion for RGB amdgpu: - Green Sardine fixes - Vangogh fixes - Renoir fixes - Misc display fixes" * tag 'drm-fixes-2021-01-22' of git://anongit.freedesktop.org/drm/drm: (21 commits) drm/amdgpu: update mmhub mgcg&ls for mmhub_v2_3 drm/amdgpu: modify GCR_GENERAL_CNTL for Vangogh drm/amdgpu/pm: no need GPU status set since mmnbif_gpu_BIF_DOORBELL_FENCE_CNTL added in FSDL drm/amd/display: Fixed corruptions on HPDRX link loss restore drm/amd/display: Use hardware sequencer functions for PG control drm/amd/display: Change function decide_dp_link_settings to avoid infinite looping drm/amd/display: Allow PSTATE chnage when no displays are enabled drm/amd/display: Update dram_clock_change_latency for DCN2.1 drm/amdgpu: remove gpu info firmware of green sardine drm/amd/display: DCN2X Find Secondary Pipe properly in MPO + ODM Case drm/syncobj: Fix use-after-free drm/vram-helper: Reuse existing page mappings in vmap drm/atomic: put state on error path drm/i915: Only enable DFP 4:4:4->4:2:0 conversion when outputting YCbCr 4:4:4 drm/i915: Check for rq->hwsp validity after acquiring RCU lock drm/i915/pmu: Don't grab wakeref when enabling events drm/i915/gt: Prevent use of engine->wa_ctx after error drm/vc4: Unify PCM card's driver_name drm/ttm: stop using GFP_TRANSHUGE_LIGHT drm/i915/hdcp: Get conn while content_type changed ... commit 06ee38dc2aab3b5a09feb74128cf7326a490b788 Merge: 5f9986a6cdf2e 39263a2f88681 Author: Dave Airlie Date: Fri Jan 22 09:43:20 2021 +1000 Merge tag 'amd-drm-fixes-5.11-2021-01-21' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-5.11-2021-01-21: amdgpu: - Green Sardine fixes - Vangogh fixes - Renoir fixes - Misc display fixes Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210121160129.3981-1-alexander.deucher@amd.com commit 5f9986a6cdf2eb40ca3eb514357eb29f9c39be29 Merge: f722f5bea1caf 1c4995b0a576d Author: Dave Airlie Date: Fri Jan 22 09:28:22 2021 +1000 Merge tag 'drm-intel-fixes-2021-01-21' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes drm/i915 fixes for v5.11-rc5: - HDCP fixes - PMU wakeref fix - Fix HWSP validity race - Fix DP protocol converter accidental 4:4:4->4:2:0 conversion for RGB Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87a6t2kzgb.fsf@intel.com commit f722f5bea1caf6681722aedfd544a17e58e41324 Merge: 19c329f680899 a37eef63bc9e1 Author: Dave Airlie Date: Fri Jan 22 09:19:20 2021 +1000 Merge tag 'drm-misc-fixes-2021-01-20' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Short summary of fixes pull (less than what git shortlog provides): * drm/atomic: Release state on error * drm/syncobj: Fix use-after-free * drm/ttm: Don't use GFP_TRANSHUGE_LIGTH * drm/vc4: Unify driver naming for PCM * drm/vram-helper: Fix memory leak in vmap Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/YAgdYGNoH7pC29rz@linux-uq9g commit 6e1239c13953f3c2a76e70031f74ddca9ae57cd3 Author: Gayatri Kammela Date: Thu Jan 21 13:50:04 2021 -0800 x86/cpu: Add another Alder Lake CPU to the Intel family Add Alder Lake mobile CPU model number to Intel family. Signed-off-by: Gayatri Kammela Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210121215004.11618-1-tony.luck@intel.com commit 1d489151e9f9d1647110277ff77282fe4d96d09b Author: Josh Poimboeuf Date: Thu Jan 14 16:14:01 2021 -0600 objtool: Don't fail on missing symbol table Thanks to a recent binutils change which doesn't generate unused symbols, it's now possible for thunk_64.o be completely empty without CONFIG_PREEMPTION: no text, no data, no symbols. We could edit the Makefile to only build that file when CONFIG_PREEMPTION is enabled, but that will likely create confusion if/when the thunks end up getting used by some other code again. Just ignore it and move on. Reported-by: Nathan Chancellor Reviewed-by: Nathan Chancellor Reviewed-by: Miroslav Benes Tested-by: Nathan Chancellor Link: https://github.com/ClangBuiltLinux/linux/issues/1254 Signed-off-by: Josh Poimboeuf commit 655cf86548a3938538642a6df27dd359e13c86bd Author: Josh Poimboeuf Date: Thu Jan 14 16:32:42 2021 -0600 objtool: Don't fail the kernel build on fatal errors This is basically a revert of commit 644592d32837 ("objtool: Fail the kernel build on fatal errors"). That change turned out to be more trouble than it's worth. Failing the build is an extreme measure which sometimes gets too much attention and blocks CI build testing. These fatal-type warnings aren't yet as rare as we'd hope, due to the ever-increasing matrix of supported toolchains/plugins and their fast-changing nature as of late. Also, there are more people (and bots) looking for objtool warnings than ever before, so even non-fatal warnings aren't likely to be ignored for long. Suggested-by: Nick Desaulniers Reviewed-by: Miroslav Benes Reviewed-by: Nick Desaulniers Reviewed-by: Kamalesh Babulal Signed-off-by: Josh Poimboeuf commit 51839e29cb5954470ea4db7236ef8c3d77a6e0bb Author: Andy Shevchenko Date: Wed Dec 9 13:50:17 2020 +0200 scripts: switch explicitly to Python 3 Some distributions are about to switch to Python 3 support only. This means that /usr/bin/python, which is Python 2, is not available anymore. Hence, switch scripts to use Python 3 explicitly. Signed-off-by: Andy Shevchenko Signed-off-by: Masahiro Yamada commit 8adc0a06d68a2e433b960377e515e7a6b19b429f Author: Jin Yao Date: Wed Dec 9 08:58:28 2020 +0800 perf script: Fix overrun issue for dynamically-allocated PMU type number When unpacking the event which is from dynamic PMU, the array output[OUTPUT_TYPE_MAX] may be overrun. For example, type number of SKL uncore_imc is 10, but OUTPUT_TYPE_MAX is 7 now (OUTPUT_TYPE_MAX = PERF_TYPE_MAX + 1). /* In builtin-script.c */ process_event() { unsigned int type = output_type(attr->type); if (output[type].fields == 0) return; } output[10] is overrun. Create a type OUTPUT_TYPE_OTHER for dynamic PMU events, then output_type(attr->type) will return OUTPUT_TYPE_OTHER here. Note that if PERF_TYPE_MAX ever changed, then there would be a conflict between old perf.data files that had a dynamicaliy allocated PMU number that would then be the same as a fixed PERF_TYPE. Example: # perf record --switch-events -C 0 -e "{cpu-clock,uncore_imc/data_reads/,uncore_imc/data_writes/}:SD" -a -- sleep 1 # perf script Before: swapper 0 [000] 1479253.987551: 277766 cpu-clock: ffffffff9d4ddb6f cpuidle_enter_state+0xdf ([kernel.kallsyms]) swapper 0 [000] 1479253.987797: 246709 cpu-clock: ffffffff9d4ddb6f cpuidle_enter_state+0xdf ([kernel.kallsyms]) swapper 0 [000] 1479253.988127: 329883 cpu-clock: ffffffff9d4ddb6f cpuidle_enter_state+0xdf ([kernel.kallsyms]) swapper 0 [000] 1479253.988273: 146393 cpu-clock: ffffffff9d4ddb6f cpuidle_enter_state+0xdf ([kernel.kallsyms]) swapper 0 [000] 1479253.988523: 249977 cpu-clock: ffffffff9d4ddb6f cpuidle_enter_state+0xdf ([kernel.kallsyms]) swapper 0 [000] 1479253.988877: 354090 cpu-clock: ffffffff9d4ddb6f cpuidle_enter_state+0xdf ([kernel.kallsyms]) swapper 0 [000] 1479253.989023: 145940 cpu-clock: ffffffff9d4ddb6f cpuidle_enter_state+0xdf ([kernel.kallsyms]) swapper 0 [000] 1479253.989383: 359856 cpu-clock: ffffffff9d4ddb6f cpuidle_enter_state+0xdf ([kernel.kallsyms]) swapper 0 [000] 1479253.989523: 140082 cpu-clock: ffffffff9d4ddb6f cpuidle_enter_state+0xdf ([kernel.kallsyms]) After: swapper 0 [000] 1397040.402011: 272384 cpu-clock: ffffffff9d4ddb6f cpuidle_enter_state+0xdf ([kernel.kallsyms]) swapper 0 [000] 1397040.402011: 5396 uncore_imc/data_reads/: swapper 0 [000] 1397040.402011: 967 uncore_imc/data_writes/: swapper 0 [000] 1397040.402259: 249153 cpu-clock: ffffffff9d4ddb6f cpuidle_enter_state+0xdf ([kernel.kallsyms]) swapper 0 [000] 1397040.402259: 7231 uncore_imc/data_reads/: swapper 0 [000] 1397040.402259: 1297 uncore_imc/data_writes/: swapper 0 [000] 1397040.402508: 249108 cpu-clock: ffffffff9d4ddb6f cpuidle_enter_state+0xdf ([kernel.kallsyms]) swapper 0 [000] 1397040.402508: 5333 uncore_imc/data_reads/: swapper 0 [000] 1397040.402508: 1008 uncore_imc/data_writes/: Signed-off-by: Jin Yao Acked-by: Adrian Hunter Acked-by: Jiri Olsa Cc: Peter Zijlstra Cc: Kan Liang Cc: Andi Kleen Cc: Alexander Shishkin Cc: Ingo Molnar Link: https://lore.kernel.org/r/20201209005828.21302-1-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 3d6e79ee9e8f8c6604312382c2be1d1bd1cffc9e Author: John Garry Date: Tue Jan 19 18:04:15 2021 +0800 perf metricgroup: Fix system PMU metrics Joakim reports that getting "perf stat" for multiple system PMU metrics segfaults: $ perf stat -a -I 1000 -M imx8mm_ddr_write.all,imx8mm_ddr_write.all Segmentation fault $ While the same works without issue for a single metric. The logic in metricgroup__add_metric_sys_event_iter() is broken, in that add_metric() @m argument should be NULL for each new metric. Fix by not passing a holder for that, and rather make local in metricgroup__add_metric_sys_event_iter(). Fixes: be335ec28efa ("perf metricgroup: Support adding metrics for system PMUs") Reported-by: Joakim Zhang Signed-off-by: John Garry Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Kajol Jain Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: linuxarm@openeuler.org Link: https://lore.kernel.org/r/1611050655-44020-1-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 9c880c24cb0db49d6e62e6d882df1470b0be8038 Author: John Garry Date: Thu Jan 21 00:18:38 2021 +0800 perf metricgroup: Fix for metrics containing duration_time Metrics containing duration_time cause a segfault: $ perf stat -v -M L1D_Cache_Fill_BW sleep 1 Using CPUID GenuineIntel-6-3D-4 metric expr 64 * l1d.replacement / 1000000000 / duration_time for L1D_Cache_Fill_BW found event duration_time found event l1d.replacement adding {l1d.replacement}:W,duration_time l1d.replacement -> cpu/umask=0x1,(null)=0x1e8483,event=0x51/ Segmentation fault $ In commit c2337d67199a1ea1 ("perf metricgroup: Fix metrics using aliases covering multiple PMUs"), the logic in find_evsel_group() when iter'ing events was changed to not only select events in same group, but also for aliased PMUs. Checking whether events were for aliased PMUs was done by comparing the event PMU name. This was not safe for duration_time event, which has no associated PMU (and no PMU name), so fix by checking if the event PMU name is set also. Committer testing: Reproduced the bug, then, on a: $ grep -m1 ^'model name' /proc/cpuinfo model name : Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz $ We now get: $ perf stat -M L1D_Cache_Fill_BW sleep 1 Performance counter stats for 'sleep 1': 4,141 l1d.replacement:u 1,001,285,107 ns duration_time:u 1.001285107 seconds time elapsed 0.000000000 seconds user 0.001119000 seconds sys $ Detais from -v: Using CPUID GenuineIntel-6-8E-A metric expr 64 * l1d.replacement / 1000000000 / duration_time for L1D_Cache_Fill_BW found event duration_time found event l1d.replacement adding {l1d.replacement}:W,duration_time l1d.replacement -> cpu/(null)=0x1e8483,umask=0x1,event=0x51/ Control descriptor is not initialized Warning: kernel.perf_event_paranoid=2, trying to fall back to excluding kernel and hypervisor samples Warning: kernel.perf_event_paranoid=2, trying to fall back to excluding kernel and hypervisor samples l1d.replacement:u: 4592 612201 612201 duration_time:u: 1001478621 1001478621 1001478621 Fixes: c2337d67199a1ea1 ("perf metricgroup: Fix metrics using aliases covering multiple PMUs") Reported-by: Joakim Zhang Signed-off-by: John Garry Tested-by: Arnaldo Carvalho de Melo Tested-by: Jiri Olsa Acked-by: Ian Rogers Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Kajol Jain Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: linuxarm@openeuler.org Link: https://lore.kernel.org/r/1611159518-226883-1-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit fc705fecf3a0c9128933cc6db59159c050aaca33 Author: Adrian Hunter Date: Thu Jan 21 14:54:46 2021 +0200 perf evlist: Fix id index for heterogeneous systems perf_evlist__set_sid_idx() updates perf_sample_id with the evlist map index, CPU number and TID. It is passed indexes to the evsel's cpu and thread maps, but references the evlist's maps instead. That results in using incorrect CPU numbers on heterogeneous systems. Fix it by using evsel maps. The id index (PERF_RECORD_ID_INDEX) is used by AUX area tracing when in sampling mode. Having an incorrect CPU number causes the trace data to be attributed to the wrong CPU, and can result in decoder errors because the trace data is then associated with the wrong process. Committer notes: Keep the class prefix convention in the function name, switching from perf_evlist__set_sid_idx() to perf_evsel__set_sid_idx(). Fixes: 3c659eedada2fbf9 ("perf tools: Add id index") Signed-off-by: Adrian Hunter Cc: Jin Yao Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20210121125446.11287-1-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 809b1e4945774c9ec5619a8f4e2189b7b3833c0c Author: Hannes Reinecke Date: Thu Jan 21 18:50:56 2021 +0100 dm: avoid filesystem lookup in dm_get_dev_t() This reverts commit 644bda6f3460 ("dm table: fall back to getting device using name_to_dev_t()") dm_get_dev_t() is just used to convert an arbitrary 'path' string into a dev_t. It doesn't presume that the device is present; that check will be done later, as the only caller is dm_get_device(), which does a dm_get_table_device() later on, which will properly open the device. So if the path string already _is_ in major:minor representation we can convert it directly, avoiding a recursion into the filesystem to lookup the block device. This avoids a hang in multipath_message() when the filesystem is inaccessible. Fixes: 644bda6f3460 ("dm table: fall back to getting device using name_to_dev_t()") Cc: stable@vger.kernel.org Signed-off-by: Hannes Reinecke Signed-off-by: Martin Wilck Reviewed-by: Christoph Hellwig Signed-off-by: Mike Snitzer commit 004b8ae9e2de55ca7857ba8471209dd3179e088c Author: Ignat Korchagin Date: Tue Jan 19 20:40:15 2021 +0000 dm crypt: fix copy and paste bug in crypt_alloc_req_aead In commit d68b29584c25 ("dm crypt: use GFP_ATOMIC when allocating crypto requests from softirq") code was incorrectly copy and pasted from crypt_alloc_req_skcipher()'s crypto request allocation code to crypt_alloc_req_aead(). It is OK from runtime perspective as both simple encryption request pointer and AEAD request pointer are part of a union, but may confuse code reviewers. Fixes: d68b29584c25 ("dm crypt: use GFP_ATOMIC when allocating crypto requests from softirq") Cc: stable@vger.kernel.org # v5.9+ Reported-by: Pavel Machek Signed-off-by: Ignat Korchagin Signed-off-by: Mike Snitzer commit 5c02406428d5219c367c5f53457698c58bc5f917 Author: Mikulas Patocka Date: Wed Jan 20 13:59:11 2021 -0500 dm integrity: conditionally disable "recalculate" feature Otherwise a malicious user could (ab)use the "recalculate" feature that makes dm-integrity calculate the checksums in the background while the device is already usable. When the system restarts before all checksums have been calculated, the calculation continues where it was interrupted even if the recalculate feature is not requested the next time the dm device is set up. Disable recalculating if we use internal_hash or journal_hash with a key (e.g. HMAC) and we don't have the "legacy_recalculate" flag. This may break activation of a volume, created by an older kernel, that is not yet fully recalculated -- if this happens, the user should add the "legacy_recalculate" flag to constructor parameters. Cc: stable@vger.kernel.org Signed-off-by: Mikulas Patocka Reported-by: Daniel Glockner Signed-off-by: Mike Snitzer commit 9f29bd8b2e7132b409178d1367dae1813017bd0e Merge: 2561bbbe2e959 5cdc4a6950a88 Author: Linus Torvalds Date: Thu Jan 21 11:45:40 2021 -0800 Merge tag 'fs_for_v5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull fs and udf fixes from Jan Kara: "A lazytime handling fix from Eric Biggers and a fix of UDF session handling for large devices" * tag 'fs_for_v5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: udf: fix the problem that the disc content is not displayed fs: fix lazytime expiration handling in __writeback_single_inode() commit 2d06dfecb132a1cc2e374a44eae83b5c4356b8b4 Author: Mikulas Patocka Date: Wed Jan 20 06:02:31 2021 -0500 dm integrity: fix a crash if "recalculate" used without "internal_hash" Recalculate can only be specified with internal_hash. Cc: stable@vger.kernel.org # v4.19+ Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit b11f623cc8e722b84d833d02b9f67f84bb2d604f Merge: cb5c681ab9037 2dc4a6d79168e Author: Greg Kroah-Hartman Date: Thu Jan 21 20:38:51 2021 +0100 Merge tag 'misc-habanalabs-fixes-2021-01-21' of https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux into char-misc-linus Oded writes: This tag contains the following bug fixes for 5.11-rc5/6: - Clear the fence field in the PCI counters packet before sending the packet to the F/W. Not clearing it might cause the driver and F/W to get out-of-sync - Fix backward compatibility in the uapi of IDLE check that is part of the INFO IOCTL. - Tell the F/W to not access the Host (device outbound) while the driver removes the device. If that happens, the server might crash. * tag 'misc-habanalabs-fixes-2021-01-21' of https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux: habanalabs: disable FW events on device removal habanalabs: fix backward compatibility of idle check habanalabs: zero pci counters packet before submit to FW commit 2561bbbe2e959c966e21ee23de91b9bd4bbf98af Merge: 6a52f4cf863a5 535b6a122c6b4 Author: Linus Torvalds Date: Thu Jan 21 11:37:22 2021 -0800 Merge tag 'printk-for-5.11-printk-rework-fixup' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux Pull printk fixes from Petr Mladek: - Fix line counting and buffer size calculation. Both regressions caused that a reader buffer might not get filled as much as possible. - Restore non-documented behavior of printk() reader API and make it official. It did not fill the last byte of the provided buffer before 5.10. Two architectures, powerpc and um, used it to add the trailing '\0'. There might theoretically be more callers depending on this behavior in userspace. * tag 'printk-for-5.11-printk-rework-fixup' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux: printk: fix buffer overflow potential for print_text() printk: fix kmsg_dump_get_buffer length calulations printk: ringbuffer: fix line counting commit 6a52f4cf863a53b8196286e2b95d3ef3bd8183ad Merge: 120fbdb84f339 78a18fec5258c Author: Linus Torvalds Date: Thu Jan 21 11:28:30 2021 -0800 Merge tag 'acpi-5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fix from Rafael Wysocki: "Modify a helper function in the ACPI core to match the behavior expected by its users so as to prevent NULL pointer dereferences and occasional memory corruption from occurring (Hans de Goede)" * tag 'acpi-5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: scan: Make acpi_bus_get_device() clear return pointer on error commit 120fbdb84f339ca3c358e4ac3fb1ffe663669d28 Merge: d7631e4378f26 506c203cc3de6 Author: Linus Torvalds Date: Thu Jan 21 11:25:35 2021 -0800 Merge tag 'sound-5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Here is a collection of sound fixes targeted for 5.11-rc5. Most notably, USB-audio still got a few intensive changes for covering the regressions while the rest are all small fixes. - A trivial fix for sequencer OSS emulation error path - HD-audio runtime PM regression fix, a few quirks and new IDs - USB-audio regression fixes for Pioneer device, Logitech webcams, etc - ASoC SOF Intel coverage - MAINTAINERS file update - A fix in the jack handling in ASoC HDMI codec" * tag 'sound-5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: usb-audio: Fix hw constraints dependencies ALSA: hda: Balance runtime/system PM if direct-complete is disabled ALSA: usb-audio: Avoid implicit feedback on Pioneer devices ALSA: usb-audio: Set sample rate for all sharing EPs on UAC1 ALSA: usb-audio: Fix UAC1 rate setup for secondary endpoints MAINTAINERS: update qcom ASoC drivers list MAINTAINERS: update maintainers of qcom audio ALSA: hda: Add Cometlake-R PCI ID ALSA: seq: oss: Fix missing error check in snd_seq_oss_synth_make_info() ALSA: hda/via: Add minimum mute flag ALSA: hda/realtek - Limit int mic boost on Acer Aspire E5-575T ALSA: usb-audio: Always apply the hw constraints for implicit fb sync ASoC: SOF: Intel: fix page fault at probe if i915 init fails ALSA: hda: Add AlderLake-P PCI ID and HDMI codec vid ASoC: SOF: Intel: hda: Avoid checking jack on system suspend ASoC: SOF: Intel: hda: Modify existing helper to disable WAKEEN ASoC: SOF: Intel: hda: Resume codec to do jack detection MAINTAINERS: update references to stm32 audio bindings ASoC: hdmi-codec: Fix return value in hdmi_codec_set_jack() commit d7631e4378f26c8e1ba1ad372888e89e69678709 Merge: 63858ac326561 298d75c9b1887 Author: Linus Torvalds Date: Thu Jan 21 11:19:59 2021 -0800 Merge tag 'gpio-fixes-for-v5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio fixes from Bartosz Golaszewski: - rework the character device code to avoid a frame size warning - fix printk format issues in gpio-tools - warn on redefinition of the to_irq callback in core gpiolib code - fix PWM period calculation in gpio-mvebu - make gpio-sifive Kconfig entry consistent with other drivers - fix a build issue in gpio-tegra * tag 'gpio-fixes-for-v5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpio: tegra: Add missing dependencies gpio: sifive: select IRQ_DOMAIN_HIERARCHY rather than depend on it gpio: mvebu: fix pwm .get_state period calculation gpiolib: add a warning on gpiochip->to_irq defined tools: gpio: fix %llu warning in gpio-watch.c tools: gpio: fix %llu warning in gpio-event-mon.c gpiolib: cdev: fix frame size warning in gpio_ioctl() commit 63858ac326561af6a1e583ad4314cc1be16852ad Merge: 9791581c049c1 cf9d052aa6005 Author: Linus Torvalds Date: Thu Jan 21 11:14:24 2021 -0800 Merge tag 'pinctrl-v5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: "These are all driver fixes, the Qualcomm stuff is the most widely used and important: - The main matter is a complicated fixup for the Qualcomm deep sleep states. This manifests in how interrupts get handled or in some cases not handled in cooperation with the PDC (Power Domain Controller). It's one of these really hardcore bug fixes that signifies high maturity of the platform. - Fix a register layout problem in the JZ4760 driver - Fix a register offset in the Aspeed G6 driver - Fix a compiler warning in the Nomadik driver - Fix a fallback code path in the mediatek driver" * tag 'pinctrl-v5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: qcom: Don't clear pending interrupts when enabling pinctrl: qcom: Properly clear "intr_ack_high" interrupts when unmasking pinctrl: qcom: No need to read-modify-write the interrupt status pinctrl: qcom: Allow SoCs to specify a GPIO function that's not 0 pinctrl: mediatek: Fix fallback call path pinctrl: nomadik: Remove unused variable in nmk_gpio_dbg_show_one pinctrl: aspeed: g6: Fix PWMG0 pinctrl setting pinctrl: ingenic: Rename registers from JZ4760_GPIO_* to JZ4770_GPIO_* pinctrl: ingenic: Fix JZ4760 support commit e020ff611ba9be54e959e6b548038f8a020da1c9 Author: Saravana Kannan Date: Sun Jan 10 09:54:07 2021 -0800 driver core: Fix device link device name collision The device link device's name was of the form: -- This can cause name collision as reported here [1] as device names are not globally unique. Since device names have to be unique within the bus/class, add the bus/class name as a prefix to the device names used to construct the device link device name. So the devuce link device's name will be of the form: :--: [1] - https://lore.kernel.org/lkml/20201229033440.32142-1-michael@walle.cc/ Fixes: 287905e68dd2 ("driver core: Expose device link details in sysfs") Cc: stable@vger.kernel.org Reported-by: Michael Walle Tested-by: Michael Walle Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20210110175408.1465657-1-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 35c715c30b95205e64311c3bb3525094cd3d7236 Merge: 1c45ba93d34cd da64ae2d35d36 Author: Jakub Kicinski Date: Thu Jan 21 11:05:08 2021 -0800 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec Steffen Klassert says: ==================== pull request (net): ipsec 2021-01-21 1) Fix a rare panic on SMP systems when packet reordering happens between anti replay check and update. From Shmulik Ladkani. 2) Fix disable_xfrm sysctl when used on xfrm interfaces. From Eyal Birger. 3) Fix a race in PF_KEY when the availability of crypto algorithms is set. From Cong Wang. 4) Fix a return value override in the xfrm policy selftests. From Po-Hsu Lin. 5) Fix an integer wraparound in xfrm_policy_addr_delta. From Visa Hankala. * 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec: xfrm: Fix wraparound in xfrm_policy_addr_delta() selftests: xfrm: fix test return value override issue in xfrm_policy.sh af_key: relax availability checks for skb size calculation xfrm: fix disable_xfrm sysctl when used on xfrm interfaces xfrm: Fix oops in xfrm_replay_advance_bmp ==================== Link: https://lore.kernel.org/r/20210121121558.621339-1-steffen.klassert@secunet.com Signed-off-by: Jakub Kicinski commit 2dc4a6d79168e7e426e8ddf8e7219c9ffd13b2b1 Author: Oded Gabbay Date: Mon Jan 18 21:39:46 2021 +0200 habanalabs: disable FW events on device removal When device is removed, we need to make sure the F/W won't send us any more events because during the remove process we disable the interrupts. Signed-off-by: Oded Gabbay commit f8abaf379bfe19600f96ae79a6759eb37039ae05 Author: Oded Gabbay Date: Mon Jan 18 13:19:51 2021 +0200 habanalabs: fix backward compatibility of idle check Need to take the lower 32 bits of the driver's 64-bit idle mask and put it in the legacy 32-bit variable that the userspace reads to know the idle mask. Signed-off-by: Oded Gabbay commit 9354f1b421f76f8368be13954f87d07bcbd6fffe Author: Ofir Bitton Date: Sun Jan 17 09:39:37 2021 +0200 habanalabs: zero pci counters packet before submit to FW Driver does not zero some pci counters packets before sending to FW. This causes an out of sync PI/CI between driver and FW. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 1d8fe0648e118fd495a2cb393a34eb8d428e7808 Author: Ricardo Ribalda Date: Thu Jan 21 18:16:44 2021 +0100 ASoC: Intel: Skylake: Zero snd_ctl_elem_value Clear struct snd_ctl_elem_value before calling ->put() to avoid any data leak. Signed-off-by: Ricardo Ribalda Reviewed-by: Cezary Rojewski Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210121171644.131059-2-ribalda@chromium.org Signed-off-by: Mark Brown commit c1c3ba1f78354a20222d291ed6fedd17b7a74fd7 Author: Ricardo Ribalda Date: Thu Jan 21 18:16:43 2021 +0100 ASoC: Intel: Skylake: skl-topology: Fix OOPs ib skl_tplg_complete If dobj->control is not initialized we end up in an OOPs during skl_tplg_complete: [ 26.553358] BUG: kernel NULL pointer dereference, address: 0000000000000078 [ 26.561151] #PF: supervisor read access in kernel mode [ 26.566897] #PF: error_code(0x0000) - not-present page [ 26.572642] PGD 0 P4D 0 [ 26.575479] Oops: 0000 [#1] PREEMPT SMP PTI [ 26.580158] CPU: 2 PID: 2082 Comm: udevd Tainted: G C 5.4.81 #4 [ 26.588232] Hardware name: HP Soraka/Soraka, BIOS Google_Soraka.10431.106.0 12/03/2019 [ 26.597082] RIP: 0010:skl_tplg_complete+0x70/0x144 [snd_soc_skl] Fixes: 2d744ecf2b98 ("ASoC: Intel: Skylake: Automatic DMIC format configuration according to information from NHL") Signed-off-by: Ricardo Ribalda Reviewed-by: Cezary Rojewski Tested-by: Lukasz Majczak Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210121171644.131059-1-ribalda@chromium.org Signed-off-by: Mark Brown commit cb5c681ab9037e25fcca20689c82cf034566d610 Author: Alexander Shishkin Date: Fri Jan 15 22:59:17 2021 +0300 intel_th: pci: Add Alder Lake-P support This adds support for the Trace Hub in Alder Lake-P. Signed-off-by: Alexander Shishkin Link: https://lore.kernel.org/r/20210115195917.3184-3-alexander.shishkin@linux.intel.com Cc: stable Signed-off-by: Greg Kroah-Hartman commit 927633a6d20af319d986f3e42c3ef9f6d7835008 Author: Wang Hui Date: Fri Jan 15 22:59:16 2021 +0300 stm class: Fix module init return on allocation failure In stm_heartbeat_init(): return value gets reset after the first iteration by stm_source_register_device(), so allocation failures after that will, after a clean up, return success. Fix that. Fixes: 119291853038 ("stm class: Add heartbeat stm source device") Reported-by: Hulk Robot Signed-off-by: Wang Hui Signed-off-by: Alexander Shishkin Link: https://lore.kernel.org/r/20210115195917.3184-2-alexander.shishkin@linux.intel.com Cc: stable Signed-off-by: Greg Kroah-Hartman commit 3d1cf435e201d1fd63e4346b141881aed086effd Author: Rafael J. Wysocki Date: Fri Jan 15 19:30:51 2021 +0100 driver core: Extend device_is_dependent() If the device passed as the target (second argument) to device_is_dependent() is not completely registered (that is, it has been initialized, but not added yet), but the parent pointer of it is set, it may be missing from the list of the parent's children and device_for_each_child() called by device_is_dependent() cannot be relied on to catch that dependency. For this reason, modify device_is_dependent() to check the ancestors of the target device by following its parent pointer in addition to the device_for_each_child() walk. Fixes: 9ed9895370ae ("driver core: Functional dependencies tracking support") Reported-by: Stephan Gerhold Tested-by: Stephan Gerhold Reviewed-by: Saravana Kannan Signed-off-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/17705994.d592GUb2YH@kreacher Cc: stable Signed-off-by: Greg Kroah-Hartman commit f2d6c2708bd84ca953fa6b6ca5717e79eb0140c7 Author: Christoph Hellwig Date: Wed Jan 20 21:46:31 2021 +0100 kernfs: wire up ->splice_read and ->splice_write Wire up the splice_read and splice_write methods to the default helpers using ->read_iter and ->write_iter now that those are implemented for kernfs. This restores support to use splice and sendfile on kernfs files. Fixes: 36e2c7421f02 ("fs: don't allow splice read/write without explicit ops") Reported-by: Siddharth Gupta Tested-by: Siddharth Gupta Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210120204631.274206-4-hch@lst.de Signed-off-by: Greg Kroah-Hartman commit cc099e0b399889c6485c88368b19824b087c9f8c Author: Christoph Hellwig Date: Wed Jan 20 21:46:30 2021 +0100 kernfs: implement ->write_iter Switch kernfs to implement the write_iter method instead of plain old write to prepare to supporting splice and sendfile again. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210120204631.274206-3-hch@lst.de Signed-off-by: Greg Kroah-Hartman commit 4eaad21a6ac9865df7f31983232ed5928450458d Author: Christoph Hellwig Date: Wed Jan 20 21:46:29 2021 +0100 kernfs: implement ->read_iter Switch kernfs to implement the read_iter method instead of plain old read to prepare to supporting splice and sendfile again. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210120204631.274206-2-hch@lst.de Signed-off-by: Greg Kroah-Hartman commit 9d5ae6f3c50a6f718b6d4be3c7b0828966e01b05 Author: Ilya Dryomov Date: Wed Jan 20 14:49:07 2021 +0100 libceph: fix "Boolean result is used in bitwise operation" warning This line dates back to 2013, but cppcheck complained because commit 2f713615ddd9 ("libceph: move msgr1 protocol implementation to its own file") moved it. Add parenthesis to silence the warning. Reported-by: kernel test robot Signed-off-by: Ilya Dryomov commit 39263a2f886817a376fc27ba9af14c5053f0934b Author: Aaron Liu Date: Mon Jan 18 17:05:00 2021 +0800 drm/amdgpu: update mmhub mgcg&ls for mmhub_v2_3 Starting from vangogh, the ATCL2 and DAGB0 registers relative to mgcg/ls has changed. For MGCG: Replace mmMM_ATC_L2_MISC_CG with mmMM_ATC_L2_CGTT_CLK_CTRL. For MGLS: Replace mmMM_ATC_L2_MISC_CG with mmMM_ATC_L2_CGTT_CLK_CTRL. Add DAGB0_(WR/RD)_CGTT_CLK_CTRL registers. Signed-off-by: Aaron Liu Acked-by: Huang Rui Signed-off-by: Alex Deucher commit 8f0d60fe8bf24fd79892a1a22f16c0629d5af6d3 Author: Jinzhou Su Date: Mon Jan 18 19:14:27 2021 +0800 drm/amdgpu: modify GCR_GENERAL_CNTL for Vangogh GCR_GENERAL_CNTL is defined differently in gc_10_1_0_offset.h and gc_10_3_0_offset.h. Update GCR_GENERAL_CNTL for Vangogh. Signed-off-by: Jinzhou Su Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 51e87da7d4014f49769dcf60b8626a81492df2c4 Author: Prike Liang Date: Thu Dec 17 13:55:46 2020 +0800 drm/amdgpu/pm: no need GPU status set since mmnbif_gpu_BIF_DOORBELL_FENCE_CNTL added in FSDL In the renoir there is no need GpuChangeState message set to exit gfxoff in the s0i3 resume since mmnbif_gpu_BIF_DOORBELL_FENCE_CNTL has been added in the s0i3 FSDL. Signed-off-by: Prike Liang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 4b08d8c78360241d270396a9de6eb774e88acd00 Author: Vladimir Stempen Date: Mon Jan 4 12:05:26 2021 -0500 drm/amd/display: Fixed corruptions on HPDRX link loss restore [why] Heavy corruption or blank screen reported on wake, with 6k display connected and FEC enabled [how] When Disable/Enable stream for display pipes on HPDRX, DC should take into account ODM split pipes. Tested-by: Daniel Wheeler Signed-off-by: Vladimir Stempen Reviewed-by: Aric Cyr Acked-by: Anson Jacob Signed-off-by: Alex Deucher commit c74f865f14318217350aa33363577cb95b06eb82 Author: Nicholas Kazlauskas Date: Sun Dec 13 10:59:01 2020 -0500 drm/amd/display: Use hardware sequencer functions for PG control [Why & How] These can differ per ASIC or not be present. Don't call the dcn20 ones directly but rather the ones defined by the ASIC init table. Tested-by: Daniel Wheeler Signed-off-by: Nicholas Kazlauskas Reviewed-by: Eric Yang Acked-by: Anson Jacob Signed-off-by: Alex Deucher commit 4716a7c50c5c66d6ddc42401e1e0ba13b492e105 Author: Bing Guo Date: Mon Jan 4 14:09:41 2021 -0500 drm/amd/display: Change function decide_dp_link_settings to avoid infinite looping Why: Function decide_dp_link_settings() loops infinitely when required bandwidth can't be supported. How: Check the required bandwidth against verified_link_cap before trying to find a link setting for it. Tested-by: Daniel Wheeler Signed-off-by: Bing Guo Reviewed-by: Jun Lei Acked-by: Anson Jacob Signed-off-by: Alex Deucher commit 8bc3d461d0a95bbcc2a0a908bbadc87e198a86a8 Author: Aric Cyr Date: Thu Oct 29 17:45:19 2020 -0400 drm/amd/display: Allow PSTATE chnage when no displays are enabled [Why] When no displays are currently enabled, display driver should not disallow PSTATE switching. [How] Allow PSTATE switching if either the active configuration supports it, or there are no active displays. Tested-by: Daniel Wheeler Signed-off-by: Aric Cyr Reviewed-by: Jun Lei Acked-by: Anson Jacob Signed-off-by: Alex Deucher commit bdfc6fd6c8df1a9d481c4417df571e94a33168bf Author: Jake Wang Date: Fri Jan 8 12:27:51 2021 -0500 drm/amd/display: Update dram_clock_change_latency for DCN2.1 [WHY] dram clock change latencies get updated using ddr4 latency table, but that update does not happen before validation. This value should not be the default and should be number received from df for better mode support. This may cause a PState hang on high refresh panels with short vblanks such as on 1080p 360hz or 300hz panels. [HOW] Update latency from 23.84 to 11.72. Tested-by: Daniel Wheeler Signed-off-by: Jake Wang Reviewed-by: Sung Lee Acked-by: Anson Jacob Signed-off-by: Alex Deucher commit acc214bfafbafcd29d5d25d1ede5f11c14ffc147 Author: Huang Rui Date: Tue Jan 19 13:35:21 2021 +0800 drm/amdgpu: remove gpu info firmware of green sardine The ip discovery is supported on green sardine, it doesn't need gpu info firmware anymore. Signed-off-by: Huang Rui Reviewed-by: Prike Liang Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 5.10.x commit 348fe1ca5ccdca0f8c285e2ab99004fdcd531430 Author: Sung Lee Date: Tue Jan 5 14:32:29 2021 -0500 drm/amd/display: DCN2X Find Secondary Pipe properly in MPO + ODM Case [WHY] Previously as MPO + ODM Combine was not supported, finding secondary pipes for each case was mutually exclusive. Now that both are supported at the same time, both cases should be taken into account when finding a secondary pipe. [HOW] If a secondary pipe cannot be found based on previous bottom pipe, search for a second pipe using next_odm_pipe instead. Tested-by: Daniel Wheeler Signed-off-by: Sung Lee Reviewed-by: Dmytro Laktyushkin Acked-by: Anson Jacob Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 5.10.x commit 535b6a122c6b43af5772ca39cbff7056749aae74 Merge: a91bd6223ecd4 f0e386ee0c0b7 Author: Petr Mladek Date: Thu Jan 21 16:06:21 2021 +0100 Merge branch 'printk-rework' into for-linus commit 139bc8a6146d92822c866cf2fd410159c56b3648 Author: Marc Zyngier Date: Thu Jan 21 12:08:15 2021 +0000 KVM: Forbid the use of tagged userspace addresses for memslots The use of a tagged address could be pretty confusing for the whole memslot infrastructure as well as the MMU notifiers. Forbid it altogether, as it never quite worked the first place. Cc: stable@vger.kernel.org Reported-by: Rick Edgecombe Reviewed-by: Catalin Marinas Signed-off-by: Marc Zyngier commit 97784481757fba7570121a70dd37ca74a29f50a8 Author: Pan Bian Date: Wed Jan 20 23:22:02 2021 -0800 lightnvm: fix memory leak when submit fails The allocated page is not released if error occurs in nvm_submit_io_sync_raw(). __free_page() is moved ealier to avoid possible memory leak issue. Fixes: aff3fb18f957 ("lightnvm: move bad block and chunk state logic to core") Signed-off-by: Pan Bian Signed-off-by: Jens Axboe commit 1df35bf0b4e17322ec67e88b86ba21a17f904069 Merge: 8dfe11681758b fa0732168fa13 Author: Jens Axboe Date: Thu Jan 21 05:40:34 2021 -0700 Merge tag 'nvme-5.11-2020-01-21' of git://git.infradead.org/nvme into block-5.11 Pull NVMe fixes from Christoph: "nvme fixes for 5.11: - fix a status code in nvmet (Chaitanya Kulkarni) - avoid double completions in nvme-rdma/nvme-tcp (Chao Leng) - fix the CMB support to cope with NVMe 1.4 controllers (Klaus Jensen) - fix PRINFO handling in the passthrough ioctl (Revanth Rajashekar) - fix a double DMA unmap in nvme-pci" * tag 'nvme-5.11-2020-01-21' of git://git.infradead.org/nvme: nvme-pci: fix error unwind in nvme_map_data nvme-pci: refactor nvme_unmap_data nvmet: set right status on error in id-ns handler nvme-pci: allow use of cmb on v1.4 controllers nvme-tcp: avoid request double completion for concurrent nvme_tcp_timeout nvme-rdma: avoid request double completion for concurrent nvme_rdma_timeout nvme: check the PRINFO bit before deciding the host buffer length commit 67de8dca50c027ca0fa3b62a488ee5035036a0da Author: Andy Lutomirski Date: Wed Jan 20 21:09:49 2021 -0800 x86/mmx: Use KFPU_387 for MMX string operations The default kernel_fpu_begin() doesn't work on systems that support XMM but haven't yet enabled CR4.OSFXSR. This causes crashes when _mmx_memcpy() is called too early because LDMXCSR generates #UD when the aforementioned bit is clear. Fix it by using kernel_fpu_begin_mask(KFPU_387) explicitly. Fixes: 7ad816762f9b ("x86/fpu: Reset MXCSR to default in kernel_fpu_begin()") Reported-by: Krzysztof Mazur Signed-off-by: Andy Lutomirski Signed-off-by: Borislav Petkov Tested-by: Krzysztof Piotr Olędzki Tested-by: Krzysztof Mazur Cc: Link: https://lkml.kernel.org/r/e7bf21855fe99e5f3baa27446e32623358f69e8d.1611205691.git.luto@kernel.org commit dcf3c8fb32ddbfa3b8227db38aa6746405bd4527 Author: Shay Bar Date: Tue Dec 22 08:47:14 2020 +0200 mac80211: 160MHz with extended NSS BW in CSA Upon receiving CSA with 160MHz extended NSS BW from associated AP, STA should set the HT operation_mode based on new_center_freq_seg1 because it is later used as ccfs2 in ieee80211_chandef_vht_oper(). Signed-off-by: Aviad Brikman Signed-off-by: Shay Bar Link: https://lore.kernel.org/r/20201222064714.24888-1-shay.bar@celeno.com Signed-off-by: Johannes Berg commit 51dfb6ca3728bd0a0a3c23776a12d2a15a1d2457 Author: Dmitry Osipenko Date: Wed Jan 20 23:58:44 2021 +0300 regulator: consumer: Add missing stubs to regulator/consumer.h Add missing stubs to regulator/consumer.h in order to fix COMPILE_TEST of the kernel. In particular this should fix compile-testing of OPP core because of a missing stub for regulator_sync_voltage(). Reported-by: kernel test robot Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20210120205844.12658-1-digetx@gmail.com Signed-off-by: Mark Brown commit 7dfe20ee92f681ab1342015254ddb77a18f40cdb Author: Stephen Boyd Date: Fri Jan 15 12:33:29 2021 -0800 ASoC: qcom: Fix number of HDMI RDMA channels on sc7180 Suspending/resuming with an HDMI dongle attached leads to crashes from an audio regmap. Unable to handle kernel paging request at virtual address ffffffc018068000 Mem abort info: ESR = 0x96000047 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 Data abort info: ISV = 0, ISS = 0x00000047 CM = 0, WnR = 1 swapper pgtable: 4k pages, 39-bit VAs, pgdp=0000000081b12000 [ffffffc018068000] pgd=0000000275d14003, pud=0000000275d14003, pmd=000000026365d003, pte=0000000000000000 Internal error: Oops: 96000047 [#1] PREEMPT SMP Call trace: regmap_mmio_write32le+0x2c/0x40 regmap_mmio_write+0x48/0x6c _regmap_bus_reg_write+0x34/0x44 _regmap_write+0x100/0x150 regcache_default_sync+0xc0/0x138 regcache_sync+0x188/0x26c lpass_platform_pcmops_resume+0x48/0x54 [snd_soc_lpass_platform] snd_soc_component_resume+0x28/0x40 soc_resume_deferred+0x6c/0x178 process_one_work+0x208/0x3c8 worker_thread+0x23c/0x3e8 kthread+0x144/0x178 ret_from_fork+0x10/0x18 Code: d503201f d50332bf f94002a8 8b344108 (b9000113) I can reliably reproduce this problem by running 'tail' on the registers file in debugfs for the hdmi regmap. # tail /sys/kernel/debug/regmap/62d87000.lpass-lpass_hdmi/registers [ 84.658733] Unable to handle kernel paging request at virtual address ffffffd0128e800c This crash happens because we're trying to read registers from the regmap beyond the length of the mapping created by ioremap(). The number of hdmi_rdma_channels determines the size of the regmap via this code in sound/soc/qcom/lpass-cpu.c: lpass_hdmi_regmap_config.max_register = LPAIF_HDMI_RDMAPER_REG(variant, variant->hdmi_rdma_channels); According to debugfs the size of the regmap is 0x68010 but according to the DTS file posted in [1] the size is only 0x68000 (see the first reg property of the lpass_cpu node). Let's change the number of channels to be 3 instead of 4 so the math works out to have a max register of 0x67010, nicely fitting inside of the region size of 0x68000. Note: I tried to bump up the size of the register region to the next page to include the 0x68010 register but then the tail command caused SErrors with an async abort, implying that the register region doesn't exist or it isn't clocked because the bus is telling us that the register read failed. I reduce the number of channels and played audio through the HDMI channel and it kept working so I think this is correct. Fixes: 2ad63dc8df6b ("ASoC: qcom: sc7180: Add support for audio over DP") Link: https://lore.kernel.org/r/1601448168-18396-2-git-send-email-srivasam@codeaurora.org [1] Cc: V Sujith Kumar Reddy Cc: Srinivasa Rao Cc: Srinivas Kandagatla Cc: Cheng-Yi Chiang Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20210115203329.846824-1-swboyd@chromium.org Signed-off-by: Mark Brown commit e45122893a9870813f9bd7b4add4f613e6f29008 Author: Andy Lutomirski Date: Wed Jan 20 21:09:48 2021 -0800 x86/fpu: Add kernel_fpu_begin_mask() to selectively initialize state Currently, requesting kernel FPU access doesn't distinguish which parts of the extended ("FPU") state are needed. This is nice for simplicity, but there are a few cases in which it's suboptimal: - The vast majority of in-kernel FPU users want XMM/YMM/ZMM state but do not use legacy 387 state. These users want MXCSR initialized but don't care about the FPU control word. Skipping FNINIT would save time. (Empirically, FNINIT is several times slower than LDMXCSR.) - Code that wants MMX doesn't want or need MXCSR initialized. _mmx_memcpy(), for example, can run before CR4.OSFXSR gets set, and initializing MXCSR will fail because LDMXCSR generates an #UD when the aforementioned CR4 bit is not set. - Any future in-kernel users of XFD (eXtended Feature Disable)-capable dynamic states will need special handling. Add a more specific API that allows callers to specify exactly what they want. Signed-off-by: Andy Lutomirski Signed-off-by: Borislav Petkov Tested-by: Krzysztof Piotr Olędzki Link: https://lkml.kernel.org/r/aff1cac8b8fc7ee900cf73e8f2369966621b053f.1611205691.git.luto@kernel.org commit 9529aaa056edc76b3a41df616c71117ebe11e049 Author: Marc Zyngier Date: Thu Jan 21 10:56:36 2021 +0000 KVM: arm64: Filter out v8.1+ events on v8.0 HW When running on v8.0 HW, make sure we don't try to advertise events in the 0x4000-0x403f range. Cc: stable@vger.kernel.org Fixes: 88865beca9062 ("KVM: arm64: Mask out filtered events in PCMEID{0,1}_EL1") Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210121105636.1478491-1-maz@kernel.org commit dcb3b06d9c34f33a249f65c08805461fb0c4325b Author: Rouven Czerwinski Date: Tue Jan 5 11:28:44 2021 +0100 tee: optee: replace might_sleep with cond_resched might_sleep() is a debugging aid and triggers rescheduling only for certain kernel configurations. Replace with an explicit check and reschedule to work for all kernel configurations. Fixes the following trace: [ 572.945146] rcu: INFO: rcu_sched self-detected stall on CPU [ 572.949275] rcu: 0-....: (2099 ticks this GP) idle=572/1/0x40000002 softirq=7412/7412 fqs=974 [ 572.957964] (t=2100 jiffies g=10393 q=21) [ 572.962054] NMI backtrace for cpu 0 [ 572.965540] CPU: 0 PID: 165 Comm: xtest Not tainted 5.8.7 #1 [ 572.971188] Hardware name: STM32 (Device Tree Support) [ 572.976354] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 572.984080] [] (show_stack) from [] (dump_stack+0xc4/0xd8) [ 572.991300] [] (dump_stack) from [] (nmi_cpu_backtrace+0x90/0xc4) [ 572.999130] [] (nmi_cpu_backtrace) from [] (nmi_trigger_cpumask_backtrace+0xec/0x130) [ 573.008706] [] (nmi_trigger_cpumask_backtrace) from [] (rcu_dump_cpu_stacks+0xe8/0x110) [ 573.018453] [] (rcu_dump_cpu_stacks) from [] (rcu_sched_clock_irq+0x7fc/0xa88) [ 573.027416] [] (rcu_sched_clock_irq) from [] (update_process_times+0x30/0x8c) [ 573.036291] [] (update_process_times) from [] (tick_sched_timer+0x4c/0xa8) [ 573.044905] [] (tick_sched_timer) from [] (__hrtimer_run_queues+0x174/0x358) [ 573.053696] [] (__hrtimer_run_queues) from [] (hrtimer_interrupt+0x118/0x2bc) [ 573.062573] [] (hrtimer_interrupt) from [] (arch_timer_handler_virt+0x28/0x30) [ 573.071536] [] (arch_timer_handler_virt) from [] (handle_percpu_devid_irq+0x8c/0x240) [ 573.081109] [] (handle_percpu_devid_irq) from [] (generic_handle_irq+0x34/0x44) [ 573.090156] [] (generic_handle_irq) from [] (__handle_domain_irq+0x5c/0xb0) [ 573.098857] [] (__handle_domain_irq) from [] (gic_handle_irq+0x4c/0x90) [ 573.107209] [] (gic_handle_irq) from [] (__irq_svc+0x6c/0x90) [ 573.114682] Exception stack(0xd90dfcf8 to 0xd90dfd40) [ 573.119732] fce0: ffff0004 00000000 [ 573.127917] fd00: 00000000 00000000 00000000 00000000 00000000 00000000 d93493cc ffff0000 [ 573.136098] fd20: d2bc39c0 be926998 d90dfd58 d90dfd48 c09f3384 c01151f0 400d0013 ffffffff [ 573.144281] [] (__irq_svc) from [] (__arm_smccc_smc+0x10/0x20) [ 573.151854] [] (__arm_smccc_smc) from [] (optee_smccc_smc+0x3c/0x44) [ 573.159948] [] (optee_smccc_smc) from [] (optee_do_call_with_arg+0xb8/0x154) [ 573.168735] [] (optee_do_call_with_arg) from [] (optee_invoke_func+0x110/0x190) [ 573.177786] [] (optee_invoke_func) from [] (tee_ioctl+0x10b8/0x11c0) [ 573.185879] [] (tee_ioctl) from [] (ksys_ioctl+0xe0/0xa4c) [ 573.193101] [] (ksys_ioctl) from [] (ret_fast_syscall+0x0/0x54) [ 573.200750] Exception stack(0xd90dffa8 to 0xd90dfff0) [ 573.205803] ffa0: be926bf4 be926a78 00000003 8010a403 be926908 004e3cf8 [ 573.213987] ffc0: be926bf4 be926a78 00000000 00000036 be926908 be926918 be9269b0 bffdf0f8 [ 573.222162] ffe0: b6d76fb0 be9268fc b6d66621 b6c7e0d8 seen on STM32 DK2 with CONFIG_PREEMPT_NONE. Fixes: 9f02b8f61f29 ("tee: optee: add might_sleep for RPC requests") Signed-off-by: Rouven Czerwinski Tested-by: Sumit Garg [jw: added fixes tag + small adjustments in the code] Signed-off-by: Jens Wiklander commit e1663372d5ffaa3fc79b7932878c5c860f735412 Author: Steven Price Date: Fri Jan 8 16:12:54 2021 +0000 KVM: arm64: Compute TPIDR_EL2 ignoring MTE tag KASAN in HW_TAGS mode will store MTE tags in the top byte of the pointer. When computing the offset for TPIDR_EL2 we don't want anything in the top byte, so remove the tag to ensure the computation is correct no matter what the tag. Fixes: 94ab5b61ee16 ("kasan, arm64: enable CONFIG_KASAN_HW_TAGS") Signed-off-by: Steven Price [maz: added comment] Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210108161254.53674-1-steven.price@arm.com commit 494e63ee9c9f322c1051acc537ac5b99688f7e58 Merge: 54ca955b5a402 9bb48c82aced0 Author: Greg Kroah-Hartman Date: Thu Jan 21 09:37:00 2021 +0100 Merge 9bb48c82aced ("tty: implement write_iter") into tty-linus We want the single "splice/sendfile to a tty" regression fix into tty-linus so it can get into 5.11-final, while the larger patch series fixing "splice/sendfile from a tty" should wait for 5.12-rc1 so that we get more testing. Signed-off-by: Greg Kroah-Hartman commit 17cbe03872be8878e2f84047424350d036915df1 Author: Levi Yun Date: Wed Jan 20 21:28:18 2021 +0900 mm/memblock: Fix typo in comment of memblock_phys_alloc_try_nid() memblock_phys_alloc_try_nid function's comments has typo NUMA as MUMA. Correct this typo. Signed-off-by: Levi Yun Reviewed-by: David Hildenbrand Signed-off-by: Mike Rapoport commit 1c45ba93d34cd6af75228f34d0675200c81738b5 Author: Marek Vasut Date: Wed Jan 20 04:05:02 2021 +0100 net: dsa: microchip: Adjust reset release timing to match reference reset circuit KSZ8794CNX datasheet section 8.0 RESET CIRCUIT describes recommended circuit for interfacing with CPU/FPGA reset consisting of 10k pullup resistor and 10uF capacitor to ground. This circuit takes ~100 ms to rise enough to release the reset. For maximum supply voltage VDDIO=3.3V VIH=2.0V R=10kR C=10uF that is VDDIO - VIH t = R * C * -ln( ------------- ) = 10000*0.00001*-(-0.93)=0.093 s VDDIO so we need ~95 ms for the reset to really de-assert, and then the original 100us for the switch itself to come out of reset. Simply msleep() for 100 ms which fits the constraint with a bit of extra space. Fixes: 5b797980908a ("net: dsa: microchip: Implement recommended reset timing") Reviewed-by: Florian Fainelli Signed-off-by: Marek Vasut Cc: Michael Grzeschik Reviewed-by: Paul Barker Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20210120030502.617185-1-marex@denx.de Signed-off-by: Jakub Kicinski commit c369d7fc8fddc5e5af4aea73dd403681a74c1a86 Author: Marek Vasut Date: Wed Jan 20 01:10:45 2021 +0100 net: dsa: microchip: ksz8795: Fix KSZ8794 port map again The KSZ8795 switch has 4 external ports {0,1,2,3} and 1 CPU port {4}, so does the KSZ8765. The KSZ8794 seems to be repackaged KSZ8795 with different ID and port 3 not routed out, however the port 3 registers are present in the silicon, so the KSZ8794 switch has 3 external ports {0,1,2} and 1 CPU port {4}. Currently the driver always uses the last port as CPU port, on KSZ8795/KSZ8765 that is port 4 and that is OK, but on KSZ8794 that is port 3 and that is not OK, as it must also be port 4. This patch adjusts the driver such that it always registers a switch with 5 ports total (4 external ports, 1 CPU port), always sets the CPU port to switch port 4, and then configures the external port mask according to the switch model -- 3 ports for KSZ8794 and 4 for KSZ8795/KSZ8765. Fixes: 68a1b676db52 ("net: dsa: microchip: ksz8795: remove superfluous port_cnt assignment") Fixes: 4ce2a984abd8 ("net: dsa: microchip: ksz8795: use phy_port_cnt where possible") Fixes: 241ed719bc98 ("net: dsa: microchip: ksz8795: use port_cnt instead of TOTOAL_PORT_NUM") Signed-off-by: Marek Vasut Cc: Michael Grzeschik Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20210120001045.488506-1-marex@denx.de Signed-off-by: Jakub Kicinski commit aa2c24e7f415e9c13635cee22ff4e15a80215551 Author: Enzo Matsumiya Date: Mon Jan 18 15:49:22 2021 -0300 scsi: qla2xxx: Fix description for parameter ql2xenforce_iocb_limit Parameter ql2xenforce_iocb_limit is enabled by default. Link: https://lore.kernel.org/r/20210118184922.23793-1-ematsumiya@suse.de Fixes: 89c72f4245a8 ("scsi: qla2xxx: Add IOCB resource tracking") Reviewed-by: Daniel Wagner Reviewed-by: Himanshu Madhani Signed-off-by: Enzo Matsumiya Signed-off-by: Martin K. Petersen commit 389102a3515b53a38858554a915006be7f0b6a06 Author: Valdis Kletnieks Date: Fri Jan 15 02:07:03 2021 -0500 scsi: target: iscsi: Fix typo in comment Correct the spelling of Nagle's name in a comment. Link: https://lore.kernel.org/r/2921.1610694423@turing-police Reviewed-by: Chaitanya Kulkarni Signed-off-by: Valdis Klētnieks Signed-off-by: Martin K. Petersen commit 9bb48c82aced07698a2d08ee0f1475a6c4f6b266 Author: Linus Torvalds Date: Tue Jan 19 11:41:16 2021 -0800 tty: implement write_iter This makes the tty layer use the .write_iter() function instead of the traditional .write() functionality. That allows writev(), but more importantly also makes it possible to enable .splice_write() for ttys, reinstating the "splice to tty" functionality that was lost in commit 36e2c7421f02 ("fs: don't allow splice read/write without explicit ops"). Fixes: 36e2c7421f02 ("fs: don't allow splice read/write without explicit ops") Reported-by: Oliver Giles Cc: Christoph Hellwig Cc: Greg Kroah-Hartman Cc: Al Viro Signed-off-by: Linus Torvalds commit 411fc208eb60ec2588ee37bc8e3551e0bf695fda Merge: d146c7b0fe9a5 cd3484f7f1386 Author: Mark Brown Date: Thu Jan 21 00:00:54 2021 +0000 Merge series "ASoC: qcom: Fix broken lpass driver" from Srinivas Kandagatla : LPASS driver is partially broken on DragonBoard DB410c on 5.10 and its totally broken on other Supported Qualcomm SoCs. This was due to DAI ids being over written by the SoC specific header files in the dt-bindings. Idea of having SoC specific headers is not doable when we are dealing with a common driver. So this patchset attempts to fix this properly by creating a common dt-bindings header for lpass which can be updated with new entries if required. This patchset also add an simple of_xlate function to resolve the dai names and different SoCs might not have 1:1 mapping for the dai_driver array with dai ids. Changes since v1: - removed array indexes as suggested by Stephan G. - rebased to sound/for-next branch - collected Srinivasa tested-by tag for sc7180 platform. Thanks, srini Srinivas Kandagatla (2): ASoC: dt-bindings: lpass: Fix and common up lpass dai ids ASoC: qcom: Fix broken support to MI2S TERTIARY and QUATERNARY include/dt-bindings/sound/apq8016-lpass.h | 7 +++---- include/dt-bindings/sound/qcom,lpass.h | 15 +++++++++++++++ include/dt-bindings/sound/sc7180-lpass.h | 6 ++---- sound/soc/qcom/lpass-cpu.c | 22 ++++++++++++++++++++++ sound/soc/qcom/lpass-platform.c | 12 ++++++++++++ sound/soc/qcom/lpass-sc7180.c | 9 +++------ sound/soc/qcom/lpass.h | 2 +- 7 files changed, 58 insertions(+), 15 deletions(-) create mode 100644 include/dt-bindings/sound/qcom,lpass.h -- 2.21.0 commit d146c7b0fe9a55ec5911fae25e2f697b5dedd6c0 Merge: 29be3f026306d 4d36ed8eb0f74 Author: Mark Brown Date: Thu Jan 21 00:00:53 2021 +0000 Merge series "ASoC: mediatek: mt8183: ignore TDM DAI link by by default" from Tzung-Bi Shih : hdmi-codec is an optional property. The 2 patches fix DAI link binding error when the property doesn't exist in DTS. Tzung-Bi Shih (2): ASoC: mediatek: mt8183-mt6358: ignore TDM DAI link by default ASoC: mediatek: mt8183-da7219: ignore TDM DAI link by default sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c | 5 ++++- sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) -- 2.30.0.284.gd98b1dd5eaa7-goog commit 29be3f026306d46fd37bbcc49331518d60964ef2 Merge: 543466ef35710 fc4cb1e15f0c6 Author: Mark Brown Date: Thu Jan 21 00:00:52 2021 +0000 Merge series "Add KUNIT tests for ASoC topology" from Amadeusz Sławiński: This series adds unit tests for ASoC topology. First fix problems found when developing and running test cases and then add tests implementation. Tests themselves are quite simple and just call snd_soc_tplg_component_load() with various parameters and check the result. Tests themselves are described in more detail in commits adding them. Goal is to expand the amount of test cases in following patches. Prerequisity for this patchset are 2 patches which have already been sent: https://lore.kernel.org/alsa-devel/20210114163602.911205-1-amadeuszx.slawinski@linux.intel.com/T/#t Description on how typical test case itself works: In order to load topology we need to have 3 things: card, codec component & platform component. In typical test case we register card and platform component and bind to dummy codec. There are of course execeptions, when we want to test behaviour of topology API when component or card is missing. Note that this is bit different from typical scenario (in SOF and skylake drivers) where card is registered by machine driver and component by platform driver, as we register both when setting up test. If you check the test case most of them have similar architecture of: 1. /* run test */ ret = snd_soc_register_card(&kunit_comp->card); if (ret != 0 && ret != -EPROBE_DEFER) KUNIT_FAIL(test, "Failed to register card"); 2. ret = snd_soc_component_initialize(&kunit_comp->comp, &test_component, test_dev); KUNIT_EXPECT_EQ(test, 0, ret); 3. ret = snd_soc_add_component(&kunit_comp->comp, NULL, 0); KUNIT_EXPECT_EQ(test, 0, ret); Ad. 1. First we register card, which in most tests returns -EPROBE_DEFER (from snd_soc_bind_card()), as platform component is not yet created. I test for both 0 and -EPROBE_DEFER, as it makes it easier to reshuffle this code around if needed and there is one test case which does it in different order. Ad. 2. Then we initialize platform component with structure pointing at proper probe function, which calls snd_soc_tplg_component_load() with test parameters and checks expected result. Ad. 3. And then in follow up we call snd_soc_add_component() which creates platform component for us and calls snd_soc_try_rebind_card() which if everything is bound properly calls previously set probe function. Amadeusz Sławiński (5): ASoC: topology: Properly unregister DAI on removal Revert "ASoC: soc-devres: add devm_snd_soc_register_dai()" ASoC: topology: KUnit: Add KUnit tests passing various arguments to snd_soc_tplg_component_load ASoC: topology: KUnit: Add KUnit tests passing empty topology with variants to snd_soc_tplg_component_load ASoC: topology: KUnit: Add KUnit tests passing topology with PCM to snd_soc_tplg_component_load include/sound/soc.h | 4 - sound/soc/Kconfig | 17 + sound/soc/Makefile | 5 + sound/soc/soc-devres.c | 37 -- sound/soc/soc-topology-test.c | 843 ++++++++++++++++++++++++++++++++++ sound/soc/soc-topology.c | 9 +- 6 files changed, 870 insertions(+), 45 deletions(-) create mode 100644 sound/soc/soc-topology-test.c -- 2.25.1 commit b135b3358d73aa2a8b2be35d08e422421d1c609e Author: Miquel Raynal Date: Tue Jan 19 16:55:10 2021 +0100 mtd: rawnand: omap: Use BCH private fields in the specific OOB layout The OMAP driver may leverage software BCH logic to locate errors while using its own hardware to detect the presence of errors. This is achieved with a "mixed" mode which initializes manually the software BCH internal logic while providing its own OOB layout. The issue here comes from the fact that the BCH driver has been updated to only use generic NAND objects, and no longer depend on raw NAND structures as it is usable from SPI-NAND as well. However, at the end of the BCH context initialization, the driver checks the validity of the OOB layout. At this stage, the raw NAND fields have not been populated yet while being used by the layout helpers, leading to an invalid layout. The chosen solution here is to include the BCH structure definition and to refer to the BCH fields directly (de-referenced as a const pointer here) to know as early as possible the number of steps and ECC bytes which have been chosen. Note: I don't know which commit exactly triggered the error, but the entire migration to a generic BCH driver got merged in one go, so this should not be a problem for stable backports. Reported-by: Adam Ford Fixes: 80fe603160a4 ("mtd: nand: ecc-bch: Stop using raw NAND structures") Signed-off-by: Miquel Raynal Tested-by: Adam Ford #logicpd-torpedo-37xx-devkit-28.dts Link: https://lore.kernel.org/linux-mtd/20210119155510.5655-1-miquel.raynal@bootlin.com commit 9791581c049c10929e97098374dd1716a81fefcc Merge: 75439bc439e0f 34d1eb0e59987 Author: Linus Torvalds Date: Wed Jan 20 14:15:33 2021 -0800 Merge tag 'for-5.11-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "A few more one line fixes for various bugs, stable material. - fix send when emitting clone operation from the same file and root - fix double free on error when cleaning backrefs - lockdep fix during relocation - handle potential error during reloc when starting transaction - skip running delayed refs during commit (leftover from code removal in this dev cycle)" * tag 'for-5.11-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: don't clear ret in btrfs_start_dirty_block_groups btrfs: fix lockdep splat in btrfs_recover_relocation btrfs: do not double free backref nodes on error btrfs: don't get an EINTR during drop_snapshot for reloc btrfs: send: fix invalid clone operations when cloning from the same file and root btrfs: no need to run delayed refs after commit_fs_roots during commit commit 506c203cc3de6e26666b8476d287dee81595d6dc Author: Takashi Iwai Date: Wed Jan 20 21:45:54 2021 +0100 ALSA: usb-audio: Fix hw constraints dependencies Since the recent refactoring, it's been reported that some USB-audio devices (typically webcams) are no longer detected properly by PulseAudio. The debug session revealed that it's failing at probing by PA to try the sample rate 44.1kHz while the device has discrete sample rates other than 44.1kHz. But the puzzle was that arecord works as is, and some other devices with the discrete rates work, either. After all, this turned out to be the lack of the dependencies in a few hw constraint rules: snd_pcm_hw_rule_add() has the (variable) arguments specifying the dependent parameters, and some functions didn't set the target parameter itself as the dependencies. This resulted in an invalid parameter that could be generated only in a certain call pattern. This bug itself has been present in the code, but it didn't trigger errors just because the rules were casually avoiding such a corner case. After the recent refactoring and cleanup, however, the hw constraints work "as expected", and the problem surfaced now. For fixing the problem above, this patch adds the missing dependent parameters to each snd_pcm_hw_rule() call. Fixes: bc4e94aa8e72 ("ALSA: usb-audio: Handle discrete rates properly in hw constraints") BugLink: http://bugzilla.opensuse.org/show_bug.cgi?id=1181014 Link: https://lore.kernel.org/r/20210120204554.30177-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 75439bc439e0f02903b48efce84876ca92da97bd Merge: 2e4ceed606ba4 535d31593f595 Author: Linus Torvalds Date: Wed Jan 20 11:52:21 2021 -0800 Merge tag 'net-5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Networking fixes for 5.11-rc5, including fixes from bpf, wireless, and can trees. Current release - regressions: - nfc: nci: fix the wrong NCI_CORE_INIT parameters Current release - new code bugs: - bpf: allow empty module BTFs Previous releases - regressions: - bpf: fix signed_{sub,add32}_overflows type handling - tcp: do not mess with cloned skbs in tcp_add_backlog() - bpf: prevent double bpf_prog_put call from bpf_tracing_prog_attach - bpf: don't leak memory in bpf getsockopt when optlen == 0 - tcp: fix potential use-after-free due to double kfree() - mac80211: fix encryption issues with WEP - devlink: use right genl user_ptr when handling port param get/set - ipv6: set multicast flag on the multicast route - tcp: fix TCP_USER_TIMEOUT with zero window Previous releases - always broken: - bpf: local storage helpers should check nullness of owner ptr passed - mac80211: fix incorrect strlen of .write in debugfs - cls_flower: call nla_ok() before nla_next() - skbuff: back tiny skbs with kmalloc() in __netdev_alloc_skb() too" * tag 'net-5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (52 commits) net: systemport: free dev before on error path net: usb: cdc_ncm: don't spew notifications net: mscc: ocelot: Fix multicast to the CPU port tcp: Fix potential use-after-free due to double kfree() bpf: Fix signed_{sub,add32}_overflows type handling can: peak_usb: fix use after free bugs can: vxcan: vxcan_xmit: fix use after free bug can: dev: can_restart: fix use after free bug tcp: fix TCP socket rehash stats mis-accounting net: dsa: b53: fix an off by one in checking "vlan->vid" tcp: do not mess with cloned skbs in tcp_add_backlog() selftests: net: fib_tests: remove duplicate log test net: nfc: nci: fix the wrong NCI_CORE_INIT parameters sh_eth: Fix power down vs. is_opened flag ordering net: Disable NETIF_F_HW_TLS_RX when RXCSUM is disabled netfilter: rpfilter: mask ecn bits before fib lookup udp: mask TOS bits in udp_v4_early_demux() xsk: Clear pool even for inactive queues bpf: Fix helper bpf_map_peek_elem_proto pointing to wrong callback sh_eth: Make PHY access aware of Runtime PM to fix reboot crash ... commit 2e4ceed606ba4942f632d097f70696543fe98d8e Merge: 7178a107f5ea7 bd9dcef67ffca Author: Linus Torvalds Date: Wed Jan 20 11:46:38 2021 -0800 Merge tag 'for-linus-5.11-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fix from Juergen Gross: "A fix for build failure showing up in some configurations" * tag 'for-linus-5.11-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: x86/xen: fix 'nopvspin' build error commit 7178a107f5ea7bdb1cc23073234f0ded0ef90ec7 Author: Tianjia Zhang Date: Tue Jan 19 00:13:19 2021 +0000 X.509: Fix crash caused by NULL pointer On the following call path, `sig->pkey_algo` is not assigned in asymmetric_key_verify_signature(), which causes runtime crash in public_key_verify_signature(). keyctl_pkey_verify asymmetric_key_verify_signature verify_signature public_key_verify_signature This patch simply check this situation and fixes the crash caused by NULL pointer. Fixes: 215525639631 ("X.509: support OSCCA SM2-with-SM3 certificate verification") Reported-by: Tobias Markus Signed-off-by: Tianjia Zhang Signed-off-by: David Howells Reviewed-and-tested-by: Toke Høiland-Jørgensen Tested-by: João Fonseca Acked-by: Jarkko Sakkinen Cc: stable@vger.kernel.org # v5.10+ Signed-off-by: Linus Torvalds commit db58465f1121086b524be80be39d1fedbe5387f3 Author: Takashi Iwai Date: Wed Jan 20 16:11:12 2021 +0000 cachefiles: Drop superfluous readpages aops NULL check After the recent actions to convert readpages aops to readahead, the NULL checks of readpages aops in cachefiles_read_or_alloc_page() may hit falsely. More badly, it's an ASSERT() call, and this panics. Drop the superfluous NULL checks for fixing this regression. [DH: Note that cachefiles never actually used readpages, so this check was never actually necessary] BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=208883 BugLink: https://bugzilla.opensuse.org/show_bug.cgi?id=1175245 Fixes: 9ae326a69004 ("CacheFiles: A cache that backs onto a mounted filesystem") Signed-off-by: Takashi Iwai Signed-off-by: David Howells Acked-by: Matthew Wilcox (Oracle) Signed-off-by: Linus Torvalds commit 4d36ed8eb0f749c9e781e0d3b041a7adeedcdaa9 Author: Tzung-Bi Shih Date: Wed Jan 20 17:22:37 2021 +0800 ASoC: mediatek: mt8183-da7219: ignore TDM DAI link by default hdmi-codec is an optional property. Ignore to bind TDM DAI link if the property isn't specified. Fixes: 5bdbe9771177 ("ASoC: mediatek: mt8183-da7219: use hdmi-codec") Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20210120092237.1553938-3-tzungbi@google.com Signed-off-by: Mark Brown commit 5ac154443e686b06242aa49de30a12b74ea9ca98 Author: Tzung-Bi Shih Date: Wed Jan 20 17:22:36 2021 +0800 ASoC: mediatek: mt8183-mt6358: ignore TDM DAI link by default hdmi-codec is an optional property. Ignore to bind TDM DAI link if the property isn't specified. Fixes: f2024dc55fcb ("ASoC: mediatek: mt8183: use hdmi-codec") Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20210120092237.1553938-2-tzungbi@google.com Signed-off-by: Mark Brown commit fc4cb1e15f0c66f2e37314349dc4a82bd946fbb1 Author: Amadeusz Sławiński Date: Wed Jan 20 16:28:42 2021 +0100 ASoC: topology: Properly unregister DAI on removal DAIs need to be removed when topology unload function is called (usually done when component is being removed). We can't do this when device is being removed, as structures we operate on when removing DAI can already be freed. Fixes: 6ae4902f2f34 ("ASoC: soc-topology: use devm_snd_soc_register_dai()") Signed-off-by: Amadeusz Sławiński Tested-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210120152846.1703655-2-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 78a18fec5258c8df9435399a1ea022d73d3eceb9 Author: Hans de Goede Date: Fri Jan 15 22:57:52 2021 +0100 ACPI: scan: Make acpi_bus_get_device() clear return pointer on error Set the acpi_device pointer which acpi_bus_get_device() returns-by- reference to NULL on errors. We've recently had 2 cases where callers of acpi_bus_get_device() did not properly error check the return value, so set the returned- by-reference acpi_device pointer to NULL, because at least some callers of acpi_bus_get_device() expect that to be done on errors. [ rjw: This issue was exposed by commit 71da201f38df ("ACPI: scan: Defer enumeration of devices with _DEP lists") which caused it to be much more likely to occur on some systems, but the real defect had been introduced by an earlier commit. ] Fixes: 40e7fcb19293 ("ACPI: Add _DEP support to fix battery issue on Asus T100TA") Fixes: bcfcd409d4db ("usb: split code locating ACPI companion into port and device") Reported-by: Pierre-Louis Bossart Tested-by: Pierre-Louis Bossart Diagnosed-by: Rafael J. Wysocki Signed-off-by: Hans de Goede Cc: All applicable [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit fa0732168fa1369dd089e5b06d6158a68229f7b7 Author: Christoph Hellwig Date: Wed Jan 20 09:35:01 2021 +0100 nvme-pci: fix error unwind in nvme_map_data Properly unwind step by step using refactored helpers from nvme_unmap_data to avoid a potential double dma_unmap on a mapping failure. Fixes: 7fe07d14f71f ("nvme-pci: merge nvme_free_iod into nvme_unmap_data") Reported-by: Marc Orr Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Marc Orr commit 9275c206f88e5c49cb3e71932c81c8561083db9e Author: Christoph Hellwig Date: Wed Jan 20 09:33:52 2021 +0100 nvme-pci: refactor nvme_unmap_data Split out three helpers from nvme_unmap_data that will allow finer grained unwinding from nvme_map_data. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Marc Orr commit f1b0a8ea9f12b8ade0dbe40dd57e4ffa9a30ed93 Author: Martin Wilck Date: Wed Jan 20 17:19:13 2021 +0100 Revert "RDMA/rxe: Remove VLAN code leftovers from RXE" This reverts commit b2d2440430c0fdd5e0cad3efd6d1c9e3d3d02e5b. It's true that creating rxe on top of 802.1q interfaces doesn't work. Thus, commit fd49ddaf7e26 ("RDMA/rxe: prevent rxe creation on top of vlan interface") was absolutely correct. But b2d2440430c0 was incorrect assuming that with this change, RDMA and VLAN don't work togehter at all. It just has to be set up differently. Rather than creating rxe on top of the VLAN interface, rxe must be created on top of the physical interface. RDMA then works just fine through VLAN interfaces on top of that physical interface, via the "upper device" logic. This is hard to see in the rxe logic because it never talks about vlan, but instead rxe carefully selects upper vlan netdevices when working with packets which in turn imply certain vlan tagging. This is all done correctly and interacts with the gid table with VLAN support the same as real HW does. b2d2440430c0 broke this setup deliberately and should thus be reverted. Also, b2d2440430c0 removed rxe_dma_device(), so adapt the revert to discard that hunk. Fixes: b2d2440430c0 ("RDMA/rxe: Remove VLAN code leftovers from RXE") Link: https://lore.kernel.org/r/20210120161913.7347-1-mwilck@suse.com Signed-off-by: Martin Wilck Signed-off-by: Jason Gunthorpe commit 535d31593f5951f2cd344df7cb618ca48f67393f Merge: 0c630a66bf109 50aca891d7a55 Author: Jakub Kicinski Date: Wed Jan 20 09:16:01 2021 -0800 Merge tag 'linux-can-fixes-for-5.11-20210120' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== linux-can-fixes-for-5.11-20210120 All three patches are by Vincent Mailhol and fix a potential use after free bug in the CAN device infrastructure, the vxcan driver, and the peak_usk driver. In the TX-path the skb is used to read from after it was passed to the networking stack with netif_rx_ni(). * tag 'linux-can-fixes-for-5.11-20210120' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can: can: peak_usb: fix use after free bugs can: vxcan: vxcan_xmit: fix use after free bug can: dev: can_restart: fix use after free bug ==================== Link: https://lore.kernel.org/r/20210120125202.2187358-1-mkl@pengutronix.de Signed-off-by: Jakub Kicinski commit 0c630a66bf10991b0ef13d27c93d7545e692ef5b Author: Pan Bian Date: Tue Jan 19 20:44:23 2021 -0800 net: systemport: free dev before on error path On the error path, it should goto the error handling label to free allocated memory rather than directly return. Fixes: 31bc72d97656 ("net: systemport: fetch and use clock resources") Signed-off-by: Pan Bian Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20210120044423.1704-1-bianpan2016@163.com Signed-off-by: Jakub Kicinski commit de658a195ee23ca6aaffe197d1d2ea040beea0a2 Author: Grant Grundler Date: Tue Jan 19 17:12:08 2021 -0800 net: usb: cdc_ncm: don't spew notifications RTL8156 sends notifications about every 32ms. Only display/log notifications when something changes. This issue has been reported by others: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1832472 https://lkml.org/lkml/2020/8/27/1083 ... [785962.779840] usb 1-1: new high-speed USB device number 5 using xhci_hcd [785962.929944] usb 1-1: New USB device found, idVendor=0bda, idProduct=8156, bcdDevice=30.00 [785962.929949] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=6 [785962.929952] usb 1-1: Product: USB 10/100/1G/2.5G LAN [785962.929954] usb 1-1: Manufacturer: Realtek [785962.929956] usb 1-1: SerialNumber: 000000001 [785962.991755] usbcore: registered new interface driver cdc_ether [785963.017068] cdc_ncm 1-1:2.0: MAC-Address: 00:24:27:88:08:15 [785963.017072] cdc_ncm 1-1:2.0: setting rx_max = 16384 [785963.017169] cdc_ncm 1-1:2.0: setting tx_max = 16384 [785963.017682] cdc_ncm 1-1:2.0 usb0: register 'cdc_ncm' at usb-0000:00:14.0-1, CDC NCM, 00:24:27:88:08:15 [785963.019211] usbcore: registered new interface driver cdc_ncm [785963.023856] usbcore: registered new interface driver cdc_wdm [785963.025461] usbcore: registered new interface driver cdc_mbim [785963.038824] cdc_ncm 1-1:2.0 enx002427880815: renamed from usb0 [785963.089586] cdc_ncm 1-1:2.0 enx002427880815: network connection: disconnected [785963.121673] cdc_ncm 1-1:2.0 enx002427880815: network connection: disconnected [785963.153682] cdc_ncm 1-1:2.0 enx002427880815: network connection: disconnected ... This is about 2KB per second and will overwrite all contents of a 1MB dmesg buffer in under 10 minutes rendering them useless for debugging many kernel problems. This is also an extra 180 MB/day in /var/logs (or 1GB per week) rendering the majority of those logs useless too. When the link is up (expected state), spew amount is >2x higher: ... [786139.600992] cdc_ncm 2-1:2.0 enx002427880815: network connection: connected [786139.632997] cdc_ncm 2-1:2.0 enx002427880815: 2500 mbit/s downlink 2500 mbit/s uplink [786139.665097] cdc_ncm 2-1:2.0 enx002427880815: network connection: connected [786139.697100] cdc_ncm 2-1:2.0 enx002427880815: 2500 mbit/s downlink 2500 mbit/s uplink [786139.729094] cdc_ncm 2-1:2.0 enx002427880815: network connection: connected [786139.761108] cdc_ncm 2-1:2.0 enx002427880815: 2500 mbit/s downlink 2500 mbit/s uplink ... Chrome OS cannot support RTL8156 until this is fixed. Signed-off-by: Grant Grundler Reviewed-by: Hayes Wang Link: https://lore.kernel.org/r/20210120011208.3768105-1-grundler@chromium.org Signed-off-by: Jakub Kicinski commit 584b7cfcdc7d6d416a9d6fece9516764bd977d2e Author: Alban Bedel Date: Tue Jan 19 15:06:38 2021 +0100 net: mscc: ocelot: Fix multicast to the CPU port Multicast entries in the MAC table use the high bits of the MAC address to encode the ports that should get the packets. But this port mask does not work for the CPU port, to receive these packets on the CPU port the MAC_CPU_COPY flag must be set. Because of this IPv6 was effectively not working because neighbor solicitations were never received. This was not apparent before commit 9403c158 (net: mscc: ocelot: support IPv4, IPv6 and plain Ethernet mdb entries) as the IPv6 entries were broken so all incoming IPv6 multicast was then treated as unknown and flooded on all ports. To fix this problem rework the ocelot_mact_learn() to set the MAC_CPU_COPY flag when a multicast entry that target the CPU port is added. For this we have to read back the ports endcoded in the pseudo MAC address by the caller. It is not a very nice design but that avoid changing the callers and should make backporting easier. Signed-off-by: Alban Bedel Fixes: 9403c158b872 ("net: mscc: ocelot: support IPv4, IPv6 and plain Ethernet mdb entries") Link: https://lore.kernel.org/r/20210119140638.203374-1-alban.bedel@aerq.com Signed-off-by: Jakub Kicinski commit c89dffc70b340780e5b933832d8c3e045ef3791e Author: Kuniyuki Iwashima Date: Mon Jan 18 14:59:20 2021 +0900 tcp: Fix potential use-after-free due to double kfree() Receiving ACK with a valid SYN cookie, cookie_v4_check() allocates struct request_sock and then can allocate inet_rsk(req)->ireq_opt. After that, tcp_v4_syn_recv_sock() allocates struct sock and copies ireq_opt to inet_sk(sk)->inet_opt. Normally, tcp_v4_syn_recv_sock() inserts the full socket into ehash and sets NULL to ireq_opt. Otherwise, tcp_v4_syn_recv_sock() has to reset inet_opt by NULL and free the full socket. The commit 01770a1661657 ("tcp: fix race condition when creating child sockets from syncookies") added a new path, in which more than one cores create full sockets for the same SYN cookie. Currently, the core which loses the race frees the full socket without resetting inet_opt, resulting in that both sock_put() and reqsk_put() call kfree() for the same memory: sock_put sk_free __sk_free sk_destruct __sk_destruct sk->sk_destruct/inet_sock_destruct kfree(rcu_dereference_protected(inet->inet_opt, 1)); reqsk_put reqsk_free __reqsk_free req->rsk_ops->destructor/tcp_v4_reqsk_destructor kfree(rcu_dereference_protected(inet_rsk(req)->ireq_opt, 1)); Calling kmalloc() between the double kfree() can lead to use-after-free, so this patch fixes it by setting NULL to inet_opt before sock_put(). As a side note, this kind of issue does not happen for IPv6. This is because tcp_v6_syn_recv_sock() clones both ipv6_opt and pktopts which correspond to ireq_opt in IPv4. Fixes: 01770a166165 ("tcp: fix race condition when creating child sockets from syncookies") CC: Ricardo Dias Signed-off-by: Kuniyuki Iwashima Reviewed-by: Benjamin Herrenschmidt Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20210118055920.82516-1-kuniyu@amazon.co.jp Signed-off-by: Jakub Kicinski commit b3741b43880bfb7319424edd600da47d1cd8c680 Merge: 9c30ae8398b08 bc895e8b2a64e Author: Jakub Kicinski Date: Wed Jan 20 08:47:34 2021 -0800 Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2021-01-20 1) Fix wrong bpf_map_peek_elem_proto helper callback, from Mircea Cirjaliu. 2) Fix signed_{sub,add32}_overflows type truncation, from Daniel Borkmann. 3) Fix AF_XDP to also clear pools for inactive queues, from Maxim Mikityanskiy. * https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: bpf: Fix signed_{sub,add32}_overflows type handling xsk: Clear pool even for inactive queues bpf: Fix helper bpf_map_peek_elem_proto pointing to wrong callback ==================== Link: https://lore.kernel.org/r/20210120163439.8160-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit 55a8b42e8645a6dab88674a30cb6ed328e660680 Author: Pan Bian Date: Wed Jan 20 00:26:35 2021 -0800 spi: altera: Fix memory leak on error path Release master that have been previously allocated if the number of chipselect is invalid. Fixes: 8e04187c1bc7 ("spi: altera: add SPI core parameters support via platform data.") Signed-off-by: Pan Bian Reviewed-by: Tom Rix Link: https://lore.kernel.org/r/20210120082635.49304-1-bianpan2016@163.com Signed-off-by: Mark Brown commit 543466ef3571069b8eb13a8ff7c7cfc8d8a75c43 Author: Dan Carpenter Date: Wed Jan 20 12:59:13 2021 +0300 ASoC: topology: Fix memory corruption in soc_tplg_denum_create_values() The allocation uses sizeof(u32) when it should use sizeof(unsigned long) so it leads to memory corruption later in the function when the data is initialized. Fixes: 5aebe7c7f9c2 ("ASoC: topology: fix endianness issues") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YAf+8QZoOv+ct526@mwanda Signed-off-by: Mark Brown commit 1e066a23e76f90c9c39c189fe0dbf7c6e3dd5044 Author: Srinivas Kandagatla Date: Tue Jan 19 17:47:00 2021 +0000 ASoC: qcom: lpass-ipq806x: fix bitwidth regmap field BIT_WIDTH field in I2S_CTL register is two bits wide, however recent regmap field conversion patch trimmed it down to one bit. Fix this by correcting the bit range! Fixes: b5022a36d28f ("ASoC: qcom: lpass: Use regmap_field for i2sctl and dmactl registers") Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210119174700.32639-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 40caffd66ca9ad1baa2d5541232675160bc6c772 Author: Jaroslav Kysela Date: Wed Jan 20 15:42:11 2021 +0100 ASoC: AMD Renoir - refine DMI entries for some Lenovo products Apparently, the DMI board name LNVNB161216 is also used also for products with the digital microphones connected to the AMD's audio bridge. Refine the DMI table - use product name identifiers extracted from https://bugzilla.redhat.com/show_bug.cgi?id=1892115 . The report for Lenovo Yoga Slim 7 14ARE05 (82A2) is in buglink. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=211299 Cc: Signed-off-by: Jaroslav Kysela Cc: Mark Brown Link: https://lore.kernel.org/r/20210120144211.817937-1-perex@perex.cz Signed-off-by: Mark Brown commit cd3484f7f1386071b1af159023917ed12c182d39 Author: Srinivas Kandagatla Date: Tue Jan 19 17:15:27 2021 +0000 ASoC: qcom: Fix broken support to MI2S TERTIARY and QUATERNARY lpass hdmi support patch totally removed support for MI2S TERTIARY and QUATERNARY. One of the major issue was spotted with the design of having separate SoC specific header files for the common lpass driver. This design is prone to break as an when new SoC header is added as the common DAI ids of other SoCs will be overwritten by the new ones. Having a common header qcom,lpass.h should fix the issue and any new DAI ids should be added to the common header. With this change lpass also needs a new of_xlate function to resolve dai name. Fixes: 7cb37b7bd0d3 ("ASoC: qcom: Add support for lpass hdmi driver") Reported-by: Jun Nie Reported-by: Stephan Gerhold Tested-by: Srinivasa Rao Signed-off-by: Srinivas Kandagatla Tested-by: Stephan Gerhold Link: https://lore.kernel.org/r/20210119171527.32145-3-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 09a4f6f5d21cb1f2633f4e8b893336b60eee9a01 Author: Srinivas Kandagatla Date: Tue Jan 19 17:15:26 2021 +0000 ASoC: dt-bindings: lpass: Fix and common up lpass dai ids Existing header file design of having separate SoC specific header files for the common lpass driver has mutiple issues. This design is prone to break as an when new SoC header is added as the common DAI ids of other SoCs will be overwritten by the new ones. One of them surfaced by recent patch that adds support to sc7180, this one totally broke LPASS drivers on other Qualcomm SoCs. Before this gets worst, fix this by having a common header qcom,lpass.h. This should fix the issue and any new DAI ids should be added to the common header. This will be more sustainable then the existing design! Fixes: 12fbfc4cabec6595 ("ASoC: Add sc7180-lpass binding header hdmi define") Reported-by: Jun Nie Reported-by: Stephan Gerhold Tested-by: Srinivasa Rao Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210119171527.32145-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 8dfe11681758b5c23618233e664d3a5ac417a3ed Merge: b4f664252f51e dc5d17a3c39b0 Author: Jens Axboe Date: Wed Jan 20 09:32:02 2021 -0700 Merge branch 'md-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into block-5.11 Pull MD fix from Song. * 'md-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: md: Set prev_flush_start and flush_bio in an atomic way commit bc895e8b2a64e502fbba72748d59618272052a8b Author: Daniel Borkmann Date: Wed Jan 20 00:24:24 2021 +0100 bpf: Fix signed_{sub,add32}_overflows type handling Fix incorrect signed_{sub,add32}_overflows() input types (and a related buggy comment). It looks like this might have slipped in via copy/paste issue, also given prior to 3f50f132d840 ("bpf: Verifier, do explicit ALU32 bounds tracking") the signature of signed_sub_overflows() had s64 a and s64 b as its input args whereas now they are truncated to s32. Thus restore proper types. Also, the case of signed_add32_overflows() is not consistent to signed_sub32_overflows(). Both have s32 as inputs, therefore align the former. Fixes: 3f50f132d840 ("bpf: Verifier, do explicit ALU32 bounds tracking") Reported-by: De4dCr0w Signed-off-by: Daniel Borkmann Reviewed-by: John Fastabend Acked-by: Alexei Starovoitov commit dc5d17a3c39b06aef866afca19245a9cfb533a79 Author: Xiao Ni Date: Thu Dec 10 14:33:32 2020 +0800 md: Set prev_flush_start and flush_bio in an atomic way One customer reports a crash problem which causes by flush request. It triggers a warning before crash. /* new request after previous flush is completed */ if (ktime_after(req_start, mddev->prev_flush_start)) { WARN_ON(mddev->flush_bio); mddev->flush_bio = bio; bio = NULL; } The WARN_ON is triggered. We use spin lock to protect prev_flush_start and flush_bio in md_flush_request. But there is no lock protection in md_submit_flush_data. It can set flush_bio to NULL first because of compiler reordering write instructions. For example, flush bio1 sets flush bio to NULL first in md_submit_flush_data. An interrupt or vmware causing an extended stall happen between updating flush_bio and prev_flush_start. Because flush_bio is NULL, flush bio2 can get the lock and submit to underlayer disks. Then flush bio1 updates prev_flush_start after the interrupt or extended stall. Then flush bio3 enters in md_flush_request. The start time req_start is behind prev_flush_start. The flush_bio is not NULL(flush bio2 hasn't finished). So it can trigger the WARN_ON now. Then it calls INIT_WORK again. INIT_WORK() will re-initialize the list pointers in the work_struct, which then can result in a corrupted work list and the work_struct queued a second time. With the work list corrupted, it can lead in invalid work items being used and cause a crash in process_one_work. We need to make sure only one flush bio can be handled at one same time. So add spin lock in md_submit_flush_data to protect prev_flush_start and flush_bio in an atomic way. Reviewed-by: David Jeffery Signed-off-by: Xiao Ni Signed-off-by: Song Liu commit 50aca891d7a554db0901b245167cd653d73aaa71 Author: Vincent Mailhol Date: Wed Jan 20 20:41:37 2021 +0900 can: peak_usb: fix use after free bugs After calling peak_usb_netif_rx_ni(skb), dereferencing skb is unsafe. Especially, the can_frame cf which aliases skb memory is accessed after the peak_usb_netif_rx_ni(). Reordering the lines solves the issue. Fixes: 0a25e1f4f185 ("can: peak_usb: add support for PEAK new CANFD USB adapters") Link: https://lore.kernel.org/r/20210120114137.200019-4-mailhol.vincent@wanadoo.fr Signed-off-by: Vincent Mailhol Signed-off-by: Marc Kleine-Budde commit 75854cad5d80976f6ea0f0431f8cedd3bcc475cb Author: Vincent Mailhol Date: Wed Jan 20 20:41:36 2021 +0900 can: vxcan: vxcan_xmit: fix use after free bug After calling netif_rx_ni(skb), dereferencing skb is unsafe. Especially, the canfd_frame cfd which aliases skb memory is accessed after the netif_rx_ni(). Fixes: a8f820a380a2 ("can: add Virtual CAN Tunnel driver (vxcan)") Link: https://lore.kernel.org/r/20210120114137.200019-3-mailhol.vincent@wanadoo.fr Signed-off-by: Vincent Mailhol Signed-off-by: Marc Kleine-Budde commit 03f16c5075b22c8902d2af739969e878b0879c94 Author: Vincent Mailhol Date: Wed Jan 20 20:41:35 2021 +0900 can: dev: can_restart: fix use after free bug After calling netif_rx_ni(skb), dereferencing skb is unsafe. Especially, the can_frame cf which aliases skb memory is accessed after the netif_rx_ni() in: stats->rx_bytes += cf->len; Reordering the lines solves the issue. Fixes: 39549eef3587 ("can: CAN Network device driver and Netlink interface") Link: https://lore.kernel.org/r/20210120114137.200019-2-mailhol.vincent@wanadoo.fr Signed-off-by: Vincent Mailhol Signed-off-by: Marc Kleine-Budde commit a37eef63bc9e16e06361b539e528058146af80ab Author: Daniel Vetter Date: Tue Jan 19 14:03:18 2021 +0100 drm/syncobj: Fix use-after-free While reviewing Christian's annotation patch I noticed that we have a user-after-free for the WAIT_FOR_SUBMIT case: We drop the syncobj reference before we've completed the waiting. Of course usually there's nothing bad happening here since userspace keeps the reference, but we can't rely on userspace to play nice here! Signed-off-by: Daniel Vetter Fixes: bc9c80fe01a2 ("drm/syncobj: use the timeline point in drm_syncobj_find_fence v4") Reviewed-by: Christian König Cc: Christian König Cc: Lionel Landwerlin Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Cc: # v5.2+ Link: https://patchwork.freedesktop.org/patch/msgid/20210119130318.615145-1-daniel.vetter@ffwll.ch commit 710eb8e32d04714452759f2b66884bfa7e97d495 Author: Eli Cohen Date: Thu Jan 7 09:18:45 2021 +0200 vdpa/mlx5: Fix memory key MTT population map_direct_mr() assumed that the number of scatter/gather entries returned by dma_map_sg_attrs() was equal to the number of segments in the sgl list. This led to wrong population of the mkey object. Fix this by properly referring to the returned value. The hardware expects each MTT entry to contain the DMA address of a contiguous block of memory of size (1 << mr->log_size) bytes. dma_map_sg_attrs() can coalesce several sg entries into a single scatter/gather entry of contiguous DMA range so we need to scan the list and refer to the size of each s/g entry. In addition, get rid of fill_sg() which effect is overwritten by populate_mtts(). Fixes: 94abbccdf291 ("vdpa/mlx5: Add shared memory registration code") Signed-off-by: Eli Cohen Link: https://lore.kernel.org/r/20210107071845.GA224876@mtl-vdi-166.wap.labs.mlnx Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit 08685be7761d69914f08c3d6211c543a385a5b9c Author: Nicholas Piggin Date: Mon Jan 11 16:24:08 2021 +1000 powerpc/64s: fix scv entry fallback flush vs interrupt The L1D flush fallback functions are not recoverable vs interrupts, yet the scv entry flush runs with MSR[EE]=1. This can result in a timer (soft-NMI) or MCE or SRESET interrupt hitting here and overwriting the EXRFI save area, which ends up corrupting userspace registers for scv return. Fix this by disabling RI and EE for the scv entry fallback flush. Fixes: f79643787e0a0 ("powerpc/64s: flush L1D on kernel entry") Cc: stable@vger.kernel.org # 5.9+ which also have flush L1D patch backport Reported-by: Tulio Magno Quites Machado Filho Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210111062408.287092-1-npiggin@gmail.com commit 9c30ae8398b0813e237bde387d67a7f74ab2db2d Author: Yuchung Cheng Date: Tue Jan 19 11:26:19 2021 -0800 tcp: fix TCP socket rehash stats mis-accounting The previous commit 32efcc06d2a1 ("tcp: export count for rehash attempts") would mis-account rehashing SNMP and socket stats: a. During handshake of an active open, only counts the first SYN timeout b. After handshake of passive and active open, stop updating after (roughly) TCP_RETRIES1 recurring RTOs c. After the socket aborts, over count timeout_rehash by 1 This patch fixes this by checking the rehash result from sk_rethink_txhash. Fixes: 32efcc06d2a1 ("tcp: export count for rehash attempts") Signed-off-by: Yuchung Cheng Signed-off-by: Eric Dumazet Signed-off-by: Neal Cardwell Link: https://lore.kernel.org/r/20210119192619.1848270-1-ycheng@google.com Signed-off-by: Jakub Kicinski commit 8e4052c32d6b4b39c1e13c652c7e33748d447409 Author: Dan Carpenter Date: Tue Jan 19 17:48:03 2021 +0300 net: dsa: b53: fix an off by one in checking "vlan->vid" The > comparison should be >= to prevent accessing one element beyond the end of the dev->vlans[] array in the caller function, b53_vlan_add(). The "dev->vlans" array is allocated in the b53_switch_init() function and it has "dev->num_vlans" elements. Fixes: a2482d2ce349 ("net: dsa: b53: Plug in VLAN support") Signed-off-by: Dan Carpenter Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/YAbxI97Dl/pmBy5V@mwanda Signed-off-by: Jakub Kicinski commit b160c28548bc0a87cbd16d5af6d3edcfd70b8c9a Author: Eric Dumazet Date: Tue Jan 19 08:49:00 2021 -0800 tcp: do not mess with cloned skbs in tcp_add_backlog() Heiner Kallweit reported that some skbs were sent with the following invalid GSO properties : - gso_size > 0 - gso_type == 0 This was triggerring a WARN_ON_ONCE() in rtl8169_tso_csum_v2. Juerg Haefliger was able to reproduce a similar issue using a lan78xx NIC and a workload mixing TCP incoming traffic and forwarded packets. The problem is that tcp_add_backlog() is writing over gso_segs and gso_size even if the incoming packet will not be coalesced to the backlog tail packet. While skb_try_coalesce() would bail out if tail packet is cloned, this overwriting would lead to corruptions of other packets cooked by lan78xx, sharing a common super-packet. The strategy used by lan78xx is to use a big skb, and split it into all received packets using skb_clone() to avoid copies. The drawback of this strategy is that all the small skb share a common struct skb_shared_info. This patch rewrites TCP gso_size/gso_segs handling to only happen on the tail skb, since skb_try_coalesce() made sure it was not cloned. Fixes: 4f693b55c3d2 ("tcp: implement coalescing on backlog queue") Signed-off-by: Eric Dumazet Bisected-by: Juerg Haefliger Tested-by: Juerg Haefliger Reported-by: Heiner Kallweit Link: https://bugzilla.kernel.org/show_bug.cgi?id=209423 Link: https://lore.kernel.org/r/20210119164900.766957-1-eric.dumazet@gmail.com Signed-off-by: Jakub Kicinski commit fd23d2dc180fccfad4b27a8e52ba1bc415d18509 Author: Hangbin Liu Date: Tue Jan 19 10:59:30 2021 +0800 selftests: net: fib_tests: remove duplicate log test The previous test added an address with a specified metric and check if correspond route was created. I somehow added two logs for the same test. Remove the duplicated one. Reported-by: Antoine Tenart Fixes: 0d29169a708b ("selftests/net/fib_tests: update addr_metric_test for peer route testing") Signed-off-by: Hangbin Liu Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20210119025930.2810532-1-liuhangbin@gmail.com Signed-off-by: Jakub Kicinski commit dd3a44c06f7b4f14e90065bf05d62c255b20005f Author: Michael Ellerman Date: Tue Jan 19 15:18:00 2021 +1100 selftests/powerpc: Only test lwm/stmw on big endian Newer binutils (>= 2.36) refuse to assemble lmw/stmw when building in little endian mode. That breaks compilation of our alignment handler test: /tmp/cco4l14N.s: Assembler messages: /tmp/cco4l14N.s:1440: Error: `lmw' invalid when little-endian /tmp/cco4l14N.s:1814: Error: `stmw' invalid when little-endian make[2]: *** [../../lib.mk:139: /output/kselftest/powerpc/alignment/alignment_handler] Error 1 These tests do pass on little endian machines, as the kernel will still emulate those instructions even when running little endian (which is arguably a kernel bug). But we don't really need to test that case, so ifdef those instructions out to get the alignment test building again. Reported-by: Libor Pechacek Signed-off-by: Michael Ellerman Tested-by: Libor Pechacek Link: https://lore.kernel.org/r/20210119041800.3093047-1-mpe@ellerman.id.au commit 4964e5a1e080f785f5518b402a9e48c527fe6cbd Author: Bongsu Jeon Date: Tue Jan 19 05:55:22 2021 +0900 net: nfc: nci: fix the wrong NCI_CORE_INIT parameters Fix the code because NCI_CORE_INIT_CMD includes two parameters in NCI2.0 but there is no parameters in NCI1.x. Fixes: bcd684aace34 ("net/nfc/nci: Support NCI 2.x initial sequence") Signed-off-by: Bongsu Jeon Link: https://lore.kernel.org/r/20210118205522.317087-1-bongsu.jeon@samsung.com Signed-off-by: Jakub Kicinski commit f6a2e94b3f9d89cb40771ff746b16b5687650cbb Author: Geert Uytterhoeven Date: Mon Jan 18 16:08:12 2021 +0100 sh_eth: Fix power down vs. is_opened flag ordering sh_eth_close() does a synchronous power down of the device before marking it closed. Revert the order, to make sure the device is never marked opened while suspended. While at it, use pm_runtime_put() instead of pm_runtime_put_sync(), as there is no reason to do a synchronous power down. Fixes: 7fa2955ff70ce453 ("sh_eth: Fix sleeping function called from invalid context") Signed-off-by: Geert Uytterhoeven Reviewed-by: Sergei Shtylyov Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20210118150812.796791-1-geert+renesas@glider.be Signed-off-by: Jakub Kicinski commit f068cb1db2cb40c9782874df7b08c684106cf609 Author: Joe Perches Date: Fri Jan 15 16:36:50 2021 -0800 RDMA/usnic: Fix misuse of sysfs_emit_at In commit e28bf1f03b01 ("RDMA: Convert various random sprintf sysfs _show uses to sysfs_emit") I mistakenly used len = sysfs_emit_at to overwrite the last trailing space of potentially multiple entry output. Instead use a more common style by removing the trailing space from the output formats and adding a prefixing space to the contination formats and converting the final terminating output newline from the defective len = sysfs_emit_at(buf, len, "\n"); to the now appropriate and typical len += sysfs_emit_at(buf, len, "\n"); Fixes: e28bf1f03b01 ("RDMA: Convert various random sprintf sysfs _show uses to sysfs_emit") Link: https://lore.kernel.org/r/5eb794b9c9bca0494d94b2b209f1627fa4e7b555.camel@perches.com Reported-by: James Bottomley Signed-off-by: Joe Perches Signed-off-by: Jason Gunthorpe commit de641d74fb00f5b32f054ee154e31fb037e0db88 Author: Parav Pandit Date: Sun Jan 17 11:26:33 2021 +0200 Revert "RDMA/mlx5: Fix devlink deadlock on net namespace deletion" This reverts commit fbdd0049d98d44914fc57d4b91f867f4996c787b. Due to commit in fixes tag, netdevice events were received only in one net namespace of mlx5_core_dev. Due to this when netdevice events arrive in net namespace other than net namespace of mlx5_core_dev, they are missed. This results in empty GID table due to RDMA device being detached from its net device. Hence, revert back to receive netdevice events in all net namespaces to restore back RDMA functionality in non init_net net namespace. The deadlock will have to be addressed in another patch. Fixes: fbdd0049d98d ("RDMA/mlx5: Fix devlink deadlock on net namespace deletion") Link: https://lore.kernel.org/r/20210117092633.10690-1-leon@kernel.org Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 9293d3fcb70583f2c786f04ca788af026b7c4c5c Author: Yangyang Li Date: Tue Jan 19 17:28:33 2021 +0800 RDMA/hns: Use mutex instead of spinlock for ida allocation GFP_KERNEL may cause ida_alloc_range() to sleep, but the spinlock covering this function is not allowed to sleep, so the spinlock needs to be changed to mutex. As there is a certain chance of memory allocation failure, GFP_ATOMIC is not suitable for QP allocation scenarios. Fixes: 71586dd20010 ("RDMA/hns: Create QP with selected QPN for bank load balance") Link: https://lore.kernel.org/r/1611048513-28663-1-git-send-email-liweihang@huawei.com Signed-off-by: Yangyang Li Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 9f206f7398f6f6ec7dd0198c045c2459b4f720b6 Author: Bryan Tan Date: Mon Jan 18 19:16:29 2021 -0800 RDMA/vmw_pvrdma: Fix network_hdr_type reported in WC The PVRDMA device HW interface defines network_hdr_type according to an old definition of the internal kernel rdma_network_type enum that has since changed, resulting in the wrong rdma_network_type being reported. Fix this by explicitly defining the enum used by the PVRDMA device and adding a function to convert the pvrdma_network_type to rdma_network_type enum. Cc: stable@vger.kernel.org # 5.10+ Fixes: 1c15b4f2a42f ("RDMA/core: Modify enum ib_gid_type and enum rdma_network_type") Link: https://lore.kernel.org/r/1611026189-17943-1-git-send-email-bryantan@vmware.com Reviewed-by: Adit Ranadive Signed-off-by: Bryan Tan Signed-off-by: Jason Gunthorpe commit a3eb4e9d4c9218476d05c52dfd2be3d6fdce6b91 Author: Tariq Toukan Date: Sun Jan 17 17:15:38 2021 +0200 net: Disable NETIF_F_HW_TLS_RX when RXCSUM is disabled With NETIF_F_HW_TLS_RX packets are decrypted in HW. This cannot be logically done when RXCSUM offload is off. Fixes: 14136564c8ee ("net: Add TLS RX offload feature") Signed-off-by: Tariq Toukan Reviewed-by: Boris Pismenny Link: https://lore.kernel.org/r/20210117151538.9411-1-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 2565ff4eef34e03af67b7447c232c858f46b6e3b Merge: f7b9820dbe162 2e5a6266fbb11 Author: Jakub Kicinski Date: Tue Jan 19 13:54:32 2021 -0800 Merge branch 'ipv4-ensure-ecn-bits-don-t-influence-source-address-validation' Guillaume Nault says: ==================== ipv4: Ensure ECN bits don't influence source address validation Functions that end up calling fib_table_lookup() should clear the ECN bits from the TOS, otherwise ECT(0) and ECT(1) packets can be treated differently. Most functions already clear the ECN bits, but there are a few cases where this is not done. This series only fixes the ones related to source address validation. ==================== Link: https://lore.kernel.org/r/cover.1610790904.git.gnault@redhat.com Signed-off-by: Jakub Kicinski commit 2e5a6266fbb11ae93c468dfecab169aca9c27b43 Author: Guillaume Nault Date: Sat Jan 16 11:44:26 2021 +0100 netfilter: rpfilter: mask ecn bits before fib lookup RT_TOS() only masks one of the two ECN bits. Therefore rpfilter_mt() treats Not-ECT or ECT(1) packets in a different way than those with ECT(0) or CE. Reproducer: Create two netns, connected with a veth: $ ip netns add ns0 $ ip netns add ns1 $ ip link add name veth01 netns ns0 type veth peer name veth10 netns ns1 $ ip -netns ns0 link set dev veth01 up $ ip -netns ns1 link set dev veth10 up $ ip -netns ns0 address add 192.0.2.10/32 dev veth01 $ ip -netns ns1 address add 192.0.2.11/32 dev veth10 Add a route to ns1 in ns0: $ ip -netns ns0 route add 192.0.2.11/32 dev veth01 In ns1, only packets with TOS 4 can be routed to ns0: $ ip -netns ns1 route add 192.0.2.10/32 tos 4 dev veth10 Ping from ns0 to ns1 works regardless of the ECN bits, as long as TOS is 4: $ ip netns exec ns0 ping -Q 4 192.0.2.11 # TOS 4, Not-ECT ... 0% packet loss ... $ ip netns exec ns0 ping -Q 5 192.0.2.11 # TOS 4, ECT(1) ... 0% packet loss ... $ ip netns exec ns0 ping -Q 6 192.0.2.11 # TOS 4, ECT(0) ... 0% packet loss ... $ ip netns exec ns0 ping -Q 7 192.0.2.11 # TOS 4, CE ... 0% packet loss ... Now use iptable's rpfilter module in ns1: $ ip netns exec ns1 iptables-legacy -t raw -A PREROUTING -m rpfilter --invert -j DROP Not-ECT and ECT(1) packets still pass: $ ip netns exec ns0 ping -Q 4 192.0.2.11 # TOS 4, Not-ECT ... 0% packet loss ... $ ip netns exec ns0 ping -Q 5 192.0.2.11 # TOS 4, ECT(1) ... 0% packet loss ... But ECT(0) and ECN packets are dropped: $ ip netns exec ns0 ping -Q 6 192.0.2.11 # TOS 4, ECT(0) ... 100% packet loss ... $ ip netns exec ns0 ping -Q 7 192.0.2.11 # TOS 4, CE ... 100% packet loss ... After this patch, rpfilter doesn't drop ECT(0) and CE packets anymore. Fixes: 8f97339d3feb ("netfilter: add ipv4 reverse path filter match") Signed-off-by: Guillaume Nault Signed-off-by: Jakub Kicinski commit 8d2b51b008c25240914984208b2ced57d1dd25a5 Author: Guillaume Nault Date: Sat Jan 16 11:44:22 2021 +0100 udp: mask TOS bits in udp_v4_early_demux() udp_v4_early_demux() is the only function that calls ip_mc_validate_source() with a TOS that hasn't been masked with IPTOS_RT_MASK. This results in different behaviours for incoming multicast UDPv4 packets, depending on if ip_mc_validate_source() is called from the early-demux path (udp_v4_early_demux) or from the regular input path (ip_route_input_noref). ECN would normally not be used with UDP multicast packets, so the practical consequences should be limited on that side. However, IPTOS_RT_MASK is used to also masks the TOS' high order bits, to align with the non-early-demux path behaviour. Reproducer: Setup two netns, connected with veth: $ ip netns add ns0 $ ip netns add ns1 $ ip -netns ns0 link set dev lo up $ ip -netns ns1 link set dev lo up $ ip link add name veth01 netns ns0 type veth peer name veth10 netns ns1 $ ip -netns ns0 link set dev veth01 up $ ip -netns ns1 link set dev veth10 up $ ip -netns ns0 address add 192.0.2.10 peer 192.0.2.11/32 dev veth01 $ ip -netns ns1 address add 192.0.2.11 peer 192.0.2.10/32 dev veth10 In ns0, add route to multicast address 224.0.2.0/24 using source address 198.51.100.10: $ ip -netns ns0 address add 198.51.100.10/32 dev lo $ ip -netns ns0 route add 224.0.2.0/24 dev veth01 src 198.51.100.10 In ns1, define route to 198.51.100.10, only for packets with TOS 4: $ ip -netns ns1 route add 198.51.100.10/32 tos 4 dev veth10 Also activate rp_filter in ns1, so that incoming packets not matching the above route get dropped: $ ip netns exec ns1 sysctl -wq net.ipv4.conf.veth10.rp_filter=1 Now try to receive packets on 224.0.2.11: $ ip netns exec ns1 socat UDP-RECVFROM:1111,ip-add-membership=224.0.2.11:veth10,ignoreeof - In ns0, send packet to 224.0.2.11 with TOS 4 and ECT(0) (that is, tos 6 for socat): $ echo test0 | ip netns exec ns0 socat - UDP-DATAGRAM:224.0.2.11:1111,bind=:1111,tos=6 The "test0" message is properly received by socat in ns1, because early-demux has no cached dst to use, so source address validation is done by ip_route_input_mc(), which receives a TOS that has the ECN bits masked. Now send another packet to 224.0.2.11, still with TOS 4 and ECT(0): $ echo test1 | ip netns exec ns0 socat - UDP-DATAGRAM:224.0.2.11:1111,bind=:1111,tos=6 The "test1" message isn't received by socat in ns1, because, now, early-demux has a cached dst to use and calls ip_mc_validate_source() immediately, without masking the ECN bits. Fixes: bc044e8db796 ("udp: perform source validation for mcast early demux") Signed-off-by: Guillaume Nault Signed-off-by: Jakub Kicinski commit b425e24a934e21a502d25089c6c7443d799c5594 Author: Maxim Mikityanskiy Date: Mon Jan 18 18:03:33 2021 +0200 xsk: Clear pool even for inactive queues The number of queues can change by other means, rather than ethtool. For example, attaching an mqprio qdisc with num_tc > 1 leads to creating multiple sets of TX queues, which may be then destroyed when mqprio is deleted. If an AF_XDP socket is created while mqprio is active, dev->_tx[queue_id].pool will be filled, but then real_num_tx_queues may decrease with deletion of mqprio, which will mean that the pool won't be NULLed, and a further increase of the number of TX queues may expose a dangling pointer. To avoid any potential misbehavior, this commit clears pool for RX and TX queues, regardless of real_num_*_queues, still taking into consideration num_*_queues to avoid overflows. Fixes: 1c1efc2af158 ("xsk: Create and free buffer pool independently from umem") Fixes: a41b4f3c58dd ("xsk: simplify xdp_clear_umem_at_qid implementation") Signed-off-by: Maxim Mikityanskiy Signed-off-by: Daniel Borkmann Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/20210118160333.333439-1-maximmi@mellanox.com commit 45dfb8a5659ad286c28fa59008271dbc4e5e3f2d Merge: f419f031de149 35d0b389f3b23 Author: Linus Torvalds Date: Tue Jan 19 13:26:05 2021 -0800 Merge tag 'task_work-2021-01-19' of git://git.kernel.dk/linux-block Pull task_work fix from Jens Axboe: "The TIF_NOTIFY_SIGNAL change inadvertently removed the unconditional task_work run we had in get_signal(). This caused a regression for some setups, since we're relying on eg ____fput() being run to close and release, for example, a pipe and wake the other end. For 5.11, I prefer the simple solution of just reinstating the unconditional run, even if it conceptually doesn't make much sense - if you need that kind of guarantee, you should be using TWA_SIGNAL instead of TWA_NOTIFY. But it's the trivial fix for 5.11, and would ensure that other potential gotchas/assumptions for task_work don't regress for 5.11. We're looking into further simplifying the task_work notifications for 5.12 which would resolve that too" * tag 'task_work-2021-01-19' of git://git.kernel.dk/linux-block: task_work: unconditionally run task_work from get_signal() commit 031c7a8cd6fc565e90320bf08f22ee6e70f9d969 Author: Geert Uytterhoeven Date: Mon Dec 28 09:33:28 2020 +0100 openrisc: io: Add missing __iomem annotation to iounmap() With C=1: drivers/soc/renesas/rmobile-sysc.c:330:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *addr @@ got void [noderef] __iomem *[assigned] base @@ drivers/soc/renesas/rmobile-sysc.c:330:33: sparse: expected void *addr drivers/soc/renesas/rmobile-sysc.c:330:33: sparse: got void [noderef] __iomem *[assigned] base Fix this by adding the missing __iomem annotation to iounmap(). Reported-by: kernel test robot Signed-off-by: Geert Uytterhoeven Signed-off-by: Stafford Horne commit 301a33d51880619d0c5a581b5a48d3a5248fa84b Author: Mircea Cirjaliu Date: Tue Jan 19 21:53:18 2021 +0100 bpf: Fix helper bpf_map_peek_elem_proto pointing to wrong callback I assume this was obtained by copy/paste. Point it to bpf_map_peek_elem() instead of bpf_map_pop_elem(). In practice it may have been less likely hit when under JIT given shielded via 84430d4232c3 ("bpf, verifier: avoid retpoline for map push/pop/peek operation"). Fixes: f1a2e44a3aec ("bpf: add queue and stack maps") Signed-off-by: Mircea Cirjaliu Signed-off-by: Daniel Borkmann Cc: Mauricio Vasquez Link: https://lore.kernel.org/bpf/AM7PR02MB6082663DFDCCE8DA7A6DD6B1BBA30@AM7PR02MB6082.eurprd02.prod.outlook.com commit f419f031de1498765b64ddf71590f40689a9b55c Merge: 28df858033484 5f39d2713bd80 Author: Linus Torvalds Date: Tue Jan 19 13:01:50 2021 -0800 Merge tag 'nfsd-5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux Pull nfsd fixes from Chuck Lever: - Avoid exposing parent of root directory in NFSv3 READDIRPLUS results - Fix a tracepoint change that went in the initial 5.11 merge * tag 'nfsd-5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: SUNRPC: Move the svc_xdr_recvfrom tracepoint again nfsd4: readdirplus shouldn't return parent of export commit 28df858033484b830c2ea146c03da67d2d659405 Merge: 1e2a199f6ccdc fff7b5e6ee63c Author: Linus Torvalds Date: Tue Jan 19 12:58:55 2021 -0800 Merge tag 'hyperv-fixes-signed-20210119' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux Pull hyperv fix from Wei Liu: "One patch from Dexuan to fix clockevent initialization" * tag 'hyperv-fixes-signed-20210119' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: x86/hyperv: Initialize clockevents after LAPIC is initialized commit f7b9820dbe1620a3d681991fc82774ae49c2b6d2 Merge: 7e238de8283ac 02cae02a7de14 Author: Jakub Kicinski Date: Tue Jan 19 12:02:22 2021 -0800 Merge branch 'sh_eth-fix-reboot-crash' Geert Uytterhoeven says: ==================== sh_eth: Fix reboot crash This patch fixes a regression v5.11-rc1, where rebooting while a sh_eth device is not opened will cause a crash. Changes compared to v1: - Export mdiobb_{read,write}(), - Call mdiobb_{read,write}() now they are exported, - Use mii_bus.parent to avoid bb_info.dev copy, - Drop RFC state. Alternatively, mdio-bitbang could provide Runtime PM-aware wrappers itself, and use them either manually (through a new parameter to alloc_mdio_bitbang(), or a new alloc_mdio_bitbang_*() function), or automatically (e.g. if pm_runtime_enabled() returns true). Note that the latter requires a "struct device *" parameter to operate on. Currently there are only two drivers that call alloc_mdio_bitbang() and use Runtime PM: the Renesas sh_eth and ravb drivers. This series fixes the former, while the latter is not affected (it keeps the device powered all the time between driver probe and driver unbind, and changing that seems to be non-trivial). ==================== Link: https://lore.kernel.org/r/20210118150656.796584-1-geert+renesas@glider.be Signed-off-by: Jakub Kicinski commit 02cae02a7de1484095e4ba984bfee7a75843ec26 Author: Geert Uytterhoeven Date: Mon Jan 18 16:06:56 2021 +0100 sh_eth: Make PHY access aware of Runtime PM to fix reboot crash Wolfram reports that his R-Car H2-based Lager board can no longer be rebooted in v5.11-rc1, as it crashes with an imprecise external abort. The issue can be reproduced on other boards (e.g. Koelsch with R-Car M2-W) too, if CONFIG_IP_PNP is disabled, and the Ethernet interface is down at reboot time: Unhandled fault: imprecise external abort (0x1406) at 0x00000000 pgd = (ptrval) [00000000] *pgd=422b6835, *pte=00000000, *ppte=00000000 Internal error: : 1406 [#1] ARM Modules linked in: CPU: 0 PID: 1105 Comm: init Tainted: G W 5.10.0-rc1-00402-ge2f016cf7751 #1048 Hardware name: Generic R-Car Gen2 (Flattened Device Tree) PC is at sh_mdio_ctrl+0x44/0x60 LR is at sh_mmd_ctrl+0x20/0x24 ... Backtrace: [] (sh_mdio_ctrl) from [] (sh_mmd_ctrl+0x20/0x24) r7:0000001f r6:00000020 r5:00000002 r4:c22a1dc4 [] (sh_mmd_ctrl) from [] (mdiobb_cmd+0x38/0xa8) [] (mdiobb_cmd) from [] (mdiobb_read+0x58/0xdc) r9:c229f844 r8:c0c329dc r7:c221e000 r6:00000001 r5:c22a1dc4 r4:00000001 [] (mdiobb_read) from [] (__mdiobus_read+0x74/0xe0) r7:0000001f r6:00000001 r5:c221e000 r4:c221e000 [] (__mdiobus_read) from [] (mdiobus_read+0x40/0x54) r7:0000001f r6:00000001 r5:c221e000 r4:c221e458 [] (mdiobus_read) from [] (phy_read+0x1c/0x20) r7:ffffe000 r6:c221e470 r5:00000200 r4:c229f800 [] (phy_read) from [] (kszphy_config_intr+0x44/0x80) [] (kszphy_config_intr) from [] (phy_disable_interrupts+0x44/0x50) r5:c229f800 r4:c229f800 [] (phy_disable_interrupts) from [] (phy_shutdown+0x18/0x1c) r5:c229f800 r4:c229f804 [] (phy_shutdown) from [] (device_shutdown+0x168/0x1f8) [] (device_shutdown) from [] (kernel_restart_prepare+0x3c/0x48) r9:c22d2000 r8:c0100264 r7:c0b0d034 r6:00000000 r5:4321fedc r4:00000000 [] (kernel_restart_prepare) from [] (kernel_restart+0x1c/0x60) [] (kernel_restart) from [] (__do_sys_reboot+0x168/0x208) r5:4321fedc r4:01234567 [] (__do_sys_reboot) from [] (sys_reboot+0x18/0x1c) r7:00000058 r6:00000000 r5:00000000 r4:00000000 [] (sys_reboot) from [] (ret_fast_syscall+0x0/0x54) As of commit e2f016cf775129c0 ("net: phy: add a shutdown procedure"), system reboot calls phy_disable_interrupts() during shutdown. As this happens unconditionally, the PHY registers may be accessed while the device is suspended, causing undefined behavior, which may crash the system. Fix this by wrapping the PHY bitbang accessors in the sh_eth driver by wrappers that take care of Runtime PM, to resume the device when needed. Reported-by: Wolfram Sang Suggested-by: Andrew Lunn Signed-off-by: Geert Uytterhoeven Tested-by: Wolfram Sang Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski commit 8eed01b5ca9c1deff329ad44f08e2041ca14842c Author: Geert Uytterhoeven Date: Mon Jan 18 16:06:55 2021 +0100 mdio-bitbang: Export mdiobb_{read,write}() Export mdiobb_read() and mdiobb_write(), so Ethernet controller drivers can call them from their MDIO read/write wrappers. Signed-off-by: Geert Uytterhoeven Tested-by: Wolfram Sang Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit 7e238de8283acd32c26c2bc2a50672d0ea862ff7 Author: Oleksandr Mazur Date: Tue Jan 19 10:53:33 2021 +0200 net: core: devlink: use right genl user_ptr when handling port param get/set Fix incorrect user_ptr dereferencing when handling port param get/set: idx [0] stores the 'struct devlink' pointer; idx [1] stores the 'struct devlink_port' pointer; Fixes: 637989b5d77e ("devlink: Always use user_ptr[0] for devlink and simplify post_doit") CC: Parav Pandit Signed-off-by: Oleksandr Mazur Signed-off-by: Vadym Kochan Link: https://lore.kernel.org/r/20210119085333.16833-1-vadym.kochan@plvision.eu Signed-off-by: Jakub Kicinski commit 74bdd45c85d02f695a1cd1c3dccf8b3960a86d8f Author: Odin Ugedal Date: Sat Jan 16 18:36:34 2021 +0100 cgroup: update PSI file description in docs Update PSI file description in cgroup-v2 docs to reflect the current implementation. tj: Changed cpu.pressure from read-only to read-write as suggested by Johannes. Signed-off-by: Odin Ugedal Acked-by: Dan Schatzberg Acked-by: Johannes Weiner Signed-off-by: Tejun Heo commit e594443196d6e0ef3d3b30320c49b3a4d4f9a547 Author: Dave Jiang Date: Mon Jan 18 10:28:44 2021 -0700 dmaengine: move channel device_node deletion to driver Channel device_node deletion is managed by the device driver rather than the dmaengine core. The deletion was accidentally introduced when making channel unregister dynamic. It causes xilinx_dma module to crash on unload as reported by Radhey. Remove chan->device_node delete in dmaengine and also fix up idxd driver. [ 42.142705] Internal error: Oops: 96000044 [#1] SMP [ 42.147566] Modules linked in: xilinx_dma(-) clk_xlnx_clock_wizard uio_pdrv_genirq [ 42.155139] CPU: 1 PID: 2075 Comm: rmmod Not tainted 5.10.1-00026-g3a2e6dd7a05-dirty #192 [ 42.163302] Hardware name: Enclustra XU5 SOM (DT) [ 42.167992] pstate: 40000005 (nZcv daif -PAN -UAO -TCO BTYPE=--) [ 42.173996] pc : xilinx_dma_chan_remove+0x74/0xa0 [xilinx_dma] [ 42.179815] lr : xilinx_dma_chan_remove+0x70/0xa0 [xilinx_dma] [ 42.185636] sp : ffffffc01112bca0 [ 42.188935] x29: ffffffc01112bca0 x28: ffffff80402ea640 xilinx_dma_chan_remove+0x74/0xa0: __list_del at ./include/linux/list.h:112 (inlined by) __list_del_entry at./include/linux/list.h:135 (inlined by) list_del at ./include/linux/list.h:146 (inlined by) xilinx_dma_chan_remove at drivers/dma/xilinx/xilinx_dma.c:2546 Fixes: e81274cd6b52 ("dmaengine: add support to dynamic register/unregister of channels") Reported-by: Radhey Shyam Pandey Signed-off-by: Dave Jiang Tested-by: Radhey Shyam Pandey Link: https://lore.kernel.org/r/161099092469.2495902.5064826526660062342.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul Cc: stable@vger.kernel.org # 5.9+ commit 385aac1519417b89cb91b77c22e4ca21db563cd0 Author: Odin Ugedal Date: Sat Jan 16 18:36:33 2021 +0100 cgroup: fix psi monitor for root cgroup Fix NULL pointer dereference when adding new psi monitor to the root cgroup. PSI files for root cgroup was introduced in df5ba5be742 by using system wide psi struct when reading, but file write/monitor was not properly fixed. Since the PSI config for the root cgroup isn't initialized, the current implementation tries to lock a NULL ptr, resulting in a crash. Can be triggered by running this as root: $ tee /sys/fs/cgroup/cpu.pressure <<< "some 10000 1000000" Signed-off-by: Odin Ugedal Reviewed-by: Suren Baghdasaryan Acked-by: Dan Schatzberg Fixes: df5ba5be7425 ("kernel/sched/psi.c: expose pressure metrics on root cgroup") Acked-by: Johannes Weiner Cc: stable@vger.kernel.org # 5.2+ Signed-off-by: Tejun Heo commit 9c7d9017a49fb8516c13b7bff59b7da2abed23e1 Author: Rafael J. Wysocki Date: Fri Jan 8 19:05:59 2021 +0100 x86: PM: Register syscore_ops for scale invariance On x86 scale invariace tends to be disabled during resume from suspend-to-RAM, because the MPERF or APERF MSR values are not as expected then due to updates taking place after the platform firmware has been invoked to complete the suspend transition. That, of course, is not desirable, especially if the schedutil scaling governor is in use, because the lack of scale invariance causes it to be less reliable. To counter that effect, modify init_freq_invariance() to register a syscore_ops object for scale invariance with the ->resume callback pointing to init_counter_refs() which will run on the CPU starting the resume transition (the other CPUs will be taken care of the "online" operations taking place later). Fixes: e2b0d619b400 ("x86, sched: check for counters overflow in frequency invariant accounting") Signed-off-by: Rafael J. Wysocki Signed-off-by: Peter Zijlstra (Intel) Acked-by: Giovanni Gherdovich Link: https://lkml.kernel.org/r/1803209.Mvru99baaF@kreacher commit 2b73649cee65b8e33c75c66348cb1bfe0ff9d766 Author: Kai-Heng Feng Date: Tue Jan 19 23:21:43 2021 +0800 ALSA: hda: Balance runtime/system PM if direct-complete is disabled After hibernation, HDA controller can't be runtime-suspended after commit 215a22ed31a1 ("ALSA: hda: Refactor codjc PM to use direct-complete optimization"), which enables direct-complete for HDA codec. The HDA codec driver didn't expect direct-complete will be disabled after it returns a positive value from prepare() callback. However, there are some places that PM core can disable direct-complete. For instance, system hibernation or when codec has subordinates like LEDs. So if the codec is prepared for direct-complete but PM core still calls codec's suspend or freeze callback, partially revert the commit and take the original approach, which uses pm_runtime_force_*() helpers to ensure PM refcount are balanced. Meanwhile, still keep prepare() and complete() callbacks to enable direct-complete and request a resume for jack detection, respectively. Reported-by: Kenneth R. Crudup Fixes: 215a22ed31a1 ("ALSA: hda: Refactor codec PM to use direct-complete optimization") Signed-off-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20210119152145.346558-1-kai.heng.feng@canonical.com Signed-off-by: Takashi Iwai commit abbc4d6ecd07fa246fd597b5d8fced28f0bcc606 Author: Thomas Zimmermann Date: Mon Jan 18 15:46:39 2021 +0100 drm/vram-helper: Reuse existing page mappings in vmap For performance, BO page mappings can stay in place even if the map counter has returned to 0. In these cases, the existing page mapping has to be reused by the next vmap operation. Otherwise a new mapping would be installed and the old mapping's pages leak. Fix the issue by reusing existing page mappings for vmap operations. Signed-off-by: Thomas Zimmermann Fixes: 1086db71a1db ("drm/vram-helper: Remove invariant parameters from internal kmap function") Acked-by: Christian König Tested-by: Eli Cohen Reported-by: Eli Cohen Reported-by: kernel test robot Cc: Daniel Vetter Cc: Christian König Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20210118144639.27307-1-tzimmermann@suse.de commit 43b67309b6b2a3c08396cc9b3f83f21aa529d273 Author: Pan Bian Date: Tue Jan 19 04:11:27 2021 -0800 drm/atomic: put state on error path Put the state before returning error code. Fixes: 44596b8c4750 ("drm/atomic: Unify conflicting encoder handling.") Signed-off-by: Pan Bian Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210119121127.84127-1-bianpan2016@163.com commit ef02684c4e67d8c35ac83083564135bc7b1d3445 Author: Patrik Jakobsson Date: Mon Jan 18 21:36:15 2021 +0100 usb: bdc: Make bdc pci driver depend on BROKEN The bdc pci driver is going to be removed due to it not existing in the wild. This patch turns off compilation of the driver so that stable kernels can also pick up the change. This helps the out-of-tree facetimehd webcam driver as the pci id conflicts with bdc. Cc: Al Cooper Cc: Acked-by: Felipe Balbi Signed-off-by: Patrik Jakobsson Link: https://lore.kernel.org/r/20210118203615.13995-1-patrik.r.jakobsson@gmail.com Signed-off-by: Greg Kroah-Hartman commit 298d75c9b18875d2d582dcd5145a45cac8d2bae2 Author: Thierry Reding Date: Mon Jan 18 20:49:25 2021 +0100 gpio: tegra: Add missing dependencies Commit efcdca286eef ("gpio: tegra: Convert to gpio_irq_chip") moved the Tegra GPIO driver to the generic GPIO IRQ chip infrastructure and made the IRQ domain hierarchical, so the driver needs to pull in the support infrastructure via the GPIOLIB_IRQCHIP and IRQ_DOMAIN_HIERARCHY Kconfig options. Fixes: efcdca286eef ("gpio: tegra: Convert to gpio_irq_chip") Reported-by: kernel test robot Signed-off-by: Thierry Reding Signed-off-by: Bartosz Golaszewski commit 18eedf2b5ec7c8ce2bb23d9148cfd63949207414 Author: Randy Dunlap Date: Mon Jan 18 19:18:13 2021 -0800 gpio: sifive: select IRQ_DOMAIN_HIERARCHY rather than depend on it This is the only driver in the kernel source tree that depends on IRQ_DOMAIN_HIERARCHY instead of selecting it. Since it is not a visible Kconfig symbol, depending on it (expecting a user to set/enable it) doesn't make much sense, so change it to select instead of "depends on". Fixes: 96868dce644d ("gpio/sifive: Add GPIO driver for SiFive SoCs") Signed-off-by: Randy Dunlap Cc: Linus Walleij Cc: Bartosz Golaszewski Cc: linux-gpio@vger.kernel.org Cc: Thierry Reding Cc: Greentime Hu Cc: Yash Shah Signed-off-by: Bartosz Golaszewski commit e73b0101ae5124bf7cd3fb5d250302ad2f16a416 Author: Baruch Siach Date: Sun Jan 17 15:17:02 2021 +0200 gpio: mvebu: fix pwm .get_state period calculation The period is the sum of on and off values. That is, calculate period as ($on + $off) / clkrate instead of $off / clkrate - $on / clkrate that makes no sense. Reported-by: Russell King Reviewed-by: Uwe Kleine-König Fixes: 757642f9a584e ("gpio: mvebu: Add limited PWM support") Signed-off-by: Baruch Siach Signed-off-by: Bartosz Golaszewski commit ef38237444ce952daf041ed2885918f9f7d1e997 Author: Nikita Shubin Date: Mon Jan 18 12:05:08 2021 +0300 gpiolib: add a warning on gpiochip->to_irq defined gpiochip->to_irq method is redefined in gpiochip_add_irqchip. A lot of gpiod driver's still define ->to_irq method, let's give a gentle warning that they can no longer rely on it, so they can remove it on ocassion. Fixes: e0d8972898139 ("gpio: Implement tighter IRQ chip integration") Signed-off-by: Nikita Shubin Signed-off-by: Bartosz Golaszewski commit f0e386ee0c0b71ea6f7238506a4d0965a2dbef11 Author: John Ogness Date: Thu Jan 14 18:10:12 2021 +0106 printk: fix buffer overflow potential for print_text() Before the commit 896fbe20b4e2333fb55 ("printk: use the lockless ringbuffer"), msg_print_text() would only write up to size-1 bytes into the provided buffer. Some callers expect this behavior and append a terminator to returned string. In particular: arch/powerpc/xmon/xmon.c:dump_log_buf() arch/um/kernel/kmsg_dump.c:kmsg_dumper_stdout() msg_print_text() has been replaced by record_print_text(), which currently fills the full size of the buffer. This causes a buffer overflow for the above callers. Change record_print_text() so that it will only use size-1 bytes for text data. Also, for paranoia sakes, add a terminator after the text data. And finally, document this behavior so that it is clear that only size-1 bytes are used and a terminator is added. Fixes: 896fbe20b4e2333fb55 ("printk: use the lockless ringbuffer") Cc: stable@vger.kernel.org # 5.10+ Signed-off-by: John Ogness Reviewed-by: Petr Mladek Acked-by: Sergey Senozhatsky Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210114170412.4819-1-john.ogness@linutronix.de commit 0bab9cb2d980d7c075cffb9216155f7835237f98 Author: Borislav Petkov Date: Thu Jan 14 14:25:35 2021 +0100 x86/entry: Remove put_ret_addr_in_rdi THUNK macro argument That logic is unused since 320100a5ffe5 ("x86/entry: Remove the TRACE_IRQS cruft") Remove it. Suggested-by: Peter Zijlstra (Intel) Acked-by: Peter Zijlstra (Intel) Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/YAAszZJ2GcIYZmB5@hirez.programming.kicks-ass.net commit 1c4995b0a576d24bb7ead991fb037c8b47ab6e32 Author: Ville Syrjälä Date: Mon Jan 18 17:43:55 2021 +0200 drm/i915: Only enable DFP 4:4:4->4:2:0 conversion when outputting YCbCr 4:4:4 Let's not enable the 4:4:4->4:2:0 conversion bit in the DFP unless we're actually outputting YCbCr 4:4:4. It would appear some protocol converters blindy consult this bit even when the source is outputting RGB, resulting in a visual mess. Cc: stable@vger.kernel.org Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2914 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210111164111.13302-1-ville.syrjala@linux.intel.com Fixes: 181567aa9f0d ("drm/i915: Do YCbCr 444->420 conversion via DP protocol converters") Reviewed-by: Jani Nikula (cherry picked from commit 3170a21f7059c4660c469f59bf529f372a57da5f) Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210118154355.24453-1-ville.syrjala@linux.intel.com commit d502297008142645edf5c791af424ed321e5da84 Author: Ben Skeggs Date: Tue Jan 19 15:53:35 2021 +1000 drm/nouveau/nvif: fix method count when pushing an array Reported-by: Lyude Paul Signed-off-by: Ben Skeggs commit 9d9b1ee0b2d1c9e02b2338c4a4b0a062d2d3edac Author: Enke Chen Date: Fri Jan 15 14:30:58 2021 -0800 tcp: fix TCP_USER_TIMEOUT with zero window The TCP session does not terminate with TCP_USER_TIMEOUT when data remain untransmitted due to zero window. The number of unanswered zero-window probes (tcp_probes_out) is reset to zero with incoming acks irrespective of the window size, as described in tcp_probe_timer(): RFC 1122 4.2.2.17 requires the sender to stay open indefinitely as long as the receiver continues to respond probes. We support this by default and reset icsk_probes_out with incoming ACKs. This counter, however, is the wrong one to be used in calculating the duration that the window remains closed and data remain untransmitted. Thanks to Jonathan Maxwell for diagnosing the actual issue. In this patch a new timestamp is introduced for the socket in order to track the elapsed time for the zero-window probes that have not been answered with any non-zero window ack. Fixes: 9721e709fa68 ("tcp: simplify window probe aborting on USER_TIMEOUT") Reported-by: William McCall Co-developed-by: Neal Cardwell Signed-off-by: Neal Cardwell Signed-off-by: Enke Chen Reviewed-by: Yuchung Cheng Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20210115223058.GA39267@localhost.localdomain Signed-off-by: Jakub Kicinski commit b889c7c8c02ebb0b724e1b3998d7924122e49701 Merge: bde2c0af61417 ceed9038b2783 Author: Jakub Kicinski Date: Mon Jan 18 19:53:05 2021 -0800 Merge branch 'ipv6-fixes-for-the-multicast-routes' Matteo Croce says: ==================== ipv6: fixes for the multicast routes Fix two wrong flags in the IPv6 multicast routes created by the autoconf code. ==================== Link: https://lore.kernel.org/r/20210115184209.78611-1-mcroce@linux.microsoft.com Signed-off-by: Jakub Kicinski commit ceed9038b2783d14e0422bdc6fd04f70580efb4c Author: Matteo Croce Date: Fri Jan 15 19:42:09 2021 +0100 ipv6: set multicast flag on the multicast route The multicast route ff00::/8 is created with type RTN_UNICAST: $ ip -6 -d route unicast ::1 dev lo proto kernel scope global metric 256 pref medium unicast fe80::/64 dev eth0 proto kernel scope global metric 256 pref medium unicast ff00::/8 dev eth0 proto kernel scope global metric 256 pref medium Set the type to RTN_MULTICAST which is more appropriate. Fixes: e8478e80e5a7 ("net/ipv6: Save route type in rt6_info") Signed-off-by: Matteo Croce Signed-off-by: Jakub Kicinski commit a826b04303a40d52439aa141035fca5654ccaccd Author: Matteo Croce Date: Fri Jan 15 19:42:08 2021 +0100 ipv6: create multicast route with RTPROT_KERNEL The ff00::/8 multicast route is created without specifying the fc_protocol field, so the default RTPROT_BOOT value is used: $ ip -6 -d route unicast ::1 dev lo proto kernel scope global metric 256 pref medium unicast fe80::/64 dev eth0 proto kernel scope global metric 256 pref medium unicast ff00::/8 dev eth0 proto boot scope global metric 256 pref medium As the documentation says, this value identifies routes installed during boot, but the route is created when interface is set up. Change the value to RTPROT_KERNEL which is a better value. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Matteo Croce Signed-off-by: Jakub Kicinski commit bde2c0af6141702580a2ccebc396041660d127ef Merge: 87fe04367d842 c13cf5c159660 Author: Jakub Kicinski Date: Mon Jan 18 14:23:57 2021 -0800 Merge tag 'mac80211-for-net-2021-01-18.2' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== Various fixes: * kernel-doc parsing fixes * incorrect debugfs string checks * locking fix in regulatory * some encryption-related fixes * tag 'mac80211-for-net-2021-01-18.2' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211: mac80211: check if atf has been disabled in __ieee80211_schedule_txq mac80211: do not drop tx nulldata packets on encrypted links mac80211: fix encryption key selection for 802.3 xmit mac80211: fix fast-rx encryption check mac80211: fix incorrect strlen of .write in debugfs cfg80211: fix a kerneldoc markup cfg80211: Save the regulatory domain with a lock cfg80211/mac80211: fix kernel-doc for SAR APIs ==================== Link: https://lore.kernel.org/r/20210118204750.7243-1-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski commit a372173bf314d374da4dd1155549d8ca7fc44709 Author: Kamal Heib Date: Thu Jan 14 21:14:23 2021 +0200 RDMA/cxgb4: Fix the reported max_recv_sge value The max_recv_sge value is wrongly reported when calling query_qp, This is happening due to a typo when assigning the max_recv_sge value, the value of sq_max_sges was assigned instead of rq_max_sges. Fixes: 3e5c02c9ef9a ("iw_cxgb4: Support query_qp() verb") Link: https://lore.kernel.org/r/20210114191423.423529-1-kamalheib1@gmail.com Signed-off-by: Kamal Heib Reviewed-by: Potnuri Bharat Teja Signed-off-by: Jason Gunthorpe commit 92a5e1fdb286851d5bd0eb966b8d075be27cf5ee Author: Sandipan Das Date: Mon Jan 18 15:01:45 2021 +0530 selftests/powerpc: Fix exit status of pkey tests Since main() does not return a value explicitly, the return values from FAIL_IF() conditions are ignored and the tests can still pass irrespective of failures. This makes sure that we always explicitly return the correct test exit status. Fixes: 1addb6444791 ("selftests/powerpc: Add test for execute-disabled pkeys") Fixes: c27f2fd1705a ("selftests/powerpc: Add test for pkey siginfo verification") Reported-by: Eirik Fuller Signed-off-by: Sandipan Das Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210118093145.10134-1-sandipan@linux.ibm.com commit 87fe04367d842c4d97a77303242d4dd4ac351e46 Author: Rasmus Villemoes Date: Sat Jan 16 03:39:35 2021 +0100 net: dsa: mv88e6xxx: also read STU state in mv88e6250_g1_vtu_getnext mv88e6xxx_port_vlan_join checks whether the VTU already contains an entry for the given vid (via mv88e6xxx_vtu_getnext), and if so, merely changes the relevant .member[] element and loads the updated entry into the VTU. However, at least for the mv88e6250, the on-stack struct mv88e6xxx_vtu_entry vlan never has its .state[] array explicitly initialized, neither in mv88e6xxx_port_vlan_join() nor inside the getnext implementation. So the new entry has random garbage for the STU bits, breaking VLAN filtering. When the VTU entry is initially created, those bits are all zero, and we should make sure to keep them that way when the entry is updated. Fixes: 92307069a96c (net: dsa: mv88e6xxx: Avoid VTU corruption on 6097) Signed-off-by: Rasmus Villemoes Reviewed-by: Florian Fainelli Reviewed-by: Tobias Waldekranz Tested-by: Tobias Waldekranz Signed-off-by: Jakub Kicinski commit 173aac2fef96972e42d33c0e1189e6f756a0d719 Author: Jeannie Stevenson Date: Fri Jan 15 16:06:30 2021 +0000 platform/x86: thinkpad_acpi: Add P53/73 firmware to fan_quirk_table for dual fan control This commit enables dual fan control for the new Lenovo P53 and P73 laptop models. Signed-off-by: Jeannie Stevenson Link: https://lore.kernel.org/r/Pn_Xii4XYpQRFtgkf4PbNgieE89BAkHgLI1kWIq-zFudwh2A1DY5J_DJVHK06rMW_hGPHx_mPE33gd8mg9-8BxqJTaSC6hhPqAsfZlcNGH0=@protonmail.com Signed-off-by: Hans de Goede commit d35c9a029a73e84d84337403d20b060494890570 Author: Hans de Goede Date: Fri Jan 15 00:27:44 2021 +0100 platform/x86: hp-wmi: Don't log a warning on HPWMI_RET_UNKNOWN_COMMAND errors The recently added thermal policy support makes a hp_wmi_perform_query(0x4c, ...) call on older devices which do not support thermal policies this causes the following warning to be logged (seen on a HP Stream x360 Convertible PC 11): [ 26.805305] hp_wmi: query 0x4c returned error 0x3 Error 0x3 is HPWMI_RET_UNKNOWN_COMMAND error. This commit silences the warning for unknown-command errors, silencing the new warning. Cc: Elia Devito Fixes: 81c93798ef3e ("platform/x86: hp-wmi: add support for thermal policy") Link: https://lore.kernel.org/r/20210114232744.154886-1-hdegoede@redhat.com Signed-off-by: Hans de Goede commit 79267ae22615496655feee2db0848f6786bcf67a Author: Vladimir Oltean Date: Mon Jan 18 15:52:10 2021 +0200 net: mscc: ocelot: allow offloading of bridge on top of LAG The blamed commit was too aggressive, and it made ocelot_netdevice_event react only to network interface events emitted for the ocelot switch ports. In fact, only the PRECHANGEUPPER should have had that check. When we ignore all events that are not for us, we miss the fact that the upper of the LAG changes, and the bonding interface gets enslaved to a bridge. This is an operation we could offload under certain conditions. Fixes: 7afb3e575e5a ("net: mscc: ocelot: don't handle netdev events for other netdevs") Signed-off-by: Vladimir Oltean Reviewed-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210118135210.2666246-1-olteanv@gmail.com Signed-off-by: Jakub Kicinski commit 1e2a199f6ccdc15cf111d68d212e2fd4ce65682e Merge: b4459f4413c89 4d163ad79b155 Author: Linus Torvalds Date: Mon Jan 18 11:23:05 2021 -0800 Merge tag 'spi-fix-v5.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "A few more bug fixes for SPI, both driver specific ones. The caching in the Cadence driver is to avoid a deadlock trying to retrieve the cached value later at runtime" * tag 'spi-fix-v5.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: cadence: cache reference clock rate during probe spi: fsl: Fix driver breakage when SPI_CS_HIGH is not set in spi->mode commit b4459f4413c890a35dfcecaff29d37ac65607d76 Merge: fd3958eac3875 32c2bc8f2d855 Author: Linus Torvalds Date: Mon Jan 18 11:17:18 2021 -0800 Merge tag 'fixes-2021-01-18' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock Pull ia64 build fix from Mike Rapoport: "Fix an ia64 build failure caused by memory model changes" * tag 'fixes-2021-01-18' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock: ia64: fix build failure caused by memory model changes commit fd3958eac387593d02e4d4287658ba04bcdb235a Merge: 19c329f680899 382811940303f Author: Linus Torvalds Date: Mon Jan 18 11:07:18 2021 -0800 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fixes from Herbert Xu: "A Kconfig dependency issue with omap-sham and a divide by zero in xor on some platforms" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: omap-sham - Fix link error without crypto-engine crypto: xor - Fix divide error in do_xor_speed() commit c23010ffb20acb02a1d41dc025131609916ed633 Merge: 532a208ad6101 7505c06dabb5e Author: Takashi Iwai Date: Mon Jan 18 19:51:49 2021 +0100 Merge tag 'asoc-fix-v5.11-rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v5.11 A few more fixes for v5.11, mostly around HDA jack detection, plus a couple of updates to the MAINTAINERS entries. commit 070222731be52d741e55d8967b1764482b81e54c Author: Hans de Goede Date: Thu Jan 14 15:34:32 2021 +0100 platform/x86: intel-vbtn: Drop HP Stream x360 Convertible PC 11 from allow-list THe HP Stream x360 Convertible PC 11 DSDT has the following VGBS function: Method (VGBS, 0, Serialized) { If ((^^PCI0.LPCB.EC0.ROLS == Zero)) { VBDS = Zero } Else { VBDS = Zero } Return (VBDS) /* \_SB_.VGBI.VBDS */ } Which is obviously wrong, because it always returns 0 independent of the 2-in-1 being in laptop or tablet mode. This causes the intel-vbtn driver to initially report SW_TABLET_MODE = 1 to userspace, which is known to cause problems when the 2-in-1 is actually in laptop mode. During earlier testing this turned out to not be a problem because the 2-in-1 would do a Notify(..., 0xCC) or Notify(..., 0xCD) soon after the intel-vbtn driver loaded, correcting the SW_TABLET_MODE state. Further testing however has shown that this Notify() soon after the intel-vbtn driver loads, does not always happen. When the Notify does not happen, then intel-vbtn reports SW_TABLET_MODE = 1 resulting in a non-working touchpad. IOW the tablet-mode reporting is not reliable on this device, so it should be dropped from the allow-list, fixing the touchpad sometimes not working. Fixes: 8169bd3e6e19 ("platform/x86: intel-vbtn: Switch to an allow-list for SW_TABLET_MODE reporting") Link: https://lore.kernel.org/r/20210114143432.31750-1-hdegoede@redhat.com Signed-off-by: Hans de Goede commit 3ed86b9a7140bb9b5ff0669778e56bf9b0e582a5 Author: Andrey Konovalov Date: Fri Jan 15 18:41:53 2021 +0100 kasan, arm64: fix pointer tags in KASAN reports As of the "arm64: expose FAR_EL1 tag bits in siginfo" patch, the address that is passed to report_tag_fault has pointer tags in the format of 0x0X, while KASAN uses 0xFX format (note the difference in the top 4 bits). Fix up the pointer tag for kernel pointers in do_tag_check_fault by setting them to the same value as bit 55. Explicitly use __untagged_addr() instead of untagged_addr(), as the latter doesn't affect TTBR1 addresses. Fixes: dceec3ff7807 ("arm64: expose FAR_EL1 tag bits in siginfo") Fixes: 4291e9ee6189 ("kasan, arm64: print report from tag fault handler") Signed-off-by: Andrey Konovalov Reviewed-by: Catalin Marinas Reviewed-by: Vincenzo Frascino Link: https://linux-review.googlesource.com/id/I9ced973866036d8679e8f4ae325de547eb969649 Link: https://lore.kernel.org/r/ff30b0afe6005fd046f9ac72bfb71822aedccd89.1610731872.git.andreyknvl@google.com Signed-off-by: Catalin Marinas commit bffcd507780ea614b5543c66f2e37ce0d55cd449 Author: Chaitanya Kulkarni Date: Wed Jan 13 17:33:51 2021 -0800 nvmet: set right status on error in id-ns handler The function nvmet_execute_identify_ns() doesn't set the status if call to nvmet_find_namespace() fails. In that case we set the status of the request to the value return by the nvmet_copy_sgl(). Set the status to NVME_SC_INVALID_NS and adjust the code such that request will have the right status on nvmet_find_namespace() failure. Without this patch :- NVME Identify Namespace 3: nsze : 0 ncap : 0 nuse : 0 nsfeat : 0 nlbaf : 0 flbas : 0 mc : 0 dpc : 0 dps : 0 nmic : 0 rescap : 0 fpi : 0 dlfeat : 0 nawun : 0 nawupf : 0 nacwu : 0 nabsn : 0 nabo : 0 nabspf : 0 noiob : 0 nvmcap : 0 mssrl : 0 mcl : 0 msrc : 0 nsattr : 0 nvmsetid: 0 anagrpid: 0 endgid : 0 nguid : 00000000000000000000000000000000 eui64 : 0000000000000000 lbaf 0 : ms:0 lbads:0 rp:0 (in use) With this patch-series :- feb3b88b501e (HEAD -> nvme-5.11) nvmet: remove extra variable in identify ns 6302aa67210a nvmet: remove extra variable in id-desclist ed57951da453 nvmet: remove extra variable in smart log nsid be384b8c24dc nvmet: set right status on error in id-ns handler NVMe status: INVALID_NS: The namespace or the format of that namespace is invalid(0xb) Signed-off-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 20d3bb92e84d417b0494a3b6867f0c86713db257 Author: Klaus Jensen Date: Fri Jan 15 07:30:46 2021 +0100 nvme-pci: allow use of cmb on v1.4 controllers Since NVMe v1.4 the Controller Memory Buffer must be explicitly enabled by the host. Signed-off-by: Klaus Jensen [hch: avoid a local variable and add a comment] Signed-off-by: Christoph Hellwig commit 9ebbfe495ecd2e51bc92ac21ed5817c3b9e223ce Author: Chao Leng Date: Thu Jan 14 17:09:26 2021 +0800 nvme-tcp: avoid request double completion for concurrent nvme_tcp_timeout Each name space has a request queue, if complete request long time, multi request queues may have time out requests at the same time, nvme_tcp_timeout will execute concurrently. Multi requests in different request queues may be queued in the same tcp queue, multi nvme_tcp_timeout may call nvme_tcp_stop_queue at the same time. The first nvme_tcp_stop_queue will clear NVME_TCP_Q_LIVE and continue stopping the tcp queue(cancel io_work), but the others check NVME_TCP_Q_LIVE is already cleared, and then directly complete the requests, complete request before the io work is completely canceled may lead to a use-after-free condition. Add a multex lock to serialize nvme_tcp_stop_queue. Signed-off-by: Chao Leng Signed-off-by: Christoph Hellwig commit 7674073b2ed35ac951a49c425dec6b39d5a57140 Author: Chao Leng Date: Thu Jan 14 17:09:25 2021 +0800 nvme-rdma: avoid request double completion for concurrent nvme_rdma_timeout A crash happens when inject completing request long time(nearly 30s). Each name space has a request queue, when inject completing request long time, multi request queues may have time out requests at the same time, nvme_rdma_timeout will execute concurrently. Multi requests in different request queues may be queued in the same rdma queue, multi nvme_rdma_timeout may call nvme_rdma_stop_queue at the same time. The first nvme_rdma_timeout will clear NVME_RDMA_Q_LIVE and continue stopping the rdma queue(drain qp), but the others check NVME_RDMA_Q_LIVE is already cleared, and then directly complete the requests, complete request before the qp is fully drained may lead to a use-after-free condition. Add a multex lock to serialize nvme_rdma_stop_queue. Signed-off-by: Chao Leng Tested-by: Israel Rukshin Reviewed-by: Israel Rukshin Signed-off-by: Christoph Hellwig commit 4d6b1c95b974761c01cbad92321b82232b66d2a2 Author: Revanth Rajashekar Date: Thu Jan 14 18:55:07 2021 -0700 nvme: check the PRINFO bit before deciding the host buffer length According to NVMe spec v1.4, section 8.3.1, the PRINFO bit and the metadata size play a vital role in deteriming the host buffer size. If PRIFNO bit is set and MS==8, the host doesn't add the metadata buffer, instead the controller adds it. Signed-off-by: Revanth Rajashekar Signed-off-by: Christoph Hellwig commit 952de419b6179ad1424f512d52ec7122662fdf63 Author: Lorenzo Bianconi Date: Thu Jan 14 18:26:47 2021 +0100 mt76: mt7663s: fix rx buffer refcounting Similar to mt7601u driver, fix erroneous rx page refcounting Fixes: a66cbdd6573d ("mt76: mt7615: introduce mt7663s support") Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/dca19c9d445156201bc41f7cbb6e894bbc9a678c.1610644945.git.lorenzo@kernel.org commit d24c790577ef01bfa01da2b131313a38c843a634 Author: Lorenzo Bianconi Date: Thu Jan 14 18:10:52 2021 +0100 mt7601u: fix rx buffer refcounting Fix the following crash due to erroneous page refcounting: [ 32.445919] BUG: Bad page state in process swapper/1 pfn:11f65a [ 32.447409] page:00000000938f0632 refcount:0 mapcount:-128 mapping:0000000000000000 index:0x0 pfn:0x11f65a [ 32.449605] flags: 0x8000000000000000() [ 32.450421] raw: 8000000000000000 ffffffff825b0148 ffffea00045ae988 0000000000000000 [ 32.451795] raw: 0000000000000000 0000000000000001 00000000ffffff7f 0000000000000000 [ 32.452999] page dumped because: nonzero mapcount [ 32.453888] Modules linked in: [ 32.454492] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.11.0-rc2+ #1976 [ 32.455695] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-1.fc33 04/01/2014 [ 32.457157] Call Trace: [ 32.457636] [ 32.457993] dump_stack+0x77/0x97 [ 32.458576] bad_page.cold+0x65/0x96 [ 32.459198] get_page_from_freelist+0x46a/0x11f0 [ 32.460008] __alloc_pages_nodemask+0x10a/0x2b0 [ 32.460794] mt7601u_rx_tasklet+0x651/0x720 [ 32.461505] tasklet_action_common.constprop.0+0x6b/0xd0 [ 32.462343] __do_softirq+0x152/0x46c [ 32.462928] asm_call_irq_on_stack+0x12/0x20 [ 32.463610] [ 32.463953] do_softirq_own_stack+0x5b/0x70 [ 32.464582] irq_exit_rcu+0x9f/0xe0 [ 32.465028] common_interrupt+0xae/0x1a0 [ 32.465536] asm_common_interrupt+0x1e/0x40 [ 32.466071] RIP: 0010:default_idle+0x18/0x20 [ 32.468981] RSP: 0018:ffffc90000077f00 EFLAGS: 00000246 [ 32.469648] RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000000000 [ 32.470550] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff81aac3dd [ 32.471463] RBP: ffff88810022ab00 R08: 0000000000000001 R09: 0000000000000001 [ 32.472335] R10: 0000000000000046 R11: 0000000000005aa0 R12: 0000000000000000 [ 32.473235] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 32.474139] ? default_idle_call+0x4d/0x200 [ 32.474681] default_idle_call+0x74/0x200 [ 32.475192] do_idle+0x1d5/0x250 [ 32.475612] cpu_startup_entry+0x19/0x20 [ 32.476114] secondary_startup_64_no_verify+0xb0/0xbb [ 32.476765] Disabling lock debugging due to kernel taint Fixes: c869f77d6abb ("add mt7601u driver") Co-developed-by: Felix Fietkau Signed-off-by: Felix Fietkau Signed-off-by: Lorenzo Bianconi Acked-by: Jakub Kicinski Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/62b2380c8c2091834cfad05e1059b55f945bd114.1610643952.git.lorenzo@kernel.org commit cf9d052aa6005f1e8dfaf491d83bf37f368af69e Author: Douglas Anderson Date: Thu Jan 14 19:16:24 2021 -0800 pinctrl: qcom: Don't clear pending interrupts when enabling In Linux, if a driver does disable_irq() and later does enable_irq() on its interrupt, I believe it's expecting these properties: * If an interrupt was pending when the driver disabled then it will still be pending after the driver re-enables. * If an edge-triggered interrupt comes in while an interrupt is disabled it should assert when the interrupt is re-enabled. If you think that the above sounds a lot like the disable_irq() and enable_irq() are supposed to be masking/unmasking the interrupt instead of disabling/enabling it then you've made an astute observation. Specifically when talking about interrupts, "mask" usually means to stop posting interrupts but keep tracking them and "disable" means to fully shut off interrupt detection. It's unfortunate that this is so confusing, but presumably this is all the way it is for historical reasons. Perhaps more confusing than the above is that, even though clients of IRQs themselves don't have a way to request mask/unmask vs. disable/enable calls, IRQ chips themselves can implement both. ...and yet more confusing is that if an IRQ chip implements disable/enable then they will be called when a client driver calls disable_irq() / enable_irq(). It does feel like some of the above could be cleared up. However, without any other core interrupt changes it should be clear that when an IRQ chip gets a request to "disable" an IRQ that it has to treat it like a mask of that IRQ. In any case, after that long interlude you can see that the "unmask and clear" can break things. Maulik tried to fix it so that we no longer did "unmask and clear" in commit 71266d9d3936 ("pinctrl: qcom: Move clearing pending IRQ to .irq_request_resources callback"), but it only handled the PDC case and it had problems (it caused sc7180-trogdor devices to fail to suspend). Let's fix. >From my understanding the source of the phantom interrupt in the were these two things: 1. One that could have been introduced in msm_gpio_irq_set_type() (only for the non-PDC case). 2. Edges could have been detected when a GPIO was muxed away. Fixing case #1 is easy. We can just add a clear in msm_gpio_irq_set_type(). Fixing case #2 is harder. Let's use a concrete example. In sc7180-trogdor.dtsi we configure the uart3 to have two pinctrl states, sleep and default, and mux between the two during runtime PM and system suspend (see geni_se_resources_{on,off}() for more details). The difference between the sleep and default state is that the RX pin is muxed to a GPIO during sleep and muxed to the UART otherwise. As per Qualcomm, when we mux the pin over to the UART function the PDC (or the non-PDC interrupt detection logic) is still watching it / latching edges. These edges don't cause interrupts because the current code masks the interrupt unless we're entering suspend. However, as soon as we enter suspend we unmask the interrupt and it's counted as a wakeup. Let's deal with the problem like this: * When we mux away, we'll mask our interrupt. This isn't necessary in the above case since the client already masked us, but it's a good idea in general. * When we mux back will clear any interrupts and unmask. Fixes: 4b7618fdc7e6 ("pinctrl: qcom: Add irq_enable callback for msm gpio") Fixes: 71266d9d3936 ("pinctrl: qcom: Move clearing pending IRQ to .irq_request_resources callback") Signed-off-by: Douglas Anderson Reviewed-by: Maulik Shah Tested-by: Maulik Shah Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20210114191601.v7.4.I7cf3019783720feb57b958c95c2b684940264cd1@changeid Signed-off-by: Linus Walleij commit a95881d6aa2c000e3649f27a1a7329cf356e6bb3 Author: Douglas Anderson Date: Thu Jan 14 19:16:23 2021 -0800 pinctrl: qcom: Properly clear "intr_ack_high" interrupts when unmasking In commit 4b7618fdc7e6 ("pinctrl: qcom: Add irq_enable callback for msm gpio") we tried to Ack interrupts during unmask. However, that patch forgot to check "intr_ack_high" so, presumably, it only worked for a certain subset of SoCs. Let's add a small accessor so we don't need to open-code the logic in both places. This was found by code inspection. I don't have any access to the hardware in question nor software that needs the Ack during unmask. Fixes: 4b7618fdc7e6 ("pinctrl: qcom: Add irq_enable callback for msm gpio") Signed-off-by: Douglas Anderson Reviewed-by: Maulik Shah Tested-by: Maulik Shah Reviewed-by: Stephen Boyd Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210114191601.v7.3.I32d0f4e174d45363b49ab611a13c3da8f1e87d0f@changeid Signed-off-by: Linus Walleij commit 4079d35fa4fca4ee0ffd66968312fc86a5e8c290 Author: Douglas Anderson Date: Thu Jan 14 19:16:22 2021 -0800 pinctrl: qcom: No need to read-modify-write the interrupt status When the Qualcomm pinctrl driver wants to Ack an interrupt, it does a read-modify-write on the interrupt status register. On some SoCs it makes sure that the status bit is 1 to "Ack" and on others it makes sure that the bit is 0 to "Ack". Presumably the first type of interrupt controller is a "write 1 to clear" type register and the second just let you directly set the interrupt status register. As far as I can tell from scanning structure definitions, the interrupt status bit is always in a register by itself. Thus with both types of interrupt controllers it is safe to "Ack" interrupts without doing a read-modify-write. We can do a simple write. It should be noted that if the interrupt status bit _was_ ever in a register with other things (like maybe status bits for other GPIOs): a) For "write 1 clear" type controllers then read-modify-write would be totally wrong because we'd accidentally end up clearing interrupts we weren't looking at. b) For "direct set" type controllers then read-modify-write would also be wrong because someone setting one of the other bits in the register might accidentally clear (or set) our interrupt. I say this simply to show that the current read-modify-write doesn't provide any sort of "future proofing" of the code. In fact (for "write 1 clear" controllers) the new code is slightly more "future proof" since it would allow more than one interrupt status bits to share a register. NOTE: this code fixes no bugs--it simply avoids an extra register read. Signed-off-by: Douglas Anderson Reviewed-by: Maulik Shah Tested-by: Maulik Shah Reviewed-by: Stephen Boyd Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210114191601.v7.2.I3635de080604e1feda770591c5563bd6e63dd39d@changeid Signed-off-by: Linus Walleij commit a82e537807d5c85706cd4c16fd2de77a8495dc8d Author: Douglas Anderson Date: Thu Jan 14 19:16:21 2021 -0800 pinctrl: qcom: Allow SoCs to specify a GPIO function that's not 0 There's currently a comment in the code saying function 0 is GPIO. Instead of hardcoding it, let's add a member where an SoC can specify it. No known SoCs use a number other than 0, but this just makes the code clearer. NOTE: no SoC code needs to be updated since we can rely on zero-initialization. Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Reviewed-by: Maulik Shah Tested-by: Maulik Shah Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210114191601.v7.1.I3ad184e3423d8e479bc3e86f5b393abb1704a1d1@changeid Signed-off-by: Linus Walleij commit 34d1eb0e599875064955a74712f08ff14c8e3d5f Author: Josef Bacik Date: Wed Dec 16 11:22:17 2020 -0500 btrfs: don't clear ret in btrfs_start_dirty_block_groups If we fail to update a block group item in the loop we'll break, however we'll do btrfs_run_delayed_refs and lose our error value in ret, and thus not clean up properly. Fix this by only running the delayed refs if there was no failure. CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit fb286100974e7239af243bc2255a52f29442f9c8 Author: Josef Bacik Date: Wed Dec 16 11:22:14 2020 -0500 btrfs: fix lockdep splat in btrfs_recover_relocation While testing the error paths of relocation I hit the following lockdep splat: ====================================================== WARNING: possible circular locking dependency detected 5.10.0-rc6+ #217 Not tainted ------------------------------------------------------ mount/779 is trying to acquire lock: ffffa0e676945418 (&fs_info->balance_mutex){+.+.}-{3:3}, at: btrfs_recover_balance+0x2f0/0x340 but task is already holding lock: ffffa0e60ee31da8 (btrfs-root-00){++++}-{3:3}, at: __btrfs_tree_read_lock+0x27/0x100 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (btrfs-root-00){++++}-{3:3}: down_read_nested+0x43/0x130 __btrfs_tree_read_lock+0x27/0x100 btrfs_read_lock_root_node+0x31/0x40 btrfs_search_slot+0x462/0x8f0 btrfs_update_root+0x55/0x2b0 btrfs_drop_snapshot+0x398/0x750 clean_dirty_subvols+0xdf/0x120 btrfs_recover_relocation+0x534/0x5a0 btrfs_start_pre_rw_mount+0xcb/0x170 open_ctree+0x151f/0x1726 btrfs_mount_root.cold+0x12/0xea legacy_get_tree+0x30/0x50 vfs_get_tree+0x28/0xc0 vfs_kern_mount.part.0+0x71/0xb0 btrfs_mount+0x10d/0x380 legacy_get_tree+0x30/0x50 vfs_get_tree+0x28/0xc0 path_mount+0x433/0xc10 __x64_sys_mount+0xe3/0x120 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #1 (sb_internal#2){.+.+}-{0:0}: start_transaction+0x444/0x700 insert_balance_item.isra.0+0x37/0x320 btrfs_balance+0x354/0xf40 btrfs_ioctl_balance+0x2cf/0x380 __x64_sys_ioctl+0x83/0xb0 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #0 (&fs_info->balance_mutex){+.+.}-{3:3}: __lock_acquire+0x1120/0x1e10 lock_acquire+0x116/0x370 __mutex_lock+0x7e/0x7b0 btrfs_recover_balance+0x2f0/0x340 open_ctree+0x1095/0x1726 btrfs_mount_root.cold+0x12/0xea legacy_get_tree+0x30/0x50 vfs_get_tree+0x28/0xc0 vfs_kern_mount.part.0+0x71/0xb0 btrfs_mount+0x10d/0x380 legacy_get_tree+0x30/0x50 vfs_get_tree+0x28/0xc0 path_mount+0x433/0xc10 __x64_sys_mount+0xe3/0x120 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 other info that might help us debug this: Chain exists of: &fs_info->balance_mutex --> sb_internal#2 --> btrfs-root-00 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(btrfs-root-00); lock(sb_internal#2); lock(btrfs-root-00); lock(&fs_info->balance_mutex); *** DEADLOCK *** 2 locks held by mount/779: #0: ffffa0e60dc040e0 (&type->s_umount_key#47/1){+.+.}-{3:3}, at: alloc_super+0xb5/0x380 #1: ffffa0e60ee31da8 (btrfs-root-00){++++}-{3:3}, at: __btrfs_tree_read_lock+0x27/0x100 stack backtrace: CPU: 0 PID: 779 Comm: mount Not tainted 5.10.0-rc6+ #217 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014 Call Trace: dump_stack+0x8b/0xb0 check_noncircular+0xcf/0xf0 ? trace_call_bpf+0x139/0x260 __lock_acquire+0x1120/0x1e10 lock_acquire+0x116/0x370 ? btrfs_recover_balance+0x2f0/0x340 __mutex_lock+0x7e/0x7b0 ? btrfs_recover_balance+0x2f0/0x340 ? btrfs_recover_balance+0x2f0/0x340 ? rcu_read_lock_sched_held+0x3f/0x80 ? kmem_cache_alloc_trace+0x2c4/0x2f0 ? btrfs_get_64+0x5e/0x100 btrfs_recover_balance+0x2f0/0x340 open_ctree+0x1095/0x1726 btrfs_mount_root.cold+0x12/0xea ? rcu_read_lock_sched_held+0x3f/0x80 legacy_get_tree+0x30/0x50 vfs_get_tree+0x28/0xc0 vfs_kern_mount.part.0+0x71/0xb0 btrfs_mount+0x10d/0x380 ? __kmalloc_track_caller+0x2f2/0x320 legacy_get_tree+0x30/0x50 vfs_get_tree+0x28/0xc0 ? capable+0x3a/0x60 path_mount+0x433/0xc10 __x64_sys_mount+0xe3/0x120 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 This is straightforward to fix, simply release the path before we setup the balance_ctl. CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 49ecc679ab48b40ca799bf94b327d5284eac9e46 Author: Josef Bacik Date: Wed Dec 16 11:22:11 2020 -0500 btrfs: do not double free backref nodes on error Zygo reported the following KASAN splat: BUG: KASAN: use-after-free in btrfs_backref_cleanup_node+0x18a/0x420 Read of size 8 at addr ffff888112402950 by task btrfs/28836 CPU: 0 PID: 28836 Comm: btrfs Tainted: G W 5.10.0-e35f27394290-for-next+ #23 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 Call Trace: dump_stack+0xbc/0xf9 ? btrfs_backref_cleanup_node+0x18a/0x420 print_address_description.constprop.8+0x21/0x210 ? record_print_text.cold.34+0x11/0x11 ? btrfs_backref_cleanup_node+0x18a/0x420 ? btrfs_backref_cleanup_node+0x18a/0x420 kasan_report.cold.10+0x20/0x37 ? btrfs_backref_cleanup_node+0x18a/0x420 __asan_load8+0x69/0x90 btrfs_backref_cleanup_node+0x18a/0x420 btrfs_backref_release_cache+0x83/0x1b0 relocate_block_group+0x394/0x780 ? merge_reloc_roots+0x4a0/0x4a0 btrfs_relocate_block_group+0x26e/0x4c0 btrfs_relocate_chunk+0x52/0x120 btrfs_balance+0xe2e/0x1900 ? check_flags.part.50+0x6c/0x1e0 ? btrfs_relocate_chunk+0x120/0x120 ? kmem_cache_alloc_trace+0xa06/0xcb0 ? _copy_from_user+0x83/0xc0 btrfs_ioctl_balance+0x3a7/0x460 btrfs_ioctl+0x24c8/0x4360 ? __kasan_check_read+0x11/0x20 ? check_chain_key+0x1f4/0x2f0 ? __asan_loadN+0xf/0x20 ? btrfs_ioctl_get_supported_features+0x30/0x30 ? kvm_sched_clock_read+0x18/0x30 ? check_chain_key+0x1f4/0x2f0 ? lock_downgrade+0x3f0/0x3f0 ? handle_mm_fault+0xad6/0x2150 ? do_vfs_ioctl+0xfc/0x9d0 ? ioctl_file_clone+0xe0/0xe0 ? check_flags.part.50+0x6c/0x1e0 ? check_flags.part.50+0x6c/0x1e0 ? check_flags+0x26/0x30 ? lock_is_held_type+0xc3/0xf0 ? syscall_enter_from_user_mode+0x1b/0x60 ? do_syscall_64+0x13/0x80 ? rcu_read_lock_sched_held+0xa1/0xd0 ? __kasan_check_read+0x11/0x20 ? __fget_light+0xae/0x110 __x64_sys_ioctl+0xc3/0x100 do_syscall_64+0x37/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f4c4bdfe427 Allocated by task 28836: kasan_save_stack+0x21/0x50 __kasan_kmalloc.constprop.18+0xbe/0xd0 kasan_kmalloc+0x9/0x10 kmem_cache_alloc_trace+0x410/0xcb0 btrfs_backref_alloc_node+0x46/0xf0 btrfs_backref_add_tree_node+0x60d/0x11d0 build_backref_tree+0xc5/0x700 relocate_tree_blocks+0x2be/0xb90 relocate_block_group+0x2eb/0x780 btrfs_relocate_block_group+0x26e/0x4c0 btrfs_relocate_chunk+0x52/0x120 btrfs_balance+0xe2e/0x1900 btrfs_ioctl_balance+0x3a7/0x460 btrfs_ioctl+0x24c8/0x4360 __x64_sys_ioctl+0xc3/0x100 do_syscall_64+0x37/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 28836: kasan_save_stack+0x21/0x50 kasan_set_track+0x20/0x30 kasan_set_free_info+0x1f/0x30 __kasan_slab_free+0xf3/0x140 kasan_slab_free+0xe/0x10 kfree+0xde/0x200 btrfs_backref_error_cleanup+0x452/0x530 build_backref_tree+0x1a5/0x700 relocate_tree_blocks+0x2be/0xb90 relocate_block_group+0x2eb/0x780 btrfs_relocate_block_group+0x26e/0x4c0 btrfs_relocate_chunk+0x52/0x120 btrfs_balance+0xe2e/0x1900 btrfs_ioctl_balance+0x3a7/0x460 btrfs_ioctl+0x24c8/0x4360 __x64_sys_ioctl+0xc3/0x100 do_syscall_64+0x37/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xa9 This occurred because we freed our backref node in btrfs_backref_error_cleanup(), but then tried to free it again in btrfs_backref_release_cache(). This is because btrfs_backref_release_cache() will cycle through all of the cache->leaves nodes and free them up. However btrfs_backref_error_cleanup() freed the backref node with btrfs_backref_free_node(), which simply kfree()d the backref node without unlinking it from the cache. Change this to a btrfs_backref_drop_node(), which does the appropriate cleanup and removes the node from the cache->leaves list, so when we go to free the remaining cache we don't trip over items we've already dropped. Fixes: 75bfb9aff45e ("Btrfs: cleanup error handling in build_backref_tree") CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 18d3bff411c8d46d40537483bdc0b61b33ce0371 Author: Josef Bacik Date: Wed Dec 16 11:22:05 2020 -0500 btrfs: don't get an EINTR during drop_snapshot for reloc This was partially fixed by f3e3d9cc3525 ("btrfs: avoid possible signal interruption of btrfs_drop_snapshot() on relocation tree"), however it missed a spot when we restart a trans handle because we need to end the transaction. The fix is the same, simply use btrfs_join_transaction() instead of btrfs_start_transaction() when deleting reloc roots. Fixes: f3e3d9cc3525 ("btrfs: avoid possible signal interruption of btrfs_drop_snapshot() on relocation tree") CC: stable@vger.kernel.org # 5.4+ Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit e36626bb099e5159a7868dbfad6957ff6b0e4102 Author: Jonathan Neuschäfer Date: Sat Jan 16 02:34:03 2021 +0100 ASoC: dt-bindings: mt8192-mt6359: Fix indentation The items of the 'maintainers' list are indented with three spaces. Use the usual two spaces instead, for consistency and to silence yamllint. Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20210116013403.3490518-1-j.neuschaefer@gmx.net Signed-off-by: Mark Brown commit a8939f2e138e418c2b059056ff5b501eaf2eae54 Author: James Schulman Date: Fri Jan 15 14:11:05 2021 -0600 ASoC: wm_adsp: Fix control name parsing for multi-fw When switching between firmware types, the wrong control can be selected when requesting control in kernel API. Use the currently selected DSP firwmare type to select the proper mixer control. Signed-off-by: James Schulman Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20210115201105.14075-1-james.schulman@cirrus.com Signed-off-by: Mark Brown commit 94a5400f8b966c91c49991bae41c2ef911b935ac Author: Johan Jonker Date: Sun Jan 17 19:16:53 2021 +0100 arm64: dts: rockchip: remove interrupt-names property from rk3399 vdec node A test with the command below gives this error: /arch/arm64/boot/dts/rockchip/rk3399-evb.dt.yaml: video-codec@ff660000: 'interrupt-names' does not match any of the regexes: 'pinctrl-[0-9]+' The rkvdec driver gets it irq with help of the platform_get_irq() function, so remove the interrupt-names property from the rk3399 vdec node. make ARCH=arm64 dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/ media/rockchip,vdec.yaml Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20210117181653.24886-1-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 5cdc4a6950a883594e9640b1decb3fcf6222a594 Author: lianzhi chang Date: Thu Jan 14 15:57:41 2021 +0800 udf: fix the problem that the disc content is not displayed When the capacity of the disc is too large (assuming the 4.7G specification), the disc (UDF file system) will be burned multiple times in the windows (Multisession Usage). When the remaining capacity of the CD is less than 300M (estimated value, for reference only), open the CD in the Linux system, the content of the CD is displayed as blank (the kernel will say "No VRS found"). Windows can display the contents of the CD normally. Through analysis, in the "fs/udf/super.c": udf_check_vsd function, the actual value of VSD_MAX_SECTOR_OFFSET may be much larger than 0x800000. According to the current code logic, it is found that the type of sbi->s_session is "__s32", when the remaining capacity of the disc is less than 300M (take a set of test values: sector=3154903040, sbi->s_session=1540464, sb->s_blocksize_bits=11 ), the calculation result of "sbi->s_session << sb->s_blocksize_bits" will overflow. Therefore, it is necessary to convert the type of s_session to "loff_t" (when udf_check_vsd starts, assign a value to _sector, which is also converted in this way), so that the result will not overflow, and then the content of the disc can be displayed normally. Link: https://lore.kernel.org/r/20210114075741.30448-1-changlianzhi@uniontech.com Signed-off-by: lianzhi chang Signed-off-by: Jan Kara commit 45db630e5f7ec83817c57c8ae387fe219bd42adf Author: Chris Wilson Date: Mon Jan 18 10:17:55 2021 +0000 drm/i915: Check for rq->hwsp validity after acquiring RCU lock Since we allow removing the timeline map at runtime, there is a risk that rq->hwsp points into a stale page. To control that risk, we hold the RCU read lock while reading *rq->hwsp, but we missed a couple of important barriers. First, the unpinning / removal of the timeline map must be after all RCU readers into that map are complete, i.e. after an rcu barrier (in this case courtesy of call_rcu()). Secondly, we must make sure that the rq->hwsp we are about to dereference under the RCU lock is valid. In this case, we make the rq->hwsp pointer safe during i915_request_retire() and so we know that rq->hwsp may become invalid only after the request has been signaled. Therefore is the request is not yet signaled when we acquire rq->hwsp under the RCU, we know that rq->hwsp will remain valid for the duration of the RCU read lock. This is a very small window that may lead to either considering the request not completed (causing a delay until the request is checked again, any wait for the request is not affected) or dereferencing an invalid pointer. Fixes: 3adac4689f58 ("drm/i915: Introduce concept of per-timeline (context) HWSP") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: # v5.1+ Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20201218122421.18344-1-chris@chris-wilson.co.uk (cherry picked from commit 9bb36cf66091ddf2d8840e5aa705ad3c93a6279b) Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210118101755.476744-1-chris@chris-wilson.co.uk commit 171a8e99828144050015672016dd63494c6d200a Author: Tvrtko Ursulin Date: Mon Jan 18 10:07:24 2021 +0000 drm/i915/pmu: Don't grab wakeref when enabling events Chris found a CI report which points out calling intel_runtime_pm_get from inside i915_pmu_enable hook is not allowed since it can be invoked from hard irq context. This is something we knew but forgot, so lets fix it once again. We do this by syncing the internal book keeping with hardware rc6 counter on driver load. v2: * Always sync on parking and fully sync on init. Signed-off-by: Tvrtko Ursulin Fixes: f4e9894b6952 ("drm/i915/pmu: Correct the rc6 offset upon enabling") Cc: Chris Wilson Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20201214094349.3563876-1-tvrtko.ursulin@linux.intel.com (cherry picked from commit dbe13ae1d6abaab417edf3c37601c6a56594a4cd) Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210118100724.465555-1-chris@chris-wilson.co.uk commit 488751a0ef9b5ce572c47301ce62d54fc6b5a74d Author: Chris Wilson Date: Mon Jan 18 09:53:32 2021 +0000 drm/i915/gt: Prevent use of engine->wa_ctx after error On error we unpin and free the wa_ctx.vma, but do not clear any of the derived flags. During lrc_init, we look at the flags and attempt to dereference the wa_ctx.vma if they are set. To protect the error path where we try to limp along without the wa_ctx, make sure we clear those flags! Reported-by: Matt Roper Fixes: 604a8f6f1e33 ("drm/i915/lrc: Only enable per-context and per-bb buffers if set") Signed-off-by: Chris Wilson Cc: Matt Roper Cc: Tvrtko Ursulin Cc: Mika Kuoppala Cc: # v4.15+ Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20210108204026.20682-1-chris@chris-wilson.co.uk (cherry-picked from 5b4dc95cf7f573e927fbbd406ebe54225d41b9b2) Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210118095332.458813-1-chris@chris-wilson.co.uk commit 33c74535b03ecf11359de14bc88302595b1de44f Author: Nicolas Saenz Julienne Date: Fri Jan 15 20:12:09 2021 +0100 drm/vc4: Unify PCM card's driver_name User-space ALSA matches a card's driver name against an internal list of aliases in order to select the correct configuration for the system. When the driver name isn't defined, the match is performed against the card's name. With the introduction of RPi4 we now have two HDMI ports with two distinct audio cards. This is reflected in their names, making them different from previous RPi versions. With this, ALSA ultimately misses the board's configuration on RPi4. In order to avoid this, set "card->driver_name" to "vc4-hdmi" unanimously. Signed-off-by: Nicolas Saenz Julienne Fixes: f437bc1ec731 ("drm/vc4: drv: Support BCM2711") Reviewed-by: Takashi Iwai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210115191209.12852-1-nsaenzjulienne@suse.de commit 1fc7c1ef37f86f207b4db40aba57084bb2f6a69a Author: Kent Gibson Date: Thu Jan 7 12:00:20 2021 +0800 tools: gpio: fix %llu warning in gpio-watch.c Some platforms, such as mips64, don't map __u64 to long long unsigned int so using %llu produces a warning: gpio-watch.c: In function ‘main’: gpio-watch.c:89:30: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘__u64’ {aka ‘long unsigned int’} [-Wformat=] 89 | printf("line %u: %s at %llu\n", | ~~~^ | | | long long unsigned int | %lu 90 | chg.info.offset, event, chg.timestamp_ns); | ~~~~~~~~~~~~~~~~ | | | __u64 {aka long unsigned int} Replace the %llu with PRIu64 and cast the argument to uint64_t. Fixes: 33f0c47b8fb4 ("tools: gpio: implement gpio-watch") Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit 2fe7c2f99440d52613e1cf845c96e8e463c28111 Author: Kent Gibson Date: Thu Jan 7 12:00:19 2021 +0800 tools: gpio: fix %llu warning in gpio-event-mon.c Some platforms, such as mips64, don't map __u64 to long long unsigned int so using %llu produces a warning: gpio-event-mon.c:110:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘__u64’ {aka ‘long unsigned int’} [-Wformat=] 110 | fprintf(stdout, "GPIO EVENT at %llu on line %d (%d|%d) ", | ~~~^ | | | long long unsigned int | %lu 111 | event.timestamp_ns, event.offset, event.line_seqno, | ~~~~~~~~~~~~~~~~~~ | | | __u64 {aka long unsigned int} Replace the %llu with PRIu64 and cast the argument to uint64_t. Fixes: 03fd11b03362 ("tools/gpio/gpio-event-mon: fix warning") Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit 532a208ad61018b586cebfca8431291fe9c10ce7 Author: Takashi Iwai Date: Mon Jan 18 08:58:16 2021 +0100 ALSA: usb-audio: Avoid implicit feedback on Pioneer devices For addressing the regression on Pioneer devices, we recently corrected the quirk code to enable the implicit feedback mode on those devices properly. However, the devices still showed problems with the full duplex operations with JACK, and after debug sessions, we figured out that the older kernels that had worked with JACK also didn't use the implicit feedback mode at all although they had the quirk code to enable it; instead, the old code worked just to skip the normal sync endpoint setup that would have been detected without it. IOW, what broke without the implicit-fb quirk in the past was the application of the normal sync endpoint that is actually the capture data endpoint on these devices. This patch covers the overseen piece: it modifies the quirk code again not to enable the implicit feedback mode but just to make the driver skipping the sync endpoint detection. This made the driver working with JACK full-duplex mode again. Still it's not quite clear why the implicit feedback doesn't work on those devices yet; maybe it's about some issues in the URB setup. But at least, with this patch, the driver should work in the level of the older kernels again. Fixes: 167c9dc84ec3 ("ALSA: usb-audio: Fix implicit feedback sync setup for Pioneer devices") Link: https://lore.kernel.org/r/20210118075816.25068-4-tiwai@suse.de Signed-off-by: Takashi Iwai commit 3784d449d795ba11a92681bd22d183329f976421 Author: Takashi Iwai Date: Mon Jan 18 08:58:15 2021 +0100 ALSA: usb-audio: Set sample rate for all sharing EPs on UAC1 The UAC2/3 sample rate setup is based on the clock node, which is usually shared in the interface, and can't be re-setup without deselecting the interface once, and that's how the current code behaves. OTOH, the sample rate setup of UAC1 is per endpoint, hence we basically need to call for each endpoint usage even if those share the same interface. This patch fixes the behavior of UAC1 to call always snd_usb_init_sample_rate() in snd_usb_endpoint_configure(). Fixes: bf6313a0ff76 ("ALSA: usb-audio: Refactor endpoint management") Link: https://lore.kernel.org/r/20210118075816.25068-3-tiwai@suse.de Signed-off-by: Takashi Iwai commit 87cb9af9f8a2b242cea7f828206d619e8cbb6a1a Author: Takashi Iwai Date: Mon Jan 18 08:58:14 2021 +0100 ALSA: usb-audio: Fix UAC1 rate setup for secondary endpoints The current sample rate setup function for UAC1 assumes only the first endpoint retrieved from the interface:altset pair, but the rate set up may be needed also for the secondary endpoint. Also, retrieving the endpoint number from the interface descriptor is redundant; we have already the target endpoint in the given audioformat object. This patch simplifies the code and corrects the target endpoint as described in the above. It simply refers to fmt->endpoint directly. Also, this patch drops the pioneer_djm_set_format_quirk() that is caleld from snd_usb_set_format_quirk(); this function does the sample rate setup but for the capture endpoint (0x82), and that's exactly what the change above fixes. Link: https://lore.kernel.org/r/20210118075816.25068-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit bf9eee249ac2032521677dd74e31ede5429afbc0 Author: Christian König Date: Wed Jan 13 14:02:04 2021 +0100 drm/ttm: stop using GFP_TRANSHUGE_LIGHT The only flag we really need is __GFP_NOMEMALLOC, highmem depends on dma32 and moveable/compound should never be set in the first place. Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/413812/ Link: https://patchwork.freedesktop.org/patch/413964/ Fixes: d099fc8f540a ("drm/ttm: new TT backend allocation pool v3") Reported-by: Hans de Goede Reviewed-by: Daniel Vetter commit 8662e1119a7d1baa1b2001689b2923e9050754bd Author: Anshuman Gupta Date: Mon Jan 11 13:41:03 2021 +0530 drm/i915/hdcp: Get conn while content_type changed Get DRM connector reference count while scheduling a prop work to avoid any possible destroy of DRM connector when it is in DRM_CONNECTOR_REGISTERED state. Fixes: a6597faa2d59 ("drm/i915: Protect workers against disappearing connectors") Cc: Sean Paul Cc: Ramalingam C Reviewed-by: Uma Shankar Reviewed-by: Ramalingam C Tested-by: Karthik B S Signed-off-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20210111081120.28417-3-anshuman.gupta@intel.com (cherry picked from commit b3c6661aad979ec3d4f5675cf3e6a35828607d6a) Signed-off-by: Jani Nikula commit b3c95d0bdb0855b1f28370629e9eebec6bceac17 Author: Anshuman Gupta Date: Mon Jan 11 13:41:02 2021 +0530 drm/i915/hdcp: Update CP property in update_pipe When crtc state need_modeset is true it is not necessary it is going to be a real modeset, it can turns to be a fastset instead of modeset. This turns content protection property to be DESIRED and hdcp update_pipe left with property to be in DESIRED state but actual hdcp->value was ENABLED. This issue is caught with DP MST setup, where we have multiple connector in same DP_MST topology. When disabling HDCP on one of DP MST connector leads to set the crtc state need_modeset to true for all other crtc driving the other DP-MST topology connectors. This turns up other DP MST connectors CP property to be DESIRED despite the actual hdcp->value is ENABLED. Above scenario fails the DP MST HDCP IGT test, disabling HDCP on one MST stream should not cause to disable HDCP on another MST stream on same DP MST topology. v2: - Fixed connector->base.registration_state == DRM_CONNECTOR_REGISTERED WARN_ON. v3: - Commit log improvement. [Uma] - Added a comment before scheduling prop_work. [Uma] Fixes: 33f9a623bfc6 ("drm/i915/hdcp: Update CP as per the kernel internal state") Cc: Ramalingam C Reviewed-by: Uma Shankar Reviewed-by: Ramalingam C Tested-by: Karthik B S Signed-off-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20210111081120.28417-2-anshuman.gupta@intel.com (cherry picked from commit d276e16702e2d634094f75f69df3b493f359fe31) Signed-off-by: Jani Nikula commit 82c082784e03a9a9c043345f9bc04bc8254cf6da Author: Randy Dunlap Date: Fri Jan 15 19:32:59 2021 -0800 firmware: imx: select SOC_BUS to fix firmware build Fix build error in firmware/imx/ selecting SOC_BUS. riscv32-linux-ld: drivers/firmware/imx/imx-scu-soc.o: in function `.L9': imx-scu-soc.c:(.text+0x1b0): undefined reference to `soc_device_register' Fixes: edbee095fafb ("firmware: imx: add SCU firmware driver support") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Cc: Atish Patra Cc: Palmer Dabbelt Cc: Ard Biesheuvel Cc: Anson Huang Cc: Daniel Baluta Reviewed-by: Dong Aisheng Signed-off-by: Shawn Guo commit b764eb65e1c932f0500b30fcc06417cd9bc3e583 Author: Jacky Bai Date: Fri Jan 15 09:18:05 2021 +0800 arm64: dts: imx8mp: Correct the gpio ranges of gpio3 On i.MX8MP, The GPIO3's secondary gpio-ranges's 'gpio controller offset' cell value should be 26, so correct it. Signed-off-by: Jacky Bai Fixes: 6d9b8d20431f ("arm64: dts: freescale: Add i.MX8MP dtsi support") Signed-off-by: Shawn Guo commit 2cc0bfc9c12784188482a8f3d751d44af45b0d97 Author: Russell King Date: Thu Jan 14 10:53:06 2021 +0000 ARM: dts: imx6qdl-sr-som: fix some cubox-i platforms The PHY address bit 2 is configured by the LED pin. Attaching a LED to this pin is not sufficient to guarantee this configuration pin is correctly read. This leads to some platforms having their PHY at address 0 and others at address 4. If there is no phy-handle specified, the FEC driver will scan the PHY bus for a PHY and use that. Consequently, adding the DT configuration of the PHY and the phy properties to the FEC driver broke some boards. Fix this by removing the phy-handle property, and listing two PHY entries for both possible PHY addresses, so that the DT configuration for the PHY can be found by the PHY driver. Fixes: 86b08bd5b994 ("ARM: dts: imx6-sr-som: add ethernet PHY configuration") Reported-by: Christoph Mattheis Signed-off-by: Russell King Signed-off-by: Shawn Guo commit a88afa46b86ff461c89cc33fc3a45267fff053e8 Author: Max Krummenacher Date: Mon Jan 11 16:17:04 2021 +0100 ARM: imx: build suspend-imx6.S with arm instruction set When the kernel is configured to use the Thumb-2 instruction set "suspend-to-memory" fails to resume. Observed on a Colibri iMX6ULL (i.MX 6ULL) and Apalis iMX6 (i.MX 6Q). It looks like the CPU resumes unconditionally in ARM instruction mode and then chokes on the presented Thumb-2 code it should execute. Fix this by using the arm instruction set for all code in suspend-imx6.S. Signed-off-by: Max Krummenacher Fixes: df595746fa69 ("ARM: imx: add suspend in ocram support for i.mx6q") Acked-by: Oleksandr Suvorov Signed-off-by: Shawn Guo commit eb363edace688898956b99e48daa8d7e05cee795 Author: Bruno Thomsen Date: Mon Jan 11 16:15:37 2021 +0100 ARM: dts: imx7d-flex-concentrator: fix pcf2127 reset RTC pcf2127 device driver has changed default behaviour of the watchdog feature in v5.11-rc1. Now you need to explicitly enable it with a device tree property, "reset-source", when used in the board design. Fixes: 71ac13457d9d ("rtc: pcf2127: only use watchdog when explicitly available") Signed-off-by: Bruno Thomsen Cc: Bruno Thomsen Cc: Uwe Kleine-König Cc: Rasmus Villemoes Reviewed-by: Alexandre Belloni Signed-off-by: Shawn Guo commit bd9dcef67ffcae2de49e319fba349df76472fd10 Author: Randy Dunlap Date: Fri Jan 15 11:11:23 2021 -0800 x86/xen: fix 'nopvspin' build error Fix build error in x86/xen/ when PARAVIRT_SPINLOCKS is not enabled. Fixes this build error: ../arch/x86/xen/smp_hvm.c: In function ‘xen_hvm_smp_init’: ../arch/x86/xen/smp_hvm.c:77:3: error: ‘nopvspin’ undeclared (first use in this function) nopvspin = true; Fixes: 3d7746bea925 ("x86/xen: Fix xen_hvm_smp_init() when vector callback not available") Signed-off-by: Randy Dunlap Reviewed-by: Juergen Gross Cc: David Woodhouse Cc: Juergen Gross Link: https://lore.kernel.org/r/20210115191123.27572-1-rdunlap@infradead.org Signed-off-by: Juergen Gross commit 16a78851e1f52eaed7034b75707d3662b4b13b77 Author: Jiapeng Zhong Date: Thu Jan 14 18:02:23 2021 +0800 fs/cifs: Simplify bool comparison. Fix the follow warnings: ./fs/cifs/connect.c: WARNING: Comparison of 0/1 to bool variable Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong Signed-off-by: Steve French commit 2be449fcf38ff7e44cf76a2bba1376e923637eb1 Author: Jiapeng Zhong Date: Thu Jan 14 17:09:20 2021 +0800 fs/cifs: Assign boolean values to a bool variable Fix the following coccicheck warnings: ./fs/cifs/connect.c:3386:2-21: WARNING: Assignment of 0/1 to bool variable. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong Signed-off-by: Steve French commit 19c329f6808995b142b3966301f217c831e7cf31 Author: Linus Torvalds Date: Sun Jan 17 16:37:05 2021 -0800 Linux 5.11-rc4 commit e2da783614bb8930aa89753d3c3cd53d5604665d Merge: a1339d6355ac4 648b054a4647c Author: Linus Torvalds Date: Sun Jan 17 13:14:46 2021 -0800 Merge tag 'perf-tools-fixes-2021-01-17' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull perf tools fixes from Arnaldo Carvalho de Melo: - Fix 'CPU too large' error in Intel PT - Correct event attribute sizes in 'perf inject' - Sync build_bug.h and kvm.h kernel copies - Fix bpf.h header include directive in 5sec.c 'perf trace' bpf example - libbpf tests fixes - Fix shadow stat 'perf test' for non-bash shells - Take cgroups into account for shadow stats in 'perf stat' * tag 'perf-tools-fixes-2021-01-17' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: perf inject: Correct event attribute sizes perf intel-pt: Fix 'CPU too large' error perf stat: Take cgroups into account for shadow stats perf stat: Introduce struct runtime_stat_data libperf tests: Fail when failing to get a tracepoint id libperf tests: If a test fails return non-zero libperf tests: Avoid uninitialized variable warning perf test: Fix shadow stat test for non-bash shells tools headers: Syncronize linux/build_bug.h with the kernel sources tools headers UAPI: Sync kvm.h headers with the kernel sources perf bpf examples: Fix bpf.h header include directive in 5sec.c example commit a1339d6355ac42e1bf4fcdfce8bfce61172f8891 Merge: a527a2b32d20a 41131a5e54ae7 Author: Linus Torvalds Date: Sun Jan 17 12:28:58 2021 -0800 Merge tag 'powerpc-5.11-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "One fix for a lack of alignment in our linker script, that can lead to crashes depending on configuration etc. One fix for the 32-bit VDSO after the C VDSO conversion. Thanks to Andreas Schwab, Ariel Marcovitch, and Christophe Leroy" * tag 'powerpc-5.11-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/vdso: Fix clock_gettime_fallback for vdso32 powerpc: Fix alignment bug within the init sections commit a527a2b32d20a2bd8070f49e98cb1a89b0c98bb3 Merge: feb889fb40faf d36a1dd9f77ae Author: Linus Torvalds Date: Sun Jan 17 12:16:47 2021 -0800 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull misc vfs fixes from Al Viro: "Several assorted fixes. I still think that audit ->d_name race is better fixed this way for the benefit of backports, with any possibly fancier variants done on top of it" * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: dump_common_audit_data(): fix racy accesses to ->d_name iov_iter: fix the uaccess area in copy_compat_iovec_from_user umount(2): move the flag validity checks first commit feb889fb40fafc6933339cf1cca8f770126819fb Author: Linus Torvalds Date: Sat Jan 16 15:34:57 2021 -0800 mm: don't put pinned pages into the swap cache So technically there is nothing wrong with adding a pinned page to the swap cache, but the pinning obviously means that the page can't actually be free'd right now anyway, so it's a bit pointless. However, the real problem is not with it being a bit pointless: the real issue is that after we've added it to the swap cache, we'll try to unmap the page. That will succeed, because the code in mm/rmap.c doesn't know or care about pinned pages. Even the unmapping isn't fatal per se, since the page will stay around in memory due to the pinning, and we do hold the connection to it using the swap cache. But when we then touch it next and take a page fault, the logic in do_swap_page() will map it back into the process as a possibly read-only page, and we'll then break the page association on the next COW fault. Honestly, this issue could have been fixed in any of those other places: (a) we could refuse to unmap a pinned page (which makes conceptual sense), or (b) we could make sure to re-map a pinned page writably in do_swap_page(), or (c) we could just make do_wp_page() not COW the pinned page (which was what we historically did before that "mm: do_wp_page() simplification" commit). But while all of them are equally valid models for breaking this chain, not putting pinned pages into the swap cache in the first place is the simplest one by far. It's also the safest one: the reason why do_wp_page() was changed in the first place was that getting the "can I re-use this page" wrong is so fraught with errors. If you do it wrong, you end up with an incorrectly shared page. As a result, using "page_maybe_dma_pinned()" in either do_wp_page() or do_swap_page() would be a serious bug since it is only a (very good) heuristic. Re-using the page requires a hard black-and-white rule with no room for ambiguity. In contrast, saying "this page is very likely dma pinned, so let's not add it to the swap cache and try to unmap it" is an obviously safe thing to do, and if the heuristic might very rarely be a false positive, no harm is done. Fixes: 09854ba94c6a ("mm: do_wp_page() simplification") Reported-and-tested-by: Martin Raiber Cc: Pavel Begunkov Cc: Jens Axboe Cc: Peter Xu Signed-off-by: Linus Torvalds commit fff7b5e6ee63c5d20406a131b260c619cdd24fd1 Author: Dexuan Cui Date: Sat Jan 16 14:31:36 2021 -0800 x86/hyperv: Initialize clockevents after LAPIC is initialized With commit 4df4cb9e99f8, the Hyper-V direct-mode STIMER is actually initialized before LAPIC is initialized: see apic_intr_mode_init() x86_platform.apic_post_init() hyperv_init() hv_stimer_alloc() apic_bsp_setup() setup_local_APIC() setup_local_APIC() temporarily disables LAPIC, initializes it and re-eanble it. The direct-mode STIMER depends on LAPIC, and when it's registered, it can be programmed immediately and the timer can fire very soon: hv_stimer_init clockevents_config_and_register clockevents_register_device tick_check_new_device tick_setup_device tick_setup_periodic(), tick_setup_oneshot() clockevents_program_event When the timer fires in the hypervisor, if the LAPIC is in the disabled state, new versions of Hyper-V ignore the event and don't inject the timer interrupt into the VM, and hence the VM hangs when it boots. Note: when the VM starts/reboots, the LAPIC is pre-enabled by the firmware, so the window of LAPIC being temporarily disabled is pretty small, and the issue can only happen once out of 100~200 reboots for a 40-vCPU VM on one dev host, and on another host the issue doesn't reproduce after 2000 reboots. The issue is more noticeable for kdump/kexec, because the LAPIC is disabled by the first kernel, and stays disabled until the kdump/kexec kernel enables it. This is especially an issue to a Generation-2 VM (for which Hyper-V doesn't emulate the PIT timer) when CONFIG_HZ=1000 (rather than CONFIG_HZ=250) is used. Fix the issue by moving hv_stimer_alloc() to a later place where the LAPIC timer is initialized. Fixes: 4df4cb9e99f8 ("x86/hyperv: Initialize clockevents earlier in CPU onlining") Signed-off-by: Dexuan Cui Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20210116223136.13892-1-decui@microsoft.com Signed-off-by: Wei Liu commit 32c2bc8f2d855d4415c9a05b727e34649397bfbe Author: Mike Rapoport Date: Fri Dec 18 18:35:50 2020 +0200 ia64: fix build failure caused by memory model changes The change of ia64's default memory model to SPARSEMEM causes defconfig build to fail: CC kernel/async.o In file included from include/linux/numa.h:25, from include/linux/async.h:13, from kernel/async.c:47: arch/ia64/include/asm/sparsemem.h:14:40: warning: "PAGE_SHIFT" is not defined, evaluates to 0 [-Wundef] 14 | #if ((CONFIG_FORCE_MAX_ZONEORDER - 1 + PAGE_SHIFT) > SECTION_SIZE_BITS) | ^~~~~~~~~~ In file included from include/linux/gfp.h:6, from include/linux/xarray.h:14, from include/linux/radix-tree.h:19, 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/energy_model.h:7, from include/linux/device.h:16, from include/linux/async.h:14, from kernel/async.c:47: include/linux/mmzone.h:1156:2: error: #error Allocator MAX_ORDER exceeds SECTION_SIZE 1156 | #error Allocator MAX_ORDER exceeds SECTION_SIZE | ^~~~~ The error cause is the missing definition of PAGE_SHIFT in the calculation of SECTION_SIZE_BITS. Add include of to arch/ia64/include/asm/sparsemem.h to solve the problem. Fixes: 214496cb1870 ("ia64: make SPARSEMEM default and disable DISCONTIGMEM") Reported-by: Guenter Roeck Tested-by: Guenter Roeck Signed-off-by: Mike Rapoport commit 1b2cfa2d1dbdcc3b6dba1ecb7026a537a1d7277f Author: Wolfram Sang Date: Sat Jan 9 13:43:08 2021 +0100 i2c: octeon: check correct size of maximum RECV_LEN packet I2C_SMBUS_BLOCK_MAX defines already the maximum number as defined in the SMBus 2.0 specs. No reason to add one to it. Fixes: 886f6f8337dd ("i2c: octeon: Support I2C_M_RECV_LEN") Signed-off-by: Wolfram Sang Reviewed-by: Robert Richter Signed-off-by: Wolfram Sang commit 2f3a0828d46166d4e7df227479ed31766ee67e4a Author: Sowjanya Komatineni Date: Tue Jan 12 11:02:41 2021 -0800 i2c: tegra: Create i2c_writesl_vi() to use with VI I2C for filling TX FIFO VI I2C controller has known hardware bug where immediate multiple writes to TX_FIFO register gets stuck. Recommended software work around is to read I2C register after each write to TX_FIFO register to flush out the data. This patch implements this work around for VI I2C controller. Signed-off-by: Sowjanya Komatineni Reviewed-by: Dmitry Osipenko Acked-by: Thierry Reding Signed-off-by: Wolfram Sang commit bc1c2048abbe3c3074b4de91d213595c57741a6b Author: Mikko Perttunen Date: Tue Jan 12 12:22:25 2021 +0200 i2c: bpmp-tegra: Ignore unknown I2C_M flags In order to not to start returning errors when new I2C_M flags are added, change behavior to just ignore all flags that we don't know about. This includes the I2C_M_DMA_SAFE flag that already exists but causes -EINVAL to be returned for valid transactions. Cc: stable@vger.kernel.org # v4.19+ Signed-off-by: Mikko Perttunen Signed-off-by: Wolfram Sang commit f5cc9ace24fbdf41b4814effbb2f9bad7046e988 Author: Dave Jiang Date: Fri Jan 15 14:52:33 2021 -0700 dmaengine: idxd: fix misc interrupt completion Nikhil reported the misc interrupt handler can sometimes miss handling the command interrupt when an error interrupt happens near the same time. Have the irq handling thread continue to process the misc interrupts until all interrupts are processed. This is a low usage interrupt and is not expected to handle high volume traffic. Therefore there is no concern of this thread running for a long time. Fixes: 0d5c10b4c84d ("dmaengine: idxd: add work queue drain support") Reported-by: Nikhil Rao Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/161074755329.2183844.13295528344116907983.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 16e19e11228ba660d9e322035635e7dcf160d5c2 Author: Dave Jiang Date: Fri Jan 15 14:52:52 2021 -0700 dmaengine: idxd: Fix list corruption in description completion Sanjay reported the following kernel splat after running dmatest for stress testing. The current code is giving up the spinlock in the middle of a completion list walk, and that opens up opportunity for list corruption if another thread touches the list at the same time. In order to make sure the list is always protected, the hardware completed descriptors will be put on a local list to be completed with callbacks from the outside of the list lock. kernel: general protection fault, probably for non-canonical address 0xdead000000000100: 0000 [#1] SMP NOPTI kernel: CPU: 62 PID: 1814 Comm: irq/89-idxd-por Tainted: G W 5.10.0-intel-next_10_16+ #1 kernel: Hardware name: Intel Corporation ArcherCity/ArcherCity, BIOS EGSDCRB1.SBT.4915.D02.2012070418 12/07/2020 kernel: RIP: 0010:irq_process_work_list+0xcd/0x170 [idxd] kernel: Code: e8 18 65 5c d3 8b 45 d4 85 c0 75 b3 4c 89 f7 e8 b9 fe ff ff 84 c0 74 bf 4c 89 e7 e8 dd 6b 5c d3 49 8b 3f 49 8b 4f 08 48 89 c6 <48> 89 4f 08 48 89 39 4c 89 e7 48 b9 00 01 00 00 00 00 ad de 49 89 kernel: RSP: 0018:ff256768c4353df8 EFLAGS: 00010046 kernel: RAX: 0000000000000202 RBX: dead000000000100 RCX: dead000000000122 kernel: RDX: 0000000000000001 RSI: 0000000000000202 RDI: dead000000000100 kernel: RBP: ff256768c4353e40 R08: 0000000000000001 R09: 0000000000000000 kernel: R10: 0000000000000000 R11: 00000000ffffffff R12: ff1fdf9fd06b3e48 kernel: R13: 0000000000000005 R14: ff1fdf9fc4275980 R15: ff1fdf9fc4275a00 kernel: FS: 0000000000000000(0000) GS:ff1fdfa32f880000(0000) knlGS:0000000000000000 kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 kernel: CR2: 00007f87f24012a0 CR3: 000000010f630004 CR4: 0000000003771ee0 kernel: DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 kernel: DR3: 0000000000000000 DR6: 00000000fffe07f0 DR7: 0000000000000400 kernel: PKRU: 55555554 kernel: Call Trace: kernel: ? irq_thread+0xa9/0x1b0 kernel: idxd_wq_thread+0x34/0x90 [idxd] kernel: irq_thread_fn+0x24/0x60 kernel: irq_thread+0x10f/0x1b0 kernel: ? irq_forced_thread_fn+0x80/0x80 kernel: ? wake_threads_waitq+0x30/0x30 kernel: ? irq_thread_check_affinity+0xe0/0xe0 kernel: kthread+0x142/0x160 kernel: ? kthread_park+0x90/0x90 kernel: ret_from_fork+0x1f/0x30 kernel: Modules linked in: idxd_ktest dmatest intel_rapl_msr idxd_mdev iTCO_wdt vfio_pci vfio_virqfd iTCO_vendor_support intel_rapl_common i10nm_edac nfit x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel crypto_simd cryptd glue_helper rapl msr pcspkr snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio snd_hda_intel snd_intel_dspcfg ofpart snd_hda_codec snd_hda_core snd_hwdep cmdlinepart snd_seq snd_seq_device idxd snd_pcm intel_spi_pci intel_spi snd_timer spi_nor input_leds joydev snd i2c_i801 mtd soundcore i2c_smbus mei_me mei i2c_ismt ipmi_ssif acpi_ipmi ipmi_si ipmi_devintf ipmi_msghandler mac_hid sunrpc nls_iso8859_1 sch_fq_codel ip_tables x_tables xfs libcrc32c ast drm_vram_helper drm_ttm_helper ttm igc wmi pinctrl_sunrisepoint hid_generic usbmouse usbkbd usbhid hid kernel: ---[ end trace cd5ca950ef0db25f ]--- Reported-by: Sanjay Kumar Signed-off-by: Dave Jiang Tested-by: Sanjay Kumar Fixes: e4f4d8cdeb9a ("dmaengine: idxd: Clean up descriptors with fault error") Link: https://lore.kernel.org/r/161074757267.2183951.17912830858060607266.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 0b5cd6c32b14413bf87e10ee62be3162588dcbe6 Author: Pavel Begunkov Date: Sun Jan 17 02:29:56 2021 +0000 io_uring: fix skipping disabling sqo on exec If there are no requests at the time __io_uring_task_cancel() is called, tctx_inflight() returns zero and and it terminates not getting a chance to go through __io_uring_files_cancel() and do io_disable_sqo_submit(). And we absolutely want them disabled by the time cancellation ends. Reported-by: Jens Axboe Signed-off-by: Pavel Begunkov Fixes: d9d05217cb69 ("io_uring: stop SQPOLL submit on creator's death") Signed-off-by: Jens Axboe commit 66c556025d687dbdd0f748c5e1df89c977b6c02a Author: Alexander Lobakin Date: Fri Jan 15 15:04:40 2021 +0000 skbuff: back tiny skbs with kmalloc() in __netdev_alloc_skb() too Commit 3226b158e67c ("net: avoid 32 x truesize under-estimation for tiny skbs") ensured that skbs with data size lower than 1025 bytes will be kmalloc'ed to avoid excessive page cache fragmentation and memory consumption. However, the fix adressed only __napi_alloc_skb() (primarily for virtio_net and napi_get_frags()), but the issue can still be achieved through __netdev_alloc_skb(), which is still used by several drivers. Drivers often allocate a tiny skb for headers and place the rest of the frame to frags (so-called copybreak). Mirror the condition to __netdev_alloc_skb() to handle this case too. Since v1 [0]: - fix "Fixes:" tag; - refine commit message (mention copybreak usecase). [0] https://lore.kernel.org/netdev/20210114235423.232737-1-alobakin@pm.me Fixes: a1c7fff7e18f ("net: netdev_alloc_skb() use build_skb()") Signed-off-by: Alexander Lobakin Link: https://lore.kernel.org/r/20210115150354.85967-1-alobakin@pm.me Signed-off-by: Jakub Kicinski commit 0da0a8a0a0e1845f495431c3d8d733d2bbf9e9e5 Merge: 54c6247d06f11 be2553358cd40 Author: Linus Torvalds Date: Sat Jan 16 12:25:40 2021 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Nine minor fixes, seven in drivers and two in the core SCSI disk driver (sd) which should be harmless involving removing an unused variable and quietening a spurious warning" Signed-off-by: James E.J. Bottomley * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: sd: Remove obsolete variable in sd_remove() scsi: sd: Suppress spurious errors when WRITE SAME is being disabled scsi: scsi_debug: Fix memleak in scsi_debug_init() scsi: mpt3sas: Fix spelling mistake in Kconfig "compatiblity" -> "compatibility" scsi: qedi: Correct max length of CHAP secret scsi: ufs: Correct the LUN used in eh_device_reset_handler() callback scsi: ufs: Relocate flush of exceptional event scsi: ufs: Relax the condition of UFSHCI_QUIRK_SKIP_MANUAL_WB_FLUSH_CTRL scsi: ufs: Fix possible power drain during system suspend commit d36a1dd9f77ae1e72da48f4123ed35627848507d Author: Al Viro Date: Tue Jan 5 14:43:46 2021 -0500 dump_common_audit_data(): fix racy accesses to ->d_name We are not guaranteed the locking environment that would prevent dentry getting renamed right under us. And it's possible for old long name to be freed after rename, leading to UAF here. Cc: stable@kernel.org # v2.6.2+ Signed-off-by: Al Viro commit 54c6247d06f110d2129f9ef75e5eb02d39aec316 Merge: 11c0239ae2645 b4f664252f51e Author: Linus Torvalds Date: Sat Jan 16 11:39:58 2021 -0800 Merge tag 'block-5.11-2021-01-16' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "Just an nvme pull request via Christoph: - don't initialize hwmon for discover controllers (Sagi Grimberg) - fix iov_iter handling in nvme-tcp (Sagi Grimberg) - fix a preempt warning in nvme-tcp (Sagi Grimberg) - fix a possible NULL pointer dereference in nvme (Israel Rukshin)" * tag 'block-5.11-2021-01-16' of git://git.kernel.dk/linux-block: nvme: don't intialize hwmon for discovery controllers nvme-tcp: fix possible data corruption with bio merges nvme-tcp: Fix warning with CONFIG_DEBUG_PREEMPT nvmet-rdma: Fix NULL deref when setting pi_enable and traddr INADDR_ANY commit 4325cb498cb743dacaa3edbec398c5255f476ef6 Author: Pavel Begunkov Date: Sat Jan 16 05:32:30 2021 +0000 io_uring: fix uring_flush in exit_files() warning WARNING: CPU: 1 PID: 11100 at fs/io_uring.c:9096 io_uring_flush+0x326/0x3a0 fs/io_uring.c:9096 RIP: 0010:io_uring_flush+0x326/0x3a0 fs/io_uring.c:9096 Call Trace: filp_close+0xb4/0x170 fs/open.c:1280 close_files fs/file.c:401 [inline] put_files_struct fs/file.c:416 [inline] put_files_struct+0x1cc/0x350 fs/file.c:413 exit_files+0x7e/0xa0 fs/file.c:433 do_exit+0xc22/0x2ae0 kernel/exit.c:820 do_group_exit+0x125/0x310 kernel/exit.c:922 get_signal+0x3e9/0x20a0 kernel/signal.c:2770 arch_do_signal_or_restart+0x2a8/0x1eb0 arch/x86/kernel/signal.c:811 handle_signal_work kernel/entry/common.c:147 [inline] exit_to_user_mode_loop kernel/entry/common.c:171 [inline] exit_to_user_mode_prepare+0x148/0x250 kernel/entry/common.c:201 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline] syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:302 entry_SYSCALL_64_after_hwframe+0x44/0xa9 An SQPOLL ring creator task may have gotten rid of its file note during exit and called io_disable_sqo_submit(), but the io_uring is still left referenced through fdtable, which will be put during close_files() and cause a false positive warning. First split the warning into two for more clarity when is hit, and the add sqo_dead check to handle the described case. Reported-by: syzbot+a32b546d58dde07875a1@syzkaller.appspotmail.com Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 6b393a1ff1746a1c91bd95cbb2d79b104d8f15ac Author: Pavel Begunkov Date: Sat Jan 16 05:32:29 2021 +0000 io_uring: fix false positive sqo warning on flush WARNING: CPU: 1 PID: 9094 at fs/io_uring.c:8884 io_disable_sqo_submit+0x106/0x130 fs/io_uring.c:8884 Call Trace: io_uring_flush+0x28b/0x3a0 fs/io_uring.c:9099 filp_close+0xb4/0x170 fs/open.c:1280 close_fd+0x5c/0x80 fs/file.c:626 __do_sys_close fs/open.c:1299 [inline] __se_sys_close fs/open.c:1297 [inline] __x64_sys_close+0x2f/0xa0 fs/open.c:1297 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 io_uring's final close() may be triggered by any task not only the creator. It's well handled by io_uring_flush() including SQPOLL case, though a warning in io_disable_sqo_submit() will fallaciously fire by moving this warning out to the only call site that matters. Reported-by: syzbot+2f5d1785dc624932da78@syzkaller.appspotmail.com Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit c93cc9e16d88e0f5ea95d2d65d58a8a4dab258bc Author: Jens Axboe Date: Sat Jan 16 11:52:11 2021 -0700 io_uring: iopoll requests should also wake task ->in_idle state If we're freeing/finishing iopoll requests, ensure we check if the task is in idling in terms of cancelation. Otherwise we could end up waiting forever in __io_uring_task_cancel() if the task has active iopoll requests that need cancelation. Cc: stable@vger.kernel.org # 5.9+ Signed-off-by: Jens Axboe commit 11c0239ae26450709d37e0d7f658aa0875047229 Merge: acda701bf1e82 a8d13dbccb137 Author: Linus Torvalds Date: Sat Jan 16 11:12:02 2021 -0800 Merge tag 'io_uring-5.11-2021-01-16' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: "We still have a pending fix for a cancelation issue, but it's still being investigated. In the meantime: - Dead mm handling fix (Pavel) - SQPOLL setup error handling (Pavel) - Flush timeout sequence fix (Marcelo) - Missing finish_wait() for one exit case" * tag 'io_uring-5.11-2021-01-16' of git://git.kernel.dk/linux-block: io_uring: ensure finish_wait() is always called in __io_uring_task_cancel() io_uring: flush timeouts that should already have expired io_uring: do sqo disable on install_fd error io_uring: fix null-deref in io_disable_sqo_submit io_uring: don't take files/mm for a dead task io_uring: drop mm and files after task_work_run commit acda701bf1e8233f982164c8ddbedc055427212d Merge: 9348b73c2e1bf e557793799c5a Author: Linus Torvalds Date: Sat Jan 16 11:00:08 2021 -0800 Merge tag 'riscv-for-linus-5.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: "There are a few more fixes than a normal rc4, largely due to the bubble introduced by the holiday break: - return -ENOSYS for syscall number -1, which previously returned an uninitialized value. - ensure of_clk_init() has been called in time_init(), without which clock drivers may not be initialized. - fix sifive,uart0 driver to properly display the baud rate. A fix to initialize MPIE that allows interrupts to be processed during system calls. - avoid erronously begin tracing IRQs when interrupts are disabled, which at least triggers suprious lockdep failures. - workaround for a warning related to calling smp_processor_id() while preemptible. The warning itself is suprious on currently availiable systems. - properly include the generic time VDSO calls. A fix to our kasan address mapping. A fix to the HiFive Unleashed device tree, which allows the Ethernet PHY to be properly initialized by Linux (as opposed to relying on the bootloader). - defconfig update to include SiFive's GPIO driver, which is present on the HiFive Unleashed and necessary to initialize the PHY. - avoid allocating memory while initializing reserved memory. - avoid allocating the last 4K of memory, as pointers there alias with syscall errors. There are also two cleanups that should have no functional effect but do fix build warnings: - drop a duplicated definition of PAGE_KERNEL_EXEC. - properly declare the asm register SP shim. - cleanup the rv32 memory size Kconfig entry, to reflect the actual size of memory availiable" * tag 'riscv-for-linus-5.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: RISC-V: Fix maximum allowed phsyical memory for RV32 RISC-V: Set current memblock limit RISC-V: Do not allocate memblock while iterating reserved memblocks riscv: stacktrace: Move register keyword to beginning of declaration riscv: defconfig: enable gpio support for HiFive Unleashed dts: phy: add GPIO number and active state used for phy reset dts: phy: fix missing mdio device and probe failure of vsc8541-01 device riscv: Fix KASAN memory mapping. riscv: Fixup CONFIG_GENERIC_TIME_VSYSCALL riscv: cacheinfo: Fix using smp_processor_id() in preemptible riscv: Trace irq on only interrupt is enabled riscv: Drop a duplicated PAGE_KERNEL_EXEC riscv: Enable interrupts during syscalls with M-Mode riscv: Fix sifive serial driver riscv: Fix kernel time_init() riscv: return -ENOSYS for syscall -1 commit ce5379963b2884e9d23bea0c5674a7251414c84b Author: Pablo Neira Ayuso Date: Sat Jan 16 19:50:34 2021 +0100 netfilter: nft_dynset: dump expressions when set definition contains no expressions If the set definition provides no stateful expressions, then include the stateful expression in the ruleset listing. Without this fix, the dynset rule listing shows the stateful expressions provided by the set definition. Fixes: 65038428b2c6 ("netfilter: nf_tables: allow to specify stateful expression in set definition") Signed-off-by: Pablo Neira Ayuso commit 9348b73c2e1bfea74ccd4a44fb4ccc7276ab9623 Author: Linus Torvalds Date: Sat Jan 9 17:09:10 2021 -0800 mm: don't play games with pinned pages in clear_page_refs Turning a pinned page read-only breaks the pinning after COW. Don't do it. The whole "track page soft dirty" state doesn't work with pinned pages anyway, since the page might be dirtied by the pinning entity without ever being noticed in the page tables. Signed-off-by: Linus Torvalds commit 29a951dfb3c3263c3a0f3bd9f7f2c2cfde4baedb Author: Linus Torvalds Date: Fri Jan 8 13:13:41 2021 -0800 mm: fix clear_refs_write locking Turning page table entries read-only requires the mmap_sem held for writing. So stop doing the odd games with turning things from read locks to write locks and back. Just get the write lock. Signed-off-by: Linus Torvalds commit 0c5b7a501e7400869ee905b4f7af3d6717802bcb Author: Pablo Neira Ayuso Date: Sat Jan 16 19:20:15 2021 +0100 netfilter: nft_dynset: add timeout extension to template Otherwise, the newly create element shows no timeout when listing the ruleset. If the set definition does not specify a default timeout, then the set element only shows the expiration time, but not the timeout. This is a problem when restoring a stateful ruleset listing since it skips the timeout policy entirely. Fixes: 22fe54d5fefc ("netfilter: nf_tables: add support for dynamic set updates") Signed-off-by: Pablo Neira Ayuso commit fca05d4d61e65fa573a3768f9019a42143c03349 Author: Pablo Neira Ayuso Date: Sat Jan 16 12:26:46 2021 +0100 netfilter: nft_dynset: honor stateful expressions in set definition If the set definition contains stateful expressions, allocate them for the newly added entries from the packet path. Fixes: 65038428b2c6 ("netfilter: nf_tables: allow to specify stateful expression in set definition") Signed-off-by: Pablo Neira Ayuso commit e557793799c5a8406afb08aa170509619f7eac36 Author: Atish Patra Date: Mon Jan 11 15:45:04 2021 -0800 RISC-V: Fix maximum allowed phsyical memory for RV32 Linux kernel can only map 1GB of address space for RV32 as the page offset is set to 0xC0000000. The current description in the Kconfig is confusing as it indicates that RV32 can support 2GB of physical memory. That is simply not true for current kernel. In future, a 2GB split support can be added to allow 2GB physical address space. Reviewed-by: Anup Patel Signed-off-by: Atish Patra Signed-off-by: Palmer Dabbelt commit abb8e86b269604e906a6a4af7a09f04b72dbb862 Author: Atish Patra Date: Mon Jan 11 15:45:02 2021 -0800 RISC-V: Set current memblock limit Currently, linux kernel can not use last 4k bytes of addressable space because IS_ERR_VALUE macro treats those as an error. This will be an issue for RV32 as any memblock allocator potentially allocate chunk of memory from the end of DRAM (2GB) leading bad address error even though the address was technically valid. Fix this issue by limiting the memblock if available memory spans the entire address space. Reviewed-by: Anup Patel Signed-off-by: Atish Patra Signed-off-by: Palmer Dabbelt commit 797f0375dd2ef5cdc68ac23450cbae9a5c67a74e Author: Atish Patra Date: Mon Jan 11 15:45:01 2021 -0800 RISC-V: Do not allocate memblock while iterating reserved memblocks Currently, resource tree allocates memory blocks while iterating on the list. It leads to following kernel warning because memblock allocation also invokes memory block reservation API. [ 0.000000] ------------[ cut here ]------------ [ 0.000000] WARNING: CPU: 0 PID: 0 at kernel/resource.c:795 __insert_resource+0x8e/0xd0 [ 0.000000] Modules linked in: [ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 5.10.0-00022-ge20097fb37e2-dirty #549 [ 0.000000] epc: c00125c2 ra : c001262c sp : c1c01f50 [ 0.000000] gp : c1d456e0 tp : c1c0a980 t0 : ffffcf20 [ 0.000000] t1 : 00000000 t2 : 00000000 s0 : c1c01f60 [ 0.000000] s1 : ffffcf00 a0 : ffffff00 a1 : c1c0c0c4 [ 0.000000] a2 : 80c12b15 a3 : 80402000 a4 : 80402000 [ 0.000000] a5 : c1c0c0c4 a6 : 80c12b15 a7 : f5faf600 [ 0.000000] s2 : c1c0c0c4 s3 : c1c0e000 s4 : c1009a80 [ 0.000000] s5 : c1c0c000 s6 : c1d48000 s7 : c1613b4c [ 0.000000] s8 : 00000fff s9 : 80000200 s10: c1613b40 [ 0.000000] s11: 00000000 t3 : c1d4a000 t4 : ffffffff This is also unnecessary as we can pre-compute the total memblocks required for each memory region and allocate it before the loop. It save precious boot time not going through memblock allocation code every time. Fixes: 00ab027a3b82 ("RISC-V: Add kernel image sections to the resource tree") Reviewed-by: Anup Patel Tested-by: Geert Uytterhoeven Signed-off-by: Atish Patra Signed-off-by: Palmer Dabbelt commit a959a9782fa87669feeed095ced5d78181a7c02d Author: Christoph Hellwig Date: Mon Jan 11 18:19:26 2021 +0100 iov_iter: fix the uaccess area in copy_compat_iovec_from_user sizeof needs to be called on the compat pointer, not the native one. Fixes: 89cd35c58bc2 ("iov_iter: transparently handle compat iovecs in import_iovec") Reported-by: David Laight Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit bcd0cf19ef8258ac31b9a20248b05c15a1f4b4b0 Author: Eric Dumazet Date: Thu Jan 14 10:52:29 2021 -0800 net_sched: avoid shift-out-of-bounds in tcindex_set_parms() tc_index being 16bit wide, we need to check that TCA_TCINDEX_SHIFT attribute is not silly. UBSAN: shift-out-of-bounds in net/sched/cls_tcindex.c:260:29 shift exponent 255 is too large for 32-bit type 'int' CPU: 0 PID: 8516 Comm: syz-executor228 Not tainted 5.10.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:79 [inline] dump_stack+0x107/0x163 lib/dump_stack.c:120 ubsan_epilogue+0xb/0x5a lib/ubsan.c:148 __ubsan_handle_shift_out_of_bounds.cold+0xb1/0x181 lib/ubsan.c:395 valid_perfect_hash net/sched/cls_tcindex.c:260 [inline] tcindex_set_parms.cold+0x1b/0x215 net/sched/cls_tcindex.c:425 tcindex_change+0x232/0x340 net/sched/cls_tcindex.c:546 tc_new_tfilter+0x13fb/0x21b0 net/sched/cls_api.c:2127 rtnetlink_rcv_msg+0x8b6/0xb80 net/core/rtnetlink.c:5555 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2494 netlink_unicast_kernel net/netlink/af_netlink.c:1304 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1330 netlink_sendmsg+0x907/0xe40 net/netlink/af_netlink.c:1919 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:672 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2336 ___sys_sendmsg+0xf3/0x170 net/socket.c:2390 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2423 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet Reported-by: syzbot Link: https://lore.kernel.org/r/20210114185229.1742255-1-eric.dumazet@gmail.com Signed-off-by: Jakub Kicinski commit dd5e073381f2ada3630f36be42833c6e9c78b75e Author: Eric Dumazet Date: Thu Jan 14 10:19:29 2021 -0800 net_sched: gen_estimator: support large ewma log syzbot report reminded us that very big ewma_log were supported in the past, even if they made litle sense. tc qdisc replace dev xxx root est 1sec 131072sec ... While fixing the bug, also add boundary checks for ewma_log, in line with range supported by iproute2. UBSAN: shift-out-of-bounds in net/core/gen_estimator.c:83:38 shift exponent -1 is negative CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.10.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:79 [inline] dump_stack+0x107/0x163 lib/dump_stack.c:120 ubsan_epilogue+0xb/0x5a lib/ubsan.c:148 __ubsan_handle_shift_out_of_bounds.cold+0xb1/0x181 lib/ubsan.c:395 est_timer.cold+0xbb/0x12d net/core/gen_estimator.c:83 call_timer_fn+0x1a5/0x710 kernel/time/timer.c:1417 expire_timers kernel/time/timer.c:1462 [inline] __run_timers.part.0+0x692/0xa80 kernel/time/timer.c:1731 __run_timers kernel/time/timer.c:1712 [inline] run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1744 __do_softirq+0x2bc/0xa77 kernel/softirq.c:343 asm_call_irq_on_stack+0xf/0x20 __run_on_irqstack arch/x86/include/asm/irq_stack.h:26 [inline] run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:77 [inline] do_softirq_own_stack+0xaa/0xd0 arch/x86/kernel/irq_64.c:77 invoke_softirq kernel/softirq.c:226 [inline] __irq_exit_rcu+0x17f/0x200 kernel/softirq.c:420 irq_exit_rcu+0x5/0x20 kernel/softirq.c:432 sysvec_apic_timer_interrupt+0x4d/0x100 arch/x86/kernel/apic/apic.c:1096 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:628 RIP: 0010:native_save_fl arch/x86/include/asm/irqflags.h:29 [inline] RIP: 0010:arch_local_save_flags arch/x86/include/asm/irqflags.h:79 [inline] RIP: 0010:arch_irqs_disabled arch/x86/include/asm/irqflags.h:169 [inline] RIP: 0010:acpi_safe_halt drivers/acpi/processor_idle.c:111 [inline] RIP: 0010:acpi_idle_do_entry+0x1c9/0x250 drivers/acpi/processor_idle.c:516 Fixes: 1c0d32fde5bd ("net_sched: gen_estimator: complete rewrite of rate estimators") Signed-off-by: Eric Dumazet Reported-by: syzbot Link: https://lore.kernel.org/r/20210114181929.1717985-1-eric.dumazet@gmail.com Signed-off-by: Jakub Kicinski commit e4bedf48aaa5552bc1f49703abd17606e7e6e82a Author: Eric Dumazet Date: Thu Jan 14 08:06:37 2021 -0800 net_sched: reject silly cell_log in qdisc_get_rtab() iproute2 probably never goes beyond 8 for the cell exponent, but stick to the max shift exponent for signed 32bit. UBSAN reported: UBSAN: shift-out-of-bounds in net/sched/sch_api.c:389:22 shift exponent 130 is too large for 32-bit type 'int' CPU: 1 PID: 8450 Comm: syz-executor586 Not tainted 5.11.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:79 [inline] dump_stack+0x183/0x22e lib/dump_stack.c:120 ubsan_epilogue lib/ubsan.c:148 [inline] __ubsan_handle_shift_out_of_bounds+0x432/0x4d0 lib/ubsan.c:395 __detect_linklayer+0x2a9/0x330 net/sched/sch_api.c:389 qdisc_get_rtab+0x2b5/0x410 net/sched/sch_api.c:435 cbq_init+0x28f/0x12c0 net/sched/sch_cbq.c:1180 qdisc_create+0x801/0x1470 net/sched/sch_api.c:1246 tc_modify_qdisc+0x9e3/0x1fc0 net/sched/sch_api.c:1662 rtnetlink_rcv_msg+0xb1d/0xe60 net/core/rtnetlink.c:5564 netlink_rcv_skb+0x1f0/0x460 net/netlink/af_netlink.c:2494 netlink_unicast_kernel net/netlink/af_netlink.c:1304 [inline] netlink_unicast+0x7de/0x9b0 net/netlink/af_netlink.c:1330 netlink_sendmsg+0xaa6/0xe90 net/netlink/af_netlink.c:1919 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg net/socket.c:672 [inline] ____sys_sendmsg+0x5a2/0x900 net/socket.c:2345 ___sys_sendmsg net/socket.c:2399 [inline] __sys_sendmsg+0x319/0x400 net/socket.c:2432 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet Reported-by: syzbot Acked-by: Cong Wang Link: https://lore.kernel.org/r/20210114160637.1660597-1-eric.dumazet@gmail.com Signed-off-by: Jakub Kicinski commit 1d94330a437a573cfdf848f6743b1ed169242c8a Merge: b45e2da6e4442 c87a95dc28b14 Author: Linus Torvalds Date: Fri Jan 15 18:01:17 2021 -0800 Merge tag 'for-5.11/dm-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fixes from Mike Snitzer: - Fix DM-raid's raid1 discard limits so discards work. - Select missing Kconfig dependencies for DM integrity and zoned targets. - Four fixes for DM crypt target's support to optionally bypass kcryptd workqueues. - Fix DM snapshot merge supports missing data flushes before committing metadata. - Fix DM integrity data device flushing when external metadata is used. - Fix DM integrity's maximum number of supported constructor arguments that user can request when creating an integrity device. - Eliminate DM core ioctl logging noise when an ioctl is issued without required CAP_SYS_RAWIO permission. * tag 'for-5.11/dm-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm crypt: defer decryption to a tasklet if interrupts disabled dm integrity: fix the maximum number of arguments dm crypt: do not call bio_endio() from the dm-crypt tasklet dm integrity: fix flush with external metadata device dm: eliminate potential source of excessive kernel log noise dm snapshot: flush merged data before committing metadata dm crypt: use GFP_ATOMIC when allocating crypto requests from softirq dm crypt: do not wait for backlogged crypto request completion in softirq dm zoned: select CONFIG_CRC32 dm integrity: select CRYPTO_SKCIPHER dm raid: fix discard limits for raid1 commit 2b8fdbbf1c616300312f71fe5b21fe8f03129950 Author: Daniel Latypov Date: Thu Jan 14 16:39:13 2021 -0800 kunit: tool: move kunitconfig parsing into __init__, make it optional LinuxSourceTree will unceremoniously crash if the user doesn't call read_kunitconfig() first in a number of functions. And currently every place we create an instance, the caller also calls create_kunitconfig() and read_kunitconfig(). Move these instead into __init__() so they can't be forgotten and to reduce copy-paste. The https://github.com/google/pytype type-checker complained that _config wasn't initialized. With this, kunit_tool now type checks under both pytype and mypy. Add an optional boolean that can be used to disable this for use cases in the future where we might not need/want to load the config. Signed-off-by: Daniel Latypov Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins Signed-off-by: Shuah Khan commit 81c60306dc588e2e6b21391c1f6dd509403e6eec Author: Daniel Latypov Date: Thu Jan 14 16:39:12 2021 -0800 kunit: tool: fix minor typing issue with None status The code to handle aggregating statuses didn't check that the status actually got set to some non-None value. Default the value to SUCCESS instead of adding a bunch of `is None` checks. This sorta follows the precedent in commit 3fc48259d525 ("kunit: Don't fail test suites if one of them is empty"). Also slightly simplify the code and add type annotations. Signed-off-by: Daniel Latypov Reviewed-by: David Gow Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins Signed-off-by: Shuah Khan commit 09641f7c7d8f1309fe9ad9ce4e6a1697016d73ba Author: Daniel Latypov Date: Thu Jan 14 16:39:11 2021 -0800 kunit: tool: surface and address more typing issues The authors of this tool were more familiar with a different type-checker, https://github.com/google/pytype. That's open source, but mypy seems more prevalent (and runs faster). And unlike pytype, mypy doesn't try to infer types so it doesn't check unanotated functions. So annotate ~all functions in kunit tool to increase type-checking coverage. Note: per https://www.python.org/dev/peps/pep-0484/, `__init__()` should be annotated as `-> None`. Doing so makes mypy discover a number of new violations. Exclude main() since we reuse `request` for the different types of requests, which mypy isn't happy about. This commit fixes all but one error, where `TestSuite.status` might be None. Signed-off-by: Daniel Latypov Reviewed-by: David Gow Tested-by: Brendan Higgins Acked-by: Brendan Higgins Signed-off-by: Shuah Khan commit 8db50be262e9faf59fa0feb74599c29b64eb0af2 Author: Daniel Latypov Date: Tue Dec 15 16:22:46 2020 -0800 Documentation: kunit: include example of a parameterized test Commit fadb08e7c750 ("kunit: Support for Parameterized Testing") introduced support but lacks documentation for how to use it. This patch builds on commit 1f0e943df68a ("Documentation: kunit: provide guidance for testing many inputs") to show a minimal example of the new feature. Signed-off-by: Daniel Latypov Reviewed-by: David Gow Tested-by: Brendan Higgins Acked-by: Brendan Higgins Signed-off-by: Shuah Khan commit ebfd44883ab5dd9a201af2d936e1dfb93962be0b Author: David Gow Date: Fri Dec 11 14:32:32 2020 -0800 kunit: tool: Fix spelling of "diagnostic" in kunit_parser Various helper functions were misspelling "diagnostic" in their names. It finally got annoying, so fix it. Signed-off-by: David Gow Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins Signed-off-by: Shuah Khan commit e23a8d00219818ba74f97f6a4cbe071dbbd5b5f1 Merge: c96adff956191 235ecd36c7a93 Author: Jakub Kicinski Date: Fri Jan 15 16:34:59 2021 -0800 Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2021-01-16 1) Fix a double bpf_prog_put() for BPF_PROG_{TYPE_EXT,TYPE_TRACING} types in link creation's error path causing a refcount underflow, from Jiri Olsa. 2) Fix BTF validation errors for the case where kernel modules don't declare any new types and end up with an empty BTF, from Andrii Nakryiko. 3) Fix BPF local storage helpers to first check their {task,inode} owners for being NULL before access, from KP Singh. 4) Fix a memory leak in BPF setsockopt handling for the case where optlen is zero and thus temporary optval buffer should be freed, from Stanislav Fomichev. 5) Fix a syzbot memory allocation splat in BPF_PROG_TEST_RUN infra for raw_tracepoint caused by too big ctx_size_in, from Song Liu. 6) Fix LLVM code generation issues with verifier where PTR_TO_MEM{,_OR_NULL} registers were spilled to stack but not recognized, from Gilad Reti. * https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: MAINTAINERS: Update my email address selftests/bpf: Add verifier test for PTR_TO_MEM spill bpf: Support PTR_TO_MEM{,_OR_NULL} register spilling bpf: Reject too big ctx_size_in for raw_tp test run libbpf: Allow loading empty BTFs bpf: Allow empty module BTFs bpf: Don't leak memory in bpf getsockopt when optlen == 0 bpf: Update local storage test to check handling of null ptrs bpf: Fix typo in bpf_inode_storage.c bpf: Local storage helpers should check nullness of owner ptr passed bpf: Prevent double bpf_prog_put call from bpf_tracing_prog_attach ==================== Link: https://lore.kernel.org/r/20210116002025.15706-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit c96adff95619178e2118925578343ad54857c80c Author: Cong Wang Date: Fri Jan 15 10:50:24 2021 -0800 cls_flower: call nla_ok() before nla_next() fl_set_enc_opt() simply checks if there are still bytes left to parse, but this is not sufficent as syzbot seems to be able to generate malformatted netlink messages. nla_ok() is more strict so should be used to validate the next nlattr here. And nla_validate_nested_deprecated() has less strict check too, it is probably too late to switch to the strict version, but we can just call nla_ok() too after it. Reported-and-tested-by: syzbot+2624e3778b18fc497c92@syzkaller.appspotmail.com Fixes: 0a6e77784f49 ("net/sched: allow flower to match tunnel options") Fixes: 79b1011cb33d ("net: sched: allow flower to match erspan options") Cc: Jamal Hadi Salim Cc: Xin Long Cc: Jiri Pirko Signed-off-by: Cong Wang Link: https://lore.kernel.org/r/20210115185024.72298-1-xiyou.wangcong@gmail.com Signed-off-by: Jakub Kicinski commit b45e2da6e444280f8661dca439c1e377761b2877 Merge: 8cbe71e7e01a9 eb351d75ce1e7 Author: Linus Torvalds Date: Fri Jan 15 15:25:45 2021 -0800 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "10 patches. Subsystems affected by this patch series: MAINTAINERS and mm (slub, pagealloc, memcg, kasan, vmalloc, migration, hugetlb, memory-failure, and process_vm_access)" * emailed patches from Andrew Morton : mm/process_vm_access.c: include compat.h mm,hwpoison: fix printing of page flags MAINTAINERS: add Vlastimil as slab allocators maintainer mm/hugetlb: fix potential missing huge page size info mm: migrate: initialize err in do_migrate_pages mm/vmalloc.c: fix potential memory leak arm/kasan: fix the array size of kasan_early_shadow_pte[] mm/memcontrol: fix warning in mem_cgroup_page_lruvec() mm/page_alloc: add a missing mm_page_alloc_zone_locked() tracepoint mm, slub: consider rest of partial list if acquire_slab() fails commit 8cbe71e7e01a9e45a390b204403880c90a226039 Merge: 0bc9bc1d8b2fa 7c7b3e5d9aeed Author: Linus Torvalds Date: Fri Jan 15 15:14:40 2021 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Jason Gunthorpe: "A fairly modest set of bug fixes, nothing abnormal from the merge window The ucma patch is a bit on the larger side, but given the regression was recently added I've opted to forward it to the rc stream. - Fix a ucma memory leak introduced in v5.9 while fixing the Syzkaller bugs - Don't fail when the xarray wraps for user verbs objects - User triggerable oops regression from the umem page size rework - Error unwind bugs in usnic, ocrdma, mlx5 and cma" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: RDMA/cma: Fix error flow in default_roce_mode_store RDMA/mlx5: Fix wrong free of blue flame register on error IB/mlx5: Fix error unwinding when set_has_smi_cap fails RDMA/umem: Avoid undefined behavior of rounddown_pow_of_two() RDMA/ocrdma: Fix use after free in ocrdma_dealloc_ucontext_pd() RDMA/usnic: Fix memleak in find_free_vf_and_create_qp_grp RDMA/restrack: Don't treat as an error allocation ID wrapping RDMA/ucma: Do not miss ctx destruction steps in some cases commit a8d13dbccb137c46fead2ec1a4f1fbc8cfc9ea91 Author: Jens Axboe Date: Fri Jan 15 16:04:23 2021 -0700 io_uring: ensure finish_wait() is always called in __io_uring_task_cancel() If we enter with requests pending and performm cancelations, we'll have a different inflight count before and after calling prepare_to_wait(). This causes the loop to restart. If we actually ended up canceling everything, or everything completed in-between, then we'll break out of the loop without calling finish_wait() on the waitqueue. This can trigger a warning on exit_signals(), as we leave the task state in TASK_UNINTERRUPTIBLE. Put a finish_wait() after the loop to catch that case. Cc: stable@vger.kernel.org # 5.9+ Signed-off-by: Jens Axboe commit 235ecd36c7a93e4d6c73ac71137b8f1fa31148dd Author: Björn Töpel Date: Fri Jan 15 11:43:37 2021 +0100 MAINTAINERS: Update my email address My Intel email will stop working in a not too distant future. Move my MAINTAINERS entries to my kernel.org address. Signed-off-by: Björn Töpel Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210115104337.7751-1-bjorn.topel@gmail.com commit 0bc9bc1d8b2fa0d5a7e2132e89c540099ea63172 Merge: 7cd3c41261889 e9f53353e166a Author: Linus Torvalds Date: Fri Jan 15 14:54:24 2021 -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: "A number of bug fixes for ext4: - Fix for the new fast_commit feature - Fix some error handling codepaths in whiteout handling and mountpoint sampling - Fix how we write ext4_error information so it goes through the journal when journalling is active, to avoid races that can lead to lost error information, superblock checksum failures, or DIF/DIX features" * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: remove expensive flush on fast commit ext4: fix bug for rename with RENAME_WHITEOUT ext4: fix wrong list_splice in ext4_fc_cleanup ext4: use IS_ERR instead of IS_ERR_OR_NULL and set inode null when IS_ERR ext4: don't leak old mountpoint samples ext4: drop ext4_handle_dirty_super() ext4: fix superblock checksum failure when setting password salt ext4: use sbi instead of EXT4_SB(sb) in ext4_update_super() ext4: save error info to sb through journal if available ext4: protect superblock modifications with a buffer lock ext4: drop sync argument of ext4_commit_super() ext4: combine ext4_handle_error() and save_error_info() commit 7cd3c41261889e3ee899cd5b1583178f5fbac55e Merge: 82821be8a2e14 e54fd0716c3db Author: Linus Torvalds Date: Fri Jan 15 14:39:21 2021 -0800 Merge tag '5.11-rc3-smb3' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "Two small cifs fixes for stable (including an important handle leak fix) and three small cleanup patches" * tag '5.11-rc3-smb3' of git://git.samba.org/sfrench/cifs-2.6: cifs: style: replace one-element array with flexible-array cifs: connect: style: Simplify bool comparison fs: cifs: remove unneeded variable in smb3_fs_context_dup cifs: fix interrupted close commands cifs: check pointer before freeing commit 82821be8a2e14bdf359be577400be88b2f1eb8a7 Merge: f288c895622f8 3a57a643a851d Author: Linus Torvalds Date: Fri Jan 15 13:11:51 2021 -0800 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Catalin Marinas: - Set the minimum GCC version to 5.1 for arm64 due to earlier compiler bugs. - Make atomic helpers __always_inline to avoid a section mismatch when compiling with clang. - Fix the CMA and crashkernel reservations to use ZONE_DMA (remove the arm64_dma32_phys_limit variable, no longer needed with a dynamic ZONE_DMA sizing in 5.11). - Remove redundant IRQ flag tracing that was leaving lockdep inconsistent with the hardware state. - Revert perf events based hard lockup detector that was causing smp_processor_id() to be called in preemptible context. - Some trivial cleanups - spelling fix, renaming S_FRAME_SIZE to PT_REGS_SIZE, function prototypes added. * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: selftests: Fix spelling of 'Mismatch' arm64: syscall: include prototype for EL0 SVC functions compiler.h: Raise minimum version of GCC to 5.1 for arm64 arm64: make atomic helpers __always_inline arm64: rename S_FRAME_SIZE to PT_REGS_SIZE Revert "arm64: Enable perf events based hard lockup detector" arm64: entry: remove redundant IRQ flag tracing arm64: Remove arm64_dma32_phys_limit and its uses commit f288c895622f881324cf71ef9eec3af60ac8a197 Merge: f4e087c666f54 7b490a8ab0f2d Author: Linus Torvalds Date: Fri Jan 15 13:07:33 2021 -0800 Merge tag 'mips_fixes_5.11.1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS fixes from Thomas Bogendoerfer: - fix coredumps on 64bit kernels - fix for alignment bugs preventing booting - fix checking for failed irq_alloc_desc calls * tag 'mips_fixes_5.11.1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MIPS: OCTEON: fix unreachable code in octeon_irq_init_ciu MIPS: relocatable: fix possible boot hangup with KASLR enabled MIPS: Fix malformed NT_FILE and NT_SIGINFO in 32bit coredumps MIPS: boot: Fix unaligned access with CONFIG_MIPS_RAW_APPENDED_DTB commit b5e56576e16236de3c035ca86cd3ef16591722fb Author: Zefan Li Date: Wed Jan 13 16:59:42 2021 +0800 MAINTAINERS: Update my email address Signed-off-by: Zefan Li Signed-off-by: Tejun Heo commit 00e01f325de1eb5ccb3ead7c0a195187a7a53d7e Author: Zefan Li Date: Wed Jan 13 16:49:51 2021 +0800 MAINTAINERS: Remove stale URLs for cpuset Those URLs are no longer accessable. Reported-by: Steve Wahl Signed-off-by: Zefan Li Signed-off-by: Tejun Heo commit 648b054a4647cd62e13ba79f398b8b97a7c82b19 Author: Al Grant Date: Tue Nov 24 19:58:17 2020 +0000 perf inject: Correct event attribute sizes When 'perf inject' reads a perf.data file from an older version of perf, it writes event attributes into the output with the original size field, but lays them out as if they had the size currently used. Readers see a corrupt file. Update the size field to match the layout. Signed-off-by: Al Grant Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20201124195818.30603-1-al.grant@arm.com Signed-off-by: Denis Nikitin Signed-off-by: Arnaldo Carvalho de Melo commit 5501e9229a80d95a1ea68609f44c447a75d23ed5 Author: Adrian Hunter Date: Thu Jan 7 19:41:59 2021 +0200 perf intel-pt: Fix 'CPU too large' error In some cases, the number of cpus (nr_cpus_online) is confused with the maximum cpu number (nr_cpus_avail), which results in the error in the example below: Example on system with 8 cpus: Before: # echo 0 > /sys/devices/system/cpu/cpu2/online # ./perf record --kcore -e intel_pt// taskset --cpu-list 7 uname Linux [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.147 MB perf.data ] # ./perf script --itrace=e Requested CPU 7 too large. Consider raising MAX_NR_CPUS 0x25908 [0x8]: failed to process type: 68 [Invalid argument] After: # ./perf script --itrace=e # Fixes: 8c7274691f0d ("perf machine: Replace MAX_NR_CPUS with perf_env::nr_cpus_online") Fixes: 7df4e36a4785 ("perf session: Replace MAX_NR_CPUS with perf_env::nr_cpus_online") Signed-off-by: Adrian Hunter Tested-by: Kan Liang Cc: Jiri Olsa Cc: stable@vger.kernel.org Link: http://lore.kernel.org/lkml/20210107174159.24897-1-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit a1bf23052bdfe30ec3c693cf32feb2d79114ac16 Author: Namhyung Kim Date: Fri Jan 15 16:11:39 2021 +0900 perf stat: Take cgroups into account for shadow stats As of now it doesn't consider cgroups when collecting shadow stats and metrics so counter values from different cgroups will be saved in a same slot. This resulted in incorrect numbers when those cgroups have different workloads. For example, let's look at the scenario below: cgroups A and C runs same workload which burns a cpu while cgroup B runs a light workload. $ perf stat -a -e cycles,instructions --for-each-cgroup A,B,C sleep 1 Performance counter stats for 'system wide': 3,958,116,522 cycles A 6,722,650,929 instructions A # 2.53 insn per cycle 1,132,741 cycles B 571,743 instructions B # 0.00 insn per cycle 4,007,799,935 cycles C 6,793,181,523 instructions C # 2.56 insn per cycle 1.001050869 seconds time elapsed When I run 'perf stat' with single workload, it usually shows IPC around 1.7. We can verify it (6,722,650,929.0 / 3,958,116,522 = 1.698) for cgroup A. But in this case, since cgroups are ignored, cycles are averaged so it used the lower value for IPC calculation and resulted in around 2.5. avg cycle: (3958116522 + 1132741 + 4007799935) / 3 = 2655683066 IPC (A) : 6722650929 / 2655683066 = 2.531 IPC (B) : 571743 / 2655683066 = 0.0002 IPC (C) : 6793181523 / 2655683066 = 2.557 We can simply compare cgroup pointers in the evsel and it'll be NULL when cgroups are not specified. With this patch, I can see correct numbers like below: $ perf stat -a -e cycles,instructions --for-each-cgroup A,B,C sleep 1 Performance counter stats for 'system wide': 4,171,051,687 cycles A 7,219,793,922 instructions A # 1.73 insn per cycle 1,051,189 cycles B 583,102 instructions B # 0.55 insn per cycle 4,171,124,710 cycles C 7,192,944,580 instructions C # 1.72 insn per cycle 1.007909814 seconds time elapsed Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Jin Yao Cc: Mark Rutland Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20210115071139.257042-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 3ff1e7180abc7f6db413933c110df69157216715 Author: Namhyung Kim Date: Fri Jan 15 16:11:38 2021 +0900 perf stat: Introduce struct runtime_stat_data To pass more info to the saved_value in the runtime_stat, add a new struct runtime_stat_data. Currently it only has 'ctx' field but later patch will add more. Note that we intentionally pass 0 as ctx to clock-related events for compatibility. It was already there in a few places. So move the code into the saved_value_lookup() explicitly and add a comment. Suggested-by: Andi Kleen Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Jin Yao Cc: Mark Rutland Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20210115071139.257042-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 66dd86b2a2bee129c70f7ff054d3a6a2e5f8eb20 Author: Ian Rogers Date: Thu Jan 14 10:02:50 2021 -0800 libperf tests: Fail when failing to get a tracepoint id Permissions are necessary to get a tracepoint id. Fail the test when the read fails. Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20210114180250.3853825-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit bba2ea17ef553aea0df80cb64399fe2f70f225dd Author: Ian Rogers Date: Thu Jan 14 10:02:49 2021 -0800 libperf tests: If a test fails return non-zero If a test fails return -1 rather than 0. This is consistent with the return value in test-cpumap.c Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20210114180250.3853825-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit be82fddca81eefd1edbd9b290dfcb2177e24785b Author: Ian Rogers Date: Thu Jan 14 13:23:04 2021 -0800 libperf tests: Avoid uninitialized variable warning The variable 'bf' is read (for a write call) without being initialized triggering a memory sanitizer warning. Use 'bf' in the read and switch the write to reading from a string. Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Mark Rutland Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20210114212304.4018119-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 61e960b07b637f0295308ad91268501d744c21b5 Author: Chen Zhou Date: Fri Jan 15 17:37:17 2021 +0800 cgroup-v1: add disabled controller check in cgroup1_parse_param() When mounting a cgroup hierarchy with disabled controller in cgroup v1, all available controllers will be attached. For example, boot with cgroup_no_v1=cpu or cgroup_disable=cpu, and then mount with "mount -t cgroup -ocpu cpu /sys/fs/cgroup/cpu", then all enabled controllers will be attached except cpu. Fix this by adding disabled controller check in cgroup1_parse_param(). If the specified controller is disabled, just return error with information "Disabled controller xx" rather than attaching all the other enabled controllers. Fixes: f5dfb5315d34 ("cgroup: take options parsing into ->parse_monolithic()") Signed-off-by: Chen Zhou Reviewed-by: Zefan Li Reviewed-by: Michal Koutný Signed-off-by: Tejun Heo commit e9f53353e166a67dfe4f8295100f8ac39d6cf10b Author: Daejun Park Date: Wed Jan 6 10:32:42 2021 +0900 ext4: remove expensive flush on fast commit In the fast commit, it adds REQ_FUA and REQ_PREFLUSH on each fast commit block when barrier is enabled. However, in recovery phase, ext4 compares CRC value in the tail. So it is sufficient to add REQ_FUA and REQ_PREFLUSH on the block that has tail. Signed-off-by: Daejun Park Reviewed-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20210106013242epcms2p5b6b4ed8ca86f29456fdf56aa580e74b4@epcms2p5 Signed-off-by: Theodore Ts'o commit 6b4b8e6b4ad8553660421d6360678b3811d5deb9 Author: yangerkun Date: Tue Jan 5 14:28:57 2021 +0800 ext4: fix bug for rename with RENAME_WHITEOUT We got a "deleted inode referenced" warning cross our fsstress test. The bug can be reproduced easily with following steps: cd /dev/shm mkdir test/ fallocate -l 128M img mkfs.ext4 -b 1024 img mount img test/ dd if=/dev/zero of=test/foo bs=1M count=128 mkdir test/dir/ && cd test/dir/ for ((i=0;i<1000;i++)); do touch file$i; done # consume all block cd ~ && renameat2(AT_FDCWD, /dev/shm/test/dir/file1, AT_FDCWD, /dev/shm/test/dir/dst_file, RENAME_WHITEOUT) # ext4_add_entry in ext4_rename will return ENOSPC!! cd /dev/shm/ && umount test/ && mount img test/ && ls -li test/dir/file1 We will get the output: "ls: cannot access 'test/dir/file1': Structure needs cleaning" and the dmesg show: "EXT4-fs error (device loop0): ext4_lookup:1626: inode #2049: comm ls: deleted inode referenced: 139" ext4_rename will create a special inode for whiteout and use this 'ino' to replace the source file's dir entry 'ino'. Once error happens latter(the error above was the ENOSPC return from ext4_add_entry in ext4_rename since all space has been consumed), the cleanup do drop the nlink for whiteout, but forget to restore 'ino' with source file. This will trigger the bug describle as above. Signed-off-by: yangerkun Reviewed-by: Jan Kara Cc: stable@vger.kernel.org Fixes: cd808deced43 ("ext4: support RENAME_WHITEOUT") Link: https://lore.kernel.org/r/20210105062857.3566-1-yangerkun@huawei.com Signed-off-by: Theodore Ts'o commit 31e203e09f036f48e7c567c2d32df0196bbd303f Author: Daejun Park Date: Wed Dec 30 18:48:51 2020 +0900 ext4: fix wrong list_splice in ext4_fc_cleanup After full/fast commit, entries in staging queue are promoted to main queue. In ext4_fs_cleanup function, it splice to staging queue to staging queue. Fixes: aa75f4d3daaeb ("ext4: main fast-commit commit path") Signed-off-by: Daejun Park Reviewed-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20201230094851epcms2p6eeead8cc984379b37b2efd21af90fd1a@epcms2p6 Signed-off-by: Theodore Ts'o Cc: stable@kernel.org commit 23dd561ad9eae02b4d51bb502fe4e1a0666e9567 Author: Yi Li Date: Wed Dec 30 11:38:27 2020 +0800 ext4: use IS_ERR instead of IS_ERR_OR_NULL and set inode null when IS_ERR 1: ext4_iget/ext4_find_extent never returns NULL, use IS_ERR instead of IS_ERR_OR_NULL to fix this. 2: ext4_fc_replay_inode should set the inode to NULL when IS_ERR. and go to call iput properly. Fixes: 8016e29f4362 ("ext4: fast commit recovery path") Signed-off-by: Yi Li Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20201230033827.3996064-1-yili@winhong.com Signed-off-by: Theodore Ts'o Cc: stable@kernel.org commit b7ba6cfabc42fc846eb96e33f1edcd3ea6290a27 Author: Yingjie Wang Date: Fri Jan 15 06:10:04 2021 -0800 octeontx2-af: Fix missing check bugs in rvu_cgx.c In rvu_mbox_handler_cgx_mac_addr_get() and rvu_mbox_handler_cgx_mac_addr_set(), the msg is expected only from PFs that are mapped to CGX LMACs. It should be checked before mapping, so we add the is_cgx_config_permitted() in the functions. Fixes: 96be2e0da85e ("octeontx2-af: Support for MAC address filters in CGX") Signed-off-by: Yingjie Wang Reviewed-by: Geetha sowjanya Link: https://lore.kernel.org/r/1610719804-35230-1-git-send-email-wangyingjie55@126.com Signed-off-by: Jakub Kicinski commit a042a82ddbb3434f523c0671f5301d1fe796b4eb Author: Namhyung Kim Date: Thu Jan 14 14:06:09 2021 +0900 perf test: Fix shadow stat test for non-bash shells It was using some bash-specific features and failed to parse when running with a different shell like below: root@kbl-ppc:~/kbl-ws/perf-dev/lck-9077/acme.tmp/tools/perf# ./perf test 83 -vv 83: perf stat metrics (shadow stat) test : --- start --- test child forked, pid 3922 ./tests/shell/stat+shadow_stat.sh: 19: ./tests/shell/stat+shadow_stat.sh: [[: not found ./tests/shell/stat+shadow_stat.sh: 24: ./tests/shell/stat+shadow_stat.sh: [[: not found ./tests/shell/stat+shadow_stat.sh: 30: ./tests/shell/stat+shadow_stat.sh: [[: not found (standard_in) 2: syntax error ./tests/shell/stat+shadow_stat.sh: 36: ./tests/shell/stat+shadow_stat.sh: [[: not found ./tests/shell/stat+shadow_stat.sh: 19: ./tests/shell/stat+shadow_stat.sh: [[: not found ./tests/shell/stat+shadow_stat.sh: 24: ./tests/shell/stat+shadow_stat.sh: [[: not found ./tests/shell/stat+shadow_stat.sh: 30: ./tests/shell/stat+shadow_stat.sh: [[: not found (standard_in) 2: syntax error ./tests/shell/stat+shadow_stat.sh: 36: ./tests/shell/stat+shadow_stat.sh: [[: not found ./tests/shell/stat+shadow_stat.sh: 45: ./tests/shell/stat+shadow_stat.sh: declare: not found test child finished with -1 ---- end ---- perf stat metrics (shadow stat) test: FAILED! Reported-by: Jin Yao Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Laight Cc: Ian Rogers Cc: Mark Rutland Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20210114050609.1258820-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit addbdff24293ef772a1b8e5d127b570e70f08cdc Author: Arnaldo Carvalho de Melo Date: Thu Jan 14 12:35:27 2021 -0300 tools headers: Syncronize linux/build_bug.h with the kernel sources To pick up the changes in: 3a176b94609a18f5 ("Revert "kbuild: avoid static_assert for genksyms"") And silence this perf build warning: Warning: Kernel ABI header at 'tools/include/linux/build_bug.h' differs from latest version at 'include/linux/build_bug.h' diff -u tools/include/linux/build_bug.h include/linux/build_bug.h Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Masahiro Yamada Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 38c53947a7dcb6d295769830c9085b0409921ec9 Author: Arnaldo Carvalho de Melo Date: Thu Jan 14 12:26:08 2021 -0300 tools headers UAPI: Sync kvm.h headers with the kernel sources To pick the changes in: 647daca25d24fb6e ("KVM: SVM: Add support for booting APs in an SEV-ES guest") That don't cause any tooling change, just silences this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/kvm.h' differs from latest version at 'include/uapi/linux/kvm.h' diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: Paolo Bonzini Cc: Tom Lendacky Signed-off-by: Arnaldo Carvalho de Melo commit 301f0203e04293c13372c032198665bd75adf81b Author: Arnaldo Carvalho de Melo Date: Tue Dec 29 15:41:19 2020 -0300 perf bpf examples: Fix bpf.h header include directive in 5sec.c example It was looking at bpf/bpf.h, which caused this problem: # perf trace -e tools/perf/examples/bpf/5sec.c /home/acme/git/perf/tools/perf/examples/bpf/5sec.c:42:10: fatal error: 'bpf/bpf.h' file not found #include ^~~~~~~~~~~ 1 error generated. ERROR: unable to compile tools/perf/examples/bpf/5sec.c Hint: Check error message shown above. Hint: You can also pre-compile it into .o using: clang -target bpf -O2 -c tools/perf/examples/bpf/5sec.c with proper -I and -D options. event syntax error: 'tools/perf/examples/bpf/5sec.c' \___ Failed to load tools/perf/examples/bpf/5sec.c from source: Error when compiling BPF scriptlet # Change that to plain bpf.h, to make it work again: # perf trace -e tools/perf/examples/bpf/5sec.c sleep 5s 0.000 perf_bpf_probe:hrtimer_nanosleep(__probe_ip: -1776891872, rqtp: 5000000000) # perf trace -e tools/perf/examples/bpf/5sec.c/max-stack=16/ sleep 5s 0.000 perf_bpf_probe:hrtimer_nanosleep(__probe_ip: -1776891872, rqtp: 5000000000) hrtimer_nanosleep ([kernel.kallsyms]) common_nsleep ([kernel.kallsyms]) __x64_sys_clock_nanosleep ([kernel.kallsyms]) do_syscall_64 ([kernel.kallsyms]) entry_SYSCALL_64_after_hwframe ([kernel.kallsyms]) __clock_nanosleep_2 (/usr/lib64/libc-2.32.so) # perf trace -e tools/perf/examples/bpf/5sec.c sleep 4s # Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit f4e087c666f54559cb4e530af1fbfc9967e14a15 Merge: dcda487c9c2e8 179892adb0436 Author: Linus Torvalds Date: Fri Jan 15 10:55:33 2021 -0800 Merge tag 'acpi-5.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These address a device ID bounds check error in the device enumeration code and fix a mistake in the documentation. Specifics: - Harden the ACPI device enumeration code against device ID length overflows to address a Linux VM cash on Hyper-V (Dexuan Cui). - Fix a mistake in the documentation of error type values for PCIe errors (Qiuxu Zhuo)" * tag 'acpi-5.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: Documentation: ACPI: EINJ: Fix error type values for PCIe errors ACPI: scan: Harden acpi_device_add() against device ID overflows commit dcda487c9c2e80ad177cdc34ae2068bbe5dada07 Merge: 7aec71cd9c1f2 3d7746bea9253 Author: Linus Torvalds Date: Fri Jan 15 10:52:00 2021 -0800 Merge tag 'for-linus-5.11-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: - A series to fix a regression when running as a fully virtualized guest on an old Xen hypervisor not supporting PV interrupt callbacks for HVM guests. - A patch to add support to query Xen resource sizes (setting was possible already) from user mode. * tag 'for-linus-5.11-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: x86/xen: Fix xen_hvm_smp_init() when vector callback not available x86/xen: Don't register Xen IPIs when they aren't going to be used x86/xen: Add xen_no_vector_callback option to test PCI INTX delivery xen: Set platform PCI device INTX affinity to CPU0 xen: Fix event channel callback via INTX/GSI xen/privcmd: allow fetching resource sizes commit 7aec71cd9c1f251ef17eae5f898c10133d49421d Merge: 02c06dc3750be 694a1c0adebee Author: Linus Torvalds Date: Fri Jan 15 10:48:58 2021 -0800 Merge tag 'iommu-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull iommu fixes from Will Deacon: "Three IOMMU fixes for -rc4. The main one is a change to the Intel IOMMU driver to fix the handling of unaligned addresses when invalidating the TLB. The fix itself is a bit ugly (the caller does a bunch of shifting which is then effectively undone later in the callchain), but Lu has patches to clean all of this up in 5.12. Summary: - Fix address alignment handling for VT-D TLB invalidation - Enable workarounds for buggy Qualcomm firmware on two more SoCs - Drop duplicate #include" * tag 'iommu-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: iommu/vt-d: Fix duplicate included linux/dma-map-ops.h iommu: arm-smmu-qcom: Add sdm630/msm8998 compatibles for qcom quirks iommu/vt-d: Fix unaligned addresses for intel_flush_svm_range_dev() commit 02c06dc3750be486e143cd553c13f02978e39b14 Merge: 5ee88057889bb 584265dfec70e Author: Linus Torvalds Date: Fri Jan 15 10:45:54 2021 -0800 Merge tag 'topic/nouveau-ampere-modeset-2021-01-15' of git://anongit.freedesktop.org/drm/drm Pull drm nouveau ampere display support from Dave Airlie: "Ben has requested if we can include Ampere modesetting support under fixes, it's for new GPUs and shouldn't affect existing hardware. It's a bit bigger than just adding a PCI ID, but It has no effect on older GPUs" * tag 'topic/nouveau-ampere-modeset-2021-01-15' of git://anongit.freedesktop.org/drm/drm: drm/nouveau/disp/ga10[24]: initial support drm/nouveau/dmaobj/ga10[24]: initial support drm/nouveau/i2c/ga10[024]: initial support drm/nouveau/gpio/ga10[024]: initial support drm/nouveau/bar/ga10[024]: initial support drm/nouveau/mmu/ga10[024]: initial support drm/nouveau/timer/ga10[024]: initial support drm/nouveau/fb/ga10[024]: initial support drm/nouveau/imem/ga10[024]: initial support drm/nouveau/privring/ga10[024]: initial support drm/nouveau/mc/ga10[024]: initial support drm/nouveau/devinit/ga10[024]: initial support drm/nouveau/bios/ga10[024]: initial support drm/nouveau/pci/ga10[024]: initial support drm/nouveau/core: recognise GA10[024] commit 179892adb0436139fd8e6af7b27f54219c1750f8 Merge: a58015d638cd4 3c516e038f0cc Author: Rafael J. Wysocki Date: Fri Jan 15 19:15:49 2021 +0100 Merge branch 'acpi-docs' * acpi-docs: Documentation: ACPI: EINJ: Fix error type values for PCIe errors commit 7505c06dabb5e814bda610c8d83338544f15db45 Author: Srinivas Kandagatla Date: Fri Jan 15 16:55:20 2021 +0000 MAINTAINERS: update qcom ASoC drivers list Add full list of ASoC drivers that are maintained! Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210115165520.6023-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 9b268be3adbb410cc1a857477b638a71258891a8 Author: Srinivas Kandagatla Date: Fri Jan 15 16:55:19 2021 +0000 MAINTAINERS: update maintainers of qcom audio Add myself as maintainer of qcom audio drivers, as Patrick has very little time to look at the patches. Signed-off-by: Srinivas Kandagatla Reviewed-by: Banajit Goswami Acked-by: Patrick Lai Link: https://lore.kernel.org/r/20210115165520.6023-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit f010505b78a4fa8d5b6480752566e7313fb5ca6e Author: Marcelo Diop-Gonzalez Date: Fri Jan 15 11:54:40 2021 -0500 io_uring: flush timeouts that should already have expired Right now io_flush_timeouts() checks if the current number of events is equal to ->timeout.target_seq, but this will miss some timeouts if there have been more than 1 event added since the last time they were flushed (possible in io_submit_flush_completions(), for example). Fix it by recording the last sequence at which timeouts were flushed so that the number of events seen can be compared to the number of events needed without overflow. Signed-off-by: Marcelo Diop-Gonzalez Reviewed-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 8a996b2d8a03beae3cb6adfc12673778c192085d Author: Linus Walleij Date: Sun Dec 13 23:55:17 2020 +0100 ARM: dts: ux500: Reserve memory carveouts The Ux500 platforms have some memory carveouts set aside for communicating with the modem and for the initial secure software (ISSW). These areas are protected by the memory controller and will result in an external abort if accessed like common read/write memory. On the legacy boot loaders, these were set aside by using cmdline arguments such as this: mem=96M@0 mem_mtrace=15M@96M mem_mshared=1M@111M mem_modem=16M@112M mali.mali_mem=32M@128M mem=96M@160M hwmem=127M@256M mem_issw=1M@383M mem_ram_console=1M@384M mem=638M@385M Reserve the relevant areas in the device tree instead. The "mali", "hwmem", "mem_ram_console" and the trailing 1MB at the end of the memory reservations in the list are not relevant for the upstream kernel as these are nowadays replaced with upstream technologies such as CMA. The modem and ISSW reservations are necessary. This was manifested in a bug that surfaced in response to commit 7fef431be9c9 ("mm/page_alloc: place pages to tail in __free_pages_core()") which changes the behaviour of memory allocations in such a way that the platform will sooner run into these dangerous areas, with "Unhandled fault: imprecise external abort (0xc06) at 0xb6fd83dc" or similar: the real reason turns out to be that the PTE is pointing right into one of the reserved memory areas. We were just lucky until now. We need to augment the DB8500 and DB8520 SoCs similarly and also create a new include for the DB9500 used in the Snowball since this does not have a modem and thus does not need the modem memory reservation, albeit it needs the ISSW reservation. Signed-off-by: Linus Walleij Cc: stable@vger.kernel.org Cc: David Hildenbrand Link: https://lore.kernel.org/r/20201213225517.3838501-1-linus.walleij@linaro.org' Signed-off-by: Arnd Bergmann commit 2004e62a2a06b9029f7d728a0b5d19a499569184 Author: Nishanth Menon Date: Thu Jan 7 07:22:28 2021 -0600 arm64: defconfig: Drop unused K3 SoC specific options With [1] integrated and all users of the config symbols removed, we can safely remove the options from defconfig. [1] https://patchwork.kernel.org/project/linux-arm-kernel/patch/20201026170624.24241-1-nm@ti.com/ Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20210107132228.6577-1-nm@ti.com' Signed-off-by: Arnd Bergmann commit 1740e6736922cc1a5d061cc4240d08eacfbbaa71 Author: Sumera Priyadarsini Date: Tue Jan 12 10:25:49 2021 +0100 bus: arm-integrator-lm: Add of_node_put() before return statement Every iteration of for_each_available_child_of_node() decrements the reference count of the previous node, however when control is transferred from the middle of the loop, as in the case of a return or break or goto, there is no decrement thus ultimately resulting in a memory leak. Fix a potential memory leak in arm-integrator-lm.c by inserting of_node_put() before a return statement. Issue found with Coccinelle. Signed-off-by: Sumera Priyadarsini Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20200829174154.GA9319@Kaladin Link: https://lore.kernel.org/r/20210112092549.251548-1-linus.walleij@linaro.org' Signed-off-by: Arnd Bergmann commit 8880bf6de400346600cb334f236cce924558690f Merge: 7c53f6b671f4a 5a22747b76ca2 Author: Arnd Bergmann Date: Fri Jan 15 17:52:46 2021 +0100 Merge tag 'imx-fixes-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes i.MX fixes for 5.11: - Fix backlight pwm on imx6qdl-kontron-samx6i which is lost from #pwm-cells conversion. - Fix duplicated bus node name for i.MX8MN SoC. - Fix reset register offset on LS1028A SoC. - Rename MMC node aliases for imx6q-tbs2910 to keep the MMC device index consistent with previous kernel version. - Selecting ARM_GIC_V3 on non-CP15 processors to fix one build failure with i.MX8M SoC driver. - Fix typos with status property on imx6qdl-kontron-samx6i board. - Fix duplicated regulator-name on imx6qdl-gw52xx board. * tag 'imx-fixes-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: dts: imx6qdl-gw52xx: fix duplicate regulator naming ARM: dts: imx6qdl-kontron-samx6i: fix i2c_lcd/cam default status ARM: imx: fix imx8m dependencies ARM: dts: tbs2910: rename MMC node aliases arm64: dts: ls1028a: fix the offset of the reset register arm64: dts: imx8mn: Fix duplicate node name ARM: dts: imx6qdl-kontron-samx6i: fix pwms for lcd-backlight Link: https://lore.kernel.org/r/20210112131224.GI28365@dragon Signed-off-by: Arnd Bergmann commit da7e0c3c2909a3d9bf8acfe1db3cb213bd7febfb Author: JC Kuo Date: Fri Jan 15 18:19:07 2021 +0200 xhci: tegra: Delay for disabling LFPS detector Occasionally, we are seeing some SuperSpeed devices resumes right after being directed to U3. This commits add 500us delay to ensure LFPS detector is disabled before sending ACK to firmware. [ 16.099363] tegra-xusb 70090000.usb: entering ELPG [ 16.104343] tegra-xusb 70090000.usb: 2-1 isn't suspended: 0x0c001203 [ 16.114576] tegra-xusb 70090000.usb: not all ports suspended: -16 [ 16.120789] tegra-xusb 70090000.usb: entering ELPG failed The register write passes through a few flop stages of 32KHz clock domain. NVIDIA ASIC designer reviewed RTL and suggests 500us delay. Cc: stable@vger.kernel.org Signed-off-by: JC Kuo Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20210115161907.2875631-3-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 576667bad341516edc4e18eb85acb0a2b4c9c9d9 Author: Mathias Nyman Date: Fri Jan 15 18:19:06 2021 +0200 xhci: make sure TRB is fully written before giving it to the controller Once the command ring doorbell is rung the xHC controller will parse all command TRBs on the command ring that have the cycle bit set properly. If the driver just started writing the next command TRB to the ring when hardware finished the previous TRB, then HW might fetch an incomplete TRB as long as its cycle bit set correctly. A command TRB is 16 bytes (128 bits) long. Driver writes the command TRB in four 32 bit chunks, with the chunk containing the cycle bit last. This does however not guarantee that chunks actually get written in that order. This was detected in stress testing when canceling URBs with several connected USB devices. Two consecutive "Set TR Dequeue pointer" commands got queued right after each other, and the second one was only partially written when the controller parsed it, causing the dequeue pointer to be set to bogus values. This was seen as error messages: "Mismatch between completed Set TR Deq Ptr command & xHCI internal state" Solution is to add a write memory barrier before writing the cycle bit. Cc: Tested-by: Ross Zwisler Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20210115161907.2875631-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit c28095bc99073ddda65e4f31f6ae0d908d4d5cd8 Author: Thinh Nguyen Date: Thu Jan 14 00:09:51 2021 -0800 usb: udc: core: Use lock when write to soft_connect Use lock to guard against concurrent access for soft-connect/disconnect operations when writing to soft_connect sysfs. Fixes: 2ccea03a8f7e ("usb: gadget: introduce UDC Class") Cc: stable@vger.kernel.org Acked-by: Felipe Balbi Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/338ea01fbd69b1985ef58f0f59af02c805ddf189.1610611437.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman commit 4d163ad79b155c71bf30366dc38f8d2502f78844 Author: Michael Hennerich Date: Thu Jan 14 17:42:17 2021 +0200 spi: cadence: cache reference clock rate during probe The issue is that using SPI from a callback under the CCF lock will deadlock, since this code uses clk_get_rate(). Fixes: c474b38665463 ("spi: Add driver for Cadence SPI controller") Signed-off-by: Michael Hennerich Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210114154217.51996-1-alexandru.ardelean@analog.com Signed-off-by: Mark Brown commit b503087445ce7e45fabdee87ca9e460d5b5b5168 Author: Peter Collingbourne Date: Thu Jan 14 12:14:05 2021 -0800 mmc: core: don't initialize block size from ext_csd if not present If extended CSD was not available, the eMMC driver would incorrectly set the block size to 0, as the data_sector_size field of ext_csd was never initialized. This issue was exposed by commit 817046ecddbc ("block: Align max_hw_sectors to logical blocksize") which caused max_sectors and max_hw_sectors to be set to 0 after setting the block size to 0, resulting in a kernel panic in bio_split when attempting to read from the device. Fix it by only reading the block size from ext_csd if it is available. Fixes: a5075eb94837 ("mmc: block: Allow disabling 512B sector size emulation") Signed-off-by: Peter Collingbourne Reviewed-by: Damien Le Moal Link: https://linux-review.googlesource.com/id/If244d178da4d86b52034459438fec295b02d6e60 Acked-by: Adrian Hunter Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210114201405.2934886-1-pcc@google.com Signed-off-by: Ulf Hansson commit eda080eabf5b9555e4d574ba035b0cb8aa42f052 Author: Tony Lindgren Date: Fri Jan 15 10:47:17 2021 +0200 drivers: bus: simple-pm-bus: Fix compatibility with simple-bus for auxdata After converting am335x to probe devices with simple-pm-bus I noticed that we are not passing auxdata for of_platform_populate() like we do with simple-bus. While device tree using SoCs should no longer need platform data, there are still quite a few drivers that still need it as can be seen with git grep OF_DEV_AUXDATA. We want to have simple-pm-bus be usable as a replacement for simple-bus also for cases where OF_DEV_AUXDATA is still needed. Let's fix the issue by passing auxdata as platform data to simple-pm-bus. That way the SoCs needing this can pass the auxdata with OF_DEV_AUXDATA. And let's pass the auxdata for omaps to fix the issue for am335x. As an alternative solution, adding simple-pm-bus handling directly to drivers/of/platform.c was considered, but we would still need simple-pm-bus device driver. So passing auxdata as platform data seems like the simplest solution. Fixes: 5a230524f879 ("ARM: dts: Use simple-pm-bus for genpd for am3 l4_wkup") Acked-by: Arnd Bergmann Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven Signed-off-by: Tony Lindgren commit 2a39af3870e99304df81d2a4058408d68efb02e0 Author: Tony Lindgren Date: Fri Jan 15 10:06:12 2021 +0200 ARM: OMAP2+: Fix booting for am335x after moving to simple-pm-bus We now depend on SIMPLE_PM_BUS for probing devices. While we have it selected in omap2plus_defconfig, custom configs can fail if it's missing. As SIMPLE_PM_BUS depends on OF and PM, we must now select PM in Kconfig. We have already OF selected by ARCH_MULTIPLATFORM. Let's also drop the earlier PM dependency entries as suggested by Geert Uytterhoeven . Reported-by: Geert Uytterhoeven Reported-by: Matti Vaittinen Fixes: 5a230524f879 ("ARM: dts: Use simple-pm-bus for genpd for am3 l4_wkup") Signed-off-by: Tony Lindgren commit 715a1284d89a740b197b3bad5eb20d36a397382f Merge: 181739822cf6f 06862d789ddde Author: Tony Lindgren Date: Fri Jan 15 12:48:43 2021 +0200 Merge branch 'cpuidle-fix' into fixes commit 06862d789ddde8a99c1e579e934ca17c15a84755 Author: Tony Lindgren Date: Sun Jan 10 21:09:11 2021 +0200 ARM: OMAP2+: Fix suspcious RCU usage splats for omap_enter_idle_coupled We get suspcious RCU usage splats with cpuidle in several places in omap_enter_idle_coupled() with the kernel debug options enabled: RCU used illegally from extended quiescent state! ... (_raw_spin_lock_irqsave) (omap_enter_idle_coupled+0x17c/0x2d8) (omap_enter_idle_coupled) (cpuidle_enter_state) (cpuidle_enter_state_coupled) (cpuidle_enter) Let's use RCU_NONIDLE to suppress these splats. Things got changed around with commit 1098582a0f6c ("sched,idle,rcu: Push rcu_idle deeper into the idle path") that started triggering these warnings. For the tick_broadcast related calls, ideally we'd just switch over to using CPUIDLE_FLAG_TIMER_STOP for omap_enter_idle_coupled() to have the generic cpuidle code handle the tick_broadcast related calls for us and then just drop the tick_broadcast calls here. But we're currently missing the call in the common cpuidle code for tick_broadcast_enable() that CPU1 hotplug needs as described in earlier commit 50d6b3cf9403 ("ARM: OMAP2+: fix lack of timer interrupts on CPU1 after hotplug"). Cc: Daniel Lezcano Cc: Paul E. McKenney Cc: Russell King Acked-by: Paul E. McKenney Signed-off-by: Tony Lindgren commit 89ccf18f032f26946e2ea6258120472eec6aa745 Author: John Ogness Date: Wed Jan 13 17:50:13 2021 +0106 printk: fix kmsg_dump_get_buffer length calulations kmsg_dump_get_buffer() uses @syslog to determine if the syslog prefix should be written to the buffer. However, when calculating the maximum number of records that can fit into the buffer, it always counts the bytes from the syslog prefix. Use @syslog when calculating the maximum number of records that can fit into the buffer. Fixes: e2ae715d66bf ("kmsg - kmsg_dump() use iterator to receive log buffer content") Signed-off-by: John Ogness Reviewed-by: Petr Mladek Acked-by: Sergey Senozhatsky Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210113164413.1599-1-john.ogness@linutronix.de commit 668af87f995b6d6d09595c088ad1fb5dd9ff25d2 Author: John Ogness Date: Wed Jan 13 15:48:34 2021 +0106 printk: ringbuffer: fix line counting Counting text lines in a record simply involves counting the number of newline characters (+1). However, it is searching the full data block for newline characters, even though the text data can be (and often is) a subset of that area. Since the extra area in the data block was never initialized, the result is that extra newlines may be seen and counted. Restrict newline searching to the text data length. Fixes: b6cf8b3f3312 ("printk: add lockless ringbuffer") Signed-off-by: John Ogness Reviewed-by: Petr Mladek Acked-by: Sergey Senozhatsky Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210113144234.6545-1-john.ogness@linutronix.de commit f84d3a1ec375e46a55cc3ba85c04272b24bd3921 Author: Kai-Chuan Hsieh Date: Fri Jan 15 11:15:15 2021 +0800 ALSA: hda: Add Cometlake-R PCI ID Add HD Audio Device PCI ID for the Intel Cometlake-R platform Reviewed-by: Kai Vehmanen Signed-off-by: Kai-Chuan Hsieh Link: https://lore.kernel.org/r/20210115031515.13100-1-kaichuan.hsieh@canonical.com Signed-off-by: Takashi Iwai commit 3a57a643a851dbb1c4a1819394ca009e3bfa4813 Author: Mark Brown Date: Fri Jan 8 18:31:44 2021 +0000 arm64: selftests: Fix spelling of 'Mismatch' The SVE and FPSIMD stress tests have a spelling mistake in the output, fix it. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20210108183144.673-1-broonie@kernel.org Signed-off-by: Catalin Marinas commit b6d8878d24e39f213df0f3ea7abebd15edc7be21 Author: Mark Rutland Date: Thu Jan 14 12:48:12 2021 +0000 arm64: syscall: include prototype for EL0 SVC functions The kbuild test robot reports that when building with W=1, GCC will warn for a couple of missing prototypes in syscall.c: | arch/arm64/kernel/syscall.c:157:6: warning: no previous prototype for 'do_el0_svc' [-Wmissing-prototypes] | 157 | void do_el0_svc(struct pt_regs *regs) | | ^~~~~~~~~~ | arch/arm64/kernel/syscall.c:164:6: warning: no previous prototype for 'do_el0_svc_compat' [-Wmissing-prototypes] | 164 | void do_el0_svc_compat(struct pt_regs *regs) | | ^~~~~~~~~~~~~~~~~ While this isn't a functional problem, as a general policy we should include the prototype for functions wherever possible to catch any accidental divergence between the prototype and implementation. Here we can easily include , so let's do so. While there are a number of warnings elsewhere and some warnings enabled under W=1 are of questionable benefit, this change helps to make the code more robust as it evolved and reduces the noise somewhat, so it seems worthwhile. Signed-off-by: Mark Rutland Reported-by: kernel test robot Cc: Will Deacon Link: https://lore.kernel.org/r/202101141046.n8iPO3mw-lkp@intel.com Link: https://lore.kernel.org/r/20210114124812.17754-1-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit dca5244d2f5b94f1809f0c02a549edf41ccd5493 Author: Will Deacon Date: Tue Jan 12 22:48:32 2021 +0000 compiler.h: Raise minimum version of GCC to 5.1 for arm64 GCC versions >= 4.9 and < 5.1 have been shown to emit memory references beyond the stack pointer, resulting in memory corruption if an interrupt is taken after the stack pointer has been adjusted but before the reference has been executed. This leads to subtle, infrequent data corruption such as the EXT4 problems reported by Russell King at the link below. Life is too short for buggy compilers, so raise the minimum GCC version required by arm64 to 5.1. Reported-by: Russell King Suggested-by: Arnd Bergmann Signed-off-by: Will Deacon Tested-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Reviewed-by: Nathan Chancellor Acked-by: Linus Torvalds Cc: Cc: Theodore Ts'o Cc: Florian Weimer Cc: Peter Zijlstra Cc: Nick Desaulniers Link: https://lore.kernel.org/r/20210105154726.GD1551@shell.armlinux.org.uk Link: https://lore.kernel.org/r/20210112224832.10980-1-will@kernel.org Signed-off-by: Catalin Marinas commit 217bfbb8b0bfa24619b11ab75c135fec99b99b20 Author: Takashi Iwai Date: Fri Jan 15 10:34:28 2021 +0100 ALSA: seq: oss: Fix missing error check in snd_seq_oss_synth_make_info() snd_seq_oss_synth_make_info() didn't check the error code from snd_seq_oss_midi_make_info(), and this leads to the call of strlcpy() with the uninitialized string as the source, which may lead to the access over the limit. Add the proper error check for avoiding the failure. Reported-by: syzbot+e42504ff21cff05a595f@syzkaller.appspotmail.com Cc: Link: https://lore.kernel.org/r/20210115093428.15882-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit a1bfb0ccf94dc79223d0db0d50237d3b3898f0b2 Merge: 7c53f6b671f4a b8653aff1c887 Author: Greg Kroah-Hartman Date: Fri Jan 15 08:16:35 2021 +0100 Merge tag 'iio-fixes-for-5.11a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus Jonathan writes: First set of IIO and counter fixes for the 5.11 cycle. Counter fixes ti,eqep - Remove floor interface as the device always wraps to 0. IIO adi,ad5504 - Fix inverted power state control. bosch,bma255 - Fix a difference in part naming between dt-binding doc and the driver. melexis,mlx90632 - Add a delay after reset command. semtech,sx9310 - Off by one error. - Fix an issue due to need to skip a value in a power of 2 series. st,st_sensors - Fix a possible infinite loop if data read is not define or reading it fails. ti,am335x - Remove a left over iio_kfifo_free after managed allocation conversion. * tag 'iio-fixes-for-5.11a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: iio: sx9310: Fix semtech,avg-pos-strength setting when > 16 iio: common: st_sensors: fix possible infinite loop in st_sensors_irq_thread iio: ad5504: Fix setting power-down state counter:ti-eqep: remove floor drivers: iio: temperature: Add delay after the addressed reset command in mlx90632.c iio: adc: ti_am335x_adc: remove omitted iio_kfifo_free() dt-bindings: iio: accel: bma255: Fix bmc150/bmi055 compatible iio: sx9310: Off by one in sx9310_read_thresh() commit 584265dfec70e78ce2085b82ed389f27e06fbca0 Merge: c8f6364f35f32 8ef23b6f6a79e Author: Dave Airlie Date: Fri Jan 15 14:48:14 2021 +1000 Merge branch '04.01-ampere-lite' of git://github.com/skeggsb/linux into topic/nouveau-ampere-modeset This adds support for basic modeseting on the nvidia ampere chipsets. This code should all be contained to just those and have no effect on current hardware. Signed-off-by: Dave Airlie From: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/CACAvsv5LmMP+HbDUQBf_dy1-0eS9fA32k8HWo4y5X4-7rsw-yw@mail.gmail.com commit 5ee88057889bbca5f5bb96031b62b3756b33e164 Merge: cdaed110311d4 c8f6364f35f32 Author: Linus Torvalds Date: Thu Jan 14 20:10:06 2021 -0800 Merge tag 'drm-fixes-2021-01-15' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Regular fixes for rc4, a bunch of fixes across i915, amdgpu and nouveau here, along with a couple of TTM fixes, and dma-buf and one core pageflip/modifier interaction fix. One notable i915 fix is a HSW GT1 regression fix that has been outstanding for quite a while. (Thanks to Matt Turner for kicking Intel into getting it fixed). dma-buf: - Fix a memory leak in CMAV heap core: - Fix format check for legacy pageflips ttm: - Pass correct address to dma_mapping_error() - Use mutex in pool shrinker i915: - Allow the sysadmin to override security mitigations - Restore clear-residual mitigations for ivb/byt - Limit VFE threads based on GT - GVT: fix vfio edid and full display detection - Fix DSI DSC power refcounting - Fix LPT CPU mode backlight takeover - Disable RPM wakeref assertions during driver shutdown - Fix DSI sequence sleeps amdgpu: - Update repo location in MAINTAINERS - Add some new renoir PCI IDs - Revert CRC UAPI changes - Revert OLED display fix which cases clocking problems for some systems - Misc vangogh fixes - GFX fix for sienna cichlid - DCN1.0 fix for pipe split - Fix incorrect PSP command amdkfd: - Fix possible out of bounds read in vcrat creation nouveau: - irq handling fix - expansion ROM fix - hw init dpcd disable - aux semaphore owner field fix - vram heap sizing fix - notifier at 0 is valid fix" * tag 'drm-fixes-2021-01-15' of git://anongit.freedesktop.org/drm/drm: (37 commits) drm/nouveau/kms/nv50-: fix case where notifier buffer is at offset 0 drm/nouveau/mmu: fix vram heap sizing drm/nouveau/i2c/gm200: increase width of aux semaphore owner fields drm/nouveau/i2c/gk110-: disable hw-initiated dpcd reads drm/nouveau/i2c/gk110: split out from i2c/gk104 drm/nouveau/privring: ack interrupts the same way as RM drm/nouveau/bios: fix issue shadowing expansion ROMs drm/amd/display: Fix to be able to stop crc calculation Revert "drm/amd/display: Expose new CRC window property" Revert "drm/amdgpu/disply: fix documentation warnings in display manager" Revert "drm/amd/display: Fix unused variable warning" drm/amdgpu: set power brake sequence drm/amdgpu: add new device id for Renior drm/amdgpu: add green_sardine device id (v2) drm/amdgpu: fix vram type and bandwidth error for DDR5 and DDR4 drm/amdgpu/gfx10: add updated GOLDEN_TSC_COUNT_UPPER/LOWER register offsets for VGH drm/amdkfd: Fix out-of-bounds read in kdf_create_vcrat_image_cpu() Revert "drm/amd/display: Fixed Intermittent blue screen on OLED panel" drm/amd/display: disable dcn10 pipe split by default drm/amd/display: Add a missing DCN3.01 API mapping ... commit cdaed110311d45cdbefbb9a23a2d1774717b7b71 Merge: 146620506274b 55ed4560774d8 Author: Linus Torvalds Date: Thu Jan 14 20:06:29 2021 -0800 Merge tag 'trace-v5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull bootconfig fix from Steven Rostedt: "Update bootconf scripts for tracing_on option The tracing_on option is supported by bootconfig entries, but the scripts to convert from ftrace to a bootconfig and back were not updated" * tag 'trace-v5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tools/bootconfig: Add tracing_on support to helper scripts commit c8f6364f35f32786dd40336cfa35b9166d91b8ab Merge: 8e1095901deaa caeb6ab899c3d Author: Dave Airlie Date: Fri Jan 15 13:17:54 2021 +1000 Merge branch '04.00-ampere-lite-fixes' of git://github.com/skeggsb/linux into drm-fixes As requested, here's a tree with the non-Ampere-specific fixes split out, as most of them are potentially relevant to already-supported GPUs. - irq handling fix - expansion ROM fix - hw init dpcd disable - aux semaphore owner field fix - vram heap sizing fix - notifier at 0 is valid fix Signed-off-by: Dave Airlie From: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/CACAvsv4P90mcF_ByAh+ghz+ZVD2N2bPbD7xHYYArE1kYrvsGcQ@mail.gmail.com commit 764907293edc1af7ac857389af9dc858944f53dc Author: Brian King Date: Tue Jan 12 09:06:38 2021 -0600 scsi: ibmvfc: Set default timeout to avoid crash during migration While testing live partition mobility, we have observed occasional crashes of the Linux partition. What we've seen is that during the live migration, for specific configurations with large amounts of memory, slow network links, and workloads that are changing memory a lot, the partition can end up being suspended for 30 seconds or longer. This resulted in the following scenario: CPU 0 CPU 1 ------------------------------- ---------------------------------- scsi_queue_rq migration_store -> blk_mq_start_request -> rtas_ibm_suspend_me -> blk_add_timer -> on_each_cpu(rtas_percpu_suspend_me _______________________________________V | V -> IPI from CPU 1 -> rtas_percpu_suspend_me -> __rtas_suspend_last_cpu -- Linux partition suspended for > 30 seconds -- -> for_each_online_cpu(cpu) plpar_hcall_norets(H_PROD -> scsi_dispatch_cmd -> scsi_times_out -> scsi_abort_command -> queue_delayed_work -> ibmvfc_queuecommand_lck -> ibmvfc_send_event -> ibmvfc_send_crq - returns H_CLOSED <- returns SCSI_MLQUEUE_HOST_BUSY -> __blk_mq_requeue_request -> scmd_eh_abort_handler -> scsi_try_to_abort_cmd - returns SUCCESS -> scsi_queue_insert Normally, the SCMD_STATE_COMPLETE bit would protect against the command completion and the timeout, but that doesn't work here, since we don't check that at all in the SCSI_MLQUEUE_HOST_BUSY path. In this case we end up calling scsi_queue_insert on a request that has already been queued, or possibly even freed, and we crash. The patch below simply increases the default I/O timeout to avoid this race condition. This is also the timeout value that nearly all IBM SAN storage recommends setting as the default value. Link: https://lore.kernel.org/r/1610463998-19791-1-git-send-email-brking@linux.vnet.ibm.com Signed-off-by: Brian King Signed-off-by: Martin K. Petersen commit 780e1384687d6ecdee9ca789a1027610484ac8a2 Author: Shin'ichiro Kawasaki Date: Wed Jan 13 11:45:08 2021 +0900 scsi: target: tcmu: Fix use-after-free of se_cmd->priv Commit a35129024e88 ("scsi: target: tcmu: Use priv pointer in se_cmd") modified tcmu_free_cmd() to set NULL to priv pointer in se_cmd. However, se_cmd can be already freed by work queue triggered in target_complete_cmd(). This caused BUG KASAN use-after-free [1]. To fix the bug, do not touch priv pointer in tcmu_free_cmd(). Instead, set NULL to priv pointer before target_complete_cmd() calls. Also, to avoid unnecessary priv pointer change in tcmu_queue_cmd(), modify priv pointer in the function only when tcmu_free_cmd() is not called. [1] BUG: KASAN: use-after-free in tcmu_handle_completions+0x1172/0x1770 [target_core_user] Write of size 8 at addr ffff88814cf79a40 by task cmdproc-uio0/14842 CPU: 2 PID: 14842 Comm: cmdproc-uio0 Not tainted 5.11.0-rc2 #1 Hardware name: Supermicro Super Server/X10SRL-F, BIOS 3.2 11/22/2019 Call Trace: dump_stack+0x9a/0xcc ? tcmu_handle_completions+0x1172/0x1770 [target_core_user] print_address_description.constprop.0+0x18/0x130 ? tcmu_handle_completions+0x1172/0x1770 [target_core_user] ? tcmu_handle_completions+0x1172/0x1770 [target_core_user] kasan_report.cold+0x7f/0x10e ? tcmu_handle_completions+0x1172/0x1770 [target_core_user] tcmu_handle_completions+0x1172/0x1770 [target_core_user] ? queue_tmr_ring+0x5d0/0x5d0 [target_core_user] tcmu_irqcontrol+0x28/0x60 [target_core_user] uio_write+0x155/0x230 ? uio_vma_fault+0x460/0x460 ? security_file_permission+0x4f/0x440 vfs_write+0x1ce/0x860 ksys_write+0xe9/0x1b0 ? __ia32_sys_read+0xb0/0xb0 ? syscall_enter_from_user_mode+0x27/0x70 ? trace_hardirqs_on+0x1c/0x110 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7fcf8b61905f Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 b9 fc ff ff 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 44 24 08 e8 0c fd ff ff 48 RSP: 002b:00007fcf7b3e6c30 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fcf8b61905f RDX: 0000000000000004 RSI: 00007fcf7b3e6c78 RDI: 000000000000000c RBP: 00007fcf7b3e6c80 R08: 0000000000000000 R09: 00007fcf7b3e6aa8 R10: 000000000b01c000 R11: 0000000000000293 R12: 00007ffe0c32a52e R13: 00007ffe0c32a52f R14: 0000000000000000 R15: 00007fcf7b3e7640 Allocated by task 383: kasan_save_stack+0x1b/0x40 ____kasan_kmalloc.constprop.0+0x84/0xa0 kmem_cache_alloc+0x142/0x330 tcm_loop_queuecommand+0x2a/0x4e0 [tcm_loop] scsi_queue_rq+0x12ec/0x2d20 blk_mq_dispatch_rq_list+0x30a/0x1db0 __blk_mq_do_dispatch_sched+0x326/0x830 __blk_mq_sched_dispatch_requests+0x2c8/0x3f0 blk_mq_sched_dispatch_requests+0xca/0x120 __blk_mq_run_hw_queue+0x93/0xe0 process_one_work+0x7b6/0x1290 worker_thread+0x590/0xf80 kthread+0x362/0x430 ret_from_fork+0x22/0x30 Freed by task 11655: kasan_save_stack+0x1b/0x40 kasan_set_track+0x1c/0x30 kasan_set_free_info+0x20/0x30 ____kasan_slab_free+0xec/0x120 slab_free_freelist_hook+0x53/0x160 kmem_cache_free+0xf4/0x5c0 target_release_cmd_kref+0x3ea/0x9e0 [target_core_mod] transport_generic_free_cmd+0x28b/0x2f0 [target_core_mod] target_complete_ok_work+0x250/0xac0 [target_core_mod] process_one_work+0x7b6/0x1290 worker_thread+0x590/0xf80 kthread+0x362/0x430 ret_from_fork+0x22/0x30 Last potentially related work creation: kasan_save_stack+0x1b/0x40 kasan_record_aux_stack+0xa3/0xb0 insert_work+0x48/0x2e0 __queue_work+0x4e8/0xdf0 queue_work_on+0x78/0x80 tcmu_handle_completions+0xad0/0x1770 [target_core_user] tcmu_irqcontrol+0x28/0x60 [target_core_user] uio_write+0x155/0x230 vfs_write+0x1ce/0x860 ksys_write+0xe9/0x1b0 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Second to last potentially related work creation: kasan_save_stack+0x1b/0x40 kasan_record_aux_stack+0xa3/0xb0 insert_work+0x48/0x2e0 __queue_work+0x4e8/0xdf0 queue_work_on+0x78/0x80 tcm_loop_queuecommand+0x1c3/0x4e0 [tcm_loop] scsi_queue_rq+0x12ec/0x2d20 blk_mq_dispatch_rq_list+0x30a/0x1db0 __blk_mq_do_dispatch_sched+0x326/0x830 __blk_mq_sched_dispatch_requests+0x2c8/0x3f0 blk_mq_sched_dispatch_requests+0xca/0x120 __blk_mq_run_hw_queue+0x93/0xe0 process_one_work+0x7b6/0x1290 worker_thread+0x590/0xf80 kthread+0x362/0x430 ret_from_fork+0x22/0x30 The buggy address belongs to the object at ffff88814cf79800 which belongs to the cache tcm_loop_cmd_cache of size 896. Link: https://lore.kernel.org/r/20210113024508.1264992-1-shinichiro.kawasaki@wdc.com Fixes: a35129024e88 ("scsi: target: tcmu: Use priv pointer in se_cmd") Cc: stable@vger.kernel.org # v5.9+ Acked-by: Bodo Stroesser Signed-off-by: Shin'ichiro Kawasaki Signed-off-by: Martin K. Petersen commit dec822771b0174a01e72d7641d08e44461b6a82f Author: Kefeng Wang Date: Thu Jan 14 10:46:57 2021 +0800 riscv: stacktrace: Move register keyword to beginning of declaration Using global sp_in_global directly to fix the following warning, arch/riscv/kernel/stacktrace.c:31:3: warning: ‘register’ is not at beginning of declaration [-Wold-style-declaration] 31 | const register unsigned long current_sp = sp_in_global; | ^~~~~ Signed-off-by: Kefeng Wang Signed-off-by: Palmer Dabbelt commit 8e1095901deaa2ed4f243388b776d003ab945d8c Merge: 667d11dcd6611 2f0fa789f7b9f Author: Dave Airlie Date: Fri Jan 15 11:56:21 2021 +1000 Merge tag 'amd-drm-fixes-5.11-2021-01-14' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-5.11-2021-01-14: amdgpu: - Update repo location in MAINTAINERS - Add some new renoir PCI IDs - Revert CRC UAPI changes - Revert OLED display fix which cases clocking problems for some systems - Misc vangogh fixes - GFX fix for sienna cichlid - DCN1.0 fix for pipe split - Fix incorrect PSP command amdkfd: - Fix possible out of bounds read in vcrat creation Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210114201354.3998-1-alexander.deucher@amd.com commit 667d11dcd661103944f34a790363aee196002e7f Merge: 61502e3bb9820 984cadea032b1 Author: Dave Airlie Date: Fri Jan 15 11:47:04 2021 +1000 Merge tag 'drm-intel-fixes-2021-01-14' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes drm/i915 fixes for v5.11-rc4: - Allow the sysadmin to override security mitigations - Restore clear-residual mitigations for ivb/byt - Limit VFE threads based on GT - GVT: fix vfio edid and full display detection - Fix DSI DSC power refcounting - Fix LPT CPU mode backlight takeover - Disable RPM wakeref assertions during driver shutdown - Fix DSI sequence sleeps Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87sg73pz42.fsf@intel.com commit 8ef23b6f6a79e6fa2a169081d2d76011fffa0482 Author: Ben Skeggs Date: Wed Jan 13 17:12:52 2021 +1000 drm/nouveau/disp/ga10[24]: initial support UEFI/RM no longer use IED scripts from the VBIOS, though they appear to have been updated for use by the x86 VBIOS code, so we should be able to continue using them for the moment. Unfortunately, we require some hacks to do so, as the BeforeLinkTraining IED script became a pointer to an array of scripts instead, without a revbump of the relevant tables. There's also some changes to SOR clock divider fiddling, which are hopefully correct enough that things work as they should. AFAIK, GA100 shouldn't have display, so it hasn't been added. Signed-off-by: Ben Skeggs commit a6cf0320aad0c69a6b558dd41d3cb6891a6c9872 Author: Ben Skeggs Date: Wed Jan 13 17:12:52 2021 +1000 drm/nouveau/dmaobj/ga10[24]: initial support Appears to be compatible with GV100 code, and not required on GA100, as it shouldn't have display. Signed-off-by: Ben Skeggs commit 8a0412265f06490d93724bf8badf220180790ad1 Author: Ben Skeggs Date: Wed Jan 13 17:12:52 2021 +1000 drm/nouveau/i2c/ga10[024]: initial support Appears to be compatible with GM200 code. Signed-off-by: Ben Skeggs commit c28efb15f9e51a96c6bce2b92c0f3a4da87db877 Author: Ben Skeggs Date: Wed Jan 13 17:12:52 2021 +1000 drm/nouveau/gpio/ga10[024]: initial support GA100 appears to be compatible with GK104 code, the others have some register moves. Signed-off-by: Ben Skeggs commit f5cbe7c8bd1ac6f8c91179de381e10ee5f0f8809 Author: Ben Skeggs Date: Wed Jan 13 17:12:52 2021 +1000 drm/nouveau/bar/ga10[024]: initial support Appears to be compatible with TU102 code. Signed-off-by: Ben Skeggs commit a3abc23ac40111c76708119013d63451169e7838 Author: Ben Skeggs Date: Wed Jan 13 17:12:52 2021 +1000 drm/nouveau/mmu/ga10[024]: initial support Appears to be compatible with TU102 code. Signed-off-by: Ben Skeggs commit 6f300e0a0ba8873f1225959089f8bb2897d93ec6 Author: Ben Skeggs Date: Wed Jan 13 17:12:52 2021 +1000 drm/nouveau/timer/ga10[024]: initial support Appears to be compatible with GK20A code. Signed-off-by: Ben Skeggs commit 41ba806f40a9a4c4f4c04a474bf368160f1baa2c Author: Ben Skeggs Date: Wed Jan 13 17:12:52 2021 +1000 drm/nouveau/fb/ga10[024]: initial support No VPR scrub. GA102 and GA104 have a new VRAM size detection method. Signed-off-by: Ben Skeggs commit de4781d0f22b54fdbe7ac459eb67b585ca3ee430 Author: Ben Skeggs Date: Wed Jan 13 17:12:52 2021 +1000 drm/nouveau/imem/ga10[024]: initial support Appears to be compatible with NV50 code. Signed-off-by: Ben Skeggs commit e0df4bbfc3365d7699e32bebb24647dc7a09b00c Author: Ben Skeggs Date: Wed Jan 13 17:12:52 2021 +1000 drm/nouveau/privring/ga10[024]: initial support Appears to be compatible with GM200 code. Signed-off-by: Ben Skeggs commit 5961c62d20753009408df4752e22991097386aa9 Author: Ben Skeggs Date: Wed Jan 13 17:12:52 2021 +1000 drm/nouveau/mc/ga10[024]: initial support Fortunately, all the interrupts we need to bring up basic display support are contained in a single leaf register, allowing this basic (but hackish) implementation. There's a bunch more invasive patches to come implementing all this in a better/more complete way, but trying to get a minimal series out first. Signed-off-by: Ben Skeggs commit 7ddf5e9597faa6f939370e294e0f6d9516d2a431 Author: Ben Skeggs Date: Wed Jan 13 17:12:52 2021 +1000 drm/nouveau/devinit/ga10[024]: initial support VPLL regs changed a bit. There's more stuff to do around these, but it's less invasive to stick those changes into disp for now. None of that belongs here anymore anyhow - fix that someday. Signed-off-by: Ben Skeggs commit a34632482f1ea768429a9d4c79a10d12f5093405 Author: Ben Skeggs Date: Wed Jan 13 17:12:52 2021 +1000 drm/nouveau/bios/ga10[024]: initial support Forcing PRAMIN-shadowing off for GA100, as it requires display, and we don't know if/where the fuse register for detecting its presence is. Signed-off-by: Ben Skeggs commit 70afbe4bdc0a7ccdb462a38216f5abc3db7e5c1b Author: Ben Skeggs Date: Wed Jan 13 17:12:52 2021 +1000 drm/nouveau/pci/ga10[024]: initial support Appears to be compatible with GP100 code. Signed-off-by: Ben Skeggs commit caeb6ab899c3d36a74cda6e299c6e1c9c4e2a22e Author: Ben Skeggs Date: Wed Jan 13 17:12:52 2021 +1000 drm/nouveau/kms/nv50-: fix case where notifier buffer is at offset 0 VRAM offset 0 is a valid address, triggered on GA102. Signed-off-by: Ben Skeggs commit 3b050680c84153d8e6f5ae3785922cd417f4b071 Author: Ben Skeggs Date: Wed Jan 13 17:12:52 2021 +1000 drm/nouveau/core: recognise GA10[024] GA100 hidden behind a module option, as it's not been as well verified since initial bring-up and may need additional changes. There's no display anyway, so this can wait for a bit. Signed-off-by: Ben Skeggs commit add42781ad76c5ae65127bf13852a4c6b2f08849 Author: Ben Skeggs Date: Wed Jan 13 17:12:52 2021 +1000 drm/nouveau/mmu: fix vram heap sizing Signed-off-by: Ben Skeggs commit ba6e9ab0fcf3d76e3952deb12b5f993991621d9c Author: Ben Skeggs Date: Wed Jan 13 17:12:52 2021 +1000 drm/nouveau/i2c/gm200: increase width of aux semaphore owner fields Noticed while debugging GA102. Signed-off-by: Ben Skeggs commit 8ad95edc39100c22c29ab1d2588332b99f387c8e Author: Ben Skeggs Date: Wed Jan 13 17:12:52 2021 +1000 drm/nouveau/i2c/gk110-: disable hw-initiated dpcd reads RM does this around transactions, and it seemed to help while debugging AUXCH issues on GA102. Signed-off-by: Ben Skeggs commit b5510d1e21d80e2fa2286468ca8c2922f5895ef8 Author: Ben Skeggs Date: Wed Jan 13 17:12:52 2021 +1000 drm/nouveau/i2c/gk110: split out from i2c/gk104 No functional changes here yet. Signed-off-by: Ben Skeggs commit e05e06cd34f5311f677294a08b609acfbc315236 Author: Ben Skeggs Date: Wed Jan 13 17:12:52 2021 +1000 drm/nouveau/privring: ack interrupts the same way as RM Whatever it is that we were doing before doesn't work on Ampere. Signed-off-by: Ben Skeggs commit 402a89660e9dc880710b12773076a336c9dab3d7 Author: Ben Skeggs Date: Wed Jan 13 17:12:52 2021 +1000 drm/nouveau/bios: fix issue shadowing expansion ROMs This issue has generally been covered up by the presence of additional expansion ROMs after the ones we're interested in, with header fetches of subsequent images loading enough of the ROM to hide the issue. Noticed on GA102, which lacks a type 0x70 image compared to TU102,. [ 906.364197] nouveau 0000:09:00.0: bios: 00000000: type 00, 65024 bytes [ 906.381205] nouveau 0000:09:00.0: bios: 0000fe00: type 03, 91648 bytes [ 906.405213] nouveau 0000:09:00.0: bios: 00026400: type e0, 22016 bytes [ 906.410984] nouveau 0000:09:00.0: bios: 0002ba00: type e0, 366080 bytes vs [ 22.961901] nouveau 0000:09:00.0: bios: 00000000: type 00, 60416 bytes [ 22.984174] nouveau 0000:09:00.0: bios: 0000ec00: type 03, 71168 bytes [ 23.010446] nouveau 0000:09:00.0: bios: 00020200: type e0, 48128 bytes [ 23.028220] nouveau 0000:09:00.0: bios: 0002be00: type e0, 140800 bytes [ 23.080196] nouveau 0000:09:00.0: bios: 0004e400: type 70, 7168 bytes Signed-off-by: Ben Skeggs commit 61502e3bb9820003a530e1b05d2e831e95cfbc4d Merge: 7c53f6b671f4a bb52cb0dec8d2 Author: Dave Airlie Date: Fri Jan 15 10:16:40 2021 +1000 Merge tag 'drm-misc-fixes-2021-01-12' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Short summary of fixes pull: * dma-buf: Fix a memory leak in CMAV heap * drm: Fix format check for legacy pageflips * ttm: Pass correct address to dma_mapping_error(); Use mutex in pool shrinker Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/X/2iXO4ofFSZ39/v@linux-uq9g commit b4f664252f51e119e9403ef84b6e9ff36d119510 Merge: 5342fd4255021 5ab25a32cd90c Author: Jens Axboe Date: Thu Jan 14 15:17:33 2021 -0700 Merge tag 'nvme-5.11-2021-01-14' of git://git.infradead.org/nvme into block-5.11 Pull NVMe fixes from Christoph: "nvme fixes for 5.11: - don't initialize hwmon for discover controllers (Sagi Grimberg) - fix iov_iter handling in nvme-tcp (Sagi Grimberg) - fix a preempt warning in nvme-tcp (Sagi Grimberg) - fix a possible NULL pointer dereference in nvme (Israel Rukshin)" * tag 'nvme-5.11-2021-01-14' of git://git.infradead.org/nvme: nvme: don't intialize hwmon for discovery controllers nvme-tcp: fix possible data corruption with bio merges nvme-tcp: Fix warning with CONFIG_DEBUG_PREEMPT nvmet-rdma: Fix NULL deref when setting pi_enable and traddr INADDR_ANY commit 146620506274bd24d52fb1c589110a30eed8240b Merge: e8c13a6bc8ebb 7a6eb7c34a784 Author: Linus Torvalds Date: Thu Jan 14 13:54:09 2021 -0800 Merge tag 'linux-kselftest-fixes-5.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kselftest fixes from Shuah Khan: "One single fix to skip BPF selftests by default. BPF selftests have a hard dependency on cutting edge versions of tools in the BPF ecosystem including LLVM. Skipping BPF allows by default will make it easier for users interested in running kselftest as a whole. Users can include BPF in Kselftest build by via SKIP_TARGETS variable" * tag 'linux-kselftest-fixes-5.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests: Skip BPF seftests by default commit e8c13a6bc8ebbef7bd099ec1061633d1c9c94d5b Merge: 2bbe17ae87938 13a9499e83338 Author: Linus Torvalds Date: Thu Jan 14 13:31:07 2021 -0800 Merge tag 'net-5.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "We have a few fixes for long standing issues, in particular Eric's fix to not underestimate the skb sizes, and my fix for brokenness of register_netdevice() error path. They may uncover other bugs so we will keep an eye on them. Also included are Willem's fixes for kmap(_atomic). Looking at the "current release" fixes, it seems we are about one rc behind a normal cycle. We've previously seen an uptick of "people had run their test suites" / "humans actually tried to use new features" fixes between rc2 and rc3. Summary: Current release - regressions: - fix feature enforcement to allow NETIF_F_HW_TLS_TX if IP_CSUM && IPV6_CSUM - dcb: accept RTM_GETDCB messages carrying set-like DCB commands if user is admin for backward-compatibility - selftests/tls: fix selftests build after adding ChaCha20-Poly1305 Current release - always broken: - ppp: fix refcount underflow on channel unbridge - bnxt_en: clear DEFRAG flag in firmware message when retry flashing - smc: fix out of bound access in the new netlink interface Previous releases - regressions: - fix use-after-free with UDP GRO by frags - mptcp: better msk-level shutdown - rndis_host: set proper input size for OID_GEN_PHYSICAL_MEDIUM request - i40e: xsk: fix potential NULL pointer dereferencing Previous releases - always broken: - skb frag: kmap_atomic fixes - avoid 32 x truesize under-estimation for tiny skbs - fix issues around register_netdevice() failures - udp: prevent reuseport_select_sock from reading uninitialized socks - dsa: unbind all switches from tree when DSA master unbinds - dsa: clear devlink port type before unregistering slave netdevs - can: isotp: isotp_getname(): fix kernel information leak - mlxsw: core: Thermal control fixes - ipv6: validate GSO SKB against MTU before finish IPv6 processing - stmmac: use __napi_schedule() for PREEMPT_RT - net: mvpp2: remove Pause and Asym_Pause support Misc: - remove from MAINTAINERS folks who had been inactive for >5yrs" * tag 'net-5.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (58 commits) mptcp: fix locking in mptcp_disconnect() net: Allow NETIF_F_HW_TLS_TX if IP_CSUM && IPV6_CSUM MAINTAINERS: dccp: move Gerrit Renker to CREDITS MAINTAINERS: ipvs: move Wensong Zhang to CREDITS MAINTAINERS: tls: move Aviad to CREDITS MAINTAINERS: ena: remove Zorik Machulsky from reviewers MAINTAINERS: vrf: move Shrijeet to CREDITS MAINTAINERS: net: move Alexey Kuznetsov to CREDITS MAINTAINERS: altx: move Jay Cliburn to CREDITS net: avoid 32 x truesize under-estimation for tiny skbs nt: usb: USB_RTL8153_ECM should not default to y net: stmmac: fix taprio configuration when base_time is in the past net: stmmac: fix taprio schedule configuration net: tip: fix a couple kernel-doc markups net: sit: unregister_netdevice on newlink's error path net: stmmac: Fixed mtu channged by cache aligned cxgb4/chtls: Fix tid stuck due to wrong update of qid i40e: fix potential NULL pointer dereferencing net: stmmac: use __napi_schedule() for PREEMPT_RT can: mcp251xfd: mcp251xfd_handle_rxif_one(): fix wrong NULL pointer check ... commit c13cf5c159660451c8fbdc37efb998b198e1d305 Author: Lorenzo Bianconi Date: Sat Dec 26 10:39:08 2020 +0100 mac80211: check if atf has been disabled in __ieee80211_schedule_txq Check if atf has been disabled in __ieee80211_schedule_txq() in order to avoid a given sta is always put to the beginning of the active_txqs list and never moved to the end since deficit is not decremented in ieee80211_sta_register_airtime() Fixes: b4809e9484da1 ("mac80211: Add airtime accounting and scheduling to TXQs") Signed-off-by: Lorenzo Bianconi Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/93889406c50f1416214c079ca0b8c9faecc5143e.1608975195.git.lorenzo@kernel.org Signed-off-by: Johannes Berg commit 2463ec86cd0338a2c2edbfb0b9d50c52ff76ff43 Author: Felix Fietkau Date: Fri Dec 18 20:15:25 2020 +0100 mac80211: do not drop tx nulldata packets on encrypted links ieee80211_tx_h_select_key drops any non-mgmt packets without a key when encryption is used. This is wrong for nulldata packets that can't be encrypted and are sent out for probing clients and indicating 4-address mode. Reported-by: Sebastian Gottschall Fixes: a0761a301746 ("mac80211: drop data frames without key on encrypted links") Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20201218191525.1168-1-nbd@nbd.name Signed-off-by: Johannes Berg commit b101dd2d22f45d203010b40c739df346a0cbebef Author: Felix Fietkau Date: Fri Dec 18 19:47:16 2020 +0100 mac80211: fix encryption key selection for 802.3 xmit When using WEP, the default unicast key needs to be selected, instead of the STA PTK. Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20201218184718.93650-4-nbd@nbd.name Signed-off-by: Johannes Berg commit 622d3b4e39381262da7b18ca1ed1311df227de86 Author: Felix Fietkau Date: Fri Dec 18 19:47:17 2020 +0100 mac80211: fix fast-rx encryption check When using WEP, the default unicast key needs to be selected, instead of the STA PTK. Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20201218184718.93650-5-nbd@nbd.name Signed-off-by: Johannes Berg commit 6020d534fa012b80c6d13811dc4d2dfedca2e403 Author: Shayne Chen Date: Tue Jan 12 11:20:28 2021 +0800 mac80211: fix incorrect strlen of .write in debugfs This fixes strlen mismatch problems happening in some .write callbacks of debugfs. When trying to configure airtime_flags in debugfs, an error appeared: ash: write error: Invalid argument The error is returned from kstrtou16() since a wrong length makes it miss the real end of input string. To fix this, use count as the string length, and set proper end of string for a char buffer. The debug print is shown - airtime_flags_write: count = 2, len = 8, where the actual length is 2, but "len = strlen(buf)" gets 8. Also cleanup the other similar cases for the sake of consistency. Signed-off-by: Sujuan Chen Signed-off-by: Ryder Lee Signed-off-by: Shayne Chen Link: https://lore.kernel.org/r/20210112032028.7482-1-shayne.chen@mediatek.com Signed-off-by: Johannes Berg commit c2083e280a3d4f71941c9c57992d4e621e4e33c5 Author: Mauro Carvalho Chehab Date: Thu Jan 14 09:04:49 2021 +0100 cfg80211: fix a kerneldoc markup A function has a different name between their prototype and its kernel-doc markup: ../include/net/cfg80211.h:1766: warning: expecting prototype for struct cfg80211_sar_chan_ranges. Prototype was for struct cfg80211_sar_freq_ranges instead Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/c7ed4bc4d9e992ead16d3d2df246f3b56dbfb1fb.1610610937.git.mchehab+huawei@kernel.org Signed-off-by: Johannes Berg commit b8653aff1c8876142f965fc69e12ba217da13182 Author: Stephen Boyd Date: Wed Dec 2 12:02:52 2020 -0800 iio: sx9310: Fix semtech,avg-pos-strength setting when > 16 This DT property can be 0, 16, and then 64, but not 32. The math here doesn't recognize this slight bump in the power of 2 numbers and translates a DT property of 64 into the register value '3' when it really should be '2'. Fix it by subtracting one more if the number being translated is larger than 31. Also use clamp() because we're here. Cc: Daniel Campello Cc: Lars-Peter Clausen Cc: Peter Meerwald-Stadler Cc: Douglas Anderson Cc: Gwendal Grignou Cc: Evan Green Signed-off-by: Stephen Boyd Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20201202200252.986230-1-swboyd@chromium.org Signed-off-by: Jonathan Cameron commit 40c48fb79b9798954691f24b8ece1d3a7eb1b353 Author: Lorenzo Bianconi Date: Tue Dec 8 15:36:40 2020 +0100 iio: common: st_sensors: fix possible infinite loop in st_sensors_irq_thread Return a boolean value in st_sensors_new_samples_available routine in order to avoid an infinite loop in st_sensors_irq_thread if stat_drdy.addr is not defined or stat_drdy read fails Fixes: 90efe05562921 ("iio: st_sensors: harden interrupt handling") Reported-by: Jonathan Cameron Signed-off-by: Lorenzo Bianconi Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/c9ec69ed349e7200c779fd7a5bf04c1aaa2817aa.1607438132.git.lorenzo@kernel.org Cc: Signed-off-by: Jonathan Cameron commit efd597b2839a9895e8a98fcb0b76d2f545802cd4 Author: Lars-Peter Clausen Date: Wed Dec 9 11:46:49 2020 +0100 iio: ad5504: Fix setting power-down state The power-down mask of the ad5504 is actually a power-up mask. Meaning if a bit is set the corresponding channel is powered up and if it is not set the channel is powered down. The driver currently has this the wrong way around, resulting in the channel being powered up when requested to be powered down and vice versa. Fixes: 3bbbf150ffde ("staging:iio:dac:ad5504: Use strtobool for boolean values") Signed-off-by: Lars-Peter Clausen Acked-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201209104649.5794-1-lars@metafoo.de Cc: Signed-off-by: Jonathan Cameron commit 49a9565a7a7ce168e3e6482fb24e62d12f72ab81 Author: David Lechner Date: Sun Dec 13 18:09:27 2020 -0600 counter:ti-eqep: remove floor The hardware doesn't support this. QPOSINIT is an initialization value that is triggered by other things. When the counter overflows, it always wraps around to zero. Fixes: f213729f6796 "counter: new TI eQEP driver" Signed-off-by: David Lechner Acked-by: William Breathitt Gray Link: https://lore.kernel.org/r/20201214000927.1793062-1-david@lechnology.com Cc: Signed-off-by: Jonathan Cameron commit cf5b1385d748b2f91b0c05bb301fcaf9bdbad385 Author: Slaveyko Slaveykov Date: Wed Dec 16 13:57:20 2020 +0200 drivers: iio: temperature: Add delay after the addressed reset command in mlx90632.c After an I2C reset command, the mlx90632 needs some time before responding to other I2C commands. Without that delay, there is a chance that the I2C command(s) after the reset will not be accepted. Signed-off-by: Slaveyko Slaveykov Reviewed-by: Andy Shevchenko Reviewed-by: Crt Mori Fixes: e02472f74a81 ("iio:temperature:mlx90632: Adding extended calibration option") Link: https://lore.kernel.org/r/20201216115720.12404-2-sis@melexis.com Cc: Signed-off-by: Jonathan Cameron commit 7e6d9788aa02333a4353058816d52b9a90aae0d3 Author: Alexandru Ardelean Date: Thu Dec 3 09:26:50 2020 +0200 iio: adc: ti_am335x_adc: remove omitted iio_kfifo_free() When the conversion was done to use devm_iio_kfifo_allocate(), a call to iio_kfifo_free() was omitted (to be removed). This change removes it. Fixes: 3c5308058899 ("iio: adc: ti_am335x_adc: alloc kfifo & IRQ via devm_ functions") Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201203072650.24128-1-alexandru.ardelean@analog.com Cc: Signed-off-by: Jonathan Cameron commit b6bc1b4ffad4a55c9461707833dc45de2e4367cc Author: Stephan Gerhold Date: Wed Dec 2 09:35:51 2020 +0100 dt-bindings: iio: accel: bma255: Fix bmc150/bmi055 compatible The bmc150-accel-i2c.c driver has an "_accel" suffix for the compatibles of BMC150 and BMI055. This is necessary because BMC150 contains both accelerometer (bosch,bmc150_accel) and magnetometer (bosch,bmc150_magn) and therefore "bosch,bmc150" would be ambiguous. However, the binding documentation suggests using "bosch,bmc150". Add the "_accel" suffix for BMC150 and BMI055 so the binding docs match what is expected by the driver. Fixes: 6259551cf19b ("iio: accel: bmc150-accel: Add DT bindings") Signed-off-by: Stephan Gerhold Reviewed-by: Linus Walleij Reviewed-by: Rob Herring Cc: Linus Walleij Link: https://lore.kernel.org/r/20201202083551.7753-1-stephan@gerhold.net Signed-off-by: Jonathan Cameron commit a06b63a1200bd40fd20fa695739e479e2b2ae948 Author: Dan Carpenter Date: Tue Dec 1 10:03:28 2020 +0300 iio: sx9310: Off by one in sx9310_read_thresh() This > should be >= to prevent reading one element beyond the end of the sx9310_pthresh_codes[] array. Fixes: ad2b473e2ba3 ("iio: sx9310: Support setting proximity thresholds") Signed-off-by: Dan Carpenter Reviewed-by: Stephen Boyd Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/X8XqwK0z//8sSWJR@mwanda Signed-off-by: Jonathan Cameron commit 5ab25a32cd90ce561ac28b9302766e565d61304c Author: Sagi Grimberg Date: Wed Jan 13 16:00:22 2021 -0800 nvme: don't intialize hwmon for discovery controllers Discovery controllers usually don't support smart log page command. So when we connect to the discovery controller we see this warning: nvme nvme0: Failed to read smart log (error 24577) nvme nvme0: new ctrl: NQN "nqn.2014-08.org.nvmexpress.discovery", addr 192.168.123.1:8009 nvme nvme0: Removing ctrl: NQN "nqn.2014-08.org.nvmexpress.discovery" Introduce a new helper to understand if the controller is a discovery controller and use this helper to skip nvme_init_hwmon (also use it in other places that we check if the controller is a discovery controller). Fixes: 400b6a7b13a3 ("nvme: Add hardware monitoring support") Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit ca1ff67d0fb14f39cf0cc5102b1fbcc3b14f6fb9 Author: Sagi Grimberg Date: Wed Jan 13 13:56:57 2021 -0800 nvme-tcp: fix possible data corruption with bio merges When a bio merges, we can get a request that spans multiple bios, and the overall request payload size is the sum of all bios. When we calculate how much we need to send from the existing bio (and bvec), we did not take into account the iov_iter byte count cap. Since multipage bvecs support, bvecs can split in the middle which means that when we account for the last bvec send we should also take the iov_iter byte count cap as it might be lower than the last bvec size. Reported-by: Hao Wang Fixes: 3f2304f8c6d6 ("nvme-tcp: add NVMe over TCP host driver") Tested-by: Hao Wang Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit ada831772188192243f9ea437c46e37e97a5975d Author: Sagi Grimberg Date: Wed Jan 13 14:03:04 2021 -0800 nvme-tcp: Fix warning with CONFIG_DEBUG_PREEMPT We shouldn't call smp_processor_id() in a preemptible context, but this is advisory at best, so instead call __smp_processor_id(). Fixes: db5ad6b7f8cd ("nvme-tcp: try to send request in queue_rq context") Reported-by: Or Gerlitz Reported-by: Yi Zhang Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 7a84665619bb5da8c8b6517157875a1fd7632014 Author: Israel Rukshin Date: Sun Jan 10 14:09:05 2021 +0200 nvmet-rdma: Fix NULL deref when setting pi_enable and traddr INADDR_ANY When setting port traddr to INADDR_ANY, the listening cm_id->device is NULL. The associate IB device is known only when a connect request event arrives, so checking T10-PI device capability should be done at this stage. Fixes: b09160c3996c ("nvmet-rdma: add metadata/T10-PI support") Signed-off-by: Israel Rukshin Reviewed-by: Sagi Grimberg Reviewed-by: Max Gurtovoy Signed-off-by: Christoph Hellwig commit 13a9499e833387fcc7a53915bbe5cddf3c336b59 Author: Paolo Abeni Date: Thu Jan 14 16:37:37 2021 +0100 mptcp: fix locking in mptcp_disconnect() tcp_disconnect() expects the caller acquires the sock lock, but mptcp_disconnect() is not doing that. Add the missing required lock. Reported-by: Eric Dumazet Fixes: 76e2a55d1625 ("mptcp: better msk-level shutdown.") Signed-off-by: Paolo Abeni Link: https://lore.kernel.org/r/f818e82b58a556feeb71dcccc8bf1c87aafc6175.1610638176.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski commit 2bbe17ae87938ca44756741ec77e3be76a4a0ea0 Merge: 65f0d2414b707 7de843dbaaa68 Author: Linus Torvalds Date: Thu Jan 14 11:10:12 2021 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID fixes from Jiri Kosina: - memory leak fix for Wacom driver (Ping Cheng) - various trivial small fixes, cleanups and device ID additions * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: HID: logitech-hidpp: Add product ID for MX Ergo in Bluetooth mode HID: Ignore battery for Elan touchscreen on ASUS UX550 HID: logitech-dj: add the G602 receiver HID: wiimote: remove h from printk format specifier HID: uclogic: remove h from printk format specifier HID: sony: select CONFIG_CRC32 HID: sfh: fix address space confusion HID: multitouch: Enable multi-input for Synaptics pointstick/touchpad device HID: wacom: Fix memory leakage caused by kfifo_alloc commit 2f0fa789f7b9fb022440f8f846cae175233987aa Author: Wayne Lin Date: Tue Nov 24 19:57:03 2020 +0800 drm/amd/display: Fix to be able to stop crc calculation [Why] Find out when we try to disable CRC calculation, crc generation is still enabled. Main reason is that dc_stream_configure_crc() will never get called when the source is AMDGPU_DM_PIPE_CRC_SOURCE_NONE. [How] Add checking condition that when source is AMDGPU_DM_PIPE_CRC_SOURCE_NONE, we should also call dc_stream_configure_crc() to disable crc calculation. Acked-by: Alex Deucher Reviewed-by: Rodrigo Siqueira Signed-off-by: Wayne Lin Signed-off-by: Alex Deucher commit a7ddd22151fc2910c7b2faad64680cc2bb699b03 Author: Rodrigo Siqueira Date: Thu Jan 7 15:09:30 2021 -0500 Revert "drm/amd/display: Expose new CRC window property" This reverts commit c920888c604d72799d057bbcd9e28a6c003ccfbe. Cc: Wayne Lin Cc: Alexander Deucher Cc: Harry Wentland Cc: Roman Li Cc: Bindu R Cc: Daniel Vetter Acked-by: Daniel Vetter Acked-by: Alex Deucher Reviewed-by: Wayne Lin Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 3c517ca5212faab4604e1725b4d31e290945ff87 Author: Rodrigo Siqueira Date: Thu Jan 7 14:51:49 2021 -0500 Revert "drm/amdgpu/disply: fix documentation warnings in display manager" This reverts commit 6ae09fa49147e557eb6aebbb5b2059b63706d454. Cc: Wayne Lin Cc: Alexander Deucher Cc: Harry Wentland Cc: Roman Li Cc: Bindu R Cc: Daniel Vetter Acked-by: Daniel Vetter Acked-by: Alex Deucher Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 55df908bd663ead7d85bd64dd49562d5ac3889ef Author: Rodrigo Siqueira Date: Thu Jan 7 14:50:51 2021 -0500 Revert "drm/amd/display: Fix unused variable warning" This reverts commit f01afd1ee48816457fb22e201f1d0cfb14589904. Cc: Wayne Lin Cc: Alexander Deucher Cc: Harry Wentland Cc: Roman Li Cc: Bindu R Cc: Daniel Vetter Acked-by: Daniel Vetter Acked-by: Alex Deucher Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 4369376ba91c97a1b2dd74abeec18c0c0ddf4ac9 Author: Likun Gao Date: Fri Jan 8 16:34:31 2021 +0800 drm/amdgpu: set power brake sequence Add function to set power brake sequence. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 25537d71e2d007faf42a244a75e5a2bb7c356234 Author: Tariq Toukan Date: Thu Jan 14 17:12:15 2021 +0200 net: Allow NETIF_F_HW_TLS_TX if IP_CSUM && IPV6_CSUM Cited patch below blocked the TLS TX device offload unless HW_CSUM is set. This broke devices that use IP_CSUM && IP6_CSUM. Here we fix it. Note that the single HW_TLS_TX feature flag indicates support for both IPv4/6, hence it should still be disabled in case only one of (IP_CSUM | IPV6_CSUM) is set. Fixes: ae0b04b238e2 ("net: Disable NETIF_F_HW_TLS_TX when HW_CSUM is disabled") Signed-off-by: Tariq Toukan Reported-by: Rohit Maheshwari Reviewed-by: Maxim Mikityanskiy Link: https://lore.kernel.org/r/20210114151215.7061-1-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 70db767fb33adab1e7d99908c4473b5a4ca29b34 Merge: 3226b158e67cf 054c4610bd05e Author: Jakub Kicinski Date: Thu Jan 14 10:53:50 2021 -0800 Merge branch 'maintainers-remove-inactive-folks-from-networking' To make maintainers' lives easier we're trying to nudge people towards CCing all the relevant folks on patches, in an attempt to improve review rate. We have a check in patchwork which validates the CC list against get_maintainers.pl. It's a little awkward, however, to force people to CC maintainers who we haven't seen on the mailing list for years. This series removes from maintainers folks who didn't provide any tag (incl. authoring a patch) in the last 5 years. To ensure reasonable signal to noise ratio we only considered MAINTAINERS entries which had more than 100 patches fall under them in that time period. All this is purely a process-greasing exercise, I hope nobody sees this series as an affront. Most folks are moved to CREDITS, a couple entries are simply removed. The following inactive maintainers are kept, because they indicated the intention to come back in the near future: - Veaceslav Falico (bonding) - Christian Benvenuti (Cisco drivers) - Felix Fietkau (mtk-eth) - Mirko Linder (skge/sky2) Patches in this series contain report from a script which did the analysis. Big thanks to Jonathan Corbet for help and writing the script (although I feel like I used it differently than Jon may have intended ;)). The output format is thus: Subsystem $name Changes $reviewed / $total ($percent%) // how many changes to the subsystem had at least one ack/review Last activity: $date_of_most_recent_patch $maintainer/reviewer1: Author $last_commit_authored_by_the_person $how_many_in_5yrs Committer $last_committed $how_many Tags $last_tag_like_review_signoff_etc $how_many $maintainer/reviewer2: Author $last_commit_authored_by_the_person $how_many_in_5yrs Committer $last_committed $how_many Tags $last_tag_like_review_signoff_etc $how_many Top reviewers: // Top 3 reviewers (who are not listed in MAINTAINERS) [$count_of_reviews_and_acks]: $email INACTIVE MAINTAINER $name // maintainer / reviewer who has done nothing in last 5yrs v2: - keep Felix and Mirko Link: https://lore.kernel.org/r/20210114014912.2519931-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 054c4610bd05e7bf677efefa880da2da340599fc Author: Jakub Kicinski Date: Wed Jan 13 17:49:12 2021 -0800 MAINTAINERS: dccp: move Gerrit Renker to CREDITS As far as I can tell we haven't heard from Gerrit for roughly 5 years now. DCCP patch would really benefit from some review. Gerrit was the last maintainer so mark this entry as orphaned. Subsystem DCCP PROTOCOL Changes 38 / 166 (22%) (No activity) Top reviewers: [6]: kstewart@linuxfoundation.org [6]: allison@lohutok.net [5]: edumazet@google.com INACTIVE MAINTAINER Gerrit Renker Signed-off-by: Jakub Kicinski commit 4f3786e011940d83d7a9c365730936db96a0b233 Author: Jakub Kicinski Date: Wed Jan 13 17:49:11 2021 -0800 MAINTAINERS: ipvs: move Wensong Zhang to CREDITS Move Wensong Zhang to credits, we haven't heard from him in years. Subsystem IPVS Changes 83 / 226 (36%) Last activity: 2020-11-27 Wensong Zhang : Simon Horman : Committer c24b75e0f923 2019-10-24 00:00:00 33 Tags 7980d2eabde8 2020-10-12 00:00:00 76 Julian Anastasov : Author 7980d2eabde8 2020-10-12 00:00:00 26 Tags 4bc3c8dc9f5f 2020-11-27 00:00:00 78 Top reviewers: [6]: horms+renesas@verge.net.au INACTIVE MAINTAINER Wensong Zhang Signed-off-by: Jakub Kicinski commit 0e4ed0b62b5a1f60b72ab7aaa29efd735d4cb6a6 Author: Jakub Kicinski Date: Wed Jan 13 17:49:10 2021 -0800 MAINTAINERS: tls: move Aviad to CREDITS Aviad wrote parts of the initial TLS implementation but hasn't been contributing to TLS since. Subsystem NETWORKING [TLS] Changes 123 / 308 (39%) Last activity: 2020-12-01 Boris Pismenny : Tags 138559b9f99d 2020-11-17 00:00:00 1 Aviad Yehezkel : John Fastabend : Author e91de6afa81c 2020-06-01 00:00:00 22 Tags e91de6afa81c 2020-06-01 00:00:00 29 Daniel Borkmann : Author c16ee04c9b30 2018-10-20 00:00:00 7 Committer b8e202d1d1d0 2020-02-21 00:00:00 19 Tags b8e202d1d1d0 2020-02-21 00:00:00 28 Jakub Kicinski : Author 5c39f26e67c9 2020-11-27 00:00:00 89 Committer d31c08007523 2020-12-01 00:00:00 15 Tags d31c08007523 2020-12-01 00:00:00 117 Top reviewers: [50]: dirk.vandermerwe@netronome.com [26]: simon.horman@netronome.com [14]: john.hurley@netronome.com INACTIVE MAINTAINER Aviad Yehezkel Signed-off-by: Jakub Kicinski commit c41efbf2ad56280762d19a531eb7edbf2e6a9f84 Author: Jakub Kicinski Date: Wed Jan 13 17:49:09 2021 -0800 MAINTAINERS: ena: remove Zorik Machulsky from reviewers While ENA has 3 reviewers and 2 maintainers, we mostly see review tags and comments from the maintainers. While we very much appreciate Zorik's invovment in the community let's trim the reviewer list down to folks we've seen tags from. Subsystem AMAZON ETHERNET DRIVERS Changes 13 / 269 (4%) Last activity: 2020-11-24 Netanel Belgazal : Author 24dee0c7478d 2019-12-10 00:00:00 43 Tags 0e3a3f6dacf0 2020-07-21 00:00:00 47 Arthur Kiyanovski : Author 0e3a3f6dacf0 2020-07-21 00:00:00 79 Tags 09323b3bca95 2020-11-24 00:00:00 104 Guy Tzalik : Tags 713865da3c62 2020-09-10 00:00:00 3 Saeed Bishara : Tags 470793a78ce3 2020-02-11 00:00:00 2 Zorik Machulsky : Top reviewers: [4]: sameehj@amazon.com [3]: snelson@pensando.io [3]: shayagr@amazon.com INACTIVE MAINTAINER Zorik Machulsky Signed-off-by: Jakub Kicinski commit 5e62d124f75aae0e96fd8a588ad31659a2468710 Author: Jakub Kicinski Date: Wed Jan 13 17:49:08 2021 -0800 MAINTAINERS: vrf: move Shrijeet to CREDITS Shrijeet has moved on from VRF-related work. Subsystem VRF Changes 30 / 120 (25%) Last activity: 2020-12-09 David Ahern : Author 1b6687e31a2d 2020-07-23 00:00:00 1 Tags 9125abe7b9cb 2020-12-09 00:00:00 4 Shrijeet Mukherjee : Top reviewers: [13]: dsahern@gmail.com [4]: dsa@cumulusnetworks.com INACTIVE MAINTAINER Shrijeet Mukherjee Signed-off-by: Jakub Kicinski commit 09cd3f4683a901d572ad17f0564cc9e3e989f0f4 Author: Jakub Kicinski Date: Wed Jan 13 17:49:07 2021 -0800 MAINTAINERS: net: move Alexey Kuznetsov to CREDITS Move Alexey to CREDITS. I am probably not giving him enough justice with the description line.. Subsystem NETWORKING [IPv4/IPv6] Changes 1535 / 5111 (30%) Last activity: 2020-12-10 "David S. Miller" : Author b7e4ba9a91df 2020-12-09 00:00:00 407 Committer e0fecb289ad3 2020-12-10 00:00:00 3992 Tags e0fecb289ad3 2020-12-10 00:00:00 3978 Alexey Kuznetsov : Hideaki YOSHIFUJI : Tags d5d8760b78d0 2016-06-16 00:00:00 8 Top reviewers: [225]: edumazet@google.com [222]: dsahern@gmail.com [176]: ncardwell@google.com INACTIVE MAINTAINER Alexey Kuznetsov Signed-off-by: Jakub Kicinski commit 93089de91e85743942a5f804850d4f0846e5402b Author: Jakub Kicinski Date: Wed Jan 13 17:49:06 2021 -0800 MAINTAINERS: altx: move Jay Cliburn to CREDITS Jay was not active in recent years and does not have plans to return to work on ATLX drivers. Subsystem ATLX ETHERNET DRIVERS Changes 20 / 116 (17%) Last activity: 2020-02-24 Jay Cliburn : Chris Snook : Tags ea973742140b 2020-02-24 00:00:00 1 Top reviewers: [4]: andrew@lunn.ch [2]: kuba@kernel.org [2]: o.rempel@pengutronix.de INACTIVE MAINTAINER Jay Cliburn Acked-by: Chris Snook Signed-off-by: Jakub Kicinski commit 3226b158e67cfaa677fd180152bfb28989cb2fac Author: Eric Dumazet Date: Wed Jan 13 08:18:19 2021 -0800 net: avoid 32 x truesize under-estimation for tiny skbs Both virtio net and napi_get_frags() allocate skbs with a very small skb->head While using page fragments instead of a kmalloc backed skb->head might give a small performance improvement in some cases, there is a huge risk of under estimating memory usage. For both GOOD_COPY_LEN and GRO_MAX_HEAD, we can fit at least 32 allocations per page (order-3 page in x86), or even 64 on PowerPC We have been tracking OOM issues on GKE hosts hitting tcp_mem limits but consuming far more memory for TCP buffers than instructed in tcp_mem[2] Even if we force napi_alloc_skb() to only use order-0 pages, the issue would still be there on arches with PAGE_SIZE >= 32768 This patch makes sure that small skb head are kmalloc backed, so that other objects in the slab page can be reused instead of being held as long as skbs are sitting in socket queues. Note that we might in the future use the sk_buff napi cache, instead of going through a more expensive __alloc_skb() Another idea would be to use separate page sizes depending on the allocated length (to never have more than 4 frags per page) I would like to thank Greg Thelen for his precious help on this matter, analysing crash dumps is always a time consuming task. Fixes: fd11a83dd363 ("net: Pull out core bits of __netdev_alloc_skb and add __napi_alloc_skb") Signed-off-by: Eric Dumazet Cc: Paolo Abeni Cc: Greg Thelen Reviewed-by: Alexander Duyck Acked-by: Michael S. Tsirkin Link: https://lore.kernel.org/r/20210113161819.1155526-1-eric.dumazet@gmail.com Signed-off-by: Jakub Kicinski commit 7da17624e7948d5d9660b910f8079d26d26ce453 Author: Geert Uytterhoeven Date: Wed Jan 13 15:43:09 2021 +0100 nt: usb: USB_RTL8153_ECM should not default to y In general, device drivers should not be enabled by default. Fixes: 657bc1d10bfc23ac ("r8153_ecm: avoid to be prior to r8152 driver") Signed-off-by: Geert Uytterhoeven Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20210113144309.1384615-1-geert+renesas@glider.be Signed-off-by: Jakub Kicinski commit fe28c53ed71d463e187748b6b10e1130dd72ceeb Author: Yannick Vignon Date: Wed Jan 13 14:15:57 2021 +0100 net: stmmac: fix taprio configuration when base_time is in the past The Synopsys TSN MAC supports Qbv base times in the past, but only up to a certain limit. As a result, a taprio qdisc configuration with a small base time (for example when treating the base time as a simple phase offset) is not applied by the hardware and silently ignored. This was observed on an NXP i.MX8MPlus device, but likely affects all TSN-variants of the MAC. Fix the issue by making sure the base time is in the future, pushing it by an integer amount of cycle times if needed. (a similar check is already done in several other taprio implementations, see for example drivers/net/ethernet/intel/igc/igc_tsn.c#L116 or drivers/net/dsa/sja1105/sja1105_ptp.h#L39). Fixes: b60189e0392f ("net: stmmac: Integrate EST with TAPRIO scheduler API") Signed-off-by: Yannick Vignon Link: https://lore.kernel.org/r/20210113131557.24651-2-yannick.vignon@oss.nxp.com Signed-off-by: Jakub Kicinski commit b76889ff51bfee318bea15891420e5aefd2833a0 Author: Yannick Vignon Date: Wed Jan 13 14:15:56 2021 +0100 net: stmmac: fix taprio schedule configuration When configuring a 802.1Qbv schedule through the tc taprio qdisc on an NXP i.MX8MPlus device, the effective cycle time differed from the requested one by N*96ns, with N number of entries in the Qbv Gate Control List. This is because the driver was adding a 96ns margin to each interval of the GCL, apparently to account for the IPG. The problem was observed on NXP i.MX8MPlus devices but likely affected all devices relying on the same configuration callback (dwmac 4.00, 4.10, 5.10 variants). Fix the issue by removing the margins, and simply setup the MAC with the provided cycle time value. This is the behavior expected by the user-space API, as altering the Qbv schedule timings would break standards conformance. This is also the behavior of several other Ethernet MAC implementations supporting taprio, including the dwxgmac variant of stmmac. Fixes: 504723af0d85 ("net: stmmac: Add basic EST support for GMAC5+") Signed-off-by: Yannick Vignon Link: https://lore.kernel.org/r/20210113131557.24651-1-yannick.vignon@oss.nxp.com Signed-off-by: Jakub Kicinski commit 25764779298f23a659f3daf39f9e2b5975a7a89d Author: Mauro Carvalho Chehab Date: Thu Jan 14 09:04:48 2021 +0100 net: tip: fix a couple kernel-doc markups A function has a different name between their prototype and its kernel-doc markup: ../net/tipc/link.c:2551: warning: expecting prototype for link_reset_stats(). Prototype was for tipc_link_reset_stats() instead ../net/tipc/node.c:1678: warning: expecting prototype for is the general link level function for message sending(). Prototype was for tipc_node_xmit() instead Signed-off-by: Mauro Carvalho Chehab Acked-by: Jon Maloy Signed-off-by: Jakub Kicinski commit 47e4bb147a96f1c9b4e7691e7e994e53838bfff8 Author: Jakub Kicinski Date: Wed Jan 13 17:29:47 2021 -0800 net: sit: unregister_netdevice on newlink's error path We need to unregister the netdevice if config failed. .ndo_uninit takes care of most of the heavy lifting. This was uncovered by recent commit c269a24ce057 ("net: make free_netdev() more lenient with unregistering devices"). Previously the partially-initialized device would be left in the system. Reported-and-tested-by: syzbot+2393580080a2da190f04@syzkaller.appspotmail.com Fixes: e2f1f072db8d ("sit: allow to configure 6rd tunnels via netlink") Acked-by: Nicolas Dichtel Link: https://lore.kernel.org/r/20210114012947.2515313-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 83d411224025ac1baab981e3d2f5d29e7761541d Author: Marek Vasut Date: Tue Dec 29 18:55:21 2020 +0100 ARM: dts: stm32: Fix GPIO hog flags on DHCOM DRC02 The GPIO hog flags are ignored by gpiolib-of.c now, set the flags to 0. Since GPIO_ACTIVE_HIGH is defined as 0, this change only increases the correctness of the DT. Fixes: fde180f06d7b ("ARM: dts: stm32: Add DHSOM based DRC02 board") Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Maxime Coquelin Cc: Patrice Chotard Cc: Patrick Delaunay Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue commit 10793e557acece49fe1c55e8f4563f6b89543c18 Author: Marek Vasut Date: Tue Dec 29 18:55:20 2020 +0100 ARM: dts: stm32: Fix GPIO hog flags on DHCOM PicoITX The GPIO hog flags are ignored by gpiolib-of.c now, set the flags to 0. Due to a change in gpiolib-of.c, setting flags to GPIO_ACTIVE_LOW and using output-low DT property leads to the GPIO being set high instead. Fixes: ac68793f49de ("ARM: dts: stm32: Add DHCOM based PicoITX board") Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Maxime Coquelin Cc: Patrice Chotard Cc: Patrick Delaunay Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue commit bcbacfb82c7010431182a8aecb860c752e3aed8c Author: Marek Vasut Date: Thu Dec 24 07:24:38 2020 +0100 ARM: dts: stm32: Fix GPIO hog names on DHCOM The GPIO hog node name should match regex '^(hog-[0-9]+|.+-hog(-[0-9]+)?)$', make it so and fix the following two make dtbs_check warnings: arch/arm/boot/dts/stm32mp157c-dhcom-picoitx.dt.yaml: hog-usb-port-power: $nodename:0: 'hog-usb-port-power' does not match '^(hog-[0-9]+|.+-hog(-[0-9]+)?)$' arch/arm/boot/dts/stm32mp153c-dhcom-drc02.dt.yaml: hog-usb-hub: $nodename:0: 'hog-usb-hub' does not match '^(hog-[0-9]+|.+-hog(-[0-9]+)?)$' Fixes: ac68793f49de ("ARM: dts: stm32: Add DHCOM based PicoITX board") Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Maxime Coquelin Cc: Patrice Chotard Cc: Patrick Delaunay Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue commit a6616bc9a0af7c65c0b0856a7508870a4a40c4ac Author: Takashi Iwai Date: Tue Jan 12 14:24:48 2021 +0100 iwlwifi: dbg: Don't touch the tlv data The commit ba8f6f4ae254 ("iwlwifi: dbg: add dumping special device memory") added a termination of name string just to be sure, and this seems causing a regression, a GPF triggered at firmware loading. Basically we shouldn't modify the firmware data that may be provided as read-only. This patch drops the code that caused the regression and keep the tlv data as is. Fixes: ba8f6f4ae254 ("iwlwifi: dbg: add dumping special device memory") BugLink: https://bugzilla.suse.com/show_bug.cgi?id=1180344 BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=210733 Cc: stable@vger.kernel.org Signed-off-by: Takashi Iwai Acked-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210112132449.22243-2-tiwai@suse.de commit 7c7b3e5d9aeed31d35c5dab0bf9c0fd4c8923206 Author: Neta Ostrovsky Date: Wed Jan 13 15:02:14 2021 +0200 RDMA/cma: Fix error flow in default_roce_mode_store In default_roce_mode_store(), we took a reference to cma_dev, but didn't return it with cma_dev_put in the error flow. Fixes: 1c15b4f2a42f ("RDMA/core: Modify enum ib_gid_type and enum rdma_network_type") Link: https://lore.kernel.org/r/20210113130214.562108-1-leon@kernel.org Signed-off-by: Neta Ostrovsky Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 1c3aa6bd0b823105c2030af85d92d158e815d669 Author: Mark Bloch Date: Wed Jan 13 14:17:03 2021 +0200 RDMA/mlx5: Fix wrong free of blue flame register on error If the allocation of the fast path blue flame register fails, the driver should free the regular blue flame register allocated a statement above, not the one that it just failed to allocate. Fixes: 16c1975f1032 ("IB/mlx5: Create profile infrastructure to add and remove stages") Link: https://lore.kernel.org/r/20210113121703.559778-6-leon@kernel.org Reported-by: Hans Petter Selasky Signed-off-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 2cb091f6293df898b47f4e0f2e54324e2bbaf816 Author: Parav Pandit Date: Wed Jan 13 14:17:00 2021 +0200 IB/mlx5: Fix error unwinding when set_has_smi_cap fails When set_has_smi_cap() fails, multiport master cleanup is missed. Fix it by doing the correct error unwinding goto. Fixes: a989ea01cb10 ("RDMA/mlx5: Move SMI caps logic") Link: https://lore.kernel.org/r/20210113121703.559778-3-leon@kernel.org Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit b79f2dc5ffe17b03ec8c55f0d63f65e87bcac676 Author: Aharon Landau Date: Wed Jan 13 14:16:59 2021 +0200 RDMA/umem: Avoid undefined behavior of rounddown_pow_of_two() rounddown_pow_of_two() is undefined when the input is 0. Therefore we need to avoid it in ib_umem_find_best_pgsz and return 0. Otherwise, it could result in not rejecting an invalid page size which eventually causes a kernel oops due to the logical inconsistency. Fixes: 3361c29e9279 ("RDMA/umem: Use simpler logic for ib_umem_find_best_pgsz()") Link: https://lore.kernel.org/r/20210113121703.559778-2-leon@kernel.org Signed-off-by: Aharon Landau Reviewed-by: Jason Gunthorpe Reviewed-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit b7c568752ef3b36afa78e1a1866dc049d175993b Author: Nathan Chancellor Date: Tue Dec 29 14:15:48 2020 -0700 mt76: Fix queue ID variable types after mcu queue split Clang warns in both mt7615 and mt7915: drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:271:9: warning: implicit conversion from enumeration type 'enum mt76_mcuq_id' to different enumeration type 'enum mt76_txq_id' [-Wenum-conversion] txq = MT_MCUQ_FWDL; ~ ^~~~~~~~~~~~ drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:278:9: warning: implicit conversion from enumeration type 'enum mt76_mcuq_id' to different enumeration type 'enum mt76_txq_id' [-Wenum-conversion] txq = MT_MCUQ_WA; ~ ^~~~~~~~~~ drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:282:9: warning: implicit conversion from enumeration type 'enum mt76_mcuq_id' to different enumeration type 'enum mt76_txq_id' [-Wenum-conversion] txq = MT_MCUQ_WM; ~ ^~~~~~~~~~ 3 warnings generated. drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:238:9: warning: implicit conversion from enumeration type 'enum mt76_mcuq_id' to different enumeration type 'enum mt76_txq_id' [-Wenum-conversion] qid = MT_MCUQ_WM; ~ ^~~~~~~~~~ drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:240:9: warning: implicit conversion from enumeration type 'enum mt76_mcuq_id' to different enumeration type 'enum mt76_txq_id' [-Wenum-conversion] qid = MT_MCUQ_FWDL; ~ ^~~~~~~~~~~~ 2 warnings generated. Use the proper type for the queue ID variables to fix these warnings. Additionally, rename the txq variable in mt7915_mcu_send_message to be more neutral like mt7615_mcu_send_message. Fixes: e637763b606b ("mt76: move mcu queues to mt76_dev q_mcu array") Link: https://github.com/ClangBuiltLinux/linux/issues/1229 Signed-off-by: Nathan Chancellor Acked-by: Lorenzo Bianconi Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201229211548.1348077-1-natechancellor@gmail.com commit 5e6dca82bcaa49348f9e5fcb48df4881f6d6c4ae Author: Nick Desaulniers Date: Tue Jan 12 11:46:24 2021 -0800 x86/entry: Emit a symbol for register restoring thunk Arnd found a randconfig that produces the warning: arch/x86/entry/thunk_64.o: warning: objtool: missing symbol for insn at offset 0x3e when building with LLVM_IAS=1 (Clang's integrated assembler). Josh notes: With the LLVM assembler not generating section symbols, objtool has no way to reference this code when it generates ORC unwinder entries, because this code is outside of any ELF function. The limitation now being imposed by objtool is that all code must be contained in an ELF symbol. And .L symbols don't create such symbols. So basically, you can use an .L symbol *inside* a function or a code segment, you just can't use the .L symbol to contain the code using a SYM_*_START/END annotation pair. Fangrui notes that this optimization is helpful for reducing image size when compiling with -ffunction-sections and -fdata-sections. I have observed on the order of tens of thousands of symbols for the kernel images built with those flags. A patch has been authored against GNU binutils to match this behavior of not generating unused section symbols ([1]), so this will also become a problem for users of GNU binutils once they upgrade to 2.36. Omit the .L prefix on a label so that the assembler will emit an entry into the symbol table for the label, with STB_LOCAL binding. This enables objtool to generate proper unwind info here with LLVM_IAS=1 or GNU binutils 2.36+. [ bp: Massage commit message. ] Reported-by: Arnd Bergmann Suggested-by: Josh Poimboeuf Suggested-by: Borislav Petkov Suggested-by: Mark Brown Signed-off-by: Nick Desaulniers Signed-off-by: Borislav Petkov Acked-by: Peter Zijlstra (Intel) Acked-by: Josh Poimboeuf Link: https://lkml.kernel.org/r/20210112194625.4181814-1-ndesaulniers@google.com Link: https://github.com/ClangBuiltLinux/linux/issues/1209 Link: https://reviews.llvm.org/D93783 Link: https://sourceware.org/binutils/docs/as/Symbol-Names.html Link: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=d1bcae833b32f1408485ce69f844dcd7ded093a8 [1] commit 087698939f30d489e785d7df3e6aa5dce2487b39 Author: Marek Vasut Date: Thu Jan 7 16:07:42 2021 +0100 ARM: dts: stm32: Disable optional TSC2004 on DRC02 board The DRC02 has no use for the on-SoM touchscreen controller, and the on-SoM touchscreen controller may not even be populated, which then results in error messages in kernel log. Disable the touchscreen controller in DT. Fixes: fde180f06d7b ("ARM: dts: stm32: Add DHSOM based DRC02 board") Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Maxime Coquelin Cc: Patrice Chotard Cc: Patrick Delaunay Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue commit e708789c4a87989faff1131ccfdc465a1c1eddbc Author: Miquel Raynal Date: Thu Jan 7 09:38:13 2021 +0100 mtd: spinand: Fix MTD_OPS_AUTO_OOB requests The initial change breaking the logic is commit 3d1f08b032dc ("mtd: spinand: Use the external ECC engine logic") It inadvertently dropped proper OOB support while doing something else. Shortly later, half of it got re-integrated by commit 868cbe2a6dce ("mtd: spinand: Fix OOB read") (pointing by the way to a more early change which had nothing to do with the issue). Problem is, this commit failed to revert the faulty change entirely and missed the logic handling MTD_OPS_AUTO_OOB requests. Let's fix this mess by re-inserting the missing part now. Fixes: 868cbe2a6dce ("mtd: spinand: Fix OOB read") Reported-by: Felix Fietkau Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210107083813.24283-1-miquel.raynal@bootlin.com commit 18f62614308be69a2752afb5f6bbad60096ad774 Author: Martin Blumenstingl Date: Wed Jan 6 15:09:43 2021 +0100 mtd: rawnand: intel: check the mtd name only after setting the variable Move the check for mtd->name after the mtd variable has actually been initialized. While here, also drop the NULL assignment to the mtd variable as it's overwritten later on anyways and the NULL value is never read. Fixes: 0b1039f016e8a3 ("mtd: rawnand: Add NAND controller support on Intel LGM SoC") Signed-off-by: Martin Blumenstingl Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210106140943.98072-1-martin.blumenstingl@googlemail.com commit 3c97be6982e689d7b2430187a11f8c78e573abdb Author: Miquel Raynal Date: Mon Jan 4 10:30:57 2021 +0100 mtd: rawnand: nandsim: Fix the logic when selecting Hamming soft ECC engine I have been fooled by the logic picking the right ECC engine which is spread across two functions: *init_module() and *_attach(). I thought this driver was not impacted by the recent changes around the ECC engines DT parsing logic but in fact it is. Reported-by: kernel test robot Fixes: d7157ff49a5b ("mtd: rawnand: Use the ECC framework user input parsing bits") Cc: stable@vger.kernel.org Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210104093057.31178-1-miquel.raynal@bootlin.com commit 55ed4560774d81d7343223b8fd2784c530a9c6c1 Author: Masami Hiramatsu Date: Wed Dec 9 14:27:44 2020 +0900 tools/bootconfig: Add tracing_on support to helper scripts Add ftrace.instance.INSTANCE.tracing_on support to ftrace2bconf.sh and bconf2ftrace.sh. commit 8490db06f914 ("tracing/boot: Add per-instance tracing_on option support") added the per-instance tracing_on option, but forgot to update the helper scripts. Link: https://lkml.kernel.org/r/160749166410.3497930.14204335886811029800.stgit@devnote2 Cc: stable@vger.kernel.org Fixes: 8490db06f914 ("tracing/boot: Add per-instance tracing_on option support") Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 063a60634d48ee89f697371c9850c9370e494f22 Author: Marek Vasut Date: Tue Dec 1 12:13:31 2020 +0100 ARM: dts: stm32: Disable WP on DHCOM uSD slot The uSD slot has no WP detection, disable it. Fixes: 34e0c7847dcf ("ARM: dts: stm32: Add DH Electronics DHCOM STM32MP1 SoM and PDK2 board") Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Maxime Coquelin Cc: Patrice Chotard Cc: Patrick Delaunay Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue commit 1a9b001237f85d3cf11a408c2daca6a2245b2add Author: Marek Vasut Date: Tue Dec 1 12:13:30 2020 +0100 ARM: dts: stm32: Connect card-detect signal on DHCOM The DHCOM SoM uSD slot card detect signal is connected to GPIO PG1, describe it in the DT. Fixes: 34e0c7847dcf ("ARM: dts: stm32: Add DH Electronics DHCOM STM32MP1 SoM and PDK2 board") Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Maxime Coquelin Cc: Patrice Chotard Cc: Patrick Delaunay Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue commit a0572c0734e4926ac51a31f97c12f752e1cdc7c8 Author: Marek Vasut Date: Tue Dec 1 12:13:29 2020 +0100 ARM: dts: stm32: Fix polarity of the DH DRC02 uSD card detect The uSD card detect signal on the DH DRC02 is active-high, with a default pull down resistor on the board. Invert the polarity. Fixes: fde180f06d7b ("ARM: dts: stm32: Add DHSOM based DRC02 board") Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Maxime Coquelin Cc: Patrice Chotard Cc: Patrick Delaunay Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org -- Note that this could not be tested on prototype SoMs, now that it is tested, this issue surfaced, so it needs to be fixed. Signed-off-by: Alexandre Torgue commit c87a95dc28b1431c7e77e2c0c983cf37698089d2 Author: Ignat Korchagin Date: Wed Jan 13 19:17:17 2021 +0000 dm crypt: defer decryption to a tasklet if interrupts disabled On some specific hardware on early boot we occasionally get: [ 1193.920255][ T0] BUG: sleeping function called from invalid context at mm/mempool.c:381 [ 1193.936616][ T0] in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 0, name: swapper/69 [ 1193.953233][ T0] no locks held by swapper/69/0. [ 1193.965871][ T0] irq event stamp: 575062 [ 1193.977724][ T0] hardirqs last enabled at (575061): [] tick_nohz_idle_exit+0xe2/0x3e0 [ 1194.002762][ T0] hardirqs last disabled at (575062): [] flush_smp_call_function_from_idle+0x4f/0x80 [ 1194.029035][ T0] softirqs last enabled at (575050): [] asm_call_irq_on_stack+0x12/0x20 [ 1194.054227][ T0] softirqs last disabled at (575043): [] asm_call_irq_on_stack+0x12/0x20 [ 1194.079389][ T0] CPU: 69 PID: 0 Comm: swapper/69 Not tainted 5.10.6-cloudflare-kasan-2021.1.4-dev #1 [ 1194.104103][ T0] Hardware name: NULL R162-Z12-CD/MZ12-HD4-CD, BIOS R10 06/04/2020 [ 1194.119591][ T0] Call Trace: [ 1194.130233][ T0] dump_stack+0x9a/0xcc [ 1194.141617][ T0] ___might_sleep.cold+0x180/0x1b0 [ 1194.153825][ T0] mempool_alloc+0x16b/0x300 [ 1194.165313][ T0] ? remove_element+0x160/0x160 [ 1194.176961][ T0] ? blk_mq_end_request+0x4b/0x490 [ 1194.188778][ T0] crypt_convert+0x27f6/0x45f0 [dm_crypt] [ 1194.201024][ T0] ? rcu_read_lock_sched_held+0x3f/0x70 [ 1194.212906][ T0] ? module_assert_mutex_or_preempt+0x3e/0x70 [ 1194.225318][ T0] ? __module_address.part.0+0x1b/0x3a0 [ 1194.237212][ T0] ? is_kernel_percpu_address+0x5b/0x190 [ 1194.249238][ T0] ? crypt_iv_tcw_ctr+0x4a0/0x4a0 [dm_crypt] [ 1194.261593][ T0] ? is_module_address+0x25/0x40 [ 1194.272905][ T0] ? static_obj+0x8a/0xc0 [ 1194.283582][ T0] ? lockdep_init_map_waits+0x26a/0x700 [ 1194.295570][ T0] ? __raw_spin_lock_init+0x39/0x110 [ 1194.307330][ T0] kcryptd_crypt_read_convert+0x31c/0x560 [dm_crypt] [ 1194.320496][ T0] ? kcryptd_queue_crypt+0x1be/0x380 [dm_crypt] [ 1194.333203][ T0] blk_update_request+0x6d7/0x1500 [ 1194.344841][ T0] ? blk_mq_trigger_softirq+0x190/0x190 [ 1194.356831][ T0] blk_mq_end_request+0x4b/0x490 [ 1194.367994][ T0] ? blk_mq_trigger_softirq+0x190/0x190 [ 1194.379693][ T0] flush_smp_call_function_queue+0x24b/0x560 [ 1194.391847][ T0] flush_smp_call_function_from_idle+0x59/0x80 [ 1194.403969][ T0] do_idle+0x287/0x450 [ 1194.413891][ T0] ? arch_cpu_idle_exit+0x40/0x40 [ 1194.424716][ T0] ? lockdep_hardirqs_on_prepare+0x286/0x3f0 [ 1194.436399][ T0] ? _raw_spin_unlock_irqrestore+0x39/0x40 [ 1194.447759][ T0] cpu_startup_entry+0x19/0x20 [ 1194.458038][ T0] secondary_startup_64_no_verify+0xb0/0xbb IO completion can be queued to a different CPU by the block subsystem as a "call single function/data". The CPU may run these routines from the idle task, but it does so with interrupts disabled. It is not a good idea to do decryption with irqs disabled even in an idle task context, so just defer it to a tasklet (as is done with requests from hard irqs). Fixes: 39d42fa96ba1 ("dm crypt: add flags to optionally bypass kcryptd workqueues") Cc: stable@vger.kernel.org # v5.9+ Signed-off-by: Ignat Korchagin Signed-off-by: Mike Snitzer commit 7a2da5d7960a64ee923fe3e31f01a1101052c66f Author: Christophe Leroy Date: Thu Jan 14 13:09:37 2021 +0000 spi: fsl: Fix driver breakage when SPI_CS_HIGH is not set in spi->mode Commit 766c6b63aa04 ("spi: fix client driver breakages when using GPIO descriptors") broke fsl spi driver. As now we fully rely on gpiolib for handling the polarity of chip selects, the driver shall not alter the GPIO value anymore when SPI_CS_HIGH is not set in spi->mode. Fixes: 766c6b63aa04 ("spi: fix client driver breakages when using GPIO descriptors") Cc: stable@vger.kernel.org Signed-off-by: Christophe Leroy Link: https://lore.kernel.org/r/6b51cc2bfbca70d3e9b9da7b7aa4c7a9d793ca0e.1610629002.git.christophe.leroy@csgroup.eu Signed-off-by: Mark Brown commit 67ea698c3950d10925be33c21ca49ffb64e21842 Author: Takashi Iwai Date: Thu Jan 14 08:24:53 2021 +0100 ALSA: hda/via: Add minimum mute flag It turned out that VIA codecs also mute the sound in the lowest mixer level. Turn on the dac_min_mute flag to indicate the mute-as-minimum in TLV like already done in Conexant and IDT codecs. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=210559 Cc: Link: https://lore.kernel.org/r/20210114072453.11379-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 7de843dbaaa68aa514090e6226ed7c6374fd7e49 Author: Nicholas Miell Date: Sun Jan 10 22:09:25 2021 -0800 HID: logitech-hidpp: Add product ID for MX Ergo in Bluetooth mode The Logitech MX Ergo trackball supports HID++ 4.5 over Bluetooth. Add its product ID to the table so we can get battery monitoring support. (The hid-logitech-hidpp driver already recognizes it when connected via a Unifying Receiver.) [jkosina@suse.cz: fix whitespace damage] Signed-off-by: Nicholas Miell Reviewed-by: Hans de Goede Signed-off-by: Jiri Kosina commit 3c516e038f0cc3915825bdac619d448c2b1811f2 Author: Qiuxu Zhuo Date: Thu Jan 14 15:19:23 2021 +0800 Documentation: ACPI: EINJ: Fix error type values for PCIe errors Fix the error type value for PCI Express uncorrectable non-fatal error to 0x00000080 and fix the error type value for PCI Express uncorrectable fatal error to 0x00000100. See Advanced Configuration and Power Interface Specification, version 6.2, table "18-409 Error Type Definition". Signed-off-by: Qiuxu Zhuo Reported-by: Lijian Zhao [ rjw: Subject edits ] Signed-off-by: Rafael J. Wysocki commit 495dc7637cb5ca8e39c46db818328410bb6e73a1 Author: Chris Chiu Date: Thu Jan 14 16:27:28 2021 +0800 ALSA: hda/realtek - Limit int mic boost on Acer Aspire E5-575T The Acer Apire E5-575T laptop with codec ALC255 has a terrible background noise comes from internal mic capture. And the jack sensing dose not work for headset like some other Acer laptops. This patch limits the internal mic boost on top of the existing ALC255_FIXUP_ACER_MIC_NO_PRESENCE quirk for Acer Aspire E5-575T. Signed-off-by: Chris Chiu Cc: Link: https://lore.kernel.org/r/20210114082728.74729-1-chiu@endlessos.org Signed-off-by: Takashi Iwai commit 1eb8f690bcb565a6600f8b6dcc78f7b239ceba17 Author: Borislav Petkov Date: Thu Jan 14 10:36:59 2021 +0100 x86/topology: Make __max_die_per_package available unconditionally Move it outside of CONFIG_SMP in order to avoid ifdeffery at the usage sites. Fixes: 76e2fc63ca40 ("x86/cpu/amd: Set __max_die_per_package on AMD") Reported-by: Stephen Rothwell Reported-by: kernel test robot Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210114111814.5346-1-bp@alien8.de commit 7ba8b4380afbdbb29d53c50bee6563cd7457fc34 Author: Alexandru Elisei Date: Wed Jan 6 14:42:18 2021 +0000 KVM: arm64: Use the reg_to_encoding() macro instead of sys_reg() The reg_to_encoding() macro is a wrapper over sys_reg() and conveniently takes a sys_reg_desc or a sys_reg_params argument and returns the 32 bit register encoding. Use it instead of calling sys_reg() directly. Signed-off-by: Alexandru Elisei Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210106144218.110665-1-alexandru.elisei@arm.com commit 2c91ef39216149df6703c3fa6a47dd9a1e6091c1 Author: David Brazdil Date: Tue Dec 29 16:00:59 2020 +0000 KVM: arm64: Allow PSCI SYSTEM_OFF/RESET to return The KVM/arm64 PSCI relay assumes that SYSTEM_OFF and SYSTEM_RESET should not return, as dictated by the PSCI spec. However, there is firmware out there which breaks this assumption, leading to a hyp panic. Make KVM more robust to broken firmware by allowing these to return. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201229160059.64135-1-dbrazdil@google.com commit 7ded92e25cac9758a755b8f524b11b509c49afe1 Author: Marc Zyngier Date: Wed Jan 6 17:22:28 2021 +0000 KVM: arm64: Simplify handling of absent PMU system registers Now that all PMU registers are gated behind a .visibility callback, remove the other checks against an absent PMU. Signed-off-by: Marc Zyngier commit 11663111cd49b4c6dd27479774e420f139e4c447 Author: Marc Zyngier Date: Wed Jan 6 17:22:27 2021 +0000 KVM: arm64: Hide PMU registers from userspace when not available It appears that while we are now able to properly hide PMU registers from the guest when a PMU isn't available (either because none has been configured, the host doesn't have the PMU support compiled in, or that the HW doesn't have one at all), we are still exposing more than we should to userspace. Introduce a visibility callback gating all the PMU registers, which covers both usrespace and guest. Signed-off-by: Marc Zyngier commit 6e6aa61d81194c01283880950df563b1b9abec46 Author: Alan Stern Date: Wed Jan 13 14:45:10 2021 -0500 USB: gadget: dummy-hcd: Fix errors in port-reset handling Commit c318840fb2a4 ("USB: Gadget: dummy-hcd: Fix shift-out-of-bounds bug") messed up the way dummy-hcd handles requests to turn on the RESET port feature (I didn't notice that the original switch case ended with a fallthrough). The call to set_link_state() was inadvertently removed, as was the code to set the USB_PORT_STAT_RESET flag when the speed is USB2. In addition, the original code never checked whether the port was connected before handling the port-reset request. There was a check for the port being powered, but it was removed by that commit! In practice this doesn't matter much because the kernel doesn't try to reset disconnected ports, but it's still bad form. This patch fixes these problems by changing the fallthrough to break, adding back in the missing set_link_state() call, setting the port-reset status flag, adding a port-is-connected test, and removing a redundant assignment statement. Fixes: c318840fb2a4 ("USB: Gadget: dummy-hcd: Fix shift-out-of-bounds bug") CC: Acked-by: Felipe Balbi Signed-off-by: Alan Stern Link: https://lore.kernel.org/r/20210113194510.GA1290698@rowland.harvard.edu Signed-off-by: Greg Kroah-Hartman commit 53f1e7f6a1720f8299b5283857eedc8f07d29533 Author: mengwang Date: Wed Aug 12 11:49:29 2020 +0800 drm/amdgpu: add new device id for Renior add DID 0x164C into pciidlist under CHIP_RENOIR family. Signed-off-by: mengwang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 5.10.x commit 21702c8cae51535e09b91341a069503c6ef3d2a3 Author: Prike Liang Date: Fri Oct 2 10:58:55 2020 -0400 drm/amdgpu: add green_sardine device id (v2) Add green_sardine PCI id support and map it to renoir asic type. v2: add apu flag Signed-off-by: Prike Liang Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 5.10.x commit 12f2df72205fe348481d941c3e593e8068d2d23d Author: Huang Rui Date: Wed Jan 13 20:13:17 2021 +0800 drm/amdgpu: fix vram type and bandwidth error for DDR5 and DDR4 This patch is to update atomfirmware parser for the memory type and bandwidth of DDR5 and DDR4. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 04eb6e773e9f3167a5921d74e8ad99cdcc4166c3 Author: chen gong Date: Fri Jan 8 12:46:44 2021 +0800 drm/amdgpu/gfx10: add updated GOLDEN_TSC_COUNT_UPPER/LOWER register offsets for VGH The address of the GOLDEN_TSC_COUNT_UPPER/GOLDEN_TSC_COUNT_LOWER for Vnagogh are different from the others. The offset of the GOLDEN_TSC_COUNT_UPPER for Vangogh is 0x0025 by calculation. The offset of the GOLDEN_TSC_COUNT_LOWER for Vangogh is 0x0026 by calculation. Signed-off-by: chen gong Acked-by: Evan Quan Signed-off-by: Alex Deucher commit 8b335bff643f3b39935c7377dbcd361c5b605d98 Author: Jeremy Cline Date: Mon Jan 11 16:05:28 2021 -0500 drm/amdkfd: Fix out-of-bounds read in kdf_create_vcrat_image_cpu() KASAN reported a slab-out-of-bounds read of size 1 in kdf_create_vcrat_image_cpu(). This occurs when, for example, when on an x86_64 with a single NUMA node because kfd_fill_iolink_info_for_cpu() is a no-op, but afterwards the sub_type_hdr->length, which is out-of-bounds, is read and multiplied by entries. Fortunately, entries is 0 in this case so the overall crat_table->length is still correct. Check if there were any entries before de-referencing sub_type_hdr which may be pointing to out-of-bounds memory. Fixes: b7b6c38529c9 ("drm/amdkfd: Calculate CPU VCRAT size dynamically (v2)") Suggested-by: Felix Kuehling Signed-off-by: Jeremy Cline Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 4eec66c014e9a406d8d453de958f6791d05427e4 Author: Rodrigo Siqueira Date: Mon Jan 11 11:31:51 2021 -0500 Revert "drm/amd/display: Fixed Intermittent blue screen on OLED panel" commit a861736dae64 ("drm/amd/display: Fixed Intermittent blue screen on OLED panel") causes power regression for many users. It seems that this change causes the MCLK to get forced high; this creates a regression for many users since their devices were not able to drop to a low state after this change. For this reason, this reverts commit a861736dae644a0d7abbca0c638ae6aad28feeb8. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1407 Cc: Aurabindo Pillai Cc: Alex Deucher Cc: Harry Wentland Cc: Naveed Ashfaq Cc: Hersen Wu Cc: Roman Li Acked-by: Alex Deucher Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 9d03bb102028b4a3f4a64d6069b219e2e1c1f306 Author: Li, Roman Date: Wed Dec 30 18:03:02 2020 +0000 drm/amd/display: disable dcn10 pipe split by default [Why] The initial purpose of dcn10 pipe split is to support some high bandwidth mode which requires dispclk greater than max dispclk. By initial bring up power measurement data, it showed power consumption is less with pipe split for dcn block. This could be reason for enable pipe split by default. By battery life measurement of some Chromebooks, result shows battery life is longer with pipe split disabled. [How] Disable pipe split by default. Pipe split could be still enabled when required dispclk is greater than max dispclk. Tested-by: Daniel Wheeler Signed-off-by: Hersen Wu Signed-off-by: Roman Li Reviewed-by: Roman Li Signed-off-by: Alex Deucher commit 0eb31a82e378cab17beec1d213e1414e9fea1767 Author: Nikola Cornij Date: Tue Dec 29 23:33:32 2020 -0500 drm/amd/display: Add a missing DCN3.01 API mapping [why] Required for DSC MST Tested-by: Daniel Wheeler Signed-off-by: Nikola Cornij Reviewed-by: Zhan Liu Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 4336be4b07ed3b03a18ac35564c3127eeea05ab6 Author: Wesley Chalmers Date: Mon Dec 14 15:35:02 2020 -0500 drm/amd/display: Initialize stack variable [WHY] The stack variable "val" is potentially unpopulate it, so initialize it with the value 0xf (indicating an invalid mux) Tested-by: Daniel Wheeler Signed-off-by: Wesley Chalmers Reviewed-by: Martin Leung Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 73644143b31cb95866c19e0d94be9e3127ec3a6b Author: Qingqing Zhuo Date: Wed Dec 9 18:04:04 2020 -0500 drm/amd/display: NULL pointer hang [Why] In dc_link_dp_set_test_pattern, we assume all pipes have a stream, which can cause null pointer dereference. [How] Add a null pointer check before accessing stream. Tested-by: Daniel Wheeler Signed-off-by: Qingqing Zhuo Reviewed-by: Nicholas Kazlauskas Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit f14a5c34d143f6627f0be70c0de1d962f3a6ff1c Author: Victor Zhao Date: Tue Jan 5 15:04:01 2021 +0800 drm/amdgpu/psp: fix psp gfx ctrl cmds psp GFX_CTRL_CMD_ID_CONSUME_CMD different for windows and linux, according to psp, linux cmds are not correct. v2: only correct GFX_CTRL_CMD_ID_CONSUME_CMD. Signed-off-by: Victor Zhao Reviewed-by: Emily.Deng Signed-off-by: Alex Deucher commit ff9346dbabbb6595c5c20d90d88ae4a2247487a9 Author: Alexandre Demers Date: Thu Jan 7 18:53:03 2021 -0500 drm/amdgpu: fix DRM_INFO flood if display core is not supported (bug 210921) This fix bug 210921 where DRM_INFO floods log when hitting an unsupported ASIC in amdgpu_device_asic_has_dc_support(). This info should be only called once. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=210921 Signed-off-by: Alexandre Demers Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 101c2fae5108d78915517d0279323ee215e70df2 Author: Alex Deucher Date: Tue Jan 5 15:14:29 2021 -0500 MAINTAINERS: update radeon/amdgpu/amdkfd git trees FDO is out of space, so move to gitlab. Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 0983834a83931606a647c275e5d4165ce4e7b49f Author: Sagar Shrikant Kadam Date: Tue Nov 10 07:22:12 2020 -0800 riscv: defconfig: enable gpio support for HiFive Unleashed Ethernet phy VSC8541-01 on HiFive Unleashed has its reset line connected to a gpio, so enable GPIO driver's required to reset the phy. Signed-off-by: Sagar Shrikant Kadam Signed-off-by: Palmer Dabbelt commit a0fa9d727043da2238432471e85de0bdb8a8df65 Author: Sagar Shrikant Kadam Date: Tue Nov 10 07:22:11 2020 -0800 dts: phy: add GPIO number and active state used for phy reset The GEMGXL_RST line on HiFive Unleashed is pulled low and is using GPIO number 12. Add these reset-gpio details to dt-node using which the linux phylib can reset the phy. Signed-off-by: Sagar Shrikant Kadam Signed-off-by: Palmer Dabbelt commit be969b7cfbcfa8a835a528f1dc467f0975c6d883 Author: Sagar Shrikant Kadam Date: Tue Nov 10 07:22:10 2020 -0800 dts: phy: fix missing mdio device and probe failure of vsc8541-01 device HiFive unleashed A00 board has VSC8541-01 ethernet phy, this device is identified as a Revision B device as described in device identification registers. In order to use this phy in the unmanaged mode, it requires a specific reset sequence of logical 0-1-0-1 transition on the NRESET pin as documented here [1]. Currently, the bootloader (fsbl or u-boot-spl) takes care of the phy reset. If due to some reason the phy device hasn't received the reset by the prior stages before the linux macb driver comes into the picture, the MACB mii bus gets probed but the mdio scan fails and is not even able to read the phy ID registers. It gives an error message: "libphy: MACB_mii_bus: probed mdio_bus 10090000.ethernet-ffffffff: MDIO device at address 0 is missing." Thus adding the device OUI (Organizationally Unique Identifier) to the phy device node helps to probe the phy device. [1]: VSC8541-01 datasheet: https://www.mouser.com/ds/2/523/Microsemi_VSC8541-01_Datasheet_10496_V40-1148034.pdf Signed-off-by: Sagar Shrikant Kadam Signed-off-by: Palmer Dabbelt commit 41131a5e54ae7ba5a2bb8d7b30d1818b3f5b13d2 Author: Andreas Schwab Date: Tue Jan 12 11:55:15 2021 +0000 powerpc/vdso: Fix clock_gettime_fallback for vdso32 The second argument of __kernel_clock_gettime64 points to a struct __kernel_timespec, with 64-bit time_t, so use the clock_gettime64 syscall in the fallback function for the 32-bit VDSO. Similarly, clock_getres_fallback should use the clock_getres_time64 syscall, though it isn't yet called from the 32-bit VDSO. Fixes: d0e3fc69d00d ("powerpc/vdso: Provide __kernel_clock_gettime64() on vdso32") Signed-off-by: Andreas Schwab [chleroy: Moved into a single #ifdef __powerpc64__ block] Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/0c0ab0eb3cc80687c326f76ff0dd5762b8812ecc.1610452505.git.christophe.leroy@csgroup.eu commit c25a053e15778f6b4d6553708673736e27a6c2cf Author: Nick Hu Date: Wed Jan 13 10:24:10 2021 +0800 riscv: Fix KASAN memory mapping. Use virtual address instead of physical address when translating the address to shadow memory by kasan_mem_to_shadow(). Signed-off-by: Nick Hu Signed-off-by: Nylon Chen Fixes: b10d6bca8720 ("arch, drivers: replace for_each_membock() with for_each_mem_range()") Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt commit 5b55299eed78538cc4746e50ee97103a1643249c Author: David Wu Date: Wed Jan 13 11:41:09 2021 +0800 net: stmmac: Fixed mtu channged by cache aligned Since the original mtu is not used when the mtu is updated, the mtu is aligned with cache, this will get an incorrect. For example, if you want to configure the mtu to be 1500, but mtu 1536 is configured in fact. Fixed: eaf4fac478077 ("net: stmmac: Do not accept invalid MTU values") Signed-off-by: David Wu Link: https://lore.kernel.org/r/20210113034109.27865-1-david.wu@rock-chips.com Signed-off-by: Jakub Kicinski commit 4237e9f4a96228ccc8a7abe5e4b30834323cd353 Author: Gilad Reti Date: Wed Jan 13 07:38:08 2021 +0200 selftests/bpf: Add verifier test for PTR_TO_MEM spill Add a test to check that the verifier is able to recognize spilling of PTR_TO_MEM registers, by reserving a ringbuf buffer, forcing the spill of a pointer holding the buffer address to the stack, filling it back in from the stack and writing to the memory area pointed by it. The patch was partially contributed by CyberArk Software, Inc. Signed-off-by: Gilad Reti Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Acked-by: KP Singh Link: https://lore.kernel.org/bpf/20210113053810.13518-2-gilad.reti@gmail.com commit 744ea4e3885eccb6d332a06fae9eb7420a622c0f Author: Gilad Reti Date: Wed Jan 13 07:38:07 2021 +0200 bpf: Support PTR_TO_MEM{,_OR_NULL} register spilling Add support for pointer to mem register spilling, to allow the verifier to track pointers to valid memory addresses. Such pointers are returned for example by a successful call of the bpf_ringbuf_reserve helper. The patch was partially contributed by CyberArk Software, Inc. Fixes: 457f44363a88 ("bpf: Implement BPF ring buffer and verifier support for it") Suggested-by: Yonghong Song Signed-off-by: Gilad Reti Signed-off-by: Alexei Starovoitov Acked-by: KP Singh Link: https://lore.kernel.org/bpf/20210113053810.13518-1-gilad.reti@gmail.com commit 8ad2a970d2010add3963e7219eb50367ab3fa4eb Author: Ayush Sawal Date: Tue Jan 12 11:06:00 2021 +0530 cxgb4/chtls: Fix tid stuck due to wrong update of qid TID stuck is seen when there is a race in CPL_PASS_ACCEPT_RPL/CPL_ABORT_REQ and abort is arriving before the accept reply, which sets the queue number. In this case HW ends up sending CPL_ABORT_RPL_RSS to an incorrect ingress queue. V1->V2: - Removed the unused variable len in chtls_set_quiesce_ctrl(). V2->V3: - As kfree_skb() has a check for null skb, so removed this check before calling kfree_skb() in func chtls_send_reset(). Fixes: cc35c88ae4db ("crypto : chtls - CPL handler definition") Signed-off-by: Rohit Maheshwari Signed-off-by: Ayush Sawal Link: https://lore.kernel.org/r/20210112053600.24590-1-ayush.sawal@chelsio.com Signed-off-by: Jakub Kicinski commit 7128c834d30e6b2cf649f14d8fc274941786d0e1 Author: Cristian Dumitrescu Date: Mon Jan 11 18:11:38 2021 +0000 i40e: fix potential NULL pointer dereferencing Currently, the function i40e_construct_skb_zc only frees the input xdp buffer when the output skb is successfully built. On error, the function i40e_clean_rx_irq_zc does not commit anything for the current packet descriptor and simply exits the packet descriptor processing loop, with the plan to restart the processing of this descriptor on the next invocation. Therefore, on error the ring next-to-clean pointer should not advance, the xdp i.e. *bi buffer should not be freed and the current buffer info should not be invalidated by setting *bi to NULL. Therefore, the *bi should only be set to NULL when the function i40e_construct_skb_zc is successful, otherwise a NULL *bi will be dereferenced when the work for the current descriptor is eventually restarted. Fixes: 3b4f0b66c2b3 ("i40e, xsk: Migrate to new MEM_TYPE_XSK_BUFF_POOL") Signed-off-by: Cristian Dumitrescu Acked-by: Björn Töpel Link: https://lore.kernel.org/r/20210111181138.49757-1-cristian.dumitrescu@intel.com Signed-off-by: Jakub Kicinski commit 7ac6ad051150592557520b45773201b987ecfce3 Author: Song Liu Date: Tue Jan 12 15:42:54 2021 -0800 bpf: Reject too big ctx_size_in for raw_tp test run syzbot reported a WARNING for allocating too big memory: WARNING: CPU: 1 PID: 8484 at mm/page_alloc.c:4976 __alloc_pages_nodemask+0x5f8/0x730 mm/page_alloc.c:5011 Modules linked in: CPU: 1 PID: 8484 Comm: syz-executor862 Not tainted 5.11.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:__alloc_pages_nodemask+0x5f8/0x730 mm/page_alloc.c:4976 Code: 00 00 0c 00 0f 85 a7 00 00 00 8b 3c 24 4c 89 f2 44 89 e6 c6 44 24 70 00 48 89 6c 24 58 e8 d0 d7 ff ff 49 89 c5 e9 ea fc ff ff <0f> 0b e9 b5 fd ff ff 89 74 24 14 4c 89 4c 24 08 4c 89 74 24 18 e8 RSP: 0018:ffffc900012efb10 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 1ffff9200025df66 RCX: 0000000000000000 RDX: 0000000000000000 RSI: dffffc0000000000 RDI: 0000000000140dc0 RBP: 0000000000140dc0 R08: 0000000000000000 R09: 0000000000000000 R10: ffffffff81b1f7e1 R11: 0000000000000000 R12: 0000000000000014 R13: 0000000000000014 R14: 0000000000000000 R15: 0000000000000000 FS: 000000000190c880(0000) GS:ffff8880b9e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f08b7f316c0 CR3: 0000000012073000 CR4: 00000000001506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: alloc_pages_current+0x18c/0x2a0 mm/mempolicy.c:2267 alloc_pages include/linux/gfp.h:547 [inline] kmalloc_order+0x2e/0xb0 mm/slab_common.c:837 kmalloc_order_trace+0x14/0x120 mm/slab_common.c:853 kmalloc include/linux/slab.h:557 [inline] kzalloc include/linux/slab.h:682 [inline] bpf_prog_test_run_raw_tp+0x4b5/0x670 net/bpf/test_run.c:282 bpf_prog_test_run kernel/bpf/syscall.c:3120 [inline] __do_sys_bpf+0x1ea9/0x4f10 kernel/bpf/syscall.c:4398 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x440499 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 7b 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007ffe1f3bfb18 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440499 RDX: 0000000000000048 RSI: 0000000020000600 RDI: 000000000000000a RBP: 00000000006ca018 R08: 0000000000000000 R09: 00000000004002c8 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401ca0 R13: 0000000000401d30 R14: 0000000000000000 R15: 0000000000000000 This is because we didn't filter out too big ctx_size_in. Fix it by rejecting ctx_size_in that are bigger than MAX_BPF_FUNC_ARGS (12) u64 numbers. Fixes: 1b4d60ec162f ("bpf: Enable BPF_PROG_TEST_RUN for raw_tracepoint") Reported-by: syzbot+4f98876664c7337a4ae6@syzkaller.appspotmail.com Signed-off-by: Song Liu Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210112234254.1906829-1-songliubraving@fb.com commit 7b25339f4eafe206c60cc50870523fc84f0f0ea5 Merge: 1f02efd1bb35b ca4c6ebeeb501 Author: Jakub Kicinski Date: Wed Jan 13 19:00:49 2021 -0800 Merge tag 'linux-can-fixes-for-5.11-20210113' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2021-01-13 The first patch is by Oliver Hartkopp for the CAn ISO-TP protocol and fixes a kernel information leak to userspace. The last patch is by Qinglang Miao for the mcp251xfd driver and fixes a NULL pointer check to work on the correct variable. * tag 'linux-can-fixes-for-5.11-20210113' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can: can: mcp251xfd: mcp251xfd_handle_rxif_one(): fix wrong NULL pointer check can: isotp: isotp_getname(): fix kernel information leak ==================== Link: https://lore.kernel.org/r/20210113212158.925513-1-mkl@pengutronix.de Signed-off-by: Jakub Kicinski commit e6dc077b7dffdc01d9c45a5a1f4caf1e51c756a3 Author: Stafford Horne Date: Tue Jan 12 21:29:24 2021 +0900 soc: litex: Fix compile warning when device tree is not configured The test robot reported: drivers/soc/litex/litex_soc_ctrl.c:143:34: warning: unused variable 'litex_soc_ctrl_of_match' [-Wunused-const-variable] static const struct of_device_id litex_soc_ctrl_of_match[] = { ^ 1 warning generated. As per the random config device tree is not configured causing the litex_soc_ctrl_of_match match list to not be used. This would usually mean that we cannot even use this driver as it depends on device tree, but as we also have COMPILE_TEST configured we allow it. Fix the warning by surrounding the unused variable with an ifdef CONFIG_OF. Reported-by: kernel test robot Signed-off-by: Stafford Horne commit 1f02efd1bb35bee95feed6aab46d1217f29d555b Author: Seb Laveze Date: Tue Jan 12 15:01:22 2021 +0100 net: stmmac: use __napi_schedule() for PREEMPT_RT Use of __napi_schedule_irqoff() is not safe with PREEMPT_RT in which hard interrupts are not disabled while running the threaded interrupt. Using __napi_schedule() works for both PREEMPT_RT and mainline Linux, just at the cost of an additional check if interrupts are disabled for mainline (since they are already disabled). Similar to the fix done for enetc commit 215602a8d212 ("enetc: use napi_schedule to be compatible with PREEMPT_RT") Signed-off-by: Seb Laveze Link: https://lore.kernel.org/r/20210112140121.1487619-1-sebastien.laveze@oss.nxp.com Signed-off-by: Jakub Kicinski commit a2e38dffcd93541914aba52b30c6a52acca35201 Author: Josh Poimboeuf Date: Tue Jan 5 18:04:20 2021 -0600 objtool: Don't add empty symbols to the rbtree Building with the Clang assembler shows the following warning: arch/x86/kernel/ftrace_64.o: warning: objtool: missing symbol for insn at offset 0x16 The Clang assembler strips section symbols. That ends up giving objtool's find_func_containing() much more test coverage than normal. Turns out, find_func_containing() doesn't work so well for overlapping symbols: 2: 000000000000000e 0 NOTYPE LOCAL DEFAULT 2 fgraph_trace 3: 000000000000000f 0 NOTYPE LOCAL DEFAULT 2 trace 4: 0000000000000000 165 FUNC GLOBAL DEFAULT 2 __fentry__ 5: 000000000000000e 0 NOTYPE GLOBAL DEFAULT 2 ftrace_stub The zero-length NOTYPE symbols are inside __fentry__(), confusing the rbtree search for any __fentry__() offset coming after a NOTYPE. Try to avoid this problem by not adding zero-length symbols to the rbtree. They're rare and aren't needed in the rbtree anyway. One caveat, this actually might not end up being the right fix. Non-empty overlapping symbols, if they exist, could have the same problem. But that would need bigger changes, let's see if we can get away with the easy fix for now. Reported-by: Arnd Bergmann Acked-by: Peter Zijlstra (Intel) Signed-off-by: Josh Poimboeuf commit e4ea77f8e53f9accb9371fba34c189d0447ecce0 Author: Takashi Iwai Date: Mon Jan 11 09:16:11 2021 +0100 ALSA: usb-audio: Always apply the hw constraints for implicit fb sync Since the commit 5a6c3e11c9c9 ("ALSA: usb-audio: Add hw constraint for implicit fb sync"), we apply the hw constraints for the implicit feedback sync to make the secondary open aligned with the already opened stream setup. This change assumed that the secondary open is performed after the first stream has been already set up, and adds the hw constraints to sync with the first stream's parameters only when the EP setup for the first stream was confirmed at the open time. However, most of applications handling the full-duplex operations do open both playback and capture streams at first, then set up both streams. This results in skipping the additional hw constraints since the counter-part stream hasn't been set up yet at the open of the second stream, and it eventually leads to "incompatible EP" error in the end. This patch corrects the behavior by always applying the hw constraints for the implicit fb sync. The hw constraint rules are defined so that they check the sync EP dynamically at each invocation, instead. This covers the concurrent stream setups better and lets the hw refine calls resolving to the right configuration. Also this patch corrects a minor error that has existed in the debug print that isn't built as default. Fixes: 5a6c3e11c9c9 ("ALSA: usb-audio: Add hw constraint for implicit fb sync") Link: https://lore.kernel.org/r/20210111081611.12790-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit ca4c6ebeeb50112f5178f14bfb6d9e8ddf148545 Author: Qinglang Miao Date: Wed Jan 13 15:31:00 2021 +0800 can: mcp251xfd: mcp251xfd_handle_rxif_one(): fix wrong NULL pointer check If alloc_canfd_skb() returns NULL, 'cfg' is an uninitialized variable, so we should check 'skb' rather than 'cfd' after calling alloc_canfd_skb(priv->ndev, &cfd). Fixes: 55e5b97f003e ("can: mcp25xxfd: add driver for Microchip MCP25xxFD SPI CAN") Signed-off-by: Qinglang Miao Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210113073100.79552-1-miaoqinglang@huawei.com Signed-off-by: Marc Kleine-Budde commit b42b3a2744b3e8f427de79896720c72823af91ad Author: Oliver Hartkopp Date: Tue Jan 12 10:16:43 2021 +0100 can: isotp: isotp_getname(): fix kernel information leak Initialize the sockaddr_can structure to prevent a data leak to user space. Suggested-by: Cong Wang Reported-by: syzbot+057884e2f453e8afebc8@syzkaller.appspotmail.com Fixes: e057dd3fc20f ("can: add ISO 15765-2:2016 transport protocol") Signed-off-by: Oliver Hartkopp Link: https://lore.kernel.org/r/20210112091643.11789-1-socketcan@hartkopp.net Signed-off-by: Marc Kleine-Budde commit 65f0d2414b7079556fbbcc070b3d1c9f9587606d Merge: e609571b5ffa3 20c7842ed8374 Author: Linus Torvalds Date: Wed Jan 13 11:55:14 2021 -0800 Merge tag 'sound-5.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Here are some piled fixes, hopefully the last big one for 5.11. All changes are device-specific small fixes, and majority of commits are for ASoC while USB-audio got a bit large changes for addressing the regression for devices with quirks" * tag 'sound-5.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (31 commits) ALSA: hda/hdmi - enable runtime pm for CI AMD display audio ALSA: firewire-tascam: Fix integer overflow in midi_port_work() ALSA: fireface: Fix integer overflow in transmit_midi_msg() ALSA: hda/tegra: fix tegra-hda on tegra30 soc clk: tegra30: Add hda clock default rates to clock driver ALSA: doc: Fix reference to mixart.rst ALSA: usb-audio: Fix implicit feedback sync setup for Pioneer devices ALSA: usb-audio: Annotate the endpoint index in audioformat ALSA: usb-audio: Avoid unnecessary interface re-setup ALSA: usb-audio: Choose audioformat of a counter-part substream ALSA: usb-audio: Fix the missing endpoints creations for quirks ALSA: hda/realtek: fix right sounds and mute/micmute LEDs for HP machines ASoC: AMD Renoir - add DMI entry for Lenovo ThinkPad X395 ASoC: amd: Replacing MSI with Legacy IRQ model ASoC: AMD Renoir - add DMI entry for Lenovo ThinkPad E14 Gen 2 ASoC: meson: axg-tdm-interface: fix loopback ASoC: meson: axg-tdmin: fix axg skew offset ASoC: max98373: don't access volatile registers in bias level off ASoC: rt711: mutex between calibration and power state changes ASoC: Intel: haswell: Add missing pm_ops ... commit e54fd0716c3db20c0cba73fee2c3a4274b08c24e Author: YANG LI Date: Wed Dec 30 14:35:45 2020 +0800 cifs: style: replace one-element array with flexible-array There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use "flexible array members"[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9/process/ deprecated.html#zero-length-and-one-element-arrays Signed-off-by: YANG LI Reported-by: Abaci Signed-off-by: Steve French commit ed6b1920f84bc5c3d666dc383ff3bbc60f0f62a5 Author: YANG LI Date: Mon Jan 11 17:15:28 2021 +0800 cifs: connect: style: Simplify bool comparison Fix the following coccicheck warning: ./fs/cifs/connect.c:3740:6-21: WARNING: Comparison of 0/1 to bool variable Signed-off-by: YANG LI Reported-by: Abaci Robot Signed-off-by: Steve French commit c13e7af042270724b42a466edc48a70a43f571f2 Author: Menglong Dong Date: Tue Jan 12 01:13:40 2021 -0800 fs: cifs: remove unneeded variable in smb3_fs_context_dup 'rc' in smb3_fs_context_dup is not used and can be removed. Signed-off-by: Menglong Dong Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 2659d3bff3e1b000f49907d0839178b101a89887 Author: Paulo Alcantara Date: Wed Jan 13 14:16:16 2021 -0300 cifs: fix interrupted close commands Retry close command if it gets interrupted to not leak open handles on the server. Signed-off-by: Paulo Alcantara (SUSE) Reported-by: Duncan Findlay Suggested-by: Pavel Shilovsky Fixes: 6988a619f5b7 ("cifs: allow syscalls to be restarted in __smb_send_rqst()") Cc: stable@vger.kernel.org Reviewd-by: Pavel Shilovsky Signed-off-by: Steve French commit 77b6ec01c29aade01701aa30bf1469acc7f2be76 Author: Tom Rix Date: Tue Jan 5 12:21:26 2021 -0800 cifs: check pointer before freeing clang static analysis reports this problem dfs_cache.c:591:2: warning: Argument to kfree() is a constant address (18446744073709551614), which is not memory allocated by malloc() kfree(vi); ^~~~~~~~~ In dfs_cache_del_vol() the volume info pointer 'vi' being freed is the return of a call to find_vol(). The large constant address is find_vol() returning an error. Add an error check to dfs_cache_del_vol() similar to the one done in dfs_cache_update_vol(). Fixes: 54be1f6c1c37 ("cifs: Add DFS cache routines") Signed-off-by: Tom Rix Reviewed-by: Nathan Chancellor CC: # v5.0+ Signed-off-by: Steve French commit a95d25dd7b94a5ba18246da09b4218f132fed60e Author: Baptiste Lepers Date: Tue Jan 12 15:59:15 2021 +0000 rxrpc: Call state should be read with READ_ONCE() under some circumstances The call state may be changed at any time by the data-ready routine in response to received packets, so if the call state is to be read and acted upon several times in a function, READ_ONCE() must be used unless the call state lock is held. As it happens, we used READ_ONCE() to read the state a few lines above the unmarked read in rxrpc_input_data(), so use that value rather than re-reading it. Fixes: a158bdd3247b ("rxrpc: Fix call timeouts") Signed-off-by: Baptiste Lepers Signed-off-by: David Howells Link: https://lore.kernel.org/r/161046715522.2450566.488819910256264150.stgit@warthog.procyon.org.uk Signed-off-by: Jakub Kicinski commit d52e419ac8b50c8bef41b398ed13528e75d7ad48 Author: David Howells Date: Tue Jan 12 15:23:51 2021 +0000 rxrpc: Fix handling of an unsupported token type in rxrpc_read() Clang static analysis reports the following: net/rxrpc/key.c:657:11: warning: Assigned value is garbage or undefined toksize = toksizes[tok++]; ^ ~~~~~~~~~~~~~~~ rxrpc_read() contains two consecutive loops. The first loop calculates the token sizes and stores the results in toksizes[] and the second one uses the array. When there is an error in identifying the token in the first loop, the token is skipped, no change is made to the toksizes[] array. When the same error happens in the second loop, the token is not skipped. This will cause the toksizes[] array to be out of step and will overrun past the calculated sizes. Fix this by making both loops log a message and return an error in this case. This should only happen if a new token type is incompletely implemented, so it should normally be impossible to trigger this. Fixes: 9a059cd5ca7d ("rxrpc: Downgrade the BUG() for unsupported token type in rxrpc_read()") Reported-by: Tom Rix Signed-off-by: David Howells Reviewed-by: Tom Rix Link: https://lore.kernel.org/r/161046503122.2445787.16714129930607546635.stgit@warthog.procyon.org.uk Signed-off-by: Jakub Kicinski commit 09db7311ca6170d36f2bb8c26eab8fadc4d10b81 Merge: eaa7995c529b5 7c53f6b671f4a Author: Mark Brown Date: Wed Jan 13 17:57:04 2021 +0000 Merge v5.11-rc3 commit cea06d9bf0e035a549226e217022fa51b0c878e5 Merge: 9c25af250214e 7c53f6b671f4a Author: Mark Brown Date: Wed Jan 13 17:56:56 2021 +0000 Merge v5.11-rc3 commit 9c25af250214e45f6d1c21ff6239a1ffeeedf20e Author: Kai Vehmanen Date: Wed Jan 13 17:07:15 2021 +0200 ASoC: SOF: Intel: fix page fault at probe if i915 init fails The earlier commit to fix runtime PM in case i915 init fails, introduces a possibility to hit a page fault. snd_hdac_ext_bus_device_exit() is designed to be called from dev.release(). Calling it outside device reference counting, is not safe and may lead to calling the device_exit() function twice. Additionally, as part of ext_bus_device_init(), the device is also registered with snd_hdac_device_register(). Thus before calling device_exit(), the device must be removed from device hierarchy first. Fix the issue by rolling back init actions by calling hdac_device_unregister() and then releasing device with put_device(). This matches with existing code in hdac-ext module. To complete the fix, add handling for the case where hda_codec_load_module() returns -ENODEV, and clean up the hdac_ext resources also in this case. In future work, hdac-ext interface should be extended to allow clients more flexibility to handle the life-cycle of individual devices, beyond just the current snd_hdac_ext_bus_device_remove(), which removes all devices. BugLink: https://github.com/thesofproject/linux/issues/2646 Reported-by: Jaroslav Kysela Fixes: 6c63c954e1c5 ("ASoC: SOF: fix a runtime pm issue in SOF when HDMI codec doesn't work") Signed-off-by: Kai Vehmanen Reviewed-by: Rander Wang Reviewed-by: Libin Yang Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20210113150715.3992635-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 1e249cb5b7fc09ff216aa5a12f6c302e434e88f9 Author: Eric Biggers Date: Tue Jan 12 11:02:43 2021 -0800 fs: fix lazytime expiration handling in __writeback_single_inode() When lazytime is enabled and an inode is being written due to its in-memory updated timestamps having expired, either due to a sync() or syncfs() system call or due to dirtytime_expire_interval having elapsed, the VFS needs to inform the filesystem so that the filesystem can copy the inode's timestamps out to the on-disk data structures. This is done by __writeback_single_inode() calling mark_inode_dirty_sync(), which then calls ->dirty_inode(I_DIRTY_SYNC). However, this occurs after __writeback_single_inode() has already cleared the dirty flags from ->i_state. This causes two bugs: - mark_inode_dirty_sync() redirties the inode, causing it to remain dirty. This wastefully causes the inode to be written twice. But more importantly, it breaks cases where sync_filesystem() is expected to clean dirty inodes. This includes the FS_IOC_REMOVE_ENCRYPTION_KEY ioctl (as reported at https://lore.kernel.org/r/20200306004555.GB225345@gmail.com), as well as possibly filesystem freezing (freeze_super()). - Since ->i_state doesn't contain I_DIRTY_TIME when ->dirty_inode() is called from __writeback_single_inode() for lazytime expiration, xfs_fs_dirty_inode() ignores the notification. (XFS only cares about lazytime expirations, and it assumes that i_state will contain I_DIRTY_TIME during those.) Therefore, lazy timestamps aren't persisted by sync(), syncfs(), or dirtytime_expire_interval on XFS. Fix this by moving the call to mark_inode_dirty_sync() to earlier in __writeback_single_inode(), before the dirty flags are cleared from i_state. This makes filesystems be properly notified of the timestamp expiration, and it avoids incorrectly redirtying the inode. This fixes xfstest generic/580 (which tests FS_IOC_REMOVE_ENCRYPTION_KEY) when run on ext4 or f2fs with lazytime enabled. It also fixes the new lazytime xfstest I've proposed, which reproduces the above-mentioned XFS bug (https://lore.kernel.org/r/20210105005818.92978-1-ebiggers@kernel.org). Alternatively, we could call ->dirty_inode(I_DIRTY_SYNC) directly. But due to the introduction of I_SYNC_QUEUED, mark_inode_dirty_sync() is the right thing to do because mark_inode_dirty_sync() now knows not to move the inode to a writeback list if it is currently queued for sync. Fixes: 0ae45f63d4ef ("vfs: add support for a lazytime mount option") Cc: stable@vger.kernel.org Depends-on: 5afced3bf281 ("writeback: Avoid skipping inode writeback") Link: https://lore.kernel.org/r/20210112190253.64307-2-ebiggers@kernel.org Suggested-by: Jan Kara Reviewed-by: Christoph Hellwig Reviewed-by: Jan Kara Signed-off-by: Eric Biggers Signed-off-by: Jan Kara commit 5e941fc033e411118fb3a7d9e0b97f8cf702cd39 Author: Kai Vehmanen Date: Wed Jan 13 17:56:29 2021 +0200 ALSA: hda: Add AlderLake-P PCI ID and HDMI codec vid Add HD Audio PCI ID and HDMI codec vendor ID for Intel AlderLake-P. Signed-off-by: Kai Vehmanen Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20210113155629.4097057-1-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai commit 06585c497b55045ec21aa8128e340f6a6587351c Author: Pavel Begunkov Date: Wed Jan 13 12:42:25 2021 +0000 io_uring: do sqo disable on install_fd error WARNING: CPU: 0 PID: 8494 at fs/io_uring.c:8717 io_ring_ctx_wait_and_kill+0x4f2/0x600 fs/io_uring.c:8717 Call Trace: io_uring_release+0x3e/0x50 fs/io_uring.c:8759 __fput+0x283/0x920 fs/file_table.c:280 task_work_run+0xdd/0x190 kernel/task_work.c:140 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop kernel/entry/common.c:174 [inline] exit_to_user_mode_prepare+0x249/0x250 kernel/entry/common.c:201 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline] syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:302 entry_SYSCALL_64_after_hwframe+0x44/0xa9 failed io_uring_install_fd() is a special case, we don't do io_ring_ctx_wait_and_kill() directly but defer it to fput, though still need to io_disable_sqo_submit() before. note: it doesn't fix any real problem, just a warning. That's because sqring won't be available to the userspace in this case and so SQPOLL won't submit anything. Reported-by: syzbot+9c9c35374c0ecac06516@syzkaller.appspotmail.com Fixes: d9d05217cb69 ("io_uring: stop SQPOLL submit on creator's death") Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit b4411616c26f26c4017b8fa4d3538b1a02028733 Author: Pavel Begunkov Date: Wed Jan 13 12:42:24 2021 +0000 io_uring: fix null-deref in io_disable_sqo_submit general protection fault, probably for non-canonical address 0xdffffc0000000022: 0000 [#1] KASAN: null-ptr-deref in range [0x0000000000000110-0x0000000000000117] RIP: 0010:io_ring_set_wakeup_flag fs/io_uring.c:6929 [inline] RIP: 0010:io_disable_sqo_submit+0xdb/0x130 fs/io_uring.c:8891 Call Trace: io_uring_create fs/io_uring.c:9711 [inline] io_uring_setup+0x12b1/0x38e0 fs/io_uring.c:9739 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 io_disable_sqo_submit() might be called before user rings were allocated, don't do io_ring_set_wakeup_flag() in those cases. Reported-by: syzbot+ab412638aeb652ded540@syzkaller.appspotmail.com Fixes: d9d05217cb69 ("io_uring: stop SQPOLL submit on creator's death") Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit ef4d764c99f792b725d4754a3628830f094f5c58 Author: Kai-Heng Feng Date: Wed Jan 13 02:11:25 2021 +0800 ASoC: SOF: Intel: hda: Avoid checking jack on system suspend System takes a very long time to suspend after commit 215a22ed31a1 ("ALSA: hda: Refactor codec PM to use direct-complete optimization"): [ 90.065964] PM: suspend entry (s2idle) [ 90.067337] Filesystems sync: 0.001 seconds [ 90.185758] Freezing user space processes ... (elapsed 0.002 seconds) done. [ 90.188713] OOM killer disabled. [ 90.188714] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done. [ 90.190024] printk: Suspending console(s) (use no_console_suspend to debug) [ 90.904912] intel_pch_thermal 0000:00:12.0: CPU-PCH is cool [49C], continue to suspend [ 321.262505] snd_hda_codec_realtek ehdaudio0D0: Unable to sync register 0x2b8000. -5 [ 328.426919] snd_hda_codec_realtek ehdaudio0D0: Unable to sync register 0x2b8000. -5 [ 329.490933] ACPI: EC: interrupt blocked That commit keeps the codec suspended during the system suspend. However, mute/micmute LED will clear codec's direct-complete flag by dpm_clear_superiors_direct_complete(). This doesn't play well with SOF driver. When its runtime resume is called for system suspend, hda_codec_jack_check() schedules jackpoll_work which uses snd_hdac_is_power_on() to check whether codec is suspended. Because the direct-complete path isn't taken, pm_runtime_disable() isn't called so snd_hdac_is_power_on() returns false and jackpoll continues to run, and snd_hda_power_up_pm() cannot power up an already suspended codec in multiple attempts, causes the long delay on system suspend: if (dev->power.direct_complete) { if (pm_runtime_status_suspended(dev)) { pm_runtime_disable(dev); if (pm_runtime_status_suspended(dev)) { pm_dev_dbg(dev, state, "direct-complete "); goto Complete; } pm_runtime_enable(dev); } dev->power.direct_complete = false; } When direct-complete path is taken, snd_hdac_is_power_on() returns true and hda_jackpoll_work() is skipped by accident. So this is still not correct. If we were to use snd_hdac_is_power_on() in system PM path, pm_runtime_status_suspended() should be used instead of pm_runtime_suspended(), otherwise pm_runtime_{enable,disable}() may change the outcome of snd_hdac_is_power_on(). Because devices suspend in reverse order (i.e. child first), it doesn't make much sense to resume an already suspended codec from audio controller. So avoid the issue by making sure jackpoll isn't used in system PM process. Fixes: 215a22ed31a1 ("ALSA: hda: Refactor codec PM to use direct-complete optimization") Signed-off-by: Kai-Heng Feng Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20210112181128.1229827-3-kai.heng.feng@canonical.com Signed-off-by: Mark Brown commit 31ba0c0776027896553bd8477baff7c8b5d95699 Author: Kai-Heng Feng Date: Wed Jan 13 02:11:24 2021 +0800 ASoC: SOF: Intel: hda: Modify existing helper to disable WAKEEN Modify hda_codec_jack_wake_enable() to also support disable WAKEEN. In addition, this patch also moves the WAKEEN disablement call out of hda_codec_jack_check() into hda_codec_jack_wake_enable(). This is a preparation for next patch. No functional change intended. Signed-off-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20210112181128.1229827-2-kai.heng.feng@canonical.com Signed-off-by: Mark Brown commit bcd7059abc19e6ec5b2260dff6a008fb99c4eef9 Author: Kai-Heng Feng Date: Wed Jan 13 02:11:23 2021 +0800 ASoC: SOF: Intel: hda: Resume codec to do jack detection Instead of queueing jackpoll_work, runtime resume the codec to let it use different jack detection methods based on jackpoll_interval. This partially matches SOF driver's behavior with commit a6e7d0a4bdb0 ("ALSA: hda: fix jack detection with Realtek codecs when in D3"), the difference is SOF unconditionally resumes the codec. Signed-off-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20210112181128.1229827-1-kai.heng.feng@canonical.com Signed-off-by: Mark Brown commit 3d7746bea92530e8695258a3cf3ddec7a135edd6 Author: David Woodhouse Date: Wed Jan 6 15:39:58 2021 +0000 x86/xen: Fix xen_hvm_smp_init() when vector callback not available Only the IPI-related functions in the smp_ops should be conditional on the vector callback being available. The rest should still happen: • xen_hvm_smp_prepare_boot_cpu() This function does two things, both of which should still happen if there is no vector callback support. The call to xen_vcpu_setup() for vCPU0 should still happen as it just sets up the vcpu_info for CPU0. That does happen for the secondary vCPUs too, from xen_cpu_up_prepare_hvm(). The second thing it does is call xen_init_spinlocks(), which perhaps counter-intuitively should *also* still be happening in the case without vector callbacks, so that it can clear its local xen_pvspin flag and disable the virt_spin_lock_key accordingly. Checking xen_have_vector_callback in xen_init_spinlocks() itself would affect PV guests, so set the global nopvspin flag in xen_hvm_smp_init() instead, when vector callbacks aren't available. • xen_hvm_smp_prepare_cpus() This does some IPI-related setup by calling xen_smp_intr_init() and xen_init_lock_cpu(), which can be made conditional. And it sets the xen_vcpu_id to XEN_VCPU_ID_INVALID for all possible CPUS, which does need to happen. • xen_smp_cpus_done() This offlines any vCPUs which doesn't fit in the global shared_info page, if separate vcpu_info placement isn't available. That part also needs to happen regardless of vector callback support. • xen_hvm_cpu_die() This doesn't actually do anything other than commin_cpu_die() right right now in the !vector_callback case; all three teardown functions it calls should be no-ops. But to guard against future regressions it's useful to call it anyway, and for it to explicitly check for xen_have_vector_callback before calling those additional functions. Signed-off-by: David Woodhouse Reviewed-by: Boris Ostrovsky Link: https://lore.kernel.org/r/20210106153958.584169-6-dwmw2@infradead.org Signed-off-by: Juergen Gross commit 4621dc6a5bf1235249e92231db30c96dfd1a18b9 Author: David Woodhouse Date: Wed Jan 6 15:39:57 2021 +0000 x86/xen: Don't register Xen IPIs when they aren't going to be used In the case where xen_have_vector_callback is false, we still register the IPI vectors in xen_smp_intr_init() for the secondary CPUs even though they aren't going to be used. Stop doing that. Signed-off-by: David Woodhouse Reviewed-by: Boris Ostrovsky Link: https://lore.kernel.org/r/20210106153958.584169-5-dwmw2@infradead.org Signed-off-by: Juergen Gross commit b36b0fe96af13460278bf9b173beced1bd15f85d Author: David Woodhouse Date: Wed Jan 6 15:39:56 2021 +0000 x86/xen: Add xen_no_vector_callback option to test PCI INTX delivery It's useful to be able to test non-vector event channel delivery, to make sure Linux will work properly on older Xen which doesn't have it. It's also useful for those working on Xen and Xen-compatible hypervisors, because there are guest kernels still in active use which use PCI INTX even when vector delivery is available. Signed-off-by: David Woodhouse Reviewed-by: Boris Ostrovsky Link: https://lore.kernel.org/r/20210106153958.584169-4-dwmw2@infradead.org Signed-off-by: Juergen Gross commit 8f4fd86aa5d6aa122619623910065d236592e37c Author: David Woodhouse Date: Wed Jan 6 15:39:55 2021 +0000 xen: Set platform PCI device INTX affinity to CPU0 With INTX or GSI delivery, Xen uses the event channel structures of CPU0. If the interrupt gets handled by Linux on a different CPU, then no events are seen as pending. Rather than introducing locking to allow other CPUs to process CPU0's events, just ensure that the PCI interrupts happens only on CPU0. Signed-off-by: David Woodhouse Reviewed-by: Boris Ostrovsky Link: https://lore.kernel.org/r/20210106153958.584169-3-dwmw2@infradead.org Signed-off-by: Juergen Gross commit 3499ba8198cad47b731792e5e56b9ec2a78a83a2 Author: David Woodhouse Date: Wed Jan 13 13:26:02 2021 +0000 xen: Fix event channel callback via INTX/GSI For a while, event channel notification via the PCI platform device has been broken, because we attempt to communicate with xenstore before we even have notifications working, with the xs_reset_watches() call in xs_init(). We tend to get away with this on Xen versions below 4.0 because we avoid calling xs_reset_watches() anyway, because xenstore might not cope with reading a non-existent key. And newer Xen *does* have the vector callback support, so we rarely fall back to INTX/GSI delivery. To fix it, clean up a bit of the mess of xs_init() and xenbus_probe() startup. Call xs_init() directly from xenbus_init() only in the !XS_HVM case, deferring it to be called from xenbus_probe() in the XS_HVM case instead. Then fix up the invocation of xenbus_probe() to happen either from its device_initcall if the callback is available early enough, or when the callback is finally set up. This means that the hack of calling xenbus_probe() from a workqueue after the first interrupt, or directly from the PCI platform device setup, is no longer needed. Signed-off-by: David Woodhouse Reviewed-by: Boris Ostrovsky Link: https://lore.kernel.org/r/20210113132606.422794-2-dwmw2@infradead.org Signed-off-by: Juergen Gross commit c35a824c31834d947fb99b0c608c1b9f922b4ba0 Author: Arnd Bergmann Date: Fri Jan 8 10:19:56 2021 +0100 arm64: make atomic helpers __always_inline With UBSAN enabled and building with clang, there are occasionally warnings like WARNING: modpost: vmlinux.o(.text+0xc533ec): Section mismatch in reference from the function arch_atomic64_or() to the variable .init.data:numa_nodes_parsed The function arch_atomic64_or() references the variable __initdata numa_nodes_parsed. This is often because arch_atomic64_or lacks a __initdata annotation or the annotation of numa_nodes_parsed is wrong. for functions that end up not being inlined as intended but operating on __initdata variables. Mark these as __always_inline, along with the corresponding asm-generic wrappers. Signed-off-by: Arnd Bergmann Acked-by: Will Deacon Link: https://lore.kernel.org/r/20210108092024.4034860-1-arnd@kernel.org Signed-off-by: Catalin Marinas commit 71e70184f1d1314ad56e834d1befc07daa2af8e6 Author: Jianlin Lv Date: Tue Jan 12 09:58:13 2021 +0800 arm64: rename S_FRAME_SIZE to PT_REGS_SIZE S_FRAME_SIZE is the size of the pt_regs structure, no longer the size of the kernel stack frame, the name is misleading. In keeping with arm32, rename S_FRAME_SIZE to PT_REGS_SIZE. Signed-off-by: Jianlin Lv Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20210112015813.2340969-1-Jianlin.Lv@arm.com Signed-off-by: Catalin Marinas commit b90d72a6bfdb5e5c62cd223a8cdf4045bfbcb94d Author: Will Deacon Date: Tue Jan 12 22:18:55 2021 +0000 Revert "arm64: Enable perf events based hard lockup detector" This reverts commit 367c820ef08082e68df8a3bc12e62393af21e4b5. lockup_detector_init() makes heavy use of per-cpu variables and must be called with preemption disabled. Usually, it's handled early during boot in kernel_init_freeable(), before SMP has been initialised. Since we do not know whether or not our PMU interrupt can be signalled as an NMI until considerably later in the boot process, the Arm PMU driver attempts to re-initialise the lockup detector off the back of a device_initcall(). Unfortunately, this is called from preemptible context and results in the following splat: | BUG: using smp_processor_id() in preemptible [00000000] code: swapper/0/1 | caller is debug_smp_processor_id+0x20/0x2c | CPU: 2 PID: 1 Comm: swapper/0 Not tainted 5.10.0+ #276 | Hardware name: linux,dummy-virt (DT) | Call trace: | dump_backtrace+0x0/0x3c0 | show_stack+0x20/0x6c | dump_stack+0x2f0/0x42c | check_preemption_disabled+0x1cc/0x1dc | debug_smp_processor_id+0x20/0x2c | hardlockup_detector_event_create+0x34/0x18c | hardlockup_detector_perf_init+0x2c/0x134 | watchdog_nmi_probe+0x18/0x24 | lockup_detector_init+0x44/0xa8 | armv8_pmu_driver_init+0x54/0x78 | do_one_initcall+0x184/0x43c | kernel_init_freeable+0x368/0x380 | kernel_init+0x1c/0x1cc | ret_from_fork+0x10/0x30 Rather than bodge this with raw_smp_processor_id() or randomly disabling preemption, simply revert the culprit for now until we figure out how to do this properly. Reported-by: Lecopzer Chen Signed-off-by: Will Deacon Acked-by: Mark Rutland Cc: Sumit Garg Cc: Alexandru Elisei Link: https://lore.kernel.org/r/20201221162249.3119-1-lecopzer.chen@mediatek.com Link: https://lore.kernel.org/r/20210112221855.10666-1-will@kernel.org Signed-off-by: Catalin Marinas commit ce09ccc50208c04a1b03abfd530b5d6314258fd0 Author: Thomas Gleixner Date: Wed Jan 13 15:43:18 2021 +0100 genirq: Export irq_check_status_bit() One of the users can be built modular: ERROR: modpost: "irq_check_status_bit" [drivers/perf/arm_spe_pmu.ko] undefined! Fixes: fdd029630434 ("genirq: Move status flag checks to core") Reported-by: Guenter Roeck Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201227192049.GA195845@roeck-us.net commit 5f39d2713bd80e8a3e6d9299930aec8844872c0e Author: Chuck Lever Date: Sun Jan 3 14:39:27 2021 -0500 SUNRPC: Move the svc_xdr_recvfrom tracepoint again Commit 156708adf2d9 ("SUNRPC: Move the svc_xdr_recvfrom() tracepoint") tried to capture the correct XID in the trace record, but this line in svc_recv: rqstp->rq_xid = svc_getu32(&rqstp->rq_arg.head[0]); alters the size of rq_arg.head[0].iov_len. The tracepoint records the correct XID but an incorrect value for the length of the xdr_buf's head. To keep the trace callsites simple, I've created two trace classes. One assumes the xdr_buf contains a full RPC message, and the XID can be extracted from it. The other assumes the contents of the xdr_buf are arbitrary, and the xid will be provided by the caller. Currently there is only one user of each class, but I expect we will need a few more tracepoints using each class as time goes on. Signed-off-by: Chuck Lever commit df06824767cc9a32fbdb0e3d3b7e169292a5b5fe Author: Mark Rutland Date: Thu Jan 7 14:53:10 2021 +0000 arm64: entry: remove redundant IRQ flag tracing All EL0 returns go via ret_to_user(), which masks IRQs and notifies lockdep and tracing before calling into do_notify_resume(). Therefore, there's no need for do_notify_resume() to call trace_hardirqs_off(), and the comment is stale. The call is simply redundant. In ret_to_user() we call exit_to_user_mode(), which notifies lockdep and tracing the IRQs will be enabled in userspace, so there's no need for el0_svc_common() to call trace_hardirqs_on() before returning. Further, at the start of ret_to_user() we call trace_hardirqs_off(), so not only is this redundant, but it is immediately undone. In addition to being redundant, the trace_hardirqs_on() in el0_svc_common() leaves lockdep inconsistent with the hardware state, and is liable to cause issues for any C code or instrumentation between this and the call to trace_hardirqs_off() which undoes it in ret_to_user(). This patch removes the redundant tracing calls and associated stale comments. Fixes: 23529049c684 ("arm64: entry: fix non-NMI user<->kernel transitions") Signed-off-by: Mark Rutland Acked-by: Will Deacon Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20210107145310.44616-1-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 0d38fd8d252446d39050578ea32ed89b9adeb202 Author: Mauro Carvalho Chehab Date: Wed Jan 13 12:15:43 2021 +0100 MAINTAINERS: update references to stm32 audio bindings Changeset 81437cc3b0d9 ("Merge series "dt-bindings: stm32: convert audio dfsdm to json-schema" from Olivier Moysan :") removed bindings/sound/st,stm32-adfsdm.txt, as stm32-* audio bindings are now under: bindings/iio/adc/st,stm32-*.yaml. Update cross-references to them accordingly. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/03950bbd5cf7bac10eaaff3725e283d3ec2538c5.1610536535.git.mchehab+huawei@kernel.org Signed-off-by: Mark Brown commit ef3a575baf53571dc405ee4028e26f50856898e7 Author: Roger Pau Monne Date: Tue Jan 12 12:53:58 2021 +0100 xen/privcmd: allow fetching resource sizes Allow issuing an IOCTL_PRIVCMD_MMAP_RESOURCE ioctl with num = 0 and addr = 0 in order to fetch the size of a specific resource. Add a shortcut to the default map resource path, since fetching the size requires no address to be passed in, and thus no VMA to setup. This is missing from the initial implementation, and causes issues when mapping resources that don't have fixed or known sizes. Signed-off-by: Roger Pau Monné Reviewed-by: Juergen Gross Tested-by: Andrew Cooper Cc: stable@vger.kernel.org # >= 4.18 Link: https://lore.kernel.org/r/20210112115358.23346-1-roger.pau@citrix.com Signed-off-by: Juergen Gross commit 5b191dcba719319148eeecf6ed409949fac55b39 Author: Al Cooper Date: Thu Jan 7 17:15:09 2021 -0500 mmc: sdhci-brcmstb: Fix mmc timeout errors on S5 suspend Commit e7b5d63a82fe ("mmc: sdhci-brcmstb: Add shutdown callback") that added a shutdown callback to the diver, is causing "mmc timeout" errors on S5 suspend. The problem was that the "remove" was queuing additional MMC commands after the "shutdown" and these caused timeouts as the MMC queues were cleaned up for "remove". The shutdown callback will be changed to calling sdhci-pltfm_suspend which should get better power savings because the clocks will be shutdown. Fixes: e7b5d63a82fe ("mmc: sdhci-brcmstb: Add shutdown callback") Signed-off-by: Al Cooper Acked-by: Florian Fainelli Acked-by: Adrian Hunter Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210107221509.6597-1-alcooperx@gmail.com Signed-off-by: Ulf Hansson commit f419e5940f1d9892ea6f45acdaca572b9e73ff39 Author: Jiaxun Yang Date: Thu Jan 7 22:44:38 2021 +0800 platform/x86: ideapad-laptop: Disable touchpad_switch for ELAN0634 Newer ideapads (e.g.: Yoga 14s, 720S 14) come with ELAN0634 touchpad do not use EC to switch touchpad. Reading VPCCMD_R_TOUCHPAD will return zero thus touchpad may be blocked unexpectedly. Writing VPCCMD_W_TOUCHPAD may cause a spurious key press. Add has_touchpad_switch to workaround these machines. Signed-off-by: Jiaxun Yang Cc: stable@vger.kernel.org # 5.4+ -- v2: Specify touchpad to ELAN0634 v3: Stupid missing ! in v2 v4: Correct acpi_dev_present usage (Hans) Link: https://lore.kernel.org/r/20210107144438.12605-1-jiaxun.yang@flygoat.com Signed-off-by: Hans de Goede commit 7b490a8ab0f2d3ab8d838a4ff22ae86edafd34a1 Author: Menglong Dong Date: Mon Jan 11 05:27:25 2021 -0800 MIPS: OCTEON: fix unreachable code in octeon_irq_init_ciu The type of 'r' in octeon_irq_init_ciu is 'unsigned int', so 'r < 0' can't be true. Fix this by change the type of 'r' and 'i' from 'unsigned int' to 'int'. As 'i' won't be negative, this change works. Fixes: 99fbc70f8547 ("MIPS: Octeon: irq: Alloc desc before configuring IRQ") Signed-off-by: Menglong Dong Reviewed-by: Alexander Sverdlin Signed-off-by: Thomas Bogendoerfer commit 69e976831cd53f9ba304fd20305b2025ecc78eab Author: Alexander Lobakin Date: Sun Jan 10 14:21:05 2021 +0000 MIPS: relocatable: fix possible boot hangup with KASLR enabled LLVM-built Linux triggered a boot hangup with KASLR enabled. arch/mips/kernel/relocate.c:get_random_boot() uses linux_banner, which is a string constant, as a random seed, but accesses it as an array of unsigned long (in rotate_xor()). When the address of linux_banner is not aligned to sizeof(long), such access emits unaligned access exception and hangs the kernel. Use PTR_ALIGN() to align input address to sizeof(long) and also align down the input length to prevent possible access-beyond-end. Fixes: 405bc8fd12f5 ("MIPS: Kernel: Implement KASLR using CONFIG_RELOCATABLE") Cc: stable@vger.kernel.org # 4.7+ Signed-off-by: Alexander Lobakin Tested-by: Nathan Chancellor Reviewed-by: Kees Cook Signed-off-by: Thomas Bogendoerfer commit 43377df70480f82919032eb09832e9646a8a5efb Author: Chenxin Jin Date: Wed Jan 13 16:59:05 2021 +0800 USB: serial: cp210x: add new VID/PID for supporting Teraoka AD2000 Teraoka AD2000 uses the CP210x driver, but the chip VID/PID is customized with 0988/0578. We need the driver to support the new VID/PID. Signed-off-by: Chenxin Jin Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit 02039b172327da1e64beca615500367abf8605c6 Merge: f970d1d01af86 9488307a55592 Author: Greg Kroah-Hartman Date: Wed Jan 13 10:51:32 2021 +0100 Merge tag 'misc-habanalabs-fixes-2021-01-13' of https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux into char-misc-linus Oded writes: This tag contains the following bug fixes: - Fix the dma address that is passed to dma_mmap_coherent. We passed an address that includes an offset that is needed by our device and that caused dma_mmap_coherent to do an errounous mapping. - Fix the reset process in case failures happen during the reset process. Without this fix, if the user would have asked to perform reset after the previous reset failed he would get a kernel panic - WA to prevent soft lockup BUG during unmap of host memory. In case of tens of thousands of mappings, the unmapping can take a long time that exceeds the soft lockup timeout. This WA adds a small sleep every 32K page unmappings to prevent that. * tag 'misc-habanalabs-fixes-2021-01-13' of https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux: habanalabs: prevent soft lockup during unmap habanalabs: fix reset process in case of failures habanalabs: fix dma_addr passed to dma_mmap_coherent commit 93f2a11580a9732c1d90f9e01a7e9facc825658f Author: Bjorn Andersson Date: Mon Dec 21 16:11:03 2020 -0800 arm64: dts: qcom: sdm845: Reserve LPASS clocks in gcc The GCC_LPASS_Q6_AXI_CLK and GCC_LPASS_SWAY_CLK clocks may not be touched on a typical UEFI based SDM845 device, but when the kernel is built with CONFIG_SDM_LPASSCC_845 this happens, unless they are marked as protected-clocks in the DT. This was done for the MTP and the Pocophone, but not for DB845c and the Lenovo Yoga C630 - causing these to fail to boot if the LPASS clock controller is enabled (which it typically isn't). Tested-by: Vinod Koul #on db845c Reviewed-by: Vinod Koul Link: https://lore.kernel.org/r/20201222001103.3112306-1-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit 0aa2ec8a475fb505fd98d93bbcf4e03beeeebcb6 Author: Guo Ren Date: Sat Jan 2 13:24:34 2021 +0000 riscv: Fixup CONFIG_GENERIC_TIME_VSYSCALL The patch fix commit: ad5d112 ("riscv: use vDSO common flow to reduce the latency of the time-related functions"). The GENERIC_TIME_VSYSCALL should be CONFIG_GENERIC_TIME_VSYSCALL or vgettimeofday won't work. Signed-off-by: Guo Ren Reviewed-by: Pekka Enberg Fixes: ad5d1122b82f ("riscv: use vDSO common flow to reduce the latency of the time-related functions") Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt commit d6e3ae76728ccde49271d9f5acfebbea0c5625a3 Author: Dinghao Liu Date: Fri Dec 25 16:35:20 2020 +0800 scsi: fnic: Fix memleak in vnic_dev_init_devcmd2 When ioread32() returns 0xFFFFFFFF, we should execute cleanup functions like other error handling paths before returning. Link: https://lore.kernel.org/r/20201225083520.22015-1-dinghao.liu@zju.edu.cn Acked-by: Karan Tilak Kumar Signed-off-by: Dinghao Liu Signed-off-by: Martin K. Petersen commit 80709af7325d179b433817f421c85449f2454046 Author: Kefeng Wang Date: Wed Dec 23 00:01:52 2020 +0800 riscv: cacheinfo: Fix using smp_processor_id() in preemptible Use raw_smp_processor_id instead of smp_processor_id() to fix warning, BUG: using smp_processor_id() in preemptible [00000000] code: init/1 caller is debug_smp_processor_id+0x1c/0x26 CPU: 0 PID: 1 Comm: init Not tainted 5.10.0-rc4 #211 Call Trace: walk_stackframe+0x0/0xaa show_stack+0x32/0x3e dump_stack+0x76/0x90 check_preemption_disabled+0xaa/0xac debug_smp_processor_id+0x1c/0x26 get_cache_size+0x18/0x68 load_elf_binary+0x868/0xece bprm_execve+0x224/0x498 kernel_execve+0xdc/0x142 run_init_process+0x90/0x9e try_to_run_init_process+0x12/0x3c kernel_init+0xb4/0xf8 ret_from_exception+0x0/0xc The issue is found when CONFIG_DEBUG_PREEMPT enabled. Reviewed-by: Atish Patra Tested-by: Atish Patra Signed-off-by: Kefeng Wang [Palmer: Added a comment.] Signed-off-by: Palmer Dabbelt commit c8a8ead01736419a14c3106e1f26a79d74fc84c7 Merge: 5527d0ea19935 869f4fdaf4ca7 Author: Jakub Kicinski Date: Tue Jan 12 20:25:29 2021 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net 1) Pass conntrack -f to specify family in netfilter conntrack helper selftests, from Chen Yi. 2) Honor hashsize modparam from nf_conntrack_buckets sysctl, from Jesper D. Brouer. 3) Fix memleak in nf_nat_init() error path, from Dinghao Liu. * git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf: netfilter: nf_nat: Fix memleak in nf_nat_init netfilter: conntrack: fix reading nf_conntrack_buckets selftests: netfilter: Pass family parameter "-f" to conntrack tool ==================== Link: https://lore.kernel.org/r/20210112222033.9732-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski commit 5527d0ea199354c798a63b50d911eeda6ee471ba Merge: 584c19f92754e 8a4465368964b Author: Jakub Kicinski Date: Tue Jan 12 20:22:14 2021 -0800 Merge branch 'net-smc-fix-out-of-bound-access-in-netlink-interface' Karsten Graul says: ==================== net/smc: fix out of bound access in netlink interface Both patches fix possible out-of-bounds reads. The original code expected that snprintf() reads len-1 bytes from source and appends the terminating null, but actually snprintf() first copies len bytes and finally overwrites the last byte with a null. Fix this by using memcpy() and terminating the string afterwards. ==================== Link: https://lore.kernel.org/r/20210112162122.26832-1-kgraul@linux.ibm.com Signed-off-by: Jakub Kicinski commit 8a4465368964b4fbaf084760c94c7aabf61059fb Author: Guvenc Gulce Date: Tue Jan 12 17:21:22 2021 +0100 net/smc: use memcpy instead of snprintf to avoid out of bounds read Using snprintf() to convert not null-terminated strings to null terminated strings may cause out of bounds read in the source string. Therefore use memcpy() and terminate the target string with a null afterwards. Fixes: a3db10efcc4c ("net/smc: Add support for obtaining SMCR device list") Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit 25fe2c9c4cd2e97c5f5b69f3aefe69aad3057936 Author: Jakub Kicinski Date: Tue Jan 12 17:21:21 2021 +0100 smc: fix out of bound access in smc_nl_get_sys_info() smc_clc_get_hostname() sets the host pointer to a buffer which is not NULL-terminated (see smc_clc_init()). Reported-by: syzbot+f4708c391121cfc58396@syzkaller.appspotmail.com Fixes: 099b990bd11a ("net/smc: Add support for obtaining system information") Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit 7cd1af107a92eb63b93a96dc07406dcbc5269436 Author: Atish Patra Date: Fri Dec 18 16:20:51 2020 -0800 riscv: Trace irq on only interrupt is enabled We should call irq trace only if interrupt is going to be enabled during excecption handling. Otherwise, it results in following warning during boot with lock debugging enabled. [ 0.000000] ------------[ cut here ]------------ [ 0.000000] DEBUG_LOCKS_WARN_ON(early_boot_irqs_disabled) [ 0.000000] WARNING: CPU: 0 PID: 0 at kernel/locking/lockdep.c:4085 lockdep_hardirqs_on_prepare+0x22a/0x22e [ 0.000000] Modules linked in: [ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 5.10.0-00022-ge20097fb37e2-dirty #548 [ 0.000000] epc: c005d5d4 ra : c005d5d4 sp : c1c01e80 [ 0.000000] gp : c1d456e0 tp : c1c0a980 t0 : 00000000 [ 0.000000] t1 : ffffffff t2 : 00000000 s0 : c1c01ea0 [ 0.000000] s1 : c100f360 a0 : 0000002d a1 : c00666ee [ 0.000000] a2 : 00000000 a3 : 00000000 a4 : 00000000 [ 0.000000] a5 : 00000000 a6 : c1c6b390 a7 : 3ffff00e [ 0.000000] s2 : c2384fe8 s3 : 00000000 s4 : 00000001 [ 0.000000] s5 : c1c0a980 s6 : c1d48000 s7 : c1613b4c [ 0.000000] s8 : 00000fff s9 : 80000200 s10: c1613b40 [ 0.000000] s11: 00000000 t3 : 00000000 t4 : 00000000 [ 0.000000] t5 : 00000001 t6 : 00000000 Fixes: 3c4697982982 ("riscv:Enable LOCKDEP_SUPPORT & fixup TRACE_IRQFLAGS_SUPPORT") Signed-off-by: Atish Patra Signed-off-by: Palmer Dabbelt commit 584c19f92754e9d590d75a94df66c47f7c4fd2cc Merge: ece9ab2a78afa 76e2a55d16259 Author: Jakub Kicinski Date: Tue Jan 12 20:09:21 2021 -0800 Merge branch 'mptcp-a-couple-of-fixes' Paolo Abeni says: ==================== mptcp: a couple of fixes This series includes two related fixes addressing potential divide by 0 bugs in the MPTCP datapath. ==================== Link: https://lore.kernel.org/r/cover.1610471474.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski commit 76e2a55d16259b51116767b28b19d759bff43f72 Author: Paolo Abeni Date: Tue Jan 12 18:25:24 2021 +0100 mptcp: better msk-level shutdown. Instead of re-implementing most of inet_shutdown, re-use such helper, and implement the MPTCP-specific bits at the 'proto' level. The msk-level disconnect() can now be invoked, lets provide a suitable implementation. As a side effect, this fixes bad state management for listener sockets. The latter could lead to division by 0 oops since commit ea4ca586b16f ("mptcp: refine MPTCP-level ack scheduling"). Fixes: 43b54c6ee382 ("mptcp: Use full MPTCP-level disconnect state machine") Fixes: ea4ca586b16f ("mptcp: refine MPTCP-level ack scheduling") Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Jakub Kicinski commit 20bc80b6f582ad1151c52ca09ab66b472768c9c8 Author: Paolo Abeni Date: Tue Jan 12 18:25:23 2021 +0100 mptcp: more strict state checking for acks Syzkaller found a way to trigger division by zero in mptcp_subflow_cleanup_rbuf(). The current checks implemented into tcp_can_send_ack() are too week, let's be more accurate. Reported-by: Christoph Paasch Fixes: ea4ca586b16f ("mptcp: refine MPTCP-level ack scheduling") Fixes: fd8976790a6c ("mptcp: be careful on MPTCP-level ack.") Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Jakub Kicinski commit b2b0f16fa65e910a3ec8771206bb49ee87a54ac5 Author: Javed Hasan Date: Tue Dec 15 11:47:31 2020 -0800 scsi: libfc: Avoid invoking response handler twice if ep is already completed A race condition exists between the response handler getting called because of exchange_mgr_reset() (which clears out all the active XIDs) and the response we get via an interrupt. Sequence of events: rport ba0200: Port timeout, state PLOGI rport ba0200: Port entered PLOGI state from PLOGI state xid 1052: Exchange timer armed : 20000 msecs  xid timer armed here rport ba0200: Received LOGO request while in state PLOGI rport ba0200: Delete port rport ba0200: work event 3 rport ba0200: lld callback ev 3 bnx2fc: rport_event_hdlr: event = 3, port_id = 0xba0200 bnx2fc: ba0200 - rport not created Yet!! /* Here we reset any outstanding exchanges before freeing rport using the exch_mgr_reset() */ xid 1052: Exchange timer canceled /* Here we got two responses for one xid */ xid 1052: invoking resp(), esb 20000000 state 3 xid 1052: invoking resp(), esb 20000000 state 3 xid 1052: fc_rport_plogi_resp() : ep->resp_active 2 xid 1052: fc_rport_plogi_resp() : ep->resp_active 2 Skip the response if the exchange is already completed. Link: https://lore.kernel.org/r/20201215194731.2326-1-jhasan@marvell.com Signed-off-by: Javed Hasan Signed-off-by: Martin K. Petersen commit ece9ab2a78afa1424c1aff45b1a95748dbc1f100 Merge: 2284bbd0cf398 687487751814a Author: Jakub Kicinski Date: Tue Jan 12 20:05:37 2021 -0800 Merge branch 'bnxt_en-bug-fixes' Michael Chan says: ==================== bnxt_en: Bug fixes. This series has 2 fixes. The first one fixes a resource accounting error with the RDMA driver loaded and the second one fixes the firmware flashing sequence after defragmentation. ==================== Link: https://lore.kernel.org/r/1610357200-30755-1-git-send-email-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 687487751814a493fba953efb9b1542b2f90614c Author: Pavan Chebbi Date: Mon Jan 11 04:26:40 2021 -0500 bnxt_en: Clear DEFRAG flag in firmware message when retry flashing. When the FW tells the driver to retry the INSTALL_UPDATE command after it has cleared the NVM area, the driver is not clearing the previously used ALLOWED_TO_DEFRAG flag. As a result the FW tries to defrag the NVM area a second time in a loop and can fail the request. Fixes: 1432c3f6a6ca ("bnxt_en: Retry installing FW package under NO_SPACE error condition.") Signed-off-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski commit 869c4d5eb1e6fbda66aa790c48bdb946d71494a0 Author: Michael Chan Date: Mon Jan 11 04:26:39 2021 -0500 bnxt_en: Improve stats context resource accounting with RDMA driver loaded. The function bnxt_get_ulp_stat_ctxs() does not count the stats contexts used by the RDMA driver correctly when the RDMA driver is freeing the MSIX vectors. It assumes that if the RDMA driver is registered, the additional stats contexts will be needed. This is not true when the RDMA driver is about to unregister and frees the MSIX vectors. This slight error leads to over accouting of the stats contexts needed after the RDMA driver has unloaded. This will cause some firmware warning and error messages in dmesg during subsequent config. changes or ifdown/ifup. Fix it by properly accouting for extra stats contexts only if the RDMA driver is registered and MSIX vectors have been successfully requested. Fixes: c027c6b4e91f ("bnxt_en: get rid of num_stat_ctxs variable") Reviewed-by: Yongping Zhang Reviewed-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski commit 2284bbd0cf3981462dc6d729c89851c66b05a66a Author: Leon Schuermann Date: Mon Jan 11 20:03:15 2021 +0100 r8153_ecm: Add Lenovo Powered USB-C Hub as a fallback of r8152 This commit enables the use of the r8153_ecm driver, introduced with commit c1aedf015ebdd0 ("net/usb/r8153_ecm: support ECM mode for RTL8153") for the Lenovo Powered USB-C Hub (17ef:721e) based on the Realtek RTL8153B chip. This results in the following driver preference: - if r8152 is available, use the r8152 driver - if r8152 is not available, use the r8153_ecm driver This is done to prevent the NIC from constantly sending pause frames when the host system enters standby (fixed by using the r8152 driver in "r8152: Add Lenovo Powered USB-C Travel Hub"), while still allowing the device to work with the r8153_ecm driver as a fallback. Signed-off-by: Leon Schuermann Tested-by: Leon Schuermann Link: https://lore.kernel.org/r/20210111190312.12589-3-leon@is.currently.online Signed-off-by: Jakub Kicinski commit cb82a54904a99df9e8f9e9d282046055dae5a730 Author: Leon Schuermann Date: Mon Jan 11 20:03:13 2021 +0100 r8152: Add Lenovo Powered USB-C Travel Hub This USB-C Hub (17ef:721e) based on the Realtek RTL8153B chip used to use the cdc_ether driver. However, using this driver, with the system suspended the device constantly sends pause-frames as soon as the receive buffer fills up. This causes issues with other devices, where some Ethernet switches stop forwarding packets altogether. Using the Realtek driver (r8152) fixes this issue. Pause frames are no longer sent while the host system is suspended. Signed-off-by: Leon Schuermann Tested-by: Leon Schuermann Link: https://lore.kernel.org/r/20210111190312.12589-2-leon@is.currently.online Signed-off-by: Jakub Kicinski commit 72eeb7c7151302ef007f1acd018cbf6f30e50321 Author: Martin Wilck Date: Mon Jan 11 15:25:41 2021 +0100 scsi: scsi_transport_srp: Don't block target in failfast state If the port is in SRP_RPORT_FAIL_FAST state when srp_reconnect_rport() is entered, a transition to SDEV_BLOCK would be illegal, and a kernel WARNING would be triggered. Skip scsi_target_block() in this case. Link: https://lore.kernel.org/r/20210111142541.21534-1-mwilck@suse.com Reviewed-by: Bart Van Assche Signed-off-by: Martin Wilck Signed-off-by: Martin K. Petersen commit f2cb4b2397ca9e6e972d6551e5461d1f1d81c23f Author: Lukas Bulwahn Date: Mon Jan 11 11:22:12 2021 +0100 scsi: docs: ABI: sysfs-driver-ufs: Rectify table formatting Commit 0b2894cd0fdf ("scsi: docs: ABI: sysfs-driver-ufs: Add DeepSleep power mode") adds new entries in tables of sysfs-driver-ufs ABI documentation, but formatted the table incorrectly. Hence, make htmldocs warns: ./Documentation/ABI/testing/sysfs-driver-ufs:{915,956}: WARNING: Malformed table. Text in column margin in table line 15. Rectify table formatting for DeepSleep power mode. Link: https://lore.kernel.org/r/20210111102212.19377-1-lukas.bulwahn@gmail.com Acked-by: Adrian Hunter Signed-off-by: Lukas Bulwahn Signed-off-by: Martin K. Petersen commit 91158e1680b164c8d101144ca916a3dca10c3e17 Author: Vladimir Oltean Date: Tue Jan 12 02:48:31 2021 +0200 net: dsa: clear devlink port type before unregistering slave netdevs Florian reported a use-after-free bug in devlink_nl_port_fill found with KASAN: (devlink_nl_port_fill) (devlink_port_notify) (devlink_port_unregister) (dsa_switch_teardown.part.3) (dsa_tree_teardown_switches) (dsa_unregister_switch) (bcm_sf2_sw_remove) (platform_remove) (device_release_driver_internal) (device_links_unbind_consumers) (device_release_driver_internal) (device_driver_detach) (unbind_store) Allocated by task 31: alloc_netdev_mqs+0x5c/0x50c dsa_slave_create+0x110/0x9c8 dsa_register_switch+0xdb0/0x13a4 b53_switch_register+0x47c/0x6dc bcm_sf2_sw_probe+0xaa4/0xc98 platform_probe+0x90/0xf4 really_probe+0x184/0x728 driver_probe_device+0xa4/0x278 __device_attach_driver+0xe8/0x148 bus_for_each_drv+0x108/0x158 Freed by task 249: free_netdev+0x170/0x194 dsa_slave_destroy+0xac/0xb0 dsa_port_teardown.part.2+0xa0/0xb4 dsa_tree_teardown_switches+0x50/0xc4 dsa_unregister_switch+0x124/0x250 bcm_sf2_sw_remove+0x98/0x13c platform_remove+0x44/0x5c device_release_driver_internal+0x150/0x254 device_links_unbind_consumers+0xf8/0x12c device_release_driver_internal+0x84/0x254 device_driver_detach+0x30/0x34 unbind_store+0x90/0x134 What happens is that devlink_port_unregister emits a netlink DEVLINK_CMD_PORT_DEL message which associates the devlink port that is getting unregistered with the ifindex of its corresponding net_device. Only trouble is, the net_device has already been unregistered. It looks like we can stub out the search for a corresponding net_device if we clear the devlink_port's type. This looks like a bit of a hack, but also seems to be the reason why the devlink_port_type_clear function exists in the first place. Fixes: 3122433eb533 ("net: dsa: Register devlink ports before calling DSA driver setup()") Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Tested-by: Florian fainelli Reported-by: Florian Fainelli Link: https://lore.kernel.org/r/20210112004831.3778323-1-olteanv@gmail.com Signed-off-by: Jakub Kicinski commit 07b90056cb15ff9877dca0d8f1b6583d1051f724 Author: Vladimir Oltean Date: Tue Jan 12 01:09:43 2021 +0200 net: dsa: unbind all switches from tree when DSA master unbinds Currently the following happens when a DSA master driver unbinds while there are DSA switches attached to it: $ echo 0000:00:00.5 > /sys/bus/pci/drivers/mscc_felix/unbind ------------[ cut here ]------------ WARNING: CPU: 0 PID: 392 at net/core/dev.c:9507 Call trace: rollback_registered_many+0x5fc/0x688 unregister_netdevice_queue+0x98/0x120 dsa_slave_destroy+0x4c/0x88 dsa_port_teardown.part.16+0x78/0xb0 dsa_tree_teardown_switches+0x58/0xc0 dsa_unregister_switch+0x104/0x1b8 felix_pci_remove+0x24/0x48 pci_device_remove+0x48/0xf0 device_release_driver_internal+0x118/0x1e8 device_driver_detach+0x28/0x38 unbind_store+0xd0/0x100 Located at the above location is this WARN_ON: /* Notifier chain MUST detach us all upper devices. */ WARN_ON(netdev_has_any_upper_dev(dev)); Other stacked interfaces, like VLAN, do indeed listen for NETDEV_UNREGISTER on the real_dev and also unregister themselves at that time, which is clearly the behavior that rollback_registered_many expects. But DSA interfaces are not VLAN. They have backing hardware (platform devices, PCI devices, MDIO, SPI etc) which have a life cycle of their own and we can't just trigger an unregister from the DSA framework when we receive a netdev notifier that the master unregisters. Luckily, there is something we can do, and that is to inform the driver core that we have a runtime dependency to the DSA master interface's device, and create a device link where that is the supplier and we are the consumer. Having this device link will make the DSA switch unbind before the DSA master unbinds, which is enough to avoid the WARN_ON from rollback_registered_many. Note that even before the blamed commit, DSA did nothing intelligent when the master interface got unregistered either. See the discussion here: https://lore.kernel.org/netdev/20200505210253.20311-1-f.fainelli@gmail.com/ But this time, at least the WARN_ON is loud enough that the upper_dev_link commit can be blamed. The advantage with this approach vs dev_hold(master) in the attached link is that the latter is not meant for long term reference counting. With dev_hold, the only thing that will happen is that when the user attempts an unbind of the DSA master, netdev_wait_allrefs will keep waiting and waiting, due to DSA keeping the refcount forever. DSA would not access freed memory corresponding to the master interface, but the unbind would still result in a freeze. Whereas with device links, graceful teardown is ensured. It even works with cascaded DSA trees. $ echo 0000:00:00.2 > /sys/bus/pci/drivers/fsl_enetc/unbind [ 1818.797546] device swp0 left promiscuous mode [ 1819.301112] sja1105 spi2.0: Link is Down [ 1819.307981] DSA: tree 1 torn down [ 1819.312408] device eno2 left promiscuous mode [ 1819.656803] mscc_felix 0000:00:00.5: Link is Down [ 1819.667194] DSA: tree 0 torn down [ 1819.711557] fsl_enetc 0000:00:00.2 eno2: Link is Down This approach allows us to keep the DSA framework absolutely unchanged, and the driver core will just know to unbind us first when the master goes away - as opposed to the large (and probably impossible) rework required if attempting to listen for NETDEV_UNREGISTER. As per the documentation at Documentation/driver-api/device_link.rst, specifying the DL_FLAG_AUTOREMOVE_CONSUMER flag causes the device link to be automatically purged when the consumer fails to probe or later unbinds. So we don't need to keep the consumer_link variable in struct dsa_switch. Fixes: 2f1e8ea726e9 ("net: dsa: link interfaces with the DSA master to get rid of lockdep warnings") Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Tested-by: Florian Fainelli Link: https://lore.kernel.org/r/20210111230943.3701806-1-olteanv@gmail.com Signed-off-by: Jakub Kicinski commit a18caa97b1bda0a3d126a7be165ddcfc56c2dde6 Author: Marco Felsch Date: Mon Jan 11 09:59:32 2021 +0100 net: phy: smsc: fix clk error handling Commit bedd8d78aba3 ("net: phy: smsc: LAN8710/20: add phy refclk in support") added the phy clk support. The commit already checks if clk_get_optional() throw an error but instead of returning the error it ignores it. Fixes: bedd8d78aba3 ("net: phy: smsc: LAN8710/20: add phy refclk in support") Suggested-by: Jakub Kicinski Signed-off-by: Marco Felsch Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20210111085932.28680-1-m.felsch@pengutronix.de Signed-off-by: Jakub Kicinski commit eb351d75ce1e75b4f793d609efac08426ca50acd Author: Andrew Morton Date: Tue Jan 12 15:49:33 2021 -0800 mm/process_vm_access.c: include compat.h Fix the build error: mm/process_vm_access.c:277:5: error: implicit declaration of function 'in_compat_syscall'; did you mean 'in_ia32_syscall'? [-Werror=implicit-function-declaration] Fixes: 38dc5079da7081e "Fix compat regression in process_vm_rw()" Reported-by: syzbot+5b0d0de84d6c65b8dd2b@syzkaller.appspotmail.com Cc: Kyle Huey Cc: Jens Axboe Cc: Al Viro Cc: Christoph Hellwig Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6696d2a6f38c0beedf03c381edfc392ecf7631b4 Author: Oscar Salvador Date: Tue Jan 12 15:49:30 2021 -0800 mm,hwpoison: fix printing of page flags Format %pG expects a lower case 'p' in order to print the flags. Fix it. Link: https://lkml.kernel.org/r/20210108085202.4506-1-osalvador@suse.de Fixes: 8295d535e2aa ("mm,hwpoison: refactor get_any_page") Signed-off-by: Oscar Salvador Reported-by: Dan Carpenter Reviewed-by: Anshuman Khandual Acked-by: Naoya Horiguchi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7e5f1126b54a29c078c07a5fe245e269f3c05500 Author: Vlastimil Babka Date: Tue Jan 12 15:49:27 2021 -0800 MAINTAINERS: add Vlastimil as slab allocators maintainer I would like to help with slab allocators maintenance, from the perspective of being responsible for SLAB and more recently also SLUB in an enterprise distro kernel and supporting its users. Recently I've been focusing on improving SLUB's debugging features, and patch review in the area, including the kmemcg accounting rewrite last year. Link: https://lkml.kernel.org/r/20210108110353.19971-1-vbabka@suse.cz Signed-off-by: Vlastimil Babka Acked-by: Christoph Lameter Acked-by: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0eb98f1588c2cc7a79816d84ab18a55d254f481c Author: Miaohe Lin Date: Tue Jan 12 15:49:24 2021 -0800 mm/hugetlb: fix potential missing huge page size info The huge page size is encoded for VM_FAULT_HWPOISON errors only. So if we return VM_FAULT_HWPOISON, huge page size would just be ignored. Link: https://lkml.kernel.org/r/20210107123449.38481-1-linmiaohe@huawei.com Fixes: aa50d3a7aa81 ("Encode huge page size for VM_FAULT_HWPOISON errors") Signed-off-by: Miaohe Lin Reviewed-by: Mike Kravetz Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f555befd185dc097ede887eb7b308c2e1c1369d4 Author: Jan Stancek Date: Tue Jan 12 15:49:21 2021 -0800 mm: migrate: initialize err in do_migrate_pages After commit 236c32eb1096 ("mm: migrate: clean up migrate_prep{_local}")', do_migrate_pages can return uninitialized variable 'err' (which is propagated to user-space as error) when 'from' and 'to' nodesets are identical. This can be reproduced with LTP migrate_pages01, which calls migrate_pages() with same set for both old/new_nodes. Add 'err' initialization back. Link: https://lkml.kernel.org/r/456a021c7ef3636d7668cec9dcb4a446a4244812.1609855564.git.jstancek@redhat.com Fixes: 236c32eb1096 ("mm: migrate: clean up migrate_prep{_local}") Signed-off-by: Jan Stancek Acked-by: Michal Hocko Acked-by: Yang Shi Cc: Zi Yan Cc: Jan Kara Cc: Matthew Wilcox Cc: Mel Gorman Cc: Song Liu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c22ee5284cf58017fa8c6d21d8f8c68159b6faab Author: Miaohe Lin Date: Tue Jan 12 15:49:18 2021 -0800 mm/vmalloc.c: fix potential memory leak In VM_MAP_PUT_PAGES case, we should put pages and free array in vfree. But we missed to set area->nr_pages in vmap(). So we would fail to put pages in __vunmap() because area->nr_pages = 0. Link: https://lkml.kernel.org/r/20210107123541.39206-1-linmiaohe@huawei.com Fixes: b944afc9d64d ("mm: add a VM_MAP_PUT_PAGES flag for vmap") Signed-off-by: Shijie Luo Signed-off-by: Miaohe Lin Reviewed-by: Uladzislau Rezki (Sony) Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 29970dc24faf0078beb4efab5455b4f504d2198d Author: Hailong Liu Date: Tue Jan 12 15:49:14 2021 -0800 arm/kasan: fix the array size of kasan_early_shadow_pte[] The size of kasan_early_shadow_pte[] now is PTRS_PER_PTE which defined to 512 for arm. This means that it only covers the prev Linux pte entries, but not the HWTABLE pte entries for arm. The reason it currently works is that the symbol kasan_early_shadow_page immediately following kasan_early_shadow_pte in memory is page aligned, which makes kasan_early_shadow_pte look like a 4KB size array. But we can't ensure the order is always right with different compiler/linker, or if more bss symbols are introduced. We had a test with QEMU + vexpress:put a 512KB-size symbol with attribute __section(".bss..page_aligned") after kasan_early_shadow_pte, and poisoned it after kasan_early_init(). Then enabled CONFIG_KASAN, it failed to boot up. Link: https://lkml.kernel.org/r/20210109044622.8312-1-hailongliiu@yeah.net Signed-off-by: Hailong Liu Signed-off-by: Ziliang Guo Reviewed-by: Linus Walleij Cc: Andrey Ryabinin Cc: Russell King Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Ard Biesheuvel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7ea510b92c7c9b4eb5ff72e6b4bbad4b0407a914 Author: Hugh Dickins Date: Tue Jan 12 15:49:11 2021 -0800 mm/memcontrol: fix warning in mem_cgroup_page_lruvec() Boot a CONFIG_MEMCG=y kernel with "cgroup_disabled=memory" and you are met by a series of warnings from the VM_WARN_ON_ONCE_PAGE(!memcg, page) recently added to the inline mem_cgroup_page_lruvec(). An earlier attempt to place that warning, in mem_cgroup_lruvec(), had been careful to do so after weeding out the mem_cgroup_disabled() case; but was itself invalid because of the mem_cgroup_lruvec(NULL, pgdat) in clear_pgdat_congested() and age_active_anon(). Warning in mem_cgroup_page_lruvec() was once useful in detecting a KSM charge bug, so may be worth keeping: but skip if mem_cgroup_disabled(). Link: https://lkml.kernel.org/r/alpine.LSU.2.11.2101032056260.1093@eggly.anvils Fixes: 9a1ac2288cf1 ("mm/memcontrol:rewrite mem_cgroup_page_lruvec()") Signed-off-by: Hugh Dickins Reviewed-by: Alex Shi Acked-by: Roman Gushchin Acked-by: Chris Down Reviewed-by: Baoquan He Acked-by: Vlastimil Babka Cc: Hui Su Cc: Lorenzo Stoakes Cc: Michal Hocko Cc: Johannes Weiner Cc: Shakeel Butt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ce8f86ee94fabcc98537ddccd7e82cfd360a4dc5 Author: Hailong liu Date: Tue Jan 12 15:49:08 2021 -0800 mm/page_alloc: add a missing mm_page_alloc_zone_locked() tracepoint The trace point *trace_mm_page_alloc_zone_locked()* in __rmqueue() does not currently cover all branches. Add the missing tracepoint and check the page before do that. [akpm@linux-foundation.org: use IS_ENABLED() to suppress warning] Link: https://lkml.kernel.org/r/20201228132901.41523-1-carver4lio@163.com Signed-off-by: Hailong liu Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8ff60eb052eeba95cfb3efe16b08c9199f8121cf Author: Jann Horn Date: Tue Jan 12 15:49:04 2021 -0800 mm, slub: consider rest of partial list if acquire_slab() fails acquire_slab() fails if there is contention on the freelist of the page (probably because some other CPU is concurrently freeing an object from the page). In that case, it might make sense to look for a different page (since there might be more remote frees to the page from other CPUs, and we don't want contention on struct page). However, the current code accidentally stops looking at the partial list completely in that case. Especially on kernels without CONFIG_NUMA set, this means that get_partial() fails and new_slab_objects() falls back to new_slab(), allocating new pages. This could lead to an unnecessary increase in memory fragmentation. Link: https://lkml.kernel.org/r/20201228130853.1871516-1-jannh@google.com Fixes: 7ced37197196 ("slub: Acquire_slab() avoid loop") Signed-off-by: Jann Horn Acked-by: David Rientjes Acked-by: Joonsoo Kim Cc: Christoph Lameter Cc: Pekka Enberg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit df85bc140a4d6cbaa78d8e9c35154e1a2f0622c7 Author: Petr Machata Date: Mon Jan 11 18:07:07 2021 +0100 net: dcb: Accept RTM_GETDCB messages carrying set-like DCB commands In commit 826f328e2b7e ("net: dcb: Validate netlink message in DCB handler"), Linux started rejecting RTM_GETDCB netlink messages if they contained a set-like DCB_CMD_ command. The reason was that privileges were only verified for RTM_SETDCB messages, but the value that determined the action to be taken is the command, not the message type. And validation of message type against the DCB command was the obvious missing piece. Unfortunately it turns out that mlnx_qos, a somewhat widely deployed tool for configuration of DCB, accesses the DCB set-like APIs through RTM_GETDCB. Therefore do not bounce the discrepancy between message type and command. Instead, in addition to validating privileges based on the actual message type, validate them also based on the expected message type. This closes the loophole of allowing DCB configuration on non-admin accounts, while maintaining backward compatibility. Fixes: 2f90b8657ec9 ("ixgbe: this patch adds support for DCB to the kernel and ixgbe driver") Fixes: 826f328e2b7e ("net: dcb: Validate netlink message in DCB handler") Signed-off-by: Petr Machata Link: https://lore.kernel.org/r/a3edcfda0825f2aa2591801c5232f2bbf2d8a554.1610384801.git.me@pmachata.org Signed-off-by: Jakub Kicinski commit 17ffc193cdc6dc7a613d00d8ad47fc1f801b9bf0 Author: Mikulas Patocka Date: Tue Jan 12 14:54:47 2021 -0500 dm integrity: fix the maximum number of arguments Advance the maximum number of arguments from 9 to 15 to account for all potential feature flags that may be supplied. Linux 4.19 added "meta_device" (356d9d52e1221ba0c9f10b8b38652f78a5298329) and "recalculate" (a3fcf7253139609bf9ff901fbf955fba047e75dd) flags. Commit 468dfca38b1a6fbdccd195d875599cb7c8875cd9 added "sectors_per_bit" and "bitmap_flush_interval". Commit 84597a44a9d86ac949900441cea7da0af0f2f473 added "allow_discards". And the commit d537858ac8aaf4311b51240893add2fc62003b97 added "fix_padding". Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org # v4.19+ Signed-off-by: Mike Snitzer commit 4bae052dde14c5538eca39592777b1d1987234ba Merge: 7c53f6b671f4a 599b3063adf4b Author: Thomas Gleixner Date: Tue Jan 12 21:23:55 2021 +0100 Merge tag 'irqchip-fixes-5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent Pull irqchip fixes from Marc Zyngier: - Fix the MIPS CPU interrupt controller hierarchy - Simplify the PRUSS Kconfig entry - Eliminate trivial build warnings on the MIPS Loongson liointc - Fix error path in devm_platform_get_irqs_affinity() - Turn the BCM2836 IPI irq_eoi callback into irq_ack - Fix initialisation of on-stack msi_alloc_info - Cleanup spurious comma in irq-sl28cpld Link: https://lore.kernel.org/r/20210110110001.2328708-1-maz@kernel.org commit e3fab2f3de081e98c50b7b4ace1b040161d95310 Author: Geert Uytterhoeven Date: Mon Jan 11 11:39:56 2021 +0100 ntp: Fix RTC synchronization on 32-bit platforms Due to an integer overflow, RTC synchronization now happens every 2s instead of the intended 11 minutes. Fix this by forcing 64-bit arithmetic for the sync period calculation. Annotate the other place which multiplies seconds for consistency as well. Fixes: c9e6189fb03123a7 ("ntp: Make the RTC synchronization more reliable") Signed-off-by: Geert Uytterhoeven Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210111103956.290378-1-geert+renesas@glider.be commit aba428a0c612bb259891307da12e22efd0fab14c Author: Chunguang Xu Date: Tue Dec 1 17:52:31 2020 +0800 timekeeping: Remove unused get_seconds() The get_seconds() cleanup seems to have been completed, now it is time to delete the legacy interface to avoid misuse later. Signed-off-by: Chunguang Xu Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/1606816351-26900-1-git-send-email-brookxu@tencent.com commit b8d52264df85ec12f370c0a8b28d0ac59a05877a Author: Andrii Nakryiko Date: Sat Jan 9 23:03:41 2021 -0800 libbpf: Allow loading empty BTFs Empty BTFs do come up (e.g., simple kernel modules with no new types and strings, compared to the vmlinux BTF) and there is nothing technically wrong with them. So remove unnecessary check preventing loading empty BTFs. Fixes: d8123624506c ("libbpf: Fix BTF data layout checks and allow empty BTF") Reported-by: Christopher William Snowhill Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210110070341.1380086-2-andrii@kernel.org commit bcc5e6162d66d44f7929f30fce032f95855fc8b4 Author: Andrii Nakryiko Date: Sat Jan 9 23:03:40 2021 -0800 bpf: Allow empty module BTFs Some modules don't declare any new types and end up with an empty BTF, containing only valid BTF header and no types or strings sections. This currently causes BTF validation error. There is nothing wrong with such BTF, so fix the issue by allowing module BTFs with no types or strings. Fixes: 36e68442d1af ("bpf: Load and verify kernel module BTFs") Reported-by: Christopher William Snowhill Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210110070341.1380086-1-andrii@kernel.org commit 66a425011c61e71560c234492d204e83cfb73d1d Author: Peter Zijlstra Date: Thu Jan 7 11:14:25 2021 +0100 x86: __always_inline __{rd,wr}msr() When the compiler choses to not inline the trivial MSR helpers: vmlinux.o: warning: objtool: __sev_es_nmi_complete()+0xce: call to __wrmsr.constprop.14() leaves .noinstr.text section Reported-by: Randy Dunlap Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Acked-by: Randy Dunlap # build-tested Link: https://lore.kernel.org/r/X/bf3gV+BW7kGEsB@hirez.programming.kicks-ass.net commit 737495361d4469477ffe45d51e6fc56f44f3cc6a Author: Peter Zijlstra Date: Wed Jan 6 15:36:24 2021 +0100 x86/mce: Remove explicit/superfluous tracing There's some explicit tracing left in exc_machine_check_kernel(), remove it, as it's already implied by irqentry_nmi_enter(). Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210106144017.719310466@infradead.org commit 77ca93a6b1223e210e58e1000c09d8d420403c94 Author: Peter Zijlstra Date: Wed Jan 6 15:36:23 2021 +0100 locking/lockdep: Avoid noinstr warning for DEBUG_LOCKDEP vmlinux.o: warning: objtool: lock_is_held_type()+0x60: call to check_flags.part.0() leaves .noinstr.text section Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210106144017.652218215@infradead.org commit 0afda3a888dccf12557b41ef42eee942327d122b Author: Peter Zijlstra Date: Wed Jan 6 15:36:22 2021 +0100 locking/lockdep: Cure noinstr fail When the compiler doesn't feel like inlining, it causes a noinstr fail: vmlinux.o: warning: objtool: lock_is_held_type()+0xb: call to lockdep_enabled() leaves .noinstr.text section Fixes: 4d004099a668 ("lockdep: Fix lockdep recursion") Reported-by: Randy Dunlap Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210106144017.592595176@infradead.org commit a1d5c98aac33a5a0004ecf88905dcc261c52f988 Author: Peter Zijlstra Date: Wed Jan 6 15:36:21 2021 +0100 x86/sev: Fix nonistr violation When the compiler fails to inline, it violates nonisntr: vmlinux.o: warning: objtool: __sev_es_nmi_complete()+0xc7: call to sev_es_wr_ghcb_msr() leaves .noinstr.text section Fixes: 4ca68e023b11 ("x86/sev-es: Handle NMI State") Reported-by: Randy Dunlap Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210106144017.532902065@infradead.org commit 9caa7ff509add50959a793b811cc7c9339e281cd Author: Peter Zijlstra Date: Wed Jan 6 15:36:20 2021 +0100 x86/entry: Fix noinstr fail vmlinux.o: warning: objtool: __do_fast_syscall_32()+0x47: call to syscall_enter_from_user_mode_work() leaves .noinstr.text section Fixes: 4facb95b7ada ("x86/entry: Unbreak 32bit fast syscall") Reported-by: Randy Dunlap Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210106144017.472696632@infradead.org commit c361c5a6c559d1e0a2717abe9162a71aa602954f Author: Arnd Bergmann Date: Sun Jan 3 14:54:53 2021 +0100 clk: mmp2: fix build without CONFIG_PM pm_clk_suspend()/pm_clk_resume() are defined as NULL pointers rather than empty inline stubs without CONFIG_PM: drivers/clk/mmp/clk-audio.c:402:16: error: called object type 'void *' is not a function or function pointer pm_clk_suspend(dev); drivers/clk/mmp/clk-audio.c:411:15: error: called object type 'void *' is not a function or function pointer pm_clk_resume(dev); I tried redefining the helper functions, but that caused additional problems. This is the simple solution of replacing the __maybe_unused trick with an #ifdef. Fixes: 725262d29139 ("clk: mmp2: Add audio clock controller driver") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20210103135503.3668784-1-arnd@kernel.org Signed-off-by: Stephen Boyd commit fd2383093593b23f8814a879093b746e502fe3cf Author: Dmitry Baryshkov Date: Sat Jan 9 04:33:14 2021 +0300 clk: qcom: gcc-sm250: Use floor ops for sdcc clks Followup to the commits 5e4b7e82d497 ("clk: qcom: gcc-sdm845: Use floor ops for sdcc clks") and 6d37a8d19283 ("clk: qcom: gcc-sc7180: Use floor ops for sdcc clks"). Use floor ops for sdcc clocks on sm8250. Signed-off-by: Dmitry Baryshkov Fixes: 3e5770921a88 ("clk: qcom: gcc: Add global clock controller driver for SM8250") Link: https://lore.kernel.org/r/20210109013314.3443134-1-dmitry.baryshkov@linaro.org Signed-off-by: Stephen Boyd commit 4be34f3d0731b38a1b24566b37fbb39500aaf3a2 Author: Stanislav Fomichev Date: Tue Jan 12 08:28:29 2021 -0800 bpf: Don't leak memory in bpf getsockopt when optlen == 0 optlen == 0 indicates that the kernel should ignore BPF buffer and use the original one from the user. We, however, forget to free the temporary buffer that we've allocated for BPF. Fixes: d8fe449a9c51 ("bpf: Don't return EINVAL from {get,set}sockopt when optlen > PAGE_SIZE") Reported-by: Martin KaFai Lau Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20210112162829.775079-1-sdf@google.com commit 73f6b7ed9835ad9f953aebd60dd720aabc487b81 Author: Arnd Bergmann Date: Wed Dec 30 16:52:25 2020 +0100 clk: imx: fix Kconfig warning for i.MX SCU clk A previous patch introduced a harmless randconfig warning: WARNING: unmet direct dependencies detected for MXC_CLK_SCU Depends on [n]: COMMON_CLK [=y] && ARCH_MXC [=n] && IMX_SCU [=y] && HAVE_ARM_SMCCC [=y] Selected by [m]: - CLK_IMX8QXP [=m] && COMMON_CLK [=y] && (ARCH_MXC [=n] && ARM64 [=y] || COMPILE_TEST [=y]) && IMX_SCU [=y] && HAVE_ARM_SMCCC [=y] Since the symbol is now hidden and only selected by other symbols, just remove the dependencies and require the other drivers to get it right. Fixes: 6247e31b7530 ("clk: imx: scu: fix MXC_CLK_SCU module build break") Reported-by: Anders Roxell Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20201230155244.981757-1-arnd@kernel.org Signed-off-by: Stephen Boyd commit 98829137a6a04785c8812670a7fa16d7dd59f05a Author: Taniya Das Date: Mon Dec 21 23:33:36 2020 +0530 clk: qcom: gcc-sc7180: Mark the camera abh clock always ON The camera clock controller requires the AHB clock, the driver when moved to use the pm_runtime_get() API, the camera ahb clock failed turn on before access, thus mark it as always ON. Reported-by: Stephen Boyd Fixes: 8d4025943e13 ("clk: qcom: camcc-sc7180: Use runtime PM ops instead of clk ones") Signed-off-by: Taniya Das Link: https://lore.kernel.org/r/1608573816-1465-1-git-send-email-tdas@codeaurora.org Signed-off-by: Stephen Boyd commit 8e14f610159d524cd7aac37982826d3ef75c09e8 Author: Ignat Korchagin Date: Sat Jan 9 15:17:06 2021 +0000 dm crypt: do not call bio_endio() from the dm-crypt tasklet Sometimes, when dm-crypt executes decryption in a tasklet, we may get "BUG: KASAN: use-after-free in tasklet_action_common.constprop..." with a kasan-enabled kernel. When the decryption fully completes in the tasklet, dm-crypt will call bio_endio(), which in turn will call clone_endio() from dm.c core code. That function frees the resources associated with the bio, including per bio private structures. For dm-crypt it will free the current struct dm_crypt_io, which contains our tasklet object, causing use-after-free, when the tasklet is being dequeued by the kernel. To avoid this, do not call bio_endio() from the current tasklet context, but delay its execution to the dm-crypt IO workqueue. Fixes: 39d42fa96ba1 ("dm crypt: add flags to optionally bypass kcryptd workqueues") Cc: # v5.9+ Signed-off-by: Ignat Korchagin Signed-off-by: Mike Snitzer commit 895bee270863588fe3d46dca86cd15d461f47a7a Author: Greg Kroah-Hartman Date: Tue Jan 12 19:02:29 2021 +0100 Revert "driver core: Reorder devices on successful probe" This reverts commit 5b6164d3465fcc13b5679c860c452963443172a7. Stephan reports problems with this commit, so revert it for now. Fixes: 5b6164d3465f ("driver core: Reorder devices on successful probe") Link: https://lore.kernel.org/r/X/ycQpu7NIGI969v@gerhold.net Reported-by: Stephan Gerhold Cc: Jonathan Hunter Cc: Rafael. J. Wysocki Cc: Thierry Reding Signed-off-by: Greg Kroah-Hartman commit d78050ee35440d7879ed94011c52994b8932e96e Author: Catalin Marinas Date: Thu Jan 7 14:40:08 2021 +0000 arm64: Remove arm64_dma32_phys_limit and its uses With the introduction of a dynamic ZONE_DMA range based on DT or IORT information, there's no need for CMA allocations from the wider ZONE_DMA32 since on most platforms ZONE_DMA will cover the 32-bit addressable range. Remove the arm64_dma32_phys_limit and set arm64_dma_phys_limit to cover the smallest DMA range required on the platform. CMA allocation and crashkernel reservation now go in the dynamically sized ZONE_DMA, allowing correct functionality on RPi4. Signed-off-by: Catalin Marinas Cc: Chen Zhou Reviewed-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne # On RPi4B commit e609571b5ffa3528bf85292de1ceaddac342bc1c Merge: ea49c88f4071e 896567ee7f17a Author: Linus Torvalds Date: Tue Jan 12 09:38:53 2021 -0800 Merge tag 'nfs-for-5.11-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs Pull NFS client fixes from Trond Myklebust: "Highlights include: - Fix parsing of link-local IPv6 addresses - Fix confusing logging of mount errors that was introduced by the fsopen() patchset. - Fix a tracing use after free in _nfs4_do_setlk() - Layout return-on-close fixes when called from nfs4_evict_inode() - Layout segments were being leaked in pnfs_generic_clear_request_commit() - Don't leak DS commits in pnfs_generic_retry_commit() - Fix an Oopsable use-after-free when nfs_delegation_find_inode_server() calls iput() on an inode after the super block has gone away" * tag 'nfs-for-5.11-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: NFS: nfs_igrab_and_active must first reference the superblock NFS: nfs_delegation_find_inode_server must first reference the superblock NFS/pNFS: Fix a leak of the layout 'plh_outstanding' counter NFS/pNFS: Don't leak DS commits in pnfs_generic_retry_commit() NFS/pNFS: Don't call pnfs_free_bucket_lseg() before removing the request pNFS: Stricter ordering of layoutget and layoutreturn pNFS: Clean up pnfs_layoutreturn_free_lsegs() pNFS: We want return-on-close to complete when evicting the inode pNFS: Mark layout for return if return-on-close was not sent net: sunrpc: interpret the return value of kstrtou32 correctly NFS: Adjust fs_context error logging NFS4: Fix use-after-free in trace_event_raw_event_nfs4_set_lock commit ea49c88f4071e2bdd55e78987f251ea54aa11004 Merge: a0d54b4f5b219 2896c93811e39 Author: Linus Torvalds Date: Tue Jan 12 09:16:59 2021 -0800 Merge tag 'mkp-scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi Pull SCSI target fix from Martin Petersen: "This addresses an issue in the SCSI target subsystem. A connected initiator could specify IDs for any configured backing store device, not just the ones explicitly made visible to the host. The remedy is to honor the access control list when doing ID descriptor lookups" * tag 'mkp-scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi: scsi: target: Fix XCOPY NAA identifier lookup commit 984cadea032b103c5824a5f29d0a36b3e9df6333 Author: Chris Wilson Date: Mon Jan 11 22:52:20 2021 +0000 drm/i915: Allow the sysadmin to override security mitigations The clear-residuals mitigation is a relatively heavy hammer and under some circumstances the user may wish to forgo the context isolation in order to meet some performance requirement. Introduce a generic module parameter to allow selectively enabling/disabling different mitigations. To disable just the clear-residuals mitigation (on Ivybridge, Baytrail, or Haswell) use the module parameter: i915.mitigations=auto,!residuals Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/1858 Fixes: 47f8253d2b89 ("drm/i915/gen7: Clear all EU/L3 residual contexts") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Jon Bloomfield Cc: Rodrigo Vivi Cc: stable@vger.kernel.org # v5.7 Reviewed-by: Jon Bloomfield Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20210111225220.3483-3-chris@chris-wilson.co.uk (cherry picked from commit f7452c7cbd5b5dfb9a6c84cb20bea04c89be50cd) Signed-off-by: Jani Nikula commit 09aa9e45863e9e25dfbf350bae89fc3c2964482c Author: Chris Wilson Date: Mon Jan 11 22:52:19 2021 +0000 drm/i915/gt: Restore clear-residual mitigations for Ivybridge, Baytrail The mitigation is required for all gen7 platforms, now that it does not cause GPU hangs, restore it for Ivybridge and Baytrail. Fixes: 47f8253d2b89 ("drm/i915/gen7: Clear all EU/L3 residual contexts") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Prathap Kumar Valsan Cc: Akeem G Abodunrin Cc: Bloomfield Jon Reviewed-by: Akeem G Abodunrin Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20210111225220.3483-2-chris@chris-wilson.co.uk (cherry picked from commit 008ead6ef8f588a8c832adfe9db201d9be5fd410) Signed-off-by: Jani Nikula commit ffaf97899c4a58b9fefb11534f730785443611a8 Author: Chris Wilson Date: Mon Jan 11 22:52:18 2021 +0000 drm/i915/gt: Limit VFE threads based on GT MEDIA_STATE_VFE only accepts the 'maximum number of threads' in the range [0, n-1] where n is #EU * (#threads/EU) with the number of threads based on plaform and the number of EU based on the number of slices and subslices. This is a fixed number per platform/gt, so appropriately limit the number of threads we spawn to match the device. v2: Oversaturate the system with tasks to force execution on every HW thread; if the thread idles it is returned to the pool and may be reused again before an unused thread. v3: Fix more state commands, which was causing Baytrail to barf. v4: STATE_CACHE_INVALIDATE requires a stall on Ivybridge Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2024 Fixes: 47f8253d2b89 ("drm/i915/gen7: Clear all EU/L3 residual contexts") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Prathap Kumar Valsan Cc: Akeem G Abodunrin Cc: Jon Bloomfield Cc: Rodrigo Vivi Cc: Randy Wright Cc: stable@vger.kernel.org # v5.7+ Reviewed-by: Akeem G Abodunrin Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20210111225220.3483-1-chris@chris-wilson.co.uk (cherry picked from commit eebfb32e26851662d24ea86dd381fd0f83cd4b47) Signed-off-by: Jani Nikula commit 694a1c0adebee9152a9ba0320468f7921aca647d Author: Tian Tao Date: Mon Dec 28 09:26:14 2020 +0800 iommu/vt-d: Fix duplicate included linux/dma-map-ops.h linux/dma-map-ops.h is included more than once, Remove the one that isn't necessary. Signed-off-by: Tian Tao Acked-by: Lu Baolu Link: https://lore.kernel.org/r/1609118774-10083-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Will Deacon commit 4e0dcf62ab4cf917d0cbe751b8bf229a065248d4 Author: Ryan Chen Date: Fri Jan 8 16:12:38 2021 +0800 usb: gadget: aspeed: fix stop dma register setting. The vhub engine has two dma mode, one is descriptor list, another is single stage DMA. Each mode has different stop register setting. Descriptor list operation (bit2) : 0 disable reset, 1: enable reset Single mode operation (bit0) : 0 : disable, 1: enable Fixes: 7ecca2a4080c ("usb/gadget: Add driver for Aspeed SoC virtual hub") Cc: stable Acked-by: Felipe Balbi Acked-by: Joel Stanley Signed-off-by: Ryan Chen Link: https://lore.kernel.org/r/20210108081238.10199-2-ryan_chen@aspeedtech.com Signed-off-by: Greg Kroah-Hartman commit 643a4df7fe3f6831d14536fd692be85f92670a52 Author: Longfang Liu Date: Tue Jan 12 09:57:27 2021 +0800 USB: ehci: fix an interrupt calltrace error The system that use Synopsys USB host controllers goes to suspend when using USB audio player. This causes the USB host controller continuous send interrupt signal to system, When the number of interrupts exceeds 100000, the system will forcibly close the interrupts and output a calltrace error. When the system goes to suspend, the last interrupt is reported to the driver. At this time, the system has set the state to suspend. This causes the last interrupt to not be processed by the system and not clear the interrupt flag. This uncleared interrupt flag constantly triggers new interrupt event. This causing the driver to receive more than 100,000 interrupts, which causes the system to forcibly close the interrupt report and report the calltrace error. so, when the driver goes to sleep and changes the system state to suspend, the interrupt flag needs to be cleared. Signed-off-by: Longfang Liu Acked-by: Alan Stern Link: https://lore.kernel.org/r/1610416647-45774-1-git-send-email-liulongfang@huawei.com Cc: stable Signed-off-by: Greg Kroah-Hartman commit 280a9045bb18833db921b316a5527d2b565e9f2e Author: Eugene Korenevsky Date: Sun Jan 10 20:36:09 2021 +0300 ehci: fix EHCI host controller initialization sequence According to EHCI spec, EHCI HC clears USBSTS.HCHalted whenever USBCMD.RS=1. However, it is a good practice to wait some time after setting USBCMD.RS (approximately 100ms) until USBSTS.HCHalted become zero. Without this waiting, VirtualBox's EHCI virtual HC accidentally hangs (see BugLink). BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=211095 Acked-by: Alan Stern Signed-off-by: Eugene Korenevsky Cc: stable Link: https://lore.kernel.org/r/20210110173609.GA17313@himera.home Signed-off-by: Greg Kroah-Hartman commit 5f8e084026543bc06eb9b2a623de55bb4ab3e60e Merge: 2eda61a850d45 c14556fc0c7c1 Author: Greg Kroah-Hartman Date: Tue Jan 12 17:15:02 2021 +0100 Merge tag 'thunderbolt-for-v5.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-linus Mika writes: thunderbolt: Fix for v5.11-rc4 This includes a single format string fix for the firmware connection manager USB4 NVM authentication proxy implementation introduced in this merge window. * tag 'thunderbolt-for-v5.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: thunderbolt: Drop duplicated 0x prefix from format string commit 96ec72a3425d1515b69b7f9dc34a4a6ce5862a37 Author: Arnd Bergmann Date: Tue Jan 5 14:49:27 2021 +0100 ia64: Mark architecture as orphaned Tony Luck has maintained arch/ia64 for the past 16 years, but mentioned that he no longer has working ia64 machines, nor time to look at patches, so he is stepping down as the maintainer. Fenghua Yu came in as a temporary co-maintainer when Tony was on sabbatical in 2009, but has not worked on it after that either. This leaves the architecture as Orphaned, meaning that patches will have to get routed through other trees from now on. Acked-by: Tony Luck Cc: Fenghua Yu Cc: linux-ia64@vger.kernel.org Link: https://lore.kernel.org/lkml/20210105153603.GA17644@agluck-desk2.amr.corp.intel.com/ Signed-off-by: Arnd Bergmann commit 968d7764e35b2fa4aad36481690b297e2c497c99 Author: Arnd Bergmann Date: Mon Jan 4 09:52:48 2021 +0100 ia64: fix xchg() warning The definition if xchg() causes a harmless warning in some files, like: In file included from ../arch/ia64/include/uapi/asm/intrinsics.h:22, from ../arch/ia64/include/asm/intrinsics.h:11, from ../arch/ia64/include/asm/bitops.h:19, from ../include/linux/bitops.h:32, from ../include/linux/kernel.h:11, from ../fs/nfs/read.c:12: ../fs/nfs/read.c: In function 'nfs_read_completion': ../arch/ia64/include/uapi/asm/cmpxchg.h:57:2: warning: value computed is not used [-Wunused-value] 57 | ((__typeof__(*(ptr))) __xchg((unsigned long) (x), (ptr), sizeof(*(ptr)))) | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../fs/nfs/read.c:196:5: note: in expansion of macro 'xchg' 196 | xchg(&nfs_req_openctx(req)->error, error); | ^~~~ Change it to a compound expression like the other architectures have to get a clean defconfig build. Signed-off-by: Arnd Bergmann commit 796130b1de29575e2e3fc3b0da4bda162b750db7 Author: Arnd Bergmann Date: Sat Dec 19 10:05:45 2020 +0100 ia64: fix timer cleanup regression A cleanup patch from my legacy timer series broke ia64 and led to RCU stall errors and a fast system clock: [ 909.360108] INFO: task systemd-sysv-ge:200 blocked for more than 127 seconds. [ 909.360108] Not tainted 5.10.0+ #130 [ 909.360108] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 909.360108] task:systemd-sysv-ge state:D stack: 0 pid: 200 ppid: 189 flags:0x00000000 [ 909.364108] [ 909.364108] Call Trace: [ 909.364423] [] __schedule+0x890/0x21e0 [ 909.364423] sp=e0000100487d7b70 bsp=e0000100487d1748 [ 909.368423] [] schedule+0xa0/0x240 [ 909.368423] sp=e0000100487d7b90 bsp=e0000100487d16e0 [ 909.368558] [] io_schedule+0x70/0xa0 [ 909.368558] sp=e0000100487d7b90 bsp=e0000100487d16c0 [ 909.372290] [] bit_wait_io+0x20/0xe0 [ 909.372290] sp=e0000100487d7b90 bsp=e0000100487d1698 [ 909.374168] rcu: INFO: rcu_sched detected stalls on CPUs/tasks: [ 909.376290] [] __wait_on_bit+0xc0/0x1c0 [ 909.376290] sp=e0000100487d7b90 bsp=e0000100487d1648 [ 909.374168] rcu: 3-....: (2 ticks this GP) idle=19e/1/0x4000000000000002 softirq=1581/1581 fqs=2 [ 909.374168] (detected by 0, t=5661 jiffies, g=1089, q=3) [ 909.376290] [] out_of_line_wait_on_bit+0x120/0x140 [ 909.376290] sp=e0000100487d7b90 bsp=e0000100487d1610 [ 909.374168] Task dump for CPU 3: [ 909.374168] task:khungtaskd state:R running task Revert most of my patch to make this work again, including the extra update_process_times()/profile_tick() and the local_irq_enable() in the loop that I expected not to be needed here. I have not found out exactly what goes wrong, and would suggest that someone with hardware access tries to convert this code into a singleshot clockevent driver, which should give better behavior in all cases. Reported-by: John Paul Adrian Glaubitz Fixes: 2b49ddcef297 ("ia64: convert to legacy_timer_tick") Cc: John Stultz Cc: Thomas Gleixner Cc: Stephen Boyd Cc: Frederic Weisbecker Signed-off-by: Arnd Bergmann commit b812834b5329fe78d643c9a61350d227db904361 Author: Konrad Dybcio Date: Sat Jan 9 17:56:21 2021 +0100 iommu: arm-smmu-qcom: Add sdm630/msm8998 compatibles for qcom quirks SDM630 and MSM8998 are among the SoCs that use Qualcomm's implementation of SMMUv2 which has already proven to be problematic over the years. Add their compatibles to the lookup list to prevent the platforms from being shut down by the hypervisor at MMU probe. Signed-off-by: Konrad Dybcio Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20210109165622.149777-1-konrad.dybcio@somainline.org Signed-off-by: Will Deacon commit 2d6ffc63f12417b979955a5b22ad9a76d2af5de9 Author: Lu Baolu Date: Thu Dec 31 08:53:20 2020 +0800 iommu/vt-d: Fix unaligned addresses for intel_flush_svm_range_dev() The VT-d hardware will ignore those Addr bits which have been masked by the AM field in the PASID-based-IOTLB invalidation descriptor. As the result, if the starting address in the descriptor is not aligned with the address mask, some IOTLB caches might not invalidate. Hence people will see below errors. [ 1093.704661] dmar_fault: 29 callbacks suppressed [ 1093.704664] DMAR: DRHD: handling fault status reg 3 [ 1093.712738] DMAR: [DMA Read] Request device [7a:02.0] PASID 2 fault addr 7f81c968d000 [fault reason 113] SM: Present bit in first-level paging entry is clear Fix this by using aligned address for PASID-based-IOTLB invalidation. Fixes: 1c4f88b7f1f9 ("iommu/vt-d: Shared virtual address in scalable mode") Reported-and-tested-by: Guo Kaijie Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20201231005323.2178523-2-baolu.lu@linux.intel.com Signed-off-by: Will Deacon commit 2f94ac19184665263b7a285ae88abe19dedf9c1b Author: KP Singh Date: Tue Jan 12 07:55:23 2021 +0000 bpf: Update local storage test to check handling of null ptrs It was found in [1] that bpf_inode_storage_get helper did not check the nullness of the passed owner ptr which caused an oops when dereferenced. This change incorporates the example suggested in [1] into the local storage selftest. The test is updated to create a temporary directory instead of just using a tempfile. In order to replicate the issue this copied rm binary is renamed tiggering the inode_rename with a null pointer for the new_inode. The logic to verify the setting and deletion of the inode local storage of the old inode is also moved to this LSM hook. The change also removes the copy_rm function and simply shells out to copy files and recursively delete directories and consolidates the logic of setting the initial inode storage to the bprm_committed_creds hook and removes the file_open hook. [1]: https://lore.kernel.org/bpf/CANaYP3HWkH91SN=wTNO9FL_2ztHfqcXKX38SSE-JJ2voh+vssw@mail.gmail.com Suggested-by: Gilad Reti Signed-off-by: KP Singh Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210112075525.256820-2-kpsingh@kernel.org commit 84d571d46c7046a957ff3d1c916a1b9dcc7f1ce8 Author: KP Singh Date: Tue Jan 12 07:55:25 2021 +0000 bpf: Fix typo in bpf_inode_storage.c Fix "gurranteed" -> "guaranteed" in bpf_inode_storage.c Suggested-by: Andrii Nakryiko Signed-off-by: KP Singh Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210112075525.256820-4-kpsingh@kernel.org commit 1a9c72ad4c26821e215a396167c14959cf24a7f1 Author: KP Singh Date: Tue Jan 12 07:55:24 2021 +0000 bpf: Local storage helpers should check nullness of owner ptr passed The verifier allows ARG_PTR_TO_BTF_ID helper arguments to be NULL, so helper implementations need to check this before dereferencing them. This was already fixed for the socket storage helpers but not for task and inode. The issue can be reproduced by attaching an LSM program to inode_rename hook (called when moving files) which tries to get the inode of the new file without checking for its nullness and then trying to move an existing file to a new path: mv existing_file new_file_does_not_exist The report including the sample program and the steps for reproducing the bug: https://lore.kernel.org/bpf/CANaYP3HWkH91SN=wTNO9FL_2ztHfqcXKX38SSE-JJ2voh+vssw@mail.gmail.com Fixes: 4cf1bc1f1045 ("bpf: Implement task local storage") Fixes: 8ea636848aca ("bpf: Implement bpf_local_storage for inodes") Reported-by: Gilad Reti Signed-off-by: KP Singh Signed-off-by: Daniel Borkmann Acked-by: Martin KaFai Lau Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210112075525.256820-3-kpsingh@kernel.org commit 20c7842ed8374e1c3ee750b2fe7ca8cdd071bda6 Author: Alex Deucher Date: Tue Jan 5 12:52:45 2021 -0500 ALSA: hda/hdmi - enable runtime pm for CI AMD display audio We are able to power down the GPU and audio via the GPU driver so flag these asics as supporting runtime pm. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher Link: https://lore.kernel.org/r/20210105175245.963451-1-alexander.deucher@amd.com Signed-off-by: Takashi Iwai commit 95e9295daa849095d8be05fb6e26b2ba9be1594f Author: Naushir Patuck Date: Wed Jan 6 16:16:57 2021 +0100 media: Revert "media: videobuf2: Fix length check for single plane dmabuf queueing" The updated length check for dmabuf types broke existing usage in v4l2 userland clients. Fixes: 961d3b27 ("media: videobuf2: Fix length check for single plane dmabuf queueing") Cc: stable@vger.kernel.org Signed-off-by: Naushir Patuck Tested-by: Kieran Bingham Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2eda61a850d45d421efcaaa06b64c06ee273d82e Merge: 7c53f6b671f4a 491b1bea00040 Author: Greg Kroah-Hartman Date: Tue Jan 12 15:38:23 2021 +0100 Merge tag 'usb-v5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-linus Peter writes: - Several bug-fixes for cdns3 imx driver - Update Peter Chen and Roger Quadros email address * tag 'usb-v5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb: MAINTAINERS: update Peter Chen's email address MAINTAINERS: Update address for Cadence USB3 driver usb: cdns3: imx: improve driver .remove API usb: cdns3: imx: fix can't create core device the second time issue usb: cdns3: imx: fix writing read-only memory issue commit 518837e65068c385dddc0a87b3e577c8be7c13b1 Author: Filipe Manana Date: Mon Jan 11 11:41:42 2021 +0000 btrfs: send: fix invalid clone operations when cloning from the same file and root When an incremental send finds an extent that is shared, it checks which file extent items in the range refer to that extent, and for those it emits clone operations, while for others it emits regular write operations to avoid corruption at the destination (as described and fixed by commit d906d49fc5f4 ("Btrfs: send, fix file corruption due to incorrect cloning operations")). However when the root we are cloning from is the send root, we are cloning from the inode currently being processed and the source file range has several extent items that partially point to the desired extent, with an offset smaller than the offset in the file extent item for the range we want to clone into, it can cause the algorithm to issue a clone operation that starts at the current eof of the file being processed in the receiver side, in which case the receiver will fail, with EINVAL, when attempting to execute the clone operation. Example reproducer: $ cat test-send-clone.sh #!/bin/bash DEV=/dev/sdi MNT=/mnt/sdi mkfs.btrfs -f $DEV >/dev/null mount $DEV $MNT # Create our test file with a single and large extent (1M) and with # different content for different file ranges that will be reflinked # later. xfs_io -f \ -c "pwrite -S 0xab 0 128K" \ -c "pwrite -S 0xcd 128K 128K" \ -c "pwrite -S 0xef 256K 256K" \ -c "pwrite -S 0x1a 512K 512K" \ $MNT/foobar btrfs subvolume snapshot -r $MNT $MNT/snap1 btrfs send -f /tmp/snap1.send $MNT/snap1 # Now do a series of changes to our file such that we end up with # different parts of the extent reflinked into different file offsets # and we overwrite a large part of the extent too, so no file extent # items refer to that part that was overwritten. This used to confuse # the algorithm used by the kernel to figure out which file ranges to # clone, making it attempt to clone from a source range starting at # the current eof of the file, resulting in the receiver to fail since # it is an invalid clone operation. # xfs_io -c "reflink $MNT/foobar 64K 1M 960K" \ -c "reflink $MNT/foobar 0K 512K 256K" \ -c "reflink $MNT/foobar 512K 128K 256K" \ -c "pwrite -S 0x73 384K 640K" \ $MNT/foobar btrfs subvolume snapshot -r $MNT $MNT/snap2 btrfs send -f /tmp/snap2.send -p $MNT/snap1 $MNT/snap2 echo -e "\nFile digest in the original filesystem:" md5sum $MNT/snap2/foobar # Now unmount the filesystem, create a new one, mount it and try to # apply both send streams to recreate both snapshots. umount $DEV mkfs.btrfs -f $DEV >/dev/null mount $DEV $MNT btrfs receive -f /tmp/snap1.send $MNT btrfs receive -f /tmp/snap2.send $MNT # Must match what we got in the original filesystem of course. echo -e "\nFile digest in the new filesystem:" md5sum $MNT/snap2/foobar umount $MNT When running the reproducer, the incremental send operation fails due to an invalid clone operation: $ ./test-send-clone.sh wrote 131072/131072 bytes at offset 0 128 KiB, 32 ops; 0.0015 sec (80.906 MiB/sec and 20711.9741 ops/sec) wrote 131072/131072 bytes at offset 131072 128 KiB, 32 ops; 0.0013 sec (90.514 MiB/sec and 23171.6148 ops/sec) wrote 262144/262144 bytes at offset 262144 256 KiB, 64 ops; 0.0025 sec (98.270 MiB/sec and 25157.2327 ops/sec) wrote 524288/524288 bytes at offset 524288 512 KiB, 128 ops; 0.0052 sec (95.730 MiB/sec and 24506.9883 ops/sec) Create a readonly snapshot of '/mnt/sdi' in '/mnt/sdi/snap1' At subvol /mnt/sdi/snap1 linked 983040/983040 bytes at offset 1048576 960 KiB, 1 ops; 0.0006 sec (1.419 GiB/sec and 1550.3876 ops/sec) linked 262144/262144 bytes at offset 524288 256 KiB, 1 ops; 0.0020 sec (120.192 MiB/sec and 480.7692 ops/sec) linked 262144/262144 bytes at offset 131072 256 KiB, 1 ops; 0.0018 sec (133.833 MiB/sec and 535.3319 ops/sec) wrote 655360/655360 bytes at offset 393216 640 KiB, 160 ops; 0.0093 sec (66.781 MiB/sec and 17095.8436 ops/sec) Create a readonly snapshot of '/mnt/sdi' in '/mnt/sdi/snap2' At subvol /mnt/sdi/snap2 File digest in the original filesystem: 9c13c61cb0b9f5abf45344375cb04dfa /mnt/sdi/snap2/foobar At subvol snap1 At snapshot snap2 ERROR: failed to clone extents to foobar: Invalid argument File digest in the new filesystem: 132f0396da8f48d2e667196bff882cfc /mnt/sdi/snap2/foobar The clone operation is invalid because its source range starts at the current eof of the file in the receiver, causing the receiver to get an EINVAL error from the clone operation when attempting it. For the example above, what happens is the following: 1) When processing the extent at file offset 1M, the algorithm checks that the extent is shared and can be (fully or partially) found at file offset 0. At this point the file has a size (and eof) of 1M at the receiver; 2) It finds that our extent item at file offset 1M has a data offset of 64K and, since the file extent item at file offset 0 has a data offset of 0, it issues a clone operation, from the same file and root, that has a source range offset of 64K, destination offset of 1M and a length of 64K, since the extent item at file offset 0 refers only to the first 128K of the shared extent. After this clone operation, the file size (and eof) at the receiver is increased from 1M to 1088K (1M + 64K); 3) Now there's still 896K (960K - 64K) of data left to clone or write, so it checks for the next file extent item, which starts at file offset 128K. This file extent item has a data offset of 0 and a length of 256K, so a clone operation with a source range offset of 256K, a destination offset of 1088K (1M + 64K) and length of 128K is issued. After this operation the file size (and eof) at the receiver increases from 1088K to 1216K (1088K + 128K); 4) Now there's still 768K (896K - 128K) of data left to clone or write, so it checks for the next file extent item, located at file offset 384K. This file extent item points to a different extent, not the one we want to clone, with a length of 640K. So we issue a write operation into the file range 1216K (1088K + 128K, end of the last clone operation), with a length of 640K and with a data matching the one we can find for that range in send root. After this operation, the file size (and eof) at the receiver increases from 1216K to 1856K (1216K + 640K); 5) Now there's still 128K (768K - 640K) of data left to clone or write, so we look into the file extent item, which is for file offset 1M and it points to the extent we want to clone, with a data offset of 64K and a length of 960K. However this matches the file offset we started with, the start of the range to clone into. So we can't for sure find any file extent item from here onwards with the rest of the data we want to clone, yet we proceed and since the file extent item points to the shared extent, with a data offset of 64K, we issue a clone operation with a source range starting at file offset 1856K, which matches the file extent item's offset, 1M, plus the amount of data cloned and written so far, which is 64K (step 2) + 128K (step 3) + 640K (step 4). This clone operation is invalid since the source range offset matches the current eof of the file in the receiver. We should have stopped looking for extents to clone at this point and instead fallback to write, which would simply the contain the data in the file range from 1856K to 1856K + 128K. So fix this by stopping the loop that looks for file ranges to clone at clone_range() when we reach the current eof of the file being processed, if we are cloning from the same file and using the send root as the clone root. This ensures any data not yet cloned will be sent to the receiver through a write operation. A test case for fstests will follow soon. Reported-by: Massimo B. Link: https://lore.kernel.org/linux-btrfs/6ae34776e85912960a253a8327068a892998e685.camel@gmx.net/ Fixes: 11f2069c113e ("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 14ff8e1970c03831bf64cf098f56e6ba83349170 Author: David Sterba Date: Fri Jan 8 17:06:10 2021 +0100 btrfs: no need to run delayed refs after commit_fs_roots during commit The inode number cache has been removed in this dev cycle, there's one more leftover. We don't need to run the delayed refs again after commit_fs_roots as stated in the comment, because btrfs_save_ino_cache is no more since 5297199a8bca ("btrfs: remove inode number cache feature"). Nothing else between commit_fs_roots and btrfs_qgroup_account_extents could create new delayed refs so the qgroup consistency should be safe. Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba commit 9f65df9c589f249435255da37a5dd11f1bc86f4d Author: Geert Uytterhoeven Date: Mon Jan 11 14:02:51 2021 +0100 ALSA: firewire-tascam: Fix integer overflow in midi_port_work() As snd_fw_async_midi_port.consume_bytes is unsigned int, and NSEC_PER_SEC is 1000000000L, the second multiplication in port->consume_bytes * 8 * NSEC_PER_SEC / 31250 always overflows on 32-bit platforms, truncating the result. Fix this by precalculating "NSEC_PER_SEC / 31250", which is an integer constant. Note that this assumes port->consume_bytes <= 16777. Fixes: 531f471834227d03 ("ALSA: firewire-lib/firewire-tascam: localize async midi port") Reviewed-by: Takashi Sakamoto Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20210111130251.361335-3-geert+renesas@glider.be Signed-off-by: Takashi Iwai commit e7c22eeaff8565d9a8374f320238c251ca31480b Author: Geert Uytterhoeven Date: Mon Jan 11 14:02:50 2021 +0100 ALSA: fireface: Fix integer overflow in transmit_midi_msg() As snd_ff.rx_bytes[] is unsigned int, and NSEC_PER_SEC is 1000000000L, the second multiplication in ff->rx_bytes[port] * 8 * NSEC_PER_SEC / 31250 always overflows on 32-bit platforms, truncating the result. Fix this by precalculating "NSEC_PER_SEC / 31250", which is an integer constant. Note that this assumes ff->rx_bytes[port] <= 16777. Fixes: 19174295788de77d ("ALSA: fireface: add transaction support") Reviewed-by: Takashi Sakamoto Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20210111130251.361335-2-geert+renesas@glider.be Signed-off-by: Takashi Iwai commit 51b2ee7d006a736a9126e8111d1f24e4fd0afaa6 Author: J. Bruce Fields Date: Mon Jan 11 16:01:29 2021 -0500 nfsd4: readdirplus shouldn't return parent of export If you export a subdirectory of a filesystem, a READDIRPLUS on the root of that export will return the filehandle of the parent with the ".." entry. The filehandle is optional, so let's just not return the filehandle for ".." if we're at the root of an export. Note that once the client learns one filehandle outside of the export, they can trivially access the rest of the export using further lookups. However, it is also not very difficult to guess filehandles outside of the export. So exporting a subdirectory of a filesystem should considered equivalent to providing access to the entire filesystem. To avoid confusion, we recommend only exporting entire filesystems. Reported-by: Youjipeng Signed-off-by: J. Bruce Fields Cc: stable@vger.kernel.org Signed-off-by: Chuck Lever commit 2672b94d730c4b69a17ce297dc3fa60b980e72dc Author: Tero Kristo Date: Thu Dec 17 15:07:21 2020 +0200 MAINTAINERS: Update my email address and maintainer level status My employment with TI is ending tomorrow, so update the email address entry in the maintainers file. Also, I don't expect to spend that much time with maintaining TI code anymore, so downgrade the status level to odd fixes only on areas where I remain as the main contact point for now, and move myself as secondary contact point where someone else has taken over the maintainership. Signed-off-by: Tero Kristo Signed-off-by: Tero Kristo Signed-off-by: Nishanth Menon Acked-by: Nishanth Menon Cc: Stephen Boyd Cc: Michael Turquette Cc: Nishanth Menon Cc: Santosh Shilimkar Cc: Borislav Petkov Cc: Tony Luck Link: https://lore.kernel.org/r/20201217130721.23555-1-t-kristo@ti.com commit 615d435400435876ac68c1de37e9526a9164eaec Author: Peter Geis Date: Fri Jan 8 13:59:13 2021 +0000 ALSA: hda/tegra: fix tegra-hda on tegra30 soc Currently hda on tegra30 fails to open a stream with an input/output error. For example: speaker-test -Dhw:0,3 -c 2 speaker-test 1.2.2 Playback device is hw:0,3 Stream parameters are 48000Hz, S16_LE, 2 channels Using 16 octaves of pink noise Rate set to 48000Hz (requested 48000Hz) Buffer size range from 64 to 16384 Period size range from 32 to 8192 Using max buffer size 16384 Periods = 4 was set period_size = 4096 was set buffer_size = 16384 0 - Front Left Write error: -5,Input/output error xrun_recovery failed: -5,Input/output error Transfer failed: Input/output error The tegra-hda device was introduced in tegra30 but only utilized in tegra124 until recent chips. Tegra210/186 work only due to a hardware change. For this reason it is unknown when this issue first manifested. Discussions with the hardware team show this applies to all current tegra chips. It has been resolved in the tegra234, which does not have hda support at this time. The explanation from the hardware team is this: Below is the striping formula referenced from HD audio spec. { ((num_channels * bits_per_sample) / number of SDOs) >= 8 } The current issue is seen because Tegra HW has a problem with boundary condition (= 8) for striping. The reason why it is not seen on Tegra210/Tegra186 is because it uses max 2SDO lines. Max SDO lines is read from GCAP register. For the given stream (channels = 2, bps = 16); ratio = (channels * bps) / NSDO = 32 / NSDO; On Tegra30, ratio = 32/4 = 8 (FAIL) On Tegra210/186, ratio = 32/2 = 16 (PASS) On Tegra194, ratio = 32/4 = 8 (FAIL) ==> Earlier workaround was applied for it If Tegra210/186 is forced to use 4SDO, it fails there as well. So the behavior is consistent across all these chips. Applying the fix in [1] universally resolves this issue on tegra30-hda. Tested on the Ouya game console and the tf201 tablet. [1] commit 60019d8c650d ("ALSA: hda/tegra: workaround playback failure on Tegra194") Reviewed-by: Jon Hunter Tested-by: Ion Agorria Reviewed-by: Sameer Pujar Acked-by: Thierry Reding Signed-off-by: Peter Geis Link: https://lore.kernel.org/r/20210108135913.2421585-3-pgwipeout@gmail.com Signed-off-by: Takashi Iwai commit f4eccc7fea203cfb35205891eced1ab51836f362 Author: Peter Geis Date: Fri Jan 8 13:59:12 2021 +0000 clk: tegra30: Add hda clock default rates to clock driver Current implementation defaults the hda clocks to clk_m. This causes hda to run too slow to operate correctly. Fix this by defaulting to pll_p and setting the frequency to the correct rate. This matches upstream t124 and downstream t30. Acked-by: Jon Hunter Tested-by: Ion Agorria Acked-by: Sameer Pujar Acked-by: Thierry Reding Signed-off-by: Peter Geis Link: https://lore.kernel.org/r/20210108135913.2421585-2-pgwipeout@gmail.com Signed-off-by: Takashi Iwai commit bb52cb0dec8d2fecdb22843a805131478a180728 Author: Christian König Date: Mon Jan 11 14:44:57 2021 +0100 drm/ttm: make the pool shrinker lock a mutex set_pages_wb() might sleep and so we can't do this in an atomic context. Signed-off-by: Christian König Reported-by: Mikhail Gavrilov Tested-by: Mikhail Gavrilov Fixes: d099fc8f540a ("drm/ttm: new TT backend allocation pool v3") Reviewed-by: Huang Rui Link: https://patchwork.freedesktop.org/patch/413409/ commit 9488307a5559255f2fc9a3ab61e1c31e243ca7c6 Author: Oded Gabbay Date: Mon Jan 11 17:49:30 2021 +0200 habanalabs: prevent soft lockup during unmap When using Deep learning framework such as tensorflow or pytorch, there are tens of thousands of host memory mappings. When the user frees all those mappings at the same time, the process of unmapping and unpinning them can take a long time, which may cause a soft lockup bug. To prevent this, we need to free the core to do other things during the unmapping process. For now, we chose to do it every 32K unmappings (each unmap is a single 4K page). Signed-off-by: Oded Gabbay commit aa6df6533b8f9ead98889baa92e2b19793b1c77e Author: Oded Gabbay Date: Mon Jan 11 15:00:38 2021 +0200 habanalabs: fix reset process in case of failures There are some points in the reset process where if the code fails for some reason, and the system admin tries to initiate the reset process again we will get a kernel panic. This is because there aren't any protections in different fini functions that are called during the reset process. The protections that are added in this patch make sure that if the fini functions are called multiple times, without calling init functions between them, there won't be double release of already released resources. Signed-off-by: Oded Gabbay commit a9d4ef643430d638de1910377f50e0d492d85a43 Author: Oded Gabbay Date: Mon Jan 11 13:49:38 2021 +0200 habanalabs: fix dma_addr passed to dma_mmap_coherent When doing dma_alloc_coherent in the driver, we add a certain hard-coded offset to the DMA address before returning to the callee function. This offset is needed when our device use this DMA address to perform outbound transactions to the host. However, if we want to map the DMA'able memory to the user via dma_mmap_coherent(), we need to pass the original dma address, without this offset. Otherwise, we will get erronouos mapping. Signed-off-by: Oded Gabbay commit e1def45b5291278590bc3033cc518bf5c964a18d Author: Matthias Reichl Date: Sat Jan 9 21:10:55 2021 +0100 media: rc: ite-cir: fix min_timeout calculation Commit 528222d853f92 ("media: rc: harmonize infrared durations to microseconds") missed to switch the min_timeout calculation from ns to us. This resulted in a minimum timeout of 1.2 seconds instead of 1.2ms, leading to large delays and long key repeats. Fix this by applying proper ns->us conversion. Cc: stable@vger.kernel.org Fixes: 528222d853f92 ("media: rc: harmonize infrared durations to microseconds") Signed-off-by: Matthias Reichl Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 76e2fc63ca40977af893b724b00cc2f8e9ce47a4 Author: Yazen Ghannam Date: Mon Jan 11 11:04:29 2021 +0100 x86/cpu/amd: Set __max_die_per_package on AMD Set the maximum DIE per package variable on AMD using the NodesPerProcessor topology value. This will be used by RAPL, among others, to determine the maximum number of DIEs on the system in order to do per-DIE manipulations. [ bp: Productize into a proper patch. ] Fixes: 028c221ed190 ("x86/CPU/AMD: Save AMD NodeId as cpu_die_id") Reported-by: Johnathan Smithinovic Reported-by: Rafael Kitover Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Tested-by: Johnathan Smithinovic Tested-by: Rafael Kitover Link: https://bugzilla.kernel.org/show_bug.cgi?id=210939 Link: https://lkml.kernel.org/r/20210106112106.GE5729@zn.tnic Link: https://lkml.kernel.org/r/20210111101455.1194-1-bp@alien8.de commit 3e096a2112b7b407549020cf095e2a425f00fabb Author: Jonathan Neuschäfer Date: Fri Jan 1 23:19:42 2021 +0100 ALSA: doc: Fix reference to mixart.rst MIXART.txt has been converted to ReST and renamed. Fix the reference in alsa-configuration.rst. Fixes: 3d8e81862ce4 ("ALSA: doc: ReSTize MIXART.txt") Signed-off-by: Jonathan Neuschäfer Cc: Link: https://lore.kernel.org/r/20210101221942.1068388-1-j.neuschaefer@gmx.net Signed-off-by: Takashi Iwai commit 2225a8dda263edc35a0e8b858fe2945cf6240fde Author: Ariel Marcovitch Date: Sat Jan 2 22:11:56 2021 +0200 powerpc: Fix alignment bug within the init sections This is a bug that causes early crashes in builds with an .exit.text section smaller than a page and an .init.text section that ends in the beginning of a physical page (this is kinda random, which might explain why this wasn't really encountered before). The init sections are ordered like this: .init.text .exit.text .init.data Currently, these sections aren't page aligned. Because the init code might become read-only at runtime and because the .init.text section can potentially reside on the same physical page as .init.data, the beginning of .init.data might be mapped read-only along with .init.text. Then when the kernel tries to modify a variable in .init.data (like kthreadd_done, used in kernel_init()) the kernel panics. To avoid this, make _einittext page aligned and also align .exit.text to make sure .init.data is always seperated from the text segments. Fixes: 060ef9d89d18 ("powerpc32: PAGE_EXEC required for inittext") Signed-off-by: Ariel Marcovitch Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210102201156.10805-1-ariel.marcovitch@gmail.com commit 5d06f72dc29c16a4868dd7ea0a6122454267809b Author: Souptick Joarder Date: Mon Jan 11 19:41:01 2021 -0800 Input: ariel-pwrbutton - remove unused variable ariel_pwrbutton_id_table Kernel test robot throws below warning -> >> drivers/input/misc/ariel-pwrbutton.c:152:35: warning: unused variable >> 'ariel_pwrbutton_id_table' [-Wunused-const-variable] static const struct spi_device_id ariel_pwrbutton_id_table[] = { ^ 1 warning generated. Remove unused variable ariel_pwrbutton_id_table[] if no plan to use it further. Reported-by: kernel test robot Signed-off-by: Souptick Joarder Reviewed-by: Lubomir Rintel Link: https://lore.kernel.org/r/1608581041-4354-1-git-send-email-jrdr.linux@gmail.com Signed-off-by: Dmitry Torokhov commit 1ee527a79fa6d0a85425cafc1632e09bd8d3dca7 Merge: e56b3d94d939f 9bd6b629c39e3 Author: Jakub Kicinski Date: Mon Jan 11 18:20:12 2021 -0800 Merge branch 'skb-frag-kmap_atomic-fixes' Willem de Bruijn says: ==================== skb frag: kmap_atomic fixes skb frags may be backed by highmem and/or compound pages. Various code calls kmap_atomic to safely access highmem pages. But this needs additional care for compound pages. Fix a few issues: patch 1 expect kmap mappings with CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP patch 2 fixes kmap_atomic + compound page support in skb_seq_read patch 3 fixes kmap_atomic + compound page support in esp ==================== Link: https://lore.kernel.org/r/20210109221834.3459768-1-willemdebruijn.kernel@gmail.com Signed-off-by: Jakub Kicinski commit 9bd6b629c39e3fa9e14243a6d8820492be1a5b2e Author: Willem de Bruijn Date: Sat Jan 9 17:18:34 2021 -0500 esp: avoid unneeded kmap_atomic call esp(6)_output_head uses skb_page_frag_refill to allocate a buffer for the esp trailer. It accesses the page with kmap_atomic to handle highmem. But skb_page_frag_refill can return compound pages, of which kmap_atomic only maps the first underlying page. skb_page_frag_refill does not return highmem, because flag __GFP_HIGHMEM is not set. ESP uses it in the same manner as TCP. That also does not call kmap_atomic, but directly uses page_address, in skb_copy_to_page_nocache. Do the same for ESP. This issue has become easier to trigger with recent kmap local debugging feature CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP. Fixes: cac2661c53f3 ("esp4: Avoid skb_cow_data whenever possible") Fixes: 03e2a30f6a27 ("esp6: Avoid skb_cow_data whenever possible") Signed-off-by: Willem de Bruijn Acked-by: Steffen Klassert Signed-off-by: Jakub Kicinski commit 97550f6fa59254435d864b92603de3ca4b5a99f8 Author: Willem de Bruijn Date: Sat Jan 9 17:18:33 2021 -0500 net: compound page support in skb_seq_read skb_seq_read iterates over an skb, returning pointer and length of the next data range with each call. It relies on kmap_atomic to access highmem pages when needed. An skb frag may be backed by a compound page, but kmap_atomic maps only a single page. There are not enough kmap slots to always map all pages concurrently. Instead, if kmap_atomic is needed, iterate over each page. As this increases the number of calls, avoid this unless needed. The necessary condition is captured in skb_frag_must_loop. I tried to make the change as obvious as possible. It should be easy to verify that nothing changes if skb_frag_must_loop returns false. Tested: On an x86 platform with CONFIG_HIGHMEM=y CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP=y CONFIG_NETFILTER_XT_MATCH_STRING=y Run ip link set dev lo mtu 1500 iptables -A OUTPUT -m string --string 'badstring' -algo bm -j ACCEPT dd if=/dev/urandom of=in bs=1M count=20 nc -l -p 8000 > /dev/null & nc -w 1 -q 0 localhost 8000 < in Signed-off-by: Willem de Bruijn Signed-off-by: Jakub Kicinski commit 29766bcffad03da66892bef82674883e31f78fec Author: Willem de Bruijn Date: Sat Jan 9 17:18:32 2021 -0500 net: support kmap_local forced debugging in skb_frag_foreach Skb frags may be backed by highmem and/or compound pages. Highmem pages need kmap_atomic mappings to access. But kmap_atomic maps a single page, not the entire compound page. skb_foreach_page iterates over an skb frag, in one step in the common case, page by page only if kmap_atomic must be called for each page. The decision logic is captured in skb_frag_must_loop. CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP extends kmap from highmem to all pages, to increase code coverage. Extend skb_frag_must_loop to this new condition. Link: https://lore.kernel.org/linux-mm/20210106180132.41dc249d@gandalf.local.home/ Fixes: 0e91a0c6984c ("mm/highmem: Provide CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP") Reported-by: Steven Rostedt (VMware) Signed-off-by: Linus Torvalds Signed-off-by: Willem de Bruijn Tested-by: Steven Rostedt (VMware) Signed-off-by: Jakub Kicinski commit e56b3d94d939f52d46209b9e1b6700c5bfff3123 Author: Andrey Zhizhikin Date: Fri Jan 8 09:58:39 2021 +0000 rndis_host: set proper input size for OID_GEN_PHYSICAL_MEDIUM request MSFT ActiveSync implementation requires that the size of the response for incoming query is to be provided in the request input length. Failure to set the input size proper results in failed request transfer, where the ActiveSync counterpart reports the NDIS_STATUS_INVALID_LENGTH (0xC0010014L) error. Set the input size for OID_GEN_PHYSICAL_MEDIUM query to the expected size of the response in order for the ActiveSync to properly respond to the request. Fixes: 039ee17d1baa ("rndis_host: Add RNDIS physical medium checking into generic_rndis_bind()") Signed-off-by: Andrey Zhizhikin Link: https://lore.kernel.org/r/20210108095839.3335-1-andrey.zhizhikin@leica-geosystems.com Signed-off-by: Jakub Kicinski commit 6f83802a1a06e74eafbdbc9b52c05516d3083d02 Author: Stefan Chulski Date: Sun Jan 10 21:23:02 2021 +0200 net: mvpp2: Remove Pause and Asym_Pause support Packet Processor hardware not connected to MAC flow control unit and cannot support TX flow control. This patch disable flow control support. Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network unit") Signed-off-by: Stefan Chulski Acked-by: Marcin Wojtas Link: https://lore.kernel.org/r/1610306582-16641-1-git-send-email-stefanc@marvell.com Signed-off-by: Jakub Kicinski commit 938288349ca8a9d4b936bf5d2f6dd4526a598974 Author: Seb Laveze Date: Mon Jan 11 09:14:07 2021 +0100 dt-bindings: net: dwmac: fix queue priority documentation The priority field is not the queue priority (queue priority is fixed) but a bitmask of priorities assigned to this queue. In receive, priorities relate to tagged frames priorities. In transmit, priorities relate to PFC frames. Signed-off-by: Seb Laveze Link: https://lore.kernel.org/r/20210111081406.1348622-1-sebastien.laveze@oss.nxp.com Signed-off-by: Jakub Kicinski commit 5541075a348b6ca6ac668653f7d2c423ae8e00b6 Author: Jiri Olsa Date: Mon Jan 11 20:16:50 2021 +0100 bpf: Prevent double bpf_prog_put call from bpf_tracing_prog_attach The bpf_tracing_prog_attach error path calls bpf_prog_put on prog, which causes refcount underflow when it's called from link_create function. link_create prog = bpf_prog_get <-- get ... tracing_bpf_link_attach(prog.. bpf_tracing_prog_attach(prog.. out_put_prog: bpf_prog_put(prog); <-- put if (ret < 0) bpf_prog_put(prog); <-- put Removing bpf_prog_put call from bpf_tracing_prog_attach and making sure its callers call it instead. Fixes: 4a1e7c0c63e0 ("bpf: Support attaching freplace programs to multiple attach points") Signed-off-by: Jiri Olsa Signed-off-by: Daniel Borkmann Acked-by: Toke Høiland-Jørgensen Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210111191650.1241578-1-jolsa@kernel.org commit a0d54b4f5b219fb31f0776e9f53aa137e78ae431 Merge: 6e68b9961ff69 7bb83f6fc4ee8 Author: Linus Torvalds Date: Mon Jan 11 14:37:13 2021 -0800 Merge tag 'trace-v5.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fix from Steven Rostedt: "Blacklist properly on all archs. The code to blacklist notrace functions for kprobes was not using the right kconfig option, which caused some archs (powerpc) to possibly not blacklist them" * tag 'trace-v5.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing/kprobes: Do the notrace functions check without kprobes on ftrace commit 6e68b9961ff690ace07fac22c3c7752882ecc40a Merge: c912fd05fab97 e076ab2a2ca70 Author: Linus Torvalds Date: Mon Jan 11 14:18:56 2021 -0800 Merge tag 'for-5.11-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "More material for stable trees. - tree-checker: check item end overflow - fix false warning during relocation regarding extent type - fix inode flushing logic, caused notable performance regression (since 5.10) - debugging fixups: - print correct offset for reloc tree key - pass reliable fs_info pointer to error reporting helper" * tag 'for-5.11-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: shrink delalloc pages instead of full inodes btrfs: reloc: fix wrong file extent type check to avoid false ENOENT btrfs: tree-checker: check if chunk item end overflows btrfs: prevent NULL pointer dereference in extent_io_tree_panic btrfs: print the actual offset in btrfs_root_name commit 2896c93811e39d63a4d9b63ccf12a8fbc226e5e4 Author: David Disseldorp Date: Tue Nov 3 02:21:58 2020 +0100 scsi: target: Fix XCOPY NAA identifier lookup When attempting to match EXTENDED COPY CSCD descriptors with corresponding se_devices, target_xcopy_locate_se_dev_e4() currently iterates over LIO's global devices list which includes all configured backstores. This change ensures that only initiator-accessible backstores are considered during CSCD descriptor lookup, according to the session's se_node_acl LUN list. To avoid LUN removal race conditions, device pinning is changed from being configfs based to instead using the se_node_acl lun_ref. Reference: CVE-2020-28374 Fixes: cbf031f425fd ("target: Add support for EXTENDED_COPY copy offload emulation") Reviewed-by: Lee Duncan Signed-off-by: David Disseldorp Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 27b7c6e096264cc7b91bb80a4f65f8c0a66f079f Author: Mikko Perttunen Date: Mon Jan 11 18:08:32 2021 +0200 i2c: tegra: Wait for config load atomically while in ISR Upon a communication error, the interrupt handler can call tegra_i2c_disable_packet_mode. This causes a sleeping poll to happen unless the current transaction was marked atomic. Fix this by making the poll happen atomically if we are in an IRQ. This matches the behavior prior to the patch mentioned in the Fixes tag. Fixes: ede2299f7101 ("i2c: tegra: Support atomic transfers") Cc: stable@vger.kernel.org Signed-off-by: Mikko Perttunen Reviewed-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit a5e92ef3c3fd46320d4e293bdec0cdd4b80a6e0f Author: Bas Nieuwenhuizen Date: Sun Jan 10 03:11:42 2021 +0100 drm: Check actual format for legacy pageflip. With modifiers one can actually have different format_info structs for the same format, which now matters for AMDGPU since we convert implicit modifiers to explicit modifiers with multiple planes. I checked other drivers and it doesn't look like they end up triggering this case so I think this is safe to relax. Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Daniel Vetter Reviewed-by: Zhan Liu Acked-by: Christian König Acked-by: Alex Deucher Fixes: 816853f9dc40 ("drm/amd/display: Set new format info for converted metadata.") Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210110021142.28221-1-bas@basnieuwenhuizen.nl commit 7bb83f6fc4ee84e95d0ac0d14452c2619fb3fe70 Author: Masami Hiramatsu Date: Fri Jan 8 13:19:38 2021 +0900 tracing/kprobes: Do the notrace functions check without kprobes on ftrace Enable the notrace function check on the architecture which doesn't support kprobes on ftrace but support dynamic ftrace. This notrace function check is not only for the kprobes on ftrace but also sw-breakpoint based kprobes. Thus there is no reason to limit this check for the arch which supports kprobes on ftrace. This also changes the dependency of Kconfig. Because kprobe event uses the function tracer's address list for identifying notrace function, if the CONFIG_DYNAMIC_FTRACE=n, it can not check whether the target function is notrace or not. Link: https://lkml.kernel.org/r/20210105065730.2634785-1-naveen.n.rao@linux.vnet.ibm.com Link: https://lkml.kernel.org/r/161007957862.114704.4512260007555399463.stgit@devnote2 Cc: stable@vger.kernel.org Fixes: 45408c4f92506 ("tracing: kprobes: Prohibit probing on notrace function") Acked-by: Naveen N. Rao Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 5b04cb8224ef9bf0d9af8a4c0e6e23806bb2d720 Author: Jianpeng Ma Date: Tue Dec 29 08:26:35 2020 +0800 libnvdimm/pmem: Remove unused header 'commit a8b456d01cd6 ("bdi: remove BDI_CAP_SYNCHRONOUS_IO")' forgot remove the related header file. Signed-off-by: Jianpeng Ma Reviewed-by: Ira Weiny Link: https://lore.kernel.org/r/20201229002635.42555-1-jianpeng.ma@intel.com Signed-off-by: Dan Williams commit 637464c59e0bb13a1da6abf1d7c4b9f9c01646d2 Author: Dan Williams Date: Mon Jan 4 17:21:25 2021 -0800 ACPI: NFIT: Fix flexible_array.cocci warnings Julia and 0day report: Zero-length and one-element arrays are deprecated, see Documentation/process/deprecated.rst Flexible-array members should be used instead. However, a straight conversion to flexible arrays yields: drivers/acpi/nfit/core.c:2276:4: error: flexible array member in a struct with no named members drivers/acpi/nfit/core.c:2287:4: error: flexible array member in a struct with no named members Instead, just use plain arrays not embedded flexible arrays. Cc: Denis Efremov Reported-by: kernel test robot Reported-by: Julia Lawall Signed-off-by: Dan Williams commit 843010a815e87b45fc6b64848f02e42f6aee3f22 Author: Jeremy Cline Date: Mon Jan 11 11:40:33 2021 -0500 drm/ttm: Fix address passed to dma_mapping_error() in ttm_pool_map() check_unmap() is producing a warning about a missing map error check. The return value from dma_map_page() should be checked for an error, not the caller-provided dma_addr. Fixes: d099fc8f540a ("drm/ttm: new TT backend allocation pool v3") Signed-off-by: Jeremy Cline Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/413432/ Signed-off-by: Christian König commit a58015d638cd4e4555297b04bec9b49028369075 Author: Dexuan Cui Date: Thu Jan 7 23:23:48 2021 -0800 ACPI: scan: Harden acpi_device_add() against device ID overflows Linux VM on Hyper-V crashes with the latest mainline: [ 4.069624] detected buffer overflow in strcpy [ 4.077733] kernel BUG at lib/string.c:1149! .. [ 4.085819] RIP: 0010:fortify_panic+0xf/0x11 ... [ 4.085819] Call Trace: [ 4.085819] acpi_device_add.cold.15+0xf2/0xfb [ 4.085819] acpi_add_single_object+0x2a6/0x690 [ 4.085819] acpi_bus_check_add+0xc6/0x280 [ 4.085819] acpi_ns_walk_namespace+0xda/0x1aa [ 4.085819] acpi_walk_namespace+0x9a/0xc2 [ 4.085819] acpi_bus_scan+0x78/0x90 [ 4.085819] acpi_scan_init+0xfa/0x248 [ 4.085819] acpi_init+0x2c1/0x321 [ 4.085819] do_one_initcall+0x44/0x1d0 [ 4.085819] kernel_init_freeable+0x1ab/0x1f4 This is because of the recent buffer overflow detection in the commit 6a39e62abbaf ("lib: string.h: detect intra-object overflow in fortified string functions") Here acpi_device_bus_id->bus_id can only hold 14 characters, while the the acpi_device_hid(device) returns a 22-char string "HYPER_V_GEN_COUNTER_V1". Per ACPI Spec v6.2, Section 6.1.5 _HID (Hardware ID), if the ID is a string, it must be of the form AAA#### or NNNN####, i.e. 7 chars or 8 chars. The field bus_id in struct acpi_device_bus_id was originally defined as char bus_id[9], and later was enlarged to char bus_id[15] in 2007 in the commit bb0958544f3c ("ACPI: use more understandable bus_id for ACPI devices") Fix the issue by changing the field bus_id to const char *, and use kstrdup_const() to initialize it. Signed-off-by: Dexuan Cui Tested-By: Jethro Beekman [ rjw: Subject change, whitespace adjustment ] Cc: All applicable Signed-off-by: Rafael J. Wysocki commit c912fd05fab97934e4cf579654d0dc4835b4758c Merge: f1ee3e150bd9d 7b723008f9c95 Author: Linus Torvalds Date: Mon Jan 11 11:35:46 2021 -0800 Merge tag 'nfsd-5.11-1' of git://git.linux-nfs.org/projects/cel/cel-2.6 Pull nfsd fixes from Chuck Lever: - Fix major TCP performance regression - Get NFSv4.2 READ_PLUS regression tests to pass - Improve NFSv4 COMPOUND memory allocation - Fix sparse warning * tag 'nfsd-5.11-1' of git://git.linux-nfs.org/projects/cel/cel-2.6: NFSD: Restore NFSv4 decoding's SAVEMEM functionality SUNRPC: Handle TCP socket sends with kernel_sendpage() again NFSD: Fix sparse warning in nfssvc.c nfsd: Don't set eof on a truncated READ_PLUS nfsd: Fixes for nfsd4_encode_read_plus_data() commit f1ee3e150bd9da2dd60a210926c86cffd4a336ea Merge: 7c53f6b671f4a ad0a6bad44758 Author: Linus Torvalds Date: Mon Jan 11 11:28:58 2021 -0800 Merge tag 'hyperv-fixes-signed-20210111' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux Pull hyperv fixes from Wei Liu: - fix kexec panic/hang (Dexuan Cui) - fix occasional crashes when flushing TLB (Wei Liu) * tag 'hyperv-fixes-signed-20210111' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: x86/hyperv: check cpu mask after interrupt has been disabled x86/hyperv: Fix kexec panic/hang issues commit 7024f60d655272bd2ca1d3a4c9e0a63319b1eea1 Author: Hyunwook (Wooky) Baek Date: Sat Jan 9 23:11:02 2021 -0800 x86/sev-es: Handle string port IO to kernel memory properly Don't assume dest/source buffers are userspace addresses when manually copying data for string I/O or MOVS MMIO, as {get,put}_user() will fail if handed a kernel address and ultimately lead to a kernel panic. When invoking INSB/OUTSB instructions in kernel space in a SEV-ES-enabled VM, the kernel crashes with the following message: "SEV-ES: Unsupported exception in #VC instruction emulation - can't continue" Handle that case properly. [ bp: Massage commit message. ] Fixes: f980f9c31a92 ("x86/sev-es: Compile early handler code into kernel image") Signed-off-by: Hyunwook (Wooky) Baek Signed-off-by: Borislav Petkov Acked-by: David Rientjes Link: https://lkml.kernel.org/r/20210110071102.2576186-1-baekhw@google.com commit 166ae7315678b33ce86875344829d06da6c3c2ce Merge: 2af5268180410 4ceb06e7c336f Author: Jani Nikula Date: Mon Jan 11 20:13:00 2021 +0200 Merge tag 'gvt-fixes-2020-01-08' of https://github.com/intel/gvt-linux into drm-intel-fixes gvt-fixes-2020-01-08 - Fix VFIO EDID on APL/BXT (Colin) Signed-off-by: Jani Nikula From: Zhenyu Wang Link: https://patchwork.freedesktop.org/patch/msgid/20210108045911.GF15982@zhen-hp.sh.intel.com commit 2af5268180410b874fc06be91a1b2fbb22b1be0c Author: Imre Deak Date: Wed Dec 9 17:39:52 2020 +0200 drm/i915/icl: Fix initing the DSI DSC power refcount during HW readout For an enabled DSC during HW readout the corresponding power reference is taken along the CRTC power domain references in get_crtc_power_domains(). Remove the incorrect get ref from the DSI encoder hook. Fixes: 2b68392e638d ("drm/i915/dsi: add support for DSC") Cc: Vandita Kulkarni Cc: Jani Nikula Signed-off-by: Imre Deak Reviewed-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20201209153952.3397959-1-imre.deak@intel.com (cherry picked from commit 3a9ec563a4ff770ae647f6ee539810f1866866c9) Signed-off-by: Jani Nikula commit 1a3ed0dc3594d99ff341ec63865a40519ea24b8d Author: Alex Leibovich Date: Fri Dec 11 15:16:56 2020 +0100 mmc: sdhci-xenon: fix 1.8v regulator stabilization Automatic Clock Gating is a feature used for the power consumption optimisation. It turned out that during early init phase it may prevent the stable voltage switch to 1.8V - due to that on some platforms an endless printout in dmesg can be observed: "mmc1: 1.8V regulator output did not became stable" Fix the problem by disabling the ACG at very beginning of the sdhci_init and let that be enabled later. Fixes: 3a3748dba881 ("mmc: sdhci-xenon: Add Marvell Xenon SDHC core functionality") Signed-off-by: Alex Leibovich Signed-off-by: Marcin Wojtas Cc: stable@vger.kernel.org Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20201211141656.24915-1-mw@semihalf.com Signed-off-by: Ulf Hansson commit ca1219c0a7432272324660fc9f61a9940f90c50b Author: Jisheng Zhang Date: Tue Dec 29 16:16:25 2020 +0800 mmc: sdhci-of-dwcmshc: fix rpmb access Commit a44f7cb93732 ("mmc: core: use mrq->sbc when sending CMD23 for RPMB") began to use ACMD23 for RPMB if the host supports ACMD23. In RPMB ACM23 case, we need to set bit 31 to CMD23 argument, otherwise RPMB write operation will return general fail. However, no matter V4 is enabled or not, the dwcmshc's ARGUMENT2 register is 32-bit block count register which doesn't support stuff bits of CMD23 argument. So let's handle this specific ACMD23 case. From another side, this patch also prepare for future v4 enabling for dwcmshc, because from the 4.10 spec, the ARGUMENT2 register is redefined as 32bit block count which doesn't support stuff bits of CMD23 argument. Fixes: a44f7cb93732 ("mmc: core: use mrq->sbc when sending CMD23 for RPMB") Signed-off-by: Jisheng Zhang Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20201229161625.38255233@xhacker.debian Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson commit 621fadc22365f3cf307bcd9048e3372e9ee9cdcc Author: Pavel Begunkov Date: Mon Jan 11 04:00:31 2021 +0000 io_uring: don't take files/mm for a dead task In rare cases a task may be exiting while io_ring_exit_work() trying to cancel/wait its requests. It's ok for __io_sq_thread_acquire_mm() because of SQPOLL check, but is not for __io_sq_thread_acquire_files(). Play safe and fail for both of them. Cc: stable@vger.kernel.org # 5.5+ Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit d434ab6db524ab1efd0afad4ffa1ee65ca6ac097 Author: Pavel Begunkov Date: Mon Jan 11 04:00:30 2021 +0000 io_uring: drop mm and files after task_work_run __io_req_task_submit() run by task_work can set mm and files, but io_sq_thread() in some cases, and because __io_sq_thread_acquire_mm() and __io_sq_thread_acquire_files() do a simple current->mm/files check it may end up submitting IO with mm/files of another task. We also need to drop it after in the end to drop potentially grabbed references to them. Cc: stable@vger.kernel.org # 5.9+ Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit f970d1d01af8606233f47901c1cf39f3ae21fd74 Merge: 7c53f6b671f4a d092bd9110494 Author: Greg Kroah-Hartman Date: Mon Jan 11 15:37:40 2021 +0100 Merge tag 'phy-fixes-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy into char-misc-next Vinod writes: phy: fixes for 5.11 *) Fix Ingenic driver build *) Warning fix for cpcap-usb *) Compile test enabling for mediatek phy * tag 'phy-fixes-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: phy: mediatek: allow compile-testing the dsi phy phy: cpcap-usb: Fix warning for missing regulator_disable PHY: Ingenic: fix unconditional build of phy-ingenic-usb commit cb5021ca622fe83923e0789f99fe7227cbcd3f68 Author: Yanfei Xu Date: Mon Jan 11 18:48:07 2021 +0800 kthread: remove comments about old _do_fork() helper The old _do_fork() helper has been removed in favor of kernel_clone(). Here correct some comments which still contain _do_fork() Link: https://lore.kernel.org/r/20210111104807.18022-1-yanfei.xu@windriver.com Cc: christian@brauner.io Cc: linux-kernel@vger.kernel.org Acked-by: Christian Brauner Signed-off-by: Yanfei Xu Signed-off-by: Christian Brauner commit 9eb09dc2f4650de8c6ce286d3153511e6f6314c0 Author: Stanimir Varbanov Date: Tue Dec 15 15:07:44 2020 +0100 media: venus: core: Fix platform driver shutdown With TZ system reboot cannot finish successfully. To fix that enable core clocks by runtime pm before TZ calls and disable clocks after that. Tested-by: Shawn Guo Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 06b831588b639ad9d94e4789b0250562228722c2 Author: Matthias Reichl Date: Tue Jan 5 10:30:23 2021 +0100 media: rc: fix timeout handling after switch to microsecond durations Commit 528222d853f92 ("media: rc: harmonize infrared durations to microseconds") missed to switch some timeout calculations from nanoseconds to microseconds. This resulted in spurious key_up+key_down events at the last scancode if the rc device uses a long timeout (eg 100ms on nuvoton-cir) as the device timeout wasn't properly accounted for in the keyup timeout calculation. Fix this by applying the proper conversion functions. Cc: stable@vger.kernel.org Fixes: 528222d853f92 ("media: rc: harmonize infrared durations to microseconds") Signed-off-by: Matthias Reichl Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 96e1e9846c6691f90009ae4d8e486e0ce5c628a7 Author: Alexander Guril Date: Sat Dec 26 12:40:21 2020 +0100 Kernel: fork.c: Fix coding style: Do not use {} around single-line statements Fixed two coding style issues in kernel/fork.c Do not use {} around single-line statements. Cc: linux-kernel@vger.kernel.org Acked-by: Christian Brauner Signed-off-by: Alexander Guril Link: https://lore.kernel.org/r/20201226114021.2589-1-alexander.guril02@gmail.com Signed-off-by: Christian Brauner commit adc5d8757288a3a5628436d16e78fb696d802e39 Author: Jann Horn Date: Mon Dec 7 01:02:52 2020 +0100 signal: Add missing __user annotation to copy_siginfo_from_user_any copy_siginfo_from_user_any() takes a userspace pointer as second argument; annotate the parameter type accordingly. Signed-off-by: Jann Horn Link: https://lore.kernel.org/r/20201207000252.138564-1-jannh@google.com Signed-off-by: Christian Brauner commit bb83d5fb550bb7db75b29e6342417fda2bbb691c Author: Jani Nikula Date: Fri Jan 8 17:28:41 2021 +0200 drm/i915/backlight: fix CPU mode backlight takeover on LPT The pch_get_backlight(), lpt_get_backlight(), and lpt_set_backlight() functions operate directly on the hardware registers. If inverting the value is needed, using intel_panel_compute_brightness(), it should only be done in the interface between hardware registers and panel->backlight.level. The CPU mode takeover code added in commit 5b1ec9ac7ab5 ("drm/i915/backlight: Fix backlight takeover on LPT, v3.") reads the hardware register and converts to panel->backlight.level correctly, however the value written back should remain in the hardware register "domain". This hasn't been an issue, because GM45 machines are the only known users of i915.invert_brightness and the brightness invert quirk, and without one of them no conversion is made. It's likely nobody's ever hit the problem. Fixes: 5b1ec9ac7ab5 ("drm/i915/backlight: Fix backlight takeover on LPT, v3.") Cc: Maarten Lankhorst Cc: Ville Syrjälä Cc: Lyude Paul Cc: # v5.1+ Reviewed-by: Lyude Paul Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210108152841.6944-1-jani.nikula@intel.com (cherry picked from commit 0d4ced1c5bfe649196877d90442d4fd618e19153) Signed-off-by: Jani Nikula commit 057fe3535eb35696ad5a849d01d61efa930d2182 Author: Chris Wilson Date: Mon Jan 4 20:39:05 2021 +0000 drm/i915: Disable RPM wakeref assertions during driver shutdown As with the regular suspend paths, also disable the wakeref assertions as we disable the driver during shutdown. Reported-by: Hans de Goede Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2899 Fixes: fe0f1e3bfdfe ("drm/i915: Shut down displays gracefully on reboot") Signed-off-by: Chris Wilson Cc: Ville Syrjälä Cc: Hans de Goede Tested-by: Hans de Goede Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210104203905.19248-1-chris@chris-wilson.co.uk (cherry picked from commit 19fe4ac6f0e7163daf9375a4d39947389ae465fa) Signed-off-by: Jani Nikula commit 00cb645fd7e29bdd20967cd20fa8f77bcdf422f9 Author: Hans de Goede Date: Wed Nov 18 13:40:58 2020 +0100 drm/i915/dsi: Use unconditional msleep for the panel_on_delay when there is no reset-deassert MIPI-sequence Commit 25b4620ee822 ("drm/i915/dsi: Skip delays for v3 VBTs in vid-mode") added an intel_dsi_msleep() helper which skips sleeping if the MIPI-sequences have a version of 3 or newer and the panel is in vid-mode; and it moved a bunch of msleep-s over to this new helper. This was based on my reading of the big comment around line 730 which starts with "Panel enable/disable sequences from the VBT spec.", where the "v3 video mode seq" column does not have any wait t# entries. Given that this code has been used on a lot of different devices without issues until now, it seems that my interpretation of the spec here is mostly correct. But now I have encountered one device, an Acer Aspire Switch 10 E SW3-016, where the panel will not light up unless we do actually honor the panel_on_delay after exexuting the MIPI_SEQ_PANEL_ON sequence. What seems to set this model apart is that it is lacking a MIPI_SEQ_DEASSERT_RESET sequence, which is where the power-on delay usually happens. Fix the panel not lighting up on this model by using an unconditional msleep(panel_on_delay) instead of intel_dsi_msleep() when there is no MIPI_SEQ_DEASSERT_RESET sequence. Fixes: 25b4620ee822 ("drm/i915/dsi: Skip delays for v3 VBTs in vid-mode") Signed-off-by: Hans de Goede Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201118124058.26021-1-hdegoede@redhat.com (cherry picked from commit 6fdb335f1c9c0845b50625de1624d8445c4c4a07) Signed-off-by: Jani Nikula commit 5a22747b76ca2384057d8e783265404439d31d7f Author: Koen Vandeputte Date: Thu Jan 7 10:19:06 2021 +0100 ARM: dts: imx6qdl-gw52xx: fix duplicate regulator naming 2 regulator descriptions carry identical naming. This leads to following boot warning: [ 0.173138] debugfs: Directory 'vdd1p8' with parent 'regulator' already present! Fix this by renaming the one used for audio. Fixes: 5051bff33102 ("ARM: dts: imx: ventana: add LTC3676 PMIC support") Signed-off-by: Tim Harvey Signed-off-by: Koen Vandeputte Cc: stable@vger.kernel.org # v4.11 Signed-off-by: Shawn Guo commit 70b6ff4c549a62b59b286445f66cfec6c5327ac8 Author: Marco Felsch Date: Tue Jan 5 10:24:07 2021 +0100 ARM: dts: imx6qdl-kontron-samx6i: fix i2c_lcd/cam default status Fix typo so the gpio i2c busses are really disabled. Fixes: 2125212785c9 ("ARM: dts: imx6qdl-kontron-samx6i: add Kontron SMARC SoM Support") Signed-off-by: Marco Felsch Signed-off-by: Shawn Guo commit 097530bf8cd469ef7b3d52ef00cafb64b33bacb1 Author: Arnd Bergmann Date: Wed Dec 30 16:17:51 2020 +0100 ARM: imx: fix imx8m dependencies Selecting ARM_GIC_V3 on non-CP15 processors leads to build failures like arch/arm/include/asm/arch_gicv3.h: In function 'write_ICC_AP1R3_EL1': arch/arm/include/asm/arch_gicv3.h:36:40: error: 'c12' undeclared (first use in this function) 36 | #define __ICC_AP1Rx(x) __ACCESS_CP15(c12, 0, c9, x) | ^~~ Add a dependency to only enable the gic driver when building for at an ARMv7 target, which is the closes approximation to the ARMv8 processor that is actually in this chip. Fixes: fc40200ebf82 ("soc: imx: increase build coverage for imx8m soc driver") Signed-off-by: Arnd Bergmann Signed-off-by: Shawn Guo commit fd25c883667b61f845a4188b6be110bb45de0bac Author: Soeren Moch Date: Tue Dec 22 16:59:08 2020 +0100 ARM: dts: tbs2910: rename MMC node aliases to be consistent with kernel versions up to v5.9 (mmc aliases not used here). usdhc1 is not wired up on this board and therefore cannot be used. Start mmc aliases with usdhc2. Signed-off-by: Soeren Moch Cc: stable@vger.kernel.org # 5.10.x Signed-off-by: Shawn Guo commit 869f4fdaf4ca7bb6e0d05caf6fa1108dddc346a7 Author: Dinghao Liu Date: Sat Jan 9 20:01:21 2021 +0800 netfilter: nf_nat: Fix memleak in nf_nat_init When register_pernet_subsys() fails, nf_nat_bysource should be freed just like when nf_ct_extend_register() fails. Fixes: 1cd472bf036ca ("netfilter: nf_nat: add nat hook register functions to nf_nat") Signed-off-by: Dinghao Liu Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 7c53f6b671f4aba70ff15e1b05148b10d58c2837 Author: Linus Torvalds Date: Sun Jan 10 14:34:50 2021 -0800 Linux 5.11-rc3 commit 896567ee7f17a8a736cda8a28cc987228410a2ac Author: Trond Myklebust Date: Sun Jan 10 15:58:08 2021 -0500 NFS: nfs_igrab_and_active must first reference the superblock Before referencing the inode, we must ensure that the superblock can be referenced. Otherwise, we can end up with iput() calling superblock operations that are no longer valid or accessible. Fixes: ea7c38fef0b7 ("NFSv4: Ensure we reference the inode for return-on-close in delegreturn") Signed-off-by: Trond Myklebust commit 113aac6d567bda783af36d08f73bfda47d8e9a40 Author: Trond Myklebust Date: Sun Jan 10 15:46:06 2021 -0500 NFS: nfs_delegation_find_inode_server must first reference the superblock Before referencing the inode, we must ensure that the superblock can be referenced. Otherwise, we can end up with iput() calling superblock operations that are no longer valid or accessible. Fixes: e39d8a186ed0 ("NFSv4: Fix an Oops during delegation callbacks") Signed-off-by: Trond Myklebust commit 20210a98463e2abac31676ee141459fc23252927 Merge: 688daed2e5daf 5625dcfbbcf89 Author: Linus Torvalds Date: Sun Jan 10 13:24:55 2021 -0800 Merge tag 'kbuild-fixes-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - Search for in the default header path of HOSTCC - Tweak the option order to be kind to old BSD awk - Remove 'kvmconfig' and 'xenconfig' shorthands - Fix documentation * tag 'kbuild-fixes-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: Documentation: kbuild: Fix section reference kconfig: remove 'kvmconfig' and 'xenconfig' shorthands lib/raid6: Let $(UNROLL) rules work with macOS userland kconfig: Support building mconf with vendor sysroot ncurses kconfig: config script: add a little user help MAINTAINERS: adjust GCC PLUGINS after gcc-plugin.sh removal commit 688daed2e5daf0a1513effdc05ce3c56ade836f9 Merge: ed41fd071c57f a8f808839abe3 Author: Linus Torvalds Date: Sun Jan 10 13:17:21 2021 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "This is two driver fixes (megaraid_sas and hisi_sas). The megaraid one is a revert of a previous revert of a cpu hotplug fix which exposed a bug in the block layer which has been fixed in this merge window. The hisi_sas performance enhancement comes from switching to interrupt managed completion queues, which depended on the addition of devm_platform_get_irqs_affinity() which is now upstream via the irq tree in the last merge window" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: hisi_sas: Expose HW queues for v2 hw Revert "Revert "scsi: megaraid_sas: Added support for shared host tagset for cpuhotplug"" commit ed41fd071c57f118ebb37c0d11b1cbeff3c1be6f Merge: d430adfea8d2c 5342fd4255021 Author: Linus Torvalds Date: Sun Jan 10 12:53:08 2021 -0800 Merge tag 'block-5.11-2021-01-10' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: - Missing CRC32 selections (Arnd) - Fix for a merge window regression with bdev inode init (Christoph) - bcache fixes - rnbd fixes - NVMe pull request from Christoph: - fix a race in the nvme-tcp send code (Sagi Grimberg) - fix a list corruption in an nvme-rdma error path (Israel Rukshin) - avoid a possible double fetch in nvme-pci (Lalithambika Krishnakumar) - add the susystem NQN quirk for a Samsung driver (Gopal Tiwari) - fix two compiler warnings in nvme-fcloop (James Smart) - don't call sleeping functions from irq context in nvme-fc (James Smart) - remove an unused argument (Max Gurtovoy) - remove unused exports (Minwoo Im) - Use-after-free fix for partition iteration (Ming) - Missing blk-mq debugfs flag annotation (John) - Bdev freeze regression fix (Satya) - blk-iocost NULL pointer deref fix (Tejun) * tag 'block-5.11-2021-01-10' of git://git.kernel.dk/linux-block: (26 commits) bcache: set bcache device into read-only mode for BCH_FEATURE_INCOMPAT_OBSO_LARGE_BUCKET bcache: introduce BCH_FEATURE_INCOMPAT_LOG_LARGE_BUCKET_SIZE for large bucket bcache: check unsupported feature sets for bcache register bcache: fix typo from SUUP to SUPP in features.h bcache: set pdev_set_uuid before scond loop iteration blk-mq-debugfs: Add decode for BLK_MQ_F_TAG_HCTX_SHARED block/rnbd-clt: avoid module unload race with close confirmation block/rnbd: Adding name to the Contributors List block/rnbd-clt: Fix sg table use after free block/rnbd-srv: Fix use after free in rnbd_srv_sess_dev_force_close block/rnbd: Select SG_POOL for RNBD_CLIENT block: pre-initialize struct block_device in bdev_alloc_inode fs: Fix freeze_bdev()/thaw_bdev() accounting of bd_fsfreeze_sb nvme: remove the unused status argument from nvme_trace_bio_complete nvmet-rdma: Fix list_del corruption on queue establishment failure nvme: unexport functions with no external caller nvme: avoid possible double fetch in handling CQE nvme-tcp: Fix possible race of io_work and direct send nvme-pci: mark Samsung PM1725a as IGNORE_DEV_SUBNQN nvme-fcloop: Fix sscanf type and list_first_entry_or_null warnings ... commit d430adfea8d2c5baa186cabb130235f72fecbd5b Merge: 28318f5350309 d9d05217cb699 Author: Linus Torvalds Date: Sun Jan 10 12:39:38 2021 -0800 Merge tag 'io_uring-5.11-2021-01-10' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: "A bit larger than I had hoped at this point, but it's all changes that will be directed towards stable anyway. In detail: - Fix a merge window regression on error return (Matthew) - Remove useless variable declaration/assignment (Ye Bin) - IOPOLL fixes (Pavel) - Exit and cancelation fixes (Pavel) - fasync lockdep complaint fix (Pavel) - Ensure SQPOLL is synchronized with creator life time (Pavel)" * tag 'io_uring-5.11-2021-01-10' of git://git.kernel.dk/linux-block: io_uring: stop SQPOLL submit on creator's death io_uring: add warn_once for io_uring_flush() io_uring: inline io_uring_attempt_task_drop() io_uring: io_rw_reissue lockdep annotations io_uring: synchronise ev_posted() with waitqueues io_uring: dont kill fasync under completion_lock io_uring: trigger eventfd for IOPOLL io_uring: Fix return value from alloc_fixed_file_ref_node io_uring: Delete useless variable ‘id’ in io_prep_async_work io_uring: cancel more aggressively in exit_work io_uring: drop file refs after task cancel io_uring: patch up IOPOLL overflow_flush sync io_uring: synchronise IOPOLL on task_submit fail commit 28318f53503090fcd8fd27c49445396ea2ace44b Merge: 4ad9a28f56d70 a5c7682aaaa10 Author: Linus Torvalds Date: Sun Jan 10 12:33:19 2021 -0800 Merge tag 'usb-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are a number of small USB driver fixes for 5.11-rc3. Include in here are: - USB gadget driver fixes for reported issues - new usb-serial driver ids - dma from stack bugfixes - typec bugfixes - dwc3 bugfixes - xhci driver bugfixes - other small misc usb driver bugfixes All of these have been in linux-next with no reported issues" * tag 'usb-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (35 commits) usb: dwc3: gadget: Clear wait flag on dequeue usb: typec: Send uevent for num_altmodes update usb: typec: Fix copy paste error for NVIDIA alt-mode description usb: gadget: enable super speed plus kcov, usb: hide in_serving_softirq checks in __usb_hcd_giveback_urb usb: uas: Add PNY USB Portable SSD to unusual_uas usb: gadget: configfs: Preserve function ordering after bind failure usb: gadget: select CONFIG_CRC32 usb: gadget: core: change the comment for usb_gadget_connect usb: gadget: configfs: Fix use-after-free issue with udc_name usb: dwc3: gadget: Restart DWC3 gadget when enabling pullup usb: usbip: vhci_hcd: protect shift size USB: usblp: fix DMA to stack USB: serial: iuu_phoenix: fix DMA from stack USB: serial: option: add LongSung M5710 module support USB: serial: option: add Quectel EM160R-GL USB: Gadget: dummy-hcd: Fix shift-out-of-bounds bug usb: gadget: f_uac2: reset wMaxPacketSize usb: dwc3: ulpi: Fix USB2.0 HS/FS/LS PHY suspend regression usb: dwc3: ulpi: Replace CPU-based busyloop with Protocol-based one ... commit 4ad9a28f56d70b950b1232151b2354636853727a Merge: e07cd2f3e7e52 00b8c557d096f Author: Linus Torvalds Date: Sun Jan 10 12:28:07 2021 -0800 Merge tag 'staging-5.11-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.11-rc3. Nothing major, just resolving some reported issues: - cleanup some remaining mentions of the ION drivers that were removed in 5.11-rc1 - comedi driver bugfix - two error path memory leak fixes All have been in linux-next for a while with no reported issues" * tag 'staging-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: ION: remove some references to CONFIG_ION staging: mt7621-dma: Fix a resource leak in an error handling path Staging: comedi: Return -EFAULT if copy_to_user() fails staging: spmi: hisi-spmi-controller: Fix some error handling paths commit e07cd2f3e7e525fa8df334d11beceb4c1bdcc74e Merge: 0653161f0faca 384b77fd48fd6 Author: Linus Torvalds Date: Sun Jan 10 12:24:33 2021 -0800 Merge tag 'char-misc-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are some small char and misc driver fixes for 5.11-rc3. The majority here are fixes for the habanalabs drivers, but also in here are: - crypto driver fix - pvpanic driver fix - updated font file - interconnect driver fixes All of these have been in linux-next for a while with no reported issues" * tag 'char-misc-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (26 commits) Fonts: font_ter16x32: Update font with new upstream Terminus release misc: pvpanic: Check devm_ioport_map() for NULL speakup: Add github repository URL and bug tracker MAINTAINERS: Update Georgi's email address crypto: asym_tpm: correct zero out potential secrets habanalabs: Fix memleak in hl_device_reset interconnect: imx8mq: Use icc_sync_state interconnect: imx: Remove a useless test interconnect: imx: Add a missing of_node_put after of_device_is_available interconnect: qcom: fix rpmh link failures habanalabs: fix order of status check habanalabs: register to pci shutdown callback habanalabs: add validation cs counter, fix misplaced counters habanalabs/gaudi: retry loading TPC f/w on -EINTR habanalabs: adjust pci controller init to new firmware habanalabs: update comment in hl_boot_if.h habanalabs/gaudi: enhance reset message habanalabs: full FW hard reset support habanalabs/gaudi: disable CGM at HW initialization habanalabs: Revise comment to align with mirror list name ... commit 5625dcfbbcf892e40e8d60abbb5f56701a1d031c Author: Viresh Kumar Date: Thu Jan 7 17:12:08 2021 +0530 Documentation: kbuild: Fix section reference Section 3.11 was incorrectly called 3.9, fix it. Signed-off-by: Viresh Kumar Signed-off-by: Masahiro Yamada commit 0653161f0faca68b77b3f36fb4b4b9b8b07050e5 Merge: b3cd1a16cc882 e8deee4f1543e Author: Linus Torvalds Date: Sun Jan 10 12:00:26 2021 -0800 Merge tag 'arc-5.11-rc3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC fixes from Vineet Gupta: - Address the 2nd boot failure due to snafu in signal handling code (first was generic console ttynull issue) - misc other fixes * tag 'arc-5.11-rc3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: ARC: [hsdk]: Enable FPU_SAVE_RESTORE ARC: unbork 5.11 bootup: fix snafu in _TIF_NOTIFY_SIGNAL handling include/soc: remove headers for EZChip NPS arch/arc: add copy_user_page() to to fix build error on ARC commit b3cd1a16cc8829776523fcd114299373be4e5187 Merge: a440e4d7618cb 3ce47d95b7346 Author: Linus Torvalds Date: Sun Jan 10 11:34:33 2021 -0800 Merge tag 'powerpc-5.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - A fix for machine check handling with VMAP stack on 32-bit. - A clang build fix. Thanks to Christophe Leroy and Nathan Chancellor. * tag 'powerpc-5.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc: Handle .text.{hot,unlikely}.* in linker script powerpc/32s: Fix RTAS machine check with VMAP stack commit a440e4d7618cbe232e4f96dea805bcb89f79b18c Merge: 2ff90100ace88 a0195f314a255 Author: Linus Torvalds Date: Sun Jan 10 11:31:17 2021 -0800 Merge tag 'x86_urgent_for_v5.11_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Borislav Petkov: "As expected, fixes started trickling in after the holidays so here is the accumulated pile of x86 fixes for 5.11: - A fix for fanotify_mark() missing the conversion of x86_32 native syscalls which take 64-bit arguments to the compat handlers due to former having a general compat handler. (Brian Gerst) - Add a forgotten pmd page destructor call to pud_free_pmd_page() where a pmd page is freed. (Dan Williams) - Make IN/OUT insns with an u8 immediate port operand handling for SEV-ES guests more precise by using only the single port byte and not the whole s32 value of the insn decoder. (Peter Gonda) - Correct a straddling end range check before returning the proper MTRR type, when the end address is the same as top of memory. (Ying-Tsun Huang) - Change PQR_ASSOC MSR update scheme when moving a task to a resctrl resource group to avoid significant performance overhead with some resctrl workloads. (Fenghua Yu) - Avoid the actual task move overhead when the task is already in the resource group. (Fenghua Yu)" * tag 'x86_urgent_for_v5.11_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/resctrl: Don't move a task to the same resource group x86/resctrl: Use an IPI instead of task_work_add() to update PQR_ASSOC MSR x86/mtrr: Correct the range check before performing MTRR type lookups x86/sev-es: Fix SEV-ES OUT/IN immediate opcode vc handling x86/mm: Fix leak of pmd ptlock fanotify: Fix sys_fanotify_mark() on native x86-32 commit cb2856c5971723910a86b7d1d0cf623d6919cbc4 Author: Trond Myklebust Date: Wed Jan 6 14:13:22 2021 -0500 NFS/pNFS: Fix a leak of the layout 'plh_outstanding' counter If we exit _lgopen_prepare_attached() without setting a layout, we will currently leak the plh_outstanding counter. Fixes: 411ae722d10a ("pNFS: Wait for stale layoutget calls to complete in pnfs_update_layout()") Signed-off-by: Trond Myklebust commit 46c9ea1d4fee4cf1f8cc6001b9c14aae61b3d502 Author: Trond Myklebust Date: Wed Jan 6 11:54:57 2021 -0500 NFS/pNFS: Don't leak DS commits in pnfs_generic_retry_commit() We must ensure that we pass a layout segment to nfs_retry_commit() when we're cleaning up after pnfs_bucket_alloc_ds_commits(). Otherwise, requests that should be committed to the DS will get committed to the MDS. Do so by ensuring that pnfs_bucket_get_committing() always tries to return a layout segment when it returns a non-empty page list. Fixes: c84bea59449a ("NFS/pNFS: Simplify bucket layout segment reference counting") Signed-off-by: Trond Myklebust commit 1757655d780d9d29bc4b60e708342e94924f7ef3 Author: Trond Myklebust Date: Wed Jan 6 11:28:30 2021 -0500 NFS/pNFS: Don't call pnfs_free_bucket_lseg() before removing the request In pnfs_generic_clear_request_commit(), we try calling pnfs_free_bucket_lseg() before we remove the request from the DS bucket. That will always fail, since the point is to test for whether or not that bucket is empty. Fixes: c84bea59449a ("NFS/pNFS: Simplify bucket layout segment reference counting") Signed-off-by: Trond Myklebust commit 2c8d5fc37fe2384a9bdb6965443ab9224d46f704 Author: Trond Myklebust Date: Tue Jan 5 06:43:45 2021 -0500 pNFS: Stricter ordering of layoutget and layoutreturn If a layout return is in progress, we should wait for it to complete, in case the layout segment we are picking up gets returned too. Fixes: 30cb3ee299cb ("pNFS: Handle NFS4ERR_OLD_STATEID on layoutreturn by bumping the state seqid") Signed-off-by: Trond Myklebust commit c18d1e17ba2f6a1c9257b0b5d2882a6e3f772673 Author: Trond Myklebust Date: Mon Jan 4 15:01:18 2021 -0500 pNFS: Clean up pnfs_layoutreturn_free_lsegs() Remove the check for whether or not the stateid is NULL, and fix up the callers. Signed-off-by: Trond Myklebust commit 078000d02d57f02dde61de4901f289672e98c8bc Author: Trond Myklebust Date: Mon Jan 4 13:18:03 2021 -0500 pNFS: We want return-on-close to complete when evicting the inode If the inode is being evicted, it should be safe to run return-on-close, so we should do it to ensure we don't inadvertently leak layout segments. Fixes: 1c5bd76d17cc ("pNFS: Enable layoutreturn operation for return-on-close") Signed-off-by: Trond Myklebust commit 67bbceedc9bb8ad48993a8bd6486054756d711f4 Author: Trond Myklebust Date: Mon Jan 4 13:35:46 2021 -0500 pNFS: Mark layout for return if return-on-close was not sent If the layout return-on-close failed because the layoutreturn was never sent, then we should mark the layout for return again. Fixes: 9c47b18cf722 ("pNFS: Ensure we do clear the return-on-close layout stateid on fatal errors") Signed-off-by: Trond Myklebust commit 86b53fbf08f48d353a86a06aef537e78e82ba721 Author: j.nixdorf@avm.de Date: Tue Jan 5 15:17:01 2021 +0100 net: sunrpc: interpret the return value of kstrtou32 correctly A return value of 0 means success. This is documented in lib/kstrtox.c. This was found by trying to mount an NFS share from a link-local IPv6 address with the interface specified by its index: mount("[fe80::1%1]:/srv/nfs", "/mnt", "nfs", 0, "nolock,addr=fe80::1%1") Before this commit this failed with EINVAL and also caused the following message in dmesg: [...] NFS: bad IP address specified: addr=fe80::1%1 The syscall using the same address based on the interface name instead of its index succeeds. Credits for this patch go to my colleague Christian Speich, who traced the origin of this bug to this line of code. Signed-off-by: Johannes Nixdorf Fixes: 00cfaa943ec3 ("replace strict_strto calls") Signed-off-by: Trond Myklebust commit c98e9daa59a611ff4e163689815f40380c912415 Author: Scott Mayhew Date: Tue Jan 5 08:54:32 2021 -0500 NFS: Adjust fs_context error logging Several existing dprink()/dfprintk() calls were converted to use the new mount API logging macros by commit ce8866f0913f ("NFS: Attach supplementary error information to fs_context"). If the fs_context was not created using fsopen() then it will not have had a log buffer allocated for it, and the new mount API logging macros will wind up calling printk(). This can result in syslog messages being logged where previously there were none... most notably "NFS4: Couldn't follow remote path", which can happen if the client is auto-negotiating a protocol version with an NFS server that doesn't support the higher v4.x versions. Convert the nfs_errorf(), nfs_invalf(), and nfs_warnf() macros to check for the existence of the fs_context's log buffer and call dprintk() if it doesn't exist. Add nfs_ferrorf(), nfs_finvalf(), and nfs_warnf(), which do the same thing but take an NFS debug flag as an argument and call dfprintk(). Finally, modify the "NFS4: Couldn't follow remote path" message to use nfs_ferrorf(). Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=207385 Signed-off-by: Scott Mayhew Reviewed-by: Benjamin Coddington Fixes: ce8866f0913f ("NFS: Attach supplementary error information to fs_context.") Signed-off-by: Trond Myklebust commit a0adc8eabb402cfb9f32d15edd9f65f65e35cdce Author: John Stultz Date: Thu Jan 7 20:26:16 2021 +0000 dma-buf: cma_heap: Fix memory leak in CMA heap Bing Song noticed the CMA heap was leaking memory due to a flub I made in commit a5d2d29e24be ("dma-buf: heaps: Move heap-helper logic into the cma_heap implementation"), and provided this fix which ensures the pagelist is also freed on release. Cc: Bing Song Cc: Sumit Semwal Cc: Liam Mark Cc: Laura Abbott Cc: Brian Starkey Cc: Hridya Valsaraju Cc: Suren Baghdasaryan Cc: Sandeep Patil Cc: Daniel Mentz Cc: Chris Goldsworthy Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Reported-by: Bing Song Fixes: a5d2d29e24be ("dma-buf: heaps: Move heap-helper logic into the cma_heap implementation") Signed-off-by: John Stultz Signed-off-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20210107202616.75170-1-john.stultz@linaro.org commit 1653e3d470629d25c64cd8a2f84adb20a9348b0c Author: Michael Walle Date: Tue Dec 15 22:26:22 2020 +0100 arm64: dts: ls1028a: fix the offset of the reset register The offset of the reset request register is 0, the absolute address is 0x1e60000. Boards without PSCI support will fail to perform a reset: [ 26.734700] reboot: Restarting system [ 27.743259] Unable to restart system [ 27.746845] Reboot failed -- System halted Fixes: 8897f3255c9c ("arm64: dts: Add support for NXP LS1028A SoC") Signed-off-by: Michael Walle Signed-off-by: Shawn Guo commit 599b3063adf4bf041a87a69244ee36aded0d878f Author: Mathias Kresin Date: Thu Jan 7 22:36:03 2021 +0100 irqchip/mips-cpu: Set IPI domain parent chip Since commit 55567976629e ("genirq/irqdomain: Allow partial trimming of irq_data hierarchy") the irq_data chain is valided. The irq_domain_trim_hierarchy() function doesn't consider the irq + ipi domain hierarchy as valid, since the ipi domain has the irq domain set as parent, but the parent domain has no chip set. Hence the boot ends in a kernel panic. Set the chip for the parent domain as it is done in the mips gic irq driver, to have a valid irq_data chain. Fixes: 3838a547fda2 ("irqchip: mips-cpu: Introduce IPI IRQ domain support") Cc: # v5.10+ Signed-off-by: Mathias Kresin Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210107213603.1637781-1-dev@kresin.me commit b8e594fa20d2e33d40c7a8c7c106549a35c38972 Author: Suman Anna Date: Fri Jan 8 10:29:01 2021 -0600 irqchip/pruss: Simplify the TI_PRUSS_INTC Kconfig The TI PRUSS INTC irqchip driver handles the local interrupt controller which is a child device of it's parent PRUSS/ICSSG device. The driver was upstreamed in parallel with the PRUSS platform driver, and was configurable independently previously. The PRUSS interrupt controller is an integral part of the overall PRUSS software architecture, and is not useful at all by itself. Simplify the TI_PRUSS_INTC Kconfig dependencies by making it silent and selected automatically when the TI_PRUSS platform driver is enabled. Signed-off-by: Suman Anna Reviewed-by: David Lechner Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210108162901.6003-1-s-anna@ti.com commit f6351c3f1c27c80535d76cac2299aec44c36291e Author: Jesper Dangaard Brouer Date: Fri Jan 8 12:44:33 2021 +0100 netfilter: conntrack: fix reading nf_conntrack_buckets The old way of changing the conntrack hashsize runtime was through changing the module param via file /sys/module/nf_conntrack/parameters/hashsize. This was extended to sysctl change in commit 3183ab8997a4 ("netfilter: conntrack: allow increasing bucket size via sysctl too"). The commit introduced second "user" variable nf_conntrack_htable_size_user which shadow actual variable nf_conntrack_htable_size. When hashsize is changed via module param this "user" variable isn't updated. This results in sysctl net/netfilter/nf_conntrack_buckets shows the wrong value when users update via the old way. This patch fix the issue by always updating "user" variable when reading the proc file. This will take care of changes to the actual variable without sysctl need to be aware. Fixes: 3183ab8997a4 ("netfilter: conntrack: allow increasing bucket size via sysctl too") Reported-by: Yoel Caspersen Signed-off-by: Jesper Dangaard Brouer Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit fab336b42441e0b2eb1d81becedb45fbdf99606e Author: Chen Yi Date: Tue Jan 5 23:31:20 2021 +0800 selftests: netfilter: Pass family parameter "-f" to conntrack tool Fix nft_conntrack_helper.sh false fail report: 1) Conntrack tool need "-f ipv6" parameter to show out ipv6 traffic items. 2) Sleep 1 second after background nc send packet, to make sure check is after this statement executed. False report: FAIL: ns1-lkjUemYw did not show attached helper ip set via ruleset PASS: ns1-lkjUemYw connection on port 2121 has ftp helper attached ... After fix: PASS: ns1-2hUniwU2 connection on port 2121 has ftp helper attached PASS: ns2-2hUniwU2 connection on port 2121 has ftp helper attached ... Fixes: 619ae8e0697a6 ("selftests: netfilter: add test case for conntrack helper assignment") Signed-off-by: Chen Yi Signed-off-by: Pablo Neira Ayuso commit 2dce6db70c77bbe639f5cd9cc796fb8f2694a7d0 Author: AngeloGioacchino Del Regno Date: Sat Jan 9 22:14:39 2021 -0800 Input: goodix - add support for Goodix GT9286 chip The Goodix GT9286 is a capacitive touch sensor IC based on GT1x. This chip can be found on a number of smartphones, including the F(x)tec Pro 1 and the Elephone U. This has been tested on F(x)Tec Pro1 (MSM8998). Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20210109135512.149032-2-angelogioacchino.delregno@somainline.org Reviewed-by: Bastien Nocera Signed-off-by: Dmitry Torokhov commit 25669e943e06c56750fb2347cce4f3343379e4b2 Author: AngeloGioacchino Del Regno Date: Sat Jan 9 22:13:56 2021 -0800 dt-bindings: input: touchscreen: goodix: Add binding for GT9286 IC Support for this chip is being added to the goodix driver: add the DT binding for it. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20210109135512.149032-3-angelogioacchino.delregno@somainline.org Reviewed-by: Bastien Nocera Signed-off-by: Dmitry Torokhov commit f97844f9c518172f813b7ece18a9956b1f70c1bb Author: Geert Uytterhoeven Date: Tue Jan 5 16:15:16 2021 +0100 dt-bindings: net: renesas,etheravb: RZ/G2H needs tx-internal-delay-ps The merge resolution of the interaction of commits 307eea32b202864c ("dt-bindings: net: renesas,ravb: Add support for r8a774e1 SoC") and d7adf6331189cbe9 ("dt-bindings: net: renesas,etheravb: Convert to json-schema") missed that "tx-internal-delay-ps" should be a required property on RZ/G2H. Fixes: 8b0308fe319b8002 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20210105151516.1540653-1-geert+renesas@glider.be Signed-off-by: Jakub Kicinski commit 26c49f0d108fdc3645e75611f8148f3dd9809d6e Merge: b77413446408f b06ca3d5a43ca Author: Jakub Kicinski Date: Sat Jan 9 16:25:14 2021 -0800 Merge branch 'mlxsw-core-thermal-control-fixes' Ido Schimmel says: ==================== mlxsw: core: Thermal control fixes This series includes two fixes for thermal control in mlxsw. Patch #1 validates that the alarm temperature threshold read from a transceiver is above the warning temperature threshold. If not, the current thresholds are maintained. It was observed that some transceiver might be unreliable and sometimes report a too low alarm temperature threshold which would result in thermal shutdown of the system. Patch #2 increases the temperature threshold above which thermal shutdown is triggered for the ASIC thermal zone. It is currently too low and might result in thermal shutdown under perfectly fine operational conditions. ==================== Link: https://lore.kernel.org/r/20210108145210.1229820-1-idosch@idosch.org Signed-off-by: Jakub Kicinski commit b06ca3d5a43ca2dd806f7688a17e8e7e0619a80a Author: Vadim Pasternak Date: Fri Jan 8 16:52:10 2021 +0200 mlxsw: core: Increase critical threshold for ASIC thermal zone Increase critical threshold for ASIC thermal zone from 110C to 140C according to the system hardware requirements. All the supported ASICs (Spectrum-1, Spectrum-2, Spectrum-3) could be still operational with ASIC temperature below 140C. With the old critical threshold value system can perform unjustified shutdown. All the systems equipped with the above ASICs implement thermal protection mechanism at firmware level and firmware could decide to perform system thermal shutdown in case the temperature is below 140C. So with the new threshold system will not meltdown, while thermal operating range will be aligned with hardware abilities. Fixes: 41e760841d26 ("mlxsw: core: Replace thermal temperature trips with defines") Fixes: a50c1e35650b ("mlxsw: core: Implement thermal zone") Signed-off-by: Vadim Pasternak Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit 57726ebe2733891c9f59105eff028735f73d05fb Author: Vadim Pasternak Date: Fri Jan 8 16:52:09 2021 +0200 mlxsw: core: Add validation of transceiver temperature thresholds Validate thresholds to avoid a single failure due to some transceiver unreliability. Ignore the last readouts in case warning temperature is above alarm temperature, since it can cause unexpected thermal shutdown. Stay with the previous values and refresh threshold within the next iteration. This is a rare scenario, but it was observed at a customer site. Fixes: 6a79507cfe94 ("mlxsw: core: Extend thermal module with per QSFP module thermal zones") Signed-off-by: Vadim Pasternak Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit b77413446408fdd256599daf00d5be72b5f3e7c6 Author: Hoang Le Date: Fri Jan 8 14:13:37 2021 +0700 tipc: fix NULL deref in tipc_link_xmit() The buffer list can have zero skb as following path: tipc_named_node_up()->tipc_node_xmit()->tipc_link_xmit(), so we need to check the list before casting an &sk_buff. Fault report: [] tipc: Bulk publication failure [] general protection fault, probably for non-canonical [#1] PREEMPT [...] [] KASAN: null-ptr-deref in range [0x00000000000000c8-0x00000000000000cf] [] CPU: 0 PID: 0 Comm: swapper/0 Kdump: loaded Not tainted 5.10.0-rc4+ #2 [] Hardware name: Bochs ..., BIOS Bochs 01/01/2011 [] RIP: 0010:tipc_link_xmit+0xc1/0x2180 [] Code: 24 b8 00 00 00 00 4d 39 ec 4c 0f 44 e8 e8 d7 0a 10 f9 48 [...] [] RSP: 0018:ffffc90000006ea0 EFLAGS: 00010202 [] RAX: dffffc0000000000 RBX: ffff8880224da000 RCX: 1ffff11003d3cc0d [] RDX: 0000000000000019 RSI: ffffffff886007b9 RDI: 00000000000000c8 [] RBP: ffffc90000007018 R08: 0000000000000001 R09: fffff52000000ded [] R10: 0000000000000003 R11: fffff52000000dec R12: ffffc90000007148 [] R13: 0000000000000000 R14: 0000000000000000 R15: ffffc90000007018 [] FS: 0000000000000000(0000) GS:ffff888037400000(0000) knlGS:000[...] [] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [] CR2: 00007fffd2db5000 CR3: 000000002b08f000 CR4: 00000000000006f0 Fixes: af9b028e270fd ("tipc: make media xmit call outside node spinlock context") Acked-by: Jon Maloy Signed-off-by: Hoang Le Link: https://lore.kernel.org/r/20210108071337.3598-1-hoang.h.le@dektech.com.au Signed-off-by: Jakub Kicinski commit 3502bd9b5762154ff11665f3f18f6d7dcc6f781c Author: Vadim Fedorenko Date: Sat Jan 9 00:37:45 2021 +0300 selftests/tls: fix selftests after adding ChaCha20-Poly1305 TLS selftests where broken because of wrong variable types used. Fix it by changing u16 -> uint16_t Fixes: 4f336e88a870 ("selftests/tls: add CHACHA20-POLY1305 to tls selftests") Reported-by: kernel test robot Signed-off-by: Vadim Fedorenko Link: https://lore.kernel.org/r/1610141865-7142-1-git-send-email-vfedorenko@novek.ru Signed-off-by: Jakub Kicinski commit 0ea02c73775277001c651ad4a0e83781a9acf406 Author: Kefeng Wang Date: Wed Nov 11 19:52:16 2020 +0800 riscv: Drop a duplicated PAGE_KERNEL_EXEC commit b91540d52a08 ("RISC-V: Add EFI runtime services") add a duplicated PAGE_KERNEL_EXEC, kill it. Signed-off-by: Kefeng Wang Reviewed-by: Pekka Enberg Reviewed-by: Atish Patra Fixes: b91540d52a08 ("RISC-V: Add EFI runtime services") Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt commit b210de4f8c97d57de051e805686248ec4c6cfc52 Author: Aya Levin Date: Thu Jan 7 15:50:18 2021 +0200 net: ipv6: Validate GSO SKB before finish IPv6 processing There are cases where GSO segment's length exceeds the egress MTU: - Forwarding of a TCP GRO skb, when DF flag is not set. - Forwarding of an skb that arrived on a virtualisation interface (virtio-net/vhost/tap) with TSO/GSO size set by other network stack. - Local GSO skb transmitted on an NETIF_F_TSO tunnel stacked over an interface with a smaller MTU. - Arriving GRO skb (or GSO skb in a virtualised environment) that is bridged to a NETIF_F_TSO tunnel stacked over an interface with an insufficient MTU. If so: - Consume the SKB and its segments. - Issue an ICMP packet with 'Packet Too Big' message containing the MTU, allowing the source host to reduce its Path MTU appropriately. Note: These cases are handled in the same manner in IPv4 output finish. This patch aligns the behavior of IPv6 and the one of IPv4. Fixes: 9e50849054a4 ("netfilter: ipv6: move POSTROUTING invocation before fragmentation") Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Link: https://lore.kernel.org/r/1610027418-30438-1-git-send-email-ayal@nvidia.com Signed-off-by: Jakub Kicinski commit a2bc221b972db91e4be1970e776e98f16aa87904 Author: Manish Chopra Date: Thu Jan 7 02:15:20 2021 -0800 netxen_nic: fix MSI/MSI-x interrupts For all PCI functions on the netxen_nic adapter, interrupt mode (INTx or MSI) configuration is dependent on what has been configured by the PCI function zero in the shared interrupt register, as these adapters do not support mixed mode interrupts among the functions of a given adapter. Logic for setting MSI/MSI-x interrupt mode in the shared interrupt register based on PCI function id zero check is not appropriate for all family of netxen adapters, as for some of the netxen family adapters PCI function zero is not really meant to be probed/loaded in the host but rather just act as a management function on the device, which caused all the other PCI functions on the adapter to always use legacy interrupt (INTx) mode instead of choosing MSI/MSI-x interrupt mode. This patch replaces that check with port number so that for all type of adapters driver attempts for MSI/MSI-x interrupt modes. Fixes: b37eb210c076 ("netxen_nic: Avoid mixed mode interrupts") Signed-off-by: Manish Chopra Signed-off-by: Igor Russkikh Link: https://lore.kernel.org/r/20210107101520.6735-1-manishc@marvell.com Signed-off-by: Jakub Kicinski commit 2ff90100ace886895e4fbb2850b8d5e49d931ed6 Merge: f408126be7dc6 84e261553e6f9 Author: Linus Torvalds Date: Sat Jan 9 11:22:30 2021 -0800 Merge tag 'hwmon-for-v5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck: - Fix possible KASAN issue in amd_energy driver - Avoid configuration problem in pwm-fan driver - Fix kernel-doc warning in sbtsi_temp documentation * tag 'hwmon-for-v5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (amd_energy) fix allocation of hwmon_channel_info config hwmon: (pwm-fan) Ensure that calculation doesn't discard big period values hwmon: (sbtsi_temp) Fix Documenation kernel-doc warning commit f408126be7dc642102224cdb55d6533519a67c19 Merge: caab314792aca e1263f9277bad Author: Linus Torvalds Date: Sat Jan 9 11:18:02 2021 -0800 Merge tag 'dmaengine-fix-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine Pull dmaengine fixes from Vinod Koul: "A bunch of dmaengine driver fixes for: - coverity discovered issues for xilinx driver - qcom, gpi driver fix for undefined bhaviour and one off cleanup - update Peter's email for TI DMA drivers - one-off for idxd driver - resource leak fix for mediatek and milbeaut drivers" * tag 'dmaengine-fix-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: dmaengine: stm32-mdma: fix STM32_MDMA_VERY_HIGH_PRIORITY value dmaengine: xilinx_dma: fix mixed_enum_type coverity warning dmaengine: xilinx_dma: fix incompatible param warning in _child_probe() dmaengine: xilinx_dma: check dma_async_device_register return value dmaengine: qcom: fix gpi undefined behavior dt-bindings: dma: ti: Update maintainer and author information MAINTAINERS: Add entry for Texas Instruments DMA drivers qcom: bam_dma: Delete useless kfree code dmaengine: dw-edma: Fix use after free in dw_edma_alloc_chunk() dmaengine: milbeaut-xdmac: Fix a resource leak in the error handling path of the probe function dmaengine: mediatek: mtk-hsdma: Fix a resource leak in the error handling path of the probe function dmaengine: qcom: gpi: Fixes a format mismatch dmaengine: idxd: off by one in cleanup code dmaengine: ti: k3-udma: Fix pktdma rchan TPL level setup commit caab314792aca89f327abc8b9f730526d3080366 Merge: 6bae85bd70d06 05f6f7271a38c Author: Linus Torvalds Date: Sat Jan 9 11:04:48 2021 -0800 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "Three driver bugfixes for I2C. Buisness as usual" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: mediatek: Fix apdma and i2c hand-shake timeout i2c: i801: Fix the i2c-mux gpiod_lookup_table not being properly terminated i2c: sprd: use a specific timeout to avoid system hang up issue commit 6bae85bd70d063b63fbe262d943cc321eab31b17 Author: Darrick J. Wong Date: Fri Jan 8 22:46:02 2021 -0800 maintainers: update my email address Change my email contact ahead of a likely painful eleven-month migration to a certain cobalt enteprisey groupware cloud product that will totally break my workflow. Some day I may get used to having to email being sequestered behind both claret and cerulean oath2+sms 2fa layers, but for now I'll stick with keying in one password to receive an email vs. the required four. Signed-off-by: Darrick J. Wong Signed-off-by: Linus Torvalds commit d9d05217cb6990b9a56e13b56e7a1b71e2551f6c Author: Pavel Begunkov Date: Fri Jan 8 20:57:25 2021 +0000 io_uring: stop SQPOLL submit on creator's death When the creator of SQPOLL io_uring dies (i.e. sqo_task), we don't want its internals like ->files and ->mm to be poked by the SQPOLL task, it have never been nice and recently got racy. That can happen when the owner undergoes destruction and SQPOLL tasks tries to submit new requests in parallel, and so calls io_sq_thread_acquire*(). That patch halts SQPOLL submissions when sqo_task dies by introducing sqo_dead flag. Once set, the SQPOLL task must not do any submission, which is synchronised by uring_lock as well as the new flag. The tricky part is to make sure that disabling always happens, that means either the ring is discovered by creator's do_exit() -> cancel, or if the final close() happens before it's done by the creator. The last is guaranteed by the fact that for SQPOLL the creator task and only it holds exactly one file note, so either it pins up to do_exit() or removed by the creator on the final put in flush. (see comments in uring_flush() around file->f_count == 2). One more place that can trigger io_sq_thread_acquire_*() is __io_req_task_submit(). Shoot off requests on sqo_dead there, even though actually we don't need to. That's because cancellation of sqo_task should wait for the request before going any further. note 1: io_disable_sqo_submit() does io_ring_set_wakeup_flag() so the caller would enter the ring to get an error, but it still doesn't guarantee that the flag won't be cleared. note 2: if final __userspace__ close happens not from the creator task, the file note will pin the ring until the task dies. Fixed: b1b6b5a30dce8 ("kernel/io_uring: cancel io_uring before task works") Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 6b5733eb638b7068ab7cb34e663b55a1d1892d85 Author: Pavel Begunkov Date: Fri Jan 8 20:57:24 2021 +0000 io_uring: add warn_once for io_uring_flush() files_cancel() should cancel all relevant requests and drop file notes, so we should never have file notes after that, including on-exit fput and flush. Add a WARN_ONCE to be sure. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 4f793dc40bc605b97624fd36baf085b3c35e8bfd Author: Pavel Begunkov Date: Fri Jan 8 20:57:23 2021 +0000 io_uring: inline io_uring_attempt_task_drop() A simple preparation change inlining io_uring_attempt_task_drop() into io_uring_flush(). Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 55e6ac1e1f31c7f678d9f3c8d54c6f102e5f1550 Author: Pavel Begunkov Date: Fri Jan 8 20:57:22 2021 +0000 io_uring: io_rw_reissue lockdep annotations We expect io_rw_reissue() to take place only during submission with uring_lock held. Add a lockdep annotation to check that invariant. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 5342fd4255021ef0c4ce7be52eea1c4ebda11c63 Author: Coly Li Date: Mon Jan 4 15:41:22 2021 +0800 bcache: set bcache device into read-only mode for BCH_FEATURE_INCOMPAT_OBSO_LARGE_BUCKET If BCH_FEATURE_INCOMPAT_OBSO_LARGE_BUCKET is set in incompat feature set, it means the cache device is created with obsoleted layout with obso_bucket_site_hi. Now bcache does not support this feature bit, a new BCH_FEATURE_INCOMPAT_LOG_LARGE_BUCKET_SIZE incompat feature bit is added for a better layout to support large bucket size. For the legacy compatibility purpose, if a cache device created with obsoleted BCH_FEATURE_INCOMPAT_OBSO_LARGE_BUCKET feature bit, all bcache devices attached to this cache set should be set to read-only. Then the dirty data can be written back to backing device before re-create the cache device with BCH_FEATURE_INCOMPAT_LOG_LARGE_BUCKET_SIZE feature bit by the latest bcache-tools. This patch checks BCH_FEATURE_INCOMPAT_OBSO_LARGE_BUCKET feature bit when running a cache set and attach a bcache device to the cache set. If this bit is set, - When run a cache set, print an error kernel message to indicate all following attached bcache device will be read-only. - When attach a bcache device, print an error kernel message to indicate the attached bcache device will be read-only, and ask users to update to latest bcache-tools. Such change is only for cache device whose bucket size >= 32MB, this is for the zoned SSD and almost nobody uses such large bucket size at this moment. If you don't explicit set a large bucket size for a zoned SSD, such change is totally transparent to your bcache device. Fixes: ffa470327572 ("bcache: add bucket_size_hi into struct cache_sb_disk for large bucket") Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit b16671e8f493e3df40b1fb0dff4078f391c5099a Author: Coly Li Date: Mon Jan 4 15:41:21 2021 +0800 bcache: introduce BCH_FEATURE_INCOMPAT_LOG_LARGE_BUCKET_SIZE for large bucket When large bucket feature was added, BCH_FEATURE_INCOMPAT_LARGE_BUCKET was introduced into the incompat feature set. It used bucket_size_hi (which was added at the tail of struct cache_sb_disk) to extend current 16bit bucket size to 32bit with existing bucket_size in struct cache_sb_disk. This is not a good idea, there are two obvious problems, - Bucket size is always value power of 2, if store log2(bucket size) in existing bucket_size of struct cache_sb_disk, it is unnecessary to add bucket_size_hi. - Macro csum_set() assumes d[SB_JOURNAL_BUCKETS] is the last member in struct cache_sb_disk, bucket_size_hi was added after d[] which makes csum_set calculate an unexpected super block checksum. To fix the above problems, this patch introduces a new incompat feature bit BCH_FEATURE_INCOMPAT_LOG_LARGE_BUCKET_SIZE, when this bit is set, it means bucket_size in struct cache_sb_disk stores the order of power-of-2 bucket size value. When user specifies a bucket size larger than 32768 sectors, BCH_FEATURE_INCOMPAT_LOG_LARGE_BUCKET_SIZE will be set to incompat feature set, and bucket_size stores log2(bucket size) more than store the real bucket size value. The obsoleted BCH_FEATURE_INCOMPAT_LARGE_BUCKET won't be used anymore, it is renamed to BCH_FEATURE_INCOMPAT_OBSO_LARGE_BUCKET and still only recognized by kernel driver for legacy compatible purpose. The previous bucket_size_hi is renmaed to obso_bucket_size_hi in struct cache_sb_disk and not used in bcache-tools anymore. For cache device created with BCH_FEATURE_INCOMPAT_LARGE_BUCKET feature, bcache-tools and kernel driver still recognize the feature string and display it as "obso_large_bucket". With this change, the unnecessary extra space extend of bcache on-disk super block can be avoided, and csum_set() may generate expected check sum as well. Fixes: ffa470327572 ("bcache: add bucket_size_hi into struct cache_sb_disk for large bucket") Signed-off-by: Coly Li Cc: stable@vger.kernel.org # 5.9+ Signed-off-by: Jens Axboe commit 1dfc0686c29a9bbd3a446a29f9ccde3dec3bc75a Author: Coly Li Date: Mon Jan 4 15:41:20 2021 +0800 bcache: check unsupported feature sets for bcache register This patch adds the check for features which is incompatible for current supported feature sets. Now if the bcache device created by bcache-tools has features that current kernel doesn't support, read_super() will fail with error messoage. E.g. if an unsupported incompatible feature detected, bcache register will fail with dmesg "bcache: register_bcache() error : Unsupported incompatible feature found". Fixes: d721a43ff69c ("bcache: increase super block version for cache device and backing device") Fixes: ffa470327572 ("bcache: add bucket_size_hi into struct cache_sb_disk for large bucket") Signed-off-by: Coly Li Cc: stable@vger.kernel.org # 5.9+ Signed-off-by: Jens Axboe commit f7b4943dea48a572ad751ce1f18a245d43debe7e Author: Coly Li Date: Mon Jan 4 15:41:19 2021 +0800 bcache: fix typo from SUUP to SUPP in features.h This patch fixes the following typos, from BCH_FEATURE_COMPAT_SUUP to BCH_FEATURE_COMPAT_SUPP from BCH_FEATURE_INCOMPAT_SUUP to BCH_FEATURE_INCOMPAT_SUPP from BCH_FEATURE_INCOMPAT_SUUP to BCH_FEATURE_RO_COMPAT_SUPP Fixes: d721a43ff69c ("bcache: increase super block version for cache device and backing device") Fixes: ffa470327572 ("bcache: add bucket_size_hi into struct cache_sb_disk for large bucket") Signed-off-by: Coly Li Cc: stable@vger.kernel.org # 5.9+ Signed-off-by: Jens Axboe commit e80927079fd97b4d5457e3af2400a0087b561564 Author: Yi Li Date: Mon Jan 4 15:41:18 2021 +0800 bcache: set pdev_set_uuid before scond loop iteration There is no need to reassign pdev_set_uuid in the second loop iteration, so move it to the place before second loop. Signed-off-by: Yi Li Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 43f20b1c6140896916f4e91aacc166830a7ba849 Author: Marc Zyngier Date: Sat Aug 15 13:51:12 2020 +0100 arm64: dts: rockchip: Fix PCIe DT properties on rk3399 It recently became apparent that the lack of a 'device_type = "pci"' in the PCIe root complex node for rk3399 is a violation of the PCI binding, as documented in IEEE Std 1275-1994. Changes to the kernel's parsing of the DT made such violation fatal, as drivers cannot probe the controller anymore. Add the missing property makes the PCIe node compliant. While we are at it, drop the pointless linux,pci-domain property, which only makes sense when there are multiple host bridges. Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200815125112.462652-3-maz@kernel.org Signed-off-by: Heiko Stuebner commit 642fb2795290c4abe629ca34fb8ff6d78baa9fd3 Author: Simon South Date: Wed Sep 30 14:56:27 2020 -0400 arm64: dts: rockchip: Use only supported PCIe link speed on Pinebook Pro On Pinebook Pro laptops with an NVMe SSD installed, prevent random crashes in the NVMe driver by not attempting to use a PCIe link speed higher than that supported by the RK3399 SoC. See commit 712fa1777207 ("arm64: dts: rockchip: add max-link-speed for rk3399"). Fixes: 5a65505a6988 ("arm64: dts: rockchip: Add initial support for Pinebook Pro") Signed-off-by: Simon South Link: https://lore.kernel.org/r/20200930185627.5918-1-simon@simonsouth.net Signed-off-by: Heiko Stuebner commit 656c648354e1561fa4f445b0b3252ec1d24e3951 Author: Sandy Huang Date: Fri Jan 8 12:06:27 2021 +0100 arm64: dts: rockchip: fix vopl iommu irq on px30 The vop-mmu shares the irq with its matched vop but not the vpu. Fixes: 7053e06b1422 ("arm64: dts: rockchip: add core dtsi file for PX30 SoCs") Signed-off-by: Sandy Huang Signed-off-by: Heiko Stuebner Reviewed-by: Ezequiel Garcia Reviewed-by: Paul Kocialkowski Tested-by: Paul Kocialkowski Link: https://lore.kernel.org/r/20210108110627.3231226-1-heiko@sntech.de commit c49243e8898233de18edfaaa5b7b261ea457f221 Merge: c1787ffd0d24e 766b0515d5bec Author: Jakub Kicinski Date: Fri Jan 8 19:27:44 2021 -0800 Merge branch 'net-fix-issues-around-register_netdevice-failures' Jakub Kicinski says: ==================== net: fix issues around register_netdevice() failures This series attempts to clean up the life cycle of struct net_device. Dave has added dev->needs_free_netdev in the past to fix double frees, we can lean on that mechanism a little more to fix remaining issues with register_netdevice(). This is the next chapter of the saga which already includes: commit 0e0eee2465df ("net: correct error path in rtnl_newlink()") commit e51fb152318e ("rtnetlink: fix a memory leak when ->newlink fails") commit cf124db566e6 ("net: Fix inconsistent teardown and release of private netdev state.") commit 93ee31f14f6f ("[NET]: Fix free_netdev on register_netdev failure.") commit 814152a89ed5 ("net: fix memleak in register_netdevice()") commit 10cc514f451a ("net: Fix null de-reference of device refcount") The immediate problem which gets fixed here is that calling free_netdev() right after unregister_netdevice() is illegal because we need to release rtnl_lock first, to let the unregistration finish. Note that unregister_netdevice() is just a wrapper of unregister_netdevice_queue(), it only does half of the job. Where this limitation becomes most problematic is in failure modes of register_netdevice(). There is a notifier call right at the end of it, which lets other subsystems veto the entire thing. At which point we should really go through a full unregister_netdevice(), but we can't because callers may go straight to free_netdev() after the failure, and that's no bueno (see the previous paragraph). This set makes free_netdev() more lenient, when device is still being unregistered free_netdev() will simply set dev->needs_free_netdev and let the unregister process do the freeing. With the free_netdev() problem out of the way failures in register_netdevice() can make use of net_todo, again. Users are still expected to call free_netdev() right after failure but that will only set dev->needs_free_netdev. To prevent the pathological case of: dev->needs_free_netdev = true; if (register_netdevice(dev)) { rtnl_unlock(); free_netdev(dev); } make register_netdevice()'s failure clear dev->needs_free_netdev. Problems described above are only present with register_netdevice() / unregister_netdevice(). We have two parallel APIs for registration of devices: - those called outside rtnl_lock (register_netdev(), and unregister_netdev()); - and those to be used under rtnl_lock - register_netdevice() and unregister_netdevice(). The former is trivial and has no problems. The alternative approach to fix the latter would be to also separate the freeing functions - i.e. add free_netdevice(). This has been implemented (incl. converting all relevant calls in the tree) but it feels a little unnecessary to put the burden of choosing the right free_netdev{,ice}() call on the programmer when we can "just do the right thing" by default. ==================== Link: https://lore.kernel.org/r/20210106184007.1821480-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 766b0515d5bec4b780750773ed3009b148df8c0a Author: Jakub Kicinski Date: Wed Jan 6 10:40:07 2021 -0800 net: make sure devices go through netdev_wait_all_refs If register_netdevice() fails at the very last stage - the notifier call - some subsystems may have already seen it and grabbed a reference. struct net_device can't be freed right away without calling netdev_wait_all_refs(). Now that we have a clean interface in form of dev->needs_free_netdev and lenient free_netdev() we can undo what commit 93ee31f14f6f ("[NET]: Fix free_netdev on register_netdev failure.") has done and complete the unregistration path by bringing the net_set_todo() call back. After registration fails user is still expected to explicitly free the net_device, so make sure ->needs_free_netdev is cleared, otherwise rolling back the registration will cause the old double free for callers who release rtnl_lock before the free. This also solves the problem of priv_destructor not being called on notifier error. net_set_todo() will be moved back into unregister_netdevice_queue() in a follow up. Reported-by: Hulk Robot Reported-by: Yang Yingliang Signed-off-by: Jakub Kicinski commit c269a24ce057abfc31130960e96ab197ef6ab196 Author: Jakub Kicinski Date: Wed Jan 6 10:40:06 2021 -0800 net: make free_netdev() more lenient with unregistering devices There are two flavors of handling netdev registration: - ones called without holding rtnl_lock: register_netdev() and unregister_netdev(); and - those called with rtnl_lock held: register_netdevice() and unregister_netdevice(). While the semantics of the former are pretty clear, the same can't be said about the latter. The netdev_todo mechanism is utilized to perform some of the device unregistering tasks and it hooks into rtnl_unlock() so the locked variants can't actually finish the work. In general free_netdev() does not mix well with locked calls. Most drivers operating under rtnl_lock set dev->needs_free_netdev to true and expect core to make the free_netdev() call some time later. The part where this becomes most problematic is error paths. There is no way to unwind the state cleanly after a call to register_netdevice(), since unreg can't be performed fully without dropping locks. Make free_netdev() more lenient, and defer the freeing if device is being unregistered. This allows error paths to simply call free_netdev() both after register_netdevice() failed, and after a call to unregister_netdevice() but before dropping rtnl_lock. Simplify the error paths which are currently doing gymnastics around free_netdev() handling. Signed-off-by: Jakub Kicinski commit 2b446e650b418f9a9e75f99852e2f2560cabfa17 Author: Jakub Kicinski Date: Wed Jan 6 10:40:05 2021 -0800 docs: net: explain struct net_device lifetime Explain the two basic flows of struct net_device's operation. Signed-off-by: Jakub Kicinski commit c1787ffd0d24eb93eefac2dbba0eac5700da9ff1 Author: Tom Parkin Date: Thu Jan 7 18:13:15 2021 +0000 ppp: fix refcount underflow on channel unbridge When setting up a channel bridge, ppp_bridge_channels sets the pch->bridge field before taking the associated reference on the bridge file instance. This opens up a refcount underflow bug if ppp_bridge_channels called via. iotcl runs concurrently with ppp_unbridge_channels executing via. file release. The bug is triggered by ppp_bridge_channels taking the error path through the 'err_unset' label. In this scenario, pch->bridge is set, but the reference on the bridged channel will not be taken because the function errors out. If ppp_unbridge_channels observes pch->bridge before it is unset by the error path, it will erroneously drop the reference on the bridged channel and cause a refcount underflow. To avoid this, ensure that ppp_bridge_channels holds a reference on each channel in advance of setting the bridge pointers. Signed-off-by: Tom Parkin Fixes: 4cf476ced45d ("ppp: add PPPIOCBRIDGECHAN and PPPIOCUNBRIDGECHAN ioctls") Acked-by: Guillaume Nault Link: https://lore.kernel.org/r/20210107181315.3128-1-tparkin@katalix.com Signed-off-by: Jakub Kicinski commit fd2ddef043592e7de80af53f47fa46fd3573086e Author: Baptiste Lepers Date: Thu Jan 7 16:11:10 2021 +1100 udp: Prevent reuseport_select_sock from reading uninitialized socks reuse->socks[] is modified concurrently by reuseport_add_sock. To prevent reading values that have not been fully initialized, only read the array up until the last known safe index instead of incorrectly re-reading the last index of the array. Fixes: acdcecc61285f ("udp: correct reuseport selection with connected sockets") Signed-off-by: Baptiste Lepers Acked-by: Willem de Bruijn Link: https://lore.kernel.org/r/20210107051110.12247-1-baptiste.lepers@gmail.com Signed-off-by: Jakub Kicinski commit 53475c5dd856212e91538a9501162e821cc1f791 Author: Dongseok Yi Date: Fri Jan 8 11:28:38 2021 +0900 net: fix use-after-free when UDP GRO with shared fraglist skbs in fraglist could be shared by a BPF filter loaded at TC. If TC writes, it will call skb_ensure_writable -> pskb_expand_head to create a private linear section for the head_skb. And then call skb_clone_fraglist -> skb_get on each skb in the fraglist. skb_segment_list overwrites part of the skb linear section of each fragment itself. Even after skb_clone, the frag_skbs share their linear section with their clone in PF_PACKET. Both sk_receive_queue of PF_PACKET and PF_INET (or PF_INET6) can have a link for the same frag_skbs chain. If a new skb (not frags) is queued to one of the sk_receive_queue, multiple ptypes can see and release this. It causes use-after-free. [ 4443.426215] ------------[ cut here ]------------ [ 4443.426222] refcount_t: underflow; use-after-free. [ 4443.426291] WARNING: CPU: 7 PID: 28161 at lib/refcount.c:190 refcount_dec_and_test_checked+0xa4/0xc8 [ 4443.426726] pstate: 60400005 (nZCv daif +PAN -UAO) [ 4443.426732] pc : refcount_dec_and_test_checked+0xa4/0xc8 [ 4443.426737] lr : refcount_dec_and_test_checked+0xa0/0xc8 [ 4443.426808] Call trace: [ 4443.426813] refcount_dec_and_test_checked+0xa4/0xc8 [ 4443.426823] skb_release_data+0x144/0x264 [ 4443.426828] kfree_skb+0x58/0xc4 [ 4443.426832] skb_queue_purge+0x64/0x9c [ 4443.426844] packet_set_ring+0x5f0/0x820 [ 4443.426849] packet_setsockopt+0x5a4/0xcd0 [ 4443.426853] __sys_setsockopt+0x188/0x278 [ 4443.426858] __arm64_sys_setsockopt+0x28/0x38 [ 4443.426869] el0_svc_common+0xf0/0x1d0 [ 4443.426873] el0_svc_handler+0x74/0x98 [ 4443.426880] el0_svc+0x8/0xc Fixes: 3a1296a38d0c (net: Support GRO/GSO fraglist chaining.) Signed-off-by: Dongseok Yi Acked-by: Willem de Bruijn Acked-by: Daniel Borkmann Link: https://lore.kernel.org/r/1610072918-174177-1-git-send-email-dseok.yi@samsung.com Signed-off-by: Jakub Kicinski commit afba9dc1f3a5390475006061c0bdc5ad4915878e Author: Stephan Gerhold Date: Wed Jan 6 11:07:55 2021 +0100 net: ipa: modem: add missing SET_NETDEV_DEV() for proper sysfs links At the moment it is quite hard to identify the network interface provided by IPA in userspace components: The network interface is created as virtual device, without any link to the IPA device. The interface name ("rmnet_ipa%d") is the only indication that the network interface belongs to IPA, but this is not very reliable. Add SET_NETDEV_DEV() to associate the network interface with the IPA parent device. This allows userspace services like ModemManager to properly identify that this network interface is provided by IPA and belongs to the modem. Cc: Alex Elder Fixes: a646d6ec9098 ("soc: qcom: ipa: modem and microcontroller") Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20210106100755.56800-1-stephan@gerhold.net Signed-off-by: Jakub Kicinski commit 996e435fd401de35df62ac943ab9402cfe85c430 Merge: 263da3330f6c0 4f8b848788f77 Author: Linus Torvalds Date: Fri Jan 8 18:04:43 2021 -0800 Merge tag 'zonefs-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs Pull zonefs fix from Damien Le Moal: "A single patch from Arnd to fix a missing dependency in zonefs Kconfig" * tag 'zonefs-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs: zonefs: select CONFIG_CRC32 commit 263da3330f6c0e4af603ec62f291e43eb3001f7b Merge: 8f3d8491d0359 65a4e5299739a Author: Linus Torvalds Date: Fri Jan 8 17:18:50 2021 -0800 Merge tag 'linux-kselftest-kunit-fixes-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kunit fixes from Shuah Khan: "One fix to force the use of the 'tty' console for UML. Given that kunit tool requires the console output, explicitly stating the dependency makes sense than relying on it being the default" * tag 'linux-kselftest-kunit-fixes-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: kunit: tool: Force the use of the 'tty' console for UML commit 8f3d8491d03594823a7f7d71d5063e1bcd03c75c Merge: 50dbd96e4f31e df00d02989024 Author: Linus Torvalds Date: Fri Jan 8 17:13:52 2021 -0800 Merge tag 'linux-kselftest-next-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kselftest fixes from Shuah Khan: "Two minor fixes to vDSO test changes in this merge window" * tag 'linux-kselftest-next-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests/vDSO: fix -Wformat warning in vdso_test_correctness selftests/vDSO: add additional binaries to .gitignore commit 50dbd96e4f31e28fc2fcc80abaabab4fb277227c Merge: 78d42025e5bb8 9d54ee78aef62 Author: Linus Torvalds Date: Fri Jan 8 17:01:28 2021 -0800 Merge tag 'docs-5.11-3' of git://git.lwn.net/linux Pull documentation fixes from Jonathan Corbet: "A handful of relatively small documentation fixes" * tag 'docs-5.11-3' of git://git.lwn.net/linux: docs: admin-guide: bootconfig: Fix feils to fails Documentation/admin-guide: kernel-parameters: hyphenate comma-separated docs: binfmt-misc: Fix .rst formatting docs: remove mention of ENABLE_MUST_CHECK atomic: remove further references to atomic_ops Documentation: doc-guide: fixes to sphinx.rst docs/mm: concepts.rst: Correct the threshold to low watermark Documentation: admin: early_param()s are also listed in kernel-parameters docs: Fix reST markup when linking to sections commit 78d42025e5bb83f9071e4a60edf1567dd12ed9dc Merge: fb9ca0be63b49 3f7bddaf5d5a8 Author: Linus Torvalds Date: Fri Jan 8 15:45:47 2021 -0800 Merge tag 'devprop-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull device properties framework fixes from Rafael Wysocki: "Revert a problematic commit that went in during the 5.10 cycle and improve the kerneldoc description of the function affected by it (both changes from Bard Liao)" * tag 'devprop-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: device property: add description of fwnode cases Revert "device property: Keep secondary firmware node secondary by type" commit fb9ca0be63b49eece304f50023e736a678cc4159 Merge: be31d940b3b62 24e8ab6886d80 Author: Linus Torvalds Date: Fri Jan 8 15:42:56 2021 -0800 Merge tag 'acpi-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These address two build issues and drop confusing text from a couple of Kconfig entries. Specifics: - Drop two local variables that are never read and the code updating their values from the x86 suspend-to-idle code (Rafael Wysocki) - Add empty stub of an ACPI helper function to avoid build issues when CONFIG_ACPI is not set (Shawn Guo) - Remove confusing text regarding modules from Kconfig entries that correspond to non-modular code (Peter Robinson)" * tag 'acpi-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: Update Kconfig help text for items that are no longer modular ACPI: scan: add stub acpi_create_platform_device() for !CONFIG_ACPI ACPI: PM: s2idle: Drop unused local variables and related code commit be31d940b3b62c57a5d9506090e66e177b7eba90 Merge: 43d3d587d2253 c4151604f0603 Author: Linus Torvalds Date: Fri Jan 8 15:39:25 2021 -0800 Merge tag 'pm-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These address two issues in the intel_pstate driver and one in the powernow-k8 cpufreq driver. Specifics: - Make the powernow-k8 cpufreq driver avoid calling cpufreq_cpu_get(), which theoretically may return NULL, to get a policy pointer that is known to it already (Colin Ian King) - Drop two functions that are not used any more from the intel_pstate driver (Lukas Bulwahn) - Make intel_pstate check the HWP capabilities to get the maximum available P-state in the passive mode to avoid using a stale value of it in case of out-of-band updates (Rafael Wysocki)" * tag 'pm-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: intel_pstate: remove obsolete functions cpufreq: powernow-k8: pass policy rather than use cpufreq_cpu_get() cpufreq: intel_pstate: Use HWP capabilities in intel_cpufreq_adjust_perf() commit 43d3d587d22530ae92239b6aba5b0b2d5ba2e088 Merge: 2a190b22aa114 29f95f20581c4 Author: Linus Torvalds Date: Fri Jan 8 15:12:08 2021 -0800 Merge tag 'drm-fixes-2021-01-08' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Daniel Vetter: "Looks like people are back from the break, usual small pile of fixes all over. Next week Dave should be back. The only thing pending I'm aware of is a "this shouldn't have become uapi" reverts for amdgpu, but they're already on the list and not that important really so can wait another week. Summary: - fix for ttm list corruption in radeon, reported by a few people - fixes for amdgpu, i915, msm - dma-buf use-after free fix" * tag 'drm-fixes-2021-01-08' of git://anongit.freedesktop.org/drm/drm: (29 commits) drm/msm: Only enable A6xx LLCC code on A6xx drm/msm: Add modparam to allow vram carveout drm/msm: Call msm_init_vram before binding the gpu drm/msm/dp: postpone irq_hpd event during connection pending state drm/ttm: unexport ttm_pool_init/fini drm/radeon: stop re-init the TTM page pool dmabuf: fix use-after-free of dmabuf's file->f_inode Revert "drm/amd/display: Fix memory leaks in S3 resume" drm/amdgpu/display: drop DCN support for aarch64 drm/amdgpu: enable ras eeprom support for sienna cichlid drm/amdgpu: fix no bad_pages issue after umc ue injection drm/amdgpu: fix potential memory leak during navi12 deinitialization drm/amd/display: Fix unused variable warning drm/amd/pm: improve the fine grain tuning function for RV/RV2/PCO drm/amd/pm: fix the failure when change power profile for renoir drm/amdgpu: fix a GPU hang issue when remove device drm/amdgpu: fix a memory protection fault when remove amdgpu device drm/amdgpu: switched to cached noretry setting for vangogh drm/amd/display: fix sysfs amdgpu_current_backlight_pwm NULL pointer issue drm/amd/pm: updated PM to I2C controller port on sienna cichlid ... commit 2a190b22aa1149cda804527aa603db45f75439c3 Merge: 3e2a590acbed3 872f36eb0b0f4 Author: Linus Torvalds Date: Fri Jan 8 15:06:02 2021 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "x86: - Fixes for the new scalable MMU - Fixes for migration of nested hypervisors on AMD - Fix for clang integrated assembler - Fix for left shift by 64 (UBSAN) - Small cleanups - Straggler SEV-ES patch ARM: - VM init cleanups - PSCI relay cleanups - Kill CONFIG_KVM_ARM_PMU - Fixup __init annotations - Fixup reg_to_encoding() - Fix spurious PMCR_EL0 access Misc: - selftests cleanups" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (38 commits) KVM: x86: __kvm_vcpu_halt can be static KVM: SVM: Add support for booting APs in an SEV-ES guest KVM: nSVM: cancel KVM_REQ_GET_NESTED_STATE_PAGES on nested vmexit KVM: nSVM: mark vmcb as dirty when forcingly leaving the guest mode KVM: nSVM: correctly restore nested_run_pending on migration KVM: x86/mmu: Clarify TDP MMU page list invariants KVM: x86/mmu: Ensure TDP MMU roots are freed after yield kvm: check tlbs_dirty directly KVM: x86: change in pv_eoi_get_pending() to make code more readable MAINTAINERS: Really update email address for Sean Christopherson KVM: x86: fix shift out of bounds reported by UBSAN KVM: selftests: Implement perf_test_util more conventionally KVM: selftests: Use vm_create_with_vcpus in create_vm KVM: selftests: Factor out guest mode code KVM/SVM: Remove leftover __svm_vcpu_run prototype from svm.c KVM: SVM: Add register operand to vmsave call in sev_es_vcpu_load KVM: x86/mmu: Optimize not-present/MMIO SPTE check in get_mmio_spte() KVM: x86/mmu: Use raw level to index into MMIO walks' sptes array KVM: x86/mmu: Get root level from walkers when retrieving MMIO SPTE KVM: x86/mmu: Use -1 to flag an undefined spte in get_mmio_spte() ... commit 3e2a590acbed38a6908a5c4df7754dcb65f6fd37 Merge: 95f05058b2bbe 7c29ada5e7008 Author: Linus Torvalds Date: Fri Jan 8 14:55:41 2021 -0800 Merge tag 'iommu-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull iommu fixes from Will Deacon: "This is mainly all Intel VT-D stuff, but there are some fixes for AMD and ARM as well. We've also got the revert I promised during the merge window, which removes a temporary hack to accomodate i915 while we transitioned the Intel IOMMU driver over to the common DMA-IOMMU API. Finally, there are still a couple of other VT-D fixes floating around, so I expect to send you another batch of fixes next week. Summary: - Fix VT-D TLB invalidation for subdevices - Fix VT-D use-after-free on subdevice detach - Fix VT-D locking so that IRQs are disabled during SVA bind/unbind - Fix VT-D address alignment when flushing IOTLB - Fix memory leak in VT-D IRQ remapping failure path - Revert temporary i915 sglist hack now that it is no longer required - Fix sporadic boot failure with Arm SMMU on Qualcomm SM8150 - Fix NULL dereference in AMD IRQ remapping code with remapping disabled - Fix accidental enabling of irqs on AMD resume-from-suspend path - Fix some typos in comments" * tag 'iommu-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: iommu/vt-d: Fix ineffective devTLB invalidation for subdevices iommu/vt-d: Fix general protection fault in aux_detach_device() iommu/vt-d: Move intel_iommu info from struct intel_svm to struct intel_svm_dev iommu/arm-smmu-qcom: Initialize SCTLR of the bypass context iommu/vt-d: Fix lockdep splat in sva bind()/unbind() Revert "iommu: Add quirk for Intel graphic devices in map_sg" iommu/vt-d: Fix misuse of ALIGN in qi_flush_piotlb() iommu/amd: Stop irq_remapping_select() matching when remapping is disabled iommu/amd: Set iommu->int_enabled consistently when interrupts are set up iommu/intel: Fix memleak in intel_irq_remapping_alloc iommu/iova: fix 'domain' typos commit 167c9dc84ec384c0940359e067301883ad2b42a8 Author: Takashi Iwai Date: Fri Jan 8 08:52:19 2021 +0100 ALSA: usb-audio: Fix implicit feedback sync setup for Pioneer devices Pioneer devices have both playback and capture streams sharing the same iface/altsetting, and those need to be paired as implicit feedback. Instead of a half-baked (and broken) static quirk entry, set up more generically for those devices by checking the number of endpoints and the attribute of the secondary EP. Fixes: bf6313a0ff76 ("ALSA: usb-audio: Refactor endpoint management") Reported-by: František Kučera Link: https://lore.kernel.org/r/20210108075219.21463-6-tiwai@suse.de Signed-off-by: Takashi Iwai commit eae4d054f909d9e9589d0940f9b5b0cd68de1e2e Author: Takashi Iwai Date: Fri Jan 8 08:52:18 2021 +0100 ALSA: usb-audio: Annotate the endpoint index in audioformat There are devices that have multiple endpoints sharing the same iface/altset not only for sync but also for the actual streams, and the audioformat for such an endpoint needs to be handled with the proper endpoint index; otherwise it confuses the endpoint management. This patch extends the audioformat to annotate the endpoint index, and put the proper ep_idx=1 to Pioneer device quirk entries accordingly. Fixes: bf6313a0ff76 ("ALSA: usb-audio: Refactor endpoint management") Link: https://lore.kernel.org/r/20210108075219.21463-5-tiwai@suse.de Signed-off-by: Takashi Iwai commit 00272c61827e37bb64c47499843d8c0d8ee136a5 Author: Takashi Iwai Date: Fri Jan 8 08:52:17 2021 +0100 ALSA: usb-audio: Avoid unnecessary interface re-setup The current endpoint handling assumed (more or less) a unique 1:1 relation between the endpoint and the iface/altset. The exception was the sync EP without the implicit feedback which has usually the secondary EP of the same altset. This works fine for most devices, but it turned out that some unusual devices like Pinoeer's ones have both playback and capture endpoints in the same iface/altsetting and use both for the implicit feedback mode. For handling such a case, we need to extend the endpoint management to take the shared interface into account. This patch does that: it adds a new object snd_usb_iface_ref for managing the reference counts of the each USB interface that is used by each endpoint. The interface setup is performed only once for the (sharing) endpoints, and the doubly initialization is avoided. Along with this, the resource release of endpoints and interface refcounts are put into a single function, snd_usb_endpoint_free_all() instead of looping in the caller side. Fixes: bf6313a0ff76 ("ALSA: usb-audio: Refactor endpoint management") Link: https://lore.kernel.org/r/20210108075219.21463-4-tiwai@suse.de Signed-off-by: Takashi Iwai commit 5d15f1eb456025cf47078fdbc230d7a9f1ee4cef Author: Takashi Iwai Date: Fri Jan 8 08:52:16 2021 +0100 ALSA: usb-audio: Choose audioformat of a counter-part substream The implicit feedback mode needs to handle two endpoints and the choice of the audioformat object for the sync EP is important since this determines the compatibility of the hw_params. The current code uses the same audioformat object if both the main EP and the sync EP point to the same iface/altsetting. This was done in consideration of the non-implicit-fb sync EP handling, and it doesn't match well with the cases where actually to endpoints are defined in the sameiface / altsetting like a few Pioneer devices. Modify snd_usb_find_implicit_fb_sync_format() to pick up the audioformat that is assigned in the counter-part substreams primarily, so that the actual capture stream can be opened properly. We keep the same audioformat object only as a fallback in case nothing found, though. Fixes: 9fddc15e8039 ("ALSA: usb-audio: Factor out the implicit feedback quirk code") Link: https://lore.kernel.org/r/20210108075219.21463-3-tiwai@suse.de Signed-off-by: Takashi Iwai commit b2345a8a4342cf83316a2198fa915c7c99b7d6c7 Author: Takashi Iwai Date: Fri Jan 8 08:52:15 2021 +0100 ALSA: usb-audio: Fix the missing endpoints creations for quirks The recent change in the endpoint management moved the endpoint object creation from the stream open time to the parser of the audio descriptor. It works fine for the standard audio, but it overlooked the other places that create audio streams via quirks (QUIRK_AUDIO_FIXED_ENDPOINT) like the reported a few Pioneer devices; those call snd_usb_add_audio_stream() manually, hence they miss the endpoints, eventually resulting in the error at opening streams. Moreover, now the sync EP setup was moved to the explicit call of snd_usb_audioformat_set_sync_ep(), and this needs to be added for those places, too. This patch addresses those regressions for quirks. It adds a local helper function add_audio_stream_from_fixed_fmt(), which does the all needed tasks, and replaces the calls of snd_usb_add_audio_stream() with this new function. Fixes: 54cb31901b83 ("ALSA: usb-audio: Create endpoint objects at parsing phase") Reported-by: František Kučera Link: https://lore.kernel.org/r/20210108075219.21463-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit 95f05058b2bbe3b85c8617b961879e52f692caa5 Merge: 56ef24e53ec16 bac7171719711 Author: Linus Torvalds Date: Fri Jan 8 14:13:54 2021 -0800 Merge tag 'arm-fixes-5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC fixes from Arnd Bergmann: "These are a small number of bug fixes that all came in before or during the merge window, most for the omap platform: - One boot regression fix for Nokia N9 (OMAP3). - Two small defconfig changes for omap2, to reflect changes in drivers - Warning fixes for DT issues on omap2, picoxcell and bitmap SoCs. The picoxcell platform will be removed in v5.12, but fixing it first makes it easier to backport to the fix to stable kernels and get a clean build with new dtc versions" * tag 'arm-fixes-5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: ARM: picoxcell: fix missing interrupt-parent properties ARM: dts: ux500/golden: Set display max brightness arm64: dts: bitmain: Use generic "ngpios" rather than "snps,nr-gpios" ARM: omap2: pmic-cpcap: fix maximum voltage to be consistent with defaults on xt875 ARM: omap2plus_defconfig: enable SPI GPIO ARM: OMAP2+: omap_device: fix idling of devices during probe ARM: dts: OMAP3: disable AES on N950/N9 ARM: omap2plus_defconfig: drop unused POWER_AVS option commit 56ef24e53ec1660bf095779cc95fa574dd0f71df Merge: 6279d812eab67 83b5bd628f65e Author: Linus Torvalds Date: Fri Jan 8 14:11:34 2021 -0800 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Catalin Marinas: - Clean-ups following the merging window: remove unused variable, duplicate includes, superfluous barrier, move some inline asm to separate functions. - Disable top-byte-ignore on kernel code addresses with KASAN/MTE enabled (already done when MTE is disabled). - Fix ARCH_LOW_ADDRESS_LIMIT definition with CONFIG_ZONE_DMA disabled. - Compiler/linker flags: link with "-z norelno", discard .eh_frame_hdr instead of --no-eh-frame-hdr. * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: Move PSTATE.TCO setting to separate functions arm64: kasan: Set TCR_EL1.TBID1 when KASAN_HW_TAGS is enabled arm64: vdso: disable .eh_frame_hdr via /DISCARD/ instead of --no-eh-frame-hdr arm64: traps: remove duplicate include statement arm64: link with -z norelro for LLD or aarch64-elf arm64: mm: Fix ARCH_LOW_ADDRESS_LIMIT when !CONFIG_ZONE_DMA arm64: mte: remove an ISB on kernel exit arm64/smp: Remove unused irq variable in arch_show_interrupts() commit e8deee4f1543eda9b75278f63322f412cad52f6a Author: Vineet Gupta Date: Fri Jan 8 13:46:55 2021 -0800 ARC: [hsdk]: Enable FPU_SAVE_RESTORE HSDK has hardware floating point and the common use case is with glibc+hf so enable that as default. Signed-off-by: Vineet Gupta commit 9b5948267adc9e689da609eb61cf7ed49cae5fa8 Author: Mikulas Patocka Date: Fri Jan 8 11:15:56 2021 -0500 dm integrity: fix flush with external metadata device With external metadata device, flush requests are not passed down to the data device. Fix this by submitting the flush request in dm_integrity_flush_buffers. In order to not degrade performance, we overlap the data device flush with the metadata device flush. Reported-by: Lukas Straub Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org Signed-off-by: Mike Snitzer commit 0378c625afe80eb3f212adae42cc33c9f6f31abf Author: Mike Snitzer Date: Wed Jan 6 18:19:05 2021 -0500 dm: eliminate potential source of excessive kernel log noise There wasn't ever a real need to log an error in the kernel log for ioctls issued with insufficient permissions. Simply return an error and if an admin/user is sufficiently motivated they can enable DM's dynamic debugging to see an explanation for why the ioctls were disallowed. Reported-by: Nir Soffer Fixes: e980f62353c6 ("dm: don't allow ioctls to targets that don't map to whole devices") Signed-off-by: Mike Snitzer commit 6279d812eab67a6df6b22fa495201db6f2305924 Merge: ea1c87c156d94 220efcf9caf75 Author: Linus Torvalds Date: Fri Jan 8 12:12:30 2021 -0800 Merge tag 'net-5.11-rc3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull more networking fixes from Jakub Kicinski: "Slightly lighter pull request to get back into the Thursday cadence. Current release - always broken: - can: mcp251xfd: fix Tx/Rx ring buffer driver race conditions - dsa: hellcreek: fix led_classdev build errors Previous releases - regressions: - ipv6: fib: flush exceptions when purging route to avoid netdev reference leak - ip_tunnels: fix pmtu check in nopmtudisc mode - ip: always refragment ip defragmented packets to avoid MTU issues when forwarding through tunnels, correct "packet too big" message is prohibitively tricky to generate - s390/qeth: fix locking for discipline setup / removal and during recovery to prevent both deadlocks and races - mlx5: Use port_num 1 instead of 0 when delete a RoCE address Previous releases - always broken: - cdc_ncm: correct overhead calculation in delayed_ndp_size to prevent out of bound accesses with Huawei 909s-120 LTE module - fix stmmac dwmac-sun8i suspend/resume: - PHY being left powered off - MAC syscon configuration being reset - reference to the reset controller being improperly dropped - qrtr: fix null-ptr-deref in qrtr_ns_remove - can: tcan4x5x: fix bittiming const, use common bittiming from m_can driver - mlx5e: CT: Use per flow counter when CT flow accounting is enabled - mlx5e: Fix SWP offsets when vlan inserted by driver Misc: - bpf: Fix a task_iter bug caused by a bpf -> net merge conflict resolution And the usual many fixes to various error paths" * tag 'net-5.11-rc3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (69 commits) net: dsa: lantiq_gswip: Exclude RMII from modes that report 1 GbE s390/qeth: fix L2 header access in qeth_l3_osa_features_check() s390/qeth: fix locking for discipline setup / removal s390/qeth: fix deadlock during recovery selftests: fib_nexthops: Fix wrong mausezahn invocation nexthop: Bounce NHA_GATEWAY in FDB nexthop groups nexthop: Unlink nexthop group entry in error path nexthop: Fix off-by-one error in error path octeontx2-af: fix memory leak of lmac and lmac->name chtls: Fix chtls resources release sequence chtls: Added a check to avoid NULL pointer dereference chtls: Replace skb_dequeue with skb_peek chtls: Avoid unnecessary freeing of oreq pointer chtls: Fix panic when route to peer not configured chtls: Remove invalid set_tcb call chtls: Fix hardware tid leak net: ip: always refragment ip defragmented packets net: fix pmtu check in nopmtudisc mode selftests: netfilter: add selftest for ipip pmtu discovery with enabled connection tracking docs: octeontx2: tune rst markup ... commit ea1c87c156d94dd78b4f5267ec40c403b2da7e14 Merge: ef0ba05538299 0aa171e9b267c Author: Linus Torvalds Date: Fri Jan 8 12:05:11 2021 -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 functional bug in arm/chacha-neon as well as a potential buffer overflow in ecdh" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: ecdh - avoid buffer overflow in ecdh_set_secret() crypto: arm/chacha-neon - add missing counter increment commit 51d62f2f2c501a93d9a6a46f43731f984e227764 Author: Ilan Peer Date: Tue Jan 5 16:56:57 2021 +0200 cfg80211: Save the regulatory domain with a lock Saving the regulatory domain while setting custom regulatory domain was done while accessing a RCU protected pointer but without any protection. Fix this by using RTNL while accessing the pointer. Signed-off-by: Ilan Peer Reported-by: syzbot+27771d4abcd9b7a1f5d3@syzkaller.appspotmail.com Reported-by: syzbot+db4035751c56c0079282@syzkaller.appspotmail.com Reported-by: Hans de Goede Fixes: beee24695157 ("cfg80211: Save the regulatory domain when setting custom regulatory") Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210105165657.613e9a876829.Ia38d27dbebea28bf9c56d70691d243186ede70e7@changeid Signed-off-by: Johannes Berg commit 70b6ff35d62050d1573876cc0e1e078acd3e6008 Author: Johannes Berg Date: Wed Jan 6 23:47:41 2021 +0100 cfg80211/mac80211: fix kernel-doc for SAR APIs A stray @ caused the kernel-doc parser to not understand this, fix that. Also add some missing kernel-doc. Reported-by: Stephen Rothwell Fixes: 6bdb68cef7bf ("nl80211: add common API to configure SAR power limitations") Fixes: c534e093d865 ("mac80211: add ieee80211_set_sar_specs") Signed-off-by: Johannes Berg Tested-by: Stephen Rothwell # build only Link: https://lore.kernel.org/r/20210106234740.96827c18f9bd.I8b9f0a9cbfe186931ef9640046f414371f216914@changeid Signed-off-by: Johannes Berg commit ef0ba05538299f1391cbe097de36895bb36ecfe6 Author: Linus Torvalds Date: Thu Jan 7 09:43:54 2021 -0800 poll: fix performance regression due to out-of-line __put_user() The kernel test robot reported a -5.8% performance regression on the "poll2" test of will-it-scale, and bisected it to commit d55564cfc222 ("x86: Make __put_user() generate an out-of-line call"). I didn't expect an out-of-line __put_user() to matter, because no normal core code should use that non-checking legacy version of user access any more. But I had overlooked the very odd poll() usage, which does a __put_user() to update the 'revents' values of the poll array. Now, Al Viro correctly points out that instead of updating just the 'revents' field, it would be much simpler to just copy the _whole_ pollfd entry, and then we could just use "copy_to_user()" on the whole array of entries, the same way we use "copy_from_user()" a few lines earlier to get the original values. But that is not what we've traditionally done, and I worry that threaded applications might be concurrently modifying the other fields of the pollfd array. So while Al's suggestion is simpler - and perhaps worth trying in the future - this instead keeps the "just update revents" model. To fix the performance regression, use the modern "unsafe_put_user()" instead of __put_user(), with the proper "user_write_access_begin()" guarding in place. This improves code generation enormously. Link: https://lore.kernel.org/lkml/20210107134723.GA28532@xsang-OptiPlex-9020/ Reported-by: kernel test robot Tested-by: Oliver Sang Cc: Al Viro Cc: David Laight Cc: Peter Zijlstra Signed-off-by: Linus Torvalds commit a91bd6223ecd46addc71ee6fcd432206d39365d2 Author: Petr Mladek Date: Fri Jan 8 12:48:47 2021 +0100 Revert "init/console: Use ttynull as a fallback when there is no console" This reverts commit 757055ae8dedf5333af17b3b5b4b70ba9bc9da4e. The commit caused that ttynull was used as the default console on several systems[1][2][3]. As a result, the console was blank even when a better alternative existed. It happened when there was no console configured on the command line and ttynull_init() was the first initcall calling register_console(). Or it happened when /dev/ did not exist when console_on_rootfs() was called. It was not able to open /dev/console even though a console driver was registered. It tried to add ttynull console but it obviously did not help. But ttynull became the preferred console and was used by /dev/console when it was available later. The commit tried to fix a historical problem that have been there for ages. The primary motivation was the commit 3cffa06aeef7ece30f6 ("printk/console: Allow to disable console output by using console="" or console=null"). It provided a clean solution for a workaround that was widely used and worked only by chance. This revert causes that the console="" or console=null command line options will again work only by chance. These options will cause that a particular console will be preferred and the default (tty) ones will not get enabled. There will be no console registered at all. As a result there won't be stdin, stdout, and stderr for the init process. But it worked exactly this way even before. The proper solution has to fulfill many conditions: + Register ttynull only when explicitly required or as the ultimate fallback. + ttynull should get associated with /dev/console but it must not become preferred console when used as a fallback. Especially, it must still be possible to replace it by a better console later. Such a change requires clean up of the register_console() code. Otherwise, it would be even harder to follow. Especially, the use of has_preferred_console and CON_CONSDEV flag is tricky. The clean up is risky. The ordering of consoles is not well defined. And any changes tend to break existing user settings. Do the revert at the least risky solution for now. [1] https://lore.kernel.org/linux-kselftest/20201221144302.GR4077@smile.fi.intel.com/ [2] https://lore.kernel.org/lkml/d2a3b3c0-e548-7dd1-730f-59bc5c04e191@synopsys.com/ [3] https://patchwork.ozlabs.org/project/linux-um/patch/20210105120128.10854-1-thomas@m3y3r.de/ Reported-by: Andy Shevchenko Reported-by: Vineet Gupta Reported-by: Thomas Meyer Signed-off-by: Petr Mladek Acked-by: Greg Kroah-Hartman Acked-by: Sergey Senozhatsky Signed-off-by: Linus Torvalds commit eaa7995c529b54d68d97a30f6344cc6ca2f214a7 Author: David Collins Date: Thu Jan 7 17:16:02 2021 -0800 regulator: core: avoid regulator_resolve_supply() race condition The final step in regulator_register() is to call regulator_resolve_supply() for each registered regulator (including the one in the process of being registered). The regulator_resolve_supply() function first checks if rdev->supply is NULL, then it performs various steps to try to find the supply. If successful, rdev->supply is set inside of set_supply(). This procedure can encounter a race condition if two concurrent tasks call regulator_register() near to each other on separate CPUs and one of the regulators has rdev->supply_name specified. There is currently nothing guaranteeing atomicity between the rdev->supply check and set steps. Thus, both tasks can observe rdev->supply==NULL in their regulator_resolve_supply() calls. This then results in both creating a struct regulator for the supply. One ends up actually stored in rdev->supply and the other is lost (though still present in the supply's consumer_list). Here is a kernel log snippet showing the issue: [ 12.421768] gpu_cc_gx_gdsc: supplied by pm8350_s5_level [ 12.425854] gpu_cc_gx_gdsc: supplied by pm8350_s5_level [ 12.429064] debugfs: Directory 'regulator.4-SUPPLY' with parent '17a00000.rsc:rpmh-regulator-gfxlvl-pm8350_s5_level' already present! Avoid this race condition by holding the rdev->mutex lock inside of regulator_resolve_supply() while checking and setting rdev->supply. Signed-off-by: David Collins Link: https://lore.kernel.org/r/1610068562-4410-1-git-send-email-collinsd@codeaurora.org Signed-off-by: Mark Brown commit 24e8ab6886d80fe60b1d4e64b6d9f15ea9ad597a Merge: aa7a1bb02bb44 ee61cfd955a64 240bdc605e6a9 Author: Rafael J. Wysocki Date: Fri Jan 8 18:15:44 2021 +0100 Merge branches 'acpi-scan' and 'acpi-misc' * acpi-scan: ACPI: scan: add stub acpi_create_platform_device() for !CONFIG_ACPI * acpi-misc: ACPI: Update Kconfig help text for items that are no longer modular commit 35d0b389f3b23439ad15b610d6e43fc72fc75779 Author: Jens Axboe Date: Tue Jan 5 11:32:43 2021 -0700 task_work: unconditionally run task_work from get_signal() Song reported a boot regression in a kvm image with 5.11-rc, and bisected it down to the below patch. Debugging this issue, turns out that the boot stalled when a task is waiting on a pipe being released. As we no longer run task_work from get_signal() unless it's queued with TWA_SIGNAL, the task goes idle without running the task_work. This prevents ->release() from being called on the pipe, which another boot task is waiting on. For now, re-instate the unconditional task_work run from get_signal(). For 5.12, we'll collapse TWA_RESUME and TWA_SIGNAL, as it no longer makes sense to have a distinction between the two. This will turn task_work notification into a simple boolean, whether to notify or not. Fixes: 98b89b649fce ("signal: kill JOBCTL_TASK_WORK") Reported-by: Song Liu Tested-by: John Stultz Tested-by: Douglas Anderson Tested-by: Sedat Dilek # LLVM/Clang version 11.0.1 Signed-off-by: Jens Axboe commit 7c38e769d5c508939ce5dc26df72602f3c902342 Author: Seth Miller Date: Mon Jan 4 22:58:12 2021 -0600 HID: Ignore battery for Elan touchscreen on ASUS UX550 Battery status is being reported for the Elan touchscreen on ASUS UX550 laptops despite not having a batter. It always shows either 0 or 1%. Signed-off-by: Seth Miller Signed-off-by: Jiri Kosina commit 29f7c54b253fc18bff9bf7e9f303b75deb285c7a Author: John Garry Date: Mon Dec 21 22:30:55 2020 +0800 Driver core: platform: Add extra error check in devm_platform_get_irqs_affinity() The current check of nvec < minvec for nvec returned from platform_irq_count() will not detect a negative error code in nvec. This is because minvec is unsigned, and, as such, nvec is promoted to unsigned in that check, which will make it a huge number (if it contained -EPROBE_DEFER). In practice, an error should not occur in nvec for the only in-tree user, but add a check anyway. Fixes: e15f2fa959f2 ("driver core: platform: Add devm_platform_get_irqs_affinity()") Reported-by: Dan Carpenter Signed-off-by: John Garry Link: https://lore.kernel.org/r/1608561055-231244-1-git-send-email-john.garry@huawei.com Signed-off-by: Greg Kroah-Hartman commit e076ab2a2ca70a0270232067cd49f76cd92efe64 Author: Josef Bacik Date: Thu Jan 7 17:08:30 2021 -0500 btrfs: shrink delalloc pages instead of full inodes Commit 38d715f494f2 ("btrfs: use btrfs_start_delalloc_roots in shrink_delalloc") cleaned up how we do delalloc shrinking by utilizing some infrastructure we have in place to flush inodes that we use for device replace and snapshot. However this introduced a pretty serious performance regression. To reproduce the user untarred the source tarball of Firefox (360MiB xz compressed/1.5GiB uncompressed), and would see it take anywhere from 5 to 20 times as long to untar in 5.10 compared to 5.9. This was observed on fast devices (SSD and better) and not on HDD. The root cause is because before we would generally use the normal writeback path to reclaim delalloc space, and for this we would provide it with the number of pages we wanted to flush. The referenced commit changed this to flush that many inodes, which drastically increased the amount of space we were flushing in certain cases, which severely affected performance. We cannot revert this patch unfortunately because of 3d45f221ce62 ("btrfs: fix deadlock when cloning inline extent and low on free metadata space") which requires the ability to skip flushing inodes that are being cloned in certain scenarios, which means we need to keep using our flushing infrastructure or risk re-introducing the deadlock. Instead to fix this problem we can go back to providing btrfs_start_delalloc_roots with a number of pages to flush, and then set up a writeback_control and utilize sync_inode() to handle the flushing for us. This gives us the same behavior we had prior to the fix, while still allowing us to avoid the deadlock that was fixed by Filipe. I redid the users original test and got the following results on one of our test machines (256GiB of ram, 56 cores, 2TiB Intel NVMe drive) 5.9 0m54.258s 5.10 1m26.212s 5.10+patch 0m38.800s 5.10+patch is significantly faster than plain 5.9 because of my patch series "Change data reservations to use the ticketing infra" which contained the patch that introduced the regression, but generally improved the overall ENOSPC flushing mechanisms. Additional testing on consumer-grade SSD (8GiB ram, 8 CPU) confirm the results: 5.10.5 4m00s 5.10.5+patch 1m08s 5.11-rc2 5m14s 5.11-rc2+patch 1m30s Reported-by: René Rebe Fixes: 38d715f494f2 ("btrfs: use btrfs_start_delalloc_roots in shrink_delalloc") CC: stable@vger.kernel.org # 5.10 Signed-off-by: Josef Bacik Tested-by: David Sterba Reviewed-by: David Sterba [ add my test results ] Signed-off-by: David Sterba commit d0243bbd5dd3ebbd49dafa8b56bb911d971131d0 Author: Meng Li Date: Tue Jan 5 15:09:27 2021 +0800 drivers core: Free dma_range_map when driver probe failed There will be memory leak if driver probe failed. Trace as below: backtrace: [<000000002415258f>] kmemleak_alloc+0x3c/0x50 [<00000000f447ebe4>] __kmalloc+0x208/0x530 [<0000000048bc7b3a>] of_dma_get_range+0xe4/0x1b0 [<0000000041e39065>] of_dma_configure_id+0x58/0x27c [<000000006356866a>] platform_dma_configure+0x2c/0x40 ...... [<000000000afcf9b5>] ret_from_fork+0x10/0x3c This issue is introduced by commit e0d072782c73("dma-mapping: introduce DMA range map, supplanting dma_pfn_offset "). It doesn't free dma_range_map when driver probe failed and cause above memory leak. So, add code to free it in error path. Fixes: e0d072782c73 ("dma-mapping: introduce DMA range map, supplanting dma_pfn_offset ") Cc: stable@vger.kernel.org Signed-off-by: Meng Li Link: https://lore.kernel.org/r/20210105070927.14968-1-Meng.Li@windriver.com Signed-off-by: Greg Kroah-Hartman commit 84e261553e6f919bf0b4d65244599ab2b41f1da5 Author: David Arcari Date: Thu Jan 7 09:47:07 2021 -0500 hwmon: (amd_energy) fix allocation of hwmon_channel_info config hwmon, specifically hwmon_num_channel_attrs, expects the config array in the hwmon_channel_info structure to be terminated by a zero entry. amd_energy does not honor this convention. As result, a KASAN warning is possible. Fix this by adding an additional entry and setting it to zero. Fixes: 8abee9566b7e ("hwmon: Add amd_energy driver to report energy counters") Signed-off-by: David Arcari Cc: Naveen Krishna Chatradhi Cc: Jean Delvare Cc: Guenter Roeck Cc: linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org Signed-off-by: David Arcari Acked-by: Naveen Krishna Chatradhi Link: https://lore.kernel.org/r/20210107144707.6927-1-darcari@redhat.com Signed-off-by: Guenter Roeck commit bac717171971176b78c72d15a8b6961764ab197f Author: Arnd Bergmann Date: Wed Dec 30 16:20:05 2020 +0100 ARM: picoxcell: fix missing interrupt-parent properties dtc points out that the interrupts for some devices are not parsable: picoxcell-pc3x2.dtsi:45.19-49.5: Warning (interrupts_property): /paxi/gem@30000: Missing interrupt-parent picoxcell-pc3x2.dtsi:51.21-55.5: Warning (interrupts_property): /paxi/dmac@40000: Missing interrupt-parent picoxcell-pc3x2.dtsi:57.21-61.5: Warning (interrupts_property): /paxi/dmac@50000: Missing interrupt-parent picoxcell-pc3x2.dtsi:233.21-237.5: Warning (interrupts_property): /rwid-axi/axi2pico@c0000000: Missing interrupt-parent There are two VIC instances, so it's not clear which one needs to be used. I found the BSP sources that reference VIC0, so use that: https://github.com/r1mikey/meta-picoxcell/blob/master/recipes-kernel/linux/linux-picochip-3.0/0001-picoxcell-support-for-Picochip-picoXcell-SoC.patch Acked-by: Jamie Iles Link: https://lore.kernel.org/r/20201230152010.3914962-1-arnd@kernel.org' Signed-off-by: Arnd Bergmann commit 02f938e9fed1681791605ca8b96c2d9da9355f6a Author: John Garry Date: Fri Jan 8 16:55:37 2021 +0800 blk-mq-debugfs: Add decode for BLK_MQ_F_TAG_HCTX_SHARED Showing the hctx flags for when BLK_MQ_F_TAG_HCTX_SHARED is set gives something like: root@debian:/home/john# more /sys/kernel/debug/block/sda/hctx0/flags alloc_policy=FIFO SHOULD_MERGE|TAG_QUEUE_SHARED|3 Add the decoding for that flag. Fixes: 32bc15afed04b ("blk-mq: Facilitate a shared sbitmap per tagset") Signed-off-by: John Garry Signed-off-by: Jens Axboe commit 3a21777c6ee99749bac10727b3c17e5bcfebe5c1 Author: Jack Wang Date: Fri Jan 8 15:36:34 2021 +0100 block/rnbd-clt: avoid module unload race with close confirmation We had kernel panic, it is caused by unload module and last close confirmation. call trace: [1196029.743127] free_sess+0x15/0x50 [rtrs_client] [1196029.743128] rtrs_clt_close+0x4c/0x70 [rtrs_client] [1196029.743129] ? rnbd_clt_unmap_device+0x1b0/0x1b0 [rnbd_client] [1196029.743130] close_rtrs+0x25/0x50 [rnbd_client] [1196029.743131] rnbd_client_exit+0x93/0xb99 [rnbd_client] [1196029.743132] __x64_sys_delete_module+0x190/0x260 And in the crashdump confirmation kworker is also running. PID: 6943 TASK: ffff9e2ac8098000 CPU: 4 COMMAND: "kworker/4:2" #0 [ffffb206cf337c30] __schedule at ffffffff9f93f891 #1 [ffffb206cf337cc8] schedule at ffffffff9f93fe98 #2 [ffffb206cf337cd0] schedule_timeout at ffffffff9f943938 #3 [ffffb206cf337d50] wait_for_completion at ffffffff9f9410a7 #4 [ffffb206cf337da0] __flush_work at ffffffff9f08ce0e #5 [ffffb206cf337e20] rtrs_clt_close_conns at ffffffffc0d5f668 [rtrs_client] #6 [ffffb206cf337e48] rtrs_clt_close at ffffffffc0d5f801 [rtrs_client] #7 [ffffb206cf337e68] close_rtrs at ffffffffc0d26255 [rnbd_client] #8 [ffffb206cf337e78] free_sess at ffffffffc0d262ad [rnbd_client] #9 [ffffb206cf337e88] rnbd_clt_put_dev at ffffffffc0d266a7 [rnbd_client] The problem is both code path try to close same session, which lead to panic. To fix it, just skip the sess if the refcount already drop to 0. Fixes: f7a7a5c228d4 ("block/rnbd: client: main functionality") Signed-off-by: Jack Wang Reviewed-by: Gioh Kim Signed-off-by: Jens Axboe commit ef8048dd2345d070c41bc7df16763fd4d8fac296 Author: Swapnil Ingle Date: Fri Jan 8 15:36:33 2021 +0100 block/rnbd: Adding name to the Contributors List Adding name to the Contributors List Signed-off-by: Swapnil Ingle Acked-by: Jack Wang Acked-by: Danil Kipnis Signed-off-by: Jack Wang Signed-off-by: Jens Axboe commit 80f99093d81370c5cec37fca3b5a6bdf6bddf0f6 Author: Guoqing Jiang Date: Fri Jan 8 15:36:32 2021 +0100 block/rnbd-clt: Fix sg table use after free Since dynamically allocate sglist is used for rnbd_iu, we can't free sg table after send_usr_msg since the callback function (cqe.done) could still access the sglist. Otherwise KASAN reports UAF issue: [ 4856.600257] BUG: KASAN: use-after-free in dma_direct_unmap_sg+0x53/0x290 [ 4856.600772] Read of size 4 at addr ffff888206af3a98 by task swapper/1/0 [ 4856.601729] CPU: 1 PID: 0 Comm: swapper/1 Kdump: loaded Tainted: G W 5.10.0-pserver #5.10.0-1+feature+linux+next+20201214.1025+0910d71 [ 4856.601748] Hardware name: Supermicro Super Server/X11DDW-L, BIOS 3.3 02/21/2020 [ 4856.601766] Call Trace: [ 4856.601785] [ 4856.601822] dump_stack+0x99/0xcb [ 4856.601856] ? dma_direct_unmap_sg+0x53/0x290 [ 4856.601888] print_address_description.constprop.7+0x1e/0x230 [ 4856.601913] ? freeze_kernel_threads+0x73/0x73 [ 4856.601965] ? mark_held_locks+0x29/0xa0 [ 4856.602019] ? dma_direct_unmap_sg+0x53/0x290 [ 4856.602039] ? dma_direct_unmap_sg+0x53/0x290 [ 4856.602079] kasan_report.cold.9+0x37/0x7c [ 4856.602188] ? mlx5_ib_post_recv+0x430/0x520 [mlx5_ib] [ 4856.602209] ? dma_direct_unmap_sg+0x53/0x290 [ 4856.602256] dma_direct_unmap_sg+0x53/0x290 [ 4856.602366] complete_rdma_req+0x188/0x4b0 [rtrs_client] [ 4856.602451] ? rtrs_clt_close+0x80/0x80 [rtrs_client] [ 4856.602535] ? mlx5_ib_poll_cq+0x48b/0x16e0 [mlx5_ib] [ 4856.602589] ? radix_tree_insert+0x3a0/0x3a0 [ 4856.602610] ? do_raw_spin_lock+0x119/0x1d0 [ 4856.602647] ? rwlock_bug.part.1+0x60/0x60 [ 4856.602740] rtrs_clt_rdma_done+0x3f7/0x670 [rtrs_client] [ 4856.602804] ? rtrs_clt_rdma_cm_handler+0xda0/0xda0 [rtrs_client] [ 4856.602857] ? check_flags.part.31+0x6c/0x1f0 [ 4856.602927] ? rcu_read_lock_sched_held+0xaf/0xe0 [ 4856.602963] ? rcu_read_lock_bh_held+0xc0/0xc0 [ 4856.603137] __ib_process_cq+0x10a/0x350 [ib_core] [ 4856.603309] ib_poll_handler+0x41/0x1c0 [ib_core] [ 4856.603358] irq_poll_softirq+0xe6/0x280 [ 4856.603392] ? lockdep_hardirqs_on_prepare+0x111/0x210 [ 4856.603446] __do_softirq+0x10d/0x646 [ 4856.603540] asm_call_irq_on_stack+0x12/0x20 [ 4856.603563] [ 4856.605096] Allocated by task 8914: [ 4856.605510] kasan_save_stack+0x19/0x40 [ 4856.605532] __kasan_kmalloc.constprop.7+0xc1/0xd0 [ 4856.605552] __kmalloc+0x155/0x320 [ 4856.605574] __sg_alloc_table+0x155/0x1c0 [ 4856.605594] sg_alloc_table+0x1f/0x50 [ 4856.605620] send_msg_sess_info+0x119/0x2e0 [rnbd_client] [ 4856.605646] remap_devs+0x71/0x210 [rnbd_client] [ 4856.605676] init_sess+0xad8/0xe10 [rtrs_client] [ 4856.605706] rtrs_clt_reconnect_work+0xd6/0x170 [rtrs_client] [ 4856.605728] process_one_work+0x521/0xa90 [ 4856.605748] worker_thread+0x65/0x5b0 [ 4856.605769] kthread+0x1f2/0x210 [ 4856.605789] ret_from_fork+0x22/0x30 [ 4856.606159] Freed by task 8914: [ 4856.606559] kasan_save_stack+0x19/0x40 [ 4856.606580] kasan_set_track+0x1c/0x30 [ 4856.606601] kasan_set_free_info+0x1b/0x30 [ 4856.606622] __kasan_slab_free+0x108/0x150 [ 4856.606642] slab_free_freelist_hook+0x64/0x190 [ 4856.606661] kfree+0xe2/0x650 [ 4856.606681] __sg_free_table+0xa4/0x100 [ 4856.606707] send_msg_sess_info+0x1d6/0x2e0 [rnbd_client] [ 4856.606733] remap_devs+0x71/0x210 [rnbd_client] [ 4856.606763] init_sess+0xad8/0xe10 [rtrs_client] [ 4856.606792] rtrs_clt_reconnect_work+0xd6/0x170 [rtrs_client] [ 4856.606813] process_one_work+0x521/0xa90 [ 4856.606833] worker_thread+0x65/0x5b0 [ 4856.606853] kthread+0x1f2/0x210 [ 4856.606872] ret_from_fork+0x22/0x30 The solution is to free iu's sgtable after the iu is not used anymore. And also move sg_alloc_table into rnbd_get_iu accordingly. Fixes: 5a1328d0c3a7 ("block/rnbd-clt: Dynamically allocate sglist for rnbd_iu") Signed-off-by: Guoqing Jiang Signed-off-by: Jack Wang Signed-off-by: Jens Axboe commit 1a84e7c629f8f288e02236bc799f9b0be1cab4a7 Author: Jack Wang Date: Fri Jan 8 15:36:31 2021 +0100 block/rnbd-srv: Fix use after free in rnbd_srv_sess_dev_force_close KASAN detect following BUG: [ 778.215311] ================================================================== [ 778.216696] BUG: KASAN: use-after-free in rnbd_srv_sess_dev_force_close+0x38/0x60 [rnbd_server] [ 778.219037] Read of size 8 at addr ffff88b1d6516c28 by task tee/8842 [ 778.220500] CPU: 37 PID: 8842 Comm: tee Kdump: loaded Not tainted 5.10.0-pserver #5.10.0-1+feature+linux+next+20201214.1025+0910d71 [ 778.220529] Hardware name: Supermicro Super Server/X11DDW-L, BIOS 3.3 02/21/2020 [ 778.220555] Call Trace: [ 778.220609] dump_stack+0x99/0xcb [ 778.220667] ? rnbd_srv_sess_dev_force_close+0x38/0x60 [rnbd_server] [ 778.220715] print_address_description.constprop.7+0x1e/0x230 [ 778.220750] ? freeze_kernel_threads+0x73/0x73 [ 778.220896] ? rnbd_srv_sess_dev_force_close+0x38/0x60 [rnbd_server] [ 778.220932] ? rnbd_srv_sess_dev_force_close+0x38/0x60 [rnbd_server] [ 778.220994] kasan_report.cold.9+0x37/0x7c [ 778.221066] ? kobject_put+0x80/0x270 [ 778.221102] ? rnbd_srv_sess_dev_force_close+0x38/0x60 [rnbd_server] [ 778.221184] rnbd_srv_sess_dev_force_close+0x38/0x60 [rnbd_server] [ 778.221240] rnbd_srv_dev_session_force_close_store+0x6a/0xc0 [rnbd_server] [ 778.221304] ? sysfs_file_ops+0x90/0x90 [ 778.221353] kernfs_fop_write+0x141/0x240 [ 778.221451] vfs_write+0x142/0x4d0 [ 778.221553] ksys_write+0xc0/0x160 [ 778.221602] ? __ia32_sys_read+0x50/0x50 [ 778.221684] ? lockdep_hardirqs_on_prepare+0x13d/0x210 [ 778.221718] ? syscall_enter_from_user_mode+0x1c/0x50 [ 778.221821] do_syscall_64+0x33/0x40 [ 778.221862] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 778.221896] RIP: 0033:0x7f4affdd9504 [ 778.221928] Code: 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b3 0f 1f 80 00 00 00 00 48 8d 05 f9 61 0d 00 8b 00 85 c0 75 13 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 54 c3 0f 1f 00 41 54 49 89 d4 55 48 89 f5 53 [ 778.221956] RSP: 002b:00007fffebb36b28 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 778.222011] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f4affdd9504 [ 778.222038] RDX: 0000000000000002 RSI: 00007fffebb36c50 RDI: 0000000000000003 [ 778.222066] RBP: 00007fffebb36c50 R08: 0000556a151aa600 R09: 00007f4affeb1540 [ 778.222094] R10: fffffffffffffc19 R11: 0000000000000246 R12: 0000556a151aa520 [ 778.222121] R13: 0000000000000002 R14: 00007f4affea6760 R15: 0000000000000002 [ 778.222764] Allocated by task 3212: [ 778.223285] kasan_save_stack+0x19/0x40 [ 778.223316] __kasan_kmalloc.constprop.7+0xc1/0xd0 [ 778.223347] kmem_cache_alloc_trace+0x186/0x350 [ 778.223382] rnbd_srv_rdma_ev+0xf16/0x1690 [rnbd_server] [ 778.223422] process_io_req+0x4d1/0x670 [rtrs_server] [ 778.223573] __ib_process_cq+0x10a/0x350 [ib_core] [ 778.223709] ib_cq_poll_work+0x31/0xb0 [ib_core] [ 778.223743] process_one_work+0x521/0xa90 [ 778.223773] worker_thread+0x65/0x5b0 [ 778.223802] kthread+0x1f2/0x210 [ 778.223833] ret_from_fork+0x22/0x30 [ 778.224296] Freed by task 8842: [ 778.224800] kasan_save_stack+0x19/0x40 [ 778.224829] kasan_set_track+0x1c/0x30 [ 778.224860] kasan_set_free_info+0x1b/0x30 [ 778.224889] __kasan_slab_free+0x108/0x150 [ 778.224919] slab_free_freelist_hook+0x64/0x190 [ 778.224947] kfree+0xe2/0x650 [ 778.224982] rnbd_destroy_sess_dev+0x2fa/0x3b0 [rnbd_server] [ 778.225011] kobject_put+0xda/0x270 [ 778.225046] rnbd_srv_sess_dev_force_close+0x30/0x60 [rnbd_server] [ 778.225081] rnbd_srv_dev_session_force_close_store+0x6a/0xc0 [rnbd_server] [ 778.225111] kernfs_fop_write+0x141/0x240 [ 778.225140] vfs_write+0x142/0x4d0 [ 778.225169] ksys_write+0xc0/0x160 [ 778.225198] do_syscall_64+0x33/0x40 [ 778.225227] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 778.226506] The buggy address belongs to the object at ffff88b1d6516c00 which belongs to the cache kmalloc-512 of size 512 [ 778.227464] The buggy address is located 40 bytes inside of 512-byte region [ffff88b1d6516c00, ffff88b1d6516e00) The problem is in the sess_dev release function we call rnbd_destroy_sess_dev, and could free the sess_dev already, but we still set the keep_id in rnbd_srv_sess_dev_force_close, which lead to use after free. To fix it, move the keep_id before the sysfs removal, and cache the rnbd_srv_session for lock accessing, Fixes: 786998050cbc ("block/rnbd-srv: close a mapped device from server side.") Signed-off-by: Jack Wang Reviewed-by: Guoqing Jiang Signed-off-by: Jens Axboe commit 74acfa996b2aec2a4ea8587104c7e2f8d4c6aec2 Author: Jack Wang Date: Fri Jan 8 15:36:30 2021 +0100 block/rnbd: Select SG_POOL for RNBD_CLIENT lkp reboot following build error: drivers/block/rnbd/rnbd-clt.c: In function 'rnbd_softirq_done_fn': >> drivers/block/rnbd/rnbd-clt.c:387:2: error: implicit declaration of function 'sg_free_table_chained' [-Werror=implicit-function-declaration] 387 | sg_free_table_chained(&iu->sgt, RNBD_INLINE_SG_CNT); | ^~~~~~~~~~~~~~~~~~~~~ The reason is CONFIG_SG_POOL is not enabled in the config, to avoid such failure, select SG_POOL in Kconfig for RNBD_CLIENT. Fixes: 5a1328d0c3a7 ("block/rnbd-clt: Dynamically allocate sglist for rnbd_iu") Reported-by: kernel test robot Signed-off-by: Jack Wang Signed-off-by: Jens Axboe commit e400071a805d6229223a98899e9da8c6233704a1 Author: Filipe Laíns Date: Mon Jan 4 20:47:17 2021 +0000 HID: logitech-dj: add the G602 receiver Tested. The device gets correctly exported to userspace and I can see mouse and keyboard events. Signed-off-by: Filipe Laíns Signed-off-by: Jiri Kosina commit 2a0435df963f996ca870a2ef1cbf1773dc0ea25a Author: Stephan Gerhold Date: Thu Jan 7 17:51:31 2021 +0100 ASoC: hdmi-codec: Fix return value in hdmi_codec_set_jack() Sound is broken on the DragonBoard 410c (apq8016_sbc) since 5.10: hdmi-audio-codec hdmi-audio-codec.1.auto: ASoC: error at snd_soc_component_set_jack on hdmi-audio-codec.1.auto: -95 qcom-apq8016-sbc 7702000.sound: Failed to set jack: -95 ADV7533: ASoC: error at snd_soc_link_init on ADV7533: -95 hdmi-audio-codec hdmi-audio-codec.1.auto: ASoC: error at snd_soc_component_set_jack on hdmi-audio-codec.1.auto: -95 qcom-apq8016-sbc: probe of 7702000.sound failed with error -95 This happens because apq8016_sbc calls snd_soc_component_set_jack() on all codec DAIs and attempts to ignore failures with return code -ENOTSUPP. -ENOTSUPP is also excluded from error logging in soc_component_ret(). However, hdmi_codec_set_jack() returns -E*OP*NOTSUPP if jack detection is not supported, which is not handled in apq8016_sbc and soc_component_ret(). Make it return -ENOTSUPP instead to fix sound and silence the errors. Cc: Cheng-Yi Chiang Cc: Srinivas Kandagatla Fixes: 55c5cc63ab32 ("ASoC: hdmi-codec: Use set_jack ops to set jack") Signed-off-by: Stephan Gerhold Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/20210107165131.2535-1-stephan@gerhold.net Signed-off-by: Mark Brown commit 872f36eb0b0f4f0e3a81ea1e51a6bdf58ccfdc6e Author: Paolo Bonzini Date: Fri Jan 8 05:54:44 2021 -0500 KVM: x86: __kvm_vcpu_halt can be static Signed-off-by: Paolo Bonzini commit 774206bc03bf5daa17255b2f155d4a967e3f3314 Merge: 647daca25d24f 45ba7b195a369 Author: Paolo Bonzini Date: Fri Jan 8 05:02:40 2021 -0500 Merge tag 'kvmarm-fixes-5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 fixes for 5.11, take #1 - VM init cleanups - PSCI relay cleanups - Kill CONFIG_KVM_ARM_PMU - Fixup __init annotations - Fixup reg_to_encoding() - Fix spurious PMCR_EL0 access commit 29f95f20581c4bb4e58c1cc1cb15bff9b931cad9 Merge: 25ea8ecf4d934 a73858ef4d5e1 Author: Daniel Vetter Date: Fri Jan 8 10:39:17 2021 +0100 Merge tag 'drm-misc-fixes-2021-01-08' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes * dma-buf: fix a use-after-free * radeon: don't init the TTM page pool manually * ttm: unexport ttm_pool_{init,fini}() Signed-off-by: Daniel Vetter From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/X/gnKs52t8xUuAlE@linux-uq9g commit 25ea8ecf4d9348e07544e861714b689cadbfa4c3 Merge: 4e181dede94d3 00fd44a1a4700 Author: Daniel Vetter Date: Fri Jan 8 09:53:02 2021 +0100 Merge tag 'drm-msm-fixes-2021-01-07' of https://gitlab.freedesktop.org/drm/msm into drm-fixes A few misc fixes from Rob, mostly fallout from the locking rework that landed in the merge window, plus a few smaller things. Signed-off-by: Daniel Vetter From: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGtWMhzyD6kejmViZeZ+zfJxRvfq-R2t_zA+DcDiTxsYRQ@mail.gmail.com commit a0195f314a25582b38993bf30db11c300f4f4611 Author: Fenghua Yu Date: Thu Dec 17 14:31:19 2020 -0800 x86/resctrl: Don't move a task to the same resource group Shakeel Butt reported in [1] that a user can request a task to be moved to a resource group even if the task is already in the group. It just wastes time to do the move operation which could be costly to send IPI to a different CPU. Add a sanity check to ensure that the move operation only happens when the task is not already in the resource group. [1] https://lore.kernel.org/lkml/CALvZod7E9zzHwenzf7objzGKsdBmVwTgEJ0nPgs0LUFU3SN5Pw@mail.gmail.com/ Fixes: e02737d5b826 ("x86/intel_rdt: Add tasks files") Reported-by: Shakeel Butt Signed-off-by: Fenghua Yu Signed-off-by: Reinette Chatre Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/962ede65d8e95be793cb61102cca37f7bb018e66.1608243147.git.reinette.chatre@intel.com commit ae28d1aae48a1258bd09a6f707ebb4231d79a761 Author: Fenghua Yu Date: Thu Dec 17 14:31:18 2020 -0800 x86/resctrl: Use an IPI instead of task_work_add() to update PQR_ASSOC MSR Currently, when moving a task to a resource group the PQR_ASSOC MSR is updated with the new closid and rmid in an added task callback. If the task is running, the work is run as soon as possible. If the task is not running, the work is executed later in the kernel exit path when the kernel returns to the task again. Updating the PQR_ASSOC MSR as soon as possible on the CPU a moved task is running is the right thing to do. Queueing work for a task that is not running is unnecessary (the PQR_ASSOC MSR is already updated when the task is scheduled in) and causing system resource waste with the way in which it is implemented: Work to update the PQR_ASSOC register is queued every time the user writes a task id to the "tasks" file, even if the task already belongs to the resource group. This could result in multiple pending work items associated with a single task even if they are all identical and even though only a single update with most recent values is needed. Specifically, even if a task is moved between different resource groups while it is sleeping then it is only the last move that is relevant but yet a work item is queued during each move. This unnecessary queueing of work items could result in significant system resource waste, especially on tasks sleeping for a long time. For example, as demonstrated by Shakeel Butt in [1] writing the same task id to the "tasks" file can quickly consume significant memory. The same problem (wasted system resources) occurs when moving a task between different resource groups. As pointed out by Valentin Schneider in [2] there is an additional issue with the way in which the queueing of work is done in that the task_struct update is currently done after the work is queued, resulting in a race with the register update possibly done before the data needed by the update is available. To solve these issues, update the PQR_ASSOC MSR in a synchronous way right after the new closid and rmid are ready during the task movement, only if the task is running. If a moved task is not running nothing is done since the PQR_ASSOC MSR will be updated next time the task is scheduled. This is the same way used to update the register when tasks are moved as part of resource group removal. [1] https://lore.kernel.org/lkml/CALvZod7E9zzHwenzf7objzGKsdBmVwTgEJ0nPgs0LUFU3SN5Pw@mail.gmail.com/ [2] https://lore.kernel.org/lkml/20201123022433.17905-1-valentin.schneider@arm.com [ bp: Massage commit message and drop the two update_task_closid_rmid() variants. ] Fixes: e02737d5b826 ("x86/intel_rdt: Add tasks files") Reported-by: Shakeel Butt Reported-by: Valentin Schneider Signed-off-by: Fenghua Yu Signed-off-by: Reinette Chatre Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Reviewed-by: James Morse Reviewed-by: Valentin Schneider Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/17aa2fb38fc12ce7bb710106b3e7c7b45acb9e94.1608243147.git.reinette.chatre@intel.com commit 382811940303f7cd01d0f3dcdf432dfd89c5a98e Author: Arnd Bergmann Date: Sun Jan 3 15:03:04 2021 +0100 crypto: omap-sham - Fix link error without crypto-engine The driver was converted to use the crypto engine helper but is missing the corresponding Kconfig statement to ensure it is available: arm-linux-gnueabi-ld: drivers/crypto/omap-sham.o: in function `omap_sham_probe': omap-sham.c:(.text+0x374): undefined reference to `crypto_engine_alloc_init' arm-linux-gnueabi-ld: omap-sham.c:(.text+0x384): undefined reference to `crypto_engine_start' arm-linux-gnueabi-ld: omap-sham.c:(.text+0x510): undefined reference to `crypto_engine_exit' arm-linux-gnueabi-ld: drivers/crypto/omap-sham.o: in function `omap_sham_finish_req': omap-sham.c:(.text+0x98c): undefined reference to `crypto_finalize_hash_request' arm-linux-gnueabi-ld: omap-sham.c:(.text+0x9a0): undefined reference to `crypto_transfer_hash_request_to_engine' arm-linux-gnueabi-ld: drivers/crypto/omap-sham.o: in function `omap_sham_update': omap-sham.c:(.text+0xf24): undefined reference to `crypto_transfer_hash_request_to_engine' arm-linux-gnueabi-ld: drivers/crypto/omap-sham.o: in function `omap_sham_final': omap-sham.c:(.text+0x1020): undefined reference to `crypto_transfer_hash_request_to_engine' Fixes: 133c3d434d91 ("crypto: omap-sham - convert to use crypto engine") Signed-off-by: Arnd Bergmann Signed-off-by: Herbert Xu commit 3c02e04fd4f57130e4fa75fab6f528f7a52db9b5 Author: Kirill Tkhai Date: Thu Dec 31 00:33:18 2020 +0300 crypto: xor - Fix divide error in do_xor_speed() crypto: Fix divide error in do_xor_speed() From: Kirill Tkhai Latest (but not only latest) linux-next panics with divide error on my QEMU setup. The patch at the bottom of this message fixes the problem. xor: measuring software checksum speed divide error: 0000 [#1] PREEMPT SMP KASAN PREEMPT SMP KASAN CPU: 3 PID: 1 Comm: swapper/0 Not tainted 5.10.0-next-20201223+ #2177 RIP: 0010:do_xor_speed+0xbb/0xf3 Code: 41 ff cc 75 b5 bf 01 00 00 00 e8 3d 23 8b fe 65 8b 05 f6 49 83 7d 85 c0 75 05 e8 84 70 81 fe b8 00 00 50 c3 31 d2 48 8d 7b 10 f5 41 89 c4 e8 58 07 a2 fe 44 89 63 10 48 8d 7b 08 e8 cb 07 a2 RSP: 0000:ffff888100137dc8 EFLAGS: 00010246 RAX: 00000000c3500000 RBX: ffffffff823f0160 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000808 RDI: ffffffff823f0170 RBP: 0000000000000000 R08: ffffffff8109c50f R09: ffffffff824bb6f7 R10: fffffbfff04976de R11: 0000000000000001 R12: 0000000000000000 R13: ffff888101997000 R14: ffff888101994000 R15: ffffffff823f0178 FS: 0000000000000000(0000) GS:ffff8881f7780000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 000000000220e000 CR4: 00000000000006a0 Call Trace: calibrate_xor_blocks+0x13c/0x1c4 ? do_xor_speed+0xf3/0xf3 do_one_initcall+0xc1/0x1b7 ? start_kernel+0x373/0x373 ? unpoison_range+0x3a/0x60 kernel_init_freeable+0x1dd/0x238 ? rest_init+0xc6/0xc6 kernel_init+0x8/0x10a ret_from_fork+0x1f/0x30 ---[ end trace 5bd3c1d0b77772da ]--- Fixes: c055e3eae0f1 ("crypto: xor - use ktime for template benchmarking") Cc: Signed-off-by: Kirill Tkhai Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 2d2f6f1b4799428d160c021dd652bc3e3593945e Author: Christoph Hellwig Date: Thu Jan 7 19:36:40 2021 +0100 block: pre-initialize struct block_device in bdev_alloc_inode bdev_evict_inode and bdev_free_inode are also called for the root inode of bdevfs, for which bdev_alloc is never called. Move the zeroing o f struct block_device and the initialization of the bd_bdi field into bdev_alloc_inode to make sure they are initialized for the root inode as well. Fixes: e6cb53827ed6 ("block: initialize struct block_device in bdev_alloc") Reported-by: Alexey Kardashevskiy Tested-by: Alexey Kardashevskiy Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit eeb1b55b6e25c5f7265ff45cd050f3bc2cc423a4 Author: Jaegeuk Kim Date: Thu Jan 7 10:53:16 2021 -0800 scsi: ufs: Fix tm request when non-fatal error happens When non-fatal error like line-reset happens, ufshcd_err_handler() starts to abort tasks by ufshcd_try_to_abort_task(). When it tries to issue a task management request, we hit two warnings: WARNING: CPU: 7 PID: 7 at block/blk-core.c:630 blk_get_request+0x68/0x70 WARNING: CPU: 4 PID: 157 at block/blk-mq-tag.c:82 blk_mq_get_tag+0x438/0x46c After fixing the above warnings we hit another tm_cmd timeout which may be caused by unstable controller state: __ufshcd_issue_tm_cmd: task management cmd 0x80 timed-out Then, ufshcd_err_handler() enters full reset, and kernel gets stuck. It turned out ufshcd_print_trs() printed too many messages on console which requires CPU locks. Likewise hba->silence_err_logs, we need to avoid too verbose messages. This is actually not an error case. Link: https://lore.kernel.org/r/20210107185316.788815-3-jaegeuk@kernel.org Fixes: 69a6c269c097 ("scsi: ufs: Use blk_{get,put}_request() to allocate and free TMFs") Reviewed-by: Can Guo Signed-off-by: Jaegeuk Kim Signed-off-by: Martin K. Petersen commit 4ee7ee530bc2bae6268247988d86722c65d02a37 Author: Jaegeuk Kim Date: Thu Jan 7 10:53:15 2021 -0800 scsi: ufs: Fix livelock of ufshcd_clear_ua_wluns() When gate_work/ungate_work experience an error during hibern8_enter or exit we can livelock: ufshcd_err_handler() ufshcd_scsi_block_requests() ufshcd_reset_and_restore() ufshcd_clear_ua_wluns() -> stuck ufshcd_scsi_unblock_requests() In order to avoid this, ufshcd_clear_ua_wluns() can be called per recovery flows such as suspend/resume, link_recovery, and error_handler. Link: https://lore.kernel.org/r/20210107185316.788815-2-jaegeuk@kernel.org Fixes: 1918651f2d7e ("scsi: ufs: Clear UAC for RPMB after ufshcd resets") Reviewed-by: Can Guo Signed-off-by: Jaegeuk Kim Signed-off-by: Martin K. Petersen commit 901d01c8e50c35a182073219a38b9c6391e59144 Author: Tyrel Datwyler Date: Wed Jan 6 14:37:21 2021 -0600 scsi: ibmvfc: Fix missing cast of ibmvfc_event pointer to u64 handle Commit 2aa0102c6688 ("scsi: ibmvfc: Use correlation token to tag commands") sets the vfcFrame correlation token to the pointer handle of the associated ibmvfc_event. However, that commit failed to cast the pointer to an appropriate type which in this case is a u64. As such sparse warnings are generated for both correlation token assignments. ibmvfc.c:2375:36: sparse: incorrect type in argument 1 (different base types) ibmvfc.c:2375:36: sparse: expected unsigned long long [usertype] val ibmvfc.c:2375:36: sparse: got struct ibmvfc_event *[assigned] evt Add the appropriate u64 casts when assigning an ibmvfc_event as a correlation token. Link: https://lore.kernel.org/r/20210106203721.1054693-1-tyreld@linux.ibm.com Fixes: 2aa0102c6688 ("scsi: ibmvfc: Use correlation token to tag commands") Reported-by: kernel test robot Signed-off-by: Tyrel Datwyler Signed-off-by: Martin K. Petersen commit 5e6ddadf7637d336acaad1df1f3bcbb07f7d104d Author: Randy Dunlap Date: Tue Jan 5 20:08:22 2021 -0800 scsi: ufs: ufshcd-pltfrm depends on HAS_IOMEM Building ufshcd-pltfrm.c on arch/s390/ has a linker error since S390 does not support IOMEM, so add a dependency on HAS_IOMEM. s390-linux-ld: drivers/scsi/ufs/ufshcd-pltfrm.o: in function `ufshcd_pltfrm_init': ufshcd-pltfrm.c:(.text+0x38e): undefined reference to `devm_platform_ioremap_resource' where that devm_ function is inside an #ifdef CONFIG_HAS_IOMEM/#endif block. Link: lore.kernel.org/r/202101031125.ZEFCUiKi-lkp@intel.com Link: https://lore.kernel.org/r/20210106040822.933-1-rdunlap@infradead.org Fixes: 03b1781aa978 ("[SCSI] ufs: Add Platform glue driver for ufshcd") Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Alim Akhtar Cc: Avri Altman Cc: linux-scsi@vger.kernel.org Reported-by: kernel test robot Signed-off-by: Randy Dunlap Signed-off-by: Martin K. Petersen commit b112036535eda34460677ea883eaecc3a45a435d Author: Arnd Bergmann Date: Tue Jan 5 00:41:04 2021 +0100 scsi: megaraid_sas: Fix MEGASAS_IOC_FIRMWARE regression Phil Oester reported that a fix for a possible buffer overrun that I sent caused a regression that manifests in this output: Event Message: A PCI parity error was detected on a component at bus 0 device 5 function 0. Severity: Critical Message ID: PCI1308 The original code tried to handle the sense data pointer differently when using 32-bit 64-bit DMA addressing, which would lead to a 32-bit dma_addr_t value of 0x11223344 to get stored 32-bit kernel: 44 33 22 11 ?? ?? ?? ?? 64-bit LE kernel: 44 33 22 11 00 00 00 00 64-bit BE kernel: 00 00 00 00 44 33 22 11 or a 64-bit dma_addr_t value of 0x1122334455667788 to get stored as 32-bit kernel: 88 77 66 55 ?? ?? ?? ?? 64-bit kernel: 88 77 66 55 44 33 22 11 In my patch, I tried to ensure that the same value is used on both 32-bit and 64-bit kernels, and picked what seemed to be the most sensible combination, storing 32-bit addresses in the first four bytes (as 32-bit kernels already did), and 64-bit addresses in eight consecutive bytes (as 64-bit kernels already did), but evidently this was incorrect. Always storing the dma_addr_t pointer as 64-bit little-endian, i.e. initializing the second four bytes to zero in case of 32-bit addressing, apparently solved the problem for Phil, and is consistent with what all 64-bit little-endian machines did before. I also checked in the history that in previous versions of the code, the pointer was always in the first four bytes without padding, and that previous attempts to fix 64-bit user space, big-endian architectures and 64-bit DMA were clearly flawed and seem to have introduced made this worse. Link: https://lore.kernel.org/r/20210104234137.438275-1-arnd@kernel.org Fixes: 381d34e376e3 ("scsi: megaraid_sas: Check user-provided offsets") Fixes: 107a60dd71b5 ("scsi: megaraid_sas: Add support for 64bit consistent DMA") Fixes: 94cd65ddf4d7 ("[SCSI] megaraid_sas: addded support for big endian architecture") Fixes: 7b2519afa1ab ("[SCSI] megaraid_sas: fix 64 bit sense pointer truncation") Reported-by: Phil Oester Tested-by: Phil Oester Signed-off-by: Arnd Bergmann Signed-off-by: Martin K. Petersen commit 0b2894cd0fdf8ccc8a9b4e28563db9ac0ecb62b2 Author: Adrian Hunter Date: Mon Jan 4 17:50:26 2021 +0200 scsi: docs: ABI: sysfs-driver-ufs: Add DeepSleep power mode Update sysfs documentation for addition of DeepSleep power mode. Link: https://lore.kernel.org/r/20210104155026.16417-1-adrian.hunter@intel.com Fixes: fe1d4c2ebcae ("scsi: ufs: Add DeepSleep feature") Signed-off-by: Adrian Hunter Signed-off-by: Martin K. Petersen commit 220efcf9caf755bdf92892afd37484cb6859e0d2 Merge: 3545454c7801e 5b0bb12c58ac7 Author: Jakub Kicinski Date: Thu Jan 7 19:13:29 2021 -0800 Merge tag 'mlx5-fixes-2021-01-07' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5 fixes 2021-01-07 * tag 'mlx5-fixes-2021-01-07' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux: net/mlx5e: Fix memleak in mlx5e_create_l2_table_groups net/mlx5e: Fix two double free cases net/mlx5: Release devlink object if adev fails net/mlx5e: ethtool, Fix restriction of autoneg with 56G net/mlx5e: In skb build skip setting mark in switchdev mode net/mlx5: E-Switch, fix changing vf VLANID net/mlx5e: Fix SWP offsets when vlan inserted by driver net/mlx5e: CT: Use per flow counter when CT flow accounting is enabled net/mlx5: Use port_num 1 instead of 0 when delete a RoCE address net/mlx5e: Add missing capability check for uplink follow net/mlx5: Check if lag is supported before creating one ==================== Link: https://lore.kernel.org/r/20210107202845.470205-1-saeed@kernel.org Signed-off-by: Jakub Kicinski commit 3545454c7801e391b0d966f82c98614d45394770 Author: Aleksander Jan Bajkowski Date: Thu Jan 7 20:58:18 2021 +0100 net: dsa: lantiq_gswip: Exclude RMII from modes that report 1 GbE Exclude RMII from modes that report 1 GbE support. Reduced MII supports up to 100 MbE. Fixes: 14fceff4771e ("net: dsa: Add Lantiq / Intel DSA driver for vrx200") Signed-off-by: Aleksander Jan Bajkowski Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20210107195818.3878-1-olek2@wp.pl Signed-off-by: Jakub Kicinski commit 286e95eed12e218c0b73f95e3ff805db4b1cd9b5 Merge: d7083427489a4 f9c4845385c8f Author: Jakub Kicinski Date: Thu Jan 7 18:54:08 2021 -0800 Merge branch 's390-qeth-fixes-2021-01-07' Julian Wiedmann says: ==================== s390/qeth: fixes 2021-01-07 This brings two locking fixes for the device control path. Also one fix for a path where our .ndo_features_check() attempts to access a non-existent L2 header. ==================== Link: https://lore.kernel.org/r/20210107172442.1737-1-jwi@linux.ibm.com Signed-off-by: Jakub Kicinski commit f9c4845385c8f6631ebd5dddfb019ea7a285fba4 Author: Julian Wiedmann Date: Thu Jan 7 18:24:42 2021 +0100 s390/qeth: fix L2 header access in qeth_l3_osa_features_check() ip_finish_output_gso() may call .ndo_features_check() even before the skb has a L2 header. This conflicts with qeth_get_ip_version()'s attempt to inspect the L2 header via vlan_eth_hdr(). Switch to vlan_get_protocol(), as already used further down in the common qeth_features_check() path. Fixes: f13ade199391 ("s390/qeth: run non-offload L3 traffic over common xmit path") Signed-off-by: Julian Wiedmann Signed-off-by: Jakub Kicinski commit b41b554c1ee75070a14c02a88496b1f231c7eacc Author: Julian Wiedmann Date: Thu Jan 7 18:24:41 2021 +0100 s390/qeth: fix locking for discipline setup / removal Due to insufficient locking, qeth_core_set_online() and qeth_dev_layer2_store() can run in parallel, both attempting to load & setup the discipline (and stepping on each other toes along the way). A similar race can also occur between qeth_core_remove_device() and qeth_dev_layer2_store(). Access to .discipline is meant to be protected by the discipline_mutex, so add/expand the locking in qeth_core_remove_device() and qeth_core_set_online(). Adjust the locking in qeth_l*_remove_device() accordingly, as it's now handled by the callers in a consistent manner. Based on an initial patch by Ursula Braun. Fixes: 9dc48ccc68b9 ("qeth: serialize sysfs-triggered device configurations") Signed-off-by: Julian Wiedmann Reviewed-by: Alexandra Winter Signed-off-by: Jakub Kicinski commit 0b9902c1fcc59ba75268386c0420a554f8844168 Author: Julian Wiedmann Date: Thu Jan 7 18:24:40 2021 +0100 s390/qeth: fix deadlock during recovery When qeth_dev_layer2_store() - holding the discipline_mutex - waits inside qeth_l*_remove_device() for a qeth_do_reset() thread to complete, we can hit a deadlock if qeth_do_reset() concurrently calls qeth_set_online() and thus tries to aquire the discipline_mutex. Move the discipline_mutex locking outside of qeth_set_online() and qeth_set_offline(), and turn the discipline into a parameter so that callers understand the dependency. To fix the deadlock, we can now relax the locking: As already established, qeth_l*_remove_device() waits for qeth_do_reset() to complete. So qeth_do_reset() itself is under no risk of having card->discipline ripped out while it's running, and thus doesn't need to take the discipline_mutex. Fixes: 9dc48ccc68b9 ("qeth: serialize sysfs-triggered device configurations") Signed-off-by: Julian Wiedmann Reviewed-by: Alexandra Winter Signed-off-by: Jakub Kicinski commit d7083427489a494cfef552321666774436514ccb Merge: ac7996d680d8b a5c9ca76a1c61 Author: Jakub Kicinski Date: Thu Jan 7 18:47:21 2021 -0800 Merge branch 'nexthop-various-fixes' Ido Schimmel says: ==================== nexthop: Various fixes This series contains various fixes for the nexthop code. The bugs were uncovered during the development of resilient nexthop groups. Patches #1-#2 fix the error path of nexthop_create_group(). I was not able to trigger these bugs with current code, but it is possible with the upcoming resilient nexthop groups code which adds a user controllable memory allocation further in the function. Patch #3 fixes wrong validation of netlink attributes. Patch #4 fixes wrong invocation of mausezahn in a selftest. ==================== Link: https://lore.kernel.org/r/20210107144824.1135691-1-idosch@idosch.org Signed-off-by: Jakub Kicinski commit a5c9ca76a1c61fb5e4c35de8eb25aa925b03c9e4 Author: Ido Schimmel Date: Thu Jan 7 16:48:24 2021 +0200 selftests: fib_nexthops: Fix wrong mausezahn invocation For IPv6 traffic, mausezahn needs to be invoked with '-6'. Otherwise an error is returned: # ip netns exec me mausezahn veth1 -B 2001:db8:101::2 -A 2001:db8:91::1 -c 0 -t tcp "dp=1-1023, flags=syn" Failed to set source IPv4 address. Please check if source is set to a valid IPv4 address. Invalid command line parameters! Fixes: 7c741868ceab ("selftests: Add torture tests to nexthop tests") Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Reviewed-by: David Ahern Signed-off-by: Jakub Kicinski commit b19218b27f3477316d296e8bcf4446aaf017aa69 Author: Petr Machata Date: Thu Jan 7 16:48:23 2021 +0200 nexthop: Bounce NHA_GATEWAY in FDB nexthop groups The function nh_check_attr_group() is called to validate nexthop groups. The intention of that code seems to have been to bounce all attributes above NHA_GROUP_TYPE except for NHA_FDB. However instead it bounces all these attributes except when NHA_FDB attribute is present--then it accepts them. NHA_FDB validation that takes place before, in rtm_to_nh_config(), already bounces NHA_OIF, NHA_BLACKHOLE, NHA_ENCAP and NHA_ENCAP_TYPE. Yet further back, NHA_GROUPS and NHA_MASTER are bounced unconditionally. But that still leaves NHA_GATEWAY as an attribute that would be accepted in FDB nexthop groups (with no meaning), so long as it keeps the address family as unspecified: # ip nexthop add id 1 fdb via 127.0.0.1 # ip nexthop add id 10 fdb via default group 1 The nexthop code is still relatively new and likely not used very broadly, and the FDB bits are newer still. Even though there is a reproducer out there, it relies on an improbable gateway arguments "via default", "via all" or "via any". Given all this, I believe it is OK to reformulate the condition to do the right thing and bounce NHA_GATEWAY. Fixes: 38428d68719c ("nexthop: support for fdb ecmp nexthops") Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: Jakub Kicinski commit 7b01e53eee6dce7a8a6736e06b99b68cd0cc7a27 Author: Ido Schimmel Date: Thu Jan 7 16:48:22 2021 +0200 nexthop: Unlink nexthop group entry in error path In case of error, remove the nexthop group entry from the list to which it was previously added. Fixes: 430a049190de ("nexthop: Add support for nexthop groups") Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Reviewed-by: David Ahern Signed-off-by: Jakub Kicinski commit 07e61a979ca4dddb3661f59328b3cd109f6b0070 Author: Ido Schimmel Date: Thu Jan 7 16:48:21 2021 +0200 nexthop: Fix off-by-one error in error path A reference was not taken for the current nexthop entry, so do not try to put it in the error path. Fixes: 430a049190de ("nexthop: Add support for nexthop groups") Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Reviewed-by: David Ahern Signed-off-by: Jakub Kicinski commit ac7996d680d8b4a51bb99bbdcee3dc838b985498 Author: Colin Ian King Date: Thu Jan 7 12:39:16 2021 +0000 octeontx2-af: fix memory leak of lmac and lmac->name Currently the error return paths don't kfree lmac and lmac->name leading to some memory leaks. Fix this by adding two error return paths that kfree these objects Addresses-Coverity: ("Resource leak") Fixes: 1463f382f58d ("octeontx2-af: Add support for CGX link management") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20210107123916.189748-1-colin.king@canonical.com Signed-off-by: Jakub Kicinski commit 643437b996bac9267785e0bd528332e2d5811067 Author: Damien Le Moal Date: Sun Dec 13 22:50:36 2020 +0900 riscv: Enable interrupts during syscalls with M-Mode When running is M-Mode (no MMU config), MPIE does not get set. This results in all syscalls being executed with interrupts disabled as handle_exception never sets SR_IE as it always sees SR_PIE being cleared. Fix this by always force enabling interrupts in handle_syscall when CONFIG_RISCV_M_MODE is enabled. Signed-off-by: Damien Le Moal Reviewed-by: Palmer Dabbelt Signed-off-by: Palmer Dabbelt commit 1f1496a923b6ba16679074fe77100e1b53cdb880 Author: Damien Le Moal Date: Sun Dec 13 22:50:35 2020 +0900 riscv: Fix sifive serial driver Setup the port uartclk in sifive_serial_probe() so that the base baud rate is correctly printed during device probe instead of always showing "0". I.e. the probe message is changed from 38000000.serial: ttySIF0 at MMIO 0x38000000 (irq = 1, base_baud = 0) is a SiFive UART v0 to the correct: 38000000.serial: ttySIF0 at MMIO 0x38000000 (irq = 1, base_baud = 115200) is a SiFive UART v0 Signed-off-by: Damien Le Moal Reviewed-by: Palmer Dabbelt Acked-by: Palmer Dabbelt Signed-off-by: Palmer Dabbelt commit 11f4c2e940e2f317c9d8fb5a79702f2a4a02ff98 Author: Damien Le Moal Date: Sun Dec 13 22:50:34 2020 +0900 riscv: Fix kernel time_init() If of_clk_init() is not called in time_init(), clock providers defined in the system device tree are not initialized, resulting in failures for other devices to initialize due to missing clocks. Similarly to other architectures and to the default kernel time_init() implementation, call of_clk_init() before executing timer_probe() in time_init(). Signed-off-by: Damien Le Moal Acked-by: Stephen Boyd Reviewed-by: Palmer Dabbelt Signed-off-by: Palmer Dabbelt commit cf7b2ae4d70432fa94ebba3fbaab825481ae7189 Author: Andreas Schwab Date: Mon Dec 21 23:52:00 2020 +0100 riscv: return -ENOSYS for syscall -1 Properly return -ENOSYS for syscall -1 instead of leaving the return value uninitialized. This fixes the strace teststuite. Fixes: 5340627e3fe0 ("riscv: add support for SECCOMP and SECCOMP_FILTER") Cc: stable@vger.kernel.org Signed-off-by: Andreas Schwab Reviewed-by: Tycho Andersen Signed-off-by: Palmer Dabbelt commit 85bd6055e3529e9b193b4460f5b13a47da354027 Merge: 0565ff56cd054 15ef6b0e30b35 Author: Jakub Kicinski Date: Thu Jan 7 17:06:05 2021 -0800 Merge branch 'bug-fixes-for-chtls-driver' Ayush Sawal says: ==================== Bug fixes for chtls driver patch 1: Fix hardware tid leak. patch 2: Remove invalid set_tcb call. patch 3: Fix panic when route to peer not configured. patch 4: Avoid unnecessary freeing of oreq pointer. patch 5: Replace skb_dequeue with skb_peek. patch 6: Added a check to avoid NULL pointer dereference patch. patch 7: Fix chtls resources release sequence. ==================== Link: https://lore.kernel.org/r/20210106042912.23512-1-ayush.sawal@chelsio.com Signed-off-by: Jakub Kicinski commit 15ef6b0e30b354253e2c10b3836bc59767eb162b Author: Ayush Sawal Date: Wed Jan 6 09:59:12 2021 +0530 chtls: Fix chtls resources release sequence CPL_ABORT_RPL is sent after releasing the resources by calling chtls_release_resources(sk); and chtls_conn_done(sk); eventually causing kernel panic. Fixing it by calling release in appropriate order. Fixes: cc35c88ae4db ("crypto : chtls - CPL handler definition") Signed-off-by: Vinay Kumar Yadav Signed-off-by: Ayush Sawal Signed-off-by: Jakub Kicinski commit eade1e0a4fb31d48eeb1589d9bb859ae4dd6181d Author: Ayush Sawal Date: Wed Jan 6 09:59:11 2021 +0530 chtls: Added a check to avoid NULL pointer dereference In case of server removal lookup_stid() may return NULL pointer, which is used as listen_ctx. So added a check before accessing this pointer. Fixes: cc35c88ae4db ("crypto : chtls - CPL handler definition") Signed-off-by: Vinay Kumar Yadav Signed-off-by: Ayush Sawal Signed-off-by: Jakub Kicinski commit a84b2c0d5fa23da6d6c8c0d5f5c93184a2744d3e Author: Ayush Sawal Date: Wed Jan 6 09:59:10 2021 +0530 chtls: Replace skb_dequeue with skb_peek The skb is unlinked twice, one in __skb_dequeue in function chtls_reset_synq() and another in cleanup_syn_rcv_conn(). So in this patch using skb_peek() instead of __skb_dequeue(), so that unlink will be handled only in cleanup_syn_rcv_conn(). Fixes: cc35c88ae4db ("crypto : chtls - CPL handler definition") Signed-off-by: Vinay Kumar Yadav Signed-off-by: Ayush Sawal Signed-off-by: Jakub Kicinski commit f8d15d29d6e6b32704c8fce9229716ca145a0de2 Author: Ayush Sawal Date: Wed Jan 6 09:59:09 2021 +0530 chtls: Avoid unnecessary freeing of oreq pointer In chtls_pass_accept_request(), removing the chtls_reqsk_free() call to avoid oreq freeing twice. Here oreq is the pointer to struct request_sock. Fixes: cc35c88ae4db ("crypto : chtls - CPL handler definition") Signed-off-by: Rohit Maheshwari Signed-off-by: Ayush Sawal Signed-off-by: Jakub Kicinski commit 5a5fac9966bb6d513198634b0b1357be7e8447d2 Author: Ayush Sawal Date: Wed Jan 6 09:59:08 2021 +0530 chtls: Fix panic when route to peer not configured If route to peer is not configured, we might get non tls devices from dst_neigh_lookup() which is invalid, adding a check to avoid it. Fixes: cc35c88ae4db ("crypto : chtls - CPL handler definition") Signed-off-by: Rohit Maheshwari Signed-off-by: Ayush Sawal Signed-off-by: Jakub Kicinski commit 827d329105bfde6701f0077e34a09c4a86e27145 Author: Ayush Sawal Date: Wed Jan 6 09:59:07 2021 +0530 chtls: Remove invalid set_tcb call At the time of SYN_RECV, connection information is not initialized at FW, updating tcb flag over uninitialized connection causes adapter crash. We don't need to update the flag during SYN_RECV state, so avoid this. Fixes: cc35c88ae4db ("crypto : chtls - CPL handler definition") Signed-off-by: Rohit Maheshwari Signed-off-by: Ayush Sawal Signed-off-by: Jakub Kicinski commit 717df0f4cdc9044c415431a3522b3e9ccca5b4a3 Author: Ayush Sawal Date: Wed Jan 6 09:59:06 2021 +0530 chtls: Fix hardware tid leak send_abort_rpl() is not calculating cpl_abort_req_rss offset and ends up sending wrong TID with abort_rpl WR causng tid leaks. Replaced send_abort_rpl() with chtls_send_abort_rpl() as it is redundant. Fixes: cc35c88ae4db ("crypto : chtls - CPL handler definition") Signed-off-by: Rohit Maheshwari Signed-off-by: Ayush Sawal Signed-off-by: Jakub Kicinski commit 491b1bea00040233b791dc8fea1608ac6a7003bc Author: Peter Chen Date: Fri Jan 8 08:35:30 2021 +0800 MAINTAINERS: update Peter Chen's email address Using kernel.org as my email address. Signed-off-by: Peter Chen commit c4cc3b1de31b76f425ce92854783709386f9e1b7 Merge: f5e6c330254ae 67a5a68013056 Author: Linus Torvalds Date: Thu Jan 7 16:03:19 2021 -0800 Merge tag 'gcc-plugins-v5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull gcc-plugins fix from Kees Cook: "Bump c++ standard version for latest GCC versions (Valdis Kletnieks)" * tag 'gcc-plugins-v5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: gcc-plugins: fix gcc 11 indigestion with plugins... commit 647daca25d24fb6eadc7b6cd680ad3e6eed0f3d5 Author: Tom Lendacky Date: Mon Jan 4 14:20:01 2021 -0600 KVM: SVM: Add support for booting APs in an SEV-ES guest Typically under KVM, an AP is booted using the INIT-SIPI-SIPI sequence, where the guest vCPU register state is updated and then the vCPU is VMRUN to begin execution of the AP. For an SEV-ES guest, this won't work because the guest register state is encrypted. Following the GHCB specification, the hypervisor must not alter the guest register state, so KVM must track an AP/vCPU boot. Should the guest want to park the AP, it must use the AP Reset Hold exit event in place of, for example, a HLT loop. First AP boot (first INIT-SIPI-SIPI sequence): Execute the AP (vCPU) as it was initialized and measured by the SEV-ES support. It is up to the guest to transfer control of the AP to the proper location. Subsequent AP boot: KVM will expect to receive an AP Reset Hold exit event indicating that the vCPU is being parked and will require an INIT-SIPI-SIPI sequence to awaken it. When the AP Reset Hold exit event is received, KVM will place the vCPU into a simulated HLT mode. Upon receiving the INIT-SIPI-SIPI sequence, KVM will make the vCPU runnable. It is again up to the guest to then transfer control of the AP to the proper location. To differentiate between an actual HLT and an AP Reset Hold, a new MP state is introduced, KVM_MP_STATE_AP_RESET_HOLD, which the vCPU is placed in upon receiving the AP Reset Hold exit event. Additionally, to communicate the AP Reset Hold exit event up to userspace (if needed), a new exit reason is introduced, KVM_EXIT_AP_RESET_HOLD. A new x86 ops function is introduced, vcpu_deliver_sipi_vector, in order to accomplish AP booting. For VMX, vcpu_deliver_sipi_vector is set to the original SIPI delivery function, kvm_vcpu_deliver_sipi_vector(). SVM adds a new function that, for non SEV-ES guests, invokes the original SIPI delivery function, kvm_vcpu_deliver_sipi_vector(), but for SEV-ES guests, implements the logic above. Signed-off-by: Tom Lendacky Message-Id: Signed-off-by: Paolo Bonzini commit f2c7ef3ba9556d62a7e2bb23b563c6510007d55c Author: Maxim Levitsky Date: Thu Jan 7 11:38:51 2021 +0200 KVM: nSVM: cancel KVM_REQ_GET_NESTED_STATE_PAGES on nested vmexit It is possible to exit the nested guest mode, entered by svm_set_nested_state prior to first vm entry to it (e.g due to pending event) if the nested run was not pending during the migration. In this case we must not switch to the nested msr permission bitmap. Also add a warning to catch similar cases in the future. Fixes: a7d5c7ce41ac1 ("KVM: nSVM: delay MSR permission processing to first nested VM run") Signed-off-by: Maxim Levitsky Message-Id: <20210107093854.882483-2-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit 56fe28de8c4f0167275c411c0daa5709e9a47bd7 Author: Maxim Levitsky Date: Thu Jan 7 11:38:54 2021 +0200 KVM: nSVM: mark vmcb as dirty when forcingly leaving the guest mode We overwrite most of vmcb fields while doing so, so we must mark it as dirty. Signed-off-by: Maxim Levitsky Message-Id: <20210107093854.882483-5-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit 81f76adad560dfc39cb9625cf1e00a7e2b7b88df Author: Maxim Levitsky Date: Thu Jan 7 11:38:52 2021 +0200 KVM: nSVM: correctly restore nested_run_pending on migration The code to store it on the migration exists, but no code was restoring it. One of the side effects of fixing this is that L1->L2 injected events are no longer lost when migration happens with nested run pending. Signed-off-by: Maxim Levitsky Message-Id: <20210107093854.882483-3-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit c0dba6e46825716db15c4b3a8f05c85b4a59edda Author: Ben Gardon Date: Wed Jan 6 16:19:35 2021 -0800 KVM: x86/mmu: Clarify TDP MMU page list invariants The tdp_mmu_roots and tdp_mmu_pages in struct kvm_arch should only contain pages with tdp_mmu_page set to true. tdp_mmu_pages should not contain any pages with a non-zero root_count and tdp_mmu_roots should only contain pages with a positive root_count, unless a thread holds the MMU lock and is in the process of modifying the list. Various functions expect these invariants to be maintained, but they are not explictily documented. Add to the comments on both fields to document the above invariants. Signed-off-by: Ben Gardon Message-Id: <20210107001935.3732070-2-bgardon@google.com> Signed-off-by: Paolo Bonzini commit a889ea54b3daa63ee1463dc19ed699407d61458b Author: Ben Gardon Date: Wed Jan 6 16:19:34 2021 -0800 KVM: x86/mmu: Ensure TDP MMU roots are freed after yield Many TDP MMU functions which need to perform some action on all TDP MMU roots hold a reference on that root so that they can safely drop the MMU lock in order to yield to other threads. However, when releasing the reference on the root, there is a bug: the root will not be freed even if its reference count (root_count) is reduced to 0. To simplify acquiring and releasing references on TDP MMU root pages, and to ensure that these roots are properly freed, move the get/put operations into another TDP MMU root iterator macro. Moving the get/put operations into an iterator macro also helps simplify control flow when a root does need to be freed. Note that using the list_for_each_entry_safe macro would not have been appropriate in this situation because it could keep a pointer to the next root across an MMU lock release + reacquire, during which time that root could be freed. Reported-by: Maciej S. Szmigiero Suggested-by: Paolo Bonzini Fixes: faaf05b00aec ("kvm: x86/mmu: Support zapping SPTEs in the TDP MMU") Fixes: 063afacd8730 ("kvm: x86/mmu: Support invalidate range MMU notifier for TDP MMU") Fixes: a6a0b05da9f3 ("kvm: x86/mmu: Support dirty logging for the TDP MMU") Fixes: 14881998566d ("kvm: x86/mmu: Support disabling dirty logging for the tdp MMU") Signed-off-by: Ben Gardon Message-Id: <20210107001935.3732070-1-bgardon@google.com> Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit 88bf56d04bc3564542049ec4ec168a8b60d0b48c Author: Lai Jiangshan Date: Thu Dec 17 23:41:18 2020 +0800 kvm: check tlbs_dirty directly In kvm_mmu_notifier_invalidate_range_start(), tlbs_dirty is used as: need_tlb_flush |= kvm->tlbs_dirty; with need_tlb_flush's type being int and tlbs_dirty's type being long. It means that tlbs_dirty is always used as int and the higher 32 bits is useless. We need to check tlbs_dirty in a correct way and this change checks it directly without propagating it to need_tlb_flush. Note: it's _extremely_ unlikely this neglecting of higher 32 bits can cause problems in practice. It would require encountering tlbs_dirty on a 4 billion count boundary, and KVM would need to be using shadow paging or be running a nested guest. Cc: stable@vger.kernel.org Fixes: a4ee1ca4a36e ("KVM: MMU: delay flush all tlbs on sync_page path") Signed-off-by: Lai Jiangshan Message-Id: <20201217154118.16497-1-jiangshanlai@gmail.com> Signed-off-by: Paolo Bonzini commit de7860c8a388e4cb757c7da26889b9e2641ffcfe Author: Stephen Zhang Date: Fri Dec 18 15:51:37 2020 +0800 KVM: x86: change in pv_eoi_get_pending() to make code more readable Signed-off-by: Stephen Zhang Message-Id: <1608277897-1932-1-git-send-email-stephenzhangzsd@gmail.com> Signed-off-by: Paolo Bonzini commit 0565ff56cd0543bacb5d3ec2ee0f979813ea1841 Merge: 704a0f858ed33 6f02b540d7597 Author: Jakub Kicinski Date: Thu Jan 7 15:10:26 2021 -0800 Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Alexei Starovoitov says: ==================== pull-request: bpf 2021-01-07 We've added 4 non-merge commits during the last 10 day(s) which contain a total of 4 files changed, 14 insertions(+), 7 deletions(-). The main changes are: 1) Fix task_iter bug caused by the merge conflict resolution, from Yonghong. 2) Fix resolve_btfids for multiple type hierarchies, from Jiri. * https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: bpftool: Fix compilation failure for net.o with older glibc tools/resolve_btfids: Warn when having multiple IDs for single type bpf: Fix a task_iter bug caused by a merge conflict resolution selftests/bpf: Fix a compile error for BPF_F_BPRM_SECUREEXEC ==================== Link: https://lore.kernel.org/r/20210107221555.64959-1-alexei.starovoitov@gmail.com Signed-off-by: Jakub Kicinski commit 7f0c1f1a8277de906a242a6ef907476149f006de Author: Sean Christopherson Date: Wed Jan 6 10:29:16 2021 -0800 MAINTAINERS: Really update email address for Sean Christopherson Use my @google.com address in MAINTAINERS, somehow only the .mailmap entry was added when the original update patch was applied. Fixes: c2b1209d852f ("MAINTAINERS: Update email address for Sean Christopherson") Cc: kvm@vger.kernel.org Reported-by: Nathan Chancellor Signed-off-by: Sean Christopherson Message-Id: <20210106182916.331743-1-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 2f80d502d627f30257ba7e3655e71c373b7d1a5a Author: Paolo Bonzini Date: Tue Dec 22 05:20:43 2020 -0500 KVM: x86: fix shift out of bounds reported by UBSAN Since we know that e >= s, we can reassociate the left shift, changing the shifted number from 1 to 2 in exchange for decreasing the right hand side by 1. Reported-by: syzbot+e87846c48bf72bc85311@syzkaller.appspotmail.com Signed-off-by: Paolo Bonzini commit b268b6f0bd36322358accb15c45683a9e1220231 Author: Andrew Jones Date: Fri Dec 18 15:17:34 2020 +0100 KVM: selftests: Implement perf_test_util more conventionally It's not conventional C to put non-inline functions in header files. Create a source file for the functions instead. Also reduce the amount of globals and rename the functions to something less generic. Reviewed-by: Ben Gardon Reviewed-by: Peter Xu Signed-off-by: Andrew Jones Message-Id: <20201218141734.54359-4-drjones@redhat.com> Signed-off-by: Paolo Bonzini commit 1133e17ea7c9929ff7b90e81d8926f9e870748e9 Author: Andrew Jones Date: Fri Dec 18 15:17:33 2020 +0100 KVM: selftests: Use vm_create_with_vcpus in create_vm Reviewed-by: Ben Gardon Signed-off-by: Andrew Jones Message-Id: <20201218141734.54359-3-drjones@redhat.com> Signed-off-by: Paolo Bonzini commit e42ac777d661e878c3b9bac56df11e226cab3010 Author: Andrew Jones Date: Fri Dec 18 15:17:32 2020 +0100 KVM: selftests: Factor out guest mode code demand_paging_test, dirty_log_test, and dirty_log_perf_test have redundant guest mode code. Factor it out. Also, while adding a new include, remove the ones we don't need. Reviewed-by: Ben Gardon Reviewed-by: Peter Xu Signed-off-by: Andrew Jones Message-Id: <20201218141734.54359-2-drjones@redhat.com> Signed-off-by: Paolo Bonzini commit 52782d5b63725a6c4bf642557c83507430064110 Author: Uros Bizjak Date: Sun Dec 20 21:03:39 2020 +0100 KVM/SVM: Remove leftover __svm_vcpu_run prototype from svm.c Commit 16809ecdc1e8a moved __svm_vcpu_run the prototype to svm.h, but forgot to remove the original from svm.c. Fixes: 16809ecdc1e8a ("KVM: SVM: Provide an updated VMRUN invocation for SEV-ES guests") Cc: Tom Lendacky Cc: Paolo Bonzini Signed-off-by: Uros Bizjak Message-Id: <20201220200339.65115-1-ubizjak@gmail.com> Signed-off-by: Paolo Bonzini commit f65cf84ee769767536dc367acc9568ddb6e4c9f4 Author: Nathan Chancellor Date: Fri Dec 18 23:37:11 2020 -0700 KVM: SVM: Add register operand to vmsave call in sev_es_vcpu_load When using LLVM's integrated assembler (LLVM_IAS=1) while building x86_64_defconfig + CONFIG_KVM=y + CONFIG_KVM_AMD=y, the following build error occurs: $ make LLVM=1 LLVM_IAS=1 arch/x86/kvm/svm/sev.o arch/x86/kvm/svm/sev.c:2004:15: error: too few operands for instruction asm volatile(__ex("vmsave") : : "a" (__sme_page_pa(sd->save_area)) : "memory"); ^ arch/x86/kvm/svm/sev.c:28:17: note: expanded from macro '__ex' #define __ex(x) __kvm_handle_fault_on_reboot(x) ^ ./arch/x86/include/asm/kvm_host.h:1646:10: note: expanded from macro '__kvm_handle_fault_on_reboot' "666: \n\t" \ ^ :2:2: note: instantiated into assembly here vmsave ^ 1 error generated. This happens because LLVM currently does not support calling vmsave without the fixed register operand (%rax for 64-bit and %eax for 32-bit). This will be fixed in LLVM 12 but the kernel currently supports LLVM 10.0.1 and newer so this needs to be handled. Add the proper register using the _ASM_AX macro, which matches the vmsave call in vmenter.S. Fixes: 861377730aa9 ("KVM: SVM: Provide support for SEV-ES vCPU loading") Link: https://reviews.llvm.org/D93524 Link: https://github.com/ClangBuiltLinux/linux/issues/1216 Signed-off-by: Nathan Chancellor Message-Id: <20201219063711.3526947-1-natechancellor@gmail.com> Signed-off-by: Paolo Bonzini commit bc351f07260533cc1b3987339551decd00ddd52e Merge: d45f89f7437d0 9aa418792f5f1 Author: Paolo Bonzini Date: Thu Jan 7 18:06:52 2021 -0500 Merge branch 'kvm-master' into kvm-next Fixes to get_mmio_spte, destined to 5.10 stable branch. commit 9aa418792f5f11ef5d6f72265e1f8ae07efd5784 Author: Sean Christopherson Date: Thu Dec 17 16:31:39 2020 -0800 KVM: x86/mmu: Optimize not-present/MMIO SPTE check in get_mmio_spte() Check only the terminal leaf for a "!PRESENT || MMIO" SPTE when looking for reserved bits on valid, non-MMIO SPTEs. The get_walk() helpers terminate their walks if a not-present or MMIO SPTE is encountered, i.e. the non-terminal SPTEs have already been verified to be regular SPTEs. This eliminates an extra check-and-branch in a relatively hot loop. Signed-off-by: Sean Christopherson Message-Id: <20201218003139.2167891-5-seanjc@google.com> Signed-off-by: Paolo Bonzini commit dde81f9477d018a96fba991c5928c6ab8cc109f8 Author: Sean Christopherson Date: Thu Dec 17 16:31:38 2020 -0800 KVM: x86/mmu: Use raw level to index into MMIO walks' sptes array Bump the size of the sptes array by one and use the raw level of the SPTE to index into the sptes array. Using the SPTE level directly improves readability by eliminating the need to reason out why the level is being adjusted when indexing the array. The array is on the stack and is not explicitly initialized; bumping its size is nothing more than a superficial adjustment to the stack frame. Signed-off-by: Sean Christopherson Message-Id: <20201218003139.2167891-4-seanjc@google.com> Reviewed-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit 39b4d43e6003cee51cd119596d3c33d0449eb44c Author: Sean Christopherson Date: Thu Dec 17 16:31:37 2020 -0800 KVM: x86/mmu: Get root level from walkers when retrieving MMIO SPTE Get the so called "root" level from the low level shadow page table walkers instead of manually attempting to calculate it higher up the stack, e.g. in get_mmio_spte(). When KVM is using PAE shadow paging, the starting level of the walk, from the callers perspective, is not the CR3 root but rather the PDPTR "root". Checking for reserved bits from the CR3 root causes get_mmio_spte() to consume uninitialized stack data due to indexing into sptes[] for a level that was not filled by get_walk(). This can result in false positives and/or negatives depending on what garbage happens to be on the stack. Opportunistically nuke a few extra newlines. Fixes: 95fb5b0258b7 ("kvm: x86/mmu: Support MMIO in the TDP MMU") Reported-by: Richard Herbert Cc: Ben Gardon Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20201218003139.2167891-3-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 2aa078932ff6c66bf10cc5b3144440dbfa7d813d Author: Sean Christopherson Date: Thu Dec 17 16:31:36 2020 -0800 KVM: x86/mmu: Use -1 to flag an undefined spte in get_mmio_spte() Return -1 from the get_walk() helpers if the shadow walk doesn't fill at least one spte, which can theoretically happen if the walk hits a not-present PDPTR. Returning the root level in such a case will cause get_mmio_spte() to return garbage (uninitialized stack data). In practice, such a scenario should be impossible as KVM shouldn't get a reserved-bit page fault with a not-present PDPTR. Note, using mmu->root_level in get_walk() is wrong for other reasons, too, but that's now a moot point. Fixes: 95fb5b0258b7 ("kvm: x86/mmu: Support MMIO in the TDP MMU") Cc: Ben Gardon Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20201218003139.2167891-2-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 704a0f858ed33a80adc714add5dec061c2de3280 Merge: f3562f5e00bba bb4cc1a18856a Author: Jakub Kicinski Date: Thu Jan 7 14:42:36 2021 -0800 Merge branch 'net-fix-netfilter-defrag-ip-tunnel-pmtu-blackhole' Florian Westphal says: ==================== net: fix netfilter defrag/ip tunnel pmtu blackhole Christian Perle reported a PMTU blackhole due to unexpected interaction between the ip defragmentation that comes with connection tracking and ip tunnels. Unfortunately setting 'nopmtudisc' on the tunnel breaks the test scenario even without netfilter. Christinas setup looks like this: +--------+ +---------+ +--------+ |Router A|-------|Wanrouter|-------|Router B| | |.IPIP..| |..IPIP.| | +--------+ +---------+ +--------+ / mtu 1400 \ / \ +--------+ +--------+ |Client A| |Client B| +--------+ +--------+ MTU is 1500 everywhere, except on Router A to Wanrouter and Wanrouter to Router B. Router A and Router B use IPIP tunnel interfaces to tunnel traffic between Client A and Client B over WAN. Client A sends a 1400 byte UDP datagram to Client B. This packet gets encapsulated in the IPIP tunnel. This works, packet is received on client B. When conntrack (or anything else that forces ip defragmentation) is enabled on Router A, the packet gets dropped on Router A after encapsulation because they exceed the link MTU. Setting the 'nopmtudisc' flag on the IPIP tunnel makes things worse, no packets pass even in the no-netfilter scenario. Patch one is a reproducer script for selftest infra. Patch two is a fix for 'nopmtudisc' behaviour so ip_tunnel will send an icmp error to Client A. This allows 'nopmtudisc' tunnel to forward the UDP datagrams. Patch three enables ip refragmentation for all reassembled packets, just like ipv6. ==================== Link: https://lore.kernel.org/r/20210105231523.622-1-fw@strlen.de Signed-off-by: Jakub Kicinski commit bb4cc1a18856a73f0ff5137df0c2a31f4c50f6cf Author: Florian Westphal Date: Wed Jan 6 00:15:23 2021 +0100 net: ip: always refragment ip defragmented packets Conntrack reassembly records the largest fragment size seen in IPCB. However, when this gets forwarded/transmitted, fragmentation will only be forced if one of the fragmented packets had the DF bit set. In that case, a flag in IPCB will force fragmentation even if the MTU is large enough. This should work fine, but this breaks with ip tunnels. Consider client that sends a UDP datagram of size X to another host. The client fragments the datagram, so two packets, of size y and z, are sent. DF bit is not set on any of these packets. Middlebox netfilter reassembles those packets back to single size-X packet, before routing decision. packet-size-vs-mtu checks in ip_forward are irrelevant, because DF bit isn't set. At output time, ip refragmentation is skipped as well because x is still smaller than the mtu of the output device. If ttransmit device is an ip tunnel, the packet size increases to x+overhead. Also, tunnel might be configured to force DF bit on outer header. In this case, packet will be dropped (exceeds MTU) and an ICMP error is generated back to sender. But sender already respects the announced MTU, all the packets that it sent did fit the announced mtu. Force refragmentation as per original sizes unconditionally so ip tunnel will encapsulate the fragments instead. The only other solution I see is to place ip refragmentation in the ip_tunnel code to handle this case. Fixes: d6b915e29f4ad ("ip_fragment: don't forward defragmented DF packet") Reported-by: Christian Perle Signed-off-by: Florian Westphal Acked-by: Pablo Neira Ayuso Signed-off-by: Jakub Kicinski commit 50c661670f6a3908c273503dfa206dfc7aa54c07 Author: Florian Westphal Date: Wed Jan 6 00:15:22 2021 +0100 net: fix pmtu check in nopmtudisc mode For some reason ip_tunnel insist on setting the DF bit anyway when the inner header has the DF bit set, EVEN if the tunnel was configured with 'nopmtudisc'. This means that the script added in the previous commit cannot be made to work by adding the 'nopmtudisc' flag to the ip tunnel configuration. Doing so breaks connectivity even for the without-conntrack/netfilter scenario. When nopmtudisc is set, the tunnel will skip the mtu check, so no icmp error is sent to client. Then, because inner header has DF set, the outer header gets added with DF bit set as well. IP stack then sends an error to itself because the packet exceeds the device MTU. Fixes: 23a3647bc4f93 ("ip_tunnels: Use skb-len to PMTU check.") Cc: Stefano Brivio Signed-off-by: Florian Westphal Acked-by: Pablo Neira Ayuso Signed-off-by: Jakub Kicinski commit 9e7a67dee27902fedab880b9af909bd4acd0fba9 Author: Florian Westphal Date: Wed Jan 6 00:15:21 2021 +0100 selftests: netfilter: add selftest for ipip pmtu discovery with enabled connection tracking Convert Christians bug description into a reproducer. Cc: Shuah Khan Reported-by: Christian Perle Signed-off-by: Florian Westphal Acked-by: Pablo Neira Ayuso Signed-off-by: Jakub Kicinski commit bb12433bf56e76789c6b08b36c546f745a6aa6e1 Author: Vineet Gupta Date: Wed Jan 6 12:34:36 2021 -0800 ARC: unbork 5.11 bootup: fix snafu in _TIF_NOTIFY_SIGNAL handling Linux 5.11.rcX was failing to boot on ARC HSDK board. Turns out we have a couple of issues, this being the first one, and I'm to blame as I didn't pay attention during review. TIF_NOTIFY_SIGNAL support requires checking multiple TIF_* bits in kernel return code path. Old code only needed to check a single bit so BBIT0 worked. New code needs to check multiple bits so AND instruction. So needs to use bit mask variant _TIF_SIGPENDING Cc: Jens Axboe Fixes: 53855e12588743ea128 ("arc: add support for TIF_NOTIFY_SIGNAL") Link: https://github.com/foss-for-synopsys-dwc-arc-processors/linux/issues/34 Signed-off-by: Vineet Gupta commit 9d54ee78aef62c29b15ae2f58a70b1d1cd63a8f0 Author: Bhaskar Chowdhury Date: Thu Jan 7 18:26:10 2021 +0530 docs: admin-guide: bootconfig: Fix feils to fails s/feils/fails/p Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20210107125610.1576368-1-unixbhaskar@gmail.com Signed-off-by: Jonathan Corbet commit 25942e5ecbac33918ec2f0869ca9a374dbb023f2 Author: Randy Dunlap Date: Thu Dec 31 20:08:31 2020 -0800 Documentation/admin-guide: kernel-parameters: hyphenate comma-separated Hyphenate "comma separated" when it is used as a compound adjective. hyphenated. Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/r/20210101040831.4148-1-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit a734a7235ef3768dd3c9b7034f663ae6b260375f Author: Jonathan Neuschäfer Date: Fri Jan 1 22:14:47 2021 +0100 docs: binfmt-misc: Fix .rst formatting "name below" is not part of the /proc path and should not be formatted in monospace. "doesn``t" is rendered in HTML with a double backtick. Revert it back to "doesn't". Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20210101211447.1021412-1-j.neuschaefer@gmx.net Signed-off-by: Jonathan Corbet commit 0ef597c3ac49a62e1a2c1c10f88dd76fde1e1636 Author: Miguel Ojeda Date: Tue Jan 5 06:58:15 2021 +0100 docs: remove mention of ENABLE_MUST_CHECK We removed ENABLE_MUST_CHECK in 196793946264 ("Compiler Attributes: remove CONFIG_ENABLE_MUST_CHECK"), so let's remove docs' mentions. At the same time, fix the outdated text related to ENABLE_WARN_DEPRECATED that wasn't removed in 3337d5cfe5e08 ("configs: get rid of obsolete CONFIG_ENABLE_WARN_DEPRECATED"). Finally, reflow the paragraph. Signed-off-by: Miguel Ojeda Reviewed-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Link: https://lore.kernel.org/r/20210105055815.GA5173@kernel.org Signed-off-by: Jonathan Corbet commit f3562f5e00bbae2a6b292941ec76a9140aa3b7dd Author: Lukas Bulwahn Date: Wed Jan 6 17:17:35 2021 +0100 docs: octeontx2: tune rst markup Commit 80b9414832a1 ("docs: octeontx2: Add Documentation for NPA health reporters") added new documentation with improper formatting for rst, and caused a few new warnings for make htmldocs in octeontx2.rst:169--202. Tune markup and formatting for better presentation in the HTML view. Signed-off-by: Lukas Bulwahn Acked-by: Randy Dunlap Acked-by: George Cherian Link: https://lore.kernel.org/r/20210106161735.21751-1-lukas.bulwahn@gmail.com Signed-off-by: Jakub Kicinski commit f2bc3af6353cb2a33dfa9d270d999d839eef54cb Author: Tom Rix Date: Tue Dec 29 18:46:53 2020 -0800 RDMA/ocrdma: Fix use after free in ocrdma_dealloc_ucontext_pd() In ocrdma_dealloc_ucontext_pd() uctx->cntxt_pd is assigned to the variable pd and then after uctx->cntxt_pd is freed, the variable pd is passed to function _ocrdma_dealloc_pd() which dereferences pd directly or through its call to ocrdma_mbx_dealloc_pd(). Reorder the free using the variable pd. Cc: stable@vger.kernel.org Fixes: 21a428a019c9 ("RDMA: Handle PD allocations by IB/core") Link: https://lore.kernel.org/r/20201230024653.1516495-1-trix@redhat.com Signed-off-by: Tom Rix Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 5b0bb12c58ac7d22e05b5bfdaa30a116c8c32e32 Author: Dinghao Liu Date: Mon Dec 21 19:27:31 2020 +0800 net/mlx5e: Fix memleak in mlx5e_create_l2_table_groups When mlx5_create_flow_group() fails, ft->g should be freed just like when kvzalloc() fails. The caller of mlx5e_create_l2_table_groups() does not catch this issue on failure, which leads to memleak. Fixes: 33cfaaa8f36f ("net/mlx5e: Split the main flow steering table") Signed-off-by: Dinghao Liu Reviewed-by: Leon Romanovsky Signed-off-by: Saeed Mahameed commit 7a6eb072a9548492ead086f3e820e9aac71c7138 Author: Dinghao Liu Date: Mon Dec 28 16:48:40 2020 +0800 net/mlx5e: Fix two double free cases mlx5e_create_ttc_table_groups() frees ft->g on failure of kvzalloc(), but such failure will be caught by its caller in mlx5e_create_ttc_table() and ft->g will be freed again in mlx5e_destroy_flow_table(). The same issue also occurs in mlx5e_create_ttc_table_groups(). Set ft->g to NULL after kfree() to avoid double free. Fixes: 7b3722fa9ef6 ("net/mlx5e: Support RSS for GRE tunneled packets") Fixes: 33cfaaa8f36f ("net/mlx5e: Split the main flow steering table") Signed-off-by: Dinghao Liu Reviewed-by: Leon Romanovsky Signed-off-by: Saeed Mahameed commit 4d8be21112f6fa2ac4b8a13f35866ad65b11d48c Author: Leon Romanovsky Date: Mon Jan 4 10:08:36 2021 +0200 net/mlx5: Release devlink object if adev fails Add missed freeing previously allocated devlink object. Fixes: a925b5e309c9 ("net/mlx5: Register mlx5 devices to auxiliary virtual bus") Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed commit b1c0aca3d3ddeebeec57ada9c2df9ed647939249 Author: Aya Levin Date: Sun Dec 27 16:33:19 2020 +0200 net/mlx5e: ethtool, Fix restriction of autoneg with 56G Prior to this patch, configuring speed to 50G with autoneg off over devices supporting 50G per lane failed. Support for 50G per lane introduced a new set of link-modes, on which driver always performed a speed validation as if only legacy link-modes were configured. Fix driver speed validation to force setting autoneg over 56G only if in legacy link-mode. Fixes: 3d7cadae51f1 ("net/mlx5e: ethtool, Fix analysis of speed setting") Signed-off-by: Aya Levin Reviewed-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed commit e13ed0ac064dd6ee964155ba9fdc2f3c3785934c Author: Maor Dickman Date: Mon Dec 14 13:53:03 2020 +0200 net/mlx5e: In skb build skip setting mark in switchdev mode sop_drop_qpn field in the cqe is used by two features, in SWITCHDEV mode to restore the chain id in case of a miss and in LEGACY mode to support skbedit mark action. In build RX skb, the skb mark field is set regardless of the configured mode which cause a corruption of the mark field in case of switchdev mode. Fix by overriding the mark value back to 0 in the representor tc update skb flow. Fixes: 8f1e0b97cc70 ("net/mlx5: E-Switch, Mark miss packets with new chain id mapping") Signed-off-by: Maor Dickman Reviewed-by: Raed Salem Reviewed-by: Oz Shlomo Signed-off-by: Saeed Mahameed commit 25c904b59aaf4816337acd415514b0c47715f604 Author: Alaa Hleihel Date: Mon Jan 4 12:54:40 2021 +0200 net/mlx5: E-Switch, fix changing vf VLANID Adding vf VLANID for the first time, or after having cleared previously defined VLANID works fine, however, attempting to change an existing vf VLANID clears the rules on the firmware, but does not add new rules for the new vf VLANID. Fix this by changing the logic in function esw_acl_egress_lgcy_setup() so that it will always configure egress rules. Fixes: ea651a86d468 ("net/mlx5: E-Switch, Refactor eswitch egress acl codes") Signed-off-by: Alaa Hleihel Signed-off-by: Saeed Mahameed commit b544011f0e58ce43c40105468d6dc67f980a0c7a Author: Moshe Shemesh Date: Fri Nov 13 06:06:28 2020 +0200 net/mlx5e: Fix SWP offsets when vlan inserted by driver In case WQE includes inline header the vlan is inserted by driver even if vlan offload is set. On geneve over vlan interface where software parser is used the SWP offsets should be updated according to the added vlan. Fixes: e3cfc7e6b7bd ("net/mlx5e: TX, Add geneve tunnel stateless offload support") Signed-off-by: Moshe Shemesh Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit eed38eeee734756596e2cc163bdc7dac3be501b1 Author: Oz Shlomo Date: Mon Dec 7 08:15:18 2020 +0000 net/mlx5e: CT: Use per flow counter when CT flow accounting is enabled Connection counters may be shared for both directions when the counter is used for connection aging purposes. However, if TC flow accounting is enabled then a unique counter is required per direction. Instantiate a unique counter per direction if the conntrack accounting extension is enabled. Use a shared counter when the connection accounting extension is disabled. Fixes: 1edae2335adf ("net/mlx5e: CT: Use the same counter for both directions") Signed-off-by: Oz Shlomo Reported-by: Marcelo Ricardo Leitner Reviewed-by: Roi Dayan Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed commit 0f2dcade69f2af56b74bce432e48ff3957830ce2 Author: Mark Zhang Date: Mon Dec 14 03:38:40 2020 +0200 net/mlx5: Use port_num 1 instead of 0 when delete a RoCE address In multi-port mode, FW reports syndrome 0x2ea48 (invalid vhca_port_number) if the port_num is not 1 or 2. Fixes: 80f09dfc237f ("net/mlx5: Eswitch, enable RoCE loopback traffic") Signed-off-by: Mark Zhang Reviewed-by: Maor Gottlieb Signed-off-by: Saeed Mahameed commit 9c9be85f6b59d80efe4705109c0396df18d4e11d Author: Aya Levin Date: Tue Nov 24 22:16:23 2020 +0200 net/mlx5e: Add missing capability check for uplink follow Expose firmware indication that it supports setting eswitch uplink state to follow (follow the physical link). Condition setting the eswitch uplink admin-state with this capability bit. Older FW may not support the uplink state setting. Fixes: 7d0314b11cdd ("net/mlx5e: Modify uplink state on interface up/down") Signed-off-by: Aya Levin Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit abf8ef953a43e74aac3c54a94975f21bd483199b Author: Mark Zhang Date: Mon Nov 30 04:38:11 2020 +0200 net/mlx5: Check if lag is supported before creating one This patch fixes a memleak issue by preventing to create a lag and add PFs if lag is not supported. comm “python3”, pid 349349, jiffies 4296985507 (age 1446.976s) 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: [<000000005b216ae7>] mlx5_lag_add+0x1d5/0×3f0 [mlx5_core] [<000000000445aa55>] mlx5e_nic_enable+0x66/0×1b0 [mlx5_core] [<00000000c56734c3>] mlx5e_attach_netdev+0x16e/0×200 [mlx5_core] [<0000000030439d1f>] mlx5e_attach+0x5c/0×90 [mlx5_core] [<0000000018fd8615>] mlx5e_add+0x1a4/0×410 [mlx5_core] [<0000000068bc504b>] mlx5_add_device+0x72/0×120 [mlx5_core] [<000000009fce51f9>] mlx5_register_device+0x77/0xb0 [mlx5_core] [<00000000d0d81ff3>] mlx5_load_one+0xc58/0×1eb0 [mlx5_core] [<0000000045077adc>] init_one+0x3ea/0×920 [mlx5_core] [<0000000043287674>] pci_device_probe+0xcd/0×150 [<00000000dafd3279>] really_probe+0x1c9/0×4b0 [<00000000f06bdd84>] driver_probe_device+0x5d/0×140 [<00000000e3d508b6>] device_driver_attach+0x4f/0×60 [<0000000084fba0f0>] bind_store+0xbf/0×120 [<00000000bf6622b3>] kernfs_fop_write+0x114/0×1b0 Fixes: 9b412cc35f00 ("net/mlx5e: Add LAG warning if bond slave is not lag master") Signed-off-by: Mark Zhang Reviewed-by: Leon Romanovsky Reviewed-by: Maor Gottlieb Signed-off-by: Saeed Mahameed commit f5e6c330254ae691f6d7befe61c786eb5056007e Merge: a1a7b4f32433e 6170d077bf92c Author: Linus Torvalds Date: Thu Jan 7 12:21:32 2021 -0800 Merge tag 'spi-fix-v5.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "A couple of core fixes here, both to do with handling of drivers which don't report their maximum speed since we factored some of the handling for transfer speeds out into the core in the previous release. There's also some driver specific fixes, including a relatively large set for some races around timeouts in spi-geni-qcom" * tag 'spi-fix-v5.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: fix the divide by 0 error when calculating xfer waiting time spi: Fix the clamping of spi->max_speed_hz spi: altera: fix return value for altera_spi_txrx() spi: stm32: FIFO threshold level - fix align packet size spi: spi-geni-qcom: Print an error when we timeout setting the CS spi: spi-geni-qcom: Don't try to set CS if an xfer is pending spi: spi-geni-qcom: Fail new xfers if xfer/cancel/abort pending spi: spi-geni-qcom: Fix geni_spi_isr() NULL dereference in timeout case commit a1a7b4f32433e91f0fff32cde534eadc67242298 Merge: fc37784dc71bc 36836f5b377b5 Author: Linus Torvalds Date: Thu Jan 7 12:18:22 2021 -0800 Merge tag 'regulator-fix-v5.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "A few minor driver specific fixes, mostly DT bindings document bits, plus a new device ID" * tag 'regulator-fix-v5.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: qcom-rpmh: add QCOM_COMMAND_DB dependency regulator: qcom-rpmh-regulator: correct hfsmps515 definition dt-bindings: regulator: qcom,rpmh-regulator: add pm8009 revision regulator: bd718x7: Add enable times regulator: pf8x00: Use specific compatible strings for devices commit a306aba9c8d869b1fdfc8ad9237f1ed718ea55e6 Author: Dinghao Liu Date: Sat Dec 26 15:42:48 2020 +0800 RDMA/usnic: Fix memleak in find_free_vf_and_create_qp_grp If usnic_ib_qp_grp_create() fails at the first call, dev_list will not be freed on error, which leads to memleak. Fixes: e3cf00d0a87f ("IB/usnic: Add Cisco VIC low-level hardware driver") Link: https://lore.kernel.org/r/20201226074248.2893-1-dinghao.liu@zju.edu.cn Signed-off-by: Dinghao Liu Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 384b77fd48fd683a82760bc88bef8611cba997fc Author: Amanoel Dawod Date: Sat Dec 26 18:58:40 2020 -0500 Fonts: font_ter16x32: Update font with new upstream Terminus release This is just a maintenance patch to update font_ter16x32.c with changes and minor fixes added in new upstream Terminus v4.49. >From release notes of new version 4.49, this brings: - Altered ascii grave in some sizes to be more useful as a back quote. - Fixed 21B5, added 21B2 and 21B3. Just as my initial submission of the font, above changes were obtained from new ter-i32b.psf font source. Terminus font sources are available for download at SourceForge: https://sourceforge.net/projects/terminus-font/files/terminus-font-4.49/ Simply running `make` in source directory will build the .psf font files. Signed-off-by: Amanoel Dawod Link: https://lore.kernel.org/r/20201226235840.26290-1-kernel@amanoeldawod.com Signed-off-by: Greg Kroah-Hartman commit 5316a7c0130acf09bfc8bb0092407006010fcccc Author: Sean Tranchetti Date: Tue Jan 5 16:22:26 2021 -0800 tools: selftests: add test for changing routes with PTMU exceptions Adds new 2 new tests to the PTMU script: pmtu_ipv4/6_route_change. These tests explicitly test for a recently discovered problem in the IPv6 routing framework where PMTU exceptions were not properly released when replacing a route via "ip route change ...". After creating PMTU exceptions, the route from the device A to R1 will be replaced with a new route, then device A will be deleted. If the PMTU exceptions were properly cleaned up by the kernel, this device deletion will succeed. Otherwise, the unregistration of the device will stall, and messages such as the following will be logged in dmesg: unregister_netdevice: waiting for veth_A-R1 to become free. Usage count = 4 Signed-off-by: Sean Tranchetti Reviewed-by: David Ahern Link: https://lore.kernel.org/r/1609892546-11389-2-git-send-email-stranche@quicinc.com Signed-off-by: Jakub Kicinski commit d8f5c29653c3f6995e8979be5623d263e92f6b86 Author: Sean Tranchetti Date: Tue Jan 5 16:22:25 2021 -0800 net: ipv6: fib: flush exceptions when purging route Route removal is handled by two code paths. The main removal path is via fib6_del_route() which will handle purging any PMTU exceptions from the cache, removing all per-cpu copies of the DST entry used by the route, and releasing the fib6_info struct. The second removal location is during fib6_add_rt2node() during a route replacement operation. This path also calls fib6_purge_rt() to handle cleaning up the per-cpu copies of the DST entries and releasing the fib6_info associated with the older route, but it does not flush any PMTU exceptions that the older route had. Since the older route is removed from the tree during the replacement, we lose any way of accessing it again. As these lingering DSTs and the fib6_info struct are holding references to the underlying netdevice struct as well, unregistering that device from the kernel can never complete. Fixes: 2b760fcf5cfb3 ("ipv6: hook up exception table to store dst cache") Signed-off-by: Sean Tranchetti Reviewed-by: David Ahern Link: https://lore.kernel.org/r/1609892546-11389-1-git-send-email-stranche@quicinc.com Signed-off-by: Jakub Kicinski commit fc37784dc71bc9dd3a00a2f01906b3966e4034f2 Merge: 71c061d244381 f6bcb4c7f3669 Author: Linus Torvalds Date: Thu Jan 7 11:57:56 2021 -0800 Merge tag 'regmap-fix-v5.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap fixes from Mark Brown: "A couple of small fixes for leaks when attaching a device to a preexisting regmap" * tag 'regmap-fix-v5.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: debugfs: Fix a reversed if statement in regmap_debugfs_init() regmap: debugfs: Fix a memory leak when calling regmap_attach_dev commit afded6d83aa7b35dab675c730528109cc58d6847 Author: Andy Shevchenko Date: Mon Dec 28 20:43:13 2020 +0200 misc: pvpanic: Check devm_ioport_map() for NULL Inconveniently devm_ioport_map() and devm_ioremap_resource() return errors differently, i.e. former uses simply NULL pointer, while the latter an error pointer. Due to this, we have to check each of them separately. Fixes: f104060813fe ("misc: pvpanic: Combine ACPI and platform drivers") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201228184313.57610-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit c8c748fb83bd052502f35471101d61d8c3648c86 Merge: 1f685e6adbbe3 6ee49118f87cf Author: Jakub Kicinski Date: Thu Jan 7 11:08:08 2021 -0800 Merge tag 'linux-can-fixes-for-5.11-20210107' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2021-01-07 The first patch is by me for the m_can driver and removes an erroneous m_can_clk_stop() from the driver's unregister function. The second patch targets the tcan4x5x driver, is by me, and fixes the bit timing constant parameters. The next two patches are by me, target the mcp251xfd driver, and fix a race condition in the optimized TEF path (which was added in net-next for v5.11). The similar code in the RX path is changed to look the same, although it doesn't suffer from the race condition. A patch by Lad Prabhakar updates the description and help text for the rcar CAN driver to reflect all supported SoCs. In the last patch Sriram Dash transfers the maintainership of the m_can driver to Pankaj Sharma. * tag 'linux-can-fixes-for-5.11-20210107' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can: MAINTAINERS: Update MCAN MMIO device driver maintainer can: rcar: Kconfig: update help description for CAN_RCAR config can: mcp251xfd: mcp251xfd_handle_rxif_ring(): first increment RX tail pointer in HW, then in driver can: mcp251xfd: mcp251xfd_handle_tefif(): fix TEF vs. TX race condition can: tcan4x5x: fix bittiming const, use common bittiming from m_can driver can: m_can: m_can_class_unregister(): remove erroneous m_can_clk_stop() ==================== Link: https://lore.kernel.org/r/20210107103451.183477-1-mkl@pengutronix.de Signed-off-by: Jakub Kicinski commit 3c638cdb8ecc0442552156e0fed8708dd2c7f35b Author: Leon Romanovsky Date: Wed Dec 16 12:07:53 2020 +0200 RDMA/restrack: Don't treat as an error allocation ID wrapping xa_alloc_cyclic() call returns positive number if ID allocation succeeded but wrapped. It is not an error, so normalize the "ret" variable to zero as marker of not-an-error. drivers/infiniband/core/restrack.c:261 rdma_restrack_add() warn: 'ret' can be either negative or positive Fixes: fd47c2f99f04 ("RDMA/restrack: Convert internal DB from hash to XArray") Link: https://lore.kernel.org/r/20201216100753.1127638-1-leon@kernel.org Reported-by: Dan Carpenter Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 04b1ecb6a4844cf347a1c0d7eb9b63b5eddbfeff Merge: 04a6a536bc3fd 2b59787a223b7 Author: Jens Axboe Date: Thu Jan 7 10:57:54 2021 -0700 Merge tag 'nvme-5.11-2021-01-07' of git://git.infradead.org/nvme into block-5.11 Pull NVMe updates from Christoph: "nvme updates for 5.11: - fix a race in the nvme-tcp send code (Sagi Grimberg) - fix a list corruption in an nvme-rdma error path (Israel Rukshin) - avoid a possible double fetch in nvme-pci (Lalithambika Krishnakumar) - add the susystem NQN quirk for a Samsung driver (Gopal Tiwari) - fix two compiler warnings in nvme-fcloop (James Smart) - don't call sleeping functions from irq context in nvme-fc (James Smart) - remove an unused argument (Max Gurtovoy) - remove unused exports (Minwoo Im)" * tag 'nvme-5.11-2021-01-07' of git://git.infradead.org/nvme: nvme: remove the unused status argument from nvme_trace_bio_complete nvmet-rdma: Fix list_del corruption on queue establishment failure nvme: unexport functions with no external caller nvme: avoid possible double fetch in handling CQE nvme-tcp: Fix possible race of io_work and direct send nvme-pci: mark Samsung PM1725a as IGNORE_DEV_SUBNQN nvme-fcloop: Fix sscanf type and list_first_entry_or_null warnings nvme-fc: avoid calling _nvme_fc_abort_outstanding_ios from interrupt context commit 7b62275507232f01f66d3e7d05c77bbd9009b726 Merge: 91bc156817a3c 1f092d1c88196 Author: Takashi Iwai Date: Thu Jan 7 18:51:39 2021 +0100 Merge tag 'asoc-fix-v5.11-rc2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v5.11 A collection of mostly driver specific fixes, plus a maintainership update for TI and a fix for DAPM driver removal paths. commit 00fd44a1a4700718d5d962432b55c09820f7e709 Author: Konrad Dybcio Date: Mon Jan 4 20:30:41 2021 +0100 drm/msm: Only enable A6xx LLCC code on A6xx Using this code on A5xx (and probably older too) causes a smmu bug. Fixes: 474dadb8b0d5 ("drm/msm/a6xx: Add support for using system cache(LLC)") Signed-off-by: Konrad Dybcio Tested-by: AngeloGioacchino Del Regno Reviewed-by: Jordan Crouse Reviewed-by: Sai Prakash Ranjan Signed-off-by: Rob Clark commit c4151604f0603d5700072183a05828ff87d764e4 Author: Lukas Bulwahn Date: Mon Dec 21 06:13:20 2020 +0100 cpufreq: intel_pstate: remove obsolete functions percent_fp() was used in intel_pstate_pid_reset(), which was removed in commit 9d0ef7af1f2d ("cpufreq: intel_pstate: Do not use PID-based P-state selection") and hence, percent_fp() is unused since then. percent_ext_fp() was last used in intel_pstate_update_perf_limits(), which was refactored in commit 1a4fe38add8b ("cpufreq: intel_pstate: Remove max/min fractions to limit performance"), and hence, percent_ext_fp() is unused since then. make CC=clang W=1 points us those unused functions: drivers/cpufreq/intel_pstate.c:79:23: warning: unused function 'percent_fp' [-Wunused-function] static inline int32_t percent_fp(int percent) ^ drivers/cpufreq/intel_pstate.c:94:23: warning: unused function 'percent_ext_fp' [-Wunused-function] static inline int32_t percent_ext_fp(int percent) ^ Remove those obsolete functions. Signed-off-by: Lukas Bulwahn Reviewed-by: Nathan Chancellor Signed-off-by: Rafael J. Wysocki commit 3f7759e7b7585a0bffda06d4eddc6b0b850ef6c3 Author: Iskren Chernev Date: Wed Dec 30 17:29:43 2020 +0200 drm/msm: Add modparam to allow vram carveout Using the GPU with a VRAM Carveout is a security vulnerability. Nevertheless it is sometimes required, especially when no IOMMU implementation is available for a certain platform. Signed-off-by: Iskren Chernev Signed-off-by: Rob Clark commit d863f0c7b536288e2bd40cbc01c10465dd226b11 Author: Craig Tatlor Date: Wed Dec 30 17:29:42 2020 +0200 drm/msm: Call msm_init_vram before binding the gpu vram.size is needed when binding a gpu without an iommu and is defined in msm_init_vram(), so run that before binding it. Signed-off-by: Craig Tatlor Reviewed-by: Brian Masney Tested-by: Alexey Minnekhanov Signed-off-by: Rob Clark commit 2b5f09cadfc576817c0450e01d454f750909b103 Author: Kuogee Hsieh Date: Fri Dec 18 09:53:40 2020 -0800 drm/msm/dp: postpone irq_hpd event during connection pending state irq_hpd event can only be executed at connected state. Therefore irq_hpd event should be postponed if it happened at connection pending state. This patch also make sure both link rate and lane are valid before start link training. Signed-off-by: Kuogee Hsieh Signed-off-by: Rob Clark commit 3f7bddaf5d5a83aa2eb1e6d72db221d3ec43c813 Author: Bard Liao Date: Tue Jan 5 17:11:46 2021 +0800 device property: add description of fwnode cases There are only four valid fwnode cases which are - primary --> secondary --> -ENODEV - primary --> NULL - secondary --> -ENODEV - NULL dev->fwnode should be converted between the 4 cases above no matter how/when set_primary_fwnode() and set_secondary_fwnode() are called. Describe it in the code so people will keep it in mind. Signed-off-by: Bard Liao Reviewed-by: Andy Shevchenko Reviewed-by: Heikki Krogerus [ rjw: Comment edit ] Signed-off-by: Rafael J. Wysocki commit 47f4469970d8861bc06d2d4d45ac8200ff07c693 Author: Bard Liao Date: Tue Jan 5 17:11:45 2021 +0800 Revert "device property: Keep secondary firmware node secondary by type" While commit d5dcce0c414f ("device property: Keep secondary firmware node secondary by type") describes everything correct in its commit message, the change it made does the opposite and original commit c15e1bdda436 ("device property: Fix the secondary firmware node handling in set_primary_fwnode()") was fully correct. Revert the former one here and improve documentation in the next patch. Fixes: d5dcce0c414f ("device property: Keep secondary firmware node secondary by type") Signed-off-by: Bard Liao Reviewed-by: Andy Shevchenko Reviewed-by: Heikki Krogerus Cc: 5.10+ # 5.10+ Signed-off-by: Rafael J. Wysocki commit 240bdc605e6a9d0309bd003de3413f6f729eca18 Author: Peter Robinson Date: Tue Dec 29 11:17:59 2020 +0000 ACPI: Update Kconfig help text for items that are no longer modular The CONTAINER and HOTPLUG_MEMORY options mention modules but are bool only, so if selected are always built in. Drop the help text about modules. Signed-off-by: Peter Robinson Signed-off-by: Rafael J. Wysocki commit ee61cfd955a64a58ed35cbcfc54068fcbd486945 Author: Shawn Guo Date: Thu Dec 31 19:35:25 2020 +0800 ACPI: scan: add stub acpi_create_platform_device() for !CONFIG_ACPI It adds a stub acpi_create_platform_device() for !CONFIG_ACPI build, so that caller doesn't have to deal with !CONFIG_ACPI build issue. Reported-by: kernel test robot Signed-off-by: Shawn Guo Signed-off-by: Rafael J. Wysocki commit aa7a1bb02bb44399be69b0a1cbb6495d9eec29fc Author: Rafael J. Wysocki Date: Tue Jan 5 19:19:18 2021 +0100 ACPI: PM: s2idle: Drop unused local variables and related code Two local variables in drivers/acpi/x86/s2idle.c are never read, so drop them along with the code updating their values (in vain). Fixes: fef98671194b ("ACPI: PM: s2idle: Move x86-specific code to the x86 directory") Signed-off-by: Rafael J. Wysocki commit 943bdd0cecad06da8392a33093230e30e501eccc Author: Colin Ian King Date: Tue Jan 5 10:19:57 2021 +0000 cpufreq: powernow-k8: pass policy rather than use cpufreq_cpu_get() Currently there is an unlikely case where cpufreq_cpu_get() returns a NULL policy and this will cause a NULL pointer dereference later on. Fix this by passing the policy to transition_frequency_fidvid() from the caller and hence eliminating the need for the cpufreq_cpu_get() and cpufreq_cpu_put(). Thanks to Viresh Kumar for suggesting the fix. Addresses-Coverity: ("Dereference null return") Fixes: b43a7ffbf33b ("cpufreq: Notify all policy->cpus in cpufreq_notify_transition()") Suggested-by: Viresh Kumar Signed-off-by: Colin Ian King Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 17ffd35809c34b9564edb10727d02eb62958ba5c Author: Rafael J. Wysocki Date: Tue Jan 5 19:20:29 2021 +0100 cpufreq: intel_pstate: Use HWP capabilities in intel_cpufreq_adjust_perf() If turbo P-states cannot be used, either due to the configuration of the processor, or because intel_pstate is not allowed to used them, the maximum available P-state with HWP enabled corresponds to the HWP_CAP.GUARANTEED value which is not static. It can be adjusted by an out-of-band agent or during an Intel Speed Select performance level change, so long as it remains less than or equal to HWP_CAP.MAX. However, if turbo P-states cannot be used, intel_cpufreq_adjust_perf() always uses pstate.max_pstate (set during the initialization of the driver only) as the maximum available P-state, so it may miss a change of the HWP_CAP.GUARANTEED value. Prevent that from happening by modifyig intel_cpufreq_adjust_perf() to always read the "guaranteed" and "maximum turbo" performance levels from the cached HWP_CAP value. Fixes: a365ab6b9dfb ("cpufreq: intel_pstate: Implement the ->adjust_perf() callback") Signed-off-by: Rafael J. Wysocki Acked-by: Srinivas Pandruvada commit 04a6a536bc3fd1436fc78c546c6b3ecdccbfaf6d Author: Satya Tangirala Date: Thu Dec 24 04:49:54 2020 +0000 fs: Fix freeze_bdev()/thaw_bdev() accounting of bd_fsfreeze_sb freeze/thaw_bdev() currently use bdev->bd_fsfreeze_count to infer whether or not bdev->bd_fsfreeze_sb is valid (it's valid iff bd_fsfreeze_count is non-zero). thaw_bdev() doesn't nullify bd_fsfreeze_sb. But this means a freeze_bdev() call followed by a thaw_bdev() call can leave bd_fsfreeze_sb with a non-null value, while bd_fsfreeze_count is zero. If freeze_bdev() is called again, and this time get_active_super() returns NULL (e.g. because the FS is unmounted), we'll end up with bd_fsfreeze_count > 0, but bd_fsfreeze_sb is *untouched* - it stays the same (now garbage) value. A subsequent thaw_bdev() will decide that the bd_fsfreeze_sb value is legitimate (since bd_fsfreeze_count > 0), and attempt to use it. Fix this by always setting bd_fsfreeze_sb to NULL when bd_fsfreeze_count is successfully decremented to 0 in thaw_sb(). Alternatively, we could set bd_fsfreeze_sb to whatever get_active_super() returns in freeze_bdev() whenever bd_fsfreeze_count is successfully incremented to 1 from 0 (which can be achieved cleanly by moving the line currently setting bd_fsfreeze_sb to immediately after the "sync:" label, but it might be a little too subtle/easily overlooked in future). This fixes the currently panicking xfstests generic/085. Fixes: 040f04bd2e82 ("fs: simplify freeze_bdev/thaw_bdev") Signed-off-by: Satya Tangirala Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Jens Axboe commit 50e31ef486afe60f128d42fb9620e2a63172c15c Author: Qu Wenruo Date: Tue Dec 29 21:29:34 2020 +0800 btrfs: reloc: fix wrong file extent type check to avoid false ENOENT [BUG] There are several bug reports about recent kernel unable to relocate certain data block groups. Sometimes the error just goes away, but there is one reporter who can reproduce it reliably. The dmesg would look like: [438.260483] BTRFS info (device dm-10): balance: start -dvrange=34625344765952..34625344765953 [438.269018] BTRFS info (device dm-10): relocating block group 34625344765952 flags data|raid1 [450.439609] BTRFS info (device dm-10): found 167 extents, stage: move data extents [463.501781] BTRFS info (device dm-10): balance: ended with status: -2 [CAUSE] The ENOENT error is returned from the following call chain: add_data_references() |- delete_v1_space_cache(); |- if (!found) return -ENOENT; The variable @found is set to true if we find a data extent whose disk bytenr matches parameter @data_bytes. With extra debugging, the offending tree block looks like this: leaf bytenr = 42676709441536, data_bytenr = 34626327621632 ctime 1567904822.739884119 (2019-09-08 03:07:02) mtime 0.0 (1970-01-01 01:00:00) otime 0.0 (1970-01-01 01:00:00) item 27 key (51933 EXTENT_DATA 0) itemoff 9854 itemsize 53 generation 1517381 type 2 (prealloc) prealloc data disk byte 34626327621632 nr 262144 <<< prealloc data offset 0 nr 262144 item 28 key (52262 ROOT_ITEM 0) itemoff 9415 itemsize 439 generation 2618893 root_dirid 256 bytenr 42677048360960 level 3 refs 1 lastsnap 2618893 byte_limit 0 bytes_used 5557338112 flags 0x0(none) uuid d0d4361f-d231-6d40-8901-fe506e4b2b53 Although item 27 has disk bytenr 34626327621632, which matches the data_bytenr, its type is prealloc, not reg. This makes the existing code skip that item, and return ENOENT. [FIX] The code is modified in commit 19b546d7a1b2 ("btrfs: relocation: Use btrfs_find_all_leafs to locate data extent parent tree leaves"), before that commit, we use something like "if (type == BTRFS_FILE_EXTENT_INLINE) continue;" But in that offending commit, we use (type == BTRFS_FILE_EXTENT_REG), ignoring BTRFS_FILE_EXTENT_PREALLOC. Fix it by also checking BTRFS_FILE_EXTENT_PREALLOC. Reported-by: Stéphane Lesimple Link: https://lore.kernel.org/linux-btrfs/505cabfa88575ed6dbe7cb922d8914fb@lesimple.fr Fixes: 19b546d7a1b2 ("btrfs: relocation: Use btrfs_find_all_leafs to locate data extent parent tree leaves") CC: stable@vger.kernel.org # 5.6+ Tested-By: Stéphane Lesimple Reviewed-by: Su Yue Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 347fb0cfc9bab5195c6701e62eda488310d7938f Author: Su Yue Date: Sun Jan 3 17:28:04 2021 +0800 btrfs: tree-checker: check if chunk item end overflows While mounting a crafted image provided by user, kernel panics due to the invalid chunk item whose end is less than start. [66.387422] loop: module loaded [66.389773] loop0: detected capacity change from 262144 to 0 [66.427708] BTRFS: device fsid a62e00e8-e94e-4200-8217-12444de93c2e devid 1 transid 12 /dev/loop0 scanned by mount (613) [66.431061] BTRFS info (device loop0): disk space caching is enabled [66.431078] BTRFS info (device loop0): has skinny extents [66.437101] BTRFS error: insert state: end < start 29360127 37748736 [66.437136] ------------[ cut here ]------------ [66.437140] WARNING: CPU: 16 PID: 613 at fs/btrfs/extent_io.c:557 insert_state.cold+0x1a/0x46 [btrfs] [66.437369] CPU: 16 PID: 613 Comm: mount Tainted: G O 5.11.0-rc1-custom #45 [66.437374] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS ArchLinux 1.14.0-1 04/01/2014 [66.437378] RIP: 0010:insert_state.cold+0x1a/0x46 [btrfs] [66.437420] RSP: 0018:ffff93e5414c3908 EFLAGS: 00010286 [66.437427] RAX: 0000000000000000 RBX: 0000000001bfffff RCX: 0000000000000000 [66.437431] RDX: 0000000000000000 RSI: ffffffffb90d4660 RDI: 00000000ffffffff [66.437434] RBP: ffff93e5414c3938 R08: 0000000000000001 R09: 0000000000000001 [66.437438] R10: ffff93e5414c3658 R11: 0000000000000000 R12: ffff8ec782d72aa0 [66.437441] R13: ffff8ec78bc71628 R14: 0000000000000000 R15: 0000000002400000 [66.437447] FS: 00007f01386a8580(0000) GS:ffff8ec809000000(0000) knlGS:0000000000000000 [66.437451] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [66.437455] CR2: 00007f01382fa000 CR3: 0000000109a34000 CR4: 0000000000750ee0 [66.437460] PKRU: 55555554 [66.437464] Call Trace: [66.437475] set_extent_bit+0x652/0x740 [btrfs] [66.437539] set_extent_bits_nowait+0x1d/0x20 [btrfs] [66.437576] add_extent_mapping+0x1e0/0x2f0 [btrfs] [66.437621] read_one_chunk+0x33c/0x420 [btrfs] [66.437674] btrfs_read_chunk_tree+0x6a4/0x870 [btrfs] [66.437708] ? kvm_sched_clock_read+0x18/0x40 [66.437739] open_ctree+0xb32/0x1734 [btrfs] [66.437781] ? bdi_register_va+0x1b/0x20 [66.437788] ? super_setup_bdi_name+0x79/0xd0 [66.437810] btrfs_mount_root.cold+0x12/0xeb [btrfs] [66.437854] ? __kmalloc_track_caller+0x217/0x3b0 [66.437873] legacy_get_tree+0x34/0x60 [66.437880] vfs_get_tree+0x2d/0xc0 [66.437888] vfs_kern_mount.part.0+0x78/0xc0 [66.437897] vfs_kern_mount+0x13/0x20 [66.437902] btrfs_mount+0x11f/0x3c0 [btrfs] [66.437940] ? kfree+0x5ff/0x670 [66.437944] ? __kmalloc_track_caller+0x217/0x3b0 [66.437962] legacy_get_tree+0x34/0x60 [66.437974] vfs_get_tree+0x2d/0xc0 [66.437983] path_mount+0x48c/0xd30 [66.437998] __x64_sys_mount+0x108/0x140 [66.438011] do_syscall_64+0x38/0x50 [66.438018] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [66.438023] RIP: 0033:0x7f0138827f6e [66.438033] RSP: 002b:00007ffecd79edf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 [66.438040] RAX: ffffffffffffffda RBX: 00007f013894c264 RCX: 00007f0138827f6e [66.438044] RDX: 00005593a4a41360 RSI: 00005593a4a33690 RDI: 00005593a4a3a6c0 [66.438047] RBP: 00005593a4a33440 R08: 0000000000000000 R09: 0000000000000001 [66.438050] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [66.438054] R13: 00005593a4a3a6c0 R14: 00005593a4a41360 R15: 00005593a4a33440 [66.438078] irq event stamp: 18169 [66.438082] hardirqs last enabled at (18175): [] console_unlock+0x4ff/0x5f0 [66.438088] hardirqs last disabled at (18180): [] console_unlock+0x467/0x5f0 [66.438092] softirqs last enabled at (16910): [] asm_call_irq_on_stack+0x12/0x20 [66.438097] softirqs last disabled at (16905): [] asm_call_irq_on_stack+0x12/0x20 [66.438103] ---[ end trace e114b111db64298b ]--- [66.438107] BTRFS error: found node 12582912 29360127 on insert of 37748736 29360127 [66.438127] BTRFS critical: panic in extent_io_tree_panic:679: locking error: extent tree was modified by another thread while locked (errno=-17 Object already exists) [66.441069] ------------[ cut here ]------------ [66.441072] kernel BUG at fs/btrfs/extent_io.c:679! [66.442064] invalid opcode: 0000 [#1] PREEMPT SMP NOPTI [66.443018] CPU: 16 PID: 613 Comm: mount Tainted: G W O 5.11.0-rc1-custom #45 [66.444538] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS ArchLinux 1.14.0-1 04/01/2014 [66.446223] RIP: 0010:extent_io_tree_panic.isra.0+0x23/0x25 [btrfs] [66.450878] RSP: 0018:ffff93e5414c3948 EFLAGS: 00010246 [66.451840] RAX: 0000000000000000 RBX: 0000000001bfffff RCX: 0000000000000000 [66.453141] RDX: 0000000000000000 RSI: ffffffffb90d4660 RDI: 00000000ffffffff [66.454445] RBP: ffff93e5414c3948 R08: 0000000000000001 R09: 0000000000000001 [66.455743] R10: ffff93e5414c3658 R11: 0000000000000000 R12: ffff8ec782d728c0 [66.457055] R13: ffff8ec78bc71628 R14: ffff8ec782d72aa0 R15: 0000000002400000 [66.458356] FS: 00007f01386a8580(0000) GS:ffff8ec809000000(0000) knlGS:0000000000000000 [66.459841] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [66.460895] CR2: 00007f01382fa000 CR3: 0000000109a34000 CR4: 0000000000750ee0 [66.462196] PKRU: 55555554 [66.462692] Call Trace: [66.463139] set_extent_bit.cold+0x30/0x98 [btrfs] [66.464049] set_extent_bits_nowait+0x1d/0x20 [btrfs] [66.490466] add_extent_mapping+0x1e0/0x2f0 [btrfs] [66.514097] read_one_chunk+0x33c/0x420 [btrfs] [66.534976] btrfs_read_chunk_tree+0x6a4/0x870 [btrfs] [66.555718] ? kvm_sched_clock_read+0x18/0x40 [66.575758] open_ctree+0xb32/0x1734 [btrfs] [66.595272] ? bdi_register_va+0x1b/0x20 [66.614638] ? super_setup_bdi_name+0x79/0xd0 [66.633809] btrfs_mount_root.cold+0x12/0xeb [btrfs] [66.652938] ? __kmalloc_track_caller+0x217/0x3b0 [66.671925] legacy_get_tree+0x34/0x60 [66.690300] vfs_get_tree+0x2d/0xc0 [66.708221] vfs_kern_mount.part.0+0x78/0xc0 [66.725808] vfs_kern_mount+0x13/0x20 [66.742730] btrfs_mount+0x11f/0x3c0 [btrfs] [66.759350] ? kfree+0x5ff/0x670 [66.775441] ? __kmalloc_track_caller+0x217/0x3b0 [66.791750] legacy_get_tree+0x34/0x60 [66.807494] vfs_get_tree+0x2d/0xc0 [66.823349] path_mount+0x48c/0xd30 [66.838753] __x64_sys_mount+0x108/0x140 [66.854412] do_syscall_64+0x38/0x50 [66.869673] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [66.885093] RIP: 0033:0x7f0138827f6e [66.945613] RSP: 002b:00007ffecd79edf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 [66.977214] RAX: ffffffffffffffda RBX: 00007f013894c264 RCX: 00007f0138827f6e [66.994266] RDX: 00005593a4a41360 RSI: 00005593a4a33690 RDI: 00005593a4a3a6c0 [67.011544] RBP: 00005593a4a33440 R08: 0000000000000000 R09: 0000000000000001 [67.028836] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [67.045812] R13: 00005593a4a3a6c0 R14: 00005593a4a41360 R15: 00005593a4a33440 [67.216138] ---[ end trace e114b111db64298c ]--- [67.237089] RIP: 0010:extent_io_tree_panic.isra.0+0x23/0x25 [btrfs] [67.325317] RSP: 0018:ffff93e5414c3948 EFLAGS: 00010246 [67.347946] RAX: 0000000000000000 RBX: 0000000001bfffff RCX: 0000000000000000 [67.371343] RDX: 0000000000000000 RSI: ffffffffb90d4660 RDI: 00000000ffffffff [67.394757] RBP: ffff93e5414c3948 R08: 0000000000000001 R09: 0000000000000001 [67.418409] R10: ffff93e5414c3658 R11: 0000000000000000 R12: ffff8ec782d728c0 [67.441906] R13: ffff8ec78bc71628 R14: ffff8ec782d72aa0 R15: 0000000002400000 [67.465436] FS: 00007f01386a8580(0000) GS:ffff8ec809000000(0000) knlGS:0000000000000000 [67.511660] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [67.535047] CR2: 00007f01382fa000 CR3: 0000000109a34000 CR4: 0000000000750ee0 [67.558449] PKRU: 55555554 [67.581146] note: mount[613] exited with preempt_count 2 The image has a chunk item which has a logical start 37748736 and length 18446744073701163008 (-8M). The calculated end 29360127 overflows. EEXIST was caught by insert_state() because of the duplicate end and extent_io_tree_panic() was called. Add overflow check of chunk item end to tree checker so it can be detected early at mount time. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=208929 CC: stable@vger.kernel.org # 4.19+ Reviewed-by: Anand Jain Signed-off-by: Su Yue Reviewed-by: David Sterba Signed-off-by: David Sterba commit 29b665cc51e8b602bf2a275734349494776e3dbc Author: Su Yue Date: Sun Jan 3 17:28:03 2021 +0800 btrfs: prevent NULL pointer dereference in extent_io_tree_panic Some extent io trees are initialized with NULL private member (e.g. btrfs_device::alloc_state and btrfs_fs_info::excluded_extents). Dereference of a NULL tree->private as inode pointer will cause panic. Pass tree->fs_info as it's known to be valid in all cases. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=208929 Fixes: 05912a3c04eb ("btrfs: drop extent_io_ops::tree_fs_info callback") CC: stable@vger.kernel.org # 4.19+ Reviewed-by: Anand Jain Signed-off-by: Su Yue Reviewed-by: David Sterba Signed-off-by: David Sterba commit 71008734d27f2276fcef23a5e546d358430f2d52 Author: Josef Bacik Date: Wed Dec 16 11:18:44 2020 -0500 btrfs: print the actual offset in btrfs_root_name We're supposed to print the root_key.offset in btrfs_root_name in the case of a reloc root, not the objectid. Fix this helper to take the key so we have access to the offset when we need it. Fixes: 457f1864b569 ("btrfs: pretty print leaked root name") Reviewed-by: Qu Wenruo Reviewed-by: Nikolay Borisov Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit b1445e59cc9a10fdb8f83810ae1f4feb941ab36b Author: Pavel Begunkov Date: Thu Jan 7 03:15:43 2021 +0000 io_uring: synchronise ev_posted() with waitqueues waitqueue_active() needs smp_mb() to be in sync with waitqueues modification, but we miss it in io_cqring_ev_posted*() apart from cq_wait() case. Take an smb_mb() out of wq_has_sleeper() making it waitqueue_active(), and place it a few lines before, so it can synchronise other waitqueue_active() as well. The patch doesn't add any additional overhead, so even if there are no problems currently, it's just safer to have it this way. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 4aa84f2ffa81f71e15e5cffc2cc6090dbee78f8e Author: Pavel Begunkov Date: Thu Jan 7 03:15:42 2021 +0000 io_uring: dont kill fasync under completion_lock CPU0 CPU1 ---- ---- lock(&new->fa_lock); local_irq_disable(); lock(&ctx->completion_lock); lock(&new->fa_lock); lock(&ctx->completion_lock); *** DEADLOCK *** Move kill_fasync() out of io_commit_cqring() to io_cqring_ev_posted(), so it doesn't hold completion_lock while doing it. That saves from the reported deadlock, and it's just nice to shorten the locking time and untangle nested locks (compl_lock -> wq_head::lock). Reported-by: syzbot+91ca3f25bd7f795f019c@syzkaller.appspotmail.com Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 80c18e4ac20c9cde420cb3ffab48c936147cf07d Author: Pavel Begunkov Date: Thu Jan 7 03:15:41 2021 +0000 io_uring: trigger eventfd for IOPOLL Make sure io_iopoll_complete() tries to wake up eventfd, which currently is skipped together with io_cqring_ev_posted() for non-SQPOLL IOPOLL. Add an iopoll version of io_cqring_ev_posted(), duplicates a bit of code, but they actually use different sets of wait queues may be for better. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 2984a99ff1c071c85dc09451c8adc859c22fbb96 Author: Sakari Ailus Date: Thu Dec 17 18:57:05 2020 +0100 media: v4l: common: Fix naming of v4l2_get_link_rate Rename v4l2_get_link_rate() as v4l2_get_link_freq(). What the function returns is the frequency of the link; rename it to reflect the name of the control where the information is obtained. Fixes: 1b888b3cebef ("media: v4l: Add a helper for obtaining the link frequency") Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit e99a8f0f6344fee25cd30907c30ac0ca2f02804d Author: Colin Ian King Date: Fri Dec 4 18:38:33 2020 +0100 media: rcar-vin: fix return, use ret instead of zero Currently the return error code is in ret is being assigned but not used. It and should be returned by the return statement and currently just 0 is being returned. Fix this. Addresses-Coverity: ("Unused value") Fixes: b9ad52aafe38 ("media: rcar-vin: Rework parallel firmware parsing") Signed-off-by: Colin Ian King Reviewed-by: Niklas Söderlund Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 1bc0b1baf26efa23c0fd6fdcc24297e7d94f37ac Author: Sakari Ailus Date: Tue Dec 15 21:31:12 2020 +0100 media: ccs: Get static data version minor correctly Fix obtaining CCS static data version minor part correctly. Instead, the upper 8 bits were obtained from the major version number. Fixes: a6b396f410b1 ("media: ccs: Add CCS static data parser library") Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit ff474acc4b1a9a15e29c42a41942e6932fa4f01f Author: Sakari Ailus Date: Fri Dec 11 23:21:28 2020 +0100 media: ccs-pll: Fix link frequency for C-PHY The highest fundamental frequency signal for C-PHY is half of the symbol rate which is similar to D-PHY. Take this into account in ccs-pll. Also remove the outdated comment. Fixes: 8030aa4f9c51 ("media: ccs-pll: Add C-PHY support") Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 7c29ada5e70083805bc3a68daa23441df421fbee Author: Liu Yi L Date: Thu Jan 7 00:03:57 2021 +0800 iommu/vt-d: Fix ineffective devTLB invalidation for subdevices iommu_flush_dev_iotlb() is called to invalidate caches on a device but only loops over the devices which are fully-attached to the domain. For sub-devices, this is ineffective and can result in invalid caching entries left on the device. Fix the missing invalidation by adding a loop over the subdevices and ensuring that 'domain->has_iotlb_device' is updated when attaching to subdevices. Fixes: 67b8e02b5e76 ("iommu/vt-d: Aux-domain specific domain attach/detach") Signed-off-by: Liu Yi L Acked-by: Lu Baolu Link: https://lore.kernel.org/r/1609949037-25291-4-git-send-email-yi.l.liu@intel.com Signed-off-by: Will Deacon commit 18abda7a2d555783d28ea1701f3ec95e96237a86 Author: Liu Yi L Date: Thu Jan 7 00:03:56 2021 +0800 iommu/vt-d: Fix general protection fault in aux_detach_device() The aux-domain attach/detach are not tracked, some data structures might be used after free. This causes general protection faults when multiple subdevices are created and assigned to a same guest machine: | general protection fault, probably for non-canonical address 0xdead000000000100: 0000 [#1] SMP NOPTI | RIP: 0010:intel_iommu_aux_detach_device+0x12a/0x1f0 | [...] | Call Trace: | iommu_aux_detach_device+0x24/0x70 | vfio_mdev_detach_domain+0x3b/0x60 | ? vfio_mdev_set_domain+0x50/0x50 | iommu_group_for_each_dev+0x4f/0x80 | vfio_iommu_detach_group.isra.0+0x22/0x30 | vfio_iommu_type1_detach_group.cold+0x71/0x211 | ? find_exported_symbol_in_section+0x4a/0xd0 | ? each_symbol_section+0x28/0x50 | __vfio_group_unset_container+0x4d/0x150 | vfio_group_try_dissolve_container+0x25/0x30 | vfio_group_put_external_user+0x13/0x20 | kvm_vfio_group_put_external_user+0x27/0x40 [kvm] | kvm_vfio_destroy+0x45/0xb0 [kvm] | kvm_put_kvm+0x1bb/0x2e0 [kvm] | kvm_vm_release+0x22/0x30 [kvm] | __fput+0xcc/0x260 | ____fput+0xe/0x10 | task_work_run+0x8f/0xb0 | do_exit+0x358/0xaf0 | ? wake_up_state+0x10/0x20 | ? signal_wake_up_state+0x1a/0x30 | do_group_exit+0x47/0xb0 | __x64_sys_exit_group+0x18/0x20 | do_syscall_64+0x57/0x1d0 | entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fix the crash by tracking the subdevices when attaching and detaching aux-domains. Fixes: 67b8e02b5e76 ("iommu/vt-d: Aux-domain specific domain attach/detach") Co-developed-by: Xin Zeng Signed-off-by: Xin Zeng Signed-off-by: Liu Yi L Acked-by: Lu Baolu Link: https://lore.kernel.org/r/1609949037-25291-3-git-send-email-yi.l.liu@intel.com Signed-off-by: Will Deacon commit 9ad9f45b3b91162b33abfe175ae75ab65718dbf5 Author: Liu Yi L Date: Thu Jan 7 00:03:55 2021 +0800 iommu/vt-d: Move intel_iommu info from struct intel_svm to struct intel_svm_dev 'struct intel_svm' is shared by all devices bound to a give process, but records only a single pointer to a 'struct intel_iommu'. Consequently, cache invalidations may only be applied to a single DMAR unit, and are erroneously skipped for the other devices. In preparation for fixing this, rework the structures so that the iommu pointer resides in 'struct intel_svm_dev', allowing 'struct intel_svm' to track them in its device list. Fixes: 1c4f88b7f1f9 ("iommu/vt-d: Shared virtual address in scalable mode") Cc: Lu Baolu Cc: Jacob Pan Cc: Raj Ashok Cc: David Woodhouse Reported-by: Guo Kaijie Reported-by: Xin Zeng Signed-off-by: Guo Kaijie Signed-off-by: Xin Zeng Signed-off-by: Liu Yi L Tested-by: Guo Kaijie Cc: stable@vger.kernel.org # v5.0+ Acked-by: Lu Baolu Link: https://lore.kernel.org/r/1609949037-25291-2-git-send-email-yi.l.liu@intel.com Signed-off-by: Will Deacon commit aded8c7c2b72f846a07a2c736b8e75bb8cf50a87 Author: Bjorn Andersson Date: Tue Jan 5 16:50:38 2021 -0800 iommu/arm-smmu-qcom: Initialize SCTLR of the bypass context On SM8150 it's occasionally observed that the boot hangs in between the writing of SMEs and context banks in arm_smmu_device_reset(). The problem seems to coincide with a display refresh happening after updating the stream mapping, but before clearing - and there by disabling translation - the context bank picked to emulate translation bypass. Resolve this by explicitly disabling the bypass context already in cfg_probe. Fixes: f9081b8ff593 ("iommu/arm-smmu-qcom: Implement S2CR quirk") Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210106005038.4152731-1-bjorn.andersson@linaro.org Signed-off-by: Will Deacon commit 420d42f6f9db27d88bc4f83e3e668fcdacbf7e29 Author: Lu Baolu Date: Thu Dec 31 08:53:23 2020 +0800 iommu/vt-d: Fix lockdep splat in sva bind()/unbind() Lock(&iommu->lock) without disabling irq causes lockdep warnings. ======================================================== WARNING: possible irq lock inversion dependency detected 5.11.0-rc1+ #828 Not tainted -------------------------------------------------------- kworker/0:1H/120 just changed the state of lock: ffffffffad9ea1b8 (device_domain_lock){..-.}-{2:2}, at: iommu_flush_dev_iotlb.part.0+0x32/0x120 but this lock took another, SOFTIRQ-unsafe lock in the past: (&iommu->lock){+.+.}-{2:2} and interrupts could create inverse lock ordering between them. other info that might help us debug this: Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&iommu->lock); local_irq_disable(); lock(device_domain_lock); lock(&iommu->lock); lock(device_domain_lock); *** DEADLOCK *** Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20201231005323.2178523-5-baolu.lu@linux.intel.com Signed-off-by: Will Deacon commit 4df7b2268ad81a74168130e1fb04550a8bc980e1 Author: Lu Baolu Date: Thu Dec 31 08:53:22 2020 +0800 Revert "iommu: Add quirk for Intel graphic devices in map_sg" This reverts commit 65f746e8285f0a67d43517d86fedb9e29ead49f2. As commit 8a473dbadccf ("drm/i915: Fix DMA mapped scatterlist walks") and commit 934941ed5a30 ("drm/i915: Fix DMA mapped scatterlist lookup") fixed the DMA scatterlist limitations in the i915 driver, remove this temporary workaround. Cc: Tvrtko Ursulin Cc: Tom Murphy Cc: Logan Gunthorpe Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20201231005323.2178523-4-baolu.lu@linux.intel.com Signed-off-by: Will Deacon commit 1efd17e7acb6692bffc6c58718f41f27fdfd62f5 Author: Lu Baolu Date: Thu Dec 31 08:53:19 2020 +0800 iommu/vt-d: Fix misuse of ALIGN in qi_flush_piotlb() Use IS_ALIGNED() instead. Otherwise, an unaligned address will be ignored. Fixes: 33cd6e642d6a ("iommu/vt-d: Flush PASID-based iotlb for iova over first level") Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20201231005323.2178523-1-baolu.lu@linux.intel.com Signed-off-by: Will Deacon commit a73858ef4d5e1d425e171f0f6a52864176a6a979 Author: Christian König Date: Tue Jan 5 18:56:56 2021 +0100 drm/ttm: unexport ttm_pool_init/fini Drivers are not supposed to use this directly any more. Signed-off-by: Christian König Reviewed-by: Huang Rui Link: https://patchwork.freedesktop.org/patch/412156/ commit e0658f970a7f3d85431c6803b7d5169444fb11b0 Author: Christian König Date: Tue Jan 5 18:55:47 2021 +0100 drm/radeon: stop re-init the TTM page pool Drivers are not supposed to init the page pool directly any more. Signed-off-by: Christian König Reviewed-by: Huang Rui Link: https://patchwork.freedesktop.org/patch/412153/ commit a5c7682aaaa10e42928d73de1c9e1e02d2b14c2e Author: Thinh Nguyen Date: Mon Jan 4 22:42:39 2021 -0800 usb: dwc3: gadget: Clear wait flag on dequeue If an active transfer is dequeued, then the endpoint is freed to start a new transfer. Make sure to clear the endpoint's transfer wait flag for this case. Fixes: e0d19563eb6c ("usb: dwc3: gadget: Wait for transfer completion") Cc: stable@vger.kernel.org Acked-by: Felipe Balbi Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/b81cd5b5281cfbfdadb002c4bcf5c9be7c017cfd.1609828485.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman commit 6c75c2bad36cfb43b144e6a0a76a69993c72097f Author: Prashant Malani Date: Wed Jan 6 19:49:04 2021 -0800 usb: typec: Send uevent for num_altmodes update Generate a change uevent when the "number_of_alternate_modes" sysfs file for partners and plugs is updated by a port driver. Cc: Heikki Krogerus Cc: Benson Leung Signed-off-by: Prashant Malani Link: https://lore.kernel.org/r/20210107034904.4112029-1-pmalani@chromium.org Signed-off-by: Greg Kroah-Hartman commit 41952a66015466c3208aac96b14ffd92e0943589 Author: Peter Robinson Date: Wed Jan 6 00:16:05 2021 +0000 usb: typec: Fix copy paste error for NVIDIA alt-mode description The name of the module for the NVIDIA alt-mode is incorrect as it looks to be a copy-paste error from the entry above, update it to the correct typec_nvidia module name. Cc: Ajay Gupta Cc: Heikki Krogerus Signed-off-by: Peter Robinson Link: https://lore.kernel.org/r/20210106001605.167917-1-pbrobinson@gmail.com Signed-off-by: Greg Kroah-Hartman commit e2459108b5a0604c4b472cae2b3cb8d3444c77fb Author: taehyun.cho Date: Thu Jan 7 00:46:25 2021 +0900 usb: gadget: enable super speed plus Enable Super speed plus in configfs to support USB3.1 Gen2. This ensures that when a USB gadget is plugged in, it is enumerated as Gen 2 and connected at 10 Gbps if the host and cable are capable of it. Many in-tree gadget functions (fs, midi, acm, ncm, mass_storage, etc.) already have SuperSpeed Plus support. Tested: plugged gadget into Linux host and saw: [284907.385986] usb 8-2: new SuperSpeedPlus Gen 2 USB device number 3 using xhci_hcd Tested-by: Lorenzo Colitti Acked-by: Felipe Balbi Signed-off-by: taehyun.cho Signed-off-by: Lorenzo Colitti Link: https://lore.kernel.org/r/20210106154625.2801030-1-lorenzo@google.com Cc: stable Signed-off-by: Greg Kroah-Hartman commit e89eed02a5f1b864fa5abafc8e8e71bd9fd66d1f Author: Andrey Konovalov Date: Tue Jan 5 20:53:42 2021 +0100 kcov, usb: hide in_serving_softirq checks in __usb_hcd_giveback_urb Done opencode in_serving_softirq() checks in in_serving_softirq() to avoid cluttering the code, hide them in kcov helpers instead. Fixes: aee9ddb1d371 ("kcov, usb: only collect coverage from __usb_hcd_giveback_urb in softirq") Signed-off-by: Andrey Konovalov Link: https://lore.kernel.org/r/aeb430c5bb90b0ccdf1ec302c70831c1a47b9c45.1609876340.git.andreyknvl@google.com Signed-off-by: Greg Kroah-Hartman commit 05cd84691eafcd7959a1e120d5e72c0dd98c5d91 Author: Charan Teja Reddy Date: Tue Jan 5 20:06:39 2021 +0530 dmabuf: fix use-after-free of dmabuf's file->f_inode It is observed 'use-after-free' on the dmabuf's file->f_inode with the race between closing the dmabuf file and reading the dmabuf's debug info. Consider the below scenario where P1 is closing the dma_buf file and P2 is reading the dma_buf's debug info in the system: P1 P2 dma_buf_debug_show() dma_buf_put() __fput() file->f_op->release() dput() .... dentry_unlink_inode() iput(dentry->d_inode) (where the inode is freed) mutex_lock(&db_list.lock) read 'dma_buf->file->f_inode' (the same inode is freed by P1) mutex_unlock(&db_list.lock) dentry->d_op->d_release()--> dma_buf_release() ..... mutex_lock(&db_list.lock) removes the dmabuf from the list mutex_unlock(&db_list.lock) In the above scenario, when dma_buf_put() is called on a dma_buf, it first frees the dma_buf's file->f_inode(=dentry->d_inode) and then removes this dma_buf from the system db_list. In between P2 traversing the db_list tries to access this dma_buf's file->f_inode that was freed by P1 which is a use-after-free case. Since, __fput() calls f_op->release first and then later calls the d_op->d_release, move the dma_buf's db_list removal from d_release() to f_op->release(). This ensures that dma_buf's file->f_inode is not accessed after it is released. Cc: # 5.4.x- Fixes: 4ab59c3c638c ("dma-buf: Move dma_buf_release() from fops to dentry_ops") Acked-by: Christian König Signed-off-by: Charan Teja Reddy Signed-off-by: Sumit Semwal Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/1609857399-31549-1-git-send-email-charante@codeaurora.org commit c14556fc0c7c115ffb4a287560e1ec9f7869aac3 Author: Mika Westerberg Date: Thu Dec 17 12:39:11 2020 +0300 thunderbolt: Drop duplicated 0x prefix from format string The tb_dbg() call is using %#x that already adds the 0x prefix so don't duplicate it. Fixes: 9039387e166e ("thunderbolt: Add USB4 router operation proxy for firmware connection manager") Signed-off-by: Mika Westerberg Reviewed-by: Yehezkel Bernat commit 83b5bd628f65e6b4d1924b307d6a88a57827bdb0 Author: Catalin Marinas Date: Mon Jan 4 12:36:14 2021 +0000 arm64: Move PSTATE.TCO setting to separate functions For consistency with __uaccess_{disable,enable}_hw_pan(), move the PSTATE.TCO setting into dedicated __uaccess_{disable,enable}_tco() functions. Signed-off-by: Catalin Marinas Acked-by: Vincenzo Frascino Acked-by: Mark Rutland commit 91bc156817a3c2007332b64b4f85c32aafbbbea6 Author: Jeremy Szu Date: Wed Jan 6 21:05:46 2021 +0800 ALSA: hda/realtek: fix right sounds and mute/micmute LEDs for HP machines * The HP ZBook Fury 15/17 G7 Mobile Workstation are using ALC285 codec which is using 0x04 to control mute LED and 0x01 to control micmute LED. * The right channel speaker is no sound and it needs to expose GPIO1 for initialing AMP. Add quirks to support them. Signed-off-by: Jeremy Szu Cc: Link: https://lore.kernel.org/r/20210106130549.100532-1-jeremy.szu@canonical.com Signed-off-by: Takashi Iwai commit 6ee49118f87cf02b36f68812bc49855b7b627a2b Author: Sriram Dash Date: Mon Jan 4 18:01:34 2021 +0530 MAINTAINERS: Update MCAN MMIO device driver maintainer Update Pankaj Sharma as maintainer for mcan mmio device driver as I will be moving to a different role. Signed-off-by: Sriram Dash Acked-by: Pankaj Sharma Link: https://lore.kernel.org/r/20210104123134.16930-1-sriram.dash@samsung.com Signed-off-by: Marc Kleine-Budde commit 1169ec8f5d71044082a9898bbd1f1bf4a690c5a4 Author: Lad Prabhakar Date: Mon Jan 4 09:03:27 2021 +0000 can: rcar: Kconfig: update help description for CAN_RCAR config The rcar_can driver also supports RZ/G SoC's, update the description to reflect this. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20210104090327.6547-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Marc Kleine-Budde commit 2fbb397f584077e3c90abd06829f5a1f66fdd5f4 Author: Marc Kleine-Budde Date: Tue Jan 5 22:41:38 2021 +0100 can: mcp251xfd: mcp251xfd_handle_rxif_ring(): first increment RX tail pointer in HW, then in driver The previous patch fixes a TEF vs. TX race condition, by first updating the TEF tail pointer in hardware, and then updating the driver internal pointer. The same pattern exists in the RX-path, too. This should be no problem, as the driver accesses the RX-FIFO from the interrupt handler only, thus the access is properly serialized. Fix the order here, too, so that the TEF- and RX-path look similar. Fixes: 1f652bb6bae7 ("can: mcp25xxfd: rx-path: reduce number of SPI core requests to set UINC bit") Link: https://lore.kernel.org/r/20210105214138.3150886-3-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 6086f02a18aeae795a61a3fc6566920891ea3b52 Author: Marc Kleine-Budde Date: Tue Jan 5 22:41:37 2021 +0100 can: mcp251xfd: mcp251xfd_handle_tefif(): fix TEF vs. TX race condition The mcp251xfd driver uses a TX FIFO for sending CAN frames and a TX Event FIFO (TEF) for completed TX-requests. The TEF event handling in the mcp251xfd_handle_tefif() function has a race condition. It first increments the tx-ring's tail counter to signal that there's room in the TX and TEF FIFO, then it increments the TEF FIFO in hardware. A running mcp251xfd_start_xmit() on a different CPU might not stop the txqueue (as the tx-ring still shows free space). The next mcp251xfd_start_xmit() will push a message into the chip and the TX complete event might overflow the TEF FIFO. This patch changes the order to fix the problem. Fixes: 68c0c1c7f966 ("can: mcp251xfd: tef-path: reduce number of SPI core requests to set UINC bit") Link: https://lore.kernel.org/r/20210105214138.3150886-2-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 4e181dede94d33c369ed441c63986916677231a9 Merge: 57cda5e986eb2 9397d66212cdf Author: Daniel Vetter Date: Thu Jan 7 10:26:05 2021 +0100 Merge tag 'drm-intel-fixes-2021-01-07' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes drm/i915 fixes for v5.11-rc3: - Use per-connector PM QoS tracking for DP aux communication - GuC firmware fix for older Cometlakes - Clear the gpu reloc and shadow batches Signed-off-by: Daniel Vetter From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/877dop18zf.fsf@intel.com commit 4d2b71634b5ad142617e430bc6ef659331a576d0 Author: Tom Rix Date: Tue Dec 15 06:59:28 2020 -0800 HID: wiimote: remove h from printk format specifier See Documentation/core-api/printk-formats.rst. h should no longer be used in the format specifier for printk. Signed-off-by: Tom Rix Signed-off-by: Jiri Kosina commit a876e7e2a8e62712425be178d483ffdff09f0853 Author: Tom Rix Date: Tue Dec 15 06:54:54 2020 -0800 HID: uclogic: remove h from printk format specifier See Documentation/core-api/printk-formats.rst. h should no longer be used in the format specifier for printk. Signed-off-by: Tom Rix Signed-off-by: Jiri Kosina commit 57cda5e986eb29d96b20b6169a1ba8b92269c04a Merge: e71ba9452f0b5 5efc1f4b454c6 Author: Daniel Vetter Date: Thu Jan 7 10:02:30 2021 +0100 Merge tag 'amd-drm-fixes-5.11-2021-01-06' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-5.11-2021-01-06: amdgpu: - Telemetry fix for VGH - Powerplay fixes for RV - Powerplay fixes for RN - RAS fixes for Sienna Cichlid - Blank screen regression fix - Drop DCN support for aarch64 - Misc other fixes Signed-off-by: Daniel Vetter From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210106222721.3934-1-alexander.deucher@amd.com commit aee2b3ccc8a63d1cd7da6a8a153d1f3712d40826 Author: Marc Kleine-Budde Date: Tue Dec 15 11:32:38 2020 +0100 can: tcan4x5x: fix bittiming const, use common bittiming from m_can driver According to the TCAN4550 datasheet "SLLSF91 - DECEMBER 2018" the tcan4x5x has the same bittiming constants as a m_can revision 3.2.x/3.3.0. The tcan4x5x chip I'm using identifies itself as m_can revision 3.2.1, so remove the tcan4x5x specific bittiming values and rely on the values in the m_can driver, which are selected according to core revision. Fixes: 5443c226ba91 ("can: tcan4x5x: Add tcan4x5x driver to the kernel") Cc: Dan Murphy Reviewed-by: Sean Nyekjaer Link: https://lore.kernel.org/r/20201215103238.524029-3-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit c4aec381ab98c9189d47b935832541d520f1f67f Author: Marc Kleine-Budde Date: Tue Dec 15 11:32:37 2020 +0100 can: m_can: m_can_class_unregister(): remove erroneous m_can_clk_stop() In m_can_class_register() the clock is started, but stopped on exit. When calling m_can_class_unregister(), the clock is stopped a second time. This patch removes the erroneous m_can_clk_stop() in m_can_class_unregister(). Fixes: f524f829b75a ("can: m_can: Create a m_can platform framework") Cc: Dan Murphy Cc: Sriram Dash Reviewed-by: Sean Nyekjaer Link: https://lore.kernel.org/r/20201215103238.524029-2-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit b33cf814b1eb65ef5c939ced8266bb3df18444ef Author: Shengjiu Wang Date: Mon Dec 7 14:53:24 2020 +0800 arm64: dts: imx8mn: Fix duplicate node name Error log: sysfs: cannot create duplicate filename '/bus/platform/devices/30000000.bus' The spba bus name is duplicate with aips bus name. Refine spba bus name to fix this issue. Fixes: 970406eaef3a ("arm64: dts: imx8mn: Enable Asynchronous Sample Rate Converter") Signed-off-by: Shengjiu Wang Signed-off-by: Shawn Guo commit b89bc060b53e7054e5c8ca11feea4bc884d83611 Author: Geert Uytterhoeven Date: Tue Nov 10 16:49:39 2020 +0100 sh/intc: Restore devm_ioremap() alignment Restore alignment of the continuation of the devm_ioremap() call in register_intc_controller(). Fixes: 4bdc0d676a643140 ("remove ioremap_nocache and devm_ioremap_nocache") Signed-off-by: Geert Uytterhoeven Signed-off-by: Rich Felker commit a118584e7e60fa72ee441055b33b41c3354dba7e Author: Wang Qing Date: Mon Nov 9 10:35:01 2020 +0800 sh: mach-sh03: remove duplicate include Remove duplicate header which is included twice. Signed-off-by: Wang Qing Signed-off-by: Rich Felker commit 7a202ec74c151e30edc1d17e3209fe6d6fe50eee Author: Wang Qing Date: Mon Nov 9 10:45:51 2020 +0800 arch: sh: remove duplicate include Remove duplicate header which is included twice. Signed-off-by: Wang Qing Signed-off-by: Rich Felker commit 542baf5108e052684c3abdeea57861f12f89a6b9 Author: Andy Shevchenko Date: Mon Oct 12 18:40:50 2020 +0300 sh: Drop ARCH_NR_GPIOS definition The default by generic header is the same, hence drop unnecessary definition. Signed-off-by: Andy Shevchenko Signed-off-by: Rich Felker commit 19170492735be935747b0545b7eed8bb40cc1209 Author: Jinyang He Date: Mon Oct 12 11:50:24 2020 +0800 sh: Remove unused HAVE_COPY_THREAD_TLS macro Fixes: e1cc9d8d596e ("sh: switch to copy_thread_tls()") Signed-off-by: Jinyang He Signed-off-by: Rich Felker commit b7aaf16d10bd9f1fbc5beefb9496e029fd1424ba Author: Christoph Hellwig Date: Thu Sep 24 06:31:39 2020 +0200 sh: remove CONFIG_IDE from most defconfig Remove CONFIG_IDE from defconfigs that did not actually select chipset drivers, and switch ones that have libata drivers to libata. Signed-off-by: Christoph Hellwig Signed-off-by: Rich Felker commit a1153636e904faf2b30fae3fb6ee3f4f4d0175c8 Author: Qinglang Miao Date: Sat Sep 19 10:52:05 2020 +0800 sh: mm: Convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Qinglang Miao Signed-off-by: Rich Felker commit 5c5dc5f8dccbafaacc8c97bbe7762986bdda6f63 Author: Qinglang Miao Date: Sat Sep 19 10:52:06 2020 +0800 sh: intc: Convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Qinglang Miao Signed-off-by: Rich Felker commit 7fb0a1a5e56779c427b409d6e53889d46519755e Author: Randy Dunlap Date: Thu Sep 17 19:14:04 2020 -0700 arch/sh: hyphenate Non-Uniform in Kconfig prompt Hyphenate Non-Uniform in the NUMA kconfig prompt. Signed-off-by: Randy Dunlap Cc: Yoshinori Sato Cc: Rich Felker Cc: linux-sh@vger.kernel.org Cc: Jiri Kosina Signed-off-by: Rich Felker commit f477a538c14d07f8c45e554c8c5208d588514e98 Author: Necip Fazil Yildiran Date: Thu Sep 17 18:45:48 2020 +0300 sh: dma: fix kconfig dependency for G2_DMA When G2_DMA is enabled and SH_DMA is disabled, it results in the following Kbuild warning: WARNING: unmet direct dependencies detected for SH_DMA_API Depends on [n]: SH_DMA [=n] Selected by [y]: - G2_DMA [=y] && SH_DREAMCAST [=y] The reason is that G2_DMA selects SH_DMA_API without depending on or selecting SH_DMA while SH_DMA_API depends on SH_DMA. When G2_DMA was first introduced with commit 40f49e7ed77f ("sh: dma: Make G2 DMA configurable."), this wasn't an issue since SH_DMA_API didn't have such dependency, and this way was the only way to enable it since SH_DMA_API was non-visible. However, later SH_DMA_API was made visible and dependent on SH_DMA with commit d8902adcc1a9 ("dmaengine: sh: Add Support SuperH DMA Engine driver"). Let G2_DMA depend on SH_DMA_API instead to avoid Kbuild issues. Fixes: d8902adcc1a9 ("dmaengine: sh: Add Support SuperH DMA Engine driver") Signed-off-by: Necip Fazil Yildiran Signed-off-by: Rich Felker commit 1f685e6adbbe3c7b1bd9053be771b898d9efa655 Author: Randy Dunlap Date: Tue Jan 5 20:25:31 2021 -0800 ptp: ptp_ines: prevent build when HAS_IOMEM is not set ptp_ines.c uses devm_platform_ioremap_resource(), which is only built/available when CONFIG_HAS_IOMEM is enabled. CONFIG_HAS_IOMEM is not enabled for arch/s390/, so builds on S390 have a build error: s390-linux-ld: drivers/ptp/ptp_ines.o: in function `ines_ptp_ctrl_probe': ptp_ines.c:(.text+0x17e6): undefined reference to `devm_platform_ioremap_resource' Prevent builds of ptp_ines.c when HAS_IOMEM is not set. Fixes: bad1eaa6ac31 ("ptp: Add a driver for InES time stamping IP core.") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Link: lore.kernel.org/r/202101031125.ZEFCUiKi-lkp@intel.com Acked-by: Richard Cochran Link: https://lore.kernel.org/r/20210106042531.1351-1-rdunlap@infradead.org Signed-off-by: Jakub Kicinski commit 7f847db3040897f3ee25ce97265c545b5561f6c2 Author: Randy Dunlap Date: Tue Jan 5 18:18:15 2021 -0800 net: dsa: fix led_classdev build errors Fix build errors when LEDS_CLASS=m and NET_DSA_HIRSCHMANN_HELLCREEK=y. This limits the latter to =m when LEDS_CLASS=m. microblaze-linux-ld: drivers/net/dsa/hirschmann/hellcreek_ptp.o: in function `hellcreek_ptp_setup': (.text+0xf80): undefined reference to `led_classdev_register_ext' microblaze-linux-ld: (.text+0xf94): undefined reference to `led_classdev_register_ext' microblaze-linux-ld: drivers/net/dsa/hirschmann/hellcreek_ptp.o: in function `hellcreek_ptp_free': (.text+0x1018): undefined reference to `led_classdev_unregister' microblaze-linux-ld: (.text+0x1024): undefined reference to `led_classdev_unregister' Signed-off-by: Randy Dunlap Reported-by: kernel test robot Link: lore.kernel.org/r/202101060655.iUvMJqS2-lkp@intel.com Cc: Kurt Kanzenbach Link: https://lore.kernel.org/r/20210106021815.31796-1-rdunlap@infradead.org Signed-off-by: Jakub Kicinski commit 94bcfdbff0c210b17b27615f4952cc6ece7d5f5f Author: Jakub Kicinski Date: Tue Jan 5 11:07:25 2021 -0800 net: bareudp: add missing error handling for bareudp_link_config() .dellink does not get called after .newlink fails, bareudp_newlink() must undo what bareudp_configure() has done if bareudp_link_config() fails. v2: call bareudp_dellink(), like bareudp_dev_create() does Fixes: 571912c69f0e ("net: UDP tunnel encapsulation module for tunnelling different protocols like MPLS, IP, NSH etc.") Link: https://lore.kernel.org/r/20210105190725.1736246-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 0d136f5cd9a7ba6ded7f8ff17e8b1ba680f37625 Author: Marek Behún Date: Tue Jan 5 18:23:33 2021 +0100 net: mvneta: fix error message when MTU too large for XDP The error message says that "Jumbo frames are not supported on XDP", but the code checks for mtu > MVNETA_MAX_RX_BUF_SIZE, not mtu > 1500. Fix this error message. Signed-off-by: Marek Behún Fixes: 0db51da7a8e9 ("net: mvneta: add basic XDP support") Cc: Lorenzo Bianconi Cc: Thomas Petazzoni Link: https://lore.kernel.org/r/20210105172333.21613-1-kabel@kernel.org Signed-off-by: Jakub Kicinski commit fcc42338375a1e67b8568dbb558f8b784d0f3b01 Author: Akilesh Kailash Date: Mon Dec 28 07:14:07 2020 +0000 dm snapshot: flush merged data before committing metadata If the origin device has a volatile write-back cache and the following events occur: 1: After finishing merge operation of one set of exceptions, merge_callback() is invoked. 2: Update the metadata in COW device tracking the merge completion. This update to COW device is flushed cleanly. 3: System crashes and the origin device's cache where the recent merge was completed has not been flushed. During the next cycle when we read the metadata from the COW device, we will skip reading those metadata whose merge was completed in step (1). This will lead to data loss/corruption. To address this, flush the origin device post merge IO before updating the metadata. Cc: stable@vger.kernel.org Signed-off-by: Akilesh Kailash Signed-off-by: Mike Snitzer commit 6f02b540d7597f357bc6ee711346761045d4e108 Author: Alan Maguire Date: Wed Jan 6 15:59:06 2021 +0000 bpftool: Fix compilation failure for net.o with older glibc For older glibc ~2.17, #include'ing both linux/if.h and net/if.h fails due to complaints about redefinition of interface flags: CC net.o In file included from net.c:13:0: /usr/include/linux/if.h:71:2: error: redeclaration of enumerator ‘IFF_UP’ IFF_UP = 1<<0, /* sysfs */ ^ /usr/include/net/if.h:44:5: note: previous definition of ‘IFF_UP’ was here IFF_UP = 0x1, /* Interface is up. */ The issue was fixed in kernel headers in [1], but since compilation of net.c picks up system headers the problem can recur. Dropping #include resolves the issue and it is not needed for compilation anyhow. [1] https://lore.kernel.org/netdev/1461512707-23058-1-git-send-email-mikko.rapeli__34748.27880641$1462831734$gmane$org@iki.fi/ Fixes: f6f3bac08ff9 ("tools/bpf: bpftool: add net support") Signed-off-by: Alan Maguire Signed-off-by: Andrii Nakryiko Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/1609948746-15369-1-git-send-email-alan.maguire@oracle.com commit 67a5a68013056cbcf0a647e36cb6f4622fb6a470 Author: Valdis Kletnieks Date: Sat Dec 26 13:21:58 2020 -0500 gcc-plugins: fix gcc 11 indigestion with plugins... Fedora Rawhide has started including gcc 11,and the g++ compiler throws a wobbly when it hits scripts/gcc-plugins: HOSTCXX scripts/gcc-plugins/latent_entropy_plugin.so In file included from /usr/include/c++/11/type_traits:35, from /usr/lib/gcc/x86_64-redhat-linux/11/plugin/include/system.h:244, from /usr/lib/gcc/x86_64-redhat-linux/11/plugin/include/gcc-plugin.h:28, from scripts/gcc-plugins/gcc-common.h:7, from scripts/gcc-plugins/latent_entropy_plugin.c:78: /usr/include/c++/11/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options. 32 | #error This file requires compiler and library support \ In fact, it works just fine with c++11, which has been in gcc since 4.8, and we now require 4.9 as a minimum. Signed-off-by: Valdis Kletnieks Acked-by: Josh Poimboeuf Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/82487.1609006918@turing-police commit 5efc1f4b454c6179d35e7b0c3eda0ad5763a00fc Author: Alex Deucher Date: Tue Jan 5 11:42:08 2021 -0500 Revert "drm/amd/display: Fix memory leaks in S3 resume" This reverts commit a135a1b4c4db1f3b8cbed9676a40ede39feb3362. This leads to blank screens on some boards after replugging a display. Revert until we understand the root cause and can fix both the leak and the blank screen after replug. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=211033 Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1427 Cc: Stylon Wang Cc: Harry Wentland Cc: Nicholas Kazlauskas Cc: Andre Tomt Cc: Oleksandr Natalenko Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit c241ed2f0ea549c18cff62a3708b43846b84dae3 Author: Alex Deucher Date: Mon Jan 4 11:24:20 2021 -0500 drm/amdgpu/display: drop DCN support for aarch64 From Ard: "Simply disabling -mgeneral-regs-only left and right is risky, given that the standard AArch64 ABI permits the use of FP/SIMD registers anywhere, and GCC is known to use SIMD registers for spilling, and may invent other uses of the FP/SIMD register file that have nothing to do with the floating point code in question. Note that putting kernel_neon_begin() and kernel_neon_end() around the code that does use FP is not sufficient here, the problem is in all the other code that may be emitted with references to SIMD registers in it. So the only way to do this properly is to put all floating point code in a separate compilation unit, and only compile that unit with -mgeneral-regs-only." Disable support until the code can be properly refactored to support this properly on aarch64. Acked-by: Will Deacon Reported-by: Ard Biesheuvel Signed-off-by: Alex Deucher commit 3851c90b7aa8f0c275d14636f0e7ccca69a2bf84 Author: John Clements Date: Tue Jan 5 14:53:14 2021 +0800 drm/amdgpu: enable ras eeprom support for sienna cichlid added I2C address and asic support flag Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit 8a82b347e8732fd2b68d26a6e9f0d9a1c397560d Author: Dennis Li Date: Tue Jan 5 08:37:21 2021 +0800 drm/amdgpu: fix no bad_pages issue after umc ue injection old code wrongly used the bad page status as the function return value, which cause amdgpu_ras_badpages_read always return failed. Signed-off-by: Dennis Li Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit e6d5c64efaa34aae3815a9afeb1314a976142e83 Author: Jiawei Gu Date: Tue Dec 29 20:35:33 2020 +0800 drm/amdgpu: fix potential memory leak during navi12 deinitialization Navi12 HDCP & DTM deinitialization needs continue to free bo if already created though initialized flag is not set. Reviewed-by: Alex Deucher Signed-off-by: Jiawei Gu Signed-off-by: Alex Deucher commit 4f6a05501eb9c57fb4c9efed70840aee523a393b Author: Arnd Bergmann Date: Sun Jan 3 15:02:32 2021 +0100 drm/amd/display: Fix unused variable warning Some of the newly added code is hidden inside of #ifdef blocks, but one variable is unused when debugfs is disabled: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:8370:8: error: unused variable 'configure_crc' [-Werror,-Wunused-variable] Change the #ifdef to an if(IS_ENABLED()) check to fix the warning and avoid adding more #ifdefs. Fixes: c920888c604d ("drm/amd/display: Expose new CRC window property") Reviewed-by: Wayne Lin Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher commit 98b64762080b96b0f8608da5fe161f1a7ab6f5de Author: Xiaojian Du Date: Tue Dec 29 17:19:37 2020 +0800 drm/amd/pm: improve the fine grain tuning function for RV/RV2/PCO This patch is to improve the fine grain tuning function for RV/RV2/PCO. The fine grain tuning function uses the sysfs node -- pp_od_clk_voltage to config gfxclk. Meanwhile, another sysfs node -- power_dpm_force_perfomance_level also affects the gfx clk. It will cause confusion when these two sysfs nodes works together. So this patch adds one flag to avoid this confusion, the flag will make these two sysfs nodes work separately. The flag is set as "disabled" by default, so the fine grain tuning function will be disabled by default. Only when power_dpm_force_perfomance_level is changed to "manual" mode, the flag will be set as "enabled", and the fine grain tuning function will be enabled. In other profile modes, including "auto", "high", "low", "profile_peak", "profile_standard", "profile_min_sclk", "profile_min_mclk", the flag will be set as "disabled", and the od range of fine grain tuning function will be restored default value. Signed-off-by: Xiaojian Du Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 44cb39e19a05ca711bcb6e776e0a4399223204a0 Author: Xiaojian Du Date: Wed Dec 30 18:08:23 2020 +0800 drm/amd/pm: fix the failure when change power profile for renoir This patch is to fix the failure when change power profile to "profile_peak" for renoir. Signed-off-by: Xiaojian Du Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 88e21af1b3f887d217f2fb14fc7e7d3cd87ebf57 Author: Dennis Li Date: Wed Dec 30 19:45:15 2020 +0800 drm/amdgpu: fix a GPU hang issue when remove device When GFXOFF is enabled and GPU is idle, driver will fail to access some registers. Therefore change to disable power gating before all access registers with MMIO. Dmesg log is as following: amdgpu 0000:03:00.0: amdgpu: amdgpu: finishing device. amdgpu: cp queue pipe 4 queue 0 preemption failed amdgpu 0000:03:00.0: amdgpu: failed to write reg 2890 wait reg 28a2 amdgpu 0000:03:00.0: amdgpu: failed to write reg 1a6f4 wait reg 1a706 amdgpu 0000:03:00.0: amdgpu: failed to write reg 2890 wait reg 28a2 amdgpu 0000:03:00.0: amdgpu: failed to write reg 1a6f4 wait reg 1a706 Signed-off-by: Dennis Li Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 9a029a3facc4d333100308a8e283d9210a36b94c Author: Dennis Li Date: Wed Dec 30 10:27:42 2020 +0800 drm/amdgpu: fix a memory protection fault when remove amdgpu device ASD and TA share the same firmware in SIENNA_CICHLID and only TA firmware is requested during boot, so only need release TA firmware when remove device. [ 83.877150] general protection fault, probably for non-canonical address 0x1269f97e6ed04095: 0000 [#1] SMP PTI [ 83.888076] CPU: 0 PID: 1312 Comm: modprobe Tainted: G W OE 5.9.0-rc5-deli-amd-vangogh-0.0.6.6-114-gdd99d5669a96-dirty #2 [ 83.901160] Hardware name: System manufacturer System Product Name/TUF Z370-PLUS GAMING II, BIOS 0411 09/21/2018 [ 83.912353] RIP: 0010:free_fw_priv+0xc/0x120 [ 83.917531] Code: e8 99 cd b0 ff b8 a1 ff ff ff eb 9f 4c 89 f7 e8 8a cd b0 ff b8 f4 ff ff ff eb 90 0f 1f 00 0f 1f 44 00 00 55 48 89 e5 41 54 53 <4c> 8b 67 18 48 89 fb 4c 89 e7 e8 45 94 41 00 b8 ff ff ff ff f0 0f [ 83.937576] RSP: 0018:ffffbc34c13a3ce0 EFLAGS: 00010206 [ 83.943699] RAX: ffffffffbb681850 RBX: ffffa047f117eb60 RCX: 0000000080800055 [ 83.951879] RDX: ffffbc34c1d5f000 RSI: 0000000080800055 RDI: 1269f97e6ed04095 [ 83.959955] RBP: ffffbc34c13a3cf0 R08: 0000000000000000 R09: 0000000000000001 [ 83.968107] R10: ffffbc34c13a3cc8 R11: 00000000ffffff00 R12: ffffa047d6b23378 [ 83.976166] R13: ffffa047d6b23338 R14: ffffa047d6b240c8 R15: 0000000000000000 [ 83.984295] FS: 00007f74f6712540(0000) GS:ffffa047fbe00000(0000) knlGS:0000000000000000 [ 83.993323] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 84.000056] CR2: 0000556a1cca4e18 CR3: 000000021faa8004 CR4: 00000000003706f0 [ 84.008128] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 84.016155] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 84.024174] Call Trace: [ 84.027514] release_firmware.part.11+0x4b/0x70 [ 84.033017] release_firmware+0x13/0x20 [ 84.037803] psp_sw_fini+0x77/0xb0 [amdgpu] [ 84.042857] amdgpu_device_fini+0x38c/0x5d0 [amdgpu] [ 84.048815] amdgpu_driver_unload_kms+0x43/0x70 [amdgpu] [ 84.055055] drm_dev_unregister+0x73/0xb0 [drm] [ 84.060499] drm_dev_unplug+0x28/0x30 [drm] [ 84.065598] amdgpu_dev_uninit+0x1b/0x40 [amdgpu] [ 84.071223] amdgpu_pci_remove+0x4e/0x70 [amdgpu] [ 84.076835] pci_device_remove+0x3e/0xc0 [ 84.081609] device_release_driver_internal+0xfb/0x1c0 [ 84.087558] driver_detach+0x4d/0xa0 [ 84.092041] bus_remove_driver+0x5f/0xe0 [ 84.096854] driver_unregister+0x2f/0x50 [ 84.101594] pci_unregister_driver+0x22/0xa0 [ 84.106806] amdgpu_exit+0x15/0x2b [amdgpu] Signed-off-by: Dennis Li Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit ed1df58585632dff96cc01e14857175dfdf67376 Author: Hawking Zhang Date: Thu Dec 31 13:05:09 2020 +0800 drm/amdgpu: switched to cached noretry setting for vangogh global noretry setting is cached to gmc.noretry Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 8ae291cc95e49011b736b641b0cfad502b7a1526 Author: Jason Gunthorpe Date: Tue Jan 5 13:13:27 2021 +0200 RDMA/ucma: Do not miss ctx destruction steps in some cases The destruction flow is very complicated here because the cm_id can be destroyed from the event handler at any time if the device is hot-removed. This leaves behind a partial ctx with no cm_id in the xarray, and will let user space leak memory. Make everything consistent in this flow in all places: - Return the xarray back to XA_ZERO_ENTRY before beginning any destruction. The thread that reaches this first is responsible to kfree, everyone else does nothing. - Test the xarray during the special hot-removal case to block the queue_work, this has much simpler locking and doesn't require a 'destroying' - Fix the ref initialization so that it is only positive if cm_id != NULL, then rely on that to guide the destruction process in all cases. Now the new ucma_destroy_private_ctx() can be called in all places that want to free the ctx, including all the error unwinds, and none of the details are missed. Fixes: a1d33b70dbbc ("RDMA/ucma: Rework how new connections are passed through event delivery") Link: https://lore.kernel.org/r/20210105111327.230270-1-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit a7b5d9dd57298333e6e9f4c167f01385d922bbfb Author: Kevin Wang Date: Tue Dec 29 14:10:28 2020 +0800 drm/amd/display: fix sysfs amdgpu_current_backlight_pwm NULL pointer issue fix NULL pointer issue when read sysfs amdgpu_current_backlight_pwm sysfs node. Call Trace: [ 248.273833] BUG: kernel NULL pointer dereference, address: 0000000000000130 [ 248.273930] #PF: supervisor read access in kernel mode [ 248.273993] #PF: error_code(0x0000) - not-present page [ 248.274054] PGD 0 P4D 0 [ 248.274092] Oops: 0000 [#1] SMP PTI [ 248.274138] CPU: 2 PID: 1377 Comm: cat Tainted: G OE 5.9.0-rc5-drm-next-5.9+ #1 [ 248.274233] Hardware name: System manufacturer System Product Name/Z170-A, BIOS 3802 03/15/2018 [ 248.274641] RIP: 0010:dc_link_get_backlight_level+0x5/0x70 [amdgpu] [ 248.274718] Code: 67 ff ff ff 41 b9 03 00 00 00 e9 45 ff ff ff d1 ea e9 55 ff ff ff 0f 1f 44 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 <48> 8b 87 30 01 00 00 48 8b 00 48 8b 88 88 03 00 00 48 8d 81 e8 01 [ 248.274919] RSP: 0018:ffffb5ad809b3df0 EFLAGS: 00010203 [ 248.274982] RAX: ffffa0f77d1c0010 RBX: ffffa0f793ae9168 RCX: 0000000000000001 [ 248.275064] RDX: ffffa0f79753db00 RSI: 0000000000000001 RDI: 0000000000000000 [ 248.275145] RBP: ffffb5ad809b3e00 R08: ffffb5ad809b3da0 R09: 0000000000000000 [ 248.275225] R10: ffffb5ad809b3e68 R11: 0000000000000000 R12: ffffa0f793ae9190 [ 248.275306] R13: ffffb5ad809b3ef0 R14: 0000000000000001 R15: ffffa0f793ae9168 [ 248.275388] FS: 00007f5f1ec4d540(0000) GS:ffffa0f79ec80000(0000) knlGS:0000000000000000 [ 248.275480] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 248.275547] CR2: 0000000000000130 CR3: 000000042a03c005 CR4: 00000000003706e0 [ 248.275628] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 248.275708] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 248.275789] Call Trace: [ 248.276124] ? current_backlight_read+0x24/0x40 [amdgpu] [ 248.276194] seq_read+0xc3/0x3f0 [ 248.276240] full_proxy_read+0x5c/0x90 [ 248.276290] vfs_read+0xa7/0x190 [ 248.276334] ksys_read+0xa7/0xe0 [ 248.276379] __x64_sys_read+0x1a/0x20 [ 248.276429] do_syscall_64+0x37/0x80 [ 248.276477] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 248.276538] RIP: 0033:0x7f5f1e75c191 [ 248.276585] Code: fe ff ff 48 8d 3d b7 9d 0a 00 48 83 ec 08 e8 46 4d 02 00 66 0f 1f 44 00 00 48 8d 05 71 07 2e 00 8b 00 85 c0 75 13 31 c0 0f 05 <48> 3d 00 f0 ff ff 77 57 f3 c3 0f 1f 44 00 00 41 54 55 49 89 d4 53Hw [ 248.276784] RSP: 002b:00007ffcb1fc3f38 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 [ 248.276872] RAX: ffffffffffffffda RBX: 0000000000020000 RCX: 00007f5f1e75c191 [ 248.276953] RDX: 0000000000020000 RSI: 00007f5f1ec2b000 RDI: 0000000000000003 [ 248.277034] RBP: 0000000000020000 R08: 00000000ffffffff R09: 0000000000000000 [ 248.277115] R10: 0000000000000022 R11: 0000000000000246 R12: 00007f5f1ec2b000 [ 248.277195] R13: 0000000000000003 R14: 00007f5f1ec2b00f R15: 0000000000020000 [ 248.277279] Modules linked in: amdgpu(OE) iommu_v2 gpu_sched ttm(OE) drm_kms_helper cec drm i2c_algo_bit fb_sys_fops syscopyarea sysfillrect sysimgblt rpcsec_gss_krb5 auth_rpcgss nfsv4 nfs lockd grace fscache nls_iso8859_1 snd_hda_codec_realtek snd_hda_codec_hdmi snd_hda_codec_generic ledtrig_audio intel_rapl_msr intel_rapl_common snd_hda_intel snd_intel_dspcfg x86_pkg_temp_thermal intel_powerclamp snd_hda_codec snd_hda_core snd_hwdep snd_pcm snd_seq_midi snd_seq_midi_event mei_hdcp coretemp snd_rawmidi snd_seq kvm_intel kvm snd_seq_device snd_timer irqbypass joydev snd input_leds soundcore crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel crypto_simd cryptd glue_helper rapl intel_cstate mac_hid mei_me serio_raw mei eeepc_wmi wmi_bmof asus_wmi mxm_wmi intel_wmi_thunderbolt acpi_pad sparse_keymap efi_pstore sch_fq_codel parport_pc ppdev lp parport sunrpc ip_tables x_tables autofs4 hid_logitech_hidpp hid_logitech_dj hid_generic usbhid hid e1000e psmouse ahci libahci wmi video [ 248.278211] CR2: 0000000000000130 [ 248.278221] ---[ end trace 1fbe72fe6f91091d ]--- [ 248.357226] RIP: 0010:dc_link_get_backlight_level+0x5/0x70 [amdgpu] [ 248.357272] Code: 67 ff ff ff 41 b9 03 00 00 00 e9 45 ff ff ff d1 ea e9 55 ff ff ff 0f 1f 44 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 <48> 8b 87 30 01 00 00 48 8b 00 48 8b 88 88 03 00 00 48 8d 81 e8 01 Signed-off-by: Kevin Wang Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit fc996f952df1c63b57e3a08ac612db53bf8abadc Author: John Clements Date: Fri Dec 25 12:22:51 2020 +0800 drm/amd/pm: updated PM to I2C controller port on sienna cichlid sienna cichlid interfaces with RAS eeprom on I2C controller port 1 Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit 37030aba0f362cf8b16eb2347c7430b2e9ef719e Author: Xiaojian Du Date: Fri Dec 18 14:32:02 2020 +0800 drm/amd/pm: improve the fine grain tuning function for RV/RV2/PCO This patch is to improve the fine grain tuning function for RV/RV2/PCO. This patch adds two new commands: "restore" and "commit". This function uses the pp_od_clk_voltage sysfs file to configure the min and max value of gfx clock frequency manually or restore the default value. Command guide: echo "s level value" > pp_od_clk_voltage "s" - set the sclk frequency "level" - 0 or 1, "0" represents the min value, "1" represents the max value "value" - the target value of sclk frequency, it should be limited in the safe range echo "r" > pp_od_clk_voltage "r" - reset the sclk frequency, restore the default value instantly echo "c" > pp_od_clk_voltage "c" - commit the min and max value of sclk frequency to the system only after the commit command, the target values set by "s" command will take effect. Example: 1)change power profile from "auto" to "manual" $ cat power_dpm_force_performance_level auto $ echo "manual" > power_dpm_force_performance_level $ cat power_dpm_force_performance_level manual 2)check the default sclk frequency $ cat pp_od_clk_voltage OD_SCLK: 0: 200Mhz 1: 1400Mhz OD_RANGE: SCLK: 200MHz 1400MHz 3)use "s" -- set command to configure the min and max sclk frequency $ echo "s 0 600" > pp_od_clk_voltage $ echo "s 1 1000" > pp_od_clk_voltage $ echo "c" > pp_od_clk_voltage $ cat pp_od_clk_voltage OD_SCLK: 0: 600Mhz 1: 1000Mhz OD_RANGE: SCLK: 200MHz 1400MHz 4)use "r" -- reset command to restore the min or max sclk frequency $ echo "r" > pp_od_clk_voltage $ cat pp_od_clk_voltage OD_SCLK: 0: 200Mhz 1: 1400Mhz OD_RANGE: SCLK: 200MHz 1400MHz Signed-off-by: Xiaojian Du Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 0e61f09af48beb41be0954e7be7d3ba2d18c9946 Author: Xiaojian Du Date: Mon Dec 14 17:05:55 2020 +0800 drm/amd/pm: correct the sensor value of power for vangogh This patch is to correct the sensor value of power for vangogh. Signed-off-by: Xiaojian Du Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 71c061d2443814de15e177489d5cc00a4a253ef3 Merge: 9f1abbe97c08b a8cc263eb58ca Author: Linus Torvalds Date: Wed Jan 6 11:19:08 2021 -0800 Merge tag 'for-5.11-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "A few more fixes that arrived before the end of the year: - a bunch of fixes related to transaction handle lifetime wrt various operations (umount, remount, qgroup scan, orphan cleanup) - async discard scheduling fixes - fix item size calculation when item keys collide for extend refs (hardlinks) - fix qgroup flushing from running transaction - fix send, wrong file path when there is an inode with a pending rmdir - fix deadlock when cloning inline extent and low on free metadata space" * tag 'for-5.11-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: run delayed iputs when remounting RO to avoid leaking them btrfs: add assertion for empty list of transactions at late stage of umount btrfs: fix race between RO remount and the cleaner task btrfs: fix transaction leak and crash after cleaning up orphans on RO mount btrfs: fix transaction leak and crash after RO remount caused by qgroup rescan btrfs: merge critical sections of discard lock in workfn btrfs: fix racy access to discard_ctl data btrfs: fix async discard stall btrfs: tests: initialize test inodes location btrfs: send: fix wrong file path when there is an inode with a pending rmdir btrfs: qgroup: don't try to wait flushing if we're already holding a transaction btrfs: correctly calculate item size used when item key collision happens btrfs: fix deadlock when cloning inline extent and low on free metadata space commit b8b54ad96e433e3895103a982dff017c5ca3fd16 Merge: c9c48bb701ba7 4b1a60a1bb8f0 Author: Greg Kroah-Hartman Date: Wed Jan 6 18:54:21 2021 +0100 Merge tag 'icc-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-misc-linus Georgi writes: interconnect fixes for v5.11 This contains a few fixes for iMX and Qualcomm drivers and also updates my email to my kernel.org address. - qcom: Fix rpmh link failures when compile test is enabled - imx: Add a missing of_node_put after of_device_is_available - imx: Remove a useless test - imx8mq: Use icc_sync_state Signed-off-by: Georgi Djakov * tag 'icc-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc: MAINTAINERS: Update Georgi's email address interconnect: imx8mq: Use icc_sync_state interconnect: imx: Remove a useless test interconnect: imx: Add a missing of_node_put after of_device_is_available interconnect: qcom: fix rpmh link failures commit 10a05404c4fe184ae9087fb49f1df5b84c1534dc Merge: 96ebc9c871d8a 54d0a3ab80f49 Author: Greg Kroah-Hartman Date: Wed Jan 6 18:53:26 2021 +0100 Merge tag 'usb-serial-5.11-rc3' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial fixes for 5.11-rc3 Here's a fix for a DMA-from-stack issue in iuu_phoenix and a couple of new modem device ids. All have been in linux-next with no reported issues. * tag 'usb-serial-5.11-rc3' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: iuu_phoenix: fix DMA from stack USB: serial: option: add LongSung M5710 module support USB: serial: option: add Quectel EM160R-GL commit 3d1a90ab0ed93362ec8ac85cf291243c87260c21 Author: Dave Wysochanski Date: Fri Dec 11 05:12:51 2020 -0500 NFS4: Fix use-after-free in trace_event_raw_event_nfs4_set_lock It is only safe to call the tracepoint before rpc_put_task() because 'data' is freed inside nfs4_lock_release (rpc_release). Fixes: 48c9579a1afe ("Adding stateid information to tracepoints") Signed-off-by: Dave Wysochanski Signed-off-by: Trond Myklebust commit 00b8c557d096f0930d5c07df618223d3d06902d6 Author: Matthias Maennich Date: Wed Jan 6 15:52:01 2021 +0000 staging: ION: remove some references to CONFIG_ION With commit e722a295cf49 ("staging: ion: remove from the tree"), ION and its corresponding config CONFIG_ION is gone. Remove stale references from drivers/staging/media/atomisp/pci and from the recommended Android kernel config. Fixes: e722a295cf49 ("staging: ion: remove from the tree") Cc: Hridya Valsaraju Cc: Rob Herring Cc: linux-media@vger.kernel.org Cc: devel@driverdev.osuosl.org Signed-off-by: Matthias Maennich Link: https://lore.kernel.org/r/20210106155201.2845319-1-maennich@google.com Signed-off-by: Greg Kroah-Hartman commit 3e2224c5867fead6c0b94b84727cc676ac6353a3 Author: Matthew Wilcox (Oracle) Date: Wed Jan 6 16:09:26 2021 +0000 io_uring: Fix return value from alloc_fixed_file_ref_node alloc_fixed_file_ref_node() currently returns an ERR_PTR on failure. io_sqe_files_unregister() expects it to return NULL and since it can only return -ENOMEM, it makes more sense to change alloc_fixed_file_ref_node() to behave that way. Fixes: 1ffc54220c44 ("io_uring: fix io_sqe_files_unregister() hangs") Reported-by: Dan Carpenter Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Jens Axboe commit cb7f4a8b1fb426a175d1708f05581939c61329d4 Author: Ying-Tsun Huang Date: Tue Dec 15 15:07:20 2020 +0800 x86/mtrr: Correct the range check before performing MTRR type lookups In mtrr_type_lookup(), if the input memory address region is not in the MTRR, over 4GB, and not over the top of memory, a write-back attribute is returned. These condition checks are for ensuring the input memory address region is actually mapped to the physical memory. However, if the end address is just aligned with the top of memory, the condition check treats the address is over the top of memory, and write-back attribute is not returned. And this hits in a real use case with NVDIMM: the nd_pmem module tries to map NVDIMMs as cacheable memories when NVDIMMs are connected. If a NVDIMM is the last of the DIMMs, the performance of this NVDIMM becomes very low since it is aligned with the top of memory and its memory type is uncached-minus. Move the input end address change to inclusive up into mtrr_type_lookup(), before checking for the top of memory in either mtrr_type_lookup_{variable,fixed}() helpers. [ bp: Massage commit message. ] Fixes: 0cc705f56e40 ("x86/mm/mtrr: Clean up mtrr_type_lookup()") Signed-off-by: Ying-Tsun Huang Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201215070721.4349-1-ying-tsun.huang@amd.com commit ad0a6bad44758afa3b440c254a24999a0c7e35d5 Author: Wei Liu Date: Tue Jan 5 17:50:43 2021 +0000 x86/hyperv: check cpu mask after interrupt has been disabled We've observed crashes due to an empty cpu mask in hyperv_flush_tlb_others. Obviously the cpu mask in question is changed between the cpumask_empty call at the beginning of the function and when it is actually used later. One theory is that an interrupt comes in between and a code path ends up changing the mask. Move the check after interrupt has been disabled to see if it fixes the issue. Signed-off-by: Wei Liu Cc: stable@kernel.org Link: https://lore.kernel.org/r/20210105175043.28325-1-wei.liu@kernel.org Reviewed-by: Michael Kelley commit 3ce47d95b7346dcafd9bed3556a8d072cb2b8571 Author: Nathan Chancellor Date: Mon Jan 4 13:59:53 2021 -0700 powerpc: Handle .text.{hot,unlikely}.* in linker script Commit eff8728fe698 ("vmlinux.lds.h: Add PGO and AutoFDO input sections") added ".text.unlikely.*" and ".text.hot.*" due to an LLVM change [1]. After another LLVM change [2], these sections are seen in some PowerPC builds, where there is a orphan section warning then build failure: $ make -skj"$(nproc)" \ ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- LLVM=1 O=out \ distclean powernv_defconfig zImage.epapr ld.lld: warning: kernel/built-in.a(panic.o):(.text.unlikely.) is being placed in '.text.unlikely.' ... ld.lld: warning: address (0xc000000000009314) of section .text is not a multiple of alignment (256) ... ERROR: start_text address is c000000000009400, should be c000000000008000 ERROR: try to enable LD_HEAD_STUB_CATCH config option ERROR: see comments in arch/powerpc/tools/head_check.sh ... Explicitly handle these sections like in the main linker script so there is no more build failure. [1]: https://reviews.llvm.org/D79600 [2]: https://reviews.llvm.org/D92493 Fixes: 83a092cf95f2 ("powerpc: Link warning for orphan sections") Cc: stable@vger.kernel.org Signed-off-by: Nathan Chancellor Signed-off-by: Michael Ellerman Link: https://github.com/ClangBuiltLinux/linux/issues/1218 Link: https://lore.kernel.org/r/20210104205952.1399409-1-natechancellor@gmail.com commit 2b59787a223b79228fed9ade1bf6936194ddb8cd Author: Max Gurtovoy Date: Tue Jan 5 10:34:02 2021 +0000 nvme: remove the unused status argument from nvme_trace_bio_complete The only used argument in this function is the "req". Signed-off-by: Max Gurtovoy Reviewed-by: Minwoo Im Signed-off-by: Christoph Hellwig commit 9ceb7863537748c67fa43ac4f2f565819bbd36e4 Author: Israel Rukshin Date: Tue Jan 5 10:46:54 2021 +0200 nvmet-rdma: Fix list_del corruption on queue establishment failure When a queue is in NVMET_RDMA_Q_CONNECTING state, it may has some requests at rsp_wait_list. In case a disconnect occurs at this state, no one will empty this list and will return the requests to free_rsps list. Normally nvmet_rdma_queue_established() free those requests after moving the queue to NVMET_RDMA_Q_LIVE state, but in this case __nvmet_rdma_queue_disconnect() is called before. The crash happens at nvmet_rdma_free_rsps() when calling list_del(&rsp->free_list), because the request exists only at the wait list. To fix the issue, simply clear rsp_wait_list when destroying the queue. Signed-off-by: Israel Rukshin Reviewed-by: Max Gurtovoy Signed-off-by: Christoph Hellwig commit 9b66fc02bec0ca613bc6d4c1d0049f727a95567d Author: Minwoo Im Date: Wed Dec 30 20:22:44 2020 +0900 nvme: unexport functions with no external caller There are no callers for nvme_reset_ctrl_sync() and nvme_alloc_request_qid() so that we keep the symbols exported. Unexport those functions, mark them static and update the header file respectively. Signed-off-by: Minwoo Im Signed-off-by: Christoph Hellwig commit 62df80165d7f197c9c0652e7416164f294a96661 Author: Lalithambika Krishnakumar Date: Wed Dec 23 14:09:00 2020 -0800 nvme: avoid possible double fetch in handling CQE While handling the completion queue, keep a local copy of the command id from the DMA-accessible completion entry. This silences a time-of-check to time-of-use (TOCTOU) warning from KF/x[1], with respect to a Thunderclap[2] vulnerability analysis. The double-read impact appears benign. There may be a theoretical window for @command_id to be used as an adversary-controlled array-index-value for mounting a speculative execution attack, but that mitigation is saved for a potential follow-on. A man-in-the-middle attack on the data payload is out of scope for this analysis and is hopefully mitigated by filesystem integrity mechanisms. [1] https://github.com/intel/kernel-fuzzer-for-xen-project [2] http://thunderclap.io/thunderclap-paper-ndss2019.pdf Signed-off-by: Lalithambika Krishna Kumar Signed-off-by: Christoph Hellwig commit 5c11f7d9f843bdd24cd29b95401938bc3f168070 Author: Sagi Grimberg Date: Mon Dec 21 00:03:39 2020 -0800 nvme-tcp: Fix possible race of io_work and direct send We may send a request (with or without its data) from two paths: 1. From our I/O context nvme_tcp_io_work which is triggered from: - queue_rq - r2t reception - socket data_ready and write_space callbacks 2. Directly from queue_rq if the send_list is empty (because we want to save the context switch associated with scheduling our io_work). However, given that now we have the send_mutex, we may run into a race condition where none of these contexts will send the pending payload to the controller. Both io_work send path and queue_rq send path opportunistically attempt to acquire the send_mutex however queue_rq only attempts to send a single request, and if io_work context fails to acquire the send_mutex it will complete without rescheduling itself. The race can trigger with the following sequence: 1. queue_rq sends request (no incapsule data) and blocks 2. RX path receives r2t - prepares data PDU to send, adds h2cdata PDU to the send_list and schedules io_work 3. io_work triggers and cannot acquire the send_mutex - because of (1), ends without self rescheduling 4. queue_rq completes the send, and completes ==> no context will send the h2cdata - timeout. Fix this by having queue_rq sending as much as it can from the send_list such that if it still has any left, its because the socket buffer is full and the socket write_space callback will trigger, thus guaranteeing that a context will be scheduled to send the h2cdata PDU. Fixes: db5ad6b7f8cd ("nvme-tcp: try to send request in queue_rq context") Reported-by: Potnuri Bharat Teja Reported-by: Samuel Jones Signed-off-by: Sagi Grimberg Tested-by: Potnuri Bharat Teja Signed-off-by: Christoph Hellwig commit 7ee5c78ca3895d44e918c38332921983ed678be0 Author: Gopal Tiwari Date: Fri Dec 4 21:46:57 2020 +0530 nvme-pci: mark Samsung PM1725a as IGNORE_DEV_SUBNQN A system with more than one of these SSDs will only have one usable. Hence the kernel fails to detect nvme devices due to duplicate cntlids. [ 6.274554] nvme nvme1: Duplicate cntlid 33 with nvme0, rejecting [ 6.274566] nvme nvme1: Removing after probe failure status: -22 Adding the NVME_QUIRK_IGNORE_DEV_SUBNQN quirk to resolves the issue. Signed-off-by: Gopal Tiwari Signed-off-by: Christoph Hellwig commit 2b54996b7d56badc563755840838614f2fa9c4de Author: James Smart Date: Mon Dec 7 12:29:40 2020 -0800 nvme-fcloop: Fix sscanf type and list_first_entry_or_null warnings Kernel robot had the following warnings: >> fcloop.c:1506:6: warning: %x in format string (no. 1) requires >> 'unsigned int *' but the argument type is 'signed int *'. >> [invalidScanfArgType_int] >> if (sscanf(buf, "%x:%d:%d", &opcode, &starting, &amount) != 3) >> ^ Resolve by changing opcode from and int to an unsigned int and >> fcloop.c:1632:32: warning: Uninitialized variable: lport [uninitvar] >> ret = __wait_localport_unreg(lport); >> ^ >> fcloop.c:1615:28: warning: Uninitialized variable: nport [uninitvar] >> ret = __remoteport_unreg(nport, rport); >> ^ These aren't actual issues as the values are assigned prior to use. It appears the tool doesn't understand list_first_entry_or_null(). Regardless, quiet the tool by initializing the pointers to NULL at declaration. Signed-off-by: James Smart Signed-off-by: Christoph Hellwig commit 19fce0470f05031e6af36e49ce222d0f0050d432 Author: James Smart Date: Tue Dec 1 17:52:43 2020 -0800 nvme-fc: avoid calling _nvme_fc_abort_outstanding_ios from interrupt context Recent patches changed calling sequences. nvme_fc_abort_outstanding_ios used to be called from a timeout or work context. Now it is being called in an io completion context, which can be an interrupt handler. Unfortunately, the abort outstanding ios routine attempts to stop nvme queues and nested routines that may try to sleep, which is in conflict with the interrupt handler. Correct replacing the direct call with a work element scheduling, and the abort outstanding ios routine will be called in the work element. Fixes: 95ced8a2c72d ("nvme-fc: eliminate terminate_io use by nvme_fc_error_recovery") Signed-off-by: James Smart Reported-by: Daniel Wagner Tested-by: Daniel Wagner Signed-off-by: Christoph Hellwig commit be2553358cd40c0db11d1aa96f819c07413b2aae Author: Lukas Bulwahn Date: Mon Dec 14 10:54:24 2020 +0100 scsi: sd: Remove obsolete variable in sd_remove() Commit 996e509bbc95 ("sd: use __register_blkdev to avoid a modprobe for an unregistered dev_t") removed blk_register_region(devt, ...) in sd_remove() and since then, devt is unused in sd_remove(). Hence, make W=1 warns: drivers/scsi/sd.c:3516:8: warning: variable 'devt' set but not used [-Wunused-but-set-variable] Simply remove this obsolete variable. [mkp: fixed commit sha] Link: https://lore.kernel.org/r/20201214095424.12479-1-lukas.bulwahn@gmail.com Reviewed-by: Christoph Hellwig Reviewed-by: Nathan Chancellor Acked-by: Martin K. Petersen Signed-off-by: Lukas Bulwahn Signed-off-by: Martin K. Petersen commit e5cc9002caafacbaa8dab878d17a313192c3b03b Author: Ewan D. Milne Date: Mon Dec 7 17:10:21 2020 -0500 scsi: sd: Suppress spurious errors when WRITE SAME is being disabled The block layer code will split a large zeroout request into multiple bios and if WRITE SAME is disabled because the storage device reports that it does not support it (or support the length used), we can get an error message from the block layer despite the setting of RQF_QUIET on the first request. This is because more than one request may have already been submitted. Fix this by setting RQF_QUIET when BLK_STS_TARGET is returned to fail the request early, we don't need to log a message because we did not actually submit the command to the device, and the block layer code will handle the error by submitting individual write bios. Link: https://lore.kernel.org/r/20201207221021.28243-1-emilne@redhat.com Reviewed-by: Christoph Hellwig Signed-off-by: Ewan D. Milne Signed-off-by: Martin K. Petersen commit 3b01d7ea4dae907d34fa0eeb3f17bacd714c6d0c Author: Dinghao Liu Date: Sat Dec 26 14:15:03 2020 +0800 scsi: scsi_debug: Fix memleak in scsi_debug_init() When sdeb_zbc_model does not match BLK_ZONED_NONE, BLK_ZONED_HA or BLK_ZONED_HM, we should free sdebug_q_arr to prevent memleak. Also there is no need to execute sdebug_erase_store() on failure of sdeb_zbc_model_str(). Link: https://lore.kernel.org/r/20201226061503.20050-1-dinghao.liu@zju.edu.cn Acked-by: Douglas Gilbert Signed-off-by: Dinghao Liu Signed-off-by: Martin K. Petersen commit 39718fe7adb1a79f78be23f058299bc038cbe161 Author: Colin Ian King Date: Thu Dec 17 17:20:19 2020 +0000 scsi: mpt3sas: Fix spelling mistake in Kconfig "compatiblity" -> "compatibility" There is a spelling mistake in the Kconfig help text. Fix it. Link: https://lore.kernel.org/r/20201217172019.57768-1-colin.king@canonical.com Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen commit d50c7986fbf0e2167279e110a2ed5bd8e811c660 Author: Nilesh Javali Date: Thu Dec 17 02:51:44 2020 -0800 scsi: qedi: Correct max length of CHAP secret The CHAP secret displayed garbage characters causing iSCSI login authentication failure. Correct the CHAP password max length. Link: https://lore.kernel.org/r/20201217105144.8055-1-njavali@marvell.com Reviewed-by: Lee Duncan Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 35fc4cd34426c242ab015ef280853b7bff101f48 Author: Can Guo Date: Mon Dec 28 04:04:36 2020 -0800 scsi: ufs: Correct the LUN used in eh_device_reset_handler() callback Users can initiate resets to specific SCSI device/target/host through IOCTL. When this happens, the SCSI cmd passed to eh_device/target/host _reset_handler() callbacks is initialized with a request whose tag is -1. In this case it is not right for eh_device_reset_handler() callback to count on the LUN get from hba->lrb[-1]. Fix it by getting LUN from the SCSI device associated with the SCSI cmd. Link: https://lore.kernel.org/r/1609157080-26283-1-git-send-email-cang@codeaurora.org Reviewed-by: Avri Altman Reviewed-by: Stanley Chu Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit 6948a96a0d69b7e8203758f44849ce4ab06ff788 Author: Kiwoong Kim Date: Sat Dec 19 15:40:39 2020 +0900 scsi: ufs: Relocate flush of exceptional event The current flush location does not guarantee disabling BKOPS for the case of requesting device power off. 1) The exceptional event handler is queued 2) ufs suspend starts with a request of device power off 3) BKOPS is disabled in ufs suspend 4) The queued work for the handler is done and BKOPS is re-enabled Relocate the flush statement to ensure BKOPS remain disabled. Link: https://lore.kernel.org/r/1608360039-16390-1-git-send-email-kwmad.kim@samsung.com Reviewed-by: Can Guo Reviewed-by: Stanley Chu Signed-off-by: Kiwoong Kim Signed-off-by: Martin K. Petersen commit 4ceb06e7c336f4a8d3f3b6ac9a4fea2e9c97dc07 Author: Colin Xu Date: Tue Dec 1 14:03:29 2020 +0800 drm/i915/gvt: Fix vfio_edid issue for BXT/APL BXT/APL has different isr/irr/hpd regs compared with other GEN9. If not setting these regs bits correctly according to the emulated monitor (currently a DP on PORT_B), although gvt still triggers a virtual HPD event, the guest driver won't detect a valid HPD pulse thus no full display detection will be executed to read the updated EDID. With this patch, the vfio_edid is enabled again on BXT/APL, which is previously disabled. Fixes: 642403e3599e ("drm/i915/gvt: Temporarily disable vfio_edid for BXT/APL") Signed-off-by: Colin Xu Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20201201060329.142375-1-colin.xu@intel.com Reviewed-by: Zhenyu Wang commit 21acf4601cc63cf564c6fc1a74d81b191313c929 Author: Stanley Chu Date: Tue Dec 22 15:29:05 2020 +0800 scsi: ufs: Relax the condition of UFSHCI_QUIRK_SKIP_MANUAL_WB_FLUSH_CTRL UFSHCI_QUIRK_SKIP_MANUAL_WB_FLUSH_CTRL is intended to skip enabling fWriteBoosterBufferFlushEn while WriteBooster is initializing. Therefore it is better to apply the checking during WriteBooster initialization only. Link: https://lore.kernel.org/r/20201222072905.32221-3-stanley.chu@mediatek.com Reviewed-by: Can Guo Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 1d53864c3617f5235f891ca0fbe9347c4cd35d46 Author: Stanley Chu Date: Tue Dec 22 15:29:04 2020 +0800 scsi: ufs: Fix possible power drain during system suspend Currently if device needs to do flush or BKOP operations, the device VCC power is kept during runtime-suspend period. However, if system suspend is happening while device is runtime-suspended, such power may not be disabled successfully. The reasons may be, 1. If current PM level is the same as SPM level, device will keep runtime-suspended by ufshcd_system_suspend(). 2. Flush recheck work may not be scheduled successfully during system suspend period. If it can wake up the system, this is also not the intention of the recheck work. To fix this issue, simply runtime-resume the device if the flush is allowed during runtime suspend period. Flush capability will be disabled while leaving runtime suspend, and also not be allowed in system suspend period. Link: https://lore.kernel.org/r/20201222072905.32221-2-stanley.chu@mediatek.com Fixes: 51dd905bd2f6 ("scsi: ufs: Fix WriteBooster flush during runtime suspend") Reviewed-by: Chaotian Jing Reviewed-by: Can Guo Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 67208692802ce3cacfa00fe586dc0cb1bef0a51c Author: Jiri Olsa Date: Wed Jan 6 00:42:19 2021 +0100 tools/resolve_btfids: Warn when having multiple IDs for single type The kernel image can contain multiple types (structs/unions) with the same name. This causes distinct type hierarchies in BTF data and makes resolve_btfids fail with error like: BTFIDS vmlinux FAILED unresolved symbol udp6_sock as reported by Qais Yousef [1]. This change adds warning when multiple types of the same name are detected: BTFIDS vmlinux WARN: multiple IDs found for 'file': 526, 113351 - using 526 WARN: multiple IDs found for 'sk_buff': 2744, 113958 - using 2744 We keep the lower ID for the given type instance and let the build continue. Also changing the 'nr' variable name to 'nr_types' to avoid confusion. [1] https://lore.kernel.org/lkml/20201229151352.6hzmjvu3qh6p2qgg@e107158-lin/ Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210105234219.970039-1-jolsa@kernel.org commit 3503ee6c0bec5f173d606359e6384a5ef85492fb Author: Po-Hsu Lin Date: Tue Jan 5 18:17:40 2021 +0800 selftests: fix the return value for UDP GRO test The udpgro.sh will always return 0 (unless the bpf selftest was not build first) even if there are some failed sub test-cases. Therefore the kselftest framework will report this case is OK. Check and return the exit status of each test to make it easier to spot real failures. Signed-off-by: Po-Hsu Lin Signed-off-by: David S. Miller commit 445c6198fe7be03b7d38e66fe8d4b3187bc251d4 Author: Michael Ellerman Date: Tue Jan 5 20:15:15 2021 +1100 net: ethernet: fs_enet: Add missing MODULE_LICENSE Since commit 1d6cd3929360 ("modpost: turn missing MODULE_LICENSE() into error") the ppc32_allmodconfig build fails with: ERROR: modpost: missing MODULE_LICENSE() in drivers/net/ethernet/freescale/fs_enet/mii-fec.o ERROR: modpost: missing MODULE_LICENSE() in drivers/net/ethernet/freescale/fs_enet/mii-bitbang.o Add the missing MODULE_LICENSEs to fix the build. Both files include a copyright header indicating they are GPL v2. Signed-off-by: Michael Ellerman Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 4beb17e553b49c3dd74505c9f361e756aaae653e Author: Qinglang Miao Date: Tue Jan 5 13:57:54 2021 +0800 net: qrtr: fix null-ptr-deref in qrtr_ns_remove A null-ptr-deref bug is reported by Hulk Robot like this: -------------- KASAN: null-ptr-deref in range [0x0000000000000128-0x000000000000012f] Call Trace: qrtr_ns_remove+0x22/0x40 [ns] qrtr_proto_fini+0xa/0x31 [qrtr] __x64_sys_delete_module+0x337/0x4e0 do_syscall_64+0x34/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x468ded -------------- When qrtr_ns_init fails in qrtr_proto_init, qrtr_ns_remove which would be called later on would raise a null-ptr-deref because qrtr_ns.workqueue has been destroyed. Fix it by making qrtr_ns_init have a return value and adding a check in qrtr_proto_init. Reported-by: Hulk Robot Signed-off-by: Qinglang Miao Signed-off-by: David S. Miller commit 7a68d725e4ea384977445e0bcaed3d7de83ab5b3 Author: Jouni K. Seppänen Date: Tue Jan 5 06:52:49 2021 +0200 net: cdc_ncm: correct overhead in delayed_ndp_size Aligning to tx_ndp_modulus is not sufficient because the next align call can be cdc_ncm_align_tail, which can add up to ctx->tx_modulus + ctx->tx_remainder - 1 bytes. This used to lead to occasional crashes on a Huawei 909s-120 LTE module as follows: - the condition marked /* if there is a remaining skb [...] */ is true so the swaps happen - skb_out is set from ctx->tx_curr_skb - skb_out->len is exactly 0x3f52 - ctx->tx_curr_size is 0x4000 and delayed_ndp_size is 0xac (note that the sum of skb_out->len and delayed_ndp_size is 0x3ffe) - the for loop over n is executed once - the cdc_ncm_align_tail call marked /* align beginning of next frame */ increases skb_out->len to 0x3f56 (the sum is now 0x4002) - the condition marked /* check if we had enough room left [...] */ is false so we break out of the loop - the condition marked /* If requested, put NDP at end of frame. */ is true so the NDP is written into skb_out - now skb_out->len is 0x4002, so padding_count is minus two interpreted as an unsigned number, which is used as the length argument to memset, leading to a crash with various symptoms but usually including > Call Trace: > > cdc_ncm_fill_tx_frame+0x83a/0x970 [cdc_ncm] > cdc_mbim_tx_fixup+0x1d9/0x240 [cdc_mbim] > usbnet_start_xmit+0x5d/0x720 [usbnet] The cdc_ncm_align_tail call first aligns on a ctx->tx_modulus boundary (adding at most ctx->tx_modulus-1 bytes), then adds ctx->tx_remainder bytes. Alternatively, the next alignment call can occur in cdc_ncm_ndp16 or cdc_ncm_ndp32, in which case at most ctx->tx_ndp_modulus-1 bytes are added. A similar problem has occurred before, and the code is nontrivial to reason about, so add a guard before the crashing call. By that time it is too late to prevent any memory corruption (we'll have written past the end of the buffer already) but we can at least try to get a warning written into an on-disk log by avoiding the hard crash caused by padding past the buffer with a huge number of zeros. Signed-off-by: Jouni K. Seppänen Fixes: 4a0e3e989d66 ("cdc_ncm: Add support for moving NDP to end of NCM frame") Link: https://bugzilla.kernel.org/show_bug.cgi?id=209407 Reported-by: kernel test robot Reviewed-by: Bjørn Mork Signed-off-by: David S. Miller commit be8d1e0e737941b8316ba125866b044473c164c8 Merge: 9f9d41f03bb07 ab6e32d2913a5 Author: David S. Miller Date: Tue Jan 5 16:46:41 2021 -0800 Merge branch 'hns3-fixes' Huazhong Tan says: ==================== net: hns3: fixes for -net There are some bugfixes for the HNS3 ethernet driver. ==================== Signed-off-by: David S. Miller commit ab6e32d2913a594bc8f822ce4a75c400190b2ecc Author: Jian Shen Date: Tue Jan 5 11:37:28 2021 +0800 net: hns3: fix incorrect handling of sctp6 rss tuple For DEVICE_VERSION_V2, the hardware only supports src-ip, dst-ip and verification-tag for rss tuple set of sctp6 packet. For DEVICE_VERSION_V3, the hardware supports src-port and dst-port as well. Currently, when user queries the sctp6 rss tuples info, some unsupported information will be showed on V2. So add a check for hardware version when initializing and queries sctp6 rss tuple to fix this issue. Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 65e61e3c2a619c4d4b873885b2d5394025ed117b Author: Yufeng Mo Date: Tue Jan 5 11:37:27 2021 +0800 net: hns3: fix the number of queues actually used by ARQ HCLGE_MBX_MAX_ARQ_MSG_NUM is used to apply memory for the number of queues used by ARQ(Asynchronous Receive Queue), so the head and tail pointers should also use this macro. Fixes: 07a0556a3a73 ("net: hns3: Changes to support ARQ(Asynchronous Receive Queue)") Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit f04bbcbf1e38d192e94bbfa126731a52332c40b1 Author: Yonglong Liu Date: Tue Jan 5 11:37:26 2021 +0800 net: hns3: fix a phy loopback fail issue When phy driver does not implement the set_loopback interface, phy loopback test will return -EOPNOTSUPP, and the loopback test will fail. So when phy driver does not implement the set_loopback interface, don't do phy loopback test. Fixes: c9765a89d142 ("net: hns3: add phy selftest function") Signed-off-by: Yonglong Liu Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 9f9d41f03bb07069e6e83ff4720cfea74a63898d Author: Jakub Kicinski Date: Mon Jan 4 17:22:24 2021 -0800 docs: net: fix documentation on .ndo_get_stats Fix calling context. Signed-off-by: Jakub Kicinski Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit 8db25530835e09e0fbda3cabed1f7c5d1f1cd0c4 Merge: 55b7ab1178cbf 9b1e39cf5dd81 Author: David S. Miller Date: Tue Jan 5 16:32:08 2021 -0800 Merge branch 'stmmac-fixes' Samuel Holland says: ==================== Fixes for dwmac-sun8i suspend/resume This series fixes issues preventing dwmac-sun8i from working after a suspend/resume cycle. Those issues include the PHY being left powered off, the MAC syscon configuration being reset, and the reference to the reset controller being improperly dropped. They also fix related issues in probe error handling and driver removal. ==================== Signed-off-by: David S. Miller commit 9b1e39cf5dd81f33186cdb950fcf75a121f1a9a7 Author: Samuel Holland Date: Sun Jan 3 05:17:44 2021 -0600 net: stmmac: dwmac-sun8i: Balance syscon (de)initialization Previously, sun8i_dwmac_set_syscon was called from a chain of functions in several different files: sun8i_dwmac_probe stmmac_dvr_probe stmmac_hw_init stmmac_hwif_init sun8i_dwmac_setup sun8i_dwmac_set_syscon which made the lifetime of the syscon values hard to reason about. Part of the problem is that there is no similar platform driver callback from stmmac_dvr_remove. As a result, the driver unset the syscon value in sun8i_dwmac_exit, but this leaves it uninitialized after a suspend/ resume cycle. It was also unset a second time (outside sun8i_dwmac_exit) in the probe error path. Move the init to the earliest available place in sun8i_dwmac_probe (after stmmac_probe_config_dt, which initializes plat_dat), and the deinit to the corresponding position in the cleanup order. Since priv is not filled in until stmmac_dvr_probe, this requires changing the sun8i_dwmac_set_syscon parameters to priv's two relevant members. Fixes: 9f93ac8d4085 ("net-next: stmmac: Add dwmac-sun8i") Fixes: 634db83b8265 ("net: stmmac: dwmac-sun8i: Handle integrated/external MDIOs") Signed-off-by: Samuel Holland Signed-off-by: David S. Miller commit b8239638853e3e37b287e4bd4d57b41f14c78550 Author: Samuel Holland Date: Sun Jan 3 05:17:43 2021 -0600 net: stmmac: dwmac-sun8i: Balance internal PHY power sun8i_dwmac_exit calls sun8i_dwmac_unpower_internal_phy, but sun8i_dwmac_init did not call sun8i_dwmac_power_internal_phy. This caused PHY power to remain off after a suspend/resume cycle. Fix this by recording if PHY power should be restored, and if so, restoring it. Fixes: 634db83b8265 ("net: stmmac: dwmac-sun8i: Handle integrated/external MDIOs") Signed-off-by: Samuel Holland Signed-off-by: David S. Miller commit 529254216773acd5039c07aa18cf06fd1f9fccdd Author: Samuel Holland Date: Sun Jan 3 05:17:42 2021 -0600 net: stmmac: dwmac-sun8i: Balance internal PHY resource references While stmmac_pltfr_remove calls sun8i_dwmac_exit, the sun8i_dwmac_init and sun8i_dwmac_exit functions are also called by the stmmac_platform suspend/resume callbacks. They may be called many times during the device's lifetime and should not release resources used by the driver. Furthermore, there was no error handling in case registering the MDIO mux failed during probe, and the EPHY clock was never released at all. Fix all of these issues by moving the deinitialization code to a driver removal callback. Also ensure the EPHY is powered down before removal. Fixes: 634db83b8265 ("net: stmmac: dwmac-sun8i: Handle integrated/external MDIOs") Signed-off-by: Samuel Holland Reviewed-by: Chen-Yu Tsai Signed-off-by: David S. Miller commit 7eeecc4b1f480c7ba1932cb9a7693f8c452640f2 Author: Samuel Holland Date: Sun Jan 3 05:17:41 2021 -0600 net: stmmac: dwmac-sun8i: Fix probe error handling stmmac_pltfr_remove does three things in one function, making it inapproprate for unwinding the steps in the probe function. Currently, a failure before the call to stmmac_dvr_probe would leak OF node references due to missing a call to stmmac_remove_config_dt. And an error in stmmac_dvr_probe would cause the driver to attempt to remove a netdevice that was never added. Fix these by reordering the init and splitting out the error handling steps. Fixes: 9f93ac8d4085 ("net-next: stmmac: Add dwmac-sun8i") Fixes: 40a1dcee2d18 ("net: ethernet: dwmac-sun8i: Use the correct function in exit path") Signed-off-by: Samuel Holland Reviewed-by: Chen-Yu Tsai Signed-off-by: David S. Miller commit 55b7ab1178cbf41f979ff83236d3321ad35ed2ad Author: Jakub Kicinski Date: Wed Dec 30 19:40:27 2020 -0800 net: vlan: avoid leaks on register_vlan_dev() failures VLAN checks for NETREG_UNINITIALIZED to distinguish between registration failure and unregistration in progress. Since commit cb626bf566eb ("net-sysfs: Fix reference count leak") registration failure may, however, result in NETREG_UNREGISTERED as well as NETREG_UNINITIALIZED. This fix is similer to cebb69754f37 ("rtnetlink: Fix memory(net_device) leak when ->newlink fails") Fixes: cb626bf566eb ("net-sysfs: Fix reference count leak") Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit cf0720697143f3eaa0779cca5a6602d8557d1c6f Author: Jakub Kicinski Date: Wed Dec 30 19:37:53 2020 -0800 net: suggest L2 discards be counted towards rx_dropped From the existing definitions it's unclear which stat to use to report filtering based on L2 dst addr in old broadcast-medium Ethernet. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 0f7ba7bc46fa0b574ccacf5672991b321e028492 Author: Christophe JAILLET Date: Sun Jan 3 11:26:26 2021 +1100 net/sonic: Fix some resource leaks in error handling paths A call to dma_alloc_coherent() is wrapped by sonic_alloc_descriptors(). This is correctly freed in the remove function, but not in the error handling path of the probe function. Fix this by adding the missing dma_free_coherent() call. While at it, rename a label in order to be slightly more informative. Cc: Christophe JAILLET Cc: Thomas Bogendoerfer Cc: Chris Zankel References: commit 10e3cc180e64 ("net/sonic: Fix a resource leak in an error handling path in 'jazz_sonic_probe()'") Fixes: 74f2a5f0ef64 ("xtensa: Add support for the Sonic Ethernet device for the XT2000 board.") Fixes: efcce839360f ("[PATCH] macsonic/jazzsonic network drivers update") Signed-off-by: Christophe JAILLET Signed-off-by: Finn Thain Signed-off-by: David S. Miller commit 69931e11288520c250152180ecf9b6ac5e6e40ed Author: Arnd Bergmann Date: Sun Jan 3 22:36:23 2021 +0100 wan: ds26522: select CONFIG_BITREVERSE Without this, the driver runs into a link failure arm-linux-gnueabi-ld: drivers/net/wan/slic_ds26522.o: in function `slic_ds26522_probe': slic_ds26522.c:(.text+0x100c): undefined reference to `byte_rev_table' arm-linux-gnueabi-ld: slic_ds26522.c:(.text+0x1cdc): undefined reference to `byte_rev_table' arm-linux-gnueabi-ld: drivers/net/wan/slic_ds26522.o: in function `slic_write': slic_ds26522.c:(.text+0x1e4c): undefined reference to `byte_rev_table' Fixes: c37d4a0085c5 ("Maxim/driver: Add driver for maxim ds26522") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller commit 51049bd903a81307f751babe15a1df8d197884e8 Author: Arnd Bergmann Date: Sun Jan 3 22:36:22 2021 +0100 misdn: dsp: select CONFIG_BITREVERSE Without this, we run into a link error arm-linux-gnueabi-ld: drivers/isdn/mISDN/dsp_audio.o: in function `dsp_audio_generate_law_tables': (.text+0x30c): undefined reference to `byte_rev_table' arm-linux-gnueabi-ld: drivers/isdn/mISDN/dsp_audio.o:(.text+0x5e4): more undefined references to `byte_rev_table' follow Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller commit 152a8a6c017bfdeda7f6d052fbc6e151891bd9b6 Author: Arnd Bergmann Date: Sun Jan 3 22:36:21 2021 +0100 cfg80211: select CONFIG_CRC32 Without crc32 support, this fails to link: arm-linux-gnueabi-ld: net/wireless/scan.o: in function `cfg80211_scan_6ghz': scan.c:(.text+0x928): undefined reference to `crc32_le' Fixes: c8cb5b854b40 ("nl80211/cfg80211: support 6 GHz scanning") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller commit e186620d7bf11b274b985b839c38266d7918cc05 Author: Arnd Bergmann Date: Sun Jan 3 22:36:20 2021 +0100 wil6210: select CONFIG_CRC32 Without crc32, the driver fails to link: arm-linux-gnueabi-ld: drivers/net/wireless/ath/wil6210/fw.o: in function `wil_fw_verify': fw.c:(.text+0x74c): undefined reference to `crc32_le' arm-linux-gnueabi-ld: drivers/net/wireless/ath/wil6210/fw.o:fw.c:(.text+0x758): more undefined references to `crc32_le' follow Fixes: 151a9706503f ("wil6210: firmware download") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller commit 1d48595c786b1b9dc6be301e8d7f6fc74e9882aa Author: Arnd Bergmann Date: Sun Jan 3 22:36:19 2021 +0100 can: kvaser_pciefd: select CONFIG_CRC32 Without crc32, this driver fails to link: arm-linux-gnueabi-ld: drivers/net/can/kvaser_pciefd.o: in function `kvaser_pciefd_probe': kvaser_pciefd.c:(.text+0x2b0): undefined reference to `crc32_be' Fixes: 26ad340e582d ("can: kvaser_pciefd: Add driver for Kvaser PCIEcan devices") Signed-off-by: Arnd Bergmann Acked-by: Marc Kleine-Budde Signed-off-by: David S. Miller commit f9d6f94132f01d2a552dcbab54fa56496638186d Author: Arnd Bergmann Date: Sun Jan 3 22:36:18 2021 +0100 phy: dp83640: select CONFIG_CRC32 Without crc32, this driver fails to link: arm-linux-gnueabi-ld: drivers/net/phy/dp83640.o: in function `match': dp83640.c:(.text+0x476c): undefined reference to `crc32_le' Fixes: 539e44d26855 ("dp83640: Include hash in timestamp/packet matching") Signed-off-by: Arnd Bergmann Reviewed-by: Andrew Lunn Acked-by: Richard Cochran Signed-off-by: David S. Miller commit 2860d45a589818dd8ffd90cdc4bcf77f36a5a6be Author: Arnd Bergmann Date: Sun Jan 3 22:36:17 2021 +0100 qed: select CONFIG_CRC32 Without this, the driver fails to link: lpc_eth.c:(.text+0x1934): undefined reference to `crc32_le' arm-linux-gnueabi-ld: drivers/net/ethernet/qlogic/qed/qed_debug.o: in function `qed_grc_dump': qed_debug.c:(.text+0x4068): undefined reference to `crc32_le' arm-linux-gnueabi-ld: drivers/net/ethernet/qlogic/qed/qed_debug.o: in function `qed_idle_chk_dump': qed_debug.c:(.text+0x51fc): undefined reference to `crc32_le' arm-linux-gnueabi-ld: drivers/net/ethernet/qlogic/qed/qed_debug.o: in function `qed_mcp_trace_dump': qed_debug.c:(.text+0x6000): undefined reference to `crc32_le' arm-linux-gnueabi-ld: drivers/net/ethernet/qlogic/qed/qed_debug.o: in function `qed_dbg_reg_fifo_dump': qed_debug.c:(.text+0x66cc): undefined reference to `crc32_le' arm-linux-gnueabi-ld: drivers/net/ethernet/qlogic/qed/qed_debug.o:qed_debug.c:(.text+0x6aa4): more undefined references to `crc32_le' follow Fixes: 7a4b21b7d1f0 ("qed: Add nvram selftest") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller commit 81bd1579b43e0e285cba667399f1b063f1ce7672 Author: Hsin-Yi Wang Date: Mon Dec 28 17:04:25 2020 +0800 pinctrl: mediatek: Fix fallback call path Some SoCs, eg. mt8183, are using a pinconfig operation bias_set_combo. The fallback path in mtk_pinconf_adv_pull_set() should also try this operation. Fixes: cafe19db7751 ("pinctrl: mediatek: Backward compatible to previous Mediatek's bias-pull usage") Signed-off-by: Hsin-Yi Wang Acked-by: Sean Wang Link: https://lore.kernel.org/r/20201228090425.2130569-1-hsinyi@chromium.org Signed-off-by: Linus Walleij commit 2f9d9a852f426cdc56ebd5c05c2333ea2012cc97 Author: Nathan Chancellor Date: Tue Dec 29 13:47:10 2020 -0700 pinctrl: nomadik: Remove unused variable in nmk_gpio_dbg_show_one Clang warns: drivers/pinctrl/nomadik/pinctrl-nomadik.c:952:8: warning: unused variable 'wake' [-Wunused-variable] bool wake; ^ 1 warning generated. There were two wake declarations added to nmk_gpio_dbg_show_one when converting it to use irq_has_action but only one is used within its scope. Remove the unused one so there is no more warning. Fixes: f3925032d7fd ("pinctrl: nomadik: Use irq_has_action()") Reported-by: Arnd Bergmann Tested-by: Andrew Halaney Reviewed-by: Andrew Halaney Reported-by: Hulk Robot Reported-by: Ye Bin Signed-off-by: Nathan Chancellor Link: https://lore.kernel.org/r/20201229204710.1129033-1-natechancellor@gmail.com Signed-off-by: Linus Walleij commit 698dc0cf944772a79a9aa417e647c0f7587e51df Author: Heinrich Schuchardt Date: Tue Jan 5 14:20:07 2021 -0800 dt-bindings: input: adc-keys: clarify description The current description of ADC keys is not precise enough. "when this key is pressed" leaves it open if a key is considered pressed below or above the threshold. This has led to confusion: drivers/input/keyboard/adc-keys.c ignores the meaning of thresholds and sets the key that is closest to press-threshold-microvolt. This patch nails down the definitions and provides an interpretation of the supplied example. Signed-off-by: Heinrich Schuchardt Acked-by: Rob Herring Link: https://lore.kernel.org/r/20201222110815.24121-1-xypron.glpk@gmx.de Signed-off-by: Dmitry Torokhov commit 9f1abbe97c08ba7ed609791627533a805a1b2c66 Merge: 1d011777cdbe7 e13a6915a03ff Author: Linus Torvalds Date: Tue Jan 5 13:30:28 2021 -0800 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull vhost bugfix from Michael Tsirkin: "This fixes configs with vhost vsock behind a viommu" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: vhost/vsock: add IOTLB API support commit 1d011777cdbe7ae38a854a0cbeb6bdfbf724cce0 Merge: f6e7a024bfe5e 4bfd6247fa916 Author: Linus Torvalds Date: Tue Jan 5 13:25:49 2021 -0800 Merge tag 'sound-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Here is a collection of USB- and HD-audio fixes. Most of them are device-specific quirks while one fix is for a regression due to an incorrect mutex unlock introduced in this merge window" * tag 'sound-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/via: Fix runtime PM for Clevo W35xSS ALSA: usb-audio: Add quirk for RC-505 ALSA: hda/hdmi: Fix incorrect mutex unlock in silent_stream_disable() ALSA: hda/realtek: Enable mute and micmute LED on HP EliteBook 850 G7 ALSA: hda/realtek: Add two "Intel Reference board" SSID in the ALC256. ALSA: hda/realtek: Add mute LED quirk for more HP laptops ALSA: hda/conexant: add a new hda codec CX11970 ALSA: usb-audio: Add quirk for BOSS AD-10 ALSA: usb-audio: Fix UBSAN warnings for MIDI jacks ALSA: hda/realtek - Modify Dell platform name ALSA: hda/realtek - Fix speaker volume control on Lenovo C940 commit f4d9359de8ac0fb64a5ecc9c34833705eb53327b Author: Vineet Gupta Date: Thu Nov 5 13:22:10 2020 -0800 include/soc: remove headers for EZChip NPS NPS platform has been removed from ARC port and there are no in-tree user of it now . So RIP ! Signed-off-by: Vineet Gupta commit 8a48c0a3360bf2bf4f40c980d0ec216e770e58ee Author: Randy Dunlap Date: Mon Jan 4 19:44:53 2021 -0800 arch/arc: add copy_user_page() to to fix build error on ARC fs/dax.c uses copy_user_page() but ARC does not provide that interface, resulting in a build error. Provide copy_user_page() in . ../fs/dax.c: In function 'copy_cow_page_dax': ../fs/dax.c:702:2: error: implicit declaration of function 'copy_user_page'; did you mean 'copy_to_user_page'? [-Werror=implicit-function-declaration] Reported-by: kernel test robot Signed-off-by: Randy Dunlap Cc: Vineet Gupta Cc: linux-snps-arc@lists.infradead.org Cc: Dan Williams #Acked-by: Vineet Gupta # v1 Cc: Andrew Morton Cc: Matthew Wilcox Cc: Jan Kara Cc: linux-fsdevel@vger.kernel.org Cc: linux-nvdimm@lists.01.org #Reviewed-by: Ira Weiny # v2 Signed-off-by: Vineet Gupta commit f6e7a024bfe5e11d91ccff46bb576e3fb5a516ea Merge: aa35e45cd42aa 3a71e423133a4 Author: Linus Torvalds Date: Tue Jan 5 12:46:27 2021 -0800 Merge tag 'arc-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC updates from Vineet Gupta: "Things are quieter on upstreaming front as we are mostly focusing on ARCv3/ARC64 port. This contains just build system updates from Masahiro Yamada" * tag 'arc-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: ARC: build: use $(READELF) instead of hard-coded readelf ARC: build: remove unneeded extra-y ARC: build: move symlink creation to arch/arc/Makefile to avoid race ARC: build: add boot_targets to PHONY ARC: build: add uImage.lzma to the top-level target ARC: build: remove non-existing bootpImage from KBUILD_IMAGE commit aa35e45cd42aa249562c65e440c8d69fb84945d9 Merge: 6207214a70bfa a8f33c038f4e5 Author: Linus Torvalds Date: Tue Jan 5 12:38:56 2021 -0800 Merge tag 'net-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Networking fixes, including fixes from netfilter, wireless and bpf trees. Current release - regressions: - mt76: fix NULL pointer dereference in mt76u_status_worker and mt76s_process_tx_queue - net: ipa: fix interconnect enable bug Current release - always broken: - netfilter: fixes possible oops in mtype_resize in ipset - ath11k: fix number of coding issues found by static analysis tools and spurious error messages Previous releases - regressions: - e1000e: re-enable s0ix power saving flows for systems with the Intel i219-LM Ethernet controllers to fix power use regression - virtio_net: fix recursive call to cpus_read_lock() to avoid a deadlock - ipv4: ignore ECN bits for fib lookups in fib_compute_spec_dst() - sysfs: take the rtnl lock around XPS configuration - xsk: fix memory leak for failed bind and rollback reservation at NETDEV_TX_BUSY - r8169: work around power-saving bug on some chip versions Previous releases - always broken: - dcb: validate netlink message in DCB handler - tun: fix return value when the number of iovs exceeds MAX_SKB_FRAGS to prevent unnecessary retries - vhost_net: fix ubuf refcount when sendmsg fails - bpf: save correct stopping point in file seq iteration - ncsi: use real net-device for response handler - neighbor: fix div by zero caused by a data race (TOCTOU) - bareudp: fix use of incorrect min_headroom size and a false positive lockdep splat from the TX lock - mvpp2: - clear force link UP during port init procedure in case bootloader had set it - add TCAM entry to drop flow control pause frames - fix PPPoE with ipv6 packet parsing - fix GoP Networking Complex Control config of port 3 - fix pkt coalescing IRQ-threshold configuration - xsk: fix race in SKB mode transmit with shared cq - ionic: account for vlan tag len in rx buffer len - stmmac: ignore the second clock input, current clock framework does not handle exclusive clock use well, other drivers may reconfigure the second clock Misc: - ppp: change PPPIOCUNBRIDGECHAN ioctl request number to follow existing scheme" * tag 'net-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (99 commits) net: dsa: lantiq_gswip: Fix GSWIP_MII_CFG(p) register access net: dsa: lantiq_gswip: Enable GSWIP_MII_CFG_EN also for internal PHYs net: lapb: Decrease the refcount of "struct lapb_cb" in lapb_device_event r8169: work around power-saving bug on some chip versions net: usb: qmi_wwan: add Quectel EM160R-GL selftests: mlxsw: Set headroom size of correct port net: macb: Correct usage of MACB_CAPS_CLK_HW_CHG flag ibmvnic: fix: NULL pointer dereference. docs: networking: packet_mmap: fix old config reference docs: networking: packet_mmap: fix formatting for C macros vhost_net: fix ubuf refcount incorrectly when sendmsg fails bareudp: Fix use of incorrect min_headroom size bareudp: set NETIF_F_LLTX flag net: hdlc_ppp: Fix issues when mod_timer is called while timer is running atlantic: remove architecture depends erspan: fix version 1 check in gre_parse_header() net: hns: fix return value check in __lb_other_process() net: sched: prevent invalid Scell_log shift count net: neighbor: fix a crash caused by mod zero ipv4: Ignore ECN bits for fib lookups in fib_compute_spec_dst() ... commit 6207214a70bfaec7b41f39502353fd3ca89df68c Merge: c2407cf7d22d0 366911cd762db Author: Linus Torvalds Date: Tue Jan 5 11:55:46 2021 -0800 Merge tag 'afs-fixes-04012021' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull AFS fixes from David Howells: "Two fixes. The first is the fix for the strnlen() array limit check and the second fixes the calculation of the number of dirent records used to represent any particular filename length" * tag 'afs-fixes-04012021' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: afs: Fix directory entry size calculation afs: Work around strnlen() oops with CONFIG_FORTIFIED_SOURCE=y commit c2407cf7d22d0c0d94cf20342b3b8f06f1d904e7 Author: Linus Torvalds Date: Tue Jan 5 11:33:00 2021 -0800 mm: make wait_on_page_writeback() wait for multiple pending writebacks Ever since commit 2a9127fcf229 ("mm: rewrite wait_on_page_bit_common() logic") we've had some very occasional reports of BUG_ON(PageWriteback) in write_cache_pages(), which we thought we already fixed in commit 073861ed77b6 ("mm: fix VM_BUG_ON(PageTail) and BUG_ON(PageWriteback)"). But syzbot just reported another one, even with that commit in place. And it turns out that there's a simpler way to trigger the BUG_ON() than the one Hugh found with page re-use. It all boils down to the fact that the page writeback is ostensibly serialized by the page lock, but that isn't actually really true. Yes, the people _setting_ writeback all do so under the page lock, but the actual clearing of the bit - and waking up any waiters - happens without any page lock. This gives us this fairly simple race condition: CPU1 = end previous writeback CPU2 = start new writeback under page lock CPU3 = write_cache_pages() CPU1 CPU2 CPU3 ---- ---- ---- end_page_writeback() test_clear_page_writeback(page) ... delayed... lock_page(); set_page_writeback() unlock_page() lock_page() wait_on_page_writeback(); wake_up_page(page, PG_writeback); .. wakes up CPU3 .. BUG_ON(PageWriteback(page)); where the BUG_ON() happens because we woke up the PG_writeback bit becasue of the _previous_ writeback, but a new one had already been started because the clearing of the bit wasn't actually atomic wrt the actual wakeup or serialized by the page lock. The reason this didn't use to happen was that the old logic in waiting on a page bit would just loop if it ever saw the bit set again. The nice proper fix would probably be to get rid of the whole "wait for writeback to clear, and then set it" logic in the writeback path, and replace it with an atomic "wait-to-set" (ie the same as we have for page locking: we set the page lock bit with a single "lock_page()", not with "wait for lock bit to clear and then set it"). However, out current model for writeback is that the waiting for the writeback bit is done by the generic VFS code (ie write_cache_pages()), but the actual setting of the writeback bit is done much later by the filesystem ".writepages()" function. IOW, to make the writeback bit have that same kind of "wait-to-set" behavior as we have for page locking, we'd have to change our roughly ~50 different writeback functions. Painful. Instead, just make "wait_on_page_writeback()" loop on the very unlikely situation that the PG_writeback bit is still set, basically re-instating the old behavior. This is very non-optimal in case of contention, but since we only ever set the bit under the page lock, that situation is controlled. Reported-by: syzbot+2fc0712f8f8b8b8fa0ef@syzkaller.appspotmail.com Fixes: 2a9127fcf229 ("mm: rewrite wait_on_page_bit_common() logic") Acked-by: Hugh Dickins Cc: Andrew Morton Cc: Matthew Wilcox Cc: stable@kernel.org Signed-off-by: Linus Torvalds commit b34f10c2dc5961021850c3c15f46a84b56a0c0e8 Author: David Woodhouse Date: Tue Jan 5 01:36:13 2021 +0000 iommu/amd: Stop irq_remapping_select() matching when remapping is disabled The AMD IOMMU initialisation registers the IRQ remapping domain for each IOMMU before doing the final sanity check that every I/OAPIC is covered. This means that the AMD irq_remapping_select() function gets invoked even when IRQ remapping has been disabled, eventually leading to a NULL pointer dereference in alloc_irq_table(). Unfortunately, the IVRS isn't fully parsed early enough that the sanity check can be done in time to registering the IRQ domain altogether. Doing that would be nice, but is a larger and more error-prone task. The simple fix is just for irq_remapping_select() to refuse to report a match when IRQ remapping has disabled. Link: https://lore.kernel.org/lkml/ed4be9b4-24ac-7128-c522-7ef359e8185d@gmx.at Fixes: a1a785b57242 ("iommu/amd: Implement select() method on remapping irqdomain") Reported-by: Johnathan Smithinovic Signed-off-by: David Woodhouse Link: https://lore.kernel.org/r/04bbe8bca87f81a3cfa93ec4299e53f47e00e5b3.camel@infradead.org Signed-off-by: Will Deacon commit 12bc4570c14e24e6244d66466aeda994f805634b Author: David Woodhouse Date: Tue Jan 5 01:32:51 2021 +0000 iommu/amd: Set iommu->int_enabled consistently when interrupts are set up When I made the INTCAPXT support stop gratuitously pretending to be MSI, I missed the fact that iommu_setup_msi() also sets the ->int_enabled flag. I missed this in the iommu_setup_intcapxt() code path, which means that a resume from suspend will try to allocate the IRQ domains again, accidentally re-enabling interrupts as it does, resulting in much sadness. Lift out the bit which sets iommu->int_enabled into the iommu_init_irq() function which is also where it gets checked. Link: https://lore.kernel.org/r/20210104132250.GE32151@zn.tnic/ Fixes: d1adcfbb520c ("iommu/amd: Fix IOMMU interrupt generation in X2APIC mode") Reported-by: Borislav Petkov Signed-off-by: David Woodhouse Tested-by: Borislav Petkov Link: https://lore.kernel.org/r/50cd5f55be8ead0937ac315cd2f5b89364f6a9a5.camel@infradead.org Signed-off-by: Will Deacon commit ff2b46d7cff80d27d82f7f3252711f4ca1666129 Author: Dinghao Liu Date: Tue Jan 5 13:18:37 2021 +0800 iommu/intel: Fix memleak in intel_irq_remapping_alloc When irq_domain_get_irq_data() or irqd_cfg() fails at i == 0, data allocated by kzalloc() has not been freed before returning, which leads to memleak. Fixes: b106ee63abcc ("irq_remapping/vt-d: Enhance Intel IR driver to support hierarchical irqdomains") Signed-off-by: Dinghao Liu Acked-by: Lu Baolu Link: https://lore.kernel.org/r/20210105051837.32118-1-dinghao.liu@zju.edu.cn Signed-off-by: Will Deacon commit 6775ae901ffd130d0be9c32837f88d1f9d560189 Author: Stefano Garzarella Date: Tue Dec 22 17:42:32 2020 +0100 iommu/iova: fix 'domain' typos Replace misspelled 'doamin' with 'domain' in several comments. Signed-off-by: Stefano Garzarella Link: https://lore.kernel.org/r/20201222164232.88795-1-sgarzare@redhat.com Signed-off-by: Will Deacon commit aebf5db917055b38f4945ed6d621d9f07a44ff30 Author: Ming Lei Date: Mon Dec 21 12:33:35 2020 +0800 block: fix use-after-free in disk_part_iter_next Make sure that bdgrab() is done on the 'block_device' instance before referring to it for avoiding use-after-free. Cc: Reported-by: syzbot+825f0f9657d4e528046e@syzkaller.appspotmail.com Signed-off-by: Ming Lei Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 170b3bbda08852277b97f4f0516df0785c939764 Author: Ye Bin Date: Tue Jan 5 21:53:40 2021 +0800 io_uring: Delete useless variable ‘id’ in io_prep_async_work Fix follow warning: fs/io_uring.c:1523:22: warning: variable ‘id’ set but not used [-Wunused-but-set-variable] struct io_identity *id; ^~ Reported-by: Hulk Robot Signed-off-by: Ye Bin Signed-off-by: Jens Axboe commit 6d4d273588378c65915acaf7b2ee74e9dd9c130a Author: Jan Kara Date: Thu Dec 10 10:44:33 2020 +0100 bfq: Fix computation of shallow depth BFQ computes number of tags it allows to be allocated for each request type based on tag bitmap. However it uses 1 << bitmap.shift as number of available tags which is wrong. 'shift' is just an internal bitmap value containing logarithm of how many bits bitmap uses in each bitmap word. Thus number of tags allowed for some request types can be far to low. Use proper bitmap.depth which has the number of tags instead. Signed-off-by: Jan Kara Signed-off-by: Jens Axboe commit d16baa3f1453c14d680c5fee01cd122a22d0e0ce Author: Tejun Heo Date: Tue Jan 5 12:37:23 2021 -0500 blk-iocost: fix NULL iocg deref from racing against initialization When initializing iocost for a queue, its rqos should be registered before the blkcg policy is activated to allow policy data initiailization to lookup the associated ioc. This unfortunately means that the rqos methods can be called on bios before iocgs are attached to all existing blkgs. While the race is theoretically possible on ioc_rqos_throttle(), it mostly happened in ioc_rqos_merge() due to the difference in how they lookup ioc. The former determines it from the passed in @rqos and then bails before dereferencing iocg if the looked up ioc is disabled, which most likely is the case if initialization is still in progress. The latter looked up ioc by dereferencing the possibly NULL iocg making it a lot more prone to actually triggering the bug. * Make ioc_rqos_merge() use the same method as ioc_rqos_throttle() to look up ioc for consistency. * Make ioc_rqos_throttle() and ioc_rqos_merge() test for NULL iocg before dereferencing it. * Explain the danger of NULL iocgs in blk_iocost_init(). Signed-off-by: Tejun Heo Reported-by: Jonathan Lemon Cc: stable@vger.kernel.org # v5.4+ Signed-off-by: Jens Axboe commit a8f7e08a81708920a928664a865208fdf451c49f Author: Peter Gonda Date: Tue Jan 5 08:33:11 2021 -0800 x86/sev-es: Fix SEV-ES OUT/IN immediate opcode vc handling The IN and OUT instructions with port address as an immediate operand only use an 8-bit immediate (imm8). The current VC handler uses the entire 32-bit immediate value but these instructions only set the first bytes. Cast the operand to an u8 for that. [ bp: Massage commit message. ] Fixes: 25189d08e5168 ("x86/sev-es: Add support for handling IOIO exceptions") Signed-off-by: Peter Gonda Signed-off-by: Borislav Petkov Acked-by: David Rientjes Link: https://lkml.kernel.org/r/20210105163311.221490-1-pgonda@google.com commit f34d93f30d6a72f6b15ba24b6994b746df0c30de Author: Catalin Marinas Date: Mon Jan 4 12:15:41 2021 +0000 arm64: kasan: Set TCR_EL1.TBID1 when KASAN_HW_TAGS is enabled Commit 49b3cf035edc ("kasan: arm64: set TCR_EL1.TBID1 when enabled") set the TBID1 bit for the KASAN_SW_TAGS configuration, freeing up 8 bits to be used by PAC. With in-kernel MTE now in mainline, also set this bit for the KASAN_HW_TAGS configuration. Signed-off-by: Catalin Marinas Cc: Peter Collingbourne Acked-by: Vincenzo Frascino Acked-by: Andrey Konovalov commit e2bba5f92354488c331b7821d873db7c388e31aa Author: Peter Collingbourne Date: Wed Dec 30 14:19:54 2020 -0800 arm64: vdso: disable .eh_frame_hdr via /DISCARD/ instead of --no-eh-frame-hdr Currently with ld.lld we emit an empty .eh_frame_hdr section (and a corresponding program header) into the vDSO. With ld.bfd the section is not emitted but the program header is, with p_vaddr set to 0. This can lead to unwinders attempting to interpret the data at whichever location the program header happens to point to as an unwind info header. This happens to be mostly harmless as long as the byte at that location (interpreted as a version number) has a value other than 1, causing both libgcc and LLVM libunwind to ignore the section (in libunwind's case, after printing an error message to stderr), but it could lead to worse problems if the byte happened to be 1 or the program header points to non-readable memory (e.g. if the empty section was placed at a page boundary). Instead of disabling .eh_frame_hdr via --no-eh-frame-hdr (which also has the downside of being unsupported by older versions of GNU binutils), disable it by discarding the section, and stop emitting the program header that points to it. I understand that we intend to emit valid unwind info for the vDSO at some point. Once that happens this patch can be reverted. Signed-off-by: Peter Collingbourne Acked-by: Ard Biesheuvel Acked-by: Vincenzo Frascino Link: https://linux-review.googlesource.com/id/If745fd9cadcb31b4010acbf5693727fe111b0863 Link: https://lore.kernel.org/r/20201230221954.2007257-1-pcc@google.com Signed-off-by: Catalin Marinas commit 3fb6819f411b5a89afb5726afafacf0c4b62844f Author: Tian Tao Date: Mon Dec 28 15:05:08 2020 +0800 arm64: traps: remove duplicate include statement asm/exception.h is included more than once. Remove the one that isn't necessary. Signed-off-by: Tian Tao Link: https://lore.kernel.org/r/1609139108-10819-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Catalin Marinas commit dfe94d4086e40e92b1926bddcefa629b791e9b28 Author: Dexuan Cui Date: Mon Dec 21 22:55:41 2020 -0800 x86/hyperv: Fix kexec panic/hang issues Currently the kexec kernel can panic or hang due to 2 causes: 1) hv_cpu_die() is not called upon kexec, so the hypervisor corrupts the old VP Assist Pages when the kexec kernel runs. The same issue is fixed for hibernation in commit 421f090c819d ("x86/hyperv: Suspend/resume the VP assist page for hibernation"). Now fix it for kexec. 2) hyperv_cleanup() is called too early. In the kexec path, the other CPUs are stopped in hv_machine_shutdown() -> native_machine_shutdown(), so between hv_kexec_handler() and native_machine_shutdown(), the other CPUs can still try to access the hypercall page and cause panic. The workaround "hv_hypercall_pg = NULL;" in hyperv_cleanup() is unreliabe. Move hyperv_cleanup() to a better place. Signed-off-by: Dexuan Cui Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20201222065541.24312-1-decui@microsoft.com Signed-off-by: Wei Liu commit f6bcb4c7f366905b66ce8ffca7190118244bb642 Author: Dan Carpenter Date: Tue Jan 5 14:42:29 2021 +0300 regmap: debugfs: Fix a reversed if statement in regmap_debugfs_init() This code will leak "map->debugfs_name" because the if statement is reversed so it only frees NULL pointers instead of non-NULL. In fact the if statement is not required and should just be removed because kfree() accepts NULL pointers. Fixes: cffa4b2122f5 ("regmap: debugfs: Fix a memory leak when calling regmap_attach_dev") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/X/RQpfAwRdLg0GqQ@mwanda Signed-off-by: Mark Brown commit c9c48bb701ba78df7d4652146b12bcf3ad716507 Author: Samuel Thibault Date: Tue Dec 22 02:47:56 2020 +0100 speakup: Add github repository URL and bug tracker We have set up a repository for users to try newer releases more easily, and keep records of known bugs. Signed-off-by: Samuel Thibault Link: https://lore.kernel.org/r/20201222014756.ov5vi6fywylbp5n6@function Signed-off-by: Greg Kroah-Hartman commit 45ba7b195a369f35cb39094fdb32efe5908b34ad Author: Shannon Zhao Date: Mon Jan 4 19:38:44 2021 +0800 arm64: cpufeature: remove non-exist CONFIG_KVM_ARM_HOST Commit d82755b2e781 ("KVM: arm64: Kill off CONFIG_KVM_ARM_HOST") deletes CONFIG_KVM_ARM_HOST option, it should use CONFIG_KVM instead. Just remove CONFIG_KVM_ARM_HOST here. Fixes: d82755b2e781 ("KVM: arm64: Kill off CONFIG_KVM_ARM_HOST") Signed-off-by: Shannon Zhao Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1609760324-92271-1-git-send-email-shannon.zhao@linux.alibaba.com commit 96ebc9c871d8a28fb22aa758dd9188a4732df482 Author: Thinh Nguyen Date: Mon Jan 4 20:07:15 2021 -0800 usb: uas: Add PNY USB Portable SSD to unusual_uas Here's another variant PNY Pro Elite USB 3.1 Gen 2 portable SSD that hangs and doesn't respond to ATA_1x pass-through commands. If it doesn't support these commands, it should respond properly to the host. Add it to the unusual uas list to be able to move forward with other operations. Cc: stable@vger.kernel.org Reviewed-by: Hans de Goede Acked-by: Oliver Neukum Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/2edc7af892d0913bf06f5b35e49ec463f03d5ed8.1609819418.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman commit 311bea3cb9ee20ef150ca76fc60a592bf6b159f5 Author: Nick Desaulniers Date: Thu Dec 17 16:24:32 2020 -0800 arm64: link with -z norelro for LLD or aarch64-elf With GNU binutils 2.35+, linking with BFD produces warnings for vmlinux: aarch64-linux-gnu-ld: warning: -z norelro ignored BFD can produce this warning when the target emulation mode does not support RELRO program headers, and -z relro or -z norelro is passed. Alan Modra clarifies: The default linker emulation for an aarch64-linux ld.bfd is -maarch64linux, the default for an aarch64-elf linker is -maarch64elf. They are not equivalent. If you choose -maarch64elf you get an emulation that doesn't support -z relro. The ARCH=arm64 kernel prefers -maarch64elf, but may fall back to -maarch64linux based on the toolchain configuration. LLD will always create RELRO program header regardless of target emulation. To avoid the above warning when linking with BFD, pass -z norelro only when linking with LLD or with -maarch64linux. Fixes: 3b92fa7485eb ("arm64: link with -z norelro regardless of CONFIG_RELOCATABLE") Fixes: 3bbd3db86470 ("arm64: relocatable: fix inconsistencies in linker script and options") Cc: # 5.0.x- Reported-by: kernelci.org bot Reported-by: Quentin Perret Signed-off-by: Nick Desaulniers Reviewed-by: Nathan Chancellor Acked-by: Ard Biesheuvel Cc: Alan Modra Cc: Fāng-ruì Sòng Link: https://lore.kernel.org/r/20201218002432.788499-1-ndesaulniers@google.com Signed-off-by: Catalin Marinas commit 4cc99d03757df10a4064ba28bf6021406b04d6a9 Author: Huacai Chen Date: Tue Jan 5 10:56:51 2021 +0800 irqchip/loongson-liointc: Fix build warnings Fix build warnings as below: >> drivers/irqchip/irq-loongson-liointc.c:134:12: warning: no previous prototype for 'liointc_of_init' [-Wmissing-prototypes] 134 | int __init liointc_of_init(struct device_node *node, | ^~~~~~~~~~~~~~~ Fixes: dbb152267908c4b2c3639492a94 ("irqchip: Add driver for Loongson I/O Local Interrupt Controller") Reported-by: kernel test robot Signed-off-by: Huacai Chen Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210105025651.772024-1-chenhuacai@loongson.cn commit d1c5246e08eb64991001d97a3bd119c93edbc79a Author: Dan Williams Date: Wed Dec 2 22:28:12 2020 -0800 x86/mm: Fix leak of pmd ptlock Commit 28ee90fe6048 ("x86/mm: implement free pmd/pte page interfaces") introduced a new location where a pmd was released, but neglected to run the pmd page destructor. In fact, this happened previously for a different pmd release path and was fixed by commit: c283610e44ec ("x86, mm: do not leak page->ptl for pmd page tables"). This issue was hidden until recently because the failure mode is silent, but commit: b2b29d6d0119 ("mm: account PMD tables like PTE tables") turns the failure mode into this signature: BUG: Bad page state in process lt-pmem-ns pfn:15943d page:000000007262ed7b refcount:0 mapcount:-1024 mapping:0000000000000000 index:0x0 pfn:0x15943d flags: 0xaffff800000000() raw: 00affff800000000 dead000000000100 0000000000000000 0000000000000000 raw: 0000000000000000 ffff913a029bcc08 00000000fffffbff 0000000000000000 page dumped because: nonzero mapcount [..] dump_stack+0x8b/0xb0 bad_page.cold+0x63/0x94 free_pcp_prepare+0x224/0x270 free_unref_page+0x18/0xd0 pud_free_pmd_page+0x146/0x160 ioremap_pud_range+0xe3/0x350 ioremap_page_range+0x108/0x160 __ioremap_caller.constprop.0+0x174/0x2b0 ? memremap+0x7a/0x110 memremap+0x7a/0x110 devm_memremap+0x53/0xa0 pmem_attach_disk+0x4ed/0x530 [nd_pmem] ? __devm_release_region+0x52/0x80 nvdimm_bus_probe+0x85/0x210 [libnvdimm] Given this is a repeat occurrence it seemed prudent to look for other places where this destructor might be missing and whether a better helper is needed. try_to_free_pmd_page() looks like a candidate, but testing with setting up and tearing down pmd mappings via the dax unit tests is thus far not triggering the failure. As for a better helper pmd_free() is close, but it is a messy fit due to requiring an @mm arg. Also, ___pmd_free_tlb() wants to call paravirt_tlb_remove_table() instead of free_page(), so open-coded pgtable_pmd_page_dtor() seems the best way forward for now. Debugged together with Matthew Wilcox . Fixes: 28ee90fe6048 ("x86/mm: implement free pmd/pte page interfaces") Signed-off-by: Dan Williams Signed-off-by: Borislav Petkov Tested-by: Yi Zhang Acked-by: Peter Zijlstra (Intel) Cc: Link: https://lkml.kernel.org/r/160697689204.605323.17629854984697045602.stgit@dwillia2-desk3.amr.corp.intel.com commit 05f6f7271a38c482c5021967433f7b698e102c45 Author: Qii Wang Date: Thu Dec 24 20:26:07 2020 +0800 i2c: mediatek: Fix apdma and i2c hand-shake timeout With the apdma remove hand-shake signal, it requirs special operation timing to reset i2c manually, otherwise the interrupt will not be triggered, i2c transmission will be timeout. Fixes: 8426fe70cfa4("i2c: mediatek: Add apdma sync in i2c driver") Signed-off-by: Qii Wang Signed-off-by: Wolfram Sang commit 9397d66212cdf7a21c66523f1583e5d63a609e84 Author: Chris Wilson Date: Wed Dec 30 20:23:09 2020 +0000 drm/i915/dp: Track pm_qos per connector Since multiple connectors may run intel_dp_aux_xfer conncurrently, a single global pm_qos does not suffice. (One connector may disable the dma-latency boost prematurely while the second is still depending on it.) Instead of a single global pm_qos, track the pm_qos request for each intel_dp. v2: Move the pm_qos setup/teardown to intel_dp_aux_init/fini Fixes: 9ee32fea5fe8 ("drm/i915: irq-drive the dp aux communication") Signed-off-by: Chris Wilson Cc: Ville Syrjälä Cc: Imre Deak Reviewed-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20201230202309.23982-1-chris@chris-wilson.co.uk (cherry picked from commit b3304591f14b437b6bccd8dbff06006c11837031) Signed-off-by: Jani Nikula commit 557862535c2cad6de6f6fb12312b7a6d09c06407 Author: Chris Wilson Date: Tue Dec 29 12:08:28 2020 +0000 drm/i915/gt: Define guc firmware blob for older Cometlakes When splitting the Coffeelake define to also identify Cometlakes, I missed the double fw_def for Coffeelake. That is only newer Cometlakes use the cml specific guc firmware, older Cometlakes should use kbl firmware. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2859 Fixes: 5f4ae2704d59 ("drm/i915: Identify Cometlake platform") Signed-off-by: Chris Wilson Cc: # v5.9+ Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20201229120828.29931-1-chris@chris-wilson.co.uk (cherry picked from commit 70960ab27542d8dc322f909f516391f331fbd3f1) Signed-off-by: Jani Nikula commit 641382e9b44fba81a0778e1914ee35b8471121f9 Author: Matthew Auld Date: Thu Dec 24 15:13:58 2020 +0000 drm/i915: clear the gpu reloc batch The reloc batch is short lived but can exist in the user visible ppGTT, and since it's backed by an internal object, which lacks page clearing, we should take care to clear it upfront. Signed-off-by: Matthew Auld Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20201224151358.401345-2-matthew.auld@intel.com Cc: stable@vger.kernel.org (cherry picked from commit 26ebc511e799f621357982ccc37a7987a56a00f4) Signed-off-by: Jani Nikula commit 75353bcd2184010f08a3ed2f0da019bd9d604e1e Author: Matthew Auld Date: Thu Dec 24 15:13:57 2020 +0000 drm/i915: clear the shadow batch The shadow batch is an internal object, which doesn't have any page clearing, and since the batch_len can be smaller than the object, we should take care to clear it. Testcase: igt/gen9_exec_parse/shadow-peek Fixes: 4f7af1948abc ("drm/i915: Support ro ppgtt mapped cmdparser shadow buffers") Signed-off-by: Matthew Auld Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20201224151358.401345-1-matthew.auld@intel.com Cc: stable@vger.kernel.org (cherry picked from commit eeb52ee6c4a429ec301faf1dc48988744960786e) Signed-off-by: Jani Nikula commit 6337c2353a069b6f1276dc35421e421ef6c1ead9 Author: Marco Felsch Date: Wed Dec 2 19:05:58 2020 +0100 ARM: dts: imx6qdl-kontron-samx6i: fix pwms for lcd-backlight The pwms property have to specify the no-/inverted flag since commit fa28d8212ede ("ARM: dts: imx: default to #pwm-cells = <3> in the SoC dtsi files"). Fixes: fa28d8212ede ("ARM: dts: imx: default to #pwm-cells = <3> in the SoC dtsi files") Signed-off-by: Marco Felsch Reviewed-by: Uwe Kleine-König Signed-off-by: Shawn Guo commit 90df08538c07b7135703358a0c8c08d97889a704 Author: Pavel Begunkov Date: Mon Jan 4 20:43:30 2021 +0000 io_uring: cancel more aggressively in exit_work While io_ring_exit_work() is running new requests of all sorts may be issued, so it should do a bit more to cancel them, otherwise they may just get stuck. e.g. in io-wq, in poll lists, etc. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit de7f1d9e99d8b99e4e494ad8fcd91f0c4c5c9357 Author: Pavel Begunkov Date: Mon Jan 4 20:43:29 2021 +0000 io_uring: drop file refs after task cancel io_uring fds marked O_CLOEXEC and we explicitly cancel all requests before going through exec, so we don't want to leave task's file references to not our anymore io_uring instances. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 6c503150ae33ee19036255cfda0998463613352c Author: Pavel Begunkov Date: Mon Jan 4 20:36:36 2021 +0000 io_uring: patch up IOPOLL overflow_flush sync IOPOLL skips completion locking but keeps it under uring_lock, thus io_cqring_overflow_flush() and so io_cqring_events() need additional locking with uring_lock in some cases for IOPOLL. Remove __io_cqring_overflow_flush() from io_cqring_events(), introduce a wrapper around flush doing needed synchronisation and call it by hand. Cc: stable@vger.kernel.org # 5.5+ Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 81b6d05ccad4f3d8a9dfb091fb46ad6978ee40e4 Author: Pavel Begunkov Date: Mon Jan 4 20:36:35 2021 +0000 io_uring: synchronise IOPOLL on task_submit fail io_req_task_submit() might be called for IOPOLL, do the fail path under uring_lock to comply with IOPOLL synchronisation based solely on it. Cc: stable@vger.kernel.org # 5.5+ Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit a8f33c038f4e50b0f47448cb6c6ca184c4f717ef Merge: 08ad4839ce34c b4e70d8dd9ea6 Author: Jakub Kicinski Date: Mon Jan 4 14:02:02 2021 -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) Missing sanitization of rateest userspace string, bug has been triggered by syzbot, patch from Florian Westphal. 2) Report EOPNOTSUPP on missing set features in nft_dynset, otherwise error reporting to userspace via EINVAL is misleading since this is reserved for malformed netlink requests. 3) New binaries with old kernels might silently accept several set element expressions. New binaries set on the NFT_SET_EXPR and NFT_DYNSET_F_EXPR flags to request for several expressions per element, hence old kernels which do not support for this bail out with EOPNOTSUPP. * git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf: netfilter: nftables: add set expression flags netfilter: nft_dynset: report EOPNOTSUPP on missing set feature netfilter: xt_RATEEST: reject non-null terminated string from userspace ==================== Link: https://lore.kernel.org/r/20210103192920.18639-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski commit 08ad4839ce34cea7b5ea4ac1867a08fe96709e1a Merge: b40f97b91a3b1 709a3c9dff2a6 Author: Jakub Kicinski Date: Mon Jan 4 13:47:17 2021 -0800 Merge branch 'net-dsa-lantiq_gswip-two-fixes-for-net-stable' Martin Blumenstingl says: ==================== net: dsa: lantiq_gswip: two fixes for -net/-stable While testing the lantiq_gswip driver in OpenWrt at least one board had a non-working Ethernet port connected to an internal 100Mbit/s PHY22F GPHY. The problem which could be observed: - the PHY would detect the link just fine - ethtool stats would see the TX counter rise - the RX counter in ethtool was stuck at zero It turns out that two independent patches are needed to fix this: - first we need to enable the MII data lines also for internal PHYs - second we need to program the GSWIP_MII_CFG registers for all ports except the CPU port These two patches have also been tested by back-porting them on top of Linux 5.4.86 in OpenWrt. Special thanks to Hauke for debugging and brainstorming this on IRC with me! ==================== Link: https://lore.kernel.org/r/20210103012544.3259029-1-martin.blumenstingl@googlemail.com Signed-off-by: Jakub Kicinski commit 709a3c9dff2a639966ae7d8ba6239d2b8aba036d Author: Martin Blumenstingl Date: Sun Jan 3 02:25:44 2021 +0100 net: dsa: lantiq_gswip: Fix GSWIP_MII_CFG(p) register access There is one GSWIP_MII_CFG register for each switch-port except the CPU port. The register offset for the first port is 0x0, 0x02 for the second, 0x04 for the third and so on. Update the driver to not only restrict the GSWIP_MII_CFG registers to ports 0, 1 and 5. Handle ports 0..5 instead but skip the CPU port. This means we are not overwriting the configuration for the third port (port two since we start counting from zero) with the settings for the sixth port (with number five) anymore. The GSWIP_MII_PCDU(p) registers are not updated because there's really only three (one for each of the following ports: 0, 1, 5). Fixes: 14fceff4771e51 ("net: dsa: Add Lantiq / Intel DSA driver for vrx200") Signed-off-by: Martin Blumenstingl Acked-by: Hauke Mehrtens Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit c1a9ec7e5d577a9391660800c806c53287fca991 Author: Martin Blumenstingl Date: Sun Jan 3 02:25:43 2021 +0100 net: dsa: lantiq_gswip: Enable GSWIP_MII_CFG_EN also for internal PHYs Enable GSWIP_MII_CFG_EN also for internal PHYs to make traffic flow. Without this the PHY link is detected properly and ethtool statistics for TX are increasing but there's no RX traffic coming in. Fixes: 14fceff4771e51 ("net: dsa: Add Lantiq / Intel DSA driver for vrx200") Suggested-by: Hauke Mehrtens Signed-off-by: Martin Blumenstingl Acked-by: Hauke Mehrtens Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit b40f97b91a3b167ab22c9e9f1ef00b1615ff01e9 Author: Xie He Date: Thu Dec 31 09:43:31 2020 -0800 net: lapb: Decrease the refcount of "struct lapb_cb" in lapb_device_event In lapb_device_event, lapb_devtostruct is called to get a reference to an object of "struct lapb_cb". lapb_devtostruct increases the refcount of the object and returns a pointer to it. However, we didn't decrease the refcount after we finished using the pointer. This patch fixes this problem. Fixes: a4989fa91110 ("net/lapb: support netdev events") Cc: Martin Schiller Signed-off-by: Xie He Link: https://lore.kernel.org/r/20201231174331.64539-1-xie.he.0141@gmail.com Signed-off-by: Jakub Kicinski commit e80bd76fbf563cc7ed8c9e9f3bbcdf59b0897f69 Author: Heiner Kallweit Date: Wed Dec 30 19:33:34 2020 +0100 r8169: work around power-saving bug on some chip versions A user reported failing network with RTL8168dp (a quite rare chip version). Realtek confirmed that few chip versions suffer from a PLL power-down hw bug. Fixes: 07df5bd874f0 ("r8169: power down chip in probe") Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/a1c39460-d533-7f9e-fa9d-2b8990b02426@gmail.com Signed-off-by: Jakub Kicinski commit cfd82dfc9799c53ef109343a23af006a0f6860a9 Author: Bjørn Mork Date: Wed Dec 30 16:24:51 2020 +0100 net: usb: qmi_wwan: add Quectel EM160R-GL New modem using ff/ff/30 for QCDM, ff/00/00 for AT and NMEA, and ff/ff/ff for RMNET/QMI. T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=5000 MxCh= 0 D: Ver= 3.20 Cls=ef(misc ) Sub=02 Prot=01 MxPS= 9 #Cfgs= 1 P: Vendor=2c7c ProdID=0620 Rev= 4.09 S: Manufacturer=Quectel S: Product=EM160R-GL S: SerialNumber=e31cedc1 C:* #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=896mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=(none) E: Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none) E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none) E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=84(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none) E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=86(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) E: Ad=88(I) Atr=03(Int.) MxPS= 8 Ivl=32ms E: Ad=8e(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms E: Ad=0f(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms Signed-off-by: Bjørn Mork Link: https://lore.kernel.org/r/20201230152451.245271-1-bjorn@mork.no Signed-off-by: Jakub Kicinski commit 2ff2c7e274392871bfdee00ff2adbb8ebae5d240 Author: Ido Schimmel Date: Wed Dec 30 13:42:51 2020 +0200 selftests: mlxsw: Set headroom size of correct port The test was setting the headroom size of the wrong port. This was not visible because of a firmware bug that canceled this bug. Set the headroom size of the correct port, so that the test will pass with both old and new firmware versions. Fixes: bfa804784e32 ("selftests: mlxsw: Add a PFC test") Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Link: https://lore.kernel.org/r/20201230114251.394009-1-idosch@idosch.org Signed-off-by: Jakub Kicinski commit 1d0d561ad1d7606bb745c1ed9478e7206860e56e Author: Charles Keepax Date: Mon Jan 4 10:38:02 2021 +0000 net: macb: Correct usage of MACB_CAPS_CLK_HW_CHG flag A new flag MACB_CAPS_CLK_HW_CHG was added and all callers of macb_set_tx_clk were gated on the presence of this flag. - if (!clk) + if (!bp->tx_clk || !(bp->caps & MACB_CAPS_CLK_HW_CHG)) However the flag was not added to anything other than the new sama7g5_gem, turning that function call into a no op for all other systems. This breaks the networking on Zynq. The commit message adding this states: a new capability so that macb_set_tx_clock() to not be called for IPs having this capability This strongly implies that present of the flag was intended to skip the function not absence of the flag. Update the if statement to this effect, which repairs the existing users. Fixes: daafa1d33cc9 ("net: macb: add capability to not set the clock rate") Suggested-by: Andrew Lunn Signed-off-by: Charles Keepax Reviewed-by: Claudiu Beznea Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20210104103802.13091-1-ckeepax@opensource.cirrus.com Signed-off-by: Jakub Kicinski commit 862aecbd9569e563b979c0e23a908b43cda4b0b9 Author: YANG LI Date: Wed Dec 30 15:23:14 2020 +0800 ibmvnic: fix: NULL pointer dereference. The error is due to dereference a null pointer in function reset_one_sub_crq_queue(): if (!scrq) { netdev_dbg(adapter->netdev, "Invalid scrq reset. irq (%d) or msgs(%p).\n", scrq->irq, scrq->msgs); return -EINVAL; } If the expression is true, scrq must be a null pointer and cannot dereference. Fixes: 9281cf2d5840 ("ibmvnic: avoid memset null scrq msgs") Signed-off-by: YANG LI Reported-by: Abaci Acked-by: Lijun Pan Link: https://lore.kernel.org/r/1609312994-121032-1-git-send-email-abaci-bugfix@linux.alibaba.com Signed-off-by: Jakub Kicinski commit e4da63cda51f17fa1e86a10e84d47d692932530d Author: Baruch Siach Date: Tue Dec 29 11:08:39 2020 +0200 docs: networking: packet_mmap: fix old config reference Before commit 889b8f964f2f ("packet: Kill CONFIG_PACKET_MMAP.") there used to be a CONFIG_PACKET_MMAP config symbol that depended on CONFIG_PACKET. The text still implies that PACKET_MMAP can be disabled. Remove that from the text, as well as reference to old kernel versions. Also, drop reference to broken link to information for pre 2.6.5 kernels. Make a slight working improvement (s/In/On/) while at it. Signed-off-by: Baruch Siach Link: https://lore.kernel.org/r/80089f3783372c8fd7833f28ce774a171b2ef252.1609232919.git.baruch@tkos.co.il Signed-off-by: Jakub Kicinski commit 17e94567c57df3d9609e6bacaed9247c4f2629e2 Author: Baruch Siach Date: Tue Dec 29 11:08:38 2020 +0200 docs: networking: packet_mmap: fix formatting for C macros The citation of macro definitions should appear in a code block. Signed-off-by: Baruch Siach Link: https://lore.kernel.org/r/5cb47005e7a59b64299e038827e295822193384c.1609232919.git.baruch@tkos.co.il Signed-off-by: Jakub Kicinski commit 01e31bea7e622f1890c274f4aaaaf8bccd296aa5 Author: Yunjian Wang Date: Tue Dec 29 10:01:48 2020 +0800 vhost_net: fix ubuf refcount incorrectly when sendmsg fails Currently the vhost_zerocopy_callback() maybe be called to decrease the refcount when sendmsg fails in tun. The error handling in vhost handle_tx_zerocopy() will try to decrease the same refcount again. This is wrong. To fix this issue, we only call vhost_net_ubuf_put() when vq->heads[nvq->desc].len == VHOST_DMA_IN_PROGRESS. Fixes: bab632d69ee4 ("vhost: vhost TX zero-copy support") Signed-off-by: Yunjian Wang Acked-by: Willem de Bruijn Acked-by: Michael S. Tsirkin Acked-by: Jason Wang Link: https://lore.kernel.org/r/1609207308-20544-1-git-send-email-wangyunjian@huawei.com Signed-off-by: Jakub Kicinski commit 10ad3e998fa0c25315f27cf3002ff8b02dc31c38 Author: Taehee Yoo Date: Mon Dec 28 15:21:46 2020 +0000 bareudp: Fix use of incorrect min_headroom size In the bareudp6_xmit_skb(), it calculates min_headroom. At that point, it uses struct iphdr, but it's not correct. So panic could occur. The struct ipv6hdr should be used. Test commands: ip netns add A ip netns add B ip link add veth0 netns A type veth peer name veth1 netns B ip netns exec A ip link set veth0 up ip netns exec A ip a a 2001:db8:0::1/64 dev veth0 ip netns exec B ip link set veth1 up ip netns exec B ip a a 2001:db8:0::2/64 dev veth1 for i in {10..1} do let A=$i-1 ip netns exec A ip link add bareudp$i type bareudp dstport $i \ ethertype 0x86dd ip netns exec A ip link set bareudp$i up ip netns exec A ip -6 a a 2001:db8:$i::1/64 dev bareudp$i ip netns exec A ip -6 r a 2001:db8:$i::2 encap ip6 src \ 2001:db8:$A::1 dst 2001:db8:$A::2 via 2001:db8:$i::2 \ dev bareudp$i ip netns exec B ip link add bareudp$i type bareudp dstport $i \ ethertype 0x86dd ip netns exec B ip link set bareudp$i up ip netns exec B ip -6 a a 2001:db8:$i::2/64 dev bareudp$i ip netns exec B ip -6 r a 2001:db8:$i::1 encap ip6 src \ 2001:db8:$A::2 dst 2001:db8:$A::1 via 2001:db8:$i::1 \ dev bareudp$i done ip netns exec A ping 2001:db8:7::2 Splat looks like: [ 66.436679][ C2] skbuff: skb_under_panic: text:ffffffff928614c8 len:454 put:14 head:ffff88810abb4000 data:ffff88810abb3ffa tail:0x1c0 end:0x3ec0 dev:veth0 [ 66.441626][ C2] ------------[ cut here ]------------ [ 66.443458][ C2] kernel BUG at net/core/skbuff.c:109! [ 66.445313][ C2] invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN PTI [ 66.447606][ C2] CPU: 2 PID: 913 Comm: ping Not tainted 5.10.0+ #819 [ 66.450251][ C2] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014 [ 66.453713][ C2] RIP: 0010:skb_panic+0x15d/0x15f [ 66.455345][ C2] Code: 98 fe 4c 8b 4c 24 10 53 8b 4d 70 45 89 e0 48 c7 c7 60 8b 78 93 41 57 41 56 41 55 48 8b 54 24 20 48 8b 74 24 28 e8 b5 40 f9 ff <0f> 0b 48 8b 6c 24 20 89 34 24 e8 08 c9 98 fe 8b 34 24 48 c7 c1 80 [ 66.462314][ C2] RSP: 0018:ffff888119209648 EFLAGS: 00010286 [ 66.464281][ C2] RAX: 0000000000000089 RBX: ffff888003159000 RCX: 0000000000000000 [ 66.467216][ C2] RDX: 0000000000000089 RSI: 0000000000000008 RDI: ffffed10232412c0 [ 66.469768][ C2] RBP: ffff88810a53d440 R08: ffffed102328018d R09: ffffed102328018d [ 66.472297][ C2] R10: ffff888119400c67 R11: ffffed102328018c R12: 000000000000000e [ 66.474833][ C2] R13: ffff88810abb3ffa R14: 00000000000001c0 R15: 0000000000003ec0 [ 66.477361][ C2] FS: 00007f37c0c72f00(0000) GS:ffff888119200000(0000) knlGS:0000000000000000 [ 66.480214][ C2] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 66.482296][ C2] CR2: 000055a058808570 CR3: 000000011039e002 CR4: 00000000003706e0 [ 66.484811][ C2] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 66.487793][ C2] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 66.490424][ C2] Call Trace: [ 66.491469][ C2] [ 66.492374][ C2] ? eth_header+0x28/0x190 [ 66.494054][ C2] ? eth_header+0x28/0x190 [ 66.495401][ C2] skb_push.cold.99+0x22/0x22 [ 66.496700][ C2] eth_header+0x28/0x190 [ 66.497867][ C2] neigh_resolve_output+0x3de/0x720 [ 66.499615][ C2] ? __neigh_update+0x7e8/0x20a0 [ 66.501176][ C2] __neigh_update+0x8bd/0x20a0 [ 66.502749][ C2] ndisc_update+0x34/0xc0 [ 66.504010][ C2] ndisc_recv_na+0x8da/0xb80 [ 66.505041][ C2] ? pndisc_redo+0x20/0x20 [ 66.505888][ C2] ? rcu_read_lock_sched_held+0xc0/0xc0 [ 66.506965][ C2] ndisc_rcv+0x3a0/0x470 [ 66.507797][ C2] icmpv6_rcv+0xad9/0x1b00 [ 66.508645][ C2] ip6_protocol_deliver_rcu+0xcd6/0x1560 [ 66.509719][ C2] ip6_input_finish+0x5b/0xf0 [ 66.510615][ C2] ip6_input+0xcd/0x2d0 [ 66.511406][ C2] ? ip6_input_finish+0xf0/0xf0 [ 66.512327][ C2] ? rcu_read_lock_held+0x91/0xa0 [ 66.513279][ C2] ? ip6_protocol_deliver_rcu+0x1560/0x1560 [ 66.514414][ C2] ipv6_rcv+0xe8/0x300 [ ... ] Acked-by: Guillaume Nault Fixes: 571912c69f0e ("net: UDP tunnel encapsulation module for tunnelling different protocols like MPLS, IP, NSH etc.") Signed-off-by: Taehee Yoo Link: https://lore.kernel.org/r/20201228152146.24270-1-ap420073@gmail.com Signed-off-by: Jakub Kicinski commit d9e44981739a96f1a468c13bbbd54ace378caf1c Author: Taehee Yoo Date: Mon Dec 28 15:21:36 2020 +0000 bareudp: set NETIF_F_LLTX flag Like other tunneling interfaces, the bareudp doesn't need TXLOCK. So, It is good to set the NETIF_F_LLTX flag to improve performance and to avoid lockdep's false-positive warning. Test commands: ip netns add A ip netns add B ip link add veth0 netns A type veth peer name veth1 netns B ip netns exec A ip link set veth0 up ip netns exec A ip a a 10.0.0.1/24 dev veth0 ip netns exec B ip link set veth1 up ip netns exec B ip a a 10.0.0.2/24 dev veth1 for i in {2..1} do let A=$i-1 ip netns exec A ip link add bareudp$i type bareudp \ dstport $i ethertype ip ip netns exec A ip link set bareudp$i up ip netns exec A ip a a 10.0.$i.1/24 dev bareudp$i ip netns exec A ip r a 10.0.$i.2 encap ip src 10.0.$A.1 \ dst 10.0.$A.2 via 10.0.$i.2 dev bareudp$i ip netns exec B ip link add bareudp$i type bareudp \ dstport $i ethertype ip ip netns exec B ip link set bareudp$i up ip netns exec B ip a a 10.0.$i.2/24 dev bareudp$i ip netns exec B ip r a 10.0.$i.1 encap ip src 10.0.$A.2 \ dst 10.0.$A.1 via 10.0.$i.1 dev bareudp$i done ip netns exec A ping 10.0.2.2 Splat looks like: [ 96.992803][ T822] ============================================ [ 96.993954][ T822] WARNING: possible recursive locking detected [ 96.995102][ T822] 5.10.0+ #819 Not tainted [ 96.995927][ T822] -------------------------------------------- [ 96.997091][ T822] ping/822 is trying to acquire lock: [ 96.998083][ T822] ffff88810f753898 (_xmit_NONE#2){+.-.}-{2:2}, at: __dev_queue_xmit+0x1f52/0x2960 [ 96.999813][ T822] [ 96.999813][ T822] but task is already holding lock: [ 97.001192][ T822] ffff88810c385498 (_xmit_NONE#2){+.-.}-{2:2}, at: __dev_queue_xmit+0x1f52/0x2960 [ 97.002908][ T822] [ 97.002908][ T822] other info that might help us debug this: [ 97.004401][ T822] Possible unsafe locking scenario: [ 97.004401][ T822] [ 97.005784][ T822] CPU0 [ 97.006407][ T822] ---- [ 97.007010][ T822] lock(_xmit_NONE#2); [ 97.007779][ T822] lock(_xmit_NONE#2); [ 97.008550][ T822] [ 97.008550][ T822] *** DEADLOCK *** [ 97.008550][ T822] [ 97.010057][ T822] May be due to missing lock nesting notation [ 97.010057][ T822] [ 97.011594][ T822] 7 locks held by ping/822: [ 97.012426][ T822] #0: ffff888109a144f0 (sk_lock-AF_INET){+.+.}-{0:0}, at: raw_sendmsg+0x12f7/0x2b00 [ 97.014191][ T822] #1: ffffffffbce2f5a0 (rcu_read_lock_bh){....}-{1:2}, at: ip_finish_output2+0x249/0x2020 [ 97.016045][ T822] #2: ffffffffbce2f5a0 (rcu_read_lock_bh){....}-{1:2}, at: __dev_queue_xmit+0x1fd/0x2960 [ 97.017897][ T822] #3: ffff88810c385498 (_xmit_NONE#2){+.-.}-{2:2}, at: __dev_queue_xmit+0x1f52/0x2960 [ 97.019684][ T822] #4: ffffffffbce2f600 (rcu_read_lock){....}-{1:2}, at: bareudp_xmit+0x31b/0x3690 [bareudp] [ 97.021573][ T822] #5: ffffffffbce2f5a0 (rcu_read_lock_bh){....}-{1:2}, at: ip_finish_output2+0x249/0x2020 [ 97.023424][ T822] #6: ffffffffbce2f5a0 (rcu_read_lock_bh){....}-{1:2}, at: __dev_queue_xmit+0x1fd/0x2960 [ 97.025259][ T822] [ 97.025259][ T822] stack backtrace: [ 97.026349][ T822] CPU: 3 PID: 822 Comm: ping Not tainted 5.10.0+ #819 [ 97.027609][ T822] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014 [ 97.029407][ T822] Call Trace: [ 97.030015][ T822] dump_stack+0x99/0xcb [ 97.030783][ T822] __lock_acquire.cold.77+0x149/0x3a9 [ 97.031773][ T822] ? stack_trace_save+0x81/0xa0 [ 97.032661][ T822] ? register_lock_class+0x1910/0x1910 [ 97.033673][ T822] ? register_lock_class+0x1910/0x1910 [ 97.034679][ T822] ? rcu_read_lock_sched_held+0x91/0xc0 [ 97.035697][ T822] ? rcu_read_lock_bh_held+0xa0/0xa0 [ 97.036690][ T822] lock_acquire+0x1b2/0x730 [ 97.037515][ T822] ? __dev_queue_xmit+0x1f52/0x2960 [ 97.038466][ T822] ? check_flags+0x50/0x50 [ 97.039277][ T822] ? netif_skb_features+0x296/0x9c0 [ 97.040226][ T822] ? validate_xmit_skb+0x29/0xb10 [ 97.041151][ T822] _raw_spin_lock+0x30/0x70 [ 97.041977][ T822] ? __dev_queue_xmit+0x1f52/0x2960 [ 97.042927][ T822] __dev_queue_xmit+0x1f52/0x2960 [ 97.043852][ T822] ? netdev_core_pick_tx+0x290/0x290 [ 97.044824][ T822] ? mark_held_locks+0xb7/0x120 [ 97.045712][ T822] ? lockdep_hardirqs_on_prepare+0x12c/0x3e0 [ 97.046824][ T822] ? __local_bh_enable_ip+0xa5/0xf0 [ 97.047771][ T822] ? ___neigh_create+0x12a8/0x1eb0 [ 97.048710][ T822] ? trace_hardirqs_on+0x41/0x120 [ 97.049626][ T822] ? ___neigh_create+0x12a8/0x1eb0 [ 97.050556][ T822] ? __local_bh_enable_ip+0xa5/0xf0 [ 97.051509][ T822] ? ___neigh_create+0x12a8/0x1eb0 [ 97.052443][ T822] ? check_chain_key+0x244/0x5f0 [ 97.053352][ T822] ? rcu_read_lock_bh_held+0x56/0xa0 [ 97.054317][ T822] ? ip_finish_output2+0x6ea/0x2020 [ 97.055263][ T822] ? pneigh_lookup+0x410/0x410 [ 97.056135][ T822] ip_finish_output2+0x6ea/0x2020 [ ... ] Acked-by: Guillaume Nault Fixes: 571912c69f0e ("net: UDP tunnel encapsulation module for tunnelling different protocols like MPLS, IP, NSH etc.") Signed-off-by: Taehee Yoo Link: https://lore.kernel.org/r/20201228152136.24215-1-ap420073@gmail.com Signed-off-by: Jakub Kicinski commit a0a6df9afcaf439a6b4c88a3b522e3d05fdef46f Author: Al Viro Date: Mon Jan 4 15:25:34 2021 -0500 umount(2): move the flag validity checks first Unfortunately, there's userland code that used to rely upon these checks being done before anything else to check for UMOUNT_NOFOLLOW support. That broke in 41525f56e256 ("fs: refactor ksys_umount"). Separate those from the rest of checks and move them to ksys_umount(); unlike everything else in there, this can be sanely done there. Reported-by: Sargun Dhillon Fixes: 41525f56e256 ("fs: refactor ksys_umount") Signed-off-by: Al Viro commit d68b29584c25dbacd01ed44a3e45abb35353f1de Author: Ignat Korchagin Date: Mon Jan 4 14:59:48 2021 +0000 dm crypt: use GFP_ATOMIC when allocating crypto requests from softirq Commit 39d42fa96ba1 ("dm crypt: add flags to optionally bypass kcryptd workqueues") made it possible for some code paths in dm-crypt to be executed in softirq context, when the underlying driver processes IO requests in interrupt/softirq context. In this case sometimes when allocating a new crypto request we may get a stacktrace like below: [ 210.103008][ C0] BUG: sleeping function called from invalid context at mm/mempool.c:381 [ 210.104746][ C0] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 2602, name: fio [ 210.106599][ C0] CPU: 0 PID: 2602 Comm: fio Tainted: G W 5.10.0+ #50 [ 210.108331][ C0] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015 [ 210.110212][ C0] Call Trace: [ 210.110921][ C0] [ 210.111527][ C0] dump_stack+0x7d/0xa3 [ 210.112411][ C0] ___might_sleep.cold+0x122/0x151 [ 210.113527][ C0] mempool_alloc+0x16b/0x2f0 [ 210.114524][ C0] ? __queue_work+0x515/0xde0 [ 210.115553][ C0] ? mempool_resize+0x700/0x700 [ 210.116586][ C0] ? crypt_endio+0x91/0x180 [ 210.117479][ C0] ? blk_update_request+0x757/0x1150 [ 210.118513][ C0] ? blk_mq_end_request+0x4b/0x480 [ 210.119572][ C0] ? blk_done_softirq+0x21d/0x340 [ 210.120628][ C0] ? __do_softirq+0x190/0x611 [ 210.121626][ C0] crypt_convert+0x29f9/0x4c00 [ 210.122668][ C0] ? _raw_spin_lock_irqsave+0x87/0xe0 [ 210.123824][ C0] ? kasan_set_track+0x1c/0x30 [ 210.124858][ C0] ? crypt_iv_tcw_ctr+0x4a0/0x4a0 [ 210.125930][ C0] ? kmem_cache_free+0x104/0x470 [ 210.126973][ C0] ? crypt_endio+0x91/0x180 [ 210.127947][ C0] kcryptd_crypt_read_convert+0x30e/0x420 [ 210.129165][ C0] blk_update_request+0x757/0x1150 [ 210.130231][ C0] blk_mq_end_request+0x4b/0x480 [ 210.131294][ C0] blk_done_softirq+0x21d/0x340 [ 210.132332][ C0] ? _raw_spin_lock+0x81/0xd0 [ 210.133289][ C0] ? blk_mq_stop_hw_queue+0x30/0x30 [ 210.134399][ C0] ? _raw_read_lock_irq+0x40/0x40 [ 210.135458][ C0] __do_softirq+0x190/0x611 [ 210.136409][ C0] ? handle_edge_irq+0x221/0xb60 [ 210.137447][ C0] asm_call_irq_on_stack+0x12/0x20 [ 210.138507][ C0] [ 210.139118][ C0] do_softirq_own_stack+0x37/0x40 [ 210.140191][ C0] irq_exit_rcu+0x110/0x1b0 [ 210.141151][ C0] common_interrupt+0x74/0x120 [ 210.142171][ C0] asm_common_interrupt+0x1e/0x40 Fix this by allocating crypto requests with GFP_ATOMIC mask in interrupt context. Fixes: 39d42fa96ba1 ("dm crypt: add flags to optionally bypass kcryptd workqueues") Cc: stable@vger.kernel.org # v5.9+ Reported-by: Maciej S. Szmigiero Signed-off-by: Ignat Korchagin Acked-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit 8abec36d1274bbd5ae8f36f3658b9abb3db56c31 Author: Ignat Korchagin Date: Mon Jan 4 14:59:47 2021 +0000 dm crypt: do not wait for backlogged crypto request completion in softirq Commit 39d42fa96ba1 ("dm crypt: add flags to optionally bypass kcryptd workqueues") made it possible for some code paths in dm-crypt to be executed in softirq context, when the underlying driver processes IO requests in interrupt/softirq context. When Crypto API backlogs a crypto request, dm-crypt uses wait_for_completion to avoid sending further requests to an already overloaded crypto driver. However, if the code is executing in softirq context, we might get the following stacktrace: [ 210.235213][ C0] BUG: scheduling while atomic: fio/2602/0x00000102 [ 210.236701][ C0] Modules linked in: [ 210.237566][ C0] CPU: 0 PID: 2602 Comm: fio Tainted: G W 5.10.0+ #50 [ 210.239292][ C0] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015 [ 210.241233][ C0] Call Trace: [ 210.241946][ C0] [ 210.242561][ C0] dump_stack+0x7d/0xa3 [ 210.243466][ C0] __schedule_bug.cold+0xb3/0xc2 [ 210.244539][ C0] __schedule+0x156f/0x20d0 [ 210.245518][ C0] ? io_schedule_timeout+0x140/0x140 [ 210.246660][ C0] schedule+0xd0/0x270 [ 210.247541][ C0] schedule_timeout+0x1fb/0x280 [ 210.248586][ C0] ? usleep_range+0x150/0x150 [ 210.249624][ C0] ? unpoison_range+0x3a/0x60 [ 210.250632][ C0] ? ____kasan_kmalloc.constprop.0+0x82/0xa0 [ 210.251949][ C0] ? unpoison_range+0x3a/0x60 [ 210.252958][ C0] ? __prepare_to_swait+0xa7/0x190 [ 210.254067][ C0] do_wait_for_common+0x2ab/0x370 [ 210.255158][ C0] ? usleep_range+0x150/0x150 [ 210.256192][ C0] ? bit_wait_io_timeout+0x160/0x160 [ 210.257358][ C0] ? blk_update_request+0x757/0x1150 [ 210.258582][ C0] ? _raw_spin_lock_irq+0x82/0xd0 [ 210.259674][ C0] ? _raw_read_unlock_irqrestore+0x30/0x30 [ 210.260917][ C0] wait_for_completion+0x4c/0x90 [ 210.261971][ C0] crypt_convert+0x19a6/0x4c00 [ 210.263033][ C0] ? _raw_spin_lock_irqsave+0x87/0xe0 [ 210.264193][ C0] ? kasan_set_track+0x1c/0x30 [ 210.265191][ C0] ? crypt_iv_tcw_ctr+0x4a0/0x4a0 [ 210.266283][ C0] ? kmem_cache_free+0x104/0x470 [ 210.267363][ C0] ? crypt_endio+0x91/0x180 [ 210.268327][ C0] kcryptd_crypt_read_convert+0x30e/0x420 [ 210.269565][ C0] blk_update_request+0x757/0x1150 [ 210.270563][ C0] blk_mq_end_request+0x4b/0x480 [ 210.271680][ C0] blk_done_softirq+0x21d/0x340 [ 210.272775][ C0] ? _raw_spin_lock+0x81/0xd0 [ 210.273847][ C0] ? blk_mq_stop_hw_queue+0x30/0x30 [ 210.275031][ C0] ? _raw_read_lock_irq+0x40/0x40 [ 210.276182][ C0] __do_softirq+0x190/0x611 [ 210.277203][ C0] ? handle_edge_irq+0x221/0xb60 [ 210.278340][ C0] asm_call_irq_on_stack+0x12/0x20 [ 210.279514][ C0] [ 210.280164][ C0] do_softirq_own_stack+0x37/0x40 [ 210.281281][ C0] irq_exit_rcu+0x110/0x1b0 [ 210.282286][ C0] common_interrupt+0x74/0x120 [ 210.283376][ C0] asm_common_interrupt+0x1e/0x40 [ 210.284496][ C0] RIP: 0010:_aesni_enc1+0x65/0xb0 Fix this by making crypt_convert function reentrant from the point of a single bio and make dm-crypt defer further bio processing to a workqueue, if Crypto API backlogs a request in interrupt context. Fixes: 39d42fa96ba1 ("dm crypt: add flags to optionally bypass kcryptd workqueues") Cc: stable@vger.kernel.org # v5.9+ Signed-off-by: Ignat Korchagin Acked-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit b690bd546b227c32b860dae985a18bed8aa946fe Author: Arnd Bergmann Date: Sun Jan 3 22:40:51 2021 +0100 dm zoned: select CONFIG_CRC32 Without crc32 support, this driver fails to link: arm-linux-gnueabi-ld: drivers/md/dm-zoned-metadata.o: in function `dmz_write_sb': dm-zoned-metadata.c:(.text+0xe98): undefined reference to `crc32_le' arm-linux-gnueabi-ld: drivers/md/dm-zoned-metadata.o: in function `dmz_check_sb': dm-zoned-metadata.c:(.text+0x7978): undefined reference to `crc32_le' Fixes: 3b1a94c88b79 ("dm zoned: drive-managed zoned block device target") Signed-off-by: Arnd Bergmann Reviewed-by: Damien Le Moal Signed-off-by: Mike Snitzer commit f7b347acb5f6c29d9229bb64893d8b6a2c7949fb Author: Anthony Iliopoulos Date: Mon Dec 14 18:18:11 2020 +0100 dm integrity: select CRYPTO_SKCIPHER The integrity target relies on skcipher for encryption/decryption, but certain kernel configurations may not enable CRYPTO_SKCIPHER, leading to compilation errors due to unresolved symbols. Explicitly select CRYPTO_SKCIPHER for DM_INTEGRITY, since it is unconditionally dependent on it. Signed-off-by: Anthony Iliopoulos Signed-off-by: Mike Snitzer commit cc07d72bf350b77faeffee1c37bc52197171473f Author: Mike Snitzer Date: Thu Sep 24 13:14:52 2020 -0400 dm raid: fix discard limits for raid1 Block core warned that discard_granularity was 0 for dm-raid with personality of raid1. Reason is that raid_io_hints() was incorrectly special-casing raid1 rather than raid0. Fix raid_io_hints() by removing discard limits settings for raid1. Check for raid0 instead. Fixes: 61697a6abd24a ("dm: eliminate 'split_discard_bios' flag from DM target interface") Cc: stable@vger.kernel.org Reported-by: Zdenek Kabelac Reported-by: Mikulas Patocka Reported-by: Stephan Bärwolf Signed-off-by: Mike Snitzer commit 36bbbd0e234d817938bdc52121a0f5473b3e58f5 Merge: f4f6a2e329523 1b04fa9900263 Author: Linus Torvalds Date: Mon Jan 4 10:55:19 2021 -0800 Merge branch 'rcu/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull RCU fix from Paul McKenney: "This is a fix for a regression in the v5.10 merge window, but it was reported quite late in the v5.10 process, plus generating and testing the fix took some time. The regression is due to commit 36dadef23fcc ("kprobes: Init kprobes in early_initcall") which on powerpc can use RCU Tasks before initialization, resulting in boot failures. The fix is straightforward, simply moving initialization of RCU Tasks before the early_initcall()s. The fix has been exposed to -next and kbuild test robot testing, and has been tested by the PowerPC guys" * 'rcu/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: rcu-tasks: Move RCU-tasks initialization to before early_initcall() commit f4f6a2e329523e1a795e5e5c0799feee997aa053 Merge: e71ba9452f0b5 1967939462641 Author: Linus Torvalds Date: Mon Jan 4 10:47:38 2021 -0800 Merge tag 'compiler-attributes-for-linus-v5.11' of git://github.com/ojeda/linux Pull ENABLE_MUST_CHECK removal from Miguel Ojeda: "Remove CONFIG_ENABLE_MUST_CHECK (Masahiro Yamada)" Note that this removes the config option by making the must-check unconditional, not by removing must check itself. * tag 'compiler-attributes-for-linus-v5.11' of git://github.com/ojeda/linux: Compiler Attributes: remove CONFIG_ENABLE_MUST_CHECK commit a8f808839abe3a10011e28b46af1848dfd8c4f21 Merge: e71ba9452f0b5 74a2921948ed8 Author: Martin K. Petersen Date: Mon Jan 4 13:27:39 2021 -0500 Merge branch '5.11/scsi-postmerge' into 5.11/scsi-fixes Merge two commits that had dependencies on other 5.11 trees (the block and the irq trees respectively). - We reverted a megaraid_sas change in 5.10 due to missing block layer plumbing. Now that this is in place, reinstate the change. - The hisi_sas driver had a dependency on a driver core irq change that went in through Thomas' tree. Signed-off-by: Martin K. Petersen commit 0b3ea2a06de1f52ea30865e227e109a5fd3b6214 Author: Hans de Goede Date: Mon Dec 21 14:42:25 2020 +0100 i2c: i801: Fix the i2c-mux gpiod_lookup_table not being properly terminated gpiod_add_lookup_table() expects the gpiod_lookup_table->table passed to it to be terminated with a zero-ed out entry. So we need to allocate one more entry then we will use. Fixes: d308dfbf62ef ("i2c: mux/i801: Switch to use descriptor passing") Signed-off-by: Hans de Goede Reviewed-by: Mika Westerberg Acked-by: Jean Delvare Reviewed-by: Linus Walleij Signed-off-by: Wolfram Sang commit 0b884fe71f9ee6a5df35e677154256ea2099ebb8 Author: Chunyan Zhang Date: Mon Dec 14 12:58:50 2020 +0800 i2c: sprd: use a specific timeout to avoid system hang up issue If the i2c device SCL bus being pulled up due to some exception before message transfer done, the system cannot receive the completing interrupt signal any more, it would not exit waiting loop until MAX_SCHEDULE_TIMEOUT jiffies eclipse, that would make the system seemed hang up. To avoid that happen, this patch adds a specific timeout for message transfer. Fixes: 8b9ec0719834 ("i2c: Add Spreadtrum I2C controller driver") Signed-off-by: Linhua Xu Signed-off-by: Chunyan Zhang [wsa: changed errno to ETIMEDOUT] Signed-off-by: Wolfram Sang commit 8cbebc4118b5933b3ae6351ceb433f75ac6b7c6b Author: Marc Zyngier Date: Mon Jan 4 16:50:16 2021 +0000 KVM: arm64: Replace KVM_ARM_PMU with HW_PERF_EVENTS KVM_ARM_PMU only existed for the benefit of 32bit ARM hosts, and makes no sense now that we are 64bit only. Get rid of it. Signed-off-by: Marc Zyngier commit 4972cf605f8a10784bb9ec9bdf3465892fb547c8 Author: Ilya Dryomov Date: Wed Dec 23 16:32:05 2020 +0100 libceph, ceph: disambiguate ceph_connection_operations handlers Since a few years, kernel addresses are no longer included in oops dumps, at least on x86. All we get is a symbol name with offset and size. This is a problem for ceph_connection_operations handlers, especially con->ops->dispatch(). All three handlers have the same name and there is little context to disambiguate between e.g. monitor and OSD clients because almost everything is inlined. gdb sneakily stops at the first matching symbol, so one has to resort to nm and addr2line. Some of these are already prefixed with mon_, osd_ or mds_. Let's do the same for all others. Signed-off-by: Ilya Dryomov Acked-by: Jeff Layton commit 10f42b3e648377b2f2f323a5530354710616c6cc Author: Ilya Dryomov Date: Tue Dec 22 19:00:48 2020 +0100 libceph: zero out session key and connection secret Try and avoid leaving bits and pieces of session key and connection secret (gets split into GCM key and a pair of GCM IVs) around. Signed-off-by: Ilya Dryomov Reviewed-by: Jeff Layton commit 7a6eb7c34a78498742b5f82543b7a68c1c443329 Author: Mark Brown Date: Thu Dec 10 18:52:33 2020 +0000 selftests: Skip BPF seftests by default The BPF selftests have build time dependencies on cutting edge versions of tools in the BPF ecosystem including LLVM which are more involved to satisfy than more typical requirements like installing a package from your distribution. This causes issues for users looking at kselftest in as a whole who find that a default build of kselftest fails and that resolving this is time consuming and adds administrative overhead. The fast pace of BPF development and the need for a full BPF stack to do substantial development or validation work on the code mean that people working directly on it don't see a reasonable way to keep supporting older environments without causing problems with the usability of the BPF tests in BPF development so these requirements are unlikely to be relaxed in the immediate future. There is already support for skipping targets so in order to reduce the barrier to entry for people interested in kselftest as a whole let's use that to skip the BPF tests by default when people work with the top level kselftest build system. Users can still build the BPF selftests as part of the wider kselftest build by specifying SKIP_TARGETS, including setting an empty SKIP_TARGETS to build everything. They can also continue to build the BPF selftests individually in cases where they are specifically focused on BPF. This isn't ideal since it means people will need to take special steps to build the BPF tests but the dependencies mean that realistically this is already the case to some extent and it makes it easier for people to pick up and work with the other selftests which is hopefully a net win. Signed-off-by: Mark Brown Signed-off-by: Shuah Khan commit df00d02989024d193a6efd1a85513a5658c6a10f Author: Tobias Klauser Date: Thu Dec 17 17:32:35 2020 +0100 selftests/vDSO: fix -Wformat warning in vdso_test_correctness Fix the following -Wformat warnings in vdso_test_correctness.c: vdso_test_correctness.c: In function ‘test_one_clock_gettime64’: vdso_test_correctness.c:352:21: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘long long int’ [-Wformat=] 352 | printf("\t%llu.%09ld %llu.%09ld %llu.%09ld\n", | ~~~~^ | | | long int | %09lld 353 | (unsigned long long)start.tv_sec, start.tv_nsec, | ~~~~~~~~~~~~~ | | | long long int vdso_test_correctness.c:352:32: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 5 has type ‘long long int’ [-Wformat=] 352 | printf("\t%llu.%09ld %llu.%09ld %llu.%09ld\n", | ~~~~^ | | | long int | %09lld 353 | (unsigned long long)start.tv_sec, start.tv_nsec, 354 | (unsigned long long)vdso.tv_sec, vdso.tv_nsec, | ~~~~~~~~~~~~ | | | long long int vdso_test_correctness.c:352:43: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 7 has type ‘long long int’ [-Wformat=] The tv_sec member of __kernel_timespec is long long, both in uapi/linux/time_types.h and locally in vdso_test_correctness.c. Signed-off-by: Tobias Klauser Signed-off-by: Shuah Khan commit 3b4cf848dad5dad4bf239ba664c809c8cf29f1ed Author: Tobias Klauser Date: Thu Dec 17 17:31:40 2020 +0100 selftests/vDSO: add additional binaries to .gitignore Add the test binaries introduced by commit 693f5ca08ca0 ("kselftest: Extend vDSO selftest"), commit 03f55c7952c9 ("kselftest: Extend vDSO selftest to clock_getres") and commit c7e5789b24d3 ("kselftest: Move test_vdso to the vDSO test suite") to .gitignore. Signed-off-by: Tobias Klauser Signed-off-by: Shuah Khan commit 36836f5b377b5a75c16f5bdc5c0f97f9f51212e1 Merge: d957d1610c661 df6b92fa40050 Author: Mark Brown Date: Mon Jan 4 16:23:20 2021 +0000 Merge qcom driver fix into regulator-5.11 commit 65a4e5299739abe0888cda0938d21f8ea3b5c606 Author: David Gow Date: Mon Dec 21 23:39:00 2020 -0800 kunit: tool: Force the use of the 'tty' console for UML kunit_tool relies on the UML console outputting printk() output to the tty in order to get results. Since the default console driver could change, pass 'console=tty' to the kernel. This is triggered by a change[1] to use ttynull as a fallback console driver which -- by chance or by design -- seems to have changed the default console output on UML, breaking kunit_tool. While this may be fixed, we should be less fragile to such changes in the default. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=757055ae8dedf5333af17b3b5b4b70ba9bc9da4e Signed-off-by: David Gow Fixes: 757055ae8ded ("init/console: Use ttynull as a fallback when there is no console") Reported-by: Andy Shevchenko Tested-by: Andy Shevchenko Acked-by: Brendan Higgins Signed-off-by: Shuah Khan commit 7386a559caa6414e74578172c2bc4e636d6bd0a0 Author: Serge Semin Date: Thu Dec 10 12:17:47 2020 +0300 arm64: dts: amlogic: meson-g12: Set FL-adj property value In accordance with the DWC USB3 bindings the property is supposed to have uint32 type. It's erroneous from the DT schema and driver points of view to declare it as boolean. As Neil suggested set it to 0x20 so not break the platform and to make the dtbs checker happy. Link: https://lore.kernel.org/linux-usb/20201010224121.12672-16-Sergey.Semin@baikalelectronics.ru/ Signed-off-by: Serge Semin Reviewed-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Fixes: 9baf7d6be730 ("arm64: dts: meson: g12a: Add G12A USB nodes") Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20201210091756.18057-3-Sergey.Semin@baikalelectronics.ru commit e1263f9277bad198c2acc8092a41aea1edbea0e4 Author: Amelie Delaunay Date: Mon Jan 4 15:20:45 2021 +0100 dmaengine: stm32-mdma: fix STM32_MDMA_VERY_HIGH_PRIORITY value STM32_MDMA_VERY_HIGH_PRIORITY is b11 not 0x11, so fix it with 0x3. Signed-off-by: Amelie Delaunay Link: https://lore.kernel.org/r/20210104142045.25583-1-amelie.delaunay@foss.st.com Signed-off-by: Vinod Koul commit 6cd0fe91387917be48e91385a572a69dfac2f3f7 Author: Chandana Kishori Chiluveru Date: Tue Dec 29 14:44:43 2020 -0800 usb: gadget: configfs: Preserve function ordering after bind failure When binding the ConfigFS gadget to a UDC, the functions in each configuration are added in list order. However, if usb_add_function() fails, the failed function is put back on its configuration's func_list and purge_configs_funcs() is called to further clean up. purge_configs_funcs() iterates over the configurations and functions in forward order, calling unbind() on each of the previously added functions. But after doing so, each function gets moved to the tail of the configuration's func_list. This results in reshuffling the original order of the functions within a configuration such that the failed function now appears first even though it may have originally appeared in the middle or even end of the list. At this point if the ConfigFS gadget is attempted to re-bind to the UDC, the functions will be added in a different order than intended, with the only recourse being to remove and relink the functions all over again. An example of this as follows: ln -s functions/mass_storage.0 configs/c.1 ln -s functions/ncm.0 configs/c.1 ln -s functions/ffs.adb configs/c.1 # oops, forgot to start adbd echo "" > UDC # fails start adbd echo "" > UDC # now succeeds, but... # bind order is # "ADB", mass_storage, ncm [30133.118289] configfs-gadget gadget: adding 'Mass Storage Function'/ffffff810af87200 to config 'c'/ffffff817d6a2520 [30133.119875] configfs-gadget gadget: adding 'cdc_network'/ffffff80f48d1a00 to config 'c'/ffffff817d6a2520 [30133.119974] using random self ethernet address [30133.120002] using random host ethernet address [30133.139604] usb0: HOST MAC 3e:27:46:ba:3e:26 [30133.140015] usb0: MAC 6e:28:7e:42:66:6a [30133.140062] configfs-gadget gadget: adding 'Function FS Gadget'/ffffff80f3868438 to config 'c'/ffffff817d6a2520 [30133.140081] configfs-gadget gadget: adding 'Function FS Gadget'/ffffff80f3868438 --> -19 [30133.140098] configfs-gadget gadget: unbind function 'Mass Storage Function'/ffffff810af87200 [30133.140119] configfs-gadget gadget: unbind function 'cdc_network'/ffffff80f48d1a00 [30133.173201] configfs-gadget a600000.dwc3: failed to start g1: -19 [30136.661933] init: starting service 'adbd'... [30136.700126] read descriptors [30136.700413] read strings [30138.574484] configfs-gadget gadget: adding 'Function FS Gadget'/ffffff80f3868438 to config 'c'/ffffff817d6a2520 [30138.575497] configfs-gadget gadget: adding 'Mass Storage Function'/ffffff810af87200 to config 'c'/ffffff817d6a2520 [30138.575554] configfs-gadget gadget: adding 'cdc_network'/ffffff80f48d1a00 to config 'c'/ffffff817d6a2520 [30138.575631] using random self ethernet address [30138.575660] using random host ethernet address [30138.595338] usb0: HOST MAC 2e:cf:43:cd:ca:c8 [30138.597160] usb0: MAC 6a:f0:9f:ee:82:a0 [30138.791490] configfs-gadget gadget: super-speed config #1: c Fix this by reversing the iteration order of the functions in purge_config_funcs() when unbinding them, and adding them back to the config's func_list at the head instead of the tail. This ensures that we unbind and unwind back to the original list order. Fixes: 88af8bbe4ef7 ("usb: gadget: the start of the configfs interface") Signed-off-by: Chandana Kishori Chiluveru Signed-off-by: Jack Pham Reviewed-by: Peter Chen Link: https://lore.kernel.org/r/20201229224443.31623-1-jackp@codeaurora.org Cc: stable Signed-off-by: Greg Kroah-Hartman commit d7889c2020e08caab0d7e36e947f642d91015bd0 Author: Arnd Bergmann Date: Sun Jan 3 22:42:17 2021 +0100 usb: gadget: select CONFIG_CRC32 Without crc32 support, this driver fails to link: arm-linux-gnueabi-ld: drivers/usb/gadget/function/f_eem.o: in function `eem_unwrap': f_eem.c:(.text+0x11cc): undefined reference to `crc32_le' arm-linux-gnueabi-ld: drivers/usb/gadget/function/f_ncm.o:f_ncm.c:(.text+0x1e40): more undefined references to `crc32_le' follow Fixes: 6d3865f9d41f ("usb: gadget: NCM: Add transmit multi-frame.") Signed-off-by: Arnd Bergmann Cc: stable Link: https://lore.kernel.org/r/20210103214224.1996535-1-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman commit 7043e311a57625467b6fdb032dec8a6dea878208 Author: Peter Chen Date: Wed Dec 30 13:11:14 2020 +0800 usb: gadget: core: change the comment for usb_gadget_connect The pullup does not need to be enabled at below situations: - For platforms which the hardware pullup starts after setting register even they do not see the VBUS. If the pullup is always enabled for these platforms, it will consume more power and break the USB IF compliance tests [1]. - For platforms which need to do BC 1.2 charger detection after seeing the VBUS. Pullup D+ will break the charger detection flow. - For platforms which the system suspend is allowed when the connection with host is there but the bus is not at suspend. For these platforms, it is better to disable pullup when entering the system suspend otherwise the host may confuse the device behavior after controller is in low power mode. Disable pullup is considered as a disconnection event from host side. [1] USB-IF Full and Low Speed Compliance Test Procedure F Back-voltage Testing Section 7.2.1 of the USB specification requires that no device shall supply (source) current on VBUS at its upstream facing port at any time. From VBUS on its upstream facing port, a device may only draw (sink) current. They may not provide power to the pull-up resistor on D+/D- unless VBUS is present (see Section 7.1.5). Signed-off-by: Peter Chen Link: https://lore.kernel.org/r/20201230051114.21370-1-peter.chen@nxp.com Signed-off-by: Greg Kroah-Hartman commit 64e6bbfff52db4bf6785fab9cffab850b2de6870 Author: Eddie Hung Date: Tue Dec 29 18:53:35 2020 +0800 usb: gadget: configfs: Fix use-after-free issue with udc_name There is a use-after-free issue, if access udc_name in function gadget_dev_desc_UDC_store after another context free udc_name in function unregister_gadget. Context 1: gadget_dev_desc_UDC_store()->unregister_gadget()-> free udc_name->set udc_name to NULL Context 2: gadget_dev_desc_UDC_show()-> access udc_name Call trace: dump_backtrace+0x0/0x340 show_stack+0x14/0x1c dump_stack+0xe4/0x134 print_address_description+0x78/0x478 __kasan_report+0x270/0x2ec kasan_report+0x10/0x18 __asan_report_load1_noabort+0x18/0x20 string+0xf4/0x138 vsnprintf+0x428/0x14d0 sprintf+0xe4/0x12c gadget_dev_desc_UDC_show+0x54/0x64 configfs_read_file+0x210/0x3a0 __vfs_read+0xf0/0x49c vfs_read+0x130/0x2b4 SyS_read+0x114/0x208 el0_svc_naked+0x34/0x38 Add mutex_lock to protect this kind of scenario. Signed-off-by: Eddie Hung Signed-off-by: Macpaul Lin Reviewed-by: Peter Chen Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/1609239215-21819-1-git-send-email-macpaul.lin@mediatek.com Signed-off-by: Greg Kroah-Hartman commit a1383b3537a7bea1c213baa7878ccc4ecf4413b5 Author: Wesley Cheng Date: Tue Dec 29 15:00:37 2020 -0800 usb: dwc3: gadget: Restart DWC3 gadget when enabling pullup usb_gadget_deactivate/usb_gadget_activate does not execute the UDC start operation, which may leave EP0 disabled and event IRQs disabled when re-activating the function. Move the enabling/disabling of USB EP0 and device event IRQs to be performed in the pullup routine. Fixes: ae7e86108b12 ("usb: dwc3: Stop active transfers before halting the controller") Tested-by: Michael Tretter Cc: stable Reported-by: Michael Tretter Signed-off-by: Wesley Cheng Link: https://lore.kernel.org/r/1609282837-21666-1-git-send-email-wcheng@codeaurora.org Signed-off-by: Greg Kroah-Hartman commit 718bf42b119de652ebcc93655a1f33a9c0d04b3c Author: Randy Dunlap Date: Mon Dec 28 23:13:09 2020 -0800 usb: usbip: vhci_hcd: protect shift size Fix shift out-of-bounds in vhci_hcd.c: UBSAN: shift-out-of-bounds in ../drivers/usb/usbip/vhci_hcd.c:399:41 shift exponent 768 is too large for 32-bit type 'int' Fixes: 03cd00d538a6 ("usbip: vhci-hcd: Set the vhci structure up to work") Signed-off-by: Randy Dunlap Reported-by: syzbot+297d20e437b79283bf6d@syzkaller.appspotmail.com Cc: Yuyang Du Cc: Shuah Khan Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Cc: stable Link: https://lore.kernel.org/r/20201229071309.18418-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit 020a1f453449294926ca548d8d5ca970926e8dfd Author: Johan Hovold Date: Mon Jan 4 15:53:02 2021 +0100 USB: usblp: fix DMA to stack Stack-allocated buffers cannot be used for DMA (on all architectures). Replace the HP-channel macro with a helper function that allocates a dedicated transfer buffer so that it can continue to be used with arguments from the stack. Note that the buffer is cleared on allocation as usblp_ctrl_msg() returns success also on short transfers (the buffer is only used for debugging). Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210104145302.2087-1-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 4bfd6247fa9164c8e193a55ef9c0ea3ee22f82d8 Author: Takashi Iwai Date: Mon Jan 4 16:30:46 2021 +0100 ALSA: hda/via: Fix runtime PM for Clevo W35xSS Clevo W35xSS_370SS with VIA codec has had the runtime PM problem that looses the power state of some nodes after the runtime resume. This was worked around by disabling the default runtime PM via a denylist entry. Since 5.10.x made the runtime PM applied (casually) even though it's disabled in the denylist, this problem was revisited. The result was that disabling power_save_node feature suffices for the runtime PM problem. This patch implements the disablement of power_save_node feature in VIA codec for the device. It also drops the former denylist entry, too, as the runtime PM should work in the codec side properly now. Fixes: b529ef2464ad ("ALSA: hda: Add Clevo W35xSS_370SS to the power_save blacklist") Reported-by: Christian Labisch Cc: Link: https://lore.kernel.org/r/20210104153046.19993-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 54d0a3ab80f49f19ee916def62fe067596833403 Author: Johan Hovold Date: Mon Jan 4 15:50:07 2021 +0100 USB: serial: iuu_phoenix: fix DMA from stack Stack-allocated buffers cannot be used for DMA (on all architectures) so allocate the flush command buffer using kmalloc(). Fixes: 60a8fc017103 ("USB: add iuu_phoenix driver") Cc: stable # 2.6.25 Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 0e2d6795e8dbe91c2f5473564c6b25d11df3778b Author: Daniel Palmer Date: Sun Dec 27 12:17:16 2020 +0900 USB: serial: option: add LongSung M5710 module support Add a device-id entry for the LongSung M5710 module. T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=2df3 ProdID=9d03 Rev= 1.00 S: Manufacturer=Marvell S: Product=Mobile Composite Device Bus S: SerialNumber= C:* #Ifs= 5 Cfg#= 1 Atr=c0 MxPwr=500mA A: FirstIf#= 0 IfCount= 2 Cls=e0(wlcon) Sub=01 Prot=03 I:* If#= 0 Alt= 0 #EPs= 1 Cls=e0(wlcon) Sub=01 Prot=03 Driver=rndis_host E: Ad=87(I) Atr=03(Int.) MxPS= 64 Ivl=4096ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=rndis_host E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=0c(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=0b(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=89(I) Atr=03(Int.) MxPS= 64 Ivl=4096ms E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=0f(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=88(I) Atr=03(Int.) MxPS= 64 Ivl=4096ms E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=0a(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms Signed-off-by: Daniel Palmer https://lore.kernel.org/r/20201227031716.1343300-1-daniel@0x0f.com [ johan: drop id defines, only bind to vendor class ] Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit 273435a1d4e5826f039625c23ba4fe9a09f24d75 Author: Arnd Bergmann Date: Sun Jan 3 22:41:44 2021 +0100 HID: sony: select CONFIG_CRC32 Without crc32 support, this driver fails to link: arm-linux-gnueabi-ld: drivers/hid/hid-sony.o: in function `sony_raw_event': hid-sony.c:(.text+0x8f4): undefined reference to `crc32_le' arm-linux-gnueabi-ld: hid-sony.c:(.text+0x900): undefined reference to `crc32_le' arm-linux-gnueabi-ld: drivers/hid/hid-sony.o:hid-sony.c:(.text+0x4408): more undefined references to `crc32_le' follow Signed-off-by: Arnd Bergmann Signed-off-by: Jiri Kosina commit de30491e8bfeeba1500bba293333eb51ece529d5 Author: Arnd Bergmann Date: Sun Jan 3 14:53:55 2021 +0100 HID: sfh: fix address space confusion The new driver uses a phys_addr_t to store a DMA address, which does not work when the two are different size: drivers/hid/amd-sfh-hid/amd_sfh_client.c:157:11: error: incompatible pointer types passing 'phys_addr_t *' (aka 'unsigned int *') to parameter of type 'dma_addr_t *' (aka 'unsigned long long *') [-Werror,-Wincompatible-pointer-types] &cl_data->sensor_phys_addr[i], ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/dma-mapping.h:393:15: note: passing argument to parameter 'dma_handle' here dma_addr_t *dma_handle, gfp_t gfp) ^ Change both the type and the variable name to dma_addr for consistency. Fixes: 4b2c53d93a4b ("SFH:Transport Driver to add support of AMD Sensor Fusion Hub (SFH)") Signed-off-by: Arnd Bergmann Signed-off-by: Jiri Kosina commit 92ff62a7bcc17d47c0ce8dddfb7a6e1a2e55ebf4 Author: Billy Tsai Date: Thu Dec 17 10:49:12 2020 +0800 pinctrl: aspeed: g6: Fix PWMG0 pinctrl setting The SCU offset for signal PWM8 in group PWM8G0 is wrong, fix it from SCU414 to SCU4B4. Signed-off-by: Billy Tsai Fixes: 2eda1cdec49f ("pinctrl: aspeed: Add AST2600 pinmux support") Reviewed-by: Joel Stanley Reviewed-by: Andrew Jeffery Link: https://lore.kernel.org/r/20201217024912.3198-1-billy_tsai@aspeedtech.com Signed-off-by: Linus Walleij commit 5b569302520ac8cef03e7a841e45cb37234f8b5f Author: Shyam Sundar S K Date: Wed Dec 30 13:40:28 2020 +0530 platform/x86: amd-pmc: Fix CONFIG_DEBUG_FS check lkp reported that CONFIG_DEBUG_FS was not defined because of wrong usage if macro, correcting it now. Fixes: 156ec4731cb2 ("platform/x86: amd-pmc: Add AMD platform support for S2Idle") Reported-by: kernel test robot Signed-off-by: Shyam Sundar S K Link: https://lore.kernel.org/r/20201230081028.2615217-1-Shyam-sundar.S-k@amd.com Signed-off-by: Hans de Goede commit aa44afab87af079e0cf2ead9621d0447798a305e Author: Mark Pearson Date: Tue Dec 29 21:47:26 2020 -0500 platform/x86: thinkpad_acpi: correct palmsensor error checking The previous commit adding functionality for the palm sensor had a mistake which meant the error conditions on initialisation was not checked correctly. On some older platforms this meant that if the sensor wasn't available an error would be returned and the driver would fail to load. This commit corrects the error condition. Many thanks to Mario Oenning for reporting and determining the issue Signed-off-by: Mark Pearson Link: https://lore.kernel.org/r/20201230024726.7861-1-markpearson@lenovo.com Signed-off-by: Hans de Goede commit fcd38f178b785623c0325958225744f0d8a075c0 Author: Arnold Gozum Date: Sat Dec 26 15:53:06 2020 -0500 platform/x86: intel-vbtn: Support for tablet mode on Dell Inspiron 7352 The Dell Inspiron 7352 is a 2-in-1 model that has chassis-type "Notebook". Add this model to the dmi_switches_allow_list. Signed-off-by: Arnold Gozum Link: https://lore.kernel.org/r/20201226205307.249659-1-arngozum@gmail.com Signed-off-by: Hans de Goede commit 46c54cf2706122c37497896d56d67b0c0aca2ede Author: Hans de Goede Date: Thu Dec 24 14:51:58 2020 +0100 platform/x86: touchscreen_dmi: Add swap-x-y quirk for Goodix touchscreen on Estar Beauty HD tablet The Estar Beauty HD (MID 7316R) tablet uses a Goodix touchscreen, with the X and Y coordinates swapped compared to the LCD panel. Add a touchscreen_dmi entry for this adding a "touchscreen-swapped-x-y" device-property to the i2c-client instantiated for this device before the driver binds. This is the first entry of a Goodix touchscreen to touchscreen_dmi.c, so far DMI quirks for Goodix touchscreen's have been added directly to drivers/input/touchscreen/goodix.c. Currently there are 3 DMI tables in goodix.c: 1. rotated_screen[] for devices where the touchscreen is rotated 180 degrees vs the LCD panel 2. inverted_x_screen[] for devices where the X axis is inverted 3. nine_bytes_report[] for devices which use a non standard touch report size Arguably only 3. really needs to be inside the driver and the other 2 cases are better handled through the generic touchscreen DMI quirk mechanism from touchscreen_dmi.c, which allows adding device-props to any i2c-client. Esp. now that goodix.c is using the generic touchscreen_properties code. Alternative to the approach from this patch we could add a 4th dmi_system_id table for devices with swapped-x-y axis to goodix.c, but that seems undesirable. Cc: Bastien Nocera Cc: Dmitry Torokhov Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20201224135158.10976-1-hdegoede@redhat.com commit 9bba96275576da0cf78ede62aeb2fc975ed8a32d Author: Heikki Krogerus Date: Wed Dec 23 17:36:44 2020 +0300 platform/x86: i2c-multi-instantiate: Don't create platform device for INT3515 ACPI nodes There are several reports about the tps6598x causing interrupt flood on boards with the INT3515 ACPI node, which then causes instability. There appears to be several problems with the interrupt. One problem is that the I2CSerialBus resources do not always map to the Interrupt resource with the same index, but that is not the only problem. We have not been able to come up with a solution for all the issues, and because of that disabling the device for now. The PD controller on these platforms is autonomous, and the purpose for the driver is primarily to supply status to the userspace, so this will not affect any functionality. Reported-by: Moody Salem Fixes: a3dd034a1707 ("ACPI / scan: Create platform device for INT3515 ACPI nodes") Cc: stable@vger.kernel.org BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1883511 Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20201223143644.33341-1-heikki.krogerus@linux.intel.com Signed-off-by: Hans de Goede commit e4a02c7a0e3aeb966e4fdc4a43dce978c467fe83 Author: Geert Uytterhoeven Date: Wed Dec 16 14:37:52 2020 +0100 platform/surface: SURFACE_PLATFORMS should depend on ACPI All Microsoft Surface platform-specific device drivers depend on ACPI, but the gatekeeper symbol SURFACE_PLATFORMS does not. Hence when the user is configuring a kernel without ACPI support, he is still asked about Microsoft Surface drivers, even though this question is irrelevant. Fix this by moving the dependency on ACPI from the individual driver symbols to SURFACE_PLATFORMS. Signed-off-by: Geert Uytterhoeven Reviewed-by: Maximilian Luz Link: https://lore.kernel.org/r/20201216133752.1321978-1-geert@linux-m68k.org Signed-off-by: Hans de Goede commit 6a4b1f2dff558d75ee4f2ce88595a933b6918183 Author: Randy Dunlap Date: Mon Dec 14 15:33:36 2020 -0800 platform/surface: surface_gpe: Fix non-PM_SLEEP build warnings Fix build warnings when CONFIG_PM_SLEEP is not enabled and these functions are not used: ../drivers/platform/surface/surface_gpe.c:189:12: warning: ‘surface_gpe_resume’ defined but not used [-Wunused-function] static int surface_gpe_resume(struct device *dev) ^~~~~~~~~~~~~~~~~~ ../drivers/platform/surface/surface_gpe.c:184:12: warning: ‘surface_gpe_suspend’ defined but not used [-Wunused-function] static int surface_gpe_suspend(struct device *dev) ^~~~~~~~~~~~~~~~~~~ Fixes: 274335f1c557 ("platform/surface: Add Driver to set up lid GPEs on MS Surface device") Signed-off-by: Randy Dunlap Cc: Maximilian Luz Cc: Hans de Goede Cc: platform-driver-x86@vger.kernel.org Reviewed-by: Maximilian Luz Link: https://lore.kernel.org/r/20201214233336.19782-1-rdunlap@infradead.org Signed-off-by: Hans de Goede commit bbaa2e95e23e74791dd75b90d5ad9aad535acc6e Author: Srinivas Pandruvada Date: Sun Dec 20 23:18:59 2020 -0800 tools/power/x86/intel-speed-select: Set higher of cpuinfo_max_freq or base_frequency In some case when BIOS disabled turbo, cpufreq cpuinfo_max_freq can be lower than base_frequency at higher config level. So, in that case set scaling_min_freq to base_frequency. Signed-off-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20201221071859.2783957-3-srinivas.pandruvada@linux.intel.com Signed-off-by: Hans de Goede commit f981dc171c04c6cf5a35c712543b231ebf805832 Author: Srinivas Pandruvada Date: Sun Dec 20 23:18:58 2020 -0800 tools/power/x86/intel-speed-select: Set scaling_max_freq to base_frequency When BIOS disables turbo, The scaling_max_freq in cpufreq sysfs will be limited to config level 0 base frequency. But when user selects a higher config levels, this will result in higher base frequency. But since scaling_max_freq is still old base frequency, the performance will still be limited. So when the turbo is disabled and cpufreq base_frequency is higher than scaling_max_freq, update the scaling_max_freq to the base_frequency. Signed-off-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20201221071859.2783957-2-srinivas.pandruvada@linux.intel.com Signed-off-by: Hans de Goede commit b4aa4876e58d12fb3ace425969dcbf4df37aa254 Author: Paul Cercueil Date: Fri Dec 11 23:28:10 2020 +0000 pinctrl: ingenic: Rename registers from JZ4760_GPIO_* to JZ4770_GPIO_* Now that JZ4760 support has been fixed, it looks wrong to have JZ4760_GPIO_* registers being written if the SoC is a JZ4770 or later. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20201211232810.261565-2-paul@crapouillou.net Signed-off-by: Linus Walleij commit 9a85c09a3f507b925d75cb0c7c8f364467038052 Author: Paul Cercueil Date: Fri Dec 11 23:28:09 2020 +0000 pinctrl: ingenic: Fix JZ4760 support - JZ4760 and JZ4760B have a similar register layout as the JZ4740, and don't use the new register layout, which was introduced with the JZ4770 SoC and not the JZ4760 or JZ4760B SoCs. - The JZ4740 code path only expected two function modes to be configurable for each pin, and wouldn't work with more than two. Fix it for the JZ4760, which has four configurable function modes. Fixes: 0257595a5cf4 ("pinctrl: Ingenic: Add pinctrl driver for JZ4760 and JZ4760B.") Cc: # 5.3 Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20201211232810.261565-1-paul@crapouillou.net Signed-off-by: Linus Walleij commit 4b1a60a1bb8f03d82c3f6da424adc96667b59f2a Author: Georgi Djakov Date: Mon Jan 4 15:50:43 2021 +0200 MAINTAINERS: Update Georgi's email address Use my kernel.org email as main address to make things a bit easier for me to handle. Link: https://lore.kernel.org/r/20210104135043.31262-1-georgi.djakov@linaro.org Signed-off-by: Georgi Djakov commit d957d1610c661e758426654de3b04bea6fb29f8b Author: Arnd Bergmann Date: Wed Dec 30 15:56:23 2020 +0100 regulator: qcom-rpmh: add QCOM_COMMAND_DB dependency A built-in regulator driver cannot link against a modular cmd_db driver: qcom-rpmh-regulator.c:(.text+0x174): undefined reference to `cmd_db_read_addr' There is already a dependency for RPMh, so add another one of this type for cmd_db. Fixes: 34c5aa2666db ("regulator: Kconfig: Fix REGULATOR_QCOM_RPMH dependencies to avoid build error") Fixes: 46fc033eba42 ("regulator: add QCOM RPMh regulator driver") Signed-off-by: Arnd Bergmann Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20201230145712.3133110-1-arnd@kernel.org Signed-off-by: Mark Brown commit df6b92fa40050e59ea89784294bf6d04c0c47705 Author: Dmitry Baryshkov Date: Thu Dec 31 15:23:46 2020 +0300 regulator: qcom-rpmh-regulator: correct hfsmps515 definition According to the datasheet pm8009's HFS515 regulators have 16mV resolution rather than declared 1.6 mV. Correct the resolution. Signed-off-by: Dmitry Baryshkov Fixes: 06369bcc15a1 ("regulator: qcom-rpmh: Add support for SM8150") Reviewed-by: Vinod Koul Link: https://lore.kernel.org/r/20201231122348.637917-3-dmitry.baryshkov@linaro.org Signed-off-by: Mark Brown commit 2bf3a72b08e7f6356a2db9e1571ca65f683510bb Author: Dmitry Baryshkov Date: Thu Dec 31 15:23:45 2020 +0300 dt-bindings: regulator: qcom,rpmh-regulator: add pm8009 revision PMIC pm8009 has special revision (P=1) made for sm8250 platform. The major difference is the S2 regulator which supplies 0.95 V instead of 2.848V. Add special compatibility string for this chip revision. The datasheet calls the chip just pm8009-1, so use the same name. Signed-off-by: Dmitry Baryshkov Reviewed-by: Vinod Koul Link: https://lore.kernel.org/r/20201231122348.637917-2-dmitry.baryshkov@linaro.org Signed-off-by: Mark Brown commit 6170d077bf92c5b3dfbe1021688d3c0404f7c9e9 Author: Xu Yilun Date: Mon Jan 4 09:29:09 2021 +0800 spi: fix the divide by 0 error when calculating xfer waiting time The xfer waiting time is the result of xfer->len / xfer->speed_hz. This patch makes the assumption of 100khz xfer speed if the xfer->speed_hz is not assigned and stays 0. This avoids the divide by 0 issue and ensures a reasonable tolerant waiting time. Signed-off-by: Xu Yilun Link: https://lore.kernel.org/r/1609723749-3557-1-git-send-email-yilun.xu@intel.com Signed-off-by: Mark Brown commit c3d6eb6e54373f297313b65c1f2319d36914d579 Author: Kai-Heng Feng Date: Wed Dec 30 20:44:07 2020 +0800 HID: multitouch: Enable multi-input for Synaptics pointstick/touchpad device Pointstick and its left/right buttons on HP EliteBook 850 G7 need multi-input quirk to work correctly. Signed-off-by: Kai-Heng Feng Signed-off-by: Jiri Kosina commit 98bf2d3f4970179c702ef64db658e0553bc6ef3a Author: Christophe Leroy Date: Tue Dec 22 07:11:18 2020 +0000 powerpc/32s: Fix RTAS machine check with VMAP stack When we have VMAP stack, exception prolog 1 sets r1, not r11. When it is not an RTAS machine check, don't trash r1 because it is needed by prolog 1. Fixes: da7bb43ab9da ("powerpc/32: Fix vmap stack - Properly set r1 before activating MMU") Fixes: d2e006036082 ("powerpc/32: Use SPRN_SPRG_SCRATCH2 in exception prologs") Cc: stable@vger.kernel.org # v5.10+ Signed-off-by: Christophe Leroy [mpe: Squash in fixup for RTAS machine check from Christophe] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/bc77d61d1c18940e456a2dee464f1e2eda65a3f0.1608621048.git.christophe.leroy@csgroup.eu commit 2d5efea64472469117dc1a9a39530069e95b21e9 Author: Shravya Kumbham Date: Wed Dec 23 16:51:02 2020 +0530 dmaengine: xilinx_dma: fix mixed_enum_type coverity warning Typecast the fls(width -1) with (enum dmaengine_alignment) in xilinx_dma_chan_probe function to fix the coverity warning. Addresses-Coverity: Event mixed_enum_type. Fixes: 9cd4360de609 ("dma: Add Xilinx AXI Video Direct Memory Access Engine driver support") Signed-off-by: Shravya Kumbham Signed-off-by: Radhey Shyam Pandey Link: https://lore.kernel.org/r/1608722462-29519-4-git-send-email-radhey.shyam.pandey@xilinx.com Signed-off-by: Vinod Koul commit faeb0731be0a31e2246b21a85fa7dabbd750101d Author: Shravya Kumbham Date: Wed Dec 23 16:51:01 2020 +0530 dmaengine: xilinx_dma: fix incompatible param warning in _child_probe() In xilinx_dma_child_probe function, the nr_channels variable is passed to of_property_read_u32() which expects an u32 return value pointer. Modify the nr_channels variable type from int to u32 to fix the incompatible parameter coverity warning. Addresses-Coverity: Event incompatible_param. Fixes: 1a9e7a03c761 ("dmaengine: vdma: Add support for mulit-channel dma mode") Signed-off-by: Shravya Kumbham Signed-off-by: Radhey Shyam Pandey Link: https://lore.kernel.org/r/1608722462-29519-3-git-send-email-radhey.shyam.pandey@xilinx.com Signed-off-by: Vinod Koul commit 99974aedbd73523969afb09f33c6e3047cd0ddae Author: Shravya Kumbham Date: Wed Dec 23 16:51:00 2020 +0530 dmaengine: xilinx_dma: check dma_async_device_register return value dma_async_device_register() can return non-zero error code. Add condition to check the return value of dma_async_device_register function and handle the error path. Addresses-Coverity: Event check_return. Fixes: 9cd4360de609 ("dma: Add Xilinx AXI Video Direct Memory Access Engine driver support") Signed-off-by: Shravya Kumbham Signed-off-by: Radhey Shyam Pandey Link: https://lore.kernel.org/r/1608722462-29519-2-git-send-email-radhey.shyam.pandey@xilinx.com Signed-off-by: Vinod Koul commit 0bd1bf86ab79555425b9f0b63005e181defe4da6 Author: Arnd Bergmann Date: Sun Jan 3 14:57:29 2021 +0100 dmaengine: qcom: fix gpi undefined behavior gcc points out an incorrect error handling loop: drivers/dma/qcom/gpi.c: In function 'gpi_ch_init': drivers/dma/qcom/gpi.c:1254:15: error: iteration 2 invokes undefined behavior [-Werror=aggressive-loop-optimizations] 1254 | struct gpii *gpii = gchan->gpii; | ^~~~ drivers/dma/qcom/gpi.c:1951:2: note: within this loop 1951 | for (i = i - 1; i >= 0; i++) { | ^~~ Change the loop to correctly walk backwards through the initialized fields rather than off into the woods. Fixes: 5d0c3533a19f ("dmaengine: qcom: Add GPI dma driver") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20210103135738.3741123-1-arnd@kernel.org Signed-off-by: Vinod Koul commit 366911cd762db02c2dd32fad1be96b72a66f205d Author: David Howells Date: Wed Dec 23 10:39:57 2020 +0000 afs: Fix directory entry size calculation The number of dirent records used by an AFS directory entry should be calculated using the assumption that there is a 16-byte name field in the first block, rather than a 20-byte name field (which is actually the case). This miscalculation is historic and effectively standard, so we have to use it. The calculation we need to use is: 1 + (((strlen(name) + 1) + 15) >> 5) where we are adding one to the strlen() result to account for the NUL termination. Fix this by the following means: (1) Create an inline function to do the calculation for a given name length. (2) Use the function to calculate the number of records used for a dirent in afs_dir_iterate_block(). Use this to move the over-end check out of the loop since it only needs to be done once. Further use this to only go through the loop for the 2nd+ records composing an entry. The only test there now is for if the record is allocated - and we already checked the first block at the top of the outer loop. (3) Add a max name length check in afs_dir_iterate_block(). (4) Make afs_edit_dir_add() and afs_edit_dir_remove() use the function from (1) to calculate the number of blocks rather than doing it incorrectly themselves. Fixes: 63a4681ff39c ("afs: Locally edit directory data for mkdir/create/unlink/...") Fixes: ^1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: David Howells Tested-by: Marc Dionne commit 26982a89cad77c0efc1c0c79bee0e3d75e9281d4 Author: David Howells Date: Mon Dec 21 22:37:58 2020 +0000 afs: Work around strnlen() oops with CONFIG_FORTIFIED_SOURCE=y AFS has a structured layout in its directory contents (AFS dirs are downloaded as files and parsed locally by the client for lookup/readdir). The slots in the directory are defined by union afs_xdr_dirent. This, however, only directly allows a name of a length that will fit into that union. To support a longer name, the next 1-8 contiguous entries are annexed to the first one and the name flows across these. afs_dir_iterate_block() uses strnlen(), limited to the space to the end of the page, to find out how long the name is. This worked fine until 6a39e62abbaf. With that commit, the compiler determines the size of the array and asserts that the string fits inside that array. This is a problem for AFS because we *expect* it to overflow one or more arrays. A similar problem also occurs in afs_dir_scan_block() when a directory file is being locally edited to avoid the need to redownload it. There strlen() was being used safely because each page has the last byte set to 0 when the file is downloaded and validated (in afs_dir_check_page()). Fix this by changing the afs_xdr_dirent union name field to an indeterminate-length array and dropping the overflow field. (Note that whilst looking at this, I realised that the calculation of the number of slots a dirent used is non-standard and not quite right, but I'll address that in a separate patch.) The issue can be triggered by something like: touch /afs/example.com/thisisaveryveryverylongname and it generates a report that looks like: detected buffer overflow in strnlen ------------[ cut here ]------------ kernel BUG at lib/string.c:1149! ... RIP: 0010:fortify_panic+0xf/0x11 ... Call Trace: afs_dir_iterate_block+0x12b/0x35b afs_dir_iterate+0x14e/0x1ce afs_do_lookup+0x131/0x417 afs_lookup+0x24f/0x344 lookup_open.isra.0+0x1bb/0x27d open_last_lookups+0x166/0x237 path_openat+0xe0/0x159 do_filp_open+0x48/0xa4 ? kmem_cache_alloc+0xf5/0x16e ? __clear_close_on_exec+0x13/0x22 ? _raw_spin_unlock+0xa/0xb do_sys_openat2+0x72/0xde do_sys_open+0x3b/0x58 do_syscall_64+0x2d/0x3a entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: 6a39e62abbaf ("lib: string.h: detect intra-object overflow in fortified string functions") Reported-by: Marc Dionne Signed-off-by: David Howells Tested-by: Marc Dionne cc: Daniel Axtens commit 4883a60c17eda6bf52d1c817ee7ead65b4a02da2 Author: Sean Nyekjaer Date: Mon Dec 21 11:00:13 2020 +0100 mtd: rawnand: gpmi: fix dst bit offset when extracting raw payload Re-add the multiply by 8 to "step * eccsize" to correct the destination bit offset when extracting the data payload in gpmi_ecc_read_page_raw(). Fixes: e5e5631cc889 ("mtd: rawnand: gpmi: Use nand_extract_bits()") Cc: stable@vger.kernel.org Reported-by: Martin Hundebøll Signed-off-by: Sean Nyekjaer Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201221100013.2715675-1-sean@geanix.com commit 095507dc1350b3a2b8b39fdc05edba0c10859eca Author: Nicolas Saenz Julienne Date: Fri Dec 18 17:33:07 2020 +0100 arm64: mm: Fix ARCH_LOW_ADDRESS_LIMIT when !CONFIG_ZONE_DMA Systems configured with CONFIG_ZONE_DMA32, CONFIG_ZONE_NORMAL and !CONFIG_ZONE_DMA will fail to properly setup ARCH_LOW_ADDRESS_LIMIT. The limit will default to ~0ULL, effectively spanning the whole memory, which is too high for a configuration that expects low memory to be capped at 4GB. Fix ARCH_LOW_ADDRESS_LIMIT by falling back to arm64_dma32_phys_limit when arm64_dma_phys_limit isn't set. arm64_dma32_phys_limit will honour CONFIG_ZONE_DMA32, or span the entire memory when not enabled. Fixes: 1a8e1cef7603 ("arm64: use both ZONE_DMA and ZONE_DMA32") Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20201218163307.10150-1-nsaenzjulienne@suse.de Signed-off-by: Catalin Marinas commit b614231dec7864a338ce85032aa3d2d7ea2bc46d Author: Peter Collingbourne Date: Wed Dec 2 23:34:58 2020 -0800 arm64: mte: remove an ISB on kernel exit This ISB is unnecessary because we will soon do an ERET. Signed-off-by: Peter Collingbourne Link: https://linux-review.googlesource.com/id/I69f1ee6bb09b1372dd744a0e01cedaf090c8d448 Link: https://lore.kernel.org/r/20201203073458.2675400-1-pcc@google.com Signed-off-by: Catalin Marinas commit 42e85f90171a4ba59a1e1cedbbc30ce3f68f2317 Author: Geert Uytterhoeven Date: Tue Dec 15 11:30:26 2020 +0100 arm64/smp: Remove unused irq variable in arch_show_interrupts() arch/arm64/kernel/smp.c: In function ‘arch_show_interrupts’: arch/arm64/kernel/smp.c:808:16: warning: unused variable ‘irq’ [-Wunused-variable] 808 | unsigned int irq = irq_desc_get_irq(ipi_desc[i]); | ^~~ The removal of the last user forgot to remove the variable. Fixes: 5089bc51f81f ("arm64/smp: Use irq_desc_kstat_cpu() in arch_show_interrupts()") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201215103026.2872532-1-geert+renesas@glider.be Signed-off-by: Catalin Marinas commit 896111dc4bcf887b835b3ef54f48b450d4692a1d Author: Sean Young Date: Sun Dec 20 13:29:54 2020 +0100 media: rc: ensure that uevent can be read directly after rc device register There is a race condition where if the /sys/class/rc0/uevent file is read before rc_dev->registered is set to true, -ENODEV will be returned. Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1901089 Cc: stable@vger.kernel.org Fixes: a2e2d73fa281 ("media: rc: do not access device via sysfs after rc_unregister_device()") Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit da64ae2d35d3673233f0403b035d4c6acbf71965 Author: Visa Hankala Date: Wed Dec 30 16:15:53 2020 +0000 xfrm: Fix wraparound in xfrm_policy_addr_delta() Use three-way comparison for address components to avoid integer wraparound in the result of xfrm_policy_addr_delta(). This ensures that the search trees are built and traversed correctly. Treat IPv4 and IPv6 similarly by returning 0 when prefixlen == 0. Prefix /0 has only one equivalence class. Fixes: 9cf545ebd591d ("xfrm: policy: store inexact policies in a tree ordered by destination address") Signed-off-by: Visa Hankala Acked-by: Florian Westphal Signed-off-by: Steffen Klassert commit f6e9ceb7a7fc321a31a9dde93a99b7b4b016a3b3 Author: Po-Hsu Lin Date: Wed Dec 30 17:52:04 2020 +0800 selftests: xfrm: fix test return value override issue in xfrm_policy.sh When running this xfrm_policy.sh test script, even with some cases marked as FAIL, the overall test result will still be PASS: $ sudo ./xfrm_policy.sh PASS: policy before exception matches FAIL: expected ping to .254 to fail (exceptions) PASS: direct policy matches (exceptions) PASS: policy matches (exceptions) FAIL: expected ping to .254 to fail (exceptions and block policies) PASS: direct policy matches (exceptions and block policies) PASS: policy matches (exceptions and block policies) FAIL: expected ping to .254 to fail (exceptions and block policies after hresh changes) PASS: direct policy matches (exceptions and block policies after hresh changes) PASS: policy matches (exceptions and block policies after hresh changes) FAIL: expected ping to .254 to fail (exceptions and block policies after hthresh change in ns3) PASS: direct policy matches (exceptions and block policies after hthresh change in ns3) PASS: policy matches (exceptions and block policies after hthresh change in ns3) FAIL: expected ping to .254 to fail (exceptions and block policies after htresh change to normal) PASS: direct policy matches (exceptions and block policies after htresh change to normal) PASS: policy matches (exceptions and block policies after htresh change to normal) PASS: policies with repeated htresh change $ echo $? 0 This is because the $lret in check_xfrm() is not a local variable. Therefore when a test failed in check_exceptions(), the non-zero $lret will later get reset to 0 when the next test calls check_xfrm(). With this fix, the final return value will be 1. Make it easier for testers to spot this failure. Fixes: 39aa6928d462d0 ("xfrm: policy: fix netlink/pf_key policy lookups") Signed-off-by: Po-Hsu Lin Acked-by: Florian Westphal Signed-off-by: Steffen Klassert commit afbc293add6466f8f3f0c3d944d85f53709c170f Author: Cong Wang Date: Sat Dec 26 16:50:20 2020 -0800 af_key: relax availability checks for skb size calculation xfrm_probe_algs() probes kernel crypto modules and changes the availability of struct xfrm_algo_desc. But there is a small window where ealg->available and aalg->available get changed between count_ah_combs()/count_esp_combs() and dump_ah_combs()/dump_esp_combs(), in this case we may allocate a smaller skb but later put a larger amount of data and trigger the panic in skb_put(). Fix this by relaxing the checks when counting the size, that is, skipping the test of ->available. We may waste some memory for a few of sizeof(struct sadb_comb), but it is still much better than a panic. Reported-by: syzbot+b2bf2652983d23734c5c@syzkaller.appspotmail.com Cc: Steffen Klassert Cc: Herbert Xu Signed-off-by: Cong Wang Signed-off-by: Steffen Klassert commit 9f8550e4bd9d78a8436c2061ad2530215f875376 Author: Eyal Birger Date: Wed Dec 23 17:00:46 2020 +0200 xfrm: fix disable_xfrm sysctl when used on xfrm interfaces The disable_xfrm flag signals that xfrm should not be performed during routing towards a device before reaching device xmit. For xfrm interfaces this is usually desired as they perform the outbound policy lookup as part of their xmit using their if_id. Before this change enabling this flag on xfrm interfaces prevented them from xmitting as xfrm_lookup_with_ifid() would not perform a policy lookup in case the original dst had the DST_NOXFRM flag. This optimization is incorrect when the lookup is done by the xfrm interface xmit logic. Fix by performing policy lookup when invoked by xfrmi as if_id != 0. Similarly it's unlikely for the 'no policy exists on net' check to yield any performance benefits when invoked from xfrmi. Fixes: f203b76d7809 ("xfrm: Add virtual xfrm interfaces") Signed-off-by: Eyal Birger Signed-off-by: Steffen Klassert commit d6c1ddd938d84a1adef7e19e8efc10e1b4df5034 Author: Bjørn Mork Date: Wed Dec 30 16:25:34 2020 +0100 USB: serial: option: add Quectel EM160R-GL New modem using ff/ff/30 for QCDM, ff/00/00 for AT and NMEA, and ff/ff/ff for RMNET/QMI. T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=5000 MxCh= 0 D: Ver= 3.20 Cls=ef(misc ) Sub=02 Prot=01 MxPS= 9 #Cfgs= 1 P: Vendor=2c7c ProdID=0620 Rev= 4.09 S: Manufacturer=Quectel S: Product=EM160R-GL S: SerialNumber=e31cedc1 C:* #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=896mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=(none) E: Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none) E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none) E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=84(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none) E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=86(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) E: Ad=88(I) Atr=03(Int.) MxPS= 8 Ivl=32ms E: Ad=8e(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms E: Ad=0f(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms Cc: stable@vger.kernel.org Signed-off-by: Bjørn Mork [ johan: add model comment ] Signed-off-by: Johan Hovold commit d092bd9110494de3372722b317510b3692f1b2fe Author: Arnd Bergmann Date: Sun Jan 3 14:55:17 2021 +0100 phy: mediatek: allow compile-testing the dsi phy Randconfig builds show another broken dependency: WARNING: unmet direct dependencies detected for PHY_MTK_MIPI_DSI Depends on [n]: ARCH_MEDIATEK [=n] && OF [=y] Selected by [m]: - DRM_MEDIATEK [=m] && HAS_IOMEM [=y] && DRM [=m] && (ARCH_MEDIATEK [=n] || ARM [=y] && COMPILE_TEST [=y]) && COMMON_CLK [=y] && HAVE_ARM_SMCCC [=y] && OF [=y] && MTK_MMSYS [=y] This is similar to the hdmi driver I fixed earlier, and I guess the common-clk bug would sooner or later also manifest here, so just use the exact same solution I chose for the other driver, and hope that any future drivers just copy it from here. Fixes: 90f80d95992f ("phy: mediatek: Move mtk_mipi_dsi_phy driver into drivers/phy/mediatek folder") Fixes: f5f6e01f9164 ("phy: mediatek: allow compile-testing the hdmi phy") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20210103135524.3678664-1-arnd@kernel.org Signed-off-by: Vinod Koul commit 764257d9069a9c19758b626cc1ba4ae079335d9e Author: Tony Lindgren Date: Wed Dec 30 12:21:05 2020 +0200 phy: cpcap-usb: Fix warning for missing regulator_disable On deferred probe, we will get the following splat: cpcap-usb-phy cpcap-usb-phy.0: could not initialize VBUS or ID IIO: -517 WARNING: CPU: 0 PID: 21 at drivers/regulator/core.c:2123 regulator_put+0x68/0x78 ... (regulator_put) from [] (release_nodes+0x1b4/0x1fc) (release_nodes) from [] (really_probe+0x104/0x4a0) (really_probe) from [] (driver_probe_device+0x58/0xb4) Signed-off-by: Tony Lindgren Link: https://lore.kernel.org/r/20201230102105.11826-1-tony@atomide.com Signed-off-by: Vinod Koul commit 60159e9e7bc7e528c103b6b6d47dfd83af29669c Author: Marek Vasut Date: Sun Jan 3 17:43:04 2021 -0800 Input: ili210x - implement pressure reporting for ILI251x The ILI251x seems to report pressure information in the 5th byte of each per-finger touch data element. On the available hardware, this information has the values ranging from 0x0 to 0xa, which is also matching the downstream example code. Report pressure information on the ILI251x. Signed-off-by: Marek Vasut Link: https://lore.kernel.org/r/20201224071238.160098-1-marex@denx.de Signed-off-by: Dmitry Torokhov commit a3a9060ecad030e2c7903b2b258383d2c716b56c Author: Alexey Dobriyan Date: Sun Jan 3 17:59:51 2021 -0800 Input: i8042 - unbreak Pegatron C15B g++ reports drivers/input/serio/i8042-x86ia64io.h:225:3: error: ‘.matches’ designator used multiple times in the same initializer list C99 semantics is that last duplicated initialiser wins, so DMI entry gets overwritten. Fixes: a48491c65b51 ("Input: i8042 - add ByteSpeed touchpad to noloop table") Signed-off-by: Alexey Dobriyan Acked-by: Po-Hsu Lin Link: https://lore.kernel.org/r/20201228072335.GA27766@localhost.localdomain Signed-off-by: Dmitry Torokhov commit 9bba03d4473df0b707224d4d2067b62d1e1e2a77 Author: Masahiro Yamada Date: Wed Dec 23 15:35:42 2020 +0900 kconfig: remove 'kvmconfig' and 'xenconfig' shorthands Linux 5.10 is out. Remove the 'kvmconfig' and 'xenconfig' shorthands as previously announced. Signed-off-by: Masahiro Yamada commit 0c36d88cff4d72149f94809303c5180b6f716d39 Author: John Millikin Date: Wed Dec 23 15:23:25 2020 +0900 lib/raid6: Let $(UNROLL) rules work with macOS userland Older versions of BSD awk are fussy about the order of '-v' and '-f' flags, and require a space after the flag name. This causes build failures on platforms with an old awk, such as macOS and NetBSD. Since GNU awk and modern versions of BSD awk (distributed with FreeBSD/OpenBSD) are fine with either form, the definition of 'cmd_unroll' can be trivially tweaked to let the lib/raid6 Makefile work with both old and new awk flag dialects. Signed-off-by: John Millikin Signed-off-by: Masahiro Yamada commit c0f975af1745391749e4306aa8081b9a4d2cced8 Author: John Millikin Date: Wed Dec 23 14:04:23 2020 +0900 kconfig: Support building mconf with vendor sysroot ncurses Changes the final fallback path in the ncurses locator for mconf to support host compilers with a non-default sysroot. This is similar to the hardcoded search for ncurses under '/usr/include', but can support compilers that keep their default header and library directories elsewhere. For nconfig, do nothing because the only vendor compiler I'm aware of with this layout (Apple Clang) ships an ncurses version that's too old for nconfig anyway. Signed-off-by: John Millikin Signed-off-by: Masahiro Yamada commit d39648eb67ac851c7918c794424c266a5d2635b9 Author: Randy Dunlap Date: Sat Dec 19 09:08:05 2020 -0800 kconfig: config script: add a little user help Give the user a clue about the problem along with the 35 lines of usage/help text. Signed-off-by: Randy Dunlap Cc: Andi Kleen Cc: Masahiro Yamada Cc: linux-kbuild@vger.kernel.org Signed-off-by: Masahiro Yamada commit 5136bb8c8b5872676f397b27f93a30568baf3a25 Author: Lukas Bulwahn Date: Sat Dec 19 17:24:56 2020 +0100 MAINTAINERS: adjust GCC PLUGINS after gcc-plugin.sh removal Commit 1e860048c53e ("gcc-plugins: simplify GCC plugin-dev capability test") removed ./scripts/gcc-plugin.sh, but missed to adjust MAINTAINERS. Hence, ./scripts/get_maintainers.pl --self-test=patterns warns: warning: no file matches F: scripts/gcc-plugin.sh Adjust entries in GGC PLUGINS section after this file removal. Signed-off-by: Lukas Bulwahn Signed-off-by: Masahiro Yamada commit 4f8b848788f77c7f5c3bd98febce66b7aa14785f Author: Arnd Bergmann Date: Sun Jan 3 22:43:52 2021 +0100 zonefs: select CONFIG_CRC32 When CRC32 is disabled, zonefs cannot be linked: ld: fs/zonefs/super.o: in function `zonefs_fill_super': Add a Kconfig 'select' statement for it. Fixes: 8dcc1a9d90c1 ("fs: New zonefs file system") Signed-off-by: Arnd Bergmann Signed-off-by: Damien Le Moal commit e71ba9452f0b5b2e8dc8aa5445198cd9214a6a62 Author: Linus Torvalds Date: Sun Jan 3 15:55:30 2021 -0800 Linux 5.11-rc2 commit 19cd3403cb0d522dd5e10188eef85817de29e26e Author: Arnd Bergmann Date: Sun Jan 3 22:43:09 2021 +0100 lightnvm: select CONFIG_CRC32 Without CRC32 support, this fails to link: arm-linux-gnueabi-ld: drivers/lightnvm/pblk-init.o: in function `pblk_init': pblk-init.c:(.text+0x2654): undefined reference to `crc32_le' arm-linux-gnueabi-ld: drivers/lightnvm/pblk-init.o: in function `pblk_exit': pblk-init.c:(.text+0x2a7c): undefined reference to `crc32_le' Fixes: a4bd217b4326 ("lightnvm: physical block device (pblk) target") Signed-off-by: Arnd Bergmann Signed-off-by: Jens Axboe commit 36a106a4c1c100d55ba3d32a21ef748cfcd4fa99 Author: Arnd Bergmann Date: Sun Jan 3 22:42:39 2021 +0100 block: rsxx: select CONFIG_CRC32 Without crc32, the driver fails to link: arm-linux-gnueabi-ld: drivers/block/rsxx/config.o: in function `rsxx_load_config': config.c:(.text+0x124): undefined reference to `crc32_le' Fixes: 8722ff8cdbfa ("block: IBM RamSan 70/80 device driver") Signed-off-by: Arnd Bergmann Signed-off-by: Jens Axboe commit a9164910c5ceed63551280a4a0b85d37ac2b19a5 Author: Shawn Guo Date: Sat Jan 2 12:59:40 2021 +0800 arm64: dts: qcom: c630: keep both touchpad devices enabled Indicated by AML code in ACPI table, the touchpad in-use could be found on two possible slave addresses on &i2c3, i.e. hid@15 and hid@2c. And which one is in-use can be determined by reading another address on the I2C bus. Unfortunately, for DT boot, there is currently no support in firmware to make this check and patch DT accordingly. This results in a non-functional touchpad on those C630 devices with hid@2c. As i2c-hid driver will stop probing the device if there is nothing on the slave address, we can actually keep both devices enabled in DT, and i2c-hid driver will only probe the existing one. The only problem is that we cannot set up pinctrl in both device nodes, as two devices with the same pinctrl will cause pin conflict that makes the second device fail to probe. Let's move the pinctrl state up to parent node to solve this problem. As the pinctrl state of parent node is already defined in sdm845.dtsi, it ends up with overwriting pinctrl-0 with i2c3_hid_active state added in there. Fixes: 11d0e4f28156 ("arm64: dts: qcom: c630: Polish i2c-hid devices") Signed-off-by: Shawn Guo Link: https://lore.kernel.org/r/20210102045940.26874-1-shawn.guo@linaro.org Signed-off-by: Bjorn Andersson commit 2e202ad873365513c6ad72e29a531071dffa498a Author: Kent Gibson Date: Mon Dec 28 00:10:40 2020 +0800 gpiolib: cdev: fix frame size warning in gpio_ioctl() The kernel test robot reports the following warning in [1]: drivers/gpio/gpiolib-cdev.c: In function 'gpio_ioctl': >>drivers/gpio/gpiolib-cdev.c:1437:1: warning: the frame size of 1040 bytes is larger than 1024 bytes [-Wframe-larger-than=] Refactor gpio_ioctl() to handle each ioctl in its own helper function and so reduce the variables stored on the stack to those explicitly required to service the ioctl at hand. The lineinfo_get_v1() helper handles both the GPIO_GET_LINEINFO_IOCTL and GPIO_GET_LINEINFO_WATCH_IOCTL, as per the corresponding v2 implementation - lineinfo_get(). [1] https://lore.kernel.org/lkml/202012270910.VW3qc1ER-lkp@intel.com/ Fixes: aad955842d1c ("gpiolib: cdev: support GPIO_V2_GET_LINEINFO_IOCTL and GPIO_V2_GET_LINEINFO_WATCH_IOCTL") Reported-by: kernel test robot Signed-off-by: Kent Gibson Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit b0e1306302018d876472ed074c1bfaa8020bf9df Author: Timon Reinold Date: Sat Jan 2 22:08:35 2021 +0100 ALSA: usb-audio: Add quirk for RC-505 BOSS RC-505 (shown by lsusb as "Roland Corp. RC-505") does require the same quirk as these other BOSS devices. Without this quirk it is neither possible to capture audio from nor to write audio to the RC-505. Both just result in an empty audio stream. With these changes both capture and playback seem to work quite fine. MIDI funtionality was not tested. Tested-by: Harry Reinold Signed-off-by: Timon Reinold Link: https://lore.kernel.org/r/20210102210835.21268-1-tirei@agon.one Signed-off-by: Takashi Iwai commit 04901aab40ea3779f6fc6383ef74d8e130e817bf Author: Yonghong Song Date: Wed Dec 30 21:24:18 2020 -0800 bpf: Fix a task_iter bug caused by a merge conflict resolution Latest bpf tree has a bug for bpf_iter selftest: $ ./test_progs -n 4/25 test_bpf_sk_storage_get:PASS:bpf_iter_bpf_sk_storage_helpers__open_and_load 0 nsec test_bpf_sk_storage_get:PASS:socket 0 nsec ... do_dummy_read:PASS:read 0 nsec test_bpf_sk_storage_get:FAIL:bpf_map_lookup_elem map value wasn't set correctly (expected 1792, got -1, err=0) #4/25 bpf_sk_storage_get:FAIL #4 bpf_iter:FAIL Summary: 0/0 PASSED, 0 SKIPPED, 2 FAILED When doing merge conflict resolution, Commit 4bfc4714849d missed to save curr_task to seq_file private data. The task pointer in seq_file private data is passed to bpf program. This caused NULL-pointer task passed to bpf program which will immediately return upon checking whether task pointer is NULL. This patch added back the assignment of curr_task to seq_file private data and fixed the issue. Fixes: 4bfc4714849d ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf") Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20201231052418.577024-1-yhs@fb.com commit 0aa171e9b267ce7c52d3a3df7bc9c1fc0203dec5 Author: Ard Biesheuvel Date: Sat Jan 2 14:59:09 2021 +0100 crypto: ecdh - avoid buffer overflow in ecdh_set_secret() Pavel reports that commit 17858b140bf4 ("crypto: ecdh - avoid unaligned accesses in ecdh_set_secret()") fixes one problem but introduces another: the unconditional memcpy() introduced by that commit may overflow the target buffer if the source data is invalid, which could be the result of intentional tampering. So check params.key_size explicitly against the size of the target buffer before validating the key further. Fixes: 17858b140bf4 ("crypto: ecdh - avoid unaligned accesses in ecdh_set_secret()") Reported-by: Pavel Machek Cc: Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit fd16931a2f518a32753920ff20895e5cf04c8ff1 Author: Ard Biesheuvel Date: Sun Dec 13 15:39:29 2020 +0100 crypto: arm/chacha-neon - add missing counter increment Commit 86cd97ec4b943af3 ("crypto: arm/chacha-neon - optimize for non-block size multiples") refactored the chacha block handling in the glue code in a way that may result in the counter increment to be omitted when calling chacha_block_xor_neon() to process a full block. This violates the skcipher API, which requires that the output IV is suitable for handling more input as long as the preceding input has been presented in round multiples of the block size. Also, the same code is exposed via the chacha library interface whose callers may actually rely on this increment to occur even for final blocks that are smaller than the chacha block size. So increment the counter after calling chacha_block_xor_neon(). Fixes: 86cd97ec4b943af3 ("crypto: arm/chacha-neon - optimize for non-block size multiples") Reported-by: Eric Biggers Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 3516bd729358a2a9b090c1905bd2a3fa926e24c6 Merge: d9296a7bd9c87 129975e75b9a2 Author: Linus Torvalds Date: Sat Jan 2 12:22:46 2021 -0800 Merge tag 's390-5.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 cleanups from Vasily Gorbik: "Update defconfigs and sort config select list" * tag 's390-5.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/Kconfig: sort config S390 select list once again s390: update defconfigs commit d9296a7bd9c87321766beeb041dc5b55326d9903 Merge: eda809aef5342 89ecf09e0b93d Author: Linus Torvalds Date: Sat Jan 2 11:53:05 2021 -0800 Merge tag 'pm-5.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These fix a crash in intel_pstate during resume from suspend-to-RAM that may occur after recent changes and two resource leaks in error paths in the operating performance points (OPP) framework, add a new C-states table to intel_idle and update the cpuidle MAINTAINERS entry to cover the governors too. Specifics: - Fix recently introduced crash in the intel_pstate driver that occurs if scale-invariance is disabled during resume from suspend-to-RAM due to inconsistent changes of APERF or MPERF MSR values made by the platform firmware (Rafael Wysocki). - Fix a memory leak and add a missing clk_put() in error paths in the OPP framework (Quanyang Wang, Viresh Kumar). - Add new C-states table for SnowRidge processors to the intel_idle driver (Artem Bityutskiy). - Update the MAINTAINERS entry for cpuidle to make it clear that the governors are covered by it too (Lukas Bulwahn)" * tag 'pm-5.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: intel_idle: add SnowRidge C-state table cpufreq: intel_pstate: Fix fast-switch fallback path opp: Call the missing clk_put() on error opp: fix memory leak in _allocate_opp_table MAINTAINERS: include governors into CPU IDLE TIME MANAGEMENT FRAMEWORK commit 89ecf09e0b93de54415de45be241649ec1b162de Merge: 977a3b0f6e405 be1283454b61a 9cf93f056f783 Author: Rafael J. Wysocki Date: Sat Jan 2 10:16:32 2021 +0100 Merge branches 'pm-cpufreq' and 'pm-cpuidle' * pm-cpufreq: cpufreq: intel_pstate: Fix fast-switch fallback path * pm-cpuidle: intel_idle: add SnowRidge C-state table MAINTAINERS: include governors into CPU IDLE TIME MANAGEMENT FRAMEWORK commit f605be6a57b439df7568a865c187b81863018c95 Author: Geert Uytterhoeven Date: Fri Jan 1 22:15:15 2021 -0800 Input: st1232 - wait until device is ready before reading resolution According to the st1232 datasheet, the host has to wait for the device to change into Normal state before accessing registers other than the Status Register. If the reset GPIO is wired, the device is powered on during driver probe, just before reading the resolution. However, the latter may happen before the device is ready, leading to a probe failure: st1232-ts 1-0055: Failed to read resolution: -6 Fix this by waiting until the device is ready, by trying to read the Status Register until it indicates so, or until timeout. On Armadillo 800 EVA, typically the first read fails with an I2C transfer error, while the second read indicates the device is ready. Fixes: 3a54a215410b1650 ("Input: st1232 - add support resolution reading") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201229162601.2154566-4-geert+renesas@glider.be Signed-off-by: Dmitry Torokhov commit b999dbea06b9874c7724a410f47a6bac1e219e37 Author: Geert Uytterhoeven Date: Fri Jan 1 22:13:13 2021 -0800 Input: st1232 - do not read more bytes than needed st1232_ts_read_data() already reads ts->read_buf_len bytes (8 or 20 bytes) from the touchscreen controller. This was fine when it was used to read touch point coordinates only, but is overkill for reading the touchscreen resolution, which just needs 3 bytes. Optimize transfers by passing the wanted number of bytes. Fixes: 3a54a215410b1650 ("Input: st1232 - add support resolution reading") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201229162601.2154566-3-geert+renesas@glider.be Signed-off-by: Dmitry Torokhov commit 928eedf013b25fcaeb6aef2ad721ed92c2e8bc66 Author: Geert Uytterhoeven Date: Fri Jan 1 22:12:27 2021 -0800 Input: st1232 - fix off-by-one error in resolution handling Before, the maximum coordinates were fixed to (799, 479) or (319, 479), depending on touchscreen controller type. The driver was changed to read the actual values from the touchscreen controller, but did not take into account the returned values are not the maximum coordinates, but the touchscreen resolution (e.g. 800 and 480). Fix this by subtracting 1. Fixes: 3a54a215410b1650 ("Input: st1232 - add support resolution reading") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201229162601.2154566-2-geert+renesas@glider.be Signed-off-by: Dmitry Torokhov commit eda809aef53426d044b519405d25d9da55319b76 Merge: 8b4805c68ae34 cb5253198f10a Author: Linus Torvalds Date: Fri Jan 1 12:58:07 2021 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "This is a load of driver fixes (12 ufs, 1 mpt3sas, 1 cxgbi). The big core two fixes are for power management ("block: Do not accept any requests while suspended" and "block: Fix a race in the runtime power management code") which finally sorts out the resume problems we've occasionally been having. To make the resume fix, there are seven necessary precursors which effectively renames REQ_PREEMPT to REQ_PM, so every "special" request in block is automatically a power management exempt one. All of the non-PM preempt cases are removed except for the one in the SCSI Parallel Interface (spi) domain validation which is a genuine case where we have to run requests at high priority to validate the bus so this becomes an autopm get/put protected request" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (22 commits) scsi: cxgb4i: Fix TLS dependency scsi: ufs: Un-inline ufshcd_vops_device_reset function scsi: ufs: Re-enable WriteBooster after device reset scsi: ufs-mediatek: Use correct path to fix compile error scsi: mpt3sas: Signedness bug in _base_get_diag_triggers() scsi: block: Do not accept any requests while suspended scsi: block: Remove RQF_PREEMPT and BLK_MQ_REQ_PREEMPT scsi: core: Only process PM requests if rpm_status != RPM_ACTIVE scsi: scsi_transport_spi: Set RQF_PM for domain validation commands scsi: ide: Mark power management requests with RQF_PM instead of RQF_PREEMPT scsi: ide: Do not set the RQF_PREEMPT flag for sense requests scsi: block: Introduce BLK_MQ_REQ_PM scsi: block: Fix a race in the runtime power management code scsi: ufs-pci: Enable UFSHCD_CAP_RPM_AUTOSUSPEND for Intel controllers scsi: ufs-pci: Fix recovery from hibernate exit errors for Intel controllers scsi: ufs-pci: Ensure UFS device is in PowerDown mode for suspend-to-disk ->poweroff() scsi: ufs-pci: Fix restore from S4 for Intel controllers scsi: ufs-mediatek: Keep VCC always-on for specific devices scsi: ufs: Allow regulators being always-on scsi: ufs: Clear UAC for RPMB after ufshcd resets ... commit 8b4805c68ae348b36a24a4c4b5c869c8971ab0c2 Merge: dc3e24b214c50 dc30432605bbb Author: Linus Torvalds Date: Fri Jan 1 12:49:09 2021 -0800 Merge tag 'block-5.11-2021-01-01' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "Two minor block fixes from this last week that should go into 5.11: - Add missing NOWAIT debugfs definition (Andres) - Fix kerneldoc warning introduced this merge window (Randy)" * tag 'block-5.11-2021-01-01' of git://git.kernel.dk/linux-block: block: add debugfs stanza for QUEUE_FLAG_NOWAIT fs: block_dev.c: fix kernel-doc warnings from struct block_device changes commit dc3e24b214c50a2ac2dd3d2cc7fb88c9a1e842d4 Merge: cedd1862be7e6 b1b6b5a30dce8 Author: Linus Torvalds Date: Fri Jan 1 12:29:49 2021 -0800 Merge tag 'io_uring-5.11-2021-01-01' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: "A few fixes that should go into 5.11, all marked for stable as well: - Fix issue around identity COW'ing and users that share a ring across processes - Fix a hang associated with unregistering fixed files (Pavel) - Move the 'process is exiting' cancelation a bit earlier, so task_works aren't affected by it (Pavel)" * tag 'io_uring-5.11-2021-01-01' of git://git.kernel.dk/linux-block: kernel/io_uring: cancel io_uring before task works io_uring: fix io_sqe_files_unregister() hangs io_uring: add a helper for setting a ref node io_uring: don't assume mm is constant across submits commit cedd1862be7e666be87ec824dabc6a2b05618f36 Author: Linus Torvalds Date: Mon Dec 28 11:40:22 2020 -0800 depmod: handle the case of /sbin/depmod without /sbin in PATH Commit 436e980e2ed5 ("kbuild: don't hardcode depmod path") stopped hard-coding the path of depmod, but in the process caused trouble for distributions that had that /sbin location, but didn't have it in the PATH (generally because /sbin is limited to the super-user path). Work around it for now by just adding /sbin to the end of PATH in the depmod.sh script. Reported-and-tested-by: Sedat Dilek Signed-off-by: Linus Torvalds commit 3d5c5fdcee0f9a94deb0472e594706018b00aa31 Author: Takashi Iwai Date: Fri Jan 1 09:38:52 2021 +0100 ALSA: hda/hdmi: Fix incorrect mutex unlock in silent_stream_disable() The silent_stream_disable() function introduced by the commit b1a5039759cb ("ALSA: hda/hdmi: fix silent stream for first playback to DP") takes the per_pin->lock mutex, but it unlocks the wrong one, spec->pcm_lock, which causes a deadlock. This patch corrects it. Fixes: b1a5039759cb ("ALSA: hda/hdmi: fix silent stream for first playback to DP") Reported-by: Jan Alexander Steffens (heftig) Cc: Acked-by: Kai Vehmanen Link: https://lore.kernel.org/r/20210101083852.12094-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 798ed7800e20dfc3304de1b99df5ac71ad48966b Author: Lukas Bulwahn Date: Sun Dec 20 07:09:27 2020 +0100 atomic: remove further references to atomic_ops Commit f0400a77ebdc ("atomic: Delete obsolete documentation") removed ./Documentation/core-api/atomic_ops.rst, but missed to remove further references to that file. Hence, make htmldocs warns: Documentation/core-api/index.rst:53: WARNING: toctree contains reference to nonexisting document 'core-api/atomic_ops' Also, ./scripts/get_maintainer.pl --self-test=patterns warns: warning: no file matches F: Documentation/core-api/atomic_ops.rst Remove further references to ./Documentation/core-api/atomic_ops.rst. Fixes: f0400a77ebdc ("atomic: Delete obsolete documentation") Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20201220060927.21582-1-lukas.bulwahn@gmail.com Signed-off-by: Jonathan Corbet commit 0be1511f516e2b9766597336cedc6dc6d19e5af1 Author: Randy Dunlap Date: Mon Dec 28 15:12:12 2020 -0800 Documentation: doc-guide: fixes to sphinx.rst Various fixes to sphinx.rst: - eliminate a double-space between 2 words - grammar/wording - punctuation - call rows in a table 'rows' instead of 'columns' (or does Sphinx call everything a column?) - It seems that "amdfonts" should be "amsfonts". I can't find any amdfonts. Signed-off-by: Randy Dunlap Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20201228231212.22448-1-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit c7e74b3c7b1cf4c04164ff16e6c047232fd3bcef Author: Liao Pingfang Date: Sun Dec 27 15:15:19 2020 +0800 docs/mm: concepts.rst: Correct the threshold to low watermark It should be "low watermark" where we wake up kswapd daemon. Signed-off-by: Liao Pingfang Link: https://lore.kernel.org/r/1609053319-3112-1-git-send-email-winndows@163.com Signed-off-by: Jonathan Corbet commit 81e79063004f32aae5196f0c929192e69aca1694 Author: Randy Dunlap Date: Sat Dec 26 09:44:33 2020 -0800 Documentation: admin: early_param()s are also listed in kernel-parameters Add info that "early_param()" kernel boot parameters are also listed in kernel-parameters.txt. Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Link: https://lore.kernel.org/r/20201226174433.7885-1-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 4f8af077a02eed4831885048a10e04daa4e61a72 Author: Nícolas F. R. A. Prado Date: Mon Dec 28 14:46:07 2020 +0000 docs: Fix reST markup when linking to sections During the process of converting the documentation to reST, some links were converted using the following wrong syntax (and sometimes using %20 instead of spaces): `Display text <#section-name-in-html>`__ This syntax isn't valid according to the docutils' spec [1], but more importantly, it is specific to HTML, since it uses '#' to link to an HTML anchor. The right syntax would instead use a docutils hyperlink reference as the embedded URI to point to the section [2], that is: `Display text
`__ This syntax works in both HTML and PDF. The LaTeX toolchain doesn't mind the HTML anchor syntax when generating the pdf documentation (make pdfdocs), that is, the build succeeds but the links don't work, but that syntax causes errors when trying to build using the not-yet-merged rst2pdf: ValueError: format not resolved, probably missing URL scheme or undefined destination target for 'Forcing%20Quiescent%20States' So, use the correct syntax in order to have it work in all different output formats. [1]: https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#reference-names [2]: https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#embedded-uris-and-aliases Fixes: ccc9971e2147 ("docs: rcu: convert some articles from html to ReST") Fixes: c8cce10a62aa ("docs: Fix the reference labels in Locking.rst") Fixes: e548cdeffcd8 ("docs-rst: convert kernel-locking to ReST") Fixes: 7ddedebb03b7 ("ALSA: doc: ReSTize writing-an-alsa-driver document") Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: Takashi Iwai Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20201228144537.135353-1-nfraprado@protonmail.com Signed-off-by: Jonathan Corbet commit 291b5c9870fc546376d69cf792b7885cd0c9c1b3 Author: Nathan Chancellor Date: Mon Dec 21 19:59:31 2020 -0700 i3c/master/mipi-i3c-hci: Fix position of __maybe_unused in i3c_hci_of_match Clang warns: ../drivers/i3c/master/mipi-i3c-hci/core.c:780:21: warning: attribute declaration must precede definition [-Wignored-attributes] static const struct __maybe_unused of_device_id i3c_hci_of_match[] = { ^ ../include/linux/compiler_attributes.h:267:56: note: expanded from macro '__maybe_unused' #define __maybe_unused __attribute__((__unused__)) ^ ../include/linux/mod_devicetable.h:262:8: note: previous definition is here struct of_device_id { ^ 1 warning generated. 'struct of_device_id' should not be split, as it is a type. Move the __maybe_unused attribute after the static and const qualifiers so that there are no warnings about this variable, period. Fixes: 95393f3e07ab ("i3c/master/mipi-i3c-hci: quiet maybe-unused variable warning") Link: https://github.com/ClangBuiltLinux/linux/issues/1221 Signed-off-by: Nathan Chancellor Acked-by: Nicolas Pitre Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201222025931.3043480-1-natechancellor@gmail.com commit 957cbca7317f7413e1bac555a6b567af06598b10 Author: Marc Zyngier Date: Thu Dec 31 15:05:46 2020 +0000 KVM: arm64: Remove spurious semicolon in reg_to_encoding() Although not a problem right now, it flared up while working on some other aspects of the code-base. Remove the useless semicolon. Signed-off-by: Marc Zyngier commit a598098cc9737f612dbab52294433fc26c51cc9b Author: Kai-Heng Feng Date: Wed Dec 30 20:56:35 2020 +0800 ALSA: hda/realtek: Enable mute and micmute LED on HP EliteBook 850 G7 HP EliteBook 850 G7 uses the same GPIO pins as ALC285_FIXUP_HP_GPIO_LED to enable mute and micmute LED. So apply the quirk to enable the LEDs. Signed-off-by: Kai-Heng Feng Cc: Link: https://lore.kernel.org/r/20201230125636.45028-1-kai.heng.feng@canonical.com Signed-off-by: Takashi Iwai commit ce2e79b223867b9e586021b55dee7035517a236b Author: PeiSen Hou Date: Thu Dec 31 11:57:28 2020 +0100 ALSA: hda/realtek: Add two "Intel Reference board" SSID in the ALC256. Add two "Intel Reference boad" SSID in the alc256. Enable "power saving mode" and Enable "headset jack mode". Signed-off-by: PeiSen Hou Cc: Link: https://lore.kernel.org/r/5978d2267f034c28973d117925ec9c63@realtek.com Signed-off-by: Takashi Iwai commit 484229585a5e91eeb00ee10e05d5204e1ca6c481 Author: Manuel Jiménez Date: Tue Dec 29 15:38:56 2020 +0100 ALSA: hda/realtek: Add mute LED quirk for more HP laptops HP Pavilion 13-bb0000 (SSID 103c:87c8) needs the same quirk as other models with ALC287. Signed-off-by: Manuel Jiménez Cc: Link: https://lore.kernel.org/r/X+s/gKNydVrI6nLj@HP-Pavilion-13 Signed-off-by: Takashi Iwai commit 744a11abc56405c5a106e63da30a941b6d27f737 Author: bo liu Date: Tue Dec 29 11:52:26 2020 +0800 ALSA: hda/conexant: add a new hda codec CX11970 The current kernel does not support the cx11970 codec chip. Add a codec configuration item to kernel. [ Minor coding style fix by tiwai ] Signed-off-by: bo liu Cc: Link: https://lore.kernel.org/r/20201229035226.62120-1-bo.liu@senarytech.com Signed-off-by: Takashi Iwai commit f93274ef0fe972c120c96b3207f8fce376231a60 Author: Greg Kroah-Hartman Date: Fri Dec 4 09:01:36 2020 +0100 crypto: asym_tpm: correct zero out potential secrets The function derive_pub_key() should be calling memzero_explicit() instead of memset() in case the complier decides to optimize away the call to memset() because it "knows" no one is going to touch the memory anymore. Cc: stable Reported-by: Ilil Blum Shem-Tov Tested-by: Ilil Blum Shem-Tov Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/X8ns4AfwjKudpyfe@kroah.com Signed-off-by: Greg Kroah-Hartman commit 355845b738e76445c8522802552146d96cb4afa7 Author: Lukas Wunner Date: Thu Dec 31 06:10:32 2020 +0100 efi/apple-properties: Reinstate support for boolean properties Since commit 4466bf82821b ("efi/apple-properties: use PROPERTY_ENTRY_U8_ARRAY_LEN"), my MacBook Pro issues a -ENODATA error when trying to assign EFI properties to the discrete GPU: pci 0000:01:00.0: assigning 56 device properties pci 0000:01:00.0: error -61 assigning properties That's because some of the properties have no value. They're booleans whose presence can be checked by drivers, e.g. "use-backlight-blanking". Commit 6e98503dba64 ("efi/apple-properties: Remove redundant attribute initialization from unmarshal_key_value_pairs()") employed a trick to store such booleans as u8 arrays (which is the data type used for all other EFI properties on Macs): It cleared the property_entry's "is_array" flag, thereby denoting that the value is stored inline in the property_entry. Commit 4466bf82821b erroneously removed that trick. It was probably a little fragile to begin with. Reinstate support for boolean properties by explicitly invoking the PROPERTY_ENTRY_BOOL() initializer for properties with zero-length value. Fixes: 4466bf82821b ("efi/apple-properties: use PROPERTY_ENTRY_U8_ARRAY_LEN") Cc: Reviewed-by: Andy Shevchenko Signed-off-by: Lukas Wunner Link: https://lore.kernel.org/r/be958bda75331a011d53c696d1deec8dccd06fd2.1609388549.git.lukas@wunner.de Signed-off-by: Ard Biesheuvel commit b1b6b5a30dce872f500dc43f067cba8e7f86fc7d Author: Pavel Begunkov Date: Wed Dec 30 21:34:16 2020 +0000 kernel/io_uring: cancel io_uring before task works For cancelling io_uring requests it needs either to be able to run currently enqueued task_works or having it shut down by that moment. Otherwise io_uring_cancel_files() may be waiting for requests that won't ever complete. Go with the first way and do cancellations before setting PF_EXITING and so before putting the task_work infrastructure into a transition state where task_work_run() would better not be called. Cc: stable@vger.kernel.org # 5.5+ Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 1ffc54220c444774b7f09e6d2121e732f8e19b94 Author: Pavel Begunkov Date: Wed Dec 30 21:34:15 2020 +0000 io_uring: fix io_sqe_files_unregister() hangs io_sqe_files_unregister() uninterruptibly waits for enqueued ref nodes, however requests keeping them may never complete, e.g. because of some userspace dependency. Make sure it's interruptible otherwise it would hang forever. Cc: stable@vger.kernel.org # 5.6+ Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 1642b4450d20e31439c80c28256c8eee08684698 Author: Pavel Begunkov Date: Wed Dec 30 21:34:14 2020 +0000 io_uring: add a helper for setting a ref node Setting a new reference node to a file data is not trivial, don't repeat it, add and use a helper. Cc: stable@vger.kernel.org # 5.6+ Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit f6e1ea19649216156576aeafa784e3b4cee45549 Merge: 139711f033f63 664f1e259a982 Author: Linus Torvalds Date: Wed Dec 30 12:02:12 2020 -0800 Merge tag 'ceph-for-5.11-rc2' of git://github.com/ceph/ceph-client Pull ceph fixes from Ilya Dryomov: "A fix for an edge case in MClientRequest encoding and a couple of trivial fixups for the new msgr2 support" * tag 'ceph-for-5.11-rc2' of git://github.com/ceph/ceph-client: libceph: add __maybe_unused to DEFINE_MSGR2_FEATURE libceph: align session_key and con_secret to 16 bytes libceph: fix auth_signature buffer allocation in secure mode ceph: reencode gid_list when reconnecting commit 0acfbe9ce46925ac92f6e27d0e273297e57c633c Merge: 5c8fe583cce54 b000700d6db50 Author: Greg Kroah-Hartman Date: Wed Dec 30 18:55:37 2020 +0100 Merge tag 'misc-habanalabs-fixes-2020-12-30' of https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux into char-misc-linus Oded writes: This tag contains the following fixes for 5.11-rc2: - Fixes that are needed for supporting the new F/W with security features: - Correctly fetch PLL information in GOYA when security is enabled in F/W - Fix hard-reset support when F/W is in its preboot stage - Disable clock gating when initializing the H/W - Fix hard-reset procedure - Fix PCI controller initialization - Remove setting of Engine-Barrier in collective wait operations. This barrier created a drop in performance - Retry loading the TPC firmware in case of EINTR during loading - Fix CS counters - Register to PCI shutdown callback to fix handling of VM shutdown - Fix order of status check - Fix memory leak in reset procedure - Fix and add comments and fix indentations * tag 'misc-habanalabs-fixes-2020-12-30' of https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux: habanalabs: Fix memleak in hl_device_reset habanalabs: fix order of status check habanalabs: register to pci shutdown callback habanalabs: add validation cs counter, fix misplaced counters habanalabs/gaudi: retry loading TPC f/w on -EINTR habanalabs: adjust pci controller init to new firmware habanalabs: update comment in hl_boot_if.h habanalabs/gaudi: enhance reset message habanalabs: full FW hard reset support habanalabs/gaudi: disable CGM at HW initialization habanalabs: Revise comment to align with mirror list name habanalabs/gaudi: do not set EB in collective slave queues habanalabs: preboot hard reset support habanalabs: remove generic gaudi get_pll_freq function habanalabs: fetch PSOC PLL frequency from F/W in goya habanalabs: add comment for pll frequency ioctl opcode habanalabs: Fix a missing-braces warning commit 9cf93f056f783f986c19f40d5304d1bcffa0fc0d Author: Artem Bityutskiy Date: Sun Dec 27 12:11:16 2020 +0200 intel_idle: add SnowRidge C-state table Add C-state table for the SnowRidge SoC which is found on Intel Jacobsville platforms. The following has been changed. 1. C1E latency changed from 10us to 15us. It was measured using the open source "wult" tool (the "nic" method, 15us is the 99.99th percentile). 2. C1E power break even changed from 20us to 25us, which may result in less C1E residency in some workloads. 3. C6 latency changed from 50us to 130us. Measured the same way as C1E. The C6 C-state is supported only by some SnowRidge revisions, so add a C-state table commentary about this. On SnowRidge, C6 support is enumerated via the usual mechanism: "mwait" leaf of the "cpuid" instruction. The 'intel_idle' driver does check this leaf, so even though C6 is present in the table, the driver will only use it if the CPU does support it. Signed-off-by: Artem Bityutskiy Signed-off-by: Rafael J. Wysocki commit be1283454b61a1f3b089f1a74b73e20532262e32 Author: Rafael J. Wysocki Date: Tue Dec 29 18:08:18 2020 +0100 cpufreq: intel_pstate: Fix fast-switch fallback path When sugov_update_single_perf() falls back to the "frequency" path due to the missing scale-invariance, it will call cpufreq_driver_fast_switch() via sugov_fast_switch() and the driver's ->fast_switch() callback will be invoked, so it must not be NULL. However, after commit a365ab6b9dfb ("cpufreq: intel_pstate: Implement the ->adjust_perf() callback") intel_pstate sets ->fast_switch() to NULL when it is going to use intel_cpufreq_adjust_perf(), which is a mistake, because on x86 the scale-invariance may be turned off dynamically, so modify it to retain the original ->adjust_perf() callback pointer. Fixes: a365ab6b9dfb ("cpufreq: intel_pstate: Implement the ->adjust_perf() callback") Reported-by: Kenneth R. Crudup Tested-by: Kenneth R. Crudup Signed-off-by: Rafael J. Wysocki commit 977a3b0f6e40514ccdc959cc82b1eb96b636941a Merge: 5c8fe583cce54 0e1d9ca1766f5 Author: Rafael J. Wysocki Date: Wed Dec 30 18:19:34 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 fixes for 5.11-rc2 from Viresh Kumar: "This contains two patches to fix freeing of resources in error paths." * 'opp/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: opp: Call the missing clk_put() on error opp: fix memory leak in _allocate_opp_table commit 5b5465dd947cb655550332d3fa509f91a768482b Author: Bjorn Andersson Date: Mon Dec 21 20:37:45 2020 -0800 arm64: defconfig: Make INTERCONNECT_QCOM_SDM845 builtin As of v5.11-rc1 the QUP nodes of SDM845 has got their interconnect properties specified, this means that the relevant interconnect provider needs to be builtin for the UART device to probe and the console to be registered before userspace needs to access it. Reviewed-by: Georgi Djakov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20201222043745.3420447-1-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit c318840fb2a42ce25febc95c4c19357acf1ae5ca Author: Alan Stern Date: Wed Dec 30 11:20:44 2020 -0500 USB: Gadget: dummy-hcd: Fix shift-out-of-bounds bug The dummy-hcd driver was written under the assumption that all the parameters in URBs sent to its root hub would be valid. With URBs sent from userspace via usbfs, that assumption can be violated. In particular, the driver doesn't fully check the port-feature values stored in the wValue entry of Clear-Port-Feature and Set-Port-Feature requests. Values that are too large can cause the driver to perform an invalid left shift of more than 32 bits. Ironically, two of those left shifts are unnecessary, because they implement Set-Port-Feature requests that hubs are not required to support, according to section 11.24.2.13 of the USB-2.0 spec. This patch adds the appropriate checks for the port feature selector values and removes the unnecessary feature settings. It also rejects requests to set the TEST feature or to set or clear the INDICATOR and C_OVERCURRENT features, as none of these are relevant to dummy-hcd's root-hub emulation. CC: Reported-and-tested-by: syzbot+5925509f78293baa7331@syzkaller.appspotmail.com Signed-off-by: Alan Stern Link: https://lore.kernel.org/r/20201230162044.GA727759@rowland.harvard.edu Signed-off-by: Greg Kroah-Hartman commit 1eda52334e6d13eb1a85f713ce06dd39342b5020 Author: Uwe Kleine-König Date: Tue Dec 15 10:20:30 2020 +0100 hwmon: (pwm-fan) Ensure that calculation doesn't discard big period values With MAX_PWM being defined to 255 the code unsigned long period; ... period = ctx->pwm->args.period; state.duty_cycle = DIV_ROUND_UP(pwm * (period - 1), MAX_PWM); calculates a too small value for duty_cycle if the configured period is big (either by discarding the 64 bit value ctx->pwm->args.period or by overflowing the multiplication). As this results in a too slow fan and so maybe an overheating machine better be safe than sorry and error out in .probe. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20201215092031.152243-1-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck commit 129975e75b9a2ba528d7f58be2e338cd644f6ed8 Author: Heiko Carstens Date: Mon Dec 28 09:51:57 2020 +0100 s390/Kconfig: sort config S390 select list once again ...and add comments at the top and bottom. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 742eb4750ff35fd62784b04b675d672b8dee2524 Author: Heiko Carstens Date: Wed Nov 18 21:23:33 2020 +0100 s390: update defconfigs Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit e042f151ec7474b88b8c1edaaddd1ff7415d7117 Author: Randy Dunlap Date: Mon Dec 28 19:54:28 2020 -0800 hwmon: (sbtsi_temp) Fix Documenation kernel-doc warning Fix Documentation/hwmon/ kernel-doc warning in 5.11-rc1: lnx-511-rc1/Documentation/hwmon/sbtsi_temp.rst:4: WARNING: Title underline too short. Kernel driver sbtsi_temp ================== Fixes: 6ec3fcf556fe ("hwmon: (sbtsi) Add documentation") Signed-off-by: Randy Dunlap Cc: Kun Yi Cc: Guenter Roeck Cc: Jean Delvare Cc: linux-hwmon@vger.kernel.org Link: https://lore.kernel.org/r/20201229035428.31270-1-rdunlap@infradead.org Signed-off-by: Guenter Roeck commit 6820e812dafb4258bc14692f686eec5bde6fba86 Author: Tudor Ambarus Date: Wed Dec 16 11:23:21 2020 +0200 spi: Fix the clamping of spi->max_speed_hz If spi->controller->max_speed_hz is zero, a non-zero spi->max_speed_hz will be overwritten by zero. Make sure spi->controller->max_speed_hz is not zero when clamping spi->max_speed_hz. Put the spi->controller->max_speed_hz non-zero check higher in the if, so that we avoid a superfluous init to zero when both spi->max_speed_hz and spi->controller->max_speed_hz are zero. Fixes: 9326e4f1e5dd ("spi: Limit the spi device max speed to controller's max speed") Reported-by: Geert Uytterhoeven Suggested-by: Geert Uytterhoeven Signed-off-by: Tudor Ambarus Tested-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201216092321.413262-1-tudor.ambarus@microchip.com Signed-off-by: Mark Brown commit 44362a3c353aeec5904c2ae6d1737f20fe7e9c79 Author: Marc Zyngier Date: Wed Dec 23 12:08:54 2020 +0000 KVM: arm64: Fix hyp_cpu_pm_{init,exit} __init annotation The __init annotations on hyp_cpu_pm_{init,exit} are obviously incorrect, and the build system shouts at you if you enable DEBUG_SECTION_MISMATCH. Nothing really bad happens as we never execute that code outside of the init context, but we can't label the callers as __int either, as kvm_init isn't __init itself. Oh well. Signed-off-by: Marc Zyngier Reviewed-by: Nathan Chancellor Link: https://lore.kernel.org/r/20201223120854.255347-1-maz@kernel.org commit 181739822cf6f8f4e12b173913af2967a28906c0 Author: H. Nikolaus Schaller Date: Wed Dec 23 11:30:21 2020 +0100 ARM: dts; gta04: SPI panel chip select is active low With the arrival of commit 2fee9583198eb9 ("spi: dt-bindings: clarify CS behavior for spi-cs-high and gpio descriptors") it was clarified what the proper state for cs-gpios should be, even if the flag is ignored. The driver code is doing the right thing since 766c6b63aa04 ("spi: fix client driver breakages when using GPIO descriptors") The chip-select of the td028ttec1 panel is active-low, so we must omit spi-cs-high; attribute (already removed by separate patch) and should now use GPIO_ACTIVE_LOW for the client device description to be fully consistent. Fixes: 766c6b63aa04 ("spi: fix client driver breakages when using GPIO descriptors") CC: stable@vger.kernel.org Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren commit 7078a5ba7a58e5db07583b176f8a03e0b8714731 Author: Tony Lindgren Date: Tue Dec 8 16:08:02 2020 +0200 soc: ti: omap-prm: Fix boot time errors for rst_map_012 bits 0 and 1 We have rst_map_012 used for various accelerators like dsp, ipu and iva. For these use cases, we have rstctrl bit 2 control the subsystem module reset, and have and bits 0 and 1 control the accelerator specific features. If the bootloader, or kexec boot, has left any accelerator specific reset bits deasserted, deasserting bit 2 reset will potentially enable an accelerator with unconfigured MMU and no firmware. And we may get spammed with a lot by warnings on boot with "Data Access in User mode during Functional access", or depending on the accelerator, the system can also just hang. This issue can be quite easily reproduced by setting a rst_map_012 type rstctrl register to 0 or 4 in the bootloader, and booting the system. Let's just assert all reset bits for rst_map_012 type resets. So far it looks like the other rstctrl types don't need this. If it turns out that the other type rstctrl bits also need reset on init, we need to add an instance specific reset mask for the bits to avoid resetting unwanted bits. Reported-by: Carl Philipp Klemm Cc: Philipp Zabel Cc: Santosh Shilimkar Cc: Suman Anna Cc: Tero Kristo Tested-by: Carl Philipp Klemm Signed-off-by: Tony Lindgren commit dc30432605bbbd486dfede3852ea4d42c40a84b4 Author: Andres Freund Date: Mon Dec 28 11:27:18 2020 -0800 block: add debugfs stanza for QUEUE_FLAG_NOWAIT This was missed in 021a24460dc2. Leads to the numeric value of QUEUE_FLAG_NOWAIT (i.e. 29) showing up in /sys/kernel/debug/block/*/state. Fixes: 021a24460dc28e7412aecfae89f60e1847e685c0 Cc: Konstantin Khlebnikov Cc: Mike Snitzer Cc: Christoph Hellwig Cc: Jens Axboe Signed-off-by: Andres Freund Signed-off-by: Jens Axboe commit 875b2376fd663832bf45f7285c9d26cb8c52929a Author: Randy Dunlap Date: Mon Dec 28 19:47:06 2020 -0800 fs: block_dev.c: fix kernel-doc warnings from struct block_device changes Fix new kernel-doc warnings in fs/block_dev.c: ../fs/block_dev.c:1066: warning: Excess function parameter 'whole' description in 'bd_abort_claiming' ../fs/block_dev.c:1837: warning: Function parameter or member 'dev' not described in 'lookup_bdev' Fixes: 4e7b5671c6a8 ("block: remove i_bdev") Fixes: 37c3fc9abb25 ("block: simplify the block device claiming interface") Signed-off-by: Randy Dunlap Cc: Jens Axboe Cc: Christoph Hellwig Cc: linux-fsdevel@vger.kernel.org Cc: Alexander Viro Signed-off-by: Jens Axboe commit 139711f033f636cc78b6aaf7363252241b9698ef Merge: dea8dcf2a9fa8 1f3147b49d75b Author: Linus Torvalds Date: Tue Dec 29 15:45:49 2020 -0800 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "16 patches Subsystems affected by this patch series: mm (selftests, hugetlb, pagecache, mremap, kasan, and slub), kbuild, checkpatch, misc, and lib" * emailed patches from Andrew Morton : mm: slub: call account_slab_page() after slab page initialization zlib: move EXPORT_SYMBOL() and MODULE_LICENSE() out of dfltcc_syms.c lib/zlib: fix inflating zlib streams on s390 lib/genalloc: fix the overflow when size is too big kdev_t: always inline major/minor helper functions sizes.h: add SZ_8G/SZ_16G/SZ_32G macros local64.h: make mandatory kasan: fix null pointer dereference in kasan_record_aux_stack mm: generalise COW SMC TLB flushing race comment mm/mremap.c: fix extent calculation mm: memmap defer init doesn't work as expected mm: add prototype for __add_to_page_cache_locked() checkpatch: prefer strscpy to strlcpy Revert "kbuild: avoid static_assert for genksyms" mm/hugetlb: fix deadlock in hugetlb_cow error path selftests/vm: fix building protection keys test commit 1f3147b49d75b47b6be54a1e6dfa87a4921e1e51 Author: Roman Gushchin Date: Tue Dec 29 15:15:07 2020 -0800 mm: slub: call account_slab_page() after slab page initialization It's convenient to have page->objects initialized before calling into account_slab_page(). In particular, this information can be used to pre-alloc the obj_cgroup vector. Let's call account_slab_page() a bit later, after the initialization of page->objects. This commit doesn't bring any functional change, but is required for further optimizations. [akpm@linux-foundation.org: undo changes needed by forthcoming mm-memcg-slab-pre-allocate-obj_cgroups-for-slab-caches-with-slab_account.patch] Link: https://lkml.kernel.org/r/20201110195753.530157-1-guro@fb.com Signed-off-by: Roman Gushchin Acked-by: Johannes Weiner Reviewed-by: Shakeel Butt Cc: Michal Hocko Cc: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 605cc30dea249edf1b659e7d0146a2cf13cbbf71 Author: Randy Dunlap Date: Tue Dec 29 15:15:04 2020 -0800 zlib: move EXPORT_SYMBOL() and MODULE_LICENSE() out of dfltcc_syms.c In commit 11fb479ff5d9 ("zlib: export S390 symbols for zlib modules"), I added EXPORT_SYMBOL()s to dfltcc_inflate.c but then Mikhail said that these should probably be in dfltcc_syms.c with the other EXPORT_SYMBOL()s. However, that is contrary to the current kernel style, which places EXPORT_SYMBOL() immediately after the function that it applies to, so move all EXPORT_SYMBOL()s to their respective function locations and drop the dfltcc_syms.c file. Also move MODULE_LICENSE() from the deleted file to dfltcc.c. [rdunlap@infradead.org: remove dfltcc_syms.o from Makefile] Link: https://lkml.kernel.org/r/20201227171837.15492-1-rdunlap@infradead.org Link: https://lkml.kernel.org/r/20201219052530.28461-1-rdunlap@infradead.org Fixes: 11fb479ff5d9 ("zlib: export S390 symbols for zlib modules") Signed-off-by: Randy Dunlap Cc: Acked-by: Ilya Leoshkevich Acked-by: Christian Borntraeger Cc: Zaslonko Mikhail Cc: Heiko Carstens Cc: Vasily Gorbik Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f0bb29e8c4076444d32df00c8d32e169ceecf283 Author: Ilya Leoshkevich Date: Tue Dec 29 15:15:01 2020 -0800 lib/zlib: fix inflating zlib streams on s390 Decompressing zlib streams on s390 fails with "incorrect data check" error. Userspace zlib checks inflate_state.flags in order to byteswap checksums only for zlib streams, and s390 hardware inflate code, which was ported from there, tries to match this behavior. At the same time, kernel zlib does not use inflate_state.flags, so it contains essentially random values. For many use cases either zlib stream is zeroed out or checksum is not used, so this problem is masked, but at least SquashFS is still affected. Fix by always passing a checksum to and from the hardware as is, which matches zlib_inflate()'s expectations. Link: https://lkml.kernel.org/r/20201215155551.894884-1-iii@linux.ibm.com Fixes: 126196100063 ("lib/zlib: add s390 hardware support for kernel zlib_inflate") Signed-off-by: Ilya Leoshkevich Tested-by: Christian Borntraeger Acked-by: Mikhail Zaslonko Acked-by: Christian Borntraeger Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Mikhail Zaslonko Cc: [5.6+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 36845663843fc59c5d794e3dc0641472e3e572da Author: Huang Shijie Date: Tue Dec 29 15:14:58 2020 -0800 lib/genalloc: fix the overflow when size is too big Some graphic card has very big memory on chip, such as 32G bytes. In the following case, it will cause overflow: pool = gen_pool_create(PAGE_SHIFT, NUMA_NO_NODE); ret = gen_pool_add(pool, 0x1000000, SZ_32G, NUMA_NO_NODE); va = gen_pool_alloc(pool, SZ_4G); The overflow occurs in gen_pool_alloc_algo_owner(): .... size = nbits << order; .... The @nbits is "int" type, so it will overflow. Then the gen_pool_avail() will return the wrong value. This patch converts some "int" to "unsigned long", and changes the compare code in while. Link: https://lkml.kernel.org/r/20201229060657.3389-1-sjhuang@iluvatar.ai Signed-off-by: Huang Shijie Reported-by: Shi Jiasheng Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit aa8c7db494d0a83ecae583aa193f1134ef25d506 Author: Josh Poimboeuf Date: Tue Dec 29 15:14:55 2020 -0800 kdev_t: always inline major/minor helper functions Silly GCC doesn't always inline these trivial functions. Fixes the following warning: arch/x86/kernel/sys_ia32.o: warning: objtool: cp_stat64()+0xd8: call to new_encode_dev() with UACCESS enabled Link: https://lkml.kernel.org/r/984353b44a4484d86ba9f73884b7306232e25e30.1608737428.git.jpoimboe@redhat.com Signed-off-by: Josh Poimboeuf Reported-by: Randy Dunlap Acked-by: Randy Dunlap [build-tested] Cc: Peter Zijlstra Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8b0fac44bd1ff17016502b3c3533f5abb8456c65 Author: Huang Shijie Date: Tue Dec 29 15:14:52 2020 -0800 sizes.h: add SZ_8G/SZ_16G/SZ_32G macros Add these macros, since we can use them in drivers. Link: https://lkml.kernel.org/r/20201229072819.11183-1-sjhuang@iluvatar.ai Signed-off-by: Huang Shijie Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 87dbc209ea04645fd2351981f09eff5d23f8e2e9 Author: Randy Dunlap Date: Tue Dec 29 15:14:49 2020 -0800 local64.h: make mandatory Make mandatory in include/asm-generic/Kbuild and remove all arch/*/include/asm/local64.h arch-specific files since they only #include . This fixes build errors on arch/c6x/ and arch/nios2/ for block/blk-iocost.c. Build-tested on 21 of 25 arch-es. (tools problems on the others) Yes, we could even rename to and change all #includes to use instead. Link: https://lkml.kernel.org/r/20201227024446.17018-1-rdunlap@infradead.org Signed-off-by: Randy Dunlap Suggested-by: Christoph Hellwig Reviewed-by: Masahiro Yamada Cc: Jens Axboe Cc: Ley Foon Tan Cc: Mark Salter Cc: Aurelien Jacquiot Cc: Peter Zijlstra Cc: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 13384f6125ad7ebdcc8914fe1e03ded48ce76581 Author: Walter Wu Date: Tue Dec 29 15:14:46 2020 -0800 kasan: fix null pointer dereference in kasan_record_aux_stack Syzbot reported the following [1]: BUG: kernel NULL pointer dereference, address: 0000000000000008 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 2d993067 P4D 2d993067 PUD 19a3c067 PMD 0 Oops: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 3852 Comm: kworker/1:2 Not tainted 5.10.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events free_ipc RIP: 0010:kasan_record_aux_stack+0x77/0xb0 Add null checking slab object from kasan_get_alloc_meta() in order to avoid null pointer dereference. [1] https://syzkaller.appspot.com/x/log.txt?x=10a82a50d00000 Link: https://lkml.kernel.org/r/20201228080018.23041-1-walter-zh.wu@mediatek.com Signed-off-by: Walter Wu Suggested-by: Dmitry Vyukov Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Andrey Konovalov Cc: Alexander Potapenko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 111fe7186b29d172729db5e294875b9fc7a0ec1d Author: Nicholas Piggin Date: Tue Dec 29 15:14:43 2020 -0800 mm: generalise COW SMC TLB flushing race comment I'm not sure if I'm completely missing something here, but AFAIKS the reference to the mysterious "COW SMC race" confuses the issue. The original changelog and mailing list thread didn't help me either. This SMC race is where the problem was detected, but isn't the general problem bigger and more obvious: that the new PTE could be picked up at any time by any TLB while entries for the old PTE exist in other TLBs before the TLB flush takes effect? The case where the iTLB and dTLB of a CPU are pointing at different pages is an interesting one but follows from the general problem. The other (minor) thing with the comment I think it makes it a bit clearer to say what the old code was doing (i.e., it avoids the race as opposed to what?). References: 4ce072f1faf29 ("mm: fix a race condition under SMC + COW") Link: https://lkml.kernel.org/r/20201215121119.351650-1-npiggin@gmail.com Reviewed-by: Matthew Wilcox (Oracle) Cc: Suresh Siddha Cc: "David S. Miller" Cc: Hugh Dickins Cc: Peter Zijlstra Cc: Suresh Siddha Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e05986ee7a5814bec0e0075d813daca3d46e4a9e Author: Kalesh Singh Date: Tue Dec 29 15:14:40 2020 -0800 mm/mremap.c: fix extent calculation When `next < old_addr`, `next - old_addr` arithmetic underflows causing `extent` to be incorrect. Make `extent` the smaller of `next - old_addr` or `old_end - old_addr`. Link: https://lkml.kernel.org/r/20201219170433.2418867-1-kaleshsingh@google.com Fixes: c49dd34018026 ("mm: speedup mremap on 1GB or larger regions") Signed-off-by: Kalesh Singh Reported-by: Guenter Roeck Tested-by: Guenter Roeck Cc: Suren Baghdasaryan Cc: Minchan Kim Cc: Lokesh Gidra Cc: Helge Deller Cc: Kalesh Singh Cc: "Kirill A. Shutemov" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dc2da7b45ffe954a0090f5d0310ed7b0b37d2bd2 Author: Baoquan He Date: Tue Dec 29 15:14:37 2020 -0800 mm: memmap defer init doesn't work as expected VMware observed a performance regression during memmap init on their platform, and bisected to commit 73a6e474cb376 ("mm: memmap_init: iterate over memblock regions rather that check each PFN") causing it. Before the commit: [0.033176] Normal zone: 1445888 pages used for memmap [0.033176] Normal zone: 89391104 pages, LIFO batch:63 [0.035851] ACPI: PM-Timer IO Port: 0x448 With commit [0.026874] Normal zone: 1445888 pages used for memmap [0.026875] Normal zone: 89391104 pages, LIFO batch:63 [2.028450] ACPI: PM-Timer IO Port: 0x448 The root cause is the current memmap defer init doesn't work as expected. Before, memmap_init_zone() was used to do memmap init of one whole zone, to initialize all low zones of one numa node, but defer memmap init of the last zone in that numa node. However, since commit 73a6e474cb376, function memmap_init() is adapted to iterater over memblock regions inside one zone, then call memmap_init_zone() to do memmap init for each region. E.g, on VMware's system, the memory layout is as below, there are two memory regions in node 2. The current code will mistakenly initialize the whole 1st region [mem 0xab00000000-0xfcffffffff], then do memmap defer to iniatialize only one memmory section on the 2nd region [mem 0x10000000000-0x1033fffffff]. In fact, we only expect to see that there's only one memory section's memmap initialized. That's why more time is costed at the time. [ 0.008842] ACPI: SRAT: Node 0 PXM 0 [mem 0x00000000-0x0009ffff] [ 0.008842] ACPI: SRAT: Node 0 PXM 0 [mem 0x00100000-0xbfffffff] [ 0.008843] ACPI: SRAT: Node 0 PXM 0 [mem 0x100000000-0x55ffffffff] [ 0.008844] ACPI: SRAT: Node 1 PXM 1 [mem 0x5600000000-0xaaffffffff] [ 0.008844] ACPI: SRAT: Node 2 PXM 2 [mem 0xab00000000-0xfcffffffff] [ 0.008845] ACPI: SRAT: Node 2 PXM 2 [mem 0x10000000000-0x1033fffffff] Now, let's add a parameter 'zone_end_pfn' to memmap_init_zone() to pass down the real zone end pfn so that defer_init() can use it to judge whether defer need be taken in zone wide. Link: https://lkml.kernel.org/r/20201223080811.16211-1-bhe@redhat.com Link: https://lkml.kernel.org/r/20201223080811.16211-2-bhe@redhat.com Fixes: commit 73a6e474cb376 ("mm: memmap_init: iterate over memblock regions rather that check each PFN") Signed-off-by: Baoquan He Reported-by: Rahul Gopakumar Reviewed-by: Mike Rapoport Cc: David Hildenbrand Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6d87d0ece58bc0022ca5247721a8eb06ef66b673 Author: Souptick Joarder Date: Tue Dec 29 15:14:34 2020 -0800 mm: add prototype for __add_to_page_cache_locked() Otherwise it causes a gcc warning: mm/filemap.c:830:14: warning: no previous prototype for `__add_to_page_cache_locked' [-Wmissing-prototypes] A previous attempt to make this function static led to compilation errors when CONFIG_DEBUG_INFO_BTF is enabled because __add_to_page_cache_locked() is referred to by BPF code. Adding a prototype will silence the warning. Link: https://lkml.kernel.org/r/1608693702-4665-1-git-send-email-jrdr.linux@gmail.com Signed-off-by: Souptick Joarder Cc: Alex Shi Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5dbdb2d87c294401a22e6a6002f08ebc9fbea38b Author: Joe Perches Date: Tue Dec 29 15:14:31 2020 -0800 checkpatch: prefer strscpy to strlcpy Prefer strscpy over the deprecated strlcpy function. Link: https://lkml.kernel.org/r/19fe91084890e2c16fe56f960de6c570a93fa99b.camel@perches.com Signed-off-by: Joe Perches Requested-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3a176b94609a18f5f8bac7ddbf8923bd737262db Author: Masahiro Yamada Date: Tue Dec 29 15:14:28 2020 -0800 Revert "kbuild: avoid static_assert for genksyms" This reverts commit 14dc3983b5dff513a90bd5a8cc90acaf7867c3d0. Macro Elver had sent a fix proper fix earlier, and also pointed out corner cases: "I guess what you propose is simpler, but might still have corner cases where we still get warnings. In particular, if some file (for whatever reason) does not include build_bug.h and uses a raw _Static_assert(), then we still get warnings. E.g. I see 1 user of raw _Static_assert() (drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h )." I believe the raw use of _Static_assert() should be allowed, so this should be fixed in genksyms. Even after commit 14dc3983b5df ("kbuild: avoid static_assert for genksyms"), I confirmed the following test code emits the warning. ---------------->8---------------- #include _Static_assert((1 ?: 0), ""); void foo(void) { } EXPORT_SYMBOL(foo); ---------------->8---------------- WARNING: modpost: EXPORT symbol "foo" [vmlinux] version generation failed, symbol will not be versioned. Now that commit 869b91992bce ("genksyms: Ignore module scoped _Static_assert()") fixed this issue properly, the workaround should be reverted. Link: https://lkml.org/lkml/2020/12/10/845 Link: https://lkml.kernel.org/r/20201219183911.181442-1-masahiroy@kernel.org Signed-off-by: Masahiro Yamada Cc: Marco Elver Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e7dd91c456a8cdbcd7066997d15e36d14276a949 Author: Mike Kravetz Date: Tue Dec 29 15:14:25 2020 -0800 mm/hugetlb: fix deadlock in hugetlb_cow error path syzbot reported the deadlock here [1]. The issue is in hugetlb cow error handling when there are not enough huge pages for the faulting task which took the original reservation. It is possible that other (child) tasks could have consumed pages associated with the reservation. In this case, we want the task which took the original reservation to succeed. So, we unmap any associated pages in children so that they can be used by the faulting task that owns the reservation. The unmapping code needs to hold i_mmap_rwsem in write mode. However, due to commit c0d0381ade79 ("hugetlbfs: use i_mmap_rwsem for more pmd sharing synchronization") we are already holding i_mmap_rwsem in read mode when hugetlb_cow is called. Technically, i_mmap_rwsem does not need to be held in read mode for COW mappings as they can not share pmd's. Modifying the fault code to not take i_mmap_rwsem in read mode for COW (and other non-sharable) mappings is too involved for a stable fix. Instead, we simply drop the hugetlb_fault_mutex and i_mmap_rwsem before unmapping. This is OK as it is technically not needed. They are reacquired after unmapping as expected by calling code. Since this is done in an uncommon error path, the overhead of dropping and reacquiring mutexes is acceptable. While making changes, remove redundant BUG_ON after unmap_ref_private. [1] https://lkml.kernel.org/r/000000000000b73ccc05b5cf8558@google.com Link: https://lkml.kernel.org/r/4c5781b8-3b00-761e-c0c7-c5edebb6ec1a@oracle.com Fixes: c0d0381ade79 ("hugetlbfs: use i_mmap_rwsem for more pmd sharing synchronization") Signed-off-by: Mike Kravetz Reported-by: syzbot+5eee4145df3c15e96625@syzkaller.appspotmail.com Cc: Naoya Horiguchi Cc: Michal Hocko Cc: Hugh Dickins Cc: "Aneesh Kumar K . V" Cc: Davidlohr Bueso Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7cf22a1c88c05ea3807f95b1edfebb729016ae52 Author: Harish Date: Tue Dec 29 15:14:22 2020 -0800 selftests/vm: fix building protection keys test Commit d8cbe8bfa7d ("tools/testing/selftests/vm: fix build error") tried to include a ARCH check for powerpc, however ARCH is not defined in the Makefile before including lib.mk. This makes test building to skip on both x86 and powerpc. Fix the arch check by replacing it using machine type as it is already defined and used in the test. Link: https://lkml.kernel.org/r/20201215100402.257376-1-harish@linux.ibm.com Fixes: d8cbe8bfa7d ("tools/testing/selftests/vm: fix build error") Signed-off-by: Harish Reviewed-by: Sandipan Das Cc: Shuah Khan Cc: Sandipan Das Cc: John Hubbard Cc: Dave Hansen Cc: Kirill A. Shutemov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b000700d6db50c933ce8b661154e26cf4ad06dba Author: Dinghao Liu Date: Sat Dec 26 15:27:14 2020 +0800 habanalabs: Fix memleak in hl_device_reset When kzalloc() fails, we should execute hl_mmu_fini() to release the MMU module. It's the same when hl_ctx_init() fails. Signed-off-by: Dinghao Liu Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 77788775c7132a8d93c6930ab1bd84fc743c7cb7 Author: Jens Axboe Date: Tue Dec 29 10:50:46 2020 -0700 io_uring: don't assume mm is constant across submits If we COW the identity, we assume that ->mm never changes. But this isn't true of multiple processes end up sharing the ring. Hence treat id->mm like like any other process compontent when it comes to the identity mapping. This is pretty trivial, just moving the existing grab into io_grab_identity(), and including a check for the match. Cc: stable@vger.kernel.org # 5.10 Fixes: 1e6fa5216a0e ("io_uring: COW io_identity on mismatch") Reported-by: Christian Brauner : Tested-by: Christian Brauner : Signed-off-by: Jens Axboe commit 07fcad0d726d5da7c43f1c8e8fdb66c93a140ca5 Author: Iskren Chernev Date: Mon Dec 28 23:31:31 2020 +0200 drm/msm: Ensure get_pages is called when locked get_pages is only called in a locked context. Add a WARN_ON to make sure it stays that way. Signed-off-by: Iskren Chernev Signed-off-by: Rob Clark commit a694ffed876575d1df1a47067444047182de4354 Author: Iskren Chernev Date: Mon Dec 28 23:31:30 2020 +0200 drm/msm: Fix null dereference in _msm_gem_new The crash was caused by locking an uninitialized lock during init of drm_gem_object. The lock changed in the breaking commit, but the init was not moved accordingly. 8<--- cut here --- Unable to handle kernel NULL pointer dereference at virtual address 00000000 pgd = (ptrval) [00000000] *pgd=00000000 Internal error: Oops: 5 [#1] PREEMPT SMP ARM Modules linked in: msm(+) qcom_spmi_vadc qcom_vadc_common dm_mod usb_f_rndis rmi_i2c rmi_core qnoc_msm8974 icc_smd_rpm pm8941_pwrkey CPU: 2 PID: 1020 Comm: udevd Not tainted 5.10.0-postmarketos-qcom-msm8974 #8 Hardware name: Generic DT based system PC is at ww_mutex_lock+0x20/0xb0 LR is at _msm_gem_new+0x13c/0x298 [msm] pc : [] lr : [] psr: 20000013 sp : c36e7ad0 ip : c3b3d800 fp : 00000000 r10: 00000001 r9 : c3b22800 r8 : 00000000 r7 : c3b23000 r6 : c3b3d600 r5 : c3b3d600 r4 : 00000000 r3 : c34b4780 r2 : c3b3d6f4 r1 : 00000000 r0 : 00000000 Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none Control: 10c5787d Table: 03ae406a DAC: 00000051 Process udevd (pid: 1020, stack limit = 0x(ptrval)) Stack: (0xc36e7ad0 to 0xc36e8000) [...] [] (ww_mutex_lock) from [] (_msm_gem_new+0x13c/0x298 [msm]) [] (_msm_gem_new [msm]) from [] (_msm_gem_kernel_new+0x20/0x190 [msm]) [] (_msm_gem_kernel_new [msm]) from [] (msm_gem_kernel_new+0x24/0x2c [msm]) [] (msm_gem_kernel_new [msm]) from [] (msm_gpu_init+0x308/0x548 [msm]) [] (msm_gpu_init [msm]) from [] (adreno_gpu_init+0x13c/0x240 [msm]) [] (adreno_gpu_init [msm]) from [] (a3xx_gpu_init+0x78/0x1dc [msm]) [] (a3xx_gpu_init [msm]) from [] (adreno_bind+0x1cc/0x274 [msm]) [] (adreno_bind [msm]) from [] (component_bind_all+0x11c/0x278) [] (component_bind_all) from [] (msm_drm_bind+0x18c/0x5b4 [msm]) [] (msm_drm_bind [msm]) from [] (try_to_bring_up_master+0x200/0x2c8) [] (try_to_bring_up_master) from [] (component_master_add_with_match+0xc8/0xfc) [] (component_master_add_with_match) from [] (msm_pdev_probe+0x288/0x2c4 [msm]) [] (msm_pdev_probe [msm]) from [] (platform_drv_probe+0x48/0x98) [] (platform_drv_probe) from [] (really_probe+0x108/0x528) [] (really_probe) from [] (driver_probe_device+0x78/0x1d4) [] (driver_probe_device) from [] (device_driver_attach+0xa8/0xb0) [] (device_driver_attach) from [] (__driver_attach+0xb4/0x154) [] (__driver_attach) from [] (bus_for_each_dev+0x78/0xb8) [] (bus_for_each_dev) from [] (bus_add_driver+0x10c/0x208) [] (bus_add_driver) from [] (driver_register+0x88/0x118) [] (driver_register) from [] (do_one_initcall+0x50/0x2b0) [] (do_one_initcall) from [] (do_init_module+0x60/0x288) [] (do_init_module) from [] (sys_finit_module+0xd4/0x120) [] (sys_finit_module) from [] (ret_fast_syscall+0x0/0x54) Exception stack(0xc36e7fa8 to 0xc36e7ff0) 7fa0: 00020000 00000000 00000007 b6edd5b0 00000000 b6f2ff20 7fc0: 00020000 00000000 0000017b 0000017b b6eef980 bedc3a54 00473c99 00000000 7fe0: b6edd5b0 bedc3918 b6ed8a5f b6f6a8b0 Code: e3c3303f e593300c e1a04000 f590f000 (e1940f9f) ---[ end trace 277e2a3da40bbb76 ]--- Fixes: 6c0e3ea250476 ("drm/msm/gem: Switch over to obj->resv for locking") Signed-off-by: Iskren Chernev Signed-off-by: Rob Clark commit da4282c17d695b9311608aa63b3c633e649aadea Author: Jiang Wang Date: Thu Dec 24 01:12:42 2020 +0000 selftests/bpf: Fix a compile error for BPF_F_BPRM_SECUREEXEC When CONFIG_BPF_LSM is not configured, running bpf selftesting will show BPF_F_BPRM_SECUREEXEC undefined error for bprm_opts.c. The problem is that bprm_opts.c includes vmliunx.h. The vmlinux.h is generated by "bpftool btf dump file ./vmlinux format c". On the other hand, BPF_F_BPRM_SECUREEXEC is defined in include/uapi/linux/bpf.h and used only in bpf_lsm.c. When CONFIG_BPF_LSM is not set, bpf_lsm will not be compiled, so vmlinux.h will not include definition of BPF_F_BPRM_SECUREEXEC. Ideally, we want to compile bpf selftest regardless of the configuration setting, so change the include file from vmlinux.h to bpf.h. Signed-off-by: Jiang Wang Signed-off-by: Daniel Borkmann Acked-by: Song Liu Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20201224011242.585967-1-jiang.wang@bytedance.com commit ede090f5a438e97d0586f64067bbb956e30a2a31 Author: Xu Yilun Date: Tue Dec 29 13:27:41 2020 +0800 spi: altera: fix return value for altera_spi_txrx() This patch fixes the return value for altera_spi_txrx. It should return 1 for interrupt transfer mode, and return 0 for polling transfer mode. The altera_spi_txrx() implements the spi_controller.transfer_one callback. According to the spi-summary.rst, the transfer_one should return 0 when transfer is finished, return 1 when transfer is still in progress. Signed-off-by: Xu Yilun Link: https://lore.kernel.org/r/1609219662-27057-2-git-send-email-yilun.xu@intel.com Signed-off-by: Mark Brown commit cffa4b2122f5f3e53cf3d529bbc74651f95856d5 Author: Xiaolei Wang Date: Tue Dec 29 18:50:46 2020 +0800 regmap: debugfs: Fix a memory leak when calling regmap_attach_dev After initializing the regmap through syscon_regmap_lookup_by_compatible, then regmap_attach_dev to the device, because the debugfs_name has been allocated, there is no need to redistribute it again unreferenced object 0xd8399b80 (size 64): comm "swapper/0", pid 1, jiffies 4294937641 (age 278.590s) hex dump (first 32 bytes): 64 75 6d 6d 79 2d 69 6f 6d 75 78 63 2d 67 70 72 dummy-iomuxc-gpr 40 32 30 65 34 30 30 30 00 7f 52 5b d8 7e 42 69 @20e4000..R[.~Bi backtrace: [] kasprintf+0x2c/0x54 [<6ad3bbc2>] regmap_debugfs_init+0xdc/0x2fc [] __regmap_init+0xc38/0xd88 [<1f7e0609>] of_syscon_register+0x168/0x294 [<735e8766>] device_node_get_regmap+0x6c/0x98 [] imx6ul_init_machine+0x20/0x88 [<0456565b>] customize_machine+0x1c/0x30 [] do_one_initcall+0x80/0x3ac [<7e584867>] kernel_init_freeable+0x170/0x1f0 [<80074741>] kernel_init+0x8/0x120 [<285d6f28>] ret_from_fork+0x14/0x20 [<00000000>] 0x0 Fixes: 9b947a13e7f6 ("regmap: use debugfs even when no device") Signed-off-by: Xiaolei Wang Link: https://lore.kernel.org/r/20201229105046.41984-1-xiaolei.wang@windriver.com Signed-off-by: Mark Brown commit 3deba4d8f07be264b21e81d604c6b569a41a33b5 Author: Takashi Iwai Date: Tue Dec 29 09:34:28 2020 +0100 ALSA: usb-audio: Add quirk for BOSS AD-10 BOSS AD-10 requires the very same quirk like other BOSS devices to enable the special implicit feedback mode. Reported-and-tested-by: Martin Passing Link: https://lore.kernel.org/r/20201229083428.20467-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 65403ff98ebb86caf498e020d572819bb61860ad Author: Roger Quadros Date: Fri Dec 18 12:57:36 2020 +0200 MAINTAINERS: Update address for Cadence USB3 driver Updates my email address for Cadence USB3 driver. Signed-off-by: Roger Quadros Signed-off-by: Peter Chen commit d1357119157c4662d43143885f3691f9a766369a Author: Peter Chen Date: Thu Dec 10 21:33:21 2020 +0800 usb: cdns3: imx: improve driver .remove API Keep the runtime active during the remove operation, and disable related clocks. Signed-off-by: Peter Chen commit 2ef02b846ee2526249a562a66d6dcb25fcbca9d8 Author: Peter Chen Date: Thu Dec 10 21:31:37 2020 +0800 usb: cdns3: imx: fix can't create core device the second time issue The cdns3 core device is populated by calling of_platform_populate, the flag OF_POPULATED is set for core device node, if this flag is not cleared, when calling of_platform_populate the second time after loading parent module again, the OF code will not try to create platform device for core device. To fix it, it uses of_platform_depopulate to depopulate the core device which the parent created, and the flag OF_POPULATED for core device node will be cleared accordingly. Cc: Fixes: 1e056efab993 ("usb: cdns3: add NXP imx8qm glue layer") Signed-off-by: Peter Chen commit 92cbdb923c17544684c2dd3be9f8636617898a44 Author: Peter Chen Date: Thu Dec 10 21:31:36 2020 +0800 usb: cdns3: imx: fix writing read-only memory issue The memory for struct clk_bulk_data should not be static which will be written during the clk_bulk_get. It fixed below oops when loading cdns3-imx as module. [ 17.272605] Unable to handle kernel write to read-only memory at virtual address ffff8000092a5398 [ 17.299730] Mem abort info: [ 17.313542] unregister ISI channel: mxc_isi.4 [ 17.324076] ESR = 0x9600004f [ 17.344658] EC = 0x25: DABT (current EL), IL = 32 bits [ 17.402055] SET = 0, FnV = 0 [ 17.404321] mxs_phy 5b100000.usbphy: supply phy-3p0 not found, using dummy regulator [ 17.405121] EA = 0, S1PTW = 0 [ 17.405133] Data abort info: [ 17.496231] ISV = 0, ISS = 0x0000004f [ 17.510871] CM = 0, WnR = 1 [ 17.533542] swapper pgtable: 4k pages, 48-bit VAs, pgdp=0000000081ea5000 [ 17.545709] [ffff8000092a5398] pgd=00000008bffff003, p4d=00000008bffff003, pud=00000008bfffe003, pmd=0000000885041003, pte=006000088513b783 [ 17.573521] Internal error: Oops: 9600004f [#1] PREEMPT SMP [ 17.579113] Modules linked in: usbmisc_imx phy_mxs_usb phy_cadence_salvo cdns3_imx(+) tcpci imx8_media_dev(C) caam error [ 17.590044] CPU: 2 PID: 253 Comm: systemd-udevd Tainted: G C 5.10.0-rc4-04445-g11f3c3a29d0-dirty #19 [ 17.600488] Hardware name: Freescale i.MX8QXP MEK (DT) [ 17.605633] pstate: 20000005 (nzCv daif -PAN -UAO -TCO BTYPE=--) [ 17.611662] pc : __clk_bulk_get+0x48/0x130 [ 17.615786] lr : clk_bulk_get+0x18/0x20 [ 17.619634] sp : ffff80001369b880 [ 17.622953] x29: ffff80001369b880 x28: 0000000000000013 [ 17.628277] x27: 0000000000000100 x26: ffff00080553b100 [ 17.633602] x25: ffff80001229b4d8 x24: 0000000000000000 [ 17.638928] x23: ffff000800665410 x22: 0000000000000005 [ 17.644275] x21: ffff8000092a5390 x20: ffff000800665400 [ 17.649605] x19: ffff000804e6f980 x18: 000000005b110000 [ 17.654946] x17: 0000000000000000 x16: 0000000000000000 [ 17.660274] x15: ffff800011989100 x14: 0000000000000000 [ 17.665599] x13: ffff800013ce1000 x12: ffff800013ca1000 [ 17.670924] x11: 000000005b110000 x10: 0000000000000000 [ 17.676249] x9 : ffff8000106c5a30 x8 : ffff000804e6fa00 [ 17.681575] x7 : 0000000000000000 x6 : 000000000000003f [ 17.686901] x5 : 0000000000000040 x4 : ffff80001369b8b0 [ 17.692228] x3 : ffff8000092a5398 x2 : ffff8000092a5390 [ 17.697574] x1 : ffff8000092a53e8 x0 : 0000000000000004 [ 17.702905] Call trace: [ 17.705366] __clk_bulk_get+0x48/0x130 [ 17.709125] clk_bulk_get+0x18/0x20 [ 17.712620] devm_clk_bulk_get+0x58/0xb8 [ 17.716563] cdns_imx_probe+0x84/0x1f0 [cdns3_imx] [ 17.721363] platform_drv_probe+0x58/0xa8 [ 17.725381] really_probe+0xec/0x4c8 [ 17.728967] driver_probe_device+0xf4/0x160 [ 17.733160] device_driver_attach+0x74/0x80 [ 17.737355] __driver_attach+0xa4/0x170 [ 17.741202] bus_for_each_dev+0x74/0xc8 [ 17.745043] driver_attach+0x28/0x30 [ 17.748620] bus_add_driver+0x144/0x228 [ 17.752462] driver_register+0x68/0x118 [ 17.756308] __platform_driver_register+0x4c/0x58 [ 17.761022] cdns_imx_driver_init+0x24/0x1000 [cdns3_imx] [ 17.766434] do_one_initcall+0x48/0x2c0 [ 17.770280] do_init_module+0x5c/0x220 [ 17.774029] load_module+0x210c/0x2858 [ 17.777784] __do_sys_finit_module+0xb8/0x120 [ 17.782148] __arm64_sys_finit_module+0x24/0x30 [ 17.786691] el0_svc_common.constprop.0+0x70/0x168 [ 17.791497] do_el0_svc+0x28/0x88 [ 17.794822] el0_sync_handler+0x158/0x160 [ 17.798833] el0_sync+0x140/0x180 [ 17.802158] Code: aa0203f5 91002043 8b205021 a90153f3 (f801047f) Cc: Fixes: 1e056efab993 ("usb: cdns3: add NXP imx8qm glue layer") Signed-off-by: Peter Chen commit ef019c5daf032dce0b95ed4d45bfec93c4fbcb9f Author: Alexander Lobakin Date: Tue Dec 22 13:10:46 2020 +0000 PHY: Ingenic: fix unconditional build of phy-ingenic-usb Currently drivers/phy/ingenic/Makefile adds phy-ingenic-usb to targets not depending on actual Kconfig symbol CONFIG_PHY_INGENIC_USB, so this driver always gets built[-in] on every system. Add missing dependency. Fixes: 31de313dfdcf ("PHY: Ingenic: Add USB PHY driver using generic PHY framework.") Signed-off-by: Alexander Lobakin Link: https://lore.kernel.org/r/20201222131021.4751-1-alobakin@pm.me Signed-off-by: Vinod Koul commit cc465fa269bc0dc63a1ab7384110e4079fb40421 Author: Peter Ujfalusi Date: Tue Dec 15 15:13:48 2020 +0200 dt-bindings: dma: ti: Update maintainer and author information My employment with TI is coming to an end, add the copyright and author comments as they due and change the maintainer mail address. Signed-off-by: Peter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20201215131348.11282-3-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit 28d8e07fc9478f8f14dd5dd4b2c382982fa12461 Author: Peter Ujfalusi Date: Tue Dec 15 15:13:47 2020 +0200 MAINTAINERS: Add entry for Texas Instruments DMA drivers My employment with TI is coming to an end, it is my intention to look after the DMA drivers I have worked with over the years. Signed-off-by: Peter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20201215131348.11282-2-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit ba42f61b36121730d7f51cc261dfd744ee19f50b Author: Zheng Yongjun Date: Wed Dec 16 21:06:49 2020 +0800 qcom: bam_dma: Delete useless kfree code The parameter of kfree function is NULL, so kfree code is useless, delete it. Therefore, goto expression is no longer needed, so simplify it. Signed-off-by: Zheng Yongjun Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20201216130649.13979-1-zhengyongjun3@huawei.com Signed-off-by: Vinod Koul commit 595a334148449bd1d27cf5d6fcb3b0d718cb1b9f Author: Dan Carpenter Date: Mon Dec 14 14:56:52 2020 +0300 dmaengine: dw-edma: Fix use after free in dw_edma_alloc_chunk() If the dw_edma_alloc_burst() function fails then we free "chunk" but it's still on the "desc->chunk->list" list so it will lead to a use after free. Also the "->chunks_alloc" count is incremented when it shouldn't be. In current kernels small allocations are guaranteed to succeed and dw_edma_alloc_burst() can't fail so this will not actually affect runtime. Fixes: e63d79d1ffcd ("dmaengine: Add Synopsys eDMA IP core driver") Signed-off-by: Dan Carpenter Acked-by: Gustavo Pimentel Link: https://lore.kernel.org/r/X9dTBFrUPEvvW7qc@mwanda Signed-off-by: Vinod Koul commit d645148cc82ca7fbacaa601414a552184e9c6dd3 Author: Christophe JAILLET Date: Sat Dec 19 14:28:00 2020 +0100 dmaengine: milbeaut-xdmac: Fix a resource leak in the error handling path of the probe function 'disable_xdmac()' should be called in the error handling path of the probe function to undo a previous 'enable_xdmac()' call, as already done in the remove function. Fixes: a6e9be055d47 ("dmaengine: milbeaut-xdmac: Add XDMAC driver for Milbeaut platforms") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/20201219132800.183254-1-christophe.jaillet@wanadoo.fr Signed-off-by: Vinod Koul commit 33cbd54dc515cc04b5a603603414222b4bb1448d Author: Christophe JAILLET Date: Sat Dec 19 13:47:18 2020 +0100 dmaengine: mediatek: mtk-hsdma: Fix a resource leak in the error handling path of the probe function 'mtk_hsdma_hw_deinit()' should be called in the error handling path of the probe function to undo a previous 'mtk_hsdma_hw_init()' call, as already done in the remove function. Fixes: 548c4597e984 ("dmaengine: mediatek: Add MediaTek High-Speed DMA controller for MT7622 and MT7623 SoC") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/20201219124718.182664-1-christophe.jaillet@wanadoo.fr Signed-off-by: Vinod Koul commit 8fb28795fb64e1151c0e713686d8b026a5a2aece Author: Xiaoming Ni Date: Fri Dec 18 18:41:37 2020 +0800 dmaengine: qcom: gpi: Fixes a format mismatch drivers/dma/qcom/gpi.c:1419:3: warning: format '%lu' expects argument of type 'long unsigned int', but argument 8 has type 'size_t {aka unsigned int}' [-Wformat=] drivers/dma/qcom/gpi.c:1427:31: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'size_t {aka unsigned int}' [-Wformat=] drivers/dma/qcom/gpi.c:1447:3: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'dma_addr_t {aka unsigned int}' [-Wformat=] drivers/dma/qcom/gpi.c:1447:3: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 5 has type 'phys_addr_t {aka unsigned int}' [-Wformat=] Signed-off-by: Xiaoming Ni Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20201218104137.59200-1-nixiaoming@huawei.com Signed-off-by: Vinod Koul commit ff58f7dd0c1352a01de3a40327895bd51e03de3a Author: Dan Carpenter Date: Wed Dec 16 11:29:46 2020 +0300 dmaengine: idxd: off by one in cleanup code The clean up is off by one so this will start at "i" and it should start with "i - 1" and then it doesn't unregister the zeroeth elements in the array. Fixes: c52ca478233c ("dmaengine: idxd: add configuration component of driver") Signed-off-by: Dan Carpenter Acked-by: Dave Jiang Link: https://lore.kernel.org/r/X9nFeojulsNqUSnG@mwanda Signed-off-by: Vinod Koul commit 26b614fa441048a9f8e4a814c3b01756816ce7a7 Author: Peter Ujfalusi Date: Wed Dec 16 17:48:33 2020 +0200 dmaengine: ti: k3-udma: Fix pktdma rchan TPL level setup Instead of initializing the rchan_tpl the initial commit re-initialized the tchan_tpl. Fixes: d2abc982333c0 ("dmaengine: ti: k3-udma: Initial support for K3 PKTDMA") Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20201216154833.20821-1-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit 4bfc4714849d005e6835bcffa3c29ebd6e5ee35d Merge: 1fef73597fa54 a61daaf351da7 Author: David S. Miller Date: Mon Dec 28 15:20:48 2020 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2020-12-28 The following pull-request contains BPF updates for your *net* tree. There is a small merge conflict between bpf tree commit 69ca310f3416 ("bpf: Save correct stopping point in file seq iteration") and net tree commit 66ed594409a1 ("bpf/task_iter: In task_file_seq_get_next use task_lookup_next_fd_rcu"). The get_files_struct() does not exist anymore in net, so take the hunk in HEAD and add the `info->tid = curr_tid` to the error path: [...] curr_task = task_seq_get_next(ns, &curr_tid, true); if (!curr_task) { info->task = NULL; info->tid = curr_tid; return NULL; } /* set info->task and info->tid */ [...] We've added 10 non-merge commits during the last 9 day(s) which contain a total of 11 files changed, 75 insertions(+), 20 deletions(-). The main changes are: 1) Various AF_XDP fixes such as fill/completion ring leak on failed bind and fixing a race in skb mode's backpressure mechanism, from Magnus Karlsson. 2) Fix latency spikes on lockdep enabled kernels by adding a rescheduling point to BPF hashtab initialization, from Eric Dumazet. 3) Fix a splat in task iterator by saving the correct stopping point in the seq file iteration, from Jonathan Lemon. 4) Fix BPF maps selftest by adding retries in case hashtab returns EBUSY errors on update/deletes, from Andrii Nakryiko. 5) Fix BPF selftest error reporting to something more user friendly if the vmlinux BTF cannot be found, from Kamal Mostafa. ==================== Signed-off-by: David S. Miller commit 1fef73597fa545c35fddc953979013882fbd4e55 Author: Xie He Date: Sun Dec 27 18:53:39 2020 -0800 net: hdlc_ppp: Fix issues when mod_timer is called while timer is running ppp_cp_event is called directly or indirectly by ppp_rx with "ppp->lock" held. It may call mod_timer to add a new timer. However, at the same time ppp_timer may be already running and waiting for "ppp->lock". In this case, there's no need for ppp_timer to continue running and it can just exit. If we let ppp_timer continue running, it may call add_timer. This causes kernel panic because add_timer can't be called with a timer pending. This patch fixes this problem. Fixes: e022c2f07ae5 ("WAN: new synchronous PPP implementation for generic HDLC.") Cc: Krzysztof Halasa Signed-off-by: Xie He Signed-off-by: David S. Miller commit 9b22fece786ed641909988da4810bfa8e5d2e592 Author: Léo Le Bouter Date: Sun Dec 27 17:11:36 2020 +0100 atlantic: remove architecture depends This was tested on a RaptorCS Talos II with IBM POWER9 DD2.2 CPUs and an ASUS XG-C100F PCI-e card without any issue. Speeds of ~8Gbps could be attained with not-very-scientific (wget HTTP) both-ways measurements on a local network. No warning or error reported in kernel logs. The drivers seems to be portable enough for it not to be gated like such. Signed-off-by: Léo Le Bouter Signed-off-by: David S. Miller commit 085c7c4e1c0e50d90b7d90f61a12e12b317a91e2 Author: Cong Wang Date: Sat Dec 26 15:44:53 2020 -0800 erspan: fix version 1 check in gre_parse_header() Both version 0 and version 1 use ETH_P_ERSPAN, but version 0 does not have an erspan header. So the check in gre_parse_header() is wrong, we have to distinguish version 1 from version 0. We can just check the gre header length like is_erspan_type1(). Fixes: cb73ee40b1b3 ("net: ip_gre: use erspan key field for tunnel lookup") Reported-by: syzbot+f583ce3d4ddf9836b27a@syzkaller.appspotmail.com Cc: William Tu Cc: Lorenzo Bianconi Signed-off-by: Cong Wang Signed-off-by: David S. Miller commit 5ede3ada3da7f050519112b81badc058190b9f9f Author: Yunjian Wang Date: Sat Dec 26 16:10:05 2020 +0800 net: hns: fix return value check in __lb_other_process() The function skb_copy() could return NULL, the return value need to be checked. Fixes: b5996f11ea54 ("net: add Hisilicon Network Subsystem basic ethernet support") Signed-off-by: Yunjian Wang Signed-off-by: David S. Miller commit bd1248f1ddbc48b0c30565fce897a3b6423313b8 Author: Randy Dunlap Date: Thu Dec 24 22:23:44 2020 -0800 net: sched: prevent invalid Scell_log shift count Check Scell_log shift size in red_check_params() and modify all callers of red_check_params() to pass Scell_log. This prevents a shift out-of-bounds as detected by UBSAN: UBSAN: shift-out-of-bounds in ./include/net/red.h:252:22 shift exponent 72 is too large for 32-bit type 'int' Fixes: 8afa10cbe281 ("net_sched: red: Avoid illegal values") Signed-off-by: Randy Dunlap Reported-by: syzbot+97c5bd9cc81eca63d36e@syzkaller.appspotmail.com Cc: Nogah Frankel Cc: Jamal Hadi Salim Cc: Cong Wang Cc: Jiri Pirko Cc: netdev@vger.kernel.org Cc: "David S. Miller" Cc: Jakub Kicinski Signed-off-by: David S. Miller commit a533b70a657c03137dd49cbcfee70aac086ab2b1 Author: weichenchen Date: Fri Dec 25 13:44:45 2020 +0800 net: neighbor: fix a crash caused by mod zero pneigh_enqueue() tries to obtain a random delay by mod NEIGH_VAR(p, PROXY_DELAY). However, NEIGH_VAR(p, PROXY_DELAY) migth be zero at that point because someone could write zero to /proc/sys/net/ipv4/neigh/[device]/proxy_delay after the callers check it. This patch uses prandom_u32_max() to get a random delay instead which avoids potential division by zero. Signed-off-by: weichenchen Signed-off-by: David S. Miller commit 21fdca22eb7df2a1e194b8adb812ce370748b733 Author: Guillaume Nault Date: Thu Dec 24 20:01:09 2020 +0100 ipv4: Ignore ECN bits for fib lookups in fib_compute_spec_dst() RT_TOS() only clears one of the ECN bits. Therefore, when fib_compute_spec_dst() resorts to a fib lookup, it can return different results depending on the value of the second ECN bit. For example, ECT(0) and ECT(1) packets could be treated differently. $ ip netns add ns0 $ ip netns add ns1 $ ip link add name veth01 netns ns0 type veth peer name veth10 netns ns1 $ ip -netns ns0 link set dev lo up $ ip -netns ns1 link set dev lo up $ ip -netns ns0 link set dev veth01 up $ ip -netns ns1 link set dev veth10 up $ ip -netns ns0 address add 192.0.2.10/24 dev veth01 $ ip -netns ns1 address add 192.0.2.11/24 dev veth10 $ ip -netns ns1 address add 192.0.2.21/32 dev lo $ ip -netns ns1 route add 192.0.2.10/32 tos 4 dev veth10 src 192.0.2.21 $ ip netns exec ns1 sysctl -wq net.ipv4.icmp_echo_ignore_broadcasts=0 With TOS 4 and ECT(1), ns1 replies using source address 192.0.2.21 (ping uses -Q to set all TOS and ECN bits): $ ip netns exec ns0 ping -c 1 -b -Q 5 192.0.2.255 [...] 64 bytes from 192.0.2.21: icmp_seq=1 ttl=64 time=0.544 ms But with TOS 4 and ECT(0), ns1 replies using source address 192.0.2.11 because the "tos 4" route isn't matched: $ ip netns exec ns0 ping -c 1 -b -Q 6 192.0.2.255 [...] 64 bytes from 192.0.2.11: icmp_seq=1 ttl=64 time=0.597 ms After this patch the ECN bits don't affect the result anymore: $ ip netns exec ns0 ping -c 1 -b -Q 6 192.0.2.255 [...] 64 bytes from 192.0.2.21: icmp_seq=1 ttl=64 time=0.591 ms Fixes: 35ebf65e851c ("ipv4: Create and use fib_compute_spec_dst() helper.") Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller commit 4f374d2c43a9e5e773f1dee56db63bd6b8a36276 Author: Stefan Chulski Date: Wed Dec 23 20:35:21 2020 +0200 net: mvpp2: fix pkt coalescing int-threshold configuration The packet coalescing interrupt threshold has separated registers for different aggregated/cpu (sw-thread). The required value should be loaded for every thread but not only for 1 current cpu. Fixes: 213f428f5056 ("net: mvpp2: add support for TX interrupts and RX queue distribution modes") Signed-off-by: Stefan Chulski Link: https://lore.kernel.org/r/1608748521-11033-1-git-send-email-stefanc@marvell.com Signed-off-by: Jakub Kicinski commit 698222457465ce343443be81c5512edda86e5914 Author: Al Viro Date: Thu Dec 24 19:44:38 2020 +0000 MIPS: Fix malformed NT_FILE and NT_SIGINFO in 32bit coredumps Patches that introduced NT_FILE and NT_SIGINFO notes back in 2012 had taken care of native (fs/binfmt_elf.c) and compat (fs/compat_binfmt_elf.c) coredumps; unfortunately, compat on mips (which does not go through the usual compat_binfmt_elf.c) had not been noticed. As the result, both N32 and O32 coredumps on 64bit mips kernels have those sections malformed enough to confuse the living hell out of all gdb and readelf versions (up to and including the tip of binutils-gdb.git). Longer term solution is to make both O32 and N32 compat use the regular compat_binfmt_elf.c, but that's too much for backports. The minimal solution is to do in arch/mips/kernel/binfmt_elf[on]32.c the same thing those patches have done in fs/compat_binfmt_elf.c Cc: stable@kernel.org # v3.7+ Signed-off-by: Al Viro Signed-off-by: Thomas Bogendoerfer commit 4d4f9c1a17a3480f8fe523673f7232b254d724b7 Author: Paul Cercueil Date: Wed Dec 16 23:39:56 2020 +0000 MIPS: boot: Fix unaligned access with CONFIG_MIPS_RAW_APPENDED_DTB The compressed payload is not necesarily 4-byte aligned, at least when compiling with Clang. In that case, the 4-byte value appended to the compressed payload that corresponds to the uncompressed kernel image size must be read using get_unaligned_le32(). This fixes Clang-built kernels not booting on MIPS (tested on a Ingenic JZ4770 board). Fixes: b8f54f2cde78 ("MIPS: ZBOOT: copy appended dtb to the end of the kernel") Cc: # v4.7 Signed-off-by: Paul Cercueil Reviewed-by: Nick Desaulniers Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Bogendoerfer commit bb2cc7d7143f00717d4d9346817fc332bcf8ad2f Merge: bc4adf0eb72db 1ddf776b498c9 Author: Jakub Kicinski Date: Mon Dec 28 14:13:24 2020 -0800 Merge branch 'net-ipa-fix-some-new-build-warnings' Alex Elder says: ==================== net: ipa: fix some new build warnings I got a super friendly message from the Intel kernel test robot that pointed out that two patches I posted last week caused new build warnings. I already had these problems fixed in my own tree but the fix was not included in what I sent out last week. ==================== Link: https://lore.kernel.org/r/20201226213737.338928-1-elder@linaro.org Signed-off-by: Jakub Kicinski commit 1ddf776b498c922935d0ec3283b9817dd33aedf7 Author: Alex Elder Date: Sat Dec 26 15:37:37 2020 -0600 net: ipa: don't return a value from evt_ring_command() Callers of evt_ring_command() no longer care whether the command times out, and don't use what evt_ring_command() returns. Redefine that function to have void return type. Reported-by: kernel test robot Fixes: 428b448ee764a ("net: ipa: use state to determine event ring command success") Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 1169318bd565d2911b949f6123e109baa35881b6 Author: Alex Elder Date: Sat Dec 26 15:37:36 2020 -0600 net: ipa: don't return a value from gsi_channel_command() Callers of gsi_channel_command() no longer care whether the command times out, and don't use what gsi_channel_command() returns. Redefine that function to have void return type. Reported-by: kernel test robot Fixes: 6ffddf3b3d182 ("net: ipa: use state to determine channel command success") Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit bc4adf0eb72dbba8355fef3ef4451e4f72702c99 Merge: 74f88c1676aa0 a029a2fef5d11 Author: Jakub Kicinski Date: Mon Dec 28 14:10:57 2020 -0800 Merge branch 'bnxt_en-bug-fixes' Michael Chan says: ==================== bnxt_en: Bug fixes. The first patch fixes recovery of fatal AER errors. The second one fixes a potential array out of bounds issue. ==================== Link: https://lore.kernel.org/r/1609096698-15009-1-git-send-email-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit a029a2fef5d11bb85587433c3783615442abac96 Author: Michael Chan Date: Sun Dec 27 14:18:18 2020 -0500 bnxt_en: Check TQM rings for maximum supported value. TQM rings are hardware resources that require host context memory managed by the driver. The driver supports up to 9 TQM rings and the number of rings to use is requested by firmware during run-time. Cap this number to the maximum supported to prevent accessing beyond the array. Future firmware may request more than 9 TQM rings. Define macros to remove the magic number 9 from the C code. Fixes: ac3158cb0108 ("bnxt_en: Allocate TQM ring context memory according to fw specification.") Reviewed-by: Pavan Chebbi Reviewed-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski commit fb1e6e562b37b39adfe251919c9abfdb3e01f921 Author: Vasundhara Volam Date: Sun Dec 27 14:18:17 2020 -0500 bnxt_en: Fix AER recovery. A recent change skips sending firmware messages to the firmware when pci_channel_offline() is true during fatal AER error. To make this complete, we need to move the re-initialization sequence to bnxt_io_resume(), otherwise the firmware messages to re-initialize will all be skipped. In any case, it is more correct to re-initialize in bnxt_io_resume(). Also, fix the reverse x-mas tree format when defining variables in bnxt_io_slot_reset(). Fixes: b340dc680ed4 ("bnxt_en: Avoid sending firmware messages when AER error is detected.") Reviewed-by: Edwin Peer Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski commit 74f88c1676aa0b4518549c5a846875a6102ab540 Merge: e7579d5d5b329 3c98cbf22a96c Author: Jakub Kicinski Date: Mon Dec 28 14:04:03 2020 -0800 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2020-12-23 Commit e086ba2fccda ("e1000e: disable s0ix entry and exit flows for ME systems") disabled S0ix flows for systems that have various incarnations of the i219-LM ethernet controller. This was done because of some regressions caused by an earlier commit 632fbd5eb5b0e ("e1000e: fix S0ix flows for cable connected case") with i219-LM controller. Per discussion with Intel architecture team this direction should be changed and allow S0ix flows to be used by default. This patch series includes directional changes for their conclusions in https://lkml.org/lkml/2020/12/13/15. * '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: e1000e: Export S0ix flags to ethtool Revert "e1000e: disable s0ix entry and exit flows for ME systems" e1000e: bump up timeout to wait when ME un-configures ULP mode e1000e: Only run S0ix flows if shutdown succeeded ==================== Link: https://lore.kernel.org/r/20201223233625.92519-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit e7579d5d5b3298f7e888ed07ac16bfb7174c135a Author: Davide Caratti Date: Mon Dec 21 22:07:25 2020 +0100 net: mptcp: cap forward allocation to 1M the following syzkaller reproducer: r0 = socket$inet_mptcp(0x2, 0x1, 0x106) bind$inet(r0, &(0x7f0000000080)={0x2, 0x4e24, @multicast2}, 0x10) connect$inet(r0, &(0x7f0000000480)={0x2, 0x4e24, @local}, 0x10) sendto$inet(r0, &(0x7f0000000100)="f6", 0xffffffe7, 0xc000, 0x0, 0x0) systematically triggers the following warning: WARNING: CPU: 2 PID: 8618 at net/core/stream.c:208 sk_stream_kill_queues+0x3fa/0x580 Modules linked in: CPU: 2 PID: 8618 Comm: syz-executor Not tainted 5.10.0+ #334 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.11.1-4.module+el8.1.0+4066+0f1aadab 04/04 RIP: 0010:sk_stream_kill_queues+0x3fa/0x580 Code: df 48 c1 ea 03 0f b6 04 02 84 c0 74 04 3c 03 7e 40 8b ab 20 02 00 00 e9 64 ff ff ff e8 df f0 81 2 RSP: 0018:ffffc9000290fcb0 EFLAGS: 00010293 RAX: ffff888011cb8000 RBX: 0000000000000000 RCX: ffffffff86eecf0e RDX: 0000000000000000 RSI: ffffffff86eecf6a RDI: 0000000000000005 RBP: 0000000000000e28 R08: ffff888011cb8000 R09: fffffbfff1f48139 R10: ffffffff8fa409c7 R11: fffffbfff1f48138 R12: ffff8880215e6220 R13: ffffffff8fa409c0 R14: ffffc9000290fd30 R15: 1ffff92000521fa2 FS: 00007f41c78f4800(0000) GS:ffff88802d000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f95c803d088 CR3: 0000000025ed2000 CR4: 00000000000006f0 Call Trace: __mptcp_destroy_sock+0x4f5/0x8e0 mptcp_close+0x5e2/0x7f0 inet_release+0x12b/0x270 __sock_release+0xc8/0x270 sock_close+0x18/0x20 __fput+0x272/0x8e0 task_work_run+0xe0/0x1a0 exit_to_user_mode_prepare+0x1df/0x200 syscall_exit_to_user_mode+0x19/0x50 entry_SYSCALL_64_after_hwframe+0x44/0xa9 userspace programs provide arbitrarily high values of 'len' in sendmsg(): this is causing integer overflow of 'amount'. Cap forward allocation to 1 megabyte: higher values are not really useful. Suggested-by: Paolo Abeni Fixes: e93da92896bc ("mptcp: implement wmem reservation") Signed-off-by: Davide Caratti Link: https://lore.kernel.org/r/3334d00d8b2faecafdfab9aa593efcbf61442756.1608584474.git.dcaratti@redhat.com Signed-off-by: Jakub Kicinski commit 950271d7cc0b4546af3549d8143c4132d6e1f138 Author: Yunjian Wang Date: Fri Dec 25 10:52:16 2020 +0800 tun: fix return value when the number of iovs exceeds MAX_SKB_FRAGS Currently the tun_napi_alloc_frags() function returns -ENOMEM when the number of iovs exceeds MAX_SKB_FRAGS + 1. However this is inappropriate, we should use -EMSGSIZE instead of -ENOMEM. The following distinctions are matters: 1. the caller need to drop the bad packet when -EMSGSIZE is returned, which means meeting a persistent failure. 2. the caller can try again when -ENOMEM is returned, which means meeting a transient failure. Fixes: 90e33d459407 ("tun: enable napi_gro_frags() for TUN/TAP driver") Signed-off-by: Yunjian Wang Acked-by: Willem de Bruijn Acked-by: Jason Wang Acked-by: Michael S. Tsirkin Link: https://lore.kernel.org/r/1608864736-24332-1-git-send-email-wangyunjian@huawei.com Signed-off-by: Jakub Kicinski commit 4614792eebcbf81c60ad3604c1aeeb2b0899cea4 Author: Grygorii Strashko Date: Thu Dec 24 18:24:05 2020 +0200 net: ethernet: ti: cpts: fix ethtool output when no ptp_clock registered The CPTS driver registers PTP PHC clock when first netif is going up and unregister it when all netif are down. Now ethtool will show: - PTP PHC clock index 0 after boot until first netif is up; - the last assigned PTP PHC clock index even if PTP PHC clock is not registered any more after all netifs are down. This patch ensures that -1 is returned by ethtool when PTP PHC clock is not registered any more. Fixes: 8a2c9a5ab4b9 ("net: ethernet: ti: cpts: rework initialization/deinitialization") Signed-off-by: Grygorii Strashko Acked-by: Richard Cochran Link: https://lore.kernel.org/r/20201224162405.28032-1-grygorii.strashko@ti.com Signed-off-by: Jakub Kicinski commit dea8dcf2a9fa8cc540136a6cd885c3beece16ec3 Merge: c76e02c59e13a 48b0777cd93db Author: Linus Torvalds Date: Mon Dec 28 13:32:16 2020 -0800 Merge tag 'for-5.11/dm-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fix from Mike Snitzer: "Revert WQ_SYSFS change that broke reencryption (and all other functionality that requires reloading a dm-crypt DM table)" * tag 'for-5.11/dm-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: Revert "dm crypt: export sysfs of kcryptd workqueue" commit 5ff3fda971ae6c5a0d884dc9ff8780e89536fb72 Merge: 59b4a8fa27f5a 4ae2bb81649dc Author: Jakub Kicinski Date: Mon Dec 28 13:26:48 2020 -0800 Merge branch 'net-sysfs-fix-race-conditions-in-the-xps-code' Antoine Tenart says: ==================== net-sysfs: fix race conditions in the xps code This series fixes race conditions in the xps code, where out of bound accesses can occur when dev->num_tc is updated, triggering oops. The root cause is linked to locking issues. An explanation is given in each of the commit logs. We had a discussion on the v1 of this series about using the xps_map mutex instead of the rtnl lock. While that seemed a better compromise, v2 showed the added complexity wasn't best for fixes. So we decided to go back to v1 and use the rtnl lock. Because of this, the only differences between v1 and v3 are improvements in the commit messages. ==================== Link: https://lore.kernel.org/r/20201223212323.3603139-1-atenart@kernel.org Signed-off-by: Jakub Kicinski commit 4ae2bb81649dc03dfc95875f02126b14b773f7ab Author: Antoine Tenart Date: Wed Dec 23 22:23:23 2020 +0100 net-sysfs: take the rtnl lock when accessing xps_rxqs_map and num_tc Accesses to dev->xps_rxqs_map (when using dev->num_tc) should be protected by the rtnl lock, like we do for netif_set_xps_queue. I didn't see an actual bug being triggered, but let's be safe here and take the rtnl lock while accessing the map in sysfs. Fixes: 8af2c06ff4b1 ("net-sysfs: Add interface for Rx queue(s) map per Tx queue") Signed-off-by: Antoine Tenart Reviewed-by: Alexander Duyck Signed-off-by: Jakub Kicinski commit 2d57b4f142e0b03e854612b8e28978935414bced Author: Antoine Tenart Date: Wed Dec 23 22:23:22 2020 +0100 net-sysfs: take the rtnl lock when storing xps_rxqs Two race conditions can be triggered when storing xps rxqs, resulting in various oops and invalid memory accesses: 1. Calling netdev_set_num_tc while netif_set_xps_queue: - netif_set_xps_queue uses dev->tc_num as one of the parameters to compute the size of new_dev_maps when allocating it. dev->tc_num is also used to access the map, and the compiler may generate code to retrieve this field multiple times in the function. - netdev_set_num_tc sets dev->tc_num. If new_dev_maps is allocated using dev->tc_num and then dev->tc_num is set to a higher value through netdev_set_num_tc, later accesses to new_dev_maps in netif_set_xps_queue could lead to accessing memory outside of new_dev_maps; triggering an oops. 2. Calling netif_set_xps_queue while netdev_set_num_tc is running: 2.1. netdev_set_num_tc starts by resetting the xps queues, dev->tc_num isn't updated yet. 2.2. netif_set_xps_queue is called, setting up the map with the *old* dev->num_tc. 2.3. netdev_set_num_tc updates dev->tc_num. 2.4. Later accesses to the map lead to out of bound accesses and oops. A similar issue can be found with netdev_reset_tc. One way of triggering this is to set an iface up (for which the driver uses netdev_set_num_tc in the open path, such as bnx2x) and writing to xps_rxqs in a concurrent thread. With the right timing an oops is triggered. Both issues have the same fix: netif_set_xps_queue, netdev_set_num_tc and netdev_reset_tc should be mutually exclusive. We do that by taking the rtnl lock in xps_rxqs_store. Fixes: 8af2c06ff4b1 ("net-sysfs: Add interface for Rx queue(s) map per Tx queue") Signed-off-by: Antoine Tenart Reviewed-by: Alexander Duyck Signed-off-by: Jakub Kicinski commit fb25038586d0064123e393cadf1fadd70a9df97a Author: Antoine Tenart Date: Wed Dec 23 22:23:21 2020 +0100 net-sysfs: take the rtnl lock when accessing xps_cpus_map and num_tc Accesses to dev->xps_cpus_map (when using dev->num_tc) should be protected by the rtnl lock, like we do for netif_set_xps_queue. I didn't see an actual bug being triggered, but let's be safe here and take the rtnl lock while accessing the map in sysfs. Fixes: 184c449f91fe ("net: Add support for XPS with QoS via traffic classes") Signed-off-by: Antoine Tenart Reviewed-by: Alexander Duyck Signed-off-by: Jakub Kicinski commit 1ad58225dba3f2f598d2c6daed4323f24547168f Author: Antoine Tenart Date: Wed Dec 23 22:23:20 2020 +0100 net-sysfs: take the rtnl lock when storing xps_cpus Two race conditions can be triggered when storing xps cpus, resulting in various oops and invalid memory accesses: 1. Calling netdev_set_num_tc while netif_set_xps_queue: - netif_set_xps_queue uses dev->tc_num as one of the parameters to compute the size of new_dev_maps when allocating it. dev->tc_num is also used to access the map, and the compiler may generate code to retrieve this field multiple times in the function. - netdev_set_num_tc sets dev->tc_num. If new_dev_maps is allocated using dev->tc_num and then dev->tc_num is set to a higher value through netdev_set_num_tc, later accesses to new_dev_maps in netif_set_xps_queue could lead to accessing memory outside of new_dev_maps; triggering an oops. 2. Calling netif_set_xps_queue while netdev_set_num_tc is running: 2.1. netdev_set_num_tc starts by resetting the xps queues, dev->tc_num isn't updated yet. 2.2. netif_set_xps_queue is called, setting up the map with the *old* dev->num_tc. 2.3. netdev_set_num_tc updates dev->tc_num. 2.4. Later accesses to the map lead to out of bound accesses and oops. A similar issue can be found with netdev_reset_tc. One way of triggering this is to set an iface up (for which the driver uses netdev_set_num_tc in the open path, such as bnx2x) and writing to xps_cpus in a concurrent thread. With the right timing an oops is triggered. Both issues have the same fix: netif_set_xps_queue, netdev_set_num_tc and netdev_reset_tc should be mutually exclusive. We do that by taking the rtnl lock in xps_cpus_store. Fixes: 184c449f91fe ("net: Add support for XPS with QoS via traffic classes") Signed-off-by: Antoine Tenart Reviewed-by: Alexander Duyck Signed-off-by: Jakub Kicinski commit 59b4a8fa27f5a895582ada1ae5034af7c94a57b5 Author: Roland Dreier Date: Wed Dec 23 19:21:16 2020 -0800 CDC-NCM: remove "connected" log message The cdc_ncm driver passes network connection notifications up to usbnet_link_change(), which is the right place for any logging. Remove the netdev_info() duplicating this from the driver itself. This stops devices such as my "TRENDnet USB 10/100/1G/2.5G LAN" (ID 20f4:e02b) adapter from spamming the kernel log with cdc_ncm 2-2:2.0 enp0s2u2c2: network connection: connected messages every 60 msec or so. Signed-off-by: Roland Dreier Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20201224032116.2453938-1-roland@kernel.org Signed-off-by: Jakub Kicinski commit 48b0777cd93dbd800d3966b6f5c34714aad5c203 Author: Mike Snitzer Date: Mon Dec 28 16:13:52 2020 -0500 Revert "dm crypt: export sysfs of kcryptd workqueue" This reverts commit a2b8b2d975673b1a50ab0bcce5d146b9335edfad. WQ_SYSFS breaks the ability to reload a DM table due to sysfs kobject collision (due to active and inactive table). Given lack of demonstrated need for exposing this workqueue via sysfs: revert exposing it. Reported-by: Ignat Korchagin Signed-off-by: Mike Snitzer commit 664f1e259a982bf213f0cd8eea7616c89546585c Author: Ilya Dryomov Date: Wed Dec 16 18:40:05 2020 +0100 libceph: add __maybe_unused to DEFINE_MSGR2_FEATURE Avoid -Wunused-const-variable warnings for "make W=1". Reported-by: Jeff Layton Signed-off-by: Ilya Dryomov commit f5f2c9a0e3073debc6bc0ecc855ced0158526ee8 Author: Ilya Dryomov Date: Tue Dec 15 16:49:07 2020 +0100 libceph: align session_key and con_secret to 16 bytes crypto_shash_setkey() and crypto_aead_setkey() will do a (small) GFP_ATOMIC allocation to align the key if it isn't suitably aligned. It's not a big deal, but at the same time easy to avoid. The actual alignment requirement is dynamic, queryable with crypto_shash_alignmask() and crypto_aead_alignmask(), but shouldn't be stricter than 16 bytes for our algorithms. Fixes: cd1a677cad99 ("libceph, ceph: implement msgr2.1 protocol (crc and secure modes)") Signed-off-by: Ilya Dryomov commit ad32fe8801c38f7b1a8b3814bd1f006cb2b5e781 Author: Ilya Dryomov Date: Tue Dec 15 16:40:59 2020 +0100 libceph: fix auth_signature buffer allocation in secure mode auth_signature frame is 68 bytes in plain mode and 96 bytes in secure mode but we are requesting 68 bytes in both modes. By luck, this doesn't actually result in any invalid memory accesses because the allocation is satisfied out of kmalloc-96 slab and so exactly 96 bytes are allocated, but KASAN rightfully complains. Fixes: cd1a677cad99 ("libceph, ceph: implement msgr2.1 protocol (crc and secure modes)") Reported-by: Luis Henriques Signed-off-by: Ilya Dryomov commit 60267ba35c744d851dcd2d22ebaa240ca6aaa15f Author: Ilya Dryomov Date: Wed Dec 16 17:19:58 2020 +0100 ceph: reencode gid_list when reconnecting On reconnect, cap and dentry releases are dropped and the fields that follow must be reencoded into the freed space. Currently these are timestamp and gid_list, but gid_list isn't reencoded. This results in failed to decode message of type 24 v4: End of buffer errors on the MDS. While at it, make a change to encode gid_list unconditionally, without regard to what head/which version was used as a result of checking whether CEPH_FEATURE_FS_BTIME is supported or not. URL: https://tracker.ceph.com/issues/48618 Fixes: 4f1ddb1ea874 ("ceph: implement updated ceph_mds_request_head structure") Signed-off-by: Ilya Dryomov Reviewed-by: Jeff Layton commit c76e02c59e13ae6c22cc091786d16c01bee23a14 Merge: 91afe604c1540 01341fbd0d8d4 Author: Linus Torvalds Date: Mon Dec 28 11:23:02 2020 -0800 Merge branch 'for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq Pull workqueue update from Tejun Heo: "The same as the cgroup tree - one commit which was scheduled for the 5.11 merge window. All the commit does is avoding spurious worker wakeups from workqueue allocation / config change path to help cpuisol use cases" * 'for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: workqueue: Kick a worker based on the actual activation of delayed works commit 91afe604c15405a7b15d1464f224372cd82d3e2c Merge: 5c8fe583cce54 2d18e54dd8662 Author: Linus Torvalds Date: Mon Dec 28 11:16:38 2020 -0800 Merge branch 'for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup updates from Tejun Heo: "These three patches were scheduled for the merge window but I forgot to send them out. Sorry about that. None of them are significant and they fit well in a fix pull request too - two are cosmetic and one fixes a memory leak in the mount option parsing path" * 'for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup: Fix memory leak when parsing multiple source parameters cgroup/cgroup.c: replace 'of->kn->priv' with of_cft() kernel: cgroup: Mundane spelling fixes throughout the file commit 54ca955b5a4024e2ce0f206b03adb7109bc4da26 Author: Pali Rohár Date: Wed Dec 23 20:19:31 2020 +0100 serial: mvebu-uart: fix tx lost characters at power off Commit c685af1108d7 ("serial: mvebu-uart: fix tx lost characters") fixed tx lost characters at low baud rates but started causing tx lost characters when kernel is going to power off or reboot. TX_EMP tells us when transmit queue is empty therefore all characters were transmitted. TX_RDY tells us when CPU can send a new character. Therefore we need to use different check prior transmitting new character and different check after all characters were sent. This patch splits polling code into two functions: wait_for_xmitr() which waits for TX_RDY and wait_for_xmite() which waits for TX_EMP. When rebooting A3720 platform without this patch on UART is print only: [ 42.699� And with this patch on UART is full output: [ 39.530216] reboot: Restarting system Fixes: c685af1108d7 ("serial: mvebu-uart: fix tx lost characters") Signed-off-by: Pali Rohár Cc: stable Link: https://lore.kernel.org/r/20201223191931.18343-1-pali@kernel.org Signed-off-by: Greg Kroah-Hartman commit 9389044f27081d6ec77730c36d5bf9a1288bcda2 Author: Jerome Brunet Date: Mon Dec 21 18:35:28 2020 +0100 usb: gadget: f_uac2: reset wMaxPacketSize With commit 913e4a90b6f9 ("usb: gadget: f_uac2: finalize wMaxPacketSize according to bandwidth") wMaxPacketSize is computed dynamically but the value is never reset. Because of this, the actual maximum packet size can only decrease each time the audio gadget is instantiated. Reset the endpoint maximum packet size and mark wMaxPacketSize as dynamic to solve the problem. Fixes: 913e4a90b6f9 ("usb: gadget: f_uac2: finalize wMaxPacketSize according to bandwidth") Signed-off-by: Jerome Brunet Cc: stable Link: https://lore.kernel.org/r/20201221173531.215169-2-jbrunet@baylibre.com Signed-off-by: Greg Kroah-Hartman commit e5f4ca3fce90a37b23a77bfcc86800d484a80514 Author: Serge Semin Date: Thu Dec 10 11:50:08 2020 +0300 usb: dwc3: ulpi: Fix USB2.0 HS/FS/LS PHY suspend regression First of all the commit e0082698b689 ("usb: dwc3: ulpi: conditionally resume ULPI PHY") introduced the Suspend USB2.0 HS/FS/LS PHY regression, as by design of the fix any attempt to read/write from/to the PHY control registers will completely disable the PHY suspension, which consequently will increase the USB bus power consumption. Secondly the fix won't work well for the very first attempt of the ULPI PHY control registers IO, because after disabling the USB2.0 PHY suspension functionality it will still take some time for the bus to resume from the sleep state if one has been reached before it. So the very first PHY register read/write operation will take more time than the busy-loop provides and the IO timeout error might be returned anyway. Here we suggest to fix the denoted problems in the following way. First of all let's not disable the Suspend USB2.0 HS/FS/LS PHY functionality so to make the controller and the USB2.0 bus more power efficient. Secondly instead of that we'll extend the PHY IO op wait procedure with 1 - 1.2 ms sleep if the PHY suspension is enabled (1ms should be enough as by LPM specification it is at most how long it takes for the USB2.0 bus to resume from L1 (Sleep) state). Finally in case if the USB2.0 PHY suspension functionality has been disabled on the DWC USB3 controller setup procedure we'll compensate the USB bus resume process latency by extending the busy-loop attempts counter. Fixes: e0082698b689 ("usb: dwc3: ulpi: conditionally resume ULPI PHY") Acked-by: Heikki Krogerus Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20201210085008.13264-4-Sergey.Semin@baikalelectronics.ru Cc: stable Signed-off-by: Greg Kroah-Hartman commit fca3f138105727c3a22edda32d02f91ce1bf11c9 Author: Serge Semin Date: Thu Dec 10 11:50:07 2020 +0300 usb: dwc3: ulpi: Replace CPU-based busyloop with Protocol-based one Originally the procedure of the ULPI transaction finish detection has been developed as a simple busy-loop with just decrementing counter and no delays. It's wrong since on different systems the loop will take a different time to complete. So if the system bus and CPU are fast enough to overtake the ULPI bus and the companion PHY reaction, then we'll get to take a false timeout error. Fix this by converting the busy-loop procedure to take the standard bus speed, address value and the registers access mode into account for the busy-loop delay calculation. Here is the way the fix works. It's known that the ULPI bus is clocked with 60MHz signal. In accordance with [1] the ULPI bus protocol is created so to spend 5 and 6 clock periods for immediate register write and read operations respectively, and 6 and 7 clock periods - for the extended register writes and reads. Based on that we can easily pre-calculate the time which will be needed for the controller to perform a requested IO operation. Note we'll still preserve the attempts counter in case if the DWC USB3 controller has got some internals delays. [1] UTMI+ Low Pin Interface (ULPI) Specification, Revision 1.1, October 20, 2004, pp. 30 - 36. Fixes: 88bc9d194ff6 ("usb: dwc3: add ULPI interface support") Acked-by: Heikki Krogerus Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20201210085008.13264-3-Sergey.Semin@baikalelectronics.ru Cc: stable Signed-off-by: Greg Kroah-Hartman commit ce722da66d3e9384aa2de9d33d584ee154e5e157 Author: Serge Semin Date: Thu Dec 10 11:50:06 2020 +0300 usb: dwc3: ulpi: Use VStsDone to detect PHY regs access completion In accordance with [1] the DWC_usb3 core sets the GUSB2PHYACCn.VStsDone bit when the PHY vendor control access is done and clears it when the application initiates a new transaction. The doc doesn't say anything about the GUSB2PHYACCn.VStsBsy flag serving for the same purpose. Moreover we've discovered that the VStsBsy flag can be cleared before the VStsDone bit. So using the former as a signal of the PHY control registers completion might be dangerous. Let's have the VStsDone flag utilized instead then. [1] Synopsys DesignWare Cores SuperSpeed USB 3.0 xHCI Host Controller Databook, 2.70a, December 2013, p.388 Fixes: 88bc9d194ff6 ("usb: dwc3: add ULPI interface support") Acked-by: Heikki Krogerus Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20201210085008.13264-2-Sergey.Semin@baikalelectronics.ru Cc: stable Signed-off-by: Greg Kroah-Hartman commit 372c93131998c0622304bed118322d2a04489e63 Author: Johan Hovold Date: Mon Dec 14 11:30:53 2020 +0100 USB: yurex: fix control-URB timeout handling Make sure to always cancel the control URB in write() so that it can be reused after a timeout or spurious CMD_ACK. Currently any further write requests after a timeout would fail after triggering a WARN() in usb_submit_urb() when attempting to submit the already active URB. Reported-by: syzbot+e87ebe0f7913f71f2ea5@syzkaller.appspotmail.com Fixes: 6bc235a2e24a ("USB: add driver for Meywa-Denki & Kayac YUREX") Cc: stable # 2.6.37 Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman commit 83a43ff80a566de8718dfc6565545a0080ec1fb5 Author: Yu Kuai Date: Tue Nov 17 09:14:30 2020 +0800 usb: chipidea: ci_hdrc_imx: add missing put_device() call in usbmisc_get_init_data() if of_find_device_by_node() succeed, usbmisc_get_init_data() doesn't have a corresponding put_device(). Thus add put_device() to fix the exception handling for this function implementation. Fixes: ef12da914ed6 ("usb: chipidea: imx: properly check for usbmisc") Signed-off-by: Yu Kuai Cc: stable Link: https://lore.kernel.org/r/20201117011430.642589-1-yukuai3@huawei.com Signed-off-by: Greg Kroah-Hartman commit 0a88fa221ce911c331bf700d2214c5b2f77414d3 Author: Manish Narani Date: Tue Nov 17 12:43:35 2020 +0530 usb: gadget: u_ether: Fix MTU size mismatch with RX packet size Fix the MTU size issue with RX packet size as the host sends the packet with extra bytes containing ethernet header. This causes failure when user sets the MTU size to the maximum i.e. 15412. In this case the ethernet packet received will be of length 15412 plus the ethernet header length. This patch fixes the issue where there is a check that RX packet length must not be more than max packet length. Fixes: bba787a860fa ("usb: gadget: ether: Allow jumbo frames") Signed-off-by: Manish Narani Cc: stable Link: https://lore.kernel.org/r/1605597215-122027-1-git-send-email-manish.narani@xilinx.com Signed-off-by: Greg Kroah-Hartman commit c91d3a6bcaa031f551ba29a496a8027b31289464 Author: Yang Yingliang Date: Tue Nov 17 17:29:55 2020 +0800 USB: gadget: legacy: fix return error code in acm_ms_bind() If usb_otg_descriptor_alloc() failed, it need return ENOMEM. Fixes: 578aa8a2b12c ("usb: gadget: acm_ms: allocate and init otg descriptor by otg capabilities") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Cc: stable Link: https://lore.kernel.org/r/20201117092955.4102785-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman commit 5cc35c224a80aa5a5a539510ef049faf0d6ed181 Author: Sriharsha Allenki Date: Wed Dec 2 18:32:20 2020 +0530 usb: gadget: Fix spinlock lockup on usb_function_deactivate There is a spinlock lockup as part of composite_disconnect when it tries to acquire cdev->lock as part of usb_gadget_deactivate. This is because the usb_gadget_deactivate is called from usb_function_deactivate with the same spinlock held. This would result in the below call stack and leads to stall. rcu: INFO: rcu_preempt detected stalls on CPUs/tasks: rcu: 3-...0: (1 GPs behind) idle=162/1/0x4000000000000000 softirq=10819/10819 fqs=2356 (detected by 2, t=5252 jiffies, g=20129, q=3770) Task dump for CPU 3: task:uvc-gadget_wlhe state:R running task stack: 0 pid: 674 ppid: 636 flags:0x00000202 Call trace: __switch_to+0xc0/0x170 _raw_spin_lock_irqsave+0x84/0xb0 composite_disconnect+0x28/0x78 configfs_composite_disconnect+0x68/0x70 usb_gadget_disconnect+0x10c/0x128 usb_gadget_deactivate+0xd4/0x108 usb_function_deactivate+0x6c/0x80 uvc_function_disconnect+0x20/0x58 uvc_v4l2_release+0x30/0x88 v4l2_release+0xbc/0xf0 __fput+0x7c/0x230 ____fput+0x14/0x20 task_work_run+0x88/0x140 do_notify_resume+0x240/0x6f0 work_pending+0x8/0x200 Fix this by doing an unlock on cdev->lock before the usb_gadget_deactivate call from usb_function_deactivate. The same lockup can happen in the usb_gadget_activate path. Fix that path as well. Reported-by: Peter Chen Link: https://lore.kernel.org/linux-usb/20201102094936.GA29581@b29397-desktop/ Tested-by: Peter Chen Signed-off-by: Sriharsha Allenki Cc: stable Link: https://lore.kernel.org/r/20201202130220.24926-1-sallenki@codeaurora.org Signed-off-by: Greg Kroah-Hartman commit 2cc332e4ee4febcbb685e2962ad323fe4b3b750a Author: Zqiang Date: Thu Dec 10 10:01:48 2020 +0800 usb: gadget: function: printer: Fix a memory leak for interface descriptor When printer driver is loaded, the printer_func_bind function is called, in this function, the interface descriptor be allocated memory, if after that, the error occurred, the interface descriptor memory need to be free. Reviewed-by: Peter Chen Cc: Signed-off-by: Zqiang Link: https://lore.kernel.org/r/20201210020148.6691-1-qiang.zhang@windriver.com Signed-off-by: Greg Kroah-Hartman commit a5ada3dfe6a20f41f91448b9034a1ef8da3dc87d Author: Zheng Zengkai Date: Tue Dec 15 10:54:59 2020 +0800 usb: dwc3: meson-g12a: disable clk on error handling path in probe dwc3_meson_g12a_probe() does not invoke clk_bulk_disable_unprepare() on one error handling path. This patch fixes that. Fixes: 347052e3bf1b ("usb: dwc3: meson-g12a: fix USB2 PHY initialization on G12A and A1 SoCs") Reported-by: Hulk Robot Signed-off-by: Zheng Zengkai Cc: stable Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20201215025459.91794-1-zhengzengkai@huawei.com Signed-off-by: Greg Kroah-Hartman commit 5d5323a6f3625f101dbfa94ba3ef7706cce38760 Author: Michael Grzeschik Date: Tue Dec 15 20:31:47 2020 +0100 USB: xhci: fix U1/U2 handling for hardware with XHCI_INTEL_HOST quirk set The commit 0472bf06c6fd ("xhci: Prevent U1/U2 link pm states if exit latency is too long") was constraining the xhci code not to allow U1/U2 sleep states if the latency to wake up from the U-states reached the service interval of an periodic endpoint. This fix was not taking into account that in case the quirk XHCI_INTEL_HOST is set, the wakeup time will be calculated and configured differently. It checks for u1_params.mel/u2_params.mel as a limit. But the code could decide to write another MEL into the hardware. This leads to broken cases where not enough bandwidth is available for other devices: usb 1-2: can't set config #1, error -28 This patch is fixing that case by checking for timeout_ns after the wakeup time was calculated depending on the quirks. Fixes: 0472bf06c6fd ("xhci: Prevent U1/U2 link pm states if exit latency is too long") Signed-off-by: Michael Grzeschik Cc: stable Link: https://lore.kernel.org/r/20201215193147.11738-1-m.grzeschik@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 0f041b8592daaaea46e91a8ebb3b47e6e0171fd8 Author: Madhusudanarao Amara Date: Wed Dec 16 19:39:18 2020 +0530 usb: typec: intel_pmc_mux: Configure HPD first for HPD+IRQ request Warm reboot scenarios some times type C Mux driver gets Mux configuration request as HPD=1,IRQ=1. In that scenario typeC Mux driver need to configure Mux as follows as per IOM requirement: (1). Confgiure Mux HPD = 1, IRQ = 0 (2). Configure Mux with HPD = 1, IRQ = 1 IOM expects TypeC Mux configuration as follows: (1). HPD=1, IRQ=0 (2). HPD=1, IRQ=1 if IOM gets mux config request (2) without configuring (1), it will ignore the request. The impact of this is there is no DP_alt mode display. Fixes: 43d596e32276 ("usb: typec: intel_pmc_mux: Check the port status before connect") Cc: stable@vger.kernel.org Reviewed-by: Heikki Krogerus Signed-off-by: Madhusudanarao Amara Link: https://lore.kernel.org/r/20201216140918.49197-1-madhusudanarao.amara@intel.com Signed-off-by: Greg Kroah-Hartman commit 5e5ff0b4b6bcb4d17b7a26ec8bcfc7dd4651684f Author: Tetsuo Handa Date: Sun Dec 20 00:25:53 2020 +0900 USB: cdc-wdm: Fix use after free in service_outstanding_interrupt(). syzbot is reporting UAF at usb_submit_urb() [1], for service_outstanding_interrupt() is not checking WDM_DISCONNECTING before calling usb_submit_urb(). Close the race by doing same checks wdm_read() does upon retry. Also, while wdm_read() checks WDM_DISCONNECTING with desc->rlock held, service_interrupt_work() does not hold desc->rlock. Thus, it is possible that usb_submit_urb() is called from service_outstanding_interrupt() from service_interrupt_work() after WDM_DISCONNECTING was set and kill_urbs() from wdm_disconnect() completed. Thus, move kill_urbs() in wdm_disconnect() to after cancel_work_sync() (which makes sure that service_interrupt_work() is no longer running) completed. Although it seems to be safe to dereference desc->intf->dev in service_outstanding_interrupt() even if WDM_DISCONNECTING was already set because desc->rlock or cancel_work_sync() prevents wdm_disconnect() from reaching list_del() before service_outstanding_interrupt() completes, let's not emit error message if WDM_DISCONNECTING is set by wdm_disconnect() while usb_submit_urb() is in progress. [1] https://syzkaller.appspot.com/bug?extid=9e04e2df4a32fb661daf Reported-by: syzbot Signed-off-by: Tetsuo Handa Cc: stable Link: https://lore.kernel.org/r/620e2ee0-b9a3-dbda-a25b-a93e0ed03ec5@i-love.sakura.ne.jp Signed-off-by: Greg Kroah-Hartman commit a390bef7db1f192cc5b588dbcf8ed113406ec130 Author: Fabio Estevam Date: Thu Dec 10 18:04:13 2020 -0300 usb: gadget: fsl_mxc_udc: Remove the driver Since 5.10-rc1 i.MX is a devicetree-only platform, and this driver was only used by the old non-DT i.MX devices. Remove the driver as it has no users left. Signed-off-by: Fabio Estevam Acked-by: Peter Chen Link: https://lore.kernel.org/r/20201210210413.15262-1-festevam@gmail.com Signed-off-by: Greg Kroah-Hartman commit 88ebce92806e5dff3549e1a8cacb53978104d3b4 Author: Aswath Govindraju Date: Tue Dec 15 09:55:49 2020 +0530 dt-bindings: usb: Add new compatible string for AM64 SoC Add compatible string in j721e-usb binding file as the same USB subsystem is present in AM64. Reviewed-by: Rob Herring Signed-off-by: Aswath Govindraju Link: https://lore.kernel.org/r/20201215042549.7956-1-a-govindraju@ti.com Signed-off-by: Greg Kroah-Hartman commit 421da9413a6a5ec4334cade5092370cf2c8c8add Author: Roger Quadros Date: Fri Dec 18 12:57:36 2020 +0200 MAINTAINERS: Update address for Cadence USB3 driver Updates my email address for Cadence USB3 driver. Signed-off-by: Roger Quadros Link: https://lore.kernel.org/r/20201218105736.17667-1-rogerq@ti.com Signed-off-by: Greg Kroah-Hartman commit 0ffc76539e6e8d28114f95ac25c167c37b5191b3 Author: Sean Young Date: Sun Dec 27 13:45:02 2020 +0000 USB: cdc-acm: blacklist another IR Droid device This device is supported by the IR Toy driver. Reported-by: Georgi Bakalski Signed-off-by: Sean Young Acked-by: Oliver Neukum Cc: stable Link: https://lore.kernel.org/r/20201227134502.4548-2-sean@mess.org Signed-off-by: Greg Kroah-Hartman commit 1f092d1c8819679d78a7d9c62a46d4939d217a9d Author: Jaroslav Kysela Date: Sun Dec 27 17:41:09 2020 +0100 ASoC: AMD Renoir - add DMI entry for Lenovo ThinkPad X395 The ThinkPad X395 latop does not have the internal digital microphone connected to the AMD's ACP bridge, but it's advertised via BIOS. The internal microphone is connected to the HDA codec. Use DMI to block the microphone PCM device for this platform. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1892115 Cc: Signed-off-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20201227164109.269973-1-perex@perex.cz Signed-off-by: Mark Brown commit a523e1538fdd5f00ea3289cc0b3c6c1785b89814 Author: Ravulapati Vishnu vardhan rao Date: Tue Dec 22 17:29:18 2020 +0530 ASoC: amd: Replacing MSI with Legacy IRQ model When we try to play and capture simultaneously we see that interrupts are genrated but our handler is not being acknowledged, After investigating further more in detail on this issue we found that IRQ delivery via MSI from the ACP IP is unreliable and so sometimes interrupt generated will not be acknowledged so MSI model shouldn't be used and using legacy IRQs will resolve interrupt handling issue. This patch replaces MSI interrupt handling with legacy IRQ model. Issue can be reproduced easily by running below python script: import subprocess import time import threading def do2(): cmd = 'aplay -f dat -D hw:2,1 /dev/zero -d 1' subprocess.call(cmd, stdin=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) print('Play Done') def run(): for i in range(1000): do2() def do(i): cmd = 'arecord -f dat -D hw:2,2 /dev/null -d 1' subprocess.call(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) print(datetime.datetime.now(), i) t = threading.Thread(target=run) t.start() for i in range(1000): do(i) t.join() After applying this patch issue is resolved. Signed-off-by: Ravulapati Vishnu vardhan rao Link: https://lore.kernel.org/r/20201222115929.11222-1-Vishnuvardhanrao.Ravulapati@amd.com Signed-off-by: Mark Brown commit 275565997ade6fc32be9cd49a910ba996bcb4797 Author: Jaroslav Kysela Date: Sun Dec 27 17:40:37 2020 +0100 ASoC: AMD Renoir - add DMI entry for Lenovo ThinkPad E14 Gen 2 The ThinkPad E14 Gen 2 latop does not have the internal digital microphone connected to the AMD's ACP bridge, but it's advertised via BIOS. The internal microphone is connected to the HDA codec. Use DMI to block the microphone PCM device for this platform. Reported-by: Eliot Blennerhassett Signed-off-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20201227164037.269893-1-perex@perex.cz Signed-off-by: Mark Brown commit 8db90aa36063f471bea1e65e23185913043852dc Merge: a590370d918fc 5c8fe583cce54 Author: Mark Brown Date: Mon Dec 28 14:20:15 2020 +0000 Merge tag 'v5.11-rc1' into spi-5.11 Linux 5.11-rc1 commit 2ae6f64ce1ce304b502461fdfe0b96c8171ae2cc Merge: 3b66e4a8e58a8 5c8fe583cce54 Author: Mark Brown Date: Mon Dec 28 14:20:00 2020 +0000 Merge tag 'v5.11-rc1' into regulator-5.11 Linux 5.11-rc1 commit f81325a05e9317f09a2e4ec57a52e4e49eb42b54 Merge: 671ee4db95244 5c8fe583cce54 Author: Mark Brown Date: Mon Dec 28 14:16:53 2020 +0000 Merge tag 'v5.11-rc1' into asoc-5.11 Linux 5.11-rc1 commit d887d6104adeb94d1b926936ea21f07367f0ff9f Author: Christophe JAILLET Date: Sun Dec 13 16:35:13 2020 +0100 staging: mt7621-dma: Fix a resource leak in an error handling path If an error occurs after calling 'mtk_hsdma_init()', it must be undone by a corresponding call to 'mtk_hsdma_uninit()' as already done in the remove function. Fixes: 0853c7a53eb3 ("staging: mt7621-dma: ralink: add rt2880 dma engine") Signed-off-by: Christophe JAILLET Cc: stable Link: https://lore.kernel.org/r/20201213153513.138723-1-christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit cab36da4bf1a35739b091b73714a39a1bbd02b05 Author: Dan Carpenter Date: Wed Dec 2 09:43:49 2020 +0300 Staging: comedi: Return -EFAULT if copy_to_user() fails Return -EFAULT on error instead of the number of bytes remaining to be copied. Fixes: bac42fb21259 ("comedi: get rid of compat_alloc_user_space() mess in COMEDI_CMD{,TEST} compat") Signed-off-by: Dan Carpenter Cc: stable Link: https://lore.kernel.org/r/X8c3pfwFy2jpy4BP@mwanda Signed-off-by: Greg Kroah-Hartman commit 12b38ea040b3bb2a30eb9cd488376df5be7ea81f Author: Christophe JAILLET Date: Sun Dec 13 16:11:05 2020 +0100 staging: spmi: hisi-spmi-controller: Fix some error handling paths IN the probe function, if an error occurs after calling 'spmi_controller_alloc()', it must be undone by a corresponding 'spmi_controller_put() call. In the remove function, use 'spmi_controller_put(ctrl)' instead of 'kfree(ctrl)'. While a it fix an error message (s/spmi_add_controller/spmi_controller_add/) Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/20201213151105.137731-1-christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit 67288f74d4837b82ef937170da3389b0779c17be Author: Martin Kepplinger Date: Mon Dec 28 14:03:02 2020 +0200 interconnect: imx8mq: Use icc_sync_state Add the icc_sync_state callback to notify the framework when consumers are probed and the bandwidth doesn't have to be kept at maximum anymore. Signed-off-by: Martin Kepplinger Suggested-by: Georgi Djakov Fixes: 7d3b0b0d8184 ("interconnect: qcom: Use icc_sync_state") Link: https://lore.kernel.org/r/20201210100906.18205-6-martin.kepplinger@puri.sm Signed-off-by: Georgi Djakov commit 6414b79d02c426b7dd7d942fc19fb38220ea44ec Author: Christophe JAILLET Date: Mon Dec 28 14:03:02 2020 +0200 interconnect: imx: Remove a useless test 'dn' can't be NULL here, it is tested just the line above. Remove this useless test. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/20201206121322.29434-1-christophe.jaillet@wanadoo.fr Signed-off-by: Georgi Djakov commit c6174c0e058fc0a54e0b9787c44cb24b0a8d0217 Author: Christophe JAILLET Date: Mon Dec 28 14:03:02 2020 +0200 interconnect: imx: Add a missing of_node_put after of_device_is_available Add an 'of_node_put()' call when a tested device node is not available. Fixes: f0d8048525d7 ("interconnect: Add imx core driver") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/20201206121304.29381-1-christophe.jaillet@wanadoo.fr Signed-off-by: Georgi Djakov commit 512d4a26abdbd11c6ffa03032740e5ab3c62c55b Author: Arnd Bergmann Date: Mon Dec 28 14:03:02 2020 +0200 interconnect: qcom: fix rpmh link failures When CONFIG_COMPILE_TEST is set, it is possible to build some of the interconnect drivers into the kernel while their dependencies are loadable modules, which is bad: arm-linux-gnueabi-ld: drivers/interconnect/qcom/bcm-voter.o: in function `qcom_icc_bcm_voter_commit': (.text+0x1f8): undefined reference to `rpmh_invalidate' arm-linux-gnueabi-ld: (.text+0x20c): undefined reference to `rpmh_write_batch' arm-linux-gnueabi-ld: (.text+0x2b0): undefined reference to `rpmh_write_batch' arm-linux-gnueabi-ld: (.text+0x2e8): undefined reference to `rpmh_write_batch' arm-linux-gnueabi-ld: drivers/interconnect/qcom/icc-rpmh.o: in function `qcom_icc_bcm_init': (.text+0x2ac): undefined reference to `cmd_db_read_addr' arm-linux-gnueabi-ld: (.text+0x2c8): undefined reference to `cmd_db_read_aux_data' The exact dependencies are a bit complicated, so split them out into a hidden Kconfig symbol that all drivers can in turn depend on to get it right. Fixes: 976daac4a1c5 ("interconnect: qcom: Consolidate interconnect RPMh support") Signed-off-by: Arnd Bergmann Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20201204165030.3747484-1-arnd@kernel.org Signed-off-by: Georgi Djakov commit 2ca408d9c749c32288bc28725f9f12ba30299e8f Author: Brian Gerst Date: Mon Nov 30 17:30:59 2020 -0500 fanotify: Fix sys_fanotify_mark() on native x86-32 Commit 121b32a58a3a ("x86/entry/32: Use IA32-specific wrappers for syscalls taking 64-bit arguments") converted native x86-32 which take 64-bit arguments to use the compat handlers to allow conversion to passing args via pt_regs. sys_fanotify_mark() was however missed, as it has a general compat handler. Add a config option that will use the syscall wrapper that takes the split args for native 32-bit. [ bp: Fix typo in Kconfig help text. ] Fixes: 121b32a58a3a ("x86/entry/32: Use IA32-specific wrappers for syscalls taking 64-bit arguments") Reported-by: Paweł Jasiak Signed-off-by: Brian Gerst Signed-off-by: Borislav Petkov Acked-by: Jan Kara Acked-by: Andy Lutomirski Link: https://lkml.kernel.org/r/20201130223059.101286-1-brgerst@gmail.com commit b4e70d8dd9ea6bd5d5fb3122586f652326ca09cd Author: Pablo Neira Ayuso Date: Sun Dec 27 12:35:43 2020 +0100 netfilter: nftables: add set expression flags The set flag NFT_SET_EXPR provides a hint to the kernel that userspace supports for multiple expressions per set element. In the same direction, NFT_DYNSET_F_EXPR specifies that dynset expression defines multiple expressions per set element. This allows new userspace software with old kernels to bail out with EOPNOTSUPP. This update is similar to ef516e8625dd ("netfilter: nf_tables: reintroduce the NFT_SET_CONCAT flag"). The NFT_SET_EXPR flag needs to be set on when the NFTA_SET_EXPRESSIONS attribute is specified. The NFT_SET_EXPR flag is not set on with NFTA_SET_EXPR to retain backward compatibility in old userspace binaries. Fixes: 48b0ae046ee9 ("netfilter: nftables: netlink support for several set element expressions") Signed-off-by: Pablo Neira Ayuso commit 95cd4bca7b1f4a25810f3ddfc5e767fb46931789 Author: Pablo Neira Ayuso Date: Sun Dec 27 12:33:44 2020 +0100 netfilter: nft_dynset: report EOPNOTSUPP on missing set feature If userspace requests a feature which is not available the original set definition, then bail out with EOPNOTSUPP. If userspace sends unsupported dynset flags (new feature not supported by this kernel), then report EOPNOTSUPP to userspace. EINVAL should be only used to report malformed netlink messages from userspace. Fixes: 22fe54d5fefc ("netfilter: nf_tables: add support for dynamic set updates") Signed-off-by: Pablo Neira Ayuso commit 097c62b6f0ec2bdadf86afbe80df03856338724d Author: Oded Gabbay Date: Tue Dec 22 15:21:07 2020 +0200 habanalabs: fix order of status check When the device is in reset or needs to be reset, the disabled property is don't-care. Signed-off-by: Oded Gabbay commit fcaebc7354188b0d708c79df4390fbabd4d9799d Author: Oded Gabbay Date: Mon Dec 14 12:52:06 2020 +0200 habanalabs: register to pci shutdown callback We need to make sure our device is idle when rebooting a virtual machine. This is done in the driver level. The firmware will later handle FLR but we want to be extra safe and stop the devices until the FLR is handled. Signed-off-by: Oded Gabbay commit a3fd28306329e8e82efab973aafe81e9001dcf6f Author: Alon Mizrahi Date: Tue Dec 8 16:14:01 2020 +0200 habanalabs: add validation cs counter, fix misplaced counters Up until now validation errors were counted in the parsing field of the cs_counters struct, so we added a new counter and increased it when needed. In addition, there were some locations where only one of the counters was updated (ctx or aggregate) so add the second one to be updated as well. Signed-off-by: Alon Mizrahi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 98e8781f008372057bd5cb059ca6b507371e473d Author: Oded Gabbay Date: Wed Dec 9 23:07:58 2020 +0200 habanalabs/gaudi: retry loading TPC f/w on -EINTR If loading the firmware file for the TPC f/w was interrupted, try to do it again, up to 5 times. Signed-off-by: Oded Gabbay commit 377182a3cc5ae6cc17fb04d06864c975f9f71c18 Author: Oded Gabbay Date: Wed Dec 9 19:50:46 2020 +0200 habanalabs: adjust pci controller init to new firmware When the firmware security is enabled, the pcie_aux_dbi_reg_addr register in the PCI controller is blocked. Therefore, ignore the result of writing to this register and assume it worked. Also remove the prints on errors in the internal ELBI write function. If the security is enabled, the firmware is responsible for setting this register correctly so we won't have any problem. If the security is disabled, the write will work (unless something is totally broken at the PCI level and then the whole sequence will fail). In addition, remove a write to register pcie_aux_dbi_reg_addr+4, which was never actually needed. Moreover, PCIE_DBI registers are blocked to access from host when firmware security is enabled. Use a different register to flush the writes. Signed-off-by: Oded Gabbay commit 90ffe170a390d5a620f8fe66758514e369e85d24 Author: Oded Gabbay Date: Tue Dec 8 16:52:48 2020 +0200 habanalabs: update comment in hl_boot_if.h Hard-reset flag is updated in many stages of the boot sequence of the firmware. Signed-off-by: Oded Gabbay commit 13d0ee10b55ecec01fd3c91e086e4f3ba75a7911 Author: Oded Gabbay Date: Sun Dec 6 23:48:45 2020 +0200 habanalabs/gaudi: enhance reset message Print the initiator who performs the hard-reset for easier debugging. Signed-off-by: Oded Gabbay commit 6bbb77b9e6f0bd5595724b7c0cb1189afdd133d3 Author: Ofir Bitton Date: Sun Dec 6 14:00:35 2020 +0200 habanalabs: full FW hard reset support Driver must fetch FW hard reset capability at every FW boot stage: preboot, CPU boot, CPU application. If hard reset is triggered, driver will take into consideration only the last capability received. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 0024c094851f718ccb0b797255292bdce850a01f Author: Oded Gabbay Date: Sat Dec 5 22:55:09 2020 +0200 habanalabs/gaudi: disable CGM at HW initialization In case the clock gating was enabled in preboot we need to disable it at the H/W initialization stage before touching the MME/TPC registers. Otherwise, the ASIC can get stuck. If the security is enabled in the firmware level, the CGM is always disabled and the driver can't enable it. Signed-off-by: Oded Gabbay commit 7a585dfc32110a106f70474c6fa822d912a92c7e Author: Tomer Tayar Date: Mon Nov 30 14:56:06 2020 +0200 habanalabs: Revise comment to align with mirror list name hw_queues_mirror was renamed to cs_mirror, so revise accordingly a comment that refers to this list. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 72ab9ca52de6856380c26b2045aa826ae4308b76 Author: Alon Mizrahi Date: Wed Dec 2 19:55:30 2020 +0200 habanalabs/gaudi: do not set EB in collective slave queues We don't need to set EB on signal packets from collective slave queues as it degrades performance. Because the slaves are the network queues, the engine barrier doesn't actually guarantee that the packet has been sent. Signed-off-by: Alon Mizrahi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 9c9013cbd8338ff8eac732d115c9005bc512cbc5 Author: Ofir Bitton Date: Tue Dec 1 10:39:54 2020 +0200 habanalabs: preboot hard reset support FW hard reset capability indication is now moved to preboot stage. Driver will check if HW is dirty only after it validated preboot is up. If HW is dirty, driver will perform a hard reset according to the FW capability. In addition, FW defines a new message which driver need to send in order to initiate a hard reset. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 6585489e808d9964dbde9dad89ac8e792e1185fc Author: Alon Mizrahi Date: Thu Nov 19 16:34:19 2020 +0200 habanalabs: remove generic gaudi get_pll_freq function As we only fetch the CPU_PLL frequency in gaudi, we don't need a generic get_pll_frequency function which takes a pll index as input Signed-off-by: Alon Mizrahi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 4783489951b78525a6e61b43936cbbd88b7938af Author: Alon Mizrahi Date: Thu Nov 26 13:05:20 2020 +0200 habanalabs: fetch PSOC PLL frequency from F/W in goya When the F/W security is enabled, goya needs to fetch the PSOC pll frequency through a dedicated interface Signed-off-by: Alon Mizrahi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 429f1571e8f0b14ec42b8fb14efcfc0576b2788f Author: Alon Mizrahi Date: Tue Dec 1 18:44:11 2020 +0200 habanalabs: add comment for pll frequency ioctl opcode Forgot to add the comment for the opcode when it was added. Signed-off-by: Alon Mizrahi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 105b5ca9b1e38a8db8446a493ca062eea98171eb Author: Tomer Tayar Date: Mon Nov 30 16:36:30 2020 +0200 habanalabs: Fix a missing-braces warning Fix a compilation "missing braces around initializer" warning. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 0e1d9ca1766f5d95fb881f57b6c4a1ffa63d4648 Author: Viresh Kumar Date: Mon Dec 28 10:51:04 2020 +0530 opp: Call the missing clk_put() on error Fix the clock reference counting by calling the missing clk_put() in the error path. Cc: v5.10 # v5.10 Fixes: dd461cd9183f ("opp: Allow dev_pm_opp_get_opp_table() to return -EPROBE_DEFER") Signed-off-by: Viresh Kumar commit 976509bb310b913d30577f15b58bdd30effb0542 Author: Quanyang Wang Date: Thu Dec 24 18:49:27 2020 +0800 opp: fix memory leak in _allocate_opp_table In function _allocate_opp_table, opp_dev is allocated and referenced by opp_table via _add_opp_dev. But in the case that the subsequent calls return -EPROBE_DEFER, it will jump to err label and opp_table will be freed. Then opp_dev becomes an unreferenced object to cause memory leak. So let's call _remove_opp_dev to do the cleanup. This fixes the following kmemleak report: unreferenced object 0xffff000801524a00 (size 128): comm "swapper/0", pid 1, jiffies 4294892465 (age 84.616s) hex dump (first 32 bytes): 40 00 56 01 08 00 ff ff 40 00 56 01 08 00 ff ff @.V.....@.V..... b8 52 77 7f 08 00 ff ff 00 3c 4c 00 08 00 ff ff .Rw......] kmemleak_alloc+0x30/0x40 [<0000000056da48f0>] kmem_cache_alloc+0x3d4/0x588 [<00000000a84b3b0e>] _add_opp_dev+0x2c/0x88 [<0000000062a380cd>] _add_opp_table_indexed+0x124/0x268 [<000000008b4c8f1f>] dev_pm_opp_of_add_table+0x20/0x1d8 [<00000000e5316798>] dev_pm_opp_of_cpumask_add_table+0x48/0xf0 [<00000000db0a8ec2>] dt_cpufreq_probe+0x20c/0x448 [<0000000030a3a26c>] platform_probe+0x68/0xd8 [<00000000c618e78d>] really_probe+0xd0/0x3a0 [<00000000642e856f>] driver_probe_device+0x58/0xb8 [<00000000f10f5307>] device_driver_attach+0x74/0x80 [<0000000004f254b8>] __driver_attach+0x58/0xe0 [<0000000009d5d19e>] bus_for_each_dev+0x70/0xc8 [<0000000000d22e1c>] driver_attach+0x24/0x30 [<0000000001d4e952>] bus_add_driver+0x14c/0x1f0 [<0000000089928aaa>] driver_register+0x64/0x120 Cc: v5.10 # v5.10 Fixes: dd461cd9183f ("opp: Allow dev_pm_opp_get_opp_table() to return -EPROBE_DEFER") Signed-off-by: Quanyang Wang [ Viresh: Added the stable tag ] Signed-off-by: Viresh Kumar commit 5c8fe583cce542aa0b84adc939ce85293de36e5e Author: Linus Torvalds Date: Sun Dec 27 15:30:22 2020 -0800 Linux 5.11-rc1 commit 14e3e989f6a5d9646b6cf60690499cc8bdc11f7d Author: Linus Torvalds Date: Sun Dec 27 10:56:33 2020 -0800 proc mountinfo: make splice available again Since commit 36e2c7421f02 ("fs: don't allow splice read/write without explicit ops") we've required that file operation structures explicitly enable splice support, rather than falling back to the default handlers. Most /proc files use the indirect 'struct proc_ops' to describe their file operations, and were fixed up to support splice earlier in commits 40be821d627c..b24c30c67863, but the mountinfo files interact with the VFS directly using their own 'struct file_operations' and got missed as a result. This adds the necessary support for splice to work for /proc/*/mountinfo and friends. Reported-by: Joan Bruguera Micó Reported-by: Jussi Kivilinna Link: https://bugzilla.kernel.org/show_bug.cgi?id=209971 Cc: Greg Kroah-Hartman Cc: Christoph Hellwig Signed-off-by: Linus Torvalds commit 52cd5f9c22eeef26d05f9d9338ba4eb38f14dd3a Merge: 33c148a4ae7dc 75b6f6487cedd Author: Linus Torvalds Date: Sun Dec 27 09:22:55 2020 -0800 Merge tag 'ntb-5.11' of git://github.com/jonmason/ntb Pull NTB fixes from Jon Mason: "Bug fix for IDT NTB and Intel NTB LTR management support" * tag 'ntb-5.11' of git://github.com/jonmason/ntb: ntb: intel: add Intel NTB LTR vendor support for gen4 NTB ntb: idt: fix error check in ntb_hw_idt.c commit 33c148a4ae7dc3cd440f6c0d746ac7f0ff320682 Merge: cce622ab9284a c0e583ab2016d Author: Linus Torvalds Date: Sun Dec 27 09:14:32 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: "Fix a number of autobuild failures due to missing Kconfig dependencies" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: qat - add CRYPTO_AES to Kconfig dependencies crypto: keembay - Add dependency on HAS_IOMEM crypto: keembay - CRYPTO_DEV_KEEMBAY_OCS_AES_SM4 should depend on ARCH_KEEMBAY commit cce622ab9284a27257dd75bb35eccdd619bf96d1 Merge: 6be5f58215f1d 44f6a7c0755d8 Author: Linus Torvalds Date: Sun Dec 27 09:08:23 2020 -0800 Merge tag 'objtool-urgent-2020-12-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool fix from Ingo Molnar: "Fix a segfault that occurs when built with Clang" * tag 'objtool-urgent-2020-12-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool: Fix seg fault with Clang non-section symbols commit 6be5f58215f1dcbd697a695ad5db9986c28c50c3 Merge: 2eeefc60ad70f 91ea62d58bd66 Author: Linus Torvalds Date: Sun Dec 27 09:06:10 2020 -0800 Merge tag 'locking-urgent-2020-12-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fixes from Ingo Molnar: "Misc fixes/updates: - Fix static keys usage in module __init sections - Add separate MAINTAINERS entry for static branches/calls - Fix lockdep splat with CONFIG_PREEMPTIRQ_EVENTS=y tracing" * tag 'locking-urgent-2020-12-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: softirq: Avoid bad tracing / lockdep interaction jump_label/static_call: Add MAINTAINERS jump_label: Fix usage in module __init commit 2eeefc60ad70ffb7a5daf9f47aef5b1ebd1f39ad Merge: 3b80dee70eaa5 f6f5cd840ae78 Author: Linus Torvalds Date: Sun Dec 27 09:03:41 2020 -0800 Merge tag 'timers-urgent-2020-12-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fixes from Ingo Molnar: "Update/fix two CPU sanity checks in the hotplug and the boot code, and fix a typo in the Kconfig help text. [ Context: the first two commits are the result of an ongoing annotation+review work of (intentional) tick_do_timer_cpu() data races reported by KCSAN, but the annotations aren't fully cooked yet ]" * tag 'timers-urgent-2020-12-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: timekeeping: Fix spelling mistake in Kconfig "fullfill" -> "fulfill" tick/sched: Remove bogus boot "safety" check tick: Remove pointless cpu valid check in hotplug code commit 3b80dee70eaa5f9a120db058c30cc8e63c443571 Merge: f838f8d2b694c ae7927023243d Author: Linus Torvalds Date: Sun Dec 27 09:00:47 2020 -0800 Merge tag 'sched-urgent-2020-12-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fix from Ingo Molnar: "Fix a context switch performance regression" * tag 'sched-urgent-2020-12-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched: Optimize finish_lock_switch() commit 101068b566ef227b605d807aad9e72efd8b6bc5b Author: Marc Zyngier Date: Sun Dec 27 14:28:34 2020 +0000 KVM: arm64: Consolidate dist->ready setting into kvm_vgic_map_resources() dist->ready setting is pointlessly spread across the two vgic backends, while it could be consolidated in kvm_vgic_map_resources(). Move it there, and slightly simplify the flows in both backends. Suggested-by: Eric Auger Signed-off-by: Marc Zyngier commit 282ff80135717cc43f1e33ddd4b0cd9e760d060b Author: Alexandru Elisei Date: Tue Dec 1 15:01:57 2020 +0000 KVM: arm64: Remove redundant call to kvm_pmu_vcpu_reset() KVM_ARM_VCPU_INIT ioctl calls kvm_reset_vcpu(), which in turn resets the PMU with a call to kvm_pmu_vcpu_reset(). The function zeroes the PMU chained counters bitmap and stops all the counters with a perf event attached. Because it is called before the VCPU has had the chance to run, no perf events are in use and none are released. kvm_arm_pmu_v3_enable(), called by kvm_vcpu_first_run_init() only if the VCPU has been initialized, also resets the PMU. kvm_pmu_vcpu_reset() in this case does the exact same thing as the previous call, so remove it. Signed-off-by: Alexandru Elisei Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201201150157.223625-6-alexandru.elisei@arm.com commit 9e5c23b9bd71d00b07720b2a8037b019d356e9df Author: Alexandru Elisei Date: Tue Dec 1 15:01:56 2020 +0000 KVM: arm64: Update comment in kvm_vgic_map_resources() vgic_v3_map_resources() returns -EBUSY if the VGIC isn't initialized, update the comment to kvm_vgic_map_resources() to match what the function does. Signed-off-by: Alexandru Elisei Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201201150157.223625-5-alexandru.elisei@arm.com commit 6cb56218ad9e580e519dcd23bfb3db08d8692e5a Author: Florian Westphal Date: Tue Dec 22 23:23:56 2020 +0100 netfilter: xt_RATEEST: reject non-null terminated string from userspace syzbot reports: detected buffer overflow in strlen [..] Call Trace: strlen include/linux/string.h:325 [inline] strlcpy include/linux/string.h:348 [inline] xt_rateest_tg_checkentry+0x2a5/0x6b0 net/netfilter/xt_RATEEST.c:143 strlcpy assumes src is a c-string. Check info->name before its used. Reported-by: syzbot+e86f7c428c8c50db65b4@syzkaller.appspotmail.com Fixes: 5859034d7eb8793 ("[NETFILTER]: x_tables: add RATEEST target") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit e13a6915a03ffc3ce332d28c141a335e25187fa3 Author: Stefano Garzarella Date: Wed Dec 23 15:36:38 2020 +0100 vhost/vsock: add IOTLB API support This patch enables the IOTLB API support for vhost-vsock devices, allowing the userspace to emulate an IOMMU for the guest. These changes were made following vhost-net, in details this patch: - exposes VIRTIO_F_ACCESS_PLATFORM feature and inits the iotlb device if the feature is acked - implements VHOST_GET_BACKEND_FEATURES and VHOST_SET_BACKEND_FEATURES ioctls - calls vq_meta_prefetch() before vq processing to prefetch vq metadata address in IOTLB - provides .read_iter, .write_iter, and .poll callbacks for the chardev; they are used by the userspace to exchange IOTLB messages This patch was tested specifying "intel_iommu=strict" in the guest kernel command line. I used QEMU with a patch applied [1] to fix a simple issue (that patch was merged in QEMU v5.2.0): $ qemu -M q35,accel=kvm,kernel-irqchip=split \ -drive file=fedora.qcow2,format=qcow2,if=virtio \ -device intel-iommu,intremap=on,device-iotlb=on \ -device vhost-vsock-pci,guest-cid=3,iommu_platform=on,ats=on [1] https://lists.gnu.org/archive/html/qemu-devel/2020-10/msg09077.html Reviewed-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella Link: https://lore.kernel.org/r/20201223143638.123417-1-sgarzare@redhat.com Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit f838f8d2b694cf9d524dc4423e9dd2db13892f3f Author: Linus Torvalds Date: Sat Dec 26 09:19:49 2020 -0800 mfd: ab8500-debugfs: Remove extraneous seq_putc Commit c9a3c4e637ac ("mfd: ab8500-debugfs: Remove extraneous curly brace") removed a left-over curly brace that caused build failures, but Joe Perches points out that the subsequent 'seq_putc()' should also be removed, because the commit that caused all these problems already added the final '\n' to the seq_printf() above it. Reported-by: Joe Perches Fixes: 886c8121659d ("mfd: ab8500-debugfs: Remove the racy fiddling with irq_desc") Cc: Thomas Gleixner Cc: Nathan Chancellor Signed-off-by: Linus Torvalds commit 40f78232f97344afbbeb5b0008615f17c4b93466 Merge: c9a3c4e637ac2 99e629f14b471 Author: Linus Torvalds Date: Fri Dec 25 20:17:40 2020 -0800 Merge tag 'pci-v5.11-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas: - Fix a tegra enumeration regression (Rob Herring) - Fix a designware-host check that warned on *success*, not failure (Alexander Lobakin) * tag 'pci-v5.11-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: dwc: Fix inverted condition of DMA mask setup warning PCI: tegra: Fix host link initialization commit c9a3c4e637ac2dce534f7e9e5a80aed93410ccad Author: Nathan Chancellor Date: Fri Dec 25 18:35:49 2020 -0700 mfd: ab8500-debugfs: Remove extraneous curly brace Clang errors: drivers/mfd/ab8500-debugfs.c:1526:2: error: non-void function does not return a value [-Werror,-Wreturn-type] } ^ drivers/mfd/ab8500-debugfs.c:1528:2: error: expected identifier or '(' return 0; ^ drivers/mfd/ab8500-debugfs.c:1529:1: error: extraneous closing brace ('}') } ^ 3 errors generated. The cleanup in ab8500_interrupts_show left a curly brace around, remove it to fix the error. Fixes: 886c8121659d ("mfd: ab8500-debugfs: Remove the racy fiddling with irq_desc") Signed-off-by: Nathan Chancellor Signed-off-by: Linus Torvalds commit 99e629f14b471d852d28ecf554093c4730ed0927 Author: Alexander Lobakin Date: Tue Dec 22 15:07:43 2020 +0000 PCI: dwc: Fix inverted condition of DMA mask setup warning Commit 660c486590aa ("PCI: dwc: Set 32-bit DMA mask for MSI target address allocation") added dma_mask_set() call to explicitly set 32-bit DMA mask for MSI message mapping, but for now it throws a warning on ret == 0, while dma_set_mask() returns 0 in case of success. Fix this by inverting the condition. [bhelgaas: join string to make it greppable] Fixes: 660c486590aa ("PCI: dwc: Set 32-bit DMA mask for MSI target address allocation") Link: https://lore.kernel.org/r/20201222150708.67983-1-alobakin@pm.me Signed-off-by: Alexander Lobakin Signed-off-by: Bjorn Helgaas commit 275e88b06a277ccf89d9c471a777e9b4f8c552b0 Author: Rob Herring Date: Fri Dec 18 08:39:05 2020 -0600 PCI: tegra: Fix host link initialization Commit b9ac0f9dc8ea ("PCI: dwc: Move dw_pcie_setup_rc() to DWC common code") broke enumeration of downstream devices on Tegra: In non-working case (next-20201211): 0001:00:00.0 PCI bridge: NVIDIA Corporation Device 1ad2 (rev a1) 0001:01:00.0 SATA controller: Marvell Technology Group Ltd. Device 9171 (rev 13) 0005:00:00.0 PCI bridge: NVIDIA Corporation Device 1ad0 (rev a1) In working case (v5.10-rc7): 0001:00:00.0 PCI bridge: Molex Incorporated Device 1ad2 (rev a1) 0001:01:00.0 SATA controller: Marvell Technology Group Ltd. Device 9171 (rev 13) 0005:00:00.0 PCI bridge: Molex Incorporated Device 1ad0 (rev a1) 0005:01:00.0 PCI bridge: PLX Technology, Inc. Device 3380 (rev ab) 0005:02:02.0 PCI bridge: PLX Technology, Inc. Device 3380 (rev ab) 0005:03:00.0 USB controller: PLX Technology, Inc. Device 3380 (rev ab) The problem seems to be dw_pcie_setup_rc() is now called twice before and after the link up handling. The fix is to move Tegra's link up handling to .start_link() function like other DWC drivers. Tegra is a bit more complicated than others as it re-inits the whole DWC controller to retry the link. With this, the initialization ordering is restored to match the prior sequence. Fixes: b9ac0f9dc8ea ("PCI: dwc: Move dw_pcie_setup_rc() to DWC common code") Link: https://lore.kernel.org/r/20201218143905.1614098-1-robh@kernel.org Reported-by: Mian Yousaf Kaukab Tested-by: Mian Yousaf Kaukab Signed-off-by: Rob Herring Signed-off-by: Bjorn Helgaas Cc: Lorenzo Pieralisi Cc: Thierry Reding Cc: Jonathan Hunter Cc: Vidya Sagar commit 61d791365b72a89062fbbea69aa61479476da946 Author: Linus Torvalds Date: Fri Dec 25 15:41:13 2020 -0800 drm/amd/display: avoid uninitialized variable warning clang (quite rightly) complains fairly loudly about the newly added mpc1_get_mpc_out_mux() function returning an uninitialized value if the 'opp_id' checks don't pass. This may not happen in practice, but the code really shouldn't return garbage if the sanity checks don't pass. So just initialize 'val' to zero to avoid the issue. Fixes: 110b055b2827 ("drm/amd/display: add getter routine to retrieve mpcc mux") Cc: Josip Pavic Cc: Bindu Ramamurthy Cc: Alex Deucher Signed-off-by: Linus Torvalds commit 5814bc2d4cc241c1a603fac2b5bf1bd4daa108fc Merge: 42dc45e84452c 5149303fdfe5c Author: Linus Torvalds Date: Fri Dec 25 11:07:34 2020 -0800 Merge tag 'perf-tools-2020-12-24' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull more perf tools updates from Arnaldo Carvalho de Melo: - Refactor 'perf stat' per CPU/socket/die/thread aggregation fixing use cases in ARM machines. - Fix memory leak when synthesizing SDT probes in 'perf probe'. - Update kernel header copies related to KVM, epol_pwait. msr-index and powerpc and s390 syscall tables. * tag 'perf-tools-2020-12-24' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: (24 commits) perf probe: Fix memory leak when synthesizing SDT probes perf stat aggregation: Add separate thread member perf stat aggregation: Add separate core member perf stat aggregation: Add separate die member perf stat aggregation: Add separate socket member perf stat aggregation: Add separate node member perf stat aggregation: Start using cpu_aggr_id in map perf cpumap: Drop in cpu_aggr_map struct perf cpumap: Add new map type for aggregation perf stat: Replace aggregation ID with a struct perf cpumap: Add new struct for cpu aggregation perf cpumap: Use existing allocator to avoid using malloc perf tests: Improve topology test to check all aggregation types perf tools: Update s390's syscall.tbl copy from the kernel sources perf tools: Update powerpc's syscall.tbl copy from the kernel sources perf s390: Move syscall.tbl check into check-headers.sh perf powerpc: Move syscall.tbl check to check-headers.sh tools headers UAPI: Synch KVM's svm.h header with the kernel tools kvm headers: Update KVM headers from the kernel sources tools headers UAPI: Sync KVM's vmx.h header with the kernel sources ... commit 42dc45e84452c1ee72c482d477a2e71c0689b143 Merge: 11cc92eb747aa d8f6e5c6c8373 Author: Linus Torvalds Date: Fri Dec 25 11:05:32 2020 -0800 Merge branch 'for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux Pull coccinelle updates from Julia Lawall. * 'for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux: scripts: coccicheck: Correct usage of make coccicheck coccinelle: update expiring email addresses coccinnelle: Remove ptr_ret script kbuild: do not use scripts/ld-version.sh for checking spatch version remove boolinit.cocci commit 11cc92eb747aace5aa2b54b65b5cb8325a8981de Author: Michael Ellerman Date: Fri Dec 25 22:30:58 2020 +1100 genirq: Fix export of irq_to_desc() for powerpc KVM Commit 64a1b95bb9fe ("genirq: Restrict export of irq_to_desc()") removed the export of irq_to_desc() unless powerpc KVM is being built, because there is still a use of irq_to_desc() in modular code there. However it used: #ifdef CONFIG_KVM_BOOK3S_64_HV Which doesn't work when that symbol is =m, leading to a build failure: ERROR: modpost: "irq_to_desc" [arch/powerpc/kvm/kvm-hv.ko] undefined! Fix it by checking for the definedness of the correct symbol which is CONFIG_KVM_BOOK3S_64_HV_MODULE. Fixes: 64a1b95bb9fe ("genirq: Restrict export of irq_to_desc()") Signed-off-by: Michael Ellerman Signed-off-by: Linus Torvalds commit 7bb5226c8a4bbf26a9ededc90532b0ad539d2017 Merge: 71c5f03154ac1 2e2cbaf920d14 Author: Linus Torvalds Date: Fri Dec 25 10:54:29 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: "Assorted patches from previous cycle(s)..." * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fix hostfs_open() use of ->f_path.dentry Make sure that make_create_in_sticky() never sees uninitialized value of dir_mode fs: Kill DCACHE_DONTCACHE dentry even if DCACHE_REFERENCED is set fs: Handle I_DONTCACHE in iput_final() instead of generic_drop_inode() fs/namespace.c: WARN if mnt_count has become negative commit 71c5f03154ac1cb27423b984743ccc2f5d11d14d Merge: 555a6e8c11e62 c635b0cea6b81 Author: Linus Torvalds Date: Thu Dec 24 14:20:33 2020 -0800 Merge tag 'docs-5.11-2' of git://git.lwn.net/linux Pull documentation fixes from Jonathan Corbet: "A small set of late-arriving, small documentation fixes" * tag 'docs-5.11-2' of git://git.lwn.net/linux: docs: admin-guide: Fix default value of max_map_count in sysctl/vm.rst Documentation/submitting-patches: Document the SoB chain Documentation: process: Correct numbering docs: submitting-patches: Trivial - fix grammatical error commit 555a6e8c11e6282bb2704ef1cee64ceaeb41773e Merge: 2f2fce3d53577 be993933d2e99 Author: Linus Torvalds Date: Thu Dec 24 14:16:02 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: "Various bug fixes and cleanups for ext4; no new features this cycle" * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (29 commits) ext4: remove unnecessary wbc parameter from ext4_bio_write_page ext4: avoid s_mb_prefetch to be zero in individual scenarios ext4: defer saving error info from atomic context ext4: simplify ext4 error translation ext4: move functions in super.c ext4: make ext4_abort() use __ext4_error() ext4: standardize error message in ext4_protect_reserved_inode() ext4: remove redundant sb checksum recomputation ext4: don't remount read-only with errors=continue on reboot ext4: fix deadlock with fs freezing and EA inodes jbd2: add a helper to find out number of fast commit blocks ext4: make fast_commit.h byte identical with e2fsprogs/fast_commit.h ext4: fix fall-through warnings for Clang ext4: add docs about fast commit idempotence ext4: remove the unused EXT4_CURRENT_REV macro ext4: fix an IS_ERR() vs NULL check ext4: check for invalid block size early when mounting a file system ext4: fix a memory leak of ext4_free_data ext4: delete nonsensical (commented-out) code inside ext4_xattr_block_set() ext4: update ext4_data_block_valid related comments ... commit 2f2fce3d535779cb1b0d77ce839029d5d875d4f4 Merge: 7a2fde8def1ff 942cb357ae7d9 Author: Linus Torvalds Date: Thu Dec 24 14:08:43 2020 -0800 Merge tag 'Smack-for-5.11-io_uring-fix' of git://github.com/cschaufler/smack-next Pull smack fix from Casey Schaufler: "Provide a fix for the incorrect handling of privilege in the face of io_uring's use of kernel threads. That invalidated an long standing assumption regarding the privilege of kernel threads. The fix is simple and safe. It was provided by Jens Axboe and has been tested" * tag 'Smack-for-5.11-io_uring-fix' of git://github.com/cschaufler/smack-next: Smack: Handle io_uring kernel thread privileges commit 7a2fde8def1fffceda728d2441d7e69230478285 Merge: 9b3f7f1b841e9 de043da0b9e71 Author: Linus Torvalds Date: Thu Dec 24 14:05:05 2020 -0800 Merge tag 'riscv-for-linus-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fix from Palmer Dabbelt "Avoid trying to initialize memory regions outside the usable range" * tag 'riscv-for-linus-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: RISC-V: Fix usage of memblock_enforce_memory_limit commit 9b3f7f1b841e91f0f0414525fa6edaaa2df33ccb Merge: 3913d00ac51a9 d5c243989fb0c Author: Linus Torvalds Date: Thu Dec 24 14:02:00 2020 -0800 Merge tag 'powerpc-5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - Four commits fixing various things in the new C VDSO code - One fix for a 32-bit VMAP stack bug - Two minor build fixes Thanks to Cédric Le Goater, Christophe Leroy, and Will Springer. * tag 'powerpc-5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/32: Fix vmap stack - Properly set r1 before activating MMU on syscall too powerpc/vdso: Fix DOTSYM for 32-bit LE VDSO powerpc/vdso: Don't pass 64-bit ABI cflags to 32-bit VDSO powerpc/vdso: Block R_PPC_REL24 relocations powerpc/smp: Add __init to init_big_cores() powerpc/time: Force inlining of get_tb() powerpc/boot: Fix build of dts/fsl commit 3913d00ac51a9d93225eeea776026326ff8f717d Merge: 4a1106afeed26 64a1b95bb9fe3 Author: Linus Torvalds Date: Thu Dec 24 13:50:23 2020 -0800 Merge tag 'irq-core-2020-12-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq updates from Thomas Gleixner: "This is the second attempt after the first one failed miserably and got zapped to unblock the rest of the interrupt related patches. A treewide cleanup of interrupt descriptor (ab)use with all sorts of racy accesses, inefficient and disfunctional code. The goal is to remove the export of irq_to_desc() to prevent these things from creeping up again" * tag 'irq-core-2020-12-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (30 commits) genirq: Restrict export of irq_to_desc() xen/events: Implement irq distribution xen/events: Reduce irq_info:: Spurious_cnt storage size xen/events: Only force affinity mask for percpu interrupts xen/events: Use immediate affinity setting xen/events: Remove disfunct affinity spreading xen/events: Remove unused bind_evtchn_to_irq_lateeoi() net/mlx5: Use effective interrupt affinity net/mlx5: Replace irq_to_desc() abuse net/mlx4: Use effective interrupt affinity net/mlx4: Replace irq_to_desc() abuse PCI: mobiveil: Use irq_data_get_irq_chip_data() PCI: xilinx-nwl: Use irq_data_get_irq_chip_data() NTB/msi: Use irq_has_action() mfd: ab8500-debugfs: Remove the racy fiddling with irq_desc pinctrl: nomadik: Use irq_has_action() drm/i915/pmu: Replace open coded kstat_irqs() copy drm/i915/lpe_audio: Remove pointless irq_to_desc() usage s390/irq: Use irq_desc_kstat_cpu() in show_msi_interrupt() parisc/irq: Use irq_desc_kstat_cpu() in show_interrupts() ... commit 4a1106afeed26012de69f4837b8d7a8b83f28489 Merge: 60e8edd2513ab 3dcb8b53cbd2c Author: Linus Torvalds Date: Thu Dec 24 12:40:07 2020 -0800 Merge tag 'efi_updates_for_v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI updates from Borislav Petkov: "These got delayed due to a last minute ia64 build issue which got fixed in the meantime. EFI updates collected by Ard Biesheuvel: - Don't move BSS section around pointlessly in the x86 decompressor - Refactor helper for discovering the EFI secure boot mode - Wire up EFI secure boot to IMA for arm64 - Some fixes for the capsule loader - Expose the RT_PROP table via the EFI test module - Relax DT and kernel placement restrictions on ARM with a few followup fixes: - fix the build breakage on IA64 caused by recent capsule loader changes - suppress a type mismatch build warning in the expansion of EFI_PHYS_ALIGN on ARM" * tag 'efi_updates_for_v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: efi: arm: force use of unsigned type for EFI_PHYS_ALIGN efi: ia64: disable the capsule loader efi: stub: get rid of efi_get_max_fdt_addr() efi/efi_test: read RuntimeServicesSupported efi: arm: reduce minimum alignment of uncompressed kernel efi: capsule: clean scatter-gather entries from the D-cache efi: capsule: use atomic kmap for transient sglist mappings efi: x86/xen: switch to efi_get_secureboot_mode helper arm64/ima: add ima_arch support ima: generalize x86/EFI arch glue for other EFI architectures efi: generalize efi_get_secureboot efi/libstub: EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER should not default to yes efi/x86: Only copy the compressed kernel image in efi_relocate_kernel() efi/libstub/x86: simplify efi_is_native() commit 60e8edd2513abffdb6d4a9b5affca7f9dd5ec73d Merge: 771e7e4161053 c07e6719511e7 Author: Linus Torvalds Date: Thu Dec 24 12:35:00 2020 -0800 Merge tag 'io_uring-5.11-2020-12-23' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: "All straight fixes, or a prep patch for a fix, either bound for stable or fixing issues from this merge window. In particular: - Fix new shutdown op not breaking links on failure - Hold mm->mmap_sem for mm->locked_vm manipulation - Various cancelation fixes (me, Pavel) - Fix error path potential double ctx free (Pavel) - IOPOLL fixes (Xiaoguang)" * tag 'io_uring-5.11-2020-12-23' of git://git.kernel.dk/linux-block: io_uring: hold uring_lock while completing failed polled io in io_wq_submit_work() io_uring: fix double io_uring free io_uring: fix ignoring xa_store errors io_uring: end waiting before task cancel attempts io_uring: always progress task_work on task cancel io-wq: kill now unused io_wq_cancel_all() io_uring: make ctx cancel on exit targeted to actual ctx io_uring: fix 0-iov read buffer select io_uring: close a small race gap for files cancel io_uring: fix io_wqe->work_list corruption io_uring: limit {io|sq}poll submit locking scope io_uring: inline io_cqring_mark_overflow() io_uring: consolidate CQ nr events calculation io_uring: remove racy overflow list fast checks io_uring: cancel reqs shouldn't kill overflow list io_uring: hold mmap_sem for mm->locked_vm manipulation io_uring: break links on shutdown failure commit 771e7e4161053e606592b9cd056ef7e2ea2316d5 Merge: 1f13d2f7d8a40 46926127d7635 Author: Linus Torvalds Date: Thu Dec 24 12:28:35 2020 -0800 Merge tag 'block-5.11-2020-12-23' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "A few stragglers in here, but mostly just straight fixes. In particular: - Set of rnbd fixes for issues around changes for the merge window (Gioh, Jack, Md Haris Iqbal) - iocost tracepoint addition (Baolin) - Copyright/maintainers update (Christoph) - Remove old blk-mq fast path CPU warning (Daniel) - loop max_part fix (Josh) - Remote IPI threaded IRQ fix (Sebastian) - dasd stable fixes (Stefan) - bcache merge window fixup and style fixup (Yi, Zheng)" * tag 'block-5.11-2020-12-23' of git://git.kernel.dk/linux-block: md/bcache: convert comma to semicolon bcache:remove a superfluous check in register_bcache block: update some copyrights block: remove a pointless self-reference in block_dev.c MAINTAINERS: add fs/block_dev.c to the block section blk-mq: Don't complete on a remote CPU in force threaded mode s390/dasd: fix list corruption of lcu list s390/dasd: fix list corruption of pavgroup group list s390/dasd: prevent inconsistent LCU device data s390/dasd: fix hanging device offline processing blk-iocost: Add iocg idle state tracepoint nbd: Respect max_part for all partition scans block/rnbd-clt: Does not request pdu to rtrs-clt block/rnbd-clt: Dynamically allocate sglist for rnbd_iu block/rnbd: Set write-back cache and fua same to the target device block/rnbd: Fix typos block/rnbd-srv: Protect dev session sysfs removal block/rnbd-clt: Fix possible memleak block/rnbd-clt: Get rid of warning regarding size argument in strlcpy blk-mq: Remove 'running from the wrong CPU' warning commit 1f13d2f7d8a407be09e841f17805b2451271d493 Merge: ef2c8b81b8886 127c3d2e7e8a7 Author: Linus Torvalds Date: Thu Dec 24 12:18:11 2020 -0800 Merge tag 'libnvdimm-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm updates from Dan Williams: "Twas the day before Christmas and the only thing stirring in libnvdimm / device-dax land is a pile of miscellaneous fixups and cleanups. The bulk of it has appeared in -next save the last two patches to device-dax that have passed my build and unit tests. - Fix a long standing block-window-namespace issue surfaced by the ndctl change to attempt to preserve the kernel device name over a 'reconfigure' - Fix a few error path memory leaks in nfit and device-dax - Silence a smatch warning in the ioctl path - Miscellaneous cleanups" * tag 'libnvdimm-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: device-dax: Avoid an unnecessary check in alloc_dev_dax_range() device-dax: Fix range release device-dax: delete a redundancy check in dev_dax_validate_align() libnvdimm/label: Return -ENXIO for no slot in __blk_label_update device-dax/core: Fix memory leak when rmmod dax.ko device-dax/pmem: Convert comma to semicolon libnvdimm: Cleanup include of badblocks.h ACPI: NFIT: Fix input validation of bus-family libnvdimm/namespace: Fix reaping of invalidated block-window-namespace labels ACPI/nfit: avoid accessing uninitialized memory in acpi_nfit_ctl() commit ef2c8b81b88868f042579b9dd021cc9edbc2d0c6 Merge: 14571d5f22d3f 5b2fc08c455bb Author: Linus Torvalds Date: Thu Dec 24 12:14:29 2020 -0800 Merge tag 'drm-next-2020-12-24' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Xmas eve pull request present. Just some fixes that trickled in this past week: Mostly amdgpu fixes, with a dma-buf/mips build fix and some misc komeda fixes. dma-buf: - fix build on mips komeda: - fix commit tail operation order - NULL pointer fix - out of bounds access fix ttm: - remove an unused function amdgpu: - Vangogh SMU fixes - Arcturus gfx9 fixes - Misc display fixes - Sienna Cichlid SMU update - Fix S3 display memory leak - Fix regression caused by DP sub-connector support amdkfd: - Properly require pcie atomics for gfx10" * tag 'drm-next-2020-12-24' of git://anongit.freedesktop.org/drm/drm: (31 commits) drm/amd/display: Fix memory leaks in S3 resume drm/amdgpu: Fix a copy-pasta comment drm/amdgpu: only set DP subconnector type on DP and eDP connectors drm/amd/pm: bump Sienna Cichlid smu_driver_if version to match latest pmfw drm/amd/display: add getter routine to retrieve mpcc mux drm/amd/display: always program DPPDTO unless not safe to lower drm/amd/display: [FW Promotion] Release 0.0.47 drm/amd/display: updated wm table for Renoir drm/amd/display: Acquire DSC during split stream for ODM only if top_pipe drm/amd/display: Multi-display underflow observed drm/amd/display: Remove unnecessary NULL check drm/amd/display: Update RN/VGH active display count workaround drm/amd/display: change SMU repsonse timeout to 2s. drm/amd/display: gradually ramp ABM intensity drm/amd/display: To modify the condition in indicating branch device drm/amd/display: Modify the hdcp device count check condition drm/amd/display: Interfaces for hubp blank and soft reset drm/amd/display: handler not correctly checked at remove_irq_handler drm/amdgpu: check gfx pipe availability before toggling its interrupts drm/amdgpu: remove unnecessary asic type check ... commit 14571d5f22d3f7f6ecb97e037a2e346b3fb488bd Merge: 64145482d3339 2b8f061a4f505 Author: Linus Torvalds Date: Thu Dec 24 12:09:48 2020 -0800 Merge tag 'devicetree-fixes-for-5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree fixes from Rob Herring: - Correct the JSON pointer syntax in binding schemas - Drop unnecessary *-supply schema constraints - Drop redundant maxItems/items on array schemas - Fix various yamllint warnings - Fix various missing 'additionalProperties' properties * tag 'devicetree-fixes-for-5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: dt-bindings: Drop redundant maxItems/items dt-bindings: net: qcom,ipa: Drop unnecessary type ref on 'memory-region' dt-bindings: Drop unnecessary *-supply schemas properties dt-bindings/display: abt,y030xx067a: Fix binding dt-bindings: clock: imx8qxp-lpcg: eliminate yamllint warnings dt-bindings: display: eliminate yamllint warnings dt-bindings: media: nokia,smia: eliminate yamllint warnings dt-bindings: devapc: add the required property 'additionalProperties' dt-bindings: soc: add the required property 'additionalProperties' dt-bindings: serial: add the required property 'additionalProperties' dt-bindings: xlnx,vcu-settings: fix dt_binding_check warnings media: dt-bindings: coda: Add missing 'additionalProperties' dt-bindings: Fix JSON pointers commit 64145482d3339d71f58857591d021588040543f4 Merge: 58cf05f597b03 418eddef050d5 Author: Linus Torvalds Date: Thu Dec 24 12:06:46 2020 -0800 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio updates from Michael Tsirkin: - vdpa sim refactoring - virtio mem: Big Block Mode support - misc cleanus, fixes * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (61 commits) vdpa: Use simpler version of ida allocation vdpa: Add missing comment for virtqueue count uapi: virtio_ids: add missing device type IDs from OASIS spec uapi: virtio_ids.h: consistent indentions vhost scsi: fix error return code in vhost_scsi_set_endpoint() virtio_ring: Fix two use after free bugs virtio_net: Fix error code in probe() virtio_ring: Cut and paste bugs in vring_create_virtqueue_packed() tools/virtio: add barrier for aarch64 tools/virtio: add krealloc_array tools/virtio: include asm/bug.h vdpa/mlx5: Use write memory barrier after updating CQ index vdpa: split vdpasim to core and net modules vdpa_sim: split vdpasim_virtqueue's iov field in out_iov and in_iov vdpa_sim: make vdpasim->buffer size configurable vdpa_sim: use kvmalloc to allocate vdpasim->buffer vdpa_sim: set vringh notify callback vdpa_sim: add set_config callback in vdpasim_dev_attr vdpa_sim: add get_config callback in vdpasim_dev_attr vdpa_sim: make 'config' generic and usable for any device type ... commit 127c3d2e7e8a79628160e56e54d2be099bdd47c6 Merge: 4c46764733c85 ff8da37d3d8d4 Author: Dan Williams Date: Thu Dec 24 10:14:04 2020 -0800 Merge branch 'for-5.11/dax' into for-5.11/libnvdimm Pull in miscellaneous device-dax fixups and cleanups for v5.11. commit ff8da37d3d8d438ded5a4841d979899269b94d0d Author: Zhen Lei Date: Sat Dec 19 16:18:40 2020 +0800 device-dax: Avoid an unnecessary check in alloc_dev_dax_range() Swap the calling sequence of krealloc() and __request_region(), call the latter first. In this way, the value of dev_dax->nr_range does not need to be considered when __request_region() failed. Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20201219081840.1149-2-thunder.leizhen@huawei.com Signed-off-by: Dan Williams commit 6268d7da4d192af339f4d688942b9ccb45a65e04 Author: Dan Williams Date: Fri Dec 18 18:41:41 2020 -0800 device-dax: Fix range release There are multiple locations that open-code the release of the last range in a device-dax instance. Consolidate this into a new dev_dax_trim_range() helper. This also addresses a kmemleak report: # cat /sys/kernel/debug/kmemleak [..] unreferenced object 0xffff976bd46f6240 (size 64): comm "ndctl", pid 23556, jiffies 4299514316 (age 5406.733s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 20 c3 37 00 00 00 .......... .7... ff ff ff 7f 38 00 00 00 00 00 00 00 00 00 00 00 ....8........... backtrace: [<00000000064003cf>] __kmalloc_track_caller+0x136/0x379 [<00000000d85e3c52>] krealloc+0x67/0x92 [<00000000d7d3ba8a>] __alloc_dev_dax_range+0x73/0x25c [<0000000027d58626>] devm_create_dev_dax+0x27d/0x416 [<00000000434abd43>] __dax_pmem_probe+0x1c9/0x1000 [dax_pmem_core] [<0000000083726c1c>] dax_pmem_probe+0x10/0x1f [dax_pmem] [<00000000b5f2319c>] nvdimm_bus_probe+0x9d/0x340 [libnvdimm] [<00000000c055e544>] really_probe+0x230/0x48d [<000000006cabd38e>] driver_probe_device+0x122/0x13b [<0000000029c7b95a>] device_driver_attach+0x5b/0x60 [<0000000053e5659b>] bind_store+0xb7/0xc3 [<00000000d3bdaadc>] drv_attr_store+0x27/0x31 [<00000000949069c5>] sysfs_kf_write+0x4a/0x57 [<000000004a8b5adf>] kernfs_fop_write+0x150/0x1e5 [<00000000bded60f0>] __vfs_write+0x1b/0x34 [<00000000b92900f0>] vfs_write+0xd8/0x1d1 Reported-by: Jane Chu Cc: Zhen Lei Link: https://lore.kernel.org/r/160834570161.1791850.14911670304441510419.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams commit 5149303fdfe5c67ddb51c911e23262f781cd75eb Author: Arnaldo Carvalho de Melo Date: Thu Dec 24 10:52:10 2020 -0300 perf probe: Fix memory leak when synthesizing SDT probes The argv_split() function must be paired with argv_free(), else we must keep a reference to the argv array received or do the freeing ourselves, in synthesize_sdt_probe_command() we were simply leaking that argv[] array. Fixes: 3b1f8311f6963cd1 ("perf probe: Add sdt probes arguments into the uprobe cmd string") Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Truong Cc: Alexis Berlemont Cc: He Zhe Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Sumanth Korikkar Cc: Thomas Richter Cc: Will Deacon Link: https://lore.kernel.org/r/20201224135139.GF477817@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 8d4852b468c38168c4e1e1652602b4a6c6c080b3 Author: James Clark Date: Thu Nov 26 16:13:28 2020 +0200 perf stat aggregation: Add separate thread member A separate field isn't strictly required. The core field could be re-used for thread IDs as a single field was used previously. But separating them will avoid confusion and catch potential errors where core IDs are read as thread IDs and vice versa. Also remove the placeholder id field which is now no longer used. Signed-off-by: James Clark Acked-by: Namhyung Kim Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Tested-by: John Garry Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Mark Rutland Cc: Peter Zijlstra Cc: Thomas Richter Link: https://lore.kernel.org/r/20201126141328.6509-13-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit b993381779da406ca9ca0ae1e1b3968e9075ce77 Author: James Clark Date: Thu Nov 26 16:13:27 2020 +0200 perf stat aggregation: Add separate core member Add core as a separate member so that it doesn't have to be packed into the int value. Signed-off-by: James Clark Acked-by: Namhyung Kim Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Tested-by: John Garry Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Mark Rutland Cc: Peter Zijlstra Cc: Thomas Richter Link: https://lore.kernel.org/r/20201126141328.6509-12-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit ba2ee166d92b201078cb941956547ab9828989d3 Author: James Clark Date: Thu Nov 26 16:13:26 2020 +0200 perf stat aggregation: Add separate die member Add die as a separate member so that it doesn't have to be packed into the int value. Signed-off-by: James Clark Acked-by: Namhyung Kim Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Tested-by: John Garry Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Mark Rutland Cc: Peter Zijlstra Cc: Thomas Richter Link: https://lore.kernel.org/r/20201126141328.6509-11-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit 1a270cb6b3cc18663f7fd165aa691c48d68739f2 Author: James Clark Date: Thu Nov 26 16:13:25 2020 +0200 perf stat aggregation: Add separate socket member Add socket as a separate member so that it doesn't have to be packed into the int value. When the socket ID was larger than 8 bits the output appeared corrupted or incomplete. For example, here on ThunderX2 'perf stat' reports a socket of -1 and an invalid die number: ./perf stat -a --per-die The socket id number is too big. Performance counter stats for 'system wide': S-1-D255 128 687.99 msec cpu-clock # 57.240 CPUs utilized ... S36-D0 128 842.34 msec cpu-clock # 70.081 CPUs utilized ... And with --per-core there is an entry with an invalid core ID: ./perf stat record -a --per-core The socket id number is too big. Performance counter stats for 'system wide': S-1-D255-C65535 128 671.04 msec cpu-clock # 54.112 CPUs utilized ... S36-D0-C0 4 28.27 msec cpu-clock # 2.279 CPUs utilized ... This fixes the "Session topology" self test on ThunderX2. After this fix the output contains the correct socket and die IDs and no longer prints a warning about the size of the socket ID: ./perf stat --per-die -a Performance counter stats for 'system wide': S36-D0 128 169,869.39 msec cpu-clock # 127.501 CPUs utilized ... S3612-D0 128 169,733.05 msec cpu-clock # 127.398 CPUs utilized Signed-off-by: James Clark Acked-by: Namhyung Kim Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Tested-by: John Garry Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Mark Rutland Cc: Peter Zijlstra Cc: Thomas Richter Link: https://lore.kernel.org/r/20201126141328.6509-10-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit fcd83a35dd93b89d3f48cfcd33c31b112cc96180 Author: James Clark Date: Thu Nov 26 16:13:24 2020 +0200 perf stat aggregation: Add separate node member Add node as a separate member so that it doesn't have to be packed into the int value. Signed-off-by: James Clark Acked-by: Namhyung Kim Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Tested-by: John Garry Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Mark Rutland Cc: Peter Zijlstra Cc: Thomas Richter Link: https://lore.kernel.org/r/20201126141328.6509-9-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit ff5232956e074994a66656f709c3ad1ee3d8a550 Author: James Clark Date: Thu Nov 26 16:13:23 2020 +0200 perf stat aggregation: Start using cpu_aggr_id in map Use the new cpu_aggr_id struct in the cpu map instead of int so that it can store more data. No functional changes. Signed-off-by: James Clark Acked-by: Namhyung Kim Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Tested-by: John Garry Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Mark Rutland Cc: Alexander Shishkin Cc: Thomas Richter Link: https://lore.kernel.org/r/20201126141328.6509-8-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit d526e1a033e03ec4515b1800f99d99a35c7ea790 Author: James Clark Date: Thu Nov 26 16:13:22 2020 +0200 perf cpumap: Drop in cpu_aggr_map struct Replace usages of perf_cpu_map with cpu_aggr map in places that are involved with 'perf stat' aggregation. This will then later be changed to be a map of cpu_aggr_id rather than an int so that more data can be stored. No functional changes. Signed-off-by: James Clark Acked-by: Namhyung Kim Acked-by: Jiri Olsa Tested-by: John Garry Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Mark Rutland Cc: Alexander Shishkin Cc: Thomas Richter Link: https://lore.kernel.org/r/20201126141328.6509-7-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit cea6575fdccfc0624ca42f656e16e6b4d9bb48a5 Author: James Clark Date: Thu Nov 26 16:13:21 2020 +0200 perf cpumap: Add new map type for aggregation Currently this is a duplicate of perf_cpu_map so that it can be used as a drop in replacement. In a later commit it will be changed from a map of ints to use the new cpu_aggr_id struct. No functional changes. Signed-off-by: James Clark Acked-by: Namhyung Kim Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Tested-by: John Garry Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Mark Rutland Cc: Peter Zijlstra Cc: Thomas Richter Link: https://lore.kernel.org/r/20201126141328.6509-6-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit 2760f5a14fe7aa466e38bbb92d0284fffc0e4da0 Author: James Clark Date: Thu Nov 26 16:13:20 2020 +0200 perf stat: Replace aggregation ID with a struct Replace all occurences of the usage of int with the new struct cpu_aggr_id. No functional changes. Signed-off-by: James Clark Acked-by: Namhyung Kim Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Tested-by: John Garry Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Mark Rutland Cc: Peter Zijlstra Cc: Thomas Richter Link: https://lore.kernel.org/r/20201126141328.6509-5-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit fa265e59b81a09fa3d88f3322b1e44d583cac9b0 Author: James Clark Date: Thu Nov 26 16:13:19 2020 +0200 perf cpumap: Add new struct for cpu aggregation This struct currently has only a single int member so that it can be used as a drop in replacement for the existing behaviour. Comparison and constructor functions have also been added that will replace usages of '==' and '= -1'. No functional changes. Signed-off-by: James Clark Acked-by: Namhyung Kim Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Tested-by: John Garry Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Mark Rutland Cc: Peter Zijlstra Cc: Thomas Richter Link: https://lore.kernel.org/r/20201126141328.6509-4-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit 91585846f105ef2e3f479a5124a264ebb770f6ab Author: James Clark Date: Thu Nov 26 16:13:18 2020 +0200 perf cpumap: Use existing allocator to avoid using malloc Use the existing allocator for perf_cpu_map to avoid use of raw malloc. This could cause an issue in later commits where the size of perf_cpu_map is changed. No functional changes. Signed-off-by: James Clark Acked-by: Namhyung Kim Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Tested-by: John Garry Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Mark Rutland Cc: Peter Zijlstra Cc: Thomas Richter Link: https://lore.kernel.org/r/20201126141328.6509-3-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit 23331eeb731a503aaa74d167055eeedc2073ff09 Author: James Clark Date: Thu Nov 26 16:13:17 2020 +0200 perf tests: Improve topology test to check all aggregation types Improve the topology test to check all aggregation types. This is to lock down the behaviour before 'id' is changed into a struct in later commits. Committer testing: $ perf test topology 41: Session topology: Ok $ $ perf test -v topology 41: Session topology: --- start --- test child forked, pid 965552 templ file: /tmp/perf-test-mO7NtI Problems creating module maps, continuing anyway... CPU 0, core 0, socket 0 CPU 1, core 1, socket 0 CPU 2, core 2, socket 0 CPU 3, core 4, socket 0 CPU 4, core 5, socket 0 CPU 5, core 6, socket 0 CPU 6, core 8, socket 0 CPU 7, core 9, socket 0 CPU 8, core 10, socket 0 CPU 9, core 12, socket 0 CPU 10, core 13, socket 0 CPU 11, core 14, socket 0 CPU 12, core 0, socket 0 CPU 13, core 1, socket 0 CPU 14, core 2, socket 0 CPU 15, core 4, socket 0 CPU 16, core 5, socket 0 CPU 17, core 6, socket 0 CPU 18, core 8, socket 0 CPU 19, core 9, socket 0 CPU 20, core 10, socket 0 CPU 21, core 12, socket 0 CPU 22, core 13, socket 0 CPU 23, core 14, socket 0 test child finished with 0 ---- end ---- Session topology: Ok $ Signed-off-by: James Clark Acked-by: Namhyung Kim Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Tested-by: John Garry Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Mark Rutland Cc: Peter Zijlstra Cc: Thomas Richter Link: https://lore.kernel.org/r/20201126141328.6509-2-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit b27d20ab1c6a1a7738c02419c28287d260ca8036 Author: Tiezhu Yang Date: Wed Dec 23 13:24:35 2020 -0300 perf tools: Update s390's syscall.tbl copy from the kernel sources This silences the following tools/perf/ build warning: Warning: Kernel ABI header at 'tools/perf/arch/s390/entry/syscalls/syscall.tbl' differs from latest version at 'arch/s390/kernel/syscalls/syscall.tbl' Just make them same: cp arch/s390/kernel/syscalls/syscall.tbl tools/perf/arch/s390/entry/syscalls/syscall.tbl Signed-off-by: Tiezhu Yang Reviewed-by: Naveen N. Rao Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Xuefeng Li Link: http://lore.kernel.org/lkml/1608278364-6733-5-git-send-email-yangtiezhu@loongson.cn [ There were updates after Tiezhu's post, so I just updated the copy ] Signed-off-by: Arnaldo Carvalho de Melo commit c5ef52944a2d80017092cdf6aa474b2f4d596072 Author: Tiezhu Yang Date: Wed Dec 23 13:13:16 2020 -0300 perf tools: Update powerpc's syscall.tbl copy from the kernel sources This silences the following tools/perf/ build warning: Warning: Kernel ABI header at 'tools/perf/arch/powerpc/entry/syscalls/syscall.tbl' differs from latest version at 'arch/powerpc/kernel/syscalls/syscall.tbl' Just make them same: cp arch/powerpc/kernel/syscalls/syscall.tbl tools/perf/arch/powerpc/entry/syscalls/syscall.tbl Signed-off-by: Tiezhu Yang Reviewed-by: Naveen N. Rao Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Xuefeng Li Link: http://lore.kernel.org/lkml/1608278364-6733-4-git-send-email-yangtiezhu@loongson.cn [ There were updates after Tiezhu's post, so I just updated the copy ] Signed-off-by: Arnaldo Carvalho de Melo commit 22ffc3f5598d2a51e2da4ea5e07e734715bde782 Author: Tiezhu Yang Date: Fri Dec 18 15:59:22 2020 +0800 perf s390: Move syscall.tbl check into check-headers.sh It is better to check syscall.tbl for s390 in check-headers.sh, it is similar with commit c9b51a017065 ("perf tools: Move syscall_64.tbl check into check-headers.sh"). Signed-off-by: Tiezhu Yang Reviewed-by: Naveen N. Rao Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Xuefeng Li Link: http://lore.kernel.org/lkml/1608278364-6733-3-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Arnaldo Carvalho de Melo commit 9bad32b2c63c985fc9f04b29186974ad5bb0b74c Author: Tiezhu Yang Date: Fri Dec 18 15:59:21 2020 +0800 perf powerpc: Move syscall.tbl check to check-headers.sh It is better to check syscall.tbl for powerpc in check-headers.sh, it is similar with commit c9b51a017065 ("perf tools: Move syscall_64.tbl check into check-headers.sh"). Signed-off-by: Tiezhu Yang Reviewed-by: Naveen N. Rao Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Xuefeng Li Link: http://lore.kernel.org/lkml/1608278364-6733-2-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Arnaldo Carvalho de Melo commit b71df82d05b7a38f38c4b1109c57b209b8ed43ff Author: Arnaldo Carvalho de Melo Date: Mon Dec 21 20:04:45 2020 -0300 tools headers UAPI: Synch KVM's svm.h header with the kernel To pick up the changes from: d1949b93c60504b3 ("KVM: SVM: Add support for CR8 write traps for an SEV-ES guest") 5b51cb13160ae0ba ("KVM: SVM: Add support for CR4 write traps for an SEV-ES guest") f27ad38aac23263c ("KVM: SVM: Add support for CR0 write traps for an SEV-ES guest") 2985afbcdbb1957a ("KVM: SVM: Add support for EFER write traps for an SEV-ES guest") 291bd20d5d88814a ("KVM: SVM: Add initial support for a VMGEXIT VMEXIT") Picking these new SVM exit reasons: + { SVM_EXIT_EFER_WRITE_TRAP, "write_efer_trap" }, \ + { SVM_EXIT_CR0_WRITE_TRAP, "write_cr0_trap" }, \ + { SVM_EXIT_CR4_WRITE_TRAP, "write_cr4_trap" }, \ + { SVM_EXIT_CR8_WRITE_TRAP, "write_cr8_trap" }, \ + { SVM_EXIT_VMGEXIT, "vmgexit" }, \ + { SVM_VMGEXIT_MMIO_READ, "vmgexit_mmio_read" }, \ + { SVM_VMGEXIT_MMIO_WRITE, "vmgexit_mmio_write" }, \ + { SVM_VMGEXIT_NMI_COMPLETE, "vmgexit_nmi_complete" }, \ + { SVM_VMGEXIT_AP_HLT_LOOP, "vmgexit_ap_hlt_loop" }, \ + { SVM_VMGEXIT_AP_JUMP_TABLE, "vmgexit_ap_jump_table" }, \ And address this perf build warning: Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/svm.h' differs from latest version at 'arch/x86/include/uapi/asm/svm.h' diff -u tools/arch/x86/include/uapi/asm/svm.h arch/x86/include/uapi/asm/svm.h Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: Paolo Bonzini Cc: Tom Lendacky Signed-off-by: Arnaldo Carvalho de Melo commit 9880e71cbaa8a0e826d8f144704301476b2d6cf9 Author: Arnaldo Carvalho de Melo Date: Mon Dec 21 12:53:44 2020 -0300 tools kvm headers: Update KVM headers from the kernel sources To pick the changes from: 8d14797b53f044fd ("KVM: arm64: Move 'struct kvm_arch_memory_slot' out of uapi/") That don't causes any changes in tooling, only addresses this perf build warning: Warning: Kernel ABI header at 'tools/arch/arm64/include/uapi/asm/kvm.h' differs from latest version at 'arch/arm64/include/uapi/asm/kvm.h' diff -u tools/arch/arm64/include/uapi/asm/kvm.h arch/arm64/include/uapi/asm/kvm.h Cc: Marc Zyngier Cc: Will Deacon Signed-off-by: Arnaldo Carvalho de Melo commit cd97448db80e0238a819dc6b733da6ec0173cadd Author: Arnaldo Carvalho de Melo Date: Mon Dec 21 12:51:03 2020 -0300 tools headers UAPI: Sync KVM's vmx.h header with the kernel sources To pick the changes in: bf0cd88ce363a2de ("KVM: x86: emulate wait-for-SIPI and SIPI-VMExit") That makes 'perf kvm-stat' aware of this new SIPI_SIGNAL exit reason, thus addressing the following perf build warning: Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/vmx.h' differs from latest version at 'arch/x86/include/uapi/asm/vmx.h' diff -u tools/arch/x86/include/uapi/asm/vmx.h arch/x86/include/uapi/asm/vmx.h Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: Paolo Bonzini Cc: Yadong Qi Signed-off-by: Arnaldo Carvalho de Melo commit 288807fc3a5f19ed77cb8c25342323bbe58a75a1 Author: Arnaldo Carvalho de Melo Date: Mon Dec 21 09:20:52 2020 -0300 tools headers UAPI: Sync kvm.h headers with the kernel sources To pick the changes in: fb04a1eddb1a65b6 ("KVM: X86: Implement ring-based dirty memory tracking") That result in these change in tooling: $ tools/perf/trace/beauty/kvm_ioctl.sh > before $ cp include/uapi/linux/kvm.h tools/include/uapi/linux/kvm.h $ cp arch/x86/include/uapi/asm/kvm.h tools/arch/x86/include/uapi/asm/kvm.h $ tools/perf/trace/beauty/kvm_ioctl.sh > after $ diff -u before after --- before 2020-12-21 11:55:45.229737066 -0300 +++ after 2020-12-21 11:55:56.379983393 -0300 @@ -90,6 +90,7 @@ [0xc0] = "CLEAR_DIRTY_LOG", [0xc1] = "GET_SUPPORTED_HV_CPUID", [0xc6] = "X86_SET_MSR_FILTER", + [0xc7] = "RESET_DIRTY_RINGS", [0xe0] = "CREATE_DEVICE", [0xe1] = "SET_DEVICE_ATTR", [0xe2] = "GET_DEVICE_ATTR", $ Now one can use that string in filters when tracing ioctls, etc. And silences this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/kvm.h' differs from latest version at 'include/uapi/linux/kvm.h' diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/kvm.h' differs from latest version at 'arch/x86/include/uapi/asm/kvm.h' diff -u tools/arch/x86/include/uapi/asm/kvm.h arch/x86/include/uapi/asm/kvm.h Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: Paolo Bonzini Cc: Peter Xu Signed-off-by: Arnaldo Carvalho de Melo commit fde668244d1d8d490b5b9daf53fe4f92a6751773 Author: Arnaldo Carvalho de Melo Date: Mon Dec 21 09:07:36 2020 -0300 tools arch x86: Sync the msr-index.h copy with the kernel sources To pick up the changes in: Fixes: 69372cf01290b958 ("x86/cpu: Add VM page flush MSR availablility as a CPUID feature") That cause these changes in tooling: $ tools/perf/trace/beauty/tracepoints/x86_msr.sh > before $ cp arch/x86/include/asm/msr-index.h tools/arch/x86/include/asm/msr-index.h $ tools/perf/trace/beauty/tracepoints/x86_msr.sh > after $ diff -u before after --- before 2020-12-21 09:09:05.593005003 -0300 +++ after 2020-12-21 09:12:48.436994802 -0300 @@ -21,7 +21,7 @@ [0x0000004f] = "PPIN", [0x00000060] = "LBR_CORE_TO", [0x00000079] = "IA32_UCODE_WRITE", - [0x0000008b] = "IA32_UCODE_REV", + [0x0000008b] = "AMD64_PATCH_LEVEL", [0x0000008C] = "IA32_SGXLEPUBKEYHASH0", [0x0000008D] = "IA32_SGXLEPUBKEYHASH1", [0x0000008E] = "IA32_SGXLEPUBKEYHASH2", @@ -286,6 +286,7 @@ [0xc0010114 - x86_AMD_V_KVM_MSRs_offset] = "VM_CR", [0xc0010115 - x86_AMD_V_KVM_MSRs_offset] = "VM_IGNNE", [0xc0010117 - x86_AMD_V_KVM_MSRs_offset] = "VM_HSAVE_PA", + [0xc001011e - x86_AMD_V_KVM_MSRs_offset] = "AMD64_VM_PAGE_FLUSH", [0xc001011f - x86_AMD_V_KVM_MSRs_offset] = "AMD64_VIRT_SPEC_CTRL", [0xc0010130 - x86_AMD_V_KVM_MSRs_offset] = "AMD64_SEV_ES_GHCB", [0xc0010131 - x86_AMD_V_KVM_MSRs_offset] = "AMD64_SEV", $ The new MSR has a pattern that wasn't matched to avoid a clash with IA32_UCODE_REV, change the regex to prefer the more relevant AMD_ prefixed ones to catch this new AMD64_VM_PAGE_FLUSH MSR. Which causes these parts of tools/perf/ to be rebuilt: CC /tmp/build/perf/trace/beauty/tracepoints/x86_msr.o LD /tmp/build/perf/trace/beauty/tracepoints/perf-in.o LD /tmp/build/perf/trace/beauty/perf-in.o LD /tmp/build/perf/perf-in.o LINK /tmp/build/perf/perf This addresses this perf tools build warning: diff -u tools/arch/x86/include/asm/msr-index.h arch/x86/include/asm/msr-index.h 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' Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: Paolo Bonzini Cc: Tom Lendacky Signed-off-by: Arnaldo Carvalho de Melo commit 7f3905f00a2025591a6883ee6880f928029b4d96 Author: Arnaldo Carvalho de Melo Date: Mon Dec 21 09:04:54 2020 -0300 tools headers cpufeatures: Sync with the kernel sources To pick the changes in: 69372cf01290b958 ("x86/cpu: Add VM page flush MSR availablility as a CPUID feature") e1b35da5e624f8b0 ("x86: Enumerate AVX512 FP16 CPUID feature flag") That causes only these 'perf bench' objects to rebuild: CC /tmp/build/perf/bench/mem-memcpy-x86-64-asm.o CC /tmp/build/perf/bench/mem-memset-x86-64-asm.o And addresses these perf build warnings: 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: Ian Rogers Cc: Jiri Olsa Cc: Kyung Min Park Cc: Namhyung Kim Cc: Paolo Bonzini Cc: Tom Lendacky Signed-off-by: Arnaldo Carvalho de Melo commit 6e5192143ab571dbefb584edf900565098bdfd23 Author: Arnaldo Carvalho de Melo Date: Mon Dec 21 09:03:04 2020 -0300 tools headers UAPI: Update epoll_pwait2 affected files To pick the changes from: b0a0c2615f6f199a ("epoll: wire up syscall epoll_pwait2") That addresses these perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/asm-generic/unistd.h' differs from latest version at 'include/uapi/asm-generic/unistd.h' diff -u tools/include/uapi/asm-generic/unistd.h include/uapi/asm-generic/unistd.h Warning: Kernel ABI header at 'tools/perf/arch/x86/entry/syscalls/syscall_64.tbl' differs from latest version at 'arch/x86/entry/syscalls/syscall_64.tbl' diff -u tools/perf/arch/x86/entry/syscalls/syscall_64.tbl arch/x86/entry/syscalls/syscall_64.tbl Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: Willem de Bruijn Signed-off-by: Arnaldo Carvalho de Melo commit d8f6e5c6c83737cfdad46077e614885a3db9e809 Author: Sumera Priyadarsini Date: Wed Nov 25 02:02:12 2020 +0530 scripts: coccicheck: Correct usage of make coccicheck The command "make coccicheck C=1 CHECK=scripts/coccicheck" results in the error: ./scripts/coccicheck: line 65: -1: shift count out of range This happens because every time the C variable is specified, the shell arguments need to be "shifted" in order to take only the last argument, which is the C file to test. These shell arguments mostly comprise flags that have been set in the Makefile. However, when coccicheck is specified in the make command as a rule, the number of shell arguments is zero, thus passing the invalid value -1 to the shift command, resulting in an error. Modify coccicheck to print correct usage of make coccicheck so as to avoid the error. Signed-off-by: Sumera Priyadarsini Signed-off-by: Julia Lawall commit d2ee8447e1bed7def30bab1748c876b8bd4e0876 Author: Julia Lawall Date: Thu Dec 24 12:45:18 2020 +0100 coccinelle: update expiring email addresses Signed-off-by: Julia Lawall commit a61daaf351da7c8493f2586437617d60c24350b0 Author: Jonathan Lemon Date: Fri Dec 18 10:50:31 2020 -0800 bpf: Use thread_group_leader() Instead of directly comparing task->tgid and task->pid, use the thread_group_leader() helper. This helps with readability, and there should be no functional change. Signed-off-by: Jonathan Lemon Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201218185032.2464558-3-jonathan.lemon@gmail.com commit 69ca310f34168eae0ada434796bfc22fb4a0fa26 Author: Jonathan Lemon Date: Fri Dec 18 10:50:30 2020 -0800 bpf: Save correct stopping point in file seq iteration On some systems, some variant of the following splat is repeatedly seen. The common factor in all traces seems to be the entry point to task_file_seq_next(). With the patch, all warnings go away. rcu: INFO: rcu_sched self-detected stall on CPU rcu: \x0926-....: (20992 ticks this GP) idle=d7e/1/0x4000000000000002 softirq=81556231/81556231 fqs=4876 \x09(t=21033 jiffies g=159148529 q=223125) NMI backtrace for cpu 26 CPU: 26 PID: 2015853 Comm: bpftool Kdump: loaded Not tainted 5.6.13-0_fbk4_3876_gd8d1f9bf80bb #1 Hardware name: Quanta Twin Lakes MP/Twin Lakes Passive MP, BIOS F09_3A12 10/08/2018 Call Trace: dump_stack+0x50/0x70 nmi_cpu_backtrace.cold.6+0x13/0x50 ? lapic_can_unplug_cpu.cold.30+0x40/0x40 nmi_trigger_cpumask_backtrace+0xba/0xca rcu_dump_cpu_stacks+0x99/0xc7 rcu_sched_clock_irq.cold.90+0x1b4/0x3aa ? tick_sched_do_timer+0x60/0x60 update_process_times+0x24/0x50 tick_sched_timer+0x37/0x70 __hrtimer_run_queues+0xfe/0x270 hrtimer_interrupt+0xf4/0x210 smp_apic_timer_interrupt+0x5e/0x120 apic_timer_interrupt+0xf/0x20 RIP: 0010:get_pid_task+0x38/0x80 Code: 89 f6 48 8d 44 f7 08 48 8b 00 48 85 c0 74 2b 48 83 c6 55 48 c1 e6 04 48 29 f0 74 19 48 8d 78 20 ba 01 00 00 00 f0 0f c1 50 20 <85> d2 74 27 78 11 83 c2 01 78 0c 48 83 c4 08 c3 31 c0 48 83 c4 08 RSP: 0018:ffffc9000d293dc8 EFLAGS: 00000202 ORIG_RAX: ffffffffffffff13 RAX: ffff888637c05600 RBX: ffffc9000d293e0c RCX: 0000000000000000 RDX: 0000000000000001 RSI: 0000000000000550 RDI: ffff888637c05620 RBP: ffffffff8284eb80 R08: ffff88831341d300 R09: ffff88822ffd8248 R10: ffff88822ffd82d0 R11: 00000000003a93c0 R12: 0000000000000001 R13: 00000000ffffffff R14: ffff88831341d300 R15: 0000000000000000 ? find_ge_pid+0x1b/0x20 task_seq_get_next+0x52/0xc0 task_file_seq_get_next+0x159/0x220 task_file_seq_next+0x4f/0xa0 bpf_seq_read+0x159/0x390 vfs_read+0x8a/0x140 ksys_read+0x59/0xd0 do_syscall_64+0x42/0x110 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f95ae73e76e Code: Bad RIP value. RSP: 002b:00007ffc02c1dbf8 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 000000000170faa0 RCX: 00007f95ae73e76e RDX: 0000000000001000 RSI: 00007ffc02c1dc30 RDI: 0000000000000007 RBP: 00007ffc02c1ec70 R08: 0000000000000005 R09: 0000000000000006 R10: fffffffffffff20b R11: 0000000000000246 R12: 00000000019112a0 R13: 0000000000000000 R14: 0000000000000007 R15: 00000000004283c0 If unable to obtain the file structure for the current task, proceed to the next task number after the one returned from task_seq_get_next(), instead of the next task number from the original iterator. Also, save the stopping task number from task_seq_get_next() on failure in case of restarts. Fixes: eaaacd23910f ("bpf: Add task and task/file iterator targets") Signed-off-by: Jonathan Lemon Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201218185032.2464558-2-jonathan.lemon@gmail.com commit 11b844b0b7c7c3dc8e8f4d0bbaad5e798351862c Author: Andrii Nakryiko Date: Wed Dec 23 12:06:52 2020 -0800 selftests/bpf: Work-around EBUSY errors from hashmap update/delete 20b6cc34ea74 ("bpf: Avoid hashtab deadlock with map_locked") introduced a possibility of getting EBUSY error on lock contention, which seems to happen very deterministically in test_maps when running 1024 threads on low-CPU machine. In libbpf CI case, it's a 2 CPU VM and it's hitting this 100% of the time. Work around by retrying on EBUSY (and EAGAIN, while we are at it) after a small sleep. sched_yield() is too agressive and fails even after 20 retries, so I went with usleep(1) for backoff. Also log actual error returned to make it easier to see what's going on. Fixes: 20b6cc34ea74 ("bpf: Avoid hashtab deadlock with map_locked") Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20201223200652.3417075-1-andrii@kernel.org commit 5b2fc08c455bbf749489254a81baeffdf4c0a693 Merge: 399895b3e25f8 a135a1b4c4db1 Author: Dave Airlie Date: Thu Dec 24 10:31:15 2020 +1000 Merge tag 'amd-drm-fixes-5.11-2020-12-23' of git://people.freedesktop.org/~agd5f/linux into drm-next amd-drm-fixes-5.11-2020-12-23: amdgpu: - Vangogh SMU fixes - Arcturus gfx9 fixes - Misc display fixes - Sienna Cichlid SMU update - Fix S3 display memory leak - Fix regression caused by DP sub-connector support amdkfd: - Properly require pcie atomics for gfx10 Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20201223204752.4019-1-alexander.deucher@amd.com commit 399895b3e25f875548d0cb04e1b2253d066ff0e4 Merge: 4efd7faba5e06 be3e477effba6 Author: Dave Airlie Date: Thu Dec 24 10:08:10 2020 +1000 Merge tag 'drm-misc-next-fixes-2020-12-22' of git://anongit.freedesktop.org/drm/drm-misc into drm-next Short summary of fixes pull: * dma-buf: Include for building on MIPS * komeda: Fix order of operation in commit tail; Fix NULL-pointer and out-of-bounds access; Cleanups * ttm: Fix an unused-function warning Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/X+JFYlW1SEZa6ShA@linux-uq9g commit 3c98cbf22a96c1b12f48c1b2a4680dfe5cb280f9 Author: Mario Limonciello Date: Mon Dec 14 13:29:35 2020 -0600 e1000e: Export S0ix flags to ethtool This flag can be used by an end user to disable S0ix flows on a buggy system or by an OEM for development purposes. If you need this flag to be persisted across reboots, it's suggested to use a udev rule to call adjust it until the kernel could have your configuration in a disallow list. Signed-off-by: Mario Limonciello Reviewed-by: Hans de Goede Tested-by: Yijun Shen Signed-off-by: Tony Nguyen commit 6cecf02e77ab9bf97e9252f9fcb8f0738a6de12c Author: Mario Limonciello Date: Mon Dec 14 13:29:34 2020 -0600 Revert "e1000e: disable s0ix entry and exit flows for ME systems" commit e086ba2fccda ("e1000e: disable s0ix entry and exit flows for ME systems") disabled s0ix flows for systems that have various incarnations of the i219-LM ethernet controller. This changed caused power consumption regressions on the following shipping Dell Comet Lake based laptops: * Latitude 5310 * Latitude 5410 * Latitude 5410 * Latitude 5510 * Precision 3550 * Latitude 5411 * Latitude 5511 * Precision 3551 * Precision 7550 * Precision 7750 This commit was introduced because of some regressions on certain Thinkpad laptops. This comment was potentially caused by an earlier commit 632fbd5eb5b0e ("e1000e: fix S0ix flows for cable connected case"). or it was possibly caused by a system not meeting platform architectural requirements for low power consumption. Other changes made in the driver with extended timeouts are expected to make the driver more impervious to platform firmware behavior. Fixes: e086ba2fccda ("e1000e: disable s0ix entry and exit flows for ME systems") Reviewed-by: Alexander Duyck Signed-off-by: Mario Limonciello Reviewed-by: Hans de Goede Tested-by: Yijun Shen Signed-off-by: Tony Nguyen commit 3cf31b1a9effd859bb3d6ff9f8b5b0d5e6cac952 Author: Mario Limonciello Date: Mon Dec 14 13:29:33 2020 -0600 e1000e: bump up timeout to wait when ME un-configures ULP mode Per guidance from Intel ethernet architecture team, it may take up to 1 second for unconfiguring ULP mode. However in practice this seems to be taking up to 2 seconds on some Lenovo machines. Detect scenarios that take more than 1 second but less than 2.5 seconds and emit a warning on resume for those scenarios. Suggested-by: Aaron Ma Suggested-by: Sasha Netfin Suggested-by: Hans de Goede CC: Mark Pearson Fixes: f15bb6dde738cc8fa0 ("e1000e: Add support for S0ix") BugLink: https://bugs.launchpad.net/bugs/1865570 Link: https://patchwork.ozlabs.org/project/intel-wired-lan/patch/20200323191639.48826-1-aaron.ma@canonical.com/ Link: https://lkml.org/lkml/2020/12/13/15 Link: https://lkml.org/lkml/2020/12/14/708 Signed-off-by: Mario Limonciello Reviewed-by: Hans de Goede Tested-by: Yijun Shen Signed-off-by: Tony Nguyen commit 808e0d8832cc81738f3e8df12dff0688352baf50 Author: Mario Limonciello Date: Mon Dec 14 13:29:32 2020 -0600 e1000e: Only run S0ix flows if shutdown succeeded If the shutdown failed, the part will be thawed and running S0ix flows will put it into an undefined state. Reported-by: Alexander Duyck Reviewed-by: Alexander Duyck Signed-off-by: Mario Limonciello Tested-by: Yijun Shen Signed-off-by: Tony Nguyen commit 58cf05f597b03a8212d9ecf2c79ee046d3ee8ad9 Merge: a0881596757fb 13be30f156fda Author: Linus Torvalds Date: Wed Dec 23 15:11:08 2020 -0800 Merge tag 'sound-fix-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of small fixes that came up recently for 5.11. The majority of fixes are usual HD-audio and USB-audio quirks, with a few PCM core fixes for addressing the information leak and yet more UBSAN fixes in the core side" * tag 'sound-fix-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA/hda: apply jack fixup for the Acer Veriton N4640G/N6640G/N2510G ALSA: hda/realtek: Apply jack fixup for Quanta NL3 ALSA: usb-audio: Add implicit feeback support for the BOSS GT-1 ALSA: usb-audio: Add alias entry for ASUS PRIME TRX40 PRO-S ALSA: core: Remove redundant comments ALSA: hda/realtek: Add quirk for MSI-GP73 ALSA: pcm: oss: Fix a few more UBSAN fixes ALSA: pcm: Clear the full allocated memory at hw_params ALSA: memalloc: Align buffer allocations in page size ALSA: usb-audio: Disable sample read check if firmware doesn't give back ALSA: pcm: Remove snd_pcm_lib_preallocate_dma_free() ALSA: usb-audio: Add VID to support native DSD reproduction on FiiO devices ALSA: core: memalloc: add page alignment for iram ALSA: hda/realtek - Supported Dell fixed type headset ALSA: hda/realtek: Remove dummy lineout on Acer TravelMate P648/P658 commit a0881596757fbef5781dc3cde5e8393dc2eb7ae6 Merge: 6755f4563144e 6ae9b5ffcaeba Author: Linus Torvalds Date: Wed Dec 23 15:06:22 2020 -0800 Merge tag 'tag-chrome-platform-for-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux Pull chrome platform updates from Benson Leung: "cros_ec_typec: - A series from Prashant for Type-C to implement TYPEC_STATUS, parsing USB PD Partner ID VDOs, and registering partner altmodes. cros_ec misc: - Don't treat RTC events as wakeup sources in cros_ec_proto" * tag 'tag-chrome-platform-for-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux: platform/chrome: cros_ec_typec: Tolerate unrecognized mux flags platform/chrome: cros_ec_typec: Register partner altmodes platform/chrome: cros_ec_typec: Parse partner PD ID VDOs platform/chrome: cros_ec_typec: Introduce TYPEC_STATUS platform/chrome: cros_ec: Import Type C host commands platform/chrome: cros_ec_typec: Clear partner identity on device removal platform/chrome: cros_ec_typec: Fix remove partner logic platform/chrome: cros_ec_typec: Relocate set_port_params_v*() functions platform/chrome: Don't treat RTC events as wakeup sources commit 6755f4563144e38f375f43dbb01926fd4ce08620 Merge: 614cb5894306c 0b9491b621196 Author: Linus Torvalds Date: Wed Dec 23 15:01:49 2020 -0800 Merge tag 'linux-watchdog-5.11-rc1' of git://www.linux-watchdog.org/linux-watchdog Pull watchdog updates from Wim Van Sebroeck: - Removal of the pnx83xx driver - Add a binding for A100's watchdog controller - Add Rockchip compatibles to snps,dw-wdt.yaml - hpwdt: Disable NMI in Crash Kernel - Fix potential dereferencing of null pointer in watchdog_core - Several other small fixes and improvements * tag 'linux-watchdog-5.11-rc1' of git://www.linux-watchdog.org/linux-watchdog: (23 commits) watchdog: convert comma to semicolon watchdog: iTCO_wdt: use dev_*() instead of pr_*() for logging dt-binding: watchdog: add Rockchip compatibles to snps,dw-wdt.yaml watchdog: coh901327: add COMMON_CLK dependency dt-bindings: watchdog: sun4i: Add A100 compatible watchdog: qcom: Avoid context switch in restart handler watchdog: iTCO_wdt: use module_platform_device() macro watchdog: Fix potential dereferencing of null pointer watchdog: wdat_wdt: Fix missing kerneldoc reported by W=1 watchdog/hpwdt: Reflect changes watchdog/hpwdt: Disable NMI in Crash Kernel wdt: sp805: add watchdog_stop on reboot watchdog: sbc_fitpc2_wdt: add __user annotations watchdog: geodewdt: remove unneeded break watchdog: rti-wdt: fix reference leak in rti_wdt_probe watchdog: qcom_wdt: set WDOG_HW_RUNNING bit when appropriate watchdog: remove pnx83xx driver watchdog: stm32_iwdg: don't print an error on probe deferral watchdog: sprd: change to use usleep_range() instead of busy loop watchdog: sprd: check busy bit before new loading rather than after that ... commit 1f45dc22066797479072978feeada0852502e180 Author: Lijun Pan Date: Wed Dec 23 14:49:04 2020 -0600 ibmvnic: continue fatal error reset after passive init Commit f9c6cea0b385 ("ibmvnic: Skip fatal error reset after passive init") says "If the passive CRQ initialization occurs before the FATAL reset task is processed, the FATAL error reset task would try to access a CRQ message queue that was freed, causing an oops. The problem may be most likely to occur during DLPAR add vNIC with a non-default MTU, because the DLPAR process will automatically issue a change MTU request. Fix this by not processing fatal error reset if CRQ is passively initialized after client-driven CRQ initialization fails." The original commit skips a specific reset condition, but that does not fix the problem it claims to fix, and misses a reset condition. The effective fix is commit 0e435befaea4 ("ibmvnic: fix NULL pointer dereference in ibmvic_reset_crq") and commit a0faaa27c716 ("ibmvnic: fix NULL pointer dereference in reset_sub_crq_queues"). With above two fixes, there are no more crashes seen as described even without the original commit, so I would like to revert the original commit. Fixes: f9c6cea0b385 ("ibmvnic: Skip fatal error reset after passive init") Signed-off-by: Lijun Pan Link: https://lore.kernel.org/r/20201223204904.12677-1-ljp@linux.ibm.com Signed-off-by: Jakub Kicinski commit 5d41f9b7ee7a5a5138894f58846a4ffed601498a Author: Dinghao Liu Date: Wed Dec 23 19:06:12 2020 +0800 net: ethernet: Fix memleak in ethoc_probe When mdiobus_register() fails, priv->mdio allocated by mdiobus_alloc() has not been freed, which leads to memleak. Fixes: e7f4dc3536a4 ("mdio: Move allocation of interrupts into core") Signed-off-by: Dinghao Liu Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20201223110615.31389-1-dinghao.liu@zju.edu.cn Signed-off-by: Jakub Kicinski commit 427c940558560bff2583d07fc119a21094675982 Author: John Wang Date: Wed Dec 23 13:55:23 2020 +0800 net/ncsi: Use real net-device for response handler When aggregating ncsi interfaces and dedicated interfaces to bond interfaces, the ncsi response handler will use the wrong net device to find ncsi_dev, so that the ncsi interface will not work properly. Here, we use the original net device to fix it. Fixes: 138635cc27c9 ("net/ncsi: NCSI response packet handler") Signed-off-by: John Wang Link: https://lore.kernel.org/r/20201223055523.2069-1-wangzhiqiang.bj@bytedance.com Signed-off-by: Jakub Kicinski commit 826f328e2b7e8854dd42ea44e6519cd75018e7b1 Author: Petr Machata Date: Tue Dec 22 22:49:44 2020 +0100 net: dcb: Validate netlink message in DCB handler DCB uses the same handler function for both RTM_GETDCB and RTM_SETDCB messages. dcb_doit() bounces RTM_SETDCB mesasges if the user does not have the CAP_NET_ADMIN capability. However, the operation to be performed is not decided from the DCB message type, but from the DCB command. Thus DCB_CMD_*_GET commands are used for reading DCB objects, the corresponding SET and DEL commands are used for manipulation. The assumption is that set-like commands will be sent via an RTM_SETDCB message, and get-like ones via RTM_GETDCB. However, this assumption is not enforced. It is therefore possible to manipulate DCB objects without CAP_NET_ADMIN capability by sending the corresponding command in an RTM_GETDCB message. That is a bug. Fix it by validating the type of the request message against the type used for the response. Fixes: 2f90b8657ec9 ("ixgbe: this patch adds support for DCB to the kernel and ixgbe driver") Signed-off-by: Petr Machata Link: https://lore.kernel.org/r/a2a9b88418f3a58ef211b718f2970128ef9e3793.1608673640.git.me@pmachata.org Signed-off-by: Jakub Kicinski commit 6313138619f398666212577f8b4f0ddf215a2bed Merge: 8450e23f142f6 428b448ee764a Author: Jakub Kicinski Date: Wed Dec 23 12:17:50 2020 -0800 Merge branch 'net-ipa-gsi-interrupt-handling-fixes' Alex Elder says: ==================== net: ipa: GSI interrupt handling fixes This series implements fixes for some issues related to handling interrupts when GSI channel and event ring commands complete. The first issue is that the completion condition for an event ring or channel command could occur while the associated interrupt is disabled. This would cause the interrupt to fire when it is subsequently enabled, even if the condition it signals had already been handled. The fix is to clear any pending interrupt conditions before re-enabling the interrupt. The second and third patches change how the success of an event ring or channel command is determined. These commands change the state of an event ring or channel. Previously the receipt of a completion interrupt was required to consider a command successful. Instead, a command is successful if it changes the state of the target event ring or channel in the way expected. This way the command can succeed even if the completion interrupt did not arrive while it was enabled. ==================== Link: https://lore.kernel.org/r/20201222180012.22489-1-elder@linaro.org Signed-off-by: Jakub Kicinski commit 428b448ee764a264b7a2eeed295b282755114aa7 Author: Alex Elder Date: Tue Dec 22 12:00:12 2020 -0600 net: ipa: use state to determine event ring command success This patch implements the same basic fix for event rings as the previous one does for channels. The result of issuing an event ring control command should be that the event ring changes state. If enabled, a completion interrupt signals that the event ring state has changed. This interrupt is enabled by gsi_evt_ring_command() and disabled again after the command has completed (or we time out). There is a window of time during which the command could complete successfully without interrupting. This would cause the event ring to transition to the desired new state. So whether a event ring command ends via completion interrupt or timeout, we can consider the command successful if the event ring has entered the desired state (and a failure if it has not, regardless of the cause). Fixes: b4175f8731f78 ("net: ipa: only enable GSI event control IRQs when needed") Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 6ffddf3b3d182d886d754cfafdf909ccb14f464b Author: Alex Elder Date: Tue Dec 22 12:00:11 2020 -0600 net: ipa: use state to determine channel command success The result of issuing a channel control command should be that the channel changes state. If enabled, a completion interrupt signals that the channel state has changed. This interrupt is enabled by gsi_channel_command() and disabled again after the command has completed (or we time out). There is a window of time--after the completion interrupt is disabled but before the channel state is read--during which the command could complete successfully without interrupting. This would cause the channel to transition to the desired new state. So whether a channel command ends via completion interrupt or timeout, we can consider the command successful if the channel has entered the desired state (and a failure if it has not, regardless of the cause). Fixes: d6c9e3f506ae8 ("net: ipa: only enable generic command completion IRQ when needed"); Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 94ad8f3ac6aff5acde3f6c4719997efc61e0dccf Author: Alex Elder Date: Tue Dec 22 12:00:10 2020 -0600 net: ipa: clear pending interrupts before enabling We enable the completion interrupt for channel or event ring commands only when we issue them. The interrupt is disabled after the interrupt has fired, or after we have timed out waiting for it. If we time out, the command could complete after the interrupt has been disabled, causing a state change in the channel or event ring. The interrupt associated with that state change would be delivered the next time the completion interrupt is enabled. To avoid previous command completions interfering with new commands, clear all pending completion interrupts before re-enabling them for a new command. Fixes: b4175f8731f78 ("net: ipa: only enable GSI event control IRQs when needed") Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 8450e23f142f629e40bd67afc8375c86c7fbf8f1 Author: Noor Azura Ahmad Tarmizi Date: Wed Dec 23 00:03:37 2020 +0800 stmmac: intel: Add PCI IDs for TGL-H platform Add TGL-H PCI info and PCI IDs for the new TSN Controller to the list of supported devices. Signed-off-by: Noor Azura Ahmad Tarmizi Signed-off-by: Voon Weifeng Signed-off-by: Muhammad Husaini Zulkifli Link: https://lore.kernel.org/r/20201222160337.30870-1-muhammad.husaini.zulkifli@intel.com Signed-off-by: Jakub Kicinski commit a135a1b4c4db1f3b8cbed9676a40ede39feb3362 Author: Stylon Wang Date: Tue Nov 10 15:40:06 2020 +0800 drm/amd/display: Fix memory leaks in S3 resume EDID parsing in S3 resume pushes new display modes to probed_modes list but doesn't consolidate to actual mode list. This creates a race condition when amdgpu_dm_connector_ddc_get_modes() re-initializes the list head without walking the list and results in memory leak. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=209987 Acked-by: Harry Wentland Acked-by: Alex Deucher Reviewed-by: Nicholas Kazlauskas Signed-off-by: Stylon Wang Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 505199a3b714aeb9d13dd0a04c33db9f5d99482a Author: Alex Deucher Date: Fri Dec 18 11:19:30 2020 -0500 drm/amdgpu: Fix a copy-pasta comment This is not a scsi driver. Reviewed-by: Nirmoy Das Signed-off-by: Alex Deucher commit 05211e7fbbf042dd7f51155ebe64eb2ecacb25cb Author: Alex Deucher Date: Thu Dec 17 12:11:36 2020 -0500 drm/amdgpu: only set DP subconnector type on DP and eDP connectors Fixes a crash in drm_object_property_set_value() because the property is not set for internal DP ports that connect to a bridge chips (e.g., DP to VGA or DP to LVDS). Bug: https://bugzilla.kernel.org/show_bug.cgi?id=210739 Fixes: 65bf2cf95d3ade ("drm/amdgpu: utilize subconnector property for DP through atombios") Tested-By: Kris Karas Cc: Oleg Vasilev Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 5.10.x commit e75a9db3c59e923f54a36870a7cc339afe9e611b Author: Evan Quan Date: Fri Dec 18 12:38:50 2020 +0800 drm/amd/pm: bump Sienna Cichlid smu_driver_if version to match latest pmfw This can suppress the annoying but unharmful prompts. Signed-off-by: Evan Quan Reviewed-by: Guchun Chen Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 110b055b282736e277298141c42227595408f606 Author: Josip Pavic Date: Fri Dec 11 00:09:11 2020 -0500 drm/amd/display: add getter routine to retrieve mpcc mux [Why & How] Add function to identify which MPCC is providing input to a specified OPP Signed-off-by: Josip Pavic Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit 4aa9d658d21cf192fa12227591526d06fec114e0 Author: Jake Wang Date: Fri Dec 11 16:53:57 2020 -0500 drm/amd/display: always program DPPDTO unless not safe to lower [Why] We defer clock updates to after pipes have been programmed. In some instances we use DPPCLK that have been previously set to be "unused". This results in a brief window of time where underflow could occur. [How] During prepare bandwidth allow rn_update_clocks_update_dpp_dto to check each instance and compare previous clock to new clock. If new clock is higher than previous clock, program DPPDTO. Signed-off-by: Jake Wang Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit c277925cca8c534ddcf1fb0ec9b9e4ca35b1d064 Author: Yongqiang Sun Date: Fri Dec 11 15:34:30 2020 -0500 drm/amd/display: [FW Promotion] Release 0.0.47 - restore lvtma_pwrseq_delay2 from vbios integrated info table - restore MVID/NVID after power up. - Enable timer wake up mask when enable timer interrupt. Signed-off-by: Yongqiang Sun Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit 1e7445dcc17444569d9f0acce227aadf095ac989 Author: Jake Wang Date: Wed Dec 9 18:00:18 2020 -0500 drm/amd/display: updated wm table for Renoir [Why] For certain timings, Renoir may underflow due to sr exit latency being too slow. [How] Updated wm table for renoir. Signed-off-by: Jake Wang Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit 73d48f0851847268482260eb955ed8d928b7f19c Author: Sung Lee Date: Wed Dec 9 14:58:59 2020 -0500 drm/amd/display: Acquire DSC during split stream for ODM only if top_pipe [WHY] DSC should only be acquired per OPP. Therefore, DSC should only be acquired for the top_pipe when ODM is enabled. Not doing this check may lead to acquiring more DSC's than needed when doing MPO + ODM Combine. [HOW] Only acquire DSC if pipe is top_pipe. Signed-off-by: Sung Lee Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit a71e5529d2674584fda0fa09a7de4efc8e17160d Author: Aric Cyr Date: Thu Dec 10 12:11:32 2020 -0500 drm/amd/display: Multi-display underflow observed [Why] FP2 programming not happening when topology changes occur with multiple displays. [How] Ensure FP2 is programmed whenever global sync changes occur but wait for VACTIVE first to avoid underflow. Signed-off-by: Aric Cyr Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit cbac53f7fc90754b898e79ab2d5c11052ce1b640 Author: Eryk Brol Date: Tue Dec 8 12:52:36 2020 -0500 drm/amd/display: Remove unnecessary NULL check [Why] new_crtc_state is already dereferenced earlier in the function [How] Remove the check Signed-off-by: Eryk Brol Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit e82632356d531dbc575377d594e85e65aa1293f9 Author: Michael Strauss Date: Mon Nov 30 12:14:00 2020 -0500 drm/amd/display: Update RN/VGH active display count workaround [WHY] Virtual signals were previously counted as a workaround to S0i2 hang which is fixed on Renoir. This blocks S0i3 diags testing. [HOW] Stop counting virtual signals as S0i2 hang is fixed on Renoir. Signed-off-by: Michael Strauss Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit cf7fc75523b32a9a119a466dcff325f1fda38c7d Author: Yongqiang Sun Date: Wed Dec 9 16:56:51 2020 -0500 drm/amd/display: change SMU repsonse timeout to 2s. [Why] there is some garbage showing up during reboot test. Reason: SMU might handle display driver msg defered and driver will send next msg to SMU after 10ms timeout, once SMU FW handle previous msg, parameters are changed to next one, which result in a wrong value be programmed. [How] Extend timeout to 2s so SMU will have enough time to handle driver msg. Signed-off-by: Yongqiang Sun Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit e8e91f9395ef13cf054860f8ccd757333d9b6d0d Author: Rizvi Date: Wed Dec 2 14:52:22 2020 -0700 drm/amd/display: gradually ramp ABM intensity [Why] Need driver to pass values of backlight ramp start and ramp reduction so that intensity can be ramped down appropriately. [How] Using abm_parameters structure to get these values from driver. Signed-off-by: Rizvi Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit 9413b23fadad3861f5afd626ac44ef83ad8068ab Author: Martin Tsai Date: Wed Dec 2 20:22:13 2020 +0800 drm/amd/display: To modify the condition in indicating branch device [why] The sink count change HPD_IRQ will be ignored if the branch device has only DP DFP. [how] To remove the port type restriction. Signed-off-by: Martin Tsai Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit c2d61e309171437e042f4c859e88077fffee18e5 Author: Martin Tsai Date: Thu Dec 3 10:47:11 2020 +0800 drm/amd/display: Modify the hdcp device count check condition [why] Some MST display may not report the internal panel to DEVICE_COUNT, that makes the check condition always failed. [how] To update this condition with the reported device count + 1 (because the immediate repeater's internal panel is possibly not included in DEVICE_COUNT) Signed-off-by: Martin Tsai Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit 2da94e2808bd7df30ace134991ed0fbd95188acd Author: Wesley Chalmers Date: Mon Dec 7 11:46:08 2020 -0500 drm/amd/display: Interfaces for hubp blank and soft reset [WHY] HUBP blanking sequence on DCN30 requires us to check if HUBP is in blank and also toggle HUBP_DISABLE, which should instead be called HUBP_SOFT_RESET for what it does in HW. Signed-off-by: Wesley Chalmers Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit ea96b12aa4fa116aa8ff4cf8de839ea65a2bb3ef Author: Qingqing Zhuo Date: Fri Dec 4 10:55:13 2020 -0500 drm/amd/display: handler not correctly checked at remove_irq_handler [why] handler is supposedly passed in as a function pointer; however, the entire struct amdgpu_dm_irq_handler_data gets from the list is used to check match. [how] use the interrupt_handler within amdgpu_dm_irq_handler_data for checking match. Signed-off-by: Qingqing Zhuo Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit 462fbeb1fcfcd35e453eeaa80d6d3d26464269fd Author: Hawking Zhang Date: Sat Nov 21 21:58:19 2020 +0800 drm/amdgpu: check gfx pipe availability before toggling its interrupts GUI_IDLE interrupts controlled by CP_INT_CNTL_RING0 are only applicable to me0 pipe0. For ASICs that have gfx pipe removed, don't toggle those bits. Signed-off-by: Hawking Zhang Reviewed-by: Feifei Xu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit d0f2f634f59d8f35e70644daf956bf04d2ff2d0c Author: Hawking Zhang Date: Sat Nov 21 21:07:12 2020 +0800 drm/amdgpu: remove unnecessary asic type check The number of crtc should be 0 for ASICs that don't have display engine. Remove the unnecessary asic type check then. Signed-off-by: Hawking Zhang Reviewed-by: Feifei Xu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 35b14475257f553a7cd60ce4b2571304644f652b Author: Hawking Zhang Date: Sat Nov 21 21:01:47 2020 +0800 drm/amdgpu: check number of gfx ring before init cp gfx Check number of gfx ring, rather than asic type, before cp gfx engine initialization so driver just need to make sure number of gfx ring is initialized correctly in gfx early_init phase. No need to add additional asic type check everywhere when there is new asic with gfx pipe removed. Signed-off-by: Hawking Zhang Reviewed-by: Feifei Xu Acked-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b250bf5f924f7b42725fc9e4135aa0b667dfb119 Author: Alex Elder Date: Tue Dec 22 09:16:13 2020 -0600 net: ipa: fix interconnect enable bug When the core clock rate and interconnect bandwidth specifications were moved into configuration data, a copy/paste bug was introduced, causing the memory interconnect bandwidth to be set three times rather than enabling the three different interconnects. Fix this bug. Fixes: 91d02f9551501 ("net: ipa: use config data for clocking") Signed-off-by: Alex Elder Reviewed-by: Georgi Djakov Link: https://lore.kernel.org/r/20201222151613.5730-1-elder@linaro.org Signed-off-by: Jakub Kicinski commit c06ccf3ebb7503706ea49fd248e709287ef385a3 Author: Takashi Iwai Date: Wed Dec 23 18:45:57 2020 +0100 ALSA: usb-audio: Fix UBSAN warnings for MIDI jacks The calculation of in_cables and out_cables bitmaps are done with the bit shift by the value from the descriptor, which is an arbitrary value, and can lead to UBSAN shift-out-of-bounds warnings. Fix it by filtering the bad descriptor values with the check of the upper bound 0x10 (the cable bitmaps are 16 bits). Reported-by: syzbot+92e45ae45543f89e8c88@syzkaller.appspotmail.com Cc: Link: https://lore.kernel.org/r/20201223174557.10249-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit de33212f768c5d9e2fe791b008cb26f92f0aa31c Author: Jeff Dike Date: Tue Dec 22 21:54:21 2020 -0500 virtio_net: Fix recursive call to cpus_read_lock() virtnet_set_channels can recursively call cpus_read_lock if CONFIG_XPS and CONFIG_HOTPLUG are enabled. The path is: virtnet_set_channels - calls get_online_cpus(), which is a trivial wrapper around cpus_read_lock() netif_set_real_num_tx_queues netif_reset_xps_queues_gt netif_reset_xps_queues - calls cpus_read_lock() This call chain and potential deadlock happens when the number of TX queues is reduced. This commit the removes netif_set_real_num_[tr]x_queues calls from inside the get/put_online_cpus section, as they don't require that it be held. Fixes: 47be24796c13 ("virtio-net: fix the set affinity bug when CPU IDs are not consecutive") Signed-off-by: Jeff Dike Acked-by: Jason Wang Acked-by: Michael S. Tsirkin Link: https://lore.kernel.org/r/20201223025421.671-1-jdike@akamai.com Signed-off-by: Jakub Kicinski commit 1c91f06d296de4f0c27022f5ec464e047d471215 Author: Alexandru Elisei Date: Tue Dec 1 15:01:55 2020 +0000 KVM: arm64: Move double-checked lock to kvm_vgic_map_resources() kvm_vgic_map_resources() is called when a VCPU if first run and it maps all the VGIC MMIO regions. To prevent double-initialization, the VGIC uses the ready variable to keep track of the state of resources and the global KVM mutex to protect against concurrent accesses. After the lock is taken, the variable is checked again in case another VCPU took the lock between the current VCPU reading ready equals false and taking the lock. The double-checked lock pattern is spread across four different functions: in kvm_vcpu_first_run_init(), in kvm_vgic_map_resource() and in vgic_{v2,v3}_map_resources(), which makes it hard to reason about and introduces minor code duplication. Consolidate the checks in kvm_vgic_map_resources(), where the lock is taken. No functional change intended. Signed-off-by: Alexandru Elisei Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201201150157.223625-4-alexandru.elisei@arm.com commit f16570ba47ff2b3766ebeaba6f4b80ad48cfd6a1 Author: Alexandru Elisei Date: Tue Dec 1 15:01:54 2020 +0000 KVM: arm64: arch_timer: Remove VGIC initialization check kvm_timer_enable() is called in kvm_vcpu_first_run_init() after kvm_vgic_map_resources() if the VGIC wasn't ready. kvm_vgic_map_resources() is the only place where kvm->arch.vgic.ready is set to true. For a v2 VGIC, kvm_vgic_map_resources() will attempt to initialize the VGIC and set the initialized flag. For a v3 VGIC, kvm_vgic_map_resources() will return an error code if the VGIC isn't already initialized. The end result is that if we've reached kvm_timer_enable(), the VGIC is initialzed and ready and vgic_initialized() will always be true, so remove this check. Signed-off-by: Alexandru Elisei Reviewed-by: Eric Auger [maz: added comment about vgic initialisation, as suggested by Eric] Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201201150157.223625-3-alexandru.elisei@arm.com commit 3557ae187c32203d1bb8b48ee1e2e7bdb23d98d5 Author: Alexandru Elisei Date: Tue Dec 1 15:01:53 2020 +0000 KVM: Documentation: Add arm64 KVM_RUN error codes The API documentation states that general error codes are not detailed, but errors with specific meanings are. On arm64, KVM_RUN can return error numbers with a different meaning than what is described by POSIX or the C99 standard (as taken from man 3 errno). Absent from the newly documented error codes is ERANGE which can be returned when making a change to the EL2 stage 1 tables if the address is larger than the largest supported input address. Assuming no bugs in the implementation, that is not possible because the input addresses which are mapped are the result of applying the macro kern_hyp_va() on kernel virtual addresses. CC: Paolo Bonzini Signed-off-by: Alexandru Elisei Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201201150157.223625-2-alexandru.elisei@arm.com commit 46926127d76359b46659c556df7b4aa1b6325d90 Author: Zheng Yongjun Date: Wed Dec 23 23:04:22 2020 +0800 md/bcache: convert comma to semicolon Replace a comma between expression statements by a semicolon. Signed-off-by: Zheng Yongjun Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 117ae250cfa3718f21bd07df0650dfbe3bc3a823 Author: Yi Li Date: Wed Dec 23 23:04:21 2020 +0800 bcache:remove a superfluous check in register_bcache There have no reassign the bdev after check It is IS_ERR. the double check !IS_ERR(bdev) is superfluous. After commit 4e7b5671c6a8 ("block: remove i_bdev"), "Switch the block device lookup interfaces to directly work with a dev_t so that struct block_device references are only acquired by the blkdev_get variants (and the blk-cgroup special case). This means that we now don't need an extra reference in the inode and can generally simplify handling of struct block_device to keep the lookups contained in the core block layer code." so after lookup_bdev call, there no need to do bdput. remove a superfluous check the bdev & don't call bdput after lookup_bdev. Fixes: 4e7b5671c6a8("block: remove i_bdev") Signed-off-by: Yi Li Reviewed-by: Christoph Hellwig Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit c1e8952395c1f44a6304c71401519d19ed2ac56a Author: Kailang Yang Date: Wed Dec 23 15:34:57 2020 +0800 ALSA: hda/realtek - Modify Dell platform name Dell platform SSID:0x0a58 change platform name. Use the generic name instead for avoiding confusion. Fixes: 150927c3674d ("ALSA: hda/realtek - Supported Dell fixed type headset") Signed-off-by: Kailang Yang Cc: Link: https://lore.kernel.org/r/efe7c196158241aa817229df7835d645@realtek.com Signed-off-by: Takashi Iwai commit f86de9b1c0663b0a3ca2dcddec9aa910ff0fbf2c Author: Kailang Yang Date: Fri Oct 23 14:46:47 2020 +0800 ALSA: hda/realtek - Fix speaker volume control on Lenovo C940 Cannot adjust speaker's volume on Lenovo C940. Applying the alc298_fixup_speaker_volume function can fix the issue. [ Additional note: C940 has I2S amp for the speaker and this needs the same initialization as Dell machines. The patch was slightly modified so that the quirk entry is moved next to the corresponding Dell quirk entry. -- tiwai ] Signed-off-by: Kailang Yang Cc: Link: https://lore.kernel.org/r/ea25b4e5c468491aa2e9d6cb1f2fced3@realtek.com Signed-off-by: Takashi Iwai commit c0e583ab2016de8dedfb73934d4c4e8ff5bd896c Author: Marco Chiappero Date: Tue Dec 22 13:00:24 2020 +0000 crypto: qat - add CRYPTO_AES to Kconfig dependencies This patch includes a missing dependency (CRYPTO_AES) which may lead to an "undefined reference to `aes_expandkey'" linking error. Fixes: 5106dfeaeabe ("crypto: qat - add AES-XTS support for QAT GEN4 devices") Reported-by: kernel test robot Signed-off-by: Marco Chiappero Signed-off-by: Herbert Xu commit 167316a5a08370064d7f8b96835dae271a8ce3ee Author: Daniele Alessandrelli Date: Thu Dec 17 16:35:10 2020 +0000 crypto: keembay - Add dependency on HAS_IOMEM Add dependency for CRYPTO_DEV_KEEMBAY_OCS_AES_SM4 on HAS_IOMEM to prevent build failures. Fixes: 88574332451380f4 ("crypto: keembay - Add support for Keem Bay OCS AES/SM4") Reported-by: kernel test robot Signed-off-by: Daniele Alessandrelli Signed-off-by: Herbert Xu commit c5b840a28b5257173f65b756cc6f3d06870c7881 Author: Geert Uytterhoeven Date: Wed Dec 16 14:14:59 2020 +0100 crypto: keembay - CRYPTO_DEV_KEEMBAY_OCS_AES_SM4 should depend on ARCH_KEEMBAY The Intel Keem Bay Offload and Crypto Subsystem (OCS) is only present on Intel Keem Bay SoCs. Hence add a dependency on ARCH_KEEMBAY, to prevent asking the user about this driver when configuring a kernel without Intel Keem Bay platform support. While at it, fix a misspelling of "cipher". Fixes: 88574332451380f4 ("crypto: keembay - Add support for Keem Bay OCS AES/SM4") Signed-off-by: Geert Uytterhoeven Acked-by: Daniele Alessandrelli Signed-off-by: Herbert Xu commit e77c725a445ac07c95c666b3bfb5b4105e9b0068 Merge: 5d5647dad259b bfe55584713b4 Author: Jakub Kicinski Date: Tue Dec 22 19:43:32 2020 -0800 Merge tag 'wireless-drivers-2020-12-22' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for v5.11 First set of fixes for v5.11, more fixes than usual this time. For ath11k we have several fixes for QCA6390 PCI support and mt76 has several. Also one build fix for mt76. mt76 * fix two NULL pointer dereference * fix build error when CONFIG_MAC80211_MESH is disabled rtlwifi * fix use-after-free in firmware handling code ath11k * error handling fixes * fix crash found during connect and disconnect test * handle HT disable better * avoid printing qmi memory failure during firmware bootup * disable ASPM during firmware bootup * tag 'wireless-drivers-2020-12-22' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers: MAINTAINERS: switch to different email address mt76: mt7915: fix MESH ifdef block mt76: mt76s: fix NULL pointer dereference in mt76s_process_tx_queue mt76: sdio: remove wake logic in mt76s_process_tx_queue mt76: usb: remove wake logic in mt76u_status_worker ath11k: pci: disable ASPM L0sLs before downloading firmware ath11k: qmi: try to allocate a big block of DMA memory first rtlwifi: rise completion at the last step of firmware callback mt76: mt76u: fix NULL pointer dereference in mt76u_status_worker ath11k: Fix ath11k_pci_fix_l1ss() ath11k: Fix error code in ath11k_core_suspend() ath11k: start vdev if a bss peer is already created ath11k: fix crash caused by NULL rx_channel ath11k: add missing null check on allocated skb ==================== Link: https://lore.kernel.org/r/20201222163727.D4336C433C6@smtp.codeaurora.org Signed-off-by: Jakub Kicinski commit 5d5647dad259bb416fd5d3d87012760386d97530 Author: Manish Chopra Date: Mon Dec 21 06:55:30 2020 -0800 qede: fix offload for IPIP tunnel packets IPIP tunnels packets are unknown to device, hence these packets are incorrectly parsed and caused the packet corruption, so disable offlods for such packets at run time. Signed-off-by: Manish Chopra Signed-off-by: Sudarsana Kalluru Signed-off-by: Igor Russkikh Link: https://lore.kernel.org/r/20201221145530.7771-1-manishc@marvell.com Signed-off-by: Jakub Kicinski commit 1d898b283576c38dedcb6b21fcbb65968ab03581 Author: Baruch Siach Date: Sun Dec 20 10:49:47 2020 +0200 docs: netdev-FAQ: fix question headers formatting Join adjacent questions to a single question line. This fixes the formatting of questions that were not part of the heading. Also, drop Q: and A: prefixes. We don't need them now that questions and answers are visually separated. Signed-off-by: Baruch Siach Link: https://lore.kernel.org/r/f76078ba5547744f2ec178984c32fbc7dcd29a2b.1608454187.git.baruch@tkos.co.il Signed-off-by: Jakub Kicinski commit 58f60329a6be35a5653edb3fd2023ccef9eb9943 Author: Dinghao Liu Date: Sun Dec 20 16:29:30 2020 +0800 net: ethernet: mvneta: Fix error handling in mvneta_probe When mvneta_port_power_up() fails, we should execute cleanup functions after label err_netdev to avoid memleak. Fixes: 41c2b6b4f0f80 ("net: ethernet: mvneta: Add back interface mode validation") Signed-off-by: Dinghao Liu Link: https://lore.kernel.org/r/20201220082930.21623-1-dinghao.liu@zju.edu.cn Signed-off-by: Jakub Kicinski commit a0c8be56affa7d5ffbdec24c992223be54db3b6e Author: Lijun Pan Date: Sat Dec 19 15:39:19 2020 -0600 ibmvnic: fix login buffer memory leak Commit 34f0f4e3f488 ("ibmvnic: Fix login buffer memory leaks") frees login_rsp_buffer in release_resources() and send_login() because handle_login_rsp() does not free it. Commit f3ae59c0c015 ("ibmvnic: store RX and TX subCRQ handle array in ibmvnic_adapter struct") frees login_rsp_buffer in handle_login_rsp(). It seems unnecessary to free it in release_resources() and send_login(). There are chances that handle_login_rsp returns earlier without freeing buffers. Double-checking the buffer is harmless since release_login_buffer and release_login_rsp_buffer will do nothing if buffer is already freed. Fixes: f3ae59c0c015 ("ibmvnic: store RX and TX subCRQ handle array in ibmvnic_adapter struct") Fixes: 34f0f4e3f488 ("ibmvnic: Fix login buffer memory leaks") Signed-off-by: Lijun Pan Link: https://lore.kernel.org/r/20201219213919.21045-1-ljp@linux.ibm.com Signed-off-by: Jakub Kicinski commit 8b0f64b113d617c995ffdf50196948c3e99c6e49 Author: Jakub Kicinski Date: Sat Dec 19 10:55:38 2020 -0800 MAINTAINERS: remove names from mailing list maintainers When searching for inactive maintainers it's useful to filter out mailing list addresses. Such "maintainers" will obviously never feature in a "From:" line of an email or a review tag. Since "L:" entries only provide the address of a mailing list without a fancy name extend this pattern to "M:" entries. Alternatively we could reserve M: entries for humans only and move the fake "maintainers" to L:. While I'd personally prefer to reserve M: for humans only, I'm not 100% that's a great choice either, given most L: entries are in fact open mailing lists with public archives. Link: https://lore.kernel.org/r/20201219185538.750076-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit f87777a3c30cf50c66a20e1d153f0e003bb30774 Author: Martin Blumenstingl Date: Sat Dec 19 14:50:36 2020 +0100 net: stmmac: dwmac-meson8b: ignore the second clock input The dwmac glue registers on Amlogic Meson8b and newer SoCs has two clock inputs: - Meson8b and Meson8m2: MPLL2 and MPLL2 (the same parent is wired to both inputs) - GXBB, GXL, GXM, AXG, G12A, G12B, SM1: FCLK_DIV2 and MPLL2 All known vendor kernels and u-boots are using the first input only. We let the common clock framework automatically choose the "right" parent. For some boards this causes a problem though, specificially with G12A and newer SoCs. The clock input is used for generating the 125MHz RGMII TX clock. For the two input clocks this means on G12A: - FCLK_DIV2: 999999985Hz / 8 = 124999998.125Hz - MPLL2: 499999993Hz / 4 = 124999998.25Hz In theory MPLL2 is the "better" clock input because it's gets us 0.125Hz closer to the requested frequency than FCLK_DIV2. In reality however there is a resource conflict because MPLL2 is needed to generate some of the audio clocks. dwmac-meson8b probes first and sets up the clock tree with MPLL2. This works fine until the audio driver comes and "steals" the MPLL2 clocks and configures it with it's own rate (294909637Hz). The common clock framework happily changes the MPLL2 rate but does not reconfigure our RGMII TX clock tree, which then ends up at 73727409Hz, which is more than 40% off the requested 125MHz. Don't use the second clock input for now to force the common clock framework to always select the first parent. This mimics the behavior from the vendor driver and fixes the clock resource conflict with the audio driver on G12A boards. Once the common clock framework can handle this situation this change can be reverted again. Fixes: 566e8251625304 ("net: stmmac: add a glue driver for the Amlogic Meson 8b / GXBB DWMAC") Reported-by: Thomas Graichen Signed-off-by: Martin Blumenstingl Tested-by: thomas graichen Link: https://lore.kernel.org/r/20201219135036.3216017-1-martin.blumenstingl@googlemail.com Signed-off-by: Jakub Kicinski commit 2b8f061a4f505aad11fd36adb24c3138ad09b96b Author: Rob Herring Date: Mon Dec 21 21:06:45 2020 -0700 dt-bindings: Drop redundant maxItems/items 'maxItems' equal to the 'items' list length is redundant. 'maxItems' is preferred for a single entry while greater than 1 should have an 'items' list. A meta-schema check for this is pending once these existing cases are fixed. Cc: Greg Kroah-Hartman Cc: dri-devel@lists.freedesktop.org Cc: dmaengine@vger.kernel.org Cc: alsa-devel@alsa-project.org Cc: linux-usb@vger.kernel.org Acked-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Acked-by: Vinod Koul Acked-by: Jassi Brar Acked-by: Mark Brown Link: https://lore.kernel.org/r/20201222040645.1323611-1-robh@kernel.org Signed-off-by: Rob Herring commit 246eedd70da91d57bf485bd558c50f7b2286c462 Author: Rob Herring Date: Mon Dec 21 21:01:21 2020 -0700 dt-bindings: net: qcom,ipa: Drop unnecessary type ref on 'memory-region' 'memory-region' is a common property, so it doesn't need a type ref here. Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Alex Elder Cc: netdev@vger.kernel.org Acked-by: Alex Elder Link: https://lore.kernel.org/r/20201222040121.1314370-1-robh@kernel.org Signed-off-by: Rob Herring commit 9bfaf9c729a924c048eaf2032ce932b3c724dc27 Author: Rob Herring Date: Mon Dec 21 16:46:59 2020 -0700 dt-bindings: Drop unnecessary *-supply schemas properties *-supply properties are always a single phandle, so binding schemas don't need a type $ref nor 'maxItems'. A meta-schema check for this is pending once these existing cases are fixed. Cc: Jonathan Cameron Cc: Dmitry Torokhov Cc: Mauro Carvalho Chehab Cc: Maxime Ripard Cc: dri-devel@lists.freedesktop.org Cc: linux-iio@vger.kernel.org Cc: linux-input@vger.kernel.org Cc: linux-media@vger.kernel.org Acked-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Acked-by: Sakari Ailus Acked-by: Lee Jones Acked-by: Mark Brown Link: https://lore.kernel.org/r/20201221234659.824881-1-robh@kernel.org Signed-off-by: Rob Herring commit c07e6719511e77c4b289f62bfe96423eb6ea061d Author: Xiaoguang Wang Date: Mon Dec 14 23:49:41 2020 +0800 io_uring: hold uring_lock while completing failed polled io in io_wq_submit_work() io_iopoll_complete() does not hold completion_lock to complete polled io, so in io_wq_submit_work(), we can not call io_req_complete() directly, to complete polled io, otherwise there maybe concurrent access to cqring, defer_list, etc, which is not safe. Commit dad1b1242fd5 ("io_uring: always let io_iopoll_complete() complete polled io") has fixed this issue, but Pavel reported that IOPOLL apart from rw can do buf reg/unreg requests( IORING_OP_PROVIDE_BUFFERS or IORING_OP_REMOVE_BUFFERS), so the fix is not good. Given that io_iopoll_complete() is always called under uring_lock, so here for polled io, we can also get uring_lock to fix this issue. Fixes: dad1b1242fd5 ("io_uring: always let io_iopoll_complete() complete polled io") Cc: # 5.5+ Signed-off-by: Xiaoguang Wang Reviewed-by: Pavel Begunkov [axboe: don't deref 'req' after completing it'] Signed-off-by: Jens Axboe commit 9faadcc8abe4b83d0263216dc3a6321d5bbd616b Author: Pavel Begunkov Date: Mon Dec 21 18:34:05 2020 +0000 io_uring: fix double io_uring free Once we created a file for current context during setup, we should not call io_ring_ctx_wait_and_kill() directly as it'll be done by fput(file) Cc: stable@vger.kernel.org # 5.10 Reported-by: syzbot+c9937dfb2303a5f18640@syzkaller.appspotmail.com Signed-off-by: Pavel Begunkov [axboe: fix unused 'ret' for !CONFIG_UNIX] Signed-off-by: Jens Axboe commit 942cb357ae7d9249088e3687ee6a00ed2745a0c7 Author: Casey Schaufler Date: Tue Dec 22 15:34:24 2020 -0800 Smack: Handle io_uring kernel thread privileges Smack assumes that kernel threads are privileged for smackfs operations. This was necessary because the credential of the kernel thread was not related to a user operation. With io_uring the credential does reflect a user's rights and can be used. Suggested-by: Jens Axboe Acked-by: Jens Axboe Acked-by: Eric W. Biederman Signed-off-by: Casey Schaufler commit 614cb5894306cfa2c7d9b6168182876ff5948735 Merge: 4960821a4d807 538fcf57aaee6 Author: Linus Torvalds Date: Tue Dec 22 14:19:21 2020 -0800 Merge tag 'acpi-5.11-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more ACPI updates from Rafael Wysocki: "These make the ACPI enumeration of devices take _DEP information into account more aggressively, fix device IDs matching in the ACPI part of the PNP devices framework and update the ACPI code related to suspend-to-idle to take systems based on AMD hardware into account properly. Specifics: - Modify the ACPI device enumeration code to defer the enumeration of devices with an _HID whose lists of operation region dependencies returned by _DEP are not empty after eliminating the entries representing known-benign dependencies from them (Rafael Wysocki, Hans de Goede). - Make the ACPI PNP code mathing device IDs also take the length of the given ID string into account (Hui Wang). - Add AMD systems support to the ACPI code handling suspend-to-idle via the PNP0D80 (System Power Management Controller) device _DSM interface (Shyam Sundar). - Move the suspend-to-idle handling code related to the PNP0D80 device _DSM interface, which is x86-specific, to a separate file in the x86/ subdirectory (Rafael Wysocki)" * tag 'acpi-5.11-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: PM: s2idle: Move x86-specific code to the x86 directory ACPI: scan: Add Intel Baytrail Mailbox Device to acpi_ignore_dep_ids ACPI: scan: Avoid unnecessary second pass in acpi_bus_scan() ACPI: scan: Defer enumeration of devices with _DEP lists ACPI: scan: Evaluate _DEP before adding the device ACPI: PM: s2idle: Add AMD support to handle _DSM ACPI: PNP: compare the string length in the matching_id() commit 4960821a4d80781fd3e63cd71fb1b38c2dadb915 Merge: 2762db756f422 c3a74f8e25e97 Author: Linus Torvalds Date: Tue Dec 22 14:12:10 2020 -0800 Merge tag 'pm-5.11-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more power management updates from Rafael Wysocki: "These update the CPPC cpufreq driver and intel_pstate (which involves updating the cpufreq core and the schedutil governor) and make janitorial changes in the ACPI code handling processor objects. Specifics: - Rework the passive-mode "fast switch" path in the intel_pstate driver to allow it receive the minimum (required) and target (desired) performance information from the schedutil governor so as to avoid running some workloads too fast (Rafael Wysocki). - Make the intel_pstate driver allow the policy max limit to be increased after the guaranteed performance value for the given CPU has increased (Rafael Wysocki). - Clean up the handling of CPU coordination types in the CPPC cpufreq driver and make it export frequency domains information to user space via sysfs (Ionela Voinescu). - Fix the ACPI code handling processor objects to use a correct coordination type when it fails to map frequency domains and drop a redundant CPU map initialization from it (Ionela Voinescu, Punit Agrawal)" * tag 'pm-5.11-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: intel_pstate: Use most recent guaranteed performance values cpufreq: intel_pstate: Implement the ->adjust_perf() callback cpufreq: Add special-purpose fast-switching callback for drivers cpufreq: schedutil: Add util to struct sg_cpu cppc_cpufreq: replace per-cpu data array with a list cppc_cpufreq: expose information on frequency domains cppc_cpufreq: clarify support for coordination types cppc_cpufreq: use policy->cpu as driver of frequency setting ACPI: processor: fix NONE coordination for domain mapping failure commit 2762db756f422861c70868bc2d4b9b5d1ce6a59d Merge: 7b95f0563ab5a 90d39628ac799 Author: Linus Torvalds Date: Tue Dec 22 14:04:25 2020 -0800 Merge tag 'kconfig-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kconfig updates from Masahiro Yamada: - Support only Qt5 for qconf - Validate signal/slot connection at compile time of qconf - Sanitize header includes * tag 'kconfig-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kconfig: doc: fix $(fileno) to $(filename) kconfig: fix return value of do_error_if() kconfig: clean up header inclusion kconfig: qconf: show Qt version in the About dialog kconfig: make lkc.h self-sufficient #include-wise kconfig: qconf: convert to Qt5 new signal/slot connection syntax kconfig: qconf: use a variable to pass packages to pkg-config kconfig: qconf: drop Qt4 support commit 7b95f0563ab5a8f75195cdd4b2c3325c0c1df319 Merge: 1375b9803e007 18084e435ff6e Author: Linus Torvalds Date: Tue Dec 22 14:02:39 2020 -0800 Merge tag 'kbuild-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild updates from Masahiro Yamada: - Use /usr/bin/env for shebang lines in scripts - Remove useless -Wnested-externs warning flag - Update documents - Refactor log handling in modpost - Stop building modules without MODULE_LICENSE() tag - Make the insane combination of 'static' and EXPORT_SYMBOL an error - Improve genksyms to handle _Static_assert() * tag 'kbuild-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: Documentation/kbuild: Document platform dependency practises Documentation/kbuild: Document COMPILE_TEST dependencies genksyms: Ignore module scoped _Static_assert() modpost: turn static exports into error modpost: turn section mismatches to error from fatal() modpost: change license incompatibility to error() from fatal() modpost: turn missing MODULE_LICENSE() into error modpost: refactor error handling and clarify error/fatal difference modpost: rename merror() to error() kbuild: don't hardcode depmod path kbuild: doc: document subdir-y syntax kbuild: doc: clarify the difference between extra-y and always-y kbuild: doc: split if_changed explanation to a separate section kbuild: doc: merge 'Special Rules' and 'Custom kbuild commands' sections kbuild: doc: fix 'List directories to visit when descending' section kbuild: doc: replace arch/$(ARCH)/ with arch/$(SRCARCH)/ kbuild: doc: update the description about kbuild Makefiles Makefile.extrawarn: remove -Wnested-externs warning tweewide: Fix most Shebang lines commit 1375b9803e007842493c64d0d73d7dd0e385e17c Merge: c45647f9f562b 625d867347c9e Author: Linus Torvalds Date: Tue Dec 22 13:38:17 2020 -0800 Merge branch 'akpm' (patches from Andrew) Merge KASAN updates from Andrew Morton. This adds a new hardware tag-based mode to KASAN. The new mode is similar to the existing software tag-based KASAN, but relies on arm64 Memory Tagging Extension (MTE) to perform memory and pointer tagging (instead of shadow memory and compiler instrumentation). By Andrey Konovalov and Vincenzo Frascino. * emailed patches from Andrew Morton : (60 commits) kasan: update documentation kasan, mm: allow cache merging with no metadata kasan: sanitize objects when metadata doesn't fit kasan: clarify comment in __kasan_kfree_large kasan: simplify assign_tag and set_tag calls kasan: don't round_up too much kasan, mm: rename kasan_poison_kfree kasan, mm: check kasan_enabled in annotations kasan: add and integrate kasan boot parameters kasan: inline (un)poison_range and check_invalid_free kasan: open-code kasan_unpoison_slab kasan: inline random_tag for HW_TAGS kasan: inline kasan_reset_tag for tag-based modes kasan: remove __kasan_unpoison_stack kasan: allow VMAP_STACK for HW_TAGS mode kasan, arm64: unpoison stack only with CONFIG_KASAN_STACK kasan: introduce set_alloc_info kasan: rename get_alloc/free_info kasan: simplify quarantine_put call site kselftest/arm64: check GCR_EL1 after context switch ... commit c45647f9f562b52915b43b6bb447827cebf511bd Merge: d8355e740f419 ecbbb88727aee Author: Linus Torvalds Date: Tue Dec 22 13:34:27 2020 -0800 Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux Pull ARM updates from Russell King: - Rework phys/virt translation - Add KASan support - Move DT out of linear map region - Use more PC-relative addressing in assembly - Remove FP emulation handling while in kernel mode - Link with '-z norelro' - remove old check for GCC <= 4.2 in ARM unwinder code - disable big endian if using clang's linker * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: (46 commits) ARM: 9027/1: head.S: explicitly map DT even if it lives in the first physical section ARM: 9038/1: Link with '-z norelro' ARM: 9037/1: uncompress: Add OF_DT_MAGIC macro ARM: 9036/1: uncompress: Fix dbgadtb size parameter name ARM: 9035/1: uncompress: Add be32tocpu macro ARM: 9033/1: arm/smp: Drop the macro S(x,s) ARM: 9032/1: arm/mm: Convert PUD level pgtable helper macros into functions ARM: 9031/1: hyp-stub: remove unused .L__boot_cpu_mode_offset symbol ARM: 9044/1: vfp: use undef hook for VFP support detection ARM: 9034/1: __div64_32(): straighten up inline asm constraints ARM: 9030/1: entry: omit FP emulation for UND exceptions taken in kernel mode ARM: 9029/1: Make iwmmxt.S support Clang's integrated assembler ARM: 9028/1: disable KASAN in call stack capturing routines ARM: 9026/1: unwind: remove old check for GCC <= 4.2 ARM: 9025/1: Kconfig: CPU_BIG_ENDIAN depends on !LD_IS_LLD ARM: 9024/1: Drop useless cast of "u64" to "long long" ARM: 9023/1: Spelling s/mmeory/memory/ ARM: 9022/1: Change arch/arm/lib/mem*.S to use WEAK instead of .weak ARM: kvm: replace open coded VA->PA calculations with adr_l call ARM: head.S: use PC relative insn sequence to calculate PHYS_OFFSET ... commit d8355e740f419a081796e869bafdfc0756b0bf2a Merge: 4e31dcc0a9231 b77709237e72d Author: Linus Torvalds Date: Tue Dec 22 13:27:21 2020 -0800 Merge tag 'for-5.11/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper updates from Mike Snitzer: - Add DM verity support for signature verification with 2nd keyring - Fix DM verity to skip verity work if IO completes with error while system is shutting down - Add new DM multipath "IO affinity" path selector that maps IO destined to a given path to a specific CPU based on user provided mapping - Rename DM multipath path selector source files to have "dm-ps" prefix - Add REQ_NOWAIT support to some other simple DM targets that don't block in more elaborate ways waiting for IO - Export DM crypt's kcryptd workqueue via sysfs (WQ_SYSFS) - Fix error return code in DM's target_message() if empty message is received - A handful of other small cleanups * tag 'for-5.11/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm cache: simplify the return expression of load_mapping() dm ebs: avoid double unlikely() notation when using IS_ERR() dm verity: skip verity work if I/O error when system is shutting down dm crypt: export sysfs of kcryptd workqueue dm ioctl: fix error return code in target_message dm crypt: Constify static crypt_iv_operations dm: add support for REQ_NOWAIT to various targets dm: rename multipath path selector source files to have "dm-ps" prefix dm mpath: add IO affinity path selector dm verity: Add support for signature verification with 2nd keyring dm: remove unnecessary current->bio_list check when submitting split bio commit 4e31dcc0a9231462f0e275544b5aebc668481a4e Merge: 347d81b68b8f7 0a4e668b5d52e Author: Linus Torvalds Date: Tue Dec 22 13:24:33 2020 -0800 Merge tag 'hwmon-for-v5.11-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull another hwmon update from Guenter Roeck: "The only patch in this series is removal of voltage and current reporting for AMD Zen CPUs. Turns out that was not worth the trouble, because it's all undocumented and not maintainable" * tag 'hwmon-for-v5.11-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (k10temp) Remove support for displaying voltage and current on Zen CPUs commit 347d81b68b8f7044c9ce3fefa130a736ca916176 Merge: 4f06f210673e6 7679325702c90 Author: Linus Torvalds Date: Tue Dec 22 13:19:43 2020 -0800 Merge tag 'dma-mapping-5.11' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping updates from Christoph Hellwig: - support for a partial IOMMU bypass (Alexey Kardashevskiy) - add a DMA API benchmark (Barry Song) - misc fixes (Tiezhu Yang, tangjianqiang) * tag 'dma-mapping-5.11' of git://git.infradead.org/users/hch/dma-mapping: selftests/dma: add test application for DMA_MAP_BENCHMARK dma-mapping: add benchmark support for streaming DMA APIs dma-contiguous: fix a typo error in a comment dma-pool: no need to check return value of debugfs_create functions powerpc/dma: Fallback to dma_ops when persistent memory present dma-mapping: Allow mixing bypass and mapped DMA operation commit 4f06f210673e6841439a0f91fcde64960cdbeb5c Merge: e9e541ecfee39 65cdb4a214c00 Author: Linus Torvalds Date: Tue Dec 22 13:17:03 2020 -0800 Merge tag 'configfs-5.11' of git://git.infradead.org/users/hch/configfs Pull configfs update from Christoph Hellwig: "Fix a kerneldoc comment (Alex Shi)" * tag 'configfs-5.11' of git://git.infradead.org/users/hch/configfs: configfs: fix kernel-doc markup issue commit e9e541ecfee39745da042ff5194b0813bb4c3f9c Merge: e14fd4ba8fb47 9eb78c2532754 Author: Linus Torvalds Date: Tue Dec 22 13:15:31 2020 -0800 Merge tag 'exfat-for-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat Pull exfat update from Namjae Jeon: "Avoid page allocation failure from upcase table allocation" * tag 'exfat-for-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat: exfat: Avoid allocating upcase table using kcalloc() commit e14fd4ba8fb47fcf5f244366ec01ae94490cd86a Author: Andi Kleen Date: Tue Dec 22 09:40:10 2020 -0800 x86/split-lock: Avoid returning with interrupts enabled When a split lock is detected always make sure to disable interrupts before returning from the trap handler. The kernel exit code assumes that all exits run with interrupts disabled, otherwise the SWAPGS sequence can race against interrupts and cause recursing page faults and later panics. The problem will only happen on CPUs with split lock disable functionality, so Icelake Server, Tiger Lake, Snow Ridge, Jacobsville. Fixes: ca4c6a9858c2 ("x86/traps: Make interrupt enable/disable symmetric in C code") Fixes: bce9b042ec73 ("x86/traps: Disable interrupts in exc_aligment_check()") # v5.8+ Signed-off-by: Andi Kleen Cc: Peter Zijlstra Cc: Fenghua Yu Cc: Tony Luck Reviewed-by: Thomas Gleixner Signed-off-by: Linus Torvalds commit 625d867347c9e84d1ac3c953e1b689f65b603bed Author: Andrey Konovalov Date: Tue Dec 22 12:03:35 2020 -0800 kasan: update documentation This change updates KASAN documentation to reflect the addition of boot parameters and also reworks and clarifies some of the existing sections, in particular: defines what a memory granule is, mentions quarantine, makes Kunit section more readable. Link: https://lkml.kernel.org/r/748daf013e17d925b0fe00c1c3b5dce726dd2430.1606162397.git.andreyknvl@google.com Link: https://linux-review.googlesource.com/id/Ib1f83e91be273264b25f42b04448ac96b858849f Signed-off-by: Andrey Konovalov Reviewed-by: Dmitry Vyukov Reviewed-by: Marco Elver Tested-by: Vincenzo Frascino Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e86f8b09f215e3755cd2d56930487dec2de02433 Author: Andrey Konovalov Date: Tue Dec 22 12:03:31 2020 -0800 kasan, mm: allow cache merging with no metadata The reason cache merging is disabled with KASAN is because KASAN puts its metadata right after the allocated object. When the merged caches have slightly different sizes, the metadata ends up in different places, which KASAN doesn't support. It might be possible to adjust the metadata allocation algorithm and make it friendly to the cache merging code. Instead this change takes a simpler approach and allows merging caches when no metadata is present. Which is the case for hardware tag-based KASAN with kasan.mode=prod. Link: https://lkml.kernel.org/r/37497e940bfd4b32c0a93a702a9ae4cf061d5392.1606162397.git.andreyknvl@google.com Link: https://linux-review.googlesource.com/id/Ia114847dfb2244f297d2cb82d592bf6a07455dba Co-developed-by: Vincenzo Frascino Signed-off-by: Vincenzo Frascino Signed-off-by: Andrey Konovalov Reviewed-by: Dmitry Vyukov Reviewed-by: Marco Elver Tested-by: Vincenzo Frascino Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 97593cad003c668e2532cb2939a24a031f8de52d Author: Andrey Konovalov Date: Tue Dec 22 12:03:28 2020 -0800 kasan: sanitize objects when metadata doesn't fit KASAN marks caches that are sanitized with the SLAB_KASAN cache flag. Currently if the metadata that is appended after the object (stores e.g. stack trace ids) doesn't fit into KMALLOC_MAX_SIZE (can only happen with SLAB, see the comment in the patch), KASAN turns off sanitization completely. With this change sanitization of the object data is always enabled. However the metadata is only stored when it fits. Instead of checking for SLAB_KASAN flag accross the code to find out whether the metadata is there, use cache->kasan_info.alloc/free_meta_offset. As 0 can be a valid value for free_meta_offset, introduce KASAN_NO_FREE_META as an indicator that the free metadata is missing. Without this change all sanitized KASAN objects would be put into quarantine with generic KASAN. With this change, only the objects that have metadata (i.e. when it fits) are put into quarantine, the rest is freed right away. Along the way rework __kasan_cache_create() and add claryfying comments. Link: https://lkml.kernel.org/r/aee34b87a5e4afe586c2ac6a0b32db8dc4dcc2dc.1606162397.git.andreyknvl@google.com Link: https://linux-review.googlesource.com/id/Icd947e2bea054cb5cfbdc6cf6652227d97032dcb Co-developed-by: Vincenzo Frascino Signed-off-by: Vincenzo Frascino Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Tested-by: Vincenzo Frascino Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3933c1757163e8fb471a2d306ba769a04a698900 Author: Andrey Konovalov Date: Tue Dec 22 12:03:24 2020 -0800 kasan: clarify comment in __kasan_kfree_large Currently it says that the memory gets poisoned by page_alloc code. Clarify this by mentioning the specific callback that poisons the memory. Link: https://lkml.kernel.org/r/1c8380fe0332a3bcc720fe29f1e0bef2e2974416.1606162397.git.andreyknvl@google.com Link: https://linux-review.googlesource.com/id/I1334dffb69b87d7986fab88a1a039cc3ea764725 Signed-off-by: Andrey Konovalov Reviewed-by: Dmitry Vyukov Reviewed-by: Marco Elver Tested-by: Vincenzo Frascino Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1ef3133bd3b8627a99af2535a923a488563737a6 Author: Andrey Konovalov Date: Tue Dec 22 12:03:20 2020 -0800 kasan: simplify assign_tag and set_tag calls set_tag() already ignores the tag for the generic mode, so just call it as is. Add a check for the generic mode to assign_tag(), and simplify its call in ____kasan_kmalloc(). Link: https://lkml.kernel.org/r/121eeab245f98555862b289d2ba9269c868fbbcf.1606162397.git.andreyknvl@google.com Link: https://linux-review.googlesource.com/id/I18905ca78fb4a3d60e1a34a4ca00247272480438 Signed-off-by: Andrey Konovalov Reviewed-by: Dmitry Vyukov Reviewed-by: Marco Elver Tested-by: Vincenzo Frascino Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d99f6a10c161227ae7a698470b1cff7b33734d4a Author: Andrey Konovalov Date: Tue Dec 22 12:03:17 2020 -0800 kasan: don't round_up too much For hardware tag-based mode kasan_poison_memory() already rounds up the size. Do the same for software modes and remove round_up() from the common code. Link: https://lkml.kernel.org/r/47b232474f1f89dc072aeda0fa58daa6efade377.1606162397.git.andreyknvl@google.com Link: https://linux-review.googlesource.com/id/Ib397128fac6eba874008662b4964d65352db4aa4 Signed-off-by: Andrey Konovalov Reviewed-by: Dmitry Vyukov Reviewed-by: Marco Elver Tested-by: Vincenzo Frascino Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit eeb3160c2419e0f1045537acac7b19cba64112f4 Author: Andrey Konovalov Date: Tue Dec 22 12:03:13 2020 -0800 kasan, mm: rename kasan_poison_kfree Rename kasan_poison_kfree() to kasan_slab_free_mempool() as it better reflects what this annotation does. Also add a comment that explains the PageSlab() check. No functional changes. Link: https://lkml.kernel.org/r/141675fb493555e984c5dca555e9d9f768c7bbaa.1606162397.git.andreyknvl@google.com Link: https://linux-review.googlesource.com/id/I5026f87364e556b506ef1baee725144bb04b8810 Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Tested-by: Vincenzo Frascino Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 34303244f2615add92076a4bf2d4f39323bde4f2 Author: Andrey Konovalov Date: Tue Dec 22 12:03:10 2020 -0800 kasan, mm: check kasan_enabled in annotations Declare the kasan_enabled static key in include/linux/kasan.h and in include/linux/mm.h and check it in all kasan annotations. This allows to avoid any slowdown caused by function calls when kasan_enabled is disabled. Link: https://lkml.kernel.org/r/9f90e3c0aa840dbb4833367c2335193299f69023.1606162397.git.andreyknvl@google.com Link: https://linux-review.googlesource.com/id/I2589451d3c96c97abbcbf714baabe6161c6f153e Co-developed-by: Vincenzo Frascino Signed-off-by: Vincenzo Frascino Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Reviewed-by: Dmitry Vyukov Tested-by: Vincenzo Frascino Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8028caaca7a8107a52bb28fd92dea35bebd7ae8e Author: Andrey Konovalov Date: Tue Dec 22 12:03:06 2020 -0800 kasan: add and integrate kasan boot parameters Hardware tag-based KASAN mode is intended to eventually be used in production as a security mitigation. Therefore there's a need for finer control over KASAN features and for an existence of a kill switch. This change adds a few boot parameters for hardware tag-based KASAN that allow to disable or otherwise control particular KASAN features. The features that can be controlled are: 1. Whether KASAN is enabled at all. 2. Whether KASAN collects and saves alloc/free stacks. 3. Whether KASAN panics on a detected bug or not. With this change a new boot parameter kasan.mode allows to choose one of three main modes: - kasan.mode=off - KASAN is disabled, no tag checks are performed - kasan.mode=prod - only essential production features are enabled - kasan.mode=full - all KASAN features are enabled The chosen mode provides default control values for the features mentioned above. However it's also possible to override the default values by providing: - kasan.stacktrace=off/on - enable alloc/free stack collection (default: on for mode=full, otherwise off) - kasan.fault=report/panic - only report tag fault or also panic (default: report) If kasan.mode parameter is not provided, it defaults to full when CONFIG_DEBUG_KERNEL is enabled, and to prod otherwise. It is essential that switching between these modes doesn't require rebuilding the kernel with different configs, as this is required by the Android GKI (Generic Kernel Image) initiative [1]. [1] https://source.android.com/devices/architecture/kernel/generic-kernel-image [andreyknvl@google.com: don't use read-only static keys] Link: https://lkml.kernel.org/r/f2ded589eba1597f7360a972226083de9afd86e2.1607537948.git.andreyknvl@google.com Link: https://lkml.kernel.org/r/cb093613879d8d8841173f090133eddeb4c35f1f.1606162397.git.andreyknvl@google.com Link: https://linux-review.googlesource.com/id/If7d37003875b2ed3e0935702c8015c223d6416a4 Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Reviewed-by: Dmitry Vyukov Tested-by: Vincenzo Frascino Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 57345fa68a2769e3bd2b6ca01794fba74e6fa938 Author: Andrey Konovalov Date: Tue Dec 22 12:03:03 2020 -0800 kasan: inline (un)poison_range and check_invalid_free Using (un)poison_range() or check_invalid_free() currently results in function calls. Move their definitions to mm/kasan/kasan.h and turn them into static inline functions for hardware tag-based mode to avoid unneeded function calls. Link: https://lkml.kernel.org/r/7007955b69eb31b5376a7dc1e0f4ac49138504f2.1606162397.git.andreyknvl@google.com Link: https://linux-review.googlesource.com/id/Ia9d8191024a12d1374675b3d27197f10193f50bb Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Tested-by: Vincenzo Frascino Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bffe690708c8b4fdb8f0bff8ff22b347fc6c709a Author: Andrey Konovalov Date: Tue Dec 22 12:02:59 2020 -0800 kasan: open-code kasan_unpoison_slab There's the external annotation kasan_unpoison_slab() that is currently defined as static inline and uses kasan_unpoison_range(). Open-code this function in mempool.c. Otherwise with an upcoming change this function will result in an unnecessary function call. Link: https://lkml.kernel.org/r/131a6694a978a9a8b150187e539eecc8bcbf759b.1606162397.git.andreyknvl@google.com Link: https://linux-review.googlesource.com/id/Ia7c8b659f79209935cbaab3913bf7f082cc43a0e Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Tested-by: Vincenzo Frascino Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d8dd397120be14a80220c78dad2bbcb9b0768959 Author: Andrey Konovalov Date: Tue Dec 22 12:02:56 2020 -0800 kasan: inline random_tag for HW_TAGS Using random_tag() currently results in a function call. Move its definition to mm/kasan/kasan.h and turn it into a static inline function for hardware tag-based mode to avoid uneeded function calls. Link: https://lkml.kernel.org/r/be438471690e351e1d792e6bb432e8c03ccb15d3.1606162397.git.andreyknvl@google.com Link: https://linux-review.googlesource.com/id/Iac5b2faf9a912900e16cca6834d621f5d4abf427 Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Reviewed-by: Dmitry Vyukov Tested-by: Vincenzo Frascino Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c0054c565ae598073d6c27762c7d4f7de49a45d9 Author: Andrey Konovalov Date: Tue Dec 22 12:02:52 2020 -0800 kasan: inline kasan_reset_tag for tag-based modes Using kasan_reset_tag() currently results in a function call. As it's called quite often from the allocator code, this leads to a noticeable slowdown. Move it to include/linux/kasan.h and turn it into a static inline function. Also remove the now unneeded reset_tag() internal KASAN macro and use kasan_reset_tag() instead. Link: https://lkml.kernel.org/r/6940383a3a9dfb416134d338d8fac97a9ebb8686.1606162397.git.andreyknvl@google.com Link: https://linux-review.googlesource.com/id/I4d2061acfe91d480a75df00b07c22d8494ef14b5 Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Reviewed-by: Dmitry Vyukov Tested-by: Vincenzo Frascino Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 77f57c983065d0569ee1b4af80f07224b439af57 Author: Andrey Konovalov Date: Tue Dec 22 12:02:49 2020 -0800 kasan: remove __kasan_unpoison_stack There's no need for __kasan_unpoison_stack() helper, as it's only currently used in a single place. Removing it also removes unneeded arithmetic. No functional changes. Link: https://lkml.kernel.org/r/93e78948704a42ea92f6248ff8a725613d721161.1606162397.git.andreyknvl@google.com Link: https://linux-review.googlesource.com/id/Ie5ba549d445292fe629b4a96735e4034957bcc50 Signed-off-by: Andrey Konovalov Reviewed-by: Dmitry Vyukov Reviewed-by: Marco Elver Tested-by: Vincenzo Frascino Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 38dd767daed1af5b5751441b95c4b28767a34fe3 Author: Andrey Konovalov Date: Tue Dec 22 12:02:45 2020 -0800 kasan: allow VMAP_STACK for HW_TAGS mode Even though hardware tag-based mode currently doesn't support checking vmalloc allocations, it doesn't use shadow memory and works with VMAP_STACK as is. Change VMAP_STACK definition accordingly. Link: https://lkml.kernel.org/r/ecdb2a1658ebd88eb276dee2493518ac0e82de41.1606162397.git.andreyknvl@google.com Link: https://linux-review.googlesource.com/id/I3552cbc12321dec82cd7372676e9372a2eb452ac Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Acked-by: Catalin Marinas Reviewed-by: Dmitry Vyukov Tested-by: Vincenzo Frascino Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d56a9ef84bd0e1e8fba7a837ab12a4ec8476579f Author: Andrey Konovalov Date: Tue Dec 22 12:02:42 2020 -0800 kasan, arm64: unpoison stack only with CONFIG_KASAN_STACK There's a config option CONFIG_KASAN_STACK that has to be enabled for KASAN to use stack instrumentation and perform validity checks for stack variables. There's no need to unpoison stack when CONFIG_KASAN_STACK is not enabled. Only call kasan_unpoison_task_stack[_below]() when CONFIG_KASAN_STACK is enabled. Note, that CONFIG_KASAN_STACK is an option that is currently always defined when CONFIG_KASAN is enabled, and therefore has to be tested with #if instead of #ifdef. Link: https://lkml.kernel.org/r/d09dd3f8abb388da397fd11598c5edeaa83fe559.1606162397.git.andreyknvl@google.com Link: https://linux-review.googlesource.com/id/If8a891e9fe01ea543e00b576852685afec0887e3 Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Acked-by: Catalin Marinas Reviewed-by: Dmitry Vyukov Tested-by: Vincenzo Frascino Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8bb0009b19465da5a0cd394b5a6ccc2eaf418f23 Author: Andrey Konovalov Date: Tue Dec 22 12:02:38 2020 -0800 kasan: introduce set_alloc_info Add set_alloc_info() helper and move kasan_set_track() into it. This will simplify the code for one of the upcoming changes. No functional changes. Link: https://lkml.kernel.org/r/b2393e8f1e311a70fc3aaa2196461b6acdee7d21.1606162397.git.andreyknvl@google.com Link: https://linux-review.googlesource.com/id/I0316193cbb4ecc9b87b7c2eee0dd79f8ec908c1a Signed-off-by: Andrey Konovalov Reviewed-by: Dmitry Vyukov Reviewed-by: Marco Elver Tested-by: Vincenzo Frascino Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6476792f1015a356e6864076c210b328b64d08cc Author: Andrey Konovalov Date: Tue Dec 22 12:02:34 2020 -0800 kasan: rename get_alloc/free_info Rename get_alloc_info() and get_free_info() to kasan_get_alloc_meta() and kasan_get_free_meta() to better reflect what those do and avoid confusion with kasan_set_free_info(). No functional changes. Link: https://lkml.kernel.org/r/27b7c036b754af15a2839e945f6d8bfce32b4c2f.1606162397.git.andreyknvl@google.com Link: https://linux-review.googlesource.com/id/Ib6e4ba61c8b12112b403d3479a9799ac8fff8de1 Signed-off-by: Andrey Konovalov Reviewed-by: Dmitry Vyukov Reviewed-by: Marco Elver Tested-by: Vincenzo Frascino Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c696de9f12b7ddeddc05d378fc4dc0f66e9a8c95 Author: Andrey Konovalov Date: Tue Dec 22 12:02:31 2020 -0800 kasan: simplify quarantine_put call site Patch series "kasan: boot parameters for hardware tag-based mode", v4. === Overview Hardware tag-based KASAN mode [1] is intended to eventually be used in production as a security mitigation. Therefore there's a need for finer control over KASAN features and for an existence of a kill switch. This patchset adds a few boot parameters for hardware tag-based KASAN that allow to disable or otherwise control particular KASAN features, as well as provides some initial optimizations for running KASAN in production. There's another planned patchset what will further optimize hardware tag-based KASAN, provide proper benchmarking and tests, and will fully enable tag-based KASAN for production use. Hardware tag-based KASAN relies on arm64 Memory Tagging Extension (MTE) [2] to perform memory and pointer tagging. Please see [3] and [4] for detailed analysis of how MTE helps to fight memory safety problems. The features that can be controlled are: 1. Whether KASAN is enabled at all. 2. Whether KASAN collects and saves alloc/free stacks. 3. Whether KASAN panics on a detected bug or not. The patch titled "kasan: add and integrate kasan boot parameters" of this series adds a few new boot parameters. kasan.mode allows to choose one of three main modes: - kasan.mode=off - KASAN is disabled, no tag checks are performed - kasan.mode=prod - only essential production features are enabled - kasan.mode=full - all KASAN features are enabled The chosen mode provides default control values for the features mentioned above. However it's also possible to override the default values by providing: - kasan.stacktrace=off/on - enable stacks collection (default: on for mode=full, otherwise off) - kasan.fault=report/panic - only report tag fault or also panic (default: report) If kasan.mode parameter is not provided, it defaults to full when CONFIG_DEBUG_KERNEL is enabled, and to prod otherwise. It is essential that switching between these modes doesn't require rebuilding the kernel with different configs, as this is required by the Android GKI (Generic Kernel Image) initiative. === Benchmarks For now I've only performed a few simple benchmarks such as measuring kernel boot time and slab memory usage after boot. There's an upcoming patchset which will optimize KASAN further and include more detailed benchmarking results. The benchmarks were performed in QEMU and the results below exclude the slowdown caused by QEMU memory tagging emulation (as it's different from the slowdown that will be introduced by hardware and is therefore irrelevant). KASAN_HW_TAGS=y + kasan.mode=off introduces no performance or memory impact compared to KASAN_HW_TAGS=n. kasan.mode=prod (manually excluding tagging) introduces 3% of performance and no memory impact (except memory used by hardware to store tags) compared to kasan.mode=off. kasan.mode=full has about 40% performance and 30% memory impact over kasan.mode=prod. Both come from alloc/free stack collection. === Notes This patchset is available here: https://github.com/xairy/linux/tree/up-boot-mte-v4 This patchset is based on v11 of "kasan: add hardware tag-based mode for arm64" patchset [1]. For testing in QEMU hardware tag-based KASAN requires: 1. QEMU built from master [6] (use "-machine virt,mte=on -cpu max" arguments to run). 2. GCC version 10. [1] https://lore.kernel.org/linux-arm-kernel/cover.1606161801.git.andreyknvl@google.com/T/#t [2] https://community.arm.com/developer/ip-products/processors/b/processors-ip-blog/posts/enhancing-memory-safety [3] https://arxiv.org/pdf/1802.09517.pdf [4] https://github.com/microsoft/MSRC-Security-Research/blob/master/papers/2020/Security%20analysis%20of%20memory%20tagging.pdf [5] https://source.android.com/devices/architecture/kernel/generic-kernel-image [6] https://github.com/qemu/qemu === Tags Tested-by: Vincenzo Frascino This patch (of 19): Move get_free_info() call into quarantine_put() to simplify the call site. No functional changes. Link: https://lkml.kernel.org/r/cover.1606162397.git.andreyknvl@google.com Link: https://lkml.kernel.org/r/312d0a3ef92cc6dc4fa5452cbc1714f9393ca239.1606162397.git.andreyknvl@google.com Link: https://linux-review.googlesource.com/id/Iab0f04e7ebf8d83247024b7190c67c3c34c7940f Signed-off-by: Andrey Konovalov Reviewed-by: Dmitry Vyukov Reviewed-by: Marco Elver Tested-by: Vincenzo Frascino Cc: Catalin Marinas Cc: Will Deacon Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Evgenii Stepanov Cc: Branislav Rankov Cc: Kevin Brodsky Cc: Vasily Gorbik Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 29f080881601c90d39c8fa31c125ac70b8894b5e Author: Vincenzo Frascino Date: Tue Dec 22 12:02:27 2020 -0800 kselftest/arm64: check GCR_EL1 after context switch This test is specific to MTE and verifies that the GCR_EL1 register is context switched correctly. It spawns 1024 processes and each process spawns 5 threads. Each thread writes a random setting of GCR_EL1 through the prctl() system call and reads it back verifying that it is the same. If the values are not the same it reports a failure. Note: The test has been extended to verify that even SYNC and ASYNC mode setting is preserved correctly over context switching. Link: https://lkml.kernel.org/r/b51a165426e906e7ec8a68d806ef3f8cd92581a6.1606161801.git.andreyknvl@google.com Signed-off-by: Vincenzo Frascino Signed-off-by: Andrey Konovalov Acked-by: Catalin Marinas Tested-by: Vincenzo Frascino Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Marco Elver Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 948e32539f4ac7a778d50eb3eed307c6f3068f75 Author: Andrey Konovalov Date: Tue Dec 22 12:02:24 2020 -0800 kasan: add documentation for hardware tag-based mode Add documentation for hardware tag-based KASAN mode and also add some clarifications for software tag-based mode. Link: https://lkml.kernel.org/r/20ed1d387685e89fc31be068f890f070ef9fd5d5.1606161801.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Signed-off-by: Vincenzo Frascino Reviewed-by: Marco Elver Reviewed-by: Alexander Potapenko Tested-by: Vincenzo Frascino Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 94ab5b61ee16250b7dab38eec5ba9f666350402c Author: Andrey Konovalov Date: Tue Dec 22 12:02:20 2020 -0800 kasan, arm64: enable CONFIG_KASAN_HW_TAGS Hardware tag-based KASAN is now ready, enable the configuration option. Link: https://lkml.kernel.org/r/a6fa50d3bb6b318e05c6389a44095be96442b8b0.1606161801.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Signed-off-by: Vincenzo Frascino Acked-by: Catalin Marinas Reviewed-by: Alexander Potapenko Tested-by: Vincenzo Frascino Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Marco Elver Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit aa1ef4d7b3f67f7f17aa4aa34f5ec513c7e4db6c Author: Andrey Konovalov Date: Tue Dec 22 12:02:17 2020 -0800 kasan, mm: reset tags when accessing metadata Kernel allocator code accesses metadata for slab objects, that may lie out-of-bounds of the object itself, or be accessed when an object is freed. Such accesses trigger tag faults and lead to false-positive reports with hardware tag-based KASAN. Software KASAN modes disable instrumentation for allocator code via KASAN_SANITIZE Makefile macro, and rely on kasan_enable/disable_current() annotations which are used to ignore KASAN reports. With hardware tag-based KASAN neither of those options are available, as it doesn't use compiler instrumetation, no tag faults are ignored, and MTE is disabled after the first one. Instead, reset tags when accessing metadata (currently only for SLUB). Link: https://lkml.kernel.org/r/a0f3cefbc49f34c843b664110842de4db28179d0.1606161801.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Signed-off-by: Vincenzo Frascino Acked-by: Marco Elver Reviewed-by: Alexander Potapenko Tested-by: Vincenzo Frascino Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4291e9ee618956eeae02b17f35b272193a6cda5a Author: Andrey Konovalov Date: Tue Dec 22 12:02:13 2020 -0800 kasan, arm64: print report from tag fault handler Add error reporting for hardware tag-based KASAN. When CONFIG_KASAN_HW_TAGS is enabled, print KASAN report from the arm64 tag fault handler. SAS bits aren't set in ESR for all faults reported in EL1, so it's impossible to find out the size of the access the caused the fault. Adapt KASAN reporting code to handle this case. Link: https://lkml.kernel.org/r/b559c82b6a969afedf53b4694b475f0234067a1a.1606161801.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Co-developed-by: Vincenzo Frascino Signed-off-by: Vincenzo Frascino Reviewed-by: Catalin Marinas Reviewed-by: Alexander Potapenko Tested-by: Vincenzo Frascino Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Marco Elver Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2e903b91479782b7dedd869603423d77e079d3de Author: Andrey Konovalov Date: Tue Dec 22 12:02:10 2020 -0800 kasan, arm64: implement HW_TAGS runtime Provide implementation of KASAN functions required for the hardware tag-based mode. Those include core functions for memory and pointer tagging (tags_hw.c) and bug reporting (report_tags_hw.c). Also adapt common KASAN code to support the new mode. Link: https://lkml.kernel.org/r/cfd0fbede579a6b66755c98c88c108e54f9c56bf.1606161801.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Signed-off-by: Vincenzo Frascino Acked-by: Catalin Marinas Reviewed-by: Alexander Potapenko Tested-by: Vincenzo Frascino Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Marco Elver Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0fea6e9af889f1a4e072f5de999e07fe6859fc88 Author: Andrey Konovalov Date: Tue Dec 22 12:02:06 2020 -0800 kasan, arm64: expand CONFIG_KASAN checks Some #ifdef CONFIG_KASAN checks are only relevant for software KASAN modes (either related to shadow memory or compiler instrumentation). Expand those into CONFIG_KASAN_GENERIC || CONFIG_KASAN_SW_TAGS. Link: https://lkml.kernel.org/r/e6971e432dbd72bb897ff14134ebb7e169bdcf0c.1606161801.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Signed-off-by: Vincenzo Frascino Reviewed-by: Catalin Marinas Reviewed-by: Alexander Potapenko Tested-by: Vincenzo Frascino Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Marco Elver Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8a494023b80e29bb3638be18a6710a1c884ee68e Author: Andrey Konovalov Date: Tue Dec 22 12:02:03 2020 -0800 kasan, x86, s390: update undef CONFIG_KASAN With the intoduction of hardware tag-based KASAN some kernel checks of this kind: ifdef CONFIG_KASAN will be updated to: if defined(CONFIG_KASAN_GENERIC) || defined(CONFIG_KASAN_SW_TAGS) x86 and s390 use a trick to #undef CONFIG_KASAN for some of the code that isn't linked with KASAN runtime and shouldn't have any KASAN annotations. Also #undef CONFIG_KASAN_GENERIC with CONFIG_KASAN. Link: https://lkml.kernel.org/r/9d84bfaaf8fabe0fc89f913c9e420a30bd31a260.1606161801.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Signed-off-by: Vincenzo Frascino Reviewed-by: Marco Elver Acked-by: Vasily Gorbik Reviewed-by: Alexander Potapenko Tested-by: Vincenzo Frascino Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6c6a04fe367f58f066dd5da2c86087b4bd74365e Author: Andrey Konovalov Date: Tue Dec 22 12:01:59 2020 -0800 kasan: define KASAN_GRANULE_SIZE for HW_TAGS Hardware tag-based KASAN has granules of MTE_GRANULE_SIZE. Define KASAN_GRANULE_SIZE to MTE_GRANULE_SIZE for CONFIG_KASAN_HW_TAGS. Link: https://lkml.kernel.org/r/3d15794b3d1b27447fd7fdf862c073192ba657bd.1606161801.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Signed-off-by: Vincenzo Frascino Reviewed-by: Marco Elver Reviewed-by: Alexander Potapenko Tested-by: Vincenzo Frascino Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ccbe2aaba1ed37441d8206a8c95b6199cbee2823 Author: Andrey Konovalov Date: Tue Dec 22 12:01:56 2020 -0800 arm64: kasan: add arch layer for memory tagging helpers This patch add a set of arch_*() memory tagging helpers currently only defined for arm64 when hardware tag-based KASAN is enabled. These helpers will be used by KASAN runtime to implement the hardware tag-based mode. The arch-level indirection level is introduced to simplify adding hardware tag-based KASAN support for other architectures in the future by defining the appropriate arch_*() macros. Link: https://lkml.kernel.org/r/fc9e5bb71201c03131a2fc00a74125723568dda9.1606161801.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Co-developed-by: Vincenzo Frascino Signed-off-by: Vincenzo Frascino Reviewed-by: Catalin Marinas Tested-by: Vincenzo Frascino Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Marco Elver Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dc09b29fd0718300fad79d327d275b6ffb6d3315 Author: Andrey Konovalov Date: Tue Dec 22 12:01:52 2020 -0800 arm64: kasan: align allocations for HW_TAGS Hardware tag-based KASAN uses the memory tagging approach, which requires all allocations to be aligned to the memory granule size. Align the allocations to MTE_GRANULE_SIZE via ARCH_SLAB_MINALIGN when CONFIG_KASAN_HW_TAGS is enabled. Link: https://lkml.kernel.org/r/fe64131606b1c2aabfd34ae99554c0d9df18eb19.1606161801.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Signed-off-by: Vincenzo Frascino Reviewed-by: Catalin Marinas Reviewed-by: Alexander Potapenko Tested-by: Vincenzo Frascino Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Marco Elver Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c746170d6a48b59d1233b375905f7faef6ce80bc Author: Vincenzo Frascino Date: Tue Dec 22 12:01:49 2020 -0800 kasan, mm: untag page address in free_reserved_area free_reserved_area() memsets the pages belonging to a given memory area. As that memory hasn't been allocated via page_alloc, the KASAN tags that those pages have are 0x00. As the result the memset might result in a tag mismatch. Untag the address to avoid spurious faults. Link: https://lkml.kernel.org/r/ebef6425f4468d063e2f09c1b62ccbb2236b71d3.1606161801.git.andreyknvl@google.com Cc: Andrew Morton Signed-off-by: Vincenzo Frascino Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko Tested-by: Vincenzo Frascino Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Marco Elver Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bad1e1c663e0a72f9cf7b230a00d821678f80455 Author: Vincenzo Frascino Date: Tue Dec 22 12:01:45 2020 -0800 arm64: mte: switch GCR_EL1 in kernel entry and exit When MTE is present, the GCR_EL1 register contains the tags mask that allows to exclude tags from the random generation via the IRG instruction. With the introduction of the new Tag-Based KASAN API that provides a mechanism to reserve tags for special reasons, the MTE implementation has to make sure that the GCR_EL1 setting for the kernel does not affect the userspace processes and viceversa. Save and restore the kernel/user mask in GCR_EL1 in kernel entry and exit. Link: https://lkml.kernel.org/r/578b03294708cc7258fad0dc9c2a2e809e5a8214.1606161801.git.andreyknvl@google.com Signed-off-by: Vincenzo Frascino Co-developed-by: Andrey Konovalov Signed-off-by: Andrey Konovalov Reviewed-by: Catalin Marinas Tested-by: Vincenzo Frascino Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Marco Elver Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 620954a67bcec6ca6b902baaaa1e3f2601b371a7 Author: Vincenzo Frascino Date: Tue Dec 22 12:01:42 2020 -0800 arm64: mte: convert gcr_user into an exclude mask The gcr_user mask is a per thread mask that represents the tags that are excluded from random generation when the Memory Tagging Extension is present and an 'irg' instruction is invoked. gcr_user affects the behavior on EL0 only. Currently that mask is an include mask and it is controlled by the user via prctl() while GCR_EL1 accepts an exclude mask. Convert the include mask into an exclude one to make it easier the register setting. Note: This change will affect gcr_kernel (for EL1) introduced with a future patch. Link: https://lkml.kernel.org/r/946dd31be833b660334c4f93410acf6d6c4cf3c4.1606161801.git.andreyknvl@google.com Signed-off-by: Vincenzo Frascino Signed-off-by: Andrey Konovalov Reviewed-by: Catalin Marinas Tested-by: Vincenzo Frascino Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Marco Elver Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bfc62c5985274e926ee959dd3aaf999d4bdfbb1d Author: Vincenzo Frascino Date: Tue Dec 22 12:01:38 2020 -0800 arm64: kasan: allow enabling in-kernel MTE Hardware tag-based KASAN relies on Memory Tagging Extension (MTE) feature and requires it to be enabled. MTE supports This patch adds a new mte_enable_kernel() helper, that enables MTE in Synchronous mode in EL1 and is intended to be called from KASAN runtime during initialization. The Tag Checking operation causes a synchronous data abort as a consequence of a tag check fault when MTE is configured in synchronous mode. As part of this change enable match-all tag for EL1 to allow the kernel to access user pages without faulting. This is required because the kernel does not have knowledge of the tags set by the user in a page. Note: For MTE, the TCF bit field in SCTLR_EL1 affects only EL1 in a similar way as TCF0 affects EL0. MTE that is built on top of the Top Byte Ignore (TBI) feature hence we enable it as part of this patch as well. Link: https://lkml.kernel.org/r/7352b0a0899af65c2785416c8ca6bf3845b66fa1.1606161801.git.andreyknvl@google.com Signed-off-by: Vincenzo Frascino Co-developed-by: Andrey Konovalov Signed-off-by: Andrey Konovalov Reviewed-by: Catalin Marinas Tested-by: Vincenzo Frascino Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Marco Elver Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 98c970da8b35e919f985818eda7c1bcbcec8f4c4 Author: Vincenzo Frascino Date: Tue Dec 22 12:01:35 2020 -0800 arm64: mte: add in-kernel tag fault handler Add the implementation of the in-kernel fault handler. When a tag fault happens on a kernel address: * MTE is disabled on the current CPU, * the execution continues. When a tag fault happens on a user address: * the kernel executes do_bad_area() and panics. The tag fault handler for kernel addresses is currently empty and will be filled in by a future commit. Link: https://lkml.kernel.org/r/20201203102628.GB2224@gaia Link: https://lkml.kernel.org/r/ad31529b073e22840b7a2246172c2b67747ed7c4.1606161801.git.andreyknvl@google.com Signed-off-by: Vincenzo Frascino Co-developed-by: Andrey Konovalov Signed-off-by: Andrey Konovalov Signed-off-by: Catalin Marinas Reviewed-by: Catalin Marinas Tested-by: Vincenzo Frascino Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Marco Elver Cc: Vasily Gorbik Cc: Will Deacon [catalin.marinas@arm.com: ensure CONFIG_ARM64_PAN is enabled with MTE] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e5b8d9218951e59df986f627ec93569a0d22149b Author: Vincenzo Frascino Date: Tue Dec 22 12:01:31 2020 -0800 arm64: mte: reset the page tag in page->flags The hardware tag-based KASAN for compatibility with the other modes stores the tag associated to a page in page->flags. Due to this the kernel faults on access when it allocates a page with an initial tag and the user changes the tags. Reset the tag associated by the kernel to a page in all the meaningful places to prevent kernel faults on access. Note: An alternative to this approach could be to modify page_to_virt(). This though could end up being racy, in fact if a CPU checks the PG_mte_tagged bit and decides that the page is not tagged but another CPU maps the same with PROT_MTE and becomes tagged the subsequent kernel access would fail. Link: https://lkml.kernel.org/r/9073d4e973747a6f78d5bdd7ebe17f290d087096.1606161801.git.andreyknvl@google.com Signed-off-by: Vincenzo Frascino Signed-off-by: Andrey Konovalov Reviewed-by: Catalin Marinas Tested-by: Vincenzo Frascino Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Marco Elver Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 85f49cae4dfcfae16f17418466e00370091de03d Author: Vincenzo Frascino Date: Tue Dec 22 12:01:28 2020 -0800 arm64: mte: add in-kernel MTE helpers Provide helper functions to manipulate allocation and pointer tags for kernel addresses. Low-level helper functions (mte_assign_*, written in assembly) operate tag values from the [0x0, 0xF] range. High-level helper functions (mte_get/set_*) use the [0xF0, 0xFF] range to preserve compatibility with normal kernel pointers that have 0xFF in their top byte. MTE_GRANULE_SIZE and related definitions are moved to mte-def.h header that doesn't have any dependencies and is safe to include into any low-level header. Link: https://lkml.kernel.org/r/c31bf759b4411b2d98cdd801eb928e241584fd1f.1606161801.git.andreyknvl@google.com Signed-off-by: Vincenzo Frascino Co-developed-by: Andrey Konovalov Signed-off-by: Andrey Konovalov Reviewed-by: Catalin Marinas Tested-by: Vincenzo Frascino Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Marco Elver Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f469c032c05e0572be806149307b45d0fc9ae706 Author: Vincenzo Frascino Date: Tue Dec 22 12:01:24 2020 -0800 arm64: enable armv8.5-a asm-arch option Hardware tag-based KASAN relies on Memory Tagging Extension (MTE) which is an armv8.5-a architecture extension. Enable the correct asm option when the compiler supports it in order to allow the usage of ALTERNATIVE()s with MTE instructions. Link: https://lkml.kernel.org/r/d03d1157124ea3532eaeb77507988733f5734986.1606161801.git.andreyknvl@google.com Signed-off-by: Vincenzo Frascino Signed-off-by: Andrey Konovalov Reviewed-by: Catalin Marinas Reviewed-by: Alexander Potapenko Tested-by: Vincenzo Frascino Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Marco Elver Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6a63a63ff1ac2959706dba218d5e17f9ec721c0c Author: Andrey Konovalov Date: Tue Dec 22 12:01:20 2020 -0800 kasan: introduce CONFIG_KASAN_HW_TAGS This patch adds a configuration option for a new KASAN mode called hardware tag-based KASAN. This mode uses the memory tagging approach like the software tag-based mode, but relies on arm64 Memory Tagging Extension feature for tag management and access checking. Link: https://lkml.kernel.org/r/44906a209d3a44f9c6f5a21841e90988e365601e.1606161801.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Co-developed-by: Vincenzo Frascino Signed-off-by: Vincenzo Frascino Reviewed-by: Marco Elver Reviewed-by: Alexander Potapenko Tested-by: Vincenzo Frascino Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 96e0279df6d8f2a1394de2b41815b0065c031950 Author: Andrey Konovalov Date: Tue Dec 22 12:01:17 2020 -0800 kasan: separate metadata_fetch_row for each mode This is a preparatory commit for the upcoming addition of a new hardware tag-based (MTE-based) KASAN mode. Rework print_memory_metadata() to make it agnostic with regard to the way metadata is stored. Allow providing a separate metadata_fetch_row() implementation for each KASAN mode. Hardware tag-based KASAN will provide its own implementation that doesn't use shadow memory. No functional changes for software modes. Link: https://lkml.kernel.org/r/5fb1ec0152bb1f521505017800387ec3e36ffe18.1606161801.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Signed-off-by: Vincenzo Frascino Reviewed-by: Marco Elver Reviewed-by: Alexander Potapenko Tested-by: Vincenzo Frascino Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 88b865974d17059e9c9286f08efbebe569e3067b Author: Andrey Konovalov Date: Tue Dec 22 12:01:14 2020 -0800 kasan: rename SHADOW layout macros to META This is a preparatory commit for the upcoming addition of a new hardware tag-based (MTE-based) KASAN mode. Hardware tag-based KASAN won't be using shadow memory, but will reuse these macros. Rename "SHADOW" to implementation-neutral "META". No functional changes. Link: https://lkml.kernel.org/r/f96244ec59dc17db35173ec352c5592b14aefaf8.1606161801.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Signed-off-by: Vincenzo Frascino Reviewed-by: Marco Elver Reviewed-by: Alexander Potapenko Tested-by: Vincenzo Frascino Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit db3de8f759c80712dae456019968c19672589fdc Author: Andrey Konovalov Date: Tue Dec 22 12:01:10 2020 -0800 kasan: rename print_shadow_for_address to print_memory_metadata This is a preparatory commit for the upcoming addition of a new hardware tag-based (MTE-based) KASAN mode. Hardware tag-based KASAN won't be using shadow memory, but will reuse this function. Rename "shadow" to implementation-neutral "metadata". No functional changes. Link: https://lkml.kernel.org/r/dd955c5aadaee16aef451a6189d19172166a23f5.1606161801.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Signed-off-by: Vincenzo Frascino Reviewed-by: Marco Elver Reviewed-by: Alexander Potapenko Tested-by: Vincenzo Frascino Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6882464faf74666dbce86b77686d78ff4e506af3 Author: Andrey Konovalov Date: Tue Dec 22 12:01:07 2020 -0800 kasan: rename addr_has_shadow to addr_has_metadata This is a preparatory commit for the upcoming addition of a new hardware tag-based (MTE-based) KASAN mode. Hardware tag-based KASAN won't be using shadow memory, but will reuse this function. Rename "shadow" to implementation-neutral "metadata". No functional changes. Link: https://lkml.kernel.org/r/370466fba590a4596b55ffd38adfd990f8886db4.1606161801.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Signed-off-by: Vincenzo Frascino Reviewed-by: Marco Elver Reviewed-by: Alexander Potapenko Tested-by: Vincenzo Frascino Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 60a3a5fe950f4e6c02e9fc6676dc96de043ed743 Author: Andrey Konovalov Date: Tue Dec 22 12:01:03 2020 -0800 kasan, arm64: rename kasan_init_tags and mark as __init Rename kasan_init_tags() to kasan_init_sw_tags() as the upcoming hardware tag-based KASAN mode will have its own initialization routine. Also similarly to kasan_init() mark kasan_init_tags() as __init. Link: https://lkml.kernel.org/r/71e52af72a09f4b50c8042f16101c60e50649fbb.1606161801.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Catalin Marinas Reviewed-by: Alexander Potapenko Tested-by: Vincenzo Frascino Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Marco Elver Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 28ab35841ce0262b41074464d9fb6709bb26348f Author: Andrey Konovalov Date: Tue Dec 22 12:01:00 2020 -0800 kasan, arm64: move initialization message Software tag-based KASAN mode is fully initialized with kasan_init_tags(), while the generic mode only requires kasan_init(). Move the initialization message for tag-based mode into kasan_init_tags(). Also fix pr_fmt() usage for KASAN code: generic.c doesn't need it as it doesn't use any printing functions; tag-based mode should use "kasan:" instead of KBUILD_MODNAME (which stands for file name). Link: https://lkml.kernel.org/r/29a30ea4e1750450dd1f693d25b7b6cb05913ecf.1606161801.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Catalin Marinas Reviewed-by: Alexander Potapenko Tested-by: Vincenzo Frascino Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Marco Elver Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d73b49365ee65ac48074bdb5aa717bb4644dbbb7 Author: Andrey Konovalov Date: Tue Dec 22 12:00:56 2020 -0800 kasan, arm64: only use kasan_depth for software modes This is a preparatory commit for the upcoming addition of a new hardware tag-based (MTE-based) KASAN mode. Hardware tag-based KASAN won't use kasan_depth. Only define and use it when one of the software KASAN modes are enabled. No functional changes for software modes. Link: https://lkml.kernel.org/r/e16f15aeda90bc7fb4dfc2e243a14b74cc5c8219.1606161801.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Signed-off-by: Vincenzo Frascino Reviewed-by: Catalin Marinas Reviewed-by: Alexander Potapenko Tested-by: Vincenzo Frascino Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Marco Elver Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit afe6ef80dcecf2cf7ccab0d94257b985e4c47d80 Author: Andrey Konovalov Date: Tue Dec 22 12:00:53 2020 -0800 kasan, arm64: only init shadow for software modes This is a preparatory commit for the upcoming addition of a new hardware tag-based (MTE-based) KASAN mode. Hardware tag-based KASAN won't be using shadow memory. Only initialize it when one of the software KASAN modes are enabled. No functional changes for software modes. Link: https://lkml.kernel.org/r/d1742eea2cd728d150d49b144e49b6433405c7ba.1606161801.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Signed-off-by: Vincenzo Frascino Reviewed-by: Catalin Marinas Reviewed-by: Alexander Potapenko Tested-by: Vincenzo Frascino Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Marco Elver Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 97fc712232368ddeabd91cdabf40da9b2155c033 Author: Andrey Konovalov Date: Tue Dec 22 12:00:49 2020 -0800 kasan: decode stack frame only with KASAN_STACK_ENABLE Decoding routines aren't needed when CONFIG_KASAN_STACK_ENABLE is not enabled. Currently only generic KASAN mode implements stack error reporting. No functional changes for software modes. Link: https://lkml.kernel.org/r/05a24db36f5ec876af876a299bbea98c29468ebd.1606161801.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Signed-off-by: Vincenzo Frascino Reviewed-by: Marco Elver Reviewed-by: Alexander Potapenko Tested-by: Vincenzo Frascino Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2cdbed63490d0d2bcbae60abcc5639caa5aba49b Author: Andrey Konovalov Date: Tue Dec 22 12:00:46 2020 -0800 kasan: hide invalid free check implementation This is a preparatory commit for the upcoming addition of a new hardware tag-based (MTE-based) KASAN mode. For software KASAN modes the check is based on the value in the shadow memory. Hardware tag-based KASAN won't be using shadow, so hide the implementation of the check in check_invalid_free(). Also simplify the code for software tag-based mode. No functional changes for software modes. Link: https://lkml.kernel.org/r/d01534a4b977f97d87515dc590e6348e1406de81.1606161801.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Signed-off-by: Vincenzo Frascino Reviewed-by: Marco Elver Reviewed-by: Alexander Potapenko Tested-by: Vincenzo Frascino Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ffcc5cea46c0c3dde4eeb101fdf3a37da43863de Author: Andrey Konovalov Date: Tue Dec 22 12:00:42 2020 -0800 kasan: don't duplicate config dependencies Both KASAN_GENERIC and KASAN_SW_TAGS have common dependencies, move those to KASAN. Link: https://lkml.kernel.org/r/c1cc0d562608a318c607afe22db5ec2a7af72e47.1606161801.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Signed-off-by: Vincenzo Frascino Reviewed-by: Marco Elver Reviewed-by: Alexander Potapenko Tested-by: Vincenzo Frascino Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 59fd51b2ba6b02e0f7c989fc12c3537988f8c8fe Author: Andrey Konovalov Date: Tue Dec 22 12:00:39 2020 -0800 kasan: rename report and tags files Rename generic_report.c to report_generic.c and tags_report.c to report_sw_tags.c, as their content is more relevant to report.c file. Also rename tags.c to sw_tags.c to better reflect that this file contains code for software tag-based mode. No functional changes. Link: https://lkml.kernel.org/r/a6105d416da97d389580015afed66c4c3cfd4c08.1606161801.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Signed-off-by: Vincenzo Frascino Reviewed-by: Marco Elver Reviewed-by: Alexander Potapenko Tested-by: Vincenzo Frascino Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit affc3f07759cfdcb1ffd87f2847b1c27d8781d65 Author: Andrey Konovalov Date: Tue Dec 22 12:00:35 2020 -0800 kasan: define KASAN_MEMORY_PER_SHADOW_PAGE Define KASAN_MEMORY_PER_SHADOW_PAGE as (KASAN_GRANULE_SIZE << PAGE_SHIFT), which is the same as (KASAN_GRANULE_SIZE * PAGE_SIZE) for software modes that use shadow memory, and use it across KASAN code to simplify it. Link: https://lkml.kernel.org/r/8329391cfe14b5cffd3decf3b5c535b6ce21eef6.1606161801.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Signed-off-by: Vincenzo Frascino Reviewed-by: Marco Elver Reviewed-by: Alexander Potapenko Tested-by: Vincenzo Frascino Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bb359dbcb70085a63e8bdbf14837a900750f0cf7 Author: Andrey Konovalov Date: Tue Dec 22 12:00:32 2020 -0800 kasan: split out shadow.c from common.c This is a preparatory commit for the upcoming addition of a new hardware tag-based (MTE-based) KASAN mode. The new mode won't be using shadow memory. Move all shadow-related code to shadow.c, which is only enabled for software KASAN modes that use shadow memory. No functional changes for software modes. Link: https://lkml.kernel.org/r/17d95cfa7d5cf9c4fcd9bf415f2a8dea911668df.1606161801.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Signed-off-by: Vincenzo Frascino Reviewed-by: Marco Elver Reviewed-by: Alexander Potapenko Tested-by: Vincenzo Frascino Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b266e8fee9630d1e5a9144f33222a49c06ad6976 Author: Andrey Konovalov Date: Tue Dec 22 12:00:28 2020 -0800 kasan: only build init.c for software modes This is a preparatory commit for the upcoming addition of a new hardware tag-based (MTE-based) KASAN mode. The new mode won't be using shadow memory, so only build init.c that contains shadow initialization code for software modes. No functional changes for software modes. Link: https://lkml.kernel.org/r/bae0a6a35b7a9b1a443803c1a55e6e3fecc311c9.1606161801.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Signed-off-by: Vincenzo Frascino Reviewed-by: Marco Elver Reviewed-by: Alexander Potapenko Tested-by: Vincenzo Frascino Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1f600626b3a9b77001b3ef90a79bf68c9f7e4cda Author: Andrey Konovalov Date: Tue Dec 22 12:00:24 2020 -0800 kasan: rename KASAN_SHADOW_* to KASAN_GRANULE_* This is a preparatory commit for the upcoming addition of a new hardware tag-based (MTE-based) KASAN mode. The new mode won't be using shadow memory, but will still use the concept of memory granules. Each memory granule maps to a single metadata entry: 8 bytes per one shadow byte for generic mode, 16 bytes per one shadow byte for software tag-based mode, and 16 bytes per one allocation tag for hardware tag-based mode. Rename KASAN_SHADOW_SCALE_SIZE to KASAN_GRANULE_SIZE, and KASAN_SHADOW_MASK to KASAN_GRANULE_MASK. Also use MASK when used as a mask, otherwise use SIZE. No functional changes. Link: https://lkml.kernel.org/r/939b5754e47f528a6e6a6f28ffc5815d8d128033.1606161801.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Signed-off-by: Vincenzo Frascino Reviewed-by: Marco Elver Reviewed-by: Alexander Potapenko Tested-by: Vincenzo Frascino Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cebd0eb29acdfc2f5e44e5f356ffcd0c44f16b4a Author: Andrey Konovalov Date: Tue Dec 22 12:00:21 2020 -0800 kasan: rename (un)poison_shadow to (un)poison_range This is a preparatory commit for the upcoming addition of a new hardware tag-based (MTE-based) KASAN mode. The new mode won't be using shadow memory. Rename external annotation kasan_unpoison_shadow() to kasan_unpoison_range(), and introduce internal functions (un)poison_range() (without kasan_ prefix). Co-developed-by: Marco Elver Link: https://lkml.kernel.org/r/fccdcaa13dc6b2211bf363d6c6d499279a54fe3a.1606161801.git.andreyknvl@google.com Signed-off-by: Marco Elver Signed-off-by: Andrey Konovalov Signed-off-by: Vincenzo Frascino Reviewed-by: Alexander Potapenko Tested-by: Vincenzo Frascino Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d5750edf6da759576f91ec2b57d5553985815b40 Author: Andrey Konovalov Date: Tue Dec 22 12:00:17 2020 -0800 kasan: shadow declarations only for software modes This is a preparatory commit for the upcoming addition of a new hardware tag-based (MTE-based) KASAN mode. Group shadow-related KASAN function declarations and only define them for the two existing software modes. No functional changes for software modes. Link: https://lkml.kernel.org/r/35126.1606402815@turing-police Link: https://lore.kernel.org/linux-arm-kernel/24105.1606397102@turing-police/ Link: https://lkml.kernel.org/r/e88d94eff94db883a65dca52e1736d80d28dd9bc.1606161801.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Signed-off-by: Vincenzo Frascino Signed-off-by: Valdis Kletnieks Reviewed-by: Marco Elver Reviewed-by: Alexander Potapenko Tested-by: Vincenzo Frascino Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Vasily Gorbik Cc: Will Deacon [valdis.kletnieks@vt.edu: fix build issue with asmlinkage] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3b1a4a8640876a966ab68ab4f561642e19674671 Author: Andrey Konovalov Date: Tue Dec 22 12:00:14 2020 -0800 kasan: group vmalloc code This is a preparatory commit for the upcoming addition of a new hardware tag-based (MTE-based) KASAN mode. Group all vmalloc-related function declarations in include/linux/kasan.h, and their implementations in mm/kasan/common.c. No functional changes. Link: https://lkml.kernel.org/r/80a6fdd29b039962843bd6cf22ce2643a7c8904e.1606161801.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Signed-off-by: Vincenzo Frascino Reviewed-by: Marco Elver Reviewed-by: Alexander Potapenko Tested-by: Vincenzo Frascino Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 71f6af6d52ceb96be522819a1b0806325bc690d8 Author: Andrey Konovalov Date: Tue Dec 22 12:00:10 2020 -0800 kasan: KASAN_VMALLOC depends on KASAN_GENERIC Currently only generic KASAN mode supports vmalloc, reflect that in the config. Link: https://lkml.kernel.org/r/0c493d3a065ad95b04313d00244e884a7e2498ff.1606161801.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Signed-off-by: Vincenzo Frascino Reviewed-by: Marco Elver Reviewed-by: Alexander Potapenko Tested-by: Vincenzo Frascino Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 11f094e312ae834531672aee711079c00ca39ff8 Author: Andrey Konovalov Date: Tue Dec 22 12:00:07 2020 -0800 kasan: drop unnecessary GPL text from comment headers Patch series "kasan: add hardware tag-based mode for arm64", v11. This patchset adds a new hardware tag-based mode to KASAN [1]. The new mode is similar to the existing software tag-based KASAN, but relies on arm64 Memory Tagging Extension (MTE) [2] to perform memory and pointer tagging (instead of shadow memory and compiler instrumentation). This patchset is co-developed and tested by Vincenzo Frascino . This patchset is available here: https://github.com/xairy/linux/tree/up-kasan-mte-v11 For testing in QEMU hardware tag-based KASAN requires: 1. QEMU built from master [4] (use "-machine virt,mte=on -cpu max" arguments to run). 2. GCC version 10. [1] https://www.kernel.org/doc/html/latest/dev-tools/kasan.html [2] https://community.arm.com/developer/ip-products/processors/b/processors-ip-blog/posts/enhancing-memory-safety [3] git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux for-next/mte [4] https://github.com/qemu/qemu ====== Overview The underlying ideas of the approach used by hardware tag-based KASAN are: 1. By relying on the Top Byte Ignore (TBI) arm64 CPU feature, pointer tags are stored in the top byte of each kernel pointer. 2. With the Memory Tagging Extension (MTE) arm64 CPU feature, memory tags for kernel memory allocations are stored in a dedicated memory not accessible via normal instuctions. 3. On each memory allocation, a random tag is generated, embedded it into the returned pointer, and the corresponding memory is tagged with the same tag value. 4. With MTE the CPU performs a check on each memory access to make sure that the pointer tag matches the memory tag. 5. On a tag mismatch the CPU generates a tag fault, and a KASAN report is printed. Same as other KASAN modes, hardware tag-based KASAN is intended as a debugging feature at this point. ====== Rationale There are two main reasons for this new hardware tag-based mode: 1. Previously implemented software tag-based KASAN is being successfully used on dogfood testing devices due to its low memory overhead (as initially planned). The new hardware mode keeps the same low memory overhead, and is expected to have significantly lower performance impact, due to the tag checks being performed by the hardware. Therefore the new mode can be used as a better alternative in dogfood testing for hardware that supports MTE. 2. The new mode lays the groundwork for the planned in-kernel MTE-based memory corruption mitigation to be used in production. ====== Technical details Considering the implementation perspective, hardware tag-based KASAN is almost identical to the software mode. The key difference is using MTE for assigning and checking tags. Compared to the software mode, the hardware mode uses 4 bits per tag, as dictated by MTE. Pointer tags are stored in bits [56:60), the top 4 bits have the normal value 0xF. Having less distict tags increases the probablity of false negatives (from ~1/256 to ~1/16) in certain cases. Only synchronous exceptions are set up and used by hardware tag-based KASAN. ====== Benchmarks Note: all measurements have been performed with software emulation of Memory Tagging Extension, performance numbers for hardware tag-based KASAN on the actual hardware are expected to be better. Boot time [1]: * 2.8 sec for clean kernel * 5.7 sec for hardware tag-based KASAN * 11.8 sec for software tag-based KASAN * 11.6 sec for generic KASAN Slab memory usage after boot [2]: * 7.0 kb for clean kernel * 9.7 kb for hardware tag-based KASAN * 9.7 kb for software tag-based KASAN * 41.3 kb for generic KASAN Measurements have been performed with: * defconfig-based configs * Manually built QEMU master * QEMU arguments: -machine virt,mte=on -cpu max * CONFIG_KASAN_STACK_ENABLE disabled * CONFIG_KASAN_INLINE enabled * clang-10 as the compiler and gcc-10 as the assembler [1] Time before the ext4 driver is initialized. [2] Measured as `cat /proc/meminfo | grep Slab`. ====== Notes The cover letter for software tag-based KASAN patchset can be found here: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0116523cfffa62aeb5aa3b85ce7419f3dae0c1b8 ===== Tags Tested-by: Vincenzo Frascino This patch (of 41): Don't mention "GNU General Public License version 2" text explicitly, as it's already covered by the SPDX-License-Identifier. Link: https://lkml.kernel.org/r/cover.1606161801.git.andreyknvl@google.com Link: https://lkml.kernel.org/r/6ea9f5f4aa9dbbffa0d0c0a780b37699a4531034.1606161801.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Signed-off-by: Vincenzo Frascino Reviewed-by: Marco Elver Reviewed-by: Alexander Potapenko Tested-by: Vincenzo Frascino Cc: Catalin Marinas Cc: Will Deacon Cc: Dmitry Vyukov Cc: Andrey Ryabinin Cc: Evgenii Stepanov Cc: Branislav Rankov Cc: Kevin Brodsky Cc: Vasily Gorbik Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7887cc89d5851cbdec49219e9614beec776af150 Author: Linus Walleij Date: Mon Dec 14 23:34:13 2020 +0100 ARM: dts: ux500/golden: Set display max brightness A too high brightness by default (default is max) makes the screen go blank. Set this to 15 as in the Vendor tree. Signed-off-by: Linus Walleij Cc: Stephan Gerhold Link: https://lore.kernel.org/r/20201214223413.253893-1-linus.walleij@linaro.org' Signed-off-by: Arnd Bergmann commit d734220d5d9038652930de4c6a1dd8394ce7f5a1 Merge: 062fa6b8ef153 2f6fc9e08bf79 Author: Arnd Bergmann Date: Tue Dec 22 17:40:29 2020 +0100 Merge tag 'omap-for-v5.11/defconfig-late-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/fixes Late defconfig changes for omaps for v5.11 merge window Drop drop unused POWER_AVS option, and enable CONFIG_SPI_GPIO as a loadable module so gta04 needs it for controlling the td028ttec1 panel. * tag 'omap-for-v5.11/defconfig-late-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: omap2plus_defconfig: enable SPI GPIO ARM: omap2plus_defconfig: drop unused POWER_AVS option ARM: omap2plus_defconfig: Enable TI eQEP counter driver ARM: omap2plus_defconfig: add CONFIG_AK8975=m and CONFIG_KXCJK1013=m ARM: omap2plus_defconfig: Enable OMAP3_THERMAL Link: https://lore.kernel.org/r/pull-1607675790-251347@atomide.com-2 Signed-off-by: Arnd Bergmann commit 8b3fd902391fdee526f6ba46899a3f8005983ae1 Author: Lukas Bulwahn Date: Thu Dec 17 08:15:01 2020 +0100 MAINTAINERS: include governors into CPU IDLE TIME MANAGEMENT FRAMEWORK The current pattern in the file entry does not make the files in the governors subdirectory to be a part of the CPU IDLE TIME MANAGEMENT FRAMEWORK. Adjust the file pattern to include files in governors. Signed-off-by: Lukas Bulwahn Signed-off-by: Rafael J. Wysocki commit 5a3b590d4b2db187faa6f06adc9a53d6199fb1f9 Author: Theodore Ts'o Date: Thu Dec 17 13:24:15 2020 -0500 ext4: don't leak old mountpoint samples When the first file is opened, ext4 samples the mountpoint of the filesystem in 64 bytes of the super block. It does so using strlcpy(), this means that the remaining bytes in the super block string buffer are untouched. If the mount point before had a longer path than the current one, it can be reconstructed. Consider the case where the fs was mounted to "/media/johnjdeveloper" and later to "/". The super block buffer then contains "/\x00edia/johnjdeveloper". This case was seen in the wild and caused confusion how the name of a developer ands up on the super block of a filesystem used in production... Fix this by using strncpy() instead of strlcpy(). The superblock field is defined to be a fixed-size char array, and it is already marked using __nonstring in fs/ext4/ext4.h. The consumer of the field in e2fsprogs already assumes that in the case of a 64+ byte mount path, that s_last_mounted will not be NUL terminated. Link: https://lore.kernel.org/r/X9ujIOJG/HqMr88R@mit.edu Reported-by: Richard Weinberger Signed-off-by: Theodore Ts'o Cc: stable@kernel.org commit a3f5cf14ff917d46a4d491cf86210fd639d1ff38 Author: Jan Kara Date: Wed Dec 16 11:18:44 2020 +0100 ext4: drop ext4_handle_dirty_super() The wrapper is now useless since it does what ext4_handle_dirty_metadata() does. Just remove it. Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20201216101844.22917-9-jack@suse.cz Signed-off-by: Theodore Ts'o commit dfd56c2c0c0dbb11be939b804ddc8d5395ab3432 Author: Jan Kara Date: Wed Dec 16 11:18:43 2020 +0100 ext4: fix superblock checksum failure when setting password salt When setting password salt in the superblock, we forget to recompute the superblock checksum so it will not match until the next superblock modification which recomputes the checksum. Fix it. CC: Michael Halcrow Reported-by: Andreas Dilger Fixes: 9bd8212f981e ("ext4 crypto: add encryption policy and password salt support") Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20201216101844.22917-8-jack@suse.cz Signed-off-by: Theodore Ts'o commit e92ad03fa53498f12b3f5ecb8822adc3bf815b28 Author: Jan Kara Date: Wed Dec 16 11:18:41 2020 +0100 ext4: use sbi instead of EXT4_SB(sb) in ext4_update_super() No behavioral change. Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20201216101844.22917-6-jack@suse.cz Signed-off-by: Theodore Ts'o commit 2d01ddc86606564fb08c56e3bc93a0693895f710 Author: Jan Kara Date: Wed Dec 16 11:18:40 2020 +0100 ext4: save error info to sb through journal if available If journalling is still working at the moment we get to writing error information to the superblock we cannot write directly to the superblock as such write could race with journalled update of the superblock and cause journal checksum failures, writing inconsistent information to the journal or other problems. We cannot journal the superblock directly from the error handling functions as we are running in uncertain context and could deadlock so just punt journalled superblock update to a workqueue. Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20201216101844.22917-5-jack@suse.cz Signed-off-by: Theodore Ts'o commit 05c2c00f3769abb9e323fcaca70d2de0b48af7ba Author: Jan Kara Date: Wed Dec 16 11:18:39 2020 +0100 ext4: protect superblock modifications with a buffer lock Protect all superblock modifications (including checksum computation) with a superblock buffer lock. That way we are sure computed checksum matches current superblock contents (a mismatch could cause checksum failures in nojournal mode or if an unjournalled superblock update races with a journalled one). Also we avoid modifying superblock contents while it is being written out (which can cause DIF/DIX failures if we are running in nojournal mode). Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20201216101844.22917-4-jack@suse.cz Signed-off-by: Theodore Ts'o commit 4392fbc4bab57db3760f0fb61258cb7089b37665 Author: Jan Kara Date: Wed Dec 16 11:18:38 2020 +0100 ext4: drop sync argument of ext4_commit_super() Everybody passes 1 as sync argument of ext4_commit_super(). Just drop it. Reviewed-by: Harshad Shirwadkar Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20201216101844.22917-3-jack@suse.cz Signed-off-by: Theodore Ts'o commit be993933d2e997fdb72b8b1418d2a84df79b8962 Author: Lei Chen Date: Fri Dec 11 14:54:24 2020 +0800 ext4: remove unnecessary wbc parameter from ext4_bio_write_page ext4_bio_write_page does not need wbc parameter, since its parameter io contains the io_wbc field. The io::io_wbc is initialized by ext4_io_submit_init which is called in ext4_writepages and ext4_writepage functions prior to ext4_bio_write_page. Therefor, when ext4_bio_write_page is called, wbc info has already been included in io parameter. Signed-off-by: Lei Chen Link: https://lore.kernel.org/r/1607669664-25656-1-git-send-email-lennychen@tencent.com Signed-off-by: Theodore Ts'o commit e789ca0cc1d51296832b8424fa4008ce6e9d1703 Author: Jan Kara Date: Wed Dec 16 11:18:37 2020 +0100 ext4: combine ext4_handle_error() and save_error_info() save_error_info() is always called together with ext4_handle_error(). Combine them into a single call and move unconditional bits out of save_error_info() into ext4_handle_error(). Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20201216101844.22917-2-jack@suse.cz Signed-off-by: Theodore Ts'o commit 82ef1370b0c1757ab4ce29f34c52b4e93839b0aa Author: Chunguang Xu Date: Fri Dec 4 11:05:43 2020 +0800 ext4: avoid s_mb_prefetch to be zero in individual scenarios Commit cfd732377221 ("ext4: add prefetching for block allocation bitmaps") introduced block bitmap prefetch, and expects to read block bitmaps of flex_bg through an IO. However, it seems to ignore the value range of s_log_groups_per_flex. In the scenario where the value of s_log_groups_per_flex is greater than 27, s_mb_prefetch or s_mb_prefetch_limit will overflow, cause a divide zero exception. In addition, the logic of calculating nr is also flawed, because the size of flexbg is fixed during a single mount, but s_mb_prefetch can be modified, which causes nr to fail to meet the value condition of [1, flexbg_size]. To solve this problem, we need to set the upper limit of s_mb_prefetch. Since we expect to load block bitmaps of a flex_bg through an IO, we can consider determining a reasonable upper limit among the IO limit parameters. After consideration, we chose BLK_MAX_SEGMENT_SIZE. This is a good choice to solve divide zero problem and avoiding performance degradation. [ Some minor code simplifications to make the changes easy to follow -- TYT ] Reported-by: Tosk Robot Signed-off-by: Chunguang Xu Reviewed-by: Samuel Liao Reviewed-by: Andreas Dilger Link: https://lore.kernel.org/r/1607051143-24508-1-git-send-email-brookxu@tencent.com Signed-off-by: Theodore Ts'o commit c92dc856848f32781e37b88c1b7f875e274f5efb Author: Jan Kara Date: Fri Nov 27 12:34:00 2020 +0100 ext4: defer saving error info from atomic context When filesystem inconsistency is detected with group locked, we currently try to modify superblock to store error there without blocking. However this can cause superblock checksum failures (or DIF/DIX failure) when the superblock is just being written out. Make error handling code just store error information in ext4_sb_info structure and copy it to on-disk superblock only in ext4_commit_super(). In case of error happening with group locked, we just postpone the superblock flushing to a workqueue. [ Added fixup so that s_first_error_* does not get updated after the file system is remounted. Also added fix for syzbot failure. - Ted ] Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20201127113405.26867-8-jack@suse.cz Signed-off-by: Theodore Ts'o Cc: Hillf Danton Reported-by: syzbot+9043030c040ce1849a60@syzkaller.appspotmail.com commit c3a74f8e25e97166ca0f954414825ae98a3209f6 Merge: b4ec805464a4a e40ad84c26b4d Author: Rafael J. Wysocki Date: Tue Dec 22 17:59:11 2020 +0100 Merge branch 'pm-cpufreq' * pm-cpufreq: cpufreq: intel_pstate: Use most recent guaranteed performance values cpufreq: intel_pstate: Implement the ->adjust_perf() callback cpufreq: Add special-purpose fast-switching callback for drivers cpufreq: schedutil: Add util to struct sg_cpu cppc_cpufreq: replace per-cpu data array with a list cppc_cpufreq: expose information on frequency domains cppc_cpufreq: clarify support for coordination types cppc_cpufreq: use policy->cpu as driver of frequency setting ACPI: processor: fix NONE coordination for domain mapping failure ACPI: processor: Drop duplicate setting of shared_cpu_map commit 0a4e668b5d52eed8026f5d717196b02b55fb2dc6 Author: Guenter Roeck Date: Mon Dec 14 10:26:22 2020 -0800 hwmon: (k10temp) Remove support for displaying voltage and current on Zen CPUs Voltages and current are reported by Zen CPUs. However, the means to do so is undocumented, changes from CPU to CPU, and the raw data is not calibrated. Calibration information is available, but again not documented. This results in less than perfect user experience, up to concerns that loading the driver might possibly damage the hardware (by reporting out-of range voltages). Effectively support for reporting voltages and current is not maintainable. Drop it. Cc: Artem S. Tashkinov Cc: Wei Huang Tested-by: Wei Huang Signed-off-by: Guenter Roeck commit 7b51e703a89b824dbbf65de96e77d10d4915dbe0 Author: Christoph Hellwig Date: Thu Dec 10 08:55:44 2020 +0100 block: update some copyrights Update copyrights for files that have gotten some major rewrites lately. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe commit ca2e270aa1aa214d77d06c705d1f19524cde3faf Author: Christoph Hellwig Date: Thu Dec 10 08:55:43 2020 +0100 block: remove a pointless self-reference in block_dev.c There is no point in duplicating the file name in the top of the file comment. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe commit adf4c01aba575c02ae7335255f9f9a379e594c5d Author: Christoph Hellwig Date: Thu Dec 10 08:55:42 2020 +0100 MAINTAINERS: add fs/block_dev.c to the block section fs/block_dev.c is a pretty integral part of the block layer, so make sure it is mentioned in MAINTAINERS. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe commit 13be30f156fda725b168ac89fc91f78651575307 Author: Chris Chiu Date: Tue Dec 22 23:04:59 2020 +0800 ALSA/hda: apply jack fixup for the Acer Veriton N4640G/N6640G/N2510G This Acer Veriton N4640G/N6640G/N2510G desktops have 2 headphone jacks(front and rear), and a separate Mic In jack. The rear headphone jack is actually a line out jack but always silent while playing audio. The front 'Mic In' also fails the jack sensing. Apply the ALC269_FIXUP_LIFEBOOK to have all audio jacks to work as expected. Signed-off-by: Chris Chiu Signed-off-by: Jian-Hong Pan Cc: Link: https://lore.kernel.org/r/20201222150459.9545-2-chiu@endlessos.org Signed-off-by: Takashi Iwai commit 6ca653e3f73a1af0f30dbf9c2c79d2897074989f Author: Chris Chiu Date: Tue Dec 22 23:04:58 2020 +0800 ALSA: hda/realtek: Apply jack fixup for Quanta NL3 The Quanta NL3 laptop has both a headphone output jack and a headset jack, on the right edge of the chassis. The pin information suggests that both of these are at the Front. The PulseAudio is confused to differentiate them so one of the jack can neither get the jack sense working nor the audio output. The ALC269_FIXUP_LIFEBOOK chained with ALC269_FIXUP_QUANTA_MUTE can help to differentiate 2 jacks and get the 'Auto-Mute Mode' working correctly. Signed-off-by: Chris Chiu Cc: Link: https://lore.kernel.org/r/20201222150459.9545-1-chiu@endlessos.org Signed-off-by: Takashi Iwai commit b77709237e72d6467fb27bfbad163f7221ecd648 Author: Zheng Yongjun Date: Thu Dec 10 22:01:03 2020 +0800 dm cache: simplify the return expression of load_mapping() Simplify the return expression. Signed-off-by: Zheng Yongjun Signed-off-by: Mike Snitzer commit 538fcf57aaee6ad78a05f52b69a99baa22b33418 Merge: aab7ce2b099bd 9272e97ae9e9b b08221c40febc fef98671194be Author: Rafael J. Wysocki Date: Tue Dec 22 15:51:11 2020 +0100 Merge branches 'acpi-scan', 'acpi-pnp' and 'acpi-sleep' * acpi-scan: ACPI: scan: Add Intel Baytrail Mailbox Device to acpi_ignore_dep_ids ACPI: scan: Avoid unnecessary second pass in acpi_bus_scan() ACPI: scan: Defer enumeration of devices with _DEP lists ACPI: scan: Evaluate _DEP before adding the device * acpi-pnp: ACPI: PNP: compare the string length in the matching_id() * acpi-sleep: ACPI: PM: s2idle: Move x86-specific code to the x86 directory ACPI: PM: s2idle: Add AMD support to handle _DSM commit 767c973f2e4a9264a4f159c9fad5ca8acdb9915e Author: Marc Zyngier Date: Tue Dec 22 12:46:41 2020 +0000 KVM: arm64: Declutter host PSCI 0.1 handling Although there is nothing wrong with the current host PSCI relay implementation, we can clean it up and remove some of the helpers that do not improve the overall readability of the legacy PSCI 0.1 handling. Opportunity is taken to turn the bitmap into a set of booleans, and creative use of preprocessor macros make init and check more concise/readable. Suggested-by: Mark Rutland Signed-off-by: Marc Zyngier commit 860a4c3d1e04a3c3e62bacbbba64417bf49768e2 Author: David Brazdil Date: Tue Dec 8 14:24:52 2020 +0000 KVM: arm64: Move skip_host_instruction to adjust_pc.h Move function for skipping host instruction in the host trap handler to a header file containing analogical helpers for guests. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201208142452.87237-7-dbrazdil@google.com commit e6829e0384a49efe68537298132230bebd8bd1b3 Author: David Brazdil Date: Tue Dec 8 14:24:51 2020 +0000 KVM: arm64: Remove unused includes in psci-relay.c Minor cleanup removing unused includes. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201208142452.87237-6-dbrazdil@google.com commit 61fe0c37af57ac35472a870581a7d0bb5ac2f63a Author: David Brazdil Date: Tue Dec 8 14:24:50 2020 +0000 KVM: arm64: Minor cleanup of hyp variables used in host Small cleanup moving declarations of hyp-exported variables to kvm_host.h and using macros to avoid having to refer to them with kvm_nvhe_sym() in host. No functional change intended. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201208142452.87237-5-dbrazdil@google.com commit c3e181aec96f6ada84df1cb72a72be8970f8b284 Author: David Brazdil Date: Tue Dec 8 14:24:49 2020 +0000 KVM: arm64: Skip computing hyp VA layout for VHE Computing the hyp VA layout is redundant when the kernel runs in EL2 and hyp shares its VA mappings. Make calling kvm_compute_layout() conditional on not just CONFIG_KVM but also !is_kernel_in_hyp_mode(). Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201208142452.87237-4-dbrazdil@google.com commit 7a96a0687b80a1870c689418d7b72012c8bdd53d Author: David Brazdil Date: Tue Dec 8 14:24:48 2020 +0000 KVM: arm64: Use lm_alias in nVHE-only VA conversion init_hyp_physvirt_offset() computes PA from a kernel VA. Conversion to kernel linear-map is required first but the code used kvm_ksym_ref() for this purpose. Under VHE that is a NOP and resulted in a runtime warning. Replace kvm_ksym_ref with lm_alias. Reported-by: Qian Cai Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201208142452.87237-3-dbrazdil@google.com commit ff367fe473a9857160c17827931375a899076394 Author: David Brazdil Date: Tue Dec 8 14:24:47 2020 +0000 KVM: arm64: Prevent use of invalid PSCI v0.1 function IDs PSCI driver exposes a struct containing the PSCI v0.1 function IDs configured in the DT. However, the struct does not convey the information whether these were set from DT or contain the default value zero. This could be a problem for PSCI proxy in KVM protected mode. Extend config passed to KVM with a bit mask with individual bits set depending on whether the corresponding function pointer in psci_ops is set, eg. set bit for PSCI_CPU_SUSPEND if psci_ops.cpu_suspend != NULL. Previously config was split into multiple global variables. Put everything into a single struct for convenience. Reported-by: Mark Rutland Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201208142452.87237-2-dbrazdil@google.com commit 2a5f1b67ec577fb1544b563086e0377f095f88e2 Author: Marc Zyngier Date: Thu Dec 10 08:30:59 2020 +0000 KVM: arm64: Don't access PMCR_EL0 when no PMU is available We reset the guest's view of PMCR_EL0 unconditionally, based on the host's view of this register. It is however legal for an implementation not to provide any PMU, resulting in an UNDEF. The obvious fix is to skip the reset of this shadow register when no PMU is available, sidestepping the issue entirely. If no PMU is available, the guest is not able to request a virtual PMU anyway, so not doing nothing is the right thing to do! It is unlikely that this bug can hit any HW implementation though, as they all provide a PMU. It has been found using nested virt with the host KVM not implementing the PMU itself. Fixes: ab9468340d2bc ("arm64: KVM: Add access handler for PMCR register") Reviewed-by: Alexandru Elisei Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201210083059.1277162-1-maz@kernel.org commit 37309f47e2f5674f3e86cb765312ace42cfcedf5 Author: Ping Cheng Date: Wed Dec 9 20:52:30 2020 -0800 HID: wacom: Fix memory leakage caused by kfifo_alloc As reported by syzbot below, kfifo_alloc'd memory would not be freed if a non-zero return value is triggered in wacom_probe. This patch creates and uses devm_kfifo_alloc to allocate and free itself. BUG: memory leak unreferenced object 0xffff88810dc44a00 (size 512): comm "kworker/1:2", pid 3674, jiffies 4294943617 (age 14.100s) 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: [<0000000023e1afac>] kmalloc_array include/linux/slab.h:592 [inline] [<0000000023e1afac>] __kfifo_alloc+0xad/0x100 lib/kfifo.c:43 [<00000000c477f737>] wacom_probe+0x1a1/0x3b0 drivers/hid/wacom_sys.c:2727 [<00000000b3109aca>] hid_device_probe+0x16b/0x210 drivers/hid/hid-core.c:2281 [<00000000aff7c640>] really_probe+0x159/0x480 drivers/base/dd.c:554 [<00000000778d0bc3>] driver_probe_device+0x84/0x100 drivers/base/dd.c:738 [<000000005108dbb5>] __device_attach_driver+0xee/0x110 drivers/base/dd.c:844 [<00000000efb7c59e>] bus_for_each_drv+0xb7/0x100 drivers/base/bus.c:431 [<0000000024ab1590>] __device_attach+0x122/0x250 drivers/base/dd.c:912 [<000000004c7ac048>] bus_probe_device+0xc6/0xe0 drivers/base/bus.c:491 [<00000000b93050a3>] device_add+0x5ac/0xc30 drivers/base/core.c:2936 [<00000000e5b46ea5>] hid_add_device+0x151/0x390 drivers/hid/hid-core.c:2437 [<00000000c6add147>] usbhid_probe+0x412/0x560 drivers/hid/usbhid/hid-core.c:1407 [<00000000c33acdb4>] usb_probe_interface+0x177/0x370 drivers/usb/core/driver.c:396 [<00000000aff7c640>] really_probe+0x159/0x480 drivers/base/dd.c:554 [<00000000778d0bc3>] driver_probe_device+0x84/0x100 drivers/base/dd.c:738 [<000000005108dbb5>] __device_attach_driver+0xee/0x110 drivers/base/dd.c:844 https://syzkaller.appspot.com/bug?extid=5b49c9695968d7250a26 Reported-by: syzbot+5b49c9695968d7250a26@syzkaller.appspotmail.com Signed-off-by: Ping Cheng Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit 43877226829eda91856b055d217b3033805fd76f Author: Mike Oliphant Date: Mon Dec 21 13:55:33 2020 -0800 ALSA: usb-audio: Add implicit feeback support for the BOSS GT-1 The BOSS GT-1 (USB ID 0582:01d6) requires implicit feedback like other similar BOSS devices. This patch adds this support. [ rearranged the table entry in the ID order -- tiwai ] Signed-off-by: Mike Oliphant Link: https://lore.kernel.org/r/20201221215533.2511-1-oliphant@nostatic.org Signed-off-by: Takashi Iwai commit e1dc20995cb9fa04b46e8f37113a7203c906d2bf Author: John Garry Date: Mon Dec 21 22:30:55 2020 +0800 driver core: platform: Add extra error check in devm_platform_get_irqs_affinity() The current check of nvec < minvec for nvec returned from platform_irq_count() will not detect a negative error code in nvec. This is because minvec is unsigned, and, as such, nvec is promoted to unsigned in that check, which will make it a huge number (if it contained -EPROBE_DEFER). In practice, an error should not occur in nvec for the only in-tree user, but add a check anyway. Fixes: e15f2fa959f2 ("driver core: platform: Add devm_platform_get_irqs_affinity()") Reported-by: Dan Carpenter Signed-off-by: John Garry Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1608561055-231244-1-git-send-email-john.garry@huawei.com commit de043da0b9e71147ca610ed542d34858aadfc61c Author: Atish Patra Date: Fri Dec 18 16:13:56 2020 -0800 RISC-V: Fix usage of memblock_enforce_memory_limit memblock_enforce_memory_limit accepts the maximum memory size not the maximum address that can be handled by kernel. Fix the function invocation accordingly. Fixes: 1bd14a66ee52 ("RISC-V: Remove any memblock representing unusable memory area") Cc: stable@vger.kernel.org Reported-by: Bin Meng Tested-by: Bin Meng Acked-by: Mike Rapoport Signed-off-by: Atish Patra Signed-off-by: Palmer Dabbelt commit 9eb78c25327548b905598975aa3ded4ef244b94a Author: Artem Labazov <123321artyom@gmail.com> Date: Mon Dec 7 09:04:36 2020 +0900 exfat: Avoid allocating upcase table using kcalloc() The table for Unicode upcase conversion requires an order-5 allocation, which may fail on a highly-fragmented system: pool-udisksd: page allocation failure: order:5, mode:0x40dc0(GFP_KERNEL|__GFP_COMP|__GFP_ZERO), nodemask=(null), cpuset=/,mems_allowed=0 CPU: 4 PID: 3756880 Comm: pool-udisksd Tainted: G U 5.8.10-200.fc32.x86_64 #1 Hardware name: Dell Inc. XPS 13 9360/0PVG6D, BIOS 2.13.0 11/14/2019 Call Trace: dump_stack+0x6b/0x88 warn_alloc.cold+0x75/0xd9 ? _cond_resched+0x16/0x40 ? __alloc_pages_direct_compact+0x144/0x150 __alloc_pages_slowpath.constprop.0+0xcfa/0xd30 ? __schedule+0x28a/0x840 ? __wait_on_bit_lock+0x92/0xa0 __alloc_pages_nodemask+0x2df/0x320 kmalloc_order+0x1b/0x80 kmalloc_order_trace+0x1d/0xa0 exfat_create_upcase_table+0x115/0x390 [exfat] exfat_fill_super+0x3ef/0x7f0 [exfat] ? sget_fc+0x1d0/0x240 ? exfat_init_fs_context+0x120/0x120 [exfat] get_tree_bdev+0x15c/0x250 vfs_get_tree+0x25/0xb0 do_mount+0x7c3/0xaf0 ? copy_mount_options+0xab/0x180 __x64_sys_mount+0x8e/0xd0 do_syscall_64+0x4d/0x90 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Make the driver use kvcalloc() to eliminate the issue. Fixes: 370e812b3ec1 ("exfat: add nls operations") Cc: stable@vger.kernel.org #v5.7+ Signed-off-by: Artem Labazov <123321artyom@gmail.com> Signed-off-by: Namjae Jeon commit 74a2921948ed8c0e7f079a98442ec3493168cc85 Author: John Garry Date: Wed Dec 2 18:36:57 2020 +0800 scsi: hisi_sas: Expose HW queues for v2 hw As a performance enhancement, make the completion queue interrupts managed. In addition, in commit bf0beec0607d ("blk-mq: drain I/O when all CPUs in a hctx are offline"), CPU hotplug for MQ devices using managed interrupts is made safe. So expose HW queues to blk-mq to take advantage of this. Flag Scsi_host.host_tagset is also set to ensure that the HBA is not sent more commands than it can handle. However the driver still does not use request tag for IPTT as there are many HW bugs means that special rules apply for IPTT allocation. Link: https://lore.kernel.org/r/1606905417-183214-6-git-send-email-john.garry@huawei.com Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 2e2cbaf920d14de9a96180ddefd6861bcc46f07d Author: Al Viro Date: Wed Dec 9 18:38:24 2020 -0500 fix hostfs_open() use of ->f_path.dentry this is one of the cases where we need to use d_real() - we are using more than the name of dentry here. ->d_sb is used as well, so in case of hostfs being used as a layer we get the wrong superblock. Reported-by: Johannes Berg Tested-by: Johannes Berg Signed-off-by: Al Viro commit 2575bc1aa9d52a62342b57a0b7d0a12146cf6aed Author: Stefan Chulski Date: Sun Dec 20 13:02:29 2020 +0200 net: mvpp2: Fix GoP port 3 Networking Complex Control configurations During GoP port 2 Networking Complex Control mode of operation configurations, also GoP port 3 mode of operation was wrongly set. Patch removes these configurations. Fixes: f84bf386f395 ("net: mvpp2: initialize the GoP") Acked-by: Marcin Wojtas Signed-off-by: Stefan Chulski Link: https://lore.kernel.org/r/1608462149-1702-1-git-send-email-stefanc@marvell.com Signed-off-by: Jakub Kicinski commit bcce55f556e824d43f352d76b94509185585e38d Author: Guillaume Nault Date: Sat Dec 19 13:19:24 2020 +0100 ppp: Fix PPPIOCUNBRIDGECHAN request number PPPIOCGL2TPSTATS already uses 54. This shouldn't be a problem in practice, but let's keep the logical decreasing assignment scheme. Fixes: 4cf476ced45d ("ppp: add PPPIOCBRIDGECHAN and PPPIOCUNBRIDGECHAN ioctls") Signed-off-by: Guillaume Nault Link: https://lore.kernel.org/r/e3a4c355e3820331d8e1fffef8522739aae58b57.1608380117.git.gnault@redhat.com Signed-off-by: Jakub Kicinski commit 8df66af5c1e5f80562fe728db5ec069b21810144 Author: Dan Carpenter Date: Sat Dec 19 14:01:44 2020 +0300 atm: idt77252: call pci_disable_device() on error path This error path needs to disable the pci device before returning. Fixes: ede58ef28e10 ("atm: remove deprecated use of pci api") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/X93dmC4NX0vbTpGp@mwanda Signed-off-by: Jakub Kicinski commit 83469893204281ecf65d572bddf02de29a19787c Author: Shannon Nelson Date: Fri Dec 18 13:50:01 2020 -0800 ionic: account for vlan tag len in rx buffer len Let the FW know we have enough receive buffer space for the vlan tag if it isn't stripped. Fixes: 0f3154e6bcb3 ("ionic: Add Tx and Rx handling") Signed-off-by: Shannon Nelson Link: https://lore.kernel.org/r/20201218215001.64696-1-snelson@pensando.io Signed-off-by: Jakub Kicinski commit d7e2c827cca865a39fb65d9f9528e79fcf2359d7 Merge: 54ddbdb024882 e925e0cd2a705 Author: Jakub Kicinski Date: Mon Dec 21 17:29:51 2020 -0800 Merge branch 'ucc_geth-fixes' Rasmus Villemoes says: ==================== ucc_geth fixes This is three bug fixes that fell out of a series of cleanups of the ucc_geth driver. ==================== Link: https://lore.kernel.org/r/20201218105538.30563-1-rasmus.villemoes@prevas.dk Signed-off-by: Jakub Kicinski commit e925e0cd2a705aaacb0b907bb3691fcac3a973a4 Author: Rasmus Villemoes Date: Fri Dec 18 11:55:38 2020 +0100 ethernet: ucc_geth: fix use-after-free in ucc_geth_remove() ugeth is the netdiv_priv() part of the netdevice. Accessing the memory pointed to by ugeth (such as done by ucc_geth_memclean() and the two of_node_puts) after free_netdev() is thus use-after-free. Fixes: 80a9fad8e89a ("ucc_geth: fix module removal") Signed-off-by: Rasmus Villemoes Signed-off-by: Jakub Kicinski commit 887078de2a23689e29d6fa1b75d7cbc544c280be Author: Rasmus Villemoes Date: Fri Dec 18 11:55:37 2020 +0100 ethernet: ucc_geth: fix definition and size of ucc_geth_tx_global_pram Table 8-53 in the QUICC Engine Reference manual shows definitions of fields up to a size of 192 bytes, not just 128. But in table 8-111, one does find the text Base Address of the Global Transmitter Parameter RAM Page. [...] The user needs to allocate 128 bytes for this page. The address must be aligned to the page size. I've checked both rev. 7 (11/2015) and rev. 9 (05/2018) of the manual; they both have this inconsistency (and the table numbers are the same). Adding a bit of debug printing, on my board the struct ucc_geth_tx_global_pram is allocated at offset 0x880, while the (opaque) ucc_geth_thread_data_tx gets allocated immediately afterwards, at 0x900. So whatever the engine writes into the thread data overlaps with the tail of the global tx pram (and devmem says that something does get written during a simple ping). I haven't observed any failure that could be attributed to this, but it seems to be the kind of thing that would be extremely hard to debug. So extend the struct definition so that we do allocate 192 bytes. Signed-off-by: Rasmus Villemoes Signed-off-by: Jakub Kicinski commit 1385ae5c30f238f81bc6528d897c6d7a0816783f Author: Rasmus Villemoes Date: Fri Dec 18 11:55:36 2020 +0100 ethernet: ucc_geth: set dev->max_mtu to 1518 All the buffers and registers are already set up appropriately for an MTU slightly above 1500, so we just need to expose this to the networking stack. AFAICT, there's no need to implement .ndo_change_mtu when the receive buffers are always set up to support the max_mtu. This fixes several warnings during boot on our mpc8309-board with an embedded mv88e6250 switch: mv88e6085 mdio@e0102120:10: nonfatal error -34 setting MTU 1500 on port 0 ... mv88e6085 mdio@e0102120:10: nonfatal error -34 setting MTU 1500 on port 4 ucc_geth e0102000.ethernet eth1: error -22 setting MTU to 1504 to include DSA overhead The last line explains what the DSA stack tries to do: achieving an MTU of 1500 on-the-wire requires that the master netdevice connected to the CPU port supports an MTU of 1500+the tagging overhead. Fixes: bfcb813203e6 ("net: dsa: configure the MTU for switch ports") Reviewed-by: Andrew Lunn Signed-off-by: Rasmus Villemoes Reviewed-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit 54ddbdb024882e226055cc4c3c246592ddde2ee5 Author: Florian Fainelli Date: Fri Dec 18 09:38:43 2020 -0800 net: systemport: set dev->max_mtu to UMAC_MAX_MTU_SIZE The driver is already allocating receive buffers of 2KiB and the Ethernet MAC is configured to accept frames up to UMAC_MAX_MTU_SIZE. Fixes: bfcb813203e6 ("net: dsa: configure the MTU for switch ports") Signed-off-by: Florian Fainelli Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/20201218173843.141046-1-f.fainelli@gmail.com Signed-off-by: Jakub Kicinski commit e7e518053c267bb6be3799520d9f4a34c7264a2e Author: Eric Dumazet Date: Mon Dec 21 11:25:06 2020 -0800 bpf: Add schedule point in htab_init_buckets() We noticed that with a LOCKDEP enabled kernel, allocating a hash table with 65536 buckets would use more than 60ms. htab_init_buckets() runs from process context, it is safe to schedule to avoid latency spikes. Fixes: c50eb518e262 ("bpf: Use separate lockdep class for each hashtab") Reported-by: John Sperbeck Signed-off-by: Eric Dumazet Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20201221192506.707584-1-eric.dumazet@gmail.com commit a528b04ea40690ff40501f50d618a62a02b19620 Author: Pavel Begunkov Date: Mon Dec 21 18:34:04 2020 +0000 io_uring: fix ignoring xa_store errors xa_store() may fail, check the result. Cc: stable@vger.kernel.org # 5.10 Fixes: 0f2122045b946 ("io_uring: don't rely on weak ->files references") Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 52252adede912890b81e0a05503a482062e17c6e Author: Antonio Quartulli Date: Thu Dec 10 09:50:49 2020 +0100 dm ebs: avoid double unlikely() notation when using IS_ERR() The definition of IS_ERR() already applies the unlikely() notation when checking the error status of the passed pointer. For this reason there is no need to have the same notation outside of IS_ERR() itself. Clean up code by removing redundant notation. Signed-off-by: Antonio Quartulli Signed-off-by: Mike Snitzer commit 3b66e4a8e58a85af3212c7117d7a29c9ef6679a2 Author: Guido Günther Date: Fri Dec 18 19:38:07 2020 +0100 regulator: bd718x7: Add enable times Use the typical startup times from the data sheet so boards get a reasonable default. Not setting any enable time can lead to board hangs when e.g. clocks are enabled too soon afterwards. This fixes gpu power domain resume on the Librem 5. [Moved #defines into driver, seems to be general agreement and avoids any cross tree issues -- broonie] Signed-off-by: Guido Günther Reviewed-by: Matti Vaittinen Link: https://lore.kernel.org/r/41fb2ed19f584f138336344e2297ae7301f72b75.1608316658.git.agx@sigxcpu.org Signed-off-by: Mark Brown commit 252bd1256396cebc6fc3526127fdb0b317601318 Author: Hyeongseok Kim Date: Thu Dec 3 09:46:59 2020 +0900 dm verity: skip verity work if I/O error when system is shutting down If emergency system shutdown is called, like by thermal shutdown, a dm device could be alive when the block device couldn't process I/O requests anymore. In this state, the handling of I/O errors by new dm I/O requests or by those already in-flight can lead to a verity corruption state, which is a misjudgment. So, skip verity work in response to I/O error when system is shutting down. Signed-off-by: Hyeongseok Kim Reviewed-by: Sami Tolvanen Signed-off-by: Mike Snitzer commit 8653b778e454a7708847aeafe689bce07aeeb94e Merge: 8552d28e14011 abe7e32f1d503 Author: Linus Torvalds Date: Mon Dec 21 10:39:37 2020 -0800 Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk updates from Stephen Boyd: "The core framework got some nice improvements this time around. We gained the ability to get struct clk pointers from a struct clk_hw so that clk providers can consume the clks they provide, if they need to do something like that. This has been a long missing part of the clk provider API that will help us move away from exposing a struct clk pointer in the struct clk_hw. Tracepoints are added for the clk_set_rate() "range" functions, similar to the tracepoints we already have for clk_set_rate() and we added a column to debugfs to help developers understand the hardware enable state of clks in case firmware or bootloader state is different than what is expected. Overall the core changes are mostly improving the clk driver writing experience. At the driver level, we have the usual collection of driver updates and new drivers for new SoCs. This time around the Qualcomm folks introduced a good handful of clk drivers for various parts of three or four SoCs. The SiFive folks added a new clk driver for their FU740 SoCs, coming in second on the diffstat and then Atmel AT91 and Amlogic SoCs had lots of work done after that for various new features. One last thing to note in the driver area is that the i.MX driver has gained a new binding to support SCU clks after being on the list for many months. It uses a two cell binding which is sort of rare in clk DT bindings. Beyond that we have the usual set of driver fixes and tweaks that come from more testing and finding out that some configuration was wrong or that a driver could support being built as a module. Summary: Core: - Add some trace points for clk_set_rate() "range" functions - Add hardware enable information to clk_summary debugfs - Replace clk-provider.h with of_clk.h when possible - Add devm variant of clk_notifier_register() - Add clk_hw_get_clk() to generate a struct clk from a struct clk_hw New Drivers: - Bindings for Canaan K210 SoC clks - Support for SiFive FU740 PRCI - Camera clks on Qualcomm SC7180 SoCs - GCC and RPMh clks on Qualcomm SDX55 SoCs - RPMh clks on Qualcomm SM8350 SoCs - LPASS clks on Qualcomm SM8250 SoCs Updates: - DVFS support for AT91 clk driver - Update git repo branch for Renesas clock drivers - Add camera (CSI) and video-in (VIN) clocks on Renesas R-Car V3U - Add RPC (QSPI/HyperFLASH) clocks on Renesas RZ/G2M, RZ/G2N, and RZ/G2E - Stop using __raw_*() I/O accessors in Renesas clk drivers - One more conversion of DT bindings to json-schema - Make i.MX clk-gate2 driver more flexible - New two cell binding for i.MX SCU clks - Drop of_match_ptr() in i.MX8 clk drivers - Add arch dependencies for Rockchip clk drivers - Fix i2s on Rockchip rk3066 - Add MIPI DSI clks on Amlogic axg and g12 SoCs - Support modular builds of Amlogic clk drivers - Fix an Amlogic Video PLL clock dependency - Samsung Kconfig dependencies updates for better compile test coverage - Refactoring of the Samsung PLL clocks driver - Small Tegra driver cleanups - Minor fixes to Ingenic and VC5 clk drivers - Cleanup patches to remove unused variables and plug memory leaks" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (134 commits) dt-binding: clock: Document canaan,k210-clk bindings dt-bindings: Add Canaan vendor prefix clk: vc5: Use "idt,voltage-microvolt" instead of "idt,voltage-microvolts" clk: ingenic: Fix divider calculation with div tables clk: sunxi-ng: Make sure divider tables have sentinel clk: s2mps11: Fix a resource leak in error handling paths in the probe function clk: mvebu: a3700: fix the XTAL MODE pin to MPP1_9 clk: si5351: Wait for bit clear after PLL reset clk: at91: sam9x60: remove atmel,osc-bypass support clk: at91: sama7g5: register cpu clock clk: at91: clk-master: re-factor master clock clk: at91: sama7g5: do not allow cpu pll to go higher than 1GHz clk: at91: sama7g5: decrease lower limit for MCK0 rate clk: at91: sama7g5: remove mck0 from parent list of other clocks clk: at91: clk-sam9x60-pll: allow runtime changes for pll clk: at91: sama7g5: add 5th divisor for mck0 layout and characteristics clk: at91: clk-master: add 5th divisor for mck master clk: at91: sama7g5: allow SYS and CPU PLLs to be exported and referenced in DT dt-bindings: clock: at91: add sama7g5 pll defines clk: at91: sama7g5: fix compilation error ... commit 8552d28e140110fc935b39a6bfaf33c8ce3a1ad5 Merge: 70990afa34fba 8b22820efb35f Author: Linus Torvalds Date: Mon Dec 21 10:35:11 2020 -0800 Merge tag 'm68knommu-for-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu Pull m68knommu updates from Greg Ungerer: - cleanup of 68328 code - align BSS section to 32bit * tag 'm68knommu-for-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68k: m68328: remove duplicate code m68k: m68328: move platform code to separate files m68knommu: align BSS section to 4-byte boundaries commit 70990afa34fbac03ade78e2ad0ccd418acecfc04 Merge: e37b12e4bb21e cfd1d0f524a87 Author: Linus Torvalds Date: Mon Dec 21 10:28:02 2020 -0800 Merge tag '9p-for-5.11-rc1' of git://github.com/martinetd/linux Pull 9p update from Dominique Martinet: - fix long-standing limitation on open-unlink-fop pattern - add refcount to p9_fid (fixes the above and will allow for more cleanups and simplifications in the future) * tag '9p-for-5.11-rc1' of git://github.com/martinetd/linux: 9p: Remove unnecessary IS_ERR() check 9p: Uninitialized variable in v9fs_writeback_fid() 9p: Fix writeback fid incorrectly being attached to dentry 9p: apply review requests for fid refcounting 9p: add refcount to p9_fid struct fs/9p: search open fids first fs/9p: track open fids fs/9p: fix create-unlink-getattr idiom commit a590370d918fc66c62df6620445791fbe840344a Author: Roman Guskov Date: Mon Dec 21 13:35:32 2020 +0100 spi: stm32: FIFO threshold level - fix align packet size if cur_bpw <= 8 and xfer_len < 4 then the value of fthlv will be 1 and SPI registers content may have been lost. * If SPI data register is accessed as a 16-bit register and DSIZE <= 8bit, better to select FTHLV = 2, 4, 6 etc * If SPI data register is accessed as a 32-bit register and DSIZE > 8bit, better to select FTHLV = 2, 4, 6 etc, while if DSIZE <= 8bit, better to select FTHLV = 4, 8, 12 etc Signed-off-by: Roman Guskov Fixes: dcbe0d84dfa5 ("spi: add driver for STM32 SPI controller") Reviewed-by: Marek Vasut Link: https://lore.kernel.org/r/20201221123532.27272-1-rguskov@dh-electronics.com Signed-off-by: Mark Brown commit bfe55584713b4d4d518ffe9cf2dab1129eba6321 Author: Arend van Spriel Date: Sun Dec 20 15:18:07 2020 +0100 MAINTAINERS: switch to different email address Switching to private mail account as work email is polluted with a legal disclaimer. Just making it extra clear by changing the email address in the MAINTAINERS file as well. Signed-off-by: Arend van Spriel Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201220141807.17278-1-aspriel@gmail.com commit c635b0cea6b812898563809a13e65278989b2c72 Author: Fengfei Xi Date: Thu Dec 10 16:21:34 2020 +0800 docs: admin-guide: Fix default value of max_map_count in sysctl/vm.rst Since the default value of sysctl_max_map_count is defined as DEFAULT_MAX_MAP_COUNT from mm/util.c int sysctl_max_map_count __read_mostly = DEFAULT_MAX_MAP_COUNT; DEFAULT_MAX_MAP_COUNT is defined as 65530 (65535-5) in include/linux/mm.h #define MAPCOUNT_ELF_CORE_MARGIN (5) #define DEFAULT_MAX_MAP_COUNT (USHRT_MAX - MAPCOUNT_ELF_CORE_MARGIN) Signed-off-by: Fengfei Xi Link: https://lore.kernel.org/r/20201210082134.36957-1-xi.fengfei@h3c.com Signed-off-by: Jonathan Corbet commit 9bf19b78a203b6ed20ed7b5d7222f5ef7a49aed4 Author: Borislav Petkov Date: Thu Dec 17 19:37:56 2020 +0100 Documentation/submitting-patches: Document the SoB chain Document what a chain of Signed-off-by's in a patch commit message should mean, explicitly. This has been carved out from a tip subsystem handbook patchset by Thomas Gleixner: https://lkml.kernel.org/r/20181107171010.421878737@linutronix.de and incorporates follow-on comments. Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20201217183756.GE23634@zn.tnic Signed-off-by: Jonathan Corbet commit 27ab873e0ca640cbe1375aa5a0cdd0607cb6bbdc Author: Milan Lakhani Date: Tue Dec 15 20:42:36 2020 +0000 Documentation: process: Correct numbering Renumber the steps in submit-checklist.rst as some numbers were skipped. Signed-off-by: Milan Lakhani Link: https://lore.kernel.org/r/1608064956-5512-1-git-send-email-milan.lakhani@codethink.co.uk Signed-off-by: Jonathan Corbet commit 7e90285716518d810857a1d362983d99da9bbf66 Author: Lee Jones Date: Wed Dec 16 13:46:54 2020 +0000 docs: submitting-patches: Trivial - fix grammatical error "it is a used" does not make sense. Should be "it is used". Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201216134654.271508-1-lee.jones@linaro.org Signed-off-by: Jonathan Corbet commit d5c243989fb0cb03c74d7340daca3b819f706ee7 Author: Christophe Leroy Date: Mon Dec 21 06:18:03 2020 +0000 powerpc/32: Fix vmap stack - Properly set r1 before activating MMU on syscall too We need r1 to be properly set before activating MMU, otherwise any new exception taken while saving registers into the stack in syscall prologs will use the user stack, which is wrong and will even lockup or crash when KUAP is selected. Do that by switching the meaning of r11 and r1 until we have saved r1 to the stack: copy r1 into r11 and setup the new stack pointer in r1. To avoid complicating and impacting all generic and specific prolog code (and more), copy back r1 into r11 once r11 is save onto the stack. We could get rid of copying r1 back and forth at the cost of rewriting everything to use r1 instead of r11 all the way when CONFIG_VMAP_STACK is set, but the effort is probably not worth it for now. Fixes: da7bb43ab9da ("powerpc/32: Fix vmap stack - Properly set r1 before activating MMU") Cc: stable@vger.kernel.org # v5.10+ Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/a3d819d5c348cee9783a311d5d3f3ba9b48fd219.1608531452.git.christophe.leroy@csgroup.eu commit ecbbb88727aee7880527d4b320b4d06dde75d46d Merge: 8cc9251737d18 2c736bb4087f2 Author: Russell King Date: Mon Dec 21 11:19:26 2020 +0000 Merge branch 'devel-stable' into for-next commit 8cc9251737d1883e33fd0a7dafbd4062916c1ca6 Merge: e64ab473dddaf 10fce53c0ef8f Author: Russell King Date: Mon Dec 21 11:19:24 2020 +0000 Merge branches 'fixes' and 'misc' into for-next commit 10fce53c0ef8f6e79115c3d9e0d7ea1338c3fa37 Author: Ard Biesheuvel Date: Tue Nov 17 08:41:01 2020 +0100 ARM: 9027/1: head.S: explicitly map DT even if it lives in the first physical section The early ATAGS/DT mapping code uses SECTION_SHIFT to mask low order bits of R2, and decides that no ATAGS/DTB were provided if the resulting value is 0x0. This means that on systems where DRAM starts at 0x0 (such as Raspberry Pi), no explicit mapping of the DT will be created if R2 points into the first 1 MB section of memory. This was not a problem before, because the decompressed kernel is loaded at the base of DRAM and mapped using sections as well, and so as long as the DT is referenced via a virtual address that uses the same translation (the linear map, in this case), things work fine. However, commit 7a1be318f579 ("9012/1: move device tree mapping out of linear region") changes this, and now the DT is referenced via a virtual address that is disjoint from the linear mapping of DRAM, and so we need the early code to create the DT mapping unconditionally. So let's create the early DT mapping for any value of R2 != 0x0. Reported-by: "kernelci.org bot" Reviewed-by: Linus Walleij Signed-off-by: Ard Biesheuvel Signed-off-by: Russell King commit 0cda9bc15dfc459bd178d6ba93389df52dd57957 Author: Nathan Chancellor Date: Tue Dec 8 01:34:16 2020 +0100 ARM: 9038/1: Link with '-z norelro' When linking a multi_v7_defconfig + CONFIG_KASAN=y kernel with LD=ld.lld, the following error occurs: $ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- LLVM=1 zImage ld.lld: error: section: .exit.data is not contiguous with other relro sections LLD defaults to '-z relro', which is unneeded for the kernel because program headers are not used nor is there any position independent code generation or linking for ARM. Add '-z norelro' to LDFLAGS_vmlinux to avoid this error. Link: https://github.com/ClangBuiltLinux/linux/issues/1189 Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Signed-off-by: Russell King commit 551b39efc6ffdc7a881122fbac0caa2a27a464d8 Author: Geert Uytterhoeven Date: Fri Dec 4 10:39:10 2020 +0100 ARM: 9037/1: uncompress: Add OF_DT_MAGIC macro The DTB magic marker is stored as a 32-bit big-endian value, and thus depends on the CPU's endianness. Add a macro to define this value in native endianness, to reduce #ifdef clutter and (future) duplication. Signed-off-by: Geert Uytterhoeven Reviewed-by: Ard Biesheuvel Reviewed-by: Nicolas Pitre Signed-off-by: Russell King commit 1ecec38547d415054fdb63a231234f44396b6d06 Author: Geert Uytterhoeven Date: Fri Dec 4 10:37:14 2020 +0100 ARM: 9036/1: uncompress: Fix dbgadtb size parameter name The dbgadtb macro is passed the size of the appended DTB, not the end address. Fixes: c03e41470e901123 ("ARM: 9010/1: uncompress: Print the location of appended DTB") Signed-off-by: Geert Uytterhoeven Reviewed-by: Linus Walleij Signed-off-by: Russell King commit 0557ac83fd1a0a7cd6909665bad50006507115a0 Author: Geert Uytterhoeven Date: Fri Dec 4 10:37:47 2020 +0100 ARM: 9035/1: uncompress: Add be32tocpu macro DTB stores all values as 32-bit big-endian integers. Add a macro to convert such values to native CPU endianness, to reduce duplication. Signed-off-by: Geert Uytterhoeven Reviewed-by: Ard Biesheuvel Reviewed-by: Nicolas Pitre Signed-off-by: Russell King commit 27bde183b0d3b0e8e84c80db1864a5c7bd20b5e7 Author: Anshuman Khandual Date: Mon Nov 30 11:24:09 2020 +0100 ARM: 9033/1: arm/smp: Drop the macro S(x,s) Mapping between IPI type index and its string is direct without requiring an additional offset. Hence the existing macro S(x, s) is now redundant and can just be dropped. This also makes the code clean and simple. Cc: Marc Zyngier Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual Signed-off-by: Russell King commit 76460d613d9b4096f3567bd444e3fc275db1b96b Author: Anshuman Khandual Date: Mon Nov 30 10:28:20 2020 +0100 ARM: 9032/1: arm/mm: Convert PUD level pgtable helper macros into functions Macros used as functions can be problematic from the compiler perspective. There was a build failure report caused primarily because of non reference of an argument variable. Hence convert PUD level pgtable helper macros into functions in order to avoid such problems in the future. In the process, it fixes the argument variables sequence in set_pud() which probably remained hidden for being a macro. https://lore.kernel.org/linux-mm/202011020749.5XQ3Hfzc-lkp@intel.com/ https://lore.kernel.org/linux-mm/5fa49698.Vu2O3r+dU20UoEJ+%25lkp@intel.com/ Cc: Andrew Morton Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Linus Walleij Signed-off-by: Anshuman Khandual Signed-off-by: Russell King commit 6c7a6d22fcef9181239ea7248c6b0c4117b9325e Author: Ard Biesheuvel Date: Fri Nov 27 13:07:22 2020 +0100 ARM: 9031/1: hyp-stub: remove unused .L__boot_cpu_mode_offset symbol Commit aaac3733171fca94 ("ARM: kvm: replace open coded VA->PA calculations with adr_l call") removed all uses of .L__boot_cpu_mode_offset, so there is no longer a need to define it. Signed-off-by: Ard Biesheuvel Reviewed-by: Linus Walleij Signed-off-by: Russell King commit 3cce9d44321e460e7c88cdec4e4537a6e9ad7c0d Author: Ard Biesheuvel Date: Sat Dec 19 16:29:58 2020 +0100 ARM: 9044/1: vfp: use undef hook for VFP support detection Commit f77ac2e378be9dd6 ("ARM: 9030/1: entry: omit FP emulation for UND exceptions taken in kernel mode") failed to take into account that there is in fact a case where we relied on this code path: during boot, the VFP detection code issues a read of FPSID, which will trigger an undef exception on cores that lack VFP support. So let's reinstate this logic using an undef hook which is registered only for the duration of the initcall to vpf_init(), and which sets VFP_arch to a non-zero value - as before - if no VFP support is present. Fixes: f77ac2e378be9dd6 ("ARM: 9030/1: entry: omit FP emulation for UND ...") Reported-by: "kernelci.org bot" Signed-off-by: Ard Biesheuvel Signed-off-by: Russell King commit 2eda7f11000646909a10298951c9defb2321b240 Author: Michael Ellerman Date: Fri Dec 18 22:16:19 2020 +1100 powerpc/vdso: Fix DOTSYM for 32-bit LE VDSO Skirmisher reported on IRC that the 32-bit LE VDSO was hanging. This turned out to be due to a branch to self in eg. __kernel_gettimeofday. Looking at the disassembly with objdump -dR shows why: 00000528 <__kernel_gettimeofday>: 528: f0 ff 21 94 stwu r1,-16(r1) 52c: a6 02 08 7c mflr r0 530: f0 ff 21 94 stwu r1,-16(r1) 534: 14 00 01 90 stw r0,20(r1) 538: 05 00 9f 42 bcl 20,4*cr7+so,53c <__kernel_gettimeofday+0x14> 53c: a6 02 a8 7c mflr r5 540: ff ff a5 3c addis r5,r5,-1 544: c4 fa a5 38 addi r5,r5,-1340 548: f0 00 a5 38 addi r5,r5,240 54c: 01 00 00 48 bl 54c <__kernel_gettimeofday+0x24> 54c: R_PPC_REL24 .__c_kernel_gettimeofday Because we don't process relocations for the VDSO, this branch remains a branch from 0x54c to 0x54c. With the preceding patch to prohibit R_PPC_REL24 relocations, we instead get a build failure: 0000054c R_PPC_REL24 .__c_kernel_gettimeofday 00000598 R_PPC_REL24 .__c_kernel_clock_gettime 000005e4 R_PPC_REL24 .__c_kernel_clock_gettime64 00000630 R_PPC_REL24 .__c_kernel_clock_getres 0000067c R_PPC_REL24 .__c_kernel_time arch/powerpc/kernel/vdso32/vdso32.so.dbg: dynamic relocations are not supported The root cause is that we're branching to `.__c_kernel_gettimeofday`. But this is 32-bit LE code, which doesn't use function descriptors, so there are no dot symbols. The reason we're trying to branch to a dot symbol is because we're using the DOTSYM macro, but the ifdefs we use to define the DOTSYM macro do not currently work for 32-bit LE. So like previous commits we need to differentiate if the current compilation unit is 64-bit, rather than the kernel as a whole. ie. switch from CONFIG_PPC64 to __powerpc64__. With that fixed 32-bit LE code gets the empty version of DOTSYM, which just resolves to the original symbol name, leading to a direct branch and no relocations: 000003f8 <__kernel_gettimeofday>: 3f8: f0 ff 21 94 stwu r1,-16(r1) 3fc: a6 02 08 7c mflr r0 400: f0 ff 21 94 stwu r1,-16(r1) 404: 14 00 01 90 stw r0,20(r1) 408: 05 00 9f 42 bcl 20,4*cr7+so,40c <__kernel_gettimeofday+0x14> 40c: a6 02 a8 7c mflr r5 410: ff ff a5 3c addis r5,r5,-1 414: f4 fb a5 38 addi r5,r5,-1036 418: f0 00 a5 38 addi r5,r5,240 41c: 85 06 00 48 bl aa0 <__c_kernel_gettimeofday> Fixes: ab037dd87a2f ("powerpc/vdso: Switch VDSO to generic C implementation.") Reported-by: "Will Springer " Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201218111619.1206391-3-mpe@ellerman.id.au commit 107521e8039688f7a9548f17919dfde670b911c1 Author: Michael Ellerman Date: Fri Dec 18 22:16:18 2020 +1100 powerpc/vdso: Don't pass 64-bit ABI cflags to 32-bit VDSO When building the 32-bit VDSO, we are building 32-bit code as part of a 64-bit kernel build. That requires us to tweak the cflags to trick the compiler into building 32-bit code for us. The main way we do that is by passing -m32, but there are other options that affect code generation and ABI selection. In particular when building vgettimeofday.c, we end up passing -mcall-aixdesc because it's in KBUILD_CFLAGS, which causes the compiler to generate function descriptors, and dot symbols, eg: $ nm arch/powerpc/kernel/vdso32/vgettimeofday.o 000005d0 T .__c_kernel_clock_getres 00000024 D __c_kernel_clock_getres ... We get away with that at the moment because we also use the DOTSYM macro, and that is also incorrectly prepending a '.' in 32-bit VDSO code due to a separate bug. But we shouldn't be generating function descriptors for this file, there's no 32-bit ABI that includes function descriptors, so the resulting object file is some frankenstein and it's surprising that it even links. So filter out all the ABI-related options we add to CFLAGS for 64-bit builds, so that they're not used when building 32-bit code. With that we only see regular text symbols: $ nm arch/powerpc/kernel/vdso32/vgettimeofday.o michael@alpine1-p1 000005d0 T __c_kernel_clock_getres 00000000 T __c_kernel_clock_gettime 00000200 T __c_kernel_clock_gettime64 00000410 T __c_kernel_gettimeofday 00000650 T __c_kernel_time Fixes: ab037dd87a2f ("powerpc/vdso: Switch VDSO to generic C implementation.") Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201218111619.1206391-2-mpe@ellerman.id.au commit 42ed6d56ade21f367f27aa5915cc397510cfdef5 Author: Michael Ellerman Date: Fri Dec 18 22:16:17 2020 +1100 powerpc/vdso: Block R_PPC_REL24 relocations Add R_PPC_REL24 relocations to the list of relocations we do NOT support in the VDSO. These are generated in some cases and we do not support relocating them at runtime, so if they appear then the VDSO will not work at runtime, therefore it's preferable to break the build if we see them. Fixes: ab037dd87a2f ("powerpc/vdso: Switch VDSO to generic C implementation.") Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201218111619.1206391-1-mpe@ellerman.id.au commit 9014eab6a38c60fd185bc92ed60f46cf99a462ab Author: Cédric Le Goater Date: Mon Dec 21 08:41:54 2020 +0100 powerpc/smp: Add __init to init_big_cores() It fixes this link warning: WARNING: modpost: vmlinux.o(.text.unlikely+0x2d98): Section mismatch in reference from the function init_big_cores.isra.0() to the function .init.text:init_thread_group_cache_map() The function init_big_cores.isra.0() references the function __init init_thread_group_cache_map(). This is often because init_big_cores.isra.0 lacks a __init annotation or the annotation of init_thread_group_cache_map is wrong. Fixes: 425752c63b6f ("powerpc: Detect the presence of big-cores via "ibm, thread-groups"") Signed-off-by: Cédric Le Goater Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201221074154.403779-1-clg@kaod.org commit 0faa22f09caadc11af2aa7570870ebd2ac5b8170 Author: Christophe Leroy Date: Sun Dec 20 18:18:26 2020 +0000 powerpc/time: Force inlining of get_tb() Force inlining of get_tb() in order to avoid getting following function in vdso32, leading to suboptimal performance in clock_gettime() 00000688 <.get_tb>: 688: 7c 6d 42 a6 mftbu r3 68c: 7c 8c 42 a6 mftb r4 690: 7d 2d 42 a6 mftbu r9 694: 7c 03 48 40 cmplw r3,r9 698: 40 e2 ff f0 bne+ 688 <.get_tb> 69c: 4e 80 00 20 blr Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/df05d53eed1210cf1aa76d1fb44aa0fab29c018e.1608488286.git.christophe.leroy@csgroup.eu commit b36f835b636908e4122f2e17310b1dbc380a3b19 Author: Michael Ellerman Date: Tue Dec 15 14:29:06 2020 +1100 powerpc/boot: Fix build of dts/fsl The lkp robot reported that some configs fail to build, for example mpc85xx_smp_defconfig, with: cc1: fatal error: opening output file arch/powerpc/boot/dts/fsl/.mpc8540ads.dtb.dts.tmp: No such file or directory This bisects to: cc8a51ca6f05 ("kbuild: always create directories of targets") Although that commit claims to be about in-tree builds, it somehow breaks out-of-tree builds. But presumably it's just exposing a latent bug in our Makefiles. We can fix it by adding to targets for dts/fsl in the same way that we do for dts. Fixes: cc8a51ca6f05 ("kbuild: always create directories of targets") Reported-by: kernel test robot Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201215032906.473460-1-mpe@ellerman.id.au commit e40ad84c26b4deeee46666492ec66b9a534b8e59 Author: Rafael J. Wysocki Date: Thu Dec 17 20:17:49 2020 +0100 cpufreq: intel_pstate: Use most recent guaranteed performance values When turbo has been disabled by the BIOS, but HWP_CAP.GUARANTEED is changed later, user space may want to take advantage of this increased guaranteed performance. HWP_CAP.GUARANTEED is not a static value. It can be adjusted by an out-of-band agent or during an Intel Speed Select performance level change. The HWP_CAP.MAX is still the maximum achievable performance with turbo disabled by the BIOS, so HWP_CAP.GUARANTEED can still change as long as it remains less than or equal to HWP_CAP.MAX. When HWP_CAP.GUARANTEED is changed, the sysfs base_frequency attribute shows the most recent guaranteed frequency value. This attribute can be used by user space software to update the scaling min/max limits of the CPU. Currently, the ->setpolicy() callback already uses the latest HWP_CAP values when setting HWP_REQ, but the ->verify() callback will restrict the user settings to the to old guaranteed performance value which prevents user space from making use of the extra CPU capacity theoretically available to it after increasing HWP_CAP.GUARANTEED. To address this, read HWP_CAP in intel_pstate_verify_cpu_policy() to obtain the maximum P-state that can be used and use that to confine the policy max limit instead of using the cached and possibly stale pstate.max_freq value for this purpose. For consistency, update intel_pstate_update_perf_limits() to use the maximum available P-state returned by intel_pstate_get_hwp_max() to compute the maximum frequency instead of using the return value of intel_pstate_get_max_freq() which, again, may be stale. This issue is a side-effect of fixing the scaling frequency limits in commit eacc9c5a927e ("cpufreq: intel_pstate: Fix intel_pstate_get_hwp_max() for turbo disabled") which corrected the setting of the reduced scaling frequency values, but caused stale HWP_CAP.GUARANTEED to be used in the case at hand. Fixes: eacc9c5a927e ("cpufreq: intel_pstate: Fix intel_pstate_get_hwp_max() for turbo disabled") Reported-by: Srinivas Pandruvada Tested-by: Srinivas Pandruvada Cc: 5.8+ # 5.8+ Signed-off-by: Rafael J. Wysocki commit 525d9c57d0eeeb660d9b25e5b2d1c95975e3ba95 Author: Takashi Iwai Date: Mon Dec 21 09:01:59 2020 +0100 ALSA: usb-audio: Add alias entry for ASUS PRIME TRX40 PRO-S ASUS PRIME TRX40 PRO-S mobo with 0b05:1918 needs the same quirk alias for another ASUS mobo (0b05:1917) for the proper mixer mapping, etc. Add the corresponding entry. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=210783 Cc: Link: https://lore.kernel.org/r/20201221080159.24468-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 8b7c764e0644455a5991abea126e7ca6e03ee723 Author: YangHui Date: Mon Dec 21 14:22:07 2020 +0800 ALSA: core: Remove redundant comments Remove redundant comments Signed-off-by: YangHui Link: https://lore.kernel.org/r/1608531727-5433-1-git-send-email-yanghui.def@gmail.com Signed-off-by: Takashi Iwai commit 90d39628ac799e93c0f7a56763eed5029632f1ba Author: Masahiro Yamada Date: Mon Dec 21 16:01:13 2020 +0900 kconfig: doc: fix $(fileno) to $(filename) This is a typo. Signed-off-by: Masahiro Yamada commit 135b4957eac43af2aedf8e2a277b9540f33c2558 Author: Masahiro Yamada Date: Sun Dec 20 03:18:42 2020 +0900 kconfig: fix return value of do_error_if() $(error-if,...) is expanded to an empty string. Currently, it relies on eval_clause() returning xstrdup("") when all attempts for expansion fail, but the correct implementation is to make do_error_if() return xstrdup(""). Fixes: 1d6272e6fe43 ("kconfig: add 'info', 'warning-if', and 'error-if' built-in functions") Signed-off-by: Masahiro Yamada commit 18084e435ff6e47197542db6bab98bafaa4c7b68 Author: Geert Uytterhoeven Date: Tue Dec 8 16:28:57 2020 +0100 Documentation/kbuild: Document platform dependency practises Document best practises for using architecture and platform dependencies. Signed-off-by: Geert Uytterhoeven Signed-off-by: Masahiro Yamada commit c613583b6a87434123fc6714acbec6522859185e Author: Geert Uytterhoeven Date: Tue Dec 8 16:28:56 2020 +0100 Documentation/kbuild: Document COMPILE_TEST dependencies Document best practises for using COMPILE_TEST dependencies. Signed-off-by: Geert Uytterhoeven Acked-by: Arnd Bergmann Signed-off-by: Masahiro Yamada commit 9ab55d7f240fb05f84ec3b5e37f0c3ab2ce69053 Author: Marco Elver Date: Tue Dec 1 16:20:18 2020 +0100 genksyms: Ignore module scoped _Static_assert() The C11 _Static_assert() keyword may be used at module scope, and we need to teach genksyms about it to not abort with an error. We currently have a growing number of static_assert() (but also direct usage of _Static_assert()) users at module scope: git grep -E '^_Static_assert\(|^static_assert\(' | grep -v '^tools' | wc -l 135 More recently, when enabling CONFIG_MODVERSIONS with CONFIG_KCSAN, we observe a number of warnings: WARNING: modpost: EXPORT symbol "<..all kcsan symbols..>" [vmlinux] [...] When running a preprocessed source through 'genksyms -w' a number of syntax errors point at usage of static_assert()s. In the case of kernel/kcsan/encoding.h, new static_assert()s had been introduced which used expressions that appear to cause genksyms to not even be able to recover from the syntax error gracefully (as it appears was the case previously). Therefore, make genksyms ignore all _Static_assert() and the contained expression. With the fix, usage of _Static_assert() no longer cause "syntax error" all over the kernel, and the above modpost warnings for KCSAN are gone, too. Signed-off-by: Marco Elver Acked-by: Nick Desaulniers Signed-off-by: Masahiro Yamada commit b9ed847b5ae69e0f2e685f9d53e2dd94c0db751e Author: Quentin Perret Date: Tue Dec 1 16:52:22 2020 +0000 modpost: turn static exports into error Using EXPORT_SYMBOL*() on static functions is fundamentally wrong. Modpost currently reports that as a warning, but clearly this is not a pattern we should allow, and all in-tree occurences should have been fixed by now. So, promote the warn() message to error() to make sure this never happens again. Acked-by: Greg Kroah-Hartman Reviewed-by: Matthias Maennich Signed-off-by: Quentin Perret Signed-off-by: Masahiro Yamada commit c7299d98c00afa81c65d9fa13a18ea923f3281ff Author: Masahiro Yamada Date: Tue Dec 1 19:34:18 2020 +0900 modpost: turn section mismatches to error from fatal() There is code that reports static EXPORT_SYMBOL a few lines below. It is not a good idea to bail out here. I renamed sec_mismatch_fatal to sec_mismatch_warn_only (with logical inversion) to match to CONFIG_SECTION_MISMATCH_WARN_ONLY. Signed-off-by: Masahiro Yamada commit d6d692fa21d3057edf457a764832077da8aa44d2 Author: Masahiro Yamada Date: Tue Dec 1 19:34:17 2020 +0900 modpost: change license incompatibility to error() from fatal() Change fatal() to error() to continue running to report more possible issues. There is no difference in the fact that modpost will fail anyway. Signed-off-by: Masahiro Yamada commit 1d6cd39293602e990b016994e51956eded35da7c Author: Masahiro Yamada Date: Tue Dec 1 19:34:16 2020 +0900 modpost: turn missing MODULE_LICENSE() into error Do not create modules with no license tag. Signed-off-by: Masahiro Yamada commit 0fd3fbadd9a85e391828f3ef63ef1e96e2d2d752 Author: Masahiro Yamada Date: Tue Dec 1 19:34:15 2020 +0900 modpost: refactor error handling and clarify error/fatal difference We have 3 log functions. fatal() is special because it lets modpost bail out immediately. The difference between warn() and error() is the only prefix parts ("WARNING:" vs "ERROR:"). In my understanding, the expected handling of error() is to propagate the return code of the function to the exit code of modpost, as check_exports() etc. already does. This is a good manner in general because we should display as many error messages as possible in a single run of modpost. What is annoying about fatal() is that it kills modpost at the first error. People would need to run Kbuild again and again until they fix all errors. But, unfortunately, people tend to do: "This case should not be allowed. Let's replace warn() with fatal()." One of the reasons is probably it is tedious to manually hoist the error code to the main() function. This commit refactors error() so any single call for it automatically makes modpost return the error code. I also added comments in modpost.h for warn(), error(), and fatal(). Please use fatal() only when you have a strong reason to do so. For example: - Memory shortage (i.e. malloc() etc. has failed) - The ELF file is broken, and there is no point to continue parsing - Something really odd has happened For general coding errors, please use error(). Signed-off-by: Masahiro Yamada Tested-by: Quentin Perret commit bc72d723ec6b75c53e935e819682c3e67b83e9c1 Author: Masahiro Yamada Date: Tue Dec 1 19:34:14 2020 +0900 modpost: rename merror() to error() The log function names, warn(), merror(), fatal() are inconsistent. Commit 2a11665945d5 ("kbuild: distinguish between errors and warnings in modpost") intentionally chose merror() to avoid the conflict with the library function error(). See man page of error(3). But, we are already causing the conflict with warn() because it is also a library function. See man page of warn(3). err() would be a problem for the same reason. The common technique to work around name conflicts is to use macros. For example: /* in a header */ #define error(fmt, ...) __error(fmt, ##__VA_ARGS__) #define warn(fmt, ...) __warn(fmt, ##__VA_ARGS__) /* function definition */ void __error(const char *fmt, ...) { } void __warn(const char *fmt, ...) { } In this way, we can implement our own warn() and error(), still we can include and with no problem. And, commit 93c95e526a4e ("modpost: rework and consolidate logging interface") already did that. Since the log functions are all macros, we can use error() without causing "conflicting types" errors. Signed-off-by: Masahiro Yamada commit 436e980e2ed526832de822cbf13c317a458b78e1 Author: Dominique Martinet Date: Tue Dec 1 14:17:30 2020 +0100 kbuild: don't hardcode depmod path depmod is not guaranteed to be in /sbin, just let make look for it in the path like all the other invoked programs Signed-off-by: Dominique Martinet Signed-off-by: Masahiro Yamada commit c0ea806f874eb32894249b4a67c2f2452881b775 Author: Masahiro Yamada Date: Sat Nov 28 20:51:08 2020 +0900 kbuild: doc: document subdir-y syntax There is no explanation about subdir-y. Let's document it. Signed-off-by: Masahiro Yamada Reviewed-by: Randy Dunlap commit d0e628cd817f3b67ad80cceaf527c7bb37c27b1c Author: Masahiro Yamada Date: Sat Nov 28 20:51:07 2020 +0900 kbuild: doc: clarify the difference between extra-y and always-y The difference between extra-y and always-y is obscure. Basically, Kbuild builds targets listed in extra-y and always-y in visited Makefiles without relying on any dependency. The difference is that extra-y is used to list the targets needed for vmlinux whereas always-y is used to list the targets that must be always built irrespective of final targets. Kbuild skips extra-y when it is building only modules (i.e. 'make modules'). This is the long-standing behavior since extra-y was introduced in 2003, and it is explained in that commit log [1]. For clarification, this is the extra-y vs always-y table: extra-y always-y 'make' y y 'make vmlinux' y y 'make modules' n y Kbuild skips extra-y also when building external modules since obviously it never builds vmlinux. Unfortunately, extra-y is wrongly used in many places of upstream code, and even in external modules. Using extra-y in external module Makefiles is wrong. What you should use is probably always-y or 'targets'. The current documentation for extra-y is misleading. I rewrote it, and moved it to the section 3.7. always-y is not documented anywhere. I added. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/?id=f94e5fd7e5d09a56a60670a9bb211a791654bba8 Signed-off-by: Masahiro Yamada Reviewed-by: Randy Dunlap commit 39bb232ae614a6c905f92a535b5b54c4289d1665 Author: Masahiro Yamada Date: Sat Nov 28 20:51:06 2020 +0900 kbuild: doc: split if_changed explanation to a separate section The if_changed macro is currently explained in the section "Commands useful for building a boot image", but the use of if_changed is not limited to the boot image. It is often used together with custom rules. Let's split it as a separate section, and insert it after the "Custom Rules" section. I slightly reworded the explanation, re-numbered to fill the section, and also fixed the broken indentation of the Note: part. Signed-off-by: Masahiro Yamada commit 41cac0834f885fac9b655eaa9214526c0c1d9afe Author: Masahiro Yamada Date: Sat Nov 28 20:51:05 2020 +0900 kbuild: doc: merge 'Special Rules' and 'Custom kbuild commands' sections The two sections "3.10 Special Rules" and "7.8 Custom kbuild commands" are related because you must understand both of them when you write custom rules. Actually I do not understand the policy about what to go into "3 The kbuild files" and what into "7 Architecture Makefile". This commit reworks the custom rule explanation as follows: - Merged "7.8 Custom kbuild commands" into "3.10 Special Rules". - Reword "Special Rules" to "Custom Rules" for consistency. - Update the example for kecho because the blackfin Makefile does not exist any more. - Replace the example for cmd_ with a simpler one. Signed-off-by: Masahiro Yamada commit 23b53061ad5dd435d4d35c842cd84047dbbe2919 Author: Masahiro Yamada Date: Sat Nov 28 20:51:04 2020 +0900 kbuild: doc: fix 'List directories to visit when descending' section Fix stale information: - Fix the section number in the reference from 6.4 to 7.4. - Remove init-y and net-y. They were removed by commit 23febe375d94 ("kbuild: merge init-y into core-y") and commit 95fb6317b3ab ("kbuild: merge net-y and virt-y into drivers-y"), respectively. - Update the example because arch/sparc64/Makefile does not exit. Signed-off-by: Masahiro Yamada commit 8c4d9b145ba39fa31fd225e9051dd562260b6460 Author: Masahiro Yamada Date: Sat Nov 28 20:51:03 2020 +0900 kbuild: doc: replace arch/$(ARCH)/ with arch/$(SRCARCH)/ Precisely speaking, the arch directory is specified by $(SRCARCH), not $(ARCH). In old days, $(ARCH) actually matched to the arch directory because 32-bit and 64-bit were supported as separate architectures. Most architectures (except arm/arm64) were unified like follows: arch/i386, arch/x86_64 -> arch/x86 arch/sh, arch/sh64 -> arch/sh arch/sparc, arch/sparc64 -> arch/sparc To not break the user interface, commit 6752ed90da03 ("Kbuild: allow arch/xxx to use a different source path") introduced SRCARCH to point to the arch directory, still allowing to pass in the former ARCH=i386 or ARCH=x86_64. Update the documents for preciseness, and add the explanation of SRCARCH. Signed-off-by: Masahiro Yamada Reviewed-by: Randy Dunlap commit b044a535d9a6873a21d622934228cfcc6ee4ea27 Author: Masahiro Yamada Date: Sat Nov 28 20:51:02 2020 +0900 kbuild: doc: update the description about kbuild Makefiles This line was written in 2003. Now we have much more Makefiles. The number of Makefiles is not important. The point is we have a Makefile in (almost) every directory. Signed-off-by: Masahiro Yamada commit abe7e32f1d50392fbfb6391f4fe1a9f1348b24f3 Merge: b53a1603b46c5 11a163f2c7d6a 4b003f5fcadfa 48f68de00c140 0c797d2c7e82b 6f37689cf6b38 Author: Stephen Boyd Date: Sun Dec 20 17:18:05 2020 -0800 Merge branches 'clk-ingenic', 'clk-vc5', 'clk-cleanup', 'clk-canaan' and 'clk-marvell' into clk-next - Bindings for Canaan K210 SoC clks * clk-ingenic: clk: ingenic: Fix divider calculation with div tables * clk-vc5: clk: vc5: Use "idt,voltage-microvolt" instead of "idt,voltage-microvolts" * clk-cleanup: clk: sunxi-ng: Make sure divider tables have sentinel clk: s2mps11: Fix a resource leak in error handling paths in the probe function clk: bcm: dvp: Add MODULE_DEVICE_TABLE() clk: bcm: dvp: drop a variable that is assigned to only * clk-canaan: dt-binding: clock: Document canaan,k210-clk bindings dt-bindings: Add Canaan vendor prefix * clk-marvell: clk: mvebu: a3700: fix the XTAL MODE pin to MPP1_9 commit b53a1603b46c5ee9b2fd4b276b12b916b33dc3d7 Merge: 699eda2814f28 66cc7af38149f 16214f97f4432 03813d9b7d436 01324f9e88b5c 5142cbcea3249 Author: Stephen Boyd Date: Sun Dec 20 17:17:51 2020 -0800 Merge branches 'clk-ti', 'clk-analog', 'clk-trace', 'clk-at91' and 'clk-silabs' into clk-next - Add some trace points for clk_set_rate() "range" functions - DVFS support for AT91 clk driver * clk-ti: clk: ti: omap5: Fix reboot DPLL lock failure when using ABE TIMERs clk: ti: Fix memleak in ti_fapll_synth_setup * clk-analog: clk: axi-clkgen: move the OF table at the bottom of the file clk: axi-clkgen: wrap limits in a struct and keep copy on the state object dt-bindings: clock: adi,axi-clkgen: convert old binding to yaml format * clk-trace: clk: Trace clk_set_rate() "range" functions * clk-at91: clk: at91: sam9x60: remove atmel,osc-bypass support clk: at91: sama7g5: register cpu clock clk: at91: clk-master: re-factor master clock clk: at91: sama7g5: do not allow cpu pll to go higher than 1GHz clk: at91: sama7g5: decrease lower limit for MCK0 rate clk: at91: sama7g5: remove mck0 from parent list of other clocks clk: at91: clk-sam9x60-pll: allow runtime changes for pll clk: at91: sama7g5: add 5th divisor for mck0 layout and characteristics clk: at91: clk-master: add 5th divisor for mck master clk: at91: sama7g5: allow SYS and CPU PLLs to be exported and referenced in DT dt-bindings: clock: at91: add sama7g5 pll defines clk: at91: sama7g5: fix compilation error * clk-silabs: clk: si5351: Wait for bit clear after PLL reset commit 699eda2814f28fca34f3540e56cf10467c9bf48b Merge: d240d4c20578d 5bf5861d6ea6c 958879d0d7f90 732374a0b440d 2aeff9d8c8e69 bf6d43d723251 Author: Stephen Boyd Date: Sun Dec 20 17:17:37 2020 -0800 Merge branches 'clk-tegra', 'clk-imx', 'clk-sifive', 'clk-mediatek' and 'clk-summary' into clk-next - Support for SiFive FU740 PRCI - Add hardware enable information to clk_summary debugfs * clk-tegra: clk: tegra: Fix duplicated SE clock entry clk: tegra: bpmp: Clamp clock rates on requests clk: tegra: Do not return 0 on failure * clk-imx: (24 commits) clk: imx: scu: remove the calling of device_is_bound clk: imx: scu: Make pd_np with static keyword clk: imx8mq: drop of_match_ptr from of_device_id table clk: imx8mp: drop of_match_ptr from of_device_id table clk: imx8mn: drop of_match_ptr from of_device_id table clk: imx8mm: drop of_match_ptr from of_device_id table clk: imx: gate2: Remove unused variable ret clk: imx: gate2: Add locking in is_enabled op clk: imx: gate2: Add cgr_mask for more flexible number of control bits clk: imx: gate2: Check if clock is enabled against cgr_val clk: imx: gate2: Keep the register writing in on place clk: imx: gate2: Remove the IMX_CLK_GATE2_SINGLE_BIT special case clk: imx: scu: fix build break when compiled as modules clk: imx: remove redundant assignment to pointer np clk: imx: remove unneeded semicolon clk: imx: lpcg: add suspend/resume support clk: imx: clk-imx8qxp-lpcg: add runtime pm support clk: imx: lpcg: allow lpcg clk to take device pointer clk: imx: imx8qxp-lpcg: add parsing clocks from device tree clk: imx: scu: add suspend/resume support ... * clk-sifive: clk: sifive: Add clock enable and disable ops clk: sifive: Fix the wrong bit field shift clk: sifive: Add a driver for the SiFive FU740 PRCI IP block clk: sifive: Use common name for prci configuration clk: sifive: Extract prci core to common base dt-bindings: fu740: prci: add YAML documentation for the FU740 PRCI * clk-mediatek: clk: mediatek: Make mtk_clk_register_mux() a static function * clk-summary: clk: Add hardware-enable column to clk summary commit d240d4c20578d8b6dc8b3720534681aa8636fdad Merge: 23cae54f52690 cadd53122ae8b f4ac0c5639b75 047b04201f628 fcf77be87eacb 975d25cbb505e Author: Stephen Boyd Date: Sun Dec 20 17:17:25 2020 -0800 Merge branches 'clk-amlogic', 'clk-rockchip', 'clk-of', 'clk-freescale' and 'clk-unused' into clk-next - Replace clk-provider.h with of_clk.h when possible * clk-amlogic: clk: meson: g12a: add MIPI DSI Host Pixel Clock dt-bindings: clk: g12a-clkc: add DSI Pixel clock bindings clk: meson: enable building as modules clk: meson: Kconfig: fix dependency for G12A clk: meson: axg: add MIPI DSI Host clock clk: meson: axg: add Video Clocks dt-bindings: clk: axg-clkc: add MIPI DSI Host clock binding dt-bindings: clk: axg-clkc: add Video Clocks * clk-rockchip: clk: rockchip: fix i2s gate bits on rk3066 and rk3188 clk: rockchip: add CLK_SET_RATE_PARENT to sclk for rk3066a i2s and uart clocks clk: rockchip: Remove redundant null check before clk_prepare_enable clk: rockchip: Add appropriate arch dependencies * clk-of: xtensa: Replace by sh: boards: Replace by * clk-freescale: clk: fsl-flexspi: new driver dt-bindings: clock: document the fsl-flexspi-clk device clk: divider: add devm_clk_hw_register_divider_table() clk: qoriq: provide constants for the type clk: fsl-sai: use devm_clk_hw_register_composite_pdata() clk: composite: add devm_clk_hw_register_composite_pdata() clk: fsl-sai: fix memory leak clk: qoriq: Add platform dependencies * clk-unused: clk: scpi: mark scpi_clk_match as maybe unused clk: pwm: drop of_match_ptr from of_device_id table commit 23cae54f52690ea88b73d3f30d78ad40c01f9f89 Merge: 9d1c94a69d70f f7b36cc19efb4 6a17849703581 e6fb7aee486c7 fdc9b0191191e 87b6a5e28b2b2 Author: Stephen Boyd Date: Sun Dec 20 17:17:01 2020 -0800 Merge branches 'clk-doc', 'clk-qcom', 'clk-simplify', 'clk-hw', 'clk-renesas' and 'clk-samsung' into clk-next - Camera clks on Qualcomm SC7180 SoCs - GCC and RPMh clks on Qualcomm SDX55 SoCs - RPMh clks on Qualcomm SM8350 SoCs - LPASS clks on Qualcomm SM8250 SoCs - Add devm variant of clk_notifier_register() - Add clk_hw_get_clk() to generate a struct clk from a struct clk_hw * clk-doc: clk: fix a kernel-doc markup * clk-qcom: (27 commits) clk: qcom: rpmh: add support for SM8350 rpmh clocks dt-bindings: clock: Add RPMHCC bindings for SM8350 clk: qcom: lpasscc: Introduce pm autosuspend for SC7180 clk: qcom: gcc-sc7180: Add 50 MHz clock rate for SDC2 clk: qcom: gcc-sc7180: Use floor ops for sdcc clks clk: qcom: Add GDSC support for SDX55 GCC dt-bindings: clock: Add GDSC in SDX55 GCC clk: qcom: Add support for SDX55 RPMh clocks dt-bindings: clock: Introduce RPMHCC bindings for SDX55 clk: qcom: Add SDX55 GCC support dt-bindings: clock: Add SDX55 GCC clock bindings clk: qcom: Kconfig: Fix spelling mistake "dyanmic" -> "dynamic" clk: qcom: rpmh: Add CE clock on sdm845. dt-bindings: clock: Add entry for crypto engine RPMH clock resource clk: qcom: dispcc-sm8250: handle MMCX power domain clk: qcom: camcc-sc7180: Use runtime PM ops instead of clk ones clk: qcom: lpass-sc7180: Clean up on error in lpass_sc7180_init() clk: qcom: Add support to LPASS AON_CC Glitch Free Mux clocks clk: qcom: Add support to LPASS AUDIO_CC Glitch Free Mux clocks dt-bindings: clock: Add support for LPASS Always ON Controller ... * clk-simplify: clk: remove unneeded dead-store initialization * clk-hw: clk: meson: g12: use devm variant to register notifiers clk: add devm variant of clk_notifier_register clk: meson: g12: drop use of __clk_lookup() clk: add api to get clk consumer from clk_hw clk: avoid devm_clk_release name clash * clk-renesas: dt-bindings: clock: renesas: rcar-usb2-clock-sel: Convert bindings to json-schema clk: renesas: sh73a0: Stop using __raw_*() I/O accessors clk: renesas: r8a774c0: Add RPC clocks clk: renesas: r8a779a0: Fix R and OSC clocks clk: renesas: cpg-mssr: fix kerneldoc of cpg_mssr_priv clk: renesas: rcar-usb2-clock-sel: Replace devm_reset_control_array_get() clk: renesas: r8a774b1: Add RPC clocks clk: renesas: r8a774a1: Add RPC clocks clk: renesas: r8a779a0: Add VIN clocks clk: renesas: r8a779a0: Add CSI4[0-3] clocks MAINTAINERS: Update git repo for Renesas clock drivers clk: renesas: r8a779a0: Make rcar_r8a779a0_cpg_clk_register() static clk: renesas: rcar-gen3: Remove stp_ck handling for SDHI * clk-samsung: clk: samsung: Prevent potential endless loop in the PLL ops clk: samsung: Allow compile testing of Exynos, S3C64xx and S5Pv210 commit e37b12e4bb21e7c81732370b0a2b34bd196f380b Merge: 582888130702b c1048828c3dbd Author: Linus Torvalds Date: Sun Dec 20 13:13:59 2020 -0800 Merge tag 'for-linus-5.11-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux Pull orangefs update from Mike Marshall: "Add splice file operations" * tag 'for-linus-5.11-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux: orangefs: add splice file operations commit 582888130702b86daa44ff6bfee585e4d4050ba0 Merge: 48342fc07272e 9541b81322e60 Author: Linus Torvalds Date: Sun Dec 20 13:08:19 2020 -0800 Merge tag '5.11-rc-smb3-part2' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "Four small CIFS/SMB3 fixes (witness protocol and reconnect related), and two that add ability to get and set auditing information in the security descriptor (SACL), which can be helpful not just for backup scenarios ("smbinfo secdesc" etc.) but also for improving security" * tag '5.11-rc-smb3-part2' of git://git.samba.org/sfrench/cifs-2.6: Add SMB 2 support for getting and setting SACLs SMB3: Add support for getting and setting SACLs cifs: Avoid error pointer dereference cifs: Re-indent cifs_swn_reconnect() cifs: Unlock on errors in cifs_swn_reconnect() cifs: Delete a stray unlock in cifs_swn_reconnect() commit 48342fc07272eec454fc5b400ed3ce3739c7e950 Merge: 6a447b0e31518 2e7f545096f95 Author: Linus Torvalds Date: Sun Dec 20 11:21:06 2020 -0800 Merge tag 'perf-tools-2020-12-19' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull perf tools updates from Arnaldo Carvalho de Melo: "perf record: - Fix memory leak when using '--user-regs=?' to list registers aarch64 support: - Add aarch64 registers to 'perf record's' --user-regs command line option aarch64 hw tracing support: - Decode memory tagging properties - Improve ARM's auxtrace support - Add support for ARMv8.3-SPE perf kvm: - Add kvm-stat for arm64 perf stat: - Add --quiet option Cleanups: - Fixup function names wrt what is in libperf and what is in tools/perf Build: - Allow building without libbpf in older systems New kernel features: - Initial support for data/code page size sample type, more to come perf annotate: - Support MIPS instruction extended support perf stack unwinding: - Fix separate debug info files when using elfutils' libdw's unwinder perf vendor events: - Update Intel's Skylake client events to v50 - Add JSON metrics for ARM's imx8mm DDR Perf - Support printing metric groups for system PMUs perf build id: - Prep work for supporting having the build id provided by the kernel in PERF_RECORD_MMAP2 metadata events perf stat: - Support regex pattern in --for-each-cgroup pipe mode: - Allow to use stdio functions for pipe mode - Support 'perf report's' --header-only for pipe mode - Support pipe mode display in 'perf evlist' Documentation: - Update information about CAP_PERFMON" * tag 'perf-tools-2020-12-19' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: (134 commits) perf mem: Factor out a function to generate sort order perf sort: Add sort option for data page size perf script: Support data page size tools headers UAPI: Update asm-generic/unistd.h tools headers cpufeatures: Sync with the kernel sources tools headers UAPI: Sync linux/prctl.h with the kernel sources tools headers UAPI: Sync linux/fscrypt.h with the kernel sources tools headers UAPI: Sync linux/const.h with the kernel headers tools arch x86: Sync the msr-index.h copy with the kernel sources perf trace beauty: Update copy of linux/socket.h with the kernel sources tools headers: Update linux/ctype.h with the kernel sources tools headers: Add conditional __has_builtin() tools headers: Get tools's linux/compiler.h closer to the kernel's tools headers UAPI: Sync linux/stat.h with the kernel sources tools headers: Syncronize linux/build_bug.h with the kernel sources perf tools: Reformat record's control fd man text perf config: Fix example command in manpage to conform to syntax specified in the SYNOPSIS section. perf test: Make sample-parsing test aware of PERF_SAMPLE_{CODE,DATA}_PAGE_SIZE perf tools: Add support to read build id from compressed elf perf debug: Add debug_set_file function ... commit 0c797d2c7e82bfec69e8fceb0d03b1e016eed03b Author: Damien Le Moal Date: Sun Dec 20 17:57:25 2020 +0900 dt-binding: clock: Document canaan,k210-clk bindings Document the device tree bindings of the Canaan Kendryte K210 SoC clock driver in Documentation/devicetree/bindings/clock/canaan,k210-clk.yaml. The header file include/dt-bindings/clock/k210-clk.h is modified to include the complete list of IDs for all clocks of the SoC. Signed-off-by: Damien Le Moal Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201220085725.19545-3-damien.lemoal@wdc.com Signed-off-by: Stephen Boyd commit 6c5c16007a11676eb8d4aeeb090a940b20976747 Author: Damien Le Moal Date: Sun Dec 20 17:57:24 2020 +0900 dt-bindings: Add Canaan vendor prefix Update Documentation/devicetree/bindings/vendor-prefixes.yaml to include "canaan" as a vendor prefix for "Canaan Inc.". Canaan is the vendor of the Kendryte K210 RISC-V SoC. Signed-off-by: Damien Le Moal Acked-by: Rob Herring Link: https://lore.kernel.org/r/20201220085725.19545-2-damien.lemoal@wdc.com Signed-off-by: Stephen Boyd commit 6a447b0e3151893f6d4a889956553c06d2e775c6 Merge: f4a2f7866faaf d45f89f7437d0 Author: Linus Torvalds Date: Sun Dec 20 10:44:05 2020 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM updates from Paolo Bonzini: "Much x86 work was pushed out to 5.12, but ARM more than made up for it. ARM: - PSCI relay at EL2 when "protected KVM" is enabled - New exception injection code - Simplification of AArch32 system register handling - Fix PMU accesses when no PMU is enabled - Expose CSV3 on non-Meltdown hosts - Cache hierarchy discovery fixes - PV steal-time cleanups - Allow function pointers at EL2 - Various host EL2 entry cleanups - Simplification of the EL2 vector allocation s390: - memcg accouting for s390 specific parts of kvm and gmap - selftest for diag318 - new kvm_stat for when async_pf falls back to sync x86: - Tracepoints for the new pagetable code from 5.10 - Catch VFIO and KVM irqfd events before userspace - Reporting dirty pages to userspace with a ring buffer - SEV-ES host support - Nested VMX support for wait-for-SIPI activity state - New feature flag (AVX512 FP16) - New system ioctl to report Hyper-V-compatible paravirtualization features Generic: - Selftest improvements" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (171 commits) KVM: SVM: fix 32-bit compilation KVM: SVM: Add AP_JUMP_TABLE support in prep for AP booting KVM: SVM: Provide support to launch and run an SEV-ES guest KVM: SVM: Provide an updated VMRUN invocation for SEV-ES guests KVM: SVM: Provide support for SEV-ES vCPU loading KVM: SVM: Provide support for SEV-ES vCPU creation/loading KVM: SVM: Update ASID allocation to support SEV-ES guests KVM: SVM: Set the encryption mask for the SVM host save area KVM: SVM: Add NMI support for an SEV-ES guest KVM: SVM: Guest FPU state save/restore not needed for SEV-ES guest KVM: SVM: Do not report support for SMM for an SEV-ES guest KVM: x86: Update __get_sregs() / __set_sregs() to support SEV-ES KVM: SVM: Add support for CR8 write traps for an SEV-ES guest KVM: SVM: Add support for CR4 write traps for an SEV-ES guest KVM: SVM: Add support for CR0 write traps for an SEV-ES guest KVM: SVM: Add support for EFER write traps for an SEV-ES guest KVM: SVM: Support string IO operations for an SEV-ES guest KVM: SVM: Support MMIO for an SEV-ES guest KVM: SVM: Create trace events for VMGEXIT MSR protocol processing KVM: SVM: Create trace events for VMGEXIT processing ... commit f4a2f7866faaf89ea1595b136e01fcb336b46aab Merge: 7703f46f2cafa 71ac13457d9d1 Author: Linus Torvalds Date: Sun Dec 20 10:12:06 2020 -0800 Merge tag 'rtc-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull RTC updates from Alexandre Belloni: "Subsystem: - Remove nvram ABI. There was no complaints about the deprecation for the last 3 years. - Improve RTC device allocation and registration - Now available for ARCH=um Drivers: - at91rm9200: correction and sam9x60 support - ds1307: improve ACPI support - mxc: now DT only - pcf2127: watchdog support now needs the reset-source property - pcf8523: set range - rx6110: i2c support" * tag 'rtc-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (43 commits) rtc: pcf2127: only use watchdog when explicitly available dt-bindings: rtc: add reset-source property rtc: fix RTC removal rtc: s3c: Remove dead code related to periodic tick handling rtc: s3c: Disable all enable (RTC, tick) bits in the probe rtc: ep93xx: Fix NULL pointer dereference in ep93xx_rtc_read_time rtc: test: remove debug message rtc: mxc{,_v2}: enable COMPILE_TEST rtc: enable RTC framework on ARCH=um rtc: pcf8523: use BIT rtc: pcf8523: set range rtc: pcf8523: switch to devm_rtc_allocate_device rtc: destroy mutex when releasing the device rtc: shrink devm_rtc_allocate_device() rtc: rework rtc_register_device() resource management rtc: nvmem: emit an error message when nvmem registration fails rtc: add devm_ prefix to rtc_nvmem_register() rtc: nvmem: remove nvram ABI Documentation: list RTC devres helpers in devres.rst rtc: omap: use devm_pinctrl_register() ... commit f57555eda979ca085d2524db81e14b8a6089e15e Author: Pavel Begunkov Date: Sun Dec 20 13:21:44 2020 +0000 io_uring: end waiting before task cancel attempts Get rid of TASK_UNINTERRUPTIBLE and waiting with finish_wait before going for next iteration in __io_uring_task_cancel(), because __io_uring_files_cancel() doesn't expect that sheduling is disallowed. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 55583d72e2303638d30dd4a7aabef59ffa0a017a Author: Pavel Begunkov Date: Sun Dec 20 13:21:43 2020 +0000 io_uring: always progress task_work on task cancel Might happen that __io_uring_cancel_task_requests() cancels nothing but there are task_works pending. We need to always run them. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 7703f46f2cafa57b9e5e8f4d6ff3dd8dcf0c1656 Merge: 450f68e2425e6 6e5c4ea37a99e Author: Linus Torvalds Date: Sun Dec 20 10:04:49 2020 -0800 Merge tag 'gfs2-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull gfs2 updates from Andreas Gruenbacher: - Don't wait for unfreeze of the wrong filesystems - Remove an obsolete delete_work_func hack and an incorrect sb_start_write - Minor documentation updates and cosmetic care * tag 'gfs2-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: in signal_our_withdraw wait for unfreeze of _this_ fs only gfs2: Remove sb_start_write from gfs2_statfs_sync gfs2: remove trailing semicolons from macro definitions Revert "GFS2: Prevent delete work from occurring on glocks used for create" gfs2: Make inode operations static MAINTAINERS: Add gfs2 bug tracker link Documentation: Update filesystems/gfs2.rst commit 450f68e2425e63228d91f346547714076fc5f3e8 Author: Heiko Carstens Date: Sun Dec 20 10:58:30 2020 +0100 epoll: fix compat syscall wire up of epoll_pwait2 Commit b0a0c2615f6f ("epoll: wire up syscall epoll_pwait2") wired up the 64 bit syscall instead of the compat variant in a couple of places. Fixes: b0a0c2615f6f ("epoll: wire up syscall epoll_pwait2") Signed-off-by: Heiko Carstens Acked-by: Arnd Bergmann Cc: Willem de Bruijn Cc: Al Viro Cc: Arnd Bergmann Cc: Matthew Wilcox (Oracle) Cc: Catalin Marinas Cc: Will Deacon Cc: Thomas Bogendoerfer Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: "David S. Miller" Signed-off-by: Linus Torvalds commit 446bc1c207331080d8c711a4456799b7d0b9df26 Author: Jens Axboe Date: Sun Dec 20 10:47:42 2020 -0700 io-wq: kill now unused io_wq_cancel_all() io_uring no longer issues full cancelations on the io-wq, so remove any remnants of this code and the IO_WQ_BIT_CANCEL flag. Signed-off-by: Jens Axboe commit 00c18640c2430c4bafaaeede1f9dd6f7ec0e4b25 Author: Jens Axboe Date: Sun Dec 20 10:45:02 2020 -0700 io_uring: make ctx cancel on exit targeted to actual ctx Before IORING_SETUP_ATTACH_WQ, we could just cancel everything on the io-wq when exiting. But that's not the case if they are shared, so cancel for the specific ctx instead. Cc: stable@vger.kernel.org Fixes: 24369c2e3bb0 ("io_uring: add io-wq workqueue sharing") Signed-off-by: Jens Axboe commit 0bd157fa2aaa2c77d6254321d7751aa9eec68c7b Author: Randy Dunlap Date: Fri Dec 18 09:32:02 2020 -0800 mt76: mt7915: fix MESH ifdef block Fix a build error when CONFIG_MAC80211_MESH is not enabled: ../drivers/net/wireless/mediatek/mt76/mt7915/init.c:47:2: error: expected expression before '}' token }, { ^ Fixes: af901eb4ab80 ("mt76: mt7915: get rid of dbdc debugfs knob") Signed-off-by: Randy Dunlap Cc: Shayne Chen Cc: Ryder Lee Cc: Lorenzo Bianconi Cc: Felix Fietkau Cc: linux-wireless@vger.kernel.org Cc: Kalle Valo Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201218173202.23159-1-rdunlap@infradead.org commit f7217f718747641fc80cd062f183107439f2a066 Author: Lorenzo Bianconi Date: Tue Dec 8 10:18:11 2020 +0100 mt76: mt76s: fix NULL pointer dereference in mt76s_process_tx_queue Fix a possible NULL pointer dereference in mt76s_process_tx_queue that can occur if status thread runs before allocating tx queues Fixes: 6a618acb7e62 ("mt76: sdio: convert {status/net}_work to mt76_worker") Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/b49c1b4edacd87b2241a9fd0431dd4864c8963f6.1607418933.git.lorenzo@kernel.org commit 123bb2b737881127b450e8b3b1bae69a8949498e Author: Lorenzo Bianconi Date: Sat Dec 5 11:35:26 2020 +0100 mt76: sdio: remove wake logic in mt76s_process_tx_queue Similar to mmio/usb code path, remove wake logic in mt76s_process_tx_queue routine. Starting from commit 90d494c99a99 ("mt76: improve tx queue stop/wake"), the wake queue logic on the sdio status path is no longer necessary since the hw queues are no longer stopped on the mt76 tx path. Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/d2d7d9d437f4dec2ef1df0ed070b9cf299f021ad.1607164041.git.lorenzo@kernel.org commit e16ab3db87b3d5d4118dfb68e955f62c4e09573a Author: Lorenzo Bianconi Date: Sat Dec 5 11:35:25 2020 +0100 mt76: usb: remove wake logic in mt76u_status_worker Similar to mmio code path, remove wake logic in mt76u_status_worker handler. Starting from commit 90d494c99a99 ("mt76: improve tx queue stop/wake")', the wake queue logic on the usb status path is no longer necessary since the hw queues are no longer stopped on the mt76 tx path. Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/00009bf0cfdc9565e4432cad3ed51888c667c25d.1607164041.git.lorenzo@kernel.org commit 3e75e25fbebe8f3707156197795bc393e29788d6 Merge: 4dfde294b9792 e9603f4bdcc04 Author: Kalle Valo Date: Sun Dec 20 13:57:17 2020 +0200 Merge ath-current from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git fixes for 5.11. Major changes: ath11k * add null check for skb allocation * fix crash found during connect/disconnect stress testing * fix for HT disabled case * brown paperbag fixes for my bugs in suspend code * fix an unnecessary qmi allocation during firmware bootup * disable ASPM during firmware bootup to avoid issues commit 09926202e939fd699650ac0fc0baa5757e069390 Author: Takashi Iwai Date: Sun Dec 20 09:09:43 2020 +0100 ALSA: hda/realtek: Add quirk for MSI-GP73 MSI-GP73 (with SSID 1462:1229) requires yet again ALC1220_FIXUP_CLEVO_P950 quirk like other MSI models. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=210793 Cc: Link: https://lore.kernel.org/r/20201220080943.24839-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 4b003f5fcadfa2d0e087e907b0c65d023f6e29fb Author: Geert Uytterhoeven Date: Fri Dec 18 13:52:53 2020 +0100 clk: vc5: Use "idt,voltage-microvolt" instead of "idt,voltage-microvolts" Commit 45c940184b501fc6 ("dt-bindings: clk: versaclock5: convert to yaml") accidentally changed "idt,voltage-microvolts" to "idt,voltage-microvolt" in the DT bindings, while the driver still used the former. Update the driver to match the bindings, as Documentation/devicetree/bindings/property-units.txt actually recommends using "microvolt". Fixes: 260249f929e81d3d ("clk: vc5: Enable addition output configurations of the Versaclock") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201218125253.3815567-1-geert+renesas@glider.be Reviewed-by: Luca Ceresoli Signed-off-by: Stephen Boyd commit 11a163f2c7d6a9f27ce144cd7e367a81c851621a Author: Paul Cercueil Date: Sat Dec 12 13:57:33 2020 +0000 clk: ingenic: Fix divider calculation with div tables The previous code assumed that a higher hardware value always resulted in a bigger divider, which is correct for the regular clocks, but is an invalid assumption when a divider table is provided for the clock. Perfect example of this is the PLL0_HALF clock, which applies a /2 divider with the hardware value 0, and a /1 divider otherwise. Fixes: a9fa2893fcc6 ("clk: ingenic: Add support for divider tables") Cc: # 5.2 Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20201212135733.38050-1-paul@crapouillou.net Signed-off-by: Stephen Boyd commit 48f68de00c1405351fa0e7bc44bca067c49cd0a3 Author: Jernej Skrabec Date: Wed Dec 2 21:38:17 2020 +0100 clk: sunxi-ng: Make sure divider tables have sentinel Two clock divider tables are missing sentinel at the end. Effect of that is that clock framework reads past the last entry. Fix that with adding sentinel at the end. Issue was discovered with KASan. Fixes: 0577e4853bfb ("clk: sunxi-ng: Add H3 clocks") Fixes: c6a0637460c2 ("clk: sunxi-ng: Add A64 clocks") Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20201202203817.438713-1-jernej.skrabec@siol.net Acked-by: Maxime Ripard Signed-off-by: Stephen Boyd commit d2d94fc567624f96187e8b52083795620f93e69f Author: Christophe JAILLET Date: Sat Dec 12 13:28:18 2020 +0100 clk: s2mps11: Fix a resource leak in error handling paths in the probe function Some resource should be released in the error handling path of the probe function, as already done in the remove function. The remove function was fixed in commit bf416bd45738 ("clk: s2mps11: Add missing of_node_put and of_clk_del_provider") Fixes: 7cc560dea415 ("clk: s2mps11: Add support for s2mps11") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/20201212122818.86195-1-christophe.jaillet@wanadoo.fr Reviewed-by: Krzysztof Kozlowski Signed-off-by: Stephen Boyd commit 6f37689cf6b38fff96de52e7f0d3e78f22803ba0 Author: Terry Zhou Date: Fri Nov 6 11:00:39 2020 +0100 clk: mvebu: a3700: fix the XTAL MODE pin to MPP1_9 There is an error in the current code that the XTAL MODE pin was set to NB MPP1_31 which should be NB MPP1_9. The latch register of NB MPP1_9 has different offset of 0x8. Signed-off-by: Terry Zhou [pali: Fix pin name in commit message] Signed-off-by: Pali Rohár Fixes: 7ea8250406a6 ("clk: mvebu: Add the xtal clock for Armada 3700 SoC") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20201106100039.11385-1-pali@kernel.org Reviewed-by: Marek Behún Signed-off-by: Stephen Boyd commit 5142cbcea324909be03b176540c0c2f3975922b4 Author: Sascha Hauer Date: Mon Nov 30 10:10:33 2020 +0100 clk: si5351: Wait for bit clear after PLL reset Documentation states that SI5351_PLL_RESET_B and SI5351_PLL_RESET_A bits are self clearing bits, so wait until they are cleared before continuing. This fixes a case when the clock doesn't come up properly after a PLL reset. It worked properly when the frequency was below 900MHz, but with 900MHz it only works when we are waiting for the bit to clear. Signed-off-by: Sascha Hauer Link: https://lore.kernel.org/r/20201130091033.1687-1-s.hauer@pengutronix.de Signed-off-by: Stephen Boyd commit 01324f9e88b5cfc1f4c26eef66bdcb52596c9af8 Author: Alexandre Belloni Date: Wed Dec 2 13:58:15 2020 +0100 clk: at91: sam9x60: remove atmel,osc-bypass support The sam9x60 doesn't have the MOSCXTBY bit to enable the crystal oscillator bypass. Fixes: 01e2113de9a5 ("clk: at91: add sam9x60 pmc driver") Reported-by: Claudiu Beznea Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201202125816.168618-1-alexandre.belloni@bootlin.com Reviewed-by: Claudiu Beznea Tested-by: Claudiu Beznea Signed-off-by: Stephen Boyd commit 467f8165a2b0e6accf3d0dd9c8089b1dbde29f7f Merge: 3872f516aab34 6abc20f8f879d Author: Linus Torvalds Date: Sat Dec 19 13:03:12 2020 -0800 Merge tag 'close-range-cloexec-unshare-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux Pull close_range fix from Christian Brauner: "syzbot reported a bug when asking close_range() to unshare the file descriptor table and making all fds close-on-exec. If CLOSE_RANGE_UNSHARE the caller will receive a private file descriptor table in case their file descriptor table is currently shared before operating on the requested file descriptor range. For the case where the caller has requested all file descriptors to be actually closed via e.g. close_range(3, ~0U, CLOSE_RANGE_UNSHARE) the kernel knows that the caller does not need any of the file descriptors anymore and will optimize the close operation by only copying all files in the range from 0 to 3 and no others. However, if the caller requested CLOSE_RANGE_CLOEXEC together with CLOSE_RANGE_UNSHARE the caller wants to still make use of the file descriptors so the kernel needs to copy all of them and can't optimize. The original patch didn't account for this and thus could cause oopses as evidenced by the syzbot report because it assumed that all fds had been copied. Fix this by handling the CLOSE_RANGE_CLOEXEC case and copying all fds if the two flags are specified together. This should've been caught in the selftests but the original patch didn't cover this case and I didn't catch it during review. So in addition to the bugfix I'm also adding selftests. They will reliably reproduce the bug on a non-fixed kernel and allows us to catch regressions and verify correct behavior. Note, the kernel selftest tree contained a bunch of changes that made the original selftest fail to compile so there are small fixups in here make them compile without warnings" * tag 'close-range-cloexec-unshare-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux: selftests/core: add regression test for CLOSE_RANGE_UNSHARE | CLOSE_RANGE_CLOEXEC selftests/core: add test for CLOSE_RANGE_UNSHARE | CLOSE_RANGE_CLOEXEC selftests/core: handle missing syscall number for close_range selftests/core: fix close_range_test build after XFAIL removal close_range: unshare all fds for CLOSE_RANGE_UNSHARE | CLOSE_RANGE_CLOEXEC commit 3872f516aab34e3adeb7eda43b29c1ecd852cee1 Merge: 651283d57eb41 6190c0ccaf5df Author: Linus Torvalds Date: Sat Dec 19 12:56:23 2020 -0800 Merge tag 'for-linus-5.11-rc1b-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull more xen updates from Juergen Gross: "Some minor cleanup patches and a small series disentangling some Xen related Kconfig options" * tag 'for-linus-5.11-rc1b-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen: Kconfig: remove X86_64 depends from XEN_512GB xen/manage: Fix fall-through warnings for Clang xen-blkfront: Fix fall-through warnings for Clang xen: remove trailing semicolon in macro definition xen: Kconfig: nest Xen guest options xen: Remove Xen PVH/PVHVM dependency on PCI x86/xen: Convert to DEFINE_SHOW_ATTRIBUTE commit 2e7f545096f954a9726c9415763dd0bfbcac47e0 Author: Kan Liang Date: Wed Dec 16 10:57:59 2020 -0800 perf mem: Factor out a function to generate sort order Now, "--phys-data" is the only option which impacts the sort order. A simple "if else" is enough to handle the option. But there will be more options added, e.g. "--data-page-size", which also impact the sort order. The code will become too complex to be maintained. Divide the sort order string into several small pieces. The first piece is always the default sort string for LOAD/STORE. Appends the specific sort string if related option is applied. No functional change. Signed-off-by: Kan Liang Acked-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Andi Kleen Cc: Mark Rutland Cc: Michael Ellerman Cc: Stephane Eranian Cc: Will Deacon Link: http://lore.kernel.org/lkml/20201216185805.9981-4-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit a50d03e3b8b68df13e47dcbde6c5d39b4237c479 Author: Kan Liang Date: Wed Dec 16 10:57:58 2020 -0800 perf sort: Add sort option for data page size Add a new sort option "data_page_size" for --mem-mode sort. With this option applied, perf can sort and report by sample's data page size. Here is an example: perf report --stdio --mem-mode --sort=comm,symbol,phys_daddr,data_page_size # To display the perf.data header info, please use # --header/--header-only options. # # # Total Lost Samples: 0 # # Samples: 9K of event 'mem-loads:uP' # Total weight : 9028 # Sort order : comm,symbol,phys_daddr,data_page_size # # Overhead Command Symbol Data Physical # Address # Data Page Size # ........ ....... ............................ # ...................... ...................... # 11.19% dtlb [.] touch_buffer [.] 0x00000003fec82ea8 4K 8.61% dtlb [.] GetTickCount [.] 0x00000003c4f2c8a8 4K 4.52% dtlb [.] GetTickCount [.] 0x00000003fec82f58 4K 4.33% dtlb [.] __gettimeofday [.] 0x00000003fec82f48 4K 4.32% dtlb [.] GetTickCount [.] 0x00000003fec82f78 4K 4.28% dtlb [.] GetTickCount [.] 0x00000003fec82f50 4K 4.23% dtlb [.] GetTickCount [.] 0x00000003fec82f70 4K 4.11% dtlb [.] GetTickCount [.] 0x00000003fec82f68 4K 4.00% dtlb [.] Calibrate [.] 0x00000003fec82f98 4K 3.91% dtlb [.] Calibrate [.] 0x00000003fec82f90 4K 3.43% dtlb [.] touch_buffer [.] 0x00000003fec82e98 4K 3.42% dtlb [.] touch_buffer [.] 0x00000003fec82e90 4K 0.09% dtlb [.] DoDependentLoads [.] 0x000000036ea084c0 2M 0.08% dtlb [.] DoDependentLoads [.] 0x000000032b010b80 2M Signed-off-by: Kan Liang Acked-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Andi Kleen Cc: Mark Rutland Cc: Michael Ellerman Cc: Stephane Eranian Cc: Will Deacon Link: http://lore.kernel.org/lkml/20201216185805.9981-3-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 651283d57eb4107f4a81af282064e597e2f9b181 Merge: 190daf1920678 70d3a462fc244 Author: Linus Torvalds Date: Sat Dec 19 12:50:10 2020 -0800 Merge branch 'pcmcia-next' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux Pull pcmcia updates from Dominik Brodowski: "Besides a few PCMCIA odd fixes, the NEC VRC4173 CARDU driver is removed, as it has not compiled in ages" * 'pcmcia-next' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux: pcmcia: omap: Fix error return code in omap_cf_probe() pcmcia: Remove NEC VRC4173 CARDU pcmcia: db1xxx_ss: remove unneeded semicolon pcmcia/electra_cf: Fix some return values in 'electra_cf_probe()' in case of error commit 190daf19206783bb16655db14e604a0d724c4bbf Merge: 11c336526e250 95393f3e07ab5 Author: Linus Torvalds Date: Sat Dec 19 12:46:52 2020 -0800 Merge tag 'i3c/for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux Pull i3c updates from Boris Brezillon: - Add the HCI driver - Add a missing destroy_workqueue() in an error path - Flag Alexandre Belloni as the new maintainer * tag 'i3c/for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux: i3c/master/mipi-i3c-hci: quiet maybe-unused variable warning i3c: Resign from my maintainer role i3c/master: Fix uninitialized variable next_addr i3c/master: introduce the mipi-i3c-hci driver dt-bindings: i3c: MIPI I3C Host Controller Interface i3c master: fix missing destroy_workqueue() on error in i3c_master_register commit 6b9bae63de4fe24365ad0c2d23e77ae06f8c58e4 Author: Kan Liang Date: Wed Dec 16 10:57:57 2020 -0800 perf script: Support data page size Display the data page size if it is available and asked by the user: Can be configured by the user, for example: perf script --fields comm,event,phys_addr,data_page_size dtlb mem-loads:uP: 3fec82ea8 4K dtlb mem-loads:uP: 3fec82e90 4K dtlb mem-loads:uP: 3e23700a4 4K dtlb mem-loads:uP: 3fec82f20 4K dtlb mem-loads:uP: 3e23700a4 4K dtlb mem-loads:uP: 3b4211bec 4K dtlb mem-loads:uP: 382205dc0 2M dtlb mem-loads:uP: 36fa082c0 2M dtlb mem-loads:uP: 377607340 2M dtlb mem-loads:uP: 330010180 2M dtlb mem-loads:uP: 33200fd80 2M dtlb mem-loads:uP: 31b012b80 2M Signed-off-by: Kan Liang Acked-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Andi Kleen Cc: Mark Rutland Cc: Michael Ellerman Cc: Stephane Eranian Cc: Will Deacon Link: http://lore.kernel.org/lkml/20201216185805.9981-2-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 11c336526e2504d34c70fcf11a3642ae333a5085 Merge: c2703b66172ff c2362519a04a7 Author: Linus Torvalds Date: Sat Dec 19 11:58:46 2020 -0800 Merge tag 'for-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply and reset updates from Sebastian Reichel: "Battery/charger driver changes: - collie_battery, generic-adc-battery, s3c-adc-battery: convert to GPIO descriptors (incl ARM board files) - misc cleanup and fixes Reset drivers: - new poweroff driver for force disabling a regulator - use printk format symbol resolver - ocelot: add support for Luton and Jaguar2" * tag 'for-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (31 commits) power: supply: Fix a typo in warning message Documentation: DT: binding documentation for regulator-poweroff power: reset: new driver regulator-poweroff power: supply: ab8500: Use dev_err_probe() for IIO channels power: supply: ab8500_fg: Request all IRQs as threaded power: supply: ab8500_charger: Oneshot threaded IRQs power: supply: ab8500: Convert to dev_pm_ops power: supply: ab8500: Use local helper power: supply: wm831x_power: remove unneeded break power: supply: bq24735: Drop unused include power: supply: bq24190_charger: Drop unused include power: supply: generic-adc-battery: Use GPIO descriptors power: supply: collie_battery: Convert to GPIO descriptors power: supply: bq24190_charger: fix reference leak power: supply: s3c-adc-battery: Convert to GPIO descriptors power: reset: Use printk format symbol resolver power: supply: axp20x_usb_power: Use power efficient workqueue for debounce power: supply: axp20x_usb_power: fix typo power: supply: max8997-charger: Improve getting charger status power: supply: max8997-charger: Fix platform data retrieval ... commit c2703b66172fff39122012e42986b44c9c6ad5f1 Merge: d56154c7e8ba0 8a77ed6d1fdda Author: Linus Torvalds Date: Sat Dec 19 11:53:47 2020 -0800 Merge tag 'hsi-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi Pull HSI updates from Sebastian Reichel: "Misc cleanups" * tag 'hsi-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi: HSI: core: fix a kernel-doc markup HSI: omap_ssi: Don't jump to free ID in ssi_add_controller() commit d56154c7e8ba090126a5a2cb76098628bc2216a2 Merge: 1db98bcf56b11 6eefb79d6f5bc Author: Linus Torvalds Date: Sat Dec 19 11:51:32 2020 -0800 Merge tag 'pwm/for-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm Pull pwm updates from Thierry Reding: "This is a fairly big release cycle from the PWM framework's point of view. There's a large patcheset here which converts drivers to use the new devm_platform_ioremap_resource() helper and a bunch of minor fixes to existing drivers. Some of the existing drivers also add support for more hardware, such as Atmel SAMA 5D2 and Mediatek MT8183. Finally there's a couple of new drivers for Intel Keem Bay and LGM SoCs as well as the DesignWare PWM controller" * tag 'pwm/for-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (66 commits) pwm: sun4i: Remove erroneous else branch pwm: sl28cpld: Set driver data before registering the PWM chip pwm: Remove unused function pwmchip_add_inversed() pwm: imx27: Fix overflow for bigger periods pwm: bcm2835: Support apply function for atomic configuration pwm: keembay: Fix build failure with -Os pwm: core: Use octal permission pwm: lpss: Make compilable with COMPILE_TEST pwm: Fix dependencies on HAS_IOMEM pwm: Use -EINVAL for unsupported polarity pwm: sti: Remove unnecessary blank line pwm: sti: Avoid conditional gotos pwm: Add PWM fan controller driver for LGM SoC Add DT bindings YAML schema for PWM fan controller of LGM SoC pwm: Add DesignWare PWM Controller Driver dt-bindings: pwm: mtk-disp: add MT8167 SoC binding pwm: mediatek: Add MT8183 SoC support pwm: mediatek: Always use bus clock dt-bindings: pwm: pwm-mediatek: Add documentation for MT8183 SoC pwm: Add PWM driver for Intel Keem Bay ... commit 91f3bf0d5315ea3f139ae440f2b7772ecdcd67ec Author: Claudiu Beznea Date: Thu Nov 19 17:43:17 2020 +0200 clk: at91: sama7g5: register cpu clock Register CPU clock as being the master clock prescaler. This would be used by DVFS. The block schema of SAMA7G5's PMC contains also a divider between master clock prescaler and CPU (PMC_CPU_RATIO.RATIO) but the frequencies supported by SAMA7G5 could be directly received from CPUPLL + master clock prescaler and the extra divider would do no work in case it would be enabled. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1605800597-16720-12-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Stephen Boyd commit 7a110b9107ed8fe27277988cdb4d18e7043b7252 Author: Claudiu Beznea Date: Thu Nov 19 17:43:16 2020 +0200 clk: at91: clk-master: re-factor master clock Re-factor master clock driver by splitting it into 2 clocks: prescaller and divider clocks. Based on registered clock flags the prescaler's rate could be changed at runtime. This is necessary for platforms supporting DVFS (e.g. SAMA7G5) where master clock could be changed at run-time. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1605800597-16720-11-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Stephen Boyd commit 120d5d8b4614ee26c576b29377a968093948473f Author: Claudiu Beznea Date: Thu Nov 19 17:43:15 2020 +0200 clk: at91: sama7g5: do not allow cpu pll to go higher than 1GHz Since CPU PLL feeds both CPU clock and MCK0, MCK0 cannot go higher than 200MHz and MCK0 maximum prescaller is 5 limit the CPU PLL at 1GHz to avoid MCK0 overclocking while CPU PLL is changed by DVFS. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1605800597-16720-10-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Stephen Boyd commit f803858af84e1e6916edfbc5ae0fac403c02ee46 Author: Claudiu Beznea Date: Thu Nov 19 17:43:14 2020 +0200 clk: at91: sama7g5: decrease lower limit for MCK0 rate On SAMA7G5 CPU clock is changed at run-time by DVFS. Since MCK0 and CPU clock shares the same parent clock (CPUPLL clock) the MCK0 is also changed by DVFS to avoid over/under clocking of MCK0 consumers. The lower limit is changed to be able to set MCK0 accordingly by DVFS. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1605800597-16720-9-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Stephen Boyd commit 4011f03ee4756df3091ad0c2cfb0593bee8ecdf1 Author: Claudiu Beznea Date: Thu Nov 19 17:43:13 2020 +0200 clk: at91: sama7g5: remove mck0 from parent list of other clocks MCK0 is changed at runtime by DVFS. Due to this, since not all IPs are glitch free aware at MCK0 changes, remove MCK0 from parent list of other clocks (e.g. generic clock, programmable/system clock, MCKX). Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1605800597-16720-8-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Stephen Boyd commit 8dc4af8bef127425271e06d09370a2479dae69c3 Author: Claudiu Beznea Date: Thu Nov 19 17:43:12 2020 +0200 clk: at91: clk-sam9x60-pll: allow runtime changes for pll Allow runtime frequency changes for PLLs registered with proper flags. This is necessary for CPU PLL on SAMA7G5 which is used by DVFS. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1605800597-16720-7-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Stephen Boyd commit 0bb4623f13d46b2ea054777accff0c41af8036be Author: Eugen Hristev Date: Thu Nov 19 17:43:11 2020 +0200 clk: at91: sama7g5: add 5th divisor for mck0 layout and characteristics This SoC has the 5th divisor for the mck0 master clock. Adapt the characteristics accordingly. Reported-by: Mihai Sain Signed-off-by: Eugen Hristev Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1605800597-16720-6-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Stephen Boyd commit e26b3006ff07020e509fb9e0e560e462ff4077c9 Author: Eugen Hristev Date: Thu Nov 19 17:43:10 2020 +0200 clk: at91: clk-master: add 5th divisor for mck master clk-master can have 5 divisors with a field width of 3 bits on some products. Change the mask and number of divisors accordingly. Reported-by: Mihai Sain Signed-off-by: Eugen Hristev Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1605800597-16720-5-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Stephen Boyd commit 83d002877365afac2cb65ef4ad36b445652ebda3 Author: Eugen Hristev Date: Thu Nov 19 17:43:09 2020 +0200 clk: at91: sama7g5: allow SYS and CPU PLLs to be exported and referenced in DT Allow SYSPLL and CPUPLL to be referenced as a PMC_TYPE_CORE clock from phandle in DT. Suggested-by: Claudiu Beznea Signed-off-by: Eugen Hristev [claudiu.beznea@microchip.com: adapt commit message, add CPU PLL] Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1605800597-16720-4-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Stephen Boyd commit 3d86ee17d4670406d07f92da6fa4f2aa82cdc5a2 Author: Eugen Hristev Date: Thu Nov 19 17:43:08 2020 +0200 dt-bindings: clock: at91: add sama7g5 pll defines Add SAMA7G5 specific PLL defines to be referenced in a phandle as a PMC_TYPE_CORE clock. Suggested-by: Claudiu Beznea Signed-off-by: Eugen Hristev [claudiu.beznea@microchip.com: adapt comit message, adapt sama7g5.c] Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1605800597-16720-3-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Stephen Boyd commit 91274497c79170aaadc491d4ffe4de35495a060d Author: Claudiu Beznea Date: Thu Nov 19 17:43:07 2020 +0200 clk: at91: sama7g5: fix compilation error pmc_data_allocate() has been changed. pmc_data_free() was removed. Adapt the code taking this into consideration. With this the programmable clocks were also saved in sama7g5_pmc so that they could be later referenced. Fixes: cb783bbbcf54 ("clk: at91: sama7g5: add clock support for sama7g5") Signed-off-by: Claudiu Beznea Reviewed-by: Tudor Ambarus Tested-by: Tudor Ambarus Link: https://lore.kernel.org/r/1605800597-16720-2-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Stephen Boyd commit be439cc4c404f646a8ba090fa786d53c10926b12 Author: Nicolas Saenz Julienne Date: Wed Dec 2 11:35:18 2020 +0100 clk: bcm: dvp: Add MODULE_DEVICE_TABLE() Add MODULE_DEVICE_TABLE() so as to be able to use the driver as a module. More precisely, for the driver to be loaded automatically at boot. Fixes: 1bc95972715a ("clk: bcm: Add BCM2711 DVP driver") Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20201202103518.21889-1-nsaenzjulienne@suse.de Reviewed-by: Maxime Ripard Signed-off-by: Stephen Boyd commit c82cf05190d482bb3546dffd6a337f38e105daf7 Author: Uwe Kleine-König Date: Fri Nov 20 14:21:21 2020 +0100 clk: bcm: dvp: drop a variable that is assigned to only The third parameter to devm_platform_get_and_ioremap_resource() is used only to provide the used resource. As this variable isn't used afterwards, switch to the function devm_platform_ioremap_resource() which doesn't provide this output parameter. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20201120132121.2678997-1-u.kleine-koenig@pengutronix.de Reviewed-by: Nicolas Saenz Julienne Signed-off-by: Stephen Boyd commit 1db98bcf56b1126428d59e71b815c310f73e44ab Merge: 3644e2d2dda78 01ab1ede9190b Author: Linus Torvalds Date: Sat Dec 19 11:39:50 2020 -0800 Merge branch 'akpm' (patches from Andrew) Merge still more updates from Andrew Morton: "18 patches. Subsystems affected by this patch series: mm (memcg and cleanups) and epoll" * emailed patches from Andrew Morton : mm/Kconfig: fix spelling mistake "whats" -> "what's" selftests/filesystems: expand epoll with epoll_pwait2 epoll: wire up syscall epoll_pwait2 epoll: add syscall epoll_pwait2 epoll: convert internal api to timespec64 epoll: eliminate unnecessary lock for zero timeout epoll: replace gotos with a proper loop epoll: pull all code between fetch_events and send_event into the loop epoll: simplify and optimize busy loop logic epoll: move eavail next to the list_empty_careful check epoll: pull fatal signal checks into ep_send_events() epoll: simplify signal handling epoll: check for events when removing a timed out thread from the wait queue mm/memcontrol:rewrite mem_cgroup_page_lruvec() mm, kvm: account kvm_vcpu_mmap to kmemcg mm/memcg: remove unused definitions mm/memcg: warning on !memcg after readahead page charged mm/memcg: bail early from swap accounting if memcg disabled commit 01ab1ede9190b9fafa88b1c97129c034fa9aa437 Author: Colin Ian King Date: Fri Dec 18 14:05:32 2020 -0800 mm/Kconfig: fix spelling mistake "whats" -> "what's" There is a spelling mistake in the Kconfig help text. Fix it. Link: https://lkml.kernel.org/r/20201217172717.58203-1-colin.king@canonical.com Signed-off-by: Colin Ian King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e9ce39b5b390e0e5944a46328cb0a18d132de532 Author: Willem de Bruijn Date: Fri Dec 18 14:05:44 2020 -0800 selftests/filesystems: expand epoll with epoll_pwait2 Code coverage for the epoll_pwait2 syscall. epoll62: Repeat basic test epoll1, but exercising the new syscall. epoll63: Pass a timespec and exercise the timeout wakeup path. Link: https://lkml.kernel.org/r/20201121144401.3727659-5-willemdebruijn.kernel@gmail.com Signed-off-by: Willem de Bruijn Cc: Al Viro Cc: Arnd Bergmann Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b0a0c2615f6f199a656ed8549d7dce625d77aa77 Author: Willem de Bruijn Date: Fri Dec 18 14:05:41 2020 -0800 epoll: wire up syscall epoll_pwait2 Split off from prev patch in the series that implements the syscall. Link: https://lkml.kernel.org/r/20201121144401.3727659-4-willemdebruijn.kernel@gmail.com Signed-off-by: Willem de Bruijn Cc: Al Viro Cc: Arnd Bergmann Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 58169a52ebc9a733aeb5bea857bc5daa71a301bb Author: Willem de Bruijn Date: Fri Dec 18 14:05:38 2020 -0800 epoll: add syscall epoll_pwait2 Add syscall epoll_pwait2, an epoll_wait variant with nsec resolution that replaces int timeout with struct timespec. It is equivalent otherwise. int epoll_pwait2(int fd, struct epoll_event *events, int maxevents, const struct timespec *timeout, const sigset_t *sigset); The underlying hrtimer is already programmed with nsec resolution. pselect and ppoll also set nsec resolution timeout with timespec. The sigset_t in epoll_pwait has a compat variant. epoll_pwait2 needs the same. For timespec, only support this new interface on 2038 aware platforms that define __kernel_timespec_t. So no CONFIG_COMPAT_32BIT_TIME. Link: https://lkml.kernel.org/r/20201121144401.3727659-3-willemdebruijn.kernel@gmail.com Signed-off-by: Willem de Bruijn Cc: Al Viro Cc: Arnd Bergmann Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7cdf7c20e97141eadb05121cc521c8eff47e7d93 Author: Willem de Bruijn Date: Fri Dec 18 14:05:35 2020 -0800 epoll: convert internal api to timespec64 Patch series "add epoll_pwait2 syscall", v4. Enable nanosecond timeouts for epoll. Analogous to pselect and ppoll, introduce an epoll_wait syscall variant that takes a struct timespec instead of int timeout. This patch (of 4): Make epoll more consistent with select/poll: pass along the timeout as timespec64 pointer. In anticipation of additional changes affecting all three polling mechanisms: - add epoll_pwait2 syscall with timespec semantics, and share poll_select_set_timeout implementation. - compute slack before conversion to absolute time, to save one ktime_get_ts64 call. Link: https://lkml.kernel.org/r/20201121144401.3727659-1-willemdebruijn.kernel@gmail.com Link: https://lkml.kernel.org/r/20201121144401.3727659-2-willemdebruijn.kernel@gmail.com Signed-off-by: Willem de Bruijn Cc: Al Viro Cc: Matthew Wilcox (Oracle) Cc: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e59d3c64cba69b57263dff1d62838bc6a819ae37 Author: Soheil Hassas Yeganeh Date: Fri Dec 18 14:02:06 2020 -0800 epoll: eliminate unnecessary lock for zero timeout We call ep_events_available() under lock when timeout is 0, and then call it without locks in the loop for the other cases. Instead, call ep_events_available() without lock for all cases. For non-zero timeouts, we will recheck after adding the thread to the wait queue. For zero timeout cases, by definition, user is opportunistically polling and will have to call epoll_wait again in the future. Note that this lock was kept in c5a282e9635e9 because the whole loop was historically under lock. This patch results in a 1% CPU/RPC reduction in RPC benchmarks. Link: https://lkml.kernel.org/r/20201106231635.3528496-9-soheil.kdev@gmail.com Signed-off-by: Soheil Hassas Yeganeh Suggested-by: Eric Dumazet Reviewed-by: Eric Dumazet Reviewed-by: Willem de Bruijn Reviewed-by: Khazhismel Kumykov Cc: Guantao Liu Cc: Linus Torvalds Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 00b27634bc471e0198f93d48694171121af2e159 Author: Soheil Hassas Yeganeh Date: Fri Dec 18 14:02:03 2020 -0800 epoll: replace gotos with a proper loop The existing loop is pointless, and the labels make it really hard to follow the structure. Replace that control structure with a simple loop that returns when there are new events, there is a signal, or the thread has timed out. Link: https://lkml.kernel.org/r/20201106231635.3528496-8-soheil.kdev@gmail.com Signed-off-by: Soheil Hassas Yeganeh Suggested-by: Linus Torvalds Reviewed-by: Eric Dumazet Reviewed-by: Willem de Bruijn Reviewed-by: Khazhismel Kumykov Cc: Guantao Liu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e8c85328b1e88f4ee7f84a1fdbff2f2c7965e026 Author: Soheil Hassas Yeganeh Date: Fri Dec 18 14:02:00 2020 -0800 epoll: pull all code between fetch_events and send_event into the loop This is a no-op change which simplifies the follow up patches. Link: https://lkml.kernel.org/r/20201106231635.3528496-7-soheil.kdev@gmail.com Signed-off-by: Soheil Hassas Yeganeh Suggested-by: Linus Torvalds Reviewed-by: Eric Dumazet Reviewed-by: Willem de Bruijn Reviewed-by: Khazhismel Kumykov Cc: Guantao Liu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1493c47fb140ddd9e5c291f0c0da3fb03741c766 Author: Soheil Hassas Yeganeh Date: Fri Dec 18 14:01:57 2020 -0800 epoll: simplify and optimize busy loop logic ep_events_available() is called multiple times around the busy loop logic, even though the logic is generally not used. ep_reset_busy_poll_napi_id() is similarly always called, even when busy loop is not used. Eliminate ep_reset_busy_poll_napi_id() and inline it inside ep_busy_loop(). Make ep_busy_loop() return whether there are any events available after the busy loop. This will eliminate unnecessary loads and branches, and simplifies the loop. Link: https://lkml.kernel.org/r/20201106231635.3528496-6-soheil.kdev@gmail.com Signed-off-by: Soheil Hassas Yeganeh Reviewed-by: Eric Dumazet Reviewed-by: Willem de Bruijn Reviewed-by: Khazhismel Kumykov Cc: Guantao Liu Cc: Linus Torvalds Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e411596d48b5b77632deb91afcbc3185b9b658cb Author: Soheil Hassas Yeganeh Date: Fri Dec 18 14:01:54 2020 -0800 epoll: move eavail next to the list_empty_careful check This is a no-op change and simply to make the code more coherent. Link: https://lkml.kernel.org/r/20201106231635.3528496-5-soheil.kdev@gmail.com Signed-off-by: Soheil Hassas Yeganeh Suggested-by: Linus Torvalds Reviewed-by: Eric Dumazet Reviewed-by: Willem de Bruijn Reviewed-by: Khazhismel Kumykov Cc: Guantao Liu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cccd29bf0823bdfeb087b7661b06856b1b73bced Author: Soheil Hassas Yeganeh Date: Fri Dec 18 14:01:51 2020 -0800 epoll: pull fatal signal checks into ep_send_events() To simplify the code, pull in checking the fatal signals into ep_send_events(). ep_send_events() is called only from ep_poll(). Note that, previously, we were always checking fatal events, but it is checked only if eavail is true. This should be fine because the goal of that check is to quickly return from epoll_wait() when there is a pending fatal signal. Link: https://lkml.kernel.org/r/20201106231635.3528496-4-soheil.kdev@gmail.com Signed-off-by: Soheil Hassas Yeganeh Suggested-by: Willem de Bruijn Reviewed-by: Eric Dumazet Reviewed-by: Willem de Bruijn Reviewed-by: Khazhismel Kumykov Cc: Guantao Liu Cc: Linus Torvalds Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2efdaf7660c408d57721cc6dacb0167f866cb451 Author: Soheil Hassas Yeganeh Date: Fri Dec 18 14:01:48 2020 -0800 epoll: simplify signal handling Check signals before locking ep->lock, and immediately return -EINTR if there is any signal pending. This saves a few loads, stores, and branches from the hot path and simplifies the loop structure for follow up patches. Link: https://lkml.kernel.org/r/20201106231635.3528496-3-soheil.kdev@gmail.com Signed-off-by: Soheil Hassas Yeganeh Suggested-by: Linus Torvalds Reviewed-by: Eric Dumazet Reviewed-by: Willem de Bruijn Reviewed-by: Khazhismel Kumykov Cc: Guantao Liu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 289caf5d8f6c61c6d2b7fd752a7f483cd153f182 Author: Soheil Hassas Yeganeh Date: Fri Dec 18 14:01:44 2020 -0800 epoll: check for events when removing a timed out thread from the wait queue Patch series "simplify ep_poll". This patch series is a followup based on the suggestions and feedback by Linus: https://lkml.kernel.org/r/CAHk-=wizk=OxUyQPbO8MS41w2Pag1kniUV5WdD5qWL-gq1kjDA@mail.gmail.com The first patch in the series is a fix for the epoll race in presence of timeouts, so that it can be cleanly backported to all affected stable kernels. The rest of the patch series simplify the ep_poll() implementation. Some of these simplifications result in minor performance enhancements as well. We have kept these changes under self tests and internal benchmarks for a few days, and there are minor (1-2%) performance enhancements as a result. This patch (of 8): After abc610e01c66 ("fs/epoll: avoid barrier after an epoll_wait(2) timeout"), we break out of the ep_poll loop upon timeout, without checking whether there is any new events available. Prior to that patch-series we always called ep_events_available() after exiting the loop. This can cause races and missed wakeups. For example, consider the following scenario reported by Guantao Liu: Suppose we have an eventfd added using EPOLLET to an epollfd. Thread 1: Sleeps for just below 5ms and then writes to an eventfd. Thread 2: Calls epoll_wait with a timeout of 5 ms. If it sees an event of the eventfd, it will write back on that fd. Thread 3: Calls epoll_wait with a negative timeout. Prior to abc610e01c66, it is guaranteed that Thread 3 will wake up either by Thread 1 or Thread 2. After abc610e01c66, Thread 3 can be blocked indefinitely if Thread 2 sees a timeout right before the write to the eventfd by Thread 1. Thread 2 will be woken up from schedule_hrtimeout_range and, with evail 0, it will not call ep_send_events(). To fix this issue: 1) Simplify the timed_out case as suggested by Linus. 2) while holding the lock, recheck whether the thread was woken up after its time out has reached. Note that (2) is different from Linus' original suggestion: It do not set "eavail = ep_events_available(ep)" to avoid unnecessary contention (when there are too many timed-out threads and a small number of events), as well as races mentioned in the discussion thread. This is the first patch in the series so that the backport to stable releases is straightforward. Link: https://lkml.kernel.org/r/20201106231635.3528496-1-soheil.kdev@gmail.com Link: https://lkml.kernel.org/r/CAHk-=wizk=OxUyQPbO8MS41w2Pag1kniUV5WdD5qWL-gq1kjDA@mail.gmail.com Link: https://lkml.kernel.org/r/20201106231635.3528496-2-soheil.kdev@gmail.com Fixes: abc610e01c66 ("fs/epoll: avoid barrier after an epoll_wait(2) timeout") Signed-off-by: Soheil Hassas Yeganeh Tested-by: Guantao Liu Suggested-by: Linus Torvalds Reported-by: Guantao Liu Reviewed-by: Eric Dumazet Reviewed-by: Willem de Bruijn Reviewed-by: Khazhismel Kumykov Reviewed-by: Davidlohr Bueso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9a1ac2288cf16f9406ca54ef221bfcf262393b15 Author: Hui Su Date: Fri Dec 18 14:01:41 2020 -0800 mm/memcontrol:rewrite mem_cgroup_page_lruvec() mem_cgroup_page_lruvec() in memcontrol.c and mem_cgroup_lruvec() in memcontrol.h is very similar except for the param(page and memcg) which also can be convert to each other. So rewrite mem_cgroup_page_lruvec() with mem_cgroup_lruvec(). [alex.shi@linux.alibaba.com: add missed warning in mem_cgroup_lruvec] Link: https://lkml.kernel.org/r/94f17bb7-ec61-5b72-3555-fabeb5a4d73b@linux.alibaba.com [lstoakes@gmail.com: warn on missing memcg on mem_cgroup_page_lruvec()] Link: https://lkml.kernel.org/r/20201125112202.387009-1-lstoakes@gmail.com Link: https://lkml.kernel.org/r/20201108143731.GA74138@rlk Signed-off-by: Hui Su Signed-off-by: Alex Shi Signed-off-by: Lorenzo Stoakes Acked-by: Michal Hocko Acked-by: Johannes Weiner Reviewed-by: Shakeel Butt Acked-by: Roman Gushchin Cc: Vladimir Davydov Cc: Yafang Shao Cc: Chris Down Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 93bb59ca5e97a99922a01a43934c18dc7adfd968 Author: Shakeel Butt Date: Fri Dec 18 14:01:38 2020 -0800 mm, kvm: account kvm_vcpu_mmap to kmemcg A VCPU of a VM can allocate couple of pages which can be mmap'ed by the user space application. At the moment this memory is not charged to the memcg of the VMM. On a large machine running large number of VMs or small number of VMs having large number of VCPUs, this unaccounted memory can be very significant. So, charge this memory to the memcg of the VMM. Please note that lifetime of these allocations corresponds to the lifetime of the VMM. Link: https://lkml.kernel.org/r/20201106202923.2087414-1-shakeelb@google.com Signed-off-by: Shakeel Butt Acked-by: Roman Gushchin Acked-by: Paolo Bonzini Cc: Johannes Weiner Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bec78efd0061365a76f88e498affd7106b256823 Author: Wei Yang Date: Fri Dec 18 14:01:35 2020 -0800 mm/memcg: remove unused definitions Some definitions are left unused, just clean them. Link: https://lkml.kernel.org/r/20201108003834.12669-1-richard.weiyang@gmail.com Signed-off-by: Wei Yang Acked-by: Michal Hocko Reviewed-by: Shakeel Butt Reviewed-by: Roman Gushchin Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a4055888629bc0467d12d912cd7c90acdf3d9b12 Author: Alex Shi Date: Fri Dec 18 14:01:31 2020 -0800 mm/memcg: warning on !memcg after readahead page charged Add VM_WARN_ON_ONCE_PAGE() macro. Since readahead page is charged on memcg too, in theory we don't have to check this exception now. Before safely remove them all, add a warning for the unexpected !memcg. Link: https://lkml.kernel.org/r/1604283436-18880-3-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Alex Shi Acked-by: Michal Hocko Acked-by: Hugh Dickins Acked-by: Johannes Weiner Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 76358ab547357516ec2dace95ae70c1572d6708c Author: Alex Shi Date: Fri Dec 18 14:01:28 2020 -0800 mm/memcg: bail early from swap accounting if memcg disabled Patch series "bail out early for memcg disable". These 2 patches are indepenedent from per memcg lru lock, and may encounter unexpected warning, so let's move out them from per memcg lru locking patchset. This patch (of 2): We could bail out early when memcg wasn't enabled. Link: https://lkml.kernel.org/r/1604283436-18880-1-git-send-email-alex.shi@linux.alibaba.com Link: https://lkml.kernel.org/r/1604283436-18880-2-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Alex Shi Reviewed-by: Roman Gushchin Acked-by: Michal Hocko Acked-by: Hugh Dickins Acked-by: Johannes Weiner Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fec6079b2eeab319d9e3d074f54d3b6f623e9701 Author: Stefan Chulski Date: Thu Dec 17 20:37:46 2020 +0200 net: mvpp2: prs: fix PPPoE with ipv6 packet parse Current PPPoE+IPv6 entry is jumping to 'next-hdr' field and not to 'DIP' field as done for IPv4. Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network unit") Reported-by: Liron Himi Signed-off-by: Stefan Chulski Link: https://lore.kernel.org/r/1608230266-22111-1-git-send-email-stefanc@marvell.com Signed-off-by: Jakub Kicinski commit 3f48fab62bb81a7f9d01e9d43c40395fad011dd5 Author: Stefan Chulski Date: Thu Dec 17 20:30:17 2020 +0200 net: mvpp2: Add TCAM entry to drop flow control pause frames Issue: Flow control frame used to pause GoP(MAC) was delivered to the CPU and created a load on the CPU. Since XOFF/XON frames are used only by MAC, these frames should be dropped inside MAC. Fix: According to 802.3-2012 - IEEE Standard for Ethernet pause frame has unique destination MAC address 01-80-C2-00-00-01. Add TCAM parser entry to track and drop pause frames by destination MAC. Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network unit") Signed-off-by: Stefan Chulski Link: https://lore.kernel.org/r/1608229817-21951-1-git-send-email-stefanc@marvell.com Signed-off-by: Jakub Kicinski commit 87508224485323ce2d4e7fb929ec80f51adcc238 Author: Stefan Chulski Date: Thu Dec 17 16:52:15 2020 +0200 net: mvpp2: disable force link UP during port init procedure Force link UP can be enabled by bootloader during tftpboot and breaks NFS support. Force link UP disabled during port init procedure. Fixes: f84bf386f395 ("net: mvpp2: initialize the GoP") Signed-off-by: Stefan Chulski Acked-by: Marcin Wojtas Link: https://lore.kernel.org/r/1608216735-14501-1-git-send-email-stefanc@marvell.com Signed-off-by: Jakub Kicinski commit 6abc20f8f879d891930f37186b19c9dc3ecc34dd Author: Christian Brauner Date: Fri Dec 18 15:54:15 2020 +0100 selftests/core: add regression test for CLOSE_RANGE_UNSHARE | CLOSE_RANGE_CLOEXEC This test is a minimalized version of the reproducer given by syzbot (cf. [1]). After introducing CLOSE_RANGE_CLOEXEC syzbot reported a crash when CLOSE_RANGE_CLOEXEC is specified in conjunction with CLOSE_RANGE_UNSHARE. When CLOSE_RANGE_UNSHARE is specified the caller will receive a private file descriptor table in case their file descriptor table is currently shared. For the case where the caller has requested all file descriptors to be actually closed via e.g. close_range(3, ~0U, 0) the kernel knows that the caller does not need any of the file descriptors anymore and will optimize the close operation by only copying all files in the range from 0 to 3 and no others. However, if the caller requested CLOSE_RANGE_CLOEXEC together with CLOSE_RANGE_UNSHARE the caller wants to still make use of the file descriptors so the kernel needs to copy all of them and can't optimize. The original patch didn't account for this and thus could cause oopses as evidenced by the syzbot report. Add tests for this regression. We first create a huge gap in the fd table. When we now call CLOSE_RANGE_UNSHARE with a shared fd table and and with ~0U as upper bound the kernel will only copy up to fd1 file descriptors into the new fd table. If the kernel is buggy and doesn't handle CLOSE_RANGE_CLOEXEC correctly it will not have copied all file descriptors and we will oops! This test passes on a fixed kernel and will trigger an oops on a buggy kernel. [1]: https://syzkaller.appspot.com/text?tag=KernelConfig&x=db720fe37a6a41d8 Cc: Giuseppe Scrivano Cc: linux-fsdevel@vger.kernel.org Link: syzbot+96cfd2b22b3213646a93@syzkaller.appspotmail.com Link: https://lore.kernel.org/r/20201218145415.801063-4-christian.brauner@ubuntu.com Signed-off-by: Christian Brauner commit fe325c3ff3188d551668c5847bac58463b9f3437 Author: Christian Brauner Date: Fri Dec 18 15:54:14 2020 +0100 selftests/core: add test for CLOSE_RANGE_UNSHARE | CLOSE_RANGE_CLOEXEC Add a test to verify that CLOSE_RANGE_UNSHARE works correctly when combined with CLOSE_RANGE_CLOEXEC for the single-threaded case. Cc: Giuseppe Scrivano Cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/20201218145415.801063-3-christian.brauner@ubuntu.com Signed-off-by: Christian Brauner commit ae78ba8d3bb66dfe8c0f7b7ec5ffe3f6a13feb86 Author: Christian Brauner Date: Fri Dec 18 15:54:13 2020 +0100 selftests/core: handle missing syscall number for close_range This improves the syscall number handling in the close_range() selftests. This should handle any architecture. Cc: Giuseppe Scrivano Cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/20201218145415.801063-2-christian.brauner@ubuntu.com Signed-off-by: Christian Brauner commit ca202504ea6f04b2e724741100ab63f8f018a8af Author: Tobias Klauser Date: Fri Dec 18 15:54:12 2020 +0100 selftests/core: fix close_range_test build after XFAIL removal XFAIL was removed in commit 9847d24af95c ("selftests/harness: Refactor XFAIL into SKIP") and its use in close_range_test was already replaced by commit 1d44d0dd61b6 ("selftests: core: use SKIP instead of XFAIL in close_range_test.c"). However, commit 23afeaeff3d9 ("selftests: core: add tests for CLOSE_RANGE_CLOEXEC") introduced usage of XFAIL in TEST(close_range_cloexec). Use SKIP there as well. Fixes: 23afeaeff3d9 ("selftests: core: add tests for CLOSE_RANGE_CLOEXEC") Cc: Giuseppe Scrivano Cc: linux-fsdevel@vger.kernel.org Signed-off-by: Tobias Klauser Acked-by: Christian Brauner Link: https://lore.kernel.org/r/20201218112428.13662-1-tklauser@distanz.ch Link: https://lore.kernel.org/r/20201218145415.801063-1-christian.brauner@ubuntu.com Signed-off-by: Christian Brauner commit fec8a6a691033f2538cd46848f17f337f0739923 Author: Christian Brauner Date: Thu Dec 17 22:33:03 2020 +0100 close_range: unshare all fds for CLOSE_RANGE_UNSHARE | CLOSE_RANGE_CLOEXEC After introducing CLOSE_RANGE_CLOEXEC syzbot reported a crash when CLOSE_RANGE_CLOEXEC is specified in conjunction with CLOSE_RANGE_UNSHARE. When CLOSE_RANGE_UNSHARE is specified the caller will receive a private file descriptor table in case their file descriptor table is currently shared. For the case where the caller has requested all file descriptors to be actually closed via e.g. close_range(3, ~0U, 0) the kernel knows that the caller does not need any of the file descriptors anymore and will optimize the close operation by only copying all files in the range from 0 to 3 and no others. However, if the caller requested CLOSE_RANGE_CLOEXEC together with CLOSE_RANGE_UNSHARE the caller wants to still make use of the file descriptors so the kernel needs to copy all of them and can't optimize. The original patch didn't account for this and thus could cause oopses as evidenced by the syzbot report because it assumed that all fds had been copied. Fix this by handling the CLOSE_RANGE_CLOEXEC case. syzbot reported ================================================================== BUG: KASAN: null-ptr-deref in instrument_atomic_read include/linux/instrumented.h:71 [inline] BUG: KASAN: null-ptr-deref in atomic64_read include/asm-generic/atomic-instrumented.h:837 [inline] BUG: KASAN: null-ptr-deref in atomic_long_read include/asm-generic/atomic-long.h:29 [inline] BUG: KASAN: null-ptr-deref in filp_close+0x22/0x170 fs/open.c:1274 Read of size 8 at addr 0000000000000077 by task syz-executor511/8522 CPU: 1 PID: 8522 Comm: syz-executor511 Not tainted 5.10.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:79 [inline] dump_stack+0x107/0x163 lib/dump_stack.c:120 __kasan_report mm/kasan/report.c:549 [inline] kasan_report.cold+0x5/0x37 mm/kasan/report.c:562 check_memory_region_inline mm/kasan/generic.c:186 [inline] check_memory_region+0x13d/0x180 mm/kasan/generic.c:192 instrument_atomic_read include/linux/instrumented.h:71 [inline] atomic64_read include/asm-generic/atomic-instrumented.h:837 [inline] atomic_long_read include/asm-generic/atomic-long.h:29 [inline] filp_close+0x22/0x170 fs/open.c:1274 close_files fs/file.c:402 [inline] put_files_struct fs/file.c:417 [inline] put_files_struct+0x1cc/0x350 fs/file.c:414 exit_files+0x12a/0x170 fs/file.c:435 do_exit+0xb4f/0x2a00 kernel/exit.c:818 do_group_exit+0x125/0x310 kernel/exit.c:920 get_signal+0x428/0x2100 kernel/signal.c:2792 arch_do_signal_or_restart+0x2a8/0x1eb0 arch/x86/kernel/signal.c:811 handle_signal_work kernel/entry/common.c:147 [inline] exit_to_user_mode_loop kernel/entry/common.c:171 [inline] exit_to_user_mode_prepare+0x124/0x200 kernel/entry/common.c:201 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline] syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:302 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x447039 Code: Unable to access opcode bytes at RIP 0x44700f. RSP: 002b:00007f1b1225cdb8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: 0000000000000001 RBX: 00000000006dbc28 RCX: 0000000000447039 RDX: 00000000000f4240 RSI: 0000000000000081 RDI: 00000000006dbc2c RBP: 00000000006dbc20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dbc2c R13: 00007fff223b6bef R14: 00007f1b1225d9c0 R15: 00000000006dbc2c ================================================================== syzbot has tested the proposed patch and the reproducer did not trigger any issue: Reported-and-tested-by: syzbot+96cfd2b22b3213646a93@syzkaller.appspotmail.com Tested on: commit: 10f7cddd selftests/core: add regression test for CLOSE_RAN.. git tree: git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git vfs kernel config: https://syzkaller.appspot.com/x/.config?x=5d42216b510180e3 dashboard link: https://syzkaller.appspot.com/bug?extid=96cfd2b22b3213646a93 compiler: gcc (GCC) 10.1.0-syz 20200507 Reported-by: syzbot+96cfd2b22b3213646a93@syzkaller.appspotmail.com Fixes: 582f1fb6b721 ("fs, close_range: add flag CLOSE_RANGE_CLOEXEC") Cc: Giuseppe Scrivano Cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/20201217213303.722643-1-christian.brauner@ubuntu.com Signed-off-by: Christian Brauner commit dd20166236953c8cd14f4c668bf972af32f0c6be Author: Pavel Begunkov Date: Sat Dec 19 03:15:43 2020 +0000 io_uring: fix 0-iov read buffer select Doing vectored buf-select read with 0 iovec passed is meaningless and utterly broken, forbid it. Cc: # 5.7+ Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 56ce7c25ae1525d83cf80a880cf506ead1914250 Author: Shmulik Ladkani Date: Mon Dec 14 15:38:32 2020 +0200 xfrm: Fix oops in xfrm_replay_advance_bmp When setting xfrm replay_window to values higher than 32, a rare page-fault occurs in xfrm_replay_advance_bmp: BUG: unable to handle page fault for address: ffff8af350ad7920 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD ad001067 P4D ad001067 PUD 0 Oops: 0002 [#1] SMP PTI CPU: 3 PID: 30 Comm: ksoftirqd/3 Kdump: loaded Not tainted 5.4.52-050452-generic #202007160732 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.11.0-2.el7 04/01/2014 RIP: 0010:xfrm_replay_advance_bmp+0xbb/0x130 RSP: 0018:ffffa1304013ba40 EFLAGS: 00010206 RAX: 000000000000010d RBX: 0000000000000002 RCX: 00000000ffffff4b RDX: 0000000000000018 RSI: 00000000004c234c RDI: 00000000ffb3dbff RBP: ffffa1304013ba50 R08: ffff8af330ad7920 R09: 0000000007fffffa R10: 0000000000000800 R11: 0000000000000010 R12: ffff8af29d6258c0 R13: ffff8af28b95c700 R14: 0000000000000000 R15: ffff8af29d6258fc FS: 0000000000000000(0000) GS:ffff8af339ac0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffff8af350ad7920 CR3: 0000000015ee4000 CR4: 00000000001406e0 Call Trace: xfrm_input+0x4e5/0xa10 xfrm4_rcv_encap+0xb5/0xe0 xfrm4_udp_encap_rcv+0x140/0x1c0 Analysis revealed offending code is when accessing: replay_esn->bmp[nr] |= (1U << bitnr); with 'nr' being 0x07fffffa. This happened in an SMP system when reordering of packets was present; A packet arrived with a "too old" sequence number (outside the window, i.e 'diff > replay_window'), and therefore the following calculation: bitnr = replay_esn->replay_window - (diff - pos); yields a negative result, but since bitnr is u32 we get a large unsigned quantity (in crash dump above: 0xffffff4b seen in ecx). This was supposed to be protected by xfrm_input()'s former call to: if (x->repl->check(x, skb, seq)) { However, the state's spinlock x->lock is *released* after '->check()' is performed, and gets re-acquired before '->advance()' - which gives a chance for a different core to update the xfrm state, e.g. by advancing 'replay_esn->seq' when it encounters more packets - leading to a 'diff > replay_window' situation when original core continues to xfrm_replay_advance_bmp(). An attempt to fix this issue was suggested in commit bcf66bf54aab ("xfrm: Perform a replay check after return from async codepaths"), by calling 'x->repl->recheck()' after lock is re-acquired, but fix applied only to asyncronous crypto algorithms. Augment the fix, by *always* calling 'recheck()' - irrespective if we're using async crypto. Fixes: 0ebea8ef3559 ("[IPSEC]: Move state lock into x->type->input") Signed-off-by: Shmulik Ladkani Signed-off-by: Steffen Klassert commit 6190c0ccaf5dfee845df9c9cd8ad9fdc5856bb41 Author: Jason Andryuk Date: Wed Dec 16 09:08:38 2020 -0500 xen: Kconfig: remove X86_64 depends from XEN_512GB commit bfda93aee0ec ("xen: Kconfig: nest Xen guest options") accidentally re-added X86_64 as a dependency to XEN_512GB. It was originally removed in commit a13f2ef168cb ("x86/xen: remove 32-bit Xen PV guest support"). Remove it again. Fixes: bfda93aee0ec ("xen: Kconfig: nest Xen guest options") Reported-by: Boris Ostrovsky Signed-off-by: Jason Andryuk Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20201216140838.16085-1-jandryuk@gmail.com Signed-off-by: Juergen Gross commit 9541b81322e60120b299222919957becd7a13683 Author: Boris Protopopov Date: Thu Dec 17 20:58:08 2020 +0000 Add SMB 2 support for getting and setting SACLs Fix passing of the additional security info via version operations. Force new open when getting SACL and avoid reuse of files that were previously open without sufficient privileges to access SACLs. Signed-off-by: Boris Protopopov Reviewed-by: Shyam Prasad N Signed-off-by: Steve French commit 1e72faedcd58afd9d67fad40500cb4d1837f4361 Merge: 698285da79f5b 5c8193f568ae1 Author: Jakub Kicinski Date: Fri Dec 18 18:07:13 2020 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net 1) Incorrect loop in error path of nft_set_elem_expr_clone(), from Colin Ian King. 2) Missing xt_table_get_private_protected() to access table private data in x_tables, from Subash Abhinov Kasiviswanathan. 3) Possible oops in ipset hash type resize, from Vasily Averin. 4) Fix shift-out-of-bounds in ipset hash type, also from Vasily. * git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf: netfilter: ipset: fix shift-out-of-bounds in htable_bits() netfilter: ipset: fixes possible oops in mtype_resize netfilter: x_tables: Update remaining dereference to RCU netfilter: nftables: fix incorrect increment of loop counter ==================== Link: https://lore.kernel.org/r/20201218120409.3659-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski commit 71ac13457d9d1007effde65b54818106b2c2b525 Author: Uwe Kleine-König Date: Fri Dec 18 11:10:54 2020 +0100 rtc: pcf2127: only use watchdog when explicitly available Most boards using the pcf2127 chip (in my bubble) don't make use of the watchdog functionality and the respective output is not connected. The effect on such a board is that there is a watchdog device provided that doesn't work. So only register the watchdog if the device tree has a "reset-source" property. Signed-off-by: Uwe Kleine-König [RV: s/has-watchdog/reset-source/] Signed-off-by: Rasmus Villemoes Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201218101054.25416-3-rasmus.villemoes@prevas.dk commit 320d159e2d63a97a40f24cd6dfda5a57eec65b91 Author: Rasmus Villemoes Date: Fri Dec 18 11:10:53 2020 +0100 dt-bindings: rtc: add reset-source property Some RTCs, e.g. the pcf2127, can be used as a hardware watchdog. But if the reset pin is not actually wired up, the driver exposes a watchdog device that doesn't actually work. Provide a standard binding that can be used to indicate that a given RTC can perform a reset of the machine, similar to wakeup-source. Suggested-by: Alexandre Belloni Signed-off-by: Rasmus Villemoes Reviewed-by: Rob Herring Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201218101054.25416-2-rasmus.villemoes@prevas.dk commit 698285da79f5b0b099db15a37ac661ac408c80eb Author: Davide Caratti Date: Thu Dec 17 22:29:46 2020 +0100 net/sched: sch_taprio: ensure to reset/destroy all child qdiscs taprio_graft() can insert a NULL element in the array of child qdiscs. As a consquence, taprio_reset() might not reset child qdiscs completely, and taprio_destroy() might leak resources. Fix it by ensuring that loops that iterate over q->qdiscs[] don't end when they find the first NULL item. Fixes: 44d4775ca518 ("net/sched: sch_taprio: reset child qdiscs before freeing them") Fixes: 5a781ccbd19e ("tc: Add support for configuring the taprio scheduler") Suggested-by: Jakub Kicinski Signed-off-by: Davide Caratti Link: https://lore.kernel.org/r/13edef6778fef03adc751582562fba4a13e06d6a.1608240532.git.dcaratti@redhat.com Signed-off-by: Jakub Kicinski commit b27f0c7825e3774e9ba036b25ed4dd62aec4c4c9 Merge: abdcd06c4dedb f1340265726e0 Author: Jakub Kicinski Date: Fri Dec 18 16:39:55 2020 -0800 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2020-12-17 Sylwester fixes an issue where PF was not properly being rebuilt following VF removal for i40e. Jakub Kicinski fixes a double release of rtnl_lock on iavf_lan_add_device() error for iavf. * '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: iavf: fix double-release of rtnl_lock i40e: Fix Error I40E_AQ_RC_EINVAL when removing VFs ==================== Link: https://lore.kernel.org/r/20201217223418.3134992-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit f6f5cd840ae782680c5e94048c72420e4e6857f9 Author: Colin Ian King Date: Thu Dec 17 17:17:05 2020 +0000 timekeeping: Fix spelling mistake in Kconfig "fullfill" -> "fulfill" There is a spelling mistake in the Kconfig help text. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Thomas Gleixner Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20201217171705.57586-1-colin.king@canonical.com commit 3644e2d2dda78e21edd8f5415b6d7ab03f5f54f3 Author: Kent Overstreet Date: Fri Dec 18 04:07:11 2020 -0500 mm/filemap: fix infinite loop in generic_file_buffered_read() If iter->count is 0 and iocb->ki_pos is page aligned, this causes nr_pages to be 0. Then in generic_file_buffered_read_get_pages() find_get_pages_contig() returns 0 - because we asked for 0 pages, so we call generic_file_buffered_read_no_cached_page() which attempts to add a page to the page cache, which fails with -EEXIST, and then we loop. Oops... Signed-off-by: Kent Overstreet Reported-by: Jens Axboe Reviewed-by: Jens Axboe Signed-off-by: Linus Torvalds commit 21df8683b85611c8267fdf87ebb7b4056b88ad3a Author: Paul Cercueil Date: Thu Dec 17 00:59:45 2020 +0000 dt-bindings/display: abt,y030xx067a: Fix binding The binding should use "unevaluatedProperties" instead of "additionalProperties", since it is a SPI device and may have SPI-related Device Tree properties, for instance the "spi-max-frequency" property that is present in the example. Fixes: e366a644c69d ("dt-bindings: display: Add ABT Y030XX067A panel bindings") Signed-off-by: Paul Cercueil Reviewed-by: Sam Ravnborg Link: https://lore.kernel.org/r/20201217005945.335111-1-paul%40crapouillou.net Signed-off-by: Rob Herring commit 246e18ba725c3b39d9d45b91fd93ce67e772fef4 Author: Zhen Lei Date: Mon Dec 7 12:55:27 2020 +0800 dt-bindings: clock: imx8qxp-lpcg: eliminate yamllint warnings Eliminate the following yamllint warnings: ./Documentation/devicetree/bindings/clock/imx8qxp-lpcg.yaml :32:13:[warning] wrong indentation: expected 14 but found 12 (indentation) :35:9: [warning] wrong indentation: expected 10 but found 8 (indentation) Signed-off-by: Zhen Lei Reviewed-by: Rob Herring Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20201207045527.1607-2-thunder.leizhen@huawei.com Signed-off-by: Rob Herring commit aeefc1a01e7c3905580a981e93032cd452275c99 Author: Zhen Lei Date: Mon Dec 7 12:48:30 2020 +0800 dt-bindings: display: eliminate yamllint warnings Eliminate the following yamllint warnings: ./Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml :52:9: [warning] wrong indentation: expected 6 but found 8 (indentation) ./Documentation/devicetree/bindings/display/bridge/intel,keembay-dsi.yaml :42:8: [warning] wrong indentation: expected 8 but found 7 (indentation) :45:8: [warning] wrong indentation: expected 8 but found 7 (indentation) ./Documentation/devicetree/bindings/display/intel,keembay-msscam.yaml :21:6: [warning] wrong indentation: expected 6 but found 5 (indentation) ./Documentation/devicetree/bindings/display/panel/novatek,nt36672a.yaml :25:10: [warning] wrong indentation: expected 10 but found 9 (indentation) Signed-off-by: Zhen Lei Acked-by: Sam Ravnborg Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201207044830.1551-2-thunder.leizhen@huawei.com Signed-off-by: Rob Herring commit c4b8c562a75f568026038c001cfa7737dac272da Author: Zhen Lei Date: Mon Dec 7 12:23:58 2020 +0800 dt-bindings: media: nokia,smia: eliminate yamllint warnings Eliminate the following yamllint warnings: ./Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml :4:1: [error] missing document start "---" (document-start) :29:9: [warning] wrong indentation: expected 10 but found 8 (indentation) :32:9: [warning] wrong indentation: expected 10 but found 8 (indentation) Signed-off-by: Zhen Lei Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201207042400.1498-3-thunder.leizhen@huawei.com Signed-off-by: Rob Herring commit d73982be2b00bbe76b53433cc56a1cd9555b9091 Author: Zhen Lei Date: Fri Dec 4 17:38:12 2020 +0800 dt-bindings: devapc: add the required property 'additionalProperties' When I do dt_binding_check for any YAML file, below wanring is always reported: xxx/soc/mediatek/devapc.yaml: 'additionalProperties' is a required property xxx/soc/mediatek/devapc.yaml: ignoring, error in schema: warning: no schema found in file: xxx/soc/mediatek/devapc.yaml Signed-off-by: Zhen Lei Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201204093813.1275-5-thunder.leizhen@huawei.com Signed-off-by: Rob Herring commit c8f054f10507dc133c9aa51f478dabe772f16288 Author: Zhen Lei Date: Fri Dec 4 17:38:11 2020 +0800 dt-bindings: soc: add the required property 'additionalProperties' When I do dt_binding_check for any YAML file, below wanring is always reported: xxx/soc/litex/litex,soc-controller.yaml: 'additionalProperties' is a required property xxx/soc/litex/litex,soc-controller.yaml: ignoring, error in schema: warning: no schema found in file: xxx/soc/litex/litex,soc-controller.yaml Signed-off-by: Zhen Lei Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201204093813.1275-4-thunder.leizhen@huawei.com Signed-off-by: Rob Herring commit c1efde3f9780ad337df1cc393f6471ac8e24f50f Author: Zhen Lei Date: Fri Dec 4 17:38:10 2020 +0800 dt-bindings: serial: add the required property 'additionalProperties' When I do dt_binding_check for any YAML file, below wanring is always reported: xxx/serial/litex,liteuart.yaml: 'additionalProperties' is a required property xxx/serial/litex,liteuart.yaml: ignoring, error in schema: warning: no schema found in file: xxx/serial/litex,liteuart.yaml Signed-off-by: Zhen Lei Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201204093813.1275-3-thunder.leizhen@huawei.com Signed-off-by: Rob Herring commit 64a21a18f55ebafc9e805787770df4e0518db887 Author: Michael Tretter Date: Wed Dec 2 10:05:22 2020 +0100 dt-bindings: xlnx,vcu-settings: fix dt_binding_check warnings When running make dt_binding_check, the xlnx,vcu-settings binding triggers the following two warnings: 'additionalProperties' is a required property example-0: vcu@a0041000:reg:0: [0, 2684620800, 0, 4096] is too long Fix the binding and make the checker happy. Signed-off-by: Michael Tretter Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201202090522.251607-1-m.tretter@pengutronix.de Signed-off-by: Rob Herring commit 479a41748fdd8aa3eb933b0fac554fb2b7931334 Author: Rob Herring Date: Tue Nov 17 14:07:52 2020 -0600 media: dt-bindings: coda: Add missing 'additionalProperties' 'additionalProperties' is now required by the meta-schema. Add it for coda. As a result, 'interrupts', 'interrupt-names' and 'power-domains' need to be reworked to be defined at the top level. Cc: Philipp Zabel Cc: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org Signed-off-by: Rob Herring Reviewed-by: Philipp Zabel Link: https://lore.kernel.org/r/20201117200752.4004368-1-robh@kernel.org Signed-off-by: Rob Herring commit d69c6ddd019f31081cc0232fa8ad8ea1cabdf22c Author: Rob Herring Date: Thu Dec 17 16:34:29 2020 -0600 dt-bindings: Fix JSON pointers The correct syntax for JSON pointers begins with a '/' after the '#'. Without a '/', the string should be interpreted as a subschema identifier. The jsonschema module currently doesn't handle subschema identifiers and incorrectly allows JSON pointers to begin without a '/'. Let's fix this before it becomes a problem when jsonschema module is fixed. Converted with: perl -p -i -e 's/yaml#definitions/yaml#\/definitions/g' `find Documentation/devicetree/bindings/ -name "*.yaml"` Cc: Maxime Ripard Cc: Jonathan Cameron Cc: Lars-Peter Clausen Cc: Daniel Thompson Cc: Jingoo Han Cc: Pavel Machek Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Andrew Lunn Cc: Florian Fainelli Cc: Greg Kroah-Hartman Cc: Mark Brown Cc: netdev@vger.kernel.org Acked-By: Vinod Koul Acked-by: Lee Jones Acked-by: Guenter Roeck Acked-by: Sebastian Reichel Acked-by: Florian Fainelli Acked-by: Mark Brown Acked-by: Jakub Kicinski Link: https://lore.kernel.org/r/20201217223429.354283-1-robh@kernel.org Signed-off-by: Rob Herring commit 418eddef050d5f6393c303a94e3173847ab85466 Author: Parav Pandit Date: Thu Nov 12 08:40:00 2020 +0200 vdpa: Use simpler version of ida allocation vdpa doesn't have any specific need to define start and end range of the device index. Hence use the simper version of the ida allocator. Signed-off-by: Parav Pandit Reviewed-by: Eli Cohen Acked-by: Jason Wang Link: https://lore.kernel.org/r/20201112064005.349268-3-parav@nvidia.com Signed-off-by: Michael S. Tsirkin commit 476c135e321716ad7a8a5d4a19a636e2dcc50526 Author: Parav Pandit Date: Thu Nov 12 08:39:59 2020 +0200 vdpa: Add missing comment for virtqueue count Add missing comment for number of virtqueue. Signed-off-by: Parav Pandit Reviewed-by: Eli Cohen Acked-by: Jason Wang Link: https://lore.kernel.org/r/20201112064005.349268-2-parav@nvidia.com Signed-off-by: Michael S. Tsirkin commit be618636de4186521ffba2cbe5105e9c3481b9cb Author: Enrico Weigelt, metux IT consult Date: Wed Dec 2 12:19:31 2020 +0100 uapi: virtio_ids: add missing device type IDs from OASIS spec The OASIS virtio spec (1.1) defines several IDs that aren't reflected in the header yet. Fixing this by adding the missing IDs, even though they're not yet used by the kernel yet. Signed-off-by: Enrico Weigelt, metux IT consult Link: https://lore.kernel.org/r/20201202111931.31953-2-info@metux.net Signed-off-by: Michael S. Tsirkin commit 1e38f0031c3055c9c7e5ffcb3bb09c95f69614ee Author: Enrico Weigelt, metux IT consult Date: Wed Dec 2 12:19:30 2020 +0100 uapi: virtio_ids.h: consistent indentions Fixing the differing indentions to be consistent and properly aligned. Signed-off-by: Enrico Weigelt, metux IT consult Link: https://lore.kernel.org/r/20201202111931.31953-1-info@metux.net Signed-off-by: Michael S. Tsirkin commit 2e1139d613c7fb0956e82f72a8281c0a475ad4f8 Author: Zhang Changzhong Date: Fri Dec 4 16:43:30 2020 +0800 vhost scsi: fix error return code in vhost_scsi_set_endpoint() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 25b98b64e284 ("vhost scsi: alloc cmds per vq instead of session") Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Link: https://lore.kernel.org/r/1607071411-33484-1-git-send-email-zhangchangzhong@huawei.com Signed-off-by: Michael S. Tsirkin commit e152d8af4220a05c9797591609151d404866beaa Author: Dan Carpenter Date: Fri Dec 4 17:23:36 2020 +0300 virtio_ring: Fix two use after free bugs The "vq" struct is added to the "vdev->vqs" list prematurely. If we encounter an error later in the function then the "vq" is freed, but since it is still on the list that could lead to a use after free bug. Fixes: cbeedb72b97a ("virtio_ring: allocate desc state for split ring separately") Reported-by: Robert Buhren Reported-by: Felicitas Hetzelt Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/X8pGaG/zkI3jk8mk@mwanda Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit 411ea23a76526e6efed0b601abb603d3c981b333 Author: Dan Carpenter Date: Fri Dec 4 17:23:16 2020 +0300 virtio_net: Fix error code in probe() Set a negative error code intead of returning success if the MTU has been changed to something invalid. Fixes: fe36cbe0671e ("virtio_net: clear MTU when out of range") Reported-by: Robert Buhren Reported-by: Felicitas Hetzelt Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/X8pGVJSeeCdII1Ys@mwanda Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit ae93d8ea0fa701e84ab9df0db9fb60ec6c80d7b8 Author: Dan Carpenter Date: Fri Dec 4 17:23:00 2020 +0300 virtio_ring: Cut and paste bugs in vring_create_virtqueue_packed() There is a copy and paste bug in the error handling of this code and it uses "ring_dma_addr" three times instead of "device_event_dma_addr" and "driver_event_dma_addr". Fixes: 1ce9e6055fa0 (" virtio_ring: introduce packed ring support") Reported-by: Robert Buhren Reported-by: Felicitas Hetzelt Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/X8pGRJlEzyn+04u2@mwanda Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit 1a5514cbb09aaf694d26ef26fd6da5c5d495cc22 Author: Peng Fan Date: Wed Dec 9 16:42:05 2020 +0800 tools/virtio: add barrier for aarch64 Add barrier for aarch64 for cross compiling, and most are from Linux Kernel. Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20201209084205.24062-4-peng.fan@oss.nxp.com Signed-off-by: Michael S. Tsirkin commit b9ca93bcd186ec4144df91c619f6084cdad500ec Author: Peng Fan Date: Wed Dec 9 16:42:04 2020 +0800 tools/virtio: add krealloc_array krealloc_array is used in drivers/vhost/vringh.c, add it to avoid build failure. Drop WARN_ON_ONCE, because duplicated with the one in bug.h Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20201209084205.24062-3-peng.fan@oss.nxp.com Signed-off-by: Michael S. Tsirkin commit 697d1549140cdcdc4cfcd0bf94e62643008972b7 Author: Peng Fan Date: Wed Dec 9 16:42:03 2020 +0800 tools/virtio: include asm/bug.h WARN_ON is used in drivers/vhost/vringh.c, to avoid build failure, need include asm/bug.h Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20201209084205.24062-2-peng.fan@oss.nxp.com Signed-off-by: Michael S. Tsirkin commit 83ef73b27eb2363f44faf9c3ee28a3fe752cfd15 Author: Eli Cohen Date: Wed Dec 9 16:00:04 2020 +0200 vdpa/mlx5: Use write memory barrier after updating CQ index Make sure to put dma write memory barrier after updating CQ consumer index so the hardware knows that there are available CQE slots in the queue. Failure to do this can cause the update of the RX doorbell record to get updated before the CQ consumer index resulting in CQ overrun. Fixes: 1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices") Signed-off-by: Eli Cohen Link: https://lore.kernel.org/r/20201209140004.15892-1-elic@nvidia.com Signed-off-by: Michael S. Tsirkin commit db1e8bb6c63a77b74b0c6b49662fc50d49d5f90b Author: Max Gurtovoy Date: Tue Dec 15 15:42:56 2020 +0100 vdpa: split vdpasim to core and net modules Introduce new vdpa_sim_net and vdpa_sim (core) drivers. This is a preparation for adding a vdpa simulator module for block devices. Signed-off-by: Max Gurtovoy [sgarzare: various cleanups/fixes] Acked-by: Jason Wang Signed-off-by: Stefano Garzarella Link: https://lore.kernel.org/r/20201215144256.155342-19-sgarzare@redhat.com Signed-off-by: Michael S. Tsirkin commit 275900dfa17c32f0f52b460e1fbd769cf694ecd3 Author: Stefano Garzarella Date: Tue Dec 15 15:42:55 2020 +0100 vdpa_sim: split vdpasim_virtqueue's iov field in out_iov and in_iov vringh_getdesc_iotlb() manages 2 iovs for writable and readable descriptors. This is very useful for the block device, where for each request we have both types of descriptor. Let's split the vdpasim_virtqueue's iov field in out_iov and in_iov to use them with vringh_getdesc_iotlb(). We are using VIRTIO terminology for "out" (readable by the device) and "in" (writable by the device) descriptors. Acked-by: Jason Wang Signed-off-by: Stefano Garzarella Link: https://lore.kernel.org/r/20201215144256.155342-18-sgarzare@redhat.com Signed-off-by: Michael S. Tsirkin commit da7af6967c6e9815f8da60a8db1d0fe35b8e97b9 Author: Stefano Garzarella Date: Tue Dec 15 15:42:54 2020 +0100 vdpa_sim: make vdpasim->buffer size configurable Allow each device to specify the size of the buffer allocated in vdpa_sim. Acked-by: Jason Wang Signed-off-by: Stefano Garzarella Link: https://lore.kernel.org/r/20201215144256.155342-17-sgarzare@redhat.com Signed-off-by: Michael S. Tsirkin commit 165be1f80b8807687f7426d3f36f1031d633e979 Author: Stefano Garzarella Date: Tue Dec 15 15:42:53 2020 +0100 vdpa_sim: use kvmalloc to allocate vdpasim->buffer The next patch will make the buffer size configurable from each device. Since the buffer could be larger than a page, we use kvmalloc() instead of kmalloc(). Acked-by: Jason Wang Signed-off-by: Stefano Garzarella Link: https://lore.kernel.org/r/20201215144256.155342-16-sgarzare@redhat.com Signed-off-by: Michael S. Tsirkin commit b240491b7a48028fb67e5377ffd1be21e9260c4e Author: Stefano Garzarella Date: Tue Dec 15 15:42:52 2020 +0100 vdpa_sim: set vringh notify callback Instead of calling the vq callback directly, we can leverage the vringh_notify() function, adding vdpasim_vq_notify() and setting it in the vringh notify callback. Suggested-by: Jason Wang Acked-by: Jason Wang Signed-off-by: Stefano Garzarella Link: https://lore.kernel.org/r/20201215144256.155342-15-sgarzare@redhat.com Signed-off-by: Michael S. Tsirkin commit c124a95e304bc5d37144e2fff6e52bb904d41810 Author: Stefano Garzarella Date: Tue Dec 15 15:42:51 2020 +0100 vdpa_sim: add set_config callback in vdpasim_dev_attr The set_config callback can be used by the device to parse the config structure modified by the driver. The callback will be invoked, if set, in vdpasim_set_config() after copying bytes from caller buffer into vdpasim->config buffer. Acked-by: Jason Wang Signed-off-by: Stefano Garzarella Link: https://lore.kernel.org/r/20201215144256.155342-14-sgarzare@redhat.com Signed-off-by: Michael S. Tsirkin commit 65b709586e222fa6ffd4166ac7fdb5d5dad113ee Author: Stefano Garzarella Date: Tue Dec 15 15:42:50 2020 +0100 vdpa_sim: add get_config callback in vdpasim_dev_attr The get_config callback can be used by the device to fill the config structure. The callback will be invoked in vdpasim_get_config() before copying bytes into caller buffer. Move vDPA-net config updates from vdpasim_set_features() in the new vdpasim_net_get_config() callback. This is safe since in vdpa_get_config() we already check that .set_features() callback is called before .get_config(). Signed-off-by: Stefano Garzarella Link: https://lore.kernel.org/r/20201215144256.155342-13-sgarzare@redhat.com Signed-off-by: Michael S. Tsirkin commit f37cbbc65178e0a45823d281d290c4c02da9631c Author: Stefano Garzarella Date: Tue Dec 15 15:42:49 2020 +0100 vdpa_sim: make 'config' generic and usable for any device type Add new 'config_size' attribute in 'vdpasim_dev_attr' and allocates 'config' dynamically to support any device types. Acked-by: Jason Wang Signed-off-by: Stefano Garzarella Link: https://lore.kernel.org/r/20201215144256.155342-12-sgarzare@redhat.com Signed-off-by: Michael S. Tsirkin commit cf1a3b35382c10ce315c32bd2b3d7789897fbe13 Author: Stefano Garzarella Date: Tue Dec 15 15:42:48 2020 +0100 vdpa_sim: store parsed MAC address in a buffer As preparation for the next patches, we store the MAC address, parsed during the vdpasim_create(), in a buffer that will be used to fill 'config' together with other configurations. Acked-by: Jason Wang Signed-off-by: Stefano Garzarella Link: https://lore.kernel.org/r/20201215144256.155342-11-sgarzare@redhat.com Signed-off-by: Michael S. Tsirkin commit a13b5918fdd0dd7987aa5f3c202f68ed6ad468bb Author: Stefano Garzarella Date: Tue Dec 15 15:42:47 2020 +0100 vdpa_sim: add work_fn in vdpasim_dev_attr Rename vdpasim_work() in vdpasim_net_work() and add it to the vdpasim_dev_attr structure. Co-developed-by: Max Gurtovoy Signed-off-by: Max Gurtovoy Acked-by: Jason Wang Signed-off-by: Stefano Garzarella Link: https://lore.kernel.org/r/20201215144256.155342-10-sgarzare@redhat.com Signed-off-by: Michael S. Tsirkin commit 011c35bac5ef25f701d9a79bc731782889c0ff58 Author: Stefano Garzarella Date: Tue Dec 15 15:42:46 2020 +0100 vdpa_sim: add supported_features field in vdpasim_dev_attr Introduce a new VDPASIM_FEATURES macro with the generic features supported by the vDPA simulator, and VDPASIM_NET_FEATURES macro with vDPA-net features. Add 'supported_features' field in vdpasim_dev_attr, to allow devices to specify their features. Co-developed-by: Max Gurtovoy Signed-off-by: Max Gurtovoy Acked-by: Jason Wang Signed-off-by: Stefano Garzarella Link: https://lore.kernel.org/r/20201215144256.155342-9-sgarzare@redhat.com Signed-off-by: Michael S. Tsirkin commit 2f8f461888052f1b92ebe6419514355538f7cd68 Author: Stefano Garzarella Date: Tue Dec 15 15:42:45 2020 +0100 vdpa_sim: add device id field in vdpasim_dev_attr Remove VDPASIM_DEVICE_ID macro and add 'id' field in vdpasim_dev_attr, that will be returned by vdpasim_get_device_id(). Use VIRTIO_ID_NET for vDPA-net simulator device id. Co-developed-by: Max Gurtovoy Signed-off-by: Max Gurtovoy Acked-by: Jason Wang Signed-off-by: Stefano Garzarella Link: https://lore.kernel.org/r/20201215144256.155342-8-sgarzare@redhat.com Signed-off-by: Michael S. Tsirkin commit 6c6e28fe45794054410ad8cd2770af69fbe0338d Author: Stefano Garzarella Date: Tue Dec 15 15:42:44 2020 +0100 vdpa_sim: add struct vdpasim_dev_attr for device attributes vdpasim_dev_attr will contain device specific attributes. We starting moving the number of virtqueues (i.e. nvqs) to vdpasim_dev_attr. vdpasim_create() creates a new vDPA simulator following the device attributes defined in the vdpasim_dev_attr parameter. Co-developed-by: Max Gurtovoy Signed-off-by: Max Gurtovoy Acked-by: Jason Wang Signed-off-by: Stefano Garzarella Link: https://lore.kernel.org/r/20201215144256.155342-7-sgarzare@redhat.com Signed-off-by: Michael S. Tsirkin commit 36a9c30630256629e62a9186793c28735ade3ffc Author: Stefano Garzarella Date: Tue Dec 15 15:42:43 2020 +0100 vdpa_sim: rename vdpasim_config_ops variables These variables store generic callbacks used by the vDPA simulator core, so we can remove the 'net' word in their names. Co-developed-by: Max Gurtovoy Signed-off-by: Max Gurtovoy Acked-by: Jason Wang Signed-off-by: Stefano Garzarella Link: https://lore.kernel.org/r/20201215144256.155342-6-sgarzare@redhat.com Signed-off-by: Michael S. Tsirkin commit 2fc0ebfa039025d88009e8f275ea8bcd177a9cd9 Author: Stefano Garzarella Date: Tue Dec 15 15:42:42 2020 +0100 vdpa_sim: make IOTLB entries limit configurable Some devices may require a higher limit for the number of IOTLB entries, so let's make it configurable through a module parameter. By default, it's initialized with the current limit (2048). Suggested-by: Jason Wang Signed-off-by: Stefano Garzarella Link: https://lore.kernel.org/r/20201215144256.155342-5-sgarzare@redhat.com Signed-off-by: Michael S. Tsirkin commit 423248d60d2b655321fc49eca1545f95a1bc9d6c Author: Max Gurtovoy Date: Tue Dec 15 15:42:41 2020 +0100 vdpa_sim: remove hard-coded virtq count Add a new attribute that will define the number of virt queues to be created for the vdpasim device. Signed-off-by: Max Gurtovoy [sgarzare: replace kmalloc_array() with kcalloc()] Acked-by: Jason Wang Signed-off-by: Stefano Garzarella Link: https://lore.kernel.org/r/20201215144256.155342-4-sgarzare@redhat.com Signed-off-by: Michael S. Tsirkin commit cc3d42386d14176e392d61da1de05c1d87c18b93 Author: Stefano Garzarella Date: Tue Dec 15 15:42:40 2020 +0100 vdpa_sim: remove unnecessary headers inclusion Some headers are not necessary, so let's remove them to do some cleaning. Signed-off-by: Stefano Garzarella Link: https://lore.kernel.org/r/20201215144256.155342-3-sgarzare@redhat.com Signed-off-by: Michael S. Tsirkin commit 29b90f92ee64f4cae2d8ef83922286567da6c2c1 Author: Stefano Garzarella Date: Tue Dec 15 15:42:39 2020 +0100 vdpa: remove unnecessary 'default n' in Kconfig entries 'default n' is not necessary since it is already the default when nothing is specified. Suggested-by: Jason Wang Acked-by: Jason Wang Signed-off-by: Stefano Garzarella Link: https://lore.kernel.org/r/20201215144256.155342-2-sgarzare@redhat.com Signed-off-by: Michael S. Tsirkin commit 4d10367fd411437d55850357e471d9d5f9f47e72 Author: Christophe JAILLET Date: Sun Nov 29 13:54:34 2020 +0100 vdpa: ifcvf: Use dma_set_mask_and_coherent to simplify code 'pci_set_dma_mask()' + 'pci_set_consistent_dma_mask()' can be replaced by an equivalent 'dma_set_mask_and_coherent()' which is much less verbose. While at it, fix a typo (s/confiugration/configuration) Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/20201129125434.1462638-1-christophe.jaillet@wanadoo.fr Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit 0ab4b8901a8edda4fd1c2aded36192566d89353f Author: Tian Tao Date: Wed Nov 11 09:14:48 2020 +0800 vhost_vdpa: switch to vmemdup_user() Replace opencoded alloc and copy with vmemdup_user() Signed-off-by: Tian Tao Link: https://lore.kernel.org/r/1605057288-60400-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefano Garzarella commit 3711387a7543f2716e52ce5a5d92e3d580423a40 Author: David Hildenbrand Date: Thu Nov 12 14:38:15 2020 +0100 virtio-mem: Big Block Mode (BBM) - safe memory hotunplug Let's add a safe mechanism to unplug memory, avoiding long/endless loops when trying to offline memory - similar to in SBM. Fake-offline all memory (via alloc_contig_range()) before trying to offline+remove it. Use this mode as default, but allow to enable the other mode explicitly (which could give better memory hotunplug guarantees in some environments). The "unsafe" mode can be enabled e.g., via virtio_mem.bbm_safe_unplug=0 on the cmdline. Reviewed-by: Wei Yang Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Pankaj Gupta Cc: Michal Hocko Cc: Oscar Salvador Cc: Wei Yang Cc: Andrew Morton Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20201112133815.13332-30-david@redhat.com Signed-off-by: Michael S. Tsirkin commit 269ac9389db4854f7b05c4749ff051763e7578d3 Author: David Hildenbrand Date: Thu Nov 12 14:38:14 2020 +0100 virtio-mem: Big Block Mode (BBM) - basic memory hotunplug Let's try to unplug completely offline big blocks first. Then, (if enabled via unplug_offline) try to offline and remove whole big blocks. No locking necessary - we can deal with concurrent onlining/offlining just fine. Note1: This is sub-optimal and might be dangerous in some environments: we could end up in an infinite loop when offlining (e.g., long-term pinnings), similar as with DIMMs. We'll introduce safe memory hotunplug via fake-offlining next, and use this basic mode only when explicitly enabled. Note2: Without ZONE_MOVABLE, memory unplug will be extremely unreliable with bigger block sizes. Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Pankaj Gupta Cc: Michal Hocko Cc: Oscar Salvador Cc: Wei Yang Cc: Andrew Morton Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20201112133815.13332-29-david@redhat.com Signed-off-by: Michael S. Tsirkin commit 8dc4bb58a146655eb057247d7c9d19e73928715b Author: David Hildenbrand Date: Thu Nov 12 14:38:13 2020 +0100 mm/memory_hotplug: extend offline_and_remove_memory() to handle more than one memory block virtio-mem soon wants to use offline_and_remove_memory() memory that exceeds a single Linux memory block (memory_block_size_bytes()). Let's remove that restriction. Let's remember the old state and try to restore that if anything goes wrong. While re-onlining can, in general, fail, it's highly unlikely to happen (usually only when a notifier fails to allocate memory, and these are rather rare). This will be used by virtio-mem to offline+remove memory ranges that are bigger than a single memory block - for example, with a device block size of 1 GiB (e.g., gigantic pages in the hypervisor) and a Linux memory block size of 128MB. While we could compress the state into 2 bit, using 8 bit is much easier. This handling is similar, but different to acpi_scan_try_to_offline(): a) We don't try to offline twice. I am not sure if this CONFIG_MEMCG optimization is still relevant - it should only apply to ZONE_NORMAL (where we have no guarantees). If relevant, we can always add it. b) acpi_scan_try_to_offline() simply onlines all memory in case something goes wrong. It doesn't restore previous online type. Let's do that, so we won't overwrite what e.g., user space configured. Reviewed-by: Wei Yang Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Pankaj Gupta Cc: Michal Hocko Cc: Oscar Salvador Cc: Wei Yang Cc: Andrew Morton Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20201112133815.13332-28-david@redhat.com Signed-off-by: Michael S. Tsirkin Acked-by: Andrew Morton commit faa45ff4ce885af93a3233a408c5a74b2943226b Author: David Hildenbrand Date: Thu Nov 12 14:38:12 2020 +0100 virtio-mem: allow to force Big Block Mode (BBM) and set the big block size Let's allow to force BBM, even if subblocks would be possible. Take care of properly calculating the first big block id, because the start address might no longer be aligned to the big block size. Also, allow to manually configure the size of Big Blocks. Reviewed-by: Wei Yang Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Pankaj Gupta Cc: Michal Hocko Cc: Oscar Salvador Cc: Wei Yang Cc: Andrew Morton Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20201112133815.13332-27-david@redhat.com Signed-off-by: Michael S. Tsirkin commit 4ba50cd3355d742c8befbfe38dcbe559f2b0f758 Author: David Hildenbrand Date: Thu Nov 12 14:38:11 2020 +0100 virtio-mem: Big Block Mode (BBM) memory hotplug Currently, we do not support device block sizes that exceed the Linux memory block size. For example, having a device block size of 1 GiB (e.g., gigantic pages in the hypervisor) won't work with 128 MiB Linux memory blocks. Let's implement Big Block Mode (BBM), whereby we add/remove at least one Linux memory block at a time. With a 1 GiB device block size, a Big Block (BB) will cover 8 Linux memory blocks. We'll keep registering the online_page_callback machinery, it will be used for safe memory hotunplug in BBM next. Note: BBM is properly prepared for variable-sized Linux memory blocks that we might see in the future. So we won't care how many Linux memory blocks a big block actually spans, and how the memory notifier is called. Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Pankaj Gupta Cc: Michal Hocko Cc: Oscar Salvador Cc: Wei Yang Cc: Andrew Morton Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20201112133815.13332-26-david@redhat.com Signed-off-by: Michael S. Tsirkin commit 01afdee29aef144ad956d1d5302aaaeabf498f48 Author: David Hildenbrand Date: Thu Nov 12 14:38:10 2020 +0100 virtio-mem: factor out adding/removing memory from Linux Let's use wrappers for the low-level functions that dev_dbg/dev_warn and work on addr + size, such that we can reuse them for adding/removing in other granularity. We only warn when adding memory failed, because that's something to pay attention to. We won't warn when removing failed, we'll reuse that in racy context soon (and we do have proper BUG_ON() statements in the current cases where it must never happen). Reviewed-by: Wei Yang Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Pankaj Gupta Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20201112133815.13332-25-david@redhat.com Signed-off-by: Michael S. Tsirkin commit d46dfb62f676f949352c7fd8b7a0fa3b7fe1b933 Author: David Hildenbrand Date: Thu Nov 12 14:38:09 2020 +0100 virtio-mem: memory notifier callbacks are specific to Sub Block Mode (SBM) Let's rename accordingly. Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Pankaj Gupta Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20201112133815.13332-24-david@redhat.com Signed-off-by: Michael S. Tsirkin commit 602ef89457173a24dde30874faec1f15a00e112a Author: David Hildenbrand Date: Thu Nov 12 14:38:08 2020 +0100 virito-mem: existing (un)plug functions are specific to Sub Block Mode (SBM) Let's rename them accordingly. virtio_mem_plug_request() and virtio_mem_unplug_request() will be handled separately. Reviewed-by: Wei Yang Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Pankaj Gupta Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20201112133815.13332-23-david@redhat.com Signed-off-by: Michael S. Tsirkin commit 8a6f082babea6744b876a23ff5ed6081bf12968d Author: David Hildenbrand Date: Thu Nov 12 14:38:07 2020 +0100 virtio-mem: memory block ids are specific to Sub Block Mode (SBM) Let's move first_mb_id/next_mb_id/last_usable_mb_id accordingly. Reviewed-by: Wei Yang Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Pankaj Gupta Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20201112133815.13332-22-david@redhat.com Signed-off-by: Michael S. Tsirkin commit 905c4c5146dcb1b1e0a534ae9b5da6c5e4f29c21 Author: David Hildenbrand Date: Thu Nov 12 14:38:06 2020 +0100 virtio-mem: nb_sb_per_mb and subblock_size are specific to Sub Block Mode (SBM) Let's rename to "sbs_per_mb" and "sb_size" and move accordingly. Reviewed-by: Wei Yang Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Pankaj Gupta Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20201112133815.13332-21-david@redhat.com Signed-off-by: Michael S. Tsirkin commit 54c6a6ba75ba4c428b659b167f87c07100ba260e Author: David Hildenbrand Date: Thu Nov 12 14:38:05 2020 +0100 virito-mem: subblock states are specific to Sub Block Mode (SBM) Let's rename and move accordingly. While at it, rename sb_bitmap to "sb_states". Reviewed-by: Wei Yang Reviewed-by: Pankaj Gupta Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Pankaj Gupta Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20201112133815.13332-20-david@redhat.com Signed-off-by: Michael S. Tsirkin commit 99f0b55ea6c3a2ed29776ca0dd549d523ae8d6d3 Author: David Hildenbrand Date: Thu Nov 12 14:38:04 2020 +0100 virtio-mem: memory block states are specific to Sub Block Mode (SBM) let's use a new "sbm" sub-struct to hold SBM-specific state and rename + move applicable definitions, functions, and variables (related to memory block states). While at it: - Drop the "_STATE" part from memory block states - Rename "nb_mb_state" to "mb_count" - "set_mb_state" / "get_mb_state" vs. "mb_set_state" / "mb_get_state" - Don't use lengthy "enum virtio_mem_smb_mb_state", simply use "uint8_t" Reviewed-by: Wei Yang Reviewed-by: Pankaj Gupta Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Pankaj Gupta Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20201112133815.13332-19-david@redhat.com Signed-off-by: Michael S. Tsirkin commit d5614944254cf288b8fd46fda8c86d916346131d Author: David Hildenbrand Date: Thu Nov 12 14:38:03 2020 +0100 virito-mem: document Sub Block Mode (SBM) Let's add some documentation for the current mode - Sub Block Mode (SBM) - to prepare for a new mode - Big Block Mode (BBM). Follow-up patches will properly factor out the existing Sub Block Mode (SBM) and implement Big Block Mode (BBM). Reviewed-by: Wei Yang Reviewed-by: Pankaj Gupta Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Pankaj Gupta Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20201112133815.13332-18-david@redhat.com Signed-off-by: Michael S. Tsirkin commit 98ff9f9411860073f952f1e62a05afb9f6a9e77e Author: David Hildenbrand Date: Thu Nov 12 14:38:02 2020 +0100 virtio-mem: generalize handling when memory is getting onlined deferred We don't want to add too much memory when it's not getting onlined immediately, to avoid running OOM. Generalize the handling, to avoid making use of memory block states. Use a threshold of 1 GiB for now. Properly adjust the offline size when adding/removing memory. As we are not always protected by a lock when touching the offline size, use an atomic64_t. We don't care about races (e.g., someone offlining memory while we are adding more), only about consistent values. (1 GiB needs a memmap of ~16MiB - which sounds reasonable even for setups with little boot memory and (possibly) one virtio-mem device per node) We don't want to retrigger when onlining is caused immediately by our action (e.g., adding memory which immediately gets onlined), so use a flag to indicate if the workqueue is active and use that as an indicator whether to trigger a retry. This will also be especially relevant for Big Block Mode (BBM), whereby we might re-online memory in case offlining of another memory block failed. Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Pankaj Gupta Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20201112133815.13332-17-david@redhat.com Signed-off-by: Michael S. Tsirkin commit 1d33c2caa8cbdc0f093a8cdad5a4c153ef9cbe8f Author: David Hildenbrand Date: Thu Nov 12 14:38:01 2020 +0100 virtio-mem: don't always trigger the workqueue when offlining memory Let's trigger from offlining code only when we're not allowed to unplug online memory. Handle the other case (memmap possibly freeing up another memory block) when actually removing memory. We now also properly handle the case when removing already offline memory blocks via virtio_mem_mb_remove(). When removing via virtio_mem_remove(), when unloading the driver, virtio_mem_retry() is a NOP and safe to use. While at it, move retry handling when offlining out of virtio_mem_notify_offline(), to share it with Big Block Mode (BBM) soon. This is a preparation for Big Block Mode (BBM), whereby we can see some temporary offlining of memory blocks without actually making progress. Imagine you have a Big Block that spans to Linux memory blocks. Assume the first Linux memory blocks has no unmovable data on it. When we would call offline_and_remove_memory() on the big block, we would 1. Try to offline the first block. Works, notifiers triggered. virtio_mem_retry() called. 2. Try to offline the second block. Does not work. 3. Re-online first block. 4. Exit to main loop, exit workqueue. 5. Retry immediately (due to virtio_mem_retry()), go to 1. The result are endless retries. Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Pankaj Gupta Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20201112133815.13332-16-david@redhat.com Signed-off-by: Michael S. Tsirkin commit 420066829bb614826115892e81f85b8c4341ee95 Author: David Hildenbrand Date: Thu Nov 12 14:38:00 2020 +0100 virtio-mem: drop last_mb_id No longer used, let's drop it. Reviewed-by: Wei Yang Reviewed-by: Pankaj Gupta Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Pankaj Gupta Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20201112133815.13332-15-david@redhat.com Signed-off-by: Michael S. Tsirkin commit 835491c554fbdbc18452f4b1546df21879b8b26d Author: David Hildenbrand Date: Thu Nov 12 14:37:59 2020 +0100 virtio-mem: generalize virtio_mem_overlaps_range() Avoid using memory block ids. While at it, use uint64_t for address/size. This is a preparation for Big Block Mode (BBM). Reviewed-by: Pankaj Gupta Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Pankaj Gupta Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20201112133815.13332-14-david@redhat.com Signed-off-by: Michael S. Tsirkin commit 8464e3bdf208e86410e369601ca363b2a81683e3 Author: David Hildenbrand Date: Thu Nov 12 14:37:58 2020 +0100 virtio-mem: generalize virtio_mem_owned_mb() Avoid using memory block ids. Rename it to virtio_mem_contains_range(). This is a preparation for Big Block Mode (BBM). Reviewed-by: Pankaj Gupta Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Pankaj Gupta Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20201112133815.13332-13-david@redhat.com Signed-off-by: Michael S. Tsirkin commit 989ff82527074b79bc89ba1c390be1eda01784a5 Author: David Hildenbrand Date: Thu Nov 12 14:37:57 2020 +0100 virtio-mem: generalize check for added memory Let's check by traversing busy system RAM resources instead, to avoid relying on memory block states. Don't use walk_system_ram_range(), as that works on pages and we want to use the bare addresses we have easily at hand. This is a preparation for Big Block Mode (BBM), which won't have memory block states. Reviewed-by: Wei Yang Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Pankaj Gupta Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20201112133815.13332-12-david@redhat.com Signed-off-by: Michael S. Tsirkin commit f2d799d591359685a3a74d28c2989c56f4bb9898 Author: David Hildenbrand Date: Thu Nov 12 14:37:56 2020 +0100 virtio-mem: retry fake-offlining via alloc_contig_range() on ZONE_MOVABLE ZONE_MOVABLE is supposed to give some guarantees, yet, alloc_contig_range() isn't prepared to properly deal with some racy cases properly (e.g., temporary page pinning when exiting processed, PCP). Retry 5 times for now. There is certainly room for improvement in the future. Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Pankaj Gupta Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20201112133815.13332-11-david@redhat.com Signed-off-by: Michael S. Tsirkin commit 7a34c77dab7e0c7ecb58da8bf600b7aadb4d878c Author: David Hildenbrand Date: Thu Nov 12 14:37:55 2020 +0100 virtio-mem: factor out handling of fake-offline pages in memory notifier Let's factor out the core pieces and place the implementation next to virtio_mem_fake_offline(). We'll reuse this functionality soon. Reviewed-by: Wei Yang Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Pankaj Gupta Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20201112133815.13332-10-david@redhat.com Signed-off-by: Michael S. Tsirkin commit 89c486c47f2a450d7f064b4927b7f0ab911569a4 Author: David Hildenbrand Date: Thu Nov 12 14:37:54 2020 +0100 virtio-mem: factor out fake-offlining into virtio_mem_fake_offline() ... which now matches virtio_mem_fake_online(). We'll reuse this functionality soon. Reviewed-by: Wei Yang Reviewed-by: Pankaj Gupta Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Pankaj Gupta Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20201112133815.13332-9-david@redhat.com Signed-off-by: Michael S. Tsirkin commit 6beb3a9421fd81d36bd4d87a6b307fc744ea9dd2 Author: David Hildenbrand Date: Thu Nov 12 14:37:53 2020 +0100 virtio-mem: print debug messages from virtio_mem_send_*_request() Let's move the existing dev_dbg() into the functions, print if something went wrong, and also print for virtio_mem_send_unplug_all_request(). Reviewed-by: Wei Yang Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Pankaj Gupta Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20201112133815.13332-8-david@redhat.com Signed-off-by: Michael S. Tsirkin commit 41e6215c6d29a7bbcee599411cdf0911fde1f09b Author: David Hildenbrand Date: Thu Nov 12 14:37:52 2020 +0100 virtio-mem: factor out calculation of the bit number within the subblock bitmap The calculation is already complicated enough, let's limit it to one location. Reviewed-by: Wei Yang Reviewed-by: Pankaj Gupta Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Pankaj Gupta Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20201112133815.13332-7-david@redhat.com Signed-off-by: Michael S. Tsirkin commit 2a6285114bc543b70612e2bc0fcf13d2dd6ce5b9 Author: David Hildenbrand Date: Thu Nov 12 14:37:51 2020 +0100 virtio-mem: use "unsigned long" for nr_pages when fake onlining/offlining No harm done, but let's be consistent. Reviewed-by: Pankaj Gupta Reviewed-by: Wei Yang Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Pankaj Gupta Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20201112133815.13332-6-david@redhat.com Signed-off-by: Michael S. Tsirkin commit d76944f80d5f500c8be74feb7938edddf68ee931 Author: David Hildenbrand Date: Thu Nov 12 14:37:50 2020 +0100 virtio-mem: drop rc2 in virtio_mem_mb_plug_and_add() We can drop rc2, we don't actually need the value. Reviewed-by: Pankaj Gupta Reviewed-by: Wei Yang Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Pankaj Gupta Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20201112133815.13332-5-david@redhat.com Signed-off-by: Michael S. Tsirkin commit 20b9150225c8e9599999b4e161192d8a8d56a4cb Author: David Hildenbrand Date: Thu Nov 12 14:37:49 2020 +0100 virtio-mem: simplify MAX_ORDER - 1 / pageblock_order handling Let's use pageblock_nr_pages and MAX_ORDER_NR_PAGES instead where possible to simplify. Add a comment why we have that restriction for now. Reviewed-by: Wei Yang Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Pankaj Gupta Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20201112133815.13332-4-david@redhat.com Signed-off-by: Michael S. Tsirkin commit 347202dc04a110bdab8d4e1c38ceccd7758fe13e Author: David Hildenbrand Date: Thu Nov 12 14:37:48 2020 +0100 virtio-mem: more precise calculation in virtio_mem_mb_state_prepare_next_mb() We actually need one byte less (next_mb_id is exclusive, first_mb_id is inclusive). While at it, compact the code. Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Pankaj Gupta Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20201112133815.13332-3-david@redhat.com Signed-off-by: Michael S. Tsirkin commit 6725f21157b4b6a9fe689cdf07b040d21ea536dd Author: David Hildenbrand Date: Thu Nov 12 14:37:47 2020 +0100 virtio-mem: determine nid only once using memory_add_physaddr_to_nid() Let's determine the target nid only once in case we have none specified - usually, we'll end up with node 0 either way. Reviewed-by: Wei Yang Reviewed-by: Pankaj Gupta Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Pankaj Gupta Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20201112133815.13332-2-david@redhat.com Signed-off-by: Michael S. Tsirkin commit a0b96314870f7eff6d15a242cb162dfc46b3c284 Merge: 4862c741bd440 e82226138b20d Author: Linus Torvalds Date: Fri Dec 18 12:50:18 2020 -0800 Merge tag 'xfs-5.11-merge-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs updates from Darrick Wong: "In this release we add the ability to set a 'needsrepair' flag indicating that we /know/ the filesystem requires xfs_repair, but other than that, it's the usual strengthening of metadata validation and miscellaneous cleanups. Summary: - Introduce a "needsrepair" "feature" to flag a filesystem as needing a pass through xfs_repair. This is key to enabling filesystem upgrades (in xfs_db) that require xfs_repair to make minor adjustments to metadata. - Refactor parameter checking of recovered log intent items so that we actually use the same validation code as them that generate the intent items. - Various fixes to online scrub not reacting correctly to directory entries pointing to inodes that cannot be igetted. - Refactor validation helpers for data and rt volume extents. - Refactor XFS_TRANS_DQ_DIRTY out of existence. - Fix a longstanding bug where mounting with "uqnoenforce" would start user quotas in non-enforcing mode but /proc/mounts would display "usrquota", implying that they are being enforced. - Don't flag dax+reflink inodes as corruption since that is a valid (but not fully functional) combination right now. - Clean up raid stripe validation functions. - Refactor the inode allocation code to be more straightforward. - Small prep cleanup for idmapping support. - Get rid of the xfs_buf_t typedef" * tag 'xfs-5.11-merge-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (40 commits) xfs: remove xfs_buf_t typedef fs/xfs: convert comma to semicolon xfs: open code updating i_mode in xfs_set_acl xfs: remove xfs_vn_setattr_nonsize xfs: kill ialloced in xfs_dialloc() xfs: spilt xfs_dialloc() into 2 functions xfs: move xfs_dialloc_roll() into xfs_dialloc() xfs: move on-disk inode allocation out of xfs_ialloc() xfs: introduce xfs_dialloc_roll() xfs: convert noroom, okalloc in xfs_dialloc() to bool xfs: don't catch dax+reflink inodes as corruption in verifier xfs: fix the forward progress assertion in xfs_iwalk_run_callbacks xfs: remove unneeded return value check for *init_cursor() xfs: introduce xfs_validate_stripe_geometry() xfs: show the proper user quota options xfs: remove the unused XFS_B_FSB_OFFSET macro xfs: remove unnecessary null check in xfs_generic_create xfs: directly return if the delta equal to zero xfs: check tp->t_dqinfo value instead of the XFS_TRANS_DQ_DIRTY flag xfs: delete duplicated tp->t_dqinfo null check and allocation ... commit 4862c741bd440813cabc5e93351f0950c1cb19d9 Merge: c59c7588fc922 170f4869e6627 Author: Linus Torvalds Date: Fri Dec 18 12:46:43 2020 -0800 Merge tag 'ktest-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest Pull ktest updates from Steven Rostedt: "No new features. Just a couple of fixes that I had in my local repository that fixed issues with sending the result emails" * tag 'ktest-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest: ktest.pl: Fix the logic for truncating the size of the log file for email ktest.pl: If size of log is too big to email, email error message commit c59c7588fc922e27c378a7e2a920b889bd6bf872 Merge: 432c19a8d965a 4efd7faba5e06 Author: Linus Torvalds Date: Fri Dec 18 12:38:28 2020 -0800 Merge tag 'drm-next-2020-12-18' of git://anongit.freedesktop.org/drm/drm Pull more drm updates from Daniel Vetter: "UAPI Changes: - Only enable char/agp uapi when CONFIG_DRM_LEGACY is set Cross-subsystem Changes: - vma_set_file helper to make vma->vm_file changing less brittle, acked by Andrew Core Changes: - dma-buf heaps improvements - pass full atomic modeset state to driver callbacks - shmem helpers: cached bo by default - cleanups for fbdev, fb-helpers - better docs for drm modes and SCALING_FITLER uapi - ttm: fix dma32 page pool regression Driver Changes: - multi-hop regression fixes for amdgpu, radeon, nouveau - lots of small amdgpu hw enabling fixes (display, pm, ...) - fixes for imx, mcde, meson, some panels, virtio, qxl, i915, all fairly minor - some cleanups for legacy drm/fbdev drivers" * tag 'drm-next-2020-12-18' of git://anongit.freedesktop.org/drm/drm: (117 commits) drm/qxl: don't allocate a dma_address array drm/nouveau: fix multihop when move doesn't work. drm/i915/tgl: Fix REVID macros for TGL to fetch correct stepping drm/i915: Fix mismatch between misplaced vma check and vma insert drm/i915/perf: also include Gen11 in OATAILPTR workaround Revert "drm/i915: re-order if/else ladder for hpd_irq_setup" drm/amdgpu/disply: fix documentation warnings in display manager drm/amdgpu: print mmhub client name for dimgrey_cavefish drm/amdgpu: set mode1 reset as default for dimgrey_cavefish drm/amd/display: Add get_dig_frontend implementation for DCEx drm/radeon: remove h from printk format specifier drm/amdgpu: remove h from printk format specifier drm/amdgpu: Fix spelling mistake "Heterogenous" -> "Heterogeneous" drm/amdgpu: fix regression in vbios reservation handling on headless drm/amdgpu/SRIOV: Extend VF reset request wait period drm/amdkfd: correct amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu log. drm/amd/display: Adding prototype for dccg21_update_dpp_dto() drm/amdgpu: print what method we are using for runtime pm drm/amdgpu: simplify logic in atpx resume handling drm/amdgpu: no need to call pci_ignore_hotplug for _PR3 ... commit b53d4872d2cfbce117abedee2a29a93e624e4e32 Author: Arnaldo Carvalho de Melo Date: Thu Dec 17 15:48:06 2020 -0300 tools headers UAPI: Update asm-generic/unistd.h Just a comment change, trivial. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit f93c789a3e245707e3eddcaab5c2b7c62615692d Author: Arnaldo Carvalho de Melo Date: Thu Dec 17 15:44:29 2020 -0300 tools headers cpufeatures: Sync with the kernel sources To pick the changes in: e7b6385b01d8e9fb ("x86/cpufeatures: Add Intel SGX hardware bits") That causes only these 'perf bench' objects to rebuild: CC /tmp/build/perf/bench/mem-memcpy-x86-64-asm.o CC /tmp/build/perf/bench/mem-memset-x86-64-asm.o And addresses these perf build warnings: 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 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: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: Sean Christopherson Signed-off-by: Arnaldo Carvalho de Melo commit d6dbfceec5dd41becbe8c47c402240925d31036a Author: Arnaldo Carvalho de Melo Date: Thu Dec 17 15:01:08 2020 -0300 tools headers UAPI: Sync linux/prctl.h with the kernel sources To pick a new prctl introduced in: 1446e1df9eb183fd ("kernel: Implement selective syscall userspace redirection") That results in: $ tools/perf/trace/beauty/prctl_option.sh > before $ cp include/uapi/linux/prctl.h tools/include/uapi/linux/prctl.h $ tools/perf/trace/beauty/prctl_option.sh > after $ diff -u before after --- before 2020-12-17 15:00:42.012537367 -0300 +++ after 2020-12-17 15:00:49.832699463 -0300 @@ -53,6 +53,7 @@ [56] = "GET_TAGGED_ADDR_CTRL", [57] = "SET_IO_FLUSHER", [58] = "GET_IO_FLUSHER", + [59] = "SET_SYSCALL_USER_DISPATCH", }; static const char *prctl_set_mm_options[] = { [1] = "START_CODE", $ Now users can do: # perf trace -e syscalls:sys_enter_prctl --filter "option==SET_SYSCALL_USER_DISPATCH" ^C# # trace -v -e syscalls:sys_enter_prctl --filter "option==SET_SYSCALL_USER_DISPATCH" New filter for syscalls:sys_enter_prctl: (option==0x3b) && (common_pid != 5519 && common_pid != 3404) ^C# And also when prctl appears in a session, its options will be translated to the string. Cc: Adrian Hunter Cc: Gabriel Krisman Bertazi Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: Thomas Gleixner Signed-off-by: Arnaldo Carvalho de Melo commit 4a443a51776ca9847942523cf987a330894d3a31 Author: Arnaldo Carvalho de Melo Date: Thu Dec 17 14:58:51 2020 -0300 tools headers UAPI: Sync linux/fscrypt.h with the kernel sources To pick the changes from: 3ceb6543e9cf6ed8 ("fscrypt: remove kernel-internal constants from UAPI header") That don't result in any changes in tooling, just addressing 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: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 7ddcdea5b54492f54700f427f58690cf1e187e5e Author: Arnaldo Carvalho de Melo Date: Thu Dec 17 14:55:01 2020 -0300 tools headers UAPI: Sync linux/const.h with the kernel headers To pick up the changes in: a85cbe6159ffc973 ("uapi: move constants from to ") That causes no changes in tooling, just addresses this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/const.h' differs from latest version at 'include/uapi/linux/const.h' diff -u tools/include/uapi/linux/const.h include/uapi/linux/const.h Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: Petr Vorel Signed-off-by: Arnaldo Carvalho de Melo commit e9bde94f1eb53c5721ba8e477dee837632fedebe Author: Arnaldo Carvalho de Melo Date: Thu Dec 17 14:46:24 2020 -0300 tools arch x86: Sync the msr-index.h copy with the kernel sources To pick up the changes in: d205e0f1426e0f99 ("x86/{cpufeatures,msr}: Add Intel SGX Launch Control hardware bits") e7b6385b01d8e9fb ("x86/cpufeatures: Add Intel SGX hardware bits") 43756a298928c9a4 ("powercap: Add AMD Fam17h RAPL support") 298ed2b31f552806 ("x86/msr-index: sort AMD RAPL MSRs by address") 68299a42f8428853 ("x86/mce: Enable additional error logging on certain Intel CPUs") That cause these changes in tooling: $ tools/perf/trace/beauty/tracepoints/x86_msr.sh > before $ cp arch/x86/include/asm/msr-index.h tools/arch/x86/include/asm/msr-index.h $ tools/perf/trace/beauty/tracepoints/x86_msr.sh > after $ diff -u before after --- before 2020-12-17 14:45:49.036994450 -0300 +++ after 2020-12-17 14:46:01.654256639 -0300 @@ -22,6 +22,10 @@ [0x00000060] = "LBR_CORE_TO", [0x00000079] = "IA32_UCODE_WRITE", [0x0000008b] = "IA32_UCODE_REV", + [0x0000008C] = "IA32_SGXLEPUBKEYHASH0", + [0x0000008D] = "IA32_SGXLEPUBKEYHASH1", + [0x0000008E] = "IA32_SGXLEPUBKEYHASH2", + [0x0000008F] = "IA32_SGXLEPUBKEYHASH3", [0x0000009b] = "IA32_SMM_MONITOR_CTL", [0x0000009e] = "IA32_SMBASE", [0x000000c1] = "IA32_PERFCTR0", @@ -59,6 +63,7 @@ [0x00000179] = "IA32_MCG_CAP", [0x0000017a] = "IA32_MCG_STATUS", [0x0000017b] = "IA32_MCG_CTL", + [0x0000017f] = "ERROR_CONTROL", [0x00000180] = "IA32_MCG_EAX", [0x00000181] = "IA32_MCG_EBX", [0x00000182] = "IA32_MCG_ECX", @@ -294,6 +299,7 @@ [0xc0010241 - x86_AMD_V_KVM_MSRs_offset] = "F15H_NB_PERF_CTR", [0xc0010280 - x86_AMD_V_KVM_MSRs_offset] = "F15H_PTSC", [0xc0010299 - x86_AMD_V_KVM_MSRs_offset] = "AMD_RAPL_POWER_UNIT", + [0xc001029a - x86_AMD_V_KVM_MSRs_offset] = "AMD_CORE_ENERGY_STATUS", [0xc001029b - x86_AMD_V_KVM_MSRs_offset] = "AMD_PKG_ENERGY_STATUS", [0xc00102f0 - x86_AMD_V_KVM_MSRs_offset] = "AMD_PPIN_CTL", [0xc00102f1 - x86_AMD_V_KVM_MSRs_offset] = "AMD_PPIN", $ Which causes these parts of tools/perf/ to be rebuilt: CC /tmp/build/perf/trace/beauty/tracepoints/x86_msr.o LD /tmp/build/perf/trace/beauty/tracepoints/perf-in.o LD /tmp/build/perf/trace/beauty/perf-in.o LD /tmp/build/perf/perf-in.o LINK /tmp/build/perf/perf At some point these should just be tables read by perf on demand. This allows 'perf trace' users to use those strings to translate from the msr ids provided by the msr: tracepoints. This addresses this perf tools build warning: diff -u tools/arch/x86/include/asm/msr-index.h arch/x86/include/asm/msr-index.h 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' Cc: Adrian Hunter Cc: Borislav Petkov Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: Rafael J. Wysocki Cc: Sean Christopherson Cc: Tony Luck Cc: Victor Ding Signed-off-by: Arnaldo Carvalho de Melo commit eb2842da77e1f7a3c46033f930524ab76dffe67a Author: Arnaldo Carvalho de Melo Date: Thu Dec 17 14:42:48 2020 -0300 perf trace beauty: Update copy of linux/socket.h with the kernel sources This just triggers the rebuilding of the syscall beautifiers that extract patterns from this file due to this cset: b713c195d5933227 ("net: provide __sys_shutdown_sock() that takes a socket") After updating it: CC /tmp/build/perf/trace/beauty/sockaddr.o Addressing this perf build warning: Warning: Kernel ABI header at 'tools/perf/trace/beauty/include/linux/socket.h' differs from latest version at 'include/linux/socket.h' diff -u tools/perf/trace/beauty/include/linux/socket.h include/linux/socket.h Cc: Adrian Hunter Cc: Ian Rogers Cc: Jens Axboe Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 23cd9543a52b96ac75d666eee3576b47f1901248 Author: Arnaldo Carvalho de Melo Date: Thu Dec 17 14:41:21 2020 -0300 tools headers: Update linux/ctype.h with the kernel sources To pick up the changes in: caabdd0f59a9771e ("ctype.h: remove duplicate isdigit() helper") Addressing this perf build warning: Warning: Kernel ABI header at 'tools/include/linux/ctype.h' differs from latest version at 'include/linux/ctype.h' diff -u tools/include/linux/ctype.h include/linux/ctype.h And we need to continue using the combination of: inline __isdigit() #define isdigit() __isdigit When the __has_builtin() thing isn't available, as it is a builtin in older systems with it as a builtin but with compilers not hacinv __has_builtin(), rendering the __has_builtin() check useless otherwise. Cc: Adrian Hunter Cc: Arnd Bergmann Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit ffb9beb13e8daf3fcb6bab470d07962b05d619b7 Author: Arnaldo Carvalho de Melo Date: Fri Dec 18 10:16:08 2020 -0300 tools headers: Add conditional __has_builtin() As it'll be used by the ctype.h sync with its kernel source original. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 4bba4c4bb09ad4a2b70836725e08439c86d8f9e4 Author: Arnaldo Carvalho de Melo Date: Fri Dec 18 09:59:05 2020 -0300 tools headers: Get tools's linux/compiler.h closer to the kernel's We're cherry picking stuff from the kernel to allow for the other headers that we keep in sync via tools/perf/check-headers.sh to work, so introduce linux/compiler_types.h and from there get the compiler specific stuff. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 432c19a8d965aa0123e0a81492492a7cb1da5257 Merge: a087241716a6c 67698880ac9d5 Author: Linus Torvalds Date: Fri Dec 18 12:19:37 2020 -0800 Merge tag 'thermal-v5.11-2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux Pull thermal fixlet from Daniel Lezcano: "A trivial change which fell through the cracks: Add Alder Lake support ACPI ids (Srinivas Pandruvada)" * tag 'thermal-v5.11-2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux: thermal: int340x: Support Alder Lake commit abdcd06c4dedbcabaec68c433c7f53f33307811f Author: Baruch Siach Date: Wed Dec 16 09:28:04 2020 +0200 net: af_packet: fix procfs header for 64-bit pointers On 64-bit systems the packet procfs header field names following 'sk' are not aligned correctly: sk RefCnt Type Proto Iface R Rmem User Inode 00000000605d2c64 3 3 0003 7 1 450880 0 16643 00000000080e9b80 2 2 0000 0 0 0 0 17404 00000000b23b8a00 2 2 0000 0 0 0 0 17421 ... With this change field names are correctly aligned: sk RefCnt Type Proto Iface R Rmem User Inode 000000005c3b1d97 3 3 0003 7 1 21568 0 16178 000000007be55bb7 3 3 fbce 8 1 0 0 16250 00000000be62127d 3 3 fbcd 8 1 0 0 16254 ... Signed-off-by: Baruch Siach Link: https://lore.kernel.org/r/54917251d8433735d9a24e935a6cb8eb88b4058a.1608103684.git.baruch@tkos.co.il Signed-off-by: Jakub Kicinski commit 3970acf7ddb9aa01c4bdeef197495157c98a15f6 Author: Boris Protopopov Date: Fri Dec 18 11:30:12 2020 -0600 SMB3: Add support for getting and setting SACLs Add SYSTEM_SECURITY access flag and use with smb2 when opening files for getting/setting SACLs. Add "system.cifs_ntsd_full" extended attribute to allow user-space access to the functionality. Avoid multiple server calls when setting owner, DACL, and SACL. Signed-off-by: Boris Protopopov Signed-off-by: Steve French commit a087241716a6cea8518ca33839276a9648d91cef Merge: 5ba836eb9fdb0 dfdc6e73cdcf0 Author: Linus Torvalds Date: Fri Dec 18 11:08:06 2020 -0800 Merge tag 's390-5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull more s390 updates from Heiko Carstens: "This is mainly to decouple udelay() and arch_cpu_idle() and simplify both of them. Summary: - Always initialize kernel stack backchain when entering the kernel, so that unwinding works properly. - Fix stack unwinder test case to avoid rare interrupt stack corruption. - Simplify udelay() and just let it busy loop instead of implementing a complex logic. - arch_cpu_idle() cleanup. - Some other minor improvements" * tag 's390-5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/zcrypt: convert comma to semicolon s390/idle: allow arch_cpu_idle() to be kprobed s390/idle: remove raw_local_irq_save()/restore() from arch_cpu_idle() s390/idle: merge enabled_wait() and arch_cpu_idle() s390/delay: remove udelay_simple() s390/irq: select HAVE_IRQ_EXIT_ON_IRQ_STACK s390/delay: simplify udelay s390/test_unwind: use timer instead of udelay s390/test_unwind: fix CALL_ON_STACK tests s390: make calls to TRACE_IRQS_OFF/TRACE_IRQS_ON balanced s390: always clear kernel stack backchain before calling functions commit 5ba836eb9fdb07843cfa004e511f333745adb76e Merge: e2ae634014d3a 9fd339a45be5c Author: Linus Torvalds Date: Fri Dec 18 10:57:27 2020 -0800 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull more arm64 updates from Catalin Marinas: "These are some some trivial updates that mostly fix/clean-up code pushed during the merging window: - Work around broken GCC 4.9 handling of "S" asm constraint - Suppress W=1 missing prototype warnings - Warn the user when a small VA_BITS value cannot map the available memory - Drop the useless update to per-cpu cycles" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: Work around broken GCC 4.9 handling of "S" constraint arm64: Warn the user when a small VA_BITS value wastes memory arm64: entry: suppress W=1 prototype warnings arm64: topology: Drop the useless update to per-cpu cycles commit e2ae634014d3a8839a99f8897b3f6346a133a33b Merge: a409ed156a900 7d95a88f9254b Author: Linus Torvalds Date: Fri Dec 18 10:43:07 2020 -0800 Merge tag 'riscv-for-linus-5.11-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V updates from Palmer Dabbelt: "We have a handful of new kernel features for 5.11: - Support for the contiguous memory allocator. - Support for IRQ Time Accounting - Support for stack tracing - Support for strict /dev/mem - Support for kernel section protection I'm being a bit conservative on the cutoff for this round due to the timing, so this is all the new development I'm going to take for this cycle (even if some of it probably normally would have been OK). There are, however, some fixes on the list that I will likely be sending along either later this week or early next week. There is one issue in here: one of my test configurations (PREEMPT{,_DEBUG}=y) fails to boot on QEMU 5.0.0 (from April) as of the .text.init alignment patch. With any luck we'll sort out the issue, but given how many bugs get fixed all over the place and how unrelated those features seem my guess is that we're just running into something that's been lurking for a while and has already been fixed in the newer QEMU (though I wouldn't be surprised if it's one of these implicit assumptions we have in the boot flow). If it was hardware I'd be strongly inclined to look more closely, but given that users can upgrade their simulators I'm less worried about it" * tag 'riscv-for-linus-5.11-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: arm64: Use the generic devmem_is_allowed() arm: Use the generic devmem_is_allowed() RISC-V: Use the new generic devmem_is_allowed() lib: Add a generic version of devmem_is_allowed() riscv: Fixed kernel test robot warning riscv: kernel: Drop unused clean rule riscv: provide memmove implementation RISC-V: Move dynamic relocation section under __init RISC-V: Protect all kernel sections including init early RISC-V: Align the .init.text section RISC-V: Initialize SBI early riscv: Enable ARCH_STACKWALK riscv: Make stack walk callback consistent with generic code riscv: Cleanup stacktrace riscv: Add HAVE_IRQ_TIME_ACCOUNTING riscv: Enable CMA support riscv: Ignore Image.* and loader.bin riscv: Clean up boot dir riscv: Fix compressed Image formats build RISC-V: Add kernel image sections to the resource tree commit d7f39c40ebb6986e7371510d1c20a4efee4a7f0d Author: Marc Zyngier Date: Fri Dec 18 18:03:46 2020 +0000 irqchip/bcm2836: Fix IPI acknowledgement after conversion to handle_percpu_devid_irq It appears that despite its name, the bcm2836_arm_irqchip_ipi_eoi() callback is an acknowledgement, and not an EOI. This means that we lose IPIs that are made pending between the handling of the IPI and the write to LOCAL_MAILBOX0_CLR0. With the right timing, things fail nicely. This used to work with handle_percpu_devid_fasteoi_ipi(), which started by eoi-ing the interrupt. With the standard fasteoi flow, this doesn't work anymore. So let's use this callback for what it is, an ack. Your favourite RPi-2/3 is back up and running. Fixes: ffdad793d579 ("irqchip/bcm2836: Make IPIs use handle_percpu_devid_irq()") Cc: Valentin Schneider Reported-by: Guenter Roeck Tested-by: Guenter Roeck Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/c9fb4ab3-a5cb-648c-6de3-c6a871e60870@roeck-us.net commit e90f55e0196a66f8e9e445f7f33f876dd889be9a Author: Zheng Yongjun Date: Mon Dec 14 21:35:30 2020 +0800 irqchip/irq-sl28cpld: Convert comma to semicolon Replace a comma between expression statements by a semicolon. Signed-off-by: Zheng Yongjun Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201214133530.3783-1-zhengyongjun3@huawei.com commit 06fde695ee76429634c1e8c8c1154035aa61191e Author: Zenghui Yu Date: Fri Dec 18 14:00:39 2020 +0800 genirq/msi: Initialize msi_alloc_info before calling msi_domain_prepare_irqs() Since commit 5fe71d271df8 ("irqchip/gic-v3-its: Tag ITS device as shared if allocating for a proxy device"), some of the devices are wrongly marked as "shared" by the ITS driver on systems equipped with the ITS(es). The problem is that the @info->flags may not be initialized anywhere and we end up looking at random bits on the stack. That's obviously not good. We can perform the initialization in the IRQ core layer before calling msi_domain_prepare_irqs(), which is neat enough. Fixes: 5fe71d271df8 ("irqchip/gic-v3-its: Tag ITS device as shared if allocating for a proxy device") Signed-off-by: Zenghui Yu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201218060039.1770-1-yuzenghui@huawei.com commit 17fa81aa702ec118f2b835715897041675b06336 Author: Douglas Anderson Date: Thu Dec 17 14:29:14 2020 -0800 spi: spi-geni-qcom: Print an error when we timeout setting the CS If we're using geni to manage the chip select line (don't do it--use a GPIO!) and we happen to get a timeout waiting for the chip select command to be completed, no errors are printed even though things might not be in the best shape. Let's add a print. Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20201217142842.v3.4.I666b37646de9652cef438ac7c2c6c2053367fc6b@changeid Signed-off-by: Mark Brown commit 3d7d916f9bc98ce88272b3e4405c7c685afbfcd6 Author: Douglas Anderson Date: Thu Dec 17 14:29:13 2020 -0800 spi: spi-geni-qcom: Don't try to set CS if an xfer is pending If we get a timeout sending then this happens: spi_transfer_one_message() ->transfer_one() AKA spi_geni_transfer_one() setup_fifo_xfer() mas->cur_xfer = non-NULL spi_transfer_wait() => TIMES OUT if (msg->status != -EINPROGRESS) goto out if (ret != 0 ...) spi_set_cs() ->set_cs AKA spi_geni_set_cs() # mas->cur_xfer is non-NULL The above happens _before_ the SPI core calls ->handle_err() AKA handle_fifo_timeout(). Unfortunately that won't work so well on geni. If we got a timeout transferring then it's likely that our interrupt handler is blocked, but we need that same interrupt handler to run and the command channel to be unblocked in order to adjust the chip select. Trying to set the chip select doesn't crash us but ends up confusing our state machine and leads to messages like: Premature done. rx_rem = 32 bpw8 Let's just drop the chip select request in this case. We can detect the case because cur_xfer is non-NULL--it would have been set to NULL in the interrupt handler if the previous transfer had finished. Sure, we might leave the chip select in the wrong state but it's likely it was going to fail anyway and this avoids getting the driver even more confused about what it's doing. The SPI core in general assumes that setting chip select is a simple operation that doesn't fail. Yet another reason to just reconfigure the chip select line as GPIOs. Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20201217142842.v3.3.I07afdedcc49655c5d26880f8df9170aac5792378@changeid Signed-off-by: Mark Brown commit 690d8b917bbe64772cb0b652311bcd50908aea6b Author: Douglas Anderson Date: Thu Dec 17 14:29:12 2020 -0800 spi: spi-geni-qcom: Fail new xfers if xfer/cancel/abort pending If we got a timeout when trying to send an abort command then it means that we just got 3 timeouts in a row: 1. The original timeout that caused handle_fifo_timeout() to be called. 2. A one second timeout waiting for the cancel command to finish. 3. A one second timeout waiting for the abort command to finish. SPI is clocked by the controller, so nothing (aside from a hardware fault or a totally broken sequencer) should be causing the actual commands to fail in hardware. However, even though the hardware itself is not expected to fail (and it'd be hard to predict how we should handle things if it did), it's easy to hit the timeout case by simply blocking our interrupt handler from running for a long period of time. Obviously the system is in pretty bad shape if a interrupt handler is blocked for > 2 seconds, but there are certainly bugs (even bugs in other unrelated drivers) that can make this happen. Let's make things a bit more robust against this case. If we fail to abort we'll set a flag and then we'll block all future transfers until we have no more interrupts pending. Fixes: 561de45f72bd ("spi: spi-geni-qcom: Add SPI driver support for GENI based QUP") Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20201217142842.v3.2.Ibade998ed587e070388b4bf58801f1107a40eb53@changeid Signed-off-by: Mark Brown commit 4aa1464acbe3697710279a4bd65cb4801ed30425 Author: Douglas Anderson Date: Thu Dec 17 14:29:11 2020 -0800 spi: spi-geni-qcom: Fix geni_spi_isr() NULL dereference in timeout case In commit 7ba9bdcb91f6 ("spi: spi-geni-qcom: Don't keep a local state variable") we changed handle_fifo_timeout() so that we set "mas->cur_xfer" to NULL to make absolutely sure that we don't mess with the buffers from the previous transfer in the timeout case. Unfortunately, this caused the IRQ handler to dereference NULL in some cases. One case: CPU0 CPU1 ---- ---- setup_fifo_xfer() geni_se_setup_m_cmd() ... handle_fifo_timeout() spin_lock_irq(mas->lock) mas->cur_xfer = NULL geni_se_cancel_m_cmd() spin_unlock_irq(mas->lock) geni_spi_isr() spin_lock(mas->lock) if (m_irq & M_RX_FIFO_WATERMARK_EN) geni_spi_handle_rx() mas->cur_xfer NULL dereference! tl;dr: Seriously delayed interrupts for RX/TX can lead to timeout handling setting mas->cur_xfer to NULL. Let's check for the NULL transfer in the TX and RX cases and reset the watermark or clear out the fifo respectively to put the hardware back into a sane state. NOTE: things still could get confused if we get timeouts all the way through handle_fifo_timeout() and then start a new transfer because interrupts from the old transfer / cancel / abort could still be pending. A future patch will help this corner case. Fixes: 561de45f72bd ("spi: spi-geni-qcom: Add SPI driver support for GENI based QUP") Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20201217142842.v3.1.I99ee04f0cb823415df59bd4f550d6ff5756e43d6@changeid Signed-off-by: Mark Brown commit 7b723008f9c95624c848fad661c01b06e47b20da Author: Chuck Lever Date: Fri Dec 18 12:28:58 2020 -0500 NFSD: Restore NFSv4 decoding's SAVEMEM functionality While converting the NFSv4 decoder to use xdr_stream-based XDR processing, I removed the old SAVEMEM() macro. This macro wrapped a bit of logic that avoided a memory allocation by recognizing when the decoded item resides in a linear section of the Receive buffer. In that case, it returned a pointer into that buffer instead of allocating a bounce buffer. The bounce buffer is necessary only when xdr_inline_decode() has placed the decoded item in the xdr_stream's scratch buffer, which disappears the next time xdr_inline_decode() is called with that xdr_stream. That happens only if the data item crosses a page boundary in the receive buffer, an exceedingly rare occurrence. Allocating a bounce buffer every time results in a minor performance regression that was introduced by the recent NFSv4 decoder overhaul. Let's restore the previous behavior. On average, it saves about 1.5 kmalloc() calls per COMPOUND. Signed-off-by: Chuck Lever commit 4a85a6a3320b4a622315d2e0ea91a1d2b013bce4 Author: Chuck Lever Date: Fri Dec 18 12:28:41 2020 -0500 SUNRPC: Handle TCP socket sends with kernel_sendpage() again Daire Byrne reports a ~50% aggregrate throughput regression on his Linux NFS server after commit da1661b93bf4 ("SUNRPC: Teach server to use xprt_sock_sendmsg for socket sends"), which replaced kernel_send_page() calls in NFSD's socket send path with calls to sock_sendmsg() using iov_iter. Investigation showed that tcp_sendmsg() was not using zero-copy to send the xdr_buf's bvec pages, but instead was relying on memcpy. This means copying every byte of a large NFS READ payload. It looks like TLS sockets do indeed support a ->sendpage method, so it's really not necessary to use xprt_sock_sendmsg() to support TLS fully on the server. A mechanical reversion of da1661b93bf4 is not possible at this point, but we can re-implement the server's TCP socket sendmsg path using kernel_sendpage(). Reported-by: Daire Byrne BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=209439 Signed-off-by: Chuck Lever commit d6c9e4368cc6a61bf25c9c72437ced509c854563 Author: Chuck Lever Date: Fri Dec 18 12:28:23 2020 -0500 NFSD: Fix sparse warning in nfssvc.c fs/nfsd/nfssvc.c:36:6: warning: symbol 'inter_copy_offload_enable' was not declared. Should it be static? The parameter was added by commit ce0887ac96d3 ("NFSD add nfs4 inter ssc to nfsd4_copy"). Relocate it into the source file that uses it, and make it static. This approach is similar to the nfs4_disable_idmapping, cltrack_prog, and cltrack_legacy_disable module parameters. Signed-off-by: Chuck Lever commit b68f0cbd3f95f2df81e525c310a41fc73c2ed0d3 Author: Trond Myklebust Date: Fri Dec 11 12:26:15 2020 -0500 nfsd: Don't set eof on a truncated READ_PLUS If the READ_PLUS operation was truncated due to an error, then ensure we clear the 'eof' flag. Fixes: 9f0b5792f07d ("NFSD: Encode a full READ_PLUS reply") Signed-off-by: Trond Myklebust Signed-off-by: Chuck Lever commit 72d78717c6d06adf65d2e3dccc96d9e9dc978593 Author: Trond Myklebust Date: Fri Dec 11 12:26:14 2020 -0500 nfsd: Fixes for nfsd4_encode_read_plus_data() Ensure that we encode the data payload + padding, and that we truncate the preallocated buffer to the actual read size. Fixes: 528b84934eb9 ("NFSD: Add READ_PLUS data support") Signed-off-by: Trond Myklebust Signed-off-by: Chuck Lever commit be3e477effba636ad25dcd244db264c6cd5c1f36 Author: Carsten Haitzler Date: Fri Dec 18 15:08:12 2020 +0000 drm/komeda: Fix bit check to import to value of proper type KASAN found this problem. find_first_bit() expects to look at a pointer pointing to a long, but we look at a u32 - this is going to be an issue with endianness but, KSAN already flags this as out-of-bounds stack reads. This fixes it by just importing inot a local long. Signed-off-by: Carsten Haitzler Acked-by: Liviu Dudau Signed-off-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20201218150812.68195-1-carsten.haitzler@foss.arm.com commit a24cf238c771a1d3f0dc68b9f2b62c6d23359026 Author: Carsten Haitzler Date: Fri Nov 27 11:00:54 2020 +0000 drm/komeda: Handle NULL pointer access code path in error case komeda_component_get_old_state() technically can return a NULL pointer. komeda_compiz_set_input() even warns when this happens, but then proceeeds to use that NULL pointer to compare memory content there agains the new state to see if it changed. In this case, it's better to assume that the input changed as there is no old state to compare against and thus assume the changes happen anyway. Signed-off-by: Carsten Haitzler Reviewed-by: Steven Price Acked-by: Liviu Dudau [Applied small spelling fixes and fix suggested by Steven Price] Signed-off-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20201127110054.133686-1-carsten.haitzler@foss.arm.com commit 8e8fbfc682481b7f814985341020129161afd9de Author: Carsten Haitzler Date: Fri Nov 27 11:00:27 2020 +0000 drm/komeda: Remove useless variable assignment ret is not actually read after this (only written in one case then returned), so this assign line is useless. This removes that assignment. Signed-off-by: Carsten Haitzler Reviewed-by: Steven Price Acked-by: Liviu Dudau Signed-off-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20201127110027.133569-1-carsten.haitzler@foss.arm.com commit 4b501262826f5b20f54433c586b111dd190bea25 Author: James Qian Wang Date: Thu Nov 19 09:39:48 2020 +0800 drm/komeda: Correct the sequence of hw_done() and flip_done() Komeda HW has no special, program the update to HW is done first, then flip happens. So correct the sequence to hw_done() first then flip_done(). Reported-by: Daniel Vetter Signed-off-by: James Qian Wang Acked-by: Daniel Vetter Signed-off-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20201119013948.2866343-1-james.qian.wang@arm.com commit 11cb881bf075cea41092a20236ba708b18e1dbb2 Author: Takashi Iwai Date: Fri Dec 18 17:17:30 2020 +0100 ALSA: pcm: oss: Fix a few more UBSAN fixes There are a few places that call round{up|down}_pow_of_two() with the value zero, and this causes undefined behavior warnings. Avoid calling those macros if such a nonsense value is passed; it's a minor optimization as well, as we handle it as either an error or a value to be skipped, instead. Reported-by: syzbot+33ef0b6639a8d2d42b4c@syzkaller.appspotmail.com Cc: Link: https://lore.kernel.org/r/20201218161730.26596-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 618de0f4ef11acd8cf26902e65493d46cc20cc89 Author: Takashi Iwai Date: Fri Dec 18 15:56:25 2020 +0100 ALSA: pcm: Clear the full allocated memory at hw_params The PCM hw_params core function tries to clear up the PCM buffer before actually using for avoiding the information leak from the previous usages or the usage before a new allocation. It performs the memset() with runtime->dma_bytes, but this might still leave some remaining bytes untouched; namely, the PCM buffer size is aligned in page size for mmap, hence runtime->dma_bytes doesn't necessarily cover all PCM buffer pages, and the remaining bytes are exposed via mmap. This patch changes the memory clearance to cover the all buffer pages if the stream is supposed to be mmap-ready (that guarantees that the buffer size is aligned in page size). Reviewed-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20201218145625.2045-3-tiwai@suse.de Signed-off-by: Takashi Iwai commit 5c1733e33c888a3cb7f576564d8ad543d5ad4a9e Author: Takashi Iwai Date: Fri Dec 18 15:56:24 2020 +0100 ALSA: memalloc: Align buffer allocations in page size Currently the standard memory allocator (snd_dma_malloc_pages*()) passes the byte size to allocate as is. Most of the backends allocates real pages, hence the actual allocations are aligned in page size. However, the genalloc doesn't seem assuring the size alignment, hence it may result in the access outside the buffer when the whole memory pages are exposed via mmap. For avoiding such inconsistencies, this patch makes the allocation size always to be aligned in page size. Note that, after this change, snd_dma_buffer.bytes field contains the aligned size, not the originally requested size. This value is also used for releasing the pages in return. Reviewed-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20201218145625.2045-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit 9df28edce7c6ab38050235f6f8b43dd7ccd01b6d Author: Takashi Iwai Date: Fri Dec 18 15:58:58 2020 +0100 ALSA: usb-audio: Disable sample read check if firmware doesn't give back Some buggy firmware don't give the current sample rate but leaves zero. Handle this case more gracefully without warning but just skip the current rate verification from the next time. Cc: Link: https://lore.kernel.org/r/20201218145858.2357-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit f2283366c2919fda71e6eb725c3e5c1bd47bae1a Author: Lars-Peter Clausen Date: Fri Dec 18 16:34:00 2020 +0100 ALSA: pcm: Remove snd_pcm_lib_preallocate_dma_free() Since commit d4cfb30fce03 ("ALSA: pcm: Set per-card upper limit of PCM buffer allocations") snd_pcm_lib_preallocate_dma_free() is a single line function that has one caller, which is another single line function. Clean this up a bit and remove snd_pcm_lib_preallocate_dma_free() and directly call do_free_pages() from snd_pcm_lib_preallocate_free(). This is a bit less boilerplate. Signed-off-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20201218153400.18394-1-lars@metafoo.de Signed-off-by: Takashi Iwai commit 91ea62d58bd661827c328a2c6c02a87fa4aae88b Author: Peter Zijlstra Date: Fri Dec 18 16:39:14 2020 +0100 softirq: Avoid bad tracing / lockdep interaction Similar to commit: 1a63dcd8765b ("softirq: Reorder trace_softirqs_on to prevent lockdep splat") __local_bh_enable_ip() can also call into tracing with inconsistent state. Unlike that commit we don't need to bother about the tracepoint because 'cnt-1' never matches preempt_count() (by construction). Reported-by: Heiko Carstens Signed-off-by: Peter Zijlstra (Intel) Tested-by: Heiko Carstens Link: https://lkml.kernel.org/r/20201218154519.GW3092@hirez.programming.kicks-ass.net commit 441fa3409769180df2fd12fcada35441435a120c Author: Peter Zijlstra Date: Wed Dec 16 14:19:22 2020 +0100 jump_label/static_call: Add MAINTAINERS These files don't appear to have a MAINTAINERS entry and as such patches miss being seen by people who know this code. Signed-off-by: Peter Zijlstra (Intel) Acked-by: Steven Rostedt (VMware) Acked-by: Ard Biesheuvel Acked-by: Josh Poimboeuf Acked-by: Jason Baron Link: https://lkml.kernel.org/r/20201216133014.GT3092@hirez.programming.kicks-ass.net commit 55d2eba8e7cd439c11cdb204898c2d384227629b Author: Peter Zijlstra Date: Wed Dec 16 12:21:36 2020 +0100 jump_label: Fix usage in module __init When the static_key is part of the module, and the module calls static_key_inc/enable() from it's __init section *AND* has a static_branch_*() user in that very same __init section, things go wobbly. If the static_key lives outside the module, jump_label_add_module() would append this module's sites to the key and jump_label_update() would take the static_key_linked() branch and all would be fine. If all the sites are outside of __init, then everything will be fine too. However, when all is aligned just as described above, jump_label_update() calls __jump_label_update(.init = false) and we'll not update sites in __init text. Fixes: 19483677684b ("jump_label: Annotate entries that operate on __init code earlier") Reported-by: Dexuan Cui Signed-off-by: Peter Zijlstra (Intel) Acked-by: Josh Poimboeuf Tested-by: Jessica Yu Link: https://lkml.kernel.org/r/20201216135435.GV3092@hirez.programming.kicks-ass.net commit 4efd7faba5e0687ae9143b7e6a19547ede20a7dd Merge: f96f62597ea48 046f70d31ddb2 Author: Daniel Vetter Date: Fri Dec 18 16:22:10 2020 +0100 Merge tag 'drm-intel-next-fixes-2020-12-18' of git://anongit.freedesktop.org/drm/drm-intel into drm-next drm/i915 fixes for the merge window Signed-off-by: Daniel Vetter From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87zh2bp34m.fsf@intel.com commit d467d80dc399ba77875d647f2f37b7d1a70d94c2 Author: Tian Tao Date: Wed Dec 16 10:47:15 2020 +0800 bpf: Remove unused including Remove including that don't need it. Signed-off-by: Tian Tao Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/1608086835-54523-1-git-send-email-tiantao6@hisilicon.com commit dfea9fce29fda6f2f91161677e0e0d9b671bc099 Author: Pavel Begunkov Date: Fri Dec 18 13:12:21 2020 +0000 io_uring: close a small race gap for files cancel The purpose of io_uring_cancel_files() is to wait for all requests matching ->files to go/be cancelled. We should first drop files of a request in io_req_drop_files() and only then make it undiscoverable for io_uring_cancel_files. First drop, then delete from list. It's ok to leave req->id->files dangling, because it's not dereferenced by cancellation code, only compared against. It would potentially go to sleep and be awaken by following in io_req_drop_files() wake_up(). Fixes: 0f2122045b946 ("io_uring: don't rely on weak ->files references") Cc: # 5.5+ Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 0020ef04e48571a88d4f482ad08f71052c5c5a08 Author: Xiaoguang Wang Date: Fri Dec 18 15:26:48 2020 +0800 io_uring: fix io_wqe->work_list corruption For the first time a req punted to io-wq, we'll initialize io_wq_work's list to be NULL, then insert req to io_wqe->work_list. If this req is not inserted into tail of io_wqe->work_list, this req's io_wq_work list will point to another req's io_wq_work. For splitted bio case, this req maybe inserted to io_wqe->work_list repeatedly, once we insert it to tail of io_wqe->work_list for the second time, now io_wq_work->list->next will be invalid pointer, which then result in many strang error, panic, kernel soft-lockup, rcu stall, etc. In my vm, kernel doest not have commit cc29e1bf0d63f7 ("block: disable iopoll for split bio"), below fio job can reproduce this bug steadily: [global] name=iouring-sqpoll-iopoll-1 ioengine=io_uring iodepth=128 numjobs=1 thread rw=randread direct=1 registerfiles=1 hipri=1 bs=4m size=100M runtime=120 time_based group_reporting randrepeat=0 [device] directory=/home/feiman.wxg/mntpoint/ # an ext4 mount point If we have commit cc29e1bf0d63f7 ("block: disable iopoll for split bio"), there will no splitted bio case for polled io, but I think we still to need to fix this list corruption, it also should maybe go to stable branchs. To fix this corruption, if a req is inserted into tail of io_wqe->work_list, initialize req->io_wq_work->list->next to bu NULL. Cc: stable@vger.kernel.org Signed-off-by: Xiaoguang Wang Reviewed-by: Pavel Begunkov Signed-off-by: Jens Axboe commit e79bb299ccad6983876686a4d8c87c92ebbe5657 Author: Colin Ian King Date: Mon Dec 14 22:35:39 2020 +0000 selftests/bpf: Fix spelling mistake "tranmission" -> "transmission" There are two spelling mistakes in output messages. Fix these. Signed-off-by: Colin Ian King Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20201214223539.83168-1-colin.king@canonical.com commit b1b95cb5c0a9694d47d5f845ba97e226cfda957d Author: Magnus Karlsson Date: Fri Dec 18 14:45:25 2020 +0100 xsk: Rollback reservation at NETDEV_TX_BUSY Rollback the reservation in the completion ring when we get a NETDEV_TX_BUSY. When this error is received from the driver, we are supposed to let the user application retry the transmit again. And in order to do this, we need to roll back the failed send so it can be retried. Unfortunately, we did not cancel the reservation we had made in the completion ring. By not doing this, we actually make the completion ring one entry smaller per NETDEV_TX_BUSY error we get, and after enough of these errors the completion ring will be of size zero and transmit will stop working. Fix this by cancelling the reservation when we get a NETDEV_TX_BUSY error. Fixes: 642e450b6b59 ("xsk: Do not discard packet when NETDEV_TX_BUSY") Reported-by: Xuan Zhuo Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/20201218134525.13119-3-magnus.karlsson@gmail.com commit f09ced4053bc0a2094a12b60b646114c966ef4c6 Author: Magnus Karlsson Date: Fri Dec 18 14:45:24 2020 +0100 xsk: Fix race in SKB mode transmit with shared cq Fix a race when multiple sockets are simultaneously calling sendto() when the completion ring is shared in the SKB case. This is the case when you share the same netdev and queue id through the XDP_SHARED_UMEM bind flag. The problem is that multiple processes can be in xsk_generic_xmit() and call the backpressure mechanism in xskq_prod_reserve(xs->pool->cq). As this is a shared resource in this specific scenario, a race might occur since the rings are single-producer single-consumer. Fix this by moving the tx_completion_lock from the socket to the pool as the pool is shared between the sockets that share the completion ring. (The pool is not shared when this is not the case.) And then protect the accesses to xskq_prod_reserve() with this lock. The tx_completion_lock is renamed cq_lock to better reflect that it protects accesses to the potentially shared completion ring. Fixes: 35fcde7f8deb ("xsk: support for Tx") Reported-by: Xuan Zhuo Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/20201218134525.13119-2-magnus.karlsson@gmail.com commit f96f62597ea48cc15d6b16bddf05dc25437dcf2d Author: Christian König Date: Fri Dec 18 14:42:43 2020 +0100 drm/qxl: don't allocate a dma_address array That seems to be unused. Daniel: Mike reported a warning when booting with qxl, which this patch fixes: [ 1.815561] WARNING: CPU: 7 PID: 355 at drivers/gpu/drm/ttm/ttm_pool.c:365 ttm_pool_alloc+0x41b/0x540 [ttm] Signed-off-by: Christian König Reported-by: Mike Galbraith Tested-by: Mike Galbraith References: https://lore.kernel.org/lkml/7cb43d5b-4e6a-defc-1ab6-5f713ad5a963@amd.com/ Reviewed-by: David Airlie [davnet: bring commit message up to par.] Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201218134243.110884-1-christian.koenig@amd.com commit 660a59953f4ff8a4958e73f7618445ff537582b2 Author: Dave Airlie Date: Fri Dec 18 06:09:43 2020 +1000 drm/nouveau: fix multihop when move doesn't work. As per the radeon/amdgpu fix don't use multihop if hw moves aren't enabled. Reported-by: Mike Galbraith Tested-by: Mike Galbraith Fixes: 0c8c0659d747 ("drm/nouveau/ttm: use multihop") Signed-off-by: Dave Airlie Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201217200943.30511-1-airlied@gmail.com commit a8cc263eb58ca133617662a5a5e07131d0ebf299 Author: Filipe Manana Date: Mon Dec 14 10:10:49 2020 +0000 btrfs: run delayed iputs when remounting RO to avoid leaking them When remounting RO, after setting the superblock with the RO flag, the cleaner task will start sleeping and do nothing, since the call to btrfs_need_cleaner_sleep() keeps returning 'true'. However, when the cleaner task goes to sleep, the list of delayed iputs may not be empty. As long as we are in RO mode, the cleaner task will keep sleeping and never run the delayed iputs. This means that if a filesystem unmount is started, we get into close_ctree() with a non-empty list of delayed iputs, and because the filesystem is in RO mode and is not in an error state (or a transaction aborted), btrfs_error_commit_super() and btrfs_commit_super(), which run the delayed iputs, are never called, and later we fail the assertion that checks if the delayed iputs list is empty: assertion failed: list_empty(&fs_info->delayed_iputs), in fs/btrfs/disk-io.c:4049 ------------[ cut here ]------------ kernel BUG at fs/btrfs/ctree.h:3153! invalid opcode: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC PTI CPU: 1 PID: 3780621 Comm: umount Tainted: G L 5.6.0-rc2-btrfs-next-73 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-0-ga698c8995f-prebuilt.qemu.org 04/01/2014 RIP: 0010:assertfail.constprop.0+0x18/0x26 [btrfs] Code: 8b 7b 58 48 85 ff 74 (...) RSP: 0018:ffffb748c89bbdf8 EFLAGS: 00010246 RAX: 0000000000000051 RBX: ffff9608f2584000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffffffff91998988 RDI: 00000000ffffffff RBP: ffff9608f25870d8 R08: 0000000000000000 R09: 0000000000000001 R10: 0000000000000000 R11: 0000000000000000 R12: ffffffffc0cbc500 R13: ffffffff92411750 R14: 0000000000000000 R15: ffff9608f2aab250 FS: 00007fcbfaa66c80(0000) GS:ffff960936c80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fffc2c2dd38 CR3: 0000000235e54002 CR4: 00000000003606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: close_ctree+0x1a2/0x2e6 [btrfs] generic_shutdown_super+0x6c/0x100 kill_anon_super+0x14/0x30 btrfs_kill_super+0x12/0x20 [btrfs] deactivate_locked_super+0x31/0x70 cleanup_mnt+0x100/0x160 task_work_run+0x93/0xc0 exit_to_usermode_loop+0xf9/0x100 do_syscall_64+0x20d/0x260 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fcbfaca6307 Code: eb 0b 00 f7 d8 64 89 (...) RSP: 002b:00007fffc2c2ed68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000558203b559b0 RCX: 00007fcbfaca6307 RDX: 0000000000000001 RSI: 0000000000000000 RDI: 0000558203b55bc0 RBP: 0000000000000000 R08: 0000000000000001 R09: 00007fffc2c2dad0 R10: 0000558203b55bf0 R11: 0000000000000246 R12: 0000558203b55bc0 R13: 00007fcbfadcc204 R14: 0000558203b55aa8 R15: 0000000000000000 Modules linked in: btrfs dm_flakey dm_log_writes (...) ---[ end trace d44d303790049ef6 ]--- So fix this by making the remount RO path run any remaining delayed iputs after waiting for the cleaner to become inactive. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0a31daa4b602ff6861fdf182236d64b2a353bace Author: Filipe Manana Date: Mon Dec 14 10:10:48 2020 +0000 btrfs: add assertion for empty list of transactions at late stage of umount Add an assertion to close_ctree(), after destroying all the work queues, to verify we do not have any transaction still open or committing at that at that point. If we have any, it means something is seriously wrong and that can cause memory leaks and use-after-free problems. This is motivated by the previous patches that fixed bugs where we ended up leaking an open transaction after unmounting the filesystem. Tested-by: Fabian Vogt Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit a0a1db70df5f48576fea6d08f0a69c05f3ab4cf4 Author: Filipe Manana Date: Mon Dec 14 10:10:47 2020 +0000 btrfs: fix race between RO remount and the cleaner task When we are remounting a filesystem in RO mode we can race with the cleaner task and result in leaking a transaction if the filesystem is unmounted shortly after, before the transaction kthread had a chance to commit that transaction. That also results in a crash during unmount, due to a use-after-free, if hardware acceleration is not available for crc32c. The following sequence of steps explains how the race happens. 1) The filesystem is mounted in RW mode and the cleaner task is running. This means that currently BTRFS_FS_CLEANER_RUNNING is set at fs_info->flags; 2) The cleaner task is currently running delayed iputs for example; 3) A filesystem RO remount operation starts; 4) The RO remount task calls btrfs_commit_super(), which commits any currently open transaction, and it finishes; 5) At this point the cleaner task is still running and it creates a new transaction by doing one of the following things: * When running the delayed iput() for an inode with a 0 link count, in which case at btrfs_evict_inode() we start a transaction through the call to evict_refill_and_join(), use it and then release its handle through btrfs_end_transaction(); * When deleting a dead root through btrfs_clean_one_deleted_snapshot(), a transaction is started at btrfs_drop_snapshot() and then its handle is released through a call to btrfs_end_transaction_throttle(); * When the remount task was still running, and before the remount task called btrfs_delete_unused_bgs(), the cleaner task also called btrfs_delete_unused_bgs() and it picked and removed one block group from the list of unused block groups. Before the cleaner task started a transaction, through btrfs_start_trans_remove_block_group() at btrfs_delete_unused_bgs(), the remount task had already called btrfs_commit_super(); 6) So at this point the filesystem is in RO mode and we have an open transaction that was started by the cleaner task; 7) Shortly after a filesystem unmount operation starts. At close_ctree() we stop the transaction kthread before it had a chance to commit the transaction, since less than 30 seconds (the default commit interval) have elapsed since the last transaction was committed; 8) We end up calling iput() against the btree inode at close_ctree() while there is an open transaction, and since that transaction was used to update btrees by the cleaner, we have dirty pages in the btree inode due to COW operations on metadata extents, and therefore writeback is triggered for the btree inode. So btree_write_cache_pages() is invoked to flush those dirty pages during the final iput() on the btree inode. This results in creating a bio and submitting it, which makes us end up at btrfs_submit_metadata_bio(); 9) At btrfs_submit_metadata_bio() we end up at the if-then-else branch that calls btrfs_wq_submit_bio(), because check_async_write() returned a value of 1. This value of 1 is because we did not have hardware acceleration available for crc32c, so BTRFS_FS_CSUM_IMPL_FAST was not set in fs_info->flags; 10) Then at btrfs_wq_submit_bio() we call btrfs_queue_work() against the workqueue at fs_info->workers, which was already freed before by the call to btrfs_stop_all_workers() at close_ctree(). This results in an invalid memory access due to a use-after-free, leading to a crash. When this happens, before the crash there are several warnings triggered, since we have reserved metadata space in a block group, the delayed refs reservation, etc: ------------[ cut here ]------------ WARNING: CPU: 4 PID: 1729896 at fs/btrfs/block-group.c:125 btrfs_put_block_group+0x63/0xa0 [btrfs] Modules linked in: btrfs dm_snapshot dm_thin_pool (...) CPU: 4 PID: 1729896 Comm: umount Tainted: G B W 5.10.0-rc4-btrfs-next-73 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 RIP: 0010:btrfs_put_block_group+0x63/0xa0 [btrfs] Code: f0 01 00 00 48 39 c2 75 (...) RSP: 0018:ffffb270826bbdd8 EFLAGS: 00010206 RAX: 0000000000000001 RBX: ffff947ed73e4000 RCX: ffff947ebc8b29c8 RDX: 0000000000000001 RSI: ffffffffc0b150a0 RDI: ffff947ebc8b2800 RBP: ffff947ebc8b2800 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000001 R12: ffff947ed73e4110 R13: ffff947ed73e4160 R14: ffff947ebc8b2988 R15: dead000000000100 FS: 00007f15edfea840(0000) GS:ffff9481ad600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f37e2893320 CR3: 0000000138f68001 CR4: 00000000003706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: btrfs_free_block_groups+0x17f/0x2f0 [btrfs] close_ctree+0x2ba/0x2fa [btrfs] generic_shutdown_super+0x6c/0x100 kill_anon_super+0x14/0x30 btrfs_kill_super+0x12/0x20 [btrfs] deactivate_locked_super+0x31/0x70 cleanup_mnt+0x100/0x160 task_work_run+0x68/0xb0 exit_to_user_mode_prepare+0x1bb/0x1c0 syscall_exit_to_user_mode+0x4b/0x260 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f15ee221ee7 Code: ff 0b 00 f7 d8 64 89 01 48 (...) RSP: 002b:00007ffe9470f0f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 00007f15ee347264 RCX: 00007f15ee221ee7 RDX: ffffffffffffff78 RSI: 0000000000000000 RDI: 000056169701d000 RBP: 0000561697018a30 R08: 0000000000000000 R09: 00007f15ee2e2be0 R10: 000056169701efe0 R11: 0000000000000246 R12: 0000000000000000 R13: 000056169701d000 R14: 0000561697018b40 R15: 0000561697018c60 irq event stamp: 0 hardirqs last enabled at (0): [<0000000000000000>] 0x0 hardirqs last disabled at (0): [] copy_process+0x8a0/0x1d70 softirqs last enabled at (0): [] copy_process+0x8a0/0x1d70 softirqs last disabled at (0): [<0000000000000000>] 0x0 ---[ end trace dd74718fef1ed5c6 ]--- ------------[ cut here ]------------ WARNING: CPU: 2 PID: 1729896 at fs/btrfs/block-rsv.c:459 btrfs_release_global_block_rsv+0x70/0xc0 [btrfs] Modules linked in: btrfs dm_snapshot dm_thin_pool (...) CPU: 2 PID: 1729896 Comm: umount Tainted: G B W 5.10.0-rc4-btrfs-next-73 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 RIP: 0010:btrfs_release_global_block_rsv+0x70/0xc0 [btrfs] Code: 48 83 bb b0 03 00 00 00 (...) RSP: 0018:ffffb270826bbdd8 EFLAGS: 00010206 RAX: 000000000033c000 RBX: ffff947ed73e4000 RCX: 0000000000000000 RDX: 0000000000000001 RSI: ffffffffc0b0d8c1 RDI: 00000000ffffffff RBP: ffff947ebc8b7000 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000001 R12: ffff947ed73e4110 R13: ffff947ed73e5278 R14: dead000000000122 R15: dead000000000100 FS: 00007f15edfea840(0000) GS:ffff9481aca00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000561a79f76e20 CR3: 0000000138f68006 CR4: 00000000003706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: btrfs_free_block_groups+0x24c/0x2f0 [btrfs] close_ctree+0x2ba/0x2fa [btrfs] generic_shutdown_super+0x6c/0x100 kill_anon_super+0x14/0x30 btrfs_kill_super+0x12/0x20 [btrfs] deactivate_locked_super+0x31/0x70 cleanup_mnt+0x100/0x160 task_work_run+0x68/0xb0 exit_to_user_mode_prepare+0x1bb/0x1c0 syscall_exit_to_user_mode+0x4b/0x260 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f15ee221ee7 Code: ff 0b 00 f7 d8 64 89 01 (...) RSP: 002b:00007ffe9470f0f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 00007f15ee347264 RCX: 00007f15ee221ee7 RDX: ffffffffffffff78 RSI: 0000000000000000 RDI: 000056169701d000 RBP: 0000561697018a30 R08: 0000000000000000 R09: 00007f15ee2e2be0 R10: 000056169701efe0 R11: 0000000000000246 R12: 0000000000000000 R13: 000056169701d000 R14: 0000561697018b40 R15: 0000561697018c60 irq event stamp: 0 hardirqs last enabled at (0): [<0000000000000000>] 0x0 hardirqs last disabled at (0): [] copy_process+0x8a0/0x1d70 softirqs last enabled at (0): [] copy_process+0x8a0/0x1d70 softirqs last disabled at (0): [<0000000000000000>] 0x0 ---[ end trace dd74718fef1ed5c7 ]--- ------------[ cut here ]------------ WARNING: CPU: 2 PID: 1729896 at fs/btrfs/block-group.c:3377 btrfs_free_block_groups+0x25d/0x2f0 [btrfs] Modules linked in: btrfs dm_snapshot dm_thin_pool (...) CPU: 5 PID: 1729896 Comm: umount Tainted: G B W 5.10.0-rc4-btrfs-next-73 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 RIP: 0010:btrfs_free_block_groups+0x25d/0x2f0 [btrfs] Code: ad de 49 be 22 01 00 (...) RSP: 0018:ffffb270826bbde8 EFLAGS: 00010206 RAX: ffff947ebeae1d08 RBX: ffff947ed73e4000 RCX: 0000000000000000 RDX: 0000000000000001 RSI: ffff947e9d823ae8 RDI: 0000000000000246 RBP: ffff947ebeae1d08 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000001 R12: ffff947ebeae1c00 R13: ffff947ed73e5278 R14: dead000000000122 R15: dead000000000100 FS: 00007f15edfea840(0000) GS:ffff9481ad200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f1475d98ea8 CR3: 0000000138f68005 CR4: 00000000003706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: close_ctree+0x2ba/0x2fa [btrfs] generic_shutdown_super+0x6c/0x100 kill_anon_super+0x14/0x30 btrfs_kill_super+0x12/0x20 [btrfs] deactivate_locked_super+0x31/0x70 cleanup_mnt+0x100/0x160 task_work_run+0x68/0xb0 exit_to_user_mode_prepare+0x1bb/0x1c0 syscall_exit_to_user_mode+0x4b/0x260 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f15ee221ee7 Code: ff 0b 00 f7 d8 64 89 (...) RSP: 002b:00007ffe9470f0f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 00007f15ee347264 RCX: 00007f15ee221ee7 RDX: ffffffffffffff78 RSI: 0000000000000000 RDI: 000056169701d000 RBP: 0000561697018a30 R08: 0000000000000000 R09: 00007f15ee2e2be0 R10: 000056169701efe0 R11: 0000000000000246 R12: 0000000000000000 R13: 000056169701d000 R14: 0000561697018b40 R15: 0000561697018c60 irq event stamp: 0 hardirqs last enabled at (0): [<0000000000000000>] 0x0 hardirqs last disabled at (0): [] copy_process+0x8a0/0x1d70 softirqs last enabled at (0): [] copy_process+0x8a0/0x1d70 softirqs last disabled at (0): [<0000000000000000>] 0x0 ---[ end trace dd74718fef1ed5c8 ]--- BTRFS info (device sdc): space_info 4 has 268238848 free, is not full BTRFS info (device sdc): space_info total=268435456, used=114688, pinned=0, reserved=16384, may_use=0, readonly=65536 BTRFS info (device sdc): global_block_rsv: size 0 reserved 0 BTRFS info (device sdc): trans_block_rsv: size 0 reserved 0 BTRFS info (device sdc): chunk_block_rsv: size 0 reserved 0 BTRFS info (device sdc): delayed_block_rsv: size 0 reserved 0 BTRFS info (device sdc): delayed_refs_rsv: size 524288 reserved 0 And the crash, which only happens when we do not have crc32c hardware acceleration, produces the following trace immediately after those warnings: stack segment: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC PTI CPU: 2 PID: 1749129 Comm: umount Tainted: G B W 5.10.0-rc4-btrfs-next-73 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 RIP: 0010:btrfs_queue_work+0x36/0x190 [btrfs] Code: 54 55 53 48 89 f3 (...) RSP: 0018:ffffb27082443ae8 EFLAGS: 00010282 RAX: 0000000000000004 RBX: ffff94810ee9ad90 RCX: 0000000000000000 RDX: 0000000000000001 RSI: ffff94810ee9ad90 RDI: ffff947ed8ee75a0 RBP: a56b6b6b6b6b6b6b R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000007 R11: 0000000000000001 R12: ffff947fa9b435a8 R13: ffff94810ee9ad90 R14: 0000000000000000 R15: ffff947e93dc0000 FS: 00007f3cfe974840(0000) GS:ffff9481ac600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f1b42995a70 CR3: 0000000127638003 CR4: 00000000003706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: btrfs_wq_submit_bio+0xb3/0xd0 [btrfs] btrfs_submit_metadata_bio+0x44/0xc0 [btrfs] submit_one_bio+0x61/0x70 [btrfs] btree_write_cache_pages+0x414/0x450 [btrfs] ? kobject_put+0x9a/0x1d0 ? trace_hardirqs_on+0x1b/0xf0 ? _raw_spin_unlock_irqrestore+0x3c/0x60 ? free_debug_processing+0x1e1/0x2b0 do_writepages+0x43/0xe0 ? lock_acquired+0x199/0x490 __writeback_single_inode+0x59/0x650 writeback_single_inode+0xaf/0x120 write_inode_now+0x94/0xd0 iput+0x187/0x2b0 close_ctree+0x2c6/0x2fa [btrfs] generic_shutdown_super+0x6c/0x100 kill_anon_super+0x14/0x30 btrfs_kill_super+0x12/0x20 [btrfs] deactivate_locked_super+0x31/0x70 cleanup_mnt+0x100/0x160 task_work_run+0x68/0xb0 exit_to_user_mode_prepare+0x1bb/0x1c0 syscall_exit_to_user_mode+0x4b/0x260 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f3cfebabee7 Code: ff 0b 00 f7 d8 64 89 01 (...) RSP: 002b:00007ffc9c9a05f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 00007f3cfecd1264 RCX: 00007f3cfebabee7 RDX: ffffffffffffff78 RSI: 0000000000000000 RDI: 0000562b6b478000 RBP: 0000562b6b473a30 R08: 0000000000000000 R09: 00007f3cfec6cbe0 R10: 0000562b6b479fe0 R11: 0000000000000246 R12: 0000000000000000 R13: 0000562b6b478000 R14: 0000562b6b473b40 R15: 0000562b6b473c60 Modules linked in: btrfs dm_snapshot dm_thin_pool (...) ---[ end trace dd74718fef1ed5cc ]--- Finally when we remove the btrfs module (rmmod btrfs), there are several warnings about objects that were allocated from our slabs but were never freed, consequence of the transaction that was never committed and got leaked: ============================================================================= BUG btrfs_delayed_ref_head (Tainted: G B W ): Objects remaining in btrfs_delayed_ref_head on __kmem_cache_shutdown() ----------------------------------------------------------------------------- INFO: Slab 0x0000000094c2ae56 objects=24 used=2 fp=0x000000002bfa2521 flags=0x17fffc000010200 CPU: 5 PID: 1729921 Comm: rmmod Tainted: G B W 5.10.0-rc4-btrfs-next-73 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack+0x8d/0xb5 slab_err+0xb7/0xdc ? lock_acquired+0x199/0x490 __kmem_cache_shutdown+0x1ac/0x3c0 ? lock_release+0x20e/0x4c0 kmem_cache_destroy+0x55/0x120 btrfs_delayed_ref_exit+0x11/0x35 [btrfs] exit_btrfs_fs+0xa/0x59 [btrfs] __x64_sys_delete_module+0x194/0x260 ? fpregs_assert_state_consistent+0x1e/0x40 ? exit_to_user_mode_prepare+0x55/0x1c0 ? trace_hardirqs_on+0x1b/0xf0 do_syscall_64+0x33/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f693e305897 Code: 73 01 c3 48 8b 0d f9 f5 (...) RSP: 002b:00007ffcf73eb508 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0 RAX: ffffffffffffffda RBX: 0000559df504f760 RCX: 00007f693e305897 RDX: 000000000000000a RSI: 0000000000000800 RDI: 0000559df504f7c8 RBP: 00007ffcf73eb568 R08: 0000000000000000 R09: 0000000000000000 R10: 00007f693e378ac0 R11: 0000000000000206 R12: 00007ffcf73eb740 R13: 00007ffcf73ec5a6 R14: 0000559df504f2a0 R15: 0000559df504f760 INFO: Object 0x0000000050cbdd61 @offset=12104 INFO: Allocated in btrfs_add_delayed_tree_ref+0xbb/0x480 [btrfs] age=1894 cpu=6 pid=1729873 __slab_alloc.isra.0+0x109/0x1c0 kmem_cache_alloc+0x7bb/0x830 btrfs_add_delayed_tree_ref+0xbb/0x480 [btrfs] btrfs_free_tree_block+0x128/0x360 [btrfs] __btrfs_cow_block+0x489/0x5f0 [btrfs] btrfs_cow_block+0xf7/0x220 [btrfs] btrfs_search_slot+0x62a/0xc40 [btrfs] btrfs_del_orphan_item+0x65/0xd0 [btrfs] btrfs_find_orphan_roots+0x1bf/0x200 [btrfs] open_ctree+0x125a/0x18a0 [btrfs] btrfs_mount_root.cold+0x13/0xed [btrfs] legacy_get_tree+0x30/0x60 vfs_get_tree+0x28/0xe0 fc_mount+0xe/0x40 vfs_kern_mount.part.0+0x71/0x90 btrfs_mount+0x13b/0x3e0 [btrfs] INFO: Freed in __btrfs_run_delayed_refs+0x1117/0x1290 [btrfs] age=4292 cpu=2 pid=1729526 kmem_cache_free+0x34c/0x3c0 __btrfs_run_delayed_refs+0x1117/0x1290 [btrfs] btrfs_run_delayed_refs+0x81/0x210 [btrfs] commit_cowonly_roots+0xfb/0x300 [btrfs] btrfs_commit_transaction+0x367/0xc40 [btrfs] sync_filesystem+0x74/0x90 generic_shutdown_super+0x22/0x100 kill_anon_super+0x14/0x30 btrfs_kill_super+0x12/0x20 [btrfs] deactivate_locked_super+0x31/0x70 cleanup_mnt+0x100/0x160 task_work_run+0x68/0xb0 exit_to_user_mode_prepare+0x1bb/0x1c0 syscall_exit_to_user_mode+0x4b/0x260 entry_SYSCALL_64_after_hwframe+0x44/0xa9 INFO: Object 0x0000000086e9b0ff @offset=12776 INFO: Allocated in btrfs_add_delayed_tree_ref+0xbb/0x480 [btrfs] age=1900 cpu=6 pid=1729873 __slab_alloc.isra.0+0x109/0x1c0 kmem_cache_alloc+0x7bb/0x830 btrfs_add_delayed_tree_ref+0xbb/0x480 [btrfs] btrfs_alloc_tree_block+0x2bf/0x360 [btrfs] alloc_tree_block_no_bg_flush+0x4f/0x60 [btrfs] __btrfs_cow_block+0x12d/0x5f0 [btrfs] btrfs_cow_block+0xf7/0x220 [btrfs] btrfs_search_slot+0x62a/0xc40 [btrfs] btrfs_del_orphan_item+0x65/0xd0 [btrfs] btrfs_find_orphan_roots+0x1bf/0x200 [btrfs] open_ctree+0x125a/0x18a0 [btrfs] btrfs_mount_root.cold+0x13/0xed [btrfs] legacy_get_tree+0x30/0x60 vfs_get_tree+0x28/0xe0 fc_mount+0xe/0x40 vfs_kern_mount.part.0+0x71/0x90 INFO: Freed in __btrfs_run_delayed_refs+0x1117/0x1290 [btrfs] age=3141 cpu=6 pid=1729803 kmem_cache_free+0x34c/0x3c0 __btrfs_run_delayed_refs+0x1117/0x1290 [btrfs] btrfs_run_delayed_refs+0x81/0x210 [btrfs] btrfs_write_dirty_block_groups+0x17d/0x3d0 [btrfs] commit_cowonly_roots+0x248/0x300 [btrfs] btrfs_commit_transaction+0x367/0xc40 [btrfs] close_ctree+0x113/0x2fa [btrfs] generic_shutdown_super+0x6c/0x100 kill_anon_super+0x14/0x30 btrfs_kill_super+0x12/0x20 [btrfs] deactivate_locked_super+0x31/0x70 cleanup_mnt+0x100/0x160 task_work_run+0x68/0xb0 exit_to_user_mode_prepare+0x1bb/0x1c0 syscall_exit_to_user_mode+0x4b/0x260 entry_SYSCALL_64_after_hwframe+0x44/0xa9 kmem_cache_destroy btrfs_delayed_ref_head: Slab cache still has objects CPU: 5 PID: 1729921 Comm: rmmod Tainted: G B W 5.10.0-rc4-btrfs-next-73 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack+0x8d/0xb5 kmem_cache_destroy+0x119/0x120 btrfs_delayed_ref_exit+0x11/0x35 [btrfs] exit_btrfs_fs+0xa/0x59 [btrfs] __x64_sys_delete_module+0x194/0x260 ? fpregs_assert_state_consistent+0x1e/0x40 ? exit_to_user_mode_prepare+0x55/0x1c0 ? trace_hardirqs_on+0x1b/0xf0 do_syscall_64+0x33/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f693e305897 Code: 73 01 c3 48 8b 0d f9 f5 0b (...) RSP: 002b:00007ffcf73eb508 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0 RAX: ffffffffffffffda RBX: 0000559df504f760 RCX: 00007f693e305897 RDX: 000000000000000a RSI: 0000000000000800 RDI: 0000559df504f7c8 RBP: 00007ffcf73eb568 R08: 0000000000000000 R09: 0000000000000000 R10: 00007f693e378ac0 R11: 0000000000000206 R12: 00007ffcf73eb740 R13: 00007ffcf73ec5a6 R14: 0000559df504f2a0 R15: 0000559df504f760 ============================================================================= BUG btrfs_delayed_tree_ref (Tainted: G B W ): Objects remaining in btrfs_delayed_tree_ref on __kmem_cache_shutdown() ----------------------------------------------------------------------------- INFO: Slab 0x0000000011f78dc0 objects=37 used=2 fp=0x0000000032d55d91 flags=0x17fffc000010200 CPU: 3 PID: 1729921 Comm: rmmod Tainted: G B W 5.10.0-rc4-btrfs-next-73 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack+0x8d/0xb5 slab_err+0xb7/0xdc ? lock_acquired+0x199/0x490 __kmem_cache_shutdown+0x1ac/0x3c0 ? lock_release+0x20e/0x4c0 kmem_cache_destroy+0x55/0x120 btrfs_delayed_ref_exit+0x1d/0x35 [btrfs] exit_btrfs_fs+0xa/0x59 [btrfs] __x64_sys_delete_module+0x194/0x260 ? fpregs_assert_state_consistent+0x1e/0x40 ? exit_to_user_mode_prepare+0x55/0x1c0 ? trace_hardirqs_on+0x1b/0xf0 do_syscall_64+0x33/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f693e305897 Code: 73 01 c3 48 8b 0d f9 f5 (...) RSP: 002b:00007ffcf73eb508 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0 RAX: ffffffffffffffda RBX: 0000559df504f760 RCX: 00007f693e305897 RDX: 000000000000000a RSI: 0000000000000800 RDI: 0000559df504f7c8 RBP: 00007ffcf73eb568 R08: 0000000000000000 R09: 0000000000000000 R10: 00007f693e378ac0 R11: 0000000000000206 R12: 00007ffcf73eb740 R13: 00007ffcf73ec5a6 R14: 0000559df504f2a0 R15: 0000559df504f760 INFO: Object 0x000000001a340018 @offset=4408 INFO: Allocated in btrfs_add_delayed_tree_ref+0x9e/0x480 [btrfs] age=1917 cpu=6 pid=1729873 __slab_alloc.isra.0+0x109/0x1c0 kmem_cache_alloc+0x7bb/0x830 btrfs_add_delayed_tree_ref+0x9e/0x480 [btrfs] btrfs_free_tree_block+0x128/0x360 [btrfs] __btrfs_cow_block+0x489/0x5f0 [btrfs] btrfs_cow_block+0xf7/0x220 [btrfs] btrfs_search_slot+0x62a/0xc40 [btrfs] btrfs_del_orphan_item+0x65/0xd0 [btrfs] btrfs_find_orphan_roots+0x1bf/0x200 [btrfs] open_ctree+0x125a/0x18a0 [btrfs] btrfs_mount_root.cold+0x13/0xed [btrfs] legacy_get_tree+0x30/0x60 vfs_get_tree+0x28/0xe0 fc_mount+0xe/0x40 vfs_kern_mount.part.0+0x71/0x90 btrfs_mount+0x13b/0x3e0 [btrfs] INFO: Freed in __btrfs_run_delayed_refs+0x63d/0x1290 [btrfs] age=4167 cpu=4 pid=1729795 kmem_cache_free+0x34c/0x3c0 __btrfs_run_delayed_refs+0x63d/0x1290 [btrfs] btrfs_run_delayed_refs+0x81/0x210 [btrfs] btrfs_commit_transaction+0x60/0xc40 [btrfs] create_subvol+0x56a/0x990 [btrfs] btrfs_mksubvol+0x3fb/0x4a0 [btrfs] __btrfs_ioctl_snap_create+0x119/0x1a0 [btrfs] btrfs_ioctl_snap_create+0x58/0x80 [btrfs] btrfs_ioctl+0x1a92/0x36f0 [btrfs] __x64_sys_ioctl+0x83/0xb0 do_syscall_64+0x33/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xa9 INFO: Object 0x000000002b46292a @offset=13648 INFO: Allocated in btrfs_add_delayed_tree_ref+0x9e/0x480 [btrfs] age=1923 cpu=6 pid=1729873 __slab_alloc.isra.0+0x109/0x1c0 kmem_cache_alloc+0x7bb/0x830 btrfs_add_delayed_tree_ref+0x9e/0x480 [btrfs] btrfs_alloc_tree_block+0x2bf/0x360 [btrfs] alloc_tree_block_no_bg_flush+0x4f/0x60 [btrfs] __btrfs_cow_block+0x12d/0x5f0 [btrfs] btrfs_cow_block+0xf7/0x220 [btrfs] btrfs_search_slot+0x62a/0xc40 [btrfs] btrfs_del_orphan_item+0x65/0xd0 [btrfs] btrfs_find_orphan_roots+0x1bf/0x200 [btrfs] open_ctree+0x125a/0x18a0 [btrfs] btrfs_mount_root.cold+0x13/0xed [btrfs] legacy_get_tree+0x30/0x60 vfs_get_tree+0x28/0xe0 fc_mount+0xe/0x40 vfs_kern_mount.part.0+0x71/0x90 INFO: Freed in __btrfs_run_delayed_refs+0x63d/0x1290 [btrfs] age=3164 cpu=6 pid=1729803 kmem_cache_free+0x34c/0x3c0 __btrfs_run_delayed_refs+0x63d/0x1290 [btrfs] btrfs_run_delayed_refs+0x81/0x210 [btrfs] commit_cowonly_roots+0xfb/0x300 [btrfs] btrfs_commit_transaction+0x367/0xc40 [btrfs] close_ctree+0x113/0x2fa [btrfs] generic_shutdown_super+0x6c/0x100 kill_anon_super+0x14/0x30 btrfs_kill_super+0x12/0x20 [btrfs] deactivate_locked_super+0x31/0x70 cleanup_mnt+0x100/0x160 task_work_run+0x68/0xb0 exit_to_user_mode_prepare+0x1bb/0x1c0 syscall_exit_to_user_mode+0x4b/0x260 entry_SYSCALL_64_after_hwframe+0x44/0xa9 kmem_cache_destroy btrfs_delayed_tree_ref: Slab cache still has objects CPU: 5 PID: 1729921 Comm: rmmod Tainted: G B W 5.10.0-rc4-btrfs-next-73 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack+0x8d/0xb5 kmem_cache_destroy+0x119/0x120 btrfs_delayed_ref_exit+0x1d/0x35 [btrfs] exit_btrfs_fs+0xa/0x59 [btrfs] __x64_sys_delete_module+0x194/0x260 ? fpregs_assert_state_consistent+0x1e/0x40 ? exit_to_user_mode_prepare+0x55/0x1c0 ? trace_hardirqs_on+0x1b/0xf0 do_syscall_64+0x33/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f693e305897 Code: 73 01 c3 48 8b 0d f9 f5 (...) RSP: 002b:00007ffcf73eb508 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0 RAX: ffffffffffffffda RBX: 0000559df504f760 RCX: 00007f693e305897 RDX: 000000000000000a RSI: 0000000000000800 RDI: 0000559df504f7c8 RBP: 00007ffcf73eb568 R08: 0000000000000000 R09: 0000000000000000 R10: 00007f693e378ac0 R11: 0000000000000206 R12: 00007ffcf73eb740 R13: 00007ffcf73ec5a6 R14: 0000559df504f2a0 R15: 0000559df504f760 ============================================================================= BUG btrfs_delayed_extent_op (Tainted: G B W ): Objects remaining in btrfs_delayed_extent_op on __kmem_cache_shutdown() ----------------------------------------------------------------------------- INFO: Slab 0x00000000f145ce2f objects=22 used=1 fp=0x00000000af0f92cf flags=0x17fffc000010200 CPU: 5 PID: 1729921 Comm: rmmod Tainted: G B W 5.10.0-rc4-btrfs-next-73 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack+0x8d/0xb5 slab_err+0xb7/0xdc ? lock_acquired+0x199/0x490 __kmem_cache_shutdown+0x1ac/0x3c0 ? __mutex_unlock_slowpath+0x45/0x2a0 kmem_cache_destroy+0x55/0x120 exit_btrfs_fs+0xa/0x59 [btrfs] __x64_sys_delete_module+0x194/0x260 ? fpregs_assert_state_consistent+0x1e/0x40 ? exit_to_user_mode_prepare+0x55/0x1c0 ? trace_hardirqs_on+0x1b/0xf0 do_syscall_64+0x33/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f693e305897 Code: 73 01 c3 48 8b 0d f9 f5 (...) RSP: 002b:00007ffcf73eb508 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0 RAX: ffffffffffffffda RBX: 0000559df504f760 RCX: 00007f693e305897 RDX: 000000000000000a RSI: 0000000000000800 RDI: 0000559df504f7c8 RBP: 00007ffcf73eb568 R08: 0000000000000000 R09: 0000000000000000 R10: 00007f693e378ac0 R11: 0000000000000206 R12: 00007ffcf73eb740 R13: 00007ffcf73ec5a6 R14: 0000559df504f2a0 R15: 0000559df504f760 INFO: Object 0x000000004cf95ea8 @offset=6264 INFO: Allocated in btrfs_alloc_tree_block+0x1e0/0x360 [btrfs] age=1931 cpu=6 pid=1729873 __slab_alloc.isra.0+0x109/0x1c0 kmem_cache_alloc+0x7bb/0x830 btrfs_alloc_tree_block+0x1e0/0x360 [btrfs] alloc_tree_block_no_bg_flush+0x4f/0x60 [btrfs] __btrfs_cow_block+0x12d/0x5f0 [btrfs] btrfs_cow_block+0xf7/0x220 [btrfs] btrfs_search_slot+0x62a/0xc40 [btrfs] btrfs_del_orphan_item+0x65/0xd0 [btrfs] btrfs_find_orphan_roots+0x1bf/0x200 [btrfs] open_ctree+0x125a/0x18a0 [btrfs] btrfs_mount_root.cold+0x13/0xed [btrfs] legacy_get_tree+0x30/0x60 vfs_get_tree+0x28/0xe0 fc_mount+0xe/0x40 vfs_kern_mount.part.0+0x71/0x90 btrfs_mount+0x13b/0x3e0 [btrfs] INFO: Freed in __btrfs_run_delayed_refs+0xabd/0x1290 [btrfs] age=3173 cpu=6 pid=1729803 kmem_cache_free+0x34c/0x3c0 __btrfs_run_delayed_refs+0xabd/0x1290 [btrfs] btrfs_run_delayed_refs+0x81/0x210 [btrfs] commit_cowonly_roots+0xfb/0x300 [btrfs] btrfs_commit_transaction+0x367/0xc40 [btrfs] close_ctree+0x113/0x2fa [btrfs] generic_shutdown_super+0x6c/0x100 kill_anon_super+0x14/0x30 btrfs_kill_super+0x12/0x20 [btrfs] deactivate_locked_super+0x31/0x70 cleanup_mnt+0x100/0x160 task_work_run+0x68/0xb0 exit_to_user_mode_prepare+0x1bb/0x1c0 syscall_exit_to_user_mode+0x4b/0x260 entry_SYSCALL_64_after_hwframe+0x44/0xa9 kmem_cache_destroy btrfs_delayed_extent_op: Slab cache still has objects CPU: 3 PID: 1729921 Comm: rmmod Tainted: G B W 5.10.0-rc4-btrfs-next-73 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack+0x8d/0xb5 kmem_cache_destroy+0x119/0x120 exit_btrfs_fs+0xa/0x59 [btrfs] __x64_sys_delete_module+0x194/0x260 ? fpregs_assert_state_consistent+0x1e/0x40 ? exit_to_user_mode_prepare+0x55/0x1c0 ? trace_hardirqs_on+0x1b/0xf0 do_syscall_64+0x33/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f693e305897 Code: 73 01 c3 48 8b 0d f9 (...) RSP: 002b:00007ffcf73eb508 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0 RAX: ffffffffffffffda RBX: 0000559df504f760 RCX: 00007f693e305897 RDX: 000000000000000a RSI: 0000000000000800 RDI: 0000559df504f7c8 RBP: 00007ffcf73eb568 R08: 0000000000000000 R09: 0000000000000000 R10: 00007f693e378ac0 R11: 0000000000000206 R12: 00007ffcf73eb740 R13: 00007ffcf73ec5a6 R14: 0000559df504f2a0 R15: 0000559df504f760 BTRFS: state leak: start 30408704 end 30425087 state 1 in tree 1 refs 1 So fix this by making the remount path to wait for the cleaner task before calling btrfs_commit_super(). The remount path now waits for the bit BTRFS_FS_CLEANER_RUNNING to be cleared from fs_info->flags before calling btrfs_commit_super() and this ensures the cleaner can not start a transaction after that, because it sleeps when the filesystem is in RO mode and we have already flagged the filesystem as RO before waiting for BTRFS_FS_CLEANER_RUNNING to be cleared. This also introduces a new flag BTRFS_FS_STATE_RO to be used for fs_info->fs_state when the filesystem is in RO mode. This is because we were doing the RO check using the flags of the superblock and setting the RO mode simply by ORing into the superblock's flags - those operations are not atomic and could result in the cleaner not seeing the update from the remount task after it clears BTRFS_FS_CLEANER_RUNNING. Tested-by: Fabian Vogt Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 638331fa56caeaa8b4d31cc1dfbe0ce989bcff67 Author: Filipe Manana Date: Mon Dec 14 10:10:46 2020 +0000 btrfs: fix transaction leak and crash after cleaning up orphans on RO mount When we delete a root (subvolume or snapshot), at the very end of the operation, we attempt to remove the root's orphan item from the root tree, at btrfs_drop_snapshot(), by calling btrfs_del_orphan_item(). We ignore any error from btrfs_del_orphan_item() since it is not a serious problem and the next time the filesystem is mounted we remove such stray orphan items at btrfs_find_orphan_roots(). However if the filesystem is mounted RO and we have stray orphan items for any previously deleted root, we can end up leaking a transaction and other data structures when unmounting the filesystem, as well as crashing if we do not have hardware acceleration for crc32c available. The steps that lead to the transaction leak are the following: 1) The filesystem is mounted in RW mode; 2) A subvolume is deleted; 3) When the cleaner kthread runs btrfs_drop_snapshot() to delete the root, it gets a failure at btrfs_del_orphan_item(), which is ignored, due to an ENOMEM when allocating a path for example. So the orphan item for the root remains in the root tree; 4) The filesystem is unmounted; 5) The filesystem is mounted RO (-o ro). During the mount path we call btrfs_find_orphan_roots(), which iterates the root tree searching for orphan items. It finds the orphan item for our deleted root, and since it can not find the root, it starts a transaction to delete the orphan item (by calling btrfs_del_orphan_item()); 6) The RO mount completes; 7) Before the transaction kthread commits the transaction created for deleting the orphan item (i.e. less than 30 seconds elapsed since the mount, the default commit interval), a filesystem unmount operation is started; 8) At close_ctree(), we stop the transaction kthread, but we still have a transaction open with at least one dirty extent buffer, a leaf for the tree root which was COWed when deleting the orphan item; 9) We then proceed to destroy the work queues, free the roots and block groups, etc. After that we drop the last reference on the btree inode by calling iput() on it. Since there are dirty pages for the btree inode, corresponding to the COWed extent buffer, btree_write_cache_pages() is invoked to flush those dirty pages. This results in creating a bio and submitting it, which makes us end up at btrfs_submit_metadata_bio(); 10) At btrfs_submit_metadata_bio() we end up at the if-then-else branch that calls btrfs_wq_submit_bio(), because check_async_write() returned a value of 1. This value of 1 is because we did not have hardware acceleration available for crc32c, so BTRFS_FS_CSUM_IMPL_FAST was not set in fs_info->flags; 11) Then at btrfs_wq_submit_bio() we call btrfs_queue_work() against the workqueue at fs_info->workers, which was already freed before by the call to btrfs_stop_all_workers() at close_ctree(). This results in an invalid memory access due to a use-after-free, leading to a crash. When this happens, before the crash there are several warnings triggered, since we have reserved metadata space in a block group, the delayed refs reservation, etc: ------------[ cut here ]------------ WARNING: CPU: 4 PID: 1729896 at fs/btrfs/block-group.c:125 btrfs_put_block_group+0x63/0xa0 [btrfs] Modules linked in: btrfs dm_snapshot dm_thin_pool (...) CPU: 4 PID: 1729896 Comm: umount Tainted: G B W 5.10.0-rc4-btrfs-next-73 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 RIP: 0010:btrfs_put_block_group+0x63/0xa0 [btrfs] Code: f0 01 00 00 48 39 c2 75 (...) RSP: 0018:ffffb270826bbdd8 EFLAGS: 00010206 RAX: 0000000000000001 RBX: ffff947ed73e4000 RCX: ffff947ebc8b29c8 RDX: 0000000000000001 RSI: ffffffffc0b150a0 RDI: ffff947ebc8b2800 RBP: ffff947ebc8b2800 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000001 R12: ffff947ed73e4110 R13: ffff947ed73e4160 R14: ffff947ebc8b2988 R15: dead000000000100 FS: 00007f15edfea840(0000) GS:ffff9481ad600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f37e2893320 CR3: 0000000138f68001 CR4: 00000000003706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: btrfs_free_block_groups+0x17f/0x2f0 [btrfs] close_ctree+0x2ba/0x2fa [btrfs] generic_shutdown_super+0x6c/0x100 kill_anon_super+0x14/0x30 btrfs_kill_super+0x12/0x20 [btrfs] deactivate_locked_super+0x31/0x70 cleanup_mnt+0x100/0x160 task_work_run+0x68/0xb0 exit_to_user_mode_prepare+0x1bb/0x1c0 syscall_exit_to_user_mode+0x4b/0x260 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f15ee221ee7 Code: ff 0b 00 f7 d8 64 89 01 48 (...) RSP: 002b:00007ffe9470f0f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 00007f15ee347264 RCX: 00007f15ee221ee7 RDX: ffffffffffffff78 RSI: 0000000000000000 RDI: 000056169701d000 RBP: 0000561697018a30 R08: 0000000000000000 R09: 00007f15ee2e2be0 R10: 000056169701efe0 R11: 0000000000000246 R12: 0000000000000000 R13: 000056169701d000 R14: 0000561697018b40 R15: 0000561697018c60 irq event stamp: 0 hardirqs last enabled at (0): [<0000000000000000>] 0x0 hardirqs last disabled at (0): [] copy_process+0x8a0/0x1d70 softirqs last enabled at (0): [] copy_process+0x8a0/0x1d70 softirqs last disabled at (0): [<0000000000000000>] 0x0 ---[ end trace dd74718fef1ed5c6 ]--- ------------[ cut here ]------------ WARNING: CPU: 2 PID: 1729896 at fs/btrfs/block-rsv.c:459 btrfs_release_global_block_rsv+0x70/0xc0 [btrfs] Modules linked in: btrfs dm_snapshot dm_thin_pool (...) CPU: 2 PID: 1729896 Comm: umount Tainted: G B W 5.10.0-rc4-btrfs-next-73 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 RIP: 0010:btrfs_release_global_block_rsv+0x70/0xc0 [btrfs] Code: 48 83 bb b0 03 00 00 00 (...) RSP: 0018:ffffb270826bbdd8 EFLAGS: 00010206 RAX: 000000000033c000 RBX: ffff947ed73e4000 RCX: 0000000000000000 RDX: 0000000000000001 RSI: ffffffffc0b0d8c1 RDI: 00000000ffffffff RBP: ffff947ebc8b7000 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000001 R12: ffff947ed73e4110 R13: ffff947ed73e5278 R14: dead000000000122 R15: dead000000000100 FS: 00007f15edfea840(0000) GS:ffff9481aca00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000561a79f76e20 CR3: 0000000138f68006 CR4: 00000000003706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: btrfs_free_block_groups+0x24c/0x2f0 [btrfs] close_ctree+0x2ba/0x2fa [btrfs] generic_shutdown_super+0x6c/0x100 kill_anon_super+0x14/0x30 btrfs_kill_super+0x12/0x20 [btrfs] deactivate_locked_super+0x31/0x70 cleanup_mnt+0x100/0x160 task_work_run+0x68/0xb0 exit_to_user_mode_prepare+0x1bb/0x1c0 syscall_exit_to_user_mode+0x4b/0x260 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f15ee221ee7 Code: ff 0b 00 f7 d8 64 89 01 (...) RSP: 002b:00007ffe9470f0f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 00007f15ee347264 RCX: 00007f15ee221ee7 RDX: ffffffffffffff78 RSI: 0000000000000000 RDI: 000056169701d000 RBP: 0000561697018a30 R08: 0000000000000000 R09: 00007f15ee2e2be0 R10: 000056169701efe0 R11: 0000000000000246 R12: 0000000000000000 R13: 000056169701d000 R14: 0000561697018b40 R15: 0000561697018c60 irq event stamp: 0 hardirqs last enabled at (0): [<0000000000000000>] 0x0 hardirqs last disabled at (0): [] copy_process+0x8a0/0x1d70 softirqs last enabled at (0): [] copy_process+0x8a0/0x1d70 softirqs last disabled at (0): [<0000000000000000>] 0x0 ---[ end trace dd74718fef1ed5c7 ]--- ------------[ cut here ]------------ WARNING: CPU: 2 PID: 1729896 at fs/btrfs/block-group.c:3377 btrfs_free_block_groups+0x25d/0x2f0 [btrfs] Modules linked in: btrfs dm_snapshot dm_thin_pool (...) CPU: 5 PID: 1729896 Comm: umount Tainted: G B W 5.10.0-rc4-btrfs-next-73 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 RIP: 0010:btrfs_free_block_groups+0x25d/0x2f0 [btrfs] Code: ad de 49 be 22 01 00 (...) RSP: 0018:ffffb270826bbde8 EFLAGS: 00010206 RAX: ffff947ebeae1d08 RBX: ffff947ed73e4000 RCX: 0000000000000000 RDX: 0000000000000001 RSI: ffff947e9d823ae8 RDI: 0000000000000246 RBP: ffff947ebeae1d08 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000001 R12: ffff947ebeae1c00 R13: ffff947ed73e5278 R14: dead000000000122 R15: dead000000000100 FS: 00007f15edfea840(0000) GS:ffff9481ad200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f1475d98ea8 CR3: 0000000138f68005 CR4: 00000000003706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: close_ctree+0x2ba/0x2fa [btrfs] generic_shutdown_super+0x6c/0x100 kill_anon_super+0x14/0x30 btrfs_kill_super+0x12/0x20 [btrfs] deactivate_locked_super+0x31/0x70 cleanup_mnt+0x100/0x160 task_work_run+0x68/0xb0 exit_to_user_mode_prepare+0x1bb/0x1c0 syscall_exit_to_user_mode+0x4b/0x260 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f15ee221ee7 Code: ff 0b 00 f7 d8 64 89 (...) RSP: 002b:00007ffe9470f0f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 00007f15ee347264 RCX: 00007f15ee221ee7 RDX: ffffffffffffff78 RSI: 0000000000000000 RDI: 000056169701d000 RBP: 0000561697018a30 R08: 0000000000000000 R09: 00007f15ee2e2be0 R10: 000056169701efe0 R11: 0000000000000246 R12: 0000000000000000 R13: 000056169701d000 R14: 0000561697018b40 R15: 0000561697018c60 irq event stamp: 0 hardirqs last enabled at (0): [<0000000000000000>] 0x0 hardirqs last disabled at (0): [] copy_process+0x8a0/0x1d70 softirqs last enabled at (0): [] copy_process+0x8a0/0x1d70 softirqs last disabled at (0): [<0000000000000000>] 0x0 ---[ end trace dd74718fef1ed5c8 ]--- BTRFS info (device sdc): space_info 4 has 268238848 free, is not full BTRFS info (device sdc): space_info total=268435456, used=114688, pinned=0, reserved=16384, may_use=0, readonly=65536 BTRFS info (device sdc): global_block_rsv: size 0 reserved 0 BTRFS info (device sdc): trans_block_rsv: size 0 reserved 0 BTRFS info (device sdc): chunk_block_rsv: size 0 reserved 0 BTRFS info (device sdc): delayed_block_rsv: size 0 reserved 0 BTRFS info (device sdc): delayed_refs_rsv: size 524288 reserved 0 And the crash, which only happens when we do not have crc32c hardware acceleration, produces the following trace immediately after those warnings: stack segment: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC PTI CPU: 2 PID: 1749129 Comm: umount Tainted: G B W 5.10.0-rc4-btrfs-next-73 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 RIP: 0010:btrfs_queue_work+0x36/0x190 [btrfs] Code: 54 55 53 48 89 f3 (...) RSP: 0018:ffffb27082443ae8 EFLAGS: 00010282 RAX: 0000000000000004 RBX: ffff94810ee9ad90 RCX: 0000000000000000 RDX: 0000000000000001 RSI: ffff94810ee9ad90 RDI: ffff947ed8ee75a0 RBP: a56b6b6b6b6b6b6b R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000007 R11: 0000000000000001 R12: ffff947fa9b435a8 R13: ffff94810ee9ad90 R14: 0000000000000000 R15: ffff947e93dc0000 FS: 00007f3cfe974840(0000) GS:ffff9481ac600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f1b42995a70 CR3: 0000000127638003 CR4: 00000000003706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: btrfs_wq_submit_bio+0xb3/0xd0 [btrfs] btrfs_submit_metadata_bio+0x44/0xc0 [btrfs] submit_one_bio+0x61/0x70 [btrfs] btree_write_cache_pages+0x414/0x450 [btrfs] ? kobject_put+0x9a/0x1d0 ? trace_hardirqs_on+0x1b/0xf0 ? _raw_spin_unlock_irqrestore+0x3c/0x60 ? free_debug_processing+0x1e1/0x2b0 do_writepages+0x43/0xe0 ? lock_acquired+0x199/0x490 __writeback_single_inode+0x59/0x650 writeback_single_inode+0xaf/0x120 write_inode_now+0x94/0xd0 iput+0x187/0x2b0 close_ctree+0x2c6/0x2fa [btrfs] generic_shutdown_super+0x6c/0x100 kill_anon_super+0x14/0x30 btrfs_kill_super+0x12/0x20 [btrfs] deactivate_locked_super+0x31/0x70 cleanup_mnt+0x100/0x160 task_work_run+0x68/0xb0 exit_to_user_mode_prepare+0x1bb/0x1c0 syscall_exit_to_user_mode+0x4b/0x260 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f3cfebabee7 Code: ff 0b 00 f7 d8 64 89 01 (...) RSP: 002b:00007ffc9c9a05f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 00007f3cfecd1264 RCX: 00007f3cfebabee7 RDX: ffffffffffffff78 RSI: 0000000000000000 RDI: 0000562b6b478000 RBP: 0000562b6b473a30 R08: 0000000000000000 R09: 00007f3cfec6cbe0 R10: 0000562b6b479fe0 R11: 0000000000000246 R12: 0000000000000000 R13: 0000562b6b478000 R14: 0000562b6b473b40 R15: 0000562b6b473c60 Modules linked in: btrfs dm_snapshot dm_thin_pool (...) ---[ end trace dd74718fef1ed5cc ]--- Finally when we remove the btrfs module (rmmod btrfs), there are several warnings about objects that were allocated from our slabs but were never freed, consequence of the transaction that was never committed and got leaked: ============================================================================= BUG btrfs_delayed_ref_head (Tainted: G B W ): Objects remaining in btrfs_delayed_ref_head on __kmem_cache_shutdown() ----------------------------------------------------------------------------- INFO: Slab 0x0000000094c2ae56 objects=24 used=2 fp=0x000000002bfa2521 flags=0x17fffc000010200 CPU: 5 PID: 1729921 Comm: rmmod Tainted: G B W 5.10.0-rc4-btrfs-next-73 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack+0x8d/0xb5 slab_err+0xb7/0xdc ? lock_acquired+0x199/0x490 __kmem_cache_shutdown+0x1ac/0x3c0 ? lock_release+0x20e/0x4c0 kmem_cache_destroy+0x55/0x120 btrfs_delayed_ref_exit+0x11/0x35 [btrfs] exit_btrfs_fs+0xa/0x59 [btrfs] __x64_sys_delete_module+0x194/0x260 ? fpregs_assert_state_consistent+0x1e/0x40 ? exit_to_user_mode_prepare+0x55/0x1c0 ? trace_hardirqs_on+0x1b/0xf0 do_syscall_64+0x33/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f693e305897 Code: 73 01 c3 48 8b 0d f9 f5 (...) RSP: 002b:00007ffcf73eb508 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0 RAX: ffffffffffffffda RBX: 0000559df504f760 RCX: 00007f693e305897 RDX: 000000000000000a RSI: 0000000000000800 RDI: 0000559df504f7c8 RBP: 00007ffcf73eb568 R08: 0000000000000000 R09: 0000000000000000 R10: 00007f693e378ac0 R11: 0000000000000206 R12: 00007ffcf73eb740 R13: 00007ffcf73ec5a6 R14: 0000559df504f2a0 R15: 0000559df504f760 INFO: Object 0x0000000050cbdd61 @offset=12104 INFO: Allocated in btrfs_add_delayed_tree_ref+0xbb/0x480 [btrfs] age=1894 cpu=6 pid=1729873 __slab_alloc.isra.0+0x109/0x1c0 kmem_cache_alloc+0x7bb/0x830 btrfs_add_delayed_tree_ref+0xbb/0x480 [btrfs] btrfs_free_tree_block+0x128/0x360 [btrfs] __btrfs_cow_block+0x489/0x5f0 [btrfs] btrfs_cow_block+0xf7/0x220 [btrfs] btrfs_search_slot+0x62a/0xc40 [btrfs] btrfs_del_orphan_item+0x65/0xd0 [btrfs] btrfs_find_orphan_roots+0x1bf/0x200 [btrfs] open_ctree+0x125a/0x18a0 [btrfs] btrfs_mount_root.cold+0x13/0xed [btrfs] legacy_get_tree+0x30/0x60 vfs_get_tree+0x28/0xe0 fc_mount+0xe/0x40 vfs_kern_mount.part.0+0x71/0x90 btrfs_mount+0x13b/0x3e0 [btrfs] INFO: Freed in __btrfs_run_delayed_refs+0x1117/0x1290 [btrfs] age=4292 cpu=2 pid=1729526 kmem_cache_free+0x34c/0x3c0 __btrfs_run_delayed_refs+0x1117/0x1290 [btrfs] btrfs_run_delayed_refs+0x81/0x210 [btrfs] commit_cowonly_roots+0xfb/0x300 [btrfs] btrfs_commit_transaction+0x367/0xc40 [btrfs] sync_filesystem+0x74/0x90 generic_shutdown_super+0x22/0x100 kill_anon_super+0x14/0x30 btrfs_kill_super+0x12/0x20 [btrfs] deactivate_locked_super+0x31/0x70 cleanup_mnt+0x100/0x160 task_work_run+0x68/0xb0 exit_to_user_mode_prepare+0x1bb/0x1c0 syscall_exit_to_user_mode+0x4b/0x260 entry_SYSCALL_64_after_hwframe+0x44/0xa9 INFO: Object 0x0000000086e9b0ff @offset=12776 INFO: Allocated in btrfs_add_delayed_tree_ref+0xbb/0x480 [btrfs] age=1900 cpu=6 pid=1729873 __slab_alloc.isra.0+0x109/0x1c0 kmem_cache_alloc+0x7bb/0x830 btrfs_add_delayed_tree_ref+0xbb/0x480 [btrfs] btrfs_alloc_tree_block+0x2bf/0x360 [btrfs] alloc_tree_block_no_bg_flush+0x4f/0x60 [btrfs] __btrfs_cow_block+0x12d/0x5f0 [btrfs] btrfs_cow_block+0xf7/0x220 [btrfs] btrfs_search_slot+0x62a/0xc40 [btrfs] btrfs_del_orphan_item+0x65/0xd0 [btrfs] btrfs_find_orphan_roots+0x1bf/0x200 [btrfs] open_ctree+0x125a/0x18a0 [btrfs] btrfs_mount_root.cold+0x13/0xed [btrfs] legacy_get_tree+0x30/0x60 vfs_get_tree+0x28/0xe0 fc_mount+0xe/0x40 vfs_kern_mount.part.0+0x71/0x90 INFO: Freed in __btrfs_run_delayed_refs+0x1117/0x1290 [btrfs] age=3141 cpu=6 pid=1729803 kmem_cache_free+0x34c/0x3c0 __btrfs_run_delayed_refs+0x1117/0x1290 [btrfs] btrfs_run_delayed_refs+0x81/0x210 [btrfs] btrfs_write_dirty_block_groups+0x17d/0x3d0 [btrfs] commit_cowonly_roots+0x248/0x300 [btrfs] btrfs_commit_transaction+0x367/0xc40 [btrfs] close_ctree+0x113/0x2fa [btrfs] generic_shutdown_super+0x6c/0x100 kill_anon_super+0x14/0x30 btrfs_kill_super+0x12/0x20 [btrfs] deactivate_locked_super+0x31/0x70 cleanup_mnt+0x100/0x160 task_work_run+0x68/0xb0 exit_to_user_mode_prepare+0x1bb/0x1c0 syscall_exit_to_user_mode+0x4b/0x260 entry_SYSCALL_64_after_hwframe+0x44/0xa9 kmem_cache_destroy btrfs_delayed_ref_head: Slab cache still has objects CPU: 5 PID: 1729921 Comm: rmmod Tainted: G B W 5.10.0-rc4-btrfs-next-73 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack+0x8d/0xb5 kmem_cache_destroy+0x119/0x120 btrfs_delayed_ref_exit+0x11/0x35 [btrfs] exit_btrfs_fs+0xa/0x59 [btrfs] __x64_sys_delete_module+0x194/0x260 ? fpregs_assert_state_consistent+0x1e/0x40 ? exit_to_user_mode_prepare+0x55/0x1c0 ? trace_hardirqs_on+0x1b/0xf0 do_syscall_64+0x33/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f693e305897 Code: 73 01 c3 48 8b 0d f9 f5 0b (...) RSP: 002b:00007ffcf73eb508 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0 RAX: ffffffffffffffda RBX: 0000559df504f760 RCX: 00007f693e305897 RDX: 000000000000000a RSI: 0000000000000800 RDI: 0000559df504f7c8 RBP: 00007ffcf73eb568 R08: 0000000000000000 R09: 0000000000000000 R10: 00007f693e378ac0 R11: 0000000000000206 R12: 00007ffcf73eb740 R13: 00007ffcf73ec5a6 R14: 0000559df504f2a0 R15: 0000559df504f760 ============================================================================= BUG btrfs_delayed_tree_ref (Tainted: G B W ): Objects remaining in btrfs_delayed_tree_ref on __kmem_cache_shutdown() ----------------------------------------------------------------------------- INFO: Slab 0x0000000011f78dc0 objects=37 used=2 fp=0x0000000032d55d91 flags=0x17fffc000010200 CPU: 3 PID: 1729921 Comm: rmmod Tainted: G B W 5.10.0-rc4-btrfs-next-73 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack+0x8d/0xb5 slab_err+0xb7/0xdc ? lock_acquired+0x199/0x490 __kmem_cache_shutdown+0x1ac/0x3c0 ? lock_release+0x20e/0x4c0 kmem_cache_destroy+0x55/0x120 btrfs_delayed_ref_exit+0x1d/0x35 [btrfs] exit_btrfs_fs+0xa/0x59 [btrfs] __x64_sys_delete_module+0x194/0x260 ? fpregs_assert_state_consistent+0x1e/0x40 ? exit_to_user_mode_prepare+0x55/0x1c0 ? trace_hardirqs_on+0x1b/0xf0 do_syscall_64+0x33/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f693e305897 Code: 73 01 c3 48 8b 0d f9 f5 (...) RSP: 002b:00007ffcf73eb508 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0 RAX: ffffffffffffffda RBX: 0000559df504f760 RCX: 00007f693e305897 RDX: 000000000000000a RSI: 0000000000000800 RDI: 0000559df504f7c8 RBP: 00007ffcf73eb568 R08: 0000000000000000 R09: 0000000000000000 R10: 00007f693e378ac0 R11: 0000000000000206 R12: 00007ffcf73eb740 R13: 00007ffcf73ec5a6 R14: 0000559df504f2a0 R15: 0000559df504f760 INFO: Object 0x000000001a340018 @offset=4408 INFO: Allocated in btrfs_add_delayed_tree_ref+0x9e/0x480 [btrfs] age=1917 cpu=6 pid=1729873 __slab_alloc.isra.0+0x109/0x1c0 kmem_cache_alloc+0x7bb/0x830 btrfs_add_delayed_tree_ref+0x9e/0x480 [btrfs] btrfs_free_tree_block+0x128/0x360 [btrfs] __btrfs_cow_block+0x489/0x5f0 [btrfs] btrfs_cow_block+0xf7/0x220 [btrfs] btrfs_search_slot+0x62a/0xc40 [btrfs] btrfs_del_orphan_item+0x65/0xd0 [btrfs] btrfs_find_orphan_roots+0x1bf/0x200 [btrfs] open_ctree+0x125a/0x18a0 [btrfs] btrfs_mount_root.cold+0x13/0xed [btrfs] legacy_get_tree+0x30/0x60 vfs_get_tree+0x28/0xe0 fc_mount+0xe/0x40 vfs_kern_mount.part.0+0x71/0x90 btrfs_mount+0x13b/0x3e0 [btrfs] INFO: Freed in __btrfs_run_delayed_refs+0x63d/0x1290 [btrfs] age=4167 cpu=4 pid=1729795 kmem_cache_free+0x34c/0x3c0 __btrfs_run_delayed_refs+0x63d/0x1290 [btrfs] btrfs_run_delayed_refs+0x81/0x210 [btrfs] btrfs_commit_transaction+0x60/0xc40 [btrfs] create_subvol+0x56a/0x990 [btrfs] btrfs_mksubvol+0x3fb/0x4a0 [btrfs] __btrfs_ioctl_snap_create+0x119/0x1a0 [btrfs] btrfs_ioctl_snap_create+0x58/0x80 [btrfs] btrfs_ioctl+0x1a92/0x36f0 [btrfs] __x64_sys_ioctl+0x83/0xb0 do_syscall_64+0x33/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xa9 INFO: Object 0x000000002b46292a @offset=13648 INFO: Allocated in btrfs_add_delayed_tree_ref+0x9e/0x480 [btrfs] age=1923 cpu=6 pid=1729873 __slab_alloc.isra.0+0x109/0x1c0 kmem_cache_alloc+0x7bb/0x830 btrfs_add_delayed_tree_ref+0x9e/0x480 [btrfs] btrfs_alloc_tree_block+0x2bf/0x360 [btrfs] alloc_tree_block_no_bg_flush+0x4f/0x60 [btrfs] __btrfs_cow_block+0x12d/0x5f0 [btrfs] btrfs_cow_block+0xf7/0x220 [btrfs] btrfs_search_slot+0x62a/0xc40 [btrfs] btrfs_del_orphan_item+0x65/0xd0 [btrfs] btrfs_find_orphan_roots+0x1bf/0x200 [btrfs] open_ctree+0x125a/0x18a0 [btrfs] btrfs_mount_root.cold+0x13/0xed [btrfs] legacy_get_tree+0x30/0x60 vfs_get_tree+0x28/0xe0 fc_mount+0xe/0x40 vfs_kern_mount.part.0+0x71/0x90 INFO: Freed in __btrfs_run_delayed_refs+0x63d/0x1290 [btrfs] age=3164 cpu=6 pid=1729803 kmem_cache_free+0x34c/0x3c0 __btrfs_run_delayed_refs+0x63d/0x1290 [btrfs] btrfs_run_delayed_refs+0x81/0x210 [btrfs] commit_cowonly_roots+0xfb/0x300 [btrfs] btrfs_commit_transaction+0x367/0xc40 [btrfs] close_ctree+0x113/0x2fa [btrfs] generic_shutdown_super+0x6c/0x100 kill_anon_super+0x14/0x30 btrfs_kill_super+0x12/0x20 [btrfs] deactivate_locked_super+0x31/0x70 cleanup_mnt+0x100/0x160 task_work_run+0x68/0xb0 exit_to_user_mode_prepare+0x1bb/0x1c0 syscall_exit_to_user_mode+0x4b/0x260 entry_SYSCALL_64_after_hwframe+0x44/0xa9 kmem_cache_destroy btrfs_delayed_tree_ref: Slab cache still has objects CPU: 5 PID: 1729921 Comm: rmmod Tainted: G B W 5.10.0-rc4-btrfs-next-73 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack+0x8d/0xb5 kmem_cache_destroy+0x119/0x120 btrfs_delayed_ref_exit+0x1d/0x35 [btrfs] exit_btrfs_fs+0xa/0x59 [btrfs] __x64_sys_delete_module+0x194/0x260 ? fpregs_assert_state_consistent+0x1e/0x40 ? exit_to_user_mode_prepare+0x55/0x1c0 ? trace_hardirqs_on+0x1b/0xf0 do_syscall_64+0x33/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f693e305897 Code: 73 01 c3 48 8b 0d f9 f5 (...) RSP: 002b:00007ffcf73eb508 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0 RAX: ffffffffffffffda RBX: 0000559df504f760 RCX: 00007f693e305897 RDX: 000000000000000a RSI: 0000000000000800 RDI: 0000559df504f7c8 RBP: 00007ffcf73eb568 R08: 0000000000000000 R09: 0000000000000000 R10: 00007f693e378ac0 R11: 0000000000000206 R12: 00007ffcf73eb740 R13: 00007ffcf73ec5a6 R14: 0000559df504f2a0 R15: 0000559df504f760 ============================================================================= BUG btrfs_delayed_extent_op (Tainted: G B W ): Objects remaining in btrfs_delayed_extent_op on __kmem_cache_shutdown() ----------------------------------------------------------------------------- INFO: Slab 0x00000000f145ce2f objects=22 used=1 fp=0x00000000af0f92cf flags=0x17fffc000010200 CPU: 5 PID: 1729921 Comm: rmmod Tainted: G B W 5.10.0-rc4-btrfs-next-73 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack+0x8d/0xb5 slab_err+0xb7/0xdc ? lock_acquired+0x199/0x490 __kmem_cache_shutdown+0x1ac/0x3c0 ? __mutex_unlock_slowpath+0x45/0x2a0 kmem_cache_destroy+0x55/0x120 exit_btrfs_fs+0xa/0x59 [btrfs] __x64_sys_delete_module+0x194/0x260 ? fpregs_assert_state_consistent+0x1e/0x40 ? exit_to_user_mode_prepare+0x55/0x1c0 ? trace_hardirqs_on+0x1b/0xf0 do_syscall_64+0x33/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f693e305897 Code: 73 01 c3 48 8b 0d f9 f5 (...) RSP: 002b:00007ffcf73eb508 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0 RAX: ffffffffffffffda RBX: 0000559df504f760 RCX: 00007f693e305897 RDX: 000000000000000a RSI: 0000000000000800 RDI: 0000559df504f7c8 RBP: 00007ffcf73eb568 R08: 0000000000000000 R09: 0000000000000000 R10: 00007f693e378ac0 R11: 0000000000000206 R12: 00007ffcf73eb740 R13: 00007ffcf73ec5a6 R14: 0000559df504f2a0 R15: 0000559df504f760 INFO: Object 0x000000004cf95ea8 @offset=6264 INFO: Allocated in btrfs_alloc_tree_block+0x1e0/0x360 [btrfs] age=1931 cpu=6 pid=1729873 __slab_alloc.isra.0+0x109/0x1c0 kmem_cache_alloc+0x7bb/0x830 btrfs_alloc_tree_block+0x1e0/0x360 [btrfs] alloc_tree_block_no_bg_flush+0x4f/0x60 [btrfs] __btrfs_cow_block+0x12d/0x5f0 [btrfs] btrfs_cow_block+0xf7/0x220 [btrfs] btrfs_search_slot+0x62a/0xc40 [btrfs] btrfs_del_orphan_item+0x65/0xd0 [btrfs] btrfs_find_orphan_roots+0x1bf/0x200 [btrfs] open_ctree+0x125a/0x18a0 [btrfs] btrfs_mount_root.cold+0x13/0xed [btrfs] legacy_get_tree+0x30/0x60 vfs_get_tree+0x28/0xe0 fc_mount+0xe/0x40 vfs_kern_mount.part.0+0x71/0x90 btrfs_mount+0x13b/0x3e0 [btrfs] INFO: Freed in __btrfs_run_delayed_refs+0xabd/0x1290 [btrfs] age=3173 cpu=6 pid=1729803 kmem_cache_free+0x34c/0x3c0 __btrfs_run_delayed_refs+0xabd/0x1290 [btrfs] btrfs_run_delayed_refs+0x81/0x210 [btrfs] commit_cowonly_roots+0xfb/0x300 [btrfs] btrfs_commit_transaction+0x367/0xc40 [btrfs] close_ctree+0x113/0x2fa [btrfs] generic_shutdown_super+0x6c/0x100 kill_anon_super+0x14/0x30 btrfs_kill_super+0x12/0x20 [btrfs] deactivate_locked_super+0x31/0x70 cleanup_mnt+0x100/0x160 task_work_run+0x68/0xb0 exit_to_user_mode_prepare+0x1bb/0x1c0 syscall_exit_to_user_mode+0x4b/0x260 entry_SYSCALL_64_after_hwframe+0x44/0xa9 kmem_cache_destroy btrfs_delayed_extent_op: Slab cache still has objects CPU: 3 PID: 1729921 Comm: rmmod Tainted: G B W 5.10.0-rc4-btrfs-next-73 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack+0x8d/0xb5 kmem_cache_destroy+0x119/0x120 exit_btrfs_fs+0xa/0x59 [btrfs] __x64_sys_delete_module+0x194/0x260 ? fpregs_assert_state_consistent+0x1e/0x40 ? exit_to_user_mode_prepare+0x55/0x1c0 ? trace_hardirqs_on+0x1b/0xf0 do_syscall_64+0x33/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f693e305897 Code: 73 01 c3 48 8b 0d f9 (...) RSP: 002b:00007ffcf73eb508 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0 RAX: ffffffffffffffda RBX: 0000559df504f760 RCX: 00007f693e305897 RDX: 000000000000000a RSI: 0000000000000800 RDI: 0000559df504f7c8 RBP: 00007ffcf73eb568 R08: 0000000000000000 R09: 0000000000000000 R10: 00007f693e378ac0 R11: 0000000000000206 R12: 00007ffcf73eb740 R13: 00007ffcf73ec5a6 R14: 0000559df504f2a0 R15: 0000559df504f760 BTRFS: state leak: start 30408704 end 30425087 state 1 in tree 1 refs 1 So fix this by calling btrfs_find_orphan_roots() in the mount path only if we are mounting the filesystem in RW mode. It's pointless to have it called for RO mounts anyway, since despite adding any deleted roots to the list of dead roots, we will never have the roots deleted until the filesystem is remounted in RW mode, as the cleaner kthread does nothing when we are mounted in RO - btrfs_need_cleaner_sleep() always returns true and the cleaner spends all time sleeping, never cleaning dead roots. This is accomplished by moving the call to btrfs_find_orphan_roots() from open_ctree() to btrfs_start_pre_rw_mount(), which also guarantees that if later the filesystem is remounted RW, we populate the list of dead roots and have the cleaner task delete the dead roots. Tested-by: Fabian Vogt Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit cb13eea3b49055bd78e6ddf39defd6340f7379fc Author: Filipe Manana Date: Mon Dec 14 10:10:45 2020 +0000 btrfs: fix transaction leak and crash after RO remount caused by qgroup rescan If we remount a filesystem in RO mode while the qgroup rescan worker is running, we can end up having it still running after the remount is done, and at unmount time we may end up with an open transaction that ends up never getting committed. If that happens we end up with several memory leaks and can crash when hardware acceleration is unavailable for crc32c. Possibly it can lead to other nasty surprises too, due to use-after-free issues. The following steps explain how the problem happens. 1) We have a filesystem mounted in RW mode and the qgroup rescan worker is running; 2) We remount the filesystem in RO mode, and never stop/pause the rescan worker, so after the remount the rescan worker is still running. The important detail here is that the rescan task is still running after the remount operation committed any ongoing transaction through its call to btrfs_commit_super(); 3) The rescan is still running, and after the remount completed, the rescan worker started a transaction, after it finished iterating all leaves of the extent tree, to update the qgroup status item in the quotas tree. It does not commit the transaction, it only releases its handle on the transaction; 4) A filesystem unmount operation starts shortly after; 5) The unmount task, at close_ctree(), stops the transaction kthread, which had not had a chance to commit the open transaction since it was sleeping and the commit interval (default of 30 seconds) has not yet elapsed since the last time it committed a transaction; 6) So after stopping the transaction kthread we still have the transaction used to update the qgroup status item open. At close_ctree(), when the filesystem is in RO mode and no transaction abort happened (or the filesystem is in error mode), we do not expect to have any transaction open, so we do not call btrfs_commit_super(); 7) We then proceed to destroy the work queues, free the roots and block groups, etc. After that we drop the last reference on the btree inode by calling iput() on it. Since there are dirty pages for the btree inode, corresponding to the COWed extent buffer for the quotas btree, btree_write_cache_pages() is invoked to flush those dirty pages. This results in creating a bio and submitting it, which makes us end up at btrfs_submit_metadata_bio(); 8) At btrfs_submit_metadata_bio() we end up at the if-then-else branch that calls btrfs_wq_submit_bio(), because check_async_write() returned a value of 1. This value of 1 is because we did not have hardware acceleration available for crc32c, so BTRFS_FS_CSUM_IMPL_FAST was not set in fs_info->flags; 9) Then at btrfs_wq_submit_bio() we call btrfs_queue_work() against the workqueue at fs_info->workers, which was already freed before by the call to btrfs_stop_all_workers() at close_ctree(). This results in an invalid memory access due to a use-after-free, leading to a crash. When this happens, before the crash there are several warnings triggered, since we have reserved metadata space in a block group, the delayed refs reservation, etc: ------------[ cut here ]------------ WARNING: CPU: 4 PID: 1729896 at fs/btrfs/block-group.c:125 btrfs_put_block_group+0x63/0xa0 [btrfs] Modules linked in: btrfs dm_snapshot dm_thin_pool (...) CPU: 4 PID: 1729896 Comm: umount Tainted: G B W 5.10.0-rc4-btrfs-next-73 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 RIP: 0010:btrfs_put_block_group+0x63/0xa0 [btrfs] Code: f0 01 00 00 48 39 c2 75 (...) RSP: 0018:ffffb270826bbdd8 EFLAGS: 00010206 RAX: 0000000000000001 RBX: ffff947ed73e4000 RCX: ffff947ebc8b29c8 RDX: 0000000000000001 RSI: ffffffffc0b150a0 RDI: ffff947ebc8b2800 RBP: ffff947ebc8b2800 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000001 R12: ffff947ed73e4110 R13: ffff947ed73e4160 R14: ffff947ebc8b2988 R15: dead000000000100 FS: 00007f15edfea840(0000) GS:ffff9481ad600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f37e2893320 CR3: 0000000138f68001 CR4: 00000000003706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: btrfs_free_block_groups+0x17f/0x2f0 [btrfs] close_ctree+0x2ba/0x2fa [btrfs] generic_shutdown_super+0x6c/0x100 kill_anon_super+0x14/0x30 btrfs_kill_super+0x12/0x20 [btrfs] deactivate_locked_super+0x31/0x70 cleanup_mnt+0x100/0x160 task_work_run+0x68/0xb0 exit_to_user_mode_prepare+0x1bb/0x1c0 syscall_exit_to_user_mode+0x4b/0x260 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f15ee221ee7 Code: ff 0b 00 f7 d8 64 89 01 48 (...) RSP: 002b:00007ffe9470f0f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 00007f15ee347264 RCX: 00007f15ee221ee7 RDX: ffffffffffffff78 RSI: 0000000000000000 RDI: 000056169701d000 RBP: 0000561697018a30 R08: 0000000000000000 R09: 00007f15ee2e2be0 R10: 000056169701efe0 R11: 0000000000000246 R12: 0000000000000000 R13: 000056169701d000 R14: 0000561697018b40 R15: 0000561697018c60 irq event stamp: 0 hardirqs last enabled at (0): [<0000000000000000>] 0x0 hardirqs last disabled at (0): [] copy_process+0x8a0/0x1d70 softirqs last enabled at (0): [] copy_process+0x8a0/0x1d70 softirqs last disabled at (0): [<0000000000000000>] 0x0 ---[ end trace dd74718fef1ed5c6 ]--- ------------[ cut here ]------------ WARNING: CPU: 2 PID: 1729896 at fs/btrfs/block-rsv.c:459 btrfs_release_global_block_rsv+0x70/0xc0 [btrfs] Modules linked in: btrfs dm_snapshot dm_thin_pool (...) CPU: 2 PID: 1729896 Comm: umount Tainted: G B W 5.10.0-rc4-btrfs-next-73 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 RIP: 0010:btrfs_release_global_block_rsv+0x70/0xc0 [btrfs] Code: 48 83 bb b0 03 00 00 00 (...) RSP: 0018:ffffb270826bbdd8 EFLAGS: 00010206 RAX: 000000000033c000 RBX: ffff947ed73e4000 RCX: 0000000000000000 RDX: 0000000000000001 RSI: ffffffffc0b0d8c1 RDI: 00000000ffffffff RBP: ffff947ebc8b7000 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000001 R12: ffff947ed73e4110 R13: ffff947ed73e5278 R14: dead000000000122 R15: dead000000000100 FS: 00007f15edfea840(0000) GS:ffff9481aca00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000561a79f76e20 CR3: 0000000138f68006 CR4: 00000000003706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: btrfs_free_block_groups+0x24c/0x2f0 [btrfs] close_ctree+0x2ba/0x2fa [btrfs] generic_shutdown_super+0x6c/0x100 kill_anon_super+0x14/0x30 btrfs_kill_super+0x12/0x20 [btrfs] deactivate_locked_super+0x31/0x70 cleanup_mnt+0x100/0x160 task_work_run+0x68/0xb0 exit_to_user_mode_prepare+0x1bb/0x1c0 syscall_exit_to_user_mode+0x4b/0x260 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f15ee221ee7 Code: ff 0b 00 f7 d8 64 89 01 (...) RSP: 002b:00007ffe9470f0f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 00007f15ee347264 RCX: 00007f15ee221ee7 RDX: ffffffffffffff78 RSI: 0000000000000000 RDI: 000056169701d000 RBP: 0000561697018a30 R08: 0000000000000000 R09: 00007f15ee2e2be0 R10: 000056169701efe0 R11: 0000000000000246 R12: 0000000000000000 R13: 000056169701d000 R14: 0000561697018b40 R15: 0000561697018c60 irq event stamp: 0 hardirqs last enabled at (0): [<0000000000000000>] 0x0 hardirqs last disabled at (0): [] copy_process+0x8a0/0x1d70 softirqs last enabled at (0): [] copy_process+0x8a0/0x1d70 softirqs last disabled at (0): [<0000000000000000>] 0x0 ---[ end trace dd74718fef1ed5c7 ]--- ------------[ cut here ]------------ WARNING: CPU: 2 PID: 1729896 at fs/btrfs/block-group.c:3377 btrfs_free_block_groups+0x25d/0x2f0 [btrfs] Modules linked in: btrfs dm_snapshot dm_thin_pool (...) CPU: 5 PID: 1729896 Comm: umount Tainted: G B W 5.10.0-rc4-btrfs-next-73 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 RIP: 0010:btrfs_free_block_groups+0x25d/0x2f0 [btrfs] Code: ad de 49 be 22 01 00 (...) RSP: 0018:ffffb270826bbde8 EFLAGS: 00010206 RAX: ffff947ebeae1d08 RBX: ffff947ed73e4000 RCX: 0000000000000000 RDX: 0000000000000001 RSI: ffff947e9d823ae8 RDI: 0000000000000246 RBP: ffff947ebeae1d08 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000001 R12: ffff947ebeae1c00 R13: ffff947ed73e5278 R14: dead000000000122 R15: dead000000000100 FS: 00007f15edfea840(0000) GS:ffff9481ad200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f1475d98ea8 CR3: 0000000138f68005 CR4: 00000000003706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: close_ctree+0x2ba/0x2fa [btrfs] generic_shutdown_super+0x6c/0x100 kill_anon_super+0x14/0x30 btrfs_kill_super+0x12/0x20 [btrfs] deactivate_locked_super+0x31/0x70 cleanup_mnt+0x100/0x160 task_work_run+0x68/0xb0 exit_to_user_mode_prepare+0x1bb/0x1c0 syscall_exit_to_user_mode+0x4b/0x260 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f15ee221ee7 Code: ff 0b 00 f7 d8 64 89 (...) RSP: 002b:00007ffe9470f0f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 00007f15ee347264 RCX: 00007f15ee221ee7 RDX: ffffffffffffff78 RSI: 0000000000000000 RDI: 000056169701d000 RBP: 0000561697018a30 R08: 0000000000000000 R09: 00007f15ee2e2be0 R10: 000056169701efe0 R11: 0000000000000246 R12: 0000000000000000 R13: 000056169701d000 R14: 0000561697018b40 R15: 0000561697018c60 irq event stamp: 0 hardirqs last enabled at (0): [<0000000000000000>] 0x0 hardirqs last disabled at (0): [] copy_process+0x8a0/0x1d70 softirqs last enabled at (0): [] copy_process+0x8a0/0x1d70 softirqs last disabled at (0): [<0000000000000000>] 0x0 ---[ end trace dd74718fef1ed5c8 ]--- BTRFS info (device sdc): space_info 4 has 268238848 free, is not full BTRFS info (device sdc): space_info total=268435456, used=114688, pinned=0, reserved=16384, may_use=0, readonly=65536 BTRFS info (device sdc): global_block_rsv: size 0 reserved 0 BTRFS info (device sdc): trans_block_rsv: size 0 reserved 0 BTRFS info (device sdc): chunk_block_rsv: size 0 reserved 0 BTRFS info (device sdc): delayed_block_rsv: size 0 reserved 0 BTRFS info (device sdc): delayed_refs_rsv: size 524288 reserved 0 And the crash, which only happens when we do not have crc32c hardware acceleration, produces the following trace immediately after those warnings: stack segment: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC PTI CPU: 2 PID: 1749129 Comm: umount Tainted: G B W 5.10.0-rc4-btrfs-next-73 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 RIP: 0010:btrfs_queue_work+0x36/0x190 [btrfs] Code: 54 55 53 48 89 f3 (...) RSP: 0018:ffffb27082443ae8 EFLAGS: 00010282 RAX: 0000000000000004 RBX: ffff94810ee9ad90 RCX: 0000000000000000 RDX: 0000000000000001 RSI: ffff94810ee9ad90 RDI: ffff947ed8ee75a0 RBP: a56b6b6b6b6b6b6b R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000007 R11: 0000000000000001 R12: ffff947fa9b435a8 R13: ffff94810ee9ad90 R14: 0000000000000000 R15: ffff947e93dc0000 FS: 00007f3cfe974840(0000) GS:ffff9481ac600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f1b42995a70 CR3: 0000000127638003 CR4: 00000000003706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: btrfs_wq_submit_bio+0xb3/0xd0 [btrfs] btrfs_submit_metadata_bio+0x44/0xc0 [btrfs] submit_one_bio+0x61/0x70 [btrfs] btree_write_cache_pages+0x414/0x450 [btrfs] ? kobject_put+0x9a/0x1d0 ? trace_hardirqs_on+0x1b/0xf0 ? _raw_spin_unlock_irqrestore+0x3c/0x60 ? free_debug_processing+0x1e1/0x2b0 do_writepages+0x43/0xe0 ? lock_acquired+0x199/0x490 __writeback_single_inode+0x59/0x650 writeback_single_inode+0xaf/0x120 write_inode_now+0x94/0xd0 iput+0x187/0x2b0 close_ctree+0x2c6/0x2fa [btrfs] generic_shutdown_super+0x6c/0x100 kill_anon_super+0x14/0x30 btrfs_kill_super+0x12/0x20 [btrfs] deactivate_locked_super+0x31/0x70 cleanup_mnt+0x100/0x160 task_work_run+0x68/0xb0 exit_to_user_mode_prepare+0x1bb/0x1c0 syscall_exit_to_user_mode+0x4b/0x260 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f3cfebabee7 Code: ff 0b 00 f7 d8 64 89 01 (...) RSP: 002b:00007ffc9c9a05f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 00007f3cfecd1264 RCX: 00007f3cfebabee7 RDX: ffffffffffffff78 RSI: 0000000000000000 RDI: 0000562b6b478000 RBP: 0000562b6b473a30 R08: 0000000000000000 R09: 00007f3cfec6cbe0 R10: 0000562b6b479fe0 R11: 0000000000000246 R12: 0000000000000000 R13: 0000562b6b478000 R14: 0000562b6b473b40 R15: 0000562b6b473c60 Modules linked in: btrfs dm_snapshot dm_thin_pool (...) ---[ end trace dd74718fef1ed5cc ]--- Finally when we remove the btrfs module (rmmod btrfs), there are several warnings about objects that were allocated from our slabs but were never freed, consequence of the transaction that was never committed and got leaked: ============================================================================= BUG btrfs_delayed_ref_head (Tainted: G B W ): Objects remaining in btrfs_delayed_ref_head on __kmem_cache_shutdown() ----------------------------------------------------------------------------- INFO: Slab 0x0000000094c2ae56 objects=24 used=2 fp=0x000000002bfa2521 flags=0x17fffc000010200 CPU: 5 PID: 1729921 Comm: rmmod Tainted: G B W 5.10.0-rc4-btrfs-next-73 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack+0x8d/0xb5 slab_err+0xb7/0xdc ? lock_acquired+0x199/0x490 __kmem_cache_shutdown+0x1ac/0x3c0 ? lock_release+0x20e/0x4c0 kmem_cache_destroy+0x55/0x120 btrfs_delayed_ref_exit+0x11/0x35 [btrfs] exit_btrfs_fs+0xa/0x59 [btrfs] __x64_sys_delete_module+0x194/0x260 ? fpregs_assert_state_consistent+0x1e/0x40 ? exit_to_user_mode_prepare+0x55/0x1c0 ? trace_hardirqs_on+0x1b/0xf0 do_syscall_64+0x33/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f693e305897 Code: 73 01 c3 48 8b 0d f9 f5 (...) RSP: 002b:00007ffcf73eb508 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0 RAX: ffffffffffffffda RBX: 0000559df504f760 RCX: 00007f693e305897 RDX: 000000000000000a RSI: 0000000000000800 RDI: 0000559df504f7c8 RBP: 00007ffcf73eb568 R08: 0000000000000000 R09: 0000000000000000 R10: 00007f693e378ac0 R11: 0000000000000206 R12: 00007ffcf73eb740 R13: 00007ffcf73ec5a6 R14: 0000559df504f2a0 R15: 0000559df504f760 INFO: Object 0x0000000050cbdd61 @offset=12104 INFO: Allocated in btrfs_add_delayed_tree_ref+0xbb/0x480 [btrfs] age=1894 cpu=6 pid=1729873 __slab_alloc.isra.0+0x109/0x1c0 kmem_cache_alloc+0x7bb/0x830 btrfs_add_delayed_tree_ref+0xbb/0x480 [btrfs] btrfs_free_tree_block+0x128/0x360 [btrfs] __btrfs_cow_block+0x489/0x5f0 [btrfs] btrfs_cow_block+0xf7/0x220 [btrfs] btrfs_search_slot+0x62a/0xc40 [btrfs] btrfs_del_orphan_item+0x65/0xd0 [btrfs] btrfs_find_orphan_roots+0x1bf/0x200 [btrfs] open_ctree+0x125a/0x18a0 [btrfs] btrfs_mount_root.cold+0x13/0xed [btrfs] legacy_get_tree+0x30/0x60 vfs_get_tree+0x28/0xe0 fc_mount+0xe/0x40 vfs_kern_mount.part.0+0x71/0x90 btrfs_mount+0x13b/0x3e0 [btrfs] INFO: Freed in __btrfs_run_delayed_refs+0x1117/0x1290 [btrfs] age=4292 cpu=2 pid=1729526 kmem_cache_free+0x34c/0x3c0 __btrfs_run_delayed_refs+0x1117/0x1290 [btrfs] btrfs_run_delayed_refs+0x81/0x210 [btrfs] commit_cowonly_roots+0xfb/0x300 [btrfs] btrfs_commit_transaction+0x367/0xc40 [btrfs] sync_filesystem+0x74/0x90 generic_shutdown_super+0x22/0x100 kill_anon_super+0x14/0x30 btrfs_kill_super+0x12/0x20 [btrfs] deactivate_locked_super+0x31/0x70 cleanup_mnt+0x100/0x160 task_work_run+0x68/0xb0 exit_to_user_mode_prepare+0x1bb/0x1c0 syscall_exit_to_user_mode+0x4b/0x260 entry_SYSCALL_64_after_hwframe+0x44/0xa9 INFO: Object 0x0000000086e9b0ff @offset=12776 INFO: Allocated in btrfs_add_delayed_tree_ref+0xbb/0x480 [btrfs] age=1900 cpu=6 pid=1729873 __slab_alloc.isra.0+0x109/0x1c0 kmem_cache_alloc+0x7bb/0x830 btrfs_add_delayed_tree_ref+0xbb/0x480 [btrfs] btrfs_alloc_tree_block+0x2bf/0x360 [btrfs] alloc_tree_block_no_bg_flush+0x4f/0x60 [btrfs] __btrfs_cow_block+0x12d/0x5f0 [btrfs] btrfs_cow_block+0xf7/0x220 [btrfs] btrfs_search_slot+0x62a/0xc40 [btrfs] btrfs_del_orphan_item+0x65/0xd0 [btrfs] btrfs_find_orphan_roots+0x1bf/0x200 [btrfs] open_ctree+0x125a/0x18a0 [btrfs] btrfs_mount_root.cold+0x13/0xed [btrfs] legacy_get_tree+0x30/0x60 vfs_get_tree+0x28/0xe0 fc_mount+0xe/0x40 vfs_kern_mount.part.0+0x71/0x90 INFO: Freed in __btrfs_run_delayed_refs+0x1117/0x1290 [btrfs] age=3141 cpu=6 pid=1729803 kmem_cache_free+0x34c/0x3c0 __btrfs_run_delayed_refs+0x1117/0x1290 [btrfs] btrfs_run_delayed_refs+0x81/0x210 [btrfs] btrfs_write_dirty_block_groups+0x17d/0x3d0 [btrfs] commit_cowonly_roots+0x248/0x300 [btrfs] btrfs_commit_transaction+0x367/0xc40 [btrfs] close_ctree+0x113/0x2fa [btrfs] generic_shutdown_super+0x6c/0x100 kill_anon_super+0x14/0x30 btrfs_kill_super+0x12/0x20 [btrfs] deactivate_locked_super+0x31/0x70 cleanup_mnt+0x100/0x160 task_work_run+0x68/0xb0 exit_to_user_mode_prepare+0x1bb/0x1c0 syscall_exit_to_user_mode+0x4b/0x260 entry_SYSCALL_64_after_hwframe+0x44/0xa9 kmem_cache_destroy btrfs_delayed_ref_head: Slab cache still has objects CPU: 5 PID: 1729921 Comm: rmmod Tainted: G B W 5.10.0-rc4-btrfs-next-73 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack+0x8d/0xb5 kmem_cache_destroy+0x119/0x120 btrfs_delayed_ref_exit+0x11/0x35 [btrfs] exit_btrfs_fs+0xa/0x59 [btrfs] __x64_sys_delete_module+0x194/0x260 ? fpregs_assert_state_consistent+0x1e/0x40 ? exit_to_user_mode_prepare+0x55/0x1c0 ? trace_hardirqs_on+0x1b/0xf0 do_syscall_64+0x33/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f693e305897 Code: 73 01 c3 48 8b 0d f9 f5 0b (...) RSP: 002b:00007ffcf73eb508 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0 RAX: ffffffffffffffda RBX: 0000559df504f760 RCX: 00007f693e305897 RDX: 000000000000000a RSI: 0000000000000800 RDI: 0000559df504f7c8 RBP: 00007ffcf73eb568 R08: 0000000000000000 R09: 0000000000000000 R10: 00007f693e378ac0 R11: 0000000000000206 R12: 00007ffcf73eb740 R13: 00007ffcf73ec5a6 R14: 0000559df504f2a0 R15: 0000559df504f760 ============================================================================= BUG btrfs_delayed_tree_ref (Tainted: G B W ): Objects remaining in btrfs_delayed_tree_ref on __kmem_cache_shutdown() ----------------------------------------------------------------------------- INFO: Slab 0x0000000011f78dc0 objects=37 used=2 fp=0x0000000032d55d91 flags=0x17fffc000010200 CPU: 3 PID: 1729921 Comm: rmmod Tainted: G B W 5.10.0-rc4-btrfs-next-73 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack+0x8d/0xb5 slab_err+0xb7/0xdc ? lock_acquired+0x199/0x490 __kmem_cache_shutdown+0x1ac/0x3c0 ? lock_release+0x20e/0x4c0 kmem_cache_destroy+0x55/0x120 btrfs_delayed_ref_exit+0x1d/0x35 [btrfs] exit_btrfs_fs+0xa/0x59 [btrfs] __x64_sys_delete_module+0x194/0x260 ? fpregs_assert_state_consistent+0x1e/0x40 ? exit_to_user_mode_prepare+0x55/0x1c0 ? trace_hardirqs_on+0x1b/0xf0 do_syscall_64+0x33/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f693e305897 Code: 73 01 c3 48 8b 0d f9 f5 (...) RSP: 002b:00007ffcf73eb508 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0 RAX: ffffffffffffffda RBX: 0000559df504f760 RCX: 00007f693e305897 RDX: 000000000000000a RSI: 0000000000000800 RDI: 0000559df504f7c8 RBP: 00007ffcf73eb568 R08: 0000000000000000 R09: 0000000000000000 R10: 00007f693e378ac0 R11: 0000000000000206 R12: 00007ffcf73eb740 R13: 00007ffcf73ec5a6 R14: 0000559df504f2a0 R15: 0000559df504f760 INFO: Object 0x000000001a340018 @offset=4408 INFO: Allocated in btrfs_add_delayed_tree_ref+0x9e/0x480 [btrfs] age=1917 cpu=6 pid=1729873 __slab_alloc.isra.0+0x109/0x1c0 kmem_cache_alloc+0x7bb/0x830 btrfs_add_delayed_tree_ref+0x9e/0x480 [btrfs] btrfs_free_tree_block+0x128/0x360 [btrfs] __btrfs_cow_block+0x489/0x5f0 [btrfs] btrfs_cow_block+0xf7/0x220 [btrfs] btrfs_search_slot+0x62a/0xc40 [btrfs] btrfs_del_orphan_item+0x65/0xd0 [btrfs] btrfs_find_orphan_roots+0x1bf/0x200 [btrfs] open_ctree+0x125a/0x18a0 [btrfs] btrfs_mount_root.cold+0x13/0xed [btrfs] legacy_get_tree+0x30/0x60 vfs_get_tree+0x28/0xe0 fc_mount+0xe/0x40 vfs_kern_mount.part.0+0x71/0x90 btrfs_mount+0x13b/0x3e0 [btrfs] INFO: Freed in __btrfs_run_delayed_refs+0x63d/0x1290 [btrfs] age=4167 cpu=4 pid=1729795 kmem_cache_free+0x34c/0x3c0 __btrfs_run_delayed_refs+0x63d/0x1290 [btrfs] btrfs_run_delayed_refs+0x81/0x210 [btrfs] btrfs_commit_transaction+0x60/0xc40 [btrfs] create_subvol+0x56a/0x990 [btrfs] btrfs_mksubvol+0x3fb/0x4a0 [btrfs] __btrfs_ioctl_snap_create+0x119/0x1a0 [btrfs] btrfs_ioctl_snap_create+0x58/0x80 [btrfs] btrfs_ioctl+0x1a92/0x36f0 [btrfs] __x64_sys_ioctl+0x83/0xb0 do_syscall_64+0x33/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xa9 INFO: Object 0x000000002b46292a @offset=13648 INFO: Allocated in btrfs_add_delayed_tree_ref+0x9e/0x480 [btrfs] age=1923 cpu=6 pid=1729873 __slab_alloc.isra.0+0x109/0x1c0 kmem_cache_alloc+0x7bb/0x830 btrfs_add_delayed_tree_ref+0x9e/0x480 [btrfs] btrfs_alloc_tree_block+0x2bf/0x360 [btrfs] alloc_tree_block_no_bg_flush+0x4f/0x60 [btrfs] __btrfs_cow_block+0x12d/0x5f0 [btrfs] btrfs_cow_block+0xf7/0x220 [btrfs] btrfs_search_slot+0x62a/0xc40 [btrfs] btrfs_del_orphan_item+0x65/0xd0 [btrfs] btrfs_find_orphan_roots+0x1bf/0x200 [btrfs] open_ctree+0x125a/0x18a0 [btrfs] btrfs_mount_root.cold+0x13/0xed [btrfs] legacy_get_tree+0x30/0x60 vfs_get_tree+0x28/0xe0 fc_mount+0xe/0x40 vfs_kern_mount.part.0+0x71/0x90 INFO: Freed in __btrfs_run_delayed_refs+0x63d/0x1290 [btrfs] age=3164 cpu=6 pid=1729803 kmem_cache_free+0x34c/0x3c0 __btrfs_run_delayed_refs+0x63d/0x1290 [btrfs] btrfs_run_delayed_refs+0x81/0x210 [btrfs] commit_cowonly_roots+0xfb/0x300 [btrfs] btrfs_commit_transaction+0x367/0xc40 [btrfs] close_ctree+0x113/0x2fa [btrfs] generic_shutdown_super+0x6c/0x100 kill_anon_super+0x14/0x30 btrfs_kill_super+0x12/0x20 [btrfs] deactivate_locked_super+0x31/0x70 cleanup_mnt+0x100/0x160 task_work_run+0x68/0xb0 exit_to_user_mode_prepare+0x1bb/0x1c0 syscall_exit_to_user_mode+0x4b/0x260 entry_SYSCALL_64_after_hwframe+0x44/0xa9 kmem_cache_destroy btrfs_delayed_tree_ref: Slab cache still has objects CPU: 5 PID: 1729921 Comm: rmmod Tainted: G B W 5.10.0-rc4-btrfs-next-73 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack+0x8d/0xb5 kmem_cache_destroy+0x119/0x120 btrfs_delayed_ref_exit+0x1d/0x35 [btrfs] exit_btrfs_fs+0xa/0x59 [btrfs] __x64_sys_delete_module+0x194/0x260 ? fpregs_assert_state_consistent+0x1e/0x40 ? exit_to_user_mode_prepare+0x55/0x1c0 ? trace_hardirqs_on+0x1b/0xf0 do_syscall_64+0x33/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f693e305897 Code: 73 01 c3 48 8b 0d f9 f5 (...) RSP: 002b:00007ffcf73eb508 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0 RAX: ffffffffffffffda RBX: 0000559df504f760 RCX: 00007f693e305897 RDX: 000000000000000a RSI: 0000000000000800 RDI: 0000559df504f7c8 RBP: 00007ffcf73eb568 R08: 0000000000000000 R09: 0000000000000000 R10: 00007f693e378ac0 R11: 0000000000000206 R12: 00007ffcf73eb740 R13: 00007ffcf73ec5a6 R14: 0000559df504f2a0 R15: 0000559df504f760 ============================================================================= BUG btrfs_delayed_extent_op (Tainted: G B W ): Objects remaining in btrfs_delayed_extent_op on __kmem_cache_shutdown() ----------------------------------------------------------------------------- INFO: Slab 0x00000000f145ce2f objects=22 used=1 fp=0x00000000af0f92cf flags=0x17fffc000010200 CPU: 5 PID: 1729921 Comm: rmmod Tainted: G B W 5.10.0-rc4-btrfs-next-73 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack+0x8d/0xb5 slab_err+0xb7/0xdc ? lock_acquired+0x199/0x490 __kmem_cache_shutdown+0x1ac/0x3c0 ? __mutex_unlock_slowpath+0x45/0x2a0 kmem_cache_destroy+0x55/0x120 exit_btrfs_fs+0xa/0x59 [btrfs] __x64_sys_delete_module+0x194/0x260 ? fpregs_assert_state_consistent+0x1e/0x40 ? exit_to_user_mode_prepare+0x55/0x1c0 ? trace_hardirqs_on+0x1b/0xf0 do_syscall_64+0x33/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f693e305897 Code: 73 01 c3 48 8b 0d f9 f5 (...) RSP: 002b:00007ffcf73eb508 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0 RAX: ffffffffffffffda RBX: 0000559df504f760 RCX: 00007f693e305897 RDX: 000000000000000a RSI: 0000000000000800 RDI: 0000559df504f7c8 RBP: 00007ffcf73eb568 R08: 0000000000000000 R09: 0000000000000000 R10: 00007f693e378ac0 R11: 0000000000000206 R12: 00007ffcf73eb740 R13: 00007ffcf73ec5a6 R14: 0000559df504f2a0 R15: 0000559df504f760 INFO: Object 0x000000004cf95ea8 @offset=6264 INFO: Allocated in btrfs_alloc_tree_block+0x1e0/0x360 [btrfs] age=1931 cpu=6 pid=1729873 __slab_alloc.isra.0+0x109/0x1c0 kmem_cache_alloc+0x7bb/0x830 btrfs_alloc_tree_block+0x1e0/0x360 [btrfs] alloc_tree_block_no_bg_flush+0x4f/0x60 [btrfs] __btrfs_cow_block+0x12d/0x5f0 [btrfs] btrfs_cow_block+0xf7/0x220 [btrfs] btrfs_search_slot+0x62a/0xc40 [btrfs] btrfs_del_orphan_item+0x65/0xd0 [btrfs] btrfs_find_orphan_roots+0x1bf/0x200 [btrfs] open_ctree+0x125a/0x18a0 [btrfs] btrfs_mount_root.cold+0x13/0xed [btrfs] legacy_get_tree+0x30/0x60 vfs_get_tree+0x28/0xe0 fc_mount+0xe/0x40 vfs_kern_mount.part.0+0x71/0x90 btrfs_mount+0x13b/0x3e0 [btrfs] INFO: Freed in __btrfs_run_delayed_refs+0xabd/0x1290 [btrfs] age=3173 cpu=6 pid=1729803 kmem_cache_free+0x34c/0x3c0 __btrfs_run_delayed_refs+0xabd/0x1290 [btrfs] btrfs_run_delayed_refs+0x81/0x210 [btrfs] commit_cowonly_roots+0xfb/0x300 [btrfs] btrfs_commit_transaction+0x367/0xc40 [btrfs] close_ctree+0x113/0x2fa [btrfs] generic_shutdown_super+0x6c/0x100 kill_anon_super+0x14/0x30 btrfs_kill_super+0x12/0x20 [btrfs] deactivate_locked_super+0x31/0x70 cleanup_mnt+0x100/0x160 task_work_run+0x68/0xb0 exit_to_user_mode_prepare+0x1bb/0x1c0 syscall_exit_to_user_mode+0x4b/0x260 entry_SYSCALL_64_after_hwframe+0x44/0xa9 kmem_cache_destroy btrfs_delayed_extent_op: Slab cache still has objects CPU: 3 PID: 1729921 Comm: rmmod Tainted: G B W 5.10.0-rc4-btrfs-next-73 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack+0x8d/0xb5 kmem_cache_destroy+0x119/0x120 exit_btrfs_fs+0xa/0x59 [btrfs] __x64_sys_delete_module+0x194/0x260 ? fpregs_assert_state_consistent+0x1e/0x40 ? exit_to_user_mode_prepare+0x55/0x1c0 ? trace_hardirqs_on+0x1b/0xf0 do_syscall_64+0x33/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f693e305897 Code: 73 01 c3 48 8b 0d f9 (...) RSP: 002b:00007ffcf73eb508 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0 RAX: ffffffffffffffda RBX: 0000559df504f760 RCX: 00007f693e305897 RDX: 000000000000000a RSI: 0000000000000800 RDI: 0000559df504f7c8 RBP: 00007ffcf73eb568 R08: 0000000000000000 R09: 0000000000000000 R10: 00007f693e378ac0 R11: 0000000000000206 R12: 00007ffcf73eb740 R13: 00007ffcf73ec5a6 R14: 0000559df504f2a0 R15: 0000559df504f760 BTRFS: state leak: start 30408704 end 30425087 state 1 in tree 1 refs 1 Fix this issue by having the remount path stop the qgroup rescan worker when we are remounting RO and teach the rescan worker to stop when a remount is in progress. If later a remount in RW mode happens, we are already resuming the qgroup rescan worker through the call to btrfs_qgroup_rescan_resume(), so we do not need to worry about that. Tested-by: Fabian Vogt Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 8fc058597a283e9a37720abb0e8d68e342b9387d Author: Pavel Begunkov Date: Sun Dec 6 15:56:22 2020 +0000 btrfs: merge critical sections of discard lock in workfn btrfs_discard_workfn() drops discard_ctl->lock just to take it again in a moment in btrfs_discard_schedule_work(). Avoid that and also reuse ktime. Reviewed-by: Josef Bacik Signed-off-by: Pavel Begunkov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1ea2872fc6f2aaee0a4b4f1578b83ffd9f55c6a7 Author: Pavel Begunkov Date: Sun Dec 6 15:56:21 2020 +0000 btrfs: fix racy access to discard_ctl data Because only one discard worker may be running at any given point, it could have been safe to modify ->prev_discard, etc. without synchronization, if not for @override flag in btrfs_discard_schedule_work() and delayed_work_pending() returning false while workfn is running. That may lead to torn reads of u64 for some architectures, but that's not a big problem as only slightly affects the discard rate. Suggested-by: Josef Bacik Reviewed-by: Josef Bacik Signed-off-by: Pavel Begunkov Reviewed-by: David Sterba Signed-off-by: David Sterba commit ea9ed87c73e87e044b2c58d658eb4ba5216bc488 Author: Pavel Begunkov Date: Sun Dec 6 15:56:20 2020 +0000 btrfs: fix async discard stall Might happen that bg->discard_eligible_time was changed without rescheduling, so btrfs_discard_workfn() wakes up earlier than that new time, peek_discard_list() returns NULL, and all work halts and goes to sleep without further rescheduling even there are block groups to discard. It happens pretty often, but not so visible from the userspace because after some time it usually will be kicked off anyway by someone else calling btrfs_discard_reschedule_work(). Fix it by continue rescheduling if block group discard lists are not empty. Reviewed-by: Josef Bacik Signed-off-by: Pavel Begunkov Signed-off-by: David Sterba commit 675a4fc8f3149e93f35fb5739fd8d4764206ba0b Author: Josef Bacik Date: Tue Dec 15 12:00:26 2020 -0500 btrfs: tests: initialize test inodes location I noticed that sometimes the module failed to load because the self tests failed like this: BTRFS: selftest: fs/btrfs/tests/inode-tests.c:963 miscount, wanted 1, got 0 This turned out to be because sometimes the btrfs ino would be the btree inode number, and thus we'd skip calling the set extent delalloc bit helper, and thus not adjust ->outstanding_extents. Fix this by making sure we initialize test inodes with a valid inode number so that we don't get random failures during self tests. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0b3f407e6728d990ae1630a02c7b952c21c288d3 Author: Filipe Manana Date: Thu Dec 10 12:09:02 2020 +0000 btrfs: send: fix wrong file path when there is an inode with a pending rmdir When doing an incremental send, if we have a new inode that happens to have the same number that an old directory inode had in the base snapshot and that old directory has a pending rmdir operation, we end up computing a wrong path for the new inode, causing the receiver to fail. Example reproducer: $ cat test-send-rmdir.sh #!/bin/bash DEV=/dev/sdi MNT=/mnt/sdi mkfs.btrfs -f $DEV >/dev/null mount $DEV $MNT mkdir $MNT/dir touch $MNT/dir/file1 touch $MNT/dir/file2 touch $MNT/dir/file3 # Filesystem looks like: # # . (ino 256) # |----- dir/ (ino 257) # |----- file1 (ino 258) # |----- file2 (ino 259) # |----- file3 (ino 260) # btrfs subvolume snapshot -r $MNT $MNT/snap1 btrfs send -f /tmp/snap1.send $MNT/snap1 # Now remove our directory and all its files. rm -fr $MNT/dir # Unmount the filesystem and mount it again. This is to ensure that # the next inode that is created ends up with the same inode number # that our directory "dir" had, 257, which is the first free "objectid" # available after mounting again the filesystem. umount $MNT mount $DEV $MNT # Now create a new file (it could be a directory as well). touch $MNT/newfile # Filesystem now looks like: # # . (ino 256) # |----- newfile (ino 257) # btrfs subvolume snapshot -r $MNT $MNT/snap2 btrfs send -f /tmp/snap2.send -p $MNT/snap1 $MNT/snap2 # Now unmount the filesystem, create a new one, mount it and try to apply # both send streams to recreate both snapshots. umount $DEV mkfs.btrfs -f $DEV >/dev/null mount $DEV $MNT btrfs receive -f /tmp/snap1.send $MNT btrfs receive -f /tmp/snap2.send $MNT umount $MNT When running the test, the receive operation for the incremental stream fails: $ ./test-send-rmdir.sh Create a readonly snapshot of '/mnt/sdi' in '/mnt/sdi/snap1' At subvol /mnt/sdi/snap1 Create a readonly snapshot of '/mnt/sdi' in '/mnt/sdi/snap2' At subvol /mnt/sdi/snap2 At subvol snap1 At snapshot snap2 ERROR: chown o257-9-0 failed: No such file or directory So fix this by tracking directories that have a pending rmdir by inode number and generation number, instead of only inode number. A test case for fstests follows soon. Reported-by: Massimo B. Tested-by: Massimo B. Link: https://lore.kernel.org/linux-btrfs/6ae34776e85912960a253a8327068a892998e685.camel@gmx.net/ CC: stable@vger.kernel.org # 4.19+ Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit ae5e070eaca9dbebde3459dd8f4c2756f8c097d0 Author: Qu Wenruo Date: Fri Dec 4 09:24:47 2020 +0800 btrfs: qgroup: don't try to wait flushing if we're already holding a transaction There is a chance of racing for qgroup flushing which may lead to deadlock: Thread A | Thread B (not holding trans handle) | (holding a trans handle) --------------------------------+-------------------------------- __btrfs_qgroup_reserve_meta() | __btrfs_qgroup_reserve_meta() |- try_flush_qgroup() | |- try_flush_qgroup() |- QGROUP_FLUSHING bit set | | | | |- test_and_set_bit() | | |- wait_event() |- btrfs_join_transaction() | |- btrfs_commit_transaction()| !!! DEAD LOCK !!! Since thread A wants to commit transaction, but thread B is holding a transaction handle, blocking the commit. At the same time, thread B is waiting for thread A to finish its commit. This is just a hot fix, and would lead to more EDQUOT when we're near the qgroup limit. The proper fix would be to make all metadata/data reservations happen without holding a transaction handle. CC: stable@vger.kernel.org # 5.9+ Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 9a664971569daf68254928149f580b4f5856d274 Author: ethanwu Date: Tue Dec 1 17:25:12 2020 +0800 btrfs: correctly calculate item size used when item key collision happens Item key collision is allowed for some item types, like dir item and inode refs, but the overall item size is limited by the nodesize. item size(ins_len) passed from btrfs_insert_empty_items to btrfs_search_slot already contains size of btrfs_item. When btrfs_search_slot reaches leaf, we'll see if we need to split leaf. The check incorrectly reports that split leaf is required, because it treats the space required by the newly inserted item as btrfs_item + item data. But in item key collision case, only item data is actually needed, the newly inserted item could merge into the existing one. No new btrfs_item will be inserted. And split_leaf return EOVERFLOW from following code: if (extend && data_size + btrfs_item_size_nr(l, slot) + sizeof(struct btrfs_item) > BTRFS_LEAF_DATA_SIZE(fs_info)) return -EOVERFLOW; In most cases, when callers receive EOVERFLOW, they either return this error or handle in different ways. For example, in normal dir item creation the userspace will get errno EOVERFLOW; in inode ref case INODE_EXTREF is used instead. However, this is not the case for rename. To avoid the unrecoverable situation in rename, btrfs_check_dir_item_collision is called in early phase of rename. In this function, when item key collision is detected leaf space is checked: data_size = sizeof(*di) + name_len; if (data_size + btrfs_item_size_nr(leaf, slot) + sizeof(struct btrfs_item) > BTRFS_LEAF_DATA_SIZE(root->fs_info)) the sizeof(struct btrfs_item) + btrfs_item_size_nr(leaf, slot) here refers to existing item size, the condition here correctly calculates the needed size for collision case rather than the wrong case above. The consequence of inconsistent condition check between btrfs_check_dir_item_collision and btrfs_search_slot when item key collision happens is that we might pass check here but fail later at btrfs_search_slot. Rename fails and volume is forced readonly [436149.586170] ------------[ cut here ]------------ [436149.586173] BTRFS: Transaction aborted (error -75) [436149.586196] WARNING: CPU: 0 PID: 16733 at fs/btrfs/inode.c:9870 btrfs_rename2+0x1938/0x1b70 [btrfs] [436149.586227] CPU: 0 PID: 16733 Comm: python Tainted: G D 4.18.0-rc5+ #1 [436149.586228] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 04/05/2016 [436149.586238] RIP: 0010:btrfs_rename2+0x1938/0x1b70 [btrfs] [436149.586254] RSP: 0018:ffffa327043a7ce0 EFLAGS: 00010286 [436149.586255] RAX: 0000000000000000 RBX: ffff8d8a17d13340 RCX: 0000000000000006 [436149.586256] RDX: 0000000000000007 RSI: 0000000000000096 RDI: ffff8d8a7fc164b0 [436149.586257] RBP: ffffa327043a7da0 R08: 0000000000000560 R09: 7265282064657472 [436149.586258] R10: 0000000000000000 R11: 6361736e61725420 R12: ffff8d8a0d4c8b08 [436149.586258] R13: ffff8d8a17d13340 R14: ffff8d8a33e0a540 R15: 00000000000001fe [436149.586260] FS: 00007fa313933740(0000) GS:ffff8d8a7fc00000(0000) knlGS:0000000000000000 [436149.586261] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [436149.586262] CR2: 000055d8d9c9a720 CR3: 000000007aae0003 CR4: 00000000003606f0 [436149.586295] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [436149.586296] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [436149.586296] Call Trace: [436149.586311] vfs_rename+0x383/0x920 [436149.586313] ? vfs_rename+0x383/0x920 [436149.586315] do_renameat2+0x4ca/0x590 [436149.586317] __x64_sys_rename+0x20/0x30 [436149.586324] do_syscall_64+0x5a/0x120 [436149.586330] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [436149.586332] RIP: 0033:0x7fa3133b1d37 [436149.586348] RSP: 002b:00007fffd3e43908 EFLAGS: 00000246 ORIG_RAX: 0000000000000052 [436149.586349] RAX: ffffffffffffffda RBX: 00007fa3133b1d30 RCX: 00007fa3133b1d37 [436149.586350] RDX: 000055d8da06b5e0 RSI: 000055d8da225d60 RDI: 000055d8da2c4da0 [436149.586351] RBP: 000055d8da2252f0 R08: 00007fa313782000 R09: 00000000000177e0 [436149.586351] R10: 000055d8da010680 R11: 0000000000000246 R12: 00007fa313840b00 Thanks to Hans van Kranenburg for information about crc32 hash collision tools, I was able to reproduce the dir item collision with following python script. https://github.com/wutzuchieh/misc_tools/blob/master/crc32_forge.py Run it under a btrfs volume will trigger the abort transaction. It simply creates files and rename them to forged names that leads to hash collision. There are two ways to fix this. One is to simply revert the patch 878f2d2cb355 ("Btrfs: fix max dir item size calculation") to make the condition consistent although that patch is correct about the size. The other way is to handle the leaf space check correctly when collision happens. I prefer the second one since it correct leaf space check in collision case. This fix will not account sizeof(struct btrfs_item) when the item already exists. There are two places where ins_len doesn't contain sizeof(struct btrfs_item), however. 1. extent-tree.c: lookup_inline_extent_backref 2. file-item.c: btrfs_csum_file_blocks to make the logic of btrfs_search_slot more clear, we add a flag search_for_extension in btrfs_path. This flag indicates that ins_len passed to btrfs_search_slot doesn't contain sizeof(struct btrfs_item). When key exists, btrfs_search_slot will use the actual size needed to calculate the required leaf space. CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Filipe Manana Signed-off-by: ethanwu Signed-off-by: David Sterba commit 3d45f221ce627d13e2e6ef3274f06750c84a6542 Author: Filipe Manana Date: Wed Dec 2 11:55:58 2020 +0000 btrfs: fix deadlock when cloning inline extent and low on free metadata space When cloning an inline extent there are cases where we can not just copy the inline extent from the source range to the target range (e.g. when the target range starts at an offset greater than zero). In such cases we copy the inline extent's data into a page of the destination inode and then dirty that page. However, after that we will need to start a transaction for each processed extent and, if we are ever low on available metadata space, we may need to flush existing delalloc for all dirty inodes in an attempt to release metadata space - if that happens we may deadlock: * the async reclaim task queued a delalloc work to flush delalloc for the destination inode of the clone operation; * the task executing that delalloc work gets blocked waiting for the range with the dirty page to be unlocked, which is currently locked by the task doing the clone operation; * the async reclaim task blocks waiting for the delalloc work to complete; * the cloning task is waiting on the waitqueue of its reservation ticket while holding the range with the dirty page locked in the inode's io_tree; * if metadata space is not released by some other task (like delalloc for some other inode completing for example), the clone task waits forever and as a consequence the delalloc work and async reclaim tasks will hang forever as well. Releasing more space on the other hand may require starting a transaction, which will hang as well when trying to reserve metadata space, resulting in a deadlock between all these tasks. When this happens, traces like the following show up in dmesg/syslog: [87452.323003] INFO: task kworker/u16:11:1810830 blocked for more than 120 seconds. [87452.323644] Tainted: G B W 5.10.0-rc4-btrfs-next-73 #1 [87452.324248] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [87452.324852] task:kworker/u16:11 state:D stack: 0 pid:1810830 ppid: 2 flags:0x00004000 [87452.325520] Workqueue: btrfs-flush_delalloc btrfs_work_helper [btrfs] [87452.326136] Call Trace: [87452.326737] __schedule+0x5d1/0xcf0 [87452.327390] schedule+0x45/0xe0 [87452.328174] lock_extent_bits+0x1e6/0x2d0 [btrfs] [87452.328894] ? finish_wait+0x90/0x90 [87452.329474] btrfs_invalidatepage+0x32c/0x390 [btrfs] [87452.330133] ? __mod_memcg_state+0x8e/0x160 [87452.330738] __extent_writepage+0x2d4/0x400 [btrfs] [87452.331405] extent_write_cache_pages+0x2b2/0x500 [btrfs] [87452.332007] ? lock_release+0x20e/0x4c0 [87452.332557] ? trace_hardirqs_on+0x1b/0xf0 [87452.333127] extent_writepages+0x43/0x90 [btrfs] [87452.333653] ? lock_acquire+0x1a3/0x490 [87452.334177] do_writepages+0x43/0xe0 [87452.334699] ? __filemap_fdatawrite_range+0xa4/0x100 [87452.335720] __filemap_fdatawrite_range+0xc5/0x100 [87452.336500] btrfs_run_delalloc_work+0x17/0x40 [btrfs] [87452.337216] btrfs_work_helper+0xf1/0x600 [btrfs] [87452.337838] process_one_work+0x24e/0x5e0 [87452.338437] worker_thread+0x50/0x3b0 [87452.339137] ? process_one_work+0x5e0/0x5e0 [87452.339884] kthread+0x153/0x170 [87452.340507] ? kthread_mod_delayed_work+0xc0/0xc0 [87452.341153] ret_from_fork+0x22/0x30 [87452.341806] INFO: task kworker/u16:1:2426217 blocked for more than 120 seconds. [87452.342487] Tainted: G B W 5.10.0-rc4-btrfs-next-73 #1 [87452.343274] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [87452.344049] task:kworker/u16:1 state:D stack: 0 pid:2426217 ppid: 2 flags:0x00004000 [87452.344974] Workqueue: events_unbound btrfs_async_reclaim_metadata_space [btrfs] [87452.345655] Call Trace: [87452.346305] __schedule+0x5d1/0xcf0 [87452.346947] ? kvm_clock_read+0x14/0x30 [87452.347676] ? wait_for_completion+0x81/0x110 [87452.348389] schedule+0x45/0xe0 [87452.349077] schedule_timeout+0x30c/0x580 [87452.349718] ? _raw_spin_unlock_irqrestore+0x3c/0x60 [87452.350340] ? lock_acquire+0x1a3/0x490 [87452.351006] ? try_to_wake_up+0x7a/0xa20 [87452.351541] ? lock_release+0x20e/0x4c0 [87452.352040] ? lock_acquired+0x199/0x490 [87452.352517] ? wait_for_completion+0x81/0x110 [87452.353000] wait_for_completion+0xab/0x110 [87452.353490] start_delalloc_inodes+0x2af/0x390 [btrfs] [87452.353973] btrfs_start_delalloc_roots+0x12d/0x250 [btrfs] [87452.354455] flush_space+0x24f/0x660 [btrfs] [87452.355063] btrfs_async_reclaim_metadata_space+0x1bb/0x480 [btrfs] [87452.355565] process_one_work+0x24e/0x5e0 [87452.356024] worker_thread+0x20f/0x3b0 [87452.356487] ? process_one_work+0x5e0/0x5e0 [87452.356973] kthread+0x153/0x170 [87452.357434] ? kthread_mod_delayed_work+0xc0/0xc0 [87452.357880] ret_from_fork+0x22/0x30 (...) < stack traces of several tasks waiting for the locks of the inodes of the clone operation > (...) [92867.444138] RSP: 002b:00007ffc3371bbe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000052 [92867.444624] RAX: ffffffffffffffda RBX: 00007ffc3371bea0 RCX: 00007f61efe73f97 [92867.445116] RDX: 0000000000000000 RSI: 0000560fbd5d7a40 RDI: 0000560fbd5d8960 [92867.445595] RBP: 00007ffc3371beb0 R08: 0000000000000001 R09: 0000000000000003 [92867.446070] R10: 00007ffc3371b996 R11: 0000000000000246 R12: 0000000000000000 [92867.446820] R13: 000000000000001f R14: 00007ffc3371bea0 R15: 00007ffc3371beb0 [92867.447361] task:fsstress state:D stack: 0 pid:2508238 ppid:2508153 flags:0x00004000 [92867.447920] Call Trace: [92867.448435] __schedule+0x5d1/0xcf0 [92867.448934] ? _raw_spin_unlock_irqrestore+0x3c/0x60 [92867.449423] schedule+0x45/0xe0 [92867.449916] __reserve_bytes+0x4a4/0xb10 [btrfs] [92867.450576] ? finish_wait+0x90/0x90 [92867.451202] btrfs_reserve_metadata_bytes+0x29/0x190 [btrfs] [92867.451815] btrfs_block_rsv_add+0x1f/0x50 [btrfs] [92867.452412] start_transaction+0x2d1/0x760 [btrfs] [92867.453216] clone_copy_inline_extent+0x333/0x490 [btrfs] [92867.453848] ? lock_release+0x20e/0x4c0 [92867.454539] ? btrfs_search_slot+0x9a7/0xc30 [btrfs] [92867.455218] btrfs_clone+0x569/0x7e0 [btrfs] [92867.455952] btrfs_clone_files+0xf6/0x150 [btrfs] [92867.456588] btrfs_remap_file_range+0x324/0x3d0 [btrfs] [92867.457213] do_clone_file_range+0xd4/0x1f0 [92867.457828] vfs_clone_file_range+0x4d/0x230 [92867.458355] ? lock_release+0x20e/0x4c0 [92867.458890] ioctl_file_clone+0x8f/0xc0 [92867.459377] do_vfs_ioctl+0x342/0x750 [92867.459913] __x64_sys_ioctl+0x62/0xb0 [92867.460377] do_syscall_64+0x33/0x80 [92867.460842] entry_SYSCALL_64_after_hwframe+0x44/0xa9 (...) < stack traces of more tasks blocked on metadata reservation like the clone task above, because the async reclaim task has deadlocked > (...) Another thing to notice is that the worker task that is deadlocked when trying to flush the destination inode of the clone operation is at btrfs_invalidatepage(). This is simply because the clone operation has a destination offset greater than the i_size and we only update the i_size of the destination file after cloning an extent (just like we do in the buffered write path). Since the async reclaim path uses btrfs_start_delalloc_roots() to trigger the flushing of delalloc for all inodes that have delalloc, add a runtime flag to an inode to signal it should not be flushed, and for inodes with that flag set, start_delalloc_inodes() will simply skip them. When the cloning code needs to dirty a page to copy an inline extent, set that flag on the inode and then clear it when the clone operation finishes. This could be sporadically triggered with test case generic/269 from fstests, which exercises many fsstress processes running in parallel with several dd processes filling up the entire filesystem. CC: stable@vger.kernel.org # 5.9+ Fixes: 05a5a7621ce6 ("Btrfs: implement full reflink support for inline extents") Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 29c9dece56ca82c510c39a0e9403b80bdb3032d6 Author: Christian König Date: Thu Dec 17 17:36:57 2020 +0100 drm/qxl: don't allocate a dma_address array That seems to be unused. Signed-off-by: Christian König Reviewed-by: David Airlie Link: https://patchwork.freedesktop.org/patch/408787/ commit 0bf1bafb17df03fbd0e8b9a086c39e6f24af7193 Author: Samuel Cabrero Date: Fri Dec 18 10:29:49 2020 +0100 cifs: Avoid error pointer dereference The patch 7d6535b72042: "cifs: Simplify reconnect code when dfs upcall is enabled" leads to the following static checker warning: fs/cifs/connect.c:160 reconn_set_next_dfs_target() error: 'server->hostname' dereferencing possible ERR_PTR() Avoid dereferencing the error pointer by early returning on error condition. Reported-by: Dan Carpenter Signed-off-by: Samuel Cabrero Signed-off-by: Steve French commit 046f70d31ddb2069941aec54966fec5b7fbc7b7b Author: Aditya Swarup Date: Wed Dec 2 23:23:58 2020 -0800 drm/i915/tgl: Fix REVID macros for TGL to fetch correct stepping Fix TGL REVID macros to fetch correct display/gt stepping based on SOC rev id from INTEL_REVID() macro. Previously, we were just returning the first element of the revid array instead of using the correct index based on SOC rev id. Fixes: c33298cb34f5 ("drm/i915/tgl: Fix stepping WA matching") Cc: José Roberto de Souza Cc: Matt Roper Cc: Lucas De Marchi Cc: Jani Nikula Cc: Ville Syrjälä Signed-off-by: Aditya Swarup Reviewed-by: Lucas De Marchi Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20201203072359.156682-1-aditya.swarup@intel.com (cherry picked from commit 83dbd74f8243f020d1ad8a3a3b3cd0795067920e) Signed-off-by: Jani Nikula commit 0e53656ad8abc99e0a80c3de611e593ebbf55829 Author: Chris Wilson Date: Wed Dec 16 09:29:51 2020 +0000 drm/i915: Fix mismatch between misplaced vma check and vma insert When inserting a VMA, we restrict the placement to the low 4G unless the caller opts into using the full range. This was done to allow usersapce the opportunity to transition slowly from a 32b address space, and to avoid breaking inherent 32b assumptions of some commands. However, for insert we limited ourselves to 4G-4K, but on verification we allowed the full 4G. This causes some attempts to bind a new buffer to sporadically fail with -ENOSPC, but at other times be bound successfully. commit 48ea1e32c39d ("drm/i915/gen9: Set PIN_ZONE_4G end to 4GB - 1 page") suggests that there is a genuine problem with stateless addressing that cannot utilize the last page in 4G and so we purposefully excluded it. This means that the quick pin pass may cause us to utilize a buggy placement. Reported-by: CQ Tang Testcase: igt/gem_exec_params/larger-than-life-batch Fixes: 48ea1e32c39d ("drm/i915/gen9: Set PIN_ZONE_4G end to 4GB - 1 page") Signed-off-by: Chris Wilson Cc: CQ Tang Reviewed-by: CQ Tang Reviewed-by: Matthew Auld Cc: # v4.5+ Link: https://patchwork.freedesktop.org/patch/msgid/20201216092951.7124-1-chris@chris-wilson.co.uk (cherry picked from commit 5f22cc0b134ab702d7f64b714e26018f7288ffee) Signed-off-by: Jani Nikula commit dd0e2193b1e41efe611d265cea2719df4e59560f Author: Lionel Landwerlin Date: Thu Nov 26 12:51:55 2020 +0200 drm/i915/perf: also include Gen11 in OATAILPTR workaround CI shows this workaround is also needed on Gen11. Signed-off-by: Lionel Landwerlin Fixes: 059a0beb486344 ("drm/i915/perf: workaround register corruption in OATAILPTR") Reviewed-by: Umesh Nerlige Ramappa Link: https://patchwork.freedesktop.org/patch/msgid/20201126105155.540350-1-lionel.g.landwerlin@intel.com (cherry picked from commit fa5d598b8cbab0af92bac48fd60e74a893550923) Signed-off-by: Jani Nikula commit 2ccf2e03868455e508b4dc9fbd1bb1daebf2222e Author: Chris Wilson Date: Fri Nov 27 14:57:48 2020 +0000 Revert "drm/i915: re-order if/else ladder for hpd_irq_setup" We now use ilk_hpd_irq_setup for all GMCH platforms that do not have hotplug. These are early gen3 and gen2 devices that now explode on boot as they try to access non-existent registers. Fixes: 794d61a19090 ("drm/i915: re-order if/else ladder for hpd_irq_setup") Signed-off-by: Chris Wilson Cc: Lucas De Marchi Cc: José Roberto de Souza Cc: Jani Nikula Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20201127145748.29491-1-chris@chris-wilson.co.uk (cherry picked from commit e5346a1ff38a405c14ce8e595269e9b7dcfbb2e9) Signed-off-by: Jani Nikula commit e9603f4bdcc04417f1c7b3585e63654819dc11f6 Author: Carl Huang Date: Thu Dec 17 17:22:10 2020 +0200 ath11k: pci: disable ASPM L0sLs before downloading firmware Sometimes QCA6390 doesn't switch to amss state as device enters L1ss state, so disable L0sL1s during firmware downloading. Driver recovers the ASPM to default value in start callback or powerdown callback. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1608218530-15426-1-git-send-email-kvalo@codeaurora.org commit f6f92968e1e5a7a9d211faaebefc26ebe408dad7 Author: Carl Huang Date: Thu Dec 17 09:04:57 2020 +0200 ath11k: qmi: try to allocate a big block of DMA memory first Not all firmware versions support allocating DMA memory in smaller blocks so first try to allocate big block of DMA memory for QMI. If the allocation fails, let firmware request multiple blocks of DMA memory with smaller size. This also fixes an unnecessary error message seen during ath11k probe on QCA6390: ath11k_pci 0000:06:00.0: Respond mem req failed, result: 1, err: 0 ath11k_pci 0000:06:00.0: qmi failed to respond fw mem req:-22 Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1608127593-15192-1-git-send-email-kvalo@codeaurora.org commit 500050f0d28868af302a3c24d7d1d0191521286e Merge: c0bc969c176b1 6efac0173cd15 Author: Tony Lindgren Date: Fri Dec 18 09:15:12 2020 +0200 Merge branch 'fixes-omap3' into fixes commit 6efac0173cd15460b48c91e1b0a000379f341f00 Author: Linus Walleij Date: Mon Dec 14 23:01:21 2020 +0200 ARM: OMAP1: OSK: fix ohci-omap breakage Commit 45c5775460f3 ("usb: ohci-omap: Fix descriptor conversion") tried to fix all issues related to ohci-omap descriptor conversion, but a wrong patch was applied, and one needed change to the OSK board file is still missing. Fix that. Fixes: 45c5775460f3 ("usb: ohci-omap: Fix descriptor conversion") Signed-off-by: Linus Walleij [aaro.koskinen@iki.fi: rebased and updated the changelog] Signed-off-by: Aaro Koskinen Signed-off-by: Tony Lindgren commit 07af7810e0a5bc4e51682c90f9fa19fc4cb93f18 Author: H. Nikolaus Schaller Date: Sat Dec 12 10:55:25 2020 +0100 DTS: ARM: gta04: remove legacy spi-cs-high to make display work again This reverts commit f1f028ff89cb ("DTS: ARM: gta04: introduce legacy spi-cs-high to make display work again") which had to be intruduced after commit 6953c57ab172 ("gpio: of: Handle SPI chipselect legacy bindings") broke the GTA04 display. This contradicted the data sheet but was the only way to get it as an spi client operational again. The panel data sheet defines the chip-select to be active low. Now, with the arrival of commit 766c6b63aa04 ("spi: fix client driver breakages when using GPIO descriptors") the logic of interaction between spi-cs-high and the gpio descriptor flags has been changed a second time, making the display broken again. So we have to remove the original fix which in retrospect was a workaround of a bug in the spi subsystem and not a feature of the panel or bug in the device tree. With this fix the device tree is back in sync with the data sheet and spi subsystem code. Fixes: 766c6b63aa04 ("spi: fix client driver breakages when using GPIO descriptors") CC: stable@vger.kernel.org Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren commit 0f2c66ae5c8d9c6250d97060902eeeaa8a06446c Author: Dan Carpenter Date: Thu Dec 17 14:03:35 2020 +0300 cifs: Re-indent cifs_swn_reconnect() This code is slightly nicer if we flip the cifs_sockaddr_equal() around and pull all the code in one tab. Signed-off-by: Dan Carpenter Reviewed-by: Samuel Cabrero Signed-off-by: Steve French commit eedf8e88e5f08d95e1c6a33189bb4cdf2db5b79f Author: Dan Carpenter Date: Thu Dec 17 14:02:29 2020 +0300 cifs: Unlock on errors in cifs_swn_reconnect() There are three error paths which need to unlock before returning. Fixes: 121d947d4fe1 ("cifs: Handle witness client move notification") Signed-off-by: Dan Carpenter Reviewed-by: Samuel Cabrero Signed-off-by: Steve French commit 6a29ab57f4e903264ea7b6663352244379c0a8e5 Author: Dan Carpenter Date: Thu Dec 17 14:01:48 2020 +0300 cifs: Delete a stray unlock in cifs_swn_reconnect() The unlock is done in the caller, this is a stray which leads to a double unlock bug. Fixes: bf80e5d4259a ("cifs: Send witness register and unregister commands to userspace daemon") Signed-off-by: Dan Carpenter Reviewed-by: Samuel Cabrero Signed-off-by: Steve French commit a409ed156a90093a03fe6a93721ddf4c591eac87 Merge: 345b17acb1aa7 7ac5548882334 Author: Linus Torvalds Date: Thu Dec 17 18:07:20 2020 -0800 Merge tag 'gpio-v5.11-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 the GPIO changes for the v5.11 kernel cycle: Core changes: - Retired the old set-up function for GPIO IRQ chips. All chips now use the template struct gpio_irq_chip and pass that to the core to be set up alongside the gpio_chip. We can finally get rid of the old cruft. - Some refactoring and clean up of the core code. - Support edge event timestamps to be stamped using REALTIME (wall clock) timestamps. We have found solid use cases for this, so we support it. New drivers: - MStar MSC313 GPIO driver. - HiSilicon GPIO driver. Driver improvements: - The PCA953x driver now also supports the NXP PCAL9554B/C chips. - The mockup driver can now be probed from the device tree which is pretty useful for virtual prototyping of devices. - The Rcar driver now supports .get_multiple() - The MXC driver dropped some legacy and became a pure device tree client. - The Exar driver was moved over to the IDA interface for enumerating, and also switched over to using regmap for register access" * tag 'gpio-v5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (87 commits) MAINTAINERS: Remove reference to non-existing file gpio: hisi: Do not require ACPI for COMPILE_TEST MAINTAINERS: Add maintainer for HiSilicon GPIO driver gpio: gpio-hisi: Add HiSilicon GPIO support gpio: cs5535: Simplify the return expression of cs5535_gpio_probe() gpiolib: irq hooks: fix recursion in gpiochip_irq_unmask dt-bindings: mt7621-gpio: convert bindings to YAML format gpiolib: cdev: Flag invalid GPIOs as used gpio: put virtual gpio device into their own submenu drivers: gpio: amd8111: use SPDX-License-Identifier drivers: gpio: amd8111: prefer dev_err()/dev_info() over raw printk drivers: gpio: bt8xx: prefer dev_err()/dev_warn() over of raw printk gpio: Add TODO item for debugfs interface gpio: just plain warning when nonexisting gpio requested tools: gpio: add option to report wall-clock time to gpio-event-mon tools: gpio: add support for reporting realtime event clock to lsgpio gpiolib: cdev: allow edge event timestamps to be configured as REALTIME gpio: msc313: MStar MSC313 GPIO driver dt-bindings: gpio: Binding for MStar MSC313 GPIO controller dt-bindings: gpio: Add a binding header for the MSC313 GPIO driver ... commit 345b17acb1aa7a443741d9220f66b30d5ddd7c39 Merge: 787fec8ac15cc 1fb1abc83636f Author: Linus Torvalds Date: Thu Dec 17 17:56:44 2020 -0800 Merge tag 'for-linus-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml Pull UML updates from Richard Weinberger: - IRQ handling cleanups - Support for suspend - Various fixes for UML specific drivers: ubd, vector, xterm * tag 'for-linus-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml: (32 commits) um: Fix build w/o CONFIG_PM_SLEEP um: time-travel: Correct time event IRQ delivery um: irq/sigio: Support suspend/resume handling of workaround IRQs um: time-travel: Actually apply "free-until" optimisation um: chan_xterm: Fix fd leak um: tty: Fix handling of close in tty lines um: Monitor error events in IRQ controller um: allocate a guard page to helper threads um: support some of ARCH_HAS_SET_MEMORY um: time-travel: avoid multiple identical propagations um: Fetch registers only for signals which need them um: Support suspend to RAM um: Allow PM with suspend-to-idle um: time: Fix read_persistent_clock64() in time-travel um: Simplify os_idle_sleep() and sleep longer um: Simplify IRQ handling code um: Remove IRQ_NONE type um: irq: Reduce irq_reg allocation um: irq: Clean up and rename struct irq_fd um: Clean up alarm IRQ chip name ... commit 787fec8ac15cc693b9a7bc1b4a338b92483d993c Merge: e13300bdaa68f b80a974b8c581 Author: Linus Torvalds Date: Thu Dec 17 17:46:34 2020 -0800 Merge tag 'for-linus-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs Pull jffs2, ubi and ubifs updates from Richard Weinberger: "JFFS2: - Fix for a remount regression - Fix for an abnormal GC exit - Fix for a possible NULL pointer issue while mounting UBI: - Add support ECC-ed NOR flash - Removal of dead code UBIFS: - Make node dumping debug code more reliable - Various cleanups: less ifdefs, less typos - Fix for an info leak" * tag 'for-linus-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs: ubifs: ubifs_dump_node: Dump all branches of the index node ubifs: ubifs_dump_sleb: Remove unused function ubifs: Pass node length in all node dumping callers Revert "ubifs: Fix out-of-bounds memory access caused by abnormal value of node_len" ubifs: Limit dumping length by size of memory which is allocated for the node ubifs: Remove the redundant return in dbg_check_nondata_nodes_order jffs2: Fix NULL pointer dereference in rp_size fs option parsing ubifs: Fixed print foramt mismatch in ubifs ubi: Do not zero out EC and VID on ECC-ed NOR flashes jffs2: remove trailing semicolon in macro definition ubifs: Fix error return code in ubifs_init_authentication() ubifs: wbuf: Don't leak kernel memory to flash ubi: Remove useless code in bytes_str_to_int ubifs: Fix the printing type of c->big_lpt jffs2: Allow setting rp_size to zero during remounting jffs2: Fix ignoring mounting options problem during remounting jffs2: Fix GC exit abnormally ubifs: Code cleanup by removing ifdef macro surrounding jffs2: Fix if/else empty body warnings ubifs: Delete duplicated words + other fixes commit e13300bdaa68f5487000e66baed1ff69bcb510bf Merge: d64c6f96ba86b afee4410bc6c5 Author: Linus Torvalds Date: Thu Dec 17 17:41:37 2020 -0800 Merge tag '5.11-rc-smb3' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs updates from Steve French: "The largest part are for support of the newer mount API which has been needed for cifs/smb3 mounts for a long time due to the new API's better handling of remount, and better error reporting. There are three additional small cleanup patches for this being tested, that are not included yet. This series also includes addition of support for the SMB3 witness protocol which can provide important notifications from the server to client on server address or export or network changes. This can be useful for example in order to be notified before the failure - when a server's IP address changes (in the future it will allow us to support server notifications of when a share is moved). It also includes three patches for stable e.g. some that better handle some confusing error messages during session establishment" * tag '5.11-rc-smb3' of git://git.samba.org/sfrench/cifs-2.6: (55 commits) cifs: update internal module version number cifs: Fix support for remount when not changing rsize/wsize cifs: handle "guest" mount parameter cifs: correct four aliased mount parms to allow use of previous names cifs: Tracepoints and logs for tracing credit changes. cifs: fix use after free in cifs_smb3_do_mount() cifs: fix rsize/wsize to be negotiated values cifs: Fix some error pointers handling detected by static checker smb3: remind users that witness protocol is experimental cifs: update super_operations to show_devname cifs: fix uninitialized variable in smb3_fs_context_parse_param cifs: update mnt_cifs_flags during reconfigure cifs: move update of flags into a separate function cifs: remove ctx argument from cifs_setup_cifs_sb cifs: do not allow changing posix_paths during remount cifs: uncomplicate printing the iocharset parameter cifs: don't create a temp nls in cifs_setup_ipc cifs: simplify handling of cifs_sb/ctx->local_nls cifs: we do not allow changing username/password/unc/... during remount cifs: add initial reconfigure support ... commit f1340265726e0edf8a8cef28e665b28ad6302ce9 Author: Jakub Kicinski Date: Wed Dec 2 18:18:06 2020 -0800 iavf: fix double-release of rtnl_lock This code does not jump to exit on an error in iavf_lan_add_device(), so the rtnl_unlock() from the normal path will follow. Fixes: b66c7bc1cd4d ("iavf: Refactor init state machine") Signed-off-by: Jakub Kicinski Reviewed-by: Tony Nguyen Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen commit 8bcbe3132c66c07d03f64d5da80be753359f2e92 Author: Zhen Lei Date: Fri Nov 20 17:20:57 2020 +0800 device-dax: delete a redundancy check in dev_dax_validate_align() After we have done the alignment check for the length of each range, the alignment check for dev_dax_size(dev_dax) is no longer needed, because it get the sum of the length of each range. Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20201120092057.2144-1-thunder.leizhen@huawei.com Signed-off-by: Dan Williams commit 8bee683384087a6275c9183a483435225f7bb209 Author: Magnus Karlsson Date: Mon Dec 14 09:51:27 2020 +0100 xsk: Fix memory leak for failed bind Fix a possible memory leak when a bind of an AF_XDP socket fails. When the fill and completion rings are created, they are tied to the socket. But when the buffer pool is later created at bind time, the ownership of these two rings are transferred to the buffer pool as they might be shared between sockets (and the buffer pool cannot be created until we know what we are binding to). So, before the buffer pool is created, these two rings are cleaned up with the socket, and after they have been transferred they are cleaned up together with the buffer pool. The problem is that ownership was transferred before it was absolutely certain that the buffer pool could be created and initialized correctly and when one of these errors occurred, the fill and completion rings did neither belong to the socket nor the pool and where therefore leaked. Solve this by moving the ownership transfer to the point where the buffer pool has been completely set up and there is no way it can fail. Fixes: 7361f9c3d719 ("xsk: Move fill and completion rings to buffer pool") Reported-by: syzbot+cfa88ddd0655afa88763@syzkaller.appspotmail.com Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/20201214085127.3960-1-magnus.karlsson@gmail.com commit d64c6f96ba86bd8b97ed8d6762a8c8cc1770d214 Merge: 0c6c887835b59 44d4775ca5180 Author: Linus Torvalds Date: Thu Dec 17 13:45:24 2020 -0800 Merge tag 'net-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Current release - always broken: - net/smc: fix access to parent of an ib device - devlink: use _BITUL() macro instead of BIT() in the UAPI header - handful of mptcp fixes Previous release - regressions: - intel: AF_XDP: clear the status bits for the next_to_use descriptor - dpaa2-eth: fix the size of the mapped SGT buffer Previous release - always broken: - mptcp: fix security context on server socket - ethtool: fix string set id check - ethtool: fix error paths in ethnl_set_channels() - lan743x: fix rx_napi_poll/interrupt ping-pong - qca: ar9331: fix sleeping function called from invalid context bug" * tag 'net-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (32 commits) net/sched: sch_taprio: reset child qdiscs before freeing them nfp: move indirect block cleanup to flower app stop callback octeontx2-af: Fix undetected unmap PF error check net: nixge: fix spelling mistake in Kconfig: "Instuments" -> "Instruments" qlcnic: Fix error code in probe mptcp: fix pending data accounting mptcp: push pending frames when subflow has free space mptcp: properly annotate nested lock mptcp: fix security context on server socket net/mlx5: Fix compilation warning for 32-bit platform mptcp: clear use_ack and use_map when dropping other suboptions devlink: use _BITUL() macro instead of BIT() in the UAPI header net: korina: fix return value net/smc: fix access to parent of an ib device ethtool: fix error paths in ethnl_set_channels() nfc: s3fwrn5: Remove unused NCI prop commands nfc: s3fwrn5: Remove the delay for NFC sleep phy: fix kdoc warning tipc: do sanity check payload of a netlink message use __netdev_notify_peers in hyperv ... commit 088fb29b40f2c78bfe01cebce1a1506b6f7e56d1 Author: Alex Deucher Date: Wed Dec 16 11:36:28 2020 -0500 drm/amdgpu: fix vbios reservation handling on SR-IOV There is no reserveration so set the size to 0. Fixes a regression on SR-IOV. Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 9e3a6ab74ff80128c337d5f95ce1867a452dc67e Author: Xiaomeng Hou Date: Thu Dec 17 10:41:10 2020 +0800 drm/amd/pm: check pmfw version before issuing RlcPowerNotify message Only pmfw version behind v4.63.23.00 could support this message. Signed-off-by: Xiaomeng Hou Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 6cc980e3f52e2e8db6d0d3bad076b495bd492658 Author: Harish Kasiviswanathan Date: Wed Dec 16 17:04:23 2020 -0500 drm/amdkfd: PCIe atomics required for gfx10 GFX10 CP firmware expects PCIe atomics support. Don't enumerate GFX10 devices on platforms (PCIe v2) that don't support PCIe atomics. Currently, some of the applications like clinfo soft hangs on platforms without PCIe atomics support. Signed-off-by: Harish Kasiviswanathan Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 0c6c887835b59c10602add88057c9c06f265effe Merge: 8a5be36b9303a d8398bf840f89 Author: Linus Torvalds Date: Thu Dec 17 13:41:27 2020 -0800 Merge tag 'for-linus' of git://github.com/openrisc/linux Pull OpenRISC updates from Stafford Horne: - New drivers and OpenRISC support for the LiteX platform - A bug fix to support userspace gdb debugging - Fixes one compile issue with blk-iocost * tag 'for-linus' of git://github.com/openrisc/linux: openrisc: add local64.h to fix blk-iocost build openrisc: fix trap for debugger breakpoint signalling openrisc: add support for LiteX drivers/tty/serial: add LiteUART driver dt-bindings: serial: document LiteUART bindings drivers/soc/litex: add LiteX SoC Controller driver dt-bindings: soc: document LiteX SoC Controller bindings dt-bindings: vendor: add vendor prefix for LiteX commit 8a5be36b9303ae167468d4f5e1b3c090b9981396 Merge: 09c0796adf0c7 c1bea0a840ac7 Author: Linus Torvalds Date: Thu Dec 17 13:34:25 2020 -0800 Merge tag 'powerpc-5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc updates from Michael Ellerman: - Switch to the generic C VDSO, as well as some cleanups of our VDSO setup/handling code. - Support for KUAP (Kernel User Access Prevention) on systems using the hashed page table MMU, using memory protection keys. - Better handling of PowerVM SMT8 systems where all threads of a core do not share an L2, allowing the scheduler to make better scheduling decisions. - Further improvements to our machine check handling. - Show registers when unwinding interrupt frames during stack traces. - Improvements to our pseries (PowerVM) partition migration code. - Several series from Christophe refactoring and cleaning up various parts of the 32-bit code. - Other smaller features, fixes & cleanups. Thanks to: Alan Modra, Alexey Kardashevskiy, Andrew Donnellan, Aneesh Kumar K.V, Ard Biesheuvel, Athira Rajeev, Balamuruhan S, Bill Wendling, Cédric Le Goater, Christophe Leroy, Christophe Lombard, Colin Ian King, Daniel Axtens, David Hildenbrand, Frederic Barrat, Ganesh Goudar, Gautham R. Shenoy, Geert Uytterhoeven, Giuseppe Sacco, Greg Kurz, Harish, Jan Kratochvil, Jordan Niethe, Kaixu Xia, Laurent Dufour, Leonardo Bras, Madhavan Srinivasan, Mahesh Salgaonkar, Mathieu Desnoyers, Nathan Lynch, Nicholas Piggin, Oleg Nesterov, Oliver O'Halloran, Oscar Salvador, Po-Hsu Lin, Qian Cai, Qinglang Miao, Randy Dunlap, Ravi Bangoria, Sachin Sant, Sandipan Das, Sebastian Andrzej Siewior , Segher Boessenkool, Srikar Dronamraju, Tyrel Datwyler, Uwe Kleine-König, Vincent Stehlé, Youling Tang, and Zhang Xiaoxu. * tag 'powerpc-5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (304 commits) powerpc/32s: Fix cleanup_cpu_mmu_context() compile bug powerpc: Add config fragment for disabling -Werror powerpc/configs: Add ppc64le_allnoconfig target powerpc/powernv: Rate limit opal-elog read failure message powerpc/pseries/memhotplug: Quieten some DLPAR operations powerpc/ps3: use dma_mapping_error() powerpc: force inlining of csum_partial() to avoid multiple csum_partial() with GCC10 powerpc/perf: Fix Threshold Event Counter Multiplier width for P10 powerpc/mm: Fix hugetlb_free_pmd_range() and hugetlb_free_pud_range() KVM: PPC: Book3S HV: Fix mask size for emulated msgsndp KVM: PPC: fix comparison to bool warning KVM: PPC: Book3S: Assign boolean values to a bool variable powerpc: Inline setup_kup() powerpc/64s: Mark the kuap/kuep functions non __init KVM: PPC: Book3S HV: XIVE: Add a comment regarding VP numbering powerpc/xive: Improve error reporting of OPAL calls powerpc/xive: Simplify xive_do_source_eoi() powerpc/xive: Remove P9 DD1 flag XIVE_IRQ_FLAG_EOI_FW powerpc/xive: Remove P9 DD1 flag XIVE_IRQ_FLAG_MASK_FW powerpc/xive: Remove P9 DD1 flag XIVE_IRQ_FLAG_SHIFT_BUG ... commit 09c0796adf0c793462fda1d7c8c43324551405c7 Merge: 312dcaf967219 f6a694665f132 Author: Linus Torvalds Date: Thu Dec 17 13:22:17 2020 -0800 Merge tag 'trace-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing updates from Steven Rostedt: "The major update to this release is that there's a new arch config option called CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS. Currently, only x86_64 enables it. All the ftrace callbacks now take a struct ftrace_regs instead of a struct pt_regs. If the architecture has HAVE_DYNAMIC_FTRACE_WITH_ARGS enabled, then the ftrace_regs will have enough information to read the arguments of the function being traced, as well as access to the stack pointer. This way, if a user (like live kernel patching) only cares about the arguments, then it can avoid using the heavier weight "regs" callback, that puts in enough information in the struct ftrace_regs to simulate a breakpoint exception (needed for kprobes). A new config option that audits the timestamps of the ftrace ring buffer at most every event recorded. Ftrace recursion protection has been cleaned up to move the protection to the callback itself (this saves on an extra function call for those callbacks). Perf now handles its own RCU protection and does not depend on ftrace to do it for it (saving on that extra function call). New debug option to add "recursed_functions" file to tracefs that lists all the places that triggered the recursion protection of the function tracer. This will show where things need to be fixed as recursion slows down the function tracer. The eval enum mapping updates done at boot up are now offloaded to a work queue, as it caused a noticeable pause on slow embedded boards. Various clean ups and last minute fixes" * tag 'trace-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (33 commits) tracing: Offload eval map updates to a work queue Revert: "ring-buffer: Remove HAVE_64BIT_ALIGNED_ACCESS" ring-buffer: Add rb_check_bpage in __rb_allocate_pages ring-buffer: Fix two typos in comments tracing: Drop unneeded assignment in ring_buffer_resize() tracing: Disable ftrace selftests when any tracer is running seq_buf: Avoid type mismatch for seq_buf_init ring-buffer: Fix a typo in function description ring-buffer: Remove obsolete rb_event_is_commit() ring-buffer: Add test to validate the time stamp deltas ftrace/documentation: Fix RST C code blocks tracing: Clean up after filter logic rewriting tracing: Remove the useless value assignment in test_create_synth_event() livepatch: Use the default ftrace_ops instead of REGS when ARGS is available ftrace/x86: Allow for arguments to be passed in to ftrace_regs by default ftrace: Have the callbacks receive a struct ftrace_regs instead of pt_regs MAINTAINERS: assign ./fs/tracefs to TRACING tracing: Fix some typos in comments ftrace: Remove unused varible 'ret' ring-buffer: Add recording of ring buffer recursion into recursed_functions ... commit 312dcaf967219effe0483785f24e4072a5bed9a5 Merge: 6daa90439e91b 38dc717e97153 Author: Linus Torvalds Date: Thu Dec 17 13:01:31 2020 -0800 Merge tag 'modules-for-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux Pull modules updates from Jessica Yu: "Summary of modules changes for the 5.11 merge window: - Fix a race condition between systemd/udev and the module loader. The module loader was sending a uevent before the module was fully initialized (i.e., before its init function has been called). This means udev can start processing the module uevent before the module has finished initializing, and some udev rules expect that the module has initialized already upon receiving the uevent. This resulted in some systemd mount units failing if udev processes the event faster than the module can finish init. This is fixed by delaying the uevent until after the module has called its init routine. - Make the linker array sections for kernel params and module version attributes more robust by switching to use the alignment of the type in question. Namely, linker section arrays will be constructed using the alignment required by the struct (using __alignof__()) as opposed to a specific value such as sizeof(void *) or sizeof(long). This is less likely to cause breakages should the size of the type ever change (Johan Hovold) - Fix module state inconsistency by setting it back to GOING when a module fails to load and is on its way out (Miroslav Benes) - Some comment and code cleanups (Sergey Shtylyov)" * tag 'modules-for-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux: module: delay kobject uevent until after module init call module: drop semicolon from version macro init: use type alignment for kernel parameters params: clean up module-param macros params: use type alignment for kernel parameters params: drop redundant "unused" attributes module: simplify version-attribute handling module: drop version-attribute alignment module: fix comment style module: add more 'kernel-doc' comments module: fix up 'kernel-doc' comments module: only handle errors with the *switch* statement in module_sig_check() module: avoid *goto*s in module_sig_check() module: merge repetitive strings in module_sig_check() module: set MODULE_STATE_GOING state when a module fails to load commit 0b9491b621196a5d7f163dde81d98e0687bdba97 Author: Zheng Yongjun Date: Wed Dec 16 21:27:33 2020 +0800 watchdog: convert comma to semicolon Replace a comma between expression statements by a semicolon. Signed-off-by: Zheng Yongjun Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20201216132733.15635-1-zhengyongjun3@huawei.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 3ac874fa84d1baaf0c0175f2a1499f5d88d528b2 Author: Sylwester Dziedziuch Date: Thu Oct 22 12:39:36 2020 +0200 i40e: Fix Error I40E_AQ_RC_EINVAL when removing VFs When removing VFs for PF added to bridge there was an error I40E_AQ_RC_EINVAL. It was caused by not properly resetting and reinitializing PF when adding/removing VFs. Changed how reset is performed when adding/removing VFs to properly reinitialize PFs VSI. Fixes: fc60861e9b00 ("i40e: start up in VEPA mode by default") Signed-off-by: Sylwester Dziedziuch Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen commit 6daa90439e91bb9a71864b02f7d0af8587ea889a Merge: 83005cd6bc76e 115ff12aecfd5 Author: Linus Torvalds Date: Thu Dec 17 12:52:23 2020 -0800 Merge tag 'dmaengine-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine Pull dmaengine updates from Vinod Koul: "The last dmaengine updates for this year :) This contains couple of new drivers, new device support and updates to bunch of drivers. New drivers/devices: - Qualcomm ADM driver - Qualcomm GPI driver - Allwinner A100 DMA support - Microchip Sama7g5 support - Mediatek MT8516 apdma Updates: - more updates to idxd driver and support for IAX config - runtime PM support for dw driver - TI drivers" * tag 'dmaengine-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: (75 commits) soc: ti: k3-ringacc: Use correct error casting in k3_ringacc_dmarings_init dmaengine: ti: k3-udma-glue: Add support for K3 PKTDMA dmaengine: ti: k3-udma: Initial support for K3 PKTDMA dmaengine: ti: k3-udma: Add support for BCDMA channel TPL handling dmaengine: ti: k3-udma: Initial support for K3 BCDMA soc: ti: k3-ringacc: add AM64 DMA rings support. dmaengine: ti: Add support for k3 event routers dmaengine: ti: k3-psil: Add initial map for AM64 dmaengine: ti: k3-psil: Extend psil_endpoint_config for K3 PKTDMA dt-bindings: dma: ti: Add document for K3 PKTDMA dt-bindings: dma: ti: Add document for K3 BCDMA dmaengine: dmatest: Use dmaengine_get_dma_device dmaengine: doc: client: Update for dmaengine_get_dma_device() usage dmaengine: Add support for per channel coherency handling dmaengine: of-dma: Add support for optional router configuration callback dmaengine: ti: k3-udma-glue: Configure the dma_dev for rings dmaengine: ti: k3-udma-glue: Get the ringacc from udma_dev dmaengine: ti: k3-udma-glue: Add function to get device pointer for DMA API dmaengine: ti: k3-udma: Add support for second resource range from sysfw dmaengine: ti: k3-udma: Wait for peer teardown completion if supported ... commit 71425189b2b75336d869cfdedea45c9d319fc9c9 Author: Sebastian Andrzej Siewior Date: Fri Dec 4 20:13:54 2020 +0100 blk-mq: Don't complete on a remote CPU in force threaded mode With force threaded interrupts enabled, raising softirq from an SMP function call will always result in waking the ksoftirqd thread. This is not optimal given that the thread runs at SCHED_OTHER priority. Completing the request in hard IRQ-context on PREEMPT_RT (which enforces the force threaded mode) is bad because the completion handler may acquire sleeping locks which violate the locking context. Disable request completing on a remote CPU in force threaded mode. Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Christoph Hellwig Reviewed-by: Daniel Wagner Signed-off-by: Jens Axboe commit 53a7f655834c7c335bf683f248208d4fbe4b47bc Author: Stefan Haberland Date: Thu Dec 17 16:59:07 2020 +0100 s390/dasd: fix list corruption of lcu list In dasd_alias_disconnect_device_from_lcu the device is removed from any list on the LCU. Afterwards the LCU is removed from the lcu list if it does not contain devices any longer. The lcu->lock protects the lcu from parallel updates. But to cancel all workers and wait for completion the lcu->lock has to be unlocked. If two devices are removed in parallel and both are removed from the LCU the first device that takes the lcu->lock again will delete the LCU because it is already empty but the second device also tries to free the LCU which leads to a list corruption of the lcu list. Fix by removing the device right before the lcu is checked without unlocking the lcu->lock in between. Fixes: 8e09f21574ea ("[S390] dasd: add hyper PAV support to DASD device driver, part 1") Cc: stable@vger.kernel.org Signed-off-by: Stefan Haberland Reviewed-by: Jan Hoeppner Signed-off-by: Jens Axboe commit 0ede91f83aa335da1c3ec68eb0f9e228f269f6d8 Author: Stefan Haberland Date: Thu Dec 17 16:59:06 2020 +0100 s390/dasd: fix list corruption of pavgroup group list dasd_alias_add_device() moves devices to the active_devices list in case of a scheduled LCU update regardless if they have previously been in a pavgroup or not. Example: device A and B are in the same pavgroup. Device A has already been in a pavgroup and the private->pavgroup pointer is set and points to a valid pavgroup. While going through dasd_add_device it is moved from the pavgroup to the active_devices list. In parallel device B might be removed from the same pavgroup in remove_device_from_lcu() which in turn checks if the group is empty and deletes it accordingly because device A has already been removed from there. When now device A enters remove_device_from_lcu() it is tried to remove it from the pavgroup again because the pavgroup pointer is still set and again the empty group will be cleaned up which leads to a list corruption. Fix by setting private->pavgroup to NULL in dasd_add_device. If the device has been the last device on the pavgroup an empty pavgroup remains but this will be cleaned up by the scheduled lcu_update which iterates over all existing pavgroups. Fixes: 8e09f21574ea ("[S390] dasd: add hyper PAV support to DASD device driver, part 1") Cc: stable@vger.kernel.org Signed-off-by: Stefan Haberland Reviewed-by: Jan Hoeppner Signed-off-by: Jens Axboe commit a29ea01653493b94ea12bb2b89d1564a265081b6 Author: Stefan Haberland Date: Thu Dec 17 16:59:05 2020 +0100 s390/dasd: prevent inconsistent LCU device data Prevent _lcu_update from adding a device to a pavgroup if the LCU still requires an update. The data is not reliable any longer and in parallel devices might have been moved on the lists already. This might lead to list corruptions or invalid PAV grouping. Only add devices to a pavgroup if the LCU is up to date. Additional steps are taken by the scheduled lcu update. Fixes: 8e09f21574ea ("[S390] dasd: add hyper PAV support to DASD device driver, part 1") Cc: stable@vger.kernel.org Signed-off-by: Stefan Haberland Reviewed-by: Jan Hoeppner Signed-off-by: Jens Axboe commit 658a337a606f48b7ebe451591f7681d383fa115e Author: Stefan Haberland Date: Thu Dec 17 16:59:04 2020 +0100 s390/dasd: fix hanging device offline processing For an LCU update a read unit address configuration IO is required. This is started using sleep_on(), which has early exit paths in case the device is not usable for IO. For example when it is in offline processing. In those cases the LCU update should fail and not be retried. Therefore lcu_update_work checks if EOPNOTSUPP is returned or not. Commit 41995342b40c ("s390/dasd: fix endless loop after read unit address configuration") accidentally removed the EOPNOTSUPP return code from read_unit_address_configuration(), which in turn might lead to an endless loop of the LCU update in offline processing. Fix by returning EOPNOTSUPP again if the device is not able to perform the request. Fixes: 41995342b40c ("s390/dasd: fix endless loop after read unit address configuration") Cc: stable@vger.kernel.org #5.3 Signed-off-by: Stefan Haberland Reviewed-by: Jan Hoeppner Signed-off-by: Jens Axboe commit 83005cd6bc76eef7bbf46b55bbb00ccc9534c38c Merge: 74f602dc96dd8 5a6338cce9f41 Author: Linus Torvalds Date: Thu Dec 17 12:39:39 2020 -0800 Merge tag 'mailbox-v5.11' of git://git.linaro.org/landing-teams/working/fujitsu/integration Pull mailbox updates from Jassi Brar: - arm: added mhu-v2 controller driver - arm_mhu_db: fix kfree by using devm_ variant - stm32-ipcc: misc cleanup * tag 'mailbox-v5.11' of git://git.linaro.org/landing-teams/working/fujitsu/integration: mailbox: arm_mhuv2: Add driver dt-bindings: mailbox : arm,mhuv2: Add bindings mailbox: stm32-ipcc: cast void pointers to unsigned long mailbox: stm32-ipcc: remove duplicate error message mailbox: stm32-ipcc: add COMPILE_TEST dependency mailbox: arm_mhu_db: Fix mhu_db_shutdown by replacing kfree with devm_kfree commit 74f602dc96dd854c7b2034947798c1e2a6b84066 Merge: be695ee29e8fc 52104f274e2d7 Author: Linus Torvalds Date: Thu Dec 17 12:15:03 2020 -0800 Merge tag 'nfs-for-5.11-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs Pull NFS client updates from Trond Myklebust: "Highlights include: Features: - NFSv3: Add emulation of lookupp() to improve open_by_filehandle() support - A series of patches to improve readdir performance, particularly with large directories - Basic support for using NFS/RDMA with the pNFS files and flexfiles drivers - Micro-optimisations for RDMA - RDMA tracing improvements Bugfixes: - Fix a long standing bug with xs_read_xdr_buf() when receiving partial pages (Dan Aloni) - Various fixes for getxattr and listxattr, when used over non-TCP transports - Fixes for containerised NFS from Sargun Dhillon - switch nfsiod to be an UNBOUND workqueue (Neil Brown) - READDIR should not ask for security label information if there is no LSM policy (Olga Kornievskaia) - Avoid using interval-based rebinding with TCP in lockd (Calum Mackay) - A series of RPC and NFS layer fixes to support the NFSv4.2 READ_PLUS code - A couple of fixes for pnfs/flexfiles read failover Cleanups: - Various cleanups for the SUNRPC xdr code in conjunction with the READ_PLUS fixes" * tag 'nfs-for-5.11-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (90 commits) NFS/pNFS: Fix a typo in ff_layout_resend_pnfs_read() pNFS/flexfiles: Avoid spurious layout returns in ff_layout_choose_ds_for_read NFSv4/pnfs: Add tracing for the deviceid cache fs/lockd: convert comma to semicolon NFSv4.2: fix error return on memory allocation failure NFSv4.2/pnfs: Don't use READ_PLUS with pNFS yet NFSv4.2: Deal with potential READ_PLUS data extent buffer overflow NFSv4.2: Don't error when exiting early on a READ_PLUS buffer overflow NFSv4.2: Handle hole lengths that exceed the READ_PLUS read buffer NFSv4.2: decode_read_plus_hole() needs to check the extent offset NFSv4.2: decode_read_plus_data() must skip padding after data segment NFSv4.2: Ensure we always reset the result->count in decode_read_plus() SUNRPC: When expanding the buffer, we may need grow the sparse pages SUNRPC: Cleanup - constify a number of xdr_buf helpers SUNRPC: Clean up open coded setting of the xdr_stream 'nwords' field SUNRPC: _copy_to/from_pages() now check for zero length SUNRPC: Cleanup xdr_shrink_bufhead() SUNRPC: Fix xdr_expand_hole() SUNRPC: Fixes for xdr_align_data() SUNRPC: _shift_data_left/right_pages should check the shift length ... commit be695ee29e8fc0af266d9f1882868c47da01a790 Merge: 92dbc9dedccb9 2f0df6cfa325d Author: Linus Torvalds Date: Thu Dec 17 11:53:52 2020 -0800 Merge tag 'ceph-for-5.11-rc1' of git://github.com/ceph/ceph-client Pull ceph updates from Ilya Dryomov: "The big ticket item here is support for msgr2 on-wire protocol, which adds the option of full in-transit encryption using AES-GCM algorithm (myself). On top of that we have a series to avoid intermittent errors during recovery with recover_session=clean and some MDS request encoding work from Jeff, a cap handling fix and assorted observability improvements from Luis and Xiubo and a good number of cleanups. Luis also ran into a corner case with quotas which sadly means that we are back to denying cross-quota-realm renames" * tag 'ceph-for-5.11-rc1' of git://github.com/ceph/ceph-client: (59 commits) libceph: drop ceph_auth_{create,update}_authorizer() libceph, ceph: make use of __ceph_auth_get_authorizer() in msgr1 libceph, ceph: implement msgr2.1 protocol (crc and secure modes) libceph: introduce connection modes and ms_mode option libceph, rbd: ignore addr->type while comparing in some cases libceph, ceph: get and handle cluster maps with addrvecs libceph: factor out finish_auth() libceph: drop ac->ops->name field libceph: amend cephx init_protocol() and build_request() libceph, ceph: incorporate nautilus cephx changes libceph: safer en/decoding of cephx requests and replies libceph: more insight into ticket expiry and invalidation libceph: move msgr1 protocol specific fields to its own struct libceph: move msgr1 protocol implementation to its own file libceph: separate msgr1 protocol implementation libceph: export remaining protocol independent infrastructure libceph: export zero_page libceph: rename and export con->flags bits libceph: rename and export con->state states libceph: make con->state an int ... commit 92dbc9dedccb9759c7f9f2f0ae6242396376988f Merge: 65de0b89d7d5e 459c7c565ac36 Author: Linus Torvalds Date: Thu Dec 17 11:42:48 2020 -0800 Merge tag 'ovl-update-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs Pull overlayfs updates from Miklos Szeredi: - Allow unprivileged mounting in a user namespace. For quite some time the security model of overlayfs has been that operations on underlying layers shall be performed with the privileges of the mounting task. This way an unprvileged user cannot gain privileges by the act of mounting an overlayfs instance. A full audit of all function calls made by the overlayfs code has been performed to see whether they conform to this model, and this branch contains some fixes in this regard. - Support running on copied filesystem images by optionally disabling UUID verification. - Bug fixes as well as documentation updates. * tag 'ovl-update-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: ovl: unprivieged mounts ovl: do not get metacopy for userxattr ovl: do not fail because of O_NOATIME ovl: do not fail when setting origin xattr ovl: user xattr ovl: simplify file splice ovl: make ioctl() safe ovl: check privs before decoding file handle vfs: verify source area in vfs_dedupe_file_range_one() vfs: move cap_convert_nscap() call into vfs_setxattr() ovl: fix incorrect extent info in metacopy case ovl: expand warning in ovl_d_real() ovl: document lower modification caveats ovl: warn about orphan metacopy ovl: doc clarification ovl: introduce new "uuid=off" option for inodes index feature ovl: propagate ovl_fs to ovl_decode_real_fh and ovl_encode_real_fh commit 65de0b89d7d5e173d71cb50dfae786133c579308 Merge: ff49c86f27e47 5d069dbe8aaf2 Author: Linus Torvalds Date: Thu Dec 17 11:34:25 2020 -0800 Merge tag 'fuse-update-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse Pull fuse updates from Miklos Szeredi: - Improve performance of virtio-fs in mixed read/write workloads - Try to revalidate cache before returning EEXIST on exclusive create - Add a couple of miscellaneous bug fixes as well as some code cleanups * tag 'fuse-update-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: fuse: fix bad inode fuse: support SB_NOSEC flag to improve write performance fuse: add a flag FUSE_OPEN_KILL_SUIDGID for open() request fuse: don't send ATTR_MODE to kill suid/sgid for handle_killpriv_v2 fuse: setattr should set FATTR_KILL_SUIDGID fuse: set FUSE_WRITE_KILL_SUIDGID in cached write path fuse: rename FUSE_WRITE_KILL_PRIV to FUSE_WRITE_KILL_SUIDGID fuse: introduce the notion of FUSE_HANDLE_KILLPRIV_V2 fuse: always revalidate if exclusive create virtiofs: clean up error handling in virtio_fs_get_tree() fuse: add fuse_sb_destroy() helper fuse: simplify get_fuse_conn*() fuse: get rid of fuse_mount refcount virtiofs: simplify sb setup virtiofs fix leak in setup fuse: launder page should wait for page writeback commit fef98671194be005853cbbf51b164a3927589b64 Author: Rafael J. Wysocki Date: Thu Dec 17 20:23:17 2020 +0100 ACPI: PM: s2idle: Move x86-specific code to the x86 directory Some code in drivers/acpi/sleep.c (which is regarded as a generic file) related to suspend-to-idle support has grown direct dependencies on x86, but in fact it has been specific to x86 (which is the only user of it) anyway for a long time. For this reason, move that code to a separate file under acpi/x86/ and make it build and run as before under the right conditions. While at it, rename a vendor checking function in that code and consistently use acpi_handle_debug() for printing debug-related information in it. No expected functional impact. Signed-off-by: Rafael J. Wysocki commit ff49c86f27e4726a86f5034543e6e684daf41955 Merge: b97d4c424e362 75e91c888989c Author: Linus Torvalds Date: Thu Dec 17 11:18:00 2020 -0800 Merge tag 'f2fs-for-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs Pull f2fs updates from Jaegeuk Kim: "In this round, we've made more work into per-file compression support. For example, F2FS_IOC_GET | SET_COMPRESS_OPTION provides a way to change the algorithm or cluster size per file. F2FS_IOC_COMPRESS | DECOMPRESS_FILE provides a way to compress and decompress the existing normal files manually. There is also a new mount option, compress_mode=fs|user, which can control who compresses the data. Chao also added a checksum feature with a mount option so that we are able to detect any corrupted cluster. In addition, Daniel contributed casefolding with encryption patch, which will be used for Android devices. Summary: Enhancements: - add ioctls and mount option to manage per-file compression feature - support casefolding with encryption - support checksum for compressed cluster - avoid IO starvation by replacing mutex with rwsem - add sysfs, max_io_bytes, to control max bio size Bug fixes: - fix use-after-free issue when compression and fsverity are enabled - fix consistency corruption during fault injection test - fix data offset for lseek - get rid of buffer_head which has 32bits limit in fiemap - fix some bugs in multi-partitions support - fix nat entry count calculation in shrinker - fix some stat information And, we've refactored some logics and fix minor bugs as well" * tag 'f2fs-for-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (36 commits) f2fs: compress: fix compression chksum f2fs: fix shift-out-of-bounds in sanity_check_raw_super() f2fs: fix race of pending_pages in decompression f2fs: fix to account inline xattr correctly during recovery f2fs: inline: fix wrong inline inode stat f2fs: inline: correct comment in f2fs_recover_inline_data f2fs: don't check PAGE_SIZE again in sanity_check_raw_super() f2fs: convert to F2FS_*_INO macro f2fs: introduce max_io_bytes, a sysfs entry, to limit bio size f2fs: don't allow any writes on readonly mount f2fs: avoid race condition for shrinker count f2fs: add F2FS_IOC_DECOMPRESS_FILE and F2FS_IOC_COMPRESS_FILE f2fs: add compress_mode mount option f2fs: Remove unnecessary unlikely() f2fs: init dirty_secmap incorrectly f2fs: remove buffer_head which has 32bits limit f2fs: fix wrong block count instead of bytes f2fs: use new conversion functions between blks and bytes f2fs: rename logical_to_blk and blk_to_logical f2fs: fix kbytes written stat for multi-device case ... commit b97d4c424e362ebf88fd9aa1b7ad82e3a28c26d3 Merge: 14bd41e41899c f7387170339af Author: Linus Torvalds Date: Thu Dec 17 11:00:37 2020 -0800 Merge tag 'for_v5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull ext2, reiserfs, quota and writeback updates from Jan Kara: - a couple of quota fixes (mostly for problems found by syzbot) - several ext2 cleanups - one fix for reiserfs crash on corrupted image - a fix for spurious warning in writeback code * tag 'for_v5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: writeback: don't warn on an unregistered BDI in __mark_inode_dirty fs: quota: fix array-index-out-of-bounds bug by passing correct argument to vfs_cleanup_quota_inode() reiserfs: add check for an invalid ih_entry_count ext2: Fix fall-through warnings for Clang fs/ext2: Use ext2_put_page docs: filesystems: Reduce ext2.rst to one top-level heading quota: Sanity-check quota file headers on load quota: Don't overflow quota file offsets ext2: Remove unnecessary blank fs/quota: update quota state flags scheme with project quota flags commit 44d4775ca51805b376a8db5b34f650434a08e556 Author: Davide Caratti Date: Wed Dec 16 19:33:29 2020 +0100 net/sched: sch_taprio: reset child qdiscs before freeing them syzkaller shows that packets can still be dequeued while taprio_destroy() is running. Let sch_taprio use the reset() function to cancel the advance timer and drop all skbs from the child qdiscs. Fixes: 5a781ccbd19e ("tc: Add support for configuring the taprio scheduler") Link: https://syzkaller.appspot.com/bug?id=f362872379bf8f0017fb667c1ab158f2d1e764ae Reported-by: syzbot+8971da381fb5a31f542d@syzkaller.appspotmail.com Signed-off-by: Davide Caratti Acked-by: Vinicius Costa Gomes Link: https://lore.kernel.org/r/63b6d79b0e830ebb0283e020db4df3cdfdfb2b94.1608142843.git.dcaratti@redhat.com Signed-off-by: Jakub Kicinski commit 5b33afee93a1e7665a5ffae027fc66f9376f4ea7 Author: Simon Horman Date: Wed Dec 16 15:57:01 2020 +0100 nfp: move indirect block cleanup to flower app stop callback The indirect block cleanup may cause control messages to be sent if offloaded flows are present. However, by the time the flower app cleanup callback is called txbufs are no longer available and attempts to send control messages result in a NULL-pointer dereference in nfp_ctrl_tx_one(). This problem may be resolved by moving the indirect block cleanup to the stop callback, where txbufs are still available. As suggested by Jakub Kicinski and Louis Peens. Fixes: a1db217861f3 ("net: flow_offload: fix flow_indr_dev_unregister path") Signed-off-by: Simon Horman Signed-off-by: Louis Peens Link: https://lore.kernel.org/r/20201216145701.30005-1-simon.horman@netronome.com Signed-off-by: Jakub Kicinski commit d8a4ea350f1fff71c9988ea3da3c913ec30bbfbe Author: Colin Ian King Date: Wed Dec 16 12:36:04 2020 +0000 octeontx2-af: Fix undetected unmap PF error check Currently the check for an unmap PF error is always going to be false because intr_val is a 32 bit int and is being bit-mask checked against 1ULL << 32. Fix this by making intr_val a u64 to match the type at it is copied from, namely npa_event_context->npa_af_rvu_ge. Addresses-Coverity: ("Operands don't affect result") Fixes: f1168d1e207c ("octeontx2-af: Add devlink health reporters for NPA") Signed-off-by: Colin Ian King Acked-by: George Cherian Link: https://lore.kernel.org/r/20201216123604.15369-1-colin.king@canonical.com Signed-off-by: Jakub Kicinski commit 14bd41e41899cbd1de4bb5ddfa46c85b08091a69 Merge: d652d5f1eeeb0 fecc4559780d5 Author: Linus Torvalds Date: Thu Dec 17 10:56:27 2020 -0800 Merge tag 'fsnotify_for_v5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull fsnotify updates from Jan Kara: "A few fsnotify fixes from Amir fixing fallout from big fsnotify overhaul a few months back and an improvement of defaults limiting maximum number of inotify watches from Waiman" * tag 'fsnotify_for_v5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: fsnotify: fix events reported to watching parent and child inotify: convert to handle_inode_event() interface fsnotify: generalize handle_inode_event() inotify: Increase default inotify.max_user_watches limit to 1048576 commit 38ba95a4ed24126d36288a0c2434ced5b4c244d2 Author: Colin Ian King Date: Wed Dec 16 12:00:20 2020 +0000 net: nixge: fix spelling mistake in Kconfig: "Instuments" -> "Instruments" There is a spelling mistake in the Kconfig. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20201216120020.13149-1-colin.king@canonical.com Signed-off-by: Jakub Kicinski commit 0d52848632a357948028eab67ff9b7cc0c12a0fb Author: Dan Carpenter Date: Wed Dec 16 11:38:04 2020 +0300 qlcnic: Fix error code in probe Return -EINVAL if we can't find the correct device. Currently it returns success. Fixes: 13159183ec7a ("qlcnic: 83xx base driver") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/X9nHbMqEyI/xPfGd@mwanda Signed-off-by: Jakub Kicinski commit 5c8193f568ae16f3242abad6518dc2ca6c8eef86 Author: Vasily Averin Date: Thu Dec 17 17:53:18 2020 +0300 netfilter: ipset: fix shift-out-of-bounds in htable_bits() htable_bits() can call jhash_size(32) and trigger shift-out-of-bounds UBSAN: shift-out-of-bounds in net/netfilter/ipset/ip_set_hash_gen.h:151:6 shift exponent 32 is too large for 32-bit type 'unsigned int' CPU: 0 PID: 8498 Comm: syz-executor519 Not tainted 5.10.0-rc7-next-20201208-syzkaller #0 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x107/0x163 lib/dump_stack.c:120 ubsan_epilogue+0xb/0x5a lib/ubsan.c:148 __ubsan_handle_shift_out_of_bounds.cold+0xb1/0x181 lib/ubsan.c:395 htable_bits net/netfilter/ipset/ip_set_hash_gen.h:151 [inline] hash_mac_create.cold+0x58/0x9b net/netfilter/ipset/ip_set_hash_gen.h:1524 ip_set_create+0x610/0x1380 net/netfilter/ipset/ip_set_core.c:1115 nfnetlink_rcv_msg+0xecc/0x1180 net/netfilter/nfnetlink.c:252 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2494 nfnetlink_rcv+0x1ac/0x420 net/netfilter/nfnetlink.c:600 netlink_unicast_kernel net/netlink/af_netlink.c:1304 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1330 netlink_sendmsg+0x907/0xe40 net/netlink/af_netlink.c:1919 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:672 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2345 ___sys_sendmsg+0xf3/0x170 net/socket.c:2399 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2432 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 This patch replaces htable_bits() by simple fls(hashsize - 1) call: it alone returns valid nbits both for round and non-round hashsizes. It is normal to set any nbits here because it is validated inside following htable_size() call which returns 0 for nbits>31. Fixes: 1feab10d7e6d("netfilter: ipset: Unified hash type generation") Reported-by: syzbot+d66bfadebca46cf61a2b@syzkaller.appspotmail.com Signed-off-by: Vasily Averin Acked-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso commit 2b33d6ffa9e38f344418976b06057e2fc2aa9e2a Author: Vasily Averin Date: Thu Dec 17 11:53:40 2020 +0300 netfilter: ipset: fixes possible oops in mtype_resize currently mtype_resize() can cause oops t = ip_set_alloc(htable_size(htable_bits)); if (!t) { ret = -ENOMEM; goto out; } t->hregion = ip_set_alloc(ahash_sizeof_regions(htable_bits)); Increased htable_bits can force htable_size() to return 0. In own turn ip_set_alloc(0) returns not 0 but ZERO_SIZE_PTR, so follwoing access to t->hregion should trigger an OOPS. Signed-off-by: Vasily Averin Acked-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso commit 443d6e86f821a165fae3fc3fc13086d27ac140b1 Author: Subash Abhinov Kasiviswanathan Date: Wed Dec 16 21:38:02 2020 -0700 netfilter: x_tables: Update remaining dereference to RCU This fixes the dereference to fetch the RCU pointer when holding the appropriate xtables lock. Reported-by: kernel test robot Fixes: cc00bcaa5899 ("netfilter: x_tables: Switch synchronization to RCU") Signed-off-by: Subash Abhinov Kasiviswanathan Reviewed-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 02a7780e4d2fcf438ac6773bc469e7ada2af56be Author: Jan Kara Date: Fri Nov 27 12:33:59 2020 +0100 ext4: simplify ext4 error translation We convert errno's to ext4 on-disk format error codes in save_error_info(). Add a function and a bit of macro magic to make this simpler. Signed-off-by: Jan Kara Reviewed-by: Andreas Dilger Link: https://lore.kernel.org/r/20201127113405.26867-7-jack@suse.cz Signed-off-by: Theodore Ts'o commit 4067662388f97d0f360e568820d9d5bac6a3c9fa Author: Jan Kara Date: Fri Nov 27 12:33:58 2020 +0100 ext4: move functions in super.c Just move error info related functions in super.c close to ext4_handle_error(). We'll want to combine save_error_info() with ext4_handle_error() and this makes change more obvious and saves a forward declaration as well. No functional change. Signed-off-by: Jan Kara Reviewed-by: Andreas Dilger Link: https://lore.kernel.org/r/20201127113405.26867-6-jack@suse.cz Signed-off-by: Theodore Ts'o commit 014c9caa29d3a44e0de695c99ef18bec3e887d52 Author: Jan Kara Date: Fri Nov 27 12:33:57 2020 +0100 ext4: make ext4_abort() use __ext4_error() The only difference between __ext4_abort() and __ext4_error() is that the former one ignores errors=continue mount option. Unify the code to reduce duplication. Signed-off-by: Jan Kara Reviewed-by: Andreas Dilger Link: https://lore.kernel.org/r/20201127113405.26867-5-jack@suse.cz Signed-off-by: Theodore Ts'o commit 93c20bc3eafba52c134cf5183f18833b9bd22bf8 Author: Jan Kara Date: Fri Nov 27 12:33:56 2020 +0100 ext4: standardize error message in ext4_protect_reserved_inode() We use __ext4_error() when ext4_protect_reserved_inode() finds filesystem corruption. However EXT4_ERROR_INODE_ERR() is perfectly capable of reporting all the needed information. So just use that. Signed-off-by: Jan Kara Reviewed-by: Andreas Dilger Link: https://lore.kernel.org/r/20201127113405.26867-4-jack@suse.cz Signed-off-by: Theodore Ts'o commit 81414b4dd48f596bf33e1b32c2e43e2047150ca6 Author: Jan Kara Date: Fri Nov 27 12:33:55 2020 +0100 ext4: remove redundant sb checksum recomputation Superblock is written out either through ext4_commit_super() or through ext4_handle_dirty_super(). In both cases we recompute the checksum so it is not necessary to recompute it after updating superblock free inodes & blocks counters. Signed-off-by: Jan Kara Reviewed-by: Andreas Dilger Link: https://lore.kernel.org/r/20201127113405.26867-3-jack@suse.cz Signed-off-by: Theodore Ts'o commit b08070eca9e247f60ab39d79b2c25d274750441f Author: Jan Kara Date: Fri Nov 27 12:33:54 2020 +0100 ext4: don't remount read-only with errors=continue on reboot ext4_handle_error() with errors=continue mount option can accidentally remount the filesystem read-only when the system is rebooting. Fix that. Fixes: 1dc1097ff60e ("ext4: avoid panic during forced reboot") Signed-off-by: Jan Kara Reviewed-by: Andreas Dilger Cc: stable@kernel.org Link: https://lore.kernel.org/r/20201127113405.26867-2-jack@suse.cz Signed-off-by: Theodore Ts'o commit 46e294efc355c48d1dd4d58501aa56dac461792a Author: Jan Kara Date: Fri Nov 27 12:06:49 2020 +0100 ext4: fix deadlock with fs freezing and EA inodes Xattr code using inodes with large xattr data can end up dropping last inode reference (and thus deleting the inode) from places like ext4_xattr_set_entry(). That function is called with transaction started and so ext4_evict_inode() can deadlock against fs freezing like: CPU1 CPU2 removexattr() freeze_super() vfs_removexattr() ext4_xattr_set() handle = ext4_journal_start() ... ext4_xattr_set_entry() iput(old_ea_inode) ext4_evict_inode(old_ea_inode) sb->s_writers.frozen = SB_FREEZE_FS; sb_wait_write(sb, SB_FREEZE_FS); ext4_freeze() jbd2_journal_lock_updates() -> blocks waiting for all handles to stop sb_start_intwrite() -> blocks as sb is already in SB_FREEZE_FS state Generally it is advisable to delete inodes from a separate transaction as it can consume quite some credits however in this case it would be quite clumsy and furthermore the credits for inode deletion are quite limited and already accounted for. So just tweak ext4_evict_inode() to avoid freeze protection if we have transaction already started and thus it is not really needed anyway. Cc: stable@vger.kernel.org Fixes: dec214d00e0d ("ext4: xattr inode deduplication") Signed-off-by: Jan Kara Reviewed-by: Andreas Dilger Link: https://lore.kernel.org/r/20201127110649.24730-1-jack@suse.cz Signed-off-by: Theodore Ts'o commit 9bd23c31f392bda88618008f27fd52ee9e0fac38 Author: Harshad Shirwadkar Date: Fri Nov 20 12:22:32 2020 -0800 jbd2: add a helper to find out number of fast commit blocks Add a helper to read number of fast commit blocks from jbd2 superblock and also rename the JBD2_MIN_FC_BLKS to JBD2_DEFAULT_FAST_COMMIT_BLOCKS since this constant is just the default number of fast commit blocks to use in case number of fast commit blocks isn't set in jbd2 superblock. Signed-off-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20201120202232.2240293-2-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit 941ba122ca56756aad82db21d28f283ad33b8dee Author: Harshad Shirwadkar Date: Fri Nov 20 12:22:31 2020 -0800 ext4: make fast_commit.h byte identical with e2fsprogs/fast_commit.h This patch makes fast_commit.h byte by byte identical with e2fsprogs/fast_commit.h. This will help us ensure that there are no on-disk format inconsistencies between e2fsck and kernel ext4. Signed-off-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20201120202232.2240293-1-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit 5a150bdec7dc79ad88e61cdf8c13106dd878311e Author: Gustavo A. R. Silva Date: Fri Nov 20 12:28:32 2020 -0600 ext4: fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of just letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/03497331f088a938d7a728e7a689bd7953139429.1605896059.git.gustavoars@kernel.org Signed-off-by: Theodore Ts'o commit b1b7dce3f09b460da38946d1845f3076daa36abb Author: Harshad Shirwadkar Date: Thu Nov 19 15:28:22 2020 -0800 ext4: add docs about fast commit idempotence Fast commit on-disk format is designed such that the replay of these tags can be idempotent. This patch adds documentation in the code in form of comments and in form kernel docs that describes these characteristics. This patch also adds a TODO item needed to ensure kernel fast commit replay idempotence. Signed-off-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20201119232822.1860882-1-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit 03505c58b86a5ca9bff2a9d611c2fe95dc14f707 Author: Kaixu Xia Date: Thu Nov 12 14:56:42 2020 +0800 ext4: remove the unused EXT4_CURRENT_REV macro There are no callers of the EXT4_CURRENT_REV macro, so remove it. Signed-off-by: Kaixu Xia Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/1605164202-31120-1-git-send-email-kaixuxia@tencent.com Signed-off-by: Theodore Ts'o commit bc18546bf68e47996a359d2533168d5770a22024 Author: Dan Carpenter Date: Fri Oct 23 14:22:32 2020 +0300 ext4: fix an IS_ERR() vs NULL check The ext4_find_extent() function never returns NULL, it returns error pointers. Fixes: 44059e503b03 ("ext4: fast commit recovery path") Signed-off-by: Dan Carpenter Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20201023112232.GB282278@mwanda Signed-off-by: Theodore Ts'o Cc: stable@kernel.org commit c9200760da8a728eb9767ca41a956764b28c1310 Author: Theodore Ts'o Date: Wed Dec 9 15:59:11 2020 -0500 ext4: check for invalid block size early when mounting a file system Check for valid block size directly by validating s_log_block_size; we were doing this in two places. First, by calculating blocksize via BLOCK_SIZE << s_log_block_size, and then checking that the blocksize was valid. And then secondly, by checking s_log_block_size directly. The first check is not reliable, and can trigger an UBSAN warning if s_log_block_size on a maliciously corrupted superblock is greater than 22. This is harmless, since the second test will correctly reject the maliciously fuzzed file system, but to make syzbot shut up, and because the two checks are duplicative in any case, delete the blocksize check, and move the s_log_block_size earlier in ext4_fill_super(). Signed-off-by: Theodore Ts'o Reported-by: syzbot+345b75652b1d24227443@syzkaller.appspotmail.com commit cca415537244f6102cbb09b5b90db6ae2c953bdd Author: Chunguang Xu Date: Sat Nov 7 23:58:18 2020 +0800 ext4: fix a memory leak of ext4_free_data When freeing metadata, we will create an ext4_free_data and insert it into the pending free list. After the current transaction is committed, the object will be freed. ext4_mb_free_metadata() will check whether the area to be freed overlaps with the pending free list. If true, return directly. At this time, ext4_free_data is leaked. Fortunately, the probability of this problem is small, since it only occurs if the file system is corrupted such that a block is claimed by more one inode and those inodes are deleted within a single jbd2 transaction. Signed-off-by: Chunguang Xu Link: https://lore.kernel.org/r/1604764698-4269-8-git-send-email-brookxu@tencent.com Signed-off-by: Theodore Ts'o Cc: stable@kernel.org commit 86eb09b63da419a7261d7dc96e60fdb0e56e341d Merge: 49e27134f6e9e 13e1603739e58 Author: Jakub Kicinski Date: Thu Dec 17 10:25:10 2020 -0800 Merge branch 'mptcp-a-bunch-of-assorted-fixes' Paolo Abeni says: ==================== mptcp: a bunch of assorted fixes This series pulls a few fixes for the MPTCP datapath. Most issues addressed here has been recently introduced with the recent reworks, with the notable exception of the first patch, which addresses an issue present since the early days ==================== Link: https://lore.kernel.org/r/cover.1608114076.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski commit 13e1603739e58e94e7a3c24191fa2dcd1a8a5df3 Author: Paolo Abeni Date: Wed Dec 16 12:48:35 2020 +0100 mptcp: fix pending data accounting When sendmsg() needs to wait for memory, the pending data is not updated. That causes a drift in forward memory allocation, leading to stall and/or warnings at socket close time. This change addresses the above issue moving the pending data counter update inside the sendmsg() main loop. Fixes: 6e628cd3a8f7 ("mptcp: use mptcp release_cb for delayed tasks") Reviewed-by: Mat Martineau Signed-off-by: Paolo Abeni Signed-off-by: Jakub Kicinski commit 219d04992b689e0498ece02d2a451f2b6e2563a9 Author: Paolo Abeni Date: Wed Dec 16 12:48:34 2020 +0100 mptcp: push pending frames when subflow has free space When multiple subflows are active, we can receive a window update on subflow with no write space available. MPTCP will try to push frames on such subflow and will fail. Pending frames will be pushed only after receiving a window update on a subflow with some wspace available. Overall the above could lead to suboptimal aggregate bandwidth usage. Instead, we should try to push pending frames as soon as the subflow reaches both conditions mentioned above. We can finally enable self-tests with asymmetric links, as the above makes them finally pass. Fixes: 6f8a612a33e4 ("mptcp: keep track of advertised windows right edge") Reviewed-by: Mat Martineau Signed-off-by: Paolo Abeni Signed-off-by: Jakub Kicinski commit 3f8b2667f257c21a992bda33bfb919ee164a429c Author: Paolo Abeni Date: Wed Dec 16 12:48:33 2020 +0100 mptcp: properly annotate nested lock MPTCP closes the subflows while holding the msk-level lock. While acquiring the subflow socket lock we need to use the correct nested annotation, or we can hit a lockdep splat at runtime. Reported-and-tested-by: Geliang Tang Fixes: e16163b6e2b7 ("mptcp: refactor shutdown and close") Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Jakub Kicinski commit 0c14846032f2c0a3b63234e1fc2759f4155b6067 Author: Paolo Abeni Date: Wed Dec 16 12:48:32 2020 +0100 mptcp: fix security context on server socket Currently MPTCP is not propagating the security context from the ingress request socket to newly created msk at clone time. Address the issue invoking the missing security helper. Fixes: cf7da0d66cc1 ("mptcp: Create SUBFLOW socket for incoming connections") Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Jakub Kicinski commit 49e27134f6e9ebcd08c04a98ab7f0574b5a81a35 Author: Parav Pandit Date: Sun Dec 13 14:06:41 2020 +0200 net/mlx5: Fix compilation warning for 32-bit platform MLX5_GENERAL_OBJECT_TYPES types bitfield is 64-bit field. Defining an enum for such bit fields on 32-bit platform results in below warning. ./include/vdso/bits.h:7:26: warning: left shift count >= width of type [-Wshift-count-overflow] ^ ./include/linux/mlx5/mlx5_ifc.h:10716:46: note: in expansion of macro ‘BIT’ MLX5_HCA_CAP_GENERAL_OBJECT_TYPES_SAMPLER = BIT(0x20), ^~~ Use 32-bit friendly BIT_ULL macro. Fixes: 2a2970891647 ("net/mlx5: Add sample offload hardware bits and structures") Signed-off-by: Parav Pandit Reported-by: Stephen Rothwell Signed-off-by: Leon Romanovsky Link: https://lore.kernel.org/r/20201213120641.216032-1-leon@kernel.org Signed-off-by: Jakub Kicinski commit 1c28a05d1a972594164efc7fcffda416c5d6ab02 Author: Arnaldo Carvalho de Melo Date: Fri Dec 4 09:13:16 2020 -0300 tools headers UAPI: Sync linux/stat.h with the kernel sources To pick the changes in: 72d1249e2ffdbc34 ("uapi: fix statx attribute value overlap for DAX & MOUNT_ROOT") That don't cause any change in tooling, just addresses this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/stat.h' differs from latest version at 'include/uapi/linux/stat.h' diff -u tools/include/uapi/linux/stat.h include/uapi/linux/stat.h Cc: Adrian Hunter Cc: Eric Sandeen Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 4262f8c3efa1e79bd5950437a3eea58eeb4c1c70 Author: Arnaldo Carvalho de Melo Date: Mon Dec 14 09:59:00 2020 -0300 tools headers: Syncronize linux/build_bug.h with the kernel sources To pick up the changes in: 14dc3983b5dff513 ("kbuild: avoid static_assert for genksyms") And silence this perf build warning: Warning: Kernel ABI header at 'tools/include/linux/build_bug.h' differs from latest version at 'include/linux/build_bug.h' diff -u tools/include/linux/build_bug.h include/linux/build_bug.h Cc: Adrian Hunter Cc: Arnd Bergmann Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 281a94b0f2f0775a2b7825c18bccf7e4c922b7b3 Merge: feca8a8342d3f accefff5b547a Author: Arnaldo Carvalho de Melo Date: Thu Dec 17 14:37:24 2020 -0300 Merge remote-tracking branch 'torvalds/master' into perf/core To pick up fixes and check what UAPI headers need to be synched. Signed-off-by: Arnaldo Carvalho de Melo commit feca8a8342d3f53e394c9fc7d985b98ec0250ce1 Author: Jiri Olsa Date: Wed Dec 16 09:39:11 2020 +0100 perf tools: Reformat record's control fd man text Adding available control commands in separate paragraph, so it's more readable and easier to add new commands. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Alexei Budankov Cc: Ian Rogers Cc: Mark Rutland Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20201216083914.47215-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 526671bfc47df175eb87f96067d51b389a8af50d Author: Nick Thompson Date: Wed Dec 16 12:13:17 2020 -0500 perf config: Fix example command in manpage to conform to syntax specified in the SYNOPSIS section. Committer testing: With the previously documented example: $ perf config --user report sort-order=srcline The config variable does not contain a section name: report $ With the fixed example line: $ perf config --user report.sort-order=srcline $ perf config --user report.sort-order report.sort-order=srcline $ Signed-off-by: Nick Thompson Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/linux-perf-users/20201217142619.GA14524@redhat.com/ Signed-off-by: Arnaldo Carvalho de Melo commit dc67d1920417140052976f3377fd216b87a50aad Author: Arnaldo Carvalho de Melo Date: Wed Dec 16 12:45:10 2020 -0300 perf test: Make sample-parsing test aware of PERF_SAMPLE_{CODE,DATA}_PAGE_SIZE To fix this: $ perf test -v 27 27: Sample parsing : --- start --- test child forked, pid 586013 sample format has changed, some new PERF_SAMPLE_ bit was introduced - test needs updating test child finished with -1 ---- end ---- Sample parsing: FAILED! $ This patchset is still not completely merged, so when adding the PERF_SAMPLE_CODE_PAGE_SIZE to 'struct perf_sample' we need to add the bits added in this patch for 'perf_sample.data_page_size'. Fixes: 251cc77b8176de37 ("tools headers UAPI: Update tools's copy of linux/perf_event.h") Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 47dce51acc330eefef5ea876f7707585b402282a Author: Jiri Olsa Date: Mon Dec 14 11:54:48 2020 +0100 perf tools: Add support to read build id from compressed elf Adding support to decompress file before reading build id. Adding filename__read_build_id and change its current versions to read_build_id. Shutting down stderr output of perf list in the shell test: 82: Check open filename arg using perf trace + vfs_getname : Ok because with decompression code in the place we the filename__read_build_id function is more verbose in case of error and the test did not account for that. Signed-off-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexei Budankov Cc: Andi Kleen Cc: Ian Rogers Cc: Mark Rutland Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20201214105457.543111-7-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 8abceacff87d2fbb8e50e841d410e4808725151b Author: Jiri Olsa Date: Sat Dec 12 11:43:51 2020 +0100 perf debug: Add debug_set_file function Allow to set debug output file via new debug_set_file function. It's called during perf startup in perf_debug_setup to set stderr file as default and any perf command can set it later to different file. It will be used in perf daemon command to get verbose output into log file. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Alexei Budankov Cc: Ian Rogers Cc: Mark Rutland Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20201212104358.412065-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 7cfcd1e016cce5a72b4b86a3882eb80565430f82 Author: Jiri Olsa Date: Thu Dec 10 21:43:28 2020 +0100 perf tools: Add evlist__disable_evsel/evlist__enable_evsel Adding interface to enable/disable single event in the evlist based on its name. It will be used later in new control enable/disable interface. Keeping the evlist::enabled true when one or more events are enabled so the toggle can work properly and toggle evlist to disabled state. Signed-off-by: Jiri Olsa Acked-by: Namhyung Kim Acked-by: Alexei Budankov Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Mark Rutland Cc: Michael Petlan Cc: Peter Zijlstra Cc: Stephane Eranian Link: https://lore.kernel.org/r/20201210204330.233864-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 96aea4daa6cb893d339d80ce14727e6421991d8b Author: Namhyung Kim Date: Thu Dec 10 15:13:02 2020 +0900 perf evlist: Support pipe mode display Likewise, perf evlist command should print event attributes by reading PERF_RECORD_HEADER_ATTR records. Before: $ perf record -o- true | ./perf evlist -i- (prints nothing) After: $ perf record -o- true | ./perf evlist -i- cycles:pppH Committer testing: Verbose mode also works as expected: $ perf record -o- true | perf evlist -i- cycles:uhH $ perf record -o- true | perf evlist -vi- cycles:uhH: size: 120, { sample_period, sample_freq }: 4000, sample_type: IP|TID|TIME|ID|PERIOD, read_format: ID, disabled: 1, inherit: 1, exclude_kernel: 1, mmap: 1, comm: 1, freq: 1, enable_on_exec: 1, task: 1, sample_id_all: 1, exclude_guest: 1, mmap2: 1, comm_exec: 1, ksymbol: 1, bpf_event: 1 $ Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Mark Rutland Cc: Peter Zijlstra Cc: Stephane Eranian Link: https://lore.kernel.org/r/20201210061302.88213-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 03de8656c7778c5434cc2ca8e6b4699c1176c090 Author: Namhyung Kim Date: Thu Dec 10 15:13:01 2020 +0900 perf report: Support --header-only for pipe mode The --header-only checks file header and prints the feature data. But as pipe mode doesn't have it in the header it prints almost nothing. Change it to process first few records until it founds HEADER_FEATURE. Before: $ perf record -o- true | perf report -i- --header-only # ======== # captured on : Thu Dec 10 14:34:59 2020 # header version : 1 # data offset : 0 # data size : 0 # feat offset : 0 # ======== # After: $ perf record -o- true | perf report -i- --header-only # ======== # captured on : Thu Dec 10 14:49:11 2020 # header version : 1 # data offset : 0 # data size : 0 # feat offset : 0 # ======== # # hostname : balhae # os release : 5.7.17-1xxx # perf version : 5.10.rc6.gdb0ea13cc741 # arch : x86_64 # nrcpus online : 8 # nrcpus avail : 8 # cpudesc : Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz # cpuid : GenuineIntel,6,142,12 # total memory : 16158916 kB # cmdline : perf record -o- true # event : name = cycles, , id = { 81, 82, 83, 84, 85, 86, 87, 88 }, size = 120, ... # CPU_TOPOLOGY info available, use -I to display # NUMA_TOPOLOGY info available, use -I to display # pmu mappings: intel_pt = 9, intel_bts = 8, software = 1, power = 20, uprobe = 7, ... # time of first sample : 0.000000 # time of last sample : 0.000000 # sample duration : 0.000 ms # MEM_TOPOLOGY info available, use -I to display # cpu pmu capabilities: branches=32, max_precise=3, pmu_name=skylake Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Mark Rutland Cc: Peter Zijlstra Cc: Stephane Eranian Link: https://lore.kernel.org/r/20201210061302.88213-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit e15a536521ed7f48fac268152a78e6e2f99102d2 Author: Joakim Zhang Date: Fri Dec 4 19:10:16 2020 +0800 perf vendor events: Add JSON metrics for imx8mm DDR Perf Add JSON metrics for imx8mm DDR Perf. Signed-off-by: Joakim Zhang Acked-by: Kajol Jain Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shaokun Zhang Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: linuxarm@huawei.com Signed-off-by: John Garry Link: http://lore.kernel.org/lkml/1607080216-36968-11-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit be335ec28efa89d6bff8f4c6ce8daba88acf2b1a Author: John Garry Date: Fri Dec 4 19:10:15 2020 +0800 perf metricgroup: Support adding metrics for system PMUs Currently adding metrics for core- or uncore-based events matched by CPUID is supported. Extend this for system events. Signed-off-by: John Garry Acked-by: Kajol Jain Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Jiri Olsa Cc: Joakim Zhang Cc: Kan Liang Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shaokun Zhang Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: linuxarm@huawei.com Link: http://lore.kernel.org/lkml/1607080216-36968-10-git-send-email-john.garry@huawei.com [ Reorder 'struct metricgroup_add_iter_data' field to avoid alignment holes ] Signed-off-by: Arnaldo Carvalho de Melo commit a36fadb17c27b4b5360db69acc80f5f4ad8dde7e Author: John Garry Date: Fri Dec 4 19:10:14 2020 +0800 perf metricgroup: Support printing metric groups for system PMUs Currently printing metricgroups for core- or uncore-based events matched by CPUID is supported. Extend this for system events. Signed-off-by: John Garry Acked-by: Kajol Jain Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Jiri Olsa Cc: Joakim Zhang Cc: Kan Liang Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shaokun Zhang Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: linuxarm@huawei.com Link: http://lore.kernel.org/lkml/1607080216-36968-9-git-send-email-john.garry@huawei.com [ Reorder 'struct metricgroup_print_sys_idata' field to avoid alignment holes ] Signed-off-by: Arnaldo Carvalho de Melo commit f6fe1e48ae185d028dfcabecb7d79036e2d89d27 Author: John Garry Date: Fri Dec 4 19:10:13 2020 +0800 perf metricgroup: Split up metricgroup__print() To aid supporting system event metric groups, break up the function metricgroup__print() into a part which iterates metrics and a part which actually "prints" the metric. No functional change intended. Signed-off-by: John Garry Acked-by: Kajol Jain Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Jiri Olsa Cc: Joakim Zhang Cc: Kan Liang Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shaokun Zhang Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: linuxarm@huawei.com Link: http://lore.kernel.org/lkml/1607080216-36968-8-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit c2337d67199a1ea1c75083da5d376aced1ab2c40 Author: John Garry Date: Fri Dec 4 19:10:12 2020 +0800 perf metricgroup: Fix metrics using aliases covering multiple PMUs Support for metric expressions using aliases which cover multiple PMUs is broken. Consider the following test metric expression: "MetricExpr": "UNC_CBO_XSNP_RESPONSE.MISS_XCORE * UNC_CBO_XSNP_RESPONSE.MISS_EVICTION" When used on my broadwell, "perf stat" gives: unc_cbo_xsnp_response.miss_eviction -> uncore_cbox_1/umask=0x81,event=0x22/ unc_cbo_xsnp_response.miss_eviction -> uncore_cbox_0/umask=0x81,event=0x22/ unc_cbo_xsnp_response.miss_xcore -> uncore_cbox_1/umask=0x41,event=0x22/ unc_cbo_xsnp_response.miss_xcore -> uncore_cbox_0/umask=0x41,event=0x22/ Control descriptor is not initialized unc_cbo_xsnp_response.miss_eviction: 3645925 1000850523 1000850523 unc_cbo_xsnp_response.miss_xcore: 106850 1000850523 1000850523 Performance counter stats for 'system wide': 3,645,925 unc_cbo_xsnp_response.miss_eviction # 389567086250.00 test_metric_inc 106,850 unc_cbo_xsnp_response.miss_xcore 1.000883096 seconds time elapsed Notice that only the results from one PMU are included. Fix the logic of find_evsel_group() to enable events which apply to multiple PMUs, by checking if the event pmu_name matches that of the metric event. With that, "perf stat" now gives: unc_cbo_xsnp_response.miss_eviction -> uncore_cbox_1/umask=0x81,event=0x22/ unc_cbo_xsnp_response.miss_eviction -> uncore_cbox_0/umask=0x81,event=0x22/ unc_cbo_xsnp_response.miss_xcore -> uncore_cbox_1/umask=0x41,event=0x22/ unc_cbo_xsnp_response.miss_xcore -> uncore_cbox_0/umask=0x41,event=0x22/ Control descriptor is not initialized unc_cbo_xsnp_response.miss_eviction: 4237983 1000904100 1000904100 unc_cbo_xsnp_response.miss_xcore: 218643 1000904100 1000904100 unc_cbo_xsnp_response.miss_eviction: 4254148 1000902629 1000902629 unc_cbo_xsnp_response.miss_xcore: 213352 1000902629 1000902629 Performance counter stats for 'system wide': 4,237,983 unc_cbo_xsnp_response.miss_eviction # 3668558131345.00 test_metric_inc 218,643 unc_cbo_xsnp_response.miss_xcore 4,254,148 unc_cbo_xsnp_response.miss_eviction 213,352 unc_cbo_xsnp_response.miss_xcore 1.000938151 seconds time elapsed Signed-off-by: John Garry Acked-by: Kajol Jain Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Jiri Olsa Cc: Joakim Zhang Cc: Kan Liang Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shaokun Zhang Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: linuxarm@huawei.com Link: http://lore.kernel.org/lkml/1607080216-36968-7-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 6d2783fe365fa5f571cf1416b5f5b1e352447a0e Author: John Garry Date: Fri Dec 4 19:10:11 2020 +0800 perf evlist: Change evlist__splice_list_tail() ordering Function find_evsel_group() expects events to be ordered such that they are grouped after their leader. Modify evlist__splice_list_tail() to guarantee this (ordering). [Should prob also change the function name] Signed-off-by: John Garry Acked-by: Kajol Jain Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Jiri Olsa Cc: Joakim Zhang Cc: Kan Liang Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shaokun Zhang Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: linuxarm@huawei.com Link: http://lore.kernel.org/lkml/1607080216-36968-6-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 4513c719c6f1ccf0c362c8dcef1f9b476f8f5c9c Author: John Garry Date: Fri Dec 4 19:10:10 2020 +0800 perf pmu: Add pmu_add_sys_aliases() Add pmu_add_sys_aliases() to add system PMU events aliases. For adding system PMU events, iterate through all the events for all SoC event tables in pmu_sys_event_tables[]. Matches must satisfy both: - PMU identifier matches event "compat" value - event "Unit" member must match, same as uncore event aliases matched by CPUID Signed-off-by: John Garry Acked-by: Kajol Jain Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Jiri Olsa Cc: Joakim Zhang Cc: Kan Liang Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shaokun Zhang Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: linuxarm@huawei.com Link: http://lore.kernel.org/lkml/1607080216-36968-5-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 51d548471510843e56d9f427aa6473ca0981c4a4 Author: John Garry Date: Fri Dec 4 19:10:09 2020 +0800 perf pmu: Add pmu_id() Add a function to read the PMU id sysfs entry. This is only done for uncore PMUs where this would possibly be relevant. Signed-off-by: John Garry Acked-by: Kajol Jain Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Jiri Olsa Cc: Joakim Zhang Cc: Kan Liang Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shaokun Zhang Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: linuxarm@huawei.com Link: http://lore.kernel.org/lkml/1607080216-36968-4-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 4689f56796f87abee190d8a959dd318e006c5b5a Author: John Garry Date: Fri Dec 4 19:10:08 2020 +0800 perf jevents: Add support for system events tables Process the JSONs to find support for "system" events, which are not tied to a specific CPUID. A "COMPAT" property is now used to match against the namespace ID from the kernel PMU driver. The generated pmu-events.c will now have 2 tables: a. CPU events, as before. b. New pmu_sys_event_tables[] table, which will have events matched to specific SoCs. It will look like this: struct pmu_event pme_hisilicon_hip09_sys[] = { { .name = "cycles", .compat = "0x00030736", .event = "event=0", .desc = "Clock cycles", .topic = "smmu v3 pmcg", .long_desc = "Clock cycles", }, { .name = "smmuv3_pmcg.l1_tlb", .compat = "0x00030736", .event = "event=0x8a", .desc = "SMMUv3 PMCG l1_tlb. Unit: smmuv3_pmcg ", .topic = "smmu v3 pmcg", .long_desc = "SMMUv3 PMCG l1_tlb", .pmu = "smmuv3_pmcg", }, ... }; struct pmu_event pme_arm_cortex_a53[] = { { .name = "ext_mem_req", .event = "event=0xc0", .desc = "External memory request", .topic = "memory", }, { .name = "ext_mem_req_nc", .event = "event=0xc1", .desc = "Non-cacheable external memory request", .topic = "memory", }, ... }; struct pmu_event pme_hisilicon_hip09_cpu[] = { { .name = "l2d_cache_refill_wr", .event = "event=0x53", .desc = "L2D cache refill, write", .topic = "core imp def", .long_desc = "Attributable Level 2 data cache refill, write", }, ... }; struct pmu_events_map pmu_events_map[] = { { .cpuid = "0x00000000410fd030", .version = "v1", .type = "core", .table = pme_arm_cortex_a53 }, { .cpuid = "0x00000000480fd010", .version = "v1", .type = "core", .table = pme_hisilicon_hip09_cpu }, { .table = 0 }, }; struct pmu_event pme_hisilicon_hip09_cpu[] = { { .name = "uncore_hisi_l3c.rd_cpipe", .event = "event=0", .desc = "Total read accesses. Unit: hisi_sccl,l3c ", .topic = "uncore l3c", .long_desc = "Total read accesses", .pmu = "hisi_sccl,l3c", }, { .name = "uncore_hisi_l3c.wr_cpipe", .event = "event=0x1", .desc = "Total write accesses. Unit: hisi_sccl,l3c ", .topic = "uncore l3c", .long_desc = "Total write accesses", .pmu = "hisi_sccl,l3c", }, ... }; struct pmu_sys_events pmu_sys_event_tables[] = { { .table = pme_hisilicon_hip09_sys, }, ... }; Committer notes: Added the fix for architectures without PMU events, provided by John after I reported the build failing in such systems. Link: https://lore.kernel.org/lkml/650baaf2-36b6-a9e2-ff49-963ef864c1f3@huawei.com/ Signed-off-by: John Garry Acked-by: Kajol Jain Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Jiri Olsa Cc: Joakim Zhang Cc: Kan Liang Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shaokun Zhang Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: linuxarm@huawei.com Link: http://lore.kernel.org/lkml/1607080216-36968-3-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 4853f1caa43ea41a544c50a7cefc42e147aafeda Author: John Garry Date: Fri Dec 4 19:10:07 2020 +0800 perf jevents: Add support for an extra directory level Currently only upto a level 2 directory is supported, in form vendor/platform. Add support for a further level, to support vendor/platform sub-directories in future, which will be vendor/platform/cpu and vendor/platform/sys. Signed-off-by: John Garry Acked-by: Kajol Jain Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Jiri Olsa Cc: Joakim Zhang Cc: Kan Liang Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shaokun Zhang Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: linuxarm@huawei.com Link: http://lore.kernel.org/lkml/1607080216-36968-2-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 456ef4c11c06f0b8c53acaf796d77d2033f079f2 Author: Arnaldo Carvalho de Melo Date: Mon Dec 7 14:04:05 2020 -0300 perf evsel: Emit warning about kernel not supporting the data page size sample_type bit Before we had this unhelpful message: $ perf record --data-page-size sleep 1 Error: The sys_perf_event_open() syscall returned with 22 (Invalid argument) for event (cycles:u). /bin/dmesg | grep -i perf may provide additional information. $ Add support to the perf_missing_features variable to remember what caused evsel__open() to fail and then use that information in evsel__open_strerror(). $ perf record --data-page-size sleep 1 Error: Asking for the data page size isn't supported by this kernel. $ Cc: Kan Liang Cc: Namhyung Kim Cc: Andi Kleen Cc: Jiri Olsa Cc: Mark Rutland Cc: Michael Ellerman Cc: Stephane Eranian Cc: Will Deacon Link: http://lore.kernel.org/lkml/20201207170759.GB129853@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 542b88fd12769bf5be307b11ca0f94a6140bba82 Author: Kan Liang Date: Mon Nov 30 09:27:53 2020 -0800 perf record: Support new sample type for data page size Support new sample type PERF_SAMPLE_DATA_PAGE_SIZE for page size. Add new option --data-page-size to record sample data page size. Signed-off-by: Kan Liang Acked-by: Namhyung Kim Cc: Andi Kleen Cc: Jiri Olsa Cc: Mark Rutland Cc: Michael Ellerman Cc: Stephane Eranian Cc: Will Deacon Link: http://lore.kernel.org/lkml/20201130172803.2676-3-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 47d982202f8cfaac6f208c9109fa15cb6a0181f7 Author: Kan Liang Date: Mon Nov 30 09:27:52 2020 -0800 tools headers UAPI: Update tools's copy of linux/perf_event.h To get the changes in: commit 8d97e71811aa ("perf/core: Add PERF_SAMPLE_DATA_PAGE_SIZE") commit 995f088efebe ("perf/core: Add support for PERF_SAMPLE_CODE_PAGE_SIZE") This silences this perf tools build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/perf_event.h' differs from latest version at 'include/uapi/linux/perf_event.h' diff -u tools/include/uapi/linux/perf_event.h include/uapi/linux/perf_event.h Signed-off-by: Kan Liang Acked-by: Namhyung Kim Cc: Andi Kleen Cc: Jiri Olsa Cc: Mark Rutland Cc: Michael Ellerman Cc: Stephane Eranian Cc: Will Deacon Link: http://lore.kernel.org/lkml/20201130172803.2676-2-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit bf53fc6b5f415cddc7118091cb8fd6a211b2320d Author: Jan Kratochvil Date: Fri Dec 4 09:17:02 2020 -0300 perf unwind: Fix separate debug info files when using elfutils' libdw's unwinder elfutils needs to be provided main binary and separate debug info file respectively. Providing separate debug info file instead of the main binary is not sufficient. One needs to try both supplied filename and its possible cache by its build-id depending on the use case. Signed-off-by: Jan Kratochvil Tested-by: Jiri Olsa Cc: Adrian Hunter Cc: David Ahern Cc: Ian Rogers Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 2eb5dd418034ecea2f7031e3d33f2991a878b148 Author: Zheng Zengkai Date: Fri Jul 3 17:33:44 2020 +0800 perf record: Fix memory leak when using '--user-regs=?' to list registers When using 'perf record's option '-I' or '--user-regs=' along with argument '?' to list available register names, memory of variable 'os' allocated by strdup() needs to be released before __parse_regs() returns, otherwise memory leak will occur. Fixes: bcc84ec65ad1 ("perf record: Add ability to name registers to record") Signed-off-by: Zheng Zengkai Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Li Bin Cc: Mark Rutland Cc: Namhyung Kim Link: https://lore.kernel.org/r/20200703093344.189450-1-zhengzengkai@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 09d59c2f3465fb01e65a0c96698697b026ea8e79 Author: Jiri Olsa Date: Fri Dec 4 00:08:36 2020 +0100 tools build: Add missing libcap to test-all.bin target We're missing -lcap in test-all.bin target, so in case it's the only library missing (if more are missing test-all.bin fails anyway), we will falsely claim that we detected it and fail build, like: $ make ... Auto-detecting system features: ... dwarf: [ on ] ... dwarf_getlocations: [ on ] ... glibc: [ on ] ... libbfd: [ on ] ... libbfd-buildid: [ on ] ... libcap: [ on ] ... libelf: [ on ] ... libnuma: [ on ] ... numa_num_possible_cpus: [ on ] ... libperl: [ on ] ... libpython: [ on ] ... libcrypto: [ on ] ... libunwind: [ on ] ... libdw-dwarf-unwind: [ on ] ... zlib: [ on ] ... lzma: [ on ] ... get_cpuid: [ on ] ... bpf: [ on ] ... libaio: [ on ] ... libzstd: [ on ] ... disassembler-four-args: [ on ] ... CC builtin-ftrace.o In file included from builtin-ftrace.c:29: util/cap.h:11:10: fatal error: sys/capability.h: No such file or directory 11 | #include | ^~~~~~~~~~~~~~~~~~ compilation terminated. Fixes: 74d5f3d06f707eb5 ("tools build: Add capability-related feature detection") Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Ian Rogers Cc: Igor Lubashev Cc: Mark Rutland Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20201203230836.3751981-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit d652d5f1eeeb06046009f4fcb9b4542249526916 Author: Linus Torvalds Date: Thu Dec 17 09:27:57 2020 -0800 drm/edid: fix objtool warning in drm_cvt_modes() Commit 991fcb77f490 ("drm/edid: Fix uninitialized variable in drm_cvt_modes()") just replaced one warning with another. The original warning about a possibly uninitialized variable was due to the compiler not being smart enough to see that the case statement actually enumerated all possible cases. And the initial fix was just to add a "default" case that had a single "unreachable()", just to tell the compiler that that situation cannot happen. However, that doesn't actually fix the fundamental reason for the problem: the compiler still doesn't see that the existing case statements enumerate all possibilities, so the compiler will still generate code to jump to that unreachable case statement. It just won't complain about an uninitialized variable any more. So now the compiler generates code to our inline asm marker that we told it would not fall through, and end end result is basically random. We have created a bridge to nowhere. And then, depending on the random details of just exactly what the compiler ends up doing, 'objtool' might end up complaining about the conditional branches (for conditions that cannot happen, and that thus will never be taken - but if the compiler was not smart enough to figure that out, we can't expect objtool to do so) going off in the weeds. So depending on how the compiler has laid out the result, you might see something like this: drivers/gpu/drm/drm_edid.o: warning: objtool: do_cvt_mode() falls through to next function drm_mode_detailed.isra.0() and now you have a truly inscrutable warning that makes no sense at all unless you start looking at whatever random code the compiler happened to generate for our bare "unreachable()" statement. IOW, don't use "unreachable()" unless you have an _active_ operation that generates code that actually makes it obvious that something is not reachable (ie an UD instruction or similar). Solve the "compiler isn't smart enough" problem by just marking one of the cases as "default", so that even when the compiler doesn't otherwise see that we've enumerated all cases, the compiler will feel happy and safe about there always being a valid case that initializes the 'width' variable. This also generates better code, since now the compiler doesn't generate comparisons for five different possibilities (the four real ones and the one that can't happen), but just for the three real ones and "the rest" (which is that last one). A smart enough compiler that sees that we cover all the cases won't care. Cc: Lyude Paul Cc: Ilia Mirkin Cc: Josh Poimboeuf Cc: Peter Zijlstra Signed-off-by: Linus Torvalds commit 671ee4db952449acde126965bf76817a3159040d Author: Jerome Brunet Date: Thu Dec 17 16:08:12 2020 +0100 ASoC: meson: axg-tdm-interface: fix loopback When the axg-tdm-interface was introduced, the backend DAI was marked as an endpoint when DPCM was walking the DAPM graph to find a its BE. It is no longer the case since this commit 8dd26dff00c0 ("ASoC: dapm: Fix handling of custom_stop_condition on DAPM graph walks") Because of this, when DPCM finds a BE it does everything it needs on the DAIs but it won't power up the widgets between the FE and the BE if there is no actual endpoint after the BE. On meson-axg HWs, the loopback is a special DAI of the tdm-interface BE. It is only linked to the dummy codec since there no actual HW after it. >From the DAPM perspective, the DAI has no endpoint. Because of this, the TDM decoder, which is a widget between the FE and BE is not powered up. >From the user perspective, everything seems fine but no data is produced. Connecting the Loopback DAI to a dummy DAPM endpoint solves the problem. Fixes: 8dd26dff00c0 ("ASoC: dapm: Fix handling of custom_stop_condition on DAPM graph walks") Cc: Charles Keepax Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20201217150812.3247405-1-jbrunet@baylibre.com Signed-off-by: Mark Brown commit a84dfb3d55934253de6aed38ad75990278a2d21e Author: Jerome Brunet Date: Thu Dec 17 16:08:34 2020 +0100 ASoC: meson: axg-tdmin: fix axg skew offset The signal captured on from tdm decoder of the AXG SoC is incorrect. It appears amplified. The skew offset of the decoder is wrong. Setting the skew offset to 3, like the g12 and sm1 SoCs, solves and gives correct data. Fixes: 13a22e6a98f8 ("ASoC: meson: add tdm input driver") Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20201217150834.3247526-1-jbrunet@baylibre.com Signed-off-by: Mark Brown commit 127a7a95df41731632c7348960908751f7f9d049 Merge: 2fee9583198eb 9326e4f1e5dd1 Author: Mark Brown Date: Thu Dec 17 17:09:51 2020 +0000 Merge remote-tracking branch 'spi/for-5.10' into spi-5.11 commit cda91206dc45257ba0c4d8acb6eeebfec8b2b9bc Merge: 349dd23931d19 8d1bfc04c9740 Author: Mark Brown Date: Thu Dec 17 17:05:48 2020 +0000 Merge series "Platform driver update to support playback recover after resume" from Srinivasa Rao Mandadapu : This patch set is to add support for playback recover after hard suspend and resume. It includes: 1. Reverting part of previous commit, which is for handling registers invalid state after hard suspend. 2. Adding pm ops in component driver and do regcache sync. Changes Since v1 and v2: -- Subject lines changed Changes Since v3: -- Patch is splitted into 2 patches Changes Since v4: -- Subject lines changed Changes Since v5: -- Removed redundant initialization of map variable in lpass-platform.c Srinivasa Rao Mandadapu (2): ASoC: qcom: Fix incorrect volatile registers ASoC: qcom: Add support for playback recover after resume sound/soc/qcom/lpass-cpu.c | 20 ++--------------- sound/soc/qcom/lpass-platform.c | 50 ++++++++++++++++++++++++++++------------- 2 files changed, 37 insertions(+), 33 deletions(-) -- Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project. commit 9272e97ae9e9b95e0805c690404a0df9fb03055f Author: Hans de Goede Date: Tue Dec 15 12:26:02 2020 +0100 ACPI: scan: Add Intel Baytrail Mailbox Device to acpi_ignore_dep_ids Linux does not have a driver for / does not use the "Intel Baytrail Mailbox Device" (ACIP HID INT33BD). Add it to the acpi_ignore_dep_ids list, so that we do not defer probing ACPI devices which depend on another ACPI device with this HID. Specifically this makes us not defer the probing of the GPO1 ACPI device / GPIO controller on the Acer Switch 10E SW3-016. On this tablet model the _HID method of the ACPI node for the UART attached Bluetooth, reads GPIOs to detect the installed wifi chip and updates the reported _HID for the Bluetooth's ACPI node accordingly. For the Bluetooth's ACPI node to report the correct _HID the GPO1 device must be probed and attached during the first scan pass. Adding the "INT33BD" HID to the acpi_ignore_dep_ids list makes this all work. Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit 0de7fb7c8687048299305529d17f6a1e98ae658c Author: Rafael J. Wysocki Date: Mon Dec 14 21:32:44 2020 +0100 ACPI: scan: Avoid unnecessary second pass in acpi_bus_scan() If there are no devices whose enumeration has been deferred after the first pass in acpi_bus_scan(), the second pass is not necssary, so avoid it with the help of a new static variable. Signed-off-by: Rafael J. Wysocki Reviewed-by: Hans de Goede Tested-by: Hans de Goede Reviewed-by: Mika Westerberg commit 71da201f38dfb0c3a3d33bbe3168ea9112299dde Author: Rafael J. Wysocki Date: Mon Dec 14 21:27:27 2020 +0100 ACPI: scan: Defer enumeration of devices with _DEP lists In some cases ACPI control methods used during device enumeration (such as _HID or _STA) may rely on Operation Region handlers supplied by the drivers of other devices [1]: An example of this is the Acer Switch 10E SW3-016 model. The _HID method of the ACPI node for the UART attached Bluetooth, reads GPIOs to detect the installed wifi chip and update the _HID for the Bluetooth's ACPI node accordingly. The current ACPI scan code calls _HID before the GPIO controller's OpRegions are available, leading to the wrong _HID being used and Bluetooth not working. In principle, in those cases there should be a _DEP control method under the device object with OpRegion enumeration dependencies, so deferring the enumeration of devices with _DEP returning a non-empty list of suppliers of OpRegions depended on by the given device (modulo some known exceptions that don't really supply any OpRegions and are listed by _DEP for other reasons irrelevant for Linux) should at least address the first-order dependencies by allowing the OpRegion suppliers to be enumerated before their consumers. Implement the above idea by modifying acpi_bus_scan() to enumerate devices in the given scope of the ACPI namespace in two passes, where the first pass covers the devices without "significant" lists of dependencies coming from _DEP only and the second pass covers all of the devices that were not enumerated in the first pass. Take _DEP into account only for device objects with _HID, mostly in order to avoid deferring the creation of ACPI device objects that represent PCI devices and must be present during the enumeration of the PCI bus (which takes place during the processing of the ACPI device object that represents the host bridge), so that they can be properly associated with the corresponding PCI devices. Link: https://lore.kernel.org/linux-acpi/20201121203040.146252-1-hdegoede@redhat.com/ # [1] Reported-by: Hans de Goede Signed-off-by: Rafael J. Wysocki Reviewed-by: Hans de Goede Tested-by: Hans de Goede Reviewed-by: Mika Westerberg commit 6fc250887cbe14a350d472516f2e0118240c5d68 Author: Rafael J. Wysocki Date: Mon Dec 14 21:25:23 2020 +0100 ACPI: scan: Evaluate _DEP before adding the device Evaluate _DEP before calling acpi_add_single_object() from acpi_bus_check_add() and do that only for ACPI_BUS_TYPE_DEVICE objects. While at it, rename acpi_device_dep_initialize() to acpi_scan_check_dep(), fix up a memory allocation statement in that function, consistently treat memory allocation failures in there as intermittent errors and make some related janitorial changes in it. This change will help to avoid calling acpi_add_single_object() if there are unmet _DEP dependencies in the future, as that may cause some control methods, potentially depending on the presence of operation regions supplied by other devices, to be evaluated prematurely. Signed-off-by: Rafael J. Wysocki Reviewed-by: Hans de Goede Tested-by: Hans de Goede Reviewed-by: Mika Westerberg commit 4dfde294b9792dcf8615b55c58f093d544f472f0 Author: Ping-Ke Shih Date: Mon Dec 14 13:31:06 2020 +0800 rtlwifi: rise completion at the last step of firmware callback request_firmware_nowait() which schedules another work is used to load firmware when USB is probing. If USB is unplugged before running the firmware work, it goes disconnect ops, and then causes use-after-free. Though we wait for completion of firmware work before freeing the hw, firmware callback rises completion too early. So I move it to the last step. usb 5-1: Direct firmware load for rtlwifi/rtl8192cufw.bin failed with error -2 rtlwifi: Loading alternative firmware rtlwifi/rtl8192cufw.bin rtlwifi: Selected firmware is not available ================================================================== BUG: KASAN: use-after-free in rtl_fw_do_work.cold+0x68/0x6a drivers/net/wireless/realtek/rtlwifi/core.c:93 Write of size 4 at addr ffff8881454cff50 by task kworker/0:6/7379 CPU: 0 PID: 7379 Comm: kworker/0:6 Not tainted 5.10.0-rc7-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events request_firmware_work_func Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x107/0x163 lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xae/0x4c8 mm/kasan/report.c:385 __kasan_report mm/kasan/report.c:545 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:562 rtl_fw_do_work.cold+0x68/0x6a drivers/net/wireless/realtek/rtlwifi/core.c:93 request_firmware_work_func+0x12c/0x230 drivers/base/firmware_loader/main.c:1079 process_one_work+0x933/0x1520 kernel/workqueue.c:2272 worker_thread+0x64c/0x1120 kernel/workqueue.c:2418 kthread+0x38c/0x460 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296 The buggy address belongs to the page: page:00000000f54435b3 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1454cf flags: 0x200000000000000() raw: 0200000000000000 0000000000000000 ffffea00051533c8 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881454cfe00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881454cfe80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff8881454cff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8881454cff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881454d0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff Reported-by: syzbot+65be4277f3c489293939@syzkaller.appspotmail.com Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201214053106.7748-1-pkshih@realtek.com commit e7f6f893ac39c8715d959ff8d677645ef5e0f8b4 Author: Lorenzo Bianconi Date: Tue Dec 8 10:20:15 2020 +0100 mt76: mt76u: fix NULL pointer dereference in mt76u_status_worker Fix the following NULL pointer dereference in mt76u_status_worker that can occur if status thread runs before allocating tx queues [ 31.395373] BUG: kernel NULL pointer dereference, address: 000000000000002c [ 31.395769] #PF: supervisor read access in kernel mode [ 31.395985] #PF: error_code(0x0000) - not-present page [ 31.396178] PGD 0 P4D 0 [ 31.396277] Oops: 0000 [#1] SMP [ 31.396430] CPU: 3 PID: 337 Comm: mt76-usb-status Not tainted 5.10.0-rc1-kvm+ #49 [ 31.396703] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-3.fc33 04/01/2014 [ 31.397048] RIP: 0010:mt76u_status_worker+0x2b/0x190 [ 31.397931] RSP: 0018:ffffc9000076fe98 EFLAGS: 00010282 [ 31.398118] RAX: 0000000000000001 RBX: ffff888111203fe8 RCX: 0000000000000000 [ 31.398400] RDX: 0000000000000001 RSI: 0000000000000246 RDI: ffff888111203fe8 [ 31.398668] RBP: ffff888111201d00 R08: 000000000000038c R09: 000000000000009b [ 31.398952] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 31.399235] R13: 0000000000000000 R14: 0000000000000000 R15: ffff88810c987300 [ 31.399494] FS: 0000000000000000(0000) GS:ffff88817bd80000(0000) knlGS:0000000000000000 [ 31.399767] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 31.399991] CR2: 000000000000002c CR3: 0000000103525000 CR4: 00000000000006a0 [ 31.400236] Call Trace: [ 31.400348] ? schedule+0x3e/0xa0 [ 31.400514] __mt76_worker_fn+0x71/0xa0 [ 31.400634] ? mt76_get_min_avg_rssi+0x110/0x110 [ 31.400827] kthread+0x118/0x130 [ 31.400984] ? __kthread_bind_mask+0x60/0x60 [ 31.401212] ret_from_fork+0x1f/0x30 [ 31.401353] Modules linked in: [ 31.401480] CR2: 000000000000002c [ 31.401627] ---[ end trace 8bf174505cc34851 ]--- [ 31.401798] RIP: 0010:mt76u_status_worker+0x2b/0x190 [ 31.402636] RSP: 0018:ffffc9000076fe98 EFLAGS: 00010282 [ 31.402829] RAX: 0000000000000001 RBX: ffff888111203fe8 RCX: 0000000000000000 [ 31.403118] RDX: 0000000000000001 RSI: 0000000000000246 RDI: ffff888111203fe8 [ 31.403424] RBP: ffff888111201d00 R08: 000000000000038c R09: 000000000000009b [ 31.403689] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 31.403933] R13: 0000000000000000 R14: 0000000000000000 R15: ffff88810c987300 [ 31.404209] FS: 0000000000000000(0000) GS:ffff88817bd80000(0000) knlGS:0000000000000000 [ 31.404482] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 31.404726] CR2: 000000000000002c CR3: 0000000103525000 CR4: 00000000000006a0 [ 31.405294] mt76x0u: probe of 1-1:1.0 failed with error -110 [ 31.406007] usb 1-1: USB disconnect, device number 2 [ 31.840756] usb 1-1: new high-speed USB device number 3 using xhci_hcd [ 32.461295] usb 1-1: reset high-speed USB device number 3 using xhci_hcd [ 32.659932] mt76x0u 1-1:1.0: ASIC revision: 76100002 MAC revision: 76502000 [ 33.197032] mt76x0u 1-1:1.0: EEPROM ver:02 fae:01 Fixes: 9daf27e62852 ("mt76: mt76u: use dedicated thread for status work") Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/cd44dc407cf3e5f27688105d4a75fb1c68e62b06.1607419147.git.lorenzo@kernel.org commit 89448c47b8452b67c146dc6cad6f737e004c5caf Author: Pavel Begunkov Date: Thu Dec 17 00:24:39 2020 +0000 io_uring: limit {io|sq}poll submit locking scope We don't need to take uring_lock for SQPOLL|IOPOLL to do io_cqring_overflow_flush() when cq_overflow_list is empty, remove it from the hot path. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 09e88404f46cc32237f596c66f48a826294e08f2 Author: Pavel Begunkov Date: Thu Dec 17 00:24:38 2020 +0000 io_uring: inline io_cqring_mark_overflow() There is only one user of it and the name is misleading, get rid of it by inlining. By the way make overflow_flush's return value deduction simpler. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit e23de15fdbd3070446b2d212373c0ae556f63d93 Author: Pavel Begunkov Date: Thu Dec 17 00:24:37 2020 +0000 io_uring: consolidate CQ nr events calculation Add a helper which calculates number of events in CQ. Handcoded version of it in io_cqring_overflow_flush() is not the clearest thing, so it makes it slightly more readable. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 9cd2be519d05ee78876d55e8e902b7125f78b74f Author: Pavel Begunkov Date: Thu Dec 17 00:24:36 2020 +0000 io_uring: remove racy overflow list fast checks list_empty_careful() is not racy only if some conditions are met, i.e. no re-adds after del_init. io_cqring_overflow_flush() does list_move(), so it's actually racy. Remove those checks, we have ->cq_check_overflow for the fast path. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit cda286f0715c82f8117e166afd42cca068876dde Author: Pavel Begunkov Date: Thu Dec 17 00:24:35 2020 +0000 io_uring: cancel reqs shouldn't kill overflow list io_uring_cancel_task_requests() doesn't imply that the ring is going away, it may continue to work well after that. The problem is that it sets ->cq_overflow_flushed effectively disabling the CQ overflow feature Split setting cq_overflow_flushed from flush, and do the first one only on exit. It's ok in terms of cancellations because there is a io_uring->in_idle check in __io_cqring_fill_event(). It also fixes a race with setting ->cq_overflow_flushed in io_uring_cancel_task_requests, whuch's is not atomic and a part of a bitmask with other flags. Though, the only other flag that's not set during init is drain_next, so it's not as bad for sane architectures. Signed-off-by: Pavel Begunkov Fixes: 0f2122045b946 ("io_uring: don't rely on weak ->files references") Signed-off-by: Jens Axboe commit 76efc1c770968d6c786e5340029f8005ed29b2a5 Author: Baolin Wang Date: Thu Dec 10 18:56:44 2020 +0800 blk-iocost: Add iocg idle state tracepoint It will be helpful to trace the iocg's whole state, including active and idle state. And we can easily expand the original iocost_iocg_activate trace event to support a state trace class, including active and idle state tracing. Acked-by: Tejun Heo Signed-off-by: Baolin Wang Signed-off-by: Jens Axboe commit 1aba169e770911fb2afa63eb859883c4de2191e3 Author: Josh Triplett Date: Thu Dec 17 00:58:47 2020 -0800 nbd: Respect max_part for all partition scans The creation path of the NBD device respects max_part and only scans for partitions if max_part is not 0. However, some other code paths ignore max_part, and unconditionally scan for partitions. Add a check for max_part on each partition scan. Signed-off-by: Josh Triplett Reviewed-by: Josef Bacik Signed-off-by: Jens Axboe commit 4bc4a912534a72f1c96f483448f0be16e5a48063 Author: Jens Axboe Date: Thu Dec 17 07:53:33 2020 -0700 io_uring: hold mmap_sem for mm->locked_vm manipulation The kernel doesn't seem to have clear rules around this, but various spots are using the mmap_sem to serialize access to modifying the locked_vm count. Play it safe and lock the mm for write when accounting or unaccounting locked memory. Signed-off-by: Jens Axboe commit 67698880ac9d56367ebf22f8336ccab6234f9feb Author: Srinivas Pandruvada Date: Tue Nov 17 11:48:02 2020 -0800 thermal: int340x: Support Alder Lake Add ACPI IDs for thermal drivers for Alder Lake support. Signed-off-by: Srinivas Pandruvada Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201117194802.503337-1-srinivas.pandruvada@linux.intel.com commit 349dd23931d1943b1083182e35715eba8b150fe1 Author: Bard Liao Date: Thu Dec 17 15:45:56 2020 +0800 ASoC: max98373: don't access volatile registers in bias level off We will set regcache_cache_only true in suspend. As a result, regmap_read will return error when we try to read volatile registers in suspend. Besides, it doesn't make sense to read feedback data when codec is not active. To make userspace happy, this patch returns a cached value shich should be a valid value. Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20201217074556.32370-1-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit 6108f990c0887d3e8f1db2d13c7012e40a061f28 Author: Shuming Fan Date: Thu Dec 17 16:56:51 2020 +0800 ASoC: rt711: mutex between calibration and power state changes To avoid calibration time-out, this patch adds the mutex between calibration and power state changes Signed-off-by: Shuming Fan Link: https://lore.kernel.org/r/20201217085651.24580-1-shumingf@realtek.com Signed-off-by: Mark Brown commit bb224c3e3e41d940612d4cc9573289cdbd5cb8f5 Author: Cezary Rojewski Date: Thu Dec 17 11:54:01 2020 +0100 ASoC: Intel: haswell: Add missing pm_ops haswell machine board is missing pm_ops what prevents it from undergoing suspend-resume procedure successfully. Assign default snd_soc_pm_ops so this is no longer the case. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20201217105401.27865-1-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 61c7dbec33777ade95d3db58beec8d7f177868c8 Author: Kuninori Morimoto Date: Thu Dec 17 11:28:49 2020 +0900 ASoC: rsnd: don't call clk_disable_unprepare() if can't use We need to care clock accessibility, because we might can't use clock for some reasons. It sets clk_rate for each clocks when enabled. This means it doesn't have clk_rate if we can't use. We can avoid to call clk_disable_unprepare() in such case. Link: https://lore.kernel.org/r/CAMuHMdWvB+p=2JqTsO7bR8uJqKqO5A2XgXFXsVAjHk3hcxgcTw@mail.gmail.com Reported-by: Geert Uytterhoeven Signed-off-by: Kuninori Morimoto Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/87eejpgoi9.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 8d1bfc04c97407767559f6389a0f0fb060cbe25e Author: Srinivasa Rao Mandadapu Date: Thu Dec 17 13:38:34 2020 +0530 ASoC: qcom: Add support for playback recover after resume To support playback continuation after hard suspend(bypass powerd) and resume do regcache sync with component driver pm ops. Signed-off-by: V Sujith Kumar Reddy Signed-off-by: Srinivasa Rao Mandadapu Reviewed-by: Srinivas Kandagatla Tested-by: Steev Klimaszewski Link: https://lore.kernel.org/r/1608192514-29695-3-git-send-email-srivasam@codeaurora.org Signed-off-by: Mark Brown commit 315fbe4cef98ee5fb6085bc54c7f25eb06466c70 Author: Srinivasa Rao Mandadapu Date: Thu Dec 17 13:38:33 2020 +0530 ASoC: qcom: Fix incorrect volatile registers MI2S and DMA control registers are not volatile, so remove these from volatile registers list. Registers reset state check by reading non volatile registers makes no use, so remove error check from cpu and platform trigger callbacks. Initialized map variable two times in lpass platform trigger API, so remove redundant initialization. Fixes commit b1824968221cc ("ASoC: qcom: Fix enabling BCLK and LRCLK in LPAIF invalid state") Signed-off-by: V Sujith Kumar Reddy Signed-off-by: Srinivasa Rao Mandadapu Link: https://lore.kernel.org/r/1608192514-29695-2-git-send-email-srivasam@codeaurora.org Signed-off-by: Mark Brown commit 6eefb79d6f5bc4086bd02c76f1072dd4a8d9d9f6 Author: Thierry Reding Date: Wed Dec 16 18:33:55 2020 +0100 pwm: sun4i: Remove erroneous else branch Commit d3817a647059 ("pwm: sun4i: Remove redundant needs_delay") changed the logic of an else branch so that the PWM_EN and PWM_CLK_GATING bits are now cleared if the PWM is to be disabled, whereas previously the condition was always false, and hence the branch never got executed. This code is reported causing backlight issues on boards based on the Allwinner A20 SoC. Fix this by removing the else branch, which restores the behaviour prior to the offending commit. Note that the PWM_EN and PWM_CLK_GATING bits still get cleared later in sun4i_pwm_apply() if the PWM is to be disabled. Fixes: d3817a647059 ("pwm: sun4i: Remove redundant needs_delay") Reported-by: Taras Galchenko Suggested-by: Taras Galchenko Tested-by: Taras Galchenko Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit edf7f80e780e50bb5711d4c112b721517d0ff73e Author: Thierry Reding Date: Fri Dec 4 13:44:35 2020 +0100 pwm: sl28cpld: Set driver data before registering the PWM chip It is good practice to set the driver data before registering a device with a subsystem because the subsystem or the driver core may call back into the driver implementation. This is not currently an issue, but to prevent future changes from causing this to break unexpectedly, make sure that the driver data is set before the PWM chip registration. Signed-off-by: Thierry Reding commit 3df23a316c4a5d1764b034c71c29d67a17d5299f Author: Uwe Kleine-König Date: Sat Dec 5 17:19:24 2020 +0100 pwm: Remove unused function pwmchip_add_inversed() This is only defined with CONFIG_PWM unset and was introduced together with pwmchip_add_with_polarity() (which is only defined with CONFIG_PWM enabled). I guess the series that introduced pwmchip_add_with_polarity() had a different concept in earlier revisions and the !CONFIG_PWM part was just not updated accordingly. Given that there is no implementation for pwmchip_add_with_polarity() without CONFIG_PWM, just drop pwmchip_add_inversed() instead of renaming it to pwmchip_add_with_polarity(). Signed-off-by: Uwe Kleine-König Acked-by: Lee Jones Signed-off-by: Thierry Reding commit 1ce65396e6b2386b4fd54f87beff0647a772e1cd Author: Uwe Kleine-König Date: Mon Dec 7 15:13:24 2020 +0100 pwm: imx27: Fix overflow for bigger periods The second parameter of do_div is an u32 and NSEC_PER_SEC * prescale overflows this for bigger periods. Assuming the usual pwm input clk rate of 66 MHz this happens starting at requested period > 606060 ns. Splitting the division into two operations doesn't loose any precision. It doesn't need to be feared that c / NSEC_PER_SEC doesn't fit into the unsigned long variable "duty_cycles" because in this case the assignment above to period_cycles would already have been overflowing as period >= duty_cycle and then the calculation is moot anyhow. Fixes: aef1a3799b5c ("pwm: imx27: Fix rounding behavior") Signed-off-by: Uwe Kleine-König Tested-by: Johannes Pointner Signed-off-by: Thierry Reding commit 2f81b51d0d02074502ad27424c228ca760823668 Author: Lino Sanfilippo Date: Wed Dec 9 21:48:25 2020 +0100 pwm: bcm2835: Support apply function for atomic configuration Use the newer .apply function of pwm_ops instead of .config, .enable, .disable and .set_polarity. This guarantees atomic changes of the pwm controller configuration. It also reduces the size of the driver. Since now period is a 64 bit value, add an extra check to reject periods that exceed the possible max value for the 32 bit register. This has been tested on a Raspberry PI 4. Signed-off-by: Lino Sanfilippo Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit bb72e1dbae0e759252fcdb4a97917200e165bf91 Author: Uwe Kleine-König Date: Mon Nov 16 10:08:04 2020 +0100 pwm: keembay: Fix build failure with -Os The driver used this construct: #define KMB_PWM_LEADIN_MASK GENMASK(30, 0) static inline void keembay_pwm_update_bits(struct keembay_pwm *priv, u32 mask, u32 val, u32 offset) { u32 buff = readl(priv->base + offset); buff = u32_replace_bits(buff, val, mask); writel(buff, priv->base + offset); } ... keembay_pwm_update_bits(priv, KMB_PWM_LEADIN_MASK, 0, KMB_PWM_LEADIN_OFFSET(pwm->hwpwm)); With CONFIG_CC_OPTIMIZE_FOR_SIZE the compiler (here: gcc 10.2.0) this triggers: In file included from /home/uwe/gsrc/linux/drivers/pwm/pwm-keembay.c:16: In function ‘field_multiplier’, inlined from ‘keembay_pwm_update_bits’ at /home/uwe/gsrc/linux/include/linux/bitfield.h:124:17: /home/uwe/gsrc/linux/include/linux/bitfield.h:119:3: error: call to ‘__bad_mask’ declared with attribute error: bad bitfield mask 119 | __bad_mask(); | ^~~~~~~~~~~~ In function ‘field_multiplier’, inlined from ‘keembay_pwm_update_bits’ at /home/uwe/gsrc/linux/include/linux/bitfield.h:154:1: /home/uwe/gsrc/linux/include/linux/bitfield.h:119:3: error: call to ‘__bad_mask’ declared with attribute error: bad bitfield mask 119 | __bad_mask(); | ^~~~~~~~~~~~ The compiler doesn't seem to be able to notice that with field being 0x3ffffff the expression if ((field | (field - 1)) & ((field | (field - 1)) + 1)) __bad_mask(); can be optimized away. So use __always_inline and document the problem in a comment to fix this. Reported-by: kernel test robot Signed-off-by: Uwe Kleine-König Tested-by: Vijayakannan Ayyathurai Signed-off-by: Thierry Reding commit 765edf0bf019ff8a7ae2dedbccd8af370b0856b5 Author: Soham Biswas Date: Wed Nov 18 20:21:12 2020 +0530 pwm: core: Use octal permission Permission bits are easier readable in octal than with using the symbolic names. Fixes the following warning generated by checkpatch: WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. #1341: FILE: drivers/pwm/core.c:1341: + debugfs_create_file("pwm", S_IFREG | S_IRUGO, NULL, NULL, Signed-off-by: Soham Biswas Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit aa43edcbc898afffb061f560d928d43bd55f4dc3 Author: Uwe Kleine-König Date: Wed Nov 18 10:45:09 2020 +0100 pwm: lpss: Make compilable with COMPILE_TEST All used ACPI functions have dummy implementations, and there is no hard dependency on x86. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 71d4b833da7fb0f80f78a045e5796c9e3a880f09 Author: Uwe Kleine-König Date: Wed Nov 18 10:45:08 2020 +0100 pwm: Fix dependencies on HAS_IOMEM Drivers making use of IO remapping must depend on HAS_IOMEM. Reported-by: kernel test robot Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 2b1c1a5d51484f4f44d662d146e443498d0bedd2 Author: Thierry Reding Date: Wed Nov 11 21:18:11 2020 +0100 pwm: Use -EINVAL for unsupported polarity Instead of using a mix of -EOPNOTSUPP and -ENOTSUPP, use the more standard -EINVAL to signal that the specified polarity value was invalid. Acked-by: Uwe Kleine-König Acked-by: Lee Jones Signed-off-by: Thierry Reding commit f14a8f0ef981387809b4d6fec857bfd8261b8f15 Author: Thierry Reding Date: Wed Nov 11 19:26:59 2020 +0100 pwm: sti: Remove unnecessary blank line A single blank line is enough to separate logical code blocks. Acked-by: Uwe Kleine-König Acked-by: Lee Jones Signed-off-by: Thierry Reding commit fd3ae02bb66f091e55f363d32eca7b4039977bf5 Author: Thierry Reding Date: Wed Nov 11 19:24:29 2020 +0100 pwm: sti: Avoid conditional gotos Using gotos for conditional code complicates this code significantly. Convert the code to simple conditional blocks to increase readability. Suggested-by: Uwe Kleine-König Acked-by: Uwe Kleine-König Acked-by: Lee Jones Signed-off-by: Thierry Reding commit 97960addcd9f5a11acd6ab28ebb33d0fde8c14a3 Author: Rahul Tanwar Date: Thu Nov 5 13:49:40 2020 +0800 pwm: Add PWM fan controller driver for LGM SoC Intel Lightning Mountain(LGM) SoC contains a PWM fan controller. This PWM controller does not have any other consumer, it is a dedicated PWM controller for fan attached to the system. Add driver for this PWM fan controller. Signed-off-by: Rahul Tanwar Reviewed-by: Andy Shevchenko Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 7c0e4f2ef782a4da2126a9399316b689d4fbc013 Author: Rahul Tanwar Date: Thu Nov 5 13:49:39 2020 +0800 Add DT bindings YAML schema for PWM fan controller of LGM SoC Intel's LGM(Lightning Mountain) SoC contains a PWM fan controller which is only used to control the fan attached to the system. This PWM controller does not have any other consumer other than fan. Add DT bindings documentation for this PWM fan controller. Signed-off-by: Rahul Tanwar Reviewed-by: Rob Herring Signed-off-by: Thierry Reding commit 1ed2b3fca64516d1b3503ef21929f3b5f4f41cc6 Author: Jarkko Nikula Date: Fri Oct 2 16:56:13 2020 +0300 pwm: Add DesignWare PWM Controller Driver Introduce driver for Synopsys DesignWare PWM Controller used on Intel Elkhart Lake. Initial implementation is done by Felipe Balbi while he was working at Intel with later changes from Raymond Tan and me. Co-developed-by: Felipe Balbi (Intel) Signed-off-by: Felipe Balbi (Intel) Co-developed-by: Raymond Tan Signed-off-by: Raymond Tan Signed-off-by: Jarkko Nikula Signed-off-by: Thierry Reding commit 554b3b31e9229b498dc17f9bc0f14b42c586f0e9 Author: Fabien Parent Date: Fri Oct 16 20:50:15 2020 +0200 dt-bindings: pwm: mtk-disp: add MT8167 SoC binding Add binding for MT8167 SoC. The IP is compatible with MT8173. Signed-off-by: Fabien Parent Acked-by: Uwe Kleine-König Acked-by: Rob Herring Signed-off-by: Thierry Reding commit 8b2fbaed90f6291a221d02c31e16a1ce722f79fc Author: Fabien Parent Date: Mon Oct 19 16:07:03 2020 +0200 pwm: mediatek: Add MT8183 SoC support Add PWM support for the MT8183 SoC. Signed-off-by: Fabien Parent Reviewed-by: Matthias Brugger Signed-off-by: Thierry Reding commit 0c0ead76235db0bcfaab83f04db546995449d002 Author: Fabien Parent Date: Mon Oct 19 16:07:02 2020 +0200 pwm: mediatek: Always use bus clock The MediaTek PWM IP can sometimes use the 26 MHz source clock to generate the PWM signal, but the driver currently assumes that we always use the PWM bus clock to generate the PWM signal. This commit modifies the PWM driver in order to force the PWM IP to always use the bus clock as source clock. I do not have the datasheet of all the MediaTek SoC, so I don't know if the register to choose the source clock is present in all the SoCs or only in subset. As a consequence I made this change optional by using a platform data paremeter to says whether this register is supported or not. On all the SoCs I don't have the datasheet (MT2712, MT7622, MT7623, MT7628, MT7629) I kept the behavior to be the same as before this change. Signed-off-by: Fabien Parent Reviewed-by: Matthias Brugger Signed-off-by: Thierry Reding commit ad5a228b9bad44e2a652e45fd9ac767d8880f480 Author: Fabien Parent Date: Mon Oct 19 16:07:01 2020 +0200 dt-bindings: pwm: pwm-mediatek: Add documentation for MT8183 SoC Add binding documentation for the MT8183 SoC. Signed-off-by: Fabien Parent Reviewed-by: Matthias Brugger Acked-by: Rob Herring Signed-off-by: Thierry Reding commit bd899ceb8f9129cb0d58115447ac9ff8ea907135 Author: Vijayakannan Ayyathurai Date: Thu Oct 22 15:14:46 2020 +0800 pwm: Add PWM driver for Intel Keem Bay The Intel Keem Bay SoC requires PWM support. Add the pwm-keembay driver to enable this. Signed-off-by: Lai, Poey Seng Co-developed-by: Vineetha G. Jaya Kumaran Signed-off-by: Vineetha G. Jaya Kumaran Reviewed-by: Andy Shevchenko Co-developed-by: Vijayakannan Ayyathurai Signed-off-by: Vijayakannan Ayyathurai Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit cb55d17ea2ecb7698bc37e5658b4642eef45a327 Author: Vijayakannan Ayyathurai Date: Thu Oct 22 15:14:47 2020 +0800 dt-bindings: pwm: keembay: Add bindings for Intel Keem Bay PWM Add PWM Device Tree bindings documentation for the Intel Keem Bay SoC. Signed-off-by: Vineetha G. Jaya Kumaran Reviewed-by: Rob Herring Acked-by: Uwe Kleine-König Signed-off-by: Vijayakannan Ayyathurai Signed-off-by: Thierry Reding commit 1f0f1e80fdd3aa9631f6c22cda4f8550cfcfcc3e Author: Lokesh Vutla Date: Fri Oct 30 19:11:35 2020 +0530 pwm: lp3943: Dynamically allocate PWM chip base When there are other PWM controllers enabled along with pwm-lp3943, pwm-lp3942 is failing to probe with -EEXIST error. This is because other PWM controllers are probed first and assigned PWM base 0 and pwm-lp3943 is requesting for 0 again. In order to avoid this, assign the chip base with -1, so that it is dynamically allocated. Fixes: af66b3c0934e ("pwm: Add LP3943 PWM driver") Signed-off-by: Lokesh Vutla Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 34cbcd72588f40e58d7db5aa8c125068dd735765 Author: Alexandre Belloni Date: Fri Oct 30 19:36:57 2020 +0100 pwm: atmel-tcb: Add sama5d2 support Add sama5d2 support. The sama5d2 has a new clock input, its gclk. Index 0 of the clock selector is the gclk instead of the peripheral clock divided by 2. For now, the gclk is not used because the peripheral clock divided by 8 already gives a 9.6ns resolution which is enough for most use cases. Signed-off-by: Alexandre Belloni Signed-off-by: Thierry Reding commit 061f8572a31c0da6621aacfc70ed16e1a6d1d33b Author: Alexandre Belloni Date: Fri Oct 30 19:36:56 2020 +0100 pwm: atmel-tcb: Switch to new binding The PWM is now a subnode of the used TCB. This is cleaner and it mainly allows to stop wasting TCB channels when only 2 or 4 PWMs are used. This also removes the atmel_tclib dependency Cc: Thierry Reding Cc: linux-pwm@vger.kernel.org Signed-off-by: Alexandre Belloni Signed-off-by: Thierry Reding commit cd6720ba022bae39e0b37ec12a3fc810643a779c Author: Alexandre Belloni Date: Fri Oct 30 19:36:55 2020 +0100 dt-bindings: microchip: atmel,at91rm9200-tcb: Add atmel,tcb-pwm Move the TCB pwm nodes under their parent. This removes the need for the tc-block property as there is now a child-parent relationship between the TC channel and the TC block. Move the documentation to the main file. Signed-off-by: Alexandre Belloni Reviewed-by: Rob Herring Signed-off-by: Thierry Reding commit 44db5363fab8c91292ee6083493f1fd50201ed86 Author: Grygorii Strashko Date: Fri Oct 30 22:12:54 2020 +0200 pwm: tiehrpwm: Handle deferred probe with dev_err_probe() The devm_clk_get() may return -EPROBE_DEFER which is not handled properly by TI EHRPWM driver and causes unnecessary boot log messages. Hence, add proper deferred probe handling with new dev_err_probe() API. Signed-off-by: Grygorii Strashko Reviewed-by: Vignesh Raghavendra Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit e3aa45f2f88b6779ab798c63a4deb7ddff949ac7 Author: Hans de Goede Date: Mon Nov 9 11:57:26 2020 +0100 pwm: lpss: Set DPM_FLAG_SMART_SUSPEND on Cherry Trail devices As the comment above the code setting the DPM_FLAG_NO_DIRECT_COMPLETE flag explains: /* * On Cherry Trail devices the GFX0._PS0 AML checks if the controller * is on and if it is not on it turns it on and restores what it * believes is the correct state to the PWM controller. * Because of this we must disallow direct-complete, which keeps the * controller (runtime)suspended, on resume to avoid 2 issues: * 1. The controller getting turned on without the linux-pm code * knowing about this. On devices where the controller is unused * this causes it to stay on during the next suspend causing high * battery drain (because S0i3 is not reached) * 2. The state restoring code unexpectedly messing with the controller */ The pm-core must not skip resume to avoid the GFX0._PS0 AML code messing with the PWM controller behind our back. But leaving the controller runtime-suspended (skipping runtime-resume + normal-suspend) during suspend is fine. Set the DPM_FLAG_SMART_SUSPEND flag to allow this. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Thierry Reding commit b9c90f153d836522621b5504087cf83419886e30 Author: Hans de Goede Date: Mon Nov 9 11:57:25 2020 +0100 pwm: lpss: Use DPM_FLAG_NO_DIRECT_COMPLETE instead of declaring a prepare handler ACPI LPSS devices use direct-complete style suspend/resume handling by default. We set the DPM_FLAG_SMART_PREPARE and define a prepare handler to disable this on Cherry Trail devices. Clean this up a bit by setting the DPM_FLAG_NO_DIRECT_COMPLETE flag for Cherry Trail devices, instead of defining a prepare handler. While at it also improve the comment explaining why this is necessary. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Thierry Reding commit d58560e6fa4611cee0630ef6e12544269563ca75 Author: Hans de Goede Date: Mon Nov 9 11:57:24 2020 +0100 pwm: lpss: Log error from pwm_lpss_is_updating() if the update bit is still set pwm_lpss_is_updating() does a sanity check which should never fail. If the check does actually fail that is worth logging an error, especially since this means that we will skip making the requested changes to the PWM settings. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Thierry Reding commit 5e5da1e9fbeecdf9d7a7495d7ae2a37453e38499 Author: Uwe Kleine-König Date: Fri Nov 6 18:15:47 2020 +0100 pwm: ab8500: Explicitly allocate pwm chip base dynamically The ab8500 driver is the last one which doesn't (explicitly) use dynamic allocation of the pwm id. Looking through the kernel sources I didn't find a place that relies on this id. And with the device probed from device tree pdev->id is -1 anyhow; making this explicit looks beneficial, too. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 269effd03f6142df4c74814cfdd5f0b041b30bf9 Author: Uwe Kleine-König Date: Tue Oct 13 10:13:21 2020 +0200 pwm: zx: Add missing cleanup in error path zx_pwm_probe() called clk_prepare_enable() before; this must be undone in the error path. Fixes: 4836193c435c ("pwm: Add ZTE ZX PWM device driver") Signed-off-by: Uwe Kleine-König Acked-by: Shawn Guo Signed-off-by: Thierry Reding commit 2e978a4564b82c0b5e31e23f5e7ea8bb9d6a23f7 Author: Uwe Kleine-König Date: Wed Aug 12 09:52:14 2020 +0200 pwm: ab8500: Add error message if pwmchip_add() fails pwmchip_add() doesn't emit an error message, so add one in the driver. Signed-off-by: Uwe Kleine-König Reviewed-by: Linus Walleij Signed-off-by: Thierry Reding commit f1332e9294158d8969a9bf51f01e0d1b3b844f15 Author: Anson Huang Date: Tue Aug 11 14:24:32 2020 +0800 pwm: imx1: Use dev_err_probe() to simplify error handling dev_err_probe() can reduce code size, uniform error handling and record the defer probe reason etc., use it to simplify the code. Signed-off-by: Anson Huang Acked-by: Lee Jones Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit d109d74c4cda019653f8f31d3030d8ff28caa994 Author: Anson Huang Date: Tue Aug 11 14:24:31 2020 +0800 pwm: imx27: Use dev_err_probe() to simplify error handling dev_err_probe() can reduce code size, uniform error handling and record the defer probe reason etc., use it to simplify the code. Signed-off-by: Anson Huang Acked-by: Lee Jones Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 168cc32920effa8b85b828fa4cb53f3e3e98f6d4 Author: Anson Huang Date: Tue Aug 11 14:24:30 2020 +0800 pwm: imx-tpm: Use dev_err_probe() to simplify error handling dev_err_probe() can reduce code size, uniform error handling and record the defer probe reason etc., use it to simplify the code. Signed-off-by: Anson Huang Acked-by: Lee Jones Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit accef074e9d15da654641fd37741ea7b96ade9c3 Author: Yangtao Li Date: Sun Dec 29 08:06:10 2019 +0000 pwm: atmel: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Acked-by: Claudiu Beznea Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 96cfceba3967198fc5d501d7e1a37122b5c9bf29 Author: Yangtao Li Date: Sun Dec 29 08:06:09 2019 +0000 pwm: sifive: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit cecccd8d4af2672725306924cd4987acc6491054 Author: Yangtao Li Date: Sun Dec 29 08:06:08 2019 +0000 pwm: hibvt: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. While at it, also declare the "i" and "ret" variables on the same line since they are of the same type. Signed-off-by: Yangtao Li Acked-by: Uwe Kleine-König Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 74ec20a4e6a064ac2cdfb577c115cb948b307f0f Author: Yangtao Li Date: Sun Dec 29 08:06:07 2019 +0000 pwm: lpc18xx-sct: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit d574ab62a56f2499e2976654f9107b17cb9874f2 Author: Yangtao Li Date: Sun Dec 29 08:06:06 2019 +0000 pwm: img: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 3151b13017ec727b5a20b2ffe65366602d8305b4 Author: Yangtao Li Date: Sun Dec 29 08:06:05 2019 +0000 pwm: clps711x: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 6e0301e7df7a2bd88bf9397c9814d79594ee42e2 Author: Yangtao Li Date: Sun Dec 29 08:06:04 2019 +0000 pwm: mtk-disp: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Matthias Brugger Signed-off-by: Thierry Reding commit 5bec839f13a96eeb787142c36b6da2380a616999 Author: Yangtao Li Date: Sun Dec 29 08:06:03 2019 +0000 pwm: brcmstb: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Nicolas Saenz Julienne Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 4906bf5482e4965a686ea61f78e87623a792bd8f Author: Yangtao Li Date: Sun Dec 29 08:06:02 2019 +0000 pwm: vt8500: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 05baa59601ee11fdbd0babb4cce49b2ffff7fb14 Author: Yangtao Li Date: Sun Dec 29 08:06:01 2019 +0000 pwm: berlin: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit f57e7d25e5f3cb8724668c3118aee7d9a00ec7f1 Author: Yangtao Li Date: Sun Dec 29 08:06:00 2019 +0000 pwm: bcm2835: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 1dcf0523fdb37b0b0d97b07dacce6b99b4d3c0ce Author: Yangtao Li Date: Sun Dec 29 08:05:59 2019 +0000 pwm: tiecap: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 860b1ca0eabc8c2199c5edd9226f214b085c3f9b Author: Yangtao Li Date: Sun Dec 29 08:05:58 2019 +0000 pwm: imx: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit dc13c0f61e31c9c00b072ba2d851362fbdd25bfa Author: Yangtao Li Date: Sun Dec 29 08:05:56 2019 +0000 pwm: tiehrpwm: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit cc1cc4ba3673913bc12769fc24ea8ed47819077a Author: Yangtao Li Date: Sun Dec 29 08:05:55 2019 +0000 pwm: samsung: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit ed98401f466507f6fd73da5bbedb5bf7f74b4467 Author: Yangtao Li Date: Sun Dec 29 08:05:54 2019 +0000 pwm: bcm-iproc: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 5119ee9effdd44c5ceaf6f63bd542dfb4a58f4c0 Author: Yangtao Li Date: Sun Dec 29 08:05:53 2019 +0000 pwm: rockchip: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Heiko Stuebner Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 17076b10d40a612a7fe1c41b4bcc1c9701f14cdc Author: Yangtao Li Date: Sun Dec 29 08:05:52 2019 +0000 pwm: meson: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Martin Blumenstingl Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit fd7c575ac6026e078fa30dc237d3e86897c58652 Author: Yangtao Li Date: Sun Dec 29 08:05:51 2019 +0000 pwm: lpc32xx: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 537fe68786738ebc48083fad2f057220a9ba8464 Author: Yangtao Li Date: Sun Dec 29 08:05:50 2019 +0000 pwm: bcm-kona: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 21af435676d3a4a339420aa122f6a82e0d8ea650 Author: Yangtao Li Date: Sun Dec 29 08:05:49 2019 +0000 pwm: spear: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit bde048ebbd2730f569dadfc431a9de1678593941 Author: Yangtao Li Date: Sun Dec 29 08:05:48 2019 +0000 pwm: zx: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 6945fe42f8016352869b40eeb525dd3eb68f4644 Author: Yangtao Li Date: Sun Dec 29 08:05:47 2019 +0000 pwm: pxa: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 728cd3e6eaf810d49e5a8d8c288fcabda2c81b63 Author: Yangtao Li Date: Sun Dec 29 08:05:46 2019 +0000 pwm: sti: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 7681c2bd2ab2dd1470793694cadcf3487282ffae Author: Yangtao Li Date: Sun Dec 29 08:05:45 2019 +0000 pwm: mediatek: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit fa44fe41cc75523b835bf6f625ee1cbf3d0c566b Author: Yangtao Li Date: Sun Dec 29 08:05:44 2019 +0000 pwm: tegra: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit fc0155f8221ab47c2d02c52f15a4699403d9cdde Author: Yangtao Li Date: Sun Dec 29 08:05:43 2019 +0000 pwm: ep93xx: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit e3f22bc2556abd445bc15decd864c85f4444c870 Author: Yangtao Li Date: Sun Dec 29 08:05:42 2019 +0000 pwm: renesas-tpu: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 3d3a32593957da447a27520beefb1834ba068a57 Author: Yangtao Li Date: Sun Dec 29 08:05:41 2019 +0000 pwm: rcar: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit e9534031f0692fb9405c7a606ebba9303de43e11 Author: Yangtao Li Date: Sun Dec 29 08:05:40 2019 +0000 pwm: fsl-ftm: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 2e379ffb44d948515dbdddf061a9f0c75cd9d33f Author: Yangtao Li Date: Sun Dec 29 08:05:39 2019 +0000 pwm: sun4i: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 9fd339a45be5c06e239d45a042eab9d25de87882 Author: Marc Zyngier Date: Thu Dec 17 11:11:35 2020 +0000 arm64: Work around broken GCC 4.9 handling of "S" constraint GCC 4.9 seems to have a problem with the "S" asm constraint when the symbol lives in the same compilation unit, and pretends the constraint is impossible: $ cat x.c void *foo(void) { static int x; int *addr; asm("adrp %0, %1" : "=r" (addr) : "S" (&x)); return addr; } $ ~/Work/gcc-linaro-aarch64-linux-gnu-4.9-2014.09_linux/bin/aarch64-linux-gnu-gcc -S -x c -O2 x.c x.c: In function ‘foo’: x.c:5:2: error: impossible constraint in ‘asm’ asm("adrp %0, %1" : "=r" (addr) : "S" (&x)); ^ Boo. Following revisions of the compiler work just fine, though. We can fallback to the "i" constraint for GCC version prior to 5.0, which *seems* to do the right thing. Hopefully we will be able to remove this at some point, but in the meantime this gets us going. Signed-off-by: Marc Zyngier Acked-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20201217111135.1536658-1-maz@kernel.org Signed-off-by: Catalin Marinas commit 03813d9b7d4368d4a8c9bb8f5a2a1e23dac8f1b5 Author: Maxime Ripard Date: Mon Dec 7 11:50:50 2020 +0100 clk: Trace clk_set_rate() "range" functions The clk_set_rate "range" functions don't have any tracepoints even though it might be useful. Add some. Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20201207105050.2096917-1-maxime@cerno.tech [sboyd@kernel.org: Reword commit text] Signed-off-by: Stephen Boyd commit 16214f97f44321a48985ef37f5ca2d5b2479b8f2 Author: Alexandru Ardelean Date: Thu Dec 3 09:40:37 2020 +0200 clk: axi-clkgen: move the OF table at the bottom of the file The change is mostly cosmetic. No functional changes. Since the driver now uses of_device_get_match_data() to obtain some driver specific info, there is no need to define the OF table before the probe function. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201203074037.26940-2-alexandru.ardelean@analog.com Signed-off-by: Stephen Boyd commit ac1ee86a9cdb002b0c130cfbad668dd992a0596a Author: Alexandru Ardelean Date: Thu Dec 3 09:40:36 2020 +0200 clk: axi-clkgen: wrap limits in a struct and keep copy on the state object Up until the these limits were global/hard-coded, since they are typically limits of the fabric. However, since this is an FPGA generated clock, this may run on setups where one clock is on a fabric, and another one synthesized on another fabric connected via PCIe (or some other inter-connect, and then these limits need to be adjusted for each instance of the AXI CLKGEN. This change wraps the current constants in 'axi_clkgen_limits' struct and the 'axi_clkgen' instance keeps a copy of these limits, which is initialized at probe from the default limits. The limits are stored on the device-tree OF table, so that we can adjust them via the compatible string. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201203074037.26940-1-alexandru.ardelean@analog.com Signed-off-by: Stephen Boyd commit bd91abb218e0ac4a7402d6c25d383e2a706bb511 Author: Alexandru Ardelean Date: Tue Oct 13 17:34:20 2020 +0300 dt-bindings: clock: adi,axi-clkgen: convert old binding to yaml format This change converts the old binding for the AXI clkgen driver to a yaml format. As maintainers, added: - Lars-Peter Clausen - as original author of driver & binding - Michael Hennerich - as supporter of Analog Devices drivers Acked-by: Michael Hennerich Acked-by: Lars-Peter Clausen Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201013143421.84188-1-alexandru.ardelean@analog.com Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd commit 66cc7af38149fefd2d8c9a47a456884bd2105c9d Author: David Shah Date: Sun Dec 6 12:18:51 2020 +0100 clk: ti: omap5: Fix reboot DPLL lock failure when using ABE TIMERs Having the ABE DPLL ref and bypass muxes set to different inputs was causing the DPLL not to lock when TIMER8 was used, as it is in the Pyra for the backlight. This patch fixes this by setting abe_dpll_bypass_clk_mux to sys_32k_ck in omap5xxx_dt_clk_init. A similar patch may also be needed for OMAP44xx which has similar code in omap4xxx_dt_clk_init, but I have not added this as I have no hardware to test on. Signed-off-by: David Shah Signed-off-by: H. Nikolaus Schaller Link: https://lore.kernel.org/r/1d3abe2512054866cc2ea7b2592238f4fa06502a.1607253531.git.hns@goldelico.com Acked-by: Tony Lindgren Signed-off-by: Stephen Boyd commit 8c6239f6e95f583bb763d0228e02d4dd0fb3d492 Author: Zhang Qilong Date: Fri Nov 13 21:16:23 2020 +0800 clk: ti: Fix memleak in ti_fapll_synth_setup If clk_register fails, we should goto free branch before function returns to prevent memleak. Fixes: 163152cbbe321 ("clk: ti: Add support for FAPLL on dm816x") Reported-by: Hulk Robot Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20201113131623.2098222-1-zhangqilong3@huawei.com Acked-by: Tony Lindgren Signed-off-by: Stephen Boyd commit bf6d43d7232511d4aadb634ec97fcbe5d49ee120 Author: Dmitry Osipenko Date: Sun Nov 15 23:34:32 2020 +0300 clk: Add hardware-enable column to clk summary Add "hardware enable" column to the clk summary in order to show actual hardware enable-state of all clocks. The possible states are "Y/N/?", where question mark means that state is unknown, i.e. clock isn't a mux and clk-driver doesn't support is_enabled() callback for this clock. In conjunction with clk_ignore_unused, this tells us what unused clocks are left enabled after bootloader. This is also a useful aid for debugging interactions with firmware which changes clock states without notifying kernel. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20201115203432.13934-1-digetx@gmail.com Signed-off-by: Stephen Boyd commit 725124d10d00b2f56bb5bd08b431cc74ab3b3ace Author: Amadej Kastelic Date: Tue Dec 15 19:09:05 2020 +0100 ALSA: usb-audio: Add VID to support native DSD reproduction on FiiO devices Add VID to support native DSD reproduction on FiiO devices. Tested-by: Amadej Kastelic Signed-off-by: Emilio Moretti Signed-off-by: Amadej Kastelic Cc: Link: https://lore.kernel.org/r/X9j7wdXSr4XyK7Bd@ryzen.localdomain Signed-off-by: Takashi Iwai commit 74c64efa1557fef731b59eb813f115436d18078e Author: Robin Gong Date: Fri Dec 18 00:15:47 2020 +0800 ALSA: core: memalloc: add page alignment for iram Since mmap for userspace is based on page alignment, add page alignment for iram alloc from pool, otherwise, some good data located in the same page of dmab->area maybe touched wrongly by userspace like pulseaudio. Signed-off-by: Robin Gong Cc: Link: https://lore.kernel.org/r/1608221747-3474-1-git-send-email-yibin.gong@nxp.com Signed-off-by: Takashi Iwai commit 150927c3674d7db4dd51a7269e01423c8c78e53b Author: Kailang Yang Date: Thu Dec 17 16:52:44 2020 +0800 ALSA: hda/realtek - Supported Dell fixed type headset This platform only supported iphone type headset. It can't support Dell headset mode. Signed-off-by: Kailang Yang Cc: Link: https://lore.kernel.org/r/b97e971978034bc9b772a08ec91265e8@realtek.com Signed-off-by: Takashi Iwai commit 95393f3e07ab53855b91881692a4a5b52dcdc03c Author: Nicolas Pitre Date: Wed Dec 16 09:44:30 2020 -0500 i3c/master/mipi-i3c-hci: quiet maybe-unused variable warning If CONFIG_OF is disabled then the matching table is notreferenced. Reported-by: kernel test robot Signed-off-by: Nicolas Pitre Signed-off-by: Boris Brezillon commit 2aeff9d8c8e69edd268e06a79771d71d5f46b4a3 Author: Weiyi Lu Date: Fri Nov 13 16:29:52 2020 +0800 clk: mediatek: Make mtk_clk_register_mux() a static function mtk_clk_register_mux() should be a static function Fixes: a3ae549917f16 ("clk: mediatek: Add new clkmux register API") Signed-off-by: Weiyi Lu Link: https://lore.kernel.org/r/1605256192-31307-1-git-send-email-weiyi.lu@mediatek.com Signed-off-by: Stephen Boyd commit 30d085039314fcad2c2e33a2dfc8e79765ddf408 Author: Dan Carpenter Date: Wed Dec 16 11:32:12 2020 +0300 ath11k: Fix ath11k_pci_fix_l1ss() All these conditions are reversed so presumably most of the function is dead code. This caused a spurious warning: [ 95.734922] ath11k_pci 0000:06:00.0: failed to set sysclk: 0 Fixes: 0699940755e9 ("ath11k: pci: fix L1ss clock unstable problem") Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/X9nGDHiTh+Z+asDy@mwanda commit 9b09456258ea2f35fc8a99c4ac4829dcba0ca4be Author: Dan Carpenter Date: Wed Dec 16 11:31:19 2020 +0300 ath11k: Fix error code in ath11k_core_suspend() The "if (!ret)" condition is inverted and it should be "if (ret)". It means that we return success when we had intended to return an error code. This also caused a spurious warning even when the suspend was successful: [ 297.186612] ath11k_pci 0000:06:00.0: failed to suspend hif: 0 Fixes: d1b0c33850d2 ("ath11k: implement suspend for QCA6390 PCI devices") Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/X9nF17L2/EKOSbn/@mwanda commit aa44b2f3ecd41f90b7e477158036648a49d21a32 Author: Carl Huang Date: Fri Dec 11 00:13:58 2020 -0500 ath11k: start vdev if a bss peer is already created For QCA6390, bss peer must be created before vdev is to start. This change is to start vdev if a bss peer is created. Otherwise, ath11k delays to start vdev. This fixes an issue in a case where HT/VHT/HE settings change between authentication and association, e.g., due to the user space request to disable HT. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201211051358.9191-1-cjhuang@codeaurora.org commit 3597010630d0aa96f5778901e691c6068bb86318 Author: Carl Huang Date: Fri Dec 11 00:56:13 2020 -0500 ath11k: fix crash caused by NULL rx_channel During connect and disconnect stress test, crashed happened because ar->rx_channel is NULL. Fix it by checking whether ar->rx_channel is NULL. Crash stack is as below: RIP: 0010:ath11k_dp_rx_h_ppdu+0x110/0x230 [ath11k] [ 5028.808963] ath11k_dp_rx_wbm_err+0x14a/0x360 [ath11k] [ 5028.808970] ath11k_dp_rx_process_wbm_err+0x41c/0x520 [ath11k] [ 5028.808978] ath11k_dp_service_srng+0x25e/0x2d0 [ath11k] [ 5028.808982] ath11k_pci_ext_grp_napi_poll+0x23/0x80 [ath11k_pci] [ 5028.808986] net_rx_action+0x27e/0x400 [ 5028.808990] __do_softirq+0xfd/0x2bb [ 5028.808993] irq_exit+0xa6/0xb0 [ 5028.808995] do_IRQ+0x56/0xe0 [ 5028.808997] common_interrupt+0xf/0xf Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201211055613.9310-1-cjhuang@codeaurora.org commit 292bff9480c8d52fc58028979c4162abd83f1aec Author: Colin Ian King Date: Mon Dec 14 23:24:17 2020 +0000 ath11k: add missing null check on allocated skb Currently the null check on a newly allocated skb is missing and this can lead to a null pointer dereference is the allocation fails. Fix this by adding a null check and returning -ENOMEM. Addresses-Coverity: ("Dereference null return") Fixes: 43ed15e1ee01 ("ath11k: put hw to DBS using WMI_PDEV_SET_HW_MODE_CMDID") Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201214232417.84556-1-colin.king@canonical.com commit c21172b3a73e8daf016eec52af229bb7b9c76cc8 Author: Enrico Weigelt, metux IT consult Date: Tue Nov 17 16:22:13 2020 +0100 watchdog: iTCO_wdt: use dev_*() instead of pr_*() for logging For device log outputs, it's better to have device name / ID prefixed in all messages, so use the proper dev_*() functions here. Explicit message on module load/unload don't seem to be really helpful (we have other means to check which modules have been loaded), instead just add noise to the kernel log. So, removing them. Signed-off-by: Enrico Weigelt, metux IT consult Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20201117152214.32244-2-info@metux.net Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit e629fffcc333efbda6b7f8cdcf77238533ddf442 Author: Johan Jonker Date: Mon Nov 16 15:25:39 2020 +0100 dt-binding: watchdog: add Rockchip compatibles to snps,dw-wdt.yaml The Rockchip watchdog compatibles below are already in use, but somehow never added to a document, so add them to the snps,dw-wdt.yaml file. "rockchip,rk3066-wdt", "snps,dw-wdt" "rockchip,rk3188-wdt", "snps,dw-wdt" "rockchip,rk3288-wdt", "snps,dw-wdt" "rockchip,rk3368-wdt", "snps,dw-wdt" make ARCH=arm dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/watchdog/snps,dw-wdt.yaml make ARCH=arm64 dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/watchdog/snps,dw-wdt.yaml Signed-off-by: Johan Jonker Reviewed-by: Rob Herring Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20201116142539.12377-1-jbx6244@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 36c47df85ee8e1f8a35366ac11324f8875de00eb Author: Arnd Bergmann Date: Thu Dec 3 23:33:42 2020 +0100 watchdog: coh901327: add COMMON_CLK dependency clang produces a build failure in configurations without COMMON_CLK when a timeout calculation goes wrong: arm-linux-gnueabi-ld: drivers/watchdog/coh901327_wdt.o: in function `coh901327_enable': coh901327_wdt.c:(.text+0x50): undefined reference to `__bad_udelay' Add a Kconfig dependency to only do build testing when COMMON_CLK is enabled. Fixes: da2a68b3eb47 ("watchdog: Enable COMPILE_TEST where possible") Signed-off-by: Arnd Bergmann Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20201203223358.1269372-1-arnd@kernel.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 8cbd82d62f45423bc337abfcfd51da83fbe60277 Author: Yangtao Li Date: Fri Dec 11 01:19:29 2020 +0000 dt-bindings: watchdog: sun4i: Add A100 compatible Add a binding for A100's watchdog controller. Signed-off-by: Yangtao Li Acked-by: Rob Herring Signed-off-by: Andre Przywara Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20201211011934.6171-17-andre.przywara@arm.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 7948fab26bcc468aa2a76462f441291b5fb0d5c7 Author: Manivannan Sadhasivam Date: Mon Dec 7 11:30:05 2020 +0530 watchdog: qcom: Avoid context switch in restart handler The use of msleep() in the restart handler will cause scheduler to induce a context switch which is not desirable. This generates below warning on SDX55 when WDT is the only available restart source: [ 39.800188] reboot: Restarting system [ 39.804115] ------------[ cut here ]------------ [ 39.807855] WARNING: CPU: 0 PID: 678 at kernel/rcu/tree_plugin.h:297 rcu_note_context_switch+0x190/0x764 [ 39.812538] Modules linked in: [ 39.821954] CPU: 0 PID: 678 Comm: reboot Not tainted 5.10.0-rc1-00063-g33a9990d1d66-dirty #47 [ 39.824854] Hardware name: Generic DT based system [ 39.833470] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 39.838154] [] (show_stack) from [] (dump_stack+0x8c/0xa0) [ 39.846049] [] (dump_stack) from [] (__warn+0xd8/0xf0) [ 39.853058] [] (__warn) from [] (warn_slowpath_fmt+0x64/0xc8) [ 39.859925] [] (warn_slowpath_fmt) from [] (rcu_note_context_switch+0x190/0x764) [ 39.867503] [] (rcu_note_context_switch) from [] (__schedule+0x84/0x640) [ 39.876685] [] (__schedule) from [] (schedule+0x58/0x10c) [ 39.885095] [] (schedule) from [] (schedule_timeout+0x1e8/0x3d4) [ 39.892135] [] (schedule_timeout) from [] (msleep+0x2c/0x38) [ 39.899947] [] (msleep) from [] (qcom_wdt_restart+0xc4/0xcc) [ 39.907319] [] (qcom_wdt_restart) from [] (watchdog_restart_notifier+0x18/0x28) [ 39.914715] [] (watchdog_restart_notifier) from [] (atomic_notifier_call_chain+0x60/0x84) [ 39.923487] [] (atomic_notifier_call_chain) from [] (machine_restart+0x78/0x7c) [ 39.933551] [] (machine_restart) from [] (__do_sys_reboot+0xdc/0x1e0) [ 39.942397] [] (__do_sys_reboot) from [] (ret_fast_syscall+0x0/0x54) [ 39.950721] Exception stack(0xc3e0bfa8 to 0xc3e0bff0) [ 39.958855] bfa0: 0001221c bed2fe24 fee1dead 28121969 01234567 00000000 [ 39.963832] bfc0: 0001221c bed2fe24 00000003 00000058 000225e0 00000000 00000000 00000000 [ 39.971985] bfe0: b6e62560 bed2fc84 00010fd8 b6e62580 [ 39.980124] ---[ end trace 3f578288bad866e4 ]--- Hence, replace msleep() with mdelay() to fix this issue. Fixes: 05e487d905ab ("watchdog: qcom: register a restart notifier") Signed-off-by: Manivannan Sadhasivam Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20201207060005.21293-1-manivannan.sadhasivam@linaro.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit afee4410bc6c50e1422c5a45d633ad0e478ea960 Author: Steve French Date: Tue Dec 15 15:17:43 2020 -0600 cifs: update internal module version number To 2.30 Signed-off-by: Steve French commit 2d0604934f507b8b4799f3c1dff41cca3dd85239 Author: Steve French Date: Wed Dec 16 18:04:27 2020 -0600 cifs: Fix support for remount when not changing rsize/wsize When remounting with the new mount API, we need to set rsize and wsize to the previous values if they are not passed in on the remount. Otherwise they get set to zero which breaks xfstest 452 for example. Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg Reviewed-by: Shyam Prasad N commit 81e7eb5bf08f36d34495a5898f6ef3fec05d9776 Author: Martin K. Petersen Date: Wed Dec 16 22:43:44 2020 -0500 Revert "Revert "scsi: megaraid_sas: Added support for shared host tagset for cpuhotplug"" This reverts commit 1a0e1943d8798cb3241fb5edb9a836af1611b60a. Commit b3c6a5997541 ("block: Fix a lockdep complaint triggered by request queue flushing") has been reverted and commit fb01a2932e81 has been introduced in its place. Consequently, it is now safe to reinstate the megaraid_sas tagset changes that led to boot problems in 5.10. Signed-off-by: Martin K. Petersen commit c1bea0a840ac75dca19bc6aa05575a33eb9fd058 Author: Michael Ellerman Date: Tue Dec 15 12:57:20 2020 +1100 powerpc/32s: Fix cleanup_cpu_mmu_context() compile bug Currently pmac32_defconfig with SMP=y doesn't build: arch/powerpc/platforms/powermac/smp.c: error: implicit declaration of function 'cleanup_cpu_mmu_context' It would be nice for consistency if all platforms clear mm_cpumask and flush TLBs on unplug, but the TLB invalidation bug described in commit 01b0f0eae081 ("powerpc/64s: Trim offlined CPUs from mm_cpumasks") only applies to 64s and for now we only have the TLB flush code for that platform. So just add an empty version for 32-bit Book3S. Fixes: 01b0f0eae081 ("powerpc/64s: Trim offlined CPUs from mm_cpumasks") Reported-by: Geert Uytterhoeven Signed-off-by: Nicholas Piggin [mpe: Change log based on comments from Nick] Signed-off-by: Michael Ellerman commit accefff5b547a9a1d959c7e76ad539bf2480e78b Merge: 48c1c40ab40cb 7fbee7e3386cb Author: Linus Torvalds Date: Wed Dec 16 16:53:54 2020 -0800 Merge tag 'arm-soc-omap-genpd-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC OMAP GenPD updates from Arnd Bergmann: "These are additional updates for the power domain support on OMAP, moving to an implementation based on device tree information instead of SoC specific code. This is the latest step in the ongoing process for moving code out of arch/arm/mach-omap2. I kept this separate from the other driver changes since it touches code in multiple areas" * tag 'arm-soc-omap-genpd-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (51 commits) ARM: OMAP2+: Fix am4 only build after genpd changes ARM: dts: Configure power domain for omap5 dss ARM: dts: omap5: add remaining PRM instances soc: ti: omap-prm: omap5: add genpd support for remaining PRM instances ARM: OMAP2+: Drop legacy platform data for dra7 gpmc ARM: dts: Configure interconnect target module for dra7 iva ARM: dts: dra7: add remaining PRM instances soc: ti: omap-prm: dra7: add genpd support for remaining PRM instances clk: ti: dra7: Drop idlest polling from IVA clkctrl clocks ARM: OMAP2+: Drop legacy platform data for omap4 gpmc ARM: OMAP2+: Drop legacy platform data for omap4 iva ARM: dts: Configure power domain for omap4 dsp ARM: dts: Configure power domain for omap4 dss ARM: dts: omap4: add remaining PRM instances soc: ti: omap-prm: omap4: add genpd support for remaining PRM instances clk: ti: omap4: Drop idlest polling from IVA clkctrl clocks ARM: OMAP2+: Drop legacy remaining legacy platform data for am4 ARM: dts: Use simple-pm-bus for genpd for am4 l3 ARM: dts: Move am4 l3 noc to a separate node ARM: dts: Use simple-pm-bus for genpd for am4 l4_per ... commit 4c46764733c85b82c07e9559b39da4d00a7dd659 Author: Zhang Qilong Date: Sat Dec 5 19:50:56 2020 +0800 libnvdimm/label: Return -ENXIO for no slot in __blk_label_update Forget to set error code when nd_label_alloc_slot failed, and we add it to avoid overwritten error code. Fixes: 0ba1c634892b ("libnvdimm: write blk label set") Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20201205115056.2076523-1-zhangqilong3@huawei.com Signed-off-by: Dan Williams commit 48c1c40ab40cb087b992e7b77518c3a2926743cc Merge: 9805529ec544e 1dcdee6ee8f8f Author: Linus Torvalds Date: Wed Dec 16 16:38:41 2020 -0800 Merge tag 'arm-soc-drivers-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC driver updates from Arnd Bergmann: "There are a couple of subsystems maintained by other people that merge their drivers through the SoC tree, those changes include: - The SCMI firmware framework gains support for sensor notifications and for controlling voltage domains. - A large update for the Tegra memory controller driver, integrating it better with the interconnect framework - The memory controller subsystem gains support for Mediatek MT8192 - The reset controller framework gains support for sharing pulsed resets For Soc specific drivers in drivers/soc, the main changes are - The Allwinner/sunxi MBUS gets a rework for the way it handles dma_map_ops and offsets between physical and dma address spaces. - An errata fix plus some cleanups for Freescale Layerscape SoCs - A cleanup for renesas drivers regarding MMIO accesses. - New SoC specific drivers for Mediatek MT8192 and MT8183 power domains - New SoC specific drivers for Aspeed AST2600 LPC bus control and SoC identification. - Core Power Domain support for Qualcomm MSM8916, MSM8939, SDM660 and SDX55. - A rework of the TI AM33xx 'genpd' power domain support to use information from DT instead of platform data - Support for TI AM64x SoCs - Allow building some Amlogic drivers as modules instead of built-in Finally, there are numerous cleanups and smaller bug fixes for Mediatek, Tegra, Samsung, Qualcomm, TI OMAP, Amlogic, Rockchips, Renesas, and Xilinx SoCs" * tag 'arm-soc-drivers-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (222 commits) soc: mediatek: mmsys: Specify HAS_IOMEM dependency for MTK_MMSYS firmware: xilinx: Properly align function parameter firmware: xilinx: Add a blank line after function declaration firmware: xilinx: Remove additional newline firmware: xilinx: Fix kernel-doc warnings firmware: xlnx-zynqmp: fix compilation warning soc: xilinx: vcu: add missing register NUM_CORE soc: xilinx: vcu: use vcu-settings syscon registers dt-bindings: soc: xlnx: extract xlnx, vcu-settings to separate binding soc: xilinx: vcu: drop useless success message clk: samsung: mark PM functions as __maybe_unused soc: samsung: exynos-chipid: initialize later - with arch_initcall soc: samsung: exynos-chipid: order list of SoCs by name memory: jz4780_nemc: Fix potential NULL dereference in jz4780_nemc_probe() memory: ti-emif-sram: only build for ARMv7 memory: tegra30: Support interconnect framework memory: tegra20: Support hardware versioning and clean up OPP table initialization dt-bindings: memory: tegra20-emc: Document opp-supported-hw property soc: rockchip: io-domain: Fix error return code in rockchip_iodomain_probe() reset-controller: ti: force the write operation when assert or deassert ... commit 9805529ec544ea7a82d891d5239a8ebd3dbb2a3e Merge: b0a6cd29e00a3 13719d8d0d679 Author: Linus Torvalds Date: Wed Dec 16 16:27:35 2020 -0800 Merge tag 'arm-soc-dt-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM device tree updates from Arnd Bergmann: "Across all platforms, there is a continued move towards DT schema for validating the dts files. As a result there are bug fixes for mistakes that are found using these schema, in addition to warnings from the dtc compiler. As usual, many changes are for adding support for additional on-chip and on-board components in the machines we already support. The newly supported SoCs for this release are: - MStar Infinity2M, a low-end IP camera chip based on a dual-core Cortex-A7, otherwise similar to the Infinity chip we already support. This is also known as the SigmaStar SSD202D, and we add support for the Honestar ssd201htv2 development kit. - Nuvoton NPCM730, a Cortex-A9 based Baseboard Management Controller (BMC), in the same family as the NPCM750. This gets used in the Ampere Altra based "Fii Kudo" server and the Quanta GSJ, both of which are added as well. - Broadcom BCM4908, a 64-bit home router chip based on Broadcom's own Brahma-B53 CPU. Support is also added for the Asus ROG Rapture GT-AC5300 high-end WiFi router based on this chip. - Mediatek MT8192 is a new SoC based on eight Cortex-A76/A55 cores, meant for faster Chromebooks and tablets. It gets added along with its reference design. - Mediatek MT6779 (Helio P90) is a high-end phone chip from last year's generation, also added along with its reference board. This one is still based on Cortex-A75/A55. - Mediatek MT8167 is a version of the already supported MT8516 chip, both based on Cortex-A35. It gets added along with the "Pumpkin" single board computer, but is likely to also make its way into low-end tablets in the future. For the already supported chips, there are a number of new boards. Interestingly there are more 32-bit machines added this time than 64-bit. Here is a brief list of the new boards: - Three new Mikrotik router variants based on Marvell Prestera 98DX3236, a close relative of the more common Armada XP - A reference board for the Marvell Armada 382 - Three new servers using ASpeed baseboard management controllers, the actual machines being from Bytedance, Facebook and IBM, and one machine using the Nuvoton NPCM750 BMC. - The Galaxy Note 10.1 (P4) tablet, using an Exynos 4412. - The usual set of 32-bit i.MX industrial/embedded hardware: * Protonic WD3 (tractor e-cockpit) * Kamstrup OMNIA Flex Concentrator (smart grid platform) * Van der Laan LANMCU (food storage) * Altesco I6P (vehicle inspection stations) * PHYTEC phyBOARD-Segin/phyCORE-i.MX6UL baseboard - DH electronics STM32MP157C DHCOM, a PicoITX carrier board for the aleady supported DHCOM module - Three new Allwinner SoC based single-board computers: * NanoPi R1 (H3 based) * FriendlyArm ZeroPi (H3 based) * Elimo Initium SBC (S3 based) - Ouya Game Console based on Nvidia Tegra 3 - Version 5 of the already supported Zynq Z-Turn MYIR Board - LX2162AQDS, a reference platform for NXP Layerscape LX2162A, which is a repackaged 16-core LX2160A - A series of Kontron i.MX8M Mini baseboard/SoM versions - Espressobin Ultra, a new variant of the popular Armada 3700 based board, - IEI Puzzle-M801, a rackmount network appliance based on Marvell Armada 8040 - Microsoft Lumia 950 XL, a phone - HDK855 and HDK865 Hardware development kits for Qualcomm sm8250 and sm8150, respectively - Three new board variants of the "Trogdor" Chromebook (sc7180) - New board variants of the Renesas based "Kingfisher" and "HiHope" reference boards - Kobol Helios64, an open source NAS appliance based on Rockchips RK3399 - Engicam PX30.Core, a SoM based on Rockchip PX30, along with a few carrier boards" * tag 'arm-soc-dt-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (679 commits) arm64: dts: sparx5: Add SGPIO devices arm64: dts: sparx5: Add reset support dt-bindings: gpio: Add a binding header for the MSC313 GPIO driver ARM: mstar: SMP support ARM: mstar: Wire up smpctrl for SSD201/SSD202D ARM: mstar: Add smp ctrl registers to infinity2m dtsi ARM: mstar: Add dts for Honestar ssd201htv2 ARM: mstar: Add chip level dtsi for SSD202D ARM: mstar: Add common dtsi for SSD201/SSD202D ARM: mstar: Add infinity2m support dt-bindings: mstar: Add Honestar SSD201_HT_V2 to mstar boards dt-bindings: vendor-prefixes: Add honestar vendor prefix dt-bindings: mstar: Add binding details for mstar,smpctrl ARM: mstar: Fill in GPIO controller properties for infinity ARM: mstar: Add gpio controller to MStar base dtsi ARM: zynq: Fix incorrect reference to XM013 instead of XM011 ARM: zynq: Convert at25 binding to new description on zc770-xm013 ARM: zynq: Fix OCM mapping to be aligned with binding on zc702 ARM: zynq: Fix leds subnode name for zc702/zybo-z7 ARM: zynq: Rename bus to be align with simple-bus yaml ... commit b0a6cd29e00a317d7fd823e0db57abbbd9bbb610 Merge: b06db0b393695 acf689134a66c Author: Linus Torvalds Date: Wed Dec 16 16:25:03 2020 -0800 Merge tag 'arm-soc-defconfig-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC defconfig updates from Arnd Bergmann: "These are the usual defconfig updates, adding support for additional modules and updating some files according to changes in Kconfig. I also include the removal of CONFIG_BACKLIGHT_GENERIC across multiple architectures, after the driver was removed" * tag 'arm-soc-defconfig-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (41 commits) powerpc/configs: drop unused BACKLIGHT_GENERIC option parisc: configs: drop unused BACKLIGHT_GENERIC option arm64: defconfig: drop unused BACKLIGHT_GENERIC option ARM: configs: drop unused BACKLIGHT_GENERIC option arm64: defconfig: Enable more Librem 5 hardware arm64: defconfig: Enable RTC_DRV_HYM8563 arm64: defconfig: Enable USB_SERIAL_CP210X arm64: defconfig: Enable PHY_ROCKCHIP_INNO_DSIDPHY arm64: defconfig: Enable ROCKCHIP_LVDS arm64: defconfig: Enable ARM SCMI protocol and drivers ARM: multi_v7_defconfig: Enable ARM SCMI protocol and drivers ARM: multi_v7_defconfig: enable STM32 dfsdm audio support ARM: multi_v7_defconfig: enable STM32 spdifrx support ARM: multi_v7_defconfig: enable STUSB160X Type-C port controller support ARM: multi_v7_defconfig: add STM32 crypto support ARM: multi_v7_defconfig: enable counter subsystem and stm32 counter drivers ARM: multi_v7_defconfig: make Samsung Exynos EHCI driver a module arm64: defconfig: Enable Qualcomm PON driver ARM: omap2plus_defconfig: Enable TI eQEP counter driver ARM: multi_v7_defconfig: ti: Enable networking options for nfs boot ... commit b06db0b3936956352a6ff693ea589bd4671c071d Merge: 0c71cc04eb180 dcb11100cd5d3 Author: Linus Torvalds Date: Wed Dec 16 16:22:36 2020 -0800 Merge tag 'arm-soc-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC updates from Arnd Bergmann: "These are updates for SoC specific code, mostly in the 32-bit architecture: - A rework for handling MMIO accesses in Renesas SoCs in a more portable way - Updates to SoC version detection in NXP i.MX SoCs. - Smaller bug fixes for OMAP, Samsung, Marvell, Amlogic" * tag 'arm-soc-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (24 commits) arm64: Kconfig: meson: drop pinctrl ARM: mxs: Add serial number support for i.MX23, i.MX28 SoCs MAINTAINERS: switch mvebu tree to kernel.org MAINTAINERS: Add an entry for MikroTik CRS3xx 98DX3236 boards ARM: shmobile: Stop using __raw_*() I/O accessors ARM: shmobile: sh73a0: Remove obsolete static mapping ARM: shmobile: sh73a0: Use ioremap() to map SMP registers ARM: shmobile: sh73a0: Use ioremap() to map L2C registers ARM: shmobile: r8a7779: Remove obsolete static mappings ARM: shmobile: r8a7779: Use ioremap() to map SMP registers ARM: shmobile: r8a7779: Use ioremap() to map INTC2 registers ARM: shmobile: r8a7778: Introduce HPBREG_BASE ARM: OMAP1: clock: Use IS_ERR_OR_NULL() to clean code ARM: OMAP2+: Remove redundant null check before clk_prepare_enable/clk_disable_unprepare ARM: OMAP2+: Remove redundant assignment to variable ret ARM: OMAP2+: Fix kfree NULL pointer in omap2xxx_clkt_vps_init ARM: OMAP2+: Fix memleak in omap2xxx_clkt_vps_init ARM: exynos: extend cpuidle support to P4 Note boards ARM: imx: mach-imx6q: correctly identify i.MX6QP SoCs ARM: imx: imx7ulp: Add a comment explaining the B2 silicon version ... commit 3ae32c07815a24ae12de2e7838d9d429ba31e5e0 Author: Geliang Tang Date: Tue Dec 15 17:56:51 2020 +0800 mptcp: clear use_ack and use_map when dropping other suboptions This patch cleared use_ack and use_map when dropping other suboptions to fix the following syzkaller BUG: [ 15.223006] BUG: unable to handle page fault for address: 0000000000223b10 [ 15.223700] #PF: supervisor read access in kernel mode [ 15.224209] #PF: error_code(0x0000) - not-present page [ 15.224724] PGD b8d5067 P4D b8d5067 PUD c0a5067 PMD 0 [ 15.225237] Oops: 0000 [#1] SMP [ 15.225556] CPU: 0 PID: 7747 Comm: syz-executor Not tainted 5.10.0-rc6+ #24 [ 15.226281] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014 [ 15.227292] RIP: 0010:skb_release_data+0x89/0x1e0 [ 15.227816] Code: 5b 5d 41 5c 41 5d 41 5e 41 5f e9 02 06 8a ff e8 fd 05 8a ff 45 31 ed 80 7d 02 00 4c 8d 65 30 74 55 e8 eb 05 8a ff 49 8b 1c 24 <4c> 8b 7b 08 41 f6 c7 01 0f 85 18 01 00 00 e8 d4 05 8a ff 8b 43 34 [ 15.229669] RSP: 0018:ffffc900019c7c08 EFLAGS: 00010293 [ 15.230188] RAX: ffff88800daad900 RBX: 0000000000223b08 RCX: 0000000000000006 [ 15.230895] RDX: 0000000000000000 RSI: ffffffff818e06c5 RDI: ffff88807f6dc700 [ 15.231593] RBP: ffff88807f71a4c0 R08: 0000000000000001 R09: 0000000000000001 [ 15.232299] R10: ffffc900019c7c18 R11: 0000000000000000 R12: ffff88807f71a4f0 [ 15.233007] R13: 0000000000000000 R14: ffff88807f6dc700 R15: 0000000000000002 [ 15.233714] FS: 00007f65d9b5f700(0000) GS:ffff88807c400000(0000) knlGS:0000000000000000 [ 15.234509] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 15.235081] CR2: 0000000000223b10 CR3: 000000000b883000 CR4: 00000000000006f0 [ 15.235788] Call Trace: [ 15.236042] skb_release_all+0x28/0x30 [ 15.236419] __kfree_skb+0x11/0x20 [ 15.236768] tcp_data_queue+0x270/0x1240 [ 15.237161] ? tcp_urg+0x50/0x2a0 [ 15.237496] tcp_rcv_established+0x39a/0x890 [ 15.237997] ? mark_held_locks+0x49/0x70 [ 15.238467] tcp_v4_do_rcv+0xb9/0x270 [ 15.238915] __release_sock+0x8a/0x160 [ 15.239365] release_sock+0x32/0xd0 [ 15.239793] __inet_stream_connect+0x1d2/0x400 [ 15.240313] ? do_wait_intr_irq+0x80/0x80 [ 15.240791] inet_stream_connect+0x36/0x50 [ 15.241275] mptcp_stream_connect+0x69/0x1b0 [ 15.241787] __sys_connect+0x122/0x140 [ 15.242236] ? syscall_enter_from_user_mode+0x17/0x50 [ 15.242836] ? lockdep_hardirqs_on_prepare+0xd4/0x170 [ 15.243436] __x64_sys_connect+0x1a/0x20 [ 15.243924] do_syscall_64+0x33/0x40 [ 15.244313] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 15.244821] RIP: 0033:0x7f65d946e469 [ 15.245183] Code: 00 f3 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d ff 49 2b 00 f7 d8 64 89 01 48 [ 15.247019] RSP: 002b:00007f65d9b5eda8 EFLAGS: 00000246 ORIG_RAX: 000000000000002a [ 15.247770] RAX: ffffffffffffffda RBX: 000000000049bf00 RCX: 00007f65d946e469 [ 15.248471] RDX: 0000000000000010 RSI: 00000000200000c0 RDI: 0000000000000005 [ 15.249205] RBP: 000000000049bf00 R08: 0000000000000000 R09: 0000000000000000 [ 15.249908] R10: 0000000000000000 R11: 0000000000000246 R12: 000000000049bf0c [ 15.250603] R13: 00007fffe8a25cef R14: 00007f65d9b3f000 R15: 0000000000000003 [ 15.251312] Modules linked in: [ 15.251626] CR2: 0000000000223b10 [ 15.251965] BUG: kernel NULL pointer dereference, address: 0000000000000048 [ 15.252005] ---[ end trace f5c51fe19123c773 ]--- [ 15.252822] #PF: supervisor read access in kernel mode [ 15.252823] #PF: error_code(0x0000) - not-present page [ 15.252825] PGD c6c6067 P4D c6c6067 PUD c0d8067 [ 15.253294] RIP: 0010:skb_release_data+0x89/0x1e0 [ 15.253910] PMD 0 [ 15.253914] Oops: 0000 [#2] SMP [ 15.253917] CPU: 1 PID: 7746 Comm: syz-executor Tainted: G D 5.10.0-rc6+ #24 [ 15.253920] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014 [ 15.254435] Code: 5b 5d 41 5c 41 5d 41 5e 41 5f e9 02 06 8a ff e8 fd 05 8a ff 45 31 ed 80 7d 02 00 4c 8d 65 30 74 55 e8 eb 05 8a ff 49 8b 1c 24 <4c> 8b 7b 08 41 f6 c7 01 0f 85 18 01 00 00 e8 d4 05 8a ff 8b 43 34 [ 15.254899] RIP: 0010:skb_release_data+0x89/0x1e0 [ 15.254902] Code: 5b 5d 41 5c 41 5d 41 5e 41 5f e9 02 06 8a ff e8 fd 05 8a ff 45 31 ed 80 7d 02 00 4c 8d 65 30 74 55 e8 eb 05 8a ff 49 8b 1c 24 <4c> 8b 7b 08 41 f6 c7 01 0f 85 18 01 00 00 e8 d4 05 8a ff 8b 43 34 [ 15.254905] RSP: 0018:ffffc900019bfc08 EFLAGS: 00010293 [ 15.255376] RSP: 0018:ffffc900019c7c08 EFLAGS: 00010293 [ 15.255580] [ 15.255583] RAX: ffff888004a7ac80 RBX: 0000000000000040 RCX: 0000000000000000 [ 15.255912] [ 15.256724] RDX: 0000000000000000 RSI: ffffffff818e06c5 RDI: ffff88807f6ddd00 [ 15.257620] RAX: ffff88800daad900 RBX: 0000000000223b08 RCX: 0000000000000006 [ 15.259817] RBP: ffff88800e9006c0 R08: 0000000000000000 R09: 0000000000000000 [ 15.259818] R10: 0000000000000000 R11: 0000000000000000 R12: ffff88800e9006f0 [ 15.259820] R13: 0000000000000000 R14: ffff88807f6ddd00 R15: 0000000000000002 [ 15.259822] FS: 00007fae4a60a700(0000) GS:ffff88807c500000(0000) knlGS:0000000000000000 [ 15.259826] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 15.260296] RDX: 0000000000000000 RSI: ffffffff818e06c5 RDI: ffff88807f6dc700 [ 15.262514] CR2: 0000000000000048 CR3: 000000000b89c000 CR4: 00000000000006e0 [ 15.262515] Call Trace: [ 15.262519] skb_release_all+0x28/0x30 [ 15.262523] __kfree_skb+0x11/0x20 [ 15.263054] RBP: ffff88807f71a4c0 R08: 0000000000000001 R09: 0000000000000001 [ 15.263680] tcp_data_queue+0x270/0x1240 [ 15.263843] R10: ffffc900019c7c18 R11: 0000000000000000 R12: ffff88807f71a4f0 [ 15.264693] ? tcp_urg+0x50/0x2a0 [ 15.264856] R13: 0000000000000000 R14: ffff88807f6dc700 R15: 0000000000000002 [ 15.265720] tcp_rcv_established+0x39a/0x890 [ 15.266438] FS: 00007f65d9b5f700(0000) GS:ffff88807c400000(0000) knlGS:0000000000000000 [ 15.267283] ? __schedule+0x3fa/0x880 [ 15.267287] tcp_v4_do_rcv+0xb9/0x270 [ 15.267290] __release_sock+0x8a/0x160 [ 15.268049] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 15.268788] release_sock+0x32/0xd0 [ 15.268791] __inet_stream_connect+0x1d2/0x400 [ 15.268795] ? do_wait_intr_irq+0x80/0x80 [ 15.269593] CR2: 0000000000223b10 CR3: 000000000b883000 CR4: 00000000000006f0 [ 15.270246] inet_stream_connect+0x36/0x50 [ 15.270250] mptcp_stream_connect+0x69/0x1b0 [ 15.270253] __sys_connect+0x122/0x140 [ 15.271097] Kernel panic - not syncing: Fatal exception [ 15.271820] ? syscall_enter_from_user_mode+0x17/0x50 [ 15.283542] ? lockdep_hardirqs_on_prepare+0xd4/0x170 [ 15.284275] __x64_sys_connect+0x1a/0x20 [ 15.284853] do_syscall_64+0x33/0x40 [ 15.285369] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 15.286105] RIP: 0033:0x7fae49f19469 [ 15.286638] Code: 00 f3 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d ff 49 2b 00 f7 d8 64 89 01 48 [ 15.289295] RSP: 002b:00007fae4a609da8 EFLAGS: 00000246 ORIG_RAX: 000000000000002a [ 15.290375] RAX: ffffffffffffffda RBX: 000000000049bf00 RCX: 00007fae49f19469 [ 15.291403] RDX: 0000000000000010 RSI: 00000000200000c0 RDI: 0000000000000005 [ 15.292437] RBP: 000000000049bf00 R08: 0000000000000000 R09: 0000000000000000 [ 15.293456] R10: 0000000000000000 R11: 0000000000000246 R12: 000000000049bf0c [ 15.294473] R13: 00007fff0004b6bf R14: 00007fae4a5ea000 R15: 0000000000000003 [ 15.295492] Modules linked in: [ 15.295944] CR2: 0000000000000048 [ 15.296567] Kernel Offset: disabled [ 15.296941] ---[ end Kernel panic - not syncing: Fatal exception ]--- Reported-by: Christoph Paasch Fixes: 84dfe3677a6f (mptcp: send out dedicated ADD_ADDR packet) Signed-off-by: Geliang Tang Reviewed-by: Mat Martineau Link: https://lore.kernel.org/r/ccca4e8f01457a1b495c5d612ed16c5f7a585706.1608010058.git.geliangtang@gmail.com Signed-off-by: Jakub Kicinski commit 75f4d4544db9fa34e1f04174f27d9f8a387be37d Author: Tobias Klauser Date: Tue Dec 15 11:25:31 2020 +0100 devlink: use _BITUL() macro instead of BIT() in the UAPI header The BIT() macro is not available for the UAPI headers. Moreover, it can be defined differently in user space headers. Thus, replace its usage with the _BITUL() macro which is already used in other macro definitions in . Fixes: dc64cc7c6310 ("devlink: Add devlink reload limit option") Signed-off-by: Tobias Klauser Link: https://lore.kernel.org/r/20201215102531.16958-1-tklauser@distanz.ch Signed-off-by: Jakub Kicinski commit e82226138b20d4f638426413e83c6b5db532c6a2 Author: Dave Chinner Date: Wed Dec 16 16:07:34 2020 -0800 xfs: remove xfs_buf_t typedef Prepare for kernel xfs_buf alignment by getting rid of the xfs_buf_t typedef from userspace. [darrick: This patch is a port of a userspace patch removing the xfs_buf_t typedef in preparation to make the userspace xfs_buf code behave more like its kernel counterpart.] Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 0c71cc04eb180c4b701cbe821635f2a122926065 Merge: de925e2fbb44e bdfae1c9a9139 Author: Linus Torvalds Date: Wed Dec 16 15:51:15 2020 -0800 Merge tag 'vfio-v5.11-rc1' of git://github.com/awilliam/linux-vfio Pull VFIO updates from Alex Williamson: - Fix uninitialized list walk in error path (Eric Auger) - Use io_remap_pfn_range() (Jason Gunthorpe) - Allow fallback support for NVLink on POWER8 (Alexey Kardashevskiy) - Enable mdev request interrupt with CCW support (Eric Farman) - Enable interface to iommu_domain from vfio_group (Lu Baolu) * tag 'vfio-v5.11-rc1' of git://github.com/awilliam/linux-vfio: vfio/type1: Add vfio_group_iommu_domain() vfio-ccw: Wire in the request callback vfio-mdev: Wire in a request handler for mdev parent vfio/pci/nvlink2: Do not attempt NPU2 setup on POWER8NVL NPU vfio-pci: Use io_remap_pfn_range() for PCI IO memory vfio/pci: Move dummy_resources_list init in vfio_pci_probe() commit de925e2fbb44eed8a2a7ce166b485fed5eae01aa Merge: 62746f92b10a4 85a694738f6e7 Author: Linus Torvalds Date: Wed Dec 16 15:44:44 2020 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID updates from Jiri Kosina: - AMD SFH (Sensor Fusion Hub) support (Sandeep Singh) - increase of maximum HID report size to 16KB in order to support some of the modern devices (Dean Camera) - control interface support for hidraw (Dean Camera) - Sony DS4 power and firmware reporting fixes (Roderick Colenbrander) - support for ghlive PS3/WII U dongles (Pascal Giard) * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: (27 commits) HID: i2c-hid: add Vero K147 to descriptor override HID: ite: Add support for Acer S1002 keyboard-dock HID: sony: support for ghlive ps3/wii u dongles HID: hidraw: Add additional hidraw input/output report ioctls. HID: Increase HID maximum report size to 16KB HID: elecom: drop stray comment HID: mf: add support for 0079:1846 Mayflash/Dragonrise USB Gamecube Adapter HID: elecom: add support for EX-G M-XGL20DLBK wireless mouse HID: elecom: rewrite report based on model specific parameters HID: wacom: Constify attribute_groups HID: input: Fix fall-through warnings for Clang HID: usbhid: Fix fall-through warnings for Clang HID: logitech-hidpp: Add hid_device_id for V470 bluetooth mouse HID: intel-ish-hid: Remove unnecessary assignment to variable rv HID: sony: Workaround for DS4 dongle hotplug kernel crash. HID: sony: Don't use fw_version/hw_version for sysfs cleanup. HID: sony: Report more accurate DS4 power status. SFH: fix error return check for -ERESTARTSYS HID: SFH: Add documentation HID: hid-input: occasionally report stylus battery even if not changed ... commit 62746f92b10a4add6a7db87ff59b901276746b11 Merge: f68e4041ef63f e33dc2f363674 Author: Linus Torvalds Date: Wed Dec 16 15:08:28 2020 -0800 Merge tag 'devicetree-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree updates from Rob Herring: - Add vendor prefixes for bm, gpio-key, mentor, FII, and Ampere - Add ADP5585/ADP5589 and delta,q54sj108a2 to trivial-devices.yaml - Convert fixed-partitions, i2c-gate and fsl,dpaa2-console bindings to schemas - Drop PicoXcell bindings - Drop unused and undocumented 'pnx,timeout' property from LPC32xx - Add 'dynamic-power-coefficient' to Mali GPU bindings - Make 'make dt_binding_check' not error out on warnings - Various minor binding fixes * tag 'devicetree-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (22 commits) dt-bindings: mali-bifrost: Add dynamic-power-coefficient dt-bindings: mali-midgard: Add dynamic-power-coefficient dt-bindings: i2c: dw: cancel mandatory requirements for "#address-cells" and "#size-cells" dt-bindings: Remove PicoXcell bindings ARM: dts: lpc32xx: Remove unused and undocumented 'pnx,timeout' dt-bindings: mtd: convert "fixed-partitions" to the json-schema dt-bindings: vendor-prefixes: Add undocumented bm, gpio-key, and mentor prefixes dt-bindings: pci: rcar-pci-ep: Document missing interrupts property dt-bindings: vendor-prefixes: Add an entry for AmpereComputing.com dt-bindings: vendor-prefixes: correct the spelling of TQ-Systems GmbH dt-bindings: mfd: fix stm32 timers example dt-bindings: trivial-devices: Add delta,q54sj108a2 dt-bindings:i2c:i2c-gate: txt to yaml conversion dt-bindings: add ADP5585/ADP5589 entries to trivial-devices dt-bindings: Correct GV11B GPU register sizes dt-bindings: vendor-prefixes: Add FII dt-bindings: Fix typo on the DesignWare IP reset bindings documentation dt-bindings: Fix error in 'make dtbs_check' when using DT_SCHEMA_FILES dt-bindings: arm: vt8500: remove redundant white-spaces dt-bindings: fsl-imx-drm: fix example compatible string ... commit f68e4041ef63f03091e44b4eebf1ab5c5d427e6f Merge: a701262c02cec 3df09cb8c92e2 Author: Linus Torvalds Date: Wed Dec 16 15:02:49 2020 -0800 Merge tag 'pinctrl-v5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control updates from Linus Walleij: "This is the bulk of pin control changes for the v5.11 kernel. Drivers, drivers and drivers. Not a single core change. Some new stuff, especially a bunch of new Intel, Qualcomm and Ocelot SoCs. As part of the modularization attempt, I applied one patch affecting the firmware subsystem as a functional (not syntactic/semantic) dependency and then it blew up in our face, so I had to revert it, bummer. It will come in later, through that subsystem, I guess. New drivers: - New driver for the Microchip Serial GPIO "SGPIO". - Qualcomm SM8250 LPASS (Low Power Audio Subsystem) GPIO driver. New subdrivers: - Intel Lakefield subdriver. - Intel Elkhart Lake subdriver. - Intel Alder Lake-S subdriver. - Qualcomm MSM8953 subdriver. - Qualcomm SDX55 subdriver. - Qualcomm SDX55 PMIC subdriver. - Ocelot Luton SoC subdriver. - Ocelot Serval SoC subdriver. Modularization: - The Meson driver can now be built as modules. - The Qualcomm driver(s) can now be built as modules. Incremental improvements: - The Intel driver now supports pin configuration for GPIO-related configurations. - A bunch of Renesas PFC drivers have been augmented with support for QSPI pins, groups and functions. - Non-critical fixes to the irq handling in the Allwinner Sunxi driver" * tag 'pinctrl-v5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (80 commits) pinctrl/spear: simplify the return expression of spear300_pinctrl_probe() pinctrl: mediatek: simplify the return expression of mtk_pinconf_bias_disable_set_rev1() dt-bindings: pinctrl: pinctrl-microchip-sgpio: Add irq support pinctrl: pinctrl-microchip-sgpio: Add irq support (for sparx5) pinctrl: qcom: Add sm8250 lpass lpi pinctrl driver dt-bindings: pinctrl: qcom: Add sm8250 lpass lpi pinctrl bindings pinctrl: qcom-pmic-gpio: Add support for pmx55 dt-bindings: pinctrl: qcom-pmic-gpio: Add pmx55 support pinctrl: pinctrl-microchip-sgpio: Mark some symbols with static keyword pinctrl: at91-pio4: Make PINCTRL_AT91PIO4 depend on HAS_IOMEM to fix build error pinctrl: mtk: Fix low level output voltage issue pinctrl: falcon: add missing put_device() call in pinctrl_falcon_probe() pinctrl: actions: pinctrl-s500: Constify s500_padinfo[] pinctrl: pinctrl-microchip-sgpio: Add OF config dependency pinctrl: pinctrl-microchip-sgpio: Add pinctrl driver for Microsemi Serial GPIO dt-bindings: pinctrl: Add bindings for pinctrl-microchip-sgpio driver pinctrl: at91-pio4: add support for fewer lines on last PIO bank pinctrl: sunxi: Always call chained_irq_{enter, exit} in sunxi_pinctrl_irq_handler pinctrl: sunxi: Mark the irq bank not found in sunxi_pinctrl_irq_handler() with WARN_ON pinctrl: sunxi: fix irq bank map for the Allwinner A100 pin controller ... commit 31f6551ad75608d9c71fd4d3548c33f1abc52093 Author: Steve French Date: Wed Dec 16 16:26:35 2020 -0600 cifs: handle "guest" mount parameter With the new mount API it can not handle empty strings for mount parms ("guest" is mapped in userspace mount helper to "user=") so we have to special case it as we do for the password mount parm. Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg commit 7eb000bdbe7c7da811ef51942b356f6e819b13ba Author: Vincent Stehlé Date: Mon Dec 14 23:09:52 2020 +0100 net: korina: fix return value The ndo_start_xmit() method must not attempt to free the skb to transmit when returning NETDEV_TX_BUSY. Therefore, make sure the korina_send_packet() function returns NETDEV_TX_OK when it frees a packet. Fixes: ef11291bcd5f ("Add support the Korina (IDT RC32434) Ethernet MAC") Suggested-by: Jakub Kicinski Signed-off-by: Vincent Stehlé Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20201214220952.19935-1-vincent.stehle@laposte.net Signed-off-by: Jakub Kicinski commit a701262c02cec71dc29b10fe910ba3c2298f5ba3 Merge: 945433be36779 4c9e94dff65ca Author: Linus Torvalds Date: Wed Dec 16 14:58:35 2020 -0800 Merge tag 'mtd/for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux Pull MTD updates from Miquel Raynal: "MTD core: - Fix refcounting for unpartitioned MTDs - Fix misspelled function parameter 'section' - Remove unneeded break - cmdline parser: Fix parsing of part-names with colons - mtdpart: Fix misdocumented function parameter 'mtd' MTD devices: - phram: - Allow the user to set the erase page size - File headers are not good candidates for kernel-doc - physmap-bt1-rom: Fix __iomem addrspace removal warning - plat-ram: correctly free memory on error path in platram_probe() - powernv_flash: Add function names to headers and fix 'dev' - docg3: Fix kernel-doc 'bad line' and 'excessive doc' issues UBI cleanup fixes: - gluebi: Fix misnamed function parameter documentation - wl: Fix a couple of kernel-doc issues - eba: Fix a couple of misdocumentation issues - kapi: Correct documentation for 'ubi_leb_read_sg's 'sgl' parameter - Document 'ubi_num' in struct mtd_dev_param Generic NAND core ECC management: - Add an I/O request tweaking mechanism - Entire rework of the software BCH ECC driver, creation of a real ECC engine, getting rid of raw NAND structures, migration to more generic prototypes, misc fixes and style cleanup. Moved now to the Generic NAND layer. - Entire rework of the software Hamming ECC driver, creation of a real ECC engine, getting rid of raw NAND structures, misc renames, comment updates, cleanup, and style fixes. Moved now to the generic NAND layer. - Necessary plumbing at the NAND level to retrieve generic NAND ECC engines (softwares and on-die). - Update of the bindings. Raw NAND core: - Geting rid of the chip->ecc.priv entry. - Fix miscellaneous typos in kernel-doc Raw NAND controller drivers: - Arasan: Document 'anfc_op's 'buf' member - AU1550: Ensure the presence of the right includes - Brcmnand: Demote non-conformant kernel-doc headers - Cafe: Remove superfluous param doc and add another - Davinci: Do not use extra dereferencing - Diskonchip: Marking unused variables as __always_unused - GPMI: - Fix the driver only sense CS0 R/B issue - Fix the random DMA timeout issue - Use a single line for of_device_id - Use of_device_get_match_data() - Fix reference count leak in gpmi ops - Cleanup makefile - Fix binding matching of clocks on different SoCs - Ingenic: remove redundant get_device() in ingenic_ecc_get() - Intel LGM: New NAND controller driver - Marvell: Drop useless line - Meson: - Fix a resource leak in init - Fix meson_nfc_dma_buffer_release() arguments - mxc: - Use device_get_match_data() - Use a single line for of_device_id - Remove platform data support - Omap: - Fix a bunch of kernel-doc misdemeanours - Finish ELM half populated function header, demote empty ones - s3c2410: Add documentation for 2 missing struct members - Sunxi: Document 'sunxi_nfc's 'caps' member - Qcom: - Add support for SDX55 - Support for IPQ6018 QPIC NAND controller - Fix DMA sync on FLASH_STATUS register read - Rockchip: New NAND controller driver for RK3308, RK2928 and others - Sunxi: Add MDMA support ONENAND: - bbt: Fix expected kernel-doc formatting - Fix some kernel-doc misdemeanours - Fix expected kernel-doc formatting - Use mtd->oops_panic_write as condition SPI-NAND core: - Creation of a SPI-NAND on-die ECC engine - Move ECC related definitions earlier in the driver - Fix typo in comment - Fill a default ECC provider/algorithm - Remove outdated comment - Fix OOB read - Allow the case where there is no ECC engine - Use the external ECC engine logic SPI-NAND chip drivers: - Micron: - Add support for MT29F2G01AAAED - Use more specific names - Macronix: - Add support for MX35LFxG24AD - Add support for MX35LFxGE4AD - Toshiba: Demote non-conformant kernel-doc header SPI-NOR core: - Initial support for stateful Octal DTR mode using volatile settings - Preliminary support for JEDEC 251 (xSPI) and JEDEC 216D standards - Support for Cypress Semper flash - Support to specify ECC block size of SPI NOR flashes - Fixes to avoid clearing of non-volatile Block Protection bits at probe - hisi-sfc: Demote non-conformant kernel-doc" * tag 'mtd/for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: (120 commits) mtd: spinand: macronix: Add support for MX35LFxG24AD mtd: rawnand: rockchip: NFC driver for RK3308, RK2928 and others dt-bindings: mtd: Describe Rockchip RK3xxx NAND flash controller mtd: rawnand: gpmi: Use a single line for of_device_id mtd: rawnand: gpmi: Fix the random DMA timeout issue mtd: rawnand: gpmi: Fix the driver only sense CS0 R/B issue mtd: rawnand: qcom: Add NAND controller support for SDX55 dt-bindings: qcom_nandc: Add SDX55 QPIC NAND documentation mtd: rawnand: mxc: Use a single line for of_device_id mtd: rawnand: mxc: Use device_get_match_data() mtd: rawnand: meson: Fix a resource leak in init mtd: rawnand: gpmi: Use of_device_get_match_data() mtd: rawnand: Add NAND controller support on Intel LGM SoC dt-bindings: mtd: Add Nand Flash Controller support for Intel LGM SoC mtd: spinand: micron: Add support for MT29F2G01AAAED mtd: spinand: micron: Use more specific names mtd: rawnand: gpmi: fix reference count leak in gpmi ops dt-bindings: mtd: gpmi-nand: Fix matching of clocks on different SoCs mtd: spinand: macronix: Add support for MX35LFxGE4AD mtd: plat-ram: correctly free memory on error path in platram_probe() ... commit 945433be3677955255fabecbf1076c17864ff9da Merge: f67d6620e413a 98650b0874171 Author: Linus Torvalds Date: Wed Dec 16 14:56:29 2020 -0800 Merge tag 'leds-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds Pull LED updates from Pavel Machek: "Small cleanups/fixes mostly thanks to Marek, nothing major made it in this time" * tag 'leds-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds: leds: turris-omnia: check for LED_COLOR_ID_RGB instead LED_COLOR_ID_MULTI leds: turris-omnia: fix checkpatch warning leds: turris-omnia: wrap to 80 columns leds: turris-omnia: use constants instead of macros for color command dt-bindings: leds: Convert pwm to yaml leds: lp50xx: Fix an error handling path in 'lp50xx_probe_dt()' leds: netxbig: add missing put_device() call in netxbig_leds_get_of_pdata() Documentation: leds: remove invalidated information commit f67d6620e413a167e861ce5733c1be5a2384e0c4 Merge: 84e010ec8f866 fad0319cacdf0 Author: Linus Torvalds Date: Wed Dec 16 14:54:39 2020 -0800 Merge tag 'for-linus-5.11-1' of git://github.com/cminyard/linux-ipmi Pull IPMI updates from Corey Minyard: "Some very minor changes. Nothing functional, just little syntax cleanups and a RCU warning suppression" * tag 'for-linus-5.11-1' of git://github.com/cminyard/linux-ipmi: char: ipmi: convert comma to semicolon ipmi: msghandler: Suppress suspicious RCU usage warning ipmi/watchdog: replace atomic_add() and atomic_sub() char: ipmi: remove unneeded break commit 84e010ec8f8668c579b78a27b0e81a49ac6c837a Merge: 278f54c46164e 789eb04b6c569 Author: Linus Torvalds Date: Wed Dec 16 14:52:37 2020 -0800 Merge tag 'backlight-next-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight Pull backlight update from Lee Jones: "Careful, it's a big one! - Fix pwm_bl driver interpolation issues by switching to a linear algorithm" * tag 'backlight-next-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: backlight: pwm_bl: Fix interpolation commit 278f54c46164e9859090dde7e4ceede830c6beb6 Merge: fff875a18382f 0cd3aa995740e Author: Linus Torvalds Date: Wed Dec 16 14:48:32 2020 -0800 Merge tag 'mfd-next-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: "New Drivers - Add support for Intel's Platform Monitoring Technology (PMT) New Device Support: - Add support for PM660/PM660L to QCom SPMI PMIC - Add support for lots of new devices to Kontron Core New Functionality: - Provide syscon_regmap_lookup_by_phandle_optional() to SysCon API Fix-ups: - Constify; da9xxx-core; intel_*, tps65xxx, wm8xxx-core, lp8788, stmpe, sun4i-gpadc, 88pm800, hi655x-pmic, ioc3, etc - Remove superfluous code; madera, tps65910 - Use raw APIs (rid abstractions); tps65911-comparator, tps65910 - Whitespace/formatting fix-ups; tps65910 - Device Tree changes/updates; bd71837-pmic, syscon - Use helpers/APIs (no hand rolling); altera-sysmgr - Mark of_match tables as __maybe_unused; twl6030-irq - Fix spelling; si476x-core Bug Fixes: - Reset on resume to ensure known state; madera-core - Correct ordering issues; madera-core, tps65910, kempld-core - Remove erroneous passing of of_compatible strings; at91-usart - Fix potential I2C adaptor leak; htc-i2cpld - Correct errorneous defines; rt5033-private - Resolve Kconfig issues; MFD_SL28CPLD, MFD_OMAP_USB_HOST - Fix dev_err_probe() handling; stmfx - Repair interrupt regression; motorola-cpcap - Allow ACPI matching of DT tables; bcm590xx, da9xx, ene-kb3930, fsl-imx25-tsadc, max77650, mt6397-core, rt5033, stmfx, max77686, sun4i-gpadc, wm8994-core, axp20x-i2c" [ The PMT updates already came in through the x86 platform tree ] * tag 'mfd-next-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (48 commits) mfd: kempld-core: Add support for additional devices mfd: si476x-core.h: Fix "regulator" spelling in comment mfd: twl6030: Mark of_device_id table as maybe unused mfd: axp20x: Skip of_device_id table when !CONFIG_OF mfd: wm8994: Drop of_match_ptr from of_device_id table mfd: sun4i: Drop of_match_ptr from of_device_id table mfd: max77686: Drop of_match_ptr from of_device_id table mfd: stmfx: Drop of_match_ptr from of_device_id table mfd: rt5033: Drop of_match_ptr from of_device_id table mfd: mt6397: Drop of_match_ptr from of_device_id table mfd: max77650: Drop of_match_ptr from of_device_id table mfd: fsl-imx25: Drop of_match_ptr from of_device_id table mfd: ene-kb3930: Drop of_match_ptr from of_device_id table mfd: da9150: Drop of_match_ptr from of_device_id table mfd: da9063: Drop of_match_ptr from of_device_id table mfd: da9062: Drop of_match_ptr from of_device_id table mfd: da9055: Drop of_match_ptr from of_device_id table mfd: bcm590xx: Drop of_match_ptr from of_device_id table mfd: omap-usb: Depend on COMMON_CLK to fix compile tests mfd: kempld-core: Check for DMI definition before ACPI ... commit fff875a18382f1983b4a27be9282e697dbccb3db Merge: 870d16757ba89 5bdba520c1b31 Author: Linus Torvalds Date: Wed Dec 16 14:44:53 2020 -0800 Merge tag 'memblock-v5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock Pull memblock updates from Mike Rapoport: "memblock debug enhancements. Improve tracking of early memory allocations when memblock debug is enabled: - Add memblock_dbg() to memblock_phys_alloc_range() to get details about its usage - Make memblock allocator wrappers actually inline to track their callers in memblock debug messages" * tag 'memblock-v5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock: mm: memblock: drop __init from memblock functions to make it inline mm: memblock: add more debug logs commit efd3043790c6e92f0bbe1fe385db9b544131c59c Merge: 02e66dd564229 6ae09fa49147e Author: Daniel Vetter Date: Wed Dec 16 23:25:51 2020 +0100 Merge tag 'amd-drm-fixes-5.11-2020-12-16' of git://people.freedesktop.org/~agd5f/linux into drm-next amd-drm-fixes-5.11-2020-12-16: amdgpu: - Fix a eDP regression for DCE asics - SMU fixes for sienna cichlid - Misc W=1 fixes - SDMA 5.2 reset fix - Suspend/resume fix - Misc display fixes - Misc runtime PM fixes and cleanups - Dimgrey Cavefish fixes - printk cleanup - Documentation warning fixes amdkfd: - Error logging fix - Fix pipe offset calculation radeon: - printk cleanup Signed-off-by: Daniel Vetter From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20201216192421.18627-1-alexander.deucher@amd.com commit 52104f274e2d7f134d34bab11cada8913d4544e2 Author: Trond Myklebust Date: Wed Dec 16 17:17:45 2020 -0500 NFS/pNFS: Fix a typo in ff_layout_resend_pnfs_read() Don't bump the index twice. Fixes: 563c53e73b8b ("NFS: Fix flexfiles read failover") Signed-off-by: Trond Myklebust commit 9bfffea3524b49d0268d01f8e7967f06c4d0a942 Author: Trond Myklebust Date: Wed Dec 16 14:01:07 2020 -0500 pNFS/flexfiles: Avoid spurious layout returns in ff_layout_choose_ds_for_read The callers of ff_layout_choose_ds_for_read() should decide whether or not they want to return the layout on error. Sometimes, we may just want to retry from the beginning. Signed-off-by: Trond Myklebust commit cac1d3a2b8f7f0817ac4feab76f5d3b12e4b02d7 Author: Trond Myklebust Date: Wed Dec 16 16:31:26 2020 -0500 NFSv4/pnfs: Add tracing for the deviceid cache Add tracepoints to allow debugging of the deviceid cache. Signed-off-by: Trond Myklebust commit 870d16757ba8918c3f8cac162b9ca7669556dbab Author: Mark Rutland Date: Wed Dec 16 21:32:48 2020 +0000 arm64: make _TIF_WORK_MASK bits contiguous We need the bits of _TIF_WORK_MASK to be contiguous in order to to use this as an immediate argument to an AND instruction in entry.S. We happened to change these bits in commits: b5a5a01d8e9a ("arm64: uaccess: remove addr_limit_user_check()") 192caabd4dd9 ("arm64: add support for TIF_NOTIFY_SIGNAL") which each worked in isolation, but the merge resolution in commit: 005b2a9dc819 ("Merge tag 'tif-task_work.arch-2020-12-14' of git://git.kernel.dk/linux-block") happened to make the bits non-contiguous. Fix this by moving TIF_NOTIFY_SIGNAL to be bit 6, which is contiguous with the rest of _TIF_WORK_MASK. Otherwise, we'll get a build-time failure as below: arch/arm64/kernel/entry.S: Assembler messages: arch/arm64/kernel/entry.S:733: Error: immediate out of range at operand 3 -- `and x2,x19,#((1<<1)|(1<<0)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<7))' scripts/Makefile.build:360: recipe for target 'arch/arm64/kernel/entry.o' failed Fixes: 005b2a9dc819a126 ("Merge tag 'tif-task_work.arch-2020-12-14' of git://git.kernel.dk/linux-block") Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Linus Torvalds commit 19778dd504b5ff5c3c1283aa3da7a56f34c2c3b0 Merge: 007c74e16c1aa 5ae9a046a452d Author: Linus Torvalds Date: Wed Dec 16 13:58:47 2020 -0800 Merge tag 'iommu-updates-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull IOMMU updates from Will Deacon: "There's a good mixture of improvements to the core code and driver changes across the board. One thing worth pointing out is that this includes a quirk to work around behaviour in the i915 driver (see 65f746e8285f ("iommu: Add quirk for Intel graphic devices in map_sg")), which otherwise interacts badly with the conversion of the intel IOMMU driver over to the DMA-IOMMU APU but has being fixed properly in the DRM tree. We'll revert the quirk later this cycle once we've confirmed that things don't fall apart without it. Summary: - IOVA allocation optimisations and removal of unused code - Introduction of DOMAIN_ATTR_IO_PGTABLE_CFG for parameterising the page-table of an IOMMU domain - Support for changing the default domain type in sysfs - Optimisation to the way in which identity-mapped regions are created - Driver updates: * Arm SMMU updates, including continued work on Shared Virtual Memory * Tegra SMMU updates, including support for PCI devices * Intel VT-D updates, including conversion to the IOMMU-DMA API - Cleanup, kerneldoc and minor refactoring" * tag 'iommu-updates-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (50 commits) iommu/amd: Add sanity check for interrupt remapping table length macros dma-iommu: remove __iommu_dma_mmap iommu/io-pgtable: Remove tlb_flush_leaf iommu: Stop exporting free_iova_mem() iommu: Stop exporting alloc_iova_mem() iommu: Delete split_and_remove_iova() iommu/io-pgtable-arm: Remove unused 'level' parameter from iopte_type() macro iommu: Defer the early return in arm_(v7s/lpae)_map iommu: Improve the performance for direct_mapping iommu: avoid taking iova_rbtree_lock twice iommu/vt-d: Avoid GFP_ATOMIC where it is not needed iommu/vt-d: Remove set but not used variable iommu: return error code when it can't get group iommu: Fix htmldocs warnings in sysfs-kernel-iommu_groups iommu: arm-smmu-impl: Add a space before open parenthesis iommu: arm-smmu-impl: Use table to list QCOM implementations iommu/arm-smmu: Move non-strict mode to use io_pgtable_domain_attr iommu/arm-smmu: Add support for pagetable config domain attribute iommu: Document usage of "/sys/kernel/iommu_groups//type" file iommu: Take lock before reading iommu group default domain type ... commit a146468d76e0462393a3e15b77b8b3ede60e2d06 Author: Jens Axboe Date: Mon Dec 14 20:57:27 2020 -0700 io_uring: break links on shutdown failure Ensure that the return value of __sys_shutdown_sock() is used to potentially break links to the request, if we fail. Fixes: 36f4fa6886a8 ("io_uring: add support for shutdown(2)") Signed-off-by: Jens Axboe commit 9aaf9a2aba0c2b5f0fc6dfeb011f0b4c8e224a73 Author: Gioh Kim Date: Thu Dec 10 11:18:26 2020 +0100 block/rnbd-clt: Does not request pdu to rtrs-clt Previously the rnbd client requested the rtrs to allocate rnbd_iu just after the rtrs_iu. So the rnbd client passes the size of rnbd_iu for rtrs_clt_open() and rtrs creates an array of rnbd_iu and rtrs_iu. For IO handling, rnbd_iu exists after the request because we pass the size of rnbd_iu when setting the tag-set. Therefore we do not use the rnbd_iu allocated by rtrs for IO handling. We only use the rnbd_iu allocated by rtrs when doing session initialization. Almost all rnbd_iu allocated by rtrs are wasted. By this patch the rnbd client does not request rnbd_iu allocation to rtrs but allocate it for itself when doing session initialization. Also remove unused rtrs_permit_to_pdu from rtrs. Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Signed-off-by: Jens Axboe commit 5a1328d0c3a757cdd8c65f4dfe0a02502a5810bc Author: Gioh Kim Date: Thu Dec 10 11:18:25 2020 +0100 block/rnbd-clt: Dynamically allocate sglist for rnbd_iu The BMAX_SEGMENT static array for scatterlist is embedded in rnbd_iu structure to avoid memory allocation in hot IO path. In many cases, we do need only several sg entries because many IOs have only several segments. This patch change rnbd_iu to check the number of segments in the request and allocate sglist dynamically. For io path, use sg_alloc_table_chained to allocate sg list faster. First it makes two sg entries after pdu of request. The sg_alloc_table_chained uses the pre-allocated sg entries if the number of segments of the request is less than two. So it reduces the number of memory allocation. Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Signed-off-by: Jens Axboe commit 512c781fd28cb401ee9f2843e32bf4640732c671 Author: Gioh Kim Date: Thu Dec 10 11:18:24 2020 +0100 block/rnbd: Set write-back cache and fua same to the target device The rnbd-client always sets the write-back cache and fua attributes of the rnbd device queue regardless of the target device on the server. That generates IO hang issue when the target device does not support both of write-back cacne and fua. This patch adds more fields for the cache policy and fua into the device opening message. The rnbd-server sends the information if the target device supports the write-back cache and fua and rnbd-client recevives it and set the device queue accordingly. Signed-off-by: Gioh Kim [jwang: some minor change, rename a few varables, remove unrelated comments.] Signed-off-by: Jack Wang Signed-off-by: Jens Axboe commit 3877ece01e46f01fae0fbc00df93d0e5f23196b0 Author: Jack Wang Date: Thu Dec 10 11:18:23 2020 +0100 block/rnbd: Fix typos Signed-off-by: Jack Wang Signed-off-by: Jens Axboe commit 87019e7d99d707e60e20ea3245a561419d5de5ce Author: Md Haris Iqbal Date: Thu Dec 10 11:18:22 2020 +0100 block/rnbd-srv: Protect dev session sysfs removal Since the removal of the session sysfs can also be called from the function destroy_sess, there is a need to protect the call from the function rnbd_srv_sess_dev_force_close Fixes: 786998050cbc ("block/rnbd-srv: close a mapped device from server side.") Signed-off-by: Md Haris Iqbal Reviewed-by: Guoqing Jiang Signed-off-by: Jack Wang Signed-off-by: Jens Axboe commit 46067844efdb8275ade705923120fc5391543b53 Author: Jack Wang Date: Thu Dec 10 11:18:21 2020 +0100 block/rnbd-clt: Fix possible memleak In error case, we do not free the memory for blk_symlink_name. Do it by free the memory in error case, and set to NULL afterwards. Also fix the condition in rnbd_clt_remove_dev_symlink. Fixes: 64e8a6ece1a5 ("block/rnbd-clt: Dynamically alloc buffer for pathname & blk_symlink_name") Signed-off-by: Jack Wang Reviewed-by: Md Haris Iqbal Signed-off-by: Jens Axboe commit e7508d48565060af5d89f10cb83c9359c8ae1310 Author: Md Haris Iqbal Date: Thu Dec 10 11:18:20 2020 +0100 block/rnbd-clt: Get rid of warning regarding size argument in strlcpy The kernel test robot triggerred the following warning, >> drivers/block/rnbd/rnbd-clt.c:1397:42: warning: size argument in 'strlcpy' call appears to be size of the source; expected the size of the destination [-Wstrlcpy-strlcat-size] strlcpy(dev->pathname, pathname, strlen(pathname) + 1); ~~~~~~~^~~~~~~~~~~~~ To get rid of the above warning, use a kstrdup as Bart suggested. Fixes: 64e8a6ece1a5 ("block/rnbd-clt: Dynamically alloc buffer for pathname & blk_symlink_name") Reported-by: kernel test robot Signed-off-by: Md Haris Iqbal Signed-off-by: Jack Wang Signed-off-by: Jens Axboe commit e6582cb5dab4ae572513412cc10fd0ffe07e0b05 Author: Daniel Wagner Date: Mon Nov 30 11:19:21 2020 +0100 blk-mq: Remove 'running from the wrong CPU' warning It's guaranteed that no request is in flight when a hctx is going offline. This warning is only triggered when the wq's CPU is hot plugged and the blk-mq is not synced up yet. As this state is temporary and the request is still processed correctly, better remove the warning as this is the fast path. Suggested-by: Ming Lei Signed-off-by: Daniel Wagner Reviewed-by: Christoph Hellwig Reviewed-by: Ming Lei Signed-off-by: Jens Axboe commit 007c74e16c1aac9f5c93b372a054f7f11ede8628 Merge: 009bd55dfcc85 e998879d4fb79 Author: Linus Torvalds Date: Wed Dec 16 13:51:34 2020 -0800 Merge branch 'stable/for-linus-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb Pull swiotlb update from Konrad Rzeszutek Wilk: "A generic (but for right now engaged only with AMD SEV) mechanism to adjust a larger size SWIOTLB based on the total memory of the SEV guests which right now require the bounce buffer for interacting with the outside world. Normal knobs (swiotlb=XYZ) still work" * 'stable/for-linus-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb: x86,swiotlb: Adjust SWIOTLB bounce buffer size for SEV guests commit 009bd55dfcc857d8b00a5bbb17a8db060317af6f Merge: 60f7c503d971a e246b7c035d74 Author: Linus Torvalds Date: Wed Dec 16 13:42:26 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 smaller set of patches, nothing stands out as being particularly major this cycle. The biggest item would be the new HIP09 HW support from HNS, otherwise it was pretty quiet for new work here: - Driver bug fixes and updates: bnxt_re, cxgb4, rxe, hns, i40iw, cxgb4, mlx4 and mlx5 - Bug fixes and polishing for the new rts ULP - Cleanup of uverbs checking for allowed driver operations - Use sysfs_emit all over the place - Lots of bug fixes and clarity improvements for hns - hip09 support for hns - NDR and 50/100Gb signaling rates - Remove dma_virt_ops and go back to using the IB DMA wrappers - mlx5 optimizations for contiguous DMA regions" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (147 commits) RDMA/cma: Don't overwrite sgid_attr after device is released RDMA/mlx5: Fix MR cache memory leak RDMA/rxe: Use acquire/release for memory ordering RDMA/hns: Simplify AEQE process for different types of queue RDMA/hns: Fix inaccurate prints RDMA/hns: Fix incorrect symbol types RDMA/hns: Clear redundant variable initialization RDMA/hns: Fix coding style issues RDMA/hns: Remove unnecessary access right set during INIT2INIT RDMA/hns: WARN_ON if get a reserved sl from users RDMA/hns: Avoid filling sl in high 3 bits of vlan_id RDMA/hns: Do shift on traffic class when using RoCEv2 RDMA/hns: Normalization the judgment of some features RDMA/hns: Limit the length of data copied between kernel and userspace RDMA/mlx4: Remove bogus dev_base_lock usage RDMA/uverbs: Fix incorrect variable type RDMA/core: Do not indicate device ready when device enablement fails RDMA/core: Clean up cq pool mechanism RDMA/core: Update kernel documentation for ib_create_named_qp() MAINTAINERS: SOFT-ROCE: Change Zhu Yanjun's email address ... commit 60f7c503d971a731ee3c4f884a9f2e80d476730d Merge: 69f637c33560b be1b500212541 Author: Linus Torvalds Date: Wed Dec 16 13:34:31 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 consists of the usual driver updates (ufs, qla2xxx, smartpqi, target, zfcp, fnic, mpt3sas, ibmvfc) plus a load of cleanups, a major power management rework and a load of assorted minor updates. There are a few core updates (formatting fixes being the big one) but nothing major this cycle" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (279 commits) scsi: mpt3sas: Update driver version to 36.100.00.00 scsi: mpt3sas: Handle trigger page after firmware update scsi: mpt3sas: Add persistent MPI trigger page scsi: mpt3sas: Add persistent SCSI sense trigger page scsi: mpt3sas: Add persistent Event trigger page scsi: mpt3sas: Add persistent Master trigger page scsi: mpt3sas: Add persistent trigger pages support scsi: mpt3sas: Sync time periodically between driver and firmware scsi: qla2xxx: Update version to 10.02.00.104-k scsi: qla2xxx: Fix device loss on 4G and older HBAs scsi: qla2xxx: If fcport is undergoing deletion complete I/O with retry scsi: qla2xxx: Fix the call trace for flush workqueue scsi: qla2xxx: Fix flash update in 28XX adapters on big endian machines scsi: qla2xxx: Handle aborts correctly for port undergoing deletion scsi: qla2xxx: Fix N2N and NVMe connect retry failure scsi: qla2xxx: Fix FW initialization error on big endian machines scsi: qla2xxx: Fix crash during driver load on big endian machines scsi: qla2xxx: Fix compilation issue in PPC systems scsi: qla2xxx: Don't check for fw_started while posting NVMe command scsi: qla2xxx: Tear down session if FW say it is down ... commit 995433b795cec0a4ef6c8603e7642903c621943a Author: Karsten Graul Date: Tue Dec 15 10:10:58 2020 +0100 net/smc: fix access to parent of an ib device The parent of an ib device is used to retrieve the PCI device attributes. It turns out that there are possible cases when an ib device has no parent set in the device structure, which may lead to page faults when trying to access this memory. Fix that by checking the parent pointer and consolidate the pci device specific processing in a new function. Fixes: a3db10efcc4c ("net/smc: Add support for obtaining SMCR device list") Reported-by: syzbot+600fef7c414ee7e2d71b@syzkaller.appspotmail.com Signed-off-by: Karsten Graul Link: https://lore.kernel.org/r/20201215091058.49354-2-kgraul@linux.ibm.com Signed-off-by: Jakub Kicinski commit ef72cd3c5ce168829c6684ecb2cae047d3493690 Author: Ivan Vecera Date: Tue Dec 15 10:08:10 2020 +0100 ethtool: fix error paths in ethnl_set_channels() Fix two error paths in ethnl_set_channels() to avoid lock-up caused but unreleased RTNL. Fixes: e19c591eafad ("ethtool: set device channel counts with CHANNELS_SET request") Reported-by: LiLiang Signed-off-by: Ivan Vecera Reviewed-by: Michal Kubecek Link: https://lore.kernel.org/r/20201215090810.801777-1-ivecera@redhat.com Signed-off-by: Jakub Kicinski commit c1048828c3dbd96c7e371fae658e5f40e6a45e99 Author: Mike Marshall Date: Wed Dec 16 16:14:08 2020 -0500 orangefs: add splice file operations Fix some xfstests regressions that started after 36e2c7421f02, "don't allow splice read/write without explicit ops". Thanks for help from Dave Chinner and Matthew Wilcox. Signed-off-by: Mike Marshall commit 5277d1cadee8a3bdfda0e1d8247b3126b254a74b Merge: 767143a18d6d7 e2138e3f3537e Author: Jakub Kicinski Date: Wed Dec 16 13:09:37 2020 -0800 Merge branch 'nfc-s3fwrn5-refactor-the-s3fwrn5-module' Bongsu Jeon says: ==================== nfc: s3fwrn5: Refactor the s3fwrn5 module Refactor the s3fwrn5 module. 1/2 is to remove the unneeded delay for NFC sleep. 2/2 is to remove the unused NCI prop commands. ==================== Link: https://lore.kernel.org/r/20201215065401.3220-1-bongsu.jeon@samsung.com Signed-off-by: Jakub Kicinski commit e2138e3f3537efdb8b56ea37d61c1682552608c9 Author: Bongsu Jeon Date: Tue Dec 15 15:54:01 2020 +0900 nfc: s3fwrn5: Remove unused NCI prop commands Remove the unused NCI prop commands that s3fwrn5 driver doesn't use. Signed-off-by: Bongsu Jeon Reviewed-by: Krzysztof Kozlowski Signed-off-by: Jakub Kicinski commit 7ec27c9e97f26b5a1d7d07dd825069a45067868a Author: Bongsu Jeon Date: Tue Dec 15 15:54:00 2020 +0900 nfc: s3fwrn5: Remove the delay for NFC sleep Remove the delay for NFC sleep because the delay is only needed to guarantee that the NFC is awake. Signed-off-by: Bongsu Jeon Reviewed-by: Krzysztof Kozlowski Signed-off-by: Jakub Kicinski commit 69f637c33560b02ae7313e0c142d847361cc723a Merge: ac7ac4618cf25 aeb2b0b1a3da5 Author: Linus Torvalds Date: Wed Dec 16 13:09:32 2020 -0800 Merge tag 'for-5.11/drivers-2020-12-14' of git://git.kernel.dk/linux-block Pull block driver updates from Jens Axboe: "Nothing major in here: - NVMe pull request from Christoph: - nvmet passthrough improvements (Chaitanya Kulkarni) - fcloop error injection support (James Smart) - read-only support for zoned namespaces without Zone Append (Javier González) - improve some error message (Minwoo Im) - reject I/O to offline fabrics namespaces (Victor Gladkov) - PCI queue allocation cleanups (Niklas Schnelle) - remove an unused allocation in nvmet (Amit Engel) - a Kconfig spelling fix (Colin Ian King) - nvme_req_qid simplication (Baolin Wang) - MD pull request from Song: - Fix race condition in md_ioctl() (Dae R. Jeong) - Initialize read_slot properly for raid10 (Kevin Vigor) - Code cleanup (Pankaj Gupta) - md-cluster resync/reshape fix (Zhao Heming) - Move null_blk into its own directory (Damien Le Moal) - null_blk zone and discard improvements (Damien Le Moal) - bcache race fix (Dongsheng Yang) - Set of rnbd fixes/improvements (Gioh Kim, Guoqing Jiang, Jack Wang, Lutz Pogrell, Md Haris Iqbal) - lightnvm NULL pointer deref fix (tangzhenhao) - sr in_interrupt() removal (Sebastian Andrzej Siewior) - FC endpoint security support for s390/dasd (Jan Höppner, Sebastian Ott, Vineeth Vijayan). From the s390 arch guys, arch bits included as it made it easier for them to funnel the feature through the block driver tree. - Follow up fixes (Colin Ian King)" * tag 'for-5.11/drivers-2020-12-14' of git://git.kernel.dk/linux-block: (64 commits) block: drop dead assignments in loop_init() sr: Remove in_interrupt() usage in sr_init_command(). sr: Switch the sector size back to 2048 if sr_read_sector() changed it. cdrom: Reset sector_size back it is not 2048. drivers/lightnvm: fix a null-ptr-deref bug in pblk-core.c null_blk: Move driver into its own directory null_blk: Allow controlling max_hw_sectors limit null_blk: discard zones on reset null_blk: cleanup discard handling null_blk: Improve implicit zone close null_blk: improve zone locking block: Align max_hw_sectors to logical blocksize null_blk: Fail zone append to conventional zones null_blk: Fix zone size initialization bcache: fix race between setting bdev state to none and new write request direct to backing block/rnbd: fix a null pointer dereference on dev->blk_symlink_name block/rnbd-clt: Dynamically alloc buffer for pathname & blk_symlink_name block/rnbd: call kobject_put in the failure path Documentation/ABI/rnbd-srv: add document for force_close block/rnbd-srv: close a mapped device from server side. ... commit 767143a18d6d743d4254de5cf55b1bd87bb2af18 Author: Jakub Kicinski Date: Mon Dec 14 22:37:50 2020 -0800 phy: fix kdoc warning Kdoc does not like it when multiline comment follows the networking style of starting right on the first line: include/linux/phy.h:869: warning: Function parameter or member 'config_intr' not described in 'phy_driver' Link: https://lore.kernel.org/r/20201215063750.3120976-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit ac7ac4618cf25e0d5cd8eba83d5f600084b65b9a Merge: 48aba79bcf6ea fa94ba8a7b228 Author: Linus Torvalds Date: Wed Dec 16 12:57:51 2020 -0800 Merge tag 'for-5.11/block-2020-12-14' of git://git.kernel.dk/linux-block Pull block updates from Jens Axboe: "Another series of killing more code than what is being added, again thanks to Christoph's relentless cleanups and tech debt tackling. This contains: - blk-iocost improvements (Baolin Wang) - part0 iostat fix (Jeffle Xu) - Disable iopoll for split bios (Jeffle Xu) - block tracepoint cleanups (Christoph Hellwig) - Merging of struct block_device and hd_struct (Christoph Hellwig) - Rework/cleanup of how block device sizes are updated (Christoph Hellwig) - Simplification of gendisk lookup and removal of block device aliasing (Christoph Hellwig) - Block device ioctl cleanups (Christoph Hellwig) - Removal of bdget()/blkdev_get() as exported API (Christoph Hellwig) - Disk change rework, avoid ->revalidate_disk() (Christoph Hellwig) - sbitmap improvements (Pavel Begunkov) - Hybrid polling fix (Pavel Begunkov) - bvec iteration improvements (Pavel Begunkov) - Zone revalidation fixes (Damien Le Moal) - blk-throttle limit fix (Yu Kuai) - Various little fixes" * tag 'for-5.11/block-2020-12-14' of git://git.kernel.dk/linux-block: (126 commits) blk-mq: fix msec comment from micro to milli seconds blk-mq: update arg in comment of blk_mq_map_queue blk-mq: add helper allocating tagset->tags Revert "block: Fix a lockdep complaint triggered by request queue flushing" nvme-loop: use blk_mq_hctx_set_fq_lock_class to set loop's lock class blk-mq: add new API of blk_mq_hctx_set_fq_lock_class block: disable iopoll for split bio block: Improve blk_revalidate_disk_zones() checks sbitmap: simplify wrap check sbitmap: replace CAS with atomic and sbitmap: remove swap_lock sbitmap: optimise sbitmap_deferred_clear() blk-mq: skip hybrid polling if iopoll doesn't spin blk-iocost: Factor out the base vrate change into a separate function blk-iocost: Factor out the active iocgs' state check into a separate function blk-iocost: Move the usage ratio calculation to the correct place blk-iocost: Remove unnecessary advance declaration blk-iocost: Fix some typos in comments blktrace: fix up a kerneldoc comment block: remove the request_queue to argument request based tracepoints ... commit 7ac554888233468a9fd7c4f28721396952dd9959 Author: Andy Shevchenko Date: Mon Dec 14 18:55:24 2020 +0200 MAINTAINERS: Remove reference to non-existing file GPIO HiSilicon driver doesn't provide any platform data header. Fixes: a8f25236e6e3 ("MAINTAINERS: Add maintainer for HiSilicon GPIO driver") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201214165524.43843-2-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 72db5d54d76300fb4153874b8466c0ebbb10208f Author: Andy Shevchenko Date: Mon Dec 14 18:55:23 2020 +0200 gpio: hisi: Do not require ACPI for COMPILE_TEST Make it clear that ACPI needs to be present only to get driver functional. It is not required for compilation. Fixes: 356b01a986a5 ("gpio: gpio-hisi: Add HiSilicon GPIO support") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201214165524.43843-1-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 80e493d2b74af7442eac968c060b26adbfaa96f9 Author: Luo Jiaxing Date: Mon Dec 14 16:24:14 2020 +0800 MAINTAINERS: Add maintainer for HiSilicon GPIO driver Here add maintainer information for HiSilicon GPIO driver. Signed-off-by: Luo Jiaxing Link: https://lore.kernel.org/r/1607934255-52544-3-git-send-email-luojiaxing@huawei.com [Dropped some dead code when applying] Signed-off-by: Linus Walleij commit c32c928d29deb2636e5889f59305cc15b004909f Author: Hoang Le Date: Tue Dec 15 10:31:51 2020 +0700 tipc: do sanity check payload of a netlink message When we initialize nlmsghdr with no payload inside tipc_nl_compat_dumpit() the parsing function returns -EINVAL. We fix it by making the parsing call conditional. Acked-by: Jon Maloy Signed-off-by: Hoang Le Link: https://lore.kernel.org/r/20201215033151.76139-1-hoang.h.le@dektech.com.au Signed-off-by: Jakub Kicinski commit 48aba79bcf6ea05148dc82ad9c40713960b00396 Merge: 005b2a9dc819a 59850d226e490 Author: Linus Torvalds Date: Wed Dec 16 12:44:05 2020 -0800 Merge tag 'for-5.11/io_uring-2020-12-14' of git://git.kernel.dk/linux-block Pull io_uring updates from Jens Axboe: "Fairly light set of changes this time around, and mostly some bits that were pushed out to 5.11 instead of 5.10, fixes/cleanups, and a few features. In particular: - Cleanups around iovec import (David Laight, Pavel) - Add timeout support for io_uring_enter(2), which enables us to clean up liburing and avoid a timeout sqe submission in the completion path. The big win here is that it allows setups that split SQ and CQ handling into separate threads to avoid locking, as the CQ side will no longer submit when timeouts are needed when waiting for events (Hao Xu) - Add support for socket shutdown, and renameat/unlinkat. - SQPOLL cleanups and improvements (Xiaoguang Wang) - Allow SQPOLL setups for CAP_SYS_NICE, and enable regular (non-fixed) files to be used. - Cancelation improvements (Pavel) - Fixed file reference improvements (Pavel) - IOPOLL related race fixes (Pavel) - Lots of other little fixes and cleanups (mostly Pavel)" * tag 'for-5.11/io_uring-2020-12-14' of git://git.kernel.dk/linux-block: (43 commits) io_uring: fix io_cqring_events()'s noflush io_uring: fix racy IOPOLL flush overflow io_uring: fix racy IOPOLL completions io_uring: always let io_iopoll_complete() complete polled io io_uring: add timeout update io_uring: restructure io_timeout_cancel() io_uring: fix files cancellation io_uring: use bottom half safe lock for fixed file data io_uring: fix miscounting ios_left io_uring: change submit file state invariant io_uring: check kthread stopped flag when sq thread is unparked io_uring: share fixed_file_refs b/w multiple rsrcs io_uring: replace inflight_wait with tctx->wait io_uring: don't take fs for recvmsg/sendmsg io_uring: only wake up sq thread while current task is in io worker context io_uring: don't acquire uring_lock twice io_uring: initialize 'timeout' properly in io_sq_thread() io_uring: refactor io_sq_thread() handling io_uring: always batch cancel in *cancel_files() io_uring: pass files into kill timeouts/poll ... commit 005b2a9dc819a1265a8c765595f8f6d88d6173d9 Merge: 5ee863bec794f 355fb9e2b78e7 Author: Linus Torvalds Date: Wed Dec 16 12:33:35 2020 -0800 Merge tag 'tif-task_work.arch-2020-12-14' of git://git.kernel.dk/linux-block Pull TIF_NOTIFY_SIGNAL updates from Jens Axboe: "This sits on top of of the core entry/exit and x86 entry branch from the tip tree, which contains the generic and x86 parts of this work. Here we convert the rest of the archs to support TIF_NOTIFY_SIGNAL. With that done, we can get rid of JOBCTL_TASK_WORK from task_work and signal.c, and also remove a deadlock work-around in io_uring around knowing that signal based task_work waking is invoked with the sighand wait queue head lock. The motivation for this work is to decouple signal notify based task_work, of which io_uring is a heavy user of, from sighand. The sighand lock becomes a huge contention point, particularly for threaded workloads where it's shared between threads. Even outside of threaded applications it's slower than it needs to be. Roman Gershman reported that his networked workload dropped from 1.6M QPS at 80% CPU to 1.0M QPS at 100% CPU after io_uring was changed to use TIF_NOTIFY_SIGNAL. The time was all spent hammering on the sighand lock, showing 57% of the CPU time there [1]. There are further cleanups possible on top of this. One example is TIF_PATCH_PENDING, where a patch already exists to use TIF_NOTIFY_SIGNAL instead. Hopefully this will also lead to more consolidation, but the work stands on its own as well" [1] https://github.com/axboe/liburing/issues/215 * tag 'tif-task_work.arch-2020-12-14' of git://git.kernel.dk/linux-block: (28 commits) io_uring: remove 'twa_signal_ok' deadlock work-around kernel: remove checking for TIF_NOTIFY_SIGNAL signal: kill JOBCTL_TASK_WORK io_uring: JOBCTL_TASK_WORK is no longer used by task_work task_work: remove legacy TWA_SIGNAL path sparc: add support for TIF_NOTIFY_SIGNAL riscv: add support for TIF_NOTIFY_SIGNAL nds32: add support for TIF_NOTIFY_SIGNAL ia64: add support for TIF_NOTIFY_SIGNAL h8300: add support for TIF_NOTIFY_SIGNAL c6x: add support for TIF_NOTIFY_SIGNAL alpha: add support for TIF_NOTIFY_SIGNAL xtensa: add support for TIF_NOTIFY_SIGNAL arm: add support for TIF_NOTIFY_SIGNAL microblaze: add support for TIF_NOTIFY_SIGNAL hexagon: add support for TIF_NOTIFY_SIGNAL csky: add support for TIF_NOTIFY_SIGNAL openrisc: add support for TIF_NOTIFY_SIGNAL sh: add support for TIF_NOTIFY_SIGNAL um: add support for TIF_NOTIFY_SIGNAL ... commit 732374a0b440d9a79c8412f318a25cd37ba6f4e2 Author: Pragnesh Patel Date: Wed Dec 9 17:49:16 2020 +0800 clk: sifive: Add clock enable and disable ops Add new functions "sifive_prci_clock_enable(), sifive_prci_clock_disable() and sifive_clk_is_enabled()" to enable or disable the PRCI clock Signed-off-by: Pragnesh Patel Tested-by: Zong Li Link: https://lore.kernel.org/r/20201209094916.17383-6-zong.li@sifive.com Signed-off-by: Stephen Boyd commit 263ac3908516abb0392747bbf595af2b13df5fa2 Author: Zong Li Date: Wed Dec 9 17:49:15 2020 +0800 clk: sifive: Fix the wrong bit field shift The clk enable bit should be 31 instead of 24. Signed-off-by: Zong Li Reported-by: Pragnesh Patel Link: https://lore.kernel.org/r/20201209094916.17383-5-zong.li@sifive.com Signed-off-by: Stephen Boyd commit efc91ae43c8d4bbf64e4b9a28113b24a74ffd58d Author: Zong Li Date: Wed Dec 9 17:49:14 2020 +0800 clk: sifive: Add a driver for the SiFive FU740 PRCI IP block Add driver code for the SiFive FU740 PRCI IP block. This IP block handles reset and clock control for the SiFive FU740 device and implements SoC-level clock tree controls and dividers. The link of unmatched as follow, and the U740-C000 manual would be present in the same page as soon. https://www.sifive.com/boards/hifive-unmatched This driver contains bug fixes and contributions from Henry Styles Erik Danie Pragnesh Patel Signed-off-by: Zong Li Reviewed-by: Pragnesh Patel Acked-by: Palmer Dabbelt Cc: Henry Styles Cc: Erik Danie Cc: Pragnesh Patel Link: https://lore.kernel.org/r/20201209094916.17383-4-zong.li@sifive.com [sboyd@kernel.org: Include header to silence sparse] Signed-off-by: Stephen Boyd commit 28108fc8a056f0fd26be17727eff212fae67a247 Author: Zong Li Date: Wed Dec 9 17:49:13 2020 +0800 clk: sifive: Use common name for prci configuration Use generic name CLK_SIFIVE_PRCI instead of CLK_SIFIVE_FU540_PRCI. This patch is prepared for fu740 support. Signed-off-by: Zong Li Reviewed-by: Palmer Dabbelt Acked-by: Palmer Dabbelt Reviewed-by: Pragnesh Patel Link: https://lore.kernel.org/r/20201209094916.17383-3-zong.li@sifive.com Signed-off-by: Stephen Boyd commit c816e1ddf2b60b31d121118488c5a854d9a2fad9 Author: Zong Li Date: Wed Dec 9 17:49:12 2020 +0800 clk: sifive: Extract prci core to common base Extract common core of prci driver to an independent file, it could allow other chips to reuse it. Separate SoCs-dependent code 'fu540' from prci core, then we can easily add 'fu740' later. Almost these changes are code movement. The different is adding the private data for each SoC use, so it needs to get match data in probe callback function, then use the data for initialization. Signed-off-by: Zong Li Reviewed-by: Pragnesh Patel Acked-by: Palmer Dabbelt Link: https://lore.kernel.org/r/20201209094916.17383-2-zong.li@sifive.com [sboyd@kernel.org: Include header to silence sparse] Signed-off-by: Stephen Boyd commit 5ee863bec794f30bdf7fdf57ce0d9f579b0d1aa3 Merge: 8312f41f08edc 39b1e779b6e2d Author: Linus Torvalds Date: Wed Dec 16 12:10:40 2020 -0800 Merge branch 'parisc-5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc updates from Helge Deller: "A change to increase the default maximum stack size on parisc to 100MB and the ability to further increase the stack hard limit size at runtime with ulimit for newly started processes. The other patches fix compile warnings, utilize the Kbuild logic and cleanups the parisc arch code" * 'parisc-5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: pci-dma: fix warning unused-function parisc/uapi: Use Kbuild logic to provide parisc: Make user stack size configurable parisc: Use _TIF_USER_WORK_MASK in entry.S parisc: Drop loops_per_jiffy from per_cpu struct commit 8312f41f08edc641aa927d31fb71319694ae9c42 Merge: 66fc6a6254c7a ad4fddef5f234 Author: Linus Torvalds Date: Wed Dec 16 12:07:54 2020 -0800 Merge tag 'mips_5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS updates from Thomas Bogendoerfer: - enable GCOV - rework setup of protection map - add support for more MSCC platforms - add sysfs boardinfo for Loongson64 - enable KASLR for Loogson64 - add reset controller for BCM63xx - cleanups and fixes * tag 'mips_5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (70 commits) mips: fix Section mismatch in reference MAINTAINERS: Add linux-mips mailing list to JZ47xx entries MAINTAINERS: Remove JZ4780 DMA driver entry MAINTAINERS: chenhc@lemote.com -> chenhuacai@kernel.org MIPS: Octeon: irq: Alloc desc before configuring IRQ MIPS: mm: Add back define for PAGE_SHARED MIPS: Select ARCH_KEEP_MEMBLOCK if DEBUG_KERNEL to enable sysfs memblock debug mips: lib: uncached: fix non-standard usage of variable 'sp' MIPS: DTS: img: Fix schema warnings for pwm-leds MIPS: KASLR: Avoid endless loop in sync_icache if synci_step is zero MIPS: Move memblock_dump_all() to the end of setup_arch() MIPS: SMP-CPS: Add support for irq migration when CPU offline MIPS: OCTEON: Don't add kernel sections into memblock allocator MIPS: Don't round up kernel sections size for memblock_add() MIPS: Enable GCOV MIPS: configs: drop unused BACKLIGHT_GENERIC option MIPS: Loongson64: Fix up reserving kernel memory range MIPS: mm: Remove unused is_aligned_hugepage_range MIPS: No need to check CPU 0 in {loongson3,bmips,octeon}_cpu_disable() mips: cdmm: fix use-after-free in mips_cdmm_bus_discover ... commit 66fc6a6254c7a138aef7806bd933c218e1aefcfc Merge: 7acfd4274e26e 05cdf457477d6 Author: Linus Torvalds Date: Wed Dec 16 12:04:39 2020 -0800 Merge tag 'microblaze-v5.11' of git://git.monstr.eu/linux-2.6-microblaze Pull microblaze updates from Michal Simek: "The biggest change is to remove support for noMMU configuration. FPGAs are bigger so people use Microblaze with MMU for a lot of years and there is likely no user of this code anymore. No one is updating libraries for this configuration either. - Remove noMMU support - Add support for TIF_NOTIFY_SIGNAL - Small header fix" * tag 'microblaze-v5.11' of git://git.monstr.eu/linux-2.6-microblaze: microblaze: Remove noMMU code microblaze: add support for TIF_NOTIFY_SIGNAL microblaze: Replace by commit 7acfd4274e26e05a4f12ad31bf331fef11ebc6a3 Merge: 571b12dd1ad41 1c728719a4da6 Author: Linus Torvalds Date: Wed Dec 16 11:53:09 2020 -0800 Merge tag 'for-linus-5.11-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen updates from Juergen Gross: "Fixes for security issues just having been disclosed: - a five patch series for fixing of XSA-349 (DoS via resource depletion in Xen dom0) - a patch fixing XSA-350 (access of stale pointer in a Xen dom0)" * tag 'for-linus-5.11-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen-blkback: set ring->xenblkd to NULL after kthread_stop() xenbus/xenbus_backend: Disallow pending watch messages xen/xenbus: Count pending messages for each watch xen/xenbus/xen_bus_type: Support will_handle watch callback xen/xenbus: Add 'will_handle' callback support in xenbus_watch_path() xen/xenbus: Allow watches discard events before queueing commit 571b12dd1ad41f371448b693c0bd2e64968c7af4 Merge: e994cc240a3b7 d1df458cbfdb0 Author: Linus Torvalds Date: Wed Dec 16 11:49:46 2020 -0800 Merge tag 'hyperv-next-signed-20201214' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux Pull Hyper-V updates from Wei Liu: - harden VMBus (Andres Beltran) - clean up VMBus driver (Matheus Castello) - fix hv_balloon reporting (Vitaly Kuznetsov) - fix a potential OOB issue (Andrea Parri) - remove an obsolete TODO item (Stefan Eschenbacher) * tag 'hyperv-next-signed-20201214' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: hv_balloon: do adjust_managed_page_count() when ballooning/un-ballooning hv_balloon: simplify math in alloc_balloon_pages() drivers/hv: remove obsolete TODO and fix misleading typo in comment drivers: hv: vmbus: Fix checkpatch SPLIT_STRING hv_netvsc: Validate number of allocated sub-channels drivers: hv: vmbus: Fix call msleep using < 20ms drivers: hv: vmbus: Fix checkpatch LINE_SPACING drivers: hv: vmbus: Replace symbolic permissions by octal permissions drivers: hv: Fix hyperv_record_panic_msg path on comment hv_netvsc: Use vmbus_requestor to generate transaction IDs for VMBus hardening scsi: storvsc: Use vmbus_requestor to generate transaction IDs for VMBus hardening Drivers: hv: vmbus: Add vmbus_requestor data structure for VMBus hardening commit 023cae857b347b6f5577eebade21a843f3621f85 Merge: 322e53d1e2529 935d8a0a43e3f Author: Jakub Kicinski Date: Wed Dec 16 11:43:52 2020 -0800 Merge branch 'locked-version-of-netdev_notify_peers' Lijun Pan says: ==================== add a locked version of netdev_notify_peers This series introduce the lockless version of netdev_notify_peers and then apply it to the relevant drivers. In v1, a more appropriate name __netdev_notify_peers is used; netdev_notify_peers is converted to call the new helper. In v2, patch 3 calls the new helper where notify variable used to be set true. ==================== Link: https://lore.kernel.org/r/20201214211930.80778-1-ljp@linux.ibm.com Signed-off-by: Jakub Kicinski commit 935d8a0a43e3f928e3243ae22bc53cd7a014d515 Author: Lijun Pan Date: Mon Dec 14 15:19:30 2020 -0600 use __netdev_notify_peers in hyperv Start to use the lockless version of netdev_notify_peers. Call the helper where notify variable used to be set true. Remove the notify bool variable and sort the variables in reverse Christmas tree order. Cc: Haiyang Zhang Signed-off-by: Lijun Pan Signed-off-by: Jakub Kicinski commit 6be4666221cafcfd58cc078aa8bd1ba11b699f6b Author: Lijun Pan Date: Mon Dec 14 15:19:29 2020 -0600 use __netdev_notify_peers in ibmvnic Start to use the lockless version of netdev_notify_peers. Signed-off-by: Lijun Pan Signed-off-by: Jakub Kicinski commit 7061eb8cfa902daa1ec71d23b5cddb8b4391e72b Author: Lijun Pan Date: Mon Dec 14 15:19:28 2020 -0600 net: core: introduce __netdev_notify_peers There are some use cases for netdev_notify_peers in the context when rtnl lock is already held. Introduce lockless version of netdev_notify_peers call to save the extra code to call call_netdevice_notifiers(NETDEV_NOTIFY_PEERS, dev); call_netdevice_notifiers(NETDEV_RESEND_IGMP, dev); After that, convert netdev_notify_peers to call the new helper. Suggested-by: Nathan Lynch Signed-off-by: Lijun Pan Signed-off-by: Jakub Kicinski commit 322e53d1e2529ae9d501f5e0f20604a79b873aef Author: Christophe JAILLET Date: Mon Dec 14 21:21:17 2020 +0100 net: allwinner: Fix some resources leak in the error handling path of the probe and in the remove function 'irq_of_parse_and_map()' should be balanced by a corresponding 'irq_dispose_mapping()' call. Otherwise, there is some resources leaks. Add such a call in the error handling path of the probe function and in the remove function. Fixes: 492205050d77 ("net: Add EMAC ethernet driver found on Allwinner A10 SoC's") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/20201214202117.146293-1-christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski commit e994cc240a3b75744c33ca9b8d74f71f0fcd8852 Merge: ba1d41a55e4d0 2c07343abd893 Author: Linus Torvalds Date: Wed Dec 16 11:30:10 2020 -0800 Merge tag 'seccomp-v5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull seccomp updates from Kees Cook: "The major change here is finally gaining seccomp constant-action bitmaps, which internally reduces the seccomp overhead for many real-world syscall filters to O(1), as discussed at Plumbers this year. - Improve seccomp performance via constant-action bitmaps (YiFei Zhu & Kees Cook) - Fix bogus __user annotations (Jann Horn) - Add missed CONFIG for improved selftest coverage (Mickaël Salaün)" * tag 'seccomp-v5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: selftests/seccomp: Update kernel config seccomp: Remove bogus __user annotations seccomp/cache: Report cache data through /proc/pid/seccomp_cache xtensa: Enable seccomp architecture tracking sh: Enable seccomp architecture tracking s390: Enable seccomp architecture tracking riscv: Enable seccomp architecture tracking powerpc: Enable seccomp architecture tracking parisc: Enable seccomp architecture tracking csky: Enable seccomp architecture tracking arm: Enable seccomp architecture tracking arm64: Enable seccomp architecture tracking selftests/seccomp: Compare bitmap vs filter overhead x86: Enable seccomp architecture tracking seccomp/cache: Add "emulator" to check if filter is constant allow seccomp/cache: Lookup syscall allowlist bitmap for fast path commit ba1d41a55e4d07c7b27ee2f6e7cf5b5348849261 Merge: 6df0f2855a9ae 26fecbf7602dd Author: Linus Torvalds Date: Wed Dec 16 11:25:16 2020 -0800 Merge tag 'pstore-v5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull pstore updates from Kees Cook: - Clean up unused but exposed API (Christoph Hellwig) - Provide KCONFIG for default size of kmsg buffer (Vasile-Laurentiu Stanimir) * tag 'pstore-v5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: pstore: Move kmsg_bytes default into Kconfig pstore/blk: remove {un,}register_pstore_blk pstore/blk: update the command line example pstore/zone: cap the maximum device size commit 6df0f2855a9ae888fd19d034d8e6889cee6b639c Merge: 8bda68d68b21c 53a57e60de74a Author: Linus Torvalds Date: Wed Dec 16 11:17:27 2020 -0800 Merge tag 'gcc-plugins-v5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull gcc-plugins updates from Kees Cook: - Clean up gcc plugin builds now that GCC must be 4.9+ (Masahiro Yamada) - Update MAINTAINERS (Kees Cook) * tag 'gcc-plugins-v5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: MAINTAINERS: Drop inactive gcc-plugins maintainer gcc-plugins: simplify GCC plugin-dev capability test gcc-plugins: remove code for GCC versions older than 4.9 commit efb796f5571f030743e1d9c662cdebdad724f8c5 Author: Michal Kubecek Date: Mon Dec 14 14:25:01 2020 +0100 ethtool: fix string set id check Syzbot reported a shift of a u32 by more than 31 in strset_parse_request() which is undefined behavior. This is caused by range check of string set id using variable ret (which is always 0 at this point) instead of id (string set id from request). Fixes: 71921690f974 ("ethtool: provide string sets with STRSET_GET request") Reported-by: syzbot+96523fb438937cd01220@syzkaller.appspotmail.com Signed-off-by: Michal Kubecek Link: https://lore.kernel.org/r/b54ed5c5fd972a59afea3e1badfb36d86df68799.1607952208.git.mkubecek@suse.cz Signed-off-by: Jakub Kicinski commit 8bda68d68b21cb9881dcc7159fd9db1b6f95ac15 Merge: e20a9b92ddbfe 9b0072e2b2b58 Author: Linus Torvalds Date: Wed Dec 16 11:11:58 2020 -0800 Merge tag 'Smack-for-5.11' of git://github.com/cschaufler/smack-next Pull smack updates from Casey Schaufler: "There are no functional changes. Just one minor code clean-up and a set of corrections in function header comments" * tag 'Smack-for-5.11' of git://github.com/cschaufler/smack-next: security/smack: remove unused varible 'rc' Smack: fix kernel-doc interface on functions commit f87675b836b324d270fd52f1f5e6d6bb9f4bd1d5 Author: Christophe JAILLET Date: Sun Dec 13 12:48:38 2020 +0100 net: mscc: ocelot: Fix a resource leak in the error handling path of the probe function In case of error after calling 'ocelot_init()', it must be undone by a corresponding 'ocelot_deinit()' call, as already done in the remove function. Fixes: a556c76adc05 ("net: mscc: Add initial Ocelot switch support") Signed-off-by: Christophe JAILLET Acked-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201213114838.126922-1-christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski commit c18e68696fdd9fd293f051030bce5aaff3c9b185 Author: Geoff Levand Date: Mon Dec 14 21:15:47 2020 -0800 net/connector: Add const qualifier to cb_id The connector driver never modifies any cb_id passed to it, so add a const qualifier to those arguments so callers can declare their struct cb_id as a constant object. Fixes build warnings like these when passing a constant struct cb_id: warning: passing argument 1 of ‘cn_add_callback’ discards ‘const’ qualifier from pointer target Signed-off-by: Geoff Levand Link: https://lore.kernel.org/r/a9e49c9e-67fa-16e7-0a6b-72f6bd30c58a@infradead.org Signed-off-by: Jakub Kicinski commit e20a9b92ddbfe662807622dbb28e1fbb6e0011aa Merge: ca5b877b6ccc7 207cdd565dfc9 Author: Linus Torvalds Date: Wed Dec 16 11:06:07 2020 -0800 Merge tag 'integrity-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity Pull integrity subsystem updates from Mimi Zohar: "Just three patches here. Other integrity changes are being upstreamed via EFI (defines a common EFI secure and trusted boot IMA policy) and BPF LSM (exporting the IMA file cache hash info based on inode). The three patches included here: - bug fix: fail calculating the file hash, when a file not opened for read and the attempt to re-open it for read fails. - defer processing the "ima_appraise" boot command line option to avoid enabling different modes (e.g. fix, log) to when the secure boot flag is available on arm. - defines "ima-buf" as the default IMA buffer measurement template in preparation for the builtin integrity "critical data" policy" * tag 'integrity-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity: ima: Don't modify file descriptor mode on the fly ima: select ima-buf template for buffer measurement ima: defer arch_ima_get_secureboot() call to IMA init time commit 4375ada01963d1ebf733d60d1bb6e5db401e1ac6 Author: Christophe JAILLET Date: Sat Dec 12 19:20:05 2020 +0100 net: bcmgenet: Fix a resource leak in an error handling path in the probe functin If the 'register_netdev()' call fails, we must undo a previous 'bcmgenet_mii_init()' call. Fixes: 1c1008c793fa ("net: bcmgenet: add main driver file") Signed-off-by: Christophe JAILLET Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20201212182005.120437-1-christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski commit 54a57d1c449275ee727154ac106ec1accae012e3 Author: Ioana Ciornei Date: Fri Dec 11 19:16:07 2020 +0200 dpaa2-eth: fix the size of the mapped SGT buffer This patch fixes an error condition triggered when the code path which transmits a S/G frame descriptor when the skb's headroom is not enough for DPAA2's needs. We are greated with a splat like the one below when a SGT structure is recycled and that is because even though a dma_unmap is performed on the Tx confirmation path, the unmap is not done with the proper size. [ 714.464927] WARNING: CPU: 13 PID: 0 at drivers/iommu/io-pgtable-arm.c:281 __arm_lpae_map+0x2d4/0x30c (...) [ 714.465343] Call trace: [ 714.465348] __arm_lpae_map+0x2d4/0x30c [ 714.465353] __arm_lpae_map+0x114/0x30c [ 714.465357] __arm_lpae_map+0x114/0x30c [ 714.465362] __arm_lpae_map+0x114/0x30c [ 714.465366] arm_lpae_map+0xf4/0x180 [ 714.465373] arm_smmu_map+0x4c/0xc0 [ 714.465379] __iommu_map+0x100/0x2bc [ 714.465385] iommu_map_atomic+0x20/0x30 [ 714.465391] __iommu_dma_map+0xb0/0x110 [ 714.465397] iommu_dma_map_page+0xb8/0x120 [ 714.465404] dma_map_page_attrs+0x1a8/0x210 [ 714.465413] __dpaa2_eth_tx+0x384/0xbd0 [fsl_dpaa2_eth] [ 714.465421] dpaa2_eth_tx+0x84/0x134 [fsl_dpaa2_eth] [ 714.465427] dev_hard_start_xmit+0x10c/0x2b0 [ 714.465433] sch_direct_xmit+0x1a0/0x550 (...) The dpaa2-eth driver uses an area of software annotations to transmit necessary information from the Tx path to the Tx confirmation one. This SWA structure has a different layout for each kind of frame that we are dealing with: linear, S/G or XDP. The commit referenced was incorrectly setting up the 'sgt_size' field for the S/G type of SWA even though we are dealing with a linear skb here. Fixes: d70446ee1f40 ("dpaa2-eth: send a scatter-gather FD instead of realloc-ing") Reported-by: Daniel Thompson Tested-by: Daniel Thompson Signed-off-by: Ioana Ciornei Link: https://lore.kernel.org/r/20201211171607.108034-1-ciorneiioana@gmail.com Signed-off-by: Jakub Kicinski commit ca5b877b6ccc7b989614f3f541e9a1fe2ff7f75a Merge: 3d5de2ddc6ba9 3df98d79215ac Author: Linus Torvalds Date: Wed Dec 16 11:01:04 2020 -0800 Merge tag 'selinux-pr-20201214' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux Pull selinux updates from Paul Moore: "While we have a small number of SELinux patches for v5.11, there are a few changes worth highlighting: - Change the LSM network hooks to pass flowi_common structs instead of the parent flowi struct as the LSMs do not currently need the full flowi struct and they do not have enough information to use it safely (missing information on the address family). This patch was discussed both with Herbert Xu (representing team netdev) and James Morris (representing team LSMs-other-than-SELinux). - Fix how we handle errors in inode_doinit_with_dentry() so that we attempt to properly label the inode on following lookups instead of continuing to treat it as unlabeled. - Tweak the kernel logic around allowx, auditallowx, and dontauditx SELinux policy statements such that the auditx/dontauditx are effective even without the allowx statement. Everything passes our test suite" * tag 'selinux-pr-20201214' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: lsm,selinux: pass flowi_common instead of flowi to the LSM hooks selinux: Fix fall-through warnings for Clang selinux: drop super_block backpointer from superblock_security_struct selinux: fix inode_doinit_with_dentry() LABEL_INVALID error handling selinux: allow dontauditx and auditallowx rules to take effect without allowx selinux: fix error initialization in inode_doinit_with_dentry() commit 3e47495fc4de4122598dd51ae8527b09b8209646 Author: Oleksij Rempel Date: Fri Dec 11 12:03:17 2020 +0100 net: dsa: qca: ar9331: fix sleeping function called from invalid context bug With lockdep enabled, we will get following warning: ar9331_switch ethernet.1:10 lan0 (uninitialized): PHY [!ahb!ethernet@1a000000!mdio!switch@10:00] driver [Qualcomm Atheros AR9331 built-in PHY] (irq=13) BUG: sleeping function called from invalid context at kernel/locking/mutex.c:935 in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 18, name: kworker/0:1 INFO: lockdep is turned off. irq event stamp: 602 hardirqs last enabled at (601): [<8073fde0>] _raw_spin_unlock_irq+0x3c/0x80 hardirqs last disabled at (602): [<8073a4f4>] __schedule+0x184/0x800 softirqs last enabled at (0): [<80080f60>] copy_process+0x578/0x14c8 softirqs last disabled at (0): [<00000000>] 0x0 CPU: 0 PID: 18 Comm: kworker/0:1 Not tainted 5.10.0-rc3-ar9331-00734-g7d644991df0c #31 Workqueue: events deferred_probe_work_func Stack : 80980000 80980000 8089ef70 80890000 804b5414 80980000 00000002 80b53728 00000000 800d1268 804b5414 ffffffde 00000017 800afe08 81943860 0f5bfc32 00000000 00000000 8089ef70 819436c0 ffffffea 00000000 00000000 00000000 8194390c 808e353c 0000000f 66657272 80980000 00000000 00000000 80890000 804b5414 80980000 00000002 80b53728 00000000 00000000 00000000 80d40000 ... Call Trace: [<80069ce0>] show_stack+0x9c/0x140 [<800afe08>] ___might_sleep+0x220/0x244 [<8073bfb0>] __mutex_lock+0x70/0x374 [<8073c2e0>] mutex_lock_nested+0x2c/0x38 [<804b5414>] regmap_update_bits_base+0x38/0x8c [<804ee584>] regmap_update_bits+0x1c/0x28 [<804ee714>] ar9331_sw_unmask_irq+0x34/0x60 [<800d91f0>] unmask_irq+0x48/0x70 [<800d93d4>] irq_startup+0x114/0x11c [<800d65b4>] __setup_irq+0x4f4/0x6d0 [<800d68a0>] request_threaded_irq+0x110/0x190 [<804e3ef0>] phy_request_interrupt+0x4c/0xe4 [<804df508>] phylink_bringup_phy+0x2c0/0x37c [<804df7bc>] phylink_of_phy_connect+0x118/0x130 [<806c1a64>] dsa_slave_create+0x3d0/0x578 [<806bc4ec>] dsa_register_switch+0x934/0xa20 [<804eef98>] ar9331_sw_probe+0x34c/0x364 [<804eb48c>] mdio_probe+0x44/0x70 [<8049e3b4>] really_probe+0x30c/0x4f4 [<8049ea10>] driver_probe_device+0x264/0x26c [<8049bc10>] bus_for_each_drv+0xb4/0xd8 [<8049e684>] __device_attach+0xe8/0x18c [<8049ce58>] bus_probe_device+0x48/0xc4 [<8049db70>] deferred_probe_work_func+0xdc/0xf8 [<8009ff64>] process_one_work+0x2e4/0x4a0 [<800a0770>] worker_thread+0x2a8/0x354 [<800a774c>] kthread+0x16c/0x174 [<8006306c>] ret_from_kernel_thread+0x14/0x1c ar9331_switch ethernet.1:10 lan1 (uninitialized): PHY [!ahb!ethernet@1a000000!mdio!switch@10:02] driver [Qualcomm Atheros AR9331 built-in PHY] (irq=13) DSA: tree 0 setup To fix it, it is better to move access to MDIO register to the .irq_bus_sync_unlock call back. Fixes: ec6698c272de ("net: dsa: add support for Atheros AR9331 built-in switch") Signed-off-by: Oleksij Rempel Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/20201211110317.17061-1-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski commit 146f1ed852a87b802ed6e71c31e189c64871383c Author: Shyam Sundar S K Date: Fri Nov 20 11:37:52 2020 +0530 ACPI: PM: s2idle: Add AMD support to handle _DSM Initial support for S2Idle based on the Intel implementation [1] does not work for AMD as the BIOS implementation for ACPI methods like the _DSM are not standardized. So, the way in which the UUID's were parsed and the ACPI packages were retrieved out of the ACPI objects are not the same between Intel and AMD. Add AMD support for S2Idle to parse the UUID, evaluate the _DSM methods, prepare the Idle constraint list etc. Link: https://uefi.org/sites/default/files/resources/Intel_ACPI_Low_Power_S0_Idle.pdf # [1] Signed-off-by: Shyam Sundar S K [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 3d5de2ddc6ba924d7c10460a1dc3aae8786b9d52 Merge: d3eb52113d162 6b3211842a115 Author: Linus Torvalds Date: Wed Dec 16 10:54:03 2020 -0800 Merge tag 'audit-pr-20201214' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit Pull audit updates from Paul Moore: "A small set of audit patches for v5.11 with four patches in total and only one of any real significance. Richard's patch to trigger accompanying records causes the kernel to emit additional related records when an audit event occurs; helping provide some much needed context to events in the audit log. It is also worth mentioning that this is a revised patch based on an earlier attempt that had to be reverted in the v5.8 time frame. Everything passes our test suite, and with no problems reported please merge this for v5.11" * tag 'audit-pr-20201214' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit: audit: replace atomic_add_return() audit: fix macros warnings audit: trigger accompanying records when no rules present audit: fix a kernel-doc markup commit ec58c75a85563026db4927276039a88091f79647 Merge: 57030a0b620f7 64050b5b8706d Author: Jakub Kicinski Date: Wed Dec 16 10:51:09 2020 -0800 Merge branch 'i40e-ice-af_xdp-zc-fixes' Björn Töpel says: ==================== i40e/ice AF_XDP ZC fixes This series address two crashes in the AF_XDP zero-copy mode for ice and i40e. More details in each individual the commit message. ==================== Link: https://lore.kernel.org/r/20201211145712.72957-1-bjorn.topel@gmail.com Signed-off-by: Jakub Kicinski commit 64050b5b8706d304ba647591b06e1eddc55e8bd9 Author: Björn Töpel Date: Fri Dec 11 15:57:12 2020 +0100 i40e, xsk: clear the status bits for the next_to_use descriptor On the Rx side, the next_to_use index points to the next item in the HW ring to be refilled/allocated, and next_to_clean points to the next item to potentially be processed. When the HW Rx ring is fully refilled, i.e. no packets has been processed, the next_to_use will be next_to_clean - 1. When the ring is fully processed next_to_clean will be equal to next_to_use. The latter case is where a bug is triggered. If the next_to_use bits are not cleared, and the "fully processed" state is entered, a stale descriptor can be processed. The skb-path correctly clear the status bit for the next_to_use descriptor, but the AF_XDP zero-copy path did not do that. This change adds the status bits clearing of the next_to_use descriptor. Fixes: 3b4f0b66c2b3 ("i40e, xsk: Migrate to new MEM_TYPE_XSK_BUFF_POOL") Signed-off-by: Björn Töpel Signed-off-by: Jakub Kicinski commit 8d14768a7972b92c73259f0c9c45b969d85e3a60 Author: Björn Töpel Date: Fri Dec 11 15:57:11 2020 +0100 ice, xsk: clear the status bits for the next_to_use descriptor On the Rx side, the next_to_use index points to the next item in the HW ring to be refilled/allocated, and next_to_clean points to the next item to potentially be processed. When the HW Rx ring is fully refilled, i.e. no packets has been processed, the next_to_use will be next_to_clean - 1. When the ring is fully processed next_to_clean will be equal to next_to_use. The latter case is where a bug is triggered. If the next_to_use bits are not cleared, and the "fully processed" state is entered, a stale descriptor can be processed. The skb-path correctly clear the status bit for the next_to_use descriptor, but the AF_XDP zero-copy path did not do that. This change adds the status bits clearing of the next_to_use descriptor. Fixes: 2d4238f55697 ("ice: Add support for AF_XDP") Signed-off-by: Björn Töpel Signed-off-by: Jakub Kicinski commit d3eb52113d162cc88975fbd03c9e6f9cf2f8a771 Merge: 5e60366d56c63 5ed37174e6c7e Author: Linus Torvalds Date: Wed Dec 16 10:45:11 2020 -0800 Merge tag 'printk-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux Pull printk updates from Petr Mladek: - Finally allow parallel writes and reads into/from the lockless ringbuffer. But it is not a complete solution. Readers are still serialized against each other. And nested writes are still prevented by printk_safe per-CPU buffers. - Use ttynull as the ultimate fallback for /dev/console. - Officially allow disabling console output by using console="" or console=null - A few code cleanups * tag 'printk-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux: printk: remove logbuf_lock writer-protection of ringbuffer printk: inline log_output(),log_store() in vprintk_store() printk: remove obsolete dead assignment printk/console: Allow to disable console output by using console="" or console=null init/console: Use ttynull as a fallback when there is no console printk: ringbuffer: Reference text_data_ring directly in callees. commit 6ae09fa49147e557eb6aebbb5b2059b63706d454 Author: Alex Deucher Date: Tue Dec 15 12:07:55 2020 -0500 drm/amdgpu/disply: fix documentation warnings in display manager Add documentation for crc window. Fixes: c920888c604d ("drm/amd/display: Expose new CRC window property") Signed-off-by: Alex Deucher Cc: Wayne Lin Reported-by: Stephen Rothwell Reviewed-by: Wayne Lin commit 05053c4b4f8733e53e5d81d1684a29404b27cefd Author: Tao Zhou Date: Wed Dec 16 11:29:43 2020 +0800 drm/amdgpu: print mmhub client name for dimgrey_cavefish This makes it easier to debug what block is causing the fault, same as sienna_cichlid. Signed-off-by: Tao Zhou Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit 15ed44c0e7129a0967157f7b349e1b3feb26a534 Author: Tao Zhou Date: Tue Dec 15 18:04:04 2020 +0800 drm/amdgpu: set mode1 reset as default for dimgrey_cavefish Use mode1 reset for dimgrey_cavefish by default. Signed-off-by: Tao Zhou Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit 6bdeff12a96c9a5da95c8d11fefd145eb165e32a Author: Rodrigo Siqueira Date: Tue Dec 15 10:33:34 2020 -0500 drm/amd/display: Add get_dig_frontend implementation for DCEx Some old ASICs might not implement/require get_dig_frontend helper; in this scenario, we can have a NULL pointer exception when we try to call it inside vbios disable operation. For example, this situation might happen when using Polaris12 with an eDP panel. This commit avoids this situation by adding a specific get_dig_frontend implementation for DCEx. Cc: Alex Deucher Cc: Borislav Petkov Cc: Harry Wentland Cc: Nicholas Kazlauskas Cc: Chiawen Huang Reported-and-tested-by: Borislav Petkov Acked-by: Alex Deucher Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit d45f89f7437d0f2c8275b4434096164db106384d Author: Paolo Bonzini Date: Wed Dec 16 13:08:21 2020 -0500 KVM: SVM: fix 32-bit compilation VCPU_REGS_R8...VCPU_REGS_R15 are not defined on 32-bit x86, so cull them from the synchronization of the VMSA. Signed-off-by: Paolo Bonzini commit 1a3449c19407a28f7019a887cdf0d6ba2444751a Author: Kamal Mostafa Date: Tue Dec 15 10:20:10 2020 -0800 selftests/bpf: Clarify build error if no vmlinux If Makefile cannot find any of the vmlinux's in its VMLINUX_BTF_PATHS list, it tries to run btftool incorrectly, with VMLINUX_BTF unset: bpftool btf dump file $(VMLINUX_BTF) format c Such that the keyword 'format' is misinterpreted as the path to vmlinux. The resulting build error message is fairly cryptic: GEN vmlinux.h Error: failed to load BTF from format: No such file or directory This patch makes the failure reason clearer by yielding this instead: Makefile:...: *** Cannot find a vmlinux for VMLINUX_BTF at any of "{paths}". Stop. Fixes: acbd06206bbb ("selftests/bpf: Add vmlinux.h selftest exercising tracing of syscalls") Signed-off-by: Kamal Mostafa Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201215182011.15755-1-kamal@canonical.com commit 4c9e94dff65ca75b917ff0b5de2e44881062a8e8 Merge: ffad560394de3 31ad3eff093cf ee4e0eafa43cf Author: Miquel Raynal Date: Wed Dec 16 18:48:16 2020 +0100 Merge tags 'spi-nor/for-5.11' and 'nand/for-5.11' into mtd/next SPI NOR core changes: - Initial support for stateful Octal DTR mode using volatile settings - Preliminary support for JEDEC 251 (xSPI) and JEDEC 216D standards - Support for Cypress Semper flash - Support to specify ECC block size of SPI NOR flashes - Fixes to avoid clearing of non-volatile Block Protection bits at probe Generic NAND core: * ECC management: - Add an I/O request tweaking mechanism - Entire rework of the software BCH ECC driver, creation of a real ECC engine, getting rid of raw NAND structures, migration to more generic prototypes, misc fixes and style cleanup. Moved now to the Generic NAND layer. - Entire rework of the software Hamming ECC driver, creation of a real ECC engine, getting rid of raw NAND structures, misc renames, comment updates, cleanup, and style fixes. Moved now to the generic NAND layer. - Necessary plumbing at the NAND level to retrieve generic NAND ECC engines (softwares and on-die). - Update of the bindings. Raw NAND core: * Geting rid of the chip->ecc.priv entry. * Fix miscellaneous typos in kernel-doc Raw NAND controller drivers: * AU1550: Ensure the presence of the right includes * Davinci: Do not use extra dereferencing * GPMI: - Fix the driver only sense CS0 R/B issue - Fix the random DMA timeout issue - Use a single line for of_device_id - Use of_device_get_match_data() - Fix reference count leak in gpmi ops - Cleanup makefile - Fix binding matching of clocks on different SoCs * Ingenic: remove redundant get_device() in ingenic_ecc_get() * Intel LGM: New NAND controller driver * Marvell: Drop useless line * Meson: - Fix a resource leak in init - Fix meson_nfc_dma_buffer_release() arguments * mxc: - Use device_get_match_data() - Use a single line for of_device_id - Remove platform data support * Qcom: - Add support for SDX55 - Support for IPQ6018 QPIC NAND controller - Fix DMA sync on FLASH_STATUS register read * Rockchip: New NAND controller driver for RK3308, RK2928 and others * Sunxi: Add MDMA support SPI-NAND core: * Creation of a SPI-NAND on-die ECC engine * Move ECC related definitions earlier in the driver * Fix typo in comment * Fill a default ECC provider/algorithm * Remove outdated comment * Fix OOB read * Allow the case where there is no ECC engine * Use the external ECC engine logic SPI-NAND chip drivers: * Micron: - Add support for MT29F2G01AAAED - Use more specific names * Macronix: - Add support for MX35LFxG24AD - Add support for MX35LFxGE4AD Others: * onenand: Use mtd->oops_panic_write as condition * plat-ram: correctly free memory on error path in platram_probe() commit 8075c3005e4b1efa12dbbf6e84bc412a713de92c Author: John Stultz Date: Wed Dec 16 00:49:31 2020 +0000 dma-buf: cma_heap: Include linux/vmalloc.h to fix build failures on MIPS We need to include in order for MIPS to find vmap(), as it doesn't otherwise get included there. Without this patch, one can hit the following build error: drivers/dma-buf/heaps/cma_heap.c: In function 'cma_heap_do_vmap': drivers/dma-buf/heaps/cma_heap.c:195:10: error: implicit declaration of function 'vmap' Cc: Sumit Semwal Cc: Liam Mark Cc: Laura Abbott Cc: Brian Starkey Cc: Hridya Valsaraju Cc: Suren Baghdasaryan Cc: Sandeep Patil Cc: Daniel Mentz Cc: Chris Goldsworthy Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Fixes: a5d2d29e24be ("dma-buf: heaps: Move heap-helper logic into the cma_heap implementation") Reported-by: Guenter Roeck Signed-off-by: John Stultz Signed-off-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20201216004931.113505-1-john.stultz@linaro.org commit 57030a0b620f735bf557696e5ceb9f32c2b3bb8f Author: Sven Van Asbroeck Date: Tue Dec 15 11:19:54 2020 -0500 lan743x: fix rx_napi_poll/interrupt ping-pong Even if there is more rx data waiting on the chip, the rx napi poll fn will never run more than once - it will always read a few buffers, then bail out and re-arm interrupts. Which results in ping-pong between napi and interrupt. This defeats the purpose of napi, and is bad for performance. Fix by making the rx napi poll behave identically to other ethernet drivers: 1. initialize rx napi polling with an arbitrary budget (64). 2. in the polling fn, return full weight if rx queue is not depleted, this tells the napi core to "keep polling". 3. update the rx tail ("ring the doorbell") once for every 8 processed rx ring buffers. Thanks to Jakub Kicinski, Eric Dumazet and Andrew Lunn for their expert opinions and suggestions. Tested with 20 seconds of full bandwidth receive (iperf3): rx irqs softirqs(NET_RX) ----------------------------- before 23827 33620 after 129 4081 Tested-by: Sven Van Asbroeck # lan7430 Fixes: 23f0703c125be ("lan743x: Add main source files for new lan743x driver") Signed-off-by: Sven Van Asbroeck Link: https://lore.kernel.org/r/20201215161954.5950-1-TheSven73@gmail.com Signed-off-by: Jakub Kicinski commit 34cdf405aa5de827b8bef79a6c82c39120b3729b Author: Chris Chiu Date: Wed Dec 16 20:52:00 2020 +0800 ALSA: hda/realtek: Remove dummy lineout on Acer TravelMate P648/P658 Acer TravelMate laptops P648/P658 series with codec ALC282 only have one physical jack for headset but there's a confusing lineout pin on NID 0x1b reported. Audio applications hence misunderstand that there are a speaker and a lineout, and take the lineout as the default audio output. Add a new quirk to remove the useless lineout and enable the pin 0x18 for jack sensing and headset microphone. Signed-off-by: Chris Chiu Signed-off-by: Jian-Hong Pan Cc: Link: https://lore.kernel.org/r/20201216125200.27053-1-chiu@endlessos.org Signed-off-by: Takashi Iwai commit 846f151d03f796bf1b303784edaf3a22e3f51377 Author: Arnd Bergmann Date: Fri Dec 4 17:51:52 2020 +0100 drm/ttm: fix unused function warning ttm_pool_type_count() is not used when debugfs is disabled: drivers/gpu/drm/ttm/ttm_pool.c:243:21: error: unused function 'ttm_pool_type_count' [-Werror,-Wunused-function] static unsigned int ttm_pool_type_count(struct ttm_pool_type *pt) Move the definition into the #ifdef block. Fixes: d099fc8f540a ("drm/ttm: new TT backend allocation pool v3") Signed-off-by: Arnd Bergmann Reviewed-by: Martin Peres Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/405695/ Signed-off-by: Christian König commit 2d18e54dd8662442ef5898c6bdadeaf90b3cebbc Author: Qinglang Miao Date: Thu Dec 10 09:29:43 2020 +0800 cgroup: Fix memory leak when parsing multiple source parameters A memory leak is found in cgroup1_parse_param() when multiple source parameters overwrite fc->source in the fs_context struct without free. unreferenced object 0xffff888100d930e0 (size 16): comm "mount", pid 520, jiffies 4303326831 (age 152.783s) hex dump (first 16 bytes): 74 65 73 74 6c 65 61 6b 00 00 00 00 00 00 00 00 testleak........ backtrace: [<000000003e5023ec>] kmemdup_nul+0x2d/0xa0 [<00000000377dbdaa>] vfs_parse_fs_string+0xc0/0x150 [<00000000cb2b4882>] generic_parse_monolithic+0x15a/0x1d0 [<000000000f750198>] path_mount+0xee1/0x1820 [<0000000004756de2>] do_mount+0xea/0x100 [<0000000094cafb0a>] __x64_sys_mount+0x14b/0x1f0 Fix this bug by permitting a single source parameter and rejecting with an error all subsequent ones. Fixes: 8d2451f4994f ("cgroup1: switch to option-by-option parsing") Reported-by: Hulk Robot Signed-off-by: Qinglang Miao Reviewed-by: Zefan Li Signed-off-by: Tejun Heo commit dfdc6e73cdcf011a04568231132916c6d06b861f Author: Zheng Yongjun Date: Mon Dec 14 21:44:03 2020 +0800 s390/zcrypt: convert comma to semicolon Replace a comma between expression statements by a semicolon. Signed-off-by: Zheng Yongjun Signed-off-by: Harald Freudenberger Signed-off-by: Heiko Carstens commit 8d93b7011831edc42760aa5d2f0727edda7257d5 Author: Heiko Carstens Date: Mon Dec 14 22:39:01 2020 +0100 s390/idle: allow arch_cpu_idle() to be kprobed Remove NOKPROBE_SYMBOL() for arch_cpu_idle(). This might have made sense when enabled_wait() (aka arch_cpu_idle()) was called from udelay. But now there shouldn't be a reason why s390 should be the only architecture which doesn't allow arch_cpu_idle() to be probed. Signed-off-by: Heiko Carstens commit 7494755a9ad62be7e389b535c77e85ed9c66bece Author: Heiko Carstens Date: Mon Dec 14 22:36:03 2020 +0100 s390/idle: remove raw_local_irq_save()/restore() from arch_cpu_idle() arch_cpu_idle() gets called with interrupts disabled, and psw_idle() returns with interrupts disabled. No reason to use raw_local_irq_save() / restore(). Signed-off-by: Heiko Carstens commit 44292c868473ed6389a78cfa366895b341845579 Author: Heiko Carstens Date: Mon Dec 14 22:33:39 2020 +0100 s390/idle: merge enabled_wait() and arch_cpu_idle() The only caller of enabled_wait() besides arch_cpu_idle() was udelay(). Since that call doesn't exist anymore, merge enabled_wait() and arch_cpu_idle(). Signed-off-by: Heiko Carstens commit e0d62dcb20beac18a412ef9355208d9058c674d3 Author: Heiko Carstens Date: Mon Dec 14 21:44:39 2020 +0100 s390/delay: remove udelay_simple() udelay_simple() callers can make use of the now simplified udelay() implementation. No need to keep it. Signed-off-by: Heiko Carstens commit 9ceed9988a8e6a1656ed2bdaa30501cf0f3dd925 Author: Heiko Carstens Date: Thu Dec 10 22:30:09 2020 +0100 s390/irq: select HAVE_IRQ_EXIT_ON_IRQ_STACK irq_exit() is always called on async stack. Therefore select HAVE_IRQ_EXIT_ON_IRQ_STACK and get a tiny optimization in invoke_softirq(). Signed-off-by: Heiko Carstens commit dd6cfe553212b6311cac27ecd2f67621857fb10a Author: Heiko Carstens Date: Fri Dec 4 12:32:42 2020 +0100 s390/delay: simplify udelay udelay is implemented by using quite subtle details to make it possible to load an idle psw and waiting for an interrupt even in irq context or when interrupts are disabled. Also handling (or better: no handling) of softirqs is taken into account. All this is done to optimize for something which should in normal circumstances never happen: calling udelay to busy wait. Therefore get rid of the whole complexity and just busy loop like other architectures are doing it also. It could have been possible to use diag 0x44 instead of cpu_relax() in the busy loop, however we have seen too many bad things happen with diag 0x44 that it seems to be better to simply busy loop. Also note that with this new implementation kernel preemption does work when within the udelay loop. This did not work before. To get a feeling what the former code optimizes for: IPL'ing a kernel with 'defconfig' and afterwards compiling a kernel ends with a total of zero udelay calls. Signed-off-by: Heiko Carstens commit 91c2bad6aec98a51663ce9eec7c4825c1ca0b870 Author: Heiko Carstens Date: Wed Dec 9 22:09:16 2020 +0100 s390/test_unwind: use timer instead of udelay Instead of registering an external interrupt handler and relying on the udelay implementation, simply use a timer to get into irq context. Acked-by: Ilya Leoshkevich Signed-off-by: Heiko Carstens commit f22b9c219a798e1bf11110a3d2733d883e6da059 Author: Heiko Carstens Date: Sun Dec 13 18:05:56 2020 +0100 s390/test_unwind: fix CALL_ON_STACK tests The CALL_ON_STACK tests use the no_dat stack to switch to a different stack for unwinding tests. If an interrupt or machine check happens while using that stack, and previously being on the async stack, the interrupt / machine check entry code (SWITCH_ASYNC) will assume that the previous context did not use the async stack and happily use the async stack again. This will lead to stack corruption of the previous context. To solve this disable both interrupts and machine checks before switching to the no_dat stack. Fixes: 7868249fbbc8 ("s390/test_unwind: add CALL_ON_STACK tests") Signed-off-by: Heiko Carstens commit f0c7cf13a3d77b3c6071ab179b583435847747e9 Author: Heiko Carstens Date: Fri Dec 4 18:01:22 2020 +0100 s390: make calls to TRACE_IRQS_OFF/TRACE_IRQS_ON balanced In case of udelay CIF_IGNORE_IRQ is set. This leads to an unbalanced call of TRACE_IRQS_OFF and TRACE_IRQS_ON. That is: from lockdep's point of view TRACE_IRQS_ON is called one time too often. This doesn't fix any real bug, just makes the calls balanced. Signed-off-by: Heiko Carstens commit 9365965db0c7ca7fc81eee27c21d8522d7102c32 Author: Heiko Carstens Date: Fri Dec 4 17:56:57 2020 +0100 s390: always clear kernel stack backchain before calling functions Clear the kernel stack backchain before potentially calling the lockdep trace_hardirqs_off/on functions. Without this walking the kernel backchain, e.g. during a panic, might stop too early. Signed-off-by: Heiko Carstens commit fad0319cacdf02a8d4d31aa1d8dc18c5bd5e397e Author: Zheng Yongjun Date: Wed Dec 16 21:26:15 2020 +0800 char: ipmi: convert comma to semicolon Replace a comma between expression statements by a semicolon. Signed-off-by: Zheng Yongjun Message-Id: <20201216132615.15529-1-zhengyongjun3@huawei.com> Signed-off-by: Corey Minyard commit df9716ec9ade3d2e190a2aac199557d30a3a8416 Author: Mark Brown Date: Tue Dec 15 13:20:24 2020 +0000 regulator: pf8x00: Use specific compatible strings for devices The pf8x00 driver supports three devices, the DT compatible strings and I2C IDs should enumerate these specifically rather than using a wildcard so that we don't collide with anything incompatible in the same ID range in the future and so that we can handle any software visible differences between the variants we find. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20201215132024.13356-1-broonie@kernel.org Signed-off-by: Mark Brown commit 13733775326ea9eb81c6148ad60c43b8d231a343 Author: Colin Ian King Date: Wed Dec 16 11:26:08 2020 +0000 ASoC: atmel: fix spelling mistake in Kconfig "programable" -> "programmable" There are a couple of spelling mistakes in the Kconfig help text. Fix them. Signed-off-by: Colin Ian King Reviewed-by: Codrin Ciubotariu Link: https://lore.kernel.org/r/20201216112608.11385-1-colin.king@canonical.com Signed-off-by: Mark Brown commit acd894aee3149c15847bc4f0690fccba59ced5e7 Author: shengjiu wang Date: Wed Dec 16 18:44:24 2020 +0800 ASoC: imx-hdmi: Fix warning of the uninitialized variable ret When condition ((hdmi_out && hdmi_in) || (!hdmi_out && !hdmi_in)) is true, then goto fail, the uninitialized variable ret will be returned. Signed-off-by: shengjiu wang Reported-by: kernel test robot Acked-by: Nicolin Chen Fixes: 6a5f850aa83a ("ASoC: fsl: Add imx-hdmi machine driver") Reviewed-by: Fabio Estevam Link: https://lore.kernel.org/r/1608115464-18710-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit e49037ad12e47cd34239b99b010c5438844923af Author: Colin Ian King Date: Wed Dec 16 12:59:13 2020 +0000 ASoC: SOF: Fix spelling mistake in Kconfig "ond" -> "and" There is a spelling mistake in the Kconfig help text. Fix it. Signed-off-by: Colin Ian King Acked-by: Kai Vehmanen Link: https://lore.kernel.org/r/20201216125913.16041-1-colin.king@canonical.com Signed-off-by: Mark Brown commit 4ad2d3cf2a299645bdc6d72e5b8ee11b2ed147ac Author: Colin Ian King Date: Wed Dec 16 11:28:59 2020 +0000 ASoC: codecs: fix spelling mistake in Kconfig "comunicate" -> "communicate" There is a spelling mistake in the Kconfig help text. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20201216112859.11564-1-colin.king@canonical.com Signed-off-by: Mark Brown commit 44f6a7c0755d8dd453c70557e11687bb080a6f21 Author: Josh Poimboeuf Date: Mon Dec 14 16:04:20 2020 -0600 objtool: Fix seg fault with Clang non-section symbols The Clang assembler likes to strip section symbols, which means objtool can't reference some text code by its section. This confuses objtool greatly, causing it to seg fault. The fix is similar to what was done before, for ORC reloc generation: e81e07244325 ("objtool: Support Clang non-section symbols in ORC generation") Factor out that code into a common helper and use it for static call reloc generation as well. Reported-by: Arnd Bergmann Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Nick Desaulniers Reviewed-by: Miroslav Benes Link: https://github.com/ClangBuiltLinux/linux/issues/1207 Link: https://lkml.kernel.org/r/ba6b6c0f0dd5acbba66e403955a967d9fdd1726a.1607983452.git.jpoimboe@redhat.com commit 3316fb80a0b4c1fef03a3eb1a7f0651e2133c429 Author: Zheng Yongjun Date: Fri Dec 11 16:41:58 2020 +0800 fs/lockd: convert comma to semicolon Replace a comma between expression statements by a semicolon. Signed-off-by: Zheng Yongjun Signed-off-by: Trond Myklebust commit 7be9b38afafbfcc58ede3be66bfc4ea415b3d5f1 Author: Colin Ian King Date: Wed Dec 16 12:25:13 2020 +0000 NFSv4.2: fix error return on memory allocation failure Currently when an alloc_page fails the error return is not set in variable err and a garbage initialized value is returned. Fix this by setting err to -ENOMEM before taking the error return path. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: a1f26739ccdc ("NFSv4.2: improve page handling for GETXATTR") Signed-off-by: Colin Ian King Signed-off-by: Trond Myklebust commit f7387170339afb473a0d95b7732f904346f9795e Author: Christoph Hellwig Date: Mon Sep 28 14:26:13 2020 +0200 writeback: don't warn on an unregistered BDI in __mark_inode_dirty BDIs get unregistered during device removal, and this WARN can be trivially triggered by hot-removing a NVMe device while running fsx It is otherwise harmless as we still hold a BDI reference, and the writeback has been shut down already. Link: https://lore.kernel.org/r/20200928122613.434820-1-hch@lst.de Signed-off-by: Christoph Hellwig Signed-off-by: Jan Kara commit 85a694738f6e7ad36918a3fa0569701b102d06c2 Merge: 4d3d3d70cc907 2a6a35a9ecddb Author: Jiri Kosina Date: Wed Dec 16 11:44:38 2020 +0100 Merge branch 'for-5.11/wacom' into for-linus commit 4d3d3d70cc9072acb2e643102421923ef90fdd97 Merge: 47cdd7f139dc3 cc894ac553605 Author: Jiri Kosina Date: Wed Dec 16 11:42:47 2020 +0100 Merge branch 'for-5.11/sony' into for-linus - DS4 power and firmware reporting fixes, from Roderick Colenbrander - support for ghlive PS3/WII u dongles, from Pascal Giard commit 47cdd7f139dc3e896a627e8c0e98d0501555a889 Merge: 19a0b6d79c970 9735d9deb109a Author: Jiri Kosina Date: Wed Dec 16 11:42:30 2020 +0100 Merge branch 'for-5.11/intel-ish' into for-linus commit 19a0b6d79c970680cdaa3054728c9a64445f2310 Merge: e77bc7dc9af0e afdd34c5fa402 Author: Jiri Kosina Date: Wed Dec 16 11:42:01 2020 +0100 Merge branch 'for-5.11/i2c-hid' into for-linus - error reporting fix from Coiby Xu commit e77bc7dc9af0ec53996367b2053dfafee83b7edb Merge: 105856b36c0ce 82514ecd61435 Author: Jiri Kosina Date: Wed Dec 16 11:41:05 2020 +0100 Merge branch 'for-5.11/elecom' into for-linus - support for EX-G M-XGL20DLBK device, from YOSHIOKA Takuma commit 105856b36c0cefc2fa1c1e649d75da71e2e38c31 Merge: 90c5f4649aafd f43d3870cafa2 Author: Jiri Kosina Date: Wed Dec 16 11:38:38 2020 +0100 Merge branch 'for-5.11/core' into for-linus - increase of maximum HID report size to 16KB in order to support some of the modern devices, from Dean Camera - control interface support for hidraw, from Dean Camera - stylus battery reporting improvement, from Dmitry Torokhov commit 90c5f4649aafd0bca6f47f67ea0ba596c93a3ab0 Merge: 36ed0958feaff b92b80246e062 Author: Jiri Kosina Date: Wed Dec 16 11:38:10 2020 +0100 Merge branch 'for-5.11/asus' into for-linus Support for ASUS N-Key keyboard, from Luke D Jones commit 36ed0958feaffc99214b17f668127bc2cfdcf5b4 Merge: c870d50ce387d 6e6eae04f5123 Author: Jiri Kosina Date: Wed Dec 16 11:33:06 2020 +0100 Merge branch 'for-5.11/amd-sfh-hid' into for-linus From Sandeep Singh. AMD SFH (Sensor Fusion Hub) is HID based driver.SFH FW is part of MP2 processor (MP2 which is an ARM core connected to x86 for processing sensor data) and it runs on MP2 where in the driver resides on X86. The driver functionalities are divided into three parts: 1: amd-mp2-pcie:- This part of the module will communicate with MP2 firmware. MP2 which is exposed as a PCI device to the X86, uses mailboxes to talk to MP2 firmware to send/receive commands. 2: Client Layer:- This part of the driver will use DRAM data and convert the data into HID format based on HID reports. 3: Transport layer :- This part of the driver the will communicate with HID core.Communication between devices and HID core is mostly done via HID reports In terms of architecture, it resembles like ISH (Intel Integrated Sensor Hub). However the major difference is all the hid reports are generated as part of the kernel driver. AMD SFH is integrated as a part of SoC, starting from 17h family of processors. The solution is working well on several OEM products. AMD SFH uses HID over PCIe bus. commit ba8ea8e7dd6e1662e34e730eadfc52aa6816f9dd Author: Thomas Gleixner Date: Sun Dec 6 22:12:55 2020 +0100 tick/sched: Remove bogus boot "safety" check can_stop_idle_tick() checks whether the do_timer() duty has been taken over by a CPU on boot. That's silly because the boot CPU always takes over with the initial clockevent device. But even if no CPU would have installed a clockevent and taken over the duty then the question whether the tick on the current CPU can be stopped or not is moot. In that case the current CPU would have no clockevent either, so there would be nothing to keep ticking. Remove it. Signed-off-by: Thomas Gleixner Acked-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20201206212002.725238293@linutronix.de commit f12ad423c4af877b2e4b5a80928b95195fccab04 Author: Thomas Gleixner Date: Sun Dec 6 22:12:54 2020 +0100 tick: Remove pointless cpu valid check in hotplug code tick_handover_do_timer() which is invoked when a CPU is unplugged has a check for cpumask_first(cpu_online_mask) when it tries to hand over the tick update duty. Checking the result of cpumask_first() there is pointless because if the online mask is empty at this point, then this would be the last CPU in the system going offline, which is impossible. There is always at least one CPU remaining. If online mask would be really empty then the timer duty would be the least of the resulting problems. Remove the well meant check simply because it is pointless and confusing. Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20201206212002.582579516@linutronix.de commit 161b838e25c6f83495e27e3f546b893622d442bf Author: Colin Ian King Date: Mon Dec 14 23:40:15 2020 +0000 netfilter: nftables: fix incorrect increment of loop counter The intention of the err_expr cleanup path is to iterate over the allocated expr_array objects and free them, starting from i - 1 and working down to the start of the array. Currently the loop counter is being incremented instead of decremented and also the index i is being used instead of k, repeatedly destroying the same expr_array element. Fix this by decrementing k and using k as the index into expr_array. Addresses-Coverity: ("Infinite loop") Fixes: 8cfd9b0f8515 ("netfilter: nftables: generalize set expressions support") Signed-off-by: Colin Ian King Signed-off-by: Pablo Neira Ayuso commit 5e60366d56c630e32befce7ef05c569e04391ca3 Merge: 706451d47b371 36f9ff9e03de8 Author: Linus Torvalds Date: Wed Dec 16 00:24:16 2020 -0800 Merge tag 'fallthrough-fixes-clang-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux Pull fallthrough fixes from Gustavo A. R. Silva: "Fix many fall-through warnings when building with Clang 12.0.0 using -Wimplicit-fallthrough. - powerpc: boot: include compiler_attributes.h (Nick Desaulniers) - Revert "lib: Revert use of fallthrough pseudo-keyword in lib/" (Nick Desaulniers) - powerpc: fix -Wimplicit-fallthrough (Nick Desaulniers) - lib: Fix fall-through warnings for Clang (Gustavo A. R. Silva)" * tag 'fallthrough-fixes-clang-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux: lib: Fix fall-through warnings for Clang powerpc: fix -Wimplicit-fallthrough Revert "lib: Revert use of fallthrough pseudo-keyword in lib/" powerpc: boot: include compiler_attributes.h commit 706451d47b3716c24e0553dfdefba11d202effc1 Merge: 7194850efa47c 5f6b99d0287de Author: Linus Torvalds Date: Wed Dec 16 00:19:28 2020 -0800 Merge tag 'linux-kselftest-kunit-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull Kunit updates from Shuah Khan: - documentation update and fix to kunit_tool to parse diagnostic messages correctly from David Gow - Support for Parameterized Testing and fs/ext4 test updates to use KUnit parameterized testing feature from Arpitha Raghunandan - Helper to derive file names depending on --build_dir argument from Andy Shevchenko * tag 'linux-kselftest-kunit-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: fs: ext4: Modify inode-test.c to use KUnit parameterized testing feature kunit: Support for Parameterized Testing kunit: kunit_tool: Correctly parse diagnostic messages Documentation: kunit: provide guidance for testing many inputs kunit: Introduce get_file_path() helper commit 7194850efa47c8dac6e805087dd23c7b03af019d Merge: b80affe33fdd5 c2e46f6b3e355 Author: Linus Torvalds Date: Wed Dec 16 00:17:58 2020 -0800 Merge tag 'linux-kselftest-next-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull Kselftest updates from Shuah Khan: - Much needed gpio test Makefile cleanup to various problems with test dependencies and build errors from Michael Ellerman - Enabling vDSO test on non x86 platforms from Vincenzo Frascino - Fix intel_pstate to replace deprecated ftime() usages with clock_gettime() from Tommi Rantala - cgroup test build fix on older releases from Sachin Sant - A couple of spelling mistake fixes * tag 'linux-kselftest-next-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests/cgroup: Fix build on older distros selftests/run_kselftest.sh: fix dry-run typo tool: selftests: fix spelling typo of 'writting' selftests/memfd: Fix implicit declaration warnings selftests: intel_pstate: ftime() is deprecated selftests/gpio: Add to CLEAN rule rather than overriding selftests/gpio: Fix build when source tree is read only selftests/gpio: Move include of lib.mk up selftests/gpio: Use TEST_GEN_PROGS_EXTENDED kselftest: Extend vdso correctness test to clock_gettime64 kselftest: Move test_vdso to the vDSO test suite kselftest: Extend vDSO selftest to clock_getres kselftest: Extend vDSO selftest kselftest: Enable vDSO test on non x86 platforms commit b80affe33fdd56c8e9f1f0f33ad99f9016a59195 Merge: 7a932e5702886 88f4ede44c585 Author: Linus Torvalds Date: Wed Dec 16 00:15:46 2020 -0800 Merge tag 'linux-kselftest-fixes-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull Kselftest fixes from Shuah Khan: "Build fixes for clone3 and rseq tests" * tag 'linux-kselftest-fixes-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests/clone3: Fix build error rseq/selftests: Fix MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ build error under other arch. commit 7a932e5702886e872a545d64605c06a51ee17973 Merge: 157807123c94a 0774a6ed294b9 Author: Linus Torvalds Date: Wed Dec 16 00:07:17 2020 -0800 Merge tag 'asm-generic-timers-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic Pull asm-generic cross-architecture timer cleanup from Arnd Bergmann: "This cleans up two ancient timer features that were never completed in the past, CONFIG_GENERIC_CLOCKEVENTS and CONFIG_ARCH_USES_GETTIMEOFFSET. There was only one user left for the ARCH_USES_GETTIMEOFFSET variant of clocksource implementations, the ARM EBSA110 platform. Rather than changing to use modern timekeeping, we remove the platform entirely as Russell no longer uses his machine and nobody else seems to have one any more. The conditional code for using arch_gettimeoffset() is removed as a result. For CONFIG_GENERIC_CLOCKEVENTS, there are still a couple of platforms not using clockevent drivers: parisc, ia64, most of m68k, and one Arm platform. These all do timer ticks slighly differently, and this gets cleaned up to the point they at least all call the same helper function. Instead of most platforms using 'select GENERIC_CLOCKEVENTS' in Kconfig, the polarity is now reversed, with the few remaining ones selecting LEGACY_TIMER_TICK instead" * tag 'asm-generic-timers-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: timekeeping: default GENERIC_CLOCKEVENTS to enabled timekeeping: remove xtime_update m68k: remove timer_interrupt() function m68k: change remaining timers to legacy_timer_tick m68k: m68328: use legacy_timer_tick() m68k: sun3/sun3c: use legacy_timer_tick m68k: split heartbeat out of timer function m68k: coldfire: use legacy_timer_tick() parisc: use legacy_timer_tick ARM: rpc: use legacy_timer_tick ia64: convert to legacy_timer_tick timekeeping: add CONFIG_LEGACY_TIMER_TICK timekeeping: remove arch_gettimeoffset net: remove am79c961a driver ARM: remove ebsa110 platform commit 157807123c94acc8dcddd08a2335bd0173c5d68d Merge: e2dc4957349a7 c3634425ff945 Author: Linus Torvalds Date: Tue Dec 15 23:58:04 2020 -0800 Merge tag 'asm-generic-mmu-context-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic Pull asm-generic mmu-context cleanup from Arnd Bergmann: "This is a cleanup series from Nicholas Piggin, preparing for later changes. The asm/mmu_context.h header are generalized and common code moved to asm-gneneric/mmu_context.h. This saves a bit of code and makes it easier to change in the future" * tag 'asm-generic-mmu-context-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: (25 commits) h8300: Fix generic mmu_context build m68k: mmu_context: Fix Sun-3 build xtensa: use asm-generic/mmu_context.h for no-op implementations x86: use asm-generic/mmu_context.h for no-op implementations um: use asm-generic/mmu_context.h for no-op implementations sparc: use asm-generic/mmu_context.h for no-op implementations sh: use asm-generic/mmu_context.h for no-op implementations s390: use asm-generic/mmu_context.h for no-op implementations riscv: use asm-generic/mmu_context.h for no-op implementations powerpc: use asm-generic/mmu_context.h for no-op implementations parisc: use asm-generic/mmu_context.h for no-op implementations openrisc: use asm-generic/mmu_context.h for no-op implementations nios2: use asm-generic/mmu_context.h for no-op implementations nds32: use asm-generic/mmu_context.h for no-op implementations mips: use asm-generic/mmu_context.h for no-op implementations microblaze: use asm-generic/mmu_context.h for no-op implementations m68k: use asm-generic/mmu_context.h for no-op implementations ia64: use asm-generic/mmu_context.h for no-op implementations hexagon: use asm-generic/mmu_context.h for no-op implementations csky: use asm-generic/mmu_context.h for no-op implementations ... commit 27cf94853e6d2b5c981ed4d9f798912027352584 Author: Steve French Date: Wed Dec 16 01:22:54 2020 -0600 cifs: correct four aliased mount parms to allow use of previous names The updates to the new mount API created aliases for some mount parms e.g. esize, idsfromsid, modefromsid, signloosely as "min_enc_offload", "setuidfromacl", "modesid", "ignore_signature" but did not add back in the original name expected by test cases and current users. It also had incorrect names for a few less used mount parms. Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg commit e2dc4957349a7a15f87ac2ea6367b129192769e1 Merge: f986e35083334 8d0dd23c6c78d Author: Linus Torvalds Date: Tue Dec 15 23:41:19 2020 -0800 Merge tag 'asm-generic-cleanup-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic Pull asm-generic cleanups from Arnd Bergmann: "These are a couple of compiler warning fixes to make 'make W=2' less noisy, as well as some fixes to code comments in asm-generic" * tag 'asm-generic-cleanup-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: syscalls: Fix file comments for syscalls implemented in kernel/sys.c ctype.h: remove duplicate isdigit() helper qspinlock: use signed temporaries for cmpxchg asm-generic: fix ffs -Wshadow warning asm-generic: percpu: avoid Wshadow warning asm-generic/sembuf: Update architecture related information in comment commit f986e350833347cb605d9d1ed517325c9a97808d Merge: d01e7f10dae29 8958b2491104d Author: Linus Torvalds Date: Tue Dec 15 23:26:37 2020 -0800 Merge branch 'akpm' (patches from Andrew) Merge yet more updates from Andrew Morton: - lots of little subsystems - a few post-linux-next MM material. Most of the rest awaits more merging of other trees. Subsystems affected by this series: alpha, procfs, misc, core-kernel, bitmap, lib, lz4, checkpatch, nilfs, kdump, rapidio, gcov, bfs, relay, resource, ubsan, reboot, fault-injection, lzo, apparmor, and mm (swap, memory-hotplug, pagemap, cleanups, and gup). * emailed patches from Andrew Morton : (86 commits) mm: fix some spelling mistakes in comments mm: simplify follow_pte{,pmd} mm: unexport follow_pte_pmd apparmor: remove duplicate macro list_entry_is_head() lib/lzo/lzo1x_compress.c: make lzogeneric1x_1_compress() static fault-injection: handle EI_ETYPE_TRUE reboot: hide from sysfs not applicable settings reboot: allow to override reboot type if quirks are found reboot: remove cf9_safe from allowed types and rename cf9_force reboot: allow to specify reboot mode via sysfs reboot: refactor and comment the cpu selection code lib/ubsan.c: mark type_check_kinds with static keyword kcov: don't instrument with UBSAN ubsan: expand tests and reporting ubsan: remove UBSAN_MISC in favor of individual options ubsan: enable for all*config builds ubsan: disable UBSAN_TRAP for all*config ubsan: disable object-size sanitizer under GCC ubsan: move cc-option tests into Kconfig ubsan: remove redundant -Wno-maybe-uninitialized ... commit 5e65f524ed25a124e68bab511a3372821c7dd966 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:40:55 2020 -0600 xen/manage: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Reviewed-by: Boris Ostrovsky Link: https://lore.kernel.org/r/5cfc00b1d8ed68eb2c2b6317806a0aa7e57d27f1.1605896060.git.gustavoars@kernel.org Signed-off-by: Juergen Gross commit 3955bcbf3491aea981c8673a9249b303e3b9038f Author: Gustavo A. R. Silva Date: Fri Nov 20 12:32:58 2020 -0600 xen-blkfront: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Reviewed-by: Boris Ostrovsky Link: https://lore.kernel.org/r/33057688012c34dd60315ad765ff63f070e98c0c.1605896059.git.gustavoars@kernel.org Signed-off-by: Juergen Gross commit eef024124a2259fb12ca33f956a578b15b0ee1d7 Author: Tom Rix Date: Fri Nov 27 08:07:07 2020 -0800 xen: remove trailing semicolon in macro definition The macro use will already have a semicolon. Signed-off-by: Tom Rix Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20201127160707.2622061-1-trix@redhat.com Signed-off-by: Juergen Gross commit bfda93aee0ec95545d58be06ec1166f6c253995a Author: Jason Andryuk Date: Wed Oct 14 13:53:41 2020 -0400 xen: Kconfig: nest Xen guest options Moving XEN_512GB allows it to nest under XEN_PV. That also allows XEN_PVH to nest under XEN as a sibling to XEN_PV and XEN_PVHVM giving: [*] Xen guest support [*] Xen PV guest support [*] Limit Xen pv-domain memory to 512GB [*] Xen PV Dom0 support [*] Xen PVHVM guest support [*] Xen PVH guest support Signed-off-by: Jason Andryuk Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20201014175342.152712-3-jandryuk@gmail.com Signed-off-by: Juergen Gross commit 34aff14580d1b02971adfd63be994f9c045919aa Author: Jason Andryuk Date: Wed Oct 14 13:53:40 2020 -0400 xen: Remove Xen PVH/PVHVM dependency on PCI A Xen PVH domain doesn't have a PCI bus or devices, so it doesn't need PCI support built in. Currently, XEN_PVH depends on XEN_PVHVM which depends on PCI. Introduce XEN_PVHVM_GUEST as a toplevel item and change XEN_PVHVM to a hidden variable. This allows XEN_PVH to depend on XEN_PVHVM without PCI while XEN_PVHVM_GUEST depends on PCI. In drivers/xen, compile platform-pci depending on XEN_PVHVM_GUEST since that pulls in the PCI dependency for linking. Signed-off-by: Jason Andryuk Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20201014175342.152712-2-jandryuk@gmail.com Signed-off-by: Juergen Gross commit e34ff4cda2322e42d4815e042d5a3b46b51c41c4 Author: Qinglang Miao Date: Thu Sep 17 20:55:47 2020 +0800 x86/xen: Convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Qinglang Miao Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20200917125547.104472-1-miaoqinglang@huawei.com Signed-off-by: Juergen Gross commit 8958b2491104d7f254cff0698505392582dbc13a Author: Haitao Shi Date: Tue Dec 15 20:47:26 2020 -0800 mm: fix some spelling mistakes in comments Fix some spelling mistakes in comments: udpate ==> update succesful ==> successful exmaple ==> example unneccessary ==> unnecessary stoping ==> stopping uknown ==> unknown Link: https://lkml.kernel.org/r/20201127011747.86005-1-shihaitao1@huawei.com Signed-off-by: Haitao Shi Reviewed-by: Mike Rapoport Reviewed-by: Souptick Joarder Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ff5c19ed4b087073cea38ff0edc80c23d7256943 Author: Christoph Hellwig Date: Tue Dec 15 20:47:23 2020 -0800 mm: simplify follow_pte{,pmd} Merge __follow_pte_pmd, follow_pte_pmd and follow_pte into a single follow_pte function and just pass two additional NULL arguments for the two previous follow_pte callers. [sfr@canb.auug.org.au: merge fix for "s390/pci: remove races against pte updates"] Link: https://lkml.kernel.org/r/20201111221254.7f6a3658@canb.auug.org.au Link: https://lkml.kernel.org/r/20201029101432.47011-3-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Matthew Wilcox (Oracle) Cc: Daniel Vetter Cc: Dan Williams Cc: Nick Desaulniers Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7336375734d65ecc82956b59a79cf5deccce880c Author: Christoph Hellwig Date: Tue Dec 15 20:47:20 2020 -0800 mm: unexport follow_pte_pmd Patch series "simplify follow_pte a bit". This small series drops the not needed follow_pte_pmd exports, and simplifies the follow_pte family of functions a bit. This patch (of 2): follow_pte_pmd() is only used by the DAX code, which can't be modular. Link: https://lkml.kernel.org/r/20201029101432.47011-2-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Matthew Wilcox (Oracle) Cc: Dan Williams Cc: Daniel Vetter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9801ca279ad37f72f71234fa81722afd95a3f997 Author: Andy Shevchenko Date: Tue Dec 15 20:47:16 2020 -0800 apparmor: remove duplicate macro list_entry_is_head() Strangely I hadn't had noticed the existence of the list_entry_is_head() in apparmor code when added the same one in the list.h. Luckily it's fully identical and didn't break builds. In any case we don't need a duplicate anymore, thus remove it from apparmor code. Link: https://lkml.kernel.org/r/20201208100639.88182-1-andriy.shevchenko@linux.intel.com Fixes: e130816164e244 ("include/linux/list.h: add a macro to test if entry is pointing to the head") Signed-off-by: Andy Shevchenko Acked-by: John Johansen Cc: James Morris Cc: "Serge E . Hallyn " Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 33fb626be08f3877b92e3c1782eac1a9a1575ea5 Author: Jason Yan Date: Tue Dec 15 20:47:13 2020 -0800 lib/lzo/lzo1x_compress.c: make lzogeneric1x_1_compress() static Fix the following sparse warning: lib/lzo/lzo1x_compress.c:304:5: warning: symbol 'lzogeneric1x_1_compress' was not declared. Should it be static? Link: https://lkml.kernel.org/r/20201020031415.136874-1-yanaijie@huawei.com Signed-off-by: Jason Yan Cc: Dave Rodgman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 537cd89484ab57ca38ae25d9557361c0815977d1 Author: Barnabás Pőcze Date: Tue Dec 15 20:47:10 2020 -0800 fault-injection: handle EI_ETYPE_TRUE Commit af3b854492f351d1 ("mm/page_alloc.c: allow error injection") introduced EI_ETYPE_TRUE, but did not extend * lib/error-inject.c:error_type_string(), and * kernel/fail_function.c:adjust_error_retval() to accommodate for this change. Handle EI_ETYPE_TRUE in both functions appropriately by * returning "TRUE" in error_type_string(), * adjusting the return value to true (1) in adjust_error_retval(). Furthermore, simplify the logic of handling EI_ETYPE_NULL in adjust_error_retval(). Link: https://lkml.kernel.org/r/njB1czX0ZgWPR9h61euHIBb5bEyePw9D4D2m3i5lc9Cl96P8Q1308dTcmsEZW7Vtz3Ifz4do-rOtSfuFTyGoEDYokkK2aUqBePVptzZEWfU=@protonmail.com Signed-off-by: Barnabás Pőcze Acked-by: Masami Hiramatsu Reviewed-by: Akinobu Mita Cc: "Naveen N. Rao" Cc: Anil S Keshavamurthy Cc: "David S. Miller" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 40247e55ba099067bf160332365ed78b5aeb62da Author: Matteo Croce Date: Tue Dec 15 20:47:07 2020 -0800 reboot: hide from sysfs not applicable settings Not all the reboot settings from both the kernel command line or sysfs interface are available to all platforms. Filter out reboot_type and reboot_force which are x86 only, and also remove reboot_cpu on kernels without SMP support. This saves some space, and avoid confusing the user with settings which will have no effect. Link: https://lkml.kernel.org/r/20201130173717.198952-3-mcroce@linux.microsoft.com Signed-off-by: Matteo Croce Reviewed-by: Petr Mladek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1a9d079f43e3215b81ec13d427950093b8f04c70 Author: Matteo Croce Date: Tue Dec 15 20:47:04 2020 -0800 reboot: allow to override reboot type if quirks are found Patch series "reboot: sysfs improvements". Some improvements to the sysfs reboot interface: hide not working settings and support machines with known reboot quirks. This patch (of 2): On some machines a quirk can force a specific reboot type. Quirks are found during a DMI scan, the list of machines which need special reboot handling is defined in reboot_dmi_table. The kernel command line reboot= option overrides this via a global variable `reboot_default`, so that the reboot type requested in the command line is really performed. This was not true when setting the reboot type via the new sysfs interface. Fix this by setting reboot_default upon the first change, like reboot_setup() does for the command line. Link: https://lkml.kernel.org/r/20201130173717.198952-1-mcroce@linux.microsoft.com Link: https://lkml.kernel.org/r/20201130173717.198952-2-mcroce@linux.microsoft.com Signed-off-by: Matteo Croce Reviewed-by: Petr Mladek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0c5c0179e2cddb0d1c52ba1487f9f9e77714c8af Author: Matteo Croce Date: Tue Dec 15 20:47:00 2020 -0800 reboot: remove cf9_safe from allowed types and rename cf9_force BOOT_CF9_SAFE_STR is an internal value used only by the x86 code and it's not possible to set it from userspace. Remove it, and rename 'cf9_force' to 'pci', so to make it coherent with the kernel command line reboot= option. Tested with this script: cd /sys/kernel/reboot/ for i in cold warm hard soft gpio; do echo $i >mode read j type read j cpu read j force read j Cc: Arnd Bergmann Cc: Guenter Roeck Cc: Kees Cook Cc: Mike Rapoport Cc: Nathan Chancellor Cc: Pavel Tatashin Cc: Petr Mladek Cc: Tyler Hicks Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2c622ed0eaa38b68d7440bedb8c6cdd138b5a860 Author: Matteo Croce Date: Tue Dec 15 20:46:57 2020 -0800 reboot: allow to specify reboot mode via sysfs The kernel cmdline reboot= option offers some sort of control on how the reboot is issued. We don't always know in advance what type of reboot to perform. Sometimes a warm reboot is preferred to persist certain memory regions across the reboot. Others a cold one is needed to apply a future system update that makes a memory memory model change, like changing the base page size or resizing a persistent memory region. Or simply we want to enable reboot_force because we noticed that something bad happened. Add handles in sysfs to allow setting these reboot options, so they can be changed when the system is booted, other than at boot time. The handlers are under /kernel/reboot, can be read to get the current configuration and written to alter it. # cd /sys/kernel/reboot/ # grep . * cpu:0 force:0 mode:cold type:acpi # echo 2 >cpu # echo yes >force # echo soft >mode # echo bios >type # grep . * cpu:2 force:1 mode:soft type:bios Before setting anything, check for CAP_SYS_BOOT capability, so it's possible to allow an unpriviledged process to change these settings simply by relaxing the handles permissions, without opening them to the world. [natechancellor@gmail.com: fix variable assignments in type_store] Link: https://lkml.kernel.org/r/20201112035023.974748-1-natechancellor@gmail.com Link: https://github.com/ClangBuiltLinux/linux/issues/1197 Link: https://lkml.kernel.org/r/20201110202746.9690-1-mcroce@linux.microsoft.com Signed-off-by: Matteo Croce Signed-off-by: Nathan Chancellor Reviewed-by: Petr Mladek Cc: Mike Rapoport Cc: Guenter Roeck Cc: Arnd Bergmann Cc: Pavel Tatashin Cc: Kees Cook Cc: Tyler Hicks Cc: Nathan Chancellor Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f9a90501faac55ddbea93c1f73497857f1997227 Author: Matteo Croce Date: Tue Dec 15 20:46:53 2020 -0800 reboot: refactor and comment the cpu selection code Small improvements to the code, without changing the way it works: - use a local variable, to avoid a small time lapse where reboot_cpu can have an invalid value - comment the code which is not easy to understand at a glance - merge two identical code blocks into one - replace pointer arithmetics with equivalent array syntax Link: https://lkml.kernel.org/r/20201103214025.116799-4-mcroce@linux.microsoft.com Signed-off-by: Matteo Croce Cc: Arnd Bergmann Cc: Fabian Frederick Cc: Greg Kroah-Hartman Cc: Guenter Roeck Cc: Kees Cook Cc: Mike Rapoport Cc: Pavel Tatashin Cc: Petr Mladek Cc: Robin Holt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d3c227978a130ee18716d3496cf82621d8cda28c Author: Zou Wei Date: Tue Dec 15 20:46:50 2020 -0800 lib/ubsan.c: mark type_check_kinds with static keyword Fix the following sparse warning: lib/ubsan.c:20:12: warning: symbol 'type_check_kinds' was not declared. Should it be static? [akpm@linux-foundation.org: make it `static const char * const' while we're in there] Link: https://lkml.kernel.org/r/1607602638-79584-1-git-send-email-zou_wei@huawei.com Signed-off-by: Zou Wei Reviewed-by: Andrew Morton Reviewed-by: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c1cb05e77f8e3ec89eec7bed64af07cd20ed24de Author: Dmitry Vyukov Date: Tue Dec 15 20:46:46 2020 -0800 kcov: don't instrument with UBSAN Both KCOV and UBSAN use compiler instrumentation. If UBSAN detects a bug in KCOV, it may cause infinite recursion via printk and other common functions. We already don't instrument KCOV with KASAN/KCSAN for this reason, don't instrument it with UBSAN as well. As a side effect this also resolves the following gcc warning: conflicting types for built-in function '__sanitizer_cov_trace_switch'; expected 'void(long unsigned int, void *)' [-Wbuiltin-declaration-mismatch] It's only reported when kcov.c is compiled with any of the sanitizers enabled. Size of the arguments is correct, it's just that gcc uses 'long' on 64-bit arches and 'long long' on 32-bit arches, while kernel type is always 'long long'. Link: https://lkml.kernel.org/r/20201209100152.2492072-1-dvyukov@google.com Signed-off-by: Dmitry Vyukov Reported-by: Stephen Rothwell Suggested-by: Marco Elver Acked-by: Marco Elver Reviewed-by: Andrey Konovalov Reviewed-by: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4a26f49b7b3dbe998d9b2561f9f256a1c3fdb74a Author: Kees Cook Date: Tue Dec 15 20:46:43 2020 -0800 ubsan: expand tests and reporting Expand the UBSAN tests to include some additional UB cases. Notably the out-of-bounds enum loading appears not to work. Also include per-test reporting, including the relevant CONFIG_UBSAN... Kconfigs. Link: https://lkml.kernel.org/r/20201203004437.389959-8-keescook@chromium.org Signed-off-by: Kees Cook Cc: Andrey Ryabinin Cc: Ard Biesheuvel Cc: Arnd Bergmann Cc: Dmitry Vyukov Cc: George Popescu Cc: Herbert Xu Cc: Linus Torvalds Cc: Marco Elver Cc: Masahiro Yamada Cc: Michal Marek Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Peter Oberparleiter Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c637693b20da8706b7f48d96882c9c80ae935151 Author: Kees Cook Date: Tue Dec 15 20:46:39 2020 -0800 ubsan: remove UBSAN_MISC in favor of individual options Make each UBSAN option individually selectable and remove UBSAN_MISC which no longer has any purpose. Add help text for each Kconfig, and include a reference to the Clang sanitizer documentation. Disable unsigned overflow by default (not available with GCC and makes x86 unbootable with Clang). Disable unreachable when objtool is in use (redundant and confuses things: instrumentation appears at unreachable locations). Link: https://lkml.kernel.org/r/20201203004437.389959-7-keescook@chromium.org Signed-off-by: Kees Cook Cc: Andrey Ryabinin Cc: Ard Biesheuvel Cc: Arnd Bergmann Cc: Dmitry Vyukov Cc: George Popescu Cc: Herbert Xu Cc: Linus Torvalds Cc: Marco Elver Cc: Masahiro Yamada Cc: Michal Marek Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Peter Oberparleiter Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d0a3ac549f389c1511a4df0d7638536305205d20 Author: Kees Cook Date: Tue Dec 15 20:46:35 2020 -0800 ubsan: enable for all*config builds With UBSAN_OBJECT_SIZE disabled for GCC, only UBSAN_ALIGNMENT remained a noisy UBSAN option. Disable it for COMPILE_TEST so the rest of UBSAN can be used for full all*config builds or other large combinations. [sfr@canb.auug.org.au: add .data..Lubsan_data*/.data..Lubsan_type* sections explicitly] Link: https://lkml.kernel.org/r/20201208230157.42c42789@canb.auug.org.au Link: https://lore.kernel.org/lkml/CAHk-=wgXW=YLxGN0QVpp-1w5GDd2pf1W-FqY15poKzoVfik2qA@mail.gmail.com/ Link: https://lkml.kernel.org/r/20201203004437.389959-6-keescook@chromium.org Signed-off-by: Kees Cook Signed-off-by: Stephen Rothwell Cc: Andrey Ryabinin Cc: Ard Biesheuvel Cc: Arnd Bergmann Cc: Dmitry Vyukov Cc: George Popescu Cc: Herbert Xu Cc: Linus Torvalds Cc: Marco Elver Cc: Masahiro Yamada Cc: Michal Marek Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Peter Oberparleiter Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 79791378a1bc9e218462211742e48e375371e8c5 Author: Kees Cook Date: Tue Dec 15 20:46:31 2020 -0800 ubsan: disable UBSAN_TRAP for all*config Doing all*config builds attempts to build as much as possible. UBSAN_TRAP effectively short-circuits lib/usban.c, so it should be disabled for COMPILE_TEST so that the lib/ubsan.c code gets built. Link: https://lkml.kernel.org/r/20201203004437.389959-5-keescook@chromium.org Signed-off-by: Kees Cook Reviewed-by: Nathan Chancellor Cc: Andrey Ryabinin Cc: Ard Biesheuvel Cc: Arnd Bergmann Cc: Dmitry Vyukov Cc: George Popescu Cc: Herbert Xu Cc: Linus Torvalds Cc: Marco Elver Cc: Masahiro Yamada Cc: Michal Marek Cc: Nick Desaulniers Cc: Peter Oberparleiter Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 61e0349f703d1576a12f88c15f25e0a56fd277af Author: Kees Cook Date: Tue Dec 15 20:46:28 2020 -0800 ubsan: disable object-size sanitizer under GCC GCC's -fsanitize=object-size (as part of CONFIG_UBSAN_MISC) greatly increases stack utilization. Do not allow this under GCC. Link: https://lkml.kernel.org/r/20201203004437.389959-4-keescook@chromium.org Link: https://lore.kernel.org/lkml/CAHk-=wjPasyJrDuwDnpHJS2TuQfExwe=px-SzLeN8GFMAQJPmQ@mail.gmail.com/ Signed-off-by: Kees Cook Reviewed-by: Nathan Chancellor Suggested-by: Linus Torvalds Cc: Andrey Ryabinin Cc: Ard Biesheuvel Cc: Arnd Bergmann Cc: Dmitry Vyukov Cc: George Popescu Cc: Herbert Xu Cc: Marco Elver Cc: Masahiro Yamada Cc: Michal Marek Cc: Nick Desaulniers Cc: Peter Oberparleiter Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cdf8a76fda4ae3b53c5a09e5a8c79e27b7b65d68 Author: Kees Cook Date: Tue Dec 15 20:46:24 2020 -0800 ubsan: move cc-option tests into Kconfig Instead of doing if/endif blocks with cc-option calls in the UBSAN Makefile, move all the tests into Kconfig and use the Makefile to collect the results. Link: https://lkml.kernel.org/r/20201203004437.389959-3-keescook@chromium.org Link: https://lore.kernel.org/lkml/CAHk-=wjPasyJrDuwDnpHJS2TuQfExwe=px-SzLeN8GFMAQJPmQ@mail.gmail.com/ Signed-off-by: Kees Cook Suggested-by: Linus Torvalds Reviewed-by: Nathan Chancellor Tested-by: Nathan Chancellor Cc: Andrey Ryabinin Cc: Ard Biesheuvel Cc: Arnd Bergmann Cc: Dmitry Vyukov Cc: George Popescu Cc: Herbert Xu Cc: Marco Elver Cc: Masahiro Yamada Cc: Michal Marek Cc: Nick Desaulniers Cc: Peter Oberparleiter Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d8a7f62b6eec198e85b8602e062c00e199f5c328 Author: Kees Cook Date: Tue Dec 15 20:46:20 2020 -0800 ubsan: remove redundant -Wno-maybe-uninitialized Patch series "Clean up UBSAN Makefile", v2. This series attempts to address the issues seen with UBSAN's object-size sanitizer causing problems under GCC. In the process, the Kconfig and Makefile are refactored to do all the cc-option calls in the Kconfig. Additionally start to detangle -Wno-maybe-uninitialized, disable UBSAN_TRAP under COMPILE_TEST for wider build coverage, and expand the libusan tests. This patch (of 7): In commit 78a5255ffb6a ("Stop the ad-hoc games with -Wno-maybe-initialized") -Wmaybe-uninitialized was disabled globally, so keeping the disabling logic here too doesn't make sense. Link: https://lkml.kernel.org/r/20201203004437.389959-1-keescook@chromium.org Link: https://lkml.kernel.org/r/20201203004437.389959-2-keescook@chromium.org Signed-off-by: Kees Cook Cc: Linus Torvalds Cc: Ard Biesheuvel Cc: Arnd Bergmann Cc: Masahiro Yamada Cc: Michal Marek Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Marco Elver Cc: Randy Dunlap Cc: Dmitry Vyukov Cc: George Popescu Cc: Herbert Xu Cc: Peter Oberparleiter Cc: Andrey Ryabinin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3be8da570868a7989f1a0c11820ee1413877fa8c Author: Mauro Carvalho Chehab Date: Tue Dec 15 20:46:16 2020 -0800 kernel/resource.c: fix kernel-doc markups Kernel-doc markups should use this format: identifier - description While here, fix a kernel-doc tag that was using, instead, a normal comment block. [akpm@linux-foundation.org: coding style fixes] Link: https://lkml.kernel.org/r/c5e38e1070f8dbe2f9607a10b44afe2875bd966c.1605521731.git.mchehab+huawei@kernel.org Signed-off-by: Mauro Carvalho Chehab Cc: "Jonathan Corbet" Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit abf4e00c7bc69f7b878039ebe57d885e3bdc4fdb Author: Jani Nikula Date: Tue Dec 15 20:46:13 2020 -0800 blktrace: make relay callbacks const Now that relay_open() accepts const callbacks, make relay callbacks const. Link: https://lkml.kernel.org/r/7ff5ce0b735901eb4f10e13da2704f1d8c4a2507.1606153547.git.jani.nikula@intel.com Signed-off-by: Jani Nikula Reviewed-by: Christoph Hellwig Cc: Jens Axboe Cc: Kalle Valo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1bf9c2e887221ce80666f345d24ad074d4b42906 Author: Jani Nikula Date: Tue Dec 15 20:46:10 2020 -0800 ath9k: make relay callbacks const Now that relay_open() accepts const callbacks, make relay callbacks const. Link: https://lkml.kernel.org/r/7db0286c428f3a478dd7544afef04a3b131f1aa0.1606153547.git.jani.nikula@intel.com Signed-off-by: Jani Nikula Acked-by: Kalle Valo Reviewed-by: Christoph Hellwig Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 36b0cefe901a06aab1d488c12c38b8076054bc12 Author: Jani Nikula Date: Tue Dec 15 20:46:06 2020 -0800 ath11k: make relay callbacks const Now that relay_open() accepts const callbacks, make relay callbacks const. Link: https://lkml.kernel.org/r/44e3d65b71025c462948d0c554061dc7b40ab488.1606153547.git.jani.nikula@intel.com Signed-off-by: Jani Nikula Acked-by: Kalle Valo Reviewed-by: Christoph Hellwig Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f573f8150f018cbb9c55fdb336b6cac9d9320680 Author: Jani Nikula Date: Tue Dec 15 20:46:03 2020 -0800 ath10k: make relay callbacks const Now that relay_open() accepts const callbacks, make relay callbacks const. Link: https://lkml.kernel.org/r/85cabc6d4b0d0ca43d4e0fb94897ccd16e3b7930.1606153547.git.jani.nikula@intel.com Signed-off-by: Jani Nikula Acked-by: Kalle Valo Reviewed-by: Christoph Hellwig Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5000cd8adc6aaea51b0bca0c1e184c61ccf3e4fa Author: Jani Nikula Date: Tue Dec 15 20:46:00 2020 -0800 drm/i915: make relay callbacks const Now that relay_open() accepts const callbacks, make relay callbacks const. Link: https://lkml.kernel.org/r/534d089f413db98aa0b94773fa49d5275d0d3c25.1606153547.git.jani.nikula@intel.com Signed-off-by: Jani Nikula Reviewed-by: Christoph Hellwig Cc: Jens Axboe Cc: Kalle Valo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 023542f48b57d6b785fcadb86ac336ae80653e58 Author: Jani Nikula Date: Tue Dec 15 20:45:57 2020 -0800 relay: allow the use of const callback structs None of the relay users require the use of mutable structs for callbacks, however the relay code does. Instead of assigning the default callback for subbuf_start, add a wrapper to conditionally call the client callback if available, and fall back to default behaviour otherwise. This lets all relay users make their struct rchan_callbacks const data. [jani.nikula@intel.com: cleanups, per Christoph] Link: https://lkml.kernel.org/r/20201124115412.32402-1-jani.nikula@intel.com Link: https://lkml.kernel.org/r/cc3ff292e4eb4fdc56bee3d690c7b8e39209cd37.1606153547.git.jani.nikula@intel.com Signed-off-by: Jani Nikula Reviewed-by: Christoph Hellwig Cc: Jens Axboe Cc: Kalle Valo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 371e03880d9d34534d3eafd2a7581042be598e39 Author: Jani Nikula Date: Tue Dec 15 20:45:53 2020 -0800 relay: make create_buf_file and remove_buf_file callbacks mandatory All clients provide create_buf_file and remove_buf_file callbacks, and they're required for relay to make sense. There is no point in them being optional. Also document whether each callback is mandatory/optional. Link: https://lkml.kernel.org/r/88003c1527386b93036e286e7917f1e33aec84ac.1606153547.git.jani.nikula@intel.com Signed-off-by: Jani Nikula Suggested-by: Christoph Hellwig Reviewed-by: Christoph Hellwig Cc: Jens Axboe Cc: Kalle Valo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6f8f25440d791855e8b6a26cd2bff9d738468416 Author: Jani Nikula Date: Tue Dec 15 20:45:50 2020 -0800 relay: require non-NULL callbacks in relay_open() There are no clients passing NULL callbacks, which makes sense as it wouldn't even create a file. Require non-NULL callbacks, and throw away the handling for NULL callbacks. Link: https://lkml.kernel.org/r/e40642f3b027d2bb6bc851ddb60e0a61ea51f5f8.1606153547.git.jani.nikula@intel.com Signed-off-by: Jani Nikula Suggested-by: Christoph Hellwig Reviewed-by: Christoph Hellwig Cc: Jens Axboe Cc: Kalle Valo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3d03295a7e9194c2318977b44999972ce3609664 Author: Jani Nikula Date: Tue Dec 15 20:45:47 2020 -0800 relay: remove unused buf_mapped and buf_unmapped callbacks Patch series "relay: cleanup and const callbacks", v2. None of the relay users require the use of mutable structs for callbacks, however the relay code does. Instead of assigning default callbacks when there is none, add callback wrappers to conditionally call the client callbacks if available, and fall back to default behaviour (typically no-op) otherwise. This lets all relay users make their struct rchan_callbacks const data. This series starts with a number of cleanups first based on Christoph's feedback. This patch (of 9): No relay client uses the buf_mapped or buf_unmapped callbacks. Remove them. This makes relay's vm_operations_struct close callback a dummy, remove it as well. Link: https://lkml.kernel.org/r/cover.1606153547.git.jani.nikula@intel.com Link: https://lkml.kernel.org/r/c69fff6e0cd485563604240bbfcc028434983bec.1606153547.git.jani.nikula@intel.com Signed-off-by: Jani Nikula Suggested-by: Christoph Hellwig Reviewed-by: Christoph Hellwig Cc: Jens Axboe Cc: Kalle Valo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dc889b8d4a8122549feabe99eead04e6b23b6513 Author: Randy Dunlap Date: Tue Dec 15 20:45:44 2020 -0800 bfs: don't use WARNING: string when it's just info. Make the printk() [bfs "printf" macro] seem less severe by changing "WARNING:" to "NOTE:". warns us about using WARNING or BUG in a format string other than in WARN() or BUG() family macros. bfs/inode.c is doing just that in a normal printk() call, so change the "WARNING" string to be "NOTE". Link: https://lkml.kernel.org/r/20201203212634.17278-1-rdunlap@infradead.org Reported-by: syzbot+3fd34060f26e766536ff@syzkaller.appspotmail.com Signed-off-by: Randy Dunlap Cc: Dmitry Vyukov Cc: Al Viro Cc: "Tigran A. Aivazian" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 26ecea089f422b6f518f2906495a2d64ca7938d7 Author: Alex Shi Date: Tue Dec 15 20:45:40 2020 -0800 gcov: fix kernel-doc markup issue Fix the following kernel-doc issue in gcov: kernel/gcov/gcc_4_7.c:238: warning: Function parameter or member 'dst' not described in 'gcov_info_add' kernel/gcov/gcc_4_7.c:238: warning: Function parameter or member 'src' not described in 'gcov_info_add' kernel/gcov/gcc_4_7.c:238: warning: Excess function parameter 'dest' description in 'gcov_info_add' kernel/gcov/gcc_4_7.c:238: warning: Excess function parameter 'source' description in 'gcov_info_add' Link: https://lkml.kernel.org/r/1605252352-63983-1-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Alex Shi Acked-by: Peter Oberparleiter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 99b75eb7c86b05f9594e8a7826174b8bf22e82b8 Author: Nick Desaulniers Date: Tue Dec 15 20:45:37 2020 -0800 gcov: remove support for GCC < 4.9 Since commit 0bddd227f3dc ("Documentation: update for gcc 4.9 requirement") the minimum supported version of GCC is gcc-4.9. It's now safe to remove this code. Similar to commit 10415533a906 ("gcov: Remove old GCC 3.4 support") but that was for GCC 4.8 and this is for GCC 4.9. Link: https://github.com/ClangBuiltLinux/linux/issues/427 Link: https://lkml.kernel.org/r/20201111030557.2015680-1-ndesaulniers@google.com Signed-off-by: Nick Desaulniers Reviewed-by: Peter Oberparleiter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5c7b3280d221b84a675b85cb2727df7d82b65c3a Author: Sebastian Andrzej Siewior Date: Tue Dec 15 20:45:34 2020 -0800 rapidio: remove unused rio_get_asm() and rio_get_device() The functions rio_get_asm() and rio_get_device() are globally exported but have almost no users in tree. The only user is rio_init_mports() which invokes it via rio_init(). rio_init() iterates over every registered device and invokes rio_fixup_device(). It looks like a fixup function which should perform a "change" to the device but does nothing. It has been like this since its introduction in commit 394b701ce4fbf ("[PATCH] RapidIO support: core base") which was merged into v2.6.15-rc1. Remove rio_init() because the performed fixup function (rio_fixup_device()) does nothing. Remove rio_get_asm() and rio_get_device() which have no callers now. Link: https://lkml.kernel.org/r/20201116170004.420143-1-bigeasy@linutronix.de Signed-off-by: Sebastian Andrzej Siewior Cc: Matt Porter Cc: Alexandre Bounine Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ca4a9241cc5e718de86a34afd41972869546a5e3 Author: Alexander Egorenkov Date: Tue Dec 15 20:45:31 2020 -0800 kdump: append uts_namespace.name offset to VMCOREINFO The offset of the field 'init_uts_ns.name' has changed since commit 9a56493f6942 ("uts: Use generic ns_common::count"). Make the offset of the field 'uts_namespace.name' available in VMCOREINFO because tools like 'crash-utility' and 'makedumpfile' must be able to read it from crash dumps. Link: https://lore.kernel.org/r/159644978167.604812.1773586504374412107.stgit@localhost.localdomain Link: https://lkml.kernel.org/r/20200930102328.396488-1-egorenar@linux.ibm.com Signed-off-by: Alexander Egorenkov Acked-by: lijiang Acked-by: Baoquan He Cc: Dave Young Cc: Vivek Goyal Cc: "Eric W . Biederman" Cc: Kirill Tkhai Cc: Kees Cook Cc: Christian Brauner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e7920b3e9d9f5470d5ff7d883e72a47addc0a137 Author: Alex Shi Date: Tue Dec 15 20:45:27 2020 -0800 fs/nilfs2: remove some unused macros to tame gcc There some macros are unused and cause gcc warning. Remove them. fs/nilfs2/segment.c:137:0: warning: macro "nilfs_cnt32_gt" is not used [-Wunused-macros] fs/nilfs2/segment.c:144:0: warning: macro "nilfs_cnt32_le" is not used [-Wunused-macros] fs/nilfs2/segment.c:143:0: warning: macro "nilfs_cnt32_lt" is not used [-Wunused-macros] Link: https://lkml.kernel.org/r/1607552733-24292-1-git-send-email-konishi.ryusuke@gmail.com Signed-off-by: Ryusuke Konishi Signed-off-by: Alex Shi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f5eea3b0442da801404859a780c02721d649f02f Author: Joe Perches Date: Tue Dec 15 20:45:24 2020 -0800 checkpatch: add printk_once and printk_ratelimit to prefer pr_ warning Add the _once and _ratelimited variants to the test for printk(KERN_ that should prefer pr_. Miscellanea: o Add comment description for the conversions [joe@perches.com: fixlet] Link: https://lkml.kernel.org/r/32260871d4718ba7f48a8e9e07452bb76de300db.camel@perches.comLink: https://lkml.kernel.org/r/993b72b2ef91a57c5e725b52971ce3fd31375061.camel@perches.com Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7da07c31b1df1fa973d184378862443302fd1129 Author: Dwaipayan Ray Date: Tue Dec 15 20:45:21 2020 -0800 checkpatch: fix TYPO_SPELLING check for words with apostrophe checkpatch reports a false TYPO_SPELLING warning for some words containing an apostrophe when run with --codespell option. A false positive is "doesn't". Occurrence of the word causes checkpatch to emit the following warning: "WARNING: 'doesn'' may be misspelled - perhaps 'doesn't'?" Modify the regex pattern to be more in line with the codespell default word matching regex. This fixes the word capture and avoids the false warning. In addition, highlight the misspelled word location by adding a caret below the word. [akpm@linux-foundation.org: make matched misspelling more obvious, per Joe] Link: https://lkml.kernel.org/r/09c24ef1aa2f1c4fe909d76f5426f08780b9d81c.camel@perches.com Link: https://lkml.kernel.org/r/20201201190729.169733-1-dwaipayanray1@gmail.com Signed-off-by: Dwaipayan Ray Suggested-by: Joe Perches Reported-by: Peilin Ye Acked-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 084a617acfa08118eafb51a6ef43e6fa4705853d Author: Dwaipayan Ray Date: Tue Dec 15 20:45:18 2020 -0800 checkpatch: add warning for lines starting with a '#' in commit log Commit log lines starting with '#' are dropped by git as comments. Add a check to emit a warning for these lines. Also add a --fix option to insert a space before the leading '#' in such lines. Link: https://lkml.kernel.org/r/20201202205740.127986-1-dwaipayanray1@gmail.com Signed-off-by: Dwaipayan Ray Suggested-by: Joe Perches Suggested-by: Peilin Ye Tested-by: Peilin Ye Acked-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 70eb2275ff8e0b4cafe67176674d580c987c071d Author: Dwaipayan Ray Date: Tue Dec 15 20:45:15 2020 -0800 checkpatch: add warning for unnecessary use of %h[xudi] and %hh[xudi] Modifiers %h and %hh should never be used. Commit cbacb5ab0aa0 ("docs: printk-formats: Stop encouraging use of unnecessary %h[xudi] and %hh[xudi]") specifies that: "Standard integer promotion is already done and %hx and %hhx is useless so do not encourage the use of %hh[xudi] or %h[xudi]." "The "h" and "hh" things should never be used. The only reason for them being used if you have an "int", but you want to print it out as a "char" (and honestly, that is a really bad reason, you'd be better off just using a proper cast to make the code more obvious)." Add a new check to emit a warning on finding an unneeded use of %h or %hh modifier. Also add a fix option to the check. Link: https://lore.kernel.org/lkml/4910042649a4f3ab22fac93191b8c1fa0a2e17c3.camel@perches.com/ Link: https://lkml.kernel.org/r/20201128200046.78739-1-dwaipayanray1@gmail.com Signed-off-by: Dwaipayan Ray Suggested-by: Joe Perches Suggested-by: Lukas Bulwahn Acked-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 831242ab8dffab4cf2f89c597d5902ac86caeefe Author: Aditya Srivastava Date: Tue Dec 15 20:45:12 2020 -0800 checkpatch: add fix and improve warning msg for non-standard signature Currently checkpatch warns for BAD_SIGN_OFF on non-standard signature styles. A large number of these warnings occur because of typo mistakes in signature tags. An evaluation over v4.13..v5.8 showed that out of 539 warnings due to non-standard signatures, 87 are due to typo mistakes. Following are the standard signature tags which are often incorrectly used, along with their individual counts of incorrect use (over v4.13..v5.8): Reviewed-by: 42 Signed-off-by: 25 Reported-by: 6 Acked-by: 4 Tested-by: 4 Suggested-by: 4 Provide a fix by calculating levenshtein distance for the signature tag with all the standard signatures and suggest a fix with a signature, whose edit distance is less than or equal to 2 with the misspelled signature. Out of the 86 mispelled signatures fixed with this approach, 85 were found to be good corrections and 1 was bad correction. Following was found to be a bad correction: Tweeted-by (count: 1) => Tested-by Link: https://lkml.kernel.org/r/20201128204333.7054-1-yashsri421@gmail.com Signed-off-by: Aditya Srivastava Acked-by: Joe Perches Cc: Lukas Bulwahn Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8e08f0765f3744c65e2c8c570004079883b2f546 Author: Aditya Srivastava Date: Tue Dec 15 20:45:09 2020 -0800 checkpatch: add fix option for LOGICAL_CONTINUATIONS Currently, checkpatch warns if logical continuations are placed at the start of a line and not at the end of previous line. E.g., running checkpatch on commit 3485507fc272 ("staging: bcm2835-camera: Reduce length of enum names") reports: CHECK:LOGICAL_CONTINUATIONS: Logical continuations should be on the previous line + if (!ret + && camera_port == Provide a simple fix by inserting logical operator at the last non-comment, non-whitespace char of the previous line and removing from current line, if both the lines are additions(ie start with '+') Link: https://lkml.kernel.org/r/20201123102818.24364-1-yashsri421@gmail.com Signed-off-by: Aditya Srivastava Acked-by: Joe Perches Cc: Lukas Bulwahn Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit da7355ab4e4a0021924e87acce2b9fb7e6f3264e Author: Aditya Srivastava Date: Tue Dec 15 20:45:06 2020 -0800 checkpatch: add fix option for ASSIGNMENT_CONTINUATIONS Currently, checkpatch warns us if an assignment operator is placed at the start of a line and not at the end of previous line. E.g., running checkpatch on commit 8195b1396ec8 ("hv_netvsc: fix deadlock on hotplug") reports: CHECK: Assignment operator '=' should be on the previous line + struct netvsc_device *nvdev + = container_of(w, struct netvsc_device, subchan_work); Provide a simple fix by appending assignment operator to the previous line and removing from the current line, if both the lines are additions (ie start with '+') Link: https://lkml.kernel.org/r/20201121120407.22942-1-yashsri421@gmail.com Signed-off-by: Aditya Srivastava Acked-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 03f4935135b9efeb780b970ba023c201f81cf4e6 Author: Dwaipayan Ray Date: Tue Dec 15 20:45:02 2020 -0800 checkpatch: fix unescaped left brace There is an unescaped left brace in a regex in OPEN_BRACE check. This throws a runtime error when checkpatch is run with --fix flag and the OPEN_BRACE check is executed. Fix it by escaping the left brace. Link: https://lkml.kernel.org/r/20201115202928.81955-1-dwaipayanray1@gmail.com Fixes: 8d1824780f2f ("checkpatch: add --fix option for a couple OPEN_BRACE misuses") Signed-off-by: Dwaipayan Ray Acked-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 27b379af61025e32a9baf3a33e939941682693ba Author: Aditya Srivastava Date: Tue Dec 15 20:44:59 2020 -0800 checkpatch: avoid COMMIT_LOG_LONG_LINE warning for signature tags Currently checkpatch warns us for long lines in commits even for signature tag lines. Generally these lines exceed the 75-character limit because of: 1) long names and long email address 2) some comments on scoped review and acknowledgement, i.e., for a dedicated pointer on what was reported by the identity in 'Reported-by' 3) some additional comments on CC: stable@vger.org tags Exclude signature tag lines from this class of warning. There were 1896 COMMIT_LOG_LONG_LINE warnings in v5.6..v5.8 before this patch application and 1879 afterwards. A quick manual check found all the dropped warnings related to signature tags. Link: https://lkml.kernel.org/r/20201116083754.10629-1-yashsri421@gmail.com Signed-off-by: Aditya Srivastava Acked-by: Joe Perches Cc: Lukas Bulwahn Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e73d27159400f3ed7300387ce5d69707af8bf0fd Author: Dwaipayan Ray Date: Tue Dec 15 20:44:56 2020 -0800 checkpatch: fix spelling errors and remove repeated word Delete repeated word in scripts/checkpatch.pl: "are are" -> "are" Fix typos: "commments" -> "comments" "falsly" -> "falsely" Link: https://lkml.kernel.org/r/20201113152316.62975-1-dwaipayanray1@gmail.com Signed-off-by: Dwaipayan Ray Acked-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fccaebf00e603694b892b46722a52db3d4298561 Author: Dwaipayan Ray Date: Tue Dec 15 20:44:53 2020 -0800 checkpatch: improve email parsing checkpatch doesn't report warnings for many common mistakes in emails. Some of which are trailing commas and incorrect use of email comments. At the same time several false positives are reported due to incorrect handling of mail comments. The most common of which is due to the pattern: # X.X Improve email parsing in checkpatch. Some general email rules are defined: - Multiple name comments should not be allowed. - Comments inside address should not be allowed. - In general comments should be enclosed within parentheses. Relaxation is given to comments beginning with #. - Stable addresses should not begin with a name. - Comments in stable addresses should begin only with a #. Improvements to parsing: - Detect and report unexpected content after email. - Quoted names are excluded from comment parsing. - Trailing dots, commas or quotes in email are removed during formatting. Correspondingly a BAD_SIGN_OFF warning is emitted. - Improperly quoted email like '"name
"' are now warned about. In addition, added fixes for all the possible rules. Link: https://lore.kernel.org/linux-kernel-mentees/6c275d95c3033422addfc256a30e6ae3dd37941d.camel@perches.com/ Link: https://lore.kernel.org/linux-kernel-mentees/20201105200857.GC1333458@kroah.com/ Link: https://lkml.kernel.org/r/20201108100632.75340-1-dwaipayanray1@gmail.com Signed-off-by: Dwaipayan Ray Suggested-by: Joe Perches Acked-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0830aab0e1d4d9bd391e5723c39f4b3b002fffb3 Author: Joe Perches Date: Tue Dec 15 20:44:50 2020 -0800 checkpatch: add __alias and __weak to suggested __attribute__ conversions Add __alias and __weak to the suggested __attribute__(()) conversions. Link: https://lkml.kernel.org/r/7b74137743c58ce0633ec4d575b94e2210e4dbe7.camel@perches.com Signed-off-by: Joe Perches Cc: Dwaipayan Ray Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7580c5b9b464f8936be850ef278927671338bbf2 Author: Aditya Srivastava Date: Tue Dec 15 20:44:47 2020 -0800 checkpatch: add fix option for GERRIT_CHANGE_ID Currently, whenever a Gerrit Change-Id is present in a commit, checkpatch.pl warns to remove the Change-Id before submitting the patch. E.g., running checkpatch on commit adc311a5bbf6 ("iwlwifi: bump FW API to 53 for 22000 series") reports this error: ERROR: Remove Gerrit Change-Id's before submitting upstream Change-Id: I5725e46394f3f53c3069723fd513cc53c7df383d Provide a simple fix option by simply deleting the indicated line. Link: https://lkml.kernel.org/r/20201030114447.24199-1-yashsri421@gmail.com Signed-off-by: Aditya Srivastava Acked-by: Joe Perches Cc: Lukas Bulwahn Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 339f29d91acf3f49bcf919f0e11437438f58559a Author: Joe Perches Date: Tue Dec 15 20:44:43 2020 -0800 checkpatch: update __attribute__((section("name"))) quote removal commit 33def8498fdd ("treewide: Convert macro and uses of __section(foo) to __section("foo")") removed the stringification of the section name and now requires quotes around the named section. Update checkpatch to not remove any quotes when suggesting conversion of __attribute__((section("name"))) to __section("name") Miscellanea: o Add section to the hash with __section replacement o Remove separate test for __attribute__((section o Remove the limitation on converting attributes containing only known, possible conversions. Any unknown attribute types are now left as-is and known types are converted and moved before __attribute__ and removed from within the __attribute__((list...)). [joe@perches.com: eliminate the separate test below the possible conversions loop] Link: https://lkml.kernel.org/r/58e9d55e933dc8fdc6af489f2ad797fa8eb13e44.camel@perches.com Link: https://lkml.kernel.org/r/c04dd1c810e8d6a68e6a632e3191ae91651c8edf.camel@perches.com Signed-off-by: Joe Perches Cc: Dwaipayan Ray Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 47ca69b85821e150cfbbe86a18a038e9488c0090 Author: Tom Rix Date: Tue Dec 15 20:44:40 2020 -0800 checkpatch: add a fixer for missing newline at eof Remove the trailing error message from the fixed lines. Link: https://lkml.kernel.org/r/20201017142546.28988-1-trix@redhat.com Signed-off-by: Tom Rix Acked-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7ebe1d173cae0778fa748ea3f2ae20dfa0f58e10 Author: Dwaipayan Ray Date: Tue Dec 15 20:44:36 2020 -0800 checkpatch: extend attributes check to handle more patterns It is generally preferred that the macros from include/linux/compiler_attributes.h are used, unless there is a reason not to. checkpatch currently checks __attribute__ for each of packed, aligned, section, printf, scanf, and weak. Other declarations in compiler_attributes.h are not handled. Add a generic test to check the presence of such attributes. Some attributes require more specific handling and are kept separate. Also add fixes to the generic attributes check to substitute the correct conversions. New attributes which are now handled are: __always_inline__ __assume_aligned__(a, ## __VA_ARGS__) __cold__ __const__ __copy__(symbol) __designated_init__ __externally_visible__ __gnu_inline__ __malloc__ __mode__(x) __no_caller_saved_registers__ __noclone__ __noinline__ __nonstring__ __noreturn__ __pure__ __unused__ __used__ Declarations which contain multiple attributes like __attribute__((__packed__, __cold__)) are also handled except when proper conversions for one or more attributes of the list cannot be determined. Link: https://lore.kernel.org/linux-kernel-mentees/3ec15b41754b01666d94b76ce51b9832c2dd577a.camel@perches.com/ Link: https://lkml.kernel.org/r/20201025193103.23223-1-dwaipayanray1@gmail.com Signed-off-by: Dwaipayan Ray Suggested-by: Joe Perches Acked-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dc58bc553e7a8e1d6eeaffd92cb8b346e0d62f70 Author: Joe Perches Date: Tue Dec 15 20:44:33 2020 -0800 checkpatch: allow --fix removal of unnecessary break statements switch/case use of break after a return, goto or break is unnecessary. There is an existing warning for the return and goto uses, so add break and a --fix option too. Link: https://lkml.kernel.org/r/d9ea654104d55f590fb97d252d64a66b23c1a096.camel@perches.com Signed-off-by: Joe Perches Cc: Julia Lawall Cc: Tom Rix Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 73169765e6e7ac54528778faa592b15df5c8a93c Author: Joe Perches Date: Tue Dec 15 20:44:30 2020 -0800 checkpatch: prefer static const declarations There are about 100,000 uses of 'static const ' but about 400 uses of 'static const' in the kernel where type is not a pointer. The kernel almost always uses "static const" over "const static" as there is a compiler warning for that declaration style. But there is no compiler warning for "static const". So add a checkpatch warning for the atypical declaration uses of. const static and static const For example: $ ./scripts/checkpatch.pl -f --emacs --quiet --nosummary -types=static_const arch/arm/crypto/aes-ce-glue.c arch/arm/crypto/aes-ce-glue.c:75: WARNING: Move const after static - use 'static const u8' #75: FILE: arch/arm/crypto/aes-ce-glue.c:75: + static u8 const rcon[] = { Link: https://lkml.kernel.org/r/4b863be68e679546b40d50b97a4a806c03056a1c.camel@perches.com Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4104a20646fe20ed5aa9be883eef7340b219f9a8 Author: Łukasz Stelmach Date: Tue Dec 15 20:44:27 2020 -0800 checkpatch: ignore generated CamelCase defines and enum values Ignore autogenerated CamelCase-like defines and enum values like DRM_MODE_CONNECTOR_Unknown or ETHTOOL_LINK_MODE_Asym_Pause_BIT. Link: https://lkml.kernel.org/r/20201022184916.7904-1-l.stelmach@samsung.com Signed-off-by: Łukasz Stelmach Suggested-by: Joe Perches Acked-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8d0325cc74a31d517b5b4307c8d895c6e81076b7 Author: Aditya Srivastava Date: Tue Dec 15 20:44:24 2020 -0800 checkpatch: fix false positives in REPEATED_WORD warning Presence of hexadecimal address or symbol results in false warning message by checkpatch.pl. For example, running checkpatch on commit b8ad540dd4e4 ("mptcp: fix memory leak in mptcp_subflow_create_socket()") results in warning: WARNING:REPEATED_WORD: Possible repeated word: 'ff' 00 00 00 00 00 00 00 00 00 2f 30 0a 81 88 ff ff ........./0..... Similarly, the presence of list command output in commit results in an unnecessary warning. For example, running checkpatch on commit 899e5ffbf246 ("perf record: Introduce --switch-output-event") gives: WARNING:REPEATED_WORD: Possible repeated word: 'root' dr-xr-x---. 12 root root 4096 Apr 27 17:46 .. Here, it reports 'ff' and 'root' to be repeated, but it is in fact part of some address or code, where it has to be repeated. In these cases, the intent of the warning to find stylistic issues in commit messages is not met and the warning is just completely wrong in this case. To avoid these warnings, add an additional regex check for the directory permission pattern and avoid checking the line for this class of warning. Similarly, to avoid hex pattern, check if the word consists of hex symbols and skip this warning if it is not among the common english words formed using hex letters. A quick evaluation on v5.6..v5.8 showed that this fix reduces REPEATED_WORD warnings by the frequency of 1890. A quick manual check found all cases are related to hex output or list command outputs in commit messages. Link: https://lkml.kernel.org/r/20201024102253.13614-1-yashsri421@gmail.com Signed-off-by: Aditya Srivastava Acked-by: Joe Perches Cc: Dwaipayan Ray Cc: Lukas Bulwahn Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1db81a682a2f2a664489c4e94f3b945f70a43a13 Author: Dwaipayan Ray Date: Tue Dec 15 20:44:20 2020 -0800 checkpatch: add new exception to repeated word check Recently, commit 4f6ad8aa1eac ("checkpatch: move repeated word test") moved the repeated word test to check for more file types. But after this, if checkpatch.pl is run on MAINTAINERS, it generates several new warnings of the type: WARNING: Possible repeated word: 'git' For example: WARNING: Possible repeated word: 'git' +T: git git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml.git So, the pattern "git git://..." is a false positive in this case. There are several other combinations which may produce a wrong warning message, such as "@size size", ":Begin begin", etc. Extend repeated word check to compare the characters before and after the word matches. If there is a non whitespace character before the first word or a non whitespace character excluding punctuation characters after the second word, then the check is skipped and the warning is avoided. Also add case insensitive word matching to the repeated word check. Link: https://lore.kernel.org/linux-kernel-mentees/81b6a0bb2c7b9256361573f7a13201ebcd4876f1.camel@perches.com/ Link: https://lkml.kernel.org/r/20201017162732.152351-1-dwaipayanray1@gmail.com Signed-off-by: Dwaipayan Ray Suggested-by: Joe Perches Suggested-by: Lukas Bulwahn Acked-by: Joe Perches Cc: Aditya Srivastava Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 89b158635ad79574bde8e94d45dad33f8cf09549 Author: Gao Xiang Date: Tue Dec 15 20:44:03 2020 -0800 lib/lz4: explicitly support in-place decompression LZ4 final literal copy could be overlapped when doing in-place decompression, so it's unsafe to just use memcpy() on an optimized memcpy approach but memmove() instead. Upstream LZ4 has updated this years ago [1] (and the impact is non-sensible [2] plus only a few bytes remain), this commit just synchronizes LZ4 upstream code to the kernel side as well. It can be observed as EROFS in-place decompression failure on specific files when X86_FEATURE_ERMS is unsupported, memcpy() optimization of commit 59daa706fbec ("x86, mem: Optimize memcpy by avoiding memory false dependece") will be enabled then. Currently most modern x86-CPUs support ERMS, these CPUs just use "rep movsb" approach so no problem at all. However, it can still be verified with forcely disabling ERMS feature... arch/x86/lib/memcpy_64.S: ALTERNATIVE_2 "jmp memcpy_orig", "", X86_FEATURE_REP_GOOD, \ - "jmp memcpy_erms", X86_FEATURE_ERMS + "jmp memcpy_orig", X86_FEATURE_ERMS We didn't observe any strange on arm64/arm/x86 platform before since most memcpy() would behave in an increasing address order ("copy upwards" [3]) and it's the correct order of in-place decompression but it really needs an update to memmove() for sure considering it's an undefined behavior according to the standard and some unique optimization already exists in the kernel. [1] https://github.com/lz4/lz4/commit/33cb8518ac385835cc17be9a770b27b40cd0e15b [2] https://github.com/lz4/lz4/pull/717#issuecomment-497818921 [3] https://sourceware.org/bugzilla/show_bug.cgi?id=12518 Link: https://lkml.kernel.org/r/20201122030749.2698994-1-hsiangkao@redhat.com Signed-off-by: Gao Xiang Reviewed-by: Nick Terrell Cc: Yann Collet Cc: Miao Xie Cc: Chao Yu Cc: Li Guifu Cc: Guo Xuenan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 506dfc9906e5cbf453bbcd5eb627689435583558 Author: Alexey Dobriyan Date: Tue Dec 15 20:44:00 2020 -0800 lib: cleanup kstrto*() usage Use proper conversion functions. kstrto*() variants exist for all standard types. Link: https://lkml.kernel.org/r/20201122123410.GB92364@localhost.localdomain Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d58b0b1a416595a0e5ad6eac559b1d5229397e38 Author: Francis Laniel Date: Tue Dec 15 20:43:57 2020 -0800 drivers/misc/lkdtm/lkdtm.h: correct wrong filenames in comment In lkdtm.h, files targeted in comments are named "lkdtm_file.c" while there are named "file.c" in directory. Link: https://lkml.kernel.org/r/20201122162451.27551-6-laniel_francis@privacyrequired.com Signed-off-by: Francis Laniel Acked-by: Kees Cook Cc: Daniel Axtens Cc: Daniel Micay Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit febebaf366868a4204deb3955ef5dda17f676fc1 Author: Francis Laniel Date: Tue Dec 15 20:43:54 2020 -0800 drivers/misc/lkdtm: add new file in LKDTM to test fortified strscpy This new test ensures that fortified strscpy has the same behavior than vanilla strscpy (e.g. returning -E2BIG when src content is truncated). Finally, it generates a crash at runtime because there is a write overflow in destination string. Link: https://lkml.kernel.org/r/20201122162451.27551-5-laniel_francis@privacyrequired.com Signed-off-by: Francis Laniel Reviewed-by: Kees Cook Cc: Daniel Axtens Cc: Daniel Micay Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 33e56a59e64dfb68778e5da0be13f0c47dc5d445 Author: Francis Laniel Date: Tue Dec 15 20:43:50 2020 -0800 string.h: add FORTIFY coverage for strscpy() The fortified version of strscpy ensures the following before vanilla strscpy is called: 1. There is no read overflow because we either size is smaller than src length or we shrink size to src length by calling fortified strnlen. 2. There is no write overflow because we either failed during compilation or at runtime by checking that size is smaller than dest size. Link: https://lkml.kernel.org/r/20201122162451.27551-4-laniel_francis@privacyrequired.com Signed-off-by: Francis Laniel Acked-by: Kees Cook Cc: Daniel Axtens Cc: Daniel Micay Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d96938daae2a2ae20e5d3d38ddb85d8afdaee628 Author: Daniel Axtens Date: Tue Dec 15 20:43:47 2020 -0800 lkdtm: tests for FORTIFY_SOURCE Add code to test both: - runtime detection of the overrun of a structure. This covers the __builtin_object_size(x, 0) case. This test is called FORTIFY_OBJECT. - runtime detection of the overrun of a char array within a structure. This covers the __builtin_object_size(x, 1) case which can be used for some string functions. This test is called FORTIFY_SUBOBJECT. Link: https://lkml.kernel.org/r/20201122162451.27551-3-laniel_francis@privacyrequired.com Signed-off-by: Daniel Axtens Signed-off-by: Francis Laniel Suggested-by: Kees Cook Reviewed-by: Kees Cook Cc: Daniel Micay Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6a39e62abbafd1d58d1722f40c7d26ef379c6a2f Author: Daniel Axtens Date: Tue Dec 15 20:43:44 2020 -0800 lib: string.h: detect intra-object overflow in fortified string functions Patch series "Fortify strscpy()", v7. This patch implements a fortified version of strscpy() enabled by setting CONFIG_FORTIFY_SOURCE=y. The new version ensures the following before calling vanilla strscpy(): 1. There is no read overflow because either size is smaller than src length or we shrink size to src length by calling fortified strnlen(). 2. There is no write overflow because we either failed during compilation or at runtime by checking that size is smaller than dest size. Note that, if src and dst size cannot be got, the patch defaults to call vanilla strscpy(). The patches adds the following: 1. Implement the fortified version of strscpy(). 2. Add a new LKDTM test to ensures the fortified version still returns the same value as the vanilla one while panic'ing when there is a write overflow. 3. Correct some typos in LKDTM related file. I based my modifications on top of two patches from Daniel Axtens which modify calls to __builtin_object_size, in fortified string functions, to ensure the true size of char * are returned and not the surrounding structure size. About performance, I measured the slow down of fortified strscpy(), using the vanilla one as baseline. The hardware I used is an Intel i3 2130 CPU clocked at 3.4 GHz. I ran "Linux 5.10.0-rc4+ SMP PREEMPT" inside qemu 3.10 with 4 CPU cores. The following code, called through LKDTM, was used as a benchmark: #define TIMES 10000 char *src; char dst[7]; int i; ktime_t begin; src = kstrdup("foobar", GFP_KERNEL); if (src == NULL) return; begin = ktime_get(); for (i = 0; i < TIMES; i++) strscpy(dst, src, strlen(src)); pr_info("%d fortified strscpy() tooks %lld", TIMES, ktime_get() - begin); begin = ktime_get(); for (i = 0; i < TIMES; i++) __real_strscpy(dst, src, strlen(src)); pr_info("%d vanilla strscpy() tooks %lld", TIMES, ktime_get() - begin); kfree(src); I called the above code 30 times to compute stats for each version (in ns, round to int): | version | mean | std | median | 95th | | --------- | ------- | ------ | ------- | ------- | | fortified | 245_069 | 54_657 | 216_230 | 331_122 | | vanilla | 172_501 | 70_281 | 143_539 | 219_553 | On average, fortified strscpy() is approximately 1.42 times slower than vanilla strscpy(). For the 95th percentile, the fortified version is about 1.50 times slower. So, clearly the stats are not in favor of fortified strscpy(). But, the fortified version loops the string twice (one in strnlen() and another in vanilla strscpy()) while the vanilla one only loops once. This can explain why fortified strscpy() is slower than the vanilla one. This patch (of 5): When the fortify feature was first introduced in commit 6974f0c4555e ("include/linux/string.h: add the option of fortified string.h functions"), Daniel Micay observed: * It should be possible to optionally use __builtin_object_size(x, 1) for some functions (C strings) to detect intra-object overflows (like glibc's _FORTIFY_SOURCE=2), but for now this takes the conservative approach to avoid likely compatibility issues. This is a case that often cannot be caught by KASAN. Consider: struct foo { char a[10]; char b[10]; } void test() { char *msg; struct foo foo; msg = kmalloc(16, GFP_KERNEL); strcpy(msg, "Hello world!!"); // this copy overwrites foo.b strcpy(foo.a, msg); } The questionable copy overflows foo.a and writes to foo.b as well. It cannot be detected by KASAN. Currently it is also not detected by fortify, because strcpy considers __builtin_object_size(x, 0), which considers the size of the surrounding object (here, struct foo). However, if we switch the string functions over to use __builtin_object_size(x, 1), the compiler will measure the size of the closest surrounding subobject (here, foo.a), rather than the size of the surrounding object as a whole. See https://gcc.gnu.org/onlinedocs/gcc/Object-Size-Checking.html for more info. Only do this for string functions: we cannot use it on things like memcpy, memmove, memcmp and memchr_inv due to code like this which purposefully operates on multiple structure members: (arch/x86/kernel/traps.c) /* * regs->sp points to the failing IRET frame on the * ESPFIX64 stack. Copy it to the entry stack. This fills * in gpregs->ss through gpregs->ip. * */ memmove(&gpregs->ip, (void *)regs->sp, 5*8); This change passes an allyesconfig on powerpc and x86, and an x86 kernel built with it survives running with syz-stress from syzkaller, so it seems safe so far. Link: https://lkml.kernel.org/r/20201122162451.27551-1-laniel_francis@privacyrequired.com Link: https://lkml.kernel.org/r/20201122162451.27551-2-laniel_francis@privacyrequired.com Signed-off-by: Daniel Axtens Signed-off-by: Francis Laniel Reviewed-by: Kees Cook Cc: Daniel Micay Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ff72daa371f58fbf16999f4fb3d65d4f650555aa Author: Nick Desaulniers Date: Tue Dec 15 20:43:40 2020 -0800 lib/string: remove unnecessary #undefs A few architecture specific string.h functions used to be implemented in terms of preprocessor defines to the corresponding compiler builtins. Since this is no longer the case, remove unused #undefs. Only memcmp is still defined in terms of builtins for a few arches. Link: https://github.com/ClangBuiltLinux/linux/issues/428 Link: https://lkml.kernel.org/r/20201120041113.89382-1-ndesaulniers@google.com Fixes: 5f074f3e192f ("lib/string.c: implement a basic bcmp") Signed-off-by: Nick Desaulniers Cc: Andy Shevchenko Cc: Yury Norov Cc: Alexandru Ardelean Cc: Nathan Chancellor Cc: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2f78788b55baa3410b1ec91a576286abe1ad4d6a Author: Jakub Jelinek Date: Tue Dec 15 20:43:37 2020 -0800 ilog2: improve ilog2 for constant arguments As discussed in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97445 the const_ilog2 macro generates a lot of code which interferes badly with GCC inlining heuristics, until it can be proven that the ilog2 argument can or can't be simplified into a constant. It can be expressed using __builtin_clzll builtin which is supported by GCC 3.4 and later and when used only in the __builtin_constant_p guarded code it ought to always fold back to a constant. Other compilers support the same builtin for many years too. Other option would be to change the const_ilog2 macro, though as the description says it is meant to be used also in C constant expressions, and while GCC will fold it to constant with constant argument even in those, perhaps it is better to avoid using extensions in that case. [akpm@linux-foundation.org: coding style fixes] Link: https://lkml.kernel.org/r/20201120125154.GB3040@hirez.programming.kicks-ass.net Link: https://lkml.kernel.org/r/20201021132718.GB2176@tucnak Signed-off-by: Jakub Jelinek Signed-off-by: Peter Zijlstra (Intel) Cc: Christophe Leroy Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7546861a8c55f1d704a6cfd699b33a9e2dd8c021 Author: Andy Shevchenko Date: Tue Dec 15 20:43:34 2020 -0800 lib/cmdline_kunit: add a new test suite for cmdline API Test get_option() for a starter which is provided by cmdline.c. [akpm@linux-foundation.org: fix warning by constifying cmdline_test_values] [andriy.shevchenko@linux.intel.com: type of expected returned values should be int] Link: https://lkml.kernel.org/r/20201116104244.15472-1-andriy.shevchenko@linux.intel.com [andriy.shevchenko@linux.intel.com: provide meaningful MODULE_LICENSE()] Link: https://lkml.kernel.org/r/20201116104257.15527-1-andriy.shevchenko@linux.intel.com Link: https://lkml.kernel.org/r/20201112180732.75589-6-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Cc: Shuah Khan Cc: Vitor Massaru Iha Cc: Mark Brown Cc: Brendan Higgins Cc: David Gow Cc: Matti Vaittinen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6b2b6b864684848f9deacb6d0faa00626860832e Author: Andy Shevchenko Date: Tue Dec 15 20:43:30 2020 -0800 lib/cmdline: allow NULL to be an output for get_option() In the future we would like to use get_option() to only validate the string and parse it separately. To achieve this, allow NULL to be an output for get_option(). Link: https://lkml.kernel.org/r/20201112180732.75589-5-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Cc: Brendan Higgins Cc: David Gow Cc: Mark Brown Cc: Matti Vaittinen Cc: Shuah Khan Cc: Vitor Massaru Iha Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e291851d65495739e4eede33b6bc387bb546a19b Author: Andy Shevchenko Date: Tue Dec 15 20:43:27 2020 -0800 lib/cmdline: fix get_option() for strings starting with hyphen When string doesn't have an integer and starts from hyphen get_option() may return interesting results. Fix it to return 0. The simple_strtoull() is used due to absence of simple_strtoul() in a boot code on some architectures. Note, the Fixes tag below is rather for anthropological curiosity. Link: https://lkml.kernel.org/r/20201112180732.75589-4-andriy.shevchenko@linux.intel.com Fixes: f68565831e72 ("Import 2.4.0-test2pre3") Signed-off-by: Andy Shevchenko Cc: Brendan Higgins Cc: David Gow Cc: Mark Brown Cc: Matti Vaittinen Cc: Shuah Khan Cc: Vitor Massaru Iha Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 45e3d5a2af1d53164cc5fbd22c5ceea0d163ad45 Author: Sebastian Andrzej Siewior Date: Tue Dec 15 20:43:13 2020 -0800 lib/test_lockup.c: minimum fix to get it compiled on PREEMPT_RT On PREEMPT_RT the locks are quite different so they can't be tested as it is done below. The alternative is to test for the waitlock within rtmutex. This is the bare minimun to get it compiled. Problems which exist on PREEMP_RT: - none of the locks (spinlock_t, rwlock_t, mutex_t, rw_semaphore) may be acquired with disabled preemption or interrupts. If I read the code correct the it is possible to acquire a mutex_t with disabled interrupts. I don't know how to obtain a lock pointer. Technically they are not exported to userland. - memory can not be allocated with disabled preemption or interrupts even with GFP_ATOMIC. Link: https://lkml.kernel.org/r/20201028181041.xyeothhkouc3p4md@linutronix.de Signed-off-by: Sebastian Andrzej Siewior Cc: Konstantin Khlebnikov Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 180644f80a0284bf5c9acdbd33760924fef14236 Author: Gustavo A. R. Silva Date: Tue Dec 15 20:43:10 2020 -0800 lib/stackdepot.c: use array_size() helper in jhash2() Use array_size() helper instead of the open-coded version in jhash2(). These sorts of multiplication factors need to be wrapped in array_size(). Also, use the preferred form for passing the size of an object type. Link: https://lkml.kernel.org/r/cb8a682e4bba4dbddd2bd8aca7f8c02fea89639b.1601565471.git.gustavoars@kernel.org Signed-off-by: Gustavo A. R. Silva Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 47e684aaa2661b2af39474a12d05447865ce9184 Author: Gustavo A. R. Silva Date: Tue Dec 15 20:43:07 2020 -0800 lib/stackdepot.c: use flex_array_size() helper in memcpy() Make use of the flex_array_size() helper to calculate the size of a flexible array member within an enclosing structure. This helper offers defense-in-depth against potential integer overflows, while at the same time makes it explicitly clear that we are dealing with a flexible array member. Link: https://lkml.kernel.org/r/186e37fe07196ee41a0e562fa8a8cb7a01112ec5.1601565471.git.gustavoars@kernel.org Signed-off-by: Gustavo A. R. Silva Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3a2b67e6e3fdb14c6da4c6909454d7a1d9b24f70 Author: Gustavo A. R. Silva Date: Tue Dec 15 20:43:04 2020 -0800 lib/stackdepot.c: replace one-element array with flexible-array member Patch series "lib/stackdepot.c: Replace one-element array with flexible-array member". This series aims to replace a one-element array with a flexible-array member. Also, make use of the struct_size(), flexible_array_size() and array_size() helpers. This patch (of 3): There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. Refactor the code according to the use of a flexible-array member in struct stack_record, instead of a one-element array, and use the struct_size() helper to calculate the size for the allocation. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays Link: https://lkml.kernel.org/r/cover.1601565471.git.gustavoars@kernel.org Link: https://lore.kernel.org/lkml/5f75876b.x9zdN10esiC0qLHV%25lkp@intel.com/ Link: https://lkml.kernel.org/r/2f1e6a17aaa891ad9c58817cf0a10b8ab8894f59.1601565471.git.gustavoars@kernel.org Signed-off-by: Gustavo A. R. Silva Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0ae446e4b91b5a713fb189cf7f23d1a303057fd9 Author: Geert Uytterhoeven Date: Tue Dec 15 20:43:01 2020 -0800 lib/test_free_pages.c: add basic progress indicators The test module to check that free_pages() does not leak memory does not provide any feedback whatsoever its state or progress, but may take some time on slow machines. Add the printing of messages upon starting each phase of the test, and upon completion. Link: https://lkml.kernel.org/r/20201018140445.20972-1-geert@linux-m68k.org Signed-off-by: Geert Uytterhoeven Cc: Mike Rapoport Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ab7d7798dad5aae23bb502f1a6fc0d637b07dc47 Author: Ma, Jianpeng Date: Tue Dec 15 20:42:57 2020 -0800 bitmap: remove unused function declaration Link: https://lkml.kernel.org/r/BN7PR11MB26097166B6B46387D8A1ABA4FDE30@BN7PR11MB2609.namprd11.prod.outlook.com Fixes: 2afe27c718b6 ("lib/bitmap.c: bitmap_[empty,full]: remove code duplication") Signed-off-by: Jianpeng Ma Acked-by: Yury Norov Reviewed-by: Andy Shevchenko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0bb867795540a9223d44ddcdf478330cba5917f8 Author: Andy Shevchenko Date: Tue Dec 15 20:42:55 2020 -0800 include/linux/bitmap.h: convert bitmap_empty() / bitmap_full() to return boolean There is no need to return int type out of boolean expression. Link: https://lkml.kernel.org/r/20201027180936.20806-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Cc: Yury Norov Cc: Rasmus Villemoes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 35189b8ff18ee0c6f7c04f4c674584d1149d5c55 Author: Hui Su Date: Tue Dec 15 20:42:52 2020 -0800 kernel/acct.c: use #elif instead of #end and #elif Cleanup: use #elif instead of #end and #elif. Link: https://lkml.kernel.org/r/20201015150736.GA91603@rlk Signed-off-by: Hui Su Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit aa6159ab99a9ab5df835b4750b66cf132a5aa292 Author: Andy Shevchenko Date: Tue Dec 15 20:42:48 2020 -0800 kernel.h: split out mathematical helpers kernel.h is being used as a dump for all kinds of stuff for a long time. Here is the attempt to start cleaning it up by splitting out mathematical helpers. At the same time convert users in header and lib folder to use new header. Though for time being include new header back to kernel.h to avoid twisted indirected includes for existing users. [sfr@canb.auug.org.au: fix powerpc build] Link: https://lkml.kernel.org/r/20201029150809.13059608@canb.auug.org.au Link: https://lkml.kernel.org/r/20201028173212.41768-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Cc: "Paul E. McKenney" Cc: Trond Myklebust Cc: Jeff Layton Cc: Rasmus Villemoes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0a571b085ff6dadf946b248133533d3ba68f6e31 Author: Christophe Leroy Date: Tue Dec 15 20:42:45 2020 -0800 asm-generic: force inlining of get_order() to work around gcc10 poor decision When building mpc885_ads_defconfig with gcc 10.1, the function get_order() appears 50 times in vmlinux: [linux]# ppc-linux-objdump -x vmlinux | grep get_order | wc -l 50 [linux]# size vmlinux text data bss dec hex filename 3842620 675624 135160 4653404 47015c vmlinux In the old days, marking a function 'static inline' was forcing GCC to inline, but since commit ac7c3e4ff401 ("compiler: enable CONFIG_OPTIMIZE_INLINING forcibly") GCC may decide to not inline a function. It looks like GCC 10 is taking poor decisions on this. get_order() compiles into the following tiny function, occupying 20 bytes of text. 0000007c : 7c: 38 63 ff ff addi r3,r3,-1 80: 54 63 a3 3e rlwinm r3,r3,20,12,31 84: 7c 63 00 34 cntlzw r3,r3 88: 20 63 00 20 subfic r3,r3,32 8c: 4e 80 00 20 blr By forcing get_order() to be __always_inline, the size of text is reduced by 1940 bytes, that is almost twice the space occupied by 50 times get_order() [linux-powerpc]# size vmlinux text data bss dec hex filename 3840680 675588 135176 4651444 46f9b4 vmlinux Link: https://lkml.kernel.org/r/96c6172d619c51acc5c1c4884b80785c59af4102.1602949927.git.christophe.leroy@csgroup.eu Signed-off-by: Christophe Leroy Reviewed-by: Joel Stanley Cc: Segher Boessenkool Cc: Arnd Bergmann Cc: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a9389683fafcd4b6f7dcef62f9f05d436a12cfb5 Author: Hui Su Date: Tue Dec 15 20:42:42 2020 -0800 fs/proc: make pde_get() return nothing We don't need pde_get()'s return value, so make pde_get() return nothing Link: https://lkml.kernel.org/r/20201211061944.GA2387571@rlk Signed-off-by: Hui Su Cc: Alexey Dobriyan Cc: Eric W. Biederman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c6c75deda81344c3a95d1d1f606d5cee109e5d54 Author: Alexey Dobriyan Date: Tue Dec 15 20:42:39 2020 -0800 proc: fix lookup in /proc/net subdirectories after setns(2) Commit 1fde6f21d90f ("proc: fix /proc/net/* after setns(2)") only forced revalidation of regular files under /proc/net/ However, /proc/net/ is unusual in the sense of /proc/net/foo handlers take netns pointer from parent directory which is old netns. Steps to reproduce: (void)open("/proc/net/sctp/snmp", O_RDONLY); unshare(CLONE_NEWNET); int fd = open("/proc/net/sctp/snmp", O_RDONLY); read(fd, &c, 1); Read will read wrong data from original netns. Patch forces lookup on every directory under /proc/net . Link: https://lkml.kernel.org/r/20201205160916.GA109739@localhost.localdomain Fixes: 1da4d377f943 ("proc: revalidate misc dentries") Signed-off-by: Alexey Dobriyan Reported-by: "Rantala, Tommi T. (Nokia - FI/Espoo)" Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fe719888344ccc7f0046e787a75bb15b6a40b39f Author: Anand K Mistry Date: Tue Dec 15 20:42:36 2020 -0800 proc: provide details on indirect branch speculation Similar to speculation store bypass, show information about the indirect branch speculation mode of a task in /proc/$pid/status. For testing/benchmarking, I needed to see whether IB (Indirect Branch) speculation (see Spectre-v2) is enabled on a task, to see whether an IBPB instruction should be executed on an address space switch. Unfortunately, this information isn't available anywhere else and currently the only way to get it is to hack the kernel to expose it (like this change). It also helped expose a bug with conditional IB speculation on certain CPUs. Another place this could be useful is to audit the system when using sanboxing. With this change, I can confirm that seccomp-enabled process have IB speculation force disabled as expected when the kernel command line parameter `spectre_v2_user=seccomp`. Since there's already a 'Speculation_Store_Bypass' field, I used that as precedent for adding this one. [amistry@google.com: remove underscores from field name to workaround documentation issue] Link: https://lkml.kernel.org/r/20201106131015.v2.1.I7782b0cedb705384a634cfd8898eb7523562da99@changeid Link: https://lkml.kernel.org/r/20201030172731.1.I7782b0cedb705384a634cfd8898eb7523562da99@changeid Signed-off-by: Anand K Mistry Cc: Anthony Steinhauser Cc: Thomas Gleixner Cc: Anand K Mistry Cc: Alexey Dobriyan Cc: Alexey Gladkov Cc: Jonathan Corbet Cc: Kees Cook Cc: Mauro Carvalho Chehab Cc: Michal Hocko Cc: Mike Rapoport Cc: NeilBrown Cc: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d2928e8550e541a0a3eb4f486620369f963e5090 Author: Randy Dunlap Date: Tue Dec 15 20:42:32 2020 -0800 procfs: delete duplicated words + other fixes Delete repeated words in fs/proc/. {the, which} where "which which" was changed to "with which". Link: https://lkml.kernel.org/r/20201028191525.13413-1-rdunlap@infradead.org Signed-off-by: Randy Dunlap Cc: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4083a281e310dc4ff7214d9da6264949b85f20c4 Author: Thomas Gleixner Date: Tue Dec 15 20:42:29 2020 -0800 alpha: replace bogus in_interrupt() in_interrupt() is true for a variety of things including bottom half disabled regions. Deducing hard interrupt context from it is dubious at best. Use in_irq() which is true if called in hard interrupt context. Otherwise calling irq_exit() would do more harm than good. Link: https://lkml.kernel.org/r/20201113135832.2202833-1-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Tested-by: Serge Belyshev Cc: Richard Henderson Cc: Matt Turner Cc: Ivan Kokshaysky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7c33023aad164b9fb8a2291d2674935871ee06f3 Author: Laurent Dufour Date: Tue Dec 15 20:42:26 2020 -0800 mm/memory_hotplug: quieting offline operation On PowerPC, when dymically removing memory from a system we can see in the console a lot of messages like this: [ 186.575389] Offlined Pages 4096 This message is displayed on each LMB (256MB) removed, which means that we removing 1TB of memory, this message is displayed 4096 times. Moving it to DEBUG to not flood the console. Link: https://lkml.kernel.org/r/20201211150157.91399-1-ldufour@linux.ibm.com Signed-off-by: Laurent Dufour Reviewed-by: Andrew Morton Reviewed-by: David Hildenbrand Acked-by: Michal Hocko Cc: Nathan Lynch Cc: Scott Cheloha Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b50da6e9f42ade19141f6cf8870bb2312b055aa3 Author: Zhaoyang Huang Date: Tue Dec 15 20:42:23 2020 -0800 mm: fix a race on nr_swap_pages The scenario on which "Free swap = -4kB" happens in my system, which is caused by several get_swap_pages racing with each other and show_swap_cache_info happens simutaniously. No need to add a lock on get_swap_page_of_type as we remove "Presub/PosAdd" here. ProcessA ProcessB ProcessC ngoals = 1 ngoals = 1 avail = nr_swap_pages(1) avail = nr_swap_pages(1) nr_swap_pages(1) -= ngoals nr_swap_pages(0) -= ngoals nr_swap_pages = -1 Link: https://lkml.kernel.org/r/1607050340-4535-1-git-send-email-zhaoyang.huang@unisoc.com Signed-off-by: Zhaoyang Huang Acked-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1aa574312518ef1d60d2dc62d58f7021db3b163a Author: Wang Hai Date: Tue Dec 1 21:59:29 2020 +0800 device-dax/core: Fix memory leak when rmmod dax.ko When I repeatedly modprobe and rmmod dax.ko, kmemleak report a memory leak as follows: unreferenced object 0xffff9a5588c05088 (size 8): comm "modprobe", pid 261, jiffies 4294693644 (age 42.063s) ... backtrace: [<00000000e007ced0>] kstrdup+0x35/0x70 [<000000002ae73897>] kstrdup_const+0x3d/0x50 [<000000002b00c9c3>] kvasprintf_const+0xbc/0xf0 [<000000008023282f>] kobject_set_name_vargs+0x3b/0xd0 [<00000000d2cbaa4e>] kobject_set_name+0x62/0x90 [<00000000202e7a22>] bus_register+0x7f/0x2b0 [<000000000b77792c>] 0xffffffffc02840f7 [<000000002d5be5ac>] 0xffffffffc02840b4 [<00000000dcafb7cd>] do_one_initcall+0x58/0x240 [<00000000049fe480>] do_init_module+0x56/0x1e2 [<0000000022671491>] load_module+0x2517/0x2840 [<000000001a2201cb>] __do_sys_finit_module+0x9c/0xe0 [<000000003eb304e7>] do_syscall_64+0x33/0x40 [<0000000051c5fd06>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 When rmmod dax is executed, dax_bus_exit() is missing. This patch can fix this bug. Fixes: 9567da0b408a ("device-dax: Introduce bus + driver model") Cc: Reported-by: Hulk Robot Signed-off-by: Wang Hai Link: https://lore.kernel.org/r/20201201135929.66530-1-wanghai38@huawei.com Signed-off-by: Dan Williams commit 4e6a7b3bbd5a6f9e6f0c5c3ad976ed116c7ade79 Author: Zheng Yongjun Date: Mon Dec 14 21:45:06 2020 +0800 device-dax/pmem: Convert comma to semicolon Replace a comma between expression statements by a semicolon. Signed-off-by: Zheng Yongjun Link: https://lore.kernel.org/r/20201214134506.4831-1-zhengyongjun3@huawei.com Signed-off-by: Dan Williams commit 5ae96d779ff3eeb2977919ff311a6c8849943c2d Author: Enrico Weigelt Date: Tue Dec 15 17:35:31 2020 +0100 libnvdimm: Cleanup include of badblocks.h * drivers/nvdimm/core.c doesn't use anything from badblocks.h on its own, thus including it isn't needed. There's indeed indirect use, via funcs in nd.h, but this one already includes badblocks.h. * drivers/nvdimm/claim.c calls stuff from badblocks.h and therefore should include it on its own (instead of relying any other header doing that) * drivers/nvdimm/btt.h doesn't really need anything from badblocks.h and can easily live with a forward declaration of struct badblocks (just having pointers to it, but not dereferencing it anywhere) Signed-off-by: Enrico Weigelt Link: https://lore.kernel.org/r/20201215163531.21446-1-info@metux.net Signed-off-by: Dan Williams commit d01e7f10dae29eba0f9ada82b65d24e035d5b2f9 Merge: faf145d6f3f3d f7cfd871ae0c5 Author: Linus Torvalds Date: Tue Dec 15 19:36:48 2020 -0800 Merge branch 'exec-update-lock-for-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace Pull exec-update-lock update from Eric Biederman: "The key point of this is to transform exec_update_mutex into a rw_semaphore so readers can be separated from writers. This makes it easier to understand what the holders of the lock are doing, and makes it harder to contend or deadlock on the lock. The real deadlock fix wound up in perf_event_open" * 'exec-update-lock-for-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: exec: Transform exec_update_mutex into a rw_semaphore commit faf145d6f3f3d6f2c066f65602ba9d0a03106915 Merge: 6febd8bef36e6 9ee1206dcfb9d Author: Linus Torvalds Date: Tue Dec 15 19:29:43 2020 -0800 Merge branch 'exec-for-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace Pull execve updates from Eric Biederman: "This set of changes ultimately fixes the interaction of posix file lock and exec. Fundamentally most of the change is just moving where unshare_files is called during exec, and tweaking the users of files_struct so that the count of files_struct is not unnecessarily played with. Along the way fcheck and related helpers were renamed to more accurately reflect what they do. There were also many other small changes that fell out, as this is the first time in a long time much of this code has been touched. Benchmarks haven't turned up any practical issues but Al Viro has observed a possibility for a lot of pounding on task_lock. So I have some changes in progress to convert put_files_struct to always rcu free files_struct. That wasn't ready for the merge window so that will have to wait until next time" * 'exec-for-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: (27 commits) exec: Move io_uring_task_cancel after the point of no return coredump: Document coredump code exclusively used by cell spufs file: Remove get_files_struct file: Rename __close_fd_get_file close_fd_get_file file: Replace ksys_close with close_fd file: Rename __close_fd to close_fd and remove the files parameter file: Merge __alloc_fd into alloc_fd file: In f_dupfd read RLIMIT_NOFILE once. file: Merge __fd_install into fd_install proc/fd: In fdinfo seq_show don't use get_files_struct bpf/task_iter: In task_file_seq_get_next use task_lookup_next_fd_rcu proc/fd: In proc_readfd_common use task_lookup_next_fd_rcu file: Implement task_lookup_next_fd_rcu kcmp: In get_file_raw_ptr use task_lookup_fd_rcu proc/fd: In tid_fd_mode use task_lookup_fd_rcu file: Implement task_lookup_fd_rcu file: Rename fcheck lookup_fd_rcu file: Replace fcheck_files with files_lookup_fd_rcu file: Factor files_lookup_fd_locked out of fcheck_files file: Rename __fcheck_files to files_lookup_fd_raw ... commit a00a3f29b2a6572108572359558c441da51dad70 Author: Zong Li Date: Thu Nov 26 11:00:43 2020 +0800 dt-bindings: fu740: prci: add YAML documentation for the FU740 PRCI Add YAML DT binding documentation for the SiFive FU740 PRCI. The link of unmatched board as follow, the U740-C000 manual would be present in the same page later. https://www.sifive.com/boards/hifive-unmatched Passes dt_binding_check. Signed-off-by: Zong Li Link: https://lore.kernel.org/r/20201126030043.67390-1-zong.li@sifive.com Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd commit 6febd8bef36e64fc1f4aaff1f6302be5c653ad64 Merge: 345d4ab5e0a22 bc54a5cda9791 Author: Linus Torvalds Date: Tue Dec 15 19:14:27 2020 -0800 Merge branch 'signal-for-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace Pull signal cleanup from Eric Biederman: "Remove a never used HP-UX compatibility from parisc headers and consolidating the SA_* flags definitions into a generic header as much as possible. We only have 32 SA_* flag bits total, so we need to be careful. But as this is the first addition in a decade or so I think we are fine for the forseeable future" * 'signal-for-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: signal/parisc: Remove parisc specific definition of __ARCH_UAPI_SA_FLAGS commit 345d4ab5e0a226e0e27219bef9ad150504666b0d Merge: 37373d9c37a34 23afeaeff3d98 Author: Linus Torvalds Date: Tue Dec 15 19:11:47 2020 -0800 Merge tag 'close-range-openat2-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux Pull close_range/openat2 updates from Christian Brauner: "This contains a fix for openat2() to make RESOLVE_BENEATH and RESOLVE_IN_ROOT mutually exclusive. It doesn't make sense to specify both at the same time. The openat2() selftests have been extended to verify that these two flags can't be specified together. This also adds the CLOSE_RANGE_CLOEXEC flag to close_range() which allows to mark a range of file descriptors as close-on-exec without actually closing them. This is useful in general but the use-case that triggered the patch is installing a seccomp profile in the calling task before exec. If the seccomp profile wants to block the close_range() syscall it obviously can't use it to close all fds before exec. If it calls close_range() before installing the seccomp profile it needs to take care not to close fds that it will still need before the exec meaning it would have to call close_range() multiple times on different ranges and then still fall back to closing fds one by one right before the exec. CLOSE_RANGE_CLOEXEC allows to solve this problem relying on the exec codepath to get rid of the unwanted fds. The close_range() tests have been expanded to verify that CLOSE_RANGE_CLOEXEC works" * tag 'close-range-openat2-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux: selftests: core: add tests for CLOSE_RANGE_CLOEXEC fs, close_range: add flag CLOSE_RANGE_CLOEXEC selftests: openat2: add RESOLVE_ conflict test openat2: reject RESOLVE_BENEATH|RESOLVE_IN_ROOT commit 37373d9c37a3401c08f22b61de1726b4f584b2e7 Merge: 1a825a6a0e7eb d4948d19d47f0 Author: Linus Torvalds Date: Tue Dec 15 19:09:44 2020 -0800 Merge branch 'regset.followup' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull regset updates from Al Viro: "Dead code removal, mostly. The only exception is a bit of cleanups on itanic (getting rid of redundant stack unwinds - each access_uarea() call does it and we call that 7 times in a row in ptrace_[sg]etregs(), *after* having done it ourselves in the caller; location where the user registers have been spilled won't change under us, and we can bloody well just call access_elf_reg() directly, giving it the unw_frame_info we'd calculated for our own purposes)" * 'regset.followup' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: c6x: kill ELF_CORE_COPY_FPREGS whack-a-mole: USE_ELF_CORE_DUMP [ia64] ptrace_[sg]etregs(): use access_elf_reg() instead of access_uarea() [ia64] missed cleanups from switch to regset coredumps arm: kill dump_task_regs() commit 1a825a6a0e7eb55c83c06f3c74631c2eeeb7d27f Merge: e88bd82698af8 319c15174757a Author: Linus Torvalds Date: Tue Dec 15 19:01:08 2020 -0800 Merge branch 'work.epoll' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull epoll updates from Al Viro: "Deal with epoll loop check/removal races sanely (among other things). The solution merged last cycle (pinning a bunch of struct file instances) had been forced by the wrong data structures; untangling that takes a bunch of preparations, but it's worth doing - control flow in there is ridiculously overcomplicated. Memory footprint has also gone down, while we are at it. This is not all I want to do in the area, but since I didn't get around to posting the followups they'll have to wait for the next cycle" * 'work.epoll' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (27 commits) epoll: take epitem list out of struct file epoll: massage the check list insertion lift rcu_read_lock() into reverse_path_check() convert ->f_ep_links/->fllink to hlist ep_insert(): move creation of wakeup source past the fl_ep_links insertion fold ep_read_events_proc() into the only caller take the common part of ep_eventpoll_poll() and ep_item_poll() into helper ep_insert(): we only need tep->mtx around the insertion itself ep_insert(): don't open-code ep_remove() on failure exits lift locking/unlocking ep->mtx out of ep_{start,done}_scan() ep_send_events_proc(): fold into the caller lift the calls of ep_send_events_proc() into the callers lift the calls of ep_read_events_proc() into the callers ep_scan_ready_list(): prepare to splitup ep_loop_check_proc(): saner calling conventions get rid of ep_push_nested() ep_loop_check_proc(): lift pushing the cookie into callers clean reverse_path_check_proc() a bit reverse_path_check_proc(): don't bother with cookies reverse_path_check_proc(): sane arguments ... commit e88bd82698af86887e33b07d48a1aec263cbeddb Merge: 1a50ede2b3c84 d8b3df8b10484 Author: Linus Torvalds Date: Tue Dec 15 18:58:27 2020 -0800 Merge tag 'erofs-for-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs Pull erofs updates from Gao Xiang: "This cycle we got rid of magical page->mapping type marks for temporary pages which had some concern before, now such usage is replaced with specific page->private. Also switch to inplace I/O instead of allocating extra cached pages to avoid direct reclaim under low memory scenario. There are some bmap bugfix and minor cleanups as well" * tag 'erofs-for-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs: erofs: avoid using generic_block_bmap erofs: force inplace I/O under low memory scenario erofs: simplify try_to_claim_pcluster() erofs: insert to managed cache after adding to pcl erofs: get rid of magical Z_EROFS_MAPPING_STAGING erofs: remove a void EROFS_VERSION macro set in Makefile commit 1a50ede2b3c846761a71c409f53e9121311a13c2 Merge: 9867cb1fd5101 716a8bc7f706e Author: Linus Torvalds Date: Tue Dec 15 18:52:30 2020 -0800 Merge tag 'nfsd-5.11' of git://git.linux-nfs.org/projects/cel/cel-2.6 Pull nfsd updates from Chuck Lever: "Several substantial changes this time around: - Previously, exporting an NFS mount via NFSD was considered to be an unsupported feature. With v5.11, the community has attempted to make re-exporting a first-class feature of NFSD. This would enable the Linux in-kernel NFS server to be used as an intermediate cache for a remotely-located primary NFS server, for example, even with other NFS server implementations, like a NetApp filer, as the primary. - A short series of patches brings support for multiple RPC/RDMA data chunks per RPC transaction to the Linux NFS server's RPC/RDMA transport implementation. This is a part of the RPC/RDMA spec that the other premiere NFS/RDMA implementation (Solaris) has had for a very long time, and completes the implementation of RPC/RDMA version 1 in the Linux kernel's NFS server. - Long ago, NFSv4 support was introduced to NFSD using a series of C macros that hid dprintk's and goto's. Over time, the kernel's XDR implementation has been greatly improved, but these C macros have remained and become fallow. A series of patches in this pull request completely replaces those macros with the use of current kernel XDR infrastructure. Benefits include: - More robust input sanitization in NFSD's NFSv4 XDR decoders. - Make it easier to use common kernel library functions that use XDR stream APIs (for example, GSS-API). - Align the structure of the source code with the RFCs so it is easier to learn, verify, and maintain our XDR implementation. - Removal of more than a hundred hidden dprintk() call sites. - Removal of some explicit manipulation of pages to help make the eventual transition to xdr->bvec smoother. - On top of several related fixes in 5.10-rc, there are a few more fixes to get the Linux NFSD implementation of NFSv4.2 inter-server copy up to speed. And as usual, there is a pinch of seasoning in the form of a collection of unrelated minor bug fixes and clean-ups. Many thanks to all who contributed this time around!" * tag 'nfsd-5.11' of git://git.linux-nfs.org/projects/cel/cel-2.6: (131 commits) nfsd: Record NFSv4 pre/post-op attributes as non-atomic nfsd: Set PF_LOCAL_THROTTLE on local filesystems only nfsd: Fix up nfsd to ensure that timeout errors don't result in ESTALE exportfs: Add a function to return the raw output from fh_to_dentry() nfsd: close cached files prior to a REMOVE or RENAME that would replace target nfsd: allow filesystems to opt out of subtree checking nfsd: add a new EXPORT_OP_NOWCC flag to struct export_operations Revert "nfsd4: support change_attr_type attribute" nfsd4: don't query change attribute in v2/v3 case nfsd: minor nfsd4_change_attribute cleanup nfsd: simplify nfsd4_change_info nfsd: only call inode_query_iversion in the I_VERSION case nfs_common: need lock during iterate through the list NFSD: Fix 5 seconds delay when doing inter server copy NFSD: Fix sparse warning in nfs4proc.c SUNRPC: Remove XDRBUF_SPARSE_PAGES flag in gss_proxy upcall sunrpc: clean-up cache downcall nfsd: Fix message level for normal termination NFSD: Remove macros that are no longer used NFSD: Replace READ* macros in nfsd4_decode_compound() ... commit 9867cb1fd510187d8f828540bdb48f78fceb70b3 Merge: 8a7a4301ddafa c61b3e4839007 Author: Linus Torvalds Date: Tue Dec 15 18:49:45 2020 -0800 Merge tag 'jfs-5.11' of git://github.com/kleikamp/linux-shaggy Pull jfs updates from David Kleikamp: "A few jfs fixes" * tag 'jfs-5.11' of git://github.com/kleikamp/linux-shaggy: jfs: Fix array index bounds check in dbAdjTree jfs: Fix memleak in dbAdjCtl jfs: delete duplicated words + other fixes commit 8a7a4301ddafa8445684c6c9cad2382bd42e7c4a Merge: f1ee3b8829006 4f19d071f9bee Author: Linus Torvalds Date: Tue Dec 15 18:47:04 2020 -0800 Merge tag 'dlm-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm Pull dlm updates from David Teigland: "This set includes more low level communication layer cleanups. The main change is the listening socket is no longer handled as a special case of node connection sockets. There is one small fix for checking the number of local connections" * tag 'dlm-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm: fs: dlm: check on existing node address fs: dlm: constify addr_compare fs: dlm: fix check for multi-homed hosts fs: dlm: listen socket out of connection hash fs: dlm: refactor sctp sock parameter fs: dlm: move shutdown action to node creation fs: dlm: move connect callback in node creation fs: dlm: add helper for init connection fs: dlm: handle non blocked connect event fs: dlm: flush othercon at close fs: dlm: add get buffer error handling fs: dlm: define max send buffer fs: dlm: fix proper srcu api call commit f1ee3b8829006b3fda999f00f0059aa327e3f3d0 Merge: a725cb4d708e5 b42fe98c92698 Author: Linus Torvalds Date: Tue Dec 15 18:40:42 2020 -0800 Merge tag 'for-5.11-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs updates from David Sterba: "We have a mix of all kinds of changes, feature updates, core stuff, performance improvements and lots of cleanups and preparatory changes. User visible: - export filesystem generation in sysfs - new features for mount option 'rescue': - what's currently supported is exported in sysfs - 'ignorebadroots'/'ibadroots' - continue even if some essential tree roots are not usable (extent, uuid, data reloc, device, csum, free space) - 'ignoredatacsums'/'idatacsums' - skip checksum verification on data - 'all' - now enables 'ignorebadroots' + 'ignoredatacsums' + 'nologreplay' - export read mirror policy settings to sysfs, new policies will be added in the future - remove inode number cache feature (mount -o inode_cache), obsoleted in 5.9 User visible fixes: - async discard scheduling fixes on high loads - update inode byte counter atomically so stat() does not report wrong value in some cases - free space tree fixes: - correctly report status of v2 after remount - clear v1 cache inodes when v2 is newly enabled after remount Core: - switch own tree lock implementation to standard rw semaphore: - one-level lock nesting is not required anymore, the last use of this was in free space that's now loaded asynchronously - own implementation of adaptive spinning before taking mutex has been part of rwsem - performance seems to be better in general, much better (+tens of percents) for some workloads - lockdep does not complain - finish direct IO conversion to iomap infrastructure, remove temporary workaround for DSYNC after iomap API updates - preparatory work to support data and metadata blocks smaller than page: - generalize code that assumes sectorsize == PAGE_SIZE, lots of refactoring - planned namely for 64K pages (eg. arm64, ppc64) - scrub read-only support - preparatory work for zoned allocation mode (SMR/ZBC/ZNS friendly): - disable incompatible features - round-robin superblock write - free space cache (v1) is loaded asynchronously, remove tree path recursion - slightly improved time tacking for transaction kthread wake ups Performance improvements (note that the numbers depend on load type or other features and weren't run on the same machine): - skip unnecessary work: - do not start readahead for csum tree when scrubbing non-data block groups - do not start and wait for delalloc on snapshot roots on transaction commit - fix race when defragmenting leads to unnecessary IO - dbench speedups (+throughput%/-max latency%): - skip unnecessary searches for xattrs when logging an inode (+10.8/-8.2) - stop incrementing log batch when joining log transaction (1-2) - unlock path before checking if extent is shared during nocow writeback (+5.0/-20.5), on fio load +9.7% throughput/-9.8% runtime - several tree log improvements, eg. removing unnecessary operations, fixing races that lead to additional work (+12.7/-8.2) - tree-checker error branches annotated with unlikely() (+3% throughput) Other: - cleanups - lockdep fixes - more btrfs_inode conversions - error variable cleanups" * tag 'for-5.11-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: (198 commits) btrfs: scrub: allow scrub to work with subpage sectorsize btrfs: scrub: support subpage data scrub btrfs: scrub: support subpage tree block scrub btrfs: scrub: always allocate one full page for one sector for RAID56 btrfs: scrub: reduce width of extent_len/stripe_len from 64 to 32 bits btrfs: refactor btrfs_lookup_bio_sums to handle out-of-order bvecs btrfs: remove btrfs_find_ordered_sum call from btrfs_lookup_bio_sums btrfs: handle sectorsize < PAGE_SIZE case for extent buffer accessors btrfs: update num_extent_pages to support subpage sized extent buffer btrfs: don't allow tree block to cross page boundary for subpage support btrfs: calculate inline extent buffer page size based on page size btrfs: factor out btree page submission code to a helper btrfs: make btrfs_verify_data_csum follow sector size btrfs: pass bio_offset to check_data_csum() directly btrfs: rename bio_offset of extent_submit_bio_start_t to dio_file_offset btrfs: fix lockdep warning when creating free space tree btrfs: skip space_cache v1 setup when not using it btrfs: remove free space items when disabling space cache v1 btrfs: warn when remount will not change the free space tree btrfs: use superblock state to print space_cache mount option ... commit a725cb4d708e5ac8bc76a70b3002ff64c07312d8 Merge: e87b070839418 8d1ddb5e79374 Author: Linus Torvalds Date: Tue Dec 15 18:34:15 2020 -0800 Merge tag 'locks-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux Pull file locking fixes from Jeff Layton: "A fix for some undefined integer overflow behavior, a typo in a comment header, and a fix for a potential deadlock involving internal senders of SIGIO/SIGURG" * tag 'locks-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux: fcntl: Fix potential deadlock in send_sig{io, urg}() locks: fix a typo at a kernel-doc markup locks: Fix UBSAN undefined behaviour in flock64_to_posix_lock commit e87b070839418ce8fec5aa9d5324d90f47e69f77 Merge: 0e10f9c89332d 950a7388f02bf Author: Linus Torvalds Date: Tue Dec 15 17:41:36 2020 -0800 Merge tag 'rpmsg-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc Pull rpmsg updates from Bjorn Andersson: "This extracts the 'nameserver' previously used only by the virtio rpmsg transport to work ontop of any rpmsg implementation and clarifies the endianness of the data types used in rpmsg" * tag 'rpmsg-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc: rpmsg: Turn name service into a stand alone driver rpmsg: Make rpmsg_{register|unregister}_device() public rpmsg: virtio: Add rpmsg channel device ops rpmsg: core: Add channel creation internal API rpmsg: virtio: Rename rpmsg_create_channel rpmsg: Move structure rpmsg_ns_msg to header file rpmsg: virtio: Move from virtio to rpmsg byte conversion rpmsg: Introduce __rpmsg{16|32|64} types commit 0e10f9c89332def4288b33866a1b793ffc94107b Merge: ef9df0011791c c3e9b463b41b4 Author: Linus Torvalds Date: Tue Dec 15 17:39:38 2020 -0800 Merge tag 'hwlock-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc Pull hwspinlock updates from Bjorn Andersson: "This contains a few minor cleanups and build warning fixes for the sprd and sirf hwspinlock drivers" * tag 'hwlock-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc: hwspinlock: sirf: Remove the redundant 'of_match_ptr' hwspinlock: sprd: fixed warning of unused variable 'sprd_hwspinlock_of_match' hwspinlock: sprd: use module_platform_driver() instead postcore initcall hwspinlock: sprd: Remove redundant header files commit ef9df0011791ce302b646e2adf3c698f3b20b90a Merge: 489e9fea66f31 3efa0ea743b77 Author: Linus Torvalds Date: Tue Dec 15 17:37:26 2020 -0800 Merge tag 'rproc-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc Pull remoteproc updates from Bjorn Andersson: "This introduces support for controlling the TI PRU, adds hooks for remoteproc drivers to override the default ELF based coredump format, introduces a library function for coredumps using named sections (aka the Qualcomm "minidump" format). It also fixes a problem with inconsistent notifications sent by the Qualcomm sysmon driver to the remote processors and it migrates the Qualcomm MSS driver to use power-domains for resources that aren't actually regulators. Lastly it contains a number of fixes for minor bugs and build warnings throughout the drivers" * tag 'rproc-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc: (47 commits) remoteproc/mediatek: read IPI buffer offset from FW remoteproc/mediatek: unprepare clk if scp_before_load fails remoteproc: qcom: Fix potential NULL dereference in adsp_init_mmio() remoteproc/mediatek: Fix kernel test robot warning remoteproc: k3-dsp: Fix return value check in k3_dsp_rproc_of_get_memories() remoteproc: qcom: pas: fix error handling in adsp_pds_enable remoteproc: qcom: fix reference leak in adsp_start remoteproc: q6v5-mss: fix error handling in q6v5_pds_enable remoteproc/mtk_scp: surround DT device IDs with CONFIG_OF remoteproc: qcom: Add minidump id for sm8150 modem remoteproc: qcom: Add capability to collect minidumps remoteproc: coredump: Add minidump functionality remoteproc: core: Add ops to enable custom coredump functionality remoteproc/mediatek: change MT8192 CFG register base remoteproc: pru: Add support for various PRU cores on K3 J721E SoCs remoteproc: pru: Add support for various PRU cores on K3 AM65x SoCs remoteproc: pru: Add pru-specific debugfs support remoteproc: pru: Add support for PRU specific interrupt configuration remoteproc: pru: Add a PRU remoteproc driver dt-bindings: remoteproc: Add binding doc for PRU cores in the PRU-ICSS ... commit edffb84cc8edc5e5bfdf7336adeec3678274cda2 Merge: 5c3485bb12c90 7a03aeb66c410 Author: Trond Myklebust Date: Tue Dec 15 20:08:41 2020 -0500 Merge tag 'nfs-rdma-for-5.11-1' of git://git.linux-nfs.org/projects/anna/linux-nfs into linux-next NFSoRDmA Client updates for Linux 5.11 Cleanups and improvements: - Remove use of raw kernel memory addresses in tracepoints - Replace dprintk() call sites in ERR_CHUNK path - Trace unmap sync calls - Optimize MR DMA-unmapping Signed-off-by: Trond Myklebust commit 489e9fea66f31086f85d9a18e61e4791d94a56a4 Merge: aab7ce2b099bd 255b2d524884e Author: Linus Torvalds Date: Tue Dec 15 16:49:59 2020 -0800 Merge tag 'pci-v5.11-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI updates from Bjorn Helgaas: "Enumeration: - Decode PCIe 64 GT/s link speed (Gustavo Pimentel) - Remove unused HAVE_PCI_SET_MWI (Heiner Kallweit) - Reduce pci_set_cacheline_size() message to debug level (Heiner Kallweit) - Fix pci_slot_release() NULL pointer dereference (Jubin Zhong) - Unify ECAM constants in native PCI Express drivers (Krzysztof Wilczyński) - Return u8 from pci_find_capability() and similar (Puranjay Mohan) - Return u16 from pci_find_ext_capability() and similar (Bjorn Helgaas) - Fix ACPI companion lookup for device 0 on the root bus (Rafael J. Wysocki) Resource management: - Keep both device and resource name for config space remaps (Alexander Lobakin) - Bounds-check command-line resource alignment requests (Bjorn Helgaas) - Fix overflow in command-line resource alignment requests (Colin Ian King) Driver binding: - Avoid duplicate IDs in driver dynamic IDs list (Zhenzhong Duan) Power management: - Save/restore Precision Time Measurement Capability for suspend/resume (David E. Box) - Disable PTM during suspend to save power (David E. Box) - Add sysfs attribute for device power state (Maximilian Luz) - Rename pci_wakeup_bus() to pci_resume_bus() (Mika Westerberg) - Do not generate wakeup event when runtime resuming device (Mika Westerberg) - Save/restore ASPM L1SS Capability for suspend/resume (Vidya Sagar) Virtualization: - Mark AMD Raven iGPU ATS as broken in some platforms (Alex Deucher) - Add function 1 DMA alias quirk for Marvell 9215 SATA controller (Bjorn Helgaas) MSI: - Disable MSI for Pericom PCIe-USB adapter (Andy Shevchenko) - Improve warnings for 32-bit-limited MSI support (Vidya Sagar) Error handling: - Cache RCEC EA Capability offset in pci_init_capabilities() (Sean V Kelley) - Rename reset_link() to reset_subordinates() (Sean V Kelley) - Write AER Capability only when we control it (Sean V Kelley) - Clear AER status only when we control AER (Sean V Kelley) - Bind RCEC devices to the Root Port driver (Qiuxu Zhuo) - Recover from RCiEP AER errors (Qiuxu Zhuo) - Recover from RCEC AER errors (Sean V Kelley) - Add pcie_link_rcec() to associate RCiEPs (Sean V Kelley) - Add pcie_walk_rcec() to RCEC AER handling (Sean V Kelley) - Add pcie_walk_rcec() to RCEC PME handling (Sean V Kelley) - Add RCEC AER error injection support (Qiuxu Zhuo) Broadcom iProc PCIe controller driver: - Fix out-of-bound array accesses (Bharat Gooty) - Invalidate correct PAXB inbound windows (Roman Bacik) - Enhance PCIe Link information display (Srinath Mannam) Cadence PCIe controller driver: - Make "cdns,max-outbound-regions" property optional (Kishon Vijay Abraham I) Intel VMD host bridge driver: - Offset client MSI-X vectors (Jon Derrick) - Update type of __iomem pointers (Krzysztof Wilczyński) NVIDIA Tegra PCIe controller driver: - Move "dbi" accesses to post common DWC initialization (Vidya Sagar) - Read "dbi" base address to program in application logic (Vidya Sagar) - Fix ASPM-L1SS advertisement disable code (Vidya Sagar) - Set DesignWare IP version (Vidya Sagar) - Continue unconfig sequence even if parts fail (Vidya Sagar) - Check return value of tegra_pcie_init_controller() (Vidya Sagar) - Disable LTSSM during L2 entry (Vidya Sagar) Qualcomm PCIe controller driver: - Document PCIe bindings for SM8250 SoC (Manivannan Sadhasivam) - Add SM8250 SoC support (Manivannan Sadhasivam) - Add support for configuring BDF to SID mapping for SM8250 (Manivannan Sadhasivam) Renesas R-Car PCIe controller driver: - rcar: Drop unused members from struct rcar_pcie_host (Lad Prabhakar) - PCI: rcar-pci-host: Document r8a774e1 bindings (Lad Prabhakar) - PCI: rcar-pci-host: Convert bindings to json-schema (Yoshihiro Shimoda) - PCI: rcar-pci-host: Document r8a77965 bindings (Yoshihiro Shimoda) Samsung Exynos PCIe controller driver: - Rework driver to support Exynos5433 PCIe PHY (Jaehoon Chung) - Rework driver to support Exynos5433 variant (Jaehoon Chung) - Drop samsung,exynos5440-pcie binding (Marek Szyprowski) - Add the samsung,exynos-pcie binding (Marek Szyprowski) - Add the samsung,exynos-pcie-phy binding (Marek Szyprowski) Synopsys DesignWare PCIe controller driver: - Support multiple ATU memory regions (Rob Herring) - Move intel-gw ATU offset out of driver match data (Rob Herring) - Move "dbi", "dbi2", and "addr_space" resource setup into common code (Rob Herring) - Remove intel-gw unneeded function wrappers (Rob Herring) - Ensure all outbound ATU windows are reset (Rob Herring) - Use the common MSI irq_chip in dra7xx (Rob Herring) - Drop the .set_num_vectors() host op (Rob Herring) - Move MSI interrupt setup into DWC common code (Rob Herring) - Rework MSI initialization (Rob Herring) - Move link handling into common code (Rob Herring) - Move dw_pcie_msi_init() into core (Rob Herring) - Move dw_pcie_setup_rc() to DWC common code (Rob Herring) - Remove unnecessary wrappers around dw_pcie_host_init() (Rob Herring) - Drop keystone duplicated 'num-viewport'" (Rob Herring) - Move inbound and outbound windows to common struct (Rob Herring) - Detect number of iATU windows (Rob Herring) - Warn if non-prefetchable memory aperture size is > 32-bit (Vidya Sagar) - Add support to program ATU for >4GB memory (Vidya Sagar) - Set 32-bit DMA mask for MSI target address allocation (Vidya Sagar) TI J721E PCIe driver: - Fix "ti,syscon-pcie-ctrl" to take argument (Kishon Vijay Abraham I) - Add host mode dt-bindings for TI's J7200 SoC (Kishon Vijay Abraham I) - Add EP mode dt-bindings for TI's J7200 SoC (Kishon Vijay Abraham I) - Get offset within "syscon" from "ti,syscon-pcie-ctrl" phandle arg (Kishon Vijay Abraham I) TI Keystone PCIe controller driver: - Enable compile-testing on !ARM (Alex Dewar)" * tag 'pci-v5.11-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (100 commits) PCI: Add function 1 DMA alias quirk for Marvell 9215 SATA controller PCI/ACPI: Fix companion lookup for device 0 on the root bus PCI: Keep both device and resource name for config space remaps PCI: xgene: Removed unused ".bus_shift" initialisers from pci-xgene.c PCI: vmd: Update type of the __iomem pointers PCI: iproc: Convert to use the new ECAM constants PCI: thunder-pem: Add constant for custom ".bus_shift" initialiser PCI: Unify ECAM constants in native PCI Express drivers PCI: Disable PTM during suspend to save power PCI/PTM: Save/restore Precision Time Measurement Capability for suspend/resume PCI: Mark AMD Raven iGPU ATS as broken in some platforms PCI: j721e: Get offset within "syscon" from "ti,syscon-pcie-ctrl" phandle arg dt-bindings: PCI: Add EP mode dt-bindings for TI's J7200 SoC dt-bindings: PCI: Add host mode dt-bindings for TI's J7200 SoC dt-bindings: pci: ti,j721e: Fix "ti,syscon-pcie-ctrl" to take argument PCI: dwc: Set 32-bit DMA mask for MSI target address allocation PCI: qcom: Add support for configuring BDF to SID mapping for SM8250 PCI: Reduce pci_set_cacheline_size() message to debug level PCI: Remove unused HAVE_PCI_SET_MWI PCI: qcom: Add SM8250 SoC support ... commit aab7ce2b099bd9df82573cd3170acf6518fdebeb Merge: b4ec805464a4a 38a0925c5fc89 Author: Linus Torvalds Date: Tue Dec 15 16:39:06 2020 -0800 Merge tag 'acpi-5.11-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 upstream revision 20201113, fix and clean up some resources manipulation code, extend the enumeration and gpio-line-names property documentation, clean up the handling of _DEP during device enumeration, add a new backlight DMI quirk, clean up transaction handling in the EC driver and make some assorted janitorial changes. Specifics: - Update ACPICA code in the kernel to upstream revision 20201113 with changes as follows: * Add 5 new UUIDs to the known UUID table (Bob Moore) * Remove extreaneous "the" in comments (Colin Ian King) * Add function trace macros to improve debugging (Erik Kaneda) * Fix interpreter memory leak (Erik Kaneda) * Handle "orphan" _REG for GPIO OpRegions (Hans de Goede) - Introduce resource_union() and resource_intersection() helpers and clean up some resource-manipulation code with the help of them (Andy Shevchenko) - Revert problematic commit related to the handling of resources in the ACPI core (Daniel Scally) - Extend the ACPI device enumeration documentation and the gpio-line-names _DSD property documentation, clean up the latter (Flavio Suligoi) - Clean up _DEP handling during device enumeration, modify the list of _DEP exceptions and the handling of it and fix up terminology related to _DEP (Hans de Goede, Rafael Wysocki) - Eliminate in_interrupt() usage from the ACPI EC driver (Sebastian Andrzej Siewior) - Clean up the advance_transaction() routine and related code in the ACPI EC driver (Rafael Wysocki) - Add new backlight quirk for GIGABYTE GB-BXBT-2807 (Jasper St Pierre) - Make assorted janitorial changes in several ACPI-related pieces of code (Hanjun Guo, Jason Yan, Punit Agrawal)" * tag 'acpi-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (40 commits) ACPI: scan: Fix up _DEP-related terminology with supplier/consumer ACPI: scan: Drop INT3396 from acpi_ignore_dep_ids[] ACPI: video: Add DMI quirk for GIGABYTE GB-BXBT-2807 Revert "ACPI / resources: Use AE_CTRL_TERMINATE to terminate resources walks" ACPI: scan: Add PNP0D80 to the _DEP exceptions list ACPI: scan: Call acpi_get_object_info() from acpi_add_single_object() ACPI: scan: Add acpi_info_matches_hids() helper ACPICA: Update version to 20201113 ACPICA: Interpreter: fix memory leak by using existing buffer ACPICA: Add function trace macros to improve debugging ACPICA: Also handle "orphan" _REG methods for GPIO OpRegions ACPICA: Remove extreaneous "the" in comments ACPICA: Add 5 new UUIDs to the known UUID table resource: provide meaningful MODULE_LICENSE() in test suite ASoC: Intel: catpt: Replace open coded variant of resource_intersection() ACPI: processor: Drop duplicate setting of shared_cpu_map ACPI: EC: Clean up status flags checks in advance_transaction() ACPI: EC: Untangle error handling in advance_transaction() ACPI: EC: Simplify error handling in advance_transaction() ACPI: EC: Rename acpi_ec_is_gpe_raised() ... commit b4ec805464a4a0299216a003278351d0b4806450 Merge: b109bc7229536 b3fac81783030 Author: Linus Torvalds Date: Tue Dec 15 16:30:31 2020 -0800 Merge tag 'pm-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management updates from Rafael Wysocki: "These update cpufreq (core and drivers), cpuidle (polling state implementation and the PSCI driver), the OPP (operating performance points) framework, devfreq (core and drivers), the power capping RAPL (Running Average Power Limit) driver, the Energy Model support, the generic power domains (genpd) framework, the ACPI device power management, the core system-wide suspend code and power management utilities. Specifics: - Use local_clock() instead of jiffies in the cpufreq statistics to improve accuracy (Viresh Kumar). - Fix up OPP usage in the cpufreq-dt and qcom-cpufreq-nvmem cpufreq drivers (Viresh Kumar). - Clean up the cpufreq core, the intel_pstate driver and the schedutil cpufreq governor (Rafael Wysocki). - Fix up error code paths in the sti-cpufreq and mediatek cpufreq drivers (Yangtao Li, Qinglang Miao). - Fix cpufreq_online() to return error codes instead of success (0) in all cases when it fails (Wang ShaoBo). - Add mt8167 support to the mediatek cpufreq driver and blacklist mt8516 in the cpufreq-dt-platdev driver (Fabien Parent). - Modify the tegra194 cpufreq driver to always return values from the frequency table as the current frequency and clean up that driver (Sumit Gupta, Jon Hunter). - Modify the arm_scmi cpufreq driver to allow it to discover the power scale present in the performance protocol and provide this information to the Energy Model (Lukasz Luba). - Add missing MODULE_DEVICE_TABLE to several cpufreq drivers (Pali Rohár). - Clean up the CPPC cpufreq driver (Ionela Voinescu). - Fix NVMEM_IMX_OCOTP dependency in the imx cpufreq driver (Arnd Bergmann). - Rework the poling interval selection for the polling state in cpuidle (Mel Gorman). - Enable suspend-to-idle for PSCI OSI mode in the PSCI cpuidle driver (Ulf Hansson). - Modify the OPP framework to support empty (node-less) OPP tables in DT for passing dependency information (Nicola Mazzucato). - Fix potential lockdep issue in the OPP core and clean up the OPP core (Viresh Kumar). - Modify dev_pm_opp_put_regulators() to accept a NULL argument and update its users accordingly (Viresh Kumar). - Add frequency changes tracepoint to devfreq (Matthias Kaehlcke). - Add support for governor feature flags to devfreq, make devfreq sysfs file permissions depend on the governor and clean up the devfreq core (Chanwoo Choi). - Clean up the tegra20 devfreq driver and deprecate it to allow another driver based on EMC_STAT to be used instead of it (Dmitry Osipenko). - Add interconnect support to the tegra30 devfreq driver, allow it to take the interconnect and OPP information from DT and clean it up (Dmitry Osipenko). - Add interconnect support to the exynos-bus devfreq driver along with interconnect properties documentation (Sylwester Nawrocki). - Add suport for AMD Fam17h and Fam19h processors to the RAPL power capping driver (Victor Ding, Kim Phillips). - Fix handling of overly long constraint names in the powercap framework (Lukasz Luba). - Fix the wakeup configuration handling for bridges in the ACPI device power management core (Rafael Wysocki). - Add support for using an abstract scale for power units in the Energy Model (EM) and document it (Lukasz Luba). - Add em_cpu_energy() micro-optimization to the EM (Pavankumar Kondeti). - Modify the generic power domains (genpd) framwework to support suspend-to-idle (Ulf Hansson). - Fix creation of debugfs nodes in genpd (Thierry Strudel). - Clean up genpd (Lina Iyer). - Clean up the core system-wide suspend code and make it print driver flags for devices with debug enabled (Alex Shi, Patrice Chotard, Chen Yu). - Modify the ACPI system reboot code to make it prepare for system power off to avoid confusing the platform firmware (Kai-Heng Feng). - Update the pm-graph (multiple changes, mostly usability-related) and cpupower (online and offline CPU information support) PM utilities (Todd Brandt, Brahadambal Srinivasan)" * tag 'pm-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (86 commits) cpufreq: Fix cpufreq_online() return value on errors cpufreq: Fix up several kerneldoc comments cpufreq: stats: Use local_clock() instead of jiffies cpufreq: schedutil: Simplify sugov_update_next_freq() cpufreq: intel_pstate: Simplify intel_cpufreq_update_pstate() PM: domains: create debugfs nodes when adding power domains opp: of: Allow empty opp-table with opp-shared dt-bindings: opp: Allow empty OPP tables media: venus: dev_pm_opp_put_*() accepts NULL argument drm/panfrost: dev_pm_opp_put_*() accepts NULL argument drm/lima: dev_pm_opp_put_*() accepts NULL argument PM / devfreq: exynos: dev_pm_opp_put_*() accepts NULL argument cpufreq: qcom-cpufreq-nvmem: dev_pm_opp_put_*() accepts NULL argument cpufreq: dt: dev_pm_opp_put_regulators() accepts NULL argument opp: Allow dev_pm_opp_put_*() APIs to accept NULL opp_table opp: Don't create an OPP table from dev_pm_opp_get_opp_table() cpufreq: dt: Don't (ab)use dev_pm_opp_get_opp_table() to create OPP table opp: Reduce the size of critical section in _opp_kref_release() PM / EM: Micro optimization in em_cpu_energy cpufreq: arm_scmi: Discover the power scale in performance protocol ... commit b109bc72295363fb746bc42bdd777f7a8abb177b Merge: ee249d30fadec 4401117bf7fc1 Author: Linus Torvalds Date: Tue Dec 15 16:21:37 2020 -0800 Merge tag 'thermal-v5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux Pull thermal updates from Daniel Lezcano: - Add upper and lower limits clamps for the cooling device state in the power allocator governor (Michael Kao) - Add upper and lower limits support for the power allocator governor (Lukasz Luba) - Optimize conditions testing for the trip points (Bernard Zhao) - Replace spin_lock_irqsave by spin_lock in hard IRQ on the rcar driver (Tian Tao) - Add MT8516 dt-bindings and device reset optional support (Fabien Parent) - Add a quiescent period to cool down the PCH when entering S0iX (Sumeet Pawnikar) - Use bitmap API instead of re-inventing the wheel on sun8i (Yangtao Li) - Remove useless NULL check in the hwmon driver (Bernard Zhao) - Update the current state in the cpufreq cooling device only if the frequency change is effective (Zhuguangqing) - Improve the schema validation for the rcar DT bindings (Geert Uytterhoeven) - Fix the user time unit in the documentation (Viresh Kumar) - Add PCI ids for Lewisburg PCH (Andres Freund) - Add hwmon support on amlogic (Martin Blumenstingl) - Fix build failure for PCH entering on in S0iX (Randy Dunlap) - Improve the k_* coefficient for the power allocator governor (Lukasz Luba) - Fix missing const on a sysfs attribute (Rikard Falkeborn) - Remove broken interrupt support on rcar to be replaced by a new one (Niklas Söderlund) - Improve the error code handling at init time on imx8mm (Fabio Estevam) - Compute interval validity once instead at each temperature reading iteration on acerhdf (Daniel Lezcano) - Add r8a779a0 support (Niklas Söderlund) - Add PCI ids for AlderLake PCH and mmio refactoring (Srinivas Pandruvada) - Add RFIM and mailbox support on int340x (Srinivas Pandruvada) - Use macro for temperature calculation on PCH (Sumeet Pawnikar) - Simplify return conditions at probe time on Broadcom (Zheng Yongjun) - Fix workload name on PCH (Srinivas Pandruvada) - Migrate the devfreq cooling device code to the energy model API (Lukasz Luba) - Emit a warning if the thermal_zone_device_update is called without the .get_temp() ops (Daniel Lezcano) - Add critical and hot ops for the thermal zone (Daniel Lezcano) - Remove notification usage when critical is reached on rcar (Daniel Lezcano) - Fix devfreq build when ENERGY_MODEL is not set (Lukasz Luba) * tag 'thermal-v5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux: (45 commits) thermal/drivers/devfreq_cooling: Fix the build when !ENERGY_MODEL thermal/drivers/rcar: Remove notification usage thermal/core: Add critical and hot ops thermal/core: Emit a warning if the thermal zone is updated without ops drm/panfrost: Register devfreq cooling and attempt to add Energy Model thermal: devfreq_cooling: remove old power model and use EM thermal: devfreq_cooling: add new registration functions with Energy Model thermal: devfreq_cooling: use a copy of device status thermal: devfreq_cooling: change tracing function and arguments thermal: int340x: processor_thermal: Correct workload type name thermal: broadcom: simplify the return expression of bcm2711_thermal_probe() thermal: intel: pch: use macro for temperature calculation thermal: int340x: processor_thermal: Add mailbox driver thermal: int340x: processor_thermal: Add RFIM driver thermal: int340x: processor_thermal: Add AlderLake PCI device id thermal: int340x: processor_thermal: Refactor MMIO interface thermal: rcar_gen3_thermal: Add r8a779a0 support dt-bindings: thermal: rcar-gen3-thermal: Add r8a779a0 support platform/x86/drivers/acerhdf: Check the interval value when it is set platform/x86/drivers/acerhdf: Use module_param_cb to set/get polling interval ... commit ee249d30fadec7677364063648f5547e243bf93f Merge: 61f914256c56a 4b4193256c8d3 Author: Linus Torvalds Date: Tue Dec 15 16:18:23 2020 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: - support for inhibiting input devices at request from userspace. If a device implements open/close methods, it can also put device into low power state. This is needed, for example, to disable keyboard and touchpad on convertibles when they are transitioned into tablet mode - now that ordinary input devices can be configured for polling mode, dedicated input polling device implementation has been removed - GTCO tablet driver has been removed, as it used problematic custom HID parser, devices are EOL, and there is no interest from the manufacturer - a new driver for Dialog DA7280 haptic chips has been introduced - a new driver for power button on Dell Wyse 3020 - support for eKTF2132 in ektf2127 driver - support for SC2721 and SC2730 in sc27xx-vibra driver - enhancements for Atmel touchscreens, AD7846 touchscreens, Elan touchpads, ADP5589, ST1232 touchscreen, TM2 touchkey drivers - fixes and cleanups to allow clean builds with W=1 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (86 commits) Input: da7280 - fix spelling mistake "sequemce" -> "sequence" Input: cyapa_gen6 - fix out-of-bounds stack access Input: sc27xx - add support for sc2730 and sc2721 dt-bindings: input: Add compatible string for SC2721 and SC2730 dt-bindings: input: Convert sc27xx-vibra.txt to json-schema Input: stmpe - add axis inversion and swapping capability Input: adp5589-keys - do not explicitly control IRQ for wakeup Input: adp5589-keys - do not unconditionally configure as wakeup source Input: ipx4xx-beeper - convert comma to semicolon Input: parkbd - convert comma to semicolon Input: new da7280 haptic driver dt-bindings: input: Add document bindings for DA7280 MAINTAINERS: da7280 updates to the Dialog Semiconductor search terms Input: elantech - fix protocol errors for some trackpoints in SMBus mode Input: elan_i2c - add new trackpoint report type 0x5F Input: elants - document some registers and values Input: atmel_mxt_ts - simplify the return expression of mxt_send_bootloader_cmd() Input: imx_keypad - add COMPILE_TEST support Input: applespi - use new structure for SPI transfer delays Input: synaptics-rmi4 - use new structure for SPI transfer delays ... commit 61f914256c56a39a96dc14eae9f394d35b934812 Merge: 0f97458173a23 0cd3f561efa9a Author: Linus Torvalds Date: Tue Dec 15 16:10:17 2020 -0800 Merge tag 'platform-drivers-x86-v5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver updates from Hans de Goede: "Highlights: - New driver for changing BIOS settings from within Linux on Dell devices. This introduces a new generic sysfs API for this. Lenovo is working on also supporting this API on their devices - New Intel PMT telemetry and crashlog drivers - Support for SW_TABLET_MODE reporting for the acer-wmi and intel-hid drivers - Preparation work for improving support for Microsoft Surface hardware - Various fixes / improvements / quirks for the panasonic-laptop and others" * tag 'platform-drivers-x86-v5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (81 commits) platform/x86: ISST: Mark mmio_range_devid_0 and mmio_range_devid_1 with static keyword platform/x86: intel-hid: add Rocket Lake ACPI device ID x86/platform: classmate-laptop: add WiFi media button platform/x86: mlx-platform: Fix item counter assignment for MSN2700/ComEx system platform/x86: mlx-platform: Fix item counter assignment for MSN2700, MSN24xx systems tools/power/x86/intel-speed-select: Update version for v5.11 tools/power/x86/intel-speed-select: Account for missing sysfs for die_id tools/power/x86/intel-speed-select: Read TRL from mailbox platform/x86: intel-hid: Do not create SW_TABLET_MODE input-dev when a KIOX010A ACPI dev is present platform/x86: intel-hid: Add alternative method to enable switches platform/x86: intel-hid: Add support for SW_TABLET_MODE platform/x86: intel-vbtn: Fix SW_TABLET_MODE always reporting 1 on some HP x360 models platform/x86: ISST: Change PCI device macros platform/x86: ISST: Allow configurable offset range platform/x86: ISST: Check for unaligned mmio address acer-wireless: send an EV_SYN/SYN_REPORT between state changes platform/x86: dell-wmi-sysman: work around for BIOS bug platform/x86: mlx-platform: remove an unused variable platform/x86: thinkpad_acpi: remove trailing semicolon in macro definition platform/x86: dell-smbios-base: Fix error return code in dell_smbios_init ... commit 0f97458173a23c8f218f6041767d0a145a13abe6 Merge: ce51c2b7ceb23 1a033769a4fe9 Author: Linus Torvalds Date: Tue Dec 15 16:06:14 2020 -0800 Merge tag 'hwmon-for-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon updates from Guenter Roeck: "New drivers: - SB-TSI sensors - Lineat Technology LTC2992 - Delta power supplies Q54SJ108A2 - Maxim MAX127 - Corsair PSU - STMicroelectronics PM6764 Voltage Regulator New chip support: - P10 added to fsi/occ driver - NCT6687D added to nct6883 driver - Intel-based Xserves added to applesmc driver - AMD family 19h model 01h added to amd_energy driver And various minor bug fixes and improvements" * tag 'hwmon-for-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (41 commits) dt-bindings: (hwmon/sbtsi_temp) Add SB-TSI hwmon driver bindings hwmon: (sbtsi) Add documentation hwmon: (sbtsi) Add basic support for SB-TSI sensors hwmon: (iio_hwmon) Drop bogus __refdata annotation hwmon: (xgene) Drop bogus __refdata annotation dt-bindings: hwmon: convert AD ADM1275 bindings to dt-schema hwmon: (occ) Add new temperature sensor type fsi: occ: Add support for P10 dt-bindings: fsi: Add P10 OCC device documentation dt-bindings: hwmon: convert TI ADS7828 bindings to dt-schema dt-bindings: hwmon: convert AD AD741x bindings to dt-schema dt-bindings: hwmon: convert TI INA2xx bindings to dt-schema hwmon: (ltc2992) Fix less than zero comparisons with an unsigned integer hwmon: (pmbus/q54sj108a2) Correct title underline length dt-bindings: hwmon: Add documentation for ltc2992 hwmon: (ltc2992) Add support for GPIOs. hwmon: (ltc2992) Add support hwmon: (pmbus) Driver for Delta power supplies Q54SJ108A2 hwmon: Add driver for STMicroelectronics PM6764 Voltage Regulator hwmon: (nct6683) Support NCT6687D. ... commit ce51c2b7ceb23a23eb0dc523c80879d8f35e4f38 Merge: 9d0d886799e49 72b248cfbf3fd Author: Linus Torvalds Date: Tue Dec 15 15:57:25 2020 -0800 Merge tag 'mmc-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC updates from Ulf Hansson: "MMC core: - Initial support for SD express card/host MMC host: - mxc: Convert the driver to DT-only - mtk-sd: Add HS400 enhanced strobe support - mtk-sd: Add support for the MT8192 SoC variant - sdhci-acpi: Allow changing HS200/HS400 driver strength for AMDI0040 - sdhci-esdhc-imx: Convert the driver to DT-only - sdhci-pci-gli: Improve performance for HS400 mode for GL9763E - sdhci-pci-gli: Reduce power consumption for GL9755 - sdhci-xenon: Introduce ACPI support - tmio: Fix command error processing - tmio: Inform the core about the max_busy_timeout - tmio/renesas_sdhi: Support custom calculation of busy-wait time - renesas_sdhi: Reset SCC only when available - rtsx_pci: Add SD Express mode support for RTS5261 - rtsx_pci: Various fixes and improvements for RTS5261 MEMSTICK: - Minor fixes/improvements" * tag 'mmc-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (72 commits) dt-bindings: mmc: eliminate yamllint warnings mmc: sdhci-xenon: introduce ACPI support mmc: sdhci-xenon: use clk only with DT mmc: sdhci-xenon: switch to device_* API mmc: sdhci-xenon: use match data for controllers variants dt-bindings: mmc: Fix xlnx,mio-bank property values for arasan driver mmc: renesas_sdhi: populate hook for longer busy_wait mmc: tmio: add hook for custom busy_wait calculation mmc: tmio: set max_busy_timeout dt-bindings: mmc: imx: fix the wrongly dropped imx8qm compatible string mmc: sdhci-pci-gli: Disable slow mode in HS400 mode for GL9763E mmc: sdhci: Use more concise device_property_read_u64 memstick: r592: Fix error return in r592_probe() mmc: mxc: Convert the driver to DT-only mmc: mxs: Remove the unused .id_table mmc: sdhci-of-arasan: Fix fall-through warnings for Clang mmc: sdhci-pci-gli: Reduce power consumption for GL9755 mmc: mediatek: depend on COMMON_CLK to fix compile tests mmc: pxamci: Fix error return code in pxamci_probe mmc: sdhci: Update firmware interface API ... commit 9d0d886799e49e0f6d51e70c823416919544fdb7 Merge: 605ea5aafe134 4e970a0ada529 Author: Linus Torvalds Date: Tue Dec 15 15:53:50 2020 -0800 Merge branch 'i2c/for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c updates from Wolfram Sang: "A bit smaller this time with mostly usual driver updates. Slave support for imx stands out a little" * 'i2c/for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (30 commits) i2c: remove check that can never be true i2c: Warn when device removing fails dt-bindings: i2c: Update DT binding docs to support SiFive FU740 SoC dt-bindings: i2c: Add compatible string for AM64 SoC i2c: designware: Make register offsets all of the same width i2c: designware: Switch header to use BIT() and GENMASK() i2c: pxa: move to generic GPIO recovery i2c: sh_mobile: Mark adapter suspended during suspend i2c: owl: Add compatible for the Actions Semi S500 I2C controller dt-bindings: i2c: owl: Convert Actions Semi Owl binding to a schema i2c: imx: support slave mode for imx I2C driver i2c: ismt: Adding support for I2C_SMBUS_BLOCK_PROC_CALL i2c: ocores: Avoid false-positive error log message. Revert "i2c: qcom-geni: Disable DMA processing on the Lenovo Yoga C630" i2c: mxs: Remove unneeded platform_device_id i2c: pca-platform: drop two members from driver data that are assigned to only i2c: imx: Remove unused .id_table support i2c: nvidia-gpu: drop empty stub for runtime pm dt-bindings: i2c: mellanox,i2c-mlxbf: convert txt to YAML schema i2c: mv64xxx: Add bus error recovery ... commit 605ea5aafe1341ac9b2144516f898ac78ad49c40 Merge: 2dda5700ef6af 3e98a021cc85e Author: Linus Torvalds Date: Tue Dec 15 15:51:10 2020 -0800 Merge tag 'spi-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi updates from Mark Brown: "The big change this release has been some excellent work from Lukas Wunner which closes a bunch of holes in the cleanup paths for drivers, mainly introduced as a result of devm conversions causing bad interactions with the support SPI has for allocating the bus and driver data together. Together with some of the other work done it feels like we've turned the corner on several long standing pain points with the API. Summary: - Many cleanups around probe/remove and error handling from Lukas Wunner and Uwe Kleine-König, and further fixes around PM from Zhang Qilong. - Provide a mask for which bits of the mode can safely be configured by drivers and use that to fix an issue with the ADS7846 driver. - Documentation of the expected interactions between SPI and GPIO level chip select polarity configuration from H. Nikolaus Schaller, hopefully we're pretty much at the end of sorting out the interactions there. Thanks to Nikolaus, Sven Van Asbroeck and Linus Walleij for this. - DMA support for Allwinner sun6i controllers. - Support for Canaan K210 Designware implementations and Intel Adler Lake" * tag 'spi-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (69 commits) spi: dt-bindings: clarify CS behavior for spi-cs-high and gpio descriptors spi: Limit the spi device max speed to controller's max speed spi: spi-geni-qcom: Use the new method of gpio CS control platform/chrome: cros_ec_spi: Drop bits_per_word assignment platform/chrome: cros_ec_spi: Don't overwrite spi::mode spi: dw: Add support for the Canaan K210 SoC SPI spi: dw: Add support for 32-bits max xfer size dt-bindings: spi: dw-apb-ssi: Add Canaan K210 SPI controller spi: Update DT binding docs to support SiFive FU740 SoC spi: atmel-quadspi: Fix use-after-free on unbind spi: npcm-fiu: Disable clock in probe error path spi: ar934x: Don't leak SPI master in probe error path spi: mt7621: Don't leak SPI master in probe error path spi: mt7621: Disable clock in probe error path media: netup_unidvb: Don't leak SPI master in probe error path spi: sc18is602: Don't leak SPI master in probe error path spi: rb4xx: Don't leak SPI master in probe error path spi: gpio: Don't leak SPI master in probe error path spi: spi-mtk-nor: Don't leak SPI master in probe error path spi: mxic: Don't leak SPI master in probe error path ... commit 2dda5700ef6af806e0358f63d81eb436a0d280fa Merge: a45f1d43311d3 5e999f10a16b9 Author: Linus Torvalds Date: Tue Dec 15 15:48:30 2020 -0800 Merge tag 'regulator-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator updates from Mark Brown: "This has been a quiet release for the regulator API, a few new drivers and the usual fixes and cleanup traffic but not much else going on: - Optimisations for the handling of voltage enumeration, especially with sparse selector sets, from Claudiu Beznea. - Support for several ARM SCMI regulators, Dialog DA9121, NXP PF8x00, Qualcomm PMX55, PM8350 and PM8350c The addition of the SCMI regulator driver (which controls regulators via system firmware) means that we've pulled in the support for the underlying firmware operations from the firmware tree" * tag 'regulator-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (53 commits) regulator: mc13892-regulator: convert comma to semicolon regulator: pfuze100: Convert the driver to DT-only regulator: max14577: Add proper module aliases strings regulator: da9121: Potential Oops in da9121_assign_chip_model() regulator: da9121: Fix index used for DT property regulator: da9121: Remove uninitialised string variable regulator: axp20x: Fix DLDO2 voltage control register mask for AXP22x regulator: qcom-rpmh: Add support for PM8350/PM8350c regulator: dt-bindings: Add PM8350x compatibles regulator: da9121: include linux/gpio/consumer.h regulator: da9121: Mark some symbols with static keyword regulator: da9121: Request IRQ directly and free in release function to avoid masking race regulator: da9121: add interrupt support regulator: da9121: add mode support regulator: da9121: add current support regulator: da9121: Update registration to support multiple buck variants regulator: da9121: Add support for device variants via devicetree regulator: da9121: Add device variant descriptors regulator: da9121: Add device variant regmaps regulator: da9121: Add device variants ... commit a45f1d43311d3a4f6534e48a3655ba3247a59d48 Merge: 2cffa11e2aa76 4616c509d187d Author: Linus Torvalds Date: Tue Dec 15 15:34:38 2020 -0800 Merge tag 'regmap-v5.11' 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 regmap with two substantial features being added: - Support for register maps Soundwire 1.2 multi-byte operations, allowing atomic support for registers larger than a single byte. - Support for relaxed I/O without barriers in MMIO regmaps, allowing them to be used efficiently on systems where default MMIO operations include barriers. There was also an addition and revert of use of the new Soundwire support for RT715 due to build issues with the driver built in, my tests only covered building it as a module, the patch wasn't just dropped as it had already been merged elsewhere" * tag 'regmap-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: ASoC: rt715: Fix build regmap: sdw: add required header files regmap: Remove duplicate `type` field from regmap `regcache_sync` trace event regmap: Fix order of regmap write log regmap: mmio: add config option to allow relaxed MMIO accesses commit f70cc33029fca3cf62bffb15102ea42eb4d097ac Author: Alexandre Belloni Date: Sun Dec 6 00:14:48 2020 +0100 rtc: fix RTC removal Since the rtc_register_device, removing an RTC device will end with a refcount_t: underflow; use-after-free warning since put_device is called twice in the device tear down path. Fixes: fdcfd854333b ("rtc: rework rtc_register_device() resource management") Signed-off-by: Alexandre Belloni Reviewed-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20201205231449.610980-1-alexandre.belloni@bootlin.com commit 57f04815fd95bb8c46f6ec5c9d25430bb52d419f Author: Rob Clark Date: Thu Dec 10 09:40:28 2020 -0800 drm/msm: Fix WARN_ON() splat in _free_object() [ 192.062000] ------------[ cut here ]------------ [ 192.062498] WARNING: CPU: 3 PID: 2039 at drivers/gpu/drm/msm/msm_gem.c:381 put_iova_vmas+0x94/0xa0 [msm] [ 192.062870] Modules linked in: snd_hrtimer snd_seq snd_seq_device rfcomm algif_hash algif_skcipher af_alg bnep xt_CHECKSUM nft_chain_nat xt_MASQUERADE nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nft_counter xt_tcpudp nft_compat cpufreq_powersave cpufreq_conservative q6asm_dai q6routing q6afe_dai q6adm bridge q6afe q6asm q6dsp_common q6core stp llc nf_tables libcrc32c nfnetlink snd_soc_wsa881x regmap_sdw soundwire_qcom gpio_wcd934x snd_soc_wcd934x wcd934x regmap_slimbus venus_enc venus_dec apr videobuf2_dma_sg qrtr_smd uvcvideo videobuf2_vmalloc videobuf2_memops ath10k_snoc ath10k_core hci_uart btqca btbcm mac80211 bluetooth snd_soc_sdm845 ath snd_soc_rt5663 snd_soc_qcom_common snd_soc_rl6231 soundwire_bus ecdh_generic ecc qcom_spmi_adc5 venus_core qcom_pon qcom_spmi_temp_alarm qcom_vadc_common v4l2_mem2mem videobuf2_v4l2 cfg80211 videobuf2_common hid_multitouch reset_qcom_pdc qcrypto qcom_rng rfkill qcom_q6v5_mss libarc4 libdes qrtr ns qcom_wdt socinfo slim_qcom_ngd_ctrl [ 192.065739] pdr_interface qcom_q6v5_pas slimbus qcom_pil_info qcom_q6v5 qcom_sysmon qcom_common qcom_glink_smem qmi_helpers rmtfs_mem tcp_bbr sch_fq fuse ip_tables x_tables ipv6 crc_ccitt ti_sn65dsi86 i2c_hid msm mdt_loader llcc_qcom rtc_pm8xxx ocmem drm_kms_helper crct10dif_ce phy_qcom_qusb2 i2c_qcom_geni panel_simple drm pwm_bl [ 192.066066] CPU: 3 PID: 2039 Comm: gnome-shell Tainted: G W 5.10.0-rc7-next-20201208 #1 [ 192.066068] Hardware name: LENOVO 81JL/LNVNB161216, BIOS 9UCN33WW(V2.06) 06/ 4/2019 [ 192.066072] pstate: 40400005 (nZcv daif +PAN -UAO -TCO BTYPE=--) [ 192.066099] pc : put_iova_vmas+0x94/0xa0 [msm] [ 192.066262] lr : put_iova_vmas+0x1c/0xa0 [msm] [ 192.066403] sp : ffff800019efbbb0 [ 192.066405] x29: ffff800019efbbb0 x28: ffff800019efbd88 [ 192.066411] x27: 0000000000000000 x26: ffff109582efa400 [ 192.066417] x25: 0000000000000009 x24: 000000000000012b [ 192.066422] x23: ffff109582efa438 x22: ffff109582efa450 [ 192.066427] x21: ffff109582efa528 x20: ffff1095cbd4f200 [ 192.066432] x19: ffff1095cbd4f200 x18: 0000000000000000 [ 192.066438] x17: 0000000000000000 x16: ffffc26c200ca750 [ 192.066727] x15: 0000000000000000 x14: 0000000000000000 [ 192.066741] x13: ffff1096fb8c9100 x12: 0000000000000002 [ 192.066754] x11: ffffffffffffffff x10: 0000000000000002 [ 192.067046] x9 : 0000000000000001 x8 : 0000000000000a36 [ 192.067060] x7 : ffff4e2ad9f11000 x6 : ffffc26c216d4000 [ 192.067212] x5 : ffffc26c2022661c x4 : ffff1095c2b98000 [ 192.067367] x3 : ffff1095cbd4f300 x2 : 0000000000000000 [ 192.067380] x1 : ffff1095c2b98000 x0 : 0000000000000000 [ 192.067667] Call trace: [ 192.067734] put_iova_vmas+0x94/0xa0 [msm] [ 192.068078] msm_gem_free_object+0xb4/0x110 [msm] [ 192.068399] drm_gem_object_free+0x1c/0x30 [drm] [ 192.068717] drm_gem_object_handle_put_unlocked+0xf0/0xf8 [drm] [ 192.069032] drm_gem_object_release_handle+0x6c/0x88 [drm] [ 192.069349] drm_gem_handle_delete+0x68/0xc0 [drm] [ 192.069666] drm_gem_close_ioctl+0x30/0x48 [drm] [ 192.069984] drm_ioctl_kernel+0xc0/0x110 [drm] [ 192.070303] drm_ioctl+0x210/0x440 [drm] [ 192.070588] __arm64_sys_ioctl+0xa8/0xf0 [ 192.070599] el0_svc_common.constprop.0+0x74/0x190 [ 192.070608] do_el0_svc+0x24/0x90 [ 192.070618] el0_svc+0x14/0x20 [ 192.070903] el0_sync_handler+0xb0/0xb8 [ 192.070911] el0_sync+0x174/0x180 [ 192.070918] ---[ end trace bee6b12a899001a3 ]--- [ 192.072140] ------------[ cut here ]------------ Fixes: 9b73bde39cf2 ("drm/msm: Fix use-after-free in msm_gem with carveout") Signed-off-by: Rob Clark Acked-by: Iskren Chernev commit 2cffa11e2aa76a0560c890f057858b68fe744d03 Merge: 5b200f578960a 3c41e57a1e168 Author: Linus Torvalds Date: Tue Dec 15 15:03:31 2020 -0800 Merge tag 'irq-core-2020-12-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq updates from Thomas Gleixner: "Generic interrupt and irqchips subsystem updates. Unusually, there is not a single completely new irq chip driver, just new DT bindings and extensions of existing drivers to accomodate new variants! Core: - Consolidation and robustness changes for irq time accounting - Cleanup and consolidation of irq stats - Remove the fasteoi IPI flow which has been proved useless - Provide an interface for converting legacy interrupt mechanism into irqdomains Drivers: - Preliminary support for managed interrupts on platform devices - Correctly identify allocation of MSIs proxyied by another device - Generalise the Ocelot support to new SoCs - Improve GICv4.1 vcpu entry, matching the corresponding KVM optimisation - Work around spurious interrupts on Qualcomm PDC - Random fixes and cleanups" * tag 'irq-core-2020-12-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (54 commits) irqchip/qcom-pdc: Fix phantom irq when changing between rising/falling driver core: platform: Add devm_platform_get_irqs_affinity() ACPI: Drop acpi_dev_irqresource_disabled() resource: Add irqresource_disabled() genirq/affinity: Add irq_update_affinity_desc() irqchip/gic-v3-its: Flag device allocation as proxied if behind a PCI bridge irqchip/gic-v3-its: Tag ITS device as shared if allocating for a proxy device platform-msi: Track shared domain allocation irqchip/ti-sci-intr: Fix freeing of irqs irqchip/ti-sci-inta: Fix printing of inta id on probe success drivers/irqchip: Remove EZChip NPS interrupt controller Revert "genirq: Add fasteoi IPI flow" irqchip/hip04: Make IPIs use handle_percpu_devid_irq() irqchip/bcm2836: Make IPIs use handle_percpu_devid_irq() irqchip/armada-370-xp: Make IPIs use handle_percpu_devid_irq() irqchip/gic, gic-v3: Make SGIs use handle_percpu_devid_irq() irqchip/ocelot: Add support for Jaguar2 platforms irqchip/ocelot: Add support for Serval platforms irqchip/ocelot: Add support for Luton platforms irqchip/ocelot: prepare to support more SoC ... commit cd7b699b0198a7fc24f6dc79985f6151f589518c Author: Shyam Prasad N Date: Thu Nov 12 08:56:49 2020 -0800 cifs: Tracepoints and logs for tracing credit changes. There is at least one suspected bug in crediting changes in cifs.ko which has come up a few times in the discussions and in a customer case. This change adds tracepoints to the code which modifies the server credit values in any way. The goal is to be able to track the changes to the credit values of the session to be able to catch when there is a crediting bug. Signed-off-by: Shyam Prasad N Signed-off-by: Steve French commit 6cf5abbfa8c8a2826d56e38ed1956a0e2f0c85b9 Author: Ronnie Sahlberg Date: Wed Dec 16 08:51:33 2020 +1000 cifs: fix use after free in cifs_smb3_do_mount() Reported-by: Dan Carpenter Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 5b200f578960a9635918a0ed41be3d8dc90186bf Merge: 3db1a3fa98808 15b4473617942 Author: Linus Torvalds Date: Tue Dec 15 14:55:10 2020 -0800 Merge branch 'akpm' (patches from Andrew) Merge more updates from Andrew Morton: "More MM work: a memcg scalability improvememt" * emailed patches from Andrew Morton : mm/lru: revise the comments of lru_lock mm/lru: introduce relock_page_lruvec() mm/lru: replace pgdat lru_lock with lruvec lock mm/swap.c: serialize memcg changes in pagevec_lru_move_fn mm/compaction: do page isolation first in compaction mm/lru: introduce TestClearPageLRU() mm/mlock: remove __munlock_isolate_lru_page() mm/mlock: remove lru_lock on TestClearPageMlocked mm/vmscan: remove lruvec reget in move_pages_to_lru mm/lru: move lock into lru_note_cost mm/swap.c: fold vm event PGROTATED into pagevec_move_tail_fn mm/memcg: add debug checking in lock_page_memcg mm: page_idle_get_page() does not need lru_lock mm/rmap: stop store reordering issue on page->mapping mm/vmscan: remove unnecessary lruvec adding mm/thp: narrow lru locking mm/thp: simplify lru_add_page_tail() mm/thp: use head for head page in lru_add_page_tail() mm/thp: move lru_add_page_tail() to huge_memory.c commit 15b447361794271f4d03c04d82276a841fe06328 Author: Hugh Dickins Date: Tue Dec 15 14:21:31 2020 -0800 mm/lru: revise the comments of lru_lock Since we changed the pgdat->lru_lock to lruvec->lru_lock, it's time to fix the incorrect comments in code. Also fixed some zone->lru_lock comment error from ancient time. etc. I struggled to understand the comment above move_pages_to_lru() (surely it never calls page_referenced()), and eventually realized that most of it had got separated from shrink_active_list(): move that comment back. Link: https://lkml.kernel.org/r/1604566549-62481-20-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Hugh Dickins Signed-off-by: Alex Shi Acked-by: Johannes Weiner Acked-by: Vlastimil Babka Cc: Tejun Heo Cc: Andrey Ryabinin Cc: Jann Horn Cc: Mel Gorman Cc: Matthew Wilcox Cc: Alexander Duyck Cc: Andrea Arcangeli Cc: "Chen, Rong A" Cc: Daniel Jordan Cc: "Huang, Ying" Cc: Joonsoo Kim Cc: Kirill A. Shutemov Cc: Kirill A. Shutemov Cc: Konstantin Khlebnikov Cc: Michal Hocko Cc: Michal Hocko Cc: Mika Penttilä Cc: Minchan Kim Cc: Shakeel Butt Cc: Thomas Gleixner Cc: Vladimir Davydov Cc: Wei Yang Cc: Yang Shi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2a5e4e340b0fe0f8d402196a466887db6a270b9b Author: Alexander Duyck Date: Tue Dec 15 12:34:33 2020 -0800 mm/lru: introduce relock_page_lruvec() Add relock_page_lruvec() to replace repeated same code, no functional change. When testing for relock we can avoid the need for RCU locking if we simply compare the page pgdat and memcg pointers versus those that the lruvec is holding. By doing this we can avoid the extra pointer walks and accesses of the memory cgroup. In addition we can avoid the checks entirely if lruvec is currently NULL. [alex.shi@linux.alibaba.com: use page_memcg()] Link: https://lkml.kernel.org/r/66d8e79d-7ec6-bfbc-1c82-bf32db3ae5b7@linux.alibaba.com Link: https://lkml.kernel.org/r/1604566549-62481-19-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Alexander Duyck Signed-off-by: Alex Shi Acked-by: Hugh Dickins Acked-by: Johannes Weiner Acked-by: Vlastimil Babka Cc: Thomas Gleixner Cc: Andrey Ryabinin Cc: Matthew Wilcox Cc: Mel Gorman Cc: Konstantin Khlebnikov Cc: Tejun Heo Cc: Andrea Arcangeli Cc: "Chen, Rong A" Cc: Daniel Jordan Cc: "Huang, Ying" Cc: Jann Horn Cc: Joonsoo Kim Cc: Kirill A. Shutemov Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Michal Hocko Cc: Mika Penttilä Cc: Minchan Kim Cc: Shakeel Butt Cc: Vladimir Davydov Cc: Wei Yang Cc: Yang Shi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6168d0da2b479ce25a4647de194045de1bdd1f1d Author: Alex Shi Date: Tue Dec 15 12:34:29 2020 -0800 mm/lru: replace pgdat lru_lock with lruvec lock This patch moves per node lru_lock into lruvec, thus bring a lru_lock for each of memcg per node. So on a large machine, each of memcg don't have to suffer from per node pgdat->lru_lock competition. They could go fast with their self lru_lock. After move memcg charge before lru inserting, page isolation could serialize page's memcg, then per memcg lruvec lock is stable and could replace per node lru lock. In isolate_migratepages_block(), compact_unlock_should_abort and lock_page_lruvec_irqsave are open coded to work with compact_control. Also add a debug func in locking which may give some clues if there are sth out of hands. Daniel Jordan's testing show 62% improvement on modified readtwice case on his 2P * 10 core * 2 HT broadwell box. https://lore.kernel.org/lkml/20200915165807.kpp7uhiw7l3loofu@ca-dmjordan1.us.oracle.com/ Hugh Dickins helped on the patch polish, thanks! [alex.shi@linux.alibaba.com: fix comment typo] Link: https://lkml.kernel.org/r/5b085715-292a-4b43-50b3-d73dc90d1de5@linux.alibaba.com [alex.shi@linux.alibaba.com: use page_memcg()] Link: https://lkml.kernel.org/r/5a4c2b72-7ee8-2478-fc0e-85eb83aafec4@linux.alibaba.com Link: https://lkml.kernel.org/r/1604566549-62481-18-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Alex Shi Acked-by: Hugh Dickins Acked-by: Johannes Weiner Cc: Rong Chen Cc: Michal Hocko Cc: Vladimir Davydov Cc: Yang Shi Cc: Matthew Wilcox Cc: Konstantin Khlebnikov Cc: Daniel Jordan Cc: Alexander Duyck Cc: Andrea Arcangeli Cc: Andrey Ryabinin Cc: "Huang, Ying" Cc: Jann Horn Cc: Joonsoo Kim Cc: Kirill A. Shutemov Cc: Kirill A. Shutemov Cc: Mel Gorman Cc: Michal Hocko Cc: Mika Penttilä Cc: Minchan Kim Cc: Shakeel Butt Cc: Tejun Heo Cc: Thomas Gleixner Cc: Vlastimil Babka Cc: Wei Yang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fc574c23558c63799dd99a9bb1d62e33708abaf5 Author: Alex Shi Date: Tue Dec 15 12:34:25 2020 -0800 mm/swap.c: serialize memcg changes in pagevec_lru_move_fn Hugh Dickins' found a memcg change bug on original version: If we want to change the pgdat->lru_lock to memcg's lruvec lock, we have to serialize mem_cgroup_move_account during pagevec_lru_move_fn. The possible bad scenario would like: cpu 0 cpu 1 lruvec = mem_cgroup_page_lruvec() if (!isolate_lru_page()) mem_cgroup_move_account spin_lock_irqsave(&lruvec->lru_lock <== wrong lock. So we need TestClearPageLRU to block isolate_lru_page(), that serializes the memcg change. and then removing the PageLRU check in move_fn callee as the consequence. __pagevec_lru_add_fn() is different from the others, because the pages it deals with are, by definition, not yet on the lru. TestClearPageLRU is not needed and would not work, so __pagevec_lru_add() goes its own way. Link: https://lkml.kernel.org/r/1604566549-62481-17-git-send-email-alex.shi@linux.alibaba.com Reported-by: Hugh Dickins Signed-off-by: Alex Shi Acked-by: Hugh Dickins Acked-by: Johannes Weiner Acked-by: Vlastimil Babka Cc: Alexander Duyck Cc: Andrea Arcangeli Cc: Andrey Ryabinin Cc: "Chen, Rong A" Cc: Daniel Jordan Cc: "Huang, Ying" Cc: Jann Horn Cc: Joonsoo Kim Cc: Kirill A. Shutemov Cc: Kirill A. Shutemov Cc: Konstantin Khlebnikov Cc: Matthew Wilcox (Oracle) Cc: Mel Gorman Cc: Michal Hocko Cc: Michal Hocko Cc: Mika Penttilä Cc: Minchan Kim Cc: Shakeel Butt Cc: Tejun Heo Cc: Thomas Gleixner Cc: Vladimir Davydov Cc: Wei Yang Cc: Yang Shi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9df41314390b81a541ca6e84c8340bad0959e4b5 Author: Alex Shi Date: Tue Dec 15 12:34:20 2020 -0800 mm/compaction: do page isolation first in compaction Currently, compaction would get the lru_lock and then do page isolation which works fine with pgdat->lru_lock, since any page isoltion would compete for the lru_lock. If we want to change to memcg lru_lock, we have to isolate the page before getting lru_lock, thus isoltion would block page's memcg change which relay on page isoltion too. Then we could safely use per memcg lru_lock later. The new page isolation use previous introduced TestClearPageLRU() + pgdat lru locking which will be changed to memcg lru lock later. Hugh Dickins fixed following bugs in this patch's early version: Fix lots of crashes under compaction load: isolate_migratepages_block() must clean up appropriately when rejecting a page, setting PageLRU again if it had been cleared; and a put_page() after get_page_unless_zero() cannot safely be done while holding locked_lruvec - it may turn out to be the final put_page(), which will take an lruvec lock when PageLRU. And move __isolate_lru_page_prepare back after get_page_unless_zero to make trylock_page() safe: trylock_page() is not safe to use at this time: its setting PG_locked can race with the page being freed or allocated ("Bad page"), and can also erase flags being set by one of those "sole owners" of a freshly allocated page who use non-atomic __SetPageFlag(). Link: https://lkml.kernel.org/r/1604566549-62481-16-git-send-email-alex.shi@linux.alibaba.com Suggested-by: Johannes Weiner Signed-off-by: Alex Shi Acked-by: Hugh Dickins Acked-by: Johannes Weiner Acked-by: Vlastimil Babka Cc: Matthew Wilcox Cc: Alexander Duyck Cc: Andrea Arcangeli Cc: Andrey Ryabinin Cc: "Chen, Rong A" Cc: Daniel Jordan Cc: "Huang, Ying" Cc: Jann Horn Cc: Joonsoo Kim Cc: Kirill A. Shutemov Cc: Kirill A. Shutemov Cc: Konstantin Khlebnikov Cc: Mel Gorman Cc: Michal Hocko Cc: Michal Hocko Cc: Mika Penttilä Cc: Minchan Kim Cc: Shakeel Butt Cc: Tejun Heo Cc: Thomas Gleixner Cc: Vladimir Davydov Cc: Wei Yang Cc: Yang Shi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d25b5bd8a8f420b15517c19c4626c0c009f72a63 Author: Alex Shi Date: Tue Dec 15 12:34:16 2020 -0800 mm/lru: introduce TestClearPageLRU() Currently lru_lock still guards both lru list and page's lru bit, that's ok. but if we want to use specific lruvec lock on the page, we need to pin down the page's lruvec/memcg during locking. Just taking lruvec lock first may be undermined by the page's memcg charge/migration. To fix this problem, we will clear the lru bit out of locking and use it as pin down action to block the page isolation in memcg changing. So now a standard steps of page isolation is following: 1, get_page(); #pin the page avoid to be free 2, TestClearPageLRU(); #block other isolation like memcg change 3, spin_lock on lru_lock; #serialize lru list access 4, delete page from lru list; This patch start with the first part: TestClearPageLRU, which combines PageLRU check and ClearPageLRU into a macro func TestClearPageLRU. This function will be used as page isolation precondition to prevent other isolations some where else. Then there are may !PageLRU page on lru list, need to remove BUG() checking accordingly. There 2 rules for lru bit now: 1, the lru bit still indicate if a page on lru list, just in some temporary moment(isolating), the page may have no lru bit when it's on lru list. but the page still must be on lru list when the lru bit set. 2, have to remove lru bit before delete it from lru list. As Andrew Morton mentioned this change would dirty cacheline for a page which isn't on the LRU. But the loss would be acceptable in Rong Chen report: https://lore.kernel.org/lkml/20200304090301.GB5972@shao2-debian/ Link: https://lkml.kernel.org/r/1604566549-62481-15-git-send-email-alex.shi@linux.alibaba.com Suggested-by: Johannes Weiner Signed-off-by: Alex Shi Acked-by: Hugh Dickins Acked-by: Johannes Weiner Acked-by: Vlastimil Babka Cc: Michal Hocko Cc: Vladimir Davydov Cc: Alexander Duyck Cc: Andrea Arcangeli Cc: Andrey Ryabinin Cc: Daniel Jordan Cc: "Huang, Ying" Cc: Jann Horn Cc: Joonsoo Kim Cc: Kirill A. Shutemov Cc: Kirill A. Shutemov Cc: Konstantin Khlebnikov Cc: Matthew Wilcox (Oracle) Cc: Mel Gorman Cc: Michal Hocko Cc: Mika Penttilä Cc: Minchan Kim Cc: Shakeel Butt Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yang Shi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 13805a88a9bd3fb37f33dd8972d904de62796f3d Author: Alex Shi Date: Tue Dec 15 12:34:11 2020 -0800 mm/mlock: remove __munlock_isolate_lru_page() __munlock_isolate_lru_page() only has one caller, remove it to clean up and simplify code. Link: https://lkml.kernel.org/r/1604566549-62481-14-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Alex Shi Acked-by: Hugh Dickins Acked-by: Johannes Weiner Acked-by: Vlastimil Babka Cc: Kirill A. Shutemov Cc: Alexander Duyck Cc: Andrea Arcangeli Cc: Andrey Ryabinin Cc: "Chen, Rong A" Cc: Daniel Jordan Cc: "Huang, Ying" Cc: Jann Horn Cc: Joonsoo Kim Cc: Kirill A. Shutemov Cc: Konstantin Khlebnikov Cc: Matthew Wilcox (Oracle) Cc: Mel Gorman Cc: Michal Hocko Cc: Michal Hocko Cc: Mika Penttilä Cc: Minchan Kim Cc: Shakeel Butt Cc: Tejun Heo Cc: Thomas Gleixner Cc: Vladimir Davydov Cc: Wei Yang Cc: Yang Shi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3db19aa39bac33f2e850fa1ddd67be29b192e51f Author: Alex Shi Date: Tue Dec 15 12:34:07 2020 -0800 mm/mlock: remove lru_lock on TestClearPageMlocked In the func munlock_vma_page, comments mentained lru_lock needed for serialization with split_huge_pages. But the page must be PageLocked as well as pages in split_huge_page series funcs. Thus the PageLocked is enough to serialize both funcs. Further more, Hugh Dickins pointed: before splitting in split_huge_page_to_list, the page was unmap_page() to remove pmd/ptes which protect the page from munlock. Thus, no needs to guard __split_huge_page_tail for mlock clean, just keep the lru_lock there for isolation purpose. LKP found a preempt issue on __mod_zone_page_state which need change to mod_zone_page_state. Thanks! Link: https://lkml.kernel.org/r/1604566549-62481-13-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Alex Shi Acked-by: Hugh Dickins Acked-by: Johannes Weiner Acked-by: Vlastimil Babka Cc: Kirill A. Shutemov Cc: Alexander Duyck Cc: Andrea Arcangeli Cc: Andrey Ryabinin Cc: "Chen, Rong A" Cc: Daniel Jordan Cc: "Huang, Ying" Cc: Jann Horn Cc: Joonsoo Kim Cc: Kirill A. Shutemov Cc: Konstantin Khlebnikov Cc: Matthew Wilcox (Oracle) Cc: Mel Gorman Cc: Michal Hocko Cc: Michal Hocko Cc: Mika Penttilä Cc: Minchan Kim Cc: Shakeel Butt Cc: Tejun Heo Cc: Thomas Gleixner Cc: Vladimir Davydov Cc: Wei Yang Cc: Yang Shi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit afca9157fd426451eb182c9de4bfe4b9382a873a Author: Alex Shi Date: Tue Dec 15 12:34:02 2020 -0800 mm/vmscan: remove lruvec reget in move_pages_to_lru Isolated page shouldn't be recharged by memcg since the memcg migration isn't possible at the time. All pages were isolated from the same lruvec (and isolation inhibits memcg migration). So remove unnecessary regetting. Thanks to Alexander Duyck for pointing this out. Link: https://lkml.kernel.org/r/1604566549-62481-12-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Alex Shi Acked-by: Hugh Dickins Acked-by: Johannes Weiner Cc: Konstantin Khlebnikov Cc: Michal Hocko Cc: Alexander Duyck Cc: Andrea Arcangeli Cc: Andrey Ryabinin Cc: "Chen, Rong A" Cc: Daniel Jordan Cc: "Huang, Ying" Cc: Jann Horn Cc: Joonsoo Kim Cc: Kirill A. Shutemov Cc: Kirill A. Shutemov Cc: Matthew Wilcox (Oracle) Cc: Mel Gorman Cc: Michal Hocko Cc: Mika Penttilä Cc: Minchan Kim Cc: Shakeel Butt Cc: Tejun Heo Cc: Thomas Gleixner Cc: Vladimir Davydov Cc: Vlastimil Babka Cc: Wei Yang Cc: Yang Shi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 75cc3c9161cd95f43ebf6c6a938d4d98ab195bbd Author: Alex Shi Date: Tue Dec 15 14:20:50 2020 -0800 mm/lru: move lock into lru_note_cost We have to move lru_lock into lru_note_cost, since it cycle up on memcg tree, for future per lruvec lru_lock replace. It's a bit ugly and may cost a bit more locking, but benefit from multiple memcg locking could cover the lost. Link: https://lkml.kernel.org/r/1604566549-62481-11-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Alex Shi Acked-by: Hugh Dickins Acked-by: Johannes Weiner Cc: Johannes Weiner Cc: Alexander Duyck Cc: Andrea Arcangeli Cc: Andrey Ryabinin Cc: "Chen, Rong A" Cc: Daniel Jordan Cc: "Huang, Ying" Cc: Jann Horn Cc: Joonsoo Kim Cc: Kirill A. Shutemov Cc: Kirill A. Shutemov Cc: Konstantin Khlebnikov Cc: Matthew Wilcox (Oracle) Cc: Mel Gorman Cc: Michal Hocko Cc: Michal Hocko Cc: Mika Penttilä Cc: Minchan Kim Cc: Shakeel Butt Cc: Tejun Heo Cc: Thomas Gleixner Cc: Vladimir Davydov Cc: Vlastimil Babka Cc: Wei Yang Cc: Yang Shi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c7c7b80c39a18d99a0a34534ed8b82e020da6131 Author: Alex Shi Date: Tue Dec 15 12:33:56 2020 -0800 mm/swap.c: fold vm event PGROTATED into pagevec_move_tail_fn Fold the PGROTATED event collection into pagevec_move_tail_fn call back func like other funcs does in pagevec_lru_move_fn. Thus we could save func call pagevec_move_tail(). Now all usage of pagevec_lru_move_fn are same and no needs of its 3rd parameter. It's just simply the calling. No functional change. [lkp@intel.com: found a build issue in the original patch, thanks] Link: https://lkml.kernel.org/r/1604566549-62481-10-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Alex Shi Acked-by: Hugh Dickins Acked-by: Johannes Weiner Cc: Alexander Duyck Cc: Andrea Arcangeli Cc: Andrey Ryabinin Cc: "Chen, Rong A" Cc: Daniel Jordan Cc: "Huang, Ying" Cc: Jann Horn Cc: Joonsoo Kim Cc: Kirill A. Shutemov Cc: Kirill A. Shutemov Cc: Konstantin Khlebnikov Cc: Matthew Wilcox (Oracle) Cc: Mel Gorman Cc: Michal Hocko Cc: Michal Hocko Cc: Mika Penttilä Cc: Minchan Kim Cc: Shakeel Butt Cc: Tejun Heo Cc: Thomas Gleixner Cc: Vladimir Davydov Cc: Vlastimil Babka Cc: Wei Yang Cc: Yang Shi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 20ad50d67840264024cec9abc9180750295993e5 Author: Alex Shi Date: Tue Dec 15 12:33:51 2020 -0800 mm/memcg: add debug checking in lock_page_memcg Add a debug checking in lock_page_memcg, then we could get alarm if anything wrong here. Link: https://lkml.kernel.org/r/1604566549-62481-9-git-send-email-alex.shi@linux.alibaba.com Suggested-by: Johannes Weiner Signed-off-by: Alex Shi Acked-by: Hugh Dickins Acked-by: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Cc: Alexander Duyck Cc: Andrea Arcangeli Cc: Andrey Ryabinin Cc: "Chen, Rong A" Cc: Daniel Jordan Cc: "Huang, Ying" Cc: Jann Horn Cc: Joonsoo Kim Cc: Kirill A. Shutemov Cc: Kirill A. Shutemov Cc: Konstantin Khlebnikov Cc: Matthew Wilcox (Oracle) Cc: Mel Gorman Cc: Michal Hocko Cc: Mika Penttilä Cc: Minchan Kim Cc: Shakeel Butt Cc: Tejun Heo Cc: Thomas Gleixner Cc: Vlastimil Babka Cc: Wei Yang Cc: Yang Shi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 880fc6ba624c8973feaea56cdbfaf8fd68806c35 Author: Hugh Dickins Date: Tue Dec 15 12:33:47 2020 -0800 mm: page_idle_get_page() does not need lru_lock It is necessary for page_idle_get_page() to recheck PageLRU() after get_page_unless_zero(), but holding lru_lock around that serves no useful purpose, and adds to lru_lock contention: delete it. See https://lore.kernel.org/lkml/20150504031722.GA2768@blaptop for the discussion that led to lru_lock there; but __page_set_anon_rmap() now uses WRITE_ONCE(), and I see no other risk in page_idle_clear_pte_refs() using rmap_walk() (beyond the risk of racing PageAnon->PageKsm, mostly but not entirely prevented by page_count() check in ksm.c's write_protect_page(): that risk being shared with page_referenced() and not helped by lru_lock). Link: https://lkml.kernel.org/r/1604566549-62481-8-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Hugh Dickins Signed-off-by: Alex Shi Acked-by: Johannes Weiner Acked-by: "Huang, Ying" Acked-by: Vlastimil Babka Cc: Vladimir Davydov Cc: Minchan Kim Cc: Alex Shi Cc: Alexander Duyck Cc: Andrea Arcangeli Cc: Andrey Ryabinin Cc: "Chen, Rong A" Cc: Daniel Jordan Cc: Jann Horn Cc: Joonsoo Kim Cc: Kirill A. Shutemov Cc: Kirill A. Shutemov Cc: Konstantin Khlebnikov Cc: Matthew Wilcox (Oracle) Cc: Mel Gorman Cc: Michal Hocko Cc: Michal Hocko Cc: Mika Penttilä Cc: Shakeel Butt Cc: Tejun Heo Cc: Thomas Gleixner Cc: Wei Yang Cc: Yang Shi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 16f5e707d6f6f7644ff07e583b8f18c3dcc5499f Author: Alex Shi Date: Tue Dec 15 12:33:42 2020 -0800 mm/rmap: stop store reordering issue on page->mapping Hugh Dickins and Minchan Kim observed a long time issue which discussed here, but actully the mentioned fix in https://lore.kernel.org/lkml/20150504031722.GA2768@blaptop/ was missed. The store reordering may cause problem in the scenario: CPU 0 CPU1 do_anonymous_page page_add_new_anon_rmap() page->mapping = anon_vma + PAGE_MAPPING_ANON lru_cache_add_inactive_or_unevictable() spin_lock(lruvec->lock) SetPageLRU() spin_unlock(lruvec->lock) /* idletacking judged it as LRU * page so pass the page in * page_idle_clear_pte_refs */ page_idle_clear_pte_refs rmap_walk if PageAnon(page) Johannes give detailed examples how the store reordering could cause trouble: "The concern is the SetPageLRU may get reorder before 'page->mapping' setting, That would make CPU 1 will observe at page->mapping after observing PageLRU set on the page. 1. anon_vma + PAGE_MAPPING_ANON That's the in-order scenario and is fine. 2. NULL That's possible if the page->mapping store gets reordered to occur after SetPageLRU. That's fine too because we check for it. 3. anon_vma without the PAGE_MAPPING_ANON bit That would be a problem and could lead to all kinds of undesirable behavior including crashes and data corruption. Is it possible? AFAICT the compiler is allowed to tear the store to page->mapping and I don't see anything that would prevent it. That said, I also don't see how the reader testing PageLRU under the lru_lock would prevent that in the first place. AFAICT we need that WRITE_ONCE() around the page->mapping assignment." [alex.shi@linux.alibaba.com: updated for comments change from Johannes] Link: https://lkml.kernel.org/r/e66ef2e5-c74c-6498-e8b3-56c37b9d2d15@linux.alibaba.com Link: https://lkml.kernel.org/r/1604566549-62481-7-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Alex Shi Acked-by: Johannes Weiner Acked-by: Hugh Dickins Cc: Matthew Wilcox Cc: Minchan Kim Cc: Vladimir Davydov Cc: Alexander Duyck Cc: Andrea Arcangeli Cc: Andrey Ryabinin Cc: "Chen, Rong A" Cc: Daniel Jordan Cc: "Huang, Ying" Cc: Jann Horn Cc: Joonsoo Kim Cc: Kirill A. Shutemov Cc: Kirill A. Shutemov Cc: Konstantin Khlebnikov Cc: Mel Gorman Cc: Michal Hocko Cc: Michal Hocko Cc: Mika Penttilä Cc: Shakeel Butt Cc: Tejun Heo Cc: Thomas Gleixner Cc: Vlastimil Babka Cc: Wei Yang Cc: Yang Shi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3d06afab5268218255581c0852daab963baa522e Author: Alex Shi Date: Tue Dec 15 12:33:37 2020 -0800 mm/vmscan: remove unnecessary lruvec adding We don't have to add a freeable page into lru and then remove from it. This change saves a couple of actions and makes the moving more clear. The SetPageLRU needs to be kept before put_page_testzero for list integrity, otherwise: #0 move_pages_to_lru #1 release_pages if !put_page_testzero if (put_page_testzero()) !PageLRU //skip lru_lock SetPageLRU() list_add(&page->lru,) list_add(&page->lru,) [akpm@linux-foundation.org: coding style fixes] Link: https://lkml.kernel.org/r/1604566549-62481-6-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Alex Shi Acked-by: Hugh Dickins Acked-by: Johannes Weiner Acked-by: Vlastimil Babka Cc: Tejun Heo Cc: Matthew Wilcox Cc: Alexander Duyck Cc: Andrea Arcangeli Cc: Andrey Ryabinin Cc: "Chen, Rong A" Cc: Daniel Jordan Cc: "Huang, Ying" Cc: Jann Horn Cc: Joonsoo Kim Cc: Kirill A. Shutemov Cc: Kirill A. Shutemov Cc: Konstantin Khlebnikov Cc: Mel Gorman Cc: Michal Hocko Cc: Michal Hocko Cc: Mika Penttilä Cc: Minchan Kim Cc: Shakeel Butt Cc: Thomas Gleixner Cc: Vladimir Davydov Cc: Wei Yang Cc: Yang Shi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b6769834aac1d467fa1c71277d15688efcbb4d76 Author: Alex Shi Date: Tue Dec 15 12:33:33 2020 -0800 mm/thp: narrow lru locking lru_lock and page cache xa_lock have no obvious reason to be taken one way round or the other: until now, lru_lock has been taken before page cache xa_lock, when splitting a THP; but nothing else takes them together. Reverse that ordering: let's narrow the lru locking - but leave local_irq_disable to block interrupts throughout, like before. Hugh Dickins point: split_huge_page_to_list() was already silly, to be using the _irqsave variant: it's just been taking sleeping locks, so would already be broken if entered with interrupts enabled. So we can save passing flags argument down to __split_huge_page(). Why change the lock ordering here? That was hard to decide. One reason: when this series reaches per-memcg lru locking, it relies on the THP's memcg to be stable when taking the lru_lock: that is now done after the THP's refcount has been frozen, which ensures page memcg cannot change. Another reason: previously, lock_page_memcg()'s move_lock was presumed to nest inside lru_lock; but now lru_lock must nest inside (page cache lock inside) move_lock, so it becomes possible to use lock_page_memcg() to stabilize page memcg before taking its lru_lock. That is not the mechanism used in this series, but it is an option we want to keep open. [hughd@google.com: rewrite commit log] Link: https://lkml.kernel.org/r/1604566549-62481-5-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Alex Shi Reviewed-by: Kirill A. Shutemov Acked-by: Hugh Dickins Cc: Kirill A. Shutemov Cc: Andrea Arcangeli Cc: Johannes Weiner Cc: Matthew Wilcox Cc: Alexander Duyck Cc: Andrey Ryabinin Cc: "Chen, Rong A" Cc: Daniel Jordan Cc: "Huang, Ying" Cc: Jann Horn Cc: Joonsoo Kim Cc: Konstantin Khlebnikov Cc: Mel Gorman Cc: Michal Hocko Cc: Michal Hocko Cc: Mika Penttilä Cc: Minchan Kim Cc: Shakeel Butt Cc: Tejun Heo Cc: Thomas Gleixner Cc: Vladimir Davydov Cc: Vlastimil Babka Cc: Wei Yang Cc: Yang Shi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6dbb57412c62a8537663dc786e27faa0e084ddce Author: Alex Shi Date: Tue Dec 15 12:33:29 2020 -0800 mm/thp: simplify lru_add_page_tail() Simplify lru_add_page_tail(), there are actually only two cases possible: split_huge_page_to_list(), with list supplied and head isolated from lru by its caller; or split_huge_page(), with NULL list and head on lru - because when head is racily isolated from lru, the isolator's reference will stop the split from getting any further than its page_ref_freeze(). So decide between the two cases by "list", but add VM_WARN_ON()s to verify that they match our lru expectations. [Hugh Dickins: rewrite commit log] Link: https://lkml.kernel.org/r/1604566549-62481-4-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Alex Shi Reviewed-by: Kirill A. Shutemov Acked-by: Hugh Dickins Cc: Johannes Weiner Cc: Matthew Wilcox Cc: Mika Penttilä Cc: Alexander Duyck Cc: Andrea Arcangeli Cc: Andrey Ryabinin Cc: "Chen, Rong A" Cc: Daniel Jordan Cc: "Huang, Ying" Cc: Jann Horn Cc: Joonsoo Kim Cc: Kirill A. Shutemov Cc: Konstantin Khlebnikov Cc: Mel Gorman Cc: Michal Hocko Cc: Michal Hocko Cc: Minchan Kim Cc: Shakeel Butt Cc: Tejun Heo Cc: Thomas Gleixner Cc: Vladimir Davydov Cc: Vlastimil Babka Cc: Wei Yang Cc: Yang Shi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 94866635372d37ab6b849942900eb98674a94f04 Author: Alex Shi Date: Tue Dec 15 12:33:24 2020 -0800 mm/thp: use head for head page in lru_add_page_tail() Since the first parameter is only used by head page, it's better to make it explicit. Link: https://lkml.kernel.org/r/1604566549-62481-3-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Alex Shi Reviewed-by: Kirill A. Shutemov Reviewed-by: Matthew Wilcox (Oracle) Acked-by: Hugh Dickins Acked-by: Johannes Weiner Cc: Alexander Duyck Cc: Andrea Arcangeli Cc: Andrey Ryabinin Cc: "Chen, Rong A" Cc: Daniel Jordan Cc: "Huang, Ying" Cc: Jann Horn Cc: Joonsoo Kim Cc: Kirill A. Shutemov Cc: Konstantin Khlebnikov Cc: Mel Gorman Cc: Michal Hocko Cc: Michal Hocko Cc: Mika Penttilä Cc: Minchan Kim Cc: Shakeel Butt Cc: Tejun Heo Cc: Thomas Gleixner Cc: Vladimir Davydov Cc: Vlastimil Babka Cc: Wei Yang Cc: Yang Shi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 88dcb9a3fb48c67ec345f1cdbc2a26119d3cb57d Author: Alex Shi Date: Tue Dec 15 12:33:20 2020 -0800 mm/thp: move lru_add_page_tail() to huge_memory.c Patch series "per memcg lru lock", v21. This patchset includes 3 parts: 1) some code cleanup and minimum optimization as preparation 2) use TestCleanPageLRU as page isolation's precondition 3) replace per node lru_lock with per memcg per node lru_lock Current lru_lock is one for each of node, pgdat->lru_lock, that guard for lru lists, but now we had moved the lru lists into memcg for long time. Still using per node lru_lock is clearly unscalable, pages on each of memcgs have to compete each others for a whole lru_lock. This patchset try to use per lruvec/memcg lru_lock to repleace per node lru lock to guard lru lists, make it scalable for memcgs and get performance gain. Currently lru_lock still guards both lru list and page's lru bit, that's ok. but if we want to use specific lruvec lock on the page, we need to pin down the page's lruvec/memcg during locking. Just taking lruvec lock first may be undermined by the page's memcg charge/migration. To fix this problem, we could take out the page's lru bit clear and use it as pin down action to block the memcg changes. That's the reason for new atomic func TestClearPageLRU. So now isolating a page need both actions: TestClearPageLRU and hold the lru_lock. The typical usage of this is isolate_migratepages_block() in compaction.c we have to take lru bit before lru lock, that serialized the page isolation in memcg page charge/migration which will change page's lruvec and new lru_lock in it. The above solution suggested by Johannes Weiner, and based on his new memcg charge path, then have this patchset. (Hugh Dickins tested and contributed much code from compaction fix to general code polish, thanks a lot!). Daniel Jordan's testing show 62% improvement on modified readtwice case on his 2P * 10 core * 2 HT broadwell box on v18, which has no much different with this v20. https://lore.kernel.org/lkml/20200915165807.kpp7uhiw7l3loofu@ca-dmjordan1.us.oracle.com/ Thanks to Hugh Dickins and Konstantin Khlebnikov, they both brought this idea 8 years ago, and others who gave comments as well: Daniel Jordan, Mel Gorman, Shakeel Butt, Matthew Wilcox, Alexander Duyck etc. Thanks for Testing support from Intel 0day and Rong Chen, Fengguang Wu, and Yun Wang. Hugh Dickins also shared his kbuild-swap case. This patch (of 19): lru_add_page_tail() is only used in huge_memory.c, defining it in other file with a CONFIG_TRANSPARENT_HUGEPAGE macro restrict just looks weird. Let's move it THP. And make it static as Hugh Dickins suggested. Link: https://lkml.kernel.org/r/1604566549-62481-1-git-send-email-alex.shi@linux.alibaba.com Link: https://lkml.kernel.org/r/1604566549-62481-2-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Alex Shi Reviewed-by: Kirill A. Shutemov Acked-by: Hugh Dickins Acked-by: Johannes Weiner Cc: Matthew Wilcox Cc: Mel Gorman Cc: Tejun Heo Cc: Konstantin Khlebnikov Cc: Daniel Jordan Cc: Shakeel Butt Cc: Joonsoo Kim Cc: Wei Yang Cc: Alexander Duyck Cc: "Chen, Rong A" Cc: Michal Hocko Cc: Vladimir Davydov Cc: Andrea Arcangeli Cc: Andrey Ryabinin Cc: "Huang, Ying" Cc: Jann Horn Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Mika Penttilä Cc: Minchan Kim Cc: Thomas Gleixner Cc: Vlastimil Babka Cc: Yang Shi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3db1a3fa98808aa90f95ec3e0fa2fc7abf28f5c9 Merge: 2911ed9f47b47 4996b46107670 Author: Linus Torvalds Date: Tue Dec 15 14:18:40 2020 -0800 Merge tag 'staging-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging / IIO driver updates from Greg KH: "Here is the big staging and IIO driver pull request for 5.11-rc1 Lots of different things in here: - loads of driver updates - so many coding style cleanups - new IIO drivers - Android ION code is finally removed from the tree - wimax drivers are moved to staging on their way out of the kernel Nothing really exciting, just the constant grind of kernel development :) All have been in linux-next for a while with no reported issues" * tag 'staging-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (341 commits) staging: olpc_dcon: Do not call platform_device_unregister() in dcon_probe() staging: most: Fix spelling mistake "tranceiver" -> "transceiver" staging: qlge: remove duplicate word in comment staging: comedi: mf6x4: Fix AI end-of-conversion detection staging: greybus: Add TODO item about modernizing the pwm code pinctrl: ralink: add a pinctrl driver for the rt2880 family dt-bindings: pinctrl: rt2880: add binding document staging: rtl8723bs: remove ELEMENT_ID enum staging: rtl8723bs: remove unused macros staging: rtl8723bs: replace EID_EXTCapability staging: rtl8723bs: replace EID_BSSIntolerantChlReport staging: rtl8723bs: replace EID_BSSCoexistence staging: rtl8723bs: replace _MME_IE_ staging: rtl8723bs: replace _WAPI_IE_ staging: rtl8723bs: replace _EXT_SUPPORTEDRATES_IE_ staging: rtl8723bs: replace _ERPINFO_IE_ staging: rtl8723bs: replace _CHLGETXT_IE_ staging: rtl8723bs: replace _COUNTRY_IE_ staging: rtl8723bs: replace _IBSS_PARA_IE_ staging: rtl8723bs: replace _TIM_IE_ ... commit 2911ed9f47b47cb5ab87d03314b3b9fe008e607f Merge: 7240153a9bdb7 93f998879cd95 Author: Linus Torvalds Date: Tue Dec 15 14:10:09 2020 -0800 Merge tag 'char-misc-5.11-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 driver update for 5.11-rc1. Continuing the tradition of previous -rc1 pulls, there seems to be more and more tiny driver subsystems flowing through this tree. Lots of different things, all of which have been in linux-next for a while with no reported issues: - extcon driver updates - habannalab driver updates - mei driver updates - uio driver updates - binder fixes and features added - soundwire driver updates - mhi bus driver updates - phy driver updates - coresight driver updates - fpga driver updates - speakup driver updates - slimbus driver updates - various small char and misc driver updates" * tag 'char-misc-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (305 commits) extcon: max77693: Fix modalias string extcon: fsa9480: Support TI TSU6111 variant extcon: fsa9480: Rewrite bindings in YAML and extend dt-bindings: extcon: add binding for TUSB320 extcon: Add driver for TI TUSB320 slimbus: qcom: fix potential NULL dereference in qcom_slim_prg_slew() siox: Make remove callback return void siox: Use bus_type functions for probe, remove and shutdown spmi: Add driver shutdown support spmi: fix some coding style issues at the spmi core spmi: get rid of a warning when built with W=1 uio: uio_hv_generic: use devm_kzalloc() for private data alloc uio: uio_fsl_elbc_gpcm: use device-managed allocators uio: uio_aec: use devm_kzalloc() for uio_info object uio: uio_cif: use devm_kzalloc() for uio_info object uio: uio_netx: use devm_kzalloc() for or uio_info object uio: uio_mf624: use devm_kzalloc() for uio_info object uio: uio_sercos3: use device-managed functions for simple allocs uio: uio_dmem_genirq: finalize conversion of probe to devm_ handlers uio: uio_dmem_genirq: convert simple allocations to device-managed ... commit 7240153a9bdb77217b99b76fd73105bce12770be Merge: 157f809894f3c 46e85af0cc53f Author: Linus Torvalds Date: Tue Dec 15 14:02:26 2020 -0800 Merge tag 'driver-core-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core updates from Greg KH: "Here is the big driver core updates for 5.11-rc1 This time there was a lot of different work happening here for some reason: - redo of the fwnode link logic, speeding it up greatly - auxiliary bus added (this was a tag that will be pulled in from other trees/maintainers this merge window as well, as driver subsystems started to rely on it) - platform driver core cleanups on the way to fixing some long-time api updates in future releases - minor fixes and tweaks. All have been in linux-next with no (finally) reported issues. Testing there did helped in shaking issues out a lot :)" * tag 'driver-core-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (39 commits) driver core: platform: don't oops in platform_shutdown() on unbound devices ACPI: Use fwnode_init() to set up fwnode misc: pvpanic: Replace OF headers by mod_devicetable.h misc: pvpanic: Combine ACPI and platform drivers usb: host: sl811: Switch to use platform_get_mem_or_io() vfio: platform: Switch to use platform_get_mem_or_io() driver core: platform: Introduce platform_get_mem_or_io() dyndbg: fix use before null check soc: fix comment for freeing soc_dev_attr driver core: platform: use bus_type functions driver core: platform: change logic implementing platform_driver_probe driver core: platform: reorder functions driver core: make driver_probe_device() static driver core: Fix a couple of typos driver core: Reorder devices on successful probe driver core: Delete pointless parameter in fwnode_operations.add_links driver core: Refactor fw_devlink feature efi: Update implementation of add_links() to create fwnode links of: property: Update implementation of add_links() to create fwnode links driver core: Use device's fwnode to check if it is waiting for suppliers ... commit 157f809894f3cf8e62b4011915a00398603215c9 Merge: 0cee54c890a40 c3ae3dc896fab Author: Linus Torvalds Date: Tue Dec 15 13:57:14 2020 -0800 Merge tag 'tty-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty / serial updates from Greg KH: "Here is the "large" set of tty and serial patches for 5.11-rc1. Nothing major at all, some cleanups and some driver removals, always a nice sign: - build warning cleanups - vt locking and logic unwinding and cleanups - tiny serial driver fixes and updates - removal of the synclink serial driver as it's no longer needed - removal of dead termiox code All of this has been in linux-next for a while with no reported issues" * tag 'tty-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (89 commits) serial: 8250_pci: Drop bogus __refdata annotation tty: serial: meson: enable console as module serial: 8250_omap: Avoid FIFO corruption caused by MDR1 access serial: imx: Move imx_uart_probe_dt() content into probe() serial: imx: Remove unneeded of_device_get_match_data() NULL check tty: Fix whitespace inconsistencies in vt_io_ioctl serial_core: Check for port state when tty is in error state dt-bindings: serial: Update DT binding docs to support SiFive FU740 SoC tty: use const parameters in port-flag accessors tty: use assign_bit() in port-flag accessors earlycon: drop semicolon from earlycon macro tty: Remove dead termiox code tty/serial/imx: Enable TXEN bit in imx_poll_init(). tty : serial: jsm: Fixed file by adding spacing tty: serial: uartlite: Support probe deferral earlycon: simplify earlycon-table implementation tty: serial: bcm63xx: lower driver dependencies serial: mxs-auart: Remove unneeded platform_device_id serial: 8250-mtk: Fix reference leak in mtk8250_probe serial: imx: Remove unused .id_table support ... commit 0cee54c890a40051928991072e5d1cd279611dfd Merge: c367caf1a38b6 a256e24021bf7 Author: Linus Torvalds Date: Tue Dec 15 13:54:56 2020 -0800 Merge tag 'usb-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB / Thunderbolt updates from Greg KH: "Here is the big USB and thunderbolt pull request for 5.11-rc1. Nothing major in here, just the grind of constant development to support new hardware and fix old issues: - thunderbolt updates for new USB4 hardware - cdns3 major driver updates - lots of typec updates and additions as more hardware is available - usb serial driver updates and fixes - other tiny USB driver updates All have been in linux-next with no reported issues" * tag 'usb-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (172 commits) usb: phy: convert comma to semicolon usb: ucsi: convert comma to semicolon usb: typec: tcpm: convert comma to semicolon usb: typec: tcpm: Update vbus_vsafe0v on init usb: typec: tcpci: Enable bleed discharge when auto discharge is enabled usb: typec: Add class for plug alt mode device USB: typec: tcpci: Add Bleed discharge to POWER_CONTROL definition USB: typec: tcpm: Add a 30ms room for tPSSourceOn in PR_SWAP USB: typec: tcpm: Fix PR_SWAP error handling USB: typec: tcpm: Hard Reset after not receiving a Request USB: gadget: f_fs: remove likely/unlikely usb: gadget: f_fs: Re-use SS descriptors for SuperSpeedPlus USB: gadget: f_midi: setup SuperSpeed Plus descriptors USB: gadget: f_acm: add support for SuperSpeed Plus USB: gadget: f_rndis: fix bitrate for SuperSpeed and above usb: typec: intel_pmc_mux: Configure cable generation value for USB4 MAINTAINERS: Add myself as a reviewer for CADENCE USB3 DRD IP DRIVER usb: chipidea: ci_hdrc_imx: Use of_device_get_match_data() usb: chipidea: usbmisc_imx: Use of_device_get_match_data() usb: cdns3: fix NULL pointer dereference on no platform data ... commit c367caf1a38b6f0a1aababafd88b00fefa625f9e Merge: d635a69dd4981 598100be3053f Author: Linus Torvalds Date: Tue Dec 15 13:43:47 2020 -0800 Merge tag 'sound-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "Lots of changes (slightly more code increase than usual) at this time, while most of code changes are ASoC driver-specific. Here are some highlights: Core: - The new auxiliary bus implementation for Intel DSP, which will be used by other drivers as well - Lots of ASoC core cleanups and refactoring - UBSAN and KCSAN fixes in rawmidi, sequencer and a few others - Compress-offload API enhancement for the pause during draining HD- and USB-audio: - Enhancements of the USB-audio implicit feedback support, including better full-duplex operations - Continued CA0132 improvements and fixes - A few new quirk entries, HDMI audio fixes ASoC: - Support for boot time selection of Intel DSP firmware, which should help distros/users testing new stuff more easily; the kconfig was moved to boot time option, too - Some basic DPCM support in audio graph card - Removal of old pre-DT Freescale drivers - Support for Allwinner H6 I2S, Analog Devices ADAU1372, Intel Alderlake-S, GMediatek MT8192, NXP i.MX HDMI and XCVR, Realtek RT715, Qualcomm SM8250 and simple GPIO based muxes" * tag 'sound-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (445 commits) ALSA: pcm: oss: Fix potential out-of-bounds shift ALSA: usb-audio: Fix potential out-of-bounds shift ALSA: hda/ca0132 - Add ZxR surround DAC setup. ALSA: hda/ca0132 - Add 8051 PLL write helper functions. ALSA: hda/hdmi: packet buffer index must be set before reading value ASoC: SOF: imx: update kernel-doc description ASoC: mediatek: mt8183: delete some unreachable code ASoC: mediatek: mt8183: add PM ops to machine drivers ASoC: topology: Fix wrong size check ASoC: topology: Add missing size check ASoC: SOF: Intel: hda: fix the condition passed to sof_dev_dbg_or_err ASoC: SOF: modify the SOF_DBG flags ASoC: SOF: Intel: hda: remove duplicated status dump ASoC: rt1015p: delay 300ms after SDB pulling high for calibration ASoC: rt1015p: move SDB control from trigger to DAPM ASoC: wm_adsp: remove "ctl" from list on error in wm_adsp_create_control() ALSA: usb-audio: Fix control 'access overflow' errors from chmap ALSA: hda/hdmi: always print pin NIDs as hexadecimal ALSA: hda/realtek - Add supported for more Lenovo ALC285 Headset Button ALSA: hda/ca0132 - Remove now unnecessary DSP setup functions. ... commit d635a69dd4981cc51f90293f5f64268620ed1565 Merge: ac73e3dc8acd0 efd5a15845376 Author: Linus Torvalds Date: Tue Dec 15 13:22:29 2020 -0800 Merge tag 'net-next-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next Pull networking updates from Jakub Kicinski: "Core: - support "prefer busy polling" NAPI operation mode, where we defer softirq for some time expecting applications to periodically busy poll - AF_XDP: improve efficiency by more batching and hindering the adjacency cache prefetcher - af_packet: make packet_fanout.arr size configurable up to 64K - tcp: optimize TCP zero copy receive in presence of partial or unaligned reads making zero copy a performance win for much smaller messages - XDP: add bulk APIs for returning / freeing frames - sched: support fragmenting IP packets as they come out of conntrack - net: allow virtual netdevs to forward UDP L4 and fraglist GSO skbs BPF: - BPF switch from crude rlimit-based to memcg-based memory accounting - BPF type format information for kernel modules and related tracing enhancements - BPF implement task local storage for BPF LSM - allow the FENTRY/FEXIT/RAW_TP tracing programs to use bpf_sk_storage Protocols: - mptcp: improve multiple xmit streams support, memory accounting and many smaller improvements - TLS: support CHACHA20-POLY1305 cipher - seg6: add support for SRv6 End.DT4/DT6 behavior - sctp: Implement RFC 6951: UDP Encapsulation of SCTP - ppp_generic: add ability to bridge channels directly - bridge: Connectivity Fault Management (CFM) support as is defined in IEEE 802.1Q section 12.14. Drivers: - mlx5: make use of the new auxiliary bus to organize the driver internals - mlx5: more accurate port TX timestamping support - mlxsw: - improve the efficiency of offloaded next hop updates by using the new nexthop object API - support blackhole nexthops - support IEEE 802.1ad (Q-in-Q) bridging - rtw88: major bluetooth co-existance improvements - iwlwifi: support new 6 GHz frequency band - ath11k: Fast Initial Link Setup (FILS) - mt7915: dual band concurrent (DBDC) support - net: ipa: add basic support for IPA v4.5 Refactor: - a few pieces of in_interrupt() cleanup work from Sebastian Andrzej Siewior - phy: add support for shared interrupts; get rid of multiple driver APIs and have the drivers write a full IRQ handler, slight growth of driver code should be compensated by the simpler API which also allows shared IRQs - add common code for handling netdev per-cpu counters - move TX packet re-allocation from Ethernet switch tag drivers to a central place - improve efficiency and rename nla_strlcpy - number of W=1 warning cleanups as we now catch those in a patchwork build bot Old code removal: - wan: delete the DLCI / SDLA drivers - wimax: move to staging - wifi: remove old WDS wifi bridging support" * tag 'net-next-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (1922 commits) net: hns3: fix expression that is currently always true net: fix proc_fs init handling in af_packet and tls nfc: pn533: convert comma to semicolon af_vsock: Assign the vsock transport considering the vsock address flags af_vsock: Set VMADDR_FLAG_TO_HOST flag on the receive path vsock_addr: Check for supported flag values vm_sockets: Add VMADDR_FLAG_TO_HOST vsock flag vm_sockets: Add flags field in the vsock address data structure net: Disable NETIF_F_HW_TLS_TX when HW_CSUM is disabled tcp: Add logic to check for SYN w/ data in tcp_simple_retransmit net: mscc: ocelot: install MAC addresses in .ndo_set_rx_mode from process context nfc: s3fwrn5: Release the nfc firmware net: vxget: clean up sparse warnings mlxsw: spectrum_router: Use eXtended mezzanine to offload IPv4 router mlxsw: spectrum: Set KVH XLT cache mode for Spectrum2/3 mlxsw: spectrum_router_xm: Introduce basic XM cache flushing mlxsw: reg: Add Router LPM Cache Enable Register mlxsw: reg: Add Router LPM Cache ML Delete Register mlxsw: spectrum_router_xm: Implement L-value tracking for M-index mlxsw: reg: Add XM Router M Table Register ... commit 0c2b5f7ce50c24099e8ed7d35936e89fe9ca26ff Author: Steve French Date: Tue Dec 15 13:28:50 2020 -0600 cifs: fix rsize/wsize to be negotiated values Also make sure these are displayed in /proc/mounts Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg commit 09a8361e3b681ef6b56cc56f7b2905b4455d6774 Author: Samuel Cabrero Date: Tue Dec 15 17:46:56 2020 +0100 cifs: Fix some error pointers handling detected by static checker * extract_hostname() and extract_sharename() never return NULL, so use IS_ERR() instead of IS_ERR_OR_NULL() in cifs_find_swn_reg(). If any of these functions return an error, then return an error pointer instead of NULL. * Change cifs_find_swn_reg() function to always return a valid pointer or an error pointer, instead of returning NULL if the registration is not found. * Finally update cifs_find_swn_reg() callers to check for -EEXIST instead of NULL. * In cifs_get_swn_reg() the swnreg idr mutex was not unlocked in the error path of cifs_find_swn_reg() call. Reported-by: Dan Carpenter Signed-off-by: Samuel Cabrero Reviewed-by: Dan Carpenter Signed-off-by: Steve French commit dd538034f84fa4ea670420aac19adcceef45d057 Author: Steve French Date: Mon Dec 14 20:15:12 2020 -0600 smb3: remind users that witness protocol is experimental warn_once when using the witness protocol that it is experimental Signed-off-by: Steve French Reviewed-by: Samuel Cabrero Reviewed-by: Shyam Prasad N commit 653a5efb849aea1706648257c3c23ece82997f44 Author: Steve French Date: Mon Dec 14 20:08:10 2020 -0600 cifs: update super_operations to show_devname This is needed so that we display the correct //server/share vs \\server\share in /proc/mounts for the device name (in the new mount API). Signed-off-by: Steve French Reviewed-by: Shyam Prasad N commit 255b2d524884e4ec60333131aa0ca0ef19826dc2 Merge: f7ce6838763f4 48a0962d2e2d2 Author: Bjorn Helgaas Date: Tue Dec 15 15:11:14 2020 -0600 Merge branch 'remotes/lorenzo/pci/misc' - Add PCI endpoint subsystem references to MAINTAINERS (Gustavo Pimentel) * remotes/lorenzo/pci/misc: MAINTAINERS: Add missing documentation references to PCI Endpoint Subsystem commit f7ce6838763f4be68a1432789674b04e87470cf9 Merge: b9efb854e9fd3 f6b7bb847ca82 Author: Bjorn Helgaas Date: Tue Dec 15 15:11:13 2020 -0600 Merge branch 'remotes/lorenzo/pci/vmd' - Offset client VMD MSI-X vectors (Jon Derrick) * remotes/lorenzo/pci/vmd: PCI: vmd: Offset Client VMD MSI-X vectors commit b9efb854e9fd3eff0671484e328bd24e2118d11c Merge: 28e77bcf44362 64fc0a030987e Author: Bjorn Helgaas Date: Tue Dec 15 15:11:13 2020 -0600 Merge branch 'remotes/lorenzo/pci/rcar' - Convert DT bindings to json-schema (Yoshihiro Shimoda) - Document r8a77965 DT bindings (Yoshihiro Shimoda) - Document r8a774e1 DT bindings (Lad Prabhakar) * remotes/lorenzo/pci/rcar: dt-bindings: PCI: rcar-pci-host: Document r8a774e1 bindings dt-bindings: PCI: rcar-pci-host: Document r8a77965 bindings dt-bindings: PCI: rcar-pci-host: Convert bindings to json-schema PCI: rcar: Drop unused members from struct rcar_pcie_host commit 28e77bcf4436286600431fb63acc26c6f9680f2d Merge: 4cc0a34ae2a11 476b70b4d1adf Author: Bjorn Helgaas Date: Tue Dec 15 15:11:12 2020 -0600 Merge branch 'remotes/lorenzo/pci/keystone' - Enable keystone compile testing on non-ARM arches (Alex Dewar) * remotes/lorenzo/pci/keystone: PCI: keystone: Enable compile-testing on !ARM commit 4cc0a34ae2a11cf0d2949d1e1d93e7077981119c Merge: ff9f1683b6302 7698c0f1558af Author: Bjorn Helgaas Date: Tue Dec 15 15:11:12 2020 -0600 Merge branch 'remotes/lorenzo/pci/iproc' - Declare iproc register set sizes to help avoid out-of-bound accesses (Bharat Gooty) - Invalidate iproc PAXB IARR1/IMAP1 inbound windows to erase bootloader footprint (Roman Bacik) - Log Root Port link speed & width at startup (Srinath Mannam) * remotes/lorenzo/pci/iproc: PCI: iproc: Enhance PCIe Link information display PCI: iproc: Invalidate correct PAXB inbound windows PCI: iproc: Fix out-of-bound array accesses commit ff9f1683b63022035981045ce0368ec047d0ed1c Merge: ee4871d0102b0 660c486590aa4 Author: Bjorn Helgaas Date: Tue Dec 15 15:11:11 2020 -0600 Merge branch 'remotes/lorenzo/pci/dwc' - Support multiple ATU memory regions (Rob Herring) - Warn if non-prefetchable memory aperture is > 32-bit (Vidya Sagar) - Allow programming ATU for >4GB memory (Vidya Sagar) - Move ATU offset out of driver match data (Rob Herring) - Move "dbi", "dbi2", and "addr_space" resource setup to common code (Rob Herring) - Remove unneeded function wrappers (Rob Herring) - Ensure all outbound ATU windows are reset to reduce dependencies on bootloader (Rob Herring) - Use the default MSI irq_chip for dra7xx (Rob Herring) - Drop the .set_num_vectors() host op (Rob Herring) - Move MSI interrupt setup into DWC common code (Rob Herring) - Rework and simplify DWC MSI initialization (Rob Herring) - Move link handling to DWC common code (Rob Herring) - Move dw_pcie_msi_init() calls to DWC common code (Rob Herring) - Move dw_pcie_setup_rc() calls to DWC common code (Rob Herring) - Remove unnecessary wrappers around dw_pcie_host_init() (Rob Herring) - Revert "keystone: Drop duplicated 'num-viewport'" to prepare for detecting number of iATU regions without help from DT (Rob Herring) - Move inbound and outbound windows to common struct (Rob Herring) - Detect number of DWC iATU windows from device registers (Rob Herring) - Drop samsung,exynos5440-pcie binding (Marek Szyprowski) - Add samsung,exynos-pcie and samsung,exynos-pcie-phy bindings for Exynos5433 variant (Marek Szyprowski) - Rework phy-exynos-pcie driver to support Exynos5433 PCIe PHY (Jaehoon Chung) - Rework pci-exynos.c to support Exynos5433 PCIe host (Jaehoon Chung) - Move tegra "dbi" accesses to post common DWC initialization (Vidya Sagar) - Read tegra dbi" base address in application logic (Vidya Sagar) - Fix tegra ASPM-L1SS advertisement disable code (Vidya Sagar) - Set Tegra194 DesignWare IP version to 0x490A (Vidya Sagar) - Continue tegra unconfig sequence even if parts fail (Vidya Sagar) - Check return value of tegra_pcie_init_controller() (Vidya Sagar) - Disable tegra LTSSM during L2 entry (Vidya Sagar) - Add SM8250 SoC PCIe DT bindings and support (Manivannan Sadhasivam) - Add SM8250 BDF to SID mapping (Manivannan Sadhasivam) - Set 32-bit DMA mask for DWC MSI target address allocation (Vidya Sagar) * remotes/lorenzo/pci/dwc: PCI: dwc: Set 32-bit DMA mask for MSI target address allocation PCI: qcom: Add support for configuring BDF to SID mapping for SM8250 PCI: qcom: Add SM8250 SoC support dt-bindings: pci: qcom: Document PCIe bindings for SM8250 SoC PCI: tegra: Disable LTSSM during L2 entry PCI: tegra: Check return value of tegra_pcie_init_controller() PCI: tegra: Continue unconfig sequence even if parts fail PCI: tegra: Set DesignWare IP version PCI: tegra: Fix ASPM-L1SS advertisement disable code PCI: tegra: Read "dbi" base address to program in application logic PCI: tegra: Move "dbi" accesses to post common DWC initialization PCI: dwc: exynos: Rework the driver to support Exynos5433 variant phy: samsung: phy-exynos-pcie: rework driver to support Exynos5433 PCIe PHY dt-bindings: phy: exynos: add the samsung,exynos-pcie-phy binding dt-bindings: PCI: exynos: add the samsung,exynos-pcie binding dt-bindings: PCI: exynos: drop samsung,exynos5440-pcie binding PCI: dwc: Detect number of iATU windows PCI: dwc: Move inbound and outbound windows to common struct Revert "PCI: dwc/keystone: Drop duplicated 'num-viewport'" PCI: dwc: Remove unnecessary wrappers around dw_pcie_host_init() PCI: dwc: Move dw_pcie_setup_rc() to DWC common code PCI: dwc: Move dw_pcie_msi_init() into core PCI: dwc: Move link handling into common code PCI: dwc: Rework MSI initialization PCI: dwc: Move MSI interrupt setup into DWC common code PCI: dwc: Drop the .set_num_vectors() host op PCI: dwc/dra7xx: Use the common MSI irq_chip PCI: dwc: Ensure all outbound ATU windows are reset PCI: dwc/intel-gw: Remove some unneeded function wrappers PCI: dwc: Move "dbi", "dbi2", and "addr_space" resource setup into common code PCI: dwc/intel-gw: Move ATU offset out of driver match data PCI: dwc: Add support to program ATU for >4GB memory PCI: of: Warn if non-prefetchable memory aperture size is > 32-bit PCI: dwc: Support multiple ATU memory regions commit ee4871d0102b09d1b23b95f2f746baf327205876 Merge: 0032242459e72 7aa256234c4c8 Author: Bjorn Helgaas Date: Tue Dec 15 15:11:11 2020 -0600 Merge branch 'remotes/lorenzo/pci/cadence' - Make "cdns,max-outbound-regions" optional (Kishon Vijay Abraham I) - Fix "ti,syscon-pcie-ctrl" DT property to take argument (Kishon Vijay Abraham I) - Add TI J7200 host and endpoint mode DT bindings (Kishon Vijay Abraham I) * remotes/lorenzo/pci/cadence: PCI: j721e: Get offset within "syscon" from "ti,syscon-pcie-ctrl" phandle arg dt-bindings: PCI: Add EP mode dt-bindings for TI's J7200 SoC dt-bindings: PCI: Add host mode dt-bindings for TI's J7200 SoC dt-bindings: pci: ti,j721e: Fix "ti,syscon-pcie-ctrl" to take argument PCI: cadence: Do not error if "cdns,max-outbound-regions" is not found dt-bindings: PCI: Make "cdns,max-outbound-regions" optional property commit 0032242459e72d92b997d983b0562b453fbf8fcf Merge: 7546ad5e3c20d ddaff0af65313 Author: Bjorn Helgaas Date: Tue Dec 15 15:11:11 2020 -0600 Merge branch 'remotes/lorenzo/pci/brcmstb' - Initialize "tmp" before use (Jim Quinlan) * remotes/lorenzo/pci/brcmstb: PCI: brcmstb: Initialize "tmp" before use commit 7546ad5e3c20d93e15ad38916a7661846e9c247d Merge: 7c250f8293a36 1d1cd163d0de2 Author: Bjorn Helgaas Date: Tue Dec 15 15:11:10 2020 -0600 Merge branch 'remotes/lorenzo/pci/aardvark' - Update comment about delay before link training (Pali Rohár) * remotes/lorenzo/pci/aardvark: PCI: aardvark: Update comment about disabling link training commit 7c250f8293a362189419ae8b34da111ba02af304 Merge: c086b55e374b2 cddadae9748c3 Author: Bjorn Helgaas Date: Tue Dec 15 15:11:10 2020 -0600 Merge branch 'pci/ecam' - Unify ECAM constants in native PCI Express drivers (Krzysztof Wilczyński) - Add thunder-pem constant for custom ".bus_shift" initialiser (Krzysztof Wilczyński) - Convert iproc to use new ECAM constants (Krzysztof Wilczyński) - Change vmd __iomem pointers from "char *" to "void *" (Krzysztof Wilczyński) - Remove unused xgene .bus_shift initialisers (Krzysztof Wilczyński) * pci/ecam: PCI: xgene: Removed unused ".bus_shift" initialisers from pci-xgene.c PCI: vmd: Update type of the __iomem pointers PCI: iproc: Convert to use the new ECAM constants PCI: thunder-pem: Add constant for custom ".bus_shift" initialiser PCI: Unify ECAM constants in native PCI Express drivers commit c086b55e374b2c24c2cc506cac6499fee635da06 Merge: 72b3a644bbe99 059983790a4c9 Author: Bjorn Helgaas Date: Tue Dec 15 15:11:09 2020 -0600 Merge branch 'pci/virtualization' - Mark AMD Raven iGPU ATS as broken in some Emerson platforms to avoid issues (Alex Deucher) - Add function 1 DMA alias quirk for Marvell 9215 SATA controller (Bjorn Helgaas) * pci/virtualization: PCI: Add function 1 DMA alias quirk for Marvell 9215 SATA controller PCI: Mark AMD Raven iGPU ATS as broken in some platforms commit 72b3a644bbe994add91249676d77c279b1d92376 Merge: ff163da95b0ce a697f072f5da8 Author: Bjorn Helgaas Date: Tue Dec 15 15:11:09 2020 -0600 Merge branch 'pci/ptm' - Save/restore Precision Time Measurement Capability for suspend/resume (David E. Box) - Disable PTM during suspend to save power (David E. Box) * pci/ptm: PCI: Disable PTM during suspend to save power PCI/PTM: Save/restore Precision Time Measurement Capability for suspend/resume commit ff163da95b0ce29ce5ce597a1e98b3e528e57750 Merge: a48e486b376bf 9c2cc571f9250 Author: Bjorn Helgaas Date: Tue Dec 15 15:11:08 2020 -0600 Merge branch 'pci/pm' - Add sysfs attribute for device power state (Maximilian Luz) - Rename pci_wakeup_bus() to pci_resume_bus() (Mika Westerberg) - Do not generate wakeup event when runtime resuming bus (Mika Westerberg) * pci/pm: PCI/PM: Do not generate wakeup event when runtime resuming device PCI/PM: Rename pci_wakeup_bus() to pci_resume_bus() PCI: Add sysfs attribute for device power state commit a48e486b376bf78d945a0ccd772a5979042919c3 Merge: 6db645f99cc53 2053230af11dc Author: Bjorn Helgaas Date: Tue Dec 15 15:11:08 2020 -0600 Merge branch 'pci/msi' - Disable MSI for broken Pericom PCIe-USB adapter (Andy Shevchenko) - Move MSI/MSI-X init to msi.c (Bjorn Helgaas) - Move MSI/MSI-X flags updaters to msi.c (Bjorn Helgaas) - Warn if we assign 64-bit MSI address to device that only supports 32-bit MSI (Vidya Sagar) * pci/msi: PCI/MSI: Set device flag indicating only 32-bit MSI support PCI/MSI: Move MSI/MSI-X flags updaters to msi.c PCI/MSI: Move MSI/MSI-X init to msi.c PCI: Use predefined Pericom Vendor ID PCI: Disable MSI for Pericom PCIe-USB adapter commit 6db645f99cc5357ab5520982b85396487c113dc9 Merge: 1a76dceaf4268 0aec75a5963e8 Author: Bjorn Helgaas Date: Tue Dec 15 15:11:08 2020 -0600 Merge branch 'pci/misc' - Update kernel-doc to match function prototypes (Mauro Carvalho Chehab) - Bounds-check "pci=resource_alignment=" requests (Bjorn Helgaas) - Fix integer overflow in "pci=resource_alignment=" requests (Colin Ian King) - Remove unused HAVE_PCI_SET_MWI definition (Heiner Kallweit) - Reduce pci_set_cacheline_size() message to debug level (Heiner Kallweit) * pci/misc: PCI: Reduce pci_set_cacheline_size() message to debug level PCI: Remove unused HAVE_PCI_SET_MWI PCI: Fix overflow in command-line resource alignment requests PCI: Bounds-check command-line resource alignment requests PCI: Fix kernel-doc markup # Conflicts: # drivers/pci/pci-driver.c commit 1a76dceaf4268f904292ca126d1cb9af091fd516 Merge: 6a94785fb9f8d 4684709bf81a2 Author: Bjorn Helgaas Date: Tue Dec 15 15:11:07 2020 -0600 Merge branch 'pci/hotplug' - Remove unneeded break in ibmphp (Bjorn Helgaas) - Fix pci_slot_release() NULL pointer dereference (Jubin Zhong) * pci/hotplug: PCI: Fix pci_slot_release() NULL pointer dereference PCI: ibmphp: Remove unneeded break commit 6a94785fb9f8dd3c76f32b7a029691ab3fc884c5 Merge: e8722508dd786 d292dd0eb3ac6 Author: Bjorn Helgaas Date: Tue Dec 15 15:11:06 2020 -0600 Merge branch 'pci/err' - Stop writing AER Capability when we don't own it (Sean V Kelley) - Bind RCEC devices to the Port driver (Qiuxu Zhuo) - Cache the RCEC RA Capability offset (Sean V Kelley) - Add pci_walk_bridge() (Sean V Kelley) - Clear AER status only when we control AER (Sean V Kelley) - Recover from RCEC AER errors (Sean V Kelley) - Add pcie_link_rcec() to associate RCiEPs with RCECs (Sean V Kelley) - Recover from RCiEP AER errors (Sean V Kelley) - Add pcie_walk_rcec() for RCEC AER handling (Sean V Kelley) - Add pcie_walk_rcec() for RCEC PME handling (Sean V Kelley) - Add RCEC AER error injection support (Qiuxu Zhuo) * pci/err: PCI/AER: Add RCEC AER error injection support PCI/PME: Add pcie_walk_rcec() to RCEC PME handling PCI/AER: Add pcie_walk_rcec() to RCEC AER handling PCI/ERR: Recover from RCiEP AER errors PCI/ERR: Add pcie_link_rcec() to associate RCiEPs PCI/ERR: Recover from RCEC AER errors PCI/ERR: Clear AER status only when we control AER PCI/ERR: Add pci_walk_bridge() to pcie_do_recovery() PCI/ERR: Avoid negated conditional for clarity PCI/ERR: Use "bridge" for clarity in pcie_do_recovery() PCI/ERR: Simplify by computing pci_pcie_type() once PCI/ERR: Simplify by using pci_upstream_bridge() PCI/ERR: Rename reset_link() to reset_subordinates() PCI/ERR: Cache RCEC EA Capability offset in pci_init_capabilities() PCI/ERR: Bind RCEC devices to the Root Port driver PCI/AER: Write AER Capability only when we control it commit e8722508dd78609b453b960d0b8163749d1f78b8 Merge: 1559c4b588ecd aa0b1574fd36f Author: Bjorn Helgaas Date: Tue Dec 15 15:11:06 2020 -0600 Merge branch 'pci/enumeration' - Decode PCIe 64 GT/s link speed (Gustavo Pimentel) - De-duplicate Device IDs in the driver dynamic IDs list (Zhenzhong Duan) - Return u8 from pci_find_capability() and similar (Puranjay Mohan) - Return u16 from pci_find_ext_capability() and similar (Bjorn Helgaas) - Include both device and resource name in config space resources (Alexander Lobakin) - Fix ACPI companion lookup for device 0 on the root bus (Rafael J. Wysocki) * pci/enumeration: PCI/ACPI: Fix companion lookup for device 0 on the root bus PCI: Keep both device and resource name for config space remaps PCI: Return u16 from pci_find_ext_capability() and similar PCI: Return u8 from pci_find_capability() and similar PCI: Avoid duplicate IDs in driver dynamic IDs list PCI: Move pci_match_device() ahead of new_id_store() PCI: Decode PCIe 64 GT/s link speed commit 1559c4b588ecd9f230b7b64d871a850e185412e8 Merge: f8394f232b1ea 4257f7e008ea3 Author: Bjorn Helgaas Date: Tue Dec 15 15:11:06 2020 -0600 Merge branch 'pci/aspm' - Save/restore ASPM L1SS Capability for suspend/resume (Vidya Sagar) * pci/aspm: PCI/ASPM: Save/restore L1SS Capability for suspend/resume commit 059983790a4c963d92943e55a61fca55be427d55 Author: Bjorn Helgaas Date: Tue Nov 10 16:00:57 2020 -0600 PCI: Add function 1 DMA alias quirk for Marvell 9215 SATA controller Add function 1 DMA alias quirk for Marvell 88SS9215 PCIe SSD Controller. Link: https://bugzilla.kernel.org/show_bug.cgi?id=42679#c135 Link: https://lore.kernel.org/r/20201110220516.697934-1-helgaas@kernel.org Reported-by: John Smith Signed-off-by: Bjorn Helgaas commit ac73e3dc8acd0a3be292755db30388c3580f5674 Merge: 148842c98a24e dfefd226b0bf7 Author: Linus Torvalds Date: Tue Dec 15 12:53:37 2020 -0800 Merge branch 'akpm' (patches from Andrew) Merge misc updates from Andrew Morton: - a few random little subsystems - almost all of the MM patches which are staged ahead of linux-next material. I'll trickle to post-linux-next work in as the dependents get merged up. Subsystems affected by this patch series: kthread, kbuild, ide, ntfs, ocfs2, arch, and mm (slab-generic, slab, slub, dax, debug, pagecache, gup, swap, shmem, memcg, pagemap, mremap, hmm, vmalloc, documentation, kasan, pagealloc, memory-failure, hugetlb, vmscan, z3fold, compaction, oom-kill, migration, cma, page-poison, userfaultfd, zswap, zsmalloc, uaccess, zram, and cleanups). * emailed patches from Andrew Morton : (200 commits) mm: cleanup kstrto*() usage mm: fix fall-through warnings for Clang mm: slub: convert sysfs sprintf family to sysfs_emit/sysfs_emit_at mm: shmem: convert shmem_enabled_show to use sysfs_emit_at mm:backing-dev: use sysfs_emit in macro defining functions mm: huge_memory: convert remaining use of sprintf to sysfs_emit and neatening mm: use sysfs_emit for struct kobject * uses mm: fix kernel-doc markups zram: break the strict dependency from lzo zram: add stat to gather incompressible pages since zram set up zram: support page writeback mm/process_vm_access: remove redundant initialization of iov_r mm/zsmalloc.c: rework the list_add code in insert_zspage() mm/zswap: move to use crypto_acomp API for hardware acceleration mm/zswap: fix passing zero to 'PTR_ERR' warning mm/zswap: make struct kernel_param_ops definitions const userfaultfd/selftests: hint the test runner on required privilege userfaultfd/selftests: fix retval check for userfaultfd_open() userfaultfd/selftests: always dump something in modes userfaultfd: selftests: make __{s,u}64 format specifiers portable ... commit dfefd226b0bf7c435a58d75a0ce2f9273b9825f6 Author: Alexey Dobriyan Date: Mon Dec 14 19:15:03 2020 -0800 mm: cleanup kstrto*() usage Range checks can folded into proper conversion function. kstrto*() exist for all arithmetic types. Link: https://lkml.kernel.org/r/20201122123759.GC92364@localhost.localdomain Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 01359eb2013b4b1e87b22db0f532c2e0b7aee001 Author: Gustavo A. R. Silva Date: Mon Dec 14 19:15:00 2020 -0800 mm: fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a couple of warnings by explicitly adding a break statement instead of just letting the code fall through to the next, and by adding a fallthrough pseudo-keyword in places where the code is intended to fall through. Link: https://github.com/KSPP/linux/issues/115 Link: https://lkml.kernel.org/r/f5756988b8842a3f10008fbc5b0a654f828920a9.1605896059.git.gustavoars@kernel.org Signed-off-by: Gustavo A. R. Silva Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bf16d19aabd8f5fbd220e9f83a3925a33cd88e81 Author: Joe Perches Date: Mon Dec 14 19:14:57 2020 -0800 mm: slub: convert sysfs sprintf family to sysfs_emit/sysfs_emit_at Convert the unbounded uses of sprintf to sysfs_emit. A few conversions may now not end in a newline if the output buffer is overflowed. Link: https://lkml.kernel.org/r/0c90a90f466167f8c37de4b737553cf49c4a277f.1605376435.git.joe@perches.com Signed-off-by: Joe Perches Cc: Christoph Lameter Cc: David Rientjes Cc: Greg Kroah-Hartman Cc: Hugh Dickins Cc: Joonsoo Kim Cc: Matthew Wilcox Cc: Mike Kravetz Cc: Pekka Enberg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 79d4d38a03fcd750257b67bf8a61759ec993d971 Author: Joe Perches Date: Mon Dec 14 19:14:53 2020 -0800 mm: shmem: convert shmem_enabled_show to use sysfs_emit_at Update the function to use sysfs_emit_at while neatening the uses of sprintf and overwriting the last space char with a newline to avoid possible output buffer overflow. Miscellanea: - in shmem_enabled_show, the removal of the indirected use of fmt allows __printf verification Link: https://lkml.kernel.org/r/b612a93825e5ea330cb68d2e8b516e9687a06cc6.1605376435.git.joe@perches.com Signed-off-by: Joe Perches Cc: Christoph Lameter Cc: David Rientjes Cc: Greg Kroah-Hartman Cc: Hugh Dickins Cc: Joonsoo Kim Cc: Matthew Wilcox Cc: Mike Kravetz Cc: Pekka Enberg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5e4c0d86cf4a7a22abb9468e84f4480dd6b67032 Author: Joe Perches Date: Mon Dec 14 19:14:50 2020 -0800 mm:backing-dev: use sysfs_emit in macro defining functions The cocci script used in commit bdacbb8d04f ("mm: Use sysfs_emit for struct kobject * uses") does not convert the name##_show macro because the macro uses concatenation via ##. Convert it by hand. Link: https://lkml.kernel.org/r/45ec6cfc177d743f9c0ebaf35e43969dce43af42.1605376435.git.joe@perches.com Signed-off-by: Joe Perches Cc: Christoph Lameter Cc: David Rientjes Cc: Greg Kroah-Hartman Cc: Hugh Dickins Cc: Joonsoo Kim Cc: Matthew Wilcox Cc: Mike Kravetz Cc: Pekka Enberg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bfb0ffeb2a67cd240874a3968dd9025bb3b3bf68 Author: Joe Perches Date: Mon Dec 14 19:14:46 2020 -0800 mm: huge_memory: convert remaining use of sprintf to sysfs_emit and neatening Convert the only use of sprintf with struct kobject * that the cocci script could not convert. Miscellanea: - Neaten the uses of a constant string with sysfs_emit to use a const char * to reduce overall object size Link: https://lkml.kernel.org/r/7df6be66bbd68e1a0bca9d35aca1341dbf94d2a7.1605376435.git.joe@perches.com Signed-off-by: Joe Perches Cc: Christoph Lameter Cc: David Rientjes Cc: Greg Kroah-Hartman Cc: Hugh Dickins Cc: Joonsoo Kim Cc: Matthew Wilcox Cc: Mike Kravetz Cc: Pekka Enberg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ae7a927d270f5ddb6414fc6a9be7bafd7f5bf703 Author: Joe Perches Date: Mon Dec 14 19:14:42 2020 -0800 mm: use sysfs_emit for struct kobject * uses Patch series "mm: Convert sysfs sprintf family to sysfs_emit", v2. Use the new sysfs_emit family and not the sprintf family. This patch (of 5): Use the sysfs_emit function instead of the sprintf family. Done with cocci script as in commit 3c6bff3cf988 ("RDMA: Convert sysfs kobject * show functions to use sysfs_emit()") Link: https://lkml.kernel.org/r/cover.1605376435.git.joe@perches.com Link: https://lkml.kernel.org/r/9c249215bad6df616ba0410ad980042694970c1b.1605376435.git.joe@perches.com Signed-off-by: Joe Perches Cc: Mike Kravetz Cc: Hugh Dickins Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Matthew Wilcox Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a00cda3f0a57e3b39d8dc512e45586241dc304bb Author: Mauro Carvalho Chehab Date: Mon Dec 14 19:14:39 2020 -0800 mm: fix kernel-doc markups Kernel-doc markups should use this format: identifier - description Fix some issues on mm files: 1) The definition for get_user_pages_locked() doesn't follow it. Also, it expects a short descrpition at the header, followed by a long one, after the parameters. Fix it. 2) Kernel-doc requires that a kernel-doc markup to be immediately below the function prototype, as otherwise it will rename it. So, move get_pfnblock_flags_mask() description to the right place. 3) Make invalidate_mapping_pagevec() to also follow the expected kernel-doc format. While here, fix a few minor English syntax issues, as suggested by Matthew: will used -> will be used similar with -> similar to Link: https://lkml.kernel.org/r/80e85dddc92d333bc2159ee8a2294921612e8745.1605521731.git.mchehab+huawei@kernel.org Signed-off-by: Mauro Carvalho Chehab Suggested-by: Mattew Wilcox [English fixes] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3d711a382735d2c34d3ba2075a5aa83a894f4a57 Author: Rui Salvaterra Date: Mon Dec 14 19:14:35 2020 -0800 zram: break the strict dependency from lzo From the beginning, the zram block device always enabled CRYPTO_LZO, since lzo-rle is hardcoded as the fallback compression algorithm. As a consequence, on systems where another compression algorithm is chosen (e.g. CRYPTO_ZSTD), the lzo kernel module becomes unused, while still having to be built/loaded. This patch removes the hardcoded lzo-rle dependency and allows the user to select the default compression algorithm for zram at build time. The previous behaviour is kept, as the default algorithm is still lzo-rle. Link: https://lkml.kernel.org/r/20201207121245.50529-1-rsalvaterra@gmail.com Signed-off-by: Rui Salvaterra Suggested-by: Sergey Senozhatsky Suggested-by: Minchan Kim Acked-by: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 194e28da1a0279ef6a106a5b621fd79c410432ef Author: Minchan Kim Date: Mon Dec 14 19:14:32 2020 -0800 zram: add stat to gather incompressible pages since zram set up Currently, zram supports the stat via /sys/block/zram/mm_stat to represent how many of incompressible pages are stored at the moment but it couldn't show how many times incompressible pages were wrote down since zram set up. It's also good indication to see how zram is effective in the system. Link: https://lkml.kernel.org/r/20201130201907.1284910-1-minchan@kernel.org Signed-off-by: Minchan Kim Reviewed-by: Sergey Senozhatsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0d8359620d9be9823b6b9b3cf2dbe006cbfec594 Author: Minchan Kim Date: Mon Dec 14 19:14:28 2020 -0800 zram: support page writeback There is demand to writeback specific process pages to backing store instead of all idles pages in the system due to storage wear out concerns and to launching latency of apps which are most of the time idle but are critical for resume latency. This patch extends the writeback knob to support a specific page writeback. Link: https://lkml.kernel.org/r/20201020190506.3758660-1-minchan@kernel.org Signed-off-by: Minchan Kim Reviewed-by: Sergey Senozhatsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 95c9ae14a9b99a65956de80a1eefafcb901c0e9f Author: Colin Ian King Date: Mon Dec 14 19:14:25 2020 -0800 mm/process_vm_access: remove redundant initialization of iov_r The pointer iov_r is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Link: https://lkml.kernel.org/r/20201102120614.694917-1-colin.king@canonical.com Signed-off-by: Colin Ian King Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 110ceb8287fd0af104a7a15db93534ab0dc2bc21 Author: Miaohe Lin Date: Mon Dec 14 19:14:22 2020 -0800 mm/zsmalloc.c: rework the list_add code in insert_zspage() Rework the list_add code to make it more readable and simple. Link: https://lkml.kernel.org/r/20201015130107.65195-1-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Acked-by: Minchan Kim Reviewed-by: Sergey Senozhatsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1ec3b5fe6eec782f4e5e0a80e4ce1909ffd5d161 Author: Barry Song Date: Mon Dec 14 19:14:18 2020 -0800 mm/zswap: move to use crypto_acomp API for hardware acceleration Right now, all new ZIP drivers are adapted to crypto_acomp APIs rather than legacy crypto_comp APIs. Tradiontal ZIP drivers like lz4,lzo etc have been also wrapped into acomp via scomp backend. But zswap.c is still using the old APIs. That means zswap won't be able to work on any new ZIP drivers in kernel. This patch moves to use cryto_acomp APIs to fix the disconnected bridge between new ZIP drivers and zswap. It is probably the first real user to use acomp but perhaps not a good example to demonstrate how multiple acomp requests can be executed in parallel in one acomp instance. frontswap is doing page load and store page by page synchronously. swap_writepage() depends on the completion of frontswap_store() to decide if it should call __swap_writepage() to swap to disk. However this patch creates multiple acomp instances, so multiple threads running on multiple different cpus can actually do (de)compression parallelly, leveraging the power of multiple ZIP hardware queues. This is also consistent with frontswap's page management model. The old zswap code uses atomic context and avoids the race conditions while shared resources like zswap_dstmem are accessed. Here since acomp can sleep, per-cpu mutex is used to replace preemption-disable. While it is possible to make mm/page_io.c and mm/frontswap.c support async (de)compression in some way, the entire design requires careful thinking and performance evaluation. For the first step, the base with fixed connection between ZIP drivers and zswap should be built. Link: https://lkml.kernel.org/r/20201107065332.26992-1-song.bao.hua@hisilicon.com Signed-off-by: Barry Song Acked-by: Vitaly Wool Cc: Luis Claudio R. Goncalves Cc: Sebastian Andrzej Siewior Cc: Herbert Xu Cc: David S. Miller Cc: Mahipal Challa Cc: Seth Jennings Cc: Dan Streetman Cc: Zhou Wang Cc: Colin Ian King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 42a44704367cd18d069c9855cb84090ff90ecd86 Author: YueHaibing Date: Mon Dec 14 19:14:15 2020 -0800 mm/zswap: fix passing zero to 'PTR_ERR' warning Fix smatch warning: mm/zswap.c:425 zswap_cpu_comp_prepare() warn: passing zero to 'PTR_ERR' crypto_alloc_comp() never return NULL, use IS_ERR instead of IS_ERR_OR_NULL to fix this. Link: https://lkml.kernel.org/r/20201031055615.28080-1-yuehaibing@huawei.com Fixes: f1c54846ee45 ("zswap: dynamic pool creation") Signed-off-by: YueHaibing Reviewed-by: David Hildenbrand Cc: Seth Jennings Cc: Dan Streetman Cc: Vitaly Wool Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 83aed6cde84542a1d56bdc0561879cc0199ae564 Author: Joe Perches Date: Mon Dec 14 19:14:11 2020 -0800 mm/zswap: make struct kernel_param_ops definitions const These should be const, so make it so. Link: https://lkml.kernel.org/r/1791535ee0b00f4a5c68cc4a8adada06593ad8f1.1601770305.git.joe@perches.com Signed-off-by: Joe Perches Cc: Seth Jennings Cc: Dan Streetman Cc: Vitaly Wool Cc: "Maciej S. Szmigiero" Cc: Dan Carpenter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d9f411bacfa0c3d0d97580a66f88e70f92bcf58e Author: Peter Xu Date: Mon Dec 14 19:14:08 2020 -0800 userfaultfd/selftests: hint the test runner on required privilege Now userfaultfd test program requires either root or ptrace privilege due to the signal/event tests. When UFFDIO_API failed, hint the test runner about this fact verbosely. Link: https://lkml.kernel.org/r/20201208024709.7701-4-peterx@redhat.com Signed-off-by: Peter Xu Cc: Andrea Arcangeli Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1e17a24edf9bef891bbdd02617eaab4fa6efcd7f Author: Peter Xu Date: Mon Dec 14 19:14:05 2020 -0800 userfaultfd/selftests: fix retval check for userfaultfd_open() userfaultfd_open() returns 1 for errors rather than negatives. Fix it on all the callers so when UFFDIO_API failed the test will bail out. Link: https://lkml.kernel.org/r/20201208024709.7701-3-peterx@redhat.com Signed-off-by: Peter Xu Cc: Andrea Arcangeli Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 164c50be2878f4caf6d7973e8e0e438f182f4ded Author: Peter Xu Date: Mon Dec 14 19:14:02 2020 -0800 userfaultfd/selftests: always dump something in modes Patch series "userfaultfd: selftests: Small fixes". Some very trivial fixes that I kept locally to userfaultfd selftest program. This patch (of 3): BOUNCE_POLL is a special bit that if cleared it means "READ" instead. Dump that too otherwise we'll see tests with empty modes. Link: https://lkml.kernel.org/r/20201208024709.7701-1-peterx@redhat.com Link: https://lkml.kernel.org/r/20201208024709.7701-2-peterx@redhat.com Signed-off-by: Peter Xu Cc: Andrea Arcangeli Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 77f962e7ae24e5fa7b257b8242c62e716119a312 Author: Axel Rasmussen Date: Mon Dec 14 19:13:58 2020 -0800 userfaultfd: selftests: make __{s,u}64 format specifiers portable On certain platforms (powerpcle is the one on which I ran into this), "%Ld" and "%Lu" are unsuitable for printing __s64 and __u64, respectively, resulting in build warnings. Cast to {u,}int64_t, and use the PRI{d,u}64 macros defined in inttypes.h to print them. This ought to be portable to all platforms. Splitting this off into a separate macro lets us remove some lines, and get rid of some (I would argue) stylistically odd cases where we joined printf() and exit() into a single statement with a ,. Finally, this also fixes a "missing braces around initializer" warning when we initialize prms in wp_range(). [axelrasmussen@google.com: v2] Link: https://lkml.kernel.org/r/20201203180244.1811601-1-axelrasmussen@google.com Link: https://lkml.kernel.org/r/20201202211542.1121189-1-axelrasmussen@google.com Signed-off-by: Axel Rasmussen Acked-by: Peter Xu Cc: Shuah Khan Cc: Joe Perches Cc: Mike Rapoport Cc: Andrea Arcangeli Cc: David Alan Gilbert Cc: Greg Thelen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d0d4730ac2e404a5b0da9a87ef38c73e51cb1664 Author: Lokesh Gidra Date: Mon Dec 14 19:13:54 2020 -0800 userfaultfd: add user-mode only option to unprivileged_userfaultfd sysctl knob With this change, when the knob is set to 0, it allows unprivileged users to call userfaultfd, like when it is set to 1, but with the restriction that page faults from only user-mode can be handled. In this mode, an unprivileged user (without SYS_CAP_PTRACE capability) must pass UFFD_USER_MODE_ONLY to userfaultd or the API will fail with EPERM. This enables administrators to reduce the likelihood that an attacker with access to userfaultfd can delay faulting kernel code to widen timing windows for other exploits. The default value of this knob is changed to 0. This is required for correct functioning of pipe mutex. However, this will fail postcopy live migration, which will be unnoticeable to the VM guests. To avoid this, set 'vm.userfault = 1' in /sys/sysctl.conf. The main reason this change is desirable as in the short term is that the Android userland will behave as with the sysctl set to zero. So without this commit, any Linux binary using userfaultfd to manage its memory would behave differently if run within the Android userland. For more details, refer to Andrea's reply [1]. [1] https://lore.kernel.org/lkml/20200904033438.GI9411@redhat.com/ Link: https://lkml.kernel.org/r/20201120030411.2690816-3-lokeshgidra@google.com Signed-off-by: Lokesh Gidra Reviewed-by: Andrea Arcangeli Cc: Kees Cook Cc: Jonathan Corbet Cc: Peter Xu Cc: Sebastian Andrzej Siewior Cc: Alexander Viro Cc: Stephen Smalley Cc: Eric Biggers Cc: Daniel Colascione Cc: "Joel Fernandes (Google)" Cc: Kalesh Singh Cc: Suren Baghdasaryan Cc: Jeff Vander Stoep Cc: Cc: Mike Rapoport Cc: Shaohua Li Cc: Jerome Glisse Cc: Mauro Carvalho Chehab Cc: Johannes Weiner Cc: Mel Gorman Cc: Nitin Gupta Cc: Vlastimil Babka Cc: Iurii Zaikin Cc: Luis Chamberlain Cc: Daniel Colascione Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 37cd0575b8510159992d279c530c05f872990b02 Author: Lokesh Gidra Date: Mon Dec 14 19:13:49 2020 -0800 userfaultfd: add UFFD_USER_MODE_ONLY Patch series "Control over userfaultfd kernel-fault handling", v6. This patch series is split from [1]. The other series enables SELinux support for userfaultfd file descriptors so that its creation and movement can be controlled. It has been demonstrated on various occasions that suspending kernel code execution for an arbitrary amount of time at any access to userspace memory (copy_from_user()/copy_to_user()/...) can be exploited to change the intended behavior of the kernel. For instance, handling page faults in kernel-mode using userfaultfd has been exploited in [2, 3]. Likewise, FUSE, which is similar to userfaultfd in this respect, has been exploited in [4, 5] for similar outcome. This small patch series adds a new flag to userfaultfd(2) that allows callers to give up the ability to handle kernel-mode faults with the resulting UFFD file object. It then adds a 'user-mode only' option to the unprivileged_userfaultfd sysctl knob to require unprivileged callers to use this new flag. The purpose of this new interface is to decrease the chance of an unprivileged userfaultfd user taking advantage of userfaultfd to enhance security vulnerabilities by lengthening the race window in kernel code. [1] https://lore.kernel.org/lkml/20200211225547.235083-1-dancol@google.com/ [2] https://duasynt.com/blog/linux-kernel-heap-spray [3] https://duasynt.com/blog/cve-2016-6187-heap-off-by-one-exploit [4] https://googleprojectzero.blogspot.com/2016/06/exploiting-recursion-in-linux-kernel_20.html [5] https://bugs.chromium.org/p/project-zero/issues/detail?id=808 This patch (of 2): userfaultfd handles page faults from both user and kernel code. Add a new UFFD_USER_MODE_ONLY flag for userfaultfd(2) that makes the resulting userfaultfd object refuse to handle faults from kernel mode, treating these faults as if SIGBUS were always raised, causing the kernel code to fail with EFAULT. A future patch adds a knob allowing administrators to give some processes the ability to create userfaultfd file objects only if they pass UFFD_USER_MODE_ONLY, reducing the likelihood that these processes will exploit userfaultfd's ability to delay kernel page faults to open timing windows for future exploits. Link: https://lkml.kernel.org/r/20201120030411.2690816-1-lokeshgidra@google.com Link: https://lkml.kernel.org/r/20201120030411.2690816-2-lokeshgidra@google.com Signed-off-by: Daniel Colascione Signed-off-by: Lokesh Gidra Reviewed-by: Andrea Arcangeli Cc: Alexander Viro Cc: Cc: Daniel Colascione Cc: Eric Biggers Cc: Iurii Zaikin Cc: Jeff Vander Stoep Cc: Jerome Glisse Cc: "Joel Fernandes (Google)" Cc: Johannes Weiner Cc: Jonathan Corbet Cc: Kalesh Singh Cc: Kees Cook Cc: Luis Chamberlain Cc: Mauro Carvalho Chehab Cc: Mel Gorman Cc: Mike Rapoport Cc: Nitin Gupta Cc: Peter Xu Cc: Sebastian Andrzej Siewior Cc: Shaohua Li Cc: Stephen Smalley Cc: Suren Baghdasaryan Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f289041ed4cf9a3f6e8a32068fef9ffb2acc5662 Author: Vlastimil Babka Date: Mon Dec 14 19:13:45 2020 -0800 mm, page_poison: remove CONFIG_PAGE_POISONING_ZERO CONFIG_PAGE_POISONING_ZERO uses the zero pattern instead of 0xAA. It was introduced by commit 1414c7f4f7d7 ("mm/page_poisoning.c: allow for zero poisoning"), noting that using zeroes retains the benefit of sanitizing content of freed pages, with the benefit of not having to zero them again on alloc, and the downside of making some forms of corruption (stray writes of NULLs) harder to detect than with the 0xAA pattern. Together with CONFIG_PAGE_POISONING_NO_SANITY it made possible to sanitize the contents on free without checking it back on alloc. These days we have the init_on_free() option to achieve sanitization with zeroes and to save clearing on alloc (and without checking on alloc). Arguably if someone does choose to check the poison for corruption on alloc, the savings of not clearing the page are secondary, and it makes sense to always use the 0xAA poison pattern. Thus, remove the CONFIG_PAGE_POISONING_ZERO option for being redundant. Link: https://lkml.kernel.org/r/20201113104033.22907-6-vbabka@suse.cz Signed-off-by: Vlastimil Babka Acked-by: David Hildenbrand Cc: Mike Rapoport Cc: Rafael J. Wysocki Cc: Alexander Potapenko Cc: Kees Cook Cc: Laura Abbott Cc: Mateusz Nosek Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8f424750baaafcef229791882e879da01c9473b5 Author: Vlastimil Babka Date: Mon Dec 14 19:13:41 2020 -0800 mm, page_poison: remove CONFIG_PAGE_POISONING_NO_SANITY CONFIG_PAGE_POISONING_NO_SANITY skips the check on page alloc whether the poison pattern was corrupted, suggesting a use-after-free. The motivation to introduce it in commit 8823b1dbc05f ("mm/page_poison.c: enable PAGE_POISONING as a separate option") was to simply sanitize freed pages, optimally together with CONFIG_PAGE_POISONING_ZERO. These days we have an init_on_free=1 boot option, which makes this use case of page poisoning redundant. For sanitizing, writing zeroes is sufficient, there is pretty much no benefit from writing the 0xAA poison pattern to freed pages, without checking it back on alloc. Thus, remove this option and suggest init_on_free instead in the main config's help. Link: https://lkml.kernel.org/r/20201113104033.22907-5-vbabka@suse.cz Signed-off-by: Vlastimil Babka Acked-by: David Hildenbrand Cc: Mike Rapoport Cc: Rafael J. Wysocki Cc: Alexander Potapenko Cc: Kees Cook Cc: Laura Abbott Cc: Mateusz Nosek Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 03b6c9a3e8805606c0bb4ad41855fac3bf85c3b9 Author: Vlastimil Babka Date: Mon Dec 14 19:13:38 2020 -0800 kernel/power: allow hibernation with page_poison sanity checking Page poisoning used to be incompatible with hibernation, as the state of poisoned pages was lost after resume, thus enabling CONFIG_HIBERNATION forces CONFIG_PAGE_POISONING_NO_SANITY. For the same reason, the poisoning with zeroes variant CONFIG_PAGE_POISONING_ZERO used to disable hibernation. The latter restriction was removed by commit 1ad1410f632d ("PM / Hibernate: allow hibernation with PAGE_POISONING_ZERO") and similarly for init_on_free by commit 18451f9f9e58 ("PM: hibernate: fix crashes with init_on_free=1") by making sure free pages are cleared after resume. We can use the same mechanism to instead poison free pages with PAGE_POISON after resume. This covers both zero and 0xAA patterns. Thus we can remove the Kconfig restriction that disables page poison sanity checking when hibernation is enabled. Link: https://lkml.kernel.org/r/20201113104033.22907-4-vbabka@suse.cz Signed-off-by: Vlastimil Babka Acked-by: Rafael J. Wysocki [hibernation] Reviewed-by: David Hildenbrand Cc: Mike Rapoport Cc: Alexander Potapenko Cc: Kees Cook Cc: Laura Abbott Cc: Mateusz Nosek Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8db26a3d47354ce7271a8cab03cd65b9d3d610b9 Author: Vlastimil Babka Date: Mon Dec 14 19:13:34 2020 -0800 mm, page_poison: use static key more efficiently Commit 11c9c7edae06 ("mm/page_poison.c: replace bool variable with static key") changed page_poisoning_enabled() to a static key check. However, the function is not inlined, so each check still involves a function call with overhead not eliminated when page poisoning is disabled. Analogically to how debug_pagealloc is handled, this patch converts page_poisoning_enabled() back to boolean check, and introduces page_poisoning_enabled_static() for fast paths. Both functions are inlined. The function kernel_poison_pages() is also called unconditionally and does the static key check inside. Remove it from there and put it to callers. Also split it to two functions kernel_poison_pages() and kernel_unpoison_pages() instead of the confusing bool parameter. Also optimize the check that enables page poisoning instead of debug_pagealloc for architectures without proper debug_pagealloc support. Move the check to init_mem_debugging_and_hardening() to enable a single static key instead of having two static branches in page_poisoning_enabled_static(). Link: https://lkml.kernel.org/r/20201113104033.22907-3-vbabka@suse.cz Signed-off-by: Vlastimil Babka Reviewed-by: David Hildenbrand Cc: Mike Rapoport Cc: Rafael J. Wysocki Cc: Alexander Potapenko Cc: Kees Cook Cc: Laura Abbott Cc: Mateusz Nosek Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 04013513cc84c401c7de9023ff3eda7863fc4add Author: Vlastimil Babka Date: Mon Dec 14 19:13:30 2020 -0800 mm, page_alloc: do not rely on the order of page_poison and init_on_alloc/free parameters Patch series "cleanup page poisoning", v3. I have identified a number of issues and opportunities for cleanup with CONFIG_PAGE_POISON and friends: - interaction with init_on_alloc and init_on_free parameters depends on the order of parameters (Patch 1) - the boot time enabling uses static key, but inefficienty (Patch 2) - sanity checking is incompatible with hibernation (Patch 3) - CONFIG_PAGE_POISONING_NO_SANITY can be removed now that we have init_on_free (Patch 4) - CONFIG_PAGE_POISONING_ZERO can be most likely removed now that we have init_on_free (Patch 5) This patch (of 5): Enabling page_poison=1 together with init_on_alloc=1 or init_on_free=1 produces a warning in dmesg that page_poison takes precedence. However, as these warnings are printed in early_param handlers for init_on_alloc/free, they are not printed if page_poison is enabled later on the command line (handlers are called in the order of their parameters), or when init_on_alloc/free is always enabled by the respective config option - before the page_poison early param handler is called, it is not considered to be enabled. This is inconsistent. We can remove the dependency on order by making the init_on_* parameters only set a boolean variable, and postponing the evaluation after all early params have been processed. Introduce a new init_mem_debugging_and_hardening() function for that, and move the related debug_pagealloc processing there as well. As a result init_mem_debugging_and_hardening() knows always accurately if init_on_* and/or page_poison options were enabled. Thus we can also optimize want_init_on_alloc() and want_init_on_free(). We don't need to check page_poisoning_enabled() there, we can instead not enable the init_on_* static keys at all, if page poisoning is enabled. This results in a simpler and more effective code. Link: https://lkml.kernel.org/r/20201113104033.22907-1-vbabka@suse.cz Link: https://lkml.kernel.org/r/20201113104033.22907-2-vbabka@suse.cz Signed-off-by: Vlastimil Babka Reviewed-by: David Hildenbrand Reviewed-by: Mike Rapoport Cc: Rafael J. Wysocki Cc: Alexander Potapenko Cc: Kees Cook Cc: Michal Hocko Cc: Mateusz Nosek Cc: Laura Abbott Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b8ca396f984295ba09f25f6982f9abd0bb7f5a29 Author: Charan Teja Reddy Date: Mon Dec 14 19:13:26 2020 -0800 mm: cma: improve pr_debug log in cma_release() It is required to print 'count' of pages, along with the pages, passed to cma_release to debug the cases of mismatched count value passed between cma_alloc() and cma_release() from a code path. As an example, consider the below scenario: 1) CMA pool size is 4MB and 2) User doing the erroneous step of allocating 2 pages but freeing 1 page in a loop from this CMA pool. The step 2 causes cma_alloc() to return NULL at one point of time because of -ENOMEM condition. And the current pr_debug logs is not giving the info about these types of allocation patterns because of count value not being printed in cma_release(). We are printing the count value in the trace logs, just extend the same to pr_debug logs too. [akpm@linux-foundation.org: fix printk warning] Link: https://lkml.kernel.org/r/1606318341-29521-1-git-send-email-charante@codeaurora.org Signed-off-by: Charan Teja Reddy Reviewed-by: Souptick Joarder Reviewed-by: David Hildenbrand Acked-by: Vlastimil Babka Cc: Vinayak Menon Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a4efc174b382fcdb62e2d90d39e78a274a975e38 Author: Lecopzer Chen Date: Mon Dec 14 19:13:23 2020 -0800 mm/cma.c: remove redundant cma_mutex lock The cma_mutex which protects alloc_contig_range() was first appeared in commit 7ee793a62fa8c ("cma: Remove potential deadlock situation"), at that time, there is no guarantee the behavior of concurrency inside alloc_contig_range(). After commit 2c7452a075d4db2dc ("mm/page_isolation.c: make start_isolate_page_range() fail if already isolated") > However, two subsystems (CMA and gigantic > huge pages for example) could attempt operations on the same range. If > this happens, one thread may 'undo' the work another thread is doing. > This can result in pageblocks being incorrectly left marked as > MIGRATE_ISOLATE and therefore not available for page allocation. The concurrency inside alloc_contig_range() was clarified. Now we can find that hugepage and virtio call alloc_contig_range() without any lock, thus cma_mutex is "redundant" in cma_alloc() now. Link: https://lkml.kernel.org/r/20201020102241.3729-1-lecopzer.chen@mediatek.com Signed-off-by: Lecopzer Chen Acked-by: David Hildenbrand Acked-by: Vlastimil Babka Cc: Matthias Brugger Cc: YJ Chiang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d85c6db4cc61bd8299f68534bf7ea2f717f49539 Author: Stephen Zhang Date: Mon Dec 14 19:13:20 2020 -0800 mm: migrate: remove unused parameter in migrate_vma_insert_page() "dst" parameter to migrate_vma_insert_page() is not used anymore. Link: https://lkml.kernel.org/r/CANubcdUwCAMuUyamG2dkWP=cqSR9MAS=tHLDc95kQkqU-rEnAg@mail.gmail.com Signed-off-by: Stephen Zhang Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d532e2e57e3c53ce74e519a07d7d2244482b7bd8 Author: Yang Shi Date: Mon Dec 14 19:13:16 2020 -0800 mm: migrate: return -ENOSYS if THP migration is unsupported In the current implementation unmap_and_move() would return -ENOMEM if THP migration is unsupported, then the THP will be split. If split is failed just exit without trying to migrate other pages. It doesn't make too much sense since there may be enough free memory to migrate other pages and there may be a lot base pages on the list. Return -ENOSYS to make consistent with hugetlb. And if THP split is failed just skip and try other pages on the list. Just skip the whole list and exit when free memory is really low. Link: https://lkml.kernel.org/r/20201113205359.556831-6-shy828301@gmail.com Signed-off-by: Yang Shi Cc: Jan Kara Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Song Liu Cc: Zi Yan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 236c32eb109696590b7428957eda50cc05e22af8 Author: Yang Shi Date: Mon Dec 14 19:13:13 2020 -0800 mm: migrate: clean up migrate_prep{_local} The migrate_prep{_local} never fails, so it is pointless to have return value and check the return value. Link: https://lkml.kernel.org/r/20201113205359.556831-5-shy828301@gmail.com Signed-off-by: Yang Shi Reviewed-by: Zi Yan Cc: Jan Kara Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Song Liu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c77c5cbafe549eb330e8909861a3e16cbda2c848 Author: Yang Shi Date: Mon Dec 14 19:13:09 2020 -0800 mm: migrate: skip shared exec THP for NUMA balancing The NUMA balancing skip shared exec base page. Since CONFIG_READ_ONLY_THP_FOR_FS was introduced, there are probably shared exec THP, so skip such THPs for NUMA balancing as well. And Willy's regular filesystem THP support patches could create shared exec THP wven without that config. In addition, the page_is_file_lru() is used to tell if the page is file cache or not, but it filters out shmem page. It sounds like a typical usecase by putting executables in shmem to achieve performance gain via using shmem-THP, so it sounds worth skipping migration for such case too. Link: https://lkml.kernel.org/r/20201113205359.556831-4-shy828301@gmail.com Signed-off-by: Yang Shi Cc: Matthew Wilcox Cc: Jan Kara Cc: Mel Gorman Cc: Michal Hocko Cc: Song Liu Cc: Zi Yan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dd4ae78a21fc05d91d841e499dddd057ad64a4df Author: Yang Shi Date: Mon Dec 14 19:13:06 2020 -0800 mm: migrate: simplify the logic for handling permanent failure When unmap_and_move{_huge_page}() returns !-EAGAIN and !MIGRATEPAGE_SUCCESS, the page would be put back to LRU or proper list if it is non-LRU movable page. But, the callers always call putback_movable_pages() to put the failed pages back later on, so it seems not very efficient to put every single page back immediately, and the code looks convoluted. Put the failed page on a separate list, then splice the list to migrate list when all pages are tried. It is the caller's responsibility to call putback_movable_pages() to handle failures. This also makes the code simpler and more readable. After the change the rules are: * Success: non hugetlb page will be freed, hugetlb page will be put back * -EAGAIN: stay on the from list * -ENOMEM: stay on the from list * Other errno: put on ret_pages list then splice to from list The from list would be empty iff all pages are migrated successfully, it was not so before. This has no impact to current existing callsites. Link: https://lkml.kernel.org/r/20201113205359.556831-3-shy828301@gmail.com Signed-off-by: Yang Shi Reviewed-by: Zi Yan Cc: Jan Kara Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Song Liu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d12b8951ad17cd845c7e674a839af84844954706 Author: Yang Shi Date: Mon Dec 14 19:13:02 2020 -0800 mm: truncate_complete_page() does not exist any more Patch series "mm: misc migrate cleanup and improvement", v3. This patch (of 5): The commit 9f4e41f4717832e ("mm: refactor truncate_complete_page()") refactored truncate_complete_page(), and it is not existed anymore, correct the comment in vmscan and migrate to avoid confusion. Link: https://lkml.kernel.org/r/20201113205359.556831-1-shy828301@gmail.com Link: https://lkml.kernel.org/r/20201113205359.556831-2-shy828301@gmail.com Signed-off-by: Yang Shi Reviewed-by: Jan Kara Cc: Michal Hocko Cc: Zi Yan Cc: Song Liu Cc: Mel Gorman Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0060ef3b4e6dd1410da164d48a595eadb2fb02f7 Author: Matthew Wilcox (Oracle) Date: Mon Dec 14 19:12:59 2020 -0800 mm: support THPs in zero_user_segments We can only kmap() one subpage of a THP at a time, so loop over all relevant subpages, skipping ones which don't need to be zeroed. This is too large to inline when THPs are enabled and we actually need highmem, so put it in highmem.c. [willy@infradead.org: start1 was allowed to be less than start2] Link: https://lkml.kernel.org/r/20201124041507.28996-1-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: Yang Shi Cc: Jan Kara Cc: Michal Hocko Cc: Zi Yan Cc: Song Liu Cc: Mel Gorman Cc: Naresh Kamboju Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5e5dda81a0dfb82de1757ab878d9ffd2339c9b2a Author: Ralph Campbell Date: Mon Dec 14 19:12:55 2020 -0800 mm/migrate.c: optimize migrate_vma_pages() mmu notifier When migrating a zero page or pte_none() anonymous page to device private memory, migrate_vma_setup() will initialize the src[] array with a NULL PFN. This lets the device driver allocate device private memory and clear it instead of DMAing a page of zeros over the device bus. Since the source page didn't exist at the time, no struct page was locked nor a migration PTE inserted into the CPU page tables. The actual PTE insertion happens in migrate_vma_pages() when it tries to insert the device private struct page PTE into the CPU page tables. migrate_vma_pages() has to call the mmu notifiers again since another device could fault on the same page before the page table locks are acquired. Allow device drivers to optimize the invalidation similar to migrate_vma_setup() by calling mmu_notifier_range_init() which sets struct mmu_notifier_range event type to MMU_NOTIFY_MIGRATE and the migrate_pgmap_owner field. Link: https://lkml.kernel.org/r/20201021191335.10916-1-rcampbell@nvidia.com Signed-off-by: Ralph Campbell Cc: Jerome Glisse Cc: John Hubbard Cc: Alistair Popple Cc: Christoph Hellwig Cc: Jason Gunthorpe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ab9dd4f8a1675b86b64a7d1f421c25182819f7a2 Author: Long Li Date: Mon Dec 14 19:12:52 2020 -0800 mm/migrate.c: fix comment spelling The word in the comment is misspelled, it should be "include". Link: https://lkml.kernel.org/r/20201024114144.GA20552@lilong Signed-off-by: Long Li Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 259b3633e78d627353d49b1eb226d72b2ac588da Author: Hui Su Date: Mon Dec 14 19:12:49 2020 -0800 mm/oom_kill: change comment and rename is_dump_unreclaim_slabs() Change the comment of is_dump_unreclaim_slabs(), it just check whether nr_unreclaimable slabs amount is greater than user memory, and explain why we dump unreclaim slabs. Rename it to should_dump_unreclaim_slab() maybe better. Link: https://lkml.kernel.org/r/20201030182704.GA53949@rlk Signed-off-by: Hui Su Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2271b016bf368d19d60531dd5ddd4375b4dae0ab Author: Hui Su Date: Mon Dec 14 19:12:46 2020 -0800 mm/compaction: make defer_compaction and compaction_deferred static defer_compaction() and compaction_deferred() and compaction_restarting() in mm/compaction.c won't be used in other files, so make them static, and remove the declaration in the header file. Take the chance to fix a typo. Link: https://lkml.kernel.org/r/20201123170801.GA9625@rlk Signed-off-by: Hui Su Acked-by: Vlastimil Babka Cc: Nitin Gupta Cc: Baoquan He Cc: Mateusz Nosek Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2b1a20c3afbc0279cbe57b0f19748081eba0881b Author: Hui Su Date: Mon Dec 14 19:12:42 2020 -0800 mm/compaction: move compaction_suitable's comment to right place Since commit 837d026d560c ("mm/compaction: more trace to understand when/why compaction start/finish"), the comment place is not suitable. So move compaction_suitable's comment to right place. Link: https://lkml.kernel.org/r/20201116144121.GA385717@rlk Signed-off-by: Hui Su Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 19d3cf9de1c72fd1adaa1d68aa40d74a35688404 Author: Yanfei Xu Date: Mon Dec 14 19:12:39 2020 -0800 mm/compaction: rename 'start_pfn' to 'iteration_start_pfn' in compact_zone() There are two 'start_pfn' declared in compact_zone() which have different meanings. Rename the second one to 'iteration_start_pfn' to prevent confusion. Also, remove an useless semicolon. Link: https://lkml.kernel.org/r/20201019115044.1571-1-yanfei.xu@windriver.com Signed-off-by: Yanfei Xu Acked-by: David Hildenbrand Acked-by: Vlastimil Babka Acked-by: Pankaj Gupta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 135f97fd0c398f20a544cc52c3f8a3cb925a8aef Author: Vitaly Wool Date: Mon Dec 14 19:12:36 2020 -0800 z3fold: remove preempt disabled sections for RT Replace get_cpu_ptr() with migrate_disable()+this_cpu_ptr() so RT can take spinlocks that become sleeping locks. Signed-off-by Mike Galbraith Link: https://lkml.kernel.org/r/20201209145151.18994-3-vitaly.wool@konsulko.com Signed-off-by: Vitaly Wool Cc: Sebastian Andrzej Siewior Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dcf5aedb24f899d537e21c18ea552c780598d352 Author: Vitaly Wool Date: Mon Dec 14 19:12:33 2020 -0800 z3fold: stricter locking and more careful reclaim Use temporary slots in reclaim function to avoid possible race when freeing those. While at it, make sure we check CLAIMED flag under page lock in the reclaim function to make sure we are not racing with z3fold_alloc(). Link: https://lkml.kernel.org/r/20201209145151.18994-4-vitaly.wool@konsulko.com Signed-off-by: Vitaly Wool Cc: Cc: Mike Galbraith Cc: Sebastian Andrzej Siewior Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fc5488651c7d840c9cad9b0f273f2f31bd03413a Author: Vitaly Wool Date: Mon Dec 14 19:12:30 2020 -0800 z3fold: simplify freeing slots Patch series "z3fold: stability / rt fixes". Address z3fold stability issues under stress load, primarily in the reclaim and free aspects. Besides, it fixes the locking problems that were only seen in real-time kernel configuration. This patch (of 3): There used to be two places in the code where slots could be freed, namely when freeing the last allocated handle from the slots and when releasing the z3fold header these slots aree linked to. The logic to decide on whether to free certain slots was complicated and error prone in both functions and it led to failures in RT case. To fix that, make free_handle() the single point of freeing slots. Link: https://lkml.kernel.org/r/20201209145151.18994-1-vitaly.wool@konsulko.com Link: https://lkml.kernel.org/r/20201209145151.18994-2-vitaly.wool@konsulko.com Signed-off-by: Vitaly Wool Tested-by: Mike Galbraith Cc: Sebastian Andrzej Siewior Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2484be0f88dc6c9670362d51f6a04f2da0626b50 Author: Muchun Song Date: Mon Dec 14 19:12:27 2020 -0800 mm/page_isolation: do not isolate the max order page A max order page has no buddy page and never merges to another order. So isolating and then freeing it is pointless. Link: https://lkml.kernel.org/r/20201202122114.75316-1-songmuchun@bytedance.com Fixes: 3c605096d315 ("mm/page_alloc: restrict max order of merging on isolated pageblock") Signed-off-by: Muchun Song Reviewed-by: Andrew Morton Acked-by: Vlastimil Babka Reviewed-by: David Hildenbrand Reviewed-by: Oscar Salvador Cc: Joonsoo Kim Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8d87d07c9283b45fd50f15d488368d0be6492a17 Author: logic.yu Date: Mon Dec 14 19:12:21 2020 -0800 mm/vmscan.c: remove the filename in the top of file comment No point in having the filename inside the file. Link: https://lkml.kernel.org/r/20201115141541.3878-1-hymmsx.yu@gmail.com Signed-off-by: logic.yu Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2b47a24cee0eedbb9b106ef3e992db0ddf48f740 Author: Lukas Bulwahn Date: Mon Dec 14 19:12:18 2020 -0800 mm/vmscan: drop unneeded assignment in kswapd() The refactoring to kswapd() in commit e716f2eb24de ("mm, vmscan: prevent kswapd sleeping prematurely due to mismatched classzone_idx") turned an assignment to reclaim_order into a dead store, as in all further paths, reclaim_order will be assigned again before it is used. make clang-analyzer on x86_64 tinyconfig caught my attention with: mm/vmscan.c: warning: Although the value stored to 'reclaim_order' is used in the enclosing expression, the value is never actually read from 'reclaim_order' [clang-analyzer-deadcode.DeadStores] Compilers will detect this unneeded assignment and optimize this anyway. So, the resulting binary is identical before and after this change. Simplify the code and remove unneeded assignment to make clang-analyzer happy. No functional change. No change in binary code. Link: https://lkml.kernel.org/r/20201004125827.17679-1-lukas.bulwahn@gmail.com Signed-off-by: Lukas Bulwahn Acked-by: Mel Gorman Cc: Vlastimil Babka Cc: Michal Hocko Cc: Nathan Chancellor Cc: Nick Desaulniers Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 597c892038e08098b17ccfe65afd9677e6979800 Author: Johannes Weiner Date: Mon Dec 14 19:12:15 2020 -0800 mm: don't wake kswapd prematurely when watermark boosting is disabled On 2-node NUMA hosts we see bursts of kswapd reclaim and subsequent pressure spikes and stalls from cache refaults while there is plenty of free memory in the system. Usually, kswapd is woken up when all eligible nodes in an allocation are full. But the code related to watermark boosting can wake kswapd on one full node while the other one is mostly empty. This may be justified to fight fragmentation, but is currently unconditionally done whether watermark boosting is occurring or not. In our case, many of our workloads' throughput scales with available memory, and pure utilization is a more tangible concern than trends around longer-term fragmentation. As a result we generally disable watermark boosting. Wake kswapd only woken when watermark boosting is requested. Link: https://lkml.kernel.org/r/20201020175833.397286-1-hannes@cmpxchg.org Fixes: 1c30844d2dfe ("mm: reclaim small amounts of memory when an external fragmentation event occurs") Signed-off-by: Johannes Weiner Acked-by: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7fc2513aa237e2ce239ab54d7b04d1d79b317110 Author: Dan Carpenter Date: Mon Dec 14 19:12:11 2020 -0800 hugetlb: fix an error code in hugetlb_reserve_pages() Preserve the error code from region_add() instead of returning success. Link: https://lkml.kernel.org/r/X9NGZWnZl5/Mt99R@mwanda Fixes: 0db9d74ed884 ("hugetlb: disable region_add file_region coalescing") Signed-off-by: Dan Carpenter Reviewed-by: Mike Kravetz Reviewed-by: David Hildenbrand Cc: Mina Almasry Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 39a0feaef1105d79028fac3078e3c67e137ce98d Author: Oscar Salvador Date: Mon Dec 14 19:12:08 2020 -0800 mm,hugetlb: remove unneeded initialization hugetlb_add_hstate initializes nr_huge_pages and free_huge_pages to 0, but since hstates[] is a global variable, all its fields are defined to 0 already. Link: https://lkml.kernel.org/r/20201119112141.6452-1-osalvador@suse.de Signed-off-by: Oscar Salvador Reviewed-by: Mike Kravetz Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0a4f3d1bb91cac4efdd780373638b6a1a4c24c51 Author: Liu Xiang Date: Mon Dec 14 19:12:05 2020 -0800 mm: hugetlb: fix type of delta parameter and related local variables in gather_surplus_pages() On 64-bit machine, delta variable in hugetlb_acct_memory() may be larger than 0xffffffff, but gather_surplus_pages() can only use the low 32-bit value now. So we need to fix type of delta parameter and related local variables in gather_surplus_pages(). Link: https://lkml.kernel.org/r/1605793733-3573-1-git-send-email-liu.xiang@zlingsmart.com Reported-by: Ma Chenggong Signed-off-by: Liu Xiang Signed-off-by: Pan Jiagen Reviewed-by: Mike Kravetz Cc: Liu Xiang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 336e6b53d99ae32ee35c1a7d3d0f99db22e1ff51 Author: Alex Shi Date: Mon Dec 14 19:12:01 2020 -0800 khugepaged: add parameter explanations for kernel-doc markup Add missed parameter explanation for some kernel-doc warnings: mm/khugepaged.c:102: warning: Function parameter or member 'nr_pte_mapped_thp' not described in 'mm_slot' mm/khugepaged.c:102: warning: Function parameter or member 'pte_mapped_thp' not described in 'mm_slot' mm/khugepaged.c:1424: warning: Function parameter or member 'mm' not described in 'collapse_pte_mapped_thp' mm/khugepaged.c:1424: warning: Function parameter or member 'addr' not described in 'collapse_pte_mapped_thp' mm/khugepaged.c:1626: warning: Function parameter or member 'mm' not described in 'collapse_file' mm/khugepaged.c:1626: warning: Function parameter or member 'file' not described in 'collapse_file' mm/khugepaged.c:1626: warning: Function parameter or member 'start' not described in 'collapse_file' mm/khugepaged.c:1626: warning: Function parameter or member 'hpage' not described in 'collapse_file' mm/khugepaged.c:1626: warning: Function parameter or member 'node' not described in 'collapse_file' Link: https://lkml.kernel.org/r/1605597325-25284-1-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Alex Shi Cc: Randy Dunlap Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ebfe1b8f6ea5d83d8c1aa18ddd8ede432a7414e7 Author: Ralph Campbell Date: Mon Dec 14 19:11:58 2020 -0800 include/linux/huge_mm.h: remove extern keyword The external function definitions don't need the "extern" keyword. Remove them so future changes don't copy the function definition style. Link: https://lkml.kernel.org/r/20201106235135.32109-1-rcampbell@nvidia.com Signed-off-by: Ralph Campbell Reviewed-by: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e5dfacebe4a47fc9e4dd25246ed3599d60122e38 Author: Hui Su Date: Mon Dec 14 19:11:55 2020 -0800 mm/hugetlb.c: just use put_page_testzero() instead of page_count() We test the page reference count is zero or not here, it can be a bug here if page refercence count is not zero. So we can just use put_page_testzero() instead of page_count(). Link: https://lkml.kernel.org/r/20201007170949.GA6416@rlk Signed-off-by: Hui Su Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3f4b815a439adfb8f238335612c4b28bc10084d8 Author: Oscar Salvador Date: Mon Dec 14 19:11:51 2020 -0800 mm,hwpoison: return -EBUSY when migration fails Currently, we return -EIO when we fail to migrate the page. Migrations' failures are rather transient as they can happen due to several reasons, e.g: high page refcount bump, mapping->migrate_page failing etc. All meaning that at that time the page could not be migrated, but that has nothing to do with an EIO error. Let us return -EBUSY instead, as we do in case we failed to isolate the page. While are it, let us remove the "ret" print as its value does not change. Link: https://lkml.kernel.org/r/20201209092818.30417-1-osalvador@suse.de Signed-off-by: Oscar Salvador Acked-by: Naoya Horiguchi Acked-by: Vlastimil Babka Cc: David Hildenbrand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1e8aaedb182d6ddffc894b832e4962629907b3e0 Author: Oscar Salvador Date: Mon Dec 14 19:11:48 2020 -0800 mm,memory_failure: always pin the page in madvise_inject_error madvise_inject_error() uses get_user_pages_fast to translate the address we specified to a page. After [1], we drop the extra reference count for memory_failure() path. That commit says that memory_failure wanted to keep the pin in order to take the page out of circulation. The truth is that we need to keep the page pinned, otherwise the page might be re-used after the put_page() and we can end up messing with someone else's memory. E.g: CPU0 process X CPU1 madvise_inject_error get_user_pages put_page page gets reclaimed process Y allocates the page memory_failure // We mess with process Y memory madvise() is meant to operate on a self address space, so messing with pages that do not belong to us seems the wrong thing to do. To avoid that, let us keep the page pinned for memory_failure as well. Pages for DAX mappings will release this extra refcount in memory_failure_dev_pagemap. [1] ("23e7b5c2e271: mm, madvise_inject_error: Let memory_failure() optionally take a page reference") Link: https://lkml.kernel.org/r/20201207094818.8518-1-osalvador@suse.de Fixes: 23e7b5c2e271 ("mm, madvise_inject_error: Let memory_failure() optionally take a page reference") Signed-off-by: Oscar Salvador Suggested-by: Vlastimil Babka Acked-by: Naoya Horiguchi Cc: Vlastimil Babka Cc: Dan Williams Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 47e431f43b5d879f04a2df645366ca007351ffff Author: Oscar Salvador Date: Mon Dec 14 19:11:45 2020 -0800 mm,hwpoison: remove drain_all_pages from shake_page get_hwpoison_page already drains pcplists, previously disabling them when trying to grab a refcount. We do not need shake_page to take care of it anymore. Link: https://lkml.kernel.org/r/20201204102558.31607-4-osalvador@suse.de Signed-off-by: Oscar Salvador Acked-by: Naoya Horiguchi Cc: Qian Cai Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2f7141600d67969f444c344481d4d9ce546d0114 Author: Oscar Salvador Date: Mon Dec 14 19:11:41 2020 -0800 mm,hwpoison: disable pcplists before grabbing a refcount Currently, we have a sort of retry mechanism to make sure pages in pcp-lists are spilled to the buddy system, so we can handle those. We can save us this extra checks with the new disable-pcplist mechanism that is available with [1]. zone_pcplist_disable makes sure to 1) disable pcplists, so any page that is freed up from that point onwards will end up in the buddy system and 2) drain pcplists, so those pages that already in pcplists are spilled to buddy. With that, we can make a common entry point for grabbing a refcount from both soft_offline and memory_failure paths that is guarded by zone_pcplist_disable/zone_pcplist_enable. [1] https://patchwork.kernel.org/project/linux-mm/cover/20201111092812.11329-1-vbabka@suse.cz/ Link: https://lkml.kernel.org/r/20201204102558.31607-3-osalvador@suse.de Signed-off-by: Oscar Salvador Acked-by: Naoya Horiguchi Acked-by: Vlastimil Babka Cc: Qian Cai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8295d535e2aa198bdf65a4045d622df38955ffe2 Author: Oscar Salvador Date: Mon Dec 14 19:11:38 2020 -0800 mm,hwpoison: refactor get_any_page Patch series "HWPoison: Refactor get page interface", v2. This patch (of 3): When we want to grab a refcount via get_any_page, we call __get_any_page that calls get_hwpoison_page to get the actual refcount. get_any_page() is only there because we have a sort of retry mechanism in case the page we met is unknown to us or if we raced with an allocation. Also __get_any_page() prints some messages about the page type in case the page was a free page or the page type was unknown, but if anything, we only need to print a message in case the pagetype was unknown, as that is reporting an error down the chain. Let us merge get_any_page() and __get_any_page(), and let the message be printed in soft_offline_page. While we are it, we can also remove the 'pfn' parameter as it is no longer used. Link: https://lkml.kernel.org/r/20201204102558.31607-1-osalvador@suse.de Link: https://lkml.kernel.org/r/20201204102558.31607-2-osalvador@suse.de Signed-off-by: Oscar Salvador Acked-by: Naoya Horiguchi Acked-by: Vlastimil Babka Cc: Qian Cai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 32409cba3f66810626c1c15b728c31968d6bfa92 Author: Oscar Salvador Date: Mon Dec 14 19:11:35 2020 -0800 mm,hwpoison: drop unneeded pcplist draining memory_failure and soft_offline_path paths now drain pcplists by calling get_hwpoison_page. memory_failure flags the page as HWPoison before, so that page cannot longer go into a pcplist, and soft_offline_page only flags a page as HWPoison if 1) we took the page off a buddy freelist 2) the page was in-use and we migrated it 3) was a clean pagecache. Because of that, a page cannot longer be poisoned and be in a pcplist. Link: https://lkml.kernel.org/r/20201013144447.6706-5-osalvador@suse.de Signed-off-by: Oscar Salvador Acked-by: Naoya Horiguchi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a8b2c2ce89d4e01062de69b89cafad97cd0fc01b Author: Oscar Salvador Date: Mon Dec 14 19:11:32 2020 -0800 mm,hwpoison: take free pages off the buddy freelists The crux of the matter is that historically we left poisoned pages in the buddy system because we have some checks in place when allocating a page that are gatekeeper for poisoned pages. Unfortunately, we do have other users (e.g: compaction [1]) that scan buddy freelists and try to get a page from there without checking whether the page is HWPoison. As I stated already, I think it is fundamentally wrong to keep HWPoison pages within the buddy systems, checks in place or not. Let us fix this the same way we did for soft_offline [2], taking the page off the buddy freelist so it is completely unreachable. Note that this is fairly simple to trigger, as we only need to poison free buddy pages (madvise MADV_HWPOISON) and then run some sort of memory stress system. Just for a matter of reference, I put a dump_page() in compaction_alloc() to trigger for HWPoison patches: page:0000000012b2982b refcount:1 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x1d5db flags: 0xfffffc0800000(hwpoison) raw: 000fffffc0800000 ffffea00007573c8 ffffc90000857de0 0000000000000000 raw: 0000000000000001 0000000000000000 00000001ffffffff 0000000000000000 page dumped because: compaction_alloc CPU: 4 PID: 123 Comm: kcompactd0 Tainted: G E 5.9.0-rc2-mm1-1-default+ #5 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.2-0-g5f4c7b1-prebuilt.qemu-project.org 04/01/2014 Call Trace: dump_stack+0x6d/0x8b compaction_alloc+0xb2/0xc0 migrate_pages+0x2a6/0x12a0 compact_zone+0x5eb/0x11c0 proactive_compact_node+0x89/0xf0 kcompactd+0x2d0/0x3a0 kthread+0x118/0x130 ret_from_fork+0x22/0x30 After that, if e.g: a process faults in the page, it will get killed unexpectedly. Fix it by containing the page immediatelly. Besides that, two more changes can be noticed: * MF_DELAYED no longer suits as we are fixing the issue by containing the page immediately, so it does no longer rely on the allocation-time checks to stop HWPoison to be handed over. gain unless it is unpoisoned, so we fixed the situation. Because of that, let us use MF_RECOVERED from now on. * The second block that handles PageBuddy pages is no longer needed: We call shake_page and then check whether the page is Buddy because shake_page calls drain_all_pages, which sends pcp-pages back to the buddy freelists, so we could have a chance to handle free pages. Currently, get_hwpoison_page already calls drain_all_pages, and we call get_hwpoison_page right before coming here, so we should be on the safe side. [1] https://lore.kernel.org/linux-mm/20190826104144.GA7849@linux/T/#u [2] https://patchwork.kernel.org/cover/11792607/ [osalvador@suse.de: take the poisoned subpage off the buddy frelists] Link: https://lkml.kernel.org/r/20201013144447.6706-4-osalvador@suse.de Link: https://lkml.kernel.org/r/20201013144447.6706-3-osalvador@suse.de Signed-off-by: Oscar Salvador Acked-by: Naoya Horiguchi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 17e395b60f5b3dea204fcae60c7b38e84a00d87a Author: Oscar Salvador Date: Mon Dec 14 19:11:28 2020 -0800 mm,hwpoison: drain pcplists before bailing out for non-buddy zero-refcount page Patch series "HWpoison: further fixes and cleanups", v5. This patchset includes some more fixes and a cleanup. Patch#2 and patch#3 are both fixes for taking a HWpoison page off a buddy freelist, since having them there has proved to be bad (see [1] and pathch#2's commit log). Patch#3 does the same for hugetlb pages. [1] https://lkml.org/lkml/2020/9/22/565 This patch (of 4): A page with 0-refcount and !PageBuddy could perfectly be a pcppage. Currently, we bail out with an error if we encounter such a page, meaning that we do not handle pcppages neither from hard-offline nor from soft-offline path. Fix this by draining pcplists whenever we find this kind of page and retry the check again. It might be that pcplists have been spilled into the buddy allocator and so we can handle it. Link: https://lkml.kernel.org/r/20201013144447.6706-1-osalvador@suse.de Link: https://lkml.kernel.org/r/20201013144447.6706-2-osalvador@suse.de Signed-off-by: Oscar Salvador Acked-by: Naoya Horiguchi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7ad69832f37e3cea8557db6df7c793905f1135e8 Author: Muchun Song Date: Mon Dec 14 19:11:25 2020 -0800 mm/page_alloc: speed up the iteration of max_order When we free a page whose order is very close to MAX_ORDER and greater than pageblock_order, it wastes some CPU cycles to increase max_order to MAX_ORDER one by one and check the pageblock migratetype of that page repeatedly especially when MAX_ORDER is much larger than pageblock_order. We also should not be checking migratetype of buddy when "order == MAX_ORDER - 1" as the buddy pfn may be invalid, so adjust the condition. With the new check, we don't need the max_order check anymore, so we replace it. Also adjust max_order initialization so that it's lower by one than previously, which makes the code hopefully more clear. Link: https://lkml.kernel.org/r/20201204155109.55451-1-songmuchun@bytedance.com Fixes: d9dddbf55667 ("mm/page_alloc: prevent merging between isolated and other pageblocks") Signed-off-by: Muchun Song Acked-by: Vlastimil Babka Reviewed-by: Oscar Salvador Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 470c61d70299b1826f56ff5fede10786798e3c14 Author: Lorenzo Stoakes Date: Mon Dec 14 19:11:22 2020 -0800 mm: page_alloc: refactor setup_per_zone_lowmem_reserve() setup_per_zone_lowmem_reserve() iterates through each zone setting zone->lowmem_reserve[j] = 0 (where j is the zone's index) then iterates backwards through all preceding zones, setting lower_zone->lowmem_reserve[j] = sum(managed pages of higher zones) / lowmem_reserve_ratio[idx] for each (where idx is the lower zone's index). If the lower zone has no managed pages or its ratio is 0 then all of its lowmem_reserve[] entries are effectively zeroed. As these arrays are only assigned here and all lowmem_reserve[] entries for index < this zone's index are implicitly assumed to be 0 (as these are specifically output in show_free_areas() and zoneinfo_show_print() for example) there is no need to additionally zero index == this zone's index too. This patch avoids zeroing unnecessarily. Rather than iterating through zones and setting lowmem_reserve[j] for each lower zone this patch reverse the process and populates each zone's lowmem_reserve[] values in ascending order. This clarifies what is going on especially in the case of zero managed pages or ratio which is now explicitly shown to clear these values. Link: https://lkml.kernel.org/r/20201129162758.115907-1-lstoakes@gmail.com Signed-off-by: Lorenzo Stoakes Cc: Baoquan He Cc: Michal Hocko Cc: Nicholas Piggin Cc: Vlastimil Babka Cc: Roman Gushchin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ba8f3587f55667c688acd7c5103c870983e294dd Author: Lin Feng Date: Mon Dec 14 19:11:19 2020 -0800 init/main: fix broken buffer_init when DEFERRED_STRUCT_PAGE_INIT set In the booting phase if CONFIG_DEFERRED_STRUCT_PAGE_INIT is set, we have following callchain: start_kernel ... mm_init mem_init memblock_free_all reset_all_zones_managed_pages free_low_memory_core_early ... buffer_init nr_free_buffer_pages zone->managed_pages ... rest_init kernel_init kernel_init_freeable page_alloc_init_late kthread_run(deferred_init_memmap, NODE_DATA(nid), "pgdatinit%d", nid); wait_for_completion(&pgdat_init_all_done_comp); ... files_maxfiles_init It's clear that buffer_init depends on zone->managed_pages, but it's reset in reset_all_zones_managed_pages after that pages are readded into zone->managed_pages, but when buffer_init runs this process is half done and most of them will finally be added till deferred_init_memmap done. In large memory couting of nr_free_buffer_pages drifts too much, also drifting from kernels to kernels on same hardware. Fix is simple, it delays buffer_init run till deferred_init_memmap all done. But as corrected by this patch, max_buffer_heads becomes very large, the value is roughly as many as 4 times of totalram_pages, formula: max_buffer_heads = nrpages * (10%) * (PAGE_SIZE / sizeof(struct buffer_head)); Say in a 64GB memory box we have 16777216 pages, then max_buffer_heads turns out to be roughly 67,108,864. In common cases, should a buffer_head be mapped to one page/block(4KB)? So max_buffer_heads never exceeds totalram_pages. IMO it's likely to make buffer_heads_over_limit bool value alwasy false, then make codes 'if (buffer_heads_over_limit)' test in vmscan unnecessary. So this patch will change the original behavior related to buffer_heads_over_limit in vmscan since we used a half done value of zone->managed_pages before, or should we use a smaller factor(<10%) in previous formula. akpm: I think this is OK - the max_buffer_heads code is only needed on highmem machines, to prevent ZONE_NORMAL from being consumed by large amounts of buffer_heads attached to highmem pagecache. This problem will not occur on 64-bit machines, so this feature's non-functionality on such machines is a feature, not a bug. Link: https://lkml.kernel.org/r/20201123110500.103523-1-linf@wangsu.com Signed-off-by: Lin Feng Acked-by: Vlastimil Babka Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 862b6dee20b0db2ebaa728c302a1b296ff144de3 Author: David Hildenbrand Date: Mon Dec 14 19:11:15 2020 -0800 mm/page_alloc: clear all pages in post_alloc_hook() with init_on_alloc=1 commit 6471384af2a6 ("mm: security: introduce init_on_alloc=1 and init_on_free=1 boot options") resulted with init_on_alloc=1 in all pages leaving the buddy via alloc_pages() and friends to be initialized/cleared/zeroed on allocation. However, the same logic is currently not applied to alloc_contig_pages(): allocated pages leaving the buddy aren't cleared with init_on_alloc=1 and init_on_free=0. Let's also properly clear pages on that allocation path. To achieve that, let's move clearing into post_alloc_hook(). This will not only affect alloc_contig_pages() allocations but also any pages used as migration target in compaction code via compaction_alloc(). While this sounds sub-optimal, it's the very same handling as when allocating migration targets via alloc_migration_target() - pages will get properly cleared with init_on_free=1. In case we ever want to optimize migration in that regard, we should tackle all such migration users - if we believe migration code can be fully trusted. With this change, we will see double clearing of pages in some cases. One example are gigantic pages (either allocated via CMA, or allocated dynamically via alloc_contig_pages()) - which is the right thing to do (and to be optimized outside of the buddy in the callers) as discussed in: https://lkml.kernel.org/r/20201019182853.7467-1-gpiccoli@canonical.com This change implies that with init_on_alloc=1 - All CMA allocations will be cleared - Gigantic pages allocated via alloc_contig_pages() will be cleared - virtio-mem memory to be unplugged will be cleared. While this is suboptimal, it's similar to memory balloon drivers handling, where all pages to be inflated will get cleared as well. - Pages isolated for compaction will be cleared Link: https://lkml.kernel.org/r/20201120180452.19071-1-david@redhat.com Signed-off-by: David Hildenbrand Acked-by: Vlastimil Babka Acked-by: Michal Hocko Cc: Alexander Potapenko Cc: Mike Kravetz Cc: Mike Rapoport Cc: Oscar Salvador Cc: Kees Cook Cc: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3b1f3658c71a0aea9c1a33879f904e2e4f3aba78 Author: Zou Wei Date: Mon Dec 14 19:11:12 2020 -0800 mm/page_alloc: mark some symbols with static keyword Fix the following sparse warnings: mm/page_alloc.c:3040:6: warning: symbol '__drain_all_pages' was not declared. Should it be static? mm/page_alloc.c:6349:6: warning: symbol '__zone_set_pageset_high_and_batch' was not declared. Should it be static? Link: https://lkml.kernel.org/r/1605517365-65858-1-git-send-email-zou_wei@huawei.com Signed-off-by: Zou Wei Acked-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7f194fbb2dd75e9346b305b8902e177b423b1062 Author: Matthew Wilcox (Oracle) Date: Mon Dec 14 19:11:09 2020 -0800 mm/page_alloc: add __free_pages() documentation Provide some guidance towards when this might not be the right interface to use. Link: https://lkml.kernel.org/r/20201027025523.3235-1-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: William Kucharski Acked-by: Vlastimil Babka Reviewed-by: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3b12da6d1d4adff087939c071e0d74a7857439a0 Author: Matthew Wilcox (Oracle) Date: Mon Dec 14 19:11:05 2020 -0800 mm/page-flags: fix comment We haven't had 'dontuse' flags since 2002. Replace this obsolete warning with a hopefully more useful one. Link: https://lkml.kernel.org/r/20201027025823.3704-1-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: William Kucharski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2ee08717da50160c20056f6d6b76afdf65db33ab Author: Miaohe Lin Date: Mon Dec 14 19:11:02 2020 -0800 include/linux/page-flags.h: remove unused __[Set|Clear]PagePrivate They are not used anymore. Link: https://lkml.kernel.org/r/20201009135914.64826-1-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ec6e8c7e03147c65380e6c04c4cf4290e96280b6 Author: Vlastimil Babka Date: Mon Dec 14 19:10:59 2020 -0800 mm, page_alloc: disable pcplists during memory offline Memory offlining relies on page isolation to guarantee a forward progress because pages cannot be reused while they are isolated. But the page isolation itself doesn't prevent from races while freed pages are stored on pcp lists and thus can be reused. This can be worked around by repeated draining of pcplists, as done by commit 968318261221 ("mm/memory_hotplug: drain per-cpu pages again during memory offline"). David and Michal would prefer that this race was closed in a way that callers of page isolation who need stronger guarantees don't need to repeatedly drain. David suggested disabling pcplists usage completely during page isolation, instead of repeatedly draining them. To achieve this without adding special cases in alloc/free fastpath, we can use the same approach as boot pagesets - when pcp->high is 0, any pcplist addition will be immediately flushed. The race can thus be closed by setting pcp->high to 0 and draining pcplists once, before calling start_isolate_page_range(). The draining will serialize after processes that already disabled interrupts and read the old value of pcp->high in free_unref_page_commit(), and processes that have not yet disabled interrupts, will observe pcp->high == 0 when they are rescheduled, and skip pcplists. This guarantees no stray pages on pcplists in zones where isolation happens. This patch thus adds zone_pcp_disable() and zone_pcp_enable() functions that page isolation users can call before start_isolate_page_range() and after unisolating (or offlining) the isolated pages. Also, drain_all_pages() is optimized to only execute on cpus where pcplists are not empty. The check can however race with a free to pcplist that has not yet increased the pcp->count from 0 to 1. Thus make the drain optionally skip the racy check and drain on all cpus, and use this option in zone_pcp_disable(). As we have to avoid external updates to high and batch while pcplists are disabled, we take pcp_batch_high_lock in zone_pcp_disable() and release it in zone_pcp_enable(). This also synchronizes multiple users of zone_pcp_disable()/enable(). Currently the only user of this functionality is offline_pages(). [vbabka@suse.cz: add comment, per David] Link: https://lkml.kernel.org/r/527480ef-ed72-e1c1-52a0-1c5b0113df45@suse.cz Link: https://lkml.kernel.org/r/20201111092812.11329-8-vbabka@suse.cz Signed-off-by: Vlastimil Babka Suggested-by: David Hildenbrand Suggested-by: Michal Hocko Reviewed-by: Oscar Salvador Reviewed-by: David Hildenbrand Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7612921f2376d51d020ae2f06ffb7da40422b75b Author: Vlastimil Babka Date: Mon Dec 14 19:10:56 2020 -0800 mm, page_alloc: move draining pcplists to page isolation users Currently, pcplists are drained during set_migratetype_isolate() which means once per pageblock processed start_isolate_page_range(). This is somewhat wasteful. Moreover, the callers might need different guarantees, and the draining is currently prone to races and does not guarantee that no page from isolated pageblock will end up on the pcplist after the drain. Better guarantees are added by later patches and require explicit actions by page isolation users that need them. Thus it makes sense to move the current imperfect draining to the callers also as a preparation step. Link: https://lkml.kernel.org/r/20201111092812.11329-7-vbabka@suse.cz Suggested-by: David Hildenbrand Suggested-by: Pavel Tatashin Signed-off-by: Vlastimil Babka Reviewed-by: David Hildenbrand Reviewed-by: Oscar Salvador Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 952eaf815925f106eb6b68346b3458a68bb18ec1 Author: Vlastimil Babka Date: Mon Dec 14 19:10:53 2020 -0800 mm, page_alloc: cache pageset high and batch in struct zone All per-cpu pagesets for a zone use the same high and batch values, that are duplicated there just for performance (locality) reasons. This patch adds the same variables also to struct zone as a shared copy. This will be useful later for making possible to disable pcplists temporarily by setting high value to 0, while remembering the values for restoring them later. But we can also immediately benefit from not updating pagesets of all possible cpus in case the newly recalculated values (after sysctl change or memory online/offline) are actually unchanged from the previous ones. Link: https://lkml.kernel.org/r/20201111092812.11329-6-vbabka@suse.cz Signed-off-by: Vlastimil Babka Reviewed-by: Oscar Salvador Acked-by: Michal Hocko Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5c3ad2eb7104754a36580079a2e4aed04a10631d Author: Vlastimil Babka Date: Mon Dec 14 19:10:50 2020 -0800 mm, page_alloc: simplify pageset_update() pageset_update() attempts to update pcplist's high and batch values in a way that readers don't observe batch > high. It uses smp_wmb() to order the updates in a way to achieve this. However, without proper pairing read barriers in readers this guarantee doesn't hold, and there are no such barriers in e.g. free_unref_page_commit(). Commit 88e8ac11d2ea ("mm, page_alloc: fix core hung in free_pcppages_bulk()") already showed this is problematic, and solved this by ultimately only trusing pcp->count of the current cpu with interrupts disabled. The update dance with unpaired write barriers thus makes no sense. Replace them with plain WRITE_ONCE to prevent store tearing, and document that the values can change asynchronously and should not be trusted for correctness. All current readers appear to be OK after 88e8ac11d2ea. Convert them to READ_ONCE to prevent unnecessary read tearing, but mainly to alert anybody making future changes to the code that special care is needed. Link: https://lkml.kernel.org/r/20201111092812.11329-5-vbabka@suse.cz Signed-off-by: Vlastimil Babka Reviewed-by: Oscar Salvador Acked-by: David Hildenbrand Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 69a8396a2647feac197497bd992f0a91da9fd801 Author: Vlastimil Babka Date: Mon Dec 14 19:10:47 2020 -0800 mm, page_alloc: remove setup_pageset() We initialize boot-time pagesets with setup_pageset(), which sets high and batch values that effectively disable pcplists. We can remove this wrapper if we just set these values for all pagesets in pageset_init(). Non-boot pagesets then subsequently update them to the proper values. No functional change. Link: https://lkml.kernel.org/r/20201111092812.11329-4-vbabka@suse.cz Signed-off-by: Vlastimil Babka Reviewed-by: David Hildenbrand Reviewed-by: Oscar Salvador Acked-by: Michal Hocko Acked-by: Pankaj Gupta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0a8b4f1d5bf4108cfd2877223bf125b1fa1dc4b1 Author: Vlastimil Babka Date: Mon Dec 14 19:10:43 2020 -0800 mm, page_alloc: calculate pageset high and batch once per zone We currently call pageset_set_high_and_batch() for each possible cpu, which repeats the same calculations of high and batch values. Instead call the function just once per zone, and make it apply the calculated values to all per-cpu pagesets of the zone. This also allows removing the zone_pageset_init() and __zone_pcp_update() wrappers. No functional change. Link: https://lkml.kernel.org/r/20201111092812.11329-3-vbabka@suse.cz Signed-off-by: Vlastimil Babka Reviewed-by: Oscar Salvador Reviewed-by: David Hildenbrand Acked-by: Michal Hocko Acked-by: Pankaj Gupta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7115ac6ef0b26017676e88a44a0b40c2d1d99299 Author: Vlastimil Babka Date: Mon Dec 14 19:10:40 2020 -0800 mm, page_alloc: clean up pageset high and batch update Patch series "disable pcplists during memory offline", v3. As per the discussions [1] [2] this is an attempt to implement David's suggestion that page isolation should disable pcplists to avoid races with page freeing in progress. This is done without extra checks in fast paths, as explained in Patch 9. The repeated draining done by [2] is then no longer needed. Previous version (RFC) is at [3]. The RFC tried to hide pcplists disabling/enabling into page isolation, but it wasn't completely possible, as memory offline does not unisolation. Michal suggested an explicit API in [4] so that's the current implementation and it seems indeed nicer. Once we accept that page isolation users need to do explicit actions around it depending on the needed guarantees, we can also IMHO accept that the current pcplist draining can be also done by the callers, which is more effective. After all, there are only two users of page isolation. So patch 6 does effectively the same thing as Pavel proposed in [5], and patch 7 implement stronger guarantees only for memory offline. If CMA decides to opt-in to the stronger guarantee, it can be added later. Patches 1-5 are preparatory cleanups for pcplist disabling. Patchset was briefly tested in QEMU so that memory online/offline works, but I haven't done a stress test that would prove the race fixed by [2] is eliminated. Note that patch 7 could be avoided if we instead adjusted page freeing in shown in [6], but I believe the current implementation of disabling pcplists is not too much complex, so I would prefer this instead of adding new checks and longer irq-disabled section into page freeing hotpaths. [1] https://lore.kernel.org/linux-mm/20200901124615.137200-1-pasha.tatashin@soleen.com/ [2] https://lore.kernel.org/linux-mm/20200903140032.380431-1-pasha.tatashin@soleen.com/ [3] https://lore.kernel.org/linux-mm/20200907163628.26495-1-vbabka@suse.cz/ [4] https://lore.kernel.org/linux-mm/20200909113647.GG7348@dhcp22.suse.cz/ [5] https://lore.kernel.org/linux-mm/20200904151448.100489-3-pasha.tatashin@soleen.com/ [6] https://lore.kernel.org/linux-mm/3d3b53db-aeaa-ff24-260b-36427fac9b1c@suse.cz/ [7] https://lore.kernel.org/linux-mm/20200922143712.12048-1-vbabka@suse.cz/ [8] https://lore.kernel.org/linux-mm/20201008114201.18824-1-vbabka@suse.cz/ This patch (of 7): The updates to pcplists' high and batch values are handled by multiple functions that make the calculations hard to follow. Consolidate everything to pageset_set_high_and_batch() and remove pageset_set_batch() and pageset_set_high() wrappers. The only special case using one of the removed wrappers was: build_all_zonelists_init() setup_pageset() pageset_set_batch() which was hardcoding batch as 0, so we can just open-code a call to pageset_update() with constant parameters instead. No functional change. Link: https://lkml.kernel.org/r/20201111092812.11329-1-vbabka@suse.cz Link: https://lkml.kernel.org/r/20201111092812.11329-2-vbabka@suse.cz Signed-off-by: Vlastimil Babka Reviewed-by: Oscar Salvador Reviewed-by: David Hildenbrand Acked-by: Michal Hocko Acked-by: Pankaj Gupta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 32a0de886eb3cb7e6990da27a9cdfa50baa8be64 Author: Mike Rapoport Date: Mon Dec 14 19:10:35 2020 -0800 arch, mm: make kernel_page_present() always available For architectures that enable ARCH_HAS_SET_MEMORY having the ability to verify that a page is mapped in the kernel direct map can be useful regardless of hibernation. Add RISC-V implementation of kernel_page_present(), update its forward declarations and stubs to be a part of set_memory API and remove ugly ifdefery in inlcude/linux/mm.h around current declarations of kernel_page_present(). Link: https://lkml.kernel.org/r/20201109192128.960-5-rppt@kernel.org Signed-off-by: Mike Rapoport Acked-by: Kirill A. Shutemov Cc: Albert Ou Cc: Andy Lutomirski Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Christoph Lameter Cc: Dave Hansen Cc: David Hildenbrand Cc: David Rientjes Cc: "David S. Miller" Cc: "Edgecombe, Rick P" Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Joonsoo Kim Cc: Len Brown Cc: Michael Ellerman Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Pavel Machek Cc: Pekka Enberg Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: "Rafael J. Wysocki" Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vlastimil Babka Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5d6ad668f31625c6aa9ed8dc3bdb29561d2b1144 Author: Mike Rapoport Date: Mon Dec 14 19:10:30 2020 -0800 arch, mm: restore dependency of __kernel_map_pages() on DEBUG_PAGEALLOC The design of DEBUG_PAGEALLOC presumes that __kernel_map_pages() must never fail. With this assumption is wouldn't be safe to allow general usage of this function. Moreover, some architectures that implement __kernel_map_pages() have this function guarded by #ifdef DEBUG_PAGEALLOC and some refuse to map/unmap pages when page allocation debugging is disabled at runtime. As all the users of __kernel_map_pages() were converted to use debug_pagealloc_map_pages() it is safe to make it available only when DEBUG_PAGEALLOC is set. Link: https://lkml.kernel.org/r/20201109192128.960-4-rppt@kernel.org Signed-off-by: Mike Rapoport Acked-by: David Hildenbrand Acked-by: Kirill A. Shutemov Cc: Albert Ou Cc: Andy Lutomirski Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Christoph Lameter Cc: Dave Hansen Cc: David Rientjes Cc: "David S. Miller" Cc: "Edgecombe, Rick P" Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Joonsoo Kim Cc: Len Brown Cc: Michael Ellerman Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Pavel Machek Cc: Pekka Enberg Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: "Rafael J. Wysocki" Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vlastimil Babka Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2abf962a8d42b32f5ffeb827826290b799c85f86 Author: Mike Rapoport Date: Mon Dec 14 19:10:25 2020 -0800 PM: hibernate: make direct map manipulations more explicit When DEBUG_PAGEALLOC or ARCH_HAS_SET_DIRECT_MAP is enabled a page may be not present in the direct map and has to be explicitly mapped before it could be copied. Introduce hibernate_map_page() and hibernation_unmap_page() that will explicitly use set_direct_map_{default,invalid}_noflush() for ARCH_HAS_SET_DIRECT_MAP case and debug_pagealloc_{map,unmap}_pages() for DEBUG_PAGEALLOC case. The remapping of the pages in safe_copy_page() presumes that it only changes protection bits in an existing PTE and so it is safe to ignore return value of set_direct_map_{default,invalid}_noflush(). Still, add a pr_warn() so that future changes in set_memory APIs will not silently break hibernation. Link: https://lkml.kernel.org/r/20201109192128.960-3-rppt@kernel.org Signed-off-by: Mike Rapoport Acked-by: Rafael J. Wysocki Reviewed-by: David Hildenbrand Acked-by: Kirill A. Shutemov Acked-by: Vlastimil Babka Cc: Albert Ou Cc: Andy Lutomirski Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Christoph Lameter Cc: Dave Hansen Cc: David Rientjes Cc: "David S. Miller" Cc: "Edgecombe, Rick P" Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Joonsoo Kim Cc: Len Brown Cc: Michael Ellerman Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Pavel Machek Cc: Pekka Enberg Cc: Peter Zijlstra Cc: "Rafael J. Wysocki" Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 77bc7fd607dee2ffb28daff6d0dd8ae42af61ea8 Author: Mike Rapoport Date: Mon Dec 14 19:10:20 2020 -0800 mm: introduce debug_pagealloc_{map,unmap}_pages() helpers Patch series "arch, mm: improve robustness of direct map manipulation", v7. During recent discussion about KVM protected memory, David raised a concern about usage of __kernel_map_pages() outside of DEBUG_PAGEALLOC scope [1]. Indeed, for architectures that define CONFIG_ARCH_HAS_SET_DIRECT_MAP it is possible that __kernel_map_pages() would fail, but since this function is void, the failure will go unnoticed. Moreover, there's lack of consistency of __kernel_map_pages() semantics across architectures as some guard this function with #ifdef DEBUG_PAGEALLOC, some refuse to update the direct map if page allocation debugging is disabled at run time and some allow modifying the direct map regardless of DEBUG_PAGEALLOC settings. This set straightens this out by restoring dependency of __kernel_map_pages() on DEBUG_PAGEALLOC and updating the call sites accordingly. Since currently the only user of __kernel_map_pages() outside DEBUG_PAGEALLOC is hibernation, it is updated to make direct map accesses there more explicit. [1] https://lore.kernel.org/lkml/2759b4bf-e1e3-d006-7d86-78a40348269d@redhat.com This patch (of 4): When CONFIG_DEBUG_PAGEALLOC is enabled, it unmaps pages from the kernel direct mapping after free_pages(). The pages than need to be mapped back before they could be used. Theese mapping operations use __kernel_map_pages() guarded with with debug_pagealloc_enabled(). The only place that calls __kernel_map_pages() without checking whether DEBUG_PAGEALLOC is enabled is the hibernation code that presumes availability of this function when ARCH_HAS_SET_DIRECT_MAP is set. Still, on arm64, __kernel_map_pages() will bail out when DEBUG_PAGEALLOC is not enabled but set_direct_map_invalid_noflush() may render some pages not present in the direct map and hibernation code won't be able to save such pages. To make page allocation debugging and hibernation interaction more robust, the dependency on DEBUG_PAGEALLOC or ARCH_HAS_SET_DIRECT_MAP has to be made more explicit. Start with combining the guard condition and the call to __kernel_map_pages() into debug_pagealloc_map_pages() and debug_pagealloc_unmap_pages() functions to emphasize that __kernel_map_pages() should not be called without DEBUG_PAGEALLOC and use these new functions to map/unmap pages when page allocation debugging is enabled. Link: https://lkml.kernel.org/r/20201109192128.960-1-rppt@kernel.org Link: https://lkml.kernel.org/r/20201109192128.960-2-rppt@kernel.org Signed-off-by: Mike Rapoport Reviewed-by: David Hildenbrand Acked-by: Kirill A. Shutemov Acked-by: Vlastimil Babka Cc: Albert Ou Cc: Andy Lutomirski Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Christoph Lameter Cc: "David S. Miller" Cc: Dave Hansen Cc: David Rientjes Cc: "Edgecombe, Rick P" Cc: "H. Peter Anvin" Cc: Heiko Carstens Cc: Ingo Molnar Cc: Joonsoo Kim Cc: Len Brown Cc: Michael Ellerman Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Pavel Machek Cc: Pekka Enberg Cc: Peter Zijlstra Cc: "Rafael J. Wysocki" Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Will Deacon Cc: Rafael J. Wysocki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fcd353a314213534d04193eea0bc54c4b7a3e1b0 Author: Mike Rapoport Date: Mon Dec 14 19:10:15 2020 -0800 m68k: deprecate DISCONTIGMEM DISCONTIGMEM was intended to provide more efficient support for systems with holes in their physical address space that FLATMEM did. Yet, it's overhead in terms of the memory consumption seems to overweight the savings on the unused memory map. For a ARAnyM system with 16 MBytes of FastRAM configured, the memory usage reported after page allocator initialization is Memory: 23828K/30720K available (3206K kernel code, 535K rwdata, 936K rodata, 768K init, 193K bss, 6892K reserved, 0K cma-reserved) and with DISCONTIGMEM disabled and with relatively large hole in the memory map it is: Memory: 23864K/30720K available (3197K kernel code, 516K rwdata, 936K rodata, 764K init, 179K bss, 6856K reserved, 0K cma-reserved) Moreover, since m68k already has custom pfn_valid() it is possible to define HAVE_ARCH_PFN_VALID to enable freeing of unused memory map. The minimal size of a hole that can be freed should not be less than MAX_ORDER_NR_PAGES so to achieve more substantial memory savings let m68k also define custom FORCE_MAX_ZONEORDER. With FORCE_MAX_ZONEORDER set to 9 memory usage becomes: Memory: 23880K/30720K available (3197K kernel code, 516K rwdata, 936K rodata, 764K init, 179K bss, 6840K reserved, 0K cma-reserved) Link: https://lkml.kernel.org/r/20201101170454.9567-14-rppt@kernel.org Signed-off-by: Mike Rapoport Cc: Alexey Dobriyan Cc: Catalin Marinas Cc: Geert Uytterhoeven Cc: Greg Ungerer Cc: John Paul Adrian Glaubitz Cc: Jonathan Corbet Cc: Matt Turner Cc: Meelis Roos Cc: Michael Schmitz Cc: Russell King Cc: Tony Luck Cc: Vineet Gupta Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4bfc848e0981fcd35db00fe1c6581560689f6dc7 Author: Mike Rapoport Date: Mon Dec 14 19:10:11 2020 -0800 m68k/mm: enable use of generic memory_model.h for !DISCONTIGMEM The pg_data_map and pg_data_table arrays as well as page_to_pfn() and pfn_to_page() are required only for DISCONTIGMEM. Other memory models can use the generic definitions in asm-generic/memory_model.h. Link: https://lkml.kernel.org/r/20201101170454.9567-13-rppt@kernel.org Signed-off-by: Mike Rapoport Cc: Alexey Dobriyan Cc: Catalin Marinas Cc: Geert Uytterhoeven Cc: Greg Ungerer Cc: John Paul Adrian Glaubitz Cc: Jonathan Corbet Cc: Matt Turner Cc: Meelis Roos Cc: Michael Schmitz Cc: Russell King Cc: Tony Luck Cc: Vineet Gupta Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6b2ad8d763727b887d85c990747271ee804d9abb Author: Mike Rapoport Date: Mon Dec 14 19:10:07 2020 -0800 m68k/mm: make node data and node setup depend on CONFIG_DISCONTIGMEM The pg_data_t node structures and their initialization currently depends on !CONFIG_SINGLE_MEMORY_CHUNK. Since they are required only for DISCONTIGMEM make this dependency explicit and replace usage of CONFIG_SINGLE_MEMORY_CHUNK with CONFIG_DISCONTIGMEM where appropriate. The CONFIG_SINGLE_MEMORY_CHUNK was implicitly disabled on the ColdFire MMU variant, although it always presumed a single memory bank. As there is no actual need for DISCONTIGMEM in this case, make sure that ColdFire MMU systems set CONFIG_SINGLE_MEMORY_CHUNK to 'y'. Link: https://lkml.kernel.org/r/20201101170454.9567-12-rppt@kernel.org Signed-off-by: Mike Rapoport Cc: Alexey Dobriyan Cc: Catalin Marinas Cc: Geert Uytterhoeven Cc: Greg Ungerer Cc: John Paul Adrian Glaubitz Cc: Jonathan Corbet Cc: Matt Turner Cc: Meelis Roos Cc: Michael Schmitz Cc: Russell King Cc: Tony Luck Cc: Vineet Gupta Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 050b2da268f8fc4f8123f6462c430a61547b2f7b Author: Mike Rapoport Date: Mon Dec 14 19:10:04 2020 -0800 arc: use FLATMEM with freeing of unused memory map instead of DISCONTIGMEM Currently ARC uses DISCONTIGMEM to cope with sparse physical memory address space on systems with 2 memory banks. While DISCONTIGMEM avoids wasting memory on unpopulated memory map, it adds both memory and CPU overhead relatively to FLATMEM. Moreover, DISCONTINGMEM is generally considered deprecated. The obvious replacement for DISCONTIGMEM would be SPARSEMEM, but it is also less efficient than FLATMEM in pfn_to_page() and page_to_pfn() conversions. Besides it requires tuning of SECTION_SIZE which is not trivial for possible ARC memory configuration. Since the memory map for both banks is always allocated from the "lowmem" bank, it is possible to use FLATMEM for two-bank configuration and simply free the unused hole in the memory map. All is required for that is to provide ARC-specific pfn_valid() that will take into account actual physical memory configuration and define HAVE_ARCH_PFN_VALID. The resulting kernel image configured with defconfig + HIGHMEM=y is smaller: $ size a/vmlinux b/vmlinux text data bss dec hex filename 4673503 1245456 279756 6198715 5e95bb a/vmlinux 4658706 1246864 279756 6185326 5e616e b/vmlinux $ ./scripts/bloat-o-meter a/vmlinux b/vmlinux add/remove: 28/30 grow/shrink: 42/399 up/down: 10986/-29025 (-18039) ... Total: Before=4709315, After = 4691276, chg -0.38% Booting nSIM with haps_ns.dts results in the following memory usage reports: a: Memory: 1559104K/1572864K available (3531K kernel code, 595K rwdata, 752K rodata, 136K init, 275K bss, 13760K reserved, 0K cma-reserved, 1048576K highmem) b: Memory: 1559112K/1572864K available (3519K kernel code, 594K rwdata, 752K rodata, 136K init, 280K bss, 13752K reserved, 0K cma-reserved, 1048576K highmem) Link: https://lkml.kernel.org/r/20201101170454.9567-11-rppt@kernel.org Signed-off-by: Mike Rapoport Cc: Alexey Dobriyan Cc: Catalin Marinas Cc: Geert Uytterhoeven Cc: Greg Ungerer Cc: John Paul Adrian Glaubitz Cc: Jonathan Corbet Cc: Matt Turner Cc: Meelis Roos Cc: Michael Schmitz Cc: Russell King Cc: Tony Luck Cc: Vineet Gupta Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4f5b0c1789963477cc9a4d45b4b62d694665cceb Author: Mike Rapoport Date: Mon Dec 14 19:09:59 2020 -0800 arm, arm64: move free_unused_memmap() to generic mm ARM and ARM64 free unused parts of the memory map just before the initialization of the page allocator. To allow holes in the memory map both architectures overload pfn_valid() and define HAVE_ARCH_PFN_VALID. Allowing holes in the memory map for FLATMEM may be useful for small machines, such as ARC and m68k and will enable those architectures to cease using DISCONTIGMEM and still support more than one memory bank. Move the functions that free unused memory map to generic mm and enable them in case HAVE_ARCH_PFN_VALID=y. Link: https://lkml.kernel.org/r/20201101170454.9567-10-rppt@kernel.org Signed-off-by: Mike Rapoport Acked-by: Catalin Marinas [arm64] Cc: Alexey Dobriyan Cc: Geert Uytterhoeven Cc: Greg Ungerer Cc: John Paul Adrian Glaubitz Cc: Jonathan Corbet Cc: Matt Turner Cc: Meelis Roos Cc: Michael Schmitz Cc: Russell King Cc: Tony Luck Cc: Vineet Gupta Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5e545df3292fbd3d5963c68980f1527ead2a2b3f Author: Mike Rapoport Date: Mon Dec 14 19:09:55 2020 -0800 arm: remove CONFIG_ARCH_HAS_HOLES_MEMORYMODEL ARM is the only architecture that defines CONFIG_ARCH_HAS_HOLES_MEMORYMODEL which in turn enables memmap_valid_within() function that is intended to verify existence of struct page associated with a pfn when there are holes in the memory map. However, the ARCH_HAS_HOLES_MEMORYMODEL also enables HAVE_ARCH_PFN_VALID and arch-specific pfn_valid() implementation that also deals with the holes in the memory map. The only two users of memmap_valid_within() call this function after a call to pfn_valid() so the memmap_valid_within() check becomes redundant. Remove CONFIG_ARCH_HAS_HOLES_MEMORYMODEL and memmap_valid_within() and rely entirely on ARM's implementation of pfn_valid() that is now enabled unconditionally. Link: https://lkml.kernel.org/r/20201101170454.9567-9-rppt@kernel.org Signed-off-by: Mike Rapoport Cc: Alexey Dobriyan Cc: Catalin Marinas Cc: Geert Uytterhoeven Cc: Greg Ungerer Cc: John Paul Adrian Glaubitz Cc: Jonathan Corbet Cc: Matt Turner Cc: Meelis Roos Cc: Michael Schmitz Cc: Russell King Cc: Tony Luck Cc: Vineet Gupta Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 214496cb18700fd7c5206ac33768876dbf68b4df Author: Mike Rapoport Date: Mon Dec 14 19:09:51 2020 -0800 ia64: make SPARSEMEM default and disable DISCONTIGMEM SPARSEMEM memory model suitable for systems with large holes in their phyiscal memory layout. With SPARSEMEM_VMEMMAP enabled it provides pfn_to_page() and page_to_pfn() as fast as FLATMEM. Make it the default memory model for IA-64 and disable DISCONTIGMEM which is considered obsolete for quite some time. Link: https://lkml.kernel.org/r/20201101170454.9567-8-rppt@kernel.org Signed-off-by: Mike Rapoport Cc: Alexey Dobriyan Cc: Catalin Marinas Cc: Geert Uytterhoeven Cc: Greg Ungerer Cc: John Paul Adrian Glaubitz Cc: Jonathan Corbet Cc: Matt Turner Cc: Meelis Roos Cc: Michael Schmitz Cc: Russell King Cc: Tony Luck Cc: Vineet Gupta Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ea34f78f3df62e531cf2beca997ff6bfae2b1e0d Author: Mike Rapoport Date: Mon Dec 14 19:09:47 2020 -0800 ia64: forbid using VIRTUAL_MEM_MAP with FLATMEM Virtual memory map was intended to avoid wasting memory on the memory map on systems with large holes in the physical memory layout. Long ago it been superseded first by DISCONTIGMEM and then by SPARSEMEM. Moreover, SPARSEMEM_VMEMMAP provide the same functionality in much more portable way. As the first step to removing the VIRTUAL_MEM_MAP forbid it's usage with FLATMEM and panic on systems with large holes in the physical memory layout that try to run FLATMEM kernels. Link: https://lkml.kernel.org/r/20201101170454.9567-7-rppt@kernel.org Signed-off-by: Mike Rapoport Cc: Alexey Dobriyan Cc: Catalin Marinas Cc: Geert Uytterhoeven Cc: Greg Ungerer Cc: John Paul Adrian Glaubitz Cc: Jonathan Corbet Cc: Matt Turner Cc: Meelis Roos Cc: Michael Schmitz Cc: Russell King Cc: Tony Luck Cc: Vineet Gupta Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1f112129975e7a47324ba71b00e8e2c962177843 Author: Mike Rapoport Date: Mon Dec 14 19:09:43 2020 -0800 ia64: split virtual map initialization out of paging_init() For both FLATMEM and DISCONTIGMEM/SPARSEMEM the virtual map initialization is spread over paging_init() for no good reason. Split out the bits related to virtual map initialization to a helper functions, one for FLATMEM and another for !FLATMEM configurations. Link: https://lkml.kernel.org/r/20201101170454.9567-6-rppt@kernel.org Signed-off-by: Mike Rapoport Cc: Alexey Dobriyan Cc: Catalin Marinas Cc: Geert Uytterhoeven Cc: Greg Ungerer Cc: John Paul Adrian Glaubitz Cc: Jonathan Corbet Cc: Matt Turner Cc: Meelis Roos Cc: Michael Schmitz Cc: Russell King Cc: Tony Luck Cc: Vineet Gupta Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b90b5547685ffe2b30522b81a1c9f6c35e1152de Author: Mike Rapoport Date: Mon Dec 14 19:09:39 2020 -0800 ia64: discontig: paging_init(): remove local max_pfn calculation The maximal PFN in the system is calculated during find_memory() time and it is stored at max_low_pfn then. Use this value in paging_init() and remove the redundant detection of max_pfn in that function. Link: https://lkml.kernel.org/r/20201101170454.9567-5-rppt@kernel.org Signed-off-by: Mike Rapoport Cc: Alexey Dobriyan Cc: Catalin Marinas Cc: Geert Uytterhoeven Cc: Greg Ungerer Cc: John Paul Adrian Glaubitz Cc: Jonathan Corbet Cc: Matt Turner Cc: Meelis Roos Cc: Michael Schmitz Cc: Russell King Cc: Tony Luck Cc: Vineet Gupta Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5d37fc0b087fb276a257034c5a1dfdbfaa08be66 Author: Mike Rapoport Date: Mon Dec 14 19:09:36 2020 -0800 ia64: remove 'ifdef CONFIG_ZONE_DMA32' statements After the removal of SN2 platform (commit cf07cb1ff4ea ("ia64: remove support for the SGI SN2 platform") IA-64 always has ZONE_DMA32 and there is no point to guard code with this configuration option. Remove ifdefery associated with CONFIG_ZONE_DMA32 Link: https://lkml.kernel.org/r/20201101170454.9567-4-rppt@kernel.org Signed-off-by: Mike Rapoport Cc: Alexey Dobriyan Cc: Catalin Marinas Cc: Geert Uytterhoeven Cc: Greg Ungerer Cc: John Paul Adrian Glaubitz Cc: Jonathan Corbet Cc: Matt Turner Cc: Meelis Roos Cc: Michael Schmitz Cc: Russell King Cc: Tony Luck Cc: Vineet Gupta Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 03e92a5e097d679acbd1fb4d2ae238a38158aa0b Author: Mike Rapoport Date: Mon Dec 14 19:09:32 2020 -0800 ia64: remove custom __early_pfn_to_nid() The ia64 implementation of __early_pfn_to_nid() essentially relies on the same data as the generic implementation. The correspondence between memory ranges and nodes is set in memblock during early memory initialization in register_active_ranges() function. The initialization of sparsemem that requires early_pfn_to_nid() happens later and it can use the memblock information like the other architectures. Link: https://lkml.kernel.org/r/20201101170454.9567-3-rppt@kernel.org Signed-off-by: Mike Rapoport Cc: Alexey Dobriyan Cc: Catalin Marinas Cc: Geert Uytterhoeven Cc: Greg Ungerer Cc: John Paul Adrian Glaubitz Cc: Jonathan Corbet Cc: Matt Turner Cc: Meelis Roos Cc: Michael Schmitz Cc: Russell King Cc: Tony Luck Cc: Vineet Gupta Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 36d40290c8f71daf1ba5567ab14574f36b9b8d6a Author: Mike Rapoport Date: Mon Dec 14 19:09:28 2020 -0800 alpha: switch from DISCONTIGMEM to SPARSEMEM Patch series "arch, mm: deprecate DISCONTIGMEM", v2. It's been a while since DISCONTIGMEM is generally considered deprecated, but it is still used by four architectures. This set replaces DISCONTIGMEM with a different way to handle holes in the memory map and marks DISCONTIGMEM configuration as BROKEN in Kconfigs of these architectures with the intention to completely remove it in several releases. While for 64-bit alpha and ia64 the switch to SPARSEMEM is quite obvious and was a matter of moving some bits around, for smaller 32-bit arc and m68k SPARSEMEM is not necessarily the best thing to do. On 32-bit machines SPARSEMEM would require large sections to make section index fit in the page flags, but larger sections mean that more memory is wasted for unused memory map. Besides, pfn_to_page() and page_to_pfn() become less efficient, at least on arc. So I've decided to generalize arm's approach for freeing of unused parts of the memory map with FLATMEM and enable it for both arc and m68k. The details are in the description of patches 10 (arc) and 13 (m68k). This patch (of 13): Enable SPARSEMEM support on alpha and deprecate DISCONTIGMEM. The required changes are mostly around moving duplicated definitions of page access and address conversion macros to a common place and making sure they are available for all memory models. The DISCONTINGMEM support is marked as BROKEN an will be removed in a couple of releases. Link: https://lkml.kernel.org/r/20201101170454.9567-1-rppt@kernel.org Link: https://lkml.kernel.org/r/20201101170454.9567-2-rppt@kernel.org Signed-off-by: Mike Rapoport Cc: Alexey Dobriyan Cc: Catalin Marinas Cc: Geert Uytterhoeven Cc: Greg Ungerer Cc: John Paul Adrian Glaubitz Cc: Jonathan Corbet Cc: Matt Turner Cc: Meelis Roos Cc: Michael Schmitz Cc: Russell King Cc: Tony Luck Cc: Vineet Gupta Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6d5a88cd0c1506115d71a4d3a26b60645c89df6c Author: Marco Elver Date: Mon Dec 14 19:09:24 2020 -0800 lkdtm: disable KASAN for rodata.o Building lkdtm with KASAN and Clang 11 or later results in the following error when attempting to load the module: kernel tried to execute NX-protected page - exploit attempt? (uid: 0) BUG: unable to handle page fault for address: ffffffffc019cd70 #PF: supervisor instruction fetch in kernel mode #PF: error_code(0x0011) - permissions violation ... RIP: 0010:asan.module_ctor+0x0/0xffffffffffffa290 [lkdtm] ... Call Trace: do_init_module+0x17c/0x570 load_module+0xadee/0xd0b0 __x64_sys_finit_module+0x16c/0x1a0 do_syscall_64+0x34/0x50 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The reason is that rodata.o generates a dummy function that lives in .rodata to validate that .rodata can't be executed; however, Clang 11 adds KASAN globals support by generating module constructors to initialize globals redzones. When Clang 11 adds a module constructor to rodata.o, it is also added to .rodata: any attempt to call it on initialization results in the above error. Therefore, disable KASAN instrumentation for rodata.o. Link: https://lkml.kernel.org/r/20201214191413.3164796-1-elver@google.com Signed-off-by: Marco Elver Cc: Kees Cook Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: Andrey Konovalov Cc: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4784be284adaa516df4144fc919f9bde8200443a Author: Walter Wu Date: Mon Dec 14 19:09:21 2020 -0800 kasan: update documentation for generic kasan Generic KASAN also supports to record the last two workqueue stacks and print them in KASAN report. So that need to update documentation. Link: https://lkml.kernel.org/r/20201203023037.30792-1-walter-zh.wu@mediatek.com Signed-off-by: Walter Wu Suggested-by: Marco Elver Acked-by: Marco Elver Reviewed-by: Dmitry Vyukov Reviewed-by: Andrey Konovalov Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Jonathan Corbet Cc: Lai Jiangshan Cc: Matthias Brugger Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 214c783d593bdb83cc7e3bd9df9c6fe206d82e1c Author: Walter Wu Date: Mon Dec 14 19:09:17 2020 -0800 lib/test_kasan.c: add workqueue test case Adds a test to verify workqueue stack recording and print it in KASAN report. The KASAN report was as follows(cleaned up slightly): BUG: KASAN: use-after-free in kasan_workqueue_uaf Freed by task 54: kasan_save_stack+0x24/0x50 kasan_set_track+0x24/0x38 kasan_set_free_info+0x20/0x40 __kasan_slab_free+0x10c/0x170 kasan_slab_free+0x10/0x18 kfree+0x98/0x270 kasan_workqueue_work+0xc/0x18 Last potentially related work creation: kasan_save_stack+0x24/0x50 kasan_record_wq_stack+0xa8/0xb8 insert_work+0x48/0x288 __queue_work+0x3e8/0xc40 queue_work_on+0xf4/0x118 kasan_workqueue_uaf+0xfc/0x190 Link: https://lkml.kernel.org/r/20201203022748.30681-1-walter-zh.wu@mediatek.com Signed-off-by: Walter Wu Acked-by: Marco Elver Reviewed-by: Dmitry Vyukov Reviewed-by: Andrey Konovalov Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Matthias Brugger Cc: Jonathan Corbet Cc: Lai Jiangshan Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ef13346123fa7bef3cf62e9bf1efe9d7b274fa20 Author: Walter Wu Date: Mon Dec 14 19:09:13 2020 -0800 kasan: print workqueue stack The aux_stack[2] is reused to record the call_rcu() call stack and enqueuing work call stacks. So that we need to change the auxiliary stack title for common title, print them in KASAN report. Link: https://lkml.kernel.org/r/20201203022715.30635-1-walter-zh.wu@mediatek.com Signed-off-by: Walter Wu Suggested-by: Marco Elver Acked-by: Marco Elver Reviewed-by: Dmitry Vyukov Reviewed-by: Andrey Konovalov Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Jonathan Corbet Cc: Lai Jiangshan Cc: Matthias Brugger Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e89a85d63fb2e187f5afcbf83c12743132596563 Author: Walter Wu Date: Mon Dec 14 19:09:09 2020 -0800 workqueue: kasan: record workqueue stack Patch series "kasan: add workqueue stack for generic KASAN", v5. Syzbot reports many UAF issues for workqueue, see [1]. In some of these access/allocation happened in process_one_work(), we see the free stack is useless in KASAN report, it doesn't help programmers to solve UAF for workqueue issue. This patchset improves KASAN reports by making them to have workqueue queueing stack. It is useful for programmers to solve use-after-free or double-free memory issue. Generic KASAN also records the last two workqueue stacks and prints them in KASAN report. It is only suitable for generic KASAN. [1] https://groups.google.com/g/syzkaller-bugs/search?q=%22use-after-free%22+process_one_work [2] https://bugzilla.kernel.org/show_bug.cgi?id=198437 This patch (of 4): When analyzing use-after-free or double-free issue, recording the enqueuing work stacks is helpful to preserve usage history which potentially gives a hint about the affected code. For workqueue it has turned out to be useful to record the enqueuing work call stacks. Because user can see KASAN report to determine whether it is root cause. They don't need to enable debugobjects, but they have a chance to find out the root cause. Link: https://lkml.kernel.org/r/20201203022148.29754-1-walter-zh.wu@mediatek.com Link: https://lkml.kernel.org/r/20201203022442.30006-1-walter-zh.wu@mediatek.com Signed-off-by: Walter Wu Suggested-by: Marco Elver Acked-by: Marco Elver Acked-by: Tejun Heo Reviewed-by: Dmitry Vyukov Reviewed-by: Andrey Konovalov Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Lai Jiangshan Cc: Marco Elver Cc: Matthias Brugger Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c041098c690fe53cea5d20c62f128a4f7a5c19fe Author: Vincenzo Frascino Date: Mon Dec 14 19:09:06 2020 -0800 mm/vmalloc.c: fix kasan shadow poisoning size The size of vm area can be affected by the presence or not of the guard page. In particular when VM_NO_GUARD is present, the actual accessible size has to be considered like the real size minus the guard page. Currently kasan does not keep into account this information during the poison operation and in particular tries to poison the guard page as well. This approach, even if incorrect, does not cause an issue because the tags for the guard page are written in the shadow memory. With the future introduction of the Tag-Based KASAN, being the guard page inaccessible by nature, the write tag operation on this page triggers a fault. Fix kasan shadow poisoning size invoking get_vm_area_size() instead of accessing directly the field in the data structure to detect the correct value. Link: https://lkml.kernel.org/r/20201027160213.32904-1-vincenzo.frascino@arm.com Fixes: d98c9e83b5e7c ("kasan: fix crashes on access to memory mapped by vm_map_ram()") Signed-off-by: Vincenzo Frascino Cc: Andrey Konovalov Cc: Dmitry Vyukov Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Marco Elver Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 56db19fef3f1c28a2fac37079eb276aaffec2e3d Author: Alex Shi Date: Mon Dec 14 19:09:02 2020 -0800 docs/vm: remove unused 3 items explanation for /proc/vmstat Commit 5647bc293ab1 ("mm: compaction: Move migration fail/success stats to migrate.c"), removed 3 items in /proc/vmstat. but the docs still has their explanation. let's remove them. "compact_blocks_moved", "compact_pages_moved", "compact_pagemigrate_failed", Link: https://lkml.kernel.org/r/1605520282-51993-1-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Alex Shi Reviewed-by: Zi Yan Cc: Jonathan Corbet Cc: Yang Shi Cc: "Kirill A. Shutemov" Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0a7dd4e901b8a4ee040ba953900d1d7120b34ee5 Author: Waiman Long Date: Mon Dec 14 19:08:59 2020 -0800 mm/vmalloc: Fix unlock order in s_stop() When multiple locks are acquired, they should be released in reverse order. For s_start() and s_stop() in mm/vmalloc.c, that is not the case. s_start: mutex_lock(&vmap_purge_lock); spin_lock(&vmap_area_lock); s_stop : mutex_unlock(&vmap_purge_lock); spin_unlock(&vmap_area_lock); This unlock sequence, though allowed, is not optimal. If a waiter is present, mutex_unlock() will need to go through the slowpath of waking up the waiter with preemption disabled. Fix that by releasing the spinlock first before the mutex. Link: https://lkml.kernel.org/r/20201213180843.16938-1-longman@redhat.com Fixes: e36176be1c39 ("mm/vmalloc: rework vmap_area_lock") Signed-off-by: Waiman Long Reviewed-by: Uladzislau Rezki (Sony) Reviewed-by: David Hildenbrand Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e924d461f2c3ca3f31f48b0be421487d99fa2e5e Author: Baolin Wang Date: Mon Dec 14 19:08:56 2020 -0800 mm/vmalloc.c: remove unnecessary return statement Remove unnecessary return statement for void function. Link: https://lkml.kernel.org/r/ca23f89259c80c3562700ae6e227b2815a195853.1606891153.git.baolin.wang@linux.alibaba.com Signed-off-by: Baolin Wang Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 799fa85d66e96b62afedb92fe9e8a32410d65bac Author: Alex Shi Date: Mon Dec 14 19:08:53 2020 -0800 mm/vmalloc: add 'align' parameter explanation for pvm_determine_end_from_reverse Kernel-doc markup has a issue on pvm_determine_end_from_reverse: mm/vmalloc.c:3145: warning: Function parameter or member 'align' not described in 'pvm_determine_end_from_reverse' Add a explanation for it to remove the warning. Link: https://lkml.kernel.org/r/1605605088-30668-3-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Alex Shi Cc: Jonathan Corbet Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 96e2db456135db0cf2476b6890f1e8b2fdcf21eb Author: Uladzislau Rezki (Sony) Date: Mon Dec 14 19:08:49 2020 -0800 mm/vmalloc: rework the drain logic A current "lazy drain" model suffers from at least two issues. First one is related to the unsorted list of vmap areas, thus in order to identify the [min:max] range of areas to be drained, it requires a full list scan. What is a time consuming if the list is too long. Second one and as a next step is about merging all fragments with a free space. What is also a time consuming because it has to iterate over entire list which holds outstanding lazy areas. See below the "preemptirqsoff" tracer that illustrates a high latency. It is ~24676us. Our workloads like audio and video are effected by such long latency: tracer: preemptirqsoff preemptirqsoff latency trace v1.1.5 on 4.9.186-perf+ -------------------------------------------------------------------- latency: 24676 us, #4/4, CPU#1 | (M:preempt VP:0, KP:0, SP:0 HP:0 P:8) ----------------- | task: crtc_commit:112-261 (uid:0 nice:0 policy:1 rt_prio:16) ----------------- => started at: __purge_vmap_area_lazy => ended at: __purge_vmap_area_lazy _------=> CPU# / _-----=> irqs-off | / _----=> need-resched || / _---=> hardirq/softirq ||| / _--=> preempt-depth |||| / delay cmd pid ||||| time | caller \ / ||||| \ | / crtc_com-261 1...1 1us*: _raw_spin_lock <-__purge_vmap_area_lazy [...] crtc_com-261 1...1 24675us : _raw_spin_unlock <-__purge_vmap_area_lazy crtc_com-261 1...1 24677us : trace_preempt_on <-__purge_vmap_area_lazy crtc_com-261 1...1 24683us : => free_vmap_area_noflush => remove_vm_area => __vunmap => vfree => drm_property_free_blob => drm_mode_object_unreference => drm_property_unreference_blob => __drm_atomic_helper_crtc_destroy_state => sde_crtc_destroy_state => drm_atomic_state_default_clear => drm_atomic_state_clear => drm_atomic_state_free => complete_commit => _msm_drm_commit_work_cb => kthread_worker_fn => kthread => ret_from_fork To address those two issues we can redesign a purging of the outstanding lazy areas. Instead of queuing vmap areas to the list, we replace it by the separate rb-tree. In hat case an area is located in the tree/list in ascending order. It will give us below advantages: a) Outstanding vmap areas are merged creating bigger coalesced blocks, thus it becomes less fragmented. b) It is possible to calculate a flush range [min:max] without scanning all elements. It is O(1) access time or complexity; c) The final merge of areas with the rb-tree that represents a free space is faster because of (a). As a result the lock contention is also reduced. Link: https://lkml.kernel.org/r/20201116220033.1837-2-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Cc: Hillf Danton Cc: Michal Hocko Cc: Matthew Wilcox Cc: Oleksiy Avramchenko Cc: Steven Rostedt Cc: Minchan Kim Cc: huang ying Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8945a723064a2ccfc8dffa5dd17d5a3b351fbf1a Author: Uladzislau Rezki (Sony) Date: Mon Dec 14 19:08:46 2020 -0800 mm/vmalloc: use free_vm_area() if an allocation fails There is a dedicated and separate function that finds and removes a continuous kernel virtual area. As a final step it also releases the "area", a descriptor of corresponding vm_struct. Use free_vmap_area() in the __vmalloc_node_range() instead of open coded steps which are exactly the same, to perform a cleanup. Link: https://lkml.kernel.org/r/20201116220033.1837-1-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Cc: Hillf Danton Cc: Matthew Wilcox Cc: Michal Hocko Cc: Oleksiy Avramchenko Cc: Minchan Kim Cc: Steven Rostedt Cc: "Huang, Ying" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 34fe653716b0d340bc26dd4823d2dbe00c57f849 Author: Andrew Morton Date: Mon Dec 14 19:08:43 2020 -0800 mm/vmalloc.c:__vmalloc_area_node(): avoid 32-bit overflow With a machine with 3 TB (more than 2 TB memory). If you use vmalloc to allocate > 2 TB memory, the array_size below will be overflowed. The array_size is an unsigned int and can only be used to allocate less than 2 TB memory. If you pass 2*1028*1028*1024*1024 = 2 * 2^40 in the argument of vmalloc. The array_size will become 2*2^31 = 2^32. The 2^32 cannot be store with a 32 bit integer. The fix is to change the type of array_size to unsigned long. [akpm@linux-foundation.org: rework for current mainline] Link: https://bugzilla.kernel.org/show_bug.cgi?id=210023 Reported-by: Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d5037d1d82b39d70e2f5952528f24172f33f5629 Author: Daniel Vetter Date: Mon Dec 14 19:08:38 2020 -0800 locking/selftests: add testcases for fs_reclaim Since I butchered this I figured better to make sure we have testcases for this now. Since we only have a locking context for __GFP_FS that's the only thing we're testing right now. Link: https://lkml.kernel.org/r/20201125162532.1299794-4-daniel.vetter@ffwll.ch Signed-off-by: Daniel Vetter Acked-by: Peter Zijlstra (Intel) Cc: Dave Chinner Cc: Qian Cai Cc: Thomas Hellström (Intel) Cc: Jason Gunthorpe Cc: Maarten Lankhorst Cc: Christian König Cc: "Matthew Wilcox (Oracle)" Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Will Deacon Cc: Christoph Lameter Cc: David Rientjes Cc: Ingo Molnar Cc: Jason Gunthorpe Cc: Joonsoo Kim Cc: Mathieu Desnoyers Cc: Michel Lespinasse Cc: Paul E. McKenney Cc: Pekka Enberg Cc: Randy Dunlap Cc: Sebastian Andrzej Siewior Cc: Thomas Gleixner Cc: Vlastimil Babka Cc: Waiman Long Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 95d6c701f4ca7c44dc148d664f604541266a2333 Author: Daniel Vetter Date: Mon Dec 14 19:08:34 2020 -0800 mm: extract might_alloc() debug check Extracted from slab.h, which seems to have the most complete version including the correct might_sleep() check. Roll it out to slob.c. Motivated by a discussion with Paul about possibly changing call_rcu behaviour to allocate memory, but only roughly every 500th call. There are a lot fewer places in the kernel that care about whether allocating memory is allowed or not (due to deadlocks with reclaim code) than places that care whether sleeping is allowed. But debugging these also tends to be a lot harder, so nice descriptive checks could come in handy. I might have some use eventually for annotations in drivers/gpu. Note that unlike fs_reclaim_acquire/release gfpflags_allow_blocking does not consult the PF_MEMALLOC flags. But there is no flag equivalent for GFP_NOWAIT, hence this check can't go wrong due to memalloc_no*_save/restore contexts. Willy is working on a patch series which might change this: https://lore.kernel.org/linux-mm/20200625113122.7540-7-willy@infradead.org/ I think best would be if that updates gfpflags_allow_blocking(), since there's a ton of callers all over the place for that already. Link: https://lkml.kernel.org/r/20201125162532.1299794-3-daniel.vetter@ffwll.ch Signed-off-by: Daniel Vetter Acked-by: Vlastimil Babka Acked-by: Paul E. McKenney Reviewed-by: Jason Gunthorpe Cc: Randy Dunlap Cc: Paul E. McKenney Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Vlastimil Babka Cc: Mathieu Desnoyers Cc: Sebastian Andrzej Siewior Cc: Michel Lespinasse Cc: Daniel Vetter Cc: Waiman Long Cc: Thomas Gleixner Cc: Randy Dunlap Cc: Dave Chinner Cc: Qian Cai Cc: "Matthew Wilcox (Oracle)" Cc: Christian König Cc: Ingo Molnar Cc: Jason Gunthorpe Cc: Maarten Lankhorst Cc: Thomas Hellström (Intel) Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f920e413ff9c33c297c0bde7cc5fe8cd736112e2 Author: Daniel Vetter Date: Mon Dec 14 19:08:30 2020 -0800 mm: track mmu notifiers in fs_reclaim_acquire/release fs_reclaim_acquire/release nicely catch recursion issues when allocating GFP_KERNEL memory against shrinkers (which gpu drivers tend to use to keep the excessive caches in check). For mmu notifier recursions we do have lockdep annotations since 23b68395c7c7 ("mm/mmu_notifiers: add a lockdep map for invalidate_range_start/end"). But these only fire if a path actually results in some pte invalidation - for most small allocations that's very rarely the case. The other trouble is that pte invalidation can happen any time when __GFP_RECLAIM is set. Which means only really GFP_ATOMIC is a safe choice, GFP_NOIO isn't good enough to avoid potential mmu notifier recursion. I was pondering whether we should just do the general annotation, but there's always the risk for false positives. Plus I'm assuming that the core fs and io code is a lot better reviewed and tested than random mmu notifier code in drivers. Hence why I decide to only annotate for that specific case. Furthermore even if we'd create a lockdep map for direct reclaim, we'd still need to explicit pull in the mmu notifier map - there's a lot more places that do pte invalidation than just direct reclaim, these two contexts arent the same. Note that the mmu notifiers needing their own independent lockdep map is also the reason we can't hold them from fs_reclaim_acquire to fs_reclaim_release - it would nest with the acquistion in the pte invalidation code, causing a lockdep splat. And we can't remove the annotations from pte invalidation and all the other places since they're called from many other places than page reclaim. Hence we can only do the equivalent of might_lock, but on the raw lockdep map. With this we can also remove the lockdep priming added in 66204f1d2d1b ("mm/mmu_notifiers: prime lockdep") since the new annotations are strictly more powerful. Link: https://lkml.kernel.org/r/20201125162532.1299794-2-daniel.vetter@ffwll.ch Signed-off-by: Daniel Vetter Reviewed-by: Jason Gunthorpe Cc: Dave Chinner Cc: Qian Cai Cc: Thomas Hellström (Intel) Cc: Jason Gunthorpe Cc: Maarten Lankhorst Cc: Christian König Cc: "Matthew Wilcox (Oracle)" Cc: Christoph Lameter Cc: David Rientjes Cc: Ingo Molnar Cc: Ingo Molnar Cc: Joonsoo Kim Cc: Mathieu Desnoyers Cc: Michel Lespinasse Cc: Paul E. McKenney Cc: Pekka Enberg Cc: Peter Zijlstra (Intel) Cc: Randy Dunlap Cc: Sebastian Andrzej Siewior Cc: Thomas Gleixner Cc: Vlastimil Babka Cc: Waiman Long Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 871402e05b24cb56bc69df47cff960d0e0d24267 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Mon Dec 14 19:08:25 2020 -0800 mm: forbid splitting special mappings Don't allow splitting of vm_special_mapping's. It affects vdso/vvar areas. Uprobes have only one page in xol_area so they aren't affected. Those restrictions were enforced by checks in .mremap() callbacks. Restrict resizing with generic .split() callback. Link: https://lkml.kernel.org/r/20201013013416.390574-7-dima@arista.com Signed-off-by: Dmitry Safonov Cc: Alexander Viro Cc: Andy Lutomirski Cc: Brian Geffon Cc: Catalin Marinas Cc: Dan Carpenter Cc: Dan Williams Cc: Dave Jiang Cc: Hugh Dickins Cc: Ingo Molnar Cc: Jason Gunthorpe Cc: John Hubbard Cc: "Kirill A. Shutemov" Cc: Mike Kravetz Cc: Minchan Kim Cc: Ralph Campbell Cc: Russell King Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Vishal Verma Cc: Vlastimil Babka Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 73d5e06299195f4df82832cfc4a3a0c574c1e473 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Mon Dec 14 19:08:21 2020 -0800 mremap: check if it's possible to split original vma If original VMA can't be split at the desired address, do_munmap() will fail and leave both new-copied VMA and old VMA. De-facto it's MREMAP_DONTUNMAP behaviour, which is unexpected. Currently, it may fail such way for hugetlbfs and dax device mappings. Minimize such unpleasant situations to OOM by checking .may_split() before attempting to create a VMA copy. Link: https://lkml.kernel.org/r/20201013013416.390574-6-dima@arista.com Signed-off-by: Dmitry Safonov Cc: Alexander Viro Cc: Andy Lutomirski Cc: Brian Geffon Cc: Catalin Marinas Cc: Dan Carpenter Cc: Dan Williams Cc: Dave Jiang Cc: Hugh Dickins Cc: Ingo Molnar Cc: Jason Gunthorpe Cc: John Hubbard Cc: "Kirill A. Shutemov" Cc: Mike Kravetz Cc: Minchan Kim Cc: Ralph Campbell Cc: Russell King Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Vishal Verma Cc: Vlastimil Babka Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dd3b614f858d88f33e0cf8b7353e2ad937e71da3 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Mon Dec 14 19:08:17 2020 -0800 vm_ops: rename .split() callback to .may_split() Rename the callback to reflect that it's not called *on* or *after* split, but rather some time before the splitting to check if it's possible. Link: https://lkml.kernel.org/r/20201013013416.390574-5-dima@arista.com Signed-off-by: Dmitry Safonov Cc: Alexander Viro Cc: Andy Lutomirski Cc: Brian Geffon Cc: Catalin Marinas Cc: Dan Carpenter Cc: Dan Williams Cc: Dave Jiang Cc: Hugh Dickins Cc: Ingo Molnar Cc: Jason Gunthorpe Cc: John Hubbard Cc: "Kirill A. Shutemov" Cc: Mike Kravetz Cc: Minchan Kim Cc: Ralph Campbell Cc: Russell King Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Vishal Verma Cc: Vlastimil Babka Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cd544fd1dc9293c6702fab6effa63dac1cc67e99 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Mon Dec 14 19:08:13 2020 -0800 mremap: don't allow MREMAP_DONTUNMAP on special_mappings and aio As kernel expect to see only one of such mappings, any further operations on the VMA-copy may be unexpected by the kernel. Maybe it's being on the safe side, but there doesn't seem to be any expected use-case for this, so restrict it now. Link: https://lkml.kernel.org/r/20201013013416.390574-4-dima@arista.com Fixes: commit e346b3813067 ("mm/mremap: add MREMAP_DONTUNMAP to mremap()") Signed-off-by: Dmitry Safonov Cc: Alexander Viro Cc: Andy Lutomirski Cc: Brian Geffon Cc: Catalin Marinas Cc: Dan Carpenter Cc: Dan Williams Cc: Dave Jiang Cc: Hugh Dickins Cc: Ingo Molnar Cc: Jason Gunthorpe Cc: John Hubbard Cc: "Kirill A. Shutemov" Cc: Mike Kravetz Cc: Minchan Kim Cc: Ralph Campbell Cc: Russell King Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Vishal Verma Cc: Vlastimil Babka Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ad8ee77ea9db1f74fe79c285e3546375efa75608 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Mon Dec 14 19:08:09 2020 -0800 mm/mremap: for MREMAP_DONTUNMAP check security_vm_enough_memory_mm() Currently memory is accounted post-mremap() with MREMAP_DONTUNMAP, which may break overcommit policy. So, check if there's enough memory before doing actual VMA copy. Don't unset VM_ACCOUNT on MREMAP_DONTUNMAP. By semantics, such mremap() is actually a memory allocation. That also simplifies the error-path a little. Also, as it's memory allocation on success don't reset hiwater_vm value. Link: https://lkml.kernel.org/r/20201013013416.390574-3-dima@arista.com Fixes: commit e346b3813067 ("mm/mremap: add MREMAP_DONTUNMAP to mremap()") Signed-off-by: Dmitry Safonov Cc: Alexander Viro Cc: Andy Lutomirski Cc: Brian Geffon Cc: Catalin Marinas Cc: Dan Carpenter Cc: Dan Williams Cc: Dave Jiang Cc: Hugh Dickins Cc: Ingo Molnar Cc: Jason Gunthorpe Cc: John Hubbard Cc: "Kirill A. Shutemov" Cc: Mike Kravetz Cc: Minchan Kim Cc: Ralph Campbell Cc: Russell King Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Vishal Verma Cc: Vlastimil Babka Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 51df7bcb61518d933beb5c2dfe8251d651ca4259 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Mon Dec 14 19:08:05 2020 -0800 mm/mremap: account memory on do_munmap() failure Patch series "mremap: move_vma() fixes". This patch (of 6): move_vma() copies VMA without adding it to account, then unmaps old part of VMA. On failure it unmaps the new VMA. With hacks accounting in munmap is disabled as it's a copy of existing VMA. Account the memory on munmap() failure which was previously copied into a new VMA. Link: https://lkml.kernel.org/r/20201013013416.390574-1-dima@arista.com Link: https://lkml.kernel.org/r/20201013013416.390574-2-dima@arista.com Fixes: commit e2ea83742133 ("[PATCH] mremap: move_vma fixes and cleanup") Signed-off-by: Dmitry Safonov Cc: Alexander Viro Cc: Andy Lutomirski Cc: Brian Geffon Cc: Catalin Marinas Cc: Dan Williams Cc: Dave Jiang Cc: Hugh Dickins Cc: Ingo Molnar Cc: "Kirill A. Shutemov" Cc: Mike Kravetz Cc: Minchan Kim Cc: Russell King Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Vishal Verma Cc: Vlastimil Babka Cc: Will Deacon Cc: Dan Carpenter Cc: John Hubbard Cc: Jason Gunthorpe Cc: Ralph Campbell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0966aeb404e854e3377a10fcd01be46f19055bc6 Author: Matthew Wilcox (Oracle) Date: Mon Dec 14 19:08:02 2020 -0800 mm: move free_unref_page to mm/internal.h Code outside mm/ should not be calling free_unref_page(). Also move free_unref_page_list(). Link: https://lkml.kernel.org/r/20201125034655.27687-2-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: David Hildenbrand Reviewed-by: Mike Rapoport Acked-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 06517c9a336f4c20f2064611bf4b1e7881a95fe1 Author: Matthew Wilcox (Oracle) Date: Mon Dec 14 19:07:59 2020 -0800 sparc: fix handling of page table constructor failure The page has just been allocated, so its refcount is 1. free_unref_page() is for use on pages which have a zero refcount. Use __free_page() like the other implementations of pte_alloc_one(). Link: https://lkml.kernel.org/r/20201125034655.27687-1-willy@infradead.org Fixes: 1ae9ae5f7df7 ("sparc: handle pgtable_page_ctor() fail") Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: David Hildenbrand Reviewed-by: Mike Rapoport Acked-by: Vlastimil Babka Cc: David Miller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2b5067a8143e34aa3fa57a20fb8a3c40d905f942 Author: Axel Rasmussen Date: Mon Dec 14 19:07:55 2020 -0800 mm: mmap_lock: add tracepoints around lock acquisition The goal of these tracepoints is to be able to debug lock contention issues. This lock is acquired on most (all?) mmap / munmap / page fault operations, so a multi-threaded process which does a lot of these can experience significant contention. We trace just before we start acquisition, when the acquisition returns (whether it succeeded or not), and when the lock is released (or downgraded). The events are broken out by lock type (read / write). The events are also broken out by memcg path. For container-based workloads, users often think of several processes in a memcg as a single logical "task", so collecting statistics at this level is useful. The end goal is to get latency information. This isn't directly included in the trace events. Instead, users are expected to compute the time between "start locking" and "acquire returned", using e.g. synthetic events or BPF. The benefit we get from this is simpler code. Because we use tracepoint_enabled() to decide whether or not to trace, this patch has effectively no overhead unless tracepoints are enabled at runtime. If tracepoints are enabled, there is a performance impact, but how much depends on exactly what e.g. the BPF program does. [axelrasmussen@google.com: fix use-after-free race and css ref leak in tracepoints] Link: https://lkml.kernel.org/r/20201130233504.3725241-1-axelrasmussen@google.com [axelrasmussen@google.com: v3] Link: https://lkml.kernel.org/r/20201207213358.573750-1-axelrasmussen@google.com [rostedt@goodmis.org: in-depth examples of tracepoint_enabled() usage, and per-cpu-per-context buffer design] Link: https://lkml.kernel.org/r/20201105211739.568279-2-axelrasmussen@google.com Signed-off-by: Axel Rasmussen Acked-by: Vlastimil Babka Cc: Steven Rostedt Cc: Ingo Molnar Cc: Michel Lespinasse Cc: Daniel Jordan Cc: Jann Horn Cc: Chinwen Chang Cc: Davidlohr Bueso Cc: David Rientjes Cc: Laurent Dufour Cc: Yafang Shao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 777f303c0239043a5a2c427fd94124fa1e2bfc86 Author: Alex Shi Date: Mon Dec 14 19:07:51 2020 -0800 mm/page_vma_mapped.c: add colon to fix kernel-doc markups error for check_pte check_pte() needs a correct colon for kernel-doc markup, otherwise, gcc has the following warning for W=1, mm/page_vma_mapped.c:86: warning: Function parameter or member 'pvmw' not described in 'check_pte' Link: https://lkml.kernel.org/r/1605597167-25145-1-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Alex Shi Cc: Randy Dunlap Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f5b7e739be90747ecffb0d8f975b56ac6cb140d0 Author: Alex Shi Date: Mon Dec 14 19:07:48 2020 -0800 mm/mapping_dirty_helpers: enhance the kernel-doc markups Add and change parameter explanation for wp_pte and clean_record_pte, to avoid W1 warning: mm/mapping_dirty_helpers.c:34: warning: Function parameter or member 'end' not described in 'wp_pte' mm/mapping_dirty_helpers.c:88: warning: Function parameter or member 'end' not described in 'clean_record_pte' Link: https://lkml.kernel.org/r/1605605088-30668-2-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Alex Shi Cc: Jonathan Corbet Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d3f5ffcacd1528736471bc78f03f06da6c4551cc Author: John Hubbard Date: Mon Dec 14 19:07:45 2020 -0800 mm: cleanup: remove unused tsk arg from __access_remote_vm Despite a comment that said that page fault accounting would be charged to whatever task_struct* was passed into __access_remote_vm(), the tsk argument was actually unused. Making page fault accounting actually use this task struct is quite a project, so there is no point in keeping the tsk argument. Delete both the comment, and the argument. [rppt@linux.ibm.com: changelog addition] Link: https://lkml.kernel.org/r/20201026074137.4147787-1-jhubbard@nvidia.com Signed-off-by: John Hubbard Reviewed-by: Mike Rapoport Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit be37c98d1134a8e068b52618c086dab6b34b9a2c Author: Kalesh Singh Date: Mon Dec 14 19:07:40 2020 -0800 x86: mremap speedup - Enable HAVE_MOVE_PUD HAVE_MOVE_PUD enables remapping pages at the PUD level if both the source and destination addresses are PUD-aligned. With HAVE_MOVE_PUD enabled it can be inferred that there is approximately a 13x improvement in performance on x86. (See data below). ------- Test Results --------- The following results were obtained using a 5.4 kernel, by remapping a PUD-aligned, 1GB sized region to a PUD-aligned destination. The results from 10 iterations of the test are given below: Total mremap times for 1GB data on x86. All times are in nanoseconds. Control HAVE_MOVE_PUD 180394 15089 235728 14056 238931 25741 187330 13838 241742 14187 177925 14778 182758 14728 160872 14418 205813 15107 245722 13998 205721.5 15594 <-- Mean time in nanoseconds A 1GB mremap completion time drops from ~205 microseconds to ~15 microseconds on x86. (~13x speed up). Link: https://lkml.kernel.org/r/20201014005320.2233162-6-kaleshsingh@google.com Signed-off-by: Kalesh Singh Acked-by: Kirill A. Shutemov Acked-by: Ingo Molnar Cc: Thomas Gleixner Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Aneesh Kumar K.V Cc: Anshuman Khandual Cc: Arnd Bergmann Cc: Brian Geffon Cc: Catalin Marinas Cc: Christian Brauner Cc: Dave Hansen Cc: Frederic Weisbecker Cc: Gavin Shan Cc: Hassan Naveed Cc: Jia He Cc: John Hubbard Cc: Kees Cook Cc: Krzysztof Kozlowski Cc: Lokesh Gidra Cc: Mark Rutland Cc: Masahiro Yamada Cc: Masami Hiramatsu Cc: Mike Rapoport Cc: Mina Almasry Cc: Minchan Kim Cc: Peter Zijlstra (Intel) Cc: Ralph Campbell Cc: Ram Pai Cc: Sami Tolvanen Cc: Sandipan Das Cc: SeongJae Park Cc: Shuah Khan Cc: Steven Price Cc: Suren Baghdasaryan Cc: Will Deacon Cc: Zi Yan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f5308c896d5de211245a9dc73b4e530f75185dd5 Author: Kalesh Singh Date: Mon Dec 14 19:07:35 2020 -0800 arm64: mremap speedup - enable HAVE_MOVE_PUD HAVE_MOVE_PUD enables remapping pages at the PUD level if both the source and destination addresses are PUD-aligned. With HAVE_MOVE_PUD enabled it can be inferred that there is approximately a 19x improvement in performance on arm64. (See data below). ------- Test Results --------- The following results were obtained using a 5.4 kernel, by remapping a PUD-aligned, 1GB sized region to a PUD-aligned destination. The results from 10 iterations of the test are given below: Total mremap times for 1GB data on arm64. All times are in nanoseconds. Control HAVE_MOVE_PUD 1247761 74271 1219896 46771 1094792 59687 1227760 48385 1043698 76666 1101771 50365 1159896 52500 1143594 75261 1025833 61354 1078125 48697 1134312.6 59395.7 <-- Mean time in nanoseconds A 1GB mremap completion time drops from ~1.1 milliseconds to ~59 microseconds on arm64. (~19x speed up). Link: https://lkml.kernel.org/r/20201014005320.2233162-5-kaleshsingh@google.com Signed-off-by: Kalesh Singh Acked-by: Kirill A. Shutemov Cc: Catalin Marinas Cc: Will Deacon Cc: Aneesh Kumar K.V Cc: Anshuman Khandual Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Brian Geffon Cc: Christian Brauner Cc: Dave Hansen Cc: Frederic Weisbecker Cc: Gavin Shan Cc: Hassan Naveed Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jia He Cc: John Hubbard Cc: Kees Cook Cc: Krzysztof Kozlowski Cc: Lokesh Gidra Cc: Mark Rutland Cc: Masahiro Yamada Cc: Masami Hiramatsu Cc: Mike Rapoport Cc: Mina Almasry Cc: Minchan Kim Cc: Peter Zijlstra (Intel) Cc: Ralph Campbell Cc: Ram Pai Cc: Sami Tolvanen Cc: Sandipan Das Cc: SeongJae Park Cc: Shuah Khan Cc: Steven Price Cc: Suren Baghdasaryan Cc: Thomas Gleixner Cc: Zi Yan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c49dd340180260c6239e453263a9a244da9a7c85 Author: Kalesh Singh Date: Mon Dec 14 19:07:30 2020 -0800 mm: speedup mremap on 1GB or larger regions Android needs to move large memory regions for garbage collection. The GC requires moving physical pages of multi-gigabyte heap using mremap. During this move, the application threads have to be paused for correctness. It is critical to keep this pause as short as possible to avoid jitters during user interaction. Optimize mremap for >= 1GB-sized regions by moving at the PUD/PGD level if the source and destination addresses are PUD-aligned. For CONFIG_PGTABLE_LEVELS == 3, moving at the PUD level in effect moves PGD entries, since the PUD entry is “folded back” onto the PGD entry. Add HAVE_MOVE_PUD so that architectures where moving at the PUD level isn't supported/tested can turn this off by not selecting the config. Link: https://lkml.kernel.org/r/20201014005320.2233162-4-kaleshsingh@google.com Signed-off-by: Kalesh Singh Acked-by: Kirill A. Shutemov Reported-by: kernel test robot Cc: Aneesh Kumar K.V Cc: Anshuman Khandual Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Brian Geffon Cc: Catalin Marinas Cc: Christian Brauner Cc: Dave Hansen Cc: Frederic Weisbecker Cc: Gavin Shan Cc: Hassan Naveed Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jia He Cc: John Hubbard Cc: Kees Cook Cc: Krzysztof Kozlowski Cc: Lokesh Gidra Cc: Mark Rutland Cc: Masahiro Yamada Cc: Masami Hiramatsu Cc: Mike Rapoport Cc: Mina Almasry Cc: Minchan Kim Cc: Peter Zijlstra (Intel) Cc: Ralph Campbell Cc: Ram Pai Cc: Sami Tolvanen Cc: Sandipan Das Cc: SeongJae Park Cc: Shuah Khan Cc: Steven Price Cc: Suren Baghdasaryan Cc: Thomas Gleixner Cc: Will Deacon Cc: Zi Yan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7df666253f2610284f653bce0e2e50b4923c84aa Author: Kalesh Singh Date: Mon Dec 14 19:07:25 2020 -0800 kselftests: vm: add mremap tests Patch series "Speed up mremap on large regions", v4. mremap time can be optimized by moving entries at the PMD/PUD level if the source and destination addresses are PMD/PUD-aligned and PMD/PUD-sized. Enable moving at the PMD and PUD levels on arm64 and x86. Other architectures where this type of move is supported and known to be safe can also opt-in to these optimizations by enabling HAVE_MOVE_PMD and HAVE_MOVE_PUD. Observed Performance Improvements for remapping a PUD-aligned 1GB-sized region on x86 and arm64: - HAVE_MOVE_PMD is already enabled on x86 : N/A - Enabling HAVE_MOVE_PUD on x86 : ~13x speed up - Enabling HAVE_MOVE_PMD on arm64 : ~ 8x speed up - Enabling HAVE_MOVE_PUD on arm64 : ~19x speed up Altogether, HAVE_MOVE_PMD and HAVE_MOVE_PUD give a total of ~150x speed up on arm64. This patch (of 4): Test mremap on regions of various sizes and alignments and validate data after remapping. Also provide total time for remapping the region which is useful for performance comparison of the mremap optimizations that move pages at the PMD/PUD levels if HAVE_MOVE_PMD and/or HAVE_MOVE_PUD are enabled. Link: https://lkml.kernel.org/r/20201014005320.2233162-1-kaleshsingh@google.com Link: https://lkml.kernel.org/r/20201014005320.2233162-2-kaleshsingh@google.com Signed-off-by: Kalesh Singh Reviewed-by: John Hubbard Cc: Shuah Khan Cc: Kirill A. Shutemov Cc: Suren Baghdasaryan Cc: Minchan Kim Cc: Lokesh Gidra Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: Catalin Marinas Cc: Will Deacon Cc: Peter Zijlstra (Intel) Cc: Kees Cook Cc: Aneesh Kumar K.V Cc: Arnd Bergmann Cc: Sami Tolvanen Cc: Masahiro Yamada Cc: Krzysztof Kozlowski Cc: Frederic Weisbecker Cc: Hassan Naveed Cc: Christian Brauner Cc: Anshuman Khandual Cc: Mark Rutland Cc: Gavin Shan Cc: Mike Rapoport Cc: Steven Price Cc: Jia He Cc: Ram Pai Cc: Sandipan Das Cc: Zi Yan Cc: Mina Almasry Cc: Ralph Campbell Cc: Dave Hansen Cc: Brian Geffon Cc: Masami Hiramatsu Cc: SeongJae Park Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3a250629d7325f27b278dad1aaf44eab00090e76 Author: Dan Williams Date: Mon Dec 14 19:07:21 2020 -0800 xen/unpopulated-alloc: consolidate pgmap manipulation Cleanup fill_list() to keep all the pgmap manipulations in a single location of the function. Update the exit unwind path accordingly. Link: http://lore.kernel.org/r/6186fa28-d123-12db-6171-a75cb6e615a5@oracle.com Link: https://lkml.kernel.org/r/160272253442.3136502.16683842453317773487.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams Reported-by: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f0c0c115fb81940f4dba0644ac2a8a43b39c83f3 Author: Shakeel Butt Date: Mon Dec 14 19:07:17 2020 -0800 mm: memcontrol: account pagetables per node For many workloads, pagetable consumption is significant and it makes sense to expose it in the memory.stat for the memory cgroups. However at the moment, the pagetables are accounted per-zone. Converting them to per-node and using the right interface will correctly account for the memory cgroups as well. [akpm@linux-foundation.org: export __mod_lruvec_page_state to modules for arch/mips/kvm/] Link: https://lkml.kernel.org/r/20201130212541.2781790-3-shakeelb@google.com Signed-off-by: Shakeel Butt Acked-by: Johannes Weiner Acked-by: Roman Gushchin Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c47d5032ed3002311a4188eae51f4641ec436beb Author: Shakeel Butt Date: Mon Dec 14 19:07:14 2020 -0800 mm: move lruvec stats update functions to vmstat.h Patch series "memcg: add pagetable comsumption to memory.stat", v2. Many workloads consumes significant amount of memory in pagetables. One specific use-case is the user space network driver which mmaps the application memory to provide zero copy transfer. This driver can consume a large amount memory in page tables. This patch series exposes the pagetable comsumption for each memory cgroup. This patch (of 2): This does not change any functionality and only move the functions which update the lruvec stats to vmstat.h from memcontrol.h. The main reason for this patch is to be able to use these functions in the page table contructor function which is defined in mm.h and we can not include the memcontrol.h in that file. Also this is a better place for this interface in general. The lruvec abstraction, while invented for memcg, isn't specific to memcg at all. Link: https://lkml.kernel.org/r/20201130212541.2781790-2-shakeelb@google.com Signed-off-by: Shakeel Butt Acked-by: Johannes Weiner Acked-by: Roman Gushchin Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7f41506baa052c95f9a72e17472f3dfceba2a10b Author: Alex Shi Date: Mon Dec 14 19:07:10 2020 -0800 mm/memcg: remove incorrect comment Swapcache readahead pages are charged before being used, so it is unlikely that they will be migrated before charging. Remove the incorrect comment. Link: https://lkml.kernel.org/r/1605864930-49405-1-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Alex Shi Cc: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5ab92901fea9c96ff210e22eac9e6680233009c7 Author: Kaixu Xia Date: Mon Dec 14 19:07:07 2020 -0800 mm: memcontrol: sssign boolean values to a bool variable Fix the following coccinelle warnings: mm/memcontrol.c:7341:2-22: WARNING: Assignment of 0/1 to bool variable mm/memcontrol.c:7343:2-22: WARNING: Assignment of 0/1 to bool variable Link: https://lkml.kernel.org/r/1604737495-6418-1-git-send-email-kaixuxia@tencent.com Signed-off-by: Kaixu Xia Reported-by: Tosk Robot Acked-by: Souptick Joarder Cc: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit da3ceeff923e3bc750a8423c840462760c463926 Author: Muchun Song Date: Mon Dec 14 19:07:04 2020 -0800 mm: memcg/slab: rename *_lruvec_slab_state to *_lruvec_kmem_state The *_lruvec_slab_state is also suitable for pages allocated from buddy, not just for the slab objects. But the function name seems to tell us that only slab object is applicable. So we can rename the keyword of slab to kmem. Link: https://lkml.kernel.org/r/20201117085249.24319-1-songmuchun@bytedance.com Signed-off-by: Muchun Song Acked-by: Roman Gushchin Reviewed-by: Shakeel Butt Acked-by: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fe6960cb387ff644ec9a1d19e7179e1a29df885e Author: Lukas Bulwahn Date: Mon Dec 14 19:07:01 2020 -0800 mm: memcg: remove obsolete memcg_has_children() Commit 2ef1bf118c40 ("mm: memcg: deprecate the non-hierarchical mode") removed the only use of memcg_has_children() in mem_cgroup_hierarchy_write() as part of the feature deprecation. Hence, since then, make CC=clang W=1 warns: mm/memcontrol.c:3421:20: warning: unused function 'memcg_has_children' [-Wunused-function] Simply remove this obsolete unused function. Link: https://lkml.kernel.org/r/20201116055043.20886-1-lukas.bulwahn@gmail.com Signed-off-by: Lukas Bulwahn Acked-by: Roman Gushchin Reviewed-by: Nathan Chancellor Acked-by: Michal Hocko Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 13064781304eb544066b9da403c95d05c0ea3624 Author: Hui Su Date: Mon Dec 14 19:06:58 2020 -0800 mm/page_counter: use page_counter_read in page_counter_set_max Use page_counter_read() in page_counter_set_max(). Link: https://lkml.kernel.org/r/20201113141048.GA178922@rlk Signed-off-by: Hui Su Reviewed-by: Pankaj Gupta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9d9d341df4d519d96e7927941d91f5785c5cea07 Author: Roman Gushchin Date: Mon Dec 14 19:06:55 2020 -0800 cgroup: remove obsoleted broken_hierarchy and warned_broken_hierarchy With the deprecation of the non-hierarchical mode of the memory controller there are no more examples of broken hierarchies left. Let's remove the cgroup core code which was supposed to print warnings about creating of broken hierarchies. Link: https://lkml.kernel.org/r/20201110220800.929549-4-guro@fb.com Signed-off-by: Roman Gushchin Reviewed-by: Shakeel Butt Acked-by: David Rientjes Acked-by: Johannes Weiner Cc: Michal Hocko Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 184218639a6f2a1cb84cf3ba583cee93a3ff4b81 Author: Roman Gushchin Date: Mon Dec 14 19:06:52 2020 -0800 docs: cgroup-v1: reflect the deprecation of the non-hierarchical mode Update cgroup v1 docs after the deprecation of the non-hierarchical mode of the memory controller. Link: https://lkml.kernel.org/r/20201110220800.929549-3-guro@fb.com Signed-off-by: Roman Gushchin Reviewed-by: Shakeel Butt Acked-by: Michal Hocko Acked-by: David Rientjes Acked-by: Johannes Weiner Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bef8620cd8e0a117c1a0719604052e424eb418f9 Author: Roman Gushchin Date: Mon Dec 14 19:06:49 2020 -0800 mm: memcg: deprecate the non-hierarchical mode Patch series "mm: memcg: deprecate cgroup v1 non-hierarchical mode", v1. The non-hierarchical cgroup v1 mode is a legacy of early days of the memory controller and doesn't bring any value today. However, it complicates the code and creates many edge cases all over the memory controller code. It's a good time to deprecate it completely. This patchset removes the internal logic, adjusts the user interface and updates the documentation. The alt patch removes some bits of the cgroup core code, which become obsolete. Michal Hocko said: "All that we know today is that we have a warning in place to complain loudly when somebody relies on use_hierarchy=0 with a deeper hierarchy. For all those years we have seen _zero_ reports that would describe a sensible usecase. Moreover we (SUSE) have backported this warning into old distribution kernels (since 3.0 based kernels) to extend the coverage and didn't hear even for users who adopt new kernels only very slowly. The only report we have seen so far was a LTP test suite which doesn't really reflect any real life usecase" This patch (of 3): The non-hierarchical cgroup v1 mode is a legacy of early days of the memory controller and doesn't bring any value today. However, it complicates the code and creates many edge cases all over the memory controller code. It's a good time to deprecate it completely. Functionally this patch enabled is by default for all cgroups and forbids switching it off. Nothing changes if cgroup v2 is used: hierarchical mode was enforced from scratch. To protect the ABI memory.use_hierarchy interface is preserved with a limited functionality: reading always returns "1", writing of "1" passes silently, writing of any other value fails with -EINVAL and a warning to dmesg (on the first occasion). Link: https://lkml.kernel.org/r/20201110220800.929549-1-guro@fb.com Link: https://lkml.kernel.org/r/20201110220800.929549-2-guro@fb.com Signed-off-by: Roman Gushchin Acked-by: Michal Hocko Reviewed-by: Shakeel Butt Acked-by: David Rientjes Acked-by: Johannes Weiner Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a7cb874bfff785d39de6cc847673539cb3540821 Author: Roman Gushchin Date: Mon Dec 14 19:06:45 2020 -0800 mm: memcg: fix obsolete code comments This patch fixes/removes some obsolete comments in the code related to the kernel memory accounting: - kmem_cache->memcg_params.memcg_caches has been removed by commit 9855609bde03 ("mm: memcg/slab: use a single set of kmem_caches for all accounted allocations") - memcg->kmemcg_id is not used as a gate for kmem accounting since commit 0b8f73e10428 ("mm: memcontrol: clean up alloc, online, offline, free functions") Link: https://lkml.kernel.org/r/20201110184615.311974-1-guro@fb.com Signed-off-by: Roman Gushchin Acked-by: Johannes Weiner Reviewed-by: Shakeel Butt Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a5eb011afe07077e19dbefa6e6259b667dd27aa0 Author: Alex Shi Date: Mon Dec 14 19:06:42 2020 -0800 mm/memcg: update page struct member in comments The page->mem_cgroup member is replaced by memcg_data, and add a helper page_memcg() for it. Need to update comments to avoid confusing. Link: https://lkml.kernel.org/r/1491c150-1cc0-6062-08ea-9c891548a3bc@linux.alibaba.com Signed-off-by: Alex Shi Acked-by: Roman Gushchin Cc: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 013339df116c2ee0d796dd8bfb8f293a2030c063 Author: Shakeel Butt Date: Mon Dec 14 19:06:39 2020 -0800 mm/rmap: always do TTU_IGNORE_ACCESS Since commit 369ea8242c0f ("mm/rmap: update to new mmu_notifier semantic v2"), the code to check the secondary MMU's page table access bit is broken for !(TTU_IGNORE_ACCESS) because the page is unmapped from the secondary MMU's page table before the check. More specifically for those secondary MMUs which unmap the memory in mmu_notifier_invalidate_range_start() like kvm. However memory reclaim is the only user of !(TTU_IGNORE_ACCESS) or the absence of TTU_IGNORE_ACCESS and it explicitly performs the page table access check before trying to unmap the page. So, at worst the reclaim will miss accesses in a very short window if we remove page table access check in unmapping code. There is an unintented consequence of !(TTU_IGNORE_ACCESS) for the memcg reclaim. From memcg reclaim the page_referenced() only account the accesses from the processes which are in the same memcg of the target page but the unmapping code is considering accesses from all the processes, so, decreasing the effectiveness of memcg reclaim. The simplest solution is to always assume TTU_IGNORE_ACCESS in unmapping code. Link: https://lkml.kernel.org/r/20201104231928.1494083-1-shakeelb@google.com Fixes: 369ea8242c0f ("mm/rmap: update to new mmu_notifier semantic v2") Signed-off-by: Shakeel Butt Acked-by: Johannes Weiner Cc: Hugh Dickins Cc: Jerome Glisse Cc: Vlastimil Babka Cc: Michal Hocko Cc: Andrea Arcangeli Cc: Dan Williams Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit eefbfa7fd678805b38a46293e78543f98f353d3e Author: Muchun Song Date: Mon Dec 14 19:06:35 2020 -0800 mm: memcg/slab: fix use after free in obj_cgroup_charge The rcu_read_lock/unlock only can guarantee that the memcg will not be freed, but it cannot guarantee the success of css_get to memcg. If the whole process of a cgroup offlining is completed between reading a objcg->memcg pointer and bumping the css reference on another CPU, and there are exactly 0 external references to this memory cgroup (how we get to the obj_cgroup_charge() then?), css_get() can change the ref counter from 0 back to 1. Link: https://lkml.kernel.org/r/20201028035013.99711-2-songmuchun@bytedance.com Fixes: bf4f059954dc ("mm: memcg/slab: obj_cgroup API") Signed-off-by: Muchun Song Acked-by: Roman Gushchin Reviewed-by: Shakeel Butt Cc: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Cc: Joonsoo Kim Cc: Yafang Shao Cc: Chris Down Cc: Christian Brauner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2f7659a314736b32b66273dbf91c19874a052fde Author: Muchun Song Date: Mon Dec 14 19:06:31 2020 -0800 mm: memcg/slab: fix return of child memcg objcg for root memcg Consider the following memcg hierarchy. root / \ A B If we failed to get the reference on objcg of memcg A, the get_obj_cgroup_from_current can return the wrong objcg for the root memcg. Link: https://lkml.kernel.org/r/20201029164429.58703-1-songmuchun@bytedance.com Fixes: bf4f059954dc ("mm: memcg/slab: obj_cgroup API") Signed-off-by: Muchun Song Acked-by: Roman Gushchin Cc: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Cc: Shakeel Butt Cc: Joonsoo Kim Cc: Yafang Shao Cc: Chris Down Cc: Christian Brauner Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Kees Cook Cc: Thomas Gleixner Cc: Eugene Syromiatnikov Cc: Suren Baghdasaryan Cc: Adrian Reber Cc: Marco Elver Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 378876b0e3782daacb7848db03679d6f76c82265 Author: Miaohe Lin Date: Mon Dec 14 19:06:28 2020 -0800 mm: memcontrol: eliminate redundant check in __mem_cgroup_insert_exceeded() The mz->usage_in_excess >= mz_node->usage_in_excess check is exactly the else case of mz->usage_in_excess < mz_node->usage_in_excess. So we could replace else if (mz->usage_in_excess >= mz_node->usage_in_excess) with else equally. Also drop the comment which doesn't really explain much. Link: https://lkml.kernel.org/r/20201012131607.10656-1-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Acked-by: Michal Hocko Acked-by: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1a984c4e8200e0e58bb316f14a4bebb28d32d15a Author: Muchun Song Date: Mon Dec 14 19:06:24 2020 -0800 mm: memcontrol: remove unused mod_memcg_obj_state() Since commit 991e7673859e ("mm: memcontrol: account kernel stack per node") there is no user of the mod_memcg_obj_state(). So just remove it. Also rework type of the idx parameter of the mod_objcg_state() from int to enum node_stat_item. Link: https://lkml.kernel.org/r/20201013153504.92602-1-songmuchun@bytedance.com Signed-off-by: Muchun Song Acked-by: Roman Gushchin Acked-by: David Rientjes Reviewed-by: Shakeel Butt Cc: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Cc: Christopher Lameter Cc: Pekka Enberg Cc: Joonsoo Kim Cc: Vlastimil Babka Cc: Yafang Shao Cc: Chris Down Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b8eddff8886b173b0a0f21a3bb1a594cc6d974d1 Author: Johannes Weiner Date: Mon Dec 14 19:06:20 2020 -0800 mm: memcontrol: add file_thp, shmem_thp to memory.stat As huge page usage in the page cache and for shmem files proliferates in our production environment, the performance monitoring team has asked for per-cgroup stats on those pages. We already track and export anon_thp per cgroup. We already track file THP and shmem THP per node, so making them per-cgroup is only a matter of switching from node to lruvec counters. All callsites are in places where the pages are charged and locked, so page->memcg is stable. [hannes@cmpxchg.org: add documentation] Link: https://lkml.kernel.org/r/20201026174029.GC548555@cmpxchg.org Link: https://lkml.kernel.org/r/20201022151844.489337-1-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Reviewed-by: Rik van Riel Reviewed-by: Shakeel Butt Acked-by: David Rientjes Acked-by: Michal Hocko Acked-by: Song Liu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f38d58b7343882f5412a5e5719d9b302f305f2d1 Author: Randy Dunlap Date: Mon Dec 14 19:06:17 2020 -0800 tmpfs: fix Documentation nits Fix a typo, punctuation, use uppercase for CPUs, and limit tmpfs to keeping only its files in virtual memory (phrasing). Link: https://lkml.kernel.org/r/20201202010934.18566-1-rdunlap@infradead.org Signed-off-by: Randy Dunlap Acked-by: Hugh Dickins Cc: Chris Down Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 30e6a51dbb0594d79dc2a9543659c1d596e2f7d4 Author: Hui Su Date: Mon Dec 14 19:06:14 2020 -0800 mm/shmem.c: make shmem_mapping() inline shmem_mapping() isn't worth an out-of-line call from any callsite. So make it inline by - make shmem_aops global - export shmem_aops - inline the shmem_mapping() and replace the direct call 'shmem_aops' with shmem_mapping() in shmem.c. Link: https://lkml.kernel.org/r/20201115165207.GA265355@rlk Signed-off-by: Hui Su Acked-by: Vlastimil Babka Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 462680946b6d982afdda3bf5f7de3c379cb8c97b Author: Jeff Layton Date: Mon Dec 14 19:06:11 2020 -0800 mm: remove pagevec_lookup_range_nr_tag() With the merge of commit 2e1692966034 ("ceph: have ceph_writepages_start call pagevec_lookup_range_tag"), nothing calls this anymore. Link: https://lkml.kernel.org/r/20201021193926.101474-1-jlayton@kernel.org Signed-off-by: Jeff Layton Reviewed-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 661c7566438119cbf490b0b359ee69a0f9dbaf9a Author: Miaohe Lin Date: Mon Dec 14 19:06:07 2020 -0800 mm/swapfile.c: use memset to fill the swap_map with SWAP_HAS_CACHE We could use helper memset to fill the swap_map with SWAP_HAS_CACHE instead of a direct loop here to simplify the code. Also we can remove the local variable i and map this way. Link: https://lkml.kernel.org/r/20200921122224.7139-1-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9d9a03340309cb8065503cfa3c5c5fc8b7670230 Author: Miaohe Lin Date: Mon Dec 14 19:06:04 2020 -0800 mm/swapfile.c: remove unnecessary out label in __swap_duplicate() When the code went to the out label, it must have p == NULL. So what out label really does is redundant if check and return err. We should Remove this unnecessary out label because it does not handle resource free and so on. Link: https://lkml.kernel.org/r/20201009130337.29698-1-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e97af69950ffe8be4ee12b331924b8de8a17b73e Author: Miaohe Lin Date: Mon Dec 14 19:06:01 2020 -0800 mm/swap_state: skip meaningless swap cache readahead when ra_info.win == 0 swap_ra_info() may leave ra_info untouched in non_swap_entry() case as page table lock is not held. In this case, we have ra_info.nr_pte == 0 and it is meaningless to continue with swap cache readahead. Skip such ops by init ra_info.win = 1. [akpm@linux-foundation.org: clean up struct init] Link: https://lkml.kernel.org/r/20201009133059.58407-1-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d8aa24e04fb2a74dac0f7709da36950da5502be1 Author: Miaohe Lin Date: Mon Dec 14 19:05:58 2020 -0800 mm/swapfile.c: use helper function swap_count() in add_swap_count_continuation() Commit 570a335b8e22 ("swap_info: swap count continuations") introduced the func add_swap_count_continuation() but forgot to use the helper function swap_count() introduced by commit 355cfa73ddff ("mm: modify swap_map and add SWAP_HAS_CACHE flag"). Link: https://lkml.kernel.org/r/20201009134306.18033-1-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 43fbdeb349640e3d763f0eb52b6aef92d4e2ec17 Author: Ralph Campbell Date: Mon Dec 14 19:05:55 2020 -0800 mm: handle zone device pages in release_pages() release_pages() is an optimized, inlined version of __put_pages() except that zone device struct pages that are not page_is_devmap_managed() (i.e., memory_type MEMORY_DEVICE_GENERIC and MEMORY_DEVICE_PCI_P2PDMA), fall through to the code that could return the zone device page to the page allocator instead of adjusting the pgmap reference count. Clearly these type of pages are not having the reference count decremented to zero via release_pages() or page allocation problems would be seen. Just to be safe, handle the 1 to zero case in release_pages() like __put_page() does. Link: https://lkml.kernel.org/r/20201021194733.11530-1-rcampbell@nvidia.com Signed-off-by: Ralph Campbell Reviewed-by: Christoph Hellwig Cc: Jerome Glisse Cc: John Hubbard Cc: Alistair Popple Cc: Jason Gunthorpe Cc: Dan Williams Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4509b42c38963f495b49aa50209c34337286ecbe Author: Jason Gunthorpe Date: Mon Dec 14 19:05:51 2020 -0800 mm/gup: combine put_compound_head() and unpin_user_page() These functions accomplish the same thing but have different implementations. unpin_user_page() has a bug where it calls mod_node_page_state() after calling put_page() which creates a risk that the page could have been hot-uplugged from the system. Fix this by using put_compound_head() as the only implementation. __unpin_devmap_managed_user_page() and related can be deleted as well in favour of the simpler, but slower, version in put_compound_head() that has an extra atomic page_ref_sub, but always calls put_page() which internally contains the special devmap code. Move put_compound_head() to be directly after try_grab_compound_head() so people can find it in future. Link: https://lkml.kernel.org/r/0-v1-6730d4ee0d32+40e6-gup_combine_put_jgg@nvidia.com Fixes: 1970dc6f5226 ("mm/gup: /proc/vmstat: pin_user_pages (FOLL_PIN) reporting") Signed-off-by: Jason Gunthorpe Reviewed-by: John Hubbard Reviewed-by: Ira Weiny Reviewed-by: Jan Kara CC: Joao Martins CC: Jonathan Corbet CC: Dan Williams CC: Dave Chinner CC: Christoph Hellwig CC: Jane Chu CC: "Kirill A. Shutemov" CC: Michal Hocko CC: Mike Kravetz CC: Shuah Khan CC: Muchun Song CC: Vlastimil Babka CC: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 52650c8b466bac399aec213c61d74bfe6f7af1a4 Author: Jason Gunthorpe Date: Mon Dec 14 19:05:48 2020 -0800 mm/gup: remove the vma allocation from gup_longterm_locked() Long ago there wasn't a FOLL_LONGTERM flag so this DAX check was done by post-processing the VMA list. These days it is trivial to just check each VMA to see if it is DAX before processing it inside __get_user_pages() and return failure if a DAX VMA is encountered with FOLL_LONGTERM. Removing the allocation of the VMA list is a significant speed up for many call sites. Add an IS_ENABLED to vma_is_fsdax so that code generation is unchanged when DAX is compiled out. Remove the dummy version of __gup_longterm_locked() as !CONFIG_CMA already makes memalloc_nocma_save(), check_and_migrate_cma_pages(), and memalloc_nocma_restore() into a NOP. Link: https://lkml.kernel.org/r/0-v1-5551df3ed12e+b8-gup_dax_speedup_jgg@nvidia.com Signed-off-by: Jason Gunthorpe Reviewed-by: Ira Weiny Cc: Dan Williams Cc: John Hubbard Cc: Pavel Tatashin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 57efa1fe5957694fa541c9062de0a127f0b9acb0 Author: Jason Gunthorpe Date: Mon Dec 14 19:05:44 2020 -0800 mm/gup: prevent gup_fast from racing with COW during fork Since commit 70e806e4e645 ("mm: Do early cow for pinned pages during fork() for ptes") pages under a FOLL_PIN will not be write protected during COW for fork. This means that pages returned from pin_user_pages(FOLL_WRITE) should not become write protected while the pin is active. However, there is a small race where get_user_pages_fast(FOLL_PIN) can establish a FOLL_PIN at the same time copy_present_page() is write protecting it: CPU 0 CPU 1 get_user_pages_fast() internal_get_user_pages_fast() copy_page_range() pte_alloc_map_lock() copy_present_page() atomic_read(has_pinned) == 0 page_maybe_dma_pinned() == false atomic_set(has_pinned, 1); gup_pgd_range() gup_pte_range() pte_t pte = gup_get_pte(ptep) pte_access_permitted(pte) try_grab_compound_head() pte = pte_wrprotect(pte) set_pte_at(); pte_unmap_unlock() // GUP now returns with a write protected page The first attempt to resolve this by using the write protect caused problems (and was missing a barrrier), see commit f3c64eda3e50 ("mm: avoid early COW write protect games during fork()") Instead wrap copy_p4d_range() with the write side of a seqcount and check the read side around gup_pgd_range(). If there is a collision then get_user_pages_fast() fails and falls back to slow GUP. Slow GUP is safe against this race because copy_page_range() is only called while holding the exclusive side of the mmap_lock on the src mm_struct. [akpm@linux-foundation.org: coding style fixes] Link: https://lore.kernel.org/r/CAHk-=wi=iCnYCARbPGjkVJu9eyYeZ13N64tZYLdOB8CP5Q_PLw@mail.gmail.com Link: https://lkml.kernel.org/r/2-v4-908497cf359a+4782-gup_fork_jgg@nvidia.com Fixes: f3c64eda3e50 ("mm: avoid early COW write protect games during fork()") Signed-off-by: Jason Gunthorpe Suggested-by: Linus Torvalds Reviewed-by: John Hubbard Reviewed-by: Jan Kara Reviewed-by: Peter Xu Acked-by: "Ahmed S. Darwish" [seqcount_t parts] Cc: Andrea Arcangeli Cc: "Aneesh Kumar K.V" Cc: Christoph Hellwig Cc: Hugh Dickins Cc: Jann Horn Cc: Kirill Shutemov Cc: Kirill Tkhai Cc: Leon Romanovsky Cc: Michal Hocko Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c28b1fc70390df32e29991eedd52bd86e7aba080 Author: Jason Gunthorpe Date: Mon Dec 14 19:05:41 2020 -0800 mm/gup: reorganize internal_get_user_pages_fast() Patch series "Add a seqcount between gup_fast and copy_page_range()", v4. As discussed and suggested by Linus use a seqcount to close the small race between gup_fast and copy_page_range(). Ahmed confirms that raw_write_seqcount_begin() is the correct API to use in this case and it doesn't trigger any lockdeps. I was able to test it using two threads, one forking and the other using ibv_reg_mr() to trigger GUP fast. Modifying copy_page_range() to sleep made the window large enough to reliably hit to test the logic. This patch (of 2): The next patch in this series makes the lockless flow a little more complex, so move the entire block into a new function and remove a level of indention. Tidy a bit of cruft: - addr is always the same as start, so use start - Use the modern check_add_overflow() for computing end = start + len - nr_pinned/pages << PAGE_SHIFT needs the LHS to be unsigned long to avoid shift overflow, make the variables unsigned long to avoid coding casts in both places. nr_pinned was missing its cast - The handling of ret and nr_pinned can be streamlined a bit No functional change. Link: https://lkml.kernel.org/r/0-v4-908497cf359a+4782-gup_fork_jgg@nvidia.com Link: https://lkml.kernel.org/r/1-v4-908497cf359a+4782-gup_fork_jgg@nvidia.com Signed-off-by: Jason Gunthorpe Reviewed-by: Jan Kara Reviewed-by: John Hubbard Reviewed-by: Peter Xu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d0de82411864c4e1f24aaa3a653c7c08dd55c8d0 Author: Barry Song Date: Mon Dec 14 19:05:38 2020 -0800 mm/gup_test: GUP_TEST depends on DEBUG_FS Without DEBUG_FS, all the code in gup_benchmark becomes meaningless. For sure kernel provides debugfs stub while DEBUG_FS is disabled, but the point here is that GUP_TEST can do nothing without DEBUG_FS. [song.bao.hua@hisilicon.com: add comment as a prompt to users as commented by John and Randy] Link: https://lkml.kernel.org/r/20201108083732.15336-1-song.bao.hua@hisilicon.com Link: https://lkml.kernel.org/r/20201104100552.20156-1-song.bao.hua@hisilicon.com Signed-off-by: Barry Song Suggested-by: John Garry Reviewed-by: John Hubbard Acked-by: Randy Dunlap Cc: Ralph Campbell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit afaa78886f218d840414c88c2eb7bb80666d79eb Author: Barry Song Date: Mon Dec 14 19:05:34 2020 -0800 mm/gup_test.c: mark gup_test_init as __init function gup_test_init() is only called during initialization, mark it as __init to save some memory. Link: https://lkml.kernel.org/r/20201103081016.16532-1-song.bao.hua@hisilicon.com Signed-off-by: Barry Song Reviewed-by: Jason Gunthorpe Cc: John Hubbard Cc: Ralph Campbell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a26c4c62990a3ad5061f72e68f2394a01480265d Author: John Hubbard Date: Mon Dec 14 19:05:31 2020 -0800 selftests/vm: 2x speedup for run_vmtests.sh Each invocation of userfaultfd for "anon" and "shmem" was taking about 6.5 sec to run, contributing to an overall run time of about 22 sec for run_vmtests.sh. Reduce the size and bounce input values to the userfaultfd invocation within run_vmtests.sh, enough to get each invocation down to about 1.0 sec. This should still provide a reasonable smoke test, while staying within a nominal time budget of around 1 second or so per test. And this brings the overall running time of run_vmtests.sh down to 11 second. Link: https://lkml.kernel.org/r/20201026064021.3545418-10-jhubbard@nvidia.com Signed-off-by: John Hubbard Cc: Mike Rapoport Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f3a45709d2bb1b6cbab2899a6c8e75dfb8e4aad7 Author: John Hubbard Date: Mon Dec 14 19:05:28 2020 -0800 selftests/vm: hmm-tests: remove the libhugetlbfs dependency HMM selftests are incredibly useful, but they are only effective if people actually build and run them. All the other tests in selftests/vm can be built with very standard, always-available libraries: libpthread, librt. The hmm-tests.c program, on the other hand, requires something that is (much) less readily available: libhugetlbfs. And so the build will typically fail for many developers. A simple attempt to install libhugetlbfs will also run into complications on some common distros these days: Fedora and Arch Linux (yes, Arch AUR has it, but that's fragile, as always with AUR). The library is not maintained actively enough at the moment, for distros to deal with it. I had to build it from source, for Fedora, and that didn't go too smoothly either. It turns out that, out of 21 tests in hmm-tests.c, only 2 actually require functionality from libhugetlbfs. Therefore, if libhugetlbfs is missing, simply ifdef those two tests out and allow the developer to at least have the other 19 tests, if they don't want to pause to work through the above issues. Also issue a warning, so that it's clear that there is an imperfection in the build. In order to do that, a tiny shell script (check_config.sh) runs a quick compile (not link, that's too prone to false failures with library paths), and basically, if the compiler doesn't find hugetlbfs.h in its standard locations, then the script concludes that libhugetlbfs is not available. The output is in two files, one for inclusion in hmm-test.c (local_config.h), and one for inclusion in the Makefile (local_config.mk). Link: https://lkml.kernel.org/r/20201026064021.3545418-9-jhubbard@nvidia.com Signed-off-by: John Hubbard Cc: Ralph Campbell Cc: Jérôme Glisse Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d943fe81e0bf49dda1369e87d49c5276a02698df Author: John Hubbard Date: Mon Dec 14 19:05:24 2020 -0800 selftests/vm: run_vmtests.sh: update and clean up gup_test invocation Run benchmarks on the _fast variants of gup and pup, as originally intended. Run the new gup_test sub-test: dump pages. In addition to exercising the dump_page() call, it also demonstrates the various options you can use to specify which pages to dump, and how. Link: https://lkml.kernel.org/r/20201026064021.3545418-8-jhubbard@nvidia.com Signed-off-by: John Hubbard Cc: Jérôme Glisse Cc: Jonathan Corbet Cc: Ralph Campbell Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f4f9bda418ab8b4dbc5372e9e2a28162f7777154 Author: John Hubbard Date: Mon Dec 14 19:05:21 2020 -0800 selftests/vm: gup_test: introduce the dump_pages() sub-test For quite a while, I was doing a quick hack to gup_test.c (previously, gup_benchmark.c) whenever I wanted to try out my changes to dump_page(). This makes that hack unnecessary, and instead allows anyone to easily get the same coverage from a user space program. That saves a lot of time because you don't have to change the kernel, in order to test different pages and options. The new sub-test takes advantage of the existing gup_test infrastructure, which already provides a simple user space program, some allocated user space pages, an ioctl call, pinning of those pages (via either get_user_pages or pin_user_pages) and a corresponding kernel-side test invocation. There's not much more required, mainly just a couple of inputs from the user. In fact, the new test re-uses the existing command line options in order to get various helpful combinations (THP or normal, _fast or slow gup, gup vs. pup, and more). New command line options are: which pages to dump, and what type of "get/pin" to use. In order to figure out which pages to dump, the logic is: * If the user doesn't specify anything, the page 0 (the first page in the address range that the program sets up for testing) is dumped. * Or, the user can type up to 8 page indices anywhere on the command line. If you type more than 8, then it uses the first 8 and ignores the remaining items. For example: ./gup_test -ct -F 1 0 19 0x1000 Meaning: -c: dump pages sub-test -t: use THP pages -F 1: use pin_user_pages() instead of get_user_pages() 0 19 0x1000: dump pages 0, 19, and 4096 Link: https://lkml.kernel.org/r/20201026064021.3545418-7-jhubbard@nvidia.com Signed-off-by: John Hubbard Cc: Jérôme Glisse Cc: Jonathan Corbet Cc: Ralph Campbell Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a9bed1e1c2a9bb36cdd29af0ef48044d1b9e8c2a Author: John Hubbard Date: Mon Dec 14 19:05:17 2020 -0800 selftests/vm: only some gup_test items are really benchmarks Therefore, some minor cleanup and improvements are in order: 1. Rename the other items appropriately. 2. Stop reporting timing information on the non-benchmark items. It's still being recorded and is available, but there's no point in cluttering up the report with data that no one reasonably needs to check. 3. Don't do iterations, for non-benchmark items. 4. Print out a shorter, more appropriate report for the non-benchmark tests. 5. Add the command that was run, to the report. This really helps, as there are quite a lot of options now. 6. Use a larger integer type for cmd, now that it's being compared Otherwise it doesn't work, because in this case cmd is about 3 billion, which is the perfect size for problems with signed vs unsigned int. Link: https://lkml.kernel.org/r/20201026064021.3545418-6-jhubbard@nvidia.com Signed-off-by: John Hubbard Cc: Jérôme Glisse Cc: Jonathan Corbet Cc: Ralph Campbell Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f545605cc08e1f1820b4c8748689e7c6d4365d99 Author: John Hubbard Date: Mon Dec 14 19:05:14 2020 -0800 selftests/vm: minor cleanup: Makefile and gup_test.c A few cleanups that don't deserve separate patches, but that also should not clutter up other functional changes: 1. Remove an unnecessary #include 2. Restore the sorted order of TEST_GEN_FILES. 3. Add -lpthread to the common LDLIBS, as it is harmless and several tests use it. This gets rid of one special rule already. Link: https://lkml.kernel.org/r/20201026064021.3545418-5-jhubbard@nvidia.com Signed-off-by: John Hubbard Cc: Jérôme Glisse Cc: Jonathan Corbet Cc: Ralph Campbell Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c2aa8afc36fa8669ac165ace1f4d7173f21f367f Author: John Hubbard Date: Mon Dec 14 19:05:11 2020 -0800 selftests/vm: rename run_vmtests --> run_vmtests.sh Rename to *.sh, in order to match the conventions of all of the other items in selftest/vm. The only reason not to use a .sh suffix a shell script like this, might be to make it look more like a normal program, but that's not an issue here. Link: https://lkml.kernel.org/r/20201026064021.3545418-4-jhubbard@nvidia.com Signed-off-by: John Hubbard Cc: Jérôme Glisse Cc: Jonathan Corbet Cc: Ralph Campbell Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b9dcfdff8b4b223280015281b5050976c484c80a Author: John Hubbard Date: Mon Dec 14 19:05:08 2020 -0800 selftests/vm: use a common gup_test.h Avoid the need to copy-paste the gup_test ioctl commands and the struct gup_test definition, between the kernel and the user space application, by providing a new header file for these. This allows easier and safer adding of new ioctl calls, as well as reducing the overall line count. Details: The header file has to be able to compile independently, because of the arguably unfortunate way that the Makefile is written: the Makefile tries to build all of its prerequisites, when really it should be only building the .c files, and leaving the other prerequisites (LOCAL_HDRS) as pure dependencies. That Makefile limitation is probably not worth fixing, but it explains why one of the includes had to be moved into the new header file. Also: simplify the ioctl struct (struct gup_test), by deleting the unused __expansion[10] field. This sort of thing is what you might see in a stable ABI, but this low-level, kernel-developer-oriented selftests/vm system is very much not subject to ABI stability. So "expansion" and "reserved" fields are unnecessary here. Link: https://lkml.kernel.org/r/20201026064021.3545418-3-jhubbard@nvidia.com Signed-off-by: John Hubbard Cc: Jérôme Glisse Cc: Jonathan Corbet Cc: Ralph Campbell Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9c84f229268fa229e250b7225611d0eb7094fea0 Author: John Hubbard Date: Mon Dec 14 19:05:05 2020 -0800 mm/gup_benchmark: rename to mm/gup_test Patch series "selftests/vm: gup_test, hmm-tests, assorted improvements", v3. Summary: This series provides two main things, and a number of smaller supporting goodies. The two main points are: 1) Add a new sub-test to gup_test, which in turn is a renamed version of gup_benchmark. This sub-test allows nicer testing of dump_pages(), at least on user-space pages. For quite a while, I was doing a quick hack to gup_test.c whenever I wanted to try out changes to dump_page(). Then Matthew Wilcox asked me what I meant when I said "I used my dump_page() unit test", and I realized that it might be nice to check in a polished up version of that. Details about how it works and how to use it are in the commit description for patch #6 ("selftests/vm: gup_test: introduce the dump_pages() sub-test"). 2) Fixes a limitation of hmm-tests: these tests are incredibly useful, but only if people actually build and run them. And it turns out that libhugetlbfs is a little too effective at throwing a wrench in the works, there. So I've added a little configuration check that removes just two of the 21 hmm-tests, if libhugetlbfs is not available. Further details in the commit description of patch #8 ("selftests/vm: hmm-tests: remove the libhugetlbfs dependency"). Other smaller things that this series does: a) Remove code duplication by creating gup_test.h. b) Clear up the sub-test organization, and their invocation within run_vmtests.sh. c) Other minor assorted improvements. [1] v2 is here: https://lore.kernel.org/linux-doc/20200929212747.251804-1-jhubbard@nvidia.com/ [2] https://lore.kernel.org/r/CAHk-=wgh-TMPHLY3jueHX7Y2fWh3D+nMBqVS__AZm6-oorquWA@mail.gmail.com This patch (of 9): Rename nearly every "gup_benchmark" reference and file name to "gup_test". The one exception is for the actual gup benchmark test itself. The current code already does a *little* bit more than benchmarking, and definitely covers more than get_user_pages_fast(). More importantly, however, subsequent patches are about to add some functionality that is non-benchmark related. Closely related changes: * Kconfig: in addition to renaming the options from GUP_BENCHMARK to GUP_TEST, update the help text to reflect that it's no longer a benchmark-only test. Link: https://lkml.kernel.org/r/20201026064021.3545418-1-jhubbard@nvidia.com Link: https://lkml.kernel.org/r/20201026064021.3545418-2-jhubbard@nvidia.com Signed-off-by: John Hubbard Cc: Jonathan Corbet Cc: Jérôme Glisse Cc: Ralph Campbell Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 800bca7c56023c2a89fe9a206a56f3788b54f767 Author: Hailong Liu Date: Mon Dec 14 19:05:02 2020 -0800 mm/filemap.c: remove else after a return The `else' is not useful after a `return' in __lock_page_or_retry(). [akpm@linux-foundation.org: coding style fixes] Link: https://lkml.kernel.org/r/20201202154720.115162-1-carver4lio@163.com Signed-off-by: Hailong Liu Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 649c6dfed0302620a191ca91196d923463cfa766 Author: Alex Shi Date: Mon Dec 14 19:04:59 2020 -0800 mm/truncate: add parameter explanation for invalidate_mapping_pagevec To fix a kernel-doc markups issue: mm/truncate.c:646: warning: Function parameter or member 'mapping' not described in 'invalidate_mapping_pagevec' mm/truncate.c:646: warning: Function parameter or member 'start' not described in 'invalidate_mapping_pagevec' mm/truncate.c:646: warning: Function parameter or member 'end' not described in 'invalidate_mapping_pagevec' mm/truncate.c:646: warning: Function parameter or member 'nr_pagevec' not described in 'invalidate_mapping_pagevec' Link: https://lkml.kernel.org/r/1605605088-30668-1-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Alex Shi Cc: Jonathan Corbet Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 06c0444290cecf04c89c62e6d448b8461507d247 Author: Kent Overstreet Date: Mon Dec 14 19:04:56 2020 -0800 mm/filemap.c: generic_file_buffered_read() now uses find_get_pages_contig Convert generic_file_buffered_read() to get pages to read from in batches, and then copy data to userspace from many pages at once - in particular, we now don't touch any cachelines that might be contended while we're in the loop to copy data to userspace. This is is a performance improvement on workloads that do buffered reads with large blocksizes, and a very large performance improvement if that file is also being accessed concurrently by different threads. On smaller reads (512 bytes), there's a very small performance improvement (1%, within the margin of error). akpm: kernel test robot found a 32% speedup on one test: https://lkml.kernel.org/r/20201030081456.GY31092@shao2-debian Link: https://lkml.kernel.org/r/20201025212949.602194-3-kent.overstreet@gmail.com Signed-off-by: Kent Overstreet Cc: Jens Axboe Cc: Matthew Wilcox (Oracle) Cc: kernel test robot Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 723ef24b9b379e59facc65de8c065c8b89d479cd Author: Kent Overstreet Date: Mon Dec 14 19:04:52 2020 -0800 mm/filemap/c: break generic_file_buffered_read up into multiple functions Patch series "generic_file_buffered_read() improvements", v2. generic_file_buffered_read() has turned into a real monstrosity to work with. And it's a major performance improvement, for both small random and large sequential reads. On my test box, 4k buffered random reads go from ~150k to ~250k iops, and the improvements to big sequential reads are even bigger. This incorporates the fix for IOCB_WAITQ handling that Jens just posted as well, also factors out lock_page_for_iocb() to improve handling of the various iocb flags. This patch (of 2): This is prep work for changing generic_file_buffered_read() to use find_get_pages_contig() to batch up all the pagecache lookups. This patch should be functionally identical to the existing code and changes as little as of the flow control as possible. More refactoring could be done, this patch is intended to be relatively minimal. Link: https://lkml.kernel.org/r/20201025212949.602194-1-kent.overstreet@gmail.com Link: https://lkml.kernel.org/r/20201025212949.602194-2-kent.overstreet@gmail.com Signed-off-by: Kent Overstreet Cc: Matthew Wilcox (Oracle) Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9cc7e96aa846f9086431d6c2d33ff9ab42d72b2d Author: Liam Mark Date: Mon Dec 14 19:04:49 2020 -0800 mm/page_owner: record timestamp and pid Collect the time for each allocation recorded in page owner so that allocation "surges" can be measured. Record the pid for each allocation recorded in page owner so that the source of allocation "surges" can be better identified. The above is very useful when doing memory analysis. On a crash for example, we can get this information from kdump (or ramdump) and parse it to figure out memory allocation problems. Please note that on x86_64 this increases the size of struct page_owner from 16 bytes to 32. Vlastimil: it's not a functionality intended for production, so unless somebody says they need to enable page_owner for debugging and this increase prevents them from fitting into available memory, let's not complicate things with making this optional. [lmark@codeaurora.org: v3] Link: https://lkml.kernel.org/r/20201210160357.27779-1-georgi.djakov@linaro.org Link: https://lkml.kernel.org/r/20201209125153.10533-1-georgi.djakov@linaro.org Signed-off-by: Liam Mark Signed-off-by: Georgi Djakov Acked-by: Vlastimil Babka Acked-by: Joonsoo Kim Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7fb7ab6d618a4dc7ea3f3eafc92388a35b4f8894 Author: Zhenhua Huang Date: Mon Dec 14 19:04:46 2020 -0800 mm: fix page_owner initializing issue for arm32 Page owner of pages used by page owner itself used is missing on arm32 targets. The reason is dummy_handle and failure_handle is not initialized correctly. Buddy allocator is used to initialize these two handles. However, buddy allocator is not ready when page owner calls it. This change fixed that by initializing page owner after buddy initialization. The working flow before and after this change are: original logic: 1. allocated memory for page_ext(using memblock). 2. invoke the init callback of page_ext_ops like page_owner(using buddy allocator). 3. initialize buddy. after this change: 1. allocated memory for page_ext(using memblock). 2. initialize buddy. 3. invoke the init callback of page_ext_ops like page_owner(using buddy allocator). with the change, failure/dummy_handle can get its correct value and page owner output for example has the one for page owner itself: Page allocated via order 2, mask 0x6202c0(GFP_USER|__GFP_NOWARN), pid 1006, ts 67278156558 ns PFN 543776 type Unmovable Block 531 type Unmovable Flags 0x0() init_page_owner+0x28/0x2f8 invoke_init_callbacks_flatmem+0x24/0x34 start_kernel+0x33c/0x5d8 Link: https://lkml.kernel.org/r/1603104925-5888-1-git-send-email-zhenhuah@codeaurora.org Signed-off-by: Zhenhua Huang Acked-by: Vlastimil Babka Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7d18dd75a8afc072aabc77f2a9c3df94cdc53f33 Author: Dan Williams Date: Mon Dec 14 19:04:43 2020 -0800 device-dax/kmem: use struct_size() Linus notes the kernel has had a nice helper for the 'size of struct with variable array member at the end' operation for a couple years now, use it. Link: http://lore.kernel.org/r/CAHk-=wgNTLbvAD8mNTvh+GQyapNWeX20PXhU_+frqEvVq4298w@mail.gmail.com Link: https://lkml.kernel.org/r/160288261564.3242821.6055291930923876456.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams Reported-by: Linus Torvalds Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 045ab8c9487ba099eade6578621e2af4a0d5ba0c Author: Bharata B Rao Date: Mon Dec 14 19:04:40 2020 -0800 mm/slub: let number of online CPUs determine the slub page order The page order of the slab that gets chosen for a given slab cache depends on the number of objects that can be fit in the slab while meeting other requirements. We start with a value of minimum objects based on nr_cpu_ids that is driven by possible number of CPUs and hence could be higher than the actual number of CPUs present in the system. This leads to calculate_order() chosing a page order that is on the higher side leading to increased slab memory consumption on systems that have bigger page sizes. Hence rely on the number of online CPUs when determining the mininum objects, thereby increasing the chances of chosing a lower conservative page order for the slab. Vlastimil said: "Ideally, we would react to hotplug events and update existing caches accordingly. But for that, recalculation of order for existing caches would have to be made safe, while not affecting hot paths. We have removed the sysfs interface with 32a6f409b693 ("mm, slub: remove runtime allocation order changes") as it didn't seem easy and worth the trouble. In case somebody wants to start with a large order right from the boot because they know they will hotplug lots of cpus later, they can use slub_min_objects= boot param to override this heuristic. So in case this change regresses somebody's performance, there's a way around it and thus the risk is low IMHO" Link: https://lkml.kernel.org/r/20201118082759.1413056-1-bharata@linux.ibm.com Signed-off-by: Bharata B Rao Acked-by: Vlastimil Babka Acked-by: Roman Gushchin Acked-by: David Rientjes Cc: Christoph Lameter Cc: Joonsoo Kim Cc: Shakeel Butt Cc: Johannes Weiner Cc: Aneesh Kumar K.V Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 965c484815f591737fb546628704d4c362317705 Author: Vlastimil Babka Date: Mon Dec 14 19:04:36 2020 -0800 mm, slub: use kmem_cache_debug_flags() in deactivate_slab() Commit 9cf7a1118365 ("mm/slub: make add_full() condition more explicit") replaced an unnecessarily generic kmem_cache_debug(s) check with an explicit check of SLAB_STORE_USER and #ifdef CONFIG_SLUB_DEBUG. We can achieve the same specific check with the recently added kmem_cache_debug_flags() which removes the #ifdef and restores the no-branch-overhead benefit of static key check when slub debugging is not enabled. Link: https://lkml.kernel.org/r/3ef24214-38c7-1238-8296-88caf7f48ab6@suse.cz Signed-off-by: Vlastimil Babka Cc: Abel Wu Cc: Christopher Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Liu Xiang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a32d654db543843a5ffb248feaec1a909718addd Author: Alexander Popov Date: Mon Dec 14 19:04:33 2020 -0800 mm/slab: rerform init_on_free earlier Currently in CONFIG_SLAB init_on_free happens too late, and heap objects go to the heap quarantine not being erased. Lets move init_on_free clearing before calling kasan_slab_free(). In that case heap quarantine will store erased objects, similarly to CONFIG_SLUB=y behavior. Link: https://lkml.kernel.org/r/20201210183729.1261524-1-alex.popov@linux.com Signed-off-by: Alexander Popov Reviewed-by: Alexander Potapenko Acked-by: David Rientjes Acked-by: Joonsoo Kim Cc: Christoph Lameter Cc: Pekka Enberg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0c06dd75514327be4b1c22b109341ff7dfeeff98 Author: Vlastimil Babka Date: Mon Dec 14 19:04:29 2020 -0800 mm, slab, slub: clear the slab_cache field when freeing page The page allocator expects that page->mapping is NULL for a page being freed. SLAB and SLUB use the slab_cache field which is in union with mapping, but before freeing the page, the field is referenced with the "mapping" name when set to NULL. It's IMHO more correct (albeit functionally the same) to use the slab_cache name as that's the field we use in SL*B, and document why we clear it in a comment (we don't clear fields such as s_mem or freelist, as page allocator doesn't care about those). While using the 'mapping' name would automagically keep the code correct if the unions in struct page changed, such changes should be done consciously and needed changes evaluated - the comment should help with that. Link: https://lkml.kernel.org/r/20201210160020.21562-1-vbabka@suse.cz Signed-off-by: Vlastimil Babka Acked-by: David Rientjes Acked-by: Joonsoo Kim Cc: Christoph Lameter Cc: Pekka Enberg Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a47fc51d8e1e9ce0f2d8fd9e5197649f00bac4ca Author: Bartosz Golaszewski Date: Mon Dec 14 19:04:25 2020 -0800 dma-buf: use krealloc_array() Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Link: https://lkml.kernel.org/r/20201109110654.12547-10-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski Acked-by: Christian König Cc: Alexander Shishkin Cc: Andy Shevchenko Cc: Borislav Petkov Cc: Borislav Petkov Cc: Christoph Lameter Cc: Daniel Vetter Cc: Daniel Vetter Cc: David Airlie Cc: David Rientjes Cc: Gustavo Padovan Cc: James Morse Cc: Jaroslav Kysela Cc: Jason Wang Cc: Joonsoo Kim Cc: Linus Walleij Cc: Maarten Lankhorst Cc: Mauro Carvalho Chehab Cc: Maxime Ripard Cc: "Michael S . Tsirkin" Cc: Pekka Enberg Cc: Robert Richter Cc: Sumit Semwal Cc: Takashi Iwai Cc: Takashi Iwai Cc: Thomas Zimmermann Cc: Tony Luck Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f8f7e2bfb1182b7d60f38a72bff1a50130186c6b Author: Bartosz Golaszewski Date: Mon Dec 14 19:04:21 2020 -0800 hwtracing: intel: use krealloc_array() Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Link: https://lkml.kernel.org/r/20201109110654.12547-9-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski Cc: Alexander Shishkin Cc: Andy Shevchenko Cc: Borislav Petkov Cc: Borislav Petkov Cc: Christian Knig Cc: Christoph Lameter Cc: Daniel Vetter Cc: Daniel Vetter Cc: David Airlie Cc: David Rientjes Cc: Gustavo Padovan Cc: James Morse Cc: Jaroslav Kysela Cc: Jason Wang Cc: Joonsoo Kim Cc: Linus Walleij Cc: Maarten Lankhorst Cc: Mauro Carvalho Chehab Cc: Maxime Ripard Cc: "Michael S . Tsirkin" Cc: Pekka Enberg Cc: Robert Richter Cc: Sumit Semwal Cc: Takashi Iwai Cc: Takashi Iwai Cc: Thomas Zimmermann Cc: Tony Luck Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 32ce25539d18fe04427c7305fdc49076f04660ac Author: Bartosz Golaszewski Date: Mon Dec 14 19:04:16 2020 -0800 drm: atomic: use krealloc_array() Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Link: https://lkml.kernel.org/r/20201109110654.12547-8-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski Acked-by: Daniel Vetter Cc: Alexander Shishkin Cc: Andy Shevchenko Cc: Borislav Petkov Cc: Borislav Petkov Cc: Christian Knig Cc: Christoph Lameter Cc: Daniel Vetter Cc: David Airlie Cc: David Rientjes Cc: Gustavo Padovan Cc: James Morse Cc: Jaroslav Kysela Cc: Jason Wang Cc: Joonsoo Kim Cc: Linus Walleij Cc: Maarten Lankhorst Cc: Mauro Carvalho Chehab Cc: Maxime Ripard Cc: "Michael S . Tsirkin" Cc: Pekka Enberg Cc: Robert Richter Cc: Sumit Semwal Cc: Takashi Iwai Cc: Takashi Iwai Cc: Thomas Zimmermann Cc: Tony Luck Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit af11be05b6d0b35da45f6457ef1f871634a50b1f Author: Bartosz Golaszewski Date: Mon Dec 14 19:04:12 2020 -0800 edac: ghes: use krealloc_array() Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Link: https://lkml.kernel.org/r/20201109110654.12547-7-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski Acked-by: Borislav Petkov Cc: Alexander Shishkin Cc: Andy Shevchenko Cc: Borislav Petkov Cc: Christian Knig Cc: Christoph Lameter Cc: Daniel Vetter Cc: Daniel Vetter Cc: David Airlie Cc: David Rientjes Cc: Gustavo Padovan Cc: James Morse Cc: Jaroslav Kysela Cc: Jason Wang Cc: Joonsoo Kim Cc: Linus Walleij Cc: Maarten Lankhorst Cc: Mauro Carvalho Chehab Cc: Maxime Ripard Cc: "Michael S . Tsirkin" Cc: Pekka Enberg Cc: Robert Richter Cc: Sumit Semwal Cc: Takashi Iwai Cc: Takashi Iwai Cc: Thomas Zimmermann Cc: Tony Luck Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2207994d014e60e74cbec216a1a0c6aab06ccc91 Author: Bartosz Golaszewski Date: Mon Dec 14 19:04:08 2020 -0800 pinctrl: use krealloc_array() Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Link: https://lkml.kernel.org/r/20201109110654.12547-6-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Cc: Alexander Shishkin Cc: Borislav Petkov Cc: Borislav Petkov Cc: Christian Knig Cc: Christoph Lameter Cc: Daniel Vetter Cc: Daniel Vetter Cc: David Airlie Cc: David Rientjes Cc: Gustavo Padovan Cc: James Morse Cc: Jaroslav Kysela Cc: Jason Wang Cc: Joonsoo Kim Cc: Linus Walleij Cc: Maarten Lankhorst Cc: Mauro Carvalho Chehab Cc: Maxime Ripard Cc: "Michael S . Tsirkin" Cc: Pekka Enberg Cc: Robert Richter Cc: Sumit Semwal Cc: Takashi Iwai Cc: Takashi Iwai Cc: Thomas Zimmermann Cc: Tony Luck Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3a99974872ccb2f625c68a7444e7575f1c7fd06d Author: Bartosz Golaszewski Date: Mon Dec 14 19:04:03 2020 -0800 vhost: vringh: use krealloc_array() Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Link: https://lkml.kernel.org/r/20201109110654.12547-5-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski Acked-by: Michael S. Tsirkin Cc: Alexander Shishkin Cc: Andy Shevchenko Cc: Borislav Petkov Cc: Borislav Petkov Cc: Christian Knig Cc: Christoph Lameter Cc: Daniel Vetter Cc: Daniel Vetter Cc: David Airlie Cc: David Rientjes Cc: Gustavo Padovan Cc: James Morse Cc: Jaroslav Kysela Cc: Jason Wang Cc: Joonsoo Kim Cc: Linus Walleij Cc: Maarten Lankhorst Cc: Mauro Carvalho Chehab Cc: Maxime Ripard Cc: Pekka Enberg Cc: Robert Richter Cc: Sumit Semwal Cc: Takashi Iwai Cc: Takashi Iwai Cc: Thomas Zimmermann Cc: Tony Luck Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 64f0bd11696508feff896215c74496e3e9af617e Author: Bartosz Golaszewski Date: Mon Dec 14 19:03:59 2020 -0800 ALSA: pcm: use krealloc_array() Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Link: https://lkml.kernel.org/r/20201109110654.12547-4-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski Reviewed-by: Takashi Iwai Cc: Alexander Shishkin Cc: Andy Shevchenko Cc: Borislav Petkov Cc: Borislav Petkov Cc: Christian Knig Cc: Christoph Lameter Cc: Daniel Vetter Cc: Daniel Vetter Cc: David Airlie Cc: David Rientjes Cc: Gustavo Padovan Cc: James Morse Cc: Jaroslav Kysela Cc: Jason Wang Cc: Joonsoo Kim Cc: Linus Walleij Cc: Maarten Lankhorst Cc: Mauro Carvalho Chehab Cc: Maxime Ripard Cc: "Michael S . Tsirkin" Cc: Pekka Enberg Cc: Robert Richter Cc: Sumit Semwal Cc: Takashi Iwai Cc: Thomas Zimmermann Cc: Tony Luck Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f0dbd2bd1c22c6670e83ddcd46a9beb8b575e86d Author: Bartosz Golaszewski Date: Mon Dec 14 19:03:55 2020 -0800 mm: slab: provide krealloc_array() When allocating an array of elements, users should check for multiplication overflow or preferably use one of the provided helpers like: kmalloc_array(). There's no krealloc_array() counterpart but there are many users who use regular krealloc() to reallocate arrays. Let's provide an actual krealloc_array() implementation. While at it: add some documentation regarding krealloc. Link: https://lkml.kernel.org/r/20201109110654.12547-3-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski Acked-by: Vlastimil Babka Cc: Alexander Shishkin Cc: Andy Shevchenko Cc: Borislav Petkov Cc: Borislav Petkov Cc: Christian Knig Cc: Christoph Lameter Cc: Daniel Vetter Cc: Daniel Vetter Cc: David Airlie Cc: David Rientjes Cc: Gustavo Padovan Cc: James Morse Cc: Jaroslav Kysela Cc: Jason Wang Cc: Joonsoo Kim Cc: Linus Walleij Cc: Maarten Lankhorst Cc: Mauro Carvalho Chehab Cc: Maxime Ripard Cc: "Michael S . Tsirkin" Cc: Pekka Enberg Cc: Robert Richter Cc: Sumit Semwal Cc: Takashi Iwai Cc: Takashi Iwai Cc: Thomas Zimmermann Cc: Tony Luck Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 15d5de496bebfd7c0261987423480e98d1a14495 Author: Bartosz Golaszewski Date: Mon Dec 14 19:03:50 2020 -0800 mm: slab: clarify krealloc()'s behavior with __GFP_ZERO Patch series "slab: provide and use krealloc_array()", v3. Andy brought to my attention the fact that users allocating an array of equally sized elements should check if the size multiplication doesn't overflow. This is why we have helpers like kmalloc_array(). However we don't have krealloc_array() equivalent and there are many users who do their own multiplication when calling krealloc() for arrays. This series provides krealloc_array() and uses it in a couple places. A separate series will follow adding devm_krealloc_array() which is needed in the xilinx adc driver. This patch (of 9): __GFP_ZERO is ignored by krealloc() (unless we fall-back to kmalloc() path, in which case it's honored). Point that out in the kerneldoc. Link: https://lkml.kernel.org/r/20201109110654.12547-1-brgl@bgdev.pl Link: https://lkml.kernel.org/r/20201109110654.12547-2-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski Cc: Andy Shevchenko Cc: Sumit Semwal Cc: Gustavo Padovan Cc: Christian Knig Cc: Mauro Carvalho Chehab Cc: Borislav Petkov Cc: Tony Luck Cc: James Morse Cc: Robert Richter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: Alexander Shishkin Cc: Linus Walleij Cc: "Michael S . Tsirkin" Cc: Jason Wang Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: Borislav Petkov Cc: Daniel Vetter Cc: Takashi Iwai Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7714304f3ba16af9cf52952d182d031d04b62d6d Author: Hui Su Date: Mon Dec 14 19:03:47 2020 -0800 mm/slab_common.c: use list_for_each_entry in dump_unreclaimable_slab() dump_unreclaimable_slab() acquires the slab_mutex first, and it won't remove any slab_caches list entry when itering the slab_caches lists. Thus we do not need list_for_each_entry_safe here, which is against removal of list entry. Link: https://lkml.kernel.org/r/20200926043440.GA180545@rlk Signed-off-by: Hui Su Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a86ecfa6a873e42286398b2a594cfa9e4ec10322 Author: Colin Ian King Date: Mon Dec 14 19:03:44 2020 -0800 arch/Kconfig: fix spelling mistakes There are a few spelling mistakes in the Kconfig comments and help text. Fix these. Link: https://lkml.kernel.org/r/20201207155004.171962-1-colin.king@canonical.com Signed-off-by: Colin Ian King Acked-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 45680967ee29e67b62e6800a8780440b840a0b1f Author: Mauricio Faria de Oliveira Date: Mon Dec 14 19:03:40 2020 -0800 ocfs2: ratelimit the 'max lookup times reached' notice Running stress-ng on ocfs2 completely fills the kernel log with 'max lookup times reached, filesystem may have nested directories.' Let's ratelimit this message as done with others in the code. Test-case: # mkfs.ocfs2 --mount local $DEV # mount $DEV $MNT # cd $MNT # dmesg -C # stress-ng --dirdeep 1 --dirdeep-ops 1000 # dmesg | grep -c 'max lookup times reached' Before: # dmesg -C # stress-ng --dirdeep 1 --dirdeep-ops 1000 ... stress-ng: info: [11116] successful run completed in 3.03s # dmesg | grep -c 'max lookup times reached' 967 After: # dmesg -C # stress-ng --dirdeep 1 --dirdeep-ops 1000 ... stress-ng: info: [739] successful run completed in 0.96s # dmesg | grep -c 'max lookup times reached' 10 # dmesg [ 259.086086] ocfs2_check_if_ancestor: 1990 callbacks suppressed [ 259.086092] (stress-ng-dirde,740,1):ocfs2_check_if_ancestor:1091 max lookup times reached, filesystem may have nested directories, src inode: 18007, dest inode: 17940. ... Link: https://lkml.kernel.org/r/20201001224417.478263-1-mfo@canonical.com Signed-off-by: Mauricio Faria de Oliveira 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 a0823b5e4434d349c92ec5f7cec0c6e98788d9b6 Author: Tom Rix Date: Mon Dec 14 19:03:37 2020 -0800 fs/ocfs2/cluster/tcp.c: remove unneeded break A break is not needed if it is preceded by a goto Link: https://lkml.kernel.org/r/20201019175216.2329-1-trix@redhat.com Signed-off-by: Tom Rix 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 4dad18f47767f97f859fad84a8c2c8ee8323c2b9 Author: Alex Shi Date: Mon Dec 14 19:03:34 2020 -0800 fs/ntfs: remove unused variable attr_len This variable isn't used anymore, remove it to skip W=1 warning: fs/ntfs/inode.c:2350:6: warning: variable `attr_len' set but not used [-Wunused-but-set-variable] Link: https://lkml.kernel.org/r/4194376f-898b-b602-81c3-210567712092@linux.alibaba.com Signed-off-by: Alex Shi Acked-by: Anton Altaparmakov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3f10c2fa40e444b8cacf82adcbbcd3602b99a645 Author: Alex Shi Date: Mon Dec 14 19:03:31 2020 -0800 fs/ntfs: remove unused varibles We actually don't use these varibles, so remove them to avoid gcc warning: fs/ntfs/file.c:326:14: warning: variable `base_ni' set but not used [-Wunused-but-set-variable] fs/ntfs/logfile.c:481:21: warning: variable `log_page_mask' set but not used [-Wunused-but-set-variable] Link: https://lkml.kernel.org/r/1604821092-54631-1-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Alex Shi Acked-by: Anton Altaparmakov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ec680c1990e70c44d6b4452300a62b15f5c51f9c Author: Sebastian Andrzej Siewior Date: Mon Dec 14 19:03:27 2020 -0800 ide: remove BUG_ON(in_interrupt() || irqs_disabled()) from ide_unregister() In the discussion about preempt count consistency across kernel configurations: https://lore.kernel.org/r/20200914204209.256266093@linutronix.de/ it was concluded that the usage of in_interrupt() and related context checks should be removed from non-core code. Both BUG_ON()s in ide-probe.c were introduced in commit 4015c949fb465 ("[PATCH] update ide core") when ide_unregister() was extended with semaphore based locking. Both checks won't complain about disabled preemption which is also wrong. The might_sleep() in today's mutex_lock() will complain about the missuses. Remove the BUG_ON() statements. Link: https://lkml.kernel.org/r/20201120092421.1023428-3-bigeasy@linutronix.de Signed-off-by: Sebastian Andrzej Siewior Acked-by: Jens Axboe Cc: "David S. Miller" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 483e6417aea5c6d278e6aa7facc50d961d95a0a9 Author: Sebastian Andrzej Siewior Date: Mon Dec 14 19:03:24 2020 -0800 ide/falcon: remove in_interrupt() usage falconide_get_lock() is called by ide_lock_host() and its caller (ide_issue_rq()) has already a might_sleep() check. stdma_lock() has wait_event() which also has a might_sleep() check. Remove the in_interrupt() check. Link: https://lkml.kernel.org/r/20201113161021.2217361-2-bigeasy@linutronix.de Signed-off-by: Sebastian Andrzej Siewior Cc: "David S. Miller" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a85cbe6159ffc973e5702f70a3bd5185f8f3c38d Author: Petr Vorel Date: Mon Dec 14 19:03:21 2020 -0800 uapi: move constants from to and include in UAPI headers instead of . The reason is to avoid indirect include when using some network headers: or others -> -> . This indirect include causes on MUSL redefinition of struct sysinfo when included both and some of UAPI headers: In file included from x86_64-buildroot-linux-musl/sysroot/usr/include/linux/kernel.h:5, from x86_64-buildroot-linux-musl/sysroot/usr/include/linux/netlink.h:5, from ../include/tst_netlink.h:14, from tst_crypto.c:13: x86_64-buildroot-linux-musl/sysroot/usr/include/linux/sysinfo.h:8:8: error: redefinition of `struct sysinfo' struct sysinfo { ^~~~~~~ In file included from ../include/tst_safe_macros.h:15, from ../include/tst_test.h:93, from tst_crypto.c:11: x86_64-buildroot-linux-musl/sysroot/usr/include/sys/sysinfo.h:10:8: note: originally defined here Link: https://lkml.kernel.org/r/20201015190013.8901-1-petr.vorel@gmail.com Signed-off-by: Petr Vorel Suggested-by: Rich Felker Acked-by: Rich Felker Cc: Peter Korsgaard Cc: Baruch Siach Cc: Florian Weimer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ebb2bdcef8a00d59b27d3532c423110559821e1d Author: Petr Mladek Date: Mon Dec 14 19:03:18 2020 -0800 kthread_worker: document CPU hotplug handling The kthread worker API is simple. In short, it allows to create, use, and destroy workers. kthread_create_worker_on_cpu() just allows to bind a newly created worker to a given CPU. It is up to the API user how to handle CPU hotplug. They have to decide how to handle pending work items, prevent queuing new ones, and restore the functionality when the CPU goes off and on. There are few catches: + The CPU affinity gets lost when it is scheduled on an offline CPU. + The worker might not exist when the CPU was off when the user created the workers. A good practice is to implement two CPU hotplug callbacks and destroy/create the worker when CPU goes down/up. Mention this in the function description. [akpm@linux-foundation.org: grammar tweaks] Link: https://lore.kernel.org/r/20201028073031.4536-1-qiang.zhang@windriver.com Link: https://lkml.kernel.org/r/20201102101039.19227-1-pmladek@suse.com Reported-by: Zhang Qiang Signed-off-by: Petr Mladek Cc: Tejun Heo Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f630c7c6f10546ebff15c3a856e7949feb7a2372 Author: Rob Clark Date: Mon Dec 14 19:03:14 2020 -0800 kthread: add kthread_work tracepoints While migrating some code from wq to kthread_worker, I found that I missed the execute_start/end tracepoints. So add similar tracepoints for kthread_work. And for completeness, queue_work tracepoint (although this one differs slightly from the matching workqueue tracepoint). Link: https://lkml.kernel.org/r/20201010180323.126634-1-robdclark@gmail.com Signed-off-by: Rob Clark Cc: Rob Clark Cc: Steven Rostedt Cc: Ingo Molnar Cc: "Peter Zijlstra (Intel)" Cc: Phil Auld Cc: Valentin Schneider Cc: Thara Gopinath Cc: Randy Dunlap Cc: Vincent Donnefort Cc: Mel Gorman Cc: Jens Axboe Cc: Marcelo Tosatti Cc: Frederic Weisbecker Cc: Ilias Stamatis Cc: Liang Chen Cc: Ben Dooks Cc: Peter Zijlstra Cc: "J. Bruce Fields" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b784c77075023e1a71bc06e6b4f711acb99e9c73 Author: Maxime Ripard Date: Tue Dec 15 13:24:59 2020 +0100 coccinnelle: Remove ptr_ret script The ptr_ret script script addresses a number of situations where we end up testing an error pointer, and if it's an error returning it, or return 0 otherwise to transform it into a PTR_ERR_OR_ZERO call. So it will convert a block like this: if (IS_ERR(err)) return PTR_ERR(err); return 0; into return PTR_ERR_OR_ZERO(err); While this is technically correct, it has a number of drawbacks. First, it merges the error and success path, which will make it harder for a reviewer or reader to grasp. It's also more difficult to extend if we were to add some code between the error check and the function return, making the author essentially revert that patch before adding new lines, while it would have been a trivial addition otherwise for the rewiever. Therefore, since that script is only about cosmetic in the first place, let's remove it since it's not worth it. Acked-by: Jani Nikula Acked-by: Thierry Reding Acked-by: Julia Lawall Reviewed-by: Wolfram Sang Reviewed-by: Mark Brown Signed-off-by: Maxime Ripard Signed-off-by: Julia Lawall commit b08221c40febcbda9309dd70c61cf1b0ebb0e351 Author: Hui Wang Date: Fri Dec 11 10:18:14 2020 +0800 ACPI: PNP: compare the string length in the matching_id() Recently we met a touchscreen problem on some Thinkpad machines, the touchscreen driver (i2c-hid) is not loaded and the touchscreen can't work. An i2c ACPI device with the name WACF2200 is defined in the BIOS, with the current rule in matching_id(), this device will be regarded as a PNP device since there is WACFXXX in the acpi_pnp_device_ids[] and this PNP device is attached to the acpi device as the 1st physical_node, this will make the i2c bus match fail when i2c bus calls acpi_companion_match() to match the acpi_id_table in the i2c-hid driver. WACF2200 is an i2c device instead of a PNP device, after adding the string length comparing, the matching_id() will return false when matching WACF2200 and WACFXXX, and it is reasonable to compare the string length when matching two IDs. Suggested-by: Rafael J. Wysocki Signed-off-by: Hui Wang Cc: All applicable Signed-off-by: Rafael J. Wysocki commit a365ab6b9dfbaf8fb4fb4cd5d8a4c55dc4fb8b1c Author: Rafael J. Wysocki Date: Mon Dec 14 21:09:26 2020 +0100 cpufreq: intel_pstate: Implement the ->adjust_perf() callback Make intel_pstate expose the ->adjust_perf() callback when it operates in the passive mode with HWP enabled which causes the schedutil governor to use that callback instead of ->fast_switch(). The minimum and target performance-level values passed by the governor to ->adjust_perf() are converted to HWP.REQ.MIN and HWP.REQ.DESIRED, respectively, which allows the processor to adjust its configuration to maximize energy-efficiency while providing sufficient capacity. Signed-off-by: Rafael J. Wysocki Acked-by: Srinivas Pandruvada Acked-by: Viresh Kumar commit ee2cc4276ba4909438f5894a218877660e1536d9 Author: Rafael J. Wysocki Date: Mon Dec 14 21:08:00 2020 +0100 cpufreq: Add special-purpose fast-switching callback for drivers First off, some cpufreq drivers (eg. intel_pstate) can pass hints beyond the current target frequency to the hardware and there are no provisions for doing that in the cpufreq framework. In particular, today the driver has to assume that it should not allow the frequency to fall below the one requested by the governor (or the required capacity may not be provided) which may not be the case and which may lead to excessive energy usage in some scenarios. Second, the hints passed by these drivers to the hardware need not be in terms of the frequency, so representing the utilization numbers coming from the scheduler as frequency before passing them to those drivers is not really useful. Address the two points above by adding a special-purpose replacement for the ->fast_switch callback, called ->adjust_perf, allowing the governor to pass abstract performance level (rather than frequency) values for the minimum (required) and target (desired) performance along with the CPU capacity to compare them to. Also update the schedutil governor to use the new callback instead of ->fast_switch if present and if the utilization mertics are frequency-invariant (that is requisite for the direct mapping between the utilization and the CPU performance levels to be a reasonable approximation). Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar commit ca6827de4b67367e73fdf43d2ea0a0064423edfb Author: Rafael J. Wysocki Date: Mon Dec 14 21:04:11 2020 +0100 cpufreq: schedutil: Add util to struct sg_cpu Instead of passing util and max between functions while computing the utilization and capacity, store the former in struct sg_cpu (along with the latter and bw_dl). This will allow the current utilization value to be compared with the one obtained previously (which is requisite for some code changes to follow this one), but also it causes the code to look slightly more consistent and cleaner. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar commit a28b2bfc099c6b9caa6ef697660408e076a32019 Author: Ionela Voinescu Date: Mon Dec 14 12:38:23 2020 +0000 cppc_cpufreq: replace per-cpu data array with a list The cppc_cpudata per-cpu storage was inefficient (1) additional to causing functional issues (2) when CPUs are hotplugged out, due to per-cpu data being improperly initialised. (1) The amount of information needed for CPPC performance control in its cpufreq driver depends on the domain (PSD) coordination type: ANY: One set of CPPC control and capability data (e.g desired performance, highest/lowest performance, etc) applies to all CPUs in the domain. ALL: Same as ANY. To be noted that this type is not currently supported. When supported, information about which CPUs belong to a domain is needed in order for frequency change requests to be sent to each of them. HW: It's necessary to store CPPC control and capability information for all the CPUs. HW will then coordinate the performance state based on their limitations and requests. NONE: Same as HW. No HW coordination is expected. Despite this, the previous initialisation code would indiscriminately allocate memory for all CPUs (all_cpu_data) and unnecessarily duplicate performance capabilities and the domain sharing mask and type for each possible CPU. (2) With the current per-cpu structure, when having ANY coordination, the cppc_cpudata cpu information is not initialised (will remain 0) for all CPUs in a policy, other than policy->cpu. When policy->cpu is hotplugged out, the driver will incorrectly use the uninitialised (0) value of the other CPUs when making frequency changes. Additionally, the previous values stored in the perf_ctrls.desired_perf will be lost when policy->cpu changes. Therefore replace the array of per cpu data with a list. The memory for each structure is allocated at policy init, where a single structure can be allocated per policy, not per cpu. In order to accommodate the struct list_head node in the cppc_cpudata structure, the now unused cpu and cur_policy variables are removed. For example, on a arm64 Juno platform with 6 CPUs: (0, 1, 2, 3) in PSD1, (4, 5) in PSD2 - ANY coordination, the memory allocation comparison shows: Before patch: - ANY coordination: total slack req alloc/free caller 0 0 0 0/1 _kernel_size_le_hi32+0x0xffff800008ff7810 0 0 0 0/6 _kernel_size_le_hi32+0x0xffff800008ff7808 128 80 48 1/0 _kernel_size_le_hi32+0x0xffff800008ffc070 768 0 768 6/0 _kernel_size_le_hi32+0x0xffff800008ffc0e4 After patch: - ANY coordination: total slack req alloc/free caller 256 0 256 2/0 _kernel_size_le_hi32+0x0xffff800008fed410 0 0 0 0/2 _kernel_size_le_hi32+0x0xffff800008fed274 Additional notes: - A pointer to the policy's cppc_cpudata is stored in policy->driver_data - Driver registration is skipped if _CPC entries are not present. Signed-off-by: Ionela Voinescu Tested-by: Mian Yousaf Kaukab Signed-off-by: Rafael J. Wysocki commit cfdc589f4b5f94bf1a975b4a67d8163d533f6e9b Author: Ionela Voinescu Date: Mon Dec 14 12:38:22 2020 +0000 cppc_cpufreq: expose information on frequency domains Use the existing sysfs attribute "freqdomain_cpus" to expose information to userspace about CPUs in the same frequency domain. Signed-off-by: Ionela Voinescu Acked-by: Viresh Kumar Tested-by: Mian Yousaf Kaukab Signed-off-by: Rafael J. Wysocki commit bf76bb208f2b653306f2fc8f9c2a22f9890702bd Author: Ionela Voinescu Date: Mon Dec 14 12:38:21 2020 +0000 cppc_cpufreq: clarify support for coordination types The previous coordination type handling in the cppc_cpufreq init code created some confusion: the comment mentioned "Support only SW_ANY for now" while only the SW_ALL/ALL case resulted in a failure. The other coordination types (HW_ALL/HW, NONE) were silently supported. Clarify support for coordination types while describing in comments the intended behavior. Signed-off-by: Ionela Voinescu Acked-by: Viresh Kumar Tested-by: Mian Yousaf Kaukab Signed-off-by: Rafael J. Wysocki commit d2641a5c3d5ecaa1078225e493c7fed821715a04 Author: Ionela Voinescu Date: Mon Dec 14 12:38:20 2020 +0000 cppc_cpufreq: use policy->cpu as driver of frequency setting Considering only the currently supported coordination types (ANY, HW, NONE), this change only makes a difference for the ANY type, when policy->cpu is hotplugged out. In that case the new policy->cpu will be different from ((struct cppc_cpudata *)policy->driver_data)->cpu. While in this case the controls of *ANY* CPU could be used to drive frequency changes, it's more consistent to use policy->cpu as the leading CPU, as used in all other cppc_cpufreq functions. Additionally, the debug prints in cppc_set_perf() would no longer create confusion when referring to a CPU that is hotplugged out. Signed-off-by: Ionela Voinescu Acked-by: Viresh Kumar Tested-by: Mian Yousaf Kaukab Signed-off-by: Rafael J. Wysocki commit defa0c6b94db6156c0e2c97e4cedf7986b24730a Merge: 30c768829af25 bca3e43c903f5 Author: Rafael J. Wysocki Date: Tue Dec 15 19:19:07 2020 +0100 Merge branch 'acpi-processor' to satisfy dependencies commit bca3e43c903f5c58daeab1fea0af566233ea003c Author: Ionela Voinescu Date: Mon Dec 14 12:07:40 2020 +0000 ACPI: processor: fix NONE coordination for domain mapping failure For errors parsing the _PSD domains, a separate domain is returned for each CPU in the failed _PSD domain with no coordination (as per previous comment). But contrary to the intention, the code was setting CPUFREQ_SHARED_TYPE_ALL as coordination type. Change shared_type to CPUFREQ_SHARED_TYPE_NONE in case of errors parsing the domain information. The function still returns the error and the caller is free to bail out the domain initialisation altogether in that case. Given that both functions return domains with a single CPU, this change does not affect the functionality, but clarifies the intention. Signed-off-by: Ionela Voinescu Acked-by: Viresh Kumar [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki commit 722e039d9a290a06e38199f6baffc04cfd98f2db Merge: 8640ca588b032 3a514592b6985 Author: Paolo Bonzini Date: Tue Dec 15 12:48:24 2020 -0500 Merge tag 'kvmarm-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 updates for Linux 5.11 - PSCI relay at EL2 when "protected KVM" is enabled - New exception injection code - Simplification of AArch32 system register handling - Fix PMU accesses when no PMU is enabled - Expose CSV3 on non-Meltdown hosts - Cache hierarchy discovery fixes - PV steal-time cleanups - Allow function pointers at EL2 - Various host EL2 entry cleanups - Simplification of the EL2 vector allocation commit 8640ca588b032166d6be6b4d3632d565d6d88e89 Author: Tom Lendacky Date: Tue Dec 15 12:44:07 2020 -0500 KVM: SVM: Add AP_JUMP_TABLE support in prep for AP booting The GHCB specification requires the hypervisor to save the address of an AP Jump Table so that, for example, vCPUs that have been parked by UEFI can be started by the OS. Provide support for the AP Jump Table set/get exit code. Signed-off-by: Tom Lendacky Signed-off-by: Paolo Bonzini commit e607f6d268577986363e5838fea7a4f2b4927af4 Author: Tom Rix Date: Tue Dec 15 06:42:23 2020 -0800 drm/radeon: remove h from printk format specifier See Documentation/core-api/printk-formats.rst. h should no longer be used in the format specifier for printk. Reviewed-by: Christian König Signed-off-by: Tom Rix Signed-off-by: Alex Deucher commit 0b437e64e0af749c302a7599c1a8f3e89aded559 Author: Tom Rix Date: Tue Dec 15 06:38:35 2020 -0800 drm/amdgpu: remove h from printk format specifier See Documentation/core-api/printk-formats.rst. h should no longer be used in the format specifier for printk. Reviewed-by: Christian König Signed-off-by: Tom Rix Signed-off-by: Alex Deucher commit b4bc9d95e69368935a399b16ea26ca7573abafca Author: Colin Ian King Date: Tue Dec 15 10:56:51 2020 +0000 drm/amdgpu: Fix spelling mistake "Heterogenous" -> "Heterogeneous" There is a spelling mistake in a comment in the Kconfig. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit 7eded018bfeccb365963bb51be731a9f99aeea59 Author: Alex Deucher Date: Mon Dec 14 11:00:47 2020 -0500 drm/amdgpu: fix regression in vbios reservation handling on headless We need to move the check under the non-headless case, otherwise we always reserve the VGA save size. Fixes: 157fe68d74c2ad ("drm/amdgpu: fix size calculation with stolen vga memory") Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 3aa883ac8eea38281f97a7409d2922e6f343bf6c Author: Jiange Zhao Date: Wed Nov 25 21:56:05 2020 +0800 drm/amdgpu/SRIOV: Extend VF reset request wait period In Virtualization case, when one VF is sending too many FLR requests, hypervisor would stop responding to this VF's request for a long period of time. This is called event guard. During this period of cooling time, guest driver should wait instead of doing other things. After this period of time, guest driver would resume reset process and return to normal. Currently, guest driver would wait 12 seconds and return fail if it doesn't get response from host. Solution: extend this waiting time in guest driver and poll response periodically. Poll happens every 6 seconds and it will last for 60 seconds. v2: change the max repetition times from number to macro. Signed-off-by: Jiange Zhao Acked-by: Hawking Zhang Signed-off-by: Alex Deucher commit 325f4b59f6361df0e20a39acd3b89c265d6ca2a8 Author: Yifan Zhang Date: Mon Dec 14 17:45:20 2020 +0800 drm/amdkfd: correct amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu log. it could also be insufficient vram that makes amdgpu_amdkfd_reserve_mem_limit fail. Signed-off-by: Yifan Zhang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 8409e20e0785c0fc689446318c50eb11eb5ae0fe Author: Souptick Joarder Date: Sat Dec 12 20:26:24 2020 +0530 drm/amd/display: Adding prototype for dccg21_update_dpp_dto() Kernel test robot throws below warning -> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_dccg.c:46:6: warning: no previous prototype for 'dccg21_update_dpp_dto' [-Wmissing-prototypes] Adding prototype for dccg21_update_dpp_dto(). Reported-by: kernel test robot Signed-off-by: Souptick Joarder Signed-off-by: Alex Deucher commit d00a88ab5870f16623df9380ab85dd732667d4c8 Author: Alex Deucher Date: Wed Dec 9 17:06:18 2020 -0500 drm/amdgpu: print what method we are using for runtime pm So we know when it's enabled and what method we are using. Acked-by: Evan Quan Signed-off-by: Alex Deucher commit 637bb036ce665cede8914c4dca540d8f9f38af65 Author: Alex Deucher Date: Wed Dec 9 13:21:36 2020 -0500 drm/amdgpu: simplify logic in atpx resume handling Simplify the logic in the runtime resume handling for atpx Acked-by: Evan Quan Signed-off-by: Alex Deucher commit ceb4de67c96051967c7c0095fc6036ef0d1e1248 Author: Alex Deucher Date: Wed Dec 9 13:20:03 2020 -0500 drm/amdgpu: no need to call pci_ignore_hotplug for _PR3 The platform knows it's doing d3cold. Acked-by: Evan Quan Signed-off-by: Alex Deucher commit 157e8306038cf54e3c5149e72ad88ac0448ec7e2 Author: Alex Deucher Date: Wed Dec 9 13:12:50 2020 -0500 drm/amdgpu: support runtime pm for GPUs that support BOCO Enable runtime pm on non HG/PX BOCO capable boards. Acked-by: Evan Quan Signed-off-by: Alex Deucher commit 0330b8487842924351663878582b777002792acd Author: Alex Deucher Date: Wed Dec 9 13:10:21 2020 -0500 drm/amdgpu: update amdgpu_device_supports_boco() Change it to check if the device has ACPI power resources. Acked-by: Evan Quan Signed-off-by: Alex Deucher commit b10c1c5b3a4e3f1f166ab48c3619d8348a4e9c5d Author: Alex Deucher Date: Wed Dec 9 13:07:30 2020 -0500 drm/amdgpu: add check for ACPI power resources Check if the device has ACPI power resources so we can enable runtime pm if so. Acked-by: Evan Quan Signed-off-by: Alex Deucher commit fd496ca892f52df6eb0a0bfcdef1378aed966624 Author: Alex Deucher Date: Wed Dec 9 12:45:23 2020 -0500 drm/amdgpu: split BOCO and ATPX handling In preparation for systems that support d3cold on dGPUs independent of PX/HG. No functional change intended. Acked-by: Evan Quan Signed-off-by: Alex Deucher commit 8ccbfdf0b9c334196cc45260c14081855d729bc8 Author: Souptick Joarder Date: Sat Dec 12 01:02:36 2020 +0530 drm/amd/display: Fixed kernel test robot warning Kernel test robot throws below warning -> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:5349:5: warning: no previous prototype for 'amdgpu_dm_crtc_atomic_set_property' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:5349:5: warning: no previous prototype for function 'amdgpu_dm_crtc_atomic_set_property' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:5373:5: warning: no previous prototype for 'amdgpu_dm_crtc_atomic_get_property' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:5373:5: warning: no previous prototype for function 'amdgpu_dm_crtc_atomic_get_property' [-Wmissing-prototypes] As these functions are only used inside amdgpu_dm.c, these can be made static. Reported-by: kernel test robot Signed-off-by: Souptick Joarder Signed-off-by: Alex Deucher commit 487193856eafa0aea498aa3a5ec0701828e79743 Author: Aric Cyr Date: Mon Dec 7 10:33:09 2020 -0500 drm/amd/display: 3.2.116 Signed-off-by: Aric Cyr Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit b6402afec1cfd2550a91e83745191376542688bc Author: Anthony Koo Date: Sun Dec 6 13:57:54 2020 -0500 drm/amd/display: [FW Promotion] Release 0.0.46 - Add new aux_channel_type - Changed port_index to instance in dmub_cmd_dp_aux_control_data - Change aux_return_code_type to sync up with driver - param for ramping abm based on backlight level Signed-off-by: Anthony Koo Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 31c6b7a9d40ad2fc4e6180215b580b99ededae22 Author: Aric Cyr Date: Tue Dec 1 18:24:09 2020 -0500 drm/amd/display: Fix cleanup typo in MPCC visual confirm [Why] Typo in MPCC visual confirmation. [How] Fix to correct values. Signed-off-by: Aric Cyr Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit e10777a67963163055f9ca43292cb21ff52967d2 Author: Felipe Date: Mon Nov 30 17:38:02 2020 -0500 drm/amd/display: Fix OGAM LUT calculation precision [Why] The OGAM LUT precision was accumulating too much error in the higher end. [How] Instead of calculating all points of the LUT in relation to the previous ones, perform a full calculation in one of the intermediate segments to stop error propagation. Signed-off-by: Felipe Clark Reviewed-by: Krunoslav Kovac Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 610c4974ad172dad884244763125f8cd6585c503 Author: Aric Cyr Date: Fri Dec 4 00:22:46 2020 -0500 drm/amd/display: Only update FP2 for full updates [Why] FP2 is not double buffered and must wait for VACTIVE before programming. [How] Only update when there is a full update we should change FP2 to avoid delay every flip. Signed-off-by: Aric Cyr Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 410066d24cfc1071be25e402510367aca9db5cb6 Author: Jake Wang Date: Thu Dec 3 14:05:56 2020 -0500 drm/amd/display: updated wm table for Renoir [Why] For certain timings, Renoir may underflow due to sr exit latency being too slow. [How] Updated wm table for renoir. Signed-off-by: Jake Wang Reviewed-by: Yongqiang Sun Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 5200c4017ef25f85634012a967c78ff64495dd85 Author: Martin Leung Date: Wed Dec 2 15:10:12 2020 -0500 drm/amd/display: delay fp2 programming until vactive before lock [Why] race condition of programming FP2 wrt pipe locking and vactive state can cause underflow/black screen [How] Enforce the FP2 is only programmed during vactive, and unlock pipe soon afterwards. Signed-off-by: Martin Leung Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 09b07f7a188f3b52e7f7c778ab3b4e4aa4e9677a Author: Leo (Hanghong) Ma Date: Wed Oct 28 11:57:17 2020 -0400 drm/amd/display: Add DP info frame update for dcn30 [Why] We are missing the DP info frame update on dcn30, and this will lead to DP SDPs not being sent; [How] Add the DP info frame update for dcn30; Signed-off-by: Leo (Hanghong) Ma Reviewed-by: Roman Li Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 3ae7a1378d70421de2161aa79209acb3564a73f4 Author: Eric Bernstein Date: Mon Nov 30 14:30:38 2020 -0500 drm/amd/display: add dcn30_link_encoder_validate_output_with_stream to header [Why] dcn30_link_encoder_validate_output_with_stream was a static function. [How] remove the static define and include it in the header. Signed-off-by: Eric Bernstein Reviewed-by: Dmytro Laktyushkin Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 02ce73b01e09e388614b22b7ebc71debf4a588f0 Author: Wayne Lin Date: Tue Nov 24 19:57:03 2020 +0800 drm/amd/display: Fix to be able to stop crc calculation [Why] Find out when we try to disable CRC calculation, crc generation is still enabled. Main reason is that dc_stream_configure_crc() will never get called when the source is AMDGPU_DM_PIPE_CRC_SOURCE_NONE. [How] Add checking condition that when source is AMDGPU_DM_PIPE_CRC_SOURCE_NONE, we should also call dc_stream_configure_crc() to disable crc calculation. Also, clean up crc window when disable crc calculation. Signed-off-by: Wayne Lin Reviewed-by: Nicholas Kazlauskas Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 570b302ba1ce508dbfa3f1d6c6dc6e2531e45be5 Author: Aric Cyr Date: Tue Dec 1 11:25:50 2020 -0500 drm/amd/display: HP Reverb G2 VR fails to light up [Why] Many VR headsets require a HSYNC width of 4, but DCN has default minimum of 8. [How] Change the arbitrary minimum HSYNC width to 4 to match DCN20. Signed-off-by: Aric Cyr Reviewed-by: Charlene Liu Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 41aa4d3ded5cd7fa19cdc5f15fb60b85ed64f083 Author: Max Tseng Date: Sat Nov 21 20:11:38 2020 +0800 drm/amd/display: Add missing DP_SEC register definitions and masks [Why] some DP_SEC register defs and masks are missing. [How] add the missing defs and masks. Signed-off-by: Max Tseng Reviewed-by: Anthony Koo Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 20172ff3f0b4eddcdd1cf4ca31a7d922e9b4c662 Author: Victor Lu Date: Tue Nov 24 10:06:04 2020 -0500 drm/amd/display: Change pstate expected timeout warning to 180us on linux [Why] There is a warning that triggers when pstate takes too long. Pstate can take up to ~200us on Linux without hanging but it is currently set to 40us. [How] Change the timeout for the warning to be 180us on Linux. Signed-off-by: Victor Lu Reviewed-by: Roman Li Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 86b6037f7608f9b726281252aa1b2a55dd696486 Author: Stanley.Yang Date: Fri Dec 11 20:59:47 2020 +0800 drm/amdgpu: skip load smu and sdma microcode on sriov for SIENNA_CICHLID skip load smu and sdma fw on sriov due to sos, ta and asd fw have been skipped for SIENNA_CICHLID. V2: move asic check into smu11 Signed-off-by: Stanley.Yang Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 79cc42697dbd17f19d8ad1d87945a47d2f73573e Author: Flora Cui Date: Mon Dec 14 10:23:13 2020 +0800 drm/amd/display: drop retired CONFIG_DRM_AMD_DC_DCN3_0 CONFIG_DRM_AMD_DC_DCN3_0 is retired. drop it Signed-off-by: Flora Cui Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 9ca5b8a170d180889bec0424c27fdd2ee84d2d99 Author: Likun Gao Date: Tue Dec 15 11:32:20 2020 -0500 drm/amdgpu: add judgement for suspend/resume sequence S0ix only makes sense on APUs since they are part of the platform, so only when the ASIC is APU should set amdgpu_acpi_is_s0ix_supported flag to deal with the related situation. Signed-off-by: Likun Gao Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit a9c210c1e5fefd621954fca50c72780bf0198327 Author: Xiaomeng Hou Date: Thu Dec 10 20:18:23 2020 +0800 drm/amdgpu/sdma5.2: soft reset sdma blocks before setup and start sdma Without doing the soft reset, register mmSDMA0_GFX_RB_WPTR's value could not be reset to 0 when sdma block resumes. That would cause the ring buffer's read and write pointers not equal and ring test fail. So add the soft reset step. Signed-off-by: Xiaomeng Hou Reviewed-by: Huang Rui Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 78d907e2b8ba89c936b7f0c3344261c653668a62 Author: Evan Quan Date: Thu Dec 10 16:36:28 2020 +0800 drm/amd/pm: add deep sleep control for uclk and fclk These are supported by Sienna Cichlid and should be taken into consideration during DS control. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b4b0b79d8a376d3d830a93f8fafc815d01525fc9 Author: Evan Quan Date: Thu Dec 10 12:42:24 2020 +0800 drm/amd/pm: update the data strucutre for SMU metrics exchange This is needed for Sienna Cichlid. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit f9e3fe46202a18dea8c54af392be2b361b0194e7 Author: Evan Quan Date: Thu Dec 10 12:03:50 2020 +0800 drm/amd/pm: correct the data structure for activity monitor coeff exchange This is needed for Sienna Cichlid. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 0dc994fb61a9b859bf4bde936a4c6de652116a23 Author: Evan Quan Date: Wed Dec 9 14:30:29 2020 +0800 drm/amd/pm: fulfill the sienna cichlid UMD PSTATE profiling clocks Fulfill the UMD PSTATE profiling clocks of sienna cichlid. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 31f80a4e9603c3d1668bc3a1401d49321d547d54 Author: Marc Zyngier Date: Tue Dec 15 15:29:18 2020 +0000 arm64: Warn the user when a small VA_BITS value wastes memory The memblock code ignores any memory that doesn't fit in the linear mapping. In order to preserve the distance between two physical memory locations and their mappings in the linear map, any hole between two memory regions occupies the same space in the linear map. On most systems, this is hardly a problem (the memory banks are close together, and VA_BITS represents a large space compared to the available memory *and* the potential gaps). On NUMA systems, things are quite different: the gaps between the memory nodes can be pretty large compared to the memory size itself, and the range from memblock_start_of_DRAM() to memblock_end_of_DRAM() can exceed the space described by VA_BITS. Unfortunately, we're not very good at making this obvious to the user, and on a D05 system (two sockets and 4 nodes with 64GB each) accidentally configured with 39bit VA, we display something like this: [ 0.000000] NUMA: NODE_DATA [mem 0x1ffbffe100-0x1ffbffffff] [ 0.000000] NUMA: NODE_DATA [mem 0x2febfc1100-0x2febfc2fff] [ 0.000000] NUMA: Initmem setup node 2 [] [ 0.000000] NUMA: NODE_DATA [mem 0x2febfbf200-0x2febfc10ff] [ 0.000000] NUMA: NODE_DATA(2) on node 1 [ 0.000000] NUMA: Initmem setup node 3 [] [ 0.000000] NUMA: NODE_DATA [mem 0x2febfbd300-0x2febfbf1ff] [ 0.000000] NUMA: NODE_DATA(3) on node 1 which isn't very explicit, and doesn't tell the user why 128GB have suddently disappeared. Let's add a warning message telling the user that memory has been truncated, and offer a potential solution (bumping VA_BITS up). Signed-off-by: Marc Zyngier Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20201215152918.1511108-1-maz@kernel.org Signed-off-by: Catalin Marinas commit 02e66dd564229043c094ea951ed24df932d44644 Merge: 5fbd41d3bf123 ee46d16d2e40b Author: Daniel Vetter Date: Tue Dec 15 17:25:55 2020 +0100 Merge tag 'drm-misc-next-fixes-2020-12-15' of git://anongit.freedesktop.org/drm/drm-misc into drm-next Short summary of fixes pull (less than what git shortlog provides): * dma-buf: Fix docs * mxsfb: Silence invalid error message * radeon: Fix TTM multihop Signed-off-by: Daniel Vetter From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/X9i0X9mjHN9AZGD3@linux-uq9g commit 4401117bf7fc11dc738c0963fa0c94814abc8dcd Author: Lukasz Luba Date: Tue Dec 15 15:42:21 2020 +0000 thermal/drivers/devfreq_cooling: Fix the build when !ENERGY_MODEL Prevent build failure if the option CONFIG_ENERGY_MODEL is not set. The devfreq cooling is able to operate without the Energy Model. Don't use dev->em_pd directly and use local pointer. Fixes: 615510fe13bd2 ("thermal: devfreq_cooling: remove old power model and use EM") Reported-by: Stephen Rothwell Signed-off-by: Lukasz Luba Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201215154221.8828-1-lukasz.luba@arm.com commit 1fa34e49e4b7e66214a1d15261c0224d60366eec Author: Daniel Lezcano Date: Thu Dec 10 13:15:13 2020 +0100 thermal/drivers/rcar: Remove notification usage The ops is only showing a trace telling a critical trip point is crossed. The same information is given by the thermal framework. This is redundant, remove the code. Signed-off-by: Daniel Lezcano Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20201210121514.25760-4-daniel.lezcano@linaro.org commit b77ab5f936fdbc6b135d26744325dc38ed99cb33 Merge: 5c6679b5cb120 61fc03b6512b1 Author: Mark Brown Date: Tue Dec 15 15:46:59 2020 +0000 Merge series "ASoC: ti: Maintainer mail address change" from Peter Ujfalusi : Hi, My TI address is going to bounce after Friday (18.12.2020), switch my email address to my private one for now. Regards, Peter --- Peter Ujfalusi (2): MAINTAINERS: Update email address for TI ASoC and twl4030 codec drivers ASoC: dt-bindings: ti,j721e: Update maintainer and author information .../devicetree/bindings/sound/ti,j721e-cpb-audio.yaml | 4 +++- .../devicetree/bindings/sound/ti,j721e-cpb-ivi-audio.yaml | 4 +++- MAINTAINERS | 6 +++--- 3 files changed, 9 insertions(+), 5 deletions(-) -- Peter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki commit 64a1b95bb9fe3ec76e1a2cd803eff06389341ae4 Author: Thomas Gleixner Date: Thu Dec 10 20:26:06 2020 +0100 genirq: Restrict export of irq_to_desc() No more (ab)use in drivers finally. There is still the modular build of PPC/KVM which needs it, so restrict it to this case which still makes it unavailable for most drivers. Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201210194045.551428291@linutronix.de commit 88f0a9d066443118261adf7e049781476f09dac1 Author: Thomas Gleixner Date: Thu Dec 10 20:26:05 2020 +0100 xen/events: Implement irq distribution Keep track of the assignments of event channels to CPUs and select the online CPU with the least assigned channels in the affinity mask which is handed to irq_chip::irq_set_affinity() from the core code. Signed-off-by: Thomas Gleixner Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Link: https://lore.kernel.org/r/20201210194045.457218278@linutronix.de commit 62ebcda8a8dfa4aeaa3288020a082787910afebc Author: Thomas Gleixner Date: Thu Dec 10 20:26:04 2020 +0100 xen/events: Reduce irq_info:: Spurious_cnt storage size To prepare for interrupt spreading reduce the storage size of irq_info::spurious_cnt to u8 so the required flag for the spreading logic will not increase the storage size. Protect the usage site against overruns. Signed-off-by: Thomas Gleixner Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Link: https://lore.kernel.org/r/20201210194045.360198201@linutronix.de commit f7a6f994b4f0ee69c656dda3da11431d92d6b08f Author: Thomas Gleixner Date: Thu Dec 10 20:26:03 2020 +0100 xen/events: Only force affinity mask for percpu interrupts All event channel setups bind the interrupt on CPU0 or the target CPU for percpu interrupts and overwrite the affinity mask with the corresponding cpumask. That does not make sense. The XEN implementation of irqchip::irq_set_affinity() already picks a single target CPU out of the affinity mask and the actual target is stored in the effective CPU mask, so destroying the user chosen affinity mask which might contain more than one CPU is wrong. Change the implementation so that the channel is bound to CPU0 at the XEN level and leave the affinity mask alone. At startup of the interrupt affinity will be assigned out of the affinity mask and the XEN binding will be updated. Only keep the enforcement for real percpu interrupts. On resume the overwrite is not required either because info->cpu and the affinity mask are still the same as at the time of suspend. Same for rebind_evtchn_irq(). This also prepares for proper interrupt spreading. Signed-off-by: Thomas Gleixner Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Link: https://lore.kernel.org/r/20201210194045.250321315@linutronix.de commit 1ca1b4e2c0cbc88ce3939910ac36dca51d326fe4 Author: Thomas Gleixner Date: Thu Dec 10 20:26:02 2020 +0100 xen/events: Use immediate affinity setting There is absolutely no reason to mimic the x86 deferred affinity setting. This mechanism is required to handle the hardware induced issues of IO/APIC and MSI and is not in use when the interrupts are remapped. XEN does not need this and can simply change the affinity from the calling context. The core code invokes this with the interrupt descriptor lock held so it is fully serialized against any other operation. Mark the interrupts with IRQ_MOVE_PCNTXT to disable the deferred affinity setting. The conditional mask/unmask operation is already handled in xen_rebind_evtchn_to_cpu(). This makes XEN on x86 use the same mechanics as on e.g. ARM64 where deferred affinity setting is not required and not implemented and the code path in the ack functions is compiled out. Signed-off-by: Thomas Gleixner Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Link: https://lore.kernel.org/r/20201210194045.157601122@linutronix.de commit 67473b8194bc3ecc42d60a4f5dc1ed479f28ed6e Author: Thomas Gleixner Date: Thu Dec 10 20:26:01 2020 +0100 xen/events: Remove disfunct affinity spreading This function can only ever work when the event channels: - are already established - interrupts assigned to them - the affinity has been set by user space already because any newly set up event channel is forced to be bound to CPU0 and the affinity mask of the interrupt is forced to contain cpumask_of(0). As the CPU0 enforcement was in place _before_ this was implemented it's entirely unclear how that can ever have worked at all. Remove it as preparation for doing it proper. Signed-off-by: Thomas Gleixner Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Link: https://lore.kernel.org/r/20201210194045.065115500@linutronix.de commit 3bd5371a4da68613fb3d4aaf961ed8244bcbd741 Author: Thomas Gleixner Date: Thu Dec 10 20:26:00 2020 +0100 xen/events: Remove unused bind_evtchn_to_irq_lateeoi() Signed-off-by: Thomas Gleixner Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Link: https://lore.kernel.org/r/20201210194044.972064156@linutronix.de commit ec7b37b6f08fac3eb9a733efa3d8eae5c3fb0383 Author: Thomas Gleixner Date: Thu Dec 10 20:25:59 2020 +0100 net/mlx5: Use effective interrupt affinity Using the interrupt affinity mask for checking locality is not really working well on architectures which support effective affinity masks. The affinity mask is either the system wide default or set by user space, but the architecture can or even must reduce the mask to the effective set, which means that checking the affinity mask itself does not really tell about the actual target CPUs. Signed-off-by: Thomas Gleixner Cc: Saeed Mahameed Link: https://lore.kernel.org/r/20201210194044.876342330@linutronix.de commit 6e745db4ddd072c7f67b37d850bc5aaedcf35400 Author: Thomas Gleixner Date: Thu Dec 10 20:25:58 2020 +0100 net/mlx5: Replace irq_to_desc() abuse No driver has any business with the internals of an interrupt descriptor. Storing a pointer to it just to use yet another helper at the actual usage site to retrieve the affinity mask is creative at best. Just because C does not allow encapsulation does not mean that the kernel has no limits. Retrieve a pointer to the affinity mask itself and use that. It's still using an interface which is usually not for random drivers, but definitely less hideous than the previous hack. Signed-off-by: Thomas Gleixner Cc: Saeed Mahameed Link: https://lore.kernel.org/r/20201210194044.769458162@linutronix.de commit 197d237077295793a3e4ea0abcbea106f8b4217c Author: Thomas Gleixner Date: Thu Dec 10 20:25:57 2020 +0100 net/mlx4: Use effective interrupt affinity Using the interrupt affinity mask for checking locality is not really working well on architectures which support effective affinity masks. The affinity mask is either the system wide default or set by user space, but the architecture can or even must reduce the mask to the effective set, which means that checking the affinity mask itself does not really tell about the actual target CPUs. Signed-off-by: Thomas Gleixner Cc: Tariq Toukan Link: https://lore.kernel.org/r/20201210194044.672935978@linutronix.de commit 80a62deedf9d449cb65655df39d34b7ef9321d79 Author: Thomas Gleixner Date: Thu Dec 10 20:25:56 2020 +0100 net/mlx4: Replace irq_to_desc() abuse No driver has any business with the internals of an interrupt descriptor. Storing a pointer to it just to use yet another helper at the actual usage site to retrieve the affinity mask is creative at best. Just because C does not allow encapsulation does not mean that the kernel has no limits. Retrieve a pointer to the affinity mask itself and use that. It's still using an interface which is usually not for random drivers, but definitely less hideous than the previous hack. Signed-off-by: Thomas Gleixner Cc: Tariq Toukan Link: https://lore.kernel.org/r/20201210194044.580936243@linutronix.de commit b8fecfdfb08dcbabf3d46cfaf7c2fed0e6802ce8 Author: Thomas Gleixner Date: Thu Dec 10 20:25:55 2020 +0100 PCI: mobiveil: Use irq_data_get_irq_chip_data() Going through a full irq descriptor lookup instead of just using the proper helper function which provides direct access is suboptimal. In fact it _is_ wrong because the chip callback needs to get the chip data which is relevant for the chip while using the irq descriptor variant returns the irq chip data of the top level chip of a hierarchy. It does not matter in this case because the chip is the top level chip, but that doesn't make it more correct. Signed-off-by: Thomas Gleixner Reviewed-by: Rob Herring Cc: Bjorn Helgaas Link: https://lore.kernel.org/r/20201210194044.473308721@linutronix.de commit e56427068a8d796bb7b8e297f2b6e947380e383f Author: Thomas Gleixner Date: Thu Dec 10 20:25:54 2020 +0100 PCI: xilinx-nwl: Use irq_data_get_irq_chip_data() Going through a full irq descriptor lookup instead of just using the proper helper function which provides direct access is suboptimal. In fact it _is_ wrong because the chip callback needs to get the chip data which is relevant for the chip while using the irq descriptor variant returns the irq chip data of the top level chip of a hierarchy. It does not matter in this case because the chip is the top level chip, but that doesn't make it more correct. Signed-off-by: Thomas Gleixner Reviewed-by: Rob Herring Cc: Bjorn Helgaas Link: https://lore.kernel.org/r/20201210194044.364211860@linutronix.de commit 1110918e439fde69fdf2fe869f6499d56157fec9 Author: Thomas Gleixner Date: Thu Dec 10 20:25:53 2020 +0100 NTB/msi: Use irq_has_action() Use the proper core function. Signed-off-by: Thomas Gleixner Reviewed-by: Logan Gunthorpe Link: https://lore.kernel.org/r/20201210194044.255887860@linutronix.de commit 886c8121659dddb6dbfab4cdeb58d75e2d928731 Author: Thomas Gleixner Date: Thu Dec 10 20:25:52 2020 +0100 mfd: ab8500-debugfs: Remove the racy fiddling with irq_desc First of all drivers have absolutely no business to dig into the internals of an irq descriptor. That's core code and subject to change. All of this information is readily available to /proc/interrupts in a safe and race free way. Remove the inspection code which is a blatant violation of subsystem boundaries and racy against concurrent modifications of the interrupt descriptor. Print the irq line instead so the information can be looked up in a sane way in /proc/interrupts. Signed-off-by: Thomas Gleixner Reviewed-by: Linus Walleij Acked-by: Lee Jones Link: https://lore.kernel.org/r/20201210194044.157283633@linutronix.de commit f3925032d7fd4aa627ff10e780430269b3829f83 Author: Thomas Gleixner Date: Thu Dec 10 20:25:51 2020 +0100 pinctrl: nomadik: Use irq_has_action() Let the core code do the fiddling with irq_desc. Signed-off-by: Thomas Gleixner Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20201210194044.065003856@linutronix.de commit 9c6508b9d2091d14a8fde5d478e19e053bf46552 Author: Thomas Gleixner Date: Thu Dec 10 20:25:50 2020 +0100 drm/i915/pmu: Replace open coded kstat_irqs() copy Driver code has no business with the internals of the irq descriptor. Aside of that the count is per interrupt line and therefore takes interrupts from other devices into account which share the interrupt line and are not handled by the graphics driver. Replace it with a pmu private count which only counts interrupts which originate from the graphics card. To avoid atomics or heuristics of some sort make the counter field 'unsigned long'. That limits the count to 4e9 on 32bit which is a lot and postprocessing can easily deal with the occasional wraparound. Signed-off-by: Thomas Gleixner Acked-by: Jani Nikula Cc: Tvrtko Ursulin Link: https://lore.kernel.org/r/20201210194043.957046529@linutronix.de commit 3afba095158269c281c49518f49da5a702878919 Author: Thomas Gleixner Date: Thu Dec 10 20:25:49 2020 +0100 drm/i915/lpe_audio: Remove pointless irq_to_desc() usage Nothing uses the result and nothing should ever use it in driver code. Signed-off-by: Thomas Gleixner Reviewed-by: Ville Syrjälä Acked-by: Jani Nikula Link: https://lore.kernel.org/r/20201210194043.862572239@linutronix.de commit ba22d0ede31779485f0d86d7dcf51387ba810a17 Author: Thomas Gleixner Date: Thu Dec 10 20:25:48 2020 +0100 s390/irq: Use irq_desc_kstat_cpu() in show_msi_interrupt() The irq descriptor is already there, no need to look it up again. Signed-off-by: Thomas Gleixner Acked-by: Heiko Carstens Link: https://lore.kernel.org/r/20201210194043.769108348@linutronix.de commit 7435248e6d66e4e853da093c939c28a9f4b92765 Author: Thomas Gleixner Date: Thu Dec 10 20:25:47 2020 +0100 parisc/irq: Use irq_desc_kstat_cpu() in show_interrupts() The irq descriptor is already there, no need to look it up again. Signed-off-by: Thomas Gleixner Cc: linux-parisc@vger.kernel.org Link: https://lore.kernel.org/r/20201210194043.659522455@linutronix.de commit 5089bc51f81f05ad7f0e46db2107be2311343852 Author: Thomas Gleixner Date: Thu Dec 10 20:25:46 2020 +0100 arm64/smp: Use irq_desc_kstat_cpu() in arch_show_interrupts() The irq descriptor is already there, no need to look it up again. Signed-off-by: Thomas Gleixner Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20201210194043.546326568@linutronix.de commit 88c637748e3176dcfaa36185e5eaafe6098d43e0 Author: Thomas Gleixner Date: Thu Dec 10 20:25:45 2020 +0100 ARM: smp: Use irq_desc_kstat_cpu() in show_ipi_list() The irq descriptor is already there, no need to look it up again. Signed-off-by: Thomas Gleixner Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20201210194043.454288890@linutronix.de commit 501e2db67fa4264b517de5c7934e94cca89b3a1e Author: Thomas Gleixner Date: Thu Dec 10 20:25:44 2020 +0100 genirq: Provide kstat_irqdesc_cpu() Most users of kstat_irqs_cpu() have the irq descriptor already. No point in calling into the core code and looking it up once more. Use it in per_cpu_count_show() to start with. Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201210194043.362094758@linutronix.de commit 26c19d0a8610fb233b31730fe26a31145f2d9796 Author: Thomas Gleixner Date: Thu Dec 10 20:25:43 2020 +0100 genirq: Make kstat_irqs() static No more users outside the core code. Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201210194043.268774449@linutronix.de commit bb0e5192f59875031a0ad060bef2ea0f6c657474 Author: Thomas Gleixner Date: Thu Dec 10 20:25:42 2020 +0100 parisc/irq: Simplify irq count output for /proc/interrupts The SMP variant works perfectly fine on UP as well. Signed-off-by: Thomas Gleixner Cc: linux-parisc@vger.kernel.org Link: https://lore.kernel.org/r/20201210194043.172893840@linutronix.de commit 9e42ad10cedf0632fc39860381375806092212bd Author: Thomas Gleixner Date: Thu Dec 10 20:25:41 2020 +0100 genirq: Annotate irq stats data races Both the per cpu stats and the accumulated count are accessed lockless and can be concurrently modified. That's intentional and the stats are a rough estimate anyway. Annotate them with data_race(). Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201210194043.067097663@linutronix.de commit 3e2380123fb96987ce958f623207010c667ffa7c Author: Thomas Gleixner Date: Thu Dec 10 20:25:40 2020 +0100 genirq: Provide irq_get_effective_affinity() Provide an accessor to the effective interrupt affinity mask. Going to be used to replace open coded fiddling with the irq descriptor. Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201210194042.967177918@linutronix.de commit f1c6306c0d6b50844ba02c8a53e35405e9c0db05 Author: Thomas Gleixner Date: Thu Dec 10 20:25:39 2020 +0100 genirq: Move irq_set_lockdep_class() to core irq_set_lockdep_class() is used from modules and requires irq_to_desc() to be exported. Move it into the core code which lifts another requirement for the export. Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201210194042.860029489@linutronix.de commit fdd029630434b434b127efc7fba337da28f45658 Author: Thomas Gleixner Date: Thu Dec 10 20:25:38 2020 +0100 genirq: Move status flag checks to core These checks are used by modules and prevent the removal of the export of irq_to_desc(). Move the accessor into the core. Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201210194042.703779349@linutronix.de commit a313357e704f2617f298333e3e617a38b1719760 Author: Thomas Gleixner Date: Thu Dec 10 20:25:37 2020 +0100 genirq: Move irq_has_action() into core code This function uses irq_to_desc() and is going to be used by modules to replace the open coded irq_to_desc() (ab)usage. The final goal is to remove the export of irq_to_desc() so driver cannot fiddle with it anymore. Move it into the core code and fixup the usage sites to include the proper header. Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201210194042.548936472@linutronix.de commit b2ce5dbc15819ea4bef47dbd368239cb1e965158 Author: Kajol Jain Date: Thu Nov 19 20:54:11 2020 +0530 perf test: Fix metric parsing test Commit e1c92a7fbbc5 ("perf tests: Add another metric parsing test") add another test for metric parsing. The test goes through all metrics compiled for arch within pmu events and try to parse them. Right now this test is failing in powerpc machine. Result in power9 platform: [command]# ./perf test 10 10: PMU events : 10.1: PMU event table sanity : Ok 10.2: PMU event map aliases : Ok 10.3: Parsing of PMU event table metrics : Skip (some metrics failed) 10.4: Parsing of PMU event table metrics with fake PMUs : FAILED! Issue is we are passing different runtime parameter value in "expr__find_other" and "expr__parse" function which is called from function `metric_parse_fake`. And because of this parsing of hv-24x7 metrics is failing. [command]# ./perf test 10 -vv ..... hv_24x7/pm_mcs01_128b_rd_disp_port01,chip=1/ not found expr__parse failed test child finished with -1 ---- end ---- PMU events subtest 4: FAILED! This patch fix this issue and change runtime parameter value to '0' in expr__parse function. Result in power9 platform after this patch: [command]# ./perf test 10 10: PMU events : 10.1: PMU event table sanity : Ok 10.2: PMU event map aliases : Ok 10.3: Parsing of PMU event table metrics : Skip (some metrics failed) 10.4: Parsing of PMU event table metrics with fake PMUs : Ok Fixes: e1c92a7fbbc5 ("perf tests: Add another metric parsing test") Signed-off-by: Kajol Jain Acked-by: Ian Rogers Acked-by: Jiri Olsa Cc: Madhavan Srinivasan Cc: Ravi Bangoria Link: http://lore.kernel.org/lkml/20201119152411.46041-1-kjain@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 38a0925c5fc89689433f2a2ad415982397cf626e Merge: 25fe64232ee5b 2a39a30f0d9b5 Author: Rafael J. Wysocki Date: Tue Dec 15 15:33:37 2020 +0100 Merge branch 'acpi-ec' * acpi-ec: ACPI: EC: Clean up status flags checks in advance_transaction() ACPI: EC: Untangle error handling in advance_transaction() ACPI: EC: Simplify error handling in advance_transaction() ACPI: EC: Rename acpi_ec_is_gpe_raised() ACPI: EC: Fold acpi_ec_clear_gpe() into its caller ACPI: EC: Eliminate in_interrupt() usage commit 25fe64232ee5bdd328c1c4ae24e8fd2b88251834 Merge: 5e2cde03da400 423282af887b8 ec2a9cea9fca8 55130fb22a1c3 Author: Rafael J. Wysocki Date: Tue Dec 15 15:33:18 2020 +0100 Merge branches 'acpi-apei', 'acpi-misc' and 'acpi-processor' * acpi-apei: ACPI, APEI: make apei_resources_all static * acpi-misc: ACPI: acpi_drivers.h: Update the kernel doc ACPI: acpi_drivers.h: Remove the leftover dead code ACPI: tiny-power-button: Simplify the code using module_acpi_driver() ACPI: SBS: Simplify the code using module_acpi_driver() ACPI: SBS: Simplify the driver init code ACPI: debug: Remove the not used function ACPI: processor: Remove the duplicated ACPI_PROCESSOR_CLASS macro * acpi-processor: ACPI: processor: Drop duplicate setting of shared_cpu_map commit 5e2cde03da4006e06f002c0b410ca39833e760bd Merge: b85195b7ec9d5 12fc4dad94dfa 390029c27ea74 Author: Rafael J. Wysocki Date: Tue Dec 15 15:30:03 2020 +0100 Merge branches 'acpi-resources' and 'acpi-docs' * acpi-resources: Revert "ACPI / resources: Use AE_CTRL_TERMINATE to terminate resources walks" resource: provide meaningful MODULE_LICENSE() in test suite ASoC: Intel: catpt: Replace open coded variant of resource_intersection() ACPI: watchdog: Replace open coded variant of resource_union() PCI/ACPI: Replace open coded variant of resource_union() resource: Add test cases for new resource API resource: Introduce resource_intersection() for overlapping resources resource: Introduce resource_union() for overlapping resources resource: Group resource_overlaps() with other inline helpers resource: Simplify region_intersects() by reducing conditionals * acpi-docs: Documentation: ACPI: enumeration: add PCI hierarchy representation Documentation: ACPI: _DSD: enable hyperlink in final references Documentation: ACPI: explain how to use gpio-line-names commit b85195b7ec9d5d2bb2b0039586c955f49fc2e6ee Merge: 25417185e9b5f 6d5acf3818393 91438aebcd56e Author: Rafael J. Wysocki Date: Tue Dec 15 15:29:30 2020 +0100 Merge branches 'acpica' and 'acpi-scan' * acpica: ACPICA: Update version to 20201113 ACPICA: Interpreter: fix memory leak by using existing buffer ACPICA: Add function trace macros to improve debugging ACPICA: Also handle "orphan" _REG methods for GPIO OpRegions ACPICA: Remove extreaneous "the" in comments ACPICA: Add 5 new UUIDs to the known UUID table * acpi-scan: ACPI: scan: Fix up _DEP-related terminology with supplier/consumer ACPI: scan: Drop INT3396 from acpi_ignore_dep_ids[] ACPI: scan: Add PNP0D80 to the _DEP exceptions list ACPI: scan: Call acpi_get_object_info() from acpi_add_single_object() ACPI: scan: Add acpi_info_matches_hids() helper commit f6a694665f132cbf6e2222dd2f173dc35330a8aa Author: Steven Rostedt (VMware) Date: Mon Dec 14 21:03:27 2020 -0500 tracing: Offload eval map updates to a work queue In order for tracepoints to export their enums to user space, the use of the TRACE_DEFINE_ENUM() macro is used. On boot up, the strings shown in the tracefs "print fmt" lines are processed, and all the enums registered by TRACE_DEFINE_ENUM are replaced with the interger value. This way, userspace tools that read the raw binary data, knows how to evaluate the raw events. This is currently done in an initcall, but it has been noticed that slow embedded boards that have tracing may take a few seconds to process them all, and a few seconds slow down on an embedded device is detrimental to the system. Instead, offload the work to a work queue and make sure that its finished by destroying the work queue (which flushes all work) in a late initcall. This will allow the system to continue to boot and run the updates in the background, and this speeds up the boot time. Note, the strings being updated are only used by user space, so finishing the process before the system is fully booted will prevent any race issues. Link: https://lore.kernel.org/r/68d7b3327052757d0cd6359a6c9015a85b437232.camel@pengutronix.de Reported-by: Lucas Stach Signed-off-by: Steven Rostedt (VMware) commit b3fac817830306328d5195e7f4fb332277f3b146 Merge: 42b4ca04cbfde d3569c149dfe0 f8edfa6d1e077 Author: Rafael J. Wysocki Date: Tue Dec 15 15:27:16 2020 +0100 Merge branches 'pm-devfreq' and 'pm-tools' * pm-devfreq: PM / devfreq: tegra30: Separate configurations per-SoC generation PM / devfreq: tegra30: Support interconnect and OPPs from device-tree PM / devfreq: tegra20: Deprecate in a favor of emc-stat based driver PM / devfreq: exynos-bus: Add registration of interconnect child device dt-bindings: devfreq: Add documentation for the interconnect properties soc/tegra: fuse: Add stub for tegra_sku_info soc/tegra: fuse: Export tegra_read_ram_code() clk: tegra: Export Tegra20 EMC kernel symbols PM / devfreq: tegra30: Silence deferred probe error PM / devfreq: tegra20: Relax Kconfig dependency PM / devfreq: tegra20: Silence deferred probe error PM / devfreq: Remove redundant governor_name from struct devfreq PM / devfreq: Add governor attribute flag for specifc sysfs nodes PM / devfreq: Add governor feature flag PM / devfreq: Add tracepoint for frequency changes PM / devfreq: Unify frequency change to devfreq_update_target func trace: events: devfreq: Use fixed indentation size to improve readability * pm-tools: pm-graph v5.8 cpupower: Provide online and offline CPU information commit 42b4ca04cbfde952e7be132ffc7226890323bbe1 Merge: 4c5744a0c4fcb 4e1d9a737d00f b93b7ef617648 718072ceb2118 b4ba76fb1c999 Author: Rafael J. Wysocki Date: Tue Dec 15 15:26:14 2020 +0100 Merge branches 'pm-sleep', 'pm-acpi', 'pm-domains' and 'powercap' * pm-sleep: PM: sleep: Add dev_wakeup_path() helper PM / suspend: fix kernel-doc markup PM: sleep: Print driver flags for all devices during suspend/resume * pm-acpi: PM: ACPI: Refresh wakeup device power configuration every time PM: ACPI: PCI: Drop acpi_pm_set_bridge_wakeup() PM: ACPI: reboot: Use S5 for reboot * pm-domains: PM: domains: create debugfs nodes when adding power domains PM: domains: replace -ENOTSUPP with -EOPNOTSUPP * powercap: powercap: Adjust printing the constraint name with new line powercap: RAPL: Add AMD Fam19h RAPL support powercap: Add AMD Fam17h RAPL support powercap/intel_rapl_msr: Convert rapl_msr_priv into pointer x86/msr-index: sort AMD RAPL MSRs by address commit 4c5744a0c4fcb878e1500e77d53722197c0a3f7c Merge: e1f1320fc0a09 7a25759eaa04b 1080399542075 Author: Rafael J. Wysocki Date: Tue Dec 15 15:25:37 2020 +0100 Merge branches 'pm-cpuidle' and 'pm-em' * pm-cpuidle: cpuidle: Select polling interval based on a c-state with a longer target residency cpuidle: psci: Enable suspend-to-idle for PSCI OSI mode PM: domains: Enable dev_pm_genpd_suspend|resume() for suspend-to-idle PM: domains: Rename pm_genpd_syscore_poweroff|poweron() * pm-em: PM / EM: Micro optimization in em_cpu_energy PM: EM: Update Energy Model with new flag indicating power scale PM: EM: update the comments related to power scale PM: EM: Clarify abstract scale usage for power values in Energy Model commit e1f1320fc0a090e7019ad8ec7d81f8a18a5080eb Merge: f0f6dbaf06f43 30c768829af25 Author: Rafael J. Wysocki Date: Tue Dec 15 15:24:52 2020 +0100 Merge branch 'pm-cpufreq' * pm-cpufreq: (31 commits) cpufreq: Fix cpufreq_online() return value on errors cpufreq: Fix up several kerneldoc comments cpufreq: stats: Use local_clock() instead of jiffies cpufreq: schedutil: Simplify sugov_update_next_freq() cpufreq: intel_pstate: Simplify intel_cpufreq_update_pstate() cpufreq: arm_scmi: Discover the power scale in performance protocol firmware: arm_scmi: Add power_scale_mw_get() interface cpufreq: tegra194: Rename tegra194_get_speed_common function cpufreq: tegra194: Remove unnecessary frequency calculation cpufreq: tegra186: Simplify cluster information lookup cpufreq: tegra186: Fix sparse 'incorrect type in assignment' warning cpufreq: imx: fix NVMEM_IMX_OCOTP dependency cpufreq: vexpress-spc: Add missing MODULE_ALIAS cpufreq: scpi: Add missing MODULE_ALIAS cpufreq: loongson1: Add missing MODULE_ALIAS cpufreq: sun50i: Add missing MODULE_DEVICE_TABLE cpufreq: st: Add missing MODULE_DEVICE_TABLE cpufreq: qcom: Add missing MODULE_DEVICE_TABLE cpufreq: mediatek: Add missing MODULE_DEVICE_TABLE cpufreq: highbank: Add missing MODULE_DEVICE_TABLE ... commit 5c6679b5cb120f07652418524ab186ac47680b49 Author: Thomas Hebb Date: Sat Dec 12 17:20:12 2020 -0800 ASoC: dapm: remove widget from dirty list on free A widget's "dirty" list_head, much like its "list" list_head, eventually chains back to a list_head on the snd_soc_card itself. This means that the list can stick around even after the widget (or all widgets) have been freed. Currently, however, widgets that are in the dirty list when freed remain there, corrupting the entire list and leading to memory errors and undefined behavior when the list is next accessed or modified. I encountered this issue when a component failed to probe relatively late in snd_soc_bind_card(), causing it to bail out and call soc_cleanup_card_resources(), which eventually called snd_soc_dapm_free() with widgets that were still dirty from when they'd been added. Fixes: db432b414e20 ("ASoC: Do DAPM power checks only for widgets changed since last run") Cc: stable@vger.kernel.org Signed-off-by: Thomas Hebb Reviewed-by: Charles Keepax Link: https://lore.kernel.org/r/f8b5f031d50122bf1a9bfc9cae046badf4a7a31a.1607822410.git.tommyhebb@gmail.com Signed-off-by: Mark Brown commit 61fc03b6512b18f27a25002426d595f5a36645ed Author: Peter Ujfalusi Date: Tue Dec 15 15:05:12 2020 +0200 ASoC: dt-bindings: ti, j721e: Update maintainer and author information My employment with TI is coming to an end, add the copyright and author comments as they due and change the maintainer mail address. Signed-off-by: Peter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20201215130512.8753-3-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit fe6ce6c394fb1ef1d8a6384c5180e70893157f22 Author: Peter Ujfalusi Date: Tue Dec 15 15:05:11 2020 +0200 MAINTAINERS: Update email address for TI ASoC and twl4030 codec drivers My employment with TI is coming to an end, it is my intention to look after the drivers I have worked with over the years. Signed-off-by: Peter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20201215130512.8753-2-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit bf023e76a8c004fe38e90a3f4bbd5b47cadb741f Author: Mark Rutland Date: Mon Dec 14 11:33:53 2020 +0000 arm64: entry: suppress W=1 prototype warnings When building with W=1, GCC complains that we haven't defined prototypes for a number of non-static functions in entry-common.c: | arch/arm64/kernel/entry-common.c:203:25: warning: no previous prototype for 'el1_sync_handler' [-Wmissing-prototypes] | 203 | asmlinkage void noinstr el1_sync_handler(struct pt_regs *regs) | | ^~~~~~~~~~~~~~~~ | arch/arm64/kernel/entry-common.c:377:25: warning: no previous prototype for 'el0_sync_handler' [-Wmissing-prototypes] | 377 | asmlinkage void noinstr el0_sync_handler(struct pt_regs *regs) | | ^~~~~~~~~~~~~~~~ | arch/arm64/kernel/entry-common.c:447:25: warning: no previous prototype for 'el0_sync_compat_handler' [-Wmissing-prototypes] | 447 | asmlinkage void noinstr el0_sync_compat_handler(struct pt_regs *regs) | | ^~~~~~~~~~~~~~~~~~~~~~~ ... and so automated build systems using W=1 end up sending a number of emails, despite this not being a real problem as the only callers are in entry.S where prototypes cannot matter. For similar cases in entry-common.c we added prototypes to asm/exception.h, so let's do the same thing here for consistency. Note that there are a number of other warnings printed with W=1, both under arch/arm64 and in core code, and this patch only addresses the cases in entry-common.c. Automated build systems typically filter these warnings such that they're only reported when changes are made nearby, so we don't need to solve them all at once. Signed-off-by: Mark Rutland Cc: Will Deacon Link: https://lore.kernel.org/r/20201214113353.44417-1-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 51550a483606e35c379f78d28a7827f50e8fc09c Author: Viresh Kumar Date: Thu Dec 10 11:17:40 2020 +0530 arm64: topology: Drop the useless update to per-cpu cycles The previous call to update_freq_counters_refs() has already updated the per-cpu variables, don't overwrite them with the same value again. Fixes: 4b9cf23c179a ("arm64: wrap and generalise counter read functions") Signed-off-by: Viresh Kumar Reviewed-by: Ionela Voinescu Reviewed-by: Sudeep Holla Link: https://lore.kernel.org/r/7a171f710cdc0f808a2bfbd7db839c0d265527e7.1607579234.git.viresh.kumar@linaro.org Signed-off-by: Catalin Marinas commit c15d1f9d03a0f4f68bf52dffdd541c8054e6de35 Author: Michael Ellerman Date: Fri Oct 23 15:00:02 2020 +1100 powerpc: Add config fragment for disabling -Werror This makes it easy to disable building with -Werror: $ make defconfig $ grep WERROR .config # CONFIG_PPC_DISABLE_WERROR is not set CONFIG_PPC_WERROR=y $ make disable-werror.config GEN Makefile Using .config as base Merging arch/powerpc/configs/disable-werror.config Value of CONFIG_PPC_DISABLE_WERROR is redefined by fragment arch/powerpc/configs/disable-werror.config: Previous value: # CONFIG_PPC_DISABLE_WERROR is not set New value: CONFIG_PPC_DISABLE_WERROR=y ... $ grep WERROR .config CONFIG_PPC_DISABLE_WERROR=y Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201023040002.3313371-1-mpe@ellerman.id.au commit 5d82344795dbd3fcd74c974ab60b2845970dc5e3 Author: Michael Ellerman Date: Wed Nov 25 14:15:51 2020 +1100 powerpc/configs: Add ppc64le_allnoconfig target Add a phony target for ppc64le_allnoconfig, which tests some combinations of CONFIG symbols that aren't covered by any of our defconfigs. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201125031551.2112715-1-mpe@ellerman.id.au commit c88017cf2af614409da69934c1738ed5ff2f7022 Author: Andrew Donnellan Date: Fri Dec 11 13:11:41 2020 +1100 powerpc/powernv: Rate limit opal-elog read failure message Sometimes we can't read an error log from OPAL, and we print an error message accordingly. But the OPAL userspace tools seem to like retrying a lot, in which case we flood the kernel log with a lot of messages. Change pr_err() to pr_err_ratelimited() to help with this. Signed-off-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201211021140.28402-1-ajd@linux.ibm.com commit 20e9de85edae3a5866f29b6cce87c9ec66d62a1b Author: Laurent Dufour Date: Fri Dec 11 15:59:54 2020 +0100 powerpc/pseries/memhotplug: Quieten some DLPAR operations When attempting to remove by index a set of LMBs a lot of messages are displayed on the console, even when everything goes fine: pseries-hotplug-mem: Attempting to hot-remove LMB, drc index 8000002d Offlined Pages 4096 pseries-hotplug-mem: Memory at 2d0000000 was hot-removed The 2 messages prefixed by "pseries-hotplug-mem" are not really helpful for the end user, they should be debug outputs. In case of error, because some of the LMB's pages couldn't be offlined, the following is displayed on the console: pseries-hotplug-mem: Attempting to hot-remove LMB, drc index 8000003e pseries-hotplug-mem: Failed to hot-remove memory at 3e0000000 dlpar: Could not handle DLPAR request "memory remove index 0x8000003e" Again, the 2 messages prefixed by "pseries-hotplug-mem" are useless, and the generic DLPAR prefixed message should be enough. These 2 first changes are mainly triggered by the changes introduced in drmgr: https://groups.google.com/g/powerpc-utils-devel/c/Y6ef4NB3EzM/m/9cu5JHRxAQAJ Also, when adding a bunch of LMBs, a message is displayed in the console per LMB like these ones: pseries-hotplug-mem: Memory at 7e0000000 (drc index 8000007e) was hot-added pseries-hotplug-mem: Memory at 7f0000000 (drc index 8000007f) was hot-added pseries-hotplug-mem: Memory at 800000000 (drc index 80000080) was hot-added pseries-hotplug-mem: Memory at 810000000 (drc index 80000081) was hot-added When adding 1TB of memory and LMB size is 256MB, this leads to 4096 messages to be displayed on the console. These messages are not really helpful for the end user, so moving them to the DEBUG level. Signed-off-by: Laurent Dufour [mpe: Tweak change log wording] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201211145954.90143-1-ldufour@linux.ibm.com commit d0edaa28a1f7830997131cbce87b6c52472825d1 Author: Vincent Stehlé Date: Sun Dec 13 19:26:22 2020 +0100 powerpc/ps3: use dma_mapping_error() The DMA address returned by dma_map_single() should be checked with dma_mapping_error(). Fix the ps3stor_setup() function accordingly. Fixes: 80071802cb9c ("[POWERPC] PS3: Storage Driver Core") Signed-off-by: Vincent Stehlé Reviewed-by: Geert Uytterhoeven Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201213182622.23047-1-vincent.stehle@laposte.net commit 328e7e487a464aad024fbde6663b7859df082b7b Author: Christophe Leroy Date: Thu Oct 15 10:52:20 2020 +0000 powerpc: force inlining of csum_partial() to avoid multiple csum_partial() with GCC10 ppc-linux-objdump -d vmlinux | grep -e "" -e "<__csum_partial>" With gcc9 I get: c0017ef8 <__csum_partial>: c00182fc: 4b ff fb fd bl c0017ef8 <__csum_partial> c0018478: 4b ff fa 80 b c0017ef8 <__csum_partial> c03e8458: 4b c2 fa a0 b c0017ef8 <__csum_partial> c03e8518: 4b c2 f9 e1 bl c0017ef8 <__csum_partial> c03ef410: 4b c2 8a e9 bl c0017ef8 <__csum_partial> c03f0b24: 4b c2 73 d5 bl c0017ef8 <__csum_partial> c04279a4: 4b bf 05 55 bl c0017ef8 <__csum_partial> c0429820: 4b be e6 d9 bl c0017ef8 <__csum_partial> c0429944: 4b be e5 b5 bl c0017ef8 <__csum_partial> c042b478: 4b be ca 81 bl c0017ef8 <__csum_partial> c042b554: 4b be c9 a5 bl c0017ef8 <__csum_partial> c045f15c: 4b bb 8d 9d bl c0017ef8 <__csum_partial> c0492190: 4b b8 5d 69 bl c0017ef8 <__csum_partial> c0492310: 4b b8 5b e9 bl c0017ef8 <__csum_partial> c0495594: 4b b8 29 65 bl c0017ef8 <__csum_partial> c049c420: 4b b7 ba d9 bl c0017ef8 <__csum_partial> c049c870: 4b b7 b6 89 bl c0017ef8 <__csum_partial> c049c930: 4b b7 b5 c9 bl c0017ef8 <__csum_partial> c04a9ca0: 4b b6 e2 59 bl c0017ef8 <__csum_partial> c04bdde4: 4b b5 a1 15 bl c0017ef8 <__csum_partial> c04be480: 4b b5 9a 79 bl c0017ef8 <__csum_partial> c04be710: 4b b5 97 e9 bl c0017ef8 <__csum_partial> c04c969c: 4b b4 e8 5d bl c0017ef8 <__csum_partial> c04ca2fc: 4b b4 db fd bl c0017ef8 <__csum_partial> c04cf5bc: 4b b4 89 3d bl c0017ef8 <__csum_partial> c04d0440: 4b b4 7a b9 bl c0017ef8 <__csum_partial> With gcc10 I get: c0018d08 <__csum_partial>: c0019020 : c0019020: 4b ff fc e8 b c0018d08 <__csum_partial> c001914c: 4b ff fe d4 b c0019020 c0019250: 4b ff fd d1 bl c0019020 c03e404c : c03e404c: 4b c3 4c bc b c0018d08 <__csum_partial> c03e4050: 4b ff ff fc b c03e404c c03e40fc: 4b ff ff 51 bl c03e404c c03e6680: 4b ff d9 cd bl c03e404c c03e68c4: 4b ff d7 89 bl c03e404c c03e7934: 4b ff c7 19 bl c03e404c c03e7bf8: 4b ff c4 55 bl c03e404c c03eb148: 4b ff 8f 05 bl c03e404c c03ecf68: 4b c2 bd a1 bl c0018d08 <__csum_partial> c04275b8 : c04275b8: 4b bf 17 50 b c0018d08 <__csum_partial> c0427884: 4b ff fd 35 bl c04275b8 c0427b18: 4b ff fa a1 bl c04275b8 c0427bd8: 4b ff f9 e1 bl c04275b8 c0427cd4: 4b ff f8 e5 bl c04275b8 c0427e34: 4b ff f7 85 bl c04275b8 c045a1c0: 4b bb eb 49 bl c0018d08 <__csum_partial> c0489464 : c0489464: 4b b8 f8 a4 b c0018d08 <__csum_partial> c04896b0: 4b ff fd b5 bl c0489464 c048982c: 4b ff fc 39 bl c0489464 c0490158: 4b b8 8b b1 bl c0018d08 <__csum_partial> c0492f0c : c0492f0c: 4b b8 5d fc b c0018d08 <__csum_partial> c049326c: 4b ff fc a1 bl c0492f0c c049333c: 4b ff fb d1 bl c0492f0c c0493b18: 4b ff f3 f5 bl c0492f0c c0493f50: 4b ff ef bd bl c0492f0c c0493ffc: 4b ff ef 11 bl c0492f0c c04a0f78: 4b b7 7d 91 bl c0018d08 <__csum_partial> c04b3e3c: 4b b6 4e cd bl c0018d08 <__csum_partial> c04b40d0 : c04b40d0: 4b b6 4c 38 b c0018d08 <__csum_partial> c04b4448: 4b ff fc 89 bl c04b40d0 c04b46f4: 4b ff f9 dd bl c04b40d0 c04bf448: 4b b5 98 c0 b c0018d08 <__csum_partial> c04c5264: 4b b5 3a a5 bl c0018d08 <__csum_partial> c04c61e4: 4b b5 2b 25 bl c0018d08 <__csum_partial> gcc10 defines multiple versions of csum_partial() which are just an unconditionnal branch to __csum_partial(). To enforce inlining of that branch to __csum_partial(), mark csum_partial() as __always_inline. With this patch with gcc10: c0018d08 <__csum_partial>: c0019148: 4b ff fb c0 b c0018d08 <__csum_partial> c001924c: 4b ff fa bd bl c0018d08 <__csum_partial> c03e40ec: 4b c3 4c 1d bl c0018d08 <__csum_partial> c03e4120: 4b c3 4b e8 b c0018d08 <__csum_partial> c03eb004: 4b c2 dd 05 bl c0018d08 <__csum_partial> c03ecef4: 4b c2 be 15 bl c0018d08 <__csum_partial> c0427558: 4b bf 17 b1 bl c0018d08 <__csum_partial> c04286e4: 4b bf 06 25 bl c0018d08 <__csum_partial> c0428cd8: 4b bf 00 31 bl c0018d08 <__csum_partial> c0428d84: 4b be ff 85 bl c0018d08 <__csum_partial> c045a17c: 4b bb eb 8d bl c0018d08 <__csum_partial> c0489450: 4b b8 f8 b9 bl c0018d08 <__csum_partial> c0491860: 4b b8 74 a9 bl c0018d08 <__csum_partial> c0492eec: 4b b8 5e 1d bl c0018d08 <__csum_partial> c04a0eac: 4b b7 7e 5d bl c0018d08 <__csum_partial> c04b3e34: 4b b6 4e d5 bl c0018d08 <__csum_partial> c04b426c: 4b b6 4a 9d bl c0018d08 <__csum_partial> c04b463c: 4b b6 46 cd bl c0018d08 <__csum_partial> c04c004c: 4b b5 8c bd bl c0018d08 <__csum_partial> c04c0368: 4b b5 89 a1 bl c0018d08 <__csum_partial> c04c5254: 4b b5 3a b5 bl c0018d08 <__csum_partial> c04c60d4: 4b b5 2c 35 bl c0018d08 <__csum_partial> Signed-off-by: Christophe Leroy Reviewed-by: Segher Boessenkool Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/a1d31f84ddb0926813b17fcd5cc7f3fa7b4deac2.1602759123.git.christophe.leroy@csgroup.eu commit ef0e3b650f8ddc54bb70868852f50642ee3ae765 Author: Madhavan Srinivasan Date: Tue Dec 15 03:56:18 2020 -0500 powerpc/perf: Fix Threshold Event Counter Multiplier width for P10 Threshold Event Counter Multiplier (TECM) is part of Monitor Mode Control Register A (MMCRA). This field along with Threshold Event Counter Exponent (TECE) is used to get threshould counter value. In Power10, this is a 8bit field, so patch fixes the current code to modify the MMCRA[TECM] extraction macro to handle this change. ISA v3.1 says this is a 7 bit field but POWER10 it's actually 8 bits which will hopefully be fixed in ISA v3.1 update. Fixes: 170a315f41c6 ("powerpc/perf: Support to export MMCRA[TEC*] field to userspace") Signed-off-by: Madhavan Srinivasan Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1608022578-1532-1-git-send-email-atrajeev@linux.vnet.ibm.com commit 2198d4934ee8b81341a84c9ec8bb25b4b0d02522 Author: Christophe Leroy Date: Sat Dec 12 13:41:25 2020 +0000 powerpc/mm: Fix hugetlb_free_pmd_range() and hugetlb_free_pud_range() Commit 7bfe54b5f165 ("powerpc/mm: Refactor the floor/ceiling check in hugetlb range freeing functions") inadvertely removed the mask applied to start parameter in those two functions, leading to the following crash on power9. LTP: starting hugemmap05_1 (hugemmap05 -m) ------------[ cut here ]------------ kernel BUG at arch/powerpc/mm/book3s64/pgtable.c:387! Oops: Exception in kernel mode, sig: 5 [#1] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=256 NUMA PowerNV ... CPU: 99 PID: 308 Comm: ksoftirqd/99 Tainted: G O 5.10.0-rc7-next-20201211 #1 NIP: c00000000005dbec LR: c0000000003352f4 CTR: 0000000000000000 REGS: c00020000bb6f830 TRAP: 0700 Tainted: G O (5.10.0-rc7-next-20201211) MSR: 900000000282b033 CR: 24002284 XER: 20040000 GPR00: c0000000003352f4 c00020000bb6fad0 c000000007f70b00 c0002000385b3ff0 GPR04: 0000000000000000 0000000000000003 c00020000bb6f8b4 0000000000000001 GPR08: 0000000000000001 0000000000000009 0000000000000008 0000000000000002 GPR12: 0000000024002488 c000201fff649c00 c000000007f2a20c 0000000000000000 GPR16: 0000000000000007 0000000000000000 c000000000194d10 c000000000194d10 GPR24: 0000000000000014 0000000000000015 c000201cc6e72398 c000000007fac4b4 GPR28: c000000007f2bf80 c000000007fac2f8 0000000000000008 c000200033870000 NIP [c00000000005dbec] __tlb_remove_table+0x1dc/0x1e0 pgtable_free at arch/powerpc/mm/book3s64/pgtable.c:387 (inlined by) __tlb_remove_table at arch/powerpc/mm/book3s64/pgtable.c:405 LR [c0000000003352f4] tlb_remove_table_rcu+0x54/0xa0 Call Trace: __tlb_remove_table+0x13c/0x1e0 (unreliable) tlb_remove_table_rcu+0x54/0xa0 __tlb_remove_table_free at mm/mmu_gather.c:101 (inlined by) tlb_remove_table_rcu at mm/mmu_gather.c:156 rcu_core+0x35c/0xbb0 rcu_do_batch at kernel/rcu/tree.c:2502 (inlined by) rcu_core at kernel/rcu/tree.c:2737 __do_softirq+0x480/0x704 run_ksoftirqd+0x74/0xd0 run_ksoftirqd at kernel/softirq.c:651 (inlined by) run_ksoftirqd at kernel/softirq.c:642 smpboot_thread_fn+0x278/0x320 kthread+0x1c4/0x1d0 ret_from_kernel_thread+0x5c/0x80 Properly apply the masks before calling pmd_free_tlb() and pud_free_tlb() respectively. Fixes: 7bfe54b5f165 ("powerpc/mm: Refactor the floor/ceiling check in hugetlb range freeing functions") Reported-by: Qian Cai Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/56feccd7b6fcd98e353361a233fa7bb8e67c3164.1607780469.git.christophe.leroy@csgroup.eu commit 87fb4978ef8f7e3d6f51ea8e259638c4e96f2fc0 Author: Leonardo Bras Date: Tue Dec 8 18:57:08 2020 -0300 KVM: PPC: Book3S HV: Fix mask size for emulated msgsndp According to ISAv3.1 and ISAv3.0b, the msgsndp is described to split RB in: msgtype <- (RB) 32:36 payload <- (RB) 37:63 t <- (RB) 57:63 The current way of getting 'msgtype', and 't' is missing their MSB: msgtype: ((arg >> 27) & 0xf) : Gets (RB) 33:36, missing bit 32 t: (arg &= 0x3f) : Gets (RB) 58:63, missing bit 57 Fixes this by applying the correct mask. Signed-off-by: Leonardo Bras Acked-by: Paul Mackerras Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201208215707.31149-1-leobras.c@gmail.com commit a300bf8c5f24bdeaa84925d1e0ec6221cbdc7597 Author: Kaixu Xia Date: Sat Nov 7 23:49:38 2020 +0800 KVM: PPC: fix comparison to bool warning Fix the following coccicheck warning: ./arch/powerpc/kvm/booke.c:503:6-16: WARNING: Comparison to bool ./arch/powerpc/kvm/booke.c:505:6-17: WARNING: Comparison to bool ./arch/powerpc/kvm/booke.c:507:6-16: WARNING: Comparison to bool Reported-by: Tosk Robot Signed-off-by: Kaixu Xia Acked-by: Paul Mackerras Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1604764178-8087-1-git-send-email-kaixuxia@tencent.com commit 13751f8747519fe3bdc738fa6d802fbd94a85ac4 Author: Kaixu Xia Date: Sat Nov 7 14:26:22 2020 +0800 KVM: PPC: Book3S: Assign boolean values to a bool variable Fix the following coccinelle warnings: ./arch/powerpc/kvm/book3s_xics.c:476:3-15: WARNING: Assignment of 0/1 to bool variable ./arch/powerpc/kvm/book3s_xics.c:504:3-15: WARNING: Assignment of 0/1 to bool variable Reported-by: Tosk Robot Signed-off-by: Kaixu Xia Reviewed-by: Greg Kurz Acked-by: Paul Mackerras Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1604730382-5810-1-git-send-email-kaixuxia@tencent.com commit 3dcb8b53cbd2cc5618863b19ef00f8ea82f27e83 Merge: 54649911f31b6 d72c8b0e1cacc Author: Thomas Gleixner Date: Tue Dec 15 12:14:38 2020 +0100 Merge tag 'efi-next-for-v5.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi into efi/core Pull followup fixes for EFI from Ard Biesheuvel: - fix the build breakage on IA64 caused by recent capsule loader changes - suppress a type mismatch build warning in the expansion of EFI_PHYS_ALIGN on ARM Link: https://lore.kernel.org/r/20201215080144.17077-1-ardb@kernel.org commit ae7927023243dcc7389b2d59b16c09cbbeaecc36 Author: Peter Zijlstra Date: Thu Dec 10 17:14:08 2020 +0100 sched: Optimize finish_lock_switch() The kernel test robot measured a -1.6% performance regression on will-it-scale/sched_yield due to commit: 2558aacff858 ("sched/hotplug: Ensure only per-cpu kthreads run during hotplug") Even though we were careful to replace a single load with another single load from the same cacheline. Restore finish_lock_switch() to the exact state before the offending patch and solve the problem differently. Fixes: 2558aacff858 ("sched/hotplug: Ensure only per-cpu kthreads run during hotplug") Reported-by: kernel test robot Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201210161408.GX3021@hirez.programming.kicks-ass.net commit ad73109ae7ec30d5bfb76be108e304f9f0af4829 Author: Tom Lendacky Date: Thu Dec 10 11:10:09 2020 -0600 KVM: SVM: Provide support to launch and run an SEV-ES guest An SEV-ES guest is started by invoking a new SEV initialization ioctl, KVM_SEV_ES_INIT. This identifies the guest as an SEV-ES guest, which is used to drive the appropriate ASID allocation, VMSA encryption, etc. Before being able to run an SEV-ES vCPU, the vCPU VMSA must be encrypted and measured. This is done using the LAUNCH_UPDATE_VMSA command after all calls to LAUNCH_UPDATE_DATA have been performed, but before LAUNCH_MEASURE has been performed. In order to establish the encrypted VMSA, the current (traditional) VMSA and the GPRs are synced to the page that will hold the encrypted VMSA and then LAUNCH_UPDATE_VMSA is invoked. The vCPU is then marked as having protected guest state. Signed-off-by: Tom Lendacky Message-Id: Signed-off-by: Paolo Bonzini commit 16809ecdc1e8ab7278f1d60021ac809edd17d060 Author: Tom Lendacky Date: Thu Dec 10 11:10:08 2020 -0600 KVM: SVM: Provide an updated VMRUN invocation for SEV-ES guests The run sequence is different for an SEV-ES guest compared to a legacy or even an SEV guest. The guest vCPU register state of an SEV-ES guest will be restored on VMRUN and saved on VMEXIT. There is no need to restore the guest registers directly and through VMLOAD before VMRUN and no need to save the guest registers directly and through VMSAVE on VMEXIT. Update the svm_vcpu_run() function to skip register state saving and restoring and provide an alternative function for running an SEV-ES guest in vmenter.S Additionally, certain host state is restored across an SEV-ES VMRUN. As a result certain register states are not required to be restored upon VMEXIT (e.g. FS, GS, etc.), so only do that if the guest is not an SEV-ES guest. Signed-off-by: Tom Lendacky Message-Id: Signed-off-by: Paolo Bonzini commit 861377730aa9db4cbaa0f3bd3f4d295c152732c4 Author: Tom Lendacky Date: Thu Dec 10 11:10:07 2020 -0600 KVM: SVM: Provide support for SEV-ES vCPU loading An SEV-ES vCPU requires additional VMCB vCPU load/put requirements. SEV-ES hardware will restore certain registers on VMEXIT, but not save them on VMRUN (see Table B-3 and Table B-4 of the AMD64 APM Volume 2), so make the following changes: General vCPU load changes: - During vCPU loading, perform a VMSAVE to the per-CPU SVM save area and save the current values of XCR0, XSS and PKRU to the per-CPU SVM save area as these registers will be restored on VMEXIT. General vCPU put changes: - Do not attempt to restore registers that SEV-ES hardware has already restored on VMEXIT. Signed-off-by: Tom Lendacky Message-Id: <019390e9cb5e93cd73014fa5a040c17d42588733.1607620209.git.thomas.lendacky@amd.com> Signed-off-by: Paolo Bonzini commit 376c6d285017419e35c7177bc60abe7915fb7497 Author: Tom Lendacky Date: Thu Dec 10 11:10:06 2020 -0600 KVM: SVM: Provide support for SEV-ES vCPU creation/loading An SEV-ES vCPU requires additional VMCB initialization requirements for vCPU creation and vCPU load/put requirements. This includes: General VMCB initialization changes: - Set a VMCB control bit to enable SEV-ES support on the vCPU. - Set the VMCB encrypted VM save area address. - CRx registers are part of the encrypted register state and cannot be updated. Remove the CRx register read and write intercepts and replace them with CRx register write traps to track the CRx register values. - Certain MSR values are part of the encrypted register state and cannot be updated. Remove certain MSR intercepts (EFER, CR_PAT, etc.). - Remove the #GP intercept (no support for "enable_vmware_backdoor"). - Remove the XSETBV intercept since the hypervisor cannot modify XCR0. General vCPU creation changes: - Set the initial GHCB gpa value as per the GHCB specification. Signed-off-by: Tom Lendacky Message-Id: <3a8aef366416eddd5556dfa3fdc212aafa1ad0a2.1607620209.git.thomas.lendacky@amd.com> Signed-off-by: Paolo Bonzini commit 80675b3ad45f79d97ce47a0faac3a6d22ab7e876 Author: Tom Lendacky Date: Thu Dec 10 11:10:05 2020 -0600 KVM: SVM: Update ASID allocation to support SEV-ES guests SEV and SEV-ES guests each have dedicated ASID ranges. Update the ASID allocation routine to return an ASID in the respective range. Signed-off-by: Tom Lendacky Message-Id: Signed-off-by: Paolo Bonzini commit 85ca8be938c0e693b5ed5392279d5ecedf42901e Author: Tom Lendacky Date: Thu Dec 10 11:10:04 2020 -0600 KVM: SVM: Set the encryption mask for the SVM host save area The SVM host save area is used to restore some host state on VMEXIT of an SEV-ES guest. After allocating the save area, clear it and add the encryption mask to the SVM host save area physical address that is programmed into the VM_HSAVE_PA MSR. Signed-off-by: Tom Lendacky Message-Id: Signed-off-by: Paolo Bonzini commit 4444dfe4050b79964d7bb9b86a99e2bb21a972b0 Author: Tom Lendacky Date: Mon Dec 14 11:16:03 2020 -0500 KVM: SVM: Add NMI support for an SEV-ES guest The GHCB specification defines how NMIs are to be handled for an SEV-ES guest. To detect the completion of an NMI the hypervisor must not intercept the IRET instruction (because a #VC while running the NMI will issue an IRET) and, instead, must receive an NMI Complete exit event from the guest. Update the KVM support for detecting the completion of NMIs in the guest to follow the GHCB specification. When an SEV-ES guest is active, the IRET instruction will no longer be intercepted. Now, when the NMI Complete exit event is received, the iret_interception() function will be called to simulate the completion of the NMI. Signed-off-by: Tom Lendacky Message-Id: <5ea3dd69b8d4396cefdc9048ebc1ab7caa70a847.1607620209.git.thomas.lendacky@amd.com> Signed-off-by: Paolo Bonzini commit ed02b213098a90c2a415a0da18f05841f8cf0a81 Author: Tom Lendacky Date: Thu Dec 10 11:10:01 2020 -0600 KVM: SVM: Guest FPU state save/restore not needed for SEV-ES guest The guest FPU state is automatically restored on VMRUN and saved on VMEXIT by the hardware, so there is no reason to do this in KVM. Eliminate the allocation of the guest_fpu save area and key off that to skip operations related to the guest FPU state. Signed-off-by: Tom Lendacky Message-Id: <173e429b4d0d962c6a443c4553ffdaf31b7665a4.1607620209.git.thomas.lendacky@amd.com> Signed-off-by: Paolo Bonzini commit 5719455fbd952a69ebc860d47bb0287e9198fe12 Author: Tom Lendacky Date: Thu Dec 10 11:10:00 2020 -0600 KVM: SVM: Do not report support for SMM for an SEV-ES guest SEV-ES guests do not currently support SMM. Update the has_emulated_msr() kvm_x86_ops function to take a struct kvm parameter so that the capability can be reported at a VM level. Since this op is also called during KVM initialization and before a struct kvm instance is available, comments will be added to each implementation of has_emulated_msr() to indicate the kvm parameter can be null. Signed-off-by: Tom Lendacky Message-Id: <75de5138e33b945d2fb17f81ae507bda381808e3.1607620209.git.thomas.lendacky@amd.com> Signed-off-by: Paolo Bonzini commit 5265713a073754605108b3aba17619a0bbbae3c4 Author: Tom Lendacky Date: Thu Dec 10 11:09:59 2020 -0600 KVM: x86: Update __get_sregs() / __set_sregs() to support SEV-ES Since many of the registers used by the SEV-ES are encrypted and cannot be read or written, adjust the __get_sregs() / __set_sregs() to take into account whether the VMSA/guest state is encrypted. For __get_sregs(), return the actual value that is in use by the guest for all registers being tracked using the write trap support. For __set_sregs(), skip setting of all guest registers values. Signed-off-by: Tom Lendacky Message-Id: <23051868db76400a9b07a2020525483a1e62dbcf.1607620209.git.thomas.lendacky@amd.com> Signed-off-by: Paolo Bonzini commit d1949b93c60504b338c89cf8b3873c0d11feb7ed Author: Tom Lendacky Date: Thu Dec 10 11:09:58 2020 -0600 KVM: SVM: Add support for CR8 write traps for an SEV-ES guest For SEV-ES guests, the interception of control register write access is not recommended. Control register interception occurs prior to the control register being modified and the hypervisor is unable to modify the control register itself because the register is located in the encrypted register state. SEV-ES guests introduce new control register write traps. These traps provide intercept support of a control register write after the control register has been modified. The new control register value is provided in the VMCB EXITINFO1 field, allowing the hypervisor to track the setting of the guest control registers. Add support to track the value of the guest CR8 register using the control register write trap so that the hypervisor understands the guest operating mode. Signed-off-by: Tom Lendacky Message-Id: <5a01033f4c8b3106ca9374b7cadf8e33da852df1.1607620209.git.thomas.lendacky@amd.com> Signed-off-by: Paolo Bonzini commit 5b51cb13160ae0ba10645bd0a84e7847677fb6a0 Author: Tom Lendacky Date: Thu Dec 10 11:09:57 2020 -0600 KVM: SVM: Add support for CR4 write traps for an SEV-ES guest For SEV-ES guests, the interception of control register write access is not recommended. Control register interception occurs prior to the control register being modified and the hypervisor is unable to modify the control register itself because the register is located in the encrypted register state. SEV-ES guests introduce new control register write traps. These traps provide intercept support of a control register write after the control register has been modified. The new control register value is provided in the VMCB EXITINFO1 field, allowing the hypervisor to track the setting of the guest control registers. Add support to track the value of the guest CR4 register using the control register write trap so that the hypervisor understands the guest operating mode. Signed-off-by: Tom Lendacky Message-Id: Signed-off-by: Paolo Bonzini commit f27ad38aac23263c40fe26c0188182c129a8f8dd Author: Tom Lendacky Date: Thu Dec 10 11:09:56 2020 -0600 KVM: SVM: Add support for CR0 write traps for an SEV-ES guest For SEV-ES guests, the interception of control register write access is not recommended. Control register interception occurs prior to the control register being modified and the hypervisor is unable to modify the control register itself because the register is located in the encrypted register state. SEV-ES support introduces new control register write traps. These traps provide intercept support of a control register write after the control register has been modified. The new control register value is provided in the VMCB EXITINFO1 field, allowing the hypervisor to track the setting of the guest control registers. Add support to track the value of the guest CR0 register using the control register write trap so that the hypervisor understands the guest operating mode. Signed-off-by: Tom Lendacky Message-Id: <182c9baf99df7e40ad9617ff90b84542705ef0d7.1607620209.git.thomas.lendacky@amd.com> Signed-off-by: Paolo Bonzini commit 2985afbcdbb1957a8d31992cebbc4e49d2ad8a77 Author: Tom Lendacky Date: Thu Dec 10 11:09:55 2020 -0600 KVM: SVM: Add support for EFER write traps for an SEV-ES guest For SEV-ES guests, the interception of EFER write access is not recommended. EFER interception occurs prior to EFER being modified and the hypervisor is unable to modify EFER itself because the register is located in the encrypted register state. SEV-ES support introduces a new EFER write trap. This trap provides intercept support of an EFER write after it has been modified. The new EFER value is provided in the VMCB EXITINFO1 field, allowing the hypervisor to track the setting of the guest EFER. Add support to track the value of the guest EFER value using the EFER write trap so that the hypervisor understands the guest operating mode. Signed-off-by: Tom Lendacky Message-Id: <8993149352a3a87cd0625b3b61bfd31ab28977e1.1607620209.git.thomas.lendacky@amd.com> Signed-off-by: Paolo Bonzini commit 7ed9abfe8e9f62384f9b11c9fca19e551dbec5bd Author: Tom Lendacky Date: Thu Dec 10 11:09:54 2020 -0600 KVM: SVM: Support string IO operations for an SEV-ES guest For an SEV-ES guest, string-based port IO is performed to a shared (un-encrypted) page so that both the hypervisor and guest can read or write to it and each see the contents. For string-based port IO operations, invoke SEV-ES specific routines that can complete the operation using common KVM port IO support. Signed-off-by: Tom Lendacky Message-Id: <9d61daf0ffda496703717218f415cdc8fd487100.1607620209.git.thomas.lendacky@amd.com> Signed-off-by: Paolo Bonzini commit 8f423a80d299a5b3964b8af005d1aab4e5e9106a Author: Tom Lendacky Date: Thu Dec 10 11:09:53 2020 -0600 KVM: SVM: Support MMIO for an SEV-ES guest For an SEV-ES guest, MMIO is performed to a shared (un-encrypted) page so that both the hypervisor and guest can read or write to it and each see the contents. The GHCB specification provides software-defined VMGEXIT exit codes to indicate a request for an MMIO read or an MMIO write. Add support to recognize the MMIO requests and invoke SEV-ES specific routines that can complete the MMIO operation. These routines use common KVM support to complete the MMIO operation. Signed-off-by: Tom Lendacky Message-Id: Signed-off-by: Paolo Bonzini commit 59e38b58de283f76c533a2da416abf93bfd9ea41 Author: Tom Lendacky Date: Thu Dec 10 11:09:52 2020 -0600 KVM: SVM: Create trace events for VMGEXIT MSR protocol processing Add trace events for entry to and exit from VMGEXIT MSR protocol processing. The vCPU will be common for the trace events. The MSR protocol processing is guided by the GHCB GPA in the VMCB, so the GHCB GPA will represent the input and output values for the entry and exit events, respectively. Additionally, the exit event will contain the return code for the event. Signed-off-by: Tom Lendacky Message-Id: Signed-off-by: Paolo Bonzini commit d523ab6ba2753bd41b4447ae48024182cb4da94f Author: Tom Lendacky Date: Thu Dec 10 11:09:48 2020 -0600 KVM: SVM: Create trace events for VMGEXIT processing Add trace events for entry to and exit from VMGEXIT processing. The vCPU id and the exit reason will be common for the trace events. The exit info fields will represent the input and output values for the entry and exit events, respectively. Signed-off-by: Tom Lendacky Message-Id: <25357dca49a38372e8f483753fb0c1c2a70a6898.1607620209.git.thomas.lendacky@amd.com> Signed-off-by: Paolo Bonzini commit e1d71116b64a54c3948d2692d4338e643408c411 Author: Tom Lendacky Date: Thu Dec 10 11:09:51 2020 -0600 KVM: SVM: Add support for SEV-ES GHCB MSR protocol function 0x100 The GHCB specification defines a GHCB MSR protocol using the lower 12-bits of the GHCB MSR (in the hypervisor this corresponds to the GHCB GPA field in the VMCB). Function 0x100 is a request for termination of the guest. The guest has encountered some situation for which it has requested to be terminated. The GHCB MSR value contains the reason for the request. Signed-off-by: Tom Lendacky Message-Id: Signed-off-by: Paolo Bonzini commit d36946679ef6a6fb32b655265602c174feb0ce5e Author: Tom Lendacky Date: Thu Dec 10 11:09:50 2020 -0600 KVM: SVM: Add support for SEV-ES GHCB MSR protocol function 0x004 The GHCB specification defines a GHCB MSR protocol using the lower 12-bits of the GHCB MSR (in the hypervisor this corresponds to the GHCB GPA field in the VMCB). Function 0x004 is a request for CPUID information. Only a single CPUID result register can be sent per invocation, so the protocol defines the register that is requested. The GHCB MSR value is set to the CPUID register value as per the specification via the VMCB GHCB GPA field. Signed-off-by: Tom Lendacky Message-Id: Signed-off-by: Paolo Bonzini commit 1edc14599e06fdf23dcf7516f73f09091853eb9a Author: Tom Lendacky Date: Thu Dec 10 11:09:49 2020 -0600 KVM: SVM: Add support for SEV-ES GHCB MSR protocol function 0x002 The GHCB specification defines a GHCB MSR protocol using the lower 12-bits of the GHCB MSR (in the hypervisor this corresponds to the GHCB GPA field in the VMCB). Function 0x002 is a request to set the GHCB MSR value to the SEV INFO as per the specification via the VMCB GHCB GPA field. Signed-off-by: Tom Lendacky Message-Id: Signed-off-by: Paolo Bonzini commit 291bd20d5d88814a73d43b55b9428feab2f28094 Author: Tom Lendacky Date: Thu Dec 10 11:09:47 2020 -0600 KVM: SVM: Add initial support for a VMGEXIT VMEXIT SEV-ES adds a new VMEXIT reason code, VMGEXIT. Initial support for a VMGEXIT includes mapping the GHCB based on the guest GPA, which is obtained from a new VMCB field, and then validating the required inputs for the VMGEXIT exit reason. Since many of the VMGEXIT exit reasons correspond to existing VMEXIT reasons, the information from the GHCB is copied into the VMCB control exit code areas and KVM register areas. The standard exit handlers are invoked, similar to standard VMEXIT processing. Before restarting the vCPU, the GHCB is updated with any registers that have been updated by the hypervisor. Signed-off-by: Tom Lendacky Message-Id: Signed-off-by: Paolo Bonzini commit e9093fd49285ff7b5e4d3f8b528f5b43445c5f5d Author: Tom Lendacky Date: Thu Dec 10 11:09:46 2020 -0600 KVM: SVM: Prepare for SEV-ES exit handling in the sev.c file This is a pre-patch to consolidate some exit handling code into callable functions. Follow-on patches for SEV-ES exit handling will then be able to use them from the sev.c file. Signed-off-by: Tom Lendacky Message-Id: <5b8b0ffca8137f3e1e257f83df9f5c881c8a96a3.1607620209.git.thomas.lendacky@amd.com> Signed-off-by: Paolo Bonzini commit 8164a5ffe4c65291efecc03a590c978fd14c240f Author: Tom Lendacky Date: Thu Dec 10 11:09:45 2020 -0600 KVM: SVM: Cannot re-initialize the VMCB after shutdown with SEV-ES When a SHUTDOWN VMEXIT is encountered, normally the VMCB is re-initialized so that the guest can be re-launched. But when a guest is running as an SEV-ES guest, the VMSA cannot be re-initialized because it has been encrypted. For now, just return -EINVAL to prevent a possible attempt at a guest reset. Signed-off-by: Tom Lendacky Message-Id: Signed-off-by: Paolo Bonzini commit bc624d9f1bbbfd6ae7057437cd3fcfef17066399 Author: Tom Lendacky Date: Thu Dec 10 11:09:44 2020 -0600 KVM: SVM: Do not allow instruction emulation under SEV-ES When a guest is running as an SEV-ES guest, it is not possible to emulate instructions. Add support to prevent instruction emulation. Signed-off-by: Tom Lendacky Message-Id: Signed-off-by: Paolo Bonzini commit 8d4846b9b15045598d760470789716fb08b9b317 Author: Tom Lendacky Date: Thu Dec 10 11:09:43 2020 -0600 KVM: SVM: Prevent debugging under SEV-ES Since the guest register state of an SEV-ES guest is encrypted, debugging is not supported. Update the code to prevent guest debugging when the guest has protected state. Additionally, an SEV-ES guest must only and always intercept DR7 reads and writes. Update set_dr_intercepts() and clr_dr_intercepts() to account for this. Signed-off-by: Tom Lendacky Message-Id: <8db966fa2f9803d6454ce773863025d0e2e7f3cc.1607620209.git.thomas.lendacky@amd.com> Signed-off-by: Paolo Bonzini commit f1c6366e304328de301be362eca905a3503ff33b Author: Tom Lendacky Date: Mon Dec 14 10:29:50 2020 -0500 KVM: SVM: Add required changes to support intercepts under SEV-ES When a guest is running under SEV-ES, the hypervisor cannot access the guest register state. There are numerous places in the KVM code where certain registers are accessed that are not allowed to be accessed (e.g. RIP, CR0, etc). Add checks to prevent register accesses and add intercept update support at various points within the KVM code. Also, when handling a VMGEXIT, exceptions are passed back through the GHCB. Since the RDMSR/WRMSR intercepts (may) inject a #GP on error, update the SVM intercepts to handle this for SEV-ES guests. Signed-off-by: Tom Lendacky [Redo MSR part using the .complete_emulated_msr callback. - Paolo] Signed-off-by: Paolo Bonzini commit f9a4d621761a2c7db686cc47772a0688d389f2d7 Author: Paolo Bonzini Date: Mon Dec 14 10:26:51 2020 -0500 KVM: x86: introduce complete_emulated_msr callback This will be used by SEV-ES to inject MSR failure via the GHCB. Reviewed-by: Tom Lendacky Signed-off-by: Paolo Bonzini commit 8b474427cbeea05850fb32da65cc95eebcbad089 Author: Paolo Bonzini Date: Mon Dec 14 07:44:46 2020 -0500 KVM: x86: use kvm_complete_insn_gp in emulating RDMSR/WRMSR Simplify the four functions that handle {kernel,user} {rd,wr}msr, there is still some repetition between the two instances of rdmsr but the whole business of calling kvm_inject_gp and kvm_skip_emulated_instruction can be unified nicely. Because complete_emulated_wrmsr now becomes essentially a call to kvm_complete_insn_gp, remove complete_emulated_msr. Reviewed-by: Tom Lendacky Signed-off-by: Paolo Bonzini commit 9caec4bf1d0126fa5f2fcd21852958bccd2a4c18 Author: Paolo Bonzini Date: Mon Dec 14 07:59:15 2020 -0500 KVM: x86: remove bogus #GP injection There is no need to inject a #GP from kvm_mtrr_set_msr, kvm_emulate_wrmsr will handle it. Reviewed-by: Tom Lendacky Signed-off-by: Paolo Bonzini commit ee46d16d2e40bebc2aa790fd7b6a056466ff895c Author: Guido Günther Date: Tue Dec 15 09:23:38 2020 +0100 drm: mxsfb: Silence -EPROBE_DEFER while waiting for bridge It can take multiple iterations until all components for an attached DSI bridge are up leading to several: [ 3.796425] mxsfb 30320000.lcd-controller: Cannot connect bridge: -517 [ 3.816952] mxsfb 30320000.lcd-controller: [drm:mxsfb_probe [mxsfb]] *ERROR* failed to attach bridge: -517 Silence this by checking for -EPROBE_DEFER and using dev_err_probe() so we set a deferred reason in case a dependency fails to probe (which quickly happens on small config/DT changes due to the rather long probe chain which can include bridges, phys, panels, backights, leds, etc.). This also removes the only DRM_DEV_ERROR() usage, the rest of the driver uses dev_err(). Signed-off-by: Guido Günther Fixes: c42001e357f7 ("drm: mxsfb: Use drm_panel_bridge") Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/d5761eb871adde5464ba112b89d966568bc2ff6c.1608020391.git.agx@sigxcpu.org commit be98e05a67f05ff4c8349a51fcec993a28be718c Author: Daniel Vetter Date: Fri Dec 4 21:02:42 2020 +0100 dma-buf: Fix kerneldoc formatting I wanted to look up something and noticed the hyperlink doesn't work. While fixing that also noticed a trivial kerneldoc comment typo in the same section, fix that too. Reviewed-by: Michael J. Ruhl Reviewed-by: Simon Ser Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201204200242.2671481-1-daniel.vetter@ffwll.ch commit 3c41e57a1e168d879e923c5583adeae47eec9f64 Merge: d14ce74f1fb37 2f5fbc4305d07 Author: Thomas Gleixner Date: Tue Dec 15 10:48:07 2020 +0100 Merge tag 'irqchip-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/core Pull irqchip updates for 5.11 from Marc Zyngier: - Preliminary support for managed interrupts on platform devices - Correctly identify allocation of MSIs proxyied by another device - Remove the fasteoi IPI flow which has been proved useless - Generalise the Ocelot support to new SoCs - Improve GICv4.1 vcpu entry, matching the corresponding KVM optimisation - Work around spurious interrupts on Qualcomm PDC - Random fixes and cleanups Link: https://lore.kernel.org/r/20201212135626.1479884-1-maz@kernel.org commit 5fbd41d3bf123af6a135bdea564087ec0f563eb0 Merge: 1d36dffa5d887 05faf1559de52 Author: Daniel Vetter Date: Tue Dec 15 10:21:47 2020 +0100 Merge tag 'drm-misc-next-2020-11-27-1' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for 5.11: UAPI Changes: Cross-subsystem Changes: * char/agp: Disable frontend without CONFIG_DRM_LEGACY * mm: Fix fput in mmap error path; Introduce vma_set_file() to change vma->vm_file Core Changes: * dma-buf: Use sgtables in system heap; Move heap helpers to CMA-heap code; Skip sync for unmapped buffers; Alloc higher order pages is available; Respect num_fences when initializing shared fence list * doc: Improvements around DRM modes and SCALING_FILTER * Pass full state to connector atomic functions + callee updates * Cleanups * shmem: Map pages with caching by default; Cleanups * ttm: Fix DMA32 for global page pool * fbdev: Cleanups * fb-helper: Update framebuffer after userspace writes; Unmap console buffer during shutdown; Rework damage handling of shadow framebuffer Driver Changes: * amdgpu: Multi-hop fixes, Clenaups * imx: Fix rotation for Vivante tiled formats; Support nearest-neighour skaling; Cleanups * mcde: Fix RGB formats; Support DPI output; Cleanups * meson: HDMI clock fixes * panel: Add driver and bindings for Innolux N125HCE-GN1 * panel/s6e63m0: More backlight levels; Fix init; Cleanups * via: Clenunps * virtio: Use fence ID for handling fences; Cleanups Signed-off-by: Daniel Vetter From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20201127083055.GA29139@linux-uq9g commit 39b1e779b6e2d4ca7967b49b26f1e4358f20c90c Author: Anders Roxell Date: Thu Nov 26 14:06:00 2020 +0100 parisc: pci-dma: fix warning unused-function When building tinyconfig on parisc the following warnign shows up: /tmp/arch/parisc/kernel/pci-dma.c:338:12: warning: 'proc_pcxl_dma_show' defined but not used [-Wunused-function] static int proc_pcxl_dma_show(struct seq_file *m, void *v) ^~~~~~~~~~~~~~~~~~ Mark the function as __maybe_unused to fix the warning. Signed-off-by: Anders Roxell Signed-off-by: Helge Deller commit efd5a1584537698220578227e6467638307c2a0b Author: Colin Ian King Date: Tue Dec 15 00:00:33 2020 +0000 net: hns3: fix expression that is currently always true The || condition in hdev->fd_active_type != HCLGE_FD_ARFS_ACTIVE || hdev->fd_active_type != HCLGE_FD_RULE_NONE will always be true because hdev->fd_active_type cannot be equal to two different values at the same time. The expression is always true which is not correct. Fix this by replacing || with && to correct the logic in the expression. Addresses-Coverity: ("Constant expression result") Fixes: 0205ec041ec6 ("net: hns3: add support for hw tc offload of tc flower") Signed-off-by: Colin Ian King Reviewed-by: Huazhong Tan Link: https://lore.kernel.org/r/20201215000033.85383-1-colin.king@canonical.com Signed-off-by: Jakub Kicinski commit a268e0f2455c32653140775662b40c2b1f1b2efa Author: Yonatan Linik Date: Mon Dec 14 22:25:50 2020 +0200 net: fix proc_fs init handling in af_packet and tls proc_fs was used, in af_packet, without a surrounding #ifdef, although there is no hard dependency on proc_fs. That caused the initialization of the af_packet module to fail when CONFIG_PROC_FS=n. Specifically, proc_create_net() was used in af_packet.c, and when it fails, packet_net_init() returns -ENOMEM. It will always fail when the kernel is compiled without proc_fs, because, proc_create_net() for example always returns NULL. The calling order that starts in af_packet.c is as follows: packet_init() register_pernet_subsys() register_pernet_operations() __register_pernet_operations() ops_init() ops->init() (packet_net_ops.init=packet_net_init()) proc_create_net() It worked in the past because register_pernet_subsys()'s return value wasn't checked before this Commit 36096f2f4fa0 ("packet: Fix error path in packet_init."). It always returned an error, but was not checked before, so everything was working even when CONFIG_PROC_FS=n. The fix here is simply to add the necessary #ifdef. This also fixes a similar error in tls_proc.c, that was found by Jakub Kicinski. Fixes: d26b698dd3cd ("net/tls: add skeleton of MIB statistics") Fixes: 36096f2f4fa0 ("packet: Fix error path in packet_init") Signed-off-by: Yonatan Linik Signed-off-by: Jakub Kicinski commit 102f19d611acbd5f90608e797faba8928b6955d7 Author: Zheng Yongjun Date: Mon Dec 14 21:43:14 2020 +0800 nfc: pn533: convert comma to semicolon Replace a comma between expression statements by a semicolon. Signed-off-by: Zheng Yongjun Link: https://lore.kernel.org/r/20201214134314.4618-1-zhengyongjun3@huawei.com Signed-off-by: Jakub Kicinski commit 28f53159e1219265b4f41728782087b9f922a9c0 Merge: ae0b04b238e28 7f816984f439d Author: Jakub Kicinski Date: Mon Dec 14 19:33:51 2020 -0800 Merge branch 'vsock-add-flags-field-in-the-vsock-address' Andra Paraschiv says: ==================== vsock: Add flags field in the vsock address vsock enables communication between virtual machines and the host they are running on. Nested VMs can be setup to use vsock channels, as the multi transport support has been available in the mainline since the v5.5 Linux kernel has been released. Implicitly, if no host->guest vsock transport is loaded, all the vsock packets are forwarded to the host. This behavior can be used to setup communication channels between sibling VMs that are running on the same host. One example can be the vsock channels that can be established within AWS Nitro Enclaves (see Documentation/virt/ne_overview.rst). To be able to explicitly mark a connection as being used for a certain use case, add a flags field in the vsock address data structure. The value of the flags field is taken into consideration when the vsock transport is assigned. This way can distinguish between different use cases, such as nested VMs / local communication and sibling VMs. The flags field can be set in the user space application connect logic. On the listen path, the field can be set in the kernel space logic. ==================== Link: https://lore.kernel.org/r/20201214161122.37717-1-andraprs@amazon.com Signed-off-by: Jakub Kicinski commit 7f816984f439dfe24da25032254cb10512900346 Author: Andra Paraschiv Date: Mon Dec 14 18:11:22 2020 +0200 af_vsock: Assign the vsock transport considering the vsock address flags The vsock flags field can be set in the connect path (user space app) and the (listen) receive path (kernel space logic). When the vsock transport is assigned, the remote CID is used to distinguish between types of connection. Use the vsock flags value (in addition to the CID) from the remote address to decide which vsock transport to assign. For the sibling VMs use case, all the vsock packets need to be forwarded to the host, so always assign the guest->host transport if the VMADDR_FLAG_TO_HOST flag is set. For the other use cases, the vsock transport assignment logic is not changed. Changelog v3 -> v4 * Update the "remote_flags" local variable type to reflect the change of the "svm_flags" field to be 1 byte in size. v2 -> v3 * Update bitwise check logic to not compare result to the flag value. v1 -> v2 * Use bitwise operator to check the vsock flag. * Use the updated "VMADDR_FLAG_TO_HOST" flag naming. * Merge the checks for the g2h transport assignment in one "if" block. Signed-off-by: Andra Paraschiv Reviewed-by: Stefano Garzarella Signed-off-by: Jakub Kicinski commit 1b5f2ab98e7f99f1a83960b17c5596012a7c5e88 Author: Andra Paraschiv Date: Mon Dec 14 18:11:21 2020 +0200 af_vsock: Set VMADDR_FLAG_TO_HOST flag on the receive path The vsock flags can be set during the connect() setup logic, when initializing the vsock address data structure variable. Then the vsock transport is assigned, also considering this flags field. The vsock transport is also assigned on the (listen) receive path. The flags field needs to be set considering the use case. Set the value of the vsock flags of the remote address to the one targeted for packets forwarding to the host, if the following conditions are met: * The source CID of the packet is higher than VMADDR_CID_HOST. * The destination CID of the packet is higher than VMADDR_CID_HOST. Changelog v3 -> v4 * No changes. v2 -> v3 * No changes. v1 -> v2 * Set the vsock flag on the receive path in the vsock transport assignment logic. * Use bitwise operator for the vsock flag setup. * Use the updated "VMADDR_FLAG_TO_HOST" flag naming. Signed-off-by: Andra Paraschiv Reviewed-by: Stefano Garzarella Signed-off-by: Jakub Kicinski commit cada7ccd9dc75fc73de9342ae1dd0374e8fb1056 Author: Andra Paraschiv Date: Mon Dec 14 18:11:20 2020 +0200 vsock_addr: Check for supported flag values Check if the provided flags value from the vsock address data structure includes the supported flags in the corresponding kernel version. The first byte of the "svm_zero" field is used as "svm_flags", so add the flags check instead. Changelog v3 -> v4 * New patch in v4. Signed-off-by: Andra Paraschiv Reviewed-by: Stefano Garzarella Signed-off-by: Jakub Kicinski commit caaf95e0f23f9ed240b02251aab0f6fdb652b33d Author: Andra Paraschiv Date: Mon Dec 14 18:11:19 2020 +0200 vm_sockets: Add VMADDR_FLAG_TO_HOST vsock flag Add VMADDR_FLAG_TO_HOST vsock flag that is used to setup a vsock connection where all the packets are forwarded to the host. Then, using this type of vsock channel, vsock communication between sibling VMs can be built on top of it. Changelog v3 -> v4 * Update the "VMADDR_FLAG_TO_HOST" value, as the size of the field has been updated to 1 byte. v2 -> v3 * Update comments to mention when the flag is set in the connect and listen paths. v1 -> v2 * New patch in v2, it was split from the first patch in the series. * Remove the default value for the vsock flags field. * Update the naming for the vsock flag to "VMADDR_FLAG_TO_HOST". Signed-off-by: Andra Paraschiv Reviewed-by: Stefano Garzarella Signed-off-by: Jakub Kicinski commit dc8eeef73b63ed8988224ba6b5ed19a615163a7f Author: Andra Paraschiv Date: Mon Dec 14 18:11:18 2020 +0200 vm_sockets: Add flags field in the vsock address data structure vsock enables communication between virtual machines and the host they are running on. With the multi transport support (guest->host and host->guest), nested VMs can also use vsock channels for communication. In addition to this, by default, all the vsock packets are forwarded to the host, if no host->guest transport is loaded. This behavior can be implicitly used for enabling vsock communication between sibling VMs. Add a flags field in the vsock address data structure that can be used to explicitly mark the vsock connection as being targeted for a certain type of communication. This way, can distinguish between different use cases such as nested VMs and sibling VMs. This field can be set when initializing the vsock address variable used for the connect() call. Changelog v3 -> v4 * Update the size of "svm_flags" field to be 1 byte instead of 2 bytes. v2 -> v3 * Add "svm_flags" as a new field, not reusing "svm_reserved1". v1 -> v2 * Update the field name to "svm_flags". * Split the current patch in 2 patches. Signed-off-by: Andra Paraschiv Reviewed-by: Stefano Garzarella Signed-off-by: Jakub Kicinski commit ae0b04b238e283cafd906cdc3489cf5dc9a825cf Author: Tariq Toukan Date: Sun Dec 13 16:39:29 2020 +0200 net: Disable NETIF_F_HW_TLS_TX when HW_CSUM is disabled With NETIF_F_HW_TLS_TX packets are encrypted in HW. This cannot be logically done when HW_CSUM offload is off. Fixes: 2342a8512a1e ("net: Add TLS TX offload features") Signed-off-by: Tariq Toukan Reviewed-by: Boris Pismenny Link: https://lore.kernel.org/r/20201213143929.26253-1-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit c31b70c9968fe9c4194d1b5d06d07596a3b680de Author: Alexander Duyck Date: Sat Dec 12 12:31:24 2020 -0800 tcp: Add logic to check for SYN w/ data in tcp_simple_retransmit There are cases where a fastopen SYN may trigger either a ICMP_TOOBIG message in the case of IPv6 or a fragmentation request in the case of IPv4. This results in the socket stalling for a second or more as it does not respond to the message by retransmitting the SYN frame. Normally a SYN frame should not be able to trigger a ICMP_TOOBIG or ICMP_FRAG_NEEDED however in the case of fastopen we can have a frame that makes use of the entire MSS. In the case of fastopen it does, and an additional complication is that the retransmit queue doesn't contain the original frames. As a result when tcp_simple_retransmit is called and walks the list of frames in the queue it may not mark the frames as lost because both the SYN and the data packet each individually are smaller than the MSS size after the adjustment. This results in the socket being stalled until the retransmit timer kicks in and forces the SYN frame out again without the data attached. In order to resolve this we can reduce the MSS the packets are compared to in tcp_simple_retransmit to -1 for cases where we are still in the TCP_SYN_SENT state for a fastopen socket. Doing this we will mark all of the packets related to the fastopen SYN as lost. Signed-off-by: Alexander Duyck Signed-off-by: Eric Dumazet Signed-off-by: Yuchung Cheng Link: https://lore.kernel.org/r/160780498125.3272.15437756269539236825.stgit@localhost.localdomain Signed-off-by: Jakub Kicinski commit ca0b272b48f3adc112112a481f9f117f8308abf1 Author: Vladimir Oltean Date: Sat Dec 12 21:16:12 2020 +0200 net: mscc: ocelot: install MAC addresses in .ndo_set_rx_mode from process context Currently ocelot_set_rx_mode calls ocelot_mact_learn directly, which has a very nice ocelot_mact_wait_for_completion at the end. Introduced in commit 639c1b2625af ("net: mscc: ocelot: Register poll timeout should be wall time not attempts"), this function uses readx_poll_timeout which triggers a lot of lockdep warnings and is also dangerous to use from atomic context, potentially leading to lockups and panics. Steen Hegelund added a poll timeout of 100 ms for checking the MAC table, a duration which is clearly absurd to poll in atomic context. So we need to defer the MAC table access to process context, which we do via a dynamically allocated workqueue which contains all there is to know about the MAC table operation it has to do. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20201212191612.222019-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit a4485baefa1efa596702ebffd5a9c760d42b14b5 Author: Bongsu Jeon Date: Sun Dec 13 18:58:50 2020 +0900 nfc: s3fwrn5: Release the nfc firmware add the code to release the nfc firmware when the firmware image size is wrong. Fixes: c04c674fadeb ("nfc: s3fwrn5: Add driver for Samsung S3FWRN5 NFC Chip") Signed-off-by: Bongsu Jeon Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201213095850.28169-1-bongsu.jeon@samsung.com Signed-off-by: Jakub Kicinski commit 8163962aadde4ab23ec794f30bf4972325bd6439 Author: Jakub Kicinski Date: Sat Dec 12 15:44:26 2020 -0800 net: vxget: clean up sparse warnings This code is copying strings in 64 bit quantities, the device returns them in big endian. As long as we store in big endian IOW endian on both sides matches, we're good, so swap to_be64, not from be64. This fixes ~60 sparse warnings. Link: https://lore.kernel.org/r/20201212234426.177015-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit b024875607407ad7aad939e37a3c11b6d37ca5af Merge: 75c2a8fe8e39a c6b734892420f Author: Jakub Kicinski Date: Mon Dec 14 19:12:23 2020 -0800 Merge tag 'linux-can-next-for-5.11-20201214' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== pull-request: can-next 2020-12-14 All 7 patches are by me and target the m_can driver. First there are 4 cleanup patches (fix link to doc, fix coding style, uniform variable name usage, mark function as static). Then the driver is converted to pm_runtime_resume_and_get(). The next patch lets the m_can class driver allocate the driver's private data, to get rid of one level of indirection. And the last patch consistently uses struct m_can_classdev as drvdata over all binding drivers. * tag 'linux-can-next-for-5.11-20201214' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next: can: m_can: use struct m_can_classdev as drvdata can: m_can: let m_can_class_allocate_dev() allocate driver specific private data can: m_can: m_can_clk_start(): make use of pm_runtime_resume_and_get() can: m_can: m_can_config_endisable(): mark as static can: m_can: use cdev as name for struct m_can_classdev uniformly can: m_can: convert indention to kernel coding style can: m_can: update link to M_CAN user manual ==================== Link: https://lore.kernel.org/r/20201214133145.442472-1-mkl@pengutronix.de Signed-off-by: Jakub Kicinski commit 75c2a8fe8e39a06b8c7979140d89dd316f10df39 Merge: 22f07b86d4e58 88a31b18b6dfc Author: Jakub Kicinski Date: Mon Dec 14 19:09:57 2020 -0800 Merge branch 'mlxsw-introduce-initial-xm-router-support' Ido Schimmel says: ==================== mlxsw: Introduce initial XM router support This patch set implements initial eXtended Mezzanine (XM) router support. The XM is an external device connected to the Spectrum-{2,3} ASICs using dedicated Ethernet ports. Its purpose is to increase the number of routes that can be offloaded to hardware. This is achieved by having the ASIC act as a cache that refers cache misses to the XM where the FIB is stored and LPM lookup is performed. Future patch sets will add more sophisticated cache flushing and selftests that utilize cache counters on the ASIC, which we plan to expose via devlink-metric [1]. Patch set overview: Patches #1-#2 add registers to insert/remove routes to/from the XM and to enable/disable it. Patch #3 utilizes these registers in order to implement XM-specific router low-level operations. Patches #4-#5 query from firmware the availability of the XM and the local ports that are used to connect the ASIC to the XM, so that netdevs will not be created for them. Patches #6-#8 initialize the XM by configuring its cache parameters. Patch #9-#10 implement cache management, so that LPM lookup will be correctly cached in the ASIC. Patches #11-#13 implement cache flushing, so that routes insertions/removals to/from the XM will flush the affected entries in the cache. Patch #14 configures the ASIC to allocate half of its memory for the cache, so that room will be left for other entries (e.g., FDBs, neighbours). Patch #15 starts using the XM for IPv4 route offload, when available. [1] https://lore.kernel.org/netdev/20200817125059.193242-1-idosch@idosch.org/ ==================== Link: https://lore.kernel.org/r/20201214113041.2789043-1-idosch@idosch.org Signed-off-by: Jakub Kicinski commit 88a31b18b6dfce62f5afc9c146b28a474e54ca6c Author: Jiri Pirko Date: Mon Dec 14 13:30:41 2020 +0200 mlxsw: spectrum_router: Use eXtended mezzanine to offload IPv4 router In case the eXtended mezzanine is present on the system, use it for IPv4 router offload. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit dffd566136d7e632829a4bb99182c979561e8ed8 Author: Jiri Pirko Date: Mon Dec 14 13:30:40 2020 +0200 mlxsw: spectrum: Set KVH XLT cache mode for Spectrum2/3 Set a profile option to instruct FW to use 1/2 of KVH for XLT cache, not the whole one. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit 2dfad87a24de41a2d4b3d02e373cf101fa932296 Author: Jiri Pirko Date: Mon Dec 14 13:30:39 2020 +0200 mlxsw: spectrum_router_xm: Introduce basic XM cache flushing Upon route insertion and removal, it is needed to flush possibly cached entries from the XM cache. Extend XM op context to carry information needed for the flush. Implement the flush in delayed work since for HW design reasons there is a need to wait 50usec before the flush can be done. If during this time comes the same flush request, consolidate it to the first one. Implement this queued flushes by a hashtable. v2: * Fix GENMASK() high bit Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit 069254662b657bd602fc9fe97efa4ebc3151df46 Author: Jiri Pirko Date: Mon Dec 14 13:30:38 2020 +0200 mlxsw: reg: Add Router LPM Cache Enable Register The RLPMCE allows disabling the LPM cache. Can be changed on the fly. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit edb47f3d2368fc32869784e2a3f4040f3431134d Author: Jiri Pirko Date: Mon Dec 14 13:30:37 2020 +0200 mlxsw: reg: Add Router LPM Cache ML Delete Register The RLCMLD register is used to bulk delete the XLT-LPM cache ML entries. This can be used by SW when L is increased or decreased, thus need to remove entries with old ML values. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit 54ff9dbbb96f7e7c6419d2407179f1f2423dc258 Author: Jiri Pirko Date: Mon Dec 14 13:30:36 2020 +0200 mlxsw: spectrum_router_xm: Implement L-value tracking for M-index There is a table that assigns L-value per M-index. The L is always the biggest from the currently inserted prefixes. Setup a hashtable to track the M-index information and the prefixes that are related to it. Ensure the L-value is always correctly set. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit e35e8046489688d8418c75a012af1d37611f915f Author: Jiri Pirko Date: Mon Dec 14 13:30:35 2020 +0200 mlxsw: reg: Add XM Router M Table Register The XRMT configures the M-Table for the XLT-LPM. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit e0bc244dcf583e2de3ca9eef14410d43dca82350 Author: Jiri Pirko Date: Mon Dec 14 13:30:34 2020 +0200 mlxsw: spectrum_router: Introduce per-ASIC XM initialization During the router init flow, call into XM code and initialize couple of items needed for XM functionality: 1) Query the capabilities and sizes. Check the XM device id. 2) Initialize the M-value. Note that currently the M-value is set fixed to 16 for IPv4. In future this may change to better cover the actual inserted routes. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit ec54677e55bbdad8a5f485b9e3d3d92f7611ed84 Author: Jiri Pirko Date: Mon Dec 14 13:30:33 2020 +0200 mlxsw: reg: Add XM Lookup Table Query Register The XLTQ is used to query HW for XM-related info. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit 087489dc2748064b05d1739c9c4f5fcf6d79938a Author: Jiri Pirko Date: Mon Dec 14 13:30:32 2020 +0200 mlxsw: reg: Add Router XLT M select Register The RXLTM configures and selects the M for the XM lookups. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit 50779c332556c96a01bd37b168bc56b6a174b758 Author: Jiri Pirko Date: Mon Dec 14 13:30:31 2020 +0200 mlxsw: Ignore ports that are connected to eXtended mezanine Use the info stored in the bus_info struct about the eXtended mezanine connected ports and don't expose them. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit 2ea3f4c7fa7cbf5e693ebefe50a68f8de83126eb Author: Jiri Pirko Date: Mon Dec 14 13:30:30 2020 +0200 mlxsw: pci: Obtain info about ports used by eXtended mezanine The output of boardinfo command was extended to contain information about XM. Indicates if is present and in case it is, tells which localports are used for the connection. So parse this info and store it in bus_info passed up to the driver. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit ff462103ca4dc196eb6af709ead0903708ce286f Author: Jiri Pirko Date: Mon Dec 14 13:30:29 2020 +0200 mlxsw: spectrum_router: Introduce XM implementation of router low-level ops In order to offload entries to XM, implement a set of low-level functions to work with LPM trees in XM and also to pack and write FIB entries into XM. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit 6100fbf13d2fea6b1de263551ecd3f097a07c63d Author: Jiri Pirko Date: Mon Dec 14 13:30:28 2020 +0200 mlxsw: reg: Add Router XLT Enable Register The RXLTE enables XLT (eXtended Lookup Table) LPM lookups if a capable XM is present on the system. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit be6ba3b61e20805b440f915f0751deaa55ed78cf Author: Jiri Pirko Date: Mon Dec 14 13:30:27 2020 +0200 mlxsw: reg: Add XM Direct Register The XMDR allows direct access to the XM device via the switch. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit 148842c98a24e508aecb929718818fbf4c2a6ff3 Merge: eb0ea74120e0f 058df195c2340 Author: Linus Torvalds Date: Mon Dec 14 18:59:53 2020 -0800 Merge tag 'x86-apic-2020-12-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 apic updates from Thomas Gleixner: "Yet another large set of x86 interrupt management updates: - Simplification and distangling of the MSI related functionality - Let IO/APIC construct the RTE entries from an MSI message instead of having IO/APIC specific code in the interrupt remapping drivers - Make the retrieval of the parent interrupt domain (vector or remap unit) less hardcoded and use the relevant irqdomain callbacks for selection. - Allow the handling of more than 255 CPUs without a virtualized IOMMU when the hypervisor supports it. This has made been possible by the above modifications and also simplifies the existing workaround in the HyperV specific virtual IOMMU. - Cleanup of the historical timer_works() irq flags related inconsistencies" * tag 'x86-apic-2020-12-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (42 commits) x86/ioapic: Cleanup the timer_works() irqflags mess iommu/hyper-v: Remove I/O-APIC ID check from hyperv_irq_remapping_select() iommu/amd: Fix IOMMU interrupt generation in X2APIC mode iommu/amd: Don't register interrupt remapping irqdomain when IR is disabled iommu/amd: Fix union of bitfields in intcapxt support x86/ioapic: Correct the PCI/ISA trigger type selection x86/ioapic: Use I/O-APIC ID for finding irqdomain, not index x86/hyperv: Enable 15-bit APIC ID if the hypervisor supports it x86/kvm: Enable 15-bit extension when KVM_FEATURE_MSI_EXT_DEST_ID detected iommu/hyper-v: Disable IRQ pseudo-remapping if 15 bit APIC IDs are available x86/apic: Support 15 bits of APIC ID in MSI where available x86/ioapic: Handle Extended Destination ID field in RTE iommu/vt-d: Simplify intel_irq_remapping_select() x86: Kill all traces of irq_remapping_get_irq_domain() x86/ioapic: Use irq_find_matching_fwspec() to find remapping irqdomain x86/hpet: Use irq_find_matching_fwspec() to find remapping irqdomain iommu/hyper-v: Implement select() method on remapping irqdomain iommu/vt-d: Implement select() method on remapping irqdomain iommu/amd: Implement select() method on remapping irqdomain x86/apic: Add select() method on vector irqdomain ... commit 22f07b86d4e580424cbeb0ce232ed30d4b5ecb95 Merge: 2aa899ebd5c3a a86b313e18178 Author: Jakub Kicinski Date: Mon Dec 14 18:52:44 2020 -0800 Merge branch 'bnxt_en-improve-firmware-flashing' Michael Chan says: ==================== bnxt_en: Improve firmware flashing. This patchset improves firmware flashing in 2 ways: - If firmware returns NO_SPACE error during flashing, the driver will create the UPDATE directory with more staging area and retry. - Instead of allocating a big DMA buffer for the entire contents of the firmware package size, fallback to a smaller buffer to DMA the contents in multiple DMA operations. ==================== Link: https://lore.kernel.org/r/1607860306-17244-1-git-send-email-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit a86b313e18178b39fcca4850d4dfeb5af1e3dc7e Author: Michael Chan Date: Sun Dec 13 06:51:46 2020 -0500 bnxt_en: Enable batch mode when using HWRM_NVM_MODIFY to flash packages. The current scheme allocates a DMA buffer as big as the requested firmware package file and DMAs the contents to firmware in one operation. The buffer size can be several hundred kilo bytes and the driver may not be able to allocate the memory. This will cause firmware upgrade to fail. Improve the scheme by using smaller DMA blocks and calling firmware to DMA each block in a batch mode. Older firmware can cause excessive NVRAM erases if the block size is too small so we try to allocate a 256K buffer to begin with and size it down successively if we cannot allocate the memory. Reviewed-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski commit 1432c3f6a6ca091db10b60c7b9078f34f4c5268d Author: Pavan Chebbi Date: Sun Dec 13 06:51:45 2020 -0500 bnxt_en: Retry installing FW package under NO_SPACE error condition. In bnxt_flash_package_from_fw_obj(), if firmware returns the NO_SPACE error, call __bnxt_flash_nvram() to create the UPDATE directory and then loop back and retry one more time. Since the first try may fail, we use the silent version to send the firmware commands. Reviewed-by: Vasundhara Volam Reviewed-by: Edwin Peer Signed-off-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski commit 2e5fb428a61ce58f9db6ceccdeb6dc292248f1dc Author: Pavan Chebbi Date: Sun Dec 13 06:51:44 2020 -0500 bnxt_en: Restructure bnxt_flash_package_from_fw_obj() to execute in a loop. On NICs with a smaller NVRAM, FW installation may fail after multiple updates due to fragmentation. The driver can retry when FW returns a special error code. To faciliate the retry, we restructure the logic that performs the flashing in a loop. The actual retry logic will be added in the next patch. Signed-off-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski commit a9094ba6072bfabe93f93b641a3858d9c91c2c86 Author: Michael Chan Date: Sun Dec 13 06:51:43 2020 -0500 bnxt_en: Rearrange the logic in bnxt_flash_package_from_fw_obj(). This function will be modified in the next patch to retry flashing the firmware in a loop. To facilate that, we rearrange the code so that the steps that only need to be done once before the loop will be moved to the top of the function. Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski commit 93ff343528ce034ef35e71d3b1d506df3cf85282 Author: Pavan Chebbi Date: Sun Dec 13 06:51:42 2020 -0500 bnxt_en: Refactor bnxt_flash_nvram. Refactor bnxt_flash_nvram() into __bnxt_flash_nvram() that takes an additional dir_item_len parameter. The new function will be used in subsequent patches with the dir_item_len parameter set to create the UPDATE directory during flashing. Signed-off-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski commit eb0ea74120e0f14a6d6454109153d1b4ccf210fc Merge: edd7ab7684744 cba08c5dc6dc1 Author: Linus Torvalds Date: Mon Dec 14 18:47:38 2020 -0800 Merge tag 'x86-fpu-2020-12-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 FPU updates from Thomas Gleixner: - Simplify the FPU protection for !RT kernels - Add the RT variant of FPU protections * tag 'x86-fpu-2020-12-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/fpu: Make kernel FPU protection RT friendly x86/fpu: Simplify fpregs_[un]lock() commit 2aa899ebd5c3aef707460f58951cc8a1d1f466c1 Author: Marcin Wojtas Date: Fri Dec 11 17:51:14 2020 +0100 MAINTAINERS: add mvpp2 driver entry Since its creation Marvell NIC driver for Armada 375/7k8k and CN913x SoC families mvpp2 has been lacking an entry in MAINTAINERS, which sometimes lead to unhandled bugs that persisted across several kernel releases. Signed-off-by: Marcin Wojtas Acked-by: Andrew Lunn Link: https://lore.kernel.org/r/20201211165114.26290-1-mw@semihalf.com Signed-off-by: Jakub Kicinski commit 54970a2fbb673f090b7f02d7f57b10b2e0707155 Author: Vasily Averin Date: Mon Dec 14 22:07:39 2020 +0300 net: drop bogus skb with CHECKSUM_PARTIAL and offset beyond end of trimmed packet syzbot reproduces BUG_ON in skb_checksum_help(): tun creates (bogus) skb with huge partial-checksummed area and small ip packet inside. Then ip_rcv trims the skb based on size of internal ip packet, after that csum offset points beyond of trimmed skb. Then checksum_tg() called via netfilter hook triggers BUG_ON: offset = skb_checksum_start_offset(skb); BUG_ON(offset >= skb_headlen(skb)); To work around the problem this patch forces pskb_trim_rcsum_slow() to return -EINVAL in described scenario. It allows its callers to drop such kind of packets. Link: https://syzkaller.appspot.com/bug?id=b419a5ca95062664fe1a60b764621eb4526e2cd0 Reported-by: syzbot+7010af67ced6105e5ab6@syzkaller.appspotmail.com Signed-off-by: Vasily Averin Acked-by: Willem de Bruijn Link: https://lore.kernel.org/r/1b2494af-2c56-8ee2-7bc0-923fcad1cdf8@virtuozzo.com Signed-off-by: Jakub Kicinski commit 0780b4145634c3e8d69905dc5d2695d1207130df Author: Toke Høiland-Jørgensen Date: Fri Dec 11 15:26:38 2020 +0100 inet_ecn: Use csum16_add() helper for IP_ECN_set_* helpers Jakub pointed out that the IP_ECN_set* helpers basically open-code csum16_add(), so let's switch them over to using the helper instead. v2: - Use __be16 for check_add stack variable in IP_ECN_set_ce() (kbot) v3: - Turns out we need __force casts to do arithmetic on __be16 types Reported-by: Jakub Kicinski Tested-by: Jonathan Morton Tested-by: Pete Heist Signed-off-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20201211142638.154780-1-toke@redhat.com Signed-off-by: Jakub Kicinski commit edd7ab76847442e299af64a761febd180d71f98d Merge: adb35e8dc98ba 68061c02bb295 Author: Linus Torvalds Date: Mon Dec 14 18:35:53 2020 -0800 Merge tag 'core-mm-2020-12-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull kmap updates from Thomas Gleixner: "The new preemtible kmap_local() implementation: - Consolidate all kmap_atomic() internals into a generic implementation which builds the base for the kmap_local() API and make the kmap_atomic() interface wrappers which handle the disabling/enabling of preemption and pagefaults. - Switch the storage from per-CPU to per task and provide scheduler support for clearing mapping when scheduling out and restoring them when scheduling back in. - Merge the migrate_disable/enable() code, which is also part of the scheduler pull request. This was required to make the kmap_local() interface available which does not disable preemption when a mapping is established. It has to disable migration instead to guarantee that the virtual address of the mapped slot is the same across preemption. - Provide better debug facilities: guard pages and enforced utilization of the mapping mechanics on 64bit systems when the architecture allows it. - Provide the new kmap_local() API which can now be used to cleanup the kmap_atomic() usage sites all over the place. Most of the usage sites do not require the implicit disabling of preemption and pagefaults so the penalty on 64bit and 32bit non-highmem systems is removed and quite some of the code can be simplified. A wholesale conversion is not possible because some usage depends on the implicit side effects and some need to be cleaned up because they work around these side effects. The migrate disable side effect is only effective on highmem systems and when enforced debugging is enabled. On 64bit and 32bit non-highmem systems the overhead is completely avoided" * tag 'core-mm-2020-12-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (33 commits) ARM: highmem: Fix cache_is_vivt() reference x86/crashdump/32: Simplify copy_oldmem_page() io-mapping: Provide iomap_local variant mm/highmem: Provide kmap_local* sched: highmem: Store local kmaps in task struct x86: Support kmap_local() forced debugging mm/highmem: Provide CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP mm/highmem: Provide and use CONFIG_DEBUG_KMAP_LOCAL microblaze/mm/highmem: Add dropped #ifdef back xtensa/mm/highmem: Make generic kmap_atomic() work correctly mm/highmem: Take kmap_high_get() properly into account highmem: High implementation details and document API Documentation/io-mapping: Remove outdated blurb io-mapping: Cleanup atomic iomap mm/highmem: Remove the old kmap_atomic cruft highmem: Get rid of kmap_types.h xtensa/mm/highmem: Switch to generic kmap atomic sparc/mm/highmem: Switch to generic kmap atomic powerpc/mm/highmem: Switch to generic kmap atomic nds32/mm/highmem: Switch to generic kmap atomic ... commit adb35e8dc98ba9bda99ff79ac6a05b8fcde2a762 Merge: 533369b145d8d 5b78f2dc31535 Author: Linus Torvalds Date: Mon Dec 14 18:29:11 2020 -0800 Merge tag 'sched-core-2020-12-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler updates from Thomas Gleixner: - migrate_disable/enable() support which originates from the RT tree and is now a prerequisite for the new preemptible kmap_local() API which aims to replace kmap_atomic(). - A fair amount of topology and NUMA related improvements - Improvements for the frequency invariant calculations - Enhanced robustness for the global CPU priority tracking and decision making - The usual small fixes and enhancements all over the place * tag 'sched-core-2020-12-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (61 commits) sched/fair: Trivial correction of the newidle_balance() comment sched/fair: Clear SMT siblings after determining the core is not idle sched: Fix kernel-doc markup x86: Print ratio freq_max/freq_base used in frequency invariance calculations x86, sched: Use midpoint of max_boost and max_P for frequency invariance on AMD EPYC x86, sched: Calculate frequency invariance for AMD systems irq_work: Optimize irq_work_single() smp: Cleanup smp_call_function*() irq_work: Cleanup sched: Limit the amount of NUMA imbalance that can exist at fork time sched/numa: Allow a floating imbalance between NUMA nodes sched: Avoid unnecessary calculation of load imbalance at clone time sched/numa: Rename nr_running and break out the magic number sched: Make migrate_disable/enable() independent of RT sched/topology: Condition EAS enablement on FIE support arm64: Rebuild sched domains on invariance status changes sched/topology,schedutil: Wrap sched domains rebuild sched/uclamp: Allow to reset a task uclamp constraint value sched/core: Fix typos in comments Documentation: scheduler: fix information on arch SD flags, sched_domain and sched_debug ... commit 989a1db06eb18ff605377eec87e18d795e0ec74b Author: Wang Hai Date: Fri Dec 11 20:29:21 2020 +0800 net: bridge: Fix a warning when del bridge sysfs I got a warining report: br_sysfs_addbr: can't create group bridge4/bridge ------------[ cut here ]------------ sysfs group 'bridge' not found for kobject 'bridge4' WARNING: CPU: 2 PID: 9004 at fs/sysfs/group.c:279 sysfs_remove_group fs/sysfs/group.c:279 [inline] WARNING: CPU: 2 PID: 9004 at fs/sysfs/group.c:279 sysfs_remove_group+0x153/0x1b0 fs/sysfs/group.c:270 Modules linked in: iptable_nat ... Call Trace: br_dev_delete+0x112/0x190 net/bridge/br_if.c:384 br_dev_newlink net/bridge/br_netlink.c:1381 [inline] br_dev_newlink+0xdb/0x100 net/bridge/br_netlink.c:1362 __rtnl_newlink+0xe11/0x13f0 net/core/rtnetlink.c:3441 rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3500 rtnetlink_rcv_msg+0x385/0x980 net/core/rtnetlink.c:5562 netlink_rcv_skb+0x134/0x3d0 net/netlink/af_netlink.c:2494 netlink_unicast_kernel net/netlink/af_netlink.c:1304 [inline] netlink_unicast+0x4a0/0x6a0 net/netlink/af_netlink.c:1330 netlink_sendmsg+0x793/0xc80 net/netlink/af_netlink.c:1919 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0x139/0x170 net/socket.c:671 ____sys_sendmsg+0x658/0x7d0 net/socket.c:2353 ___sys_sendmsg+0xf8/0x170 net/socket.c:2407 __sys_sendmsg+0xd3/0x190 net/socket.c:2440 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 In br_device_event(), if the bridge sysfs fails to be added, br_device_event() should return error. This can prevent warining when removing bridge sysfs that do not exist. Fixes: bb900b27a2f4 ("bridge: allow creating bridge devices with netlink") Reported-by: Hulk Robot Signed-off-by: Wang Hai Tested-by: Nikolay Aleksandrov Acked-by: Nikolay Aleksandrov Link: https://lore.kernel.org/r/20201211122921.40386-1-wanghai38@huawei.com Signed-off-by: Jakub Kicinski commit 533369b145d8d1bc44b8ed7f0dd0ecffb16384cc Merge: 76d4acf22b484 3cabca87b329c Author: Linus Torvalds Date: Mon Dec 14 18:21:14 2020 -0800 Merge tag 'timers-core-2020-12-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timers and timekeeping updates from Thomas Gleixner: "Core: - Robustness improvements for the NOHZ tick management - Fixes and consolidation of the NTP/RTC synchronization code - Small fixes and improvements in various places - A set of function documentation udpates and fixes Drivers: - Cleanups and improvements in various clocksoure/event drivers - Removal of the EZChip NPS clocksource driver as the platfrom support was removed from ARC - The usual set of new device tree binding and json conversions - The RTC driver which have been acked by the RTC maintainer: * fix a long standing bug in the MC146818 library code which can cause reading garbage during the RTC internal update. * changes related to the NTP/RTC consolidation work" * tag 'timers-core-2020-12-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (46 commits) ntp: Fix prototype in the !CONFIG_GENERIC_CMOS_UPDATE case tick/sched: Make jiffies update quick check more robust ntp: Consolidate the RTC update implementation ntp: Make the RTC sync offset less obscure ntp, rtc: Move rtc_set_ntp_time() to ntp code ntp: Make the RTC synchronization more reliable rtc: core: Make the sync offset default more realistic rtc: cmos: Make rtc_cmos sync offset correct rtc: mc146818: Reduce spinlock section in mc146818_set_time() rtc: mc146818: Prevent reading garbage clocksource/drivers/sh_cmt: Fix potential deadlock when calling runtime PM clocksource/drivers/arm_arch_timer: Correct fault programming of CNTKCTL_EL1.EVNTI clocksource/drivers/arm_arch_timer: Use stable count reader in erratum sne clocksource/drivers/dw_apb_timer_of: Add error handling if no clock available clocksource/drivers/riscv: Make RISCV_TIMER depends on RISCV_SBI clocksource/drivers/ingenic: Fix section mismatch clocksource/drivers/cadence_ttc: Fix memory leak in ttc_setup_clockevent() dt-bindings: timer: renesas: tmu: Convert to json-schema dt-bindings: timer: renesas: tmu: Document r8a774e1 bindings clocksource/drivers/orion: Add missing clk_disable_unprepare() on error path ... commit 1791ebd131c46539b024c0f2ebf12b6c88a265b9 Author: Michael Ellerman Date: Mon Dec 14 21:56:16 2020 +1100 powerpc: Inline setup_kup() setup_kup() is used by both 64-bit and 32-bit code. However on 64-bit it must not be __init, because it's used for CPU hotplug, whereas on 32-bit it should be __init because it calls setup_kuap/kuep() which are __init. We worked around that problem in the past by marking it __ref, see commit 67d53f30e23e ("powerpc/mm: fix section mismatch for setup_kup()"). Marking it __ref basically just omits it from section mismatch checking, which can lead to bugs, and in fact it did, see commit 44b4c4450f8d ("powerpc/64s: Mark the kuap/kuep functions non __init") We can avoid all these problems by just making it static inline. Because all it does is call other functions, making it inline actually shrinks the 32-bit vmlinux by ~76 bytes. Make it __always_inline as pointed out by Christophe. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201214123011.311024-1-mpe@ellerman.id.au commit 5bb0c4b5eb61d939fed0b27d11fb91fb85769c9a Author: Björn Töpel Date: Fri Dec 11 09:54:10 2020 +0100 ice, xsk: Move Rx allocation out of while-loop Instead doing the check for allocation in each loop, move it outside the while loop and do it every NAPI loop. This change boosts the xdpsock rxdrop scenario with 15% more packets-per-second. Reviewed-by: Maciej Fijalkowski Signed-off-by: Björn Töpel Link: https://lore.kernel.org/r/20201211085410.59350-1-bjorn.topel@gmail.com Signed-off-by: Jakub Kicinski commit bb7eae6dd230c52d2f8d4666ecc1da3ba0d687ab Author: Zheng Yongjun Date: Fri Dec 11 16:38:01 2020 +0800 net: mtk_eth: simplify the mediatek code return expression Simplify the return expression at mtk_eth_path.c file, simplify this all. Signed-off-by: Zheng Yongjun Link: https://lore.kernel.org/r/20201211083801.1632-1-zhengyongjun3@huawei.com Signed-off-by: Jakub Kicinski commit 8718d60ee64f37e02e23eadb57cac1d94bae1e71 Merge: 0e12c0271887f 80b9414832a11 Author: Jakub Kicinski Date: Mon Dec 14 17:49:30 2020 -0800 Merge branch 'add-devlink-and-devlink-health-reporters-to' George Cherian says: ==================== Add devlink and devlink health reporters to octeontx2 Add basic devlink and devlink health reporters. Devlink health reporters are added for NPA block. Address Jakub's comment to add devlink support for error reporting. https://www.spinics.net/lists/netdev/msg670712.html For now, I have dropped the NIX block health reporters. This series attempts to add health reporters only for the NPA block. As per Jakub's suggestion separate reporters per event is used and also got rid of the counters. ==================== Link: https://lore.kernel.org/r/20201211062526.2302643-1-george.cherian@marvell.com Signed-off-by: Jakub Kicinski commit 80b9414832a11b7a5e4dc2c4bbd6b99061c4d581 Author: George Cherian Date: Fri Dec 11 11:55:26 2020 +0530 docs: octeontx2: Add Documentation for NPA health reporters Add Documentation for devlink health reporters for NPA block. Signed-off-by: George Cherian Signed-off-by: Jakub Kicinski commit f1168d1e207cd1bef5bcb1c25f9958fba09f3388 Author: George Cherian Date: Fri Dec 11 11:55:25 2020 +0530 octeontx2-af: Add devlink health reporters for NPA Add health reporters for RVU NPA block. NPA Health reporters handle following HW event groups - GENERAL events - ERROR events - RAS events - RVU event Output: #devlink health pci/0002:01:00.0: reporter hw_npa_intr state healthy error 0 recover 0 grace_period 0 auto_recover true auto_dump true reporter hw_npa_gen state healthy error 0 recover 0 grace_period 0 auto_recover true auto_dump true reporter hw_npa_err state healthy error 0 recover 0 grace_period 0 auto_recover true auto_dump true reporter hw_npa_ras state healthy error 0 recover 0 grace_period 0 auto_recover true auto_dump true #devlink health dump show pci/0002:01:00.0 reporter hw_npa_err NPA_AF_ERR: NPA Error Interrupt Reg : 4096 AQ Doorbell Error #devlink health dump show pci/0002:01:00.0 reporter hw_npa_ras NPA_AF_RVU_RAS: NPA RAS Interrupt Reg : 0 Each reporter dump shows the Register value and the description of the cause. Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: Jerin Jacob Signed-off-by: George Cherian Signed-off-by: Jakub Kicinski commit fae06da4f26183864a981c179a4b1275f2375c9f Author: George Cherian Date: Fri Dec 11 11:55:24 2020 +0530 octeontx2-af: Add devlink suppoort to af driver Add devlink support to AF driver. Basic devlink support is added. Currently info_get is the only supported devlink ops. devlink ouptput looks like this # devlink dev pci/0002:01:00.0 # devlink dev info pci/0002:01:00.0: driver octeontx2-af # Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: Jerin Jacob Signed-off-by: George Cherian Signed-off-by: Jakub Kicinski commit 76d4acf22b4847f6c7b2f9042366fbdc3d20f578 Merge: 8a8ca83ec3cf7 a70a04b3844f5 Author: Linus Torvalds Date: Mon Dec 14 17:41:38 2020 -0800 Merge tag 'perf-kprobes-2020-12-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf/kprobes updates from Thomas Gleixner: "Make kretprobes lockless to avoid the rp->lock performance and potential lock ordering issues" * tag 'perf-kprobes-2020-12-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/atomics: Regenerate the atomics-check SHA1's kprobes: Replace rp->free_instance with freelist freelist: Implement lockless freelist asm-generic/atomic: Add try_cmpxchg() fallbacks kprobes: Remove kretprobe hash llist: Add nonatomic __llist_add() and __llist_dell_all() commit 0e12c0271887f1b00b79b7612c1d4f0d3d34e8a8 Author: Po-Hsu Lin Date: Fri Dec 11 12:24:20 2020 +0800 selftests: test_vxlan_under_vrf: mute unnecessary error message The cleanup function in this script that tries to delete hv-1 / hv-2 vm-1 / vm-2 netns will generate some uncessary error messages: Cannot remove namespace file "/run/netns/hv-2": No such file or directory Cannot remove namespace file "/run/netns/vm-1": No such file or directory Cannot remove namespace file "/run/netns/vm-2": No such file or directory Redirect it to /dev/null like other commands in the cleanup function to reduce confusion. Signed-off-by: Po-Hsu Lin Link: https://lore.kernel.org/r/20201211042420.16411-1-po-hsu.lin@canonical.com Signed-off-by: Jakub Kicinski commit 6d4634d1b09172a9f5863d8c4cec8f82fbecdf15 Author: Cambda Zhu Date: Tue Dec 8 17:19:10 2020 +0800 net: Limit logical shift left of TCP probe0 timeout For each TCP zero window probe, the icsk_backoff is increased by one and its max value is tcp_retries2. If tcp_retries2 is greater than 63, the probe0 timeout shift may exceed its max bits. On x86_64/ARMv8/MIPS, the shift count would be masked to range 0 to 63. And on ARMv7 the result is zero. If the shift count is masked, only several probes will be sent with timeout shorter than TCP_RTO_MAX. But if the timeout is zero, it needs tcp_retries2 times probes to end this false timeout. Besides, bitwise shift greater than or equal to the width is an undefined behavior. This patch adds a limit to the backoff. The max value of max_when is TCP_RTO_MAX and the min value of timeout base is TCP_RTO_MIN. The limit is the backoff from TCP_RTO_MIN to TCP_RTO_MAX. Signed-off-by: Cambda Zhu Link: https://lore.kernel.org/r/20201208091910.37618-1-cambda@linux.alibaba.com Signed-off-by: Jakub Kicinski commit 8a8ca83ec3cf7ffc69020c189e3d368b1d4ba98a Merge: e857b6fcc5af0 c2208046bba68 Author: Linus Torvalds Date: Mon Dec 14 17:34:12 2020 -0800 Merge tag 'perf-core-2020-12-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf updates from Thomas Gleixner: "Core: - Better handling of page table leaves on archictectures which have architectures have non-pagetable aligned huge/large pages. For such architectures a leaf can actually be part of a larger entry. - Prevent a deadlock vs exec_update_mutex Architectures: - The related updates for page size calculation of leaf entries - The usual churn to support new CPUs - Small fixes and improvements all over the place" * tag 'perf-core-2020-12-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (24 commits) perf/x86/intel: Add Tremont Topdown support uprobes/x86: Fix fall-through warnings for Clang perf/x86: Fix fall-through warnings for Clang kprobes/x86: Fix fall-through warnings for Clang perf/x86/intel/lbr: Fix the return type of get_lbr_cycles() perf/x86/intel: Fix rtm_abort_event encoding on Ice Lake x86/kprobes: Restore BTF if the single-stepping is cancelled perf: Break deadlock involving exec_update_mutex sparc64/mm: Implement pXX_leaf_size() support powerpc/8xx: Implement pXX_leaf_size() support arm64/mm: Implement pXX_leaf_size() support perf/core: Fix arch_perf_get_page_size() mm: Introduce pXX_leaf_size() mm/gup: Provide gup_get_pte() more generic perf/x86/intel: Add event constraint for CYCLE_ACTIVITY.STALLS_MEM_ANY perf/x86/intel/uncore: Add Rocket Lake support perf/x86/msr: Add Rocket Lake CPU support perf/x86/cstate: Add Rocket Lake CPU support perf/x86/intel: Add Rocket Lake CPU support perf,mm: Handle non-page-table-aligned hugetlbfs ... commit ebf322822cc93259316480266afeb889dd65522a Merge: efc36d3c344a3 15e6ca974b14c Author: Jakub Kicinski Date: Mon Dec 14 17:30:08 2020 -0800 Merge branch 'mptcp-another-set-of-miscellaneous-mptcp-fixes' Mat Martineau says: ==================== mptcp: Another set of miscellaneous MPTCP fixes This is another collection of MPTCP fixes and enhancements that we have tested in the MPTCP tree: Patch 1 cleans up cgroup attachment for in-kernel subflow sockets. Patches 2 and 3 make sure that deletion of advertised addresses by an MPTCP path manager when flushing all addresses behaves similarly to the remove-single-address operation, and adds related tests. Patches 4 and 8 do some minor cleanup. Patches 5-7 add MPTCP_FASTCLOSE functionality. Note that patch 6 adds MPTCP option parsing to tcp_reset(). Patch 9 optimizes skb size for outgoing MPTCP packets. ==================== Link: https://lore.kernel.org/r/20201210222506.222251-1-mathew.j.martineau@linux.intel.com Signed-off-by: Jakub Kicinski commit 15e6ca974b14c2dc4221738ef81b23ef694c9160 Author: Paolo Abeni Date: Thu Dec 10 14:25:06 2020 -0800 mptcp: let MPTCP create max size skbs Currently the xmit path of the MPTCP protocol creates smaller- than-max-size skbs, which is suboptimal for the performances. There are a few things to improve: - when coalescing to an existing skb, must clear the PUSH flag - tcp_build_frag() expect the available space as an argument. When coalescing is enable MPTCP already subtracted the to-be-coalesced skb len. We must increment said argument accordingly. Before: ./use_mptcp.sh netperf -H 127.0.0.1 -t TCP_STREAM [...] 131072 16384 16384 30.00 24414.86 After: ./use_mptcp.sh netperf -H 127.0.0.1 -t TCP_STREAM [...] 131072 16384 16384 30.05 28357.69 Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit 1bc7327b5fea60328bf72cd702eca1defa2a5655 Author: Paolo Abeni Date: Thu Dec 10 14:25:05 2020 -0800 mptcp: pm: simplify select_local_address() There is no need to unconditionally acquire the join list lock, we can simply splice the join list into the subflow list and traverse only the latter. Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit 50c504a20a754ca37b5e1f4e660cd687769a7dca Author: Florian Westphal Date: Thu Dec 10 14:25:04 2020 -0800 mptcp: parse and act on incoming FASTCLOSE option parse the MPTCP FASTCLOSE subtype. If provided key matches the local one, schedule the work queue to close (with tcp reset) all subflows. The MPTCP socket moves to closed state immediately. Reviewed-by: Matthieu Baerts Signed-off-by: Florian Westphal Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit 049fe386d35353398eee40ba8d76ab62cb5a24e5 Author: Florian Westphal Date: Thu Dec 10 14:25:03 2020 -0800 tcp: parse mptcp options contained in reset packets Because TCP-level resets only affect the subflow, there is a MPTCP option to indicate that the MPTCP-level connection should be closed immediately without a mptcp-level fin exchange. This is the 'MPTCP fast close option'. It can be carried on ack segments or TCP resets. In the latter case, its needed to parse mptcp options also for reset packets so that MPTCP can act accordingly. Next patch will add receive side fastclose support in MPTCP. Acked-by: Matthieu Baerts Signed-off-by: Florian Westphal Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit ab82e996a1fa1b9ae514fa357d9ce8df62321157 Author: Florian Westphal Date: Thu Dec 10 14:25:02 2020 -0800 mptcp: hold mptcp socket before calling tcp_done When processing options from tcp reset path its possible that tcp_done(ssk) drops the last reference on the mptcp socket which results in use-after-free. Reviewed-by: Matthieu Baerts Signed-off-by: Florian Westphal Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit ba34c3de71ced1582dee55f2fae8638a3655d957 Author: Geliang Tang Date: Thu Dec 10 14:25:01 2020 -0800 mptcp: use MPTCPOPT_HMAC_LEN macro Use the macro MPTCPOPT_HMAC_LEN instead of a constant in struct mptcp_options_received. Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit 6fe4ccdc3dabe3de573e27fb2684d925bd611458 Author: Geliang Tang Date: Thu Dec 10 14:25:00 2020 -0800 selftests: mptcp: add the flush addrs testcase This patch added the flush addrs testcase. In do_transfer, if the number of removing addresses is less than 8, use the del addr command to remove the addresses one by one. If the number is more than 8, use the flush addrs command to remove the addresses. Acked-by: Paolo Abeni Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit 141694df6573b49aa4143c92556544b4b0bbda72 Author: Geliang Tang Date: Thu Dec 10 14:24:59 2020 -0800 mptcp: remove address when netlink flushes addrs When the PM netlink flushes the addresses, invoke the remove address function mptcp_nl_remove_subflow_and_signal_addr to remove the addresses and the subflows. Since this function should not be invoked under lock, move __flush_addrs out of the pernet->lock. Acked-by: Paolo Abeni Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit 3764b0c5651e34ceb3e7d5c75b6fd8e7b72112ac Author: Nicolas Rybowski Date: Thu Dec 10 14:24:58 2020 -0800 mptcp: attach subflow socket to parent cgroup It has been observed that the kernel sockets created for the subflows (except the first one) are not in the same cgroup as their parents. That's because the additional subflows are created by kernel workers. This is a problem with eBPF programs attached to the parent's cgroup won't be executed for the children. But also with any other features of CGroup linked to a sk. This patch fixes this behaviour. As the subflow sockets are created by the kernel, we can't use 'mem_cgroup_sk_alloc' because of the current context being the one of the kworker. This is why we have to do low level memcg manipulation, if required. Suggested-by: Matthieu Baerts Suggested-by: Paolo Abeni Acked-by: Matthieu Baerts Signed-off-by: Nicolas Rybowski Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit e857b6fcc5af0fbe042bec7e56a1533fe78ef594 Merge: 8c1dccc80380f cb262935a166b Author: Linus Torvalds Date: Mon Dec 14 17:27:47 2020 -0800 Merge tag 'locking-core-2020-12-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking updates from Thomas Gleixner: "A moderate set of locking updates: - A few extensions to the rwsem API and support for opportunistic spinning and lock stealing - lockdep selftest improvements - Documentation updates - Cleanups and small fixes all over the place" * tag 'locking-core-2020-12-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (21 commits) seqlock: kernel-doc: Specify when preemption is automatically altered seqlock: Prefix internal seqcount_t-only macros with a "do_" Documentation: seqlock: s/LOCKTYPE/LOCKNAME/g locking/rwsem: Remove reader optimistic spinning locking/rwsem: Enable reader optimistic lock stealing locking/rwsem: Prevent potential lock starvation locking/rwsem: Pass the current atomic count to rwsem_down_read_slowpath() locking/rwsem: Fold __down_{read,write}*() locking/rwsem: Introduce rwsem_write_trylock() locking/rwsem: Better collate rwsem_read_trylock() rwsem: Implement down_read_interruptible rwsem: Implement down_read_killable_nested refcount: Fix a kernel-doc markup completion: Drop init_completion define atomic: Update MAINTAINERS atomic: Delete obsolete documentation seqlock: Rename __seqprop() users lockdep/selftest: Add spin_nest_lock test lockdep/selftests: Fix PROVE_RAW_LOCK_NESTING seqlock: avoid -Wshadow warnings ... commit efc36d3c344a36fe73cda93c55763058629e0f2c Author: Loic Poulain Date: Thu Dec 10 12:25:07 2020 +0100 net: mhi: Fix unexpected queue wake This patch checks that MHI queue is not full before waking up the net queue. This fix sporadic MHI queueing issues in xmit. Indeed xmit and its symmetric complete callback (ul_callback) can run concurently, it is then not safe to unconditionnaly waking the queue in the callback without checking queue fullness. Fixes: 3ffec6a14f24 ("net: Add mhi-net driver") Signed-off-by: Loic Poulain Link: https://lore.kernel.org/r/1607599507-5879-1-git-send-email-loic.poulain@linaro.org Signed-off-by: Jakub Kicinski commit 49506a9ba0619b02bcce039e19dc40b432f56b15 Author: Rasmus Villemoes Date: Thu Dec 10 12:06:44 2020 +0100 net: dsa: mv88e6xxx: don't set non-existing learn2all bit for 6220/6250 The 6220 and 6250 switches do not have a learn2all bit in global1, ATU control register; bit 3 is reserverd. On the switches that do have that bit, it is used to control whether learning frames are sent out the ports that have the message_port bit set. So rather than adding yet another chip method, use the existence of the ->port_setup_message_port method as a proxy for determining whether the learn2all bit exists (and should be set). Signed-off-by: Rasmus Villemoes Link: https://lore.kernel.org/r/20201210110645.27765-1-rasmus.villemoes@prevas.dk Signed-off-by: Jakub Kicinski commit 8c1dccc80380fca8db09c2a81f5deb3c49b112b2 Merge: 1ac0884d5474f 50df51d12c317 Author: Linus Torvalds Date: Mon Dec 14 17:21:16 2020 -0800 Merge tag 'core-rcu-2020-12-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RCU updates from Thomas Gleixner: "RCU, LKMM and KCSAN updates collected by Paul McKenney. RCU: - Avoid cpuinfo-induced IPI pileups and idle-CPU IPIs - Lockdep-RCU updates reducing the need for __maybe_unused - Tasks-RCU updates - Miscellaneous fixes - Documentation updates - Torture-test updates KCSAN: - updates for selftests, avoiding setting watchpoints on NULL pointers - fix to watchpoint encoding LKMM: - updates for documentation along with some updates to example-code litmus tests" * tag 'core-rcu-2020-12-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (72 commits) srcu: Take early exit on memory-allocation failure rcu/tree: Defer kvfree_rcu() allocation to a clean context rcu: Do not report strict GPs for outgoing CPUs rcu: Fix a typo in rcu_blocking_is_gp() header comment rcu: Prevent lockdep-RCU splats on lock acquisition/release rcu/tree: nocb: Avoid raising softirq for offloaded ready-to-execute CBs rcu,ftrace: Fix ftrace recursion rcu/tree: Make struct kernel_param_ops definitions const rcu/tree: Add a warning if CPU being onlined did not report QS already rcu: Clarify nocb kthreads naming in RCU_NOCB_CPU config rcu: Fix single-CPU check in rcu_blocking_is_gp() rcu: Implement rcu_segcblist_is_offloaded() config dependent list.h: Update comment to explicitly note circular lists rcu: Panic after fixed number of stalls x86/smpboot: Move rcu_cpu_starting() earlier rcu: Allow rcu_irq_enter_check_tick() from NMI tools/memory-model: Label MP tests' producers and consumers tools/memory-model: Use "buf" and "flag" for message-passing tests tools/memory-model: Add types to litmus tests tools/memory-model: Add a glossary of LKMM terms ... commit 09d6217254c004f6237cc2c2bfe604af58e9a8c5 Author: Eelco Chaudron Date: Mon Dec 7 05:08:39 2020 -0500 net: openvswitch: fix TTL decrement exception action execution Currently, the exception actions are not processed correctly as the wrong dataset is passed. This change fixes this, including the misleading comment. In addition, a check was added to make sure we work on an IPv4 packet, and not just assume if it's not IPv6 it's IPv4. This was all tested using OVS with patch, https://patchwork.ozlabs.org/project/openvswitch/list/?series=21639, applied and sending packets with a TTL of 1 (and 0), both with IPv4 and IPv6. Fixes: 69929d4c49e1 ("net: openvswitch: fix TTL decrement action netlink message format") Signed-off-by: Eelco Chaudron Link: https://lore.kernel.org/r/160733569860.3007.12938188180387116741.stgit@wsfd-netdev64.ntdv.lab.eng.bos.redhat.com Signed-off-by: Jakub Kicinski commit 1ac0884d5474fea8dc6ceabbd0e870d1bf4b7b42 Merge: ff6135959a915 c6156e1da633f Author: Linus Torvalds Date: Mon Dec 14 17:13:53 2020 -0800 Merge tag 'core-entry-2020-12-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull core entry/exit updates from Thomas Gleixner: "A set of updates for entry/exit handling: - More generalization of entry/exit functionality - The consolidation work to reclaim TIF flags on x86 and also for non-x86 specific TIF flags which are solely relevant for syscall related work and have been moved into their own storage space. The x86 specific part had to be merged in to avoid a major conflict. - The TIF_NOTIFY_SIGNAL work which replaces the inefficient signal delivery mode of task work and results in an impressive performance improvement for io_uring. The non-x86 consolidation of this is going to come seperate via Jens. - The selective syscall redirection facility which provides a clean and efficient way to support the non-Linux syscalls of WINE by catching them at syscall entry and redirecting them to the user space emulation. This can be utilized for other purposes as well and has been designed carefully to avoid overhead for the regular fastpath. This includes the core changes and the x86 support code. - Simplification of the context tracking entry/exit handling for the users of the generic entry code which guarantee the proper ordering and protection. - Preparatory changes to make the generic entry code accomodate S390 specific requirements which are mostly related to their syscall restart mechanism" * tag 'core-entry-2020-12-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (36 commits) entry: Add syscall_exit_to_user_mode_work() entry: Add exit_to_user_mode() wrapper entry_Add_enter_from_user_mode_wrapper entry: Rename exit_to_user_mode() entry: Rename enter_from_user_mode() docs: Document Syscall User Dispatch selftests: Add benchmark for syscall user dispatch selftests: Add kselftest for syscall user dispatch entry: Support Syscall User Dispatch on common syscall entry kernel: Implement selective syscall userspace redirection signal: Expose SYS_USER_DISPATCH si_code type x86: vdso: Expose sigreturn address on vdso to the kernel MAINTAINERS: Add entry for common entry code entry: Fix boot for !CONFIG_GENERIC_ENTRY x86: Support HAVE_CONTEXT_TRACKING_OFFSTACK context_tracking: Only define schedule_user() on !HAVE_CONTEXT_TRACKING_OFFSTACK archs sched: Detect call to schedule from critical entry code context_tracking: Don't implement exception_enter/exit() on CONFIG_HAVE_CONTEXT_TRACKING_OFFSTACK context_tracking: Introduce HAVE_CONTEXT_TRACKING_OFFSTACK x86: Reclaim unused x86 TI flags ... commit ff6135959a9150ad45cb92ca38da270903a74343 Merge: f9b4240b07473 47e44ed01434e Author: Linus Torvalds Date: Mon Dec 14 16:55:54 2020 -0800 Merge tag 'docs-5.11' of git://git.lwn.net/linux Pull documentation updates from Jonathan Corbet: "A much quieter cycle for documentation (happily), with, one hopes, the bulk of the churn behind us. Significant stuff in this pull includes: - A set of new Chinese translations - Italian translation updates - A mechanism from Mauro to automatically format Documentation/features for the built docs - Automatic cross references without explicit :ref: markup - A new reset-controller document - An extensive new document on reporting problems from Thorsten That last patch also adds the CC-BY-4.0 license to LICENSES/dual; there was some discussion on this, but we seem to have consensus and an ack from Greg for that addition" * tag 'docs-5.11' of git://git.lwn.net/linux: (50 commits) docs: fix broken cross reference in translations/zh_CN docs: Note that sphinx 1.7 will be required soon docs: update requirements to install six module docs: reporting-issues: move 'outdated, need help' note to proper place docs: Update documentation to reflect what TAINT_CPU_OUT_OF_SPEC means docs: add a reset controller chapter to the driver API docs docs: make reporting-bugs.rst obsolete docs: Add a new text describing how to report bugs LICENSES: Add the CC-BY-4.0 license Documentation: fix multiple typos found in the admin-guide subdirectory Documentation: fix typos found in admin-guide subdirectory kernel-doc: Fix example in Nested structs/unions docs: clean up sysctl/kernel: titles, version docs: trace: fix event state structure name docs: nios2: add missing ReST file scripts: get_feat.pl: reduce table width for all features output scripts: get_feat.pl: change the group by order scripts: get_feat.pl: make complete table more coincise scripts: kernel-doc: fix parsing function-like typedefs Documentation: fix typos found in process, dev-tools, and doc-guide subdirectories ... commit f9b4240b074730f41c1ef8e0d695d10fb5bb1e27 Merge: 6d93a1971a0de aabe19b827934 Author: Linus Torvalds Date: Mon Dec 14 16:40:27 2020 -0800 Merge tag 'fixes-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux Pull misc fixes from Christian Brauner: "This contains several fixes which felt worth being combined into a single branch: - Use put_nsproxy() instead of open-coding it switch_task_namespaces() - Kirill's work to unify lifecycle management for all namespaces. The lifetime counters are used identically for all namespaces types. Namespaces may of course have additional unrelated counters and these are not altered. This work allows us to unify the type of the counters and reduces maintenance cost by moving the counter in one place and indicating that basic lifetime management is identical for all namespaces. - Peilin's fix adding three byte padding to Dmitry's PTRACE_GET_SYSCALL_INFO uapi struct to prevent an info leak. - Two smal patches to convert from the /* fall through */ comment annotation to the fallthrough keyword annotation which I had taken into my branch and into -next before df561f6688fe ("treewide: Use fallthrough pseudo-keyword") made it upstream which fixed this tree-wide. Since I didn't want to invalidate all testing for other commits I didn't rebase and kept them" * tag 'fixes-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux: nsproxy: use put_nsproxy() in switch_task_namespaces() sys: Convert to the new fallthrough notation signal: Convert to the new fallthrough notation time: Use generic ns_common::count cgroup: Use generic ns_common::count mnt: Use generic ns_common::count user: Use generic ns_common::count pid: Use generic ns_common::count ipc: Use generic ns_common::count uts: Use generic ns_common::count net: Use generic ns_common::count ns: Add a common refcount into ns_common ptrace: Prevent kernel-infoleak in ptrace_get_syscall_info() commit 6d93a1971a0ded67887eeab8d00a02074490f071 Merge: 0ca2ce81eb8ee 5c62634fc6510 Author: Linus Torvalds Date: Mon Dec 14 16:35:39 2020 -0800 Merge tag 'time-namespace-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux Pull time namespace updates from Christian Brauner: "When time namespaces were introduced we missed to virtualize the 'btime' field in /proc/stat. This confuses tasks which are in another time namespace with a virtualized boottime which is common in some container workloads. This contains Michael's series to fix 'btime' which Thomas asked me to take through my tree. To fix 'btime' virtualization we simply subtract the offset of the time namespace's boottime from btime before printing the stats. Note that since start_boottime of processes are seconds since boottime and the boottime stamp is now shifted according to the time namespace's offset, the offset of the time namespace also needs to be applied before the process stats are given to userspace. This avoids that processes shown by tools such as 'ps' appear as time travelers in the corresponding time namespace. Selftests are included to verify that btime virtualization in /proc/stat works as expected" * tag 'time-namespace-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux: namespace: make timens_on_fork() return nothing selftests/timens: added selftest for /proc/stat btime fs/proc: apply the time namespace offset to /proc/stat btime timens: additional helper functions for boottime offset handling commit 4b4193256c8d3bc3a5397b5cd9494c2ad386317d Merge: cffdd6d904823 92f0a3a22c7a4 Author: Dmitry Torokhov Date: Mon Dec 14 16:27:23 2020 -0800 Merge branch 'next' into for-linus Prepare input updates for 5.11 merge window. commit 0ca2ce81eb8ee30f3ba8ac7967fef9cfbb44dbdb Merge: 586592478b1fa d889797530c66 Author: Linus Torvalds Date: Mon Dec 14 16:24:30 2020 -0800 Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 updates from Catalin Marinas: - Expose tag address bits in siginfo. The original arm64 ABI did not expose any of the bits 63:56 of a tagged address in siginfo. In the presence of user ASAN or MTE, this information may be useful. The implementation is generic to other architectures supporting tags (like SPARC ADI, subject to wiring up the arch code). The user will have to opt in via sigaction(SA_EXPOSE_TAGBITS) so that the extra bits, if available, become visible in si_addr. - Default to 32-bit wide ZONE_DMA. Previously, ZONE_DMA was set to the lowest 1GB to cope with the Raspberry Pi 4 limitations, to the detriment of other platforms. With these changes, the kernel scans the Device Tree dma-ranges and the ACPI IORT information before deciding on a smaller ZONE_DMA. - Strengthen READ_ONCE() to acquire when CONFIG_LTO=y. When building with LTO, there is an increased risk of the compiler converting an address dependency headed by a READ_ONCE() invocation into a control dependency and consequently allowing for harmful reordering by the CPU. - Add CPPC FFH support using arm64 AMU counters. - set_fs() removal on arm64. This renders the User Access Override (UAO) ARMv8 feature unnecessary. - Perf updates: PMU driver for the ARM DMC-620 memory controller, sysfs identifier file for SMMUv3, stop event counters support for i.MX8MP, enable the perf events-based hard lockup detector. - Reorganise the kernel VA space slightly so that 52-bit VA configurations can use more virtual address space. - Improve the robustness of the arm64 memory offline event notifier. - Pad the Image header to 64K following the EFI header definition updated recently to increase the section alignment to 64K. - Support CONFIG_CMDLINE_EXTEND on arm64. - Do not use tagged PC in the kernel (TCR_EL1.TBID1==1), freeing up 8 bits for PtrAuth. - Switch to vmapped shadow call stacks. - Miscellaneous clean-ups. * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (78 commits) perf/imx_ddr: Add system PMU identifier for userspace bindings: perf: imx-ddr: add compatible string arm64: Fix build failure when HARDLOCKUP_DETECTOR_PERF is enabled arm64: mte: fix prctl(PR_GET_TAGGED_ADDR_CTRL) if TCF0=NONE arm64: mark __system_matches_cap as __maybe_unused arm64: uaccess: remove vestigal UAO support arm64: uaccess: remove redundant PAN toggling arm64: uaccess: remove addr_limit_user_check() arm64: uaccess: remove set_fs() arm64: uaccess cleanup macro naming arm64: uaccess: split user/kernel routines arm64: uaccess: refactor __{get,put}_user arm64: uaccess: simplify __copy_user_flushcache() arm64: uaccess: rename privileged uaccess routines arm64: sdei: explicitly simulate PAN/UAO entry arm64: sdei: move uaccess logic to arch/arm64/ arm64: head.S: always initialize PSTATE arm64: head.S: cleanup SCTLR_ELx initialization arm64: head.S: rename el2_setup -> init_kernel_el arm64: add C wrappers for SET_PSTATE_*() ... commit 586592478b1fa8bb8cd6875a9191468e9b1a8b13 Merge: 0b03beface02d 343dbdb7cb899 Author: Linus Torvalds Date: Mon Dec 14 16:22:26 2020 -0800 Merge tag 's390-5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 updates from Heiko Carstens: - Add support for the hugetlb_cma command line option to allocate gigantic hugepages using CMA - Add arch_get_random_long() support. - Add ap bus userspace notifications. - Increase default size of vmalloc area to 512GB and otherwise let it increase dynamically by the size of physical memory. This should fix all occurrences where the vmalloc area was not large enough. - Completely get rid of set_fs() (aka select SET_FS) and rework address space handling while doing that; making address space handling much more simple. - Reimplement getcpu vdso syscall in C. - Add support for extended SCLP responses (> 4k). This allows e.g. to handle also potential large system configurations. - Simplify KASAN by removing 3-level page table support and only supporting 4-levels from now on. - Improve debug-ability of the kernel decompressor code, which now prints also stack traces and symbols in case of problems to the console. - Remove more power management leftovers. - Other various fixes and improvements all over the place. * tag 's390-5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (62 commits) s390/mm: add support to allocate gigantic hugepages using CMA s390/crypto: add arch_get_random_long() support s390/smp: perform initial CPU reset also for SMT siblings s390/mm: use invalid asce for user space when switching to init_mm s390/idle: fix accounting with machine checks s390/idle: add missing mt_cycles calculation s390/boot: add build-id to decompressor s390/kexec_file: fix diag308 subcode when loading crash kernel s390/cio: fix use-after-free in ccw_device_destroy_console s390/cio: remove pm support from ccw bus driver s390/cio: remove pm support from css-bus driver s390/cio: remove pm support from IO subchannel drivers s390/cio: remove pm support from chsc subchannel driver s390/vmur: remove unused pm related functions s390/tape: remove unsupported PM functions s390/cio: remove pm support from eadm-sch drivers s390: remove pm support from console drivers s390/dasd: remove unused pm related functions s390/zfcp: remove pm support from zfcp driver s390/ap: let bus_register() add the AP bus sysfs attributes ... commit 0b03beface02d519693edb8020f9811c67d5c88f Merge: 2c075f38a708c 2ae92e8b9b7eb Author: Linus Torvalds Date: Mon Dec 14 16:20:48 2020 -0800 Merge tag 'm68k-for-v5.11-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k Pull m68k updates from Geert Uytterhoeven: - fix WARNING splat in pmac_zilog driver - fix ADB input device regression - assume maintainership for adb-iop and via-macii - minor fixes and improvements - defconfig updates * tag 'm68k-for-v5.11-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: MAINTAINERS: Update m68k Mac entry macintosh/adb-iop: Send correct poll command macintosh/adb-iop: Always wait for reply message from IOP m68k: Fix WARNING splat in pmac_zilog driver m68k: Add a missing ELF_DETAILS in link script m68k: Drop redundant NOTES in link script m68k: mac: Update Kconfig help m68k: mac: Remove redundant VIA register writes m68k: mac: Remove dead code m68k: mac: Refactor iop_preinit() and iop_init() m68k: defconfig: Enable KUnit tests m68k: defconfig: Update defconfigs for v5.10-rc1 m68k: Remove unused mach_max_dma_address m68k: Avoid xchg() warning commit 2c075f38a708c578a752b738a45e8c26923eac2e Merge: 84292fffc2468 68b111bf74a0d Author: Linus Torvalds Date: Mon Dec 14 16:17:38 2020 -0800 Merge branch 'radeon-fixes' (Radeon and amdgpu fixes) Merge radeon and amdgpu fixes for boot problems. The drm merge ended up causing my AMD workstation to not boot. When reporting this, Alex Deucher correctly blamed commit 28a68f828266 ("drm/radeon/ttm: use multihop") and pointed to these two fixes that were already in the drm-misc tree: 95e3d610d35c ("drm/radeon: fix check order in radeon_bo_move") aefec40938e4 ("drm/amdgpu: fix check order in amdgpu_bo_move") Since I hate doing merges with a known-bad base, I've cherry-picked these fixes into a branch of their own, just to be able to continue my merge window. The original commits will eventually come in as duplicates through the normal channels, but in the meantime we have a tree that isn't broken with basically every AMD GPU out there. Acked-by: Alex Deucher * cherry-picked from the drm-misc tree: drm/radeon: fix check order in radeon_bo_move drm/amdgpu: fix check order in amdgpu_bo_move commit 68b111bf74a0d69a905d6be4b91277d79f9bcafb Author: Christian König Date: Wed Nov 25 15:32:23 2020 +0100 drm/radeon: fix check order in radeon_bo_move Reorder the code to fix checking if blitting is available. Signed-off-by: Christian König Fixes: 28a68f828266 ("drm/radeon/ttm: use multihop") Reviewed-by: Daniel Vetter Reviewed-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/403847/ Signed-off-by: Linus Torvalds commit 228ddee8ed9e24084274954eb526b5798b006f1f Author: Christian König Date: Mon Nov 16 20:12:03 2020 +0100 drm/amdgpu: fix check order in amdgpu_bo_move Reorder the code to fix checking if blitting is available. Signed-off-by: Christian König Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/401019/ Signed-off-by: Linus Torvalds commit 7bca5021a4e653a323492cb500cfc387331481b9 Merge: a6b5e026e6238 48b0ae046ee96 Author: Jakub Kicinski Date: Mon Dec 14 15:43:20 2020 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next Pablo Neira Ayuso says: ==================== Netfilter/IPVS updates for net-next 1) Missing dependencies in NFT_BRIDGE_REJECT, from Randy Dunlap. 2) Use atomic_inc_return() instead of atomic_add_return() in IPVS, from Yejune Deng. 3) Simplify check for overquota in xt_nfacct, from Kaixu Xia. 4) Move nfnl_acct_list away from struct net, from Miao Wang. 5) Pass actual sk in reject actions, from Jan Engelhardt. 6) Add timeout and protoinfo to ctnetlink destroy events, from Florian Westphal. 7) Four patches to generalize set infrastructure to support for multiple expressions per set element. * git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next: netfilter: nftables: netlink support for several set element expressions netfilter: nftables: generalize set extension to support for several expressions netfilter: nftables: move nft_expr before nft_set netfilter: nftables: generalize set expressions support netfilter: ctnetlink: add timeout and protoinfo to destroy events netfilter: use actual socket sk for REJECT action netfilter: nfnl_acct: remove data from struct net netfilter: Remove unnecessary conversion to bool ipvs: replace atomic_add_return() netfilter: nft_reject_bridge: fix build errors due to code movement ==================== Link: https://lore.kernel.org/r/20201212230513.3465-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski commit a6b5e026e6238cbdd51e3c9b77cc3c79a7c24a9a Merge: 13458ffe0a953 b4b638c36b7e7 Author: Jakub Kicinski Date: Mon Dec 14 15:34:35 2020 -0800 Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== pull-request: bpf-next 2020-12-14 1) Expose bpf_sk_storage_*() helpers to iterator programs, from Florent Revest. 2) Add AF_XDP selftests based on veth devs to BPF selftests, from Weqaar Janjua. 3) Support for finding BTF based kernel attach targets through libbpf's bpf_program__set_attach_target() API, from Andrii Nakryiko. 4) Permit pointers on stack for helper calls in the verifier, from Yonghong Song. 5) Fix overflows in hash map elem size after rlimit removal, from Eric Dumazet. 6) Get rid of direct invocation of llc in BPF selftests, from Andrew Delgadillo. 7) Fix xsk_recvmsg() to reorder socket state check before access, from Björn Töpel. 8) Add new libbpf API helper to retrieve ring buffer epoll fd, from Brendan Jackman. 9) Batch of minor BPF selftest improvements all over the place, from Florian Lehner, KP Singh, Jiri Olsa and various others. * https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (31 commits) selftests/bpf: Add a test for ptr_to_map_value on stack for helper access bpf: Permits pointers on stack for helper calls libbpf: Expose libbpf ring_buffer epoll_fd selftests/bpf: Add set_attach_target() API selftest for module target libbpf: Support modules in bpf_program__set_attach_target() API selftests/bpf: Silence ima_setup.sh when not running in verbose mode. selftests/bpf: Drop the need for LLVM's llc selftests/bpf: fix bpf_testmod.ko recompilation logic samples/bpf: Fix possible hang in xdpsock with multiple threads selftests/bpf: Make selftest compilation work on clang 11 selftests/bpf: Xsk selftests - adding xdpxceiver to .gitignore selftests/bpf: Drop tcp-{client,server}.py from Makefile selftests/bpf: Xsk selftests - Bi-directional Sockets - SKB, DRV selftests/bpf: Xsk selftests - Socket Teardown - SKB, DRV selftests/bpf: Xsk selftests - DRV POLL, NOPOLL selftests/bpf: Xsk selftests - SKB POLL, NOPOLL selftests/bpf: Xsk selftests framework bpf: Only provide bpf_sock_from_file with CONFIG_NET bpf: Return -ENOTSUPP when attaching to non-kernel BTF xsk: Validate socket state in xsk_recvmsg, prior touching socket members ... ==================== Link: https://lore.kernel.org/r/20201214214316.20642-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit 1b04fa9900263b4e217ca2509fd778b32c2b4eb2 Author: Uladzislau Rezki (Sony) Date: Wed Dec 9 21:27:31 2020 +0100 rcu-tasks: Move RCU-tasks initialization to before early_initcall() PowerPC testing encountered boot failures due to RCU Tasks not being fully initialized until core_initcall() time. This commit therefore initializes RCU Tasks (along with Rude RCU and RCU Tasks Trace) just before early_initcall() time, thus allowing waiting on RCU Tasks grace periods from early_initcall() handlers. Link: https://lore.kernel.org/rcu/87eekfh80a.fsf@dja-thinkpad.axtens.net/ Fixes: 36dadef23fcc ("kprobes: Init kprobes in early_initcall") Tested-by: Daniel Axtens Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney commit 92f0a3a22c7a4c936277ece3a0215955a2d52238 Author: Colin Ian King Date: Mon Dec 14 14:59:44 2020 -0800 Input: da7280 - fix spelling mistake "sequemce" -> "sequence" There is a spelling mistake in a dev_err message. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20201214223109.82924-1-colin.king@canonical.com Signed-off-by: Dmitry Torokhov commit f051ae4f6c732c231046945b36234e977f8467c6 Author: Arnd Bergmann Date: Mon Dec 14 13:37:46 2020 -0800 Input: cyapa_gen6 - fix out-of-bounds stack access gcc -Warray-bounds warns about a serious bug in cyapa_pip_retrieve_data_structure: drivers/input/mouse/cyapa_gen6.c: In function 'cyapa_pip_retrieve_data_structure.constprop': include/linux/unaligned/access_ok.h:40:17: warning: array subscript -1 is outside array bounds of 'struct retrieve_data_struct_cmd[1]' [-Warray-bounds] 40 | *((__le16 *)p) = cpu_to_le16(val); drivers/input/mouse/cyapa_gen6.c:569:13: note: while referencing 'cmd' 569 | } __packed cmd; | ^~~ Apparently the '-2' was added to the pointer instead of the value, writing garbage into the stack next to this variable. Fixes: c2c06c41f700 ("Input: cyapa - add gen6 device module support") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20201026161332.3708389-1-arnd@kernel.org Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov commit 2f0df6cfa325d7106b8a65bc0e02db1086e3f73b Author: Ilya Dryomov Date: Thu Nov 19 20:00:10 2020 +0100 libceph: drop ceph_auth_{create,update}_authorizer() Signed-off-by: Ilya Dryomov commit ce287162d9738fe03a3731904710b6700ba686aa Author: Ilya Dryomov Date: Thu Nov 19 19:13:58 2020 +0100 libceph, ceph: make use of __ceph_auth_get_authorizer() in msgr1 This shouldn't cause any functional changes. Signed-off-by: Ilya Dryomov commit cd1a677cad994021b19665ed476aea63f5d54f31 Author: Ilya Dryomov Date: Thu Nov 19 16:59:08 2020 +0100 libceph, ceph: implement msgr2.1 protocol (crc and secure modes) Implement msgr2.1 wire protocol, available since nautilus 14.2.11 and octopus 15.2.5. msgr2.0 wire protocol is not implemented -- it has several security, integrity and robustness issues and therefore considered deprecated. Signed-off-by: Ilya Dryomov commit 00498b994113a871a556f7ff24a4cf8a00611700 Author: Ilya Dryomov Date: Thu Nov 19 16:04:58 2020 +0100 libceph: introduce connection modes and ms_mode option msgr2 supports two connection modes: crc (plain) and secure (on-wire encryption). Connection mode is picked by server based on input from client. Introduce ms_mode option: ms_mode=legacy - msgr1 (default) ms_mode=crc - crc mode, if denied fail ms_mode=secure - secure mode, if denied fail ms_mode=prefer-crc - crc mode, if denied agree to secure mode ms_mode=prefer-secure - secure mode, if denied agree to crc mode ms_mode affects all connections, we don't separate connections to mons like it's done in userspace with ms_client_mode vs ms_mon_client_mode. For now the default is legacy, to be flipped to prefer-crc after some time. Signed-off-by: Ilya Dryomov commit 313771e80fd253d4b5472e61a2d12b03c5293aa9 Author: Ilya Dryomov Date: Wed Nov 25 14:41:59 2020 +0100 libceph, rbd: ignore addr->type while comparing in some cases For libceph, this ensures that libceph instance sharing (share option) continues to work. For rbd, this avoids blocklisting alive lock owners (locker addr is always LEGACY, while watcher addr is ANY in nautilus). Signed-off-by: Ilya Dryomov commit a5cbd5fc22d5043a8a76e15d75d031fe24d1f69c Author: Ilya Dryomov Date: Fri Oct 30 13:30:51 2020 +0100 libceph, ceph: get and handle cluster maps with addrvecs In preparation for msgr2, make the cluster send us maps with addrvecs including both LEGACY and MSGR2 addrs instead of a single LEGACY addr. This means advertising support for SERVER_NAUTILUS and also some older features: SERVER_MIMIC, MONENC and MONNAMES. MONNAMES and MONENC are actually pre-argonaut, we just never updated ceph_monmap_decode() for them. Decoding is unconditional, see commit 23c625ce3065 ("libceph: assume argonaut on the server side"). SERVER_MIMIC doesn't bear any meaning for the kernel client. Since ceph_decode_entity_addrvec() is guarded by encoding version checks (and in msgr2 case it is guarded implicitly by the fact that server is speaking msgr2), we assume MSG_ADDR2 for it. Signed-off-by: Ilya Dryomov commit 8921f25116af3081fb56871feb93f2dcaf52c722 Author: Ilya Dryomov Date: Wed Oct 14 15:53:39 2020 +0200 libceph: factor out finish_auth() In preparation for msgr2, factor out finish_auth() so it is suitable for both existing MAuth message based authentication and upcoming msgr2 authentication exchange. Signed-off-by: Ilya Dryomov commit c1c0ce78f479cf4d7dfe72c4c1cabbf0bc0730c9 Author: Ilya Dryomov Date: Mon Oct 26 17:05:44 2020 +0100 libceph: drop ac->ops->name field Signed-off-by: Ilya Dryomov commit 59711f9ec219bf5245a8e95989803fb503adc52d Author: Ilya Dryomov Date: Mon Oct 26 17:01:53 2020 +0100 libceph: amend cephx init_protocol() and build_request() In msgr2, initial authentication happens with an exchange of msgr2 control frames -- MAuth message and struct ceph_mon_request_header aren't used. Make that optional. Stop reporting cephx protocol as "x". Use "cephx" instead. Signed-off-by: Ilya Dryomov commit 285ea34fc876aa0a2c5e65d310c4a41269e2e5f2 Author: Ilya Dryomov Date: Mon Oct 26 16:47:20 2020 +0100 libceph, ceph: incorporate nautilus cephx changes - request service tickets together with auth ticket. Currently we get auth ticket via CEPHX_GET_AUTH_SESSION_KEY op and then request service tickets via CEPHX_GET_PRINCIPAL_SESSION_KEY op in a separate message. Since nautilus, desired service tickets are shared togther with auth ticket in CEPHX_GET_AUTH_SESSION_KEY reply. - propagate session key and connection secret, if any. In preparation for msgr2, update handle_reply() and verify_authorizer_reply() auth ops to propagate session key and connection secret. Since nautilus, if secure mode is negotiated, connection secret is shared either in CEPHX_GET_AUTH_SESSION_KEY reply (for mons) or in a final authorizer reply (for osds and mdses). Signed-off-by: Ilya Dryomov commit 6610fff2782a4a793069a5dd395883a91c76e7d4 Author: Ilya Dryomov Date: Mon Oct 12 15:05:09 2020 +0200 libceph: safer en/decoding of cephx requests and replies Signed-off-by: Ilya Dryomov commit f79e25b087b80eef47eef4c8b0763eb1a583a357 Author: Ilya Dryomov Date: Fri Nov 27 17:18:27 2020 +0100 libceph: more insight into ticket expiry and invalidation Make it clear that "need" is a union of "missing" and "have, but up for renewal" and dout when the ticket goes missing due to expiry or invalidation by client. Signed-off-by: Ilya Dryomov commit a56dd9bf47220c3206f27075af8bdfb219a2a3cf Author: Ilya Dryomov Date: Thu Nov 12 16:31:41 2020 +0100 libceph: move msgr1 protocol specific fields to its own struct A couple whitespace fixups, no functional changes. Signed-off-by: Ilya Dryomov commit 2f713615ddd9d805b6c5e79c52e0e11af99d2bf1 Author: Ilya Dryomov Date: Thu Nov 12 15:48:06 2020 +0100 libceph: move msgr1 protocol implementation to its own file A pure move, no other changes. Note that ceph_tcp_recv{msg,page}() and ceph_tcp_send{msg,page}() helpers are also moved. msgr2 will bring its own, more efficient, variants based on iov_iter. Switching msgr1 to them was considered but decided against to avoid subtle regressions. Signed-off-by: Ilya Dryomov commit 566050e17e53db283d4e26b73b4b50556f97ce7b Author: Ilya Dryomov Date: Thu Nov 12 12:55:39 2020 +0100 libceph: separate msgr1 protocol implementation In preparation for msgr2, define internal messenger <-> protocol interface (as opposed to external messenger <-> client interface, which is struct ceph_connection_operations) consisting of try_read(), try_write(), revoke(), revoke_incoming(), opened(), reset_session() and reset_protocol() ops. The semantics are exactly the same as they are now. Signed-off-by: Ilya Dryomov commit 6503e0b69c9d4d78b5450db01e79328f8ed4ef21 Author: Ilya Dryomov Date: Mon Nov 9 16:29:47 2020 +0100 libceph: export remaining protocol independent infrastructure In preparation for msgr2, make all protocol independent functions in messenger.c global. Signed-off-by: Ilya Dryomov commit 699921d9e68ff3d9f8645488c12f4689c6533d70 Author: Ilya Dryomov Date: Mon Nov 9 14:37:06 2020 +0100 libceph: export zero_page In preparation for msgr2, make zero_page global. Signed-off-by: Ilya Dryomov commit 3fefd43e741a5b8d55aeb9115ff488ad2cad439b Author: Ilya Dryomov Date: Mon Nov 9 14:56:36 2020 +0100 libceph: rename and export con->flags bits In preparation for msgr2, move the defines to the header file. Signed-off-by: Ilya Dryomov commit 6d7f62bfb5b5da6b0b37174c1fd32545f3b5b90d Author: Ilya Dryomov Date: Mon Nov 9 14:59:02 2020 +0100 libceph: rename and export con->state states In preparation for msgr2, rename msgr1 specific states and move the defines to the header file. Also drop state transition comments. They don't cover all possible transitions (e.g. NEGOTIATING -> STANDBY, etc) and currently do more harm than good. Signed-off-by: Ilya Dryomov commit 30be780a87211de75b93935c20a0913e46744a3f Author: Ilya Dryomov Date: Mon Nov 9 14:11:26 2020 +0100 libceph: make con->state an int unsigned long is a leftover from when con->state used to be a set of bits managed with set_bit(), clear_bit(), etc. Save a bit of memory. Signed-off-by: Ilya Dryomov commit 2f68738037db30733caed6ac6278ba589d152afa Author: Ilya Dryomov Date: Thu Nov 5 18:42:33 2020 +0100 libceph: don't export ceph_messenger_{init_fini}() to modules Signed-off-by: Ilya Dryomov commit fd1a154cad6c6a16960fa9c2c9c6427da129e461 Author: Ilya Dryomov Date: Thu Nov 5 18:48:04 2020 +0100 libceph: make sure our addr->port is zero and addr->nonce is non-zero Our messenger instance addr->port is normally zero -- anything else is nonsensical because as a client we connect to multiple servers and don't listen on any port. However, a user can supply an arbitrary addr:port via ip option and the port is currently preserved. Zero it. Conversely, make sure our addr->nonce is non-zero. A zero nonce is special: in combination with a zero port, it is used to blocklist the entire ip. Signed-off-by: Ilya Dryomov commit 771294fe0724d92157048650f3585e7be606d0f8 Author: Ilya Dryomov Date: Wed Nov 18 16:37:14 2020 +0100 libceph: factor out ceph_con_get_out_msg() Move the logic of grabbing the next message from the queue into its own function. Like ceph_con_in_msg_alloc(), this is protocol independent. Signed-off-by: Ilya Dryomov commit fc4c128e15b50c73466dcd7234dde02f6fd9e4f8 Author: Ilya Dryomov Date: Mon Nov 16 17:27:50 2020 +0100 libceph: change ceph_con_in_msg_alloc() to take hdr ceph_con_in_msg_alloc() is protocol independent, but con->in_hdr (and struct ceph_msg_header in general) is msgr1 specific. While the struct is deeply ingrained inside and outside the messenger, con->in_hdr field can be separated. Signed-off-by: Ilya Dryomov commit 8ee8abf797bb3cb6007e30ac17a15f93277b0e91 Author: Ilya Dryomov Date: Wed Nov 4 10:26:39 2020 +0100 libceph: change ceph_msg_data_cursor_init() to take cursor Make it possible to have local cursors and embed them outside struct ceph_msg. Signed-off-by: Ilya Dryomov commit 0247192809e391009fec1b191080db953997477c Author: Ilya Dryomov Date: Tue Oct 13 17:38:53 2020 +0200 libceph: handle discarding acked and requeued messages separately Make it easier to follow and remove dependency on msgr1 specific CEPH_MSGR_TAG_SEQ. Signed-off-by: Ilya Dryomov commit 5cd8da3a1ca2160b8f9c2ff6a96762e66410ea38 Author: Ilya Dryomov Date: Tue Oct 13 17:23:22 2020 +0200 libceph: drop msg->ack_stamp field It is set in process_ack() but never used. Signed-off-by: Ilya Dryomov commit d3c1248cac2c07153ade346001dea001d8792479 Author: Ilya Dryomov Date: Wed Nov 11 14:16:45 2020 +0100 libceph: remove redundant session reset log message Stick with pr_info message because session reset isn't an error most of the time. When it is (i.e. if the server denies the reconnect attempt), we get a bunch of other pr_err messages. Signed-off-by: Ilya Dryomov commit a3da057bbdb769c01ab06626ace3de160d40e973 Author: Ilya Dryomov Date: Wed Nov 11 14:08:59 2020 +0100 libceph: clear con->peer_global_seq on RESETSESSION con->peer_global_seq is part of session state. Clear it when the server tells us to reset, not just in ceph_con_close(). Signed-off-by: Ilya Dryomov commit 5963c3d01c8eec73d44a93fc0807b13369ffb63c Author: Ilya Dryomov Date: Fri Nov 6 19:04:30 2020 +0100 libceph: rename reset_connection() to ceph_con_reset_session() With just session reset bits left, rename appropriately. Signed-off-by: Ilya Dryomov commit 3596f4c1241d3c9b6a7cb03b7209c1897c3a5390 Author: Ilya Dryomov Date: Fri Nov 6 17:07:07 2020 +0100 libceph: split protocol reset bits out of reset_connection() Move protocol reset bits into ceph_con_reset_protocol(), leaving just session reset bits. Note that con->out_skip is now reset on faults. This fixes a crash in the case of a stateful session getting a fault while in the middle of revoking a message. Signed-off-by: Ilya Dryomov commit 90b6561a0525d0888d5d705e343bacaaacd3c021 Author: Ilya Dryomov Date: Fri Nov 6 17:09:24 2020 +0100 libceph: don't call reset_connection() on version/feature mismatches A fault due to a version mismatch or a feature set mismatch used to be treated differently from other faults: the connection would get closed without trying to reconnect and there was a ->bad_proto() connection op for notifying about that. This changed a long time ago, see commits 6384bb8b8e88 ("libceph: kill bad_proto ceph connection op") and 0fa6ebc600bc ("libceph: fix protocol feature mismatch failure path"). Nowadays these aren't any different from other faults (i.e. we try to reconnect even though the mismatch won't resolve until the server is replaced). reset_connection() calls there are rather confusing because reset_connection() resets a session together an individual instance of the protocol. This is cleaned up in the next patch. Signed-off-by: Ilya Dryomov commit 418af5b3bfc4f1ef4854e83c5be8a0bdce51e95c Author: Ilya Dryomov Date: Thu Oct 29 14:49:10 2020 +0100 libceph: lower exponential backoff delay The current setting allows the backoff to climb up to 5 minutes. This is too high -- it becomes hard to tell whether the client is stuck on something or just in backoff. In userspace, ms_max_backoff is defaulted to 15 seconds. Let's do the same. Signed-off-by: Ilya Dryomov commit b77f8f0e4f271c29cf5cc071ea1b6bc3a675b340 Author: Ilya Dryomov Date: Thu Nov 5 15:01:53 2020 +0100 libceph: include middle_len in process_message() dout Signed-off-by: Ilya Dryomov commit 4f1ddb1ea874c7703528a8c21b77b7f2462ee247 Author: Jeff Layton Date: Wed Dec 9 10:12:59 2020 -0500 ceph: implement updated ceph_mds_request_head structure When we added the btime feature in mainline ceph, we had to extend struct ceph_mds_request_args so that it could be set. Implement the same in the kernel client. Rename ceph_mds_request_head with a _old extension, and a union ceph_mds_request_args_ext to allow for the extended size of the new header format. Add the appropriate code to handle both formats in struct create_request_message and key the behavior on whether the peer supports CEPH_FEATURE_FS_BTIME. The gid_list field in the payload is now populated from the saved credential. For now, we don't add any support for setting the btime via setattr, but this does enable us to add that in the future. [ idryomov: break unnecessarily long lines ] Signed-off-by: Jeff Layton Reviewed-by: Xiubo Li Signed-off-by: Ilya Dryomov commit 396bd62c6912d0fd66287f004017982e542706e7 Author: Jeff Layton Date: Wed Dec 9 08:24:18 2020 -0500 ceph: clean up argument lists to __prepare_send_request and __send_request We can always get the mdsc from the session, so there's no need to pass it in as a separate argument. Pass the session to __prepare_send_request as well, to prepare for later patches that will need to access it. Signed-off-by: Jeff Layton Reviewed-by: Xiubo Li Signed-off-by: Ilya Dryomov commit 7fe0cdeb0f88988dce8a77e963d15539abba1f18 Author: Jeff Layton Date: Tue Dec 8 11:24:09 2020 -0500 ceph: take a cred reference instead of tracking individual uid/gid Replace req->r_uid/r_gid with an r_cred pointer and take a reference to that at the point where we previously would sample the two. Use that to populate the uid and gid in the header and release the reference when the request is freed. This should enable us to later add support for sending supplementary group lists in MDS requests. [ idryomov: break unnecessarily long lines ] Signed-off-by: Jeff Layton Reviewed-by: Xiubo Li Signed-off-by: Ilya Dryomov commit 0f51a983616c22a56d231950812f895e46dae256 Author: Jeff Layton Date: Wed Dec 9 10:27:01 2020 -0500 ceph: don't reach into request header for readdir info We already have a pointer to the argument struct in req->r_args. Use that instead of groveling around in the ceph_mds_request_head. Signed-off-by: Jeff Layton Reviewed-by: Xiubo Li Signed-off-by: Ilya Dryomov commit 968cd14edc3acff251f98bdc1eb15f13f05dd5fb Author: Xiubo Li Date: Wed Dec 9 10:52:20 2020 +0800 ceph: set osdmap epoch for setxattr When setting the file/dir layout, it may need data pool info. So in mds server, it needs to check the osdmap. At present, if mds doesn't find the data pool specified, it will try to get the latest osdmap. Now if pass the osd epoch for setxattr, the mds server can only check this epoch of osdmap. URL: https://tracker.ceph.com/issues/48504 Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 4a756db2a149f25483a7c63f013ff96372a0b2cb Author: Colin Ian King Date: Fri Dec 4 18:54:21 2020 +0000 ceph: remove redundant assignment to variable i The variable i is being initialized with a value that is never read and it is being updated later with a new value in a for-loop. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit dd980fc0d598f90745dfcf3806bcc65452e03265 Author: Luis Henriques Date: Mon Nov 23 17:38:46 2020 +0000 ceph: add ceph.caps vxattr Add a new vxattr that allows userspace to list the caps for a specific directory or file. [ jlayton: change format delimiter to '/' ] Signed-off-by: Luis Henriques Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit bca9fc14c70fcbbebc84954cc39994e463fb9468 Author: Jeff Layton Date: Thu Nov 12 10:03:38 2020 -0500 ceph: when filling trace, call ceph_get_inode outside of mutexes Geng Jichao reported a rather complex deadlock involving several moving parts: 1) readahead is issued against an inode and some of its pages are locked while the read is in flight 2) the same inode is evicted from the cache, and this task gets stuck waiting for the page lock because of the above readahead 3) another task is processing a reply trace, and looks up the inode being evicted while holding the s_mutex. That ends up waiting for the eviction to complete 4) a write reply for an unrelated inode is then processed in the ceph_con_workfn job. It calls ceph_check_caps after putting wrbuffer caps, and that gets stuck waiting on the s_mutex held by 3. The reply to "1" is stuck behind the write reply in "4", so we deadlock at that point. This patch changes the trace processing to call ceph_get_inode outside of the s_mutex and snap_rwsem, which should break the cycle above. [ idryomov: break unnecessarily long lines ] URL: https://tracker.ceph.com/issues/47998 Reported-by: Geng Jichao Signed-off-by: Jeff Layton Reviewed-by: Luis Henriques Signed-off-by: Ilya Dryomov commit 6646ea1c8e8716ab6b8b60ff4930f808442cfe12 Author: Luis Henriques Date: Thu Nov 12 15:23:21 2020 +0000 Revert "ceph: allow rename operation under different quota realms" This reverts commit dffdcd71458e699e839f0bf47c3d42d64210b939. When doing a rename across quota realms, there's a corner case that isn't handled correctly. Here's a testcase: mkdir files limit truncate files/file -s 10G setfattr limit -n ceph.quota.max_bytes -v 1000000 mv files limit/ The above will succeed because ftruncate(2) won't immediately notify the MDSs with the new file size, and thus the quota realms stats won't be updated. Since the possible fixes for this issue would have a huge performance impact, the solution for now is to simply revert to returning -EXDEV when doing a cross quota realms rename. URL: https://tracker.ceph.com/issues/48203 Signed-off-by: Luis Henriques Reviewed-by: Jeff Layton Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit 68cbb8056a4c24c6a38ad2b79e0a9764b235e8fa Author: Jeff Layton Date: Thu Nov 12 09:37:59 2020 -0500 ceph: fix inode refcount leak when ceph_fill_inode on non-I_NEW inode fails Signed-off-by: Jeff Layton Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit ccd1acdf1c49b835504b235461fd24e2ed826764 Author: Luis Henriques Date: Thu Nov 12 11:25:32 2020 +0000 ceph: downgrade warning from mdsmap decode to debug While the MDS cluster is unstable and changing state the client may get mdsmap updates that will trigger warnings: [144692.478400] ceph: mdsmap_decode got incorrect state(up:standby-replay) [144697.489552] ceph: mdsmap_decode got incorrect state(up:standby-replay) [144697.489580] ceph: mdsmap_decode got incorrect state(up:standby-replay) This patch downgrades these warnings to debug, as they may flood the logs if the cluster is unstable for a while. Signed-off-by: Luis Henriques Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit e5cafce3ad0f8652d6849314d951459c2bff7233 Author: Luis Henriques Date: Thu Nov 12 10:45:12 2020 +0000 ceph: fix race in concurrent __ceph_remove_cap invocations A NULL pointer dereference may occur in __ceph_remove_cap with some of the callbacks used in ceph_iterate_session_caps, namely trim_caps_cb and remove_session_caps_cb. Those callers hold the session->s_mutex, so they are prevented from concurrent execution, but ceph_evict_inode does not. Since the callers of this function hold the i_ceph_lock, the fix is simply a matter of returning immediately if caps->ci is NULL. Cc: stable@vger.kernel.org URL: https://tracker.ceph.com/issues/43272 Suggested-by: Jeff Layton Signed-off-by: Luis Henriques Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 4a357f5069428afc7c48cb4bdc95c864b7a5c862 Author: Jeff Layton Date: Tue Nov 10 16:24:40 2020 -0500 ceph: pass down the flags to grab_cache_page_write_begin write_begin operations are passed a flags parameter that we need to mirror here, so that we don't (e.g.) recurse back into filesystem code inappropriately. Signed-off-by: Jeff Layton Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit 5a9e2f5d5590fc70514083bd8771ec04de538387 Author: Xiubo Li Date: Wed Nov 11 09:29:40 2020 +0800 ceph: add ceph.{cluster_fsid/client_id} vxattrs These two vxattrs will only exist in local client side, with which we can easily know which mountpoint the file belongs to and also they can help locate the debugfs path quickly. URL: https://tracker.ceph.com/issues/48057 Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit 247b1f19dbeb4855cb891ca01428d7a81c1657a7 Author: Xiubo Li Date: Wed Nov 11 09:29:39 2020 +0800 ceph: add status debugfs file This will help list some useful client side info, like the client entity address/name and blocklisted status, etc. URL: https://tracker.ceph.com/issues/48057 Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 36c9478d6069994848c8897755b4380aa0a29dd3 Author: Liu, Changcheng Date: Tue Nov 10 21:20:08 2020 +0800 libceph: remove unused port macros 1. monitor's default port is defined by CEPH_MON_PORT 2. CEPH_PORT_START and CEPH_PORT_LAST are not needed. Signed-off-by: Changcheng Liu Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit 04fabb1199d1f995d6b9a1c42c046ac4bdac2d19 Author: Jeff Layton Date: Mon Nov 9 13:14:07 2020 -0500 ceph: ensure we have Fs caps when fetching dir link count The link count for a directory is defined as inode->i_subdirs + 2, (for "." and ".."). i_subdirs is only populated when Fs caps are held. Ensure we grab Fs caps when fetching the link count for a directory. [ idryomov: break unnecessarily long line ] URL: https://tracker.ceph.com/issues/48125 Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 8ba3b8c7fba4631a6689d976264067b446af4c1e Author: Xiubo Li Date: Thu Nov 5 23:30:21 2020 -0500 ceph: send dentry lease metrics to MDS daemon For the old ceph version, if it received this one metric message containing the dentry lease metric info, it will just ignore it. URL: https://tracker.ceph.com/issues/43423 Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 81048c00d133512e4b4a848b0653d782a83e5911 Author: Jeff Layton Date: Tue Nov 3 14:00:26 2020 -0500 ceph: acquire Fs caps when getting dir stats We only update the inode's dirstats when we have Fs caps from the MDS. Declare a new VXATTR_FLAG_DIRSTAT that we set on all dirstats, and have the vxattr handling code acquire those caps when it's set. URL: https://tracker.ceph.com/issues/48104 Signed-off-by: Jeff Layton Reviewed-by: Patrick Donnelly Reviewed-by: Xiubo Li Signed-off-by: Ilya Dryomov commit 06a1ad438b7b8d4fd689114a305b37cb526ff638 Author: Jeff Layton Date: Tue Sep 29 19:32:19 2020 -0400 ceph: fix up some warnings on W=1 builds Convert some decodes into unused variables into skips, and fix up some non-kerneldoc comment headers to not start with "/**". Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 4ae3713fe45a289f37c479412a991bc51c502013 Author: Jeff Layton Date: Mon Sep 21 13:12:53 2020 -0400 ceph: queue MDS requests to REJECTED sessions when CLEANRECOVER is set Ilya noticed that the first access to a blacklisted mount would often get back -EACCES, but then subsequent calls would be OK. The problem is in __do_request. If the session is marked as REJECTED, a hard error is returned instead of waiting for a new session to come into being. When the session is REJECTED and the mount was done with recover_session=clean, queue the request to the waiting_for_map queue, which will be awoken after tearing down the old session. We can only do this for sync requests though, so check for async ones first and just let the callers redrive a sync request. URL: https://tracker.ceph.com/issues/47385 Reported-by: Ilya Dryomov Signed-off-by: Jeff Layton Reviewed-by: Xiubo Li Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov commit dbeec07bc84f8229322d7919692a17adae1e388e Author: Jeff Layton Date: Fri Sep 25 09:07:49 2020 -0400 ceph: remove timeout on allowing reconnect after blocklisting 30 minutes is a long time to wait, and this makes it difficult to test the feature by manually blocklisting clients. Remove the timeout infrastructure and just allow the client to reconnect at will. Signed-off-by: Jeff Layton Reviewed-by: Xiubo Li Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov commit 50c9132ddfb2024e96900407beeec660cf9848bd Author: Jeff Layton Date: Fri Sep 25 07:55:39 2020 -0400 ceph: add new RECOVER mount_state when recovering session When recovering a session (a'la recover_session=clean), we want to do all of the operations that we do on a forced umount, but changing the mount state to SHUTDOWN is can cause queued MDS requests to fail when the session comes back. Most of those can idle until the session is recovered in this situation. Reserve SHUTDOWN state for forced umount, and make a new RECOVER state for the forced reconnect situation. Change several tests for equality with SHUTDOWN to test for that or RECOVER. Signed-off-by: Jeff Layton Reviewed-by: Xiubo Li Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov commit aa5c791053c7deecded06f6525fc6e917cb2061b Author: Jeff Layton Date: Tue Oct 6 08:38:20 2020 -0400 ceph: make fsc->mount_state an int This field is an unsigned long currently, which is a bit of a waste on most arches since this just holds an enum. Make it (signed) int instead. Signed-off-by: Jeff Layton Reviewed-by: Xiubo Li Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov commit dc167e38a014e04e4484b969ee05765232249b0d Author: Jeff Layton Date: Fri Sep 25 09:27:09 2020 -0400 ceph: don't WARN when removing caps due to blocklisting We expect to remove dirty caps when the client is blocklisted. Don't throw a warning in that case. [ idryomov: break unnecessarily long line ] Signed-off-by: Jeff Layton Reviewed-by: Xiubo Li Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov commit e33dc2f3636749c2f949a59c2ff8acd4a69c9c78 Author: Lukasz Luba Date: Wed Dec 9 11:51:43 2020 +0000 dt-bindings: mali-bifrost: Add dynamic-power-coefficient Add a property dynamic-power-coefficient which allows to register Energy Model for the Mali Bifrost devices. Signed-off-by: Lukasz Luba Link: https://lore.kernel.org/r/20201209115143.15321-3-lukasz.luba@arm.com Signed-off-by: Rob Herring commit 23dd6845c2cfc2f4aabe6d21a6ed013e0927bf89 Author: Lukasz Luba Date: Wed Dec 9 11:51:42 2020 +0000 dt-bindings: mali-midgard: Add dynamic-power-coefficient Add a property dynamic-power-coefficient which allows to register Energy Model for the Mali Midgard devices. Signed-off-by: Lukasz Luba Link: https://lore.kernel.org/r/20201209115143.15321-2-lukasz.luba@arm.com Signed-off-by: Rob Herring commit 84292fffc2468125632a21c09533a89426ea212e Merge: 8ba27ae36b416 2838307b019df Author: Linus Torvalds Date: Mon Dec 14 13:54:50 2020 -0800 Merge tag 'x86_build_for_v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 build updates from Borislav Petkov: "Two x86 build fixes: - Fix the vmlinux size check on 64-bit along with adding useful clarifications on the topic (Arvind Sankar) - Remove -m16 workaround now that the GCC versions that need it are unsupported (Nick Desaulniers)" * tag 'x86_build_for_v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/build: Remove -m16 workaround for unsupported versions of GCC x86/build: Fix vmlinux size check on 64-bit commit 8ba27ae36b416a1507e783dbee4bb521fd6bb519 Merge: 405f868f13daf 19eb86a72df50 Author: Linus Torvalds Date: Mon Dec 14 13:53:17 2020 -0800 Merge tag 'x86_cache_for_v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cache resource control updates from Borislav Petkov: - add logic to correct MBM total and local values fixing errata SKX99 and BDF102 (Fenghua Yu) - cleanups * tag 'x86_cache_for_v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/resctrl: Clean up unused function parameter in rmdir path x86/resctrl: Constify kernfs_ops x86/resctrl: Correct MBM total and local values Documentation/x86: Rename resctrl_ui.rst and add two errata to the file commit 405f868f13daf7bae85e6fec143121c27d52cdb4 Merge: 54d794830f4dd 9a02fd8b19247 Author: Linus Torvalds Date: Mon Dec 14 13:45:26 2020 -0800 Merge tag 'x86_cleanups_for_v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cleanups from Borislav Petkov: "Another branch with a nicely negative diffstat, just the way I like 'em: - Remove all uses of TIF_IA32 and TIF_X32 and reclaim the two bits in the end (Gabriel Krisman Bertazi) - All kinds of minor cleanups all over the tree" * tag 'x86_cleanups_for_v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (24 commits) x86/ia32_signal: Propagate __user annotation properly x86/alternative: Update text_poke_bp() kernel-doc comment x86/PCI: Make a kernel-doc comment a normal one x86/asm: Drop unused RDPID macro x86/boot/compressed/64: Use TEST %reg,%reg instead of CMP $0,%reg x86/head64: Remove duplicate include x86/mm: Declare 'start' variable where it is used x86/head/64: Remove unused GET_CR2_INTO() macro x86/boot: Remove unused finalize_identity_maps() x86/uaccess: Document copy_from_user_nmi() x86/dumpstack: Make show_trace_log_lvl() static x86/mtrr: Fix a kernel-doc markup x86/setup: Remove unused MCA variables x86, libnvdimm/test: Remove COPY_MC_TEST x86: Reclaim TIF_IA32 and TIF_X32 x86/mm: Convert mmu context ia32_compat into a proper flags field x86/elf: Use e_machine to check for x32/ia32 in setup_additional_pages() elf: Expose ELF header on arch_setup_additional_pages() x86/elf: Use e_machine to select start_thread for x32 elf: Expose ELF header in compat_start_thread() ... commit 54d794830f4dd6caf688be3cc802e165952c4079 Merge: 9c70f04678750 1fcd009102ee0 Author: Linus Torvalds Date: Mon Dec 14 13:31:31 2020 -0800 Merge tag 'x86_mm_for_v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 mm update from Borislav Petkov: "A single improvement to check ident_pud_init()'s return value (Arvind Sankar)" * tag 'x86_mm_for_v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm/ident_map: Check for errors from ident_pud_init() commit 9c70f046787505127f2f8bb60ad24bb3c8bfc61a Merge: ae1c1a8fd9c3f f77f420d34754 Author: Linus Torvalds Date: Mon Dec 14 13:29:34 2020 -0800 Merge tag 'x86_misc_for_v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull misc x86 updates from Borislav Petkov: "The main part of this branch is the ongoing fight against windmills in an attempt to have userspace tools not poke at naked MSRs. This round deals with MSR_IA32_ENERGY_PERF_BIAS and removes direct poking into it by our in-tree tools in favor of the proper "energy_perf_bias" sysfs interface which we already have. In addition, the msr.ko write filtering's error message points to a new summary page which contains the info we collected from helpful reporters about which userspace tools write MSRs: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/about along with the current status of their conversion. The rest is the usual small fixes and improvements" * tag 'x86_misc_for_v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/msr: Add a pointer to an URL which contains further details x86/pci: Fix the function type for check_reserved_t selftests/x86: Add missing .note.GNU-stack sections selftests/x86/fsgsbase: Fix GS == 1, 2, and 3 tests x86/msr: Downgrade unrecognized MSR message x86/msr: Do not allow writes to MSR_IA32_ENERGY_PERF_BIAS tools/power/x86_energy_perf_policy: Read energy_perf_bias from sysfs tools/power/turbostat: Read energy_perf_bias from sysfs tools/power/cpupower: Read energy_perf_bias from sysfs MAINTAINERS: Cleanup SGI-related entries commit ae1c1a8fd9c3f504b390df26b4af8ef6bfde005e Merge: 0d712978dcdd9 c9624cb7db1c4 Author: Linus Torvalds Date: Mon Dec 14 13:27:53 2020 -0800 Merge tag 'x86_platform_for_v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 platform updates from Borislav Petkov: - add a new uv_sysfs driver and expose read-only information from UV BIOS (Justin Ernst and Mike Travis) - the usual set of small fixes * tag 'x86_platform_for_v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/platform/uv: Update sysfs documentation x86/platform/uv: Add deprecated messages to /proc info leaves x86/platform/uv: Add sysfs hubless leaves x86/platform/uv: Add sysfs leaves to replace those in procfs x86/platform/uv: Add kernel interfaces for obtaining system info x86/platform/uv: Make uv_pcibus_kset and uv_hubs_kset static x86/platform/uv: Fix an error code in uv_hubs_init() x86/platform/uv: Update MAINTAINERS for uv_sysfs driver x86/platform/uv: Update ABI documentation of /sys/firmware/sgi_uv/ x86/platform/uv: Add new uv_sysfs platform driver x86/platform/uv: Add and export uv_bios_* functions x86/platform/uv: Remove existing /sys/firmware/sgi_uv/ interface commit 0d712978dcdd9c4fb2c4e4ef7700ee755184f11d Merge: 5583ff677b310 262bd5724afde Author: Linus Torvalds Date: Mon Dec 14 13:21:33 2020 -0800 Merge tag 'x86_cpu_for_v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cpuid updates from Borislav Petkov: "Only AMD-specific changes this time: - Save the AMD physical die ID into cpuinfo_x86.cpu_die_id and convert all code to use it (Yazen Ghannam) - Remove a dead and unused TSEG region remapping workaround on AMD (Arvind Sankar)" * tag 'x86_cpu_for_v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/cpu/amd: Remove dead code for TSEG region remapping x86/topology: Set cpu_die_id only if DIE_TYPE found EDAC/mce_amd: Use struct cpuinfo_x86.cpu_die_id for AMD NodeId x86/CPU/AMD: Remove amd_get_nb_id() x86/CPU/AMD: Save AMD NodeId as cpu_die_id commit 5583ff677b3108cde989b6d4fd1958e091420c0c Merge: 85fe40cad2dae a4b9c48b96517 Author: Linus Torvalds Date: Mon Dec 14 13:14:57 2020 -0800 Merge tag 'x86_sgx_for_v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 SGC support from Borislav Petkov: "Intel Software Guard eXtensions enablement. This has been long in the making, we were one revision number short of 42. :) Intel SGX is new hardware functionality that can be used by applications to populate protected regions of user code and data called enclaves. Once activated, the new hardware protects enclave code and data from outside access and modification. Enclaves provide a place to store secrets and process data with those secrets. SGX has been used, for example, to decrypt video without exposing the decryption keys to nosy debuggers that might be used to subvert DRM. Software has generally been rewritten specifically to run in enclaves, but there are also projects that try to run limited unmodified software in enclaves. Most of the functionality is concentrated into arch/x86/kernel/cpu/sgx/ except the addition of a new mprotect() hook to control enclave page permissions and support for vDSO exceptions fixup which will is used by SGX enclaves. All this work by Sean Christopherson, Jarkko Sakkinen and many others" * tag 'x86_sgx_for_v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (30 commits) x86/sgx: Return -EINVAL on a zero length buffer in sgx_ioc_enclave_add_pages() x86/sgx: Fix a typo in kernel-doc markup x86/sgx: Fix sgx_ioc_enclave_provision() kernel-doc comment x86/sgx: Return -ERESTARTSYS in sgx_ioc_enclave_add_pages() selftests/sgx: Use a statically generated 3072-bit RSA key x86/sgx: Clarify 'laundry_list' locking x86/sgx: Update MAINTAINERS Documentation/x86: Document SGX kernel architecture x86/sgx: Add ptrace() support for the SGX driver x86/sgx: Add a page reclaimer selftests/x86: Add a selftest for SGX x86/vdso: Implement a vDSO for Intel SGX enclave call x86/traps: Attempt to fixup exceptions in vDSO before signaling x86/fault: Add a helper function to sanitize error code x86/vdso: Add support for exception fixup in vDSO functions x86/sgx: Add SGX_IOC_ENCLAVE_PROVISION x86/sgx: Add SGX_IOC_ENCLAVE_INIT x86/sgx: Add SGX_IOC_ENCLAVE_ADD_PAGES x86/sgx: Add SGX_IOC_ENCLAVE_CREATE x86/sgx: Add an SGX misc driver interface ... commit 85fe40cad2dae9e0439ea6f92fde9c5e9c58f09b Merge: 2b34233ce20b6 880396c86a1f3 Author: Linus Torvalds Date: Mon Dec 14 13:13:15 2020 -0800 Merge tag 'x86_microcode_update_for_v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 microcode loader update from Borislav Petkov: "This one wins the award for most boring pull request ever. But that's a good thing - this is how I like 'em and the microcode loader *should* be boring. :-) A single cleanup removing "break" after a return statement (Tom Rix)" * tag 'x86_microcode_update_for_v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/microcode/amd: Remove unneeded break commit 2b34233ce20b6a2f364c3245cd9421ecabddccdc Merge: 9e7f25886bdf1 e1c06d2366e74 Author: Linus Torvalds Date: Mon Dec 14 13:00:10 2020 -0800 Merge tag 'ras_updates_for_v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 RAS updates from Borislav Petkov: - Enable additional logging mode on older Xeons (Tony Luck) - Pass error records logged by firmware through the MCE decoding chain to provide human-readable error descriptions instead of raw values (Smita Koralahalli) - Some #MC handler fixes (Gabriele Paoloni) - The usual small fixes and cleanups all over. * tag 'ras_updates_for_v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mce: Rename kill_it to kill_current_task x86/mce: Remove redundant call to irq_work_queue() x86/mce: Panic for LMCE only if mca_cfg.tolerant < 3 x86/mce: Move the mce_panic() call and 'kill_it' assignments to the right places x86/mce, cper: Pass x86 CPER through the MCA handling chain x86/mce: Use "safe" MSR functions when enabling additional error logging x86/mce: Correct the detection of invalid notifier priorities x86/mce: Assign boolean values to a bool variable x86/mce: Enable additional error logging on certain Intel CPUs x86/mce: Remove unneeded break commit 9e7f25886bdf16679d3d72624003bef5ef7dc785 Merge: 9e4b0d55d84a6 f84b799996e29 Author: Linus Torvalds Date: Mon Dec 14 12:55:35 2020 -0800 Merge tag 'edac_updates_for_v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras Pull EDAC updates from Borislav Petkov: "Somewhat busier than usual this cycle: - Add support for AST2400 and AST2600 hw to aspeed_edac (Troy Lee) - Remove an orphaned mv64x60_edac driver. Good riddance (Michael Ellerman) - Add a new igen6 driver for Intel client SoCs with an integrated memory controller and using in-band ECC (Qiuxu Zhuo and Tony Luck) - The usual smattering of fixes and cleanups all over" * tag 'edac_updates_for_v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras: EDAC/mv64x60: Remove orphan mv64x60 driver EDAC/aspeed: Add support for AST2400 and AST2600 ARM: dts: aspeed: Add AST2600 EDAC into common devicetree dt-bindings: edac: aspeed-sdram-edac: Add ast2400/ast2600 support EDAC/amd64: Fix PCI component registration EDAC/igen6: ecclog_llist can be static EDAC/i10nm: Add Intel Sapphire Rapids server support EDAC: Add DDR5 new memory type EDAC/i10nm: Use readl() to access MMIO registers MAINTAINERS: Add entry for Intel IGEN6 EDAC driver EDAC/igen6: Add debugfs interface for Intel client SoC EDAC driver EDAC/igen6: Add EDAC driver for Intel client SoCs using IBECC EDAC/synopsys: Return the correct value in mc_probe() MAINTAINERS: Clean up the F: entries for some EDAC drivers EDAC: Add three new memory types EDAC: Fix some kernel-doc markups EDAC: Do not issue useless debug statements in the polling routine EDAC/amd64: Remove unneeded breaks commit b4b638c36b7e7acd847b9c4b9c80f268e45ea30c Author: Yonghong Song Date: Wed Dec 9 17:33:50 2020 -0800 selftests/bpf: Add a test for ptr_to_map_value on stack for helper access Change bpf_iter_task.c such that pointer to map_value may appear on the stack for bpf_seq_printf() to access. Without previous verifier patch, the bpf_iter test will fail. Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20201210013350.943985-1-yhs@fb.com commit cd17d38f8b28f808c368121041c0a4fa91757e0d Author: Yonghong Song Date: Wed Dec 9 17:33:49 2020 -0800 bpf: Permits pointers on stack for helper calls Currently, when checking stack memory accessed by helper calls, for spills, only PTR_TO_BTF_ID and SCALAR_VALUE are allowed. Song discovered an issue where the below bpf program int dump_task(struct bpf_iter__task *ctx) { struct seq_file *seq = ctx->meta->seq; static char[] info = "abc"; BPF_SEQ_PRINTF(seq, "%s\n", info); return 0; } may cause a verifier failure. The verifier output looks like: ; struct seq_file *seq = ctx->meta->seq; 1: (79) r1 = *(u64 *)(r1 +0) ; BPF_SEQ_PRINTF(seq, "%s\n", info); 2: (18) r2 = 0xffff9054400f6000 4: (7b) *(u64 *)(r10 -8) = r2 5: (bf) r4 = r10 ; 6: (07) r4 += -8 ; BPF_SEQ_PRINTF(seq, "%s\n", info); 7: (18) r2 = 0xffff9054400fe000 9: (b4) w3 = 4 10: (b4) w5 = 8 11: (85) call bpf_seq_printf#126 R1_w=ptr_seq_file(id=0,off=0,imm=0) R2_w=map_value(id=0,off=0,ks=4,vs=4,imm=0) R3_w=inv4 R4_w=fp-8 R5_w=inv8 R10=fp0 fp-8_w=map_value last_idx 11 first_idx 0 regs=8 stack=0 before 10: (b4) w5 = 8 regs=8 stack=0 before 9: (b4) w3 = 4 invalid indirect read from stack off -8+0 size 8 Basically, the verifier complains the map_value pointer at "fp-8" location. To fix the issue, if env->allow_ptr_leaks is true, let us also permit pointers on the stack to be accessible by the helper. Reported-by: Song Liu Suggested-by: Alexei Starovoitov Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20201210013349.943719-1-yhs@fb.com commit 9e4b0d55d84a66dbfede56890501dc96e696059c Merge: 51895d58c7c0c 93cebeb1c21a6 Author: Linus Torvalds Date: Mon Dec 14 12:18:19 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: - Add speed testing on 1420-byte blocks for networking Algorithms: - Improve performance of chacha on ARM for network packets - Improve performance of aegis128 on ARM for network packets Drivers: - Add support for Keem Bay OCS AES/SM4 - Add support for QAT 4xxx devices - Enable crypto-engine retry mechanism in caam - Enable support for crypto engine on sdm845 in qce - Add HiSilicon PRNG driver support" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (161 commits) crypto: qat - add capability detection logic in qat_4xxx crypto: qat - add AES-XTS support for QAT GEN4 devices crypto: qat - add AES-CTR support for QAT GEN4 devices crypto: atmel-i2c - select CONFIG_BITREVERSE crypto: hisilicon/trng - replace atomic_add_return() crypto: keembay - Add support for Keem Bay OCS AES/SM4 dt-bindings: Add Keem Bay OCS AES bindings crypto: aegis128 - avoid spurious references crypto_aegis128_update_simd crypto: seed - remove trailing semicolon in macro definition crypto: x86/poly1305 - Use TEST %reg,%reg instead of CMP $0,%reg crypto: x86/sha512 - Use TEST %reg,%reg instead of CMP $0,%reg crypto: aesni - Use TEST %reg,%reg instead of CMP $0,%reg crypto: cpt - Fix sparse warnings in cptpf hwrng: ks-sa - Add dependency on IOMEM and OF crypto: lib/blake2s - Move selftest prototype into header file crypto: arm/aes-ce - work around Cortex-A57/A72 silion errata crypto: ecdh - avoid unaligned accesses in ecdh_set_secret() crypto: ccree - rework cache parameters handling crypto: cavium - Use dma_set_mask_and_coherent to simplify code crypto: marvell/octeontx - Use dma_set_mask_and_coherent to simplify code ... commit 1fb1abc83636f5329c26cd29f0f19f3faeb697a5 Author: Johannes Berg Date: Mon Dec 14 20:51:02 2020 +0100 um: Fix build w/o CONFIG_PM_SLEEP uml_pm_wake() is unconditionally called from the SIGUSR1 wakeup handler since that's in the userspace portion of UML, and thus a bit tricky to ifdef out. Since pm_system_wakeup() can always be called (but may be an empty inline), also simply always have uml_pm_wake() to fix the build. Reported-by: Randy Dunlap Acked-by: Randy Dunlap # build-tested Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger commit 47e44ed01434e51e2e42b188482d837c01e5d16e Author: Jonathan Corbet Date: Mon Dec 14 13:14:22 2020 -0700 docs: fix broken cross reference in translations/zh_CN Commit 09028e60fcea ("doc: zh_CN: add translatation for tmpfs") introduced a cross reference without adding the appropriate target tag, leading to this docs-build warning: Documentation/translations/zh_CN/filesystems/tmpfs.rst:5: WARNING: undefined label: tmpfs_index (if the link has no caption the label must precede a section header) With automarkup, we don't actually need an explicit reference here at all, so just take it out. Reported-by: Stephen Rothwell Fixes: 09028e60fcea ("doc: zh_CN: add translatation for tmpfs") Signed-off-by: Jonathan Corbet commit 51895d58c7c0c65afac21570cc14a7189942959a Merge: 7c7fdaf6ad9fe bde493349025c Author: Linus Torvalds Date: Mon Dec 14 12:10:32 2020 -0800 Merge tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt Pull fsverity updates from Eric Biggers: "Some cleanups for fs-verity: - Rename some names that have been causing confusion - Move structs needed for file signing to the UAPI header" * tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt: fs-verity: move structs needed for file signing to UAPI header fs-verity: rename "file measurement" to "file digest" fs-verity: rename fsverity_signed_digest to fsverity_formatted_digest fs-verity: remove filenames from file comments commit 95e3d610d35c9c5b51e12c5c8ac18061ae08cf97 Author: Christian König Date: Wed Nov 25 15:32:23 2020 +0100 drm/radeon: fix check order in radeon_bo_move Reorder the code to fix checking if blitting is available. Signed-off-by: Christian König Fixes: 28a68f828266 ("drm/radeon/ttm: use multihop") Reviewed-by: Daniel Vetter Reviewed-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/403847/ commit 7c7fdaf6ad9fe868553c2e1fc8a920249820ac3e Merge: da06285598714 a14d0b6764917 Author: Linus Torvalds Date: Mon Dec 14 12:06:54 2020 -0800 Merge tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt Pull fscrypt updates from Eric Biggers: "This release there are some fixes for longstanding problems, as well as some cleanups: - Fix a race condition where a duplicate filename could be created in an encrypted directory if a syscall that creates a new filename raced with the directory's encryption key being added. - Allow deleting files that use an unsupported encryption policy. - Simplify the locking for 'struct fscrypt_master_key'. - Remove kernel-internal constants from the UAPI header. As usual, all these patches have been in linux-next with no reported issues, and I've tested them with xfstests" * tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt: fscrypt: allow deleting files with unsupported encryption policy fscrypt: unexport fscrypt_get_encryption_info() fscrypt: move fscrypt_require_key() to fscrypt_private.h fscrypt: move body of fscrypt_prepare_setattr() out-of-line fscrypt: introduce fscrypt_prepare_readdir() ext4: don't call fscrypt_get_encryption_info() from dx_show_leaf() ubifs: remove ubifs_dir_open() f2fs: remove f2fs_dir_open() ext4: remove ext4_dir_open() fscrypt: simplify master key locking fscrypt: remove unnecessary calls to fscrypt_require_key() ubifs: prevent creating duplicate encrypted filenames f2fs: prevent creating duplicate encrypted filenames ext4: prevent creating duplicate encrypted filenames fscrypt: add fscrypt_is_nokey_name() fscrypt: remove kernel-internal constants from UAPI header commit da0628559871475b482f015dc24c9bef372936e4 Merge: fab0fca1da5cd 15269fb193108 Author: Linus Torvalds Date: Mon Dec 14 12:05:10 2020 -0800 Merge tag 'tomoyo-pr-20201214' of git://git.osdn.net/gitroot/tomoyo/tomoyo-test1 Pull tomoyo updates from Tetsuo Handa: "Limit recursion depth, fix clang warning, fix comment typo, and silence memory allocation failure warning" * tag 'tomoyo-pr-20201214' of git://git.osdn.net/gitroot/tomoyo/tomoyo-test1: tomoyo: Fix typo in comments. tomoyo: Fix null pointer check tomoyo: Limit wildcard recursion depth. tomoyo: fix clang pointer arithmetic warning tomoyo: Loosen pathname/domainname validation. commit fab0fca1da5cdc48be051715cd9787df04fdce3a Merge: ae1985b50afaf 7ea4d23293300 Author: Linus Torvalds Date: Mon Dec 14 11:47:37 2020 -0800 Merge tag 'media/v5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - some rework at the uAPI pixel format docs - the smiapp driver has started to gain support for MIPI CSS camera sensors and was renamed - two new sensor drivers: ov02a10 and ov9734 - Meson gained a driver for the 2D acceleration unit - Rockchip rkisp1 driver was promoted from staging - Cedrus driver gained support for VP8 - two new remote controller keymaps were added - the usual set of fixes cleanups and driver improvements * tag 'media/v5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (447 commits) media: ccs: Add support for obtaining C-PHY configuration from firmware media: ccs-pll: Print pixel rates media: ccs: Print written register values media: ccs: Add support for DDR OP SYS and OP PIX clocks media: ccs-pll: Add support for DDR OP system and pixel clocks media: ccs: Dual PLL support media: ccs-pll: Add trivial dual PLL support media: ccs-pll: Separate VT divisor limit calculation from the rest media: ccs-pll: Fix VT post-PLL divisor calculation media: ccs-pll: Make VT divisors 16-bit media: ccs-pll: Rework bounds checks media: ccs-pll: Print relevant information on PLL tree media: ccs-pll: Better separate OP and VT sub-tree calculation media: ccs-pll: Check for derating and overrating, support non-derating sensors media: ccs-pll: Split off VT subtree calculation media: ccs-pll: Add C-PHY support media: ccs-pll: Add sanity checks media: ccs-pll: Add support flexible OP PLL pixel clock divider media: ccs-pll: Support two cycles per pixel on OP domain media: ccs-pll: Add support for extended input PLL clock divider ... commit 5c4b642141eb3576213ab59d06ba12e1fa989046 Author: Ronnie Sahlberg Date: Mon Dec 14 16:40:27 2020 +1000 cifs: fix uninitialized variable in smb3_fs_context_parse_param Addresses an issue noted by the kernel test robot Reported-by: kernel test robot Signed-off-by: Steve French Signed-off-by: Ronnie Sahlberg commit 1cb6c3d62ca9cfdb103470e7eb60c332475b186f Author: Ronnie Sahlberg Date: Mon Dec 14 16:40:26 2020 +1000 cifs: update mnt_cifs_flags during reconfigure Many mount flags (e.g. for noperm, noxattr, nobrl, cifsacl, mfsymlinks and more) can be updated now. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 30c768829af2574a2f60ca85c4cc3ba2ed8d0e58 Merge: b96f038432362 c8bb452054382 Author: Rafael J. Wysocki Date: Mon Dec 14 20:29:50 2020 +0100 Merge branch 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull ARM cpufreq updates for 5.11-rc1 from Viresh Kumar: "This contains the following updates: - Fix imx's NVMEM_IMX_OCOTP dependency (Arnd Bergmann). - Add support for mt8167 and blacklist mt8516 (Fabien Parent). - Some ->get() callback related cleanups to the tegra194 driver and some optimizations in tegra186 driver (Jon Hunter and Sumit Gupta). - Power scale improvements to arm_scmi driver (Lukasz Luba). - Add missing MODULE_DEVICE_TABLE and MODULE_ALIAS to several drivers (Pali Rohár). - Fix error path in mediatek driver (Qinglang Miao). - Fix memleak in ST's cpufreq driver (Yangtao Li)." * 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: (22 commits) cpufreq: arm_scmi: Discover the power scale in performance protocol firmware: arm_scmi: Add power_scale_mw_get() interface cpufreq: tegra194: Rename tegra194_get_speed_common function cpufreq: tegra194: Remove unnecessary frequency calculation cpufreq: tegra186: Simplify cluster information lookup cpufreq: tegra186: Fix sparse 'incorrect type in assignment' warning cpufreq: imx: fix NVMEM_IMX_OCOTP dependency cpufreq: vexpress-spc: Add missing MODULE_ALIAS cpufreq: scpi: Add missing MODULE_ALIAS cpufreq: loongson1: Add missing MODULE_ALIAS cpufreq: sun50i: Add missing MODULE_DEVICE_TABLE cpufreq: st: Add missing MODULE_DEVICE_TABLE cpufreq: qcom: Add missing MODULE_DEVICE_TABLE cpufreq: mediatek: Add missing MODULE_DEVICE_TABLE cpufreq: highbank: Add missing MODULE_DEVICE_TABLE cpufreq: ap806: Add missing MODULE_DEVICE_TABLE cpufreq: mediatek: add missing platform_driver_unregister() on error in mtk_cpufreq_driver_init cpufreq: tegra194: get consistent cpuinfo_cur_freq cpufreq: blacklist mt8516 in cpufreq-dt-platdev cpufreq: mediatek: Add support for mt8167 ... commit ae1985b50afaf76aaa09946ee36b59eaecb2ffae Merge: bcc68bd816126 0941e3b0653fe Author: Linus Torvalds Date: Mon Dec 14 11:27:46 2020 -0800 Merge tag 'for-5.11/revert-problem-v5.10-raid-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull MD regression reverts from Mike Snitzer: "A cascade of MD reverts occurred late in the v5.10-rcX cycle due to MD raid10 discard optimizations having introduced potential for corruption. Those reverts exposed a dm-raid.c compiler warning that wasn't ever knowingly introduced. That min_not_zero() type mismatch warning was thought to be safely fixed simply by changing 'struct mddev' to use 'unsigned int' rather than int for chunk_sectors members in that struct. I proposed either using a cast local to dm-raid.c but thought changing the type to 'unsigned int' more correct. While that may be, not enough testing was paired with code review associated with making that change. As such we were left exposed and the result was a report that with v5.10 btrfs on MD RAID6 failed to mount: https://lkml.org/lkml/2020/12/14/7 Given that report, it is justified to simply revert these offending commits. stable@ has already taken steps to revert these for 5.10.1 - this just makes sure mainline does so too" * tag 'for-5.11/revert-problem-v5.10-raid-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: Revert "dm raid: fix discard limits for raid1 and raid10" Revert "md: change mddev 'chunk_sectors' from int to unsigned" commit f0f6dbaf06f4329dbd07594ffcd55edf27ee4b45 Merge: 0477e92881850 2c07b0fd9bf6d Author: Rafael J. Wysocki Date: Mon Dec 14 20:26:17 2020 +0100 Merge branch 'opp/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull OPP (Operating Performance Points) updates for 5.11-rc1 from Viresh Kumar: "This contains the following updates: - Allow empty (node-less) OPP tables in DT for passing just the dependency related information (Nicola Mazzucato). - Fix a potential lockdep in OPP core and other OPP core cleanups (Viresh Kumar). - Don't abuse dev_pm_opp_get_opp_table() to create an OPP table, fix cpufreq-dt driver for the same (Viresh Kumar). - dev_pm_opp_put_regulators() accepts a NULL argument now, updates to all the users as well (Viresh Kumar)." * 'opp/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: opp: of: Allow empty opp-table with opp-shared dt-bindings: opp: Allow empty OPP tables media: venus: dev_pm_opp_put_*() accepts NULL argument drm/panfrost: dev_pm_opp_put_*() accepts NULL argument drm/lima: dev_pm_opp_put_*() accepts NULL argument PM / devfreq: exynos: dev_pm_opp_put_*() accepts NULL argument cpufreq: qcom-cpufreq-nvmem: dev_pm_opp_put_*() accepts NULL argument cpufreq: dt: dev_pm_opp_put_regulators() accepts NULL argument opp: Allow dev_pm_opp_put_*() APIs to accept NULL opp_table opp: Don't create an OPP table from dev_pm_opp_get_opp_table() cpufreq: dt: Don't (ab)use dev_pm_opp_get_opp_table() to create OPP table opp: Reduce the size of critical section in _opp_kref_release() opp: Don't return opp_dev from _find_opp_dev() opp: Allocate the OPP table outside of opp_table_lock opp: Always add entries in dev_list with opp_table->lock held commit bcc68bd8161261ceeb1a4ab02b5265758944f90d Merge: 1d36dffa5d887 351dcacc6d774 Author: Linus Torvalds Date: Mon Dec 14 11:25:18 2020 -0800 Merge tag 'auxdisplay-for-linus-v5.11' of git://github.com/ojeda/linux Pull auxdisplay updates from Miguel Ojeda: "A bigger set of changes than usual for auxdisplay. There have been quite a few changes in auxdisplay thanks to a refactor by Lars Poeschel to share code in order to introduce a new driver. Summary: - Significant refactor work to make charlcd independent of device, i.e. hd44780 (Lars Poeschel) - New driver: lcd2s (Lars Poeschel) - Fixes on top of the rework while being tested in -next (Lars Poeschel, Dan Carpenter and kernel test robot)" * tag 'auxdisplay-for-linus-v5.11' of git://github.com/ojeda/linux: (30 commits) auxdisplay: panel: Remove redundant charlcd_ops structures auxdisplay: panel: Fix missing print function pointer auxdisplay: fix platform_no_drv_owner.cocci warnings auxdisplay: fix use after free in lcd2s_i2c_remove() auxdisplay: hd44780_common: Fix build error auxdisplay: add a driver for lcd2s character display auxdisplay: lcd2s DT binding doc auxdisplay: charlcd: Do not print chars at end of line auxdisplay: Change gotoxy calling interface auxdisplay: charlcd: replace last device specific stuff auxdisplay: hd44780: Remove clear_fast auxdisplay: hd44780_common: Reduce clear_display timeout auxdisplay: Call charlcd_backlight in place auxdisplay: Move char redefine code to hd44780_common auxdisplay: cleanup unnecessary hd44780 code in charlcd auxdisplay: implement various hd44780_common_ functions auxdisplay: Move init_display to hd44780_common auxdisplay: Make use of enum for backlight on / off auxdisplay: make charlcd_backlight visible to hd44780_common auxdisplay: Move clear_display to hd44780_common ... commit e246b7c035d74abfb3507fa10082d0c42cc016c3 Author: Leon Romanovsky Date: Sun Dec 13 15:29:39 2020 +0200 RDMA/cma: Don't overwrite sgid_attr after device is released As part of the cma_dev release, that pointer will be set to NULL. In case it happens in rdma_bind_addr() (part of an error flow), the next call to addr_handler() will have a call to cma_acquire_dev_by_src_ip() which will overwrite sgid_attr without releasing it. WARNING: CPU: 2 PID: 108 at drivers/infiniband/core/cma.c:606 cma_bind_sgid_attr drivers/infiniband/core/cma.c:606 [inline] WARNING: CPU: 2 PID: 108 at drivers/infiniband/core/cma.c:606 cma_acquire_dev_by_src_ip+0x470/0x4b0 drivers/infiniband/core/cma.c:649 CPU: 2 PID: 108 Comm: kworker/u8:1 Not tainted 5.10.0-rc6+ #257 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 Workqueue: ib_addr process_one_req RIP: 0010:cma_bind_sgid_attr drivers/infiniband/core/cma.c:606 [inline] RIP: 0010:cma_acquire_dev_by_src_ip+0x470/0x4b0 drivers/infiniband/core/cma.c:649 Code: 66 d9 4a ff 4d 8b 6e 10 49 8d bd 1c 08 00 00 e8 b6 d6 4a ff 45 0f b6 bd 1c 08 00 00 41 83 e7 01 e9 49 fd ff ff e8 90 c5 29 ff <0f> 0b e9 80 fe ff ff e8 84 c5 29 ff 4c 89 f7 e8 2c d9 4a ff 4d 8b RSP: 0018:ffff8881047c7b40 EFLAGS: 00010293 RAX: ffff888104789c80 RBX: 0000000000000001 RCX: ffffffff820b8ef8 RDX: 0000000000000000 RSI: ffffffff820b9080 RDI: ffff88810cd4c998 RBP: ffff8881047c7c08 R08: ffff888104789c80 R09: ffffed10209f4036 R10: ffff888104fa01ab R11: ffffed10209f4035 R12: ffff88810cd4c800 R13: ffff888105750e28 R14: ffff888108f0a100 R15: ffff88810cd4c998 FS: 0000000000000000(0000) GS:ffff888119c00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 0000000104e60005 CR4: 0000000000370ea0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: addr_handler+0x266/0x350 drivers/infiniband/core/cma.c:3190 process_one_req+0xa3/0x300 drivers/infiniband/core/addr.c:645 process_one_work+0x54c/0x930 kernel/workqueue.c:2272 worker_thread+0x82/0x830 kernel/workqueue.c:2418 kthread+0x1ca/0x220 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296 Fixes: ff11c6cd521f ("RDMA/cma: Introduce and use cma_acquire_dev_by_src_ip()") Link: https://lore.kernel.org/r/20201213132940.345554-5-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit e89938902927a54abebccc9537991aca5237dfaf Author: Maor Gottlieb Date: Sun Dec 13 15:29:36 2020 +0200 RDMA/mlx5: Fix MR cache memory leak If the MR cache entry invalidation failed, then we detach this entry from the cache, therefore we must to free the memory as well. Allcation backtrace for the leaker: [<00000000d8e423b0>] alloc_cache_mr+0x23/0xc0 [mlx5_ib] [<000000001f21304c>] create_cache_mr+0x3f/0xf0 [mlx5_ib] [<000000009d6b45dc>] mlx5_ib_alloc_implicit_mr+0x41/0×210 [mlx5_ib] [<00000000879d0d68>] mlx5_ib_reg_user_mr+0x9e/0×6e0 [mlx5_ib] [<00000000be74bf89>] create_qp+0x2fc/0xf00 [ib_uverbs] [<000000001a532d22>] ib_uverbs_handler_UVERBS_METHOD_COUNTERS_READ+0x1d9/0×230 [ib_uverbs] [<0000000070f46001>] rdma_alloc_commit_uobject+0xb5/0×120 [ib_uverbs] [<000000006d8a0b38>] uverbs_alloc+0x2b/0xf0 [ib_uverbs] [<00000000075217c9>] ksysioctl+0x234/0×7d0 [<00000000eb5c120b>] __x64_sys_ioctl+0x16/0×20 [<00000000db135b48>] do_syscall_64+0x59/0×2e0 Fixes: 1769c4c57548 ("RDMA/mlx5: Always remove MRs from the cache before destroying them") Link: https://lore.kernel.org/r/20201213132940.345554-2-leon@kernel.org Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 1d36dffa5d887715dacca0f717f4519b7be5e498 Merge: 2c85ebc57b3e1 b10733527bfd8 Author: Linus Torvalds Date: Mon Dec 14 11:07:56 2020 -0800 Merge tag 'drm-next-2020-12-11' of git://anongit.freedesktop.org/drm/drm Pull drm updates from Dave Airlie: "Not a huge amount of big things here, AMD has support for a few new HW variants (vangogh, green sardine, dimgrey cavefish), Intel has some more DG1 enablement. We have a few big reworks of the TTM layers and interfaces, GEM and atomic internal API reworks cross tree. fbdev is marked orphaned in here as well to reflect the current reality. core: - documentation updates - deprecate DRM_FORMAT_MOD_NONE - atomic crtc enable/disable rework - GEM convert drivers to gem object functions - remove SCATTER_LIST_MAX_SEGMENT sched: - avoid infinite waits ttm: - remove AGP support - don't modify caching for swapout - ttm pinning rework - major TTM reworks - new backend allocator - multihop support vram-helper: - top down BO placement fix - TTM changes - GEM object support displayport: - DP 2.0 DPCD prep work - DP MST extended DPCD caps fbdev: - mark as orphaned amdgpu: - Initial Vangogh support - Green Sardine support - Dimgrey Cavefish support - SG display support for renoir - SMU7 improvements - gfx9+ modiifier support - CI BACO fixes radeon: - expose voltage via hwmon on SUMO amdkfd: - fix unique id handling i915: - more DG1 enablement - bigjoiner support - integer scaling filter support - async flip support - ICL+ DSI command mode - Improve display shutdown - Display refactoring - eLLC machine fbdev loading fix - dma scatterlist fixes - TGL hang fixes - eLLC display buffer caching on SKL+ - MOCS PTE seeting for gen9+ msm: - Shutdown hook - GPU cooling device support - DSI 7nm and 10nm phy/pll updates - sm8150/sm2850 DPU support - GEM locking re-work - LLCC system cache support aspeed: - sysfs output config support ast: - LUT fix - new display mode gma500: - remove 2d framebuffer accel panfrost: - move gpu reset to a worker exynos: - new HDMI mode support mediatek: - MT8167 support - yaml bindings - MIPI DSI phy code moved etnaviv: - new perf counter - more lockdep annotation hibmc: - i2c DDC support ingenic: - pixel clock reset fix - reserved memory support - allow both DMA channels at once - different pixel format support - 30/24/8-bit palette modes tilcdc: - don't keep vblank irq enabled vc4: - new maintainer added - DSI registration fix virtio: - blob resource support - host visible and cross-device support - uuid api support" * tag 'drm-next-2020-12-11' of git://anongit.freedesktop.org/drm/drm: (1754 commits) drm/amdgpu: Initialise drm_gem_object_funcs for imported BOs drm/amdgpu: fix size calculation with stolen vga memory drm/amdgpu: remove amdgpu_ttm_late_init and amdgpu_bo_late_init drm/amdgpu: free the pre-OS console framebuffer after the first modeset drm/amdgpu: enable runtime pm using BACO on CI dGPUs drm/amdgpu/cik: enable BACO reset on Bonaire drm/amd/pm: update smu10.h WORKLOAD_PPLIB setting for raven drm/amd/pm: remove one unsupported smu function for vangogh drm/amd/display: setup system context for APUs drm/amd/display: add S/G support for Vangogh drm/amdkfd: Fix leak in dmabuf import drm/amdgpu: use AMDGPU_NUM_VMID when possible drm/amdgpu: fix sdma instance fw version and feature version init drm/amd/pm: update driver if version for dimgrey_cavefish drm/amd/display: 3.2.115 drm/amd/display: [FW Promotion] Release 0.0.45 drm/amd/display: Revert DCN2.1 dram_clock_change_latency update drm/amd/display: Enable gpu_vm_support for dcn3.01 drm/amd/display: Fixed the audio noise during mode switching with HDCP mode on drm/amd/display: Add wm table for Renoir ... commit a4d2a7ad86834092b327082004ead755d2603376 Author: Brendan Jackman Date: Mon Dec 14 11:38:12 2020 +0000 libbpf: Expose libbpf ring_buffer epoll_fd This provides a convenient perf ringbuf -> libbpf ringbuf migration path for users of external polling systems. It is analogous to perf_buffer__epoll_fd. Signed-off-by: Brendan Jackman Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201214113812.305274-1-jackmanb@google.com commit adab66b71abfe206a020f11e561f4df41f0b2aba Author: Steven Rostedt (VMware) Date: Mon Dec 14 12:33:51 2020 -0500 Revert: "ring-buffer: Remove HAVE_64BIT_ALIGNED_ACCESS" It was believed that metag was the only architecture that required the ring buffer to keep 8 byte words aligned on 8 byte architectures, and with its removal, it was assumed that the ring buffer code did not need to handle this case. It appears that sparc64 also requires this. The following was reported on a sparc64 boot up: kernel: futex hash table entries: 65536 (order: 9, 4194304 bytes, linear) kernel: Running postponed tracer tests: kernel: Testing tracer function: kernel: Kernel unaligned access at TPC[552a20] trace_function+0x40/0x140 kernel: Kernel unaligned access at TPC[552a24] trace_function+0x44/0x140 kernel: Kernel unaligned access at TPC[552a20] trace_function+0x40/0x140 kernel: Kernel unaligned access at TPC[552a24] trace_function+0x44/0x140 kernel: Kernel unaligned access at TPC[552a20] trace_function+0x40/0x140 kernel: PASSED Need to put back the 64BIT aligned code for the ring buffer. Link: https://lore.kernel.org/r/CADxRZqzXQRYgKc=y-KV=S_yHL+Y8Ay2mh5ezeZUnpRvg+syWKw@mail.gmail.com Cc: stable@vger.kernel.org Fixes: 86b3de60a0b6 ("ring-buffer: Remove HAVE_64BIT_ALIGNED_ACCESS") Reported-by: Anatoly Pugachev Signed-off-by: Steven Rostedt (VMware) commit f373a811fd9a69fc8bafb9bcb41d2cfa36c62665 Author: Dan Carpenter Date: Fri Dec 11 13:06:52 2020 +0300 ASoC: Intel: fix error code cnl_set_dsp_D0() Return -ETIMEDOUT if the dsp boot times out instead of returning success. Fixes: cb6a55284629 ("ASoC: Intel: cnl: Add sst library functions for cnl platform") Signed-off-by: Dan Carpenter Reviewed-by: Cezary Rojewski Link: https://lore.kernel.org/r/X9NEvCzuN+IObnTN@mwanda Signed-off-by: Mark Brown commit 74e2afc6df5782ea34bc7ac350aeb206c3666f9a Author: Qiujun Huang Date: Thu Oct 15 19:38:42 2020 +0800 ring-buffer: Add rb_check_bpage in __rb_allocate_pages It may be better to check each page is aligned by 4 bytes. The 2 least significant bits of the address will be used as flags. Link: https://lkml.kernel.org/r/20201015113842.2921-1-hqjagain@gmail.com Signed-off-by: Qiujun Huang Signed-off-by: Steven Rostedt (VMware) commit 82db909e6be667f2993802f3a1e86426cab57049 Author: Qiujun Huang Date: Wed Oct 14 23:27:49 2020 +0800 ring-buffer: Fix two typos in comments s/inerrupting/interrupting/ s/beween/between/ Link: https://lkml.kernel.org/r/20201014152749.29986-1-hqjagain@gmail.com Signed-off-by: Qiujun Huang Signed-off-by: Steven Rostedt (VMware) commit 0941e3b0653fef1ea68287f6a948c6c68a45c9ba Author: Mike Snitzer Date: Mon Dec 14 12:12:08 2020 -0500 Revert "dm raid: fix discard limits for raid1 and raid10" This reverts commit e0910c8e4f87bb9f767e61a778b0d9271c4dc512. Reverting 6ffeb1c3f822 ("md: change mddev 'chunk_sectors' from int to unsigned") exposes dm-raid.c compiler warnings detailed that commit's header. Clearly this more conservative fix, of simply reverting e0910c8e4f8, would've been more prudent given how late we were in the v5.10 release. Lessons have been learned. Signed-off-by: Mike Snitzer commit 3b3493531c4d415044442349c9d37ad48ad44c85 Author: Lukas Bulwahn Date: Mon Dec 14 09:45:03 2020 +0100 tracing: Drop unneeded assignment in ring_buffer_resize() Since commit 0a1754b2a97e ("ring-buffer: Return 0 on success from ring_buffer_resize()"), computing the size is not needed anymore. Drop unneeded assignment in ring_buffer_resize(). Link: https://lkml.kernel.org/r/20201214084503.3079-1-lukas.bulwahn@gmail.com Signed-off-by: Lukas Bulwahn Signed-off-by: Steven Rostedt (VMware) commit 77a68698ffe0f2f7f7b5fe9dac8fe36f855de3f7 Author: Mike Snitzer Date: Mon Dec 14 12:08:48 2020 -0500 Revert "md: change mddev 'chunk_sectors' from int to unsigned" This reverts commit 6ffeb1c3f8226244c08105bcdbeecc04bad6b89a. This change caused unexpected v5.10 raid6 mount failures, see: https://lkml.org/lkml/2020/12/14/7 Signed-off-by: Mike Snitzer commit 60efe21e5976d3d4170a8190ca76a271d6419754 Author: Masami Hiramatsu Date: Tue Dec 8 17:54:09 2020 +0900 tracing: Disable ftrace selftests when any tracer is running Disable ftrace selftests when any tracer (kernel command line options like ftrace=, trace_events=, kprobe_events=, and boot-time tracing) starts running because selftest can disturb it. Currently ftrace= and trace_events= are checked, but kprobe_events has a different flag, and boot-time tracing didn't checked. This unifies the disabled flag and all of those boot-time tracing features sets the flag. This also fixes warnings on kprobe-event selftest (CONFIG_FTRACE_STARTUP_TEST=y and CONFIG_KPROBE_EVENTS=y) with boot-time tracing (ftrace.event.kprobes.EVENT.probes) like below; [ 59.803496] trace_kprobe: Testing kprobe tracing: [ 59.804258] ------------[ cut here ]------------ [ 59.805682] WARNING: CPU: 3 PID: 1 at kernel/trace/trace_kprobe.c:1987 kprobe_trace_self_tests_ib [ 59.806944] Modules linked in: [ 59.807335] CPU: 3 PID: 1 Comm: swapper/0 Not tainted 5.10.0-rc7+ #172 [ 59.808029] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1 04/01/204 [ 59.808999] RIP: 0010:kprobe_trace_self_tests_init+0x5f/0x42b [ 59.809696] Code: e8 03 00 00 48 c7 c7 30 8e 07 82 e8 6d 3c 46 ff 48 c7 c6 00 b2 1a 81 48 c7 c7 7 [ 59.812439] RSP: 0018:ffffc90000013e78 EFLAGS: 00010282 [ 59.813038] RAX: 00000000ffffffef RBX: 0000000000000000 RCX: 0000000000049443 [ 59.813780] RDX: 0000000000049403 RSI: 0000000000049403 RDI: 000000000002deb0 [ 59.814589] RBP: ffffc90000013e90 R08: 0000000000000001 R09: 0000000000000001 [ 59.815349] R10: 0000000000000001 R11: 0000000000000000 R12: 00000000ffffffef [ 59.816138] R13: ffff888004613d80 R14: ffffffff82696940 R15: ffff888004429138 [ 59.816877] FS: 0000000000000000(0000) GS:ffff88807dcc0000(0000) knlGS:0000000000000000 [ 59.817772] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 59.818395] CR2: 0000000001a8dd38 CR3: 0000000002222000 CR4: 00000000000006a0 [ 59.819144] Call Trace: [ 59.819469] ? init_kprobe_trace+0x6b/0x6b [ 59.819948] do_one_initcall+0x5f/0x300 [ 59.820392] ? rcu_read_lock_sched_held+0x4f/0x80 [ 59.820916] kernel_init_freeable+0x22a/0x271 [ 59.821416] ? rest_init+0x241/0x241 [ 59.821841] kernel_init+0xe/0x10f [ 59.822251] ret_from_fork+0x22/0x30 [ 59.822683] irq event stamp: 16403349 [ 59.823121] hardirqs last enabled at (16403359): [] console_unlock+0x48e/0x580 [ 59.824074] hardirqs last disabled at (16403368): [] console_unlock+0x3f6/0x580 [ 59.825036] softirqs last enabled at (16403200): [] __do_softirq+0x33a/0x484 [ 59.825982] softirqs last disabled at (16403087): [] asm_call_irq_on_stack+0x10 [ 59.827034] ---[ end trace 200c544775cdfeb3 ]--- [ 59.827635] trace_kprobe: error on probing function entry. Link: https://lkml.kernel.org/r/160741764955.3448999.3347769358299456915.stgit@devnote2 Fixes: 4d655281eb1b ("tracing/boot Add kprobe event support") Cc: Ingo Molnar Cc: stable@vger.kernel.org Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 1c04d8c986567c27c56c05205dceadc92efb14ff Author: Tom Lendacky Date: Thu Dec 10 11:09:41 2020 -0600 KVM: x86: Mark GPRs dirty when written When performing VMGEXIT processing for an SEV-ES guest, register values will be synced between KVM and the GHCB. Prepare for detecting when a GPR has been updated (marked dirty) in order to determine whether to sync the register to the GHCB. Signed-off-by: Tom Lendacky Message-Id: <7ca2a1cdb61456f2fe9c64193e34d601e395c133.1607620209.git.thomas.lendacky@amd.com> Signed-off-by: Paolo Bonzini commit add5e2f045414523aa6dc29d69b21e8f82e5ffb8 Author: Tom Lendacky Date: Thu Dec 10 11:09:40 2020 -0600 KVM: SVM: Add support for the SEV-ES VMSA Allocate a page during vCPU creation to be used as the encrypted VM save area (VMSA) for the SEV-ES guest. Provide a flag in the kvm_vcpu_arch structure that indicates whether the guest state is protected. When freeing a VMSA page that has been encrypted, the cache contents must be flushed using the MSR_AMD64_VM_PAGE_FLUSH before freeing the page. [ i386 build warnings ] Reported-by: kernel test robot Signed-off-by: Tom Lendacky Message-Id: Signed-off-by: Paolo Bonzini commit 0f60bde15ee11d03b6143f567cf840d30bf1b588 Author: Tom Lendacky Date: Thu Dec 10 11:09:39 2020 -0600 KVM: SVM: Add GHCB accessor functions for retrieving fields Update the GHCB accessor functions to add functions for retrieve GHCB fields by name. Update existing code to use the new accessor functions. Signed-off-by: Tom Lendacky Message-Id: <664172c53a5fb4959914e1a45d88e805649af0ad.1607620209.git.thomas.lendacky@amd.com> Signed-off-by: Paolo Bonzini commit 916391a2d1dc225bfb68624352b1495ec529444e Author: Tom Lendacky Date: Thu Dec 10 11:09:38 2020 -0600 KVM: SVM: Add support for SEV-ES capability in KVM Add support to KVM for determining if a system is capable of supporting SEV-ES as well as determining if a guest is an SEV-ES guest. Signed-off-by: Tom Lendacky Message-Id: Signed-off-by: Paolo Bonzini commit 9d4747d02376aeb8de38afa25430de79129c5799 Author: Tom Lendacky Date: Thu Dec 10 11:09:37 2020 -0600 KVM: SVM: Remove the call to sev_platform_status() during setup When both KVM support and the CCP driver are built into the kernel instead of as modules, KVM initialization can happen before CCP initialization. As a result, sev_platform_status() will return a failure when it is called from sev_hardware_setup(), when this isn't really an error condition. Since sev_platform_status() doesn't need to be called at this time anyway, remove the invocation from sev_hardware_setup(). Signed-off-by: Tom Lendacky Message-Id: <618380488358b56af558f2682203786f09a49483.1607620209.git.thomas.lendacky@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit 69372cf01290b9587d2cee8fbe161d75d55c3adc Author: Tom Lendacky Date: Thu Dec 10 11:09:36 2020 -0600 x86/cpu: Add VM page flush MSR availablility as a CPUID feature On systems that do not have hardware enforced cache coherency between encrypted and unencrypted mappings of the same physical page, the hypervisor can use the VM page flush MSR (0xc001011e) to flush the cache contents of an SEV guest page. When a small number of pages are being flushed, this can be used in place of issuing a WBINVD across all CPUs. CPUID 0x8000001f_eax[2] is used to determine if the VM page flush MSR is available. Add a CPUID feature to indicate it is supported and define the MSR. Signed-off-by: Tom Lendacky Message-Id: Signed-off-by: Paolo Bonzini commit 3f1a18b9fa1c294802d2750d1ef6a1221b10b76b Author: Uros Bizjak Date: Thu Oct 29 14:56:00 2020 +0100 KVM/VMX/SVM: Move kvm_machine_check function to x86.h Move kvm_machine_check to x86.h to avoid two exact copies of the same function in kvm.c and svm.c. Cc: Paolo Bonzini Cc: Sean Christopherson Signed-off-by: Uros Bizjak Message-Id: <20201029135600.122392-1-ubizjak@gmail.com> Signed-off-by: Paolo Bonzini commit ad4fddef5f2345aa9214e979febe2f47639c10d9 Author: Anders Roxell Date: Fri Nov 27 09:39:43 2020 +0100 mips: fix Section mismatch in reference When building mips tinyconfig with clang the following error show up: WARNING: modpost: vmlinux.o(.text+0x1940c): Section mismatch in reference from the function r4k_cache_init() to the function .init.text:loongson3_sc_init() The function r4k_cache_init() references the function __init loongson3_sc_init(). This is often because r4k_cache_init lacks a __init annotation or the annotation of loongson3_sc_init is wrong. Remove marked __init from function loongson3_sc_init(), mips_sc_probe_cm3(), and mips_sc_probe(). Signed-off-by: Anders Roxell Reviewed-by: Nick Desaulniers Signed-off-by: Thomas Bogendoerfer commit 2e33f831fccd2df83836a8e255755f85d364aaeb Author: Andrii Nakryiko Date: Fri Dec 11 13:58:25 2020 -0800 selftests/bpf: Add set_attach_target() API selftest for module target Add test for bpf_program__set_attach_target() API, validating it can find kernel module fentry target. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20201211215825.3646154-3-andrii@kernel.org commit fe62de310e2b563c0d303a09d06b020077fe86b4 Author: Andrii Nakryiko Date: Fri Dec 11 13:58:24 2020 -0800 libbpf: Support modules in bpf_program__set_attach_target() API Support finding kernel targets in kernel modules when using bpf_program__set_attach_target() API. This brings it up to par with what libbpf supports when doing declarative SEC()-based target determination. Some minor internal refactoring was needed to make sure vmlinux BTF can be loaded before bpf_object's load phase. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20201211215825.3646154-2-andrii@kernel.org commit 3bd5a2350262f1d316c9ff7b86a97335da5f2118 Author: Krzysztof Kozlowski Date: Thu Oct 29 16:44:14 2020 +0100 MAINTAINERS: Add linux-mips mailing list to JZ47xx entries The entries for JZ47xx SoCs and its drivers lacked MIPS mailing list. Only MTD NAND driver pointed linux-mtd. Add linux-mips so the relevant patches will get attention of MIPS developers. Signed-off-by: Krzysztof Kozlowski Acked-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit e22a26421fce36802785d742acaa4b2f4c37b995 Author: Krzysztof Kozlowski Date: Thu Oct 29 16:44:13 2020 +0100 MAINTAINERS: Remove JZ4780 DMA driver entry The entry for MIPS Ingenic JZ4780 DMA driver is not up to date anymore. Zubair Lutfullah Kakakhel's email bounces and no maintenance is provided. Suggested-by: Paul Cercueil Signed-off-by: Krzysztof Kozlowski Signed-off-by: Thomas Bogendoerfer commit 47683459ba8f032fec81399dde1b346a1d2a4ff6 Author: Huacai Chen Date: Sat Dec 5 16:55:07 2020 +0800 MAINTAINERS: chenhc@lemote.com -> chenhuacai@kernel.org Use @kernel.org address as the main communications end point. Update the corresponding M-entries and .mailmap (for git shortlog translation). Signed-off-by: Huacai Chen Signed-off-by: Thomas Bogendoerfer commit 2d39f50c2b15bfd197451a967e371dea19f9600b Author: Ronnie Sahlberg Date: Mon Dec 14 16:40:25 2020 +1000 cifs: move update of flags into a separate function This function will set/clear flags that can be changed during mount or remount Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 51acd208bd57c82eaa2fda3cab03d62436c6a2ae Author: Ronnie Sahlberg Date: Mon Dec 14 16:40:24 2020 +1000 cifs: remove ctx argument from cifs_setup_cifs_sb Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 531f03bc6d0509f2e7a5852e3f1819166e0f364c Author: Ronnie Sahlberg Date: Mon Dec 14 16:40:23 2020 +1000 cifs: do not allow changing posix_paths during remount Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 7c7ee628f8e94720727709424b3afdae7e73d028 Author: Ronnie Sahlberg Date: Mon Dec 14 16:40:22 2020 +1000 cifs: uncomplicate printing the iocharset parameter There is no need to load the default nls to check if the iocharset argument was specified or not since we have it in cifs_sb->ctx Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 6fd4ea88b59acaf2bffdaa14da313d1140b9c7c4 Author: Ronnie Sahlberg Date: Mon Dec 14 16:40:21 2020 +1000 cifs: don't create a temp nls in cifs_setup_ipc just use the one that is already available in ctx Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 387ec58f339b0c45e3767395f11fa8dd3772131e Author: Ronnie Sahlberg Date: Mon Dec 14 16:40:20 2020 +1000 cifs: simplify handling of cifs_sb/ctx->local_nls Only load/unload local_nls from cifs_sb and just make the ctx contain a pointer to cifs_sb->ctx. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 9ccecae8d1d7131439fb4849f51e614ef7395298 Author: Ronnie Sahlberg Date: Mon Dec 14 16:40:19 2020 +1000 cifs: we do not allow changing username/password/unc/... during remount Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit d6a78783407cdf9f8dcf677f7e5a26b1aa22bc0e Author: Ronnie Sahlberg Date: Mon Dec 14 16:40:18 2020 +1000 cifs: add initial reconfigure support Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 522aa3b575322597efdd64a517c65b2f43fb6b9c Author: Ronnie Sahlberg Date: Mon Dec 14 16:40:17 2020 +1000 cifs: move [brw]size from cifs_sb to cifs_sb->ctx Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit c741cba2cd1d145c71f928c329cac007e6f99e42 Author: Ronnie Sahlberg Date: Mon Dec 14 16:40:16 2020 +1000 cifs: move cifs_cleanup_volume_info[_content] to fs_context.c and rename it to smb3_cleanup_fs_context[_content] Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit d72c8b0e1cacc39495cd413433d260e8ae59374a Author: Ard Biesheuvel Date: Sun Dec 13 16:07:03 2020 +0100 efi: arm: force use of unsigned type for EFI_PHYS_ALIGN Ensure that EFI_PHYS_ALIGN is an unsigned type, to prevent spurious warnings from the type checks in the definition of the max() macro. Link: https://lore.kernel.org/linux-efi/20201213151306.73558-1-ardb@kernel.org Signed-off-by: Ard Biesheuvel commit e0a6aa30504cb8179d07609fb6386705e8f00663 Author: Ard Biesheuvel Date: Sun Dec 13 09:39:40 2020 +0100 efi: ia64: disable the capsule loader EFI capsule loading is a feature that was introduced into EFI long after its initial introduction on Itanium, and it is highly unlikely that IA64 systems are receiving firmware updates in the first place, let alone using EFI capsules. So let's disable capsule support altogether on IA64. This fixes a build error on IA64 due to a recent change that added an unconditional include of asm/efi.h, which IA64 does not provide. While at it, tweak the make rules a bit so that the EFI capsule component that is always builtin (even if the EFI capsule loader itself is built as a module) is omitted for all architectures if the module is not enabled in the build. Cc: Tony Luck Link: https://lore.kernel.org/linux-efi/20201214152200.38353-1-ardb@kernel.org Signed-off-by: Ard Biesheuvel commit 427c4f004e173732ab0eb248e6ec89ef79524cd5 Author: Dmitry Osipenko Date: Mon Dec 14 14:37:45 2020 +0300 cifs: Add missing sentinel to smb3_fs_parameters Add missing sentinel to smb3_fs_parameters. This fixes ARM32 kernel crashing once CIFS is registered. Unable to handle kernel paging request at virtual address 33626d73 ... (strcmp) from (fs_validate_description) (fs_validate_description) from (register_filesystem) (register_filesystem) from (init_cifs [cifs]) (init_cifs [cifs]) from (do_one_initcall) (do_one_initcall) from (do_init_module) (do_init_module) from (load_module) (load_module) from (sys_finit_module) (sys_finit_module) from (ret_fast_syscal) Fixes: e07724d1cf38 ("cifs: switch to new mount api") Signed-off-by: Dmitry Osipenko Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 121d947d4fe15bcec90bcfc1249ee9b739cb9258 Author: Samuel Cabrero Date: Mon Nov 30 19:02:56 2020 +0100 cifs: Handle witness client move notification This message is sent to tell a client to close its current connection and connect to the specified address. Signed-off-by: Samuel Cabrero Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 99fbc70f8547c0782dcde25679c647a11393b801 Author: Alexander Sverdlin Date: Fri Nov 27 12:13:55 2020 +0100 MIPS: Octeon: irq: Alloc desc before configuring IRQ Allocate the IRQ descriptors where necessary before configuring them via irq_set_chip_and_handler(). Fixes the following soft lockup: watchdog: BUG: soft lockup - CPU#5 stuck for 22s! [modprobe:72] Modules linked in: irq event stamp: 33288 hardirqs last enabled at (33287): [] restore_partial+0x74/0x150 hardirqs last disabled at (33288): [] handle_int+0x128/0x178 softirqs last enabled at (33284): [] __do_softirq+0x5c4/0x6d0 softirqs last disabled at (33279): [] irq_exit+0xe8/0xf0 CPU: 5 PID: 72 Comm: modprobe Not tainted 4.19.80-... #1 $ 0 : 0000000000000000 0000000000000001 0000000000000003 8000000002bdc640 $ 4 : 0000000000000000 0000000000000000 0000000000000000 0000000000000000 $ 8 : 0000000000000001 0000000000000001 0000000000000000 ffffffff803076cc $12 : 0000000000000000 0000000000000000 ffffffff817f0000 0000000008000000 $16 : ffffffff80a96d10 ffffffff80a90000 8000000002c41780 8000000002c41788 $20 : 0000000000000001 ffffffff8013b248 800000008ef28080 ffffffff80bb8700 $24 : 0000000003bf0000 ffffffff802d0610 $28 : 800000008ef20000 800000008ef23bd0 0000000000000006 ffffffff8020d6f8 Hi : 0000000000000160 Lo : 0000000000000014 epc : ffffffff8020d72c smp_call_function_many+0x2f4/0x370 ra : ffffffff8020d6f8 smp_call_function_many+0x2c0/0x370 Status: 10008ce3 KX SX UX KERNEL EXL IE Cause : 40808000 (ExcCode 00) PrId : 000d900a (Cavium Octeon II) CPU: 5 PID: 72 Comm: modprobe Not tainted 4.19.80-... #1 Stack : ffffffff80ab0000 00000051801c0da0 0000000010000ce0 5e70a8a65518aeac 5e70a8a65518aeac 0000000000000000 800000008e0cfb48 ffffffff81820000 800000008e0cfad4 00000000f0ce6f64 0000000000000001 0000000000000000 ffffffff801ccfb8 0000000000000000 0000000000000000 ffffffff817f0000 800000008531d840 ffffffff80a90000 fffe000000000000 0000000000000000 ffffffff80b20000 ffffffffffffffff ffffffff80bb3980 ffffffff80bb3980 ffffffff80a90000 00000000fffffffe ffffffff8057a760 0000000000000028 ffffffff80c50028 800000008ef20000 800000008e0cfb40 ffffffff80b20000 ffffffff80835d6c 0000000000000000 800000008e0cfc78 5e70a8a65518aeac ffffffff80a9dbf7 ffffffff80835c2c ffffffff801357a4 ffffffff809bdd50 ... Call Trace: [] show_stack+0x9c/0x130 [] dump_stack+0xdc/0x140 [] watchdog_timer_fn+0x3e8/0x478 [] __hrtimer_run_queues+0x18c/0x6d8 [] hrtimer_interrupt+0x104/0x2e8 [] c0_compare_interrupt+0x60/0x90 [] __handle_irq_event_percpu+0xb4/0x4a0 [] handle_irq_event_percpu+0x34/0x90 [] handle_percpu_irq+0x9c/0xe0 [] generic_handle_irq+0x34/0x50 [] do_IRQ+0x18/0x28 [] plat_irq_dispatch+0x90/0x128 [] handle_int+0x16c/0x178 [] smp_call_function_many+0x2f4/0x370 [] smp_call_function+0x40/0xa0 [] flush_tlb_mm+0x44/0x140 [] tlb_flush_mmu+0x38/0x90 [] arch_tlb_finish_mmu+0x4c/0x88 [] tlb_finish_mmu+0x24/0x50 [] exit_mmap+0x11c/0x1b8 [] mmput+0x84/0x138 [] do_exit+0x314/0xc88 [] do_group_exit+0x48/0xb0 [] __wake_up_parent+0x0/0x18 Signed-off-by: Alexander Sverdlin Signed-off-by: Thomas Bogendoerfer commit 41bb1a9b85dd613787a54414a1ae7d4181b9de5d Author: Thomas Bogendoerfer Date: Fri Nov 27 10:16:03 2020 +0100 MIPS: mm: Add back define for PAGE_SHARED There are still some drivers using PAGE_SHARED constant so put it back. Reported-by: kernel test robot Signed-off-by: Thomas Bogendoerfer commit 4aa5b78fb5460adbb876e450ec844e7c1991372d Author: Zhen Lei Date: Mon Dec 14 20:43:47 2020 +0800 dt-bindings: i2c: dw: cancel mandatory requirements for "#address-cells" and "#size-cells" The "#address-cells" and "#size-cells" are required only when the I2C controller has subnodes. However, some I2C controllers defined in "arch/arm64/boot/dts/amd/" and "arch/arm64/boot/dts/hisilicon/" directories do not have child nodes. So they don't need these two properties and don't write them explicitly. Therefore, setting properties "#address-cells" and "#size-cells" as "required" in this yaml file causes the following warnings: /root/linux-next/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dt.yaml: \ i2c@f7100000: '#address-cells' is a required property /root/linux-next/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dt.yaml: \ i2c@f7100000: '#size-cells' is a required property Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20201214124347.2120-2-thunder.leizhen@huawei.com Signed-off-by: Rob Herring commit af1e40d9ac8417839d955ca1ac42f754588937a9 Author: Ronnie Sahlberg Date: Tue Nov 10 12:34:48 2020 +1000 cifs: remove actimeo from cifs_sb Can now be accessed via the ctx Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 8401e93678933a140cebfa2e7122c1a6b687c355 Author: Ronnie Sahlberg Date: Sat Dec 12 13:40:50 2020 -0600 cifs: remove [gu]id/backup[gu]id/file_mode/dir_mode from cifs_sb We can already access these from cifs_sb->ctx so we no longer need a local copy in cifs_sb. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit ee0dce4926b95c3c96217c076550216eb6dcd90b Author: Steve French Date: Sat Dec 12 12:49:28 2020 -0600 cifs: remove some minor warnings pointed out by kernel test robot Correct some trivial warnings caused when new file unc.c was created. For example: In file included from fs/cifs/unc.c:11: >> fs/cifs/cifsproto.h:44:28: warning: 'struct TCP_Server_Info' declared inside parameter list will not be visible outside of this definition or declaration 44 | extern int smb_send(struct TCP_Server_Info *, struct smb_hdr *, Reported-by: kernel test robot Signed-off-by: Steve French commit 607dfc79c37a0eb1320485ae9336aba0fd8b7723 Author: Steve French Date: Sat Dec 12 12:08:58 2020 -0600 cifs: remove various function description warnings When compiling with W=1 I noticed various functions that did not follow proper style in describing (in the comments) the parameters passed in to the function. For example: fs/cifs/inode.c:2236: warning: Function parameter or member 'mode' not described in 'cifs_wait_bit_killable' I did not address the style warnings in two of the six files (connect.c and misc.c) in order to reduce risk of merge conflict with pending patches. We can update those later. Signed-off-by: Steve French commit 7d6535b720421d58886d5590ffc3617d359aa871 Author: Samuel Cabrero Date: Mon Nov 30 19:02:55 2020 +0100 cifs: Simplify reconnect code when dfs upcall is enabled Some witness notifications, like client move, tell the client to reconnect to a specific IP address. In this situation the DFS failover code path has to be skipped so clean up as much as possible the cifs_reconnect() code. Signed-off-by: Samuel Cabrero Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 21077c62e178e637e6291c669d2681c9570f7a08 Author: Samuel Cabrero Date: Mon Nov 30 19:02:54 2020 +0100 cifs: Send witness register messages to userspace daemon in echo task If the daemon starts after mounting a share, or if it crashes, this provides a mechanism to register again. Signed-off-by: Samuel Cabrero Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 20fab0da2f2df6de9acdfbdec622f6f2a24da422 Author: Samuel Cabrero Date: Mon Nov 30 19:02:53 2020 +0100 cifs: Add witness information to debug data dump + Indicate if witness feature is supported + Indicate if witness is used when dumping tcons + Dumps witness registrations. Example: Witness registrations: Id: 1 Refs: 1 Network name: 'fs.fover.ad'(y) Share name: 'share1'(y) \ Ip address: 192.168.103.200(n) Signed-off-by: Samuel Cabrero Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit fed979a7e082bd9f25f9002c3c4f8740dacd0bc8 Author: Samuel Cabrero Date: Mon Nov 30 19:02:52 2020 +0100 cifs: Set witness notification handler for messages from userspace daemon + Set a handler for the witness notification messages received from the userspace daemon. + Handle the resource state change notification. When the resource becomes unavailable or available set the tcp status to CifsNeedReconnect for all channels. Signed-off-by: Samuel Cabrero Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit bf80e5d4259a192d6b06ae17e79a5e9dab48bf51 Author: Samuel Cabrero Date: Mon Nov 30 19:02:51 2020 +0100 cifs: Send witness register and unregister commands to userspace daemon + Define the generic netlink family commands and message attributes to communicate with the userspace daemon + The register and unregister commands are sent when connecting or disconnecting a tree. The witness registration keeps a pointer to the tcon and has the same lifetime. + Each registration has an id allocated by an IDR. This id is sent to the userspace daemon in the register command, and will be included in the notification messages from the userspace daemon to retrieve from the IDR the matching registration. + The authentication information is bundled in the register message. If kerberos is used the message just carries a flag. Signed-off-by: Samuel Cabrero Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit e68f4a7bf006af0cc1809bce76785d2811b7de65 Author: Steve French Date: Fri Dec 11 23:31:16 2020 -0600 cifs: minor updates to Kconfig Correct references to fs/cifs/README which has been replaced by Documentation/filesystems/admin-guide/cifs/usage.rst, and also correct a typo. Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 0ac4e2919aa408dfd0fb9ce08ac331a9deeea807 Author: Samuel Cabrero Date: Fri Dec 11 22:59:29 2020 -0600 cifs: add witness mount option and data structs Add 'witness' mount option to register for witness notifications. Signed-off-by: Samuel Cabrero Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 06f08dab3ca726b86431889495c45049616d6a15 Author: Samuel Cabrero Date: Mon Nov 30 19:02:49 2020 +0100 cifs: Register generic netlink family Register a new generic netlink family to talk to the witness service userspace daemon. Signed-off-by: Samuel Cabrero Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 047092ffe2b1774ab456e0eff0e40e0eb4b6600e Author: Steve French Date: Fri Dec 11 20:22:04 2020 -0600 cifs: cleanup misc.c misc.c was getting a little large, move two of the UNC parsing relating functions to a new C file unc.c which makes the coding of the upcoming witness protocol patch series a little cleaner as well. Suggested-by: Rafal Szczesniak Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit bc04499477d9f01034c2afb6097e835c705ac3bd Author: Steve French Date: Fri Dec 11 19:48:26 2020 -0600 cifs: minor kernel style fixes for comments Trivial fix for a few comments which didn't follow kernel style Signed-off-by: Steve French commit e73a42e07a2246ecd8b0cad70824d26ab07985c2 Author: Samuel Cabrero Date: Mon Nov 30 19:02:48 2020 +0100 cifs: Make extract_sharename function public Move the function to misc.c Signed-off-by: Samuel Cabrero Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit a87e67254bc5da9ca6f3899e354fcf03d12cfd10 Author: Samuel Cabrero Date: Mon Nov 30 19:02:47 2020 +0100 cifs: Make extract_hostname function public Move the function to misc.c and give it a public header. Signed-off-by: Samuel Cabrero Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit a8c0f1c634507a36ef87a23cfd93720f6142ad9a Author: Tiezhu Yang Date: Mon Dec 7 20:21:42 2020 +0800 MIPS: Select ARCH_KEEP_MEMBLOCK if DEBUG_KERNEL to enable sysfs memblock debug In the current code, CONFIG_ARCH_KEEP_MEMBLOCK is not set for MIPS arch, memblock_discard() will discard memory and reserved arrays if they were allocated, select ARCH_KEEP_MEMBLOCK if DEBUG_KERNEL to give a chance to track "memory" and "reserved" memblocks after early boot, with this patch, we can see the following two sysfs interfaces under DEBUG_FS. /sys/kernel/debug/memblock/memory /sys/kernel/debug/memblock/reserved Signed-off-by: Tiezhu Yang Signed-off-by: Thomas Bogendoerfer commit 5b058973d3205578aa6c9a71392e072a11ca44ef Author: Anders Roxell Date: Fri Dec 11 11:24:37 2020 +0100 mips: lib: uncached: fix non-standard usage of variable 'sp' When building mips tinyconfig with clang the following warning show up: arch/mips/lib/uncached.c:45:6: warning: variable 'sp' is uninitialized when used here [-Wuninitialized] if (sp >= (long)CKSEG0 && sp < (long)CKSEG2) ^~ arch/mips/lib/uncached.c:40:18: note: initialize the variable 'sp' to silence this warning register long sp __asm__("$sp"); ^ = 0 1 warning generated. Rework to make an explicit inline move, instead of the non-standard use of specifying registers for local variables. This is what's written from the gcc-10 manual [1] about specifying registers for local variables: "6.47.5.2 Specifying Registers for Local Variables ................................................. [...] "The only supported use for this feature is to specify registers for input and output operands when calling Extended 'asm' (*note Extended Asm::). [...]". [1] https://docs.w3cub.com/gcc~10/local-register-variables Signed-off-by: Anders Roxell Reported-by: Nathan Chancellor Reported-by: Naresh Kamboju Reviewed-by: Nick Desaulniers Signed-off-by: Thomas Bogendoerfer commit 598100be3053fef628adf3ad6ee4f828ad308f64 Merge: 175b8d89fe292 460aa020f56c9 Author: Takashi Iwai Date: Mon Dec 14 15:57:14 2020 +0100 Merge tag 'asoc-v5.11' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v5.11 There's a lot of changes here but mostly cleanups and driver specific things, the most user visible change is the support for boot time selection of Intel DSP firmware which will make it easier for people to move over to the preferred modern implementations in distros and other large scale deployments. This also includes a merge of the new auxillary bus which was done in anticipation of use by the Intel DSP drivers which didn't quite make it. - Lots more cleanups and simplifications from Morimoto-san. - Support for some basic DPCM systems in the audio graph card from Sameer Pujar. - Remove some old pre-DT Freescale drivers for platforms that are now DT only. - Move selection of which Intel DSP implementation to use to boot time rather than requiring it to be selected at build time. - Support for Allwinner H6 I2S, Analog Devices ADAU1372, Intel Alderlake-S, GMediatek MT8192, NXP i.MX HDMI and XCVR, Realtek RT715, Qualcomm SM8250 and simple GPIO based muxes. commit a217d8711da5c87fd2862fc36759b6fafa1c4905 Author: Rob Herring Date: Thu Dec 10 14:03:15 2020 -0600 dt-bindings: Remove PicoXcell bindings PicoXcell has had nothing but treewide cleanups for at least the last 8 years and no signs of activity. The most recent activity is a yocto vendor kernel based on v3.0 in 2015. Cc: linux-crypto@vger.kernel.org Acked-by: Jamie Iles Link: https://lore.kernel.org/r/20201210200315.2965567-5-robh@kernel.org Signed-off-by: Rob Herring commit 18ce7f4fde3149c729f53a987dbbbba92e08ae24 Author: Rob Herring Date: Thu Dec 10 10:29:03 2020 -0600 ARM: dts: lpc32xx: Remove unused and undocumented 'pnx,timeout' 'pnx,timeout' is unused, undocumented and 'pnx' is not a vendor prefix, so let's remove it. Acked-by: Vladimir Zapolskiy Cc: Sylvain Lemieux Link: https://lore.kernel.org/r/20201210175238.2721550-1-robh@kernel.org Signed-off-by: Rob Herring commit 459c7c565ac36ba09ffbf24231147f408fde4203 Author: Miklos Szeredi Date: Mon Dec 14 15:26:14 2020 +0100 ovl: unprivieged mounts Enable unprivileged user namespace mounts of overlayfs. Overlayfs's permission model (*) ensures that the mounter itself cannot gain additional privileges by the act of creating an overlayfs mount. This feature request is coming from the "rootless" container crowd. (*) Documentation/filesystems/overlayfs.txt#Permission model Signed-off-by: Miklos Szeredi commit 87b2c60c6127eaa3b33f3e4c4166f6af80e1aaa9 Author: Miklos Szeredi Date: Mon Dec 14 15:26:14 2020 +0100 ovl: do not get metacopy for userxattr When looking up an inode on the lower layer for which the mounter lacks read permisison the metacopy check will fail. This causes the lookup to fail as well, even though the directory is readable. So ignore EACCES for the "userxattr" case and assume no metacopy for the unreadable file. Signed-off-by: Miklos Szeredi commit b6650dab404c701d7fe08a108b746542a934da84 Author: Miklos Szeredi Date: Mon Dec 14 15:26:14 2020 +0100 ovl: do not fail because of O_NOATIME In case the file cannot be opened with O_NOATIME because of lack of capabilities, then clear O_NOATIME instead of failing. Remove WARN_ON(), since it would now trigger if O_NOATIME was cleared. Noticed by Amir Goldstein. Signed-off-by: Miklos Szeredi commit 6939f977c54a39207e94e429ee4eb14d4923736f Author: Miklos Szeredi Date: Mon Dec 14 15:26:14 2020 +0100 ovl: do not fail when setting origin xattr Comment above call already says this, but only EOPNOTSUPP is ignored, other failures are not. For example setting "user.*" will fail with EPERM on symlink/special. Ignore this error as well. Signed-off-by: Miklos Szeredi commit 2d2f2d7322ff43e0fe92bf8cccdc0b09449bf2e1 Author: Miklos Szeredi Date: Mon Dec 14 15:26:14 2020 +0100 ovl: user xattr Optionally allow using "user.overlay." namespace instead of "trusted.overlay." This is necessary for overlayfs to be able to be mounted in an unprivileged namepsace. Make the option explicit, since it makes the filesystem format be incompatible. Disable redirect_dir and metacopy options, because these would allow privilege escalation through direct manipulation of the "user.overlay.redirect" or "user.overlay.metacopy" xattrs. Signed-off-by: Miklos Szeredi Reviewed-by: Amir Goldstein commit 82a763e61e2b601309d696d4fa514c77d64ee1be Author: Miklos Szeredi Date: Mon Dec 14 15:26:14 2020 +0100 ovl: simplify file splice generic_file_splice_read() and iter_file_splice_write() will call back into f_op->iter_read() and f_op->iter_write() respectively. These already do the real file lookup and cred override. So the code in ovl_splice_read() and ovl_splice_write() is redundant. In addition the ovl_file_accessed() call in ovl_splice_write() is incorrect, though probably harmless. Fix by calling generic_file_splice_read() and iter_file_splice_write() directly. Signed-off-by: Miklos Szeredi commit 89bdfaf93d9157499c3a0d61f489df66f2dead7f Author: Miklos Szeredi Date: Mon Dec 14 15:26:14 2020 +0100 ovl: make ioctl() safe ovl_ioctl_set_flags() does a capability check using flags, but then the real ioctl double-fetches flags and uses potentially different value. The "Check the capability before cred override" comment misleading: user can skip this check by presenting benign flags first and then overwriting them to non-benign flags. Just remove the cred override for now, hoping this doesn't cause a regression. The proper solution is to create a new setxflags i_op (patches are in the works). Xfstests don't show a regression. Reported-by: Dmitry Vyukov Signed-off-by: Miklos Szeredi Reviewed-by: Amir Goldstein Fixes: dab5ca8fd9dd ("ovl: add lsattr/chattr support") Cc: # v4.19 commit c846af050f944d584f28bc0de310383003c8096d Author: Miklos Szeredi Date: Mon Dec 14 15:26:14 2020 +0100 ovl: check privs before decoding file handle CAP_DAC_READ_SEARCH is required by open_by_handle_at(2) so check it in ovl_decode_real_fh() as well to prevent privilege escalation for unprivileged overlay mounts. [Amir] If the mounter is not capable in init ns, ovl_check_origin() and ovl_verify_index() will not function as expected and this will break index and nfs export features. So check capability in ovl_can_decode_fh(), to auto disable those features. Signed-off-by: Miklos Szeredi commit 3078d85c9a1099405a0463c4d112ba97ee5bd217 Author: Miklos Szeredi Date: Mon Dec 14 15:26:13 2020 +0100 vfs: verify source area in vfs_dedupe_file_range_one() Call remap_verify_area() on the source file as well as the destination. When called from vfs_dedupe_file_range() the check as already been performed, but not so if called from layered fs (overlayfs, etc...) Could ommit the redundant check in vfs_dedupe_file_range(), but leave for now to get error early (for fear of breaking backward compatibility). This call shouldn't be performance sensitive. Signed-off-by: Miklos Szeredi commit 7c03e2cda4a584cadc398e8f6641ca9988a39d52 Author: Miklos Szeredi Date: Mon Dec 14 15:26:13 2020 +0100 vfs: move cap_convert_nscap() call into vfs_setxattr() cap_convert_nscap() does permission checking as well as conversion of the xattr value conditionally based on fs's user-ns. This is needed by overlayfs and probably other layered fs (ecryptfs) and is what vfs_foo() is supposed to do anyway. Signed-off-by: Miklos Szeredi Acked-by: James Morris commit 5ed37174e6c7e1ed4abfd0d8e932a3044441fb5f Merge: 5f3b8d3986010 8d143c610b62f Author: Petr Mladek Date: Mon Dec 14 15:15:07 2020 +0100 Merge branch 'for-5.11' into for-linus commit 5f3b8d398601055f29f32986a94d55955cd48f09 Merge: b031a684bfd01 3cffa06aeef7e Author: Petr Mladek Date: Mon Dec 14 15:14:57 2020 +0100 Merge branch 'for-5.11-null-console' into for-linus commit c6b734892420f00fdc3c49b8c1029aa5bf0790b9 Author: Marc Kleine-Budde Date: Sat Dec 12 18:55:18 2020 +0100 can: m_can: use struct m_can_classdev as drvdata The m_can driver's suspend and resume functions (m_can_class_suspend() and m_can_class_resume()) make use of dev_get_drvdata() and assume that the drvdata is a pointer to the struct net_device. With upcoming conversion of the tcan4x5x driver to pm_runtime this assumption is no longer valid. As the suspend and resume functions actually need a struct m_can_classdev pointer, change the m_can_platform and the m_can_pci driver to hold a pointer to struct m_can_classdev instead, as the tcan4x5x driver already does. Link: https://lore.kernel.org/r/20201212175518.139651-8-mkl@pengutronix.de Reviewed-by: Sean Nyekjaer Reviewed-by: Dan Murphy Signed-off-by: Marc Kleine-Budde commit ac33ffd3e2b037fe68683b48dadd1cef4a969993 Author: Marc Kleine-Budde Date: Sat Dec 12 18:55:17 2020 +0100 can: m_can: let m_can_class_allocate_dev() allocate driver specific private data This patch enhances m_can_class_allocate_dev() to allocate driver specific private data. The driver's private data struct must contain struct m_can_classdev as its first member followed by the remaining private data. Link: https://lore.kernel.org/r/20201212175518.139651-7-mkl@pengutronix.de Reviewed-by: Sean Nyekjaer Reviewed-by: Dan Murphy Signed-off-by: Marc Kleine-Budde commit b8d6255548ff9a94f1fed44b01da9602861cf84a Author: Marc Kleine-Budde Date: Sat Dec 12 18:55:16 2020 +0100 can: m_can: m_can_clk_start(): make use of pm_runtime_resume_and_get() With patch | dd8088d5a896 PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter the usual pm_runtime_get_sync() and pm_runtime_put_noidle() in-case-of-error dance is no longer needed. Convert the m_can driver to use this function. Link: https://lore.kernel.org/r/20201212175518.139651-6-mkl@pengutronix.de Reviewed-by: Sean Nyekjaer Reviewed-by: Dan Murphy Signed-off-by: Marc Kleine-Budde commit 78e19a292681c97f7e14e8feae482d6285f795cd Author: Marc Kleine-Budde Date: Sat Dec 12 18:55:15 2020 +0100 can: m_can: m_can_config_endisable(): mark as static The function m_can_config_endisable() is not used outside of the m_can driver, so mark it as static. Link: https://lore.kernel.org/r/20201212175518.139651-5-mkl@pengutronix.de Reviewed-by: Sean Nyekjaer Reviewed-by: Dan Murphy Signed-off-by: Marc Kleine-Budde commit 3b464affd898216c9da19a88db992e6113a99dce Author: Marc Kleine-Budde Date: Sat Dec 12 18:55:14 2020 +0100 can: m_can: use cdev as name for struct m_can_classdev uniformly This patch coverts the m_can driver to use cdev as name for struct m_can_classdev uniformly throughout the whole driver. Link: https://lore.kernel.org/r/20201212175518.139651-4-mkl@pengutronix.de Reviewed-by: Sean Nyekjaer Reviewed-by: Dan Murphy Signed-off-by: Marc Kleine-Budde commit 709efa6f00c7f7e0287a46757aab6114158ac94c Author: Marc Kleine-Budde Date: Sat Dec 12 18:55:13 2020 +0100 can: m_can: convert indention to kernel coding style This patch converts the indention in the m_can driver to kernel coding style. Link: https://lore.kernel.org/r/20201212175518.139651-3-mkl@pengutronix.de Reviewed-by: Sean Nyekjaer Reviewed-by: Dan Murphy Signed-off-by: Marc Kleine-Budde commit 4c832b380cd04e37d5da8d5b5dce81e0565be7e5 Author: Marc Kleine-Budde Date: Sat Dec 12 18:55:12 2020 +0100 can: m_can: update link to M_CAN user manual Old versions of the user manual are regularly depublished, so change link to the linux-can github page, which has a mirror off all published datasheets. Link: https://lore.kernel.org/r/20201212175518.139651-2-mkl@pengutronix.de Reviewed-by: Sean Nyekjaer Reviewed-by: Dan Murphy Signed-off-by: Marc Kleine-Budde commit 44b4c4450f8d31296ba633d74be753a85fd627bd Author: Aneesh Kumar K.V Date: Mon Dec 14 13:31:21 2020 +0530 powerpc/64s: Mark the kuap/kuep functions non __init The kernel calls these functions on CPU online and hence they must not be marked __init. Otherwise if the memory they occupied has been reused the system can crash in various ways. Sachin reported it caused his LPAR to spontaneously restart with no other output. With xmon enabled it may drop into xmon with a dump like: cpu 0x1: Vector: 700 (Program Check) at [c000000003c5fcb0] pc: 00000000011e0a78 lr: 00000000011c51d4 sp: c000000003c5ff50 msr: 8000000000081001 current = 0xc000000002c12b00 paca = 0xc000000003cff280 irqmask: 0x03 irq_happened: 0x01 pid = 0, comm = swapper/1 ... [c000000003c5ff50] 0000000000087c38 (unreliable) [c000000003c5ff70] 000000000003870c [c000000003c5ff90] 000000000000d108 Fixes: 3b47b7549ead ("powerpc/book3s64/kuap: Move KUAP related function outside radix") Reported-by: Sachin Sant Signed-off-by: Aneesh Kumar K.V [mpe: Expand change log with details and xmon output] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201214080121.358567-1-aneesh.kumar@linux.ibm.com commit 5c3485bb12c90945f86d6b1c901bbe76aa8b45c9 Author: Trond Myklebust Date: Thu Dec 10 09:34:34 2020 -0500 NFSv4.2/pnfs: Don't use READ_PLUS with pNFS yet We have no way of tracking server READ_PLUS support in pNFS for now, so just disable it. Reported-by: "Mkrtchyan, Tigran" Signed-off-by: Trond Myklebust commit 7aedc687c9f62e0d22b3231a100030e02344be1a Author: Trond Myklebust Date: Tue Dec 8 09:03:51 2020 -0500 NFSv4.2: Deal with potential READ_PLUS data extent buffer overflow If the server returns more data than we have buffer space for, then we need to truncate and exit early. Signed-off-by: Trond Myklebust commit 503b934a752f7e789a5f33217520e0a79f3096ac Author: Trond Myklebust Date: Tue Dec 8 07:51:29 2020 -0500 NFSv4.2: Don't error when exiting early on a READ_PLUS buffer overflow Expanding the READ_PLUS extents can cause the read buffer to overflow. If it does, then don't error, but just exit early. Signed-off-by: Trond Myklebust commit dac3b1059b499c570f02cd94f3172d8c8df3a9dd Author: Trond Myklebust Date: Tue Dec 8 08:41:01 2020 -0500 NFSv4.2: Handle hole lengths that exceed the READ_PLUS read buffer If a hole extends beyond the READ_PLUS read buffer, then we want to fill just the remaining buffer with zeros. Also ignore eof... Signed-off-by: Trond Myklebust commit 82f98c8b116bd769a47688ca5227f94826ae8a2a Author: Trond Myklebust Date: Tue Dec 8 08:14:55 2020 -0500 NFSv4.2: decode_read_plus_hole() needs to check the extent offset The server is allowed to return a hole extent with an offset that starts before the offset supplied in the READ_PLUS argument. Ensure that we support that case too. Signed-off-by: Trond Myklebust commit 5c4afe2ab624cb8156e987ff929e00632fb56aeb Author: Trond Myklebust Date: Tue Dec 8 07:40:04 2020 -0500 NFSv4.2: decode_read_plus_data() must skip padding after data segment All XDR opaque object sizes are 32-bit aligned, and a data segment is no exception. Signed-off-by: Trond Myklebust commit 1ee6310119a5b4460324111a8c4536054356b963 Author: Trond Myklebust Date: Tue Dec 8 13:11:11 2020 -0500 NFSv4.2: Ensure we always reset the result->count in decode_read_plus() Signed-off-by: Trond Myklebust commit 5802f7c2a6b876b2810e3e9f26d719961f12e251 Author: Trond Myklebust Date: Thu Dec 10 08:55:35 2020 -0500 SUNRPC: When expanding the buffer, we may need grow the sparse pages If we're shifting the page data to the right, and this happens to be a sparse page array, then we may need to allocate new pages in order to receive the data. Reported-by: "Mkrtchyan, Tigran" Signed-off-by: Trond Myklebust commit f8d0e60f1056687826abc1eded98f0ea067dfc4c Author: Trond Myklebust Date: Tue Dec 8 22:56:18 2020 -0500 SUNRPC: Cleanup - constify a number of xdr_buf helpers There are a number of xdr helpers for struct xdr_buf that do not change the structure itself. Mark those as taking const pointers for documentation purposes. Signed-off-by: Trond Myklebust commit 5a5f1c2c2cbb6ddef637abb7c7e7cab20b9cc933 Author: Trond Myklebust Date: Tue Dec 8 15:02:14 2020 -0500 SUNRPC: Clean up open coded setting of the xdr_stream 'nwords' field Move the setting of the xdr_stream 'nwords' field into the helpers that reset the xdr_stream cursor. Signed-off-by: Trond Myklebust commit e43ac22b83921928479da0bad25aaee3d95c2b1a Author: Trond Myklebust Date: Sun Dec 6 12:41:41 2020 -0500 SUNRPC: _copy_to/from_pages() now check for zero length Clean up callers of _copy_to/from_pages() that still check for a zero length. Signed-off-by: Trond Myklebust commit 6707fbd7d3be72da4ebde7f56b46814befd2db19 Author: Trond Myklebust Date: Sun Dec 6 10:15:04 2020 -0500 SUNRPC: Cleanup xdr_shrink_bufhead() Clean up xdr_shrink_bufhead() to use the new helpers instead of doing its own thing. Signed-off-by: Trond Myklebust commit c4f2f591f02c392ea7de018d2733748bf4c7b5f5 Author: Trond Myklebust Date: Fri Dec 4 17:15:09 2020 -0500 SUNRPC: Fix xdr_expand_hole() We do want to try to grow the buffer if possible, but if that attempt fails, we still want to move the data and truncate the XDR message. Signed-off-by: Trond Myklebust commit 9a20f6f4e6ba9713605fbf7e7426ca22f1181545 Author: Trond Myklebust Date: Fri Dec 4 15:16:46 2020 -0500 SUNRPC: Fixes for xdr_align_data() The main use case right now for xdr_align_data() is to shift the page data to the left, and in practice shrink the total XDR data buffer. This patch ensures that we fix up the accounting for the buffer length as we shift that data around. Signed-off-by: Trond Myklebust commit c54e959b36cbdb0cb2f2805e3e945dd83476a5c7 Author: Trond Myklebust Date: Mon Dec 7 13:30:46 2020 -0500 SUNRPC: _shift_data_left/right_pages should check the shift length Exit early if the shift is zero. Signed-off-by: Trond Myklebust commit 1f70ea700909d77d5658c33b6bf13e9123416ff1 Author: Geliang Tang Date: Mon Dec 7 17:03:52 2020 +0800 NFSv4.1: use BITS_PER_LONG macro in nfs4session.h Use the existing BITS_PER_LONG macro instead of calculating the value. Signed-off-by: Geliang Tang Signed-off-by: Trond Myklebust commit 15261b9126cd5bb2ad8521da49d8f5c042d904c7 Author: Chuck Lever Date: Tue Dec 8 18:29:02 2020 -0500 xprtrdma: Fix XDRBUF_SPARSE_PAGES support Olga K. observed that rpcrdma_marsh_req() allocates sparse pages only when it has determined that a Reply chunk is necessary. There are plenty of cases where no Reply chunk is needed, but the XDRBUF_SPARSE_PAGES flag is set. The result would be a crash in rpcrdma_inline_fixup() when it tries to copy parts of the received Reply into a missing page. To avoid crashing, handle sparse page allocation up front. Until XATTR support was added, this issue did not appear often because the only SPARSE_PAGES consumer always expected a reply large enough to always require a Reply chunk. Reported-by: Olga Kornievskaia Signed-off-by: Chuck Lever Cc: Signed-off-by: Trond Myklebust commit a1f26739ccdcc6967617998bd200dd907f7ff80a Author: Frank van der Linden Date: Wed Dec 2 00:34:11 2020 +0000 NFSv4.2: improve page handling for GETXATTR XDRBUF_SPARSE_PAGES can cause problems for the RDMA transport, and it's easy enough to allocate enough pages for the request up front, so do that. Also, since we've allocated the pages anyway, use the full page aligned length for the receive buffer. This will allow caching of valid replies that are too large for the caller, but that still fit in the allocated pages. Signed-off-by: Frank van der Linden Signed-off-by: Trond Myklebust commit ac9645c87380e39a8fa87a1b51721efcdea89dbf Author: Dan Aloni Date: Sat Dec 5 11:28:35 2020 +0200 sunrpc: fix xs_read_xdr_buf for partial pages receive When receiving pages data, return value 'ret' when positive includes `buf->page_base`, so we should subtract that before it is used for changing `offset` and comparing against `want`. This was discovered on the very rare cases where the server returned a chunk of bytes that when added to the already received amount of bytes for the pages happened to match the current `recv.len`, for example on this case: buf->page_base : 258356 actually received from socket: 1740 ret : 260096 want : 260096 In this case neither of the two 'if ... goto out' trigger, and we continue to tail parsing. Worth to mention that the ensuing EMSGSIZE from the continued execution of `xs_read_xdr_buf` may be observed by an application due to 4 superfluous bytes being added to the pages data. Fixes: 277e4ab7d530 ("SUNRPC: Simplify TCP receive code by switching to using iterators") Signed-off-by: Dan Aloni Signed-off-by: Trond Myklebust commit f84b799996e29ad3b37e83f7871e79023f29979d Merge: 0385979a30dc4 479f58dda25bb 77429eebd9b1a 706657b1febf4 Author: Borislav Petkov Date: Mon Dec 14 11:51:46 2020 +0100 Merge branches 'edac-spr', 'edac-igen6' and 'edac-misc' into edac-updates-for-v5.11 Signed-off-by: Borislav Petkov commit 1c728719a4da6e654afb9cc047164755072ed7c9 Author: Pawel Wieczorkiewicz Date: Mon Dec 14 10:25:57 2020 +0100 xen-blkback: set ring->xenblkd to NULL after kthread_stop() When xen_blkif_disconnect() is called, the kernel thread behind the block interface is stopped by calling kthread_stop(ring->xenblkd). The ring->xenblkd thread pointer being non-NULL determines if the thread has been already stopped. Normally, the thread's function xen_blkif_schedule() sets the ring->xenblkd to NULL, when the thread's main loop ends. However, when the thread has not been started yet (i.e. wake_up_process() has not been called on it), the xen_blkif_schedule() function would not be called yet. In such case the kthread_stop() call returns -EINTR and the ring->xenblkd remains dangling. When this happens, any consecutive call to xen_blkif_disconnect (for example in frontend_changed() callback) leads to a kernel crash in kthread_stop() (e.g. NULL pointer dereference in exit_creds()). This is XSA-350. Cc: # 4.12 Fixes: a24fa22ce22a ("xen/blkback: don't use xen_blkif_get() in xen-blkback kthread") Reported-by: Olivier Benjamin Reported-by: Pawel Wieczorkiewicz Signed-off-by: Pawel Wieczorkiewicz Reviewed-by: Julien Grall Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross commit 356b01a986a5550ee16dd0b85306c6741f2d02d5 Author: Luo Jiaxing Date: Mon Dec 14 16:24:13 2020 +0800 gpio: gpio-hisi: Add HiSilicon GPIO support This GPIO driver is for HiSilicon's ARM SoC. HiSilicon's GPIO controller support double-edge interrupt and multi-core concurrent access. ACPI table example for this GPIO controller: Device (GPO0) { Name (_HID, "HISI0184") Device (PRTA) { Name (_ADR, Zero) Name (_UID, Zero) Name (_DSD, Package (0x01) { Package (0x02) { "ngpios", 0x20 } }) } } Signed-off-by: Luo Jiaxing Link: https://lore.kernel.org/r/1607934255-52544-2-git-send-email-luojiaxing@huawei.com Signed-off-by: Linus Walleij commit 9996bd494794a2fe393e97e7a982388c6249aa76 Author: SeongJae Park Date: Mon Dec 14 10:08:40 2020 +0100 xenbus/xenbus_backend: Disallow pending watch messages 'xenbus_backend' watches 'state' of devices, which is writable by guests. Hence, if guests intensively updates it, dom0 will have lots of pending events that exhausting memory of dom0. In other words, guests can trigger dom0 memory pressure. This is known as XSA-349. However, the watch callback of it, 'frontend_changed()', reads only 'state', so doesn't need to have the pending events. To avoid the problem, this commit disallows pending watch messages for 'xenbus_backend' using the 'will_handle()' watch callback. This is part of XSA-349 Cc: stable@vger.kernel.org Signed-off-by: SeongJae Park Reported-by: Michael Kurth Reported-by: Pawel Wieczorkiewicz Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross commit 3dc86ca6b4c8cfcba9da7996189d1b5a358a94fc Author: SeongJae Park Date: Mon Dec 14 10:07:13 2020 +0100 xen/xenbus: Count pending messages for each watch This commit adds a counter of pending messages for each watch in the struct. It is used to skip unnecessary pending messages lookup in 'unregister_xenbus_watch()'. It could also be used in 'will_handle' callback. This is part of XSA-349 Cc: stable@vger.kernel.org Signed-off-by: SeongJae Park Reported-by: Michael Kurth Reported-by: Pawel Wieczorkiewicz Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross commit be987200fbaceaef340872841d4f7af2c5ee8dc3 Author: SeongJae Park Date: Mon Dec 14 10:05:47 2020 +0100 xen/xenbus/xen_bus_type: Support will_handle watch callback This commit adds support of the 'will_handle' watch callback for 'xen_bus_type' users. This is part of XSA-349 Cc: stable@vger.kernel.org Signed-off-by: SeongJae Park Reported-by: Michael Kurth Reported-by: Pawel Wieczorkiewicz Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross commit 2e85d32b1c865bec703ce0c962221a5e955c52c2 Author: SeongJae Park Date: Mon Dec 14 10:04:18 2020 +0100 xen/xenbus: Add 'will_handle' callback support in xenbus_watch_path() Some code does not directly make 'xenbus_watch' object and call 'register_xenbus_watch()' but use 'xenbus_watch_path()' instead. This commit adds support of 'will_handle' callback in the 'xenbus_watch_path()' and it's wrapper, 'xenbus_watch_pathfmt()'. This is part of XSA-349 Cc: stable@vger.kernel.org Signed-off-by: SeongJae Park Reported-by: Michael Kurth Reported-by: Pawel Wieczorkiewicz Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross commit fed1755b118147721f2c87b37b9d66e62c39b668 Author: SeongJae Park Date: Mon Dec 14 10:02:45 2020 +0100 xen/xenbus: Allow watches discard events before queueing If handling logics of watch events are slower than the events enqueue logic and the events can be created from the guests, the guests could trigger memory pressure by intensively inducing the events, because it will create a huge number of pending events that exhausting the memory. Fortunately, some watch events could be ignored, depending on its handler callback. For example, if the callback has interest in only one single path, the watch wouldn't want multiple pending events. Or, some watches could ignore events to same path. To let such watches to volutarily help avoiding the memory pressure situation, this commit introduces new watch callback, 'will_handle'. If it is not NULL, it will be called for each new event just before enqueuing it. Then, if the callback returns false, the event will be discarded. No watch is using the callback for now, though. This is part of XSA-349 Cc: stable@vger.kernel.org Signed-off-by: SeongJae Park Reported-by: Michael Kurth Reported-by: Pawel Wieczorkiewicz Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross commit 175b8d89fe292796811fdee87fa39799a5b6b87a Author: Takashi Iwai Date: Wed Dec 9 09:45:52 2020 +0100 ALSA: pcm: oss: Fix potential out-of-bounds shift syzbot spotted a potential out-of-bounds shift in the PCM OSS layer where it calculates the buffer size with the arbitrary shift value given via an ioctl. Add a range check for avoiding the undefined behavior. As the value can be treated by a signed integer, the max shift should be 30. Reported-by: syzbot+df7dc146ebdd6435eea3@syzkaller.appspotmail.com Cc: Link: https://lore.kernel.org/r/20201209084552.17109-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit 43d5ca88dfcd35e43010fdd818e067aa9a55f5ba Author: Takashi Iwai Date: Wed Dec 9 09:45:51 2020 +0100 ALSA: usb-audio: Fix potential out-of-bounds shift syzbot spotted a potential out-of-bounds shift in the USB-audio format parser that receives the arbitrary shift value from the USB descriptor. Add a range check for avoiding the undefined behavior. Reported-by: syzbot+df7dc146ebdd6435eea3@syzkaller.appspotmail.com Cc: Link: https://lore.kernel.org/r/20201209084552.17109-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit e5fab13a7c54b8e69ea3bb27067eb06aba5f19b5 Merge: d84489e374f5b c6dde8ffd071a Author: Takashi Iwai Date: Mon Dec 14 09:05:24 2020 +0100 Merge branch 'for-linus' into for-next Signed-off-by: Takashi Iwai commit 115ff12aecfd55376d704fa2c0a2d117e5827f9f Author: Peter Ujfalusi Date: Mon Dec 14 08:54:21 2020 +0200 soc: ti: k3-ringacc: Use correct error casting in k3_ringacc_dmarings_init Use ERR_CAST() when devm_ioremap_resource() fails. Reported-by: kernel test robot Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20201214065421.5138-1-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit a2a52a8a3601c37a68b31b734f5a06af8a7903f1 Author: Ronnie Sahlberg Date: Tue Nov 10 09:12:31 2020 +1000 cifs: get rid of cifs_sb->mountdata as we now have a full smb3_fs_context as part of the cifs superblock we no longer need a local copy of the mount options and can just reference the copy in the smb3_fs_context. Signed-off-by: Ronnie Sahlberg Reviewed-by: Shyam Prasad N Signed-off-by: Steve French commit d17abdf7566566fc402c31899b353044a7ff3cf4 Author: Ronnie Sahlberg Date: Tue Nov 10 08:59:26 2020 +1000 cifs: add an smb3_fs_context to cifs_sb and populate it during mount in cifs_smb3_do_mount() Signed-off-by: Ronnie Sahlberg Reviewed-by: Shyam Prasad N Signed-off-by: Steve French commit 4deb075985ec52961cf43666cd9e12af1241b3cf Author: Ronnie Sahlberg Date: Thu Dec 10 00:08:43 2020 -0600 cifs: remove the devname argument to cifs_compose_mount_options none of the callers use this argument any more. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 24e0a1eff9e2b9835a6e7c17039dfb6ecfd81f1f Author: Ronnie Sahlberg Date: Thu Dec 10 00:06:02 2020 -0600 cifs: switch to new mount api See Documentation/filesystems/mount_api.rst for details on new mount API Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 66e7b09c731175064de5a3682c692ec166e02499 Author: Ronnie Sahlberg Date: Thu Nov 5 13:58:14 2020 +1000 cifs: move cifs_parse_devname to fs_context.c Also rename the function from cifs_ to smb3_ Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 15c7d09af2156ee84018cc8ba08c4a0218acb55e Author: Ronnie Sahlberg Date: Mon Nov 2 10:59:55 2020 +1000 cifs: move the enum for cifs parameters into fs_context.h No change to logic, just moving the enum of cifs mount parms into a header Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 837e3a1bbfdc105216972c83f693e96969c62351 Author: Ronnie Sahlberg Date: Mon Nov 2 09:36:24 2020 +1000 cifs: rename dup_vol to smb3_fs_context_dup and move it into fs_context.c Continue restructuring needed for support of new mount API Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 3fa1c6d1b8f5c3d9be9e8047ad894ab3de67dc6e Author: Ronnie Sahlberg Date: Wed Dec 9 23:07:12 2020 -0600 cifs: rename smb_vol as smb3_fs_context and move it to fs_context.h Harmonize and change all such variables to 'ctx', where possible. No changes to actual logic. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 7955f105afb6034af344038d663bc98809483cdd Author: Steve French Date: Wed Dec 9 22:19:00 2020 -0600 SMB3.1.1: do not log warning message if server doesn't populate salt In the negotiate protocol preauth context, the server is not required to populate the salt (although it is done by most servers) so do not warn on mount. We retain the checks (warn) that the preauth context is the minimum size and that the salt does not exceed DataLength of the SMB response. Although we use the defaults in the case that the preauth context response is invalid, these checks may be useful in the future as servers add support for additional mechanisms. CC: Stable Reviewed-by: Shyam Prasad N Reviewed-by: Pavel Shilovsky Signed-off-by: Steve French commit 145024e3e4a32353420660ec689fb98c960ac3c8 Author: Steve French Date: Wed Dec 9 21:25:13 2020 -0600 SMB3.1.1: update comments clarifying SPNEGO info in negprot response Trivial changes to clarify confusing comment about SPNEGO blog (and also one length comparisons in negotiate context parsing). Suggested-by: Tom Talpey Suggested-by: Pavel Shilovsky Signed-off-by: Steve French commit f2156d35c9584a4afdb71de4bc24b3fef674a63d Author: Shyam Prasad N Date: Mon Nov 9 06:12:49 2020 -0800 cifs: Enable sticky bit with cifsacl mount option. For the cifsacl mount option, we did not support sticky bits. With this patch, we do support it, by setting the DELETE_CHILD perm on the directory only for the owner user. When sticky bit is not enabled, allow DELETE_CHILD perm for everyone. Signed-off-by: Shyam Prasad N Signed-off-by: Steve French commit 0f22053e811ca5dd5d51b919741e02396ea600f3 Author: Shyam Prasad N Date: Mon Aug 17 03:23:12 2020 -0700 cifs: Fix unix perm bits to cifsacl conversion for "other" bits. With the "cifsacl" mount option, the mode bits set on the file/dir is converted to corresponding ACEs in DACL. However, only the ALLOWED ACEs were being set for "owner" and "group" SIDs. Since owner is a subset of group, and group is a subset of everyone/world SID, in order to properly emulate unix perm groups, we need to add DENIED ACEs. If we don't do that, "owner" and "group" SIDs could get more access rights than they should. Which is what was happening. This fixes it. We try to keep the "preferred" order of ACEs, i.e. DENYs followed by ALLOWs. However, for a small subset of cases we cannot maintain the preferred order. In that case, we'll end up with the DENY ACE for group after the ALLOW for the owner. If owner SID == group SID, use the more restrictive among the two perm bits and convert them to ACEs. Also, for reverse mapping, i.e. to convert ACL to unix perm bits, for the "others" bits, we needed to add the masked bits of the owner and group masks to others mask. Updated version of patch fixes a problem noted by the kernel test robot. Reported-by: kernel test robot Signed-off-by: Shyam Prasad N Signed-off-by: Steve French commit bc7c4129d4cdc56d1b5477c1714246f27df914dd Author: Steve French Date: Wed Dec 9 01:12:35 2020 -0600 SMB3.1.1: remove confusing mount warning when no SPNEGO info on negprot rsp Azure does not send an SPNEGO blob in the negotiate protocol response, so we shouldn't assume that it is there when validating the location of the first negotiate context. This avoids the potential confusing mount warning: CIFS: Invalid negotiate context offset CC: Stable Reviewed-by: Pavel Shilovsky Signed-off-by: Steve French commit ebcd6de98754d9b6a5f89d7835864b1c365d432f Author: Steve French Date: Tue Dec 8 21:13:31 2020 -0600 SMB3: avoid confusing warning message on mount to Azure Mounts to Azure cause an unneeded warning message in dmesg "CIFS: VFS: parse_server_interfaces: incomplete interface info" Azure rounds up the size (by 8 additional bytes, to a 16 byte boundary) of the structure returned on the query of the server interfaces at mount time. This is permissible even though different than other servers so do not log a warning if query network interfaces response is only rounded up by 8 bytes or fewer. CC: Stable Reviewed-by: Ronnie Sahlberg Signed-off-by: Steve French commit 21ac58f495849844dfb4479cda1427bf42493262 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:24:14 2020 -0600 cifs: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break/goto statements instead of just letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Steve French commit 11385539c024b6071dce538123a2043a8f52c9a1 Author: Johannes Berg Date: Sun Dec 13 22:18:18 2020 +0100 um: time-travel: Correct time event IRQ delivery Lockdep (on 5.10-rc) points out that we're delivering IRQs while IRQs are not even enabled, which clearly shouldn't happen. Defer the time event IRQ delivery until they actually are enabled. Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger commit cae20ba0a16cdb2c6d218ea3519bb0942f287b69 Author: Johannes Berg Date: Fri Dec 11 10:56:07 2020 +0100 um: irq/sigio: Support suspend/resume handling of workaround IRQs If the sigio workaround needed to be applied to a file descriptor, set_irq_wake() wouldn't work for it since it would get polled by the thread instead of causing SIGIO, and thus could never really cause a wakeup, since the thread notification FD wasn't marked as being able to wake up the system. Fix this by marking the thread's notification FD explicitly as a wake source FD, i.e. not suppressing SIGIO for it in suspend. In order to not cause spurious wakeups, we then need to remove all FDs that shouldn't wake up the system from the polling thread. In order to do this, add unlocked versions of ignore_sigio_fd() and add_sigio_fd() (nothing else is happening in suspend, so this is fine), and also modify ignore_sigio_fd() to return -ENOENT if the FD wasn't originally in there. This doesn't matter because nothing else currently checks the return value, but the irq code needs to know which ones to restore the workaround for. All told, this lets us use a timerfd for the RTC clock in the next patch, which doesn't send SIGIO. Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger commit 452f94cecff692a76eaaa9330fca03fe0f204f6f Author: Johannes Berg Date: Fri Dec 11 09:01:14 2020 +0100 um: time-travel: Actually apply "free-until" optimisation Due a bug - we never checked the time_travel_ext_free_until value - we were always requesting time for every single scheduling. This adds up since we make reading time cost 256ns, and it's a fairly common call. Fix this. While at it, also make reading time only cost something when we're not currently waiting for our scheduling turn - otherwise things get mixed up in a very confusing way. We should never get here, since we're not actually running, but it's possible if you stick printk() or such into the virtio code that must handle the external interrupts. Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger commit 9431f7c199ab0d02da1482d62255e0b4621cb1b5 Author: Anton Ivanov Date: Mon Dec 7 17:19:40 2020 +0000 um: chan_xterm: Fix fd leak xterm serial channel was leaking a fd used in setting up the port helper This bug is prehistoric - it predates switching to git. The "fixes" header here is really just to mark all the versions we would like this to apply to which is "Anything from the Cretaceous period onwards". No dinosaurs were harmed in fixing this bug. Fixes: b40997b872cd ("um: drivers/xterm.c: fix a file descriptor leak") Signed-off-by: Anton Ivanov Signed-off-by: Richard Weinberger commit 9b1c0c0e25dcccafd30e7d4c150c249cc65550eb Author: Anton Ivanov Date: Mon Dec 7 17:19:39 2020 +0000 um: tty: Fix handling of close in tty lines Fix a logical error in tty reading. We get 0 and errno == EAGAIN on the first attempt to read from a closed file descriptor. Compared to that a true EAGAIN is EAGAIN and -1. If we check errno for EAGAIN first, before checking the return value we miss the fact that the descriptor is closed. This bug is as old as the driver. It was not showing up with the original POLL based IRQ controller, because it was producing multiple events. Switching to EPOLL unmasked it. Fixes: ff6a17989c08 ("Epoll based IRQ controller") Signed-off-by: Anton Ivanov Signed-off-by: Richard Weinberger commit e3a01cbee9c5f2c6fc813dd6af007716e60257e7 Author: Anton Ivanov Date: Mon Dec 7 17:19:38 2020 +0000 um: Monitor error events in IRQ controller Ensure that file closes, connection closes, etc are propagated as interrupts in the interrupt controller. Fixes: ff6a17989c08 ("Epoll based IRQ controller") Signed-off-by: Anton Ivanov Signed-off-by: Richard Weinberger commit ef4459a6da0955b533ebfc97a7d756ac090f50c9 Author: Johannes Berg Date: Sat Dec 5 21:50:18 2020 +0100 um: allocate a guard page to helper threads We've been running into stack overflows in helper threads corrupting memory (e.g. because somebody put printf() or os_info() there), so to avoid those causing hard-to-debug issues later on, allocate a guard page for helper thread stacks and mark it read-only. Unfortunately, the crash dump at that point is useless as the stack tracer will try to backtrace the *kernel* thread, not the helper thread, but at least we don't survive to a random issue caused by corruption. Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger commit 963285b0b47a1b8e1dfa5481717855a7057ccec6 Author: Johannes Berg Date: Sat Dec 5 21:50:17 2020 +0100 um: support some of ARCH_HAS_SET_MEMORY For now, only support set_memory_ro()/rw() which we need for the stack protection in the next patch. Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger commit 58b09f68697066dfde948153c82dd5d85e10f127 Author: Johannes Berg Date: Fri Dec 4 12:34:34 2020 +0100 um: time-travel: avoid multiple identical propagations If there is some kind of interrupt negotation or such then it may happen that we send an update message multiple times, avoid that in the interest of efficiency by storing the last transmitted value and only sending a new update if it's not the same as the last update. Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger commit 3c6ac61bc91ea39031f020c973a91db0aee10fde Author: Anton Ivanov Date: Tue Nov 10 13:02:21 2020 +0000 um: Fetch registers only for signals which need them UML userspace fetches siginfo and passes it to signal handlers in UML. This is needed only for some of the signals, because key handlers like SIGIO make no use of this variable. Signed-off-by: Anton Ivanov Signed-off-by: Richard Weinberger commit a374b7cb1ea648a27ceaa2dea19aa967725e938b Author: Johannes Berg Date: Wed Dec 2 20:58:07 2020 +0100 um: Support suspend to RAM With all the previous bits in place, we can now also support suspend to RAM, in the sense that everything is suspended, not just most, including userspace, processes like in s2idle. Since um_idle_sleep() now waits forever, we can simply call that to "suspend" the system. As before, you can wake it up using SIGUSR1 since we're just in a pause() call that only needs to return. In order to implement selective resume from certain devices, and not have any arbitrary device interrupt wake up, suspend interrupts by removing SIGIO notification (O_ASYNC) from all the FDs that are not supposed to wake up the system. However, swap out the handler so we don't actually handle the SIGIO as an interrupt. Since we're in pause(), the mere act of receiving SIGIO wakes us up, and then after things have been restored enough, re-set O_ASYNC for all previously suspended FDs, reinstall the proper SIGIO handler, and send SIGIO to self to process anything that might now be pending. Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger commit 92dcd3d31843fbe1a95d880dc912e1f6beac6632 Author: Johannes Berg Date: Wed Dec 2 20:58:06 2020 +0100 um: Allow PM with suspend-to-idle In order to be able to experiment with suspend in UML, add the minimal work to be able to suspend (s2idle) an instance of UML, and be able to wake it back up from that state with the USR1 signal sent to the main UML process. Signed-off-by: Johannes Berg Acked-By: Anton Ivanov Signed-off-by: Richard Weinberger commit 2701c1bd91dda815b8541aa8c23e1e548cdb6349 Author: Johannes Berg Date: Wed Dec 2 20:58:05 2020 +0100 um: time: Fix read_persistent_clock64() in time-travel In time-travel mode, we've relied on read_persistent_clock64() being called only once at system startup, but this is both the right thing to call from the pseudo-RTC, and also gets called by the timekeeping core during suspend/resume. Thus, fix this to always fall make use of the time_travel_time in any time-travel mode, initializing time_travel_start at boot to the right value depending on the time-travel mode. Signed-off-by: Johannes Berg Acked-By: Anton Ivanov Signed-off-by: Richard Weinberger commit 49da38a3ef330b7a1643e12c51913d58158e5abe Author: Johannes Berg Date: Wed Dec 2 20:58:04 2020 +0100 um: Simplify os_idle_sleep() and sleep longer There really is no reason to pass the amount of time we should sleep, especially since it's just hard-coded to one second. Additionally, one second isn't really all that long, and as we are expecting to be woken up by a signal, we can sleep longer and avoid doing some work every second, so replace the current clock_nanosleep() with just an empty select() that can _only_ be woken up by a signal. We can also remove the deliver_alarm() since we don't need to do that when we got e.g. SIGIO that woke us up, and if we got SIGALRM the signal handler will actually (have) run, so it's just unnecessary extra work. Similarly, in time-travel mode, just program the wakeup event from idle to be S64_MAX, which is basically the most you could ever simulate to. Of course, you should already have an event in the list that's earlier and will cause a wakeup, normally that's the regular timer interrupt, though in suspend it may (later) also be an RTC event. Since actually getting to this point would be a bug and you can't ever get out again, panic() on it in the time control code. Signed-off-by: Johannes Berg Acked-By: Anton Ivanov Signed-off-by: Richard Weinberger commit 3032b94587c78c52173a9b8488d15528481ffcdb Author: Johannes Berg Date: Wed Dec 2 12:59:56 2020 +0100 um: Simplify IRQ handling code Reduce dynamic allocations (and thereby cache misses) by simply embedding the registration data for IRQs in the irq_entry, we never supported these being really dynamic anyway as only one was ever allowed ("Trying to reregister ..."). Lockless behaviour is preserved by removing the FD from the poll set appropriately, but we use reg->events to indicate whether or not this entry is used, rather than dynamically allocating them. Also port the list of IRQ entries to list_head instead of the current open-coded singly-linked list implementation, just for sanity. Signed-off-by: Johannes Berg Acked-By: Anton Ivanov Signed-off-by: Richard Weinberger commit 2fccfcc0c742625c01e6a3913f4fc2d330541fbb Author: Johannes Berg Date: Wed Dec 2 12:59:55 2020 +0100 um: Remove IRQ_NONE type We don't actually use this in um_request_irq(), so it can never be assigned. It's also not clear what that would be useful for, so just remove it. This results in quite a number of cleanups, all the way to removing the "SIGIO on close" startup check, since the data it assigns (pty_close_sigio) is not used anymore. While at it, also make this an enum so we get a minimum of type checking, and remove the IRQ_NONE hack in virtio since we now no longer have the name twice. Acked-By: Anton Ivanov Signed-off-by: Johannes Berg Acked-By: Anton Ivanov Signed-off-by: Richard Weinberger commit 0737402f42d3cdc7b7ef27e8cc7caf1e9ba2a2bc Author: Johannes Berg Date: Wed Dec 2 12:59:54 2020 +0100 um: irq: Reduce irq_reg allocation We don't need an array of 4 entries to capture three and the name 'MAX_IRQ_TYPE' really gets confusing as well. Remove it and add a correct NUM_IRQ_TYPES, and use that correctly. Signed-off-by: Johannes Berg Acked-By: Anton Ivanov Signed-off-by: Richard Weinberger commit 458e1f7da004ec264cf2a9252822955ba4f7e9a0 Author: Johannes Berg Date: Wed Dec 2 12:59:53 2020 +0100 um: irq: Clean up and rename struct irq_fd This really shouldn't be called "irq_fd" since it doesn't carry an fd. Well, it used to, apparently, but that struct member is unused. Rename it to "irq_reg" since it more accurately reflects a registered interrupt, and remove the unused 'next' and 'fd' members from the struct as well. While at it, also move it to the implementation, it's not used anywhere else, and the header file is shared with the userspace components. Acked-By: Anton Ivanov Signed-off-by: Johannes Berg Acked-By: Anton Ivanov Signed-off-by: Richard Weinberger commit 0ede3c05eec875d05a397d16808857492d206dcf Author: Johannes Berg Date: Wed Dec 2 12:59:52 2020 +0100 um: Clean up alarm IRQ chip name We don't use "SIGVTALRM", it's just SIGALRM. Clean up the naming. While at it, fix the comment's grammar. Acked-By: Anton Ivanov Signed-off-by: Johannes Berg Acked-By: Anton Ivanov Signed-off-by: Richard Weinberger commit aaf5800e249fc4f4a89d1025ef7f0b330fb64cb8 Author: Johannes Berg Date: Wed Dec 2 12:59:51 2020 +0100 um: virtio: Use dynamic IRQ allocation This separates the devices, which is better for debug and for later suspend/resume and wakeup support, since there we'll have to separate which IRQs can wake up the system and which cannot. Acked-By: Anton Ivanov Signed-off-by: Johannes Berg Acked-By: Anton Ivanov Signed-off-by: Richard Weinberger commit 36d46a5907ba170965307c9d106cc35517acbf33 Author: Johannes Berg Date: Wed Dec 2 12:59:50 2020 +0100 um: Support dynamic IRQ allocation It's cumbersome and error-prone to keep adding fixed IRQ numbers, and for proper device wakeup support for the virtio/vhost-user support we need to have different IRQs for each device. Even if in theory two IRQs (with and without wake) might be sufficient, it's much easier to reason about it when we have dynamic number assignment. It also makes it easier to add new devices that may dynamically exist or depending on the configuration, etc. Add support for this, up to 64 IRQs (the same limit as epoll FDs we have right now). Since it's not easy to port all the existing places to dynamic allocation (some data is statically initialized) keep the low numbers are reserved for the existing hard-coded IRQ numbers. Acked-By: Anton Ivanov Signed-off-by: Johannes Berg Acked-By: Anton Ivanov Signed-off-by: Richard Weinberger commit d66c91836b8d7df3b6f0fe7f0c7617d28ebfcb4c Author: Johannes Berg Date: Mon Nov 23 20:44:02 2020 +0100 um: sigio: Return error from add_sigio_fd() If we run out of space, return an error instead of 0. Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger commit ef3ba87cb7c911bb5073e9ad30c4b37369e1a060 Author: Christopher Obbard Date: Mon Nov 23 18:31:37 2020 +0000 um: ubd: Set device serial attribute from cmdline Adds the ability to set the UBD device serial number from the commandline, disabling the serial number functionality by default. In some cases it may be useful to set a serial to the UBD device, such that downstream users (i.e. udev) can use this information to better describe the hardware to the user from the UML cmdline. In our case we use this parameter to create some entries under /dev/disk/by-ubd-id/ for each of the UBD devices passed through the UML cmdline. Signed-off-by: Christopher Obbard Signed-off-by: Richard Weinberger commit 517f60206ee5d5f75c44bd9c8b1683d1d18a616a Author: Andy Shevchenko Date: Wed Dec 9 20:19:15 2020 +0200 um: Increase stack frame size threshold for signal.c The signal.c can't use heap for bit data located on stack. However, by default a compiler warns us about overstepping stack frame size threshold: arch/um/os-Linux/signal.c: In function ‘sig_handler_common’: arch/um/os-Linux/signal.c:51:1: warning: the frame size of 2960 bytes is larger than 2048 bytes [-Wframe-larger-than=] 51 | } | ^ arch/um/os-Linux/signal.c: In function ‘timer_real_alarm_handler’: arch/um/os-Linux/signal.c:95:1: warning: the frame size of 2960 bytes is larger than 2048 bytes [-Wframe-larger-than=] 95 | } | ^ Due to above increase stack frame size threshold explicitly for signal.c to avoid unnecessary warning. Signed-off-by: Andy Shevchenko Tested-by: David Gow Signed-off-by: Richard Weinberger commit f4ab7818ef7add1e10b33d8c3a4fe44858b7f6e9 Author: Johannes Berg Date: Fri Dec 4 16:22:44 2020 +0100 um: line: Don't free winch (with IRQ) under spinlock Lockdep correctly complains that one shouldn't call um_free_irq() with free_irq() inside under a spinlock since that will attempt to acquire a mutex. Rearrange the code to keep the list manipulations under the lock while moving the actual freeing outside of it, to avoid this. In particular, this removes the lockdep complaint at shutdown that I was seeing with lockdep enabled. Signed-off-by: Johannes Berg Acked-By: anton.ivanov@cambridgegreys.com Signed-off-by: Richard Weinberger commit fc6b6a872dcd48c6f39c7975836d75113db67d37 Author: Gabriel Krisman Bertazi Date: Sat Nov 21 23:13:56 2020 -0500 um: ubd: Submit all data segments atomically Internally, UBD treats each physical IO segment as a separate command to be submitted in the execution pipe. If the pipe returns a transient error after a few segments have already been written, UBD will tell the block layer to requeue the request, but there is no way to reclaim the segments already submitted. When a new attempt to dispatch the request is done, those segments already submitted will get duplicated, causing the WARN_ON below in the best case, and potentially data corruption. In my system, running a UML instance with 2GB of RAM and a 50M UBD disk, I can reproduce the WARN_ON by simply running mkfs.fvat against the disk on a freshly booted system. There are a few ways to around this, like reducing the pressure on the pipe by reducing the queue depth, which almost eliminates the occurrence of the problem, increasing the pipe buffer size on the host system, or by limiting the request to one physical segment, which causes the block layer to submit way more requests to resolve a single operation. Instead, this patch modifies the format of a UBD command, such that all segments are sent through a single element in the communication pipe, turning the command submission atomic from the point of view of the block layer. The new format has a variable size, depending on the number of elements, and looks like this: +------------+-----------+-----------+------------ | cmd_header | segment 0 | segment 1 | segment ... +------------+-----------+-----------+------------ With this format, we push a pointer to cmd_header in the submission pipe. This has the advantage of reducing the memory footprint of executing a single request, since it allow us to merge some fields in the header. It is possible to reduce even further each segment memory footprint, by merging bitmap_words and cow_offset, for instance, but this is not the focus of this patch and is left as future work. One issue with the patch is that for a big number of segments, we now perform one big memory allocation instead of multiple small ones, but I wasn't able to trigger any real issues or -ENOMEM because of this change, that wouldn't be reproduced otherwise. This was tested using fio with the verify-crc32 option, and by running an ext4 filesystem over this UBD device. The original WARN_ON was: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 0 at lib/refcount.c:28 refcount_warn_saturate+0x13f/0x141 refcount_t: underflow; use-after-free. Modules linked in: CPU: 0 PID: 0 Comm: swapper Not tainted 5.5.0-rc6-00002-g2a5bb2cf75c8 #346 Stack: 6084eed0 6063dc77 00000009 6084ef60 00000000 604b8d9f 6084eee0 6063dcbc 6084ef40 6006ab8d e013d780 1c00000000 Call Trace: [<600a0c1c>] ? printk+0x0/0x94 [<6004a888>] show_stack+0x13b/0x155 [<6063dc77>] ? dump_stack_print_info+0xdf/0xe8 [<604b8d9f>] ? refcount_warn_saturate+0x13f/0x141 [<6063dcbc>] dump_stack+0x2a/0x2c [<6006ab8d>] __warn+0x107/0x134 [<6008da6c>] ? wake_up_process+0x17/0x19 [<60487628>] ? blk_queue_max_discard_sectors+0x0/0xd [<6006b05f>] warn_slowpath_fmt+0xd1/0xdf [<6006af8e>] ? warn_slowpath_fmt+0x0/0xdf [<600acc14>] ? raw_read_seqcount_begin.constprop.0+0x0/0x15 [<600619ae>] ? os_nsecs+0x1d/0x2b [<604b8d9f>] refcount_warn_saturate+0x13f/0x141 [<6048bc8f>] refcount_sub_and_test.constprop.0+0x2f/0x37 [<6048c8de>] blk_mq_free_request+0xf1/0x10d [<6048ca06>] __blk_mq_end_request+0x10c/0x114 [<6005ac0f>] ubd_intr+0xb5/0x169 [<600a1a37>] __handle_irq_event_percpu+0x6b/0x17e [<600a1b70>] handle_irq_event_percpu+0x26/0x69 [<600a1bd9>] handle_irq_event+0x26/0x34 [<600a1bb3>] ? handle_irq_event+0x0/0x34 [<600a5186>] ? unmask_irq+0x0/0x37 [<600a57e6>] handle_edge_irq+0xbc/0xd6 [<600a131a>] generic_handle_irq+0x21/0x29 [<60048f6e>] do_IRQ+0x39/0x54 [...] ---[ end trace c6e7444e55386c0f ]--- Cc: Christopher Obbard Reported-by: Martyn Welch Signed-off-by: Gabriel Krisman Bertazi Tested-by: Christopher Obbard Acked-by: Anton Ivanov Signed-off-by: Richard Weinberger commit ff9632d2a66512436d616ef4c380a0e73f748db1 Author: Johannes Berg Date: Fri Nov 20 21:08:51 2020 +0100 um: Fix time-travel mode Since the time-travel rework, basic time-travel mode hasn't worked properly, but there's no longer a need for this WARN_ON() so just remove it and thereby fix things. Cc: stable@vger.kernel.org Fixes: 4b786e24ca80 ("um: time-travel: Rewrite as an event scheduler") Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger commit 97be7ceaf7fea68104824b6aa874cff235333ac1 Author: Anton Ivanov Date: Fri Nov 13 10:26:17 2020 +0000 um: Remove use of asprinf in umid.c asprintf is not compatible with the existing uml memory allocation mechanism. Its use on the "user" side of UML results in a corrupt slab state. Fixes: 0d4e5ac7e780 ("um: remove uses of variable length arrays") Cc: stable@vger.kernel.org Signed-off-by: Anton Ivanov Signed-off-by: Richard Weinberger commit 09041c92f0aacbb6f5a252351d6e0a9e0ee9bcc5 Author: Jens Axboe Date: Thu Oct 29 10:23:12 2020 -0600 um: Add support for TIF_NOTIFY_SIGNAL Wire up TIF_NOTIFY_SIGNAL handling for um. Cc: linux-um@lists.infradead.org Signed-off-by: Jens Axboe Acked-By: Anton Ivanov Signed-off-by: Richard Weinberger commit 72d3e093afae79611fa38f8f2cfab9a888fe66f2 Author: Christopher Obbard Date: Tue Oct 27 15:30:22 2020 +0000 um: random: Register random as hwrng-core device The UML random driver creates a dummy device under the guest, /dev/hw_random. When this file is read from the guest, the driver reads from the host machine's /dev/random, in-turn reading from the host kernel's entropy pool. This entropy pool could have been filled by a hardware random number generator or just the host kernel's internal software entropy generator. Currently the driver does not fill the guests kernel entropy pool, this requires a userspace tool running inside the guest (like rng-tools) to read from the dummy device provided by this driver, which then would fill the guest's internal entropy pool. This all seems quite pointless when we are already reading from an entropy pool, so this patch aims to register the device as a hwrng device using the hwrng-core framework. This not only improves and cleans up the driver, but also fills the guest's entropy pool without having to resort to using extra userspace tools in the guest. This is typically a nuisance when booting a guest: the random pool takes a long time (~200s) to build up enough entropy since the dummy hwrng is not used to fill the guest's pool. This port was originally attempted by Alexander Neville "dark" (in CC, discussion in Link), but the conversation there stalled since the handling of -EAGAIN errors were no removed and longer handled by the driver. This patch attempts to use the existing method of error handling but utilises the new hwrng core. The issue can be noticed when booting a UML guest: [ 2.560000] random: fast init done [ 214.000000] random: crng init done With the patch applied, filling the pool becomes a lot quicker: [ 2.560000] random: fast init done [ 12.000000] random: crng init done Cc: Alexander Neville Link: https://lore.kernel.org/lkml/20190828204609.02a7ff70@TheDarkness/ Link: https://lore.kernel.org/lkml/20190829135001.6a5ff940@TheDarkness.local/ Cc: Sjoerd Simons Signed-off-by: Christopher Obbard Acked-by: Anton Ivanov Signed-off-by: Richard Weinberger commit db03b428278501e4da4339d7528d8408f050d0ac Author: Allen Pais Date: Mon Aug 17 14:45:55 2020 +0530 um: Convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Acked-By: Anton Ivanov Signed-off-by: Richard Weinberger commit b80a974b8c58164ed57b0f025a47b8f003198d9e Author: Zhihao Cheng Date: Tue Jun 16 15:11:46 2020 +0800 ubifs: ubifs_dump_node: Dump all branches of the index node An index node can have up to c->fanout branches, all branches should be displayed while dumping index node. Signed-off-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit bf6dab7a6ce79c56764623b970be10fc6edd8a68 Author: Zhihao Cheng Date: Tue Jun 16 15:11:45 2020 +0800 ubifs: ubifs_dump_sleb: Remove unused function Function ubifs_dump_sleb() is defined but unused, it can be removed. Signed-off-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit a33e30a0e023e9d1866866ca895c7789f48445e7 Author: Zhihao Cheng Date: Tue Jun 16 15:11:44 2020 +0800 ubifs: Pass node length in all node dumping callers Function ubifs_dump_node() has been modified to avoid memory oob accessing while dumping node, node length (corresponding to the size of allocated memory for node) should be passed into all node dumping callers. Signed-off-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit c8be097530a82e004f98378c3afc5cd35efc4f57 Author: Zhihao Cheng Date: Tue Jun 16 15:11:43 2020 +0800 Revert "ubifs: Fix out-of-bounds memory access caused by abnormal value of node_len" This reverts commit acc5af3efa30 ("ubifs: Fix out-of-bounds memory access caused by abnormal value of node_len") No need to avoid memory oob in dumping for data node alone. Later, node length will be passed into function 'ubifs_dump_node()' which replaces all node dumping places. Signed-off-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit c4c0d19d39d26c5f58633f8fcca75f03b2854fc0 Author: Zhihao Cheng Date: Tue Jun 16 15:11:42 2020 +0800 ubifs: Limit dumping length by size of memory which is allocated for the node To prevent memory out-of-bounds accessing in ubifs_dump_node(), actual dumping length should be restricted by another condition(size of memory which is allocated for the node). This patch handles following situations (These situations may be caused by bit flipping due to hardware error, writing bypass ubifs, unknown bugs in ubifs, etc.): 1. bad node_len: Dumping data according to 'ch->len' which may exceed the size of memory allocated for node. 2. bad node content: Some kinds of node can record additional data, eg. index node and orphan node, make sure the size of additional data not beyond the node length. 3. node_type changes: Read data according to type A, but expected type B, before that, node is allocated according to type B's size. Length of type A node is greater than type B node. Signed-off-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit 32f6ccc743b89bb4c51d4a868ffdb6ebda2909cf Author: Chengsong Ke Date: Mon Nov 2 16:27:43 2020 +0800 ubifs: Remove the redundant return in dbg_check_nondata_nodes_order There is a redundant return in dbg_check_nondata_nodes_order, which will be never reached. In addition, error code should be returned instead of zero in this branch. Signed-off-by: Chengsong Ke Signed-off-by: Richard Weinberger commit a61df3c413e49b0042f9caf774c58512d1cc71b7 Author: Jamie Iles Date: Mon Oct 12 14:12:04 2020 +0100 jffs2: Fix NULL pointer dereference in rp_size fs option parsing syzkaller found the following JFFS2 splat: Unable to handle kernel paging request at virtual address dfffa00000000001 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 [dfffa00000000001] address between user and kernel address ranges Internal error: Oops: 96000004 [#1] SMP Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 0 PID: 12745 Comm: syz-executor.5 Tainted: G S 5.9.0-rc8+ #98 Hardware name: linux,dummy-virt (DT) pstate: 20400005 (nzCv daif +PAN -UAO BTYPE=--) pc : jffs2_parse_param+0x138/0x308 fs/jffs2/super.c:206 lr : jffs2_parse_param+0x108/0x308 fs/jffs2/super.c:205 sp : ffff000022a57910 x29: ffff000022a57910 x28: 0000000000000000 x27: ffff000057634008 x26: 000000000000d800 x25: 000000000000d800 x24: ffff0000271a9000 x23: ffffa0001adb5dc0 x22: ffff000023fdcf00 x21: 1fffe0000454af2c x20: ffff000024cc9400 x19: 0000000000000000 x18: 0000000000000000 x17: 0000000000000000 x16: ffffa000102dbdd0 x15: 0000000000000000 x14: ffffa000109e44bc x13: ffffa00010a3a26c x12: ffff80000476e0b3 x11: 1fffe0000476e0b2 x10: ffff80000476e0b2 x9 : ffffa00010a3ad60 x8 : ffff000023b70593 x7 : 0000000000000003 x6 : 00000000f1f1f1f1 x5 : ffff000023fdcf00 x4 : 0000000000000002 x3 : ffffa00010000000 x2 : 0000000000000001 x1 : dfffa00000000000 x0 : 0000000000000008 Call trace: jffs2_parse_param+0x138/0x308 fs/jffs2/super.c:206 vfs_parse_fs_param+0x234/0x4e8 fs/fs_context.c:117 vfs_parse_fs_string+0xe8/0x148 fs/fs_context.c:161 generic_parse_monolithic+0x17c/0x208 fs/fs_context.c:201 parse_monolithic_mount_data+0x7c/0xa8 fs/fs_context.c:649 do_new_mount fs/namespace.c:2871 [inline] path_mount+0x548/0x1da8 fs/namespace.c:3192 do_mount+0x124/0x138 fs/namespace.c:3205 __do_sys_mount fs/namespace.c:3413 [inline] __se_sys_mount fs/namespace.c:3390 [inline] __arm64_sys_mount+0x164/0x238 fs/namespace.c:3390 __invoke_syscall arch/arm64/kernel/syscall.c:36 [inline] invoke_syscall arch/arm64/kernel/syscall.c:48 [inline] el0_svc_common.constprop.0+0x15c/0x598 arch/arm64/kernel/syscall.c:149 do_el0_svc+0x60/0x150 arch/arm64/kernel/syscall.c:195 el0_svc+0x34/0xb0 arch/arm64/kernel/entry-common.c:226 el0_sync_handler+0xc8/0x5b4 arch/arm64/kernel/entry-common.c:236 el0_sync+0x15c/0x180 arch/arm64/kernel/entry.S:663 Code: d2d40001 f2fbffe1 91002260 d343fc02 (38e16841) ---[ end trace 4edf690313deda44 ]--- This is because since ec10a24f10c8, the option parsing happens before fill_super and so the MTD device isn't associated with the filesystem. Defer the size check until there is a valid association. Fixes: ec10a24f10c8 ("vfs: Convert jffs2 to use the new mount API") Cc: Cc: David Howells Signed-off-by: Jamie Iles Signed-off-by: Richard Weinberger commit 89f40d0a9656aa73bf4a6d905d28952381b6cb53 Author: Fangping Liang Date: Tue Dec 8 21:58:11 2020 +0800 ubifs: Fixed print foramt mismatch in ubifs fs/ubifs/super.c: function mount_ubifs: the format specifier "lld" need arg type "long long", but the according arg "old_idx_sz" has type "unsigned long long" Signed-off-by: Fangping Liang Signed-off-by: Richard Weinberger commit f669e74be820386244290d5824938969d397b8fb Author: Pratyush Yadav Date: Tue Dec 1 15:57:09 2020 +0530 ubi: Do not zero out EC and VID on ECC-ed NOR flashes For NOR flashes EC and VID are zeroed out before an erase is issued to make sure UBI does not mistakenly treat the PEB as used and associate it with an LEB. But on some flashes, like the Cypress Semper S28 SPI NOR flash family, multi-pass page programming is not allowed on the default ECC scheme. This means zeroing out these magic numbers will result in the flash throwing a page programming error. Do not zero out EC and VID for such flashes. A writesize > 1 is an indication of an ECC-ed flash. Signed-off-by: Pratyush Yadav Reviewed-by: Tudor Ambarus Signed-off-by: Richard Weinberger commit 22bdb8b6fd8eb4d67b94287f97220c8bf58666b0 Author: Tom Rix Date: Fri Nov 27 11:13:57 2020 -0800 jffs2: remove trailing semicolon in macro definition The macro use will already have a semicolon. Signed-off-by: Tom Rix Signed-off-by: Richard Weinberger commit 3cded66330591cfd2554a3fd5edca8859ea365a2 Author: Wang ShaoBo Date: Tue Nov 24 14:33:20 2020 +0800 ubifs: Fix error return code in ubifs_init_authentication() Fix to return PTR_ERR() error code from the error handling case where ubifs_hash_get_desc() failed instead of 0 in ubifs_init_authentication(), as done elsewhere in this function. Fixes: 49525e5eecca5 ("ubifs: Add helper functions for authentication support") Signed-off-by: Wang ShaoBo Reviewed-by: Sascha Hauer Signed-off-by: Richard Weinberger commit 20f1431160c6b590cdc269a846fc5a448abf5b98 Author: Richard Weinberger Date: Mon Nov 16 22:05:30 2020 +0100 ubifs: wbuf: Don't leak kernel memory to flash Write buffers use a kmalloc()'ed buffer, they can leak up to seven bytes of kernel memory to flash if writes are not aligned. So use ubifs_pad() to fill these gaps with padding bytes. This was never a problem while scanning because the scanner logic manually aligns node lengths and skips over these gaps. Cc: Fixes: 1e51764a3c2ac05a2 ("UBIFS: add new flash file system") Signed-off-by: Richard Weinberger Reviewed-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit 619ea229e9b54e65955f8746a31ae15797d297fc Author: k00524021 Date: Tue Nov 3 19:56:45 2020 +0800 ubi: Remove useless code in bytes_str_to_int As a local variable, "endp" is neither refered nor returned after this line "endp += 2", it looks like a useless code, suggest to remove it. Signed-off-by: Chengsong Ke Signed-off-by: Richard Weinberger commit f212400783911a2732eaa5022c9157659c85ccc6 Author: Chengsong Ke Date: Sat Oct 31 16:54:20 2020 +0800 ubifs: Fix the printing type of c->big_lpt Ubifs uses %d to print c->big_lpt, but c->big_lpt is a variable of type unsigned int and should be printed with %u. Signed-off-by: Chengsong Ke Signed-off-by: Richard Weinberger commit cd3ed3c73ac671ff6b0230ccb72b8300292d3643 Author: lizhe Date: Wed Oct 14 14:54:43 2020 +0800 jffs2: Allow setting rp_size to zero during remounting Set rp_size to zero will be ignore during remounting. The method to identify whether we input a remounting option of rp_size is to check if the rp_size input is zero. It can not work well if we pass "rp_size=0". This patch add a bool variable "set_rp_size" to fix this problem. Reported-by: Jubin Zhong Signed-off-by: lizhe Signed-off-by: Richard Weinberger commit 08cd274f9b8283a1da93e2ccab216a336da83525 Author: lizhe Date: Wed Oct 14 14:54:42 2020 +0800 jffs2: Fix ignoring mounting options problem during remounting The jffs2 mount options will be ignored when remounting jffs2. It can be easily reproduced with the steps listed below. 1. mount -t jffs2 -o compr=none /dev/mtdblockx /mnt 2. mount -o remount compr=zlib /mnt Since ec10a24f10c8, the option parsing happens before fill_super and then pass fc, which contains the options parsing results, to function jffs2_reconfigure during remounting. But function jffs2_reconfigure do not update c->mount_opts. This patch add a function jffs2_update_mount_opts to fix this problem. By the way, I notice that tmpfs use the same way to update remounting options. If it is necessary to unify them? Cc: Fixes: ec10a24f10c8 ("vfs: Convert jffs2 to use the new mount API") Signed-off-by: lizhe Signed-off-by: Richard Weinberger commit 9afc9a8a4909fece0e911e72b1060614ba2f7969 Author: Zhe Li Date: Fri May 29 11:37:11 2020 +0800 jffs2: Fix GC exit abnormally The log of this problem is: jffs2: Error garbage collecting node at 0x***! jffs2: No space for garbage collection. Aborting GC thread This is because GC believe that it do nothing, so it abort. After going over the image of jffs2, I find a scene that can trigger this problem stably. The scene is: there is a normal dirent node at summary-area, but abnormal at corresponding not-summary-area with error name_crc. The reason that GC exit abnormally is because it find that abnormal dirent node to GC, but when it goes to function jffs2_add_fd_to_list, it cannot meet the condition listed below: if ((*prev)->nhash == new->nhash && !strcmp((*prev)->name, new->name)) So no node is marked obsolete, statistical information of erase_block do not change, which cause GC exit abnormally. The root cause of this problem is: we do not check the name_crc of the abnormal dirent node with summary is enabled. Noticed that in function jffs2_scan_dirent_node, we use function jffs2_scan_dirty_space to deal with the dirent node with error name_crc. So this patch add a checking code in function read_direntry to ensure the correctness of dirent node. If checked failed, the dirent node will be marked obsolete so GC will pass this node and this problem will be fixed. Cc: Signed-off-by: Zhe Li Signed-off-by: Richard Weinberger commit 2976c19c95a4749ba11db174ecad676ff16fd4c9 Author: Chengguang Xu Date: Tue May 26 17:07:12 2020 +0800 ubifs: Code cleanup by removing ifdef macro surrounding Define ubifs_listxattr and ubifs_xattr_handlers to NULL when CONFIG_UBIFS_FS_XATTR is not enabled, then we can remove many ugly ifdef macros in the code. Signed-off-by: Chengguang Xu Signed-off-by: Richard Weinberger commit 8fdaaf4cf3cea64aed8265a62c4ea7158ac0aa09 Author: Randy Dunlap Date: Sun Apr 5 14:22:56 2020 -0700 jffs2: Fix if/else empty body warnings When debug (print) macros are not enabled, change them to use the no_printk() macro instead of . This fixes gcc warnings when -Wextra is used: ../fs/jffs2/nodelist.c:255:37: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body] ../fs/jffs2/nodelist.c:278:38: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body] ../fs/jffs2/nodelist.c:558:52: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body] ../fs/jffs2/xattr.c:1247:58: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] ../fs/jffs2/xattr.c:1281:65: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] Builds without warnings on all 3 levels of CONFIG_JFFS2_FS_DEBUG. Signed-off-by: Randy Dunlap Cc: David Woodhouse Cc: Richard Weinberger Cc: linux-mtd@lists.infradead.org Signed-off-by: Richard Weinberger commit b8f1da98a219ab8c371fae5c3efb4b90b8594f3b Author: Randy Dunlap Date: Tue Aug 4 19:49:35 2020 -0700 ubifs: Delete duplicated words + other fixes Delete repeated words in fs/ubifs/. {negative, is, of, and, one, it} where "it it" was changed to "if it". Signed-off-by: Randy Dunlap To: linux-fsdevel@vger.kernel.org Cc: Richard Weinberger Cc: linux-mtd@lists.infradead.org Signed-off-by: Richard Weinberger commit 89c866f5a238f6f68b0f71fab55f77a07e8f3adb Author: Enrico Weigelt, metux IT consult Date: Tue Nov 17 16:22:12 2020 +0100 watchdog: iTCO_wdt: use module_platform_device() macro Reducing init boilerplate by using the module_platform_device macro. Signed-off-by: Enrico Weigelt, metux IT consult Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20201117152214.32244-1-info@metux.net Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 6f733cb2e7db38f8141b14740bcde577844a03b7 Author: Wang Wensheng Date: Mon Nov 9 13:05:12 2020 +0000 watchdog: Fix potential dereferencing of null pointer A reboot notifier, which stops the WDT by calling the stop hook without any check, would be registered when we set WDOG_STOP_ON_REBOOT flag. Howerer we allow the WDT driver to omit the stop hook since commit "d0684c8a93549" ("watchdog: Make stop function optional") and provide a module parameter for user that controls the WDOG_STOP_ON_REBOOT flag in commit 9232c80659e94 ("watchdog: Add stop_on_reboot parameter to control reboot policy"). Together that commits make user potential to insert a watchdog driver that don't provide a stop hook but with the stop_on_reboot parameter set, then dereferencing of null pointer occurs on system reboot. Check the stop hook before registering the reboot notifier to fix the issue. Fixes: d0684c8a9354 ("watchdog: Make stop function optional") Signed-off-by: Wang Wensheng Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20201109130512.28121-1-wangwensheng4@huawei.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 24f98562bb5b1cd6184c583fb53a6068992bec4b Author: Wong Vee Khee Date: Thu Nov 12 01:22:05 2020 +0800 watchdog: wdat_wdt: Fix missing kerneldoc reported by W=1 Fix the following warning while compiling with W=1. drivers/watchdog/wdat_wdt.c:48: warning: Function parameter or member 'instructions' not described in 'wdat_wdt' Signed-off-by: Wong Vee Khee Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20201111172205.17215-1-vee.khee.wong@intel.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 5674b74e52c052a34e0c4e8a14cdb0924f816d5e Author: Jerry Hoemann Date: Sun Nov 22 19:08:40 2020 -0700 watchdog/hpwdt: Reflect changes Bump driver number to reflect recent changes. Signed-off-by: Jerry Hoemann Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/1606097320-56762-3-git-send-email-jerry.hoemann@hpe.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit acc195bd2cc48445ea35d00036d8c0afcc4fcc9c Author: Jerry Hoemann Date: Sun Nov 22 19:08:39 2020 -0700 watchdog/hpwdt: Disable NMI in Crash Kernel NMIs received during the crash path are problematic as hpwdt_pretimeout handling of the NMI would cause a reentry into kdump. The situation is complicated in that I/O errors can be signaled as NMI circumventing hpwdt_pretimeout's attempt to not claim NMI not associated with either the WDT or the iLO NMI switch. These NMI can additionally cause a secondary NMI which cause the system to hang. By disabling pretimeout and hpwdtimeout in crash path we both reduce the risk of receiving an NMI and simuletaneously leave the WDT running (if it was already in use) to allow the WDT to break the system out of hangs by the WDT reset. Signed-off-by: Jerry Hoemann Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/1606097320-56762-2-git-send-email-jerry.hoemann@hpe.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 42e967f3c6cb3828f07a3822d7249bccb55221a4 Author: Zhao Qiang Date: Fri Nov 27 15:52:17 2020 +0800 wdt: sp805: add watchdog_stop on reboot Call watchdog_stop_on_reboot in probe func Signed-off-by: Zhao Qiang Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20201127075217.31312-1-qiang.zhao@nxp.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 347755d2a88e54e7462be23f1e1a1018d9be4a4b Author: Rasmus Villemoes Date: Sun Oct 25 13:45:18 2020 +0100 watchdog: sbc_fitpc2_wdt: add __user annotations After a change to the put_user() macro on x86, kernel test robot has started sending me complaints (from sparse) about passing kernel pointers to put_user(). So add the __user annotations to the various casts in fitpc2_wdt_ioctl(), and while in here, also make the write method actually match the prototype of file_operations::write. Reported-by: kernel test robot Signed-off-by: Rasmus Villemoes Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20201025124518.31647-1-linux@rasmusvillemoes.dk Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 9747f12b5be9f55bfba72a82b619355cd861bdfe Author: Tom Rix Date: Mon Oct 19 10:53:42 2020 -0700 watchdog: geodewdt: remove unneeded break A break is not needed if it is preceded by a return Signed-off-by: Tom Rix Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20201019175342.2646-1-trix@redhat.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 8711071e9700b67045fe5518161d63f7a03e3c9e Author: Zhang Qilong Date: Fri Oct 30 23:49:09 2020 +0800 watchdog: rti-wdt: fix reference leak in rti_wdt_probe pm_runtime_get_sync() will increment pm usage counter even it failed. Forgetting to call pm_runtime_put_noidle will result in reference leak in rti_wdt_probe, so we should fix it. Signed-off-by: Zhang Qilong Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20201030154909.100023-1-zhangqilong3@huawei.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 8650d0f9e9334f2e1c209f1e2ac8341f91e30d75 Author: Robert Marko Date: Sat Oct 31 13:11:15 2020 +0100 watchdog: qcom_wdt: set WDOG_HW_RUNNING bit when appropriate If the watchdog hardware is enabled/running during boot, e.g. due to a boot loader configuring it, we must tell the watchdog framework about this fact so that it can ping the watchdog until userspace opens the device and takes over control. Do so using the WDOG_HW_RUNNING flag that exists for exactly that use-case. Signed-off-by: Robert Marko Cc: Luka Perkov Reviewed-by: Guenter Roeck Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20201031121115.542752-1-robert.marko@sartura.hr Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 4600736f050f210bcdaafd2ef730ad736da9bc0c Author: Thomas Bogendoerfer Date: Fri Nov 6 14:05:07 2020 +0100 watchdog: remove pnx83xx driver Commit 625326ea9c84 ("MIPS: Remove PNX833x alias NXP_STB22x") removed support for PNX833x, so it's time to remove watchdog driver, too. Signed-off-by: Thomas Bogendoerfer Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20201106130508.103598-1-tsbogend@alpha.franken.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 7c7164f935c8190af7e3663f4e82edc0607dc3a4 Author: Etienne Carriere Date: Fri Nov 6 15:23:27 2020 +0100 watchdog: stm32_iwdg: don't print an error on probe deferral Do not print an error trace when deferring probe for clock resources. Signed-off-by: Etienne Carriere Signed-off-by: Christophe Roullier Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20201106142327.3129-2-christophe.roullier@st.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 2a6c9c65b2fe1023f8bec543d3c70a107fd8b9fb Author: Chunyan Zhang Date: Mon Nov 9 11:00:55 2020 +0800 watchdog: sprd: change to use usleep_range() instead of busy loop After changing to check busy bit for the previous loading operation instead of the current one, for most of cases, the busy bit is not set for the first time of read, so there's no need to check so frequently, so this patch use usleep_range() to replace cpu_relax() to avoid busy loop. Also this patch change the max times to 11 which would be enough, since according to the specification, the busy bit would be set after a new loading operation and last 2 or 3 RTC clock cycles (about 60us~92us). Fixes: 477603467009 ("watchdog: Add Spreadtrum watchdog driver") Original-by: Lingling Xu Signed-off-by: Chunyan Zhang Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20201029023933.24548-4-zhang.lyra@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 3e07d240939803bed9feb2a353d94686a411a7ca Author: Lingling Xu Date: Mon Nov 9 11:00:54 2020 +0800 watchdog: sprd: check busy bit before new loading rather than after that As the specification described, users must check busy bit before start a new loading operation to make sure that the previous loading is done and the device is ready to accept a new one. [ chunyan: Massaged changelog ] Fixes: 477603467009 ("watchdog: Add Spreadtrum watchdog driver") Signed-off-by: Lingling Xu Signed-off-by: Chunyan Zhang Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20201029023933.24548-3-zhang.lyra@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit f61a59acb462840bebcc192f754fe71b6a16ff99 Author: Lingling Xu Date: Thu Oct 29 10:39:31 2020 +0800 watchdog: sprd: remove watchdog disable from resume fail path sprd_wdt_start() would return fail if the loading operation is not completed in a certain time, disabling watchdog for that case would probably cause the kernel crash when kick watchdog later, that's too bad, so remove the watchdog disable operation for the fail case to make sure other parts in the kernel can run normally. [ chunyan: Massaged changelog ] Fixes: 477603467009 ("watchdog: Add Spreadtrum watchdog driver") Signed-off-by: Lingling Xu Signed-off-by: Chunyan Zhang Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20201029023933.24548-2-zhang.lyra@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 8ae2511112d2e18bc7d324b77f965d34083a25a2 Author: Guenter Roeck Date: Sun Nov 8 08:25:50 2020 -0800 watchdog: sirfsoc: Add missing dependency on HAS_IOMEM If HAS_IOMEM is not defined and SIRFSOC_WATCHDOG is enabled, the build fails with the following error. drivers/watchdog/sirfsoc_wdt.o: in function `sirfsoc_wdt_probe': sirfsoc_wdt.c:(.text+0x112): undefined reference to `devm_platform_ioremap_resource' Reported-by: Necip Fazil Yildiran Fixes: da2a68b3eb47 ("watchdog: Enable COMPILE_TEST where possible") Link: https://lore.kernel.org/r/20201108162550.27660-2-linux@roeck-us.net Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 7f6f1dfb2dcbe5d2bfa213f2df5d74c147cd5954 Author: Guenter Roeck Date: Sun Nov 8 08:25:49 2020 -0800 watchdog: armada_37xx: Add missing dependency on HAS_IOMEM The following kbuild warning is seen on a system without HAS_IOMEM. WARNING: unmet direct dependencies detected for MFD_SYSCON Depends on [n]: HAS_IOMEM [=n] Selected by [y]: - ARMADA_37XX_WATCHDOG [=y] && WATCHDOG [=y] && (ARCH_MVEBU || COMPILE_TEST This results in a subsequent compile error. drivers/watchdog/armada_37xx_wdt.o: in function `armada_37xx_wdt_probe': armada_37xx_wdt.c:(.text+0xdc): undefined reference to `devm_ioremap' Add the missing dependency. Reported-by: Necip Fazil Yildiran Fixes: 54e3d9b518c8 ("watchdog: Add support for Armada 37xx CPU watchdog") Link: https://lore.kernel.org/r/20201108162550.27660-1-linux@roeck-us.net Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit d1df458cbfdb0c3384c03c7fbcb1689bc02a746c Author: Vitaly Kuznetsov Date: Wed Dec 2 17:12:45 2020 +0100 hv_balloon: do adjust_managed_page_count() when ballooning/un-ballooning Unlike virtio_balloon/virtio_mem/xen balloon drivers, Hyper-V balloon driver does not adjust managed pages count when ballooning/un-ballooning and this leads to incorrect stats being reported, e.g. unexpected 'free' output. Note, the calculation in post_status() seems to remain correct: ballooned out pages are never 'available' and we manually add dm->num_pages_ballooned to 'commited'. Suggested-by: David Hildenbrand Signed-off-by: Vitaly Kuznetsov Reviewed-by: David Hildenbrand Link: https://lore.kernel.org/r/20201202161245.2406143-3-vkuznets@redhat.com Signed-off-by: Wei Liu commit 7f3f227b41e81f8669e906c49a240c1678c65cfe Author: Vitaly Kuznetsov Date: Wed Dec 2 17:12:44 2020 +0100 hv_balloon: simplify math in alloc_balloon_pages() 'alloc_unit' in alloc_balloon_pages() is either '512' for 2M allocations or '1' for 4k allocations. So 1 << get_order(alloc_unit << PAGE_SHIFT) equals to 'alloc_unit' and the for loop basically sets all them offline. Simplify the math to improve the readability. Signed-off-by: Vitaly Kuznetsov Reviewed-by: David Hildenbrand Link: https://lore.kernel.org/r/20201202161245.2406143-2-vkuznets@redhat.com Signed-off-by: Wei Liu commit 46e85af0cc53f35584e00bb5db7db6893d0e16e5 Author: Dmitry Baryshkov Date: Sun Dec 13 02:55:33 2020 +0300 driver core: platform: don't oops in platform_shutdown() on unbound devices On shutdown the driver core calls the bus' shutdown callback also for unbound devices. A driver's shutdown callback however is only called for devices bound to this driver. Commit 9c30921fe799 ("driver core: platform: use bus_type functions") changed the platform bus from driver callbacks to bus callbacks, so the shutdown function must be prepared to be called without a driver. Add the corresponding check in the shutdown function. Fixes: 9c30921fe799 ("driver core: platform: use bus_type functions") Tested-by: Guenter Roeck Reviewed-by: Uwe Kleine-König Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20201212235533.247537-1-dmitry.baryshkov@linaro.org Signed-off-by: Greg Kroah-Hartman commit 3cabca87b329cbcbdf295be0094adbd72c7b1f67 Author: Ingo Molnar Date: Sat Dec 12 18:29:20 2020 +0100 ntp: Fix prototype in the !CONFIG_GENERIC_CMOS_UPDATE case In the !CONFIG_GENERIC_CMOS_UPDATE case the update_persistent_clock64() function gets defined as a stub in ntp.c - make the prototype in conditional on CONFIG_GENERIC_CMOS_UPDATE as well. Fixes: 76e87d96b30b5 ("ntp: Consolidate the RTC update implementation") Signed-off-by: Ingo Molnar Acked-by: Thomas Gleixner commit 13458ffe0a953e17587f172a8e5059c243e6850a Author: Xie He Date: Tue Dec 8 19:33:46 2020 -0800 net: x25: Remove unimplemented X.25-over-LLC code stubs According to the X.25 documentation, there was a plan to implement X.25-over-802.2-LLC. It never finished but left various code stubs in the X.25 code. At this time it is unlikely that it would ever finish so it may be better to remove those code stubs. Also change the documentation to make it clear that this is not a ongoing plan anymore. Change words like "will" to "could", "would", etc. Cc: Martin Schiller Signed-off-by: Xie He Link: https://lore.kernel.org/r/20201209033346.83742-1-xie.he.0141@gmail.com Signed-off-by: Jakub Kicinski commit c2362519a04a7307e386e43bc567780d0d7631c7 Author: Masanari Iida Date: Sat Dec 5 10:25:32 2020 +0900 power: supply: Fix a typo in warning message This patch fix a warning messages in power_supply_sysfs.c Signed-off-by: Masanari Iida Signed-off-by: Sebastian Reichel commit d6e33fc89e0f81571b7f8d6b365eb8748a97e041 Author: Michael Klein Date: Fri Dec 11 16:14:44 2020 +0100 Documentation: DT: binding documentation for regulator-poweroff Add devicetree binding documentation for regulator-poweroff driver. Signed-off-by: Michael Klein Reviewed-by: Rob Herring Signed-off-by: Sebastian Reichel commit ec66096b7696d40c8d321d2b1c6cdb856a9767be Author: Michael Klein Date: Fri Dec 11 16:14:43 2020 +0100 power: reset: new driver regulator-poweroff This driver registers a pm_power_off function to turn off the board by force-disabling a devicetree-defined regulator. Signed-off-by: Michael Klein Signed-off-by: Sebastian Reichel commit 0b9b241406818a871c6d25390aa487dba966d548 Author: SeongJae Park Date: Fri Dec 11 12:24:05 2020 +0100 inet: frags: batch fqdir destroy works On a few of our systems, I found frequent 'unshare(CLONE_NEWNET)' calls make the number of active slab objects including 'sock_inode_cache' type rapidly and continuously increase. As a result, memory pressure occurs. In more detail, I made an artificial reproducer that resembles the workload that we found the problem and reproduce the problem faster. It merely repeats 'unshare(CLONE_NEWNET)' 50,000 times in a loop. It takes about 2 minutes. On 40 CPU cores / 70GB DRAM machine, the available memory continuously reduced in a fast speed (about 120MB per second, 15GB in total within the 2 minutes). Note that the issue don't reproduce on every machine. On my 6 CPU cores machine, the problem didn't reproduce. 'cleanup_net()' and 'fqdir_work_fn()' are functions that deallocate the relevant memory objects. They are asynchronously invoked by the work queues and internally use 'rcu_barrier()' to ensure safe destructions. 'cleanup_net()' works in a batched maneer in a single thread worker, while 'fqdir_work_fn()' works for each 'fqdir_exit()' call in the 'system_wq'. Therefore, 'fqdir_work_fn()' called frequently under the workload and made the contention for 'rcu_barrier()' high. In more detail, the global mutex, 'rcu_state.barrier_mutex' became the bottleneck. This commit avoids such contention by doing the 'rcu_barrier()' and subsequent lightweight works in a batched manner, as similar to that of 'cleanup_net()'. The fqdir hashtable destruction, which is done before the 'rcu_barrier()', is still allowed to run in parallel for fast processing, but this commit makes it to use a dedicated work queue instead of the 'system_wq', to make sure that the number of threads is bounded. Signed-off-by: SeongJae Park Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20201211112405.31158-1-sjpark@amazon.com Signed-off-by: Jakub Kicinski commit e0a64d1dffca048a99546993322bd1fb5c728ee8 Author: Krzysztof Kozlowski Date: Thu Dec 10 22:18:24 2020 +0100 nfc: s3fwrn5: let core configure the interrupt trigger If interrupt trigger is not set when requesting the interrupt, the core will take care of reading trigger type from Devicetree. There is no point to do it in the driver. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201210211824.214949-1-krzk@kernel.org Signed-off-by: Jakub Kicinski commit 771c8901568dd8776a260aa93db41be88a60389e Author: DENG Qingfang Date: Fri Dec 11 01:03:22 2020 +0800 net: dsa: mt7530: enable MTU normalization MT7530 has a global RX length register, so we are actually changing its MRU. Enable MTU normalization for this reason. Signed-off-by: DENG Qingfang Acked-by: Landen Chao Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/20201210170322.3433-1-dqfext@gmail.com Signed-off-by: Jakub Kicinski commit 062fa6b8ef153b9509d2a870049e907ad0a39639 Merge: 43ffe817bfe38 c0bc969c176b1 Author: Arnd Bergmann Date: Sat Dec 12 22:47:37 2020 +0100 Merge tag 'omap-for-v5.10/fixes-rc6-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/fixes Few regression fixes for omaps for v5.10 Few fixes for regression issues recently noticed by folks testing the current kernel: - We need to disable AES for n950 as it's not accessible because of the secure mode configuration and kernel fails to boot - On gta04 wlan probe exposed a bug for BUS_NOTIFY_BIND_DRIVER that has been around for a long time - Droid bionic exposed an issue where we configure an invalid range on the PMIC that adds boot time warnings Obviously these fixes can be merged whenever suitable. * tag 'omap-for-v5.10/fixes-rc6-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: omap2: pmic-cpcap: fix maximum voltage to be consistent with defaults on xt875 ARM: OMAP2+: omap_device: fix idling of devices during probe ARM: dts: OMAP3: disable AES on N950/N9 Link: https://lore.kernel.org/r/pull-1607674932-973902@atomide.com Signed-off-by: Arnd Bergmann commit 36f1de0d5c463092485c73ab639c348d1e28e356 Author: Linus Walleij Date: Sat Dec 12 11:57:12 2020 +0100 power: supply: ab8500: Use dev_err_probe() for IIO channels The code obtaining the ADC channels is outdated: it is trying to work around the IIO subsystem not returning the right -EPROBE_DEFER error code. Fix this up by using the dev_err_probe() helper so we defer silently where appropriate and not bail out if the IIO core returns -EPROBE_DEFER as happens now. Cc: Marcus Cooper Signed-off-by: Linus Walleij Signed-off-by: Sebastian Reichel commit 807042539d8ed11299c9278e55d2cb6df8d04a39 Author: Linus Walleij Date: Sat Dec 12 11:57:11 2020 +0100 power: supply: ab8500_fg: Request all IRQs as threaded Since these IRQs are cascaded from a nested IRQ, the generic IRQ system detects this and refuse to deliver a fastpath IRQ in response to request_irq(): nested = irq_settings_is_nested_thread(desc); if (nested) { if (!new->thread_fn) { ret = -EINVAL; goto out_mput; } (...) Threaded IRQs work just as well so let's just request threaded IRQs. One of the IRQs are alread requested as threaded anyways. Cc: Marcus Cooper Signed-off-by: Linus Walleij Signed-off-by: Sebastian Reichel commit 532b623f3c86d5166a8bb8acaa94fc3629d8ba97 Author: Linus Walleij Date: Sat Dec 12 11:57:10 2020 +0100 power: supply: ab8500_charger: Oneshot threaded IRQs Make sure the threaded IRQs requested by the charger are flagged as "oneshot". Usually this is what you want, and since the interrupts are shared with the USB phy on the AB8500 we will get a conflict like this if we don't, since the phy request them threaded oneshot: genirq: Flags mismatch irq 83. 00004084 (USB_LINK_STATUS vs. 00006084 (usb-link-status) ab8500-charger ab8500-charger.0: failed to request USB_LINK_STATUS IRQ 83: -16 Cc: Marcus Cooper Signed-off-by: Linus Walleij Signed-off-by: Sebastian Reichel commit f8efa0a881e2504d55a1d8d9e8dff847a378d717 Author: Linus Walleij Date: Sat Dec 12 11:57:09 2020 +0100 power: supply: ab8500: Convert to dev_pm_ops Switch over to using generic dev_pm_ops since these drivers aren't even using the special power state passed to the legacy call. Cc: Marcus Cooper Signed-off-by: Linus Walleij Signed-off-by: Sebastian Reichel commit ad89cb5f0a1ffad6ae9ba277f99fea830d135e7c Author: Linus Walleij Date: Sat Dec 12 11:57:08 2020 +0100 power: supply: ab8500: Use local helper Use a local "dev" helper variable to make the probe() code easier to read in the ab8500 subdrivers. Drop out-of-memory messages as these should come from the slab core. Cc: Marcus Cooper Signed-off-by: Linus Walleij Signed-off-by: Sebastian Reichel commit e2437ac2f59d96a5f3a2969ac59fa53edd4ee850 Merge: e5795aacd71b6 c7a5899eb26e2 Author: Jakub Kicinski Date: Sat Dec 12 12:28:41 2020 -0800 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next Steffen Klassert says: ==================== pull request (net-next): ipsec-next 2020-12-12 Just one patch this time: 1) Redact the SA keys with kernel lockdown confidentiality. If enabled, no secret keys are sent to uuserspace. From Antony Antony. * 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next: xfrm: redact SA secret with lockdown confidentiality ==================== Link: https://lore.kernel.org/r/20201212085737.2101294-1-steffen.klassert@secunet.com Signed-off-by: Jakub Kicinski commit e5795aacd71b697c739f2d193b0e275993d93187 Merge: 00f7763a26cbf 7ab250385ec27 Author: Jakub Kicinski Date: Sat Dec 12 11:57:28 2020 -0800 Merge tag 'wireless-drivers-next-2020-12-12' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for v5.11 Second set of patches for v5.11. iwlwifi gaining support for the new 6 GHz band and rtw88 got a new channel. Lots of new features for mt76 and ath11k now has working suspend for PCI devices. And as always, smaller fixes and cleanups all over. Major changes: rtw88 * add support for channel 144 mt76 * support for more sta interfaces on mt7615/mt7915 * mt7915 encapsulation offload * performance improvements * channel noise report on mt7915 * mt7915 testmode support * mt7915 DBDC support iwlwifi * support 6 GHz band ath11k * suspend support for QCA6390 PCI devices * support TXOP duration based RTS threshold * mesh: add support for 256 bitmap in blockack frames in 11ax * tag 'wireless-drivers-next-2020-12-12' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next: (197 commits) ath11k: implement suspend for QCA6390 PCI devices ath11k: hif: add ce irq enable and disable functions ath11k: implement WoW enable and wakeup commands ath11k: set credit_update flag for flow controlled ep only ath11k: dp: stop rx pktlog before suspend ath11k: htc: implement suspend handling ath11k: htc: remove unused struct ath11k_htc_ops ath11k: pci: read select_window register to ensure write is finished ath11k: hif: implement suspend and resume functions ath11k: mhi: hook suspend and resume ath11k: Fix incorrect tlvs in scan start command ath11k: pci: disable VDD4BLOW ath11k: pci: fix L1ss clock unstable problem ath11k: pci: fix hot reset stability issues ath11k: put hw to DBS using WMI_PDEV_SET_HW_MODE_CMDID ath11k: mhi: print a warning if firmware crashed ath11k: use MHI provided APIs to allocate and free MHI controller ath10k: add atomic protection for device recovery ath10k: add option for chip-id based BDF selection mt76: remove unused variable q ... ==================== Link: https://lore.kernel.org/r/20201212050839.EF50EC433C6@smtp.codeaurora.org Signed-off-by: Jakub Kicinski commit 1189686e5440041057f8cc21a7c1d13bb6642cb9 Author: Zheng Yongjun Date: Fri Dec 11 11:36:23 2020 -0800 fs/xfs: convert comma to semicolon Replace a comma between expression statements by a semicolon. Signed-off-by: Zheng Yongjun Reviewed-by: Brian Foster Reviewed-by: Eric Sandeen Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 5d24ec4c7d3c4520b1baec4443ad47b5ae796570 Author: Christoph Hellwig Date: Thu Dec 10 20:00:39 2020 -0800 xfs: open code updating i_mode in xfs_set_acl Rather than going through the big and hairy xfs_setattr_nonsize function, just open code a transactional i_mode and i_ctime update. This allows to mark xfs_setattr_nonsize and remove the flags argument to it. Signed-off-by: Christoph Hellwig Reviewed-by: Gao Xiang Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 26f88363ec78473ab61d29bcbb962c74ae0f1b1a Author: Christoph Hellwig Date: Thu Dec 10 20:00:38 2020 -0800 xfs: remove xfs_vn_setattr_nonsize Merge xfs_vn_setattr_nonsize into the only caller. Signed-off-by: Christoph Hellwig Reviewed-by: Gao Xiang Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 3937493c502566d90a74c3439ebdb663d9380cc3 Author: Gao Xiang Date: Wed Dec 9 10:05:17 2020 -0800 xfs: kill ialloced in xfs_dialloc() It's enough to just use return code, and get rid of an argument. Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Reviewed-by: Dave Chinner Signed-off-by: Gao Xiang Signed-off-by: Darrick J. Wong commit 8d822dc38ad781b1bfa5c03227da80dbd87e9959 Author: Dave Chinner Date: Wed Dec 9 10:05:16 2020 -0800 xfs: spilt xfs_dialloc() into 2 functions This patch explicitly separates free inode chunk allocation and inode allocation into two individual high level operations. Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner Signed-off-by: Gao Xiang Signed-off-by: Darrick J. Wong commit f3bf6e0f1196c69a7b0412521596cd1cc7622a82 Author: Dave Chinner Date: Wed Dec 9 10:05:16 2020 -0800 xfs: move xfs_dialloc_roll() into xfs_dialloc() Get rid of the confusing ialloc_context and failure handling around xfs_dialloc() by moving xfs_dialloc_roll() into xfs_dialloc(). Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner Signed-off-by: Gao Xiang Signed-off-by: Darrick J. Wong commit 1abcf261016e12246e1f0d2dada9c5c851a9ceb7 Author: Dave Chinner Date: Wed Dec 9 10:05:15 2020 -0800 xfs: move on-disk inode allocation out of xfs_ialloc() So xfs_ialloc() will only address in-core inode allocation then, Also, rename xfs_ialloc() to xfs_dir_ialloc_init() in order to keep everything in xfs_inode.c under the same namespace. Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner Signed-off-by: Gao Xiang Signed-off-by: Darrick J. Wong commit aececc9f8dec92a25c84a3378021636ce58d72dc Author: Dave Chinner Date: Wed Dec 9 10:02:17 2020 -0800 xfs: introduce xfs_dialloc_roll() Introduce a helper to make the on-disk inode allocation rolling logic clearer in preparation of the following cleanup. Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Dave Chinner Signed-off-by: Gao Xiang Signed-off-by: Darrick J. Wong commit 15574ebbff260a70d344cfb924a8daf3c47dc303 Author: Gao Xiang Date: Wed Dec 9 10:02:05 2020 -0800 xfs: convert noroom, okalloc in xfs_dialloc() to bool Boolean is preferred for such use. Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Reviewed-by: Dave Chinner Signed-off-by: Gao Xiang Signed-off-by: Darrick J. Wong commit 48b0ae046ee96eac999839f6d26c624b8c93ed66 Author: Pablo Neira Ayuso Date: Mon Dec 7 17:37:14 2020 +0100 netfilter: nftables: netlink support for several set element expressions This patch adds three new netlink attributes to encapsulate a list of expressions per set elements: - NFTA_SET_EXPRESSIONS: this attribute provides the set definition in terms of expressions. New set elements get attached the list of expressions that is specified by this new netlink attribute. - NFTA_SET_ELEM_EXPRESSIONS: this attribute allows users to restore (or initialize) the stateful information of set elements when adding an element to the set. - NFTA_DYNSET_EXPRESSIONS: this attribute specifies the list of expressions that the set element gets when it is inserted from the packet path. Signed-off-by: Pablo Neira Ayuso commit 563125a73ac30d7036ae69ca35c40500562c1de4 Author: Pablo Neira Ayuso Date: Wed Dec 9 20:10:27 2020 +0100 netfilter: nftables: generalize set extension to support for several expressions This patch replaces NFT_SET_EXPR by NFT_SET_EXT_EXPRESSIONS. This new extension allows to attach several expressions to one set element (not only one single expression as NFT_SET_EXPR provides). This patch prepares for support for several expressions per set element in the netlink userspace API. Signed-off-by: Pablo Neira Ayuso commit aeb2b0b1a3da5791d3b216e71ec72db7570f3571 Author: Lukas Bulwahn Date: Sat Dec 12 06:13:02 2020 +0100 block: drop dead assignments in loop_init() Commit 8410d38c2552 ("loop: use __register_blkdev to allocate devices on demand") simplified loop_init(); so computing the range of the block region is not required anymore and can be dropped. Drop dead assignments in loop_init(). As compilers will detect these unneeded assignments and optimize this, the resulting object code is identical before and after this change. No functional change. No change in object code. Signed-off-by: Lukas Bulwahn Signed-off-by: Jens Axboe commit fa94ba8a7b22890e6a17b39b9359e114fe18cd59 Author: Minwoo Im Date: Sat Dec 5 00:20:55 2020 +0900 blk-mq: fix msec comment from micro to milli seconds Delay to wait for queue running is milli second unit which is passed to delayed work via msecs_to_jiffies() which is to convert milliseconds to jiffies. Signed-off-by: Minwoo Im Reviewed-by: John Garry Signed-off-by: Jens Axboe commit d220a21410e445324b8ae67d93f9c51406f99a29 Author: Minwoo Im Date: Sat Dec 5 00:20:54 2020 +0900 blk-mq: update arg in comment of blk_mq_map_queue Update mis-named argument description of blk_mq_map_queue(). This patch also updates description that argument to software queue percpu context. Signed-off-by: Minwoo Im Reviewed-by: John Garry Signed-off-by: Jens Axboe commit 91cdf265b74bf63a69949d6db08a60523207400c Author: Minwoo Im Date: Sat Dec 5 00:20:53 2020 +0900 blk-mq: add helper allocating tagset->tags tagset->set is allocated from blk_mq_alloc_tag_set() rather than being reallocated. This patch added a helper to make its meaning explicitly which is to allocate rather than to reallocate. Signed-off-by: Minwoo Im Signed-off-by: Jens Axboe commit 31cc07761ccb389c7c01f904f6a6479544abbd11 Author: Sebastian Andrzej Siewior Date: Fri Dec 4 17:48:50 2020 +0100 sr: Remove in_interrupt() usage in sr_init_command(). The in_interrupt() check in sr_init_command() is a leftover from the past, pre v2.3.16 era to be exact. Back then the ioctl() was served by `sr' itself and sector size changes by CDROMREADMODE2 (as noted in the comment) were accounted within sr's data structures which allowed a "lazy" reset so it could be skipped on the next request and reset back to the default value once the device node was closed or before a command from the blockqueue was issued. This does not work like that anymore. The CDROMREADMODE2 is served by cdrom's mmc_ioctl() function which may change the sector size but the `sr' driver does not learn about it and so its ->sector_size is not updated. The ioctl() resets the changed sector size back to 2048. sr_read_sector() also resets the sector size back to the default once it is done. Remove the conditional sector size update from sr_init_command() and sr_release() because it is not needed. Link: https://lkml.kernel.org/r/20201204164803.ovwurzs3257em2rp@linutronix.de Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Jens Axboe commit 8d2ac857a81d5a44b9643038291ea958bbf05c7f Author: Sebastian Andrzej Siewior Date: Fri Dec 4 17:48:49 2020 +0100 sr: Switch the sector size back to 2048 if sr_read_sector() changed it. sr_read_sector() is hardly used since v2.3.16. Its only purpose is to check if it is a XA medium via sr_is_xa(). This check is only enabled if the module parameter `xa_test' is enabled. Change the sector size back to 2048 if it was changed. With this change, there is no lazy sector size changing left. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Jens Axboe commit b5f32555567cfe0a5d5dbe7c1e85ebe37b3f545a Author: Sebastian Andrzej Siewior Date: Fri Dec 4 17:48:48 2020 +0100 cdrom: Reset sector_size back it is not 2048. In v2.4.0-test2pre2 mmc_ioctl_cdrom_read_data() was extended by issuing a MODE_SELECT opcode to change the sector size and READ_10 to perform the actual read if the READ_CD opcode is not support. The sector size is never changed back to the previous value of 2048 bytes which is however denoted by the comment for version 3.09 of the cdrom.c file. Use cdrom_switch_blocksize() to change the sector size only if the requested size deviates from 2048. Change it back to 2048 after the read operation if a change was mode. Link: https://lkml.kernel.org/r/20201204164803.ovwurzs3257em2rp@linutronix.de Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Jens Axboe commit 00f7763a26cbf6673bceca7d69f931df31e48144 Merge: 46d5e62dd3c34 c534e093d865d Author: Jakub Kicinski Date: Sat Dec 12 10:07:56 2020 -0800 Merge tag 'mac80211-next-for-net-next-2020-12-11' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg says: ==================== A new set of wireless changes: * validate key indices for key deletion * more preamble support in mac80211 * various 6 GHz scan fixes/improvements * a common SAR power limitations API * various small fixes & code improvements * tag 'mac80211-next-for-net-next-2020-12-11' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next: (35 commits) mac80211: add ieee80211_set_sar_specs nl80211: add common API to configure SAR power limitations mac80211: fix a mistake check for rx_stats update mac80211: mlme: save ssid info to ieee80211_bss_conf while assoc mac80211: Update rate control on channel change mac80211: don't filter out beacons once we start CSA mac80211: Fix calculation of minimal channel width mac80211: ignore country element TX power on 6 GHz mac80211: use bitfield helpers for BA session action frames mac80211: support Rx timestamp calculation for all preamble types mac80211: don't set set TDLS STA bandwidth wider than possible mac80211: support driver-based disconnect with reconnect hint cfg80211: support immediate reconnect request hint mac80211: use struct assignment for he_obss_pd cfg80211: remove struct ieee80211_he_bss_color nl80211: validate key indexes for cfg80211_registered_device cfg80211: include block-tx flag in channel switch started event mac80211: disallow band-switch during CSA ieee80211: update reduced neighbor report TBTT info length cfg80211: Save the regulatory domain when setting custom regulatory ... ==================== Link: https://lore.kernel.org/r/20201211142552.209018-1-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski commit 33114c4359592d5c8a3d840eee9ff40039caf26f Author: Masahiro Yamada Date: Sun Dec 13 01:54:29 2020 +0900 kbuild: do not use scripts/ld-version.sh for checking spatch version scripts/ld-version.sh was, as its file name implies, originally intended for the GNU ld version, but is (ab)used for the spatch version too. Use 'sort -CV' for the version comparison, then coccicheck does not need to use scripts/ld-version.sh. Fix nsdeps as well. Signed-off-by: Masahiro Yamada Signed-off-by: Julia Lawall commit 1a033769a4fe9a86ee791fd553b6a996dd76e026 Author: Kun Yi Date: Fri Dec 11 13:54:27 2020 -0800 dt-bindings: (hwmon/sbtsi_temp) Add SB-TSI hwmon driver bindings Document device tree bindings for AMD SB-TSI emulated temperature sensor. Signed-off-by: Kun Yi Link: https://lore.kernel.org/r/20201211215427.3281681-4-kunyi@google.com Reviewed-by: Rob Herring [groeck: Fixed subject] Signed-off-by: Guenter Roeck commit 6ec3fcf556fe44542934b778aea1b725b0793418 Author: Kun Yi Date: Fri Dec 11 13:54:26 2020 -0800 hwmon: (sbtsi) Add documentation Document the SB-TSI sensor interface driver. Signed-off-by: Kun Yi Link: https://lore.kernel.org/r/20201211215427.3281681-3-kunyi@google.com [groeck: Added SPDX license identifier, same as source] Signed-off-by: Guenter Roeck commit e7bb1a2ab8c4b1569f5b271fd87ca203b1e673a5 Author: Kun Yi Date: Fri Dec 11 13:54:25 2020 -0800 hwmon: (sbtsi) Add basic support for SB-TSI sensors SB Temperature Sensor Interface (SB-TSI) is an SMBus compatible interface that reports AMD SoC's Ttcl (normalized temperature), and resembles a typical 8-pin remote temperature sensor's I2C interface to BMC. This commit adds basic support using this interface to read CPU temperature, and read/write high/low CPU temp thresholds. To instantiate this driver on an AMD CPU with SB-TSI support, the i2c bus number would be the bus connected from the board management controller (BMC) to the CPU. The i2c address is specified in Section 6.3.1 of the spec [1]: The SB-TSI address is normally 98h for socket 0 and 90h for socket 1, but it could vary based on hardware address select pins. [1]: https://www.amd.com/system/files/TechDocs/56255_OSRR.pdf Test status: tested reading temp1_input, and reading/writing temp1_max/min. Signed-off-by: Kun Yi Link: https://lore.kernel.org/r/20201211215427.3281681-2-kunyi@google.com Signed-off-by: Guenter Roeck commit 355fb9e2b78e78b38ec00f5cd9b05c6aceb98335 Author: Jens Axboe Date: Thu Oct 22 20:19:35 2020 -0600 io_uring: remove 'twa_signal_ok' deadlock work-around The TIF_NOTIFY_SIGNAL based implementation of TWA_SIGNAL is always safe to use, regardless of context, as we won't be recursing into the signal lock. So now that all archs are using that, we can drop this deadlock work-around as it's always safe to use TWA_SIGNAL. Signed-off-by: Jens Axboe commit e296dc4996b8094ccde45d19090d804c4103513e Author: Jens Axboe Date: Fri Oct 9 16:04:39 2020 -0600 kernel: remove checking for TIF_NOTIFY_SIGNAL It's available everywhere now, no need to check or add dummy defines. Signed-off-by: Jens Axboe commit 98b89b649fce39dacb9dc036d6d0fdb8caff73f7 Author: Jens Axboe Date: Fri Oct 9 16:03:01 2020 -0600 signal: kill JOBCTL_TASK_WORK It's no longer used, get rid of it. Signed-off-by: Jens Axboe commit 792ee0f6db5b942ee68ee7c9aea9d34dde4c4ff2 Author: Jens Axboe Date: Thu Oct 22 20:17:18 2020 -0600 io_uring: JOBCTL_TASK_WORK is no longer used by task_work Remove the dead code, TWA_SIGNAL will never set JOBCTL_TASK_WORK at this point. Signed-off-by: Jens Axboe commit 03941ccfda161c2680147fa5ab92aead2a79cac1 Author: Jens Axboe Date: Fri Oct 9 16:01:33 2020 -0600 task_work: remove legacy TWA_SIGNAL path All archs now support TIF_NOTIFY_SIGNAL. Signed-off-by: Jens Axboe commit f50a7052f5e70ee7a6a5e2ed08660994dc3df2a5 Author: Jens Axboe Date: Fri Oct 9 15:44:37 2020 -0600 sparc: add support for TIF_NOTIFY_SIGNAL Wire up TIF_NOTIFY_SIGNAL handling for sparc. Cc: sparclinux@vger.kernel.org Signed-off-by: Jens Axboe commit 24a31b81e38309b1604f24520110aae1f83f3cbf Author: Jens Axboe Date: Fri Oct 9 14:29:17 2020 -0600 riscv: add support for TIF_NOTIFY_SIGNAL Wire up TIF_NOTIFY_SIGNAL handling for riscv. Cc: linux-riscv@lists.infradead.org Signed-off-by: Jens Axboe commit b13e8bf615fe26fb6a6dfe1b5a1c65e1624dfee2 Author: Jens Axboe Date: Fri Oct 9 15:18:43 2020 -0600 nds32: add support for TIF_NOTIFY_SIGNAL Wire up TIF_NOTIFY_SIGNAL handling for nds32. Cc: Nick Hu Cc: Greentime Hu Cc: Vincent Chen Signed-off-by: Jens Axboe commit b269c229b0e89aedb7943c06673b56b6052cf5e5 Author: Jens Axboe Date: Fri Oct 9 14:49:43 2020 -0600 ia64: add support for TIF_NOTIFY_SIGNAL Wire up TIF_NOTIFY_SIGNAL handling for ia64. Cc: linux-ia64@vger.kernel.org [axboe: added fixes from Mike Rapoport ] Signed-off-by: Jens Axboe commit 2f9799ad0111ee742ccc02dd2ea2c87646746fc1 Author: Jens Axboe Date: Fri Oct 9 14:42:33 2020 -0600 h8300: add support for TIF_NOTIFY_SIGNAL Wire up TIF_NOTIFY_SIGNAL handling for h8300. Cc: uclinux-h8-devel@lists.sourceforge.jp Signed-off-by: Jens Axboe commit 6d665a4d8b4264def0fbb72da3a500d9904ffe3e Author: Jens Axboe Date: Fri Oct 9 14:35:34 2020 -0600 c6x: add support for TIF_NOTIFY_SIGNAL Wire up TIF_NOTIFY_SIGNAL handling for c6x. Cc: linux-c6x-dev@linux-c6x.org Signed-off-by: Jens Axboe commit 5a9a8897c253a075805401d38d987ec1ac1824b6 Author: Jens Axboe Date: Thu Oct 8 09:11:42 2020 -0600 alpha: add support for TIF_NOTIFY_SIGNAL Wire up TIF_NOTIFY_SIGNAL handling for alpha. Cc: linux-alpha@vger.kernel.org Signed-off-by: Jens Axboe commit 464d2ff716c37d83e8bb0c4f1c1acfc02dbc9984 Merge: aa3b66f401b37 8ae954caf49ac Author: Thomas Gleixner Date: Sat Dec 12 13:53:15 2020 +0100 Merge tag 'timers-v5.11-2' of https://git.linaro.org/people/daniel.lezcano/linux into timers/core Pull clocksource/events updates from Daniel Lezcano: - Fix error handling if no clock is available on dw_apb_timer_of (Dinh Nguyen) - Fix overhead for erratum handling when the timer has no erratum and fix fault programing for the event stream on the arm arch timer (Keqian Zhu) - Fix potential deadlock when calling runtime PM on sh_cmt (Niklas Söderlund) commit 2ab695aa8eb8f3226f68a2b91fc6103b56fcb57d Author: Saravana Kannan Date: Fri Dec 11 12:26:29 2020 -0800 ACPI: Use fwnode_init() to set up fwnode Commit 01bb86b380a3 ("driver core: Add fwnode_init()") was supposed to fix up all instances of fwnode creation to use fwnode_init(). But looks like this instance was missed. This causes a NULL pointer dereference during device_add() [1]. So, fix it. [ 60.792324][ T1] Call trace: [ 60.795495][ T1] device_add+0xf60/0x16b0 __fw_devlink_link_to_consumers at drivers/base/core.c:1583 (inlined by) fw_devlink_link_device at drivers/base/core.c:1726 (inlined by) device_add at drivers/base/core.c:3088 [ 60.799813][ T1] platform_device_add+0x274/0x628 [ 60.804833][ T1] acpi_iort_init+0x9d8/0xc50 [ 60.809415][ T1] acpi_init+0x45c/0x4e8 [ 60.813556][ T1] do_one_initcall+0x170/0xb70 [ 60.818224][ T1] kernel_init_freeable+0x6a8/0x734 [ 60.823332][ T1] kernel_init+0x18/0x12c [ 60.827566][ T1] ret_from_fork+0x10/0x1c [ 60.838756][ T1] ---[ end trace fa5c8ce17a226d83 ]--- [1] - https://lore.kernel.org/linux-arm-kernel/02e7047071f0b54b046ac472adeeb3fafabc643c.camel@redhat.com/ Fixes: 01bb86b380a3 ("driver core: Add fwnode_init()") Reported-by: Qian Cai Suggested-by: Robin Murphy Tested-by: Marc Zyngier Acked-by: Rafael J. Wysocki Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20201211202629.2164655-1-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 2f5fbc4305d07725bfebaedb09e57271315691ef Author: Douglas Anderson Date: Fri Dec 11 14:15:35 2020 -0800 irqchip/qcom-pdc: Fix phantom irq when changing between rising/falling We have a problem if we use gpio-keys and configure wakeups such that we only want one edge to wake us up. AKA: wakeup-event-action = ; wakeup-source; Specifically we end up with a phantom interrupt that blocks suspend if the line was already high and we want wakeups on rising edges (AKA we want the GPIO to go low and then high again before we wake up). The opposite is also problematic. Specifically, here's what's happening today: 1. Normally, gpio-keys configures to look for both edges. Due to the current workaround introduced in commit c3c0c2e18d94 ("pinctrl: qcom: Handle broken/missing PDC dual edge IRQs on sc7180"), if the line was high we'd configure for falling edges. 2. At suspend time, we change to look for rising edges. 3. After qcom_pdc_gic_set_type() runs, we get a phantom interrupt. We can solve this by just clearing the phantom interrupt. NOTE: it is possible that this could cause problems for a client with very specific needs, but there's not much we can do with this hardware. As an example, let's say the interrupt signal is currently high and the client is looking for falling edges. The client now changes to look for rising edges. The client could possibly expect that if the line has a short pulse low (and back high) that it would always be detected. Specifically no matter when the pulse happened, it should either have tripped the (old) falling edge trigger or the (new) rising edge trigger. We will simply not trip it. We could narrow down the race a bit by polling our parent before changing types, but no matter what we do there will still be a period of time where we can't tell the difference between a real transition (or more than one transition) and the phantom. Fixes: f55c73aef890 ("irqchip/pdc: Add PDC interrupt controller for QCOM SoCs") Signed-off-by: Douglas Anderson Signed-off-by: Marc Zyngier Tested-by: Maulik Shah Reviewed-by: Maulik Shah Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20201211141514.v4.1.I2702919afc253e2a451bebc3b701b462b2d22344@changeid commit 92b211a28992b82a693547e3fe5ff97646961785 Author: Pablo Neira Ayuso Date: Mon Dec 7 17:37:05 2020 +0100 netfilter: nftables: move nft_expr before nft_set Move the nft_expr structure definition before nft_set. Expressions are used by rules and sets, remove unnecessary forward declarations. This comes as preparation to support for multiple expressions per set element. Signed-off-by: Pablo Neira Ayuso commit 8cfd9b0f8515e7c361bba27e2a2684cbd427fe01 Author: Pablo Neira Ayuso Date: Mon Dec 7 17:37:01 2020 +0100 netfilter: nftables: generalize set expressions support Currently, the set infrastucture allows for one single expressions per element. This patch extends the existing infrastructure to allow for up to two expressions. This is not updating the netlink API yet, this is coming as an initial preparation patch. Signed-off-by: Pablo Neira Ayuso commit 86d21fc7474563cb5d054ff001d8ad7b69206717 Author: Florian Westphal Date: Thu Dec 10 14:43:23 2020 +0100 netfilter: ctnetlink: add timeout and protoinfo to destroy events DESTROY events do not include the remaining timeout. Add the timeout if the entry was removed explicitly. This can happen when a conntrack gets deleted prematurely, e.g. due to a tcp reset, module removal, netdev notifier (nat/masquerade device went down), ctnetlink and so on. Add the protocol state too for the destroy message to check for abnormal state on connection termination. Joint work with Pablo. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit d84489e374f5b9b3ab424a5169e68e06a4329524 Author: Connor McAdams Date: Fri Dec 11 17:55:03 2020 -0500 ALSA: hda/ca0132 - Add ZxR surround DAC setup. Add pre-dsp download initialization for the DAC's used in the surround sound configuration. Fixes issues of no audio on surround channels. Fixes: 2e492b8ee5da8 ("ALSA: hda/ca0132 - Add ZxR init commands") Signed-off-by: Connor McAdams Link: https://lore.kernel.org/r/20201211225504.4508-2-conmanx360@gmail.com Signed-off-by: Takashi Iwai commit c1d8aeed83d9e4b98a31f0c669102d8f2f1e4901 Author: Connor McAdams Date: Fri Dec 11 17:55:02 2020 -0500 ALSA: hda/ca0132 - Add 8051 PLL write helper functions. Add helper functions for the 8051 PLL PMU write verbs. Signed-off-by: Connor McAdams Link: https://lore.kernel.org/r/20201211225504.4508-1-conmanx360@gmail.com Signed-off-by: Takashi Iwai commit e8614e5e8de805b106dd41283525d5c2a76bfac1 Merge: 39485ed95d6b8 50a05be484cb7 Author: Paolo Bonzini Date: Sat Dec 12 03:58:31 2020 -0500 Merge tag 'kvm-s390-next-5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD KVM: s390: Features and Test for 5.11 - memcg accouting for s390 specific parts of kvm and gmap - selftest for diag318 - new kvm_stat for when async_pf falls back to sync The selftest even triggers a non-critical bug that is unrelated to diag318, fix will follow later. commit 46d5e62dd3c34770f3bfd0642daa9a7772a00362 Merge: 91163f8214363 7f376f1917d74 Author: Jakub Kicinski Date: Fri Dec 11 20:12:36 2020 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net xdp_return_frame_bulk() needs to pass a xdp_buff to __xdp_return(). strlcpy got converted to strscpy but here it makes no functional difference, so just keep the right code. Conflicts: net/netfilter/nf_tables_api.c Signed-off-by: Jakub Kicinski commit 7ab250385ec276b7b37a2ecc96d375a75b573bd4 Merge: 7f469b6dc484c d1b0c33850d29 Author: Kalle Valo Date: Sat Dec 12 06:51:34 2020 +0200 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for v5.11. Major changes: ath11k * suspend support for QCA6390 PCI devices * support TXOP duration based RTS threshold * mesh: add support for 256 bitmap in blockack frames in 11ax commit d1b0c33850d29b325fb4b26e9b0ea3e473125237 Author: Carl Huang Date: Fri Dec 11 19:35:50 2020 +0200 ath11k: implement suspend for QCA6390 PCI devices Now that all the needed pieces are in place implement suspend support QCA6390 PCI devices. All other devices will return -EOPNOTSUPP during suspend. The suspend is implemented by switching the firmware to WoW mode during suspend, so the firmware will be running on low power mode while host is in suspend. At the moment we are not able to shutdown and fully power off the device due to bugs in MHI subsystem, so WoW mode is a workaround for the time being. During suspend we enable WoW mode, disable CE irq and DP irq, then put MHI to suspend state. During resume, driver resumes MHI firstly, then enables CE irq and dp IRQ, and sends WoW wakeup command to firmware. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1607708150-21066-11-git-send-email-kvalo@codeaurora.org commit d578ec2a0d5cd2859ff6a1347f4429d6c7f730a3 Author: Carl Huang Date: Fri Dec 11 19:35:49 2020 +0200 ath11k: hif: add ce irq enable and disable functions Add ce irq enable and disable hif layer functions, so core module can enable enable them without cleaning pipe and refilling pipe. Needed for suspend. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1607708150-21066-10-git-send-email-kvalo@codeaurora.org commit 79802b13a492d0fdeb922e98628e5ff1a8b74026 Author: Carl Huang Date: Fri Dec 11 19:35:48 2020 +0200 ath11k: implement WoW enable and wakeup commands Implement wow enable ane wow wakeup commands which are needed for suspend. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1607708150-21066-9-git-send-email-kvalo@codeaurora.org commit 2151ffde188a58d7de8fc92ed5ccf38d73ffdb68 Author: Carl Huang Date: Fri Dec 11 19:35:47 2020 +0200 ath11k: set credit_update flag for flow controlled ep only Firmware will check all the pipes before entering WoW mode during suspend. If ATH11K_HTC_FLAG_NEED_CREDIT_UPDATE is set, firmware treats this pipe needed to return credit even though it's actually not required. If any pipe needs to return credit, the suspend_complete message doesn't send to host but is dropped. So host gets time out and WoW suspend failed. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1607708150-21066-8-git-send-email-kvalo@codeaurora.org commit 840c36fa727aea13a2401a5d1d33b722b79df5af Author: Carl Huang Date: Fri Dec 11 19:35:46 2020 +0200 ath11k: dp: stop rx pktlog before suspend Stop dp rx pktlog when entering suspend and reap the mon_status buffer to keep it empty. During resume restart the reap timer. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1607708150-21066-7-git-send-email-kvalo@codeaurora.org commit 8733d835ec433b8ba85c90761003437a8f4c1d4e Author: Carl Huang Date: Fri Dec 11 19:35:45 2020 +0200 ath11k: htc: implement suspend handling When ath11k sends suspend command to firmware, firmware will return suspend_complete events and add handlers for those. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1607708150-21066-6-git-send-email-kvalo@codeaurora.org commit d50370c953bc1a4f95bc5a18d287a84aed5bacc5 Author: Kalle Valo Date: Fri Dec 11 19:35:44 2020 +0200 ath11k: htc: remove unused struct ath11k_htc_ops No need for it so remove. Compile tested only. Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1607708150-21066-5-git-send-email-kvalo@codeaurora.org commit f6fa37a4928ffc4722e4570462bf461634e0d60c Author: Carl Huang Date: Fri Dec 11 19:35:43 2020 +0200 ath11k: pci: read select_window register to ensure write is finished Just when resume from WoW, the write to select_window doesn't take effect immediately, so read the register again to ensure the write operation is finished. Another change is to reset select_window to ZERO because this register isn't restored after WoW, so the content of this register becomes ZERO too. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1607708150-21066-4-git-send-email-kvalo@codeaurora.org commit fa5917e44ee888732bba5294a9a22c1d54cce393 Author: Carl Huang Date: Fri Dec 11 19:35:42 2020 +0200 ath11k: hif: implement suspend and resume functions For suspend support add suspend and resume to HIF layer. These ops are optional and, for example, AHB bus driver does not need to implement these. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1607708150-21066-3-git-send-email-kvalo@codeaurora.org commit 34fb81e4eb924f73f0b0428c6c8fd3b2b44c518c Author: Carl Huang Date: Fri Dec 11 19:35:41 2020 +0200 ath11k: mhi: hook suspend and resume MHI suspend and resume isn't hooked in ath11k yet, so hook these functions needed for suspend support. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1607708150-21066-2-git-send-email-kvalo@codeaurora.org commit f57ad6a9885e8399897daee3249cabccf9c972f8 Author: Pradeep Kumar Chitrapu Date: Thu Dec 10 16:05:24 2020 +0200 ath11k: Fix incorrect tlvs in scan start command Currently 6G specific tlvs have duplicate entries which is causing scan failures. Fix this by removing the duplicate entries of the same tlv. This also fixes out-of-bound memory writes caused due to adding tlvs when num_hint_bssid and num_hint_s_ssid are ZEROs. Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1-01386-QCAHKSWPL_SILICONZ-1 Fixes: 74601ecfef6e ("ath11k: Add support for 6g scan hint") Reported-by: Carl Huang Signed-off-by: Pradeep Kumar Chitrapu Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1607609124-17250-7-git-send-email-kvalo@codeaurora.org commit 0ccdf43988279eed70dece82ffff08fb15278d2c Author: Carl Huang Date: Thu Dec 10 16:05:23 2020 +0200 ath11k: pci: disable VDD4BLOW It's recommended to disable VDD4BLOW during initialisation. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1607609124-17250-6-git-send-email-kvalo@codeaurora.org commit 0699940755e93fc307328523d58c15b8f42e5fe2 Author: Carl Huang Date: Thu Dec 10 16:05:22 2020 +0200 ath11k: pci: fix L1ss clock unstable problem For QCA6390, one PCI related clock drifts sometimes, and it makes PCI link difficult to quit L1ss. Fix it by writing some registers which are known to fix the problem. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1607609124-17250-5-git-send-email-kvalo@codeaurora.org commit babb0ced6acdbaa0b5e0721ec7b347fdbdfa0f6f Author: Carl Huang Date: Thu Dec 10 16:05:21 2020 +0200 ath11k: pci: fix hot reset stability issues For QCA6390, host needs to reset some registers before MHI power up to fix PCI link unstable issue if hot reset happened. Also clear all pending interrupts during power up. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1607609124-17250-4-git-send-email-kvalo@codeaurora.org commit 43ed15e1ee01631687ed8b2e8595859802bc9f10 Author: Carl Huang Date: Thu Dec 10 16:05:20 2020 +0200 ath11k: put hw to DBS using WMI_PDEV_SET_HW_MODE_CMDID It's recommended to use wmi command WMI_PDEV_SET_HW_MODE_CMDID to put hardware to dbs mode instead of wmi_init command. This fixes a few strange stability issues. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1607609124-17250-3-git-send-email-kvalo@codeaurora.org commit fc46e1b2a24a0c85e8469576f66f9a991411bfc7 Author: Kalle Valo Date: Thu Dec 10 16:05:19 2020 +0200 ath11k: mhi: print a warning if firmware crashed There was no way to detect if the firmware crashed so add a warning. At the moment the firmware is not restarted or anything like that, so when this happens ath11k modules need to be reloaded. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1607609124-17250-2-git-send-email-kvalo@codeaurora.org commit 57449b07eafcc831343013b87b57e928c50d16b4 Author: Bhaumik Bhatt Date: Tue Nov 17 09:33:56 2020 -0800 ath11k: use MHI provided APIs to allocate and free MHI controller Use MHI provided APIs to allocate and free MHI controller to improve MHI host driver handling. This also fixes a memory leak as the MHI controller was allocated but never freed. Signed-off-by: Bhaumik Bhatt Reviewed-by: Manivannan Sadhasivam Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1605634436-36506-1-git-send-email-bbhatt@codeaurora.org commit 5dadbe4e3718fb2214199b6dc7af1077fe14bf32 Author: Wen Gong Date: Tue Sep 8 04:13:06 2020 +0000 ath10k: add atomic protection for device recovery When it has more than one restart_work queued meanwhile, the 2nd restart_work is very easy to break the 1st restart work and lead recovery fail. Add a flag to allow only one restart work running untill device successfully recovered. It already has flag ATH10K_FLAG_CRASH_FLUSH, but it can not use this flag again, because it is clear in ath10k_core_start. The function ieee80211_reconfig(called by ieee80211_restart_work) of mac80211 do many things and drv_start(call to ath10k_core_start) is 1st thing, when drv_start complete, it does not mean restart complete. So it add new flag and clear it in ath10k_reconfig_complete, because it is the last thing called from drv_reconfig_complete of function ieee80211_reconfig, after it, the restart process finished. Tested-on: QCA6174 hw3.2 SDIO WLAN.RMH.4.4.1-00049 Signed-off-by: Wen Gong Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/010101746bead6a0-d5e97c66-dedd-4b92-810e-c2e4840fafc9-000000@us-west-2.amazonses.com commit 2bc2b87bb35a4d7b022016819fc28ce9e2b13adc Author: Abhishek Kumar Date: Wed Dec 9 09:11:18 2020 +0200 ath10k: add option for chip-id based BDF selection In some devices difference in chip-id should be enough to pick the right BDF. Add another support for chip-id based BDF selection. With this new option, ath10k supports 2 fallback options. The board name with chip-id as option looks as follows board name 'bus=snoc,qmi-board-id=ff,qmi-chip-id=320' Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.3.2.2-00696-QCAHLSWMTPL-1 Tested-on: QCA6174 HW3.2 WLAN.RM.4.4.1-00157-QCARMSWPZ-1 Signed-off-by: Abhishek Kumar Reviewed-by: Douglas Anderson Reviewed-by: Rakesh Pillai Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201207231824.v3.1.Ia6b95087ca566f77423f3802a78b946f7b593ff5@changeid commit 3993a1a951feba40c0fbc87c0d3a888dbb0f768f Author: Nemo Han Date: Fri Dec 11 18:44:50 2020 -0800 Input: sc27xx - add support for sc2730 and sc2721 Add new compatible strings and match data to support sc2730 and sc2721 which are two varieties of SC27XX family. Signed-off-by: Nemo Han Signed-off-by: Chunyan Zhang Link: https://lore.kernel.org/r/20201117034949.47877-2-zhang.lyra@gmail.com Signed-off-by: Dmitry Torokhov commit 0010d7bbf5f58e9529ecf52bc45f9b3fcff24dad Author: Chunyan Zhang Date: Fri Dec 11 18:44:30 2020 -0800 dt-bindings: input: Add compatible string for SC2721 and SC2730 Add new compatible strings to support sc2730 and sc2721 which are two varieties of SC27XX family. Signed-off-by: Chunyan Zhang Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201117034949.47877-4-zhang.lyra@gmail.com Signed-off-by: Dmitry Torokhov commit 5f23e464a29f7e74c24687837071912538105469 Author: Chunyan Zhang Date: Fri Dec 11 18:44:14 2020 -0800 dt-bindings: input: Convert sc27xx-vibra.txt to json-schema Convert the sprd sc27xx vibrator binding to DT schema using json-schema. Signed-off-by: Chunyan Zhang Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201117034949.47877-3-zhang.lyra@gmail.com Signed-off-by: Dmitry Torokhov commit 3df09cb8c92e2bdfb78c81f678f6990bd780f09a Author: Zheng Yongjun Date: Thu Dec 10 21:57:46 2020 +0800 pinctrl/spear: simplify the return expression of spear300_pinctrl_probe() Simplify the return expression. Signed-off-by: Zheng Yongjun Acked-by: Viresh Kumar Link: https://lore.kernel.org/r/20201210135746.1492-1-zhengyongjun3@huawei.com Signed-off-by: Linus Walleij commit a15f859694c2e36bc98e08c9635b27cf2239f4f2 Author: Zheng Yongjun Date: Thu Dec 10 21:59:02 2020 +0800 pinctrl: mediatek: simplify the return expression of mtk_pinconf_bias_disable_set_rev1() Simplify the return expression. Signed-off-by: Zheng Yongjun Link: https://lore.kernel.org/r/20201210135902.1548-1-zhengyongjun3@huawei.com Signed-off-by: Linus Walleij commit 9777d0bfdae796de3f8d73879a43bc00145dc8ee Author: Zheng Yongjun Date: Thu Dec 10 21:56:09 2020 +0800 gpio: cs5535: Simplify the return expression of cs5535_gpio_probe() Simplify the return expression. Signed-off-by: Zheng Yongjun Link: https://lore.kernel.org/r/20201210135609.1372-1-zhengyongjun3@huawei.com Signed-off-by: Linus Walleij commit 888e5fad9b78a0eaf34854f6f6a122d2d18f9c6e Author: Stefan Riedmueller Date: Sun Oct 4 21:12:31 2020 -0700 Input: stmpe - add axis inversion and swapping capability Make use of generic touchscreen_properties structure to add axis inversion and swapping capabilities. It's configurable via devicetree properties: touchscreen-inverted-x touchscreen-inverted-y touchscreen-swapped-x-y Signed-off-by: Stefan Riedmueller Link: https://lore.kernel.org/r/20200922093903.157232-1-s.riedmueller@phytec.de Signed-off-by: Dmitry Torokhov commit 39485ed95d6b83b62fa75c06c2c4d33992e0d971 Author: Paolo Bonzini Date: Thu Dec 3 09:40:15 2020 -0500 KVM: x86: reinstate vendor-agnostic check on SPEC_CTRL cpuid bits Until commit e7c587da1252 ("x86/speculation: Use synthetic bits for IBRS/IBPB/STIBP"), KVM was testing both Intel and AMD CPUID bits before allowing the guest to write MSR_IA32_SPEC_CTRL and MSR_IA32_PRED_CMD. Testing only Intel bits on VMX processors, or only AMD bits on SVM processors, fails if the guests are created with the "opposite" vendor as the host. While at it, also tweak the host CPU check to use the vendor-agnostic feature bit X86_FEATURE_IBPB, since we only care about the availability of the MSR on the host here and not about specific CPUID bits. Fixes: e7c587da1252 ("x86/speculation: Use synthetic bits for IBRS/IBPB/STIBP") Cc: stable@vger.kernel.org Reported-by: Denis V. Lunev Signed-off-by: Paolo Bonzini commit 2224fc9efb2d6593fbfb57287e39ba4958b188ba Author: Cathy Zhang Date: Mon Dec 7 19:34:41 2020 -0800 KVM: x86: Expose AVX512_FP16 for supported CPUID AVX512_FP16 is supported by Intel processors, like Sapphire Rapids. It could gain better performance for it's faster compared to FP32 if the precision or magnitude requirements are met. It's availability is indicated by CPUID.(EAX=7,ECX=0):EDX[bit 23]. Expose it in KVM supported CPUID, then guest could make use of it; no new registers are used, only new instructions. Signed-off-by: Cathy Zhang Signed-off-by: Kyung Min Park Acked-by: Dave Hansen Reviewed-by: Tony Luck Message-Id: <20201208033441.28207-3-kyung.min.park@intel.com> Signed-off-by: Paolo Bonzini commit e1b35da5e624f8b09d2e98845c2e4c84b179d9a4 Author: Kyung Min Park Date: Mon Dec 7 19:34:40 2020 -0800 x86: Enumerate AVX512 FP16 CPUID feature flag Enumerate AVX512 Half-precision floating point (FP16) CPUID feature flag. Compared with using FP32, using FP16 cut the number of bits required for storage in half, reducing the exponent from 8 bits to 5, and the mantissa from 23 bits to 10. Using FP16 also enables developers to train and run inference on deep learning models fast when all precision or magnitude (FP32) is not needed. A processor supports AVX512 FP16 if CPUID.(EAX=7,ECX=0):EDX[bit 23] is present. The AVX512 FP16 requires AVX512BW feature be implemented since the instructions for manipulating 32bit masks are associated with AVX512BW. The only in-kernel usage of this is kvm passthrough. The CPU feature flag is shown as "avx512_fp16" in /proc/cpuinfo. Signed-off-by: Kyung Min Park Acked-by: Dave Hansen Reviewed-by: Tony Luck Message-Id: <20201208033441.28207-2-kyung.min.park@intel.com> Acked-by: Borislav Petkov Signed-off-by: Paolo Bonzini commit fb6360534ecc0a2703f7b6076cf1397385d23df8 Author: Aaron Lewis Date: Fri Dec 4 09:25:31 2020 -0800 selftests: kvm: Merge user_msr_test into userspace_msr_exit_test Both user_msr_test and userspace_msr_exit_test tests the functionality of kvm_msr_filter. Instead of testing this feature in two tests, merge them together, so there is only one test for this feature. Signed-off-by: Aaron Lewis Message-Id: <20201204172530.2958493-1-aaronlewis@google.com> Signed-off-by: Paolo Bonzini commit 3cea1891748e0ed8e79fa5d9afe40750319751d1 Author: Aaron Lewis Date: Mon Oct 12 12:47:16 2020 -0700 selftests: kvm: Test MSR exiting to userspace Add a selftest to test that when the ioctl KVM_X86_SET_MSR_FILTER is called with an MSR list, those MSRs exit to userspace. This test uses 3 MSRs to test this: 1. MSR_IA32_XSS, an MSR the kernel knows about. 2. MSR_IA32_FLUSH_CMD, an MSR the kernel does not know about. 3. MSR_NON_EXISTENT, an MSR invented in this test for the purposes of passing a fake MSR from the guest to userspace. KVM just acts as a pass through. Userspace is also able to inject a #GP. This is demonstrated when MSR_IA32_XSS and MSR_IA32_FLUSH_CMD are misused in the test. When this happens a #GP is initiated in userspace to be thrown in the guest which is handled gracefully by the exception handling framework introduced earlier in this series. Tests for the generic instruction emulator were also added. For this to work the module parameter kvm.force_emulation_prefix=1 has to be enabled. If it isn't enabled the tests will be skipped. A test was also added to ensure the MSR permission bitmap is being set correctly by executing reads and writes of MSR_FS_BASE and MSR_GS_BASE in the guest while alternating which MSR userspace should intercept. If the permission bitmap is being set correctly only one of the MSRs should be coming through at a time, and the guest should be able to read and write the other one directly. Signed-off-by: Aaron Lewis Reviewed-by: Alexander Graf Message-Id: <20201012194716.3950330-5-aaronlewis@google.com> Signed-off-by: Paolo Bonzini commit 6c44221b05236cc65d76cb5dc2463f738edff39d Author: Uros Bizjak Date: Thu Oct 29 15:04:57 2020 +0100 KVM/VMX: Use TEST %REG,%REG instead of CMP $0,%REG in vmenter.S Saves one byte in __vmx_vcpu_run for the same functionality. Cc: Paolo Bonzini Cc: Sean Christopherson Signed-off-by: Uros Bizjak Message-Id: <20201029140457.126965-1-ubizjak@gmail.com> Signed-off-by: Paolo Bonzini commit d21a1240f5169a07a230d72e0e6d3773b2a088b4 Author: Bob Pearson Date: Thu Dec 10 11:42:59 2020 -0600 RDMA/rxe: Use acquire/release for memory ordering Change work and completion queues to use smp_load_acquire() and smp_store_release() to synchronize between driver and users. This commit goes with a matching series of commits in the rxe user space provider. Link: https://lore.kernel.org/r/20201210174258.5234-1-rpearson@hpe.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit 9d5522199505c761575c8ea31dcfd9a2a8d73614 Author: Nikita Shubin Date: Thu Dec 10 10:05:14 2020 +0300 gpiolib: irq hooks: fix recursion in gpiochip_irq_unmask irqchip shared with multiple gpiochips, leads to recursive call of gpiochip_irq_mask/gpiochip_irq_unmask which was assigned to rqchip->irq_mask/irqchip->irq_unmask, these happens becouse of only irqchip->irq_enable == gpiochip_irq_enable is checked. Let's add an additional check to make sure shared irqchip is detected even if irqchip->irq_enable wasn't defined. Fixes: a8173820f441 ("gpio: gpiolib: Allow GPIO IRQs to lazy disable") Signed-off-by: Nikita Shubin Link: https://lore.kernel.org/r/20201210070514.13238-1-nikita.shubin@maquefel.me Signed-off-by: Linus Walleij commit e6071cada1694bf13c63e31381993df494d78c42 Author: Sergio Paracuellos Date: Mon Dec 7 09:11:51 2020 +0100 dt-bindings: mt7621-gpio: convert bindings to YAML format Convert the mt7621-gpio device tree bindings to the new YAML format. Signed-off-by: Sergio Paracuellos Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201207081151.7489-1-sergio.paracuellos@gmail.com Signed-off-by: Linus Walleij commit aa0b1574fd36f6929f0a3094342a08622c80b4d1 Author: Rafael J. Wysocki Date: Fri Dec 11 21:17:35 2020 +0100 PCI/ACPI: Fix companion lookup for device 0 on the root bus In some cases acpi_pci_find_companion() returns an incorrect device object as the ACPI companion for device 0 on the root bus (bus 0). On the affected systems that device is the PCI interface to the host bridge and the "ACPI companion" returned for it corresponds to a non-PCI device located in the SoC (e.g. a sensor on an I2C bus). As a result of this, the ACPI device object "attached" to PCI device 00:00.0 cannot be used for enumerating the device that is really represented by it which (of course) is problematic. Address that issue by preventing acpi_pci_find_companion() from returning a device object with a valid _HID (which by the spec should not be present uder ACPI device objects corresponding to PCI devices) for PCI device 00:00.0. [bhelgaas: use pci_is_root_bus()] Link: https://lore.kernel.org/linux-acpi/1409ba0c-1580-dc09-e6fe-a0c9bcda6462@gmail.com/ Link: https://lore.kernel.org/r/4673285.9aE2nYKHPr@kreacher Reported-by: Daniel Scally Tested-by: Daniel Scally Signed-off-by: Rafael J. Wysocki Signed-off-by: Bjorn Helgaas Reviewed-by: Daniel Scally commit 01a9350bdd49fb161502fc7a7ee03342d3a4d37a Author: Lars Povlsen Date: Wed Dec 9 15:27:52 2020 +0100 dt-bindings: pinctrl: pinctrl-microchip-sgpio: Add irq support This describe the new bindings for the added IRQ support in the pinctrl-microchip-sgpio driver. Signed-off-by: Lars Povlsen Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201209142753.683208-3-lars.povlsen@microchip.com Signed-off-by: Linus Walleij commit be2dc859abd4d7ad5e0f5d12ed767a3313b4e839 Author: Lars Povlsen Date: Wed Dec 9 15:27:51 2020 +0100 pinctrl: pinctrl-microchip-sgpio: Add irq support (for sparx5) This adds 'interrupt-controller' features for the signals available on the Microchip SGPIO controller, however only for controller versions on the Sparx5 platform (or later). Signed-off-by: Lars Povlsen Link: https://lore.kernel.org/r/20201209142753.683208-2-lars.povlsen@microchip.com [Select GPIOLIB_IRQCHIP in Kconfig] Signed-off-by: Linus Walleij commit aa3b66f401b372598b29421bab4d17b631b92407 Author: Thomas Gleixner Date: Fri Dec 4 11:55:19 2020 +0100 tick/sched: Make jiffies update quick check more robust The quick check in tick_do_update_jiffies64() whether jiffies need to be updated is not really correct under all circumstances and on all architectures, especially not on 32bit systems. The quick check does: if (now < READ_ONCE(tick_next_period)) return; and the counterpart in the update is: WRITE_ONCE(tick_next_period, next_update_time); This has two problems: 1) On weakly ordered architectures there is no guarantee that the stores before the WRITE_ONCE() are visible which means that other CPUs can operate on a stale jiffies value. 2) On 32bit the store of tick_next_period which is an u64 is split into two 32bit stores. If the first 32bit store advances tick_next_period far out and the second 32bit store is delayed (virt, NMI ...) then jiffies will become stale until the second 32bit store happens. Address this by seperating the handling for 32bit and 64bit. On 64bit problem #1 is addressed by replacing READ_ONCE() / WRITE_ONCE() with smp_load_acquire() / smp_store_release(). On 32bit problem #2 is addressed by protecting the quick check with the jiffies sequence counter. The load and stores can be plain because the sequence count mechanics provides the required barriers already. Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/87czzpc02w.fsf@nanos.tec.linutronix.de commit 51a224eaf8512bc8c355e71a88b4554fda9cdeba Author: Dmitry Torokhov Date: Fri Dec 11 13:14:00 2020 -0800 Input: adp5589-keys - do not explicitly control IRQ for wakeup If device is set up as a wakeup source, I2C core configures the interrupt line as wake IRQ and PM core automatically configures it for waking up the system on system suspend transition, so we do not have to explicitly call enable_irq_wake() and disable_irq_wake() in suspend/resume. Link: https://lore.kernel.org/r/20201120073920.3214492-2-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 3e35c1946805b3ecc7967e0df2bd95a7d0e0bff1 Author: Dmitry Torokhov Date: Fri Dec 11 13:13:25 2020 -0800 Input: adp5589-keys - do not unconditionally configure as wakeup source We should not be configuring the controller as a wakeup source in the driver, but rather rely on I2C core to mark it as such by either instantiating as I2C_CLIENT_WAKEUP or specifying "wakeup-source" device property. Link: https://lore.kernel.org/r/20201120073920.3214492-1-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 94ddf7a371ff5d06281825bb63cf0ac61ca1928d Author: Zheng Yongjun Date: Fri Dec 11 13:00:14 2020 -0800 Input: ipx4xx-beeper - convert comma to semicolon Replace a comma between expression statements by a semicolon. Signed-off-by: Zheng Yongjun Link: https://lore.kernel.org/r/20201211085032.2598-1-zhengyongjun3@huawei.com Signed-off-by: Dmitry Torokhov commit 70a62fac8ffde9be8330a7b0494df34465bc091f Author: Zheng Yongjun Date: Fri Dec 11 12:58:58 2020 -0800 Input: parkbd - convert comma to semicolon Replace a comma between expression statements by a semicolon. Signed-off-by: Zheng Yongjun Link: https://lore.kernel.org/r/20201211084957.2540-1-zhengyongjun3@huawei.com Signed-off-by: Dmitry Torokhov commit 13fef8ef9fb81d338761430003726cd256e28d34 Author: Jonathan Corbet Date: Mon Nov 30 15:41:56 2020 -0700 docs: Note that sphinx 1.7 will be required soon The time has come to drop support for some truly ancient versions of sphinx; put in a warning now. Signed-off-by: Jonathan Corbet commit e998879d4fb7991856916972168cf27c0d86ed12 Author: Ashish Kalra Date: Thu Dec 10 01:25:15 2020 +0000 x86,swiotlb: Adjust SWIOTLB bounce buffer size for SEV guests For SEV, all DMA to and from guest has to use shared (un-encrypted) pages. SEV uses SWIOTLB to make this happen without requiring changes to device drivers. However, depending on the workload being run, the default 64MB of it might not be enough and it may run out of buffers to use for DMA, resulting in I/O errors and/or performance degradation for high I/O workloads. Adjust the default size of SWIOTLB for SEV guests using a percentage of the total memory available to guest for the SWIOTLB buffers. Adds a new sev_setup_arch() function which is invoked from setup_arch() and it calls into a new swiotlb generic code function swiotlb_adjust_size() to do the SWIOTLB buffer adjustment. v5 fixed build errors and warnings as Reported-by: kbuild test robot Signed-off-by: Ashish Kalra Co-developed-by: Borislav Petkov Signed-off-by: Borislav Petkov Signed-off-by: Konrad Rzeszutek Wilk commit 7d95a88f9254b711a3a95106fc73f6a3a9866a40 Merge: 3ae9c3cde51ab 6585bd827407f Author: Palmer Dabbelt Date: Fri Dec 11 12:30:26 2020 -0800 Add and use a generic version of devmem_is_allowed() As part of adding STRICT_DEVMEM support to the RISC-V port, Zong provided an implementation of devmem_is_allowed() that's exactly the same as the version in a handful of other ports. Rather than duplicate code, I've put a generic version of this in lib/ and used it for the RISC-V port. * palmer/generic-devmem: arm64: Use the generic devmem_is_allowed() arm: Use the generic devmem_is_allowed() RISC-V: Use the new generic devmem_is_allowed() lib: Add a generic version of devmem_is_allowed() commit 6585bd827407f55ee30a782492208bfaf4f52feb Author: Palmer Dabbelt Date: Thu Jul 9 12:05:36 2020 -0700 arm64: Use the generic devmem_is_allowed() I recently copied this into lib/ for use by the RISC-V port. Acked-by: Catalin Marinas Reviewed-by: Luis Chamberlain Signed-off-by: Palmer Dabbelt commit 914ee96654d87abc548bdd44ad9e4b3a14173cac Author: Palmer Dabbelt Date: Thu Jul 9 12:00:10 2020 -0700 arm: Use the generic devmem_is_allowed() This is exactly the same as the arm64 version, which I recently copied into lib/ for use by the RISC-V port. Reviewed-by: Luis Chamberlain Signed-off-by: Palmer Dabbelt commit 78ed473c76192ab7b8e96c5948cca82db4c744fe Author: Palmer Dabbelt Date: Thu Jul 9 11:51:17 2020 -0700 RISC-V: Use the new generic devmem_is_allowed() This allows us to enable STRICT_DEVMEM. Reviewed-by: Luis Chamberlain Signed-off-by: Palmer Dabbelt commit 527701eda5f196588df9b36a30651804fea7d1a7 Author: Palmer Dabbelt Date: Thu Jul 9 11:43:21 2020 -0700 lib: Add a generic version of devmem_is_allowed() As part of adding support for STRICT_DEVMEM to the RISC-V port, Zong provided a devmem_is_allowed() implementation that's exactly the same as all the others I checked. Instead I'm adding a generic version, which will soon be used. Reviewed-by: Luis Chamberlain Signed-off-by: Palmer Dabbelt commit d8cc403b70de61160aaafddd776ee53aa5aa77eb Author: Yixian Liu Date: Fri Dec 11 09:37:37 2020 +0800 RDMA/hns: Simplify AEQE process for different types of queue There is no need to get queue number repeatly for different queues from an AEQE entity, as they are the same. Furthermore, redefine the AEQE structure to make the codes more readable. In addition, HNS_ROCE_EVENT_TYPE_CEQ_OVERFLOW is removed because the hardware never reports this event. Link: https://lore.kernel.org/r/1607650657-35992-12-git-send-email-liweihang@huawei.com Signed-off-by: Yixian Liu Signed-off-by: Wenpeng Liang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 61918e9b008492f48577692428aca3cebf56111a Author: Yixing Liu Date: Fri Dec 11 09:37:36 2020 +0800 RDMA/hns: Fix inaccurate prints Some %d in print format string should be %u, and some prints miss the useful errno or are in nonstandard format. Just fix above issues. Link: https://lore.kernel.org/r/1607650657-35992-11-git-send-email-liweihang@huawei.com Signed-off-by: Yixing Liu Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit dcdc366acf8ffc29f091a09e08b4e46caa0a0f21 Author: Wenpeng Liang Date: Fri Dec 11 09:37:35 2020 +0800 RDMA/hns: Fix incorrect symbol types Types of some fields, variables and parameters of some functions should be unsigned. Link: https://lore.kernel.org/r/1607650657-35992-10-git-send-email-liweihang@huawei.com Signed-off-by: Wenpeng Liang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 62f3b70ed656640ecb63432014f4bb258cb1975a Author: Xinhao Liu Date: Fri Dec 11 09:37:34 2020 +0800 RDMA/hns: Clear redundant variable initialization There is no need to initialize some variable because they will be assigned with a value later. Link: https://lore.kernel.org/r/1607650657-35992-9-git-send-email-liweihang@huawei.com Signed-off-by: Xinhao Liu Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit dc93a0d987fcfe93b132871e72d4ea5aff36dd5c Author: Lang Cheng Date: Fri Dec 11 09:37:33 2020 +0800 RDMA/hns: Fix coding style issues Just format the code without modifying anything, including fixing some redundant and missing blanks and spaces and changing the variable definition order. Link: https://lore.kernel.org/r/1607650657-35992-8-git-send-email-liweihang@huawei.com Signed-off-by: Lang Cheng Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 29b52027ac354f2a0e5c4d17ca1b621a1644949d Author: Yixian Liu Date: Fri Dec 11 09:37:32 2020 +0800 RDMA/hns: Remove unnecessary access right set during INIT2INIT As the qp access right is checked and setted in common function hns_roce_v2_set_opt_fields(), there is no need to set again for a special case INIT2INIT. Fixes: 926a01dc000d ("RDMA/hns: Add QP operations support for hip08 SoC") Fixes: 7db82697b8bf ("RDMA/hns: Add support for extended atomic in userspace") Link: https://lore.kernel.org/r/1607650657-35992-7-git-send-email-liweihang@huawei.com Signed-off-by: Yixian Liu Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit f75506833eed65cc537293508b7edd5788d67e23 Author: Weihang Li Date: Fri Dec 11 09:37:31 2020 +0800 RDMA/hns: WARN_ON if get a reserved sl from users According to the RoCE v1 specification, the sl (service level) 0-7 are mapped directly to priorities 0-7 respectively, sl 8-15 are reserved. The driver should verify whether the value of sl is larger than 7, if so, an exception should be returned. Link: https://lore.kernel.org/r/1607650657-35992-6-git-send-email-liweihang@huawei.com Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 94a8c4dfcdb2b4fcb3dfafc39c1033a0b4637c86 Author: Weihang Li Date: Fri Dec 11 09:37:30 2020 +0800 RDMA/hns: Avoid filling sl in high 3 bits of vlan_id Only the low 12 bits of vlan_id is valid, and service level has been filled in Address Vector. So there is no need to fill sl in vlan_id in Address Vector. Fixes: 7406c0036f85 ("RDMA/hns: Only record vlan info for HIP08") Link: https://lore.kernel.org/r/1607650657-35992-5-git-send-email-liweihang@huawei.com Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 603bee935f38080a3674c763c50787751e387779 Author: Weihang Li Date: Fri Dec 11 09:37:29 2020 +0800 RDMA/hns: Do shift on traffic class when using RoCEv2 The high 6 bits of traffic class in GRH is DSCP (Differentiated Services Codepoint), the driver should shift it before the hardware gets it when using RoCEv2. Fixes: 606bf89e98ef ("RDMA/hns: Refactor for hns_roce_v2_modify_qp function") Fixes: fba429fcf9a5 ("RDMA/hns: Fix missing fields in address vector") Link: https://lore.kernel.org/r/1607650657-35992-4-git-send-email-liweihang@huawei.com Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 4ddeacf68a3dd05f346b63f4507e1032a15cc3cc Author: Wenpeng Liang Date: Fri Dec 11 09:37:28 2020 +0800 RDMA/hns: Normalization the judgment of some features Whether to enable the these features should better depend on the enable flags, not the value of related fields. Fixes: 5c1f167af112 ("RDMA/hns: Init SRQ table for hip08") Fixes: 3cb2c996c9dc ("RDMA/hns: Add support for SCCC in size of 64 Bytes") Link: https://lore.kernel.org/r/1607650657-35992-3-git-send-email-liweihang@huawei.com Signed-off-by: Wenpeng Liang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 1c0ca9cd1741687f529498ddb899805fc2c51caa Author: Wenpeng Liang Date: Fri Dec 11 09:37:27 2020 +0800 RDMA/hns: Limit the length of data copied between kernel and userspace For ib_copy_from_user(), the length of udata may not be the same as that of cmd. For ib_copy_to_user(), the length of udata may not be the same as that of resp. So limit the length to prevent out-of-bounds read and write operations from ib_copy_from_user() and ib_copy_to_user(). Fixes: de77503a5940 ("RDMA/hns: RDMA/hns: Assign rq head pointer when enable rq record db") Fixes: 633fb4d9fdaa ("RDMA/hns: Use structs to describe the uABI instead of opencoding") Fixes: ae85bf92effc ("RDMA/hns: Optimize qp param setup flow") Fixes: 6fd610c5733d ("RDMA/hns: Support 0 hop addressing for SRQ buffer") Fixes: 9d9d4ff78884 ("RDMA/hns: Update the kernel header file of hns") Link: https://lore.kernel.org/r/1607650657-35992-2-git-send-email-liweihang@huawei.com Signed-off-by: Wenpeng Liang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit b96f038432362a20b96d4c52cefeb2936e2cfd2f Author: Wang ShaoBo Date: Thu Nov 26 09:12:39 2020 +0800 cpufreq: Fix cpufreq_online() return value on errors Make cpufreq_online() return negative error codes on all errors that cause the policy to be destroyed, as appropriate. Signed-off-by: Wang ShaoBo [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit ec06e586ab921f8eca86d6c3ed32bffefd3ef50f Author: Rafael J. Wysocki Date: Wed Nov 18 20:02:42 2020 +0100 cpufreq: Fix up several kerneldoc comments Fix up the remaining kerneldoc comments that don't adhere to the expected format and clarify some of them a bit. No functional changes. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar commit 7854c7520b86f0c14f7fcfea6fd1785617844341 Author: Viresh Kumar Date: Tue Nov 17 17:02:10 2020 +0530 cpufreq: stats: Use local_clock() instead of jiffies local_clock() has better precision and accuracy as compared to jiffies, lets use it for time management in cpufreq stats. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 90ac908a418b836427d6eaf84fbc5062881747fd Author: Rafael J. Wysocki Date: Thu Nov 12 20:26:42 2020 +0100 cpufreq: schedutil: Simplify sugov_update_next_freq() Rearrange a conditional to make it more straightforward. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar commit 2554c32f0b84df1f506546125c9d15c8044a2ec2 Author: Rafael J. Wysocki Date: Thu Nov 12 20:25:15 2020 +0100 cpufreq: intel_pstate: Simplify intel_cpufreq_update_pstate() Avoid doing the same assignment in both branches of a conditional, do it after the whole conditional instead. Signed-off-by: Rafael J. Wysocki commit 42807537b6a08b280612c1d456f33d876af74af3 Merge: 05b8955f43536 bb025fb6c276a Author: Rafael J. Wysocki Date: Fri Dec 11 19:52:52 2020 +0100 Merge back cpufreq material for v5.11. commit 9a02fd8b19247e80e2354a227b6e2392e8fae78a Author: Lukas Bulwahn Date: Mon Dec 7 13:41:41 2020 +0100 x86/ia32_signal: Propagate __user annotation properly Commit 57d563c82925 ("x86: ia32_setup_rt_frame(): consolidate uaccess areas") dropped a __user annotation in a cast when refactoring __put_user() to unsafe_put_user(). Hence, since then, sparse warns in arch/x86/ia32/ia32_signal.c:350:9: warning: cast removes address space '__user' of expression warning: incorrect type in argument 1 (different address spaces) expected void const volatile [noderef] __user *ptr got unsigned long long [usertype] * Add the __user annotation to restore the propagation of address spaces. Signed-off-by: Lukas Bulwahn Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201207124141.21859-1-lukas.bulwahn@gmail.com commit d3569c149dfe05f1e6e322d4851eed42dbad3df6 Merge: 0477e92881850 6a575e84f11e1 Author: Rafael J. Wysocki Date: Fri Dec 11 19:40:00 2020 +0100 Merge tag 'devfreq-next-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux Pull devfreq updates for 5.11 from Chanwoo Choi: 1. Update devfreq core - Add new devfreq_frequency tracepoint to show the frequency change information. - Add governor feature flag. The devfreq governor is able to set the specific flag in order to support a non-common feature. For example, if the governor supports the 'immutable' feature, don't allow user space to change the governor via sysfs. - Add governor sysfs attribute flag for each sysfs file. Prior to that the devfreq subsystem allowed all of the sysfs files to be accessed regardless of the governor type. But some sysfs fils are not supported by specific devfreq governors. In order to only allow the sysfs files supported by the governor to be accessed, clarify the access permissions of sysfs attributes according to the governor. When adding the devfreq governor, specify the available attribute information by using DEVFREQ_GOV_ATTR_* symbols. The user can read or write the sysfs attributes in accordance to the specified access permissions. - Clean-up the code to reduce duplication for the devfreq tracepoint and to remove redundant governor_name field from struct devfreq. 2. Update exynos-bus.c devfreq driver - Add interconnect API support to the Samsung Exynos Bus Frequency driver, exynos-bus.c. Complementing the devfreq driver with interconnect functionality allows to ensure that the QoS requirements regarding devices accessing the system memory (e.g. video processing devices) will be met and allows to avoid issues like DMA underrun. 3. Update tegra devfreq driver - Add interconnect support and OPP interface to tegra30-devfreq.c. Also, it is to guarantee the QoS requirement of some devices like the display controller. - Move tegra20-devfreq.c from drivers/devfreq/ into drivers/memory/tegra/ in order to use the more proper monitoring feature such as EMC_STAT which is located in drivers/memory/tegra/. - Separate the configuration information for different SoCs in tegra30-devfrqe.c. The tegra30-devfreq.c had been supporting both tegra30-actmon and tegra124-actmon devices. In order to use the more correct configuration data, separate them. - Use dev_err_probe() to handle the deferred probe error in tegra30-devfreq.c. 4. Pull the request of 'Tegra SoC and clock controller changes for v5.11' sent by Krzysztof Kozlowski in order to avoid a build error." * tag 'devfreq-next-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux: PM / devfreq: tegra30: Separate configurations per-SoC generation PM / devfreq: tegra30: Support interconnect and OPPs from device-tree PM / devfreq: tegra20: Deprecate in a favor of emc-stat based driver PM / devfreq: exynos-bus: Add registration of interconnect child device dt-bindings: devfreq: Add documentation for the interconnect properties soc/tegra: fuse: Add stub for tegra_sku_info soc/tegra: fuse: Export tegra_read_ram_code() clk: tegra: Export Tegra20 EMC kernel symbols PM / devfreq: tegra30: Silence deferred probe error PM / devfreq: tegra20: Relax Kconfig dependency PM / devfreq: tegra20: Silence deferred probe error PM / devfreq: Remove redundant governor_name from struct devfreq PM / devfreq: Add governor attribute flag for specifc sysfs nodes PM / devfreq: Add governor feature flag PM / devfreq: Add tracepoint for frequency changes PM / devfreq: Unify frequency change to devfreq_update_target func trace: events: devfreq: Use fixed indentation size to improve readability commit 718072ceb211833f3c71724f49d733d636067191 Author: Thierry Strudel Date: Tue Dec 8 11:19:55 2020 -0800 PM: domains: create debugfs nodes when adding power domains debugfs nodes were created in genpd_debug_init alled in late_initcall preventing power domains registered though loadable modules to have a debugfs entry. Create/remove debugfs nodes when the power domain is added/removed to/from the internal gpd_list. Signed-off-by: Thierry Strudel Reviewed-by: Greg Kroah-Hartman Reviewed-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki commit 7f469b6dc484cd5b2ea61763607892626afc2b21 Author: Souptick Joarder Date: Thu Dec 10 01:06:57 2020 +0530 mt76: remove unused variable q Kernel test robot reported warning: drivers/net/wireless/mediatek/mt76/tx.c: In function 'mt76_txq_schedule': >> drivers/net/wireless/mediatek/mt76/tx.c:499:21: warning: variable 'q' >> set but not used [-Wunused-but-set-variable] 499 | struct mt76_queue *q; | ^ Reported-by: kernel test robot Signed-off-by: Souptick Joarder Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1607542617-4005-1-git-send-email-jrdr.linux@gmail.com commit 81daab1f8d57dccc7d5f26dd2f34847b6c4e6717 Author: Lee Jones Date: Thu Nov 26 13:31:51 2020 +0000 iwlwifi: fw: acpi: Demote non-conformant function headers Fixes the following W=1 kernel build warning(s): drivers/net/wireless/intel/iwlwifi/fw/acpi.c:123: warning: Function parameter or member 'dev' not described in 'iwl_acpi_get_dsm_object' drivers/net/wireless/intel/iwlwifi/fw/acpi.c:123: warning: Function parameter or member 'rev' not described in 'iwl_acpi_get_dsm_object' drivers/net/wireless/intel/iwlwifi/fw/acpi.c:123: warning: Function parameter or member 'func' not described in 'iwl_acpi_get_dsm_object' drivers/net/wireless/intel/iwlwifi/fw/acpi.c:123: warning: Function parameter or member 'args' not described in 'iwl_acpi_get_dsm_object' drivers/net/wireless/intel/iwlwifi/fw/acpi.c:142: warning: Function parameter or member 'dev' not described in 'iwl_acpi_get_dsm_u8' drivers/net/wireless/intel/iwlwifi/fw/acpi.c:142: warning: Function parameter or member 'rev' not described in 'iwl_acpi_get_dsm_u8' drivers/net/wireless/intel/iwlwifi/fw/acpi.c:142: warning: Function parameter or member 'func' not described in 'iwl_acpi_get_dsm_u8' Cc: Johannes Berg Cc: Emmanuel Grumbach Cc: Luca Coelho Cc: Intel Linux Wireless Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201126133152.3211309-17-lee.jones@linaro.org commit fe472e9d47c8324cc849337f476c22e1e27773c4 Author: Lee Jones Date: Thu Nov 26 13:31:49 2020 +0000 iwlwifi: fw: dbg: Fix misspelling of 'reg_data' in function header Fixes the following W=1 kernel build warning(s): drivers/net/wireless/intel/iwlwifi/fw/dbg.c:1932: warning: Function parameter or member 'reg_data' not described in 'iwl_dump_ini_mem' drivers/net/wireless/intel/iwlwifi/fw/dbg.c:1932: warning: Excess function parameter 'reg' description in 'iwl_dump_ini_mem' Cc: Johannes Berg Cc: Emmanuel Grumbach Cc: Luca Coelho Cc: Intel Linux Wireless Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Shahar S Matityahu Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201126133152.3211309-15-lee.jones@linaro.org commit 5a2e2f91e8b5ae867e4071bda544c20d19ed48b0 Author: Lee Jones Date: Thu Nov 26 13:31:48 2020 +0000 iwlwifi: iwl-phy-db: Add missing struct member description for 'trans' Fixes the following W=1 kernel build warning(s): drivers/net/wireless/intel/iwlwifi/iwl-phy-db.c:97: warning: Function parameter or member 'trans' not described in 'iwl_phy_db' Cc: Johannes Berg Cc: Emmanuel Grumbach Cc: Luca Coelho Cc: Intel Linux Wireless Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201126133152.3211309-14-lee.jones@linaro.org commit 220ee462702cca566c8e0d62be44a9ae25cb6e7a Author: Lee Jones Date: Thu Nov 26 13:31:43 2020 +0000 iwlwifi: iwl-eeprom-parse: Fix 'struct iwl_eeprom_enhanced_txpwr's header Fixes the following W=1 kernel build warning(s): drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c:340: warning: cannot understand function prototype: 'struct iwl_eeprom_enhanced_txpwr ' Cc: Johannes Berg Cc: Emmanuel Grumbach Cc: Luca Coelho Cc: Intel Linux Wireless Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201126133152.3211309-9-lee.jones@linaro.org commit dde0a25d06bf52b29d8f42905a2506e27e71740b Author: Lee Jones Date: Thu Nov 26 13:31:42 2020 +0000 iwlwifi: iwl-eeprom-read: Demote one nonconformant function header Fixes the following W=1 kernel build warning(s): drivers/net/wireless/intel/iwlwifi/iwl-eeprom-read.c:347: warning: Function parameter or member 'trans' not described in 'iwl_read_eeprom' drivers/net/wireless/intel/iwlwifi/iwl-eeprom-read.c:347: warning: Function parameter or member 'eeprom' not described in 'iwl_read_eeprom' drivers/net/wireless/intel/iwlwifi/iwl-eeprom-read.c:347: warning: Function parameter or member 'eeprom_size' not described in 'iwl_read_eeprom' Cc: Johannes Berg Cc: Emmanuel Grumbach Cc: Luca Coelho Cc: Intel Linux Wireless Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201126133152.3211309-8-lee.jones@linaro.org commit 05d07f2dc9a9a6415e3cd3df06c2e790889265fe Author: Lee Jones Date: Thu Nov 26 13:31:37 2020 +0000 iwlwifi: mvm: rs: Demote non-conformant function documentation headers Also add documentation for 'mvm'. Fixes the following W=1 kernel build warning(s): drivers/net/wireless/intel/iwlwifi/mvm/rs.c:400: warning: cannot understand function prototype: 'const u16 expected_tpt_legacy[IWL_RATE_COUNT] = ' drivers/net/wireless/intel/iwlwifi/mvm/rs.c:684: warning: Function parameter or member 'mvm' not described in '_rs_collect_tx_data' drivers/net/wireless/intel/iwlwifi/mvm/rs.c:684: warning: Function parameter or member 'tbl' not described in '_rs_collect_tx_data' drivers/net/wireless/intel/iwlwifi/mvm/rs.c:684: warning: Function parameter or member 'scale_index' not described in '_rs_collect_tx_data' drivers/net/wireless/intel/iwlwifi/mvm/rs.c:684: warning: Function parameter or member 'attempts' not described in '_rs_collect_tx_data' drivers/net/wireless/intel/iwlwifi/mvm/rs.c:684: warning: Function parameter or member 'successes' not described in '_rs_collect_tx_data' drivers/net/wireless/intel/iwlwifi/mvm/rs.c:684: warning: Function parameter or member 'window' not described in '_rs_collect_tx_data' drivers/net/wireless/intel/iwlwifi/mvm/rs.c:2677: warning: duplicate section name 'NOTE' drivers/net/wireless/intel/iwlwifi/mvm/rs.c:2682: warning: Function parameter or member 'mvm' not described in 'rs_initialize_lq' drivers/net/wireless/intel/iwlwifi/mvm/rs.c:2682: warning: Function parameter or member 'sta' not described in 'rs_initialize_lq' drivers/net/wireless/intel/iwlwifi/mvm/rs.c:2682: warning: Function parameter or member 'lq_sta' not described in 'rs_initialize_lq' drivers/net/wireless/intel/iwlwifi/mvm/rs.c:2682: warning: Function parameter or member 'band' not described in 'rs_initialize_lq' drivers/net/wireless/intel/iwlwifi/mvm/rs.c:3761: warning: Function parameter or member 'mvm' not described in 'rs_program_fix_rate' drivers/net/wireless/intel/iwlwifi/mvm/rs.c:3761: warning: Function parameter or member 'lq_sta' not described in 'rs_program_fix_rate' drivers/net/wireless/intel/iwlwifi/mvm/rs.c:4213: warning: Function parameter or member 'mvm' not described in 'iwl_mvm_tx_protection' Cc: Johannes Berg Cc: Emmanuel Grumbach Cc: Luca Coelho Cc: Intel Linux Wireless Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201126133152.3211309-3-lee.jones@linaro.org commit 10a0472d1850a97582ac3f8f00b631d4ee652fa7 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:36:35 2020 -0600 iwlwifi: iwl-drv: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by replacing a /* fall through */ comment with the new pseudo-keyword macro fallthrough; instead of letting the code fall through to the next case. Notice that Clang doesn't recognize /* fall through */ comments as implicit fall-through markings. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/edd98d194bfc98b4be93a9bdc303630b719c0e66.1605896060.git.gustavoars@kernel.org commit ff08b5368ce52bd1534a558e3bbcd0834a58c0de Author: Gustavo A. R. Silva Date: Tue Nov 17 09:59:04 2020 -0600 iwlwifi: dvm: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly using the fallthrough pseudo-keyword as a replacement for a number of "fall through" markings. Notice that Clang doesn't recognize "fall through" comments as implicit fall-through. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201117155904.GA14551@embeddedor commit 5a2abdcadc3bd7c8f9a54a89bf0ed1926db993a3 Author: Gustavo A. R. Silva Date: Tue Nov 17 07:50:53 2020 -0600 iwlwifi: mvm: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly using the fallthrough pseudo-keyword as a replacement for a number of "fall through" markings. Notice that Clang doesn't recognize "fall through" comments as implicit fall-through. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201117135053.GA13248@embeddedor commit 3e98a021cc85e7d52acdd1eae8a988e975ec5bf9 Merge: 58f7553fa424f 2fee9583198eb Author: Mark Brown Date: Fri Dec 11 17:49:01 2020 +0000 Merge remote-tracking branch 'spi/for-5.11' into spi-next commit 58f7553fa424fd0fd74e8b796d50c66014cebebe Merge: dd91c55546126 9326e4f1e5dd1 Author: Mark Brown Date: Fri Dec 11 17:48:50 2020 +0000 Merge remote-tracking branch 'spi/for-5.10' into spi-linus commit dd91c555461261fed220ae29a508f508a0afeb43 Merge: bbf5c979011a0 45f0bbdafd26d Author: Mark Brown Date: Fri Dec 11 17:48:47 2020 +0000 Merge remote-tracking branch 'spi/for-5.9' into spi-linus commit 5e999f10a16b90fc1d5ded8aa365e9804e894aa9 Merge: 291de1d102faf 2819569147cb6 Author: Mark Brown Date: Fri Dec 11 17:48:32 2020 +0000 Merge remote-tracking branch 'regulator/for-5.11' into regulator-next commit 460aa020f56c974a3e7e5b5378b2355fec6a2c11 Merge: 031616c434db0 84de089e770b5 Author: Mark Brown Date: Fri Dec 11 17:48:04 2020 +0000 Merge remote-tracking branch 'asoc/for-5.11' into asoc-next commit 031616c434db05ce766f76c62865f55698e0924f Merge: 064841ccfc49b 85a7555575a0e Author: Mark Brown Date: Fri Dec 11 17:47:55 2020 +0000 Merge remote-tracking branch 'asoc/for-5.10' into asoc-linus commit 064841ccfc49b2315dc0b797239862d3a343aa07 Merge: bbf5c979011a0 ebb11d1d9fe2d Author: Mark Brown Date: Fri Dec 11 17:47:52 2020 +0000 Merge remote-tracking branch 'asoc/for-5.9' into asoc-linus commit 84de089e770b57280d87dff51be894b6fda18810 Merge: 51e325f7f8294 8f7ef6fca0317 Author: Mark Brown Date: Fri Dec 11 17:46:27 2020 +0000 Merge series "ASoC: SOF: Intel: fix to dsp state dump trace levels" from Kai Vehmanen : Small series that addresses a problem where DSP status dump for a failure case, ends up being printed as as debug print. This is important information for any bug report. While at it, the series contains a few cleanups to related code. Ranjani Sridharan (3): ASoC: SOF: Intel: hda: remove duplicated status dump ASoC: SOF: modify the SOF_DBG flags ASoC: SOF: Intel: hda: fix the condition passed to sof_dev_dbg_or_err sound/soc/sof/debug.c | 2 +- sound/soc/sof/intel/byt.c | 2 +- sound/soc/sof/intel/hda-loader.c | 19 +++++++++++++------ sound/soc/sof/intel/hda.c | 10 ++++------ sound/soc/sof/loader.c | 4 ++-- sound/soc/sof/ops.c | 2 +- sound/soc/sof/sof-priv.h | 13 ++++++++----- 7 files changed, 30 insertions(+), 22 deletions(-) -- 2.29.2 commit 51e325f7f829478498f963deea8e161c7d537fb6 Merge: 45c29d9ae9ae4 f102d0d173982 Author: Mark Brown Date: Fri Dec 11 17:46:26 2020 +0000 Merge series "ASoC: rt1015p: delay 300ms for waiting calibration" from Tzung-Bi Shih : The 1st patch moves SDB control from DAI ops trigger to DAPM event (per review comments in v1). The 2nd patch adds the 300ms delay for waiting calibration. Changes from v2: - Use gpiod_set_value_cansleep() instead of gpiod_set_value(). (https://patchwork.kernel.org/project/alsa-devel/patch/20201210033617.79300-2-tzungbi@google.com/) - Assuming the calibration state gets lost after system suspend. (https://patchwork.kernel.org/project/alsa-devel/patch/20201210033617.79300-3-tzungbi@google.com/) Changes from v1: (https://patchwork.kernel.org/project/alsa-devel/patch/20201209033742.3825973-1-tzungbi@google.com/) - Move the delay from trigger to DAPM event. Tzung-Bi Shih (2): ASoC: rt1015p: move SDB control from trigger to DAPM ASoC: rt1015p: delay 300ms after SDB pulling high for calibration sound/soc/codecs/rt1015p.c | 69 ++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 37 deletions(-) -- 2.29.2.684.gfbc64c5ab5-goog commit c3ae3dc896fab5524f9b20f547e72e4b892d8d8e Author: Geert Uytterhoeven Date: Fri Dec 11 14:39:07 2020 +0100 serial: 8250_pci: Drop bogus __refdata annotation Since commit d73dfc6a4199e0e3 ("serial: 8250_pci: remove __devexit usage") in v3.9, the 8250/16550 PCI serial driver no longer has any code or data located in initmem, hence there is no need to annotate the pci_serial_quirks structure with __refdata. Drop the annotation, to avoid suppressing future section warnings. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201211133907.2970460-1-geert+renesas@glider.be Signed-off-by: Greg Kroah-Hartman commit 87a0b9f98ac5a14aae5b0fbcff930a240b24f827 Author: Kevin Hilman Date: Thu Dec 10 16:57:44 2020 -0800 tty: serial: meson: enable console as module Enable serial driver to be built as a module. To do so, init the console support on driver/module load instead of using console_initcall(). Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20201211005744.12855-1-khilman@baylibre.com Signed-off-by: Greg Kroah-Hartman commit a256e24021bf7ceedd29fe65eb45c7adfffffad2 Author: Zheng Yongjun Date: Fri Dec 11 16:54:28 2020 +0800 usb: phy: convert comma to semicolon Replace a comma between expression statements by a semicolon. Signed-off-by: Zheng Yongjun Link: https://lore.kernel.org/r/20201211085428.2871-1-zhengyongjun3@huawei.com Signed-off-by: Greg Kroah-Hartman commit 5b65781d06ea90ef2f8e51a13352c43c3daa8cdc Author: Vignesh Raghavendra Date: Tue Dec 8 11:04:40 2020 +0200 dmaengine: ti: k3-udma-glue: Add support for K3 PKTDMA This commit adds support for PKTDMA in k3-udma glue driver. Use new psil_endpoint_config struct to get static data for a given channel or a flow during setup. Make sure that the RX flows being mapped to a RX channel is within the range of flows that is been allocated to that RX channel. Signed-off-by: Vignesh Raghavendra Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20201208090440.31792-21-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit d2abc982333c02f9e1ff1c6b3782174f5b7662d7 Author: Peter Ujfalusi Date: Tue Dec 8 11:04:39 2020 +0200 dmaengine: ti: k3-udma: Initial support for K3 PKTDMA One of the DMAs introduced with AM64 is the Packet DMA (PKTDMA). It serves similar purpose as K3 UDMAP channels in packet mode, but with notable differences, like tflow support and channels being allocated to service specific peripherals. The rings for the PKTDMA is integrated within the DMA itself instead of using rings from the general purpose ringacc. PKTDMA can be used to service PSI-L peripherals, similarly to K3 UDMA channels. Most of the driver code can be reused for PKTDMA tchan/rchan support but new setup and allocation functions are needed to handle the differences between the DMAs. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20201208090440.31792-20-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit 8844898028d4127b0071ecb5a72e1894bd8b21d6 Author: Peter Ujfalusi Date: Tue Dec 8 11:04:38 2020 +0200 dmaengine: ti: k3-udma: Add support for BCDMA channel TPL handling Unlike UDMAP the BCDMA defines the channel TPL levels per channel type. In UDMAP the number of high and ultra-high channels applies to both tchan and rchan. BCDMA defines the TPL per channel types: bchan, tchan and rchan can have different number of high and ultra-high channels. In order to support BCDMA channel TPL we need to move the tpl information as per channel type property for the DMAs. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20201208090440.31792-19-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit 017794739702d444ca48115ff0fcdce19edb5559 Author: Peter Ujfalusi Date: Tue Dec 8 11:04:37 2020 +0200 dmaengine: ti: k3-udma: Initial support for K3 BCDMA One of the DMAs introduced with AM64 is the Block Copy DMA (BCDMA). It serves similar purpose as K3 UDMAP channels in TR mode. The rings for the BCDMA is integrated within the DMA itself instead of using rings from the general purpose ringacc. A BCDMA have two different type of channels: - Block Copy Channels (bchan) - Split Channels (tchan and rchan) tchan and rchan can be used to service PSI-L peripherals, similarly to K3 UDMA channels. bchan can be only used for block copy operation (TR type15) like the paired K3 UDMA tchan/rchan configured in block copy mode. bchans can be also used to service peripherals directly if an external trigger is selected for the channel. Most of the driver code can be reused for BCDMA bchan/tchan/rchan support but new setup and allocation functions are needed to handle the differences between the DMAs. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20201208090440.31792-18-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit d782298c6f6b854452965b56d91616dfb60490c5 Author: Grygorii Strashko Date: Tue Dec 8 11:04:36 2020 +0200 soc: ti: k3-ringacc: add AM64 DMA rings support. The DMAs in AM64 have built in rings compared to AM654/J721e/J7200 where a separate and generic ringacc is used. The ring SW interface is similar to ringacc with some major architectural differences, like They are part of the DMA (BCDMA or PKTDMA). They are dual mode rings are modeled as pair of Rings objects which has common configuration and memory buffer, but separate real-time control register sets for each direction mem2dev (forward) and dev2mem (reverse). The ringacc driver must be initialized for DMA rings use with k3_ringacc_dmarings_init() as it is not an independent device as ringacc is. AM64 rings must be requested only using k3_ringacc_request_rings_pair(), and forward ring must always be initialized/configured. After this any other Ringacc APIs can be used without any callers changes. Signed-off-by: Grygorii Strashko Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20201208090440.31792-17-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit fc373e47d72605cc3f5012ddda49d2dca430d51f Author: Peter Ujfalusi Date: Tue Dec 8 11:04:35 2020 +0200 dmaengine: ti: Add support for k3 event routers In k3 architecture a DMA channel (in TR momde) can be triggered by global events, origination from different modules. The events for triggers can be sent from any module which is connected to PSI-L fabric, but the event number to be sent is DMA channel specific, it is only known after the channel itself is requested. The router operation needs to be split up: - route_allocate: configure the dma_spec for the DMA and store the configuration which is needed for the router's input - set_event: callback used by the DMA driver to set the event number for the channel and enable the routing Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20201208090440.31792-16-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit 2329725d1a228fb0d6424ee8d499f266020cc113 Author: Peter Ujfalusi Date: Tue Dec 8 11:04:34 2020 +0200 dmaengine: ti: k3-psil: Add initial map for AM64 Add initial PSI-L map file for AM64. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20201208090440.31792-15-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit b9366e2577a38ca5322f326cff9752c2008597c6 Author: Peter Ujfalusi Date: Tue Dec 8 11:04:33 2020 +0200 dmaengine: ti: k3-psil: Extend psil_endpoint_config for K3 PKTDMA Additional fields needed for K3 PKTDMA to be able to handle the mapped channels (channels are locked to handle specific threads) and flow ranges for these mapped threads. PKTDMA also introduces tflow for tx channels which can not be found in K3 UDMA architecture. Signed-off-by: Peter Ujfalusi Reviewed-by: Grygorii Strashko Link: https://lore.kernel.org/r/20201208090440.31792-14-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit 1d92cec649a38f9f4f488d5e359a27a4bb5f182d Author: Peter Ujfalusi Date: Tue Dec 8 11:04:32 2020 +0200 dt-bindings: dma: ti: Add document for K3 PKTDMA New binding document for Texas Instruments K3 Packet DMA (PKTDMA). PKTDMA is introduced as part of AM64. Signed-off-by: Peter Ujfalusi Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201208090440.31792-13-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit 991b96e0f12234e2a7e66d67275981b53572acd8 Author: Peter Ujfalusi Date: Tue Dec 8 11:04:31 2020 +0200 dt-bindings: dma: ti: Add document for K3 BCDMA New binding document for Texas Instruments K3 Block Copy DMA (BCDMA). BCDMA is introduced as part of AM64. Signed-off-by: Peter Ujfalusi Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201208090440.31792-12-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit adc0f941f9a8fae7e79b249b0abcdbf86017ea53 Author: Peter Ujfalusi Date: Tue Dec 8 11:04:30 2020 +0200 dmaengine: dmatest: Use dmaengine_get_dma_device By using the dmaengine_get_dma_device() to get the device for dma_api use, the dmatest can support per channel coherency if it is supported by the DMA controller. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20201208090440.31792-11-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit f082c6df970e6e9aa97af35e826fec824007fbae Author: Peter Ujfalusi Date: Tue Dec 8 11:04:29 2020 +0200 dmaengine: doc: client: Update for dmaengine_get_dma_device() usage Client drivers should use the dmaengine_get_dma_device(chan) to get the device pointer which should be used for DMA API for allocations and mapping. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20201208090440.31792-10-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit ab650ef6d548153862119e1bf3bf267510707f48 Author: Peter Ujfalusi Date: Tue Dec 8 11:04:28 2020 +0200 dmaengine: Add support for per channel coherency handling If the DMA device supports per channel coherency configuration (a channel can be configured to have coherent or not coherent view) then a single device (the DMA controller's device) can not be used for dma_api for all channels as channels can have different coherency. Introduce custom_dma_mapping flag for the dma_chan and a new helper to get the device pointer to be used for dma_api for the given channel. Client drivers should be updated to be able to support per channel coherency by: - dma_map_single(chan->device->dev, ptr, size, DMA_TO_DEVICE); + struct device *dma_dev = dmaengine_get_dma_device(chan); + + dma_map_single(dma_dev, ptr, size, DMA_TO_DEVICE); Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20201208090440.31792-9-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit 4f910c035f38053ac8eb63a672c78862c535cd0f Author: Peter Ujfalusi Date: Tue Dec 8 11:04:27 2020 +0200 dmaengine: of-dma: Add support for optional router configuration callback Additional configuration for the DMA event router might be needed for a channel which can not be done during device_alloc_chan_resources callback since the router information is not yet present for the drivers. If there is a need for additional configuration for the channel if DMA router is in use, then the driver can implement the device_router_config callback. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20201208090440.31792-8-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit d553e2ab0137ae489b41824b1e8283053c363ed1 Author: Peter Ujfalusi Date: Tue Dec 8 11:04:26 2020 +0200 dmaengine: ti: k3-udma-glue: Configure the dma_dev for rings Rings in RING mode should be using the DMA device for DMA API as in this mode the ringacc will not access the ring memory in any ways, but the DMA is. Fix up the ring configuration and set the dma_dev unconditionally and let the ringacc driver to select the correct device to use for DMA API. Signed-off-by: Peter Ujfalusi Reviewed-by: Grygorii Strashko Link: https://lore.kernel.org/r/20201208090440.31792-7-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit aa8a4c4edad0bed7aaf3a7cfcae9fa555d847955 Author: Peter Ujfalusi Date: Tue Dec 8 11:04:25 2020 +0200 dmaengine: ti: k3-udma-glue: Get the ringacc from udma_dev If of_xudma_dev_get() returns with the valid udma_dev then the driver already got the ringacc, there is no need to execute of_k3_ringacc_get_by_phandle() for each channel via the glue layer. Signed-off-by: Peter Ujfalusi Reviewed-by: Grygorii Strashko Link: https://lore.kernel.org/r/20201208090440.31792-6-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit 426506a7e0f1902268c3edbdc7e5475624a9d18b Author: Peter Ujfalusi Date: Tue Dec 8 11:04:24 2020 +0200 dmaengine: ti: k3-udma-glue: Add function to get device pointer for DMA API Glue layer users should use the device of the DMA for DMA mapping and allocations as it is the DMA which accesses to descriptors and buffers, not the clients Signed-off-by: Peter Ujfalusi Reviewed-by: Grygorii Strashko Link: https://lore.kernel.org/r/20201208090440.31792-5-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit 1609c15a20b8e0c1adc2a26ad81fd7e2b968f81a Author: Peter Ujfalusi Date: Tue Dec 8 11:04:23 2020 +0200 dmaengine: ti: k3-udma: Add support for second resource range from sysfw Resource allocation via sysfw can use up to two ranges per resource subtype to support more complex resource assignment, mainly for DMA channels. Take the second range also into consideration when setting up the maps for available resources. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20201208090440.31792-4-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit 5e1cb1cb0f9fe670900d736822a7dbcd7c11dbba Author: Peter Ujfalusi Date: Tue Dec 8 11:04:22 2020 +0200 dmaengine: ti: k3-udma: Wait for peer teardown completion if supported Set the TDTYPE if it is supported on the platform (j721e) which will cause UDMAP to wait for the remote peer to finish the teardown before returning the teardown completed message. Signed-off-by: Peter Ujfalusi Tested-by: Keerthy Reviewed-by: Grygorii Strashko Link: https://lore.kernel.org/r/20201208090440.31792-3-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit e2de925bbfe321ba0588c99f577c59386ab1f428 Author: Peter Ujfalusi Date: Tue Dec 8 11:04:21 2020 +0200 dmaengine: ti: k3-udma: Correct normal channel offset when uchan_cnt is not 0 According to different sections of the TRM, the hchan_cnt of CAP3 includes the number of uchan in UDMA, thus the start offset of the normal channels are hchan_cnt. Fixes: daf4ad0499aa4 ("dmaengine: ti: k3-udma: Query throughput level information from hardware") Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20201208090440.31792-2-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit 6ef4474a84d797940140dd64ab1915671b57e1ec Merge: 1d3dd68749b9f 4cba398f37f86 Author: Vinod Koul Date: Fri Dec 11 21:18:10 2020 +0530 Merge tag 'tags/drivers_soc_for_5.11' into dmaengine/next drivers: soc: TI SOC changes for 5.11 - ti_sci changes towards DMSS support - Static warning fixes - Kconfig update for Keystone ARM64 socs - AM64X SOC family support commit 1d3dd68749b9f4a4da272f39608d03b4bae0b69f Author: Amelie Delaunay Date: Fri Nov 20 15:33:20 2020 +0100 dmaengine: stm32-mdma: rework interrupt handler To avoid multiple entries in MDMA interrupt handler for each flag&interrupt enable, manage all flags set at once. Signed-off-by: Amelie Delaunay Link: https://lore.kernel.org/r/20201120143320.30367-5-amelie.delaunay@st.com Signed-off-by: Vinod Koul commit e0ebdbdcb42a66f49b7587dc50cc6f528ec55cad Author: Amelie Delaunay Date: Fri Nov 20 15:33:19 2020 +0100 dmaengine: stm32-dma: take address into account when computing max width DMA_SxPAR or DMA_SxM0AR/M1AR registers have to be aligned on PSIZE or MSIZE respectively. This means that bus width needs to be forced to 1 byte when computed width is not aligned with address. Signed-off-by: Amelie Delaunay Link: https://lore.kernel.org/r/20201120143320.30367-4-amelie.delaunay@st.com Signed-off-by: Vinod Koul commit 5d4d4dfbda18063231a95dea28fdeab148f23301 Author: Amelie Delaunay Date: Fri Nov 20 15:33:18 2020 +0100 dmaengine: stm32-dma: clean channel configuration when channel is freed When dma_channel_release is called, it means that the channel won't be used anymore with the configuration it had. To ensure a future client can safely use the channel after it has been released, clean the configuration done when channel was requested. Signed-off-by: Amelie Delaunay Link: https://lore.kernel.org/r/20201120143320.30367-3-amelie.delaunay@st.com Signed-off-by: Vinod Koul commit a44d9d72453ea6b064380d4835e712e574e58d9b Author: Amelie Delaunay Date: Fri Nov 20 15:33:17 2020 +0100 dmaengine: stm32-dma: rework irq handler to manage error before xfer events To better understand error that can be detected by the DMA controller, manage the error flags before the transfer flags. This way, it is possible to know if the FIFO error flag is set for an over/underrun condition or a FIFO level error. When a FIFO over/underrun condition occurs, the data is not lost because peripheral request is not acknowledged by the stream until the over/ underrun condition is cleared. If this acknowledge takes too much time, the peripheral itself may detect an over/underrun condition of its internal buffer and data might be lost. That's why in case the FIFO error flag is set, we check if the channel is disabled or not, and if a Transfer Complete flag is set, which means that the channel is disabled because of the end of transfer. Because channel is disabled by hardware either by a FIFO level error, or by an end of transfer. Signed-off-by: Amelie Delaunay Link: https://lore.kernel.org/r/20201120143320.30367-2-amelie.delaunay@st.com Signed-off-by: Vinod Koul commit 561e3121841a8541402a331c19e9b78e3d2786d3 Author: Geert Uytterhoeven Date: Fri Dec 11 14:35:12 2020 +0100 hwmon: (iio_hwmon) Drop bogus __refdata annotation As the IIO hardware monitoring driver does not have any code or data located in initmem, there is no need to annotate the iio_hwmon_driver structure with __refdata. Drop the annotation, to avoid suppressing future section warnings. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201211133512.2969952-1-geert+renesas@glider.be Signed-off-by: Guenter Roeck commit fb42dce4d7b56aac31bd7ef47228515eae9ac968 Author: Geert Uytterhoeven Date: Fri Dec 11 14:35:31 2020 +0100 hwmon: (xgene) Drop bogus __refdata annotation As the X-Gene hardware monitoring driver does not have any code or data located in initmem, there is no need to annotate the xgene_hwmon_driver structure with __refdata. Drop the annotation, to avoid suppressing future section warnings. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201211133531.2970027-1-geert+renesas@glider.be Signed-off-by: Guenter Roeck commit 15d4a6f736c446231907e9f04ce6fc4b57c32aa2 Author: Krzysztof Kozlowski Date: Tue Nov 17 23:08:07 2020 +0100 dt-bindings: hwmon: convert AD ADM1275 bindings to dt-schema Convert the Analog Devices ADM1275 bindings to dt-schema. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201117220807.208747-4-krzk@kernel.org [groeck: Removed unnecessary type ($ref) declaration] Signed-off-by: Guenter Roeck commit db4919ec86ff405273a767e1a9b51e2760e73ce5 Author: Eddie James Date: Fri Nov 20 11:33:15 2020 +1030 hwmon: (occ) Add new temperature sensor type The latest version of the On-Chip Controller (OCC) has a different format for the temperature sensor data. Add a new temperature sensor version to handle this data. Signed-off-by: Eddie James Reviewed-by: Joel Stanley Signed-off-by: Joel Stanley Link: https://lore.kernel.org/r/20201120010315.190737-4-joel@jms.id.au Signed-off-by: Guenter Roeck commit 5ec96d74cf28c939e01b829f556832949b4c272a Author: Eddie James Date: Fri Nov 20 11:33:14 2020 +1030 fsi: occ: Add support for P10 The P10 OCC has a different SRAM address for the command and response buffers. In addition, the SBE commands to access the SRAM have changed format. Add versioning to the driver to handle these differences. Signed-off-by: Eddie James Reviewed-by: Joel Stanley Signed-off-by: Joel Stanley Link: https://lore.kernel.org/r/20201120010315.190737-3-joel@jms.id.au Signed-off-by: Guenter Roeck commit eedc65cb083bab7faf0501bcf528fc236384f302 Author: Eddie James Date: Fri Nov 20 11:33:13 2020 +1030 dt-bindings: fsi: Add P10 OCC device documentation Add the P10 compatible string. Signed-off-by: Eddie James Reviewed-by: Joel Stanley Signed-off-by: Joel Stanley Acked-by: Rob Herring Link: https://lore.kernel.org/r/20201120010315.190737-2-joel@jms.id.au Signed-off-by: Guenter Roeck commit 2f070176a0a47495c1dc49473e4b591779c073d4 Author: Krzysztof Kozlowski Date: Tue Nov 17 23:08:06 2020 +0100 dt-bindings: hwmon: convert TI ADS7828 bindings to dt-schema Convert the TI ADS7828 bindings to dt-schema. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201117220807.208747-3-krzk@kernel.org Signed-off-by: Guenter Roeck commit 27b4bc2b877ea085d6a3935ab1ca1b2e07c9123d Author: Krzysztof Kozlowski Date: Tue Nov 17 23:08:05 2020 +0100 dt-bindings: hwmon: convert AD AD741x bindings to dt-schema Convert the Analog Devices AD741x bindings to dt-schema. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201117220807.208747-2-krzk@kernel.org Signed-off-by: Guenter Roeck commit 94f1ab9445652551b3414be6b27b17fd90cb077d Author: Krzysztof Kozlowski Date: Tue Nov 17 23:08:04 2020 +0100 dt-bindings: hwmon: convert TI INA2xx bindings to dt-schema Convert the TI INA2xx bindings to dt-schema. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201117220807.208747-1-krzk@kernel.org Signed-off-by: Guenter Roeck commit e1d15969635ca61aa12091a53dc5d148e5621782 Author: Colin Ian King Date: Mon Dec 7 14:24:10 2020 +0000 hwmon: (ltc2992) Fix less than zero comparisons with an unsigned integer There are several occurrances of a less than zero error check on a u32 unsigned integer. These will never be true. Fix this by making reg_value a plain int. Addresses-Coverity: ("Unsigned comparison against zero") Fixes: e126370240e0 ("hwmon: (ltc2992) Add support") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20201207142410.168987-1-colin.king@canonical.com Signed-off-by: Guenter Roeck commit 966ead9153c25ee08d14a494585df4439b210474 Author: Lukas Bulwahn Date: Mon Dec 7 16:26:58 2020 +0100 hwmon: (pmbus/q54sj108a2) Correct title underline length Commit b722d7b9e4da ("hwmon: (pmbus) Driver for Delta power supplies Q54SJ108A2") provides new documentation for DELTA Q54SJ108A2NC* drivers, but the title underline was too short. make htmldocs warns: Documentation/hwmon/q54sj108a2.rst:4: WARNING: Title underline too short. Adjust the title underline to the correct length. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20201207152658.32444-1-lukas.bulwahn@gmail.com [groeck: Adjust subject] Signed-off-by: Guenter Roeck commit fe8c573c89ebfd8ff1fd099704ad4ced1a9dfba9 Author: Alexandru Tachici Date: Thu Dec 3 09:11:55 2020 +0200 dt-bindings: hwmon: Add documentation for ltc2992 Add documentation for ltc2992. Signed-off-by: Alexandru Tachici Reviewed-by: Rob Herring Signed-off-by: Guenter Roeck commit 9ca26df1ba25c362113d9bb7b08ca93e260ce3e8 Author: Alexandru Tachici Date: Thu Dec 3 09:11:54 2020 +0200 hwmon: (ltc2992) Add support for GPIOs. LTC2992 has 4 open-drain GPIOS. This patch exports to user space the 4 GPIOs using the GPIO driver Linux API. Signed-off-by: Alexandru Tachici Signed-off-by: Guenter Roeck commit b0bd407e94b036d597c6060d64c22094ff85b13c Author: Alexandru Tachici Date: Thu Dec 3 09:11:53 2020 +0200 hwmon: (ltc2992) Add support LTC2992 is a rail-to-rail system monitor that measures current, voltage, and power of two supplies. Two ADCs simultaneously measure each supply’s current. A third ADC monitors the input voltages and four auxiliary external voltages. Signed-off-by: Alexandru Tachici Signed-off-by: Guenter Roeck commit d014538aa38561cd24c5eb228223585f26c5ec71 Author: xiao.ma Date: Tue Dec 1 16:59:00 2020 -1000 hwmon: (pmbus) Driver for Delta power supplies Q54SJ108A2 The driver supports Q54SJ108A2 series modules of Delta. Standard attributes are in sysfs, and other attributes are in debugfs. Signed-off-by: xiao.ma Link: https://lore.kernel.org/r/20201202025900.1842-1-max701@126.com [groeck: Replaced spaces with tabs, dropped excessive spaces, fixed module prefix in documentation] Signed-off-by: Guenter Roeck commit 2eda5b5f96418d0a006aaa7812165b72c3226b8c Author: Zheng Yongjun Date: Fri Dec 11 16:55:10 2020 +0800 usb: ucsi: convert comma to semicolon Replace a comma between expression statements by a semicolon. Reviewed-by: Heikki Krogerus Signed-off-by: Zheng Yongjun Link: https://lore.kernel.org/r/20201211085510.2928-1-zhengyongjun3@huawei.com Signed-off-by: Greg Kroah-Hartman commit 007e3370806da1bbe83d0b43a04f420ae2e19dbb Merge: b5206275b46c3 fddd408ad448e Author: Greg Kroah-Hartman Date: Fri Dec 11 16:16:52 2020 +0100 Merge tag 'usb-serial-5.11-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next Johan writes: USB-serial updates for 5.11-rc1 Here are the USB-serial updates for 5.11-rc1, including: - keyspan_pda write-implementation fixes - digi_acceleport write-wakeup fix - mos7720 parport-restore fix - mos7720 parport-tasklet removal - cp210x termios-handling cleanups - option device-flag fix - ftdi_sio GPIO CBUS-configuration improvements - removal of in_interrupt() uses Included are also various clean ups. All have been in linux-next with no reported issues. * tag 'usb-serial-5.11-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: (30 commits) USB: serial: ftdi_sio: log the CBUS GPIO validity USB: serial: ftdi_sio: drop GPIO line checking dead code USB: serial: ftdi_sio: report the valid GPIO lines to gpiolib USB: serial: option: add interface-number sanity check to flag handling USB: serial: cp210x: clean up dtr_rts() USB: serial: cp210x: refactor flow-control handling USB: serial: cp210x: drop flow-control debugging USB: serial: cp210x: set terminal settings on open USB: serial: cp210x: clean up line-control handling USB: serial: cp210x: return early on unchanged termios USB: serial: mos7720: defer state restore to a workqueue USB: serial: mos7720: fix parallel-port state restore USB: serial: remove write wait queue USB: serial: digi_acceleport: fix write-wakeup deadlocks USB: serial: keyspan_pda: drop redundant usb-serial pointer USB: serial: keyspan_pda: use BIT() macro USB: serial: keyspan_pda: clean up comments and whitespace USB: serial: keyspan_pda: clean up xircom/entrega support USB: serial: keyspan_pda: add write-fifo support USB: serial: keyspan_pda: increase transmitter threshold ... commit e15f2fa959f2cce8a05e8e3a596e75d068cd42c5 Author: John Garry Date: Wed Dec 2 18:36:56 2020 +0800 driver core: platform: Add devm_platform_get_irqs_affinity() Drivers for multi-queue platform devices may also want managed interrupts for handling HW queue completion interrupts, so add support. The function accepts an affinity descriptor pointer, which covers all IRQs expected for the device. The function is devm class as the only current in-tree user will also use devm method for requesting the interrupts; as such, the function is made as devm as it can ensure ordering of freeing the irq and disposing of the mapping. Signed-off-by: John Garry Signed-off-by: Marc Zyngier Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/1606905417-183214-5-git-send-email-john.garry@huawei.com commit 1c3f69b4543af0aad514c127298e5ea40392575d Author: John Garry Date: Wed Dec 2 18:36:55 2020 +0800 ACPI: Drop acpi_dev_irqresource_disabled() The functionality of acpi_dev_irqresource_disabled() is same as in common irqresource_disabled(), so drop acpi_dev_irqresource_disabled() in favour of that function. Signed-off-by: John Garry Signed-off-by: Marc Zyngier Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/1606905417-183214-4-git-send-email-john.garry@huawei.com commit 9806731db684a475ade1e95d166089b9edbd9da3 Author: John Garry Date: Wed Dec 2 18:36:54 2020 +0800 resource: Add irqresource_disabled() Add a common function to set the fields for a irq resource to disabled, which mimics what is done in acpi_dev_irqresource_disabled(), with a view to replace that function. Signed-off-by: John Garry Signed-off-by: Marc Zyngier Reviewed-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/1606905417-183214-3-git-send-email-john.garry@huawei.com commit 1d3aec89286254487df7641c30f1b14ad1d127a5 Author: John Garry Date: Wed Dec 2 18:36:53 2020 +0800 genirq/affinity: Add irq_update_affinity_desc() Add a function to allow the affinity of an interrupt be switched to managed, such that interrupts allocated for platform devices may be managed. This new interface has certain limitations, and attempts to use it in the following circumstances will fail: - For when the kernel is configured for generic IRQ reservation mode (in config GENERIC_IRQ_RESERVATION_MODE). The reason being that it could conflict with managed vs. non-managed interrupt accounting. - The interrupt is already started, which should not be the case during init - The interrupt is already configured as managed, which means double init Suggested-by: Thomas Gleixner Signed-off-by: John Garry Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1606905417-183214-2-git-send-email-john.garry@huawei.com commit 34dd263fce3114147f21698f8e55e05b9e8185bd Author: Marc Zyngier Date: Sun Nov 29 13:52:08 2020 +0000 irqchip/gic-v3-its: Flag device allocation as proxied if behind a PCI bridge An aliasing PCI bridge is another case where we should flag the corresponding allocation as "proxied", as MSIs are coming with the bridge's RID, and not the originating device's. Signed-off-by: Marc Zyngier Tested-by: John Garry Link: https://lore.kernel.org/r/20201129135208.680293-4-maz@kernel.org commit 5fe71d271df8c05e1060c0184764eba18b17a96f Author: Marc Zyngier Date: Sun Nov 29 13:52:07 2020 +0000 irqchip/gic-v3-its: Tag ITS device as shared if allocating for a proxy device The ITS already has some notion of "shared" devices. Let's map the MSI_ALLOC_FLAGS_PROXY_DEVICE flag onto this internal property. Signed-off-by: Marc Zyngier Tested-by: John Garry Link: https://lore.kernel.org/r/20201129135208.680293-3-maz@kernel.org commit 91f90daa4fb2b77db7aa25ef2e0206f2e3962665 Author: Marc Zyngier Date: Sun Nov 29 13:52:06 2020 +0000 platform-msi: Track shared domain allocation We have two flavours of platform-MSI: - MSIs generated by devices for themselves (the usual case) - MSIs generated on behalf of other devices, as the generating device is some form of bridge (either a wire-to-MSI bridge, or even a non-transparent PCI bridge that repaints the PCI requester ID). In the latter case, the underlying interrupt architecture may need to track this in order to keep the mapping alive even when no MSI are currently being generated. Add a set of flags to the generic msi_alloc_info_t structure, as well as the MSI_ALLOC_FLAGS_PROXY_DEVICE flag that will get advertized by the platform-MSI code when allocating an irqdomain for a device. Signed-off-by: Marc Zyngier Tested-by: John Garry Link: https://lore.kernel.org/r/20201129135208.680293-2-maz@kernel.org commit fc6c7cd3878641fd43189f15697e7ad0871f5c1a Author: Lokesh Vutla Date: Mon Nov 2 17:36:31 2020 +0530 irqchip/ti-sci-intr: Fix freeing of irqs ti_sci_intr_irq_domain_free() assumes that out_irq of intr is stored in data->chip_data and uses it for calling ti_sci irq_free() and then mark the out_irq as available resource. But ti_sci_intr_irq_domain_alloc() is storing p_hwirq(parent's hardware irq) which is translated from out_irq. This is causing resource leakage and eventually out_irq resources might be exhausted. Fix ti_sci_intr_irq_domain_alloc() by storing the out_irq in data->chip_data. Fixes: a5b659bd4bc7 ("irqchip/ti-sci-intr: Add support for INTR being a parent to INTR") Signed-off-by: Lokesh Vutla Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201102120631.11165-1-lokeshvutla@ti.com commit b10d5fd489b0c67f59cbdd28d95f4bd9f76a62f2 Author: Lokesh Vutla Date: Mon Nov 2 17:36:14 2020 +0530 irqchip/ti-sci-inta: Fix printing of inta id on probe success On a successful probe, the driver tries to print a success message with INTA device id. It uses pdev->id for printing the id but id is stored in inta->ti_sci_id. Fix it by correcting the dev_info parameter. Fixes: 5c4b585d2910 ("irqchip/ti-sci-inta: Add support for INTA directly connecting to GIC") Signed-off-by: Lokesh Vutla Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201102120614.11109-1-lokeshvutla@ti.com commit 04e7f423f4a96ad492fd51bf2234b8982400ab5f Author: Vineet Gupta Date: Thu Nov 5 13:22:09 2020 -0800 drivers/irqchip: Remove EZChip NPS interrupt controller NPS platform has been removed from ARC port and there are no in-tree users of it now. So RIP ! Signed-off-by: Vineet Gupta Signed-off-by: Marc Zyngier Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/20201105212210.1891598-3-vgupta@synopsys.com commit b388fa50142510fb6477f130bb1b3f05a0a263a1 Author: Valentin Schneider Date: Mon Nov 9 09:41:21 2020 +0000 Revert "genirq: Add fasteoi IPI flow" handle_percpu_devid_fasteoi_ipi() has no more users, and handle_percpu_devid_irq() can do all that it was supposed to do. Get rid of it. This reverts commit c5e5ec033c4ab25c53f1fd217849e75deb0bf7bf. Signed-off-by: Valentin Schneider Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201109094121.29975-6-valentin.schneider@arm.com commit a2e042e13ff322ad523a2f131dd6e03e8bc05053 Author: Valentin Schneider Date: Mon Nov 9 09:41:20 2020 +0000 irqchip/hip04: Make IPIs use handle_percpu_devid_irq() As done for the Arm GIC irqchips, move IPIs to handle_percpu_devid_irq() as handle_percpu_devid_fasteoi_ipi() isn't actually required. Signed-off-by: Valentin Schneider Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201109094121.29975-5-valentin.schneider@arm.com commit ffdad793d579c9286c7b67a86d1a3c890fb32082 Author: Valentin Schneider Date: Mon Nov 9 09:41:19 2020 +0000 irqchip/bcm2836: Make IPIs use handle_percpu_devid_irq() As done for the Arm GIC irqchips, move IPIs to handle_percpu_devid_irq() as handle_percpu_devid_fasteoi_ipi() isn't actually required. Signed-off-by: Valentin Schneider Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201109094121.29975-4-valentin.schneider@arm.com commit e52e73b7e9f7d08b8c2ef6fb1657105093e22a03 Author: Valentin Schneider Date: Mon Nov 9 09:41:18 2020 +0000 irqchip/armada-370-xp: Make IPIs use handle_percpu_devid_irq() As done for the Arm GIC irqchips, move IPIs to handle_percpu_devid_irq() as handle_percpu_devid_fasteoi_ipi() isn't actually required. Signed-off-by: Valentin Schneider Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201109094121.29975-3-valentin.schneider@arm.com commit 6abbd6988971aaa607b026eaa0ffd2301352f2ea Author: Valentin Schneider Date: Mon Nov 9 09:41:17 2020 +0000 irqchip/gic, gic-v3: Make SGIs use handle_percpu_devid_irq() handle_percpu_devid_fasteoi_ipi() states: * The biggest difference with the IRQ version is that the interrupt is * EOIed early, as the IPI could result in a context switch, and we need to * make sure the IPI can fire again All that can actually happen scheduler-wise within the handling of an IPI is the raising of TIF_NEED_RESCHED (and / or folding thereof into preempt_count); see scheduler_ipi() or sched_ttwu_pending() for instance. Said flag / preempt_count is evaluated some time later before returning to whatever context was interrupted, and this gates a call to preempt_schedule_irq() (arm64_preempt_schedule_irq() in arm64). Per the above, SGI's do not need a different handler than PPI's, so make them use the same (handle_percpu_devid_irq). Signed-off-by: Valentin Schneider Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201109094121.29975-2-valentin.schneider@arm.com commit 550c1424acf0123ba0c17e22dfcac92d152b2f0e Author: Gregory CLEMENT Date: Wed Nov 25 11:32:06 2020 +0100 irqchip/ocelot: Add support for Jaguar2 platforms This patch extends irqchip driver for ocelot to be used with an other vcoreiii base platform: Jaguar2. Based on a larger patch from Lars Povlsen Signed-off-by: Gregory CLEMENT Signed-off-by: Marc Zyngier Acked-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201125103206.136498-7-gregory.clement@bootlin.com commit 7efdfbd15a21788de8c0743590e777f151a3031b Author: Gregory CLEMENT Date: Wed Nov 25 11:32:05 2020 +0100 irqchip/ocelot: Add support for Serval platforms This patch extends irqchip driver for ocelot to be used with an other vcoreiii base platform: Serval. Based on a larger patch from Lars Povlsen Signed-off-by: Gregory CLEMENT Signed-off-by: Marc Zyngier Acked-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201125103206.136498-6-gregory.clement@bootlin.com commit ffce73d4415391b2d6da4878bf04d6610edf56db Author: Gregory CLEMENT Date: Wed Nov 25 11:32:04 2020 +0100 irqchip/ocelot: Add support for Luton platforms This patch extends irqchip driver for oceleot to be used with an other vcoreiii base platform: Luton. For this platform there is a few differences: - the interrupt must be enabled for the parent controller - there is no trigger register needed to be managed Signed-off-by: Gregory CLEMENT Signed-off-by: Marc Zyngier Acked-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201125103206.136498-5-gregory.clement@bootlin.com commit 5f0c75e7a1333f5ebb5303af55d8c863ea292c23 Author: Gregory CLEMENT Date: Wed Nov 25 11:32:03 2020 +0100 irqchip/ocelot: prepare to support more SoC This patch extends irqchip driver for oceleot to be used with other vcoreiii base platforms. Signed-off-by: Gregory CLEMENT Signed-off-by: Marc Zyngier Acked-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201125103206.136498-4-gregory.clement@bootlin.com commit b307ee828f61bc65d918e820a93b5c547a73dda3 Author: Gregory CLEMENT Date: Wed Nov 25 11:32:02 2020 +0100 dt-bindings: interrupt-controller: Add binding for few Microsemi interrupt controllers Add the Device Tree binding documentation for the Microsemi Jaguar2, Luton and Serval interrupt controller that is part of the ICPU. It is connected directly to the MIPS core interrupt controller. Signed-off-by: Gregory CLEMENT Signed-off-by: Marc Zyngier Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201125103206.136498-3-gregory.clement@bootlin.com commit 47d5e0b0e1c151c06885a78a108001ead96adc75 Author: Gregory CLEMENT Date: Wed Nov 25 11:32:01 2020 +0100 dt-bindings: interrupt-controller: convert icpu intr bindings to json-schema Convert device tree bindings for Microsemi Ocelot SoC ICPU Interrupt Controller to YAML format Signed-off-by: Gregory CLEMENT Signed-off-by: Marc Zyngier Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201125103206.136498-2-gregory.clement@bootlin.com commit 0b39498230ae53e6af981141be99f4c7d5144de6 Author: Shenming Lu Date: Sat Nov 28 22:18:56 2020 +0800 irqchip/gic-v4.1: Reduce the delay when polling GICR_VPENDBASER.Dirty The 10us delay of the poll on the GICR_VPENDBASER.Dirty bit is too high, which might greatly affect the total scheduling latency of a vCPU in our measurement. So we reduce it to 1 to lessen the impact. Signed-off-by: Shenming Lu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201128141857.983-2-lushenming@huawei.com commit 3841245e8498a789c65dedd7ffa8fb2fee2c0684 Author: Marc Zyngier Date: Sun Nov 29 13:55:25 2020 +0000 irqchip/alpine-msi: Fix freeing of interrupts on allocation error path The alpine-msi driver has an interesting allocation error handling, where it frees the same interrupts repeatedly. Hilarity follows. This code is probably never executed, but let's fix it nonetheless. Fixes: e6b78f2c3e14 ("irqchip: Add the Alpine MSIX interrupt controller") Signed-off-by: Marc Zyngier Reviewed-by: Antoine Tenart Cc: Tsahee Zidenberg Cc: Antoine Tenart Link: https://lore.kernel.org/r/20201129135525.396671-1-maz@kernel.org commit 9898a59358d7cb925f63bb77bd40224d1bc4857e Author: Biwen Li Date: Mon Nov 30 18:15:15 2020 +0800 dt-bindings: interrupt-controller: update bindings for supporting more SoCs Update bindings for Layerscape external irqs, support more SoCs(LS1043A, LS1046A, LS1088A, LS208xA, LX216xA) Signed-off-by: Biwen Li Signed-off-by: Marc Zyngier Acked-by: Rob Herring Link: https://lore.kernel.org/r/20201130101515.27431-11-biwen.li@oss.nxp.com commit 4e970a0ada5299d017a4263074f725227c2d2852 Author: Uwe Kleine-König Date: Thu Nov 26 08:23:31 2020 +0100 i2c: remove check that can never be true A driver remove callback is only called if the device was bound before. So it's sure that both dev and dev->driver are valid and dev is an i2c device. If the check fails something louder than "return 0" might be appropriate because the problem is grave (something like memory corruption), otherwise the check is useless. Signed-off-by: Uwe Kleine-König Signed-off-by: Wolfram Sang commit b16a1caf4686895427c810219d4b2f796e676160 Author: Hou Zhiqiang Date: Mon Nov 30 18:15:05 2020 +0800 irqchip/ls-extirq: Add LS1043A, LS1088A external interrupt support Add an new IRQ chip declaration for LS1043A and LS1088A, and cleanup the use of the "bit_reverse" property, now gated on the Soc type. Signed-off-by: Hou Zhiqiang Signed-off-by: Biwen Li Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201130101515.27431-1-biwen.li@oss.nxp.com commit 71637c620a826434ca6f888b0364a036faa27ffa Author: Uwe Kleine-König Date: Thu Nov 26 08:23:30 2020 +0100 i2c: Warn when device removing fails The driver core ignores the return value of struct bus_type::remove. So warn if there is an error that went unnoticed before and return 0 unconditionally in i2c_device_remove(). This prepares changing struct bus_type::remove to return void. Signed-off-by: Uwe Kleine-König [wsa: added a comment and removed unneeded initializtion] Signed-off-by: Wolfram Sang commit 3ee36352e26935c7e8145eb4e7ed38b536ca01fc Author: Huacai Chen Date: Sat Dec 5 17:15:44 2020 +0800 irqchip/loongson-htpic: Fix build warnings Fix build warnings as below: drivers/irqchip/irq-loongson-htpic.c: In function 'htpic_reg_init': >> drivers/irqchip/irq-loongson-htpic.c:62:12: warning: variable 'val' set but not used [-Wunused-but-set-variable] 62 | uint32_t val; | ^~~ drivers/irqchip/irq-loongson-htpic.c: At top level: >> drivers/irqchip/irq-loongson-htpic.c:84:12: warning: no previous prototype for 'htpic_of_init' [-Wmissing-prototypes] 84 | int __init htpic_of_init(struct device_node *node, struct device_node *parent) | ^~~~~~~~~~~~~ Fixes: a93f1d903fa34fc2c5d9fa450bd ("irqchip: Add driver for Loongson-3 HyperTransport PIC controller") Reported-by: kernel test robot Signed-off-by: Huacai Chen Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1607159744-995-1-git-send-email-chenhuacai@kernel.org commit 42a590b0fdf72498ebf47b01ddf006ee92cbfc70 Author: Geert Uytterhoeven Date: Wed Dec 9 11:15:04 2020 +0100 irqchip/gic: Spelling s/REturn/Return/ Fix a capitalization typo. Signed-off-by: Geert Uytterhoeven Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201209101504.2206941-1-geert+renesas@glider.be commit 4421fe533296e070359573ab6d320d74f73c80b9 Author: Parth Y Shah Date: Mon Dec 7 12:03:40 2020 +0530 dmaengine: bam_dma: fix return of bam_dma_irq() While performing suspend/resume, we were getting below kernel crash. [ 54.541672] [FTS][Info]gesture suspend... [ 54.605256] [FTS][Error][GESTURE]Enter into gesture(suspend) failed! [ 54.605256] [ 58.345850] irq event 10: bogus return value fffffff3 ...... [ 58.345966] [] el1_irq+0xb0/0x124 [ 58.345971] [] arch_cpu_idle+0x10/0x18 [ 58.345975] [] do_idle+0x1ac/0x1e0 [ 58.345979] [] cpu_startup_entry+0x20/0x28 [ 58.345983] [] rest_init+0xd0/0xdc [ 58.345988] [] start_kernel+0x390/0x3a4 [ 58.345990] handlers: [ 58.345994] [] bam_dma_irq The reason for the crash we found is, bam_dma_irq() was returning negative value when the device resumes in some conditions. In addition, the irq handler should have one of the below return values. IRQ_NONE interrupt was not from this device or was not handled IRQ_HANDLED interrupt was handled by this device IRQ_WAKE_THREAD handler requests to wake the handler thread Therefore, to resolve this crash, we have changed the return value to IRQ_NONE. Signed-off-by: Parth Y Shah Link: https://lore.kernel.org/r/1607322820-7450-1-git-send-email-sparth1292@gmail.com Signed-off-by: Vinod Koul commit f25b463883a8a2d1b7303a63339c0d589fc94f1e Author: Dave Jiang Date: Tue Nov 17 13:39:14 2020 -0700 dmaengine: idxd: add IAX configuration support in the IDXD driver Add support to allow configuration of Intel Analytics Accelerator (IAX) in addition to the Intel Data Streaming Accelerator (DSA). The IAX hardware has the same configuration interface as DSA. The main difference is the type of operations it performs. We can support the DSA and IAX devices on the same driver with some tweaks. IAX has a 64B completion record that needs to be 64B aligned, as opposed to a 32B completion record that is 32B aligned for DSA. IAX also does not support token management. Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/160564555488.1834439.4261958859935360473.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 51b69c9679de9bcb45b846807d75bab7ce9c6fda Author: Fabien Parent Date: Wed Dec 9 12:47:35 2020 +0100 dt-bindings: dma: mtk-apdma: add bindings for MT8516 SOC Add bindings to APDMA for MT8516 SoC. MT8516 is compatible with MT6577. Signed-off-by: Fabien Parent Reviewed-by: Matthias Brugger Acked-by: Rob Herring Link: https://lore.kernel.org/r/20201209114736.70625-1-fparent@baylibre.com Signed-off-by: Vinod Koul commit 4facce4c12638c5636cbe9d4b8a4a879bebe8570 Author: Jonathan McDowell Date: Thu Nov 26 18:46:02 2020 +0000 dmaengine: qcom: Fix ADM driver kerneldoc markup Update the kerneldoc function headers to fix build warnings: drivers/dma/qcom/qcom_adm.c:180: warning: Function parameter or member 'chan' not described in 'adm_free_chan' drivers/dma/qcom/qcom_adm.c:190: warning: Function parameter or member 'burst' not described in 'adm_get_blksize' drivers/dma/qcom/qcom_adm.c:466: warning: Function parameter or member 'chan' not described in 'adm_terminate_all' drivers/dma/qcom/qcom_adm.c:466: warning: Excess function parameter 'achan' description in 'adm_terminate_all' drivers/dma/qcom/qcom_adm.c:503: warning: Function parameter or member 'achan' not described in 'adm_start_dma' Signed-off-by: Jonathan McDowell Link: https://lore.kernel.org/r/20201126184602.GA1008@earth.li Signed-off-by: Vinod Koul commit 46c3bbd9827952f92e250fa6ee30a797a4c4e17e Author: Kai Vehmanen Date: Fri Dec 11 15:16:13 2020 +0200 ALSA: hda/hdmi: packet buffer index must be set before reading value The check for infoframe transmit status in hdmi_infoframe_uptodate() makes the assumption that packet buffer index is set to zero. Align code with specification and explicitly set the index before AC_VERB_GET_HDMI_DIP_XMIT. The packet index setting affects both DIP-Data and DIP-XmitCtrl verbs. There are no known cases where the old implementation has caused driver to work incorrectly. This change is purely based on code review against the specification (HDA spec rev1.0a). Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20201211131613.3271407-1-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai commit 2fee9583198eb97b5351feda7bd825e0f778385c Author: H. Nikolaus Schaller Date: Wed Dec 9 10:57:44 2020 +0100 spi: dt-bindings: clarify CS behavior for spi-cs-high and gpio descriptors Behavior of CS signal in combination of spi-cs-high and gpio descriptors is not clearly defined and documented. So clarify the documentation Cc: linus.walleij@linaro.org Cc: linux-gpio@vger.kernel.org Signed-off-by: H. Nikolaus Schaller Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/3bed61807fff6268789e7d411412fbc5cd6ffe2a.1607507863.git.hns@goldelico.com Signed-off-by: Mark Brown commit 2819569147cb6e79730f2907d3ab3dfe75fe8478 Author: Zheng Yongjun Date: Fri Dec 11 16:45:10 2020 +0800 regulator: mc13892-regulator: convert comma to semicolon Replace a comma between expression statements by a semicolon. Signed-off-by: Zheng Yongjun Link: https://lore.kernel.org/r/20201211084510.2264-1-zhengyongjun3@huawei.com Signed-off-by: Mark Brown commit 6a6939d5f588b40db32b82ebcec20ee5189c8376 Author: Fabio Estevam Date: Thu Dec 10 18:27:48 2020 -0300 regulator: pfuze100: Convert the driver to DT-only Since 5.10-rc1 i.MX is a devicetree-only platform, so simplify the code by removing the unused non-DT support. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20201210212748.5849-1-festevam@gmail.com Signed-off-by: Mark Brown commit 45c29d9ae9ae41c38f525fab3546f22da80aefb9 Author: Pierre-Louis Bossart Date: Fri Dec 11 12:22:55 2020 +0200 ASoC: SOF: imx: update kernel-doc description Add missing parameters to avoid W=1 error Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Daniel Baluta Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20201211102255.3189589-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 1688dbe7a730e1c1ed05b9dde497288494d75ad4 Author: Dan Carpenter Date: Fri Dec 11 13:10:11 2020 +0300 ASoC: mediatek: mt8183: delete some unreachable code This has a goto followed by an unreachable return statement. The goto is correct because it cleans up so the current runtime behavior is fine. Let's delete the unreachable return statement. Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/X9NFg3KVm16Gx6Io@mwanda Signed-off-by: Mark Brown commit de96bd7b7e9b4cf855fb6d1c7ce32a15dfbdfd92 Author: Tzung-Bi Shih Date: Fri Dec 11 13:13:34 2020 +0800 ASoC: mediatek: mt8183: add PM ops to machine drivers Adds PM ops to machine drivers so that they notify components in the sound card when system suspend. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20201211051334.2313899-1-tzungbi@google.com Signed-off-by: Mark Brown commit 631c78ed72bbf852cc09b24e4e4e412ed88770f2 Author: Amadeusz Sławiński Date: Thu Dec 10 10:25:40 2020 -0500 ASoC: topology: Fix wrong size check Dan reported that smatch reports wrong size check and after analysis it is confirmed that we are comparing wrong value: pointer size instead of array size. However the check itself is problematic as in UAPI header there are two fields: struct snd_soc_tplg_enum_control { (...) char texts[SND_SOC_TPLG_NUM_TEXTS][SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; __le32 values[SND_SOC_TPLG_NUM_TEXTS * SNDRV_CTL_ELEM_ID_NAME_MAXLEN / 4]; the texts field is for names and the values one for values assigned to those named fields, after analysis it becomes clear that there is quite a lot overhead values than we may possibly name. So instead of changing check to ARRAY_SIZE(ec->values), as it was first suggested, use hardcoded value of SND_SOC_TPLG_NUM_TEXTS. Link: https://lore.kernel.org/alsa-devel/X9B0eDcKy+9B6kZl@mwanda/ Reported-by: Dan Carpenter Signed-off-by: Amadeusz Sławiński Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20201210152541.191728-1-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit f5824e5ce1cdba523a357a4d3ffbe0876a27330f Author: Amadeusz Sławiński Date: Thu Dec 10 10:25:41 2020 -0500 ASoC: topology: Add missing size check When we parse "values" we perform check if there is correct number of them. However similar check is missing in case of "texts", add it. Signed-off-by: Amadeusz Sławiński Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20201210152541.191728-2-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 8f7ef6fca0317fb217d1eef8f30010d7a9c6ae0e Author: Ranjani Sridharan Date: Fri Dec 11 12:07:43 2020 +0200 ASoC: SOF: Intel: hda: fix the condition passed to sof_dev_dbg_or_err The condition boot_iteration == HDA_FW_BOOT_ATTEMPTS to determine the log level for the DSP status dump would only work in the case of DSP init failure after maximum number of attempts to initialize the DSP. If DSP init succeeds in less than HDA_FW_BOOT_ATTEMPTS attempts and FW loading fails, the ROM status dump would end up getting logged as debug instead of an error. So, add a new flag, SOF_DBG_DUMP_LOG_ERROR, to explicitly specify the log level for DSP status dump. Signed-off-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20201211100743.3188821-4-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit fbfa22ec4b2b8a1bb1a52c56c376295c7b7e7849 Author: Ranjani Sridharan Date: Fri Dec 11 12:07:42 2020 +0200 ASoC: SOF: modify the SOF_DBG flags The SOF_DBG_* macros are used for dual purposes right now, for the sof_core_debug module parameter and for the dbg_dump() ops. So, separate these two types of flags into different types to avoid confusion. Signed-off-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20201211100743.3188821-3-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit b278fc55b47739da49ea7f95e6ad58d436091ba2 Author: Ranjani Sridharan Date: Fri Dec 11 12:07:41 2020 +0200 ASoC: SOF: Intel: hda: remove duplicated status dump Remove the duplicate status dump in case DSP init fails. The core will be powered down in this case and the status dump will be invalid anyway. Signed-off-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20201211100743.3188821-2-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit f102d0d173982be3fc096d0293c1c0245e988ba6 Author: Tzung-Bi Shih Date: Fri Dec 11 13:12:24 2020 +0800 ASoC: rt1015p: delay 300ms after SDB pulling high for calibration RT1015p needs 300ms delay after SDB pulling high for internal calibration during the power on sequence. Delays 300ms right before data sends out to avoid data truncated. Assuming the calibration state gets lost after system suspend. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20201211051224.2307349-3-tzungbi@google.com Signed-off-by: Mark Brown commit 4ab9301710760b99b4229d608eb5599040b2e07e Author: Tzung-Bi Shih Date: Fri Dec 11 13:12:23 2020 +0800 ASoC: rt1015p: move SDB control from trigger to DAPM Moves SDB control from DAI ops trigger to DAPM. As long as BCLK and LRCLK are ready, SDB can be toggled earlier. Changes from using gpiod_set_value() to gpiod_set_value_cansleep() because it executes in non-atomic context. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20201211051224.2307349-2-tzungbi@google.com Signed-off-by: Mark Brown commit 9326e4f1e5dd1a4410c429638d3c412b6fc17040 Author: Tudor Ambarus Date: Wed Dec 9 19:35:14 2020 +0200 spi: Limit the spi device max speed to controller's max speed Make sure the max_speed_hz of spi_device does not override the max_speed_hz of controller. Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20201209173514.93328-1-tudor.ambarus@microchip.com Signed-off-by: Mark Brown commit 85a7555575a0e48f9b73db310d0d762a08a46d63 Author: Dan Carpenter Date: Wed Dec 9 09:54:09 2020 +0300 ASoC: wm_adsp: remove "ctl" from list on error in wm_adsp_create_control() The error handling frees "ctl" but it's still on the "dsp->ctl_list" list so that could result in a use after free. Remove it from the list before returning. Fixes: 2323736dca72 ("ASoC: wm_adsp: Add basic support for rev 1 firmware file format") Signed-off-by: Dan Carpenter Acked-by: Charles Keepax Link: https://lore.kernel.org/r/X9B0keV/02wrx9Xs@mwanda Signed-off-by: Mark Brown commit d7203eedf4f68e9909fd489453168a9d26bf0c3d Author: Daniel Lezcano Date: Thu Dec 10 13:15:11 2020 +0100 thermal/core: Add critical and hot ops Currently there is no way to the sensors to directly call an ops in interrupt mode without calling thermal_zone_device_update assuming all the trip points are defined. A sensor may want to do something special if a trip point is hot or critical. This patch adds the critical and hot ops to the thermal zone device, so a sensor can directly invoke them or let the thermal framework to call the sensor specific ones. Tested-by: Kai-Heng Feng Signed-off-by: Daniel Lezcano Reviewed-by: Lukasz Luba Link: https://lore.kernel.org/r/20201210121514.25760-2-daniel.lezcano@linaro.org commit 433178e75834dc35f1ae79b56ec2cf396f2c6f3c Author: Daniel Lezcano Date: Thu Dec 10 13:15:10 2020 +0100 thermal/core: Emit a warning if the thermal zone is updated without ops The actual code is silently ignoring a thermal zone update when a driver is requesting it without a get_temp ops set. That looks not correct, as the caller should not have called this function if the thermal zone is unable to read the temperature. That makes the code less robust as the check won't detect the driver is inconsistently using the thermal API and that does not help to improve the framework as these circumvolutions hide the problem at the source. In order to detect the situation when it happens, let's add a warning when the update is requested without the get_temp() ops set. Any warning emitted will have to be fixed at the source of the problem: the caller must not call thermal_zone_device_update if there is not get_temp callback set. Cc: Thara Gopinath Cc: Amit Kucheria Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Daniel Lezcano Reviewed-by: Lukasz Luba Link: https://lore.kernel.org/r/20201210121514.25760-1-daniel.lezcano@linaro.org commit 23e9d781413ab6dd2b743d61439423c575347fc4 Author: Lukasz Luba Date: Thu Dec 10 14:30:14 2020 +0000 drm/panfrost: Register devfreq cooling and attempt to add Energy Model Register devfreq cooling device and attempt to register Energy Model. This will add the devfreq device to the Energy Model framework. It will create a dedicated and unified data structures used i.e. in thermal framework. It uses simplified Energy Model, created based on voltage, frequency and DT 'dynamic-power-coefficient'. Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Lukasz Luba Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201210143014.24685-6-lukasz.luba@arm.com commit 615510fe13bd2434610193f1acab53027d5146d6 Author: Lukasz Luba Date: Thu Dec 10 14:30:13 2020 +0000 thermal: devfreq_cooling: remove old power model and use EM Remove old power model and use new Energy Model to calculate the power budget. It drops static + dynamic power calculations and power table in order to use Energy Model performance domain data. This model should be easy to use and could find more users. It is also less complicated to setup the needed structures. Reviewed-by: Ionela Voinescu Signed-off-by: Lukasz Luba Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201210143014.24685-5-lukasz.luba@arm.com commit 84e0d87c9944eb36ae6037af5cb6905f67c074c5 Author: Lukasz Luba Date: Thu Dec 10 14:30:12 2020 +0000 thermal: devfreq_cooling: add new registration functions with Energy Model The Energy Model (EM) framework supports devices such as Devfreq. Create new registration function which automatically register EM for the thermal devfreq_cooling devices. This patch prepares the code for coming changes which are going to replace old power model with the new EM. Reviewed-by: Ionela Voinescu Signed-off-by: Lukasz Luba Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201210143014.24685-4-lukasz.luba@arm.com commit 229794eee27fddbedd03be5f8b20375a2637ff48 Author: Lukasz Luba Date: Thu Dec 10 14:30:11 2020 +0000 thermal: devfreq_cooling: use a copy of device status Devfreq cooling needs to now the correct status of the device in order to operate. Devfreq framework can change the device status in the background. To mitigate issues make a copy of the status structure and use it for internal calculations. In addition this patch adds normalization function, which also makes sure that whatever data comes from the device, the load will be in range from 1 to 1024. Reviewed-by: Ionela Voinescu Signed-off-by: Lukasz Luba Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201210143014.24685-3-lukasz.luba@arm.com commit b8643a529930802778b04a4fe3f5cd53d9d6057c Author: Lukasz Luba Date: Thu Dec 10 14:30:10 2020 +0000 thermal: devfreq_cooling: change tracing function and arguments Prepare for deleting the static and dynamic power calculation and clean the trace function. These two fields are going to be removed in the next changes. Reviewed-by: Ionela Voinescu Reviewed-by: Steven Rostedt (VMware) # for tracing code Signed-off-by: Lukasz Luba Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201210143014.24685-2-lukasz.luba@arm.com commit c6dde8ffd071aea9d1ce64279178e470977b235c Author: Takashi Iwai Date: Fri Dec 11 14:00:48 2020 +0100 ALSA: usb-audio: Fix control 'access overflow' errors from chmap The current channel-map control implementation in USB-audio driver may lead to an error message like "control 3:0:0:Playback Channel Map:0: access overflow" when CONFIG_SND_CTL_VALIDATION is set. It's because the chmap get callback clears the whole array no matter which count is set, and rather the false-positive detection. This patch fixes the problem by clearing only the needed array range at usb_chmap_ctl_get(). Cc: Link: https://lore.kernel.org/r/20201211130048.6358-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 13b1f8aa6569060480dc747e45741581dbc0cfc2 Author: Kai Vehmanen Date: Fri Dec 11 14:45:47 2020 +0200 ALSA: hda/hdmi: always print pin NIDs as hexadecimal The debug prints from patch_hdmi.c are not aligned with HDA common code in hda_codec.c nor with other HDA codec drivers. To align with rest of the codebase, use hexadecimal formatting whenever printing value of a HDA NID. Also refer to NIDs with capital letters in traces as is done other modules. This presentation is also aligned with the formatting used in HDA codec procfs entry. Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20201211124547.3243871-1-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai commit 5ae9a046a452d60b6a6c076f6df7e3f8e34f918f Author: Suravee Suthikulpanit Date: Thu Dec 10 10:24:36 2020 -0600 iommu/amd: Add sanity check for interrupt remapping table length macros Currently, macros related to the interrupt remapping table length are defined separately. This has resulted in an oversight in which one of the macros were missed when changing the length. To prevent this, redefine the macros to add built-in sanity check. Also, rename macros to use the name of the DTE[IntTabLen] field as specified in the AMD IOMMU specification. There is no functional change. Suggested-by: Linus Torvalds Reviewed-by: Tom Lendacky Signed-off-by: Suravee Suthikulpanit Cc: Will Deacon Cc: Jerry Snitselaar Cc: Joerg Roedel Reviewed-by: Jerry Snitselaar Link: https://lore.kernel.org/r/20201210162436.126321-1-suravee.suthikulpanit@amd.com Signed-off-by: Will Deacon commit c534e093d865d926d042e0a3f228d1152627ccab Author: Carl Huang Date: Thu Dec 3 05:37:27 2020 -0500 mac80211: add ieee80211_set_sar_specs This change registers ieee80211_set_sar_specs to mac80211_config_ops, so cfg80211 can call it. Signed-off-by: Carl Huang Reviewed-by: Brian Norris Reviewed-by: Abhishek Kumar Link: https://lore.kernel.org/r/20201203103728.3034-3-cjhuang@codeaurora.org Signed-off-by: Johannes Berg commit 6bdb68cef7bf57cdb3f8d1498623556d6823ff3a Author: Carl Huang Date: Thu Dec 3 05:37:26 2020 -0500 nl80211: add common API to configure SAR power limitations NL80211_CMD_SET_SAR_SPECS is added to configure SAR from user space. NL80211_ATTR_SAR_SPEC is used to pass the SAR power specification when used with NL80211_CMD_SET_SAR_SPECS. Wireless driver needs to register SAR type, supported frequency ranges to wiphy, so user space can query it. The index in frequency range is used to specify which sub band the power limitation applies to. The SAR type is for compatibility, so later other SAR mechanism can be implemented without breaking the user space SAR applications. Normal process is user space queries the SAR capability, and gets the index of supported frequency ranges and associates the power limitation with this index and sends to kernel. Here is an example of message send to kernel: 8c 00 00 00 08 00 01 00 00 00 00 00 38 00 2b 81 08 00 01 00 00 00 00 00 2c 00 02 80 14 00 00 80 08 00 02 00 00 00 00 00 08 00 01 00 38 00 00 00 14 00 01 80 08 00 02 00 01 00 00 00 08 00 01 00 48 00 00 00 NL80211_CMD_SET_SAR_SPECS: 0x8c NL80211_ATTR_WIPHY: 0x01(phy idx is 0) NL80211_ATTR_SAR_SPEC: 0x812b (NLA_NESTED) NL80211_SAR_ATTR_TYPE: 0x00 (NL80211_SAR_TYPE_POWER) NL80211_SAR_ATTR_SPECS: 0x8002 (NLA_NESTED) freq range 0 power: 0x38 in 0.25dbm unit (14dbm) freq range 1 power: 0x48 in 0.25dbm unit (18dbm) Signed-off-by: Carl Huang Reviewed-by: Brian Norris Reviewed-by: Abhishek Kumar Link: https://lore.kernel.org/r/20201203103728.3034-2-cjhuang@codeaurora.org [minor edits, NLA parse cleanups] Signed-off-by: Johannes Berg commit f879ac8ed6c83ce05fcb53815a8ea83c5b6099a1 Author: Wen Gong Date: Wed Dec 9 11:06:29 2020 +0800 mac80211: fix a mistake check for rx_stats update It should be !is_multicast_ether_addr() in ieee80211_rx_h_sta_process() for the rx_stats update, below commit remove the !, this patch is to change it back. It lead the rx rate "iw wlan0 station dump" become invalid for some scenario when IEEE80211_HW_USES_RSS is set. Fixes: 09a740ce352e ("mac80211: receive and process S1G beacons") Signed-off-by: Wen Gong Link: https://lore.kernel.org/r/1607483189-3891-1-git-send-email-wgong@codeaurora.org Signed-off-by: Johannes Berg commit b0140fda626e39900b8e85efefb427f18727151a Author: Wen Gong Date: Mon Dec 7 11:36:34 2020 +0800 mac80211: mlme: save ssid info to ieee80211_bss_conf while assoc The ssid info of ieee80211_bss_conf is filled in ieee80211_start_ap() for AP mode. For STATION mode, it is empty, save the info from struct ieee80211_mgd_assoc_data, the struct ieee80211_mgd_assoc_data will be freed after assoc, so the ssid info of ieee80211_mgd_assoc_data can not access after assoc, save ssid info to ieee80211_bss_conf, then ssid info can be still access after assoc. Signed-off-by: Wen Gong Link: https://lore.kernel.org/r/1607312195-3583-2-git-send-email-wgong@codeaurora.org [reset on disassoc] Signed-off-by: Johannes Berg commit 44b72ca8163b8cf94384a11fdec716f5478411bf Author: Ilan Peer Date: Sun Dec 6 14:54:50 2020 +0200 mac80211: Update rate control on channel change A channel change or a channel bandwidth change can impact the rate control logic. However, the rate control logic was not updated before/after such a change, which might result in unexpected behavior. Fix this by updating the stations rate control logic when the corresponding channel context changes. Signed-off-by: Ilan Peer Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201206145305.600d967fe3c9.I48305f25cfcc9c032c77c51396e9e9b882748a86@changeid Signed-off-by: Johannes Berg commit 189a164d0fc6c59a22c4486d641d0a0a0d33387a Author: Emmanuel Grumbach Date: Sun Dec 6 14:54:49 2020 +0200 mac80211: don't filter out beacons once we start CSA I hit a bug in which we started a CSA with an action frame, but the AP changed its mind and didn't change the beacon. The CSA wasn't cancelled and we lost the connection. The beacons were ignored because they never changed: they never contained any CSA IE. Because they never changed, the CRC of the beacon didn't change either which made us ignore the beacons instead of processing them. Now what happens is: 1) beacon has CRC X and it is valid. No CSA IE in the beacon 2) as long as beacon's CRC X, don't process their IEs 3) rx action frame with CSA 4) invalidate the beacon's CRC 5) rx beacon, CRC is still X, but now it is invalid 6) process the beacon, detect there is no CSA IE 7) abort CSA Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201206145305.83470b8407e6.I739b907598001362744692744be15335436b8351@changeid Signed-off-by: Johannes Berg commit bbf31e88df2f5da20ce613c340ce508d732046b3 Author: Ilan Peer Date: Sun Dec 6 14:54:48 2020 +0200 mac80211: Fix calculation of minimal channel width When calculating the minimal channel width for channel context, the current operation Rx channel width of a station was used and not the overall channel width capability of the station, i.e., both for Tx and Rx. Fix ieee80211_get_sta_bw() to use the maximal channel width the station is capable. While at it make the function static. Signed-off-by: Ilan Peer Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201206145305.4387040b99a0.I74bcf19238f75a5960c4098b10e355123d933281@changeid Signed-off-by: Johannes Berg commit 2dedfe1dbdf27ac344584ed03c3876c85d2779fb Author: Johannes Berg Date: Sun Dec 6 14:54:47 2020 +0200 mac80211: ignore country element TX power on 6 GHz Updates to the 802.11ax draft are coming that deprecate the country element in favour of the transmit power envelope element, and make the maximum transmit power level field in the triplets reserved, so if we parse them we'd use 0 dBm transmit power. Follow suit and completely ignore the element on 6 GHz for purposes of determining TX power. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201206145305.9abf9f6b4f88.Icb6e52af586edcc74f1f0360e8f6fc9ef2bfe8f5@changeid Signed-off-by: Johannes Berg commit db8ebd06ccb87b7bea8e50f3d4ba5dc0142093b8 Author: Johannes Berg Date: Sun Dec 6 14:54:46 2020 +0200 mac80211: use bitfield helpers for BA session action frames Use the appropriate bitfield helpers for encoding and decoding the capability field in the BA session action frames instead of open-coding the shifts/masks. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201206145305.0c46e5097cc0.I06e75706770c40b9ba1cabd1f8a78ab7a05c5b73@changeid Signed-off-by: Johannes Berg commit da3882331a55ba8c8eda0cfc077ad3b88c257e22 Author: Avraham Stern Date: Sun Dec 6 14:54:45 2020 +0200 mac80211: support Rx timestamp calculation for all preamble types Add support for calculating the Rx timestamp for HE frames. Since now all frame types are supported, allow setting the Rx timestamp regardless of the frame type. Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201206145305.4786559af475.Ia54486bb0a12e5351f9d5c60ef6fcda7c9e7141c@changeid Signed-off-by: Johannes Berg commit f65607cdbc6b0da356ef5a22552ddd9313cf87a0 Author: Johannes Berg Date: Sun Dec 6 14:54:44 2020 +0200 mac80211: don't set set TDLS STA bandwidth wider than possible When we set up a TDLS station, we set sta->sta.bandwidth solely based on the capabilities, because the "what's the current bandwidth" check is bypassed and only applied for other types of stations. This leads to the unfortunate scenario that the sta->sta.bandwidth is 160 MHz if both stations support it, but we never actually configure this bandwidth unless the AP is already using 160 MHz; even for wider bandwidth support we only go up to 80 MHz (at least right now.) For iwlwifi, this can also lead to firmware asserts, telling us that we've configured the TX rates for a higher bandwidth than is actually available due to the PHY configuration. For non-TDLS, we check against the interface's requested bandwidth, but we explicitly skip this check for TDLS to cope with the wider BW case. Change this to (a) still limit to the TDLS peer's own chandef, which gets factored into the overall PHY configuration we request from the driver, and (b) limit it to when the TDLS peer is authorized, because it's only factored into the channel context in this case. Fixes: 504871e602d9 ("mac80211: fix bandwidth computation for TDLS peers") Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201206145305.fcc7d29c4590.I11f77e9e25ddf871a3c8d5604650c763e2c5887a@changeid Signed-off-by: Johannes Berg commit 3f8a39ff28078e4b56d94e8676f49d9975f82e51 Author: Johannes Berg Date: Sun Dec 6 14:54:43 2020 +0200 mac80211: support driver-based disconnect with reconnect hint Support the driver indicating that a disconnection needs to be performed, and pass through the reconnect hint in this case. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201206145305.5c8dab7a22a0.I58459fdf6968b16c90cab9c574f0f04ca22b0c79@changeid Signed-off-by: Johannes Berg commit 3bb02143ff55fec55558da4ad48425bf368eb8ed Author: Johannes Berg Date: Sun Dec 6 14:54:42 2020 +0200 cfg80211: support immediate reconnect request hint There are cases where it's necessary to disconnect, but an immediate reconnection is desired. Support a hint to userspace that this is the case, by including a new attribute in the deauth or disassoc event. Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201206145305.58d33941fb9d.I0e7168c205c7949529c8e3b86f3c9b12c01a7017@changeid Signed-off-by: Johannes Berg commit a5a55032ea654e5fdd9255035bb5066c87d7b95e Author: Johannes Berg Date: Sun Dec 6 14:54:41 2020 +0200 mac80211: use struct assignment for he_obss_pd Use a struct assignment here, which is clearer than the memcpy() and type-safe as well. Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201206145305.2ab3aad7d5fc.Iaca4ee6db651b7de17e4351f4be7973ff8600186@changeid Signed-off-by: Johannes Berg commit 539a36ba2f07110e6d05eb795c2b6fd6a7b4b881 Author: Johannes Berg Date: Sun Dec 6 14:54:40 2020 +0200 cfg80211: remove struct ieee80211_he_bss_color We don't really use this struct, we're now using struct cfg80211_he_bss_color instead. Change the one place in mac80211 that's using the old name to use struct assignment instead of memcpy() and thus remove the wrong sizeof while at it. Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201206145305.f6698d97ae4e.Iba2dffcb79c4ab80bde7407609806010b55edfdf@changeid Signed-off-by: Johannes Berg commit 2d9463083ce92636a1bdd3e30d1236e3e95d859e Author: Anant Thazhemadam Date: Sat Dec 5 03:28:25 2020 +0530 nl80211: validate key indexes for cfg80211_registered_device syzbot discovered a bug in which an OOB access was being made because an unsuitable key_idx value was wrongly considered to be acceptable while deleting a key in nl80211_del_key(). Since we don't know the cipher at the time of deletion, if cfg80211_validate_key_settings() were to be called directly in nl80211_del_key(), even valid keys would be wrongly determined invalid, and deletion wouldn't occur correctly. For this reason, a new function - cfg80211_valid_key_idx(), has been created, to determine if the key_idx value provided is valid or not. cfg80211_valid_key_idx() is directly called in 2 places - nl80211_del_key(), and cfg80211_validate_key_settings(). Reported-by: syzbot+49d4cab497c2142ee170@syzkaller.appspotmail.com Tested-by: syzbot+49d4cab497c2142ee170@syzkaller.appspotmail.com Suggested-by: Johannes Berg Signed-off-by: Anant Thazhemadam Link: https://lore.kernel.org/r/20201204215825.129879-1-anant.thazhemadam@gmail.com Cc: stable@vger.kernel.org [also disallow IGTK key IDs if no IGTK cipher is supported] Signed-off-by: Johannes Berg commit 669b84134a2be14d333d4f82b65943d467404f87 Author: Johannes Berg Date: Sun Nov 29 17:30:55 2020 +0200 cfg80211: include block-tx flag in channel switch started event In the NL80211_CMD_CH_SWITCH_STARTED_NOTIFY event, include the NL80211_ATTR_CH_SWITCH_BLOCK_TX flag attribute if block-tx was requested by the AP. Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201129172929.8953ef22cc64.Ifee9cab337a4369938545920ba5590559e91327a@changeid Signed-off-by: Johannes Berg commit 3660944a37ce73890292571f44f04891834f9044 Author: Johannes Berg Date: Sun Nov 29 17:30:54 2020 +0200 mac80211: disallow band-switch during CSA If the AP advertises a band switch during CSA, we will not have the right information to continue working with it, since it will likely (have to) change its capabilities and we don't track any capability changes at all. Additionally, we store e.g. supported rates per band, and that information would become invalid. Since this is a fringe scenario, just disconnect explicitly. Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201129172929.0e2327107c06.I461adb07704e056b054a4a7c29b80c95a9f56637@changeid Signed-off-by: Johannes Berg commit 9850742470804b2cc6a6543bd8f5822eeb5fdbc0 Author: Avraham Stern Date: Sun Nov 29 17:30:52 2020 +0200 ieee80211: update reduced neighbor report TBTT info length A new field (20MHz PSD - 1 byte) was added to the RNR TBTT info field. Adjust the expected TBTT info length accordingly. Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201129172929.b503adccce6a.Ie684e1d3039c111bf2d521bf762aaec3f7a24d2e@changeid Signed-off-by: Johannes Berg commit beee246951571cc5452176f3dbfe9aa5a10ba2b9 Author: Ilan Peer Date: Sun Nov 29 17:30:51 2020 +0200 cfg80211: Save the regulatory domain when setting custom regulatory When custom regulatory was set, only the channels setting was updated, but the regulatory domain was not saved. Fix it by saving it. Signed-off-by: Ilan Peer Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201129172929.290fa5c5568a.Ic5732aa64de6ee97ae3578bd5779fc723ba489d1@changeid Signed-off-by: Johannes Berg commit c837cbad40d949feaff86734d637c7602ae0b56b Author: Avraham Stern Date: Sun Nov 29 17:30:50 2020 +0200 nl80211: always accept scan request with the duration set Accept a scan request with the duration set even if the driver does not support setting the scan dwell. The duration can be used as a hint to the driver, but the driver may use its internal logic for setting the scan dwell. Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201129172929.9491a12f9226.Ia9c5b24fcefc5ce5592537507243391633a27e5f@changeid Signed-off-by: Johannes Berg commit b45a19dd7e46462d0f34fcc05e5b1871d4c415ec Author: Ilan Peer Date: Sun Nov 29 17:30:49 2020 +0200 cfg80211: Update TSF and TSF BSSID for multi BSS When a new BSS entry is created based on multi BSS IE, the TSF and the TSF BSSID were not updated. Fix it. Signed-off-by: Ilan Peer Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201129172929.8377d5063827.I6f2011b6017c2ad507c61a3f1ca03b7177a46e32@changeid Signed-off-by: Johannes Berg commit d590a125eeb4e161a27527342ae57e3d7d778455 Author: Ayala Beker Date: Sun Nov 29 17:30:48 2020 +0200 cfg80211: scan PSC channels in case of scan with wildcard SSID In case of scan request with wildcard SSID, or in case of more than one SSID in scan request, need to scan PSC channels even though all the co-located APs found during the legacy bands scan indicated that all the APs in their ESS are co-located, as we might find different networks on the PSC channels. Signed-off-by: Ayala Beker Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201129172929.736415a9ca5d.If5b3578ae85e11a707a5da07e66ba85928ba702c@changeid Signed-off-by: Johannes Berg commit 3598ae87fe44896cc2aae76bfb3febf1256943c7 Author: Ilan Peer Date: Sun Nov 29 17:30:47 2020 +0200 mac80211: Skip entries with SAE H2E only membership selector When parsing supported rates IE. Signed-off-by: Ilan Peer Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201129172929.8228e2be791e.I626c93241fef66bc71aa0cb9719aba1b11232cf1@changeid Signed-off-by: Johannes Berg commit d6587602c59974a2eda35e8ed70a4f5970380be8 Author: Ilan Peer Date: Sun Nov 29 17:30:46 2020 +0200 cfg80211: Parse SAE H2E only membership selector This extends the support for drivers that rebuild IEs in the FW (same as with HT/VHT/HE). Signed-off-by: Ilan Peer Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201129172929.4012647275f3.I1a93ae71c57ef0b6f58f99d47fce919d19d65ff0@changeid Signed-off-by: Johannes Berg commit 4271d4bde0a23edc53097339fc185d0c09c75819 Author: Johannes Berg Date: Sun Nov 29 17:30:45 2020 +0200 mac80211: support MIC error/replay detected counters driver update Support the driver incrementing MIC error and replay detected counters when having detected a bad frame, if it drops it directly instead of relying on mac80211 to do the checks. These are then exposed to userspace, though currently only in some cases and in debugfs. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201129172929.fb59be9c6de8.Ife2260887366f585afadd78c983ebea93d2bb54b@changeid Signed-off-by: Johannes Berg commit 081e1e7ece05c5eb8bbaf28dc20970cf49edf5d5 Author: Shaul Triebitz Date: Sun Nov 29 17:30:43 2020 +0200 mac80211: he: remove non-bss-conf fields from bss_conf ack_enabled and multi_sta_back_32bit are station capabilities and should not be in the bss_conf structure. Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201129172929.69a7f7753444.I405c4b5245145e24577512c477f19131d4036489@changeid Signed-off-by: Johannes Berg commit 84674ef4d69b7c0570bbb63ed5c80cd8297ec87f Author: Tom Rix Date: Fri Nov 27 11:38:42 2020 -0800 mac80211: remove trailing semicolon in macro definitions The macro uses should have (and already have) the semicolon. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20201127193842.2876355-1-trix@redhat.com Signed-off-by: Johannes Berg commit d7832c7187c17fa4193503d9d2ee3ad5b59e5e14 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:38:37 2020 -0600 nl80211: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/fe5afd456a1244751177e53359d3dd149a63a873.1605896060.git.gustavoars@kernel.org Signed-off-by: Johannes Berg commit aaaee2d68a9578394894fec0d61bfac2d49fc9e7 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:36:45 2020 -0600 mac80211: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/1a9c4e8248e76e1361edbe2471a68773d87f0b67.1605896060.git.gustavoars@kernel.org Signed-off-by: Johannes Berg commit 01c9c0ab3524f2cd6fbceec6488aa4094d8ef9d9 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:34:50 2020 -0600 cfg80211: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/ed94a115106fa9c6df94d09b2a6c5791c618c4f2.1605896059.git.gustavoars@kernel.org Signed-off-by: Johannes Berg commit 32fc4a9ad56f8260025ac766548d625509cc879f Author: Sami Tolvanen Date: Tue Nov 17 12:59:02 2020 -0800 cfg80211: fix callback type mismatches in wext-compat Instead of casting callback functions to type iw_handler, which trips indirect call checking with Clang's Control-Flow Integrity (CFI), add stub functions with the correct function type for the callbacks. Reported-by: Sedat Dilek Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20201117205902.405316-1-samitolvanen@google.com Signed-off-by: Johannes Berg commit c7ed0e683ddbfb9349b6c25dbca3e1c8d76f5b87 Author: Colin Ian King Date: Mon Nov 16 18:16:36 2020 +0000 net: wireless: make a const array static, makes object smaller Don't populate the const array bws on the stack but instead it static. Makes the object code smaller by 80 bytes: Before: text data bss dec hex filename 85694 16865 1216 103775 1955f ./net/wireless/reg.o After: text data bss dec hex filename 85518 16961 1216 103695 1950f ./net/wireless/reg.o (gcc version 10.2.0) Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20201116181636.362729-1-colin.king@canonical.com Signed-off-by: Johannes Berg commit 36ec144f041bedc2f14b32faa2da11d4d9660003 Author: Lev Stipakov Date: Fri Nov 13 23:46:24 2020 +0200 net: mac80211: use core API for updating TX/RX stats Commits d3fd65484c781 ("net: core: add dev_sw_netstats_tx_add") 451b05f413d3f ("net: netdevice.h: sw_netstats_rx_add helper) have added API to update net device per-cpu TX/RX stats. Use core API instead of ieee80211_tx/rx_stats(). Signed-off-by: Lev Stipakov Reviewed-by: Heiner Kallweit Link: https://lore.kernel.org/r/20201113214623.144663-1-lev@openvpn.net Signed-off-by: Johannes Berg commit 14486c82612a177cb910980c70ba900827ca0894 Author: Emmanuel Grumbach Date: Wed Nov 4 15:46:41 2020 +0200 rfkill: add a reason to the HW rfkill state The WLAN device may exist yet not be usable. This can happen when the WLAN device is controllable by both the host and some platform internal component. We need some arbritration that is vendor specific, but when the device is not available for the host, we need to reflect this state towards the user space. Add a reason field to the rfkill object (and event) so that userspace can know why the device is in rfkill: because some other platform component currently owns the device, or because the actual hw rfkill signal is asserted. Capable userspace can now determine the reason for the rfkill and possibly do some negotiation on a side band channel using a proprietary protocol to gain ownership on the device in case the device is owned by some other component. When the host gains ownership on the device, the kernel can remove the RFKILL_HARD_BLOCK_NOT_OWNER reason and the hw rfkill state will be off. Then, the userspace can bring the device up and start normal operation. The rfkill_event structure is enlarged to include the additional byte, it is now 9 bytes long. Old user space will ask to read only 8 bytes so that the kernel can know not to feed them with more data. When the user space writes 8 bytes, new kernels will just read what is present in the file descriptor. This new byte is read only from the userspace standpoint anyway. If a new user space uses an old kernel, it'll ask to read 9 bytes but will get only 8, and it'll know that it didn't get the new state. When it'll write 9 bytes, the kernel will again ignore this new byte which is read only from the userspace standpoint. Signed-off-by: Emmanuel Grumbach Link: https://lore.kernel.org/r/20201104134641.28816-1-emmanuel.grumbach@intel.com Signed-off-by: Johannes Berg commit b5206275b46c30a8236feb34a1dc247fa3683d83 Author: Zheng Yongjun Date: Fri Dec 11 16:55:53 2020 +0800 usb: typec: tcpm: convert comma to semicolon Replace a comma between expression statements by a semicolon. Reviewed-by: Heikki Krogerus Signed-off-by: Zheng Yongjun Link: https://lore.kernel.org/r/20201211085553.2982-1-zhengyongjun3@huawei.com Signed-off-by: Greg Kroah-Hartman commit 93cebeb1c21a65b92636aaa278a32fbc0415ec67 Author: Marco Chiappero Date: Tue Dec 1 14:24:51 2020 +0000 crypto: qat - add capability detection logic in qat_4xxx Add logic to detect device capabilities in qat_4xxx driver. Read fuses and build the device capabilities mask. This will enable services and handling specific to QAT 4xxx devices. Co-developed-by: Tomaszx Kowalik Signed-off-by: Tomaszx Kowalik Signed-off-by: Marco Chiappero Reviewed-by: Giovanni Cabiddu Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 5106dfeaeabea73d5132daab1d89d57b57fa98b7 Author: Marco Chiappero Date: Tue Dec 1 14:24:50 2020 +0000 crypto: qat - add AES-XTS support for QAT GEN4 devices Add handling of AES-XTS specific to QAT GEN4 devices. Co-developed-by: Tomaszx Kowalik Signed-off-by: Tomaszx Kowalik Signed-off-by: Marco Chiappero Reviewed-by: Giovanni Cabiddu Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 67916c9516893528ecce060ada1f58af0ce33d93 Author: Marco Chiappero Date: Tue Dec 1 14:24:49 2020 +0000 crypto: qat - add AES-CTR support for QAT GEN4 devices Add support for AES-CTR for QAT GEN4 devices. Also, introduce the capability ICP_ACCEL_CAPABILITIES_AES_V2 and the helper macro HW_CAP_AES_V2, which allow to distinguish between different HW generations. Co-developed-by: Tomasz Kowalik Signed-off-by: Tomasz Kowalik Co-developed-by: Mateusz Polrola Signed-off-by: Mateusz Polrola Signed-off-by: Marco Chiappero Reviewed-by: Giovanni Cabiddu Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit fecc4559780d52d174ea05e3bf543669165389c3 Author: Amir Goldstein Date: Wed Dec 2 14:07:09 2020 +0200 fsnotify: fix events reported to watching parent and child fsnotify_parent() used to send two separate events to backends when a parent inode is watching children and the child inode is also watching. In an attempt to avoid duplicate events in fanotify, we unified the two backend callbacks to a single callback and handled the reporting of the two separate events for the relevant backends (inotify and dnotify). However the handling is buggy and can result in inotify and dnotify listeners receiving events of the type they never asked for or spurious events. The problem is the unified event callback with two inode marks (parent and child) is called when any of the parent and child inodes are watched and interested in the event, but the parent inode's mark that is interested in the event on the child is not necessarily the one we are currently reporting to (it could belong to a different group). So before reporting the parent or child event flavor to backend we need to check that the mark is really interested in that event flavor. The semantics of INODE and CHILD marks were hard to follow and made the logic more complicated than it should have been. Replace it with INODE and PARENT marks semantics to hopefully make the logic more clear. Thanks to Hugh Dickins for spotting a bug in the earlier version of this patch. Fixes: 497b0c5a7c06 ("fsnotify: send event to parent and child with single callback") CC: stable@vger.kernel.org Link: https://lore.kernel.org/r/20201202120713.702387-4-amir73il@gmail.com Reported-by: Hugh Dickins Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 3db4c21c0f71f7a51ce5c50f0d4d3742c9ec4a65 Author: Badhri Jagan Sridharan Date: Thu Dec 10 23:19:11 2020 -0800 usb: typec: tcpm: Update vbus_vsafe0v on init During init, vbus_vsafe0v does not get updated till the first connect as a sink. This causes TCPM to be stuck in SRC_ATTACH_WAIT state while booting with a sink (For instance: a headset) connected. [ 1.429168] Start toggling [ 1.439907] CC1: 0 -> 0, CC2: 0 -> 0 [state TOGGLING, polarity 0, disconnected] [ 1.445242] CC1: 0 -> 0, CC2: 0 -> 0 [state TOGGLING, polarity 0, disconnected] [ 53.358528] CC1: 0 -> 0, CC2: 0 -> 2 [state TOGGLING, polarity 0, connected] [ 53.358564] state change TOGGLING -> SRC_ATTACH_WAIT [rev1 NONE_AMS] Fix this by updating vbus_vsafe0v based on vbus_present status on boot. Reviewed-by: Heikki Krogerus Signed-off-by: Badhri Jagan Sridharan Link: https://lore.kernel.org/r/20201211071911.2205197-1-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit 3b6c3d04808965167ff19d028789bc92a4b12c8c Author: Badhri Jagan Sridharan Date: Thu Dec 10 23:11:45 2020 -0800 usb: typec: tcpci: Enable bleed discharge when auto discharge is enabled Auto discharge circuits kick in only when vbus decays and reaches VBUS_SINK_DISCONNECT_THRESHOLD threshold. Enable bleed discharge to discharge vbus to VBUS_SINK_DISCONNECT_THRESHOLD upon disconnect. Reviewed-by: Heikki Krogerus Signed-off-by: Badhri Jagan Sridharan Link: https://lore.kernel.org/r/20201211071145.2199997-1-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit d33a23b0532d5d1b5b700e8641661261e7dbef61 Author: Arnd Bergmann Date: Fri Dec 4 00:20:04 2020 +0100 crypto: atmel-i2c - select CONFIG_BITREVERSE The bitreverse helper is almost always built into the kernel, but in a rare randconfig build it is possible to hit a case in which it is a loadable module while the atmel-i2c driver is built-in: arm-linux-gnueabi-ld: drivers/crypto/atmel-i2c.o: in function `atmel_i2c_checksum': atmel-i2c.c:(.text+0xa0): undefined reference to `byte_rev_table' Add one more 'select' statement to prevent this. Fixes: 11105693fa05 ("crypto: atmel-ecc - introduce Microchip / Atmel ECC driver") Signed-off-by: Arnd Bergmann Signed-off-by: Herbert Xu commit a320dc2ff80b8f93b2b8acf2e3ead8ff5ad0bcff Author: Yejune Deng Date: Tue Dec 1 14:50:18 2020 +0800 crypto: hisilicon/trng - replace atomic_add_return() a set of atomic_inc_return() looks more neater Signed-off-by: Yejune Deng Signed-off-by: Herbert Xu commit 88574332451380f4b51f6ca88ab9810e714bfb9b Author: Mike Healy Date: Thu Nov 26 11:51:48 2020 +0000 crypto: keembay - Add support for Keem Bay OCS AES/SM4 Add support for the AES/SM4 crypto engine included in the Offload and Crypto Subsystem (OCS) of the Intel Keem Bay SoC, thus enabling hardware-acceleration for the following transformations: - ecb(aes), cbc(aes), ctr(aes), cts(cbc(aes)), gcm(aes) and cbc(aes); supported for 128-bit and 256-bit keys. - ecb(sm4), cbc(sm4), ctr(sm4), cts(cbc(sm4)), gcm(sm4) and cbc(sm4); supported for 128-bit keys. The driver passes crypto manager self-tests, including the extra tests (CRYPTO_MANAGER_EXTRA_TESTS=y). Signed-off-by: Mike Healy Co-developed-by: Daniele Alessandrelli Signed-off-by: Daniele Alessandrelli Acked-by: Mark Gross Signed-off-by: Herbert Xu commit c7e34aa31d6297a3a49a0c0142df858838d4b54f Author: Daniele Alessandrelli Date: Thu Nov 26 11:51:47 2020 +0000 dt-bindings: Add Keem Bay OCS AES bindings Add device-tree bindings for Intel Keem Bay Offload and Crypto Subsystem (OCS) AES crypto driver. Signed-off-by: Daniele Alessandrelli Acked-by: Mark Gross Reviewed-by: Rob Herring Signed-off-by: Herbert Xu commit ecf4d4310a16c32fee081924a1aebe9f4c7c0403 Author: Prashant Malani Date: Thu Dec 10 13:16:54 2020 -0800 usb: typec: Add class for plug alt mode device Add the Type C class for plug alternate mode devices which are being registered by the Type C connector class. This ensures that udev events get generated when the plug alt modes are registered. Cc: Heikki Krogerus Reviewed-by: Benson Leung Reviewed-by: Heikki Krogerus Signed-off-by: Prashant Malani Link: https://lore.kernel.org/r/20201210211653.879044-1-pmalani@chromium.org Signed-off-by: Greg Kroah-Hartman commit ca955d3308ba111881d18bca7045aee964eac6ce Author: Badhri Jagan Sridharan Date: Thu Dec 10 17:05:21 2020 +0100 USB: typec: tcpci: Add Bleed discharge to POWER_CONTROL definition "Table 4-19. POWER_CONTROL Register Definition" from tcpci spec defines BIT(3) as the control bit for bleed discharge. Cc: Guenter Roeck Cc: Heikki Krogerus Cc: Kyle Tso Reviewed-by: Guenter Roeck Acked-by: Heikki Krogerus Signed-off-by: Badhri Jagan Sridharan Signed-off-by: Will McVicker Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20201210160521.3417426-6-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit fe79d5de77204dd946cfad76a9bec23354b1a500 Author: Kyle Tso Date: Thu Dec 10 17:05:20 2020 +0100 USB: typec: tcpm: Add a 30ms room for tPSSourceOn in PR_SWAP TCPM state machine needs 20-25ms to enter the ErrorRecovery state after tPSSourceOn timer timeouts. Change the timer from max 480ms to 450ms to ensure that the timer complies with the Spec. In order to keep the flexibility for other usecases using tPSSourceOn, add another timer only for PR_SWAP. Cc: Guenter Roeck Cc: Heikki Krogerus Cc: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck Acked-by: Heikki Krogerus Signed-off-by: Kyle Tso Signed-off-by: Will McVicker Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20201210160521.3417426-5-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 301a633c1b5b2caa4c4b97a83270d4a1d60c53bf Author: Kyle Tso Date: Thu Dec 10 17:05:19 2020 +0100 USB: typec: tcpm: Fix PR_SWAP error handling PD rev3.0 8.3.3.16.3.6 PE_PRS_SRC_SNK_Wait_Source_on State The Policy Enging Shall transition to the ErrorRecovery state when the PSSourceOnTimer times out ... Cc: Guenter Roeck Cc: Heikki Krogerus Cc: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck Acked-by: Heikki Krogerus Signed-off-by: Kyle Tso Signed-off-by: Will McVicker Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20201210160521.3417426-4-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 60e998d1c6d98cd28b14a677b61278c33cc5c7df Author: pumahsu Date: Thu Dec 10 17:05:18 2020 +0100 USB: typec: tcpm: Hard Reset after not receiving a Request PD 3.0 spec 8.3.3.2.3, A Get_Source_Cap message is sent to a UUT that is in the PE_SRC_Ready state. After sending a Source_Capabilities message, the UUT should then expect a Request message in response. When one is not received, the UUT should timeout to PE_SRC_Hard_Reset. Cc: Guenter Roeck Cc: Heikki Krogerus Cc: Badhri Jagan Sridharan Acked-by: Heikki Krogerus Signed-off-by: pumahsu Signed-off-by: Kyle Tso Signed-off-by: Will McVicker Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20201210160521.3417426-3-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 76e87d96b30b5fee91b381fbc444a3eabcd9469a Author: Thomas Gleixner Date: Sun Dec 6 22:46:21 2020 +0100 ntp: Consolidate the RTC update implementation The code for the legacy RTC and the RTC class based update are pretty much the same. Consolidate the common parts into one function and just invoke the actual setter functions. For RTC class based devices the update code checks whether the offset is valid for the device, which is usually not the case for the first invocation. If it's not the same it stores the correct offset and lets the caller try again. That's not much different from the previous approach where the first invocation had a pretty low probability to actually hit the allowed window. Signed-off-by: Thomas Gleixner Reviewed-by: Jason Gunthorpe Acked-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201206220542.355743355@linutronix.de commit 69eca258c85000564577642ba28335eb4e1df8f0 Author: Thomas Gleixner Date: Sun Dec 6 22:46:20 2020 +0100 ntp: Make the RTC sync offset less obscure The current RTC set_offset_nsec value is not really intuitive to understand. tsched twrite(t2.tv_sec - 1) t2 (seconds increment) The offset is calculated from twrite based on the assumption that t2 - twrite == 1s. That means for the MC146818 RTC the offset needs to be negative so that the write happens 500ms before t2. It's easier to understand when the whole calculation is based on t2. That avoids negative offsets and the meaning is obvious: t2 - twrite: The time defined by the chip when seconds increment after the write. twrite - tsched: The time for the transport to the point where the chip is updated. ==> set_offset_nsec = t2 - tsched ttransport = twrite - tsched tRTCinc = t2 - twrite ==> set_offset_nsec = ttransport + tRTCinc tRTCinc is a chip property and can be obtained from the data sheet. ttransport depends on how the RTC is connected. It is close to 0 for directly accessible RTCs. For RTCs behind a slow bus, e.g. i2c, it's the time required to send the update over the bus. This can be estimated or even calibrated, but that's a different problem. Adjust the implementation and update comments accordingly. Signed-off-by: Thomas Gleixner Acked-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201206220542.263204937@linutronix.de commit 33e62e832384c8cb523044e0e9d99d7133f98e93 Author: Thomas Gleixner Date: Sun Dec 6 22:46:19 2020 +0100 ntp, rtc: Move rtc_set_ntp_time() to ntp code rtc_set_ntp_time() is not really RTC functionality as the code is just a user of RTC. Move it into the NTP code which allows further cleanups. Requested-by: Alexandre Belloni Signed-off-by: Thomas Gleixner Reviewed-by: Jason Gunthorpe Acked-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201206220542.166871172@linutronix.de commit c9e6189fb03123a7dfb93589280347b46f30b161 Author: Thomas Gleixner Date: Sun Dec 6 22:46:18 2020 +0100 ntp: Make the RTC synchronization more reliable Miroslav reported that the periodic RTC synchronization in the NTP code fails more often than not to hit the specified update window. The reason is that the code uses delayed_work to schedule the update which needs to be in thread context as the underlying RTC might be connected via a slow bus, e.g. I2C. In the update function it verifies whether the current time is correct vs. the requirements of the underlying RTC. But delayed_work is using the timer wheel for scheduling which is inaccurate by design. Depending on the distance to the expiry the wheel gets less granular to allow batching and to avoid the cascading of the original timer wheel. See 500462a9de65 ("timers: Switch to a non-cascading wheel") and the code for further details. The code already deals with this by splitting the 660 seconds period into a long 659 seconds timer and then retrying with a smaller delta. But looking at the actual granularities of the timer wheel (which depend on the HZ configuration) the 659 seconds timer ends up in an outer wheel level and is affected by a worst case granularity of: HZ Granularity 1000 32s 250 16s 100 40s So the initial timer can be already off by max 12.5% which is not a big issue as the period of the sync is defined as ~11 minutes. The fine grained second attempt schedules to the desired update point with a timer expiring less than a second from now. Depending on the actual delta and the HZ setting even the second attempt can end up in outer wheel levels which have a large enough granularity to make the correctness check fail. As this is a fundamental property of the timer wheel there is no way to make this more accurate short of iterating in one jiffies steps towards the update point. Switch it to an hrtimer instead which schedules the actual update work. The hrtimer will expire precisely (max 1 jiffie delay when high resolution timers are not available). The actual scheduling delay of the work is the same as before. The update is triggered from do_adjtimex() which is a bit racy but not much more racy than it was before: if (ntp_synced()) queue_delayed_work(system_power_efficient_wq, &sync_work, 0); which is racy when the work is currently executed and has not managed to reschedule itself. This becomes now: if (ntp_synced() && !hrtimer_is_queued(&sync_hrtimer)) queue_work(system_power_efficient_wq, &sync_work, 0); which is racy when the hrtimer has expired and the work is currently executed and has not yet managed to rearm the hrtimer. Not a big problem as it just schedules work for nothing. The new implementation has a safe guard in place to catch the case where the hrtimer is queued on entry to the work function and avoids an extra update attempt of the RTC that way. Reported-by: Miroslav Lichvar Signed-off-by: Thomas Gleixner Tested-by: Miroslav Lichvar Reviewed-by: Jason Gunthorpe Acked-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201206220542.062910520@linutronix.de commit 354c796b9270eb4780e59e3bdb83a3ae4930a832 Author: Thomas Gleixner Date: Sun Dec 6 22:46:17 2020 +0100 rtc: core: Make the sync offset default more realistic The offset which is used to steer the start of an RTC synchronization update via rtc_set_ntp_time() is huge. The math behind this is: tsched twrite(t2.tv_sec - 1) t2 (seconds increment) twrite - tsched is the transport time for the write to hit the device. t2 - twrite depends on the chip and is for most chips one second. The rtc_set_ntp_time() calculation of tsched is: tsched = t2 - 1sec - (t2 - twrite) The default for the sync offset is 500ms which means that twrite - tsched is 500ms assumed that t2 - twrite is one second. This is 0.5 seconds off for RTCs which are directly accessible by IO writes and probably for the majority of i2C/SPI based RTC off by an order of magnitude. Set it to 5ms which should bring it closer to reality. The default can be adjusted by drivers (rtc_cmos does so) and could be adjusted further by a calibration method which is an orthogonal problem. Signed-off-by: Thomas Gleixner Reviewed-by: Jason Gunthorpe Acked-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201206220541.960333166@linutronix.de commit b0ecd8e8c5ef376777277c4c2db7de92ac59f23f Author: Thomas Gleixner Date: Sun Dec 6 22:46:16 2020 +0100 rtc: cmos: Make rtc_cmos sync offset correct The offset for rtc_cmos must be -500ms to work correctly with the current implementation of rtc_set_ntp_time() due to the following: tsched twrite(t2.tv_sec - 1) t2 (seconds increment) twrite - tsched is the transport time for the write to hit the device, which is negligible for this chip because it's accessed directly. t2 - twrite = 500ms according to the datasheet. But rtc_set_ntp_time() calculation of tsched is: tsched = t2 - 1sec - (t2 - twrite) The default for the sync offset is 500ms which means that the write happens at t2 - 1.5 seconds which is obviously off by a second for this device. Make the offset -500ms so it works correct. Signed-off-by: Thomas Gleixner Reviewed-by: Jason Gunthorpe Acked-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201206220541.830517160@linutronix.de commit dcf257e92622ba0e25fdc4b6699683e7ae67e2a1 Author: Thomas Gleixner Date: Sun Dec 6 22:46:15 2020 +0100 rtc: mc146818: Reduce spinlock section in mc146818_set_time() No need to hold the lock and disable interrupts for doing math. Signed-off-by: Thomas Gleixner Acked-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201206220541.709243630@linutronix.de commit 05a0302c35481e9b47fb90ba40922b0a4cae40d8 Author: Thomas Gleixner Date: Sun Dec 6 22:46:14 2020 +0100 rtc: mc146818: Prevent reading garbage The MC146818 driver is prone to read garbage from the RTC. There are several issues all related to the update cycle of the MC146818. The chip increments seconds obviously once per second and indicates that by a bit in a register. The bit goes high 244us before the actual update starts. During the update the readout of the time values is undefined. The code just checks whether the update in progress bit (UIP) is set before reading the clock. If it's set it waits arbitrary 20ms before retrying, which is ample because the maximum update time is ~2ms. But this check does not guarantee that the UIP bit goes high and the actual update happens during the readout. So the following can happen 0.997 UIP = False -> Interrupt/NMI/preemption 0.998 UIP -> True 0.999 Readout <- Undefined To prevent this rework the code so it checks UIP before and after the readout and if set after the readout try again. But that's not enough to cover the following: 0.997 UIP = False Readout seconds -> NMI (or vCPU scheduled out) 0.998 UIP -> True update completes UIP -> False 1.000 Readout minutes,.... UIP check succeeds That can make the readout wrong up to 59 seconds. To prevent this, read the seconds value before the first UIP check, validate it after checking UIP and after reading out the rest. It's amazing that the original i386 code had this actually correct and the generic implementation of the MC146818 driver got it wrong in 2002 and it stayed that way until today. Signed-off-by: Thomas Gleixner Acked-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201206220541.594826678@linutronix.de commit 5b78f2dc315354c05300795064f587366a02c6ff Author: Barry Song Date: Thu Dec 3 11:06:41 2020 +1300 sched/fair: Trivial correction of the newidle_balance() comment idle_balance() has been renamed to newidle_balance(). To differentiate with nohz_idle_balance, it seems refining the comment will be helpful for the readers of the code. Signed-off-by: Barry Song Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lkml.kernel.org/r/20201202220641.22752-1-song.bao.hua@hisilicon.com commit 13d5a5e9f9b8515da3c04305ae1bb03ab91be7a7 Author: Mel Gorman Date: Mon Nov 30 14:40:20 2020 +0000 sched/fair: Clear SMT siblings after determining the core is not idle The clearing of SMT siblings from the SIS mask before checking for an idle core is a small but unnecessary cost. Defer the clearing of the siblings until the scan moves to the next potential target. The cost of this was not measured as it is borderline noise but it should be self-evident. Signed-off-by: Mel Gorman Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Vincent Guittot Link: https://lkml.kernel.org/r/20201130144020.GS3371@techsingularity.net commit 59a74b1544e1c07ffbfd1edff5fd73ce7d3d3146 Author: Mauro Carvalho Chehab Date: Tue Dec 1 13:09:06 2020 +0100 sched: Fix kernel-doc markup Kernel-doc requires that a kernel-doc markup to be immediately below the function prototype, as otherwise it will rename it. So, move sys_sched_yield() markup to the right place. Also fix the cpu_util() markup: Kernel-doc markups should use this format: identifier - description Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Vincent Guittot Link: https://lkml.kernel.org/r/50cd6f460aeb872ebe518a8e9cfffda2df8bdb0a.1606823973.git.mchehab+huawei@kernel.org commit 3149cd55302748df771dc1c8c10f34b1cbce88ed Author: Giovanni Gherdovich Date: Thu Nov 12 19:26:14 2020 +0100 x86: Print ratio freq_max/freq_base used in frequency invariance calculations The value freq_max/freq_base is a fundamental component of frequency invariance calculations. It may come from a variety of sources such as MSRs or ACPI data, tracking it down when troubleshooting a system could be non-trivial. It is worth saving it in the kernel logs. # dmesg | grep 'Estimated ratio of average max' [ 14.024036] smpboot: Estimated ratio of average max frequency by base frequency (times 1024): 1289 Signed-off-by: Giovanni Gherdovich Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lkml.kernel.org/r/20201112182614.10700-4-ggherdovich@suse.cz commit 976df7e5730e3ec8a7e192c09c10ce6e8db07e65 Author: Giovanni Gherdovich Date: Thu Nov 12 19:26:13 2020 +0100 x86, sched: Use midpoint of max_boost and max_P for frequency invariance on AMD EPYC Frequency invariant accounting calculations need the ratio freq_curr/freq_max, but freq_max is unknown as it depends on dynamic power allocation between cores: AMD EPYC CPUs implement "Core Performance Boost". Three candidates are considered to estimate this value: - maximum non-boost frequency - maximum boost frequency - the mid point between the above two Experimental data on an AMD EPYC Zen2 machine slightly favors the third option, which is applied with this patch. The analysis uses the ondemand cpufreq governor as baseline, and compares it with schedutil in a number of configurations. Using the freq_max value described above offers a moderate advantage in performance and efficiency: sugov-max (freq_max=max_boost) performs the worst on tbench: less throughput and reduced efficiency than the other invariant-schedutil options (see "Data Overview" below). Consider that tbench is generally a problematic case as no schedutil version currently is better than ondemand. sugov-P0 (freq_max=max_P) is the worst on dbench, while the other sugov's can surpass ondemand with less filesystem latency and slightly increased efficiency. 1. DATA OVERVIEW 2. DETAILED PERFORMANCE TABLES 3. POWER CONSUMPTION TABLE 1. DATA OVERVIEW ================ sugov-noinv : non-invariant schedutil governor sugov-max : invariant schedutil, freq_max=max_boost sugov-mid : invariant schedutil, freq_max=midpoint sugov-P0 : invariant schedutil, freq_max=max_P perfgov : performance governor driver : acpi_cpufreq machine : AMD EPYC 7742 (Zen2, aka "Rome"), dual socket, 128 cores / 256 threads, SATA SSD storage, 250G of memory, XFS filesystem Benchmarks are described in the next section. Tilde (~) means the value is the same as baseline. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ondemand perfgov sugov-noinv sugov-max sugov-mid sugov-P0 better if - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - PERFORMANCE RATIOS tbench 1.00 1.44 0.90 0.87 0.93 0.93 higher dbench 1.00 0.91 0.95 0.94 0.94 1.06 lower kernbench 1.00 0.93 ~ ~ ~ 0.97 lower gitsource 1.00 0.66 0.97 0.96 ~ 0.95 lower - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - PERFORMANCE-PER-WATT RATIOS tbench 1.00 1.16 0.84 0.84 0.88 0.85 higher dbench 1.00 1.03 1.02 1.02 1.02 0.93 higher kernbench 1.00 1.05 ~ ~ ~ ~ higher gitsource 1.00 1.46 1.04 1.04 ~ 1.05 higher 2. DETAILED PERFORMANCE TABLES ============================== Benchmark : tbench4 (i.e. dbench4 over the network, actually loopback) Varying parameter : number of clients Unit : MB/sec (higher is better) 5.9.0-ondemand (BASELINE) 5.9.0-perfgov 5.9.0-sugov-noinv - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Hmean 1 427.19 +- 0.16% ( ) 778.35 +- 0.10% ( 82.20%) 346.92 +- 0.14% ( -18.79%) Hmean 2 853.82 +- 0.09% ( ) 1536.23 +- 0.03% ( 79.93%) 694.36 +- 0.05% ( -18.68%) Hmean 4 1657.54 +- 0.12% ( ) 2938.18 +- 0.12% ( 77.26%) 1362.81 +- 0.11% ( -17.78%) Hmean 8 3301.87 +- 0.06% ( ) 5679.10 +- 0.04% ( 72.00%) 2693.35 +- 0.04% ( -18.43%) Hmean 16 6139.65 +- 0.05% ( ) 9498.81 +- 0.04% ( 54.71%) 4889.97 +- 0.17% ( -20.35%) Hmean 32 11170.28 +- 0.09% ( ) 17393.25 +- 0.08% ( 55.71%) 9104.55 +- 0.09% ( -18.49%) Hmean 64 19322.97 +- 0.17% ( ) 31573.91 +- 0.08% ( 63.40%) 18552.52 +- 0.40% ( -3.99%) Hmean 128 30383.71 +- 0.11% ( ) 37416.91 +- 0.15% ( 23.15%) 25938.70 +- 0.41% ( -14.63%) Hmean 256 31143.96 +- 0.41% ( ) 30908.76 +- 0.88% ( -0.76%) 29754.32 +- 0.24% ( -4.46%) Hmean 512 30858.49 +- 0.26% ( ) 38524.60 +- 1.19% ( 24.84%) 42080.39 +- 0.56% ( 36.37%) Hmean 1024 39187.37 +- 0.19% ( ) 36213.86 +- 0.26% ( -7.59%) 39555.98 +- 0.12% ( 0.94%) 5.9.0-sugov-max 5.9.0-sugov-mid 5.9.0-sugov-P0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Hmean 1 352.59 +- 1.03% ( -17.46%) 352.08 +- 0.75% ( -17.58%) 352.31 +- 1.48% ( -17.53%) Hmean 2 697.32 +- 0.08% ( -18.33%) 700.16 +- 0.20% ( -18.00%) 696.79 +- 0.06% ( -18.39%) Hmean 4 1369.88 +- 0.04% ( -17.35%) 1369.72 +- 0.07% ( -17.36%) 1365.91 +- 0.05% ( -17.59%) Hmean 8 2696.79 +- 0.04% ( -18.33%) 2711.06 +- 0.04% ( -17.89%) 2715.10 +- 0.61% ( -17.77%) Hmean 16 4725.03 +- 0.03% ( -23.04%) 4875.65 +- 0.02% ( -20.59%) 4953.05 +- 0.28% ( -19.33%) Hmean 32 9231.65 +- 0.10% ( -17.36%) 8704.89 +- 0.27% ( -22.07%) 10562.02 +- 0.36% ( -5.45%) Hmean 64 15364.27 +- 0.19% ( -20.49%) 17786.64 +- 0.15% ( -7.95%) 19665.40 +- 0.22% ( 1.77%) Hmean 128 42100.58 +- 0.13% ( 38.56%) 34946.28 +- 0.13% ( 15.02%) 38635.79 +- 0.06% ( 27.16%) Hmean 256 30660.23 +- 1.08% ( -1.55%) 32307.67 +- 0.54% ( 3.74%) 31153.27 +- 0.12% ( 0.03%) Hmean 512 24604.32 +- 0.14% ( -20.27%) 40408.50 +- 1.10% ( 30.95%) 38800.29 +- 1.23% ( 25.74%) Hmean 1024 35535.47 +- 0.28% ( -9.32%) 41070.38 +- 2.56% ( 4.81%) 31308.29 +- 2.52% ( -20.11%) Benchmark : dbench (filesystem stressor) Varying parameter : number of clients Unit : seconds (lower is better) NOTE-1: This dbench version measures the average latency of a set of filesystem operations, as we found the traditional dbench metric (throughput) to be misleading. NOTE-2: Due to high variability, we partition the original dataset and apply statistical bootrapping (a resampling method). Accuracy is reported in the form of 95% confidence intervals. 5.9.0-ondemand (BASELINE) 5.9.0-perfgov 5.9.0-sugov-noinv - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SubAmean 1 98.79 +- 0.92 ( ) 83.36 +- 0.82 ( 15.62%) 84.82 +- 0.92 ( 14.14%) SubAmean 2 116.00 +- 0.89 ( ) 102.12 +- 0.77 ( 11.96%) 109.63 +- 0.89 ( 5.49%) SubAmean 4 149.90 +- 1.03 ( ) 132.12 +- 0.91 ( 11.86%) 143.90 +- 1.15 ( 4.00%) SubAmean 8 182.41 +- 1.13 ( ) 159.86 +- 0.93 ( 12.36%) 165.82 +- 1.03 ( 9.10%) SubAmean 16 237.83 +- 1.23 ( ) 219.46 +- 1.14 ( 7.72%) 229.28 +- 1.19 ( 3.59%) SubAmean 32 334.34 +- 1.49 ( ) 309.94 +- 1.42 ( 7.30%) 321.19 +- 1.36 ( 3.93%) SubAmean 64 576.61 +- 2.16 ( ) 540.75 +- 2.00 ( 6.22%) 551.27 +- 1.99 ( 4.39%) SubAmean 128 1350.07 +- 4.14 ( ) 1205.47 +- 3.20 ( 10.71%) 1280.26 +- 3.75 ( 5.17%) SubAmean 256 3444.42 +- 7.97 ( ) 3698.00 +- 27.43 ( -7.36%) 3494.14 +- 7.81 ( -1.44%) SubAmean 2048 39457.89 +- 29.01 ( ) 34105.33 +- 41.85 ( 13.57%) 39688.52 +- 36.26 ( -0.58%) 5.9.0-sugov-max 5.9.0-sugov-mid 5.9.0-sugov-P0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SubAmean 1 85.68 +- 1.04 ( 13.27%) 84.16 +- 0.84 ( 14.81%) 83.99 +- 0.90 ( 14.99%) SubAmean 2 108.42 +- 0.95 ( 6.54%) 109.91 +- 1.39 ( 5.24%) 112.06 +- 0.91 ( 3.39%) SubAmean 4 136.90 +- 1.04 ( 8.67%) 137.59 +- 0.93 ( 8.21%) 136.55 +- 0.95 ( 8.91%) SubAmean 8 163.15 +- 0.96 ( 10.56%) 166.07 +- 1.02 ( 8.96%) 165.81 +- 0.99 ( 9.10%) SubAmean 16 224.86 +- 1.12 ( 5.45%) 223.83 +- 1.06 ( 5.89%) 230.66 +- 1.19 ( 3.01%) SubAmean 32 320.51 +- 1.38 ( 4.13%) 322.85 +- 1.49 ( 3.44%) 321.96 +- 1.46 ( 3.70%) SubAmean 64 553.25 +- 1.93 ( 4.05%) 554.19 +- 2.08 ( 3.89%) 562.26 +- 2.22 ( 2.49%) SubAmean 128 1264.35 +- 3.72 ( 6.35%) 1256.99 +- 3.46 ( 6.89%) 2018.97 +- 18.79 ( -49.55%) SubAmean 256 3466.25 +- 8.25 ( -0.63%) 3450.58 +- 8.44 ( -0.18%) 5032.12 +- 38.74 ( -46.09%) SubAmean 2048 39133.10 +- 45.71 ( 0.82%) 39905.95 +- 34.33 ( -1.14%) 53811.86 +-193.04 ( -36.38%) Benchmark : kernbench (kernel compilation) Varying parameter : number of jobs Unit : seconds (lower is better) 5.9.0-ondemand (BASELINE) 5.9.0-perfgov 5.9.0-sugov-noinv - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Amean 2 471.71 +- 26.61% ( ) 409.88 +- 16.99% ( 13.11%) 430.63 +- 0.18% ( 8.71%) Amean 4 211.87 +- 0.58% ( ) 194.03 +- 0.74% ( 8.42%) 215.33 +- 0.64% ( -1.63%) Amean 8 109.79 +- 1.27% ( ) 101.43 +- 1.53% ( 7.61%) 111.05 +- 1.95% ( -1.15%) Amean 16 59.50 +- 1.28% ( ) 55.61 +- 1.35% ( 6.55%) 59.65 +- 1.78% ( -0.24%) Amean 32 34.94 +- 1.22% ( ) 32.36 +- 1.95% ( 7.41%) 35.44 +- 0.63% ( -1.43%) Amean 64 22.58 +- 0.38% ( ) 20.97 +- 1.28% ( 7.11%) 22.41 +- 1.73% ( 0.74%) Amean 128 17.72 +- 0.44% ( ) 16.68 +- 0.32% ( 5.88%) 17.65 +- 0.96% ( 0.37%) Amean 256 16.44 +- 0.53% ( ) 15.76 +- 0.32% ( 4.18%) 16.76 +- 0.60% ( -1.93%) Amean 512 16.54 +- 0.21% ( ) 15.62 +- 0.41% ( 5.53%) 16.84 +- 0.85% ( -1.83%) 5.9.0-sugov-max 5.9.0-sugov-mid 5.9.0-sugov-P0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Amean 2 421.30 +- 0.24% ( 10.69%) 419.26 +- 0.15% ( 11.12%) 414.38 +- 0.33% ( 12.15%) Amean 4 217.81 +- 5.53% ( -2.80%) 211.63 +- 0.99% ( 0.12%) 208.43 +- 0.47% ( 1.63%) Amean 8 108.80 +- 0.43% ( 0.90%) 108.48 +- 1.44% ( 1.19%) 108.59 +- 3.08% ( 1.09%) Amean 16 58.84 +- 0.74% ( 1.12%) 58.37 +- 0.94% ( 1.91%) 57.78 +- 0.78% ( 2.90%) Amean 32 34.04 +- 2.00% ( 2.59%) 34.28 +- 1.18% ( 1.91%) 33.98 +- 2.21% ( 2.75%) Amean 64 22.22 +- 1.69% ( 1.60%) 22.27 +- 1.60% ( 1.38%) 22.25 +- 1.41% ( 1.47%) Amean 128 17.55 +- 0.24% ( 0.97%) 17.53 +- 0.94% ( 1.04%) 17.49 +- 0.43% ( 1.30%) Amean 256 16.51 +- 0.46% ( -0.40%) 16.48 +- 0.48% ( -0.19%) 16.44 +- 1.21% ( 0.00%) Amean 512 16.50 +- 0.35% ( 0.19%) 16.35 +- 0.42% ( 1.14%) 16.37 +- 0.33% ( 0.99%) Benchmark : gitsource (time to run the git unit test suite) Varying parameter : none Unit : seconds (lower is better) 5.9.0-ondemand (BASELINE) 5.9.0-perfgov 5.9.0-sugov-noinv - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Amean 1035.76 +- 0.30% ( ) 688.21 +- 0.04% ( 33.56%) 1003.85 +- 0.14% ( 3.08%) 5.9.0-sugov-max 5.9.0-sugov-mid 5.9.0-sugov-P0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Amean 995.82 +- 0.08% ( 3.86%) 1011.98 +- 0.03% ( 2.30%) 986.87 +- 0.19% ( 4.72%) 3. POWER CONSUMPTION TABLE ========================== Average power consumption (watts). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ondemand perfgov sugov-noinv sugov-max sugov-mid sugov-P0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - tbench4 227.25 281.83 244.17 236.76 241.50 247.99 dbench4 151.97 161.87 157.08 158.10 158.06 153.73 kernbench 162.78 167.22 162.90 164.19 164.65 164.72 gitsource 133.65 139.00 133.04 134.43 134.18 134.32 Signed-off-by: Giovanni Gherdovich Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lkml.kernel.org/r/20201112182614.10700-3-ggherdovich@suse.cz commit 41ea667227bad5c247d76e6605054e96e4d95f51 Author: Nathan Fontenot Date: Thu Nov 12 19:26:12 2020 +0100 x86, sched: Calculate frequency invariance for AMD systems This is the first pass in creating the ability to calculate the frequency invariance on AMD systems. This approach uses the CPPC highest performance and nominal performance values that range from 0 - 255 instead of a high and base frquency. This is because we do not have the ability on AMD to get a highest frequency value. On AMD systems the highest performance and nominal performance vaues do correspond to the highest and base frequencies for the system so using them should produce an appropriate ratio but some tweaking is likely necessary. Due to CPPC being initialized later in boot than when the frequency invariant calculation is currently made, I had to create a callback from the CPPC init code to do the calculation after we have CPPC data. Special thanks to "kernel test robot " for reporting that compilation of drivers/acpi/cppc_acpi.c is conditional to CONFIG_ACPI_CPPC_LIB, not just CONFIG_ACPI. [ ggherdovich@suse.cz: made safe under CPU hotplug, edited changelog. ] Signed-off-by: Nathan Fontenot Signed-off-by: Giovanni Gherdovich Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lkml.kernel.org/r/20201112182614.10700-2-ggherdovich@suse.cz commit 72b248cfbf3fd308807afe7cc30d05fefeff7fb1 Author: Zhen Lei Date: Mon Dec 7 11:26:26 2020 +0800 dt-bindings: mmc: eliminate yamllint warnings Eliminate the following yamllint warnings: ./Documentation/devicetree/bindings/mmc/mtk-sd.yaml :20:9: [warning] wrong indentation: expected 10 but found 8 (indentation) :30:9: [warning] wrong indentation: expected 10 but found 8 (indentation) :33:9: [warning] wrong indentation: expected 10 but found 8 (indentation) Signed-off-by: Zhen Lei Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201207032626.1445-2-thunder.leizhen@huawei.com Signed-off-by: Ulf Hansson commit 471cf4548e191b69a9737021c8e7d216957e384f Author: Marcin Wojtas Date: Fri Dec 4 18:16:26 2020 +0100 mmc: sdhci-xenon: introduce ACPI support Previous patches dropped the strict dependency on the OF_* in the sdhci-xenon driver. As a result the ACPI support can be introduced (except for the XENON_A3700 variant) by adding the necessary ID's in the acpi_match_table. Signed-off-by: Marcin Wojtas Link: https://lore.kernel.org/r/20201204171626.10935-5-mw@semihalf.com Signed-off-by: Ulf Hansson commit 1542488031deed57e1f0853a07bd4934ce27e599 Author: Marcin Wojtas Date: Fri Dec 4 18:16:25 2020 +0100 mmc: sdhci-xenon: use clk only with DT As a preparation for supporting ACPI, modify the driver to use the clk framework only when booting with DT - otherwise rely on the configuration done by firmware. For that purpose introduce also a custom SDHCI get_max_clock callback. Signed-off-by: Marcin Wojtas Link: https://lore.kernel.org/r/20201204171626.10935-4-mw@semihalf.com Signed-off-by: Ulf Hansson commit f29bf660bf4137ab1c2c3915d89e16818d20d792 Author: Marcin Wojtas Date: Fri Dec 4 18:16:24 2020 +0100 mmc: sdhci-xenon: switch to device_* API In order to support both ACPI and DT, modify the driver to use device_* routines for obtaining the properties values. Signed-off-by: Marcin Wojtas Link: https://lore.kernel.org/r/20201204171626.10935-3-mw@semihalf.com Signed-off-by: Ulf Hansson commit f75fda3730728ea42bd1c210eaed96fb543ff00b Author: Marcin Wojtas Date: Fri Dec 4 18:16:23 2020 +0100 mmc: sdhci-xenon: use match data for controllers variants As a part of the ACPI support preparation resign from checking compatible strings in the driver. Instead of that use a new enum and assign the values to match data accordingly. Signed-off-by: Marcin Wojtas Link: https://lore.kernel.org/r/20201204171626.10935-2-mw@semihalf.com Signed-off-by: Ulf Hansson commit 607184cb1635eaee239fe3fb9648a8b82a5232d7 Author: Kailang Yang Date: Fri Dec 11 14:17:09 2020 +0800 ALSA: hda/realtek - Add supported for more Lenovo ALC285 Headset Button Add supported for more Lenovo ALC285 Headset Button. Signed-off-by: Kailang Yang Cc: Link: https://lore.kernel.org/r/bb1f1da1526d460885aa4257be81eb94@realtek.com Signed-off-by: Takashi Iwai commit 19b5926b68252b36bde1cc7b26fb858bd1b9bebb Author: Connor McAdams Date: Thu Dec 10 11:06:57 2020 -0500 ALSA: hda/ca0132 - Remove now unnecessary DSP setup functions. Now that the DSP's audio configuration is understood, remove previous hacky methods of trying to properly configure it. Signed-off-by: Connor McAdams Link: https://lore.kernel.org/r/20201210160658.461739-6-conmanx360@gmail.com Signed-off-by: Takashi Iwai commit 8cb12b94c2e32137ab04b0c4d35582f4ae244622 Author: Connor McAdams Date: Thu Dec 10 11:06:56 2020 -0500 ALSA: hda/ca0132 - Ensure DSP is properly setup post-firmware download. Make sure that the DSP has no DMA channels allocated once the firmware is downloaded, and that the default audio streams in use by the DSP are setup in the correct order. Signed-off-by: Connor McAdams Link: https://lore.kernel.org/r/20201210160658.461739-5-conmanx360@gmail.com Signed-off-by: Takashi Iwai commit 799c70639c002436cbf5962dff095692f1c50a70 Author: Connor McAdams Date: Thu Dec 10 11:06:55 2020 -0500 ALSA: hda/ca0132 - Add 8051 exram helper functions. Add functions for both reading and writing to the 8051's exram. Also, add a little bit of documentation on how the addresses are segmented. Signed-off-by: Connor McAdams Link: https://lore.kernel.org/r/20201210160658.461739-4-conmanx360@gmail.com Signed-off-by: Takashi Iwai commit aedeb64211f0d9ae2f71a0a132e402c26b358cdc Author: Connor McAdams Date: Thu Dec 10 11:06:54 2020 -0500 ALSA: hda/ca0132 - Add stream port remapping function. Add function for remapping a ChipIO stream's ports. Also include some documentation as to how this works. Signed-off-by: Connor McAdams Link: https://lore.kernel.org/r/20201210160658.461739-3-conmanx360@gmail.com Signed-off-by: Takashi Iwai commit 4a6d3b4e7ae77352fa4bd602ff0c44d8450705aa Author: Connor McAdams Date: Thu Dec 10 11:06:53 2020 -0500 ALSA: hda/ca0132 - Reset codec upon initialization. Reset the codec upon initialization to clear out anything that may have been setup on a previous boot into Windows, or in case of an improper shutdown. Signed-off-by: Connor McAdams Link: https://lore.kernel.org/r/20201210160658.461739-2-conmanx360@gmail.com Signed-off-by: Takashi Iwai commit 93f998879cd95b3e4f2836e7b17d6d5ae035cf90 Merge: 428bb001143cf e1efdb604f5c9 Author: Greg Kroah-Hartman Date: Fri Dec 11 09:47:53 2020 +0100 Merge tag 'extcon-next-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next Chanwoo writes: Update for extcon-next v5.11 1. Add new TI TUSB320 USB-C extcon driver - The extcon-usbc-tusb320.c driver for the TI TUSB320 USB Type-C device support the USB Type C connector detection. 2. Rewrite binding document in yaml for extcon-fsa9480.c and add new compatible name of TI TSU6111 device. 3. Fix moalias string of extcon-max77693.c to fix the automated module loading when this driver is compiled as a module. * tag 'extcon-next-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon: extcon: max77693: Fix modalias string extcon: fsa9480: Support TI TSU6111 variant extcon: fsa9480: Rewrite bindings in YAML and extend dt-bindings: extcon: add binding for TUSB320 extcon: Add driver for TI TUSB320 commit cd3f609823a5896a6f4c229b3c2077475531e23d Author: Roy Im Date: Sat Nov 28 19:36:26 2020 -0800 Input: new da7280 haptic driver Adds support for the Dialog DA7280 LRA/ERM Haptic Driver with multiple mode and integrated waveform memory and wideband support. It communicates via an I2C bus to the device. Signed-off-by: Roy Im Reviewed-by: Jes Sorensen . Link: https://lore.kernel.org/r/1e293e8c4830b09255af3b7e1721b73afaefdfa3.1606320459.git.Roy.Im@diasemi.com Signed-off-by: Dmitry Torokhov commit 4f3c429ec789f8d0f1b55aea8910cfbb13e097ea Author: Roy Im Date: Sat Nov 28 19:34:58 2020 -0800 dt-bindings: input: Add document bindings for DA7280 Add device tree binding information for DA7280 haptic driver. Example bindings for DA7280 are added. Signed-off-by: Roy Im Reviewed-by: Rob Herring . Link: https://lore.kernel.org/r/2bc9a4a9d083ea8f360ec75f6281b6de6c4ef284.1606320459.git.Roy.Im@diasemi.com Signed-off-by: Dmitry Torokhov commit db41869108d4d735abe67648ff72e0d388a80a34 Author: Roy Im Date: Sat Nov 28 19:34:14 2020 -0800 MAINTAINERS: da7280 updates to the Dialog Semiconductor search terms This patch adds the da7280 bindings doc and driver to the Dialog Semiconductor support list. Signed-off-by: Roy Im Link: https://lore.kernel.org/r/e2a01173699486519f8da85b9283c6af8481fbdb.1606320459.git.Roy.Im@diasemi.com Signed-off-by: Dmitry Torokhov commit e1efdb604f5c9903a5d92ef42244009d3c04880f Author: Marek Szyprowski Date: Tue Dec 8 14:36:27 2020 +0100 extcon: max77693: Fix modalias string The platform device driver name is "max77693-muic", so advertise it properly in the modalias string. This fixes automated module loading when this driver is compiled as a module. Fixes: db1b9037424b ("extcon: MAX77693: Add extcon-max77693 driver to support Maxim MAX77693 MUIC device") Signed-off-by: Marek Szyprowski Signed-off-by: Chanwoo Choi commit e4c9062717feda88900b566463228d1c4910af6d Author: jingle.wu Date: Thu Dec 10 23:49:16 2020 -0800 Input: elantech - fix protocol errors for some trackpoints in SMBus mode There are some version of Elan trackpads that send incorrect data when in SMbus mode, unless they are switched to use 0x5f reports instead of standard 0x5e. This patch implements querying device to retrieve chips identifying data, and switching it, when needed to the alternative report. Signed-off-by: Jingle Wu Link: https://lore.kernel.org/r/20201211071531.32413-1-jingle.wu@emc.com.tw Signed-off-by: Dmitry Torokhov commit 056115daede8d01f71732bc7d778fb85acee8eb6 Author: Jingle Wu Date: Thu Dec 10 23:40:09 2020 -0800 Input: elan_i2c - add new trackpoint report type 0x5F The 0x5F is a new trackpoint report type used by some modules. Signed-off-by: Jingle Wu Link: https://lore.kernel.org/r/20201211071511.32349-1-jingle.wu@emc.com.tw Signed-off-by: Dmitry Torokhov commit f58f26ab22f78736a402940a7baf5599a111c72c Author: Linus Walleij Date: Sun Nov 1 01:43:57 2020 +0100 extcon: fsa9480: Support TI TSU6111 variant The Texas Instruments TSU6111 is compatible to the FSA880/FSA9480. Signed-off-by: Linus Walleij Signed-off-by: Chanwoo Choi commit 0e77f8e1d0c22f768fb41f88ad14347b032c043f Author: Linus Walleij Date: Sun Nov 1 01:43:56 2020 +0100 extcon: fsa9480: Rewrite bindings in YAML and extend This rewrites the FSA9480 DT bindings using YAML and extends them with the compatible TI TSU6111. I chose to name the file fcs,fsa880 since this is the first switch, later versions are improvements. Signed-off-by: Linus Walleij Reviewed-by: Rob Herring Signed-off-by: Chanwoo Choi commit f6f79dd22f589d485ad2a79e743e00b9ff278d8b Author: Michael Auchter Date: Thu Oct 15 09:07:35 2020 -0500 dt-bindings: extcon: add binding for TUSB320 Add a device tree binding for the TI TUSB320. Signed-off-by: Michael Auchter Reviewed-by: Rob Herring Signed-off-by: Chanwoo Choi commit 06bc4ca115cddabba0faa801488bd946a48c0bf7 Author: Michael Auchter Date: Thu Oct 15 09:07:34 2020 -0500 extcon: Add driver for TI TUSB320 This patch adds an extcon driver for the TI TUSB320 USB Type-C device. This can be used to detect whether the port is configured as a downstream or upstream facing port. Signed-off-by: Michael Auchter Signed-off-by: Chanwoo Choi commit c18b443ca5f786e10cd84efbf4b8d1f38101b971 Author: Michał Mirosław Date: Thu Dec 10 23:11:17 2020 -0800 Input: elants - document some registers and values Add information found in downstream kernels, to make the code less magic. Signed-off-by: Michał Mirosław Reviewed-by: Dmitry Osipenko Tested-by: Dmitry Osipenko Link: https://lore.kernel.org/r/728fff020bc92be10d84cc2a7ea8af6fd99af96c.1607669375.git.mirq-linux@rere.qmqm.pl Signed-off-by: Dmitry Torokhov commit 3d722dd4509df5df6c2e27a6485a7336ba31cc7a Author: Zheng Yongjun Date: Thu Dec 10 22:25:52 2020 -0800 Input: atmel_mxt_ts - simplify the return expression of mxt_send_bootloader_cmd() Simplify the return expression. Signed-off-by: Zheng Yongjun Link: https://lore.kernel.org/r/20201210135943.1612-1-zhengyongjun3@huawei.com Signed-off-by: Dmitry Torokhov commit c8834032ffe249a2a1b9702359ff29a28b8fcf1e Author: Anson Huang Date: Thu Dec 10 22:01:38 2020 -0800 Input: imx_keypad - add COMPILE_TEST support Add COMPILE_TEST support to imx_keypad driver for better compile testing coverage. Signed-off-by: Anson Huang Link: https://lore.kernel.org/r/1583137573-16628-1-git-send-email-Anson.Huang@nxp.com Signed-off-by: Dmitry Torokhov commit 6a8f9ed23a8e06a3ca823aeb6058202f99e557f2 Author: Sergiu Cuciurean Date: Thu Dec 10 21:57:36 2020 -0800 Input: applespi - use new 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 bebcfd272df6 ("spi: introduce `delay` field for `spi_transfer` + spi_transfer_delay_exec()") Signed-off-by: Sergiu Cuciurean Tested-by: Ronald Tschalär Reviewed-by: Ronald Tschalär Link: https://lore.kernel.org/r/20200227124534.23399-1-sergiu.cuciurean@analog.com Signed-off-by: Dmitry Torokhov commit 9db5fbe1a4968fcd0fae4d10565abccb9579a553 Author: Sergiu Cuciurean Date: Thu Dec 10 21:56:36 2020 -0800 Input: synaptics-rmi4 - use new 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 bebcfd272df6 ("spi: introduce `delay` field for `spi_transfer` + spi_transfer_delay_exec()") Signed-off-by: Sergiu Cuciurean Link: https://lore.kernel.org/r/20200227130336.27042-1-sergiu.cuciurean@analog.com Signed-off-by: Dmitry Torokhov commit 6782b5da2de361ccf9a35ebf295f9efe9b9afe22 Author: Sergiu Cuciurean Date: Thu Dec 10 21:55:31 2020 -0800 Input: ad7877 - use new 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 bebcfd272df6 ("spi: introduce `delay` field for `spi_transfer` + spi_transfer_delay_exec()") Signed-off-by: Sergiu Cuciurean Link: https://lore.kernel.org/r/20200228104508.15564-1-sergiu.cuciurean@analog.com Signed-off-by: Dmitry Torokhov commit b4fe9fec51ef48011f11c2da4099f0b530449c92 Author: KP Singh Date: Fri Dec 11 01:07:11 2020 +0000 selftests/bpf: Silence ima_setup.sh when not running in verbose mode. Currently, ima_setup.sh spews outputs from commands like mkfs and dd on the terminal without taking into account the verbosity level of the test framework. Update test_progs to set the environment variable SELFTESTS_VERBOSE=1 when a verbose output is requested. This environment variable is then used by ima_setup.sh (and can be used by other similar scripts) to obey the verbosity level of the test harness without needing to re-implement command line options for verbosity. In "silent" mode, the script saves the output to a temporary file, the contents of which are echoed back to stderr when the script encounters an error. Fixes: 34b82d3ac105 ("bpf: Add a selftest for bpf_ima_inode_hash") Reported-by: Andrii Nakryiko Suggested-by: Andrii Nakryiko Signed-off-by: KP Singh Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201211010711.3716917-1-kpsingh@kernel.org commit 03161a952c7c564aa186f94cf2cdbf834c8e624c Author: Dmitry Torokhov Date: Thu Dec 10 21:44:00 2020 -0800 Input: edt-ft5x06 - consolidate handling of number of electrodes Instead of special-casing retrieval of number of X/Y electrodes based on the firmware, let's select default values and mark registers as non-existent on firmwares that do not support this operation. Also mark "report rate" register as non-existent for generic firmwares as having it set to 0 does not make sense. Reviewed-by: Andy Shevchenko Acked-by: Marco Felsch Reviewed-by: Simon Budig Link: https://lore.kernel.org/r/X9FZFs3NZADoIhhH@google.com Signed-off-by: Dmitry Torokhov commit 89ad7420b25c2b40a4d916f4fd43b9ccacd50500 Author: Andrew Delgadillo Date: Fri Dec 11 00:43:44 2020 +0000 selftests/bpf: Drop the need for LLVM's llc LLC is meant for compiler development and debugging. Consequently, it exposes many low level options about its backend. To avoid future bugs introduced by using the raw LLC tool, use clang directly so that all appropriate options are passed to the back end. Additionally, simplify the Makefile by removing the CLANG_NATIVE_BPF_BUILD_RULE as it is not being use, stop passing dwarfris attr since elfutils/libdw now supports the bpf backend (which should work with any recent pahole), and stop passing alu32 since -mcpu=v3 implies alu32. Signed-off-by: Andrew Delgadillo Signed-off-by: Andrii Nakryiko Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20201211004344.3355074-1-adelg@google.com commit a67079b03165a17f9aceab3dd26b1638af68e0fc Author: Andrii Nakryiko Date: Thu Dec 10 17:59:46 2020 -0800 selftests/bpf: fix bpf_testmod.ko recompilation logic bpf_testmod.ko build rule declared dependency on VMLINUX_BTF, but the variable itself was initialized after the rule was declared, which often caused bpf_testmod.ko to not be re-compiled. Fix by moving VMLINUX_BTF determination sooner. Also enforce bpf_testmod.ko recompilation when we detect that vmlinux image changed by removing bpf_testmod/bpf_testmod.ko. This is necessary to generate correct module's split BTF. Without it, Kbuild's module build logic might determine that nothing changed on the kernel side and thus bpf_testmod.ko shouldn't be rebuilt, so won't re-generate module BTF, which often leads to module's BTF with wrong string offsets against vmlinux BTF. Removing .ko file forces Kbuild to re-build the module. Reported-by: Alexei Starovoitov Fixes: 9f7fa225894c ("selftests/bpf: Add bpf_testmod kernel module for testing") Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20201211015946.4062098-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 04e9ab75267489224364fa510a88ada83e11c325 Author: Rafał Miłecki Date: Thu Dec 10 18:23:52 2020 +0100 dt-bindings: mtd: convert "fixed-partitions" to the json-schema This standardizes its documentation, allows validating with Makefile checks and helps writing DTS files. Noticeable changes: 1. Dropped "Partitions can be represented by sub-nodes of a flash device." as we also support subpartitions (don't have to be part of flash device node) 2. Dropped "to Linux" as bindings are meant to be os agnostic. Signed-off-by: Rafał Miłecki Link: https://lore.kernel.org/r/20201210172352.31632-1-zajec5@gmail.com Signed-off-by: Rob Herring commit 60a2a8ff3380d42090dd9f9c9ed0987c527254dc Author: Rob Herring Date: Thu Dec 10 12:47:49 2020 -0600 dt-bindings: vendor-prefixes: Add undocumented bm, gpio-key, and mentor prefixes Add bm, gpio-key, and mentor as vendor prefixes which are in use, but undocumented. Signed-off-by: Rob Herring commit f3c6c120614cfb02827ee7bbe6c4240847cc5f12 Author: Geert Uytterhoeven Date: Wed Dec 9 11:12:31 2020 +0100 dt-bindings: pci: rcar-pci-ep: Document missing interrupts property The R-Car PCIe controller does not use interrupts when configured for endpoint mode, hence the bindings do not document the interrupts property. However, all DTS files provide interrupts properties, and thus fail to validate. Fix this by documenting the interrupts property. Fixes: 4c0f80920923f103 ("dt-bindings: PCI: rcar: Add bindings for R-Car PCIe endpoint controller") Signed-off-by: Geert Uytterhoeven Reviewed-by: Lad Prabhakar Link: https://lore.kernel.org/r/20201209101231.2206479-1-geert+renesas@glider.be Signed-off-by: Rob Herring commit 3ae9c3cde51abcb777125cfcf74cc402f4d0a4c7 Author: Souptick Joarder Date: Wed Dec 9 00:57:18 2020 +0530 riscv: Fixed kernel test robot warning Kernel test robot throws below warning - arch/riscv/kernel/asm-offsets.c:14:6: warning: no previous prototype for 'asm_offsets' [-Wmissing-prototypes] 14 | void asm_offsets(void) | ^~~~~~~~~~~ This patch should fixed it. Reported-by: kernel test robot Signed-off-by: Souptick Joarder Signed-off-by: Palmer Dabbelt commit 772e1b7c426762159e5150ecff5268e6e1f361d3 Author: Kefeng Wang Date: Sat Nov 21 18:15:19 2020 +0800 riscv: kernel: Drop unused clean rule Signed-off-by: Kefeng Wang Signed-off-by: Palmer Dabbelt commit 04091d6c0535f6dc82af864ab56425235c6581a4 Author: Nylon Chen Date: Mon Nov 30 17:13:19 2020 +0800 riscv: provide memmove implementation The memmove used by the kernel feature like KASAN. Signed-off-by: Nick Hu Signed-off-by: Nick Hu Signed-off-by: Nylon Chen Signed-off-by: Palmer Dabbelt commit dddc4ef92d1ce92987da1d6926cdfa99e8acb622 Author: Cédric Le Goater Date: Thu Dec 10 18:14:50 2020 +0100 KVM: PPC: Book3S HV: XIVE: Add a comment regarding VP numbering When the XIVE resources are allocated at the HW level, the VP structures describing the vCPUs of a guest are distributed among the chips to optimize the PowerBUS usage. For best performance, the guest vCPUs can be pinned to match the VP structure distribution. Currently, the VP identifiers are deduced from the vCPU id using the kvmppc_pack_vcpu_id() routine which is not incorrect but not optimal either. It VSMT is used, the result is not continuous and the constraints on HW resources described above can not be met. Signed-off-by: Cédric Le Goater Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201210171450.1933725-14-clg@kaod.org commit 07efbca11c1a985efa4d15bd76a637c6bffc253b Author: Cédric Le Goater Date: Thu Dec 10 18:14:49 2020 +0100 powerpc/xive: Improve error reporting of OPAL calls Introduce a vp_err() macro to standardize error reporting. Signed-off-by: Cédric Le Goater Reviewed-by: Greg Kurz Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201210171450.1933725-13-clg@kaod.org commit 614546d56296380b59e94484813eeef62a7d2b6b Author: Cédric Le Goater Date: Thu Dec 10 18:14:48 2020 +0100 powerpc/xive: Simplify xive_do_source_eoi() Previous patches removed the need of the first argument which was a hack for Firwmware EOI. Remove it and flatten the routine which has became simpler. Signed-off-by: Cédric Le Goater Reviewed-by: Greg Kurz Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201210171450.1933725-12-clg@kaod.org commit cf58b746665d0177b86d42d18e60985fa1fdb909 Author: Cédric Le Goater Date: Thu Dec 10 18:14:47 2020 +0100 powerpc/xive: Remove P9 DD1 flag XIVE_IRQ_FLAG_EOI_FW This flag was used to support the P9 DD1 and we have stopped supporting this CPU when DD2 came out. See skiboot commit: https://github.com/open-power/skiboot/commit/0b0d15e3c170 Also, remove eoi handler which is now unused. Signed-off-by: Cédric Le Goater Reviewed-by: Greg Kurz Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201210171450.1933725-11-clg@kaod.org commit b5277d18c65e31ce51f6733ebdca3985a962fab5 Author: Cédric Le Goater Date: Thu Dec 10 18:14:46 2020 +0100 powerpc/xive: Remove P9 DD1 flag XIVE_IRQ_FLAG_MASK_FW This flag was used to support the PHB4 LSIs on P9 DD1 and we have stopped supporting this CPU when DD2 came out. See skiboot commit: https://github.com/open-power/skiboot/commit/0b0d15e3c170 Signed-off-by: Cédric Le Goater Reviewed-by: Greg Kurz Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201210171450.1933725-10-clg@kaod.org commit 4cc0e36df2c0a41fd38645ddde08d2bfba699b7a Author: Cédric Le Goater Date: Thu Dec 10 18:14:45 2020 +0100 powerpc/xive: Remove P9 DD1 flag XIVE_IRQ_FLAG_SHIFT_BUG This flag was used to support the PHB4 LSIs on P9 DD1 and we have stopped supporting this CPU when DD2 came out. See skiboot commit: https://github.com/open-power/skiboot/commit/0b0d15e3c170 Signed-off-by: Cédric Le Goater Reviewed-by: Greg Kurz Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201210171450.1933725-9-clg@kaod.org commit 7b3b3de3b04ecb7393cdfaa30a3468dd47b750cf Author: Cédric Le Goater Date: Thu Dec 10 18:14:44 2020 +0100 powerpc: Increase NR_IRQS range to support more KVM guests PowerNV systems can handle up to 4K guests and 1M interrupt numbers per chip. Increase the range of allowed interrupts to support a larger number of guests. Signed-off-by: Cédric Le Goater Reviewed-by: Greg Kurz Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201210171450.1933725-8-clg@kaod.org commit a5021abc48a0f44083a15a37b3e61378519cb00d Author: Cédric Le Goater Date: Thu Dec 10 18:14:43 2020 +0100 powerpc/xive: Add a debug_show handler to the XIVE irq_domain Full state of the Linux interrupt descriptors can be dumped under debugfs when compiled with CONFIG_GENERIC_IRQ_DEBUGFS. Add support for the XIVE interrupt controller. Signed-off-by: Cédric Le Goater Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201210171450.1933725-7-clg@kaod.org commit 9dfe4b14df93532da3dbf11952a17389ae3cdc67 Author: Cédric Le Goater Date: Thu Dec 10 18:14:42 2020 +0100 powerpc/xive: Add a name to the IRQ domain We hope one day to handle multiple irq_domain in the XIVE driver. Start simple by setting the name using the DT node. Signed-off-by: Cédric Le Goater Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201210171450.1933725-6-clg@kaod.org commit e2cf43d59525477cfd030378c3c808187952c531 Author: Cédric Le Goater Date: Thu Dec 10 18:14:40 2020 +0100 powerpc/xive: Introduce XIVE_IPI_HW_IRQ The XIVE driver deals with CPU IPIs in a peculiar way. Each CPU has its own XIVE IPI interrupt allocated at the HW level, for PowerNV, or at the hypervisor level for pSeries. In practice, these interrupts are not always used. pSeries/PowerVM prefers local doorbells for local threads since they are faster. On PowerNV, global doorbells are also preferred for the same reason. The mapping in the Linux is reduced to a single interrupt using HW interrupt number 0 and a custom irq_chip to handle EOI. This can cause performance issues in some benchmark (ipistorm) on multichip systems. Clarify the use of the 0 value, it will help in improving multichip support. Signed-off-by: Cédric Le Goater Reviewed-by: Greg Kurz Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201210171450.1933725-4-clg@kaod.org commit 4f1c3f7b08187e6b97701c7fb2dc6f3749566c62 Author: Cédric Le Goater Date: Thu Dec 10 18:14:39 2020 +0100 powerpc/xive: Rename XIVE_IRQ_NO_EOI to show its a flag This is a simple cleanup to identify easily all flags of the XIVE interrupt structure. The interrupts flagged with XIVE_IRQ_FLAG_NO_EOI are the escalations used to wake up vCPUs in KVM. They are handled very differently from the rest. Signed-off-by: Cédric Le Goater Reviewed-by: Greg Kurz Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201210171450.1933725-3-clg@kaod.org commit 98983675008ab3ae9b37fc7a4bfa083998079215 Author: Cédric Le Goater Date: Thu Dec 10 18:14:38 2020 +0100 KVM: PPC: Book3S HV: XIVE: Show detailed configuration in debug output This is useful to track allocation of the HW resources on per guest basis. Making sure IPIs are local to the chip of the vCPUs reduces rerouting between interrupt controllers and gives better performance in case of pinning. Checking the distribution of VP structures on the chips also helps in reducing PowerBUS traffic. [ clg: resurrected show_sources and reworked ouput ] Signed-off-by: Greg Kurz Signed-off-by: Cédric Le Goater Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201210171450.1933725-2-clg@kaod.org commit 1a97d899ecbc4b60c8e8f9b41cde443510b5b1bf Author: Al Viro Date: Sat Sep 19 17:55:58 2020 +0100 Make sure that make_create_in_sticky() never sees uninitialized value of dir_mode make sure nd->dir_mode is always initialized after success exit from link_path_walk(); in case of empty path it did not happen. Reported-by: Anant Thazhemadam Tested-by: Anant Thazhemadam Signed-off-by: Al Viro commit 77573fa310d95e4293efdec98dace74cd9e52f43 Author: Hao Li Date: Tue Dec 8 10:10:50 2020 +0800 fs: Kill DCACHE_DONTCACHE dentry even if DCACHE_REFERENCED is set If DCACHE_REFERENCED is set, fast_dput() will return true, and then retain_dentry() have no chance to check DCACHE_DONTCACHE. As a result, the dentry won't be killed and the corresponding inode can't be evicted. In the following example, the DAX policy can't take effects unless we do a drop_caches manually. # DCACHE_LRU_LIST will be set echo abcdefg > test.txt # DCACHE_REFERENCED will be set and DCACHE_DONTCACHE can't do anything xfs_io -c 'chattr +x' test.txt # Drop caches to make DAX changing take effects echo 2 > /proc/sys/vm/drop_caches What this patch does is preventing fast_dput() from returning true if DCACHE_DONTCACHE is set. Then retain_dentry() will detect the DCACHE_DONTCACHE and will return false. As a result, the dentry will be killed and the inode will be evicted. In this way, if we change per-file DAX policy, it will take effects automatically after this file is closed by all processes. I also add some comments to make the code more clear. Signed-off-by: Hao Li Reviewed-by: Jan Kara Reviewed-by: Ira Weiny Signed-off-by: Al Viro commit 88149082bb8ef31b289673669e080ec6a00c2e59 Author: Hao Li Date: Tue Dec 8 10:08:43 2020 +0800 fs: Handle I_DONTCACHE in iput_final() instead of generic_drop_inode() If generic_drop_inode() returns true, it means iput_final() can evict this inode regardless of whether it is dirty or not. If we check I_DONTCACHE in generic_drop_inode(), any inode with this bit set will be evicted unconditionally. This is not the desired behavior because I_DONTCACHE only means the inode shouldn't be cached on the LRU list. As for whether we need to evict this inode, this is what generic_drop_inode() should do. This patch corrects the usage of I_DONTCACHE. This patch was proposed in [1]. [1]: https://lore.kernel.org/linux-fsdevel/20200831003407.GE12096@dread.disaster.area/ Fixes: dae2f8ed7992 ("fs: Lift XFS_IDONTCACHE to the VFS layer") Signed-off-by: Hao Li Reviewed-by: Dave Chinner Reviewed-by: Ira Weiny Signed-off-by: Al Viro commit edf7ddbf1c5eb98b720b063b73e20e8a4a1ce673 Author: Eric Biggers Date: Sat Oct 31 21:40:21 2020 -0700 fs/namespace.c: WARN if mnt_count has become negative Missing calls to mntget() (or equivalently, too many calls to mntput()) are hard to detect because mntput() delays freeing mounts using task_work_add(), then again using call_rcu(). As a result, mnt_count can often be decremented to -1 without getting a KASAN use-after-free report. Such cases are still bugs though, and they point to real use-after-frees being possible. For an example of this, see the bug fixed by commit 1b0b9cc8d379 ("vfs: fsmount: add missing mntget()"), discussed at https://lkml.kernel.org/linux-fsdevel/20190605135401.GB30925@xxxxxxxxxxxxxxxxxxxxxxxxx/T/#u. This bug *should* have been trivial to find. But actually, it wasn't found until syzkaller happened to use fchdir() to manipulate the reference count just right for the bug to be noticeable. Address this by making mntput_no_expire() issue a WARN if mnt_count has become negative. Suggested-by: Miklos Szeredi Signed-off-by: Eric Biggers Signed-off-by: Al Viro commit 092fde0f863b72b67c4d6dc03844f5658fc00a35 Author: Magnus Karlsson Date: Thu Dec 10 17:34:07 2020 +0100 samples/bpf: Fix possible hang in xdpsock with multiple threads Fix a possible hang in xdpsock that can occur when using multiple threads. In this case, one or more of the threads might get stuck in the while-loop in tx_only after the user has signaled the main thread to stop execution. In this case, no more Tx packets will be sent, so a thread might get stuck in the aforementioned while-loop. Fix this by introducing a test inside the while-loop to check if the benchmark has been terminated. If so, return from the function. Fixes: cd9e72b6f210 ("samples/bpf: xdpsock: Add option to specify batch size") Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20201210163407.22066-1-magnus.karlsson@gmail.com commit 058df195c23403f91acc028e39ca2ad599d0af52 Author: Thomas Gleixner Date: Thu Dec 10 21:15:04 2020 +0100 x86/ioapic: Cleanup the timer_works() irqflags mess Mark tripped over the creative irqflags handling in the IO-APIC timer delivery check which ends up doing: local_irq_save(flags); local_irq_enable(); local_irq_restore(flags); which triggered a new consistency check he's working on required for replacing the POPF based restore with a conditional STI. That code is a historical mess and none of this is needed. Make it straightforward use local_irq_disable()/enable() as that's all what is required. It is invoked from interrupt enabled code nowadays. Reported-by: Mark Rutland Signed-off-by: Thomas Gleixner Tested-by: Mark Rutland Link: https://lore.kernel.org/r/87k0tpju47.fsf@nanos.tec.linutronix.de commit 91163f82143630a9629a8bf0227d49173697c69c Merge: 51e13685bd936 563b603bd65db Author: David S. Miller Date: Thu Dec 10 13:57:36 2020 -0800 Merge branch 'add-ppp_generic-ioctls-to-bridge-channels' Tom Parkin says: ==================== add ppp_generic ioctl(s) to bridge channels Following on from my previous RFC[1], this series adds two ioctl calls to the ppp code to implement "channel bridging". When two ppp channels are bridged, frames presented to ppp_input() on one channel are passed to the other channel's ->start_xmit function for transmission. The primary use-case for this functionality is in an L2TP Access Concentrator where PPP frames are typically presented in a PPPoE session (e.g. from a home broadband user) and are forwarded to the ISP network in a PPPoL2TP session. The two new ioctls, PPPIOCBRIDGECHAN and PPPIOCUNBRIDGECHAN form a symmetric pair. Userspace code testing and illustrating use of the ioctl calls is available in the go-l2tp[2] and l2tp-ktest[3] repositories. [1]. Previous RFC series: https://lore.kernel.org/netdev/20201106181647.16358-1-tparkin@katalix.com/ [2]. go-l2tp: a Go library for building L2TP applications on Linux systems. Support for the PPPIOCBRIDGECHAN ioctl is on a branch: https://github.com/katalix/go-l2tp/tree/tp_002_pppoe_2 [3]. l2tp-ktest: a test suite for the Linux Kernel L2TP subsystem. Support for the PPPIOCBRIDGECHAN ioctl is on a branch: https://github.com/katalix/l2tp-ktest/tree/tp_ac_pppoe_tests_2 Changelog: v4: * Fix NULL-pointer access in PPPIOCBRIDGECHAN in the case that the ID of the channel to be bridged wasn't found. * Add comment in ppp_unbridge_channels to better document the unbridge process. v3: * Use rcu_dereference_protected for accessing struct channel 'bridge' field during updates with lock 'upl' held. * Avoid race in ppp_unbridge_channels by ensuring that each channel in the bridge points to it's peer before decrementing refcounts. v2: * Add missing __rcu annotation to struct channel 'bridge' field in order to squash a sparse warning from a C=1 build * Integrate review comments from gnault@redhat.com * Have ppp_unbridge_channels return -EINVAL if the channel isn't part of a bridge: this better aligns with the return code from ppp_disconnect_channel. * Improve docs update by including information on ioctl arguments and error return codes. ==================== Reviewed-by: Guillaume Nault Signed-off-by: David S. Miller commit 563b603bd65db452edd66f44f66823ce6fe40a0d Author: Tom Parkin Date: Thu Dec 10 15:50:58 2020 +0000 docs: update ppp_generic.rst to document new ioctls Add documentation of the newly-added PPPIOCBRIDGECHAN and PPPIOCUNBRIDGECHAN ioctls. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit 4cf476ced45d7f12df30a68e833b263e7a2202d1 Author: Tom Parkin Date: Thu Dec 10 15:50:57 2020 +0000 ppp: add PPPIOCBRIDGECHAN and PPPIOCUNBRIDGECHAN ioctls This new ioctl pair allows two ppp channels to be bridged together: frames arriving in one channel are transmitted in the other channel and vice versa. The practical use for this is primarily to support the L2TP Access Concentrator use-case. The end-user session is presented as a ppp channel (typically PPPoE, although it could be e.g. PPPoA, or even PPP over a serial link) and is switched into a PPPoL2TP session for transmission to the LNS. At the LNS the PPP session is terminated in the ISP's network. When a PPP channel is bridged to another it takes a reference on the other's struct ppp_file. This reference is dropped when the channels are unbridged, which can occur either explicitly on userspace calling the PPPIOCUNBRIDGECHAN ioctl, or implicitly when either channel in the bridge is unregistered. In order to implement the channel bridge, struct channel is extended with a new field, 'bridge', which points to the other struct channel making up the bridge. This pointer is RCU protected to avoid adding another lock to the data path. To guard against concurrent writes to the pointer, the existing struct channel lock 'upl' coverage is extended rather than adding a new lock. The 'upl' lock is used to protect the existing unit pointer. Since the bridge effectively replaces the unit (they're mutually exclusive for a channel) it makes coding easier to use the same lock to cover them both. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit ac35e6cb9ea51dddceae7e20a736e248730908ac Author: Srinivas Pandruvada Date: Thu Dec 10 13:33:24 2020 -0800 thermal: int340x: processor_thermal: Correct workload type name Change "Burusty" to "bursty". Reported-by: Michael Larabel Signed-off-by: Srinivas Pandruvada Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201210213324.2113041-1-srinivas.pandruvada@linux.intel.com commit bdfae1c9a913930eae5ea506733aa7c285e12a06 Author: Lu Baolu Date: Wed Dec 9 09:44:44 2020 +0800 vfio/type1: Add vfio_group_iommu_domain() Add the API for getting the domain from a vfio group. This could be used by the physical device drivers which rely on the vfio/mdev framework for mediated device user level access. The typical use case like below: unsigned int pasid; struct vfio_group *vfio_group; struct iommu_domain *iommu_domain; struct device *dev = mdev_dev(mdev); struct device *iommu_device = mdev_get_iommu_device(dev); if (!iommu_device || !iommu_dev_feature_enabled(iommu_device, IOMMU_DEV_FEAT_AUX)) return -EINVAL; vfio_group = vfio_group_get_external_user_from_dev(dev); if (IS_ERR_OR_NULL(vfio_group)) return -EFAULT; iommu_domain = vfio_group_iommu_domain(vfio_group); if (IS_ERR_OR_NULL(iommu_domain)) { vfio_group_put_external_user(vfio_group); return -EFAULT; } pasid = iommu_aux_get_pasid(iommu_domain, iommu_device); if (pasid < 0) { vfio_group_put_external_user(vfio_group); return -EFAULT; } /* Program device context with pasid value. */ ... Signed-off-by: Lu Baolu Signed-off-by: Alex Williamson commit a0f55287b50c3e4d2fae6e3a09d2c8ea81140897 Author: Xiaomeng Hou Date: Tue Dec 1 18:33:33 2020 +0800 drm/amd/pm: inform SMU RLC status thus enable/disable DPM feature for vangogh RLC is halted when system suspend/shutdown. However, due to DPM enabled, PMFW is unaware of RLC being halted and will continue sending messages, which would eventually cause an ACPI hang. Use the system_feature_control interface to notify SMU the status of RLC (Normal/OFF) thus enable/disable DPM feature. Signed-off-by: Xiaomeng Hou Reviewed-by: Huang Rui Reviewed-by: Lazar Lijo Signed-off-by: Alex Deucher commit fe96eb197e98efa32c129c4af3b44813c42bb93f Author: Xiaomeng Hou Date: Tue Dec 1 17:49:50 2020 +0800 drm/amd/pm: update the smu v11.5 smc header for vangogh Add new PMFW message to notify RLC engine status. Signed-off-by: Xiaomeng Hou Reviewed-by: Huang Rui Reviewed-by: Lazar Lijo Signed-off-by: Alex Deucher commit 7c431455cdd6add04f0d4a1a671095623d18622d Author: Alex Deucher Date: Mon Nov 30 18:57:50 2020 -0500 drm/amdgpu/display: move link_bandwidth_kbps under CONFIG_DRM_AMD_DC_DCN It's only used when CONFIG_DRM_AMD_DC_DCN is set. Fixes and set but not used warning. Acked-by: Evan Quan Signed-off-by: Alex Deucher commit 4c4d5a49c6347e27e1c80fb4275f8ad160bcf4f3 Author: Evan Quan Date: Wed Dec 9 16:34:22 2020 +0800 drm/amd/pm: typo fix (CUSTOM -> COMPUTE) The "COMPUTE" was wrongly spelled as "CUSTOM". Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit d7f52e2930015d6104ed6eb4c987d1b396dc548c Author: Evan Quan Date: Wed Dec 9 11:43:22 2020 +0800 drm/amd/pm: fulfill sienna cichlid 2nd usb2.0 port workaround Fulfill the 2nd usb2.0 port workaround for sienna cichlid. Signed-off-by: Evan Quan Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 88dfd5d5c8cb973c141a674000d40573daea58a2 Author: Evan Quan Date: Tue Dec 8 13:07:24 2020 +0800 drm/amd/pm: new SMC message for 2nd usb2.0 port workaround The workaround is needed by sienna cichlid. Signed-off-by: Evan Quan Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit ad26bd11261c8b07cb88aa4e81e2d3f8e1452d77 Author: Evan Quan Date: Tue Dec 8 12:30:09 2020 +0800 drm/amdgpu: new macro for determining 2ND_USB20PORT support Used for determining 2ND_USB20PORT support from firmware_capability. Signed-off-by: Evan Quan Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit a7e660e526c9936cad3871d8cd1e3360b0b87469 Author: Evan Quan Date: Tue Dec 8 12:26:09 2020 +0800 drm/amd/pm: expose the firmware_capability from firmware_info table That will help to determine whether 2ND_USB20_PORT workaround is needed for Sienna Cichlid. Signed-off-by: Evan Quan Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit ac7804bb9908b972c1aa02eb79a5688c051a5668 Author: Evan Quan Date: Tue Dec 8 11:59:52 2020 +0800 drm/amd/pm: correct the gpo control for sienna cichlid New SMC message was introduced for gpo control on sienna cichlid. Signed-off-by: Evan Quan Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 0cb4c62125a904259e24016b5e85408c27dc412a Author: Evan Quan Date: Mon Dec 7 16:53:25 2020 +0800 drm/amd/pm: correct power limit setting for SMU V11 Correct the power limit setting for SMU V11 asics. Signed-off-by: Evan Quan Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 18a4b3de5fc1c63c80e3be0673886431a56e4307 Author: Evan Quan Date: Mon Dec 7 16:21:03 2020 +0800 drm/amd/pm: support power source switch on Sienna Cichlid Enable power source switch on Sienna Cichlid. Signed-off-by: Evan Quan Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 0d801007f90ec023aefc1da19529bf9985050227 Author: Jiansong Chen Date: Wed Dec 9 19:43:44 2020 +0800 drm/amdkfd: correct pipe offset calculation Correct pipe offset calculation in is_pipe_enabled function, it should be done in queues. Signed-off-by: Jiansong Chen Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 0269764a731bba0b5b1afb134abab702fbde1f04 Author: Rodrigo Siqueira Date: Mon Dec 7 17:20:27 2020 -0500 drm/amd/display: Drop unnecessary function call After refactor our amdgpu_dm_atomic_commit, this function only invoke drm_atomic_helper_commit. For this reason, this commit drops amdgpu_dm_atomic_commit and add drm_atomic_helper_commit directly in the atomic_commit hook. v2: squash in warning fix (Alex) Reviewed-by: Alex Deucher Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 4932d37055e7a459a92424c4d21ebf8c2c0fb19a Author: Christian König Date: Tue Dec 8 16:19:42 2020 +0100 drm/amdgpu: limit the amdgpu_vm_update_ptes trace point The text output should not be more than a page, so only print the first 32 page table entries. If we need all of them we can still look into the binary trace. Signed-off-by: Christian König Reviewed-by: Shashank Sharma Signed-off-by: Alex Deucher commit ee4e0eafa43cfd9008722fe15e17b8bf62fb6e8d Author: YouChing Lin Date: Thu Dec 10 11:22:09 2020 +0800 mtd: spinand: macronix: Add support for MX35LFxG24AD The Macronix MX35LF1G24AD(/2G24AD/4G24AD) are 3V, 1G/2G/4Gbit serial SLC NAND flash device (without on-die ECC). Validated by read, erase, read back, write, read back on Xilinx Zynq PicoZed FPGA board which included Macronix SPI Host(drivers/spi/spi-mxic.c) & S/W BCH ecc(drivers/mtd/nand/ecc-sw-bch.c) with bug fixing patch (mtd: nand: ecc-bch: Fix the size of calc_buf/code_buf of the BCH). Signed-off-by: YouChing Lin Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/1607570529-22341-3-git-send-email-ycllin@mxic.com.tw commit 058e0e847d54944c5dc9ec6d29727e1449feb131 Author: Yifeng Zhao Date: Thu Dec 10 08:21:32 2020 +0800 mtd: rawnand: rockchip: NFC driver for RK3308, RK2928 and others This driver supports Rockchip NFC (NAND Flash Controller) found on RK3308, RK2928, RKPX30, RV1108 and other SOCs. The driver has been tested using 8-bit NAND interface on the ARM based RK3308 platform. Support Rockchip SoCs and NFC versions: - PX30 and RK3326(NFCv900). ECC: 16/40/60/70 bits/1KB. CLOCK: ahb and nfc. - RK3308 and RV1108(NFCv800). ECC: 16 bits/1KB. CLOCK: ahb and nfc. - RK3036 and RK3128(NFCv622). ECC: 16/24/40/60 bits/1KB. CLOCK: ahb and nfc. - RK3066, RK3188 and RK2928(NFCv600). ECC: 16/24/40/60 bits/1KB. CLOCK: ahb. Supported features: - Read full page data by DMA. - Support HW ECC(one step is 1KB). - Support 2 - 32K page size. - Support 8 CS(depend on SoCs) Limitations: - No support for the ecc step size is 512. - Untested on some SoCs. - No support for subpages. - No support for the builtin randomizer. - The original bad block mask is not supported. It is recommended to use the BBT(bad block table). Suggested-by: Johan Jonker Signed-off-by: Yifeng Zhao Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201210002134.5686-3-yifeng.zhao@rock-chips.com commit 2007ac9e68419ec2407e93888dc1025f6db369dc Author: Yifeng Zhao Date: Thu Dec 10 08:21:31 2020 +0800 dt-bindings: mtd: Describe Rockchip RK3xxx NAND flash controller Documentation support for Rockchip RK3xxx NAND flash controllers Reviewed-by: Rob Herring Signed-off-by: Yifeng Zhao Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201210002134.5686-2-yifeng.zhao@rock-chips.com commit ea7110b87bf9c32eb57311da8011b464d18d80cd Author: Fabio Estevam Date: Tue Dec 8 19:12:43 2020 -0300 mtd: rawnand: gpmi: Use a single line for of_device_id The .compatible and .data pairs can be stored in a single line, which makes the code more concise. Signed-off-by: Fabio Estevam Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201208221243.3255-1-festevam@gmail.com commit 7671edeb193910482a9b0c22cd32176e7de7b2ed Author: Han Xu Date: Tue Dec 8 21:51:04 2020 -0600 mtd: rawnand: gpmi: Fix the random DMA timeout issue To get better performance, current gpmi driver collected and chained all small DMA transfers in gpmi_nfc_exec_op, the whole chain triggered and wait for complete at the end. But some random DMA timeout found in this new driver, with the help of ftrace, we found the root cause is as follows: Take gpmi_ecc_read_page() as an example, gpmi_nfc_exec_op collected 6 DMA transfers and the DMA chain triggered at the end. It waits for bch completion and check jiffies if it's timeout. The typical function graph shown below, 63.216351 | 1) | gpmi_ecc_read_page() { 63.216352 | 1) 0.750 us | gpmi_bch_layout_std(); 63.216354 | 1) | gpmi_nfc_exec_op() { 63.216355 | 1) | gpmi_chain_command() { 63.216356 | 1) | mxs_dma_prep_slave_sg() { 63.216357 | 1) | /* mxs chan ccw idx: 0 */ 63.216358 | 1) 1.750 us | } 63.216359 | 1) | mxs_dma_prep_slave_sg() { 63.216360 | 1) | /* mxs chan ccw idx: 1 */ 63.216361 | 1) 2.000 us | } 63.216361 | 1) 6.500 us | } 63.216362 | 1) | gpmi_chain_command() { 63.216363 | 1) | mxs_dma_prep_slave_sg() { 63.216364 | 1) | /* mxs chan ccw idx: 2 */ 63.216365 | 1) 1.750 us | } 63.216366 | 1) | mxs_dma_prep_slave_sg() { 63.216367 | 1) | /* mxs chan ccw idx: 3 */ 63.216367 | 1) 1.750 us | } 63.216368 | 1) 5.875 us | } 63.216369 | 1) | /* gpmi_chain_wait_ready */ 63.216370 | 1) | mxs_dma_prep_slave_sg() { 63.216372 | 1) | /* mxs chan ccw idx: 4 */ 63.216373 | 1) 3.000 us | } 63.216374 | 1) | /* gpmi_chain_data_read */ 63.216376 | 1) | mxs_dma_prep_slave_sg() { 63.216377 | 1) | /* mxs chan ccw idx: 5 */ 63.216378 | 1) 2.000 us | } 63.216379 | 1) 1.125 us | mxs_dma_tx_submit(); 63.216381 | 1) 1.000 us | mxs_dma_enable_chan(); 63.216712 | 0) 2.625 us | mxs_dma_int_handler(); 63.216717 | 0) 4.250 us | bch_irq(); 63.216723 | 0) 1.250 us | mxs_dma_tasklet(); 63.216723 | 1) | /* jiffies left 250 */ 63.216725 | 1) ! 372.000 us | } 63.216726 | 1) 2.625 us | gpmi_count_bitflips(); 63.216730 | 1) ! 379.125 us | } but it's not gurantee that bch irq handled always after dma irq handled, sometimes bch_irq comes first and gpmi_nfc_exec_op won't wait anymore, another gpmi_nfc_exec_op may get invoked before last DMA chain IRQ handled, this messed up the next DMA chain and causes DMA timeout. Check the trace log when issue happened. 63.218923 | 1) | gpmi_ecc_read_page() { 63.218924 | 1) 0.625 us | gpmi_bch_layout_std(); 63.218926 | 1) | gpmi_nfc_exec_op() { 63.218927 | 1) | gpmi_chain_command() { 63.218928 | 1) | mxs_dma_prep_slave_sg() { 63.218929 | 1) | /* mxs chan ccw idx: 0 */ 63.218929 | 1) 1.625 us | } 63.218931 | 1) | mxs_dma_prep_slave_sg() { 63.218931 | 1) | /* mxs chan ccw idx: 1 */ 63.218932 | 1) 1.750 us | } 63.218933 | 1) 5.875 us | } 63.218934 | 1) | gpmi_chain_command() { 63.218934 | 1) | mxs_dma_prep_slave_sg() { 63.218935 | 1) | /* mxs chan ccw idx: 2 */ 63.218936 | 1) 1.875 us | } 63.218937 | 1) | mxs_dma_prep_slave_sg() { 63.218938 | 1) | /* mxs chan ccw idx: 3 */ 63.218939 | 1) 1.625 us | } 63.218939 | 1) 5.875 us | } 63.218940 | 1) | /* gpmi_chain_wait_ready */ 63.218941 | 1) | mxs_dma_prep_slave_sg() { 63.218942 | 1) | /* mxs chan ccw idx: 4 */ 63.218942 | 1) 1.625 us | } 63.218943 | 1) | /* gpmi_chain_data_read */ 63.218944 | 1) | mxs_dma_prep_slave_sg() { 63.218945 | 1) | /* mxs chan ccw idx: 5 */ 63.218947 | 1) 2.375 us | } 63.218948 | 1) 0.625 us | mxs_dma_tx_submit(); 63.218949 | 1) 1.000 us | mxs_dma_enable_chan(); 63.219276 | 0) 5.125 us | bch_irq(); <---- 63.219283 | 1) | /* jiffies left 250 */ 63.219285 | 1) ! 358.625 us | } 63.219286 | 1) 2.750 us | gpmi_count_bitflips(); 63.219289 | 1) ! 366.000 us | } 63.219290 | 1) | gpmi_ecc_read_page() { 63.219291 | 1) 0.750 us | gpmi_bch_layout_std(); 63.219293 | 1) | gpmi_nfc_exec_op() { 63.219294 | 1) | gpmi_chain_command() { 63.219295 | 1) | mxs_dma_prep_slave_sg() { 63.219295 | 0) 1.875 us | mxs_dma_int_handler(); <---- 63.219296 | 1) | /* mxs chan ccw idx: 6 */ 63.219297 | 1) 2.250 us | } 63.219298 | 1) | mxs_dma_prep_slave_sg() { 63.219298 | 0) 1.000 us | mxs_dma_tasklet(); 63.219299 | 1) | /* mxs chan ccw idx: 0 */ 63.219300 | 1) 1.625 us | } 63.219300 | 1) 6.375 us | } 63.219301 | 1) | gpmi_chain_command() { 63.219302 | 1) | mxs_dma_prep_slave_sg() { 63.219303 | 1) | /* mxs chan ccw idx: 1 */ 63.219304 | 1) 1.625 us | } 63.219305 | 1) | mxs_dma_prep_slave_sg() { 63.219306 | 1) | /* mxs chan ccw idx: 2 */ 63.219306 | 1) 1.875 us | } 63.219307 | 1) 6.000 us | } 63.219308 | 1) | /* gpmi_chain_wait_ready */ 63.219308 | 1) | mxs_dma_prep_slave_sg() { 63.219309 | 1) | /* mxs chan ccw idx: 3 */ 63.219310 | 1) 2.000 us | } 63.219311 | 1) | /* gpmi_chain_data_read */ 63.219312 | 1) | mxs_dma_prep_slave_sg() { 63.219313 | 1) | /* mxs chan ccw idx: 4 */ 63.219314 | 1) 1.750 us | } 63.219315 | 1) 0.625 us | mxs_dma_tx_submit(); 63.219316 | 1) 0.875 us | mxs_dma_enable_chan(); 64.224227 | 1) | /* jiffies left 0 */ In the first gpmi_nfc_exec_op, bch_irq comes first and gpmi_nfc_exec_op exits, but DMA IRQ still not happened yet until the middle of following gpmi_nfc_exec_op, the first DMA transfer index get messed and DMA get timeout. To fix the issue, when there is bch ops in DMA chain, the gpmi_nfc_exec_op should wait for both completions rather than bch completion only. Fixes: ef347c0cfd61 ("mtd: rawnand: gpmi: Implement exec_op") Signed-off-by: Han Xu Reviewed-by: Sascha Hauer Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201209035104.22679-3-han.xu@nxp.com commit 46337d158262465a89f3568c94410ea553aa15b9 Author: Han Xu Date: Tue Dec 8 21:51:03 2020 -0600 mtd: rawnand: gpmi: Fix the driver only sense CS0 R/B issue Set the GPMI CTRL1 GANGED_RDYBUSY bit so driver can sense the R/B signal from all CS. For the NAND chip MT29F64G08AFAAAWP, only the first chip detected without the patch. [ 3.764118] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0x68 [ 3.770613] nand: Micron MT29F64G08AFAAAWP [ 3.774752] nand: 4096 MiB, SLC, erase size: 1024 KiB, page size: 8192, OOB size: 448 [ 3.786421] Bad block table found at page 524160, version 0x01 [ 3.792730] Bad block table found at page 524032, version 0x01 After applying the patch [ 3.764445] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0x68 [ 3.770941] nand: Micron MT29F64G08AFAAAWP [ 3.775080] nand: 4096 MiB, SLC, erase size: 1024 KiB, page size: 8192, OOB size: 448 [ 3.784390] nand: 2 chips detected [ 3.790900] Bad block table found at page 524160, version 0x01 [ 3.796776] Bad block table found at page 1048448, version 0x01 Signed-off-by: Han Xu Acked-by: Sascha Hauer Reviewed-by: Fabio Estevam Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201209035104.22679-2-han.xu@nxp.com commit b1209582fb08897ab9da47076d0637ed64e7a4c3 Author: Manivannan Sadhasivam Date: Thu Nov 26 14:27:05 2020 +0530 mtd: rawnand: qcom: Add NAND controller support for SDX55 SDX55 uses QPIC version 2.0.0 IP for the NAND controller support. In this version, DEV_CMD_* registers are moved to operational state, hence CPU access in BAM mode is restricted. So, skip accessing these registers and also use a different config for reading ONFI parameters. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201126085705.48399-3-manivannan.sadhasivam@linaro.org commit ce22be4307b801b4e24773c6290dd913b751d436 Author: Manivannan Sadhasivam Date: Thu Nov 26 14:27:04 2020 +0530 dt-bindings: qcom_nandc: Add SDX55 QPIC NAND documentation Qualcomm SDX55 uses QPIC NAND controller version 2.0.0 with BAM DMA Engine. Signed-off-by: Manivannan Sadhasivam Acked-by: Rob Herring Signed-off-by: Miquel Raynal commit 5e214b2554f8b8e44eed62f62196406cbfe3caa8 Author: Fabio Estevam Date: Fri Dec 4 11:58:18 2020 -0300 mtd: rawnand: mxc: Use a single line for of_device_id The .compatible and .data pairs can be stored in a single line, which makes the code more concise. Signed-off-by: Fabio Estevam Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201204145818.32739-2-festevam@gmail.com commit 5876f2d93d195be552eacefb34905b9cc8d451b0 Author: Fabio Estevam Date: Fri Dec 4 11:58:17 2020 -0300 mtd: rawnand: mxc: Use device_get_match_data() The retrieval of driver data can be a bit simplified by using device_get_match_data(), so switch to it. Signed-off-by: Fabio Estevam Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201204145818.32739-1-festevam@gmail.com commit ad8566d3555c4731e6b48823b92d3929b0394c14 Author: Dan Carpenter Date: Thu Dec 3 11:39:48 2020 +0300 mtd: rawnand: meson: Fix a resource leak in init Call clk_disable_unprepare(nfc->phase_rx) if the clk_set_rate() function fails to avoid a resource leak. Fixes: 8fae856c5350 ("mtd: rawnand: meson: add support for Amlogic NAND flash controller") Signed-off-by: Dan Carpenter Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/X8ikVCnUsfTpffFB@mwanda commit d1c3ede6a3374b8046d6b6cccdecf8645292bf39 Author: Fabio Estevam Date: Thu Nov 26 00:09:46 2020 -0300 mtd: rawnand: gpmi: Use of_device_get_match_data() The retrieval of driver data via of_device_get_match_data() can make the code simpler. Use of_device_get_match_data() to simplify the code. Signed-off-by: Fabio Estevam Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201126030946.2058-1-festevam@gmail.com commit 0b1039f016e8a37c779a4aee362cb2100ebb1cfd Author: Ramuthevar Vadivel Murugan Date: Tue Nov 10 09:23:33 2020 +0800 mtd: rawnand: Add NAND controller support on Intel LGM SoC This patch adds the new IP of Nand Flash Controller(NFC) support on Intel's Lightning Mountain(LGM) SoC. DMA is used for burst data transfer operation, also DMA HW supports aligned 32bit memory address and aligned data access by default. DMA burst of 8 supported. Data register used to support the read/write operation from/to device. Signed-off-by: Ramuthevar Vadivel Murugan Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201110012333.18647-3-vadivel.muruganx.ramuthevar@linux.intel.com commit 2f9cea8eae44f53e931bf629138b034fec86c0b7 Author: Ramuthevar Vadivel Murugan Date: Tue Nov 10 09:23:32 2020 +0800 dt-bindings: mtd: Add Nand Flash Controller support for Intel LGM SoC Add YAML file for dt-bindings to support NAND Flash Controller on Intel's Lightning Mountain SoC. Signed-off-by: Ramuthevar Vadivel Murugan Reviewed-by: Rob Herring Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201110012333.18647-2-vadivel.muruganx.ramuthevar@linux.intel.com commit 8c573d9419bf61f7b66b6114f1171f3a8a4a0e38 Author: Thirumalesha Narasimhappa Date: Sun Nov 8 19:37:35 2020 +0800 mtd: spinand: micron: Add support for MT29F2G01AAAED The MT29F2G01AAAED is a single die, 2Gb Micron SPI NAND Flash with 4-bit ECC Signed-off-by: Thirumalesha Narasimhappa Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201108113735.2533-3-nthirumalesha7@gmail.com commit bdb84a22b02b0c2ca76bb3e3e16942338f67999b Author: Thirumalesha Narasimhappa Date: Sun Nov 8 19:37:34 2020 +0800 mtd: spinand: micron: Use more specific names Rename the read/write/update of SPINAND_OP_VARIANTS() to more specialized names. Signed-off-by: Thirumalesha Narasimhappa Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201108113735.2533-2-nthirumalesha7@gmail.com commit 1b391c7f2e863985668d705f525af3ceb55bc800 Author: Zhang Qilong Date: Sat Nov 7 19:05:52 2020 +0800 mtd: rawnand: gpmi: fix reference count leak in gpmi ops pm_runtime_get_sync() will increment pm usage at first and it will resume the device later. If runtime of the device has error or device is in inaccessible state(or other error state), resume operation will fail. If we do not call put operation to decrease the reference, it will result in reference leak in the two functions(gpmi_init and gpmi_nfc_exec_op). Moreover, this device cannot enter the idle state and always stay busy or other non-idle state later. So we fixed it through adding pm_runtime_put_noidle. Fixes: 5bc6bb603b4d0 ("mtd: rawnand: gpmi: Fix suspend/resume problem") Signed-off-by: Zhang Qilong Acked-by: Han Xu Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201107110552.1568742-1-zhangqilong3@huawei.com commit 6d912c49af2434688b329db538739a733a65414c Author: Krzysztof Kozlowski Date: Thu Oct 29 17:20:21 2020 +0100 dt-bindings: mtd: gpmi-nand: Fix matching of clocks on different SoCs Driver requires different amount of clocks for different SoCs. Describe these requirements properly to fix dtbs_check warnings like: arch/arm64/boot/dts/freescale/imx8mm-beacon-kit.dt.yaml: nand-controller@33002000: clock-names:1: 'gpmi_apb' was expected Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201029162021.80839-1-krzk@kernel.org commit 5ece78de88739b4c68263e9f2582380c1fd8314f Author: YouChing Lin Date: Thu Nov 5 15:23:40 2020 +0800 mtd: spinand: macronix: Add support for MX35LFxGE4AD The Macronix MX35LF2GE4AD / MX35LF4GE4AD are 3V, 2G / 4Gbit serial SLC NAND flash device (with on-die ECC). Validated by read, erase, read back, write, read back and nandtest on Xilinx Zynq PicoZed FPGA board which included Macronix SPI Host (drivers/spi/spi-mxic.c). Signed-off-by: YouChing Lin Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/1604561020-13499-1-git-send-email-ycllin@mxic.com.tw commit 8c293f545419c0d3da9a2a70df0311aa4027a820 Author: Baskov Evgeiny Date: Fri Nov 13 19:05:37 2020 +0300 mtd: plat-ram: correctly free memory on error path in platram_probe() If an error happens in mtd_device_parse_register or mtd_device_register, memory allocated for struct platram_info is leaked. Make platram_probe() call platram_remove() on all error paths after struct platram_info allocation to correctly free resources. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Baskov Evgeiny Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201113160537.899-1-baskov@ispras.ru commit 875330f87a057a7d9831cd6a9dabf39185d15a92 Author: Thomas Gleixner Date: Fri Nov 13 15:14:22 2020 +0100 mtd: onenand: Use mtd->oops_panic_write as condition struct mtd_info has a flag oops_panic_write which is set when the write operation is issued via the panic_write() callback. That allows controller drivers to distinguish the panic write from a regular write. Replace the open coded 'in_interrupt() | oops_in_progress' checks with a check for that flag. in_interrupt() is an unrealiable indicator anyway as it covers all sorts of atomic contexts not only hard and soft interrupt service routines. Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Cc: Vignesh Raghavendra Cc: Tudor Ambarus Cc: Richard Weinberger Cc: Kyungmin Park Cc: Boris Brezillon Cc: linux-mtd@lists.infradead.org Cc: Miquel Raynal Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201113141422.2214771-1-bigeasy@linutronix.de commit 62e5c6c50992d1418eb9a6a8eaa51fa0b203b691 Author: Miquel Raynal Date: Fri Nov 13 13:41:14 2020 +0100 mtd: rawnand: marvell: Drop useless line The raw NAND core now declares the on host ECC engine being the default if none is provided in the DT. Drop this line doing exactly the same from the Marvell driver. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201113124114.449-1-miquel.raynal@bootlin.com commit b75e17b00f2c0add86524737f2842d5ec19e539a Author: Miquel Raynal Date: Fri Nov 13 13:40:45 2020 +0100 mtd: rawnand: davinci: Do not use extra dereferencing When the nand_chip structure is already available, there is no need to dereference it through the info pointer. Use the chip pointer directly in this case. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201113124045.32743-1-miquel.raynal@bootlin.com commit d59df005ed6870c4a8914489a8520b9f339ac62e Author: Miquel Raynal Date: Fri Nov 13 13:40:21 2020 +0100 mtd: rawnand: au1550: Ensure the presence of the right includes While working a bit on this driver I dropped the platform includes and commented a few lines just to verify the correctness of my changes. It appeared the following: drivers/mtd/nand/raw/au1550nd.c: In function ‘au1550nd_waitrdy’: drivers/mtd/nand/raw/au1550nd.c:130:3: error: implicit declaration of function ‘usleep_range’ [-Werror=implicit-function-declaration] usleep_range(10, 100); ^~~~~~~~~~~~ drivers/mtd/nand/raw/au1550nd.c: In function ‘au1550nd_exec_instr’: drivers/mtd/nand/raw/au1550nd.c:188:3: error: implicit declaration of function ‘ndelay’ [-Werror=implicit-function-declaration] ndelay(instr->delay_ns); ^~~~~~ I think the delay.h header should be included in this file and not come from one of its platform includes, so let's add it here. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201113124021.32675-1-miquel.raynal@bootlin.com commit 928f0736e9aa19488e030e408dde308507fe8bc1 Author: Miquel Raynal Date: Fri Nov 13 13:39:45 2020 +0100 mtd: nand: Change dependency between the NAND and ECC cores The NAND ECC core is included in the generic NAND core when it is compiled in. Different software ECC engines drivers will select the NAND ECC core and thus also have a dependency on the NAND core. Using a "depends on" between the two leads to possible cases (not real cases, but created by robots) where one is still unselected because of the "select does not verifies depends on" game: WARNING: unmet direct dependencies detected for MTD_NAND_ECC Depends on [n]: MTD [=m] && MTD_NAND_CORE [=n] Selected by [m]: - MTD_NAND_ECC_SW_HAMMING [=y] && MTD [=m] - MTD_NAND_ECC_SW_BCH [=y] && MTD [=m] Fix this by using a select instead. Reported-by: Randy Dunlap Signed-off-by: Miquel Raynal Acked-by: Randy Dunlap # build-tested Link: https://lore.kernel.org/linux-mtd/20201113123945.32592-1-miquel.raynal@bootlin.com commit 131ce3ed5dea26d5a606c2e673c022c4572d04cc Author: Miquel Raynal Date: Fri Nov 13 13:38:31 2020 +0100 docs: mtd: Avoid htmldocs warnings Moving files around produced the following warnings: Error: Cannot open file drivers/mtd/nand/raw/nand_ecc.c Error: Cannot open file drivers/mtd/nand/raw/nand_ecc.c Fix one by just dropping the reference because it is not relevant, the other by using a better noun instead of a file name. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201113123831.32429-1-miquel.raynal@bootlin.com commit 0f6b791955a6365b5ebe8b6a5b01de69a47ee92e Author: Fabio Estevam Date: Tue Nov 10 09:19:08 2020 -0300 mtd: rawnand: mxc: Remove platform data support i.MX is a devicetree-only platform now and the existing platform data support in this driver was only useful for old non-devicetree platforms. Get rid of the platform data support since it is no longer used. Signed-off-by: Fabio Estevam Reviewed-by: Sascha Hauer Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201110121908.19400-1-festevam@gmail.com commit 1f0c4ea95ed4bcb872d3751a95e51f02e2822243 Author: Yu Kuai Date: Sat Oct 31 18:54:39 2020 +0800 mtd: rawnand: ingenic: remove redundant get_device() in ingenic_ecc_get() of_find_device_by_node() already takes a reference to the device, and ingenic_ecc_release() will drop the reference. So, the get_device() in ingenic_ecc_get() is redundand. Fixes: 15de8c6efd0e("mtd: rawnand: ingenic: Separate top-level and SoC specific code") Signed-off-by: Yu Kuai Acked-by: Paul Cercueil Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201031105439.2304211-1-yukuai3@huawei.com commit 1771af5cce2d041e6cdd24521e07959691b72401 Author: Miquel Raynal Date: Fri Oct 30 18:23:33 2020 +0100 mtd: nand: ecc-hamming: Clarify the logic around rp17 This code has been written in 2008 and is fine, but in order to keep robots happy, I think it's time to change a little bit this code just to clarify the different possible values of eccsize_mult. Indeed, this variable may only take the value 1 or 2 because step_size, in the case of the software Hamming ECC engine may only be 256 or 512. Depending on the value of eccsize_mult, an extra rp17 variable is set, or not and triggers the following warning: smatch warnings: ecc_sw_hamming_calculate() error: uninitialized symbol 'rp17'. As highlighted by Dan Carpenter, if the only possible values for eccsize_mult are 1 and 2, then the code is fine, but "it's hard to tell just from looking". So instead of shifting step_size, let's use a ternary condition to assign to eccsize_mult the only two possible values and clarify the driver's logic. Now that the situation is clarified for humans, ensure rp17 is initialized to 0 to keep compilers and robots silent as well. Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201030172333.28390-1-miquel.raynal@bootlin.com commit 910ef7a4b39c39c135b4f0e80c64fc8f68226a8d Author: Manuel Dipolt Date: Mon Oct 12 17:41:22 2020 +0200 mtd: rawnand: sunxi: Add MDMA support This patch enables NAND MDMA (MBUS DMA) mode for the Allwinner SoCs A23/A33/H3. The DMA transfer method gets sets now to MBUS DMA as default for the sun8i-a23-nand-controller (till now DMA transfer was executed via the shared DMA engine). The main advantage is more bandwidth for the users of the shared DMA engine and also that the MBUS DMA setup requires less configuration effort. For example you don't need to define a dedicated DMA channel in the device-tree any more. Reviewed-by: Boris Brezillon Signed-off-by: Manuel Dipolt Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/154840787.280672.1602517282173.JavaMail.zimbra@robart.cc commit c13d845e9a69580424d40b7b101c37d4f71bcd63 Author: Sergei Antonov Date: Wed Oct 28 12:49:40 2020 +0300 mtd: rawnand: meson: fix meson_nfc_dma_buffer_release() arguments Arguments 'infolen' and 'datalen' to meson_nfc_dma_buffer_release() were mixed up. Fixes: 8fae856c53500 ("mtd: rawnand: meson: add support for Amlogic NAND flash controller") Cc: stable@vger.kernel.org Signed-off-by: Sergei Antonov Acked-by: Liang Yang Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201028094940.11765-1-saproj@gmail.com commit 7998d89875177a5fac9f963e230dbb828c218cb9 Author: Mauro Carvalho Chehab Date: Fri Oct 23 18:33:04 2020 +0200 mtd: rawnand: fix a kernel-doc markup Some identifiers have different names between their prototypes and the kernel-doc markup. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/9ed47a57d12c40e73a9b01612ee119d39baa6236.1603469755.git.mchehab+huawei@kernel.org commit 62858625441edd28c4cb4087d55c4dabf947f85b Author: Kathiravan T Date: Tue Oct 13 10:45:23 2020 +0530 mtd: rawnand: qcom: Support for IPQ6018 QPIC NAND controller Add the compatible string for IPQ6018 QPIC NAND controller version 1.5.0. It's properties are same as IPQ8074, so reuse the same. Signed-off-by: Kathiravan T Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/1602566124-13456-3-git-send-email-kathirav@codeaurora.org commit 3246cc77a9b985dd76693f4dba05cb9893143fdb Author: Kathiravan T Date: Tue Oct 13 10:45:22 2020 +0530 dt-bindings: qcom_nandc: IPQ6018 QPIC NAND documentation Add the binding for the QPIC NAND used on IPQ6018 SoC. Signed-off-by: Kathiravan T Acked-by: Rob Herring Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/1602566124-13456-2-git-send-email-kathirav@codeaurora.org commit bc3686021122de953858a5be4cbf6e3f1d821e79 Author: Praveenkumar I Date: Fri Oct 9 13:37:52 2020 +0530 mtd: rawnand: qcom: Fix DMA sync on FLASH_STATUS register read After each codeword NAND_FLASH_STATUS is read for possible operational failures. But there is no DMA sync for CPU operation before reading it and this leads to incorrect or older copy of DMA buffer in reg_read_buf. This patch adds the DMA sync on reg_read_buf for CPU before reading it. Fixes: 5bc36b2bf6e2 ("mtd: rawnand: qcom: check for operation errors in case of raw read") Cc: stable@vger.kernel.org Signed-off-by: Praveenkumar I Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/1602230872-25616-1-git-send-email-ipkumar@codeaurora.org commit efd50ff127b59d9a0f5f41ebf842d0d6ae8e4f6d Author: Marco Felsch Date: Wed Oct 7 15:45:33 2020 +0200 mtd: rawnand: gpmi: cleanup makefile The extra gpmi_nand.o object is not needed anymore since commit 3045f8e36963 ("mtd: rawnand: gpmi: move all driver code into single file"). Signed-off-by: Marco Felsch Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201007134533.31390-1-m.felsch@pengutronix.de commit a8c1dc9dc6fe081492e125cc92fc402d91f17efc Author: Miquel Raynal Date: Thu Oct 1 12:20:14 2020 +0200 mtd: spinand: Remove outdated comment This comment is no longer true so drop it. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201001102014.20100-7-miquel.raynal@bootlin.com commit 868cbe2a6dcee451bd8f87cbbb2a73cf463b57e5 Author: Miquel Raynal Date: Thu Oct 1 12:20:13 2020 +0200 mtd: spinand: Fix OOB read So far OOB have never been used in SPI-NAND, add the missing memcpy to make it work properly. Fixes: 7529df465248 ("mtd: nand: Add core infrastructure to support SPI NANDs") Cc: stable@vger.kernel.org Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201001102014.20100-6-miquel.raynal@bootlin.com commit 00c15b78b4b46bcd9253bf4ab4ef05fb746ac4af Author: Miquel Raynal Date: Thu Oct 1 12:20:12 2020 +0200 mtd: spinand: Allow the case where there is no ECC engine Even if this is not supposed to happen, there is no reason to fail the probe if it was explicitly requested to use no ECC engine at all (for instance, during development). This condition is met by just commenting out the error on the OOB free bytes count after the assignation of an ECC engine if none was provided (any other situation would error out much earlier anyway). Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201001102014.20100-5-miquel.raynal@bootlin.com commit 3d1f08b032dc4e168f3aefed1e07a63c3c080325 Author: Miquel Raynal Date: Thu Oct 1 12:20:11 2020 +0200 mtd: spinand: Use the external ECC engine logic Now that all the logic is available in the NAND core, let's use it from the SPI-NAND core. Right now there is no functional change as the default ECC engine for SPI-NANDs is set to 'on-die', but user can now use software correction if they want to by just setting the right properties in the DT. Also note that the OOB layout handling is removed from the SPI-NAND core as each ECC engine is supposed to handle it by it's own; users should not be aware of that. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201001102014.20100-4-miquel.raynal@bootlin.com commit 533af69cf1a2a6bff211d2abe44044980cc23602 Author: Miquel Raynal Date: Thu Oct 1 12:20:10 2020 +0200 dt-bindings: mtd: Deprecate nand-ecc-mode This property does not describe very well its purpose: it describes the ECC engine type. Deprecate it in favor of nand-ecc-engine which points to either the NAND part itself in case of on-die ECC, or to the parent node in case of an integrated ECC engine in the NAND controller (previously referred as "hardware") or to another node in case of an external controller. Other "modes" (none/software) are achieved with the new nand-use-soft-ecc-engine and nand-no-ecc-engine properties. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201001102014.20100-3-miquel.raynal@bootlin.com commit 6b0c3b84156125e029956e46d2b44e72f513a9fa Author: Miquel Raynal Date: Thu Oct 1 12:20:09 2020 +0200 mtd: nand: Add helpers to manage ECC engines and configurations Add the logic in the NAND core to find the right ECC engine depending on the NAND chip requirements and the user desires. Right now, the choice may be made between (more will come): * software Hamming * software BCH * on-die (SPI-NAND devices only) Once the ECC engine has been found, the ECC engine must be configured. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201001102014.20100-2-miquel.raynal@bootlin.com commit c8efe010283ae0bef8593211e39bf7e7e185b93e Author: Miquel Raynal Date: Wed Sep 30 17:41:09 2020 +0200 mtd: spinand: Fill a default ECC provider/algorithm The SPI-NAND layer default is on-die ECC because until now it was the only one supported. New SPI-NAND chip flavors might use something else as ECC engine provider but this will always be the default if the user does not choose explicitly something else. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200930154109.3922-6-miquel.raynal@bootlin.com commit da429b9615803b6f19e5734c4c4d99136e1e3bfd Author: Miquel Raynal Date: Wed Sep 30 17:41:08 2020 +0200 mtd: nand: Let on-die ECC engines be retrieved from the NAND core Before making use of the ECC engines, we must retrieve them. Add the necessary boilerplate. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200930154109.3922-5-miquel.raynal@bootlin.com commit 945845b54c9cf61809d1963492bb728ce8937964 Author: Miquel Raynal Date: Wed Sep 30 17:41:07 2020 +0200 mtd: spinand: Instantiate a SPI-NAND on-die ECC engine Make use of the existing functions taken from the SPI-NAND core to instantiate an on-die ECC engine specific to the SPI-NAND core. The next step will be to tweak the core to use this object instead of calling the helpers directly. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200930154109.3922-4-miquel.raynal@bootlin.com commit 55a1a71a7f5d9a85dbe9d2ab4d67208f49cba522 Author: Miquel Raynal Date: Wed Sep 30 17:41:06 2020 +0200 mtd: spinand: Move ECC related definitions earlier in the driver Prepare the creation of a SPI-NAND on-die ECC engine by gathering the ECC-related code earlier enough in the core to avoid the need for forward declarations. The next step is to actually create that engine by implementing the generic ECC interface. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200930154109.3922-3-miquel.raynal@bootlin.com commit 93afb10e226ec13619a48096ef095c2b1fec3f32 Author: Miquel Raynal Date: Wed Sep 30 17:41:05 2020 +0200 mtd: spinand: Fix typo in comment One comment in the SPI-NAND core is not very clear, fix it to ease the understanding of what the block does. Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon Link: https://lore.kernel.org/linux-mtd/20200930154109.3922-2-miquel.raynal@bootlin.com commit 53fbdeeb57a0168a88547e22f8d433810c531169 Author: Miquel Raynal Date: Wed Sep 30 01:01:24 2020 +0200 mtd: nand: Let software ECC engines be retrieved from the NAND core Before making use of the ECC engines, we must retrieve them. Add the boilerplate for the ones already available: software engines (Hamming and BCH). Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200929230124.31491-21-miquel.raynal@bootlin.com commit 35fe1b98a0082ad3f576bcc420c74dab435da307 Author: Miquel Raynal Date: Wed Sep 30 01:01:23 2020 +0200 mtd: nand: ecc-hamming: Create the software Hamming engine Let's continue introducing the generic ECC engine abstraction in the NAND subsystem by instantiating a second ECC engine: software Hamming. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200929230124.31491-20-miquel.raynal@bootlin.com commit 5180a62c12497aa491a7c79c062a9e3a884c9762 Author: Miquel Raynal Date: Wed Sep 30 01:01:22 2020 +0200 mtd: nand: ecc-hamming: Let the software Hamming ECC engine be unselected There is no reason to always embed the software Hamming ECC engine implementation. By default it is (with raw NAND), but we can let the user decide. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200929230124.31491-19-miquel.raynal@bootlin.com commit eb08376a5dd943cf2a7360f236fe20bbd709fa95 Author: Miquel Raynal Date: Wed Sep 30 01:01:21 2020 +0200 mtd: nand: ecc-hamming: Remove useless includes Most of the includes are simply useless, drop them. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200929230124.31491-18-miquel.raynal@bootlin.com commit 19b2ce184b9f404d6620adf667a9019e6abcae51 Author: Miquel Raynal Date: Wed Sep 30 01:01:20 2020 +0200 mtd: nand: ecc-hamming: Stop using raw NAND structures This code is meant to be reused by the SPI-NAND core. Now that the driver has been cleaned and reorganized, use a generic ECC engine object to store the driver's data instead of accessing members of the nand_chip structure. This means adding proper init/cleanup helpers. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200929230124.31491-17-miquel.raynal@bootlin.com commit 90ccf0a0192f7fa06e52de80cb528c5217e3e297 Author: Miquel Raynal Date: Wed Sep 30 01:01:19 2020 +0200 mtd: nand: ecc-hamming: Rename the exported functions Prefix by ecc_sw_hamming_ the functions which should be internal only but are exported for "raw" operations. Prefix by nand_ecc_sw_hamming_ the other functions which will be used in the context of the declaration of an Hamming proper ECC engine object. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200929230124.31491-16-miquel.raynal@bootlin.com commit b551fa3059ffc64d92d6d862c0045c1fd2dc2f31 Author: Miquel Raynal Date: Wed Sep 30 01:01:18 2020 +0200 mtd: nand: ecc-hamming: Cleanup and style fixes Various style fixes. There is not functional change. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200929230124.31491-15-miquel.raynal@bootlin.com commit c50e7f3c86730c7de00209542899795199a4066c Author: Miquel Raynal Date: Wed Sep 30 01:01:17 2020 +0200 mtd: nand: ecc-hamming: Drop/fix the kernel doc Some functions should never have been exported (the ones prefixed by __*), in this case simply drop the documentation, we never want anybody to use this function from the outside. For the other functions, enhance the style. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200929230124.31491-14-miquel.raynal@bootlin.com commit 2dbe0192efa02f2f405e193f4de84bf07c7f91fb Author: Miquel Raynal Date: Wed Sep 30 01:01:16 2020 +0200 mtd: nand: ecc-hamming: Clarify the driver descriptions The include file pretends being the header for "ECC algorithm", while it is just the header for the Hamming implementation. Make this clear by rewording the sentence. Do the same with the module description. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200929230124.31491-13-miquel.raynal@bootlin.com commit e5acf9c862974041f7b2f581d1a40ccd29769add Author: Miquel Raynal Date: Wed Sep 30 01:01:15 2020 +0200 mtd: nand: ecc-hamming: Move Hamming code to the generic NAND layer Hamming ECC code might be later re-used by the SPI NAND layer. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200929230124.31491-12-miquel.raynal@bootlin.com commit cbd87780bed580b585d2992f29077ac44950cb66 Author: Miquel Raynal Date: Wed Sep 30 01:01:14 2020 +0200 mtd: rawnand: Get rid of chip->ecc.priv nand_ecc_ctrl embeds a private pointer which only has a meaning in the sunxi driver. This structure will soon be deprecated, but as this field is actually not needed, let's just drop it. Cc: Maxime Ripard Cc: Chen-Yu Tsai Signed-off-by: Miquel Raynal Acked-by: Maxime Ripard Link: https://lore.kernel.org/linux-mtd/20200929230124.31491-11-miquel.raynal@bootlin.com commit 9994bb3f36e3d181d9f0a078609038080cfd7a3d Author: Miquel Raynal Date: Wed Sep 30 01:01:13 2020 +0200 mtd: nand: ecc-bch: Create the software BCH engine Let's continue introducing the generic ECC engine abstraction in the NAND subsystem by instantiating a first ECC engine: the software BCH one. While at it, make a very tidy ecc_sw_bch_init() function and move all the sanity checks and user input management in nand_ecc_sw_bch_init_ctx(). This second helper will be called from the raw RAND core. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200929230124.31491-10-miquel.raynal@bootlin.com commit 51e13685bd93654e0e9b2559c8e103d6545ddf95 Author: Jakub Kicinski Date: Wed Dec 9 18:16:08 2020 -0800 rtnetlink: RCU-annotate both dimensions of rtnl_msg_handlers We use rcu_assign_pointer to assign both the table and the entries, but the entries are not marked as __rcu. This generates sparse warnings. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 1d608d2e0d51df7cb592bc9c7a77a534ff71dd94 Author: Willy Tarreau Date: Wed Dec 9 19:47:40 2020 +0100 Revert "macb: support the two tx descriptors on at91rm9200" This reverts commit 0a4e9ce17ba77847e5a9f87eed3c0ba46e3f82eb. The code was developed and tested on an MSC313E SoC, which seems to be half-way between the AT91RM9200 and the AT91SAM9260 in that it supports both the 2-descriptors mode and a Tx ring. It turns out that after the code was merged I could notice that the controller would sometimes lock up, and only when dealing with sustained bidirectional transfers, in which case it would report a Tx overrun condition right after having reported being ready, and will stop sending even after the status is cleared (a down/up cycle fixes it though). After adding lots of traces I couldn't spot a sequence pattern allowing to predict that this situation would happen. The chip comes with no documentation and other bits are often reported with no conclusive pattern either. It is possible that my change is wrong just like it is possible that the controller on the chip is bogus or at least unpredictable based on existing docs from other chips. I do not have an RM9200 at hand to test at the moment and a few tests run on a more recent 9G20 indicate that this code path cannot be used there to test the code on a 3rd platform. Since the MSC313E works fine in the single-descriptor mode, and that people using the old RM9200 very likely favor stability over performance, better revert this patch until we can test it on the original platform this part of the driver was written for. Note that the reverted patch was actually tested on MSC313E. Cc: Nicolas Ferre Cc: Claudiu Beznea Cc: Daniel Palmer Cc: Alexandre Belloni Link: https://lore.kernel.org/netdev/20201206092041.GA10646@1wt.eu/ Signed-off-by: Willy Tarreau Signed-off-by: David S. Miller commit b7f5eb6ba21b0b54b04918fc9df13309ff3c67b8 Author: Subash Abhinov Kasiviswanathan Date: Wed Dec 9 22:51:46 2020 -0700 net: qualcomm: rmnet: Update rmnet device MTU based on real device Packets sent by rmnet to the real device have variable MAP header lengths based on the data format configured. This patch adds checks to ensure that the real device MTU is sufficient to transmit the MAP packet comprising of the MAP header and the IP packet. This check is enforced when rmnet devices are created and updated and during MTU updates of both the rmnet and real device. Additionally, rmnet devices now have a default MTU configured which accounts for the real device MTU and the headroom based on the data format. Signed-off-by: Sean Tranchetti Signed-off-by: Subash Abhinov Kasiviswanathan Tested-by: Loic Poulain Signed-off-by: David S. Miller commit 0af6e21eed2778e68139941389460e2a00d6ef8e Author: Alexander Lobakin Date: Thu Nov 19 21:26:33 2020 +0000 PCI: Keep both device and resource name for config space remaps Follow the rule taken in commit 35bd8c07db2c ("devres: keep both device name and resource name in pretty name") and keep both device and resource names while requesting memory regions for PCI config space to prettify e.g. /proc/iomem output: Before (DWC Host Controller): 18b00000-18b01fff : dbi 18b10000-18b11fff : config 18b20000-18b21fff : dbi 18b30000-18b31fff : config After: 18b00000-18b01fff : 18b00000.pci dbi 18b10000-18b11fff : 18b00000.pci config 18b20000-18b21fff : 18b20000.pci dbi 18b30000-18b31fff : 18b20000.pci config Link: https://lore.kernel.org/r/WbKfdybjZ6xNIUjcC5oC8NcuLqrJfkxQAlnO80ag@cp3-web-020.plabs.ch Signed-off-by: Alexander Lobakin Signed-off-by: Bjorn Helgaas commit 3b0c860f872da622a39707bda11064395199836f Author: Xie He Date: Tue Dec 8 14:50:44 2020 -0800 net: lapbether: Consider it successful if (dis)connecting when already (dis)connected When the upper layer instruct us to connect (or disconnect), but we have already connected (or disconnected), consider this operation successful rather than failed. This can help the upper layer to correct its record about whether we are connected or not here in layer 2. The upper layer may not have the correct information about whether we are connected or not. This can happen if this driver has already been running for some time when the "x25" module gets loaded. Another X.25 driver (hdlc_x25) is already doing this, so we make this driver do this, too. Cc: Martin Schiller Signed-off-by: Xie He Acked-by: Martin Schiller Signed-off-by: David S. Miller commit bfa5e98c9de466bfe25a9b4bf6ef9122aee2d06a Author: Sasha Neftin Date: Thu Dec 10 11:08:12 2020 -0800 igc: Add new device ID Add new device ID for the next step of the silicon and reflect the I226_K part. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Tony Nguyen Signed-off-by: David S. Miller commit e0fecb289ad3fd2245cdc50bf450b97fcca39884 Author: Arjun Roy Date: Thu Dec 10 11:16:03 2020 -0800 tcp: correctly handle increased zerocopy args struct size A prior patch increased the size of struct tcp_zerocopy_receive but did not update do_tcp_getsockopt() handling to properly account for this. This patch simply reintroduces content erroneously cut from the referenced prior patch that handles the new struct size. Fixes: 18fb76ed5386 ("net-zerocopy: Copy straggler unaligned data for TCP Rx. zerocopy.") Signed-off-by: Arjun Roy Signed-off-by: Eric Dumazet Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller commit 6ae9b5ffcaeba64c290dfb8bd7b0194b1fdf0c92 Author: Prashant Malani Date: Thu Nov 5 18:03:05 2020 -0800 platform/chrome: cros_ec_typec: Tolerate unrecognized mux flags On occasion, the Chrome Embedded Controller (EC) can send a mux configuration which doesn't map to a particular data mode. For instance, dedicated Type C chargers, when connected, may cause only USB_PD_MUX_POLARITY_INVERTED to be set. This is a valid flag combination and should not lead to a driver abort. Modify the mux configuration handling to not return an error when an unrecognized mux flag combination is encountered. Concordantly, make the ensuing print a debug level print so as to not pollute the kernel logs. Cc: Keith Short Signed-off-by: Prashant Malani Acked-by: Heikki Krogerus Signed-off-by: Benson Leung Link: https://lore.kernel.org/r/20201106020305.767202-1-pmalani@chromium.org commit a76b6b1fe8312905e3f91279f93a4c0cf3b1707c Author: Zheng Yongjun Date: Thu Dec 10 21:50:50 2020 +0800 net: mediatek: simplify the return expression of mtk_gmac_sgmii_path_setup() Simplify the return expression. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit b18cac546be3844471807e73b7e50e7f2ef7bf98 Author: Zheng Yongjun Date: Thu Dec 10 21:50:00 2020 +0800 net/mlx4: simplify the return expression of mlx4_init_srq_table() Simplify the return expression. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit fdc9b0191191e4a7c27aa9fbc0bb1de248f5019c Merge: 3650b228f83ad f5c50b1fed553 Author: Stephen Boyd Date: Thu Dec 10 12:59:43 2020 -0800 Merge tag 'renesas-clk-for-v5.11-tag3' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into clk-renesas Pull Renesas clk driver updates from Geert Uytterhoeven: - Update git repo branch for Renesas clock drivers - Add camera (CSI) and video-in (VIN) clocks on R-Car V3U - Add RPC (QSPI/HyperFLASH) clocks on RZ/G2M, RZ/G2N, and RZ/G2E - Stop using __raw_*() I/O accessors - One more conversion of DT bindings to json-schema - Minor fixes and improvements * tag 'renesas-clk-for-v5.11-tag3' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: dt-bindings: clock: renesas: rcar-usb2-clock-sel: Convert bindings to json-schema clk: renesas: sh73a0: Stop using __raw_*() I/O accessors clk: renesas: r8a774c0: Add RPC clocks clk: renesas: r8a779a0: Fix R and OSC clocks clk: renesas: cpg-mssr: fix kerneldoc of cpg_mssr_priv clk: renesas: rcar-usb2-clock-sel: Replace devm_reset_control_array_get() clk: renesas: r8a774b1: Add RPC clocks clk: renesas: r8a774a1: Add RPC clocks clk: renesas: r8a779a0: Add VIN clocks clk: renesas: r8a779a0: Add CSI4[0-3] clocks MAINTAINERS: Update git repo for Renesas clock drivers clk: renesas: r8a779a0: Make rcar_r8a779a0_cpg_clk_register() static clk: renesas: rcar-gen3: Remove stp_ck handling for SDHI commit ec73c31dfbfdb4c4eb4e0808ea9d3cdae04e8f99 Author: Zheng Yongjun Date: Thu Dec 10 21:48:33 2020 +0800 net: stmmac: simplify the return tc_delete_knode() Simplify the return expression. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit 6f320f6990ee2dd13df89707f1a219ecfe2960ad Author: Vladimir Oltean Date: Tue Dec 8 21:39:28 2020 +0200 RDMA/mlx4: Remove bogus dev_base_lock usage It is not clear what this lock protects. If the authors wanted to ensure that "dev" does not disappear, that is impossible, given the following code path: mlx4_ib_netdev_event (under RTNL mutex) -> mlx4_ib_scan_netdevs -> mlx4_ib_update_qps Also, the dev_base_lock does not protect dev->dev_addr either. So it serves no purpose here. Remove it. Link: https://lore.kernel.org/r/20201208193928.1500893-1-vladimir.oltean@nxp.com Reviewed-by: Leon Romanovsky Signed-off-by: Vladimir Oltean Signed-off-by: Jason Gunthorpe commit cddadae9748c3c056eb9f0d4b0edfffd0166dd68 Author: Krzysztof Wilczyński Date: Sun Nov 29 23:07:43 2020 +0000 PCI: xgene: Removed unused ".bus_shift" initialisers from pci-xgene.c Removed unused ".bus_shift" initialisers from pci-xgene.c as xgene_pcie_map_bus() did not use these. Suggested-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20201129230743.3006978-6-kw@linux.com Signed-off-by: Krzysztof Wilczyński Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas commit ce0602990fb762d53dd06167faedcd58d177199b Author: Krzysztof Wilczyński Date: Sun Nov 29 23:07:42 2020 +0000 PCI: vmd: Update type of the __iomem pointers Use "void __iomem" instead "char __iomem" pointer type when working with the accessor functions (with names like readb() or writel(), etc.) to better match a given accessor function signature where commonly the address pointing to an I/O memory region would be a "void __iomem" pointer. Related: https://lwn.net/Articles/102232/ Suggested-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20201129230743.3006978-5-kw@linux.com Signed-off-by: Krzysztof Wilczyński Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Jon Derrick commit 63eab4944e4f33f69a6a72427490c4d5f8d3f072 Author: Krzysztof Wilczyński Date: Sun Nov 29 23:07:41 2020 +0000 PCI: iproc: Convert to use the new ECAM constants Change interface of the function iproc_pcie_map_ep_cfg_reg() so that use of PCI_SLOT() and PCI_FUNC() macros and most of the local ECAM-specific constants can be dropped, and the new PCIE_ECAM_OFFSET() macro can be used instead. Use the ALIGN_DOWN() macro to ensure that PCI Express ECAM offset is always 32 bit aligned. Suggested-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20201129230743.3006978-4-kw@linux.com Signed-off-by: Krzysztof Wilczyński Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas commit 31a8cdb7ef8042a63fcb2ae3856df28af15abc8f Author: Krzysztof Wilczyński Date: Sun Nov 29 23:07:40 2020 +0000 PCI: thunder-pem: Add constant for custom ".bus_shift" initialiser Add a custom constant for the ".bus_shift" initialiser to capture a non-standard platform-specific ECAM bus shift value. Standard values otherwise defined in the PCI Express Specification are available in the include/linux/pci-ecam.h. Suggested-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20201129230743.3006978-3-kw@linux.com Signed-off-by: Krzysztof Wilczyński Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas commit e7708f5b10e205d6291bb495e645a03553b9768b Author: Krzysztof Wilczyński Date: Sun Nov 29 23:07:39 2020 +0000 PCI: Unify ECAM constants in native PCI Express drivers Add ECAM-related constants to provide a set of standard constants defining memory address shift values to the byte-level address that can be used to access the PCI Express Configuration Space, and then move native PCI Express controller drivers to use the newly introduced definitions retiring driver-specific ones. Refactor pci_ecam_map_bus() function to use newly added constants so that limits to the bus, device function and offset (now limited to 4K as per the specification) are in place to prevent the defective or malicious caller from supplying incorrect configuration offset and thus targeting the wrong device when accessing extended configuration space. This refactor also allows for the ".bus_shift" initialisers to be dropped when the user is not using a custom value as a default value will be used as per the PCI Express Specification. Thanks to Qian Cai , Michael Walle , and Vladimir Oltean for reporting a pci_ecam_create() issue with .bus_shift and to Vladimir for proposing the fix. [bhelgaas: incorporate Vladimir's fix, update commit log] Suggested-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20201129230743.3006978-2-kw@linux.com Tested-by: Michael Walle Signed-off-by: Krzysztof Wilczyński Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Jon Derrick Reviewed-by: Bjorn Helgaas commit 958879d0d7f90f716efe81d55e0d66d862b0e06d Merge: 3650b228f83ad 43d2479687c93 Author: Stephen Boyd Date: Thu Dec 10 12:53:31 2020 -0800 Merge tag 'clk-imx-5.11' 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 improve clk-gate2 driver and make it more flexible. - A patch set from Dong Aisheng to add a new two cells binding for SCU clocks, so that IMX SCU based platforms like MX8QM and MX8QXP can be supported with SS (Subsystems). - Drop of_match_ptr from of_device_id table for i.MX8 clock drivers, as they can only be probed from device tree. - Other small cosmetic changes. * tag 'clk-imx-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (24 commits) clk: imx: scu: remove the calling of device_is_bound clk: imx: scu: Make pd_np with static keyword clk: imx8mq: drop of_match_ptr from of_device_id table clk: imx8mp: drop of_match_ptr from of_device_id table clk: imx8mn: drop of_match_ptr from of_device_id table clk: imx8mm: drop of_match_ptr from of_device_id table clk: imx: gate2: Remove unused variable ret clk: imx: gate2: Add locking in is_enabled op clk: imx: gate2: Add cgr_mask for more flexible number of control bits clk: imx: gate2: Check if clock is enabled against cgr_val clk: imx: gate2: Keep the register writing in on place clk: imx: gate2: Remove the IMX_CLK_GATE2_SINGLE_BIT special case clk: imx: scu: fix build break when compiled as modules clk: imx: remove redundant assignment to pointer np clk: imx: remove unneeded semicolon clk: imx: lpcg: add suspend/resume support clk: imx: clk-imx8qxp-lpcg: add runtime pm support clk: imx: lpcg: allow lpcg clk to take device pointer clk: imx: imx8qxp-lpcg: add parsing clocks from device tree clk: imx: scu: add suspend/resume support ... commit 5bf5861d6ea6c3f4b38fc8fda2062b2dc44ac63d Author: Dmitry Osipenko Date: Mon Oct 26 01:42:12 2020 +0300 clk: tegra: Fix duplicated SE clock entry The periph_clks[] array contains duplicated entry for Security Engine clock which was meant to be defined for T210, but it wasn't added properly. This patch corrects the T210 SE entry and fixes the following error message on T114/T124: "Tegra clk 127: register failed with -17". Fixes: dc37fec48314 ("clk: tegra: periph: Add new periph clks and muxes for Tegra210") Tested-by Nicolas Chauvet Reported-by Nicolas Chauvet Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20201025224212.7790-1-digetx@gmail.com Acked-by: Thierry Reding Signed-off-by: Stephen Boyd commit c7dd222053c4ab1e22412f3a8157680a67fe0570 Merge: a10b24b83242c ee42bedc85a6e Author: David S. Miller Date: Thu Dec 10 12:49:45 2020 -0800 Merge tag 'linux-can-next-for-5.11-20201210' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== pull-request: can-next 2020-12-10 here's a pull request of 7 patches for net-next/master. The first patch is by Oliver Hartkopp for the CAN ISOTP, which adds support for functional addressing. A patch by Antonio Quartulli removes an unneeded unlikely() annotation from the rx-offload helper. The next three patches target the m_can driver. Sean Nyekjaers's patch removes a double clearing of clock stop request bit, Patrik Flykt's patch moves the runtime PM enable/disable to m_can_platform and Jarkko Nikula's patch adds a PCI glue code driver. Fabio Estevam's patch converts the flexcan driver to DT only. And Manivannan Sadhasivam's patchd for the mcp251xfd driver adds internal loopback mode support. ==================== Signed-off-by: David S. Miller commit f7b36cc19efb4765467af7cce3a91269fbb529b1 Author: Vinod Koul Date: Tue Dec 8 12:16:59 2020 +0530 clk: qcom: rpmh: add support for SM8350 rpmh clocks This adds the RPMH clocks present in SM8350 SoC Reviewed-by: Bjorn Andersson Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20201208064702.3654324-3-vkoul@kernel.org [sboyd@kernel.org: Move sdx55 to the right place] Signed-off-by: Stephen Boyd commit a697f072f5da8d75467be81bec918eb479405615 Author: David E. Box Date: Mon Dec 7 14:39:51 2020 -0800 PCI: Disable PTM during suspend to save power There are systems (for example, Intel based mobile platforms since Coffee Lake) where the power drawn while suspended can be significantly reduced by disabling Precision Time Measurement (PTM) on PCIe root ports as this allows the port to enter a lower-power PM state and the SoC to reach a lower-power idle state. To save this power, disable the PTM feature on root ports during pci_prepare_to_sleep() and pci_finish_runtime_suspend(). The feature will be returned to its previous state during restore and error recovery. Suggested-by: Rafael J. Wysocki Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=209361 Link: https://lore.kernel.org/r/20201207223951.19667-2-david.e.box@linux.intel.com Reported-by: Len Brown Signed-off-by: David E. Box Signed-off-by: Bjorn Helgaas commit eb50f3f42cb6de3820736206ac5019583f6856b1 Author: Vinod Koul Date: Tue Dec 8 12:16:58 2020 +0530 dt-bindings: clock: Add RPMHCC bindings for SM8350 Add bindings and update documentation for clock rpmh driver on SM8350. Reviewed-by: Bjorn Andersson Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20201208064702.3654324-2-vkoul@kernel.org Acked-by: Rob Herring Signed-off-by: Stephen Boyd commit 39850ed51062f89cd46214a16aaafba5ca49fd6c Author: David E. Box Date: Mon Dec 7 14:39:50 2020 -0800 PCI/PTM: Save/restore Precision Time Measurement Capability for suspend/resume The PCI subsystem does not currently save and restore the configuration space for the Precision Time Measurement (PTM) Extended Capability leading to the possibility of the feature returning disabled on S3 resume. This has been observed on Intel Coffee Lake desktops. Add save/restore of the PTM control register. This saves the PTM Enable, Root Select, and Effective Granularity bits. Suggested-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20201207223951.19667-1-david.e.box@linux.intel.com Signed-off-by: David E. Box Signed-off-by: Bjorn Helgaas commit a10b24b83242c8f2a9813d7919a711b42d07f71d Author: Antonio Quartulli Date: Thu Dec 10 09:55:49 2020 +0100 vxlan: avoid double unlikely() notation when using IS_ERR() The definition of IS_ERR() already applies the unlikely() notation when checking the error status of the passed pointer. For this reason there is no need to have the same notation outside of IS_ERR() itself. Clean up code by removing redundant notation. Signed-off-by: Antonio Quartulli Signed-off-by: David S. Miller commit ce8c195e652fa69f669789de37712a519b09155f Author: Taniya Das Date: Fri Nov 20 22:10:17 2020 +0530 clk: qcom: lpasscc: Introduce pm autosuspend for SC7180 The LPASSCC driver's suspend/resume is invoked multiple number of times and thus allow the device to autosuspend for 500ms. Signed-off-by: Taniya Das Link: https://lore.kernel.org/r/1605890417-721-1-git-send-email-tdas@codeaurora.org Signed-off-by: Stephen Boyd commit 043577518f027544e8f9e9568140a1fe87ee01a0 Author: Douglas Anderson Date: Thu Dec 10 10:22:39 2020 -0800 clk: qcom: gcc-sc7180: Add 50 MHz clock rate for SDC2 50 MHz is an incredibly common clock rate for SD cards to run at. It's "high speed" mode in SD (not very fast these days, but it used to be) or: #define HIGH_SPEED_MAX_DTR 50000000 If we don't support this then older "high speed" cards can only run at 25 MHz or at half their normal speed. There doesn't seem to be any reason to skip this clock rate, so add it. Fixes: 17269568f726 ("clk: qcom: Add Global Clock controller (GCC) driver for SC7180") Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20201210102234.2.I26dcc0cee374f5571d9929c9985f463773167e68@changeid Reviewed-by: Bjorn Andersson Signed-off-by: Stephen Boyd commit 6d37a8d192830267e6b10a6d57ae28d2e89097e7 Author: Douglas Anderson Date: Thu Dec 10 10:22:38 2020 -0800 clk: qcom: gcc-sc7180: Use floor ops for sdcc clks I would repeat the same commit message that was in commit 5e4b7e82d497 ("clk: qcom: gcc-sdm845: Use floor ops for sdcc clks") but it seems silly to do so when you could just go read that commit. NOTE: this is actually extra terrible because we're missing the 50 MHz rate in the table (see the next patch AKA ("clk: qcom: gcc-sc7180: Add 50 MHz clock rate for SDC2")). That means then when you run an older SD card it'll try to clock it at 100 MHz when it's only specced to run at 50 MHz max. As you can probably guess that doesn't work super well. Signed-off-by: Douglas Anderson Fixes: 17269568f726 ("clk: qcom: Add Global Clock controller (GCC) driver for SC7180") Link: https://lore.kernel.org/r/20201210102234.1.I096779f219625148900fc984dd0084ed1ba87c7f@changeid Signed-off-by: Stephen Boyd commit 975d25cbb505e92644de2e603965bb5e17215012 Author: Krzysztof Kozlowski Date: Tue Nov 3 17:24:35 2020 +0100 clk: scpi: mark scpi_clk_match as maybe unused The scpi_clk_match (struct of_device_id) is referenced only with CONFIG_OF builds thus mark it as __maybe_unused: drivers/clk/clk-scpi.c:132:34: warning: ‘scpi_clk_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201103162435.13689-8-krzk@kernel.org Acked-by: Sudeep Holla Signed-off-by: Stephen Boyd commit 967069aa4de65fc525c67b4b7b72b6ded6bd92a0 Author: Krzysztof Kozlowski Date: Tue Nov 3 17:24:28 2020 +0100 clk: pwm: drop of_match_ptr from of_device_id table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might be not relevant here). This fixes compile warning (!CONFIG_OF && !CONFIG_MODULES): drivers/clk/clk-pwm.c:139:34: warning: ‘clk_pwm_dt_ids’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201103162435.13689-1-krzk@kernel.org Signed-off-by: Stephen Boyd commit bfbccd70eee93c059e22d0d233f57cc164f03687 Author: Yash Shah Date: Tue Dec 8 10:25:38 2020 +0530 dt-bindings: i2c: Update DT binding docs to support SiFive FU740 SoC Add new compatible strings to the DT binding documents to support SiFive FU740-C000. Signed-off-by: Yash Shah Reviewed-by: Rob Herring Signed-off-by: Wolfram Sang commit cbfa5b3987c42fe5cd25747aee4fe654b1092fab Author: Aswath Govindraju Date: Wed Dec 9 22:27:33 2020 +0530 dt-bindings: i2c: Add compatible string for AM64 SoC Add compatible string for AM64 SoC in device tree binding of OMAP I2C modules as the same IP is used. Signed-off-by: Aswath Govindraju Acked-by: Rob Herring Signed-off-by: Wolfram Sang commit 343dbdb7cb8997a2cb0fd804d6563b8a6de8d49b Author: Gerald Schaefer Date: Tue Dec 8 19:47:15 2020 +0100 s390/mm: add support to allocate gigantic hugepages using CMA Commit cf11e85fc08c ("mm: hugetlb: optionally allocate gigantic hugepages using cma") added support for allocating gigantic hugepages using CMA, by specifying the hugetlb_cma= kernel parameter, which will disable any boot-time allocation of gigantic hugepages. This patch enables that option also for s390. Signed-off-by: Gerald Schaefer Signed-off-by: Heiko Carstens commit ff98cc986ae883eec5f26af72d4e2406612fe683 Author: Harald Freudenberger Date: Thu Dec 3 15:02:08 2020 +0100 s390/crypto: add arch_get_random_long() support The random longs to be pulled by arch_get_random_long() are prepared in an 4K buffer which is filled from the NIST 800-90 compliant s390 drbg. By default the random long buffer is refilled 256 times before the drbg itself needs a reseed. The reseed of the drbg is done with 32 bytes fetched from the high quality (but slow) trng which is assumed to deliver 100% entropy. So the 32 * 8 = 256 bits of entropy are spread over 256 * 4KB = 1MB serving 131072 arch_get_random_long() invocations before reseeded. How often the 4K random long buffer is refilled with the drbg before the drbg is reseeded can be adjusted. There is a module parameter 's390_arch_rnd_long_drbg_reseed' accessible via /sys/module/arch_random/parameters/rndlong_drbg_reseed or as kernel command line parameter arch_random.rndlong_drbg_reseed= This parameter tells how often the drbg fills the 4K buffer before it is re-seeded by fresh entropy from the trng. A value of 16 results in reseeding the drbg at every 16 * 4 KB = 64 KB with 32 bytes of fresh entropy pulled from the trng. So a value of 16 would result in 256 bits entropy per 64 KB. A value of 256 results in 1MB of drbg output before a reseed of the drbg is done. So this would spread the 256 bits of entropy among 1MB. Setting this parameter to 0 forces the reseed to take place every time the 4K buffer is depleted, so the entropy rises to 256 bits entropy per 4K or 0.5 bit entropy per arch_get_random_long(). With setting this parameter to negative values all this effort is disabled, arch_get_random long() returns false and thus indicating that the arch_get_random_long() feature is disabled at all. arch_get_random_long() is used by random.c among others to provide an initial hash value to be mixed with the entropy pool on every random data pull. For about 64 bytes read from /dev/urandom there is one call to arch_get_random_long(). So these additional random long values count for performance of /dev/urandom with measurable but low penalty. Signed-off-by: Harald Freudenberger Reviewed-by: Ingo Franzki Reviewed-by: Juergen Christ Signed-off-by: Heiko Carstens commit c3e9b463b41b45c4556a13043265097e2184226e Author: Baolin Wang Date: Mon Jun 8 20:20:28 2020 +0800 hwspinlock: sirf: Remove the redundant 'of_match_ptr' Remove the the redundant 'of_match_ptr' macro to fix below warning when the CONFIG_OF is not selected. All warnings: drivers/hwspinlock/sirf_hwspinlock.c:87:34: warning: unused variable 'sirf_hwpinlock_ids' [-Wunused-const-variable] Reported-by: kernel test robot Signed-off-by: Baolin Wang Link: https://lore.kernel.org/r/250d35cb489c3c4c066f7ce256d27f36712a1979.1591618255.git.baolin.wang7@gmail.com Signed-off-by: Bjorn Andersson commit 3efa0ea743b77d1611501f7d8b4f320d032d73ae Author: Tzung-Bi Shih Date: Wed Dec 2 12:46:09 2020 +0800 remoteproc/mediatek: read IPI buffer offset from FW Reads the IPI buffer offset from the FW binary. The information resides in addr of .ipi_buffer section. Moves scp_ipi_init() to rproc_ops::parse_fw() phase. The IPI buffer can be initialized only if the offset is clear. To backward compatible to MT8183 SCP, specify the offset in the board specific mtk_scp_of_data. Reads the default offset if the firmware doesn't have it. Reviewed-by: Mathieu Poirier Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20201202044609.2501913-1-tzungbi@google.com Signed-off-by: Bjorn Andersson commit 22c3df6f5574c8d401ea431c7ce24e7c5c5e7ef3 Author: Tzung-Bi Shih Date: Thu Dec 3 23:59:14 2020 +0800 remoteproc/mediatek: unprepare clk if scp_before_load fails Fixes the error handling to unprepare clk if scp_before_load fails. Reviewed-by: Mathieu Poirier Fixes: fd0b6c1ff85a ("remoteproc/mediatek: Add support for mt8192 SCP") Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20201203155914.3844426-1-tzungbi@google.com Signed-off-by: Bjorn Andersson commit c3d4e5b12672bbdf63f4cc933e3169bc6bbec8da Author: Zhang Changzhong Date: Tue Dec 8 09:54:20 2020 +0800 remoteproc: qcom: Fix potential NULL dereference in adsp_init_mmio() platform_get_resource() may fail and in this case a NULL dereference will occur. Fix it to use devm_platform_ioremap_resource() instead of calling platform_get_resource() and devm_ioremap(). This is detected by Coccinelle semantic patch. @@ expression pdev, res, n, t, e, e1, e2; @@ res = \(platform_get_resource\|platform_get_resource_byname\)(pdev, t, n); + if (!res) + return -EINVAL; ... when != res == NULL e = devm_ioremap(e1, res->start, e2); Fixes: dc160e449122 ("remoteproc: qcom: Introduce Non-PAS ADSP PIL driver") Signed-off-by: Zhang Changzhong Link: https://lore.kernel.org/r/1607392460-20516-1-git-send-email-zhangchangzhong@huawei.com Signed-off-by: Bjorn Andersson commit cca21000261b2364991ecdb0d9e66b26ad9c4b4e Author: Souptick Joarder Date: Sat Nov 28 03:20:55 2020 +0530 remoteproc/mediatek: Fix kernel test robot warning Kernel test robot throws below warning -> >> drivers/remoteproc/mtk_scp.c:755:37: warning: unused variable >> 'mt8183_of_data' [-Wunused-const-variable] static const struct mtk_scp_of_data mt8183_of_data = { ^ >> drivers/remoteproc/mtk_scp.c:765:37: warning: unused variable >> 'mt8192_of_data' [-Wunused-const-variable] static const struct mtk_scp_of_data mt8192_of_data = { ^ As suggested by Bjorn, there's no harm in just dropping the of_match_ptr() wrapping of mtk_scp_of_match in the definition of mtk_scp_driver and we avoid this whole problem. Reported-by: kernel test robot Suggested-by: Bjorn Andersson Signed-off-by: Souptick Joarder Link: https://lore.kernel.org/r/1606513855-21130-1-git-send-email-jrdr.linux@gmail.com Signed-off-by: Bjorn Andersson commit 6dfdf6e4e7096fead7755d47d91d72e896bb4804 Author: YueHaibing Date: Sat Sep 5 20:25:03 2020 +0800 remoteproc: k3-dsp: Fix return value check in k3_dsp_rproc_of_get_memories() In case of error, the function devm_ioremap_wc() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Reviewed-by: Mathieu Poirier Fixes: 6edbe024ba17 ("remoteproc: k3-dsp: Add a remoteproc driver of K3 C66x DSPs") Signed-off-by: YueHaibing Acked-by: Suman Anna Link: https://lore.kernel.org/r/20200905122503.17352-1-yuehaibing@huawei.com Signed-off-by: Bjorn Andersson commit c0a6e5ee1ecfe4c3a5799cfd30820748eff5dfab Author: Zhang Qilong Date: Mon Nov 2 22:35:54 2020 +0800 remoteproc: qcom: pas: fix error handling in adsp_pds_enable If the pm_runtime_get_sync failed in adsp_pds_enable when loop (i), The unroll_pd_votes will start from (i - 1), and it will resulted in following problems: 1) pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to pm_runtime_put_noidle will result in reference leak. 2) Have not reset pds[i] performance state. Then we fix it. Fixes: 17ee2fb4e8567 ("remoteproc: qcom: pas: Vote for active/proxy power domains") Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20201102143554.144707-1-zhangqilong3@huawei.com Signed-off-by: Bjorn Andersson commit aa37448f597c09844942da87d042fc6793f989c2 Author: Zhang Qilong Date: Mon Nov 2 22:35:34 2020 +0800 remoteproc: qcom: fix reference leak in adsp_start pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to pm_runtime_put_noidle will result in reference leak in adsp_start, so we should fix it. Fixes: dc160e4491222 ("remoteproc: qcom: Introduce Non-PAS ADSP PIL driver") Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20201102143534.144484-1-zhangqilong3@huawei.com Signed-off-by: Bjorn Andersson commit a24723050037303e4008b37f1f8dcc99c58901aa Author: Zhang Qilong Date: Mon Nov 2 22:34:33 2020 +0800 remoteproc: q6v5-mss: fix error handling in q6v5_pds_enable If the pm_runtime_get_sync failed in q6v5_pds_enable when loop (i), The unroll_pd_votes will start from (i - 1), and it will resulted in following problems: 1) pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to pm_runtime_put_noidle will result in reference leak. 2) Have not reset pds[i] performance state. Then we fix it. Fixes: 4760a896be88e ("remoteproc: q6v5-mss: Vote for rpmh power domains") Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20201102143433.143996-1-zhangqilong3@huawei.com Signed-off-by: Bjorn Andersson commit e59aef4edc45133ccb10b8e962cb74dcf1e3240b Author: Alexandre Courbot Date: Mon Nov 2 16:40:07 2020 +0900 remoteproc/mtk_scp: surround DT device IDs with CONFIG_OF Now that this driver can be compiled with COMPILE_TEST, we have no guarantee that CONFIG_OF will also be defined. When that happens, a warning about mtk_scp_of_match being defined but unused will be reported so make sure this variable is only defined if of_match_ptr() actually uses it. Fixes: cbd2dca74926c0e4610c40923cc786b732c9e8ef remoteproc: scp: add COMPILE_TEST dependency Reported-by: kernel test robot Signed-off-by: Alexandre Courbot Link: https://lore.kernel.org/r/20201102074007.299222-1-acourbot@chromium.org Signed-off-by: Bjorn Andersson commit d2debca429ce1796178acb8316d0dcbc7dceed7c Author: Siddharth Gupta Date: Thu Nov 19 13:05:35 2020 -0800 remoteproc: qcom: Add minidump id for sm8150 modem Add minidump id for modem in sm8150 chipset so that the regions to be included in the coredump generated upon a crash is based on the minidump tables in SMEM instead of those in the ELF header. Reviewed-by: Bjorn Andersson Acked-by, Reviewed-by or Tested-by that you received previously.: Signed-off-by: Siddharth Gupta Link: https://lore.kernel.org/r/1605819935-10726-5-git-send-email-sidgup@codeaurora.org Signed-off-by: Bjorn Andersson commit 8ed8485c4f056d488d17a2b56581c86aeb42955d Author: Siddharth Gupta Date: Thu Nov 19 13:05:34 2020 -0800 remoteproc: qcom: Add capability to collect minidumps This patch adds support for collecting minidump in the event of remoteproc crash. Parse the minidump table based on remoteproc's unique minidump-id, read all memory regions from the remoteproc's minidump table entry and expose the memory to userspace. The remoteproc platform driver can choose to collect a full/mini dump by specifying the coredump op. Reviewed-by: Bjorn Andersson Co-developed-by: Rishabh Bhatnagar Signed-off-by: Rishabh Bhatnagar Co-developed-by: Gurbir Arora Signed-off-by: Gurbir Arora Signed-off-by: Siddharth Gupta Link: https://lore.kernel.org/r/1605819935-10726-4-git-send-email-sidgup@codeaurora.org Signed-off-by: Bjorn Andersson commit abc72b646066075acf9121a2a68aad39f550813d Author: Siddharth Gupta Date: Thu Nov 19 13:05:33 2020 -0800 remoteproc: coredump: Add minidump functionality This change adds a new kind of core dump mechanism which instead of dumping entire program segments of the firmware, dumps sections of the remoteproc memory which are sufficient to allow debugging the firmware. This function thus uses section headers instead of program headers during creation of the core dump elf. Reviewed-by: Bjorn Andersson Co-developed-by: Rishabh Bhatnagar Signed-off-by: Rishabh Bhatnagar Signed-off-by: Siddharth Gupta Link: https://lore.kernel.org/r/1605819935-10726-3-git-send-email-sidgup@codeaurora.org Signed-off-by: Bjorn Andersson commit adf60a870e9130c7883ec2ab798484e05f24db39 Author: Siddharth Gupta Date: Thu Nov 19 13:05:32 2020 -0800 remoteproc: core: Add ops to enable custom coredump functionality Each remoteproc might have different requirements for coredumps and might want to choose the type of dumps it wants to collect. This change allows remoteproc drivers to specify their own custom dump function to be executed in place of rproc_coredump. If the coredump op is not specified by the remoteproc driver it will be set to rproc_coredump by default. Reviewed-by: Bjorn Andersson Signed-off-by: Siddharth Gupta Link: https://lore.kernel.org/r/1605819935-10726-2-git-send-email-sidgup@codeaurora.org Signed-off-by: Bjorn Andersson commit f7cfd871ae0c5008d94b6f66834e7845caa93c15 Author: Eric W. Biederman Date: Thu Dec 3 14:12:00 2020 -0600 exec: Transform exec_update_mutex into a rw_semaphore Recently syzbot reported[0] that there is a deadlock amongst the users of exec_update_mutex. The problematic lock ordering found by lockdep was: perf_event_open (exec_update_mutex -> ovl_i_mutex) chown (ovl_i_mutex -> sb_writes) sendfile (sb_writes -> p->lock) by reading from a proc file and writing to overlayfs proc_pid_syscall (p->lock -> exec_update_mutex) While looking at possible solutions it occured to me that all of the users and possible users involved only wanted to state of the given process to remain the same. They are all readers. The only writer is exec. There is no reason for readers to block on each other. So fix this deadlock by transforming exec_update_mutex into a rw_semaphore named exec_update_lock that only exec takes for writing. Cc: Jann Horn Cc: Vasiliy Kulikov Cc: Al Viro Cc: Bernd Edlinger Cc: Oleg Nesterov Cc: Christopher Yeoh Cc: Cyrill Gorcunov Cc: Sargun Dhillon Cc: Christian Brauner Cc: Arnd Bergmann Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Fixes: eea9673250db ("exec: Add exec_update_mutex to replace cred_guard_mutex") [0] https://lkml.kernel.org/r/00000000000063640c05ade8e3de@google.com Reported-by: syzbot+db9cdf3dd1f64252c6ef@syzkaller.appspotmail.com Link: https://lkml.kernel.org/r/87ft4mbqen.fsf@x220.int.ebiederm.org Signed-off-by: Eric W. Biederman commit 0a441514bc2b8a48ebe23c2dcb9feee6351d45b6 Author: Tzung-Bi Shih Date: Thu Dec 10 13:41:09 2020 +0800 remoteproc/mediatek: change MT8192 CFG register base The correct MT8192 CFG register base is 0x20000 off. Changes the registers accordingly. Fixes: fd0b6c1ff85a ("remoteproc/mediatek: Add support for mt8192 SCP") Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20201210054109.587795-1-tzungbi@google.com Signed-off-by: Bjorn Andersson commit e0da68994d16b46384cce7b86eb645f1ef7c51ef Author: Avihai Horon Date: Tue Dec 8 09:35:45 2020 +0200 RDMA/uverbs: Fix incorrect variable type Fix incorrect type of max_entries in UVERBS_METHOD_QUERY_GID_TABLE - max_entries is of type size_t although it can take negative values. The following static check revealed it: drivers/infiniband/core/uverbs_std_types_device.c:338 ib_uverbs_handler_UVERBS_METHOD_QUERY_GID_TABLE() warn: 'max_entries' unsigned <= 0 Fixes: 9f85cbe50aa0 ("RDMA/uverbs: Expose the new GID query API to user space") Link: https://lore.kernel.org/r/20201208073545.9723-4-leon@kernel.org Reported-by: Dan Carpenter Signed-off-by: Avihai Horon Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 779e0bf47632c609c59f527f9711ecd3214dccb0 Author: Jack Morgenstein Date: Tue Dec 8 09:35:44 2020 +0200 RDMA/core: Do not indicate device ready when device enablement fails In procedure ib_register_device, procedure kobject_uevent is called (advertising that the device is ready for userspace usage) even when device_enable_and_get() returned an error. As a result, various RDMA modules attempted to register for the device even while the device driver was preparing to unregister the device. Fix this by advertising the device availability only after enabling the device succeeds. Fixes: e7a5b4aafd82 ("RDMA/device: Don't fire uevent before device is fully initialized") Link: https://lore.kernel.org/r/20201208073545.9723-3-leon@kernel.org Suggested-by: Leon Romanovsky Signed-off-by: Jack Morgenstein Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 286e1d3f9ba89c7db5eecd30f47f9e333843ea13 Author: Jack Morgenstein Date: Tue Dec 8 09:35:43 2020 +0200 RDMA/core: Clean up cq pool mechanism The CQ pool mechanism had two problems: 1. The CQ pool lists were uninitialized in the device registration error flow. As a result, all the list pointers remained NULL. This caused the kernel to crash (in procedure ib_cq_pool_destroy) when that error flow was taken (and unregister called). The stack trace snippet: BUG: kernel NULL pointer dereference, address: 0000000000000000 #PF: supervisor read access in kernel mode #PF: error_code(0×0000) ? not-present page PGD 0 P4D 0 Oops: 0000 [#1] SMP PTI . . . RIP: 0010:ib_cq_pool_destroy+0x1b/0×70 [ib_core] . . . Call Trace: disable_device+0x9f/0×130 [ib_core] __ib_unregister_device+0x35/0×90 [ib_core] ib_register_device+0x529/0×610 [ib_core] __mlx5_ib_add+0x3a/0×70 [mlx5_ib] mlx5_add_device+0x87/0×1c0 [mlx5_core] mlx5_register_interface+0x74/0xc0 [mlx5_core] do_one_initcall+0x4b/0×1f4 do_init_module+0x5a/0×223 load_module+0x1938/0×1d40 2. At device unregister, when cleaning up the cq pool, the cq's in the pool lists were freed, but the cq entries were left in the list. The fix for the first issue is to initialize the cq pool lists when the ib_device structure is allocated for a new device (in procedure _ib_alloc_device). The fix for the second problem is to delete cq entries from the pool lists when cleaning up the cq pool. In addition, procedure ib_cq_pool_destroy() is renamed to the more appropriate name ib_cq_pool_cleanup(). Fixes: 4aa1615268a8 ("RDMA/core: Fix ordering of CQ pool destruction") Link: https://lore.kernel.org/r/20201208073545.9723-2-leon@kernel.org Suggested-by: Jason Gunthorpe Signed-off-by: Jack Morgenstein Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit b1a5039759cb7bfcb2157f28604dbda0bca58598 Author: Kai Vehmanen Date: Thu Dec 10 19:44:45 2020 +0200 ALSA: hda/hdmi: fix silent stream for first playback to DP A problem exists in enabling silent stream when connection type is DisplayPort. Silent stream programming is completed when a new DP receiver is connected, but infoframe transmission does not actually start until PCM is opened for the first time. This can result in audible gap of multiple seconds. This only affects the first PCM open. Fix the issue by properly assigning a converter to the silent stream, and modifying the required stream ID programming sequence. This change only affects Intel display audio codecs. BugLink: https://github.com/thesofproject/linux/issues/2468 Fixes: 951894cf30f4 ("ALSA: hda/hdmi: Add Intel silent stream support") Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20201210174445.3134104-1-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai commit 9ee1206dcfb9d56503c0de9f8320f7b29c795867 Author: Eric W. Biederman Date: Mon Nov 30 16:58:46 2020 -0600 exec: Move io_uring_task_cancel after the point of no return Now that unshare_files happens in begin_new_exec after the point of no return, io_uring_task_cancel can also happen later. Effectively this means io_uring activities for a task are only canceled when exec succeeds. Link: https://lkml.kernel.org/r/878saih2op.fsf@x220.int.ebiederm.org Signed-off-by: Eric W. Biederman commit c39ab6de227306f331b47e7b6b51c2c7eaf0eeaf Author: Eric W. Biederman Date: Wed Nov 25 15:51:32 2020 -0600 coredump: Document coredump code exclusively used by cell spufs Oleg Nesterov recently asked[1] why is there an unshare_files in do_coredump. After digging through all of the callers of lookup_fd it turns out that it is arch/powerpc/platforms/cell/spufs/coredump.c:coredump_next_context that needs the unshare_files in do_coredump. Looking at the history[2] this code was also the only piece of coredump code that required the unshare_files when the unshare_files was added. Looking at that code it turns out that cell is also the only architecture that implements elf_coredump_extra_notes_size and elf_coredump_extra_notes_write. I looked at the gdb repo[3] support for cell has been removed[4] in binutils 2.34. Geoff Levand reports he is still getting questions on how to run modern kernels on the PS3, from people using 3rd party firmware so this code is not dead. According to Wikipedia the last PS3 shipped in Japan sometime in 2017. So it will probably be a little while before everyone's hardware dies. Add some comments briefly documenting the coredump code that exists only to support cell spufs to make it easier to understand the coredump code. Eventually the hardware will be dead, or their won't be userspace tools, or the coredump code will be refactored and it will be too difficult to update a dead architecture and these comments make it easy to tell where to pull to remove cell spufs support. [1] https://lkml.kernel.org/r/20201123175052.GA20279@redhat.com [2] 179e037fc137 ("do_coredump(): make sure that descriptor table isn't shared") [3] git://sourceware.org/git/binutils-gdb.git [4] abf516c6931a ("Remove Cell Broadband Engine debugging support"). Link: https://lkml.kernel.org/r/87h7pdnlzv.fsf_-_@x220.int.ebiederm.org Signed-off-by: Eric W. Biederman commit 7079f785b50055a32b72eddcb7d9ba5688db24d0 Author: Connor McAdams Date: Thu Dec 10 12:35:49 2020 -0500 ALSA: hda/ca0132 - Change Input Source enum strings. Change the Input Source enumerated control's strings to make it play nice with pulseaudio. Fixes: 7cb9d94c05de9 ("ALSA: hda/ca0132: add alt_select_in/out for R3Di + SBZ") Cc: Signed-off-by: Connor McAdams Link: https://lore.kernel.org/r/20201208195223.424753-2-conmanx360@gmail.com Link: https://lore.kernel.org/r/20201210173550.2968-2-conmanx360@gmail.com Signed-off-by: Takashi Iwai commit c697ba85a94b8f65bf90dec5ef9af5c39c3e73b2 Author: Connor McAdams Date: Thu Dec 10 12:35:48 2020 -0500 ALSA: hda/ca0132 - Fix AE-5 rear headphone pincfg. The Windows driver sets the pincfg for the AE-5's rear-headphone to report as a microphone. This causes issues with Pulseaudio mistakenly believing there is no headphone plugged in. In Linux, we should instead set it to be a headphone. Fixes: a6b0961b39896 ("ALSA: hda/ca0132 - fix AE-5 pincfg") Cc: Signed-off-by: Connor McAdams Link: https://lore.kernel.org/r/20201208195223.424753-1-conmanx360@gmail.com Link: https://lore.kernel.org/r/20201210173550.2968-1-conmanx360@gmail.com Signed-off-by: Takashi Iwai commit c9a867fd845171e6845e6fd665c423fa910083d8 Author: Takashi Iwai Date: Wed Dec 9 17:18:35 2020 +0100 ALSA: usb-audio: Add implicit fb support for Steinberg UR22 Steinberg UR22 (with USB ID 0499:1509) requires the implicit feedback for the proper playback, otherwise it causes occasional cracks. This patch adds the corresponding the quirk table entry with the recently added generic implicit fb support. Reported-and-tested-by: Kilian Link: https://lore.kernel.org/r/20201209161835.13625-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 2506318e382c4c7daa77bdc48f80a0ee82804588 Author: Takashi Iwai Date: Wed Dec 9 16:01:19 2020 +0100 ALSA: hda: Fix regressions on clear and reconfig sysfs It seems that the HD-audio clear and reconfig sysfs don't work any longer after the recent driver core change. There are multiple issues around that: the linked list corruption and the dead device handling. The former issue is fixed by another patch for the driver core itself, while the latter patch needs to be addressed in HD-audio side. This patch corresponds to the latter, it recovers those broken functions by replacing the device detach and attach actions with the standard core API functions, which are almost equivalent with unbind and bind actions. Fixes: 654888327e9f ("driver core: Avoid binding drivers to dead devices") Cc: BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=209207 Link: https://lore.kernel.org/r/20201209150119.7705-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 125c00af3b2c498875b275c4ad932b4db2c6bae2 Merge: 3650b228f83ad fa67bf885e521 Author: Eric W. Biederman Date: Thu Dec 10 12:47:57 2020 -0600 exec: Move unshare_files and guarantee files_struct.count is correct A while ago it was reported that posix file locking goes wrong when a multi-threaded process calls exec. I looked into the history and this is definitely a regression, that should be fixed if we can. This set of changes cleanups of the code in exec so hopefully this code will not regress again. Then it adds helpers and fixes the users of files_struct so the reference count is only incremented if COPY_FILES is passed to clone (or if io_uring takes a reference). Then it removes helpers (get_files_struct, __install_fd, __alloc_fd, __close_fd) that are no longer needed and if used would encourage code that increments the count of files_struct somewhere besides in clone when COPY_FILES is passed. In addition to fixing the bug in exec and simplifing the code this set of changes by virtue of getting files_struct.count correct it optimizes fdget. With proc and other places not temporarily increasing the count on files_struct __fget_light should succeed more often in being able to return a struct file without touching it's reference count. Fixing the count in files_struct was suggested by Oleg[1]. For those that are interested in the history of this issue I have included as much of it as I could find in the first change. Since v1: - Renamed the functions __fcheck_files -> files_lookup_fd_raw fcheck_files -> files_lookup_fd_locked fcheck_files -> files_lookup_fd_rcu fcheck_files -> lookup_fd_rcu fcheck_task -> task_lookup_fd_rcu fnext_task -> task_lookup_next_fd_rcu __close_fd_get_file -> close_fd_get_file - Simplified get_file_raw_ptr - Removed ksys_close - Examined the penalty for taking task_lock. The helper task_lookup_next_fd_rcu takes task_lock each iteration. Concern was expressed that this might be a problem. The function tid_fd_mode isn called from tid_fd_revalidate which is called when ever a file descriptor file is stat'ed, opened, or otherwise accessed. The function tid_fd_mode histrocally called get_files_struct which took and dropped task_lock. So the volume of task_lock calls is already proportional to the number of file descriptors. A micro benchmark did not see the move to task_lookup_next_fd_rcu making a difference in performance. Which suggests that the change to taking the task lock for every file descriptor found in task_lookup_next_fd will not be a problem. - Reviewed the code for conflicts with io_uring (especially the removal of get_files_struct). To my surprise no conflicts were found as io_uring does not use standard helpers but instead rolls it's own version of get_files_struct by hand. Documentation/filesystems/files.rst | 8 +- arch/powerpc/platforms/cell/spufs/coredump.c | 2 +- drivers/android/binder.c | 2 +- fs/autofs/dev-ioctl.c | 5 +- fs/coredump.c | 5 +- fs/exec.c | 29 +++---- fs/file.c | 124 +++++++++++++-------------- fs/io_uring.c | 2 +- fs/locks.c | 14 +-- fs/notify/dnotify/dnotify.c | 2 +- fs/open.c | 2 +- fs/proc/fd.c | 48 ++++------- include/linux/fdtable.h | 40 +++++---- include/linux/syscalls.h | 12 --- kernel/bpf/syscall.c | 20 +---- kernel/bpf/task_iter.c | 44 +++------- kernel/fork.c | 12 +-- kernel/kcmp.c | 29 ++----- 18 files changed, 153 insertions(+), 247 deletions(-) Eric W. Biederman (25): exec: Don't open code get_close_on_exec exec: Move unshare_files to fix posix file locking during exec exec: Simplify unshare_files exec: Remove reset_files_struct kcmp: In kcmp_epoll_target use fget_task bpf: In bpf_task_fd_query use fget_task proc/fd: In proc_fd_link use fget_task file: Rename __fcheck_files to files_lookup_fd_raw file: Factor files_lookup_fd_locked out of fcheck_files file: Replace fcheck_files with files_lookup_fd_rcu file: Rename fcheck lookup_fd_rcu file: Implement task_lookup_fd_rcu proc/fd: In tid_fd_mode use task_lookup_fd_rcu kcmp: In get_file_raw_ptr use task_lookup_fd_rcu file: Implement task_lookup_next_fd_rcu proc/fd: In proc_readfd_common use task_lookup_next_fd_rcu bpf/task_iter: In task_file_seq_get_next use task_lookup_next_fd_rcu proc/fd: In fdinfo seq_show don't use get_files_struct file: Merge __fd_install into fd_install file: In f_dupfd read RLIMIT_NOFILE once. file: Merge __alloc_fd into alloc_fd file: Rename __close_fd to close_fd and remove the files parameter file: Replace ksys_close with close_fd file: Rename __close_fd_get_file close_fd_get_file file: Remove get_files_struct [1] https://lkml.kernel.org/r/20180915160423.GA31461@redhat.com v1: https://lkml.kernel.org/r/87ft8l6ic3.fsf@x220.int.ebiederm.org Reported-by: Jeff Layton Reported-by: Daniel P. Berrangé Suggested-by: Oleg Nesterov Acked-by: Linus Torvalds Link: https://lkml.kernel.org/r/87r1on1v62.fsf@x220.int.ebiederm.org Link: https://lists.openvz.org/pipermail/criu/2020-November/045123.html Link: https://marc.info/?l=openvz-criu&m=160591423214257 Signed-off-by: "Eric W. Biederman" commit c42d492c672af19f3bd5f9736bf2ad1c0eb779b3 Author: Zheng Yongjun Date: Wed Dec 9 21:55:50 2020 +0800 cw1200: txrx: convert comma to semicolon Replace a comma between expression statements by a semicolon. Signed-off-by: Zheng Yongjun Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201209135550.2004-1-zhengyongjun3@huawei.com commit 382726d134e3c59dc7f78dcd54d1990493489835 Author: Ajay Singh Date: Tue Dec 8 10:38:00 2020 +0000 wilc1000: changes for SPI communication stall issue found with Iperf Added retry mechanism to ensure VMM enable bit is set during the block transfer of data between host and WILC FW. Signed-off-by: Ajay Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201208103739.28597-1-ajay.kathat@microchip.com commit 89b5d9b2215bc36baa0a974ad9c8a2bead8e836a Merge: 3f79e541593fe fd1c3318f4e7c Author: Kalle Valo Date: Thu Dec 10 20:46:47 2020 +0200 Merge tag 'iwlwifi-next-for-kalle-2020-12-09' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next iwlwifi patches intended for v5.11 * A few fixes and improvements in the FW debugging framework; * A fix in the HE capabilities settings; * Small fix in the logs for SAR; * Move queue code to a common place; * Support for 6GHz; * Improve validation of firmware notifications; * Debugging improvements and fixes; * Replace terminology with inclusive words determined by the guidelines; * Convert copyright notices to SPDX tags; * Added more validations for firmware notifications; * A couple of debugging/recovery fixes; * Added some more validations for firmware notifications; * Support for a new type of HW; * A couple of channel switch fixes; * Support new FW reset handshake; * Add a couple of RX handlers that were accidentally left out; * Some other clean-ups and small fixes; # gpg: Signature made Thu 10 Dec 2020 12:19:59 AM EET using RSA key ID 1A3CC5FA # gpg: Good signature from "Luciano Roth Coelho (Luca) " # gpg: aka "Luciano Roth Coelho (Intel) " commit fa67bf885e5211c7dce9514ef2877212c0a5e09e Author: Eric W. Biederman Date: Fri Nov 20 17:14:41 2020 -0600 file: Remove get_files_struct When discussing[1] exec and posix file locks it was realized that none of the callers of get_files_struct fundamentally needed to call get_files_struct, and that by switching them to helper functions instead it will both simplify their code and remove unnecessary increments of files_struct.count. Those unnecessary increments can result in exec unnecessarily unsharing files_struct which breaking posix locks, and it can result in fget_light having to fallback to fget reducing system performance. Now that get_files_struct has no more users and can not cause the problems for posix file locking and fget_light remove get_files_struct so that it does not gain any new users. [1] https://lkml.kernel.org/r/20180915160423.GA31461@redhat.com Suggested-by: Oleg Nesterov Acked-by: Christian Brauner v1: https://lkml.kernel.org/r/20200817220425.9389-13-ebiederm@xmission.com Link: https://lkml.kernel.org/r/20201120231441.29911-24-ebiederm@xmission.com Signed-off-by: Eric W. Biederman commit 9fe83c43e71cdb8e5b9520bcb98706a2b3c680c8 Author: Eric W. Biederman Date: Fri Nov 20 17:14:40 2020 -0600 file: Rename __close_fd_get_file close_fd_get_file The function close_fd_get_file is explicitly a variant of __close_fd[1]. Now that __close_fd has been renamed close_fd, rename close_fd_get_file to be consistent with close_fd. When __alloc_fd, __close_fd and __fd_install were introduced the double underscore indicated that the function took a struct files_struct parameter. The function __close_fd_get_file never has so the naming has always been inconsistent. This just cleans things up so there are not any lingering mentions or references __close_fd left in the code. [1] 80cd795630d6 ("binder: fix use-after-free due to ksys_close() during fdget()") Link: https://lkml.kernel.org/r/20201120231441.29911-23-ebiederm@xmission.com Signed-off-by: Eric W. Biederman commit 1572bfdf21d4d50e51941498ffe0b56c2289f783 Author: Eric W. Biederman Date: Fri Nov 20 17:14:39 2020 -0600 file: Replace ksys_close with close_fd Now that ksys_close is exactly identical to close_fd replace the one caller of ksys_close with close_fd. [1] https://lkml.kernel.org/r/20200818112020.GA17080@infradead.org Suggested-by: Christoph Hellwig Link: https://lkml.kernel.org/r/20201120231441.29911-22-ebiederm@xmission.com Signed-off-by: Eric W. Biederman commit 8760c909f54a82aaa6e76da19afe798a0c77c3c3 Author: Eric W. Biederman Date: Fri Nov 20 17:14:38 2020 -0600 file: Rename __close_fd to close_fd and remove the files parameter The function __close_fd was added to support binder[1]. Now that binder has been fixed to no longer need __close_fd[2] all calls to __close_fd pass current->files. Therefore transform the files parameter into a local variable initialized to current->files, and rename __close_fd to close_fd to reflect this change, and keep it in sync with the similar changes to __alloc_fd, and __fd_install. This removes the need for callers to care about the extra care that needs to be take if anything except current->files is passed, by limiting the callers to only operation on current->files. [1] 483ce1d4b8c3 ("take descriptor-related part of close() to file.c") [2] 44d8047f1d87 ("binder: use standard functions to allocate fds") Acked-by: Christian Brauner v1: https://lkml.kernel.org/r/20200817220425.9389-17-ebiederm@xmission.com Link: https://lkml.kernel.org/r/20201120231441.29911-21-ebiederm@xmission.com Signed-off-by: Eric W. Biederman commit aa384d10f3d06d4b85597ff5df41551262220e16 Author: Eric W. Biederman Date: Fri Nov 20 17:14:37 2020 -0600 file: Merge __alloc_fd into alloc_fd The function __alloc_fd was added to support binder[1]. With binder fixed[2] there are no more users. As alloc_fd just calls __alloc_fd with "files=current->files", merge them together by transforming the files parameter into a local variable initialized to current->files. [1] dcfadfa4ec5a ("new helper: __alloc_fd()") [2] 44d8047f1d87 ("binder: use standard functions to allocate fds") Acked-by: Christian Brauner v1: https://lkml.kernel.org/r/20200817220425.9389-16-ebiederm@xmission.com Link: https://lkml.kernel.org/r/20201120231441.29911-20-ebiederm@xmission.com Signed-off-by: Eric W. Biederman commit e06b53c22f31ebba4c46d02fb3a58336135db45c Author: Eric W. Biederman Date: Fri Nov 20 17:14:36 2020 -0600 file: In f_dupfd read RLIMIT_NOFILE once. Simplify the code, and remove the chance of races by reading RLIMIT_NOFILE only once in f_dupfd. Pass the read value of RLIMIT_NOFILE into alloc_fd which is the other location the rlimit was read in f_dupfd. As f_dupfd is the only caller of alloc_fd this changing alloc_fd is trivially safe. Further this causes alloc_fd to take all of the same arguments as __alloc_fd except for the files_struct argument. Acked-by: Christian Brauner v1: https://lkml.kernel.org/r/20200817220425.9389-15-ebiederm@xmission.com Link: https://lkml.kernel.org/r/20201120231441.29911-19-ebiederm@xmission.com Signed-off-by: Eric W. Biederman commit d74ba04d919ebe30bf47406819c18c6b50003d92 Author: Eric W. Biederman Date: Fri Nov 20 17:14:35 2020 -0600 file: Merge __fd_install into fd_install The function __fd_install was added to support binder[1]. With binder fixed[2] there are no more users. As fd_install just calls __fd_install with "files=current->files", merge them together by transforming the files parameter into a local variable initialized to current->files. [1] f869e8a7f753 ("expose a low-level variant of fd_install() for binder") [2] 44d8047f1d87 ("binder: use standard functions to allocate fds") Acked-by: Christian Brauner v1:https://lkml.kernel.org/r/20200817220425.9389-14-ebiederm@xmission.com Link: https://lkml.kernel.org/r/20201120231441.29911-18-ebiederm@xmission.com Signed-off-by: Eric W. Biederman commit 775e0656b27210ae668e33af00bece858f44576f Author: Eric W. Biederman Date: Fri Nov 20 17:14:34 2020 -0600 proc/fd: In fdinfo seq_show don't use get_files_struct When discussing[1] exec and posix file locks it was realized that none of the callers of get_files_struct fundamentally needed to call get_files_struct, and that by switching them to helper functions instead it will both simplify their code and remove unnecessary increments of files_struct.count. Those unnecessary increments can result in exec unnecessarily unsharing files_struct which breaking posix locks, and it can result in fget_light having to fallback to fget reducing system performance. Instead hold task_lock for the duration that task->files needs to be stable in seq_show. The task_lock was already taken in get_files_struct, and so skipping get_files_struct performs less work overall, and avoids the problems with the files_struct reference count. [1] https://lkml.kernel.org/r/20180915160423.GA31461@redhat.com Suggested-by: Oleg Nesterov Acked-by: Christian Brauner v1: https://lkml.kernel.org/r/20200817220425.9389-12-ebiederm@xmission.com Link: https://lkml.kernel.org/r/20201120231441.29911-17-ebiederm@xmission.com Signed-off-by: Eric W. Biederman commit 66ed594409a10b1cc6fa1e8d22bc8aed2a080d0c Author: Eric W. Biederman Date: Fri Nov 20 17:14:33 2020 -0600 bpf/task_iter: In task_file_seq_get_next use task_lookup_next_fd_rcu When discussing[1] exec and posix file locks it was realized that none of the callers of get_files_struct fundamentally needed to call get_files_struct, and that by switching them to helper functions instead it will both simplify their code and remove unnecessary increments of files_struct.count. Those unnecessary increments can result in exec unnecessarily unsharing files_struct which breaking posix locks, and it can result in fget_light having to fallback to fget reducing system performance. Using task_lookup_next_fd_rcu simplifies task_file_seq_get_next, by moving the checking for the maximum file descritor into the generic code, and by remvoing the need for capturing and releasing a reference on files_struct. As the reference count of files_struct no longer needs to be maintained bpf_iter_seq_task_file_info can have it's files member removed and task_file_seq_get_next no longer needs it's fstruct argument. The curr_fd local variable does need to become unsigned to be used with fnext_task. As curr_fd is assigned from and assigned a u32 making curr_fd an unsigned int won't cause problems and might prevent them. [1] https://lkml.kernel.org/r/20180915160423.GA31461@redhat.com Suggested-by: Oleg Nesterov v1: https://lkml.kernel.org/r/20200817220425.9389-11-ebiederm@xmission.com Link: https://lkml.kernel.org/r/20201120231441.29911-16-ebiederm@xmission.com Signed-off-by: Eric W. Biederman commit 5b17b61870e2f4b0a4fdc5c6039fbdb4ffb796df Author: Eric W. Biederman Date: Fri Nov 20 17:14:32 2020 -0600 proc/fd: In proc_readfd_common use task_lookup_next_fd_rcu When discussing[1] exec and posix file locks it was realized that none of the callers of get_files_struct fundamentally needed to call get_files_struct, and that by switching them to helper functions instead it will both simplify their code and remove unnecessary increments of files_struct.count. Those unnecessary increments can result in exec unnecessarily unsharing files_struct which breaking posix locks, and it can result in fget_light having to fallback to fget reducing system performance. Using task_lookup_next_fd_rcu simplifies proc_readfd_common, by moving the checking for the maximum file descritor into the generic code, and by remvoing the need for capturing and releasing a reference on files_struct. As task_lookup_fd_rcu may update the fd ctx->pos has been changed to be the fd +2 after task_lookup_fd_rcu returns. [1] https://lkml.kernel.org/r/20180915160423.GA31461@redhat.com Suggested-by: Oleg Nesterov Tested-by: Andy Lavr v1: https://lkml.kernel.org/r/20200817220425.9389-10-ebiederm@xmission.com Link: https://lkml.kernel.org/r/20201120231441.29911-15-ebiederm@xmission.com Signed-off-by: Eric W. Biederman commit e9a53aeb5e0a838f10fcea74235664e7ad5e6e1a Author: Eric W. Biederman Date: Fri Nov 20 17:14:31 2020 -0600 file: Implement task_lookup_next_fd_rcu As a companion to fget_task and task_lookup_fd_rcu implement task_lookup_next_fd_rcu that will return the struct file for the first file descriptor number that is equal or greater than the fd argument value, or NULL if there is no such struct file. This allows file descriptors of foreign processes to be iterated through safely, without needed to increment the count on files_struct. Some concern[1] has been expressed that this function takes the task_lock for each iteration and thus for each file descriptor. This place where this function will be called in a commonly used code path is for listing /proc//fd. I did some small benchmarks and did not see any measurable performance differences. For ordinary users ls is likely to stat each of the directory entries and tid_fd_mode called from tid_fd_revalidae has always taken the task lock for each file descriptor. So this does not look like it will be a big change in practice. At some point is will probably be worth changing put_files_struct to free files_struct after an rcu grace period so that task_lock won't be needed at all. [1] https://lkml.kernel.org/r/20200817220425.9389-10-ebiederm@xmission.com v1: https://lkml.kernel.org/r/20200817220425.9389-9-ebiederm@xmission.com Link: https://lkml.kernel.org/r/20201120231441.29911-14-ebiederm@xmission.com Signed-off-by: Eric W. Biederman commit ed77e80e14a3cd55c73848b9e8043020e717ce12 Author: Eric W. Biederman Date: Fri Nov 20 17:14:30 2020 -0600 kcmp: In get_file_raw_ptr use task_lookup_fd_rcu Modify get_file_raw_ptr to use task_lookup_fd_rcu. The helper task_lookup_fd_rcu does the work of taking the task lock and verifying that task->files != NULL and then calls files_lookup_fd_rcu. So let use the helper to make a simpler implementation of get_file_raw_ptr. Acked-by: Cyrill Gorcunov Link: https://lkml.kernel.org/r/20201120231441.29911-13-ebiederm@xmission.com Signed-off-by: Eric W. Biederman commit 64eb661fda0269276b4c46965832938e3f268268 Author: Eric W. Biederman Date: Fri Nov 20 17:14:29 2020 -0600 proc/fd: In tid_fd_mode use task_lookup_fd_rcu When discussing[1] exec and posix file locks it was realized that none of the callers of get_files_struct fundamentally needed to call get_files_struct, and that by switching them to helper functions instead it will both simplify their code and remove unnecessary increments of files_struct.count. Those unnecessary increments can result in exec unnecessarily unsharing files_struct which breaking posix locks, and it can result in fget_light having to fallback to fget reducing system performance. Instead of manually coding finding the files struct for a task and then calling files_lookup_fd_rcu, use the helper task_lookup_fd_rcu that combines those to steps. Making the code simpler and removing the need to get a reference on a files_struct. [1] https://lkml.kernel.org/r/20180915160423.GA31461@redhat.com Suggested-by: Oleg Nesterov Acked-by: Christian Brauner v1: https://lkml.kernel.org/r/20200817220425.9389-7-ebiederm@xmission.com Link: https://lkml.kernel.org/r/20201120231441.29911-12-ebiederm@xmission.com Signed-off-by: Eric W. Biederman commit 3a879fb38082125cc0d8aa89b70c7f3a7cdf584b Author: Eric W. Biederman Date: Fri Nov 20 17:14:28 2020 -0600 file: Implement task_lookup_fd_rcu As a companion to lookup_fd_rcu implement task_lookup_fd_rcu for querying an arbitrary process about a specific file. Acked-by: Christian Brauner v1: https://lkml.kernel.org/r/20200818103713.aw46m7vprsy4vlve@wittgenstein Link: https://lkml.kernel.org/r/20201120231441.29911-11-ebiederm@xmission.com Signed-off-by: Eric W. Biederman commit 460b4f812a9d473d4b39d87d37844f9fc30a9eb3 Author: Eric W. Biederman Date: Fri Nov 20 17:14:27 2020 -0600 file: Rename fcheck lookup_fd_rcu Also remove the confusing comment about checking if a fd exists. I could not find one instance in the entire kernel that still matches the description or the reason for the name fcheck. The need for better names became apparent in the last round of discussion of this set of changes[1]. [1] https://lkml.kernel.org/r/CAHk-=wj8BQbgJFLa+J0e=iT-1qpmCRTbPAJ8gd6MJQ=kbRPqyQ@mail.gmail.com Link: https://lkml.kernel.org/r/20201120231441.29911-10-ebiederm@xmission.com Signed-off-by: Eric W. Biederman commit f36c2943274199cb8aef32ac96531ffb7c4b43d0 Author: Eric W. Biederman Date: Fri Nov 20 17:14:26 2020 -0600 file: Replace fcheck_files with files_lookup_fd_rcu This change renames fcheck_files to files_lookup_fd_rcu. All of the remaining callers take the rcu_read_lock before calling this function so the _rcu suffix is appropriate. This change also tightens up the debug check to verify that all callers hold the rcu_read_lock. All callers that used to call files_check with the files->file_lock held have now been changed to call files_lookup_fd_locked. This change of name has helped remind me of which locks and which guarantees are in place helping me to catch bugs later in the patchset. The need for better names became apparent in the last round of discussion of this set of changes[1]. [1] https://lkml.kernel.org/r/CAHk-=wj8BQbgJFLa+J0e=iT-1qpmCRTbPAJ8gd6MJQ=kbRPqyQ@mail.gmail.com Link: https://lkml.kernel.org/r/20201120231441.29911-9-ebiederm@xmission.com Signed-off-by: Eric W. Biederman commit 120ce2b0cd52abe73e8b16c23461eb14df5a87d8 Author: Eric W. Biederman Date: Fri Nov 20 17:14:25 2020 -0600 file: Factor files_lookup_fd_locked out of fcheck_files To make it easy to tell where files->file_lock protection is being used when looking up a file create files_lookup_fd_locked. Only allow this function to be called with the file_lock held. Update the callers of fcheck and fcheck_files that are called with the files->file_lock held to call files_lookup_fd_locked instead. Hopefully this makes it easier to quickly understand what is going on. The need for better names became apparent in the last round of discussion of this set of changes[1]. [1] https://lkml.kernel.org/r/CAHk-=wj8BQbgJFLa+J0e=iT-1qpmCRTbPAJ8gd6MJQ=kbRPqyQ@mail.gmail.com Link: https://lkml.kernel.org/r/20201120231441.29911-8-ebiederm@xmission.com Signed-off-by: Eric W. Biederman commit bebf684bf330915e6c96313ad7db89a5480fc9c2 Author: Eric W. Biederman Date: Fri Nov 20 17:14:24 2020 -0600 file: Rename __fcheck_files to files_lookup_fd_raw The function fcheck despite it's comment is poorly named as it has no callers that only check it's return value. All of fcheck's callers use the returned file descriptor. The same is true for fcheck_files and __fcheck_files. A new less confusing name is needed. In addition the names of these functions are confusing as they do not report the kind of locks that are needed to be held when these functions are called making error prone to use them. To remedy this I am making the base functio name lookup_fd and will and prefixes and sufficies to indicate the rest of the context. Name the function (previously called __fcheck_files) that proceeds from a struct files_struct, looks up the struct file of a file descriptor, and requires it's callers to verify all of the appropriate locks are held files_lookup_fd_raw. The need for better names became apparent in the last round of discussion of this set of changes[1]. [1] https://lkml.kernel.org/r/CAHk-=wj8BQbgJFLa+J0e=iT-1qpmCRTbPAJ8gd6MJQ=kbRPqyQ@mail.gmail.com Link: https://lkml.kernel.org/r/20201120231441.29911-7-ebiederm@xmission.com Signed-off-by: Eric W. Biederman commit 439be32656035d3239fd56f9b83353ec06cb3b45 Author: Eric W. Biederman Date: Fri Nov 20 17:14:23 2020 -0600 proc/fd: In proc_fd_link use fget_task When discussing[1] exec and posix file locks it was realized that none of the callers of get_files_struct fundamentally needed to call get_files_struct, and that by switching them to helper functions instead it will both simplify their code and remove unnecessary increments of files_struct.count. Those unnecessary increments can result in exec unnecessarily unsharing files_struct which breaking posix locks, and it can result in fget_light having to fallback to fget reducing system performance. Simplifying proc_fd_link is a little bit tricky. It is necessary to know that there is a reference to fd_f ile while path_get is running. This reference can either be guaranteed to exist either by locking the fdtable as the code currently does or by taking a reference on the file in question. Use fget_task to remove the need for get_files_struct and to take a reference to file in question. [1] https://lkml.kernel.org/r/20180915160423.GA31461@redhat.com Suggested-by: Oleg Nesterov v1: https://lkml.kernel.org/r/20200817220425.9389-8-ebiederm@xmission.com Link: https://lkml.kernel.org/r/20201120231441.29911-6-ebiederm@xmission.com Signed-off-by: Eric W. Biederman commit b48845af0152d790a54b8ab78cc2b7c07485fc98 Author: Eric W. Biederman Date: Fri Nov 20 17:14:22 2020 -0600 bpf: In bpf_task_fd_query use fget_task Use the helper fget_task to simplify bpf_task_fd_query. As well as simplifying the code this removes one unnecessary increment of struct files_struct. This unnecessary increment of files_struct.count can result in exec unnecessarily unsharing files_struct and breaking posix locks, and it can result in fget_light having to fallback to fget reducing performance. This simplification comes from the observation that none of the callers of get_files_struct actually need to call get_files_struct that was made when discussing[1] exec and posix file locks. [1] https://lkml.kernel.org/r/20180915160423.GA31461@redhat.com Suggested-by: Oleg Nesterov v1: https://lkml.kernel.org/r/20200817220425.9389-5-ebiederm@xmission.com Link: https://lkml.kernel.org/r/20201120231441.29911-5-ebiederm@xmission.com Signed-off-by: Eric W. Biederman commit f43c283a89a7dc531a47d4b1e001503cf3dc3234 Author: Eric W. Biederman Date: Fri Nov 20 17:14:21 2020 -0600 kcmp: In kcmp_epoll_target use fget_task Use the helper fget_task and simplify the code. As well as simplifying the code this removes one unnecessary increment of struct files_struct. This unnecessary increment of files_struct.count can result in exec unnecessarily unsharing files_struct and breaking posix locks, and it can result in fget_light having to fallback to fget reducing performance. Suggested-by: Oleg Nesterov Reviewed-by: Cyrill Gorcunov v1: https://lkml.kernel.org/r/20200817220425.9389-4-ebiederm@xmission.com Link: https://lkml.kernel.org/r/20201120231441.29911-4-ebiederm@xmission.com Signed-off-by: Eric W. Biederman commit 950db38ff2c01b7aabbd7ab4a50b7992750fa63d Author: Eric W. Biederman Date: Fri Nov 20 17:14:20 2020 -0600 exec: Remove reset_files_struct Now that exec no longer needs to restore the previous value of current->files on error there are no more callers of reset_files_struct so remove it. Acked-by: Christian Brauner v1: https://lkml.kernel.org/r/20200817220425.9389-3-ebiederm@xmission.com Link: https://lkml.kernel.org/r/20201120231441.29911-3-ebiederm@xmission.com Signed-off-by: Eric W. Biederman commit 1f702603e7125a390b5cdf5ce00539781cfcc86a Author: Eric W. Biederman Date: Fri Nov 20 17:14:19 2020 -0600 exec: Simplify unshare_files Now that exec no longer needs to return the unshared files to their previous value there is no reason to return displaced. Instead when unshare_fd creates a copy of the file table, call put_files_struct before returning from unshare_files. Acked-by: Christian Brauner v1: https://lkml.kernel.org/r/20200817220425.9389-2-ebiederm@xmission.com Link: https://lkml.kernel.org/r/20201120231441.29911-2-ebiederm@xmission.com Signed-off-by: Eric W. Biederman commit b6043501289ebf169ae19b810a882d517377302f Author: Eric W. Biederman Date: Fri Nov 20 17:14:18 2020 -0600 exec: Move unshare_files to fix posix file locking during exec Many moons ago the binfmts were doing some very questionable things with file descriptors and an unsharing of the file descriptor table was added to make things better[1][2]. The helper steal_lockss was added to avoid breaking the userspace programs[3][4][6]. Unfortunately it turned out that steal_locks did not work for network file systems[5], so it was removed to see if anyone would complain[7][8]. It was thought at the time that NPTL would not be affected as the unshare_files happened after the other threads were killed[8]. Unfortunately because there was an unshare_files in binfmt_elf.c before the threads were killed this analysis was incorrect. This unshare_files in binfmt_elf.c resulted in the unshares_files happening whenever threads were present. Which led to unshare_files being moved to the start of do_execve[9]. Later the problems were rediscovered and the suggested approach was to readd steal_locks under a different name[10]. I happened to be reviewing patches and I noticed that this approach was a step backwards[11]. I proposed simply moving unshare_files[12] and it was pointed out that moving unshare_files without auditing the code was also unsafe[13]. There were then several attempts to solve this[14][15][16] and I even posted this set of changes[17]. Unfortunately because auditing all of execve is time consuming this change did not make it in at the time. Well now that I am cleaning up exec I have made the time to read through all of the binfmts and the only playing with file descriptors is either the security modules closing them in security_bprm_committing_creds or is in the generic code in fs/exec.c. None of it happens before begin_new_exec is called. So move unshare_files into begin_new_exec, after the point of no return. If memory is very very very low and the application calling exec is sharing file descriptor tables between processes we might fail past the point of no return. Which is unfortunate but no different than any of the other places where we allocate memory after the point of no return. This movement allows another process that shares the file table, or another thread of the same process and that closes files or changes their close on exec behavior and races with execve to cause some unexpected things to happen. There is only one time of check to time of use race and it is just there so that execve fails instead of an interpreter failing when it tries to open the file it is supposed to be interpreting. Failing later if userspace is being silly is not a problem. With this change it the following discription from the removal of steal_locks[8] finally becomes true. Apps using NPTL are not affected, since all other threads are killed before execve. Apps using LinuxThreads are only affected if they - have multiple threads during exec (LinuxThreads doesn't kill other threads, the app may do it with pthread_kill_other_threads_np()) - rely on POSIX locks being inherited across exec Both conditions are documented, but not their interaction. Apps using clone() natively are affected if they - use clone(CLONE_FILES) - rely on POSIX locks being inherited across exec I have investigated some paths to make it possible to solve this without moving unshare_files but they all look more complicated[18]. Reported-by: Daniel P. Berrangé Reported-by: Jeff Layton History-tree: git://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git [1] 02cda956de0b ("[PATCH] unshare_files" [2] 04e9bcb4d106 ("[PATCH] use new unshare_files helper") [3] 088f5d7244de ("[PATCH] add steal_locks helper") [4] 02c541ec8ffa ("[PATCH] use new steal_locks helper") [5] https://lkml.kernel.org/r/E1FLIlF-0007zR-00@dorka.pomaz.szeredi.hu [6] https://lkml.kernel.org/r/0060321191605.GB15997@sorel.sous-sol.org [7] https://lkml.kernel.org/r/E1FLwjC-0000kJ-00@dorka.pomaz.szeredi.hu [8] c89681ed7d0e ("[PATCH] remove steal_locks()") [9] fd8328be874f ("[PATCH] sanitize handling of shared descriptor tables in failing execve()") [10] https://lkml.kernel.org/r/20180317142520.30520-1-jlayton@kernel.org [11] https://lkml.kernel.org/r/87r2nwqk73.fsf@xmission.com [12] https://lkml.kernel.org/r/87bmfgvg8w.fsf@xmission.com [13] https://lkml.kernel.org/r/20180322111424.GE30522@ZenIV.linux.org.uk [14] https://lkml.kernel.org/r/20180827174722.3723-1-jlayton@kernel.org [15] https://lkml.kernel.org/r/20180830172423.21964-1-jlayton@kernel.org [16] https://lkml.kernel.org/r/20180914105310.6454-1-jlayton@kernel.org [17] https://lkml.kernel.org/r/87a7ohs5ow.fsf@xmission.com [18] https://lkml.kernel.org/r/87pn8c1uj6.fsf_-_@x220.int.ebiederm.org Acked-by: Christian Brauner v1: https://lkml.kernel.org/r/20200817220425.9389-1-ebiederm@xmission.com Link: https://lkml.kernel.org/r/20201120231441.29911-1-ebiederm@xmission.com Signed-off-by: Eric W. Biederman commit 878f12dbb8f514799d126544d59be4d2675caac3 Author: Eric W. Biederman Date: Wed Dec 9 15:42:57 2020 -0600 exec: Don't open code get_close_on_exec Al Viro pointed out that using the phrase "close_on_exec(fd, rcu_dereference_raw(current->files->fdt))" instead of wrapping it in rcu_read_lock(), rcu_read_unlock() is a very questionable optimization[1]. Once wrapped with rcu_read_lock()/rcu_read_unlock() that phrase becomes equivalent the helper function get_close_on_exec so simplify the code and make it more robust by simply using get_close_on_exec. [1] https://lkml.kernel.org/r/20201207222214.GA4115853@ZenIV.linux.org.uk Suggested-by: Al Viro Link: https://lkml.kernel.org/r/87k0tqr6zi.fsf_-_@x220.int.ebiederm.org Signed-off-by: Eric W. Biederman commit a2da5d8cc0b0ba637bdca8887f5ecc72f18c7e81 Author: Alex Deucher Date: Thu Dec 10 10:08:47 2020 -0600 PCI: Mark AMD Raven iGPU ATS as broken in some platforms Edgar reported [1] AMD Raven iGPU errors on several of his systems. There is no root cause. Turn off ATS on these systems to avoid the issue. [1] https://lore.kernel.org/linux-iommu/MWHPR10MB1310CDB6829DDCF5EA84A14689150@MWHPR10MB1310.namprd10.prod.outlook.com/ [bhelgaas: commit log] Link: https://lore.kernel.org/r/MWHPR10MB131082779A86BE4CCCF190B789CB0@MWHPR10MB1310.namprd10.prod.outlook.com Reported-by: Edgar Merger Signed-off-by: Alex Deucher Signed-off-by: Bjorn Helgaas commit ea21f589de9a7d787f50da480d01457d8dcdd64a Author: Zheng Yongjun Date: Thu Dec 10 21:54:32 2020 +0800 thermal: broadcom: simplify the return expression of bcm2711_thermal_probe() Simplify the return expression. Signed-off-by: Zheng Yongjun Reviewed-by: Nicolas Saenz Julienne Reviewed-by: Florian Fainelli Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201210135432.1249-1-zhengyongjun3@huawei.com commit d1dec0cae5539d678c1e265ba4fcf783c8ec4733 Author: Lukas Bulwahn Date: Mon Dec 7 18:32:55 2020 +0100 RDMA/core: Update kernel documentation for ib_create_named_qp() Commit 66f57b871efc ("RDMA/restrack: Support all QP types") extends ib_create_qp() to a named ib_create_named_qp(), which takes the caller's name as argument, but it did not add the new argument description to the function's kerneldoc. make htmldocs warns: ./drivers/infiniband/core/verbs.c:1206: warning: Function parameter or member 'caller' not described in 'ib_create_named_qp' Add a description for this new argument based on the description of the same argument in other related functions. Fixes: 66f57b871efc ("RDMA/restrack: Support all QP types") Link: https://lore.kernel.org/r/20201207173255.13355-1-lukas.bulwahn@gmail.com Signed-off-by: Lukas Bulwahn Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 75e91c888989cf2df5c78b251b07de1f5052e30e Author: Chao Yu Date: Wed Dec 9 16:42:14 2020 +0800 f2fs: compress: fix compression chksum This patch addresses minor issues in compression chksum. Fixes: b28f047b28c5 ("f2fs: compress: support chksum") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit e584bbe821229a3e7cc409eecd51df66f9268c21 Author: Chao Yu Date: Wed Dec 9 16:49:36 2020 +0800 f2fs: fix shift-out-of-bounds in sanity_check_raw_super() syzbot reported a bug which could cause shift-out-of-bounds issue, fix it. Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x107/0x163 lib/dump_stack.c:120 ubsan_epilogue+0xb/0x5a lib/ubsan.c:148 __ubsan_handle_shift_out_of_bounds.cold+0xb1/0x181 lib/ubsan.c:395 sanity_check_raw_super fs/f2fs/super.c:2812 [inline] read_raw_super_block fs/f2fs/super.c:3267 [inline] f2fs_fill_super.cold+0x16c9/0x16f6 fs/f2fs/super.c:3519 mount_bdev+0x34d/0x410 fs/super.c:1366 legacy_get_tree+0x105/0x220 fs/fs_context.c:592 vfs_get_tree+0x89/0x2f0 fs/super.c:1496 do_new_mount fs/namespace.c:2896 [inline] path_mount+0x12ae/0x1e70 fs/namespace.c:3227 do_mount fs/namespace.c:3240 [inline] __do_sys_mount fs/namespace.c:3448 [inline] __se_sys_mount fs/namespace.c:3425 [inline] __x64_sys_mount+0x27f/0x300 fs/namespace.c:3425 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Reported-by: syzbot+ca9a785f8ac472085994@syzkaller.appspotmail.com Signed-off-by: Anant Thazhemadam Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit b44786c9bdc46eac8388843f0a6116369cb18bca Author: Suman Anna Date: Tue Dec 8 15:10:02 2020 +0100 remoteproc: pru: Add support for various PRU cores on K3 J721E SoCs The K3 J721E family of SoCs have a revised version of the AM65x ICSSG IP and contains two instances of this newer ICSSG IP. Each ICSSG processor subsystem contains 2 primary PRU cores, 2 auxiliary PRU cores called RTUs, and 2 new auxiliary cores called Transmit PRUs (Tx_PRUs). Enhance the existing PRU remoteproc driver to support these new PRU and RTU cores by using specific compatibles. The cores have the same memory copying limitations as on AM65x, so reuses the custom memcpy function within the driver's ELF loader implementation. The initial names for the firmware images for each PRU core are retrieved from DT nodes, and can be adjusted through sysfs if required. Signed-off-by: Suman Anna Co-developed-by: Grzegorz Jaszczyk Signed-off-by: Grzegorz Jaszczyk Reviewed-by: Mathieu Poirier Link: https://lore.kernel.org/r/20201208141002.17777-7-grzegorz.jaszczyk@linaro.org Signed-off-by: Bjorn Andersson commit 1d39f4d199214fa4200d73bb7c1a699777e9d615 Author: Suman Anna Date: Tue Dec 8 15:10:01 2020 +0100 remoteproc: pru: Add support for various PRU cores on K3 AM65x SoCs The K3 AM65x family of SoCs have the next generation of the PRU-ICSS processor subsystem, commonly referred to as ICSSG. Each ICSSG processor subsystem on AM65x SR1.0 contains two primary PRU cores and two new auxiliary PRU cores called RTUs. The AM65x SR2.0 SoCs have a revised ICSSG IP that is based off the subsequent IP revision used on J721E SoCs. This IP instance has two new custom auxiliary PRU cores called Transmit PRUs (Tx_PRUs) in addition to the existing PRUs and RTUs. Each RTU and Tx_PRU cores have their own dedicated IRAM (smaller than a PRU), Control and debug feature sets, but is different in terms of sub-modules integrated around it and does not have the full capabilities associated with a PRU core. The RTU core is typically used to aid a PRU core in accelerating data transfers, while the Tx_PRU cores is normally used to control the TX L2 FIFO if enabled in Ethernet applications. Both can also be used to run independent applications. The RTU and Tx_PRU cores though share the same Data RAMs as the PRU cores, so the memories have to be partitioned carefully between different applications. The new cores also support a new sub-module called Task Manager to support two different context thread executions. Enhance the existing PRU remoteproc driver to support these new PRU, RTU and Tx PRU cores by using specific compatibles. The initial names for the firmware images for each PRU core are retrieved from DT nodes, and can be adjusted through sysfs if required. The PRU remoteproc driver has to be specifically modified to use a custom memcpy function within its ELF loader implementation for these new cores in order to overcome a limitation with copying data into each of the core's IRAM memories. These memory ports support only 4-byte writes, and any sub-word order byte writes clear out the remaining bytes other than the bytes being written within the containing word. The default ARM64 memcpy also cannot be used as it throws an exception when the preferred 8-byte copy operation is attempted. This choice is made by using a state flag that is set only on K3 SoCs. Signed-off-by: Suman Anna Co-developed-by: Grzegorz Jaszczyk Signed-off-by: Grzegorz Jaszczyk Reviewed-by: Mathieu Poirier Link: https://lore.kernel.org/r/20201208141002.17777-6-grzegorz.jaszczyk@linaro.org Signed-off-by: Bjorn Andersson commit 20ad1de0f14fbd8608bb32de72517f94b42bf60e Author: Suman Anna Date: Tue Dec 8 15:10:00 2020 +0100 remoteproc: pru: Add pru-specific debugfs support The remoteproc core creates certain standard debugfs entries, that does not give a whole lot of useful information for the PRUs. The PRU remoteproc driver is enhanced to add additional debugfs entries for PRU. These will be auto-cleaned up when the parent rproc debug directory is removed. The enhanced debugfs support adds two new entries: 'regs' and 'single_step'. The 'regs' dumps out the useful CTRL sub-module registers as well as each of the 32 GPREGs and CT_REGs registers. The GPREGs and CT_REGs though are printed only when the PRU is halted and accessible as per the IP design. The 'single_step' utilizes the single-step execution of the PRU cores. Writing a non-zero value performs a single step, and a zero value restores the PRU to execute in the same mode as the mode before the first single step. (note: if the PRU is halted because of a halt instruction, then no change occurs). Logic for setting the PC and jumping over a halt instruction shall be added in the future. Signed-off-by: Suman Anna Signed-off-by: Grzegorz Jaszczyk Reviewed-by: Mathieu Poirier Link: https://lore.kernel.org/r/20201208141002.17777-5-grzegorz.jaszczyk@linaro.org Signed-off-by: Bjorn Andersson commit c75c9fdac66efd8b54773368254ef330c276171b Author: Grzegorz Jaszczyk Date: Tue Dec 8 15:09:59 2020 +0100 remoteproc: pru: Add support for PRU specific interrupt configuration The firmware blob can contain optional ELF sections: .resource_table section and .pru_irq_map one. The second one contains the PRUSS interrupt mapping description, which needs to be setup before powering on the PRU core. To avoid RAM wastage this ELF section is not mapped to any ELF segment (by the firmware linker) and therefore is not loaded to PRU memory. The PRU interrupt configuration is handled within the PRUSS INTC irqchip driver and leverages the system events to interrupt channels and host interrupts mapping configuration. Relevant irq routing information is passed through a special .pru_irq_map ELF section (for interrupts routed to and used by PRU cores) or via the PRU application's device tree node (for interrupts routed to and used by the main CPU). The mappings are currently programmed during the booting/shutdown of the PRU. The interrupt configuration passed through .pru_irq_map ELF section is optional. It varies on specific firmware functionality and therefore have to be unwinded during PRU stop and performed again during PRU start. Reviewed-by: Mathieu Poirier Co-developed-by: Suman Anna Signed-off-by: Suman Anna Signed-off-by: Grzegorz Jaszczyk Link: https://lore.kernel.org/r/20201208141002.17777-4-grzegorz.jaszczyk@linaro.org Signed-off-by: Bjorn Andersson commit d4ce2de7e4af8b978eb816784d0eafc220336d52 Author: Suman Anna Date: Tue Dec 8 15:09:58 2020 +0100 remoteproc: pru: Add a PRU remoteproc driver The Programmable Real-Time Unit Subsystem (PRUSS) consists of dual 32-bit RISC cores (Programmable Real-Time Units, or PRUs) for program execution. This patch adds a remoteproc platform driver for managing the individual PRU RISC cores life cycle. The PRUs do not have a unified address space (have an Instruction RAM and a primary Data RAM at both 0x0). The PRU remoteproc driver therefore uses a custom remoteproc core ELF loader ops. The added .da_to_va ops is only used to provide translations for the PRU Data RAMs. This remoteproc driver does not have support for error recovery and system suspend/resume features. Different compatibles are used to allow providing scalability for instance-specific device data if needed. The driver uses a default firmware-name retrieved from device-tree for each PRU core, and the firmwares are expected to be present in the standard Linux firmware search paths. They can also be adjusted by userspace if required through the sysfs interface provided by the remoteproc core. The PRU remoteproc driver uses a client-driven boot methodology: it does _not_ support auto-boot so that the PRU load and boot is dictated by the corresponding client drivers for achieving various usecases. This allows flexibility for the client drivers or applications to set a firmware name (if needed) based on their desired functionality and boot the PRU. The sysfs bind and unbind attributes have also been suppressed so that the PRU devices cannot be unbound and thereby shutdown a PRU from underneath a PRU client driver. The driver currently supports the AM335x, AM437x, AM57xx and 66AK2G SoCs, and support for other TI SoCs will be added in subsequent patches. Co-developed-by: Andrew F. Davis Signed-off-by: Andrew F. Davis Signed-off-by: Suman Anna Co-developed-by: Grzegorz Jaszczyk Signed-off-by: Grzegorz Jaszczyk Reviewed-by: Mathieu Poirier Link: https://lore.kernel.org/r/20201208141002.17777-3-grzegorz.jaszczyk@linaro.org Signed-off-by: Bjorn Andersson commit d570d05ea92d8b2b45a963643be84a33c41d9f24 Author: Suman Anna Date: Tue Dec 8 15:09:57 2020 +0100 dt-bindings: remoteproc: Add binding doc for PRU cores in the PRU-ICSS The Programmable Real-Time Unit and Industrial Communication Subsystem (PRU-ICSS or simply PRUSS) on various TI SoCs consists of dual 32-bit RISC cores (Programmable Real-Time Units, or PRUs) for program execution. The K3 AM65x amd J721E SoCs have the next generation of the PRU-ICSS IP, commonly called ICSSG. The ICSSG IP on AM65x SoCs has two PRU cores, two auxiliary custom PRU cores called Real Time Units (RTUs). The K3 AM65x SR2.0 and J721E SoCs have a revised version of the ICSSG IP, and include two additional custom auxiliary PRU cores called Transmit PRUs (Tx_PRUs). This patch adds the bindings for these PRU cores. The binding covers the OMAP architecture SoCs - AM33xx, AM437x and AM57xx; Keystone 2 architecture based 66AK2G SoC; and the K3 architecture based SoCs - AM65x and J721E. The Davinci based OMAPL138 SoCs will be covered in a future patch. Reviewed-by: Rob Herring Co-developed-by: Roger Quadros Signed-off-by: Roger Quadros Signed-off-by: Suman Anna Signed-off-by: Grzegorz Jaszczyk Link: https://lore.kernel.org/r/20201208141002.17777-2-grzegorz.jaszczyk@linaro.org Signed-off-by: Bjorn Andersson commit e7f870f5fda75fcaf9de09316e6e456f5f035516 Author: Zhu Yanjun Date: Thu Dec 3 21:06:59 2020 +0200 MAINTAINERS: SOFT-ROCE: Change Zhu Yanjun's email address Change Zhu's working email to his private one. Link: https://lore.kernel.org/r/20201203190659.126932-1-leon@kernel.org Signed-off-by: Zhu Yanjun Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 7f1d2dfa307e760af13677895b4e874e9c251a5b Author: Tom Rix Date: Sat Oct 31 06:46:38 2020 -0700 RDMA/mlx5: Remove unneeded semicolon A semicolon is not needed after a switch statement. Link: https://lore.kernel.org/r/20201031134638.2135060-1-trix@redhat.com Signed-off-by: Tom Rix Signed-off-by: Jason Gunthorpe commit 41003dd0241c2ceb2461a88a18ff461795f2af57 Author: Jiri Olsa Date: Wed Dec 9 15:29:12 2020 +0100 selftests/bpf: Make selftest compilation work on clang 11 We can't compile test_core_reloc_module.c selftest with clang 11, compile fails with: CLNG-LLC [test_maps] test_core_reloc_module.o progs/test_core_reloc_module.c:57:21: error: use of unknown builtin \ '__builtin_preserve_type_info' [-Wimplicit-function-declaration] out->read_ctx_sz = bpf_core_type_size(struct bpf_testmod_test_read_ctx); Skipping these tests if __builtin_preserve_type_info() is not supported by compiler. Signed-off-by: Jiri Olsa Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201209142912.99145-1-jolsa@kernel.org commit 7535a3526dfe78db02a08ca2fa6bf69f393105dd Author: Weqaar Janjua Date: Thu Dec 10 11:54:35 2020 +0000 selftests/bpf: Xsk selftests - adding xdpxceiver to .gitignore This patch adds *xdpxceiver* to selftests/bpf/.gitignore Reported-by: Yonghong Song Suggested-by: Yonghong Song Signed-off-by: Weqaar Janjua Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20201210115435.3995-1-weqaar.a.janjua@intel.com commit a5b7b1194a57bc59f289f3e4433a1be81cc3e19d Author: Veronika Kabatova Date: Thu Dec 10 13:01:34 2020 +0100 selftests/bpf: Drop tcp-{client,server}.py from Makefile The files don't exist anymore so this breaks generic kselftest builds when using "make install" or "make gen_tar". Fixes: 247f0ec361b7 ("selftests/bpf: Drop python client/server in favor of threads") Signed-off-by: Veronika Kabatova Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20201210120134.2148482-1-vkabatov@redhat.com commit 2a0387e8128ae0c3de9ff976bc25afaae3d4a916 Author: Andy Shevchenko Date: Wed Dec 9 22:36:42 2020 +0200 misc: pvpanic: Replace OF headers by mod_devicetable.h There is no use for OF headers in the driver, but mod_devicetable.h must be included. Update driver accordingly. Cc: Peng Hao Cc: Arnd Bergmann Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201209203642.27648-5-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit f104060813fe79350565b68c1098fcea050a6504 Author: Andy Shevchenko Date: Wed Dec 9 22:36:41 2020 +0200 misc: pvpanic: Combine ACPI and platform drivers There is nothing special in the driver that requires to have a special ACPI driver for it. Combine both into simple platform driver. Cc: Peng Hao Cc: Arnd Bergmann Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201209203642.27648-4-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit ebee0cde1960a41e40840eaa8fe0185aa20e3eb5 Author: Andy Shevchenko Date: Wed Dec 9 22:36:40 2020 +0200 usb: host: sl811: Switch to use platform_get_mem_or_io() Switch to use new platform_get_mem_or_io() instead of home grown analogue. Note, the code has been moved upper in the function to allow farther cleanups, such as resource sanity check. Cc: linux-usb@vger.kernel.org Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201209203642.27648-3-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit feaba5932b6f4bfc875c874a3b7a28c7f05f5a77 Author: Andy Shevchenko Date: Wed Dec 9 22:36:39 2020 +0200 vfio: platform: Switch to use platform_get_mem_or_io() Switch to use new platform_get_mem_or_io() instead of home grown analogue. Cc: Alex Williamson Cc: Cornelia Huck Cc: kvm@vger.kernel.org Acked-by: Eric Auger Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201209203642.27648-2-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 0aec2da436623abe19b80b21dd9fc5ec9300a152 Author: Andy Shevchenko Date: Wed Dec 9 22:36:38 2020 +0200 driver core: platform: Introduce platform_get_mem_or_io() There are at least few existing users of the proposed API which retrieves either MEM or IO resource from platform device. Make it common to utilize in the existing and new users. Cc: Eric Auger Cc: Alex Williamson Cc: kvm@vger.kernel.org Cc: linux-usb@vger.kernel.org Cc: Peng Hao Cc: Arnd Bergmann Reviewed-by: Cornelia Huck Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201209203642.27648-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit d96f04d347e4011977abdbb4da5d8f303ebd26f8 Author: Alexander Sverdlin Date: Thu Dec 10 06:52:57 2020 +0100 serial: 8250_omap: Avoid FIFO corruption caused by MDR1 access It has been observed that once per 300-1300 port openings the first transmitted byte is being corrupted on AM3352 ("v" written to FIFO appeared as "e" on the wire). It only happened if single byte has been transmitted right after port open, which means, DMA is not used for this transfer and the corruption never happened afterwards. Therefore I've carefully re-read the MDR1 errata (link below), which says "when accessing the MDR1 registers that causes a dummy under-run condition that will freeze the UART in IrDA transmission. In UART mode, this may corrupt the transferred data". Strictly speaking, omap_8250_mdr1_errataset() performs a read access and if the value is the same as should be written, exits without errata-recommended FIFO reset. A brief check of the serial_omap_mdr1_errataset() from the competing omap-serial driver showed it has no read access of MDR1. After removing the read access from omap_8250_mdr1_errataset() the data corruption never happened any more. Link: https://www.ti.com/lit/er/sprz360i/sprz360i.pdf Fixes: 61929cf0169d ("tty: serial: Add 8250-core based omap driver") Cc: stable@vger.kernel.org Signed-off-by: Alexander Sverdlin Link: https://lore.kernel.org/r/20201210055257.1053028-1-alexander.sverdlin@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4661f46e50f2d658592f665be1f1f999ff647d3c Author: Fabio Estevam Date: Wed Dec 9 18:47:12 2020 -0300 serial: imx: Move imx_uart_probe_dt() content into probe() Now that the driver only probes via devicetree, we can move the content of imx_uart_probe_dt() directly into imx_uart_probe() to make the code simpler. Suggested-by: Uwe Kleine-König Reviewed-by: Uwe Kleine-König Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20201209214712.15247-1-festevam@gmail.com Signed-off-by: Greg Kroah-Hartman commit 428bb001143cf5bfb65aa4ae90d4ebc95f82d007 Author: Zhang Changzhong Date: Tue Dec 8 09:54:32 2020 +0800 slimbus: qcom: fix potential NULL dereference in qcom_slim_prg_slew() platform_get_resource_byname() may fail and in this case a NULL dereference will occur. Fix it to use devm_platform_ioremap_resource_byname() instead of calling platform_get_resource_byname() and devm_ioremap(). This is detected by Coccinelle semantic patch. @@ expression pdev, res, n, t, e, e1, e2; @@ res = \(platform_get_resource\|platform_get_resource_byname\)(pdev, t, n); + if (!res) + return -EINVAL; ... when != res == NULL e = devm_ioremap(e1, res->start, e2); Fixes: ad7fcbc308b0 ("slimbus: qcom: Add Qualcomm Slimbus controller driver") Signed-off-by: Zhang Changzhong Link: https://lore.kernel.org/r/1607392473-20610-1-git-send-email-zhangchangzhong@huawei.com Signed-off-by: Greg Kroah-Hartman commit 1c12c27086dcef853832a7cbebcb48bdac8104b6 Author: Uwe Kleine-König Date: Wed Nov 25 10:31:06 2020 +0100 siox: Make remove callback return void The driver core ignores the return value of the remove callback, so don't give siox drivers the chance to provide a value. All siox drivers only allocate devm-managed resources in .probe, so there is no .remove callback to fix. Tested-by: Thorsten Scherer Acked-by: Thorsten Scherer Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20201125093106.240643-3-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 07d9a767ae5c3a9b0cf1adccbf157a6fae780de4 Author: Uwe Kleine-König Date: Wed Nov 25 10:31:05 2020 +0100 siox: Use bus_type functions for probe, remove and shutdown The eventual goal is to get rid of the callbacks in struct device_driver. Tested-by: Thorsten Scherer Acked-by: Thorsten Scherer Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20201125093106.240643-2-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 8704fd73bf5658bf4b827643f7f526481082d83f Author: Greg Kroah-Hartman Date: Fri Nov 27 15:05:59 2020 +0100 USB: gadget: f_fs: remove likely/unlikely They are used way too often in this file, in some ways that are actually wrong. Almost all of these are already known by the compiler and CPU so just remove them all as none of these should be on any "hot paths" where it actually matters. Cc: Felipe Balbi Reported-by: Peter Chen Reviewed-by: Peter Chen Link: https://lore.kernel.org/r/20201127140559.381351-6-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit a353397b0d5dfa3c99b372505db3378fc919c6c6 Author: Jack Pham Date: Tue Oct 27 16:07:31 2020 -0700 usb: gadget: f_fs: Re-use SS descriptors for SuperSpeedPlus In many cases a function that supports SuperSpeed can very well operate in SuperSpeedPlus, if a gadget controller supports it, as the endpoint descriptors (and companion descriptors) are generally identical and can be re-used. This is true for two commonly used functions: Android's ADB and MTP. So we can simply assign the usb_function's ssp_descriptors array to point to its ss_descriptors, if available. Similarly, we need to allow an epfile's ioctl for FUNCTIONFS_ENDPOINT_DESC to correctly return the corresponding SuperSpeed endpoint descriptor in case the connected speed is SuperSpeedPlus as well. The only exception is if a function wants to implement an Isochronous endpoint capable of transferring more than 48KB per service interval when operating at greater than USB 3.1 Gen1 speed, in which case it would require an additional SuperSpeedPlus Isochronous Endpoint Companion descriptor to be returned as part of the Configuration Descriptor. Support for that would need to be separately added to the userspace-facing FunctionFS API which may not be a trivial task--likely a new descriptor format (v3?) may need to be devised to allow for separate SS and SSP descriptors to be supplied. Signed-off-by: Jack Pham Cc: stable Link: https://lore.kernel.org/r/20201027230731.9073-1-jackp@codeaurora.org Signed-off-by: Greg Kroah-Hartman commit 457a902ba1a73b7720666b21ca038cd19764db18 Author: Will McVicker Date: Fri Nov 27 15:05:57 2020 +0100 USB: gadget: f_midi: setup SuperSpeed Plus descriptors Needed for SuperSpeed Plus support for f_midi. This allows the gadget to work properly without crashing at SuperSpeed rates. Cc: Felipe Balbi Cc: stable Signed-off-by: Will McVicker Reviewed-by: Peter Chen Link: https://lore.kernel.org/r/20201127140559.381351-4-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 3ee05c20656782387aa9eb010fdb9bb16982ac3f Author: taehyun.cho Date: Fri Nov 27 15:05:56 2020 +0100 USB: gadget: f_acm: add support for SuperSpeed Plus Setup the SuperSpeed Plus descriptors for f_acm. This allows the gadget to work properly without crashing at SuperSpeed rates. Cc: Felipe Balbi Cc: stable Signed-off-by: taehyun.cho Signed-off-by: Will McVicker Reviewed-by: Peter Chen Link: https://lore.kernel.org/r/20201127140559.381351-3-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit b00f444f9add39b64d1943fa75538a1ebd54a290 Author: Will McVicker Date: Fri Nov 27 15:05:55 2020 +0100 USB: gadget: f_rndis: fix bitrate for SuperSpeed and above Align the SuperSpeed Plus bitrate for f_rndis to match f_ncm's ncm_bitrate defined by commit 1650113888fe ("usb: gadget: f_ncm: add SuperSpeed descriptors for CDC NCM"). Cc: Felipe Balbi Cc: EJ Hsu Cc: Peter Chen Cc: stable Signed-off-by: Will McVicker Reviewed-by: Peter Chen Link: https://lore.kernel.org/r/20201127140559.381351-2-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit beff5de94fd45dc68f65b45634013184b6d66519 Author: Utkarsh Patel Date: Tue Dec 8 20:24:08 2020 -0800 usb: typec: intel_pmc_mux: Configure cable generation value for USB4 USB4 specification chapter 3 indicates that cable data rates have to be rounded for USB4 device to operate as USB4. With that configure cable generation value to use rounded data rates for USB4. Reviewed-by: Heikki Krogerus  Signed-off-by: Utkarsh Patel Link: https://lore.kernel.org/r/20201209042408.23079-2-utkarsh.h.patel@intel.com Signed-off-by: Greg Kroah-Hartman commit 13719d8d0d67998435c5748998ef686a10eefb4a Merge: 2bf39ddd77937 7e1f91cbfa0d3 Author: Arnd Bergmann Date: Thu Dec 10 15:40:08 2020 +0100 Merge branch 'sparx5-next' of https://github.com/microchip-ung/linux-upstream into arm/dt * 'sparx5-next' of https://github.com/microchip-ung/linux-upstream: arm64: dts: sparx5: Add SGPIO devices arm64: dts: sparx5: Add reset support Link: https://lore.kernel.org/r/87ft4dq2q8.fsf@microchip.com Signed-off-by: Arnd Bergmann commit 7aa256234c4c86d8b8fa19a7647051b8fd9721d9 Author: Kishon Vijay Abraham I Date: Thu Dec 10 18:19:17 2020 +0530 PCI: j721e: Get offset within "syscon" from "ti,syscon-pcie-ctrl" phandle arg Get "syscon" pcie_ctrl offset from the argument of "ti,syscon-pcie-ctrl" phandle. Previously a subnode to "syscon" node was added which has the exact memory mapped address of pcie_ctrl but now the offset of pcie_ctrl within "syscon" is now being passed as argument to "ti,syscon-pcie-ctrl" phandle. If the offset is not provided in "ti,syscon-pcie-ctrl", the full memory mapped address of pcie_ctrl is used in order to maintain old DT compatibility. This change is as discussed in [1] [1] -> http://lore.kernel.org/r/CAL_JsqKiUcO76bo1GoepWM1TusJWoty_BRy2hFSgtEVMqtrvvQ@mail.gmail.com Link: https://lore.kernel.org/r/20201210124917.24185-5-kishon@ti.com Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit 17c5b458a99049eec6915bc4b2188b8540cc22b0 Author: Kishon Vijay Abraham I Date: Thu Dec 10 18:19:16 2020 +0530 dt-bindings: PCI: Add EP mode dt-bindings for TI's J7200 SoC Add PCIe EP mode dt-bindings for TI's J7200 SoC. Link: https://lore.kernel.org/r/20201210124917.24185-4-kishon@ti.com Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit 3f1f870c018ffd0db1a5a123d2090ac45c5fb9e9 Author: Kishon Vijay Abraham I Date: Thu Dec 10 18:19:15 2020 +0530 dt-bindings: PCI: Add host mode dt-bindings for TI's J7200 SoC Add host mode dt-bindings for TI's J7200 SoC. Link: https://lore.kernel.org/r/20201210124917.24185-3-kishon@ti.com Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit b6c81be9129344f66b60cc6529369cbed2ce238e Author: Kishon Vijay Abraham I Date: Thu Dec 10 18:19:14 2020 +0530 dt-bindings: pci: ti,j721e: Fix "ti,syscon-pcie-ctrl" to take argument Fix binding documentation of "ti,syscon-pcie-ctrl" to take phandle with argument. The argument is the register offset within "syscon" used to configure PCIe controller. This change is as discussed in [1] [1] -> http://lore.kernel.org/r/CAL_JsqKiUcO76bo1GoepWM1TusJWoty_BRy2hFSgtEVMqtrvvQ@mail.gmail.com Link: https://lore.kernel.org/r/20201210124917.24185-2-kishon@ti.com Fixes: 431b53b81cdc ("dt-bindings: PCI: Add host mode dt-bindings for TI's J721E SoC") Fixes: 45b39e928966 ("dt-bindings: PCI: Add EP mode dt-bindings for TI's J721E SoC") Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit 43ffe817bfe3871ffbaa1e98952a2a01b140e71e Author: Jisheng Zhang Date: Thu Dec 10 15:10:56 2020 +0530 arm64: dts: bitmain: Use generic "ngpios" rather than "snps,nr-gpios" This is to remove similar errors as below: OF: /.../gpio-port@0: could not find phandle Commit 7569486d79ae ("gpio: dwapb: Add ngpios DT-property support") explained the reason of above errors well and added the generic "ngpios" property, let's use it. Signed-off-by: Jisheng Zhang Signed-off-by: Manivannan Sadhasivam Reviewed-by: Linus Walleij Acked-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20201210094056.54553-1-manivannan.sadhasivam@linaro.org' Signed-off-by: Arnd Bergmann commit 1dcdee6ee8f8fdfef5932699129d442d2f1a064d Author: Enric Balletbo i Serra Date: Thu Dec 10 12:51:24 2020 +0100 soc: mediatek: mmsys: Specify HAS_IOMEM dependency for MTK_MMSYS Because mtk-mmsys uses the 'devm_platform_ioremap_resource' function, it should depend on HAS_IOMEM. Fixes: cc6576029aed ("soc: mediatek: mmsys: Use devm_platform_ioremap_resource()") Reported-by: kernel test robot Signed-off-by: Enric Balletbo i Serra Signed-off-by: Matthias Brugger Link: https://lore.kernel.org/r/20201203121447.3366406-1-enric.balletbo@collabora.com Signed-off-by: Arnd Bergmann commit 5d069dbe8aaf2a197142558b6fb2978189ba3454 Author: Miklos Szeredi Date: Thu Dec 10 15:33:14 2020 +0100 fuse: fix bad inode Jan Kara's analysis of the syzbot report (edited): The reproducer opens a directory on FUSE filesystem, it then attaches dnotify mark to the open directory. After that a fuse_do_getattr() call finds that attributes returned by the server are inconsistent, and calls make_bad_inode() which, among other things does: inode->i_mode = S_IFREG; This then confuses dnotify which doesn't tear down its structures properly and eventually crashes. Avoid calling make_bad_inode() on a live inode: switch to a private flag on the fuse inode. Also add the test to ops which the bad_inode_ops would have caught. This bug goes back to the initial merge of fuse in 2.6.14... Reported-by: syzbot+f427adf9324b92652ccc@syzkaller.appspotmail.com Signed-off-by: Miklos Szeredi Tested-by: Jan Kara Cc: commit 0da6736ecd10b45e535b100acd58df2db4c099d8 Author: Marek Szyprowski Date: Thu Dec 10 12:21:39 2020 +0100 regulator: max14577: Add proper module aliases strings Add proper modalias structures to let this driver load automatically if compiled as module, because max14577 MFD driver creates MFD cells with such compatible strings. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201210112139.5370-1-m.szyprowski@samsung.com Signed-off-by: Mark Brown commit 3759d5edc07598d55124d87bd292a95f79f47997 Author: Sameer Pujar Date: Thu Dec 3 20:06:42 2020 +0530 dt-bindings: tegra: Add missing HDA properties Document the missing properties which are currently required for Tegra186/Tegra194 DT files. Signed-off-by: Sameer Pujar Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1607006202-4078-3-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown commit 2d8f8955fe02c1f5d41c283f48d8c6a2a02ae17f Author: Sameer Pujar Date: Thu Dec 3 20:06:41 2020 +0530 dt-bindings: tegra: Convert HDA doc to json-schema Convert Tegra HDA doc to YAML format. Signed-off-by: Sameer Pujar Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1607006202-4078-2-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown commit fa94a951bf3553fee66e2c879b97da97bcf00589 Author: Trond Myklebust Date: Thu Dec 3 12:04:51 2020 -0500 NFSv4.2: Fix up the get/listxattr calls to rpc_prepare_reply_pages() Ensure that both getxattr and listxattr page array are correctly aligned, and that getxattr correctly accounts for the page padding word. Signed-off-by: Trond Myklebust commit b407771668334c3268d5320217ca2b46055c5232 Author: Quan Nguyen Date: Tue Dec 8 11:36:59 2020 +0700 dt-bindings: vendor-prefixes: Add an entry for AmpereComputing.com Add "ampere" entry for Ampere Computing LLC: amperecomputing.com Reviewed-by: Andrew Jeffery Reviewed-by: Joel Stanley Signed-off-by: Quan Nguyen Signed-off-by: Phong Vo Signed-off-by: Thang Q. Nguyen Link: https://lore.kernel.org/r/20201208043700.23098-2-quan@os.amperecomputing.com Signed-off-by: Rob Herring commit 4c71373162e8b62d8dc0b86bec61a9f047be7683 Author: Max Merchel Date: Mon Dec 7 10:30:36 2020 +0100 dt-bindings: vendor-prefixes: correct the spelling of TQ-Systems GmbH "TQ-Systems" is written with a dash, as can be seen on https://www.tq-group.com/en/imprint/ Signed-off-by: Max Merchel Signed-off-by: Matthias Schiffer Link: https://lore.kernel.org/r/20201207093036.29824-1-matthias.schiffer@ew.tq-group.com Signed-off-by: Rob Herring commit 8639ff4194c98c78536f6e8941a79a3a966a71f1 Author: Sumeet Pawnikar Date: Thu Dec 10 18:18:01 2020 +0530 thermal: intel: pch: use macro for temperature calculation Use macro for temperature calculation Signed-off-by: Sumeet Pawnikar Reviewed-by: Andy Shevchenko Reviewed-by: Zhang Rui Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201210124801.13850-1-sumeet.r.pawnikar@intel.com commit 49ab19a4a51a31cb06992386cec4be82ebca5a2d Merge: b0dfd948379c7 3b25f337929e7 Author: Mark Brown Date: Thu Dec 10 13:30:11 2020 +0000 Merge series "spi: spi-geni-qcom: Use gpio descriptors for CS" from Stephen Boyd : Collected patches from the two series below and associated tags so they can be merged in one pile through the spi tree. Merry December! SPI: https://lore.kernel.org/r/20201202214935.1114381-1-swboyd@chromium.org cros-ec: https://lore.kernel.org/r/20201203011649.1405292-1-swboyd@chromium.org Cc: Akash Asthana Cc: Simon Glass Cc: Gwendal Grignou Cc: Douglas Anderson Cc: Alexandru M Stan Stephen Boyd (3): platform/chrome: cros_ec_spi: Don't overwrite spi::mode platform/chrome: cros_ec_spi: Drop bits_per_word assignment spi: spi-geni-qcom: Use the new method of gpio CS control drivers/platform/chrome/cros_ec_spi.c | 2 -- drivers/spi/spi-geni-qcom.c | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) base-commit: b65054597872ce3aefbc6a666385eabdf9e288da -- https://chromeos.dev commit 50a05be484cb70d9dfb55fa5a6ed57eab193901f Author: Christian Borntraeger Date: Wed Nov 25 10:06:58 2020 +0100 KVM: s390: track synchronous pfault events in kvm_stat Right now we do count pfault (pseudo page faults aka async page faults start and completion events). What we do not count is, if an async page fault would have been possible by the host, but it was disabled by the guest (e.g. interrupts off, pfault disabled, secure execution....). Let us count those as well in the pfault_sync counter. Signed-off-by: Christian Borntraeger Reviewed-by: David Hildenbrand Reviewed-by: Cornelia Huck Link: https://lore.kernel.org/r/20201125090658.38463-1-borntraeger@de.ibm.com commit 0be47634db0baa9e91c7e635e7e73355d6a5cf43 Author: Gautham R. Shenoy Date: Thu Dec 10 16:08:59 2020 +0530 powerpc/cacheinfo: Print correct cache-sibling map/list for L2 cache On POWER platforms where only some groups of threads within a core share the L2-cache (indicated by the ibm,thread-groups device-tree property), we currently print the incorrect shared_cpu_map/list for L2-cache in the sysfs. This patch reports the correct shared_cpu_map/list on such platforms. Example: On a platform with "ibm,thread-groups" set to 00000001 00000002 00000004 00000000 00000002 00000004 00000006 00000001 00000003 00000005 00000007 00000002 00000002 00000004 00000000 00000002 00000004 00000006 00000001 00000003 00000005 00000007 This indicates that threads {0,2,4,6} in the core share the L2-cache and threads {1,3,5,7} in the core share the L2 cache. However, without the patch, the shared_cpu_map/list for L2 for CPUs 0, 1 is reported in the sysfs as follows: /sys/devices/system/cpu/cpu0/cache/index2/shared_cpu_list:0-7 /sys/devices/system/cpu/cpu0/cache/index2/shared_cpu_map:000000,000000ff /sys/devices/system/cpu/cpu1/cache/index2/shared_cpu_list:0-7 /sys/devices/system/cpu/cpu1/cache/index2/shared_cpu_map:000000,000000ff With the patch, the shared_cpu_map/list for L2 cache for CPUs 0, 1 is correctly reported as follows: /sys/devices/system/cpu/cpu0/cache/index2/shared_cpu_list:0,2,4,6 /sys/devices/system/cpu/cpu0/cache/index2/shared_cpu_map:000000,00000055 /sys/devices/system/cpu/cpu1/cache/index2/shared_cpu_list:1,3,5,7 /sys/devices/system/cpu/cpu1/cache/index2/shared_cpu_map:000000,000000aa This patch also defines cpu_l2_cache_mask() for !CONFIG_SMP case. Signed-off-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1607596739-32439-6-git-send-email-ego@linux.vnet.ibm.com commit 9538abee18cca70ffd03cef56027388b0c5084cc Author: Gautham R. Shenoy Date: Thu Dec 10 16:08:58 2020 +0530 powerpc/smp: Add support detecting thread-groups sharing L2 cache On POWER systems, groups of threads within a core sharing the L2-cache can be indicated by the "ibm,thread-groups" property array with the identifier "2". This patch adds support for detecting this, and when present, populate the populating the cpu_l2_cache_mask of every CPU to the core-siblings which share L2 with the CPU as specified in the by the "ibm,thread-groups" property array. On a platform with the following "ibm,thread-group" configuration 00000001 00000002 00000004 00000000 00000002 00000004 00000006 00000001 00000003 00000005 00000007 00000002 00000002 00000004 00000000 00000002 00000004 00000006 00000001 00000003 00000005 00000007 Without this patch, the sched-domain hierarchy for CPUs 0,1 would be CPU0 attaching sched-domain(s): domain-0: span=0,2,4,6 level=SMT domain-1: span=0-7 level=CACHE domain-2: span=0-15,24-39,48-55 level=MC domain-3: span=0-55 level=DIE CPU1 attaching sched-domain(s): domain-0: span=1,3,5,7 level=SMT domain-1: span=0-7 level=CACHE domain-2: span=0-15,24-39,48-55 level=MC domain-3: span=0-55 level=DIE The CACHE domain at 0-7 is incorrect since the ibm,thread-groups sub-array [00000002 00000002 00000004 00000000 00000002 00000004 00000006 00000001 00000003 00000005 00000007] indicates that L2 (Property "2") is shared only between the threads of a single group. There are "2" groups of threads where each group contains "4" threads each. The groups being {0,2,4,6} and {1,3,5,7}. With this patch, the sched-domain hierarchy for CPUs 0,1 would be CPU0 attaching sched-domain(s): domain-0: span=0,2,4,6 level=SMT domain-1: span=0-15,24-39,48-55 level=MC domain-2: span=0-55 level=DIE CPU1 attaching sched-domain(s): domain-0: span=1,3,5,7 level=SMT domain-1: span=0-15,24-39,48-55 level=MC domain-2: span=0-55 level=DIE The CACHE domain with span=0,2,4,6 for CPU 0 (span=1,3,5,7 for CPU 1 resp.) gets degenerated into the SMT domain. Furthermore, the last-level-cache domain gets correctly set to the SMT sched-domain. Signed-off-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1607596739-32439-5-git-send-email-ego@linux.vnet.ibm.com commit fbd2b672e91d276b9fa5a729e4a823ba29fa2692 Author: Gautham R. Shenoy Date: Thu Dec 10 16:08:57 2020 +0530 powerpc/smp: Rename init_thread_group_l1_cache_map() to make it generic init_thread_group_l1_cache_map() initializes the per-cpu cpumask thread_group_l1_cache_map with the core-siblings which share L1 cache with the CPU. Make this function generic to the cache-property (L1 or L2) and update a suitable mask. This is a preparatory patch for the next patch where we will introduce discovery of thread-groups that share L2-cache. No functional change. Signed-off-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1607596739-32439-4-git-send-email-ego@linux.vnet.ibm.com commit 1fdc1d6632ff3f6813a2f15b65586bde8fe0f0ba Author: Gautham R. Shenoy Date: Thu Dec 10 16:08:56 2020 +0530 powerpc/smp: Rename cpu_l1_cache_map as thread_group_l1_cache_map On platforms which have the "ibm,thread-groups" property, the per-cpu variable cpu_l1_cache_map keeps a track of which group of threads within the same core share the L1 cache, Instruction and Data flow. This patch renames the variable to "thread_group_l1_cache_map" to make it consistent with a subsequent patch which will introduce thread_group_l2_cache_map. This patch introduces no functional change. Signed-off-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1607596739-32439-3-git-send-email-ego@linux.vnet.ibm.com commit 790a1662d3a26fe9fa5f691386d8fde6bb8b0dc2 Author: Gautham R. Shenoy Date: Thu Dec 10 16:08:55 2020 +0530 powerpc/smp: Parse ibm,thread-groups with multiple properties The "ibm,thread-groups" device-tree property is an array that is used to indicate if groups of threads within a core share certain properties. It provides details of which property is being shared by which groups of threads. This array can encode information about multiple properties being shared by different thread-groups within the core. Example: Suppose, "ibm,thread-groups" = [1,2,4,8,10,12,14,9,11,13,15,2,2,4,8,10,12,14,9,11,13,15] This can be decomposed up into two consecutive arrays: a) [1,2,4,8,10,12,14,9,11,13,15] b) [2,2,4,8,10,12,14,9,11,13,15] where in, a) provides information of Property "1" being shared by "2" groups, each with "4" threads each. The "ibm,ppc-interrupt-server#s" of the first group is {8,10,12,14} and the "ibm,ppc-interrupt-server#s" of the second group is {9,11,13,15}. Property "1" is indicative of the thread in the group sharing L1 cache, translation cache and Instruction Data flow. b) provides information of Property "2" being shared by "2" groups, each group with "4" threads. The "ibm,ppc-interrupt-server#s" of the first group is {8,10,12,14} and the "ibm,ppc-interrupt-server#s" of the second group is {9,11,13,15}. Property "2" indicates that the threads in each group share the L2-cache. The existing code assumes that the "ibm,thread-groups" encodes information about only one property. Hence even on platforms which encode information about multiple properties being shared by the corresponding groups of threads, the current code will only pick the first one. (In the above example, it will only consider [1,2,4,8,10,12,14,9,11,13,15] but not [2,2,4,8,10,12,14,9,11,13,15]). This patch extends the parsing support on platforms which encode information about multiple properties being shared by the corresponding groups of threads. Signed-off-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1607596739-32439-2-git-send-email-ego@linux.vnet.ibm.com commit 3d2ffcdd2a982e8bbe65fa0f94fb21bf304c281e Author: Ravi Bangoria Date: Fri Nov 6 10:26:50 2020 +0530 powerpc/watchpoint: Workaround P10 DD1 issue with VSX-32 byte instructions POWER10 DD1 has an issue where it generates watchpoint exceptions when it shouldn't. The conditions where this occur are: - octword op - ending address of DAWR range is less than starting address of op - those addresses need to be in the same or in two consecutive 512B blocks - 'op address + 64B' generates an address that has a carry into bit 52 (crosses 2K boundary) Handle such spurious exception by considering them as extraneous and emulating/single-steeping instruction without generating an event. [ravi: Fixed build warning reported by lkp@intel.com] Signed-off-by: Ravi Bangoria Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201106045650.278987-1-ravi.bangoria@linux.ibm.com commit 35785b293da0070a8df19b0193f0e7de6c9eaecb Author: Balamuruhan S Date: Sun Oct 11 10:39:08 2020 +0530 powerpc/sstep: Add testcases for VSX vector paired load/store instructions Add testcases for VSX vector paired load/store instructions. Sample o/p: emulate_step_test: lxvp : PASS emulate_step_test: stxvp : PASS emulate_step_test: lxvpx : PASS emulate_step_test: stxvpx : PASS emulate_step_test: plxvp : PASS emulate_step_test: pstxvp : PASS Signed-off-by: Balamuruhan S Signed-off-by: Ravi Bangoria Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201011050908.72173-6-ravi.bangoria@linux.ibm.com commit 6ce73ba7691555fd182bc68529dc03cbd4378f72 Author: Balamuruhan S Date: Sun Oct 11 10:39:07 2020 +0530 powerpc/ppc-opcode: Add encoding macros for VSX vector paired instructions Add instruction encodings, DQ, D0, D1 immediate, XTP, XSP operands as macros for new VSX vector paired instructions, * Load VSX Vector Paired (lxvp) * Load VSX Vector Paired Indexed (lxvpx) * Prefixed Load VSX Vector Paired (plxvp) * Store VSX Vector Paired (stxvp) * Store VSX Vector Paired Indexed (stxvpx) * Prefixed Store VSX Vector Paired (pstxvp) Suggested-by: Naveen N. Rao Signed-off-by: Balamuruhan S Signed-off-by: Ravi Bangoria Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201011050908.72173-5-ravi.bangoria@linux.ibm.com commit af99da74333b06d97ea6a9a2cd8906244da4bb26 Author: Balamuruhan S Date: Sun Oct 11 10:39:06 2020 +0530 powerpc/sstep: Support VSX vector paired storage access instructions VSX Vector Paired instructions loads/stores an octword (32 bytes) from/to storage into two sequential VSRs. Add emulation support for these new instructions: * Load VSX Vector Paired (lxvp) * Load VSX Vector Paired Indexed (lxvpx) * Prefixed Load VSX Vector Paired (plxvp) * Store VSX Vector Paired (stxvp) * Store VSX Vector Paired Indexed (stxvpx) * Prefixed Store VSX Vector Paired (pstxvp) [kernel test robot reported a build failure] Reported-by: kernel test robot Suggested-by: Naveen N. Rao Signed-off-by: Balamuruhan S Signed-off-by: Ravi Bangoria Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201011050908.72173-4-ravi.bangoria@linux.ibm.com commit 1817de2f141c718f1a0ae59927ec003e9b144349 Author: Ravi Bangoria Date: Sun Oct 11 10:39:05 2020 +0530 powerpc/sstep: Cover new VSX instructions under CONFIG_VSX Recently added Power10 prefixed VSX instruction are included unconditionally in the kernel. If they are executed on a machine without VSX support, it might create issues. Fix that. Also fix one mnemonics spelling mistake in comment. Fixes: 50b80a12e4cc ("powerpc sstep: Add support for prefixed load/stores") Signed-off-by: Ravi Bangoria Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201011050908.72173-3-ravi.bangoria@linux.ibm.com commit ef6879f8c8053cc3b493f400a06d452d7fb13650 Author: Balamuruhan S Date: Sun Oct 11 10:39:04 2020 +0530 powerpc/sstep: Emulate prefixed instructions only when CPU_FTR_ARCH_31 is set Unconditional emulation of prefixed instructions will allow emulation of them on Power10 predecessors which might cause issues. Restrict that. Fixes: 3920742b92f5 ("powerpc sstep: Add support for prefixed fixed-point arithmetic") Fixes: 50b80a12e4cc ("powerpc sstep: Add support for prefixed load/stores") Signed-off-by: Balamuruhan S Signed-off-by: Ravi Bangoria Reviewed-by: Sandipan Das Reviewed-by: Daniel Axtens Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201011050908.72173-2-ravi.bangoria@linux.ibm.com commit efaa83a3736d392c61499ee3aad8690a142675cd Author: Collin Walling Date: Mon Dec 7 10:41:25 2020 -0500 KVM: selftests: sync_regs test for diag318 The DIAGNOSE 0x0318 instruction, unique to s390x, is a privileged call that must be intercepted via SIE, handled in userspace, and the information set by the instruction is communicated back to KVM. To test the instruction interception, an ad-hoc handler is defined which simply has a VM execute the instruction and then userspace will extract the necessary info. The handler is defined such that the instruction invocation occurs only once. It is up to the caller to determine how the info returned by this handler should be used. The diag318 info is communicated from userspace to KVM via a sync_regs call. This is tested during a sync_regs test, where the diag318 info is requested via the handler, then the info is stored in the appropriate register in KVM via a sync registers call. If KVM does not support diag318, then the tests will print a message stating that diag318 was skipped, and the asserts will simply test against a value of 0. Signed-off-by: Collin Walling Link: https://lore.kernel.org/r/20201207154125.10322-1-walling@linux.ibm.com Acked-by: Janosch Frank Acked-by: Cornelia Huck Reviewed-by: Christian Borntraeger Signed-off-by: Christian Borntraeger commit 0cd2a787cffb5750ba2e7b5de39a6f3d1dfc17e9 Author: Christian Borntraeger Date: Mon Nov 9 13:14:35 2020 +0100 s390/gmap: make gmap memcg aware gmap allocations can be attributed to a process. Signed-off-by: Christian Borntraeger Acked-by: Heiko Carstens Acked-by: Janosch Frank Acked-by: Cornelia Huck commit c4196218737137b8e8cf7d0c375765f4f36cb591 Author: Christian Borntraeger Date: Fri Nov 6 08:34:23 2020 +0100 KVM: s390: Add memcg accounting to KVM allocations Almost all kvm allocations in the s390x KVM code can be attributed to the process that triggers the allocation (in other words, no global allocation for other guests). This will help the memcg controller to make the right decisions. Signed-off-by: Christian Borntraeger Acked-by: Janosch Frank Acked-by: Cornelia Huck commit 02b02ee1b05ef225525835b2d45faf31b3420bdd Author: Nicholas Piggin Date: Thu Jul 11 12:24:04 2019 +1000 powerpc/64s: Remove idle workaround code from restore_cpu_cpufeatures Idle code no longer uses the .cpu_restore CPU operation to restore SPRs, so this workaround is no longer required. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190711022404.18132-2-npiggin@gmail.com commit aa8e21c053d72b6639ea5a7f1d3a1d0209534c94 Author: Athira Rajeev Date: Wed Nov 25 02:26:55 2020 -0500 powerpc/perf: Exclude kernel samples while counting events in user space. Perf event attritube supports exclude_kernel flag to avoid sampling/profiling in supervisor state (kernel). Based on this event attr flag, Monitor Mode Control Register bit is set to freeze on supervisor state. But sometimes (due to hardware limitation), Sampled Instruction Address Register (SIAR) locks on to kernel address even when freeze on supervisor is set. Patch here adds a check to drop those samples. Cc: stable@vger.kernel.org Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1606289215-1433-1-git-send-email-atrajeev@linux.vnet.ibm.com commit 660c486590aa4190969653218643b3a4e5660f2b Author: Vidya Sagar Date: Tue Nov 17 22:23:12 2020 +0530 PCI: dwc: Set 32-bit DMA mask for MSI target address allocation Set DMA mask to 32-bit while allocating the MSI target address so that the address is usable for both 32-bit and 64-bit MSI capable devices. Throw a warning if it fails to set the mask to 32-bit to alert that devices that are only 32-bit MSI capable may not work properly. Link: https://lore.kernel.org/r/20201117165312.25847-1-vidyas@nvidia.com Signed-off-by: Vidya Sagar Signed-off-by: Lorenzo Pieralisi Reviewed-by: Robin Murphy commit 729a866af3b3f63ccdb91b3af61f3e07b668b757 Author: Srinivas Pandruvada Date: Thu Nov 26 09:18:29 2020 -0800 thermal: int340x: processor_thermal: Add mailbox driver Added processor thermal device mail box interface for workload hints setting. These hints will give indication to hardware to better manage power and thermals. The supported hints are: idle semi_active burusty sustained battery_life For example when the system is on battery, the hardware can be less aggressive in power ramp up. This will create an attribute group at /sys/bus/pci/devices/0000:00:04.0/workload_request This folder contains two attributes: workload_available_types : (RO): This shows available workload types workload_type: (RW) : Allows to set and get current workload type setting Signed-off-by: Srinivas Pandruvada Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201126171829.945969-4-srinivas.pandruvada@linux.intel.com commit 473be51142adba7ce769da728a37c8e80a343e27 Author: Srinivas Pandruvada Date: Thu Nov 26 09:18:28 2020 -0800 thermal: int340x: processor_thermal: Add RFIM driver Add support for RFIM (Radio Frequency Interference Mitigation) support via processor thermal PCI device. This drivers allows adjustment of FIVR (Fully Integrated Voltage Regulator) and DDR (Double Data Rate) frequencies to avoid RF interference with WiFi and 5G. Switching voltage regulators (VR) generate radiated EMI or RFI at the fundamental frequency and its harmonics. Some harmonics may interfere with very sensitive wireless receivers such as Wi-Fi and cellular that are integrated into host systems like notebook PCs. One of mitigation methods is requesting SOC integrated VR (IVR) switching frequency to a small % and shift away the switching noise harmonic interference from radio channels. OEM or ODMs can use the driver to control SOC IVR operation within the range where it does not impact IVR performance. DRAM devices of DDR IO interface and their power plane can generate EMI at the data rates. Similar to IVR control mechanism, Intel offers a mechanism by which DDR data rates can be changed if several conditions are met: there is strong RFI interference because of DDR; CPU power management has no other restriction in changing DDR data rates; PC ODMs enable this feature (real time DDR RFI Mitigation referred to as DDR-RFIM) for Wi-Fi from BIOS. This change exports two folders under /sys/bus/pci/devices/0000:00:04.0. One folder "fivr" contains all attributes exposed for controling FIVR features. The other folder "dvfs" contains all attributes for DDR features. Changes done to implement: - New module for rfim interfaces - Two new per processor features for DDR and FIVR - Enable feature for Tiger Lake (FIVR only) and Alder Lake The attributes exposed and explanation: FIVR attributes vco_ref_code_lo (RW): The VCO reference code is an 11-bit field and controls the FIVR switching frequency. This is the 3-bit LSB field. vco_ref_code_hi (RW): The VCO reference code is an 11-bit field and controls the FIVR switching frequency. This is the 8-bit MSB field. spread_spectrum_pct (RW): Set the FIVR spread spectrum clocking percentage spread_spectrum_clk_enable (RW): Enable/disable of the FIVR spread spectrum clocking feature rfi_vco_ref_code (RW): This field is a read only status register which reflects the current FIVR switching frequency fivr_fffc_rev (RW): This field indicated the revision of the FIVR HW. DVFS attributes rfi_restriction_run_busy (RW): Request the restriction of specific DDR data rate and set this value 1. Self reset to 0 after operation. rfi_restriction_err_code (RW): Values: 0 :Request is accepted, 1:Feature disabled, 2: the request restricts more points than it is allowed rfi_restriction_data_rate_Delta (RW): Restricted DDR data rate for RFI protection: Lower Limit rfi_restriction_data_rate_Base (RW): Restricted DDR data rate for RFI protection: Upper Limit ddr_data_rate_point_0 (RO): DDR data rate selection 1st point ddr_data_rate_point_1 (RO): DDR data rate selection 2nd point ddr_data_rate_point_2 (RO): DDR data rate selection 3rd point ddr_data_rate_point_3 (RO): DDR data rate selection 4th point rfi_disable (RW): Disable DDR rate change feature Signed-off-by: Srinivas Pandruvada Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201126171829.945969-3-srinivas.pandruvada@linux.intel.com commit df2537f910400cd4f90d2ecb40a0a1a204d8470c Author: Srinivas Pandruvada Date: Thu Nov 26 09:18:27 2020 -0800 thermal: int340x: processor_thermal: Add AlderLake PCI device id Added AlderLake PCI device id to support processor thermal driver. Reuse the feature set (just includes RAPL) from previous generations. Signed-off-by: Srinivas Pandruvada Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201126171829.945969-2-srinivas.pandruvada@linux.intel.com commit a5923b6c3137b9d4fc2ea1c997f6e4d51ac5d774 Author: Srinivas Pandruvada Date: Thu Nov 26 09:18:26 2020 -0800 thermal: int340x: processor_thermal: Refactor MMIO interface The Processor Thermal PCI device supports multiple features. Currently we export only RAPL. But we need more features from this device exposed for Tiger Lake and Alder Lake based platforms. So re-structure the current MMIO interface, so that more features can be added cleanly. No functional changes are expected with this change. Changes done in this patch: - Using PCI_DEVICE_DATA(), hence names of defines changed - Move RAPL MMIO code to its own module - Move the RAPL MMIO offsets to RAPL MMIO module - Adjust Kconfig dependency of PROC_THERMAL_MMIO_RAPL - Per processor driver data now contains the supported features - Moved all the common data structures and defines to a common header file - This new header file contains all the processor_thermal_* interfaces - Based on the features supported the module interface is called - Each module atleast provides one add and one remove function Signed-off-by: Srinivas Pandruvada Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201126171829.945969-1-srinivas.pandruvada@linux.intel.com commit 7e1f91cbfa0d330fad61c621389373cff81898fd Author: Lars Povlsen Date: Fri Nov 13 15:51:51 2020 +0100 arm64: dts: sparx5: Add SGPIO devices This adds SGPIO devices for the Sparx5 SoC and configures it for the applicable reference boards. Signed-off-by: Lars Povlsen Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20201113145151.68900-4-lars.povlsen@microchip.com commit 5ef399aa5c5f9c4c2ac9208d1f00e935f13012ce Author: Lars Povlsen Date: Tue Oct 6 22:03:16 2020 +0200 arm64: dts: sparx5: Add reset support This adds reset support to the Sparx5 SoC DT. Signed-off-by: Lars Povlsen Link: https://lore.kernel.org/r/20201006200316.2261245-4-lars.povlsen@microchip.com commit d2a968dddf98b837de9f9b3f954537c86c9a9f81 Merge: 8010622c86ca5 8435ff0fd7e15 Author: Greg Kroah-Hartman Date: Thu Dec 10 11:30:31 2020 +0100 Merge tag 'usb-v5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-next Peter writes: Below are main changes for v5.11-rc1: For Chipidea USB2: - Add tracepoint support for UDC - Some tiny improvements For Cadence USB3 - Add some quirks for host mode, and let host work well at more use cases * SKIP_PHY_INIT * Disable BEI * Enable runtime PM default for i.mx platform - Some tiny improvements * tag 'usb-v5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb: MAINTAINERS: Add myself as a reviewer for CADENCE USB3 DRD IP DRIVER usb: chipidea: ci_hdrc_imx: Use of_device_get_match_data() usb: chipidea: usbmisc_imx: Use of_device_get_match_data() usb: cdns3: fix NULL pointer dereference on no platform data usb: chipidea: trace: fix the endian issue usb: chipidea: add tracepoint support for udc doc: dt-binding: cdns,usb3: add wakeup-irq usb: cdns3: imx: enable runtime pm by default usb: cdns3: add quirk for enable runtime pm by default usb: cdns3: host: disable BEI support usb: cdns3: host: add xhci_plat_priv quirk XHCI_SKIP_PHY_INIT usb: cdns3: host: add .suspend_quirk for xhci-plat.c usb: cdns3: Rids of duplicate error message usb: cdns3: Add static to cdns3_gadget_exit function commit d40c2d4ed62df64ce603c208bceff25245380157 Author: Hsin-Hsiung Wang Date: Wed Dec 9 18:33:43 2020 -0800 spmi: Add driver shutdown support Add new shutdown() method. Use it in the standard driver model style. Link: https://lore.kernel.org/r/1603187810-30481-2-git-send-email-hsin-hsiung.wang@mediatek.com Signed-off-by: Hsin-Hsiung Wang Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20201210023344.2838141-4-sboyd@kernel.org Signed-off-by: Greg Kroah-Hartman commit 0be0a733c9cd396c3900ac10873419d8b21bfd39 Author: Mauro Carvalho Chehab Date: Wed Dec 9 18:33:42 2020 -0800 spmi: fix some coding style issues at the spmi core While preparing to port the HiSilicon 6421v600 SPMI driver, I noticed some coding style issues at the SPMI core. Address them. Link: https://lore.kernel.org/r/fec878502147336cbf2cf86e476e9dd797cd7e6f.1601360391.git.mchehab+huawei@kernel.org Reviewed-by: Stephen Boyd Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20201210023344.2838141-3-sboyd@kernel.org Signed-off-by: Greg Kroah-Hartman commit b1f0aeecd25ac11053997484510a43346297a42d Author: Mauro Carvalho Chehab Date: Wed Dec 9 18:33:41 2020 -0800 spmi: get rid of a warning when built with W=1 The SPMI core complaing with this warning when built with W=1: drivers/spmi/spmi.c: In function ‘spmi_controller_remove’: drivers/spmi/spmi.c:548:6: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable] 548 | int dummy; | ^~~~~ As the dummy var isn't needed, remove it. Link: https://lore.kernel.org/r/aacfd03835b7d1b3b6c21665b44000fe7242e535.1601360391.git.mchehab+huawei@kernel.org Reviewed-by: Stephen Boyd Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20201210023344.2838141-2-sboyd@kernel.org Signed-off-by: Greg Kroah-Hartman commit ee42bedc85a6e87791d5c20da6f2d150188cde54 Author: Manivannan Sadhasivam Date: Tue Dec 1 11:10:19 2020 +0530 can: mcp251xfd: Add support for internal loopback mode MCP251xFD supports internal loopback mode which can be used to verify CAN functionality in the absence of a real CAN device. Link: https://lore.kernel.org/r/20201201054019.11012-1-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam [mkl: mcp251xfd_get_normal_mode(): move CAN_CTRLMODE_LOOPBACK check to front] Signed-off-by: Marc Kleine-Budde commit 2c0ac9208135c75b9afec67b2819329ff41a5355 Author: Fabio Estevam Date: Sat Nov 28 10:28:55 2020 -0300 can: flexcan: convert the driver to DT-only The flexcan driver runs only on DT platforms, so simplify the code by using of_device_get_match_data() to retrieve the driver data and also by removing the unused id_table. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20201128132855.7724-1-festevam@gmail.com Signed-off-by: Marc Kleine-Budde commit cab7ffc0324f053c8fb56c821cdd63dc0383270d Author: Jarkko Nikula Date: Tue Nov 17 18:08:27 2020 +0200 can: m_can: add PCI glue driver for Intel Elkhart Lake Add support for M_CAN controller on Intel Elkhart Lake attached to the PCI bus. It integrates the Bosch M_CAN controller with Message RAM and the wrapper IP block with additional registers which all of them are within the same MMIO range. Currently only interrupt control register from wrapper IP is used and the MRAM configuration is expected to come from the firmware via "bosch,mram-cfg" device property and parsed by m_can.c core. Initial implementation is done by Felipe Balbi while he was working at Intel with later changes from Raymond Tan and me. Co-developed-by: Felipe Balbi (Intel) Co-developed-by: Raymond Tan Signed-off-by: Felipe Balbi (Intel) Signed-off-by: Raymond Tan Signed-off-by: Jarkko Nikula Link: https://lore.kernel.org/r/20201117160827.3636264-1-jarkko.nikula@linux.intel.com Signed-off-by: Marc Kleine-Budde commit 227619c3ff7c71eab76848b3b2add06838f5b6e6 Author: Patrik Flykt Date: Fri Oct 23 14:58:00 2020 +0300 can: m_can: move runtime PM enable/disable to m_can_platform This is a preparatory patch for upcoming PCI based M_CAN devices. The current PM implementation would cause PCI based drivers to enable PM twice, once when the PCI device is added and a second time in m_can_class_register(). This will cause 'Unbalanced pm_runtime_enable!' to be logged, and is a situation that should be avoided. Therefore, in anticipation of PCI devices, move PM enabling out from M_CAN class registration to its only user, the m_can_platform driver. Signed-off-by: Patrik Flykt Link: https://lore.kernel.org/r/20201023115800.46538-2-patrik.flykt@linux.intel.com [mkl: m_can_plat_probe(): fix error handling m_can_class_register(): simplify error handling] Signed-off-by: Marc Kleine-Budde commit 8435ff0fd7e15ab4ec9e53107c9afefa23717e0f Author: Aswath Govindraju Date: Tue Dec 8 10:38:06 2020 +0530 MAINTAINERS: Add myself as a reviewer for CADENCE USB3 DRD IP DRIVER I would like to help in reviewing CADENCE USB3 DRD IP DRIVER patches Signed-off-by: Aswath Govindraju Signed-off-by: Peter Chen commit 59b7c6a8fd6c44d2683d02d63e137d0c11855c32 Author: Fabio Estevam Date: Tue Nov 24 13:39:12 2020 -0300 usb: chipidea: ci_hdrc_imx: Use of_device_get_match_data() The retrieval of driver data via of_device_get_match_data() can make the code simpler. Use of_device_get_match_data() to simplify the code. Signed-off-by: Fabio Estevam Signed-off-by: Peter Chen commit 58bcafec8062f7566b736a019c3506949f9be6d3 Author: Fabio Estevam Date: Tue Nov 24 13:39:11 2020 -0300 usb: chipidea: usbmisc_imx: Use of_device_get_match_data() The retrieval of driver data via of_device_get_match_data() can make the code simpler. Use of_device_get_match_data() to simplify the code. Signed-off-by: Fabio Estevam Signed-off-by: Peter Chen commit 448373d9db1a7000072f65103af19e20503f0c0c Author: Roger Quadros Date: Mon Nov 23 12:49:31 2020 +0200 usb: cdns3: fix NULL pointer dereference on no platform data Some platforms (e.g. TI) will not have any platform data which will lead to NULL pointer dereference if we don't check for NULL pdata. Fixes: 7cea9657756b ("usb: cdns3: add quirk for enable runtime pm by default") Reported-by: Nishanth Menon Signed-off-by: Roger Quadros Acked-by: Pawel Laszczak Signed-off-by: Peter Chen commit c9f4cad6cdfe350ce2637e57f7f2aa7ff326bcc6 Author: Sean Nyekjaer Date: Wed Dec 11 07:32:27 2019 +0100 can: m_can: m_can_config_endisable(): remove double clearing of clock stop request bit The CSR bit is already cleared when arriving here so remove this section of duplicate code. The registers set in m_can_config_endisable() is set to same exact values as before this patch. Signed-off-by: Sean Nyekjaer Acked-by: Sriram Dash Acked-by: Dan Murphy Link: https://lore.kernel.org/r/20191211063227.84259-1-sean@geanix.com Fixes: f524f829b75a ("can: m_can: Create a m_can platform framework") Signed-off-by: Marc Kleine-Budde commit ecbaf5e13f45d8eebd3b772ba0032afcec1e519a Author: Antonio Quartulli Date: Thu Dec 10 09:53:21 2020 +0100 can: rx-offload: can_rx_offload_offload_one(): avoid double unlikely() notation when using IS_ERR() The definition of IS_ERR() already applies the unlikely() notation when checking the error status of the passed pointer. For this reason there is no need to have the same notation outside of IS_ERR() itself. Clean up code by removing redundant notation. Signed-off-by: Antonio Quartulli Link: https://lore.kernel.org/r/20201210085321.18693-1-a@unstable.cc Signed-off-by: Marc Kleine-Budde commit 921ca574cd382142add8b12d0a7117f495510de5 Author: Oliver Hartkopp Date: Sun Dec 6 15:47:31 2020 +0100 can: isotp: add SF_BROADCAST support for functional addressing When CAN_ISOTP_SF_BROADCAST is set in the CAN_ISOTP_OPTS flags the CAN_ISOTP socket is switched into functional addressing mode, where only single frame (SF) protocol data units can be send on the specified CAN interface and the given tp.tx_id after bind(). In opposite to normal and extended addressing this socket does not register a CAN-ID for reception which would be needed for a 1-to-1 ISOTP connection with a segmented bi-directional data transfer. Sending SFs on this socket is therefore a TX-only 'broadcast' operation. Signed-off-by: Oliver Hartkopp Signed-off-by: Thomas Wagner Link: https://lore.kernel.org/r/20201206144731.4609-1-socketcan@hartkopp.net Signed-off-by: Marc Kleine-Budde commit f5c50b1fed55332beb88e81e9e17c49673b77344 Author: Yoshihiro Shimoda Date: Thu Nov 5 11:32:04 2020 +0900 dt-bindings: clock: renesas: rcar-usb2-clock-sel: Convert bindings to json-schema Convert Renesas R-Car USB 2.0 clock selector bindings documentation to json-schema. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1604543524-31482-1-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Geert Uytterhoeven commit fd0d8ed7c1b430f7e4a0a823a924ae3c849d74a3 Author: Geert Uytterhoeven Date: Thu Nov 19 13:50:53 2020 +0100 clk: renesas: sh73a0: Stop using __raw_*() I/O accessors There is no reason to keep on using the __raw_{read,write}l() I/O accessors in Renesas ARM driver code. Switch to using the plain {read,write}l() I/O accessors, to have a chance that this works on big-endian. Suggested-by: Arnd Bergmann Signed-off-by: Geert Uytterhoeven Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20201119125053.4065746-1-geert+renesas@glider.be commit 40745482eec81bea686cd1b38693191dc7e9ac66 Author: Lad Prabhakar Date: Mon Nov 16 10:10:02 2020 +0000 clk: renesas: r8a774c0: Add RPC clocks Describe the RPCSRC internal clock and the RPC[D2] clocks derived from it, as well as the RPC-IF module clock, in the RZ/G2E (R8A774C0) CPG/MSSR driver. Add new clk type CLK_TYPE_GEN3_E3_RPCSRC to register rpcsrc as a fixed clock on R-Car Gen3 E3 (and also RZ/G2E which is identical to E3 SoC), parent and the divider is set based on the register value CPG_RPCCKCR[4:3] which has been set prior to booting the kernel. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Link: https://lore.kernel.org/r/20201116101002.5986-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 14653942de7f63e21ece32e3901f09a248598a43 Author: Geert Uytterhoeven Date: Mon Nov 9 16:26:14 2020 +0100 clk: renesas: r8a779a0: Fix R and OSC clocks The R-Car V3U clock driver defines the R and OSC clocks using R-Car Gen3 clock types. However, The R-Car V3U clock driver does not use the R-Car Gen3 clock driver core, hence registering the R and OSC clocks fails: renesas-cpg-mssr e6150000.clock-controller: Failed to register core clock osc: -22 renesas-cpg-mssr e6150000.clock-controller: Failed to register core clock r: -22 Fix this by introducing clock definition macros specific to R-Car V3U. Note that rcar_r8a779a0_cpg_clk_register() already handled the related clock types. Drop the now unneeded include of rcar-gen3-cpg.h. Fixes: 17bcc8035d2d19fc ("clk: renesas: cpg-mssr: Add support for R-Car V3U") Signed-off-by: Geert Uytterhoeven Tested-by: Yoshihiro Shimoda Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20201109152614.2465483-1-geert+renesas@glider.be commit b5fb3b8859a491ff31e933927809f17a4e39459f Author: Krzysztof Kozlowski Date: Tue Nov 3 17:24:34 2020 +0100 clk: renesas: cpg-mssr: fix kerneldoc of cpg_mssr_priv The struct cpg_mssr_priv missed proper formatting: drivers/clk/renesas/renesas-cpg-mssr.c:142: warning: cannot understand function prototype: 'struct cpg_mssr_priv ' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201103162435.13689-7-krzk@kernel.org Signed-off-by: Geert Uytterhoeven commit 4ef39a80da8b15ed933d387bc02ec14df4f4f1a7 Author: Yejune Deng Date: Tue Nov 3 11:44:53 2020 +0800 clk: renesas: rcar-usb2-clock-sel: Replace devm_reset_control_array_get() devm_reset_control_array_get_shared() looks more readable Signed-off-by: Yejune Deng Link: https://lore.kernel.org/r/1604375093-6451-1-git-send-email-yejune.deng@gmail.com Signed-off-by: Geert Uytterhoeven commit fb9805c51793339e0affbc8e3ce2b3210b41c9fa Author: Biju Das Date: Fri Oct 16 13:17:08 2020 +0100 clk: renesas: r8a774b1: Add RPC clocks Describe the RPCSRC internal clock and the RPC[D2] clocks derived from it, as well as the RPC-IF module clock, in the RZ/G2N (R8A774B1) CPG/MSSR driver. Inspired by commit 94e3935b5756 ("clk: renesas: r8a77980: Add RPC clocks"). Signed-off-by: Biju Das Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/20201016121709.8447-4-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 13d2617bf224351e78141183ca51971df83a9dd5 Author: Biju Das Date: Fri Oct 16 13:17:07 2020 +0100 clk: renesas: r8a774a1: Add RPC clocks Describe the RPCSRC internal clock and the RPC[D2] clocks derived from it, as well as the RPC-IF module clock, in the RZ/G2M (R8A774A1) CPG/MSSR driver. Inspired by commit 94e3935b5756 ("clk: renesas: r8a77980: Add RPC clocks"). Signed-off-by: Biju Das Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/20201016121709.8447-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 874d4eee5421d08fd220adffc32da307f8b7c964 Author: Jacopo Mondi Date: Fri Oct 16 13:11:56 2020 +0200 clk: renesas: r8a779a0: Add VIN clocks Add definitions of the VIN instance clocks for R-Car V3U. Signed-off-by: Jacopo Mondi Link: https://lore.kernel.org/r/20201016111158.17521-5-jacopo+renesas@jmondi.org Signed-off-by: Geert Uytterhoeven commit 23378e70ca286de32cedcf6505af734b034148dc Author: Jacopo Mondi Date: Fri Oct 16 13:11:53 2020 +0200 clk: renesas: r8a779a0: Add CSI4[0-3] clocks Add definitions of the CSI-2 receiver clocks for R-Car V3U. Signed-off-by: Jacopo Mondi Link: https://lore.kernel.org/r/20201016111158.17521-2-jacopo+renesas@jmondi.org Signed-off-by: Geert Uytterhoeven commit 043585760f5191926467862c01a0893c2fefb359 Author: Geert Uytterhoeven Date: Fri Sep 25 13:07:13 2020 +0200 MAINTAINERS: Update git repo for Renesas clock drivers Align the clock branch name with other renesas-* branches pulled by subsystem maintainers. Signed-off-by: Geert Uytterhoeven Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/20200925110713.2652-1-geert+renesas@glider.be commit 0ca995f5c7110c13795cf82c18639175e2ee20f2 Author: Geert Uytterhoeven Date: Thu Sep 24 13:18:08 2020 +0200 clk: renesas: r8a779a0: Make rcar_r8a779a0_cpg_clk_register() static When compiling with clang: drivers/clk/renesas/r8a779a0-cpg-mssr.c:156:21: warning: no previous prototype for function 'rcar_r8a779a0_cpg_clk_register' [-Wmissing-prototypes] struct clk * __init rcar_r8a779a0_cpg_clk_register(struct device *dev, ^ drivers/clk/renesas/r8a779a0-cpg-mssr.c:156:1: note: declare 'static' if the function is not intended to be used outside of this translation unit struct clk * __init rcar_r8a779a0_cpg_clk_register(struct device *dev, ^ static Similarly, with sparse: drivers/clk/renesas/r8a779a0-cpg-mssr.c:156:12: warning: symbol 'rcar_r8a779a0_cpg_clk_register' was not declared. Should it be static? There are no users of rcar_r8a779a0_cpg_clk_register() outside this file, so it should be static. Fixes: 17bcc8035d2d19fc ("clk: renesas: cpg-mssr: Add support for R-Car V3U") Reported-by: kernel test robot Signed-off-by: Geert Uytterhoeven Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20200924111808.15358-1-geert+renesas@glider.be commit 92de5fa2dc39c3fba0704f7ac914e7f02eb732f2 Author: Dave Jiang Date: Fri Nov 13 15:55:05 2020 -0700 dmaengine: idxd: add ATS disable knob for work queues With the DSA spec 1.1 update, a knob to disable ATS for individually is introduced. Add enabling code to allow a system admin to make the configuration through sysfs. Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/160530810593.1288392.2561048329116529566.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit b10733527bfd864605c33ab2e9a886eec317ec39 Merge: 60f2f74978e69 f8aab60422c37 Author: Dave Airlie Date: Thu Dec 10 16:55:41 2020 +1000 Merge tag 'amd-drm-next-5.11-2020-12-09' of git://people.freedesktop.org/~agd5f/linux into drm-next amd-drm-next-5.11-2020-12-09: amdgpu: - SR-IOV fixes - Navy Flounder updates - Sienna Cichlid updates - Dimgrey Cavefish updates - Vangogh updates - Misc SMU fixes - Misc display fixes - Last big hunk of W=1 warning fixes - Cursor validation fixes - CI BACO updates From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20201210045344.21566-1-alexander.deucher@amd.com Signed-off-by: Dave Airlie commit a7105e3472bf6bb3099d1293ea7d70e7783aa582 Merge: c0ead5552c0fc cdab7c9779709 Author: David S. Miller Date: Wed Dec 9 20:33:20 2020 -0800 Merge branch 'hns3-next' Huazhong Tan says: ==================== net: hns3: updates for -next This patchset adds support for tc mqprio offload, hw tc offload of tc flower, and adpation for max rss size changes. ==================== Signed-off-by: David S. Miller commit cdab7c9779709755de90b9d017df2682f797e2bb Author: Guojia Liao Date: Thu Dec 10 11:42:12 2020 +0800 net: hns3: adjust rss tc mode configure command For the max rss size of PF may be up to 512, the max queue number of single tc may be up to 512 too. For the total queue numbers may be up to 1280, so the queue offset of each tc may be more than 1024. So adjust the rss tc mode configuration command, including extend tc size field from 10 bits to 11 bits, and extend tc size field from 3 bits to 4 bits. Signed-off-by: Guojia Liao Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 8eeb1f4bce68e91dea52d1832b89fed3a984cb58 Author: Guojia Liao Date: Thu Dec 10 11:42:11 2020 +0800 net: hns3: adjust rss indirection table configure command For the max rss size of PF may be up to 512, so adjust the command of configuring rss indirection table to support queue id larger than 255. The width of queue id is extended from 8 bits to 10 bits. The high 2 bits are stored in filed rss_qid_h when the queue id is larger than 255. Signed-off-by: Guojia Liao Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit f1c2e66d7f38cb1e919bd594af4ad4a9ae8344cc Author: Guojia Liao Date: Thu Dec 10 11:42:10 2020 +0800 net: hns3: add support for max 512 rss size Currently, the driver gets the max rss size from configuration file when initialization. Both the PF and VF share the same max rss size, and no more than 128. For DEVICE_VERSION_V3, the max rss size for PF can be up to 512, so there is a new field in configuration file to store it, the old filed is used for VF. To be compatible with boards using old configure file, the PF will use the old filed if the one is zero. For the rss size may be larger than 256, so the type of rss_indirection_tbl of struct hclge_vport should be changed to u16 as well. Signed-off-by: Guojia Liao Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 0205ec041ec61838f80f092e4232a8e5de4ee55f Author: Jian Shen Date: Thu Dec 10 11:42:09 2020 +0800 net: hns3: add support for hw tc offload of tc flower Some new device supports forwarding packet to queues of specified TC when flow director rule hit. So add support to configure flow director rule by tc flower. To avoid rule conflict, add a new flow director mode HCLGE_FD_TC_FLOWER_ACTIVE, and only one mode can be active at the same time. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 0f993fe2b89db2342833856cc0597a309f278e55 Author: Jian Shen Date: Thu Dec 10 11:42:08 2020 +0800 net: hns3: add support for forwarding packet to queues of specified TC when flow director rule hit For some new device, it supports forwarding packet to queues of specified TC when flow director rule hit. So extend the command handle to support it. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 5a5c9091746749d9e16ff807035a940ca0ae4941 Author: Jian Shen Date: Thu Dec 10 11:42:07 2020 +0800 net: hns3: add support for tc mqprio offload Currently, the HNS3 driver only supports offload for tc number and prio_tc. This patch adds support for other qopts, including queues count and offset for each tc. When enable tc mqprio offload, it's not allowed to change queue numbers by ethtool. For hardware limitation, the queue number of each tc should be power of 2. For the queues is not assigned to each tc by average, so it's should return vport->alloc_tqps for hclge_get_max_channels(). Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 35244430d62422e96b4c9c9b4c00c0ebece91d73 Author: Jian Shen Date: Thu Dec 10 11:42:06 2020 +0800 net: hns3: refine the struct hane3_tc_info Currently, there are multiple members related to tc information in struct hnae3_knic_private_info. Merge them into a new struct hnae3_tc_info. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit f8aab60422c371425365d386dfd51e0c6c5b1041 Author: Andrey Grodzovsky Date: Tue Dec 8 15:16:15 2020 -0500 drm/amdgpu: Initialise drm_gem_object_funcs for imported BOs For BOs imported from outside of amdgpu, setting of amdgpu_gem_object_funcs was missing in amdgpu_dma_buf_create_obj. Fix by refactoring BO creation and amdgpu_gem_object_funcs setting into single function called from both code paths. Fixes: d693def4fd1c ("drm: Remove obsolete GEM and PRIME callbacks from struct drm_driver") v2: Use use amdgpu_gem_object_create() directly v3: fix warning Reviewed-by: Christian König Signed-off-by: Andrey Grodzovsky Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 7002932325ef8efff354a70b93a63dcdbca20d81 Author: Stephan Gerhold Date: Wed Dec 9 19:39:07 2020 -0800 Input: tm2-touchkey - add vddio regulator The Samsung touchkey controllers are often used with external pull-up for the interrupt line and the I2C lines, so we might need to enable a regulator to bring the lines into usable state. Otherwise, this might cause spurious interrupts and reading from I2C will fail. Implement support for a "vddio-supply" that is enabled by the tm2-touchkey driver so that the regulator gets enabled when needed. Signed-off-by: Stephan Gerhold Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20201203131242.44397-3-stephan@gerhold.net Signed-off-by: Dmitry Torokhov commit 3e730ec11d51283ad62a98436967c01b718132ab Author: Stephan Gerhold Date: Wed Dec 9 19:37:46 2020 -0800 dt-bindings: input: tm2-touchkey: document vddio-supply The Samsung touchkey controllers are often used with external pull-up for the interrupt line and the I2C lines, so we might need to enable a regulator to bring the lines into usable state. Otherwise, this might cause spurious interrupts and reading from I2C will fail. Document support for a "vddio-supply" that is enabled by the tm2-touchkey driver so that the regulator gets enabled when needed. Signed-off-by: Stephan Gerhold Reviewed-by: Linus Walleij Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201203131242.44397-2-stephan@gerhold.net Signed-off-by: Dmitry Torokhov commit 31a10f5b4b9ff323668c37173695ea463fc89863 Author: Stephan Gerhold Date: Wed Dec 9 19:37:14 2020 -0800 dt-bindings: input: tm2-touchkey: convert to yaml Convert the device tree bindings for tm2-touchkey to the YAML format. While we're at it, clarify the descriptions a bit to make it clear that this driver can be used for many different MCUs that all implement a similar I2C protocol. Depending on the MCU the voltage requirements may be different, on some devices the controller uses 2.2V, 2.8V or even 3.3V for vcc-supply instead of 1.8V. Signed-off-by: Stephan Gerhold Reviewed-by: Linus Walleij Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201203131242.44397-1-stephan@gerhold.net Signed-off-by: Dmitry Torokhov commit c0ead5552c0fcc15d907651f6d6a8084d32689b3 Author: Jakub Kicinski Date: Wed Dec 9 08:18:21 2020 -0800 nfp: silence set but not used warning with IPV6=n Test robot reports: drivers/net/ethernet/netronome/nfp/crypto/tls.c: In function 'nfp_net_tls_rx_resync_req': drivers/net/ethernet/netronome/nfp/crypto/tls.c:477:18: warning: variable 'ipv6h' set but not used [-Wunused-but-set-variable] 477 | struct ipv6hdr *ipv6h; | ^~~~~ In file included from include/linux/compiler_types.h:65, from : drivers/net/ethernet/netronome/nfp/crypto/tls.c: In function 'nfp_net_tls_add': include/linux/compiler_attributes.h:208:41: warning: statement will never be executed [-Wswitch-unreachable] 208 | # define fallthrough __attribute__((__fallthrough__)) | ^~~~~~~~~~~~~ drivers/net/ethernet/netronome/nfp/crypto/tls.c:299:3: note: in expansion of macro 'fallthrough' 299 | fallthrough; | ^~~~~~~~~~~ Use the IPv6 header in the switch, it doesn't matter which header we use to read the version field. Reported-by: kernel test robot Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 523437d7b5ba17ffc85f48d10e6cf5b8200e08de Author: Wong Vee Khee Date: Thu Dec 10 06:47:00 2020 +0800 net: stmmac: allow stmmac to probe for C45 PHY devices Assign stmmac's mdio_bus probe capabilities to MDIOBUS_C22_C45. This extended the probing of C45 PHY devices on the MDIO bus. Signed-off-by: Wong Vee Khee Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 5cab30359a4bca343ea08c504aed8ecc86258e13 Merge: 6b21c0bb3a323 7a77233ec6d11 Author: David S. Miller Date: Wed Dec 9 19:38:10 2020 -0800 Merge branch 'Add-support-for-VSOL-V2801F-CarlitoxxPro-CPGOS03-GPON-mo dule' Russell King says: ==================== Add support for VSOL V2801F/CarlitoxxPro CPGOS03 GPON module This patch set adds support for the V2801F / CarlitoxxPro module. This requires two changes: 1) the module only supports single byte reads to the ID EEPROM, while we need to still permit sequential reads to the diagnostics EEPROM for atomicity reasons. 2) we need to relax the encoding check when we have no reported capabilities to allow 1000base-X based on the module bitrate. Thanks to Pali Rohár for responsive testing over the last two days. (Resending, dropping the utf-8 characters in Pali's name so the patches get through vger. Added Andrew's r-b tags.) ==================== Signed-off-by: David S. Miller commit 7a77233ec6d114322e2c4f71b4e26dbecd9ea8a7 Author: Russell King Date: Wed Dec 9 11:22:54 2020 +0000 net: sfp: relax bitrate-derived mode check Do not check the encoding when deriving 1000BASE-X from the bitrate when no other modes are discovered. Some GPON modules (VSOL V2801F and CarlitoxxPro CPGOS03-0490 v2.0) indicate NRZ encoding with a 1200Mbaud bitrate, but should be driven with 1000BASE-X on the host side. Tested-by: Pali Rohár Reviewed-by: Andrew Lunn Signed-off-by: Russell King Signed-off-by: David S. Miller commit 0d035bed2a4a6c4878518749348be61bf082d12a Author: Russell King Date: Wed Dec 9 11:22:49 2020 +0000 net: sfp: VSOL V2801F / CarlitoxxPro CPGOS03-0490 v2.0 workaround Add a workaround for the detection of VSOL V2801F / CarlitoxxPro CPGOS03-0490 v2.0 GPON module which CarlitoxxPro states needs single byte I2C reads to the EEPROM. Pali Rohár reports that he also has a CarlitoxxPro-based V2801F module, which reports a manufacturer of "OEM". This manufacturer can't be matched as it appears in many different modules, so also match the part number too. Reported-by: Thomas Schreiber Reported-by: Pali Rohár Tested-by: Pali Rohár Reviewed-by: Andrew Lunn Signed-off-by: Russell King Signed-off-by: David S. Miller commit 6b21c0bb3a323c796a620db317db64ea4d787be3 Author: Xie He Date: Wed Dec 9 00:16:04 2020 -0800 net: x25: Fix handling of Restart Request and Restart Confirmation 1. When the x25 module gets loaded, layer 2 may already be running and connected. In this case, although we are in X25_LINK_STATE_0, we still need to handle the Restart Request received, rather than ignore it. 2. When we are in X25_LINK_STATE_2, we have already sent a Restart Request and is waiting for the Restart Confirmation with t20timer. t20timer will restart itself repeatedly forever so it will always be there, as long as we are in State 2. So we don't need to check x25_t20timer_pending again. Fixes: d023b2b9ccc2 ("net/x25: fix restart request/confirm handling") Cc: Martin Schiller Signed-off-by: Xie He Acked-by: Martin Schiller Signed-off-by: David S. Miller commit 0f86a5be10956aaa77f92d9c25ec508c5495e8af Merge: 7bdddc68cda3e d7b1bfd0832c1 Author: David S. Miller Date: Wed Dec 9 19:31:58 2020 -0800 Merge branch 'mptcp-fixes' Paolo Abeni says: ==================== mptcp: a bunch of fixes This series includes a few fixes following-up the recent code refactor for the MPTCP RX and TX paths. Boundling them together, since the fixes are somewhat related. ==================== Signed-off-by: David S. Miller commit d7b1bfd0832c1d005f571203306b6c50e9805150 Author: Paolo Abeni Date: Wed Dec 9 12:03:31 2020 +0100 mptcp: be careful on subflows shutdown When the workqueue disposes of the msk, the subflows can still receive some data from the peer after __mptcp_close_ssk() completes. The above could trigger a race between the msk receive path and the msk destruction. Acquiring the mptcp_data_lock() in __mptcp_destroy_sock() will not save the day: the rx path could be reached even after msk destruction completes. Instead use the subflow 'disposable' flag to prevent entering the msk receive path after __mptcp_close_ssk(). Fixes: e16163b6e2b7 ("mptcp: refactor shutdown and close") Reviewed-by: Matthieu Baerts Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit 0597d0f8e030d1a5e64708b0f3233209a8b5d39e Author: Paolo Abeni Date: Wed Dec 9 12:03:30 2020 +0100 mptcp: plug subflow context memory leak When a MPTCP listener socket is closed with unaccepted children pending, the ULP release callback will be invoked, but nobody will call into __mptcp_close_ssk() on the corresponding subflow. As a consequence, at ULP release time, the 'disposable' flag will be cleared and the subflow context memory will be leaked. This change addresses the issue always freeing the context if the subflow is still in the accept queue at ULP release time. Additionally, this fixes an incorrect code reference in the related comment. Note: this fix leverages the changes introduced by the previous commit. Fixes: e16163b6e2b7 ("mptcp: refactor shutdown and close") Reviewed-by: Matthieu Baerts Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit 5b950ff4331ddda6421b21a779ec23127e8e3eb8 Author: Paolo Abeni Date: Wed Dec 9 12:03:29 2020 +0100 mptcp: link MPC subflow into msk only after accept Christoph reported the following splat: WARNING: CPU: 0 PID: 4615 at net/ipv4/inet_connection_sock.c:1031 inet_csk_listen_stop+0x8e8/0xad0 net/ipv4/inet_connection_sock.c:1031 Modules linked in: CPU: 0 PID: 4615 Comm: syz-executor.4 Not tainted 5.9.0 #37 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 RIP: 0010:inet_csk_listen_stop+0x8e8/0xad0 net/ipv4/inet_connection_sock.c:1031 Code: 03 00 00 00 e8 79 b2 3d ff e9 ad f9 ff ff e8 1f 76 ba fe be 02 00 00 00 4c 89 f7 e8 62 b2 3d ff e9 14 f9 ff ff e8 08 76 ba fe <0f> 0b e9 97 f8 ff ff e8 fc 75 ba fe be 03 00 00 00 4c 89 f7 e8 3f RSP: 0018:ffffc900037f7948 EFLAGS: 00010293 RAX: ffff88810a349c80 RBX: ffff888114ee1b00 RCX: ffffffff827b14cd RDX: 0000000000000000 RSI: ffffffff827b1c38 RDI: 0000000000000005 RBP: ffff88810a2a8000 R08: ffff88810a349c80 R09: fffff520006fef1f R10: 0000000000000003 R11: fffff520006fef1e R12: ffff888114ee2d00 R13: dffffc0000000000 R14: 0000000000000001 R15: ffff888114ee1d68 FS: 00007f2ac1945700(0000) GS:ffff88811b400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffd44798bc0 CR3: 0000000109810002 CR4: 0000000000170ef0 Call Trace: __tcp_close+0xd86/0x1110 net/ipv4/tcp.c:2433 __mptcp_close_ssk+0x256/0x430 net/mptcp/protocol.c:1761 __mptcp_destroy_sock+0x49b/0x770 net/mptcp/protocol.c:2127 mptcp_close+0x62d/0x910 net/mptcp/protocol.c:2184 inet_release+0xe9/0x1f0 net/ipv4/af_inet.c:434 __sock_release+0xd2/0x280 net/socket.c:596 sock_close+0x15/0x20 net/socket.c:1277 __fput+0x276/0x960 fs/file_table.c:281 task_work_run+0x109/0x1d0 kernel/task_work.c:151 get_signal+0xe8f/0x1d40 kernel/signal.c:2561 arch_do_signal+0x88/0x1b60 arch/x86/kernel/signal.c:811 exit_to_user_mode_loop kernel/entry/common.c:161 [inline] exit_to_user_mode_prepare+0x9b/0xf0 kernel/entry/common.c:191 syscall_exit_to_user_mode+0x22/0x150 kernel/entry/common.c:266 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f2ac1254469 Code: 00 f3 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d ff 49 2b 00 f7 d8 64 89 01 48 RSP: 002b:00007f2ac1944dc8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffbf RBX: 000000000069bf00 RCX: 00007f2ac1254469 RDX: 0000000000000000 RSI: 0000000000008982 RDI: 0000000000000003 RBP: 000000000069bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000069bf0c R13: 00007ffeb53f178f R14: 00000000004668b0 R15: 0000000000000003 After commit 0397c6d85f9c ("mptcp: keep unaccepted MPC subflow into join list"), the msk's workqueue and/or PM can touch the MPC subflow - and acquire its socket lock - even if it's still unaccepted. If the above event races with the relevant listener socket close, we can end-up with the above splat. This change addresses the issue delaying the MPC socket insertion in conn_list at accept time - that is, partially reverting the blamed commit. We must additionally ensure that mptcp_pm_fully_established() happens after accept() time, or the PM will not be able to handle properly such event - conn_list could be empty otherwise. In the receive path, we check the subflow list node to ensure it is out of the listener queue. Be sure client subflows do not match transiently such condition moving them into the join list earlier at creation time. Since we now have multiple mptcp_pm_fully_established() call sites from different code-paths, said helper can now race with itself. Use an additional PM status bit to avoid multiple notifications. Reported-by: Christoph Paasch Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/103 Fixes: 0397c6d85f9c ("mptcp: keep unaccepted MPC subflow into join list"), Reviewed-by: Matthieu Baerts Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit 7bdddc68cda3e0c9ef7711238206881cf016bdbb Author: Xie He Date: Tue Dec 8 17:43:54 2020 -0800 net: hdlc_x25: Remove unnecessary skb_reset_network_header calls 1. In x25_xmit, skb_reset_network_header is not necessary before we call lapb_data_request. The lapb module doesn't need skb->network_header. So there is no need to set skb->network_header before calling lapb_data_request. 2. In x25_data_indication (called by the lapb module after data have been received), skb_reset_network_header is not necessary before we call netif_rx. After we call netif_rx, the code in net/core/dev.c will call skb_reset_network_header before handing the skb to upper layers (in __netif_receive_skb_core, called by __netif_receive_skb_one_core, called by __netif_receive_skb, called by process_backlog). So we don't need to call skb_reset_network_header by ourselves. Cc: Martin Schiller Signed-off-by: Xie He Signed-off-by: David S. Miller commit 016ade51a7d9c7b1408de0b0ba3c81f91d12bced Author: Zheng Yongjun Date: Wed Dec 9 09:20:02 2020 +0800 net/mlx4: simplify the return expression of mlx4_init_cq_table() Simplify the return expression. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit d8b3df8b1048405e73558b88cba2adf29490d468 Author: Huang Jianan Date: Wed Dec 9 19:57:40 2020 +0800 erofs: avoid using generic_block_bmap Surprisingly, `block' in sector_t indicates the number of i_blkbits-sized blocks rather than sectors for bmap. In addition, considering buffer_head limits mapped size to 32-bits, should avoid using generic_block_bmap. Link: https://lore.kernel.org/r/20201209115740.18802-1-huangjianan@oppo.com Fixes: 9da681e017a3 ("staging: erofs: support bmap") Reviewed-by: Chao Yu Reviewed-by: Gao Xiang Signed-off-by: Huang Jianan Signed-off-by: Guo Weichao [ Gao Xiang: slightly update the commit message description. ] Signed-off-by: Gao Xiang commit c2af62256e8d6f3c2f72f8678efde75423490c76 Author: Dwip N. Banerjee Date: Wed Dec 9 20:53:31 2020 -0500 ibmvnic: fix rx buffer tracking and index management in replenish_rx_pool partial success We observed that in the error case for batched send_subcrq_indirect() the driver does not account for the partial success case. This caused Linux to crash when free_map and pool index are inconsistent. Driver needs to update the rx pools "available" count when some batched sends worked but an error was encountered as part of the whole operation. Also track replenish_add_buff_failure for statistic purposes. Fixes: 4f0b6812e9b9a ("ibmvnic: Introduce batched RX buffer descriptor transmission") Signed-off-by: Dwip N. Banerjee Reviewed-by: Dany Madden Signed-off-by: David S. Miller commit 5a40cce20871e9dd5bfebc639069ba9d6f10eecf Merge: dc528d5bcc2da 432d9e74d8a30 Author: David S. Miller Date: Wed Dec 9 19:02:16 2020 -0800 Merge branch 'mptcp-Add-port-parameter-to-ADD_ADDR-option' Mat Martineau says: ==================== mptcp: Add port parameter to ADD_ADDR option The ADD_ADDR MPTCP option is used to announce available IP addresses that a peer may connect to when adding more TCP subflows to an existing MPTCP connection. There is an optional port number field in that ADD_ADDR header, and this patch set adds capability for that port number to be sent and received. Patches 1, 2, and 4 refactor existing ADD_ADDR code to simplify implementation of port number support. Patches 3 and 5 are the main functional changes, for sending and receiving the port number in the MPTCP ADD_ADDR option. Patch 6 sends the ADD_ADDR option with port number on a bare TCP ACK, since the extra length of the option may run in to cases where sufficient TCP option space is not available on a data packet. Patch 7 plumbs in port number support for the in-kernel MPTCP path manager. Patches 8-11 add some optional debug output and a little more cleanup refactoring. ==================== Signed-off-by: David S. Miller commit 432d9e74d8a303fc0e897392e7b8334ba222c5f8 Author: Geliang Tang Date: Wed Dec 9 15:51:28 2020 -0800 mptcp: use the variable sk instead of open-coding Since the local variable sk has been defined, use it instead of open-coding. Reviewed-by: Matthieu Baerts Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 13ad9f01a29e3f458fb3b319fb53323b2b0d1e68 Author: Geliang Tang Date: Wed Dec 9 15:51:27 2020 -0800 mptcp: rename add_addr_signal and mptcp_add_addr_status Since the RM_ADDR signal had been reused with add_addr_signal, it's not suitable to call it add_addr_signal or mptcp_add_addr_status. So this patch renamed add_addr_signal to addr_signal, and renamed mptcp_add_addr_status to mptcp_addr_signal_status. Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 42842a425ad6d1ef1087b63486879a6d54b26893 Author: Geliang Tang Date: Wed Dec 9 15:51:26 2020 -0800 mptcp: drop rm_addr_signal flag This patch reused add_addr_signal for the RM_ADDR announcing signal, by defining a new ADD_ADDR status named MPTCP_RM_ADDR_SIGNAL. Then the flag rm_addr_signal in PM could be dropped. Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 90a4aea8b6edff458977361be4b403779c84af80 Author: Geliang Tang Date: Wed Dec 9 15:51:25 2020 -0800 mptcp: print out port and ahmac when receiving ADD_ADDR This patch printed out more debugging information for the ADD_ADDR suboption parsing on the incoming path. Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 0f5c9e3f079f1d0355fd8f5e5ec7e3ada095eef4 Author: Geliang Tang Date: Wed Dec 9 15:51:24 2020 -0800 mptcp: add port parameter for mptcp_pm_announce_addr This patch added a new parameter 'port' for mptcp_pm_announce_addr. If this parameter is true, we set the MPTCP_ADD_ADDR_PORT bit of the add_addr_signal. That means the announced address is added with a port number. Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit fbe0f87ac7710de31f9c37280b08e0d0d43aa6bf Author: Geliang Tang Date: Wed Dec 9 15:51:23 2020 -0800 mptcp: send out dedicated packet for ADD_ADDR using port The process is similar to that of the ADD_ADDR IPv6, this patch also sent out a pure ack for the ADD_ADDR using port. Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 4a2777a83406cc87edf08b5c71887d896f628525 Author: Geliang Tang Date: Wed Dec 9 15:51:22 2020 -0800 mptcp: add the outgoing ADD_ADDR port support This patch added a new add_addr_signal type named MPTCP_ADD_ADDR_PORT, to identify it is an address with port to be added. It also added a new parameter 'port' for both mptcp_add_addr_len and mptcp_pm_add_addr_signal. In mptcp_established_options_add_addr, we check whether the announced address is added with port. If it is, we put this port number to mptcp_out_options's port field. Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 2ec72faec86bc92c573fc3bada8001115670da44 Author: Geliang Tang Date: Wed Dec 9 15:51:21 2020 -0800 mptcp: use adding up size to get ADD_ADDR length This patch uses adding up size to get the ADD_ADDR suboption length rather than returning the ADD_ADDR size constants. Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 22fb85ffaefb80a22c815008a500273b3f61bba3 Author: Geliang Tang Date: Wed Dec 9 15:51:20 2020 -0800 mptcp: add port support for ADD_ADDR suboption writing In rfc8684, the length of ADD_ADDR suboption with IPv4 address and port is 18 octets, but mptcp_write_options is 32-bit aligned, so we need to pad it to 20 octets. All the other port related option lengths need to be added up 2 octets similarly. This patch added a new field 'port' in mptcp_out_options. When this field is set with a port number, we need to add up 4 octets for the ADD_ADDR suboption, and put the port number into the suboption. Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit e1ef6832224aa62b36ba98a1a7c183e41962590c Author: Geliang Tang Date: Wed Dec 9 15:51:19 2020 -0800 mptcp: unify ADD_ADDR and ADD_ADDR6 suboptions writing The length of ADD_ADDR6 is 12 octets longer than ADD_ADDR. That's the only difference between them. This patch dropped the duplicate code between ADD_ADDR and ADD_ADDR6 suboptions writing, and unify them into one. Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 6eb3d1e350d1d166e6210a2abc310dbee5f03247 Author: Geliang Tang Date: Wed Dec 9 15:51:18 2020 -0800 mptcp: unify ADD_ADDR and echo suboptions writing There are two differences between ADD_ADDR suboption and ADD_ADDR echo suboption: The length of the former is 8 octets longer than the length of the latter. The former's echo-flag is 0, and latter's echo-flag is 1. This patch added two local variables, len and echo, to unify ADD_ADDR and ADD_ADDR echo suboptions writing. Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit dc528d5bcc2daa00940e034bb9922b65b52b5e60 Merge: b8d909375d6fc 5b13886da858d Author: David S. Miller Date: Wed Dec 9 18:51:59 2020 -0800 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== 100GbE Intel Wired LAN Driver Updates 2020-12-09 This series contains updates to ice driver only. Bruce changes the allocation of ice_flow_prof_params from stack to heap to avoid excessive stack usage. Corrects a misleading comment and silences a sparse warning that is not a problem. Paul allows for HW initialization to continue if PHY abilities cannot be obtained. Jeb removes bypassing FW link override and reading Option ROM and netlist information for non-E810 devices as this is now available on other devices. Nick removes vlan_ena field as this information can be gathered by checking num_vlan. Jake combines format strings and debug prints to the same line. Simon adds a space to fix string concatenation. v4: Drop ACL patches. Change PHY abilities failure message from debug to warning. v3: Fix email address for DaveM and fix character in cover letter v2: Expand on commit message for patch 3 to show example usage/commands. Reduce number of defensive checks being done. ==================== Signed-off-by: David S. Miller commit 8edcd98be1b237965b54bee7e17f89a790a107fd Author: Fuqian Huang Date: Sat Jul 13 01:04:12 2019 -0700 Input: cyapa - switch to using devm_add_action_or_reset() devm_add_action_or_reset() is introduced as a helper function which internally calls devm_add_action(). If devm_add_action() fails then it will execute the action mentioned and return the error code. This reduce source code size (avoid writing the action twice) and reduce the likelyhood of bugs. Signed-off-by: Fuqian Huang Link: https://lore.kernel.org/linux-input/20190708123323.11943-1-huangfq.daxian@gmail.com Signed-off-by: Dmitry Torokhov commit 3d82a4d736a662e352027686b8a373bf3e70820e Author: Lubomir Rintel Date: Wed Dec 9 17:45:14 2020 -0800 Input: add driver for power button on Dell Wyse 3020 This adds support for the power button attached to the Embedded Controller on a Dell Wyse 3020 "Ariel" board. The Embedded Controller's SPI interface is actually capable sending and receiving the PS/2 keyboard and mouse protocol data, which looks like a good fit for a serio driver. Howerver, I don't know of any machines where this is actually used. My board only has a single power button and no way to connect an actual keyboard or a mouse. Using the atkbd driver with serio would be an overkill and would be inconvenient for the userspace. Therefore this driver registers an input device that is only capable of reporting the power button presses and releases. Signed-off-by: Lubomir Rintel Link: https://lore.kernel.org/r/20201201083533.1724287-3-lkundrak@v3.sk Signed-off-by: Dmitry Torokhov commit b2cc3bfef6aa9a0d66034b48e95cf24f6a5b0e35 Author: Lubomir Rintel Date: Wed Dec 9 17:44:35 2020 -0800 dt-bindings: input: Add Dell Wyse 3020 Power Button binding Add binding document for the Dell Wyse 3020 a.k.a. "Ariel" Power Button. Signed-off-by: Lubomir Rintel Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201201083533.1724287-2-lkundrak@v3.sk Signed-off-by: Dmitry Torokhov commit b2058cd93d930d7b9f76f34590c0d432cd6470c7 Author: Dmitry Torokhov Date: Wed Dec 9 17:26:35 2020 -0800 Input: gtco - remove driver The driver has its own HID descriptor parsing code, that had and still has several issues discovered by syzbot and other tools. Ideally we should move the driver over to the HID subsystem, so that it uses proven parsing code. However the devices in question are EOL, and GTCO is not willing to extend resources for that, so let's simply remove the driver. Note that our HID support has greatly improved over the last 10 years, we may also consider reverting 6f8d9e26e7de ("hid-core.c: Adds all GTCO CalComp Digitizers and InterWrite School Products to blacklist") and see if GTCO devices actually work with normal HID drivers. Link: https://lore.kernel.org/r/X8wbBtO5KidME17K@google.com Signed-off-by: Dmitry Torokhov commit 5a6338cce9f4133c478d3b10b300f96dd644379a Author: Viresh Kumar Date: Tue Nov 17 15:32:06 2020 +0530 mailbox: arm_mhuv2: Add driver This adds driver for the ARM MHUv2 (Message Handling Unit) mailbox controller. This is based on the accepted DT bindings of the controller and supports combination of both transport protocols, i.e. doorbell and data-transfer. Transmitting and receiving data through the mailbox framework is done through struct arm_mhuv2_mbox_msg. Based on the initial work done by Morten Borup Petersen from ARM. Co-developed-by: Tushar Khandelwal Signed-off-by: Tushar Khandelwal Tested-by: Usama Arif Signed-off-by: Viresh Kumar Signed-off-by: Jassi Brar commit aa80be5043a6d87c84112c37afe5cf4aa5cb9e11 Author: Viresh Kumar Date: Tue Nov 17 15:32:05 2020 +0530 dt-bindings: mailbox : arm,mhuv2: Add bindings This patch adds device tree binding for ARM Message Handling Unit (MHU) controller version 2. Based on earlier work by Morten Borup Petersen. Reviewed-by: Rob Herring Co-developed-by: Tushar Khandelwal Signed-off-by: Tushar Khandelwal Signed-off-by: Viresh Kumar Signed-off-by: Jassi Brar commit b8d909375d6fcdc0de9b5f1a7ecee446aeaf5443 Author: Zheng Yongjun Date: Wed Dec 9 17:27:26 2020 +0800 net: marvell: octeontx2: simplify the otx2_ptp_adjfine() Simplify the return expression. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit 965b8b2bad0acaea6d7b20493394bf80075021a5 Author: Zheng Yongjun Date: Wed Dec 9 17:26:21 2020 +0800 net: dsa: simplify the return rtl8366_vlan_prepare() Simplify the return expression. Signed-off-by: Zheng Yongjun Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 6f2d5cf9756dab190e79edd4ec098c81dca6743c Author: Zheng Yongjun Date: Wed Dec 9 17:23:25 2020 +0800 net: stmmac: simplify the return dwmac5_rxp_disable() Simplify the return expression. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit f75e59445808bcaf5978859606bad0e6d2e66094 Author: Zheng Yongjun Date: Wed Dec 9 17:22:41 2020 +0800 net: hinic: simplify the return hinic_configure_max_qnum() Simplify the return expression. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit 264386fc192202525316dcd1e8d3c4610046e2e1 Author: Zheng Yongjun Date: Wed Dec 9 17:21:07 2020 +0800 net: freescale: dpaa: simplify the return dpaa_eth_refill_bpools() Simplify the return expression. Signed-off-by: Zheng Yongjun Acked-by: Madalin Bucur Signed-off-by: David S. Miller commit d867bc3a269180e4029100a834febddbb8c8228e Author: Zheng Yongjun Date: Wed Dec 9 17:20:31 2020 +0800 net: cisco: enic: simplify the return vnic_cq_alloc() Simplify the return expression. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit dd0e7aabcad14cf0a97c782737e675a348c11984 Author: Zheng Yongjun Date: Wed Dec 9 17:19:57 2020 +0800 net: emulex: benet: simplify the return expression of be_if_create() Simplify the return expression. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit 8e3bf53c6105ee4beb5a0c46891fa3709ac3f4e1 Author: Zheng Yongjun Date: Wed Dec 9 17:18:44 2020 +0800 net: marvell: octeontx2: simplify the return expression of rvu_npa_init() Simplify the return expression. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit 05372c456f2dceff55faa57280d4ae534028c827 Author: Zheng Yongjun Date: Wed Dec 9 17:17:51 2020 +0800 net: marvell: prestera: simplify the return expression of prestera_port_close() Simplify the return expression. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit e3bc6566b88613dc3ee13fb74727d58826ca5132 Merge: e65f3df5ff38d 237410fb83538 Author: David S. Miller Date: Wed Dec 9 16:49:46 2020 -0800 Merge branch 'nfc-s3fwrn5-Change-I2C-interrupt-trigger-to-EDGE_RISING' Bongsu Jeon says: ==================== nfc: s3fwrn5: Change I2C interrupt trigger to EDGE_RISING For stable Samsung's I2C interrupt handling, I changed the interrupt trigger from IRQ_TYPE_LEVEL_HIGH to IRQ_TYPE_EDGE_RISING and removed the hard coded interrupt trigger type in the i2c module for the flexible control. 1/2 is the changed dt binding for the edge rising trigger. 2/2 is to remove the hard coded interrupt trigger type in the i2c module. ChangeLog: v2: 2/2 - remove the hard coded interrupt trigger type. Bongsu Jeon (2): dt-bindings: net: nfc: s3fwrn5: Change I2C interrupt trigger to EDGE_RISING nfc: s3fwrn5: Remove hard coded interrupt trigger type from the i2c module ==================== Signed-off-by: David S. Miller commit 237410fb83538407646109063c4d902c42261387 Author: Bongsu Jeon Date: Tue Dec 8 23:10:12 2020 +0900 nfc: s3fwrn5: Remove hard coded interrupt trigger type from the i2c module For the flexible control of interrupt trigger type, remove the hard coded interrupt trigger type in the i2c module. The trigger type will be loaded from a dts. Signed-off-by: Bongsu Jeon Signed-off-by: David S. Miller commit b783ff46ef4c80c666ed2186f471b7173db63976 Author: Bongsu Jeon Date: Tue Dec 8 23:10:11 2020 +0900 dt-bindings: net: nfc: s3fwrn5: Change I2C interrupt trigger type Change interrupt trigger from IRQ_TYPE_LEVEL_HIGH to IRQ_TYPE_EDGE_RISING for stable NFC I2C interrupt handling. Samsung's NFC Firmware sends an i2c frame as below. 1. NFC Firmware sets the GPIO(interrupt pin) high when there is an i2c frame to send. 2. If the CPU's I2C master has received the i2c frame, NFC F/W sets the GPIO low. NFC driver's i2c interrupt handler would be called in the abnormal case as the NFC FW task of number 2 is delayed because of other high priority tasks. In that case, NFC driver will try to receive the i2c frame but there isn't any i2c frame to send in NFC. It would cause an I2C communication problem. This case would hardly happen. But, I changed the interrupt as a defense code. If Driver uses the TRIGGER_RISING instead of the LEVEL trigger, there would be no problem even if the NFC FW task is delayed. Signed-off-by: Bongsu Jeon Signed-off-by: David S. Miller commit 429ad75f2b13ac8a2c7af859f8f61b9188bca7ba Author: Peter Chen Date: Fri Nov 13 15:39:22 2020 +0800 usb: chipidea: trace: fix the endian issue "sparse warnings: (new ones prefixed by >>)" drivers/usb/chipidea/trace.c: note: in included file (through include/trace/trace_events.h, include/trace/define_trace.h, drivers/usb/chipidea/trace.h): >> drivers/usb/chipidea/./trace.h:39:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] next @@ got restricted __le32 [usertype] next @@ >> drivers/usb/chipidea/./trace.h:39:1: sparse: expected unsigned int [usertype] next >> drivers/usb/chipidea/./trace.h:39:1: sparse: got restricted __le32 [usertype] next >> drivers/usb/chipidea/./trace.h:39:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] token @@ got restricted __le32 [usertype] token @@ >> drivers/usb/chipidea/./trace.h:39:1: sparse: expected unsigned int [usertype] token >> drivers/usb/chipidea/./trace.h:39:1: sparse: got restricted __le32 [usertype] token drivers/usb/chipidea/trace.c: note: in included file (through include/trace/perf.h, include/trace/define_trace.h, drivers/usb/chipidea/trace.h): >> drivers/usb/chipidea/./trace.h:39:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] next @@ got restricted __le32 [usertype] next @@ >> drivers/usb/chipidea/./trace.h:39:1: sparse: expected unsigned int [usertype] next >> drivers/usb/chipidea/./trace.h:39:1: sparse: got restricted __le32 [usertype] next >> drivers/usb/chipidea/./trace.h:39:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] token @@ got restricted __le32 [usertype] token @@ >> drivers/usb/chipidea/./trace.h:39:1: sparse: expected unsigned int [usertype] token >> drivers/usb/chipidea/./trace.h:39:1: sparse: got restricted __le32 [usertype] token Reported-by: kernel test robot Signed-off-by: Peter Chen commit b4c5d446a655667fdb39c0bd2a90bcc08d26dab9 Author: Peter Chen Date: Wed Mar 25 15:52:29 2020 +0800 usb: chipidea: add tracepoint support for udc Add basic tracepoint support for udc driver. Reviewed-by: Jun Li Signed-off-by: Peter Chen commit 1bc514dfd12678e4efac5b8c5c32f91b244e0317 Author: Peter Chen Date: Tue Oct 20 10:44:06 2020 +0800 doc: dt-binding: cdns,usb3: add wakeup-irq To support low power mode for controller, the driver needs wakeup-irq to reflect the signal changing after controller is stopped, and waking the controller up accordingly. Reviewed-by: Rob Herring Signed-off-by: Peter Chen commit 4006239098b23d8d89633dca4f13c2485afc1e08 Author: Peter Chen Date: Mon Sep 28 15:34:19 2020 +0800 usb: cdns3: imx: enable runtime pm by default Enable runtime pm by default Reviewed-by: Jun Li Signed-off-by: Peter Chen commit 7cea9657756b2c83069a775c0671ff169bce456a Author: Peter Chen Date: Mon Sep 28 15:20:03 2020 +0800 usb: cdns3: add quirk for enable runtime pm by default Some vendors (eg: NXP) may want to enable runtime pm by default for power saving, add one quirk for it. Reviewed-by: Jun Li Signed-off-by: Peter Chen commit 1cc6edd8a96fb3229d8309c49967713b5c79524f Author: Peter Chen Date: Mon Jul 27 17:53:37 2020 +0800 usb: cdns3: host: disable BEI support The Cadence xHCI doesn't support BEI well, it causes the disconnection of ISOC devices can't be detected, so we disable it. Reviewed-by: Jun Li Signed-off-by: Peter Chen commit 68ed3f3d8a057bd34254e885a6306fedc0936e50 Author: Peter Chen Date: Fri May 22 18:08:31 2020 +0800 usb: cdns3: host: add xhci_plat_priv quirk XHCI_SKIP_PHY_INIT cdns3 manages PHY by own DRD driver, so skip the management by HCD core. Reviewed-by: Jun Li Reviewed-by: Pawel Laszczak Signed-off-by: Peter Chen commit ed22764847e8100f0af9af91ccfa58e5c559bd47 Author: Peter Chen Date: Fri May 22 17:56:30 2020 +0800 usb: cdns3: host: add .suspend_quirk for xhci-plat.c cdns3 has some special PM sequence between xhci_bus_suspend and xhci_suspend, add quirk to implement it. Reviewed-by: Pawel Laszczak Signed-off-by: Peter Chen commit cdd3013dcc5cf6b03150caac0b96212ab221cf7a Author: Pawel Laszczak Date: Thu Oct 15 06:54:47 2020 +0200 usb: cdns3: Rids of duplicate error message On failure, the platform_get_irq_byname prints an error message, so patch removes error message related to this function from core.c file. A change was suggested during reviewing CDNSP driver by Chunfeng Yun. Acked-by: Roger Quadros Signed-off-by: Pawel Laszczak Acked-by: Peter Chen Signed-off-by: Peter Chen commit b3b4a9d70fec50c90c9ee1da408793b50f78a500 Author: Pawel Laszczak Date: Wed Oct 7 06:02:30 2020 +0200 usb: cdns3: Add static to cdns3_gadget_exit function Function cdns3_gadget_exit is used only in gadget.c file. This patch removes declaration and definition of this function from gadget-export.h file and makes it static. Signed-off-by: Pawel Laszczak Acked-by: Roger Quadros Signed-off-by: Peter Chen commit ab9e1ac49b478a2044eba66089bd2742914dd5af Author: JaeSang Yoo Date: Tue Dec 8 10:46:28 2020 +0900 docs: update requirements to install six module On the update of Sphinx version to 2.4.4, the "six" library won't be installed automatically. (which is required by kfigure.py) Main reason of this issue were occurred by the requirements changed from the sphinx library. In Sphinx v1.7.9, six was listed on the install_requires, but it has been removed since 2.x The kfigure.py uses six library explicitly, adding six to requirements.txt seems reasonable Signed-off-by: JaeSang Yoo Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20201208014628.GA1361@JSYoo5B-Base.localdomain Signed-off-by: Jonathan Corbet commit e223a707ad84a1b45704e02220ea0cfe1b9cfbdd Author: Thorsten Leemhuis Date: Wed Dec 9 06:19:14 2020 +0100 docs: reporting-issues: move 'outdated, need help' note to proper place Move the 'this section is a placeholder for now and needs help by someone with domain knowledge' note one section upwards to the place where it belongs: the 'Decode failure messages' section. Signed-off-by: Thorsten Leemhuis Link: https://lore.kernel.org/r/d3894ba4a302beed661304cbcdc062c6dcfe3e58.1607489877.git.linux@leemhuis.info Signed-off-by: Jonathan Corbet commit e65f3df5ff38d0f77eabdffaf0c5b480a3a9422a Author: Zheng Yongjun Date: Wed Dec 9 21:40:03 2020 +0800 net: ipa: convert comma to semicolon Replace a comma between expression statements by a semicolon. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit 59d4c93d31d91b8256535a4bb388738d320b9c03 Author: Zheng Yongjun Date: Wed Dec 9 21:39:38 2020 +0800 net: mv88e6xxx: convert comma to semicolon Replace a comma between expression statements by a semicolon. Signed-off-by: Zheng Yongjun Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 201d126a631c9fa897a8458d3de5a7b188d206e7 Author: Zheng Yongjun Date: Wed Dec 9 21:38:52 2020 +0800 net: thunderbolt: convert comma to semicolon Replace a comma between expression statements by a semicolon. Signed-off-by: Zheng Yongjun Acked-by: Mika Westerberg Signed-off-by: David S. Miller commit 752baafb0f38af907108dbe42d333bb04bc0c7ff Author: Zheng Yongjun Date: Wed Dec 9 21:38:11 2020 +0800 net: usb: convert comma to semicolon Replace a comma between expression statements by a semicolon. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit af89784eb621784ed1ddc237a3742be40c9a04fd Author: Zheng Yongjun Date: Wed Dec 9 21:37:39 2020 +0800 net: freescale: convert comma to semicolon Replace a comma between expression statements by a semicolon. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit 011446cd2f0e49987c2236cef801084a26b822c5 Author: Zheng Yongjun Date: Wed Dec 9 21:37:16 2020 +0800 net: ethernet: ti: convert comma to semicolon Replace a comma between expression statements by a semicolon. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit 474d8feffb31b7f798be0eeab2f5d95557bd79d7 Author: Zheng Yongjun Date: Wed Dec 9 21:36:30 2020 +0800 hisilicon/hns3: convert comma to semicolon Replace a comma between expression statements by a semicolon. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit 3d4068b24cd947ca4e3fd7f4f2a34fa1bc229202 Author: Zheng Yongjun Date: Wed Dec 9 21:35:31 2020 +0800 hisilicon/hns: convert comma to semicolon Replace a comma between expression statements by a semicolon. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit 873d2f121628f5c69251fd4fd7435c55c898b32d Author: Zheng Yongjun Date: Wed Dec 9 21:34:41 2020 +0800 net: mlx5: convert comma to semicolon Replace a comma between expression statements by a semicolon. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit eba251f2e6bc068133b5a1d5c57b552c4aeec534 Author: Zheng Yongjun Date: Wed Dec 9 21:34:02 2020 +0800 net: micrel: convert comma to semicolon Replace a comma between expression statements by a semicolon. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit a319aedde43c51a0db719f9a838eb2f177084401 Author: Zheng Yongjun Date: Wed Dec 9 21:32:28 2020 +0800 net: rxrpc: convert comma to semicolon Replace a comma between expression statements by a semicolon. Signed-off-by: Zheng Yongjun Reviewed-by: David Howells Signed-off-by: David S. Miller commit 102779c6f856646714e7b6b607065e47e6bbc36a Merge: 102e2c07239c0 700d566e81712 Author: David S. Miller Date: Wed Dec 9 16:19:21 2020 -0800 Merge branch 'macb-sama7g5' Claudiu Beznea says: ==================== net: macb: add support for sama7g5 This series adds support for SAMA7G5 Ethernet interfaces: one 10/100Mbps and one 1Gbps interfaces. Along with it I also included a fix to disable clocks for SiFive FU540-C000 on failure path of fu540_c000_clk_init(). Thank you, Claudiu Beznea Changed in v3: - use clk_bulk_disable_unprepare in patch 3/8 - corrected clang compilation warning in patch 3/8 - revert changes in macb_clk_init() in patch 3/8 Changes in v2: - introduced patch "net: macb: add function to disable all macb clocks" and update patch "net: macb: unprepare clocks in case of failure" accordingly - collected tags ==================== Signed-off-by: David S. Miller commit 700d566e8171282eabef8b29e66d14edc5e18761 Author: Claudiu Beznea Date: Wed Dec 9 15:03:39 2020 +0200 net: macb: add support for sama7g5 emac interface Add support for SAMA7G5 10/100Mbps interface. Signed-off-by: Claudiu Beznea Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit ec771de654e4e02e941429d963d1cc6033980d48 Author: Claudiu Beznea Date: Wed Dec 9 15:03:38 2020 +0200 net: macb: add support for sama7g5 gem interface Add support for SAMA7G5 gigabit ethernet interface. Signed-off-by: Claudiu Beznea Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit f5f30cf8ef18be488c9ca1c9c2bd9c32f62c2241 Author: Claudiu Beznea Date: Wed Dec 9 15:03:37 2020 +0200 dt-bindings: add documentation for sama7g5 gigabit ethernet interface Add documentation for SAMA7G5 gigabit ethernet interface. Signed-off-by: Claudiu Beznea Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 20b3ba6159ec538103aa33957ba88c2ded112032 Author: Claudiu Beznea Date: Wed Dec 9 15:03:36 2020 +0200 dt-bindings: add documentation for sama7g5 ethernet interface Add documentation for SAMA7G5 ethernet interface. Signed-off-by: Claudiu Beznea Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit f4de93f03ed8da5218607852566e3326d31729b0 Author: Claudiu Beznea Date: Wed Dec 9 15:03:35 2020 +0200 net: macb: unprepare clocks in case of failure Unprepare clocks in case of any failure in fu540_c000_clk_init(). Fixes: c218ad559020 ("macb: Add support for SiFive FU540-C000") Signed-off-by: Claudiu Beznea Signed-off-by: David S. Miller commit 38493da4e6a81ee8df6679da7d6f4bea74558636 Author: Claudiu Beznea Date: Wed Dec 9 15:03:34 2020 +0200 net: macb: add function to disable all macb clocks Add function to disable all macb clocks. Signed-off-by: Claudiu Beznea Suggested-by: Andrew Lunn Signed-off-by: David S. Miller commit daafa1d33cc9286d4b17ad87a18df55687fd0ab6 Author: Claudiu Beznea Date: Wed Dec 9 15:03:33 2020 +0200 net: macb: add capability to not set the clock rate SAMA7G5's ethernet IPs TX clock could be provided by its generic clock or by the external clock provided by the PHY. The internal IP logic divides properly this clock depending on the link speed. The patch adds a new capability so that macb_set_tx_clock() to not be called for IPs having this capability (the clock rate, in case of generic clock, is set at the boot time via device tree and the driver only enables it). Signed-off-by: Claudiu Beznea Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit edac63861db72a462ccdfad0b5dfa66985d58bd5 Author: Claudiu Beznea Date: Wed Dec 9 15:03:32 2020 +0200 net: macb: add userio bits as platform configuration This is necessary for SAMA7G5 as it uses different values for PHY interface and also introduces hdfctlen bit. Signed-off-by: Claudiu Beznea Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 102e2c07239c07144d9c7338ec09b9d47f2e5f79 Author: Pablo Neira Ayuso Date: Tue Dec 8 21:47:07 2020 +0100 net: sched: incorrect Kconfig dependencies on Netfilter modules - NET_ACT_CONNMARK and NET_ACT_CTINFO only require conntrack support. - NET_ACT_IPT only requires NETFILTER_XTABLES symbols, not IP_NF_IPTABLES. After this patch, NET_ACT_IPT becomes consistent with NET_EMATCH_IPT. NET_ACT_IPT dependency on IP_NF_IPTABLES predates Linux-2.6.12-rc2 (initial git repository build). Fixes: 22a5dc0e5e3e ("net: sched: Introduce connmark action") Fixes: 24ec483cec98 ("net: sched: Introduce act_ctinfo action") Signed-off-by: Pablo Neira Ayuso Link: https://lore.kernel.org/r/20201208204707.11268-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski commit 60f2f74978e69fdb63e7a26179cbd5c50d4845c2 Merge: 5eb3c85e343ae e319a1b956f78 Author: Dave Airlie Date: Thu Dec 10 09:42:34 2020 +1000 Merge tag 'drm-msm-next-2020-12-07' of https://gitlab.freedesktop.org/drm/msm into drm-next * Shutdown hook for GPU (to ensure GPU is idle before iommu goes away) * GPU cooling device support * DSI 7nm and 10nm phy/pll updates * Additional sm8150/sm8250 DPU support (merge_3d and DSPP color processing) * Various DP fixes * A whole bunch of W=1 fixes from Lee Jones * GEM locking re-work (no more trylock_recursive in shrinker!) * LLCC (system cache) support * Various other fixes/cleanups Signed-off-by: Dave Airlie From: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGt0G=H3_RbF_GAQv838z5uujSmFd+7fYhL6Yg=23LwZ=g@mail.gmail.com commit c15800b6770ed30187c1748af506d845fb898020 Merge: da9482332d581 f1a2558913036 Author: Jakub Kicinski Date: Wed Dec 9 15:26:42 2020 -0800 Merge branch 'xdp-redirect-implementation-for-ena-driver' Shay Agroskin says: ==================== XDP Redirect implementation for ENA driver ENA is adding XDP Redirect support for its driver and some other small tweaks. This series adds the following: - Make log messages in the driver have a uniform format using netdev_* function - Improve code readability - Add support for XDP Redirect ==================== Link: https://lore.kernel.org/r/20201208180208.26111-1-shayagr@amazon.com Signed-off-by: Jakub Kicinski commit f1a25589130366a96a2a0d165e9f4d9289336e9f Author: Shay Agroskin Date: Tue Dec 8 20:02:08 2020 +0200 net: ena: introduce ndo_xdp_xmit() function for XDP_REDIRECT This patch implements the ndo_xdp_xmit() net_device function which is called when a packet is redirected to this driver using an XDP_REDIRECT directive. The function receives an array of xdp frames that it needs to xmit. The TX queues that are used to xmit these frames are the XDP queues used by the XDP_TX flow. Therefore a lock is added to synchronize both flows (XDP_TX and XDP_REDIRECT). Signed-off-by: Shay Agroskin Signed-off-by: Jakub Kicinski commit f8b91f255a05c4734ab093eb93b5826499a35328 Author: Shay Agroskin Date: Tue Dec 8 20:02:07 2020 +0200 net: ena: use xdp_return_frame() to free xdp frames XDP subsystem has a function to free XDP frames and their associated pages. Using this function would help the driver's XDP implementation to adjust to new changes in the XDP subsystem in the kernel (e.g. introduction of XDP MB). Also, remove 'xdp_rx_page' field from ena_tx_buffer struct since it is no longer used. Signed-off-by: Shay Agroskin Signed-off-by: Jakub Kicinski commit a318c70ad152b24f92870dfe5d93b7675498c68f Author: Shay Agroskin Date: Tue Dec 8 20:02:06 2020 +0200 net: ena: introduce XDP redirect implementation This patch adds a partial support for the XDP_REDIRECT directive which instructs the driver to pass the packet to an interface specified by the program. The directive is passed to the driver by calling bpf_redirect() or bpf_redirect_map() functions from the eBPF program. To lay the ground for integration with the existing XDP TX implementation the patch removes the redundant page ref count increase in ena_xdp_xmit_frame() and then decrease in ena_clean_rx_irq(). Instead it only DMA unmaps descriptors for which XDP TX or REDIRECT directive was received. The XDP Redirect support is still missing .ndo_xdp_xmit function implementation, which allows to redirect packet to an ENA interface, which would be added in a later patch. Signed-off-by: Shay Agroskin Signed-off-by: Jakub Kicinski commit e8223eeff021bc0f348efa10781119d23a68cf04 Author: Shay Agroskin Date: Tue Dec 8 20:02:05 2020 +0200 net: ena: use xdp_frame in XDP TX flow Rename the ena_xdp_xmit_buff() function to ena_xdp_xmit_frame() and pass it an xdp_frame struct instead of xdp_buff. This change lays the ground for XDP redirect implementation which uses xdp_frames when 'xmit'ing packets. Signed-off-by: Shay Agroskin Signed-off-by: Jakub Kicinski commit 89dd735e8c1e58b9b0d39535c7c32261773cb495 Author: Shay Agroskin Date: Tue Dec 8 20:02:04 2020 +0200 net: ena: aggregate stats increase into a function Introduce ena_increase_stat() function to increase statistics by a certain number. The function includes the - lock aquire (on 32bit machines) - stat increase - lock release (on 32bit machines) line sequence that is ubiquitous across the driver. The function increases a single stat at a time and several stats which are increased together weren't put into a function to avoid calling the function several times for each stat which looks bad and might decrease performance. Signed-off-by: Shay Agroskin Signed-off-by: Jakub Kicinski commit 1e5847395eebfc98e89558c9f5d0058b949ddc1d Author: Shay Agroskin Date: Tue Dec 8 20:02:03 2020 +0200 net: ena: fix coding style nits This commit fixes two nits, but it does not generate any change to binary because of the optimization of gcc. - use `count` instead of `channels->combined_count` - change return type from `int` to `bool` Also add spaces and change macro order in OR assignment to make the code easier to read. Signed-off-by: Sameeh Jubran Signed-off-by: Kuniyuki Iwashima Signed-off-by: Shay Agroskin Signed-off-by: Jakub Kicinski commit e9548fdf93bc9e84f49fa272c74dc7cdaee793a3 Author: Shay Agroskin Date: Tue Dec 8 20:02:02 2020 +0200 net: ena: store values in their appropriate variables types This patch changes some of the variables types to match the values they hold. These wrong types fail some of our static checkers that search for accidental conversions in our driver. Signed-off-by: Ido Segev Signed-off-by: Igor Chauskin Signed-off-by: Shay Agroskin Signed-off-by: Jakub Kicinski commit da580ca8de2c74c242b5e4eaa7e8ccc67322598a Author: Shay Agroskin Date: Tue Dec 8 20:02:01 2020 +0200 net: ena: add device distinct log prefix to files ENA logs are adjusted to display the full ENA representation to distinct each ENA device in case of multiple interfaces. Using netdev_err/warn and dev_info functions for logging provides uniform printing with clear distinction of the device and interface. This patch changes all printing in ena_com files to use netev_* logging functions except for messages of info level. Log functions of that level would be printed with dev_info because of the early stage they are called in when net_device struct isn't yet registered. To allow using netdev_* functions in all ena_com functions, a pointer to the net_device was added to ena_com_dev struct. The patch also adds some log messages to make driver debugging easier. Signed-off-by: Amit Bernstein Signed-off-by: Shay Agroskin Signed-off-by: Jakub Kicinski commit ce74496a1575dc5364ad2aed99d3604269c7b645 Author: Shay Agroskin Date: Tue Dec 8 20:02:00 2020 +0200 net: ena: use constant value for net_device allocation The patch changes the maximum number of RX/TX queues it advertises to the kernel (via alloc_etherdev_mq()) from a value received from the device to a constant value which is the minimum between 128 and the number of CPUs in the system. By allocating the net_device struct with a constant number of queues, the driver is able to allocate it at a much earlier stage, before calling any ena_com functions. This would allow to make all log prints in ena_com to use netdev_* log functions instead or current pr_* ones. Note: netdev_* prints in ena_com functions that are called before net_device registration in ena_probe() might print messages that are a bit ugly (with strings like "(unnamed net_device) (uninitialized)"). However we decided to use netdev_* prints in these functions anyway, for the sake of getting better messages later, when ena_com functions are called after ena_probe() form other parts of the driver. See discussion about this decision in [1]. [1] http://www.mail-archive.com/netdev@vger.kernel.org/msg353590.html Signed-off-by: Shay Agroskin Signed-off-by: Jakub Kicinski commit da9482332d581bb8ea69eca34d7f75a3c6247475 Author: Min Li Date: Tue Dec 8 10:41:57 2020 -0500 ptp: clockmatrix: deprecate firmware older than 4.8.7 Add deprecated flag to indicate < v4.8.7. Fix idtcm_enable_tod() call correct settime(). Signed-off-by: Min Li Link: https://lore.kernel.org/r/1607442117-13661-4-git-send-email-min.li.xe@renesas.com Signed-off-by: Jakub Kicinski commit 7260d1c8fd86672d0b5fc4b5a36e0f17c0c3c177 Author: Min Li Date: Tue Dec 8 10:41:56 2020 -0500 ptp: clockmatrix: Fix non-zero phase_adj is lost after snap Fix non-zero phase_adj is lost after snap. Use ktime_sub to do ktime_t subtraction. Signed-off-by: Min Li Link: https://lore.kernel.org/r/1607442117-13661-3-git-send-email-min.li.xe@renesas.com Signed-off-by: Jakub Kicinski commit fa439059d8281265b0df5fc8e4cceba41c837a48 Author: Min Li Date: Tue Dec 8 10:41:55 2020 -0500 ptp: clockmatrix: remove 5 second delay before entering write phase mode Remove write phase mode 5 second setup delay, not needed. Signed-off-by: Min Li Link: https://lore.kernel.org/r/1607442117-13661-2-git-send-email-min.li.xe@renesas.com Signed-off-by: Jakub Kicinski commit 251f4fe224d6c5399e71b57ab175db3b783dbca0 Author: Min Li Date: Tue Dec 8 10:41:54 2020 -0500 ptp: clockmatrix: reset device and check BOOT_STATUS SM_RESET device only when loading full configuration and check for BOOT_STATUS. Also remove polling for write trigger done in _idtcm_settime(). Changes since v1: -Correct warnings from strict checkpatch Signed-off-by: Min Li Acked-by: Richard Cochran Link: https://lore.kernel.org/r/1607442117-13661-1-git-send-email-min.li.xe@renesas.com Signed-off-by: Jakub Kicinski commit fd1c3318f4e7cf30cd73efb3cb5e9648efc6625b Author: Johannes Berg Date: Wed Dec 9 23:16:51 2020 +0200 iwlwifi: mvm: validate notification size when waiting When waiting for a notification and then processing it, we also need to check the size of the data before we use it. Most places do that already, but fix the remaining ones to do it as well. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.b29573bcba39.I4b7e72824d06dc0719a40021d933e29edfc14713@changeid Signed-off-by: Luca Coelho commit d3d9b4fca3636bb2dc75e2eb2e4e384bbf5e4159 Author: Emmanuel Grumbach Date: Wed Dec 9 23:16:50 2020 +0200 iwlwifi: mvm: purge the BSS table upon firmware load When the firmware is loaded, its internal timer (GP2) is reset and all the time_sync in the BSS table is now unusable. Ask cfg80211 to purge the BSS table. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.1b703b6f4c05.I0b5c51aa87e86c964e2eae6d959a96e232840ef5@changeid Signed-off-by: Luca Coelho commit c0f46dca0019397560de2c0afc65ae31bc8a16ad Author: Mordechay Goodstein Date: Wed Dec 9 23:16:49 2020 +0200 iwlwifi: mvm: check that statistics TLV version match struct version FW now puts in the struct version, the TLV version so we also check it to make sure it matches. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.bc1dfb56ffbd.I99d8085cccc8687805781ccc43e189dbcef0e63b@changeid Signed-off-by: Luca Coelho commit 27eeb03784b3cfbf38716ef314bf9a0dc09bd1fe Author: Avraham Stern Date: Wed Dec 9 23:16:48 2020 +0200 iwlwifi: mvm: add size checks for range response notification The range response notification has several versions. Check the notification size according to the expected notification version. Notifications with incorrect size will be ignored. Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.ee57c3214d05.I810d7de33fb08001ef1a2e24714d5b68932e088e@changeid Signed-off-by: Luca Coelho commit 8a59d39033c35bb484f6bd91891db86ebe07fdc2 Author: Johannes Berg Date: Wed Dec 9 23:16:47 2020 +0200 iwlwifi: mvm: hook up missing RX handlers The RX handlers for probe response data and channel switch weren't hooked up properly, fix that. Fixes: 86e177d80ff7 ("iwlwifi: mvm: add NOA and CSA to a probe response") Fixes: d3a108a48dc6 ("iwlwifi: mvm: Support CSA countdown offloading") Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.2d07dcee0d35.I07a61b5d734478db57d9434ff303e4c90bf6c32b@changeid Signed-off-by: Luca Coelho commit b8aba27cdc0ea6aaafacba3b899ff99d6d876fad Author: Johannes Berg Date: Wed Dec 9 23:16:46 2020 +0200 iwlwifi: tighten RX MPDU bounds checks Previously, we added checks that the contained MPDU size is long enough, but really we should also check that the notification itself fits into the data. Add some checks for that. Also add unlikely() annotations on the previously added checks. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.51cc04cf1e3e.I7bfd6809f8f5feb75f79397646e6656e95688a0e@changeid Signed-off-by: Luca Coelho commit ac1a98e1e924e7e8d7c7e5b1ca8ddc522e10ddd0 Author: Matti Gottlieb Date: Wed Dec 9 23:16:45 2020 +0200 iwlwifi: Add a new card for MA family Add a PCI ID for snj with mr in AX family. Signed-off-by: Matti Gottlieb Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.101ac3058c04.Idd28706b122cdc8103956f8e72bb062fe4adb54e@changeid Signed-off-by: Luca Coelho commit 87d9564e14cf5d05e4f1fa4eb7c55d798427f1dd Author: Johannes Berg Date: Wed Dec 9 23:16:44 2020 +0200 iwlwifi: mvm: disconnect if channel switch delay is too long If the channel switch delay that we would incur after the channel switch actually happens is longer than the quiet time we're willing to tolerate, disconnect as well. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.3bc3449922da.Ib0255deb67b2fc21317e274adcacb545bb1dc669@changeid Signed-off-by: Luca Coelho commit 906d4eb84408a4bfd63eef0de4f1bd5262f73ac0 Author: Johannes Berg Date: Wed Dec 9 23:16:43 2020 +0200 iwlwifi: support firmware reset handshake There are some races in the hardware that can possibly lead to a bus lockup later during a restart when we manage to kill the firmware at a bad time (while it's accessing the bus). To work around this, add support for a new handshake between firmware and driver to ensure that the firmware is in a well- known state before we kill it. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.7756fcc9865c.I13de65e0ffcb4186dd4c1a465f66df2e98c9a947@changeid Signed-off-by: Luca Coelho commit b2ed841ed070ccbe908016537f429a3a8f0221bf Author: Johannes Berg Date: Wed Dec 9 23:16:42 2020 +0200 iwlwifi: add an extra firmware state in the transport Start tracking not just if the firmware is dead or alive, but also if it's starting. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.33e50d40b688.I8bbd41af7aa5e769273a6fc1c06fbf548dd2eb26@changeid Signed-off-by: Luca Coelho commit caf463771295bd31763536ac736e2ab0535f0eef Author: Sara Sharon Date: Wed Dec 9 23:16:41 2020 +0200 iwlwifi: mvm: fix a race in CSA that caused assert 0x3420 When we get a channel switch with a very long quiet period, we schedule a work to disconnect after a while. This work runs in background. In the meanwhile, we keep getting beacons and sending FW modify command for each. This has a potential race, where we modify the CSA after we aborted it. Protect the flow by setting csa_failed to true in case we abort, and check it before sending the modify command. This required a modification to the way we treat csa_failed in iwl_mvm_post_channel_switch: 1. The variable isn't being reset anymore, so we can still look at it in iwl_mvm_channel_switch_rx_beacon. This is fine, since we reset it when starting a new CSA. 2. There is no more early return in case of csa_failed. This is fine, since before this patch csa_failed was set only for GO, and for GO the function is only resetting the power settings, which we want to restore even in case of failure. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.b023856bdf39.I4ed0149e0018fe5e1ae3c2a1cbc614954016063f@changeid Signed-off-by: Luca Coelho commit b570e5b0592a56c5990ae3aa0fdb93dd9b545d43 Author: Johannes Berg Date: Wed Dec 9 23:16:40 2020 +0200 iwlwifi: mvm: validate firmware sync response size We send some data to the firmware and expect to get it back, but we shouldn't really trust the firmware on this. Check the size of all the data we send down to avoid using bad or just uninitialized data when the firmware doesn't respond right. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.a5a8173f16c7.I4fa68bb2b1c7dcc52ddd381c4042722d27c4a34d@changeid Signed-off-by: Luca Coelho commit e4475583b5c49d5a90dcff9ae201018cd98c7d84 Author: Johannes Berg Date: Wed Dec 9 23:16:39 2020 +0200 iwlwifi: pcie: clean up some rx code We don't need the sequence/index/cmd_index unless we're doing reclaim, they're not even valid in the other cases. Move the variables and their assignments into the right if statement and combine the two if statements into a single one as well. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.6207fdcc91a9.Ia71e766ead7560262f4bc6ad3da6f1117c498cd6@changeid Signed-off-by: Luca Coelho commit 8e99ea8d09a159d46069faef10721a3f8436d2fd Author: Johannes Berg Date: Thu Dec 10 00:06:03 2020 +0200 iwlwifi: use SPDX tags Use SPDX tags instead of the long copyright notices. Also cleanup some duplicate copyright notices and combine the years where possible. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201210000603.481bcb512a6f.I8146abe5a637079e7336209f23cb26af98b12b31@changeid Signed-off-by: Luca Coelho commit 58a1c9f9a9b6b9092ae10b84f6b571a06596e296 Author: Johannes Berg Date: Wed Dec 9 23:16:37 2020 +0200 iwlwifi: dbg-tlv: fix old length in is_trig_data_contained() There's a bug in the lengths - the 'old length' needs to be calculated using the 'old' pointer, of course, likely a copy/paste mistake. Fix this. Reported-by: Daniel Gabay Signed-off-by: Johannes Berg Fixes: cf29c5b66b9f ("iwlwifi: dbg_ini: implement time point handling") Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.c0105ddffa74.I1ddb243053ff763c91b663748b6a593ecc3b5634@changeid Signed-off-by: Luca Coelho commit 152fdc0f698896708f9d7889a4ba4da6944b74f7 Author: Johannes Berg Date: Wed Dec 9 23:16:36 2020 +0200 iwlwifi: trans: consider firmware dead after errors If we get an error, no longer consider the firmware to be in IWL_TRANS_FW_ALIVE state. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.a9d01e79c1c7.Ib2deb076b392fb516a7230bac91d7ab8a9586d86@changeid Signed-off-by: Luca Coelho commit 69d6cfc491f0d2f0429b3ef1cffd393d826f2c5d Author: Johannes Berg Date: Wed Dec 9 23:16:35 2020 +0200 iwlwifi: pcie: remove unnecessary setting of inta_mask We set this here, but don't really use it until we've enabled interrupts. But when enabling interrupts we always overwrite this value anyway, so remove setting it here, mostly in order not to have some additional code duplicated later. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.135d96297aca.Id2d26fff60b6c31202bb0a36e46948bda6a39d33@changeid Signed-off-by: Luca Coelho commit 97b4f859543dd94f81b98de205628b90c10c0419 Author: Johannes Berg Date: Wed Dec 9 23:16:34 2020 +0200 iwlwifi: fw: file: fix documentation for SAR flag This was mistakenly tagged with CAPA instead of API, fix it. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.6a9203094c1e.I658e63066b05257e78fc20bfcbcf151ba8fd7754@changeid Signed-off-by: Luca Coelho commit aa7fd94687b2dd485de5ad54a879ce563ca19fef Author: Johannes Berg Date: Wed Dec 9 23:16:33 2020 +0200 iwlwifi: pcie: remove MSIX_HW_INT_CAUSES_REG_IML handling This is actually wrong, the bit used here by the image loader is BIT(1), not BIT(2). The latter will be reused by the new reset flow soon. However, as we never had any complaints about not printing the IML status or not handling the IML error interrupt (and I suspect the code handling it was incorrectly anyway) just remove the code for it. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.9a323f4a3493.Ic7aee4dbbf4be42287c338c2fa1b111473724116@changeid Signed-off-by: Luca Coelho commit 94631b56422df40d814db99e94bdbf4e2bd3d32a Author: Johannes Berg Date: Wed Dec 9 23:16:32 2020 +0200 iwlwifi: mvm: clean up scan state on failure We keep the scan status per UID in scan_uid_status field when the iwl_mvm_build_scan_cmd() function is called. If we error out after this, e.g. due to FW restart being in progress, we're not cleaning up properly, and can run into warnings later. Clean up internal variables when starting fails after calling the iwl_mvm_build_scan_cmd() function. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.970421a2f753.Id62b2da8a0ccccbb114407db82ca485d07749d39@changeid Signed-off-by: Luca Coelho commit 2f7a04c7b03b7fd63b7618e29295fc25732faac1 Author: Johannes Berg Date: Wed Dec 9 23:16:31 2020 +0200 iwlwifi: mvm: do more useful queue sync accounting We're currently doing accounting on the queue sync with an atomic variable that counts down the number of remaining notifications that we still need. As we've been hitting issues in this area, modify this to track a bitmap of queues, not just the number of queues, and print out the remaining bitmap in the warning. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.0a3fa177cd6b.I7c69ff999419368266279ec27dd618eb450908b3@changeid Signed-off-by: Luca Coelho commit 9e8338ad17eb8976edd5d2def516e4b3346a4470 Author: Johannes Berg Date: Wed Dec 9 23:16:30 2020 +0200 iwlwifi: mvm: fix 22000 series driver NMI For triggering an NMI in the firmware, we should only set BIT(24) in the corresponding register, not the entire mask that's usable by the driver. This currently doesn't matter because the firmware only enables BIT(24), but we'll start using BIT(25) for other purposes with an upcoming API change. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.2f982365d085.Id09daabfd331ba9e120abcbbedd2ad6448902ed0@changeid Signed-off-by: Luca Coelho commit 3fa965c2dd4ef6503ffeb2e1ad17a4e46e14f6b3 Author: Johannes Berg Date: Wed Dec 9 23:16:29 2020 +0200 iwlwifi: pcie: change 12k A-MSDU config to use 16k buffers If 12k A-MSDU size is requested, we will actually allocate 16k due to page allocation. Thus, change it to actually mean 16k, which is useful for certain sniffer use cases. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.84ae405829d4.I31184f4be31f7c3feb9a29aef3a111e70d15c64a@changeid Signed-off-by: Luca Coelho commit cf5b462768474c783cf40f6408a038540917088a Author: Johannes Berg Date: Wed Dec 9 23:16:28 2020 +0200 iwlwifi: mvm: move iwl_mvm_stop_device() out of line This function has grown quite a bit over time, move it out of line before we grow it even further. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.1a0211e66906.I572eb69dc3738319310c9cbe03a36d942f4f68f7@changeid Signed-off-by: Luca Coelho commit e20a5c9f768b7108e96cd94dacf27e4be071d9d7 Author: Johannes Berg Date: Wed Dec 9 23:16:27 2020 +0200 iwlwifi: mvm: clear up iwl_mvm_notify_rx_queue() argument type The argument type to iwl_mvm_notify_rx_queue() is currently just a u8 *, but that's misleading because we actually need the inner data to be of type struct iwl_mvm_internal_rxq_notif, because we interpret it when we get it back from the device (to check the sync bool and possibly the cookie.) Therefore, clear up any potential confusion and require that the data passed is of type struct iwl_mvm_internal_rxq_notif *. Also, while at it, rename the "count" to "notif_size" as "count" doesn't really clearly say what it's counting. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.d28e14682bdc.I9ac366aa97db045be4daa4ba263267a3ac6a6a2f@changeid Signed-off-by: Luca Coelho commit 59fa61f3fd4ee5315190d4233ac3e6ca1a411556 Author: Emmanuel Grumbach Date: Wed Dec 9 23:16:26 2020 +0200 iwlwifi: remove sw_csum_tx This was a hack done to test the data path of devices that didn't support well CSUM offload in Tx. This is not needed anymore. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.6c9fc9fb48d5.I2aaebf90e6fe81860105d049a8d35746fa8d86c2@changeid Signed-off-by: Luca Coelho commit df72138de4bc4e85e427aabc60fc51be6cc57fc7 Author: Johannes Berg Date: Wed Dec 9 23:16:25 2020 +0200 iwlwifi: pcie: validate RX descriptor length Validate the maximum RX descriptor length against the size of the buffers we gave the device - if it doesn't fit then the hardware messed up. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.6378fb435cc0.Ib07485f3dc5999c74b03f21e7a808c50a05e353c@changeid Signed-off-by: Luca Coelho commit efc0ec5afb6e1488b3bdc4bbf85533d79d7e5f9f Author: Johannes Berg Date: Wed Dec 9 23:16:24 2020 +0200 iwlwifi: validate MPDU length against notification length The MPDU contained in a notification shouldn't be larger than the notification size itself is, validate this. Reported-by: Haggai Abramovsky Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.7c721ad37014.Id5746874ecfa208b60baa62691b2d9dc5dd4d89c@changeid Signed-off-by: Luca Coelho commit c6bae216907119a39e204a5011bd22e6c816cedb Author: Mordechay Goodstein Date: Wed Dec 9 23:16:23 2020 +0200 iwlwifi: mvm: iterate active stations when updating statistics Instead of enumerating all possible stations iterate only active ones. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.c049de5611b4.Ic35b8d1a328903195ec7cb887a9cb198b7d8f856@changeid Signed-off-by: Luca Coelho commit 7b2829f315d046602d119bb4fe30de54badcb36e Author: Emmanuel Grumbach Date: Wed Dec 9 23:16:22 2020 +0200 iwlwifi: sort out the NVM offsets The comments about the NVM offsets were inaccurate. Fix the enum so that the right values appear under the right comment. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.6fcf16392341.Ie882e66085901357484c9e272a73602248c7e69f@changeid Signed-off-by: Luca Coelho commit d295a898c2f508f950f3f6b269e39eb8ee238f77 Author: Mordechay Goodstein Date: Wed Dec 9 23:16:21 2020 +0200 iwlwifi: fix typo in comment Change "anntena" to "antenna" in a comment in stats.h. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.abca200b24d6.If5ce9e8abd5034496e98e97a53c446f045438388@changeid Signed-off-by: Luca Coelho commit cdaba917268d7b58bf02fcc587cb2a7a277dc931 Author: Emmanuel Grumbach Date: Wed Dec 9 23:16:20 2020 +0200 iwlwifi: follow the new inclusive terminology The new inclusive terminology requires to change a few terms that were used in iwlwifi. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.1eb4c8625f36.I1b17b68d4a8e77071da3e15ffbd902d15c1d4938@changeid Signed-off-by: Luca Coelho commit 52b155214be8f403d0243943a844977e8cb4f1e7 Author: Emmanuel Grumbach Date: Wed Dec 9 23:16:19 2020 +0200 iwlwifi: mvm: remove the read_nvm from iwl_run_unified_mvm_ucode Similarly to what I did to iwl_run_init_mvm_ucode, there is no need to pass the read_nvm parameter. Either we have an NVM and we don't need to read it, or we don't and we need to read it. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.1b764faecfee.I2da0ada577fc16268125a4a15b5e725c18c643ee@changeid Signed-off-by: Luca Coelho commit 861bae42e1f125a5a255ace3ccd731e59f58ddec Author: Mordechay Goodstein Date: Wed Dec 9 23:16:18 2020 +0200 iwlwifi: avoid endless HW errors at assert time Curretly we only mark HW error state "after" trying to collect HW data, but if any HW error happens while colleting HW data we go into endless loop. avoid this by setting HW error state "before" collecting HW data. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.4c7e5a87da15.Ic35b2f28ff08f7ac23143c80f224d52eb97a0454@changeid Signed-off-by: Luca Coelho commit 87f1283b6ae4c3e71ac6e8fe109904f8b888ffa7 Author: Mordechay Goodstein Date: Wed Dec 9 23:16:17 2020 +0200 iwlwifi: enable sending/setting debug host event This is used for BT node and for any user that wants to control what events would be send from FW to the driver. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.a9dba2daca59.I2b18bccf0d409f1517c3e2841b667014f9dafc24@changeid Signed-off-by: Luca Coelho commit eae94cf82d7456b57fa9fd55c1edb8a726dcc19c Author: Luca Coelho Date: Thu Dec 10 00:06:57 2020 +0200 iwlwifi: mvm: add support for 6GHz Add support to the 6GHz band (aka. Ultra High Band or UHB). This allows us to scan and connect to channels in that band, including all the relevant features, such as preferred scan channels, colocated channels etc. Co-developed-by: Haim Dreyfuss Signed-off-by: Haim Dreyfuss Co-developed-by: Ilan Peer Signed-off-by: Ilan Peer Co-developed-by: Tova Mussai Signed-off-by: Tova Mussai Co-developed-by: Andrei Otcheretianski Signed-off-by: Andrei Otcheretianski Co-developed-by: Tali Levi Rovinsky Signed-off-by: Tali Levi Rovinsky Co-developed-by: Avraham Stern Signed-off-by: Avraham Stern Co-developed-by: Ayala Beker Signed-off-by: Ayala Beker Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201210000657.0fdbfc3d7352.Idb648536faf21716e2ab2c6d6890d3e49f719cd3@changeid Signed-off-by: Luca Coelho commit d43ab298efc639bd40a90daa4bc7c556c00b6737 Author: Johannes Berg Date: Wed Dec 9 23:16:15 2020 +0200 iwlwifi: copy iwl_he_capa for modifications This data is not necessarily the same across devices as we may modify it due to the number of antennas and for overrides (though in practice overrides are likely to be identical), so modifying the global data is wrong. Make a copy of it in the NVM data and modify it there instead. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.6b4ee30c59e4.I0c30ef78b3bf727fe80b16a19c7588016d6b04bf@changeid Signed-off-by: Luca Coelho commit 4adfaf9b2de3a04a9ee9adff6e000e8dbb37bed5 Author: Emmanuel Grumbach Date: Wed Dec 9 23:16:14 2020 +0200 iwlwifi: pcie: remove obsolete pre-release support code We no longer need code that was introduced to differentiate between two early versions of 8260. We can remove this convoluted way to get the hardware version that was needed because of a bug in the register's configuration. Moreover, since we no longer need to access the PRPH registers, we no longer need to wake up the device, request ownership, etc... Remove all that. This allows us to get the rid of the obsolete comment about the AUX bus MISC address space which should have been moved when this code was moved away from here. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.4a5665ccd8a6.Iff3879405c15758ba661c430e77dc2160ddada1c@changeid Signed-off-by: Luca Coelho commit 3b25f1aff503bddd7911b62bbbcacc114cd04b8f Author: Emmanuel Grumbach Date: Wed Dec 9 23:16:13 2020 +0200 iwlwifi: mvm: remove the read_nvm from iwl_run_init_mvm_ucode If we already read the NVM, we don't need to read it again. Make sure that this is the case with a WARNING. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.8e0ffce7f873.Ie526042c4d4b93d9116c90f53180cbadef0b32cb@changeid Signed-off-by: Luca Coelho commit 486e93ef3e1c3a4636ee5f2013434b201a52414b Author: Mordechay Goodstein Date: Wed Dec 9 23:16:12 2020 +0200 iwlwifi: mvm: Init error table memory to zero If case we have an error reading FW memory we get garbage (stack old data) in the report, so just initialize the table to zero. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.742786ffddba.Id7a17985f5bf6a03d3850f445ccdc611f97776ce@changeid Signed-off-by: Luca Coelho commit 5257913547064c110ed5f6abbd3c10ac1168cfe3 Author: Naftali Goldstein Date: Wed Dec 9 23:16:10 2020 +0200 iwlwifi: d3: do not send the WOWLAN_CONFIGURATION command for netdetect This command should be used only when there's a real client station. Currently it works, but since soon the driver will stop actually having an auxiliary station by default, and this command requires _some_ valid station, it needs to be removed from this flow. Signed-off-by: Naftali Goldstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.81b2acfe292b.I8c7372e6f72279e22966a2d0a9066521f9d2f1a0@changeid Signed-off-by: Luca Coelho commit a4450980589522880b1429448a10db38fee2e26e Author: Mordechay Goodstein Date: Wed Dec 9 23:16:09 2020 +0200 iwlwifi: move reclaim flows to the queue file Reclaim flows are bus-independent TX functions so we move it to the common place handling bus-independent tx operations used spatch rule @@ @@ ( -iwl_trans_pcie_freeze_txq_timer +iwl_trans_txq_freeze_timer | -iwl_trans_pcie_set_q_ptrs +iwl_trans_txq_set_q_ptrs | -iwl_pcie_txq_free_tfd +iwl_txq_free_tfd | -iwl_pcie_txq_progress +iwl_txq_progress | -iwl_trans_pcie_reclaim +iwl_trans_txq_reclaim ) Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.40723e92b6bf.I83cf71d9c6d989ec42f52b353f1d33f32540db59@changeid Signed-off-by: Luca Coelho commit 846067693fc81f6f6bf6f2aee2750c797c2d19ed Author: Janie Tu Date: Wed Dec 9 23:16:08 2020 +0200 iwlwifi: mvm: fix sar profile printing issue The profile shows an invalid value because the wrong format was used. A u8 value should use by %hhu, not %hhd. Fix thisit by changing it to %hhu. Signed-off-by: Janie Tu Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.a595be52af22.I1843c3c4f9fb32fa8d439052bd0a5ad230f292e2@changeid Signed-off-by: Luca Coelho commit cc598782d7c02afb07554f34fdd5667dba3e6bc9 Author: Rotem Saado Date: Wed Dec 9 23:16:07 2020 +0200 iwlwifi: yoyo: align the write pointer to DWs from AX210 generation the write pointer is in Bytes. to be align with all previous HWs convert it DWs. Signed-off-by: Rotem Saado Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231351.c9a9cbef4a09.Ic7df63c617f79b7e6a95a510c51b3516bba5599f@changeid Signed-off-by: Luca Coelho commit b34872bc831de14eb36668f2b9f373303eaf98b9 Author: Mordechay Goodstein Date: Wed Dec 9 23:16:06 2020 +0200 iwlwifi: yoyo: add the ability to dump phy periphery This enables analyzing phy/HW bugs. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231351.53bce4f8353d.Ia6944582bd2c748387aaef96755d8919c5d25dc1@changeid Signed-off-by: Luca Coelho commit 2f8cfcc43dae3fbb3cdb7377b06db5d2fef78ed6 Author: Mordechay Goodstein Date: Wed Dec 9 23:16:05 2020 +0200 iwlwifi: remove all queue resources before free Currently calling iwl_txq_dyn_free only deletes the queue memory/DMA but any active timers are not dealt with. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231351.69231238667c.I04c6d012d9244a73261685f8fc797a26e5c961d6@changeid Signed-off-by: Luca Coelho commit 2bf39ddd77937ab2123bbf186e44f484610536d9 Author: Daniel Palmer Date: Sun Nov 29 20:07:58 2020 +0900 dt-bindings: gpio: Add a binding header for the MSC313 GPIO driver Header adds defines for the gpio number of each pad from the driver view. The gpio block seems to have enough registers for 128 lines but what line is mapped to a physical pin depends on the chip. The gpio block also seems to contain some registers that are not related to gpio but needed somewhere to go. Because of the above the driver itself uses the index of a pin's offset in an array of the possible offsets for a chip as the gpio number. Signed-off-by: Daniel Palmer Reviewed-by: Rob Herring Signed-off-by: Arnd Bergmann commit f57ad63a835c6f1fe646ea985e78a79eb206a5b3 Author: Maxim Levitsky Date: Thu Dec 3 16:33:19 2020 +0200 KVM: x86: ignore SIPIs that are received while not in wait-for-sipi state In the commit 1c96dcceaeb3 ("KVM: x86: fix apic_accept_events vs check_nested_events"), we accidently started latching SIPIs that are received while the cpu is not waiting for them. This causes vCPUs to never enter a halted state. Fixes: 1c96dcceaeb3 ("KVM: x86: fix apic_accept_events vs check_nested_events") Signed-off-by: Maxim Levitsky Message-Id: <20201203143319.159394-2-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit 8f95c13228116b56d42736b0849a55b97267806c Author: Andy Shevchenko Date: Tue Dec 8 16:03:36 2020 +0200 i2c: designware: Make register offsets all of the same width For the sake of consistency add leading 0 to first register offsets to make them all of the same width. Signed-off-by: Andy Shevchenko Acked-by: Jarkko Nikula Signed-off-by: Wolfram Sang commit a5df4c14b9a9c576cd8229deb87da21aeb8aa82c Author: Andy Shevchenko Date: Tue Dec 8 16:03:35 2020 +0200 i2c: designware: Switch header to use BIT() and GENMASK() Currently header file uses partially BIT() and GENMASK() macros. Switch it to use those macros in all cases where it's applicable for the sake of consistency. Signed-off-by: Andy Shevchenko Acked-by: Jarkko Nikula Signed-off-by: Wolfram Sang commit 0b01392c18b9993a584f36ace1d61118772ad0ca Author: Codrin Ciubotariu Date: Sun Oct 4 13:07:11 2020 +0300 i2c: pxa: move to generic GPIO recovery Starting with commit 75820314de26 ("i2c: core: add generic I2C GPIO recovery") GPIO bus recovery is supported by the I2C core, so we can remove the driver implementation and use that one instead. Signed-off-by: Codrin Ciubotariu Signed-off-by: Wolfram Sang commit e8a61e5a7e2abb71168092b403f8524a0af1f1d3 Author: Geert Uytterhoeven Date: Tue Oct 13 16:12:01 2020 +0200 i2c: sh_mobile: Mark adapter suspended during suspend When a driver tries to send an I2C message while the adapter is suspended, this typically fails with: i2c-sh_mobile e60b0000.i2c: Transfer request timed out Avoid accessing the adapter while it is suspended by marking it suspended during suspend. This allows the I2C core to catch this, and print a warning: WARNING: CPU: 1 PID: 13 at drivers/i2c/i2c-core.h:54 __i2c_transfer+0x4a4/0x4e4 i2c i2c-6: Transfer while suspended Signed-off-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang commit 04fd6f0a9e678b62831104182354e03a5c901280 Author: Cristian Ciocaltea Date: Fri Nov 20 01:56:06 2020 +0200 i2c: owl: Add compatible for the Actions Semi S500 I2C controller Add S500 variant to the list of devices supported by the Actions Semi Owl I2C driver. Signed-off-by: Cristian Ciocaltea Reviewed-by: Manivannan Sadhasivam Reviewed-by: Manivannan Sadhasivam Signed-off-by: Wolfram Sang commit 730f205190a15439c8896f420cde6bbe50c454c2 Author: Cristian Ciocaltea Date: Fri Nov 20 01:56:04 2020 +0200 dt-bindings: i2c: owl: Convert Actions Semi Owl binding to a schema Convert the Actions Semi Owl I2C DT binding to a YAML schema for enabling DT validation. Additionally, add a new compatible string corresponding to the I2C controller found in the S500 variant of the Actions Semi Owl SoCs family. Signed-off-by: Cristian Ciocaltea Reviewed-by: Rob Herring Signed-off-by: Wolfram Sang commit 7fbee7e3386cb51e5ebc60c4d7cea13ffeab31d6 Merge: eb672def8b9d7 b62168e516dab Author: Arnd Bergmann Date: Wed Dec 9 21:15:50 2020 +0100 Merge tag 'omap-for-v5.11/genpd-rest-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/omap-genpd Remaining genpd changes for omaps for v5.11 This series contains the remaining genpd changes for omap4/5, and dra7 to add the power domain and reset control data to omap-prm driver. We also update several devices to probe without platform data to get us closer to booting omap4/5, and dra7 without platform data. There is also a build fix for the earlier am437x series that I should have applied into a separate branch on top of the am437x breaking commit. It ended here as I was originally planning to send out a single pull request for all the genpd changes, but then decided to break it down to smaller chunks. It's all really a larger single git branch though, so this should be OK and I really did not want to start reorganizing the branch after testing it and having it sit in Linux next. The changes done here are: - Clock driver needs idlest check dropped for IVA for omap4 and dra7 - Add remaining power domain and reset control data to omap-prm driver for omap4/5 and dra7 - Add device tree data for remaining power domains and reset control for omap4/5 and dra7 dts files - Update dss, dsp, iva and gpmc dts files to use genpd and to drop the remaining platform data - Update dss for omap5 to use genpd - Update dra7 iva to to use genpd and to drop the remaining platform data * tag 'omap-for-v5.11/genpd-rest-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: Fix am4 only build after genpd changes ARM: dts: Configure power domain for omap5 dss ARM: dts: omap5: add remaining PRM instances soc: ti: omap-prm: omap5: add genpd support for remaining PRM instances ARM: OMAP2+: Drop legacy platform data for dra7 gpmc ARM: dts: Configure interconnect target module for dra7 iva ARM: dts: dra7: add remaining PRM instances soc: ti: omap-prm: dra7: add genpd support for remaining PRM instances clk: ti: dra7: Drop idlest polling from IVA clkctrl clocks ARM: OMAP2+: Drop legacy platform data for omap4 gpmc ARM: OMAP2+: Drop legacy platform data for omap4 iva ARM: dts: Configure power domain for omap4 dsp ARM: dts: Configure power domain for omap4 dss ARM: dts: omap4: add remaining PRM instances soc: ti: omap-prm: omap4: add genpd support for remaining PRM instances clk: ti: omap4: Drop idlest polling from IVA clkctrl clocks Link: https://lore.kernel.org/r/pull-1606806458-694517@atomide.com-4 Signed-off-by: Arnd Bergmann commit eb672def8b9d735b5b6aa2b76a595a3e35bf5898 Merge: 07dd966db7404 df6c2ec872a62 Author: Arnd Bergmann Date: Wed Dec 9 21:13:41 2020 +0100 Merge tag 'omap-for-v5.11/genpd-am437x-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/omap-genpd Update am473x to boot without platform data Similar to am335x, we can now update am437x dts files to boot with genpd and simple-pm-bus, and drop the related platform data. To do that, we need to do the following changes for am437x: - Update the clock driver to keep the l3_main clock always on for suspend and resume to work - Add power domain and reset controller data to omap-prm driver - Configure interconnect clocks for system timers as those are now managed separately by the drivers/clocksource drivers - Update control module, wkup_m3, emif, ocmcram, mpuss and l3_noc for device tree data and drop the legacy platform data - Update the interconnect instances to boot with gendp and simple-pm-bus - Drop the remaining platform data for am437x * tag 'omap-for-v5.11/genpd-am437x-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: Drop legacy remaining legacy platform data for am4 ARM: dts: Use simple-pm-bus for genpd for am4 l3 ARM: dts: Move am4 l3 noc to a separate node ARM: dts: Use simple-pm-bus for genpd for am4 l4_per ARM: dts: Use simple-pm-bus for genpd for am4 l4_fast ARM: dts: Use simple-pm-bus for genpd for am4 l4_wkup ARM: OMAP2+: Drop legacy platform data for am4 mpuss ARM: OMAP2+: Drop legacy platform data for am4 ocmcram ARM: OMAP2+: Drop legacy platform data for am4 emif ARM: OMAP2+: Drop legacy platform data for am4 wkup_m3 ARM: dts: Configure interconnect target module for am4 wkup_m3 ARM: dts: Configure RTC powerdomain for am4 ARM: OMAP2+: Drop legacy platform data for am4 control module ARM: dts: Configure also interconnect clocks for am4 system timer ARM: dts: am43xx: add remaining PRM instances soc: ti: omap-prm: am4: add genpd support for remaining PRM instances clk: ti: am437x: Keep am4 l3 main clock always on for genpd Link: https://lore.kernel.org/r/pull-1606806458-694517@atomide.com-3 Signed-off-by: Arnd Bergmann commit 07dd966db74047098f7443d4b3493d07bc4d8897 Merge: 80c25006bc97e 133ad7ab7005d Author: Arnd Bergmann Date: Wed Dec 9 21:12:09 2020 +0100 Merge tag 'omap-for-v5.11/genpd-am335x-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/omap-genpd Update am335x to boot without platform data With the driver updates done for genpd support, we can now update am335x dts files to boot with genpd and simple-pm-bus, and drop the related platform data. To do that, we need to do the following changes for am335x: - Add the remaining power domain and reset controller instances - Configure interconnect clocks for system timers as those are now managed separately by the drivers/clocksource drivers - Update control module, RTC, gpmc, debugss, emif, ocmcram, instr, and mpuss for device tree data and drop the legacy platform data - Update the interconnect instances to boot with gendp and simple-pm-bus - Drop the remaining platform data for am335x - Add kconfig option for OMAP_HWMOD to build it only for the SoCs that need it * tag 'omap-for-v5.11/genpd-am335x-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: Build hwmod related code as needed ARM: OMAP2+: Drop legacy remaining legacy platform data for am3 ARM: dts: Use simple-pm-bus for genpd for am3 l3 ARM: dts: Use simple-pm-bus for genpd for am3 l4_per ARM: dts: Use simple-pm-bus for genpd for am3 l4_fast ARM: dts: Use simple-pm-bus for genpd for am3 l4_wkup ARM: OMAP2+: Drop legacy platform data for am3 mpuss ARM: OMAP2+: Drop legacy platform data for am3 instr ARM: OMAP2+: Drop legacy platform data for am3 ocmcram ARM: OMAP2+: Drop legacy platform data for am3 emif ARM: OMAP2+: Drop legacy platform data for am3 debugss ARM: OMAP2+: Drop legacy platform data for am3 and am4 gpmc ARM: OMAP2+: Drop legacy platform data for am3 wkup_m3 ARM: dts: Configure interconnect target module for am3 wkup_m3 ARM: dts: Configure RTC powerdomain for am3 ARM: OMAP2+: Drop legacy platform data for am3 control module ARM: dts: Configure also interconnect clocks for am4 system timer ARM: dts: am33xx: add remaining PRM instances Link: https://lore.kernel.org/r/pull-1606806458-694517@atomide.com-2 Signed-off-by: Arnd Bergmann commit 80c25006bc97e0920d12d851bbf3ee9cbfcd44f8 Merge: 3650b228f83ad 57df7e370d2ab Author: Arnd Bergmann Date: Wed Dec 9 21:11:35 2020 +0100 Merge tag 'omap-for-v5.11/genpd-drivers-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/omap-genpd Driver changes for omaps for genpd for v5.11 merge window This series of changes allows booting am335x with genpd and device tree data without the legacy platform data. Also at least am437x can be booted with gendp with power domain and dts data. The SoC specific dts changes will be a separate pull request. We need the following driver changes merged before the dts changes can be done: - platform code needs a few improvments to probe l4_wkup first for clocks, and to bail out when there is no platform data - ti-sysc driver needs a non-urgent fix for asserting rstctrl reset only after disabling the clocks, to probe modules with no known control registers, and added quirk handling for gpmc devices - omap-prm driver needs a non-urgent fix for reset status bit, support added for pm_clk, and then we add the rest of am335x power domain data - clock driver for am335x needs to keep l3_main clock enabled with genpd for suspend and resume to work - wkup_m3 remoteproc driver needs support added for reset control if available instead of the legacy pdata callbacks - pm33xx driver needs PM runtime support added for genpd The am335x specific driver changes for the clock, wkup_m3, pm33xx and remoteproc drivers are quite trivial and have not caused merge conflicts in Linux next. I did not get acks for these changes except from Santosh but had already pushed out the branch already at that point. So I've added the related driver maintainers to Cc. * tag 'omap-for-v5.11/genpd-drivers-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: remoteproc/wkup_m3: Use reset control driver if available soc: ti: pm33xx: Enable basic PM runtime support for genpd soc: ti: omap-prm: am3: add genpd support for remaining PRM instances soc: ti: omap-prm: Add pm_clk for genpd clk: ti: am33xx: Keep am3 l3 main clock always on for genpd bus: ti-sysc: Implement GPMC debug quirk to drop platform data bus: ti-sysc: Support modules without control registers ARM: OMAP2+: Probe PRCM first to probe l4_wkup with simple-pm-bus ARM: OMAP2+: Check for inited flag bus: ti-sysc: Assert reset only after disabling clocks soc: ti: omap-prm: Do not check rstst bit on deassert if already deasserted bus: ti-sysc: Fix bogus resetdone warning on enable for cpsw bus: ti-sysc: Fix reset status check for modules with quirks ARM: OMAP2+: Fix missing select PM_GENERIC_DOMAINS_OF ARM: OMAP2+: Fix location for select PM_GENERIC_DOMAINS Signed-off-by: Arnd Bergmann commit b5e438ebd7e808d1d2435159ac4742e01a94b8da Author: Sven Schnelle Date: Tue Dec 8 07:35:21 2020 +0100 s390/smp: perform initial CPU reset also for SMT siblings Not resetting the SMT siblings might leave them in unpredictable state. One of the observed problems was that the CPU timer wasn't reset and therefore large system time values where accounted during CPU bringup. Cc: # 4.0 Fixes: 10ad34bc76dfb ("s390: add SMT support") Reviewed-by: Heiko Carstens Signed-off-by: Sven Schnelle Signed-off-by: Heiko Carstens commit b4d70a6134d2152d692ccc873ff6fa3351631927 Author: Heiko Carstens Date: Mon Dec 7 20:56:38 2020 +0100 s390/mm: use invalid asce for user space when switching to init_mm Currently only idle_task_exit() explicitly switches (switch_mm) to init_mm. This causes the kernel asce to be loaded into cr7 and therefore it would be used for potential user space accesses. This is currently no problem since idle_task_exit() is nearly the last thing a CPU executes before it is taken down. However things might change - and therefore make sure that always the invalid asce is used for cr7 when active_mm is init_mm. This makes sure that all potential user space accesses will fail, instead of accessing kernel address space. Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens commit 454efcf82ea17d7efeb86ebaa20775a21ec87d27 Author: Sven Schnelle Date: Sun Dec 6 10:47:47 2020 +0100 s390/idle: fix accounting with machine checks When a machine check interrupt is triggered during idle, the code is using the async timer/clock for idle time calculation. It should use the machine check enter timer/clock which is passed to the macro. Fixes: 0b0ed657fe00 ("s390: remove critical section cleanup from entry.S") Cc: # 5.8 Reviewed-by: Heiko Carstens Signed-off-by: Sven Schnelle Signed-off-by: Heiko Carstens commit e259b3fafa7de362b04ecd86e7fa9a9e9273e5fb Author: Sven Schnelle Date: Thu Dec 3 22:03:32 2020 +0100 s390/idle: add missing mt_cycles calculation During removal of the critical section cleanup the calculation of mt_cycles during idle was removed. This causes invalid accounting on systems with SMT enabled. Fixes: 0b0ed657fe00 ("s390: remove critical section cleanup from entry.S") Cc: # 5.8 Reviewed-by: Heiko Carstens Signed-off-by: Sven Schnelle Signed-off-by: Heiko Carstens commit 7a84ffc0471f0ff59f9ae10807a77bd666e24fd0 Author: Philipp Rudo Date: Wed Nov 25 19:08:23 2020 +0100 s390/boot: add build-id to decompressor More and more functionality from the early boot phase gets carried over to the decompressor. With this the complexity of the code and thus the chance to introduce bugs increases. In order to be able to debug these early boot bugs the distributions have to package the decompressors vmlinux together with the other debuginfos. However for that the distributions require the vmlinux to contain a build-id. Per default the section containing the build-id is placed first in the section table. So make sure to move it behind the .text section otherwise the image would be unbootable. Signed-off-by: Philipp Rudo Signed-off-by: Heiko Carstens commit 613775d62ec60202f98d2c5f520e6e9ba6dd4ac4 Author: Philipp Rudo Date: Thu Nov 26 18:31:08 2020 +0100 s390/kexec_file: fix diag308 subcode when loading crash kernel diag308 subcode 0 performes a clear reset which inlcudes the reset of all registers in the system. While this is the preferred behavior when loading a normal kernel via kexec it prevents the crash kernel to store the register values in the dump. To prevent this use subcode 1 when loading a crash kernel instead. Fixes: ee337f5469fd ("s390/kexec_file: Add crash support to image loader") Cc: # 4.17 Signed-off-by: Philipp Rudo Reported-by: Xiaoying Yan Tested-by: Lianbo Jiang Signed-off-by: Heiko Carstens commit 14d4c4fa46eeaa3922e8e1c4aa727eb0a1412804 Author: Qinglang Miao Date: Tue Dec 1 14:31:50 2020 +0800 s390/cio: fix use-after-free in ccw_device_destroy_console Use of sch->dev reference after the put_device() call could trigger the use-after-free bugs. Fix this by simply adjusting the position of put_device. Fixes: 37db8985b211 ("s390/cio: add basic protected virtualization support") Reported-by: Hulk Robot Suggested-by: Cornelia Huck Signed-off-by: Qinglang Miao Reviewed-by: Cornelia Huck Reviewed-by: Vineeth Vijayan [vneethv@linux.ibm.com: Slight modification in the commit-message] Signed-off-by: Vineeth Vijayan Signed-off-by: Heiko Carstens commit 8f7e68bb3d4c482faa223ffa3838f7d39129afec Author: Fabrice Gasnier Date: Wed Dec 2 13:45:14 2020 +0100 dt-bindings: mfd: fix stm32 timers example The stm32 timers example name should match the pattern timer@. Also, the example is based on stm32mp1 timer 2, so the identifier should be '1' instead of '0' (e.g. timer 1). Fixes: bfbcbf88f9db ("dt-bindings: timer: Convert stm32 timer bindings to json-schema") Signed-off-by: Fabrice Gasnier Link: https://lore.kernel.org/r/1606913114-25693-1-git-send-email-fabrice.gasnier@foss.st.com Signed-off-by: Rob Herring commit 9125abe7b9cb19f2d2b1c47a8c04dd81ce0d43b2 Author: Andrea Mayer Date: Tue Dec 8 18:52:10 2020 +0100 vrf: handle CONFIG_IPV6 not set for vrf_add_mac_header_if_unset() The vrf_add_mac_header_if_unset() is defined within a conditional compilation block which depends on the CONFIG_IPV6 macro. However, the vrf_add_mac_header_if_unset() needs to be called also by IPv4 related code and when the CONFIG_IPV6 is not set, this function is missing. As a consequence, the build process stops reporting the error: ERROR: implicit declaration of function 'vrf_add_mac_header_if_unset' The problem is solved by *only* moving functions vrf_add_mac_header_if_unset() and vrf_prepare_mac_header() out of the conditional block. Reported-by: kernel test robot Fixes: 0489390882202 ("vrf: add mac header for tunneled packets when sniffer is attached") Signed-off-by: Andrea Mayer Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20201208175210.8906-1-andrea.mayer@uniroma2.it Signed-off-by: Jakub Kicinski commit 19cf6e6d402a7732d39570afcdd3b8a0a66df652 Merge: 629c96256de49 4c44274ee457e Author: Arnd Bergmann Date: Wed Dec 9 20:51:26 2020 +0100 Merge tag 'samsung-drivers-5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/drivers Samsung SoC drivers changes for v5.11, part two 1. Mark PM functions of newly added clkout module as unused to silence !CONFIG_PM warnings. 2. Initialize ChipID driver later - in arch initcall. * tag 'samsung-drivers-5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: clk: samsung: mark PM functions as __maybe_unused soc: samsung: exynos-chipid: initialize later - with arch_initcall soc: samsung: exynos-chipid: order list of SoCs by name Link: https://lore.kernel.org/r/20201207074528.4475-1-krzk@kernel.org Signed-off-by: Arnd Bergmann commit 629c96256de49257b72407ebd256343938234cfa Merge: 694a5b57692f8 311c2520de21c Author: Arnd Bergmann Date: Wed Dec 9 20:37:12 2020 +0100 Merge tag 'zynqmp-soc-for-v5.11-v2' of https://github.com/Xilinx/linux-xlnx into arm/drivers arm64: soc: ZynqMP SoC changes for v5.11 v2 - Small alignments in Xilinx Firmware driver - Exposing syscon interface for VCU driver * tag 'zynqmp-soc-for-v5.11-v2' of https://github.com/Xilinx/linux-xlnx: firmware: xilinx: Properly align function parameter firmware: xilinx: Add a blank line after function declaration firmware: xilinx: Remove additional newline firmware: xilinx: Fix kernel-doc warnings firmware: xlnx-zynqmp: fix compilation warning soc: xilinx: vcu: add missing register NUM_CORE soc: xilinx: vcu: use vcu-settings syscon registers dt-bindings: soc: xlnx: extract xlnx, vcu-settings to separate binding soc: xilinx: vcu: drop useless success message Link: https://lore.kernel.org/r/71d38756-4456-29fc-26a3-341e1d09aafe@monstr.eu Signed-off-by: Arnd Bergmann commit 41fca96e635be523c28b8d57f2d1b1e51d1221d8 Author: Chunguang Xu Date: Sat Nov 7 23:58:17 2020 +0800 ext4: delete nonsensical (commented-out) code inside ext4_xattr_block_set() Signed-off-by: Chunguang Xu Reviewed-by: Andreas Dilger Link: https://lore.kernel.org/r/1604764698-4269-7-git-send-email-brookxu@tencent.com Signed-off-by: Theodore Ts'o commit 8041ac642a1b31a2479488bc93fb16045726de23 Author: Chunguang Xu Date: Sat Nov 7 23:58:15 2020 +0800 ext4: update ext4_data_block_valid related comments Since ext4_data_block_valid() has been renamed to ext4_inode_block_valid(), the related comments need to be updated. Signed-off-by: Chunguang Xu Reviewed-by: Andreas Dilger Link: https://lore.kernel.org/r/1604764698-4269-5-git-send-email-brookxu@tencent.com Signed-off-by: Theodore Ts'o commit 3577afb0052fca65e67efdfc8e0859bb7bac87a6 Author: Jim Cromie Date: Wed Dec 9 11:36:25 2020 -0700 dyndbg: fix use before null check In commit a2d375eda771 ("dyndbg: refine export, rename to dynamic_debug_exec_queries()"), a string is copied before checking it isn't NULL. Fix this, report a usage/interface error, and return the proper error code. Fixes: a2d375eda771 ("dyndbg: refine export, rename to dynamic_debug_exec_queries()") Cc: stable@vger.kernel.org -- -v2 drop comment tweak, improve commit message Signed-off-by: Jim Cromie Link: https://lore.kernel.org/r/20201209183625.2432329-1-jim.cromie@gmail.com Signed-off-by: Greg Kroah-Hartman commit 59850d226e4907a6f37c1d2fe5ba97546a8691a4 Author: Pavel Begunkov Date: Sun Dec 6 22:22:45 2020 +0000 io_uring: fix io_cqring_events()'s noflush Checking !list_empty(&ctx->cq_overflow_list) around noflush in io_cqring_events() is racy, because if it fails but a request overflowed just after that, io_cqring_overflow_flush() still will be called. Remove the second check, it shouldn't be a problem for performance, because there is cq_check_overflow bit check just above. Cc: # 5.5+ Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 634578f800652035debba3098d8ab0d21af7c7a5 Author: Pavel Begunkov Date: Sun Dec 6 22:22:44 2020 +0000 io_uring: fix racy IOPOLL flush overflow It's not safe to call io_cqring_overflow_flush() for IOPOLL mode without hodling uring_lock, because it does synchronisation differently. Make sure we have it. As for io_ring_exit_work(), we don't even need it there because io_ring_ctx_wait_and_kill() already set force flag making all overflowed requests to be dropped. Cc: # 5.5+ Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 31bff9a51b264df6d144931a6a5f1d6cc815ed4b Author: Pavel Begunkov Date: Sun Dec 6 22:22:43 2020 +0000 io_uring: fix racy IOPOLL completions IOPOLL allows buffer remove/provide requests, but they doesn't synchronise by rules of IOPOLL, namely it have to hold uring_lock. Cc: # 5.7+ Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit dad1b1242fd5717af18ae4ac9d12b9f65849e13a Author: Xiaoguang Wang Date: Sun Dec 6 22:22:42 2020 +0000 io_uring: always let io_iopoll_complete() complete polled io Abaci Fuzz reported a double-free or invalid-free BUG in io_commit_cqring(): [ 95.504842] BUG: KASAN: double-free or invalid-free in io_commit_cqring+0x3ec/0x8e0 [ 95.505921] [ 95.506225] CPU: 0 PID: 4037 Comm: io_wqe_worker-0 Tainted: G B W 5.10.0-rc5+ #1 [ 95.507434] Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011 [ 95.508248] Call Trace: [ 95.508683] dump_stack+0x107/0x163 [ 95.509323] ? io_commit_cqring+0x3ec/0x8e0 [ 95.509982] print_address_description.constprop.0+0x3e/0x60 [ 95.510814] ? vprintk_func+0x98/0x140 [ 95.511399] ? io_commit_cqring+0x3ec/0x8e0 [ 95.512036] ? io_commit_cqring+0x3ec/0x8e0 [ 95.512733] kasan_report_invalid_free+0x51/0x80 [ 95.513431] ? io_commit_cqring+0x3ec/0x8e0 [ 95.514047] __kasan_slab_free+0x141/0x160 [ 95.514699] kfree+0xd1/0x390 [ 95.515182] io_commit_cqring+0x3ec/0x8e0 [ 95.515799] __io_req_complete.part.0+0x64/0x90 [ 95.516483] io_wq_submit_work+0x1fa/0x260 [ 95.517117] io_worker_handle_work+0xeac/0x1c00 [ 95.517828] io_wqe_worker+0xc94/0x11a0 [ 95.518438] ? io_worker_handle_work+0x1c00/0x1c00 [ 95.519151] ? __kthread_parkme+0x11d/0x1d0 [ 95.519806] ? io_worker_handle_work+0x1c00/0x1c00 [ 95.520512] ? io_worker_handle_work+0x1c00/0x1c00 [ 95.521211] kthread+0x396/0x470 [ 95.521727] ? _raw_spin_unlock_irq+0x24/0x30 [ 95.522380] ? kthread_mod_delayed_work+0x180/0x180 [ 95.523108] ret_from_fork+0x22/0x30 [ 95.523684] [ 95.523985] Allocated by task 4035: [ 95.524543] kasan_save_stack+0x1b/0x40 [ 95.525136] __kasan_kmalloc.constprop.0+0xc2/0xd0 [ 95.525882] kmem_cache_alloc_trace+0x17b/0x310 [ 95.533930] io_queue_sqe+0x225/0xcb0 [ 95.534505] io_submit_sqes+0x1768/0x25f0 [ 95.535164] __x64_sys_io_uring_enter+0x89e/0xd10 [ 95.535900] do_syscall_64+0x33/0x40 [ 95.536465] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 95.537199] [ 95.537505] Freed by task 4035: [ 95.538003] kasan_save_stack+0x1b/0x40 [ 95.538599] kasan_set_track+0x1c/0x30 [ 95.539177] kasan_set_free_info+0x1b/0x30 [ 95.539798] __kasan_slab_free+0x112/0x160 [ 95.540427] kfree+0xd1/0x390 [ 95.540910] io_commit_cqring+0x3ec/0x8e0 [ 95.541516] io_iopoll_complete+0x914/0x1390 [ 95.542150] io_do_iopoll+0x580/0x700 [ 95.542724] io_iopoll_try_reap_events.part.0+0x108/0x200 [ 95.543512] io_ring_ctx_wait_and_kill+0x118/0x340 [ 95.544206] io_uring_release+0x43/0x50 [ 95.544791] __fput+0x28d/0x940 [ 95.545291] task_work_run+0xea/0x1b0 [ 95.545873] do_exit+0xb6a/0x2c60 [ 95.546400] do_group_exit+0x12a/0x320 [ 95.546967] __x64_sys_exit_group+0x3f/0x50 [ 95.547605] do_syscall_64+0x33/0x40 [ 95.548155] entry_SYSCALL_64_after_hwframe+0x44/0xa9 The reason is that once we got a non EAGAIN error in io_wq_submit_work(), we'll complete req by calling io_req_complete(), which will hold completion_lock to call io_commit_cqring(), but for polled io, io_iopoll_complete() won't hold completion_lock to call io_commit_cqring(), then there maybe concurrent access to ctx->defer_list, double free may happen. To fix this bug, we always let io_iopoll_complete() complete polled io. Cc: # 5.5+ Reported-by: Abaci Fuzz Signed-off-by: Xiaoguang Wang Reviewed-by: Pavel Begunkov Reviewed-by: Joseph Qi Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 9c8e11b36c9b640a85a4a33a9e9dff418993cc34 Author: Pavel Begunkov Date: Mon Nov 30 19:11:16 2020 +0000 io_uring: add timeout update Support timeout updates through IORING_OP_TIMEOUT_REMOVE with passed in IORING_TIMEOUT_UPDATE. Updates doesn't support offset timeout mode. Oirignal timeout.off will be ignored as well. Signed-off-by: Pavel Begunkov [axboe: remove now unused 'ret' variable] Signed-off-by: Jens Axboe commit fbd15848f3c13506253b6c5de0077a603947cb67 Author: Pavel Begunkov Date: Mon Nov 30 19:11:15 2020 +0000 io_uring: restructure io_timeout_cancel() Add io_timeout_extract() helper, which searches and disarms timeouts, but doesn't complete them. No functional changes. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit bee749b187ac57d1faf00b2ab356ff322230fce8 Author: Pavel Begunkov Date: Wed Nov 25 02:19:23 2020 +0000 io_uring: fix files cancellation io_uring_cancel_files()'s task check condition mistakenly got flipped. 1. There can't be a request in the inflight list without IO_WQ_WORK_FILES, kill this check to keep the whole condition simpler. 2. Also, don't call the function for files==NULL to not do such a check, all that staff is already handled well by its counter part, __io_uring_cancel_task_requests(). With that just flip the task check. Also, it iowq-cancels all request of current task there, don't forget to set right ->files into struct io_task_cancel. Fixes: c1973b38bf639 ("io_uring: cancel only requests of current task") Reported-by: syzbot+c0d52d0b3c0c3ffb9525@syzkaller.appspotmail.com Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit ac0648a56c1ff66c1cbf735075ad33a26cbc50de Author: Jens Axboe Date: Mon Nov 23 09:37:51 2020 -0700 io_uring: use bottom half safe lock for fixed file data io_file_data_ref_zero() can be invoked from soft-irq from the RCU core, hence we need to ensure that the file_data lock is bottom half safe. Use the _bh() variants when grabbing this lock. Reported-by: syzbot+1f4ba1e5520762c523c6@syzkaller.appspotmail.com Signed-off-by: Jens Axboe commit bd5bbda72f7fa013ddea0ff7c4d91daedb821869 Author: Pavel Begunkov Date: Fri Nov 20 15:50:51 2020 +0000 io_uring: fix miscounting ios_left io_req_init() doesn't decrement state->ios_left if a request doesn't need ->file, it just returns before that on if(!needs_file). That's not really a problem but may cause overhead for an additional fput(). Also inline and kill io_req_set_file() as it's of no use anymore. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 6e1271e60c1d5e822fd1a32a56d52d9ae1823e62 Author: Pavel Begunkov Date: Fri Nov 20 15:50:50 2020 +0000 io_uring: change submit file state invariant Keep submit state invariant of whether there are file refs left based on state->nr_refs instead of (state->file==NULL), and always check against the first one. It's easier to track and allows to remove 1 if. It also automatically leaves struct submit_state in a consistent state after io_submit_state_end(), that's not used yet but nice. btw rename has_refs to file_refs for more clarity. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 65b2b213484acd89a3c20dbb524e52a2f3793b78 Author: Xiaoguang Wang Date: Thu Nov 19 17:44:46 2020 +0800 io_uring: check kthread stopped flag when sq thread is unparked syzbot reports following issue: INFO: task syz-executor.2:12399 can't die for more than 143 seconds. task:syz-executor.2 state:D stack:28744 pid:12399 ppid: 8504 flags:0x00004004 Call Trace: context_switch kernel/sched/core.c:3773 [inline] __schedule+0x893/0x2170 kernel/sched/core.c:4522 schedule+0xcf/0x270 kernel/sched/core.c:4600 schedule_timeout+0x1d8/0x250 kernel/time/timer.c:1847 do_wait_for_common kernel/sched/completion.c:85 [inline] __wait_for_common kernel/sched/completion.c:106 [inline] wait_for_common kernel/sched/completion.c:117 [inline] wait_for_completion+0x163/0x260 kernel/sched/completion.c:138 kthread_stop+0x17a/0x720 kernel/kthread.c:596 io_put_sq_data fs/io_uring.c:7193 [inline] io_sq_thread_stop+0x452/0x570 fs/io_uring.c:7290 io_finish_async fs/io_uring.c:7297 [inline] io_sq_offload_create fs/io_uring.c:8015 [inline] io_uring_create fs/io_uring.c:9433 [inline] io_uring_setup+0x19b7/0x3730 fs/io_uring.c:9507 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45deb9 Code: Unable to access opcode bytes at RIP 0x45de8f. RSP: 002b:00007f174e51ac78 EFLAGS: 00000246 ORIG_RAX: 00000000000001a9 RAX: ffffffffffffffda RBX: 0000000000008640 RCX: 000000000045deb9 RDX: 0000000000000000 RSI: 0000000020000140 RDI: 00000000000050e5 RBP: 000000000118bf58 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118bf2c R13: 00007ffed9ca723f R14: 00007f174e51b9c0 R15: 000000000118bf2c INFO: task syz-executor.2:12399 blocked for more than 143 seconds. Not tainted 5.10.0-rc3-next-20201110-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. Currently we don't have a reproducer yet, but seems that there is a race in current codes: => io_put_sq_data ctx_list is empty now. | ==> kthread_park(sqd->thread); | | T1: sq thread is parked now. ==> kthread_stop(sqd->thread); | KTHREAD_SHOULD_STOP is set now.| ===> kthread_unpark(k); | | T2: sq thread is now unparkd, run again. | | T3: sq thread is now preempted out. | ===> wake_up_process(k); | | | T4: Since sqd ctx_list is empty, needs_sched will be true, | then sq thread sets task state to TASK_INTERRUPTIBLE, | and schedule, now sq thread will never be waken up. ===> wait_for_completion | I have artificially used mdelay() to simulate above race, will get same stack like this syzbot report, but to be honest, I'm not sure this code race triggers syzbot report. To fix this possible code race, when sq thread is unparked, need to check whether sq thread has been stopped. Reported-by: syzbot+03beeb595f074db9cfd1@syzkaller.appspotmail.com Signed-off-by: Xiaoguang Wang Signed-off-by: Jens Axboe commit 36f72fe2792c4304f1203a44a6a7178e49b447f7 Author: Pavel Begunkov Date: Wed Nov 18 19:57:26 2020 +0000 io_uring: share fixed_file_refs b/w multiple rsrcs Double fixed files for splice/tee are done in a nasty way, it takes 2 ref_node refs, and during the second time it blindly overrides req->fixed_file_refs hoping that it haven't changed. That works because all that is done under iouring_lock in a single go but is error-prone. Bind everything explicitly to a single ref_node and take only one ref, with current ref_node ordering it's guaranteed to keep all files valid awhile the request is inflight. That's mainly a cleanup + preparation for generic resource handling, but also saves pcpu_ref get/put for splice/tee with 2 fixed files. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit c98de08c990e190fc7cc3aaf8079b4a0674c6425 Author: Pavel Begunkov Date: Sun Nov 15 12:56:32 2020 +0000 io_uring: replace inflight_wait with tctx->wait As tasks now cancel only theirs requests, and inflight_wait is awaited only in io_uring_cancel_files(), which should be called with ->in_idle set, instead of keeping a separate inflight_wait use tctx->wait. That will add some spurious wakeups but actually is safer from point of not hanging the task. e.g. task1 | IRQ | *start* io_complete_rw_common(link) | link: req1 -> req2 -> req3(with files) *cancel_files() | io_wq_cancel(), etc. | | put_req(link), adds to io-wq req2 schedule() | So, task1 will never try to cancel req2 or req3. If req2 is long-standing (e.g. read(empty_pipe)), this may hang. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 10cad2c40dcb04bb46b2bf399e00ca5ea93d36b0 Author: Pavel Begunkov Date: Sat Nov 7 13:20:39 2020 +0000 io_uring: don't take fs for recvmsg/sendmsg We don't even allow not plain data msg_control, which is disallowed in __sys_{send,revb}msg_sock(). So no need in fs for IORING_OP_SENDMSG and IORING_OP_RECVMSG. fs->lock is less contanged not as much as before, but there are cases that can be, e.g. IOSQE_ASYNC. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 2e9dbe902d1020ef70f968e8675c8d2457c4ffaa Author: Xiaoguang Wang Date: Fri Nov 13 00:44:08 2020 +0800 io_uring: only wake up sq thread while current task is in io worker context If IORING_SETUP_SQPOLL is enabled, sqes are either handled in sq thread task context or in io worker task context. If current task context is sq thread, we don't need to check whether should wake up sq thread. io_iopoll_req_issued() calls wq_has_sleeper(), which has smp_mb() memory barrier, before this patch, perf shows obvious overhead: Samples: 481K of event 'cycles', Event count (approx.): 299807382878 Overhead Comma Shared Object Symbol 3.69% :9630 [kernel.vmlinux] [k] io_issue_sqe With this patch, perf shows: Samples: 482K of event 'cycles', Event count (approx.): 299929547283 Overhead Comma Shared Object Symbol 0.70% :4015 [kernel.vmlinux] [k] io_issue_sqe It shows some obvious improvements. Signed-off-by: Xiaoguang Wang Signed-off-by: Jens Axboe commit 906a3c6f9ca072e917c701f7421647e169740954 Author: Xiaoguang Wang Date: Thu Nov 12 14:56:00 2020 +0800 io_uring: don't acquire uring_lock twice Both IOPOLL and sqes handling need to acquire uring_lock, combine them together, then we just need to acquire uring_lock once. Signed-off-by: Xiaoguang Wang Signed-off-by: Jens Axboe commit a0d9205f7d36bf72279f34a93850fd14789fdc7e Author: Xiaoguang Wang Date: Thu Nov 12 14:55:59 2020 +0800 io_uring: initialize 'timeout' properly in io_sq_thread() Some static checker reports below warning: fs/io_uring.c:6939 io_sq_thread() error: uninitialized symbol 'timeout'. This is a false positive, but let's just initialize 'timeout' to make sure we don't trip over this. Reported-by: Dan Carpenter Signed-off-by: Xiaoguang Wang Reviewed-by: Stefano Garzarella Signed-off-by: Jens Axboe commit 08369246344077a9cf8109c1cf92a640733314f2 Author: Xiaoguang Wang Date: Tue Nov 3 14:15:59 2020 +0800 io_uring: refactor io_sq_thread() handling There are some issues about current io_sq_thread() implementation: 1. The prepare_to_wait() usage in __io_sq_thread() is weird. If multiple ctxs share one same poll thread, one ctx will put poll thread in TASK_INTERRUPTIBLE, but if other ctxs have work to do, we don't need to change task's stat at all. I think only if all ctxs don't have work to do, we can do it. 2. We use round-robin strategy to make multiple ctxs share one same poll thread, but there are various condition in __io_sq_thread(), which seems complicated and may affect round-robin strategy. To improve above issues, I take below actions: 1. If multiple ctxs share one same poll thread, only if all all ctxs don't have work to do, we can call prepare_to_wait() and schedule() to make poll thread enter sleep state. 2. To make round-robin strategy more straight, I simplify __io_sq_thread() a bit, it just does io poll and sqes submit work once, does not check various condition. 3. For multiple ctxs share one same poll thread, we choose the biggest sq_thread_idle among these ctxs as timeout condition, and will update it when ctx is in or out. 4. Not need to check EBUSY especially, if io_submit_sqes() returns EBUSY, IORING_SQ_CQ_OVERFLOW should be set, helper in liburing should be aware of cq overflow and enters kernel to flush work. Signed-off-by: Xiaoguang Wang Signed-off-by: Jens Axboe commit f6edbabb8359798c541b0776616c5eab3a840d3d Author: Pavel Begunkov Date: Fri Nov 6 13:00:26 2020 +0000 io_uring: always batch cancel in *cancel_files() Instead of iterating over each request and cancelling it individually in io_uring_cancel_files(), try to cancel all matching requests and use ->inflight_list only to check if there anything left. In many cases it should be faster, and we can reuse a lot of code from task cancellation. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 6b81928d4ca8668513251f9c04cdcb9d38ef51c7 Author: Pavel Begunkov Date: Fri Nov 6 13:00:25 2020 +0000 io_uring: pass files into kill timeouts/poll Make io_poll_remove_all() and io_kill_timeouts() to match against files as well. A preparation patch, effectively not used by now. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit b52fda00dd9df8b4a6de5784df94f9617f6133a1 Author: Pavel Begunkov Date: Fri Nov 6 13:00:24 2020 +0000 io_uring: don't iterate io_uring_cancel_files() io_uring_cancel_files() guarantees to cancel all matching requests, that's not necessary to do that in a loop. Move it up in the callchain into io_uring_cancel_task_requests(). Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit df9923f96717d0aebb0a73adbcf6285fa79e38cb Author: Pavel Begunkov Date: Fri Nov 6 13:00:23 2020 +0000 io_uring: cancel only requests of current task io_uring_cancel_files() cancels all request that match files regardless of task. There is no real need in that, cancel only requests of the specified task. That also handles SQPOLL case as it already changes task to it. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 08d23634643c239ddae706758f54d3a8e0c24962 Author: Pavel Begunkov Date: Fri Nov 6 13:00:22 2020 +0000 io_uring: add a {task,files} pair matching helper Add io_match_task() that matches both task and files. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 06de5f5973c641c7ae033f133ecfaaf64fe633a6 Author: Pavel Begunkov Date: Fri Nov 6 13:00:21 2020 +0000 io_uring: simplify io_task_match() If IORING_SETUP_SQPOLL is set all requests belong to the corresponding SQPOLL task, so skip task checking in that case and always match. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 2846c481c9dd1f1fb504b4885bcb815c311df532 Author: Pavel Begunkov Date: Sat Nov 7 13:16:27 2020 +0000 io_uring: inline io_import_iovec() Inline io_import_iovec() and leave only its former __io_import_iovec() renamed to the original name. That makes it more obious what is reused in io_read/write(). Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 632546c4b5a4dad8e3ac456406c65c0db9a0b570 Author: Pavel Begunkov Date: Sat Nov 7 13:16:26 2020 +0000 io_uring: remove duplicated io_size from rw io_size and iov_count in io_read() and io_write() hold the same value, kill the last one. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 10fc72e43352753a08f9cf83aa5c40baec00d212 Author: David Laight Date: Sat Nov 7 13:16:25 2020 +0000 fs/io_uring Don't use the return value from import_iovec(). This is the only code that relies on import_iovec() returning iter.count on success. This allows a better interface to import_iovec(). Signed-off-by: David Laight Signed-off-by: Pavel Begunkov Reviewed-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 1a38ffc9cbca361cc274d6e234f5ef8922f0b6d9 Author: Pavel Begunkov Date: Sun Nov 8 12:55:55 2020 +0000 io_uring: NULL files dereference by SQPOLL SQPOLL task may find sqo_task->files == NULL and __io_sq_thread_acquire_files() would leave it unset, so following fget_many() and others try to dereference NULL and fault. Propagate an error files are missing. [ 118.962785] BUG: kernel NULL pointer dereference, address: 0000000000000020 [ 118.963812] #PF: supervisor read access in kernel mode [ 118.964534] #PF: error_code(0x0000) - not-present page [ 118.969029] RIP: 0010:__fget_files+0xb/0x80 [ 119.005409] Call Trace: [ 119.005651] fget_many+0x2b/0x30 [ 119.005964] io_file_get+0xcf/0x180 [ 119.006315] io_submit_sqes+0x3a4/0x950 [ 119.007481] io_sq_thread+0x1de/0x6a0 [ 119.007828] kthread+0x114/0x150 [ 119.008963] ret_from_fork+0x22/0x30 Reported-by: Josef Grieb Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit c73ebb685fb6dfb513d394cbea64fb81ba3d994f Author: Hao Xu Date: Tue Nov 3 10:54:37 2020 +0800 io_uring: add timeout support for io_uring_enter() Now users who want to get woken when waiting for events should submit a timeout command first. It is not safe for applications that split SQ and CQ handling between two threads, such as mysql. Users should synchronize the two threads explicitly to protect SQ and that will impact the performance. This patch adds support for timeout to existing io_uring_enter(). To avoid overloading arguments, it introduces a new parameter structure which contains sigmask and timeout. I have tested the workloads with one thread submiting nop requests while the other reaping the cqe with timeout. It shows 1.8~2x faster when the iodepth is 16. Signed-off-by: Jiufei Xue Signed-off-by: Hao Xu [axboe: various cleanups/fixes, and name change to SIG_IS_DATA] Signed-off-by: Jens Axboe commit 27926b683db03be307c6905b44ecfc1f081d9d6f Author: Jens Axboe Date: Wed Oct 28 09:33:23 2020 -0600 io_uring: only plug when appropriate We unconditionally call blk_start_plug() when starting the IO submission, but we only really should do that if we have more than 1 request to submit AND we're potentially dealing with block based storage underneath. For any other type of request, it's just a waste of time to do so. Add a ->plug bit to io_op_def and set it for read/write requests. We could make this more precise and check the file itself as well, but it doesn't matter that much and would quickly become more expensive. Signed-off-by: Jens Axboe commit 0415767e7f0542b3cd1ab270c2e61e90e87aafa2 Author: Pavel Begunkov Date: Tue Oct 27 23:25:38 2020 +0000 io_uring: rearrange io_kiocb fields for better caching We've got extra 8 bytes in the 2nd cacheline, put ->fixed_file_refs there, so inline execution path mostly doesn't touch the 3rd cacheline for fixed_file requests as well. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit f2f87370bb6664e5babb6705e886cfb340f163e1 Author: Pavel Begunkov Date: Tue Oct 27 23:25:37 2020 +0000 io_uring: link requests with singly linked list Singly linked list for keeping linked requests is enough, because we almost always operate on the head and traverse forward with the exception of linked timeouts going 1 hop backwards. Replace ->link_list with a handmade singly linked list. Also kill REQ_F_LINK_HEAD in favour of checking a newly added ->list for NULL directly. That saves 8B in io_kiocb, is not as heavy as list fixup, makes better use of cache by not touching a previous request (i.e. last request of the link) each time on list modification and optimises cache use further in the following patch, and actually makes travesal easier removing in the end some lines. Also, keeping invariant in ->list instead of having REQ_F_LINK_HEAD is less error-prone. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 90cd7e424969d29aff653333b4dcb4e2e199d791 Author: Pavel Begunkov Date: Tue Oct 27 23:25:36 2020 +0000 io_uring: track link timeout's master explicitly In preparation for converting singly linked lists for chaining requests, make linked timeouts save requests that they're responsible for and not count on doubly linked list for back referencing. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 863e05604a6fb45f0f56b3e9eca5cd533001253b Author: Pavel Begunkov Date: Tue Oct 27 23:25:35 2020 +0000 io_uring: track link's head and tail during submit Explicitly save not only a link's head in io_submit_sqe[s]() but the tail as well. That's in preparation for keeping linked requests in a singly linked list. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 018043be1f1bc43ad6956bfd39b7beea12fb4ca6 Author: Pavel Begunkov Date: Tue Oct 27 23:17:18 2020 +0000 io_uring: split poll and poll_remove structs Don't use a single struct for polls and poll remove requests, they have totally different layouts. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 14a1143b68ee2e4ec4e8d54f71cddb9724f9ec70 Author: Jens Axboe Date: Mon Sep 28 14:27:37 2020 -0600 io_uring: add support for IORING_OP_UNLINKAT IORING_OP_UNLINKAT behaves like unlinkat(2) and takes the same flags and arguments. Signed-off-by: Jens Axboe commit 80a261fd00327898e272ddc84ccc9510c036453c Author: Jens Axboe Date: Mon Sep 28 14:23:58 2020 -0600 io_uring: add support for IORING_OP_RENAMEAT IORING_OP_RENAMEAT behaves like renameat2(), and takes the same flags etc. Signed-off-by: Jens Axboe commit e886663cfd029b64a1d8da7efae7014526d884e9 Author: Jens Axboe Date: Sat Sep 26 17:20:17 2020 -0600 fs: make do_renameat2() take struct filename Pass in the struct filename pointers instead of the user string, and update the three callers to do the same. This behaves like do_unlinkat(), which also takes a filename struct and puts it when it is done. Converting callers is then trivial. Signed-off-by: Jens Axboe commit 14587a46646d30d2b4a6b69865682cfe6bbdcd1f Author: Jens Axboe Date: Sat Sep 5 11:36:08 2020 -0600 io_uring: enable file table usage for SQPOLL rings Now that SQPOLL supports non-registered files and grabs the file table, we can relax the restriction on open/close/accept/connect and allow them on a ring that is setup with IORING_SETUP_SQPOLL. Signed-off-by: Jens Axboe commit 28cea78af44918b920306df150afbd116bd94301 Author: Jens Axboe Date: Mon Sep 14 10:51:17 2020 -0600 io_uring: allow non-fixed files with SQPOLL The restriction of needing fixed files for SQPOLL is problematic, and prevents/inhibits several valid uses cases. With the referenced files_struct that we have now, it's trivially supportable. Treat ->files like we do the mm for the SQPOLL thread - grab a reference to it (and assign it), and drop it when we're done. This feature is exposed as IORING_FEAT_SQPOLL_NONFIXED. Signed-off-by: Jens Axboe commit 8010622c86ca5bb44bc98492f5968726fc7c7a21 Author: Oliver Neukum Date: Wed Dec 9 16:26:39 2020 +0100 USB: UAS: introduce a quirk to set no_write_same UAS does not share the pessimistic assumption storage is making that devices cannot deal with WRITE_SAME. A few devices supported by UAS, are reported to not deal well with WRITE_SAME. Those need a quirk. Add it to the device that needs it. Reported-by: David C. Partridge Signed-off-by: Oliver Neukum Cc: stable Link: https://lore.kernel.org/r/20201209152639.9195-1-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman commit 74e71964b1a9ffd34fa4b6ec8f2fa13e7cf0ac7a Author: Alexandru Ardelean Date: Thu Nov 19 17:49:03 2020 +0200 uio: uio_hv_generic: use devm_kzalloc() for private data alloc This is a minor cleanup for the management of the private object of this driver. The allocation can be tied to the life-time of the hv_device object. This cleans up a bit the exit & error paths, since the object doesn't need to be explicitly free'd anymore. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201119154903.82099-4-alexandru.ardelean@analog.com Signed-off-by: Greg Kroah-Hartman commit d57801c45f53e3da999e2a0beb932717fe335c41 Author: Alexandru Ardelean Date: Thu Nov 19 17:49:02 2020 +0200 uio: uio_fsl_elbc_gpcm: use device-managed allocators This change moves all the simple allocations to use device-managed allocator functions. This way their life-time is tied to the platform_device object, so when this gets free'd these allocations also get cleaned up. The final effect is that error & exit paths get cleaned up a bit. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201119154903.82099-3-alexandru.ardelean@analog.com Signed-off-by: Greg Kroah-Hartman commit 16d546c42db5d9ea91e4d9d3bde5e80eb0cf6bf8 Author: Alexandru Ardelean Date: Thu Nov 19 17:49:01 2020 +0200 uio: uio_aec: use devm_kzalloc() for uio_info object The uio_info object is free'd last, so it's life-time is tied PCI device object. Using devm_kzalloc() cleans up the error path a bit and the exit path. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201119154903.82099-2-alexandru.ardelean@analog.com Signed-off-by: Greg Kroah-Hartman commit 0a4ade5397918286d97dc575a4dfb00b6bba9b36 Author: Alexandru Ardelean Date: Thu Nov 19 17:49:00 2020 +0200 uio: uio_cif: use devm_kzalloc() for uio_info object The uio_info object is free'd last, so it's life-time is tied PCI device object. Using devm_kzalloc() cleans up the error path a bit and the exit path. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201119154903.82099-1-alexandru.ardelean@analog.com Signed-off-by: Greg Kroah-Hartman commit c3a747791138062b81b7ba24547c2b58485d3718 Author: Alexandru Ardelean Date: Fri Nov 20 10:42:07 2020 +0200 uio: uio_netx: use devm_kzalloc() for or uio_info object This change uses the devm_kzalloc() function to tie the life-time of the uio_info object to PCI device. This cleans up the exit & error path a bit. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201120084207.50736-3-alexandru.ardelean@analog.com Signed-off-by: Greg Kroah-Hartman commit 6b76c98b96bd619092a89da1c1e25e5cb0ccc46a Author: Alexandru Ardelean Date: Fri Nov 20 10:42:06 2020 +0200 uio: uio_mf624: use devm_kzalloc() for uio_info object This change uses the devm_kzalloc() function to tie the life-time of the uio_info object to PCI device. This cleans up the exit & error path a bit. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201120084207.50736-2-alexandru.ardelean@analog.com Signed-off-by: Greg Kroah-Hartman commit 023c9c6dc2c414f1bef2e9ee649fb2e459f52326 Author: Alexandru Ardelean Date: Fri Nov 20 10:42:05 2020 +0200 uio: uio_sercos3: use device-managed functions for simple allocs This change converts the simple allocations [kzalloc()] to devm_kzalloc() tying the life-time of these objects to the PCI device object. It cleans up the error and exit path and bit, and does a minor correction that -ENOMEM is returned (vs -ENODEV) in case the 'priv' object cannot be allocated. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201120084207.50736-1-alexandru.ardelean@analog.com Signed-off-by: Greg Kroah-Hartman commit ba022851f3b161040e79cc61c2bd760917490016 Author: Alexandru Ardelean Date: Fri Nov 20 09:56:25 2020 +0200 uio: uio_dmem_genirq: finalize conversion of probe to devm_ handlers This moves move pm_runtime_disable on a devm_add_action_or_reset() handler. And with the use of the devm_uio_register_device() function, the remove hook is no longer required. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201120075625.12272-2-alexandru.ardelean@analog.com Signed-off-by: Greg Kroah-Hartman commit 44dccc4a2bd10abfacd25b7d125fb5c3abbb263d Author: Alexandru Ardelean Date: Fri Nov 20 09:56:24 2020 +0200 uio: uio_dmem_genirq: convert simple allocations to device-managed This change converts the simple allocations in the driver to used device-managed allocation functions. This removes the error path entirely in the probe function, and reduces some code in the remove function. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201120075625.12272-1-alexandru.ardelean@analog.com Signed-off-by: Greg Kroah-Hartman commit 4849e0eda387931fe251fe956cbfddeee852dacf Author: Alexandru Ardelean Date: Mon Nov 23 16:34:47 2020 +0200 uio/uio_pci_generic: remove unneeded pci_set_drvdata() The pci_get_drvdata() was moved during commit ef84928cff58 ("uio/uio_pci_generic: use device-managed function equivalents"). Storing a private object with pci_set_drvdata() doesn't make sense since that change, since there is no more pci_get_drvdata() call in the driver to retrieve the information. This change removes it. Fixes: ef84928cff58 ("uio/uio_pci_generic: use device-managed function equivalents") Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201123143447.16829-1-alexandru.ardelean@analog.com Signed-off-by: Greg Kroah-Hartman commit 68d621197162eb503d32676452e7281e3fb6c8cc Author: Alexandru Ardelean Date: Thu Nov 19 16:50:59 2020 +0200 uio: pruss: use devm_clk_get() for clk init This change uses devm_clk_get() to obtain a reference to the clock. It has the benefit that clk_put() is no longer required, and cleans up the exit & error path. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201119145059.48326-1-alexandru.ardelean@analog.com Signed-off-by: Greg Kroah-Hartman commit 81113b0421a5199a1f425beaef7dad0d7c16a891 Author: Srinivas Kandagatla Date: Tue Dec 1 09:38:43 2020 +0000 slimbus: qcom-ngd-ctrl: fix SSR dependencies NGD should depend on QCOM_RPROC_COMMON instead of selecting it, as this will be selected by respective remoteproc driver. Reported-by: kernel test robot Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20201201093843.20126-1-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit b4f473cf4605e063f1250c6c7c37140cdd162353 Author: Kaixu Xia Date: Sat Nov 14 00:14:31 2020 +0800 altera-stapl: remove the unreached switch case The value of the variable status must be one of the 0, -EIO and -EILSEQ, so the switch case -ENODATA is unreached. Remove it. Reported-by: Tosk Robot Signed-off-by: Kaixu Xia Link: https://lore.kernel.org/r/1605284071-6901-1-git-send-email-kaixuxia@tencent.com Signed-off-by: Greg Kroah-Hartman commit dfd7f2c1c532efaeff6084970bb60ec2f2e44191 Author: Eddie James Date: Fri Nov 20 11:19:29 2020 +1030 fsi: Aspeed: Add mutex to protect HW access There is nothing to prevent multiple commands being executed simultaneously. Add a mutex to prevent this. Fixes: 606397d67f41 ("fsi: Add ast2600 master driver") Reviewed-by: Joel Stanley Reviewed-by: Milton Miller Signed-off-by: Eddie James Signed-off-by: Joel Stanley Link: https://lore.kernel.org/r/20201120004929.185239-1-joel@jms.id.au Signed-off-by: Greg Kroah-Hartman commit fe34761d9f5febafd189de608eb9f50d78aac107 Author: Ioana Ciornei Date: Mon Nov 23 18:48:39 2020 +0200 bus: fsl-mc: simplify DPRC version check Because the minimum supported DPRC version is 6.0, there is no need to check for incompatible 6.x versions lower to the minimum one. Just remove the second half of the check to simplify the logic. Signed-off-by: Ioana Ciornei Link: https://lore.kernel.org/r/20201123164839.1668409-1-ciorneiioana@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3d70fb03711c37bc64e8e9aea5830f498835f6bf Author: Zhang Changzhong Date: Fri Dec 4 16:02:47 2020 +0800 bus: fsl-mc: fix error return code in fsl_mc_object_allocate() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 197f4d6a4a00 ("staging: fsl-mc: fsl-mc object allocator driver") Reported-by: Hulk Robot Acked-by: Laurentiu Tudor Signed-off-by: Zhang Changzhong Link: https://lore.kernel.org/r/1607068967-31991-1-git-send-email-zhangchangzhong@huawei.com Signed-off-by: Greg Kroah-Hartman commit ca43fec96b439b0e957121065404c0042a730501 Author: Laurentiu Tudor Date: Tue Nov 24 13:12:00 2020 +0200 bus: fsl-mc: added missing fields to dprc_rsp_get_obj_region structure 'type' and 'flags' fields were missing from dprc_rsp_get_obj_region structure therefore the MC Bus driver was not receiving proper flags from MC like DPRC_REGION_CACHEABLE. Reviewed-by: Ioana Ciornei Signed-off-by: Cristian Sovaiala Signed-off-by: Laurentiu Tudor Link: https://lore.kernel.org/r/20201124111200.1391-1-laurentiu.tudor@nxp.com Signed-off-by: Greg Kroah-Hartman commit 74abd1f2d49a2a9660eadd9486da333554c4a23b Author: Laurentiu Tudor Date: Thu Nov 5 17:30:50 2020 +0200 bus: fsl-mc: make sure MC firmware is up and running Some bootloaders might pause the MC firmware before starting the kernel to ensure that MC will not cause faults as soon as SMMU probes due to no configuration being in place for the firmware. Make sure that MC is resumed at probe time as its SMMU setup should be done by now. Also included, a comment fix on how PL and BMT bits are packed in the StreamID. Signed-off-by: Laurentiu Tudor Link: https://lore.kernel.org/r/20201105153050.19662-2-laurentiu.tudor@nxp.com Signed-off-by: Greg Kroah-Hartman commit 61243c03dde238170001093a29716c2369e8358f Author: Laurentiu Tudor Date: Thu Nov 5 17:30:49 2020 +0200 bus: fsl-mc: add back accidentally dropped error check A previous patch accidentally dropped an error check, so add it back. Fixes: aef85b56c3c1 ("bus: fsl-mc: MC control registers are not always available") Signed-off-by: Laurentiu Tudor Link: https://lore.kernel.org/r/20201105153050.19662-1-laurentiu.tudor@nxp.com Signed-off-by: Greg Kroah-Hartman commit 603012f78a3f5cb2e7f529b8e318321117a9cf7c Author: Fabio Estevam Date: Thu Nov 26 09:46:43 2020 -0300 serial: imx: Remove unneeded of_device_get_match_data() NULL check Since 5.10-rc1 i.MX is a devicetree-only platform and the NULL check on of_device_get_match_data() is no longer needed. This check was only needed when this driver supported both DT and non-DT platforms. Remove the unneeded of_device_get_match_data() NULL check. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20201126124643.3371-1-festevam@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0b81144a4ac20f0757b7c965d2fa57de367c7db5 Author: Krzysztof Kozlowski Date: Mon Dec 7 19:59:52 2020 +0100 soc: fix comment for freeing soc_dev_attr The soc_dev_attr is stored soc_dev->attr during soc_device_register() so it could be used till the cleanup call: soc_device_unregister(). Therefore this memory should not be freed prior, but after unregistering soc device. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201207185952.261697-1-krzk@kernel.org Signed-off-by: Greg Kroah-Hartman commit aec273a3191e2931e7010dd7b83cd110c21bcc03 Author: Stephen Boyd Date: Mon Dec 7 13:42:04 2020 -0800 MAINTAINERS: Mark SPMI as maintained I can do more than just review patches here. The plan is to pick up patches from the list and shuttle them up to gregkh. The korg tree will be used to hold the pending patches. Move the list away from linux-arm-msm to just be linux-kernel as SPMI isn't msm specific anymore. Cc: Greg Kroah-Hartman Cc: Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20201207214204.1284946-1-sboyd@kernel.org Signed-off-by: Greg Kroah-Hartman commit 4996b4610767064807d022dd731584f7ff78c309 Author: Jing Xiangfeng Date: Fri Nov 20 15:49:32 2020 +0800 staging: olpc_dcon: Do not call platform_device_unregister() in dcon_probe() In dcon_probe(), when platform_device_add() failes to add the device, it jumps to call platform_device_unregister() to remove the device, which is unnecessary. So use platform_device_put() instead. Fixes: 53c43c5ca133 ("Revert "Staging: olpc_dcon: Remove obsolete driver"") Signed-off-by: Jing Xiangfeng Link: https://lore.kernel.org/r/20201120074932.31871-1-jingxiangfeng@huawei.com Signed-off-by: Greg Kroah-Hartman commit 7fe5bbdd1f43806c1e38e69585d98d956fca43e8 Author: Colin Ian King Date: Thu Nov 26 22:46:02 2020 +0000 staging: most: Fix spelling mistake "tranceiver" -> "transceiver" There is a spelling mistake in the Kconfig help text. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20201126224602.13878-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 660745a569463da96595a3287af02461882b86e6 Author: Christophe JAILLET Date: Sun Dec 6 08:13:52 2020 +0100 vme: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'ca91cx42_alloc_consistent()' and 'tsi148_alloc_consistent()' GFP_KERNEL can be used because both functions are called only from 'vme_alloc_consistent()' (vme.c). This function is only called from the 'vme_user_probe()' probe function and no lock is taken in the between. When memory is allocated in 'ca91cx42_crcsr_init()' and 'tsi148_crcsr_init()' GFP_KERNEL can be used because both functions are called only from their corresponding probe function and no lock is taken in the between. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/20201206071352.21949-1-christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit 1749c90489f2afa6b59dbf3ab59d58a9014c84a1 Author: Xiongfeng Wang Date: Thu Nov 19 20:49:18 2020 +0800 misc: pci_endpoint_test: fix return value of error branch We return 'err' in the error branch, but this variable may be set as zero before. Fix it by setting 'err' as a negative value before we goto the error label. Fixes: e03327122e2c ("pci_endpoint_test: Add 2 ioctl commands") Reported-by: Hulk Robot Signed-off-by: Xiongfeng Wang Link: https://lore.kernel.org/r/1605790158-6780-1-git-send-email-wangxiongfeng2@huawei.com Signed-off-by: Greg Kroah-Hartman commit 505b08777d78868e6c47051a4e7f011718a3aba1 Author: Christophe JAILLET Date: Tue Dec 1 22:01:47 2020 +0100 misc: genwqe: Use dma_set_mask_and_coherent to simplify code 'pci_set_dma_mask()' + 'pci_set_consistent_dma_mask()' can be replaced by an equivalent 'dma_set_mask_and_coherent()' which is much less verbose. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/20201201210147.7917-1-christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit 5b4258f6721f41b092c63f6ee71be76e9616718b Author: Ricky Wu Date: Wed Dec 2 14:58:57 2020 +0800 misc: rtsx: rts5249 support runtime PM rtsx_pcr: add callback functions to support runtime PM add delay_work to put device to D3 after idle over 10 sec rts5249: add extra init flow for rtd3 and set rtd3_en from config setting rtsx_pci_sdmmc: child device support autosuspend Signed-off-by: Ricky Wu Link: https://lore.kernel.org/r/20201202065857.19412-1-ricky_wu@realtek.com Signed-off-by: Greg Kroah-Hartman commit 121e9c6b5c4cad63e078f1fc5890f265521d2994 Author: Ricky Wu Date: Wed Dec 2 14:32:28 2020 +0800 misc: rtsx: modify and fix init_hw function changed rtsx_pci_disable_aspm() to rtsx_disable_aspm() do not access ASPM configuration directly changed pcie_capability_write_word() to _clear_and_set_word() make sure only change PCI_EXP_LNKCTL bit8 make sure ASPM disable after extra_init_hw() Signed-off-by: Ricky Wu Link: https://lore.kernel.org/r/20201202063228.18319-1-ricky_wu@realtek.com Signed-off-by: Greg Kroah-Hartman commit d928061c3143de36c17650ce7b60760fefb8336c Author: Ricky Wu Date: Wed Dec 2 14:31:24 2020 +0800 misc: rtsx: modify en/disable aspm function enable/disable device ASPM function: changed write ASPM configuration directly to use write register Signed-off-by: Ricky Wu Link: https://lore.kernel.org/r/20201202063124.18262-1-ricky_wu@realtek.com Signed-off-by: Greg Kroah-Hartman commit 311c2520de21cb2f44291ad3d984b42191126628 Author: Michal Simek Date: Wed Dec 2 08:38:50 2020 +0100 firmware: xilinx: Properly align function parameter Fix parameters alignment reported by checkpatch --strict. Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/00ed9fcb94a6c22eff1fe8afdea46b2764a8687d.1606894725.git.michal.simek@xilinx.com commit a80cefec2c2783166727324bde724c39aa8a12df Author: Michal Simek Date: Wed Dec 2 08:38:49 2020 +0100 firmware: xilinx: Add a blank line after function declaration Fix all these issues which are also reported by checkpatch --strict. Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/7b6007e05f6c01214861a37f198cd5bee62a4d3e.1606894725.git.michal.simek@xilinx.com commit 1f6a11a01059f9c65f8461987cc0bab4c0b58338 Author: Michal Simek Date: Wed Dec 2 08:38:48 2020 +0100 firmware: xilinx: Remove additional newline This additional newline is useless and also reported by checkpatch --strict. Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/d927f3f2c97910958dd77a22828cd0bf8d89c9de.1606894725.git.michal.simek@xilinx.com commit 332bee16406675b7383e52c8f775dab1585e957c Author: Michal Simek Date: Tue Dec 1 15:29:59 2020 +0100 firmware: xilinx: Fix kernel-doc warnings kernel-doc is reporting some style issues. The patch is fixing them. Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/e606233d15bfdc594535dd34eb85472b42f61830.1606832997.git.michal.simek@xilinx.com commit 463edf5a59fd8f0fe0135101d67bfca81d1e3771 Author: Wendy Liang Date: Tue Nov 24 00:18:18 2020 -0800 firmware: xlnx-zynqmp: fix compilation warning Fix compilation warning when ZYNQMP_FIRMWARE is not defined. include/linux/firmware/xlnx-zynqmp.h: In function 'zynqmp_pm_get_eemi_ops': include/linux/firmware/xlnx-zynqmp.h:363:9: error: implicit declaration of function 'ERR_PTR' [-Werror=implicit-function-declaration] 363 | return ERR_PTR(-ENODEV); include/linux/firmware/xlnx-zynqmp.h:363:18: note: each undeclared identifier is reported only once for each function it appears in include/linux/firmware/xlnx-zynqmp.h: In function 'zynqmp_pm_get_api_version': include/linux/firmware/xlnx-zynqmp.h:367:10: error: 'ENODEV' undeclared (first use in this function) 367 | return -ENODEV; | ^~~~~~ Signed-off-by: Wendy Liang Link: https://lore.kernel.org/r/1606205898-12642-1-git-send-email-wendy.liang@xilinx.com Signed-off-by: Michal Simek commit 7b1c9b8441aa94a549a90fa3d42687ccbad3eade Author: Michael Tretter Date: Mon Nov 9 14:48:18 2020 +0100 soc: xilinx: vcu: add missing register NUM_CORE The H.264/H.265 Video Codec Unit v1.2 documentation describes this register as follows: Number of encoders core used for the provided configuration This is required for configuring the VCU encoder buffer. Signed-off-by: Michael Tretter Reviewed-by: Hyun Kwon Link: https://lore.kernel.org/r/20201109134818.4159342-5-m.tretter@pengutronix.de Signed-off-by: Michal Simek commit 30b79eb1f92ed5974885d374a4107c94e2dd3e03 Author: Michael Tretter Date: Mon Nov 9 14:48:17 2020 +0100 soc: xilinx: vcu: use vcu-settings syscon registers Switch the "logicoreip" registers to the new xlnx,vcu-settings binding to be able to read the settings if the settings are specified in a separate device tree node that is shared with other drivers. If the driver is not able to find a node with the new binding, fall back to check for the logicore register bank to be backwards compatible. Signed-off-by: Michael Tretter Reviewed-by: Hyun Kwon Link: https://lore.kernel.org/r/20201109134818.4159342-4-m.tretter@pengutronix.de Signed-off-by: Michal Simek commit a3857f89ddb05097d4cffeb3884d6e26da8a34e2 Author: Michael Tretter Date: Mon Nov 9 14:48:16 2020 +0100 dt-bindings: soc: xlnx: extract xlnx, vcu-settings to separate binding The xlnx,vcu binding comprises two adjacent register banks: The first register bank ("vcu_slcr") contains registers for setting the clocks of the vcu and controlling the performance monitors. The second bank ("logicoreip") contains the configuration settings of the video codec unit, which are set before synthesizing the bitstream. Drivers that drive the actual video codec unit need to read the registers from the logicoreip register bank for configuring the vcu firmware. As logicoreip is a too generic name for this register bank, use "vcu-settings" as a binding name, because the register bank basically provides the configuration settings of the VCU. Therefore, add the vcu-settings binding to provide a syscon interface for other drivers to read these registers. The alternative would have been to merge the two register banks of the xlnx,vcu binding into one register bank and make xlnx,vcu provide a syscon interface, but that would lead to more incompatibility than making second register bank of xlnx,vcu optional. Signed-off-by: Michael Tretter Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201109134818.4159342-3-m.tretter@pengutronix.de Signed-off-by: Michal Simek commit 853e69d6c87c463563eb33e060d0ab6566b1452b Author: Michael Tretter Date: Mon Nov 9 14:48:15 2020 +0100 soc: xilinx: vcu: drop useless success message The message that the driver was successfully probed only adds useless noise. Drop the message. Signed-off-by: Michael Tretter Reviewed-by: Hyun Kwon Link: https://lore.kernel.org/r/20201109134818.4159342-2-m.tretter@pengutronix.de Signed-off-by: Michal Simek commit 31dcb6c30a26d32650ce134820f27de3c675a45a Author: Anant Thazhemadam Date: Mon Nov 23 04:15:34 2020 +0530 misc: vmw_vmci: fix kernel info-leak by initializing dbells in vmci_ctx_get_chkpt_doorbells() A kernel-infoleak was reported by syzbot, which was caused because dbells was left uninitialized. Using kzalloc() instead of kmalloc() fixes this issue. Reported-by: syzbot+a79e17c39564bedf0930@syzkaller.appspotmail.com Tested-by: syzbot+a79e17c39564bedf0930@syzkaller.appspotmail.com Signed-off-by: Anant Thazhemadam Link: https://lore.kernel.org/r/20201122224534.333471-1-anant.thazhemadam@gmail.com Signed-off-by: Greg Kroah-Hartman commit 997754f114efeb290310ea8e39c8b04c2ce93961 Author: Thomas Gleixner Date: Thu Nov 19 11:31:51 2020 +0100 misc/sgi-xp: Replace in_interrupt() usage The usage of in_interrupt() in xpc_partition_disengaged() is clearly intended to avoid canceling the timeout timer when the function is invoked from the timer callback. While in_interrupt() is deprecated and ill defined as it does not provide what the name suggests it catches the intended case. Add an argument to xpc_partition_disengaged() which is true if called from timer and otherwise false. Use del_timer_sync() instead of del_singleshot_timer_sync() which is the same thing. Note: This does not prevent reentrancy into the function as the function has no concurrency control and timer callback and regular task context callers can happen concurrently on different CPUs or the timer can interrupt the task context before it is able to cancel it. While the only driver which is providing the arch_xpc_ops callbacks (xpc_uv) seems not to have a reentrancy problem and the only negative effect would be a double dev_info() entry in dmesg, the whole mechanism is conceptually broken. But that's not subject of this cleanup endeavour and left as an exercise to the folks who might have interest to make that code fully correct. [bigeasy: Add the argument, use del_timer_sync().] Cc: Greg Kroah-Hartman Cc: Cliff Whickman Cc: Arnd Bergmann Cc: Robin Holt Cc: Steve Wahl Cc: Dimitri Sivanich Cc: Russ Anderson Reviewed-by: Steve Wahl Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Link: https://lore.kernel.org/r/20201119103151.ppo45mj53ulbxjx4@linutronix.de Signed-off-by: Greg Kroah-Hartman commit a73a0712745300f17480e729cef4422cb9c9c2df Author: Zhou Xingxing Date: Mon Dec 7 17:49:05 2020 +0800 misc: isl29003: Fix typo for get/set mode The operation of get/set mode was same with get/set resolution. It is a typo absolutely. This patch updates these bits operated by get/set mode. Signed-off-by: Zhou Xingxing Link: https://lore.kernel.org/r/1607334545-2091-1-git-send-email-zhou_x1@hoperun.com Signed-off-by: Greg Kroah-Hartman commit 9c30921fe7994907e0b3e0637b2c8c0fc4b5171f Author: Uwe Kleine-König Date: Thu Nov 19 13:46:11 2020 +0100 driver core: platform: use bus_type functions This works towards the goal mentioned in 2006 in commit 594c8281f905 ("[PATCH] Add bus_type probe, remove, shutdown methods."). The functions are moved to where the other bus_type functions are defined and renamed to match the already established naming scheme. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20201119124611.2573057-3-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 16085668eacdc56c46652d0f3bfef81ecace57de Author: Uwe Kleine-König Date: Thu Nov 19 13:46:10 2020 +0100 driver core: platform: change logic implementing platform_driver_probe Instead of overwriting the core driver's probe function handle probing devices for drivers loaded by platform_driver_probe() in the platform driver probe function. The intended goal is to not have to change the probe function to simplify converting the platform bus to use bus functions. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20201119124611.2573057-2-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit e21d740a3fe5ad2db7b5f5c2331fe2b713b1edba Author: Uwe Kleine-König Date: Thu Nov 19 13:46:09 2020 +0100 driver core: platform: reorder functions This way all callbacks and structures used to initialize platform_bus_type are defined just before platform_bus_type and in the same order. Also move platform_drv_probe_fail just before it's only user. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20201119124611.2573057-1-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 2c3dc6432f3316e97c10eced6b535046a80f73b0 Author: Julian Wiedmann Date: Mon Nov 23 12:19:38 2020 +0100 driver core: make driver_probe_device() static It's only used inside drivers/base/dd.c Signed-off-by: Julian Wiedmann Link: https://lore.kernel.org/r/20201123111938.18968-1-jwi@linux.ibm.com Signed-off-by: Greg Kroah-Hartman commit d475f8ea98a039e51d27f5557dc17333cf8a52f6 Author: Thierry Reding Date: Fri Nov 27 11:46:30 2020 +0100 driver core: Fix a couple of typos These were just some minor typos that have crept in recently and are easily fixed. Reviewed-by: Rafael J. Wysocki Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20201127104630.1839171-1-thierry.reding@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5b6164d3465fcc13b5679c860c452963443172a7 Author: Thierry Reding Date: Thu Dec 3 18:57:56 2020 +0100 driver core: Reorder devices on successful probe Device drivers usually depend on the fact that the devices that they control are suspended in the same order that they were probed in. In most cases this is already guaranteed via deferred probe. However, there's one case where this can still break: if a device is instantiated before a dependency (for example if it appears before the dependency in device tree) but gets probed only after the dependency is probed. Instantiation order would cause the dependency to get probed later, in which case probe of the original device would be deferred and the suspend/resume queue would get reordered properly. However, if the dependency is provided by a built-in driver and the device depending on that driver is controlled by a loadable module, which may only get loaded after the root filesystem has become available, we can be faced with a situation where the probe order ends up being different from the suspend/resume order. One example where this happens is on Tegra186, where the ACONNECT is listed very early in device tree (sorted by unit-address) and depends on BPMP (listed very late because it has no unit-address) for power domains and clocks/resets. If the ACONNECT driver is built-in, there is no problem because it will be probed before BPMP, causing a probe deferral and that in turn reorders the suspend/resume queue. However, if built as a module, it will end up being probed after BPMP, and therefore not result in a probe deferral, and therefore the suspend/resume queue will stay in the instantiation order. This in turn causes problems because ACONNECT will be resumed before BPMP, which will result in a hang because the ACONNECT's power domain cannot be powered on as long as the BPMP is still suspended. Fix this by always reordering devices on successful probe. This ensures that the suspend/resume queue is always in probe order and hence meets the natural expectations of drivers vs. their dependencies. Reported-by: Jonathan Hunter Acked-by: Rafael. J. Wysocki Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20201203175756.1405564-1-thierry.reding@gmail.com Signed-off-by: Greg Kroah-Hartman commit b42fe98c92698d2a10094997e5f4d2dd968fd44f Author: Qu Wenruo Date: Wed Dec 2 14:48:11 2020 +0800 btrfs: scrub: allow scrub to work with subpage sectorsize Since btrfs scrub is utilizing its own infrastructure to submit read/write, scrub is independent from all other routines. This brings one very neat feature, allow us to read 4K data into offset 0 of a 64K page. So is the writeback routine. This makes scrub on subpage sector size much easier to implement, and thanks to previous commits which just changed the implementation to always do scrub based on sector size, now scrub can handle subpage filesystem without any problem. This patch will just remove the restriction on (sectorsize != PAGE_SIZE), to make scrub finally work on subpage filesystems. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit b29dca44abe216a9c29842593cbc18f9a3fe57d2 Author: Qu Wenruo Date: Wed Dec 2 14:48:10 2020 +0800 btrfs: scrub: support subpage data scrub Btrfs scrub is more flexible than buffered data write path, as we can read an unaligned subpage data into page offset 0. This ability makes subpage support much easier, we just need to check each scrub_page::page_len and ensure we only calculate hash for [0, page_len) of a page. There is a small thing to notice: for subpage case, we still do sector by sector scrub. This means we will submit a read bio for each sector to scrub, resulting in the same amount of read bios, just like on the 4K page systems. This behavior can be considered as a good thing, if we want everything to be the same as 4K page systems. But this also means, we're wasting the possibility to submit larger bio using 64K page size. This is another problem to consider in the future. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 53f3251d3b82f70c762cb7d963d70fb65f49e22c Author: Qu Wenruo Date: Wed Dec 2 14:48:09 2020 +0800 btrfs: scrub: support subpage tree block scrub To support subpage tree block scrub, scrub_checksum_tree_block() only needs to learn 2 new tricks: - Follow sector size Now scrub_page only represents one sector, we need to follow it properly. - Run checksum on all sectors Since scrub_page only represents one sector, we need to run checksum on all sectors, not only (nodesize >> PAGE_SIZE). Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit d0a7a9c050f3d0e11626ee5b3cebb0e4388ffce6 Author: Qu Wenruo Date: Wed Dec 2 14:48:08 2020 +0800 btrfs: scrub: always allocate one full page for one sector for RAID56 For scrub_pages() and scrub_pages_for_parity(), we currently allocate one scrub_page structure for one page. This is fine if we only read/write one sector one time. But for cases like scrubbing RAID56, we need to read/write the full stripe, which is in 64K size for now. For subpage size, we will submit the read in just one page, which is normally a good thing, but for RAID56 case, it only expects to see one sector, not the full stripe in its endio function. This could lead to wrong parity checksum for RAID56 on subpage. To make the existing code work well for subpage case, here we take a shortcut by always allocating a full page for one sector. This should provide the base to make RAID56 work for subpage case. The cost is pretty obvious now, for one RAID56 stripe now we always need 16 pages. For support subpage situation (64K page size, 4K sector size), this means we need full one megabyte to scrub just one RAID56 stripe. And for data scrub, each 4K sector will also need one 64K page. This is mostly just a workaround, the proper fix for this is a much larger project, using scrub_block to replace scrub_page, and allow scrub_block to handle multi pages, csums, and csum_bitmap to avoid allocating one page for each sector. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit fa485d21a7ae712fef8e943d1dd3ca7b27cb392e Author: Qu Wenruo Date: Wed Dec 2 14:48:07 2020 +0800 btrfs: scrub: reduce width of extent_len/stripe_len from 64 to 32 bits Btrfs on-disk format chose to use u64 for almost everything, but there are a other restrictions that won't let us use more than u32 for things like extent length (the maximum length is 128MiB for non-hole extents), or stripe length (we have device number limit). This means if we don't have extra handling to convert u64 to u32, we will always have some questionable operations like "u32 = u64 >> sectorsize_bits" in the code. This patch will try to address the problem by reducing the width for the following members/parameters: - scrub_parity::stripe_len - @len of scrub_pages() - @extent_len of scrub_remap_extent() - @len of scrub_parity_mark_sectors_error() - @len of scrub_parity_mark_sectors_data() - @len of scrub_extent() - @len of scrub_pages_for_parity() - @len of scrub_extent_for_parity() For members extracted from on-disk structure, like map->stripe_len, they will be kept as is. Since that modification would require on-disk format change. There will be cases like "u32 = u64 - u64" or "u32 = u64", for such call sites, extra ASSERT() is added to be extra safe for debug builds. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6275193ef19033d0cca88df6209556462bbedee2 Author: Qu Wenruo Date: Wed Dec 2 14:48:06 2020 +0800 btrfs: refactor btrfs_lookup_bio_sums to handle out-of-order bvecs Refactor btrfs_lookup_bio_sums() by: - Remove the @file_offset parameter There are two factors making the @file_offset parameter useless: * For csum lookup in csum tree, file offset makes no sense We only need disk_bytenr, which is unrelated to file_offset * page_offset (file offset) of each bvec is not contiguous. Pages can be added to the same bio as long as their on-disk bytenr is contiguous, meaning we could have pages at different file offsets in the same bio. Thus passing file_offset makes no sense any more. The only user of file_offset is for data reloc inode, we will use a new function, search_file_offset_in_bio(), to handle it. - Extract the csum tree lookup into search_csum_tree() The new function will handle the csum search in csum tree. The return value is the same as btrfs_find_ordered_sum(), returning the number of found sectors which have checksum. - Change how we do the main loop The only needed info from bio is: * the on-disk bytenr * the length After extracting the above info, we can do the search without bio at all, which makes the main loop much simpler: for (cur_disk_bytenr = orig_disk_bytenr; cur_disk_bytenr < orig_disk_bytenr + orig_len; cur_disk_bytenr += count * sectorsize) { /* Lookup csum tree */ count = search_csum_tree(fs_info, path, cur_disk_bytenr, search_len, csum_dst); if (!count) { /* Csum hole handling */ } } - Use single variable as the source to calculate all other offsets Instead of all different type of variables, we use only one main variable, cur_disk_bytenr, which represents the current disk bytenr. All involved values can be calculated from that variable, and all those variable will only be visible in the inner loop. The above refactoring makes btrfs_lookup_bio_sums() way more robust than it used to be, especially related to the file offset lookup. Now file_offset lookup is only related to data reloc inode, otherwise we don't need to bother file_offset at all. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 9e46458a7c0056dad98f0684c71be65a380b067b Author: Qu Wenruo Date: Wed Dec 2 14:48:05 2020 +0800 btrfs: remove btrfs_find_ordered_sum call from btrfs_lookup_bio_sums The function btrfs_lookup_bio_sums() is only called for read bios. While btrfs_find_ordered_sum() is to search ordered extent sums, which is only for write path. This means to read a page we either: - Submit read bio if it's not uptodate This means we only need to search csum tree for checksums. - The page is already uptodate It can be marked uptodate for previous read, or being marked dirty. As we always mark page uptodate for dirty page. In that case, we don't need to submit read bio at all, thus no need to search any checksums. Remove the btrfs_find_ordered_sum() call in btrfs_lookup_bio_sums(). And since btrfs_lookup_bio_sums() is the only caller for btrfs_find_ordered_sum(), also remove the implementation. Reviewed-by: Nikolay Borisov Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 884b07d0f4f7e09d8312008fed04e01d9d2270dc Author: Qu Wenruo Date: Wed Dec 2 14:48:04 2020 +0800 btrfs: handle sectorsize < PAGE_SIZE case for extent buffer accessors To support sectorsize < PAGE_SIZE case, we need to take extra care of extent buffer accessors. Since sectorsize is smaller than PAGE_SIZE, one page can contain multiple tree blocks, we must use eb->start to determine the real offset to read/write for extent buffer accessors. This patch introduces two helpers to do this: - get_eb_page_index() This is to calculate the index to access extent_buffer::pages. It's just a simple wrapper around "start >> PAGE_SHIFT". For sectorsize == PAGE_SIZE case, nothing is changed. For sectorsize < PAGE_SIZE case, we always get index as 0, and the existing page shift also works. - get_eb_offset_in_page() This is to calculate the offset to access extent_buffer::pages. This needs to take extent_buffer::start into consideration. For sectorsize == PAGE_SIZE case, extent_buffer::start is always aligned to PAGE_SIZE, thus adding extent_buffer::start to offset_in_page() won't change the result. For sectorsize < PAGE_SIZE case, adding extent_buffer::start gives us the correct offset to access. This patch will touch the following parts to cover all extent buffer accessors: - BTRFS_SETGET_HEADER_FUNCS() - read_extent_buffer() - read_extent_buffer_to_user() - memcmp_extent_buffer() - write_extent_buffer_chunk_tree_uuid() - write_extent_buffer_fsid() - write_extent_buffer() - memzero_extent_buffer() - copy_extent_buffer_full() - copy_extent_buffer() - memcpy_extent_buffer() - memmove_extent_buffer() - btrfs_get_token_##bits() - btrfs_get_##bits() - btrfs_set_token_##bits() - btrfs_set_##bits() - generic_bin_search() Signed-off-by: Goldwyn Rodrigues Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 4a3dc93843dd6ee17c68231d6a90c76231cb65fc Author: Qu Wenruo Date: Wed Dec 2 14:48:03 2020 +0800 btrfs: update num_extent_pages to support subpage sized extent buffer For subpage sized extent buffer, we have ensured no extent buffer will cross page boundary, thus we would only need one page for any extent buffer. Update function num_extent_pages to handle such case. Now num_extent_pages() returns 1 for subpage sized extent buffer. Reviewed-by: Nikolay Borisov Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1aaac38c83a23cd31df551b3f84d3c7f5067a7fe Author: Qu Wenruo Date: Wed Dec 2 14:48:02 2020 +0800 btrfs: don't allow tree block to cross page boundary for subpage support As a preparation for subpage sector size support (allowing filesystem with sector size smaller than page size to be mounted) if the sector size is smaller than page size, we don't allow tree block to be read if it crosses 64K(*) boundary. The 64K is selected because: - we are only going to support 64K page size for subpage for now - 64K is also the maximum supported node size This ensures that tree blocks are always contained in one page for a system with 64K page size, which can greatly simplify the handling. Otherwise we would have to do complex multi-page handling of tree blocks. Currently there is no way to create such tree blocks. In kernel we have avoided such tree blocks allocation even on 4K page size, as it can lead to RAID56 stripe scrubbing. While btrfs-progs have fixed its chunk allocator since 2016 for convert, and has extra checks to do the same behavior as the kernel. Just add such graceful checks in case of an ancient filesystem. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit deb678955360ea87605b8aea1f69c45bddc3f867 Author: Qu Wenruo Date: Wed Dec 2 14:48:01 2020 +0800 btrfs: calculate inline extent buffer page size based on page size Btrfs only support 64K as maximum node size, thus for 4K page system, we would have at most 16 pages for one extent buffer. For a system using 64K page size, we would really have just one page. While we always use 16 pages for extent_buffer::pages, this means for systems using 64K pages, we are wasting memory for 15 page pointers which will never be used. Calculate the array size based on page size and the node size maximum. - for systems using 4K page size, it will stay 16 pages - for systems using 64K page size, it will be 1 page Move the definition of BTRFS_MAX_METADATA_BLOCKSIZE to btrfs_tree.h, to avoid circular inclusion of ctree.h. Reviewed-by: Johannes Thumshirn Reviewed-by: Nikolay Borisov Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit f91e0d0c4cd986af54a8b2deb43b9f7b35299a65 Author: Qu Wenruo Date: Wed Dec 2 14:48:00 2020 +0800 btrfs: factor out btree page submission code to a helper In btree_write_cache_pages() we have a btree page submission routine buried deeply in a nested loop. This patch will extract that part of code into a helper function, submit_eb_page(), to do the same work. Since submit_eb_page() now can return >0 for successful extent buffer submission, remove the "ASSERT(ret <= 0);" line. Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit f44cf41075b05660d61efa7bfa8350b45286f065 Author: Qu Wenruo Date: Wed Dec 2 14:47:59 2020 +0800 btrfs: make btrfs_verify_data_csum follow sector size Currently btrfs_verify_data_csum() just passes the whole page to check_data_csum(), which is fine since we only support sectorsize == PAGE_SIZE. To support subpage, we need to properly honor per-sector checksum verification, just like what we did in dio read path. This patch will do the csum verification in a for loop, starts with pg_off == start - page_offset(page), with sectorsize increase for each loop. For sectorsize == PAGE_SIZE case, the pg_off will always be 0, and we will only loop once. For subpage case, we do the iterate over each sector and if we found any error, we return error. Reviewed-by: Josef Bacik Signed-off-by: Goldwyn Rodrigues Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 7ffd27e378d2541059b9ba49868c32d90ad5ae91 Author: Qu Wenruo Date: Wed Dec 2 14:47:58 2020 +0800 btrfs: pass bio_offset to check_data_csum() directly Parameter icsum for check_data_csum() is a little hard to understand. So is the phy_offset for btrfs_verify_data_csum(). Both parameters are calculated values for csum lookup. Instead of some calculated value, just pass bio_offset and let the final and only user, check_data_csum(), calculate whatever it needs. Since we are here, also make the bio_offset parameter and some related variables to be u32 (unsigned int). As bio size is limited by its bi_size, which is unsigned int, and has extra size limit check during various bio operations. Thus we are ensured that bio_offset won't overflow u32. Thus for all involved functions, not only rename the parameter from @phy_offset to @bio_offset, but also reduce its width to u32, so we won't have suspicious "u32 = u64 >> sector_bits;" lines anymore. Reviewed-by: Johannes Thumshirn Reviewed-by: Nikolay Borisov Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1941b64b080b45a80796a9f3a2e5c89554e53bdf Author: Qu Wenruo Date: Wed Dec 2 14:47:57 2020 +0800 btrfs: rename bio_offset of extent_submit_bio_start_t to dio_file_offset The parameter bio_offset of extent_submit_bio_start_t is very confusing. If it's really bio_offset (offset to bio), then it should be u32. But in fact, it's only utilized by dio read, and that member is used as file offset, which must be u64. Rename it to dio_file_offset since the only user uses it as file offset, and add comment for who is using it. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 8a6a87cd449b9840f8169e0ece0a8fa11232723d Author: Boris Burkov Date: Wed Nov 18 15:06:27 2020 -0800 btrfs: fix lockdep warning when creating free space tree A lock dependency loop exists between the root tree lock, the extent tree lock, and the free space tree lock. The root tree lock depends on the free space tree lock because btrfs_create_tree holds the new tree's lock while adding it to the root tree. The extent tree lock depends on the root tree lock because during umount, we write out space cache v1, which writes inodes in the root tree, which results in holding the root tree lock while doing a lookup in the extent tree. Finally, the free space tree depends on the extent tree because populate_free_space_tree holds a locked path in the extent tree and then does a lookup in the free space tree to add the new item. The simplest of the three to break is the one during tree creation: we unlock the leaf before inserting the tree node into the root tree, which fixes the lockdep warning. [30.480136] ====================================================== [30.480830] WARNING: possible circular locking dependency detected [30.481457] 5.9.0-rc8+ #76 Not tainted [30.481897] ------------------------------------------------------ [30.482500] mount/520 is trying to acquire lock: [30.483064] ffff9babebe03908 (btrfs-free-space-00){++++}-{3:3}, at: __btrfs_tree_read_lock+0x39/0x180 [30.484054] but task is already holding lock: [30.484637] ffff9babebe24468 (btrfs-extent-01#2){++++}-{3:3}, at: __btrfs_tree_read_lock+0x39/0x180 [30.485581] which lock already depends on the new lock. [30.486397] the existing dependency chain (in reverse order) is: [30.487205] -> #2 (btrfs-extent-01#2){++++}-{3:3}: [30.487825] down_read_nested+0x43/0x150 [30.488306] __btrfs_tree_read_lock+0x39/0x180 [30.488868] __btrfs_read_lock_root_node+0x3a/0x50 [30.489477] btrfs_search_slot+0x464/0x9b0 [30.490009] check_committed_ref+0x59/0x1d0 [30.490603] btrfs_cross_ref_exist+0x65/0xb0 [30.491108] run_delalloc_nocow+0x405/0x930 [30.491651] btrfs_run_delalloc_range+0x60/0x6b0 [30.492203] writepage_delalloc+0xd4/0x150 [30.492688] __extent_writepage+0x18d/0x3a0 [30.493199] extent_write_cache_pages+0x2af/0x450 [30.493743] extent_writepages+0x34/0x70 [30.494231] do_writepages+0x31/0xd0 [30.494642] __filemap_fdatawrite_range+0xad/0xe0 [30.495194] btrfs_fdatawrite_range+0x1b/0x50 [30.495677] __btrfs_write_out_cache+0x40d/0x460 [30.496227] btrfs_write_out_cache+0x8b/0x110 [30.496716] btrfs_start_dirty_block_groups+0x211/0x4e0 [30.497317] btrfs_commit_transaction+0xc0/0xba0 [30.497861] sync_filesystem+0x71/0x90 [30.498303] btrfs_remount+0x81/0x433 [30.498767] reconfigure_super+0x9f/0x210 [30.499261] path_mount+0x9d1/0xa30 [30.499722] do_mount+0x55/0x70 [30.500158] __x64_sys_mount+0xc4/0xe0 [30.500616] do_syscall_64+0x33/0x40 [30.501091] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [30.501629] -> #1 (btrfs-root-00){++++}-{3:3}: [30.502241] down_read_nested+0x43/0x150 [30.502727] __btrfs_tree_read_lock+0x39/0x180 [30.503291] __btrfs_read_lock_root_node+0x3a/0x50 [30.503903] btrfs_search_slot+0x464/0x9b0 [30.504405] btrfs_insert_empty_items+0x60/0xa0 [30.504973] btrfs_insert_item+0x60/0xd0 [30.505412] btrfs_create_tree+0x1b6/0x210 [30.505913] btrfs_create_free_space_tree+0x54/0x110 [30.506460] btrfs_mount_rw+0x15d/0x20f [30.506937] btrfs_remount+0x356/0x433 [30.507369] reconfigure_super+0x9f/0x210 [30.507868] path_mount+0x9d1/0xa30 [30.508264] do_mount+0x55/0x70 [30.508668] __x64_sys_mount+0xc4/0xe0 [30.509186] do_syscall_64+0x33/0x40 [30.509652] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [30.510271] -> #0 (btrfs-free-space-00){++++}-{3:3}: [30.510972] __lock_acquire+0x11ad/0x1b60 [30.511432] lock_acquire+0xa2/0x360 [30.511917] down_read_nested+0x43/0x150 [30.512383] __btrfs_tree_read_lock+0x39/0x180 [30.512947] __btrfs_read_lock_root_node+0x3a/0x50 [30.513455] btrfs_search_slot+0x464/0x9b0 [30.513947] search_free_space_info+0x45/0x90 [30.514465] __add_to_free_space_tree+0x92/0x39d [30.515010] btrfs_create_free_space_tree.cold.22+0x1ee/0x45d [30.515639] btrfs_mount_rw+0x15d/0x20f [30.516142] btrfs_remount+0x356/0x433 [30.516538] reconfigure_super+0x9f/0x210 [30.517065] path_mount+0x9d1/0xa30 [30.517438] do_mount+0x55/0x70 [30.517824] __x64_sys_mount+0xc4/0xe0 [30.518293] do_syscall_64+0x33/0x40 [30.518776] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [30.519335] other info that might help us debug this: [30.520210] Chain exists of: btrfs-free-space-00 --> btrfs-root-00 --> btrfs-extent-01#2 [30.521407] Possible unsafe locking scenario: [30.522037] CPU0 CPU1 [30.522456] ---- ---- [30.522941] lock(btrfs-extent-01#2); [30.523311] lock(btrfs-root-00); [30.523952] lock(btrfs-extent-01#2); [30.524620] lock(btrfs-free-space-00); [30.525068] *** DEADLOCK *** [30.525669] 5 locks held by mount/520: [30.526116] #0: ffff9babebc520e0 (&type->s_umount_key#37){+.+.}-{3:3}, at: path_mount+0x7ef/0xa30 [30.527056] #1: ffff9babebc52640 (sb_internal#2){.+.+}-{0:0}, at: start_transaction+0x3d5/0x5c0 [30.527960] #2: ffff9babeae8f2e8 (&cache->free_space_lock#2){+.+.}-{3:3}, at: btrfs_create_free_space_tree.cold.22+0x101/0x45d [30.529118] #3: ffff9babebe24468 (btrfs-extent-01#2){++++}-{3:3}, at: __btrfs_tree_read_lock+0x39/0x180 [30.530113] #4: ffff9babebd52eb8 (btrfs-extent-00){++++}-{3:3}, at: btrfs_try_tree_read_lock+0x16/0x100 [30.531124] stack backtrace: [30.531528] CPU: 0 PID: 520 Comm: mount Not tainted 5.9.0-rc8+ #76 [30.532166] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.11.1-4.module_el8.1.0+248+298dec18 04/01/2014 [30.533215] Call Trace: [30.533452] dump_stack+0x8d/0xc0 [30.533797] check_noncircular+0x13c/0x150 [30.534233] __lock_acquire+0x11ad/0x1b60 [30.534667] lock_acquire+0xa2/0x360 [30.535063] ? __btrfs_tree_read_lock+0x39/0x180 [30.535525] down_read_nested+0x43/0x150 [30.535939] ? __btrfs_tree_read_lock+0x39/0x180 [30.536400] __btrfs_tree_read_lock+0x39/0x180 [30.536862] __btrfs_read_lock_root_node+0x3a/0x50 [30.537304] btrfs_search_slot+0x464/0x9b0 [30.537713] ? trace_hardirqs_on+0x1c/0xf0 [30.538148] search_free_space_info+0x45/0x90 [30.538572] __add_to_free_space_tree+0x92/0x39d [30.539071] ? printk+0x48/0x4a [30.539367] btrfs_create_free_space_tree.cold.22+0x1ee/0x45d [30.539972] btrfs_mount_rw+0x15d/0x20f [30.540350] btrfs_remount+0x356/0x433 [30.540773] ? shrink_dcache_sb+0xd9/0x100 [30.541203] reconfigure_super+0x9f/0x210 [30.541642] path_mount+0x9d1/0xa30 [30.542040] do_mount+0x55/0x70 [30.542366] __x64_sys_mount+0xc4/0xe0 [30.542822] do_syscall_64+0x33/0x40 [30.543197] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [30.543691] RIP: 0033:0x7f109f7ab93a [30.546042] RSP: 002b:00007ffc47c4f858 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 [30.546770] RAX: ffffffffffffffda RBX: 00007f109f8cf264 RCX: 00007f109f7ab93a [30.547485] RDX: 0000557e6fc10770 RSI: 0000557e6fc19cf0 RDI: 0000557e6fc19cd0 [30.548185] RBP: 0000557e6fc10520 R08: 0000557e6fc18e30 R09: 0000557e6fc18cb0 [30.548911] R10: 0000000000200020 R11: 0000000000000246 R12: 0000000000000000 [30.549606] R13: 0000557e6fc19cd0 R14: 0000557e6fc10770 R15: 0000557e6fc10520 Reviewed-by: Josef Bacik Signed-off-by: Boris Burkov Signed-off-by: David Sterba commit af456a2c0aaaff15b84f046e2545570bf1bf50ed Author: Boris Burkov Date: Wed Nov 18 15:06:26 2020 -0800 btrfs: skip space_cache v1 setup when not using it If we are not using space cache v1, we should not create the free space object or free space inodes. This comes up when we delete the existing free space objects/inodes when migrating to v2, only to see them get recreated for every dirtied block group. Reviewed-by: Josef Bacik Signed-off-by: Boris Burkov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 36b216c85eb9d7f59ac1cb8b117376e20acc6cbc Author: Boris Burkov Date: Wed Nov 18 15:06:25 2020 -0800 btrfs: remove free space items when disabling space cache v1 When the filesystem transitions from space cache v1 to v2 or to nospace_cache, it removes the old cached data, but does not remove the FREE_SPACE items nor the free space inodes they point to. This doesn't cause any issues besides being a bit inefficient, since these items no longer do anything useful. To fix it, when we are mounting, and plan to disable the space cache, destroy each block group's free space item and free space inode. The code to remove the items is lifted from the existing use case of removing the block group, with a light adaptation to handle whether or not we have already looked up the free space inode. Reviewed-by: Josef Bacik Signed-off-by: Boris Burkov Signed-off-by: David Sterba commit 2838d255cb9b85a845efc3bbd3f6fc66ed883d35 Author: Boris Burkov Date: Wed Nov 18 15:06:24 2020 -0800 btrfs: warn when remount will not change the free space tree If the remount is ro->ro, rw->ro, or rw->rw, we will not create or clear the free space tree. This can be surprising, so print a warning to dmesg to make the failure more visible. It is also important to ensure that the space cache options (SPACE_CACHE, FREE_SPACE_TREE) are consistent, so ensure those are set to properly match the current on disk state (which won't be changing). Reviewed-by: Josef Bacik Signed-off-by: Boris Burkov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 04c415596953ec90fdae1ad388fdc8151d5dfdc1 Author: Boris Burkov Date: Wed Nov 18 15:06:23 2020 -0800 btrfs: use superblock state to print space_cache mount option To make the contents of /proc/mounts better match the actual state of the filesystem, base the display of the space cache mount options off the contents of the super block rather than the last mount options passed in. Since there are many scenarios where the mount will ignore a space cache option, simply showing the passed in option is misleading. For example, if we mount with -o remount,space_cache=v2 on a read-write file system without an existing free space tree, we won't build a free space tree, but /proc/mounts will read space_cache=v2 (until we mount again and it goes away) cache_generation is set iff space_cache=v1, FREE_SPACE_TREE is set iff space_cache=v2, and if neither is the case, we print nospace_cache. Reviewed-by: Josef Bacik Signed-off-by: Boris Burkov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 948462294577a3870c407c16d89bb2314f0b0cfb Author: Boris Burkov Date: Wed Nov 18 15:06:22 2020 -0800 btrfs: keep sb cache_generation consistent with space_cache When mounting, btrfs uses the cache_generation in the super block to determine if space cache v1 is in use. However, by mounting with nospace_cache or space_cache=v2, it is possible to disable space cache v1, which does not result in un-setting cache_generation back to 0. In order to base some logic, like mount option printing in /proc/mounts, on the current state of the space cache rather than just the values of the mount option, keep the value of cache_generation consistent with the status of space cache v1. We ensure that cache_generation > 0 iff the file system is using space_cache v1. This requires committing a transaction on any mount which changes whether we are using v1. (v1->nospace_cache, v1->v2, nospace_cache->v1, v2->v1). Since the mechanism for writing out the cache generation is transaction commit, but we want some finer grained control over when we un-set it, we can't just rely on the SPACE_CACHE mount option, and introduce an fs_info flag that mount can use when it wants to unset the generation. Reviewed-by: Josef Bacik Signed-off-by: Boris Burkov Signed-off-by: David Sterba commit 8b228324a8ce03083a034dfa784bc10696ce7489 Author: Boris Burkov Date: Wed Nov 18 15:06:21 2020 -0800 btrfs: clear free space tree on ro->rw remount A user might want to revert to v1 or nospace_cache on a root filesystem, and much like turning on the free space tree, that can only be done remounting from ro->rw. Support clearing the free space tree on such mounts by moving it into the shared remount logic. Since the CLEAR_CACHE option sticks around across remounts, this change would result in clearing the tree for ever on every remount, which is not desirable. To fix that, add CLEAR_CACHE to the oneshot options we clear at mount end, which has the other bonus of not cluttering the /proc/mounts output with clear_cache. Reviewed-by: Josef Bacik Signed-off-by: Boris Burkov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 8cd2908846d11af9b33246171f71a923d35eb3c4 Author: Boris Burkov Date: Wed Nov 18 15:06:20 2020 -0800 btrfs: clear oneshot options on mount and remount Some options only apply during mount time and are cleared at the end of mount. For now, the example is USEBACKUPROOT, but CLEAR_CACHE also fits the bill, and this is a preparation patch for also clearing that option. One subtlety is that the current code only resets USEBACKUPROOT on rw mounts, but the option is meaningfully "consumed" by a ro mount, so it feels appropriate to clear in that case as well. A subsequent read-write remount would not go through open_ctree, which is the only place that checks the option, so the change should be benign. Reviewed-by: Josef Bacik Signed-off-by: Boris Burkov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5011139a4718455a6cd6214fd84e6f8500fd3874 Author: Boris Burkov Date: Wed Nov 18 15:06:19 2020 -0800 btrfs: create free space tree on ro->rw remount When a user attempts to remount a btrfs filesystem with 'mount -o remount,space_cache=v2', that operation silently succeeds. Unfortunately, this is misleading, because the remount does not create the free space tree. /proc/mounts will incorrectly show space_cache=v2, but on the next mount, the file system will revert to the old space_cache. For now, we handle only the easier case, where the existing mount is read-only and the new mount is read-write. In that case, we can create the free space tree without contending with the block groups changing as we go. Reviewed-by: Josef Bacik Signed-off-by: Boris Burkov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 997e3e2e71b32b31bfab6b299d9db05af285b457 Author: Boris Burkov Date: Wed Nov 18 15:06:18 2020 -0800 btrfs: only mark bg->needs_free_space if free space tree is on If we attempt to create a free space tree while any block groups have needs_free_space set, we will double add the new free space item and hit EEXIST. Previously, we only created the free space tree on a new mount, so we never hit the case, but if we try to create it on a remount, such block groups could exist and trip us up. We don't do anything with this field unless the free space tree is enabled, so there is no harm in not setting it. Reviewed-by: Josef Bacik Signed-off-by: Boris Burkov Signed-off-by: David Sterba commit 8f1c21d7490fc1ac5ef364b7085987ca439fb32f Author: Boris Burkov Date: Wed Nov 18 15:06:17 2020 -0800 btrfs: start orphan cleanup on ro->rw remount When we mount a rw filesystem, we start the orphan cleanup process in tree root and filesystem tree. However, when we remount a ro file system rw, we only clean the former. Move the calls to btrfs_orphan_cleanup() on tree_root and fs_root to the shared rw mount routine to effectively add them on ro->rw remount. Reviewed-by: Josef Bacik Signed-off-by: Boris Burkov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 44c0ca211a4da92513fffc545b5374b45b0c4fc5 Author: Boris Burkov Date: Wed Nov 18 15:06:16 2020 -0800 btrfs: lift read-write mount setup from mount and remount Mounting rw and remounting from ro to rw naturally share invariants and functionality which result in a correctly setup rw filesystem. Luckily, there is even a strong unity in the code which implements them. In mount's open_ctree, these operations mostly happen after an early return for ro file systems, and in remount, they happen in a section devoted to remounting ro->rw, after some remount specific validation passes. However, there are unfortunately a few differences. There are small deviations in the order of some of the operations, remount does not start orphan cleanup in root_tree or fs_tree, remount does not create the free space tree, and remount does not handle "one-shot" mount options like clear_cache and uuid tree rescan. Since we want to add building the free space tree to remount, and also to start the same orphan cleanup process on a filesystem mounted as ro then remounted rw, we would benefit from unifying the logic between the two code paths. This patch only lifts the existing common functionality, and leaves a natural path for fixing the discrepancies. Reviewed-by: Josef Bacik Signed-off-by: Boris Burkov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 47876f7ceffa0e6af7476e052b3c061f1f2c1d9f Author: Filipe Manana Date: Wed Nov 25 12:19:28 2020 +0000 btrfs: do not block inode logging for so long during transaction commit Early on during a transaction commit we acquire the tree_log_mutex and hold it until after we write the super blocks. But before writing the extent buffers dirtied by the transaction and the super blocks we unblock the transaction by setting its state to TRANS_STATE_UNBLOCKED and setting fs_info->running_transaction to NULL. This means that after that and before writing the super blocks, new transactions can start. However if any transaction wants to log an inode, it will block waiting for the transaction commit to write its dirty extent buffers and the super blocks because the tree_log_mutex is only released after those operations are complete, and starting a new log transaction blocks on that mutex (at start_log_trans()). Writing the dirty extent buffers and the super blocks can take a very significant amount of time to complete, but we could allow the tasks wanting to log an inode to proceed with most of their steps: 1) create the log trees 2) log metadata in the trees 3) write their dirty extent buffers They only need to wait for the previous transaction commit to complete (write its super blocks) before they attempt to write their super blocks, otherwise we could end up with a corrupt filesystem after a crash. So change start_log_trans() to use the root tree's log_mutex to serialize for the creation of the log root tree instead of using the tree_log_mutex, and make btrfs_sync_log() acquire the tree_log_mutex before writing the super blocks. This allows for inode logging to wait much less time when there is a previous transaction that is still committing, often not having to wait at all, as by the time when we try to sync the log the previous transaction already wrote its super blocks. This patch belongs to a patch set that is comprised of the following patches: btrfs: fix race causing unnecessary inode logging during link and rename btrfs: fix race that results in logging old extents during a fast fsync btrfs: fix race that causes unnecessary logging of ancestor inodes btrfs: fix race that makes inode logging fallback to transaction commit btrfs: fix race leading to unnecessary transaction commit when logging inode btrfs: do not block inode logging for so long during transaction commit The following script that uses dbench was used to measure the impact of the whole patchset: $ cat test-dbench.sh #!/bin/bash DEV=/dev/nvme0n1 MNT=/mnt/btrfs MOUNT_OPTIONS="-o ssd" echo "performance" | \ tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor mkfs.btrfs -f -m single -d single $DEV mount $MOUNT_OPTIONS $DEV $MNT dbench -D $MNT -t 300 64 umount $MNT The test was run on a machine with 12 cores, 64G of ram, using a NVMe device and a non-debug kernel configuration (Debian's default). Before patch set: Operation Count AvgLat MaxLat ---------------------------------------- NTCreateX 11277211 0.250 85.340 Close 8283172 0.002 6.479 Rename 477515 1.935 86.026 Unlink 2277936 0.770 87.071 Deltree 256 15.732 81.379 Mkdir 128 0.003 0.009 Qpathinfo 10221180 0.056 44.404 Qfileinfo 1789967 0.002 4.066 Qfsinfo 1874399 0.003 9.176 Sfileinfo 918589 0.061 10.247 Find 3951758 0.341 54.040 WriteX 5616547 0.047 85.079 ReadX 17676028 0.005 9.704 LockX 36704 0.003 1.800 UnlockX 36704 0.002 0.687 Flush 790541 14.115 676.236 Throughput 1179.19 MB/sec 64 clients 64 procs max_latency=676.240 ms After patch set: Operation Count AvgLat MaxLat ---------------------------------------- NTCreateX 12687926 0.171 86.526 Close 9320780 0.002 8.063 Rename 537253 1.444 78.576 Unlink 2561827 0.559 87.228 Deltree 374 11.499 73.549 Mkdir 187 0.003 0.005 Qpathinfo 11500300 0.061 36.801 Qfileinfo 2017118 0.002 7.189 Qfsinfo 2108641 0.003 4.825 Sfileinfo 1033574 0.008 8.065 Find 4446553 0.408 47.835 WriteX 6335667 0.045 84.388 ReadX 19887312 0.003 9.215 LockX 41312 0.003 1.394 UnlockX 41312 0.002 1.425 Flush 889233 13.014 623.259 Throughput 1339.32 MB/sec 64 clients 64 procs max_latency=623.265 ms +12.7% throughput, -8.2% max latency Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 639bd575b7c7fa326abadd2ef3e374a5a24eb40b Author: Filipe Manana Date: Wed Nov 25 12:19:27 2020 +0000 btrfs: fix race leading to unnecessary transaction commit when logging inode When logging an inode we may often have to fallback to a full transaction commit, either because a new block group was allocated, there is some case we can not deal with without a transaction commit or some error like an ENOMEM happened. However after we fallback to a transaction commit, we have a time window where we can make the next attempt to log any inode commit the next transaction unnecessarily, adding additional overhead and increasing latency. A sequence of steps that leads to this issue is the following: 1) The current open transaction has a generation of 1000; 2) A new block group is allocated, and as a consequence we must make sure any attempts to commit a log fallback to a transaction commit, so btrfs_set_log_full_commit() is called from btrfs_make_block_group(). This sets fs_info->last_trans_log_full_commit to 1000; 3) Task A is holding a handle on transaction 1000 and tries to log inode X. Once it gets to start_log_trans(), it calls btrfs_need_log_full_commit() which returns true, since fs_info->last_trans_log_full_commit has a value of 1000. So we end up returning EAGAIN and propagating it up to btrfs_sync_file(), where we commit transaction 1000; 4) The transaction commit task (task A) sets the transaction state to unblocked (TRANS_STATE_UNBLOCKED); 5) Some other task, task B, starts a new transaction with a generation of 1001; 6) Some stuff is done with transaction 1001, some btree blocks COWed, etc; 7) Transaction 1000 has not fully committed yet, we are still writing all the extent buffers it created; 8) Some new task, task C, starts an fsync of inode Y, gets a handle for transaction 1001, and it gets to btrfs_log_inode_parent() which does the following check: if (fs_info->last_trans_log_full_commit > last_committed) { ret = 1; goto end_no_trans; } At that point last_trans_log_full_commit has a value of 1000 and last_committed (value of fs_info->last_trans_committed) has a value of 999, since transaction 1000 has not yet committed - it is either still writing out dirty extent buffers, its super blocks or unpinning extents. As a consequence we return 1, which gets propagated up to btrfs_sync_file(), which will then call btrfs_commit_transaction() for transaction 1001. As a consequence we have an unnecessary second transaction commit, we previously committed transaction 1000 and now commit transaction 1001 as well, resulting in more overhead and increased latency. So fix this double transaction commit issue simply by removing that check, because all we need to do is wait for the previous transaction to finish its commit, which we already do later when starting the log transaction at start_log_trans(), because there we acquire the tree_log_mutex lock, which is held by a transaction commit and only released after the transaction commits its super blocks. Another issue that check has is that it reads last_trans_log_full_commit without using READ_ONCE(), which is incorrect since that member of struct btrfs_fs_info is always updated with WRITE_ONCE() through the helper btrfs_set_log_full_commit(). This double transaction commit issue can actually be triggered quite often in long runs of dbench, since besides the creation of new block groups that force inode logging to fallback to a transaction commit, there are cases where dbench asks to fsync a directory which had files in it that were previously renamed or subdirectories that were removed, resulting in the inode logging to fallback to a full transaction commit. This patch belongs to a patch set that is comprised of the following patches: btrfs: fix race causing unnecessary inode logging during link and rename btrfs: fix race that results in logging old extents during a fast fsync btrfs: fix race that causes unnecessary logging of ancestor inodes btrfs: fix race that makes inode logging fallback to transaction commit btrfs: fix race leading to unnecessary transaction commit when logging inode btrfs: do not block inode logging for so long during transaction commit Performance results are mentioned in the change log of the last patch. Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 47d3db41e190ca4a9c6e4a848052f4c5ca633db1 Author: Filipe Manana Date: Wed Nov 25 12:19:26 2020 +0000 btrfs: fix race that makes inode logging fallback to transaction commit When logging an inode and the previous transaction is still committing, we have a time window where we can end up incorrectly think an inode has its last_unlink_trans field with a value greater than the last transaction committed, which results in the logging to fallback to a full transaction commit, which is usually much more expensive than doing a log commit. The race is described by the following steps: 1) We are at transaction 1000; 2) We modify an inode X (a directory) using transaction 1000 and set its last_unlink_trans field to 1000, because for example we removed one of its subdirectories; 3) We create a new inode Y with a dentry in inode X using transaction 1000, so its generation field is set to 1000; 4) The commit for transaction 1000 is started by task A; 5) The task committing transaction 1000 sets the transaction state to unblocked, writes the dirty extent buffers and the super blocks, then unlocks tree_log_mutex; 6) Some task starts a new transaction with a generation of 1001; 7) We do some modification to inode Y (using transaction 1001); 8) The transaction 1000 commit starts unpinning extents. At this point fs_info->last_trans_committed still has a value of 999; 9) Task B starts an fsync on inode Y, and gets a handle for transaction 1001. When it gets to check_parent_dirs_for_sync() it does the checking of the ancestor dentries because the following check does not evaluate to true: if (S_ISREG(inode->vfs_inode.i_mode) && inode->generation <= last_committed && inode->last_unlink_trans <= last_committed) goto out; The generation value for inode Y is 1000 and last_committed, which has the value read from fs_info->last_trans_committed, has a value of 999, so that check evaluates to false and we proceed to check the ancestor inodes. Once we get to the first ancestor, inode X, we call btrfs_must_commit_transaction() on it, which evaluates to true: static bool btrfs_must_commit_transaction(...) { struct btrfs_fs_info *fs_info = inode->root->fs_info; bool ret = false; mutex_lock(&inode->log_mutex); if (inode->last_unlink_trans > fs_info->last_trans_committed) { /* * Make sure any commits to the log are forced to be full * commits. */ btrfs_set_log_full_commit(trans); ret = true; } (...) because inode's X last_unlink_trans has a value of 1000 and fs_info->last_trans_committed still has a value of 999, it returns true to check_parent_dirs_for_sync(), making it return 1 which is propagated up to btrfs_sync_file(), causing it to fallback to a full transaction commit of transaction 1001. We should have not fallen back to commit transaction 1001, since inode X had last_unlink_trans set to 1000 and the super blocks for transaction 1000 were already written. So while not resulting in a functional problem, it leads to a lot more work and higher latencies for a fsync since committing a transaction is usually more expensive than committing a log (if other filesystem changes happened under that transaction). Similar problem happens when logging directories, for the same reason as btrfs_must_commit_transaction() returns true on an inode with its last_unlink_trans having the generation of the previous transaction and that transaction is still committing, unpinning its freed extents. So fix this by comparing last_unlink_trans with the id of the current transaction instead of fs_info->last_trans_committed. This case is often hit when running dbench for a long enough duration, as it does lots of rename and rmdir operations (both update the field last_unlink_trans of an inode) and fsyncs of files and directories. This patch belongs to a patch set that is comprised of the following patches: btrfs: fix race causing unnecessary inode logging during link and rename btrfs: fix race that results in logging old extents during a fast fsync btrfs: fix race that causes unnecessary logging of ancestor inodes btrfs: fix race that makes inode logging fallback to transaction commit btrfs: fix race leading to unnecessary transaction commit when logging inode btrfs: do not block inode logging for so long during transaction commit Performance results are mentioned in the change log of the last patch. Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 4d6221d7d83141d58ece6560e9cfd4cc92eab044 Author: Filipe Manana Date: Wed Nov 25 12:19:25 2020 +0000 btrfs: fix race that causes unnecessary logging of ancestor inodes When logging an inode and we are checking if we need to log ancestors that are new, if the previous transaction is still committing we have a time window where we can unnecessarily log ancestor inodes that were created in the previous transaction. The race is described by the following steps: 1) We are at transaction 1000; 2) Directory inode X is created, its generation is set to 1000; 3) The commit for transaction 1000 is started by task A; 4) The task committing transaction 1000 sets the transaction state to unblocked, writes the dirty extent buffers and the super blocks, then unlocks tree_log_mutex; 5) Inode Y, a regular file, is created under directory inode X, this results in starting a new transaction with a generation of 1001; 6) The transaction 1000 commit is unpinning extents. At this point fs_info->last_trans_committed still has a value of 999; 7) Task B calls fsync on inode Y and gets a handle for transaction 1001; 8) Task B ends up at log_all_new_ancestors() and then because inode Y has only one hard link, ends up at log_new_ancestors_fast(). There it reads a value of 999 from fs_info->last_trans_committed, and sees that the parent inode X has a generation of 1000, so we end up logging inode X: if (inode->generation > fs_info->last_trans_committed) { ret = btrfs_log_inode(trans, root, inode, LOG_INODE_EXISTS, ctx); (...) which is not necessary since it was created in the past transaction, with a generation of 1000, and that transaction has already committed its super blocks - it's still unpinning extents so it has not yet updated fs_info->last_trans_committed from 999 to 1000. So this just causes us to spend more time logging and allocating and writing more tree blocks for the log tree. So fix this by comparing an inode's generation with the generation of the transaction our transaction handle refers to - if the inode's generation matches the generation of the current transaction than we know it is a new inode we need to log, otherwise don't log it. This case is often hit when running dbench for a long enough duration. This patch belongs to a patch set that is comprised of the following patches: btrfs: fix race causing unnecessary inode logging during link and rename btrfs: fix race that results in logging old extents during a fast fsync btrfs: fix race that causes unnecessary logging of ancestor inodes btrfs: fix race that makes inode logging fallback to transaction commit btrfs: fix race leading to unnecessary transaction commit when logging inode btrfs: do not block inode logging for so long during transaction commit Performance results are mentioned in the change log of the last patch. Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 5f96bfb7633c55b578c6b32f32624061f25010db Author: Filipe Manana Date: Wed Nov 25 12:19:24 2020 +0000 btrfs: fix race that results in logging old extents during a fast fsync When logging the extents of an inode during a fast fsync, we have a time window where we can log extents that are from the previous transaction and already persisted. This only makes us waste time unnecessarily. The following sequence of steps shows how this can happen: 1) We are at transaction 1000; 2) An ordered extent E from inode I completes, that is it has gone through btrfs_finish_ordered_io(), and it set the extent maps' generation to 1000 when we unpin the extent, which is the generation of the current transaction; 3) The commit for transaction 1000 starts by task A; 4) The task committing transaction 1000 sets the transaction state to unblocked, writes the dirty extent buffers and the super blocks, then unlocks tree_log_mutex; 5) Some change is made to inode I, resulting in creation of a new transaction with a generation of 1001; 6) The transaction 1000 commit starts unpinning extents. At this point fs_info->last_trans_committed still has a value of 999; 7) Task B starts an fsync on inode I, and when it gets to btrfs_log_changed_extents() sees the extent map for extent E in the list of modified extents. It sees the extent map has a generation of 1000 and fs_info->last_trans_committed has a value of 999, so it proceeds to logging the respective file extent item and all the checksums covering its range. So we end up wasting time since the extent was already persisted and is reachable through the trees pointed to by the super block committed by transaction 1000. So just fix this by comparing the extent maps generation against the generation of the transaction handle - if it is smaller then the id in the handle, we know the extent was already persisted and we do not need to log it. This patch belongs to a patch set that is comprised of the following patches: btrfs: fix race causing unnecessary inode logging during link and rename btrfs: fix race that results in logging old extents during a fast fsync btrfs: fix race that causes unnecessary logging of ancestor inodes btrfs: fix race that makes inode logging fallback to transaction commit btrfs: fix race leading to unnecessary transaction commit when logging inode btrfs: do not block inode logging for so long during transaction commit Performance results are mentioned in the change log of the last patch. Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit de53d892e5c51dfa0a158e812575a75a6c991f39 Author: Filipe Manana Date: Wed Nov 25 12:19:23 2020 +0000 btrfs: fix race causing unnecessary inode logging during link and rename When we are doing a rename or a link operation for an inode that was logged in the previous transaction and that transaction is still committing, we have a time window where we incorrectly consider that the inode was logged previously in the current transaction and therefore decide to log it to update it in the log. The following steps give an example on how this happens during a link operation: 1) Inode X is logged in transaction 1000, so its logged_trans field is set to 1000; 2) Task A starts to commit transaction 1000; 3) The state of transaction 1000 is changed to TRANS_STATE_UNBLOCKED; 4) Task B starts a link operation for inode X, and as a consequence it starts transaction 1001; 5) Task A is still committing transaction 1000, therefore the value stored at fs_info->last_trans_committed is still 999; 6) Task B calls btrfs_log_new_name(), it reads a value of 999 from fs_info->last_trans_committed and because the logged_trans field of inode X has a value of 1000, the function does not return immediately, instead it proceeds to logging the inode, which should not happen because the inode was logged in the previous transaction (1000) and not in the current one (1001). This is not a functional problem, just wasted time and space logging an inode that does not need to be logged, contributing to higher latency for link and rename operations. So fix this by comparing the inodes' logged_trans field with the generation of the current transaction instead of comparing with the value stored in fs_info->last_trans_committed. This case is often hit when running dbench for a long enough duration, as it does lots of rename operations. This patch belongs to a patch set that is comprised of the following patches: btrfs: fix race causing unnecessary inode logging during link and rename btrfs: fix race that results in logging old extents during a fast fsync btrfs: fix race that causes unnecessary logging of ancestor inodes btrfs: fix race that makes inode logging fallback to transaction commit btrfs: fix race leading to unnecessary transaction commit when logging inode btrfs: do not block inode logging for so long during transaction commit Performance results are mentioned in the change log of the last patch. Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit fa598b0696409e3522022a1dddd47a1adc2b994d Author: David Sterba Date: Thu Dec 3 17:18:38 2020 +0100 btrfs: remove recalc_thresholds from free space ops After removing the inode number cache that was using the free space cache code, we can remove at least the recalc_thresholds callback from the ops. Both code and tests use the same callback function. It's moved before its first use. The use_bitmaps callback is still needed by tests to create some extents/bitmap setup. Signed-off-by: David Sterba commit f0d1219def15ef14a2ba2f6b7a612773295b3b5c Author: Nikolay Borisov Date: Thu Dec 3 10:09:49 2020 +0200 btrfs: always set NODATASUM/NODATACOW in __create_free_space_inode Since it's being used solely for the freespace cache unconditionally set the flags required for it. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 7dbdb443a7b49f66d9c4da0d810e2c54e0727d82 Author: Nikolay Borisov Date: Thu Dec 3 10:09:48 2020 +0200 btrfs: remove crc_check logic from free space Following removal of the ino cache io_ctl_init will be called only on behalf of the freespace inode. In this case we always want to check CRCs so conditional code that depended on io_ctl::check_crc can be removed. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5297199a8bca12b8b96afcbf2341605efb6005de Author: Nikolay Borisov Date: Thu Nov 26 15:10:39 2020 +0200 btrfs: remove inode number cache feature It's been deprecated since commit b547a88ea577 ("btrfs: start deprecation of mount option inode_cache") which enumerates the reasons. A filesystem that uses the feature (mount -o inode_cache) tracks the inode numbers in bitmaps, that data stay on the filesystem after this patch. The size is roughly 5MiB for 1M inodes [1], which is considered small enough to be left there. Removal of the change can be implemented in btrfs-progs if needed. [1] https://lore.kernel.org/linux-btrfs/20201127145836.GZ6430@twin.jikos.cz/ Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba [ update changelog ] Signed-off-by: David Sterba commit abadc1fcd72e887a8f875dabe4a07aa8c28ac8af Author: Nikolay Borisov Date: Thu Nov 26 15:10:38 2020 +0200 btrfs: replace calls to btrfs_find_free_ino with btrfs_find_free_objectid The former is going away as part of the inode map removal so switch callers to btrfs_find_free_objectid. No functional changes since with INODE_MAP disabled (default) find_free_objectid was called anyway. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit ec7d6dfd73b2de1c6bc36f832542061b0ca0e0ff Author: Nikolay Borisov Date: Thu Nov 26 15:10:37 2020 +0200 btrfs: move btrfs_find_highest_objectid/btrfs_find_free_objectid to disk-io.c Those functions are going to be used even after inode cache is removed so moved them to a more appropriate place. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1201b58b67b3642fd8cafa3604402bee40df1a6d Author: David Sterba Date: Thu Nov 26 15:41:27 2020 +0100 btrfs: drop casts of bio bi_sector Since commit 72deb455b5ec ("block: remove CONFIG_LBDAF") (5.2) the sector_t type is u64 on all arches and configs so we don't need to typecast it. It used to be unsigned long and the result of sector size shifts were not guaranteed to fit in the type. Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba commit 12659251ca5df05a484eb122c2c34c18d84e797c Author: Naohiro Aota Date: Tue Nov 10 20:26:14 2020 +0900 btrfs: implement log-structured superblock for ZONED mode Superblock (and its copies) is the only data structure in btrfs which has a fixed location on a device. Since we cannot overwrite in a sequential write required zone, we cannot place superblock in the zone. One easy solution is limiting superblock and copies to be placed only in conventional zones. However, this method has two downsides: one is reduced number of superblock copies. The location of the second copy of superblock is 256GB, which is in a sequential write required zone on typical devices in the market today. So, the number of superblock and copies is limited to be two. Second downside is that we cannot support devices which have no conventional zones at all. To solve these two problems, we employ superblock log writing. It uses two adjacent zones as a circular buffer to write updated superblocks. Once the first zone is filled up, start writing into the second one. Then, when both zones are filled up and before starting to write to the first zone again, it reset the first zone. We can determine the position of the latest superblock by reading write pointer information from a device. One corner case is when both zones are full. For this situation, we read out the last superblock of each zone, and compare them to determine which zone is older. The following zones are reserved as the circular buffer on ZONED btrfs. - The primary superblock: zones 0 and 1 - The first copy: zones 16 and 17 - The second copy: zones 1024 or zone at 256GB which is minimum, and next to it If these reserved zones are conventional, superblock is written fixed at the start of the zone without logging. Signed-off-by: Naohiro Aota Reviewed-by: David Sterba Signed-off-by: David Sterba commit a589dde0bc0bf5616e92131d803b6046573449e6 Author: Naohiro Aota Date: Tue Nov 10 20:26:13 2020 +0900 btrfs: disallow mixed-bg in ZONED mode Placing both data and metadata in a block group is impossible in ZONED mode. For data, we can allocate a space for it and write it immediately after the allocation. For metadata, however, we cannot do that, because the logical addresses are recorded in other metadata buffers to build up the trees. As a result, a data buffer can be placed after a metadata buffer, which is not written yet. Writing out the data buffer will break the sequential write rule. Check and disallow MIXED_BG with ZONED mode. Reviewed-by: Josef Bacik Reviewed-by: Anand Jain Signed-off-by: Naohiro Aota Reviewed-by: David Sterba Signed-off-by: David Sterba commit f1569c4c10a1e9320b92486d73043c6138859cc5 Author: Naohiro Aota Date: Tue Nov 10 20:26:12 2020 +0900 btrfs: disable fallocate in ZONED mode fallocate() is implemented by reserving actual extent instead of reservations. This can result in exposing the sequential write constraint of host-managed zoned block devices to the application, which would break the POSIX semantic for the fallocated file. To avoid this, report fallocate() as not supported when in ZONED mode for now. In the future, we may be able to implement "in-memory" fallocate() in ZONED mode by utilizing space_info->bytes_may_use or similar, so this returns EOPNOTSUPP. Reviewed-by: Johannes Thumshirn Reviewed-by: Josef Bacik Reviewed-by: Anand Jain Signed-off-by: Naohiro Aota Reviewed-by: David Sterba Signed-off-by: David Sterba commit d206e9c9c576a0de2e6d1fdf17551e2a548955c0 Author: Naohiro Aota Date: Tue Nov 10 20:26:11 2020 +0900 btrfs: disallow NODATACOW in ZONED mode NODATACOW implies overwriting the file data on a device, which is impossible in sequential required zones. Disable NODATACOW globally with mount option and per-file NODATACOW attribute by masking FS_NOCOW_FL. Reviewed-by: Josef Bacik Signed-off-by: Johannes Thumshirn Signed-off-by: Naohiro Aota Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5d1ab66c56fed152acbbac1933b16d33ebd47d7f Author: Naohiro Aota Date: Tue Nov 10 20:26:10 2020 +0900 btrfs: disallow space_cache in ZONED mode As updates to the space cache v1 are in-place, the space cache cannot be located over sequential zones and there is no guarantees that the device will have enough conventional zones to store this cache. Resolve this problem by disabling completely the space cache v1. This does not introduce any problems with sequential block groups: all the free space is located after the allocation pointer and no free space before the pointer. There is no need to have such cache. Note: we can technically use free-space-tree (space cache v2) on ZONED mode. But, since ZONED mode now always allocates extents in a block group sequentially regardless of underlying device zone type, it's no use to enable and maintain the tree. For the same reason, NODATACOW is also disabled. In summary, ZONED will disable: | Disabled features | Reason | |-------------------+-----------------------------------------------------| | RAID/DUP | Cannot handle two zone append writes to different | | | zones | |-------------------+-----------------------------------------------------| | space_cache (v1) | In-place updating | | NODATACOW | In-place updating | |-------------------+-----------------------------------------------------| | fallocate | Reserved extent will be a write hole | |-------------------+-----------------------------------------------------| | MIXED_BG | Allocated metadata region will be write holes for | | | data writes | Reviewed-by: Josef Bacik Signed-off-by: Naohiro Aota Reviewed-by: David Sterba Signed-off-by: David Sterba commit 862931c76327e54d49c30d80c333f552dca18489 Author: Naohiro Aota Date: Tue Nov 10 20:26:09 2020 +0900 btrfs: introduce max_zone_append_size The zone append write command has a maximum IO size restriction it accepts. This is because a zone append write command cannot be split, as we ask the device to place the data into a specific target zone and the device responds with the actual written location of the data. Introduce max_zone_append_size to zone_info and fs_info to track the value, so we can limit all I/O to a zoned block device that we want to write using the zone append command to the device's limits. Reviewed-by: Josef Bacik Signed-off-by: Naohiro Aota Reviewed-by: David Sterba Signed-off-by: David Sterba commit b70f509774ad4b75d4253ad23b65c35d89402026 Author: Naohiro Aota Date: Tue Nov 10 20:26:08 2020 +0900 btrfs: check and enable ZONED mode Introduce function btrfs_check_zoned_mode() to check if ZONED flag is enabled on the file system and if the file system consists of zoned devices with equal zone size. Reviewed-by: Josef Bacik Signed-off-by: Johannes Thumshirn Signed-off-by: Damien Le Moal Signed-off-by: Naohiro Aota Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5b316468983dfa9473ff0f1c42e4e30b4c267141 Author: Naohiro Aota Date: Tue Nov 10 20:26:07 2020 +0900 btrfs: get zone information of zoned block devices If a zoned block device is found, get its zone information (number of zones and zone size). To avoid costly run-time zone report commands to test the device zones type during block allocation, attach the seq_zones bitmap to the device structure to indicate if a zone is sequential or accept random writes. Also it attaches the empty_zones bitmap to indicate if a zone is empty or not. This patch also introduces the helper function btrfs_dev_is_sequential() to test if the zone storing a block is a sequential write required zone and btrfs_dev_is_empty_zone() to test if the zone is a empty zone. Reviewed-by: Josef Bacik Reviewed-by: Anand Jain Signed-off-by: Damien Le Moal Signed-off-by: Naohiro Aota Reviewed-by: David Sterba Signed-off-by: David Sterba commit 2d09e6eb4a6f20273959f4905ccf009da8c64c7a Author: Saravana Kannan Date: Fri Nov 20 18:02:32 2020 -0800 driver core: Delete pointless parameter in fwnode_operations.add_links The struct device input to add_links() is not used for anything. So delete it. Acked-by: Rob Herring Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20201121020232.908850-18-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit f9aa460672c9c56896cdc12a521159e3e67000ba Author: Saravana Kannan Date: Fri Nov 20 18:02:31 2020 -0800 driver core: Refactor fw_devlink feature The current implementation of fw_devlink is very inefficient because it tries to get away without creating fwnode links in the name of saving memory usage. Past attempts to optimize runtime at the cost of memory usage were blocked with request for data showing that the optimization made significant improvement for real world scenarios. We have those scenarios now. There have been several reports of boot time increase in the order of seconds in this thread [1]. Several OEMs and SoC manufacturers have also privately reported significant (350-400ms) increase in boot time due to all the parsing done by fw_devlink. So this patch uses all the setup done by the previous patches in this series to refactor fw_devlink to be more efficient. Most of the code has been moved out of firmware specific (DT mostly) code into driver core. This brings the following benefits: - Instead of parsing the device tree multiple times during bootup, fw_devlink parses each fwnode node/property only once and creates fwnode links. The rest of the fw_devlink code then just looks at these fwnode links to do rest of the work. - Makes it much easier to debug probe issue due to fw_devlink in the future. fw_devlink=on blocks the probing of devices if they depend on a device that hasn't been added yet. With this refactor, it'll be very easy to tell what that device is because we now have a reference to the fwnode of the device. - Much easier to add fw_devlink support to ACPI and other firmware types. A refactor to move the common bits from DT specific code to driver core was in my TODO list as a prerequisite to adding ACPI support to fw_devlink. This series gets that done. [1] - https://lore.kernel.org/linux-omap/ea02f57e-871d-cd16-4418-c1da4bbc4696@ti.com/ Tested-by: Laurent Pinchart Tested-by: Grygorii Strashko Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20201121020232.908850-17-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit e82a840cb1c1c83d01a9b81bb63b6cf1c09239d7 Author: Saravana Kannan Date: Fri Nov 20 18:02:30 2020 -0800 efi: Update implementation of add_links() to create fwnode links The semantics of add_links() has changed from creating device link between devices to creating fwnode links between fwnodes. So, update the implementation of add_links() to match the new semantics. Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20201121020232.908850-16-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 8a06d1ea061739dd2e60aff3d64a58892e4031cf Author: Saravana Kannan Date: Fri Nov 20 18:02:29 2020 -0800 of: property: Update implementation of add_links() to create fwnode links The semantics of add_links() has changed from creating device link between devices to creating fwnode links between fwnodes. So, update the implementation of add_links() to match the new semantics. Acked-by: Rob Herring Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20201121020232.908850-15-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 25ac86c6dbe62fba9b97e997fa648cdbe2d40173 Author: Saravana Kannan Date: Fri Nov 20 18:02:28 2020 -0800 driver core: Use device's fwnode to check if it is waiting for suppliers To check if a device is still waiting for its supplier devices to be added, we used to check if the devices is in a global waiting_for_suppliers list. Since the global list will be deleted in subsequent patches, this patch stops using this check. Instead, this patch uses a more device specific check. It checks if the device's fwnode has any fwnode links that haven't been converted to device links yet. Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20201121020232.908850-14-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit c2c724c868c42c5166bf7aa644dd0a0c8d30b47a Author: Saravana Kannan Date: Fri Nov 20 18:02:27 2020 -0800 driver core: Add fw_devlink_parse_fwtree() This function is a wrapper around fwnode_operations.add_links(). This function parses each node in a fwnode tree and create fwnode links for each of those nodes. The information for creating the fwnode links (the supplier and consumer fwnode) is obtained by parsing the properties in each of the fwnodes. This function also ensures that no fwnode is parsed more than once by marking the fwnodes as parsed. Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20201121020232.908850-13-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 04f63c213b671d89db35f4239f57fa1edeb736a8 Author: Saravana Kannan Date: Fri Nov 20 18:02:26 2020 -0800 driver core: Redefine the meaning of fwnode_operations.add_links() Change the meaning of fwnode_operations.add_links() to just create fwnode links by parsing the properties of a given fwnode. This patch doesn't actually make any code changes. To keeps things more digestable, the actual functional changes come in later patches in this series. Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20201121020232.908850-12-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit b5d3e2fbcb10957521af14c4256cd0e5f68b9234 Author: Saravana Kannan Date: Fri Nov 20 18:02:25 2020 -0800 device property: Add fwnode_is_ancestor_of() and fwnode_get_next_parent_dev() Add fwnode_is_ancestor_of() helper function to check if a fwnode is an ancestor of another fwnode. Add fwnode_get_next_parent_dev() helper function that take as input a fwnode and finds the closest ancestor fwnode that has a corresponding struct device and returns that struct device. Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20201121020232.908850-11-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit ac66c5bbb4371073dcace77e47c234d2e36a006b Author: Saravana Kannan Date: Fri Nov 20 18:02:24 2020 -0800 driver core: Allow only unprobed consumers for SYNC_STATE_ONLY device links SYNC_STATE_ONLY device links only affect the behavior of sync_state() callbacks. Specifically, they prevent sync_state() only callbacks from being called on a device if one or more of its consumers haven't probed. So, creating a SYNC_STATE_ONLY device link from an already probed consumer is useless. So, don't allow creating such device links. Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20201121020232.908850-10-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 7b337cb3ebde384cba7405b61dfb84200bf623bf Author: Saravana Kannan Date: Fri Nov 20 18:02:23 2020 -0800 driver core: Add fwnode link support Add support for creating supplier-consumer links between fwnodes. It is intended for internal use the driver core and generic firmware support code (eg. Device Tree, ACPI), so it is simple by design and the API provided is limited. Acked-by: Rob Herring Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20201121020232.908850-9-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 01bb86b380a306bd937c96da36f66429f3362137 Author: Saravana Kannan Date: Fri Nov 20 18:02:22 2020 -0800 driver core: Add fwnode_init() There are multiple locations in the kernel where a struct fwnode_handle is initialized. Add fwnode_init() so that we have one way of initializing a fwnode_handle. Acked-by: Rob Herring Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20201121020232.908850-8-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit c84b90909e475a2eb4934b4d92fdd10e73e75805 Author: Saravana Kannan Date: Fri Nov 20 18:02:21 2020 -0800 Revert "driver core: fw_devlink: Add support for batching fwnode parsing" This reverts commit 716a7a25969003d82ab738179c3f1068a120ed11. The fw_devlink_pause/resume() APIs added by the commit being reverted were a first cut attempt at optimizing boot time. But these APIs don't fully solve the problem and are very fragile (can only be used for the top level devices being added). This series replaces them with a much better optimization that works for all device additions and also has the benefit of reducing the complexity of the firmware (DT, EFI) specific code and abstracting out common code to driver core. Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20201121020232.908850-7-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 087ad763c15477fba4324d7312866946b7f5ed30 Author: Saravana Kannan Date: Fri Nov 20 18:02:20 2020 -0800 Revert "of: platform: Batch fwnode parsing when adding all top level devices" This reverts commit 93d2e4322aa74c1ad1e8c2160608eb9a960d69ff. The fw_devlink_pause/resume() optimization attempt is getting replaced with a much more robust optimization by the end of this series. So, stop using those APIs. Acked-by: Rob Herring Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20201121020232.908850-6-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 999032ece38be271ca28a6c0ba5f2e4dd4012425 Author: Saravana Kannan Date: Fri Nov 20 18:02:19 2020 -0800 Revert "driver core: Remove check in driver_deferred_probe_force_trigger()" This reverts commit fefcfc968723caf93318613a08e1f3ad07a6154f. The reverted commit is fixing commit 716a7a259690 ("driver core: fw_devlink: Add support for batching fwnode parsing"). Since the original commit will be reverted, the fix can be reverted too. Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20201121020232.908850-5-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 96d8a9168ef5539beba9951dffe6eda07b74833e Author: Saravana Kannan Date: Fri Nov 20 18:02:18 2020 -0800 Revert "driver core: Don't do deferred probe in parallel with kernel_init thread" This reverts commit cec72f3efc6272420c2c2c699607f03d09b93e41. Commit cec72f3efc62 ("driver core: Don't do deferred probe in parallel with kernel_init thread") was fixing a commit 716a7a259690 ("driver core: fw_devlink: Add support for batching fwnode parsing"). Since the commit being fixed itself is going to be reverted, the fix can also be reverted. Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20201121020232.908850-4-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 3b052a3e30f2eb92dcae9fd89af48d5a13045737 Author: Saravana Kannan Date: Fri Nov 20 18:02:17 2020 -0800 Revert "driver core: Rename dev_links_info.defer_sync to defer_hook" This reverts commit ec7bd78498f29680f536451fbdf9464e851273ed. This field rename was done to reuse defer_syc list head for multiple lists. That's not needed anymore and this list head will only be used for defer sync. So revert this patch to avoid conflicts with the other reverts coming after this. Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20201121020232.908850-3-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit c95d64012ad7de2747923b0caf80e195e940606c Author: Saravana Kannan Date: Fri Nov 20 18:02:16 2020 -0800 Revert "driver core: Avoid deferred probe due to fw_devlink_pause/resume()" This reverts commit 2451e746478a6a6e981cfa66b62b791ca93b90c8. fw_devlink_pause/resume() was an incomplete attempt at boot time optimization. That's going to get replaced by a much better optimization at the end of the series. Since fw_devlink_pause/resume() is going away, changes made for that can also go away. Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20201121020232.908850-2-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 66482f640755b31cb94371ff6cef17400cda6db5 Author: Takashi Iwai Date: Tue Dec 8 20:03:26 2020 +0100 driver: core: Fix list corruption after device_del() The device_links_purge() function (called from device_del()) tries to remove the links.needs_suppliers list entry, but it's using list_del(), hence it doesn't initialize after the removal. This is OK for normal cases where device_del() is called via device_destroy(). However, it's not guaranteed that the device object will be really deleted soon after device_del(). In a minor case like HD-audio codec reconfiguration that re-initializes the device after device_del(), it may lead to a crash by the corrupted list entry. As a simple fix, replace list_del() with list_del_init() in order to make the list intact after the device_del() call. Fixes: e2ae9bcc4aaa ("driver core: Add support for linking devices during device addition") Cc: Reviewed-by: Rafael J. Wysocki Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20201208190326.27531-1-tiwai@suse.de Cc: Saravana Kannan Signed-off-by: Greg Kroah-Hartman commit d889797530c66f699170233474eab3361471e808 Merge: d45056ad739be 929c1f3384d7e Author: Catalin Marinas Date: Wed Dec 9 18:04:55 2020 +0000 Merge remote-tracking branch 'arm64/for-next/fixes' into for-next/core * arm64/for-next/fixes: (26 commits) arm64: mte: fix prctl(PR_GET_TAGGED_ADDR_CTRL) if TCF0=NONE arm64: mte: Fix typo in macro definition arm64: entry: fix EL1 debug transitions arm64: entry: fix NMI {user, kernel}->kernel transitions arm64: entry: fix non-NMI kernel<->kernel transitions arm64: ptrace: prepare for EL1 irq/rcu tracking arm64: entry: fix non-NMI user<->kernel transitions arm64: entry: move el1 irq/nmi logic to C arm64: entry: prepare ret_to_user for function call arm64: entry: move enter_from_user_mode to entry-common.c arm64: entry: mark entry code as noinstr arm64: mark idle code as noinstr arm64: syscall: exit userspace before unmasking exceptions arm64: pgtable: Ensure dirty bit is preserved across pte_wrprotect() arm64: pgtable: Fix pte_accessible() ACPI/IORT: Fix doc warnings in iort.c arm64/fpsimd: add to to fix fpsimd build arm64: cpu_errata: Apply Erratum 845719 to KRYO2XX Silver arm64: proton-pack: Add KRYO2XX silver CPUs to spectre-v2 safe-list arm64: kpti: Add KRYO2XX gold/silver CPU cores to kpti safelist ... # Conflicts: # arch/arm64/include/asm/exception.h # arch/arm64/kernel/sdei.c commit d45056ad739be9d6a267fe23af9923fe50a0d575 Merge: d8602f8bf3b23 eec3bf6861a87 Author: Catalin Marinas Date: Wed Dec 9 18:04:48 2020 +0000 Merge remote-tracking branch 'arm64/for-next/scs' into for-next/core * arm64/for-next/scs: arm64: sdei: Push IS_ENABLED() checks down to callee functions arm64: scs: use vmapped IRQ and SDEI shadow stacks scs: switch to vmapped shadow stacks commit d8602f8bf3b2329c366dd37fc6adf573ba2c4784 Merge: ba4259a6f87a4 881b0520504a2 Author: Catalin Marinas Date: Wed Dec 9 18:04:48 2020 +0000 Merge remote-tracking branch 'arm64/for-next/perf' into for-next/core * arm64/for-next/perf: perf/imx_ddr: Add system PMU identifier for userspace bindings: perf: imx-ddr: add compatible string arm64: Fix build failure when HARDLOCKUP_DETECTOR_PERF is enabled arm64: Enable perf events based hard lockup detector perf/imx_ddr: Add stop event counters support for i.MX8MP perf/smmuv3: Support sysfs identifier file drivers/perf: hisi: Add identifier sysfs file perf: remove duplicate check on fwnode driver/perf: Add PMU driver for the ARM DMC-620 memory controller commit ba4259a6f87a4d7b5039673569db06b6d8b74cf3 Merge: e0f7a8d5e87f3 344f2db2a18af Author: Catalin Marinas Date: Wed Dec 9 18:04:48 2020 +0000 Merge branch 'for-next/misc' into for-next/core * for-next/misc: : Miscellaneous patches arm64: vmlinux.lds.S: Drop redundant *.init.rodata.* kasan: arm64: set TCR_EL1.TBID1 when enabled arm64: mte: optimize asynchronous tag check fault flag check arm64/mm: add fallback option to allocate virtually contiguous memory arm64/smp: Drop the macro S(x,s) arm64: consistently use reserved_pg_dir arm64: kprobes: Remove redundant kprobe_step_ctx # Conflicts: # arch/arm64/kernel/vmlinux.lds.S commit e0f7a8d5e87f31da15a80fcf038f6296bae26f38 Merge: 3c09ec59cdea5 701f49065e687 Author: Catalin Marinas Date: Wed Dec 9 18:04:42 2020 +0000 Merge branch 'for-next/uaccess' into for-next/core * for-next/uaccess: : uaccess routines clean-up and set_fs() removal arm64: mark __system_matches_cap as __maybe_unused arm64: uaccess: remove vestigal UAO support arm64: uaccess: remove redundant PAN toggling arm64: uaccess: remove addr_limit_user_check() arm64: uaccess: remove set_fs() arm64: uaccess cleanup macro naming arm64: uaccess: split user/kernel routines arm64: uaccess: refactor __{get,put}_user arm64: uaccess: simplify __copy_user_flushcache() arm64: uaccess: rename privileged uaccess routines arm64: sdei: explicitly simulate PAN/UAO entry arm64: sdei: move uaccess logic to arch/arm64/ arm64: head.S: always initialize PSTATE arm64: head.S: cleanup SCTLR_ELx initialization arm64: head.S: rename el2_setup -> init_kernel_el arm64: add C wrappers for SET_PSTATE_*() arm64: ensure ERET from kthread is illegal commit 3c09ec59cdea5b132212d97154d625fd34e436dd Merge: faf000397e7f1 c1090bb10d5e1 e35123d83ee35 fdd99a4103c91 74490422522d1 7919385b9fb3c aed5041ef9a3f dceec3ff78076 1e40d105dae5b Author: Catalin Marinas Date: Wed Dec 9 18:04:35 2020 +0000 Merge branches 'for-next/kvm-build-fix', 'for-next/va-refactor', 'for-next/lto', 'for-next/mem-hotplug', 'for-next/cppc-ffh', 'for-next/pad-image-header', 'for-next/zone-dma-default-32-bit', 'for-next/signal-tag-bits' and 'for-next/cmdline-extended' into for-next/core * for-next/kvm-build-fix: : Fix KVM build issues with 64K pages KVM: arm64: Fix build error in user_mem_abort() * for-next/va-refactor: : VA layout changes arm64: mm: don't assume struct page is always 64 bytes Documentation/arm64: fix RST layout of memory.rst arm64: mm: tidy up top of kernel VA space arm64: mm: make vmemmap region a projection of the linear region arm64: mm: extend linear region for 52-bit VA configurations * for-next/lto: : Upgrade READ_ONCE() to RCpc acquire on arm64 with LTO arm64: lto: Strengthen READ_ONCE() to acquire when CONFIG_LTO=y arm64: alternatives: Remove READ_ONCE() usage during patch operation arm64: cpufeatures: Add capability for LDAPR instruction arm64: alternatives: Split up alternative.h arm64: uaccess: move uao_* alternatives to asm-uaccess.h * for-next/mem-hotplug: : Memory hotplug improvements arm64/mm/hotplug: Ensure early memory sections are all online arm64/mm/hotplug: Enable MEM_OFFLINE event handling arm64/mm/hotplug: Register boot memory hot remove notifier earlier arm64: mm: account for hotplug memory when randomizing the linear region * for-next/cppc-ffh: : Add CPPC FFH support using arm64 AMU counters arm64: abort counter_read_on_cpu() when irqs_disabled() arm64: implement CPPC FFH support using AMUs arm64: split counter validation function arm64: wrap and generalise counter read functions * for-next/pad-image-header: : Pad Image header to 64KB and unmap it arm64: head: tidy up the Image header definition arm64/head: avoid symbol names pointing into first 64 KB of kernel image arm64: omit [_text, _stext) from permanent kernel mapping * for-next/zone-dma-default-32-bit: : Default to 32-bit wide ZONE_DMA (previously reduced to 1GB for RPi4) of: unittest: Fix build on architectures without CONFIG_OF_ADDRESS mm: Remove examples from enum zone_type comment arm64: mm: Set ZONE_DMA size based on early IORT scan arm64: mm: Set ZONE_DMA size based on devicetree's dma-ranges of: unittest: Add test for of_dma_get_max_cpu_address() of/address: Introduce of_dma_get_max_cpu_address() arm64: mm: Move zone_dma_bits initialization into zone_sizes_init() arm64: mm: Move reserve_crashkernel() into mem_init() arm64: Force NO_BLOCK_MAPPINGS if crashkernel reservation is required arm64: Ignore any DMA offsets in the max_zone_phys() calculation * for-next/signal-tag-bits: : Expose the FAR_EL1 tag bits in siginfo arm64: expose FAR_EL1 tag bits in siginfo signal: define the SA_EXPOSE_TAGBITS bit in sa_flags signal: define the SA_UNSUPPORTED bit in sa_flags arch: provide better documentation for the arch-specific SA_* flags signal: clear non-uapi flag bits when passing/returning sa_flags arch: move SA_* definitions to generic headers parisc: start using signal-defs.h parisc: Drop parisc special case for __sighandler_t * for-next/cmdline-extended: : Add support for CONFIG_CMDLINE_EXTENDED arm64: Extend the kernel command line from the bootloader arm64: kaslr: Refactor early init command line parsing commit 0288e7fa35b37fc91c6afec8c420f71d0ade853f Author: Hui Su Date: Fri Nov 13 21:21:43 2020 +0800 fs/kernfs: remove the double check of dentry->inode In both kernfs_node_from_dentry() and in kernfs_dentry_node(), we will check the dentry->inode is NULL or not, which is superfluous. So remove the check in kernfs_node_from_dentry(). Acked-by: Tejun Heo Signed-off-by: Hui Su Link: https://lore.kernel.org/r/20201113132143.GA119541@rlk Signed-off-by: Greg Kroah-Hartman commit 207ddc0ef4f413ab1f4e0c1fcab2226425dec293 Author: Eric Sandeen Date: Tue Dec 8 18:59:12 2020 -0800 xfs: don't catch dax+reflink inodes as corruption in verifier We don't yet support dax on reflinked files, but that is in the works. Further, having the flag set does not automatically mean that the inode is actually "in the CPU direct access state," which depends on several other conditions in addition to the flag being set. As such, we should not catch this as corruption in the verifier - simply not actually enabling S_DAX on reflinked files is enough for now. Fixes: 4f435ebe7d04 ("xfs: don't mix reflink and DAX mode for now") Signed-off-by: Eric Sandeen Reviewed-by: Christoph Hellwig [darrick: fix the scrubber too] Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit a5336d6bb2d02d0e9d4d3c8be04b80b8b68d56c8 Author: Darrick J. Wong Date: Mon Dec 7 10:41:46 2020 -0800 xfs: fix the forward progress assertion in xfs_iwalk_run_callbacks In commit 27c14b5daa82 we started tracking the last inode seen during an inode walk to avoid infinite loops if a corrupt inobt record happens to have a lower ir_startino than the record preceeding it. Unfortunately, the assertion trips over the case where there are completely empty inobt records (which can happen quite easily on 64k page filesystems) because we advance the tracking cursor without actually putting the empty record into the processing buffer. Fix the assert to allow for this case. Reported-by: zlang@redhat.com Fixes: 27c14b5daa82 ("xfs: ensure inobt record walks always make forward progress") Signed-off-by: Darrick J. Wong Reviewed-by: Zorro Lang Reviewed-by: Dave Chinner commit 2e984badbcc0f1cf284441c566ca4309fe59ac05 Author: Joseph Qi Date: Fri Dec 4 13:38:42 2020 -0800 xfs: remove unneeded return value check for *init_cursor() Since *init_cursor() can always return a valid cursor, the NULL check in caller is unneeded. So clean them up. This also keeps the behavior consistent with other callers. Signed-off-by: Joseph Qi Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 7bc1fea9d36c78e783ce7d4ad28ad129ebcce435 Author: Gao Xiang Date: Thu Dec 3 16:42:01 2020 -0800 xfs: introduce xfs_validate_stripe_geometry() Introduce a common helper to consolidate stripe validation process. Also make kernel code xfs_validate_sb_common() use it first. Signed-off-by: Gao Xiang Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 237d7887ae723af7d978e8b9a385fdff416f357b Author: Kaixu Xia Date: Thu Dec 3 16:46:50 2020 -0800 xfs: show the proper user quota options The quota option 'usrquota' should be shown if both the XFS_UQUOTA_ACCT and XFS_UQUOTA_ENFD flags are set. The option 'uqnoenforce' should be shown when only the XFS_UQUOTA_ACCT flag is set. The current code logic seems wrong, Fix it and show proper options. Signed-off-by: Kaixu Xia Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit afbd914776db9c035dbe2afa6badb9955ae52492 Author: Kaixu Xia Date: Thu Dec 3 16:44:19 2020 -0800 xfs: remove the unused XFS_B_FSB_OFFSET macro There are no callers of the XFS_B_FSB_OFFSET macro, so remove it. Signed-off-by: Kaixu Xia Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 88269b880a8ea38cf607e684906f3b00acd5b56b Author: Kaixu Xia Date: Thu Dec 3 16:43:19 2020 -0800 xfs: remove unnecessary null check in xfs_generic_create The function posix_acl_release() test the passed-in argument and move on only when it is non-null, so maybe the null check in xfs_generic_create is unnecessary. Signed-off-by: Kaixu Xia Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit b3b29cd1069c56fbfdd63e650372530f2e26e911 Author: Kaixu Xia Date: Thu Dec 3 16:41:22 2020 -0800 xfs: directly return if the delta equal to zero The xfs_trans_mod_dquot() function will allocate new tp->t_dqinfo if it is NULL and make the changes in the tp->t_dqinfo->dqs[XFS_QM_TRANS _{USR,GRP,PRJ}]. Nowadays seems none of the callers want to join the dquots to the transaction and push them to device when the delta is zero. Actually, most of time the caller would check the delta and go on only when the delta value is not zero, so we should bail out when it is zero. Signed-off-by: Kaixu Xia Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong commit 04a58620a17cb14fa20c6e536e03eb27f9af6bc9 Author: Kaixu Xia Date: Thu Dec 3 16:41:21 2020 -0800 xfs: check tp->t_dqinfo value instead of the XFS_TRANS_DQ_DIRTY flag Nowadays the only things that the XFS_TRANS_DQ_DIRTY flag seems to do are indicates the tp->t_dqinfo->dqs[XFS_QM_TRANS_{USR,GRP,PRJ}] values changed and check in xfs_trans_apply_dquot_deltas() and the unreserve variant xfs_trans_unreserve_and_mod_dquots(). Actually, we also can use the tp->t_dqinfo value instead of the XFS_TRANS_DQ_DIRTY flag, that is to say, we allocate the new tp->t_dqinfo only when the qtrx values changed, so the tp->t_dqinfo value isn't NULL equals the XFS_TRANS_DQ_DIRTY flag is set, we only need to check if tp->t_dqinfo == NULL in xfs_trans_apply_dquot_deltas() and its unreserve variant to determine whether lock all of the dquots and join them to the transaction. Signed-off-by: Kaixu Xia Reviewed-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit a9382fa9a9ffb136bb274cfaefe64b1ac5dbb867 Author: Kaixu Xia Date: Thu Dec 3 16:41:21 2020 -0800 xfs: delete duplicated tp->t_dqinfo null check and allocation The function xfs_trans_mod_dquot_byino() wraps around xfs_trans_mod_dquot() to account for quotas, and also there is the function call chain xfs_trans_reserve_quota_bydquots -> xfs_trans_dqresv -> xfs_trans_mod_dquot, both of them do the duplicated null check and allocation. Thus we can delete the duplicated operation from them. Signed-off-by: Kaixu Xia Reviewed-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 1e5c39dfd3a4630f382581b967c027f4cff7569d Author: Darrick J. Wong Date: Fri Dec 4 15:59:39 2020 -0800 xfs: rename xfs_fc_* back to xfs_fs_* Get rid of this one-off namespace since we're done converting things to fscontext now. Suggested-by: Dave Chinner Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Brian Foster commit 33005fd0a537501111fc97ec330b721388c6b451 Author: Darrick J. Wong Date: Fri Dec 4 13:28:35 2020 -0800 xfs: refactor file range validation Refactor all the open-coded validation of file block ranges into a single helper, and teach the bmap scrubber to check the ranges. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig commit 18695ad4251462b33787b7e375dbda57c1969c8f Author: Darrick J. Wong Date: Fri Dec 4 13:24:22 2020 -0800 xfs: refactor realtime volume extent validation Refactor all the open-coded validation of realtime device extents into a single helper. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster Reviewed-by: Dave Chinner commit 67457eb0d225521a0e81327aef808cd0f9075880 Author: Darrick J. Wong Date: Fri Dec 4 13:20:00 2020 -0800 xfs: refactor data device extent validation Refactor all the open-coded validation of non-static data device extents into a single helper. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Brian Foster commit 4b80ac64450f169bae364df631d233d66070a06e Author: Darrick J. Wong Date: Wed Dec 2 12:25:44 2020 -0800 xfs: scrub should mark a directory corrupt if any entries cannot be iget'd It's possible that xfs_iget can return EINVAL for inodes that the inobt thinks are free, or ENOENT for inodes that look free. If this is the case, mark the directory corrupt immediately when we check ftype. Note that we already check the ftype of the '.' and '..' entries, so we can skip the iget part since we already know the inode type for '.' and we have a separate parent pointer scrubber for '..'. Fixes: a5c46e5e8912 ("xfs: scrub directory metadata") Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit da531cc46ef16301b1bc5bc74acbaacc628904f5 Author: Darrick J. Wong Date: Wed Dec 2 12:25:44 2020 -0800 xfs: fix parent pointer scrubber bailing out on unallocated inodes xfs_iget can return -ENOENT for a file that the inobt thinks is allocated but has zeroed mode. This currently causes scrub to exit with an operational error instead of flagging this as a corruption. The end result is that scrub mistakenly reports the ENOENT to the user instead of "directory parent pointer corrupt" like we do for EINVAL. Fixes: 5927268f5a04 ("xfs: flag inode corruption if parent ptr doesn't get us a real inode") Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit acf104c2331c1ba2a667e65dd36139d1555b1432 Author: Darrick J. Wong Date: Wed Dec 2 12:25:43 2020 -0800 xfs: detect overflows in bmbt records Detect file block mappings with a blockcount that's either so large that integer overflows occur or are zero, because neither are valid in the filesystem. Worse yet, attempting directory modifications causes the iext code to trip over the bmbt key handling and takes the filesystem down. We can fix most of this by preventing the bad metadata from entering the incore structures in the first place. Found by setting blockcount=0 in a directory data fork mapping and watching the fireworks. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 6337032689fa51462d47eb456e5867cb0efa33eb Author: Darrick J. Wong Date: Sun Nov 29 16:33:39 2020 -0800 xfs: trace log intent item recovery failures Add a trace point so that we can capture when a recovered log intent item fails to recover. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Brian Foster commit da5de110296c329461bb7b1caa2d993648db324f Author: Darrick J. Wong Date: Sun Nov 29 16:33:39 2020 -0800 xfs: validate feature support when recovering rmap/refcount intents The rmap, and refcount log intent items were added to support the rmap and reflink features. Because these features come with changes to the ondisk format, the log items aren't tied to a log incompat flag. However, the log recovery routines don't actually check for those feature flags. The kernel has no business replayng an intent item for a feature that isn't enabled, so check that as part of recovered log item validation. (Note that kernels pre-dating rmap and reflink already fail log recovery on the unknown log item type code.) Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit 7396c7fbe07e3c33b578bd9d36e48d42d2acdeb2 Author: Darrick J. Wong Date: Sun Nov 29 16:33:38 2020 -0800 xfs: improve the code that checks recovered extent-free intent items The code that validates recovered extent-free intent items is kind of a mess -- it doesn't use the standard xfs type validators, and it doesn't check for things that it should. Fix the validator function to use the standard validation helpers and look for more types of obvious errors. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Brian Foster commit 3c15df3de0e2bcc4390aa95c60fd12edb7f12bdd Author: Darrick J. Wong Date: Sun Nov 29 16:33:38 2020 -0800 xfs: hoist recovered extent-free intent checks out of xfs_efi_item_recover When we recover a extent-free intent from the log, we need to validate its contents before we try to replay them. Hoist the checking code into a separate function in preparation to refactor this code to use validation helpers. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Brian Foster commit 0d79781a1aa6a6a567e63294012eee2384f406f2 Author: Darrick J. Wong Date: Sun Nov 29 16:33:37 2020 -0800 xfs: improve the code that checks recovered refcount intent items The code that validates recovered refcount intent items is kind of a mess -- it doesn't use the standard xfs type validators, and it doesn't check for things that it should. Fix the validator function to use the standard validation helpers and look for more types of obvious errors. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Brian Foster commit ed64f8343aafa62e762c74dfb400f640b6fa6c15 Author: Darrick J. Wong Date: Sun Nov 29 16:33:37 2020 -0800 xfs: hoist recovered refcount intent checks out of xfs_cui_item_recover When we recover a refcount intent from the log, we need to validate its contents before we try to replay them. Hoist the checking code into a separate function in preparation to refactor this code to use validation helpers. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Brian Foster commit c447ad62dc906f4b5f788e8ff20c1768ab2eab2c Author: Darrick J. Wong Date: Sun Nov 29 16:33:37 2020 -0800 xfs: improve the code that checks recovered rmap intent items The code that validates recovered rmap intent items is kind of a mess -- it doesn't use the standard xfs type validators, and it doesn't check for things that it should. Fix the validator function to use the standard validation helpers and look for more types of obvious errors. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit dda7ba65bf03b6f3a7502b9f85c2524a5ae5aa2e Author: Darrick J. Wong Date: Sun Nov 29 16:33:36 2020 -0800 xfs: hoist recovered rmap intent checks out of xfs_rui_item_recover When we recover a rmap intent from the log, we need to validate its contents before we try to replay them. Hoist the checking code into a separate function in preparation to refactor this code to use validation helpers. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Brian Foster commit 67d8679bd3913d2c4ec5f32ade778881b93af766 Author: Darrick J. Wong Date: Sun Nov 29 16:33:36 2020 -0800 xfs: improve the code that checks recovered bmap intent items The code that validates recovered bmap intent items is kind of a mess -- it doesn't use the standard xfs type validators, and it doesn't check for things that it should. Fix the validator function to use the standard validation helpers and look for more types of obvious errors. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Brian Foster commit bc525cf455dac810d28f9edd379805dc249bc5a9 Author: Darrick J. Wong Date: Sun Nov 29 16:33:35 2020 -0800 xfs: hoist recovered bmap intent checks out of xfs_bui_item_recover When we recover a bmap intent from the log, we need to validate its contents before we try to replay them. Hoist the checking code into a separate function in preparation to refactor this code to use validation helpers. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Brian Foster commit 96f65bad7c31557c28468ba8c1896c7dd7a6bbfa Author: Darrick J. Wong Date: Tue Nov 24 11:45:55 2020 -0800 xfs: enable the needsrepair feature Make it so that libxfs recognizes the needsrepair feature. Note that the kernel will still refuse to mount these. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster Reviewed-by: Eric Sandeen Reviewed-by: Dave Chinner commit 80c720b8eb1c7800133c5ae1686353d33564b773 Author: Darrick J. Wong Date: Tue Nov 24 11:45:55 2020 -0800 xfs: define a new "needrepair" feature Define an incompat feature flag to indicate that the filesystem needs to be repaired. While libxfs will recognize this feature, the kernel will refuse to mount if the feature flag is set, and only xfs_repair will be able to clear the flag. The goal here is to force the admin to run xfs_repair to completion after upgrading the filesystem, or if we otherwise detect anomalies. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster Reviewed-by: Dave Chinner Reviewed-by: Eric Sandeen commit 675fc18900e9c4199ed51342be16b60eeac8c0b1 Author: xiao.ma Date: Tue Dec 1 21:26:10 2020 -1000 dt-bindings: trivial-devices: Add delta,q54sj108a2 Add delta,q54sj108a2 to trivial-devices.yaml. Signed-off-by: xiao.ma Link: https://lore.kernel.org/r/20201202072610.1666-1-max701@126.com Signed-off-by: Rob Herring commit cb5253198f10a4cd79b7523c581e6173c7d49ddb Author: Randy Dunlap Date: Tue Dec 8 14:05:05 2020 -0800 scsi: cxgb4i: Fix TLS dependency SCSI_CXGB4_ISCSI selects CHELSIO_T4. The latter depends on TLS || TLS=n, so since 'select' does not check dependencies of the selected symbol, SCSI_CXGB4_ISCSI should also depend on TLS || TLS=n. This prevents the following kconfig warning and restricts SCSI_CXGB4_ISCSI to 'm' whenever TLS=m. WARNING: unmet direct dependencies detected for CHELSIO_T4 Depends on [m]: NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_CHELSIO [=y] && PCI [=y] && (IPV6 [=y] || IPV6 [=y]=n) && (TLS [=m] || TLS [=m]=n) Selected by [y]: - SCSI_CXGB4_ISCSI [=y] && SCSI_LOWLEVEL [=y] && SCSI [=y] && PCI [=y] && INET [=y] && (IPV6 [=y] || IPV6 [=y]=n) && ETHERNET [=y] Link: https://lore.kernel.org/r/20201208220505.24488-1-rdunlap@infradead.org Fixes: 7b36b6e03b0d ("[SCSI] cxgb4i v5: iscsi driver") Cc: Karen Xie Cc: linux-scsi@vger.kernel.org Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Signed-off-by: Randy Dunlap Signed-off-by: Martin K. Petersen commit 31a5d9cafff163473abf9496318b6a53022d48f7 Author: Stanley Chu Date: Tue Dec 8 21:56:35 2020 +0800 scsi: ufs: Un-inline ufshcd_vops_device_reset function More and more statements are being added to ufshcd_vops_device_reset() and this function is being called from multiple locations in the driver. Un-inline the function to allow the compiler to make better decisions. Link: https://lore.kernel.org/r/20201208135635.15326-3-stanley.chu@mediatek.com Reviewed-by: Bean Huo Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit bd14bf0e4a084514aa62d24d2109e0f09a93822f Author: Stanley Chu Date: Tue Dec 8 21:56:34 2020 +0800 scsi: ufs: Re-enable WriteBooster after device reset UFS 3.1 specification mentions that the WriteBooster flags listed below will be set to their default values, i.e. disabled, after power cycle or any type of reset event. Thus we need to reset the flag variables kept in struct hba to align with the device status and ensure that WriteBooster-related functions are configured properly after device reset. Without this fix, WriteBooster will not be enabled successfully after by ufshcd_wb_ctrl() after device reset because hba->wb_enabled remains true. Flags required to be reset to default values: - fWriteBoosterEn: hba->wb_enabled - fWriteBoosterBufferFlushEn: hba->wb_buf_flush_enabled - fWriteBoosterBufferFlushDuringHibernate: No variable mapped Link: https://lore.kernel.org/r/20201208135635.15326-2-stanley.chu@mediatek.com Fixes: 3d17b9b5ab11 ("scsi: ufs: Add write booster feature support") Reviewed-by: Bean Huo Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit fddd408ad448efc49c67f8dfdc4e86b31c683a0c Author: Marc Zyngier Date: Fri Dec 4 16:47:38 2020 +0000 USB: serial: ftdi_sio: log the CBUS GPIO validity The validity of the ftdi CBUS GPIO is pretty hidden so far, and finding out *why* some GPIOs don't work is sometimes hard to identify. So let's help the user by displaying the map of the CBUS pins that are valid for a GPIO. Suggested-by: Linus Walleij Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201204164739.781812-4-maz@kernel.org Reviewed-by: Andy Shevchenko [johan: demote to KERN_DEBUG, rephrase messages, drop ftx-prog warning] Signed-off-by: Johan Hovold commit 5d47c887cceed5261e82e2cc7e996b877d5381f8 Author: Marc Zyngier Date: Fri Dec 4 16:47:39 2020 +0000 USB: serial: ftdi_sio: drop GPIO line checking dead code Now that gpiolib can track the validity of GPIO pins, there is no need to check whether the line is valid in request(). Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201204164739.781812-5-maz@kernel.org Reviewed-by: Andy Shevchenko [johan: amend commit message] Signed-off-by: Johan Hovold commit 11fb08cffbebcbda76b3d882c19398c7571ab355 Author: Marc Zyngier Date: Fri Dec 4 16:47:37 2020 +0000 USB: serial: ftdi_sio: report the valid GPIO lines to gpiolib Since it is pretty common for only some of the CBUS lines to be valid as GPIO lines, let's report such validity to the rest of the kernel. Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201204164739.781812-3-maz@kernel.org Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Johan Hovold commit 342fbb7578d1741ff646d7b08e14e8753267b9fa Author: Alexandre Belloni Date: Sat Dec 5 01:15:08 2020 +0100 ASoC: add simple-mux Add a driver for simple mux driven by gpios. It currently only supports one gpio, muxing one of two inputs to a single output. Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201205001508.346439-2-alexandre.belloni@bootlin.com Signed-off-by: Mark Brown commit f17a7db22b8ff1688f30bb66aeeaa8cc088e5230 Author: Alexandre Belloni Date: Sat Dec 5 01:15:07 2020 +0100 ASoC: add simple-audio-mux binding Add devicetree documentation for simple audio multiplexers Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201205001508.346439-1-alexandre.belloni@bootlin.com Signed-off-by: Mark Brown commit 5213dc7940e0aa4c094413e015790c4a310ef36c Author: Zhen Lei Date: Wed Dec 9 14:31:44 2020 +0800 scsi: ufs-mediatek: Use correct path to fix compile error When the kernel is compiled with allmodconfig, the following error is reported: In file included from drivers/scsi/ufs/ufs-mediatek-trace.h:36:0, from drivers/scsi/ufs/ufs-mediatek.c:28: ./include/trace/define_trace.h:95:42: fatal error: ./ufs-mediatek-trace.h: No such file or directory #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) The comment in include/trace/define_trace.h specifies that: TRACE_INCLUDE_PATH: Note, the path is relative to define_trace.h, not the file including it. Full path names for out of tree modules must be used. So without "CFLAGS_ufs-mediatek.o := -I$(src)", the current directory "." is "include/trace/", the relative path of ufs-mediatek-trace.h is "../../drivers/scsi/ufs/". Link: https://lore.kernel.org/r/20201209063144.1840-2-thunder.leizhen@huawei.com Fixes: ca1bb061d644 ("scsi: ufs-mediatek: Introduce event_notify implementation") Reviewed-by: Stanley Chu Signed-off-by: Zhen Lei Signed-off-by: Martin K. Petersen commit a05c51e04d2ea9309ee3da0eeaa41852cfb4676f Merge: c87b013f23c6a a508f620b5a6e Author: Arnd Bergmann Date: Wed Dec 9 18:00:06 2020 +0100 Merge tag 'zynq-dt-for-v5.10' of https://github.com/Xilinx/linux-xlnx into arm/dt ARM: dts: zynq: DT changes for v5.11 - Adding support for Zturn-v5 - Small DT changes to clean errors from dt_binding_check * tag 'zynq-dt-for-v5.10' of https://github.com/Xilinx/linux-xlnx: ARM: zynq: Fix incorrect reference to XM013 instead of XM011 ARM: zynq: Convert at25 binding to new description on zc770-xm013 ARM: zynq: Fix OCM mapping to be aligned with binding on zc702 ARM: zynq: Fix leds subnode name for zc702/zybo-z7 ARM: zynq: Rename bus to be align with simple-bus yaml ARM: zynq: Fix compatible string for adi,adxl345 chip ARM: zynq: Add Z-turn board V5 commit 8b3c8035297e71abb9e6d0f50ceab50d33c0d64b Author: Dan Carpenter Date: Wed Dec 9 17:03:11 2020 +0300 scsi: mpt3sas: Signedness bug in _base_get_diag_triggers() The "trigger_flags" variable needs to be signed for the error checking to work. Link: https://lore.kernel.org/r/X9DZH37bYPHwSQRP@mwanda Fixes: aec93e8e2385 ("scsi: mpt3sas: Add persistent trigger pages support") Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen commit 3b25f337929e73232f0aa990cd68a129f53652e2 Author: Stephen Boyd Date: Fri Dec 4 11:35:40 2020 -0800 spi: spi-geni-qcom: Use the new method of gpio CS control Let's set the 'use_gpio_descriptors' field so that we use the new way of requesting the CS GPIOs in the core. This allows us to avoid having to configure the CS pins in "output" mode with an 'output-enable' pinctrl setting. Cc: Akash Asthana Cc: Bjorn Andersson Reviewed-by: Douglas Anderson Cc: Alexandru M Stan Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20201204193540.3047030-4-swboyd@chromium.org Signed-off-by: Mark Brown commit 7a5172b7990d97ab9ef64e6d9063aa68099ea023 Author: Stephen Boyd Date: Fri Dec 4 11:35:39 2020 -0800 platform/chrome: cros_ec_spi: Drop bits_per_word assignment This is already handed by default in spi_setup() if the bits_per_word is 0, so just drop it to shave off a line. Cc: Simon Glass Cc: Gwendal Grignou Reviewed-by: Douglas Anderson Tested-by: Douglas Anderson Acked-by: Enric Balletbo i Serra Cc: Alexandru M Stan Signed-off-by: Stephen Boyd Reviewed-by: Simon Glass Link: https://lore.kernel.org/r/20201204193540.3047030-3-swboyd@chromium.org Signed-off-by: Mark Brown commit 74639cbf51d7c0304342544a83dfda354a6bd208 Author: Stephen Boyd Date: Fri Dec 4 11:35:38 2020 -0800 platform/chrome: cros_ec_spi: Don't overwrite spi::mode There isn't any need to overwrite the mode here in the driver with what has been detected by the firmware, such as DT or ACPI. In fact, if we use the SPI CS gpio descriptor feature we will overwrite the mode with SPI_MODE_0 where it already contains SPI_MODE_0 and more importantly SPI_CS_HIGH. Clearing the SPI_CS_HIGH bit causes the CS line to toggle when the device is probed when it shouldn't change, confusing the driver and making it fail to probe. Drop the assignment and let the spi core take care of it. Fixes: a17d94f0b6e1 ("mfd: Add ChromeOS EC SPI driver") Cc: Simon Glass Cc: Gwendal Grignou Reviewed-by: Douglas Anderson Tested-by: Douglas Anderson Acked-by: Enric Balletbo i Serra Cc: Alexandru M Stan Signed-off-by: Stephen Boyd Reviewed-by: Simon Glass Link: https://lore.kernel.org/r/20201204193540.3047030-2-swboyd@chromium.org Signed-off-by: Mark Brown commit ac6b7bd33ad66fef99579e87bca4af985e3a7715 Author: Kai Vehmanen Date: Wed Dec 9 17:31:02 2020 +0200 ASoC: SOF: Intel: add SoundWire support for ADL-S Expand SOF support for Alder Lake by adding ACPI machine tables for ADL-S systems with SoundWire codecs. Modify kernel config to choose SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE for these platforms. Signed-off-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20201209153102.3028310-2-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 4c8a4cab331d53fad39f3c5823428d8cea92d994 Author: Kai Vehmanen Date: Wed Dec 9 17:31:01 2020 +0200 ASoC: Intel: common: add ACPI matching tables for Alder Lake Initial support for ADL w/ RT711 Signed-off-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20201209153102.3028310-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit c87b013f23c6aa0e244abb8bcbc83ef383827180 Merge: 419fd286274e3 9854bc7dfa5f7 Author: Arnd Bergmann Date: Wed Dec 9 17:51:44 2020 +0100 Merge tag 'zynqmp-dt-for-v5.11' of https://github.com/Xilinx/linux-xlnx into arm/dt arm64: dts: ZynqMP DT changes for v5.11 - Wiring IPI communication channel with firmware driver - Taking GIC to main bus to have only one - Small fix in zynqmp.dtsi reported by dt_binding_check * tag 'zynqmp-dt-for-v5.11' of https://github.com/Xilinx/linux-xlnx: arm64: dts: zynqmp: Wire mailbox with zynqmp-power driver arm64: dts: zynqmp: Fix pcie ranges description arm64: zynqmp: Move gic node to axi bus Link: https://lore.kernel.org/r/f460f6ac-d235-a33b-3d0f-ca904a43e687@monstr.eu Signed-off-by: Arnd Bergmann commit 419fd286274e32c2533f1305d76b04b32ae49853 Merge: 5919eec0f0921 2ba56f464f0c1 Author: Arnd Bergmann Date: Wed Dec 9 17:48:20 2020 +0100 Merge tag 'aspeed-5.11-devicetree' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed into arm/dt ASPEED device tree updates for 5.11 - New machines * Bytedance G220A, an AST2500 BMC for an x86 server * Facebook Galaxy100, an AST2400 BMC for a network switch * IBM Rainier 4U, an AST2600 BMC for a PowerPC server - Reworking of Facebook device trees to use common dtsi - A 64MB flash layout used by the G220A - Misc updates to tiogapass, ethanolx, s2600wf, tacoma and rainier * tag 'aspeed-5.11-devicetree' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed: (25 commits) ARM: dts: aspeed: ast2600evb: Add MAC0 ARM: dts: aspeed: rainier: Don't shout addresses ARM: dts: aspeed: rainier: Mark FSI SPI controllers as restricted ARM: dts: tacoma: Add reserved memory for ramoops ARM: dts: rainier: Add reserved memory for ramoops ARM: dts: tacoma: Fix node vs reg mismatch for flash memory ARM: dts: aspeed: rainier: Add 4U device-tree arm: dts: aspeed: tiogapass: Enable second MAC ARM: dts: aspeed: minipack: Fixup I2C tree ARM: dts: aspeed: wedge400: Fix FMC flash0 layout ARM: dts: aspeed: Add Facebook Galaxy100 (AST2400) BMC ARM: dts: aspeed: wedge100: Use common dtsi ARM: dts: aspeed: wedge40: Use common dtsi ARM: dts: aspeed: Common dtsi for Facebook AST2400 Network BMCs ARM: dts: aspeed: amd-ethanolx: Add GPIO line names ARM: dts: aspeed: amd-ethanolx: Enable devices for the iKVM functionality ARM: dts: aspeed: amd-ethanolx: Enable KCS channel 3 ARM: dts: aspeed: tiogapass: Remove vuart ARM: dts: Fix label address for 64MiB OpenBMC flash layout ARM: dts: aspeed: g220a: Add some gpios ... Link: https://lore.kernel.org/r/CACPK8Xfd7AmuEaUdFfYLu4ktcrpTnYUgwQSxUbC-McB02hvo_g@mail.gmail.com Signed-off-by: Arnd Bergmann commit 5919eec0f09214901b09faeaf6341addebc57a89 Author: Daniel Palmer Date: Tue Dec 1 22:43:30 2020 +0900 ARM: mstar: SMP support This patch adds SMP support for MStar/Sigmastar chips that have a second core like those in the infinity2m family. So far only single and dual core chips have been found so this does the bare minimum to boot the second core. From what I can tell not having the "holding pen" code to handle multiple cores is fine if there is only one core the will get booted. This might need to be reconsidered if chips with more cores turn up. Signed-off-by: Daniel Palmer Link: https://lore.kernel.org/r/20201201134330.3037007-11-daniel@0x0f.com' Signed-off-by: Arnd Bergmann commit ecaafac1eb73de8209680ec030769a2def4801e5 Author: Daniel Palmer Date: Tue Dec 1 22:43:29 2020 +0900 ARM: mstar: Wire up smpctrl for SSD201/SSD202D Add the specific compat string for the smpctrl registers to the SSD201/SSD202D common dtsi. Signed-off-by: Daniel Palmer Link: https://lore.kernel.org/r/20201201134330.3037007-10-daniel@0x0f.com' Signed-off-by: Arnd Bergmann commit 570e471ce0540165aed5bc638e462de7c1110a28 Author: Daniel Palmer Date: Tue Dec 1 22:43:28 2020 +0900 ARM: mstar: Add smp ctrl registers to infinity2m dtsi Add the smpctrl registers to the infinity2m dtsi so that the second CPU can be enabled on chips in this family. Signed-off-by: Daniel Palmer Link: https://lore.kernel.org/r/20201201134330.3037007-9-daniel@0x0f.com' Signed-off-by: Arnd Bergmann commit 418cb58b45661724ba145bd769e53910ad9324b0 Author: Daniel Palmer Date: Tue Dec 1 22:43:27 2020 +0900 ARM: mstar: Add dts for Honestar ssd201htv2 Add a dts for the Honestar ssd201htv2 devkit. This is for the board populated with a SSD202D. Signed-off-by: Daniel Palmer Link: https://lore.kernel.org/r/20201201134330.3037007-8-daniel@0x0f.com' Signed-off-by: Arnd Bergmann commit dbbaf35d589e554d5956780282feb5d62d7f2af6 Author: Daniel Palmer Date: Tue Dec 1 22:43:26 2020 +0900 ARM: mstar: Add chip level dtsi for SSD202D Add a chip level dtsi for the SigmaStar SSD202D Signed-off-by: Daniel Palmer Link: https://lore.kernel.org/r/20201201134330.3037007-7-daniel@0x0f.com' Signed-off-by: Arnd Bergmann commit 572ef97bc7341b45c721d79f98262c4adb25919c Author: Daniel Palmer Date: Tue Dec 1 22:43:25 2020 +0900 ARM: mstar: Add common dtsi for SSD201/SSD202D The SSD201 and SSD202D are basically the same chip with a different DDR die packaged (64MB DDR2 or 128MB DDR3). This patch adds a shared dtsi for the common parts of these chips like gpio, pinctrl etc. Signed-off-by: Daniel Palmer Link: https://lore.kernel.org/r/20201201134330.3037007-6-daniel@0x0f.com' Signed-off-by: Arnd Bergmann commit ba2290b1b7505b28912092a0976e071a447ee18c Author: Daniel Palmer Date: Tue Dec 1 22:43:24 2020 +0900 ARM: mstar: Add infinity2m support The infinity2m series of chips are like the other Mstar/Sigmastar chips in that they have a Cortex A7 system with DDR memory integrated in a single package. The infinity2m chips are intended for recording the incoming streams from IP cameras. So instead of video encoders they have video decoders, instead of a camera interface they have display hardware and so on. Aside from the above points the big difference about these chips is that they include a second Cortex A7 core. Signed-off-by: Daniel Palmer Link: https://lore.kernel.org/r/20201201134330.3037007-5-daniel@0x0f.com' Signed-off-by: Arnd Bergmann commit 8c50a8b359c4f262a05ed5fb05373177d11bd20c Author: Daniel Palmer Date: Tue Dec 1 22:43:23 2020 +0900 dt-bindings: mstar: Add Honestar SSD201_HT_V2 to mstar boards The Honestar SSD201_HT_V2 is a full size devkit for the SigmaStar SSD201 or SSD202D (they are pin compatible). Currently only the SSD202D version is supported as that's the one I have. Signed-off-by: Daniel Palmer Reviewed-by: Rob Herring Link: https://linux-chenxing.org/infinity2/ssd201_ht_v2/ Link: https://lore.kernel.org/r/20201201134330.3037007-4-daniel@0x0f.com' Signed-off-by: Arnd Bergmann commit 43181b5d8072dd92513dca995789a1a1123ffc8a Author: Daniel Palmer Date: Tue Dec 1 22:43:22 2020 +0900 dt-bindings: vendor-prefixes: Add honestar vendor prefix Add prefix for Honestar Technologies Co., Ltd. Signed-off-by: Daniel Palmer Link: https://lore.kernel.org/r/20201201134330.3037007-3-daniel@0x0f.com' Signed-off-by: Arnd Bergmann commit 80e73332ee829cd55d86272b7d3d4d5f0fc4c4ff Author: Daniel Palmer Date: Tue Dec 1 22:43:21 2020 +0900 dt-bindings: mstar: Add binding details for mstar,smpctrl This adds a YAML description of the smpctrl node needed by the platform code for the MStar/SigmaStar Armv7 SoCs to boot secondary cpus. Signed-off-by: Daniel Palmer Link: https://lore.kernel.org/r/20201201134330.3037007-2-daniel@0x0f.com' Signed-off-by: Arnd Bergmann commit 5b8a05b9e8d10c8df29bb719e73ea8ed916a1eea Author: Daniel Palmer Date: Sun Nov 29 20:08:02 2020 +0900 ARM: mstar: Fill in GPIO controller properties for infinity Fill in the properties needed to use the GPIO controller in the infinity and infinity3 chips. Signed-off-by: Daniel Palmer Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20201129110803.2461700-6-daniel@0x0f.com' Signed-off-by: Arnd Bergmann commit 74530d645126c2934b16db135edaef16eff9e35b Author: Daniel Palmer Date: Sun Nov 29 20:08:01 2020 +0900 ARM: mstar: Add gpio controller to MStar base dtsi The GPIO controller is at the same address in all of the currently known chips so create a node for it in the base dtsi. Some extra properties are needed to actually use it so disable it by default. Signed-off-by: Daniel Palmer Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20201129110803.2461700-5-daniel@0x0f.com' Signed-off-by: Arnd Bergmann commit 52abca64fd9410ea6c9a3a74eab25663b403d7da Author: Alan Stern Date: Tue Dec 8 21:29:51 2020 -0800 scsi: block: Do not accept any requests while suspended blk_queue_enter() accepts BLK_MQ_REQ_PM requests independent of the runtime power management state. Now that SCSI domain validation no longer depends on this behavior, modify the behavior of blk_queue_enter() as follows: - Do not accept any requests while suspended. - Only process power management requests while suspending or resuming. Submitting BLK_MQ_REQ_PM requests to a device that is runtime suspended causes runtime-suspended devices not to resume as they should. The request which should cause a runtime resume instead gets issued directly, without resuming the device first. Of course the device can't handle it properly, the I/O fails, and the device remains suspended. The problem is fixed by checking that the queue's runtime-PM status isn't RPM_SUSPENDED before allowing a request to be issued, and queuing a runtime-resume request if it is. In particular, the inline blk_pm_request_resume() routine is renamed blk_pm_resume_queue() and the code is unified by merging the surrounding checks into the routine. If the queue isn't set up for runtime PM, or there currently is no restriction on allowed requests, the request is allowed. Likewise if the BLK_MQ_REQ_PM flag is set and the status isn't RPM_SUSPENDED. Otherwise a runtime resume is queued and the request is blocked until conditions are more suitable. [ bvanassche: modified commit message and removed Cc: stable because without the previous patches from this series this patch would break parallel SCSI domain validation + introduced queue_rpm_status() ] Link: https://lore.kernel.org/r/20201209052951.16136-9-bvanassche@acm.org Cc: Jens Axboe Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Can Guo Cc: Stanley Chu Cc: Ming Lei Cc: Rafael J. Wysocki Reported-and-tested-by: Martin Kepplinger Reviewed-by: Hannes Reinecke Reviewed-by: Can Guo Signed-off-by: Alan Stern Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit a4d34da715e3cb7e0741fe603dcd511bed067e00 Author: Bart Van Assche Date: Tue Dec 8 21:29:50 2020 -0800 scsi: block: Remove RQF_PREEMPT and BLK_MQ_REQ_PREEMPT Remove flag RQF_PREEMPT and BLK_MQ_REQ_PREEMPT since these are no longer used by any kernel code. Link: https://lore.kernel.org/r/20201209052951.16136-8-bvanassche@acm.org Cc: Can Guo Cc: Stanley Chu Cc: Alan Stern Cc: Ming Lei Cc: Rafael J. Wysocki Cc: Martin Kepplinger Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Jens Axboe Reviewed-by: Can Guo Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit e6044f714b256259df9611ff49af433e5411c5c8 Author: Bart Van Assche Date: Tue Dec 8 21:29:49 2020 -0800 scsi: core: Only process PM requests if rpm_status != RPM_ACTIVE Instead of submitting all SCSI commands submitted with scsi_execute() to a SCSI device if rpm_status != RPM_ACTIVE, only submit RQF_PM (power management requests) if rpm_status != RPM_ACTIVE. This patch makes the SCSI core handle the runtime power management status (rpm_status) as it should be handled. Link: https://lore.kernel.org/r/20201209052951.16136-7-bvanassche@acm.org Cc: Can Guo Cc: Stanley Chu Cc: Alan Stern Cc: Ming Lei Cc: Rafael J. Wysocki Cc: Martin Kepplinger Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Jens Axboe Reviewed-by: Can Guo Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit cfefd9f8240a7b9fdd96fcd54cb029870b6d8d88 Author: Bart Van Assche Date: Tue Dec 8 21:29:48 2020 -0800 scsi: scsi_transport_spi: Set RQF_PM for domain validation commands Disable runtime power management during domain validation. Since a later patch removes RQF_PREEMPT, set RQF_PM for domain validation commands such that these are executed in the quiesced SCSI device state. Link: https://lore.kernel.org/r/20201209052951.16136-6-bvanassche@acm.org Cc: Alan Stern Cc: James Bottomley Cc: Woody Suwalski Cc: Can Guo Cc: Stanley Chu Cc: Ming Lei Cc: Rafael J. Wysocki Cc: Stan Johnson Reviewed-by: Christoph Hellwig Reviewed-by: Jens Axboe Reviewed-by: Hannes Reinecke Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 5ae65383fc7633e0247c31b0c8bf0e6ea63b95a3 Author: Bart Van Assche Date: Tue Dec 8 21:29:47 2020 -0800 scsi: ide: Mark power management requests with RQF_PM instead of RQF_PREEMPT This is another step that prepares for the removal of RQF_PREEMPT. Link: https://lore.kernel.org/r/20201209052951.16136-5-bvanassche@acm.org Cc: David S. Miller Cc: Alan Stern Cc: Can Guo Cc: Stanley Chu Cc: Ming Lei Cc: Rafael J. Wysocki Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Jens Axboe Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 96d86e6a80a3ab9aff81d12f9f1f2a0da2917d38 Author: Bart Van Assche Date: Tue Dec 8 21:29:46 2020 -0800 scsi: ide: Do not set the RQF_PREEMPT flag for sense requests RQF_PREEMPT is used for two different purposes in the legacy IDE code: 1. To mark power management requests. 2. To mark requests that should preempt another request. An (old) explanation of that feature is as follows: "The IDE driver in the Linux kernel normally uses a series of busywait delays during its initialization. When the driver executes these busywaits, the kernel does nothing for the duration of the wait. The time spent in these waits could be used for other initialization activities, if they could be run concurrently with these waits. More specifically, busywait-style delays such as udelay() in module init functions inhibit kernel preemption because the Big Kernel Lock is held, while yielding APIs such as schedule_timeout() allow preemption. This is true because the kernel handles the BKL specially and releases and reacquires it across reschedules allowed by the current thread. This IDE-preempt specification requires that the driver eliminate these busywaits and replace them with a mechanism that allows other work to proceed while the IDE driver is initializing." Since I haven't found an implementation of (2), do not set the PREEMPT flag for sense requests. This patch causes sense requests to be postponed while a drive is suspended instead of being submitted to ide_queue_rq(). If it would ever be necessary to restore the IDE PREEMPT functionality, that can be done by introducing a new flag in struct ide_request. Link: https://lore.kernel.org/r/20201209052951.16136-4-bvanassche@acm.org Cc: David S. Miller Cc: Alan Stern Cc: Can Guo Cc: Stanley Chu Cc: Ming Lei Cc: Rafael J. Wysocki Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Jens Axboe Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 0854bcdcdec26aecdc92c303816f349ee1fba2bc Author: Bart Van Assche Date: Tue Dec 8 21:29:45 2020 -0800 scsi: block: Introduce BLK_MQ_REQ_PM Introduce the BLK_MQ_REQ_PM flag. This flag makes the request allocation functions set RQF_PM. This is the first step towards removing BLK_MQ_REQ_PREEMPT. Link: https://lore.kernel.org/r/20201209052951.16136-3-bvanassche@acm.org Cc: Alan Stern Cc: Stanley Chu Cc: Ming Lei Cc: Rafael J. Wysocki Cc: Can Guo Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Jens Axboe Reviewed-by: Can Guo Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit fa4d0f1992a96f6d7c988ef423e3127e613f6ac9 Author: Bart Van Assche Date: Tue Dec 8 21:29:44 2020 -0800 scsi: block: Fix a race in the runtime power management code With the current implementation the following race can happen: * blk_pre_runtime_suspend() calls blk_freeze_queue_start() and blk_mq_unfreeze_queue(). * blk_queue_enter() calls blk_queue_pm_only() and that function returns true. * blk_queue_enter() calls blk_pm_request_resume() and that function does not call pm_request_resume() because the queue runtime status is RPM_ACTIVE. * blk_pre_runtime_suspend() changes the queue status into RPM_SUSPENDING. Fix this race by changing the queue runtime status into RPM_SUSPENDING before switching q_usage_counter to atomic mode. Link: https://lore.kernel.org/r/20201209052951.16136-2-bvanassche@acm.org Fixes: 986d413b7c15 ("blk-mq: Enable support for runtime power management") Cc: Ming Lei Cc: Rafael J. Wysocki Cc: stable Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Jens Axboe Acked-by: Alan Stern Acked-by: Stanley Chu Co-developed-by: Can Guo Signed-off-by: Can Guo Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit dcb11100cd5d3f5a191b7fba75422e3df792f3ff Author: Kevin Hilman Date: Mon Dec 7 15:01:56 2020 -0800 arm64: Kconfig: meson: drop pinctrl Don't automatically select pinctrl drivers, leave it up to defaults in drivers/pinctrl/meson, which default to built-in, but are also now optionally configurable as modules as of commit 9c65441ec823 ("pinctrl/meson: enable building as modules") Signed-off-by: Kevin Hilman Reviewed-by: Jerome Brunet Link: https://lore.kernel.org/r/20201207230156.10198-1-khilman@baylibre.com' Signed-off-by: Arnd Bergmann commit dd78bdb6f810bdcb173b42379af558c676c8e0aa Author: Adrian Hunter Date: Mon Dec 7 10:31:20 2020 +0200 scsi: ufs-pci: Enable UFSHCD_CAP_RPM_AUTOSUSPEND for Intel controllers Enable runtime PM auto-suspend by default for Intel host controllers. Link: https://lore.kernel.org/r/20201207083120.26732-5-adrian.hunter@intel.com Signed-off-by: Adrian Hunter Signed-off-by: Martin K. Petersen commit 044d5bda7117891d6d0d56f2f807b7b11e120abd Author: Adrian Hunter Date: Mon Dec 7 10:31:19 2020 +0200 scsi: ufs-pci: Fix recovery from hibernate exit errors for Intel controllers Intel controllers can end up in an unrecoverable state after a hibernate exit error unless a full reset and restore is done before anything else. Force that to happen. Link: https://lore.kernel.org/r/20201207083120.26732-4-adrian.hunter@intel.com Signed-off-by: Adrian Hunter Signed-off-by: Martin K. Petersen commit af423534d2de86cd0db729a5ac41f056ca8717de Author: Adrian Hunter Date: Mon Dec 7 10:31:18 2020 +0200 scsi: ufs-pci: Ensure UFS device is in PowerDown mode for suspend-to-disk ->poweroff() The expectation for suspend-to-disk is that devices will be powered-off, so the UFS device should be put in PowerDown mode. If spm_lvl is not 5, then that will not happen. Change the pm callbacks to force spm_lvl 5 for suspend-to-disk poweroff. Link: https://lore.kernel.org/r/20201207083120.26732-3-adrian.hunter@intel.com Signed-off-by: Adrian Hunter Signed-off-by: Martin K. Petersen commit c763729a10e538d997744317cf4a1c4f25266066 Author: Adrian Hunter Date: Mon Dec 7 10:31:17 2020 +0200 scsi: ufs-pci: Fix restore from S4 for Intel controllers Currently, ufshcd-pci is the only UFS driver with support for suspend-to-disk PM callbacks (i.e. freeze/thaw/restore/poweroff). These callbacks are set by the macro SET_SYSTEM_SLEEP_PM_OPS to the same functions as system suspend/resume. That will work with spm_lvl 5 because spm_lvl 5 will result in a full restore for the ->restore() callback. In the absence of a full restore, the host controller registers will have values set up by the restore kernel (the kernel that boots and loads the restore image) which are not necessarily the same. However it turns out, the only registers that sometimes need restore are the base address registers. This has gone un-noticed because, depending on IOMMU settings, the kernel can end up allocating the same addresses every time. For Intel controllers, an spm_lvl other than 5 can be used, so to support S4 (suspend-to-disk) with spm_lvl other than 5, restore the base address registers. Link: https://lore.kernel.org/r/20201207083120.26732-2-adrian.hunter@intel.com Signed-off-by: Adrian Hunter Signed-off-by: Martin K. Petersen commit b3f3d31a528f78d9903253a23a5e5c6bf5280f40 Author: Stanley Chu Date: Mon Dec 7 13:49:55 2020 +0800 scsi: ufs-mediatek: Keep VCC always-on for specific devices For some devices which need extra delay after VCC power down, VCC shall be kept always-on in some MediaTek UFS platforms to ensure the stability of such devices because the extra delay may not be enough in those platforms. Link: https://lore.kernel.org/r/20201207054955.24366-3-stanley.chu@mediatek.com Reviewed-by: Andy Teng Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit be1b500212541a70006887bae558ff834d7365d0 Author: Suganath Prabu S Date: Thu Nov 26 15:13:11 2020 +0530 scsi: mpt3sas: Update driver version to 36.100.00.00 Update driver version to 36.100.00.00 Link: https://lore.kernel.org/r/20201126094311.8686-9-suganath-prabu.subramani@broadcom.com Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen commit f8162ac70ecf5a3ed638f96dc10e0e19b523ec7f Author: Stanley Chu Date: Mon Dec 7 13:49:54 2020 +0800 scsi: ufs: Allow regulators being always-on Introduce a flag "always_on" in struct ufs_vreg to allow vendors to keep the regulator always-on. Link: https://lore.kernel.org/r/20201207054955.24366-2-stanley.chu@mediatek.com Reviewed-by: Andy Teng Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 9b271c69128b46e2735df732819c5a5b1f4252af Author: Suganath Prabu S Date: Thu Nov 26 15:13:10 2020 +0530 scsi: mpt3sas: Handle trigger page after firmware update If a firmware update adds support for the trigger pages, then the driver should handle this by writing the existing trigger data from the driver's internal data structure to the corresponding trigger pages in NVRAM. Also handle the case where the trigger page capability is no longer present after a firmware downgrade. Link: https://lore.kernel.org/r/20201126094311.8686-8-suganath-prabu.subramani@broadcom.com Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen commit 1918651f2d7e8d58c9b7c49755c61e41ed655009 Author: Randall Huang Date: Mon Nov 30 20:14:02 2020 -0800 scsi: ufs: Clear UAC for RPMB after ufshcd resets If RPMB is not provisioned, we may see RPMB failure after UFS suspend/resume. Inject request_sense to clear uac in ufshcd reset flow. Link: https://lore.kernel.org/r/20201201041402.3860525-1-jaegeuk@kernel.org Reported-by: kernel test robot Reviewed-by: Stanley Chu Signed-off-by: Randall Huang Signed-off-by: Leo Liou Signed-off-by: Jaegeuk Kim Signed-off-by: Martin K. Petersen commit 0e17a87c5950b91aa5ed11ba569b46dea13b1e0d Author: Suganath Prabu S Date: Thu Nov 26 15:13:09 2020 +0530 scsi: mpt3sas: Add persistent MPI trigger page This page is used to store information about MPI (IOC Status & LogInfo) triggers. Driver Persistent Trigger Page-4 format: ------------------------------------------------------- | 31 24 23 16 15 8 7 0| Byte ------------------------------------------------------- | PageType | PageNumber | Reserved | PageVersion | 0x00 -------------------------------------------------------- | Reserved | ExtPageType | ExtPageLength | 0x04 -------------------------------------------------------- | Reserved | NumMpiTriggerEntries | 0x08 -------------------------------------------------------- | MPITriggerEntry[0] | 0x0C -------------------------------------------------------- | … | -------------------------------------------------------- | MPITriggerEntry[19] | 0xA4 -------------------------------------------------------- NumMpiTriggerEntries: This field indicates number of MPI (IOC Status & LogInfo) trigger entries stored in this page. Currently driver is supporting a maximum of 20-MPI trigger entries. MPITriggerEntry: ----------------------------------------------------- | 31 16 15 0 | ----------------------------------------------------- | Reserved | IOCStatus | ----------------------------------------------------- | IOCLogInfo | ----------------------------------------------------- IOCStatus => Status value from the IOC IOCLogInfo => Specific value that supplements the IOCStatus. Link: https://lore.kernel.org/r/20201126094311.8686-7-suganath-prabu.subramani@broadcom.com Reported-by: kernel test robot Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen commit 1fa0570002e3f66db9b58c32c60de4183b857a19 Author: Bean Huo Date: Mon Dec 7 20:01:37 2020 +0100 scsi: ufs: Fix wrong print message in dev_err() Change dev_err() print message from "dme-reset" to "dme_enable" in function ufshcd_dme_enable(). Link: https://lore.kernel.org/r/20201207190137.6858-3-huobean@gmail.com Acked-by: Alim Akhtar Acked-by: Avri Altman Signed-off-by: Bean Huo Signed-off-by: Martin K. Petersen commit 2a5c3a35c156efc9991dd3b9e46b1cc2653baa63 Author: Suganath Prabu S Date: Thu Nov 26 15:13:08 2020 +0530 scsi: mpt3sas: Add persistent SCSI sense trigger page Trigger Page3 is used to store information about SCSI Sense triggers: Persistent Trigger Page-3 ------------------------------------------------------------------ | 31 24 23 16 15 8 7 0| Byte ------------------------------------------------------------------ | PageType | PageNumber | Reserved | PageVersion | 0x00 ------------------------------------------------------------------ | Reserved | ExtPageType | ExtPageLen | 0x04 ------------------------------------------------------------------ | Reserved | NumScsiSense | TriggerEntries | 0x08 ------------------------------------------------------------------ | ScsiSenseTriggerEntry[0] | 0x0C ------------------------------------------------------------------ | … … | ------------------------------------------------------------------ | ScsiSenseTriggerEntry[19] | 0x58 ------------------------------------------------------------------ NumScsiSenseTriggerEntries: This field indicates number of SCSI Sense trigger entries stored in this page. Currently driver is supporting a maximum of 20-SCSI Sense trigger entries. ScsiSenseTriggerEntry: ----------------------------------------------- | 31 24 23 16 15 8 7 0 | ----------------------------------------------- | Reserved | SenseKey | ASC | ASCQ | ----------------------------------------------- ASCQ => Additional Sense Code Qualifier ASC => Additional Sense Code SenseKey => Sense Key values ASCQ => Additional Sense Code Qualifier ASC => Additional Sense Code SenseKey => Sense Key values Link: https://lore.kernel.org/r/20201126094311.8686-6-suganath-prabu.subramani@broadcom.com Reported-by: kernel test robot Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen commit 44fd9fb599d3d2be4c6838f4b11eaa459bb33989 Author: Bean Huo Date: Mon Dec 7 20:01:36 2020 +0100 scsi: ufs: Remove unused macro definition POWER_DESC_MAX_SIZE POWER_DESC_MAX_SIZE is unused, remove it. Link: https://lore.kernel.org/r/20201207190137.6858-2-huobean@gmail.com Acked-by: Avri Altman Acked-by: Alim Akhtar Signed-off-by: Bean Huo Signed-off-by: Martin K. Petersen commit 71b3fb8fe6dd6e8e8c296653e45ed6f1817e6dfc Author: Suganath Prabu S Date: Thu Nov 26 15:13:07 2020 +0530 scsi: mpt3sas: Add persistent Event trigger page Trigger Page2 is used to store information about Event triggers: 31 24 23 16 15 8 7 0 Byte ----------------------------------------------- |PageType |PageNumber |Reserved |PageVersion| 0x00 ----------------------------------------------- |Reserved |ExtPageType | ExtPageLength | 0x04 ----------------------------------------------- | Reserved | NumMPIEventTriggers | 0x08 ----------------------------------------------- | MPIEventTriggerEntries | 0x0C | | 0xFC ----------------------------------------------- Number of MPI Event Trigger Entries currently stored in this page. If this is set to zero, there are no valid MPI-Event-Trigger entries available in this page. MPIEventTriggerEntry: - MPIEventCode [15:00] MPI Event code specified in MPI-Spec - MPIEventCodeSpecific [16:31] For Event Code “MPI2_EVENT_LOG_ENTRY_ADDED (0x0021)”, this field specifies the Log-Entry-Qualifier. For all other Event Codes, this field is reserved and not used Maximum of 20-event trigger entries can be stored in this page. Link: https://lore.kernel.org/r/20201126094311.8686-5-suganath-prabu.subramani@broadcom.com Reported-by: kernel test robot Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen commit bb855f2a5d7eb8f270eb30fda9b2b87cd682212c Author: Suganath Prabu S Date: Thu Nov 26 15:13:06 2020 +0530 scsi: mpt3sas: Add persistent Master trigger page Trigger Page 1 is used to store information about Master triggers. Below are the Master trigger conditions: Bit[3] Trigger condition for Device Removal event Bit[2] Trigger condition for TM command issued by driver Bit[1] Trigger condition for Adapter reset issued by driver Bit[0] Trigger condition for IOC Fault state During driver load, if Master trigger type bit is enabled in the Persistent Trigger Page0, then read the Persistent Trigger Page1 and update the IOC instance's diag_trigger_master.MasterData with Persistent Trigger Page1's MasterTriggerFlags. Link: https://lore.kernel.org/r/20201126094311.8686-4-suganath-prabu.subramani@broadcom.com Reported-by: kernel test robot Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen commit aec93e8e238512689885c20c1af6e67747850341 Author: Suganath Prabu S Date: Thu Nov 26 15:13:05 2020 +0530 scsi: mpt3sas: Add persistent trigger pages support The user can set trigger values in order to collect the IOC's host trace buffer automatically upon detecting certain conditions. However, the trigger values that the user sets are not persistent across system reboot or reload of the driver. In order to make the user trigger settings persistent, these trigger values need to be saved in the IOC's NVRAM pages: - Driver Persistent Trigger Page 0: This page is used to store list of trigger types that are enabled - Driver Persistent Trigger Page 1: This page stores the list of Master triggers that are enabled - Driver Persistent Trigger Page 2: This page stores the list of MPI Event Triggers that are enabled - Driver Persistent Trigger Page 3: This page stores the list of SCSI Sense Triggers that are enabled - Driver Persistent Trigger Page 4: This page stores the list of IOCStatus-LogInfo Triggers that are enabled. Whenever user configures triggers, the driver persists the values in the corresponding trigger pages. When the driver is subsequently reloaded, the driver reads the values from the trigger pages and configures the triggers accordingly. During firmware upload operation, if the newer firmware supports the trigger page feature, then driver persists the configured diag trigger values to NVRAM. Link: https://lore.kernel.org/r/20201126094311.8686-3-suganath-prabu.subramani@broadcom.com Reported-by: kernel test robot Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen commit f98790c0037590cd7022ba9e22cf4ff90d3b2bb3 Author: Suganath Prabu S Date: Thu Nov 26 15:13:04 2020 +0530 scsi: mpt3sas: Sync time periodically between driver and firmware The controller time currently gets updated with host time during driver load or when a controller reset is issued. I.e. when host issues the IOCInit request message to the HBA firmware. This IOCInit message has a field named 'TimeStamp' with which the host updates the controller time. Sometimes controller time drifts with respect to the host and it is difficult to correlate host logs with controller logs. Issuing a controller reset to sync the time would impact in-flight I/O and is not a viable option. Instead the driver now sends an IO_UNIT_CONTROL Request to sync the time periodically. This is done from the watchdog thread which gets invoked every second. The time synchronization interval is specified in the 'TimeSyncInterval' field in Manufacturing Page11 by the controller: TimeSyncInterval - 8 bits bits 0-6: Time stamp Synchronization interval value bit 7: Time stamp Synchronization interval unit, (if this bit is one then Timestamp Synchronization interval value is specified in terms of hours else Timestamp Synchronization interval value is specified in terms of minutes). The driver keeps track of the timer using IOC's timestamp_update_count field. This field value gets incremented whenever the watchdog thread gets invoked. And whenever this field value is greater than or equal to the Time Stamp Synchronization interval value, the driver sends the IO_UNIT_CONTROL Request message to controller to update the time and then it resets the timestamp_update_count field to zero. Link: https://lore.kernel.org/r/20201126094311.8686-2-suganath-prabu.subramani@broadcom.com Reported-by: kernel test robot Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen commit afc516dcfe52802e0d29e37e3200c0f08583bd8f Author: Nilesh Javali Date: Wed Dec 2 05:23:12 2020 -0800 scsi: qla2xxx: Update version to 10.02.00.104-k Link: https://lore.kernel.org/r/20201202132312.19966-16-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit abd9cae9bbae9f3a80dae82587b1f79161ad7836 Author: Arun Easi Date: Wed Dec 2 05:23:11 2020 -0800 scsi: qla2xxx: Fix device loss on 4G and older HBAs Due to a bug in the older scan logic, when a once lost device re-appeared, it was not discovered. Fix this by resetting login_retry counter upon device discovery. This is applicable only for 4G and older HBAs. Link: https://lore.kernel.org/r/20201202132312.19966-15-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Arun Easi Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 707531bc2626c1959a03b93566ebb4e629c99276 Author: Saurav Kashyap Date: Wed Dec 2 05:23:10 2020 -0800 scsi: qla2xxx: If fcport is undergoing deletion complete I/O with retry Driver unload with I/Os in flight causes server to crash. Complete I/O with DID_IMM_RETRY if fcport undergoing deletion. CPU: 44 PID: 35008 Comm: qla2xxx_4_dpc Kdump: loaded Tainted: G OE X 5.3.18-22-default #1 SLE15-SP2 (unreleased) Hardware name: HPE ProLiant DL380 Gen10/ProLiant DL380 Gen10, BIOS U30 07/16/2020 RIP: 0010:dma_direct_unmap_sg+0x24/0x60 Code: 4c 8b 04 24 eb b9 0f 1f 44 00 00 85 d2 7e 4e 41 57 4d 89 c7 41 56 41 89 ce 41 55 49 89 fd 41 54 41 89 d4 55 31 ed 53 48 89 f3 <8b> 53 18 48 8b 73 10 4d 89 f8 44 89 f1 4c 89 ef 83 c5 01 e8 44 ff RSP: 0018:ffffc0c661037d88 EFLAGS: 00010046 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000002 RDX: 000000000000001d RSI: 0000000000000000 RDI: ffff9a51ee53b0b0 RBP: 0000000000000000 R08: 0000000000000000 R09: ffff9a51ee53b0b0 R10: ffffc0c646463dc8 R11: ffff9a4a067087c8 R12: 000000000000001d R13: ffff9a51ee53b0b0 R14: 0000000000000002 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff9a523f800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000018 CR3: 000000043740a004 CR4: 00000000007606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: qla2xxx_qpair_sp_free_dma+0x20d/0x3c0 [qla2xxx] qla2xxx_qpair_sp_compl+0x35/0x90 [qla2xxx] __qla2x00_abort_all_cmds+0x180/0x390 [qla2xxx] ? qla24xx_process_purex_list+0x100/0x100 [qla2xxx] qla2x00_abort_all_cmds+0x5e/0x80 [qla2xxx] qla2x00_do_dpc+0x317/0xa30 [qla2xxx] kthread+0x10d/0x130 ? kthread_park+0xa0/0xa0 ret_from_fork+0x35/0x40 Link: https://lore.kernel.org/r/20201202132312.19966-14-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Saurav Kashyap Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 0a6f4d762c6b8fd0d442db74c8d279744100ae25 Author: Saurav Kashyap Date: Wed Dec 2 05:23:09 2020 -0800 scsi: qla2xxx: Fix the call trace for flush workqueue The call trace was because workqueue was allocated without any flags, added WQ_MEM_RECLAIM as flag when allocating. kernel: workqueue: WQ_MEM_RECLAIM kblockd:blk_mq_run_work_fn is flushing !WQ_MEM_RECLAIM qla2xxx_wq:0x0 kernel: WARNING: CPU: 0 PID: 2475 at kernel/workqueue.c:2593 check_flush_dependency+0x110/0x130 kernel: CPU: 0 PID: 2475 Comm: kworker/0:1H Kdump: loaded Tainted: G OE --------- - - 4.18.0-193.el8.x86_64 #1 kernel: Hardware name: HPE ProLiant XL170r Gen10/ProLiant XL170r Gen10, BIOS U38 05/21/2019 kernel: Workqueue: kblockd blk_mq_run_work_fn kernel: RIP: 0010:check_flush_dependency+0x110/0x130 kernel: Code: ff ff 48 8b 50 18 48 8d 8b b0 00 00 00 49 89 e8 48 81 c6 b0 00 00 00 48 c7 c7 00 1e e9 95 c6 05 dc 9a 2f 01 01 e8 1a 42 fe ff <0f> 0b e9 0a ff ff ff 80 3d ca 9a 2f 01 0 0 75 95 e9 41 ff ff ff 90 kernel: RSP: 0018:ffffa40f48b2baf8 EFLAGS: 00010282 kernel: RAX: 0000000000000000 RBX: ffff946795282600 RCX: 0000000000000000 kernel: RDX: 000000000000005f RSI: ffffffff96a1af7f RDI: 0000000000000246 kernel: RBP: 0000000000000000 R08: ffffffff96a1af20 R09: 0000000000029480 kernel: R10: 00080c89bb3e7462 R11: 00000000000009ab R12: ffff946773628000 kernel: R13: 0000000000000282 R14: 0000000000000246 R15: ffffa40f48b2bb40 kernel: FS: 0000000000000000(0000) GS:ffff94679fa00000(0000) knlGS:0000000000000000 kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 kernel: CR2: 00005570c4b60110 CR3: 000000029140a005 CR4: 00000000007606f0 kernel: DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 kernel: DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 kernel: PKRU: 55555554 kernel: Call Trace: kernel: flush_workqueue+0x13a/0x440 kernel: qla2x00_wait_for_sess_deletion+0x1d6/0x200 [qla2xxx] kernel: ? finish_wait+0x80/0x80 kernel: qla2xxx_disable_port+0x2b/0x30 [qla2xxx] kernel: qla2x00_process_vendor_specific+0x1dc9/0x2d20 [qla2xxx] kernel: ? blk_rq_map_sg+0x195/0x570 kernel: qla24xx_bsg_request+0x1a3/0xf90 [qla2xxx] Link: https://lore.kernel.org/r/20201202132312.19966-13-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Saurav Kashyap Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 0bc17251dff432f2589d3d509fb4dc14912d4372 Author: Arun Easi Date: Wed Dec 2 05:23:08 2020 -0800 scsi: qla2xxx: Fix flash update in 28XX adapters on big endian machines Flash update failed due to missing endian conversion in FLT region access as well as in checksum computation. Link: https://lore.kernel.org/r/20201202132312.19966-12-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Arun Easi Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit f795f96e725b472de59db06a21a23e2285faaf14 Author: Saurav Kashyap Date: Wed Dec 2 05:23:07 2020 -0800 scsi: qla2xxx: Handle aborts correctly for port undergoing deletion Call trace observed while shutting down the adapter ports (LINK DOWN). Handle aborts correctly. localhost kernel: INFO: task nvme:44209 blocked for more than 120 seconds. localhost kernel: "echo 0 >/proc/sys/kernel/hung_task_timeout_secs" disables this message. localhost kernel: nvme D ffff88b45fb5acc0 0 44209 1 0x00000080 localhost kernel: Call Trace: localhost kernel: [] schedule+0x29/0x70 localhost kernel: [] schedule_timeout+0x221/0x2d0 localhost kernel: [] ? ttwu_do_wakeup+0x19/0xe0 localhost kernel: [] ? ttwu_do_activate+0x6f/0x80 localhost kernel: [] ? try_to_wake_up+0x190/0x390 localhost kernel: [] wait_for_completion+0xfd/0x140 localhost kernel: [] ? wake_up_state+0x20/0x20 localhost kernel: [] flush_work+0x10a/0x1b0 localhost kernel: [] ? move_linked_works+0x90/0x90 localhost kernel: [] flush_delayed_work+0x3f/0x50 localhost kernel: [] nvme_fc_init_ctrl+0x657/0x6a0 [nvme_fc] localhost kernel: [] nvme_fc_create_ctrl+0x18a/0x210 [nvme_fc] localhost kernel: [] nvmf_dev_write+0x98f/0xb35 [nvme_fabrics] localhost kernel: [] ? security_file_permission+0x27/0xa0 localhost kernel: [] vfs_write+0xc0/0x1f0 localhost kernel: [] SyS_write+0x7f/0xf0 localhost kernel: [] system_call_fastpath+0x25/0x2a Link: https://lore.kernel.org/r/20201202132312.19966-11-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Saurav Kashyap Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 07a5f69248e3486e387c40af64793466371c7d91 Author: Quinn Tran Date: Wed Dec 2 05:23:06 2020 -0800 scsi: qla2xxx: Fix N2N and NVMe connect retry failure FC-NVMe target discovery failed when initiator wwpn < target wwpn in an N2N (Direct Attach) config, where the driver was stuck on FCP PRLI mode and failed to retry with NVMe PRLI. Link: https://lore.kernel.org/r/20201202132312.19966-10-njavali@marvell.com Fixes: 84ed362ac40c ("scsi: qla2xxx: Dual FCP-NVMe target port support”) Fixes: 983f127603fa ("scsi: qla2xxx: Retry PLOGI on FC-NVMe PRLI failure”) Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 8a78dd6ed1af06bfa7b4ade81328ff7ea11b6947 Author: Arun Easi Date: Wed Dec 2 05:23:05 2020 -0800 scsi: qla2xxx: Fix FW initialization error on big endian machines Some fields are not correctly byte swapped causing failure during initialization. As probe() returns failure, HBAs will not be claimed when this happens. qla2xxx [0007:01:00.0]-ffff:3: Secure Flash Update in FW: Supported qla2xxx [0007:01:00.0]-ffff:3: SCM in FW: Supported qla2xxx [0007:01:00.0]-00d2:3: Init Firmware **** FAILED ****. qla2xxx [0007:01:00.0]-00d6:3: Failed to initialize adapter - Adapter flags 2. qla2xxx 0007:01:00.1: enabling device (0140 -> 0142) qla2xxx [0007:01:00.1]-011c: : MSI-X vector count: 128. qla2xxx [0007:01:00.1]-001d: : Found an ISP2289 irq 18 iobase 0xd000080080004000. qla2xxx 0007:01:00.1: Using 64-bit direct DMA at offset 800000000000000 BUG: Bad page state in process insmod pfn:67118 page:f00000000168bd40 count:-1 mapcount:0 mapping: (null) index:0x0 page flags: 0x3ffff800000000() page dumped because: nonzero _count Modules linked in: qla2xxx(OE+) nvme_fc nvme_fabrics nvme_core scsi_transport_fc scsi_tgt nls_utf8 isofs ip6t_rpfilter ipt_REJECT nf_reject_ipv4 ip6t_REJECT nf_reject_ipv6 xt_conntrack ip_set nfnetlink ebtable_nat ebtable_broute bridge stp llc ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_security iptable_raw ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter nx_crypto ses enclosure scsi_transport_sas pseries_rng sg ip_tables xfs libcrc32c sr_mod cdrom sd_mod crc_t10dif crct10dif_generic crct10dif_common usb_storage ipr libata tg3 ptp pps_core dm_mirror dm_region_hash dm_log dm_mod CPU: 32 PID: 8560 Comm: insmod Kdump: loaded Tainted: G OE ------------ 3.10.0-957.el7.ppc64 #1 Call Trace: [c0000006dd7caa70] [c00000000001cca8] .show_stack+0x88/0x330 (unreliable) [c0000006dd7cab30] [c000000000ac3d88] .dump_stack+0x28/0x3c [c0000006dd7caba0] [c00000000029e48c] .bad_page+0x15c/0x1c0 [c0000006dd7cac40] [c00000000029f938] .get_page_from_freelist+0x11e8/0x1ea0 [c0000006dd7caf40] [c0000000002a1d30] .__alloc_pages_nodemask+0x1c0/0xc70 [c0000006dd7cb140] [c00000000002ba0c] .__dma_direct_alloc_coherent+0x8c/0x170 [c0000006dd7cb1e0] [d000000010a94688] .qla2x00_mem_alloc+0x10f8/0x1370 [qla2xxx] [c0000006dd7cb2d0] [d000000010a9c790] .qla2x00_probe_one+0xb60/0x22e0 [qla2xxx] [c0000006dd7cb540] [c0000000005de764] .pci_device_probe+0x204/0x300 [c0000006dd7cb600] [c0000000006ca61c] .driver_probe_device+0x2cc/0x6f0 [c0000006dd7cb6b0] [c0000000006cabec] .__driver_attach+0x10c/0x110 [c0000006dd7cb740] [c0000000006c5f04] .bus_for_each_dev+0x94/0x100 [c0000006dd7cb7e0] [c0000000006c94f4] .driver_attach+0x34/0x50 [c0000006dd7cb860] [c0000000006c8f58] .bus_add_driver+0x298/0x3b0 [c0000006dd7cb900] [c0000000006cb6e0] .driver_register+0xb0/0x1a0 [c0000006dd7cb980] [c0000000005dc474] .__pci_register_driver+0xc4/0xf0 [c0000006dd7cba10] [d000000010b94e20] .qla2x00_module_init+0x2a8/0x328 [qla2xxx] [c0000006dd7cbaa0] [c00000000000c130] .do_one_initcall+0x130/0x2e0 [c0000006dd7cbb50] [c0000000001b2e8c] .load_module+0x1afc/0x2340 [c0000006dd7cbd40] [c0000000001b3920] .SyS_finit_module+0xd0/0x130 [c0000006dd7cbe30] [c00000000000a284] system_call+0x38/0xfc Link: https://lore.kernel.org/r/20201202132312.19966-9-njavali@marvell.com Fixes: 9f2475fe7406 ("scsi: qla2xxx: SAN congestion management implementation") Fixes: cf3c54fb49a4 ("scsi: qla2xxx: Add SLER and PI control support”) Reviewed-by: Himanshu Madhani Signed-off-by: Arun Easi Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 8de309e7299a00b3045fb274f82b326f356404f0 Author: Arun Easi Date: Wed Dec 2 05:23:04 2020 -0800 scsi: qla2xxx: Fix crash during driver load on big endian machines Crash stack: [576544.715489] Unable to handle kernel paging request for data at address 0xd00000000f970000 [576544.715497] Faulting instruction address: 0xd00000000f880f64 [576544.715503] Oops: Kernel access of bad area, sig: 11 [#1] [576544.715506] SMP NR_CPUS=2048 NUMA pSeries : [576544.715703] NIP [d00000000f880f64] .qla27xx_fwdt_template_valid+0x94/0x100 [qla2xxx] [576544.715722] LR [d00000000f7952dc] .qla24xx_load_risc_flash+0x2fc/0x590 [qla2xxx] [576544.715726] Call Trace: [576544.715731] [c0000004d0ffb000] [c0000006fe02c350] 0xc0000006fe02c350 (unreliable) [576544.715750] [c0000004d0ffb080] [d00000000f7952dc] .qla24xx_load_risc_flash+0x2fc/0x590 [qla2xxx] [576544.715770] [c0000004d0ffb170] [d00000000f7aa034] .qla81xx_load_risc+0x84/0x1a0 [qla2xxx] [576544.715789] [c0000004d0ffb210] [d00000000f79f7c8] .qla2x00_setup_chip+0xc8/0x910 [qla2xxx] [576544.715808] [c0000004d0ffb300] [d00000000f7a631c] .qla2x00_initialize_adapter+0x4dc/0xb00 [qla2xxx] [576544.715826] [c0000004d0ffb3e0] [d00000000f78ce28] .qla2x00_probe_one+0xf08/0x2200 [qla2xxx] Link: https://lore.kernel.org/r/20201202132312.19966-8-njavali@marvell.com Fixes: f73cb695d3ec ("[SCSI] qla2xxx: Add support for ISP2071.") Cc: stable@vger.kernel.org Reviewed-by: Himanshu Madhani Signed-off-by: Arun Easi Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit aceba54ba0f998ed6bec88faaf94e7458f753399 Author: Arun Easi Date: Wed Dec 2 05:23:03 2020 -0800 scsi: qla2xxx: Fix compilation issue in PPC systems Fix compile time errors reported on PPC systems, qla_gbl.h:991:20: error: inlining failed in call to always_inline ‘qla_nvme_abort_set_option’: function body not available Link: https://lore.kernel.org/r/20201202132312.19966-7-njavali@marvell.com Signed-off-by: Arun Easi Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 0ce8ab50a6ed7c10bc3b7fc00d4aa5b67b5f9e2c Author: Saurav Kashyap Date: Wed Dec 2 05:23:02 2020 -0800 scsi: qla2xxx: Don't check for fw_started while posting NVMe command NVMe commands can come only after successful addition of rport and NVMe connect, and rport is only registered after FW started bit is set. Remove the redundant check. Link: https://lore.kernel.org/r/20201202132312.19966-6-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Saurav Kashyap Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit e4fc78f48d3f8a9ea49e4b24878ac48dc9a58744 Author: Quinn Tran Date: Wed Dec 2 05:23:01 2020 -0800 scsi: qla2xxx: Tear down session if FW say it is down The completion status 0x28 (ppc = be = 0x2800) below indicates session is not there, trigger session deletion. qla2xxx [000b:04:00.1]-8009:8: DEVICE RESET ISSUED nexus=8:1:51 cmd=c000001432d0f600. qla2xxx [000b:04:00.1]-5039:8: Async-tmf error - hdl=67b completion status(2800). qla2xxx [000b:04:00.1]-8030:8: TM IOCB failed (102). qla2xxx [000b:04:00.1]-800c:8: do_reset failed for cmd=c000001432d0f600. qla2xxx [000b:04:00.1]-800f:8: DEVICE RESET FAILED: Task management failed nexus=8:1:51 cmd=c000001432d0f600. qla2xxx [000b:04:00.1]-8009:8: DEVICE RESET ISSUED nexus=8:1:52 cmd=c000001432d0c200. qla2xxx [000b:04:00.1]-5039:8: Async-tmf error - hdl=67c completion status(2800). qla2xxx [000b:04:00.1]-8030:8: TM IOCB failed (102). Link: https://lore.kernel.org/r/20201202132312.19966-5-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit a6dcfe08487e5e83b6b4214c959a9577a9ed2d9f Author: Quinn Tran Date: Wed Dec 2 05:23:00 2020 -0800 scsi: qla2xxx: Limit interrupt vectors to number of CPUs Driver created too many QPairs(126) with 28xx adapter. Limit to the number of CPUs to minimize wasted resources. Link: https://lore.kernel.org/r/20201202132312.19966-4-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit c1599657d48ca65861408f9264e12c050ac9626b Author: Saurav Kashyap Date: Wed Dec 2 05:22:59 2020 -0800 scsi: qla2xxx: Change post del message from debug level to log level Change the message debug level. Link: https://lore.kernel.org/r/20201202132312.19966-3-njavali@marvell.com Signed-off-by: Saurav Kashyap Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 305c16ce2632dca5056d7a1839c27f49c603f7f8 Author: Daniel Wagner Date: Wed Dec 2 05:22:58 2020 -0800 scsi: qla2xxx: Return EBUSY on fcport deletion When the fcport is about to be deleted we should return EBUSY instead of ENODEV. Only for EBUSY will the request be requeued in a multipath setup. Also return EBUSY when the firmware has not yet started to avoid dropping the request. Link: https://lore.kernel.org/r/20201014073048.36219-1-dwagner@suse.de Link: https://lore.kernel.org/r/20201202132312.19966-2-njavali@marvell.com Reviewed-by: Arun Easi Reviewed-by: Himanshu Madhani Signed-off-by: Daniel Wagner Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 3a5b9fa2cc5fc0ddd86f03e28947e8b410622148 Author: Colin Ian King Date: Fri Dec 4 19:18:10 2020 +0000 scsi: qla4xxx: Remove redundant assignment to variable rval The variable rval is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Link: https://lore.kernel.org/r/20201204191810.1150995-1-colin.king@canonical.com Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen Addresses-Coverity: ("Unused value") commit e7e499ee8a844189edff3e768d4721d1a6cc67fd Merge: b760bfbcbff35 4ba79e25d7f1a Author: Arnd Bergmann Date: Wed Dec 9 17:27:34 2020 +0100 Merge tag 'imx-soc-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/soc i.MX SoC update for 5.11: - Add revision detection support for i.MX7ULP revision 2.2. - Add a little document for i.MX7ULP B2 silicon version. - Add serial number support for i.MX23, i.MX28 SoCs through soc_device. - Improve the identifying of i.MX6QP SoCs. * tag 'imx-soc-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: mxs: Add serial number support for i.MX23, i.MX28 SoCs ARM: imx: mach-imx6q: correctly identify i.MX6QP SoCs ARM: imx: imx7ulp: Add a comment explaining the B2 silicon version ARM: imx: Add revision support for i.MX7ULP revision 2.2 Link: https://lore.kernel.org/r/20201202142717.9262-2-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit b760bfbcbff356c7cfab167205ff4a4cf9d7a0b0 Merge: 4bdfafd6ff293 ba66a25536dd2 Author: Arnd Bergmann Date: Wed Dec 9 17:26:33 2020 +0100 Merge tag 'amlogic-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into arm/soc arm64: Kconfig.platform: amlogic updates for v5.11 - ship only the necessary clock controllers * tag 'amlogic-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: arm64: meson: ship only the necessary clock controllers Link: https://lore.kernel.org/r/7hlfehjgv8.fsf@baylibre.com Signed-off-by: Arnd Bergmann commit 4bdfafd6ff2938057df1fbc586db9a9c61541beb Merge: 2efc35dc43974 d7ce8739f50e9 Author: Arnd Bergmann Date: Wed Dec 9 17:25:42 2020 +0100 Merge tag 'mvebu-arm-5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into arm/soc mvebu arm for 5.11 (part 1) Update MAINTAINER file: - add new 98DX3236 based boards - point new git repository for mvebu * tag 'mvebu-arm-5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu: MAINTAINERS: switch mvebu tree to kernel.org MAINTAINERS: Add an entry for MikroTik CRS3xx 98DX3236 boards Link: https://lore.kernel.org/r/87k0u2j0n7.fsf@BL-laptop Signed-off-by: Arnd Bergmann commit 5b13886da858d5f0eb9cbd25612e776cb9021262 Author: Simon Perron Caissy Date: Thu Sep 17 13:13:47 2020 -0700 ice: Add space to unknown speed Add space to the end of 'Unknown' string in order to avoid concatenation with 'bps' string when formatting netdev log message. Signed-off-by: Simon Perron Caissy Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit 9228d8b2613b3e1af17151635191e020bbd4fcd8 Author: Jacob Keller Date: Thu Sep 17 13:13:46 2020 -0700 ice: join format strings to same line as ice_debug When printing messages with ice_debug, align the printed string to the origin line of the message in order to ease debugging and tracking messages back to their source. Signed-off-by: Jacob Keller Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit 34d8461a653a132691f3eda6ab31195156d2691c Author: Bruce Allan Date: Thu Sep 17 13:13:45 2020 -0700 ice: silence static analysis warning sparse warns about cast to/from restricted types which is not an actual problem; silence the warning. Signed-off-by: Bruce Allan Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit 32e6deb29725e0efc20586ad041b0cfc1b31ab21 Author: Bruce Allan Date: Thu Sep 17 13:13:44 2020 -0700 ice: cleanup misleading comment The maximum Admin Queue buffer size and NVM shadow RAM sector size are both 4 Kilobytes. Some comments refer to those as 4Kb which can be confused with 4 Kilobits. Update the comments to use the commonly used KB symbol instead. Signed-off-by: Bruce Allan Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit bcf68ea1e580df685a4a9cec4dfaf0f0f4393dbe Author: Nick Nunley Date: Thu Sep 17 13:13:43 2020 -0700 ice: Remove vlan_ena from vsi structure vlan_ena was introduced to track whether VLAN filters are enabled on the device, but 1) checking for num_vlan > 1 already gives us this information, and is currently used in this way throughout the code 2) the logic for vlan_ena is broken when multiple VLANs are active Just remove vlan_ena and use num_vlan instead. Signed-off-by: Nick Nunley Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit 956542cae5dc7a6e688badee721de168c8e9fbd8 Author: Jeb Cramer Date: Thu Sep 17 13:13:42 2020 -0700 ice: Remove gate to OROM init Remove the gate that prevents the OROM and netlist info from being populated. The NVM now has the appropriate section for software to reference the versioning info. Signed-off-by: Jeb Cramer Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit c21125c99757ade403e81195005ccedb166a47a6 Author: Jeb Cramer Date: Thu Sep 17 13:13:41 2020 -0700 ice: Enable Support for FW Override (E82X) The driver is able to override the firmware when it comes to supporting a more lenient link mode. This feature was limited to E810 devices. It is now extended to E82X devices. Signed-off-by: Jeb Cramer Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit f2651a91b97d140e183dcc3198deba7f72198e54 Author: Paul M Stillwell Jr Date: Thu Sep 17 13:13:40 2020 -0700 ice: don't always return an error for Get PHY Abilities AQ command There are times when the driver shouldn't return an error when the Get PHY abilities AQ command (0x0600) returns an error. Instead the driver should log that the error occurred and continue on. This allows the driver to load even though the AQ command failed. The user can then later determine the reason for the failure and correct it. Signed-off-by: Paul M Stillwell Jr Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit 88dcfdb4cd82ff3c4cf5d4874fabb6adaaf1ce63 Author: Bruce Allan Date: Mon Sep 14 08:37:14 2020 -0700 ice: cleanup stack hog In ice_flow_add_prof_sync(), struct ice_flow_prof_params has recently grown in size hogging stack space when allocated there. Hogging stack space should be avoided. Change allocation to be on the heap when needed. Signed-off-by: Bruce Allan Tested-by: Harikumar Bokkena Signed-off-by: Tony Nguyen commit c2208046bba6842dc232a600dc5cafc2fca41078 Author: Kan Liang Date: Tue Dec 8 12:05:52 2020 -0800 perf/x86/intel: Add Tremont Topdown support Tremont has four L1 Topdown events, TOPDOWN_FE_BOUND.ALL, TOPDOWN_BAD_SPECULATION.ALL, TOPDOWN_BE_BOUND.ALL and TOPDOWN_RETIRING.ALL. They are available on GP counters. Export them to sysfs and facilitate the perf stat tool. $perf stat --topdown -- sleep 1 Performance counter stats for 'sleep 1': retiring bad speculation frontend bound backend bound 24.9% 16.8% 31.7% 26.6% 1.001224610 seconds time elapsed 0.001150000 seconds user 0.000000000 seconds sys Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1607457952-3519-1-git-send-email-kan.liang@linux.intel.com commit bd11952b400fdfdf3b017500ad6475f5b624d167 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:32:37 2020 -0600 uprobes/x86: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Peter Zijlstra (Intel) Link: https://github.com/KSPP/linux/issues/115 commit b6459575451769b0550621865d1ddb65afdb55a1 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:31:36 2020 -0600 perf/x86: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a fallthrough pseudo-keyword as a replacement for a /* fall through */ comment, instead of letting the code fall through to the next case. Notice that Clang doesn't recognize /* fall through */ comments as implicit fall-through markings. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Peter Zijlstra (Intel) Link: https://github.com/KSPP/linux/issues/115 commit e689b300c99ca2dd80d3f662e19499bba27cda09 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:30:44 2020 -0600 kprobes/x86: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of just letting the code fall through to the next case. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Peter Zijlstra (Intel) Link: https://github.com/KSPP/linux/issues/115 commit f8129cd958b395575e5543ce25a8434874b04d3a Author: Kan Liang Date: Wed Nov 25 13:37:20 2020 -0800 perf/x86/intel/lbr: Fix the return type of get_lbr_cycles() The cycle count of a timed LBR is always 1 in perf record -D. The cycle count is stored in the first 16 bits of the IA32_LBR_x_INFO register, but the get_lbr_cycles() return Boolean type. Use u16 to replace the Boolean type. Fixes: 47125db27e47 ("perf/x86/intel/lbr: Support Architectural LBR") Reported-by: Stephane Eranian Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20201125213720.15692-2-kan.liang@linux.intel.com commit 46b72e1bf4fc571da0c29c6fb3e5b2a2107a4c26 Author: Kan Liang Date: Wed Nov 25 13:37:19 2020 -0800 perf/x86/intel: Fix rtm_abort_event encoding on Ice Lake According to the event list from icelake_core_v1.09.json, the encoding of the RTM_RETIRED.ABORTED event on Ice Lake should be, "EventCode": "0xc9", "UMask": "0x04", "EventName": "RTM_RETIRED.ABORTED", Correct the wrong encoding. Fixes: 6017608936c1 ("perf/x86/intel: Add Icelake support") Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20201125213720.15692-1-kan.liang@linux.intel.com commit 78ff2733ff352175eb7f4418a34654346e1b6cd2 Author: Masami Hiramatsu Date: Wed Oct 28 23:31:10 2020 +0900 x86/kprobes: Restore BTF if the single-stepping is cancelled Fix to restore BTF if single-stepping causes a page fault and it is cancelled. Usually the BTF flag was restored when the single stepping is done (in resume_execution()). However, if a page fault happens on the single stepping instruction, the fault handler is invoked and the single stepping is cancelled. Thus, the BTF flag is not restored. Fixes: 1ecc798c6764 ("x86: debugctlmsr kprobes") Signed-off-by: Masami Hiramatsu Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/160389546985.106936.12727996109376240993.stgit@devnote2 commit 78af4dc949daaa37b3fcd5f348f373085b4e858f Author: peterz@infradead.org Date: Fri Aug 28 14:37:20 2020 +0200 perf: Break deadlock involving exec_update_mutex Syzbot reported a lock inversion involving perf. The sore point being perf holding exec_update_mutex() for a very long time, specifically across a whole bunch of filesystem ops in pmu::event_init() (uprobes) and anon_inode_getfile(). This then inverts against procfs code trying to take exec_update_mutex. Move the permission checks later, such that we need to hold the mutex over less code. Reported-by: syzbot+db9cdf3dd1f64252c6ef@syzkaller.appspotmail.com Signed-off-by: Peter Zijlstra (Intel) commit e6e4f42eb773c1da869af4bad544c26c89cd01ab Author: Peter Zijlstra Date: Fri Nov 13 11:46:23 2020 +0100 sparc64/mm: Implement pXX_leaf_size() support Sparc64 has non-pagetable aligned large page support; wire up the pXX_leaf_size() functions to report the correct pagetable page size. This enables PERF_SAMPLE_{DATA,CODE}_PAGE_SIZE to report accurate pagetable leaf sizes. Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201126121121.301768209@infradead.org commit c5eecbb58f65bf1c4effab9a7f283184b469768c Author: Peter Zijlstra Date: Thu Nov 26 11:53:33 2020 +0100 powerpc/8xx: Implement pXX_leaf_size() support Christophe Leroy wrote: > I can help with powerpc 8xx. It is a 32 bits powerpc. The PGD has 1024 > entries, that means each entry maps 4M. > > Page sizes are 4k, 16k, 512k and 8M. > > For the 8M pages we use hugepd with a single entry. The two related PGD > entries point to the same hugepd. > > For the other sizes, they are in standard page tables. 16k pages appear > 4 times in the page table. 512k entries appear 128 times in the page > table. > > When the PGD entry has _PMD_PAGE_8M bits, the PMD entry points to a > hugepd with holds the single 8M entry. > > In the PTE, we have two bits: _PAGE_SPS and _PAGE_HUGE > > _PAGE_HUGE means it is a 512k page > _PAGE_SPS means it is not a 4k page > > The kernel can by build either with 4k pages as standard page size, or > 16k pages. It doesn't change the page table layout though. Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201126121121.364451610@infradead.org commit cb262935a166bdef0ccfe6e2adffa00c0f2d038a Author: Ahmed S. Darwish Date: Sun Dec 6 17:21:43 2020 +0100 seqlock: kernel-doc: Specify when preemption is automatically altered The kernel-doc annotations for sequence counters write side functions are incomplete: they do not specify when preemption is automatically disabled and re-enabled. This has confused a number of call-site developers. Fix it. Signed-off-by: Ahmed S. Darwish Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/CAHk-=wikhGExmprXgaW+MVXG1zsGpztBbVwOb23vetk41EtTBQ@mail.gmail.com commit 66bcfcdf89d00f2409f4b5da0f8c20c08318dc72 Author: Ahmed S. Darwish Date: Sun Dec 6 17:21:42 2020 +0100 seqlock: Prefix internal seqcount_t-only macros with a "do_" When the seqcount_LOCKNAME_t group of data types were introduced, two classes of seqlock.h sequence counter macros were added: - An external public API which can either take a plain seqcount_t or any of the seqcount_LOCKNAME_t variants. - An internal API which takes only a plain seqcount_t. To distinguish between the two groups, the "*_seqcount_t_*" pattern was used for the latter. This confused a number of mm/ call-site developers, and Linus also commented that it was not a standard practice for marking seqlock.h internal APIs. Distinguish the latter group of macros by prefixing a "do_". Signed-off-by: Ahmed S. Darwish Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/CAHk-=wikhGExmprXgaW+MVXG1zsGpztBbVwOb23vetk41EtTBQ@mail.gmail.com commit cf48647243cc28d15280600292db5777592606c5 Author: Ahmed S. Darwish Date: Sun Dec 6 17:21:41 2020 +0100 Documentation: seqlock: s/LOCKTYPE/LOCKNAME/g Sequence counters with an associated write serialization lock are called seqcount_LOCKNAME_t. Fix the documentation accordingly. While at it, remove a paragraph that inappropriately discussed a seqlock.h implementation detail. Fixes: 6dd699b13d53 ("seqlock: seqcount_LOCKNAME_t: Standardize naming convention") Signed-off-by: Ahmed S. Darwish Signed-off-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20201206162143.14387-2-a.darwish@linutronix.de commit 617f3ef95177840c77f59c2aec1029d27d5547d6 Author: Waiman Long Date: Fri Nov 20 23:14:16 2020 -0500 locking/rwsem: Remove reader optimistic spinning Reader optimistic spinning is helpful when the reader critical section is short and there aren't that many readers around. It also improves the chance that a reader can get the lock as writer optimistic spinning disproportionally favors writers much more than readers. Since commit d3681e269fff ("locking/rwsem: Wake up almost all readers in wait queue"), all the waiting readers are woken up so that they can all get the read lock and run in parallel. When the number of contending readers is large, allowing reader optimistic spinning will likely cause reader fragmentation where multiple smaller groups of readers can get the read lock in a sequential manner separated by writers. That reduces reader parallelism. One possible way to address that drawback is to limit the number of readers (preferably one) that can do optimistic spinning. These readers act as representatives of all the waiting readers in the wait queue as they will wake up all those waiting readers once they get the lock. Alternatively, as reader optimistic lock stealing has already enhanced fairness to readers, it may be easier to just remove reader optimistic spinning and simplifying the optimistic spinning code as a result. Performance measurements (locking throughput kops/s) using a locking microbenchmark with 50/50 reader/writer distribution and turbo-boost disabled was done on a 2-socket Cascade Lake system (48-core 96-thread) to see the impacts of these changes: 1) Vanilla - 5.10-rc3 kernel 2) Before - 5.10-rc3 kernel with previous patches in this series 2) limit-rspin - 5.10-rc3 kernel with limited reader spinning patch 3) no-rspin - 5.10-rc3 kernel with reader spinning disabled # of threads CS Load Vanilla Before limit-rspin no-rspin ------------ ------- ------- ------ ----------- -------- 2 1 5,185 5,662 5,214 5,077 4 1 5,107 4,983 5,188 4,760 8 1 4,782 4,564 4,720 4,628 16 1 4,680 4,053 4,567 3,402 32 1 4,299 1,115 1,118 1,098 64 1 3,218 983 1,001 957 96 1 1,938 944 957 930 2 20 2,008 2,128 2,264 1,665 4 20 1,390 1,033 1,046 1,101 8 20 1,472 1,155 1,098 1,213 16 20 1,332 1,077 1,089 1,122 32 20 967 914 917 980 64 20 787 874 891 858 96 20 730 836 847 844 2 100 372 356 360 355 4 100 492 425 434 392 8 100 533 537 529 538 16 100 548 572 568 598 32 100 499 520 527 537 64 100 466 517 526 512 96 100 406 497 506 509 The column "CS Load" represents the number of pause instructions issued in the locking critical section. A CS load of 1 is extremely short and is not likey in real situations. A load of 20 (moderate) and 100 (long) are more realistic. It can be seen that the previous patches in this series have reduced performance in general except in highly contended cases with moderate or long critical sections that performance improves a bit. This change is mostly caused by the "Prevent potential lock starvation" patch that reduce reader optimistic spinning and hence reduce reader fragmentation. The patch that further limit reader optimistic spinning doesn't seem to have too much impact on overall performance as shown in the benchmark data. The patch that disables reader optimistic spinning shows reduced performance at lightly loaded cases, but comparable or slightly better performance on with heavier contention. This patch just removes reader optimistic spinning for now. As readers are not going to do optimistic spinning anymore, we don't need to consider if the OSQ is empty or not when doing lock stealing. Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Davidlohr Bueso Link: https://lkml.kernel.org/r/20201121041416.12285-6-longman@redhat.com commit 1a728dff855a318bb58bcc1259b1826a7ad9f0bd Author: Waiman Long Date: Fri Nov 20 23:14:14 2020 -0500 locking/rwsem: Enable reader optimistic lock stealing If the optimistic spinning queue is empty and the rwsem does not have the handoff or write-lock bits set, it is actually not necessary to call rwsem_optimistic_spin() to spin on it. Instead, it can steal the lock directly as its reader bias is in the count already. If it is the first reader in this state, it will try to wake up other readers in the wait queue. With this patch applied, the following were the lock event counts after rebooting a 2-socket system and a "make -j96" kernel rebuild. rwsem_opt_rlock=4437 rwsem_rlock=29 rwsem_rlock_steal=19 So lock stealing represents about 0.4% of all the read locks acquired in the slow path. Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Davidlohr Bueso Link: https://lkml.kernel.org/r/20201121041416.12285-4-longman@redhat.com commit 2f06f702925b512a95b95dca3855549c047eef58 Author: Waiman Long Date: Fri Nov 20 23:14:13 2020 -0500 locking/rwsem: Prevent potential lock starvation The lock handoff bit is added in commit 4f23dbc1e657 ("locking/rwsem: Implement lock handoff to prevent lock starvation") to avoid lock starvation. However, allowing readers to do optimistic spinning does introduce an unlikely scenario where lock starvation can happen. The lock handoff bit may only be set when a waiter is being woken up. In the case of reader unlock, wakeup happens only when the reader count reaches 0. If there is a continuous stream of incoming readers acquiring read lock via optimistic spinning, it is possible that the reader count may never reach 0 and so the handoff bit will never be asserted. One way to prevent this scenario from happening is to disallow optimistic spinning if the rwsem is currently owned by readers. If the previous or current owner is a writer, optimistic spinning will be allowed. If the previous owner is a reader but the reader count has reached 0 before, a wakeup should have been issued. So the handoff mechanism will be kicked in to prevent lock starvation. As a result, it should be OK to do optimistic spinning in this case. This patch may have some impact on reader performance as it reduces reader optimistic spinning especially if the lock critical sections are short the number of contending readers are small. Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Davidlohr Bueso Link: https://lkml.kernel.org/r/20201121041416.12285-3-longman@redhat.com commit c8fe8b0564388f41147326f31e4587171aacccd4 Author: Waiman Long Date: Fri Nov 20 23:14:12 2020 -0500 locking/rwsem: Pass the current atomic count to rwsem_down_read_slowpath() The atomic count value right after reader count increment can be useful to determine the rwsem state at trylock time. So the count value is passed down to rwsem_down_read_slowpath() to be used when appropriate. Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Davidlohr Bueso Link: https://lkml.kernel.org/r/20201121041416.12285-2-longman@redhat.com commit c995e638ccbbc65a76d1713c4fdcf927e7e2cb83 Author: Peter Zijlstra Date: Tue Dec 8 10:27:41 2020 +0100 locking/rwsem: Fold __down_{read,write}*() There's a lot needless duplication in __down_{read,write}*(), cure that with a helper. Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201207090243.GE3040@hirez.programming.kicks-ass.net commit 285c61aedf6bc5d81b37e4dc48c19012e8ff9836 Author: Peter Zijlstra Date: Tue Dec 8 10:25:06 2020 +0100 locking/rwsem: Introduce rwsem_write_trylock() One copy of this logic is better than three. Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201207090243.GE3040@hirez.programming.kicks-ass.net commit 3379116a0ca965b00e6522c7ea3f16c9dbd8f9f9 Author: Peter Zijlstra Date: Tue Dec 8 10:22:16 2020 +0100 locking/rwsem: Better collate rwsem_read_trylock() All users of rwsem_read_trylock() do rwsem_set_reader_owned(sem) on success, move it into rwsem_read_trylock() proper. Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201207090243.GE3040@hirez.programming.kicks-ass.net commit 2b3c99ee6389d33aff91d9e7a55465d7d1332bbd Merge: 97d62caa32d6d 31784cff7ee07 Author: Peter Zijlstra Date: Wed Dec 9 17:08:45 2020 +0100 Merge branch 'locking/rwsem' commit 31784cff7ee073b34d6eddabb95e3be2880a425c Author: Eric W. Biederman Date: Thu Dec 3 14:11:13 2020 -0600 rwsem: Implement down_read_interruptible In preparation for converting exec_update_mutex to a rwsem so that multiple readers can execute in parallel and not deadlock, add down_read_interruptible. This is needed for perf_event_open to be converted (with no semantic changes) from working on a mutex to wroking on a rwsem. Signed-off-by: Eric W. Biederman Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/87k0tybqfy.fsf@x220.int.ebiederm.org commit 0f9368b5bf6db0c04afc5454b1be79022a681615 Author: Eric W. Biederman Date: Thu Dec 3 14:10:32 2020 -0600 rwsem: Implement down_read_killable_nested In preparation for converting exec_update_mutex to a rwsem so that multiple readers can execute in parallel and not deadlock, add down_read_killable_nested. This is needed so that kcmp_lock can be converted from working on a mutexes to working on rw_semaphores. Signed-off-by: Eric W. Biederman Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/87o8jabqh3.fsf@x220.int.ebiederm.org commit 2efc35dc439740652c46133357090fb5f03a90d0 Merge: 334d09c218c11 f9135aaf27675 Author: Arnd Bergmann Date: Wed Dec 9 16:58:47 2020 +0100 Merge tag 'samsung-soc-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/soc Samsung mach/soc changes for v5.11 1. Do not use of_machine_is_compatible() in early CPU hotplug core. Full device tree walk causes "suspicious RCU usage" warnings. 2. Clear prefetch bits in default l2c_aux_val of L310 L2C - they are not needed. 3. Extend cpuidle support to P4 Note boards (Exynos4412). * tag 'samsung-soc-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: exynos: extend cpuidle support to P4 Note boards ARM: exynos: clear prefetch bits in default l2c_aux_val ARM: exynos: Simplify code in Exynos3250 CPU core restart path Link: https://lore.kernel.org/r/20201201204404.22675-4-krzk@kernel.org Signed-off-by: Arnd Bergmann commit 08c6a2f620e427e879d6ec9329143d6fcd810cd8 Merge: b60da4955f53d 7d20441eb05ec Author: Daniel Borkmann Date: Wed Dec 9 16:44:45 2020 +0100 Merge branch 'bpf-xsk-selftests' Weqaar Janjua says: ==================== This patch set adds AF_XDP selftests based on veth to selftests/bpf. # Topology: # --------- # ----------- # _ | Process | _ # / ----------- \ # / | \ # / | \ # ----------- | ----------- # | Thread1 | | | Thread2 | # ----------- | ----------- # | | | # ----------- | ----------- # | xskX | | | xskY | # ----------- | ----------- # | | | # ----------- | ---------- # | vethX | --------- | vethY | # ----------- peer ---------- # | | | # namespaceX | namespaceY These selftests test AF_XDP SKB and Native/DRV modes using veth Virtual Ethernet interfaces. The test program contains two threads, each thread is single socket with a unique UMEM. It validates in-order packet delivery and packet content by sending packets to each other. Prerequisites setup by script test_xsk.sh: Set up veth interfaces as per the topology shown ^^: * setup two veth interfaces and one namespace ** veth in root namespace ** veth in af_xdp namespace ** namespace af_xdp * create a spec file veth.spec that includes this run-time configuration *** xxxx and yyyy are randomly generated 4 digit numbers used to avoid conflict with any existing interface Adds xsk framework test to validate veth xdp DRV and SKB modes. The following tests are provided: 1. AF_XDP SKB mode Generic mode XDP is driver independent, used when the driver does not have support for XDP. Works on any netdevice using sockets and generic XDP path. XDP hook from netif_receive_skb(). a. nopoll - soft-irq processing b. poll - using poll() syscall c. Socket Teardown Create a Tx and a Rx socket, Tx from one socket, Rx on another. Destroy both sockets, then repeat multiple times. Only nopoll mode is used d. Bi-directional Sockets Configure sockets as bi-directional tx/rx sockets, sets up fill and completion rings on each socket, tx/rx in both directions. Only nopoll mode is used 2. AF_XDP DRV/Native mode Works on any netdevice with XDP_REDIRECT support, driver dependent. Processes packets before SKB allocation. Provides better performance than SKB. Driver hook available just after DMA of buffer descriptor. a. nopoll b. poll c. Socket Teardown d. Bi-directional Sockets * Only copy mode is supported because veth does not currently support zero-copy mode Total tests: 8 Flow: * Single process spawns two threads: Tx and Rx * Each of these two threads attach to a veth interface within their assigned namespaces * Each thread creates one AF_XDP socket connected to a unique umem for each veth interface * Tx thread transmits 10k packets from veth to veth * Rx thread verifies if all 10k packets were received and delivered in-order, and have the right content v2 changes: * Move selftests/xsk to selftests/bpf * Remove Makefiles under selftests/xsk, and utilize selftests/bpf/Makefile v3 changes: * merge all test scripts test_xsk_*.sh into test_xsk.sh v4 changes: * merge xsk_env.sh into xsk_prereqs.sh * test_xsk.sh add cliarg -c for color-coded output * test_xsk.sh PREREQUISITES disables IPv6 on veth interfaces * test_xsk.sh PREREQUISITES adds xsk framework test * test_xsk.sh is independently executable * xdpxceiver.c Tx/Rx validates only IPv4 packets with TOS 0x9, ignores others ==================== Signed-off-by: Daniel Borkmann commit 7d20441eb05ec6d8dc7b16381c53b3c0b3ad6e8a Author: Weqaar Janjua Date: Mon Dec 7 21:53:33 2020 +0000 selftests/bpf: Xsk selftests - Bi-directional Sockets - SKB, DRV Adds following tests: 1. AF_XDP SKB mode d. Bi-directional Sockets Configure sockets as bi-directional tx/rx sockets, sets up fill and completion rings on each socket, tx/rx in both directions. Only nopoll mode is used 2. AF_XDP DRV/Native mode d. Bi-directional Sockets * Only copy mode is supported because veth does not currently support zero-copy mode Signed-off-by: Weqaar Janjua Signed-off-by: Daniel Borkmann Tested-by: Yonghong Song Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/20201207215333.11586-6-weqaar.a.janjua@intel.com commit 6674bf66560a6c55aada1e3cd4fca7a3ed204075 Author: Weqaar Janjua Date: Mon Dec 7 21:53:32 2020 +0000 selftests/bpf: Xsk selftests - Socket Teardown - SKB, DRV Adds following tests: 1. AF_XDP SKB mode c. Socket Teardown Create a Tx and a Rx socket, Tx from one socket, Rx on another. Destroy both sockets, then repeat multiple times. Only nopoll mode is used 2. AF_XDP DRV/Native mode c. Socket Teardown * Only copy mode is supported because veth does not currently support zero-copy mode Signed-off-by: Weqaar Janjua Signed-off-by: Daniel Borkmann Tested-by: Yonghong Song Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/20201207215333.11586-5-weqaar.a.janjua@intel.com commit 9103a8594d9324d8e1512442ba580e4e91d42c2d Author: Weqaar Janjua Date: Mon Dec 7 21:53:31 2020 +0000 selftests/bpf: Xsk selftests - DRV POLL, NOPOLL Adds following tests: 2. AF_XDP DRV/Native mode Works on any netdevice with XDP_REDIRECT support, driver dependent. Processes packets before SKB allocation. Provides better performance than SKB. Driver hook available just after DMA of buffer descriptor. a. nopoll b. poll * Only copy mode is supported because veth does not currently support zero-copy mode Signed-off-by: Weqaar Janjua Signed-off-by: Daniel Borkmann Tested-by: Yonghong Song Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/20201207215333.11586-4-weqaar.a.janjua@intel.com commit facb7cb2e909ad2d21ebbfdc051726d4cd8f1d35 Author: Weqaar Janjua Date: Mon Dec 7 21:53:30 2020 +0000 selftests/bpf: Xsk selftests - SKB POLL, NOPOLL Adds following tests: 1. AF_XDP SKB mode Generic mode XDP is driver independent, used when the driver does not have support for XDP. Works on any netdevice using sockets and generic XDP path. XDP hook from netif_receive_skb(). a. nopoll - soft-irq processing b. poll - using poll() syscall Signed-off-by: Weqaar Janjua Signed-off-by: Daniel Borkmann Tested-by: Yonghong Song Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/20201207215333.11586-3-weqaar.a.janjua@intel.com commit a89052572ebbf4bcee7c39390640e92b60eaa653 Author: Weqaar Janjua Date: Mon Dec 7 21:53:29 2020 +0000 selftests/bpf: Xsk selftests framework This patch adds AF_XDP selftests framework under selftests/bpf. Topology: --------- ----------- ----------- | xskX | --------- | xskY | ----------- | ----------- | | | ----------- | ---------- | vethX | --------- | vethY | ----------- peer ---------- | | | namespaceX | namespaceY Prerequisites setup by script test_xsk.sh: Set up veth interfaces as per the topology shown ^^: * setup two veth interfaces and one namespace ** veth in root namespace ** veth in af_xdp namespace ** namespace af_xdp * create a spec file veth.spec that includes this run-time configuration *** xxxx and yyyy are randomly generated 4 digit numbers used to avoid conflict with any existing interface * tests the veth and xsk layers of the topology Signed-off-by: Weqaar Janjua Signed-off-by: Daniel Borkmann Tested-by: Yonghong Song Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/20201207215333.11586-2-weqaar.a.janjua@intel.com commit 4c9398822106c366d88c8c68ddf44bd371d39961 Author: Manivannan Sadhasivam Date: Tue Dec 8 17:44:02 2020 +0530 PCI: qcom: Add support for configuring BDF to SID mapping for SM8250 For SM8250, we need to write the BDF to SID mapping in PCIe controller register space for proper working. This is accomplished by extracting the BDF and SID values from "iommu-map" property in DT and writing those in the register address calculated from the hash value of BDF. In case of collisions, the index of the next entry will also be written. For the sake of it, let's introduce a "config_sid" callback and do it conditionally for SM8250. Link: https://lore.kernel.org/r/20201208121402.178011-4-mani@kernel.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Lorenzo Pieralisi Reviewed-by: Bjorn Andersson commit 3f618ab3323407ee4c6a6734a37eb6e9663ebfb9 Author: Mark Rutland Date: Mon Dec 7 17:05:33 2020 +0000 lkdtm: don't move ctors to .rodata When building with KASAN and LKDTM, clang may implictly generate an asan.module_ctor function in the LKDTM rodata object. The Makefile moves the lkdtm_rodata_do_nothing() function into .rodata by renaming the file's .text section to .rodata, and consequently also moves the ctor function into .rodata, leading to a boot time crash (splat below) when the ctor is invoked by do_ctors(). Let's prevent this by marking the function as noinstr rather than notrace, and renaming the file's .noinstr.text to .rodata. Marking the function as noinstr will prevent tracing and kprobes, and will inhibit any undesireable compiler instrumentation. The ctor function (if any) will be placed in .text and will work correctly. Example splat before this patch is applied: [ 0.916359] Unable to handle kernel execute from non-executable memory at virtual address ffffa0006b60f5ac [ 0.922088] Mem abort info: [ 0.922828] ESR = 0x8600000e [ 0.923635] EC = 0x21: IABT (current EL), IL = 32 bits [ 0.925036] SET = 0, FnV = 0 [ 0.925838] EA = 0, S1PTW = 0 [ 0.926714] swapper pgtable: 4k pages, 48-bit VAs, pgdp=00000000427b3000 [ 0.928489] [ffffa0006b60f5ac] pgd=000000023ffff003, p4d=000000023ffff003, pud=000000023fffe003, pmd=0068000042000f01 [ 0.931330] Internal error: Oops: 8600000e [#1] PREEMPT SMP [ 0.932806] Modules linked in: [ 0.933617] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.10.0-rc7 #2 [ 0.935620] Hardware name: linux,dummy-virt (DT) [ 0.936924] pstate: 40400005 (nZcv daif +PAN -UAO -TCO BTYPE=--) [ 0.938609] pc : asan.module_ctor+0x0/0x14 [ 0.939759] lr : do_basic_setup+0x4c/0x70 [ 0.940889] sp : ffff27b600177e30 [ 0.941815] x29: ffff27b600177e30 x28: 0000000000000000 [ 0.943306] x27: 0000000000000000 x26: 0000000000000000 [ 0.944803] x25: 0000000000000000 x24: 0000000000000000 [ 0.946289] x23: 0000000000000001 x22: 0000000000000000 [ 0.947777] x21: ffffa0006bf4a890 x20: ffffa0006befb6c0 [ 0.949271] x19: ffffa0006bef9358 x18: 0000000000000068 [ 0.950756] x17: fffffffffffffff8 x16: 0000000000000000 [ 0.952246] x15: 0000000000000000 x14: 0000000000000000 [ 0.953734] x13: 00000000838a16d5 x12: 0000000000000001 [ 0.955223] x11: ffff94000da74041 x10: dfffa00000000000 [ 0.956715] x9 : 0000000000000000 x8 : ffffa0006b60f5ac [ 0.958199] x7 : f9f9f9f9f9f9f9f9 x6 : 000000000000003f [ 0.959683] x5 : 0000000000000040 x4 : 0000000000000000 [ 0.961178] x3 : ffffa0006bdc15a0 x2 : 0000000000000005 [ 0.962662] x1 : 00000000000000f9 x0 : ffffa0006bef9350 [ 0.964155] Call trace: [ 0.964844] asan.module_ctor+0x0/0x14 [ 0.965895] kernel_init_freeable+0x158/0x198 [ 0.967115] kernel_init+0x14/0x19c [ 0.968104] ret_from_fork+0x10/0x30 [ 0.969110] Code: 00000003 00000000 00000000 00000000 (00000000) [ 0.970815] ---[ end trace b5339784e20d015c ]--- Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: Kees Cook Acked-by: Kees Cook Signed-off-by: Mark Rutland Link: https://lore.kernel.org/r/20201207170533.10738-1-mark.rutland@arm.com Signed-off-by: Greg Kroah-Hartman commit b7bc4df86afd07a44f266680d72572c501e0c9d4 Author: Nicholas Warfield Date: Tue Dec 8 14:25:29 2020 -0800 staging: qlge: remove duplicate word in comment This patch fixes the checkpatch warning: WARNING: Possible repeated word: 'each' 1712: FILE: qlge.h:1712.h + * that are each each 64-bits in length. There are a total of Signed-off-by: Nicholas Warfield Link: https://lore.kernel.org/r/X8/9WWP3S1GrVNaa@coffee.localdomain Signed-off-by: Greg Kroah-Hartman commit 56c90457ebfe9422496aac6ef3d3f0f0ea8b2ec2 Author: Ian Abbott Date: Mon Dec 7 14:58:06 2020 +0000 staging: comedi: mf6x4: Fix AI end-of-conversion detection I have had reports from two different people that attempts to read the analog input channels of the MF624 board fail with an `ETIMEDOUT` error. After triggering the conversion, the code calls `comedi_timeout()` with `mf6x4_ai_eoc()` as the callback function to check if the conversion is complete. The callback returns 0 if complete or `-EBUSY` if not yet complete. `comedi_timeout()` returns `-ETIMEDOUT` if it has not completed within a timeout period which is propagated as an error to the user application. The existing code considers the conversion to be complete when the EOLC bit is high. However, according to the user manuals for the MF624 and MF634 boards, this test is incorrect because EOLC is an active low signal that goes high when the conversion is triggered, and goes low when the conversion is complete. Fix the problem by inverting the test of the EOLC bit state. Fixes: 04b565021a83 ("comedi: Humusoft MF634 and MF624 DAQ cards driver") Cc: # v4.4+ Cc: Rostislav Lisovy Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20201207145806.4046-1-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman commit c11cbd57f02d612181c5abd1306670b7f6c447c9 Author: Uwe Kleine-König Date: Tue Dec 8 11:16:07 2020 +0100 staging: greybus: Add TODO item about modernizing the pwm code drivers/staging/greybus/pwm.c uses the old style PWM callbacks, new drivers should stick to the atomic API instead. Acked-by: Johan Hovold Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20201208101607.42785-1-uwe@kleine-koenig.org Signed-off-by: Greg Kroah-Hartman commit 718c406e1ffaca4eac987b957bbb36ce1090797a Author: Jaroslav Kysela Date: Tue Dec 8 18:12:00 2020 +0100 ASoC: AMD Renoir - add DMI table to avoid the ACP mic probe (broken BIOS) Users reported that some Lenovo AMD platforms do not have ACP microphone, but the BIOS advertises it via ACPI. This patch create a simple DMI table, where those machines with the broken BIOS can be added. The DMI description for Lenovo IdeaPad 5 and IdeaPad Flex 5 devices are added there. Also describe the dmic_acpi_check kernel module parameter in a more understandable way. Cc: Cc: Vijendar Mukunda Cc: Mark Brown Signed-off-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20201208171200.2737620-1-perex@perex.cz Signed-off-by: Mark Brown commit 52feed4c1b152fe2caee9a8f916fd5573e999b7e Merge: 397e089bda327 6374f493d93b2 Author: Mark Brown Date: Wed Dec 9 14:45:06 2020 +0000 Merge series "ASoC: soc-pcm: trigger cleanup" from Kuninori Morimoto : Hi Mark These are focusing to trigger function, which can be cleanup, tidyup. Kuninori Morimoto (2): ASoC: soc-pcm: remove dpcm_do_trigger() ASoC: soc-pcm: care trigger rollback include/sound/soc-component.h | 3 +- include/sound/soc-dai.h | 4 +- include/sound/soc-link.h | 3 +- include/sound/soc.h | 1 + sound/soc/soc-component.c | 45 ++++++++++++++++++---- sound/soc/soc-dai.c | 44 +++++++++++++++++---- sound/soc/soc-link.c | 30 ++++++++++++++- sound/soc/soc-pcm.c | 72 ++++++++++++++++++++--------------- 8 files changed, 152 insertions(+), 50 deletions(-) -- 2.25.1 commit 54da51a841ea4c9b6cbac60ef85f55b4695a9612 Author: Colin Ian King Date: Fri Dec 4 19:22:50 2020 +0000 firmware: fix a spelling mistake "managament" -> "management" in Kconfig There is a spelling mistake in the Kconfig help text. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20201204192250.1151316-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 0f966cba95c78029f491b433ea95ff38f414a761 Author: Todd Kjos Date: Fri Nov 20 15:37:43 2020 -0800 binder: add flag to clear buffer on txn complete Add a per-transaction flag to indicate that the buffer must be cleared when the transaction is complete to prevent copies of sensitive data from being preserved in memory. Signed-off-by: Todd Kjos Link: https://lore.kernel.org/r/20201120233743.3617529-1-tkjos@google.com Cc: stable Signed-off-by: Greg Kroah-Hartman commit 716a8bc7f706eeef80ab42c99d9f210eda845c81 Author: Trond Myklebust Date: Mon Nov 30 23:14:27 2020 -0500 nfsd: Record NFSv4 pre/post-op attributes as non-atomic For the case of NFSv4, specify to the client that the pre/post-op attributes were not recorded atomically with the main operation. Signed-off-by: Trond Myklebust Signed-off-by: Chuck Lever commit 01cbf3853959feec40ec9b9a399e12a021cd4d81 Author: Trond Myklebust Date: Mon Nov 30 17:03:19 2020 -0500 nfsd: Set PF_LOCAL_THROTTLE on local filesystems only Don't set PF_LOCAL_THROTTLE on remote filesystems like NFS, since they aren't expected to ever be subject to double buffering. Signed-off-by: Trond Myklebust Signed-off-by: Chuck Lever commit 2e19d10c1438241de32467637a2a411971547991 Author: Trond Myklebust Date: Mon Nov 30 17:03:18 2020 -0500 nfsd: Fix up nfsd to ensure that timeout errors don't result in ESTALE If the underlying filesystem times out, then we want knfsd to return NFSERR_JUKEBOX/DELAY rather than NFSERR_STALE. Signed-off-by: Trond Myklebust Signed-off-by: Chuck Lever commit d045465fc6cbfa4acfb5a7d817a7c1a57a078109 Author: Trond Myklebust Date: Mon Nov 30 17:03:17 2020 -0500 exportfs: Add a function to return the raw output from fh_to_dentry() In order to allow nfsd to accept return values that are not acceptable to overlayfs and others, add a new function. Signed-off-by: Trond Myklebust Signed-off-by: Chuck Lever commit 7f84b488f9add1d5cca3e6197c95914c7bd3c1cf Author: Jeff Layton Date: Mon Nov 30 17:03:16 2020 -0500 nfsd: close cached files prior to a REMOVE or RENAME that would replace target It's not uncommon for some workloads to do a bunch of I/O to a file and delete it just afterward. If knfsd has a cached open file however, then the file may still be open when the dentry is unlinked. If the underlying filesystem is nfs, then that could trigger it to do a sillyrename. On a REMOVE or RENAME scan the nfsd_file cache for open files that correspond to the inode, and proactively unhash and put their references. This should prevent any delete-on-last-close activity from occurring, solely due to knfsd's open file cache. This must be done synchronously though so we use the variants that call flush_delayed_fput. There are deadlock possibilities if you call flush_delayed_fput while holding locks, however. In the case of nfsd_rename, we don't even do the lookups of the dentries to be renamed until we've locked for rename. Once we've figured out what the target dentry is for a rename, check to see whether there are cached open files associated with it. If there are, then unwind all of the locking, close them all, and then reattempt the rename. None of this is really necessary for "typical" filesystems though. It's mostly of use for NFS, so declare a new export op flag and use that to determine whether to close the files beforehand. Signed-off-by: Jeff Layton Signed-off-by: Lance Shelton Signed-off-by: Trond Myklebust Signed-off-by: Chuck Lever commit ba5e8187c55555519ae0b63c0fb681391bc42af9 Author: Jeff Layton Date: Mon Nov 30 17:03:15 2020 -0500 nfsd: allow filesystems to opt out of subtree checking When we start allowing NFS to be reexported, then we have some problems when it comes to subtree checking. In principle, we could allow it, but it would mean encoding parent info in the filehandles and there may not be enough space for that in a NFSv3 filehandle. To enforce this at export upcall time, we add a new export_ops flag that declares the filesystem ineligible for subtree checking. Signed-off-by: Jeff Layton Signed-off-by: Lance Shelton Signed-off-by: Trond Myklebust Signed-off-by: Chuck Lever commit daab110e47f8d7aa6da66923e3ac1a8dbd2b2a72 Author: Jeff Layton Date: Mon Nov 30 17:03:14 2020 -0500 nfsd: add a new EXPORT_OP_NOWCC flag to struct export_operations With NFSv3 nfsd will always attempt to send along WCC data to the client. This generally involves saving off the in-core inode information prior to doing the operation on the given filehandle, and then issuing a vfs_getattr to it after the op. Some filesystems (particularly clustered or networked ones) have an expensive ->getattr inode operation. Atomicity is also often difficult or impossible to guarantee on such filesystems. For those, we're best off not trying to provide WCC information to the client at all, and to simply allow it to poll for that information as needed with a GETATTR RPC. This patch adds a new flags field to struct export_operations, and defines a new EXPORT_OP_NOWCC flag that filesystems can use to indicate that nfsd should not attempt to provide WCC info in NFSv3 replies. It also adds a blurb about the new flags field and flag to the exporting documentation. The server will also now skip collecting this information for NFSv2 as well, since that info is never used there anyway. Note that this patch does not add this flag to any filesystem export_operations structures. This was originally developed to allow reexporting nfs via nfsd. Other filesystems may want to consider enabling this flag too. It's hard to tell however which ones have export operations to enable export via knfsd and which ones mostly rely on them for open-by-filehandle support, so I'm leaving that up to the individual maintainers to decide. I am cc'ing the relevant lists for those filesystems that I think may want to consider adding this though. Cc: HPDD-discuss@lists.01.org Cc: ceph-devel@vger.kernel.org Cc: cluster-devel@redhat.com Cc: fuse-devel@lists.sourceforge.net Cc: ocfs2-devel@oss.oracle.com Signed-off-by: Jeff Layton Signed-off-by: Lance Shelton Signed-off-by: Trond Myklebust Signed-off-by: Chuck Lever commit 1631087ba8727db03c0ab2815dc06dc25d962b80 Author: J. Bruce Fields Date: Mon Nov 30 17:46:18 2020 -0500 Revert "nfsd4: support change_attr_type attribute" This reverts commit a85857633b04d57f4524cca0a2bfaf87b2543f9f. We're still factoring ctime into our change attribute even in the IS_I_VERSION case. If someone sets the system time backwards, a client could see the change attribute go backwards. Maybe we can just say "well, don't do that", but there's some question whether that's good enough, or whether we need a better guarantee. Also, the client still isn't actually using the attribute. While we're still figuring this out, let's just stop returning this attribute. Signed-off-by: J. Bruce Fields Signed-off-by: Chuck Lever commit 942b20dc245590327ee0187c15c78174cd96dd52 Author: J. Bruce Fields Date: Mon Nov 30 17:46:17 2020 -0500 nfsd4: don't query change attribute in v2/v3 case inode_query_iversion() has side effects, and there's no point calling it when we're not even going to use it. We check whether we're currently processing a v4 request by checking fh_maxsize, which is arguably a little hacky; we could add a flag to svc_fh instead. Signed-off-by: J. Bruce Fields Signed-off-by: Chuck Lever commit 4b03d99794eeed27650597a886247c6427ce1055 Author: J. Bruce Fields Date: Mon Nov 30 17:46:16 2020 -0500 nfsd: minor nfsd4_change_attribute cleanup Minor cleanup, no change in behavior. Also pull out a common helper that'll be useful elsewhere. Signed-off-by: J. Bruce Fields Signed-off-by: Chuck Lever commit b2140338d8dca827ad9e83f3e026e9d51748b265 Author: J. Bruce Fields Date: Mon Nov 30 17:46:15 2020 -0500 nfsd: simplify nfsd4_change_info It doesn't make sense to carry all these extra fields around. Just make everything into change attribute from the start. This is just cleanup, there should be no change in behavior. Signed-off-by: J. Bruce Fields Signed-off-by: Chuck Lever commit 70b87f77294d16d3e567056ba4c9ee2b091a5b50 Author: J. Bruce Fields Date: Mon Nov 30 17:46:14 2020 -0500 nfsd: only call inode_query_iversion in the I_VERSION case inode_query_iversion() can modify i_version. Depending on the exported filesystem, that may not be safe. For example, if you're re-exporting NFS, NFS stores the server's change attribute in i_version and does not expect it to be modified locally. This has been observed causing unnecessary cache invalidations. The way a filesystem indicates that it's OK to call inode_query_iverson() is by setting SB_I_VERSION. So, move the I_VERSION check out of encode_change(), where it's used only in GETATTR responses, to nfsd4_change_attribute(), which is also called for pre- and post- operation attributes. (Note we could also pull the NFSEXP_V4ROOT case into nfsd4_change_attribute() as well. That would actually be a no-op, since pre/post attrs are only used for metadata-modifying operations, and V4ROOT exports are read-only. But we might make the change in the future just for simplicity.) Reported-by: Daire Byrne Signed-off-by: J. Bruce Fields Signed-off-by: Chuck Lever commit 4a9d81caf841cd2c0ae36abec9c2963bf21d0284 Author: Cheng Lin Date: Tue Dec 1 07:06:35 2020 -0500 nfs_common: need lock during iterate through the list If the elem is deleted during be iterated on it, the iteration process will fall into an endless loop. kernel: NMI watchdog: BUG: soft lockup - CPU#4 stuck for 22s! [nfsd:17137] PID: 17137  TASK: ffff8818d93c0000  CPU: 4   COMMAND: "nfsd"     [exception RIP: __state_in_grace+76]     RIP: ffffffffc00e817c  RSP: ffff8818d3aefc98  RFLAGS: 00000246     RAX: ffff881dc0c38298  RBX: ffffffff81b03580  RCX: ffff881dc02c9f50     RDX: ffff881e3fce8500  RSI: 0000000000000001  RDI: ffffffff81b03580     RBP: ffff8818d3aefca0   R8: 0000000000000020   R9: ffff8818d3aefd40     R10: ffff88017fc03800  R11: ffff8818e83933c0  R12: ffff8818d3aefd40     R13: 0000000000000000  R14: ffff8818e8391068  R15: ffff8818fa6e4000     CS: 0010  SS: 0018  #0 [ffff8818d3aefc98] opens_in_grace at ffffffffc00e81e3 [grace]  #1 [ffff8818d3aefca8] nfs4_preprocess_stateid_op at ffffffffc02a3e6c [nfsd]  #2 [ffff8818d3aefd18] nfsd4_write at ffffffffc028ed5b [nfsd]  #3 [ffff8818d3aefd80] nfsd4_proc_compound at ffffffffc0290a0d [nfsd]  #4 [ffff8818d3aefdd0] nfsd_dispatch at ffffffffc027b800 [nfsd]  #5 [ffff8818d3aefe08] svc_process_common at ffffffffc02017f3 [sunrpc]  #6 [ffff8818d3aefe70] svc_process at ffffffffc0201ce3 [sunrpc]  #7 [ffff8818d3aefe98] nfsd at ffffffffc027b117 [nfsd]  #8 [ffff8818d3aefec8] kthread at ffffffff810b88c1  #9 [ffff8818d3aeff50] ret_from_fork at ffffffff816d1607 The troublemake elem: crash> lock_manager ffff881dc0c38298 struct lock_manager {   list = {     next = 0xffff881dc0c38298,     prev = 0xffff881dc0c38298   },   block_opens = false } Fixes: c87fb4a378f9 ("lockd: NLM grace period shouldn't block NFSv4 opens") Signed-off-by: Cheng Lin  Signed-off-by: Yi Wang  Signed-off-by: Chuck Lever commit ca9364dde50daba93eff711b4b945fd08beafcc2 Author: Dai Ngo Date: Mon Nov 30 16:24:49 2020 -0500 NFSD: Fix 5 seconds delay when doing inter server copy Since commit b4868b44c5628 ("NFSv4: Wait for stateid updates after CLOSE/OPEN_DOWNGRADE"), every inter server copy operation suffers 5 seconds delay regardless of the size of the copy. The delay is from nfs_set_open_stateid_locked when the check by nfs_stateid_is_sequential fails because the seqid in both nfs4_state and nfs4_stateid are 0. Fix by modifying nfs4_init_cp_state to return the stateid with seqid 1 instead of 0. This is also to conform with section 4.8 of RFC 7862. Here is the relevant paragraph from section 4.8 of RFC 7862: A copy offload stateid's seqid MUST NOT be zero. In the context of a copy offload operation, it is inappropriate to indicate "the most recent copy offload operation" using a stateid with a seqid of zero (see Section 8.2.2 of [RFC5661]). It is inappropriate because the stateid refers to internal state in the server and there may be several asynchronous COPY operations being performed in parallel on the same file by the server. Therefore, a copy offload stateid with a seqid of zero MUST be considered invalid. Fixes: ce0887ac96d3 ("NFSD add nfs4 inter ssc to nfsd4_copy") Signed-off-by: Dai Ngo Signed-off-by: Chuck Lever commit eb162e1772f85231dabc789fb4bfea63d2d9df79 Author: Chuck Lever Date: Mon Nov 30 16:17:40 2020 -0500 NFSD: Fix sparse warning in nfs4proc.c linux/fs/nfsd/nfs4proc.c:1542:24: warning: incorrect type in assignment (different base types) linux/fs/nfsd/nfs4proc.c:1542:24: expected restricted __be32 [assigned] [usertype] status linux/fs/nfsd/nfs4proc.c:1542:24: got int Clean-up: The dup_copy_fields() function returns only zero, so make it return void for now, and get rid of the return code check. Signed-off-by: Chuck Lever commit 5e54dafbe0b4a2a8555ecf0b9690150da37ee0e1 Author: Chuck Lever Date: Tue Nov 24 15:48:01 2020 -0500 SUNRPC: Remove XDRBUF_SPARSE_PAGES flag in gss_proxy upcall There's no need to defer allocation of pages for the receive buffer. - This upcall is quite infrequent - gssp_alloc_receive_pages() can allocate the pages with GFP_KERNEL, unlike the transport - gssp_alloc_receive_pages() knows exactly how many pages are needed Signed-off-by: Chuck Lever Reviewed-by: Olga Kornievskaia commit 4b5cff7ed8afcdd35bfff39ab503342900ec80c6 Author: Roberto Bergantinos Corpas Date: Fri Nov 27 19:38:31 2020 +0100 sunrpc: clean-up cache downcall We can simplify code around cache_downcall unifying memory allocations using kvmalloc. This has the benefit of getting rid of cache_slow_downcall (and queue_io_mutex), and also matches userland allocation size and limits. Signed-off-by: Roberto Bergantinos Corpas Signed-off-by: Chuck Lever commit 4420440c57892779f265108f46f83832a88ca795 Author: kazuo ito Date: Fri Nov 27 15:26:59 2020 +0900 nfsd: Fix message level for normal termination The warning message from nfsd terminating normally can confuse system adminstrators or monitoring software. Though it's not exactly fair to pin-point a commit where it originated, the current form in the current place started to appear in: Fixes: e096bbc6488d ("knfsd: remove special handling for SIGHUP") Signed-off-by: kazuo ito Signed-off-by: Chuck Lever commit d1b928ee1cfa965a3327bbaa59bfa005d97fa0fe Author: Yang Yingliang Date: Tue Nov 17 09:22:29 2020 +0800 speakup: fix uninitialized flush_lock The flush_lock is uninitialized, use DEFINE_SPINLOCK to define and initialize flush_lock. Fixes: c6e3fd22cd53 ("Staging: add speakup to the staging directory") Reported-by: Hulk Robot Reviewed-by: Samuel Thibault Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20201117012229.3395186-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman commit fa26b3263fd5f58a7f0cd7b3c6cea75ce714f87b Author: Yan.Gao Date: Wed Dec 9 11:05:51 2020 +0800 tty: Fix whitespace inconsistencies in vt_io_ioctl Replaces spaces with tabs for indentation. Signed-off-by: Yan.Gao Link: https://lore.kernel.org/r/20201209030551.48029-1-gao.yanB@h3c.com Signed-off-by: Greg Kroah-Hartman commit 2f70e49ed860020f5abae4f7015018ebc10e1f0e Author: Alexey Kardashevskiy Date: Thu Dec 3 16:58:34 2020 +1100 serial_core: Check for port state when tty is in error state At the moment opening a serial device node (such as /dev/ttyS3) succeeds even if there is no actual serial device behind it. Reading/writing/ioctls fail as expected because the uart port is not initialized (the type is PORT_UNKNOWN) and the TTY_IO_ERROR error state bit is set fot the tty. However setting line discipline does not have these checks 8250_port.c (8250 is the default choice made by univ8250_console_init()). As the result of PORT_UNKNOWN, uart_port::iobase is NULL which a platform translates onto some address accessing which produces a crash like below. This adds tty_port_initialized() to uart_set_ldisc() to prevent the crash. Found by syzkaller. Signed-off-by: Alexey Kardashevskiy Link: https://lore.kernel.org/r/20201203055834.45838-1-aik@ozlabs.ru Cc: stable Signed-off-by: Greg Kroah-Hartman commit 9ea12edeb9ff6b485bd7ca4aaed541c7a7289046 Author: Yash Shah Date: Tue Dec 8 10:25:36 2020 +0530 dt-bindings: serial: Update DT binding docs to support SiFive FU740 SoC Add new compatible strings to the DT binding documents to support SiFive FU740-C000. Signed-off-by: Yash Shah Link: https://lore.kernel.org/r/1607403341-57214-5-git-send-email-yash.shah@sifive.com Signed-off-by: Greg Kroah-Hartman commit 9e1792727ead477f49958578d0dbd466a7deea48 Author: Johan Hovold Date: Wed Dec 2 12:39:37 2020 +0100 tty: use const parameters in port-flag accessors Declare the port parameter to the flag-test accessors as const. This is currently mostly cosmetic as the accessors are already inlined. Suggested-by: Jiri Slaby Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20201202113942.27024-3-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit af633212c4aac1dbd3a48615a834646ce072346d Author: Johan Hovold Date: Wed Dec 2 12:39:36 2020 +0100 tty: use assign_bit() in port-flag accessors Use the new assign_bit() wrapper in the port-flag accessors instead of open coding. Suggested-by: Jiri Slaby Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20201202113942.27024-2-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit e5548b05631ec3e6bfdaef1cad28c799545b791b Author: Zhang Qilong Date: Mon Nov 23 22:58:09 2020 +0800 usb: oxu210hp-hcd: Fix memory leak in oxu_create usb_create_hcd will alloc memory for hcd, and we should call usb_put_hcd to free it when adding fails to prevent memory leak. Fixes: b92a78e582b1a ("usb host: Oxford OXU210HP HCD driver") Reported-by: Hulk Robot Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20201123145809.1456541-1-zhangqilong3@huawei.com Signed-off-by: Greg Kroah-Hartman commit 3b78ef0da32f3288c292b2ecf680c31b4674b50d Author: Xu Wang Date: Fri Nov 20 08:30:54 2020 +0000 usb: fotg210-hcd: remove casting dma_alloc_coherent Remove casting the values returned by dma_alloc_coherent. Signed-off-by: Xu Wang Link: https://lore.kernel.org/r/20201120083054.8973-1-vulab@iscas.ac.cn Signed-off-by: Greg Kroah-Hartman commit 21f5b2fb5fab893e2c745e4e24c4f425cc3db4c1 Author: Tom Rix Date: Fri Nov 27 11:03:36 2020 -0800 USB: host: u123-hcd: remove trailing semicolon in macro definition The macro use will already have a semicolon. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20201127190336.2841413-1-trix@redhat.com Signed-off-by: Greg Kroah-Hartman commit 44ef9b2cd9f8ad30db3e9c87fe0a0d7b70449237 Author: Colin Ian King Date: Thu Nov 26 22:37:04 2020 +0000 usb: phy: Fix spelling mistake in Kconfig help text There is a spelling mistake in the Kconfig help text. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20201126223704.13273-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit ba7052f52c13a6feeced5adbb906b6b7ef7efab8 Author: Enrico Weigelt, metux IT consult Date: Tue Dec 8 10:32:06 2020 +0100 drivers: usb: atm: use pr_err() and pr_warn() instead of raw printk() Since we have the nice helpers pr_err() and pr_warn(), use them instead of raw printk(). Acked-by: Duncan Sands Signed-off-by: Enrico Weigelt, metux IT consult Link: https://lore.kernel.org/r/20201208093206.24780-3-info@metux.net Signed-off-by: Greg Kroah-Hartman commit 6d4e3866b7656268a04f518a7feb2c4698d8b899 Author: Enrico Weigelt, metux IT consult Date: Tue Dec 8 10:32:05 2020 +0100 drivers: usb: atm: use atm_info() instead of atm_printk(KERN_INFO ... Since we already have the useful atm_info() macro, use it instead of raw atm_printk() Signed-off-by: Enrico Weigelt, metux IT consult Link: https://lore.kernel.org/r/20201208093206.24780-2-info@metux.net Signed-off-by: Greg Kroah-Hartman commit 3291eb7329b1c999f952f7d84f9d716b65d235cf Author: Enrico Weigelt, metux IT consult Date: Tue Dec 8 10:32:04 2020 +0100 drivers: usb: atm: reduce noise If drivers work correctly, they should remain silent. Signed-off-by: Enrico Weigelt, metux IT consult Link: https://lore.kernel.org/r/20201208093206.24780-1-info@metux.net Signed-off-by: Greg Kroah-Hartman commit a508f620b5a6e9b359a2baa46ec9a714c3e2f420 Author: Michal Simek Date: Thu Nov 26 15:05:02 2020 +0100 ARM: zynq: Fix incorrect reference to XM013 instead of XM011 Fix comment about targeted extension card. It was likely just c&p error. Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/39e16e667aa8f132496092d4fa554935ddd5a55f.1606399500.git.michal.simek@xilinx.com commit 536fada0cc72c6eb6082bbfbbd90127e8ab9b40c Author: Michal Simek Date: Thu Nov 26 14:25:04 2020 +0100 ARM: zynq: Convert at25 binding to new description on zc770-xm013 The commit f8f79fa6bb25 ("dt-bindings: at25: convert the binding document to yaml") converted binding to yaml and 3 deprecated properties pop up. The patch is fixing these warnings: .../zynq-zc770-xm013.dt.yaml: eeprom@2: 'pagesize' is a required property .../zynq-zc770-xm013.dt.yaml: eeprom@2: 'size' is a required property .../zynq-zc770-xm013.dt.yaml: eeprom@2: 'address-width' is a required property >From schema: .../Documentation/devicetree/bindings/eeprom/at25.yaml by converting them to new binding. Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/be2c1125d98386033e182012eb08986924707a76.1606397101.git.michal.simek@xilinx.com commit 225c13237732bba4b6714b43a3c4fe803da3166c Author: Michal Simek Date: Thu Nov 26 14:25:03 2020 +0100 ARM: zynq: Fix OCM mapping to be aligned with binding on zc702 The commit f69629919942 ("dt-bindings: sram: Convert SRAM bindings to json-schema") converted binding to yaml and some missing required properties started to be reported. Align binding based on it. The patch is fixing these warnings: .../zynq-zc702.dt.yaml: sram@fffc0000: '#address-cells' is a required property .../zynq-zc702.dt.yaml: sram@fffc0000: '#size-cells' is a required property .../zynq-zc702.dt.yaml: sram@fffc0000: 'ranges' is a required property >From schema: .../Documentation/devicetree/bindings/sram/sram.yaml Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/87c02786ccd8d7827827a9d95a8737bb300caeb0.1606397101.git.michal.simek@xilinx.com commit 38d1985fdfcf20dc246b552580479ae602f735d1 Author: Michal Simek Date: Thu Nov 26 14:25:02 2020 +0100 ARM: zynq: Fix leds subnode name for zc702/zybo-z7 Fix the leds subnode names to match (^led-[0-9a-f]$|led). Similar change has been also done by commit 9a19a39ee48b ("arm64: dts: zynqmp: Fix leds subnode name for zcu100/ultra96 v1"). The patch is fixing these warnings: .../zynq-zc702.dt.yaml: leds: 'ds23' does not match any of the regexes: '(^led-[0-9a-f]$|led)', 'pinctrl-[0-9]+' >From schema: .../Documentation/devicetree/bindings/leds/leds-gpio.yaml .../zynq-zybo-z7.dt.yaml: gpio-leds: 'ld4' does not match any of the regexes: '(^led-[0-9a-f]$|led)', 'pinctrl-[0-9]+' >From schema: .../Documentation/devicetree/bindings/leds/leds-gpio.yaml Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/607a66783b129294364abf09a6fc8abd241ff4ee.1606397101.git.michal.simek@xilinx.com commit 3880c39a80abf6bbbebafa58e69f830bdac1ab3a Author: Michal Simek Date: Thu Nov 26 14:25:01 2020 +0100 ARM: zynq: Rename bus to be align with simple-bus yaml Rename amba to AXI. Based on Xilinx Zynq TRM (Chapter 5) chip is "AXI point-to-point channels for communicating addresses, data, and response transactions between master and slave clients. This ARM AMBA 3.0..." Issues are reported as: .. amba: $nodename:0: 'amba' does not match '^([a-z][a-z0-9\\-]+-bus|bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$' >From schema: ../github.com/devicetree-org/dt-schema/dtschema/schemas/simple-bus.yaml Similar change has been done for Xilinx ZynqMP SoC. Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/8a4bc80debfbb79c296e76fc1e4c173e62657286.1606397101.git.michal.simek@xilinx.com commit 23ab93a1480002fd289071e08f7b4960fdfa76d8 Author: Michal Simek Date: Thu Nov 26 14:25:00 2020 +0100 ARM: zynq: Fix compatible string for adi,adxl345 chip The commit e359a29225dd ("dt-bindings: iio: accel: adxl345: switch to YAML bindings") switched binding to yaml and the following error pop up: ../zynq-zturn-v5.dt.yaml: accelerometer@53: compatible: 'oneOf' conditional failed, one must be fixed: ['adi,adxl345', 'adxl345', 'adi,adxl34x', 'adxl34x'] is too long Additional items are not allowed ('adi,adxl34x', 'adxl34x' were unexpected) Additional items are not allowed ('adxl345', 'adi,adxl34x', 'adxl34x' were unexpected) 'adi,adxl346' was expected 'adi,adxl345' was expected Use only one compatible string to be aligned with the binding. Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/a9075ab54df13461380e46d3002302d3672325b5.1606397101.git.michal.simek@xilinx.com commit 40b37008eb5a300ea35aa83432c213b6028313d5 Merge: a0db197f534fb b5252196d08ab Author: Linus Walleij Date: Wed Dec 9 15:17:24 2020 +0100 Merge tag 'gpio-updates-for-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into devel gpio updates for v5.11-rc1 - several refactoring patches of the core gpiolib code - add support for NXP PCAL9554B/C to gpio-pca953x - allow probing mockup devices from device tree - refactoring and improvements to gpio-rcar - improvements to locking in gpio-tegra - code shrink in gpiolib devres - get the irq offset from device tree in gpio-sifive - major refactoring of gpio-exar - convert gpio-mvebu pwm access to regmap - create a new submenu for virtual GPIO drivers - fix clang fall-through warnings treewide - minor driver refactoring and tweaks sprinkled all over commit 881b0520504a2e028a28ddacc05c26e46f21d483 Author: Joakim Zhang Date: Mon Nov 30 19:42:02 2020 +0800 perf/imx_ddr: Add system PMU identifier for userspace The DDR Perf for i.MX8 is a system PMU whose AXI ID would different from SoC to SoC. Need expose system PMU identifier for userspace which refer to /sys/bus/event_source/devices//identifier. Signed-off-by: Joakim Zhang Reviewed-by: John Garry Link: https://lore.kernel.org/r/20201130114202.26057-3-qiangqing.zhang@nxp.com Signed-off-by: Will Deacon commit d0c00977a16a1c785b3e9a3b95026ea5ac27cfb5 Author: Joakim Zhang Date: Mon Nov 30 19:42:01 2020 +0800 bindings: perf: imx-ddr: add compatible string Add extra compabile string to support driver. Signed-off-by: Joakim Zhang Acked-by: Rob Herring Link: https://lore.kernel.org/r/20201130114202.26057-2-qiangqing.zhang@nxp.com Signed-off-by: Will Deacon commit a251963f76fa0226d0fdf0c4f989496f18d9ae7f Author: Johan Hovold Date: Wed Dec 9 11:42:21 2020 +0100 USB: serial: option: add interface-number sanity check to flag handling Add an interface-number sanity check before testing the device flags to avoid relying on undefined behaviour when left shifting in case a device uses an interface number greater than or equal to BITS_PER_LONG (i.e. 64 or 32). Reported-by: syzbot+8881b478dad0a7971f79@syzkaller.appspotmail.com Fixes: c3a65808f04a ("USB: serial: option: reimplement interface masking") Cc: stable@vger.kernel.org Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 0fbb7d06d3783ad9dac063bf2c956f176d57e657 Author: Badhri Jagan Sridharan Date: Tue Dec 1 20:08:40 2020 -0800 usb: typec: tcpci_maxim: Enable VSAFE0V signalling Unmask EXTENDED_STATUS_MASK.vSafe0V, ALERT.Extended_Status and set vbus_vsafe0v to enable VSAFE0V signalling. Reviewed-by: Guenter Roeck Acked-by: Heikki Krogerus Signed-off-by: Badhri Jagan Sridharan Link: https://lore.kernel.org/r/20201202040840.663578-3-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit 766c485b86ef52765926b69a1145cadcf2db1e7d Author: Badhri Jagan Sridharan Date: Tue Dec 1 20:08:39 2020 -0800 usb: typec: tcpci: Add support to report vSafe0V This change adds vbus_vsafe0v which when set, makes TCPM query for VSAFE0V by assigning the tcpc.is_vbus_vsafe0v callback. Also enables ALERT.ExtendedStatus which is triggered when status of EXTENDED_STATUS.vSafe0V changes. EXTENDED_STATUS.vSafe0V is set when vbus is at vSafe0V and cleared otherwise. Reviewed-by: Guenter Roeck Acked-by: Heikki Krogerus Signed-off-by: Badhri Jagan Sridharan Link: https://lore.kernel.org/r/20201202040840.663578-2-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit 28b43d3d746b89fc112fe681e018b39b43495dad Author: Badhri Jagan Sridharan Date: Tue Dec 1 20:08:38 2020 -0800 usb: typec: tcpm: Introduce vsafe0v for vbus TCPM at present lacks the notion of VSAFE0V. There are three vbus threshold levels that are critical to track: a. vSafe5V - VBUS “5 volts” as defined by the USB PD specification. b. vSinkDisconnect - Threshold used for transition from Attached.SNK to Unattached.SNK. c. vSafe0V - VBUS “0 volts” as defined by the USB PD specification. Tracking vSafe0V is crucial for entry into Try.SNK and Attached.SRC and turning vbus back on by the source in response to hard reset. >From "4.5.2.2.8.2 Exiting from AttachWait.SRC State" section in the Type-C spec: "The port shall transition to Attached.SRC when VBUS is at vSafe0V and the SRC.Rd state is detected on exactly one of the CC1 or CC2 pins for at least tCCDebounce." "A DRP that strongly prefers the Sink role may optionally transition to Try.SNK instead of Attached.SRC when VBUS is at vSafe0V and the SRC.Rd state is detected on exactly one of the CC1 or CC2 pins for at least tCCDebounce." >From "7.1.5 Response to Hard Resets" section in the PD spec: "After establishing the vSafe0V voltage condition on VBUS, the Source Shall wait tSrcRecover before re-applying VCONN and restoring VBUS to vSafe5V." vbus_present in the TCPM code tracks vSafe5V(vbus_present is true) and vSinkDisconnect(vbus_present is false). This change adds is_vbus_vsafe0v callback which when set makes TCPM query for vSafe0V voltage level when needed. Since not all TCPC controllers might have the capability to report vSafe0V, TCPM assumes that vSafe0V is same as vSinkDisconnect when is_vbus_vsafe0v callback is not set. This allows TCPM to continue to support controllers which don't have the support for reporting vSafe0V. Introducing vSafe0V helps fix the failure reported at "Step 15. CVS verifies PUT remains in AttachWait.SRC for 500ms" of "TD 4.7.2 Try. SNK DRP Connect DRP Test" of "Universal Serial Bus Type-C (USB Type-C) Functional Test Specification Chapters 4 and 5". Here the compliance tester intentionally maintains vbus at greater than vSafe0V and expects the Product under test to stay in AttachWait.SRC till vbus drops to vSafe0V. Reviewed-by: Guenter Roeck Acked-by: Heikki Krogerus Signed-off-by: Badhri Jagan Sridharan Link: https://lore.kernel.org/r/20201202040840.663578-1-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit 3bac42f02d41dd85da7afb9ffc3f4539fad20cc5 Author: Badhri Jagan Sridharan Date: Wed Dec 2 19:19:08 2020 -0800 usb: typec: tcpm: Clear send_discover in tcpm_check_send_discover tcpm_check_send_discover does not clear the send_discover flag when any of the following conditions are not met. 1. data_role is TYPEC_HOST 2. link is pd_capable Discovery indentity would anyways not be attempted during the current session anymore when the above conditions are not met. Hence clear the send_discover flag here to prevent tcpm_enable_frs_work from rescheduling indefinetly. Reviewed-by: Guenter Roeck Acked-by: Heikki Krogerus Signed-off-by: Badhri Jagan Sridharan Link: https://lore.kernel.org/r/20201203031908.1491542-1-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit e4a9378083c57a22624cda8b780ff5f5da4de7ef Author: Badhri Jagan Sridharan Date: Tue Dec 1 19:17:33 2020 -0800 usb: typec: tcpm: Pass down negotiated rev to update retry count nRetryCount was updated from 3 to 2 between PD2.0 and PD3.0 spec. nRetryCount in "Table 6-34 Counter parameters" of the PD 2.0 spec is set to 3, whereas, nRetryCount in "Table 6-59 Counter parameters" is set to 2. Pass down negotiated rev in pd_transmit so that low level chip drivers can update the retry count accordingly before attempting packet transmission. This helps in passing "TEST.PD.PORT.ALL.02" of the "Power Delivery Merged" test suite which was initially failing with "The UUT did not retransmit the message nReryCount times" In fusb302 & tcpci drivers, by default the driver sets the retry count to 3 (Default for PD 2.0). Update this to 2, if the negotiated rev is PD 3.0. In wcove, since the retry count is intentionally set to max, leaving it as is. Reviewed-by: Guenter Roeck Acked-by: Heikki Krogerus Signed-off-by: Badhri Jagan Sridharan Link: https://lore.kernel.org/r/20201202031733.647808-1-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit 3a288efb08543b1368f8d49342e5943f1adf58ea Author: Utkarsh Patel Date: Thu Dec 3 14:08:13 2020 -0800 usb: typec: intel_pmc_mux: Use correct response message bits When Intel PMC Mux agent driver receives the response message from PMC, it checks for the same response bits for all the mux states. Corrected it by checking correct response message bits, Bit 8 & 9 for the SAFE Mode and Alternate Modes and Bit 16 & 17 for the Connect and Disconnect Modes. Reviewed-by: Heikki Krogerus Signed-off-by: Utkarsh Patel Link: https://lore.kernel.org/r/20201203220813.16281-1-utkarsh.h.patel@intel.com Signed-off-by: Greg Kroah-Hartman commit d6ff32478d7e95d6ca199b5c852710d6964d5811 Author: Zhang Qilong Date: Mon Nov 23 22:57:19 2020 +0800 usb: ehci-omap: Fix PM disable depth umbalance in ehci_hcd_omap_probe The pm_runtime_enable will decrement the power disable depth. Imbalance depth will resulted in enabling runtime PM of device fails later. Thus a pairing decrement must be needed on the error handling path to keep it balanced. Fixes: 6c984b066d84b ("ARM: OMAP: USBHOST: Replace usbhs core driver APIs by Runtime pm APIs") Acked-by: Alan Stern Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20201123145719.1455849-1-zhangqilong3@huawei.com Signed-off-by: Greg Kroah-Hartman commit c1373f10479b624fb6dba0805d673e860f1b421d Author: Li Jun Date: Tue Dec 8 11:29:12 2020 +0200 xhci: Give USB2 ports time to enter U3 in bus suspend If a USB2 device wakeup is not enabled/supported the link state may still be in U0 in xhci_bus_suspend(), where it's then manually put to suspended U3 state. Just as with selective suspend the device needs time to enter U3 suspend before continuing with further suspend operations (e.g. system suspend), otherwise we may enter system suspend with link state in U0. [commit message rewording -Mathias] Cc: Signed-off-by: Li Jun Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20201208092912.1773650-6-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 5a8e3229ac27956bdcc25b2709e5d196d109a27a Author: Mika Westerberg Date: Tue Dec 8 11:29:11 2020 +0200 xhci-pci: Allow host runtime PM as default for Intel Maple Ridge xHCI Intel Maple Ridge is successor of Titan Ridge Thunderbolt controller. As Titan Ridge this one also includes xHCI host controller. In order to safe energy we should put it to low power state by default when idle. For this reason allow host runtime PM for Maple Ridge. Signed-off-by: Mika Westerberg Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20201208092912.1773650-5-mathias.nyman@linux.intel.com Cc: stable Signed-off-by: Greg Kroah-Hartman commit c4d1ca05b8e68a4b5a3c4455cb6ec25b3df6d9dd Author: Hans de Goede Date: Tue Dec 8 11:29:10 2020 +0200 xhci-pci: Allow host runtime PM as default for Intel Alpine Ridge LP The xHCI controller on Alpine Ridge LP keeps the whole Thunderbolt controller awake if the host controller is not allowed to sleep. This is the case even if no USB devices are connected to the host. Add the Intel Alpine Ridge LP product-id to the list of product-ids for which we allow runtime PM by default. Fixes: 2815ef7fe4d4 ("xhci-pci: allow host runtime PM as default for Intel Alpine and Titan Ridge") Cc: Reviewed-by: Mika Westerberg Signed-off-by: Hans de Goede Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20201208092912.1773650-4-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 2017a1e58472a27e532b9644b4a61dfe18f6baac Author: Tejas Joglekar Date: Tue Dec 8 11:29:09 2020 +0200 usb: xhci: Use temporary buffer to consolidate SG The Synopsys xHC has an internal TRB cache of size TRB_CACHE_SIZE for each endpoint. The default value for TRB_CACHE_SIZE is 16 for SS and 8 for HS. The controller loads and updates the TRB cache from the transfer ring in system memory whenever the driver issues a start transfer or update transfer command. For chained TRBs, the Synopsys xHC requires that the total amount of bytes for all TRBs loaded in the TRB cache be greater than or equal to 1 MPS. Or the chain ends within the TRB cache (with a last TRB). If this requirement is not met, the controller will not be able to send or receive a packet and it will hang causing a driver timeout and error. This can be a problem if a class driver queues SG requests with many small-buffer entries. The XHCI driver will create a chained TRB for each entry which may trigger this issue. This patch adds logic to the XHCI driver to detect and prevent this from happening. For every (TRB_CACHE_SIZE - 2), we check the total buffer size of the SG list and if the last window of (TRB_CACHE_SIZE - 2) SG list length and we don't make up at least 1 MPS, we create a temporary buffer to consolidate full SG list into the buffer. We check at (TRB_CACHE_SIZE - 2) window because it is possible that there would be a link and/or event data TRB that take up to 2 of the cache entries. We discovered this issue with devices on other platforms but have not yet come across any device that triggers this on Linux. But it could be a real problem now or in the future. All it takes is N number of small chained TRBs. And other instances of the Synopsys IP may have smaller values for the TRB_CACHE_SIZE which would exacerbate the problem. Signed-off-by: Tejas Joglekar Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20201208092912.1773650-3-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit bac1ec551434697ca3c5bb5d258811ba5446866a Author: Tejas Joglekar Date: Tue Dec 8 11:29:08 2020 +0200 usb: xhci: Set quirk for XHCI_SG_TRB_CACHE_SIZE_QUIRK This commit uses the private data passed by parent device to set the quirk for Synopsys xHC. This patch fixes the SNPS xHC hang issue when the data is scattered across small buffers which does not make atleast MPS size for given TRB cache size of SNPS xHC. Signed-off-by: Tejas Joglekar Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20201208092912.1773650-2-mathias.nyman@linux.intel.com Cc: stable Signed-off-by: Greg Kroah-Hartman commit 54bf54c859ec1e7c9c3152a2ec53c5fe4078eb1f Merge: e72550928ff05 b097efba9580d Author: Greg Kroah-Hartman Date: Wed Dec 9 14:26:40 2020 +0100 Merge tag 'phy-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy into char-misc-next Vinod writes: phy-for-5.11 - New phy drivers: - Mediatek MT7621 PCIe PHY (promoted from staging) - Ingenic USB phy driver supporting JZ4775 and X2000 - Intel Keem Bay USB PHY driver - Marvell USB HSIC PHY driver supporting MMP3 SoC - AXG MIPI D-PHY driver - Updates: - Conversion to YAML binding for: - Broadcom SATA PHY - Cadence Sierra PHY bindings - STM32 USBC Phy - Support for Exynos5433 PCIe PHY - Support for Qualcomm SM8250 PCIe QMP PHY - Support for Exynos5420 USB2 phy - devm_platform_ioremap_resource conversion for bunch of drivers * tag 'phy-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: (72 commits) drm/mediatek: avoid dereferencing a null hdmi_phy on an error message phy: ingenic: depend on HAS_IOMEM phy: mediatek: statify mtk_hdmi_phy_driver dt-bindings: phy: Convert Broadcom SATA PHY to YAML devicetree: phy: rockchip-emmc add output-tapdelay-select phy: rockchip-emmc: output tap delay dt property PHY: Ingenic: Add USB PHY driver using generic PHY framework. dt-bindings: USB: Add bindings for Ingenic JZ4775 and X2000. USB: PHY: JZ4770: Remove unnecessary function calls. devicetree: phy: rockchip-emmc: pulldown property phy: rockchip: set pulldown for strobe line in dts phy: renesas: rcar-gen3-usb2: disable runtime pm in case of failure phy: mediatek: allow compile-testing the hdmi phy phy/rockchip: Make PHY_ROCKCHIP_INNO_HDMI depend on HAS_IOMEM to fix build error phy: samsung: Merge Kconfig for Exynos5420 and Exynos5250 phy: ralink: phy-mt7621-pci: set correct name in MODULE_DEVICE_TABLE macro phy: ralink: phy-mt7621-pci: drop 'COMPILE_TEST' from Kconfig phy: mediatek: Make PHY_MTK_{XSPHY, TPHY} depend on HAS_IOMEM and OF_ADDRESS to fix build errors phy: tegra: xusb: Fix usb_phy device driver field phy: amlogic: replace devm_reset_control_array_get() ... commit 59d512e4374b2d8a6ad341475dc94c4a4bdec7d3 Author: Nicholas Piggin Date: Sat Nov 7 11:43:36 2020 +1000 powerpc/64: irq replay remove decrementer overflow check This is way to catch some cases of decrementer overflow, when the decrementer has underflowed an odd number of times, while MSR[EE] was disabled. With a typical small decrementer, a timer that fires when MSR[EE] is disabled will be "lost" if MSR[EE] remains disabled for between 4.3 and 8.6 seconds after the timer expires. In any case, the decrementer interrupt would be taken at 8.6 seconds and the timer would be found at that point. So this check is for catching extreme latency events, and it prevents those latencies from being a further few seconds long. It's not obvious this is a good tradeoff. This is already a watchdog magnitude event and that situation is not improved a significantly with this check. For large decrementers, it's useless. Therefore remove this check, which avoids a mftb when enabling hard disabled interrupts (e.g., when enabling after coming from hardware interrupt handlers). Perhaps more importantly, it also removes the clunky MSR[EE] vs PACA_IRQ_HARD_DIS incoherency in soft-interrupt replay which simplifies the code. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201107014336.2337337-1-npiggin@gmail.com commit e89a8ca94bf583f2577fe722483f0304b3390aa2 Author: Nicholas Piggin Date: Fri Nov 6 14:53:40 2020 +1000 powerpc/64s: Remove MSR[ISF] bit No supported processor implements this mode. Setting the bit in MSR values can be a bit confusing (and would prevent the bit from ever being reused). Remove it. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201106045340.1935841-1-npiggin@gmail.com commit c33cd1ed60013ec2ae50f91fed260def5f1d9851 Author: Nicholas Piggin Date: Wed Nov 11 21:07:22 2020 +1000 powerpc/64s/iommu: Don't use atomic_ function on atomic64_t type Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201111110723.3148665-3-npiggin@gmail.com commit da481c4fe0e485cdab5cf4d2761be8b8fb38d3d1 Author: Christophe Leroy Date: Tue Nov 24 19:51:57 2020 +0000 powerpc/32s: Cleanup around PTE_FLAGS_OFFSET in hash_low.S PTE_FLAGS_OFFSET is defined in asm/page_32.h and used only in hash_low.S And PTE_FLAGS_OFFSET nullity depends on CONFIG_PTE_64BIT Instead of tests like #if (PTE_FLAGS_OFFSET != 0), use CONFIG_PTE_64BIT related code. Also move the definition of PTE_FLAGS_OFFSET into hash_low.S directly, that improves readability. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/f5bc21db7a33dab55924734e6060c2e9daed562e.1606247495.git.christophe.leroy@csgroup.eu commit fec6166b44ded68e68144144a02e498580118f1a Author: Christophe Leroy Date: Tue Nov 24 19:51:56 2020 +0000 powerpc/32s: In add_hash_page(), calculate VSID later VSID is only for create_hpte(). When _PAGE_HASHPTE is already set, add_hash_page() bails out without calling create_hpte() and doesn't need the value of VSID. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/3907199974c89b85a3441cf3f528751173b7649c.1606247495.git.christophe.leroy@csgroup.eu commit c5ccb4e78968fbe64f938a5a012fc8ec25cafabf Author: Christophe Leroy Date: Tue Nov 24 19:51:55 2020 +0000 powerpc/32s: Remove unused counters incremented by create_hpte() primary_pteg_full and htab_hash_searches are not used. Remove them. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/6470ab99e58c84a5445af43ce4d1d772b0dc3e93.1606247495.git.christophe.leroy@csgroup.eu commit 7bfe54b5f16561bb703de6482f880614ada8dbf2 Author: Christophe Leroy Date: Fri Nov 6 13:20:54 2020 +0000 powerpc/mm: Refactor the floor/ceiling check in hugetlb range freeing functions All hugetlb range freeing functions have a verification like the following, which only differs by the mask used, depending on the page table level. start &= MASK; if (start < floor) return; if (ceiling) { ceiling &= MASK; if (! ceiling) return; } if (end - 1 > ceiling - 1) return; Refactor that into a helper function which takes the mask as an argument, returning true when [start;end[ is not fully contained inside [floor;ceiling[ Signed-off-by: Christophe Leroy Reviewed-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/16a571bb32eb6e8cd44bda484c8d81cd8a25e6d7.1604668827.git.christophe.leroy@csgroup.eu commit 5f1888a077069988218805534f56b983b6d5710c Author: Christophe Leroy Date: Wed Dec 9 05:29:25 2020 +0000 powerpc/fault: Perform exception fixup in do_page_fault() Exception fixup doesn't require the heady full regs saving, do it from do_page_fault() directly. For that, split bad_page_fault() in two parts. As bad_page_fault() can also be called from other places than handle_page_fault(), it will still perform exception fixup and fallback on __bad_page_fault(). handle_page_fault() directly calls __bad_page_fault() as the exception fixup will now be done by do_page_fault() Signed-off-by: Christophe Leroy Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/bd07d6fef9237614cd6d318d8f19faeeadaa816b.1607491748.git.christophe.leroy@csgroup.eu commit cbd7e6ca0210db05c315a27bb5db5a482f2772ce Author: Christophe Leroy Date: Wed Dec 9 05:29:24 2020 +0000 powerpc/fault: Avoid heavy search_exception_tables() verification search_exception_tables() is an heavy operation, we have to avoid it. When KUAP is selected, we'll know the fault has been blocked by KUAP. When it is blocked by KUAP, check whether we are in an expected userspace access place. If so, emit a warning to spot something is going work. Otherwise, just remain silent, it will likely Oops soon. When KUAP is not selected, it behaves just as if the address was already in the TLBs and no fault was generated. Signed-off-by: Christophe Leroy Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/9870f01e293a5a76c4f4e4ddd4a6b0f63038c591.1607491748.git.christophe.leroy@csgroup.eu commit 3dc12dfe74300febc568c3b530c0f9bee01f2821 Author: Christophe Leroy Date: Wed Dec 9 05:29:23 2020 +0000 powerpc/mm: Move the WARN() out of bad_kuap_fault() In order to prepare the removal of calls to search_exception_tables() on the fast path, move the WARN() out of bad_kuap_fault(). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/9501311014bd6507e04b27a0c3035186ccf65cd5.1607491748.git.christophe.leroy@csgroup.eu commit 5250d026d241febfaf226d26cabe528fc478e225 Author: Christophe Leroy Date: Wed Dec 9 05:29:22 2020 +0000 powerpc/fault: Unnest definition of page_fault_is_write() and page_fault_is_bad() To make it more readable, separate page_fault_is_write() and page_fault_is_bad() to avoir several levels of #ifdefs Signed-off-by: Christophe Leroy Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/6afaac2495248d68f94c438c5ec36b6010931de5.1607491748.git.christophe.leroy@csgroup.eu commit 7ceb40027e19567a0a066e3b380cc034cdd9a124 Author: Christophe Leroy Date: Wed Dec 9 05:29:21 2020 +0000 powerpc/mm: sanity_check_fault() should work for all, not only BOOK3S The verification and message introduced by commit 374f3f5979f9 ("powerpc/mm/hash: Handle user access of kernel address gracefully") applies to all platforms, it should not be limited to BOOK3S. Make the BOOK3S version of sanity_check_fault() the one for all, and bail out earlier if not BOOK3S. Fixes: 374f3f5979f9 ("powerpc/mm/hash: Handle user access of kernel address gracefully") Signed-off-by: Christophe Leroy Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/fe199d5af3578d3bf80035d203a94d742a7a28af.1607491748.git.christophe.leroy@csgroup.eu commit 70b588a068668dd7a92ed19cf0373ba92847957c Author: Christophe Leroy Date: Tue Nov 24 15:24:59 2020 +0000 powerpc/ppc-opcode: Add PPC_RAW_MFSPR() Add PPC_RAW_MFSPR() to replace open coding done in 8xx-pmu.c Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/e281e3a611eead8817c49cf06a60072a021af823.1606231483.git.christophe.leroy@csgroup.eu commit 89eecd938cab80f0da18abbd2ed997a521f83f01 Author: Christophe Leroy Date: Tue Nov 24 15:24:58 2020 +0000 powerpc/8xx: Use SPRN_SPRG_SCRATCH2 in DTLB miss exception Use SPRN_SPRG_SCRATCH2 in DTLB miss exception instead of DAR in order to be similar to ITLB miss exception. This also simplifies mpc8xx_pmu_del() Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/e3cc8f023ef40e1e8ae144e4dd1330a5ff022528.1606231483.git.christophe.leroy@csgroup.eu commit a314ea5abf6dbaf35f14c9bd1d93105260fb9336 Author: Christophe Leroy Date: Tue Nov 24 15:24:57 2020 +0000 powerpc/8xx: Use SPRN_SPRG_SCRATCH2 in ITLB miss exception In order to re-enable MMU earlier, ensure ITLB miss exception cannot clobber SPRN_SPRG_SCRATCH0 and SPRN_SPRG_SCRATCH1. Do so by using SPRN_SPRG_SCRATCH2 and SPRN_M_TW instead, like the DTLB miss exception. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/abc78e8e9577d473691ebb9996c6413b37bfd9ca.1606231483.git.christophe.leroy@csgroup.eu commit 576e02bbf1062b9118d5bbb96a40ed3b6b359f22 Author: Christophe Leroy Date: Tue Nov 24 15:24:56 2020 +0000 powerpc/8xx: Simplify INVALIDATE_ADJACENT_PAGES_CPU15 We now have r11 available as a scratch register so INVALIDATE_ADJACENT_PAGES_CPU15() can be simplified. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/bdafd651b4ac3a851fd09249f5f3699c50da29f2.1606231483.git.christophe.leroy@csgroup.eu commit bccc58986a2f98e3af349c85c5f49aac7fb19ef2 Author: Christophe Leroy Date: Tue Nov 24 15:24:55 2020 +0000 powerpc/8xx: Always pin kernel text TLB There is no big poing in not pinning kernel text anymore, as now we can keep pinned TLB even with things like DEBUG_PAGEALLOC. Remove CONFIG_PIN_TLB_TEXT, making it always right. Signed-off-by: Christophe Leroy [mpe: Drop ifdef around mmu_pin_tlb() to fix build errors] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/203b89de491e1379f1677a2685211b7c32adfff0.1606231483.git.christophe.leroy@csgroup.eu commit 1825c8d7ce93c4725cb04ad09627fc2829de32ca Author: Gao Xiang Date: Wed Dec 9 20:37:17 2020 +0800 erofs: force inplace I/O under low memory scenario Try to forcely switch to inplace I/O under low memory scenario in order to avoid direct memory reclaim due to cached page allocation. Link: https://lore.kernel.org/r/20201209123717.12430-1-hsiangkao@aol.com Reviewed-by: Chao Yu Signed-off-by: Gao Xiang commit b0dfd948379c79b8754e224e29b99d30ce0d79b8 Author: Damien Le Moal Date: Sun Dec 6 10:18:17 2020 +0900 spi: dw: Add support for the Canaan K210 SoC SPI The Canaan Kendryte K210 RISC-V SoC includes a DW apb_ssi v4 controller which is documented to have a 32 words deep TX and RX FIFO. The FIFO length detection in spi_hw_init() correctly detects this value. However, when the controller RX FIFO is filled up to 32 entries (RXFLR = 32), an RX FIFO overrun error occurs. This likely due to a hardware bug which can be avoided by force setting the fifo_len field of struct dw_spi to 31. Define the dw_spi_canaan_k210_init() function to force set fifo_len to 31 when the device node compatible string is "canaan,k210-spi". Signed-off-by: Damien Le Moal Acked-by: Serge Semin Link: https://lore.kernel.org/r/20201206011817.11700-4-damien.lemoal@wdc.com Signed-off-by: Mark Brown commit a51acc2400d47df0f87e1f011c63266421c594b9 Author: Damien Le Moal Date: Sun Dec 6 10:18:16 2020 +0900 spi: dw: Add support for 32-bits max xfer size The Synopsis DesignWare DW_apb_ssi specifications version 3.23 onward define a 32-bits maximum transfer size synthesis parameter (SSI_MAX_XFER_SIZE=32) in addition to the legacy 16-bits configuration (SSI_MAX_XFER_SIZE=16) for SPI controllers. When SSI_MAX_XFER_SIZE=32, the layout of the ctrlr0 register changes, moving the data frame format field from bits [3..0] to bits [16..20], and the RX/TX FIFO word size can be up to 32-bits. To support this new format, introduce the DW SPI capability flag DW_SPI_CAP_DFS32 to indicate that a controller is configured with SSI_MAX_XFER_SIZE=32. Since SSI_MAX_XFER_SIZE is a controller synthesis parameter not accessible through a register, the detection of this parameter value is done in spi_hw_init() by writing and reading the ctrlr0 register and testing the value of bits [3..0]. These bits are ignored (unchanged) for SSI_MAX_XFER_SIZE=16, allowing the detection. If a DFS32 capable SPI controller is detected, the new field dfs_offset in struct dw_spi is set to SPI_DFS32_OFFSET (16). dw_spi_update_config() is modified to set the data frame size field at the correct position is the CTRLR0 register, as indicated by the dfs_offset field of the dw_spi structure. The DW_SPI_CAP_DFS32 flag is also unconditionally set for SPI slave controllers, e.g. controllers that have the DW_SPI_CAP_DWC_SSI capability flag set. However, for these ssi controllers, the dfs_offset field is set to 0 as before (as per specifications). Finally, for any controller with the DW_SPI_CAP_DFS32 capability flag set, dw_spi_add_host() extends the value of bits_per_word_mask from 16-bits to 32-bits. dw_reader() and dw_writer() are also modified to handle 32-bits iTX/RX FIFO words. Suggested-by: Sean Anderson Signed-off-by: Damien Le Moal Acked-by: Serge Semin Link: https://lore.kernel.org/r/20201206011817.11700-3-damien.lemoal@wdc.com Signed-off-by: Mark Brown commit 7b14a272f9ac2438a85e59571fdb5a653d86430b Author: Damien Le Moal Date: Sun Dec 6 10:18:15 2020 +0900 dt-bindings: spi: dw-apb-ssi: Add Canaan K210 SPI controller Update the snps,dw-apb-ssi.yaml document to include the compatibility string "canaan,k210-spi" compatible string for the Canaan Kendryte K210 RISC-V SoC DW apb_ssi V4 SPI controller. Signed-off-by: Damien Le Moal Acked-by: Serge Semin Link: https://lore.kernel.org/r/20201206011817.11700-2-damien.lemoal@wdc.com Signed-off-by: Mark Brown commit 397e089bda327a350c1cb29133cb66795339a5d9 Author: Derek Fang Date: Wed Dec 9 17:13:08 2020 +0800 ASoC: rt1015: check the return value of regmap_read during i2c probe In some projects, the device ID register is not read correctly. This patch helps to verify the issue is caused from i2c host or client. Signed-off-by: Derek Fang Link: https://lore.kernel.org/r/20201209091308.2823-1-derek.fang@realtek.com Signed-off-by: Mark Brown commit e648e3f1165354f04a4deed1f41152a287b68d59 Author: Paul Cercueil Date: Mon Dec 7 12:53:37 2020 +0000 ASoC: codecs/jz4770: Add DAPM widget to set HP out to cap-less mode Cap-less mode is useful e.g. if the headphones are used as an antenna for a FM radio, so that the signal is not altered. For everything else, we want the cap-couple mode. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20201207125338.119397-5-paul@crapouillou.net Signed-off-by: Mark Brown commit 4f293dfea9f6d23a972be0e38556f5b0c02c2d4e Author: Paul Cercueil Date: Mon Dec 7 12:53:36 2020 +0000 ASoC: codecs/jz4770: Don't change cap-couple setting in HP PMU/PMD There is simply no reason to do that. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20201207125338.119397-4-paul@crapouillou.net Signed-off-by: Mark Brown commit 6b4da5374b10a48be18df26288125746f1858507 Author: Christophe Branchereau Date: Mon Dec 7 12:53:35 2020 +0000 ASoC: codecs/jz4770: Adjust timeouts for cap-coupled outputs When using cap-coupled outputs, the RUP/RDO can take much longer than the 100ms timeout we used to have. Increase that timeout to one second. Signed-off-by: Christophe Branchereau Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20201207125338.119397-3-paul@crapouillou.net Signed-off-by: Mark Brown commit a346c77836183f6e3e054c5da022e0fde2773683 Author: Christophe Branchereau Date: Mon Dec 7 12:53:34 2020 +0000 ASoC: codecs/jz4770: Reset interrupt flags in bias PREPARE In case a poll for RUP times out, we might be left with some IRQ flags that should be cleared before the next power on. Signed-off-by: Christophe Branchereau Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20201207125338.119397-2-paul@crapouillou.net Signed-off-by: Mark Brown commit ad13c835442cdb2a964588fd03327f51dbcd4dfa Author: Paul Cercueil Date: Mon Dec 7 12:53:33 2020 +0000 ASoC: codecs/jz47xx: Use regmap_{set,clear}_bits Use regmap_{set,clear}_bits instead of regmap_update_bits, when applicable. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20201207125338.119397-1-paul@crapouillou.net Signed-off-by: Mark Brown commit 6374f493d93b2232444b94989c380d5aada5b810 Author: Kuninori Morimoto Date: Tue Dec 1 08:51:33 2020 +0900 ASoC: soc-pcm: care trigger rollback soc_pcm_trigger() calls DAI/Component/Link trigger, but some of them might be failed. static int soc_pcm_trigger(...) { ... switch (cmd) { case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_RESUME: case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: ret = snd_soc_link_trigger(substream, cmd); if (ret < 0) break; (*) ret = snd_soc_pcm_component_trigger(substream, cmd); if (ret < 0) break; ret = snd_soc_pcm_dai_trigger(substream, cmd); break; case SNDRV_PCM_TRIGGER_STOP: case SNDRV_PCM_TRIGGER_SUSPEND: case SNDRV_PCM_TRIGGER_PAUSE_PUSH: ret = snd_soc_pcm_dai_trigger(substream, cmd); if (ret < 0) break; ret = snd_soc_pcm_component_trigger(substream, cmd); if (ret < 0) break; ret = snd_soc_link_trigger(substream, cmd); break; } ... } For example, if soc_pcm_trigger() failed at (*) point, we need to rollback previous succeeded trigger. This patch adds trigger mark for DAI/Component/Link, and do STOP if START/RESUME/PAUSE_RELEASE were failed. Because it need to use new rollback parameter, we need to modify DAI/Component/Link trigger functions in the same time. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87a6uycssd.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit a9faca15a644ff754a9d6e3c9e81f91cb8ca59bd Author: Kuninori Morimoto Date: Tue Dec 1 08:51:25 2020 +0900 ASoC: soc-pcm: remove dpcm_do_trigger() dpcm_be_dai_trigger() is calling dpcm_do_trigger() at each SNDRV_PCM_TRIGGER_xxx (1). int dpcm_be_dai_trigger(...) { for_each_dpcm_be(fe, stream, dpcm) { (B) ... switch (cmd) { case SNDRV_PCM_TRIGGER_START: ... (1) ret = dpcm_do_trigger(...); ... case SNDRV_PCM_TRIGGER_RESUME: ... (1) ret = dpcm_do_trigger(...); ... case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: ... (1) ret = dpcm_do_trigger(...); ... case SNDRV_PCM_TRIGGER_STOP: ... (1) ret = dpcm_do_trigger(...); ... case SNDRV_PCM_TRIGGER_SUSPEND: ... (1) ret = dpcm_do_trigger(...); ... case SNDRV_PCM_TRIGGER_PAUSE_PUSH: ... (1) ret = dpcm_do_trigger(...); ... } } } But it is just very verbose and duplicated function. Because We can indicate dev_dbg() (A) at dpcm_be_dai_trigger() (B). And dev_err() (C) is not needed because soc_pcm_trigger() itself indicates error message when error. static int dpcm_do_trigger(...) { int ret; (A) dev_dbg(...); ret = soc_pcm_trigger(substream, cmd); if (ret < 0) (C) dev_err(...); return ret; } This patch replace dpcm_do_trigger() to soc_pcm_trigger(). Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87blfecssk.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 55d8e6a85bce21f748c42eedea63681219f70523 Author: Jaroslav Kysela Date: Tue Dec 8 19:12:33 2020 +0100 ASoC: AMD Raven/Renoir - fix the PCI probe (PCI revision) The Raven and Renoir ACP can be distinguished by the PCI revision. Let's do the check very early, otherwise the wrong probe code can be run. Link: https://lore.kernel.org/alsa-devel/2e4587f8-f602-cf23-4845-fd27a32b1cfc@amd.com/ Cc: Cc: Vijendar Mukunda Cc: Mark Brown Signed-off-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20201208181233.2745726-1-perex@perex.cz Signed-off-by: Mark Brown commit 3cea33b6f2d7782d1be17c71509986f33ee93541 Author: Dan Carpenter Date: Wed Dec 9 09:54:51 2020 +0300 ASoC: max98390: Fix error codes in max98390_dsm_init() These error paths return success but they should return -EINVAL. Fixes: 97ed3e509ee6 ("ASoC: max98390: Fix potential crash during param fw loading") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/X9B0uz4svyNTqeMb@mwanda Signed-off-by: Mark Brown commit 1bea2256aa96a2d7b1b576eb74e29d79edc9bea8 Author: Chris Chiu Date: Tue Dec 8 14:04:14 2020 +0800 ASoC: Intel: bytcr_rt5640: Add quirk for ARCHOS Cesium 140 Tha ARCHOS Cesium 140 tablet has problem with the jack-sensing, thus the heaset functions are not working. Add quirk for this model to select the correct input map, jack-detect options and channel map to enable jack sensing and headset microphone. This device uses IN1 for its internal MIC and JD2 for jack-detect. Signed-off-by: Chris Chiu Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20201208060414.27646-1-chiu@endlessos.org Signed-off-by: Mark Brown commit 71fe89ceb55bc0a85121b757cc8d3fb6ff457263 Author: Christoph Hellwig Date: Wed Dec 9 12:20:19 2020 +0100 dma-iommu: remove __iommu_dma_mmap The function has a single caller, so open code it there and take advantage of the precalculated page count variable. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20201209112019.2625029-1-hch@lst.de Signed-off-by: Will Deacon commit b031a684bfd01d633c79d281bd0cf11c2f834ada Author: John Ogness Date: Wed Dec 9 01:50:53 2020 +0106 printk: remove logbuf_lock writer-protection of ringbuffer Since the ringbuffer is lockless, there is no need for it to be protected by @logbuf_lock. Remove @logbuf_lock writer-protection of the ringbuffer. The reader-protection is not removed because some variables, used by readers, are using @logbuf_lock for synchronization: @syslog_seq, @syslog_time, @syslog_partial, @console_seq, struct kmsg_dumper. For PRINTK_NMI_DIRECT_CONTEXT_MASK, @logbuf_lock usage is not removed because it may be used for dumper synchronization. Without @logbuf_lock synchronization of vprintk_store() it is no longer possible to use the single static buffer for temporarily sprint'ing the message. Instead, use vsnprintf() to determine the length and perform the real vscnprintf() using the area reserved from the ringbuffer. This leads to suboptimal packing of the message data, but will result in less wasted storage than multiple per-cpu buffers to support lockless temporary sprint'ing. Signed-off-by: John Ogness Reviewed-by: Sergey Senozhatsky Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20201209004453.17720-3-john.ogness@linutronix.de commit 6b916706f8f09348cfa4fdd3642ebf87d6a2a26b Author: John Ogness Date: Wed Dec 9 01:50:52 2020 +0106 printk: inline log_output(),log_store() in vprintk_store() In preparation for removing logbuf_lock, inline log_output() and log_store() into vprintk_store(). This will simplify dealing with the various code branches and fallbacks that are possible. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20201209004453.17720-2-john.ogness@linutronix.de commit 3a514592b698588326924625b6948a10c35fadd5 Merge: 17f84520cb8fc 0cc519f85a527 Author: Marc Zyngier Date: Wed Dec 9 10:00:24 2020 +0000 Merge remote-tracking branch 'origin/kvm-arm64/psci-relay' into kvmarm-master/next Signed-off-by: Marc Zyngier commit a0db197f534fb24d64cc8c716b5f128f2de1c898 Author: Marc Zyngier Date: Fri Dec 4 16:47:36 2020 +0000 gpiolib: cdev: Flag invalid GPIOs as used When reporting the state of a GPIO to userspace, we never check for the actual validity of the line, meaning we report invalid lines as being usable. A subsequent request will fail though, which is an inconsistent behaviour from a userspace perspective. Instead, let's check for the validity of the line and report it as used if it is invalid. This allows a tool such as gpioinfo to report something sensible: gpiochip3 - 4 lines: line 0: unnamed unused input active-high line 1: unnamed kernel input active-high [used] line 2: unnamed kernel input active-high [used] line 3: unnamed unused input active-high In this example, lines 1 and 2 are invalid, and cannot be used by userspace. Signed-off-by: Marc Zyngier Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201204164739.781812-2-maz@kernel.org Signed-off-by: Linus Walleij commit e51d68e76d604c6d5d1eb13ae1d6da7f6c8c0dfc Author: Anant Thazhemadam Date: Wed Dec 9 01:13:38 2020 +0530 fs: quota: fix array-index-out-of-bounds bug by passing correct argument to vfs_cleanup_quota_inode() When dquot_resume() was last updated, the argument that got passed to vfs_cleanup_quota_inode was incorrectly set. If type = -1 and dquot_load_quota_sb() returns a negative value, then vfs_cleanup_quota_inode() gets called with -1 passed as an argument, and this leads to an array-index-out-of-bounds bug. Fix this issue by correctly passing the arguments. Fixes: ae45f07d47cc ("quota: Simplify dquot_resume()") Link: https://lore.kernel.org/r/20201208194338.7064-1-anant.thazhemadam@gmail.com Reported-by: syzbot+2643e825238d7aabb37f@syzkaller.appspotmail.com Tested-by: syzbot+2643e825238d7aabb37f@syzkaller.appspotmail.com CC: stable@vger.kernel.org Signed-off-by: Anant Thazhemadam Signed-off-by: Jan Kara commit 38dc717e97153e46375ee21797aa54777e5498f3 Author: Jessica Yu Date: Fri Nov 27 10:09:39 2020 +0100 module: delay kobject uevent until after module init call Apparently there has been a longstanding race between udev/systemd and the module loader. Currently, the module loader sends a uevent right after sysfs initialization, but before the module calls its init function. However, some udev rules expect that the module has initialized already upon receiving the uevent. This race has been triggered recently (see link in references) in some systemd mount unit files. For instance, the configfs module creates the /sys/kernel/config mount point in its init function, however the module loader issues the uevent before this happens. sys-kernel-config.mount expects to be able to mount /sys/kernel/config upon receipt of the module loading uevent, but if the configfs module has not called its init function yet, then this directory will not exist and the mount unit fails. A similar situation exists for sys-fs-fuse-connections.mount, as the fuse sysfs mount point is created during the fuse module's init function. If udev is faster than module initialization then the mount unit would fail in a similar fashion. To fix this race, delay the module KOBJ_ADD uevent until after the module has finished calling its init routine. References: https://github.com/systemd/systemd/issues/17586 Reviewed-by: Greg Kroah-Hartman Tested-By: Nicolas Morey-Chaisemartin Signed-off-by: Jessica Yu commit 7e413528474d5895e3e315c019fb0c43522eb6d9 Author: Chris Chiu Date: Wed Dec 9 12:57:30 2020 +0800 ALSA: hda/realtek - Enable headset mic of ASUS Q524UQK with ALC255 The ASUS laptop Q524UQK with ALC255 codec can't detect the headset microphone until ALC255_FIXUP_ASUS_MIC_NO_PRESENCE quirk applied. Signed-off-by: Chris Chiu Signed-off-by: Jian-Hong Pan Cc: Link: https://lore.kernel.org/r/20201209045730.9972-1-chiu@endlessos.org Signed-off-by: Takashi Iwai commit 54649911f31b6e7c2a79a1426ca98259139e4c35 Author: Ard Biesheuvel Date: Thu Oct 29 14:49:01 2020 +0100 efi: stub: get rid of efi_get_max_fdt_addr() Now that ARM started following the example of arm64 and RISC-V, and no longer imposes any restrictions on the placement of the FDT in memory at boot, we no longer need per-arch implementations of efi_get_max_fdt_addr() to factor out the differences. So get rid of it. Signed-off-by: Ard Biesheuvel Reviewed-by: Atish Patra Link: https://lore.kernel.org/r/20201029134901.9773-1-ardb@kernel.org commit ff20661bb54cd57a18207b33cc57eb8d5c758a86 Author: Heinrich Schuchardt Date: Fri Nov 27 20:20:51 2020 +0100 efi/efi_test: read RuntimeServicesSupported Since the UEFI 2.8A specification the UEFI enabled firmware provides a configuration table EFI_RT_PROPERTIES_TABLE which indicates which runtime services are enabled. The EFI stub reads this table and saves the value of the field RuntimeServicesSupported internally. The Firmware Test Suite requires the value to determine if UEFI runtime services are correctly implemented. With this patch an IOCTL call is provided to read the value of the field RuntimeServicesSupported, e.g. #define EFI_RUNTIME_GET_SUPPORTED_MASK \ _IOR('p', 0x0C, unsigned int) unsigned int mask; fd = open("/dev/efi_test", O_RDWR); ret = ioctl(fd, EFI_RUNTIME_GET_SUPPORTED_MASK, &mask); Signed-off-by: Heinrich Schuchardt Link: https://lore.kernel.org/r/20201127192051.1430-1-xypron.glpk@gmx.de Acked-by: Colin Ian King Acked-by: Ivan Hu Signed-off-by: Ard Biesheuvel commit c0249238feefbbb99d517d06ace4338393901b67 Author: Ard Biesheuvel Date: Thu Nov 12 15:42:27 2020 +0100 efi: arm: reduce minimum alignment of uncompressed kernel Now that we reduced the minimum relative alignment between PHYS_OFFSET and PAGE_OFFSET to 2 MiB, we can take this into account when allocating memory for the decompressed kernel when booting via EFI. This minimizes the amount of unusable memory we may end up with due to the base of DRAM being occupied by firmware. Signed-off-by: Ard Biesheuvel commit 4dbe44fb538c59a4adae5abfa9ded2f310250315 Author: Ard Biesheuvel Date: Mon Dec 7 18:40:53 2020 +0100 efi: capsule: clean scatter-gather entries from the D-cache Scatter-gather lists passed to UpdateCapsule() should be cleaned from the D-cache to ensure that they are visible to the CPU after a warm reboot before the MMU is enabled. On ARM and arm64 systems, this implies a D-cache clean by virtual address to the point of coherency. However, due to the fact that the firmware itself is not able to map physical addresses back to virtual addresses when running under the OS, this must be done by the caller. Signed-off-by: Ard Biesheuvel commit 3f79e541593fecc2a90687eb7162e15a499caa33 Author: Ping-Ke Shih Date: Mon Dec 7 11:19:03 2020 +0800 rtlwifi: rtl8192de: fix ofdm power compensation ofdm_index[] is used to indicate how many power compensation is needed to current thermal value. For internal PA module or 2.4G band, the min_index is different from other cases. This issue originally is reported by Dan. He found the size of ofdm_index[] is 2, but access index 'i' may be equal to 2 if 'rf' is 2 in case of 'is2t'. In fact, the chunk of code is added to wrong place, so move it back to proper place, and then power compensation and buffer overflow are fixed. Reported-by: Dan Carpenter Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201207031903.7599-1-pkshih@realtek.com commit 8a71f34bb251d59e9d577df196c450cec14773ff Author: Mathy Vanhoef Date: Wed Nov 4 10:18:23 2020 +0400 ath9k_htc: adhere to the DONT_REORDER transmit flag Assure that frames with the fixed order flag are not reordered relative to each other. This is accomplished by transmitting them using a fixed priority independent of their QoS field. Signed-off-by: Mathy Vanhoef Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201104061823.197407-6-Mathy.Vanhoef@kuleuven.be commit 743b9065fe6348a5f8f5ce04869ce2d701e5e1bc Author: Pradeep Kumar Chitrapu Date: Tue Oct 20 11:31:11 2020 -0700 ath11k: mesh: add support for 256 bitmap in blockack frames in 11ax Currently 256 bitmap in blockack frames is being set only for AP mode. Fix this to set whenever beacon has changed and has HE capability, there by supporting mesh as well. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01228-QCAHKSWPL_SILICONZ-1 Signed-off-by: Pradeep Kumar Chitrapu Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201020183111.25458-5-pradeepc@codeaurora.org commit bd88815060d96dfff18690db99e46136aebef8b3 Author: Pradeep Kumar Chitrapu Date: Tue Oct 20 11:31:10 2020 -0700 ath11k: support TXOP duration based RTS threshold HE operation IE in beacons is constructed based on userspace params, which firmware might not be aware of. This causes firmware not to configure TXOP duration based RTS threshold which could cause mismatch in behaviour with respect to what is being advertised in beacons. This patch sends HE operation IE fetched from beacon to firmware using WMI interface for configuration. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01228-QCAHKSWPL_SILICONZ-1 Signed-off-by: Pradeep Kumar Chitrapu Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201020183111.25458-4-pradeepc@codeaurora.org commit f00490432b601a707445a45207962e0fb107fed8 Author: Pradeep Kumar Chitrapu Date: Tue Oct 20 11:31:09 2020 -0700 ath11k: fix incorrect wmi param for configuring HE operation WMI_VDEV_PARAM_TX_OFDMA_CPLEN has been added with incorrect enum value. Fix the enum to represent WMI param for configuring HE operation field. This is applicable to firmwares under https://github.com/kvalo/ath11k-firmware/tree/master/IPQ8074/hw2.0 https://github.com/kvalo/ath11k-firmware/tree/master/IPQ6018/hw1.0 https://github.com/kvalo/ath11k-firmware/tree/master/QCN9074/hw1.0 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01228-QCAHKSWPL_SILICONZ-1 Signed-off-by: Pradeep Kumar Chitrapu Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201020183111.25458-3-pradeepc@codeaurora.org commit 59ec8e2fa5aaed6afd18d5362dc131aab92406e7 Author: Dan Carpenter Date: Tue Dec 8 09:52:57 2020 +0200 ath11k: unlock on error path in ath11k_mac_op_add_interface() These error paths need to drop the &ar->conf_mutex before returning. Fixes: 690ace20ff79 ("ath11k: peer delete synchronization with firmware") Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/X85sVGVP/0XvlrEJ@mwanda commit b6041e1a302006b899e6838609f6ad933c1a815c Author: Gustavo A. R. Silva Date: Tue Dec 8 09:52:57 2020 +0200 wcn36xx: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by replacing a /* fall through */ comment with the new pseudo-keyword macro fallthrough; instead of letting the code fall through to the next case. Notice that Clang doesn't recognize /* fall through */ comments as implicit fall-through markings. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/f932c887e013767cbdabfdddd671086e8ae63193.1605896060.git.gustavoars@kernel.org commit e2cb11165445eccec877c8cc77bb4e461cf3c561 Author: Gustavo A. R. Silva Date: Tue Dec 8 09:52:57 2020 +0200 carl9170: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/04257418814755f081fa0ac14a61b01328cdc4ed.1605896059.git.gustavoars@kernel.org commit e64fa6d92ac4b978fcd2b4079ae71f7a4ea31f48 Author: Gustavo A. R. Silva Date: Tue Dec 8 09:52:56 2020 +0200 ath5k: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/e127232621c4de340509047a11d98093958303c5.1605896059.git.gustavoars@kernel.org commit 61a57e51e46e8eb7df8a3acff2e6da279f2161a3 Author: Anilkumar Kolli Date: Tue Dec 8 09:52:55 2020 +0200 ath11k: fix rmmod failure if qmi sequence fails QMI sequence fails if caldata file is not available. It is observed that 'rmmod ath11k' fails if qmi message fails. With this patch rmmod/insmod is working. Logs: Direct firmware load for IPQ8074/caldata.bin failed with error -2 Falling back to user helper qmi failed to load CAL: IPQ8074/caldata.bin qmi failed to load board data file:-11 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-00009-QCAHKSWPL_SILICONZ-1 Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01699-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1606916215-24643-1-git-send-email-akolli@codeaurora.org commit 613df979da6c032cbe6fa273fb8ca21af022157e Author: Christophe Leroy Date: Tue Nov 24 15:24:54 2020 +0000 powerpc/8xx: DEBUG_PAGEALLOC doesn't require an ITLB miss exception handler Since commit e611939fc8ec ("powerpc/mm: Ensure change_page_attr() doesn't invalidate pinned TLBs"), pinned TLBs are not anymore invalidated by __kernel_map_pages() when CONFIG_DEBUG_PAGEALLOC is selected. Remove the dependency on CONFIG_DEBUG_PAGEALLOC. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/e796c5fcb5898de827c803cf1ab8ba1d7a5d4b76.1606231483.git.christophe.leroy@csgroup.eu commit ad3ed15cd04b96de7c38204ba7c698cbccd8fe88 Author: Christophe Leroy Date: Fri Dec 4 10:12:51 2020 +0000 powerpc/process: Remove target specific __set_dabr() __set_dabr() are simple functions that can be inline directly inside set_dabr() and using IS_ENABLED() instead of #ifdef Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/c10b263668e137236c71d76648b03cf2cd1ee66f.1607076733.git.christophe.leroy@csgroup.eu commit 1e78f723d6a52966bfe3804209dbf404fdc9d3bb Author: Christophe Leroy Date: Fri Dec 4 10:11:34 2020 +0000 powerpc/8xx: Fix early debug when SMC1 is relocated When SMC1 is relocated and early debug is selected, the board hangs is ppc_md.setup_arch(). This is because ones the microcode has been loaded and SMC1 relocated, early debug writes in the weed. To allow smooth continuation, the SMC1 parameter RAM set up by the bootloader have to be copied into the new location. Fixes: 43db76f41824 ("powerpc/8xx: Add microcode patch to move SMC parameter RAM.") Cc: stable@vger.kernel.org Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/b2f71f39eca543f1e4ec06596f09a8b12235c701.1607076683.git.christophe.leroy@csgroup.eu commit 1b03e71ff6f2bd10b45a0128ce76e0e42014a44c Author: Christophe Leroy Date: Mon Nov 16 16:09:31 2020 +0000 powerpc/32s: Handle PROTFAULT in hash_page() also for CONFIG_PPC_KUAP On hash 32 bits, handling minor protection faults like unsetting dirty flag is heavy if done from the normal page_fault processing, because it implies hash table software lookup for flushing the entry and then a DSI is taken anyway to add the entry back. When KUAP was implemented, as explained in commit a68c31fc01ef ("powerpc/32s: Implement Kernel Userspace Access Protection"), protection faults has been diverted from hash_page() because hash_page() was not able to identify a KUAP fault. Implement KUAP verification in hash_page(), by clearing write permission when the access is a kernel access and Ks is 1. This works regardless of the address because kernel segments always have Ks set to 0 while user segments have Ks set to 0 only when kernel write to userspace is granted. Then protection faults can be handled by hash_page() even for KUAP. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/8a4ffe4798e9ea32aaaccdf85e411bb1beed3500.1605542955.git.christophe.leroy@csgroup.eu commit 2c07b0fd9bf6dfb0bdf05aac018e6b3242d60822 Merge: e91e3d902b76c 6ee70e8c34e37 Author: Viresh Kumar Date: Wed Dec 9 11:24:12 2020 +0530 Merge branch 'opp/empty' into opp/linux-next commit 6ee70e8c34e37a34f4dc2c8bc06febffd375fac4 Author: Nicola Mazzucato Date: Tue Dec 8 17:42:27 2020 +0000 opp: of: Allow empty opp-table with opp-shared The opp binding now allows to have an empty opp table and shared-opp to still describe that devices share v/f lines. When initialising an empty opp table, allow such case by: - treating such conditions with warnings in place of errors - don't fail on empty table Signed-off-by: Nicola Mazzucato Signed-off-by: Viresh Kumar commit 24b3c963c0108f3da6d978d74a745c824ab551dc Author: Nicola Mazzucato Date: Tue Dec 8 17:42:26 2020 +0000 dt-bindings: opp: Allow empty OPP tables Currently the optional property opp-shared is used within an opp table to tell that a set of devices share their clock/voltage lines (and the OPP points). It is therefore possible to use an empty OPP table to convey only that information, useful in situations where the opp points are provided via other means (hardware. firmware, etc). Update the documentation to remark this additional case and provide an example. Signed-off-by: Nicola Mazzucato Signed-off-by: Viresh Kumar commit e91e3d902b76c3f2a238873a17958080af018f08 Author: Viresh Kumar Date: Fri Nov 6 12:18:39 2020 +0530 media: venus: dev_pm_opp_put_*() accepts NULL argument The dev_pm_opp_put_*() APIs now accepts a NULL opp_table pointer and so there is no need for us to carry the extra check. Drop them. Signed-off-by: Viresh Kumar commit b66ba5b5938f8a51d4cb97d1392065d09551bc75 Author: Viresh Kumar Date: Fri Nov 6 12:18:39 2020 +0530 drm/panfrost: dev_pm_opp_put_*() accepts NULL argument The dev_pm_opp_put_*() APIs now accepts a NULL opp_table pointer and so there is no need for us to carry the extra check. Drop them. Reviewed-by: Steven Price Signed-off-by: Viresh Kumar commit 72ba9e226fac8a9958b5201428a387c348515289 Author: Viresh Kumar Date: Fri Nov 6 12:18:39 2020 +0530 drm/lima: dev_pm_opp_put_*() accepts NULL argument The dev_pm_opp_put_*() APIs now accepts a NULL opp_table pointer and so there is no need for us to carry the extra check. Drop them. Reviewed-by: Qiang Yu Signed-off-by: Viresh Kumar commit 814568728373699907971f897b89d95736b0d880 Author: Viresh Kumar Date: Fri Nov 6 12:18:39 2020 +0530 PM / devfreq: exynos: dev_pm_opp_put_*() accepts NULL argument The dev_pm_opp_put_*() APIs now accepts a NULL opp_table pointer and so there is no need for us to carry the extra check. Drop them. Acked-by: Chanwoo Choi Signed-off-by: Viresh Kumar commit 2ff8fe13ac6da7a7c45d610cc3237c8556610f07 Author: Viresh Kumar Date: Fri Nov 6 12:18:39 2020 +0530 cpufreq: qcom-cpufreq-nvmem: dev_pm_opp_put_*() accepts NULL argument The dev_pm_opp_put_*() APIs now accepts a NULL opp_table pointer and so there is no need for us to carry the extra checks. Drop them. Reviewed-by: Ilia Lin Signed-off-by: Viresh Kumar commit 5f6ffb8d8f8fdf672cbc4f27888ce075df13d49c Author: Viresh Kumar Date: Fri Nov 6 12:18:39 2020 +0530 cpufreq: dt: dev_pm_opp_put_regulators() accepts NULL argument The dev_pm_opp_put_*() APIs now accepts a NULL opp_table pointer and so there is no need for us to carry the extra checks. Drop them. Signed-off-by: Viresh Kumar commit c7bf8758c955e6272c0f4b2411d7a85abce8fafe Author: Viresh Kumar Date: Fri Nov 6 12:16:52 2020 +0530 opp: Allow dev_pm_opp_put_*() APIs to accept NULL opp_table This allows the callers to drop the unnecessary checks. Signed-off-by: Viresh Kumar commit e77dcb0b732dd355ca594909f6c2085dfc46cde2 Author: Viresh Kumar Date: Fri Nov 6 10:37:16 2020 +0530 opp: Don't create an OPP table from dev_pm_opp_get_opp_table() It has been found that some users (like cpufreq-dt and others on LKML) have abused the helper dev_pm_opp_get_opp_table() to create the OPP table instead of just finding it, which is the wrong thing to do. This routine was meant for OPP core's internal working and exposed the whole functionality by mistake. Change the scope of dev_pm_opp_get_opp_table() to only finding the table. The internal helpers _opp_get_opp_table*() are thus renamed to _add_opp_table*(), dev_pm_opp_get_opp_table_indexed() is removed (as we don't need the index field for finding the OPP table) and so the only user, genpd, is updated. Note that the prototype of _add_opp_table() was already left in opp.h by mistake when it was removed earlier and so we weren't required to add it now. Acked-by: Ulf Hansson Signed-off-by: Viresh Kumar commit 873c9851eb54b78c27a0d753f6dd7e377572a0aa Author: Viresh Kumar Date: Fri Nov 6 10:28:43 2020 +0530 cpufreq: dt: Don't (ab)use dev_pm_opp_get_opp_table() to create OPP table Initially, the helper dev_pm_opp_get_opp_table() was supposed to be used only for the OPP core's internal use (it tries to find an existing OPP table and if it doesn't find one, then it allocates the OPP table). Sometime back, the cpufreq-dt driver started using it to make sure all the relevant resources required by the OPP core are available earlier during initialization process to properly propagate -EPROBE_DEFER. It worked but it also abused the API to create an OPP table, which should be created with the help of other helpers provided by the OPP core. The OPP core will be updated in a later commit to limit the scope of dev_pm_opp_get_opp_table() to only finding an existing OPP table and not create one. This commit updates the cpufreq-dt driver before that happens. Now the cpufreq-dt driver creates the OPP and cpufreq tables for all the CPUs from driver's init callback itself. Tested-by: Marek Szyprowski Signed-off-by: Viresh Kumar commit cf1fac943c6341dfed1db1293864c9fcad47bac3 Author: Viresh Kumar Date: Thu Nov 19 11:24:32 2020 +0530 opp: Reduce the size of critical section in _opp_kref_release() There is a lot of stuff here which can be done outside of the opp_table->lock, do that. This helps avoiding a circular dependency lockdeps around debugfs. Reported-by: Rob Clark Signed-off-by: Viresh Kumar commit 44e9754d63c7b419874e4c18c0b5e7a770e058c6 Author: Christophe Leroy Date: Thu Oct 22 06:29:44 2020 +0000 powerpc/32s: Make support for 603 and 604+ selectable book3s/32 has two main families: - CPU with 603 cores that don't have HASH PTE table and perform SW TLB loading. - Other CPUs based on 604+ cores that have HASH PTE table. This leads to some complex logic and additionnal code to support both. This makes sense for distribution kernels that aim at running on any CPU, but when you are fine tuning a kernel for an embedded 603 based board you don't need all the HASH logic. Allow selection of support for each family, in order to opt out unneeded parts of code. At least one must be selected. Note that some of the CPU supporting HASH also support SW TLB loading, however it is not supported by Linux kernel at the time being, because they do not have alternate registers in the TLB miss exception handlers. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/8dde0cdb629a71abc29b0d85a52a86e920376cb6.1603348103.git.christophe.leroy@csgroup.eu commit ad510e37e4b48f7da462650946aeaa078b977277 Author: Christophe Leroy Date: Thu Oct 22 06:29:43 2020 +0000 powerpc/32s: Regroup 603 based CPUs in cputable In order to selectively build the kernel for 603 SW TLB handling, regroup all 603 based CPUs together. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/45065263fdb9f5cc2a2d210ec2a762ac8bf5b2bc.1603348103.git.christophe.leroy@csgroup.eu commit a6a50d8495d098b6459166c3707ab251d3dc9e06 Author: Christophe Leroy Date: Thu Oct 22 06:29:42 2020 +0000 powerpc/32s: Remove CONFIG_PPC_BOOK3S_6xx As 601 is gone, CONFIG_PPC_BOO3S_6xx and CONFIG_PPC_BOOK3S_32 are dedundant. Remove CONFIG_PPC_BOOK3S_6xx. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/f18c16af37f6f77b577bed8d9e12831b695617ae.1603348103.git.christophe.leroy@csgroup.eu commit 068fdba10ea54b6ebc12c2b2d85020b2137316d1 Author: Christophe Leroy Date: Thu Oct 22 06:29:41 2020 +0000 powerpc/32s: Move early_mmu_init() into mmu.c early_mmu_init() is independent of MMU type and not directly linked to tlb handling. In a following patch, tlb.c will be restricted to HASH mmu. Move early_mmu_init() into mmu.c which is common. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/e51b5e2fe6bca623b33116403043d3a1b5eaf826.1603348103.git.christophe.leroy@csgroup.eu commit 80007a17fc59bc2766f7d5cb2f79b4c65651504b Author: Christophe Leroy Date: Thu Oct 22 06:29:40 2020 +0000 powerpc/32s: Inline flush_hash_entry() flush_hash_entry() is a simple function calling flush_hash_pages() if it's a hash MMU or doing nothing otherwise. Inline it. And use it also in __ptep_test_and_clear_young(). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/9af895be7d4b404d40e749a2659552fd138e62c4.1603348103.git.christophe.leroy@csgroup.eu commit ef08d95546ccea540f6a592b89822bb085bf09c6 Author: Christophe Leroy Date: Thu Oct 22 06:29:39 2020 +0000 powerpc/32s: Inline tlb_flush() On book3s/32, tlb_flush() does nothing when the CPU has a hash table, it calls _tlbia() otherwise. Inline it. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/ebc933d1c530a19ef3cf7983f6ae94814f6e92ac.1603348103.git.christophe.leroy@csgroup.eu commit 91ec450f8d8c1e599a943c526ab1d2a4acf73c22 Author: Christophe Leroy Date: Thu Oct 22 06:29:38 2020 +0000 powerpc/32s: Split and inline flush_range() flush_range() handle both the MMU_FTR_HPTE_TABLE case and the other case. The non MMU_FTR_HPTE_TABLE case is trivial as it is only a call to _tlbie()/_tlbia() which is not worth a dedicated function. Make flush_range() a hash specific and call it from tlbflush.h based on mmu_has_feature(MMU_FTR_HPTE_TABLE). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/132ab19aae52abc8e06ab524ec86d4229b5b9c3d.1603348103.git.christophe.leroy@csgroup.eu commit 1e83396f29d75aae8a1d365f597996fec87ca4d0 Author: Christophe Leroy Date: Thu Oct 22 06:29:37 2020 +0000 powerpc/32s: Inline flush_tlb_range() and flush_tlb_kernel_range() flush_tlb_range() and flush_tlb_kernel_range() are trivial calls to flush_range(). Make flush_range() global and inline flush_tlb_range() and flush_tlb_kernel_range(). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/c7029a78e78709ad9272d7a44260e06b649169b2.1603348103.git.christophe.leroy@csgroup.eu commit fd1b4b7f51d0d75b73eeda41ef459ea7791aaab2 Author: Christophe Leroy Date: Thu Oct 22 06:29:36 2020 +0000 powerpc/32s: Split and inline flush_tlb_mm() and flush_tlb_page() flush_tlb_mm() and flush_tlb_page() handle both the MMU_FTR_HPTE_TABLE case and the other case. The non MMU_FTR_HPTE_TABLE case is trivial as it is only a call to _tlbie()/_tlbia() which is not worth a dedicated function. Make flush_tlb_mm() and flush_tlb_page() hash specific and call them from tlbflush.h based on mmu_has_feature(MMU_FTR_HPTE_TABLE). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/11e932ded41ba6d9b251d89b7afa33cc060d3aa4.1603348103.git.christophe.leroy@csgroup.eu commit f265512582a047e09390b1b41384f365d7dc806f Author: Christophe Leroy Date: Thu Oct 22 06:29:35 2020 +0000 powerpc/32s: Move _tlbie() and _tlbia() in a new file _tlbie() and _tlbia() are used only on 603 cores while the other functions are used only on cores having a hash table. Move them into a new file named nohash_low.S Add mmu_hash_lock var is used by both, it needs to go in a common file. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/9a265b1b17a64153463d361280cb4b43eb1266a4.1603348103.git.christophe.leroy@csgroup.eu commit b91280f3f36d64cc6f8022893af00935c99de197 Author: Christophe Leroy Date: Thu Oct 22 06:29:34 2020 +0000 powerpc/32s: Inline _tlbie() on non SMP On non SMP, _tlbie() is just a tlbie plus a sync instruction. Make it static inline. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/475136425541db5c7c8a0395d19d400525b251bc.1603348103.git.christophe.leroy@csgroup.eu commit cfe32ad0b3dc74df34ab6fea38ccb1e53f904a10 Author: Christophe Leroy Date: Thu Oct 22 06:29:33 2020 +0000 powerpc/32s: Move _tlbie() and _tlbia() prototypes to tlbflush.h In order to use _tlbie() and _tlbia() directly from asm/book3s/32/tlbflush.h, move their prototypes from mm/mm_decl.h to there. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/867587af929973ad65f8ef6972f2474a80c1737a.1603348103.git.christophe.leroy@csgroup.eu commit 6e980b5c56a266de479fcd022a03e094574e9a03 Author: Christophe Leroy Date: Thu Oct 22 06:29:32 2020 +0000 powerpc/32s: Declare Hash related vars as __initdata Hash related vars are used at init only. Declare them in __initdata. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/3878ea30706839fcff9196790ff3f99c128c3f6a.1603348103.git.christophe.leroy@csgroup.eu commit 4b74a35fc7e9b8efd9067b8a365bab0fefe889ff Author: Christophe Leroy Date: Thu Oct 22 06:29:31 2020 +0000 powerpc/32s: Make Hash var static Hash var is used only locally in mmu.c now. No need to set it in head_32.S anymore. Make it static and initialises it to the early hash table. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/786c82a89cdfdaabb32b72a44f7c312fa81d192b.1603348103.git.christophe.leroy@csgroup.eu commit 4cc445b4ff456f3a3997c321d7a353360feea04f Author: Christophe Leroy Date: Thu Oct 22 06:29:30 2020 +0000 powerpc/32s: Use mmu_has_feature(MMU_FTR_HPTE_TABLE) instead of checking Hash var We now have an early hash table on hash MMU, so no need to check Hash var to know if the Hash table is set of not. Use mmu_has_feature(MMU_FTR_HPTE_TABLE) instead. This will allow optimisation via jump_label. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/f1766631a9e014b6433f1a3c12c726ddfce34220.1603348103.git.christophe.leroy@csgroup.eu commit 03d5b19c7243d6e605d360972dd7b701e2b1ba72 Author: Christophe Leroy Date: Thu Oct 22 06:29:29 2020 +0000 powerpc/32s: Make bat_addrs[] static This table is used only locally. Declare it static. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/054fec0c139fc4c0a306360b360784733c0a6e65.1603348103.git.christophe.leroy@csgroup.eu commit a54d310856b9c1fe15ad67a2f8ee9edc02965a3a Author: Christophe Leroy Date: Thu Oct 22 06:29:28 2020 +0000 powerpc/mm: Remove flush_tlb_page_nohash() prototype. flush_tlb_page_nohash() was removed by commit 703b41ad1a87 ("powerpc/mm: remove flush_tlb_page_nohash") Remove stale prototype and comment. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/4a58831da6d6ba4fe309b94aa1dd8f02982d46b2.1603348103.git.christophe.leroy@csgroup.eu commit f9158d58a4e1d91f21741e4e8ebe67f770b84e12 Author: Christophe Leroy Date: Thu Oct 22 06:29:27 2020 +0000 powerpc/mm: Add mask of always present MMU features On the same principle as commit 773edeadf672 ("powerpc/mm: Add mask of possible MMU features"), add mask for MMU features that are always there in order to optimise out dead branches. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/4943775fbe91885eb3e09133b093aaf62e55c715.1603348103.git.christophe.leroy@csgroup.eu commit 300186795254f848900de2f1485b8b31dda3dbc0 Author: Alex Deucher Date: Mon Dec 7 13:12:29 2020 -0500 drm/amdgpu: fix size calculation with stolen vga memory If we need to keep the stolen vga memory, make sure it is at least as big as the legacy vga size. Acked-by: Christian König Signed-off-by: Alex Deucher commit 64f2c15892ae9dd8f0073f576601b1c9582d823b Author: Alex Deucher Date: Fri Dec 4 11:56:46 2020 -0500 drm/amdgpu: remove amdgpu_ttm_late_init and amdgpu_bo_late_init No longer used. Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 5f6fab247c7f206731df8bbb096b7624facf9d90 Author: Alex Deucher Date: Fri Dec 4 11:52:00 2020 -0500 drm/amdgpu: free the pre-OS console framebuffer after the first modeset Rather than in late_init to avoid race conditions between freeing the buffers and the initial modeset. Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 35d3f41dd694ce2cbcccf9902c039ffad83e588b Author: Alex Deucher Date: Fri Dec 4 13:10:14 2020 -0500 drm/amdgpu: enable runtime pm using BACO on CI dGPUs Works using BACO. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 580577fbb4f559a46c27b655d1854950cb5b29ea Author: Alex Deucher Date: Fri Dec 4 13:08:37 2020 -0500 drm/amdgpu/cik: enable BACO reset on Bonaire Works now that the BACO sequence is fixed. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit f6f75ebdc06c04d3cfcd100f1b10256a9cdca407 Author: Changfeng Date: Mon Dec 7 15:42:29 2020 +0800 drm/amd/pm: update smu10.h WORKLOAD_PPLIB setting for raven When using old WORKLOAD_PPLIB setting in smu10.h, there is problem that it can't be able to switch to mak gpu clk during compute workload. It needs to update WORKLOAD_PPLIB setting to fix this issue. Signed-off-by: Changfeng Reviewed-by: Huang Rui Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 8c901781d7c5ffb654ec52577ed8ae4553679ac0 Author: Xiaojian Du Date: Wed Dec 9 10:27:32 2020 +0800 drm/amd/pm: remove one unsupported smu function for vangogh This patch is to remove one unsupported smu function, this function will set the smu feature mask to disable all smu features in exception. Because vangogh doesn't support to set the smu feature mask by driver software, so this function is invalid for vangogh. Signed-off-by: Xiaojian Du Reviewed-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 13524856336dfd055a8c7c5b4e5524553a12e938 Author: Roman Li Date: Tue Dec 1 13:57:25 2020 -0500 drm/amd/display: setup system context for APUs [Why] Scatter/gather is APU feature. But in dm it is limited only to Renoir. Now we need it for Vangogh. [How] Apply system context setup in dm_init to all APUs. Signed-off-by: Roman Li Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 5cd5f0070030e130912028f2bfdf64a1502dd73a Author: Roman Li Date: Tue Dec 1 14:05:36 2020 -0500 drm/amd/display: add S/G support for Vangogh [Why] Scatter/gather feature is supported on Vangogh. [How] Add GTT domain support for Vangogh to enable display buffers in system memory. Signed-off-by: Roman Li Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit c897934da15f182ce99536007f8ef61c4748c07e Author: Felix Kuehling Date: Tue Dec 8 12:23:15 2020 -0500 drm/amdkfd: Fix leak in dmabuf import Release dmabuf reference before returning from kfd_ioctl_import_dmabuf. amdgpu_amdkfd_gpuvm_import_dmabuf takes a reference to the underlying GEM BO and doesn't keep the reference to the dmabuf wrapper. Signed-off-by: Felix Kuehling Reviewed-by: Kent Russell Signed-off-by: Alex Deucher commit 68fce5f07c304b34531dd9d7e13f6d174922e4c4 Author: Nirmoy Das Date: Tue Dec 8 11:14:53 2020 +0100 drm/amdgpu: use AMDGPU_NUM_VMID when possible Replace hardcoded vmid number with AMDGPU_NUM_VMID macro. Signed-off-by: Nirmoy Das Acked-by: Christian König Signed-off-by: Alex Deucher commit 92c415a3e2abe0830b1395dc27c0c4edf95c76b0 Author: Stanley.Yang Date: Mon Dec 7 14:38:33 2020 +0800 drm/amdgpu: fix sdma instance fw version and feature version init each sdma instance fw_version and feature_version should be set right value when asic type isn't between SIENNA_CICHILD and CHIP_DIMGREY_CAVEFISH Signed-off-by: Stanley.Yang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 3755ff54c5339140662e4c71b1e4e083e40ff5d4 Author: Tao Zhou Date: Mon Dec 7 11:10:58 2020 +0800 drm/amd/pm: update driver if version for dimgrey_cavefish Per PMFW 59.16.0. Signed-off-by: Tao Zhou Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit aec0ebd651a69e3c52b3946514f3cf3b67b7467c Author: Aric Cyr Date: Mon Nov 30 11:22:20 2020 -0500 drm/amd/display: 3.2.115 Signed-off-by: Aric Cyr Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 8b19a4e351e2d453e4a9a69ff6098ef60b1eaa12 Author: Anthony Koo Date: Sun Nov 29 20:16:33 2020 -0500 drm/amd/display: [FW Promotion] Release 0.0.45 - Add define for __forceinline Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 3abad347c432b9f5904cfad40f417d5cff90300c Author: Michael Strauss Date: Fri Nov 27 14:21:37 2020 -0500 drm/amd/display: Revert DCN2.1 dram_clock_change_latency update [Why] New value breaks VSR on high refresh panels, reverting until a fix is developed Signed-off-by: Michael Strauss Signed-off-by: Sung Lee Reviewed-by: Yongqiang Sun Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 6df9218a22a9c572ca0abb793eb4577bcb019654 Author: Charlene Liu Date: Fri Nov 27 19:08:41 2020 -0500 drm/amd/display: Enable gpu_vm_support for dcn3.01 [Why] dcn3_01 supports gpu_vm, but this is not enabled in amdgpu_dm Signed-off-by: Charlene Liu Reviewed-by: Yongqiang Sun Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit c0794a3b5999d612c396a66875ccaf93cf396631 Author: Roy Chan Date: Tue Nov 24 18:20:13 2020 -0500 drm/amd/display: Fixed the audio noise during mode switching with HDCP mode on [Why] When HDCP is on, some display would introduce audio noise during HDCP handling. [How] Mute before HDCP handling when disabling core link. Unmute after HDCP when enabling core link. Signed-off-by: Roy Chan Reviewed-by: Martin Leung Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 4bbfae00ac22810de9e539258f27ab5993619493 Author: Sung Lee Date: Mon Nov 23 15:38:54 2020 -0500 drm/amd/display: Add wm table for Renoir [Why] Without additional HostVM Latency, Renoir takes 2us longer to exit self-refresh. This causes underflow in certain cases. [How] Add table for Renoir with updated sr exit latencies for WM set A. Signed-off-by: Sung Lee Reviewed-by: Yongqiang Sun Reviewed-by: Roman Li Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 80089dd8410f356d5104496d5ab71a66a4f4646b Author: Chris Park Date: Tue Nov 24 20:11:25 2020 -0500 drm/amd/display: Prevent bandwidth overflow [Why] At very high pixel clock, bandwidth calculation exceeds 32 bit size and overflow value. This causes the resulting selection of link rate to be inaccurate. [How] Change order of operation and use fixed point to deal with integer accuracy. Also address bug found when forcing link rate. Signed-off-by: Chris Park Reviewed-by: Wenjing Liu Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 3083a9845e1258ee8c2126d37f7b41897fad02e5 Author: Qingqing Zhuo Date: Mon Nov 23 17:56:35 2020 -0500 drm/amd/display: Only one display lights up while using MST hub [Why] With the addition of dc_lock acquire before dc_link_handle_hpd_rx_irq, there will be a deadlock situation where commit state sends a request for payload allocation on MST and wait for HPD to process DOWN_REP. [How] Move forward the MST message handling in handle_hpd_rx_irq so that it will not rely on call to dc_link_handle_hpd_rx_irq. Signed-off-by: Qingqing Zhuo Reviewed-by: Harry Wentland Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 5a83bf80723dbc18d2f4d3949466bab216225c30 Author: Wesley Chalmers Date: Mon Nov 23 19:04:23 2020 -0500 drm/amd/display: Use provided offset for DPG generation [Why] Currently, the offset provided to dcn30_set_disp_pattern_generator is not forwarded to OPP for display pattern generation, resulting in misaligned patterns and test failures. [How] Use the provided offset. Signed-off-by: Wesley Chalmers Reviewed-by: Samson Tam Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit a013dd15d470b9ace50cb7a152b1eddabf9c36ad Author: Judy Cai Date: Mon Nov 2 18:49:19 2020 -0500 drm/amd/display: Change to IMMEDIATE mode from FRAME mode [Why] Change in DCN10 to use IMMEDIATE_UPDATE mode for AFMT is not reflected in DCN30 as it uses VPG. [How] Use IMMEDIATE_UPDATE mode for DCN30 in VPG. Signed-off-by: Judy Cai Reviewed-by: Anthony Koo Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 25331a18f45cdc9d872c3badd1de93c6f0f4fe64 Author: John Wu Date: Mon Nov 23 15:49:15 2020 +0800 drm/amd/display: Don't check seamless boot in power down HW by timeout [Why] power_down_on_boot is designed to power down HW when set mode is not called before timeout. It can happen in headless system or booting with the display is output by non-AMD GPU only. The function will be executed only if it's not seamless boot. So in seamless boot, the HW is still on. It's not necessary to check this since there's no display data in both cases. [How] Remove seamless boot checking in power_down_on_boot. Signed-off-by: John Wu Reviewed-by: Anthony Koo Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 5c8a6c71d72021c0d62d8904997495c93b962eec Author: Jing Zhou Date: Mon Nov 16 18:11:08 2020 +0800 drm/amd/display: Set default bits per channel [Why] Bump into calcReducedBlankingTiming because of mode query failed. In this function, timing.displayColorDepth == DISPLAY_COLOR_DEPTH_UNDEFINED. Then req_bw == 0 because of bits_per_channel == 0. So decide edp link settings, use default RBRx1 for special timing. [How] Set default bits_per_channel is 8. Signed-off-by: Jing Zhou Reviewed-by: Aric Cyr Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 92f1fa0d67a88d5c3992f1ddd7bab30a42f43eb8 Author: Wyatt Wood Date: Wed Oct 21 13:13:41 2020 -0400 drm/amd/display: Add support for runtime feature detection command [Why] Add support for new fw command for runtime feature detection. [How] Driver sends command through ring buffer, and fw returns data back through this command. Signed-off-by: Wyatt Wood Reviewed-by: Jun Lei Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 42ddf36e6720fc26dafd9cbd41322706eacf87d5 Author: Dmytro Laktyushkin Date: Mon Nov 23 11:39:27 2020 -0500 drm/amd/display: Expose clk_mgr functions for reuse [How & Why] Allow clk_mgr functions to be reused by making then non-static Signed-off-by: Dmytro Laktyushkin Reviewed-by: Eric Yang Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit c8ea79a8a2767e7948c778237be655a109366eb9 Author: Qingqing Zhuo Date: Thu Oct 1 15:56:28 2020 -0400 drm/amd/display: NULL pointer error during compliance test [Why] Calls to disable/enable stream should be guarded with dc_lock. [How] Add dc_lock before calling into dc_link_handle_hpd_rx_irq. Signed-off-by: Qingqing Zhuo Reviewed-by: Nicholas Kazlauskas Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 983bcb4cbe259ca6b2e03a6133364681aff1b88b Author: AMD\ramini Date: Tue Nov 24 17:08:44 2020 -0500 drm/amd/display: Set FixRate bit in VSIF V3 [Why] Signal FreeSync display that we are in Fixed Rate mode, and expand the FreeSync range to 1024. [How] Set the new bit in SB16:bit0, and augment the min and max refresh rate with 2 extra bits. Signed-off-by: AMD\ramini Reviewed-by: Anthony Koo Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 9bc41626658271de26cd9086c6e82811ca334dd2 Author: Reza Amini Date: Thu Jul 9 18:01:22 2020 -0400 drm/amd/display: Implement VSIF V3 extended refresh rate feature [Why] Implement feature of VSIF V3 [How] Set refresh rate MSB for extended range Signed-off-by: Reza Amini Reviewed-by: Anthony Koo Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit a6d64c1ae1997362461ce6379041d73b64946d02 Author: Kevin Wang Date: Mon Dec 7 14:32:26 2020 +0800 drm/amdgpu/pm: add smc v2_1 printer in amdgpu_ucode_print_smc_hdr() the smc v2_0 printer is not compatible with the smc v2_1 . 1. add smc v2_1 printer. 2. cleanup code Signed-off-by: Kevin Wang Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit ee3d8dd1af7e790609439752c5aee06a8d307fff Author: Kevin Wang Date: Mon Dec 7 14:48:11 2020 +0800 drm/amdgpu: change trace event parameter name from 'direct' to 'immediate' s/direct/immediate/g amdgpu vm has renamed parameter name from 'direct' to 'immedate'. however, the trace event is not updated yet. Signed-off-by: Kevin Wang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit c699b05c408656e7a714ede1f73a1996bef95c4b Author: Arnd Bergmann Date: Fri Dec 4 17:51:20 2020 +0100 drm/amdgpu: fw_attestation: fix unused function warning Without debugfs, the compiler notices one function that is not used at all: drivers/gpu/drm/amd/amdgpu/amdgpu_fw_attestation.c:123:12: error: unused function 'amdgpu_is_fw_attestation_supported' [-Werror,-Wunused-function] In fact the static const amdgpu_fw_attestation_debugfs_ops structure is also unused here, but that warning is currently disabled. Removing the #ifdef check does the right thing and leads to all of this code to be dropped without warning. Fixes: 19ae333001b3 ("drm/amdgpu: added support for psp fw attestation") Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher commit 048faf2783a273e162fad5d09089a75c6e2cc10e Author: Simon Ser Date: Fri Dec 4 16:49:03 2020 +0000 drm/amd: print error on convert_tiling_flags_to_modifier failure If this function fails, it means the tiling flags didn't make sense. This likely indicates a user-space bug. Log the error alongside with the provided tiling flags to make debugging easier. Signed-off-by: Simon Ser Cc: Alex Deucher Cc: Harry Wentland Cc: Nicholas Kazlauskas Cc: Bas Nieuwenhuizen Cc: Michel Dänzer Signed-off-by: Alex Deucher commit ccac8baba156ace586672212cb0cb6e2cce85188 Author: Simon Ser Date: Fri Dec 4 16:48:56 2020 +0000 drm/amd: use drm_dbg_kms to log addfb2 failures Avoid printing an error with dev_err, because user-space can trigger these at will by issuing an ioctl. Convert a DRM_DEBUG_KMS call to the more modern drm_dbg_kms macro. Signed-off-by: Simon Ser Cc: Alex Deucher Cc: Harry Wentland Cc: Nicholas Kazlauskas Cc: Michel Dänzer Signed-off-by: Alex Deucher commit e72868c4eacf435d9c6cdf47359a058c38223e46 Author: Simon Ser Date: Thu Dec 3 20:19:41 2020 +0000 drm/amd/display: check cursor FB is linear Previously we accepted non-linear buffers for the cursor plane. This results in bad output, DC validation failures and oops. Make sure the FB uses a linear layout in the atomic check function. The GFX8- check is inspired from ac_surface_set_bo_metadata in Mesa. The GFX9+ check comes from convert_tiling_flags_to_modifier. Reviewed-by: Nicholas Kazlauskas Signed-off-by: Simon Ser References: https://gitlab.freedesktop.org/drm/amd/-/issues/1390 Cc: Bas Nieuwenhuizen Cc: Alex Deucher Cc: Harry Wentland Cc: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit b0455fda6dd4e8d31f4ffa198a7ae77b831ac8e7 Author: Simon Ser Date: Thu Dec 3 20:19:35 2020 +0000 drm/amd/display: extract cursor FB checks into a function As more checks are added, the indentation makes the code harder to read. Reviewed-by: Nicholas Kazlauskas Signed-off-by: Simon Ser Cc: Alex Deucher Cc: Harry Wentland Cc: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit cedf788459683b84800fd3ecc63c63e2e3a5be33 Author: Arnd Bergmann Date: Fri Dec 4 00:06:43 2020 +0100 drm/amdgpu: fix debugfs creation/removal, again There is still a warning when CONFIG_DEBUG_FS is disabled: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:1145:13: error: 'amdgpu_ras_debugfs_create_ctrl_node' defined but not used [-Werror=unused-function] 1145 | static void amdgpu_ras_debugfs_create_ctrl_node(struct amdgpu_device *adev) Change the code again to make the compiler actually drop this code but not warn about it. Fixes: ae2bf61ff39e ("drm/amdgpu: guard ras debugfs creation/removal based on CONFIG_DEBUG_FS") Reviewed-by: Tao Zhou Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher commit d58159de57437806035d9f331c42d66cd31aedfa Author: Alex Deucher Date: Thu Dec 3 16:06:26 2020 -0500 drm/amdgpu/disply: set num_crtc earlier To avoid a recently added warning: Bogus possible_crtcs: [ENCODER:65:TMDS-65] possible_crtcs=0xf (full crtc mask=0x7) WARNING: CPU: 3 PID: 439 at drivers/gpu/drm/drm_mode_config.c:617 drm_mode_config_validate+0x178/0x200 [drm] In this case the warning is harmless, but confusing to users. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=209123 Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit e42dd87e70e66a54144bf75b62aa21bb518b3ba3 Author: Sonny Jiang Date: Fri Nov 27 17:15:18 2020 -0500 drm/amdgpu: VCN 3.0 multiple queue ring reset Add firmware write/read point reset sync through shared memory, port from vcn2.5. Signed-off-by: Sonny Jiang Reviewed-by: James Zhu Signed-off-by: Alex Deucher commit 0339258bd9dc811a8ac232c3ed9131ebd9972404 Author: Evan Quan Date: Fri Nov 27 10:57:22 2020 +0800 drm/amd/pm: invalidate hdp before CPU access the memory written by GPU To eliminate the possible influence by outdated HDP read cache. Signed-off-by: Evan Quan Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 3945ae03d822aa47584dd502ac024ae1e1eb9e2d Author: Darrick J. Wong Date: Tue Nov 24 11:45:54 2020 -0800 xfs: move kernel-specific superblock validation out of libxfs A couple of the superblock validation checks apply only to the kernel, so move them to xfs_fc_fill_super before we add the needsrepair "feature", which will prevent the kernel (but not xfsprogs) from mounting the filesystem. This also reduces the diff between kernel and userspace libxfs. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Eric Sandeen commit f10881a46f8914428110d110140a455c66bdf27b Author: Tyrel Datwyler Date: Tue Dec 8 13:54:34 2020 -0600 powerpc/rtas: Fix typo of ibm,open-errinjct in RTAS filter Commit bd59380c5ba4 ("powerpc/rtas: Restrict RTAS requests from userspace") introduced the following error when invoking the errinjct userspace tool: [root@ltcalpine2-lp5 librtas]# errinjct open [327884.071171] sys_rtas: RTAS call blocked - exploit attempt? [327884.071186] sys_rtas: token=0x26, nargs=0 (called by errinjct) errinjct: Could not open RTAS error injection facility errinjct: librtas: open: Unexpected I/O error The entry for ibm,open-errinjct in rtas_filter array has a typo where the "j" is omitted in the rtas call name. After fixing this typo the errinjct tool functions again as expected. [root@ltcalpine2-lp5 linux]# errinjct open RTAS error injection facility open, token = 1 Fixes: bd59380c5ba4 ("powerpc/rtas: Restrict RTAS requests from userspace") Cc: stable@vger.kernel.org Signed-off-by: Tyrel Datwyler Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201208195434.8289-1-tyreld@linux.ibm.com commit b60da4955f53d1f50e44351a9c3a37a92503079e Author: Florent Revest Date: Tue Dec 8 18:36:23 2020 +0100 bpf: Only provide bpf_sock_from_file with CONFIG_NET This moves the bpf_sock_from_file definition into net/core/filter.c which only gets compiled with CONFIG_NET and also moves the helper proto usage next to other tracing helpers that are conditional on CONFIG_NET. This avoids ld: kernel/trace/bpf_trace.o: in function `bpf_sock_from_file': bpf_trace.c:(.text+0xe23): undefined reference to `sock_from_file' When compiling a kernel with BPF and without NET. Reported-by: kernel test robot Reported-by: Randy Dunlap Signed-off-by: Florent Revest Signed-off-by: Alexei Starovoitov Acked-by: Randy Dunlap Acked-by: Martin KaFai Lau Acked-by: KP Singh Link: https://lore.kernel.org/bpf/20201208173623.1136863-1-revest@chromium.org commit afae3cc2da100ead3cd6ef4bb1fb8bc9d4b817c5 Author: Zheng Yongjun Date: Tue Dec 8 21:57:30 2020 +0800 net: atheros: simplify the return expression of atl2_phy_setup_autoneg_adv() Simplify the return expression. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit 6eea39266ce460243c9db417556d51a65a2bd972 Author: Zheng Yongjun Date: Tue Dec 8 21:54:37 2020 +0800 drivers: net: qlcnic: simplify the return expression of qlcnic_sriov_vf_shutdown() Simplify the return expression. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit 10dd7b4fe504d4cf32fff4a0e3512fcf937305a8 Author: Zheng Yongjun Date: Tue Dec 8 21:53:53 2020 +0800 drivers: net: ionic: simplify the return expression of ionic_set_rxfh() Simplify the return expression. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit 5e359044c107ecbdc2e9b3fd5ce296006e6de4bc Author: Zheng Yongjun Date: Tue Dec 8 20:13:53 2020 +0800 net: openvswitch: conntrack: simplify the return expression of ovs_ct_limit_get_default_limit() Simplify the return expression. Signed-off-by: Zheng Yongjun Reviewed-by: Eelco Chaudron Signed-off-by: David S. Miller commit 8daa76a52dfd9dac4be87a37269c225c15977bdd Author: Zheng Yongjun Date: Tue Dec 8 20:10:46 2020 +0800 net: core: devlink: simplify the return expression of devlink_nl_cmd_trap_set_doit() Simplify the return expression. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit 9faad250ce66ed4159fa095a269690d7cfdb3ce3 Author: Zheng Yongjun Date: Tue Dec 8 20:09:49 2020 +0800 net: ipv6: rpl_iptunnel: simplify the return expression of rpl_do_srh() Simplify the return expression. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit 57b0637d00a5a1921ca2b4cf5457b422006aca75 Author: Zheng Yongjun Date: Tue Dec 8 20:08:22 2020 +0800 net/sched: cls_u32: simplify the return expression of u32_reoffload_knode() Simplify the return expression. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit ea6d5c924e391872d402acac38461a5f8261e57f Author: DENG Qingfang Date: Tue Dec 8 15:00:28 2020 +0800 net: dsa: mt7530: support setting ageing time MT7530 has a global address age control register, so use it to set ageing time. The applied timer is (AGE_CNT + 1) * (AGE_UNIT + 1) seconds Signed-off-by: DENG Qingfang Reviewed-by: Andrew Lunn Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 25fd263473c72597f4a477490cd7840fded63f05 Merge: 8354bcbebd263 6f007c6486d69 Author: David S. Miller Date: Tue Dec 8 16:06:29 2020 -0800 Merge branch 'GVE-Raw-Addressing' David Awogbemil says: ==================== GVE Raw Addressing Patchset description: This patchset introduces "raw addressing" mode to the GVE driver. Previously (in "queue_page_list" or "qpl" mode), the driver would pre-allocate and dma_map buffers to be used on egress and ingress. On egress, it would copy data from the skb provided to the pre-allocated buffers - this was expensive. In raw addressing mode, the driver can avoid this copy and simply dma_map the skb's data so that the NIC can use it. On ingress, the driver passes buffers up to the networking stack and then frees and reallocates buffers when necessary instead of using skb_copy_to_linear_data. Patch 3 separates the page refcount tracking mechanism into a function gve_rx_can_recycle_buffer which uses get_page - this will be changed in a future patch to eliminate the use of get_page in tracking page refcounts. Changes from v9: Patch 4: Use u64, not u32 for new tx stat counters. ==================== Reviewed-by: Alexander Duyck Signed-off-by: David S. Miller commit 6f007c6486d69967ac1d9e67df9ae9c77d49f1cc Author: Catherine Sullivan Date: Mon Dec 7 14:45:26 2020 -0800 gve: Add support for raw addressing in the tx path During TX, skbs' data addresses are dma_map'ed and passed to the NIC. This means that the device can perform DMA directly from these addresses and the driver does not have to copy the buffer content into pre-allocated buffers/qpls (as in qpl mode). Reviewed-by: Yangchun Fu Signed-off-by: Catherine Sullivan Signed-off-by: David Awogbemila Signed-off-by: David S. Miller commit 02b0e0c18ba75227e0482600950c6abe71ace30f Author: David Awogbemila Date: Mon Dec 7 14:45:25 2020 -0800 gve: Rx Buffer Recycling This patch lets the driver reuse buffers that have been freed by the networking stack. In the raw addressing case, this allows the driver avoid allocating new buffers. In the qpl case, the driver can avoid copies. This patch separates the page refcount tracking mechanism into a function gve_rx_can_recycle_buffer which uses get_page - this will be changed in a future patch to entirely eliminate the use of get_page in tracking page refcounts. Signed-off-by: David Awogbemila Signed-off-by: David S. Miller commit ede3fcf5ec67f717e297f060ad00b524a074c4e0 Author: Catherine Sullivan Date: Mon Dec 7 14:45:24 2020 -0800 gve: Add support for raw addressing to the rx path Add support to use raw dma addresses in the rx path. Due to this new support we can alloc a new buffer instead of making a copy. RX buffers are handed to the networking stack and are re-allocated as needed, avoiding the need to use skb_copy_to_linear_data() as in "qpl" mode. Reviewed-by: Yangchun Fu Signed-off-by: Catherine Sullivan Signed-off-by: David Awogbemila Signed-off-by: David S. Miller commit 4944db80ac1133fe4acb0c9756758da088338b26 Author: Catherine Sullivan Date: Mon Dec 7 14:45:23 2020 -0800 gve: Add support for raw addressing device option Add support to describe device for parsing device options. As the first device option, add raw addressing. "Raw Addressing" mode (as opposed to the current "qpl" mode) is an operational mode which allows the driver avoid bounce buffer copies which it currently performs using pre-allocated qpls (queue_page_lists) when sending and receiving packets. For egress packets, the provided skb data addresses will be dma_map'ed and passed to the device, allowing the NIC can perform DMA directly - the driver will not have to copy the buffer content into pre-allocated buffers/qpls (as in qpl mode). For ingress packets, copies are also eliminated as buffers are handed to the networking stack and then recycled or re-allocated as necessary, avoiding the use of skb_copy_to_linear_data(). This patch only introduces the option to the driver. Subsequent patches will add the ingress and egress functionality. Reviewed-by: Yangchun Fu Signed-off-by: Catherine Sullivan Signed-off-by: David Awogbemila Signed-off-by: David S. Miller commit 8354bcbebd26325c9efeb6682a3e14fbbc8ace95 Author: Colin Ian King Date: Mon Dec 7 16:12:31 2020 +0000 net: sched: fix spelling mistake in Kconfig "trys" -> "tries" There is a spelling mistake in the Kconfig help text. Fix it. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit e1be4b5990c697f41a9e600a2b4ad228b7a71769 Merge: 97f8841e0492e 02be5f13aacba Author: David S. Miller Date: Tue Dec 8 15:58:49 2020 -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 2020-12-07 Here's the main bluetooth-next pull request for the 5.11 kernel. - Updated Bluetooth entries in MAINTAINERS to include Luiz von Dentz - Added support for Realtek 8822CE and 8852A devices - Added support for MediaTek MT7615E device - Improved workarounds for fake CSR devices - Fix Bluetooth qualification test case L2CAP/COS/CFD/BV-14-C - Fixes for LL Privacy support - Enforce 16 byte encryption key size for FIPS security level - Added new mgmt commands for extended advertising support - Multiple other smaller fixes & improvements Please let me know if there are any issues pulling. Thanks. ==================== Signed-off-by: David S. Miller commit 97f8841e0492ee15710be8f0ec4c48ad513990f8 Author: Julian Wiedmann Date: Mon Dec 7 13:53:07 2020 +0100 net/af_iucv: use DECLARE_SOCKADDR to cast from sockaddr This gets us compile-time size checking. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 41a6351763d8b45cd51001a85563b421a5ad8e28 Merge: a8d5dd192a0f4 477ce6d971159 Author: David S. Miller Date: Tue Dec 8 15:45:57 2020 -0800 Merge branch 'mlxsw-Add-support-for-Q-in-VNI' Ido Schimmel says: ==================== mlxsw: Add support for Q-in-VNI This patch set adds support for Q-in-VNI over Spectrum-{2,3} ASICs. Q-in-VNI is like regular VxLAN encapsulation with the sole difference that overlay packets can contain a VLAN tag. In Linux, this is achieved by adding the VxLAN device to a 802.1ad bridge instead of a 802.1q bridge. From mlxsw perspective, Q-in-VNI support entails two main changes: 1. An outer VLAN tag should always be pushed to the overlay packet during decapsulation 2. The EtherType used during decapsulation should be 802.1ad (0x88a8) instead of the default 802.1q (0x8100) Patch set overview: Patches #1-#3 add required device registers and fields Patch #4 performs small refactoring to allow code re-use Patches #5-#7 make the EtherType used during decapsulation a property of the tunnel port (i.e., VxLAN). This leads to the driver vetoing configurations in which VxLAN devices are member in both 802.1ad and 802.1q/802.1d bridges. Will be handled in the future by determining the overlay EtherType on the egress port instead Patch #8 adds support for Q-in-VNI for Spectrum-2 and newer ASICs Patches #9-#10 veto Q-in-VNI for Spectrum-1 ASICs due to some hardware limitations. Can be worked around, but decided not to support it for now Patch #11 adjusts mlxsw to stop vetoing addition of VXLAN devices to 802.1ad bridges Patch #12 adds a generic forwarding test that can be used with both veth pairs and physical ports with a loopback Patch #13 adds a test to make sure mlxsw vetoes unsupported Q-in-VNI configurations ==================== Signed-off-by: David S. Miller commit 477ce6d971159910fb8ae76755c8027aa6a84dde Author: Amit Cohen Date: Tue Dec 8 11:22:53 2020 +0200 selftests: mlxsw: Add Q-in-VNI veto tests Add tests to ensure that the forbidden and unsupported cases are indeed vetoed by mlxsw driver. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 4cec85296c7c7a123890d9335b835f991b36e106 Author: Petr Machata Date: Tue Dec 8 11:22:52 2020 +0200 selftests: forwarding: Add Q-in-VNI test Add test to check Q-in-VNI traffic. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 745f73deea1320b7d847e5e1bc6306ba4c855292 Author: Amit Cohen Date: Tue Dec 8 11:22:51 2020 +0200 mlxsw: spectrum_switchdev: Allow joining VxLAN to 802.1ad bridge The previous patches added support for VxLAN device enslaved to 802.1ad bridge in Spectrum-2 ASIC and vetoed it in Spectrum-1. Do not veto VxLAN with 802.1ad bridge. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit efbcb67339e6729a7eb390ec8a006446dd721ba9 Author: Amit Cohen Date: Tue Dec 8 11:22:50 2020 +0200 mlxsw: Veto Q-in-VNI for Spectrum-1 ASIC Implementation of Q-in-VNI is different between ASIC types, this set adds support only for Spectrum-2. Return an error when trying to create VxLAN device and enslave it to 802.1ad bridge in Spectrum-1. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 7e9c72a5da84cc63c76fa2b451eaa402aa0a0384 Author: Amit Cohen Date: Tue Dec 8 11:22:49 2020 +0200 mlxsw: spectrum_switchdev: Use ops->vxlan_join() when adding VLAN to VxLAN device Currently mlxsw_sp_switchdev_vxlan_vlan_add() always calls mlxsw_sp_bridge_8021q_vxlan_join() because VLANs were only ever added to a VLAN-filtering bridge, which is only 802.1q bridge. This set adds support for VxLAN with 802.1ad bridge, so VLAN-filtering bridge is not only 802.1q. Call ops->vxlan_join(), so mlxsw_sp_bridge_802{1q, 1ad}_vxlan_join() will be called according to bridge type. This is needed to ensure that VxLAN with 802.1ad bridge will be vetoed in Spectrum-1 with the next patch. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 0b5ec8f237382a5e85a68e7c44c38ced0823f0f5 Author: Amit Cohen Date: Tue Dec 8 11:22:48 2020 +0200 mlxsw: spectrum_nve_vxlan: Add support for Q-in-VNI for Spectrum-2 ASIC On Spectrum-2, the default setting is not to push VLAN to the decapsulated packet. This is controlled by SPVTR.ipvid_mode. Set SPVTR.ipvid_mode to always push VLAN. Without this setting, Spectrum-2 overtakes the VLAN tag of decapsulated packet for bridging. In addition, set SPVID register to use EtherType saved in mlxsw_sp_nve_config when VLAN is pushed for the NVE tunnel. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 4418096e843e062e95b8e9fe4d75e2b34c92f76c Author: Amit Cohen Date: Tue Dec 8 11:22:47 2020 +0200 mlxsw: spectrum: Publish mlxsw_sp_ethtype_to_sver_type() Declare mlxsw_sp_ethtype_to_sver_type() in spectrum.h to enable using it in other files. It will be used in the next patch to map between EtherType and the relevant value configured by SVER register. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 49d18964e922b5b4a4a6cc94d8344a3e3a45dead Author: Amit Cohen Date: Tue Dec 8 11:22:46 2020 +0200 mlxsw: Save EtherType as part of mlxsw_sp_nve_config Add EtherType field to mlxsw_sp_nve_config struct. Set EtherType according to mlxsw_sp_nve_params.ethertype. Pass 'mlxsw_sp_nve_params' instead of 'mlxsw_sp_nve_params->dev' to the function which initializes mlxsw_sp_nve_config struct to know which EtherType to use. This field is needed to configure which EtherType will be used when VLAN is pushed at ingress of the tunnel port. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 0913a24b3a40409f4dafa70d3ddf3e94e0006851 Author: Amit Cohen Date: Tue Dec 8 11:22:45 2020 +0200 mlxsw: Save EtherType as part of mlxsw_sp_nve_params Add EtherType field to mlxsw_sp_nve_params struct. Set it when VxLAN device is added to bridge device. This field is needed to configure which EtherType will be used when VLAN is pushed at ingress of the tunnel port. Use ETH_P_8021Q for tunnel port enslaved to 802.1d and 802.1q bridges. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit e2c777d7e3ef506b80fc9c3ac2045780d0959ec6 Author: Amit Cohen Date: Tue Dec 8 11:22:44 2020 +0200 mlxsw: spectrum_switchdev: Create common function for joining VxLAN to VLAN-aware bridge The code in mlxsw_sp_bridge_8021q_vxlan_join() can be used also for 802.1ad bridge. Move the code to function called mlxsw_sp_bridge_vlan_aware_vxlan_join() and call it from mlxsw_sp_bridge_8021q_vxlan_join() to enable code reuse. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 598874c8e9409b25377b9d07ee8124f6bbab4d86 Author: Amit Cohen Date: Tue Dec 8 11:22:43 2020 +0200 mlxsw: reg: Add support for tunnel port in SPVID register Add spvid_tport field which indicates if the port is tunnel port. When spvid_tport is true, local_port field supposed to be tunnel port type. It will be used to configure which Ethertype will be used when VLAN is pushed at ingress for tunnel port. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit c1c32a79c5803e2eae356623a8c614eacf2ed7ef Author: Amit Cohen Date: Tue Dec 8 11:22:42 2020 +0200 mlxsw: reg: Add Switch Port VLAN Stacking Register SPVTR register configures the VLAN mode of the port to enable VLAN stacking. It will be used to configure VxLAN to push VLAN to the decapsulated packet. Without this setting, Spectrum-2 overtakes the VLAN tag of decapsulated packet for bridging. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 02c3b5c5d0197fd535d1ba96e29fa00b8d2acdf2 Author: Amit Cohen Date: Tue Dec 8 11:22:41 2020 +0200 mlxsw: Use one enum for all registers that contain tunnel_port field Currently SFN, TNUMT and TNPC registers use separate enums for tunnel_port. Create one enum with a neutral name and use it. Remove the enums that are not currently required. The next patches add two more registers that contain tunnel_port field, the new enum can be used for them also. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 694a5b57692f8b67384898a59025498cdc011976 Merge: c35ffce8a958f d76fa3f2c2524 Author: Arnd Bergmann Date: Wed Dec 9 00:29:33 2020 +0100 Merge tag 'memory-controller-drv-tegra-5.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into arm/drivers Memory controller drivers for v5.11 - Tegra SoC, part two Continuation of work on Tegra SoC memory controllers towards adding interconnect support and integration with devfreq. This brings few more patches including one which removes/fixes annoying warning if the DTS patches get applied. This is expected and only informs that new features of Tegra memory controller drivers will not be enabled however the warning itself could look worrying. * tag 'memory-controller-drv-tegra-5.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: memory: tegra30: Support interconnect framework memory: tegra20: Support hardware versioning and clean up OPP table initialization dt-bindings: memory: tegra20-emc: Document opp-supported-hw property Link: https://lore.kernel.org/r/20201207075758.5501-2-krzk@kernel.org Signed-off-by: Arnd Bergmann commit c35ffce8a958f1bc7f495c47693c3ac66f2748f9 Merge: 9ccd9ef36fc35 4bfa07300b933 Author: Arnd Bergmann Date: Wed Dec 9 00:28:39 2020 +0100 Merge tag 'memory-controller-drv-5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into arm/drivers Memory controller drivers for v5.11, part two 1. Several fixes for Renesas RPC-IF driver. 2. Correct compile testing of TI EMIF SRAM driver. 3. Fix potential NULL pointer in JZ4780 NEMC driver. * tag 'memory-controller-drv-5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: memory: jz4780_nemc: Fix potential NULL dereference in jz4780_nemc_probe() memory: ti-emif-sram: only build for ARMv7 memory: renesas-rpc-if: Make rpcif_enable/disable_rpm() as static inline memory: renesas-rpc-if: Fix a node reference leak in rpcif_probe() memory: renesas-rpc-if: Fix unbalanced pm_runtime_enable in rpcif_{enable,disable}_rpm memory: renesas-rpc-if: Return correct value to the caller of rpcif_manual_xfer() Link: https://lore.kernel.org/r/20201207075758.5501-1-krzk@kernel.org Signed-off-by: Arnd Bergmann commit 9ccd9ef36fc3552dcd1173d1f73dc19e56cca1f3 Merge: 5dd65cf78dc3b c2867b2e710fc Author: Arnd Bergmann Date: Wed Dec 9 00:27:44 2020 +0100 Merge tag 'v5.11-rockchip-drivers-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/drivers Minor fixes for the io-domain soc-driver * tag 'v5.11-rockchip-drivers-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: soc: rockchip: io-domain: Fix error return code in rockchip_iodomain_probe() soc: rockchip: io-domain: Remove incorrect and incomplete comment header Link: https://lore.kernel.org/r/2045618.irdbgypaU6@phil Signed-off-by: Arnd Bergmann commit 5dd65cf78dc3be1a48223e83764ccbd14ded99f2 Merge: e0839f3ea4041 d06c4dec98b65 Author: Arnd Bergmann Date: Wed Dec 9 00:26:38 2020 +0100 Merge tag 'reset-for-v5.11' of git://git.pengutronix.de/pza/linux into arm/drivers Reset controller updates for v5.11 This tag adds support for sharing pulsed resets under certain conditions. For example, when multiple drivers go through a suspend-resume cycle, a reset line they share can be triggered again during resume. Further, the reset-meson driver now can be built as a module, the reset-socfpga driver properly releases its memory region in the probe error path, and reset-ti-syscon driver uses regmap_write_bits() instead of regmap_update_bits() to support devices without status readback. * tag 'reset-for-v5.11' of git://git.pengutronix.de/pza/linux: reset-controller: ti: force the write operation when assert or deassert reset: socfpga: add error handling and release mem-region reset: meson: make it possible to build as a module reset: make shared pulsed reset controls re-triggerable Link: https://lore.kernel.org/r/d586ada0073f2ac50a02274f42bf07bfb0603835.camel@pengutronix.de Signed-off-by: Arnd Bergmann commit e0839f3ea404138f0a48d861bb30d66d5cc7a6e2 Merge: 2bd87914b295d e00e70a4dae4c Author: Arnd Bergmann Date: Wed Dec 9 00:24:20 2020 +0100 Merge tag 'imx-drivers-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/drivers i.MX drivers change for 5.11: - A series from Daniel Baluta to update imx-dsp driver and export functions for on demand channel request/free. - A number of patches to add power domains for i.MX8qxp DC0, LVDS1, MIPI1 and JPEG subsystems. - Add dummy functions for i.MX firmware drivers to avoid build failure seen with COMPILE_TEST. * tag 'imx-drivers-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: firmware: imx: scu-pd: Add some power domains support for i.MX8qxp MIPI1 subsystem firmware: imx: scu-pd: Add main power domain support for i.MX8qxp LVDS1 subsystem firmware: imx: scu-pd: Add video0/1 power domains support for i.MX8qxp DC0 subsystem firmware: imx-dsp: Export functions to request/free channels firmware: imx: Save channel name for further use firmware: imx: Introduce imx_dsp_setup_channels firmware: imx: scu-pd: Add power domains for imx-jpeg firmware: imx: add dummy functions Link: https://lore.kernel.org/r/20201202142717.9262-1-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit 2bd87914b295df815bd771bb4b87cecf128951cd Merge: 8dc0aac1ccd57 1116e43e7e4be Author: Arnd Bergmann Date: Wed Dec 9 00:23:29 2020 +0100 Merge tag 'amlogic-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into arm/drivers soc: amlogic: driver updates for v5.11 - enable building as modules - reset API updates * tag 'amlogic-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: soc: amlogic: replace devm_reset_control_array_get() soc: amlogic: canvas: add missing put_device() call in meson_canvas_get() firmware: meson-sm: enable build as module soc: meson: enable building drivers as modules soc: amlogic: socinfo: build for specific arch Link: https://lore.kernel.org/r/7him9ljgtr.fsf@baylibre.com Signed-off-by: Arnd Bergmann commit 8dc0aac1ccd57df12f3a6cb72b45072ae2faca38 Merge: 4cc6ae9896a4b 4cba398f37f86 Author: Arnd Bergmann Date: Wed Dec 9 00:21:31 2020 +0100 Merge tag 'drivers_soc_for_5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone into arm/drivers drivers: soc: TI SOC changes for 5.11 - ti_sci changes towards DMSS support - Static warning fixes - Kconfig update for Keystone ARM64 socs - AM64X SOC family support * tag 'drivers_soc_for_5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone: (23 commits) drivers: soc: ti: knav_qmss_queue: Fix error return code in knav_queue_probe soc: ti: Fix reference imbalance in knav_dma_probe soc: ti: pruss: Remove wrong check against *get_match_data return value soc: ti: Kconfig: Drop ARM64 SoC specific configs soc: ti: k3-ringacc: Provide documentation for 'k3_ring's 'state' soc: ti: wkup_m3_ipc: Document 'm3_ipc' parameter throughout soc: ti: pm33xx: Remove set but unused variable 'ret' soc: ti: knav_dma: Fix a kernel function doc formatting issue soc: ti: knav_qmss_queue: Fix a whole host of function documentation issues soc: ti: knav_qmss_queue: Remove set but unchecked variable 'ret' soc: ti: omap-prm: Do not check rstst bit on deassert if already deasserted soc: ti: knav_qmss: fix reference leak in knav_queue_probe soc: ti: k3-socinfo: Add entry for AM64X SoC family soc: ti: k3-ringacc: Use correct device for allocation in RING mode firmware: ti_sci: rm: Remove unused config() from ti_sci_rm_ringacc_ops soc: ti: k3-ringacc: Use the ti_sci set_cfg callback for ring configuration firmware: ti_sci: rm: Add new ops for ring configuration firmware: ti_sci: rm: Remove ring_get_config support firmware: ti_sci: rm: Add support for extended_ch_type for tx channel soc: ti: ti_sci_inta_msi: Add support for second range in resource ranges ... Link: https://lore.kernel.org/r/1606851405-26338-1-git-send-email-santosh.shilimkar@oracle.com Signed-off-by: Arnd Bergmann commit 4cc6ae9896a4ba434b166fb9403ae867ca5149b9 Merge: a97d8ffac8d7e 57df7e370d2ab Author: Arnd Bergmann Date: Wed Dec 9 00:19:56 2020 +0100 Merge tag 'omap-for-v5.11/genpd-drivers-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/drivers Driver changes for omaps for genpd for v5.11 merge window This series of changes allows booting am335x with genpd and device tree data without the legacy platform data. Also at least am437x can be booted with gendp with power domain and dts data. The SoC specific dts changes will be a separate pull request. We need the following driver changes merged before the dts changes can be done: - platform code needs a few improvments to probe l4_wkup first for clocks, and to bail out when there is no platform data - ti-sysc driver needs a non-urgent fix for asserting rstctrl reset only after disabling the clocks, to probe modules with no known control registers, and added quirk handling for gpmc devices - omap-prm driver needs a non-urgent fix for reset status bit, support added for pm_clk, and then we add the rest of am335x power domain data - clock driver for am335x needs to keep l3_main clock enabled with genpd for suspend and resume to work - wkup_m3 remoteproc driver needs support added for reset control if available instead of the legacy pdata callbacks - pm33xx driver needs PM runtime support added for genpd The am335x specific driver changes for the clock, wkup_m3, pm33xx and remoteproc drivers are quite trivial and have not caused merge conflicts in Linux next. I did not get acks for these changes except from Santosh but had already pushed out the branch already at that point. So I've added the related driver maintainers to Cc. * tag 'omap-for-v5.11/genpd-drivers-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: remoteproc/wkup_m3: Use reset control driver if available soc: ti: pm33xx: Enable basic PM runtime support for genpd soc: ti: omap-prm: am3: add genpd support for remaining PRM instances soc: ti: omap-prm: Add pm_clk for genpd clk: ti: am33xx: Keep am3 l3 main clock always on for genpd bus: ti-sysc: Implement GPMC debug quirk to drop platform data bus: ti-sysc: Support modules without control registers ARM: OMAP2+: Probe PRCM first to probe l4_wkup with simple-pm-bus ARM: OMAP2+: Check for inited flag bus: ti-sysc: Assert reset only after disabling clocks soc: ti: omap-prm: Do not check rstst bit on deassert if already deasserted bus: ti-sysc: Fix bogus resetdone warning on enable for cpsw bus: ti-sysc: Fix reset status check for modules with quirks ARM: OMAP2+: Fix missing select PM_GENERIC_DOMAINS_OF ARM: OMAP2+: Fix location for select PM_GENERIC_DOMAINS Link: https://lore.kernel.org/r/pull-1606806458-694517@atomide.com Signed-off-by: Arnd Bergmann commit a97d8ffac8d7e773b420981a51ea436fe5c199c6 Merge: 00c543f6f3f46 9c45662675b38 Author: Arnd Bergmann Date: Wed Dec 9 00:17:54 2020 +0100 Merge tag 'qcom-drivers-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/drivers Qualcomm driver updates for v5.11 This adds support for the core power domains on MSM8916, MSM8939, SDM660 and SDX55. It adds SM8150 support to the last-level cache controller driver and it makes it possible to build the Command DB and RPMh drivers as modules. It also contains a slew of smaller cleanups, style and bug fixes throughout the various drivers. * tag 'qcom-drivers-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (39 commits) soc: qcom: rpmhpd: Add SDX55 power domains dt-bindings: power: Add rpm power domain bindings for sdx55 soc: qcom: rpmh: Use __fill_rpmh_msg API during rpmh_write() samples: qmi: Constify static qmi ops soc: qcom: pdr: Constify static qmi structs soc: qcom: initialize local variable soc: qcom: socinfo: add soc ids for msm8953 variants soc: qcom: geni: Remove "iova" check soc: qcom: llcc: Add configuration data for SM8150 dt-bindings: msm: Add LLCC for SM8150 soc: qcom: rpmh: Fix possible doc-rot in rpmh_write()'s header soc: qcom: kryo-l2-accessors: Fix misnaming of 'val' soc: qcom: rpmhpd: Provide some missing struct member descriptions soc: qcom: llcc-qcom: Fix expected kernel-doc formatting soc: qcom: smp2p: Remove unused struct attribute provide another soc: qcom: wcnss_ctrl: Demote non-conformant struct header and fix function headers soc: qcom: smsm: Fix some kernel-doc formatting and naming problems soc: qcom: smem: Fix formatting and missing documentation issues soc: qcom: qcom-geni-se: Fix misnamed function parameter 'rx_rfr' soc: qcom: qcom_aoss: Add missing description for 'cooling_devs' ... Link: https://lore.kernel.org/r/20201130190142.345246-1-bjorn.andersson@linaro.org Signed-off-by: Arnd Bergmann commit 6422a71ef40e4751d59b8c9412e7e2dafe085878 Author: Daeho Jeong Date: Sat Dec 5 13:26:26 2020 +0900 f2fs: fix race of pending_pages in decompression I found out f2fs_free_dic() is invoked in a wrong timing, but f2fs_verify_bio() still needed the dic info and it triggered the below kernel panic. It has been caused by the race condition of pending_pages value between decompression and verity logic, when the same compression cluster had been split in different bios. By split bios, f2fs_verify_bio() ended up with decreasing pending_pages value before it is reset to nr_cpages by f2fs_decompress_pages() and caused the kernel panic. [ 4416.564763] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 ... [ 4416.896016] Workqueue: fsverity_read_queue f2fs_verity_work [ 4416.908515] pc : fsverity_verify_page+0x20/0x78 [ 4416.913721] lr : f2fs_verify_bio+0x11c/0x29c [ 4416.913722] sp : ffffffc019533cd0 [ 4416.913723] x29: ffffffc019533cd0 x28: 0000000000000402 [ 4416.913724] x27: 0000000000000001 x26: 0000000000000100 [ 4416.913726] x25: 0000000000000001 x24: 0000000000000004 [ 4416.913727] x23: 0000000000001000 x22: 0000000000000000 [ 4416.913728] x21: 0000000000000000 x20: ffffffff2076f9c0 [ 4416.913729] x19: ffffffff2076f9c0 x18: ffffff8a32380c30 [ 4416.913731] x17: ffffffc01f966d97 x16: 0000000000000298 [ 4416.913732] x15: 0000000000000000 x14: 0000000000000000 [ 4416.913733] x13: f074faec89ffffff x12: 0000000000000000 [ 4416.913734] x11: 0000000000001000 x10: 0000000000001000 [ 4416.929176] x9 : ffffffff20d1f5c7 x8 : 0000000000000000 [ 4416.929178] x7 : 626d7464ff286b6b x6 : ffffffc019533ade [ 4416.929179] x5 : 000000008049000e x4 : ffffffff2793e9e0 [ 4416.929180] x3 : 000000008049000e x2 : ffffff89ecfa74d0 [ 4416.929181] x1 : 0000000000000c40 x0 : ffffffff2076f9c0 [ 4416.929184] Call trace: [ 4416.929187] fsverity_verify_page+0x20/0x78 [ 4416.929189] f2fs_verify_bio+0x11c/0x29c [ 4416.929192] f2fs_verity_work+0x58/0x84 [ 4417.050667] process_one_work+0x270/0x47c [ 4417.055354] worker_thread+0x27c/0x4d8 [ 4417.059784] kthread+0x13c/0x320 [ 4417.063693] ret_from_fork+0x10/0x18 Chao pointed this can happen by the below race condition. Thread A f2fs_post_read_wq fsverity_wq - f2fs_read_multi_pages() - f2fs_alloc_dic - dic->pending_pages = 2 - submit_bio() - submit_bio() - f2fs_post_read_work() handle first bio - f2fs_decompress_work() - __read_end_io() - f2fs_decompress_pages() - dic->pending_pages-- - enqueue f2fs_verity_work() - f2fs_verity_work() handle first bio - f2fs_verify_bio() - dic->pending_pages-- - f2fs_post_read_work() handle second bio - f2fs_decompress_work() - enqueue f2fs_verity_work() - f2fs_verify_pages() - f2fs_free_dic() - f2fs_verity_work() handle second bio - f2fs_verfy_bio() - use-after-free on dic Signed-off-by: Daeho Jeong Signed-off-by: Jaegeuk Kim commit a8d5dd192a0f44707ffa4b841424e760e21ff5f4 Merge: c22c0d55d547b 2f6b379cca4cd Author: David S. Miller Date: Tue Dec 8 15:39:01 2020 -0800 Merge tag 'mlx5-updates-2020-12-01' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux mlx5-updates-2020-12-01 mlx5e port TX timestamping support and MISC updates 1) Add support for port TX timestamping, for better PTP accuracy. Currently in mlx5 HW TX timestamping is done on CQE (TX completion) generation, which much earlier than when the packet actually goes out to the wire, in this series Eran implements the option to do timestamping on the port using a special SQ (Send Queue), such Send Queue will generate 2 CQEs (TX completions), the original one and a new one when the packet leaves the port, due to the nature of this special handling, such mechanism is an opt-in only and it is off by default to avoid any performance degradation on normal traffic flows. This patchset improves TX Hardware timestamping offset to be less than 40ns at a 100Gbps line rate, compared to 600ns before. With that, making our HW compliant with G.8273.2 class C, and allow Linux systems to be deployed in the 5G telco edge, where this standard is a must. 2) Misc updates and trivial improvements. Signed-off-by: David S. Miller commit 4f9f1415bb1386da26111d2d419e8a73075431c2 Merge: b4e217d0b3204 7704b100719cf Author: Arnd Bergmann Date: Wed Dec 9 00:06:33 2020 +0100 Merge tag 'amlogic-dt64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into arm/dt arm64: dts: amlogic updates for v5.11, round 2 - audio support for several more boards - PHY timing fixes * tag 'amlogic-dt64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: arm64: dts: meson: add i2c3/rtc nodes and vrtc alias to GT-King/GT-King-Pro arm64: dts: meson: g12b: w400: fix PHY deassert timing requirements arm64: dts: meson: g12a: x96-max: fix PHY deassert timing requirements ARM: dts: meson: fix PHY deassert timing requirements arm64: dts: meson: fix PHY deassert timing requirements arm64: dts: meson: g12b: odroid-n2: fix PHY deassert timing requirements arm64: dts: meson: minor fixups for Khadas VIM/VIM2 dts arm64: dts: meson: add audio playback to wetek-play2 arm64: dts: meson: add audio playback to wetek-hub arm64: dts: meson: add audio playback to odroid-c2 arm64: dts: meson: add audio playback to nanopi-k2 arm64: dts: meson: add audio playback to khadas-vim2 arm64: dts: meson: add audio playback to khadas-vim arm64: dts: meson: add audio playback to a95x arm64: dts: meson-axg: add GE2D node Link: https://lore.kernel.org/r/7ho8j4gkxo.fsf@baylibre.com Signed-off-by: Arnd Bergmann commit b4e217d0b3204010782f2d9a176cb04e66bdbf0c Merge: 456983022454b 7995fb896b963 Author: Arnd Bergmann Date: Wed Dec 9 00:05:29 2020 +0100 Merge tag 'samsung-dt-5.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Samsung DTS ARM changes for v5.11, part three 1. S3C bindings and DTS cleanup, 2. Correct the clock rates for SPI0 in Artik 5 which is a fix for recently introduced Ethernet on SPI on Artik 5 board. * tag 'samsung-dt-5.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: dts: exynos: Reduce assigned-clocks entries for SPI0 on Artik5 board ARM: dts: s3c6410: correct SMDK6410 board compatible ARM: dts: s3c24xx: add SMDK2416 board compatible dt-bindings: arm: samsung: document S3C6410-based boards binding dt-bindings: arm: samsung: document SMDK2416 board binding Link: https://lore.kernel.org/r/20201207074528.4475-2-krzk@kernel.org Signed-off-by: Arnd Bergmann commit 456983022454b2ea5db8de3129c327dba4bf1108 Merge: 261078ab9002d 29952fea5e850 Author: Arnd Bergmann Date: Wed Dec 9 00:04:34 2020 +0100 Merge tag 'v5.11-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/dt Veyron backlight fix, another fix for dtbs-check and some additions to the rk3288-based VMARC boards. * tag 'v5.11-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: ARM: dts: rockchip: Add SDIO0 node for VMARC SOM ARM: dts: rockchip: Add rtc node for VMARC SOM ARM: dts: rockchip: rename wdt nodename to watchdog on rv1108 ARM: dts: rockchip: Remove 0 point from brightness-levels on rk3288-veyron Link: https://lore.kernel.org/r/4582475.GXAFRqVoOG@phil Signed-off-by: Arnd Bergmann commit 261078ab9002d0b5aff807b374425ef8120a84f4 Merge: f8ff2f057e745 e12f67fe83446 Author: Arnd Bergmann Date: Wed Dec 9 00:03:14 2020 +0100 Merge tag 'v5.11-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/dt Newly added boards are the PX30 SOM system from Engicam and Kobol Helios64. The Scarlet tablet finally gets support for its cameras, now that the the rk3399-isp moved out of staging. The Odroid-Go-Advance got its joystick support now that the adc-joystick driver was merged and misc omprovements to the RockPi4, rk3328-roc-cc and orange-pi. * tag 'v5.11-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: (28 commits) arm64: dts: rockchip: use USB host by default on rk3399-rock-pi-4 arm64: dts: rockchip: fix I2S conflict on rk3399-rock-pi-4 arm64: dts: rockchip: fix supplies on rk3399-rock-pi-4 arm64: dts: rockchip: Fix UART pull-ups on rk3328 arm64: dts: rockchip: add isp and sensors for Scarlet arm64: dts: rockchip: add isp0 node for rk3399 arm64: dts: rockchip: Properly define the type C connector on rk3399-orangepi arm64: dts: rockchip: Add BT support on px30-engicam arm64: dts: rockchip: Add WiFi support on px30-engicam arm64: dts: rockchip: Add Engicam PX30.Core C.TOUCH 2.0 10.1" OF dt-bindings: arm: rockchip: Add Engicam PX30.Core C.TOUCH 2.0 10.1" OF arm64: dts: rockchip: Enable LVDS panel on px30-engicam-edimm2.2 arm64: dts: rockchip: Enable USB Host, OTG on px30-enagicam arm64: dts: rockchip: rename sdhci nodename to mmc on rk3399 arm64: dts: rockchip: Enable analog audio on rk3328-roc-cc arm64: dts: rockchip: Enable HDMI audio on rk3328-roc-cc arm64: dts: rockchip: Set dr_mode to "host" for OTG on rk3328-roc-cc arm64: dts: rockchip: Add Engicam PX30.Core C.TOUCH 2.0 arm64: dts: rockchip: Add Engicam C.TOUCH 2.0 dt-bindings: arm: rockchip: Add Engicam PX30.Core C.TOUCH 2.0 ... Link: https://lore.kernel.org/r/4278011.LvFx2qVVIh@phil Signed-off-by: Arnd Bergmann commit f8ff2f057e745412204b5f42a439691310a6acc2 Merge: 49d47bf9f55c8 85b8350ae99d1 Author: Arnd Bergmann Date: Wed Dec 9 00:01:58 2020 +0100 Merge tag 'at91-dt-5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/dt AT91 DT for 5.11 #2: - switch to new TCB PWM bindings - rework ADC bindings - fix sama5d2 securam and can1 * tag 'at91-dt-5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: dts: at91: sama5d2: fix CAN message ram offset and size ARM: dts: at91: sama5d2: map securam as device ARM: dts: at91: sam9x60ek: remove bypass property ARM: dts: at91: remove deprecated ADC properties ARM: dts: at91: at91sam9rl: fix ADC triggers ARM: dts: at91: sama5d3: use proper ADC compatible ARM: dts: at91: kizbox: switch to new pwm-atmel-tcb binding Link: https://lore.kernel.org/r/20201206013840.GA627225@piout.net Signed-off-by: Arnd Bergmann commit 49d47bf9f55c8ab8d54ea857eb1b223ee45c8afc Merge: aa66be3bff659 0b84862688951 Author: Arnd Bergmann Date: Wed Dec 9 00:00:22 2020 +0100 Merge tag 'imx-dt64-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt i.MX arm64 device tree changes for 5.11: - New board support: LX2162A QDS, Kontron i.MX8M Mini SoMs and baseboards. - A number of patches from Adam Ford to add various audio devices for i.MX8MM/MN and update imx8mm-beacon-som board on QSPI NOR and RTC. - Correct WDOG_B pin configuration for i.MX8MM/MN/MP. - A series from Ioana Ciornei complete the MAC/PCS/PHY representation on DPAA2 devices. - Add PMU device for i.MX8MP/MN. - Add IR and CAN support for i.MX8MP/MN/MM EVK board. - Adjust GIC CPU mask to match number of CPUs for i.MX8MP/MN/MM. - A series of patch from Michael Walle to update LS1028A support with addition of CAN and OPTEE, also ENETC PTP and FlexSPI clock input correction. - Add SPDIF sound card support on imx8mq-evk board. - Misc random updates and device additions. * tag 'imx-dt64-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (50 commits) arm64: dts: imx8mm-beacon-som: Assign PMIC clock arm64: dts: imx8mm-beacon-som: Configure RTC aliases arm64: dts: imx8mn: Add node for SPDIF arm64: dts: imx8mn: Add support for micfil arm64: dts: imx8mn: Add SAI nodes arm64: dts: imx8mn: Enable Asynchronous Sample Rate Converter arm64: dts: ls1028a: make the eMMC and SD card controllers use fixed indices arm64: dts: freescale: update calibration table for TMU module arm64: dts: freescale: sl28: combine SPI MTD partitions arm64: dts: ls1028a: add optee node arm64: dts: ls1028a: fix FlexSPI clock input arm64: dts: ls1028a: fix ENETC PTP clock input arm64: dts: imx: Fix imx8mm-kontron-n801x-s.dtb target arm64: dts: imx8mn-evk: add IR support arm64: dts: imx8mm-evk: add IR support arm64: dts: imx8mq-evk: add linux,autosuspend-period property for IR arm64: dts: imx8mp-evk: add CAN support arm64: dts: imx8mq-evk: Add spdif sound card support arm64: dts: imx8mq: Configure clock rate for audio plls arm64: dts: layerscape: Add PCIe EP node for ls1088a ... Link: https://lore.kernel.org/r/20201202142717.9262-5-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit aa66be3bff6593bc74c5e09875709cd66e571b27 Merge: 3eaac3aed2e3a 327106e4217b8 Author: Arnd Bergmann Date: Tue Dec 8 23:58:19 2020 +0100 Merge tag 'imx-dt-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt i.MX device tree update for 5.11: - New board support: imx6dl-alti6p, imx6dl-lanmcu, mx6qp-prtwd3, imx6ul-phytec-segin and imx7d-flex-concentrator. - Fix schema warnings for pwm-leds, watchdog and GPIO hog devices. - A few patches from Krzysztof Kozlowski to correct compatibles for i.MX6/7 boards. - A series from Matthias Schiffer to polish imx7-mba7 board support. - Update i.MX6/7 device trees for fsl,stop-mode support. - Correct fsl,rcpm-wakeup of LS1021A to get flextimer wake-up work. - A series of patch from Stefan Riedmueller to update phytec and segin devices. - Other small and random changes. * tag 'imx-dt-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (40 commits) ARM: dts: imx28: Fix label name for L2 switch ARM: dts: add Protonic WD3 board ARM: dts: imx6qdl-kontron-samx6i: increase i2c-frequency ARM: dts: imx7: add support for kamstrup flex concentrator ARM: dts: ls1021a: update calibration table for TMU module ARM: dts: ls1021a: fix rcpm failed to claim resource ARM: dts: ls1021a: fix flextimer failed to wake system ARM: dts: imx50-kobo-aura: Enable eKTF2132 touchscreen ARM: dts: imx: Change flexcan node name to "can" ARM: dts: imx6q-pico: fix board compatibles ARM: dts: add Van der Laan LANMCU board ARM: dts: add Altesco I6P board ARM: dts: imx6ul: segin: peb-av-02: Mark stmpe touch as wakeup-source ARM: dts: imx6ul: phytec: Add support for optional PEB-AV-02 LCD adapter ARM: dts: imx6ul: segin: Add phyBOARD-Segin with eMMC phyCORE-i.MX6UL ARM: dts: imx50-kobo-aura: Add 'grp' suffix to pinctrl node names ARM: dts: imx: add usb alias ARM: dts: imx6/7: sync fsl,stop-mode with current flexcan driver ARM: dts: imx: Fix schema warnings for pwm-leds ARM: dts: imx7s-warp: correct vendor in compatible to Element14 ... Link: https://lore.kernel.org/r/20201202142717.9262-4-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit 3eaac3aed2e3aff29198a6058069fa7712d13e60 Merge: 1e3e7ca547a6e 747ec53ea72a5 Author: Arnd Bergmann Date: Tue Dec 8 23:57:14 2020 +0100 Merge tag 'imx-bindings-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt i.MX DT bindings update for 5.11: - Quite some patches that update vendor-prefixes.yaml and fsl.yaml to document missing board compatibles and add new board compatibles. - A couple of patches from Dong Aisheng to update imx-scu firmware and imx-lpcg clock bindings for new SCU two cells clock support. - A couple of net bindings update from Ioana Ciornei to complete the MAC/PCS/PHY representation on DPAA2 devices. - Document watchdog compatibles for all i.MX and Layerscape devices. * tag 'imx-bindings-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (35 commits) dt-bindings: arm: fsl: add Protonic WD3 board dt-bindings: vendor-prefixes: add "virtual" prefix dt-bindings: fsl: add kamstrup flex concentrator to schema dt-bindings: arm: fsl: document i.MX7S boards dt-bindings: arm: fsl: document SolidRun LX2160A boards dt-bindings: arm: fsl: document LS1012A FRWY board dt-bindings: arm: fsl: add Van der Laan LANMCU board dt-bindings: arm: fsl: add Altesco I6P board dt-bindings: vendor-prefixes: Add an entry for Altus-Escon-Company dt-bindings: net: add the 10gbase-r connection type dt-bindings: net: add the DPAA2 MAC DTS definition dt-bindings: fsl: add compatible for LX2162A QDS Board dt-bindings: vendor-prefixes: Add an entry for Van der Laan b.v. dt-bindings: arm: fsl: document i.MX7D boards dt-bindings: arm: fsl: document i.MX6ULL boards dt-bindings: arm: fsl: document i.MX6UL boards dt-bindings: arm: fsl: document i.MX6SX boards dt-bindings: arm: fsl: document i.MX6SL boards dt-bindings: arm: fsl: document i.MX6QP boards dt-bindings: arm: fsl: document i.MX6Q boards ... Link: https://lore.kernel.org/r/20201202142717.9262-3-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit 1e3e7ca547a6ee2c5c232535cb546919ce0fbea7 Merge: 96631a0d11652 b6a1c8a1eaa73 Author: Arnd Bergmann Date: Tue Dec 8 23:56:06 2020 +0100 Merge tag 'amlogic-dt64' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into arm/dt arm64: dts: amlogic updates for v5.11 - AXG SoCs: add/enable PCIe & USB OTG support - AXG SoCs: add MIPI DSI support - Khadas VIM: add RTC - several cleanups & fixups * tag 'amlogic-dt64' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: arm64: dts: meson-sm1: fix typo in opp table arm64: dts: meson: add KHAMSIN IR remote node to SML5442TW arm64: dts: meson: update the Khadas VIM3/3L LED bindings arm64: dts: meson: fix spi-max-frequency on Khadas VIM2 arm64: dts: meson: add rtc aliases to meson-khadas-vim3.dtsi arm64: dts: meson: Add capacity-dmips-mhz attributes to GXM arm64: dts: meson-axg-s400: enable PCIe M.2 Key E slots arm64: dts: meson-axg: add PCIe nodes arm64: dts: meson-axg: add MIPI DSI PHY nodes arm64: dts: meson-axg: add PWRC node arm64: dts: meson: enable rtc node on Khadas VIM1/VIM2 boards dt-bindings: clk: axg-clkc: add MIPI DSI Host clock binding dt-bindings: clk: axg-clkc: add Video Clocks arm64: dts: meson: add watchdog to g12-common dtsi arm64: dts: meson: remove empty lines from aml-s905x-cc v2 dts Link: https://lore.kernel.org/r/7heek9jgox.fsf@baylibre.com Signed-off-by: Arnd Bergmann commit 96631a0d116528a1ab4b399bcd8b6b491394905c Merge: ff741319bc091 f74e93032df22 Author: Arnd Bergmann Date: Tue Dec 8 23:55:31 2020 +0100 Merge tag 'samsung-dt64-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Samsung DTS ARM64 changes for v5.11 1. Several cleanups, including aligning node names with dtschema. 2. Add WiFi/PCIe to TM2 boards (Exynos5433). 3. Correct restart and shutdown of Exynos7 boards, as part of Paweł Chmiel Exynos7420 mainlining effort. * tag 'samsung-dt64-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: arm64: dts: exynos: Drop incorrect use of io-channel-ranges property arm64: dts: exynos: use hyphens in Exynos5433 node names arm64: dts: exynos: Correct psci compatible used on Exynos7 arm64: dts: exynos: Include common syscon restart/poweroff for Exynos7 arm64: dts: exynos: add the WiFi/PCIe support to TM2(e) boards arm64: dts: exynos: remove redundant status=okay in Exynos5433 TM2 arm64: dts: exynos: adjust node names to DT spec in Exynos7 Espresso arm64: dts: exynos: adjust node names to DT spec in Exynos5433 TM2 arm64: dts: exynos: Harmonize DWC USB3 DT nodes name Link: https://lore.kernel.org/r/20201201204404.22675-3-krzk@kernel.org Signed-off-by: Arnd Bergmann commit ff741319bc091cc133dca042dd86b5c35c4d6c00 Merge: 30912c3ce6b1d afbd0bdebe0d8 Author: Arnd Bergmann Date: Tue Dec 8 23:54:11 2020 +0100 Merge tag 'samsung-dt-5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Samsung DTS ARM changes for v5.11, part two 1. Add devicetree of Samsung Galaxy Note 10.1 tablets (GT-N8010/GT-N8013), called P4 Note. These are quite old but still functional devices, based on Exynos4412. 2. Minor cleanups in Odroid XU3 Ethernet. 3. Minor fixes: ADC io-channel-ranges and P4 Note touchscreen GPIO polarity. * tag 'samsung-dt-5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: dts: exynos: switch Atmel mxt reset GPIO to active low on P4 Note ARM: dts: s5pv210: Drop unneeded io-channel-ranges property in Aries ARM: dts: s5pv210: Drop incorrect use of io-channel-ranges property ARM: dts: exynos: Drop incorrect use of io-channel-ranges ARM: dts: exynos: add Samsung's Exynos4412-based P4 Note boards dt-bindings: arm: samsung: document bindings for P4 Note family board ARM: dts: exynos: Add an alias for the Ethernet interface on Odroid XU3 ARM: dts: exynos: Fix Ethernet interface description on Odroid XU3 Link: https://lore.kernel.org/r/20201201204404.22675-2-krzk@kernel.org Signed-off-by: Arnd Bergmann commit 30912c3ce6b1d453836d102152403b3aca5dd5f5 Merge: 6ce23595b587a ea270ef71db64 Author: Arnd Bergmann Date: Tue Dec 8 23:53:13 2020 +0100 Merge tag 'keystone_dts_for_5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone into arm/dt ARM: dts: Keystone DTS update for v5.11 - HDMI Support - Analog Audio data support * tag 'keystone_dts_for_5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone: ARM: dts: keystone-k2g-evm: add HDMI and analog audio data Link: https://lore.kernel.org/r/1606851472-26593-1-git-send-email-santosh.shilimkar@oracle.com Signed-off-by: Arnd Bergmann commit 6ce23595b587a4cbb9f14cebdc20de4336f95473 Merge: a39d2ef78d44d 74ab8ccfb8f31 Author: Arnd Bergmann Date: Tue Dec 8 23:51:51 2020 +0100 Merge tag 'qcom-dts-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/dt Qualcomm DT updates for 5.11 This adds support for SD card, WiFi, LED, touchscreeni, touchkey and fuel gauge to the Samsung Galaxy S5. Nexus 5 also gains fuel gauge support. Finally IPQ6016 gains support for the QPIC NAND controller. * tag 'qcom-dts-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: arm64: dts: ipq6018: Add the QPIC peripheral nodes ARM: dts: qcom-pma8084: Drop incorrect use of io-channel-ranges ARM: dts: qcom: msm8974-lge-nexus5: Add fuel gauge ARM: dts: qcom: msm8974-klte: Add fuel gauge ARM: dts: qcom: msm8974-klte: Add support for SD card ARM: dts: qcom: msm8974-klte: Add support for wifi ARM: dts: qcom: msm8974-klte: Add gpio expander chip ARM: dts: qcom: msm8974-klte: Add support for led ARM: dts: qcom: msm8974-klte: Add support for touchscreen ARM: dts: qcom: msm8974-klte: Add support for touchkey ARM: dts: qcom: msm8974-klte: Merge pinctrl nodes Link: https://lore.kernel.org/r/20201130190148.345302-1-bjorn.andersson@linaro.org Signed-off-by: Arnd Bergmann commit a39d2ef78d44d79ed00fe9256b30c0de1a61d0af Merge: e40917e4664e4 956e9c85f47bf Author: Arnd Bergmann Date: Tue Dec 8 23:50:07 2020 +0100 Merge tag 'qcom-arm64-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/dt Qualcomm ARM64 DT updates for 5.11 For SM8250 the recently introduced support for handling boot-loader stream mappings in the ARM SMMU allow us to enable this, and thereby USB controller and PHY, SDHCI controller and FastRPC, as well as support for the SM8250 HDK board has been added. Additionally PRNG and RTC is enabled. Similarly for SM8150, the ARM SMMU could be added which allows the secondary USB controller and PHYs, as well as WiFi to be added and support for the SM8150 HDK board to be introduced. Additionally Coresight and support for the last-level cache controller was added. MSM8916 finally has VDDCX and VDDMX removed as regulators and are now handled by the rpmpd driver for the devices controlling them. The Longsheer L8150 gains touchscreen, sensors, vibrator and LED support. MSM8992 gains USB and SDHCI support as well as an I2C controller and the associated RMI4 based touchscreen for the Lumia 950. MSM8994 also gains USB and SDHCI support, as well as VADC and temp-alarm support. Then support for the Lumia 950 XL is added. SDM845 gains interconnect properties for a number of devices and the GENI wrappers gains iommu stream configuration, which means DMA operations on e.g. I2C now works. The Lenovo Yoga C630 finally has the SMMU enabled, a few fixes and the description of the eDP bridge and panel means that the laptop can now boot mainline with working display, GPU, WiFi and audio. SC7180 gains a slew of smaller improvements and fixes. * tag 'qcom-arm64-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (93 commits) arm64: dts: qcom: c630: Define eDP bridge and panel arm64: dts: qcom: c630: Fix pinctrl pins properties arm64: dts: qcom: c630: Polish i2c-hid devices arm64: dts: qcom: sc7180: Add lpass cpu node for I2S driver arm64: dts: sdm845: Add interconnect properties for QUP interconnect: qcom: sdm845: Add the missing nodes for QUP dt-bindings: interconnect: sdm845: Add IDs for the QUP ports arm64: dts: qcom: c630: Expose LID events arm64: dts: qcom: c630: Re-enable apps_smmu dts: qcom: sdm845: Add dt entries to support crypto engine. arm64: dts: qcom: qrb5165-rb5: Add support for MCP2518FD arm64: dts: qcom: sdm845: use GIC_SPI for IPA interrupts arm64: dts: qcom: sc7180: use GIC_SPI for IPA interrupts arm64: dts: qcom: sc7180: limit IPA iommu streams arm64: dts: qcom: sm8150: Add Coresight support arm64: dts: qcom: sc7180-trogdor: Make pp3300_a the default supply for pp3300_hub arm64: dts: qcom: sc7180: Add DDR/L3 votes for the pro variant arm64: dts: qcom: sc7180-lite: Tweak DDR/L3 scaling on SC7180-lite arm64: dts: qcom: sc7180-trogdor: add "pen-insert" label for trogdor arm64: qcom: sc7180: trogdor: Add ADC nodes and thermal zone for charger thermistor ... Link: https://lore.kernel.org/r/20201130190131.345187-1-bjorn.andersson@linaro.org Signed-off-by: Arnd Bergmann commit e40917e4664e490d5f5b7a4cbd83ee9f46d27113 Merge: a2f9886a9ea55 cd48ce86a4d0c Author: Arnd Bergmann Date: Tue Dec 8 23:47:04 2020 +0100 Merge tag 'ti-k3-dt-for-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/nmenon/linux into arm/dt Devicetree changes for TI K3 platforms for v5.11 merge window: - Standardized usage of "disabled" only in board.dts files, #interrupt-cells warning fixups, node format error fixes - J721E: R5F support, MMC/SD UHS mode added - AM654: R5F support, dss marked coherent, drop unused dma-ring-reset-quirk property - J7200: ADC support, Mailbox, hwspinlock * tag 'ti-k3-dt-for-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/nmenon/linux: (25 commits) arm64: dts: ti: k3-j721e-common-proc-board: Add support for SD card UHS modes arm64: dts: ti: k3-j721e-main: Add output tap delay values arm64: dts: ti: k3: squelch warning about lack of #interrupt-cells arm64: dts: ti: k3-j7200-common-proc-board: Correct the name of io expander on main_i2c1 arm64: dts: ti: k3-j7200-som-p0: main_i2c0 have an ioexpander on the SOM arm64: dts: ti: k3-j7200-som-p0: Add IPC sub-mailbox nodes arm64: dts: ti: k3-j7200-main: Add mailbox cluster nodes arm64: dts: ti: k3-j7200-main: Add hwspinlock node arm64: dts: ti: am65/j721e/j7200: Mark firmware used uart as "reserved" arm64: dts: ti: k3-am654-base-board: Fix up un-necessary status set to "okay" for USB arm64: dts: ti: am65/j721e: Fix up un-necessary status set to "okay" for crypto arm64: dts: ti: k3-j721e*: Cleanup disabled nodes at SoC dtsi level arm64: dts: ti: k3-am65*: Cleanup disabled nodes at SoC dtsi level arm64: dts: ti: k3-j7200-mcu-wakeup: Enable ADC support arm64: dts: ti: k3-am65*/j721e*: Fix unit address format error for dss node arm64: dts: ti: k3-j721e-som-p0: Add DDR carveout memory nodes for R5Fs arm64: dts: ti: k3-j721e-som-p0: Add mailboxes to R5Fs arm64: dts: ti: k3-j721e-main: Add MAIN domain R5F cluster nodes arm64: dts: ti: k3-j721e-mcu: Add MCU domain R5F cluster node arm64: dts: ti: k3-am654-base-board: Reserve memory for IPC between R5F cores ... Link: https://lore.kernel.org/r/20201130174258.ljsiokkyr7x7tsbd@covenant Signed-off-by: Arnd Bergmann commit a2f9886a9ea55c3ea973048eb5cf3d972dfecb90 Merge: 9bc08aa60f567 a2081c09d7410 Author: Arnd Bergmann Date: Tue Dec 8 23:45:58 2020 +0100 Merge tag 'mvebu-dt64-5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into arm/dt mvebu dt64 for 5.11 (part 1) - Add support for IEI Puzzle-M801 board (Armada 8040 based) - Add support ESPRESSObin-Ultra (Armada 3720 based) - Clean-up and improve espressobin device tree - Switch to per-port SATA interrupts on CP110 based SoC - Use compliant node name for USB3 on CP110 based SoC - Add heartbeat LED on mcbin singleshot - Disable SMMU by default for Armada 7040 and 8040 to continued supporting custom bot firmware - Turris mox: - add 3W power capability to SFP cage - update ethernet-phy handle name * tag 'mvebu-dt64-5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu: arm64: dts: armada-3720-turris-mox: add 3W power capability to SFP cage arm64: dts: marvell: keep SMMU disabled by default for Armada 7040 and 8040 arm64: dts: mcbin-singleshot: add heartbeat LED arm64: dts: marvell: cp11x: Harmonize xHCI DT nodes name arm64: dts: marvell: espressobin: Update link to V7 schematic arm64: dts: armada-3720-turris-mox: update ethernet-phy handle name arm64: dts: marvell: armada-cp110: Switch to per-port SATA interrupts arm64: dts: marvell: add DT for ESPRESSObin-Ultra arm64: dts: marvell: espressobin: Add support for LED2 arm64: dts: marvell: Add a device tree for the IEI Puzzle-M801 board arm64: dts: marvell: espressobin: De-duplicate eMMC definitions arm64: dts: marvell: espressobin: Get rid of duplicate serial aliases arm64: dts: marvell: espressobin: Simplify v7 ethernet port labeling Link: https://lore.kernel.org/r/87eekaj0i4.fsf@BL-laptop Signed-off-by: Arnd Bergmann commit 9bc08aa60f56748a06814f4f1366522a483c57cf Merge: f458d69bf7cac 51b632c713d50 Author: Arnd Bergmann Date: Tue Dec 8 23:44:45 2020 +0100 Merge tag 'mvebu-dt-5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into arm/dt mvebu dt for 5.11 (part 1) - Add support for MikroTik CRS3xx switches - Add support for RD-AC3X-48G4X2XL board : Armada 382 SoC connected to Prestera AC3X ASIC through PCI - Clean-up kirkwood device tree: replace "ok" by "okay" - Improve device tree for PCA953x gpio expander nodes - Use compliant node name for USB3 on armada 375 - 98dx3236 SoCs: - remove non-existent i2c1 - add i2c0 pinctrl information - Improve device tree for Turris Omnia * tag 'mvebu-dt-5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu: ARM: dts: mvebu: Add device tree for RD-AC3X-48G4X2XL board arm: dts: marvell: armada-375: Harmonize DWC USB3 DT nodes name ARM: dts: turris-omnia: remove unneeded status = "okay" properties ARM: dts: turris-omnia: update ethernet-phy node and handle name ARM: dts: turris-omnia: add LED controller node ARM: dts: turris-omnia: add SFP node ARM: dts: turris-omnia: describe switch interrupt ARM: dts: turris-omnia: add comphy handle to eth2 ARM: dts: turris-omnia: enable HW buffer management ARM: dts: Add i2c0 pinctrl information for 98dx3236 ARM: dts: Remove non-existent i2c1 from 98dx3236 ARM: dts: armada: align GPIO hog names with dtschema ARM: dts: dove: fix PCA95xx GPIO expander properties on A510 ARM: dts: kirkwood: replace status value "ok" by "okay" ARM: dts: mvebu: Add CRS328-4C-20S-4S board ARM: dts: mvebu: Add CRS305-1G-4S board ARM: dts: mvebu: Add CRS326-24G-2S board Link: https://lore.kernel.org/r/87h7p6j0m7.fsf@BL-laptop Signed-off-by: Arnd Bergmann commit f458d69bf7cac5da16a9133d226a71e88b33042d Merge: 5161540797589 879e5b3f98bae Author: Arnd Bergmann Date: Tue Dec 8 23:43:33 2020 +0100 Merge tag 'nuvoton-5.11-devicetree' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/bmc into arm/dt Nuvoton device tree updates for 5.11 - New machines * Fii Kudo, a NPCM730 BMC * Quanta GSJ, a NPCM750 BMC * Qanta Olympus RunBMC, a NPCM750 BMC - Updates to the common device trees and NCPM750 EVB * tag 'nuvoton-5.11-devicetree' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/bmc: dt-bindings: vendor-prefixes: Add FII ARM: dts: nuvoton: Add Fii Kudo system ARM: dts: nuvoton: Add NPCM7xx RunBMC Olympus Quanta machine ARM: dts: nuvoton: Add Quanta GSJ BMC ARM: dts: nuvoton: Add Quanta GSJ BMC pinctrl ARM: dts: nuvoton: Add Nuvoton NPCM730 device tree ARM: dts: nuvoton: Add new device nodes to NPCM750 EVB ARM: dts: nuvoton: Add new device nodes ARM: dts: nuvoton: Add pinctrl and GPIO node ARM: dts: nuvoton: Modify timer register size ARM: dts: nuvoton: Modify clock parameters Link: https://lore.kernel.org/r/CACPK8Xd8RaLv_p6t9ckBwCwtZww+2YYOAoAYQdvni0dxc2mS7A@mail.gmail.com Signed-off-by: Arnd Bergmann commit 5161540797589eacad9b309416b1d15729306c00 Merge: 1c202d0c5a674 5833bc6c7319d Author: Arnd Bergmann Date: Tue Dec 8 23:38:36 2020 +0100 Merge tag 'v5.10-next-dts64' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into arm/dt mt8173: - add new power domain controller node mt8183: - add new power domain controller - add display, iommu and dsi nodes mt8192: - add basic support, pinctrl, uart, spi, i2c and timer mt8516: - add auxadc, efuse and usb nodes mt8167: - add basic support for the SoC - add support for the pumkin board mt6779: - add initial support, interrupt controller, clocks, uart mt7622: - PWM node for all available PWM channels * tag 'v5.10-next-dts64' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: (25 commits) dts64: mt7622: disable spi1 and uart2 because pins are used by pwm dts64: mt7622: enable all pwm for bananapi r64 arm64: dts: mt8183: Add display nodes for MT8183 arm64: dts: mt8183: Add iommu and larb nodes arm64: dts: mt8183: Add dsi node arm64: dts: mt8183: Add pwm and backlight node arm64: dts: mediatek: Add mt8183 power domains controller arm64: dts: mediatek: Add smi_common node for MT8183 arm64: dts: mediatek: Add mt8173 power domain controller dt-bindings: power: Add MT8192 power domains dt-bindings: power: Add MT8183 power domains dt-bindings: power: Add bindings for the Mediatek SCPSYS power domains controller arm64: dts: Add Mediatek SoC MT8192 and evaluation board dts and Makefile arm64: dts: mediatek: add MT8167 pumpkin board dts arm64: dts: mediatek: add dtsi for MT8167 dt-bindings: arm64: dts: mediatek: Add mt8167-pumpkin board arm64: dts: mediatek: mt8516: add efuse node arm64: dts: mediatek: align GPIO hog names with dtschema arm64: dts: mediatek: mt8516: add usb1 node arm64: dts: mediatek: mt8516: rename usb phy ... Link: https://lore.kernel.org/r/72fe1c4f-f27c-c455-dfd9-66bde90bb295@gmail.com Signed-off-by: Arnd Bergmann commit 0aec75a5963e8d72c59a42055c5b5c524893b910 Author: Heiner Kallweit Date: Tue Dec 8 18:57:02 2020 +0100 PCI: Reduce pci_set_cacheline_size() message to debug level Drivers like ehci_hcd and xhci_hcd use pci_set_mwi() and emit an annnoying message like the following that results in user questions whether something is broken: xhci_hcd 0000:00:15.0: cache line size of 64 is not supported Root cause of the message is that on several chips the Cache Line Size register is hard-wired to 0. Change this message to debug level; an interested caller can still inform the user (if deemed helpful) based on the return code. Link: https://lore.kernel.org/r/be1ed3a2-98b9-ee1d-20b8-477f3d93961d@gmail.com Signed-off-by: Heiner Kallweit Signed-off-by: Bjorn Helgaas commit 1c202d0c5a67411b1d4a7af37d8bde8665972d34 Merge: c8b53b1c6b933 dccb22d078ebd Author: Arnd Bergmann Date: Tue Dec 8 23:37:23 2020 +0100 Merge tag 'arm-soc/for-5.11/devicetree-arm64' of https://github.com/Broadcom/stblinux into arm/dt This pull request contains Broadcom ARM64-based SoCs Device Tree changes for 5.11, please pull the following: - Rafal adds initial support for the Broadcom 4908 which are SoCs used in home routers and are based on the DSL architecture and using Broadcom Brahma-B53 CPUs. * tag 'arm-soc/for-5.11/devicetree-arm64' of https://github.com/Broadcom/stblinux: arm64: add config for Broadcom BCM4908 SoCs arm64: dts: broadcom: add BCM4908 and Asus GT-AC5300 early DTS files dt-bindings: arm: bcm: document BCM4908 bindings Link: https://lore.kernel.org/r/20201128163410.1691529-4-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann commit c8b53b1c6b9330ebee782ca28cc824fec50064de Merge: 915a391915033 f722fbac1e533 Author: Arnd Bergmann Date: Tue Dec 8 23:36:21 2020 +0100 Merge tag 'arm-soc/for-5.11/devicetree' of https://github.com/Broadcom/stblinux into arm/dt This pull request contains Broadcom ARM-based SoCs changes for 5.11, please pull the following: - Vivek updates the Linksys EA9500 DTS by adding the two additional switch port nodes (5 & 7), providing a flash partition layout to make the device usable with OpenWrt, and finally switches to using the pin controller rather than using mdio-mux to get the same outcome. - Serge fixes the USB Device Tree nodes unit name to be conformant to the recommended name patterns. - Rafal re-arranges all the nodes that belonged to the CRU block to be under the CRU node (such as PLLs). He also disables the USB3 PHY node for devices that lack USB3 and adds USB3 support to the Luxul XWR-3150 DTS. - Jonathan drops the incorrect 'io-channel-ranges' from the Cygnus SoC DTSI. - Maxime disables the Wi-Fi frequencies (around 2.4GHz) for HDMI on the Raspberry Pi 4 due to some cross-talk between the two blocks. - Pavel updates the DWC2 USB controller RX FIFO sizes to be more accurate for all BCM283x (Raspberr Pi) SoCs. - Florian updates all BCM5301x and NSP Device Tree files to allow switching the Broadcom B53 Ethernet switch device tree binding to YAML. * tag 'arm-soc/for-5.11/devicetree' of https://github.com/Broadcom/stblinux: (22 commits) dt-bindings: net: dsa: b53: Add YAML bindings ARM: dts: NSP: Provide defaults ports container node ARM: dts: NSP: Add a SRAB compatible string for each board ARM: dts: NSP: Fix Ethernet switch SGMII register name ARM: dts: NSP: Update ethernet switch node name ARM: dts: BCM5301X: Provide defaults ports container node ARM: dts: BCM5301X: Add a default compatible for switch node ARM: dts: BCM5301X: Update Ethernet switch node name dt-bindings: net: dsa: Document sfp and managed properties dt-bindings: net: dsa: Extend switch nodes pattern ARM: dts: bcm283x: increase dwc2's RX FIFO size ARM: dts: rpi-4: disable wifi frequencies ARM: dts: Cygnus: Drop incorrect io-channel-ranges property. ARM: dts: BCM5301X: Enable USB 3 PHY on Luxul XWR-3150 ARM: dts: BCM5301X: Disable USB 3 PHY on devices without USB 3 ARM: dts: BCM5301X: Move CRU devices to the CRU node ARM: dts: BCM5301X: Linksys EA9500 make use of pinctrl ARM: dts: BCM5301X: Use corretc pinctrl compatible for 4709x ARM: dts: BCM5301X: Linksys EA9500 add fixed partitions ARM: dts: BCM5310X: Harmonize xHCI DT nodes name ... Link: https://lore.kernel.org/r/20201128163410.1691529-3-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann commit 915a39191503359531fd92339bfe74ca3defe271 Merge: ab8d302c4804a 036b7334ee6dc Author: Arnd Bergmann Date: Tue Dec 8 23:34:45 2020 +0100 Merge tag 'sunxi-dt-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/dt Our usual bunch of patches to support the Allwinner SoCs, this time adding: - Some nice pinephone additions - I2S support for the A64, H3, H5 and H6 - New boards: Elimo Impetus, Elimo Initium, FriendlyArm ZeroPi, NanoPi R1 * tag 'sunxi-dt-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: (21 commits) ARM: dts: sun8i-h2-plus-bananapi-m2-zero: add gpio-line-names ARM: dts: sun8i: h3: Add initial NanoPi R1 support arm64: dts: allwinner: pinephone: Use generic sensor node names ARM: dts: sun8i: s3: Add dts for the Elimo Initium SBC dt-bindings: arm: sunxi: add Elimo bindings ARM: dts: sun8i: s3: Add dtsi for the Elimo Impetus SoM arm64: dts: allwinner: pinephone: Add Bluetooth support arm64: dts: allwinner: pinephone: Add WiFi support arm64: dts: allwinner: pinephone: Add light/proximity sensor arm64: dts: allwinner: pinephone: Add LED flash arm64: dts: allwinner: pinephone: Set ALDO3 to exactly 3v0 arm64: dts: allwinner: pinephone: Remove AC power supply arm: dts: sunxi: h3/h5: Add I2S2 node arm64: dts: allwinner: a64: Add I2S2 node arm64: dts: allwinner: h6: Add I2S1 node arm64: dts: allwinner: h6: PineH64 model B: Add wifi ARM: dts: sun8i-v3s: Add I2C1 PB pins description ARM: dts: sun8i: V3/S3: Add UART1 pin definitions to the V3/S3 dtsi dt-bindings: vendors: add Elimo Engineering vendor prefix ARM: dts: sun8i: add FriendlyArm ZeroPi support ... Link: https://lore.kernel.org/r/551fdf4f-8a0b-4a22-ba49-b4f61520a9ab.lettre@localhost Signed-off-by: Arnd Bergmann commit ab8d302c4804aeced87e1659214d4e8afcfd0a5e Merge: 914b8de3dd9e9 e1062fa7292f1 Author: Arnd Bergmann Date: Tue Dec 8 23:33:36 2020 +0100 Merge tag 'at91-dt-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/dt AT91 DT for 5.11: - fix USB host pinctrl - fix DT schema warnings * tag 'at91-dt-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: dts: at91: sama5d3_xplained: add pincontrol for USB Host ARM: dts: at91: sama5d4_xplained: add pincontrol for USB Host ARM: dts: at91: sam9x60: add pincontrol for USB Host ARM: dts: at91: at91-sama5d27_som1: fix EEPROM compatible ARM: dts: at91: Fix schema warnings for pwm-leds ARM: dts: at91: smartkiz: Reference led node directly Link: https://lore.kernel.org/r/20201127220403.GA1735041@piout.net Signed-off-by: Arnd Bergmann commit 96dd02519580faa731066351f438a2f967d9a0ee Author: Chao Yu Date: Mon Dec 7 17:54:41 2020 +0800 f2fs: fix to account inline xattr correctly during recovery During recovery, we may missed to update inline xattr count correctly, fix it. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 84921561532f771bd338e7791bf275b2b605d642 Author: Jack Qiu Date: Mon Dec 7 20:01:14 2020 +0800 f2fs: inline: fix wrong inline inode stat Miss to stat inline inode in f2fs_recover_inline_data. Signed-off-by: Jack Qiu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 6e5ca4fce7b3fc6065593a3a58f734a14d5a44c3 Author: Jack Qiu Date: Mon Dec 7 20:01:12 2020 +0800 f2fs: inline: correct comment in f2fs_recover_inline_data In 3rd scene, it should remove data blocks instead of inline_data. Signed-off-by: Jack Qiu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit d540e35d4e547776ea78d51f614ec38ed2824fbe Author: Yangtao Li Date: Mon Dec 7 18:59:34 2020 +0800 f2fs: don't check PAGE_SIZE again in sanity_check_raw_super() Many flash devices read and write a single IO based on a multiple of 4KB, and we support only 4KB page cache size now. Since we already check page size in init_f2fs_fs(), so remove page size check in sanity_check_raw_super(). Signed-off-by: Yangtao Li Signed-off-by: Shaohua Liu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit b9ec10948ff66f33e52d6617eae3c960cfd90638 Author: Yangtao Li Date: Mon Dec 7 18:59:33 2020 +0800 f2fs: convert to F2FS_*_INO macro Use F2FS_ROOT_INO, F2FS_NODE_INO and F2FS_META_INO macro for better code readability. Signed-off-by: Yangtao Li Signed-off-by: Shaohua Liu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit b577562ccc072ab4b09243740ebeca52309eecd2 Author: Heiner Kallweit Date: Tue Dec 8 13:16:22 2020 +0100 PCI: Remove unused HAVE_PCI_SET_MWI Remove unused HAVE_PCI_SET_MWI. Link: https://lore.kernel.org/r/03f20cac-708d-7897-c7c7-cb4e63cfd991@gmail.com Signed-off-by: Heiner Kallweit Signed-off-by: Bjorn Helgaas commit 9c8421e298d6efff38bbd7a6f97b081bd43b2137 Author: Jonathan Cameron Date: Sat Nov 28 17:33:41 2020 +0000 dt-bindings:i2c:i2c-gate: txt to yaml conversion This file provides very little in the way of actual schema but does provide a convenient intro to what an i2c-gate node actually represents. Signed-off-by: Jonathan Cameron Cc: Peter Rosin Cc: Wolfram Sang Link: https://lore.kernel.org/r/20201031181801.742585-2-jic23@kernel.org Link: https://lore.kernel.org/r/20201128173343.390165-2-jic23@kernel.org Signed-off-by: Rob Herring commit acf689134a66cc9c85e571d33b6bd5d72e4078cf Author: Andrey Zhizhikin Date: Tue Dec 1 22:29:22 2020 +0000 powerpc/configs: drop unused BACKLIGHT_GENERIC option Commit 7ecdea4a0226 ("backlight: generic_bl: Remove this driver as it is unused") removed geenric_bl driver from the tree, together with corresponding config option. Remove BACKLIGHT_GENERIC config item from generic-64bit_defconfig. Fixes: 7ecdea4a0226 ("backlight: generic_bl: Remove this driver as it is unused") Signed-off-by: Andrey Zhizhikin Reviewed-by: Krzysztof Kozlowski Acked-by: Daniel Thompson Acked-by: Sam Ravnborg Acked-by: Michael Ellerman Cc: Sam Ravnborg Link: https://lore.kernel.org/r/20201201222922.3183-6-andrey.zhizhikin@leica-geosystems.com' Signed-off-by: Arnd Bergmann commit 58d91ac9da06ea1d6da7085e6d273870784e146b Author: Andrey Zhizhikin Date: Tue Dec 1 22:29:21 2020 +0000 parisc: configs: drop unused BACKLIGHT_GENERIC option Commit 7ecdea4a0226 ("backlight: generic_bl: Remove this driver as it is unused") removed geenric_bl driver from the tree, together with corresponding config option. Remove BACKLIGHT_GENERIC config item from generic-64bit_defconfig. Fixes: 7ecdea4a0226 ("backlight: generic_bl: Remove this driver as it is unused") Signed-off-by: Andrey Zhizhikin Reviewed-by: Krzysztof Kozlowski Acked-by: Daniel Thompson Acked-by: Sam Ravnborg Cc: Sam Ravnborg Link: https://lore.kernel.org/r/20201201222922.3183-5-andrey.zhizhikin@leica-geosystems.com' Signed-off-by: Arnd Bergmann commit e854da4f51117d7340ec621face92e775bcd4d22 Author: Niklas Söderlund Date: Thu Nov 26 23:30:28 2020 +0100 thermal: rcar_gen3_thermal: Add r8a779a0 support Add support for R-Car V3U. The new THCODE values are taken from the example in the datasheet. Signed-off-by: Niklas Söderlund Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201126223028.3119044-4-niklas.soderlund+renesas@ragnatech.se commit d7fdfb6541f3be88d7b4d5ad0aeba7c14548eee8 Author: Niklas Söderlund Date: Thu Nov 26 23:30:26 2020 +0100 dt-bindings: thermal: rcar-gen3-thermal: Add r8a779a0 support Add support for R-Car V3U. The V3U IP differs a bit from its siblings in such way that it have 4 TSC nodes and the interrupts are not routed to the INTC-AP but to the ECM. Signed-off-by: Niklas Söderlund Reviewed-by: Rob Herring Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201126223028.3119044-2-niklas.soderlund+renesas@ragnatech.se commit c22c0d55d547b155853d8a032ce4802c3e32b17a Merge: bdc40a3f4b4f9 592b0179cd498 Author: Jakub Kicinski Date: Tue Dec 8 11:58:55 2020 -0800 Merge branch 'net-hns3-updates-for-next' Huazhong Tan says: ==================== net: hns3: updates for -next There are some updates for the HNS3 ethernet driver. promiscuous configuration more flexible, #2 adds ethtool private flags to control whether enable tx unicast promisc. previous version: https://patchwork.kernel.org/project/netdevbpf/cover/1606997936-22166-1-git-send-email-tanhuazhong@huawei.com/ ==================== Link: https://lore.kernel.org/r/1607227575-56689-1-git-send-email-tanhuazhong@huawei.com Signed-off-by: Jakub Kicinski commit 592b0179cd498641ae45b9ad4276f5038230f7aa Author: Guojia Liao Date: Sun Dec 6 12:06:15 2020 +0800 net: hns3: refine the VLAN tag handle for port based VLAN For DEVICE_VERSION_V2, the hardware only supports max two layer VLAN tags, including port based tag inserted by hardware, tag in tx buffer descriptor(get from skb->tci) and tag in packet. For transmit packet: If port based VLAN disabled, and vf driver gets a VLAN tag from skb, the VLAN tag must be filled to the Outer_VLAN_TAG field (tag near to DMAC) of tx buffer descriptor, otherwise it may be inserted after the tag in packet. If port based VLAN enabled, and vf driver gets a VLAN tag from skb, the VLAN tag must be filled to the VLAN_TAG field (tag far to DMAC) of tx buffer descriptor, otherwise it may be conflicted with port based VLAN, and raise a hardware error. For receive packet: The hardware will strip the VLAN tags and fill them in the rx buffer descriptor, no matter port based VLAN enable or not. Because port based VLAN tag is useless for stack, so vf driver needs to discard the port based VLAN tag get from rx buffer descriptor when port based VLAN enabled. So vf must know about the port based VLAN state. For DEVICE_VERSION_V3, the hardware provides some new configuration to improve it. For transmit packet: When enable tag shift mode, hardware will handle the VLAN tag in outer_VLAN_TAG field as VLAN_TAG, so it won't conflict with port based VLAN. And hardware also make sure the tag before the tag in packet. So vf driver doesn't need to specify the tag position according to the port based VLAN state anymore. For receive packet: When enable discard mode, hardware will strip and discard the port based VLAN tag, so vf driver doesn't need to identify it from rx buffer descriptor. So modify the port based VLAN configuration, simplify the process for vf handling the VLAN tag. Signed-off-by: Guojia Liao Signed-off-by: Huazhong Tan Signed-off-by: Jakub Kicinski commit 5e7414cdf1abea7e2fc19a3190aa7b0d0b1e629d Author: Jian Shen Date: Sun Dec 6 12:06:14 2020 +0800 net: hns3: add priv flags support to switch limit promisc mode Currently, the tx unicast promisc is always enabled when promisc mode on. If tx unicast promisc on, a function will receive all unicast packet from other functions belong to the same port. Add a ethtool private flag to control whether enable tx unicast promisc. Then the function is able to filter the unknown unicast packets from other function. Signed-off-by: Jian Shen Signed-off-by: Jakub Kicinski commit c43abe1a5f83d3afe39f9aea99edfd594add705c Author: Guojia Liao Date: Sun Dec 6 12:06:13 2020 +0800 net: hns3: add support for extended promiscuous command For DEVICE_VERSION_V2, the hardware supports enable tx and rx promiscuous separately. But tx or rx promiscuous is active for unicast, multicast and broadcast promiscuous simultaneously. To support traffics between functions belong to the same port, we always enable tx promiscuous for broadcast promiscuous, so tx promiscuous for unicast and multicast promiscuous is also enabled. For DEVICE_VERSION_V3, the hardware decouples the above relationship. Tx unicast promiscuous, rx unicast promiscuous, tx multicast promiscuous, rx multicast promiscuous, tx broadcast promiscuous and rx broadcast promiscuous can be enabled separately. So add support for the new promiscuous command. Signed-off-by: Guojia Liao Signed-off-by: Huazhong Tan Signed-off-by: Jakub Kicinski commit 0cc519f85a527e1c5ad5a7f182105fe614e9ff80 Author: Marc Zyngier Date: Tue Dec 8 19:51:49 2020 +0000 KVM: arm64: Fix nVHE boot on VHE systems Conflict resolution gone astray results in the kernel not booting on VHE-capable HW when VHE support is disabled. Thankfully spotted by David. Reported-by: David Brazdil Signed-off-by: Marc Zyngier commit 2f6b379cca4cdf5e04f759c2a15933f82dc6ab0b Author: Maxim Mikityanskiy Date: Tue Dec 1 14:42:08 2020 -0800 net/mlx5e: Fill mlx5e_create_cq_param in a function Create a function to fill the fields of struct mlx5e_create_cq_param based on a channel. The purpose is code reuse between normal CQs, XSK CQs and the upcoming QoS CQs. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit c28e3bd4cc8cbe9e8d17cdcc4017a95c90808d25 Author: Aya Levin Date: Tue Dec 1 14:42:07 2020 -0800 net/mlx5e: Split between RX/TX tunnel FW support indication Use the new FW caps to advertise for ip-in-ip tunnel support separately for RX and TX. Signed-off-by: Aya Levin Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit 0c4accc41cb56e527c8c049f5495af9f3d6bef7e Author: YueHaibing Date: Tue Dec 1 14:42:06 2020 -0800 net/mlx5: Fix passing zero to 'PTR_ERR' Fix smatch warnings: drivers/net/ethernet/mellanox/mlx5/core/esw/acl/egress_lgcy.c:105 esw_acl_egress_lgcy_setup() warn: passing zero to 'PTR_ERR' drivers/net/ethernet/mellanox/mlx5/core/esw/acl/egress_ofld.c:177 esw_acl_egress_ofld_setup() warn: passing zero to 'PTR_ERR' drivers/net/ethernet/mellanox/mlx5/core/esw/acl/ingress_lgcy.c:184 esw_acl_ingress_lgcy_setup() warn: passing zero to 'PTR_ERR' drivers/net/ethernet/mellanox/mlx5/core/esw/acl/ingress_ofld.c:262 esw_acl_ingress_ofld_setup() warn: passing zero to 'PTR_ERR' esw_acl_table_create() never returns NULL, so NULL test should be removed. Signed-off-by: YueHaibing Signed-off-by: Saeed Mahameed commit d894892dda25556b026753622e447c773232d685 Author: Shay Drory Date: Tue Dec 1 14:42:05 2020 -0800 net/mlx5: Arm only EQs with EQEs Currently, when more than one EQ is sharing an IRQ, and this IRQ is being interrupted, all the EQs sharing the IRQ will be armed. This is done regardless of whether an EQ has EQE. When multiple EQs are sharing an IRQ, one or more EQs can have valid EQEs. Signed-off-by: Shay Drory Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed commit fe8395168d844bef1551edcc6f6b96b2e8eff1d3 Author: YueHaibing Date: Tue Dec 1 14:42:04 2020 -0800 net/mlx5e: Remove duplicated include Remove duplicated include. Signed-off-by: YueHaibing Signed-off-by: Saeed Mahameed commit ade84367fbd56724c66117256f0fd51a53202a26 Author: Zhu Yanjun Date: Tue Dec 1 14:42:03 2020 -0800 net/mlx5e: remove unnecessary memset Since kvzalloc will initialize the allocated memory, it is not necessary to initialize it once again. Fixes: 11b717d61526 ("net/mlx5: E-Switch, Get reg_c0 value on CQE") Signed-off-by: Zhu Yanjun Signed-off-by: Saeed Mahameed commit 1880bc4e4a96691bfccd1882115af4e5431b4c7a Author: Eran Ben Elisha Date: Tue Dec 1 14:42:02 2020 -0800 net/mlx5e: Add TX port timestamp support Transmitted packet timestamping accuracy can be improved when using timestamp from the port, instead of packet CQE creation timestamp, as it better reflects the actual time of a packet's transmit. TX port timestamping is supported starting from ConnectX6-DX hardware. Although at the original completion, only CQE timestamp can be attached, we are able to get TX port timestamping via an additional completion over a special CQ associated with the SQ (in addition to the regular CQ). Driver to ignore the original packet completion timestamp, and report back the timestamp of the special CQ completion. If the absolute timestamp diff between the two completions is greater than 1 / 128 second, ignore the TX port timestamp as it has a jitter which is too big. No skb will be generate out of the extra completion. Allocate additional CQ per ptpsq, to receive the TX port timestamp. Driver to hold an skb FIFO in order to map between transmitted skb to the two expected completions. When using ptpsq, hold double refcount on the skb, to gaurantee it will not get released before both completions arrive. Expose dedicated counters of the ptp additional CQ and connect it to the TX health reporter. This patch improves TX Hardware timestamping offset to be less than 40ns at a 100Gbps line rate, compared to 600ns before. With that, making our HW compliant with G.8273.2 class C, and allow Linux systems to be deployed in the 5G telco edge, where this standard is a must. Signed-off-by: Eran Ben Elisha Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 145e5637d941daec2e8d1ff21676cbf1aa62cf4d Author: Eran Ben Elisha Date: Tue Dec 1 14:42:01 2020 -0800 net/mlx5e: Add TX PTP port object support Add TX PTP port object support for better TX timestamping accuracy. Currently, driver supports CQE based TX port timestamp. Device also offers TX port timestamp, which has less jitter and better reflects the actual time of a packet's transmit. Define new driver layout called ptpsq, on which driver will create SQs that will support TX port timestamp for their transmitted packets. Driver to identify PTP TX skbs and steer them to these dedicated SQs as part of the select queue ndo. Driver to hold ptpsq per TC and report them at netif_set_real_num_tx_queues(). Add support for all needed functionality in order to xmit and poll completions received via ptpsq. Add ptpsq to the TX reporter recover, diagnose and dump methods. Creation of ptpsqs is disabled by default, and can be enabled via tx_port_ts private flag. This patch steer all timestamp related packets to a ptpsq, but it does not open the port timestamp support for it. The support will be added in the following patch. Signed-off-by: Eran Ben Elisha Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit cecaa6a7d576bb1929d7642a1d1da9a33deeea37 Author: Eran Ben Elisha Date: Tue Dec 1 14:42:00 2020 -0800 net/mlx5e: Move MLX5E_RX_ERR_CQE macro MLX5E_RX_ERR_CQE Macro is used only in data-path, move it to the appropriate header file. Signed-off-by: Eran Ben Elisha Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 1a7f51240dfb5f1afa791a4e369a428337ce4f5f Author: Eran Ben Elisha Date: Tue Dec 1 14:41:59 2020 -0800 net/mlx5e: Split SW group counters update function SW group counter update function aggregates sw stats out of many mlx5e_*_stats resides in a given mlx5e_channel_stats struct. Split the function into a few helper functions. This will be used later in the series to calculate specific mlx5e_*_stats which are not defined inside mlx5e_channel_stats. Signed-off-by: Eran Ben Elisha Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 0b676aaecc25e9686d27658b56add5c024d54a7c Author: Eran Ben Elisha Date: Tue Dec 1 14:41:58 2020 -0800 net/mlx5e: Change skb fifo push/pop API to be used without SQ The skb fifo push/pop API used pre-defined attributes within the mlx5e_txqsq. In order to share the skb fifo API with other non-SQ use cases, change the API input to get newly defined mlx5e_skb_fifo struct. Signed-off-by: Eran Ben Elisha Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 4ad40d8ee3cb974959a0f8d3111416e331e9c5f7 Author: Eran Ben Elisha Date: Tue Dec 1 14:41:57 2020 -0800 net/mlx5e: Allow SQ outside of channel context In order to be able to create an SQ outside of a channel context, remove sq->channel direct pointer. This requires adding a direct pointer to: netdevice, priv and mlx5_core in order to support SQs that are part of mlx5e_channel. Use channel_stats from the corresponding CQ. Signed-off-by: Eran Ben Elisha Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 521f31af004ade74963d551a719a36ca7df0ba70 Author: Aya Levin Date: Tue Dec 1 14:41:56 2020 -0800 net/mlx5e: Allow RQ outside of channel context In order to be able to create an RQ outside of a channel context, remove rq->channel direct pointer. This requires adding a direct pointer to: ICOSQ and priv in order to support RQs that are part of mlx5e_channel. Use channel_stats from the corresponding CQ. Signed-off-by: Aya Levin Signed-off-by: Eran Ben Elisha Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 4d0b7ef909b6a1fffd7fb0514f5b69fcc29f287a Author: Aya Levin Date: Tue Dec 1 14:41:55 2020 -0800 net/mlx5e: Allow CQ outside of channel context In order to be able to create a CQ outside of a channel context, remove cq->channel direct pointer. This requires adding a direct pointer to channel statistics, netdevice, priv and to mlx5_core in order to support CQs that are a part of mlx5e_channel. In addition, parameters the were previously derived from the channel like napi, NUMA node, channel stats and index are now assembled in struct mlx5e_create_cq_param which is given to mlx5e_open_cq() instead of channel pointer. Generalizing mlx5e_open_cq() allows opening CQ outside of channel context which will be used in following patches in the patch-set. Signed-off-by: Aya Levin Signed-off-by: Eran Ben Elisha Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit cdd3f2367aebc375197aa0d3a986a79e102e6862 Author: Tariq Toukan Date: Tue Dec 1 14:41:54 2020 -0800 net/mlx5e: Free drop RQ in a dedicated function The drop RQ has very limited objects to be freed, and differs from regular RQs in the context that it is freed from. Add a dedicated function for it, use it where needed, and remove the drop_rq-specific checks in the generic function. Signed-off-by: Tariq Toukan Reviewed-by: Aya Levin Reviewed-by: Maxim Mikityanskiy Signed-off-by: Saeed Mahameed commit bdc40a3f4b4f967e6411ee389f062d52a2686eca Author: Rasmus Villemoes Date: Sat Dec 5 14:39:44 2020 +0100 net: dsa: print the MTU value that could not be set These warnings become somewhat more informative when they include the MTU value that could not be set and not just the errno. Signed-off-by: Rasmus Villemoes Link: https://lore.kernel.org/r/20201205133944.10182-1-rasmus.villemoes@prevas.dk Signed-off-by: Jakub Kicinski commit 19bb4f78c91fa46bdf978e18766118498c3d2e63 Author: Kai Vehmanen Date: Tue Dec 8 20:57:36 2020 +0200 ALSA: hda/proc - print DP-MST connections To help in debugging issues with DisplayPort Multi-Stream Transport (aka DP-MST) support, print information of active connections for each device of a display audio pin widget. Example output with the patch with two monitors connected to a DP-MST hub: Devices: 4 Dev 00: PD = 0, ELDV = 0, IA = 0, Connections [ 0x03* 0x05 0x07 0x09 ] Dev 01: PD = 1, ELDV = 1, IA = 0, Connections [ 0x03* 0x05 0x07 0x09 ] *Dev 02: PD = 1, ELDV = 1, IA = 0, Connections [ 0x03 0x05* 0x07 0x09 ] Dev 03: PD = 0, ELDV = 0, IA = 0, Connections [ 0x03* 0x05 0x07 0x09 ] Connection: 4 0x03 0x05* 0x07 0x09 Format of existing "Connection:" entry is left intact to keep compatibility. Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20201208185736.2877541-1-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai commit e72550928ff052ca721777875bd23a7abf3efb13 Author: Qi Liu Date: Tue Dec 8 11:26:51 2020 -0700 coresight: etm4x: Modify core-commit to avoid HiSilicon ETM overflow The ETM device can't keep up with the core pipeline when cpu core is at full speed. This may cause overflow within core and its ETM. This is a common phenomenon on ETM devices. On HiSilicon Hip08 platform, a specific feature is added to set core pipeline. So commit rate can be reduced manually to avoid ETM overflow. Reviewed-by: Suzuki K Poulose Signed-off-by: Qi Liu [Modified changelog title and Kconfig description] Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20201208182651.1597945-4-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 45fe7befe0db5e61cd3c846315f0ac48541e8445 Author: Arnd Bergmann Date: Tue Dec 8 11:26:50 2020 -0700 coresight: remove broken __exit annotations Functions that are annotated __exit are discarded for built-in drivers, but the .remove callback in a device driver must still be kept around to allow bind/unbind operations. There is now a linker warning for the discarded symbol references: `tmc_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-tmc-core.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-tmc-core.o `tpiu_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-tpiu.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-tpiu.o `etb_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-etb10.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-etb10.o `static_funnel_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-funnel.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-funnel.o `dynamic_funnel_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-funnel.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-funnel.o `static_replicator_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-replicator.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-replicator.o `dynamic_replicator_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-replicator.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-replicator.o `catu_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-catu.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-catu.o Remove all those annotations. Fixes: 8b0cf82677d1 ("coresight: stm: Allow to build coresight-stm as a module") Reviewed-by: Stephen Boyd Signed-off-by: Arnd Bergmann Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20201208182651.1597945-3-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 83be0b84fe846edf0c722fefe225482d5f0d7395 Author: Suzuki K Poulose Date: Tue Dec 8 11:26:49 2020 -0700 coresight: tmc-etr: Fix barrier packet insertion for perf buffer When the ETR is used in perf mode with a larger buffer (configured via sysfs or the default size of 1M) than the perf aux buffer size, we end up inserting the barrier packet at the wrong offset, while moving the offset forward. i.e, instead of the "new moved offset", we insert it at the current hardware buffer offset. These packets will not be visible as they are never copied and could lead to corruption in the trace decoding side, as the decoder is not aware that it needs to reset the decoding. Fixes: ec13c78d7b45 ("coresight: tmc-etr: Add barrier packets when moving offset forward") Cc: Mathieu Poirier Cc: stable@vger.kernel.org Reported-by: Al Grant Tested-by: Mike Leach Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20201208182651.1597945-2-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit b175d273d4e4100b66e68f0675fef7a3c07a7957 Author: Alan Stern Date: Tue Dec 8 11:30:42 2020 -0500 USB: legotower: fix logical error in recent commit Commit d9f0d82f06c6 ("USB: legousbtower: use usb_control_msg_recv()") contained an elementary logical error. The check of the return code from the new usb_control_msg_recv() function was inverted. Reported-and-tested-by: syzbot+9be25235b7a69b24d117@syzkaller.appspotmail.com Signed-off-by: Alan Stern Link: https://lore.kernel.org/r/20201208163042.GD1298255@rowland.harvard.edu Fixes: d9f0d82f06c6 ("USB: legousbtower: use usb_control_msg_recv()") Cc: stable Signed-off-by: Greg Kroah-Hartman commit e5dddbedfe09df69ca819eb98f6dcccb006c6bc9 Author: Alexandru Ardelean Date: Fri Nov 27 13:14:20 2020 +0200 dt-bindings: add ADP5585/ADP5589 entries to trivial-devices This change adds the device-tree entries for the Analog Devices ADP5585 and ADP5589 devices to the trivial devices list. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201127111420.96500-4-alexandru.ardelean@analog.com Signed-off-by: Rob Herring commit 91438aebcd56ed3cfa480e4546c7b06e9db3c73c Author: Rafael J. Wysocki Date: Mon Dec 7 18:46:06 2020 +0100 ACPI: scan: Fix up _DEP-related terminology with supplier/consumer The ACPI namespace scanning code uses the terms master/slave when populating the list of _DEP dependencies, but that use has no external exposures and is not mandated by nor associated with any external specifications. Change the language used through-out to supplier/consumer. No functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Hans de Goede commit b36b1e9db41fcff860624ece91c71b62f2ad6754 Author: Rafael J. Wysocki Date: Mon Dec 7 17:55:11 2020 +0100 ACPI: scan: Drop INT3396 from acpi_ignore_dep_ids[] According to Hans, all device objects where the _HID returns "INT3396" also have a _CID returning "PNP0D80", so the former need not be present in acpi_ignore_dep_ids[] any more. Link: https://lore.kernel.org/linux-acpi/52a2b98c-6bf3-760b-eca9-93cf05fb4877@redhat.com/ Suggested-by: Hans de Goede Signed-off-by: Rafael J. Wysocki Acked-by: Hans de Goede commit 547f574fd9d5e3925d47fd44decbf6ab6df94b0e Author: Mathieu Chouquet-Stringer Date: Wed Dec 2 16:32:43 2020 +0100 docs: Update documentation to reflect what TAINT_CPU_OUT_OF_SPEC means Here's a patch updating the meaning of TAINT_CPU_OUT_OF_SPEC after Borislav introduced changes in a7e1f67ed29f and upcoming patches in tip. TAINT_CPU_OUT_OF_SPEC now means a bit more what it implies as the flag isn't set just because of a CPU misconfiguration or mismatch. Historically it was for SMP kernel oops on an officially SMP incapable processor but now it also covers CPUs whose MSRs have been incorrectly poked at from userspace, drivers being used on non supported architectures, broken firmware, mismatched CPUs, ... Update documentation and script to reflect that. Signed-off-by: Mathieu Chouquet-Stringer Link: https://lore.kernel.org/r/20201202153244.709752-1-me@mathieu.digital Signed-off-by: Jonathan Corbet commit 7704b100719cf0fead976a1bc839c60ee552d045 Author: Christian Hewitt Date: Tue Dec 1 06:21:35 2020 +0000 arm64: dts: meson: add i2c3/rtc nodes and vrtc alias to GT-King/GT-King-Pro The GT-King and GT-King-Pro boxes have an RTC chip and power cell, so enable it. GTKING:~ # dmesg | grep rtc [ 5.237245] meson-vrtc ff8000a8.rtc: registered as rtc1 [ 5.261869] rtc-hym8563 0-0051: registered as rtc0 [ 5.265016] rtc-hym8563 0-0051: setting system clock to 2020-11-30T09:16:54 UTC (1606727814) Signed-off-by: Christian Hewitt Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20201201062135.18241-1-christianshewitt@gmail.com commit 907d1f143b0ef6e46bd25b595e9b4f2d20ae869b Author: Philipp Zabel Date: Tue Dec 1 12:57:54 2020 +0100 docs: add a reset controller chapter to the driver API docs Add initial reset controller API documentation. This is mostly intended to describe the concepts to users of the consumer API, and to tie the kerneldoc comments we already have into the driver API documentation. Signed-off-by: Philipp Zabel Reviewed-by: Randy Dunlap Reviewed-by: Amjad Ouled-Ameur Link: https://lore.kernel.org/r/20201201115754.1713-1-p.zabel@pengutronix.de Signed-off-by: Jonathan Corbet commit 262bd5724afdefd4c48a260d6100e78cc43ee06b Author: Arvind Sankar Date: Fri Nov 27 12:13:24 2020 -0500 x86/cpu/amd: Remove dead code for TSEG region remapping Commit 26bfa5f89486 ("x86, amd: Cleanup init_amd") moved the code that remaps the TSEG region using 4k pages from init_amd() to bsp_init_amd(). However, bsp_init_amd() is executed well before the direct mapping is actually created: setup_arch() -> early_cpu_init() -> early_identify_cpu() -> this_cpu->c_bsp_init() -> bsp_init_amd() ... -> init_mem_mapping() So the change effectively disabled the 4k remapping, because pfn_range_is_mapped() is always false at this point. It has been over six years since the commit, and no-one seems to have noticed this, so just remove the code. The original code was also incomplete, since it doesn't check how large the TSEG address range actually is, so it might remap only part of it in any case. Hygon has copied the incorrect version, so the code has never run on it since the cpu support was added two years ago. Remove it from there as well. Committer notes: This workaround is incomplete anyway: 1. The code must check MSRC001_0113.TValid (SMM TSeg Mask MSR) first, to check whether the TSeg address range is enabled. 2. The code must check whether the range is not 2M aligned - if it is, there's nothing to work around. 3. In all the BIOSes tested, the TSeg range is in a e820 reserved area and those are not mapped anymore, after 66520ebc2df3 ("x86, mm: Only direct map addresses that are marked as E820_RAM") which means, there's nothing to be worked around either. So let's rip it out. Signed-off-by: Arvind Sankar Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201127171324.1846019-1-nivedita@alum.mit.edu commit da514157c4f063527204adc8e9642a18a77fccc9 Author: Thorsten Leemhuis Date: Fri Dec 4 07:43:50 2020 +0100 docs: make reporting-bugs.rst obsolete Make various places which point to Documentation/admin-guide/reporting-bugs.rst point to Documentation/admin-guide/reporting-issues.rst instead. That document is brand new and as of now is not completely finished. But even at this stage it's a lot more helpful and accurate than reporting-bugs.rst. Hence also add a note to reporting-bugs.rst, telling people they're better off reading reporting-issues.rst instead. reporting-bugs.rst is scheduled for removal once reporting-issues.rst is considered ready. Signed-off-by: Thorsten Leemhuis Link: https://lore.kernel.org/r/3df7c2d16de112b47bb6e6158138608e78562bf5.1607063223.git.linux@leemhuis.info Signed-off-by: Jonathan Corbet commit 3e544d72dfc8bba0e5be4e795dec16ce85ff5830 Author: Thorsten Leemhuis Date: Fri Dec 4 07:43:49 2020 +0100 docs: Add a new text describing how to report bugs Add a mostly finished document describing how to report issues with the Linux kernel to its developers. It is designed to be a lot more straight forward and easier to follow than the current text about this (Documentation/admin-guide/reporting-bugs.rst); at the same time the new text should be more helpful for people unfamiliar with the topic, as it provides a lot more details, too. The main work on the text is done, but some polishing is still needed. The text also needs to be reviewed by more people and a few issues still might need some discussion. To make these tasks easier, it was decided ([1]) to add this document to the kernel sources in parallel to the existing text; the latter will be removed once this text is considered good enough(tm). This document is quite long and provides a lot of details, but was carefully crafted to make sure it's can also serve people that are in a hurry. That's mainly achieved by having a TDLR and a step-by-step guide, which should be good enough for quite a lot of people. Everybody that wants or need more explanations can find them in a reference section, which describes all the needed steps in detail. Thanks to this structure the text can work for kernel developers that just need to look something up, experienced FLOSS contributors that are unfamiliar with the kernel's bug reporting workflow, and users reporting something upstream for the first time. The text is thus a bit like the kernel itself, which works well for embedded machines, a typical desktop PC, cloud servers, and HPC. The document was written in the hope it will improve the quality of the bug reports, especially those that come from people unfamiliar with how Linux kernel development works. Sadly quite a few reports from this group are currently of poor quality and/or get submitted to the wrong place. Part of the problem is the old reporting-bugs document, as it makes its essence hard to grasp; it's and also inaccurate and slightly outdated in a few spots. Due to this quite a few valid reports are ignored in the end, which is annoying for those that compiled them and bad for the kernel's quality. The document near the top points out that it's still unfinished, but nevertheless ready for consumption. Those few areas in the text that might need some further discussion contain a note pointing this out. Besides lack of review from core developers there is only one major issue left: the section 'Decode failure message' is known to be outdated: it's waiting for someone familiar with the topic to write something up or give at least provide some hints and pointers what to write there. The new document is dual-licensed under GPL-2.0+ or CC-BY-4.0. The latter is way more liberal and makes it attractive to use this text as a base when writing about this topic on websites or in books. This hopefully increases the chances that such texts are accurate and stick to official way of doing things. [1] https://lkml.kernel.org/r/20201118172958.5b014a44@lwn.net Signed-off-by: Thorsten Leemhuis CC: Thomas Gleixner CC: Greg Kroah-Hartman CC: Christoph Hellwig Link: https://lore.kernel.org/r/e2db808f954744b79f10937a923d9c99bdca1fca.1607063223.git.linux@leemhuis.info Signed-off-by: Jonathan Corbet commit bc41a7f3646980ef8b6a3ed20fc50c27e70b9fa5 Author: Thorsten Leemhuis Date: Fri Dec 4 07:43:48 2020 +0100 LICENSES: Add the CC-BY-4.0 license Add the full text of the CC-BY-4.0 license to the kernel tree as well as the required tags for reference and tooling. The license text was copied directly from the following url, but for clarification a 'Creative Commons' was added before 'Attribution 4.0 International' in the first line: https://creativecommons.org/licenses/by/4.0/legalcode.txt CC-BY-4.0 is GPLv2 compatible, but when for example used for the kernel's documentation it can easily happen that sphinx during processing combines it with text or code from files using a more restrictive license[1]. This bears pitfalls, hence point that risk out and suggest to only use this license in combination with the GPLv2. [1] https://lkml.kernel.org/r/20201201144314.GA14256@lst.de Signed-off-by: Thorsten Leemhuis Reviewed-by: Greg Kroah-Hartman CC: Thomas Gleixner CC: Greg Kroah-Hartman CC: Christoph Hellwig Link: https://lore.kernel.org/r/7115b6c20ae3e6db0370fe4002dd586011205e1c.1607063223.git.linux@leemhuis.info Signed-off-by: Jonathan Corbet commit 751d5b27418345f56ee0bb6ce9da2988a228de10 Author: Andrew Klychkov Date: Fri Dec 4 10:28:48 2020 +0300 Documentation: fix multiple typos found in the admin-guide subdirectory Fix thirty five typos in dm-integrity.rst, dm-raid.rst, dm-zoned.rst, verity.rst, writecache.rst, tsx_async_abort.rst, md.rst, bttv.rst, dvb_references.rst, frontend-cardlist.rst, gspca-cardlist.rst, ipu3.rst, remote-controller.rst, mm/index.rst, numaperf.rst, userfaultfd.rst, module-signing.rst, imx-ddr.rst, intel-speed-select.rst, intel_pstate.rst, ramoops.rst, abi.rst, kernel.rst, vm.rst Signed-off-by: Andrew Klychkov Link: https://lore.kernel.org/r/20201204072848.GA49895@spblnx124.lan Signed-off-by: Jonathan Corbet commit b2105aa2c6481fda72c1825800b753a0bf614517 Author: Andrew Klychkov Date: Fri Dec 4 10:02:35 2020 +0300 Documentation: fix typos found in admin-guide subdirectory Fixed twelve typos in cppc_sysfs.rst, binderfs.rst, paride.rst, zram.rst, bug-hunting.rst, introduction.rst, usage.rst, dm-crypt.rst Signed-off-by: Andrew Klychkov Reviewed-by: Jonathan Corbet Reviewed-by: Randy Dunlap Link: https://lore.kernel.org/r/20201204070235.GA48631@spblnx124.lan Signed-off-by: Jonathan Corbet commit 9113584012847a7573d191b4544e1f6ed12a8142 Author: Ben Widawsky Date: Mon Dec 7 13:00:27 2020 -0800 kernel-doc: Fix example in Nested structs/unions Add missing ';' as well as fixes the indent for the first struct. Signed-off-by: Ben Widawsky Link: https://lore.kernel.org/r/20201207210027.1049346-1-ben.widawsky@intel.com Signed-off-by: Jonathan Corbet commit d151a23d7bd61a3719000dacc1f5b270c906e896 Author: Stephen Kitt Date: Tue Dec 8 08:49:22 2020 +0100 docs: clean up sysctl/kernel: titles, version This cleans up a few titles with extra colons, and removes the reference to kernel 2.2. The docs don't yet cover *all* of 5.10 or 5.11, but I think they're close enough. Most entries are documented, and have been checked against current kernels. Signed-off-by: Stephen Kitt Link: https://lore.kernel.org/r/20201208074922.30359-1-steve@sk2.org Signed-off-by: Jonathan Corbet commit 1080399542075bb0e9d46ea80418d76784d1ece8 Author: Pavankumar Kondeti Date: Sat Nov 28 07:09:23 2020 +0530 PM / EM: Micro optimization in em_cpu_energy When the sum of the utilization of CPUs in a power domain is zero, return the energy as 0 without doing any computations. Acked-by: Quentin Perret Reviewed-by: Dietmar Eggemann Signed-off-by: Pavankumar Kondeti Signed-off-by: Rafael J. Wysocki commit 301de5465f38bd496384d911b1d48437e87fb821 Author: Artem Bityutskiy Date: Wed Nov 4 14:21:13 2020 +0200 docs: trace: fix event state structure name The documentation refers to a non-existent 'struct synth_trace_state' structure. The correct name is 'struct synth_event_trace_state'. In other words, this patch is a mechanical substitution: s/synth_trace_state/synth_event_trace_state/g Signed-off-by: Artem Bityutskiy Reviewed-by: Tom Zanussi Acked-by: Steven Rostedt (VMware) Link: https://lore.kernel.org/r/20201104122113.322452-1-dedekind1@gmail.com Signed-off-by: Jonathan Corbet commit 9d125387d92bf68b14acee0297e10c5f382fd62f Merge: 8db06423e079b 9536ce6370595 Author: Mark Brown Date: Tue Dec 8 17:06:43 2020 +0000 Merge series "regulator: da9121: bug fixes" from Adam Ward : This patch fixes a couple of bugs in the DA9121 driver. One in an uninialised string I forgot to remove when changing to of_parse_cb() The other is an index for an optional DT property which overflows Adam Ward (2): regulator: da9121: Remove uninitialised string variable regulator: da9121: Fix index used for DT property drivers/regulator/da9121-regulator.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- 1.9.1 commit 474e3abb91189fcdc01f8ef82c7d075f2705a4f0 Merge: 95d3befbc5e1e 748e72e869718 Author: Mark Brown Date: Tue Dec 8 17:06:41 2020 +0000 Merge series "ASoC: Intel: cht_bsw_nau8824: 2 fixes for usage with sof-audio-acpi" from Hans de Goede : Hi All, Here are 2 simple fixes which are necessary to make the cht_bsw_nau8824 machine driver work together with the sof-audio-acpi driver. Note that atm the sof topology files are missing a .tplg file for this setup. Simply copying over the standard sof-byte-codec.tplg file does the trick, but then some mixer setting changes are necessary to fix the right speaker/headphones channel not working; and those mixer settings break the right channel when used with the sst-acpi driver. I've been trying to fix this at the tplg level so that we do not need to change the mixer settings, but no luck sofar. I'll post a RFC with the topology changes which I have and we can discuss this further there. These 2 simple fixes are necessary to make the sof-audio-acpi driver work regardless of the topology issue. Regards, Hans commit 95d3befbc5e1ee39fc8a78713924cf7ed2b3cabe Author: Chuhong Yuan Date: Fri Dec 4 14:36:10 2020 +0800 ASoC: amd: change clk_get() to devm_clk_get() and add missed checks cz_da7219_init() does not check the return values of clk_get(), while da7219_clk_enable() calls clk_set_rate() to dereference the pointers. Add checks to fix the problems. Also, change clk_get() to devm_clk_get() to avoid data leak after failures. Fixes: bb24a31ed584 ("ASoC: AMD: Configure wclk and bclk of master codec") Signed-off-by: Chuhong Yuan Link: https://lore.kernel.org/r/20201204063610.513556-1-hslester96@gmail.com Signed-off-by: Mark Brown commit f87905660ed01d85e45eac22d479f31f380b2f50 Author: tangzhenhao Date: Sun Nov 29 23:23:56 2020 -0800 drivers/lightnvm: fix a null-ptr-deref bug in pblk-core.c At line 294 in drivers/lightnvm/pblk-write.c, function pblk_gen_run_ws is called with actual param GFP_ATOMIC. pblk_gen_run_ws call mempool_alloc using "GFP_ATOMIC" flag, so mempool_alloc can return null. So we need to check the return-val of mempool_alloc to avoid null-ptr-deref bug. Signed-off-by: tangzhenhao Reviewed-by: Matias Bjørling Signed-off-by: Jens Axboe commit 717c4c8336486781630893508b3347ae18953fae Author: Andrey Zhizhikin Date: Tue Dec 1 22:29:19 2020 +0000 arm64: defconfig: drop unused BACKLIGHT_GENERIC option Commit 7ecdea4a0226 ("backlight: generic_bl: Remove this driver as it is unused") removed geenric_bl driver from the tree, together with corresponding config option. Remove BACKLIGHT_GENERIC config item from arm64 configuration. Fixes: 7ecdea4a0226 ("backlight: generic_bl: Remove this driver as it is unused") Signed-off-by: Andrey Zhizhikin Reviewed-by: Krzysztof Kozlowski Acked-by: Daniel Thompson Acked-by: Sam Ravnborg Cc: Sam Ravnborg Link: https://lore.kernel.org/r/20201201222922.3183-3-andrey.zhizhikin@leica-geosystems.com' Signed-off-by: Arnd Bergmann commit 0437141b4e2233ae0109a9584e7a003cd05b0a20 Author: Andrey Zhizhikin Date: Tue Dec 1 22:29:18 2020 +0000 ARM: configs: drop unused BACKLIGHT_GENERIC option Commit 7ecdea4a0226 ("backlight: generic_bl: Remove this driver as it is unused") removed geenric_bl driver from the tree, together with corresponding config option. Remove BACKLIGHT_GENERIC config item from all ARM configurations. Fixes: 7ecdea4a0226 ("backlight: generic_bl: Remove this driver as it is unused") Signed-off-by: Andrey Zhizhikin Reviewed-by: Krzysztof Kozlowski Acked-by: Alexandre Belloni Acked-by: Daniel Thompson Acked-by: Sam Ravnborg Cc: Sam Ravnborg Link: https://lore.kernel.org/r/20201201222922.3183-2-andrey.zhizhikin@leica-geosystems.com' Signed-off-by: Arnd Bergmann commit ba2f9a5fbc38fc7d82b523b3674324b8ad6d4be0 Merge: 249293397ec1c eeffc0fbd0224 Author: Arnd Bergmann Date: Tue Dec 8 17:25:29 2020 +0100 Merge tag 'v5.11-rockchip-defconfig64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/defconfig Some additional modules needed by Rockchip-based boards. * tag 'v5.11-rockchip-defconfig64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: defconfig: Enable RTC_DRV_HYM8563 arm64: defconfig: Enable USB_SERIAL_CP210X arm64: defconfig: Enable PHY_ROCKCHIP_INNO_DSIDPHY arm64: defconfig: Enable ROCKCHIP_LVDS Link: https://lore.kernel.org/r/2750818.e9J7NaK4W3@phil Signed-off-by: Arnd Bergmann commit 249293397ec1ca29ac845c2d5d4c0c04ecdd9e29 Merge: 1fe9c2531974c eecc662ff38b4 Author: Arnd Bergmann Date: Tue Dec 8 17:21:44 2020 +0100 Merge tag 'imx-defconfig-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/defconfig i.MX defconfig update for 5.11: - A couple of patches that enable various i.MX audio drivers for i.MX8M. - Enable more drivers that are useful on Librem 5 hardware. * tag 'imx-defconfig-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: arm64: defconfig: Enable more Librem 5 hardware arm64: defconfig: Enable ASRC and EASRC arm64: defconfig: Enable additional sound drivers on i.MX8M Mini Link: https://lore.kernel.org/r/20201202142717.9262-6-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit 1fe9c2531974cf7d5d8097773c53c4bd28703aed Merge: 786e484016e6f 225ef3a3e8f48 Author: Arnd Bergmann Date: Tue Dec 8 17:20:05 2020 +0100 Merge tag 'samsung-defconfig-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/defconfig Samsung defconfig changes for v5.11 1. Enable sound driver for Midas (Exynos4412 based) boards. 2. Enable ax88796c Ethernet driver for Artik5 (Exynos3250) board. 3. Enable Atmel touchscreen and STMPE ADC drivers for P4 Note board. 4. Build Samsung Exynos EHCI as module, to match the setting for the PHY driver. * tag 'samsung-defconfig-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: multi_v7_defconfig: make Samsung Exynos EHCI driver a module ARM: exynos_defconfig: compile Atmel MXT touchscreeen as module ARM: defconfig: add STMPE ADC driver for P4 Note ARM: defconfig: Enable ax88796c driver for Exynos boards ARM: multi_v7_defconfig: enable sound driver for Midas platform ARM: exynos_defconfig: enable sound driver for Midas platform Link: https://lore.kernel.org/r/20201201204404.22675-1-krzk@kernel.org Signed-off-by: Arnd Bergmann commit 786e484016e6f317da6e5e6db6422594fbc09c44 Merge: 2ede693874c90 cc563f8f769b9 Author: Arnd Bergmann Date: Tue Dec 8 17:19:19 2020 +0100 Merge tag 'qcom-arm64-defconfig-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/defconfig Qualcomm defconfig updates for 5.11 This enables the Qualcomm PON and OSM L3 drivers. It then ensures that the QCOM_SCM and Command DB drivers are built-in, now that they have been made user selectable and tristate. * tag 'qcom-arm64-defconfig-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: arm64: defconfig: Enable Qualcomm PON driver arm64: defconfig: Enable QCOM_SCM as builtin arm64: defconfig: Enable Qualcomm OSM L3 driver arm64: defconfig: Enable Qualcomm Command DB driver Link: https://lore.kernel.org/r/20201130190124.345127-1-bjorn.andersson@linaro.org Signed-off-by: Arnd Bergmann commit 2ede693874c90e41a63195d06408ff3a73fcca7a Merge: 0f4b0b479b356 6b133f475a97a Author: Arnd Bergmann Date: Tue Dec 8 17:18:26 2020 +0100 Merge tag 'ti-k3-config-for-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/nmenon/linux into arm/defconfig ARM64 defconfig changes for TI K3 platforms for v5.11 merge window: - GPIO and I2C for J721E SD card support to be functional * tag 'ti-k3-config-for-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/nmenon/linux: arm64: defconfig: Enable GPIO and I2C configs for TI's J721e platform Link: https://lore.kernel.org/r/20201130174850.ni4sdyz3qp67j3sz@upstart Signed-off-by: Arnd Bergmann commit 0f4b0b479b3566a2d61ede6e02c01a81454a0ddf Merge: 6f7cdd2fbfffb 6a7dc2b3639ad Author: Arnd Bergmann Date: Tue Dec 8 17:16:46 2020 +0100 Merge tag 'arm-soc/for-5.11/defconfig-arm64' of https://github.com/Broadcom/stblinux into arm/defconfig This pull request contains ARM64 defconfig changes for 5.11, please pull the following: - Florian enables the ARM SCMI protocol, and the common clock, HWMON and CPU frequency scaling drivers since those are used by ARCH_BRCMSTB platforms * tag 'arm-soc/for-5.11/defconfig-arm64' of https://github.com/Broadcom/stblinux: arm64: defconfig: Enable ARM SCMI protocol and drivers Link: https://lore.kernel.org/r/20201128163410.1691529-2-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann commit 6f7cdd2fbfffbeb9de3d2bd1855c2ef72f0e7ef0 Merge: 69f7aeee06674 950be99fccffa Author: Arnd Bergmann Date: Tue Dec 8 17:15:50 2020 +0100 Merge tag 'arm-soc/for-5.11/defconfig' of https://github.com/Broadcom/stblinux into arm/defconfig This pull request contains ARM multi_v7_defconfig changes for 5.11, please pull the following: - Florian enables the ARM SCMI protocol, and the common clock, HWMON and CPU frequency scaling drivers since those are used by ARCH_BRCMSTB platforms * tag 'arm-soc/for-5.11/defconfig' of https://github.com/Broadcom/stblinux: ARM: multi_v7_defconfig: Enable ARM SCMI protocol and drivers Link: https://lore.kernel.org/r/20201128163410.1691529-1-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann commit 69f7aeee06674daa1950e04dc61de0c6e70586fc Merge: 11de454b4cac7 0536f70989601 Author: Arnd Bergmann Date: Tue Dec 8 17:14:57 2020 +0100 Merge tag 'sunxi-config64-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/defconfig One patch to enable the Allwinner I2S controller on arm64's defconfig * tag 'sunxi-config64-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: arm64: defconfig: Enable Allwinner i2s driver Link: https://lore.kernel.org/r/5ddf5486-a20c-467a-bc67-d5e8fbc38856.lettre@localhost Signed-off-by: Arnd Bergmann commit 8bdd8e275ede9786d845b3ec952836e61fd824e9 Author: Andrii Nakryiko Date: Mon Dec 7 22:43:26 2020 -0800 bpf: Return -ENOTSUPP when attaching to non-kernel BTF Return -ENOTSUPP if tracing BPF program is attempted to be attached with specified attach_btf_obj_fd pointing to non-kernel (neither vmlinux nor module) BTF object. This scenario might be supported in the future and isn't outright invalid, so -EINVAL isn't the most appropriate error code. Suggested-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20201208064326.667389-1-andrii@kernel.org commit 11de454b4cac7ac92e93d3e3853c7ab8ad00a2c9 Merge: d4ff08d6e2227 38c212c90bf17 Author: Arnd Bergmann Date: Tue Dec 8 17:14:15 2020 +0100 Merge tag 'sunxi-config-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/defconfig One patch to add the Realtek PHY driver to sunxi_defconfig * tag 'sunxi-config-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: ARM: configs: sunxi: enable Realtek PHY Link: https://lore.kernel.org/r/dffb8a7e-27ea-4025-868a-caa5868eb1ef.lettre@localhost Signed-off-by: Arnd Bergmann commit 3546b9b8eced9799b35ef953f766a0973b17fda2 Author: Björn Töpel Date: Mon Dec 7 09:20:08 2020 +0100 xsk: Validate socket state in xsk_recvmsg, prior touching socket members In AF_XDP the socket state needs to be checked, prior touching the members of the socket. This was not the case for the recvmsg implementation. Fix that by moving the xsk_is_bound() call. Fixes: 45a86681844e ("xsk: Add support for recvmsg()") Reported-by: kernel test robot Signed-off-by: Björn Töpel Signed-off-by: Daniel Borkmann Acked-by: Magnus Karlsson Link: https://lore.kernel.org/bpf/20201207082008.132263-1-bjorn.topel@gmail.com commit d4ff08d6e2227086a4946c3f557aa06ce3b67208 Merge: aa26d828df8fd 036f224ef8f44 Author: Arnd Bergmann Date: Tue Dec 8 17:03:20 2020 +0100 Merge tag 'at91-defconfig-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/defconfig AT91 defconfig for 5.11: - filter compiled media drivers * tag 'at91-defconfig-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: configs: at91_dt: resync with media changes ARM: configs: at91: sama5: resync with media changes Link: https://lore.kernel.org/r/20201127215517.GA1733715@piout.net Signed-off-by: Arnd Bergmann commit 8d143c610b62f2820fbc97dc441d54ac326abe1a Author: Lukas Bulwahn Date: Mon Nov 30 13:49:15 2020 +0100 printk: remove obsolete dead assignment Commit 849f3127bb46 ("switch /dev/kmsg to ->write_iter()") refactored devkmsg_write() and left over a dead assignment on the variable 'len'. Hence, make clang-analyzer warns: kernel/printk/printk.c:744:4: warning: Value stored to 'len' is never read [clang-analyzer-deadcode.DeadStores] len -= endp - line; ^ Simply remove this obsolete dead assignment here. Link: https://lore.kernel.org/r/20201130124915.7573-1-lukas.bulwahn@gmail.com Signed-off-by: Lukas Bulwahn Reviewed-by: Sergey Senozhatsky Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek commit 0cd3f561efa9adce840140720e0581355db3e554 Author: Zou Wei Date: Tue Dec 8 20:28:09 2020 +0800 platform/x86: ISST: Mark mmio_range_devid_0 and mmio_range_devid_1 with static keyword Fix the following sparse warnings: drivers/platform/x86/intel_speed_select_if/isst_if_mmio.c:23:24: warning: symbol 'mmio_range_devid_0' was not declared. Should it be static? drivers/platform/x86/intel_speed_select_if/isst_if_mmio.c:28:24: warning: symbol 'mmio_range_devid_1' was not declared. Should it be static? Signed-off-by: Zou Wei Link: https://lore.kernel.org/r/1607430489-116200-1-git-send-email-zou_wei@huawei.com Signed-off-by: Hans de Goede commit fefe8527a1e0e0014946c6b5b3b2e40cb32bb5d3 Author: Robin Murphy Date: Wed Nov 25 17:29:39 2020 +0000 iommu/io-pgtable: Remove tlb_flush_leaf The only user of tlb_flush_leaf is a particularly hairy corner of the Arm short-descriptor code, which wants a synchronous invalidation to minimise the races inherent in trying to split a large page mapping. This is already far enough into "here be dragons" territory that no sensible caller should ever hit it, and thus it really doesn't need optimising. Although using tlb_flush_walk there may technically be more heavyweight than needed, it does the job and saves everyone else having to carry around useless baggage. Signed-off-by: Robin Murphy Reviewed-by: Steven Price Link: https://lore.kernel.org/r/9844ab0c5cb3da8b2f89c6c2da16941910702b41.1606324115.git.robin.murphy@arm.com Signed-off-by: Will Deacon commit c74009f5290d6679ecb865b5d795508df7ad599f Merge: 113eb4ce4fc33 4165bf015ba94 Author: Will Deacon Date: Tue Dec 8 15:21:49 2020 +0000 Merge branch 'for-next/iommu/fixes' into for-next/iommu/core Merge in IOMMU fixes for 5.10 in order to resolve conflicts against the queue for 5.11. * for-next/iommu/fixes: iommu/amd: Set DTE[IntTabLen] to represent 512 IRTEs iommu/vt-d: Don't read VCCAP register unless it exists x86/tboot: Don't disable swiotlb when iommu is forced on iommu: Check return of __iommu_attach_device() arm-smmu-qcom: Ensure the qcom_scm driver has finished probing iommu/amd: Enforce 4k mapping for certain IOMMU data structures MAINTAINERS: Temporarily add myself to the IOMMU entry iommu/vt-d: Fix compile error with CONFIG_PCI_ATS not set iommu/vt-d: Avoid panic if iommu init fails in tboot system iommu/vt-d: Cure VF irqdomain hickup x86/platform/uv: Fix copied UV5 output archtype x86/platform/uv: Drop last traces of uv_flush_tlb_others commit 113eb4ce4fc33ef3deda1431497811d43342c0cc Merge: c5257e39a4eca 33e07157105e4 Author: Will Deacon Date: Tue Dec 8 15:11:58 2020 +0000 Merge branch 'for-next/iommu/vt-d' into for-next/iommu/core Intel VT-D updates for 5.11. The main thing here is converting the code over to the iommu-dma API, which required some improvements to the core code to preserve existing functionality. * for-next/iommu/vt-d: iommu/vt-d: Avoid GFP_ATOMIC where it is not needed iommu/vt-d: Remove set but not used variable iommu/vt-d: Cleanup after converting to dma-iommu ops iommu/vt-d: Convert intel iommu driver to the iommu ops iommu/vt-d: Update domain geometry in iommu_ops.at(de)tach_dev iommu: Add quirk for Intel graphic devices in map_sg iommu: Allow the dma-iommu api to use bounce buffers iommu: Add iommu_dma_free_cpu_cached_iovas() iommu: Handle freelists when using deferred flushing in iommu drivers iommu/vt-d: include conditionally on CONFIG_INTEL_IOMMU_SVM commit c5257e39a4eca34ce067e084657926411eb5270b Merge: a5f12de3ece88 541f29bb06434 Author: Will Deacon Date: Tue Dec 8 15:10:09 2020 +0000 Merge branch 'for-next/iommu/tegra-smmu' into for-next/iommu/core Tegra SMMU updates for 5.11: a complete redesign of the probing logic, support for PCI devices and cleanup work. * for-next/iommu/tegra-smmu: iommu/tegra-smmu: Add PCI support iommu/tegra-smmu: Rework tegra_smmu_probe_device() iommu/tegra-smmu: Use fwspec in tegra_smmu_(de)attach_dev iommu/tegra-smmu: Expand mutex protection range iommu/tegra-smmu: Unwrap tegra_smmu_group_get commit a5f12de3ece88cddac27edf6618450f6c22906f1 Merge: 854623fdea9dc 2f7e8c553e98d Author: Will Deacon Date: Tue Dec 8 15:07:49 2020 +0000 Merge branch 'for-next/iommu/svm' into for-next/iommu/core More steps along the way to Shared Virtual {Addressing, Memory} support for Arm's SMMUv3, including the addition of a helper library that can be shared amongst other IOMMU implementations wishing to support this feature. * for-next/iommu/svm: iommu/arm-smmu-v3: Hook up ATC invalidation to mm ops iommu/arm-smmu-v3: Implement iommu_sva_bind/unbind() iommu/sva: Add PASID helpers iommu/ioasid: Add ioasid references commit 854623fdea9dc3ae8543a4d5d8448ebbaee61acc Merge: 1ab2bf5831586 f37eb48466d2e Author: Will Deacon Date: Tue Dec 8 15:04:49 2020 +0000 Merge branch 'for-next/iommu/misc' into for-next/iommu/core Miscellaneous IOMMU changes for 5.11. Largely cosmetic, apart from a change to the way in which identity-mapped domains are configured so that the requests are now batched and can potentially use larger pages for the mapping. * for-next/iommu/misc: iommu/io-pgtable-arm: Remove unused 'level' parameter from iopte_type() macro iommu: Defer the early return in arm_(v7s/lpae)_map iommu: Improve the performance for direct_mapping iommu: return error code when it can't get group iommu: Modify the description of iommu_sva_unbind_device commit 1ab2bf5831586820a1dbe4425daf1c86a482129d Merge: 33f974dbaabf1 176cfc187c242 Author: Will Deacon Date: Tue Dec 8 15:01:27 2020 +0000 Merge branch 'for-next/iommu/iova' into for-next/iommu/core IOVA allocator updates for 5.11, including removal of unused symbols and functions as well as some optimisations to improve allocation behaviour in the face of fragmentation. * for-next/iommu/iova: iommu: Stop exporting free_iova_mem() iommu: Stop exporting alloc_iova_mem() iommu: Delete split_and_remove_iova() iommu: avoid taking iova_rbtree_lock twice iommu/iova: Free global iova rcache on iova alloc failure iommu/iova: Retry from last rb tree node if iova search fails commit 33f974dbaabf1cbe5cb6996bf3f6e395519c15fe Merge: 75c75adce44f5 62c9917d9c104 Author: Will Deacon Date: Tue Dec 8 14:56:53 2020 +0000 Merge branch 'for-next/iommu/default-domains' into for-next/iommu/core Support for changing the default domain type for singleton IOMMU groups via sysfs when the constituent device is not already bound to a device driver. * for-next/iommu/default-domains: iommu: Fix htmldocs warnings in sysfs-kernel-iommu_groups iommu: Document usage of "/sys/kernel/iommu_groups//type" file iommu: Take lock before reading iommu group default domain type iommu: Add support to change default domain of an iommu group iommu: Move def_domain type check for untrusted device into core commit 7b3d5a90cbb9bc6a48c82fd7c146d24d6fceb0fa Author: Naohiro Aota Date: Tue Nov 10 20:26:06 2020 +0900 btrfs: introduce ZONED feature flag This patch introduces the ZONED incompat flag. The flag indicates that the volume management will satisfy the constraints imposed by host-managed zoned block devices (aligned chunk allocation, append-only updates, reset zone after filled). As the zoned support will happen incrementally due to enhancing some core infrastructure like super block writes, tree-log, raid support, the feature will appear in sysfs only on debug builds. It will be enabled once the support is feature complete and applications can reliably check whether zoned support is present or not. Reviewed-by: Anand Jain Reviewed-by: Johannes Thumshirn Signed-off-by: Damien Le Moal Signed-off-by: Naohiro Aota Reviewed-by: David Sterba Signed-off-by: David Sterba commit a2633b6a29e9c916ef1a0389826a2e4ebbe6b259 Author: Nikolay Borisov Date: Tue Nov 24 16:49:25 2020 +0200 btrfs: return bool from btrfs_should_end_transaction Results in slightly smaller code. add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-11 (-11) Function old new delta btrfs_should_end_transaction 96 85 -11 Total: Before=20070, After=20059, chg -0.05% Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 8a8f4deaba79ca4cc0ae01f9a3b8f5594810de5e Author: Nikolay Borisov Date: Tue Nov 24 16:49:08 2020 +0200 btrfs: return bool from should_end_transaction Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 8df01fddb77998a46b1b59563e1c5d094dc2586a Author: Nikolay Borisov Date: Tue Nov 24 17:49:32 2020 +0200 btrfs: remove err variable from do_relocation It simply gets assigned to 'ret' in case of errors. The flow of the while loop is not changed by this commit since the few call sites that 'goto next' will simply break from the loop. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit c6a592f2e2093e6a90d651b073746c7950d6420d Author: Nikolay Borisov Date: Tue Nov 24 17:49:31 2020 +0200 btrfs: eliminate err variable from merge_reloc_root In most cases when an error is returned from a function 'ret' is simply assigned to 'err'. There is only one case where walk_up_reloc_tree can return a positive value - in this case the code breaks from the loop and ret is going to get its return value from btrfs_cow_block - either 0 or negative. This retains the old logic of how 'err' used to be set at this call site. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit ee0d904fd9c5662c58a737c77384f8959fdc8d12 Author: Nikolay Borisov Date: Tue Nov 24 17:49:30 2020 +0200 btrfs: remove err variable from btrfs_delete_subvolume Use only a single 'ret' to control whether we should abort the transaction or not. That's fine, because if we abort a transaction then btrfs_end_transaction will return the same value as passed to btrfs_abort_transaction. No semantic changes. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit c65ca98f9e687196a840bd8b71d28d32ffe91170 Author: Filipe Manana Date: Wed Nov 18 11:00:17 2020 +0000 btrfs: unlock path before checking if extent is shared during nocow writeback When we are attempting to start writeback for an existing extent in NOCOW mode, at run_delalloc_nocow(), we must check if the extent is shared, and if it is, fallback to a COW write. However we do such check while still holding a read lock on the leaf that contains the file extent item, and that check, the call to btrfs_cross_ref_exist(), can take some time because: 1) It needs to do a search on the extent tree, which obviously takes some time, specially if delayed references are being run at the moment, as we can block when trying to lock currently write locked btree nodes; 2) It needs to check the delayed references for any existing reference for our data extent, this requires acquiring the delayed references' spinlock and maybe block on the mutex of a delayed reference head in the case where there is a delayed reference for our data extent, in the worst case it makes us release the path on the extent tree and retry the whole process again (going back to step 1). There are other operations we do while holding the leaf locked that can take some significant time as well (specially all together): * btrfs_extent_readonly() - to check if the block group containing the extent is currently in RO mode. This requires taking a spinlock and searching for the block group in a rbtree that can be big on large filesystems; * csum_exist_in_range() - to search if there are any checksums in the csum tree for the extent. Like before, this can take some time if we are in a filesystem that has both COW and NOCOW files, in which case the csum tree is not empty; * btrfs_inc_nocow_writers() - increment the number of nocow writers in the block group that contains the data extent. Needs to acquire a spinlock and search for the block group in a rbtree that can be big on large filesystems. So just unlock the leaf (release the path) before doing all those checks, since we do not need it anymore. In case we can not do a NOCOW write for the extent, due to any of those checks failing, and the writeback range goes beyond that extents' length, we will do another btree search for the next file extent item. The following script that calls dbench was used to measure the impact of this change on a VM with 8 CPUs, 16Gb of ram, using a raw NVMe device directly (no intermediary filesystem on the host) and using a non-debug kernel (default configuration on Debian): $ cat test-dbench.sh #!/bin/bash DEV=/dev/sdk MNT=/mnt/sdk MOUNT_OPTIONS="-o ssd -o nodatacow" MKFS_OPTIONS="-m single -d single" mkfs.btrfs -f $MKFS_OPTIONS $DEV mount $MOUNT_OPTIONS $DEV $MNT dbench -D $MNT -t 300 64 umount $MNT Before this change: Operation Count AvgLat MaxLat ---------------------------------------- NTCreateX 9326331 0.317 399.957 Close 6851198 0.002 6.402 Rename 394894 2.621 402.819 Unlink 1883131 0.931 398.082 Deltree 256 19.160 303.580 Mkdir 128 0.003 0.016 Qpathinfo 8452314 0.068 116.133 Qfileinfo 1481921 0.001 5.081 Qfsinfo 1549963 0.002 4.444 Sfileinfo 759679 0.084 17.079 Find 3268168 0.396 118.196 WriteX 4653310 0.056 110.993 ReadX 14618818 0.005 23.314 LockX 30364 0.003 0.497 UnlockX 30364 0.002 1.720 Flush 653619 16.954 569.299 Throughput 966.651 MB/sec 64 clients 64 procs max_latency=569.377 ms After this change: Operation Count AvgLat MaxLat ---------------------------------------- NTCreateX 9710433 0.302 232.449 Close 7132948 0.002 11.496 Rename 411144 2.452 131.805 Unlink 1960961 0.893 230.383 Deltree 256 14.858 198.646 Mkdir 128 0.002 0.005 Qpathinfo 8800890 0.066 111.588 Qfileinfo 1542556 0.001 3.852 Qfsinfo 1613835 0.002 5.483 Sfileinfo 790871 0.081 19.492 Find 3402743 0.386 120.185 WriteX 4842918 0.054 179.312 ReadX 15220407 0.005 32.435 LockX 31612 0.003 1.533 UnlockX 31612 0.002 1.047 Flush 680567 16.320 463.323 Throughput 1016.59 MB/sec 64 clients 64 procs max_latency=463.327 ms +5.0% throughput, -20.5% max latency Also, the following test using fio was run: $ cat test-fio.sh #!/bin/bash DEV=/dev/sdk MNT=/mnt/sdk MOUNT_OPTIONS="-o ssd -o nodatacow" MKFS_OPTIONS="-d single -m single" if [ $# -ne 4 ]; then echo "Use $0 NUM_JOBS FILE_SIZE FSYNC_FREQ BLOCK_SIZE" exit 1 fi NUM_JOBS=$1 FILE_SIZE=$2 FSYNC_FREQ=$3 BLOCK_SIZE=$4 cat < /tmp/fio-job.ini [writers] rw=randwrite fsync=$FSYNC_FREQ fallocate=none group_reporting=1 direct=0 bs=$BLOCK_SIZE ioengine=sync size=$FILE_SIZE directory=$MNT numjobs=$NUM_JOBS EOF echo echo "Using fio config:" echo cat /tmp/fio-job.ini echo echo "mount options: $MOUNT_OPTIONS" echo mkfs.btrfs -f $MKFS_OPTIONS $DEV > /dev/null mount $MOUNT_OPTIONS $DEV $MNT echo "Creating nodatacow files before fio runs..." for ((i = 0; i < $NUM_JOBS; i++)); do xfs_io -f -c "pwrite -b 128M 0 $FILE_SIZE" "$MNT/writers.$i.0" done sync fio /tmp/fio-job.ini umount $MNT Before this change: $ ./test-fio.sh 16 512M 2 4K (...) WRITE: bw=28.3MiB/s (29.6MB/s), 28.3MiB/s-28.3MiB/s (29.6MB/s-29.6MB/s), io=8192MiB (8590MB), run=289800-289800msec After this change: $ ./test-fio.sh 16 512M 2 4K (...) WRITE: bw=31.2MiB/s (32.7MB/s), 31.2MiB/s-31.2MiB/s (32.7MB/s-32.7MB/s), io=8192MiB (8590MB), run=262845-262845msec +9.7% throughput, -9.8% runtime Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit c7c01a4a2524b3f130c1821fbaf1677fe8394165 Author: David Sterba Date: Wed Nov 4 16:12:45 2020 +0100 btrfs: tree-checker: annotate all error branches as unlikely The tree checker is called many times as it verifies metadata at read/write time. The checks follow a simple pattern: if (error_condition) { report_error(); return -EUCLEAN; } All the error reporting functions are annotated as __cold that is supposed to hint the compiler to move the statement block out of the hot path. This does not seem to happen that often. As the error condition is expected to be false almost always, we can annotate it with 'unlikely' as this satisfies one of the few use cases for the annotation. The expected outcome is a stronger hint to compiler to reorder the checks test jump to exit test jump to exit ... which can be observed in asm of eg. check_dir_item, btrfs_check_chunk_valid, check_root_item or check_leaf. There's a measurable run time improvement reported by Josef, the testing workload went from 655 MiB/s to 677 MiB/s, which is about +3%. There should be no functional changes but some of the conditions have been rewritten to produce more readable result, some lines are longer than 80, for the sake of readability. Signed-off-by: David Sterba commit a0f6d924cada10eefa526ccfa1be7888f559d9d7 Author: David Sterba Date: Fri Nov 13 17:58:03 2020 +0100 btrfs: remove stub device info from messages when we have no fs_info Without a NULL fs_info the helpers will print something like BTRFS error (device ): ... This can happen in contexts where fs_info is not available at all or it's potentially unsafe due to object lifetime. The stub does not bring much information and with the prefix makes the message unnecessarily longer. Remove it for the NULL fs_info case. BTRFS error: ... Callers can add the device information to the message itself if needed. Reviewed-by: Anand Jain Signed-off-by: David Sterba commit fb22e9c4cd57e67aa9d62c8bbde5192349dc584a Author: Qu Wenruo Date: Fri Nov 13 20:51:49 2020 +0800 btrfs: use detach_page_private() in alloc_extent_buffer() In alloc_extent_buffer(), after we got a page from btree inode, we check if that page has private pointer attached. If attached, we check if the existing extent buffer has proper refs. If not (the eb is being freed), we will detach that private eb pointer. The point here is, we are detaching that eb pointer by calling: - ClearPagePrivate() - put_page() The put_page() here is especially confusing, as it's decreasing the ref from attach_page_private(). Without knowing that, it looks like the put_page() is for the find_or_create_page() call, confusing the reader. Since we're always modifying page private with attach_page_private() and detach_page_private(), the only open-coded detach_page_private() here is really confusing. Fix it by calling detach_page_private(). Reviewed-by: Johannes Thumshirn Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 35478d053ade437cc51c7e576108bef2fec32c1e Author: Qu Wenruo Date: Fri Nov 13 20:51:41 2020 +0800 btrfs: use nodesize to determine if we need readahead in btrfs_lookup_bio_sums In btrfs_lookup_bio_sums() if the bio is pretty large, we want to start readahead in the csum tree. However the threshold is an immediate number, (PAGE_SIZE * 8), from the initial btrfs merge. The meaning of the value is pretty hard to guess, especially when the immediate number is from the times when 4K sectorsize was the default and only CRC32C was supported. For the most common btrfs setup, CRC32 csum and 4K sectorsize, it means just 32K read would kick readahead, while the csum itself is only 32 bytes in size. Now let's be more reasonable by taking both csum size and node size into consideration. If the csum size for the bio is larger than one leaf, then we kick the readahead. This means for current default btrfs, the threshold will be 16M. This change should not change performance observably, thus this is mostly a readability enhancement. Reviewed-by: Nikolay Borisov Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 829ddec922e51ad2740f16646ce701314d9aa509 Author: Qu Wenruo Date: Fri Nov 13 20:51:39 2020 +0800 btrfs: only clear EXTENT_LOCK bit in extent_invalidatepage extent_invalidatepage() will try to clear all possible bits since it's calling clear_extent_bit() with delete == 1. This is currently fine, since for btree io tree, it only utilizes EXTENT_LOCK bit. But this could be a problem for later subpage support, which will utilize extra io tree bit to represent additional info. This patch will just convert that clear_extent_bit() to unlock_extent_cached(). For current code since only EXTENT_LOCKED bit is utilized, this doesn't change the behavior, but provides a much cleaner basis for incoming subpage support. Reviewed-by: Nikolay Borisov Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 8e1dc982ed5fa52596504054a0713bf5acbe19f0 Author: Qu Wenruo Date: Thu Nov 12 16:47:57 2020 +0800 btrfs: remove unused parameter phy_offset from btrfs_validate_metadata_buffer Parameter @phy_offset is the offset against the bio->bi_iter.bi_sector. @phy_offset is mostly for data io to lookup the csum in btrfs_io_bio. But for metadata, it's completely useless as metadata stores their own csum in its header, so we can remove it. Note: parameters @start and @end, they are not utilized at all for current sectorsize == PAGE_SIZE case, as we can grab eb directly from page. But those two parameters are very important for later subpage support, thus @start/@len are not touched here. Reviewed-by: Johannes Thumshirn Reviewed-by: Josef Bacik Reviewed-by: Nikolay Borisov Signed-off-by: Qu Wenruo Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba commit 2c36395430b0443751cf78903e3c3a37cae0f8d1 Author: Qu Wenruo Date: Fri Nov 13 20:51:44 2020 +0800 btrfs: scrub: remove the anonymous structure from scrub_page That anonymous structure serve no special purpose, just replace it with regular members. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit f97e27e91d90243e1144030ea1dcbf4154872944 Author: Qu Wenruo Date: Fri Nov 13 20:51:40 2020 +0800 btrfs: use fixed width int type for extent_state::state Currently the type is unsigned int which could change its width depending on the architecture. We need up to 32 bits so make it explicit. Reviewed-by: Nikolay Borisov Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit e09caaf913a9d3d7fc892c0b5a85e6b2ec3728dc Author: Qu Wenruo Date: Fri Nov 13 20:51:29 2020 +0800 btrfs: introduce helper to handle page status update in end_bio_extent_readpage() Introduce a new helper to handle update page status in end_bio_extent_readpage(). This will be later used for subpage support where the page status update can be more complex than now. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 94e8c95ccba8bc25b6385b8c2ba1b9cd90e86de6 Author: Qu Wenruo Date: Fri Nov 13 20:51:28 2020 +0800 btrfs: add structure to keep track of extent range in end_bio_extent_readpage In end_bio_extent_readpage() we had a strange dance around extent_start/extent_len. Hidden behind the strange dance is, it's just calling endio_readpage_release_extent() on each bvec range. Here is an example to explain the original work flow: Bio is for inode 257, containing 2 pages, for range [1M, 1M+8K) end_bio_extent_extent_readpage() entered |- extent_start = 0; |- extent_end = 0; |- bio_for_each_segment_all() { | |- /* Got the 1st bvec */ | |- start = SZ_1M; | |- end = SZ_1M + SZ_4K - 1; | |- update = 1; | |- if (extent_len == 0) { | | |- extent_start = start; /* SZ_1M */ | | |- extent_len = end + 1 - start; /* SZ_1M */ | | } | | | |- /* Got the 2nd bvec */ | |- start = SZ_1M + 4K; | |- end = SZ_1M + 4K - 1; | |- update = 1; | |- if (extent_start + extent_len == start) { | | |- extent_len += end + 1 - start; /* SZ_8K */ | | } | } /* All bio vec iterated */ | |- if (extent_len) { |- endio_readpage_release_extent(tree, extent_start, extent_len, update); /* extent_start == SZ_1M, extent_len == SZ_8K, uptodate = 1 */ As the above flow shows, the existing code in end_bio_extent_readpage() is accumulates extent_start/extent_len, and when the contiguous range stops, calls endio_readpage_release_extent() for the range. However current behavior has something not really considered: - The inode can change For bio, its pages don't need to have contiguous page_offset. This means, even pages from different inodes can be packed into one bio. - bvec cross page boundary There is a feature called multi-page bvec, where bvec->bv_len can go beyond bvec->bv_page boundary. - Poor readability This patch will address the problem: - Introduce a proper structure, processed_extent, to record processed extent range - Integrate inode/start/end/uptodate check into endio_readpage_release_extent() - Add more comment on each step. This should greatly improve the readability, now in end_bio_extent_readpage() there are only two endio_readpage_release_extent() calls. - Add inode check for contiguity Now we also ensure the inode is the same one before checking if the range is contiguous. Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit b1d51f67c942a9254d7b69ebf5ab8329cb5c2b8c Author: Qu Wenruo Date: Fri Nov 13 20:51:27 2020 +0800 btrfs: tests: remove invalid extent-io test In extent-io-test, there are two invalid tests: - Invalid nodesize for test_eb_bitmaps() Instead of the sectorsize and nodesize combination passed in, we're always using hand-crafted nodesize, e.g: len = (sectorsize < BTRFS_MAX_METADATA_BLOCKSIZE) ? sectorsize * 4 : sectorsize; In above case, if we have 32K page size, then we will get a length of 128K, which is beyond max node size, and obviously invalid. The common page size goes up to 64K so we haven't hit that - Invalid extent buffer bytenr For 64K page size, the only combination we're going to test is sectorsize = nodesize = 64K. However, in that case we will try to test an eb which bytenr is not sectorsize aligned: /* Do it over again with an extent buffer which isn't page-aligned. */ eb = __alloc_dummy_extent_buffer(fs_info, nodesize / 2, len); Sector alignment is a hard requirement for any sector size. The only exception is superblock. But anything else should follow sector size alignment. This is definitely an invalid test case. This patch will fix both problems by: - Honor the sectorsize/nodesize combination Now we won't bother to hand-craft the length and use it as nodesize. - Use sectorsize as the 2nd run extent buffer start This would test the case where extent buffer is aligned to sectorsize but not always aligned to nodesize. Please note that, later subpage related cleanup will reduce extent_buffer::pages[] to exactly what we need, making the sector unaligned extent buffer operations cause problems. Since only extent_io self tests utilize this, this patch is required for all later cleanup/refactoring. Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 445d8ab53f69f4c4062b668c6a25b88a79753136 Author: Tom Rix Date: Sun Nov 1 07:30:08 2020 -0800 btrfs: sysfs: remove unneeded semicolon A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix Reviewed-by: David Sterba Signed-off-by: David Sterba commit 95b982de37473a99add60c9e68b12d54354f1da7 Author: Nikolay Borisov Date: Fri Nov 13 09:29:40 2020 +0200 btrfs: simplify return values in setup_nodes_for_search The function is needlessly convoluted. Fix that by: * removing redundant sret variable definition in both if arms * replace the again/done labels with direct return statements, the function is short enough and doesn't do anything special upon exit * remove BUG_ON on split_node returning a positive number - it can't happen as split_node returns either 0 or a negative error code. Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit d5286a92ea76a124d6cfa1e261394da858125d99 Author: Nikolay Borisov Date: Thu Nov 12 13:24:02 2020 +0200 btrfs: remove useless return value statement in split_node At the point when we set 'ret = 0' it's guaranteed that the function is going to return 0 so directly return 0. No functional changes. Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit f30bed83426c5cb9fce6cabb3f7cc5a9d5428fcc Author: Filipe Manana Date: Fri Nov 13 11:24:17 2020 +0000 btrfs: remove unnecessary attempt to drop extent maps after adding inline extent At inode.c:cow_file_range_inline(), after we insert the inline extent in the fs/subvolume btree, we call btrfs_drop_extent_cache() to drop all extent maps in the file range, however that is not necessary because we have already done it in the call to btrfs_drop_extents(), which calls btrfs_drop_extent_cache() for us, and since at this point we have the file range locked in the inode's iotree (we are in the writeback path), we know no other task can come in and read stale file extent items or find none and therefore create either stale extent maps or an extent map that represents a hole. So just remove that unnecessary call to btrfs_drop_extent_cache(), as it's doing nothing and only wasting time. This call has been around since 2008, introduced in commit c8b978188c9a ("Btrfs: Add zlib compression support"), but even back then it seems it was not necessary, since we had the range locked in the inode's iotree and the call to btrfs_drop_extents() already used to always call btrfs_drop_extent_cache(). Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit bc5b5b1e5111005363094da1d5f5ffb0e83165f1 Author: Filipe Manana Date: Fri Nov 13 11:23:30 2020 +0000 btrfs: stop incrementing log batch when joining log transaction When joining a log transaction we acquire the root's log mutex, then increment the root's log batch and log writers counters while holding the mutex. However we don't need to increment the log batch there, because we are holding the mutex and incremented the log writers counter as well, so any other task trying to sync log will wait for the current task to finish its logging and still achieve the desired log batching. Since the log batch counter is an atomic counter and is incremented twice at the very beginning of the fsync callback (btrfs_sync_file()), once before flushing delalloc and once again after waiting for writeback to complete, eliminating its increment when joining the log transaction may provide some performance gains in case we have multiple concurrent tasks doing fsyncs against different files in the same subvolume, as it reduces contention on the atomic (locking the cacheline and bouncing it). When testing fio with 32 jobs, on a 8 cores VM, doing fsyncs against different files of the same subvolume, on top of a zram device, I could consistently see gains (higher throughput) between 1% to 2%, which is a very low value and possibly hard to be observed with a real device (I couldn't observe consistent gains with my low/mid end NVMe device). So this change is mostly motivated to just simplify the logic, as updating the log batch counter is only relevant when an fsync starts and while not holding the root's log mutex. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit f2f121ab500d0457cc9c6f54269d21ffdf5bd304 Author: Filipe Manana Date: Fri Nov 13 11:21:49 2020 +0000 btrfs: skip unnecessary searches for xattrs when logging an inode Every time we log an inode we lookup in the fs/subvol tree for xattrs and if we have any, log them into the log tree. However it is very common to have inodes without any xattrs, so doing the search wastes times, but more importantly it adds contention on the fs/subvol tree locks, either making the logging code block and wait for tree locks or making the logging code making other concurrent operations block and wait. The most typical use cases where xattrs are used are when capabilities or ACLs are defined for an inode, or when SELinux is enabled. This change makes the logging code detect when an inode does not have xattrs and skip the xattrs search the next time the inode is logged, unless the inode is evicted and loaded again or a xattr is added to the inode. Therefore skipping the search for xattrs on inodes that don't ever have xattrs and are fsynced with some frequency. The following script that calls dbench was used to measure the impact of this change on a VM with 8 CPUs, 16Gb of ram, using a raw NVMe device directly (no intermediary filesystem on the host) and using a non-debug kernel (default configuration on Debian distributions): $ cat test.sh #!/bin/bash DEV=/dev/sdk MNT=/mnt/sdk MOUNT_OPTIONS="-o ssd" mkfs.btrfs -f -m single -d single $DEV mount $MOUNT_OPTIONS $DEV $MNT dbench -D $MNT -t 200 40 umount $MNT The results before this change: Operation Count AvgLat MaxLat ---------------------------------------- NTCreateX 5761605 0.172 312.057 Close 4232452 0.002 10.927 Rename 243937 1.406 277.344 Unlink 1163456 0.631 298.402 Deltree 160 11.581 221.107 Mkdir 80 0.003 0.005 Qpathinfo 5221410 0.065 122.309 Qfileinfo 915432 0.001 3.333 Qfsinfo 957555 0.003 3.992 Sfileinfo 469244 0.023 20.494 Find 2018865 0.448 123.659 WriteX 2874851 0.049 118.529 ReadX 9030579 0.004 21.654 LockX 18754 0.003 4.423 UnlockX 18754 0.002 0.331 Flush 403792 10.944 359.494 Throughput 908.444 MB/sec 40 clients 40 procs max_latency=359.500 ms The results after this change: Operation Count AvgLat MaxLat ---------------------------------------- NTCreateX 6442521 0.159 230.693 Close 4732357 0.002 10.972 Rename 272809 1.293 227.398 Unlink 1301059 0.563 218.500 Deltree 160 7.796 54.887 Mkdir 80 0.008 0.478 Qpathinfo 5839452 0.047 124.330 Qfileinfo 1023199 0.001 4.996 Qfsinfo 1070760 0.003 5.709 Sfileinfo 524790 0.033 21.765 Find 2257658 0.314 125.611 WriteX 3211520 0.040 232.135 ReadX 10098969 0.004 25.340 LockX 20974 0.003 1.569 UnlockX 20974 0.002 3.475 Flush 451553 10.287 331.037 Throughput 1011.77 MB/sec 40 clients 40 procs max_latency=331.045 ms +10.8% throughput, -8.2% max latency Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1cab5e728313c0ecdabbcaa7cc1456c66f351d49 Author: Nikolay Borisov Date: Thu Nov 5 11:08:00 2020 +0200 btrfs: merge __set_extent_bit and set_extent_bit There are only 2 direct calls to set_extent_bit outside of extent-io - in btrfs_find_new_delalloc_bytes and btrfs_truncate_block, the rest are thin wrappers around __set_extent_bit. This adds unnecessary indirection and just makes it more annoying when looking at the various extent bit manipulation functions. This patch renames __set_extent_bit to set_extent_bit effectively removing a level of indirection. No functional changes. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba [ reformat and remove __must_check ] Signed-off-by: David Sterba commit 729f7961729a94e15bcaeeb2a407efb570091ea6 Author: Nikolay Borisov Date: Mon Nov 2 16:49:06 2020 +0200 btrfs: make btrfs_update_inode_fallback take btrfs_inode Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit b06359a3258924403178eee9ac0c5f0482981918 Author: Nikolay Borisov Date: Mon Nov 2 16:49:04 2020 +0200 btrfs: make btrfs_cont_expand take btrfs_inode Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 217f42eb3d321447910c45fc2bb2292aa0839fd6 Author: Nikolay Borisov Date: Mon Nov 2 16:49:03 2020 +0200 btrfs: make btrfs_truncate_block take btrfs_inode Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 03fcb1ab6f265725f13be932c7c24ca4ccb1a703 Author: Nikolay Borisov Date: Mon Nov 2 16:49:02 2020 +0200 btrfs: make btrfs_insert_replace_extent take btrfs_inode Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit dea46d84a3cc25553ed8be4114bd559e8c8c55c4 Author: Nikolay Borisov Date: Mon Nov 2 16:49:01 2020 +0200 btrfs: make find_first_non_hole take btrfs_inode Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit a4ba6cc03eba9d6a64cb72bb487a97ef26a7d620 Author: Nikolay Borisov Date: Mon Nov 2 16:49:00 2020 +0200 btrfs: make maybe_insert_hole take btrfs_inode Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9a56fcd15a9c6b580a21c439deab60bb4cd2cfd9 Author: Nikolay Borisov Date: Mon Nov 2 16:48:59 2020 +0200 btrfs: make btrfs_update_inode take btrfs_inode Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit dfeb9e7cc3ed0d7e4a307e9c4a714c2950b2a9e4 Author: Nikolay Borisov Date: Mon Nov 2 16:48:58 2020 +0200 btrfs: make btrfs_update_inode_item take btrfs_inode Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit f3fbcaef59927b811a5219e4201510e2df11e6ac Author: Nikolay Borisov Date: Mon Nov 2 16:48:57 2020 +0200 btrfs: make btrfs_delayed_update_inode take btrfs_inode Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 72e7e6edd376facb350a4211e400518daffa3d08 Author: Nikolay Borisov Date: Mon Nov 2 16:48:56 2020 +0200 btrfs: make btrfs_finish_ordered_io btrfs_inode-centric Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 507433985caf668ca6205570c84520913455966c Author: Nikolay Borisov Date: Mon Nov 2 16:48:55 2020 +0200 btrfs: make btrfs_truncate_inode_items take btrfs_inode Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 90dffd0cff894b8b50015b19a515b93553c694ba Author: Nikolay Borisov Date: Mon Nov 2 16:48:54 2020 +0200 btrfs: make insert_prealloc_file_extent take btrfs_inode Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 76aea5379678f901a7b229fe3e3434e594ec8e4d Author: Nikolay Borisov Date: Mon Nov 2 16:48:53 2020 +0200 btrfs: make btrfs_inode_safe_disk_i_size_write take btrfs_inode Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit a55463c9f0ffa7429d3b0bd3fc2d0b3f31a3d299 Author: Josef Bacik Date: Fri Nov 6 16:27:36 2020 -0500 btrfs: remove extent_buffer::recursed It is unused everywhere now, it can be removed. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0ecae6fffe66db8d0692469eb22c141bea210291 Author: Josef Bacik Date: Fri Nov 6 16:27:35 2020 -0500 btrfs: remove the recurse parameter from __btrfs_tree_read_lock It is completely unused now, remove it. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit fe596ca3d3b5b005d940a20ee30a6f1c13dd2d19 Author: Josef Bacik Date: Fri Nov 6 16:27:34 2020 -0500 btrfs: use btrfs_tree_read_lock in btrfs_search_slot We no longer use recursion, so __btrfs_tree_read_lock(BTRFS_NESTING_NORMAL) == btrfs_tree_read_lock. Replace this call with the simple helper. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1bb96598410ccd52f4224e5584b8015c6d61b81f Author: Josef Bacik Date: Fri Nov 6 16:27:33 2020 -0500 btrfs: merge back btrfs_read_lock_root_node helpers We no longer have recursive locking and there's no need for separate helpers that allowed the transition to rwsem with minimal code changes. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 4048daedb910f83f080c6bb03c78af794aebdff5 Author: Josef Bacik Date: Fri Nov 6 16:27:32 2020 -0500 btrfs: locking: remove the recursion handling code Now that we're no longer using recursion, rip out all of the supporting code. Follow up patches will clean up the callers of these functions. The extent_buffer::lock_owner is still retained as it allows safety checks in btrfs_init_new_buffer for the case that the free space cache is corrupted and we try to allocate a block that we are currently using and have locked in the path. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 2f5239dcb26b5037dc21b58fe8bb0e80243f4f6f Author: Josef Bacik Date: Fri Nov 6 16:27:31 2020 -0500 btrfs: remove btrfs_path::recurse With my async free space cache loading patches ("btrfs: load free space cache asynchronously") we no longer have a user of path->recurse and can remove it. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0e46318df8a120ba5f1e15210c32cfab33b09f40 Author: Josef Bacik Date: Fri Nov 6 16:27:30 2020 -0500 btrfs: unlock to current level in btrfs_next_old_leaf Filipe reported the following lockdep splat ====================================================== WARNING: possible circular locking dependency detected 5.10.0-rc2-btrfs-next-71 #1 Not tainted ------------------------------------------------------ find/324157 is trying to acquire lock: ffff8ebc48d293a0 (btrfs-tree-01#2/3){++++}-{3:3}, at: __btrfs_tree_read_lock+0x32/0x1a0 [btrfs] but task is already holding lock: ffff8eb9932c5088 (btrfs-tree-00){++++}-{3:3}, at: __btrfs_tree_read_lock+0x32/0x1a0 [btrfs] which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (btrfs-tree-00){++++}-{3:3}: lock_acquire+0xd8/0x490 down_write_nested+0x44/0x120 __btrfs_tree_lock+0x27/0x120 [btrfs] btrfs_search_slot+0x2a3/0xc50 [btrfs] btrfs_insert_empty_items+0x58/0xa0 [btrfs] insert_with_overflow+0x44/0x110 [btrfs] btrfs_insert_xattr_item+0xb8/0x1d0 [btrfs] btrfs_setxattr+0xd6/0x4c0 [btrfs] btrfs_setxattr_trans+0x68/0x100 [btrfs] __vfs_setxattr+0x66/0x80 __vfs_setxattr_noperm+0x70/0x200 vfs_setxattr+0x6b/0x120 setxattr+0x125/0x240 path_setxattr+0xba/0xd0 __x64_sys_setxattr+0x27/0x30 do_syscall_64+0x33/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #0 (btrfs-tree-01#2/3){++++}-{3:3}: check_prev_add+0x91/0xc60 __lock_acquire+0x1689/0x3130 lock_acquire+0xd8/0x490 down_read_nested+0x45/0x220 __btrfs_tree_read_lock+0x32/0x1a0 [btrfs] btrfs_next_old_leaf+0x27d/0x580 [btrfs] btrfs_real_readdir+0x1e3/0x4b0 [btrfs] iterate_dir+0x170/0x1c0 __x64_sys_getdents64+0x83/0x140 do_syscall_64+0x33/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xa9 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(btrfs-tree-00); lock(btrfs-tree-01#2/3); lock(btrfs-tree-00); lock(btrfs-tree-01#2/3); *** DEADLOCK *** 5 locks held by find/324157: #0: ffff8ebc502c6e00 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x4d/0x60 #1: ffff8eb97f689980 (&type->i_mutex_dir_key#10){++++}-{3:3}, at: iterate_dir+0x52/0x1c0 #2: ffff8ebaec00ca58 (btrfs-tree-02#2){++++}-{3:3}, at: __btrfs_tree_read_lock+0x32/0x1a0 [btrfs] #3: ffff8eb98f986f78 (btrfs-tree-01#2){++++}-{3:3}, at: __btrfs_tree_read_lock+0x32/0x1a0 [btrfs] #4: ffff8eb9932c5088 (btrfs-tree-00){++++}-{3:3}, at: __btrfs_tree_read_lock+0x32/0x1a0 [btrfs] stack backtrace: CPU: 2 PID: 324157 Comm: find Not tainted 5.10.0-rc2-btrfs-next-71 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack+0x8d/0xb5 check_noncircular+0xff/0x110 ? mark_lock.part.0+0x468/0xe90 check_prev_add+0x91/0xc60 __lock_acquire+0x1689/0x3130 ? kvm_clock_read+0x14/0x30 ? kvm_sched_clock_read+0x5/0x10 lock_acquire+0xd8/0x490 ? __btrfs_tree_read_lock+0x32/0x1a0 [btrfs] down_read_nested+0x45/0x220 ? __btrfs_tree_read_lock+0x32/0x1a0 [btrfs] __btrfs_tree_read_lock+0x32/0x1a0 [btrfs] btrfs_next_old_leaf+0x27d/0x580 [btrfs] btrfs_real_readdir+0x1e3/0x4b0 [btrfs] iterate_dir+0x170/0x1c0 __x64_sys_getdents64+0x83/0x140 ? filldir+0x1d0/0x1d0 do_syscall_64+0x33/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xa9 This happens because btrfs_next_old_leaf searches down to our current key, and then walks up the path until we can move to the next slot, and then reads back down the path so we get the next leaf. However it doesn't unlock any lower levels until it replaces them with the new extent buffer. This is technically fine, but of course causes lockdep to complain, because we could be holding locks on lower levels while locking upper levels. Fix this by dropping all nodes below the level that we use as our new starting point before we start reading back down the path. This also allows us to drop the nested/recursive locking magic, because we're no longer locking two nodes at the same level anymore. Reported-by: Filipe Manana Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit ffeb03cfe2b49b73da7b325a31714003761fc6d5 Author: Josef Bacik Date: Fri Nov 6 16:27:29 2020 -0500 btrfs: cleanup the locking in btrfs_next_old_leaf We are carrying around this next_rw_lock from when we would do spinning vs blocking read locks. Now that we have the rwsem locking we can simply use the read lock flag unconditionally and the read lock helpers. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit b2598edf8b36f8b7c52e3f5f611c49cbd1c67b36 Author: Anand Jain Date: Tue Nov 3 13:49:43 2020 +0800 btrfs: remove unused argument seed from btrfs_find_device Commit 343694eee8d8 ("btrfs: switch seed device to list api"), missed to check if the parameter seed is true in the function btrfs_find_device(). This tells it whether to traverse the seed device list or not. After this commit, the argument is unused and can be removed. In device_list_add() it's not necessary because fs_devices always points to the device's fs_devices. So with the devid+uuid matching, it will find the right device and return, thus not needing to traverse seed devices. Reviewed-by: Josef Bacik Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3a160a933111241376799244e3587747af574b89 Author: Anand Jain Date: Tue Nov 3 13:49:42 2020 +0800 btrfs: drop never met disk total bytes check in verify_one_dev_extent Drop the condition in verify_one_dev_extent, btrfs_device::disk_total_bytes is set even for a seed device. The comment is wrong, the size is properly set when cloning the device. Commit 1b3922a8bc74 ("btrfs: Use real device structure to verify dev extent") introduced it but it's unclear why the total_disk_bytes was 0. Theoretically, all devices (including missing and seed) marked with the BTRFS_DEV_STATE_IN_FS_METADATA flag gets the total_disk_bytes updated at fill_device_from_item(): open_ctree() btrfs_read_chunk_tree() read_one_dev() open_seed_device() fill_device_from_item() Even if verify_one_dev_extent() reports total_disk_bytes == 0, then its a bug to be fixed somewhere else and not in verify_one_dev_extent() as it's just a messenger. It is never expected that a total_disk_bytes shall be zero. The function fill_device_from_item() does the job of reading it from the item and updating btrfs_device::disk_total_bytes. So both the missing device and the seed devices do have their disk_total_bytes updated. btrfs_find_device can also return a device from fs_info->seed_list because it searches it as well. Furthermore, while removing the device if there is a power loss, we could have a device with its total_bytes = 0, that's still valid. Instead, introduce a check against maximum block device size in read_one_dev(). Reviewed-by: Nikolay Borisov Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit bacce86ae8a7b8b3c7d8398eb57d151a808043d1 Author: Anand Jain Date: Fri Nov 6 16:06:33 2020 +0800 btrfs: drop unused argument step from btrfs_free_extra_devids Commit cf89af146b7e ("btrfs: dev-replace: fail mount if we don't have replace item with target device") dropped the multi stage operation of btrfs_free_extra_devids() that does not need to check replace target anymore and we can remove the 'step' argument. Reviewed-by: Josef Bacik Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit 2766ff61762c3fa19bf30bc0ff72ea5306229f09 Author: Filipe Manana Date: Wed Nov 4 11:07:34 2020 +0000 btrfs: update the number of bytes used by an inode atomically There are several occasions where we do not update the inode's number of used bytes atomically, resulting in a concurrent stat(2) syscall to report a value of used blocks that does not correspond to a valid value, that is, a value that does not match neither what we had before the operation nor what we get after the operation completes. In extreme cases it can result in stat(2) reporting zero used blocks, which can cause problems for some userspace tools where they can consider a file with a non-zero size and zero used blocks as completely sparse and skip reading data, as reported/discussed a long time ago in some threads like the following: https://lists.gnu.org/archive/html/bug-tar/2016-07/msg00001.html The cases where this can happen are the following: -> Case 1 If we do a write (buffered or direct IO) against a file region for which there is already an allocated extent (or multiple extents), then we have a short time window where we can report a number of used blocks to stat(2) that does not take into account the file region being overwritten. This short time window happens when completing the ordered extent(s). This happens because when we drop the extents in the write range we decrement the inode's number of bytes and later on when we insert the new extent(s) we increment the number of bytes in the inode, resulting in a short time window where a stat(2) syscall can get an incorrect number of used blocks. If we do writes that overwrite an entire file, then we have a short time window where we report 0 used blocks to stat(2). Example reproducer: $ cat reproducer-1.sh #!/bin/bash MNT=/mnt/sdi DEV=/dev/sdi stat_loop() { trap "wait; exit" SIGTERM local filepath=$1 local expected=$2 local got while :; do got=$(stat -c %b $filepath) if [ $got -ne $expected ]; then echo -n "ERROR: unexpected used blocks" echo " (got: $got expected: $expected)" fi done } mkfs.btrfs -f $DEV > /dev/null # mkfs.xfs -f $DEV > /dev/null # mkfs.ext4 -F $DEV > /dev/null # mkfs.f2fs -f $DEV > /dev/null # mkfs.reiserfs -f $DEV > /dev/null mount $DEV $MNT xfs_io -f -s -c "pwrite -b 64K 0 64K" $MNT/foobar >/dev/null expected=$(stat -c %b $MNT/foobar) # Create a process to keep calling stat(2) on the file and see if the # reported number of blocks used (disk space used) changes, it should # not because we are not increasing the file size nor punching holes. stat_loop $MNT/foobar $expected & loop_pid=$! for ((i = 0; i < 50000; i++)); do xfs_io -s -c "pwrite -b 64K 0 64K" $MNT/foobar >/dev/null done kill $loop_pid &> /dev/null wait umount $DEV $ ./reproducer-1.sh ERROR: unexpected used blocks (got: 0 expected: 128) ERROR: unexpected used blocks (got: 0 expected: 128) (...) Note that since this is a short time window where the race can happen, the reproducer may not be able to always trigger the bug in one run, or it may trigger it multiple times. -> Case 2 If we do a buffered write against a file region that does not have any allocated extents, like a hole or beyond EOF, then during ordered extent completion we have a short time window where a concurrent stat(2) syscall can report a number of used blocks that does not correspond to the value before or after the write operation, a value that is actually larger than the value after the write completes. This happens because once we start a buffered write into an unallocated file range we increment the inode's 'new_delalloc_bytes', to make sure any stat(2) call gets a correct used blocks value before delalloc is flushed and completes. However at ordered extent completion, after we inserted the new extent, we increment the inode's number of bytes used with the size of the new extent, and only later, when clearing the range in the inode's iotree, we decrement the inode's 'new_delalloc_bytes' counter with the size of the extent. So this results in a short time window where a concurrent stat(2) syscall can report a number of used blocks that accounts for the new extent twice. Example reproducer: $ cat reproducer-2.sh #!/bin/bash MNT=/mnt/sdi DEV=/dev/sdi stat_loop() { trap "wait; exit" SIGTERM local filepath=$1 local expected=$2 local got while :; do got=$(stat -c %b $filepath) if [ $got -ne $expected ]; then echo -n "ERROR: unexpected used blocks" echo " (got: $got expected: $expected)" fi done } mkfs.btrfs -f $DEV > /dev/null # mkfs.xfs -f $DEV > /dev/null # mkfs.ext4 -F $DEV > /dev/null # mkfs.f2fs -f $DEV > /dev/null # mkfs.reiserfs -f $DEV > /dev/null mount $DEV $MNT touch $MNT/foobar write_size=$((64 * 1024)) for ((i = 0; i < 16384; i++)); do offset=$(($i * $write_size)) xfs_io -c "pwrite -S 0xab $offset $write_size" $MNT/foobar >/dev/null blocks_used=$(stat -c %b $MNT/foobar) # Fsync the file to trigger writeback and keep calling stat(2) on it # to see if the number of blocks used changes. stat_loop $MNT/foobar $blocks_used & loop_pid=$! xfs_io -c "fsync" $MNT/foobar kill $loop_pid &> /dev/null wait $loop_pid done umount $DEV $ ./reproducer-2.sh ERROR: unexpected used blocks (got: 265472 expected: 265344) ERROR: unexpected used blocks (got: 284032 expected: 283904) (...) Note that since this is a short time window where the race can happen, the reproducer may not be able to always trigger the bug in one run, or it may trigger it multiple times. -> Case 3 Another case where such problems happen is during other operations that replace extents in a file range with other extents. Those operations are extent cloning, deduplication and fallocate's zero range operation. The cause of the problem is similar to the first case. When we drop the extents from a range, we decrement the inode's number of bytes, and later on, after inserting the new extents we increment it. Since this is not done atomically, a concurrent stat(2) call can see and return a number of used blocks that is smaller than it should be, does not match the number of used blocks before or after the clone/deduplication/zero operation. Like for the first case, when doing a clone, deduplication or zero range operation against an entire file, we end up having a time window where we can report 0 used blocks to a stat(2) call. Example reproducer: $ cat reproducer-3.sh #!/bin/bash MNT=/mnt/sdi DEV=/dev/sdi mkfs.btrfs -f $DEV > /dev/null # mkfs.xfs -f -m reflink=1 $DEV > /dev/null mount $DEV $MNT extent_size=$((64 * 1024)) num_extents=16384 file_size=$(($extent_size * $num_extents)) # File foo has many small extents. xfs_io -f -s -c "pwrite -S 0xab -b $extent_size 0 $file_size" $MNT/foo \ > /dev/null # File bar has much less extents and has exactly the same data as foo. xfs_io -f -c "pwrite -S 0xab 0 $file_size" $MNT/bar > /dev/null expected=$(stat -c %b $MNT/foo) # Now deduplicate bar into foo. While the deduplication is in progres, # the number of used blocks/file size reported by stat should not change xfs_io -c "dedupe $MNT/bar 0 0 $file_size" $MNT/foo > /dev/null & dedupe_pid=$! while [ -n "$(ps -p $dedupe_pid -o pid=)" ]; do used=$(stat -c %b $MNT/foo) if [ $used -ne $expected ]; then echo "Unexpected blocks used: $used (expected: $expected)" fi done umount $DEV $ ./reproducer-3.sh Unexpected blocks used: 2076800 (expected: 2097152) Unexpected blocks used: 2097024 (expected: 2097152) Unexpected blocks used: 2079872 (expected: 2097152) (...) Note that since this is a short time window where the race can happen, the reproducer may not be able to always trigger the bug in one run, or it may trigger it multiple times. So fix this by: 1) Making btrfs_drop_extents() not decrement the VFS inode's number of bytes, and instead return the number of bytes; 2) Making any code that drops extents and adds new extents update the inode's number of bytes atomically, while holding the btrfs inode's spinlock, which is also used by the stat(2) callback to get the inode's number of bytes; 3) For ranges in the inode's iotree that are marked as 'delalloc new', corresponding to previously unallocated ranges, increment the inode's number of bytes when clearing the 'delalloc new' bit from the range, in the same critical section that decrements the inode's 'new_delalloc_bytes' counter, delimited by the btrfs inode's spinlock. An alternative would be to have btrfs_getattr() wait for any IO (ordered extents in progress) and locking the whole range (0 to (u64)-1) while it it computes the number of blocks used. But that would mean blocking stat(2), which is a very used syscall and expected to be fast, waiting for writes, clone/dedupe, fallocate, page reads, fiemap, etc. CC: stable@vger.kernel.org # 5.4+ Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 7f458a3873ae94efe1f37c8b96c97e7298769e98 Author: Filipe Manana Date: Wed Nov 4 11:07:33 2020 +0000 btrfs: fix race when defragmenting leads to unnecessary IO When defragmenting we skip ranges that have holes or inline extents, so that we don't do unnecessary IO and waste space. We do this check when calling should_defrag_range() at btrfs_defrag_file(). However we do it without holding the inode's lock. The reason we do it like this is to avoid blocking other tasks for too long, that possibly want to operate on other file ranges, since after the call to should_defrag_range() and before locking the inode, we trigger a synchronous page cache readahead. However before we were able to lock the inode, some other task might have punched a hole in our range, or we may now have an inline extent there, in which case we should not set the range for defrag anymore since that would cause unnecessary IO and make us waste space (i.e. allocating extents to contain zeros for a hole). So after we locked the inode and the range in the iotree, check again if we have holes or an inline extent, and if we do, just skip the range. I hit this while testing my next patch that fixes races when updating an inode's number of bytes (subject "btrfs: update the number of bytes used by an inode atomically"), and it depends on this change in order to work correctly. Alternatively I could rework that other patch to detect holes and flag their range with the 'new delalloc' bit, but this itself fixes an efficiency problem due a race that from a functional point of view is not harmful (it could be triggered with btrfs/062 from fstests). CC: stable@vger.kernel.org # 5.4+ Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 5893dfb98f257805b26e499a2d5d9190f2db7484 Author: Filipe Manana Date: Wed Nov 4 11:07:32 2020 +0000 btrfs: refactor btrfs_drop_extents() to make it easier to extend There are many arguments for __btrfs_drop_extents() and its wrapper btrfs_drop_extents(), which makes it hard to add more arguments to it and requires changing every caller. I have added a couple myself back in 2014 commit 1acae57b161e ("Btrfs: faster file extent item replace operations") and therefore know firsthand that it is a bit cumbersome to add additional arguments to these functions. Since I will need to add more arguments in a subsequent bug fix, this change is preparatory work and adds a data structure that holds all the arguments, for both input and output, that are passed to this function, with some comments in the structure's definition mentioning what each field is and how it relates to other fields. Callers of this function need only to zero out the content of the structure and setup only the fields they need. This also removes the need to have both __btrfs_drop_extents() and btrfs_drop_extents(), so now we have a single function named btrfs_drop_extents() that takes a pointer to this new data structure (struct btrfs_drop_extents_args). Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit e114c545bb699b2e97e8661d41f34a1651b43f50 Author: Josef Bacik Date: Thu Nov 5 10:45:21 2020 -0500 btrfs: set the lockdep class for extent buffers on creation Both Filipe and Fedora QA recently hit the following lockdep splat: WARNING: possible recursive locking detected 5.10.0-0.rc1.20201028gited8780e3f2ec.57.fc34.x86_64 #1 Not tainted -------------------------------------------- rsync/2610 is trying to acquire lock: ffff89617ed48f20 (&eb->lock){++++}-{2:2}, at: btrfs_tree_read_lock_atomic+0x34/0x140 but task is already holding lock: ffff8961757b1130 (&eb->lock){++++}-{2:2}, at: btrfs_tree_read_lock_atomic+0x34/0x140 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&eb->lock); lock(&eb->lock); *** DEADLOCK *** May be due to missing lock nesting notation 2 locks held by rsync/2610: #0: ffff896107212b90 (&type->i_mutex_dir_key#10){++++}-{3:3}, at: walk_component+0x10c/0x190 #1: ffff8961757b1130 (&eb->lock){++++}-{2:2}, at: btrfs_tree_read_lock_atomic+0x34/0x140 stack backtrace: CPU: 1 PID: 2610 Comm: rsync Not tainted 5.10.0-0.rc1.20201028gited8780e3f2ec.57.fc34.x86_64 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015 Call Trace: dump_stack+0x8b/0xb0 __lock_acquire.cold+0x12d/0x2a4 ? kvm_sched_clock_read+0x14/0x30 ? sched_clock+0x5/0x10 lock_acquire+0xc8/0x400 ? btrfs_tree_read_lock_atomic+0x34/0x140 ? read_block_for_search.isra.0+0xdd/0x320 _raw_read_lock+0x3d/0xa0 ? btrfs_tree_read_lock_atomic+0x34/0x140 btrfs_tree_read_lock_atomic+0x34/0x140 btrfs_search_slot+0x616/0x9a0 btrfs_lookup_dir_item+0x6c/0xb0 btrfs_lookup_dentry+0xa8/0x520 ? lockdep_init_map_waits+0x4c/0x210 btrfs_lookup+0xe/0x30 __lookup_slow+0x10f/0x1e0 walk_component+0x11b/0x190 path_lookupat+0x72/0x1c0 filename_lookup+0x97/0x180 ? strncpy_from_user+0x96/0x1e0 ? getname_flags.part.0+0x45/0x1a0 vfs_statx+0x64/0x100 ? lockdep_hardirqs_on_prepare+0xff/0x180 ? _raw_spin_unlock_irqrestore+0x41/0x50 __do_sys_newlstat+0x26/0x40 ? lockdep_hardirqs_on_prepare+0xff/0x180 ? syscall_enter_from_user_mode+0x27/0x80 ? syscall_enter_from_user_mode+0x27/0x80 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 I have also seen a report of lockdep complaining about the lock class that was looked up being the same as the lock class on the lock we were using, but I can't find the report. These are problems that occur because we do not have the lockdep class set on the extent buffer until _after_ we read the eb in properly. This is problematic for concurrent readers, because we will create the extent buffer, lock it, and then attempt to read the extent buffer. If a second thread comes in and tries to do a search down the same path they'll get the above lockdep splat because the class isn't set properly on the extent buffer. There was a good reason for this, we generally didn't know the real owner of the eb until we read it, specifically in refcounted roots. However now all refcounted roots have the same class name, so we no longer need to worry about this. For non-refcounted trees we know which root we're on based on the parent. Fix this by setting the lockdep class on the eb at creation time instead of read time. This will fix the splat and the weirdness where the class changes in the middle of locking the block. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3fbaf25817f7013fad3ccf76279f0bd5719a5205 Author: Josef Bacik Date: Thu Nov 5 10:45:20 2020 -0500 btrfs: pass the owner_root and level to alloc_extent_buffer Now that we've plumbed all of the callers to have the owner root and the level, plumb it down into alloc_extent_buffer(). Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5d81230baa9096bd5a7ad40822505b89ca7f9dfe Author: Josef Bacik Date: Thu Nov 5 10:45:19 2020 -0500 btrfs: pass the root owner and level around for readahead The readahead infrastructure does raw reads of extent buffers, but we're going to need to know their owner and level in order to set the lockdep key properly, so plumb in the infrastructure that we'll need to have this information when we start allocating extent buffers. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1b7ec85ef49057898a48b2ca1a1e33bf7c27abbe Author: Josef Bacik Date: Thu Nov 5 10:45:18 2020 -0500 btrfs: pass root owner to read_tree_block In order to properly set the lockdep class of a newly allocated block we need to know the owner of the block. For non-refcounted trees this is straightforward, we always know in advance what tree we're reading from. For refcounted trees we don't necessarily know, however all refcounted trees share the same lockdep class name, tree-. Fix all the callers of read_tree_block() to pass in the root objectid we're using. In places like relocation and backref we could probably unconditionally use 0, but just in case use the root when we have it, otherwise use 0 in the cases we don't have the root as it's going to be a refcounted tree anyway. This is a preparation patch for further changes. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 182c79fcb8576548515250b99defce7505c71a49 Author: Josef Bacik Date: Thu Nov 5 10:45:17 2020 -0500 btrfs: use btrfs_read_node_slot in btrfs_qgroup_trace_subtree We're open-coding btrfs_read_node_slot() here, replace with the helper. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3acfbd6a990c6c78e333dd3b37bbe20da289a382 Author: Josef Bacik Date: Thu Nov 5 10:45:16 2020 -0500 btrfs: use btrfs_read_node_slot in qgroup_trace_new_subtree_blocks We're open-coding btrfs_read_node_slot() here, replace with the helper. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6b2cb7cb959a72670973d70c1f36352f6f60042a Author: Josef Bacik Date: Thu Nov 5 10:45:15 2020 -0500 btrfs: use btrfs_read_node_slot in qgroup_trace_extent_swap We're open-coding btrfs_read_node_slot() here, replace with the helper. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit c990ada2a0bb780ba21f18abac5a1e766e40de0b Author: Josef Bacik Date: Thu Nov 5 10:45:14 2020 -0500 btrfs: use btrfs_read_node_slot in walk_down_tree We're open-coding btrfs_read_node_slot() here, replace with the helper. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6b3426be27de80ed213e6c901ae566f478aeadaa Author: Josef Bacik Date: Thu Nov 5 10:45:13 2020 -0500 btrfs: use btrfs_read_node_slot in replace_path We're open-coding btrfs_read_node_slot() here, replace with the helper. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit c975253682e049a3a98e9ce27d19c923f1d1d776 Author: Josef Bacik Date: Thu Nov 5 10:45:12 2020 -0500 btrfs: use btrfs_read_node_slot in do_relocation We're open coding btrfs_read_node_slot in do_relocation, replace this with the proper helper. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 8ef385bbf0994ecf658e050ccb58d7fc18920935 Author: Josef Bacik Date: Thu Nov 5 10:45:11 2020 -0500 btrfs: use btrfs_read_node_slot in walk_down_reloc_tree We do not need to call read_tree_block() here, simply use the btrfs_read_node_slot helper. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 206983b72a369c8fdc4fd55b3f46ec16f3c024ea Author: Josef Bacik Date: Thu Nov 5 10:45:10 2020 -0500 btrfs: use btrfs_read_node_slot in btrfs_realloc_node We have this open-coded nightmare in btrfs_realloc_node that does the same thing that the normal read path does, which is to see if we have the eb in memory already, and if not read it, and verify the eb is uptodate. Delete this open coding and simply use btrfs_read_node_slot. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit bfb484d922a317183d77b3b6db77a2ff659384cc Author: Josef Bacik Date: Thu Nov 5 10:45:09 2020 -0500 btrfs: cleanup extent buffer readahead We're going to pass around more information when we allocate extent buffers, in order to make that cleaner how we do readahead. Most of the callers have the parent node that we're getting our blockptr from, with the sole exception of relocation which simply has the bytenr it wants to read. Add a helper that takes the current arguments that we need (bytenr and gen), and add another helper for simply reading the slot out of a node. In followup patches the helper that takes all the extra arguments will be expanded, and the simpler helper won't need to have it's arguments adjusted. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 416e3445ef8087ff28792f366af9726cc225fb0c Author: Josef Bacik Date: Thu Nov 5 10:45:08 2020 -0500 btrfs: remove lockdep classes for the fs tree We have this weird problem where our lockdep class is set after we read a tree block, which can race with concurrent readers and result in erroneous lockdep errors. We want to set the lockdep class at allocation time if possible, but in certain cases we may not have the actual root owner, such as with relocation or any backref lookups. This is only really a problem for reference counted trees, because all other trees have their root reference set in their extent reference. Remove the fs tree specific lock class. We need to still keep the reloc tree one, it's still reference counted, because replace_path will lock the reloc tree and the destination tree, and if they're both set to tree- we'll have issues. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3e48d8d2540d4c63461ec4cafb8f65355b6f7b57 Author: Pavel Begunkov Date: Wed Nov 4 09:45:54 2020 +0000 btrfs: discard: reschedule work after sysfs param update After sysfs updates discard's iops_limit or kbps_limit it also needs to adjust current timer through rescheduling, otherwise the discard work may wait for a long time for the previous timer to expire or bumped by someone else. Reviewed-by: Josef Bacik Signed-off-by: Pavel Begunkov Reviewed-by: David Sterba Signed-off-by: David Sterba commit df903e5d294f62e07280566e0afe9403a92879f0 Author: Pavel Begunkov Date: Wed Nov 4 09:45:53 2020 +0000 btrfs: don't miss async discards after scheduled work override If btrfs_discard_schedule_work() is called with override=true, it sets delay anew regardless how much time is left until the timer should have fired. If delays are long (that can happen, for example, with low kbps_limit), they might get constantly overridden without having a chance to run the discard work. Reviewed-by: Josef Bacik Signed-off-by: Pavel Begunkov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6e88f116bd4cf34406fc70a6d6bf5b4d49e1ab2d Author: Pavel Begunkov Date: Wed Nov 4 09:45:52 2020 +0000 btrfs: discard: store async discard delay as ns not as jiffies Most delay calculations are done in ns or ms, so store discard_ctl->delay in ms and convert the final delay to jiffies only at the end. Reviewed-by: Josef Bacik Signed-off-by: Pavel Begunkov Reviewed-by: David Sterba Signed-off-by: David Sterba commit e50404a8a6997f9c0d412fa21f07a0da8e3891a2 Author: Pavel Begunkov Date: Wed Nov 4 09:45:51 2020 +0000 btrfs: discard: speed up async discard up to iops_limit Instead of using iops_limit only for cutting off extremes, calculate the discard delay directly from it, so it closely follows iops_limit and doesn't under-discard even though quotas are not saturated. The iops limit could be hit more often in some cases and could increase the discard rate. Reviewed-by: Josef Bacik Signed-off-by: Pavel Begunkov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 480a8ec83b179da1c484133b0f687090e89b00c5 Author: Qu Wenruo Date: Tue Nov 3 21:31:04 2020 +0800 btrfs: scrub: refactor scrub_find_csum() Function scrub_find_csum() is to locate the csum for bytenr @logical from sctx->csum_list. However it lacks a lot of comments to explain things like how the csum_list is organized and why we need to drop csum range which is before us. Refactor the function by: - Add more comments explaining the behavior - Add comment explaining why we need to drop the csum range - Put the csum copy in the main loop This is mostly for the incoming patches to make scrub_find_csum() able to find multiple checksums. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 96e63a45fb9a40ba49813c1e538358f3cedbedba Author: Qu Wenruo Date: Tue Nov 3 21:31:02 2020 +0800 btrfs: scrub: remove the force parameter from scrub_pages The @force parameter for scrub_pages() is to indicate whether we want to force bio submission. Currently it's only used for the super block, and it can be easily determined by the @flags, so we can remove the parameter. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 261d2dcb24302b220281f989d978268310a31bed Author: Qu Wenruo Date: Tue Nov 3 21:31:01 2020 +0800 btrfs: scrub: distinguish scrub page from regular page There are several call sites where we declare something like "struct scrub_page *page". This is confusing as we also use regular page in this code, rename it to 'spage' where applicable. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit ac303b6987a9633ef11447a861d24752387dbdfc Author: Qu Wenruo Date: Tue Nov 3 21:30:49 2020 +0800 btrfs: pass bvec to csum_dirty_buffer instead of page Currently csum_dirty_buffer() uses page to grab extent buffer, but that only works for sector size == PAGE_SIZE case. For subpage we need page + page_offset to grab extent buffer. Reviewed-by: Nikolay Borisov Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 77bf40a2ba2e6eded53a74f94d1be448bd8db030 Author: Qu Wenruo Date: Tue Nov 3 21:30:48 2020 +0800 btrfs: extract extent buffer verification from btrfs_validate_metadata_buffer() Currently btrfs_validate_metadata_buffer() only needs to handle one extent buffer as currently one page maps to at most one extent buffer. For incoming subpage support, we need to extend the support where one page could contain multiple extent buffers. Split the function so we can call validate_extent_buffer on extent buffers independently. Reviewed-by: Nikolay Borisov Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit a26663e7a2f456b8111de0135394c04c72831930 Author: Qu Wenruo Date: Tue Nov 3 21:30:47 2020 +0800 btrfs: make csum_tree_block() handle node smaller than page For subpage size support, metadata blocks of nodesize are smaller than one page and this needs to be handled when calculating the checksum. The checksummed start and length need to be adjusted but only for the first page: - start is simply offset in the page - length is nodesize (subpage) or PAGE_SIZE for all other cases Reviewed-by: Nikolay Borisov Signed-off-by: Goldwyn Rodrigues Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 2f4d60dfae0ee4ad1c8d57e102c3b032b8f9d4d5 Author: Qu Wenruo Date: Tue Nov 3 21:30:46 2020 +0800 btrfs: grab fs_info from extent_buffer in btrfs_mark_buffer_dirty Since commit f28491e0a6c4 ("Btrfs: move the extent buffer radix tree into the fs_info"), fs_info can be grabbed from extent_buffer directly. Reviewed-by: Nikolay Borisov Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 478ef8868ff80372e29d1c5283f360cf49ab0a8b Author: Qu Wenruo Date: Wed Oct 21 14:25:05 2020 +0800 btrfs: make buffer_radix take sector size units For subpage sector size support, one page can contain multiple tree blocks. The entries cannot be based on page size and index must be derived from the sectorsize. No change for page size == sector size. Reviewed-by: Nikolay Borisov Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0d01e247a06b9f36f685edf6c2e74f79f60df9cd Author: Qu Wenruo Date: Wed Oct 21 14:25:02 2020 +0800 btrfs: assert page mapping lock in attach_extent_buffer_page When calling attach_extent_buffer_page(), either we're attaching anonymous pages, called from btrfs_clone_extent_buffer(), or we're attaching btree inode pages, called from alloc_extent_buffer(). For the latter case, we should hold page->mapping->private_lock to avoid parallel changes to page->private. Reviewed-by: Nikolay Borisov Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit bbb86a3717917c7b16da545f9c421ab6a3448306 Author: Josef Bacik Date: Fri Oct 23 09:58:11 2020 -0400 btrfs: protect fs_info->caching_block_groups by block_group_cache_lock I got the following lockdep splat ====================================================== WARNING: possible circular locking dependency detected 5.9.0+ #101 Not tainted ------------------------------------------------------ btrfs-cleaner/3445 is trying to acquire lock: ffff89dbec39ab48 (btrfs-root-00){++++}-{3:3}, at: __btrfs_tree_read_lock+0x32/0x170 but task is already holding lock: ffff89dbeaf28a88 (&fs_info->commit_root_sem){++++}-{3:3}, at: btrfs_find_all_roots+0x41/0x80 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&fs_info->commit_root_sem){++++}-{3:3}: down_write+0x3d/0x70 btrfs_cache_block_group+0x2d5/0x510 find_free_extent+0xb6e/0x12f0 btrfs_reserve_extent+0xb3/0x1b0 btrfs_alloc_tree_block+0xb1/0x330 alloc_tree_block_no_bg_flush+0x4f/0x60 __btrfs_cow_block+0x11d/0x580 btrfs_cow_block+0x10c/0x220 commit_cowonly_roots+0x47/0x2e0 btrfs_commit_transaction+0x595/0xbd0 sync_filesystem+0x74/0x90 generic_shutdown_super+0x22/0x100 kill_anon_super+0x14/0x30 btrfs_kill_super+0x12/0x20 deactivate_locked_super+0x36/0xa0 cleanup_mnt+0x12d/0x190 task_work_run+0x5c/0xa0 exit_to_user_mode_prepare+0x1df/0x200 syscall_exit_to_user_mode+0x54/0x280 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #1 (&space_info->groups_sem){++++}-{3:3}: down_read+0x40/0x130 find_free_extent+0x2ed/0x12f0 btrfs_reserve_extent+0xb3/0x1b0 btrfs_alloc_tree_block+0xb1/0x330 alloc_tree_block_no_bg_flush+0x4f/0x60 __btrfs_cow_block+0x11d/0x580 btrfs_cow_block+0x10c/0x220 commit_cowonly_roots+0x47/0x2e0 btrfs_commit_transaction+0x595/0xbd0 sync_filesystem+0x74/0x90 generic_shutdown_super+0x22/0x100 kill_anon_super+0x14/0x30 btrfs_kill_super+0x12/0x20 deactivate_locked_super+0x36/0xa0 cleanup_mnt+0x12d/0x190 task_work_run+0x5c/0xa0 exit_to_user_mode_prepare+0x1df/0x200 syscall_exit_to_user_mode+0x54/0x280 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #0 (btrfs-root-00){++++}-{3:3}: __lock_acquire+0x1167/0x2150 lock_acquire+0xb9/0x3d0 down_read_nested+0x43/0x130 __btrfs_tree_read_lock+0x32/0x170 __btrfs_read_lock_root_node+0x3a/0x50 btrfs_search_slot+0x614/0x9d0 btrfs_find_root+0x35/0x1b0 btrfs_read_tree_root+0x61/0x120 btrfs_get_root_ref+0x14b/0x600 find_parent_nodes+0x3e6/0x1b30 btrfs_find_all_roots_safe+0xb4/0x130 btrfs_find_all_roots+0x60/0x80 btrfs_qgroup_trace_extent_post+0x27/0x40 btrfs_add_delayed_data_ref+0x3fd/0x460 btrfs_free_extent+0x42/0x100 __btrfs_mod_ref+0x1d7/0x2f0 walk_up_proc+0x11c/0x400 walk_up_tree+0xf0/0x180 btrfs_drop_snapshot+0x1c7/0x780 btrfs_clean_one_deleted_snapshot+0xfb/0x110 cleaner_kthread+0xd4/0x140 kthread+0x13a/0x150 ret_from_fork+0x1f/0x30 other info that might help us debug this: Chain exists of: btrfs-root-00 --> &space_info->groups_sem --> &fs_info->commit_root_sem Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&fs_info->commit_root_sem); lock(&space_info->groups_sem); lock(&fs_info->commit_root_sem); lock(btrfs-root-00); *** DEADLOCK *** 3 locks held by btrfs-cleaner/3445: #0: ffff89dbeaf28838 (&fs_info->cleaner_mutex){+.+.}-{3:3}, at: cleaner_kthread+0x6e/0x140 #1: ffff89dbeb6c7640 (sb_internal){.+.+}-{0:0}, at: start_transaction+0x40b/0x5c0 #2: ffff89dbeaf28a88 (&fs_info->commit_root_sem){++++}-{3:3}, at: btrfs_find_all_roots+0x41/0x80 stack backtrace: CPU: 0 PID: 3445 Comm: btrfs-cleaner Not tainted 5.9.0+ #101 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-2.fc32 04/01/2014 Call Trace: dump_stack+0x8b/0xb0 check_noncircular+0xcf/0xf0 __lock_acquire+0x1167/0x2150 ? __bfs+0x42/0x210 lock_acquire+0xb9/0x3d0 ? __btrfs_tree_read_lock+0x32/0x170 down_read_nested+0x43/0x130 ? __btrfs_tree_read_lock+0x32/0x170 __btrfs_tree_read_lock+0x32/0x170 __btrfs_read_lock_root_node+0x3a/0x50 btrfs_search_slot+0x614/0x9d0 ? find_held_lock+0x2b/0x80 btrfs_find_root+0x35/0x1b0 ? do_raw_spin_unlock+0x4b/0xa0 btrfs_read_tree_root+0x61/0x120 btrfs_get_root_ref+0x14b/0x600 find_parent_nodes+0x3e6/0x1b30 btrfs_find_all_roots_safe+0xb4/0x130 btrfs_find_all_roots+0x60/0x80 btrfs_qgroup_trace_extent_post+0x27/0x40 btrfs_add_delayed_data_ref+0x3fd/0x460 btrfs_free_extent+0x42/0x100 __btrfs_mod_ref+0x1d7/0x2f0 walk_up_proc+0x11c/0x400 walk_up_tree+0xf0/0x180 btrfs_drop_snapshot+0x1c7/0x780 ? btrfs_clean_one_deleted_snapshot+0x73/0x110 btrfs_clean_one_deleted_snapshot+0xfb/0x110 cleaner_kthread+0xd4/0x140 ? btrfs_alloc_root+0x50/0x50 kthread+0x13a/0x150 ? kthread_create_worker_on_cpu+0x40/0x40 ret_from_fork+0x1f/0x30 while testing another lockdep fix. This happens because we're using the commit_root_sem to protect fs_info->caching_block_groups, which creates a dependency on the groups_sem -> commit_root_sem, which is problematic because we will allocate blocks while holding tree roots. Fix this by making the list itself protected by the fs_info->block_group_cache_lock. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit e747853cae3ae332ce81cf1c12d8b3df45041949 Author: Josef Bacik Date: Fri Oct 23 09:58:10 2020 -0400 btrfs: load free space cache asynchronously While documenting the usage of the commit_root_sem, I noticed that we do not actually take the commit_root_sem in the case of the free space cache. This is problematic because we're supposed to hold that sem while we're reading the commit roots, which is what we do for the free space cache. The reason I did it inline when I originally wrote the code was because there's the case of unpinning where we need to make sure that the free space cache is loaded if we're going to use the free space cache. But we can accomplish the same thing by simply waiting for the cache to be loaded. Rework this code to load the free space cache asynchronously. This allows us to greatly cleanup the caching code because now it's all shared by the various caching methods. We also are now in a position to have the commit_root semaphore held while we're loading the free space cache. And finally our modification of ->last_byte_to_unpin is removed because it can be handled in the proper way on commit. Some care must be taken when replaying the log, when we expect that the free space cache will be read entirely before we start excluding space to replay. This could lead to overwriting space during replay. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 4d7240f0abda6a75ce54e8d488db2e4ca4460185 Author: Josef Bacik Date: Fri Oct 23 09:58:09 2020 -0400 btrfs: load the free space cache inode extents from commit root Historically we've allowed recursive locking specifically for the free space inode. This is because we are only doing reads and know that it's safe. However we don't actually need this feature, we can get away with reading the commit root for the extents. In fact if we want to allow asynchronous loading of the free space cache we have to use the commit root, otherwise we will deadlock. Switch to using the commit root for the file extents. These are only read at load time, and are replaced as soon as we start writing the cache out to disk. The cache is never read again, so this is legitimate. This matches what we do for the inode itself, as we read that from the commit root as well. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit cd79909bc7cdd8043a22d699aae1e8435792c824 Author: Josef Bacik Date: Fri Oct 23 09:58:08 2020 -0400 btrfs: load free space cache into a temporary ctl The free space cache has been special in that we would load it right away instead of farming the work off to a worker thread. This resulted in some weirdness that had to be taken into account for this fact, namely that if we every found a block group being cached the fast way we had to wait for it to finish, because we could get the cache before it had been validated and we may throw the cache away. To handle this particular case instead create a temporary btrfs_free_space_ctl to load the free space cache into. Then once we've validated that it makes sense, copy it's contents into the actual block_group->free_space_ctl. This allows us to avoid the problems of needing to wait for the caching to complete, we can clean up the discard extent handling stuff in __load_free_space_cache, and we no longer need to do the merge_space_tree() because the space is added one by one into the real free_space_ctl. This will allow further reworks of how we handle loading the free space cache. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 66b53bae46c84e00e276ee6e539eedfbcfe78573 Author: Josef Bacik Date: Fri Oct 23 09:58:07 2020 -0400 btrfs: cleanup btrfs_discard_update_discardable usage This passes in the block_group and the free_space_ctl, but we can get this from the block group itself. Part of this is because we call it from __load_free_space_cache, which can be called for the inode cache as well. Move that call into the block group specific load section, wrap it in the right lock that we need for the assertion (but otherwise this is safe without the lock because this happens in single-thread context). Fix up the arguments to only take the block group. Add a lockdep_assert as well for good measure to make sure we don't mess up the locking again. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 2ca08c56e813323ee470f7fd8d836f30600e3960 Author: Josef Bacik Date: Fri Oct 23 09:58:06 2020 -0400 btrfs: explicitly protect ->last_byte_to_unpin in unpin_extent_range Currently unpin_extent_range happens in the transaction commit context, so we are protected from ->last_byte_to_unpin changing while we're unpinning, because any new transactions would have to wait for us to complete before modifying ->last_byte_to_unpin. However in the future we may want to change how this works, for instance with async unpinning or other such TODO items. To prepare for that future explicitly protect ->last_byte_to_unpin with the commit_root_sem so we are sure it won't change while we're doing our work. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 27d56e62e4748c2135650c260024e9904b8c1a0a Author: Josef Bacik Date: Fri Oct 23 09:58:05 2020 -0400 btrfs: update last_byte_to_unpin in switch_commit_roots While writing an explanation for the need of the commit_root_sem for btrfs_prepare_extent_commit, I realized we have a slight hole that could result in leaked space if we have to do the old style caching. Consider the following scenario commit root +----+----+----+----+----+----+----+ |\\\\| |\\\\|\\\\| |\\\\|\\\\| +----+----+----+----+----+----+----+ 0 1 2 3 4 5 6 7 new commit root +----+----+----+----+----+----+----+ | | | |\\\\| | |\\\\| +----+----+----+----+----+----+----+ 0 1 2 3 4 5 6 7 Prior to this patch, we run btrfs_prepare_extent_commit, which updates the last_byte_to_unpin, and then we subsequently run switch_commit_roots. In this example lets assume that caching_ctl->progress == 1 at btrfs_prepare_extent_commit() time, which means that cache->last_byte_to_unpin == 1. Then we go and do the switch_commit_roots(), but in the meantime the caching thread has made some more progress, because we drop the commit_root_sem and re-acquired it. Now caching_ctl->progress == 3. We swap out the commit root and carry on to unpin. The race can happen like: 1) The caching thread was running using the old commit root when it found the extent for [2, 3); 2) Then it released the commit_root_sem because it was in the last item of a leaf and the semaphore was contended, and set ->progress to 3 (value of 'last'), as the last extent item in the current leaf was for the extent for range [2, 3); 3) Next time it gets the commit_root_sem, will start using the new commit root and search for a key with offset 3, so it never finds the hole for [2, 3). So the caching thread never saw [2, 3) as free space in any of the commit roots, and by the time finish_extent_commit() was called for the range [0, 3), ->last_byte_to_unpin was 1, so it only returned the subrange [0, 1) to the free space cache, skipping [2, 3). In the unpin code we have last_byte_to_unpin == 1, so we unpin [0,1), but do not unpin [2,3). However because caching_ctl->progress == 3 we do not see the newly freed section of [2,3), and thus do not add it to our free space cache. This results in us missing a chunk of free space in memory (on disk too, unless we have a power failure before writing the free space cache to disk). Fix this by making sure the ->last_byte_to_unpin is set at the same time that we swap the commit roots, this ensures that we will always be consistent. CC: stable@vger.kernel.org # 5.8+ Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik [ update changelog with Filipe's review comments ] Signed-off-by: David Sterba commit 9076dbd5ee837c3882fc42891c14cecd0354a849 Author: Josef Bacik Date: Fri Oct 23 09:58:04 2020 -0400 btrfs: do not shorten unpin len for caching block groups While fixing up our ->last_byte_to_unpin locking I noticed that we will shorten len based on ->last_byte_to_unpin if we're caching when we're adding back the free space. This is correct for the free space, as we cannot unpin more than ->last_byte_to_unpin, however we use len to adjust the ->bytes_pinned counters and such, which need to track the actual pinned usage. This could result in WARN_ON(space_info->bytes_pinned) triggering at unmount time. Fix this by using a local variable for the amount to add to free space cache, and leave len untouched in this case. CC: stable@vger.kernel.org # 5.4+ Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit dc516164869300efd0bdbf6f894defc306588b75 Author: David Sterba Date: Thu Oct 29 15:33:45 2020 +0100 btrfs: reorder extent buffer members for better packing After the rwsem replaced the tree lock implementation, the extent buffer got smaller but leaving some holes behind. By changing log_index type and reordering, we can squeeze the size further to 240 bytes, measured on release config on x86_64. Log_index spans only 3 values and needs to be signed. Before: struct extent_buffer { u64 start; /* 0 8 */ long unsigned int len; /* 8 8 */ long unsigned int bflags; /* 16 8 */ struct btrfs_fs_info * fs_info; /* 24 8 */ spinlock_t refs_lock; /* 32 4 */ atomic_t refs; /* 36 4 */ atomic_t io_pages; /* 40 4 */ int read_mirror; /* 44 4 */ struct callback_head callback_head __attribute__((__aligned__(8))); /* 48 16 */ /* --- cacheline 1 boundary (64 bytes) --- */ pid_t lock_owner; /* 64 4 */ bool lock_recursed; /* 68 1 */ /* XXX 3 bytes hole, try to pack */ struct rw_semaphore lock; /* 72 40 */ short int log_index; /* 112 2 */ /* XXX 6 bytes hole, try to pack */ struct page * pages[16]; /* 120 128 */ /* size: 248, cachelines: 4, members: 14 */ /* sum members: 239, holes: 2, sum holes: 9 */ /* forced alignments: 1 */ /* last cacheline: 56 bytes */ } __attribute__((__aligned__(8))); After: struct extent_buffer { u64 start; /* 0 8 */ long unsigned int len; /* 8 8 */ long unsigned int bflags; /* 16 8 */ struct btrfs_fs_info * fs_info; /* 24 8 */ spinlock_t refs_lock; /* 32 4 */ atomic_t refs; /* 36 4 */ atomic_t io_pages; /* 40 4 */ int read_mirror; /* 44 4 */ struct callback_head callback_head __attribute__((__aligned__(8))); /* 48 16 */ /* --- cacheline 1 boundary (64 bytes) --- */ pid_t lock_owner; /* 64 4 */ bool lock_recursed; /* 68 1 */ s8 log_index; /* 69 1 */ /* XXX 2 bytes hole, try to pack */ struct rw_semaphore lock; /* 72 40 */ struct page * pages[16]; /* 112 128 */ /* size: 240, cachelines: 4, members: 14 */ /* sum members: 238, holes: 1, sum holes: 2 */ /* forced alignments: 1 */ /* last cacheline: 48 bytes */ } __attribute__((__aligned__(8))); Reviewed-by: Josef Bacik Signed-off-by: David Sterba commit b9729ce014f6c22d4ca7fda97a7d8ea432af5f91 Author: Josef Bacik Date: Thu Aug 20 11:46:11 2020 -0400 btrfs: locking: rip out path->leave_spinning We no longer distinguish between blocking and spinning, so rip out all this code. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit ac5887c8e013d6754d36e6d51dc03448ee0b0065 Author: Josef Bacik Date: Thu Aug 20 11:46:10 2020 -0400 btrfs: locking: remove all the blocking helpers Now that we're using a rw_semaphore we no longer need to indicate if a lock is blocking or not, nor do we need to flip the entire path from blocking to spinning. Remove these helpers and all the places they are called. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 2ae0c2d80d25dae7658b64b93c271004bc8708e8 Author: David Sterba Date: Tue Jun 30 17:44:49 2020 +0200 btrfs: scrub: remove local copy of csum_size from context The context structure unnecessarily stores copy of the checksum size, that can be now easily obtained from fs_info. Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba commit 419b791ce76090aeaa598d7879579c236736e4ae Author: David Sterba Date: Tue Jun 30 17:42:23 2020 +0200 btrfs: check integrity: remove local copy of csum_size The state structure unnecessarily stores copy of the checksum size, that can be now easily obtained from fs_info. Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba commit 713cebfb98915201a43ff4d01b0dbafecd50d8ae Author: David Sterba Date: Tue Jun 30 18:04:02 2020 +0200 btrfs: remove unnecessary local variables for checksum size Remove local variable that is then used just once and replace it with fs_info::csum_size. Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba commit 223486c27b369a10ceb6180c40d7aa354e903446 Author: David Sterba Date: Thu Jul 2 11:27:30 2020 +0200 btrfs: switch cached fs_info::csum_size from u16 to u32 The fs_info value is 32bit, switch also the local u16 variables. This leads to a better assembly code generated due to movzwl. This simple change will shave some bytes on x86_64 and release config: text data bss dec hex filename 1090000 17980 14912 1122892 11224c pre/btrfs.ko 1089794 17980 14912 1122686 11217e post/btrfs.ko DELTA: -206 Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba commit 55fc29bed8ddb4c3848ecf8cf7133e34c946f223 Author: David Sterba Date: Tue Jun 30 02:01:31 2020 +0200 btrfs: use cached value of fs_info::csum_size everywhere btrfs_get_16 shows up in the system performance profiles (helper to read 16bit values from on-disk structures). This is partially because of the checksum size that's frequently read along with data reads/writes, other u16 uses are from item size or directory entries. Replace all calls to btrfs_super_csum_size by the cached value from fs_info. Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Signed-off-by: David Sterba commit fe5ecbe818de38774895305e1f2d48972f1b745f Author: David Sterba Date: Thu Jul 2 10:54:11 2020 +0200 btrfs: precalculate checksums per leaf once btrfs_csum_bytes_to_leaves shows up in system profiles, which makes it a candidate for optimizations. After the 64bit division has been replaced by shift, there's still a calculation done each time the function is called: checksums per leaf. As this is a constant value for the entire filesystem lifetime, we can calculate it once at mount time and reuse. This also allows to reduce the division to 64bit/32bit as we know the constant will always fit the 32bit type. Replace the open-coded rounding up with a macro that internally handles the 64bit division and as it's now a short function, make it static inline (slight code increase, slight stack usage reduction). Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba commit 22b6331d961712ac2735423e5a6c04e9d0fd7897 Author: David Sterba Date: Thu Jul 2 11:10:18 2020 +0200 btrfs: store precalculated csum_size in fs_info In many places we need the checksum size and it is inefficient to read it from the raw superblock. Store the value into fs_info, actual use will be in followup patches. The size is u32 as it allows to generate better assembly than with u16. Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba commit 265fdfa6ce0a79df3b880bbf39d9a00a0435687f Author: David Sterba Date: Wed Jul 1 21:19:09 2020 +0200 btrfs: replace s_blocksize_bits with fs_info::sectorsize_bits The value of super_block::s_blocksize_bits is the same as fs_info::sectorsize_bits, but we don't need to do the extra dereferences in many functions and storing the bits as u32 (in fs_info) generates shorter assembly. Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Signed-off-by: David Sterba commit 098e63082b9bd26b61a57310385efc3e9f363dea Author: David Sterba Date: Wed Jul 1 21:07:40 2020 +0200 btrfs: replace div_u64 by shift in free_space_bitmap_size Change free_space_bitmap_size to take btrfs_fs_info so we can get the sectorsize_bits to do calculations. Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Signed-off-by: David Sterba commit ab108d992b1248adfb7c13c1136cab59c944a98c Author: David Sterba Date: Wed Jul 1 20:45:04 2020 +0200 btrfs: use precalculated sectorsize_bits from fs_info We do a lot of calculations where we divide or multiply by sectorsize. We also know and make sure that sectorsize is a power of two, so this means all divisions can be turned to shifts and avoid eg. expensive u64/u32 divisions. The type is u32 as it's more register friendly on x86_64 compared to u8 and the resulting assembly is smaller (movzbl vs movl). There's also superblock s_blocksize_bits but it's usually one more pointer dereference farther than fs_info. Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba commit e940e9a7c793e3fffe6cdef4f849d696c57ed3f7 Author: Qu Wenruo Date: Wed Oct 21 14:25:01 2020 +0800 btrfs: rename page_size to io_size in submit_extent_page The variable @page_size in submit_extent_page() is not related to page size. It can already be smaller than PAGE_SIZE, so rename it to io_size to reduce confusion, this is especially important for later subpage support. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 8b8bbd461ea180470041fa84c745480163bb908f Author: Qu Wenruo Date: Wed Oct 21 14:24:58 2020 +0800 btrfs: only require sector size alignment for page read If we're reading partial page, btrfs will warn about this as read/write is always done in sector size, which now equals page size. But for the upcoming subpage read-only support, our data read is only aligned to sectorsize, which can be smaller than page size. Thus here we change the warning condition to check it against sectorsize, the behavior is not changed for regular sectorsize == PAGE_SIZE case, and won't report error for subpage read. Also, pass the proper start/end with bv_offset for check_data_csum() to handle. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 12e3360f74759de1031738b85743b429aef3dc8c Author: Qu Wenruo Date: Wed Oct 21 14:24:57 2020 +0800 btrfs: rename pages_locked in process_pages_contig() Function process_pages_contig() does not only handle page locking but also other operations. Rename the local variable pages_locked to pages_processed to reduce confusion. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 265d4ac03fdf75e84002d5749854c77d7240aa81 Author: Qu Wenruo Date: Wed Oct 21 14:24:54 2020 +0800 btrfs: sink parameter start and len to check_data_csum For check_data_csum(), the page we're using is directly from the inode mapping, thus it has valid page_offset(). We can use (page_offset() + pg_off) to replace @start parameter completely, while the @len should always be sectorsize. Since we're here, also add some comment, as there are quite some confusion in words like start/offset, without explaining whether it's file_offset or logical bytenr. This should not affect the existing behavior, as for current sectorsize == PAGE_SIZE case, @pgoff should always be 0, and len is always PAGE_SIZE (or sectorsize from the dio read path). Reviewed-by: Goldwyn Rodrigues Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 8896a08d8ea95809adbc3742cdf9c7575f66c960 Author: Qu Wenruo Date: Wed Oct 21 14:24:53 2020 +0800 btrfs: replace fs_info and private_data with inode in btrfs_wq_submit_bio All callers of btrfs_wq_submit_bio() pass struct inode as @private_data, so there is no need for it to be (void *), replace it with "struct inode *inode". While we can extract fs_info from struct inode, also remove the @fs_info parameter. Since we're here, also replace all the (void *private_data) into (struct inode *inode). Reviewed-by: Goldwyn Rodrigues Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3f6bb4aeb5dfa392dac438e816959ccb9c690896 Author: Qu Wenruo Date: Wed Oct 21 14:24:51 2020 +0800 btrfs: sink the failed_start parameter to set_extent_bit The @failed_start parameter is only paired with @exclusive_bits, and those parameters are only used for EXTENT_LOCKED bit, which have their own wrappers lock_extent_bits(). Thus for regular set_extent_bit() calls, the failed_start makes no sense, just sink the parameter. Also, since @failed_start and @exclusive_bits are used in pairs, add an assert to make it obvious. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 03509b781ae98d4cf5cc139f89a3e75467b829a8 Author: Qu Wenruo Date: Wed Oct 21 14:24:50 2020 +0800 btrfs: update the comment for find_first_extent_bit The pitfall here is, if the parameter @bits has multiple bits set, we will return the first range which just has one of the specified bits set. This is a little tricky if we want an exact match. Anyway, update the comment to make that clear. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit a3efb2f0bad55330bc2402734220ef5446ef1f19 Author: Qu Wenruo Date: Wed Oct 21 14:24:49 2020 +0800 btrfs: fix the comment on lock_extent_buffer_for_io The return value of that function is completely wrong. That function only returns 0 if the extent buffer doesn't need to be submitted. The "ret = 1" and "ret = 0" are determined by the return value of "test_and_clear_bit(EXTENT_BUFFER_DIRTY, &eb->bflags)". And if we get ret == 1, it's because the extent buffer is dirty, and we set its status to EXTENT_BUFFER_WRITE_BACK, and continue to page locking. While if we get ret == 0, it means the extent is not dirty from the beginning, so we don't need to write it back. The caller also follows this, in btree_write_cache_pages(), if lock_extent_buffer_for_io() returns 0, we just skip the extent buffer completely. So the comment is completely wrong. Since we're here, also change the description a little. The write bio flushing won't be visible to the caller, thus it's not an major feature. In the main description, only describe the locking part to make the point more clear. For reference, added in commit 2e3c25136adf ("btrfs: extent_io: add proper error handling to lock_extent_buffer_for_io()") Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit cc7c77146e53ecfbdce695a860e8368c849ffd4f Author: David Sterba Date: Tue Sep 15 14:18:23 2020 +0200 btrfs: remove unnecessary casts in printk Long time ago the explicit casts were necessary for u64 but we don't need it. Remove casts where the type matches, leaving only cases that cast sector_t or loff_t. Reviewed-by: Josef Bacik Signed-off-by: David Sterba commit c842268458d904c04f08259cc7ecee3870fa2746 Author: David Sterba Date: Tue Sep 15 21:44:52 2020 +0200 btrfs: add set/get accessors for root_item::drop_level The drop_level member is used directly unlike all the other int types in root_item. Add the definition and use it everywhere. The type is u8 so there's no conversion necessary and the helpers are properly inlined, this is for consistency. Reviewed-by: Josef Bacik Signed-off-by: David Sterba commit f944d2cb209674411280737d5fb660e98b8a8314 Author: David Sterba Date: Tue Sep 15 21:00:04 2020 +0200 btrfs: use root_item helpers for limit and flags in btrfs_create_tree For consistency use the available helpers to set flags and limit. Reviewed-by: Josef Bacik Signed-off-by: David Sterba commit 3b5418fba372c28511ebe9f83b5e26e8ab34b9f9 Author: David Sterba Date: Tue Sep 15 14:26:27 2020 +0200 btrfs: check-integrity: use proper helper to access btrfs_header There's one raw use of le->cpu conversion but we have a helper to do that for us, so use it. Reviewed-by: Josef Bacik Signed-off-by: David Sterba commit 09e3a28892a9598260fc44dc9be6b8cc3f56ded1 Author: David Sterba Date: Tue Sep 15 14:30:15 2020 +0200 btrfs: send: use helpers to access root_item::ctransid We have helpers to access the on-disk item members, use that for root_item::ctransid instead of raw le64_to_cpu. Reviewed-by: Josef Bacik Signed-off-by: David Sterba commit ab1405aa2522ae61958fc874432bce24d48942b1 Author: David Sterba Date: Tue Sep 29 14:56:39 2020 +0200 btrfs: generate lockdep keyset names at compile time The names in btrfs_lockdep_keysets are generated from a simple pattern using snprintf but we can generate them directly with some macro magic and remove the helpers. Reviewed-by: Josef Bacik Signed-off-by: David Sterba commit 387824afd7210376a577b3c3e2f74618e3ef43a4 Author: David Sterba Date: Tue Oct 27 15:54:08 2020 +0100 btrfs: use the right number of levels for lockdep keysets BTRFS_MAX_LEVEL is 8 and the keyset table is supposed to have a key for each level, but we'll never have more than 8 levels. The values passed to btrfs_set_buffer_lockdep_class are always derived from a valid extent buffer. Set the array sizes to the right value. Reviewed-by: Josef Bacik Signed-off-by: David Sterba commit ecfdc08b8cc65d737eebc26a1ee1875a097fd6a0 Author: Goldwyn Rodrigues Date: Thu Sep 24 11:39:21 2020 -0500 btrfs: remove dio iomap DSYNC workaround This effectively reverts 09745ff88d93 ("btrfs: dio iomap DSYNC workaround") now that the iomap API has been updated to allow iomap_dio_complete() not to be called under i_rwsem anymore. Reviewed-by: Josef Bacik Signed-off-by: Goldwyn Rodrigues Reviewed-by: David Sterba Signed-off-by: David Sterba commit a42fa643169d2325602572633fcaa16862990e28 Author: Goldwyn Rodrigues Date: Thu Sep 24 11:39:20 2020 -0500 btrfs: call iomap_dio_complete() without inode_lock If direct writes are called with O_DIRECT | O_DSYNC, it will result in a deadlock because iomap_dio_rw() is called under i_rwsem which calls: iomap_dio_complete() generic_write_sync() btrfs_sync_file() btrfs_sync_file() requires i_rwsem, so call __iomap_dio_rw() with the i_rwsem locked, and call iomap_dio_complete() after unlocking i_rwsem. Reviewed-by: Josef Bacik Signed-off-by: Goldwyn Rodrigues Signed-off-by: David Sterba commit 502756b380938022c848761837f8fa3976906aa1 Author: Goldwyn Rodrigues Date: Thu Sep 24 11:39:19 2020 -0500 btrfs: remove btrfs_inode::dio_sem The inode dio_sem can be eliminated because all DIO synchronization is now performed through inode->i_rwsem that provides the same guarantees. This reduces btrfs_inode size by 40 bytes. Reviewed-by: Josef Bacik Signed-off-by: Goldwyn Rodrigues Reviewed-by: David Sterba Signed-off-by: David Sterba commit e9adabb9712ef9424cbbeeaa027d962ab5262e19 Author: Goldwyn Rodrigues Date: Thu Sep 24 11:39:18 2020 -0500 btrfs: use shared lock for direct writes within EOF Direct writes within EOF are safe to be performed with inode shared lock to improve parallelization with other direct writes or reads because EOF is not changed and there is no race with truncate(). Direct reads are already performed under shared inode lock. This patch is precursor to removing btrfs_inode->dio_sem. Signed-off-by: Goldwyn Rodrigues Reviewed-by: David Sterba Signed-off-by: David Sterba commit c352370633400d13765cc88080c969799ea51108 Author: Goldwyn Rodrigues Date: Thu Sep 24 11:39:17 2020 -0500 btrfs: push inode locking and unlocking into buffered/direct write Push inode locking and unlocking closer to where we perform the I/O. For this we need to move the write checks inside the respective functions as well. pos is evaluated after generic_write_checks because O_APPEND can change iocb->ki_pos. Reviewed-by: Josef Bacik Signed-off-by: Goldwyn Rodrigues Reviewed-by: David Sterba Signed-off-by: David Sterba commit a14b78ad06aba0fa7e76d2bc13c5ba581a7f331a Author: Goldwyn Rodrigues Date: Thu Sep 24 11:39:16 2020 -0500 btrfs: introduce btrfs_inode_lock()/unlock() btrfs_inode_lock/unlock() are wrappers around inode locks, separating the type of lock and actual locking. - 0 - default, exclusive lock - BTRFS_ILOCK_SHARED - for shared locks, for possible parallel DIO - BTRFS_ILOCK_TRY - for the RWF_NOWAIT sequence The bits SHARED and TRY can be combined together. Reviewed-by: Josef Bacik Signed-off-by: Goldwyn Rodrigues Reviewed-by: David Sterba Signed-off-by: David Sterba commit b8d8e1fd570a194904f545b135efc880d96a41a4 Author: Goldwyn Rodrigues Date: Thu Sep 24 11:39:15 2020 -0500 btrfs: introduce btrfs_write_check() btrfs_write_check() checks write parameters in one place before beginning a write. This does away with inode_unlock() after every check. In the later patches, it will help push inode_lock/unlock() in buffered and direct write functions respectively. generic_write_checks needs to be called before as it could truncate iov_iter and its return used as count. Signed-off-by: Goldwyn Rodrigues Signed-off-by: David Sterba commit c86537a42f8661a26c96cbb32352b33cb57ac75c Author: Goldwyn Rodrigues Date: Thu Sep 24 11:39:14 2020 -0500 btrfs: check FS error state bit early during write fs_info::fs_state is a filesystem bit check as opposed to inode and can be performed before we begin with write checks. This eliminates inode lock/unlock in case the error bit is set. Reviewed-by: Josef Bacik Signed-off-by: Goldwyn Rodrigues Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5e8b9ef30392bb80f418cf4340b8c9c54039d5dc Author: Goldwyn Rodrigues Date: Thu Sep 24 11:39:13 2020 -0500 btrfs: move pos increment and pagecache extension to btrfs_buffered_write While we do this, correct the call to pagecache_isize_extended: - pagecache_isize_extended needs to be called to the start of the write as opposed to i_size - we don't need to check range before the call, this is done in the function Reviewed-by: Christoph Hellwig Reviewed-by: Josef Bacik Signed-off-by: Goldwyn Rodrigues Reviewed-by: David Sterba Signed-off-by: David Sterba commit 4e4cabece9f9c6b8dde8baf8f81e90222aa4989b Author: Goldwyn Rodrigues Date: Thu Sep 24 11:39:12 2020 -0500 btrfs: split btrfs_direct_IO to read and write The read and write DIO don't have anything in common except for the call to iomap_dio_rw. Extract the write call into a new function to get rid of conditional statements for direct write. Reviewed-by: Josef Bacik Signed-off-by: Goldwyn Rodrigues Reviewed-by: Christoph Hellwig Signed-off-by: David Sterba commit 3d8cc17a0561dc4c037ede4886d7975009075d6d Author: Anand Jain Date: Wed Oct 28 21:14:47 2020 +0800 btrfs: sysfs: add per-fs attribute for read policy Add /sys/fs/btrfs/UUID/read_policy attribute so that the read policy for the raid1, raid1c34 and raid10 can be tuned. When this attribute is read, it will show all available policies, with active policy in [ ]. The read_policy attribute can be written using one of the items listed in there. For example: $ cat /sys/fs/btrfs/UUID/read_policy [pid] $ echo pid > /sys/fs/btrfs/UUID/read_policy Reviewed-by: Josef Bacik Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit 33fd2f714cde793b337b4ca6aaf3a8c68675d74f Author: Anand Jain Date: Wed Oct 28 21:14:46 2020 +0800 btrfs: create read policy framework As of now, we use the pid method to read striped mirrored data, which means process id determines the stripe id to read. This type of routing typically helps in a system with many small independent processes tying to read random data. On the other hand, the pid based read IO policy is inefficient because if there is a single process trying to read a large file, the overall disk bandwidth remains underutilized. So this patch introduces a read policy framework so that we could add more read policies, such as IO routing based on the device's wait-queue or manual when we have a read-preferred device or a policy based on the target storage caching. Reviewed-by: Josef Bacik Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit aaefed207875a0f0c46c4a50dcd0aca0d56b9062 Author: Anand Jain Date: Wed Oct 28 21:14:45 2020 +0800 btrfs: add helper for string match ignoring leading/trailing whitespace Add a generic helper to match the string in a given buffer, and ignore the leading and trailing whitespace. Reviewed-by: Josef Bacik Signed-off-by: Anand Jain Reviewed-by: David Sterba [ rename variables, add comments ] Signed-off-by: David Sterba commit 88090ad36a64af1eb5b78d26b2ccd07eedae80b5 Author: Filipe Manana Date: Tue Oct 27 12:40:06 2020 +0000 btrfs: do not start and wait for delalloc on snapshot roots on transaction commit We do not need anymore to start writeback for delalloc of roots that are being snapshotted and wait for it to complete. This was done in commit 609e804d771f59 ("Btrfs: fix file corruption after snapshotting due to mix of buffered/DIO writes") to fix a type of file corruption where files in a snapshot end up having their i_size updated in a non-ordered way, leaving implicit file holes, when buffered IO writes that increase a file's size are followed by direct IO writes that also increase the file's size. This is not needed anymore because we now have a more generic mechanism to prevent a non-ordered i_size update since commit 9ddc959e802bf7 ("btrfs: use the file extent tree infrastructure"), which addresses this scenario involving snapshots as well. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 196d59ab9ccc975d8d29292845d227cdf4423ef8 Author: Josef Bacik Date: Thu Aug 20 11:46:09 2020 -0400 btrfs: switch extent buffer tree lock to rw_semaphore Historically we've implemented our own locking because we wanted to be able to selectively spin or sleep based on what we were doing in the tree. For instance, if all of our nodes were in cache then there's rarely a reason to need to sleep waiting for node locks, as they'll likely become available soon. At the time this code was written the rw_semaphore didn't do adaptive spinning, and thus was orders of magnitude slower than our home grown locking. However now the opposite is the case. There are a few problems with how we implement blocking locks, namely that we use a normal waitqueue and simply wake everybody up in reverse sleep order. This leads to some suboptimal performance behavior, and a lot of context switches in highly contended cases. The rw_semaphores actually do this properly, and also have adaptive spinning that works relatively well. The locking code is also a bit of a bear to understand, and we lose the benefit of lockdep for the most part because the blocking states of the lock are simply ad-hoc and not mapped into lockdep. So rework the locking code to drop all of this custom locking stuff, and simply use a rw_semaphore for everything. This makes the locking much simpler for everything, as we can now drop a lot of cruft and blocking transitions. The performance numbers vary depending on the workload, because generally speaking there doesn't tend to be a lot of contention on the btree. However, on my test system which is an 80 core single socket system with 256GiB of RAM and a 2TiB NVMe drive I get the following results (with all debug options off): dbench 200 baseline Throughput 216.056 MB/sec 200 clients 200 procs max_latency=1471.197 ms dbench 200 with patch Throughput 737.188 MB/sec 200 clients 200 procs max_latency=714.346 ms Previously we also used fs_mark to test this sort of contention, and those results are far less impressive, mostly because there's not enough tasks to really stress the locking fs_mark -d /d[0-15] -S 0 -L 20 -n 100000 -s 0 -t 16 baseline Average Files/sec: 160166.7 p50 Files/sec: 165832 p90 Files/sec: 123886 p99 Files/sec: 123495 real 3m26.527s user 2m19.223s sys 48m21.856s patched Average Files/sec: 164135.7 p50 Files/sec: 171095 p90 Files/sec: 122889 p99 Files/sec: 113819 real 3m29.660s user 2m19.990s sys 44m12.259s Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit ecdcf3c259e4c36ec6c81e7a807b4924be898b20 Author: Nikolay Borisov Date: Thu Oct 22 18:40:46 2020 +0300 btrfs: open code insert_orphan_item Just open code it in its sole caller and remove a level of indirection. Reviewed-by: Anand Jain Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9037d3cbcbe1ed9c409efe4d6d3efd893d7ff05e Author: Josef Bacik Date: Fri Oct 16 11:29:20 2020 -0400 btrfs: introduce mount option rescue=all Now that we have the building blocks for some better recovery options with corrupted file systems, add a rescue=all option to enable all of the relevant rescue options. This will allow distros to simply default to rescue=all for the "oh dear lord the world's on fire" recovery without needing to know all the different options that we have and may add in the future. Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 882dbe0cec9651bf6a6df500178149453726c1e1 Author: Josef Bacik Date: Fri Oct 16 11:29:19 2020 -0400 btrfs: introduce mount option rescue=ignoredatacsums There are cases where you can end up with bad data csums because of misbehaving applications. This happens when an application modifies a buffer in-flight when doing an O_DIRECT write. In order to recover the file we need a way to turn off data checksums so you can copy the file off, and then you can delete the file and restore it properly later. Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 42437a6386ffeaaf200731e73d723ea491f3fe7d Author: Josef Bacik Date: Fri Oct 16 11:29:18 2020 -0400 btrfs: introduce mount option rescue=ignorebadroots In the face of extent root corruption, or any other core fs wide root corruption we will fail to mount the file system. This makes recovery kind of a pain, because you need to fall back to userspace tools to scrape off data. Instead provide a mechanism to gracefully handle bad roots, so we can at least mount read-only and possibly recover data from the file system. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 68319c18cb21ab472ce2c4ed572257a42455ac01 Author: Josef Bacik Date: Fri Oct 16 11:29:17 2020 -0400 btrfs: show rescue=usebackuproot in /proc/mounts The standalone option usebackuproot was intended as one-time use and it was not necessary to keep it in the option list. Now that we're going to have more rescue options, it's desirable to keep them intact as it could be confusing why the option disappears. Signed-off-by: Josef Bacik Reviewed-by: David Sterba [ remove the btrfs_clear_opt part from open_ctree ] Signed-off-by: David Sterba commit ab0b4a3ebf145f54dc23b66a411f4bbbc59b0d96 Author: Josef Bacik Date: Fri Oct 16 11:29:16 2020 -0400 btrfs: add a helper to print out rescue= options We're going to have a lot of rescue options, add a helper to collapse the /proc/mounts output to rescue=option1:option2:option3 format. Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit ceafe3cc39923fc80b9091f3fd993e6de1b6a399 Author: Josef Bacik Date: Fri Oct 16 11:29:15 2020 -0400 btrfs: sysfs: export supported rescue= mount options We're going to be adding a variety of different rescue options, we should advertise which ones we support to make user spaces life easier in the future. Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 334c16d82cfe180f7b262a6f8ae2d9379f032b18 Author: Josef Bacik Date: Fri Oct 16 11:29:14 2020 -0400 btrfs: push the NODATASUM check into btrfs_lookup_bio_sums When we move to being able to handle NULL csum_roots it'll be cleaner to just check in btrfs_lookup_bio_sums instead of at all of the caller locations, so push the NODATASUM check into it as well so it's unified. Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit d70bf7484f728704454c0566814458bf6d6c7cf3 Author: Josef Bacik Date: Fri Oct 16 11:29:13 2020 -0400 btrfs: unify the ro checking for mount options We're going to be adding more options that require RDONLY, so add a helper to do the check and error out if we don't have RDONLY set. Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit a6889caf6ec6ec32f19a02a9118410f39fc84fe2 Author: Filipe Manana Date: Mon Oct 12 11:55:26 2020 +0100 btrfs: do not start readahead for csum tree when scrubbing non-data block groups When scrubbing a stripe of a block group we always start readahead for the checksums btree and wait for it to complete, however when the blockgroup is not a data block group (or a mixed block group) it is a waste of time to do it, since there are no checksums for metadata extents in that btree. So skip that when the block group does not have the data flag set, saving some time doing memory allocations, queueing a job in the readahead work queue, waiting for it to complete and potentially avoiding some IO as well (when csum tree extents are not in memory already). Reviewed-by: Johannes Thumshirn Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit a57ad681f12e1ec80365fc4693e12e979159b9d0 Author: Filipe Manana Date: Mon Oct 12 11:55:25 2020 +0100 btrfs: assert we are holding the reada_lock when releasing a readahead zone When we drop the last reference of a zone, we end up releasing it through the callback reada_zone_release(), which deletes the zone from a device's reada_zones radix tree. This tree is protected by the global readahead lock at fs_info->reada_lock. Currently all places that are sure that they are dropping the last reference on a zone, are calling kref_put() in a critical section delimited by this lock, while all other places that are sure they are not dropping the last reference, do not bother calling kref_put() while holding that lock. When working on the previous fix for hangs and use-after-frees in the readahead code, my initial attempts were different and I actually ended up having reada_zone_release() called when not holding the lock, which resulted in weird and unexpected problems. So just add an assertion there to detect such problem more quickly and make the dependency more obvious. Reviewed-by: Johannes Thumshirn Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit aa8c1a41a1e6108aa65c359efe90711337d03a16 Author: Goldwyn Rodrigues Date: Wed Oct 14 09:55:45 2020 -0500 btrfs: set EXTENT_NORESERVE bits side btrfs_dirty_pages() Set the extent bits EXTENT_NORESERVE inside btrfs_dirty_pages() as opposed to calling set_extent_bits again later. Fold check for written length within the function. Note: EXTENT_NORESERVE is set before unlocking extents. Reviewed-by: Nikolay Borisov Signed-off-by: Goldwyn Rodrigues Signed-off-by: David Sterba commit 13f0dd8f786152404fa5bc1f9436aad83556a311 Author: Goldwyn Rodrigues Date: Wed Oct 14 09:55:44 2020 -0500 btrfs: use round_down while calculating start position in btrfs_dirty_pages() round_down looks prettier than the bit mask operations. Reviewed-by: Nikolay Borisov Reviewed-by: Qu Wenruo Signed-off-by: Goldwyn Rodrigues Reviewed-by: David Sterba Signed-off-by: David Sterba commit 949b32732eab33018283e0517cc528be10a3d085 Author: Goldwyn Rodrigues Date: Tue Sep 15 10:41:40 2020 -0500 btrfs: use iosize while reading compressed pages While using compression, a submitted bio is mapped with a compressed bio which performs the read from disk, decompresses and returns uncompressed data to original bio. The original bio must reflect the uncompressed size (iosize) of the I/O to be performed, or else the page just gets the decompressed I/O length of data (disk_io_size). The compressed bio checks the extent map and gets the correct length while performing the I/O from disk. This came up in subpage work when only compressed length of the original bio was filled in the page. This worked correctly for pagesize == sectorsize because both compressed and uncompressed data are at pagesize boundaries, and would end up filling the requested page. Reviewed-by: Josef Bacik Signed-off-by: Goldwyn Rodrigues Reviewed-by: David Sterba Signed-off-by: David Sterba commit eefa45f593792827771cfd845ab12fea5a7c7cd9 Author: Goldwyn Rodrigues Date: Fri Sep 25 15:36:38 2020 -0500 btrfs: calculate num_pages, reserve_bytes once in btrfs_buffered_write write_bytes can change in btrfs_check_nocow_lock(). Calculate variables such as num_pages and reserve_bytes once we are sure of the value of write_bytes so there is no need to re-calculate. Reviewed-by: Josef Bacik Signed-off-by: Goldwyn Rodrigues Reviewed-by: David Sterba Signed-off-by: David Sterba commit fb8a7e941b1b4c1c2fa79b305d4c3fc41ad9bbda Author: Nikolay Borisov Date: Tue Oct 20 12:44:17 2020 +0300 btrfs: calculate more accurate remaining time to sleep in transaction_kthread If transaction_kthread is woken up before btrfs_fs_info::commit_interval seconds have elapsed it will sleep for a fixed period of 5 seconds. This is not a problem per-se but is not accurate. Instead the code should sleep for an interval which guarantees on next wakeup commit_interval would have passed. Since time tracking is not precise subtract 1 second from delta to ensure the delay we end up waiting will be longer than than the wake up period. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 643900bee4141e1b1c47dce93973a0d1a314d8a5 Author: Nikolay Borisov Date: Thu Oct 8 15:24:29 2020 +0300 btrfs: record delta directly in transaction_kthread Rename 'now' to 'delta' and store there the delta between transaction start time and current time. This is in preparation for optimising the sleep logic in the next patch. No functional changes. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit e4e428816192798c2fa473ff67d9032b94f93291 Author: Nikolay Borisov Date: Thu Oct 8 15:24:28 2020 +0300 btrfs: remove redundant time check in transaction kthread loop The value obtained from ktime_get_seconds() is guaranteed to be monotonically increasing since it's taken from CLOCK_MONOTONIC. As transaction_kthread obtains a reference to the currently running transaction under holding btrfs_fs_info::trans_lock it's guaranteed to: a) see an initialized 'cur', whose start_time is guaranteed to be smaller than 'now' or b) not obtain a 'cur' and simply go to sleep. Given this remove the unnecessary check, if it sees now < cur->start_time this would imply there are far greater problems on the machine. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit e1dd639e374a1345c63eb7e8931e08de7cb8f904 Author: Manivannan Sadhasivam Date: Tue Dec 8 17:44:01 2020 +0530 PCI: qcom: Add SM8250 SoC support The PCIe IP (rev 1.9.0) on SM8250 SoC is similar to the one used on SDM845. Hence the support is added reusing the members of ops_2_7_0. The key difference between ops_2_7_0 and ops_1_9_0 is the config_sid callback, which will be added in successive commit. Link: https://lore.kernel.org/r/20201208121402.178011-3-mani@kernel.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Reviewed-by: Bjorn Andersson commit 458168247cccd3b22d9d34805dfb0596c5502888 Author: Manivannan Sadhasivam Date: Tue Dec 8 17:44:00 2020 +0530 dt-bindings: pci: qcom: Document PCIe bindings for SM8250 SoC Document the PCIe DT bindings for SM8250 SoC. The PCIe IP is similar to the one used on SDM845, hence just add the compatible along with the optional "atu" register region. Link: https://lore.kernel.org/r/20201208121402.178011-2-mani@kernel.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Lorenzo Pieralisi Reviewed-by: Bjorn Andersson Acked-by: Rob Herring commit 75c75adce44f59e6878117d47ad63682c5e5ff87 Merge: f8394f232b1ea 7f575a6087f47 Author: Will Deacon Date: Tue Dec 8 14:45:10 2020 +0000 Merge branch 'for-next/iommu/arm-smmu' into for-next/iommu/core Arm SMMU updates for 5.11, including support for the SMMU integrated into the Adreno GPU as well as workarounds for the broken firmware implementation in the DB845c SoC from Qualcomm. * for-next/iommu/arm-smmu: iommu: arm-smmu-impl: Add a space before open parenthesis iommu: arm-smmu-impl: Use table to list QCOM implementations iommu/arm-smmu: Move non-strict mode to use io_pgtable_domain_attr iommu/arm-smmu: Add support for pagetable config domain attribute iommu/io-pgtable-arm: Add support to use system cache iommu/io-pgtable: Add a domain attribute for pagetable configuration dt-bindings: arm-smmu: Add compatible string for Adreno GPU SMMU iommu/arm-smmu: Add a way for implementations to influence SCTLR iommu/arm-smmu-qcom: Add implementation for the adreno GPU SMMU iommu/arm-smmu-v3: Assign boolean values to a bool variable iommu/arm-smmu: Use new devm_krealloc() iommu/arm-smmu-qcom: Implement S2CR quirk iommu/arm-smmu-qcom: Read back stream mappings iommu/arm-smmu: Allow implementation specific write_s2cr commit 78cb09078352d032b12e2af7feb9b5b7f0fa794c Author: Boris Kolpackov Date: Mon Nov 23 11:38:18 2020 +0200 kconfig: clean up header inclusion - Add missing includes. - Remove no longer necessary includes. Signed-off-by: Boris Kolpackov Signed-off-by: Masahiro Yamada commit f463269fb940d2a4259169b1e87aab8d259a9ec4 Author: Masahiro Yamada Date: Mon Nov 2 11:59:57 2020 +0900 kconfig: qconf: show Qt version in the About dialog You can get the Qt version by running "pkg-config --modversion Qt5Core" or something, but this might be useful to get the runtime Qt version more easily. Go to the menu "Help" -> "About", then you can see it. Signed-off-by: Masahiro Yamada commit 98ebea7ba891569c3678c5cd2fd1960098e84f4e Author: Boris Kolpackov Date: Thu Oct 29 17:51:51 2020 +0200 kconfig: make lkc.h self-sufficient #include-wise Signed-off-by: Boris Kolpackov Signed-off-by: Masahiro Yamada commit a2574c12df0d77eef293d2f388d7e05df33b6155 Author: Masahiro Yamada Date: Sat Oct 24 21:38:41 2020 +0900 kconfig: qconf: convert to Qt5 new signal/slot connection syntax Now that the Qt4 support was dropped, we can use the new connection syntax supported by Qt5. It provides compile-time checking of the validity of the connection. Previously, the connection between signals and slots were checked only run-time. Commit d85de3399f97 ("kconfig: qconf: fix signal connection to invalid slots") fixed wrong slots. This change makes it possible to catch such mistakes easily. Signed-off-by: Masahiro Yamada Tested-by: Boris Kolpackov commit 7cd0158703a4828252f10a4c4519778fa069ffdf Author: Masahiro Yamada Date: Sat Oct 24 21:38:40 2020 +0900 kconfig: qconf: use a variable to pass packages to pkg-config The variable, PKG, is defined at the beginning of this script. Signed-off-by: Masahiro Yamada commit 7b675649be2217786847dee13597a0ab8502cc40 Author: Masahiro Yamada Date: Sat Oct 24 21:38:39 2020 +0900 kconfig: qconf: drop Qt4 support It is possible to keep this compatible with both Qt4 and Qt5, but it is questionable if it is worth the efforts; it would require us to test this on both of them, and prevent us from using new features in Qt5. Qt5 was released in 2012, and now widely available. Drop the Qt4 support. Signed-off-by: Masahiro Yamada commit c93e4aeed1be5b99715a9127f5b38d6b4ab9e5d7 Author: Arnd Bergmann Date: Tue Nov 24 16:43:17 2020 +0100 Makefile.extrawarn: remove -Wnested-externs warning The -Wnested-externs warning has become useless with gcc, since this warns every time that BUILD_BUG_ON() or similar macros are used. With clang, the warning option does nothing to start with, so just remove it entirely. Suggested-by: Nathan Chancellor Signed-off-by: Arnd Bergmann Reviewed-by: Nathan Chancellor Signed-off-by: Masahiro Yamada commit c25ce589dca10d64dde139ae093abc258a32869c Author: Finn Behrens Date: Mon Nov 23 15:15:33 2020 +0100 tweewide: Fix most Shebang lines Change every shebang which does not need an argument to use /usr/bin/env. This is needed as not every distro has everything under /usr/bin, sometimes not even bash. Signed-off-by: Finn Behrens Signed-off-by: Masahiro Yamada commit 76347344c522da78be29403dda81463ffae2bc99 Author: Yash Shah Date: Tue Dec 8 10:25:34 2020 +0530 spi: Update DT binding docs to support SiFive FU740 SoC Add new compatible strings to the DT binding documents to support SiFive FU740-C000. Signed-off-by: Yash Shah Link: https://lore.kernel.org/r/1607403341-57214-3-git-send-email-yash.shah@sifive.com Signed-off-by: Mark Brown commit 8db06423e079b1f6c0657e5bebda0006acf75c3c Author: Dan Carpenter Date: Mon Dec 7 20:55:44 2020 +0300 regulator: da9121: Potential Oops in da9121_assign_chip_model() There is a missing "return ret;" on this error path so we call "da9121_check_device_type(i2c, chip);" which will end up dereferencing "chip->regmap" and lead to an Oops. Fixes: c860476b9e3a ("regulator: da9121: Add device variant regmaps") Signed-off-by: Dan Carpenter Acked-by: Adam Ward Link: https://lore.kernel.org/r/X85soGKnWAjPUA7a@mwanda Signed-off-by: Mark Brown commit 0d024a8bec084205fdd9fa17479ba91f45f85db3 Author: Takashi Iwai Date: Tue Dec 8 14:51:54 2020 +0100 ASoC: cx2072x: Fix doubly definitions of Playback and Capture streams The cx2072x codec driver defines multiple DAIs with the same stream name "Playback" and "Capture". Although the current code works more or less as is as the secondary streams are never used, it still leads the error message like: debugfs: File 'Playback' in directory 'dapm' already present! debugfs: File 'Capture' in directory 'dapm' already present! Fix it by renaming the secondary streams to unique names. Fixes: a497a4363706 ("ASoC: Add support for Conexant CX2072X CODEC") Cc: Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20201208135154.9188-1-tiwai@suse.de Signed-off-by: Mark Brown commit 6a5f850aa83a1d844d27e3e53ca2f247e55d438b Author: Shengjiu Wang Date: Sun Dec 6 18:41:59 2020 +0800 ASoC: fsl: Add imx-hdmi machine driver The driver is initially designed for sound card using HDMI interface on i.MX platform. There is internal HDMI IP or external HDMI modules connect with SAI or AUD2HTX interface. It supports both transmitter and receiver devices. Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/1607251319-5821-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit e344cf5e4871f99495396f78d4401b8ac4c92465 Author: Shengjiu Wang Date: Sun Dec 6 18:41:58 2020 +0800 ASoC: dt-bindings: imx-hdmi: Add binding doc for hdmi machine driver Imx-hdmi is a new added machine driver for supporting hdmi devices on i.MX platforms. There is HDMI IP or external HDMI modules connect with SAI or AUD2HTX interface. Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1607251319-5821-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 748e72e869718db8d735d773040bce95158c98c6 Author: Hans de Goede Date: Sun Dec 6 13:24:36 2020 +0100 ASoC: Intel: cht_bsw_nau8824: Change SSP2-Codec DAI id to 0 The snd-soc-sst-acpi driver does not care about the id specified for the SSP2-Codec DAI, but it does matter for the snd-sof-acpi driver; and when it is not 0 then the snd-sof-acpi driver does not work. Set the SSP2-Codec DAI id to 0, fixing the snd-sof-acpi driver not working on devices using the cht_bsw_nau8824 machine-driver. Signed-off-by: Hans de Goede Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20201206122436.13553-3-hdegoede@redhat.com Signed-off-by: Mark Brown commit e60ffc48fac4b6ba8f3ec500bd166909f3db03c3 Author: Hans de Goede Date: Sun Dec 6 13:24:35 2020 +0100 ASoC: Intel: cht_bsw_nau8824: Drop compress-cpu-dai bits When using the snd-soc-sst-acpi driver then the compress-cpu-dai bits are not used, the cht_bsw_nau8824 machine-driver is the only BYT/CHT driver defining them. When using the snd-sof-acpi driver then the presence of the compress-cpu-dai bits breaks things because the sof topology file for by/cht devices does not contain routing info for them. Drop the compress-cpu-dai bits, fixing the snd-sof-acpi driver not working on devices using the cht_bsw_nau8824 machine-driver. Signed-off-by: Hans de Goede Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20201206122436.13553-2-hdegoede@redhat.com Signed-off-by: Mark Brown commit 176cfc187c24287a363e7612cd2385ba40c2042b Author: John Garry Date: Fri Dec 4 02:34:52 2020 +0800 iommu: Stop exporting free_iova_mem() It has no user outside iova.c Signed-off-by: John Garry Link: https://lore.kernel.org/r/1607020492-189471-4-git-send-email-john.garry@huawei.com Signed-off-by: Will Deacon commit 51b70b817b187e48155fc492adb9ce80bdb21b70 Author: John Garry Date: Fri Dec 4 02:34:51 2020 +0800 iommu: Stop exporting alloc_iova_mem() It is not used outside iova.c Signed-off-by: John Garry Link: https://lore.kernel.org/r/1607020492-189471-3-git-send-email-john.garry@huawei.com Signed-off-by: Will Deacon commit 2f24dfb71208eeb0174f08dd56ca6d3c17b279a5 Author: John Garry Date: Fri Dec 4 02:34:50 2020 +0800 iommu: Delete split_and_remove_iova() Function split_and_remove_iova() has not been referenced since commit e70b081c6f37 ("iommu/vt-d: Remove IOVA handling code from the non-dma_ops path"), so delete it. Signed-off-by: John Garry Link: https://lore.kernel.org/r/1607020492-189471-2-git-send-email-john.garry@huawei.com Signed-off-by: Will Deacon commit d89886eb76f601b6cd78f96a1cebee073d12bf58 Author: Jon Hunter Date: Tue Nov 24 12:18:42 2020 +0000 dt-bindings: Correct GV11B GPU register sizes Commit 90a09178f309 ("dt-bindings: Add documentation for GV11B GPU") added the GV11B GPU device-tree bindings information but incorrectly added an additional 0 to the size of the addresses in the example. Fixes: 90a09178f309 ("dt-bindings: Add documentation for GV11B GPU") Acked-by: Thierry Reding Signed-off-by: Jon Hunter Link: https://lore.kernel.org/r/20201124121842.1037035-1-jonathanh@nvidia.com Signed-off-by: Rob Herring commit 1e95c81104e32e9f46b5a6085fee7e6ced25cad9 Author: Joel Stanley Date: Thu Nov 19 18:02:30 2020 +1030 dt-bindings: vendor-prefixes: Add FII Adds Foxconn Industrial Internet, who have submitted a BMC device tree. Reviewed-by: Benjamin Fair Signed-off-by: Joel Stanley Link: https://lore.kernel.org/r/20201119073230.123888-1-joel@jms.id.au Signed-off-by: Rob Herring commit f37eb48466d2ef4de33207f7389716d1734d9710 Author: Kunkun Jiang Date: Mon Dec 7 20:01:50 2020 +0800 iommu/io-pgtable-arm: Remove unused 'level' parameter from iopte_type() macro The 'level' parameter to the iopte_type() macro is unused, so remove it. Signed-off-by: Kunkun Jiang Link: https://lore.kernel.org/r/20201207120150.1891-1-jiangkunkun@huawei.com Signed-off-by: Will Deacon commit f12e0d22903e8fb653168efa67ae3308712ea97e Author: Keqian Zhu Date: Mon Dec 7 19:57:58 2020 +0800 iommu: Defer the early return in arm_(v7s/lpae)_map Although handling a mapping request with no permissions is a trivial no-op, defer the early return until after the size/range checks so that we are consistent with other mapping requests. Signed-off-by: Keqian Zhu Link: https://lore.kernel.org/r/20201207115758.9400-1-zhukeqian1@huawei.com Signed-off-by: Will Deacon commit c0bc969c176b10598b31d5d1a5edf9a5261f0a9f Author: Carl Philipp Klemm Date: Mon Dec 7 20:58:01 2020 +0100 ARM: omap2: pmic-cpcap: fix maximum voltage to be consistent with defaults on xt875 xt875 comes up with a iva voltage of 1375000 and android runs at this too. fix maximum voltage to be consistent with this. Signed-off-by: Carl Philipp Klemm Signed-off-by: Tony Lindgren commit b097efba9580d1f7cbc80cda84e768983e3de541 Author: Colin Ian King Date: Mon Dec 7 15:09:37 2020 +0000 drm/mediatek: avoid dereferencing a null hdmi_phy on an error message Currently there is a null pointer check for hdmi_phy that implies it may be null, however a dev_err messages dereferences this potential null pointer. Avoid a null pointer dereference by only emitting the dev_err message if hdmi_phy is non-null. It is a moot point if the error message needs to be printed at all, but since this is a relatively new piece of code it may be useful to keep the message in for the moment in case there are unforseen errors that need to be reported. Fixes: be28b6507c46 ("drm/mediatek: separate hdmi phy to different file") Signed-off-by: Colin Ian King Addresses-Coverity: ("Dereference after null check") Link: https://lore.kernel.org/r/20201207150937.170435-1-colin.king@canonical.com [vkoul: fix indent of return call] Signed-off-by: Vinod Koul commit 3d411378019425a891901f3c2c96674ea0c3f18b Merge: 08a02f954b0de db0746e3399ee Author: Greg Kroah-Hartman Date: Tue Dec 8 13:41:45 2020 +0100 Merge tag 'thunderbolt-for-v5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-next Mika writes: thunderbolt: Changes for v5.11 merge window This includes following Thunderbolt/USB4 changes for v5.11 merge window: * DMA traffic test driver * USB4 router NVM upgrade improvements * USB4 router operations proxy implementation available in the recent Intel Connection Manager firmwares * Support for Intel Maple Ridge discrete Thunderbolt 4 controller * A couple of cleanups and minor improvements. * tag 'thunderbolt-for-v5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: (22 commits) thunderbolt: Add support for Intel Maple Ridge thunderbolt: Add USB4 router operation proxy for firmware connection manager thunderbolt: Move constants for USB4 router operations to tb_regs.h thunderbolt: Add connection manager specific hooks for USB4 router operations thunderbolt: Pass TX and RX data directly to usb4_switch_op() thunderbolt: Pass metadata directly to usb4_switch_op() thunderbolt: Perform USB4 router NVM upgrade in two phases thunderbolt: Return -ENOTCONN when ERR_CONN is received thunderbolt: Keep the parent runtime resumed for a while on device disconnect thunderbolt: Log adapter numbers in decimal in path activation/deactivation thunderbolt: Log which connection manager implementation is used thunderbolt: Move max_boot_acl field to correct place in struct icm MAINTAINERS: Add Isaac as maintainer of Thunderbolt DMA traffic test driver thunderbolt: Add DMA traffic test driver thunderbolt: Add support for end-to-end flow control thunderbolt: Make it possible to allocate one directional DMA tunnel thunderbolt: Create debugfs directory automatically for services thunderbolt: Add functions for enabling and disabling lane bonding on XDomain thunderbolt: Add link_speed and link_width to XDomain thunderbolt: Create XDomain devices for loops back to the host ... commit 1dfd7b7849ea8bdbbe26d280d7b43c4ae66e730f Author: Vinod Koul Date: Tue Dec 8 10:23:00 2020 +0530 phy: ingenic: depend on HAS_IOMEM The driver uses devm_ioremap_resource() which will not be built if CONFIG_HAS_IOMEM is not selected, so add depends on it to fix the build failure on few archs s390-linux-ld: drivers/phy/ingenic/phy-ingenic-usb.o: in function `ingenic_usb_phy_probe': >> phy-ingenic-usb.c:(.text+0xb66): undefined reference to `devm_platform_ioremap_resource' Reported-by: kernel test robot Link: https://lore.kernel.org/r/20201208045300.3637026-1-vkoul@kernel.org Signed-off-by: Vinod Koul commit db972a3787d12b1ce9ba7a31ec376d8a79e04c47 Author: Christophe Leroy Date: Tue Dec 8 05:24:19 2020 +0000 powerpc/powermac: Fix low_sleep_handler with CONFIG_VMAP_STACK low_sleep_handler() can't restore the context from standard stack because the stack can hardly be accessed with MMU OFF. Store everything in a global storage area instead of storing a pointer to the stack in that global storage area. To avoid a complete churn of the function, still use r1 as the pointer to the storage area during restore. Fixes: cd08f109e262 ("powerpc/32s: Enable CONFIG_VMAP_STACK") Reported-by: Giuseppe Sacco Signed-off-by: Christophe Leroy Tested-by: Giuseppe Sacco Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/e3e0d8042a3ba75cb4a9546c19c408b5b5b28994.1607404931.git.christophe.leroy@csgroup.eu commit f8a4b277c3cf39ec8efe50114924a7743cc84800 Author: Colin Ian King Date: Mon Dec 7 15:54:20 2020 +0000 powerpc: fix spelling mistake in Kconfig "seleted" -> "selected" There is a spelling mistake in the help text of the Kconfig. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201207155420.172370-1-colin.king@canonical.com commit 2efd7f6eb9b7107e469837d8452e750d7d080a5d Author: Nathan Lynch Date: Mon Dec 7 15:52:00 2020 -0600 powerpc/pseries/mobility: refactor node lookup during DT update In pseries_devicetree_update(), with each call to ibm,update-nodes the partition firmware communicates the node to be deleted or updated by placing its phandle in the work buffer. Each of delete_dt_node(), update_dt_node(), and add_dt_node() have duplicate lookups using the phandle value and corresponding refcount management. Move the lookup and of_node_put() into pseries_devicetree_update(), and emit a warning on any failed lookups. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201207215200.1785968-29-nathanl@linux.ibm.com commit 87b57ea7e109520d3c6dfb01671a0cb134d3ccff Author: Nathan Lynch Date: Mon Dec 7 15:51:59 2020 -0600 powerpc/rtas: remove unused rtas_suspend_me_data All code which used this type has been removed. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201207215200.1785968-28-nathanl@linux.ibm.com commit d102f8312e1ea5e8bf84fceebf99186f22d16fc6 Author: Nathan Lynch Date: Mon Dec 7 15:51:58 2020 -0600 powerpc/pseries/hibernation: remove prepare_late() callback The pseries hibernate code no longer calls into the original join/suspend code in kernel/rtas.c, so pseries_prepare_late() and related code don't accomplish anything now. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201207215200.1785968-27-nathanl@linux.ibm.com commit fa53bcdb7413e7c40170106781f6b5bb9d74db84 Author: Nathan Lynch Date: Mon Dec 7 15:51:57 2020 -0600 powerpc/pseries/hibernation: perform post-suspend fixups later The pseries hibernate code calls post_mobility_fixup() which is sort of a dumping ground of fixups that need to run after resuming from suspend regardless of whether suspend was a hibernation or a migration. Calling post_mobility_fixup() from pseries_suspend_enable_irqs() runs this code early in resume with devices suspended and only one CPU up, while the much more commonly used migration case runs these fixups in a more typical process context. Call post_mobility_fixup() after the suspend core returns a success status to the hibernate sysfs store method and remove pseries_suspend_enable_irqs(). Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201207215200.1785968-26-nathanl@linux.ibm.com commit b866459489fe8ef0e92cde3cbd6bbb1af6c4e99b Author: Nathan Lynch Date: Mon Dec 7 15:51:56 2020 -0600 powerpc/pseries/hibernation: remove redundant cacheinfo update Partitions with cache nodes in the device tree can encounter the following warning on resume: CPU 0 already accounted in PowerPC,POWER9@0(Data) WARNING: CPU: 0 PID: 3177 at arch/powerpc/kernel/cacheinfo.c:197 cacheinfo_cpu_online+0x640/0x820 These calls to cacheinfo_cpu_offline/online have been redundant since commit e610a466d16a ("powerpc/pseries/mobility: rebuild cacheinfo hierarchy post-migration"). Fixes: e610a466d16a ("powerpc/pseries/mobility: rebuild cacheinfo hierarchy post-migration") Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201207215200.1785968-25-nathanl@linux.ibm.com commit 1b2488176ea56e299d2b084772daeb5ecbfc16d1 Author: Nathan Lynch Date: Mon Dec 7 15:51:55 2020 -0600 powerpc/rtas: remove unused rtas_suspend_last_cpu() rtas_suspend_last_cpu() is now unused, remove it and __rtas_suspend_last_cpu() which also becomes unused. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201207215200.1785968-24-nathanl@linux.ibm.com commit 366fb13bf13b029c4d43bf19382f7aea69bfa4b7 Author: Nathan Lynch Date: Mon Dec 7 15:51:54 2020 -0600 powerpc/pseries/hibernation: switch to rtas_ibm_suspend_me() rtas_suspend_last_cpu() and related code perform a lot of work that isn't relevant to the hibernation workflow. All other CPUs are offline when called so there is no need to place them in H_JOIN or prod them on resume, nor is there need for retries or operations on shared state. Call the rtas_ibm_suspend_me() wrapper function directly from pseries_suspend_enter() instead of using rtas_suspend_last_cpu(). Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201207215200.1785968-23-nathanl@linux.ibm.com commit 395b2c090907975c627902ba8fda0bdb04c7cad3 Author: Nathan Lynch Date: Mon Dec 7 15:51:53 2020 -0600 powerpc/rtas: remove rtas_suspend_cpu() rtas_suspend_cpu() no longer has users; remove it and __rtas_suspend_cpu() which now becomes unused as well. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201207215200.1785968-22-nathanl@linux.ibm.com commit 796f9247b4fa9bec320d6b47ffde2ecf86cc71c0 Author: Nathan Lynch Date: Mon Dec 7 15:51:52 2020 -0600 powerpc/machdep: remove suspend_disable_cpu() There are no users left of the suspend_disable_cpu() callback, remove it. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201207215200.1785968-21-nathanl@linux.ibm.com commit ed22bb8d39fa7f3980afc6e16d2a891847367d33 Author: Nathan Lynch Date: Mon Dec 7 15:51:51 2020 -0600 powerpc/pseries/hibernation: remove pseries_suspend_cpu() Since commit 48f6e7f6d948 ("powerpc/pseries: remove cede offline state for CPUs"), ppc_md.suspend_disable_cpu() is no longer used and all CPUs (save one) are placed into true offline state as opposed to H_JOIN. So pseries_suspend_cpu() is effectively unused; remove it. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201207215200.1785968-20-nathanl@linux.ibm.com commit a10a5a17f4ac4f84fcc26162d43b53e2a4e1009a Author: Nathan Lynch Date: Mon Dec 7 15:51:50 2020 -0600 powerpc/pseries/hibernation: pass stream id via function arguments There is no need for the stream id to be a file-global variable; pass it from hibernate_store() to pseries_suspend_begin() for the H_VASI_STATE call. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201207215200.1785968-19-nathanl@linux.ibm.com commit 52719fce3f4c7a8ac9eaa191e8d75a697f9fbcbc Author: Nathan Lynch Date: Mon Dec 7 15:51:49 2020 -0600 powerpc/pseries/hibernation: drop pseries_suspend_begin() from suspend ops There are three ways pseries_suspend_begin() can be reached: 1. When "mem" is written to /sys/power/state: kobj_attr_store() -> state_store() -> pm_suspend() -> suspend_devices_and_enter() -> pseries_suspend_begin() This never works because there is no way to supply a valid stream id using this interface, and H_VASI_STATE is called with a stream id of zero. So this call path is useless at best. 2. When a stream id is written to /sys/devices/system/power/hibernate. pseries_suspend_begin() is polled directly from store_hibernate() until the stream is in the "Suspending" state (i.e. the platform is ready for the OS to suspend execution): dev_attr_store() -> store_hibernate() -> pseries_suspend_begin() 3. When a stream id is written to /sys/devices/system/power/hibernate (continued). After #2, pseries_suspend_begin() is called once again from the pm core: dev_attr_store() -> store_hibernate() -> pm_suspend() -> suspend_devices_and_enter() -> pseries_suspend_begin() This is redundant because the VASI suspend state is already known to be Suspending. The begin() callback of platform_suspend_ops is optional, so we can simply remove that assignment with no loss of function. Fixes: 32d8ad4e621d ("powerpc/pseries: Partition hibernation support") Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201207215200.1785968-18-nathanl@linux.ibm.com commit 5f6665e400569de479733677e77862542aebb6cc Author: Nathan Lynch Date: Mon Dec 7 15:51:48 2020 -0600 powerpc/rtas: remove rtas_ibm_suspend_me_unsafe() rtas_ibm_suspend_me_unsafe() is now unused; remove it and rtas_percpu_suspend_me() which becomes unused as a result. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201207215200.1785968-17-nathanl@linux.ibm.com commit 4d756894ba75f1afe7945ccafe9afebff50484b6 Author: Nathan Lynch Date: Mon Dec 7 15:51:47 2020 -0600 powerpc/rtas: dispatch partition migration requests to pseries sys_rtas() cannot call ibm,suspend-me directly in the same way it handles other inputs. Instead it must dispatch the request to code that can first perform the H_JOIN sequence before any call to ibm,suspend-me can succeed. Over time kernel/rtas.c has accreted a fair amount of platform-specific code to implement this. Since a different, more robust implementation of the suspend sequence is now in the pseries platform code, we want to dispatch the request there. Note that invoking ibm,suspend-me via the RTAS syscall is all but deprecated; this change preserves ABI compatibility for old programs while providing to them the benefit of the new partition suspend implementation. This is a behavior change in that the kernel performs the device tree update and firmware activation before returning, but experimentation indicates this is tolerated fine by legacy user space. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201207215200.1785968-16-nathanl@linux.ibm.com commit aeca35b9a52b0e0d019a5244fbaab699f753b443 Author: Nathan Lynch Date: Mon Dec 7 15:51:46 2020 -0600 powerpc/pseries/mobility: retry partition suspend after error This is a mitigation for the relatively rare occurrence where a virtual IOA can be in a transient state that prevents the suspend/migration from succeeding, resulting in an error from ibm,suspend-me. If the join/suspend sequence returns an error, it is acceptable to retry as long as the VASI suspend session state is still "Suspending" (i.e. the platform is still waiting for the OS to suspend). Retry a few times on suspend failure while this condition holds, progressively increasing the delay between attempts. We don't want to retry indefinitey because firmware emits an error log event on each unsuccessful attempt. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201207215200.1785968-15-nathanl@linux.ibm.com commit 37cddc7d6cf4568a7fb69aeff6f26e4c8a3bc0f7 Author: Nathan Lynch Date: Mon Dec 7 15:51:45 2020 -0600 powerpc/pseries/mobility: signal suspend cancellation to platform If we're returning an error to user space, use H_VASI_SIGNAL to send a cancellation request to the platform. This isn't strictly required but it communicates that Linux will not attempt to complete the suspend, which allows the various entities involved to promptly end the operation in progress. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201207215200.1785968-14-nathanl@linux.ibm.com commit 9327dc0aeef36a3cbb9d94f79b79cc4f91ff8a41 Author: Nathan Lynch Date: Mon Dec 7 15:51:44 2020 -0600 powerpc/pseries/mobility: use stop_machine for join/suspend The partition suspend sequence as specified in the platform architecture requires that all active processor threads call H_JOIN, which: - suspends the calling thread until it is the target of an H_PROD; or - immediately returns H_CONTINUE, if the calling thread is the last to call H_JOIN. This thread is expected to call ibm,suspend-me to completely suspend the partition. Upon returning from ibm,suspend-me the calling thread must wake all others using H_PROD. rtas_ibm_suspend_me_unsafe() uses on_each_cpu() to implement this protocol, but because of its synchronizing nature this is susceptible to deadlock versus users of stop_machine() or other callers of on_each_cpu(). Not only is stop_machine() intended for use cases like this, it handles error propagation and allows us to keep the data shared between CPUs minimal: a single atomic counter which ensures exactly one CPU will wake the others from their joined states. Switch the migration code to use stop_machine() and a less complex local implementation of the H_JOIN/ibm,suspend-me logic, which carries additional benefits: - more informative error reporting, appropriately ratelimited - resets the lockup detector / watchdog on resume to prevent lockup warnings when the OS has been suspended for a time exceeding the threshold. Fixes: 91dc182ca6e2 ("[PATCH] powerpc: special-case ibm,suspend-me RTAS call") Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201207215200.1785968-13-nathanl@linux.ibm.com commit d9213319b84ee8393475c38361c84151d5c33415 Author: Nathan Lynch Date: Mon Dec 7 15:51:43 2020 -0600 powerpc/pseries/mobility: extract VASI session polling logic The behavior of rtas_ibm_suspend_me_unsafe() is to return -EAGAIN to the caller until the specified VASI suspend session state makes the transition from H_VASI_ENABLED to H_VASI_SUSPENDING. In the interest of separating concerns to prepare for a new implementation of the join/suspend sequence, extract VASI session polling logic into a couple of local functions. Waiting for the session state to reach H_VASI_SUSPENDING before calling rtas_ibm_suspend_me_unsafe() ensures that we will never get an EAGAIN result necessitating a retry. No user-visible change in behavior is intended. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201207215200.1785968-12-nathanl@linux.ibm.com commit c3ae9781d5a64093f161e6cc5dfefb0773106ca9 Author: Nathan Lynch Date: Mon Dec 7 15:51:42 2020 -0600 powerpc/pseries/mobility: use rtas_activate_firmware() on resume It's incorrect to abort post-suspend processing if ibm,activate-firmware isn't available. Use rtas_activate_firmware(), which logs this condition appropriately and allows us to proceed. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201207215200.1785968-11-nathanl@linux.ibm.com commit 2d5be6f16c4ba5c27d06704976daf55f3236a236 Author: Nathan Lynch Date: Mon Dec 7 15:51:41 2020 -0600 powerpc/pseries/mobility: error message improvements - Convert printk(KERN_ERR) to pr_err(). - Include errno in property update failure message. - Remove reference to "Post-mobility" from device tree update message: with pr_err() it will have a "mobility:" prefix. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201207215200.1785968-10-nathanl@linux.ibm.com commit aa5e5c9b556a2e5f68a915e4b5dfa5c6bda47c64 Author: Nathan Lynch Date: Mon Dec 7 15:51:40 2020 -0600 powerpc/pseries/mobility: add missing break to default case update_dt_node() has a switch statement where the default case lacks a break statement. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201207215200.1785968-9-nathanl@linux.ibm.com commit b06a6717873560e9dd1c07357781fc2b27545701 Author: Nathan Lynch Date: Mon Dec 7 15:51:39 2020 -0600 powerpc/pseries/mobility: don't error on absence of ibm, update-nodes Treat the absence of the ibm,update-nodes function as benign instead of reporting an error. If the platform does not provide that facility, it's not a problem for Linux. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201207215200.1785968-8-nathanl@linux.ibm.com commit 9bae89f528c041f3117f0a6c21878dda5a55af60 Author: Nathan Lynch Date: Mon Dec 7 15:51:38 2020 -0600 powerpc/hvcall: add token and codes for H_VASI_SIGNAL H_VASI_SIGNAL can be used by a partition to request cancellation of its migration. To be used in future changes. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201207215200.1785968-7-nathanl@linux.ibm.com commit 5f485a66f4d0693a535e4ab38ffc3538716d2c2b Author: Nathan Lynch Date: Mon Dec 7 15:51:37 2020 -0600 powerpc/rtas: add rtas_activate_firmware() Provide a documented wrapper function for the ibm,activate-firmware service, which must be called after a partition migration or hibernation. If the function is absent or the call fails, the OS will continue to run normally with the current firmware, so there is no need to perform any recovery. Just log it and continue. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201207215200.1785968-6-nathanl@linux.ibm.com commit 701ba68342412ae9be99a7c7f3badebf95271403 Author: Nathan Lynch Date: Mon Dec 7 15:51:36 2020 -0600 powerpc/rtas: add rtas_ibm_suspend_me() Now that the name is available, provide a simple wrapper for ibm,suspend-me which returns both a Linux errno and optionally the actual RTAS status to the caller. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201207215200.1785968-5-nathanl@linux.ibm.com commit 7049b288ea8c95f270ec8fe643e3c3187938d5af Author: Nathan Lynch Date: Mon Dec 7 15:51:35 2020 -0600 powerpc/rtas: rtas_ibm_suspend_me -> rtas_ibm_suspend_me_unsafe The pseries partition suspend sequence requires that all active CPUs call H_JOIN, which suspends all but one of them with interrupts disabled. The "chosen" CPU is then to call ibm,suspend-me to complete the suspend. Upon returning from ibm,suspend-me, the chosen CPU is to use H_PROD to wake the joined CPUs. Using on_each_cpu() for this, as rtas_ibm_suspend_me() does to implement partition migration, is susceptible to deadlock with other users of on_each_cpu() and with users of stop_machine APIs. The callback passed to on_each_cpu() is not allowed to synchronize with other CPUs in the way it is used here. Complicating the fix is the fact that rtas_ibm_suspend_me() also occupies the function name that should be used to provide a more conventional wrapper for ibm,suspend-me. Rename rtas_ibm_suspend_me() to rtas_ibm_suspend_me_unsafe() to free up the name and indicate that it should not gain users. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201207215200.1785968-4-nathanl@linux.ibm.com commit 970e453ea4ecdd7a16a46c229294547148d1c7b6 Author: Nathan Lynch Date: Mon Dec 7 15:51:34 2020 -0600 powerpc/rtas: complete ibm,suspend-me status codes We don't completely account for the possible return codes for ibm,suspend-me. Add definitions for these. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201207215200.1785968-3-nathanl@linux.ibm.com commit de0f7349a0dd072e54b5fc04c305907b22d28a5f Author: Nathan Lynch Date: Mon Dec 7 15:51:33 2020 -0600 powerpc/rtas: prevent suspend-related sys_rtas use on LE While drmgr has had work in some areas to make its RTAS syscall interactions endian-neutral, its code for performing partition migration via the syscall has never worked on LE. While it is able to complete ibm,suspend-me successfully, it crashes when attempting the subsequent ibm,update-nodes call. drmgr is the only known (or plausible) user of ibm,suspend-me, ibm,update-nodes, and ibm,update-properties, so allow them only in big-endian configurations. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201207215200.1785968-2-nathanl@linux.ibm.com commit 475c8749d9542392d7e0855097d29ed14877ad0a Author: Aneesh Kumar K.V Date: Tue Dec 8 08:45:39 2020 +0530 powerpc/book3s64/kuap: Improve error reporting with KUAP This partially reverts commit eb232b162446 ("powerpc/book3s64/kuap: Improve error reporting with KUAP") and update the fault handler to print [ 55.022514] Kernel attempted to access user page (7e6725b70000) - exploit attempt? (uid: 0) [ 55.022528] BUG: Unable to handle kernel data access on read at 0x7e6725b70000 [ 55.022533] Faulting instruction address: 0xc000000000e8b9bc [ 55.022540] Oops: Kernel access of bad area, sig: 11 [#1] .... when the kernel access userspace address without unlocking AMR. bad_kuap_fault() is added as part of commit 5e5be3aed230 ("powerpc/mm: Detect bad KUAP faults") to catch userspace access incorrectly blocked by AMR. Hence retain the full stack dump there even with hash translation. Also, add a comment explaining the difference between hash and radix. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201208031539.84878-1-aneesh.kumar@linux.ibm.com commit 7067be7059e8edc186474db9727c519da886a1ce Author: Alex Hung Date: Mon Dec 7 19:06:20 2020 -0700 platform/x86: intel-hid: add Rocket Lake ACPI device ID Rocket Lake has a new ACPI ID for Intel HID event filter device. Signed-off-by: Alex Hung Link: https://lore.kernel.org/r/20201208020620.101455-1-alex.hung@canonical.com Signed-off-by: Hans de Goede commit aa8994fbf2a01c91518f48848fa657d915ba046b Author: Carlo Caione Date: Tue Dec 8 14:11:11 2020 +0800 x86/platform: classmate-laptop: add WiFi media button The WiFi media button on the Quanta NL3 reports keycodes 0x8b and 0x9b to the platform driver. Add the mapping to support these codes. Signed-off-by: Carlo Caione Reviewed-by: Chris Chiu Link: https://lore.kernel.org/r/20201208061111.29073-1-chiu@endlessos.org Signed-off-by: Hans de Goede commit e64ab473dddaffdfc4bd0b385204f472f2cb00d6 Author: Nicolas Pitre Date: Mon Nov 30 22:42:36 2020 +0100 ARM: 9034/1: __div64_32(): straighten up inline asm constraints The ARM version of __div64_32() encapsulates a call to __do_div64 with non-standard argument passing. In particular, __n is a 64-bit input argument assigned to r0-r1 and __rem is an output argument sharing half of that r0-r1 register pair. With __n being an input argument, the compiler is in its right to presume that r0-r1 would still hold the value of __n past the inline assembly statement. Normally, the compiler would have assigned non overlapping registers to __n and __rem if the value for __n is needed again. However, here we enforce our own register assignment and gcc fails to notice the conflict. In practice this doesn't cause any problem as __n is considered dead after the asm statement and *n is overwritten. However this is not always guaranteed and clang rightfully complains. Let's fix it properly by making __n into an input-output variable. This makes it clear that those registers representing __n have been modified. Then we can extract __rem as the high part of __n with plain C code. This asm constraint "abuse" was likely relied upon back when gcc didn't handle 64-bit values optimally. Turns out that gcc is now able to optimize things and produces the same code with this patch applied. Reported-by: Antony Yu Signed-off-by: Nicolas Pitre Reviewed-by: Ard Biesheuvel Tested-by: Ard Biesheuvel Signed-off-by: Russell King commit f77ac2e378be9dd61eb88728f0840642f045d9d1 Author: Ard Biesheuvel Date: Thu Nov 19 18:09:16 2020 +0100 ARM: 9030/1: entry: omit FP emulation for UND exceptions taken in kernel mode There are a couple of problems with the exception entry code that deals with FP exceptions (which are reported as UND exceptions) when building the kernel in Thumb2 mode: - the conditional branch to vfp_kmode_exception in vfp_support_entry() may be out of range for its target, depending on how the linker decides to arrange the sections; - when the UND exception is taken in kernel mode, the emulation handling logic is entered via the 'call_fpe' label, which means we end up using the wrong value/mask pairs to match and detect the NEON opcodes. Since UND exceptions in kernel mode are unlikely to occur on a hot path (as opposed to the user mode version which is invoked for VFP support code and lazy restore), we can use the existing undef hook machinery for any kernel mode instruction emulation that is needed, including calling the existing vfp_kmode_exception() routine for unexpected cases. So drop the call to call_fpe, and instead, install an undef hook that will get called for NEON and VFP instructions that trigger an UND exception in kernel mode. While at it, make sure that the PC correction is accurate for the execution mode where the exception was taken, by checking the PSR Thumb bit. Cc: Dmitry Osipenko Cc: Kees Cook Fixes: eff8728fe698 ("vmlinux.lds.h: Add PGO and AutoFDO input sections") Signed-off-by: Ard Biesheuvel Reviewed-by: Linus Walleij Reviewed-by: Nick Desaulniers Signed-off-by: Russell King commit 3c9f5708b7aed6a963e2aefccbd1854802de163e Author: Jian Cai Date: Tue Nov 17 23:11:36 2020 +0100 ARM: 9029/1: Make iwmmxt.S support Clang's integrated assembler This patch replaces 6 IWMMXT instructions Clang's integrated assembler does not support in iwmmxt.S using macros, while making sure GNU assembler still emit the same instructions. This should be easier than providing full IWMMXT support in Clang. This is one of the last bits of kernel code that could be compiled but not assembled with clang. Once all of it works with IAS, we no longer need to special-case 32-bit Arm in Kbuild, or turn off CONFIG_IWMMXT when build-testing. "Intel Wireless MMX Technology - Developer Guide - August, 2002" should be referenced for the encoding schemes of these extensions. Link: https://github.com/ClangBuiltLinux/linux/issues/975 Suggested-by: Nick Desaulniers Suggested-by: Ard Biesheuvel Acked-by: Ard Biesheuvel Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers Signed-off-by: Jian Cai Signed-off-by: Russell King commit 4d576cab16f57e1f87978f6997a725179398341e Author: Ard Biesheuvel Date: Tue Nov 17 10:23:28 2020 +0100 ARM: 9028/1: disable KASAN in call stack capturing routines KASAN uses the routines in stacktrace.c to capture the call stack each time memory gets allocated or freed. Some of these routines are also used to log CPU and memory context when exceptions are taken, and so in some cases, memory accesses may be made that are not strictly in line with the KASAN constraints, and may therefore trigger false KASAN positives. So follow the example set by other architectures, and simply disable KASAN instrumentation for these routines. Reviewed-by: Linus Walleij Signed-off-by: Ard Biesheuvel Signed-off-by: Russell King commit cf791774a16caf87b0e4c0c55b82979bad0b6c01 Author: Vadim Pasternak Date: Mon Dec 7 19:47:45 2020 +0200 platform/x86: mlx-platform: Fix item counter assignment for MSN2700/ComEx system Fix array names to match assignments for data items and data items counter in 'mlxplat_mlxcpld_comex_items' structure for: .data = mlxplat_mlxcpld_default_pwr_items_data, .count = ARRAY_SIZE(mlxplat_mlxcpld_pwr), and .data = mlxplat_mlxcpld_default_fan_items_data, .count = ARRAY_SIZE(mlxplat_mlxcpld_fan), Replace: - 'mlxplat_mlxcpld_pwr' by 'mlxplat_mlxcpld_default_pwr_items_data' for ARRAY_SIZE() calculation. - 'mlxplat_mlxcpld_fan' by 'mlxplat_mlxcpld_default_fan_items_data' for ARRAY_SIZE() calculation. Fixes: bdd6e155e0d6 ("platform/x86: mlx-platform: Add support for new system type") Signed-off-by: Vadim Pasternak Link: https://lore.kernel.org/r/20201207174745.22889-3-vadimp@nvidia.com Signed-off-by: Hans de Goede commit ba4939f1dd46dde08c2f9b9d7ac86ed3ea7ead86 Author: Vadim Pasternak Date: Mon Dec 7 19:47:44 2020 +0200 platform/x86: mlx-platform: Fix item counter assignment for MSN2700, MSN24xx systems Fix array names to match assignments for data items and data items counter in 'mlxplat_mlxcpld_default_items' structure for: .data = mlxplat_mlxcpld_default_pwr_items_data, .count = ARRAY_SIZE(mlxplat_mlxcpld_pwr), and .data = mlxplat_mlxcpld_default_fan_items_data, .count = ARRAY_SIZE(mlxplat_mlxcpld_fan), Replace: - 'mlxplat_mlxcpld_pwr' by 'mlxplat_mlxcpld_default_pwr_items_data' for ARRAY_SIZE() calculation. - 'mlxplat_mlxcpld_fan' by 'mlxplat_mlxcpld_default_fan_items_data' for ARRAY_SIZE() calculation. Fixes: c6acad68eb2d ("platform/mellanox: mlxreg-hotplug: Modify to use a regmap interface") Signed-off-by: Vadim Pasternak Link: https://lore.kernel.org/r/20201207174745.22889-2-vadimp@nvidia.com Signed-off-by: Hans de Goede commit 331b9d02d77e0e33f273d8328d9f5453efddd926 Author: Nick Desaulniers Date: Tue Nov 17 00:49:25 2020 +0100 ARM: 9026/1: unwind: remove old check for GCC <= 4.2 Since commit 0bddd227f3dc ("Documentation: update for gcc 4.9 requirement") the minimum supported version of GCC is gcc-4.9. It's now safe to remove this code. Link: https://github.com/ClangBuiltLinux/linux/issues/427 Signed-off-by: Nick Desaulniers Reviewed-by: Nathan Chancellor Signed-off-by: Russell King commit 28187dc8ebd938d574edfc6d9e0f9c51c21ff3f4 Author: Nick Desaulniers Date: Tue Nov 17 00:46:39 2020 +0100 ARM: 9025/1: Kconfig: CPU_BIG_ENDIAN depends on !LD_IS_LLD LLD does not yet support any big endian architectures. Make this config non-selectable when using LLD until LLD is fixed. Link: https://github.com/ClangBuiltLinux/linux/issues/965 Signed-off-by: Nick Desaulniers Tested-by: Nathan Chancellor Reviewed-by: Nathan Chancellor Reported-by: kbuild test robot Signed-off-by: Russell King commit 5e27cb9bca6746d1c9c76c4b4aeececcb18b2120 Author: Srinivas Pandruvada Date: Thu Dec 3 14:29:40 2020 -0800 tools/power/x86/intel-speed-select: Update version for v5.11 Update version for changes released with v5.11 kernel release. Signed-off-by: Srinivas Pandruvada Link: https://lore.kernel.org/platform-driver-x86/57d6648282491906e0e1f70fe3b9a44f72cec90d.camel@intel.com/ Signed-off-by: Hans de Goede commit 6c4832253a2d2259fd4002e3c4511035f81f48f6 Author: Srinivas Pandruvada Date: Thu Dec 3 13:08:37 2020 -0800 tools/power/x86/intel-speed-select: Account for missing sysfs for die_id Some older kernels will not have support to get CPU die_id from the sysfs. This requires several back ports. But the tool depends on getting die_id to match to correct CPU. Relax this restriction and use die_id as 0 when die_id is missing. This is not a problem as we don't have any multi-die processors with Intel SST support. This helps in running this tool on older kernels with just Intel SST drivers back ported. Signed-off-by: Srinivas Pandruvada Link: https://lore.kernel.org/platform-driver-x86/57d6648282491906e0e1f70fe3b9a44f72cec90d.camel@intel.com/ Signed-off-by: Hans de Goede commit 07f262d80d5f1f426da4557066bf0ec24ee32d97 Author: Srinivas Pandruvada Date: Mon Nov 23 16:56:05 2020 -0800 tools/power/x86/intel-speed-select: Read TRL from mailbox When SST-PP feature is not present, the TRL (Turbo Ratio Limits) is read from MSRs. This is done as the mailbox command will fail on Skylake-X based platform. But for IceLake servers, mailbox commands can still be used. So add a check to allow for non Skylake based platforms to read from mail box commands. Signed-off-by: Srinivas Pandruvada Link: https://lore.kernel.org/platform-driver-x86/57d6648282491906e0e1f70fe3b9a44f72cec90d.camel@intel.com/ Signed-off-by: Hans de Goede commit 473e15b0c0f7cf63a48f776937a02cb9dfcab252 Author: Gao Xiang Date: Tue Dec 8 17:58:34 2020 +0800 erofs: simplify try_to_claim_pcluster() simplify try_to_claim_pcluster() by directly using cmpxchg() here (the retry loop caused more overhead.) Also, move the chain loop detection in and rename it to z_erofs_try_to_claim_pcluster(). Link: https://lore.kernel.org/r/20201208095834.3133565-3-hsiangkao@redhat.com Reviewed-by: Chao Yu Signed-off-by: Gao Xiang commit bf225074ff211f219cff2166cea17b158a0d06a9 Author: Gao Xiang Date: Tue Dec 8 17:58:33 2020 +0800 erofs: insert to managed cache after adding to pcl Previously, it could be some concern to call add_to_page_cache_lru() with page->mapping == Z_EROFS_MAPPING_STAGING (!= NULL). In contrast, page->private is used instead now, so partially revert commit 5ddcee1f3a1c ("erofs: get rid of __stagingpage_alloc helper") with some adaption for simplicity. Link: https://lore.kernel.org/r/20201208095834.3133565-2-hsiangkao@redhat.com Reviewed-by: Chao Yu Signed-off-by: Gao Xiang commit 6aaa7b0664e6886f6154070edbc24435d6e1f86b Author: Gao Xiang Date: Tue Dec 8 17:58:32 2020 +0800 erofs: get rid of magical Z_EROFS_MAPPING_STAGING Previously, we played around with magical page->mapping for short-lived temporary pages since we need to identify different types of pages in the same pcluster but both invalidated and short-lived temporary pages can have page->mapping == NULL. It was considered as safe because that temporary pages are all non-LRU / non-movable pages. This patch tends to use specific page->private to identify short-lived pages instead so it won't rely on page->mapping anymore. Details are described in "compress.h" as well. Link: https://lore.kernel.org/r/20201208095834.3133565-1-hsiangkao@redhat.com Reviewed-by: Chao Yu Signed-off-by: Gao Xiang commit a426ce9d6751cc8e709f031fa546900e4239f125 Author: Vladimir Zapolskiy Date: Fri Oct 30 14:28:39 2020 +0200 erofs: remove a void EROFS_VERSION macro set in Makefile Since commit 4f761fa253b4 ("erofs: rename errln/infoln/debugln to erofs_{err, info, dbg}") the defined macro EROFS_VERSION has no affect, therefore removing it from the Makefile is a non-functional change. Link: https://lore.kernel.org/r/20201030122839.25431-1-vladimir@tuxera.com Reviewed-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Vladimir Zapolskiy Signed-off-by: Gao Xiang commit f77f420d34754b8d08ac6ebf094ff7193023196a Author: Borislav Petkov Date: Sat Dec 5 01:19:45 2020 +0100 x86/msr: Add a pointer to an URL which contains further details After having collected the majority of reports about MSRs being written by userspace tools and what tools those are, and all newer reports mostly repeating, add an URL where detailed information is gathered and kept up-to-date. Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201205002825.19107-1-bp@alien8.de commit b5252196d08abd82f3b21532354f71a40dd2801d Author: Enrico Weigelt, metux IT consult Date: Mon Dec 7 21:38:16 2020 +0100 gpio: put virtual gpio device into their own submenu Since we already have a few virtual GPIO drivers, and more to come, this category deserves its own submenu. Signed-off-by: Enrico Weigelt, metux IT consult Signed-off-by: Bartosz Golaszewski commit 518b466a21ad7fa1e338fa4ed9d180ef439d3bc0 Author: Sergio Paracuellos Date: Tue Dec 8 08:55:23 2020 +0100 pinctrl: ralink: add a pinctrl driver for the rt2880 family These Socs have 1-3 banks of 8-32 gpios. Rather then setting the muxing of each pin individually, these socs have mux groups that when set will effect 1-N pins. Pin groups have a 2, 4 or 8 different muxes. Acked-by: Linus Walleij Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20201208075523.7060-3-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman commit 289fa46ac6111df61697495a736f2dac8fa4f23a Author: Sergio Paracuellos Date: Tue Dec 8 08:55:22 2020 +0100 dt-bindings: pinctrl: rt2880: add binding document The commit adds rt2880 compatible node in binding document. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20201208075523.7060-2-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8764c27fbd2f257405853e73bf3a6b44920a20ab Author: Ross Schmidt Date: Mon Dec 7 22:07:33 2020 -0600 staging: rtl8723bs: remove ELEMENT_ID enum The ELEMENT_ID enum is no longer used, remove it. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201208040733.379197-22-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit a228b401951ebe188be09d77c3ab80c4f5a7a96c Author: Ross Schmidt Date: Mon Dec 7 22:07:32 2020 -0600 staging: rtl8723bs: remove unused macros Remove many macros from wifi.h and ieee80211.h because they are unused. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201208040733.379197-21-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5b45010f2ef9cb7001d2e29cde9aacf67dc0e02e Author: Ross Schmidt Date: Mon Dec 7 22:07:31 2020 -0600 staging: rtl8723bs: replace EID_EXTCapability Replace unique EID_EXTCapability constant with kernel provided WLAN_EID_EXT_CAPABILITY from linux/ieee80211.h. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201208040733.379197-20-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit d7ca2c3d2d47942f224107c754a008c30826ba88 Author: Ross Schmidt Date: Mon Dec 7 22:07:30 2020 -0600 staging: rtl8723bs: replace EID_BSSIntolerantChlReport Replace unique EID_BSSIntolerantChlReport constant with kernel provided WLAN_EID_BSS_INTOLERANT_CHL_REPORT from linux/ieee80211.h. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201208040733.379197-19-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9b5d8c1fe14bf445fe324505d451b4ddc5a68a8d Author: Ross Schmidt Date: Mon Dec 7 22:07:29 2020 -0600 staging: rtl8723bs: replace EID_BSSCoexistence Replace unique EID_BSSCoexistence constant with kernel provided WLAN_EID_BSS_COEX_2040 from linux/ieee80211.h. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201208040733.379197-18-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 99bb776980eeb231558a6ede0a1dd8d1a6e8ec0c Author: Ross Schmidt Date: Mon Dec 7 22:07:28 2020 -0600 staging: rtl8723bs: replace _MME_IE_ Replace unique _MME_IE_ macro with kernel provided WLAN_EID_MMIE from linux/ieee80211.h. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201208040733.379197-17-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit fc41e9618fc65bea5d615d487ca7de3b0e1110bc Author: Ross Schmidt Date: Mon Dec 7 22:07:27 2020 -0600 staging: rtl8723bs: replace _WAPI_IE_ Replace unique _WAPI_IE_ macro with kernel provided WLAN_EID_BSS_AC_ACCESS_DELAY from linux/ieee80211.h. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201208040733.379197-16-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 00f0b682841337c4d2e7dd2e75d86acb6b7ce2d8 Author: Ross Schmidt Date: Mon Dec 7 22:07:26 2020 -0600 staging: rtl8723bs: replace _EXT_SUPPORTEDRATES_IE_ Replace unique _EXT_SUPPORTEDRATES_IE_ macro with kernel provided WLAN_EID_EXT_SUPP_RATES from linux/ieee80211.h. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201208040733.379197-15-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7bd332ec5ed3464c5359723585a1c3aa275eb808 Author: Ross Schmidt Date: Mon Dec 7 22:07:25 2020 -0600 staging: rtl8723bs: replace _ERPINFO_IE_ Replace unique _ERPINFO_IE_ macro with kernel provided WLAN_EID_ERP_INFO from linux/ieee80211.h. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201208040733.379197-14-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 38caee0abe9db1db387e7bea60a980eda22e9fa6 Author: Ross Schmidt Date: Mon Dec 7 22:07:24 2020 -0600 staging: rtl8723bs: replace _CHLGETXT_IE_ Replace unique _CHLGETXT_IE_ macro with kernel provided WLAN_EID_CHALLENGE from linux/ieee80211.h. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201208040733.379197-13-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0b44fca943be3e26cbb84a9788f4af3f703e212a Author: Ross Schmidt Date: Mon Dec 7 22:07:23 2020 -0600 staging: rtl8723bs: replace _COUNTRY_IE_ Replace unique _COUNTRY_IE_ macro with kernel provided WLAN_EID_COUNTRY from linux/ieee80211.h. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201208040733.379197-12-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit e6038a488cef5b522b5c099f91e016ef1580113c Author: Ross Schmidt Date: Mon Dec 7 22:07:22 2020 -0600 staging: rtl8723bs: replace _IBSS_PARA_IE_ Replace unique _IBSS_PARA_IE_ macro with kernel provided WLAN_EID_IBSS_PARAMS from linux/ieee80211.h. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201208040733.379197-11-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit aaa0bc19facf31426ca57267edc681a42dbd1ee1 Author: Ross Schmidt Date: Mon Dec 7 22:07:21 2020 -0600 staging: rtl8723bs: replace _TIM_IE_ Replace unique _TIM_IE_ macro with kernel provided WLAN_EID_DS_PARAMS from linux/ieee80211.h. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201208040733.379197-10-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8f6a9446c6dda0ef93ba9472d1313d1d293abce9 Author: Ross Schmidt Date: Mon Dec 7 22:07:20 2020 -0600 staging: rtl8723bs: replace _DSSET_IE_ Replace unique _DSSET_IE_ macro with kernel provdied WLAN_EID_DS_PARAMS from linux/ieee80211.h. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201208040733.379197-9-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit c34c45ed98f9fc91f7dd9e5dbb537ab8daa9ebe7 Author: Ross Schmidt Date: Mon Dec 7 22:07:19 2020 -0600 staging: rtl8723bs: replace _SUPPORTEDRATES_IE_ Replace unique _SUPPORTEDRATES_IE_ macro with kernel provided WLAN_EID_SUPP_RATES from linux/ieee80211.h. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201208040733.379197-8-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3f15277b29ee2a91468de74caf7428487b080baf Author: Ross Schmidt Date: Mon Dec 7 22:07:18 2020 -0600 staging: rtl8723bs: replace _SSID_IE_ Replace unique _SSID_IE_ macro with kernel provided WLAN_EID_SSID from linux/ieee80211.h. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201208040733.379197-7-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit b03da03a267ce49839d67666385901f46e35f47f Author: Ross Schmidt Date: Mon Dec 7 22:07:17 2020 -0600 staging: rtl8723bs: replace WLAN_EID_VHT_OP_MODE_NOTIFY Replace unique WLAN_EID_VHT_OP_MODE_NOFITY macro with kernel provided WLAN_EID_OPMODE_NOTIF from linux/ieee80211.h. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201208040733.379197-6-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 332ec9db092147d8186d00c95e00843f3b7e653d Author: Ross Schmidt Date: Mon Dec 7 22:07:16 2020 -0600 staging: rtl8723bs: use WLAN_EID_HT_OPERATION Replace unique _HT_EXTRA_INFO_IE_ and _HT_ADD_INFO_IE_ macros with kernel provided WLAN_EID_HT_OPERATION from linux/ieee80211.h. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201208040733.379197-5-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3359e2927b321c635d9529bab1f087ac39c82227 Author: Ross Schmidt Date: Mon Dec 7 22:07:15 2020 -0600 staging: rtl8723bs: use WLAN_EID_RSN Replace unique _WPA2_IE_ID_, EID_WPA2, and _RSN_IE_2_ with kernel provided WLAN_EID_RSN from linux/ieee80211.h. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201208040733.379197-4-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit b05cc3a9156b6b674904016d9c213e71c149f4c2 Author: Ross Schmidt Date: Mon Dec 7 22:07:14 2020 -0600 staging: rtl8723bs: use WLAN_EID_VENDOR_SPECIFIC Replace unique WLAN_EID_GENERIC, _WPA_IE_ID_, _SSN_IE_1_, and _VENDOR_SPECIFIC_IE_ macros with kernel provided WLAN_EID_VENDOR_SPECIFIC from linux/ieee80211.h. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201208040733.379197-3-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit fc6a65288c336e738b5254e8a2826321dd0fd3a8 Author: Ross Schmidt Date: Mon Dec 7 22:07:13 2020 -0600 staging: rtl8723bs: use WLAN_EID_HT_CAPABILITY Replace unique WLAN_EID_HT_CAP, _HT_CAPABILITY_IE_, and EID_HTCapability with kernel provided WLAN_EID_HT_CAPABILITY from linux/ieee80211.h. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201208040733.379197-2-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 37ddba0245b4547621862c0b24bf36deb199bf5c Author: Enrico Weigelt, metux IT consult Date: Thu Dec 3 19:24:23 2020 +0100 drivers: gpio: amd8111: use SPDX-License-Identifier Prefer SPDX-License-Identifier over hand-written texts. Signed-off-by: Enrico Weigelt, metux IT consult Link: https://lore.kernel.org/r/20201203182423.5499-3-info@metux.net Signed-off-by: Linus Walleij commit a922a24454088c62688472c16c42ea944496cf24 Author: Enrico Weigelt, metux IT consult Date: Thu Dec 3 19:24:22 2020 +0100 drivers: gpio: amd8111: prefer dev_err()/dev_info() over raw printk For logging in device contexts, dev_*() functions are preferred over raw printk(), which also print out device name. Signed-off-by: Enrico Weigelt, metux IT consult Link: https://lore.kernel.org/r/20201203182423.5499-2-info@metux.net Signed-off-by: Linus Walleij commit 3bf1d26c8a165db5bbb65c21327ac2055d70e76f Author: Enrico Weigelt, metux IT consult Date: Thu Dec 3 19:24:21 2020 +0100 drivers: gpio: bt8xx: prefer dev_err()/dev_warn() over of raw printk For logging in device contexts, dev_*() functions are preferred over raw printk(), which also print out device name. Signed-off-by: Enrico Weigelt, metux IT consult Link: https://lore.kernel.org/r/20201203182423.5499-1-info@metux.net Signed-off-by: Linus Walleij commit 18572b0b54930ecf642a68444b15507c43c07f54 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:41:05 2020 -0600 zd1201: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by replacing a /* Fall through */ comment with the new pseudo-keyword macro fallthrough; instead of letting the code fall through to the next case. Notice that Clang doesn't recognize /* Fall through */ comments as implicit fall-through markings. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/52931e343af25f6dab4bd1d604889d2594a861dd.1605896060.git.gustavoars@kernel.org commit 0662fbebf4fb4fb047ee80c2df4f8403094f3cad Author: Gustavo A. R. Silva Date: Fri Nov 20 12:39:04 2020 -0600 rtw88: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by replacing a /* fall through */ comment with the new pseudo-keyword macro fallthrough; instead of letting the code fall through to the next case. Notice that Clang doesn't recognize /* fall through */ comments as implicit fall-through markings. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/967a171da3db43e4cdf38104876b4ec1cde46359.1605896060.git.gustavoars@kernel.org commit f48d7dccb3e4ab372c32e900302270ba7b0e5578 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:38:52 2020 -0600 rt2x00: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/b0d4c50b803bc38ed370521b9b0a44365cae9386.1605896060.git.gustavoars@kernel.org commit 48264b23fadee1d240729d87afdda3a42da22290 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:33:39 2020 -0600 airo: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/b3c0f74f5b6e6bff9f1609b310319b6fdd9ee205.1605896059.git.gustavoars@kernel.org commit e65e8b608f68c154ec8c20467a6b2b25fadecaac Author: Tom Rix Date: Fri Nov 27 09:55:31 2020 -0800 carl9170: remove trailing semicolon in macro definition The macro use will already have a semicolon. Signed-off-by: Tom Rix Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201127175531.2754461-1-trix@redhat.com commit 3dbd7fe78c42e54a039d3444eac2183aa03f1408 Author: Devin Bayer Date: Mon Dec 7 18:16:55 2020 +0200 ath11k: pci: add MODULE_FIRMWARE macros I am trying to get the ath11k driver to work with VyOS and during the build it tries to discover the firmware blobs which drivers require. This doesn't work with ath11k because it doesn't use the MODULE_FIRMWARE macro. This patch fixes that. Signed-off-by: Devin Bayer [kvalo@codeaurora.org: cleanup commit log, move to pci.c] Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201202182705.dhkml4nb4rf2vwav@orac commit d3b6fab909525cce715a281c5c19ce2ab7b3fcec Merge: 3324e05eca0d1 f12758f6f929d Author: Kalle Valo Date: Tue Dec 8 09:39:43 2020 +0200 Merge tag 'mt76-for-kvalo-2020-12-04' of https://github.com/nbd168/wireless mt76 patches for 5.11 * mt7915 fixes * mt7615 fixes * support for more sta interfaces on mt7615/mt7915 * mt7915 encap offload * performance improvements * channel noise report on mt7915 * usb/sdio support improvements * mt7915 testmode support * mt7915 DBDC support * warning fixes commit 3324e05eca0d14c4b970fcec63d1c113f1e76e60 Author: Chin-Yen Lee Date: Tue Dec 8 09:45:03 2020 +0800 rtw88: reduce polling time of IQ calibration When 8822CE is associating with AP, driver will poll status bit of IQ calibration to confirm the IQ calibration is done, and then move on the association process. Current polling time for IQ calibration is 6 seconds. But occasionally driver fails in polling the status bit because the status bit is not set after IQ calibration is done. When it happends, association process will be serieously delayed up to 6 seconds. To avoid it, we reduce polling time to 300ms, in which the IQ calibration can be done. Signed-off-by: Chin-Yen Lee Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201208014503.12118-1-pkshih@realtek.com commit 91aeaf09a6eed83cae0d0fad20a97699b1c8b812 Author: Ping-Ke Shih Date: Tue Dec 8 09:37:46 2020 +0800 rtw88: fix multiple definition of rtw_pm_ops 'const struct dev_pm_ops rtw_pm_ops' is declared by pci.c, and it should be declare as 'extern' in pci.h. Without 'extern' causes every file including pci.h has an individual instance of rtw_pm_ops but not reference to the one declared in pci.c If kernel config, like test robot, doesn't build driver as module, it leads multiple definition. Reported-by: kernel test robot Fixes: 2e86ef413ab3 ("rtw88: pci: Add prototypes for .probe, .remove and .shutdown") Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201208013746.11065-1-pkshih@realtek.com commit 5c455c5ab332773464d02ba17015acdca198f03d Author: Zhang Xiaohui Date: Sun Dec 6 16:48:01 2020 +0800 mwifiex: Fix possible buffer overflows in mwifiex_cmd_802_11_ad_hoc_start mwifiex_cmd_802_11_ad_hoc_start() 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: Zhang Xiaohui Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201206084801.26479-1-ruc_zhangxiaohui@163.com commit c8bb4520543823a9b3da3861304273dc7232e2c7 Merge: f45f89a778e8a f9b0498d29404 Author: Viresh Kumar Date: Tue Dec 8 11:22:17 2020 +0530 Merge branch 'cpufreq/scmi' into cpufreq/arm/linux-next commit f9b0498d29404f230894490d622e57e481c7d45a Author: Lukasz Luba Date: Tue Nov 24 10:43:46 2020 +0000 cpufreq: arm_scmi: Discover the power scale in performance protocol Add mechanism to discover the power scale present in the performance protocol for all domains. Provide this information to Energy Model, which then can be checked in other frameworks, e.g. thermal. Suggested-by: Morten Rasmussen Signed-off-by: Lukasz Luba Signed-off-by: Viresh Kumar commit 76ea4d8eeefbfdd37e47c6fd579d0d5852457618 Author: Lukasz Luba Date: Tue Nov 24 10:43:45 2020 +0000 firmware: arm_scmi: Add power_scale_mw_get() interface Add a new interface to the existing perf_ops and export the information about the power values scale. This would be used by the cpufreq driver and Energy Model framework to set the performance domains scale: milli-Watts or abstract scale. Suggested-by: Morten Rasmussen Reviewed-by: Cristian Marussi Signed-off-by: Lukasz Luba Acked-by: Sudeep Holla Signed-off-by: Viresh Kumar commit 7aa390ec2d9db0cd6677d95d0b8f307f9c086770 Author: Ming Lei Date: Thu Dec 3 09:26:38 2020 +0800 Revert "block: Fix a lockdep complaint triggered by request queue flushing" This reverts commit b3c6a59975415bde29cfd76ff1ab008edbf614a9. Now we can avoid nvme-loop lockdep warning of 'lockdep possible recursive locking' by nvme-loop's lock class, no need to apply dynamically allocated lock class key, so revert commit b3c6a5997541("block: Fix a lockdep complaint triggered by request queue flushing"). This way fixes horrible SCSI probe delay issue on megaraid_sas, and it is reported the whole probe may take more than half an hour. Tested-by: Kashyap Desai Reported-by: Qian Cai Reviewed-by: Christoph Hellwig Cc: Sumit Saxena Cc: John Garry Cc: Kashyap Desai Cc: Bart Van Assche Cc: Hannes Reinecke Signed-off-by: Ming Lei Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 88c9979334aa5ff8c814ddf578f3113ed6c5ce8e Author: Ming Lei Date: Thu Dec 3 09:26:37 2020 +0800 nvme-loop: use blk_mq_hctx_set_fq_lock_class to set loop's lock class Set nvme-loop's lock class via blk_mq_hctx_set_fq_lock_class for avoiding lockdep possible recursive locking, then we can remove the dynamically allocated lock class for each flush queue, finally we can avoid horrible SCSI probe delay. This way may not address situation in which one nvme-loop is backed on another nvme-loop. However, in reality, people seldom uses this way for test. Even though someone played in this way, it is just one recursive locking false positive, no real deadlock issue. Tested-by: Kashyap Desai Reported-by: Qian Cai Reviewed-by: Christoph Hellwig Cc: Sumit Saxena Cc: John Garry Cc: Kashyap Desai Cc: Bart Van Assche Cc: Hannes Reinecke Signed-off-by: Ming Lei Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit fb01a2932e81a1fb2273f87ff92dc8172b8880ee Author: Ming Lei Date: Thu Dec 3 09:26:36 2020 +0800 blk-mq: add new API of blk_mq_hctx_set_fq_lock_class flush_end_io() may be called recursively from some driver, such as nvme-loop, so lockdep may complain 'possible recursive locking'. Commit b3c6a5997541("block: Fix a lockdep complaint triggered by request queue flushing") tried to address this issue by assigning dynamically allocated per-flush-queue lock class. This solution adds synchronize_rcu() for each hctx's release handler, and causes horrible SCSI MQ probe delay(more than half an hour on megaraid sas). Add new API of blk_mq_hctx_set_fq_lock_class() for these drivers, so we just need to use driver specific lock class for avoiding the lockdep warning of 'possible recursive locking'. Tested-by: Kashyap Desai Reported-by: Qian Cai Cc: Sumit Saxena Cc: John Garry Cc: Kashyap Desai Cc: Bart Van Assche Cc: Hannes Reinecke Signed-off-by: Ming Lei Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit cc29e1bf0d63f728a5bd60ef22638bbf77369552 Author: Jeffle Xu Date: Thu Nov 26 17:18:52 2020 +0800 block: disable iopoll for split bio iopoll is initially for small size, latency sensitive IO. It doesn't work well for big IO, especially when it needs to be split to multiple bios. In this case, the returned cookie of __submit_bio_noacct_mq() is indeed the cookie of the last split bio. The completion of *this* last split bio done by iopoll doesn't mean the whole original bio has completed. Callers of iopoll still need to wait for completion of other split bios. Besides bio splitting may cause more trouble for iopoll which isn't supposed to be used in case of big IO. iopoll for split bio may cause potential race if CPU migration happens during bio submission. Since the returned cookie is that of the last split bio, polling on the corresponding hardware queue doesn't help complete other split bios, if these split bios are enqueued into different hardware queues. Since interrupts are disabled for polling queues, the completion of these other split bios depends on timeout mechanism, thus causing a potential hang. iopoll for split bio may also cause hang for sync polling. Currently both the blkdev and iomap-based fs (ext4/xfs, etc) support sync polling in direct IO routine. These routines will submit bio without REQ_NOWAIT flag set, and then start sync polling in current process context. The process may hang in blk_mq_get_tag() if the submitted bio has to be split into multiple bios and can rapidly exhaust the queue depth. The process are waiting for the completion of the previously allocated requests, which should be reaped by the following polling, and thus causing a deadlock. To avoid these subtle trouble described above, just disable iopoll for split bio and return BLK_QC_T_NONE in this case. The side effect is that non-HIPRI IO also returns BLK_QC_T_NONE now. It should be acceptable since the returned cookie is never used for non-HIPRI IO. Suggested-by: Ming Lei Signed-off-by: Jeffle Xu Reviewed-by: Ming Lei Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 2f4b03195fe8ed3b1e213f4a6cfe14cfc109d829 Author: Lukas Bulwahn Date: Mon Dec 7 13:37:20 2020 +0100 bpf: Propagate __user annotations properly __htab_map_lookup_and_delete_batch() stores a user pointer in the local variable ubatch and uses that in copy_{from,to}_user(), but ubatch misses a __user annotation. So, sparse warns in the various assignments and uses of ubatch: kernel/bpf/hashtab.c:1415:24: warning: incorrect type in initializer (different address spaces) kernel/bpf/hashtab.c:1415:24: expected void *ubatch kernel/bpf/hashtab.c:1415:24: got void [noderef] __user * kernel/bpf/hashtab.c:1444:46: warning: incorrect type in argument 2 (different address spaces) kernel/bpf/hashtab.c:1444:46: expected void const [noderef] __user *from kernel/bpf/hashtab.c:1444:46: got void *ubatch kernel/bpf/hashtab.c:1608:16: warning: incorrect type in assignment (different address spaces) kernel/bpf/hashtab.c:1608:16: expected void *ubatch kernel/bpf/hashtab.c:1608:16: got void [noderef] __user * kernel/bpf/hashtab.c:1609:26: warning: incorrect type in argument 1 (different address spaces) kernel/bpf/hashtab.c:1609:26: expected void [noderef] __user *to kernel/bpf/hashtab.c:1609:26: got void *ubatch Add the __user annotation to repair this chain of propagating __user annotations in __htab_map_lookup_and_delete_batch(). Signed-off-by: Lukas Bulwahn Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20201207123720.19111-1-lukas.bulwahn@gmail.com commit 8e98387b16b88440b06e57965f6b2d789acd9451 Merge: 374a96b9600cc 04b222f957739 Author: Jakub Kicinski Date: Mon Dec 7 18:36:21 2020 -0800 Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux Saeed Mahameed says: ==================== mlx5-next auxbus support This pull request is targeting net-next and rdma-next branches. This series provides mlx5 support for auxiliary bus devices. It starts with a merge commit of tag 'auxbus-5.11-rc1' from gregkh/driver-core into mlx5-next, then the mlx5 patches that will convert mlx5 ulp devices (netdev, rdma, vdpa) to use the proper auxbus infrastructure instead of the internal mlx5 device and interface management implementation, which Leon is deleting at the end of this patchset. Link: https://lore.kernel.org/alsa-devel/20201026111849.1035786-1-leon@kernel.org/ Thanks to everyone for the joint effort ! * 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux: RDMA/mlx5: Remove IB representors dead code net/mlx5: Simplify eswitch mode check net/mlx5: Delete custom device management logic RDMA/mlx5: Convert mlx5_ib to use auxiliary bus net/mlx5e: Connect ethernet part to auxiliary bus vdpa/mlx5: Connect mlx5_vdpa to auxiliary bus net/mlx5: Register mlx5 devices to auxiliary virtual bus vdpa/mlx5: Make hardware definitions visible to all mlx5 devices net/mlx5_core: Clean driver version and name net/mlx5: Properly convey driver version to firmware driver core: auxiliary bus: minor coding style tweaks driver core: auxiliary bus: make remove function return void driver core: auxiliary bus: move slab.h from include file Add auxiliary bus support ==================== Link: https://lore.kernel.org/r/20201207053349.402772-1-saeed@kernel.org Signed-off-by: Jakub Kicinski commit 374a96b9600ccf60083c0fec8f727e04752a7f0c Author: Tariq Toukan Date: Sun Dec 6 11:12:54 2020 +0200 net/mlx4: Remove unused #define MAX_MSIX_P_PORT All usages of the definition MAX_MSIX_P_PORT were removed. It's not in use anymore. Remove it. Signed-off-by: Tariq Toukan Reviewed-by: Moshe Shemesh Link: https://lore.kernel.org/r/20201206091254.12476-1-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit d241b3826e942b356d94b5f8a021d5591b316558 Author: Jarod Wilson Date: Sat Dec 5 12:40:03 2020 -0500 bonding: set xfrm feature flags more sanely We can remove one of the ifdef blocks here, and instead of setting both the xfrm hw_features and features flags, then unsetting the feature flags if not in AB, wait to set the features flags if we're actually in AB mode. Signed-off-by: Jarod Wilson Link: https://lore.kernel.org/r/20201205174003.578267-1-jarod@redhat.com Signed-off-by: Jakub Kicinski commit 8f525bc2a7b296cf24cfa7e5186bc32dd8e766aa Author: Tom Rix Date: Mon Nov 30 12:55:09 2020 -0800 scsi: qla2xxx: Remove trailing semicolon in macro definition The macro use will already have a semicolon. Remove unneeded escaped newline. Link: https://lore.kernel.org/r/20201130205509.3447316-1-trix@redhat.com Reviewed-by: Daniel Wagner Signed-off-by: Tom Rix Signed-off-by: Martin K. Petersen commit d4fc94fe65578738ded138e9fce043db6bfc3241 Author: Zhang Changzhong Date: Fri Dec 4 15:47:39 2020 +0800 scsi: fnic: Fix error return code in fnic_probe() Return a negative error code from the error handling case instead of 0 as done elsewhere in this function. Link: https://lore.kernel.org/r/1607068060-31203-1-git-send-email-zhangchangzhong@huawei.com Fixes: 5df6d737dd4b ("[SCSI] fnic: Add new Cisco PCI-Express FCoE HBA") Reported-by: Hulk Robot Reviewed-by: Karan Tilak Kumar Signed-off-by: Zhang Changzhong Signed-off-by: Martin K. Petersen commit 4c60244dc37262023d24b167e245055c06bc0b77 Author: Arnd Bergmann Date: Thu Dec 3 23:31:26 2020 +0100 scsi: ufs: Fix -Wsometimes-uninitialized warning clang complains about a possible code path in which a variable is used without an initialization: drivers/scsi/ufs/ufshcd.c:7690:3: error: variable 'sdp' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] BUG_ON(1); ^~~~~~~~~ include/asm-generic/bug.h:63:36: note: expanded from macro 'BUG_ON' #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0) ^~~~~~~~~~~~~~~~~~~ Turn the BUG_ON(1) into an unconditional BUG() that makes it clear to clang that this code path is never hit. Link: https://lore.kernel.org/r/20201203223137.1205933-1-arnd@kernel.org Fixes: 4f3e900b6282 ("scsi: ufs: Clear UAC for FFU and RPMB LUNs") Reviewed-by: Avri Altman Signed-off-by: Arnd Bergmann Signed-off-by: Martin K. Petersen commit e7734ef14ead1fd78dc28be3de7ab13128b5c315 Author: Ahmed S. Darwish Date: Sun Dec 6 08:51:57 2020 +0100 scsi: NCR5380: Remove context check NCR5380_poll_politely2() uses in_interrupt() and irqs_disabled() to check if it is safe to sleep. Such usage in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be separated, or the context be explicitly conveyed in an argument passed by the caller. Below is a context analysis of NCR5380_poll_politely2() uppermost callers: - NCR5380_maybe_reset_bus(), task, invoked during device probe. -> NCR5380_poll_politely() -> do_abort() - NCR5380_select(), task, but can only sleep in the "release, then re-acquire" regions of the spinlock held by its caller. Sleeping invocations (lock released): -> NCR5380_poll_politely2() Atomic invocations (lock acquired): -> NCR5380_reselect() -> NCR5380_poll_politely() -> do_abort() -> NCR5380_transfer_pio() - NCR5380_intr(), interrupt handler -> NCR5380_dma_complete() -> NCR5380_transfer_pio() -> NCR5380_poll_politely() -> NCR5380_reselect() (see above) - NCR5380_information_transfer(), task, but can only sleep in the "release, then re-acquire" regions of the caller-held spinlock. Sleeping invocations (lock released): - NCR5380_transfer_pio() -> NCR5380_poll_politely() - NCR5380_poll_politely() Atomic invocations (lock acquired): - NCR5380_transfer_dma() -> NCR5380_dma_recv_setup() => generic_NCR5380_precv() -> NCR5380_poll_politely() => macscsi_pread() -> NCR5380_poll_politely() -> NCR5380_dma_send_setup() => generic_NCR5380_psend -> NCR5380_poll_politely2() => macscsi_pwrite() -> NCR5380_poll_politely() -> NCR5380_poll_politely2() -> NCR5380_dma_complete() -> NCR5380_transfer_pio() -> NCR5380_poll_politely() - NCR5380_transfer_pio() -> NCR5380_poll_politely - NCR5380_reselect(), atomic, always called with hostdata spinlock held. Since NCR5380_poll_politely2() already takes a "wait" argument in jiffies, use it to determine if the function can sleep. Modify atomic callers, which passed an unused wait value in terms of HZ, to pass zero. Link: https://lore.kernel.org/r/20201206075157.19067-1-a.darwish@linutronix.de Cc: Michael Schmitz Cc: Suggested-by: Finn Thain Co-developed-by: Sebastian Andrzej Siewior Acked-by: Finn Thain Signed-off-by: Ahmed S. Darwish Signed-off-by: Martin K. Petersen commit 8ca1a40b9f9defe7981ed9558b856a012e51b842 Author: jintae jang Date: Thu Dec 3 14:25:32 2020 +0900 scsi: ufs: Adjust ufshcd_hold() during sending attribute requests Invalidation check of arguments should have been checked before ufshcd_hold(). This can help to prevent ufshcd_hold()/ ufshcd_release() from being invoked unnecessarily. [mkp: removed unused out: labels] Link: https://lore.kernel.org/r/1606973132-5937-1-git-send-email-user@jang-Samsung-DeskTop-System Reviewed-by: Stanley Chu Signed-off-by: jintae jang Signed-off-by: Martin K. Petersen commit 38bd5cec76e2282986b1bf2f8e7d2d05ffe68b22 Author: Sukadev Bhattiprolu Date: Fri Dec 4 18:22:35 2020 -0800 ibmvnic: add some debugs We sometimes run into situations where a soft/hard reset of the adapter takes a long time or fails to complete. Having additional messages that include important adapter state info will hopefully help understand what is happening, reduce the guess work and minimize requests to reproduce problems with debug patches. Signed-off-by: Sukadev Bhattiprolu Link: https://lore.kernel.org/r/20201205022235.2414110-1-sukadev@linux.ibm.com Signed-off-by: Jakub Kicinski commit 063930ed2df5dbe07e994009a7e05e773f10b23a Author: Manivannan Sadhasivam Date: Thu Nov 26 12:58:44 2020 +0530 clk: qcom: Add GDSC support for SDX55 GCC Add GDSC support to control the power supply of power domains in SDX55 GCC. Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20201126072844.35370-7-manivannan.sadhasivam@linaro.org Signed-off-by: Stephen Boyd commit bdf7805b8c0e45ade8d26e5bd4616ddcbb3fcc36 Author: Manivannan Sadhasivam Date: Thu Nov 26 12:58:43 2020 +0530 dt-bindings: clock: Add GDSC in SDX55 GCC Add GDSC instances in SDX55 GCC block. Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20201126072844.35370-6-manivannan.sadhasivam@linaro.org Acked-by: Rob Herring Signed-off-by: Stephen Boyd commit afacfbbe1016a692b1fea4ed4c3f1d6f6a4ef4e5 Author: Manivannan Sadhasivam Date: Thu Nov 26 12:58:42 2020 +0530 clk: qcom: Add support for SDX55 RPMh clocks Add support for following clocks maintained by RPMh in SDX55 SoCs. * BI TCXO * RF_CLK1 * RF_CLK1_AO * RF_CLK2 * RF_CLK2_AO * QPIC (Qualcomm Technologies, Inc. Parallel Interface Controller) Signed-off-by: Manivannan Sadhasivam Reviewed-by: Vinod Koul Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20201126072844.35370-5-manivannan.sadhasivam@linaro.org Signed-off-by: Stephen Boyd commit 2e2639b7ef1641252e838b5181c0b8fec8b6c067 Author: Vinod Koul Date: Thu Nov 26 12:58:41 2020 +0530 dt-bindings: clock: Introduce RPMHCC bindings for SDX55 Add compatible for SDX55 RPMHCC and DT include. Signed-off-by: Vinod Koul Signed-off-by: Manivannan Sadhasivam Reviewed-by: Bjorn Andersson Acked-by: Rob Herring Link: https://lore.kernel.org/r/20201126072844.35370-4-manivannan.sadhasivam@linaro.org Signed-off-by: Stephen Boyd commit 3fade566c07abd54ad8324326a4a14f2b6c13e3d Author: Naveen Yadav Date: Thu Nov 26 12:58:40 2020 +0530 clk: qcom: Add SDX55 GCC support Add Global Clock Controller (GCC) support for SDX55 SoCs from Qualcomm. Signed-off-by: Naveen Yadav [mani: converted to parent_data, commented critical clocks, cleanups] Signed-off-by: Manivannan Sadhasivam Reviewed-by: Vinod Koul Link: https://lore.kernel.org/r/20201126072844.35370-3-manivannan.sadhasivam@linaro.org Signed-off-by: Stephen Boyd commit a13ae5a3797aa86623c906604fb5a884b832a685 Author: Vinod Koul Date: Thu Nov 26 12:58:39 2020 +0530 dt-bindings: clock: Add SDX55 GCC clock bindings Add device tree bindings for global clock controller on SDX55 SoCs. Signed-off-by: Vinod Koul Signed-off-by: Manivannan Sadhasivam Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201126072844.35370-2-manivannan.sadhasivam@linaro.org Signed-off-by: Stephen Boyd commit fcf77be87eacb8f305528d24d892dfcf15cf0341 Author: Michael Walle Date: Sun Nov 8 19:51:11 2020 +0100 clk: fsl-flexspi: new driver Add support for the FlexSPI clock on Freescale Layerscape SoCs. The clock is a simple divider based one and is located inside the device configuration space (DCFG). This will allow switching the SCK frequencies for the FlexSPI interface on the LS1028A and the LX2160A. Signed-off-by: Michael Walle Link: https://lore.kernel.org/r/20201108185113.31377-8-michael@walle.cc [sboyd@kernel.org: Drop modalias, add module table] Signed-off-by: Stephen Boyd commit e577af82c72fa928a4ab670fe5ac2b0b7b14fceb Author: Michael Walle Date: Sun Nov 8 19:51:10 2020 +0100 dt-bindings: clock: document the fsl-flexspi-clk device Signed-off-by: Michael Walle Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201108185113.31377-7-michael@walle.cc [sboyd@kernel.org: DT bindings aren't drivers] Signed-off-by: Stephen Boyd commit 26792699fe3681102aa85f4ae6d39e80a6a7e6b6 Author: Michael Walle Date: Sun Nov 8 19:51:09 2020 +0100 clk: divider: add devm_clk_hw_register_divider_table() This will simplify drivers which would only unregister the clk in their remove() op. Signed-off-by: Michael Walle Link: https://lore.kernel.org/r/20201108185113.31377-6-michael@walle.cc Signed-off-by: Stephen Boyd commit 4cb15934ba05b49784d9d47778af308e7ea50b69 Author: Michael Walle Date: Sun Nov 8 19:51:07 2020 +0100 clk: qoriq: provide constants for the type To avoid future mistakes in the device tree for the clockgen module, add constants for the clockgen subtype as well as a macro for the PLL divider. Signed-off-by: Michael Walle Acked-by: Rob Herring Link: https://lore.kernel.org/r/20201108185113.31377-4-michael@walle.cc Signed-off-by: Stephen Boyd commit eebf34a85c8c724676eba502d15202854f199b05 Author: Damien Le Moal Date: Fri Nov 20 10:55:19 2020 +0900 null_blk: Move driver into its own directory Move null_blk driver code into the new sub-directory drivers/block/null_blk. Suggested-by: Bart Van Assche Signed-off-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe commit ea17fd354ca8afd3e8962a77236b1a9a59262fdd Author: Damien Le Moal Date: Fri Nov 20 10:55:18 2020 +0900 null_blk: Allow controlling max_hw_sectors limit Add the module option and configfs attribute max_sectors to allow configuring the maximum size of a command issued to a null_blk device. This allows exercising the block layer BIO splitting with different limits than the default BLK_SAFE_MAX_SECTORS. This is also useful for testing the zone append write path of file systems as the max_hw_sectors limit value is also used for the max_zone_append_sectors limit. Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe commit 0ec4d913ac69ec86757eec117fc2733018552aa7 Author: Damien Le Moal Date: Fri Nov 20 10:55:17 2020 +0900 null_blk: discard zones on reset When memory backing is enabled, use null_handle_discard() to free the backing memory used by a zone when the zone is being reset. Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe commit 49c7089f3ded981fcea387f853fa394788e60fb2 Author: Damien Le Moal Date: Fri Nov 20 10:55:16 2020 +0900 null_blk: cleanup discard handling null_handle_discard() is called from both null_handle_rq() and null_handle_bio(). As these functions are only passed a nullb_cmd structure, this forces pointer dereferences to identiify the discard operation code and to access the sector range to be discarded. Simplify all this by changing the interface of the functions null_handle_discard() and null_handle_memory_backed() to pass along the operation code, operation start sector and number of sectors. With this change null_handle_discard() can be called directly from null_handle_memory_backed(). Also add a message warning that the discard configuration attribute has no effect when memory backing is disabled. No functional change is introduced by this patch. Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe commit 2e8c6e0e1d2d65562c637940747cfa30559f976a Author: Damien Le Moal Date: Fri Nov 20 10:55:15 2020 +0900 null_blk: Improve implicit zone close When open zone resource management is enabled, that is, when a null_blk zoned device is created with zone_max_open different than 0, implicitly or explicitly opening a zone may require implicitly closing a zone that is already implicitly open. This operation is done using the function null_close_first_imp_zone(), which search for an implicitly open zone to close starting from the first sequential zone. This implementation is simple but may result in the same being constantly implicitly closed and then implicitly reopened on write, namely, the lowest numbered zone that is being written. Avoid this by starting the search for an implicitly open zone starting from the zone following the last zone that was implicitly closed. The function null_close_first_imp_zone() is renamed null_close_imp_open_zone(). Signed-off-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe commit 2b8b7ed7f3fc2b1536a0add3941ae159529d23bd Author: Damien Le Moal Date: Fri Nov 20 10:55:14 2020 +0900 null_blk: improve zone locking With memory backing disabled, using a single spinlock for protecting zone information and zone resource management prevents the parallel execution on multiple queue of IO requests to different zones. Furthermore, regardless of the use of memory backing, if a null_blk device is created without limits on the number of open and active zones, accounting for zone resource management is not necessary. >From these observations, zone locking is changed as follows to improve performance: 1) the zone_lock spinlock is renamed zone_res_lock and used only if zone resource management is necessary, that is, if either zone_max_open or zone_max_active are not 0. This is indicated using the new boolean need_zone_res_mgmt in the nullb_device structure. null_zone_write() is modified to reduce the amount of code executed with the zone_res_lock spinlock held. 2) With memory backing disabled, per zone locking is changed to a spinlock per zone. 3) Introduce the structure nullb_zone to replace the use of struct blk_zone for zone information. This new structure includes a union of a spinlock and a mutex for zone locking. The spinlock is used when memory backing is disabled and the mutex is used with memory backing. With these changes, fio performance with zonemode=zbd for 4K random read and random write on a dual socket (24 cores per socket) machine using the none schedulder is as follows: before patch: write (psync x 96 jobs) = 465 KIOPS read (libaio@qd=8 x 96 jobs) = 1361 KIOPS after patch: write (psync x 96 jobs) = 456 KIOPS read (libaio@qd=8 x 96 jobs) = 4096 KIOPS Write performance remains mostly unchanged but read performance is three times higher. Performance when using the mq-deadline scheduler is not changed by this patch as mq-deadline becomes the bottleneck for a multi-queue device. Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe commit 817046ecddbc5f3cdd93fb84dd58c58ced987dee Author: Damien Le Moal Date: Fri Nov 20 10:55:13 2020 +0900 block: Align max_hw_sectors to logical blocksize Block device drivers do not have to call blk_queue_max_hw_sectors() to set a limit on request size if the default limit BLK_SAFE_MAX_SECTORS is acceptable. However, this limit (255 sectors) may not be aligned to the device logical block size which cannot be used as is for a request maximum size. This is the case for the null_blk device driver. Modify blk_queue_max_hw_sectors() to make sure that the request size limits specified by the max_hw_sectors and max_sectors queue limits are always aligned to the device logical block size. Additionally, to avoid introducing a dependence on the execution order of this function with blk_queue_logical_block_size(), also modify blk_queue_logical_block_size() to perform the same alignment when the logical block size is set after max_hw_sectors. Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe commit 2e896d89510f23927ec393bee1e0570db3d5a6c6 Author: Damien Le Moal Date: Fri Nov 20 10:55:12 2020 +0900 null_blk: Fail zone append to conventional zones Conventional zones do not have a write pointer and so cannot accept zone append writes. Make sure to fail any zone append write command issued to a conventional zone. Reported-by: Naohiro Aota Fixes: e0489ed5daeb ("null_blk: Support REQ_OP_ZONE_APPEND") Cc: stable@vger.kernel.org Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe commit 0ebcdd702f49aeb0ad2e2d894f8c124a0acc6e23 Author: Damien Le Moal Date: Fri Nov 20 10:55:11 2020 +0900 null_blk: Fix zone size initialization For a null_blk device with zoned mode enabled is currently initialized with a number of zones equal to the device capacity divided by the zone size, without considering if the device capacity is a multiple of the zone size. If the zone size is not a divisor of the capacity, the zones end up not covering the entire capacity, potentially resulting is out of bounds accesses to the zone array. Fix this by adding one last smaller zone with a size equal to the remainder of the disk capacity divided by the zone size if the capacity is not a multiple of the zone size. For such smaller last zone, the zone capacity is also checked so that it does not exceed the smaller zone size. Reported-by: Naohiro Aota Fixes: ca4b2a011948 ("null_blk: add zone support") Cc: stable@vger.kernel.org Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe commit 2afdeb23e4750acb4ff16fd86f566c9074708691 Author: Damien Le Moal Date: Wed Nov 11 16:36:06 2020 +0900 block: Improve blk_revalidate_disk_zones() checks Improves the checks on the zones of a zoned block device done in blk_revalidate_disk_zones() by making sure that the device report_zones method did report at least one zone and that the zones reported exactly cover the entire disk capacity, that is, that there are no missing zones at the end of the disk sector range. Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 0eff1f1a38a95b20fec83d0b69409c8da967fe1e Author: Pavel Begunkov Date: Sun Nov 22 15:35:48 2020 +0000 sbitmap: simplify wrap check __sbitmap_get_word() doesn't warp if it's starting from the beginning (i.e. initial hint is 0). Instead of stashing the original hint just set @wrap accordingly. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit c3250c8d2451ffbea14ba95164c59edd943ee4be Author: Pavel Begunkov Date: Sun Nov 22 15:35:47 2020 +0000 sbitmap: replace CAS with atomic and sbitmap_deferred_clear() does CAS loop to propagate cleared bits, replace it with equivalent atomic bitwise and. That's slightly faster and makes wait-free instead of lock-free as before. The atomic can be relaxed (i.e. barrier-less) because following sbitmap_get*() deal with synchronisation, see comments in sbitmap_queue_clear(). It's ok to cast to atomic_long_t, that's what bitops/lock.h does. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 661d4f55a79483aee4970a76e3bd9d4cdc74ac79 Author: Pavel Begunkov Date: Sun Nov 22 15:35:46 2020 +0000 sbitmap: remove swap_lock map->swap_lock protects map->cleared from concurrent modification, however sbitmap_deferred_clear() is already atomically drains it, so it's guaranteed to not loose bits on concurrent sbitmap_deferred_clear(). A one threaded tag heavy test on top of nullbk showed ~1.5% t-put increase, and 3% -> 1% cycle reduction of sbitmap_get() according to perf. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit b78beea038a3087df63bba7adaacb476a8ca95af Author: Pavel Begunkov Date: Sun Nov 22 15:35:45 2020 +0000 sbitmap: optimise sbitmap_deferred_clear() Because of spinlocks and atomics sbitmap_deferred_clear() have to reload &sb->map[index] on each access even though the map address won't change. Pass in sbitmap_word instead of {sb, index}, so it's cached in a variable. It also improves code generation of sbitmap_find_bit_in_index(). Signed-off-by: Pavel Begunkov Reviewed-by: John Garry Signed-off-by: Jens Axboe commit f6f371f7db42917c7b2a861c4fc923cb352ce5a1 Author: Pavel Begunkov Date: Sun Dec 6 14:04:39 2020 +0000 blk-mq: skip hybrid polling if iopoll doesn't spin If blk_poll() is not going to spin (i.e. @spin=false), it also must not sleep in hybrid polling, otherwise it might be pretty suprising for users trying to do a quick check and expecting no-wait behaviour. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit ace3804b69afa39d9445544843506eca59f3b4b2 Author: Can Guo Date: Wed Dec 2 04:04:03 2020 -0800 scsi: ufs: Print host regs in IRQ handler when AH8 error happens Dump registers and states prior to leaving IRQ handler when an AH8 error occurs. Link: https://lore.kernel.org/r/1606910644-21185-4-git-send-email-cang@codeaurora.org Reviewed-by: Stanley Chu Reviewed-by: Bao D. Nguyen Reviewed-by: Asutosh Das Reviewed-by: Hongwu Su Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit 7a7e66c65d4148fc3f23b058405bc9f102414fcb Author: Can Guo Date: Wed Dec 2 04:04:02 2020 -0800 scsi: ufs: Fix a race condition between ufshcd_abort() and eh_work() In current task abort routine, if task abort happens to the device W-LUN, the code directly jumps to ufshcd_eh_host_reset_handler() to perform a full reset and restore then returns FAIL or SUCCESS. Commands sent to the device W-LUN are most likely the SSU cmds sent during UFS PM operations. If such SSU cmd enters task abort routine when ufshcd_eh_host_reset_handler() flushes eh_work, it will get stuck there since err_handler is serialized with PM operations. In order to unblock above call path, we merely clean up the lrb taken by this cmd, queue the eh_work and return SUCCESS. Once the cmd is aborted, the PM operation which sends out the cmd just errors out, then err_handler shall be able to proceed with the full reset and restore. In this scenario, the cmd is aborted even before it is actually cleared by HW, set the lrb->in_use flag to prevent subsequent cmds, including SCSI cmds and dev cmds, from taking the lrb released from abort. The flag shall evetually be cleared in __ufshcd_transfer_req_compl() invoked by the full reset and restore from err_handler. [mkp: conflict with event logging series] Link: https://lore.kernel.org/r/1606910644-21185-3-git-send-email-cang@codeaurora.org Reviewed-by: Asutosh Das Reviewed-by: Stanley Chu Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit 88a92d6ae4fe09b2b27781178c5c9432d27b1ffb Author: Can Guo Date: Wed Dec 2 04:04:01 2020 -0800 scsi: ufs: Serialize eh_work with system PM events and async scan Serialize eh_work with system PM events and async scan to make sure eh_work does not run in parallel with them. Link: https://lore.kernel.org/r/1606910644-21185-2-git-send-email-cang@codeaurora.org Reviewed-by: Stanley Chu Reviewed-by: Asutosh Das Reviewed-by: Hongwu Su Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit d9a9280a0d0ae51dc1d4142138b99242b7ec8ac6 Author: Arnd Bergmann Date: Mon Oct 26 17:10:58 2020 +0100 seq_buf: Avoid type mismatch for seq_buf_init Building with W=2 prints a number of warnings for one function that has a pointer type mismatch: linux/seq_buf.h: In function 'seq_buf_init': linux/seq_buf.h:35:12: warning: pointer targets in assignment from 'unsigned char *' to 'char *' differ in signedness [-Wpointer-sign] Change the type in the function prototype according to the type in the structure. Link: https://lkml.kernel.org/r/20201026161108.3707783-1-arnd@kernel.org Fixes: 9a7777935c34 ("tracing: Convert seq_buf fields to be like seq_file fields") Reviewed-by: Cezary Rojewski Signed-off-by: Arnd Bergmann Signed-off-by: Steven Rostedt (VMware) commit 888834903d362b48c879ce8ab9966428367360c9 Author: Qiujun Huang Date: Thu Nov 12 23:18:00 2020 +0800 ring-buffer: Fix a typo in function description s/ring_buffer_commit_discard/ring_buffer_discard_commit/ Link: https://lkml.kernel.org/r/20201112151800.14382-1-hqjagain@gmail.com Signed-off-by: Qiujun Huang Signed-off-by: Steven Rostedt (VMware) commit 5b44a07b6bb2c26905b16deb479e9ba4e5605e97 Author: Stanley Chu Date: Wed Dec 2 17:18:19 2020 +0800 scsi: ufs: Remove pre-defined initial voltage values of device power UFS specficication allows different VCC configurations for UFS devices, for example: (1). 2.70V - 3.60V (Activated by default in UFS core driver) (2). 1.70V - 1.95V (Activated if "vcc-supply-1p8" is declared in device tree) (3). 2.40V - 2.70V (Supported since UFS 3.x) With the introduction of UFS 3.x products, an issue is happening that UFS driver will use wrong "min_uV-max_uV" values to configure the voltage of VCC regulator on UFU 3.x products with the configuration (3) used. To solve this issue, we simply remove pre-defined initial VCC voltage values in UFS core driver with below reasons, 1. UFS specifications do not define how to detect the VCC configuration supported by attached device. 2. Device tree already supports standard regulator properties. Therefore VCC voltage shall be defined correctly in device tree, and shall not changed by UFS driver. What UFS driver needs to do is simply enable or disable the VCC regulator only. Similar change is applied to VCCQ and VCCQ2 as well. Note that we keep struct ufs_vreg unchanged. This allows vendors to configure proper min_uV and max_uV of any regulators to make regulator_set_voltage() works during regulator toggling flow in the future. Without specific vendor configurations, min_uV and max_uV will be NULL by default and UFS core driver will enable or disable the regulator only without adjusting its voltage. Link: https://lore.kernel.org/r/20201202091819.22363-1-stanley.chu@mediatek.com Reviewed-by: Asutosh Das Reviewed-by: Bjorn Andersson Reviewed-by: Can Guo Acked-by: Avri Altman Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit a32ded3389abcc51a39fc7cb5f1793f7e5abaa88 Author: Lukas Bulwahn Date: Tue Nov 17 06:37:03 2020 +0100 ring-buffer: Remove obsolete rb_event_is_commit() Commit a389d86f7fd0 ("ring-buffer: Have nested events still record running time stamp") removed the only uses of rb_event_is_commit() in rb_update_event() and rb_update_write_stamp(). Hence, since then, make CC=clang W=1 warns: kernel/trace/ring_buffer.c:2763:1: warning: unused function 'rb_event_is_commit' [-Wunused-function] Remove this obsolete function. Link: https://lkml.kernel.org/r/20201117053703.11275-1-lukas.bulwahn@gmail.com Reviewed-by: Nathan Chancellor Signed-off-by: Lukas Bulwahn Signed-off-by: Steven Rostedt (VMware) commit ab98105484fc83dfaafc2d6f6411cd4e2b39423d Author: Stanley Chu Date: Sat Dec 5 20:00:41 2020 +0800 scsi: ufs-dwc: Use phy_initialization helper Use phy_initialization helper instead of direct invocation. Link: https://lore.kernel.org/r/20201205120041.26869-5-stanley.chu@mediatek.com Reviewed-by: Avri Altman Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 885445736bc099430c0529eb85cd9cc8d12f4848 Author: Stanley Chu Date: Sat Dec 5 20:00:40 2020 +0800 scsi: ufs-cdns: Use phy_initialization helper Use phy_initialization helper instead of direct function invocation. Link: https://lore.kernel.org/r/20201205120041.26869-4-stanley.chu@mediatek.com Reviewed-by: Avri Altman Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 92bcebe4b6d652e98ca2667e8e43c3d0a08f6afc Author: Stanley Chu Date: Sat Dec 5 20:00:39 2020 +0800 scsi: ufs: Introduce phy_initialization helper Introduce phy_initialization helper since this is the only one variant function without helper. Link: https://lore.kernel.org/r/20201205120041.26869-3-stanley.chu@mediatek.com Reviewed-by: Avri Altman Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit ade921a891de4c32ca31f5db95c2239ffb2b791d Author: Stanley Chu Date: Sat Dec 5 20:00:38 2020 +0800 scsi: ufs: Remove unused setup_regulators variant function Since setup_regulators variant function is not used by any vendors, simply remove it. Link: https://lore.kernel.org/r/20201205120041.26869-2-stanley.chu@mediatek.com Reviewed-by: Avri Altman Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit ca1bb061d64499d8aa08b0987643928a924c30bc Author: Stanley Chu Date: Sat Dec 5 19:59:01 2020 +0800 scsi: ufs-mediatek: Introduce event_notify implementation Introduce event_notify implementation on MediaTek UFS platform. A vendor-specific tracepoint is added that can be used for debugging purposes. Link: https://lore.kernel.org/r/20201205115901.26815-5-stanley.chu@mediatek.com Reviewed-by: Avri Altman Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 172614a9d0e861f8ad0e3165dd1d02bc63adaa1b Author: Stanley Chu Date: Sat Dec 5 19:59:00 2020 +0800 scsi: ufs: Introduce event_notify variant function Introduce event_notify variant function to allow vendor to get notification of important events and connect to any proprietary debugging facilities. Link: https://lore.kernel.org/r/20201205115901.26815-4-stanley.chu@mediatek.com Reviewed-by: Asutosh Das Reviewed-by: Can Guo Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit e965e5e00b23c47b7a9834436972aa37c5baa708 Author: Stanley Chu Date: Sat Dec 5 19:58:59 2020 +0800 scsi: ufs: Refine error history functions The UFS error history does not only have "history of errors" but also a log of some other events which are not defined as errors. This patch fixes the confused naming of related functions and changes the approach for updating and printing history in preparation of next patch. This patch does not change any functionality. Link: https://lore.kernel.org/r/20201205115901.26815-3-stanley.chu@mediatek.com Reviewed-by: Asutosh Das Reviewed-by: Can Guo Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit eb3d2611df2e37a5455818b72af3892f1209346b Author: Stanley Chu Date: Sat Dec 5 19:58:58 2020 +0800 scsi: ufs: Add error history for abort event in UFS Device W-LUN Add error history for abort event in UFS Device W-LUN. Use specified value as parameter of ufshcd_update_reg_hist() to identify the aborted tag or LUNs. Link: https://lore.kernel.org/r/20201205115901.26815-2-stanley.chu@mediatek.com Reviewed-by: Asutosh Das Reviewed-by: Can Guo Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 6dc1c7ab6f047f45b62986ffebc5324e86ed5f5a Author: Qinglang Miao Date: Fri Nov 20 15:48:52 2020 +0800 scsi: iscsi: Fix inappropriate use of put_device() kfree(conn) is called inside put_device(&conn->dev) which could lead to use-after-free. In addition, device_unregister() should be used here rather than put_deviceO(). Link: https://lore.kernel.org/r/20201120074852.31658-1-miaoqinglang@huawei.com Fixes: f3c893e3dbb5 ("scsi: iscsi: Fail session and connection on transport registration failure") Reported-by: Hulk Robot Reviewed-by: Mike Christie Signed-off-by: Qinglang Miao Signed-off-by: Martin K. Petersen commit 97031ccffa4f62728602bfea8439dd045cd3aeb2 Author: Zhang Qilong Date: Sat Dec 5 19:55:51 2020 +0800 scsi: pm80xx: Fix error return in pm8001_pci_probe() The driver did not return an error in the case where pm8001_configure_phy_settings() failed. Use rc to store the return value of pm8001_configure_phy_settings(). Link: https://lore.kernel.org/r/20201205115551.2079471-1-zhangqilong3@huawei.com Fixes: 279094079a44 ("[SCSI] pm80xx: Phy settings support for motherboard controller.") Acked-by: Jack Wang Signed-off-by: Zhang Qilong Signed-off-by: Martin K. Petersen commit 62eebd5247c4e4ce08826ad5995cf4dd7ce919dd Author: Qinglang Miao Date: Mon Nov 9 17:15:18 2020 +0800 scsi: qedi: Fix missing destroy_workqueue() on error in __qedi_probe Add the missing destroy_workqueue() before return from __qedi_probe in the error handling case when fails to create workqueue qedi->offload_thread. Link: https://lore.kernel.org/r/20201109091518.55941-1-miaoqinglang@huawei.com Fixes: ace7f46ba5fd ("scsi: qedi: Add QLogic FastLinQ offload iSCSI driver framework.") Reviewed-by: Mike Christie Signed-off-by: Qinglang Miao Signed-off-by: Martin K. Petersen commit fb8715157b6a16cf93a14109ebc8a6440a182a82 Author: Michael Walle Date: Thu Nov 5 20:27:46 2020 +0100 clk: fsl-sai: use devm_clk_hw_register_composite_pdata() Simplify the driver by using that helper and drop the remove() function. Signed-off-by: Michael Walle Link: https://lore.kernel.org/r/20201105192746.19564-4-michael@walle.cc Signed-off-by: Stephen Boyd commit 0eba770790426553f45b8643bcd77b854e045057 Author: Michael Walle Date: Thu Nov 5 20:27:45 2020 +0100 clk: composite: add devm_clk_hw_register_composite_pdata() This will simplify drivers which would only unregister the clk in their remove() op. Signed-off-by: Michael Walle Link: https://lore.kernel.org/r/20201105192746.19564-3-michael@walle.cc Signed-off-by: Stephen Boyd commit e81bed419f032824e7ddf8b5630153be6637e480 Author: Michael Walle Date: Thu Nov 5 20:27:44 2020 +0100 clk: fsl-sai: fix memory leak If the device is removed we don't unregister the composite clock. Fix that. Fixes: 9cd10205227c ("clk: fsl-sai: new driver") Signed-off-by: Michael Walle Link: https://lore.kernel.org/r/20201105192746.19564-2-michael@walle.cc Signed-off-by: Stephen Boyd commit b8bcece8a77fe0deedb7afc115881468d9c1617c Author: Geert Uytterhoeven Date: Tue Nov 10 16:47:50 2020 +0100 clk: qoriq: Add platform dependencies The Freescale QorIQ clock controller is only present on Freescale E500MC and Layerscape SoCs. Add platform dependencies to the CLK_QORIQ config symbol, to avoid asking the user about it when configuring a kernel without E500MC or Layerscape support. Signed-off-by: Geert Uytterhoeven Acked-by: Arnd Bergmann Acked-by: Li Yang Link: https://lore.kernel.org/r/20201110154750.3285411-1-geert+renesas@glider.be Signed-off-by: Stephen Boyd commit 047b04201f628c038cdf4879ed51513215dd8780 Author: Geert Uytterhoeven Date: Tue Nov 10 16:51:17 2020 +0100 xtensa: Replace by The Xtensa time 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 Acked-by: Max Filippov Link: https://lore.kernel.org/r/20201110155117.3286247-1-geert+renesas@glider.be Signed-off-by: Stephen Boyd commit 16a30ba15cd782e95fc57e87c2c4515778d3b493 Author: Geert Uytterhoeven Date: Tue Nov 10 16:50:29 2020 +0100 sh: boards: Replace by The SuperH/J2 DT 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 Link: https://lore.kernel.org/r/20201110155029.3286090-1-geert+renesas@glider.be Signed-off-by: Stephen Boyd commit 3af2c1a48c037adc1e4da92315e72f023d9b3370 Author: Gustavo Pimentel Date: Thu Nov 19 00:18:39 2020 +0100 dt-bindings: Fix typo on the DesignWare IP reset bindings documentation This patch removes a loose "i" character is present on the current documentation. Signed-off-by: Gustavo Pimentel Link: https://lore.kernel.org/r/89719d8d40048e9b7baa0cd984b5bb108d056de4.1605741519.git.gustavo.pimentel@synopsys.com Signed-off-by: Rob Herring commit 96993a59f94db89a3ff0110dc9e3a2af03a1da8b Author: Cristian Ciocaltea Date: Wed Nov 18 17:20:50 2020 +0200 dt-bindings: Fix error in 'make dtbs_check' when using DT_SCHEMA_FILES If DT_SCHEMA_FILES is specified and contains more than one file paths, 'make dtbs_check' fails with the following message: $ make dtbs_check DT_SCHEMA_FILES="path/to/schema1.yaml path/to/schema2.yaml" SCHEMA Documentation/devicetree/bindings/processed-schema.json Documentation/devicetree/bindings/Makefile:77: recipe for target 'Documentation/devicetree/bindings/processed-schema.json' failed make[1]: *** [Documentation/devicetree/bindings/processed-schema.json] Error 255 make[1]: *** Deleting file 'Documentation/devicetree/bindings/processed-schema.json' Makefile:1364: recipe for target 'dt_binding_check' failed make: *** [dt_binding_check] Error 2 The error code 255 is returned by 'dt-mk-schema' when invoked as 'dt-mk-schema -j -u @', where '' is a temporary file that is generated to contain a list of SPACE delimited schema file paths, as indicated via DT_SCHEMA_FILES. However, it seems the file format has been recently changed in 'dt-mk-schema', which now expects each schema path to be provided on a separate line: $ dt-mk-schema --version 2020.12.dev4+g6de1c45 Therefore, let's change '' content format from path/to/schema1.yaml path/to/schema2.yaml ... path/to/schemaN.yaml to path/to/schema1.yaml path/to/schema2.yaml ... path/to/schemaN.yaml Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/2519b8bde507ca6ccea9765ea197adaaa69a66d5.1605712328.git.cristian.ciocaltea@gmail.com Signed-off-by: Rob Herring commit 88f4ede44c585b24674dd99841040b2a1a856a76 Author: Xingxing Su Date: Fri Nov 27 11:16:57 2020 +0800 selftests/clone3: Fix build error When compiling the selftests with the -std=gnu99 option the build can fail with. Following build error: test_core.c: In function ‘test_cgcore_destroy’: test_core.c:87:2: error: ‘for’ loop initial declarations are only allowed in C99 mode for (int i = 0; i < 10; i++) { ^ test_core.c:87:2: note: use option -std=c99 or -std=gnu99 to compile Add -std=gnu99 to the clone3 selftest Makefile to fix this. Signed-off-by: Xingxing Su Acked-by: Christian Brauner Signed-off-by: Shuah Khan commit f4ac0c5639b75ef25071affe746b1e70d6d23e09 Merge: 3650b228f83ad caa2fd752ecb8 Author: Stephen Boyd Date: Mon Dec 7 13:26:51 2020 -0800 Merge tag 'v5.11-rockchip-clk-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into clk-rockchip Pull Rockchip clk driver updates from Heiko Stuebner: Added arch-dependencies for the newly added per-soc config symbols, an unneeded redundancy removed and making i2s actually work on the rk3066. * tag 'v5.11-rockchip-clk-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: clk: rockchip: fix i2s gate bits on rk3066 and rk3188 clk: rockchip: add CLK_SET_RATE_PARENT to sclk for rk3066a i2s and uart clocks clk: rockchip: Remove redundant null check before clk_prepare_enable clk: rockchip: Add appropriate arch dependencies commit cadd53122ae8b1fa08285ee1c61edd1341bfe2db Merge: 3650b228f83ad 88b9ae600138b Author: Stephen Boyd Date: Mon Dec 7 13:24:15 2020 -0800 Merge tag 'clk-meson-v5.11-1' of https://github.com/BayLibre/clk-meson into clk-amlogic Pull Amlogic clk driver updates from Jerome Brunet: - Add MIPI DSI clocks for axg and g12 - Make it possible to build controllers as modules - Fix Video PLL clock dependency * tag 'clk-meson-v5.11-1' of https://github.com/BayLibre/clk-meson: clk: meson: g12a: add MIPI DSI Host Pixel Clock dt-bindings: clk: g12a-clkc: add DSI Pixel clock bindings clk: meson: enable building as modules clk: meson: Kconfig: fix dependency for G12A clk: meson: axg: add MIPI DSI Host clock clk: meson: axg: add Video Clocks dt-bindings: clk: axg-clkc: add MIPI DSI Host clock binding dt-bindings: clk: axg-clkc: add Video Clocks clk: meson: g12: use devm variant to register notifiers clk: add devm variant of clk_notifier_register clk: meson: g12: drop use of __clk_lookup() clk: add api to get clk consumer from clk_hw clk: avoid devm_clk_release name clash commit 6f39cecdb6018234a47dcea15121f01b9903d16b Author: Xingxing Su Date: Wed Nov 25 12:04:57 2020 +0800 rseq/selftests: Fix MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ build error under other arch. Except arch x86, the function rseq_offset_deref_addv is not defined. The function test_membarrier_manager_thread call rseq_offset_deref_addv produces a build error. The RSEQ_ARCH_HAS_OFFSET_DEREF_ADD should contain all the code for the MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ. If the other Arch implements this feature, defined RSEQ_ARCH_HAS_OFFSET_DEREF_ADD in the header file to ensure that this feature is available. Following build errors: param_test.c: In function ‘test_membarrier_worker_thread’: param_test.c:1164:10: warning: implicit declaration of function ‘rseq_offset_deref_addv’ ret = rseq_offset_deref_addv(&args->percpu_list_ptr, ^~~~~~~~~~~~~~~~~~~~~~ /tmp/ccMj9yHJ.o: In function `test_membarrier_worker_thread': param_test.c:1164: undefined reference to `rseq_offset_deref_addv' param_test.c:1164: undefined reference to `rseq_offset_deref_addv' collect2: error: ld returned 1 exit status make: *** [/selftests/rseq/param_test_benchmark] Error 1 Signed-off-by: Xingxing Su Acked-by: Mathieu Desnoyers Signed-off-by: Shuah Khan commit 332dde0a5864bc3f00898b24bf3a21f46f702076 Author: Krzysztof Kozlowski Date: Tue Nov 17 21:17:52 2020 +0100 dt-bindings: arm: vt8500: remove redundant white-spaces Remove redundant white-spaces, no functional change. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201117201752.129766-1-krzk@kernel.org Signed-off-by: Rob Herring commit e1868b9e36d0ca52e4e7c6c06953f191446e44df Author: Eric Dumazet Date: Mon Dec 7 10:28:21 2020 -0800 bpf: Avoid overflows involving hash elem_size Use of bpf_map_charge_init() was making sure hash tables would not use more than 4GB of memory. Since the implicit check disappeared, we have to be more careful about overflows, to support big hash tables. syzbot triggers a panic using : bpf(BPF_MAP_CREATE, {map_type=BPF_MAP_TYPE_LRU_HASH, key_size=16384, value_size=8, max_entries=262200, map_flags=0, inner_map_fd=-1, map_name="", map_ifindex=0, btf_fd=-1, btf_key_type_id=0, btf_value_type_id=0, btf_vmlinux_value_type_id=0}, 64) = ... BUG: KASAN: vmalloc-out-of-bounds in bpf_percpu_lru_populate kernel/bpf/bpf_lru_list.c:594 [inline] BUG: KASAN: vmalloc-out-of-bounds in bpf_lru_populate+0x4ef/0x5e0 kernel/bpf/bpf_lru_list.c:611 Write of size 2 at addr ffffc90017e4a020 by task syz-executor.5/19786 CPU: 0 PID: 19786 Comm: syz-executor.5 Not tainted 5.10.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+0x107/0x163 lib/dump_stack.c:118 print_address_description.constprop.0.cold+0x5/0x4c8 mm/kasan/report.c:385 __kasan_report mm/kasan/report.c:545 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:562 bpf_percpu_lru_populate kernel/bpf/bpf_lru_list.c:594 [inline] bpf_lru_populate+0x4ef/0x5e0 kernel/bpf/bpf_lru_list.c:611 prealloc_init kernel/bpf/hashtab.c:319 [inline] htab_map_alloc+0xf6e/0x1230 kernel/bpf/hashtab.c:507 find_and_alloc_map kernel/bpf/syscall.c:123 [inline] map_create kernel/bpf/syscall.c:829 [inline] __do_sys_bpf+0xa81/0x5170 kernel/bpf/syscall.c:4336 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45deb9 Code: 0d b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 db b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fd93fbc0c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 0000000000001a40 RCX: 000000000045deb9 RDX: 0000000000000040 RSI: 0000000020000280 RDI: 0000000000000000 RBP: 000000000119bf60 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000119bf2c R13: 00007ffc08a7be8f R14: 00007fd93fbc19c0 R15: 000000000119bf2c Fixes: 755e5d55367a ("bpf: Eliminate rlimit-based memory accounting for hashtab maps") Reported-by: syzbot Signed-off-by: Eric Dumazet Signed-off-by: Alexei Starovoitov Acked-by: Roman Gushchin Link: https://lore.kernel.org/bpf/20201207182821.3940306-1-eric.dumazet@gmail.com commit df4ad53242158f9f1f97daf4feddbb4f8b77f080 Author: Dongsheng Yang Date: Tue Dec 8 00:39:15 2020 +0800 bcache: fix race between setting bdev state to none and new write request direct to backing There is a race condition in detaching as below: A. detaching B. Write request (1) writing back (2) write back done, set bdev state to clean. (3) cached_dev_put() and schedule_work(&dc->detach); (4) write data [0 - 4K] directly into backing and ack to user. (5) power-failure... When we restart this bcache device, this bdev is clean but not detached, and read [0 - 4K], we will get unexpected old data from cache device. To fix this problem, set the bdev state to none when we writeback done in detaching, and then if power-failure happened as above, the data in cache will not be used in next bcache device starting, it's detached, we will read the correct data from backing derectly. Signed-off-by: Dongsheng Yang Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 926f75f6a9ef503d45dced061e304d0324beeba1 Author: Baolin Wang Date: Thu Nov 26 16:16:15 2020 +0800 blk-iocost: Factor out the base vrate change into a separate function Factor out the base vrate change code into a separate function to fimplify the ioc_timer_fn(). No functional change. Signed-off-by: Baolin Wang Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit 2474787a75b4f358e81f367653c73edecd67aa2d Author: Baolin Wang Date: Thu Nov 26 16:16:14 2020 +0800 blk-iocost: Factor out the active iocgs' state check into a separate function Factor out the iocgs' state check into a separate function to simplify the ioc_timer_fn(). No functional change. Signed-off-by: Baolin Wang Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit c09245f61c6ac4ef253a5fcf97e5bcfc0ce25fc7 Author: Baolin Wang Date: Thu Nov 26 16:16:13 2020 +0800 blk-iocost: Move the usage ratio calculation to the correct place We only use the hweight based usage ratio to calculate the new hweight_inuse of the iocg to decide if this iocg can donate some surplus vtime. Thus move the usage ratio calculation to the correct place to avoid unnecessary calculation for some vtime shortage iocgs. Signed-off-by: Baolin Wang Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit 647c9f03b2b66cf1f505208c313998fc833ed28b Author: Baolin Wang Date: Thu Nov 26 16:16:12 2020 +0800 blk-iocost: Remove unnecessary advance declaration Remove unnecessary advance declaration of struct ioc_gq. Signed-off-by: Baolin Wang Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit 5ba1add216fe82289769045627d97f233bbcc645 Author: Baolin Wang Date: Thu Nov 26 16:16:11 2020 +0800 blk-iocost: Fix some typos in comments Fix some typos in comments. Signed-off-by: Baolin Wang Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit 45dc656aeb4d50e6a4b2ca110345fb0c96cf1189 Author: Christoph Hellwig Date: Mon Dec 7 14:40:48 2020 +0100 blktrace: fix up a kerneldoc comment Fixes: a54895fa057c ("block: remove the request_queue to argument request based tracepoints") Reported-by: Stephen Rothwell Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit c9624cb7db1c418cbdc8fd2cde6835f83cd0f8a2 Author: Mike Travis Date: Fri Nov 27 21:42:27 2020 -0600 x86/platform/uv: Update sysfs documentation Update sysfs documentation file to include moved /proc leaves. Signed-off-by: Mike Travis Signed-off-by: Borislav Petkov Acked-by: Hans de Goede Link: https://lkml.kernel.org/r/20201128034227.120869-6-mike.travis@hpe.com commit 0583531bb9ef30a5c4ce00b4ee10b6707768eead Author: Sebastian Andrzej Siewior Date: Fri Dec 4 18:42:56 2020 +0100 RDMA/iser: Remove in_interrupt() usage iser_initialize_task_headers() uses in_interrupt() to find out if it is safe to acquire a mutex. in_interrupt() is deprecated as it is ill defined and does not provide what it suggests. Aside of that it covers only parts of the contexts in which a mutex may not be acquired. The following callchains exist: iscsi_queuecommand() *locks* iscsi_session::frwd_lock -> iscsi_prep_scsi_cmd_pdu() -> session->tt->init_task() (iscsi_iser_task_init()) -> iser_initialize_task_headers() -> iscsi_iser_task_xmit() (iscsi_transport::xmit_task) -> iscsi_iser_task_xmit_unsol_data() -> iser_send_data_out() -> iser_initialize_task_headers() iscsi_data_xmit() *locks* iscsi_session::frwd_lock -> iscsi_prep_mgmt_task() -> session->tt->init_task() (iscsi_iser_task_init()) -> iser_initialize_task_headers() -> iscsi_prep_scsi_cmd_pdu() -> session->tt->init_task() (iscsi_iser_task_init()) -> iser_initialize_task_headers() __iscsi_conn_send_pdu() caller has iscsi_session::frwd_lock -> iscsi_prep_mgmt_task() -> session->tt->init_task() (iscsi_iser_task_init()) -> iser_initialize_task_headers() -> session->tt->xmit_task() ( The only callchain that is close to be invoked in preemptible context: iscsi_xmitworker() worker -> iscsi_data_xmit() -> iscsi_xmit_task() -> conn->session->tt->xmit_task() (iscsi_iser_task_xmit() In iscsi_iser_task_xmit() there is this check: if (!task->sc) return iscsi_iser_mtask_xmit(conn, task); so it does end up in iser_initialize_task_headers() and iser_initialize_task_headers() relies on iscsi_task::sc == NULL. Remove conditional locking of iser_conn::state_mutex because there is no call chain to do so. Remove the goto label and return early now that there is no clean up needed. Link: https://lore.kernel.org/r/20201204174256.62xfcvudndt7oufl@linutronix.de Signed-off-by: Sebastian Andrzej Siewior Cc: Sagi Grimberg Cc: Max Gurtovoy Cc: Doug Ledford Cc: Jason Gunthorpe Cc: linux-rdma@vger.kernel.org Signed-off-by: Jason Gunthorpe commit ca991a7d14d4835b302bcd182fdbf54470f45520 Author: Maor Gottlieb Date: Thu Dec 3 21:08:07 2020 +0200 RDMA/mlx5: Assign dev to DM MR Currently, DM MR registration flow doesn't set the mlx5_ib_dev pointer and can cause a NULL pointer dereference if userspace dumps the MR via rdma tool. Assign the IB device together with the other fields and remove the redundant reference of mlx5_ib_dev from mlx5_ib_mr. Cc: stable@vger.kernel.org Fixes: 6c29f57ea475 ("IB/mlx5: Device memory mr registration support") Link: https://lore.kernel.org/r/20201203190807.127189-1-leon@kernel.org Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 53ef4999f07d9c75cdc8effb0cc8c581dc39b1a1 Author: Weihang Li Date: Wed Dec 2 09:29:20 2020 +0800 RDMA/hns: Move capability flags of QP and CQ to hns-abi.h These flags will be returned to the userspace through ABI, so they should be defined in hns-abi.h. Furthermore, there is no need to include hns-abi.h in every source files, it just needs to be included in the common header file. Link: https://lore.kernel.org/r/1606872560-17823-1-git-send-email-liweihang@huawei.com Reported-by: kernel test robot Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 2988ca08ba65848f2705023b054fd8bfc0109c38 Author: Mauro Carvalho Chehab Date: Tue Dec 1 13:08:55 2020 +0100 IB: Fix kernel-doc markups Some functions have different names between their prototypes and the kernel-doc markup. Others need to be fixed, as kernel-doc markups should use this format: identifier - description Link: https://lore.kernel.org/r/78b98c41a5a0f4c0106433d305b143028a4168b0.1606823973.git.mchehab+huawei@kernel.org Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jason Gunthorpe commit c63e1c4dfc33d1bdae395ee8fbcbfad4830b12c0 Author: Selvin Xavier Date: Mon Nov 30 05:13:06 2020 -0800 RDMA/bnxt_re: Fix max_qp_wrs reported While creating qps, the driver adds one extra entry to the sq size passed by the ULPs in order to avoid queue full condition. When ULPs creates QPs with max_qp_wr reported, driver creates QP with 1 more than the max_wqes supported by HW. Create QP fails in this case. To avoid this error, reduce 1 entry in max_qp_wqes and report it to the stack. Link: https://lore.kernel.org/r/1606741986-16477-1-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Devesh Sharma Signed-off-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit c277f98b3e3e2cc3e28836bf4125a95dc0e1dd54 Author: Yejune Deng Date: Mon Nov 30 16:52:56 2020 +0800 RDMA/i40iw: Replace atomic_add_return(1, ..) atomic_inc_return() is a little neater Link: https://lore.kernel.org/r/1606726376-7675-1-git-send-email-yejune.deng@gmail.com Signed-off-by: Yejune Deng Signed-off-by: Jason Gunthorpe commit 9c0c17c611ed2e8373279e33aaa4cb7c1f8a01d8 Merge: ef3642c4f54d3 617b860c18758 Author: Jason Gunthorpe Date: Mon Dec 7 15:36:04 2020 -0400 Merge tag 'mlx5-next-2020-12-02' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux Saeed Mahameed says: ==================== mlx5-next-2020-12-02 Low level mlx5 updates required by both netdev and rdma trees: net/mlx5: Treat host PF vport as other (non eswitch manager) vport net/mlx5: Enable host PF HCA after eswitch is initialized net/mlx5: Rename peer_pf to host_pf net/mlx5: Make API mlx5_core_is_ecpf accept const pointer net/mlx5: Export steering related functions net/mlx5: Expose other function ifc bits net/mlx5: Expose IP-in-IP TX and RX capability bits net/mlx5: Update the hardware interface definition for vhca state net/mlx5: Update the list of the PCI supported devices net/mlx5: Avoid exposing driver internal command helpers net/mlx5: Add ts_cqe_to_dest_cqn related bits net/mlx5: Add misc4 to mlx5_ifc_fte_match_param_bits net/mlx5: Check dr mask size against mlx5_match_param size net/mlx5: Add sampler destination type net/mlx5: Add sample offload hardware bits and structures ==================== Link: https://lore.kernel.org/r/20201203011010.213440-1-saeedm@nvidia.com Signed-off-by: Jason Gunthorpe commit 9e454e37dc7c0ee9e108d70b983e7a71332aedff Author: Stefan Agner Date: Mon Dec 7 18:58:03 2020 +0100 arm64: dts: meson: g12b: w400: fix PHY deassert timing requirements According to the datasheet (Rev. 1.9) the RTL8211F requires at least 72ms "for internal circuits settling time" before accessing the PHY egisters. On similar boards with the same PHY this fixes an issue where Ethernet link would not come up when using ip link set down/up. Fixes: 2cd2310fca4c ("arm64: dts: meson-g12b-ugoos-am6: add initial device-tree") Reviewed-by: Martin Blumenstingl Signed-off-by: Stefan Agner Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/46298e66572784c44f873f1b71cc4ab3d8fc5aa6.1607363522.git.stefan@agner.ch commit 3d07c3b3a886fefd583c1b485b5e4e3c4e2da493 Author: Stefan Agner Date: Mon Dec 7 18:58:02 2020 +0100 arm64: dts: meson: g12a: x96-max: fix PHY deassert timing requirements According to the datasheet (Rev. 1.9) the RTL8211F requires at least 72ms "for internal circuits settling time" before accessing the PHY registers. On similar boards with the same PHY this fixes an issue where Ethernet link would not come up when using ip link set down/up. Fixes: ed5e8f689154 ("arm64: dts: meson: g12a: x96-max: fix the Ethernet PHY reset line") Reviewed-by: Martin Blumenstingl Signed-off-by: Stefan Agner Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/12506964ca5d5f936579a280ad0a7e7f9a0a2d4c.1607363522.git.stefan@agner.ch commit 656ab1bdcd2b755dc161a9774201100d5bf74b8d Author: Stefan Agner Date: Mon Dec 7 18:58:01 2020 +0100 ARM: dts: meson: fix PHY deassert timing requirements According to the datasheet (Rev. 1.9) the RTL8211F requires at least 72ms "for internal circuits settling time" before accessing the PHY registers. On similar boards with the same PHY this fixes an issue where Ethernet link would not come up when using ip link set down/up. Fixes: a2c6e82e5341 ("ARM: dts: meson: switch to the generic Ethernet PHY reset bindings") Reviewed-by: Martin Blumenstingl Tested-by: Martin Blumenstingl # on Odroid-C1+ Signed-off-by: Stefan Agner Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/ff78772b306411e145769c46d4090554344db41e.1607363522.git.stefan@agner.ch commit c183c406c4321002fe85b345b51bc1a3a04b6d33 Author: Stefan Agner Date: Mon Dec 7 18:58:00 2020 +0100 arm64: dts: meson: fix PHY deassert timing requirements According to the datasheet (Rev. 1.9) the RTL8211F requires at least 72ms "for internal circuits settling time" before accessing the PHY registers. This fixes an issue seen on ODROID-C2 where the Ethernet link doesn't come up when using ip link set down/up: [ 6630.714855] meson8b-dwmac c9410000.ethernet eth0: Link is Down [ 6630.785775] meson8b-dwmac c9410000.ethernet eth0: PHY [stmmac-0:00] driver [RTL8211F Gigabit Ethernet] (irq=36) [ 6630.893071] meson8b-dwmac c9410000.ethernet: Failed to reset the dma [ 6630.893800] meson8b-dwmac c9410000.ethernet eth0: stmmac_hw_setup: DMA engine initialization failed [ 6630.902835] meson8b-dwmac c9410000.ethernet eth0: stmmac_open: Hw setup failed Fixes: f29cabf240ed ("arm64: dts: meson: use the generic Ethernet PHY reset GPIO bindings") Reviewed-by: Martin Blumenstingl Signed-off-by: Stefan Agner Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/4a322c198b86e4c8b3dda015560a683babea4d63.1607363522.git.stefan@agner.ch commit 1c7412530d5d0e0a0b27f1642f5c13c8b9f36f05 Author: Stefan Agner Date: Mon Dec 7 18:57:59 2020 +0100 arm64: dts: meson: g12b: odroid-n2: fix PHY deassert timing requirements According to the datasheet (Rev. 1.9) the RTL8211F requires at least 72ms "for internal circuits settling time" before accessing the PHY registers. This fixes an issue where the Ethernet link doesn't come up when using ip link set down/up: [ 29.360965] meson8b-dwmac ff3f0000.ethernet eth0: Link is Down [ 34.569012] meson8b-dwmac ff3f0000.ethernet eth0: PHY [0.0:00] driver [RTL8211F Gigabit Ethernet] (irq=31) [ 34.676732] meson8b-dwmac ff3f0000.ethernet: Failed to reset the dma [ 34.678874] meson8b-dwmac ff3f0000.ethernet eth0: stmmac_hw_setup: DMA engine initialization failed [ 34.687850] meson8b-dwmac ff3f0000.ethernet eth0: stmmac_open: Hw setup failed Fixes: 658e4129bb81 ("arm64: dts: meson: g12b: odroid-n2: add the Ethernet PHY reset line") Reviewed-by: Martin Blumenstingl Signed-off-by: Stefan Agner Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/df3f5c4fc6e43c55429fd3662a636036a21eed49.1607363522.git.stefan@agner.ch commit 8ae954caf49ac403c177d117fb8e05cbc866aa3c Author: Niklas Söderlund Date: Sat Dec 5 03:19:20 2020 +0100 clocksource/drivers/sh_cmt: Fix potential deadlock when calling runtime PM The ch->lock is used to protect the whole enable() and read() of sh_cmt's implementation of struct clocksource. The enable() implementation calls pm_runtime_get_sync() which may result in the clock source to be read() triggering a cyclic lockdep warning for the ch->lock. The sh_cmt driver implement its own balancing of calls to sh_cmt_{enable,disable}() with flags in sh_cmt_{start,stop}(). It does this to deal with that start and stop are shared between the clock source and clock event providers. While this could be improved on verifying corner cases based on any substantial rework on all devices this driver supports might prove hard. As a first step separate the PM handling for clock event and clock source. Always put/get the device when enabling/disabling the clock source but keep the clock event logic unchanged. This allows the sh_cmt implementation of struct clocksource to call PM without holding the ch->lock and avoiding the deadlock. Triggering and log of the deadlock warning, # echo e60f0000.timer > /sys/devices/system/clocksource/clocksource0/current_clocksource [ 46.948370] ====================================================== [ 46.954730] WARNING: possible circular locking dependency detected [ 46.961094] 5.10.0-rc6-arm64-renesas-00001-g0e5fd7414e8b #36 Not tainted [ 46.967985] ------------------------------------------------------ [ 46.974342] migration/0/11 is trying to acquire lock: [ 46.979543] ffff0000403ed220 (&dev->power.lock){-...}-{2:2}, at: __pm_runtime_resume+0x40/0x74 [ 46.988445] [ 46.988445] but task is already holding lock: [ 46.994441] ffff000040ad0298 (&ch->lock){....}-{2:2}, at: sh_cmt_start+0x28/0x210 [ 47.002173] [ 47.002173] which lock already depends on the new lock. [ 47.002173] [ 47.010573] [ 47.010573] the existing dependency chain (in reverse order) is: [ 47.018262] [ 47.018262] -> #3 (&ch->lock){....}-{2:2}: [ 47.024033] lock_acquire.part.0+0x120/0x330 [ 47.028970] lock_acquire+0x64/0x80 [ 47.033105] _raw_spin_lock_irqsave+0x7c/0xc4 [ 47.038130] sh_cmt_start+0x28/0x210 [ 47.042352] sh_cmt_clocksource_enable+0x28/0x50 [ 47.047644] change_clocksource+0x9c/0x160 [ 47.052402] multi_cpu_stop+0xa4/0x190 [ 47.056799] cpu_stopper_thread+0x90/0x154 [ 47.061557] smpboot_thread_fn+0x244/0x270 [ 47.066310] kthread+0x154/0x160 [ 47.070175] ret_from_fork+0x10/0x20 [ 47.074390] [ 47.074390] -> #2 (tk_core.seq.seqcount){----}-{0:0}: [ 47.081136] lock_acquire.part.0+0x120/0x330 [ 47.086070] lock_acquire+0x64/0x80 [ 47.090203] seqcount_lockdep_reader_access.constprop.0+0x74/0x100 [ 47.097096] ktime_get+0x28/0xa0 [ 47.100960] hrtimer_start_range_ns+0x210/0x2dc [ 47.106164] generic_sched_clock_init+0x70/0x88 [ 47.111364] sched_clock_init+0x40/0x64 [ 47.115853] start_kernel+0x494/0x524 [ 47.120156] [ 47.120156] -> #1 (hrtimer_bases.lock){-.-.}-{2:2}: [ 47.126721] lock_acquire.part.0+0x120/0x330 [ 47.136042] lock_acquire+0x64/0x80 [ 47.144461] _raw_spin_lock_irqsave+0x7c/0xc4 [ 47.153721] hrtimer_start_range_ns+0x68/0x2dc [ 47.163054] rpm_suspend+0x308/0x5dc [ 47.171473] rpm_idle+0xc4/0x2a4 [ 47.179550] pm_runtime_work+0x98/0xc0 [ 47.188209] process_one_work+0x294/0x6f0 [ 47.197142] worker_thread+0x70/0x45c [ 47.205661] kthread+0x154/0x160 [ 47.213673] ret_from_fork+0x10/0x20 [ 47.221957] [ 47.221957] -> #0 (&dev->power.lock){-...}-{2:2}: [ 47.236292] check_noncircular+0x128/0x140 [ 47.244907] __lock_acquire+0x13b0/0x204c [ 47.253332] lock_acquire.part.0+0x120/0x330 [ 47.262033] lock_acquire+0x64/0x80 [ 47.269826] _raw_spin_lock_irqsave+0x7c/0xc4 [ 47.278430] __pm_runtime_resume+0x40/0x74 [ 47.286758] sh_cmt_start+0x84/0x210 [ 47.294537] sh_cmt_clocksource_enable+0x28/0x50 [ 47.303449] change_clocksource+0x9c/0x160 [ 47.311783] multi_cpu_stop+0xa4/0x190 [ 47.319720] cpu_stopper_thread+0x90/0x154 [ 47.328022] smpboot_thread_fn+0x244/0x270 [ 47.336298] kthread+0x154/0x160 [ 47.343708] ret_from_fork+0x10/0x20 [ 47.351445] [ 47.351445] other info that might help us debug this: [ 47.351445] [ 47.370225] Chain exists of: [ 47.370225] &dev->power.lock --> tk_core.seq.seqcount --> &ch->lock [ 47.370225] [ 47.392003] Possible unsafe locking scenario: [ 47.392003] [ 47.405314] CPU0 CPU1 [ 47.413569] ---- ---- [ 47.421768] lock(&ch->lock); [ 47.428425] lock(tk_core.seq.seqcount); [ 47.438701] lock(&ch->lock); [ 47.447930] lock(&dev->power.lock); [ 47.455172] [ 47.455172] *** DEADLOCK *** [ 47.455172] [ 47.471433] 3 locks held by migration/0/11: [ 47.479099] #0: ffff8000113c9278 (timekeeper_lock){-.-.}-{2:2}, at: change_clocksource+0x2c/0x160 [ 47.491834] #1: ffff8000113c8f88 (tk_core.seq.seqcount){----}-{0:0}, at: multi_cpu_stop+0xa4/0x190 [ 47.504727] #2: ffff000040ad0298 (&ch->lock){....}-{2:2}, at: sh_cmt_start+0x28/0x210 [ 47.516541] [ 47.516541] stack backtrace: [ 47.528480] CPU: 0 PID: 11 Comm: migration/0 Not tainted 5.10.0-rc6-arm64-renesas-00001-g0e5fd7414e8b #36 [ 47.542147] Hardware name: Renesas Salvator-X 2nd version board based on r8a77965 (DT) [ 47.554241] Call trace: [ 47.560832] dump_backtrace+0x0/0x190 [ 47.568670] show_stack+0x14/0x30 [ 47.576144] dump_stack+0xe8/0x130 [ 47.583670] print_circular_bug+0x1f0/0x200 [ 47.592015] check_noncircular+0x128/0x140 [ 47.600289] __lock_acquire+0x13b0/0x204c [ 47.608486] lock_acquire.part.0+0x120/0x330 [ 47.616953] lock_acquire+0x64/0x80 [ 47.624582] _raw_spin_lock_irqsave+0x7c/0xc4 [ 47.633114] __pm_runtime_resume+0x40/0x74 [ 47.641371] sh_cmt_start+0x84/0x210 [ 47.649115] sh_cmt_clocksource_enable+0x28/0x50 [ 47.657916] change_clocksource+0x9c/0x160 [ 47.666165] multi_cpu_stop+0xa4/0x190 [ 47.674056] cpu_stopper_thread+0x90/0x154 [ 47.682308] smpboot_thread_fn+0x244/0x270 [ 47.690560] kthread+0x154/0x160 [ 47.697927] ret_from_fork+0x10/0x20 [ 47.708447] clocksource: Switched to clocksource e60f0000.timer Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201205021921.1456190-2-niklas.soderlund+renesas@ragnatech.se commit c993c4e84369acf5686a6f345ebb0efb0107f73e Author: Christian Hewitt Date: Thu Dec 3 06:16:05 2020 +0000 arm64: dts: meson: minor fixups for Khadas VIM/VIM2 dts Reorder the VIM/VIM2 includes/bindings to follow the format of other dts in the Amlogic tree and remove a stray empty line in the VIM2 dts. Signed-off-by: Christian Hewitt Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20201203061605.9603-1-christianshewitt@gmail.com commit 5e3ee48ea072a6fd2c46c552d013e047dc54d1c6 Author: Christian Hewitt Date: Thu Dec 3 06:00:23 2020 +0000 arm64: dts: meson: add audio playback to wetek-play2 Add initial support limited to HDMI i2s and SPDIF (LPCM). Signed-off-by: Christian Hewitt Acked-by: Jerome Brunet Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20201203060023.9454-8-christianshewitt@gmail.com commit e0d9e6eead35be9842aae14f424f2d2ab0be0678 Author: Christian Hewitt Date: Thu Dec 3 06:00:22 2020 +0000 arm64: dts: meson: add audio playback to wetek-hub Add initial audio support limited to HDMI i2s. Signed-off-by: Christian Hewitt Acked-by: Jerome Brunet Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20201203060023.9454-7-christianshewitt@gmail.com commit ba414bc5484873bb157e63ba8684d59e27feaeb2 Author: Christian Hewitt Date: Thu Dec 3 06:00:21 2020 +0000 arm64: dts: meson: add audio playback to odroid-c2 Add initial audio support limited to HDMI i2s. Signed-off-by: Christian Hewitt Acked-by: Jerome Brunet Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20201203060023.9454-6-christianshewitt@gmail.com commit 6a74f78c34e7503e35da724cdc555f26ea8d1cd1 Author: Christian Hewitt Date: Thu Dec 3 06:00:20 2020 +0000 arm64: dts: meson: add audio playback to nanopi-k2 Add initial audio support limited to HDMI i2s. Signed-off-by: Christian Hewitt Acked-by: Jerome Brunet Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20201203060023.9454-5-christianshewitt@gmail.com commit 0157e1a63c7685dfeee4e7cfd22635ebf104f64f Author: Christian Hewitt Date: Thu Dec 3 06:00:19 2020 +0000 arm64: dts: meson: add audio playback to khadas-vim2 Add initial audio support limited to HDMI i2s. Signed-off-by: Christian Hewitt Acked-by: Jerome Brunet Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20201203060023.9454-4-christianshewitt@gmail.com commit 4e0649f4957436cbce20ffc26239fdbe19638444 Author: Christian Hewitt Date: Thu Dec 3 06:00:18 2020 +0000 arm64: dts: meson: add audio playback to khadas-vim Add initial audio support limited to HDMI i2s. Signed-off-by: Christian Hewitt Acked-by: Jerome Brunet Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20201203060023.9454-3-christianshewitt@gmail.com commit ec78dc8964bbc68d76d0e9b132379bc3f22c72a6 Author: Christian Hewitt Date: Thu Dec 3 06:00:17 2020 +0000 arm64: dts: meson: add audio playback to a95x Add initial audio support limited to HDMI i2s. Signed-off-by: Christian Hewitt Acked-by: Jerome Brunet Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20201203060023.9454-2-christianshewitt@gmail.com commit 148c277165cdc72d97d1711b9a1e566d66521828 Author: Mike Travis Date: Fri Nov 27 21:42:26 2020 -0600 x86/platform/uv: Add deprecated messages to /proc info leaves Add "deprecated" message to any access to old /proc/sgi_uv/* leaves. [ bp: Do not have a trailing function opening brace and the arguments continuing on the next line and align them on the opening brace. ] Signed-off-by: Mike Travis Signed-off-by: Borislav Petkov Reviewed-by: Steve Wahl Acked-by: Hans de Goede Link: https://lkml.kernel.org/r/20201128034227.120869-5-mike.travis@hpe.com commit b03455ae3c8a7e7999f9cc43ad87c63b44a89344 Author: Neil Armstrong Date: Wed Dec 2 18:44:17 2020 +0100 arm64: dts: meson-axg: add GE2D node This adds the node for the GE2D accelerator unit. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20201202174417.3778306-5-narmstrong@baylibre.com commit 9536ce63705952be5214544e3b048c78f932e794 Author: Adam Ward Date: Mon Dec 7 17:15:16 2020 +0000 regulator: da9121: Fix index used for DT property Signed-off-by: Adam Ward Link: https://lore.kernel.org/r/2cf324b68d37c4059c7995e8cab5fc9a608ea65d.1607361013.git.Adam.Ward.opensource@diasemi.com Signed-off-by: Mark Brown commit 416c29e9ce1347ba9a4ef7aeb4f30c8d9a3ada49 Author: Adam Ward Date: Mon Dec 7 17:15:15 2020 +0000 regulator: da9121: Remove uninitialised string variable Erroneously left in when switched to using of_parse_cb() Signed-off-by: Adam Ward Link: https://lore.kernel.org/r/c7a9e947a9582fe0150d860b5eab7e093cd832bb.1607361013.git.Adam.Ward.opensource@diasemi.com Signed-off-by: Mark Brown commit 433e817ae157479844d84b186dd4d165a3f2b06e Author: Mike Travis Date: Fri Nov 27 21:42:25 2020 -0600 x86/platform/uv: Add sysfs hubless leaves Add uv_sysfs hubless leaves for UV hubless systems. Signed-off-by: Mike Travis Signed-off-by: Borislav Petkov Reviewed-by: Steve Wahl Acked-by: Hans de Goede Link: https://lkml.kernel.org/r/20201128034227.120869-4-mike.travis@hpe.com commit 612a0063c9ba3aba79b9006faa0edad5f9d41162 Author: Mike Travis Date: Fri Nov 27 21:42:24 2020 -0600 x86/platform/uv: Add sysfs leaves to replace those in procfs Add uv_sysfs leaves to display the info. Signed-off-by: Mike Travis Signed-off-by: Borislav Petkov Reviewed-by: Steve Wahl Acked-by: Hans de Goede Link: https://lkml.kernel.org/r/20201128034227.120869-3-mike.travis@hpe.com commit a67fffb017aed93fca42ce7aa5b6aaf54ff912ad Author: Mike Travis Date: Fri Nov 27 21:42:23 2020 -0600 x86/platform/uv: Add kernel interfaces for obtaining system info Add kernel interfaces used to obtain info for the uv_sysfs driver to display. Signed-off-by: Mike Travis Signed-off-by: Borislav Petkov Reviewed-by: Steve Wahl Acked-by: Hans de Goede Link: https://lkml.kernel.org/r/20201128034227.120869-2-mike.travis@hpe.com commit 91c1c092f27da4164d55ca81e0a483108f8a3235 Author: Ard Biesheuvel Date: Mon Dec 7 17:33:33 2020 +0100 efi: capsule: use atomic kmap for transient sglist mappings Don't use the heavy-weight kmap() API to create short-lived mappings of the scatter-gather list entries that are released as soon as the entries are written. Instead, use kmap_atomic(), which is more suited to this purpose. Signed-off-by: Ard Biesheuvel commit ef3642c4f54d3493c92c71faf46139b2473bc532 Author: Jason Gunthorpe Date: Mon Nov 30 09:58:39 2020 +0200 RDMA/mlx5: Fix error unwinds for rereg_mr This is all a giant train wreck of error handling, in many cases the MR is left in some corrupted state where continuing on is going to lead to chaos, or various unwinds/order is missed. rereg had three possible completely different actions, depending on flags and various details about the MR. Split the three actions into three functions, and call the right action from the start. For each action carefully design the error handling to fit the action: - UMR access/PD update is a simple UMR, if it fails the MR isn't changed, so do nothing - PAS update over UMR is multiple UMR operations. To keep everything sane revoke access to the MKey while it is being changed and restore it once the MR is correct. - Recreating the mkey should completely build a parallel MR with a fully loaded PAS then swap and destroy the old one. If it fails the original should be left untouched. This is handled in the core code. Directly call the normal MR creation functions, possibly re-using the existing umem. Add support for working with ODP MRs. The READ/WRITE access flags can be changed by UMR and we can trivially convert to/from ODP MRs using the logic to build a completely new MR. This new logic also fixes various problems with MRs continuing to work while their PAS lists are no longer valid, eg during a page size change. Link: https://lore.kernel.org/r/20201130075839.278575-6-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 38f8ff5b4438876a7d5b2f8b54eb46c7d5154457 Author: Jason Gunthorpe Date: Mon Nov 30 09:58:38 2020 +0200 RDMA/mlx5: Reorganize mlx5_ib_reg_user_mr() This function handles an ODP and regular MR flow all mushed together, even though the two flows are quite different. Split them into two dedicated functions. Link: https://lore.kernel.org/r/20201130075839.278575-5-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 6e0954b11c056570cb29676a84e2f8dc4d1dd05e Author: Jason Gunthorpe Date: Mon Nov 30 09:58:37 2020 +0200 RDMA/uverbs: Allow drivers to create a new HW object during rereg_mr mlx5 has an ugly flow where it tries to allocate a new MR and replace the existing MR in the same memory during rereg. This is very complicated and buggy. Instead of trying to replace in-place inside the driver, provide support from uverbs to change the entire HW object assigned to a handle during rereg_mr. Since destroying a MR is allowed to fail (ie if a MW is pointing at it) and can't be detected in advance, the algorithm creates a completely new uobject to hold the new MR and swaps the IDR entries of the two objects. The old MR in the temporary IDR entry is destroyed, and if it fails rereg_mr succeeds and destruction is deferred to FD release. This complexity is why this cannot live in a driver safely. Link: https://lore.kernel.org/r/20201130075839.278575-4-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit adac4cb3c1ff5c47c9f47be5d017a0e054176e3c Author: Jason Gunthorpe Date: Mon Nov 30 09:58:36 2020 +0200 RDMA/uverbs: Check ODP in ib_check_mr_access() as well No reason only one caller checks this. This properly blocks ODP from the rereg flow if the device does not support ODP. Link: https://lore.kernel.org/r/20201130075839.278575-3-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit b9653b31d7767b7dccc8b24b660301be90449036 Author: Jason Gunthorpe Date: Mon Nov 30 09:58:35 2020 +0200 RDMA/uverbs: Tidy input validation of ib_uverbs_rereg_mr() Unknown flags should be EOPNOTSUPP, only zero flags is EINVAL. Flags is actually the rereg action to perform. The checking of the start/hca_va/etc is also redundant and ib_umem_get() does these checks and returns proper error codes. Fixes: 7e6edb9b2e0b ("IB/core: Add user MR re-registration support") Link: https://lore.kernel.org/r/20201130075839.278575-2-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 31ad3eff093cf21872f385021242c00c7a2abf6b Author: Michael Walle Date: Thu Dec 3 17:29:59 2020 +0100 mtd: spi-nor: keep lock bits if they are non-volatile Traditionally, Linux unlocks the whole flash because there are legacy devices which has the write protection bits set by default at startup. If you actually want to use the flash protection bits, eg. because there is a read-only part for a bootloader, this automatic unlocking is harmful. If there is no hardware write protection in place (usually called WP#), a startup of the kernel just discards this protection. I've gone through the datasheets of all the flashes (except the Intel ones where I could not find any datasheet nor reference) which supports the unlocking feature and looked how the sector protection was implemented. The currently supported flashes can be divided into the following two categories: (1) block protection bits are non-volatile. Thus they keep their values at reset and power-cycle (2) flashes where these bits are volatile. After reset or power-cycle, the whole memory array is protected. (a) some devices needs a special "Global Unprotect" command, eg. the Atmel AT25DF041A. (b) some devices require to clear the BPn bits in the status register. Due to the reasons above, we do not want to clear the bits for flashes which belong to category (1). Fortunately for us, only Atmel flashes fall into category (2a). Implement the "Global Protect" and "Global Unprotect" commands for these. For (2b) we can use normal block protection locking scheme. This patch adds a new flag to indicate the case (2). Only if we have such a flash we unlock the whole flash array. To be backwards compatible it also introduces a kernel configuration option which restores the complete legacy behavior ("Disable write protection on any flashes"). Hopefully, this will clean up "unlock the entire flash for legacy devices" once and for all. For reference here are the actually commits which introduced the legacy behavior (and extended the behavior to other chip manufacturers): commit f80e521c916cb ("mtd: m25p80: add support for the Intel/Numonyx {16,32,64}0S33B SPI flash chips") commit ea60658a08f8f ("mtd: m25p80: disable SST software protection bits by default") commit 7228982442365 ("[MTD] m25p80: fix bug - ATmel spi flash fails to be copied to") Actually, this might also fix handling of the Atmel AT25DF flashes, because the original commit 7228982442365 ("[MTD] m25p80: fix bug - ATmel spi flash fails to be copied to") was writing a 0 to the status register, which is a "Global Unprotect". This might not be the case in the current code which only handles the block protection bits BP2, BP1 and BP0. Thus, it depends on the current contents of the status register if this unlock actually corresponds to a "Global Unprotect" command. In the worst case, the current code might leave the AT25DF flashes in a write protected state. The commit 191f5c2ed4b6f ("mtd: spi-nor: use 16-bit WRR command when QE is set on spansion flashes") changed that behavior by just clearing BP2 to BP0 instead of writing a 0 to the status register. Further, the commit 3e0930f109e76 ("mtd: spi-nor: Rework the disabling of block write protection") expanded the unlock_all() feature to ANY flash which supports locking. Signed-off-by: Michael Walle Signed-off-by: Vignesh Raghavendra Reviewed-by: Tudor Ambarus Link: https://lore.kernel.org/r/20201203162959.29589-8-michael@walle.cc commit 8c174d1511d235ed6c049dcb2b704777ad0df7a5 Author: Michael Walle Date: Thu Dec 3 17:29:58 2020 +0100 mtd: spi-nor: atmel: fix unlock_all() for AT25FS010/040 These flashes have some weird BP bits mapping which aren't supported in the current locking code. Just add a simple unlock op to unprotect the entire flash array which is needed for legacy behavior. Fixes: 3e0930f109e7 ("mtd: spi-nor: Rework the disabling of block write protection") Signed-off-by: Michael Walle Signed-off-by: Vignesh Raghavendra Reviewed-by: Tudor Ambarus Link: https://lore.kernel.org/r/20201203162959.29589-7-michael@walle.cc commit afcf93e9d63fc1e15935a2df9457f803394e4f20 Author: Michael Walle Date: Thu Dec 3 17:29:57 2020 +0100 mtd: spi-nor: intel: remove global protection flag For the Atmel and SST parts this flag was already moved to individual flash parts because it is considered bad esp. because newer flash chips will automatically inherit the "has locking" support. While this won't likely be the case for the Intel parts, we do it for consistency reasons. Signed-off-by: Michael Walle Signed-off-by: Vignesh Raghavendra Reviewed-by: Tudor Ambarus Link: https://lore.kernel.org/r/20201203162959.29589-6-michael@walle.cc commit a833383732116c2afe665520bbe6951999631ef1 Author: Michael Walle Date: Thu Dec 3 17:29:56 2020 +0100 mtd: spi-nor: sst: remove global protection flag This is considered bad for the following reasons: (1) We only support the block protection with BPn bits for write protection. Not all SST parts support this. (2) Newly added flash chip will automatically inherit the "has locking" support and thus needs to explicitly tested. Better be opt-in instead of opt-out. (3) There are already supported flashes which doesn't support the locking scheme. So I assume this wasn't properly tested before adding that chip; which enforces my previous argument that locking support should be an opt-in. Remove the global flag and add individual flags to all flashes which supports BP locking. In particular the following flashes don't support the BP scheme: - SST26VF016B - SST26WF016B - SST26VF064B Signed-off-by: Michael Walle Signed-off-by: Vignesh Raghavendra Reviewed-by: Tudor Ambarus Link: https://lore.kernel.org/r/20201203162959.29589-5-michael@walle.cc commit e6204d4620276398ed7317d64c369813a1f96615 Author: Michael Walle Date: Thu Dec 3 17:29:55 2020 +0100 mtd: spi-nor: atmel: remove global protection flag This is considered bad for the following reasons: (1) We only support the block protection with BPn bits for write protection. Not all Atmel parts support this. (2) Newly added flash chip will automatically inherit the "has locking" support and thus needs to explicitly tested. Better be opt-in instead of opt-out. (3) There are already supported flashes which doesn't support the locking scheme. So I assume this wasn't properly tested before adding that chip; which enforces my previous argument that locking support should be an opt-in. Remove the global flag and add individual flags to all flashes which supports BP locking. In particular the following flashes don't support the BP scheme: - AT26F004 - AT25SL321 - AT45DB081D Please note, that some flashes which are marked as SPI_NOR_HAS_LOCK just support Global Protection, i.e. not our supported block protection locking scheme. This is to keep backwards compatibility with the current "unlock all at boot" mechanism. In particular the following flashes doesn't have BP bits: - AT25DF041A - AT25DF321 - AT25DF321A - AT25DF641 - AT26DF081A - AT26DF161A - AT26DF321 Signed-off-by: Michael Walle Signed-off-by: Vignesh Raghavendra Reviewed-by: Tudor Ambarus Link: https://lore.kernel.org/r/20201203162959.29589-4-michael@walle.cc commit bdb1a75e4b9df6861ec6a6e3e3997820d3cebabe Author: Michael Walle Date: Thu Dec 3 17:29:54 2020 +0100 mtd: spi-nor: ignore errors in spi_nor_unlock_all() Just try to unlock the whole SPI-NOR flash array. Don't abort the probing in case of an error. Justifications: (1) For some boards, this just works because spi_nor_write_16bit_sr_and_check() is broken and just checks the second half of the 16bit. Once that will be fixed, SPI probe will fail for boards which has hardware-write protected SPI-NOR flashes. (2) Until now, hardware write-protection was the only viable solution to use the block protection bits. This is because this very function spi_nor_unlock_all() will be called unconditionally on every linux boot. Therefore, this bits only makes sense in combination with the hardware write-protection. If we would fail the SPI probe on an error in spi_nor_unlock_all() we'd break virtually all users of the block protection bits. (3) We should try hard to keep the MTD working even if the flash might not be writable/erasable. Fixes: 3e0930f109e7 ("mtd: spi-nor: Rework the disabling of block write protection") Signed-off-by: Michael Walle Signed-off-by: Vignesh Raghavendra Reviewed-by: Tudor Ambarus Link: https://lore.kernel.org/r/20201203162959.29589-3-michael@walle.cc commit 989d4b72bae3b05c1564d38e71e18f65b12734fb Author: Michael Walle Date: Thu Dec 3 17:29:53 2020 +0100 mtd: spi-nor: sst: fix BPn bits for the SST25VF064C This flash part actually has 4 block protection bits. Please note, that this patch is just based on information of the datasheet of the datasheet and wasn't tested. Fixes: 3e0930f109e7 ("mtd: spi-nor: Rework the disabling of block write protection") Reported-by: Tudor Ambarus Signed-off-by: Michael Walle Signed-off-by: Vignesh Raghavendra Reviewed-by: Tudor Ambarus Link: https://lore.kernel.org/r/20201203162959.29589-2-michael@walle.cc commit 294cca6ce5cf5b15ce4ebda4c266b4a849735c65 Author: Pratyush Yadav Date: Tue Dec 1 15:57:11 2020 +0530 mtd: spi-nor: spansion: Set ECC block size The S28 flash family uses 2-bit ECC by default with each ECC block being 16 bytes. Under this scheme multi-pass programming to an ECC block is not allowed. Set the writesize to make sure multi-pass programming is not attempted on the flash. Signed-off-by: Pratyush Yadav Signed-off-by: Vignesh Raghavendra Reviewed-by: Tudor Ambarus Link: https://lore.kernel.org/r/20201201102711.8727-4-p.yadav@ti.com commit afd473e8582702e89aed89a4be957ffd37423009 Author: Pratyush Yadav Date: Tue Dec 1 15:57:10 2020 +0530 mtd: spi-nor: core: Allow flashes to specify MTD writesize Some flashes like the Cypress S28 family use ECC. Under this ECC scheme, multi-pass writes to an ECC block is not allowed. In other words, once data is programmed to an ECC block, it can't be programmed again without erasing it first. Upper layers like file systems need to be given this information so they do not cause error conditions on the flash by attempting multi-pass programming. This can be done by setting 'writesize' in 'struct mtd_info'. Set the default to 1 but allow flashes to modify it in fixup hooks. If more flashes show up with this constraint in the future it might be worth it to add it to 'struct flash_info', but for now increasing its size is not worth it. Signed-off-by: Pratyush Yadav Signed-off-by: Vignesh Raghavendra Reviewed-by: Tudor Ambarus Link: https://lore.kernel.org/r/20201201102711.8727-3-p.yadav@ti.com commit c69942bda5152d764ee7d897d1627d64c7177ea1 Author: Jonathan Neuschäfer Date: Mon Nov 30 16:24:15 2020 +0100 mtd: spi-nor: Fix multiple typos There are a few typos in comments in the SPI NOR framework; fix them. Signed-off-by: Jonathan Neuschäfer Signed-off-by: Vignesh Raghavendra Reviewed-by: Tudor Ambarus Link: https://lore.kernel.org/r/20201130152416.1283972-1-j.neuschaefer@gmx.net commit c732b7567d8698f10e988ed89fd9f107c739dbee Merge: c7b884561cb5b c066efb07d1e8 Author: Mark Brown Date: Mon Dec 7 17:18:27 2020 +0000 Merge series "spi: atmel-quadspi: Fix AHB memory accesses" from Tudor Ambarus : Starting with the move of the atmel-quadspi driver under SPI, the following error could be seen when mounting a 16MByte ubifs: UBIFS error (ubi0:0 pid 1893): check_lpt_type.constprop.6: invalid type (15) in LPT node type 1/4 fixes AHB accesses. The rest of the patches are small optimizations. Tested on both sama5d2 and sam9x60. Tudor Ambarus (4): spi: atmel-quadspi: Fix AHB memory accesses spi: atmel-quadspi: Drop superfluous set of QSPI_IFR_APBTFRTYP_READ spi: atmel-quadspi: Write QSPI_IAR only when needed spi: atmel-quadspi: Move common code outside of if else drivers/spi/atmel-quadspi.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) -- 2.25.1 base-commit: 3650b228f83adda7e5ee532e2b90429c03f7b9ec _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel commit dea5b80a043f6cd6ad341d9957a43e363366630e Author: Hans de Goede Date: Mon Dec 7 17:51:29 2020 +0100 platform/x86: intel-hid: Do not create SW_TABLET_MODE input-dev when a KIOX010A ACPI dev is present Some 360 degree hinges (yoga) style 2-in-1 devices use 2 accelerometers to allow the OS to determine the angle between the display and the base of the device. On Windows these are read by a special HingeAngleService process which calls an ACPI DSM (Device Specific Method) on the ACPI KIOX010A device node for the sensor in the display, to let the firmware know if the 2-in-1 is in tablet- or laptop-mode so that it can disable the kbd and touchpad to avoid spurious input in tablet-mode. The linux kxcjk1013 driver calls the DSM for this once at probe time to ensure that the builtin kbd and touchpad work. On some devices this causes a "spurious" 0xcd event on the intel-hid ACPI dev. In this case there is not a functional tablet-mode switch, so we should not register the tablet-mode switch device. Cc: Elia Devito Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20201207165129.396298-1-hdegoede@redhat.com commit cf68e3b7a6b75d8f0e68c80fb353cde1878ef682 Author: Vidya Sagar Date: Thu Dec 3 19:04:51 2020 +0530 PCI: tegra: Disable LTSSM during L2 entry PCIe cards like Marvell SATA controller and some of the Samsung NVMe drives don't support taking the link to L2 state. When the link doesn't go to L2 state, Tegra194 requires the LTSSM to be disabled to allow PHY to start the next link up process cleanly during suspend/resume sequence. Failing to disable LTSSM results in the PCIe link not coming up in the next resume cycle. Link: https://lore.kernel.org/r/20201203133451.17716-6-vidyas@nvidia.com Tested-by: Thierry Reding Signed-off-by: Vidya Sagar Signed-off-by: Lorenzo Pieralisi Acked-by: Thierry Reding commit 3d710af75bcdea2e9cb8cdb2f7663cef7b133f5e Author: Vidya Sagar Date: Thu Dec 3 19:04:50 2020 +0530 PCI: tegra: Check return value of tegra_pcie_init_controller() The return value of tegra_pcie_init_controller() must be checked before PCIe link up check and registering debugfs entries subsequently as it doesn't make sense to do these when the controller initialization itself has failed. Link: https://lore.kernel.org/r/20201203133451.17716-5-vidyas@nvidia.com Tested-by: Thierry Reding Signed-off-by: Vidya Sagar Signed-off-by: Lorenzo Pieralisi Acked-by: Thierry Reding commit b8f0d67149acf762861f9b02bc3d5bd49b2f72bd Author: Vidya Sagar Date: Thu Dec 3 19:04:49 2020 +0530 PCI: tegra: Continue unconfig sequence even if parts fail Currently the driver checks for error value of different APIs during the uninitialization sequence. It just returns from there if there is any error observed for one of those calls. Comparatively it is better to continue the uninitialization sequence irrespective of whether some of them are returning error. That way, it is more closer to complete uninitialization. Link: https://lore.kernel.org/r/20201203133451.17716-4-vidyas@nvidia.com Tested-by: Thierry Reding Signed-off-by: Vidya Sagar Signed-off-by: Lorenzo Pieralisi Acked-by: Thierry Reding commit 01254b6d6bb3e202650817ccb0a1386b5afd7e51 Author: Vidya Sagar Date: Thu Dec 3 19:04:48 2020 +0530 PCI: tegra: Set DesignWare IP version Set the DesignWare IP version for Tegra194 to 0x490A. This would be used by the DesigWare sub-system to do any version specific configuration (Ex:- TD bit programming for ECRC). Link: https://lore.kernel.org/r/20201203133451.17716-3-vidyas@nvidia.com Tested-by: Thierry Reding Signed-off-by: Vidya Sagar Signed-off-by: Lorenzo Pieralisi Acked-by: Thierry Reding commit 6b6fafc1abc7c046c57732a8cd1d2443fd60b370 Author: Vidya Sagar Date: Thu Dec 3 19:04:47 2020 +0530 PCI: tegra: Fix ASPM-L1SS advertisement disable code If the absence of CLKREQ# signal is indicated by the absence of "supports-clkreq" in the device-tree node, current driver is disabling the advertisement of ASPM-L1 Sub-States *before* the ASPM-L1 Sub-States offset is correctly initialized. Since default value of the ASPM-L1SS offset is zero, this is causing the Vendor-ID wrongly programmed to 0x10d2 instead of Nvidia's 0x10de thereby the quirks applicable for Tegra194 are not being applied. This patch fixes this issue by refactoring the code that disables the ASPM-L1SS advertisement. Link: https://lore.kernel.org/r/20201203133451.17716-2-vidyas@nvidia.com Fixes: 56e15a238d92 ("PCI: tegra: Add Tegra194 PCIe support") Signed-off-by: Vidya Sagar Signed-off-by: Lorenzo Pieralisi commit 10208567f11bd572331cbbcb9a89c61a143811a1 Author: Jaegeuk Kim Date: Thu Dec 3 09:52:45 2020 -0800 f2fs: introduce max_io_bytes, a sysfs entry, to limit bio size This patch adds max_io_bytes to limit bio size when f2fs tries to merge consecutive IOs. This can give a testing point to split out bios and check end_io handles those bios correctly. This is used to capture a recent bug on the decompression and fsverity flow. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit ec2ddf499402a665d1f6f7f5ce1391100e54089e Author: Jaegeuk Kim Date: Thu Dec 3 09:14:28 2020 -0800 f2fs: don't allow any writes on readonly mount generic_make_request: Trying to write to read-only block-device dm-5 (partno 0) WARNING: CPU: 7 PID: 546 at block/blk-core.c:2190 generic_make_request_checks+0x664/0x690 pc : generic_make_request_checks+0x664/0x690 lr : generic_make_request_checks+0x664/0x690 Call trace: generic_make_request_checks+0x664/0x690 generic_make_request+0xf0/0x3a4 submit_bio+0x80/0x250 __submit_merged_bio+0x368/0x4e0 __submit_merged_write_cond.llvm.12294350193007536502+0xe0/0x3e8 f2fs_wait_on_page_writeback+0x84/0x128 f2fs_convert_inline_page+0x35c/0x6f8 f2fs_convert_inline_inode+0xe0/0x2e0 f2fs_file_mmap+0x48/0x9c mmap_region+0x41c/0x74c do_mmap+0x40c/0x4fc vm_mmap_pgoff+0xb8/0x114 vm_mmap+0x34/0x48 elf_map+0x68/0x108 load_elf_binary+0x538/0xb70 search_binary_handler+0xac/0x1dc exec_binprm+0x50/0x15c __do_execve_file+0x620/0x740 __arm64_sys_execve+0x54/0x68 el0_svc_common+0x9c/0x168 el0_svc_handler+0x60/0x6c el0_svc+0x8/0xc Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit ac32bae0008340d87328a74d7598333bf48348c7 Author: Elia Devito Date: Fri Dec 4 17:02:35 2020 +0100 platform/x86: intel-hid: Add alternative method to enable switches Some convertible have unreliable VGBS return, in these cases we enable support when receiving the first event. Signed-off-by: Elia Devito Link: https://lore.kernel.org/r/20201204160234.36832-1-elia@xvalue.it Signed-off-by: Hans de Goede commit 537b0dd4729e7f5c5b3e8321954d3b8a2d0dd7a8 Author: Elia Devito Date: Fri Dec 4 17:01:22 2020 +0100 platform/x86: intel-hid: Add support for SW_TABLET_MODE Some convertible use the intel-hid ACPI interface to report SW_TABLET_MODE, implement this with DMI based allow-list to be sure to activate support only on models that effectively have it. Signed-off-by: Elia Devito Link: https://lore.kernel.org/r/20201204160121.36703-1-elia@xvalue.it Signed-off-by: Hans de Goede commit 1d1cd163d0de22a4041a6f1aeabcf78f80076539 Author: Pali Rohár Date: Wed Dec 2 19:46:59 2020 +0100 PCI: aardvark: Update comment about disabling link training According to PCI Express Base Specifications (rev 4.0, 6.6.1 "Conventional reset"), after fundamental reset a 100ms delay is needed prior to enabling link training. Update comment in code to reflect this requirement. Link: https://lore.kernel.org/r/20201202184659.3795-1-pali@kernel.org Signed-off-by: Pali Rohár Signed-off-by: Lorenzo Pieralisi commit 871a825c3902247d7fcc06e81eb993194d3bf424 Author: Colin Ian King Date: Fri Dec 4 18:04:59 2020 +0000 brcmfmac: remove redundant assignment to pointer 'entry' The pointer 'entry' is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201204180459.1148257-1-colin.king@canonical.com commit 05c2a61d69ea306e891884a86486e1ef37c4b78d Author: Zhang Changzhong Date: Fri Dec 4 16:47:17 2020 +0800 adm8211: fix error return code in adm8211_probe() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: cc0b88cf5ecf ("[PATCH] Add adm8211 802.11b wireless driver") Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1607071638-33619-1-git-send-email-zhangchangzhong@huawei.com commit 5e38884152bae058da7c58183c3859f98f7fe35c Author: Zong-Zhe Yang Date: Fri Dec 4 09:38:23 2020 +0800 rtw88: declare hw supports ch 144 When driver was developed, FCC regulation didn't enable channel 144 and there was no demand for channel 144 at that time. Although HW actually supports channel 144, driver didn't announce channel 144. Therefore, channel 144 (20 MHz), channel 142 (40 MHz) and channel 138 (80 MHz) couldn't be used. Today, channel 144 has been enabled by regulations and is gradually being supported. With test requirements, we declare hw supports channel 144. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201204013823.3729-1-pkshih@realtek.com commit 88c15a6fbd9454d6a73213467152bd70a8896207 Author: Colin Ian King Date: Thu Dec 3 17:51:42 2020 +0000 rtw88: coex: fix missing unitialization of variable 'interval' Currently the variable 'interval' is not initialized and is only set to 1 when oex_stat->bt_418_hid_existi is true. Fix this by inintializing variable interval to 0 (which I'm assuming is the intended default). Addresses-Coverity: ("Uninitalized scalar variable") Fixes: 5b2e9a35e456 ("rtw88: coex: add feature to enhance HID coexistence performance") Signed-off-by: Colin Ian King Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201203175142.1071738-1-colin.king@canonical.com commit 9b0467ed9a7d9aa3b0ce6fb99715fc7c1be9782b Author: Colin Ian King Date: Thu Dec 3 17:43:16 2020 +0000 wilc1000: remove redundant assignment to pointer vif The assignment to pointer vif is redundant as the assigned value is never read, hence it can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Acked-by: Ajay Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201203174316.1071446-1-colin.king@canonical.com commit 5f27b9afe8e201c7378d32751d1d8c386a1b64eb Author: Ganapathi Bhat Date: Tue Dec 1 14:48:27 2020 +0530 mwifiex: change license text of Makefile and README from MARVELL to NXP As of 6-DEC-2019, NXP has acquired Marvell’s Wireless business unit. This change is to update the license text accordingly. commit 932183aa35c6 ("mwifiex: change license text from MARVELL to NXP") does this, but it left out two files. Signed-off-by: James Cao Signed-off-by: Cathy Luo Signed-off-by: Ganapathi Bhat Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1606814307-32715-1-git-send-email-ganapathi.bhat@nxp.com commit 01b660b87ebe65510b52cd161578d8a1f5de8483 Author: Christophe JAILLET Date: Sun Nov 29 16:08:44 2020 +0100 mwl8k: switch from 'pci_' to 'dma_' API he wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'mwl8k_rxq_init()' and 'mwl8k_txq_init()' GFP_KERNEL can be used because this flag is already used in a 'kcalloc()' call, just a few line below. When memory is allocated in 'mwl8k_firmware_load_success()' GFP_KERNEL can be used because this flag is already used within 'ieee80211_register_hw()' which is called just a few line below. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201129150844.1466214-1-christophe.jaillet@wanadoo.fr commit 2e86ef413ab3f8da6ecf6c86b4eee5fb47bd77f6 Author: Lee Jones Date: Thu Nov 26 13:31:52 2020 +0000 rtw88: pci: Add prototypes for .probe, .remove and .shutdown Also strip out other duplicates from driver specific headers. Ensure 'main.h' is explicitly included in 'pci.h' since the latter uses some defines from the former. It avoids issues like: from drivers/net/wireless/realtek/rtw88/rtw8822be.c:5: drivers/net/wireless/realtek/rtw88/pci.h:209:28: error: ‘RTK_MAX_TX_QUEUE_NUM’ undeclared here (not in a function); did you mean ‘RTK_MAX_RX_DESC_NUM’? 209 | DECLARE_BITMAP(tx_queued, RTK_MAX_TX_QUEUE_NUM); | ^~~~~~~~~~~~~~~~~~~~ Fixes the following W=1 kernel build warning(s): drivers/net/wireless/realtek/rtw88/pci.c:1488:5: warning: no previous prototype for ‘rtw_pci_probe’ [-Wmissing-prototypes] 1488 | int rtw_pci_probe(struct pci_dev *pdev, | ^~~~~~~~~~~~~ drivers/net/wireless/realtek/rtw88/pci.c:1568:6: warning: no previous prototype for ‘rtw_pci_remove’ [-Wmissing-prototypes] 1568 | void rtw_pci_remove(struct pci_dev *pdev) | ^~~~~~~~~~~~~~ drivers/net/wireless/realtek/rtw88/pci.c:1590:6: warning: no previous prototype for ‘rtw_pci_shutdown’ [-Wmissing-prototypes] 1590 | void rtw_pci_shutdown(struct pci_dev *pdev) | ^~~~~~~~~~~~~~~~ Cc: Yan-Hsuan Chuang Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201126133152.3211309-18-lee.jones@linaro.org commit 5a5b820d18c76b3a8089c44d63bccd1b52f743a5 Author: Tom Rix Date: Mon Dec 7 16:16:24 2020 +0200 ath9k: remove trailing semicolon in macro definition The macro use will already have a semicolon. Signed-off-by: Tom Rix Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201127175336.2752730-1-trix@redhat.com commit 1daf58b23a1ed71c2064ea4d3aa517ac8669cf8d Author: Seevalamuthu Mariappan Date: Mon Dec 7 16:16:08 2020 +0200 ath11k: Ignore resetting peer auth flag in peer assoc cmd Incase of hardware encryption, WMI_PEER_AUTH flag will be set by firmware during install key. Since install key wont be done for software encryption mode, firmware will not set this flag. Due to this, seeing traffic failure in software encryption. Hence, avoid resetting peer auth flag if hardware encryption disabled. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-01421-QCAHKSWPL_SILICONZ-1 Signed-off-by: Seevalamuthu Mariappan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1606369414-25211-1-git-send-email-seevalam@codeaurora.org commit e8e55d8919ea7e78e0768188bb3f42f8a252d4b3 Author: Anilkumar Kolli Date: Mon Dec 7 16:16:04 2020 +0200 ath11k: add 64bit check before reading msi high addr In QCN9074 ath11k boot, firmware crash is observed in 64-bit builds and is due to wrong 64 bit MSI address size. This patch fixes the firmware crash. Read msi high addr if 64-bit addresses allowed on MSI. Tested-On: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1.r1-00026-QCAHKSWPL_SILICONZ-2 Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1606199334-18206-1-git-send-email-akolli@codeaurora.org commit 7f881a721716916e81bd4011589c2af6833c81d1 Author: Wen Gong Date: Mon Dec 7 16:15:58 2020 +0200 ath10k: fix a check patch warning returnNonBoolInBooleanFunction of sdio.c cppcheck possible warnings: (new ones prefixed by >>, may not real problems) drivers/net/wireless/ath/ath10k/sdio.c:2234:2: warning: Non-boolean value returned from function returning bool [returnNonBoolInBooleanFunction] return param & HI_OPTION_SDIO_CRASH_DUMP_ENHANCEMENT_FW; Reported-by: kernel test robot Tested-on: QCA6174 hw3.2 SDIO WLAN.RMH.4.4.1-00049 Signed-off-by: Wen Gong Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1606103240-9868-1-git-send-email-wgong@codeaurora.org commit 7ea4d23293300ca2f225595849a4fe444fb80ea4 Author: Sakari Ailus Date: Tue Sep 29 11:34:42 2020 +0200 media: ccs: Add support for obtaining C-PHY configuration from firmware Try parsing the firmware also as C-PHY. Do this only after D-PHY as older firmware may not explicitly specify bus-type in which case D-PHY is the default. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit bd189aac5a91adf88eb5fac062c9d4a0c005c805 Author: Sakari Ailus Date: Wed Sep 23 13:13:34 2020 +0200 media: ccs-pll: Print pixel rates Print pixel rates on CSI-2 bus as well as in pixel array as the variation allowed in PLL capabilities makes this non-trivial to figure out otherwise. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit f34a32fae7fde6655ada6b33dc6739c9d1b6a82c Author: Daniel Lezcano Date: Thu Dec 3 08:17:38 2020 +0100 platform/x86/drivers/acerhdf: Check the interval value when it is set Currently the code checks the interval value when the temperature is read which is bad for two reasons: - checking and setting the interval in the get_temp callback is inaccurate and awful, that can be done when changing the value. - Changing the thermal zone structure internals is an abuse of the exported structure, moreover no lock is taken here. The goal of this patch is to solve the first item by using the 'set' function called when changing the interval. The check is done there and removed from the get_temp function. If the thermal zone was not initialized yet, the interval is not updated in this case as that will happen in the init function when registering the thermal zone device. I don't have any hardware to test the changes. Signed-off-by: Daniel Lezcano Acked-by: Peter Kaestle Acked-by: Hans de Goede Link: https://lore.kernel.org/r/20201203071738.2363701-2-daniel.lezcano@linaro.org commit ba9dfeeb4fbe70885ac5372adf463659a9d499da Author: Sakari Ailus Date: Tue Sep 22 11:08:34 2020 +0200 media: ccs: Print written register values This helps debugging register writes. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 7c66f58f1c1fb3181074a09c4aac21a0e8a283f0 Author: Sakari Ailus Date: Wed Sep 23 12:22:52 2020 +0200 media: ccs: Add support for DDR OP SYS and OP PIX clocks Support dual data rate operational system and pixel clocks by conveying the flags to the PLL calculator and updating how the link rate is calculated. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit a65181c41e57709053892832d261956afe281deb Author: Daniel Lezcano Date: Thu Dec 3 08:17:37 2020 +0100 platform/x86/drivers/acerhdf: Use module_param_cb to set/get polling interval The module parameter can be set by using ops to get and set the values. The change will allow to check the correctness of the interval value everytime it is changed instead of checking in the get_temp function. Signed-off-by: Daniel Lezcano Acked-by: Peter Kaestle Acked-by: Hans de Goede Link: https://lore.kernel.org/r/20201203071738.2363701-1-daniel.lezcano@linaro.org commit 900c33e86e4b53e96e6ea10e9737870e03911a66 Author: Sakari Ailus Date: Tue Aug 25 00:06:26 2020 +0200 media: ccs-pll: Add support for DDR OP system and pixel clocks Add support for dual data rate operational system and pixel clocks. This is implemented using two PLL flags. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 7537862a90b8b9106d42ad2f53de2b96fd1673c5 Author: Charles Date: Wed Dec 2 14:11:04 2020 +0800 hwmon: Add driver for STMicroelectronics PM6764 Voltage Regulator Add the pmbus driver for the STMicroelectronics pm6764 voltage regulator. the output voltage use the MFR_READ_VOUT 0xD4 vout value returned is linear11 Signed-off-by: Charles Hsu [groeck: Fixed various compile errors; marked pm6764tr_of_match __maybe_unused] Signed-off-by: Guenter Roeck commit 4aaf08dcb961b3c566120f1a4222f8b27b7d9f6a Author: Mauro Carvalho Chehab Date: Mon Dec 7 09:56:20 2020 +0100 docs: nios2: add missing ReST file changeset ed13a92d0fde ("docs: archis: add a per-architecture features list") besides having a typo on its title, it was missing the feature file. Add it. Reported-by: Stephen Rothwell Fixes: ed13a92d0fde ("docs: archis: add a per-architecture features list") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/e51c4692c4420d28bca35f553a9a3f3d78404d99.1607331056.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit ba1bc00f358190ae1011eae82766aba5c73c9ca2 Author: Nikolay Borisov Date: Thu Oct 8 15:24:27 2020 +0300 btrfs: use helpers to convert from seconds to jiffies in transaction_kthread The kernel provides easy to understand helpers to convert from human understandable units to the kernel-friendly 'jiffies'. So let's use those to make the code easier to understand. No functional changes. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 089c8b0551f46e1c44269c10b0576e031e942acd Author: Anand Jain Date: Wed Oct 7 15:20:03 2020 +0800 btrfs: sysfs: export filesystem generation Matching with the information that's available from the ioctl FS_INFO, add generation to the per-filesystem directory /sys/fs/btrfs/UUID/generation, which could be used by scripts. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit a4327979a19e8734ddefbd8bcbb73bd9905b69cd Author: Hans de Goede Date: Sat Sep 12 11:35:32 2020 +0200 platform/x86: intel-vbtn: Fix SW_TABLET_MODE always reporting 1 on some HP x360 models Some HP x360 models have an ACPI VGBS method which sets bit 4 instead of bit 6 when NOT in tablet mode at boot. Inspecting all the DSDTs in my DSDT collection shows only one other model, the Medion E1239T ever setting bit 4 and it always sets this together with bit 6. So lets treat bit 4 as a second bit which when set indicates the device not being in tablet-mode, as we already do for bit 6. While at it also prefix all VGBS constant defines with "VGBS_". Note this wrokaround was first added to the kernel as commit d823346876a9 ("platform/x86: intel-vbtn: Fix SW_TABLET_MODE always reporting 1 on the HP Pavilion 11 x360"). After commit 8169bd3e6e19 ("platform/x86: intel-vbtn: Switch to an allow-list for SW_TABLET_MODE reporting") got added to the kernel this was reverted, because with the new allow-list approach the workaround was no longer necessary for the model on which the issue was first reported. But it turns out that the workaround is still necessary because some affected models report a chassis-type of 31 which is on the allow-list. BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1894017 Fixes: 21d64817c724 ("platform/x86: intel-vbtn: Revert "Fix SW_TABLET_MODE always reporting 1 on the HP Pavilion 11 x360"") Signed-off-by: Hans de Goede commit 7c88ab5715a265d5dde06e4e1b0dd4370d911372 Author: Srinivas Pandruvada Date: Thu Dec 3 17:57:46 2020 -0800 platform/x86: ISST: Change PCI device macros Use PCI_VDEVICE and PCI_DEVICE_DATA macros. No functional changes are expected. Signed-off-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20201204015746.1168941-3-srinivas.pandruvada@linux.intel.com Signed-off-by: Hans de Goede commit 761f0ee0e84b4c18535c6d17890ccc9f5c617e8d Author: Srinivas Pandruvada Date: Thu Dec 3 17:57:45 2020 -0800 platform/x86: ISST: Allow configurable offset range The mmio offset range can be different based on the PCI device id. Here for INTEL_RAPL_PRIO_DEVID_1, the range is increased from 45 to 64. Pass the range as the driver_data. Also account for different ranges during save/restore via suspend/resume callbacks. Signed-off-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20201204015746.1168941-2-srinivas.pandruvada@linux.intel.com Signed-off-by: Hans de Goede commit a552f204b050b213b1e41a5134a0d2726c9a2ec1 Author: Srinivas Pandruvada Date: Thu Dec 3 17:57:44 2020 -0800 platform/x86: ISST: Check for unaligned mmio address The address should be aligned to 4 byte boundary. So send an error for unaligned address. Signed-off-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20201204015746.1168941-1-srinivas.pandruvada@linux.intel.com Signed-off-by: Hans de Goede commit 8b105ef6ffb78d208b93e4c4b47e83dbd438cc12 Author: Daniel Drake Date: Mon Dec 7 14:43:22 2020 +0800 acer-wireless: send an EV_SYN/SYN_REPORT between state changes Sending the switch state change twice within the same frame is invalid evdev protocol and only works if the client handles keys immediately as well. Processing events immediately is incorrect, it forces a fake order of events that does not exist on the device. Recent versions of libinput changed to only process the device state and SYN_REPORT time, so now the key event is lost. Same fix as 'commit ("platform/x86: asus-wireless: send an EV_SYN/SYN_REPORT between state changes")' Signed-off-by: Daniel Drake Signed-off-by: Chris Chiu Link: https://lore.kernel.org/r/20201207064322.13992-1-chiu@endlessos.org Signed-off-by: Hans de Goede commit 1f7cb4665df8a25ae577a822a47fc4576f60c30f Author: Divya Bharathi Date: Wed Dec 2 18:49:35 2020 +0530 platform/x86: dell-wmi-sysman: work around for BIOS bug BIOS sets incorrect value (zero) when SET value passed for integer attribute with + sign. Added workaround to remove + sign before passing input to BIOS. Co-developed-by: Mario Limonciello Signed-off-by: Mario Limonciello Co-developed-by: Prasanth KSR Signed-off-by: Prasanth KSR Signed-off-by: Divya Bharathi Link: https://lore.kernel.org/r/20201202131935.307372-1-divya.bharathi@dell.com Signed-off-by: Hans de Goede commit b41f270841f85b9b4f8530b9f2020ff3ba1cfec5 Author: Sakari Ailus Date: Wed Sep 16 11:36:32 2020 +0200 media: ccs: Dual PLL support Add support for sensors that either require dual PLL or support single or dual PLL but use dual PLL as default. Use sensor default configuration for sensors that support both modes. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 6c7469e46b603f08462ef586a415a318134392b8 Author: Sakari Ailus Date: Tue Sep 15 20:53:26 2020 +0200 media: ccs-pll: Add trivial dual PLL support Add support for sensors that have separate VT and OP domain PLLs. This support is trivial in the sense that it aims for the same VT pixel rate than that on the CSI-2 bus. The vast majority of sensors is better supported by higher frequencies in VT domain in binned and possibly scaled configurations. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 9ec6e5b18e6660ccc7b1777a4a4108c6c1723c40 Author: Sakari Ailus Date: Tue Sep 15 18:33:13 2020 +0200 media: ccs-pll: Separate VT divisor limit calculation from the rest Separate VT divisor limit calculation from the rest of the VT PLL branch calculation. This way it can be used for dual PLL support as well. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 36154b68b8d9c4a3d771c0d2c58be03927350480 Author: Sakari Ailus Date: Tue Sep 15 21:04:26 2020 +0200 media: ccs-pll: Fix VT post-PLL divisor calculation The PLL calculator only searched even total divisor values apart from one, but this is wrong: the total divisor is odd in cases where system divisor is one. Fix this by including odd total PLL values where system divisor is one to the search. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 594f1e93bb2c48bcc14a020448b46eed15be7ef7 Author: Sakari Ailus Date: Tue Sep 15 14:34:42 2020 +0200 media: ccs-pll: Make VT divisors 16-bit Make VT divisors 16-bit unsigned numbers. They don't need 32 bits after all. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 02be5f13aacba2100f1486d3ad16c26b6dede1ce Author: Marcel Holtmann Date: Mon Dec 7 11:08:42 2020 +0100 MAINTAINERS: Update Bluetooth entries Update the status to Supported to reflect the current state of affairs and add Luiz as additional maintainer. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit e6ed8b78eae53788c5e80304b401c23896f86287 Author: Marcel Holtmann Date: Mon Dec 7 11:02:09 2020 +0100 Bluetooth: Increment management interface revision Increment the mgmt revision due to the recently added new commands. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit 0671c0662383eefc272e107364cba7fe229dee44 Author: Hans de Goede Date: Sat Dec 5 16:02:01 2020 +0100 Bluetooth: btusb: Add workaround for remote-wakeup issues with Barrot 8041a02 fake CSR controllers With the recent btusb change to detect and deal with more fake CSR controllers, I decided to see if fake CSR controllers with Barrot 8041a02 chips would now work. After much experimentation I came to the conclusion that it works, if I have autosuspend enabled initially and then disable it after the device has suspended at least once. Yes this is very weird, but I've tried many things, like manually clearing the remote-wakeup feature. Doing a runtime-resume + runtime suspend is the only way to get the receiver to actually report received data (and/or pairing info) through its bulk rx endpoint. But the funkyness of the bulk-endpoint does not stop there, I mainly found out about this problem, because with autosuspend enabled (which usually ensures the suspend at least once condition is met), the receiver stops reporting received data through its bulk rx endpoint as soon as autosuspend kicks in. So I initially just disabled autosuspend, but then the receiver does not work at all. This was with a fake CSR receiver with a Barrot 8041a02 chip with a bcdDevice value of 0x8891, a lmp_subver of 0x1012, a hci_rev of 0x0810 and a hci_ver of BLUETOOTH_VER_4_0. Summarizing this specific fake CSR receiver has the following 2 issues: 1. The bulk rx endpoint will never report any data unless the device was suspended at least once. 2. They will not wakeup when autosuspended and receiving data on their bulk rx endpoint from e.g. a keyboard or mouse (IOW remote-wakeup support is broken for the bulk endpoint). Add a workaround for 1. which enables runtime-suspend, force-suspends the hci and then wakes-it up by disabling runtime-suspend again. Add a workaround for 2. which clears the hci's can_wake flag, this way the hci will still be autosuspended when it is not open. Signed-off-by: Hans de Goede Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit d74e0ae7e03032b47b8631cc1e52a7ae1ce988c0 Author: Hans de Goede Date: Sat Dec 5 16:02:00 2020 +0100 Bluetooth: btusb: Fix detection of some fake CSR controllers with a bcdDevice val of 0x0134 Commit cde1a8a99287 ("Bluetooth: btusb: Fix and detect most of the Chinese Bluetooth controllers") made the detection of fake controllers more generic fixing it for much of the newer fakes / clones. But this does not work for a fake CSR controller with a bcdDevice value of 0x0134, which was correctly identified as fake before this change. Add an extra check for this special case, checking for a combination of a bcdDevice value of 0x0134, together with a lmp_subver of 0x0c5c and a hci_ver of BLUETOOTH_VER_2_0. The chip inside this fake dongle is marked as with "clockwise cw6629d". Fixes: cde1a8a99287 ("Bluetooth: btusb: Fix and detect most of the Chinese Bluetooth controllers") Signed-off-by: Hans de Goede Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit dce0a4be8054f38358d91f8c8ed8e2b0688abec8 Author: Abhishek Pandit-Subedi Date: Fri Dec 4 11:14:31 2020 +0800 Bluetooth: Set missing suspend task bits When suspending, mark SUSPEND_SCAN_ENABLE and SUSPEND_SCAN_DISABLE tasks correctly when either classic or le scanning is modified. Signed-off-by: Abhishek Pandit-Subedi Signed-off-by: Howard Chung Reviewed-by: Alain Michaud Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit f25d3962ac8f23ab4871cef1d79e10a8c34f7908 Author: Sakari Ailus Date: Tue Sep 15 10:37:32 2020 +0200 media: ccs-pll: Rework bounds checks Refactor bounds checks so that the caller can decide what to check. This allows doing the checks early, when the values are available. This also adds front OP PLL configuration and limits. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 4d9b952857533b61c662d59dc413094b0c4c8231 Author: Daniel Winkler Date: Thu Dec 3 12:12:52 2020 -0800 Bluetooth: Change MGMT security info CMD to be more generic For advertising, we wish to know the LE tx power capabilities of the controller in userspace, so this patch edits the Security Info MGMT command to be more generic, such that other various controller capabilities can be included in the EIR data. This change also includes the LE min and max tx power into this newly-named command. The change was tested by manually verifying that the MGMT command returns the tx power range as expected in userspace. Reviewed-by: Sonny Sasaka Signed-off-by: Daniel Winkler Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit 7c395ea521e6c8d77f643be61bf2f0f3a1f5b3e8 Author: Daniel Winkler Date: Thu Dec 3 12:12:51 2020 -0800 Bluetooth: Query LE tx power on startup Queries tx power via HCI_LE_Read_Transmit_Power command when the hci device is initialized, and stores resulting min/max LE power in hdev struct. If command isn't available (< BT5 support), min/max values both default to HCI_TX_POWER_INVALID. This patch is manually verified by ensuring BT5 devices correctly query and receive controller tx power range. Reviewed-by: Sonny Sasaka Signed-off-by: Daniel Winkler Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit 9bf9f4b6301ffbd51674e1168f8eeed214d2cf99 Author: Daniel Winkler Date: Thu Dec 3 12:12:50 2020 -0800 Bluetooth: Use intervals and tx power from mgmt cmds This patch takes the min/max intervals and tx power optionally provided in mgmt interface, stores them in the advertisement struct, and uses them when configuring the hci requests. While tx power is not used if extended advertising is unavailable, software rotation will use the min and max advertising intervals specified by the client. This change is validated manually by ensuring the min/max intervals are propagated to the controller on both hatch (extended advertising) and kukui (no extended advertising) chromebooks, and that tx power is propagated correctly on hatch. These tests are performed with multiple advertisements simultaneously. Reviewed-by: Sonny Sasaka Signed-off-by: Daniel Winkler Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit 12410572833a283ce92fcf9679ca8a2f372097ee Author: Daniel Winkler Date: Thu Dec 3 12:12:49 2020 -0800 Bluetooth: Break add adv into two mgmt commands This patch adds support for the new advertising add interface, with the first command setting advertising parameters and the second to set advertising data. The set parameters command allows the caller to leave some fields "unset", with a params bitfield defining which params were purposefully set. Unset parameters will be given defaults when calling hci_add_adv_instance. The data passed to the param mgmt command is allowed to be flexible, so in the future if bluetoothd passes a larger structure with new params, the mgmt command will ignore the unknown members at the end. This change has been validated on both hatch (extended advertising) and kukui (no extended advertising) chromebooks running bluetoothd that support this new interface. I ran the following manual tests: - Set several (3) advertisements using modified test_advertisement.py - For each, validate correct data and parameters in btmon trace - Verified both for software rotation and extended adv Automatic test suite also run, testing many (25) scenarios of single and multi-advertising for data/parameter correctness. Reviewed-by: Sonny Sasaka Signed-off-by: Daniel Winkler Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit 31aab5c22e14c1c10110281d7f74b5e554f731b7 Author: Daniel Winkler Date: Thu Dec 3 12:12:48 2020 -0800 Bluetooth: Add helper to set adv data We wish to handle advertising data separately from advertising parameters in our new MGMT requests. This change adds a helper that allows the advertising data and scan response to be updated for an existing advertising instance. Reviewed-by: Sonny Sasaka Signed-off-by: Daniel Winkler Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit ef2862a1db8fedb7860048110ecf6512ab672e10 Author: Tim Jiang Date: Thu Dec 3 12:57:14 2020 +0800 Bluetooth: btusb: support download nvm with different board id for wcn6855 we define many nvm files for wcn6855 btsoc and host driver should find the correct nvm file based on board ID and then download it. Signed-off-by: Tim Jiang Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit 10c24231ab670001593fd0e19335e12c35d3dc64 Author: Kiran K Date: Thu Nov 19 17:09:43 2020 +0530 Bluetooth: btusb: Map Typhoon peak controller to BTUSB_INTEL_NEWGEN Map Typhoon peak Intel controller to BTUSB_INTEL_NEWGEN Signed-off-by: Kiran K Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit 3f43a37838d5b5d00419b167a22b9b0dc4c33732 Author: Kiran K Date: Thu Nov 19 17:09:42 2020 +0530 Bluetooth: btusb: Helper function to download firmware to Intel adapters Define a helper function to download firmware for new generation Intel controllers Signed-off-by: Kiran K Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit fadfe88441fcf67a15acd0fe47785f89d93782ff Author: Sakari Ailus Date: Wed Sep 9 14:15:48 2020 +0200 media: ccs-pll: Print relevant information on PLL tree Print information on PLL tree configuration based on the flags. This also adds support for printing dual PLL trees, and better separates between OP and VT PLL trees. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 9a93b8b8eee4ac971a1ac120a2be7a66b7fa5b68 Author: Kiran K Date: Thu Nov 19 17:09:41 2020 +0530 Bluetooth: btusb: Define a function to construct firmware filename Define a new function to construct firmware/ddc filename for new generation Intel controllers Signed-off-by: Kiran K Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit 0a3c1d45eca09ca2fc4b84b6c42ebec7ff938df0 Author: Kiran K Date: Thu Nov 19 17:09:40 2020 +0530 Bluetooth: btusb: Add *setup* function for new generation Intel controllers Define a new *setup* function for new generation Intel controllers Signed-off-by: Kiran K Signed-off-by: Amit K Bag Signed-off-by: Raghuram Hegde Reviewed-by: Sathish Narasimman Reviewed-by: Chethan T N Reviewed-by: Srivatsa Ravishankar Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit 66500bbc7d6b4915cae86d64c72591cb70698c9d Author: Kiran K Date: Thu Nov 19 17:09:39 2020 +0530 Bluetooth: btintel: Fix endianness issue for TLV version information do __le32_to_cpu to tlv data fields to make sure driver runs correctly when running on big endian system. Signed-off-by: Kiran K Reviewed-by: Chethan T N Reviewed-by: Srivatsa Ravishankar Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit 80af16a3e473f0789d205810733a513279e5b6f9 Author: Howard Chung Date: Thu Nov 26 12:22:25 2020 +0800 Bluetooth: Add toggle to switch off interleave scan This patch add a configurable parameter to switch off the interleave scan feature. Signed-off-by: Howard Chung Reviewed-by: Alain Michaud Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit 3bc615fa93d2e89104edd924135451db8bbf631f Author: Howard Chung Date: Thu Nov 26 12:22:24 2020 +0800 Bluetooth: Refactor read default sys config for various types Refactor read default system configuration function so that it's capable of returning different types than u16 Signed-off-by: Howard Chung Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit a38836b2d026397a56ee9c90ba707c777075b0a1 Author: Sakari Ailus Date: Fri Sep 4 10:52:13 2020 +0200 media: ccs-pll: Better separate OP and VT sub-tree calculation Better separate OP PLL branch calculation from VT branch calculation. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 422bb17f8a17a29a6553b4569a213b792cd57c0a Author: Howard Chung Date: Thu Nov 26 12:22:23 2020 +0800 Bluetooth: Handle active scan case This patch adds code to handle the active scan during interleave scan. The interleave scan will be canceled when users start active scan, and it will be restarted after active scan stopped. Signed-off-by: Howard Chung Reviewed-by: Alain Michaud Reviewed-by: Manish Mandlik Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit 36afe87ac10fd71f98c40ccf9923b83e0d3fab68 Author: Howard Chung Date: Thu Nov 26 12:22:22 2020 +0800 Bluetooth: Handle system suspend resume case This patch adds code to handle the system suspension during interleave scan. The interleave scan will be canceled when the system is going to sleep, and will be restarted after waking up. Signed-off-by: Howard Chung Reviewed-by: Alain Michaud Reviewed-by: Manish Mandlik Reviewed-by: Abhishek Pandit-Subedi Reviewed-by: Miao-chen Chou Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit c4f1f408168cd6a83d973e98e1cd1888e4d3d907 Author: Howard Chung Date: Thu Nov 26 12:22:21 2020 +0800 Bluetooth: Interleave with allowlist scan This patch implements the interleaving between allowlist scan and no-filter scan. It'll be used to save power when at least one monitor is registered and at least one pending connection or one device to be scanned for. The durations of the allowlist scan and the no-filter scan are controlled by MGMT command: Set Default System Configuration. The default values are set randomly for now. Signed-off-by: Howard Chung Reviewed-by: Alain Michaud Reviewed-by: Manish Mandlik Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit a31489d2a368d2f9225ed6a6f595c63bc7d10de8 Author: Edward Vear Date: Tue Oct 27 00:02:03 2020 -0700 Bluetooth: Fix attempting to set RPA timeout when unsupported During controller initialization, an LE Set RPA Timeout command is sent to the controller if supported. However, the value checked to determine if the command is supported is incorrect. Page 1921 of the Bluetooth Core Spec v5.2 shows that bit 2 of octet 35 of the Supported_Commands field corresponds to the LE Set RPA Timeout command, but currently bit 6 of octet 35 is checked. This patch checks the correct value instead. This issue led to the error seen in the following btmon output during initialization of an adapter (rtl8761b) and prevented initialization from completing. < HCI Command: LE Set Resolvable Private Address Timeout (0x08|0x002e) plen 2 Timeout: 900 seconds > HCI Event: Command Complete (0x0e) plen 4 LE Set Resolvable Private Address Timeout (0x08|0x002e) ncmd 2 Status: Unsupported Remote Feature / Unsupported LMP Feature (0x1a) = Close Index: 00:E0:4C:6B:E5:03 The error did not appear when running with this patch. Signed-off-by: Edward Vear Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit aeeae47d3414e8884370c19a7175c46ce14c66c1 Author: Luiz Augusto von Dentz Date: Fri Nov 13 16:44:34 2020 -0800 Bluetooth: Rename get_adv_instance_scan_rsp This renames get_adv_instance_scan_rsp to adv_instance_is_scannable and make it return a bool since it was not actually properly return the size of the scan response as one could expect. Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit 733c15bd3a944b8eeaacdddf061759b6a83dd3f4 Author: Colin Ian King Date: Mon Dec 7 14:54:46 2020 +0000 block/rnbd: fix a null pointer dereference on dev->blk_symlink_name Currently in the case where dev->blk_symlink_name fails to be allocates the error return path attempts to set an end-of-string character to the unallocated dev->blk_symlink_name causing a null pointer dereference error. Fix this by returning with an explicity ENOMEM error (which also is missing in the original code as was not initialized). Fixes: 1eb54f8f5dd8 ("block/rnbd: client: sysfs interface functions") Signed-off-by: Colin Ian King Addresses-Coverity: ("Dereference after null check") Signed-off-by: Jens Axboe commit a76a0d365077711594ce200a9553ed6d1ff40276 Author: Luiz Augusto von Dentz Date: Fri Nov 13 16:44:33 2020 -0800 Bluetooth: Fix not sending Set Extended Scan Response Current code is actually failing on the following tests of mgmt-tester because get_adv_instance_scan_rsp_len did not account for flags that cause scan response data to be included resulting in non-scannable instance when in fact it should be scannable. Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit 5b8ec15d02f12148ef0185825217162b3bc341f4 Author: Jimmy Wahlberg Date: Mon Nov 16 16:56:26 2020 +0100 Bluetooth: Fix for Bluetooth SIG test L2CAP/COS/CFD/BV-14-C This test case is meant to verify that multiple unknown options is included in the response. BLUETOOTH CORE SPECIFICATION Version 5.2 | Vol 3, Part A page 1057 'On an unknown option failure (Result=0x0003), the option(s) that contain anoption type field that is not understood by the recipient of the L2CAP_CONFIGURATION_REQ packet shall be included in the L2CAP_CONFIGURATION_RSP packet unless they are hints.' Before this patch: > ACL Data RX: Handle 11 flags 0x02 dlen 24 L2CAP: Configure Request (0x04) ident 18 len 16 Destination CID: 64 Flags: 0x0000 Option: Unknown (0x10) [mandatory] 10 00 11 02 11 00 12 02 12 00 < ACL Data TX: Handle 11 flags 0x00 dlen 17 L2CAP: Configure Response (0x05) ident 18 len 9 Source CID: 64 Flags: 0x0000 Result: Failure - unknown options (0x0003) Option: Unknown (0x10) [mandatory] 12 After this patch: > ACL Data RX: Handle 11 flags 0x02 dlen 24 L2CAP: Configure Request (0x04) ident 5 len 16 Destination CID: 64 Flags: 0x0000 Option: Unknown (0x10) [mandatory] 10 00 11 02 11 00 12 02 12 00 < ACL Data TX: Handle 11 flags 0x00 dlen 23 L2CAP: Configure Response (0x05) ident 5 len 15 Source CID: 64 Flags: 0x0000 Result: Failure - unknown options (0x0003) Option: Unknown (0x10) [mandatory] 10 11 01 11 12 01 12 Signed-off-by: Jimmy Wahlberg Reviewed-by: Luiz Augusto Von Dentz Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit f6b8c6b5543983e9de29dc14716bfa4eb3f157c4 Author: Wei Yongjun Date: Mon Nov 16 21:24:21 2020 +0800 Bluetooth: sco: Fix crash when using BT_SNDMTU/BT_RCVMTU option This commit add the invalid check for connected socket, without it will causes the following crash due to sco_pi(sk)->conn being NULL: KASAN: null-ptr-deref in range [0x0000000000000050-0x0000000000000057] CPU: 3 PID: 4284 Comm: test_sco Not tainted 5.10.0-rc3+ #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1 04/01/2014 RIP: 0010:sco_sock_getsockopt+0x45d/0x8e0 Code: 48 c1 ea 03 80 3c 02 00 0f 85 ca 03 00 00 49 8b 9d f8 04 00 00 48 b8 00 00 00 00 00 fc ff df 48 8d 7b 50 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e b5 03 00 00 8b 43 50 48 8b 0c RSP: 0018:ffff88801bb17d88 EFLAGS: 00010206 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff83a4ecdf RDX: 000000000000000a RSI: ffffc90002fce000 RDI: 0000000000000050 RBP: 1ffff11003762fb4 R08: 0000000000000001 R09: ffff88810e1008c0 R10: ffffffffbd695dcf R11: fffffbfff7ad2bb9 R12: 0000000000000000 R13: ffff888018ff1000 R14: dffffc0000000000 R15: 000000000000000d FS: 00007fb4f76c1700(0000) GS:ffff88811af80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005555e3b7a938 CR3: 00000001117be001 CR4: 0000000000770ee0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: ? sco_skb_put_cmsg+0x80/0x80 ? sco_skb_put_cmsg+0x80/0x80 __sys_getsockopt+0x12a/0x220 ? __ia32_sys_setsockopt+0x150/0x150 ? syscall_enter_from_user_mode+0x18/0x50 ? rcu_read_lock_bh_held+0xb0/0xb0 __x64_sys_getsockopt+0xba/0x150 ? syscall_enter_from_user_mode+0x1d/0x50 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: 0fc1a726f897 ("Bluetooth: sco: new getsockopt options BT_SNDMTU/BT_RCVMTU") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Reviewed-by: Luiz Augusto Von Dentz Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit b73b5781a85c03113476f62346c390f0277baa4b Author: Jing Xiangfeng Date: Tue Nov 17 10:43:32 2020 +0800 Bluetooth: btmtksdio: Add the missed release_firmware() in mtk_setup_firmware() mtk_setup_firmware() misses to call release_firmware() in an error path. Jump to free_fw to fix it. Fixes: 737cd06072a7 ("Bluetooth: btmtksdio: fix up firmware download sequence") Signed-off-by: Jing Xiangfeng Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit d1e9d232e1e60fa63df1b836ec3ecba5abd3fa9d Author: Jing Xiangfeng Date: Tue Nov 17 10:59:17 2020 +0800 Bluetooth: btusb: Add the missed release_firmware() in btusb_mtk_setup_firmware() btusb_mtk_setup_firmware() misses to call release_firmware() in an error path. Jump to err_release_fw to fix it. Fixes: f645125711c8 ("Bluetooth: btusb: fix up firmware download sequence") Signed-off-by: Jing Xiangfeng Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit 24d6a6d24f01f4379d3c3ce203c27efc493aeb87 Author: Cadel Watson Date: Thu Nov 19 16:16:25 2020 +1100 Bluetooth: btusb: Support 0bda:c123 Realtek 8822CE device Some Lenovo Ideapad laptop models use the 0bda:c123 USB identifier for their Bluetooth device, so load the appropriate firmware for Realtek 8822CE. -Device(0bda:c123) from /sys/kernel/debug/usb/devices T: Bus=03 Lev=01 Prnt=01 Port=03 Cnt=02 Dev#= 3 Spd=12 MxCh= 0 D: Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=0bda ProdID=c123 Rev= 0.00 S: Manufacturer=Realtek S: Product=Bluetooth Radio S: SerialNumber=00e04c000001 C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms Signed-off-by: Cadel Watson Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit 38c94eb8d7aa60e32ed6da9e4ecd4b5a1597760e Author: Sakari Ailus Date: Fri Aug 28 08:24:18 2020 +0200 media: ccs-pll: Check for derating and overrating, support non-derating sensors Some sensors support derating (VT domain speed faster than OP) or overrating (VT domain speed slower than OP). While this was supported for the driver, the hardware support for the feature was never verified. Do that now, and for those devices without that support, VT and OP speeds have to match. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 059924fdf6c1c31a7c1aa1915884e23f4313dde2 Author: Venkata Lakshmi Narayana Gubba Date: Thu Nov 19 18:24:09 2020 +0530 Bluetooth: btqca: Use NVM files based on SoC ID for WCN3991 This change will allow to use different NVM file based on WCN3991 BT SoC ID.Need to use different NVM file based on fab location for WCN3991 BT SoC. Signed-off-by: Venkata Lakshmi Narayana Gubba Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit 3e2db036c9b706e68016db7610c333ed926425be Author: Sakari Ailus Date: Tue Aug 25 22:23:43 2020 +0200 media: ccs-pll: Split off VT subtree calculation Split off the VT sub clock tree calculation from the rest, into its own function. Also call the op_pll_fr argument pll_fr, since soon these may not be OP tree values. This paves way for additional features in the future such as dual PLL support. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 8030aa4f9c512ecf8b91b37c88ab6b479e71c8a4 Author: Sakari Ailus Date: Fri Jul 3 09:48:06 2020 +0200 media: ccs-pll: Add C-PHY support Add C-PHY support for the CCS PLL calculator. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit d7172c0ebc06b6a363db96fd2fcbd1008f307e4c Author: Sakari Ailus Date: Tue Aug 4 12:58:30 2020 +0200 media: ccs-pll: Add sanity checks Add sanity checks for fields that could cause division by zero. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 9490a2279fab29cf8730120b54c42ef2fc67171c Author: Sakari Ailus Date: Fri Aug 7 11:07:14 2020 +0200 media: ccs-pll: Add support flexible OP PLL pixel clock divider Flexible OP PLL pixel clock divider allows a higher OP pixel clock than what the bus can transfer. This generally makes it easier to select pixel clock dividers. This changes how the pixel rate on the bus and minimum VT divisor are calculated, as the pixel rate is no longer directly determined by the OP pixel clock and the number of the lanes. Also add a sanity check for sensors that do not support flexible OP PLL pixel clock divider. This could have caused the PLL calculator to come up with an invalid configuration for those devices. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit c4c0b222720d413cc866275a0200019eb3c58f33 Author: Sakari Ailus Date: Fri Aug 7 11:00:59 2020 +0200 media: ccs-pll: Support two cycles per pixel on OP domain The l parameter defines the number of clock cycles to process a single pixel per OP lane. It is calculated based on a new register op_bits_per_lane. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 4e1e8d240dff96bd8dd2c00c5fcd7f04088ace3c Author: Sakari Ailus Date: Tue Jun 23 13:40:32 2020 +0200 media: ccs-pll: Add support for extended input PLL clock divider CCS allows odd PLL dividers other than 1, granted that the corresponding capability bit is set. Support this both in the PLL calculator and the CCS driver. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit b1f7b0983601af4054876bca42e3094bf6b034c0 Merge: af3f4a85d9021 d2e46004c5cda Author: David S. Miller Date: Mon Dec 7 06:55:21 2020 -0800 Merge branch 's390-qeth-next' Julian Wiedmann says: ==================== s390/qeth: updates 2020-12-07 please apply the following patch series for qeth to netdev's net-next tree. Some sysfs cleanups (with the prep work in ccwgroup acked by Heiko), and a few improvements to the code that deals with async TX completion notifications for IQD devices. This also brings the missing patch from the previous net-next submission. ==================== Signed-off-by: David S. Miller commit d2e46004c5cdaec4befa3c1a071bb9fa7fdbbcc5 Author: Julian Wiedmann Date: Mon Dec 7 14:12:33 2020 +0100 s390/qeth: make qeth_qdio_handle_aob() more robust When qeth_qdio_handle_aob() frees dangling allocations in the notified TX buffer, there are rare tear-down cases where qeth_drain_output_queue() would later call qeth_clear_output_buffer() for the same buffer - and thus end up walking the buffer a second time to check for dangling kmem_cache allocations. Luckily current code previously scrubs such a buffer, so qeth_clear_output_buffer() would find buf->buffer->element[i].addr as NULL and not do anything. But this is fragile, and we can easily improve it by consistently clearing the ->is_header flag after freeing the allocation. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 75cf3854dcdf7b5c583538cae12ffa054d237d93 Author: Julian Wiedmann Date: Mon Dec 7 14:12:32 2020 +0100 s390/qeth: remove QETH_QDIO_BUF_HANDLED_DELAYED state Reuse the QETH_QDIO_BUF_EMPTY state to indicate that a TX buffer has been completed with a QAOB notification, and may be cleaned up by qeth_cleanup_handled_pending(). Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit db4ffdcef7c9a842e55228c9faef7abf8b72382f Author: Julian Wiedmann Date: Mon Dec 7 14:12:31 2020 +0100 s390/qeth: don't replace a fully completed async TX buffer For TX buffers that require an additional async notification via QAOB, the TX completion code can now manage all the necessary processing if the notification has already occurred (or is occurring concurrently). In such cases we can avoid replacing the metadata that is associated with the buffer's slot on the ring, and just keep using the current one. As qeth_clear_output_buffer() will also handle any kmem cache-allocated memory that was mapped into the TX buffer, qeth_qdio_handle_aob() doesn't need to worry about it. While at it, also remove the unneeded forward declaration for qeth_init_qdio_out_buf(). Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 0b8da8110b4fa3314a060e5c5a3b35a22b81e900 Author: Julian Wiedmann Date: Mon Dec 7 14:12:30 2020 +0100 s390/qeth: use dev->groups for common sysfs attributes All qeth devices have a minimum set of sysfs attributes, and non-OSN devices share a group of additional attributes. Depending on whether the device is forced to use a specific discipline, the device_type then specifies further attributes. Shift the common attributes into dev->groups, so that the device_type only contains the discipline-specific attributes. This avoids exposing the common attributes to the disciplines, and nicely cleans up our sysfs code. While replacing the qeth_l*_*_device_attributes() helpers, switch from sysfs_*_groups() to the more generic device_*_groups(). Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 050663129a6d70a178a8545c31bc715bfb915355 Author: Julian Wiedmann Date: Mon Dec 7 14:12:29 2020 +0100 s390/ccwgroup: use bus->dev_groups for bus-based sysfs attributes Bus drivers have their own way of describing the sysfs attributes that all devices on a bus should provide. Switch ccwgroup_attr_groups over to use bus->dev_groups, and thus free up dev->groups for usage by the ccwgroup device drivers. While adjusting the attribute naming, use ATTRIBUTE_GROUPS() to get rid of some boilerplate code. Signed-off-by: Julian Wiedmann Acked-by: Heiko Carstens Signed-off-by: David S. Miller commit 04ea30c857217eb69451f8ced5a857693666ae16 Author: Julian Wiedmann Date: Mon Dec 7 14:12:28 2020 +0100 s390/qeth: don't call INIT_LIST_HEAD() on iob's list entry INIT_LIST_HEAD() only needs to be called on actual list heads. While at it clarify the naming of the field. Suggested-by: Vasily Gorbik Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit ae502e08f45e47460406ab5c5fd2167a1011499a Author: Sakari Ailus Date: Thu Jun 18 12:39:44 2020 +0200 media: ccs-pll: Add support for decoupled OP domain calculation Add support for decoupled OP domain clock calculation. This means that the number of VT and OP domain clocks are no longer dependent on the number of CSI-2 lanes in the lane speed mode. The support also replaces the existing quirk flag to calculate OP domain clocks per lane. Also support decoupled OP domain calculation in the CCS driver. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 585e17c98407e1c2ec7735f37379e96cf0f74e3a Author: Sakari Ailus Date: Wed Sep 23 12:16:03 2020 +0200 media: ccs: Add support for lane speed model Convey the relevant PLL flags to the PLL calculator. Also the lane speed model affects how the link rate is calculated on the CSI-2 bus, as the rate is total of all lanes. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit cac8f5d28e56c405befd1613fc38c962aaf69f30 Author: Sakari Ailus Date: Mon Jun 22 12:16:24 2020 +0200 media: ccs-pll: Add support for lane speed model CCS PLL includes a capability to calculate the VT clocks on per-lane basis. Add support for this feature. Move calculation of the pixel rate on the CSI-2 bus early in the function as everything needed to calculate it is already available. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 353021588cb57db15d52f9b157ad6f2251250b50 Author: Reo Shiseki Date: Thu Nov 19 16:37:11 2020 +0900 Bluetooth: fix typo in struct name Signed-off-by: Reo Shiseki Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit e583e654565fd12e45d8cef64dcdd80e2902ac13 Author: Sakari Ailus Date: Tue Aug 25 22:31:23 2020 +0200 media: ccs-pll: Use explicit 32-bit unsigned type Use uint32_t instead of unsigned int for a variable that contains explicitly 32-bit numbers. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 82ab97c8c77629c4945de24c722cd4955cf70ef2 Author: Sakari Ailus Date: Tue Jul 7 15:24:09 2020 +0200 media: ccs-pll: Fix check for PLL multiplier upper bound The additional multiplier (for higher VT timing) of the PLL multiplier was checked against the upper limit but the result was rounded up, possibly producing too high additional multiplier. Round down instead to keep within hardware limits. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit c64cf71d10c36513071ca538f59e4c38eb25ae55 Author: Sakari Ailus Date: Tue Jul 7 10:54:14 2020 +0200 media: ccs-pll: Fix comment on check against maximum PLL multiplier The comment is about minimum PLL multiplier but the related check really deals with the maximum PLL multiplier. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 482e75e7b3eba6730cbfaa1911916d13887c9606 Author: Sakari Ailus Date: Tue Jul 7 10:31:56 2020 +0200 media: ccs-pll: Avoid overflow in pre-PLL divisor lower bound search The external clock frequency times the PLL multiplier may exceed the value range of 32-bit unsigned integers. Instead perform the same calculation y using two divisions. The result has some potential to be different, but that's ok: this number is used to limit the range of pre-PLL divisors to find optimal values. So the effect of the rare case of a different result here would mean an invalid pre-PLL divisor is tried. That will be found out a little later in any case. Also guard against dividing by zero if the external clock frequency is higher than the maximum OP PLL output clock --- a rather improbable case. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit fe52ece8d2e26bd4d38e2c99a7cd13d944c1ee98 Author: Sakari Ailus Date: Tue Jul 7 10:08:01 2020 +0200 media: ccs-pll: Fix condition for pre-PLL divider lower bound The lower bound of the pre-PLL divider was calculated based on OP SYS clock frequency which is also affected by the OP SYS clock divider. This is wrong. The right clock frequency is that of the PLL output clock. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit cab27256e8b3a6529faab9fc00e40fcf60b16590 Author: Sakari Ailus Date: Fri Jun 26 11:56:47 2020 +0200 media: ccs-pll: Begin calculation from OP system clock frequency The OP system clock frequency defines the CSI-2 bus clock frequency, not the PLL output clock frequency. Both values were overwritten in the end, but the wrong limit value was used for the OP system clock frequency, possibly leading to too high frequencies being used. Also remove now duplicated calculation of OP system clock frequency later in the PLL calculator. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 4f3d9e6eda9d73c43003701ab837868106125d96 Author: Sakari Ailus Date: Wed Jun 17 10:39:34 2020 +0200 media: ccs-pll: Use the BIT macro Use the BIT macro for setting individual bits. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 925e3e49730346a39ec718f30f0965c3785facbb Author: Sakari Ailus Date: Mon Jun 8 14:16:29 2020 +0200 media: ccs-pll: Document the structs in the header as well as the function The CCS pll is used by the CCS driver at the moment, but documenting the interface makes sense. It's non-trivial and the calculator could be used elsewhere. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit d6a88e446c04aaf3ebc4e2221aa51bf367319480 Author: Sakari Ailus Date: Tue Jun 23 15:07:24 2020 +0200 media: ccs-pll: Move the flags field down, away from 8-bit fields This way the struct will use less memory, with better packing and no waste due to unsigned long. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 47b6eaf36eba143860cf4e772a1108b1ef05520d Author: Sakari Ailus Date: Mon Jun 22 12:37:45 2020 +0200 media: ccs-pll: Differentiate between CSI-2 D-PHY and C-PHY Differentiate between CSI-2 D-PHY and C-PHY. This does not yet include support for C-PHY. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 6aadbff9d459d4e4ebaedf19d50b0f057574f756 Author: Sakari Ailus Date: Thu Jun 18 13:23:26 2020 +0200 media: ccs-pll: Remove parallel bus support The parallel bus PLL calculation has no users. Remove it. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 9c1a0d9e9188e7dc2f8f723ce87885e17636ede8 Author: Sakari Ailus Date: Tue Sep 1 13:11:11 2020 +0200 media: ccs-pll: End search if there are no better values available The VT divisor search can be ended if we've already found the value that corresponds exactly the total divisor, as there are no better (lower) values available. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 9454432af0c874eba7abb1abb76bbf62950a9087 Author: Sakari Ailus Date: Tue Sep 1 13:08:26 2020 +0200 media: ccs-pll: Use correct VT divisor for calculating VT SYS divisor Use the correct video timing divisor to calculate the SYS divisor. Instead of the current value, the minimum was used. This could have resulted in a too low SYS divisor. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 415ddd9939783cb79790aba1833ea39fd335caed Author: Sakari Ailus Date: Fri Jun 5 22:46:54 2020 +0200 media: ccs-pll: Split limits and PLL configuration into front and back parts The CCS spec supports a lot of variation in the PLL. Split the PLL in front and back parts to better prepare for supporting it. Also use CCS compliant naming for IP and OP PLL frequencies (i.e. include "clk" in the name). Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit c3833a228cef7121cb7fc64d5ef71eedcc6f2f01 Author: Sakari Ailus Date: Thu Jun 25 14:13:55 2020 +0200 media: ccs-pll: Don't use div_u64 to divide a 32-bit number pll->pll_op_clk_freq is a 32-bit number. It does not need div_u64 to divide it. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 08a02f954b0def3ada8ed6d4b2c7bcb67e885e9c Author: Oliver Neukum Date: Mon Dec 7 14:03:23 2020 +0100 USB: add RESET_RESUME quirk for Snapscan 1212 I got reports that some models of this old scanner need this when using runtime PM. Signed-off-by: Oliver Neukum Cc: stable Link: https://lore.kernel.org/r/20201207130323.23857-1-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman commit 10eb0b6ac63a15b80e4e9ae8b85668827a747350 Author: Guido Günther Date: Sat Dec 5 12:13:26 2020 +0100 usb: typec: tps6598x: Export some power supply properties This allows downstream supplies and userspace to detect whether external power is supplied. Reviewed-by: Heikki Krogerus Reviewed-by: Andy Shevchenko Signed-off-by: Guido Günther Link: https://lore.kernel.org/r/2c8e81d9da9ff05b065f66edba915edd11f74065.1607166657.git.agx@sigxcpu.org Signed-off-by: Greg Kroah-Hartman commit ff62d08fd6242a3ef5aa0a7bcae6a0b0136a60ed Author: Guido Günther Date: Sat Dec 5 12:13:25 2020 +0100 usb: typec: tps6598x: Select USB_ROLE_SWITCH and REGMAP_I2C This is more in line with what tcpm does and will be needed to avoid recursive dependency like > drivers/power/supply/Kconfig:2:error: recursive dependency detected! drivers/power/supply/Kconfig:2: symbol POWER_SUPPLY is selected by TYPEC_TPS6598X drivers/usb/typec/Kconfig:64: symbol TYPEC_TPS6598X depends on REGMAP_I2C drivers/base/regmap/Kconfig:19: symbol REGMAP_I2C is selected by CHARGER_ADP5061 drivers/power/supply/Kconfig:93: symbol CHARGER_ADP5061 depends on POWER_SUPPLY For a resolution refer to Documentation/kbuild/kconfig-language.rst subsection "Kconfig recursive dependency limitations" when selecting POWER_SUPPLY. Reviewed-by: Heikki Krogerus Reviewed-by: Andy Shevchenko Signed-off-by: Guido Günther Link: https://lore.kernel.org/r/6d11417c42d82caf66e08af160397959eb7d0d60.1607166657.git.agx@sigxcpu.org Signed-off-by: Greg Kroah-Hartman commit 3f6f6343a29d9ea7429306b83b18e66dc1331d5c Author: Dan Carpenter Date: Thu Dec 3 11:41:13 2020 +0300 usb: mtu3: fix memory corruption in mtu3_debugfs_regset() This code is using the wrong sizeof() so it does not allocate enough memory. It allocates 32 bytes but 72 are required. That will lead to memory corruption. Fixes: ae07809255d3 ("usb: mtu3: add debugfs interface files") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/X8ikqc4Mo2/0G72j@mwanda Cc: stable Signed-off-by: Greg Kroah-Hartman commit e90cfa813da7a527785033a0b247594c2de93dd8 Author: Bui Quang Minh Date: Fri Dec 4 06:24:49 2020 +0000 USB: dummy-hcd: Fix uninitialized array use in init() This error path err_add_pdata: for (i = 0; i < mod_data.num; i++) kfree(dum[i]); can be triggered when not all dum's elements are initialized. Fix this by initializing all dum's elements to NULL. Acked-by: Alan Stern Cc: stable Signed-off-by: Bui Quang Minh Link: https://lore.kernel.org/r/1607063090-3426-1-git-send-email-minhquangbui99@gmail.com Signed-off-by: Greg Kroah-Hartman commit c7721e15f434920145c376e8fe77e1c079fc3726 Author: Fabio Estevam Date: Mon Dec 7 10:09:09 2020 +0800 usb: chipidea: ci_hdrc_imx: Pass DISABLE_DEVICE_STREAMING flag to imx6ul According to the i.MX6UL Errata document: https://www.nxp.com/docs/en/errata/IMX6ULCE.pdf ERR007881 also affects i.MX6UL, so pass the CI_HDRC_DISABLE_DEVICE_STREAMING flag to workaround the issue. Fixes: 52fe568e5d71 ("usb: chipidea: imx: add imx6ul usb support") Cc: Signed-off-by: Fabio Estevam Signed-off-by: Peter Chen Link: https://lore.kernel.org/r/20201207020909.22483-2-peter.chen@kernel.org Signed-off-by: Greg Kroah-Hartman commit 7fe53dcbbfbd91ad953022281adcc6cbc9dbc052 Author: Johan Hovold Date: Fri Dec 4 09:51:08 2020 +0100 USB: core: drop pipe-type check from new control-message helpers The new control-message helpers include a pipe-type check which is almost completely redundant. Control messages are generally sent to the default pipe which always exists and is of the correct type since its endpoint representation is created by USB core as part of enumeration for all devices. There is currently only one instance of a driver in the tree which use a control endpoint other than endpoint 0 (and it does not use the new helpers). Drivers should be testing for the existence of their resources at probe rather than at runtime, but to catch drivers failing to do so USB core already does a sanity check on URB submission and triggers a WARN(). Having the same sanity check done in the helper only suppresses the warning without allowing us to find and fix the drivers. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20201204085110.20055-2-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 8f6cfbb6d4272635311b4604194e39172e7719ad Author: Karol Trzcinski Date: Fri Dec 4 18:50:14 2020 +0200 ASoC: SOF: trace: Add runtime trace filtering mechanism The "filter" debugfs file defines the log levels used by the firmware and reported by sof-logger. The file contains the formatted entry list, where each entry follows the following syntax in plain text: log_level uuid_id pipe_id comp_id; This file may be updated by userspace applications such sof-logger, or directly by the user during debugging process. An unused (wildcard) pipe_id or comp_id value should be set to -1, uuid_id is hexadecimal value, so when unused then should be set to 0. When the file is modified, an IPC command is sent to FW with new trace levels for selected components in filter elements list. Signed-off-by: Karol Trzcinski Reviewed-by: Guennadi Liakhovetski Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20201204165014.2697903-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 583791191c6d52528ae13a1812ecae43dfa12440 Author: Rob Herring Date: Thu Nov 12 23:49:51 2020 +0100 media: dt-bindings: schema indentation fixes Fix a few new indentation warnings found with yamllint (now integrated into the checks). Cc: Ricardo Ribalda Signed-off-by: Rob Herring Acked-by: Jacopo Mondi Acked-by: Hans Verkuil # For adv7604 Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit c7b884561cb5b641f3dbba950094110794119a6d Author: Lukas Wunner Date: Mon Dec 7 09:17:17 2020 +0100 spi: atmel-quadspi: Fix use-after-free on unbind atmel_qspi_remove() accesses the driver's private data after calling spi_unregister_controller() even though that function releases the last reference on the spi_controller and thereby frees the private data. Fix by switching over to the new devm_spi_alloc_master() helper which keeps the private data accessible until the driver has unbound. Fixes: 2d30ac5ed633 ("mtd: spi-nor: atmel-quadspi: Use spi-mem interface for atmel-quadspi driver") Signed-off-by: Lukas Wunner Cc: # v5.0+: 5e844cc37a5c: spi: Introduce device-managed SPI controller allocation Cc: # v5.0+ Cc: Piotr Bugalski Link: https://lore.kernel.org/r/4b05c65cf6f1ea3251484fe9a00b4c65478a1ae3.1607286887.git.lukas@wunner.de Signed-off-by: Mark Brown commit 234266a5168bbe8220d263e3aa7aa80cf921c483 Author: Lukas Wunner Date: Mon Dec 7 09:17:16 2020 +0100 spi: npcm-fiu: Disable clock in probe error path If the call to devm_spi_register_master() fails on probe of the NPCM FIU SPI driver, the clock "fiu->clk" is erroneously not unprepared and disabled. Fix it. Fixes: ace55c411b11 ("spi: npcm-fiu: add NPCM FIU controller driver") Signed-off-by: Lukas Wunner Cc: # v5.4+ Cc: Tomer Maimon Link: https://lore.kernel.org/r/9ae62f4e1cfe542bec57ac2743e6fca9f9548f55.1607286887.git.lukas@wunner.de Signed-off-by: Mark Brown commit 236924ee531d6251c8d10e9177b7742a60534ed5 Author: Lukas Wunner Date: Mon Dec 7 09:17:15 2020 +0100 spi: ar934x: Don't leak SPI master in probe error path If the call to devm_spi_register_controller() fails on probe of the Qualcomm Atheros AR934x/QCA95xx SPI driver, the spi_controller struct is erroneously not freed. Fix by switching over to the new devm_spi_alloc_master() helper. Moreover, the controller's clock is enabled on probe but not disabled if any of the subsequent probe steps fail. Finally, there's an ordering issue in ar934x_spi_remove() wherein the clock is disabled even though the controller is not yet unregistered. It is unregistered after ar934x_spi_remove() by the devres framework. As long as it is not unregistered, SPI transfers may still be ongoing and disabling the clock may break them. It is not possible to use devm_spi_register_controller() in this case, so move to the non-devm variant. All of these bugs have existed since the driver was first introduced, so it seems fair to fix them together in a single commit. Fixes: 047980c582af ("spi: add driver for ar934x spi controller") Signed-off-by: Lukas Wunner Cc: # v5.7+: 5e844cc37a5c: spi: Introduce device-managed SPI controller allocation Cc: # v5.7+ Cc: Chuanhong Guo Link: https://lore.kernel.org/r/1d58367d74d55741e0c2730a51a2b65012c8ab33.1607286887.git.lukas@wunner.de Signed-off-by: Mark Brown commit 46b5c4fb87ce8211e0f9b0383dbde72c3652d2ba Author: Lukas Wunner Date: Mon Dec 7 09:17:14 2020 +0100 spi: mt7621: Don't leak SPI master in probe error path If the calls to device_reset() or devm_spi_register_controller() fail on probe of the MediaTek MT7621 SPI driver, the spi_controller struct is erroneously not freed. Fix by switching over to the new devm_spi_alloc_master() helper. Additionally, there's an ordering issue in mt7621_spi_remove() wherein the spi_controller is unregistered after disabling the SYS clock. The correct order is to call spi_unregister_controller() *before* this teardown step because bus accesses may still be ongoing until that function returns. All of these bugs have existed since the driver was first introduced, so it seems fair to fix them together in a single commit. Fixes: 1ab7f2a43558 ("staging: mt7621-spi: add mt7621 support") Signed-off-by: Lukas Wunner Reviewed-by: Stefan Roese Cc: # v4.17+: 5e844cc37a5c: spi: Introduce device-managed SPI controller allocation Cc: # v4.17+ Link: https://lore.kernel.org/r/72b680796149f5fcda0b3f530ffb7ee73b04f224.1607286887.git.lukas@wunner.de Signed-off-by: Mark Brown commit 24f7033405abe195224ec793dbc3d7a27dec0b98 Author: Lukas Wunner Date: Mon Dec 7 09:17:13 2020 +0100 spi: mt7621: Disable clock in probe error path Commit 702b15cb9712 ("spi: mt7621: fix missing clk_disable_unprepare() on error in mt7621_spi_probe") sought to disable the SYS clock on probe errors, but only did so for 2 of 3 potentially failing calls: The clock needs to be disabled on failure of devm_spi_register_controller() as well. Moreover, the commit purports to fix a bug in commit cbd66c626e16 ("spi: mt7621: Move SPI driver out of staging") but in reality the bug has existed since the driver was first introduced. Fixes: 1ab7f2a43558 ("staging: mt7621-spi: add mt7621 support") Signed-off-by: Lukas Wunner Cc: # v4.17+: 702b15cb9712: spi: mt7621: fix missing clk_disable_unprepare() on error in mt7621_spi_probe Cc: # v4.17+ Cc: Qinglang Miao Link: https://lore.kernel.org/r/36ad42760087952fb7c10aae7d2628547c26a7ec.1607286887.git.lukas@wunner.de Signed-off-by: Mark Brown commit e297ddf296de35037fa97f4302782def196d350a Author: Lukas Wunner Date: Mon Dec 7 09:17:12 2020 +0100 media: netup_unidvb: Don't leak SPI master in probe error path If the call to spi_register_master() fails on probe of the NetUP Universal DVB driver, the spi_master struct is erroneously not freed. Likewise, if spi_new_device() fails, the spi_controller struct is not unregistered. Plug the leaks. While at it, fix an ordering issue in netup_spi_release() wherein spi_unregister_master() is called after fiddling with the IRQ control register. The correct order is to call spi_unregister_master() *before* this teardown step because bus accesses may still be ongoing until that function returns. Fixes: 52b1eaf4c59a ("[media] netup_unidvb: NetUP Universal DVB-S/S2/T/T2/C PCI-E card driver") Signed-off-by: Lukas Wunner Reviewed-by: Mauro Carvalho Chehab Cc: # v4.3+: 5e844cc37a5c: spi: Introduce device-managed SPI controller allocation Cc: # v4.3+ Cc: Kozlov Sergey Link: https://lore.kernel.org/r/c4c24f333fc7840f4a3db24789e6e10dd660bede.1607286887.git.lukas@wunner.de Signed-off-by: Mark Brown commit 5b8c88462d83331dacb48aeaec8388117fef82e0 Author: Lukas Wunner Date: Mon Dec 7 09:17:11 2020 +0100 spi: sc18is602: Don't leak SPI master in probe error path If the call to devm_gpiod_get_optional() fails on probe of the NXP SC18IS602/603 SPI driver, the spi_master struct is erroneously not freed. Fix by switching over to the new devm_spi_alloc_master() helper. Fixes: f99008013e19 ("spi: sc18is602: Add reset control via gpio pin.") Signed-off-by: Lukas Wunner Cc: # v4.9+: 5e844cc37a5c: spi: Introduce device-managed SPI controller allocation Cc: # v4.9+ Cc: Phil Reid Link: https://lore.kernel.org/r/d5f715527b894b91d530fe11a86f51b3184a4e1a.1607286887.git.lukas@wunner.de Signed-off-by: Mark Brown commit a4729c3506c3eb1a6ca5c0289f4e7cafa4115065 Author: Lukas Wunner Date: Mon Dec 7 09:17:10 2020 +0100 spi: rb4xx: Don't leak SPI master in probe error path If the calls to devm_clk_get(), devm_spi_register_master() or clk_prepare_enable() fail on probe of the Mikrotik RB4xx SPI driver, the spi_master struct is erroneously not freed. Fix by switching over to the new devm_spi_alloc_master() helper. Fixes: 05aec357871f ("spi: Add SPI driver for Mikrotik RB4xx series boards") Signed-off-by: Lukas Wunner Cc: # v4.2+: 5e844cc37a5c: spi: Introduce device-managed SPI controller allocation Cc: # v4.2+ Cc: Bert Vermeulen Link: https://lore.kernel.org/r/369bf26d71927f60943b1d9d8f51810f00b0237d.1607286887.git.lukas@wunner.de Signed-off-by: Mark Brown commit 7174dc655ef0578877b0b4598e69619d2be28b4d Author: Lukas Wunner Date: Mon Dec 7 09:17:09 2020 +0100 spi: gpio: Don't leak SPI master in probe error path If the call to devm_spi_register_master() fails on probe of the GPIO SPI driver, the spi_master struct is erroneously not freed: After allocating the spi_master, its reference count is 1. The driver unconditionally decrements the reference count on unbind using a devm action. Before calling devm_spi_register_master(), the driver unconditionally increments the reference count because on success, that function will decrement the reference count on unbind. However on failure, devm_spi_register_master() does *not* decrement the reference count, so the spi_master is leaked. The issue was introduced by commits 8b797490b4db ("spi: gpio: Make sure spi_master_put() is called in every error path") and 79567c1a321e ("spi: gpio: Use devm_spi_register_master()"), which sought to plug leaks introduced by 9b00bc7b901f ("spi: spi-gpio: Rewrite to use GPIO descriptors") but missed this remaining leak. The situation was later aggravated by commit d3b0ffa1d75d ("spi: gpio: prevent memory leak in spi_gpio_probe"), which introduced a use-after-free because it releases a reference on the spi_master if devm_add_action_or_reset() fails even though the function already does that. Fix by switching over to the new devm_spi_alloc_master() helper. Fixes: 9b00bc7b901f ("spi: spi-gpio: Rewrite to use GPIO descriptors") Signed-off-by: Lukas Wunner Reviewed-by: Linus Walleij Cc: # v4.17+: 5e844cc37a5c: spi: Introduce device-managed SPI controller allocation Cc: # v5.1-: 8b797490b4db: spi: gpio: Make sure spi_master_put() is called in every error path Cc: # v5.1-: 45beec351998: spi: bitbang: Introduce spi_bitbang_init() Cc: # v5.1-: 79567c1a321e: spi: gpio: Use devm_spi_register_master() Cc: # v5.4-: d3b0ffa1d75d: spi: gpio: prevent memory leak in spi_gpio_probe Cc: # v4.17+ Cc: Navid Emamdoost Cc: Andrey Smirnov Link: https://lore.kernel.org/r/86eaed27431c3d709e3748eb76ceecbfc790dd37.1607286887.git.lukas@wunner.de Signed-off-by: Mark Brown commit 0f4ad8d59f33b24dd86739f3be23e6af1a86f5a9 Author: Lukas Wunner Date: Mon Dec 7 09:17:08 2020 +0100 spi: spi-mtk-nor: Don't leak SPI master in probe error path If the call to devm_spi_register_controller() fails on probe of the MediaTek SPI NOR driver, the spi_controller struct is erroneously not freed. Since commit a1daaa991ed1 ("spi: spi-mtk-nor: use dma_alloc_coherent() for bounce buffer"), the same happens if the call to dmam_alloc_coherent() fails. Since commit 3bfd9103c7af ("spi: spi-mtk-nor: Add power management support"), the same happens if the call to mtk_nor_enable_clk() fails. Fix by switching over to the new devm_spi_alloc_master() helper. Fixes: 881d1ee9fe81 ("spi: add support for mediatek spi-nor controller") Signed-off-by: Lukas Wunner Reviewed-by: Ikjoon Jang Cc: # v5.7+: 5e844cc37a5c: spi: Introduce device-managed SPI controller allocation Cc: # v5.7+ Cc: Chuanhong Guo Link: https://lore.kernel.org/r/d5b9f0289465394e73dedb8ec51e180a8f1dffc9.1607286887.git.lukas@wunner.de Signed-off-by: Mark Brown commit cc53711b2191cf3b3210283ae89bf0abb98c70a3 Author: Lukas Wunner Date: Mon Dec 7 09:17:07 2020 +0100 spi: mxic: Don't leak SPI master in probe error path If the calls to devm_clk_get() or devm_ioremap_resource() fail on probe of the Macronix SPI driver, the spi_master struct is erroneously not freed. Fix by switching over to the new devm_spi_alloc_master() helper. Fixes: b942d80b0a39 ("spi: Add MXIC controller driver") Signed-off-by: Lukas Wunner Cc: # v5.0+: 5e844cc37a5c: spi: Introduce device-managed SPI controller allocation Cc: # v5.0+ Cc: Mason Yang Link: https://lore.kernel.org/r/4fa6857806e7e75741c05d057ac9df3564460114.1607286887.git.lukas@wunner.de Signed-off-by: Mark Brown commit 393f981ca5f797b58b882d42b7621fb6e43c7f5b Author: Lukas Wunner Date: Mon Dec 7 09:17:06 2020 +0100 spi: rpc-if: Fix use-after-free on unbind rpcif_spi_remove() accesses the driver's private data after calling spi_unregister_controller() even though that function releases the last reference on the spi_controller and thereby frees the private data. Fix by switching over to the new devm_spi_alloc_master() helper which keeps the private data accessible until the driver has unbound. Fixes: eb8d6d464a27 ("spi: add Renesas RPC-IF driver") Signed-off-by: Lukas Wunner Cc: # v5.9+: 5e844cc37a5c: spi: Introduce device-managed SPI controller allocation Cc: # v5.9+ Cc: Sergei Shtylyov Link: https://lore.kernel.org/r/c5da472c28021da2f6517441685cef033d40b140.1607286887.git.lukas@wunner.de Signed-off-by: Mark Brown commit 5626308bb94d9f930aa5f7c77327df4c6daa7759 Author: Lukas Wunner Date: Mon Dec 7 09:17:05 2020 +0100 spi: pxa2xx: Fix use-after-free on unbind pxa2xx_spi_remove() accesses the driver's private data after calling spi_unregister_controller() even though that function releases the last reference on the spi_controller and thereby frees the private data. Fix by switching over to the new devm_spi_alloc_master/slave() helper which keeps the private data accessible until the driver has unbound. Fixes: 32e5b57232c0 ("spi: pxa2xx: Fix controller unregister order") Signed-off-by: Lukas Wunner Cc: # v2.6.17+: 5e844cc37a5c: spi: Introduce device-managed SPI controller allocation Cc: # v2.6.17+: 32e5b57232c0: spi: pxa2xx: Fix controller unregister order Cc: # v2.6.17+ Link: https://lore.kernel.org/r/5764b04d4a6e43069ebb7808f64c2f774ac6f193.1607286887.git.lukas@wunner.de Signed-off-by: Mark Brown commit e77df3eca12be4b17f13cf9f215cff248c57d98f Author: Lukas Wunner Date: Mon Dec 7 09:17:04 2020 +0100 spi: spi-sh: Fix use-after-free on unbind spi_sh_remove() accesses the driver's private data after calling spi_unregister_master() even though that function releases the last reference on the spi_master and thereby frees the private data. Fix by switching over to the new devm_spi_alloc_master() helper which keeps the private data accessible until the driver has unbound. Fixes: 680c1305e259 ("spi/spi_sh: use spi_unregister_master instead of spi_master_put in remove path") Signed-off-by: Lukas Wunner Cc: # v3.0+: 5e844cc37a5c: spi: Introduce device-managed SPI controller allocation Cc: # v3.0+ Cc: Axel Lin Link: https://lore.kernel.org/r/6d97628b536baf01d5e3e39db61108f84d44c8b2.1607286887.git.lukas@wunner.de Signed-off-by: Mark Brown commit 6cfd39e212dee2e77a0227ce4e0f55fa06d79f46 Author: Lukas Wunner Date: Mon Dec 7 09:17:03 2020 +0100 spi: spi-qcom-qspi: Fix use-after-free on unbind qcom_qspi_remove() accesses the driver's private data after calling spi_unregister_master() even though that function releases the last reference on the spi_master and thereby frees the private data. Fix by switching over to the new devm_spi_alloc_master() helper which keeps the private data accessible until the driver has unbound. Fixes: f79a158d37c2 ("spi: spi-qcom-qspi: Use OPP API to set clk/perf state") Signed-off-by: Lukas Wunner Cc: # v5.9+: 5e844cc37a5c: spi: Introduce device-managed SPI controller allocation Cc: # v5.9+ Cc: Rajendra Nayak Link: https://lore.kernel.org/r/b6d3c4dce571d78a532fd74f27def0d5dc8d8a24.1607286887.git.lukas@wunner.de Signed-off-by: Mark Brown commit 8f96c434dfbc85ffa755d6634c8c1cb2233fcf24 Author: Lukas Wunner Date: Mon Dec 7 09:17:02 2020 +0100 spi: spi-geni-qcom: Fix use-after-free on unbind spi_geni_remove() accesses the driver's private data after calling spi_unregister_master() even though that function releases the last reference on the spi_master and thereby frees the private data. Moreover, since commit 1a9e489e6128 ("spi: spi-geni-qcom: Use OPP API to set clk/perf state"), spi_geni_probe() leaks the spi_master allocation if the calls to dev_pm_opp_set_clkname() or dev_pm_opp_of_add_table() fail. Fix by switching over to the new devm_spi_alloc_master() helper which keeps the private data accessible until the driver has unbound and also avoids the spi_master leak on probe. Fixes: 561de45f72bd ("spi: spi-geni-qcom: Add SPI driver support for GENI based QUP") Signed-off-by: Lukas Wunner Cc: # v4.20+: 5e844cc37a5c: spi: Introduce device-managed SPI controller allocation Cc: # v4.20+ Cc: Rajendra Nayak Cc: Girish Mahadevan Link: https://lore.kernel.org/r/dfa1d8c41b8acdfad87ec8654cd124e6e3cb3f31.1607286887.git.lukas@wunner.de Signed-off-by: Mark Brown commit 373afef350a93519b4b8d636b0895da8650b714b Author: Lukas Wunner Date: Mon Dec 7 09:17:01 2020 +0100 spi: davinci: Fix use-after-free on unbind davinci_spi_remove() accesses the driver's private data after it's been freed with spi_master_put(). Fix by moving the spi_master_put() to the end of the function. Fixes: fe5fd2540947 ("spi: davinci: Use dma_request_chan() for requesting DMA channel") Signed-off-by: Lukas Wunner Acked-by: Peter Ujfalusi Cc: # v4.7+ Link: https://lore.kernel.org/r/412f7eb1cf8990e0a3a2153f4c577298deab623e.1607286887.git.lukas@wunner.de Signed-off-by: Mark Brown commit c066efb07d1e8b801ea9d0727119958c9904e63d Author: Tudor Ambarus Date: Mon Dec 7 15:59:59 2020 +0200 spi: atmel-quadspi: Move common code outside of if else QSPI_IFR is set as the last QSPI Instruction Frame register regardless of the sama5d2 or sam9x60 version of the IP. Move the writing of QSPI_IFR outside of the IP specific code. Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20201207135959.154124-5-tudor.ambarus@microchip.com Signed-off-by: Mark Brown commit d00364b6a60475cd75fd07e847ad6f955952638b Author: Tudor Ambarus Date: Mon Dec 7 15:59:58 2020 +0200 spi: atmel-quadspi: Write QSPI_IAR only when needed The address must be written in QSPI_IAR only when we have a instruction frame with address but no data. Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20201207135959.154124-4-tudor.ambarus@microchip.com Signed-off-by: Mark Brown commit a6ff3a784ff9975dc77676827a2f448203511d19 Author: Tudor Ambarus Date: Mon Dec 7 15:59:57 2020 +0200 spi: atmel-quadspi: Drop superfluous set of QSPI_IFR_APBTFRTYP_READ That bit describes the APB transfer type. We are writing serial memory registers via AHB acesses, that bit does not make sense in the current context. Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20201207135959.154124-3-tudor.ambarus@microchip.com Signed-off-by: Mark Brown commit cac8c821059639b015586abf61623c62cc549a13 Author: Tudor Ambarus Date: Mon Dec 7 15:59:56 2020 +0200 spi: atmel-quadspi: Fix AHB memory accesses Following error was seen when mounting a 16MByte ubifs: UBIFS error (ubi0:0 pid 1893): check_lpt_type.constprop.6: invalid type (15) in LPT node type QSPI_IFR.TFRTYP was not set correctly. When data transfer is enabled and one wants to access the serial memory through AHB in order to: - read in the serial memory, but not a memory data, for example a JEDEC-ID, QSPI_IFR.TFRTYP must be written to '0' (both sama5d2 and sam9x60). - read in the serial memory, and particularly a memory data, TFRTYP must be written to '1' (both sama5d2 and sam9x60). - write in the serial memory, but not a memory data, for example writing the configuration or the QSPI_SR, TFRTYP must be written to '2' for sama5d2 and to '0' for sam9x60. - write in the serial memory in particular to program a memory data, TFRTYP must be written to '3' for sama5d2 and to '1' for sam9x60. Fix the setting of the QSPI_IFR.TFRTYP field. Fixes: 2d30ac5ed633 ("mtd: spi-nor: atmel-quadspi: Use spi-mem interface for atmel-quadspi driver") Cc: # v5.0+ Reported-by: Tom Burkart Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20201207135959.154124-2-tudor.ambarus@microchip.com Signed-off-by: Mark Brown commit bb9dd3ce6177e1f8cf01b0d45e6bd9b93f656bd0 Author: Ranjani Sridharan Date: Wed Dec 2 11:33:43 2020 -0800 ASoC: pcm: send DAPM_STREAM_STOP event in dpcm_fe_dai_shutdown A recent change removed the call to send the DAPM_STREAM_STOP event in dpcm_fe_dai_shutdown. But this causes a regression when a PCM prepare is not paired with a hw_free. So, add the DAPM_STREAM_STOP event back to dpcm_fe_dai_shutdown() to fix this. The new sequence would be: soc_pcm_prepare() -> SND_SOC_DAPM_STREAM_START soc_pcm_hw_free() -> soc_pcm_hw_free() -> SND_SOC_DAPM_STREAM_STOP dpcm_fe_dai_shutdown() -> SND_SOC_DAPM_STREAM_STOP Note that the DAPM_STREAM_STOP will be called twice but it seems harmless. Fixes: a27b421f1d04 ('ASoC: pcm: call snd_soc_dapm_stream_stop() in soc_pcm_hw_clean') Reported-by: Hans de Goede Reviewed-by: Pierre-Louis Bossart Signed-off-by: Ranjani Sridharan Tested-by: Hans de Goede Link: https://lore.kernel.org/r/20201202193343.912942-1-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown commit e748edd9841306908b4e02dddd0afd1aa1f8b973 Author: Zhang Changzhong Date: Fri Dec 4 16:42:37 2020 +0800 spi: dw: Fix error return code in dw_spi_bt1_probe() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: abf00907538e ("spi: dw: Add Baikal-T1 SPI Controller glue driver") Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Acked-by: Serge Semin Link: https://lore.kernel.org/r/1607071357-33378-1-git-send-email-zhangchangzhong@huawei.com Signed-off-by: Mark Brown commit 19cf9d7afc2e7b91f47b8f2638ec08b29de55060 Author: Ross Schmidt Date: Sat Dec 5 21:45:16 2020 -0600 staging: rtl8723bs: remove LIST_CONTAINOR Remove unnecessary macro for container_of and call it directly. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201206034517.4276-9-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4cd8898174909215a21fd98fae86704f8427dc9e Author: Ross Schmidt Date: Sat Dec 5 21:45:15 2020 -0600 staging: rtl8723bs: remove unused macros Remove many macros from wifi.h because they are unused. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201206034517.4276-8-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit b3ae8af6a782241b3a97ba6a30739f633764bfa7 Author: Ross Schmidt Date: Sat Dec 5 21:45:14 2020 -0600 staging: rtl8723bs: replace RTW_IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK Replace unique macro RTW_IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK with kernel provided IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK. The other IEEE80211_ADDBA_* and IEEE_DELBA_* macros are duplicates already defined in linux/ieee80211.h, remove them. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201206034517.4276-7-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2841fa62e23710e2cc1526f92be50de983de93e3 Author: Ross Schmidt Date: Sat Dec 5 21:45:13 2020 -0600 staging: rtl8723bs: remove WLAN_HT_CAP_SM_PS_* macros The WLAN_HT_CAP_SM_PS_* macro family is already defined in linux/ieee80211.h, remove them. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201206034517.4276-6-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit ac74ae7671d7d3ca3c827b1820b9248d235886ff Author: Ross Schmidt Date: Sat Dec 5 21:45:12 2020 -0600 staging: rtl8723bs: replace OP_MODE_* and HT_INFO_OPERATION_MODE_* macros Replace unique OP_MODE_* and HT_INFO_OPERATION_MODE_* macro families with kernel provided IEEE80211_HT_OP_MODE_* macros. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201206034517.4276-5-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 98b32c71a455ff289442779fee02ad60a6217006 Author: Ross Schmidt Date: Sat Dec 5 21:45:11 2020 -0600 staging: rtl8723bs: replace HT_CAP_AMPDU_FACTOR Replace unique HT_CAP_AMPDU_FACTOR enum with kernel provided ieee80211_max_ampdu_length_exp enum. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201206034517.4276-4-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2415ae7fa2c7c23436d711eb75c5d40481d5a256 Author: Ross Schmidt Date: Sat Dec 5 21:45:10 2020 -0600 staging: rtl8723bs: replace cap_* macros Replace unique cap_* macros with kernel provided WLAN_CAPABILITY_* macros. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201206034517.4276-3-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5ed3e6f29f76d6612929892df969d7f2ec0115c6 Author: Ross Schmidt Date: Sat Dec 5 21:45:09 2020 -0600 staging: rtl8723bs: replace WIFI_REASON_CODE Replace unique macros and WIFI_REASON_CODE enum with the kernel provided ieee80211_reasoncode. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201206034517.4276-2-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6d75b5044bb39917fc834e862e97ec84927e5dd3 Author: Ross Schmidt Date: Sat Dec 5 21:45:08 2020 -0600 staging: rtl8723bs: replace unique macros and WIFI_STATUS_CODE Replace many unique macros and WIFI_STATUS_CODE enum with kernel provided ieee80211_statuscode. A duplicate WLAN_STATUS_ASSOC_DENIED_NOSHORT macro is also removed. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201206034517.4276-1-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit e77b259f67ab99f1e22ce895b9b1c637fd5f2d4c Author: Wang Hai Date: Sat Dec 5 18:38:27 2020 +0800 staging: greybus: audio: Fix possible leak free widgets in gbaudio_dapm_free_controls In gbaudio_dapm_free_controls(), if one of the widgets is not found, an error will be returned directly, which will cause the rest to be unable to be freed, resulting in leak. This patch fixes the bug. If if one of them is not found, just skip and free the others. Fixes: 510e340efe0c ("staging: greybus: audio: Add helper APIs for dynamic audio module") Reported-by: Hulk Robot Reviewed-by: Vaibhav Agarwal Signed-off-by: Wang Hai Link: https://lore.kernel.org/r/20201205103827.31244-1-wanghai38@huawei.com Signed-off-by: Greg Kroah-Hartman commit 94168e2ba4dc6a8db033afcd32ad64ab8ec9f09c Author: Sergio Paracuellos Date: Sun Dec 6 11:53:33 2020 +0100 staging: mt7621-pinctrl: stop using the deprecated 'pinctrl_add_gpio_range' If the gpio DT node has the 'gpio-ranges' property, the range will be added by the gpio core and doesn't need to be added by the pinctrl driver. By having the gpio-ranges property, we can map every pin between gpio node and pinctrl node and we can stop using the deprecated pinctrl_add_gpio_range() function. Reviewed-by: Linus Walleij Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20201206105333.18428-1-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6c7b8ac995d9960b8a7238c10fd1d449f0157da1 Author: Brother Matthew De Angelis Date: Sat Dec 5 20:59:45 2020 -0600 Staging: rtl8723bs/core: add blank line after declarations Fix coding style issue. Add blank line after variable declarations at all the locations found by checkpatch.pl. Signed-off-by: Brother Matthew De Angelis Link: https://lore.kernel.org/r/20201206025945.GA464875@a Signed-off-by: Greg Kroah-Hartman commit 954c647acea0c07aa1ff4941b7f8283f7600d0c1 Author: Brother Matthew De Angelis Date: Sat Dec 5 17:26:13 2020 -0600 Staging: rtl8723bs/core: fix brace coding style issue Remove unnecessary braces identified by checkpatch.pl at lines 740, 1039,1602,1922,1939. Signed-off-by: Brother Matthew De Angelis Link: https://lore.kernel.org/r/8ddd195a246696e9315dacfcce06b7ba7f9d7d1a.1607209336.git.matthew.v.deangelis@gmail.com Signed-off-by: Greg Kroah-Hartman commit be25cfd80e8f0552344c894e685810acdc6d02a1 Author: Brother Matthew De Angelis Date: Sat Dec 5 17:23:14 2020 -0600 Staging: rtl8723bs/core: delete empty if statement Delete an if statement that was not executing anything when true. This has the side effect of removing one checkpatch warning about braces not being necessary. Signed-off-by: Brother Matthew De Angelis Link: https://lore.kernel.org/r/1895dc8a7b44bfdcb6a46273703fabad80cbdf99.1607209336.git.matthew.v.deangelis@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9e5f21d656cbf0407189114f0d418b095271a36e Author: Hans Verkuil Date: Tue Dec 1 13:44:40 2020 +0100 media: vivid: fix 'disconnect' error injection The 'disconnect' error injection functionality suffered from bit rot. New device nodes were added without updating vivid_user_gen_s_ctrl(), so that function had to be updated for the new device nodes. Also, vivid didn't check if specific device nodes were actually ever created, so the vivid_is_last_user() would fail on that (it would return true instead of false in that case). Finally, selecting Disconnect, then unbind the vivid driver would fail since the remove() would think that the device nodes were already unregistered. Keep track of whether disconnect was pressed and re-register the device nodes in remove() before doing the real unregister. [hverkuil: unsigned uses -> unsigned int uses] Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6c91799f59ed491a2b5bf5ef7c6d60306cda4e09 Author: Arnd Bergmann Date: Thu Dec 3 23:38:30 2020 +0100 staging: bcm2835: fix vchiq_mmal dependencies When the MMAL code is built-in but the vchiq core config is set to =m, the mmal code never gets built, which in turn can lead to link errors: ERROR: modpost: "vchiq_mmal_port_set_format" [drivers/staging/vc04_services/bcm2835-camera/bcm2835-v4l2.ko] undefined! ERROR: modpost: "vchiq_mmal_port_disable" [drivers/staging/vc04_services/bcm2835-camera/bcm2835-v4l2.ko] undefined! ERROR: modpost: "vchiq_mmal_port_parameter_set" [drivers/staging/vc04_services/bcm2835-camera/bcm2835-v4l2.ko] undefined! ERROR: modpost: "vchiq_mmal_component_finalise" [drivers/staging/vc04_services/bcm2835-camera/bcm2835-v4l2.ko] undefined! ERROR: modpost: "vchiq_mmal_port_connect_tunnel" [drivers/staging/vc04_services/bcm2835-camera/bcm2835-v4l2.ko] undefined! ERROR: modpost: "vchiq_mmal_component_enable" [drivers/staging/vc04_services/bcm2835-camera/bcm2835-v4l2.ko] undefined! ERROR: modpost: "vchiq_mmal_finalise" [drivers/staging/vc04_services/bcm2835-camera/bcm2835-v4l2.ko] undefined! ERROR: modpost: "vchiq_mmal_component_init" [drivers/staging/vc04_services/bcm2835-camera/bcm2835-v4l2.ko] undefined! ERROR: modpost: "vchiq_mmal_component_disable" [drivers/staging/vc04_services/bcm2835-camera/bcm2835-v4l2.ko] undefined! ERROR: modpost: "mmal_vchi_buffer_init" [drivers/staging/vc04_services/bcm2835-camera/bcm2835-v4l2.ko] undefined! ERROR: modpost: "vchiq_mmal_port_enable" [drivers/staging/vc04_services/bcm2835-camera/bcm2835-v4l2.ko] undefined! ERROR: modpost: "vchiq_mmal_version" [drivers/staging/vc04_services/bcm2835-camera/bcm2835-v4l2.ko] undefined! ERROR: modpost: "vchiq_mmal_submit_buffer" [drivers/staging/vc04_services/bcm2835-camera/bcm2835-v4l2.ko] undefined! ERROR: modpost: "vchiq_mmal_init" [drivers/staging/vc04_services/bcm2835-camera/bcm2835-v4l2.ko] undefined! ERROR: modpost: "mmal_vchi_buffer_cleanup" [drivers/staging/vc04_services/bcm2835-camera/bcm2835-v4l2.ko] undefined! ERROR: modpost: "vchiq_mmal_port_parameter_get" [drivers/staging/vc04_services/bcm2835-camera/bcm2835-v4l2.ko] undefined! Change the Kconfig to depend on BCM2835_VCHIQ like the other drivers, and remove the now redundant dependencies. Fixes: b18ee53ad297 ("staging: bcm2835: Break MMAL support out from camera") Acked-by: Jacopo Mondi Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20201203223836.1362313-1-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman commit fb25ca37317200fa97ea6b8952e07958f06da7a6 Author: Jacopo Mondi Date: Thu Nov 26 08:47:57 2020 +0100 media: rcar-vin: Mask VNCSI_IFMD register The VNCSI_IFMD register controls the data expansion mode and the channel routing between the CSI-2 receivers and VIN instances. According to the chip manual revision 2.20 not all fields are available for all the SoCs: - V3M, V3H and E3 do not support the DES1 field has they do not feature a CSI20 receiver. - D3 only supports parallel input, and the whole register shall always be written as 0. Inspect the per-SoC channel routing table where the available CSI-2 instances are reported and configure VNCSI_IFMD accordingly. This patch supports this BSP change commit: https://github.com/renesas-rcar/linux-bsp/commit/f54697394457 ("media: rcar-vin: Fix VnCSI_IFMD register access for r8a77990") [hverkuil: replace BSP commit ID with BSP URL] Reviewed-by: Niklas Söderlund Suggested-by: Niklas Söderlund Signed-off-by: Jacopo Mondi Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit aa821b2b92699692d7479567481bd807fc8a6d2d Author: Neil Armstrong Date: Wed Dec 2 18:44:16 2020 +0100 media: MAINTAINERS: Add myself as maintainer of the Amlogic GE2D driver Add new entry to MAINTAINERS. [hverkuil: added changelog] Signed-off-by: Neil Armstrong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 59a635327ca70de540b4083eeb954ffc7ce9ff94 Author: Neil Armstrong Date: Wed Dec 2 18:44:15 2020 +0100 media: meson: Add M2M driver for the Amlogic GE2D Accelerator Unit The GE2D is a 2D accelerator with various features like configurable blitter with alpha blending, frame rotation, scaling, format conversion and colorspace conversion. The driver implements a Memory2Memory VB2 V4L2 streaming device permitting: - 0, 90, 180, 270deg rotation - horizontal/vertical flipping - source cropping - destination compositing - 32bit/24bit/16bit format conversion This adds the support for the GE2D version found in the AXG SoCs Family. The missing features are: - Source scaling - Colorspace conversion - Advanced alpha blending & blitting options Is passes v4l2-compliance: SHA: ea16a7ef13a902793a5c2626b0cefc4d956147f3, 64 bits, 64-bit time_t [hverkuil: add missing linux/bitfield.h include] Signed-off-by: Neil Armstrong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 635e51f14476525577f906a998ca8ddf6f252dbb Author: Neil Armstrong Date: Wed Dec 2 18:44:14 2020 +0100 media: dt-bindings: media: Add bindings for the Amlogic GE2D Accelerator Unit The GE2D is a 2D accelerator with various features like configurable blitter with alpha blending, frame rotation, scaling, format conversion and colorspace conversion. This adds the bindings for the GE2D version found in the AXG SoCs Family. Signed-off-by: Neil Armstrong Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 68b4a01f88af32ae677e142c204595e847f897b8 Author: Jernej Skrabec Date: Wed Dec 2 18:44:13 2020 +0100 media: cedrus: Make VP8 codec as capability Commit 31d9b9ef8564 ("media: cedrus: Register all codecs as capability") makes separate capability flags for each codec. However, VP8 codec was merged at the same time as mentioned patch, so there is no capability flag for it. This patch adds capability flag for VP8 and enables it for all variants except for V3s. Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e469d0b09a19496e1972a20974bbf55b728151eb Author: Alan Stern Date: Wed Dec 2 18:20:04 2020 +0100 media: gspca: Fix memory leak in probe The gspca driver leaks memory when a probe fails. gspca_dev_probe2() calls v4l2_device_register(), which takes a reference to the underlying device node (in this case, a USB interface). But the failure pathway neglects to call v4l2_device_unregister(), the routine responsible for dropping this reference. Consequently the memory for the USB interface and its device never gets released. This patch adds the missing function call. Reported-and-tested-by: syzbot+44e64397bd81d5e84cba@syzkaller.appspotmail.com Signed-off-by: Alan Stern CC: Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2f6fc9e08bf79f11516edef855283c6212bbe78f Author: Andreas Kemnade Date: Tue Dec 1 20:12:37 2020 +0100 ARM: omap2plus_defconfig: enable SPI GPIO GTA04 uses that for controlling the td028ttec1 panel. So for easier testing/bisecting it is useful to have it enabled in the defconfig. Signed-off-by: Andreas Kemnade Signed-off-by: Tony Lindgren commit eca6ba20f38cfa2f148d7bd13db7ccd19e88635b Author: Arnd Bergmann Date: Thu Dec 3 23:30:56 2020 +0100 platform/x86: mlx-platform: remove an unused variable The only reference to the mlxplat_mlxcpld_psu[] array got removed, so there is now a warning from clang: drivers/platform/x86/mlx-platform.c:322:30: error: variable 'mlxplat_mlxcpld_psu' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration] static struct i2c_board_info mlxplat_mlxcpld_psu[] = { Remove the array as well and adapt the ARRAY_SIZE() call accordingly. Fixes: 912b341585e3 ("platform/x86: mlx-platform: Remove PSU EEPROM from MSN274x platform configuration") Signed-off-by: Arnd Bergmann Acked-by: Vadim Pasternak Link: https://lore.kernel.org/r/20201203223105.1195709-1-arnd@kernel.org Signed-off-by: Hans de Goede commit ec76c2eea903947202098090bbe07a739b5246e9 Author: Andreas Kemnade Date: Fri Dec 4 10:55:39 2020 +0100 ARM: OMAP2+: omap_device: fix idling of devices during probe On the GTA04A5 od->_driver_status was not set to BUS_NOTIFY_BIND_DRIVER during probe of the second mmc used for wifi. Therefore omap_device_late_idle idled the device during probing causing oopses when accessing the registers. It was not set because od->_state was set to OMAP_DEVICE_STATE_IDLE in the notifier callback. Therefore set od->_driver_status also in that case. This came apparent after commit 21b2cec61c04 ("mmc: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in v4.4") causing this oops: omap_hsmmc 480b4000.mmc: omap_device_late_idle: enabled but no driver. Idling 8<--- cut here --- Unhandled fault: external abort on non-linefetch (0x1028) at 0xfa0b402c ... (omap_hsmmc_set_bus_width) from [] (omap_hsmmc_set_ios+0x11c/0x258) (omap_hsmmc_set_ios) from [] (mmc_power_up.part.8+0x3c/0xd0) (mmc_power_up.part.8) from [] (mmc_start_host+0x88/0x9c) (mmc_start_host) from [] (mmc_add_host+0x58/0x84) (mmc_add_host) from [] (omap_hsmmc_probe+0x5fc/0x8c0) (omap_hsmmc_probe) from [] (platform_drv_probe+0x48/0x98) (platform_drv_probe) from [] (really_probe+0x1dc/0x3b4) Fixes: 04abaf07f6d5 ("ARM: OMAP2+: omap_device: Sync omap_device and pm_runtime after probe defer") Fixes: 21b2cec61c04 ("mmc: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in v4.4") Acked-by: Ulf Hansson Signed-off-by: Andreas Kemnade [tony@atomide.com: left out extra parens, trimmed description stack trace] Signed-off-by: Tony Lindgren commit 2b006e748c81da1b32029257d003f9b2af7435a5 Author: Laurent Pinchart Date: Mon Dec 7 00:03:16 2020 +0100 media: doc: pixfmt-yuv: Move all planar YUV formats to common file Planar pixel formats are documented in separate files. This duplicates information, as those formats share comon traits. Consolidate them in a single file and summarize their descriptions in a single table. Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit da785536e0072b196e721ae64d96fdcc8ef318fc Author: Laurent Pinchart Date: Mon Dec 7 00:03:15 2020 +0100 media: doc: pixfmt-yuv: Move all semi-planar YUV formats to common file Semi-planar pixel formats are documented in separate files. This duplicates information, as those formats share comon traits. Consolidate them in a single file and summarize their descriptions in a single table. Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit af4f450576958cbb462c9805362d898662051e26 Author: Laurent Pinchart Date: Mon Dec 7 00:03:14 2020 +0100 media: doc: pixfmt-yuv: Move all luma-only YUV formats to common file Luma-only pixel formats are documented in separate files. This duplicates information, as those formats share comon traits. Consolidate them in a single file and describe them in a single table. Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4bfc1688e10248f163b8dc83c47bada2073f241b Author: Laurent Pinchart Date: Mon Dec 7 00:03:13 2020 +0100 media: doc: pixfmt-packed-yuv: Clarify naming scheme for 4:4:4 formats Document the naming scheme for the existing packed YUV 4:4:4 formats, as previously done for the RGB formats. Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2f2a387e9fa495ec7ab4fcb29e0d93c7be022f97 Author: Laurent Pinchart Date: Mon Dec 7 00:03:12 2020 +0100 media: doc: pixfmt-packed-yuv: Express 4:4:4 formats in a more compact way The 4:4:4 packed YUV formats are documented with a bit-level representation, which creates a wide table. Switch to a byte-oriented representation to make it more compact. This prepares for the addition of formats with more than 8 bits per component, that would make the table way too wide. Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4578d936b4ba694d79909f3f4f2deaed4b64f2c5 Author: Laurent Pinchart Date: Mon Dec 7 00:03:11 2020 +0100 media: doc: pixfmt-packed-yuv: Fill padding bits with 'X' The padding bits are left blank, which look weird in the XYUV format, and, worse, may lead to the VUYX format to be understand as consuming 3 bytes per pixel. Add 'X' for padding bits as we do for RGB formats. Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7cb8bd292ba0e3823cf31f8cd247c5557f3b7c67 Author: Laurent Pinchart Date: Mon Dec 7 00:03:10 2020 +0100 media: doc: pixfmt-yuv: Move all packed YUV formats to common file The pixfmt-packed-yuv.rst file documents packed YUV 4:4:4 formats, but is titled generically as "Packed YUV formats". 4:2:2 and 4:1:1 packed YUV formats are documented in separate files, which can be confusing. Group all packed YUV formats in pixfmt-packed-yuv.rst, which allows documenting the 4:2:2 formats in a more concise way. Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e3ae4c204d1f00c4366b4beeae62b3414761c6f8 Author: Laurent Pinchart Date: Mon Dec 7 00:03:09 2020 +0100 media: doc: pixfmt-yuv: Document subsampling in more details Document YUV subsampling, including chroma spatial siting, and replace the siting examples in individual formats by references to the common documentation. Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a1bcf9b9a7066e605ab36e4db560b6fa5c3e85a3 Author: Laurent Pinchart Date: Mon Dec 7 00:03:08 2020 +0100 media: doc: pixfmt-rgb: Replace '-' with 'X' to denote padding Using '-' to represent padding bits and bytes make text and tables more difficult to read. Use 'x' and 'X' instead. Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2ac9280cb459a7d00d7c432453b208865301f1d9 Author: Laurent Pinchart Date: Mon Dec 7 00:03:07 2020 +0100 media: doc: pixfmt-rgb: Make 8 bits per component table more compact All formats using 8 bits per component can be described with a byte granularity instead of a bit granularity without loss of precision. This makes the corresponding table more compact and easier to read. Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e9a66489c383bc11f786db1d79e952e89cb137fe Author: Laurent Pinchart Date: Mon Dec 7 00:03:06 2020 +0100 media: doc: pixfmt-rgb: Clarify naming scheme for RGB formats The naming scheme for the RGB pixel formats has been developed organically, and isn't consistent between formats using less than 8 bits per pixels (mostly stored in 1 or 2 bytes per pixel, except for RGB666 that uses 4 bytes per pixel) and formats with 8 bits per pixel (stored in 3 or 4 bytes). For the latter category, the names use a components order convention that is the opposite of the first category, and the opposite of DRM pixel formats. This has led to lots of confusion in the past, and would really benefit from being explained more precisely. Do so, which also prepares for the addition of additional RGB pixels formats. Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 25417185e9b5ff90746d50769d2a3fcd1629e254 Author: Jasper St. Pierre Date: Wed Dec 2 14:39:42 2020 +0800 ACPI: video: Add DMI quirk for GIGABYTE GB-BXBT-2807 The GIGABYTE GB-BXBT-2807 is a mini-PC which uses off the shelf components, like an Intel GPU which is meant for mobile systems. As such, it, by default, has a backlight controller exposed. Unfortunately, the backlight controller only confuses userspace, which sees the existence of a backlight device node and has the unrealistic belief that there is actually a backlight there! Add a DMI quirk to force the backlight off on this system. Signed-off-by: Jasper St. Pierre Reviewed-by: Chris Chiu Signed-off-by: Rafael J. Wysocki commit 67c2a10bff74e938279bb519d2853babbd52c1d7 Author: Laurent Pinchart Date: Mon Dec 7 00:03:05 2020 +0100 media: doc: pixfmt-rgb: Add title for deprecated formats Improve readability of the documentation by adding a section title for the deprecated formats. Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3747115f85bb73b69ec345f518bec3a5f8e7838d Author: Laurent Pinchart Date: Mon Dec 7 00:03:04 2020 +0100 media: doc: pixfmt-rgb: Remove layout table for packed RGB formats The packed RGB formats documentation includes a layout table without any context. This doesn't bring much useful information, and is confusing at best. Remove it. Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 473dbed54fdbac0e8671c2e0d0fa5f3bad281a31 Author: Laurent Pinchart Date: Mon Dec 7 00:03:03 2020 +0100 media: videodev2.h: Move HM12 format to YUV semi-planar section V4L2_PIX_FMT_HM12 is a YUV semi-planar macro-block format. Move it from the packed YUV formats section where it was misplaced to the YUV semi-planar formats section. Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0a078e0d8ecb0ca0296755399c3a8f38b60c7b23 Author: Laurent Pinchart Date: Mon Dec 7 00:03:02 2020 +0100 media: videodev2.h: Move HI240 format to vendor-specific section V4L2_PIX_FMT_HI240 is a 8-bit dithered RGB format specific to BTTV. Move it from the packed YUV formats section where it was misplaced to the vendor-specific formats section. Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 12fc4dad94dfac25599f31257aac181c691ca96f Author: Daniel Scally Date: Sat Dec 5 17:04:03 2020 +0000 Revert "ACPI / resources: Use AE_CTRL_TERMINATE to terminate resources walks" This reverts commit 8a66790b7850a6669129af078768a1d42076a0ef. Switching this function to AE_CTRL_TERMINATE broke the documented behaviour of acpi_dev_get_resources() - AE_CTRL_TERMINATE does not, in fact, terminate the resource walk because acpi_walk_resource_buffer() ignores it (specifically converting it to AE_OK), referring to that value as "an OK termination by the user function". This means that acpi_dev_get_resources() does not abort processing when the preproc function returns a negative value. Signed-off-by: Daniel Scally Cc: 3.10+ # 3.10+ Signed-off-by: Rafael J. Wysocki commit 3771c031d60f790aba18f16b058ed23a5ac20bd6 Author: Laurent Pinchart Date: Mon Dec 7 00:03:01 2020 +0100 media: videodev2.h: Remove unneeded comment about 4CC value The V4L2_PIX_FMT_BGRA444 format has a comment that explains why its 4CC value is GA12. This explains the development history and isn't of much interest to readers, it should have been part of a commit message instead. Drop the comment, anyone interested in history can turn to git. Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit bd1ed17d19eba00792cb29f369b8c29da1008d38 Author: Sakari Ailus Date: Fri Dec 4 12:46:56 2020 +0100 media: ccs: Fix return value from probe rval wasn't set, resulting in probe returning zero instead of an error. Fixes: de10c1619c48 ("[media] smiapp: Get clock rate if it's not available through DT") Reported-by: Zhang Changzhong Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 747d2305029ab9a47eb01beb9d537b69f5a51a94 Author: Arnd Bergmann Date: Thu Dec 3 23:28:16 2020 +0100 media: ccs: avoid printing an uninitialized variable There is no intialization for the 'reg' variable, so printing it produces undefined behavior as well as a compile-time warning: drivers/media/i2c/ccs/ccs-core.c:314:49: error: variable 'reg' is uninitialized when used here [-Werror,-Wuninitialized] "0x%8.8x %s pixels: %d %s (pixelcode %u)\n", reg, Remove the variable and stop printing it. Fixes: fd9065812c7b ("media: smiapp: Obtain frame descriptor from CCS limits") Signed-off-by: Arnd Bergmann Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit cc17afa2e84f5017bae646a7240b6a43e847a2d7 Author: Arnd Bergmann Date: Fri Dec 4 09:20:14 2020 +0100 media: i2c: fix an uninitialized error code Clang points out that the error handling in ov02a10_s_stream() is broken, and just returns a random error code: drivers/media/i2c/ov02a10.c:537:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] if (ov02a10->streaming == on) ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/i2c/ov02a10.c:568:9: note: uninitialized use occurs here return ret; ^~~ drivers/media/i2c/ov02a10.c:537:2: note: remove the 'if' if its condition is always false if (ov02a10->streaming == on) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If streaming is already on, leave it that way and return success. Suggested-by: Dongchun Zhu Fixes: 91807efbe8ec ("media: i2c: add OV02A10 image sensor driver") Signed-off-by: Arnd Bergmann Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit f0f547272079a8ee2a3929909e1a7ae374b61e38 Author: Sakari Ailus Date: Wed Dec 2 19:09:54 2020 +0100 media: Revert "media: dt-bindings: media: Use OF graph schema" This reverts commit f61eb7bc9256aeb173d2d730f59cdd569d261c52. While aligning with the OF graph schema will be done for the media DT bindings, this patch got merged a little too hastily. Revert it for now. Suggested-by: Rob Herring Signed-off-by: Sakari Ailus Acked-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 2ef33ee7f4f68d77b852bb2c946fc2f8f136a3c1 Author: Rafael J. Wysocki Date: Sat Dec 5 16:29:41 2020 +0100 ACPI: scan: Add PNP0D80 to the _DEP exceptions list The PNP0D80 ("Windows-compatible System Power Management Controller") device ID is used for identifying the special device object providing the LPI (Low-power S0 Idle) _DSM interface [1]. That device object does not supply any operation regions, but it appears in _DEP lists for other devices in the ACPI tables on some systems to enforce specific enumeration ordering that does not matter for Linux. For this reason, _DEP list entries pointing to the device object whose _CID returns PNP0D80 need not be taken into account as real operation region dependencies, so add that device ID to the list of device IDs for which the matching _DEP list entries should be ignored. Accordingly, update the function used for matching device IDs in that list to allow it to check _CID as well as _HID and rename it to acpi_info_matches_ids(). Link: https://www.uefi.org/sites/default/files/resources/Intel_ACPI_Low_Power_S0_Idle.pdf # [1] Signed-off-by: Rafael J. Wysocki commit d5da31f902feb3c53c1e79eb3bf9792a761c8d84 Author: Jonas Karlman Date: Fri Nov 27 05:56:27 2020 +0100 media: rc: add keymap for pine64 remote Add a keymap for the pine64 IR remote [0]. The mouse key has been mapped to KEY_EPG to provide a more useful remote. [0] http://files.pine64.org/doc/Pine%20A64%20Schematic/remote-wit-logo.jpg Signed-off-by: Jonas Karlman Signed-off-by: Christian Hewitt Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit b93b7ef61764819b6060f69e35ea9d6563b9b5d8 Author: Rafael J. Wysocki Date: Tue Nov 24 20:46:38 2020 +0100 PM: ACPI: Refresh wakeup device power configuration every time When wakeup signaling is enabled for a bridge for the second (or every next) time in a row, its existing device wakeup power configuration may not match the new conditions. For example, some devices below it may have been put into low-power states and that changes the device wakeup power conditions or similar. This causes functional problems to appear on some systems (for example, because of it the Thunderbolt port on Dell Precision 5550 cannot detect devices plugged in after it has been suspended). For this reason, modify __acpi_device_wakeup_enable() to refresh the device wakeup power configuration of the target device on every invocation, not just when it is called for that device first time in a row. Signed-off-by: Rafael J. Wysocki Reported-by: Kai-Heng Feng Tested-by: Kai-Heng Feng Reviewed-by: Mika Westerberg commit 7482c5cb90e5a7f9e9e12dd154d405e0219656e3 Author: Rafael J. Wysocki Date: Tue Nov 24 20:44:00 2020 +0100 PM: ACPI: PCI: Drop acpi_pm_set_bridge_wakeup() The idea behind acpi_pm_set_bridge_wakeup() was to allow bridges to be reference counted for wakeup enabling, because they may be enabled to signal wakeup on behalf of their subordinate devices and that may happen for multiple times in a row, whereas for the other devices it only makes sense to enable wakeup signaling once. However, this becomes problematic if the bridge itself is suspended, because it is treated as a "regular" device in that case and the reference counting doesn't work. For instance, suppose that there are two devices below a bridge and they both can signal wakeup. Every time one of them is suspended, wakeup signaling is enabled for the bridge, so when they both have been suspended, the bridge's wakeup reference counter value is 2. Say that the bridge is suspended subsequently and acpi_pci_wakeup() is called for it. Because the bridge can signal wakeup, that function will invoke acpi_pm_set_device_wakeup() to configure it and __acpi_pm_set_device_wakeup() will be called with the last argument equal to 1. This causes __acpi_device_wakeup_enable() invoked by it to omit the reference counting, because the reference counter of the target device (the bridge) is 2 at that time. Now say that the bridge resumes and one of the device below it resumes too, so the bridge's reference counter becomes 0 and wakeup signaling is disabled for it, but there is still the other suspended device which may need the bridge to signal wakeup on its behalf and that is not going to work. To address this scenario, use wakeup enable reference counting for all devices, not just for bridges, so drop the last argument from __acpi_device_wakeup_enable() and __acpi_pm_set_device_wakeup(), which causes acpi_pm_set_device_wakeup() and acpi_pm_set_bridge_wakeup() to become identical, so drop the latter and use the former instead of it everywhere. Fixes: 1ba51a7c1496 ("ACPI / PCI / PM: Rework acpi_pci_propagate_wakeup()") Signed-off-by: Rafael J. Wysocki Reviewed-by: Mika Westerberg Acked-by: Bjorn Helgaas Cc: 4.14+ # 4.14+ commit 250ad7a45b1e58d580decfb935fc063c4cf56f91 Author: Jordan Niethe Date: Mon Dec 7 12:05:19 2020 +1100 powerpc/powernv/idle: Restore CIABR after idle for Power9 On Power9, CIABR is lost after idle. This means that instruction breakpoints set by xmon which use CIABR do not work. Fix this by restoring CIABR after idle. Signed-off-by: Jordan Niethe Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201207010519.15597-2-jniethe5@gmail.com commit 4bb3219837a3dcf58bce96c27db6e0cd48f3d9b2 Author: Jordan Niethe Date: Mon Dec 7 12:05:18 2020 +1100 powerpc/book3s64/kexec: Clear CIABR on kexec The value in CIABR persists across kexec which can lead to unintended results when the new kernel hits the old kernel's breakpoint. For example: 0:mon> bi $loadavg_proc_show 0:mon> b type address 1 inst c000000000519060 loadavg_proc_show+0x0/0x130 0:mon> x $ kexec -l /mnt/vmlinux --initrd=/mnt/rootfs.cpio.gz --append='xmon=off' $ kexec -e $ cat /proc/loadavg Trace/breakpoint trap Make sure CIABR is cleared so this does not happen. Signed-off-by: Jordan Niethe Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201207010519.15597-1-jniethe5@gmail.com commit 2d26c716fc49f41a63e1efe8f1f772b0adeaacef Author: Johan Hovold Date: Mon Dec 7 10:13:08 2020 +0100 module: drop semicolon from version macro Drop the trailing semicolon from the MODULE_VERSION() macro definition which was left when removing the array-of-pointer indirection. Signed-off-by: Johan Hovold Signed-off-by: Jessica Yu commit 72ebb5ff806f9a421a2a53cdfe6c4ebbab243bd5 Author: Qiujun Huang Date: Thu Dec 3 22:50:20 2020 +0800 x86/alternative: Update text_poke_bp() kernel-doc comment Update kernel-doc parameter name after c3d6324f841b ("x86/alternatives: Teach text_poke_bp() to emulate instructions") changed the last parameter from @handler to @emulate. [ bp: Make commit message more precise. ] Signed-off-by: Qiujun Huang Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201203145020.2441-1-hqjagain@gmail.com commit ffad560394de3338f3c1c9680add65a84d87a7c4 Author: Patrick O'Grady Date: Mon Dec 7 17:55:29 2020 +0800 mtd: phram: Allow the user to set the erase page size. Permit the user to specify the erase page size as a parameter. This solves two problems: - phram can access images made by mkfs.jffs2. mkfs.jffs2 won't create images with erase sizes less than 8KiB; many architectures define PAGE_SIZE as 4KiB. - Allows more effective use of small capacity devices. JFFS2 needs somewhere between 2 and 5 empty pages for garbage collection; and for an NVRAM part with only 32KiB of space, a smaller erase page allows much better utilization in applications where garbage collection is important. Signed-off-by: Patrick O'Grady Reviewed-by: Joern Engel Link: https://lore.kernel.org/lkml/CAJ7m5OqYv_=JB9NhHsqBsa8YU0DFRoP7C+W10PY22wonAGJK=A@mail.gmail.com/ [Guohua Zhong: fix token array index out of bounds and update patch for kernel master branch] Signed-off-by: Guohua Zhong Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201207095529.20896-1-zhongguohua1@huawei.com commit 1ca71415f075353974524e96ed175306d8a937a8 Author: Richard Weinberger Date: Sun Dec 6 21:22:20 2020 +0100 mtd: core: Fix refcounting for unpartitioned MTDs Apply changes to usecount also to the master partition. Otherwise we have no refcounting at all if an MTD has no partitions. Cc: stable@vger.kernel.org Fixes: 46b5889cc2c5 ("mtd: implement proper partition handling") Signed-off-by: Richard Weinberger Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201206202220.27290-1-richard@nod.at commit 5c641fee4ccfd27520b7863bf4a66491faea6d2a Author: Stefan Eschenbacher Date: Sun Dec 6 11:48:50 2020 +0100 drivers/hv: remove obsolete TODO and fix misleading typo in comment Removes an obsolete TODO in the VMBus module and fixes a misleading typo in the comment for the macro MAX_NUM_CHANNELS, where two digits have been twisted. Signed-off-by: Stefan Eschenbacher Co-developed-by: Max Stolze Signed-off-by: Max Stolze Link: https://lore.kernel.org/r/20201206104850.24843-1-stefan.eschenbacher@fau.de Signed-off-by: Wei Liu commit 0385979a30dc4abdef2dcebbccef818947c80cb7 Author: Michael Ellerman Date: Mon Dec 7 15:02:53 2020 +1100 EDAC/mv64x60: Remove orphan mv64x60 driver The mv64x60 EDAC driver depends on CONFIG_MV64X60. But that symbol is not user-selectable, and the last code that selected it was removed with the C2K board support in 2018, see: 92c8c16f3457 ("powerpc/embedded6xx: Remove C2K board support") That means the driver is now dead code, so remove it. Suggested-by: Borislav Petkov Signed-off-by: Michael Ellerman Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201207040253.628528-1-mpe@ellerman.id.au commit 18b9c9403758ff68d93ee2f593096778d58e6f76 Author: Serge Semin Date: Wed Nov 25 10:26:40 2020 +0300 mtd: physmap: physmap-bt1-rom: Fix __iomem addrspace removal warning sparse is unhappy with us casting the __iomem address space pointer to a type with no address space attribute specified: "sparse warnings: (new ones prefixed by >>)" >> drivers/mtd/maps/physmap-bt1-rom.c:78:18: sparse: sparse: cast removes address space '__iomem' of expression Indeed we perform the __iomem-less type casting but to an integer variable. The integer variable isn't dereferenced then, so the casting is safe and won't cause any problem. But in order to make sparse happy and keep the code coherent let's fix the warning by converting the local "shift" and "chunk" variables to the "unsigned int" type (since their value won't ever exceed three) and cast the __iomem-pointers to uintptr_t. Add the same fix to the bt1_rom_map_read() method for unification. Fixes: b3e79e7682e0 ("mtd: physmap: Add Baikal-T1 physically mapped ROM support") Link: https://lore.kernel.org/lkml/202011021254.XC70BaQT-lkp@intel.com/ Signed-off-by: Serge Semin Reported-by: kernel test robot Cc: Alexey Malahov Cc: Pavel Parkhomenko Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201125072640.23516-1-Sergey.Semin@baikalelectronics.ru commit 639a82434f16a6df0ce0e7c8595976f1293940fd Author: Sven Eckelmann Date: Tue Nov 24 07:25:06 2020 +0100 mtd: parser: cmdline: Fix parsing of part-names with colons Some devices (especially QCA ones) are already using hardcoded partition names with colons in it. The OpenMesh A62 for example provides following mtd relevant information via cmdline: root=31:11 mtdparts=spi0.0:256k(0:SBL1),128k(0:MIBIB),384k(0:QSEE),64k(0:CDT),64k(0:DDRPARAMS),64k(0:APPSBLENV),512k(0:APPSBL),64k(0:ART),64k(custom),64k(0:KEYS),0x002b0000(kernel),0x00c80000(rootfs),15552k(inactive) rootfsname=rootfs rootwait The change to split only on the last colon between mtd-id and partitions will cause newpart to see following string for the first partition: KEYS),0x002b0000(kernel),0x00c80000(rootfs),15552k(inactive) Such a partition list cannot be parsed and thus the device fails to boot. Avoid this behavior by making sure that the start of the first part-name ("(") will also be the last byte the mtd-id split algorithm is using for its colon search. Fixes: eb13fa022741 ("mtd: parser: cmdline: Support MTD names containing one or more colons") Cc: stable@vger.kernel.org Cc: Ron Minnich Signed-off-by: Sven Eckelmann Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201124062506.185392-1-sven@narfation.org commit edfc2d73ca45da19fb76f9b76ecc6e885d74d093 Author: Troy Lee Date: Mon Dec 7 17:00:13 2020 +0800 EDAC/aspeed: Add support for AST2400 and AST2600 Add AST2400 and AST2600 EDAC driver support. Signed-off-by: Troy Lee Signed-off-by: Borislav Petkov Reviewed-by: Stefan Schaeckeler Link: https://lkml.kernel.org/r/20201207090013.14145-3-troy_lee@aspeedtech.com commit aac82707fa4593b99053fa9ebb2e73d8103130ed Author: Troy Lee Date: Mon Dec 7 17:00:12 2020 +0800 ARM: dts: aspeed: Add AST2600 EDAC into common devicetree Add Aspeed AST2600 EDAC node into the common devicetree. Signed-off-by: Troy Lee Signed-off-by: Borislav Petkov Reviewed-by: Joel Stanley Link: https://lkml.kernel.org/r/20201207090013.14145-2-troy_lee@aspeedtech.com commit e36a17f846bc9ebc540a6c53f38421a1b2dadfdb Author: Troy Lee Date: Mon Dec 7 17:00:11 2020 +0800 dt-bindings: edac: aspeed-sdram-edac: Add ast2400/ast2600 support Add Aspeed AST2400 and AST2600 binding for the Aspeed EDAC driver. Signed-off-by: Troy Lee Signed-off-by: Borislav Petkov Acked-by: Joel Stanley Link: https://lkml.kernel.org/r/20201207090013.14145-1-troy_lee@aspeedtech.com commit 093b32a849b336b5b48bdde1041fc06f91ae475c Author: Yong Wu Date: Mon Dec 7 17:35:53 2020 +0800 iommu: Improve the performance for direct_mapping Currently direct_mapping always use the smallest pgsize which is SZ_4K normally to mapping. This is unnecessary. we could gather the size, and call iommu_map then, iommu_map could decide how to map better with the just right pgsize. >From the original comment, we should take care overlap, otherwise, iommu_map may return -EEXIST. In this overlap case, we should map the previous region before overlap firstly. then map the left part. Each a iommu device will call this direct_mapping when its iommu initialize, This patch is effective to improve the boot/initialization time especially while it only needs level 1 mapping. Signed-off-by: Anan Sun Signed-off-by: Yong Wu Link: https://lore.kernel.org/r/20201207093553.8635-1-yong.wu@mediatek.com Signed-off-by: Will Deacon commit 2ae92e8b9b7eb042ccb7e9fc7ea9431f211a1bd3 Author: Finn Thain Date: Sat Dec 5 14:46:27 2020 +1100 MAINTAINERS: Update m68k Mac entry Two files under drivers/macintosh are actually m68k-only. I think that patches for these files should be reviewed in the appropriate forum and merged via the appropriate tree, rather than falling to the powerpc maintainers to deal with. Update the "M68K ON APPLE MACINTOSH" section accordingly. Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Joshua Thompson Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-m68k@lists.linux-m68k.org Signed-off-by: Finn Thain Acked-by: Michael Ellerman Link: https://lore.kernel.org/r/fbac2cd8632bb719f48cd1368910abd310548a0e.1607139987.git.fthain@telegraphics.com.au Signed-off-by: Geert Uytterhoeven commit 10199e90ee20e68859f8128331ec8d85b036d349 Author: Finn Thain Date: Fri Nov 20 15:39:56 2020 +1100 macintosh/adb-iop: Send correct poll command The behaviour of the IOP firmware is not well documented but we do know that IOP message reply data can be used to issue new ADB commands. Use the message reply to better control autopoll behaviour by sending a Talk Register 0 command after every ADB response, not unlike the algorithm in the via-macii driver. This poll command is addressed to that device which last received a Talk command (explicit or otherwise). Cc: Joshua Thompson Fixes: 32226e817043 ("macintosh/adb-iop: Implement idle -> sending state transition") Tested-by: Stan Johnson Signed-off-by: Finn Thain Link: https://lore.kernel.org/r/58bba4310da4c29b068345a4b36af8a531397ff7.1605847196.git.fthain@telegraphics.com.au Signed-off-by: Geert Uytterhoeven commit 2c9cfbadfa234b03473f1ef54e6f4772cc07a371 Author: Finn Thain Date: Fri Nov 20 15:39:56 2020 +1100 macintosh/adb-iop: Always wait for reply message from IOP A recent patch incorrectly altered the adb-iop state machine behaviour and introduced a regression that can appear intermittently as a malfunctioning ADB input device. This seems to be caused when reply packets from different ADB commands become mixed up, especially during the adb bus scan. Fix this by unconditionally entering the awaiting_reply state after sending an explicit command, even when the ADB command won't generate a reply from the ADB device. It turns out that the IOP always generates reply messages, even when the ADB command does not produce a reply packet (e.g. ADB Listen command). So it's not really the ADB reply packets that are being mixed up, it's the IOP messages that enclose them. The bug goes like this: 1. CPU sends a message to the IOP, expecting no response because this message contains an ADB Listen command. The ADB command is now considered complete. 2. CPU sends a second message to the IOP, this time expecting a response because this message contains an ADB Talk command. This ADB command needs a reply before it can be completed. 3. adb-iop driver receives an IOP message and assumes that it relates to the Talk command. It's actually an empty one (with flags == ADB_IOP_EXPLICIT|ADB_IOP_TIMEOUT) for the previous command. The Talk command is now considered complete but it gets the wrong reply data. 4. adb-iop driver gets another IOP response message, which contains the actual reply data for the Talk command, but this is dropped (the driver is no longer in awaiting_reply state). Cc: Joshua Thompson Fixes: e2954e5f727f ("macintosh/adb-iop: Implement sending -> idle state transition") Tested-by: Stan Johnson Signed-off-by: Finn Thain Link: https://lore.kernel.org/r/0f0a25855391e7eaa53a50f651aea0124e8525dd.1605847196.git.fthain@telegraphics.com.au Signed-off-by: Geert Uytterhoeven commit 76437b340b242fd21952f54ba8965d21a1ffa8c8 Author: Johan Hovold Date: Mon Dec 7 10:16:01 2020 +0100 earlycon: drop semicolon from earlycon macro Drop the trailing semicolon from the OF_EARLYCON_DECLARE() macro definition which was left when removing the array-of-pointer indirection. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20201207091601.5202-1-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit ee64ed8153abf6668d662ba451ecf539cad63017 Author: Tomas Winkler Date: Mon Nov 16 14:56:12 2020 +0200 mei: bus: enable pavp device. Enable protected audio video path client on mei client bus. Cc: Sean Z Huang Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20201116125612.1660971-2-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit 85261c1ff156eb60fc26c378748387f2e85c6878 Author: Alexander Usyskin Date: Mon Nov 16 14:56:11 2020 +0200 mei: bus: add vtag support Add API to support vtag in communication on mei bus. Add mei_cldev_send_vtag, mei_cldev_recv_vtag and mei_cldev_recv_nonblock_vtag functions to allow sending a message with vtag set and to receive vtag of an incoming message. Cc: Sean Z Huang Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20201116125612.1660971-1-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit 6e559fe128927cc414406b63eb92ea16e673f43d Merge: a3ab07c642b2d 17e0da0b8979a Author: Greg Kroah-Hartman Date: Mon Dec 7 10:24:45 2020 +0100 Merge tag 'soundwire-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire into char-misc-next Vinod writes: soundwire updates for 5.11-rc1 Updates for last PR for this year contain: - Improvements from Intel for port interrupt handling - SDCA cascade interrupt support - runtime pm for master device * tag 'soundwire-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: soundwire: intel: fix another unused-function warning soundwire: master: use pm_runtime_set_active() on add soundwire: qcom: Fix build failure when slimbus is module soundwire: bus: only clear valid DPN interrupts soundwire: bus: only clear valid DP0 interrupts soundwire: registers: add definitions for clearable interrupt fields soundwire: bus: reset slave_notify status at each loop soundwire: bus: add comments to explain interrupt loop filter soundwire: SDCA: detect sdca_cascade interrupt soundwire: Fix DEBUG_LOCKS_WARN_ON for uninitialized attribute commit 93837812a5dcde17224ad20cf2ad7be1e94482bb Merge: e3541d5de544d 0477e92881850 Author: Greg Kroah-Hartman Date: Mon Dec 7 10:20:51 2020 +0100 Merge 5.10-rc7 into usb-next We want the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit ba3b8bb1263dfb87914ef0ccf5f3a78604b3686b Merge: e0efb3168d34d 0477e92881850 Author: Greg Kroah-Hartman Date: Mon Dec 7 10:19:31 2020 +0100 Merge 5.10-rc7 into tty-next We want the tty fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit a3ab07c642b2d75e645b1a07464291e325a496e0 Merge: 888982a847520 0477e92881850 Author: Greg Kroah-Hartman Date: Mon Dec 7 10:08:14 2020 +0100 Merge 5.10-rc7 into char-misc-next We want the fixes in here, and this resolves a merge issue with drivers/misc/habanalabs/common/memory.c. Signed-off-by: Greg Kroah-Hartman commit 5cfca59604e423f720297e30a9dc493eea623493 Author: Chris Chiu Date: Mon Dec 7 15:27:55 2020 +0800 ALSA: hda/realtek - Enable headset mic of ASUS X430UN with ALC256 The ASUS laptop X430UN with ALC256 can't detect the headset microphone until ALC256_FIXUP_ASUS_MIC_NO_PRESENCE quirk applied. Signed-off-by: Chris Chiu Signed-off-by: Jian-Hong Pan Cc: Link: https://lore.kernel.org/r/20201207072755.16210-1-chiu@endlessos.org Signed-off-by: Takashi Iwai commit f45f89a778e8a61d9c79405e8c716058b6ba12f2 Author: Jon Hunter Date: Wed Dec 2 09:14:19 2020 +0000 cpufreq: tegra194: Rename tegra194_get_speed_common function The function tegra194_get_speed_common() uses hardware timers to calculate the current CPUFREQ and so rename this function to be tegra194_calculate_speed() to reflect what it does. Signed-off-by: Jon Hunter Signed-off-by: Viresh Kumar commit 93549516d44681261d2d209186449c6125beccc1 Author: Jon Hunter Date: Wed Dec 2 09:14:18 2020 +0000 cpufreq: tegra194: Remove unnecessary frequency calculation The Tegra194 CPUFREQ driver sets the CPUFREQ_NEED_INITIAL_FREQ_CHECK flag which means that the CPUFREQ framework will call the 'get' callback on boot to determine the current frequency of the CPUs. Therefore, it is not necessary for the Tegra194 CPUFREQ driver to internally call the tegra194_get_speed_common() during initialisation to query the current frequency as well. Fix this by removing the call to the tegra194_get_speed_common() during initialisation and simplify the code. Signed-off-by: Jon Hunter Signed-off-by: Viresh Kumar commit cfef4bcaccf35f0b80acc5c79967996b2eb88ba6 Author: Jon Hunter Date: Wed Dec 2 09:14:17 2020 +0000 cpufreq: tegra186: Simplify cluster information lookup The CPUFREQ driver framework references each individual CPUs when getting and setting the speed. Tegra186 has 3 clusters of A57 CPUs and 1 cluster of Denver CPUs. Hence, the Tegra186 CPUFREQ driver need to know which cluster a given CPU belongs to. The logic in the Tegra186 driver can be greatly simplified by storing the cluster ID associated with each CPU in the tegra186_cpufreq_cpu structure. This allow us to completely remove the Tegra cluster info structure from the driver and simplifiy the code. Signed-off-by: Jon Hunter Signed-off-by: Viresh Kumar commit b7b4e785520ff87383ab5131f903544a261e83a1 Author: Jon Hunter Date: Wed Dec 2 09:14:16 2020 +0000 cpufreq: tegra186: Fix sparse 'incorrect type in assignment' warning Sparse warns that the incorrect type is being assigned to the CPUFREQ driver_data variable in the Tegra186 CPUFREQ driver. The Tegra186 CPUFREQ driver is assigned a type of 'void __iomem *' to a pointer of type 'void *' ... drivers/cpufreq/tegra186-cpufreq.c:72:37: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *driver_data @@ got void [noderef] __iomem * @@ ... drivers/cpufreq/tegra186-cpufreq.c:87:40: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void [noderef] __iomem *edvd_reg @@ got void *driver_data @@ The Tegra186 CPUFREQ driver is using the policy->driver_data variable to store and iomem pointer to a Tegra186 CPU register that is used to set the clock speed for the CPU. This is not necessary because the register base address is already stored in the driver data and the offset of the register for each CPU is static. Therefore, fix this by adding a new structure with the register offsets for each CPU and store this in the main driver data structure along with the register base address. Please note that a new structure has been added for storing the register offsets rather than a simple array, because this will permit further clean-ups and simplification of the driver. Signed-off-by: Jon Hunter Signed-off-by: Viresh Kumar commit fc928b901dc68481ba3e524860a641fe13e25dfe Author: Arnd Bergmann Date: Thu Dec 3 23:53:32 2020 +0100 cpufreq: imx: fix NVMEM_IMX_OCOTP dependency A driver should not 'select' drivers from another subsystem. If NVMEM is disabled, this one results in a warning: WARNING: unmet direct dependencies detected for NVMEM_IMX_OCOTP Depends on [n]: NVMEM [=n] && (ARCH_MXC [=y] || COMPILE_TEST [=y]) && HAS_IOMEM [=y] Selected by [y]: - ARM_IMX6Q_CPUFREQ [=y] && CPU_FREQ [=y] && (ARM || ARM64 [=y]) && ARCH_MXC [=y] && REGULATOR_ANATOP [=y] Change the 'select' to 'depends on' to prevent it from going wrong, and allow compile-testing without that driver, since it is only a runtime dependency. Fixes: 2782ef34ed23 ("cpufreq: imx: Select NVMEM_IMX_OCOTP") Signed-off-by: Arnd Bergmann Signed-off-by: Viresh Kumar commit d15183991c2d53d7cecf27a1555c91b702cef1ea Author: Pali Rohár Date: Tue Nov 3 16:11:39 2020 +0100 cpufreq: vexpress-spc: Add missing MODULE_ALIAS This patch adds missing MODULE_ALIAS for automatic loading of this cpufreq driver when it is compiled as an external module. Signed-off-by: Pali Rohár Fixes: 47ac9aa165540 ("cpufreq: arm_big_little: add vexpress SPC interface driver") Signed-off-by: Viresh Kumar commit c0382d049d2def37b81e907a8b22661a4a4a6eb5 Author: Pali Rohár Date: Tue Nov 3 16:11:38 2020 +0100 cpufreq: scpi: Add missing MODULE_ALIAS This patch adds missing MODULE_ALIAS for automatic loading of this cpufreq driver when it is compiled as an external module. Signed-off-by: Pali Rohár Fixes: 8def31034d033 ("cpufreq: arm_big_little: add SCPI interface driver") Signed-off-by: Viresh Kumar commit b9acab091842ca8b288882798bb809f7abf5408a Author: Pali Rohár Date: Tue Nov 3 16:11:37 2020 +0100 cpufreq: loongson1: Add missing MODULE_ALIAS This patch adds missing MODULE_ALIAS for automatic loading of this cpufreq driver when it is compiled as an external module. Signed-off-by: Pali Rohár Fixes: a0a22cf14472f ("cpufreq: Loongson1: Add cpufreq driver for Loongson1B") Signed-off-by: Viresh Kumar commit af2096f285077e3339eb835ad06c50bdd59f01b5 Author: Pali Rohár Date: Tue Nov 3 16:11:36 2020 +0100 cpufreq: sun50i: Add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this cpufreq driver when it is compiled as an external module. Signed-off-by: Pali Rohár Fixes: f328584f7bff8 ("cpufreq: Add sun50i nvmem based CPU scaling driver") Reviewed-by: Yangtao Li Signed-off-by: Viresh Kumar commit 183747ab52654eb406fc6b5bfb40806b75d31811 Author: Pali Rohár Date: Tue Nov 3 16:11:35 2020 +0100 cpufreq: st: Add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this cpufreq driver when it is compiled as an external module. Signed-off-by: Pali Rohár Fixes: ab0ea257fc58d ("cpufreq: st: Provide runtime initialised driver for ST's platforms") Signed-off-by: Viresh Kumar commit a5a6031663bc1dd0a10babd49d1bcb3153a8327f Author: Pali Rohár Date: Tue Nov 3 16:11:34 2020 +0100 cpufreq: qcom: Add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this cpufreq driver when it is compiled as an external module. Signed-off-by: Pali Rohár Fixes: 46e2856b8e188 ("cpufreq: Add Kryo CPU scaling driver") Signed-off-by: Viresh Kumar commit af6eca06501118af3e2ad46eee8edab20624b74e Author: Pali Rohár Date: Tue Nov 3 16:11:33 2020 +0100 cpufreq: mediatek: Add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this cpufreq driver when it is compiled as an external module. Signed-off-by: Pali Rohár Fixes: 501c574f4e3a5 ("cpufreq: mediatek: Add support of cpufreq to MT2701/MT7623 SoC") Signed-off-by: Viresh Kumar commit 9433777a6e0aae27468d3434b75cd51bb88ff711 Author: Pali Rohár Date: Tue Nov 3 16:11:32 2020 +0100 cpufreq: highbank: Add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this cpufreq driver when it is compiled as an external module. Signed-off-by: Pali Rohár Fixes: 6754f556103be ("cpufreq / highbank: add support for highbank cpufreq") Signed-off-by: Viresh Kumar commit 925a5bcefe105f2790ecbdc252eb2315573f309d Author: Pali Rohár Date: Tue Nov 3 16:11:31 2020 +0100 cpufreq: ap806: Add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this cpufreq driver when it is compiled as an external module. Signed-off-by: Pali Rohár Fixes: f525a670533d9 ("cpufreq: ap806: add cpufreq driver for Armada 8K") Signed-off-by: Viresh Kumar commit 2f05c19d9ef4f5a42634f83bdb0db596ffc0dd30 Author: Qinglang Miao Date: Sat Oct 31 09:18:54 2020 +0800 cpufreq: mediatek: add missing platform_driver_unregister() on error in mtk_cpufreq_driver_init Add the missing platform_driver_unregister() before return from mtk_cpufreq_driver_init in the error handling case when failed to register mtk-cpufreq platform device Signed-off-by: Qinglang Miao Signed-off-by: Viresh Kumar commit 68b9cd7270f0191bd51b635f8f4778951ee3811a Author: Sumit Gupta Date: Wed Oct 14 15:06:11 2020 +0530 cpufreq: tegra194: get consistent cpuinfo_cur_freq Frequency returned by 'cpuinfo_cur_freq' using counters is not fixed and keeps changing slightly. This change returns a consistent value from freq_table. If the reconstructed frequency has acceptable delta from the last written value, then return the frequency corresponding to the last written ndiv value from freq_table. Otherwise, print a warning and return the reconstructed freq. Signed-off-by: Sumit Gupta Signed-off-by: Viresh Kumar commit 75118c8ef9d16ecbb56e37547061515c75bb91b4 Author: Fabien Parent Date: Tue Oct 13 11:27:09 2020 +0200 cpufreq: blacklist mt8516 in cpufreq-dt-platdev Add MT8516 to cpufreq-dt-platdev blacklist since the actual scaling is handled by the 'mediatek-cpufreq' driver. Signed-off-by: Fabien Parent Signed-off-by: Viresh Kumar commit de4ca30958676f922cd7610d96342b054c05c86b Author: Fabien Parent Date: Tue Oct 13 11:27:08 2020 +0200 cpufreq: mediatek: Add support for mt8167 Add compatible string for mediatek mt8167 Signed-off-by: Fabien Parent Signed-off-by: Viresh Kumar commit 3a5e6732a74c44d7c78a764b9a7701135565df8f Author: Yangtao Li Date: Mon Oct 12 22:01:41 2020 +0800 cpufreq: sti-cpufreq: fix mem leak in sti_cpufreq_set_opp_info() Use dev_pm_opp_put_prop_name() to avoid mem leak, which free opp_table. Signed-off-by: Yangtao Li Signed-off-by: Yangtao Li Signed-off-by: Viresh Kumar commit f7414cd6923fd7f78e57086fc964ba2dc25db5c1 Author: Biwen Li Date: Wed Nov 11 19:32:55 2020 +0800 i2c: imx: support slave mode for imx I2C driver The patch supports slave mode for imx I2C driver Signed-off-by: Biwen Li Acked-by: Oleksij Rempel Signed-off-by: Wolfram Sang commit 1e04538c751bfc572bfa9995996c7f4af098a625 Merge: 5e9a97b1f4491 0477e92881850 Author: Wolfram Sang Date: Mon Dec 7 07:57:42 2020 +0100 Merge branch 'i2c/for-current' into i2c/for-5.11 commit 18b648322d44e8d8950de8aa31dba9bad0a33b89 Author: Vinod Koul Date: Sat Dec 5 14:41:46 2020 +0530 phy: mediatek: statify mtk_hdmi_phy_driver mtk_hdmi_phy_driver is not declared as static, so statify it. drivers/phy/mediatek/phy-mtk-hdmi.c:204:24: warning: symbol 'mtk_hdmi_phy_driver' was not declared. Should it be static? Acked-by: Chun-Kuang Hu Link: https://lore.kernel.org/r/20201205091146.3184305-1-vkoul@kernel.org Signed-off-by: Vinod Koul commit af3f4a85d90218bb59315d591bd2bffa5e646466 Merge: 4054eebf0fb07 acde33bf73198 Author: David S. Miller Date: Sun Dec 6 19:22:15 2020 -0800 Merge branch 'mlxsw-Misc-updates' Ido Schimmel says: ==================== mlxsw: Misc updates This patchset contains miscellaneous patches we gathered in our queue. Some of them are dependencies of larger patchsets that I will submit later this cycle. Patches #1-#3 perform small non-functional changes in mlxsw. Patch #4 adds more extended ack messages in mlxsw. Patch #5 adds devlink parameters documentation for mlxsw. To be extended with more parameters this cycle. Patches #6-#7 perform small changes in forwarding selftests infrastructure. ==================== Signed-off-by: David S. Miller commit acde33bf731989e45c65e4e974ac1214702850b7 Author: Jiri Pirko Date: Sun Dec 6 10:22:27 2020 +0200 mlxsw: spectrum_router: Reduce mlxsw_sp_ipip_fib_entry_op_gre4() Turned out that mlxsw_sp_ipip_fib_entry_op_gre4() does not need to figure out the IP address and virtual router id. Those are exactly the same as in the fib_entry it is called for. So just use that and reduce mlxsw_sp_ipip_fib_entry_op_gre4() function to only call mlxsw_sp_ipip_fib_entry_op_gre4_rtdp() make the ipip decap op code similar to nve. Signed-off-by: Jiri Pirko Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit f54d3c81b763271f1533792fddd730720b0d225f Author: Petr Machata Date: Sun Dec 6 10:22:26 2020 +0200 mlxsw: spectrum: Bump minimum FW version to xx.2008.2018 The indicated version fixes an issue whereby the MOMTE register would by default enable mirroring of ECN-marked traffic from all traffic classes, once the ECN mirroring was configured. This fix is necessary for offload of RED "ecn_mark" qevent. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 9add5f1954e979cd325ff39298d2def4372578b2 Author: Ido Schimmel Date: Sun Dec 6 10:22:25 2020 +0200 mlxsw: core_acl: Use an array instead of a struct with a zero-length array Suppresses the following coccinelle warning: drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_keys.c:139:3-7: WARNING use flexible-array member instead Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 42c435a2aca223c5734380f38c8ba2688b3dee37 Author: Ido Schimmel Date: Sun Dec 6 10:22:24 2020 +0200 mlxsw: spectrum_mr: Use flexible-array member instead of zero-length array Suppresses the following coccinelle warning: drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c:18:15-19: WARNING use flexible-array member instead Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 4834ad807917963f3dc045315a08a37a7da8c196 Author: Ido Schimmel Date: Sun Dec 6 10:22:23 2020 +0200 mlxsw: core: Trace EMAD events Currently, mlxsw triggers the 'devlink:devlink_hwmsg' tracepoint whenever a request is sent to the device and whenever a response is received from it. However, the tracepoint is not triggered when an event (e.g., port up / down) is received from the device. Also trace EMAD events in order to log a more complete picture of all the exchanged hardware messages. Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 23fb55526d80122710c28cb6be0e5dba65a6a3f1 Author: Ido Schimmel Date: Sun Dec 6 10:22:22 2020 +0200 selftests: mlxsw: Test RIF's reference count when joining a LAG Test that the reference count of a router interface (RIF) configured for a LAG is incremented / decremented when ports join / leave the LAG. Use the offload indication on routes configured on the RIF to understand if it was created / destroyed. The test fails without the previous patch. Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 31e1de4f1242f338eaa62cc53d582116c83b9dd0 Author: Ido Schimmel Date: Sun Dec 6 10:22:21 2020 +0200 mlxsw: spectrum: Apply RIF configuration when joining a LAG In case a router interface (RIF) is configured for a LAG, make sure its configuration is applied on the new LAG member. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 6a575e84f11e15078629f0d16bff2bc354a6bfc0 Author: Dmitry Osipenko Date: Thu Dec 3 22:24:39 2020 +0300 PM / devfreq: tegra30: Separate configurations per-SoC generation Previously we were using count-weight of the T124 for T30 in order to get EMC clock rate that was reasonable for T30. In fact the count-weight should be x2 times smaller on T30, but then devfreq was producing a bit too low EMC clock rate for ISO memory clients, like display controller for example. Now both Tegra ACTMON and Tegra DRM display drivers support interconnect framework and display driver tells to ICC what a minimum memory bandwidth is needed, preventing FIFO underflows. Thus, now we can use a proper count-weight value for Tegra30 and MC_ALL device config needs a bit more aggressive boosting. Add a separate ACTMON driver configuration that is specific to Tegra30. Tested-by: Peter Geis Tested-by: Nicolas Chauvet Acked-by: Chanwoo Choi Signed-off-by: Dmitry Osipenko Signed-off-by: Chanwoo Choi commit 16e8b2a7cb886bcc3dd89ad28948d374a2319bbc Author: Dmitry Osipenko Date: Thu Dec 3 22:24:38 2020 +0300 PM / devfreq: tegra30: Support interconnect and OPPs from device-tree This patch moves ACTMON driver away from generating OPP table by itself, transitioning it to use the table which comes from device-tree. This change breaks compatibility with older device-trees and brings support for the interconnect framework to the driver. This is a mandatory change which needs to be done in order to implement interconnect-based memory DVFS, i.e. device-trees need to be updated. Now ACTMON issues a memory bandwidth requests using dev_pm_opp_set_bw() instead of driving EMC clock rate directly. Tested-by: Peter Geis Tested-by: Nicolas Chauvet Acked-by: Chanwoo Choi Signed-off-by: Dmitry Osipenko Signed-off-by: Chanwoo Choi commit afd589c703119429f7a4e81a6539aec4e0b1386b Merge: 98fd9972ed60d 245157a31e91a Author: Chanwoo Choi Date: Mon Dec 7 10:25:03 2020 +0900 Merge tag 'tegra-soc-clk-drivers-5.11' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into devfreq-next Tegra SoC and clock controller changes for v5.11 Export symbols and add stubs necessary for upcoming modified Tegra memory controller drivers (touching also devfreq and interconnect). commit 8b22820efb35f93d98638563b0a8f4094e8ee399 Author: Arnd Bergmann Date: Fri Oct 30 15:26:24 2020 +0100 m68k: m68328: remove duplicate code Building a kernel with multiple dragonball based boards enabled needlessly causes a link failure because of duplicate config_BSP() functions between the CPU versions. Avoid that merging the three almost identical files into one, and hiding the CPU configuration behind the board config. The pr_info() lines are consolidated in one place. It is still not possible to run a kernel configured for more than one board, but at least configurations that can be selected can also be built now. Signed-off-by: Arnd Bergmann Signed-off-by: Greg Ungerer commit a734bbf694270dca8594a5c33375867dc31503f5 Author: Arnd Bergmann Date: Fri Oct 30 15:26:23 2020 +0100 m68k: m68328: move platform code to separate files The dragen2 and ucsimm/ucdimm files require a bit of custom code compared to the other dragonball platforms, move them into separate files as a preparation for a build fix. Signed-off-by: Arnd Bergmann Signed-off-by: Greg Ungerer commit 670d39657ca355615428d176e9de4e69bfb3cf9b Author: Greg Ungerer Date: Mon Oct 12 13:58:41 2020 +1000 m68knommu: align BSS section to 4-byte boundaries The kernel start up code for all of the nommu m68k types expects the BSS section to be on a 4-byte boundary, and to be a whole number of 32bit words. The BSS initialization loop sets 32bit sized quantities and has no provision for odd or unaligned accesses. The alignment and size of the BSS has historically worked out to be 4-byte aligned and sized - although no explicit alignment or size was specified in the linker script. So the BSS zeroing code worked as expected. A problem was first observed after commit 7273ad2b08f8 ("kbuild: link lib-y objects to vmlinux forcibly when CONFIG_MODULES=y"). Some kernel builds, depending on exact configuration, then tended to generate even sized BSS sections - which is valid on m68k - but our BSS init code could not handle properly. The simplest and smallest solution is to align and size the BSS appropriately. Signed-off-by: Greg Ungerer commit 75b6f6487cedd0e4c8e07d68b68b8f85cd352bfe Author: Dave Jiang Date: Mon Nov 23 08:36:12 2020 -0700 ntb: intel: add Intel NTB LTR vendor support for gen4 NTB Intel NTB device has custom LTR management that is not compliant with the PCIe standard. Add support to set LTR status triggered by link status change. Signed-off-by: Dave Jiang Signed-off-by: Jon Mason commit 91b8246de8590bac89b03b4fd14c61a8b4053b9e Author: Wang Qing Date: Fri Nov 6 17:43:31 2020 +0800 ntb: idt: fix error check in ntb_hw_idt.c idt_create_dev never return NULL and fix smatch warning. Signed-off-by: Wang Qing Acked-by: Serge Semin Signed-off-by: Jon Mason commit 88a06d6fd6b369d88cec46c62db3e2604a2f50d5 Author: Takashi Iwai Date: Sun Dec 6 09:35:27 2020 +0100 ALSA: rawmidi: Access runtime->avail always in spinlock The runtime->avail field may be accessed concurrently while some places refer to it without taking the runtime->lock spinlock, as detected by KCSAN. Usually this isn't a big problem, but for consistency and safety, we should take the spinlock at each place referencing this field. Reported-by: syzbot+a23a6f1215c84756577c@syzkaller.appspotmail.com Reported-by: syzbot+3d367d1df1d2b67f5c19@syzkaller.appspotmail.com Link: https://lore.kernel.org/r/20201206083527.21163-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 4ebd47037027c4beae99680bff3b20fdee5d7c1e Author: Takashi Iwai Date: Sun Dec 6 09:34:56 2020 +0100 ALSA: seq: Use bool for snd_seq_queue internal flags The snd_seq_queue struct contains various flags in the bit fields. Those are categorized to two different use cases, both of which are protected by different spinlocks. That implies that there are still potential risks of the bad operations for bit fields by concurrent accesses. For addressing the problem, this patch rearranges those flags to be a standard bool instead of a bit field. Reported-by: syzbot+63cbe31877bb80ef58f5@syzkaller.appspotmail.com Link: https://lore.kernel.org/r/20201206083456.21110-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 04b222f9577396a8d19bf2937d2a218dc2a3c7ac Author: Leon Romanovsky Date: Sat Oct 10 12:27:27 2020 +0300 RDMA/mlx5: Remove IB representors dead code Delete dead code. Reviewed-by: Roi Dayan Signed-off-by: Leon Romanovsky commit e87114022e1de734de0552e6b4f2dc5309efa27a Author: Leon Romanovsky Date: Sat Oct 10 11:57:26 2020 +0300 net/mlx5: Simplify eswitch mode check Provide mlx5_core device instead of "priv" pointer while checking eswith mode. Reviewed-by: Roi Dayan Signed-off-by: Leon Romanovsky commit 601c10c89cbb32b9123d8716d193e6d1a8e5300d Author: Leon Romanovsky Date: Mon Oct 5 11:13:56 2020 +0300 net/mlx5: Delete custom device management logic After conversion to use auxiliary bus, all custom device management is not needed anymore, delete it. Signed-off-by: Leon Romanovsky commit 93f8244431adf2e205f9b12dda099dcf6d83a7b5 Author: Leon Romanovsky Date: Sun Oct 4 07:35:36 2020 +0300 RDMA/mlx5: Convert mlx5_ib to use auxiliary bus The conversion to auxiliary bus solves long standing issue with existing mlx5_ib<->mlx5_core coupling. It required to have both modules in initramfs if one of them needed for the boot. Signed-off-by: Leon Romanovsky commit 912cebf420c26b4be6d5de513d6f12553605a876 Author: Leon Romanovsky Date: Mon Oct 5 08:08:25 2020 +0300 net/mlx5e: Connect ethernet part to auxiliary bus Reuse auxiliary bus to perform device management of the ethernet part of the mlx5 driver. Signed-off-by: Leon Romanovsky commit 74c9729dd892a1b676d1eb232f73f8468f0cb065 Author: Leon Romanovsky Date: Sun Oct 4 15:38:20 2020 +0300 vdpa/mlx5: Connect mlx5_vdpa to auxiliary bus Change module registration logic to use auxiliary bus instead of custom made mlx5 register interface. Signed-off-by: Leon Romanovsky commit 15269fb193108ba8a3774507d0bbd70949ab610d Author: Tetsuo Handa Date: Sun Dec 6 13:44:57 2020 +0900 tomoyo: Fix typo in comments. Spotted by developers and codespell program. Co-developed-by: Xiaoming Ni Signed-off-by: Xiaoming Ni Co-developed-by: Souptick Joarder Signed-off-by: Souptick Joarder Signed-off-by: Tetsuo Handa commit 4054eebf0fb07b010098adcdea1e1d3978490b9a Merge: 00649542f1ba1 ed22a8ff0684f Author: David S. Miller Date: Sat Dec 5 16:29:21 2020 -0800 Merge branch 'r8169-improve-rtl_rx-and-NUM_RX_DESC-handling' Heiner Kallweit says: ==================== r8169: improve rtl_rx and NUM_RX_DESC handling This series improves rtl_rx() and the handling of NUM_RX_DESC. ==================== Signed-off-by: David S. Miller commit ed22a8ff0684f691796ba602b1dd96041b824726 Author: Heiner Kallweit Date: Sun Dec 6 01:00:54 2020 +0100 r8169: make NUM_RX_DESC a signed int After recent changes there's no need any longer to define NUM_RX_DESC as an unsigned value. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 2f53e9d7bc517cc296eefb7f7d3e2697428ab408 Author: Heiner Kallweit Date: Sun Dec 6 01:00:07 2020 +0100 r8169: improve rtl_rx There's no need to check min(budget, NUM_RX_DESC). At first budget (NAPI_POLL_WEIGHT = 64) is less then NUM_RX_DESC (256). And more important: Even in case of budget > NUM_RX_DESC we could safely continue processing descriptors as long as they are owned by the CPU. In addition replace rx_left with a normal counter variable, this allows to simplify the code. Last but not least there's no need any longer to pass the budget as an u32. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 00649542f1ba1cc60759eb56f4675bf72ef3d999 Author: Colin Ian King Date: Fri Dec 4 19:45:49 2020 +0000 net: fix spelling mistake "wil" -> "will" in Kconfig There is a spelling mistake in the Kconfig help text. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20201204194549.1153063-1-colin.king@canonical.com Signed-off-by: Jakub Kicinski commit dd0fa81143f60cbc90cd6ce1c9a2c51a7b40046e Author: Linus Walleij Date: Fri Dec 4 09:35:33 2020 +0100 gpio: Add TODO item for debugfs interface The idea to create a debugfs to replace the aging and dangerous sysfs ABI for hacking and tinkering came up on the list. Signed-off-by: Linus Walleij Reviewed-by: Geert Uytterhoeven Cc: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201204083533.65830-1-linus.walleij@linaro.org commit 78d6bb584dd948ea3ab213884c8944ac5f01c6eb Merge: 4560b2a3ecdd5 34a14c2e6310a Author: Jakub Kicinski Date: Sat Dec 5 15:08:05 2020 -0800 Merge tag 'batadv-next-pullrequest-20201204' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== This cleanup patchset includes the following patches: - bump version strings, by Simon Wunderlich - update include for min/max helpers, by Sven Eckelmann - add infrastructure and netlink functions for routing algo selection, by Sven Eckelmann (2 patches) - drop deprecated debugfs and sysfs support and obsoleted functionality, by Sven Eckelmann (3 patches) - drop unused include in fragmentation.c, by Simon Wunderlich * tag 'batadv-next-pullrequest-20201204' of git://git.open-mesh.org/linux-merge: batman-adv: Drop unused soft-interface.h include in fragmentation.c batman-adv: Drop legacy code for auto deleting mesh interfaces batman-adv: Drop deprecated debugfs support batman-adv: Drop deprecated sysfs support batman-adv: Allow selection of routing algorithm over rtnetlink batman-adv: Prepare infrastructure for newlink settings batman-adv: Add new include for min/max helpers batman-adv: Start new development cycle ==================== Link: https://lore.kernel.org/r/20201204154631.21063-1-sw@simonwunderlich.de Signed-off-by: Jakub Kicinski commit 4560b2a3ecdd5d587c4c6eea4339899f173a559a Author: Arnd Bergmann Date: Fri Dec 4 14:08:00 2020 +0200 enetc: Fix unused var build warning for CONFIG_OF When CONFIG_OF is disabled, there is a harmless warning about an unused variable: enetc_pf.c: In function 'enetc_phylink_create': enetc_pf.c:981:17: error: unused variable 'dev' [-Werror=unused-variable] Slightly rearrange the code to pass around the of_node as a function argument, which avoids the problem without hurting readability. Fixes: 71b77a7a27a3 ("enetc: Migrate to PHYLINK and PCS_LYNX") Signed-off-by: Arnd Bergmann Signed-off-by: Claudiu Manoil Link: https://lore.kernel.org/r/20201204120800.17193-1-claudiu.manoil@nxp.com Signed-off-by: Jakub Kicinski commit 6e261d1090d6db0e9dd22978b6f38a2c58558a3f Author: Srinivas Kandagatla Date: Wed Dec 2 16:34:43 2020 +0000 pinctrl: qcom: Add sm8250 lpass lpi pinctrl driver Add initial pinctrl driver to support pin configuration for LPASS (Low Power Audio SubSystem) LPI (Low Power Island) pinctrl on SM8250. This IP is an additional pin control block for Audio Pins on top the existing SoC Top level pin-controller. Hardware setup looks like: TLMM GPIO[146 - 159] --> LPASS LPI GPIO [0 - 13] This pin controller has some similarities compared to Top level msm SoC Pin controller like 'each pin belongs to a single group' and so on. However this one is intended to control only audio pins in particular, which can not be configured/touched by the Top level SoC pin controller except setting them as gpios. Apart from this, slew rate is also available in this block for certain pins which are connected to SLIMbus or SoundWire Bus. Signed-off-by: Srinivas Kandagatla Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20201202163443.26499-3-srinivas.kandagatla@linaro.org [Add some dependencies] Signed-off-by: Linus Walleij commit 700a51192d09a2f7bbd49ab9b7e7920ecdc5c1bf Author: Srinivas Kandagatla Date: Wed Dec 2 16:34:42 2020 +0000 dt-bindings: pinctrl: qcom: Add sm8250 lpass lpi pinctrl bindings Add device tree binding Documentation details for Qualcomm SM8250 LPASS(Low Power Audio Sub System) LPI(Low Power Island) pinctrl driver. Signed-off-by: Srinivas Kandagatla Reviewed-by: Rob Herring Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20201202163443.26499-2-srinivas.kandagatla@linaro.org Signed-off-by: Linus Walleij commit c47d9e1b734361a5d809fae02a268b85ab0f95ee Author: Enrico Weigelt Date: Wed Dec 2 14:37:54 2020 +0100 gpio: just plain warning when nonexisting gpio requested When trying to export an nonexisting gpio ID, the kernel prints out a big warning w/ stacktrace, sounding like a huge problem. In fact it's a pretty normal situation, like file or device not found. So, just print a more relaxed warning instead. changes v2: drop defining pr_fmt() Signed-off-by: Enrico Weigelt Link: https://lore.kernel.org/r/20201202133754.32045-1-info@metux.net Signed-off-by: Linus Walleij commit e0822cf9b892ed051830daaf57896aca48c8567b Author: Kent Gibson Date: Thu Oct 15 07:11:58 2020 +0800 tools: gpio: add option to report wall-clock time to gpio-event-mon Add support for selecting the realtime clock for events. Signed-off-by: Kent Gibson Link: https://lore.kernel.org/r/20201014231158.34117-4-warthog618@gmail.com Signed-off-by: Linus Walleij commit da777be6de014be6b302644685797ed3860a0d0d Author: Kent Gibson Date: Thu Oct 15 07:11:57 2020 +0800 tools: gpio: add support for reporting realtime event clock to lsgpio Add support for reporting if a line is configured to report realtime timestamps in events. Signed-off-by: Kent Gibson Link: https://lore.kernel.org/r/20201014231158.34117-3-warthog618@gmail.com Signed-off-by: Linus Walleij commit 26d060e47e25f2c715a1b2c48fea391f67907a30 Author: Kent Gibson Date: Thu Oct 15 07:11:56 2020 +0800 gpiolib: cdev: allow edge event timestamps to be configured as REALTIME Using CLOCK_REALTIME as the source for event timestamps is crucial for some specific applications, particularly those requiring timetamps relative to a PTP clock, so provide an option to switch the event timestamp source from the default CLOCK_MONOTONIC to CLOCK_REALTIME. Note that CLOCK_REALTIME was the default source clock for GPIO until Linux 5.7 when it was changed to CLOCK_MONOTONIC due to issues with the shifting of the realtime clock. Providing this option maintains the CLOCK_MONOTONIC as the default, while also providing a path forward for those dependent on the pre-5.7 behaviour. Suggested-by: Jack Winch Signed-off-by: Kent Gibson Link: https://lore.kernel.org/r/20201014231158.34117-2-warthog618@gmail.com Signed-off-by: Linus Walleij commit a7e1abad13f3f0366ee625831fecda2b603cdc17 Author: Jonathan Lemon Date: Thu Dec 3 19:51:28 2020 -0800 ptp: Add clock driver for the OpenCompute TimeCard. The OpenCompute time card is an atomic clock along with a GPS receiver that provides a Grandmaster clock source for a PTP enabled network. More information is available at http://www.timingcard.com/ Signed-off-by: Jonathan Lemon Acked-by: Richard Cochran Link: https://lore.kernel.org/r/20201204035128.2219252-2-jonathan.lemon@gmail.com Signed-off-by: Jakub Kicinski commit 93224edf0b9fd7f643e7ead5b683bdac87f20aa2 Author: Daniel Palmer Date: Sun Nov 29 20:08:00 2020 +0900 gpio: msc313: MStar MSC313 GPIO driver This adds a driver that supports the GPIO block found in MStar/SigmaStar ARMv7 SoCs. The controller seems to have enough register for 128 lines but where they are wired up differs between chips and no currently known chip uses anywhere near 128 lines so there needs to be some per-chip data to collect together what lines actually have physical pins attached and map the right names to them. The core peripherals seem to use the same lines on the currently known chips but the lines used for the sensor interface, lcd controller etc pins seem to be totally different between the infinity and mercury chips The code tries to collect all of the re-usable names, offsets etc together so that it's easy to build the extra per-chip data for other chips in the future. So far this only supports the MSC313 and MSC313E chips. Support for the SSC8336N (mercury5) is trivial to add once all of the lines have been mapped out. Signed-off-by: Daniel Palmer Link: https://lore.kernel.org/r/20201129110803.2461700-4-daniel@0x0f.com Signed-off-by: Linus Walleij commit 493c7e03f837b46c64ebf941d0084e3e25909b7e Author: Daniel Palmer Date: Sun Nov 29 20:07:59 2020 +0900 dt-bindings: gpio: Binding for MStar MSC313 GPIO controller Add a binding description for the MStar/SigmaStar GPIO controller found in the MSC313 and later ARMv7 SoCs. Signed-off-by: Daniel Palmer Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201129110803.2461700-3-daniel@0x0f.com Signed-off-by: Linus Walleij commit 588cc1a02633dcc9ee0923d052cd20087e1a6b0a Author: Daniel Palmer Date: Sun Nov 29 20:07:58 2020 +0900 dt-bindings: gpio: Add a binding header for the MSC313 GPIO driver Header adds defines for the gpio number of each pad from the driver view. The gpio block seems to have enough registers for 128 lines but what line is mapped to a physical pin depends on the chip. The gpio block also seems to contain some registers that are not related to gpio but needed somewhere to go. Because of the above the driver itself uses the index of a pin's offset in an array of the possible offsets for a chip as the gpio number. Signed-off-by: Daniel Palmer Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201129110803.2461700-2-daniel@0x0f.com Signed-off-by: Linus Walleij commit 64a38367b45015de42521c4835541f43838caf39 Author: Thierry Reding Date: Fri Nov 27 15:08:51 2020 +0100 dt-bindings: gpio: Use Tegra186-specific include guard Use a unique include guard for the Tegra186 GPIO DT bindings header to avoid clashes with the DT bindings header for earlier chips. Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20201127140852.123192-2-thierry.reding@gmail.com Signed-off-by: Linus Walleij commit d292dd0eb3ac6ce6ea66715bb9f6b8e2ae70747c Author: Qiuxu Zhuo Date: Fri Nov 20 16:10:36 2020 -0800 PCI/AER: Add RCEC AER error injection support Root Complex Event Collectors (RCEC) appear as peers to Root Ports and may also have the AER capability. Add RCEC support to the AER error injection driver. Co-developed-by: Sean V Kelley Link: https://lore.kernel.org/r/20201121001036.8560-16-sean.v.kelley@intel.com Tested-by: Jonathan Cameron # non-native/no RCEC Signed-off-by: Qiuxu Zhuo Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas Reviewed-by: Kuppuswamy Sathyanarayanan commit 9a2f604f44979e0effa8cf067e5a8ecda729f23b Author: Sean V Kelley Date: Fri Nov 20 16:10:35 2020 -0800 PCI/PME: Add pcie_walk_rcec() to RCEC PME handling Root Complex Event Collectors (RCEC) appear as peers of Root Ports and also have the PME capability. As with AER, there is a need to be able to walk the RCiEPs associated with their RCEC for purposes of acting upon them with callbacks. Add RCEC support through the use of pcie_walk_rcec() to the current PME service driver and attach the PME service driver to the RCEC device. Co-developed-by: Qiuxu Zhuo Link: https://lore.kernel.org/r/20201121001036.8560-15-sean.v.kelley@intel.com Tested-by: Jonathan Cameron # non-native/no RCEC Signed-off-by: Qiuxu Zhuo Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas commit af113553d9610b2d811d05da96263b4f666f44f0 Author: Sean V Kelley Date: Fri Nov 20 16:10:34 2020 -0800 PCI/AER: Add pcie_walk_rcec() to RCEC AER handling Root Complex Event Collectors (RCEC) appear as peers to Root Ports and also have the AER capability. In addition, actions need to be taken for associated RCiEPs. In such cases the RCECs will need to be walked in order to find and act upon their respective RCiEPs. Extend the existing ability to link the RCECs with a walking function pcie_walk_rcec(). Add RCEC support to the current AER service driver and attach the AER service driver to the RCEC device. Co-developed-by: Qiuxu Zhuo Link: https://lore.kernel.org/r/20201121001036.8560-14-sean.v.kelley@intel.com Tested-by: Jonathan Cameron # non-native/no RCEC Signed-off-by: Qiuxu Zhuo Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas Reviewed-by: Jonathan Cameron Reviewed-by: Kuppuswamy Sathyanarayanan commit 5790862255028c831761e13014ee87a06df828f1 Author: Qiuxu Zhuo Date: Fri Nov 20 16:10:33 2020 -0800 PCI/ERR: Recover from RCiEP AER errors Add support for handling AER errors detected by Root Complex Integrated Endpoints (RCiEPs). These errors are signaled to software natively via a Root Complex Event Collector (RCEC) or non-natively via ACPI APEI if the platform retains control of AER or uses a non-standard RCEC-like device. When recovering from RCiEP errors, the Root Error Command and Status registers are in the AER Capability of an associated RCEC (if any), not in a Root Port. In the non-native case, the platform is responsible for those registers and we can't touch them. [bhelgaas: commit log, etc] Co-developed-by: Sean V Kelley Link: https://lore.kernel.org/r/20201121001036.8560-13-sean.v.kelley@intel.com Signed-off-by: Sean V Kelley Signed-off-by: Qiuxu Zhuo Signed-off-by: Bjorn Helgaas commit 507b460f814458605c47b0ed03c11e49a712fc08 Author: Sean V Kelley Date: Fri Nov 20 16:10:32 2020 -0800 PCI/ERR: Add pcie_link_rcec() to associate RCiEPs A Root Complex Event Collector terminates error and PME messages from associated RCiEPs. Use the RCEC Endpoint Association Extended Capability to identify associated RCiEPs. Link the associated RCiEPs as the RCECs are enumerated. Co-developed-by: Qiuxu Zhuo Link: https://lore.kernel.org/r/20201121001036.8560-12-sean.v.kelley@intel.com Tested-by: Jonathan Cameron # non-native/no RCEC Signed-off-by: Qiuxu Zhuo Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas Reviewed-by: Jonathan Cameron commit a175102b0a82fc57853a9e611c42d1d6172e5180 Author: Sean V Kelley Date: Wed Dec 2 11:26:29 2020 -0600 PCI/ERR: Recover from RCEC AER errors A Root Complex Event Collector (RCEC) collects and signals AER errors that were detected by Root Complex Integrated Endpoints (RCiEPs), but it may also signal errors it detects itself. This is analogous to errors detected and signaled by a Root Port. Update the AER service driver to claim RCECs in addition to Root Ports. Add support for handling RCEC-detected AER errors. This does not include handling RCiEP-detected errors that are signaled by the RCEC. Note that we expect these errors only from the native AER and APEI paths, not from DPC or EDR. [bhelgaas: split from combined RCEC/RCiEP patch, commit log] Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas commit a0de695819f63b02645e0c1c8d493324c02b0eb0 Author: Alexandre Courbot Date: Sun Nov 22 18:25:48 2020 +0900 Documentation: gpio: fix typo and unclear legacy API section The "Interacting With the Legacy GPIO Subsystem" of the documentation was unclear at best, and even included a sentence that seems to say the opposite of what it should say about the lifetime of the return value of the conversion functions. Try to clarify things a bit and hopefully make that section more readable. Reported-by: Andy Shevchenko BugLink: https://stackoverflow.com/q/64455505/2511795 Signed-off-by: Alexandre Courbot Link: https://lore.kernel.org/r/20201122092548.61979-1-gnurou@gmail.com Signed-off-by: Linus Walleij commit 8b7770b877d187bfdae1eaf587bd2b792479a31c Author: Keqian Zhu Date: Fri Dec 4 15:31:26 2020 +0800 clocksource/drivers/arm_arch_timer: Correct fault programming of CNTKCTL_EL1.EVNTI ARM virtual counter supports event stream, it can only trigger an event when the trigger bit (the value of CNTKCTL_EL1.EVNTI) of CNTVCT_EL0 changes, so the actual period of event stream is 2^(cntkctl_evnti + 1). For example, when the trigger bit is 0, then virtual counter trigger an event for every two cycles. While we're at it, rework the way we compute the trigger bit position by making it more obvious that when bits [n:n-1] are both set (with n being the most significant bit), we pick bit (n + 1). Fixes: 037f637767a8 ("drivers: clocksource: add support for ARM architected timer event stream") Suggested-by: Marc Zyngier Signed-off-by: Keqian Zhu Acked-by: Marc Zyngier Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201204073126.6920-3-zhukeqian1@huawei.com commit d8cc3905b8073c7cfbff94af889fa8dc71f21dd5 Author: Keqian Zhu Date: Fri Dec 4 15:31:25 2020 +0800 clocksource/drivers/arm_arch_timer: Use stable count reader in erratum sne In commit 0ea415390cd3 ("clocksource/arm_arch_timer: Use arch_timer_read_counter to access stable counters"), we separate stable and normal count reader to omit unnecessary overhead on systems that have no timer erratum. However, in erratum_set_next_event_tval_generic(), count reader becomes normal reader. This converts it to stable reader. Fixes: 0ea415390cd3 ("clocksource/arm_arch_timer: Use arch_timer_read_counter to access stable counters") Acked-by: Marc Zyngier Signed-off-by: Keqian Zhu Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201204073126.6920-2-zhukeqian1@huawei.com commit 5d9814df0aec56a638bbf20795abb4cfaf3cd331 Author: Dinh Nguyen Date: Sat Dec 5 04:52:23 2020 -0600 clocksource/drivers/dw_apb_timer_of: Add error handling if no clock available commit ("b0fc70ce1f02 arm64: berlin: Select DW_APB_TIMER_OF") added the support for the dw_apb_timer into the arm64 defconfig. However, for some platforms like the Intel Stratix10 and Agilex, the clock manager doesn't get loaded until after the timer driver get loaded. Thus, the driver hits the panic "No clock nor clock-frequency property for" because it cannot properly get the clock. This patch adds the error handling needed for the timer driver so that the kernel can continue booting instead of just hitting the panic. Signed-off-by: Dinh Nguyen Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201205105223.208604-1-dinguyen@kernel.org commit e319a1b956f785f618611857cd946dca2bb68542 Author: Arnd Bergmann Date: Fri Dec 4 00:13:38 2020 +0100 drm/msm: add IOMMU_SUPPORT dependency The iommu pgtable support is only available when IOMMU support is built into the kernel: WARNING: unmet direct dependencies detected for IOMMU_IO_PGTABLE Depends on [n]: IOMMU_SUPPORT [=n] Selected by [y]: - DRM_MSM [=y] && HAS_IOMEM [=y] && DRM [=y] && (ARCH_QCOM [=y] || SOC_IMX5 || ARM && COMPILE_TEST [=y]) && OF [=y] && COMMON_CLK [=y] && MMU [=y] && (QCOM_OCMEM [=y] || QCOM_OCMEM [=y]=n) Fix the dependency accordingly. There is no need for depending on CONFIG_MMU any more, as that is implied by the iommu support. Fixes: b145c6e65eb0 ("drm/msm: Add support to create a local pagetable") Signed-off-by: Arnd Bergmann Signed-off-by: Rob Clark commit 7cc29fcdfcc8784e97c5151c848e193800ec79ac Author: Marijn Suijten Date: Mon Nov 2 21:02:25 2020 +0100 drm/msm: a5xx: Make preemption reset case reentrant nr_rings is reset to 1, but when this function is called for a second (and third!) time nr_rings > 1 is false, thus the else case is entered to set up a buffer for the RPTR shadow and consequently written to RB_RPTR_ADDR, hanging platforms without WHERE_AM_I firmware support. Restructure the condition in such a way that shadow buffer setup only ever happens when has_whereami is true; otherwise preemption is only finalized when the number of ring buffers has not been reset to 1 yet. Fixes: 8907afb476ac ("drm/msm: Allow a5xx to mark the RPTR shadow as privileged") Signed-off-by: Marijn Suijten Tested-by: AngeloGioacchino Del Regno Reviewed-by: Jordan Crouse Signed-off-by: Rob Clark commit 05ae91d960fd2b60199ab7b671efd7868948d961 Author: Dmitry Baryshkov Date: Tue Nov 3 08:21:02 2020 +0300 drm/msm/dpu: enable DSPP support on SM8[12]50 Add support for color correction sub block on SM8150 and SM8250. Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark commit 784b2c48ac12dcee27db001fb1a3c58c39380cb6 Author: Dave Jiang Date: Fri Dec 4 09:46:49 2020 -0700 driver core: auxiliary bus: Fix auxiliary bus shutdown null auxdrv ptr If the probe of the auxdrv failed, the device->driver is set to NULL. During kernel shutdown, the bus shutdown will call auxdrv->shutdown and cause an invalid ptr dereference. Add check to make sure device->driver is not NULL before we proceed. Fixes: 7de3697e9cbd ("Add auxiliary bus support") Cc: Dave Ertman Signed-off-by: Dave Jiang Reviewed-by: Dan Williams Link: https://lore.kernel.org/r/160710040926.1889434.8840329810698403478.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Greg Kroah-Hartman commit 4c44274ee457e3f7012dc532c8c9cc8964a82612 Author: Arnd Bergmann Date: Fri Dec 4 10:16:11 2020 +0100 clk: samsung: mark PM functions as __maybe_unused The use of SIMPLE_DEV_PM_OPS() means that the suspend/resume functions are now unused when CONFIG_PM is disabled: drivers/clk/samsung/clk-exynos-clkout.c:219:12: error: 'exynos_clkout_resume' defined but not used [-Werror=unused-function] 219 | static int exynos_clkout_resume(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~ drivers/clk/samsung/clk-exynos-clkout.c:210:12: error: 'exynos_clkout_suspend' defined but not used [-Werror=unused-function] 210 | static int exynos_clkout_suspend(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~~ Mark them as __maybe_unused to shut up the otherwise harmless warning. Fixes: 9484f2cb8332 ("clk: samsung: exynos-clkout: convert to module driver") Signed-off-by: Arnd Bergmann Acked-by: Chanwoo Choi Acked-by: Sylwester Nawrocki Link: https://lore.kernel.org/r/20201204091616.4128366-1-arnd@kernel.org Signed-off-by: Krzysztof Kozlowski commit 3b4c362e5ef102ca2d70d33f4e8cf0780053a7db Author: Krzysztof Kozlowski Date: Wed Dec 2 21:59:55 2020 +0200 soc: samsung: exynos-chipid: initialize later - with arch_initcall The Exynos ChipID driver on Exynos SoCs has only informational purpose - to expose the SoC device in sysfs. No other drivers depend on it so there is really no benefit of initializing it early. Instead, initialize everything with arch_initcall which: 1. Allows to use dev_info() as the SoC bus is present (since core_initcall), 2. Could speed things up because of execution in a SMP environment (after bringing up secondary CPUs, unlike early_initcall), 3. Reduces the amount of work to be done early, when the kernel has to bring up critical devices. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201202195955.128633-2-krzk@kernel.org commit 7136d6a92aed6b4a1bfa5b2fe62b0ec27883b3f8 Author: Krzysztof Kozlowski Date: Wed Dec 2 21:59:54 2020 +0200 soc: samsung: exynos-chipid: order list of SoCs by name Bring some order to the list of SoCs. No functional change. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201202195955.128633-1-krzk@kernel.org commit 4bfa07300b9334b487ed4f3d4901c35ebb31b7ca Author: Zhang Changzhong Date: Fri Dec 4 16:31:57 2020 +0800 memory: jz4780_nemc: Fix potential NULL dereference in jz4780_nemc_probe() platform_get_resource() may fail and return NULL, so we should better check it's return value to avoid a NULL pointer dereference a bit later in the code. This is detected by Coccinelle semantic patch. Fixes: 911a88829725 ("memory: jz4780-nemc: driver for the NEMC on JZ4780 SoCs") Signed-off-by: Zhang Changzhong Acked-by: Paul Cercueil Link: https://lore.kernel.org/r/1607070717-32880-1-git-send-email-zhangchangzhong@huawei.com Signed-off-by: Krzysztof Kozlowski commit d77d22d701b0471584abe1871570bb43deb6e3c4 Author: Arnd Bergmann Date: Fri Dec 4 00:08:14 2020 +0100 memory: ti-emif-sram: only build for ARMv7 The driver can be compile-tested on all ARM machines, but causes a failure when built for ARMv7-M: arm-linux-gnueabi-ld: error: drivers/memory/ti-emif-sram-pm.o: conflicting architecture profiles A/M Limit the target machines to configurations that have ARMv7 enabled. Fixes: ea0c0ad6b6eb ("memory: Enable compile testing for most of the drivers") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20201203230832.1481767-1-arnd@kernel.org Signed-off-by: Krzysztof Kozlowski commit d76fa3f2c252421faf326afd5f445bed5d34075f Author: Dmitry Osipenko Date: Thu Dec 3 22:24:32 2020 +0300 memory: tegra30: Support interconnect framework Now Internal and External memory controllers are memory interconnection providers. This allows us to use interconnect API for tuning of memory configuration. EMC driver now supports OPPs and DVFS. MC driver now supports tuning of memory arbitration latency, which needs to be done for ISO memory clients, like a Display client for example. Signed-off-by: Dmitry Osipenko Tested-by: Peter Geis Acked-by: Georgi Djakov Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20201203192439.16177-4-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit 7e04ce2a9d3071f791a8147b5d3c8ddbb8e38989 Author: Dmitry Osipenko Date: Thu Dec 3 22:24:31 2020 +0300 memory: tegra20: Support hardware versioning and clean up OPP table initialization Support hardware versioning, which is now required for Tegra20 EMC OPP. Clean up OPP table initialization by using a error code returned by OPP API for judging about the OPP table presence in a device-tree and remove OPP regulator initialization because we're now going to use power domain instead of a raw regulator. This puts Tegra20 EMC OPP preparation on par with the Tegra30/124 EMC drivers. Signed-off-by: Dmitry Osipenko Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20201203192439.16177-3-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit 9bd5773e02d174dfab3c336fc43d18ec15afc5a3 Author: Dmitry Osipenko Date: Thu Dec 3 22:24:30 2020 +0300 dt-bindings: memory: tegra20-emc: Document opp-supported-hw property Document opp-supported-hw property, which is not strictly necessary to have on Tegra20, but it's very convenient to have because all other SoC core devices will use hardware versioning, and thus, it's good to maintain the consistency. Signed-off-by: Dmitry Osipenko Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20201203192439.16177-2-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit 8817aabb1bdd5811130f94ff6442bb19c9158a3a Author: Christophe Leroy Date: Tue Nov 17 05:07:59 2020 +0000 powerpc: Remove ucache_bsize ppc601 and e200 were the users of ucache_bsize. ppc601 and e200 are now gone. Remove ucache_bsize. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/288b6048597c0fdc495b203fda57a223d89499d2.1605589460.git.christophe.leroy@csgroup.eu commit 39c8bf2b3cc166a2a75111e4941cc5f7efbddc35 Author: Christophe Leroy Date: Tue Nov 17 05:07:58 2020 +0000 powerpc: Retire e200 core (mpc555x processor) There is no defconfig selecting CONFIG_E200, and no platform. e200 is an earlier version of booke, a predecessor of e500, with some particularities like an unified cache instead of both an instruction cache and a data cache. Remove it. Signed-off-by: Christophe Leroy Acked-by: Scott Wood Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/34ebc3ba2c768d97f363bd5f2deea2356e9ae127.1605589460.git.christophe.leroy@csgroup.eu commit 991838f90e9315468cd1d1daed29d27faae77a9b Author: Alexander Dahl Date: Sat Nov 28 22:53:53 2020 +0100 MIPS: DTS: img: Fix schema warnings for pwm-leds The node names for devices using the pwm-leds driver follow a certain naming scheme (now). Parent node name is not enforced, but recommended by DT project. Signed-off-by: Alexander Dahl Signed-off-by: Thomas Bogendoerfer commit c0aac3a51cb6364bed367ee3e1a96ed414f386b4 Author: Jinyang He Date: Fri Dec 4 09:11:46 2020 +0800 MIPS: KASLR: Avoid endless loop in sync_icache if synci_step is zero Most platforms do not need to do synci instruction operations when synci_step is 0. But for example, the synci implementation on Loongson64 platform has some changes. On the one hand, it ensures that the memory access instructions have been completed. On the other hand, it guarantees that all prefetch instructions need to be fetched again. And its address information is useless. Thus, only one synci operation is required when synci_step is 0 on Loongson64 platform. I guess that some other platforms have similar implementations on synci, so add judgment conditions in `while` to ensure that at least all platforms perform synci operations once. For those platforms that do not need synci, they just do one more operation similar to nop. Signed-off-by: Jinyang He Signed-off-by: Thomas Bogendoerfer commit 70d3a462fc244b0580268cc8e6c47ae4463db68a Author: Wang ShaoBo Date: Wed Nov 25 20:50:57 2020 +0800 pcmcia: omap: Fix error return code in omap_cf_probe() Fix to return proper error code instaed of 0 in omap_cf_probe(), as done elsewhere in this function. Signed-off-by: Wang ShaoBo Signed-off-by: Dominik Brodowski commit ea2c5ac866c3439cb65771c33c53f273b68b5178 Author: Sebastian Andrzej Siewior Date: Wed Sep 16 10:16:29 2020 +0200 pcmcia: Remove NEC VRC4173 CARDU The driver was introduced in 2.6.11 in the pre-git times with commit "[PATCH] mips: vR41xx updates". However, even back then, this driver was not able to be compiled, as a number of udpates had been missing from this driver: It still provided a "->get_io_map" callback (removed for v2.5.66) and a "->inquire_socket" callback and used socket_cap_t (removed for v2.5.72). Moreover, this driver failed to be brought and be kept up to date; e.g. it still provides '->register_callback', incompatible with a change committed for v2.6.14 in commit 7f316b033b36 ("[PATCH] pcmcia: remove socket register_callback"), and uses INIT_WORK() with three arguments which was removed in commit 65f27f38446e1 ("WorkStruct: Pass the work_struct pointer instead of context data") Reported-by: kernel test robot Signed-off-by: Sebastian Andrzej Siewior [linux@dominikbrodowski.net: rewrite commit message] Signed-off-by: Dominik Brodowski commit 370eb01f476cb4e831fafce7519e05c2cfdebed8 Author: Jason Yan Date: Thu Sep 10 22:05:24 2020 +0800 pcmcia: db1xxx_ss: remove unneeded semicolon Eliminate the following coccicheck warning: drivers/pcmcia/db1xxx_ss.c:455:2-3: Unneeded semicolon Reported-by: Hulk Robot Signed-off-by: Jason Yan Acked-by: Gustavo A. R. Silva Signed-off-by: Dominik Brodowski commit f15480e947d45959f0bcfba7318d369eebe47a59 Author: Christophe JAILLET Date: Wed Jun 17 21:53:26 2020 +0200 pcmcia/electra_cf: Fix some return values in 'electra_cf_probe()' in case of error 'status' is known to be 0 at this point. It must be set to a meaningful value in order to return an error code if one of the 'of_get_property()' call fails. Return -EINVAL in such a case. Fixes: 2b571a066a2f("pcmcia: CompactFlash driver for PA Semi Electra boards") Signed-off-by: Christophe JAILLET Acked-by: Olof Johansson Signed-off-by: Dominik Brodowski commit af89e575152a9b6d4a3e0e5e35bf6b7075905276 Author: Florian Fainelli Date: Fri Dec 4 11:35:31 2020 -0800 dt-bindings: phy: Convert Broadcom SATA PHY to YAML Update the Broadcom SATA PHY Device Tree binding to a YAML format. Suggested-by: Vinod Koul Signed-off-by: Florian Fainelli Link: https://lore.kernel.org/r/20201204193532.1934108-1-f.fainelli@gmail.com Signed-off-by: Vinod Koul commit 86e21677e775bcf10d676e0e93710ce17d52fdb7 Author: Chris Ruehl Date: Wed Dec 2 16:25:07 2020 +0800 devicetree: phy: rockchip-emmc add output-tapdelay-select Update the rockchip-emmc-phy.txt and add the u32 property 'output-tapdelay-select'. This allow to set the otapdlysec register. Tested with our customized rk3399 board to tune eMMC. Signed-off-by: Chris Ruehl Link: https://lore.kernel.org/r/20201202082507.3536-3-chris.ruehl@gtsys.com.hk Signed-off-by: Vinod Koul commit a8cef928276bbf8254d0067cda21dbe6210ea1aa Author: Chris Ruehl Date: Wed Dec 2 16:25:06 2020 +0800 phy: rockchip-emmc: output tap delay dt property Update the rockchip-emmc phy to set the otapdlysec register with a dt property. This was mentioned from Brian Norris when he sent the path to set the default value in the driver. This patch add a dt property 'output-tapdelay-select' u32 and allow to set the 0x0-0xf. If not set in dts, the old default 0x4 applies. Tested with our customized rk3399 to tune the eMMC. Signed-off-by: Chris Ruehl Link: https://lore.kernel.org/r/20201202082507.3536-2-chris.ruehl@gtsys.com.hk Signed-off-by: Vinod Koul commit 31de313dfdcf6971b0a1c30f86eabaa1eede74b3 Author: 周琰杰 (Zhou Yanjie) Date: Mon Nov 16 22:19:06 2020 +0800 PHY: Ingenic: Add USB PHY driver using generic PHY framework. Used the generic PHY framework API to create the PHY, this driver supoorts USB OTG PHY used in JZ4770 SoC, JZ4775 SoC, JZ4780 SoC, X1000 SoC, X1830 SoC and X2000 SoC. Co-developed-by: 漆鹏振 (Qi Pengzhen) Signed-off-by: 漆鹏振 (Qi Pengzhen) Signed-off-by: 周琰杰 (Zhou Yanjie) Tested-by: 周正 (Zhou Zheng) Tested-by: H. Nikolaus Schaller Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20201116141906.11758-4-zhouyanjie@wanyeetech.com Signed-off-by: Vinod Koul commit 4f6ecfaf3e22a70d905a627a0e84e9edb2b32835 Author: 周琰杰 (Zhou Yanjie) Date: Mon Nov 16 22:19:05 2020 +0800 dt-bindings: USB: Add bindings for Ingenic JZ4775 and X2000. Move Ingenic USB PHY bindings from Documentation/devicetree/bindings/usb to Documentation/devicetree/bindings/phy, and add bindings for JZ4775 SoC and X2000 SoC. Signed-off-by: 周琰杰 (Zhou Yanjie) Reviewed-by: Rob Herring Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/20201116141906.11758-3-zhouyanjie@wanyeetech.com Signed-off-by: Vinod Koul commit 85e6225f401f95478ad52d77a6834a6ee1db8c32 Author: 周琰杰 (Zhou Yanjie) Date: Mon Nov 16 22:19:04 2020 +0800 USB: PHY: JZ4770: Remove unnecessary function calls. Remove unnecessary "of_match_ptr()", because Ingenic SoCs all depend on Device Tree. Suggested-by: Paul Cercueil Signed-off-by: 周琰杰 (Zhou Yanjie) Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20201116141906.11758-2-zhouyanjie@wanyeetech.com Signed-off-by: Vinod Koul commit f34e43f123825a39190b978a433423c2e2030830 Author: Chris Ruehl Date: Sun Nov 29 13:44:15 2020 +0800 devicetree: phy: rockchip-emmc: pulldown property Update the documentation and add the bool property enable-strobe-pulldown used to enable the internal pull-down for the strobe line. Signed-off-by: Chris Ruehl Link: https://lore.kernel.org/r/20201129054416.3980-3-chris.ruehl@gtsys.com.hk Signed-off-by: Vinod Koul commit 8b5c2b45b8f0a11c9072da0f7baf9ee986d3151e Author: Chris Ruehl Date: Sun Nov 29 13:44:14 2020 +0800 phy: rockchip: set pulldown for strobe line in dts This patch add support to set the internal pulldown via dt property and allow simplify the board design for the trace from emmc-phy to the eMMC chipset. Default to not set the pull-down. This patch was inspired from the 4.4 tree of the Rockchip SDK, where it is enabled unconditional. The patch had been tested with our rk3399 customized board. Signed-off-by: Chris Ruehl Link: https://lore.kernel.org/r/20201129054416.3980-2-chris.ruehl@gtsys.com.hk Signed-off-by: Vinod Koul commit 51e339deab1e51443f6ac3b1bd5cd6cc8e8fe1d9 Author: Wang Li Date: Thu Nov 26 10:44:12 2020 +0800 phy: renesas: rcar-gen3-usb2: disable runtime pm in case of failure pm_runtime_enable() will decrease power disable depth. Thus a pairing increment is needed on the error handling path to keep it balanced. Fixes: 5d8042e95fd4 ("phy: rcar-gen3-usb2: Add support for r8a77470") Reported-by: Hulk Robot Signed-off-by: Wang Li Link: https://lore.kernel.org/r/20201126024412.4046845-1-wangli74@huawei.com Signed-off-by: Vinod Koul commit f5f6e01f9164040ba120f30522efdb4deceb529a Author: Arnd Bergmann Date: Fri Dec 4 14:56:43 2020 +0100 phy: mediatek: allow compile-testing the hdmi phy Compile-testing the DRM_MEDIATEK_HDMI driver shows two missing dependencies, one results in a link failure: arm-linux-gnueabi-ld: drivers/phy/mediatek/phy-mtk-hdmi.o: in function `mtk_hdmi_phy_probe': phy-mtk-hdmi.c:(.text+0xd8): undefined reference to `__clk_get_name' arm-linux-gnueabi-ld: phy-mtk-hdmi.c:(.text+0x12c): undefined reference to `devm_clk_register' arm-linux-gnueabi-ld: phy-mtk-hdmi.c:(.text+0x250): undefined reference to `of_clk_add_provider' arm-linux-gnueabi-ld: phy-mtk-hdmi.c:(.text+0x298): undefined reference to `of_clk_src_simple_get' The other one is a harmless warning: WARNING: unmet direct dependencies detected for PHY_MTK_HDMI Depends on [n]: ARCH_MEDIATEK [=n] && OF [=y] Selected by [y]: - DRM_MEDIATEK_HDMI [=y] && HAS_IOMEM [=y] && DRM_MEDIATEK [=y] Fix these by adding dependencies on CONFIG_OF and CONFIG_COMMON_CLK. With that done, there is also no reason against adding CONFIG_COMPILE_TEST. Fixes: b28be59a2e26 ("phy: mediatek: Move mtk_hdmi_phy driver into drivers/phy/mediatek folder") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20201204135650.2744481-1-arnd@kernel.org Signed-off-by: Vinod Koul commit 17e0da0b8979a53977f684813f5c9db817d170e2 Author: Arnd Bergmann Date: Fri Dec 4 00:04:56 2020 +0100 soundwire: intel: fix another unused-function warning Without CONFIG_PM, there is another warning about an unused function: drivers/soundwire/intel.c:530:12: error: 'intel_link_power_down' defined but not used [-Werror=unused-function] After a previous fix, the driver already uses both an #ifdef and a __maybe_unused annotation but still gets it wrong. Remove the ifdef and instead use __maybe_unused consistently to avoid the problem for good. Fixes: f046b2334083 ("soundwire: intel: fix intel_suspend/resume defined but not used warning") Fixes: ebf878eddbb4 ("soundwire: intel: add pm_runtime support") Signed-off-by: Arnd Bergmann Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20201203230502.1480063-1-arnd@kernel.org Signed-off-by: Vinod Koul commit c72b9bfe0f914639cc475585f45722a3eb57a56d Author: Hui Wang Date: Sat Dec 5 13:11:30 2020 +0800 ALSA: hda/realtek: make bass spk volume adjustable on a yoga laptop This change could fix 2 issues on this machine: - the bass speaker's output volume can't be adjusted, that is because the bass speaker is routed to the DAC (Nid 0x6) which has no volume control. - after plugging a headset with vol+, vol- and pause buttons on it, press those buttons, nothing happens, this means those buttons don't work at all. This machine has alc287 codec, need to add the codec id to the disable/enable_headset_jack_key(), then the headset button could work. The quirk of ALC285_FIXUP_THINKPAD_HEADSET_JACK could fix both of these 2 issues. Cc: Signed-off-by: Hui Wang Link: https://lore.kernel.org/r/20201205051130.8122-1-hui.wang@canonical.com Signed-off-by: Takashi Iwai commit 87b6a5e28b2b2d41a3e3300b9edfcb917eae7add Merge: 3650b228f83ad 44a9e78f92428 Author: Stephen Boyd Date: Fri Dec 4 22:27:22 2020 -0800 Merge tag 'clk-v5.11-samsung' of https://git.kernel.org/pub/scm/linux/kernel/git/snawrocki/clk into clk-samsung Pull Samsung clk driver updates from Sylwester Nawrocki: - Correction of Kconfig dependencies for better compile test coverage - Refactoring of the PLL clocks driver * tag 'clk-v5.11-samsung' of https://git.kernel.org/pub/scm/linux/kernel/git/snawrocki/clk: clk: samsung: Prevent potential endless loop in the PLL ops clk: samsung: Allow compile testing of Exynos, S3C64xx and S5Pv210 commit bcd684aace34fedbd473fbd9b21ed06b0c2d2212 Author: Bongsu Jeon Date: Thu Dec 3 07:31:47 2020 +0900 net/nfc/nci: Support NCI 2.x initial sequence implement the NCI 2.x initial sequence to support NCI 2.x NFCC. Since NCI 2.0, CORE_RESET and CORE_INIT sequence have been changed. If NFCEE supports NCI 2.x, then NCI 2.x initial sequence will work. In NCI 1.0, Initial sequence and payloads are as below: (DH) (NFCC) | -- CORE_RESET_CMD --> | | <-- CORE_RESET_RSP -- | | -- CORE_INIT_CMD --> | | <-- CORE_INIT_RSP -- | CORE_RESET_RSP payloads are Status, NCI version, Configuration Status. CORE_INIT_CMD payloads are empty. CORE_INIT_RSP payloads are Status, NFCC Features, Number of Supported RF Interfaces, Supported RF Interface, Max Logical Connections, Max Routing table Size, Max Control Packet Payload Size, Max Size for Large Parameters, Manufacturer ID, Manufacturer Specific Information. In NCI 2.0, Initial Sequence and Parameters are as below: (DH) (NFCC) | -- CORE_RESET_CMD --> | | <-- CORE_RESET_RSP -- | | <-- CORE_RESET_NTF -- | | -- CORE_INIT_CMD --> | | <-- CORE_INIT_RSP -- | CORE_RESET_RSP payloads are Status. CORE_RESET_NTF payloads are Reset Trigger, Configuration Status, NCI Version, Manufacturer ID, Manufacturer Specific Information Length, Manufacturer Specific Information. CORE_INIT_CMD payloads are Feature1, Feature2. CORE_INIT_RSP payloads are Status, NFCC Features, Max Logical Connections, Max Routing Table Size, Max Control Packet Payload Size, Max Data Packet Payload Size of the Static HCI Connection, Number of Credits of the Static HCI Connection, Max NFC-V RF Frame Size, Number of Supported RF Interfaces, Supported RF Interfaces. Signed-off-by: Bongsu Jeon Link: https://lore.kernel.org/r/20201202223147.3472-1-bongsu.jeon@samsung.com Signed-off-by: Jakub Kicinski commit 41fdfffd5783db62bb9e00605eee14c69b9c0974 Author: Guillaume Nault Date: Wed Dec 2 15:35:43 2020 +0100 selftests: forwarding: Add MPLS L2VPN test Connect hosts H1 and H2 using two intermediate encapsulation routers (LER1 and LER2). These routers encapsulate traffic from the hosts, including the original Ethernet header, into MPLS. Use ping to test reachability between H1 and H2. Signed-off-by: Guillaume Nault Link: https://lore.kernel.org/r/625f5c1aafa3a8085f8d3e082d680a82e16ffbaa.1606918980.git.gnault@redhat.com Signed-off-by: Jakub Kicinski commit 0911d463b30213ffc39670133fbd137a264aafd5 Author: Tom Rix Date: Wed Dec 2 08:36:22 2020 -0800 net: bna: remove trailing semicolon in macro definition The macro use will already have a semicolon. Clean up escaped newlines. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20201202163622.3733506-1-trix@redhat.com Signed-off-by: Jakub Kicinski commit 43fcd906d9c1048f2492a412917e70ce91775dfb Author: Hoang Le Date: Thu Dec 3 10:50:45 2020 +0700 tipc: support 128bit node identity for peer removing We add the support to remove a specific node down with 128bit node identifier, as an alternative to legacy 32-bit node address. example: $tipc peer remove identiy <1001002|16777777> Acked-by: Jon Maloy Signed-off-by: Hoang Le Link: https://lore.kernel.org/r/20201203035045.4564-1-hoang.h.le@dektech.com.au Signed-off-by: Jakub Kicinski commit 7f356166aebb0d956d367dfe55e19d7783277d09 Author: Simon Horman Date: Fri Dec 4 13:56:01 2020 +0100 nfp: Replace zero-length array with flexible-array member There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use "flexible array members"[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9/process/deprecated.html#zero-length-and-one-element-arrays Cc: Gustavo A. R. Silva Signed-off-by: Simon Horman Signed-off-by: Louis Peens Link: https://lore.kernel.org/r/20201204125601.24876-1-simon.horman@netronome.com Signed-off-by: Jakub Kicinski commit 4684709bf81a2d98152ed6b610e3d5c403f9bced Author: Jubin Zhong Date: Wed Dec 2 10:33:42 2020 +0800 PCI: Fix pci_slot_release() NULL pointer dereference If kobject_init_and_add() fails, pci_slot_release() is called to delete slot->list from parent->slots. But slot->list hasn't been initialized yet, so we dereference a NULL pointer: Unable to handle kernel NULL pointer dereference at virtual address 00000000 ... CPU: 10 PID: 1 Comm: swapper/0 Not tainted 4.4.240 #197 task: ffffeb398a45ef10 task.stack: ffffeb398a470000 PC is at __list_del_entry_valid+0x5c/0xb0 LR is at pci_slot_release+0x84/0xe4 ... __list_del_entry_valid+0x5c/0xb0 pci_slot_release+0x84/0xe4 kobject_put+0x184/0x1c4 pci_create_slot+0x17c/0x1b4 __pci_hp_initialize+0x68/0xa4 pciehp_probe+0x1a4/0x2fc pcie_port_probe_service+0x58/0x84 driver_probe_device+0x320/0x470 Initialize slot->list before calling kobject_init_and_add() to avoid this. Fixes: 8a94644b440e ("PCI: Fix pci_create_slot() reference count leak") Link: https://lore.kernel.org/r/1606876422-117457-1-git-send-email-zhongjubin@huawei.com Signed-off-by: Jubin Zhong Signed-off-by: Bjorn Helgaas Cc: stable@vger.kernel.org # v5.9+ commit 4fb7b98c7be3f7ea55dff36296d51881c6e1ee10 Author: Bongsu Jeon Date: Fri Dec 4 07:52:57 2020 +0900 nfc: s3fwrn5: skip the NFC bootloader mode If there isn't a proper NFC firmware image, Bootloader mode will be skipped. Signed-off-by: Bongsu Jeon Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201203225257.2446-1-bongsu.jeon@samsung.com Signed-off-by: Jakub Kicinski commit b1b8eb1283c90a953089d988930d7b6156418958 Author: Arnd Bergmann Date: Fri Dec 4 00:14:18 2020 +0100 ASoC: qcom: fix QDSP6 dependencies, attempt #3 The previous fix left another warning in randconfig builds: WARNING: unmet direct dependencies detected for SND_SOC_QDSP6 Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_SOC_QCOM [=y] && QCOM_APR [=y] && COMMON_CLK [=n] Selected by [y]: - SND_SOC_MSM8996 [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_SOC_QCOM [=y] && QCOM_APR [=y] Add one more dependency for this one. Fixes: 2bc8831b135c ("ASoC: qcom: fix SDM845 & QDSP6 dependencies more") Signed-off-by: Arnd Bergmann Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20201203231443.1483763-1-arnd@kernel.org Signed-off-by: Mark Brown commit 7b153760513cee875515398f4a9ba329a8d426e2 Author: Arnd Bergmann Date: Thu Dec 3 23:28:47 2020 +0100 ASoC: fsl_aud2htx: mark PM functions as __maybe_unused When CONFIG_PM is disabled, we get a warning for unused functions: sound/soc/fsl/fsl_aud2htx.c:261:12: error: unused function 'fsl_aud2htx_runtime_suspend' [-Werror,-Wunused-function] static int fsl_aud2htx_runtime_suspend(struct device *dev) sound/soc/fsl/fsl_aud2htx.c:271:12: error: unused function 'fsl_aud2htx_runtime_resume' [-Werror,-Wunused-function] static int fsl_aud2htx_runtime_resume(struct device *dev) Mark these as __maybe_unused to avoid the warning without adding an #ifdef. Fixes: 8a24c834c053 ("ASoC: fsl_aud2htx: Add aud2htx module driver") Signed-off-by: Arnd Bergmann Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/20201203222900.1042578-1-arnd@kernel.org Signed-off-by: Mark Brown commit aa6cc97c0ac31c668afc7027bcf2bdb0fe4610fe Author: Brent Lu Date: Thu Dec 3 23:40:10 2020 +0800 ASoC: intel: sof_rt5682: Add support for tgl_rt1011_rt5682 This patch adds the driver data for two rt1011 speaker amplifiers on SSP1 and rt5682 on SSP0 for TGL platform. DAI format for rt1011 is leveraged from cml_rt1011_rt5682 which is 4-slot tdm with 100fs bclk. Signed-off-by: Brent Lu Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20201203154010.29464-1-brent.lu@intel.com Signed-off-by: Mark Brown commit 29275309b0e32bb838d67158c6b6e687275f43e9 Author: Arnd Bergmann Date: Thu Dec 3 23:38:05 2020 +0100 ASoC: atmel: mchp-spdifrx needs COMMON_CLK Compile-testing this driver on an older platform without CONFIG_COMMON_CLK fails with ERROR: modpost: "clk_set_min_rate" [sound/soc/atmel/snd-soc-mchp-spdifrx.ko] undefined! Make this is a strict dependency. Fixes: ef265c55c1ac ("ASoC: mchp-spdifrx: add driver for SPDIF RX") Signed-off-by: Arnd Bergmann Reviewed-by: Codrin Ciubotariu Link: https://lore.kernel.org/r/20201203223815.1353451-1-arnd@kernel.org Signed-off-by: Mark Brown commit 7061b8a52296e044eed47b605d136a48da1a7761 Author: Arnd Bergmann Date: Thu Dec 3 23:54:41 2020 +0100 ASoC: cros_ec_codec: fix uninitialized memory read gcc points out a memory area that is copied to a device but not initialized: sound/soc/codecs/cros_ec_codec.c: In function 'i2s_rx_event': arch/x86/include/asm/string_32.h:83:20: error: '*((void *)&p+4)' may be used uninitialized in this function [-Werror=maybe-uninitialized] 83 | *((int *)to + 1) = *((int *)from + 1); Initialize all the unused fields to zero. Fixes: 727f1c71c780 ("ASoC: cros_ec_codec: refactor I2S RX") Signed-off-by: Arnd Bergmann Acked-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20201203225458.1477830-1-arnd@kernel.org Signed-off-by: Mark Brown commit 518a760cc369eafeef0d6c76d8c30a8acab2c921 Author: Pierre-Louis Bossart Date: Fri Dec 4 19:03:13 2020 +0200 ASoC: SOF: control: fix cppcheck warning in snd_sof_volume_info() Fix cppcheck warning: sound/soc/sof/control.c:117:82: style:inconclusive: Function 'snd_sof_volume_info' argument 2 names different: declaration 'ucontrol' definition 'uinfo'. [funcArgNamesDifferent] Fixes: fca18e62984a ("ASoC: SOF: control: override volume info callback") Signed-off-by: Pierre-Louis Bossart Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20201204170313.2704499-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit a2b8b2d975673b1a50ab0bcce5d146b9335edfad Author: Jeffle Xu Date: Mon Nov 30 19:33:39 2020 +0800 dm crypt: export sysfs of kcryptd workqueue It should be helpful to export sysfs of "kcryptd" workqueue in some cases, such as setting specific CPU affinity of the workqueue. Besides, also tweak the name format a little. The slash inside a directory name will be translate into exclamation mark, such as /sys/devices/virtual/workqueue/'kcryptd!253:0'. Signed-off-by: Jeffle Xu Signed-off-by: Mike Snitzer commit 4d7659bfbe277a43399a4a2d90fca141e70f29e1 Author: Qinglang Miao Date: Sat Nov 28 18:19:59 2020 +0800 dm ioctl: fix error return code in target_message Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 2ca4c92f58f9 ("dm ioctl: prevent empty message") Reported-by: Hulk Robot Signed-off-by: Qinglang Miao Signed-off-by: Mike Snitzer commit e8dc79d1bdda0c048bfc7d39a8146c6db1c36ef6 Author: Rikard Falkeborn Date: Sat Nov 21 23:22:48 2020 +0100 dm crypt: Constify static crypt_iv_operations The only usage of these structs is to assign their address to the iv_gen_ops field in the crypt config struct, which is a pointer to const. Make them const like the rest of the static crypt_iv_operations structs. This allows the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Signed-off-by: Mike Snitzer commit 410fe220078c3e3ed6f4167fb4de65139cfec631 Author: Jeffle Xu Date: Fri Nov 13 10:05:51 2020 +0800 dm: add support for REQ_NOWAIT to various targets commit 021a24460dc2 ("block: add QUEUE_FLAG_NOWAIT") added a new queue flag QUEUE_FLAG_NOWAIT to advertise if the bdev supports handling of REQ_NOWAIT or not. DM core supports stacking QUEUE_FLAG_NOWAIT since commit 6abc49468eea ("dm: add support for REQ_NOWAIT and enable it for linear target"), in which only dm-linear enabled it. Update others DM targets, which just do simple remapping, to enable support for REQ_NOWAIT. Signed-off-by: Jeffle Xu Signed-off-by: Mike Snitzer commit 298fb372984a808ccba9ca15a9cf0f393b3259b4 Author: Mike Snitzer Date: Tue Nov 10 13:41:53 2020 -0500 dm: rename multipath path selector source files to have "dm-ps" prefix Additional prefix helps clarify that these source files implement path selectors. Required updating Makefile to still build modules _without_ the "dm-ps" prefix to preserve dm-multipath's ability to autoload path selector modules. While at it, cleaned up some DM whitespace in Makefile. Signed-off-by: Mike Snitzer commit e4d2e82b2300b03f66b3ca8417590c86e661fab1 Author: Mike Christie Date: Thu Oct 22 19:27:50 2020 -0500 dm mpath: add IO affinity path selector This patch adds a path selector that selects paths based on a CPU to path mapping the user passes in and what CPU we are executing on. The primary user for this PS is where the app is optimized to use specific CPUs so other PSs undo the apps handy work, and the storage and it's transport are not a bottlneck. For these io-affinity PS setups a path's transport/interconnect perf is not going to flucuate a lot and there is no major differences between paths, so QL/HST smarts do not help and RR always messes up what the app is trying to do. On a system with 16 cores, where you have a job per CPU: fio --filename=/dev/dm-0 --direct=1 --rw=randrw --bs=4k \ --ioengine=libaio --iodepth=128 --numjobs=16 and a dm-multipath device setup where each CPU is mapped to one path: // When in mq mode I had to set dm_mq_nr_hw_queues=$NUM_PATHS. // Bio mode also showed similar results. 0 16777216 multipath 0 0 1 1 io-affinity 0 16 1 8:16 1 8:32 2 8:64 4 8:48 8 8:80 10 8:96 20 8:112 40 8:128 80 8:144 100 8:160 200 8:176 400 8:192 800 8:208 1000 8:224 2000 8:240 4000 65:0 8000 we can see a IOPs increase of 25%. The percent increase depends on the device and interconnect. For a slower/medium speed path/device that can do around 180K IOPs a path if you ran that fio command to it directly we saw a 25% increase like above. Slower path'd devices that could do around 90K per path showed maybe around a 2 - 5% increase. If you use something like null_blk or scsi_debug which can multi-million IOPs and hack it up so each device they export shows up as a path then you see 50%+ increases. Signed-off-by: Mike Christie Signed-off-by: Mike Snitzer commit 4da8f8c8a1e07ad18f057f4044ad96f4135dc877 Author: Mickaël Salaün Date: Fri Oct 23 19:05:12 2020 +0200 dm verity: Add support for signature verification with 2nd keyring Add a new configuration DM_VERITY_VERIFY_ROOTHASH_SIG_SECONDARY_KEYRING to enable dm-verity signatures to be verified against the secondary trusted keyring. Instead of relying on the builtin trusted keyring (with hard-coded certificates), the second trusted keyring can include certificate authorities from the builtin trusted keyring and child certificates loaded at run time. Using the secondary trusted keyring enables to use dm-verity disks (e.g. loop devices) signed by keys which did not exist at kernel build time, leveraging the certificate chain of trust model. In practice, this makes it possible to update certificates without kernel update and reboot, aligning with module and kernel (kexec) signature verification which already use the secondary trusted keyring. Signed-off-by: Mickaël Salaün Signed-off-by: Mike Snitzer commit 985eabdcfe3aad1aea6fc195dafff503f303aa3a Author: Jeffle Xu Date: Wed Nov 4 11:57:56 2020 +0800 dm: remove unnecessary current->bio_list check when submitting split bio The depth-first splitting is introduced in commit 18a25da84354 ("dm: ensure bio submission follows a depth-first tree walk"), which is used to fix the potential deadlock in case of the misordering handling of bios caused by bio_list. There're two paths submitting split bios, dm_wq_work() from worker thread and submit_bio() from application. Back upon that time, dm_wq_work() thread calls __split_and_process_bio() directly and thus will not trigger this issue since bio_list doesn't exist here. So this issue will only be triggered from application calling submit_bio(), and the fix has to check if current->bio_list is non-NULL to distinguish this case. However since commit 0c2915b8c6db1 ("dm: fix missing imposition of queue_limits from dm_wq_work() thread"), dm_wq_work() thread calls submit_bio_noacct() and thus also uses bio_list. Since then all entries into __split_and_process_bio() are under protection of bio_list, and thus the checking of current->bio_list when determinning if the depth-first principle should be used, seems kind of nonsense. After all the checking always succeeds now. Fixes: 0c2915b8c6db1 ("dm: fix missing imposition of queue_limits from dm_wq_work() thread") Signed-off-by: Jeffle Xu Signed-off-by: Mike Snitzer commit 9c2cc571f92500d2d0f4e70466c90ee8b2b440e6 Author: Mika Westerberg Date: Wed Nov 25 12:07:32 2020 +0300 PCI/PM: Do not generate wakeup event when runtime resuming device When a PCI bridge is runtime resumed from D3cold, we resume any downstream devices as well. Previously, we also generated a wakeup event for each device even though this is not a wakeup signal coming from the hardware. Normally this does not cause problems but when combined with /sys/power/wakeup_count like using the steps below: # count=$(cat /sys/power/wakeup_count) # echo $count > /sys/power/wakeup_count # echo mem > /sys/power/state The system suspend cycle might fail at this point if a PCI bridge that was runtime suspended (D3cold) was runtime resumed for any reason. The runtime resume calls pci_resume_bus(), which generates a wakeup event and increases wakeup_count. Since this is not a real wakeup event, remove the call to pci_wakeup_event() from pci_resume_one(). [bhelgaas: reorder, commit log] Link: https://lore.kernel.org/r/20201125090733.77782-1-mika.westerberg@linux.intel.com Reported-by: Utkarsh Patel Signed-off-by: Mika Westerberg Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki commit 99efde6c9bb7b42eac0459876bf964fe08e5cef9 Author: Mika Westerberg Date: Wed Nov 25 12:07:33 2020 +0300 PCI/PM: Rename pci_wakeup_bus() to pci_resume_bus() A "wakeup" is a signal from a device telling the system that the device or the whole system should be awakened and made active. PCI devices are made active by "resuming" them. pci_wakeup_bus() is not involved with the wakeup signal; it *resumes* devices on a bus (possibly in response to a wakeup signal, but that's at a higher level). Rename pci_wakeup_bus() to pci_resume_bus() to better reflect what it does. No functional change intended. [bhelgaas: commit log, reorder before removal of pci_wakeup_event()] Link: https://lore.kernel.org/r/20201125090733.77782-2-mika.westerberg@linux.intel.com Signed-off-by: Mika Westerberg Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki commit 80a129afb75cba8434fc5071bd6919172442315c Author: Maximilian Luz Date: Mon Nov 2 15:15:20 2020 +0100 PCI: Add sysfs attribute for device power state While PCI power states D0-D3hot can be queried from user-space via lspci, D3cold cannot. lspci cannot provide an accurate value when the device is in D3cold as it has to restore the device to D0 before it can access its power state via the configuration space, leading to it reporting D0 or another on-state. Thus lspci cannot be used to diagnose power consumption issues for devices that can enter D3cold or to ensure that devices properly enter D3cold at all. Add a new sysfs device attribute for the PCI power state, showing the current power state as seen by the kernel. [bhelgaas: drop READ_ONCE(), see discussion at the link] Link: https://lore.kernel.org/r/20201102141520.831630-1-luzmaximilian@gmail.com Signed-off-by: Maximilian Luz Signed-off-by: Bjorn Helgaas commit d247d1855acafe14afbf4b3102cb239f9412b5da Author: Colin Ian King Date: Fri Dec 4 19:34:11 2020 +0000 remoteproc: fix spelling mistake "Peripherial" -> "Peripherial" in Kconfig There is a spelling mistake in the Kconfig help text. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20201204193411.1152006-1-colin.king@canonical.com Signed-off-by: Bjorn Andersson commit 9d7b4a40387d0f91512a74caed6654ffa23d5ce4 Author: Arnd Bergmann Date: Fri Dec 4 20:37:35 2020 +0100 remoteproc: sysmon: fix shutdown_acked state The latest version of sysmon_stop() starts by initializing the sysmon->shutdown_acked variable, but then overwrites it with an uninitialized variable later: drivers/remoteproc/qcom_sysmon.c:551:11: error: variable 'acked' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] else if (sysmon->ept) ^~~~~~~~~~~ drivers/remoteproc/qcom_sysmon.c:554:27: note: uninitialized use occurs here sysmon->shutdown_acked = acked; ^~~~~ Remove the local 'acked' variable again and set the state directly. Fixes: 5c212aaf5457 ("remoteproc: sysmon: Expose the shutdown result") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20201204193740.3162065-1-arnd@kernel.org Signed-off-by: Bjorn Andersson commit 68061c02bb295da4955f0d309b9459f0a7ba83dd Author: Arnd Bergmann Date: Fri Dec 4 17:59:22 2020 +0100 ARM: highmem: Fix cache_is_vivt() reference The reference to cache_is_vivt() was moved into a header file, which now causes a build failure in rare randconfig builds: arch/arm/include/asm/highmem.h:52:43: error: implicit declaration of function 'cache_is_vivt' [-Werror,-Wimplicit-function-declaration] Add an explicit include to make it build reliably. Fixes: 2a15ba82fa6c ("ARM: highmem: Switch to generic kmap atomic") Signed-off-by: Arnd Bergmann Signed-off-by: Thomas Gleixner Cc: Russell King Cc: Andrew Morton Cc: Ira Weiny Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20201204165930.3877571-1-arnd@kernel.org commit 53a57e60de74a3531ae769b3241cc5169e1431ac Author: Kees Cook Date: Fri Dec 4 14:11:05 2020 -0800 MAINTAINERS: Drop inactive gcc-plugins maintainer Adjust MAINTAINERS since Emese hasn't sent email to LKML in almost 3 years. Signed-off-by: Kees Cook commit 1e860048c53ee77ee9870dcce94847a28544b753 Author: Masahiro Yamada Date: Thu Dec 3 21:57:00 2020 +0900 gcc-plugins: simplify GCC plugin-dev capability test Linus pointed out a third of the time in the Kconfig parse stage comes from the single invocation of cc1plus in scripts/gcc-plugin.sh [1], and directly testing plugin-version.h for existence cuts down the overhead a lot. [2] This commit takes one step further to kill the build test entirely. The small piece of code was probably intended to test the C++ designated initializer, which was not supported until C++20. In fact, with -pedantic option given, both GCC and Clang emit a warning. $ echo 'class test { public: int test; } test = { .test = 1 };' | g++ -x c++ -pedantic - -fsyntax-only :1:43: warning: C++ designated initializers only available with '-std=c++2a' or '-std=gnu++2a' [-Wpedantic] $ echo 'class test { public: int test; } test = { .test = 1 };' | clang++ -x c++ -pedantic - -fsyntax-only :1:43: warning: designated initializers are a C++20 extension [-Wc++20-designator] class test { public: int test; } test = { .test = 1 }; ^ 1 warning generated. Otherwise, modern C++ compilers should be able to build the code, and hopefully skipping this test should not make any practical problem. Checking the existence of plugin-version.h is still needed to ensure the plugin-dev package is installed. The test code is now small enough to be embedded in scripts/gcc-plugins/Kconfig. [1] https://lore.kernel.org/lkml/CAHk-=wjU4DCuwQ4pXshRbwDCUQB31ScaeuDo1tjoZ0_PjhLHzQ@mail.gmail.com/ [2] https://lore.kernel.org/lkml/CAHk-=whK0aQxs6Q5ijJmYF1n2ch8cVFSUzU5yUM_HOjig=+vnw@mail.gmail.com/ Reported-by: Linus Torvalds Signed-off-by: Masahiro Yamada Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20201203125700.161354-1-masahiroy@kernel.org commit af2d22254e8ee4558d3803372735c0b4f6046cd2 Author: Masahiro Yamada Date: Wed Dec 2 22:49:29 2020 +0900 gcc-plugins: remove code for GCC versions older than 4.9 Documentation/process/changes.rst says the minimal GCC version is 4.9. Hence, BUILDING_GCC_VERSION is greater than or equal to 4009. Signed-off-by: Masahiro Yamada Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20201202134929.99883-1-masahiroy@kernel.org commit 43be3a3c65ff9c0e4f2ac1c4a7e22784b3827695 Merge: 4be986c824b83 94ab9eb9b234d Author: Jakub Kicinski Date: Fri Dec 4 13:40:55 2020 -0800 Merge branch 'perf-optimizations-for-tcp-recv-zerocopy' Arjun Roy says: ==================== Perf. optimizations for TCP Recv. Zerocopy This patchset contains several optimizations for TCP Recv. Zerocopy. Summarized: 1. It is possible that a read payload is not exactly page aligned - that there may exist "straggler" bytes that we cannot map into the caller's address space cleanly. For this, we allow the caller to provide as argument a "hybrid copy buffer", turning getsockopt(TCP_ZEROCOPY_RECEIVE) into a "hybrid" operation that allows the caller to avoid a subsequent recvmsg() call to read the stragglers. 2. Similarly, for "small" read payloads that are either below the size of a page, or small enough that remapping pages is not a performance win - we allow the user to short-circuit the remapping operations entirely and simply copy into the buffer provided. Some of the patches in the middle of this set are refactors to support this "short-circuiting" optimization. 3. We allow the user to provide a hint that performing a page zap operation (and the accompanying TLB shootdown) may not be necessary, for the provided region that the kernel will attempt to map pages into. This allows us to avoid this expensive operation while holding the socket lock, which provides a significant performance advantage. With all of these changes combined, "medium" sized receive traffic (multiple tens to few hundreds of KB) see significant efficiency gains when using TCP receive zerocopy instead of regular recvmsg(). For example, with RPC-style traffic with 32KB messages, there is a roughly 15% efficiency improvement when using zerocopy. Without these changes, there is a roughly 60-70% efficiency reduction with such messages when employing zerocopy. ==================== Link: https://lore.kernel.org/r/20201202225349.935284-1-arjunroy.kdev@gmail.com Signed-off-by: Jakub Kicinski commit 94ab9eb9b234ddf23af04a4bc7e8db68e67b8778 Author: Arjun Roy Date: Wed Dec 2 14:53:49 2020 -0800 net-zerocopy: Defer vm zap unless actually needed. Zapping pages is required only if we are calling vm_insert_page into a region where pages had previously been mapped. Receive zerocopy allows reusing such regions, and hitherto called zap_page_range() before calling vm_insert_page() in that range. zap_page_range() can also be triggered from userspace with madvise(MADV_DONTNEED). If userspace is configured to call this before reusing a segment, or if there was nothing mapped at this virtual address to begin with, we can avoid calling zap_page_range() under the socket lock. That said, if userspace does not do that, then we are still responsible for calling zap_page_range(). This patch adds a flag that the user can use to hint to the kernel that a zap is not required. If the flag is not set, or if an older user application does not have a flags field at all, then the kernel calls zap_page_range as before. Also, if the flag is set but a zap is still required, the kernel performs that zap as necessary. Thus incorrectly indicating that a zap can be avoided does not change the correctness of operation. It also increases the batchsize for vm_insert_pages and prefetches the page struct for the batch since we're about to bump the refcount. An alternative mechanism could be to not have a flag, assume by default a zap is not needed, and fall back to zapping if needed. However, this would harm performance for older applications for which a zap is necessary, and thus we implement it with an explicit flag so newer applications can opt in. When using RPC-style traffic with medium sized (tens of KB) RPCs, this change yields an efficency improvement of about 30% for QPS/CPU usage. Signed-off-by: Arjun Roy Signed-off-by: Eric Dumazet Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: Jakub Kicinski commit 0c3936d32f754c6e9068a25b7823dc4b5bc42607 Author: Arjun Roy Date: Wed Dec 2 14:53:48 2020 -0800 net-zerocopy: Set zerocopy hint when data is copied Set zerocopy hint, event when falling back to copy, so that the pending data can be efficiently received using zerocopy when possible. Signed-off-by: Arjun Roy Signed-off-by: Eric Dumazet Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: Jakub Kicinski commit f21a3c48039891c02063fe6dc3c3a2f8f344b345 Author: Arjun Roy Date: Wed Dec 2 14:53:47 2020 -0800 net-zerocopy: Introduce short-circuit small reads. Sometimes, we may call tcp receive zerocopy when inq is 0, or inq < PAGE_SIZE, or inq is generally small enough that it is cheaper to copy rather than remap pages. In these cases, we may want to either return early (inq=0) or attempt to use the provided copy buffer to simply copy the received data. This allows us to save both system call overhead and the latency of acquiring mmap_sem in read mode for cases where it would be useless to do so. This patchset enables this behaviour by: 1. Returning quickly if inq is 0. 2. Attempting to perform a regular copy if a hybrid copybuffer is provided and it is large enough to absorb all available bytes. 3. Return quickly if no such buffer was provided and there are less than PAGE_SIZE bytes available. For small RPC ping-pong workloads, normally we would have 1 getsockopt(), 1 recvmsg() and 1 sendmsg() call per RPC. With this change, we remove the recvmsg() call entirely, reducing the syscall overhead by about 33%. In testing with small (hundreds of bytes) RPC traffic, this yields a syscall reduction of about 33% and an efficiency gain of about 3-5% when defined as QPS/CPU Util. Signed-off-by: Arjun Roy Signed-off-by: Eric Dumazet Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: Jakub Kicinski commit 936ced415751f744654f64977ddbf67d17a2a45a Author: Arjun Roy Date: Wed Dec 2 14:53:46 2020 -0800 net-zerocopy: Fast return if inq < PAGE_SIZE Sometimes, we may call tcp receive zerocopy when inq is 0, or inq < PAGE_SIZE, in which case we cannot remap pages. In this case, simply return the appropriate hint for regular copying without taking mmap_sem. Signed-off-by: Arjun Roy Signed-off-by: Eric Dumazet Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: Jakub Kicinski commit 98917cf0d6eda01e8c3c34d35398d46b247b6fd3 Author: Arjun Roy Date: Wed Dec 2 14:53:45 2020 -0800 net-zerocopy: Refactor frag-is-remappable test. Refactor frag-is-remappable test for tcp receive zerocopy. This is part of a patch set that introduces short-circuited hybrid copies for small receive operations, which results in roughly 33% fewer syscalls for small RPC scenarios. Signed-off-by: Arjun Roy Signed-off-by: Eric Dumazet Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: Jakub Kicinski commit 7fba5309efe24e4f0284ef4b8663cdf401035e72 Author: Arjun Roy Date: Wed Dec 2 14:53:44 2020 -0800 net-zerocopy: Refactor skb frag fast-forward op. Refactor skb frag fast-forwarding for tcp receive zerocopy. This is part of a patch set that introduces short-circuited hybrid copies for small receive operations, which results in roughly 33% fewer syscalls for small RPC scenarios. skb_advance_to_frag(), given a skb and an offset into the skb, iterates from the first frag for the skb until we're at the frag specified by the offset. Assuming the offset provided refers to how many bytes in the skb are already read, the returned frag points to the next frag we may read from, while offset_frag is set to the number of bytes from this frag that we have already read. If frag is not null and offset_frag is equal to 0, then we may be able to map this frag's page into the process address space with vm_insert_page(). However, if offset_frag is not equal to 0, then we cannot do so. Signed-off-by: Arjun Roy Signed-off-by: Eric Dumazet Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: Jakub Kicinski commit 2cd81161848daa9c1b5ba13ceb6ff067fbb86aa9 Author: Arjun Roy Date: Wed Dec 2 14:53:43 2020 -0800 net-tcp: Introduce tcp_recvmsg_locked(). Refactor tcp_recvmsg() by splitting it into locked and unlocked portions. Callers already holding the socket lock and not using ERRQUEUE/cmsg/busy polling can simply call tcp_recvmsg_locked(). This is in preparation for a short-circuit copy performed by TCP receive zerocopy for small (< PAGE_SIZE, or otherwise requested by the user) reads. Signed-off-by: Arjun Roy Signed-off-by: Eric Dumazet Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: Jakub Kicinski commit 18fb76ed53865c1b5d5f0157b1b825704590beb5 Author: Arjun Roy Date: Wed Dec 2 14:53:42 2020 -0800 net-zerocopy: Copy straggler unaligned data for TCP Rx. zerocopy. When TCP receive zerocopy does not successfully map the entire requested space, it outputs a 'hint' that the caller should recvmsg(). Augment zerocopy to accept a user buffer that it tries to copy this hint into - if it is possible to copy the entire hint, it will do so. This elides a recvmsg() call for received traffic that isn't exactly page-aligned in size. This was tested with RPC-style traffic of arbitrary sizes. Normally, each received message required at least one getsockopt() call, and one recvmsg() call for the remaining unaligned data. With this change, almost all of the recvmsg() calls are eliminated, leading to a savings of about 25%-50% in number of system calls for RPC-style workloads. Signed-off-by: Arjun Roy Signed-off-by: Eric Dumazet Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: Jakub Kicinski commit f5889e70b9ccd25f1f140c372eaa7ded9819c102 Author: Mauro Carvalho Chehab Date: Fri Dec 4 16:32:30 2020 +0100 scripts: get_feat.pl: reduce table width for all features output Auto-adjust the table columns width to better fit under terminals, by breaking the description on multiple lines and auto-estimating the minimal size for the per-architecture status. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/9d39ac3fd51f1360aecc328c01558be88a1d6930.1607095090.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 4fa32f8702891713fcd8ae807da4bab862812c94 Author: Mauro Carvalho Chehab Date: Fri Dec 4 16:32:29 2020 +0100 scripts: get_feat.pl: change the group by order Right now, arch compatibility is grouped by status at the alphabetical order from A to Z, and then from a to z, e. g:. --- TODO ok Revert the order, in order to print first the OK results, then TODO, and, finally, the not compatible ones. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/46d53d138eab8e4a55124323ceb5b212c6eedd08.1607095090.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit dbb9090232936c08510b7d028b8a6e03b4716154 Author: Mauro Carvalho Chehab Date: Fri Dec 4 16:32:28 2020 +0100 scripts: get_feat.pl: make complete table more coincise Currently, there are too many white spaces at the tables, and the information is very sparsed on it. Make the format a lot more compact. Suggested-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/8165ff379313e63a69898db19d790e4436224ffd.1607095090.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 34da87213d3ddd26643aa83deff7ffc6463da0fc Author: Florent Revest Date: Fri Dec 4 12:36:09 2020 +0100 selftests/bpf: Test bpf_sk_storage_get in tcp iterators This extends the existing bpf_sk_storage_get test where a socket is created and tagged with its creator's pid by a task_file iterator. A TCP iterator is now also used at the end of the test to negate the values already stored in the local storage. The test therefore expects -getpid() to be stored in the local storage. Signed-off-by: Florent Revest Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20201204113609.1850150-6-revest@google.com commit bd9b327e58f98aa7126291bf12b50720c660e787 Author: Florent Revest Date: Fri Dec 4 12:36:08 2020 +0100 selftests/bpf: Add an iterator selftest for bpf_sk_storage_get The eBPF program iterates over all files and tasks. For all socket files, it stores the tgid of the last task it encountered with a handle to that socket. This is a heuristic for finding the "owner" of a socket similar to what's done by lsof, ss, netstat or fuser. Potentially, this information could be used from a cgroup_skb/*gress hook to try to associate network traffic with processes. The test makes sure that a socket it created is tagged with prog_tests's pid. Signed-off-by: Florent Revest Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20201204113609.1850150-5-revest@google.com commit 593f6d41abbbc63e1ad297f7a36ab6060a812f0c Author: Florent Revest Date: Fri Dec 4 12:36:07 2020 +0100 selftests/bpf: Add an iterator selftest for bpf_sk_storage_delete The eBPF program iterates over all entries (well, only one) of a socket local storage map and deletes them all. The test makes sure that the entry is indeed deleted. Signed-off-by: Florent Revest Signed-off-by: Daniel Borkmann Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20201204113609.1850150-4-revest@google.com commit a50a85e40c59cf27ca3b324a5aa4c7f35314f251 Author: Florent Revest Date: Fri Dec 4 12:36:06 2020 +0100 bpf: Expose bpf_sk_storage_* to iterator programs Iterators are currently used to expose kernel information to userspace over fast procfs-like files but iterators could also be used to manipulate local storage. For example, the task_file iterator could be used to initialize a socket local storage with associations between processes and sockets or to selectively delete local storage values. Signed-off-by: Florent Revest Signed-off-by: Daniel Borkmann Acked-by: Martin KaFai Lau Acked-by: KP Singh Link: https://lore.kernel.org/bpf/20201204113609.1850150-3-revest@google.com commit 4f19cab76136e800a3f04d8c9aa4d8e770e3d3d8 Author: Florent Revest Date: Fri Dec 4 12:36:05 2020 +0100 bpf: Add a bpf_sock_from_file helper While eBPF programs can check whether a file is a socket by file->f_op == &socket_file_ops, they cannot convert the void private_data pointer to a struct socket BTF pointer. In order to do this a new helper wrapping sock_from_file is added. This is useful to tracing programs but also other program types inheriting this set of helpers such as iterators or LSM programs. Signed-off-by: Florent Revest Signed-off-by: Daniel Borkmann Acked-by: KP Singh Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20201204113609.1850150-2-revest@google.com commit dba4a9256bb4d78ef89aaad5f49787aa27fcd5b4 Author: Florent Revest Date: Fri Dec 4 12:36:04 2020 +0100 net: Remove the err argument from sock_from_file Currently, the sock_from_file prototype takes an "err" pointer that is either not set or set to -ENOTSOCK IFF the returned socket is NULL. This makes the error redundant and it is ignored by a few callers. This patch simplifies the API by letting callers deduce the error based on whether the returned socket is NULL or not. Suggested-by: Al Viro Signed-off-by: Florent Revest Signed-off-by: Daniel Borkmann Reviewed-by: KP Singh Link: https://lore.kernel.org/bpf/20201204113609.1850150-1-revest@google.com commit 4be986c824b8382119a0918ae3a138577a73cf9f Merge: 846c3c9cfe8a7 2bc035538e167 Author: Jakub Kicinski Date: Fri Dec 4 13:30:53 2020 -0800 Merge branch 'seg6-add-support-for-srv6-end-dt4-dt6-behavior' Andrea Mayer says: ==================== seg6: add support for SRv6 End.DT4/DT6 behavior This patchset provides support for the SRv6 End.DT4 and End.DT6 (VRF mode) behaviors. The SRv6 End.DT4 behavior is used to implement multi-tenant IPv4 L3 VPNs. It decapsulates the received packets and performs IPv4 routing lookup in the routing table of the tenant. The SRv6 End.DT4 Linux implementation leverages a VRF device in order to force the routing lookup into the associated routing table. The SRv6 End.DT4 behavior is defined in the SRv6 Network Programming [1]. The Linux kernel already offers an implementation of the SRv6 End.DT6 behavior which allows us to set up IPv6 L3 VPNs over SRv6 networks. This new implementation of DT6 is based on the same VRF infrastructure already exploited for implementing the SRv6 End.DT4 behavior. The aim of the new SRv6 End.DT6 in VRF mode consists in simplifying the construction of IPv6 L3 VPN services in the multi-tenant environment. Currently, the two SRv6 End.DT6 implementations (legacy and VRF mode) coexist seamlessly and can be chosen according to the context and the user preferences. - Patch 1 is needed to solve a pre-existing issue with tunneled packets when a sniffer is attached; - Patch 2 improves the management of the seg6local attributes used by the SRv6 behaviors; - Patch 3 adds support for optional attributes in SRv6 behaviors; - Patch 4 introduces two callbacks used for customizing the creation/destruction of a SRv6 behavior; - Patch 5 is the core patch that adds support for the SRv6 End.DT4 behavior; - Patch 6 introduces the VRF support for SRv6 End.DT6 behavior; - Patch 7 adds the selftest for SRv6 End.DT4 behavior; - Patch 8 adds the selftest for SRv6 End.DT6 (VRF mode) behavior. Regarding iproute2, the support for the new "vrftable" attribute, required by both SRv6 End.DT4 and End.DT6 (VRF mode) behaviors, is provided in a different patchset that will follow shortly. I would like to thank David Ahern for his support during the development of this patchset. [1] https://tools.ietf.org/html/draft-ietf-spring-srv6-network-programming ==================== Link: https://lore.kernel.org/r/20201202130517.4967-1-andrea.mayer@uniroma2.it Signed-off-by: Jakub Kicinski commit 2bc035538e167e28d900f2f51403458a05d7cc4a Author: Andrea Mayer Date: Wed Dec 2 14:05:17 2020 +0100 selftests: add selftest for the SRv6 End.DT6 (VRF) behavior this selftest is designed for evaluating the new SRv6 End.DT6 (VRF) behavior used, in this example, for implementing IPv6 L3 VPN use cases. Signed-off-by: Andrea Mayer Signed-off-by: Paolo Lungaroni Signed-off-by: Jakub Kicinski commit 2195444e09b4fd3488a69e2f269a401dd4e4f512 Author: Andrea Mayer Date: Wed Dec 2 14:05:16 2020 +0100 selftests: add selftest for the SRv6 End.DT4 behavior this selftest is designed for evaluating the new SRv6 End.DT4 behavior used, in this example, for implementing IPv4 L3 VPN use cases. Signed-off-by: Andrea Mayer Reviewed-by: David Ahern Signed-off-by: Jakub Kicinski commit 20a081b7984c1a91db175d1906b37136df6af105 Author: Andrea Mayer Date: Wed Dec 2 14:05:15 2020 +0100 seg6: add VRF support for SRv6 End.DT6 behavior SRv6 End.DT6 is defined in the SRv6 Network Programming [1]. The Linux kernel already offers an implementation of the SRv6 End.DT6 behavior which permits IPv6 L3 VPNs over SRv6 networks. This implementation is not particularly suitable in contexts where we need to deploy IPv6 L3 VPNs among different tenants which share the same network address schemes. The underlying problem lies in the fact that the current version of DT6 (called legacy DT6 from now on) needs a complex configuration to be applied on routers which requires ad-hoc routes and routing policy rules to ensure the correct isolation of tenants. Consequently, a new implementation of DT6 has been introduced with the aim of simplifying the construction of IPv6 L3 VPN services in the multi-tenant environment using SRv6 networks. To accomplish this task, we reused the same VRF infrastructure and SRv6 core components already exploited for implementing the SRv6 End.DT4 behavior. Currently the two End.DT6 implementations coexist seamlessly and can be used depending on the context and the user preferences. So, in order to support both versions of DT6 a new attribute (vrftable) has been introduced which allows us to differentiate the implementation of the behavior to be used. A SRv6 End.DT6 legacy behavior is still instantiated using a command like the following one: $ ip -6 route add 2001:db8::1 encap seg6local action End.DT6 table 100 dev eth0 While to instantiate the SRv6 End.DT6 in VRF mode, the command is still pretty straight forward: $ ip -6 route add 2001:db8::1 encap seg6local action End.DT6 vrftable 100 dev eth0. Obviously as in the case of SRv6 End.DT4, the VRF strict_mode parameter must be set (net.vrf.strict_mode=1) and the VRF associated with table 100 must exist. Please note that the instances of SRv6 End.DT6 legacy and End.DT6 VRF mode can coexist in the same system/configuration without problems. [1] https://tools.ietf.org/html/draft-ietf-spring-srv6-network-programming Signed-off-by: Andrea Mayer Signed-off-by: Jakub Kicinski commit 664d6f86868bacbfdb3926a975dff29ca9ebe0d0 Author: Andrea Mayer Date: Wed Dec 2 14:05:14 2020 +0100 seg6: add support for the SRv6 End.DT4 behavior SRv6 End.DT4 is defined in the SRv6 Network Programming [1]. The SRv6 End.DT4 is used to implement IPv4 L3VPN use-cases in multi-tenants environments. It decapsulates the received packets and it performs IPv4 routing lookup in the routing table of the tenant. The SRv6 End.DT4 Linux implementation leverages a VRF device in order to force the routing lookup into the associated routing table. To make the End.DT4 work properly, it must be guaranteed that the routing table used for routing lookup operations is bound to one and only one VRF during the tunnel creation. Such constraint has to be enforced by enabling the VRF strict_mode sysctl parameter, i.e: $ sysctl -wq net.vrf.strict_mode=1. At JANOG44, LINE corporation presented their multi-tenant DC architecture using SRv6 [2]. In the slides, they reported that the Linux kernel is missing the support of SRv6 End.DT4 behavior. The SRv6 End.DT4 behavior can be instantiated using a command similar to the following: $ ip route add 2001:db8::1 encap seg6local action End.DT4 vrftable 100 dev eth0 We introduce the "vrftable" extension in iproute2 in a following patch. [1] https://tools.ietf.org/html/draft-ietf-spring-srv6-network-programming [2] https://speakerdeck.com/line_developers/line-data-center-networking-with-srv6 Signed-off-by: Andrea Mayer Signed-off-by: Jakub Kicinski commit cfdf64a03406351a9d6c1fe568a141a9a85d4710 Author: Andrea Mayer Date: Wed Dec 2 14:05:13 2020 +0100 seg6: add callbacks for customizing the creation/destruction of a behavior We introduce two callbacks used for customizing the creation/destruction of a SRv6 behavior. Such callbacks are defined in the new struct seg6_local_lwtunnel_ops and hereafter we provide a brief description of them: - build_state(...): used for calling the custom constructor of the behavior during its initialization phase and after all the attributes have been parsed successfully; - destroy_state(...): used for calling the custom destructor of the behavior before it is completely destroyed. Signed-off-by: Andrea Mayer Signed-off-by: Jakub Kicinski commit 0a3021f1d4e553d9f3e7fc20e994b91af0687eb4 Author: Andrea Mayer Date: Wed Dec 2 14:05:12 2020 +0100 seg6: add support for optional attributes in SRv6 behaviors Before this patch, each SRv6 behavior specifies a set of required attributes that must be provided by the userspace application when such behavior is going to be instantiated. If at least one of the required attributes is not provided, the creation of the behavior fails. The SRv6 behavior framework lacks a way to manage optional attributes. By definition, an optional attribute for a SRv6 behavior consists of an attribute which may or may not be provided by the userspace. Therefore, if an optional attribute is missing (and thus not supplied by the user) the creation of the behavior goes ahead without any issue. This patch explicitly differentiates the required attributes from the optional attributes. In particular, each behavior can declare a set of required attributes and a set of optional ones. The semantic of the required attributes remains *totally* unaffected by this patch. The introduction of the optional attributes does NOT impact on the backward compatibility of the existing SRv6 behaviors. It is essential to note that if an (optional or required) attribute is supplied to a SRv6 behavior which does not expect it, the behavior simply discards such attribute without generating any error or warning. This operating mode remained unchanged both before and after the introduction of the optional attributes extension. The optional attributes are one of the key components used to implement the SRv6 End.DT6 behavior based on the Virtual Routing and Forwarding (VRF) framework. The optional attributes make possible the coexistence of the already existing SRv6 End.DT6 implementation with the new SRv6 End.DT6 VRF-based implementation without breaking any backward compatibility. Further details on the SRv6 End.DT6 behavior (VRF mode) are reported in subsequent patches. From the userspace point of view, the support for optional attributes DO NOT require any changes to the userspace applications, i.e: iproute2 unless new attributes (required or optional) are needed. Signed-off-by: Andrea Mayer Signed-off-by: Jakub Kicinski commit 964adce526a46f38c6a79e45336cd3732f2e8d86 Author: Andrea Mayer Date: Wed Dec 2 14:05:11 2020 +0100 seg6: improve management of behavior attributes Depending on the attribute (i.e.: SEG6_LOCAL_SRH, SEG6_LOCAL_TABLE, etc), the parse() callback performs some validity checks on the provided input and updates the tunnel state (slwt) with the result of the parsing operation. However, an attribute may also need to reserve some additional resources (i.e.: memory or setting up an eBPF program) in the parse() callback to complete the parsing operation. The parse() callbacks are invoked by the parse_nla_action() for each attribute belonging to a specific behavior. Given a behavior with N attributes, if the parsing of the i-th attribute fails, the parse_nla_action() returns immediately with an error. Nonetheless, the resources acquired during the parsing of the i-1 attributes are not freed by the parse_nla_action(). Attributes which acquire resources must release them *in an explicit way* in both the seg6_local_{build/destroy}_state(). However, adding a new attribute of this type requires changes to seg6_local_{build/destroy}_state() to release the resources correctly. The seg6local infrastructure still lacks a simple and structured way to release the resources acquired in the parse() operations. We introduced a new callback in the struct seg6_action_param named destroy(). This callback releases any resource which may have been acquired in the parse() counterpart. Each attribute may or may not implement the destroy() callback depending on whether it needs to free some acquired resources. The destroy() callback comes with several of advantages: 1) we can have many attributes as we want for a given behavior with no need to explicitly free the taken resources; 2) As in case of the seg6_local_build_state(), the seg6_local_destroy_state() does not need to handle the release of resources directly. Indeed, it calls the destroy_attrs() function which is in charge of calling the destroy() callback for every set attribute. We do not need to patch seg6_local_{build/destroy}_state() anymore as we add new attributes; 3) the code is more readable and better structured. Indeed, all the information needed to handle a given attribute are contained in only one place; 4) it facilitates the integration with new features introduced in further patches. Signed-off-by: Andrea Mayer Signed-off-by: Jakub Kicinski commit 048939088220278b8ee5bbf3769fd2f803ca9e3e Author: Andrea Mayer Date: Wed Dec 2 14:05:10 2020 +0100 vrf: add mac header for tunneled packets when sniffer is attached Before this patch, a sniffer attached to a VRF used as the receiving interface of L3 tunneled packets detects them as malformed packets and it complains about that (i.e.: tcpdump shows bogus packets). The reason is that a tunneled L3 packet does not carry any L2 information and when the VRF is set as the receiving interface of a decapsulated L3 packet, no mac header is currently set or valid. Therefore, the purpose of this patch consists of adding a MAC header to any packet which is directly received on the VRF interface ONLY IF: i) a sniffer is attached on the VRF and ii) the mac header is not set. In this case, the mac address of the VRF is copied in both the destination and the source address of the ethernet header. The protocol type is set either to IPv4 or IPv6, depending on which L3 packet is received. Signed-off-by: Andrea Mayer Reviewed-by: David Ahern Signed-off-by: Jakub Kicinski commit f12758f6f929dbcd37abdb1d91d245539eca48f8 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:37:18 2020 -0600 mt76: mt7615: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by replacing a /* fall through */ comment with the new pseudo-keyword macro fallthrough; instead of letting the code fall through to the next case. Notice that Clang doesn't recognize /* fall through */ comments as implicit fall-through markings. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Felix Fietkau commit bacf5047bb44d3660fbf7f9130b4826d2d9f59d2 Author: Shayne Chen Date: Thu Nov 26 16:59:18 2020 +0800 mt76: mt7915: fix ht mcs in mt7915_mcu_get_rx_rate() The mcs value of HT mode reported by mt7915_mcu_get_rx_rate() has already been converted to the expected format. Tested-by: Yiwei Chung Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit ee8b1c478a9fbce9c64151ee561c124c4dcd66be Author: Bjorn Helgaas Date: Fri Dec 4 15:14:07 2020 -0600 PCI: Return u16 from pci_find_ext_capability() and similar PCI Express Extended Capabilities are in config space between offsets 256 and 4K. These offsets all fit in 16 bits. Change the return type of pci_find_ext_capability() and supporting functions from int to u16 to match the specification. Many callers use "int", which is fine, but there's no need to store more than a u16. Signed-off-by: Bjorn Helgaas commit f646c2a0a6685a8a30a150509b112c911b8feff3 Author: Puranjay Mohan Date: Sun Nov 29 22:16:26 2020 +0530 PCI: Return u8 from pci_find_capability() and similar PCI Capabilities are linked in a list that must appear in the first 256 bytes of config space. Each capabilities list pointer is 8 bits. Change the return type of pci_find_capability() and supporting functions from int to u8 to match the specification. [bhelgaas: change other related interfaces, fix HyperTransport typos] Link: https://lore.kernel.org/r/20201129164626.12887-1-puranjay12@gmail.com Signed-off-by: Puranjay Mohan Signed-off-by: Bjorn Helgaas commit 4ecc08b2f51d874f35185724eda769492b60a18d Merge: 0b3355b070434 0d2bf11a6b3e2 Author: Mark Brown Date: Fri Dec 4 20:39:45 2020 +0000 Merge tag 'auxbus-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core into asoc-5.11 Auxiliary Bus support tag for 5.11-rc1 This is a signed tag for other subsystems to be able to pull in the auxiliary bus support into their trees for the 5.11-rc1 merge. Signed-off-by: Greg Kroah-Hartman commit 7ce8d91b8a849c4b9a010a8b773e3838a8e3d030 Author: Colin Ian King Date: Fri Dec 4 12:13:17 2020 -0800 Input: vsxxxaa - fix Kconfig spelling mistake There is a spelling mistake in the Kconfig help text. Fix it by replacing "theses" with "these". Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20201204193635.1152241-1-colin.king@canonical.com Signed-off-by: Dmitry Torokhov commit 5c667dca71095abec90420eb09503f35f66c9585 Merge: 2fa3515cc0d3c 5f61b7c6975b0 Author: Andrii Nakryiko Date: Fri Dec 4 11:53:17 2020 -0800 Merge branch 'Improve error handling of verifier tests' Florian Lehner says: ==================== These patches improve the error handling for verifier tests. With "Test the 32bit narrow read" Krzesimir Nowak provided these patches first, but they were never merged. The improved error handling helps to implement and test BPF program types that are not supported yet. v3: - Add explicit fallthrough v2: - Add unpriv check in error validation ==================== Signed-off-by: Andrii Nakryiko commit 5f61b7c6975b03e6ace2cfb13d415d5f475c8830 Author: Florian Lehner Date: Fri Dec 4 19:18:28 2020 +0100 selftests/bpf: Avoid errno clobbering Print a message when the returned error is about a program type being not supported or because of permission problems. These messages are expected if the program to test was actually executed. Signed-off-by: Florian Lehner Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201204181828.11974-3-dev@der-flo.net commit 7d17167244f5415bc6bc90f5bb0074b6d79676b4 Author: Florian Lehner Date: Fri Dec 4 19:18:27 2020 +0100 selftests/bpf: Print reason when a tester could not run a program Commit 8184d44c9a57 ("selftests/bpf: skip verifier tests for unsupported program types") added a check to skip unsupported program types. As bpf_probe_prog_type can change errno, do_single_test should save it before printing a reason why a supported BPF program type failed to load. Fixes: 8184d44c9a57 ("selftests/bpf: skip verifier tests for unsupported program types") Signed-off-by: Florian Lehner Signed-off-by: Andrii Nakryiko Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201204181828.11974-2-dev@der-flo.net commit e57eb8b5050c9b6d63eea26b194d96744fe4018a Author: Fabio Estevam Date: Wed Dec 2 20:24:48 2020 -0300 thermal: imx8mm: Disable the clock on probe failure Prior to returning an error in probe, disable the previously enabled clock. Signed-off-by: Fabio Estevam Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201202232448.2692-2-festevam@gmail.com commit ce662ccde5c6ae4f4d89fe71570bf59441004eb9 Author: Fabio Estevam Date: Wed Dec 2 20:24:47 2020 -0300 thermal: imx8mm: Print the correct error code Currently the error message does not print the correct error code. Fix it by initializing 'ret' to the proper error code. Signed-off-by: Fabio Estevam Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201202232448.2692-1-festevam@gmail.com commit 2fa3515cc0d3cc8413465e55b85e55aeab090812 Author: Tom Rix Date: Wed Dec 2 13:28:10 2020 -0800 bpf: Remove trailing semicolon in macro definition The macro use will already have a semicolon. Clean up escaped newlines. Signed-off-by: Tom Rix Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20201202212810.3774614-1-trix@redhat.com commit 846c3c9cfe8a74021b246bc77a848507be225719 Merge: fdd8b8249ef81 9eb597c74483a Author: Jakub Kicinski Date: Fri Dec 4 10:56:37 2020 -0800 Merge tag 'wireless-drivers-next-2020-12-03' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for v5.11 First set of patches for v5.11. rtw88 getting improvements to work better with Bluetooth and other driver also getting some new features. mhi-ath11k-immutable branch was pulled from mhi tree to avoid conflicts with mhi tree. Major changes: rtw88 * major bluetooth co-existance improvements wilc1000 * Wi-Fi Multimedia (WMM) support ath11k * Fast Initial Link Setup (FILS) discovery and unsolicited broadcast probe response support * qcom,ath11k-calibration-variant Device Tree setting * cold boot calibration support * new DFS region: JP wnc36xx * enable connection monitoring and keepalive in firmware ath10k * firmware IRAM recovery feature mhi * merge mhi-ath11k-immutable branch to make MHI API change go smoothly * tag 'wireless-drivers-next-2020-12-03' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next: (180 commits) wl1251: remove trailing semicolon in macro definition airo: remove trailing semicolon in macro definition wilc1000: added queue support for WMM wilc1000: call complete() for failure in wilc_wlan_txq_add_cfg_pkt() wilc1000: free resource in wilc_wlan_txq_add_mgmt_pkt() for failure path wilc1000: free resource in wilc_wlan_txq_add_net_pkt() for failure path wilc1000: added 'ndo_set_mac_address' callback support brcmfmac: expose firmware config files through modinfo wlcore: Switch to using the new API kobj_to_dev() rtw88: coex: add feature to enhance HID coexistence performance rtw88: coex: upgrade coexistence A2DP mechanism rtw88: coex: add action for coexistence in hardware initial rtw88: coex: add function to avoid cck lock rtw88: coex: change the coexistence mechanism for WLAN connected rtw88: coex: change the coexistence mechanism for HID rtw88: coex: update AFH information while in free-run mode rtw88: coex: update the mechanism for A2DP + PAN rtw88: coex: add debug message rtw88: coex: run coexistence when WLAN entering/leaving LPS Revert "rtl8xxxu: Add Buffalo WI-U3-866D to list of supported devices" ... ==================== Link: https://lore.kernel.org/r/20201203185732.9CFA5C433ED@smtp.codeaurora.org Signed-off-by: Jakub Kicinski commit 291de1d102fafef0798cdad9666cd4f8da7da7cc Author: DingHua Ma Date: Tue Dec 1 08:10:00 2020 +0800 regulator: axp20x: Fix DLDO2 voltage control register mask for AXP22x When I use the axp20x chip to power my SDIO device on the 5.4 kernel, the output voltage of DLDO2 is wrong. After comparing the register manual and source code of the chip, I found that the mask bit of the driver register of the port was wrong. I fixed this error by modifying the mask register of the source code. This error seems to be a copy error of the macro when writing the code. Now the voltage output of the DLDO2 port of axp20x is correct. My development environment is Allwinner A40I of arm architecture, and the kernel version is 5.4. Signed-off-by: DingHua Ma Reviewed-by: Chen-Yu Tsai Cc: Fixes: db4a555f7c4c ("regulator: axp20x: use defines for masks") Link: https://lore.kernel.org/r/20201201001000.22302-1-dinghua.ma.sz@gmail.com Signed-off-by: Mark Brown commit fdd8b8249ef819958decd9b0ff2c0e52f9d20ae6 Author: Anders Roxell Date: Thu Dec 3 15:43:43 2020 +0100 dpaa_eth: fix build errorr in dpaa_fq_init When building FSL_DPAA_ETH the following build error shows up: /tmp/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c: In function ‘dpaa_fq_init’: /tmp/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c:1135:9: error: too few arguments to function ‘xdp_rxq_info_reg’ 1135 | err = xdp_rxq_info_reg(&dpaa_fq->xdp_rxq, dpaa_fq->net_dev, | ^~~~~~~~~~~~~~~~ Commit b02e5a0ebb17 ("xsk: Propagate napi_id to XDP socket Rx path") added an extra argument to function xdp_rxq_info_reg and commit d57e57d0cd04 ("dpaa_eth: add XDP_TX support") didn't know about that extra argument. Signed-off-by: Anders Roxell Acked-by: Björn Töpel Link: https://lore.kernel.org/r/20201203144343.790719-1-anders.roxell@linaro.org Signed-off-by: Jakub Kicinski commit 2053230af11dc651ee3024682df12668496adad2 Author: Vidya Sagar Date: Thu Dec 3 12:51:10 2020 -0600 PCI/MSI: Set device flag indicating only 32-bit MSI support The MSI-X Capability requires devices to support 64-bit Message Addresses, but the MSI Capability can support either 32- or 64-bit addresses. Previously, we set dev->no_64bit_msi for a few broken devices that advertise 64-bit MSI support but don't correctly support it. In addition, check the MSI "64-bit Address Capable" bit for all devices and set dev->no_64bit_msi for devices that don't advertise 64-bit support. This allows msi_verify_entries() to catch arch code defects that assign 64-bit addresses when they're not supported. The warning is helpful to find defects like the one fixed by https://lore.kernel.org/r/20201117165312.25847-1-vidyas@nvidia.com [bhelgaas: set no_64bit_msi in pci_msi_init(), commit log] Link: https://lore.kernel.org/r/20201124105035.24573-1-vidyas@nvidia.com Link: https://lore.kernel.org/r/20201203185110.1583077-4-helgaas@kernel.org Signed-off-by: Vidya Sagar Signed-off-by: Bjorn Helgaas Reviewed-by: Thierry Reding commit 830dfe88ea37881cbb7d390e90b45611929d5943 Author: Bjorn Helgaas Date: Thu Dec 3 12:51:09 2020 -0600 PCI/MSI: Move MSI/MSI-X flags updaters to msi.c pci_msi_set_enable() and pci_msix_clear_and_set_ctrl() are only used from msi.c, so move them from drivers/pci/pci.h to msi.c. No functional change intended. Link: https://lore.kernel.org/r/20201203185110.1583077-3-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Thierry Reding commit cbc40d5c33af289548d2481e68a38512102cdd3e Author: Bjorn Helgaas Date: Thu Dec 3 12:51:08 2020 -0600 PCI/MSI: Move MSI/MSI-X init to msi.c Move pci_msi_setup_pci_dev(), which disables MSI and MSI-X interrupts, from probe.c to msi.c so it's with all the other MSI code and more consistent with other capability initialization. This means we must compile msi.c always, even without CONFIG_PCI_MSI, so wrap the rest of msi.c in an #ifdef and adjust the Makefile accordingly. No functional change intended. Link: https://lore.kernel.org/r/20201203185110.1583077-2-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Thierry Reding commit b8450e014214982a6df3e62a5bee6c37b94f6b98 Author: Jarkko Nikula Date: Fri Dec 4 10:24:09 2020 +0200 spi: pxa2xx: Add support for Intel Alder Lake PCH-S Add support for LPSS SPI on Intel Alder Lake. It has four LPSS SPI controllers each having two chip selects. Signed-off-by: Jarkko Nikula Link: https://lore.kernel.org/r/20201204082409.183700-1-jarkko.nikula@linux.intel.com Signed-off-by: Mark Brown commit bebb2c6d5ca23d6b7556d39564212b619e068562 Author: Vinod Koul Date: Thu Dec 3 12:42:44 2020 +0530 regulator: qcom-rpmh: Add support for PM8350/PM8350c Add support from RPMH regulators found in PM8350 and PM8350c PMICs Signed-off-by: Vinod Koul Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20201203071244.2652297-2-vkoul@kernel.org Signed-off-by: Mark Brown commit ff7f380d21d0e530c3501a007cec68da6dd4d650 Author: Vinod Koul Date: Thu Dec 3 12:42:43 2020 +0530 regulator: dt-bindings: Add PM8350x compatibles Add PM8350 and PM8350C compatibles for these PMICs found in some Qualcomm platforms. Signed-off-by: Vinod Koul Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20201203071244.2652297-1-vkoul@kernel.org Signed-off-by: Mark Brown commit b4b277760a2167ddb28a309b81363889efd5cc22 Author: Arnd Bergmann Date: Fri Dec 4 17:52:22 2020 +0100 regulator: da9121: include linux/gpio/consumer.h When CONFIG_GPIOLIB is disabled, the declarations from linux/gpio/consumer.h are not visible: drivers/regulator/da9121-regulator.c:371:14: error: implicit declaration of function 'fwnode_gpiod_get_index' [-Werror,-Wimplicit-function-declaration] ena_gpiod = fwnode_gpiod_get_index(of_fwnode_handle(np), "enable", 0, ^ drivers/regulator/da9121-regulator.c:372:7: error: use of undeclared identifier 'GPIOD_OUT_HIGH' GPIOD_OUT_HIGH | ^ drivers/regulator/da9121-regulator.c:373:7: error: use of undeclared identifier 'GPIOD_FLAGS_BIT_NONEXCLUSIVE' GPIOD_FLAGS_BIT_NONEXCLUSIVE, Include this explicitly to help compile testing. Fixes: 46c413d5bb23 ("regulator: da9121: Add support for device variants via devicetree") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20201204165229.3754763-1-arnd@kernel.org Signed-off-by: Mark Brown commit 7e20ae1208daaf6dad85c2dcb968fc590b6f3b99 Author: Srinivas Kandagatla Date: Fri Dec 4 16:42:28 2020 +0000 ASoC: q6afe-clocks: Add missing parent clock rate setting clock rate on child clocks without a parent clock rate will result in zero clk rate for child. This also means that when audio is started dsp will attempt to access registers without enabling clock resulting in board boot up. Fix this by adding the missing parent clock rate. Fixes: 520a1c396d196 ("ASoC: q6afe-clocks: add q6afe clock controller") Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20201204164228.1826-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 1c1fb2653a0c2e3f310c07eacd8fc3a10e08c97a Author: Chuhong Yuan Date: Thu Dec 3 22:42:27 2020 +0800 ASoC: jz4740-i2s: add missed checks for clk_get() jz4740_i2s_set_sysclk() does not check the return values of clk_get(), while the file dereferences the pointers in clk_put(). Add the missed checks to fix it. Fixes: 11bd3dd1b7c2 ("ASoC: Add JZ4740 ASoC support") Signed-off-by: Chuhong Yuan Link: https://lore.kernel.org/r/20201203144227.418194-1-hslester96@gmail.com Signed-off-by: Mark Brown commit aa344bc8b727b47b4350b59d8166216a3f351e55 Author: Sean V Kelley Date: Tue Nov 24 10:55:30 2020 -0600 PCI/ERR: Clear AER status only when we control AER In some cases a bridge may not exist as the hardware controlling may be handled only by firmware and so is not visible to the OS. This scenario is also possible in future use cases involving non-native use of RCECs by firmware. In this scenario, we expect the platform to retain control of the bridge and to clear error status itself. Clear error status only when the OS has native control of AER. Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas commit 05e9ae19ab83881a0f33025bd1288e41e552a34b Author: Sean V Kelley Date: Fri Nov 20 16:10:30 2020 -0800 PCI/ERR: Add pci_walk_bridge() to pcie_do_recovery() Consolidate subordinate bus checks with pci_walk_bus() into pci_walk_bridge() for walking below potentially AER affected bridges. Link: https://lore.kernel.org/r/20201121001036.8560-10-sean.v.kelley@intel.com Tested-by: Jonathan Cameron # non-native/no RCEC Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas commit 3d7d8fc78f4b504819882278fcfe10784eb985fa Author: Sean V Kelley Date: Fri Nov 20 16:10:29 2020 -0800 PCI/ERR: Avoid negated conditional for clarity Reverse the sense of the Root Port/Downstream Port conditional for clarity. No functional change intended. Link: https://lore.kernel.org/r/20201121001036.8560-9-sean.v.kelley@intel.com Tested-by: Jonathan Cameron # non-native/no RCEC Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas Reviewed-by: Kuppuswamy Sathyanarayanan Acked-by: Jonathan Cameron commit 0791721d800790e6e533bd8467df67f0dc4f2fec Author: Sean V Kelley Date: Fri Nov 20 16:10:28 2020 -0800 PCI/ERR: Use "bridge" for clarity in pcie_do_recovery() pcie_do_recovery() may be called with "dev" being either a bridge (Root Port or Switch Downstream Port) or an Endpoint. The bulk of the function deals with the bridge, so if we start with an Endpoint, we reset "dev" to be the bridge leading to it. For clarity, replace "dev" in the body of the function with "bridge". No functional change intended. Link: https://lore.kernel.org/r/20201121001036.8560-8-sean.v.kelley@intel.com Tested-by: Jonathan Cameron # non-native/no RCEC Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas Reviewed-by: Kuppuswamy Sathyanarayanan Acked-by: Jonathan Cameron commit 480ef7cb9fcebda7b28cbed4f6cdcf0a02f4a6ca Author: Sean V Kelley Date: Fri Nov 20 16:10:27 2020 -0800 PCI/ERR: Simplify by computing pci_pcie_type() once Instead of calling pci_pcie_type(dev) twice, call it once and save the result. No functional change intended. Link: https://lore.kernel.org/r/20201121001036.8560-7-sean.v.kelley@intel.com Tested-by: Jonathan Cameron # non-native/no RCEC Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas Acked-by: Jonathan Cameron commit 5d69dcc9f839bd2d5cac7a098712f52149e1673f Author: Sean V Kelley Date: Fri Nov 20 16:10:26 2020 -0800 PCI/ERR: Simplify by using pci_upstream_bridge() Use pci_upstream_bridge() in place of dev->bus->self. No functional change intended. Link: https://lore.kernel.org/r/20201121001036.8560-6-sean.v.kelley@intel.com Tested-by: Jonathan Cameron # non-native/no RCEC Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas Reviewed-by: Kuppuswamy Sathyanarayanan Acked-by: Jonathan Cameron commit 8f1bbfbc3596d401b60d1562b27ec28c2724f60d Author: Sean V Kelley Date: Fri Nov 20 16:10:25 2020 -0800 PCI/ERR: Rename reset_link() to reset_subordinates() reset_link() appears to be misnamed. The point is to reset any devices below a given bridge, so rename it to reset_subordinates() to make it clear that we are passing a bridge with the intent to reset the devices below it. Link: https://lore.kernel.org/r/20201121001036.8560-5-sean.v.kelley@intel.com Tested-by: Jonathan Cameron # non-native/no RCEC Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas Reviewed-by: Kuppuswamy Sathyanarayanan Acked-by: Jonathan Cameron commit 90655631988f8f501529e6de5f13614389717ead Author: Sean V Kelley Date: Fri Nov 20 16:10:24 2020 -0800 PCI/ERR: Cache RCEC EA Capability offset in pci_init_capabilities() Extend support for Root Complex Event Collectors by decoding and caching the RCEC Endpoint Association Extended Capabilities when enumerating. Use that cached information for later error source reporting. See PCIe r5.0, sec 7.9.10. Co-developed-by: Qiuxu Zhuo Link: https://lore.kernel.org/r/20201121001036.8560-4-sean.v.kelley@intel.com Tested-by: Jonathan Cameron # non-native/no RCEC Signed-off-by: Qiuxu Zhuo Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas Reviewed-by: Jonathan Cameron commit c9d659b60770db94b898f94947192a94bbf95c5c Author: Qiuxu Zhuo Date: Fri Nov 20 16:10:23 2020 -0800 PCI/ERR: Bind RCEC devices to the Root Port driver If a Root Complex Integrated Endpoint (RCiEP) is implemented, it may signal errors through a Root Complex Event Collector (RCEC). Each RCiEP must be associated with no more than one RCEC. For an RCEC (which is technically not a Bridge), error messages "received" from associated RCiEPs must be enabled for "transmission" in order to cause a System Error via the Root Control register or (when the Advanced Error Reporting Capability is present) reporting via the Root Error Command register and logging in the Root Error Status register and Error Source Identification register. Given the commonality with Root Ports and the need to also support AER and PME services for RCECs, extend the Root Port driver to support RCEC devices by adding the RCEC Class ID to the driver structure. Co-developed-by: Sean V Kelley Link: https://lore.kernel.org/r/20201121001036.8560-3-sean.v.kelley@intel.com Tested-by: Jonathan Cameron # non-native/no RCEC Signed-off-by: Sean V Kelley Signed-off-by: Qiuxu Zhuo Signed-off-by: Bjorn Helgaas Reviewed-by: Jonathan Cameron Reviewed-by: Kuppuswamy Sathyanarayanan commit a54895fa057c67700270777f7661d8d3c7fda88a Author: Christoph Hellwig Date: Thu Dec 3 17:21:39 2020 +0100 block: remove the request_queue to argument request based tracepoints The request_queue can trivially be derived from the request. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Chaitanya Kulkarni Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit 1c02fca620f7273b597591065d366e2cca948d8f Author: Christoph Hellwig Date: Thu Dec 3 17:21:38 2020 +0100 block: remove the request_queue argument to the block_bio_remap tracepoint The request_queue can trivially be derived from the bio. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Chaitanya Kulkarni Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit eb6f7f7cd3af0f67ce57b21fab1bc64beb643581 Author: Christoph Hellwig Date: Thu Dec 3 17:21:37 2020 +0100 block: remove the request_queue argument to the block_split tracepoint The request_queue can trivially be derived from the bio. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Chaitanya Kulkarni Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit e8a676d61c07eccfcd9d6fddfe4dcb630651c29a Author: Christoph Hellwig Date: Thu Dec 3 17:21:36 2020 +0100 block: simplify and extend the block_bio_merge tracepoint class The block_bio_merge tracepoint class can be reused for most bio-based tracepoints. For that it just needs to lose the superfluous q and rq parameters. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Chaitanya Kulkarni Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit b81b8f40c5b43dcb2ff473236baccc421706435f Author: Christoph Hellwig Date: Thu Dec 3 17:21:35 2020 +0100 block: remove the unused block_sleeprq tracepoint The block_sleeprq tracepoint was only used by the legacy request code. Remove it now that the legacy request code is gone. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Chaitanya Kulkarni Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit 64e8a6ece1a5b1fa21316918053d068baeac84af Author: Md Haris Iqbal Date: Thu Nov 26 11:47:23 2020 +0100 block/rnbd-clt: Dynamically alloc buffer for pathname & blk_symlink_name For every rnbd_clt_dev, we alloc the pathname and blk_symlink_name statically to NAME_MAX which is 255 bytes. In most of the cases we only need less than 10 bytes, so 500 bytes per block device are wasted. This commit dynamically allocates memory buffer for pathname and blk_symlink_name. Signed-off-by: Md Haris Iqbal Signed-off-by: Jack Wang Reviewed-by: Lutz Pogrell Signed-off-by: Jens Axboe commit d3a95ccaaf4df94743a958c90ab85f4703e3a687 Author: Guoqing Jiang Date: Thu Nov 26 11:47:22 2020 +0100 block/rnbd: call kobject_put in the failure path Per the comment of kobject_init_and_add, we need to cleanup the memory by call kobject_put. Also we need to call kobject_del for the other failure cases if the kobject_init_and_add doesn't fail. Signed-off-by: Guoqing Jiang Signed-off-by: Jack Wang Reviewed-by: Md Haris Iqbal Signed-off-by: Jens Axboe commit 765c5c56ffde0a555ce69559ab275395fb1a12a9 Author: Jack Wang Date: Thu Nov 26 11:47:21 2020 +0100 Documentation/ABI/rnbd-srv: add document for force_close describe force_close of device Signed-off-by: Jack Wang Signed-off-by: Jens Axboe commit 786998050cbc8ead32e6e9fcda2facb3bf3d198d Author: Lutz Pogrell Date: Thu Nov 26 11:47:20 2020 +0100 block/rnbd-srv: close a mapped device from server side. The forceful close of an exported device is required for the use case, when the client side hangs, is crashed, or is not accessible. There have been cases observed, where only some of the devices are to be cleaned up, but the session shall remain. When the device is to be exported to a different client host, server side cleanup is required. Signed-off-by: Lutz Pogrell Signed-off-by: Jack Wang Reviewed-by: Gioh Kim Signed-off-by: Jens Axboe commit 7578d5cd1e0fe71736970372fcf96341d69f2234 Author: Gioh Kim Date: Thu Nov 26 11:47:19 2020 +0100 Documentation/ABI/rnbd-clt: session name is appended to the device path When mapping a device, /sys/devices/virtual/rnbd-client/ctl/devices/ was created. But we found out that it had a problem when mapping the same file on different servers. So we append the session name after the device_id as below. /sys/devices/virtual/rnbd-client/ctl/devices/@ Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Signed-off-by: Jens Axboe commit 47479b795490f146ff045ec3ee5a724bbce294f0 Author: Gioh Kim Date: Thu Nov 26 11:47:18 2020 +0100 Documentation/ABI/rnbd-clt: fix typo in sysfs-class-rnbd-client /sys/block/rnbd is created, not /sys/block/rnbd_client/rnbd Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Signed-off-by: Jens Axboe commit 91f4acb2801ce4985483b0fa174bbe995d105417 Author: Guoqing Jiang Date: Thu Nov 26 11:47:17 2020 +0100 block/rnbd-clt: support mapping two devices with the same name from different servers Previously, we can't map same device name from different sessions due to the limitation of sysfs naming mechanism. root@clt2:~# ls -l /sys/class/rnbd-client/ctl/devices/ total 0 lrwxrwxrwx 1 root 0 Sep 2 16:31 !dev!nullb1 -> ../../../block/rnbd0 We only use the device name in above, which caused device with the same name can't be mapped from another server. To address the issue, the sessname is appended to the node to differentiate where the device comes from. Also, we need to check if the pathname is existed in a specific session instead of search it in global sess_list. Signed-off-by: Guoqing Jiang Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Reviewed-by: Md Haris Iqbal Signed-off-by: Jens Axboe commit ce9fe18abb7c86a71b545e1cdd60fe333bf462a3 Author: Md Haris Iqbal Date: Thu Nov 26 11:47:16 2020 +0100 block/rnbd-clt: Make path parameter optional for map_device During map_device if the given session exists, then the path parameter is not used. In such a case, the path parameter is redundant. This commit makes the path parameter optional for map_device. When the path parameter is not given, if the session exists then that is used to establish the rtrs connection. If the session does not exist, and the path parameter is also missing, then map_device fails. Signed-off-by: Md Haris Iqbal Signed-off-by: Jack Wang Signed-off-by: Jens Axboe commit e0efb3168d34dc8c8c72718672b8902e40efff8f Author: Jann Horn Date: Thu Dec 3 03:03:31 2020 +0100 tty: Remove dead termiox code set_termiox() and the TCGETX handler bail out with -EINVAL immediately if ->termiox is NULL, but there are no code paths that can set ->termiox to a non-NULL pointer; and no such code paths seem to have existed since the termiox mechanism was introduced back in commit 1d65b4a088de ("tty: Add termiox") in v2.6.28. Similarly, no driver actually implements .set_termiox; and it looks like no driver ever has. Delete this dead code; but leave the definition of struct termiox in the UAPI headers intact. Signed-off-by: Jann Horn Link: https://lore.kernel.org/r/20201203020331.2394754-1-jannh@google.com Signed-off-by: Greg Kroah-Hartman commit aef1b6a27970607721a618a0b990716ca8dbbf97 Author: Mingrui Ren Date: Wed Dec 2 15:25:43 2020 +0800 tty/serial/imx: Enable TXEN bit in imx_poll_init(). As described in Documentation, poll_init() is called by kgdb to initialize hardware which supports both poll_put_char() and poll_get_char(). It's necessary to enable TXEN bit, otherwise, it will cause hardware fault and kernel panic when calling imx_poll_put_char(). Generally, if use /dev/ttymxc0 as kgdb console as well as system console, ttymxc0 is initialized early by system console which does enable TXEN bit.But when use /dev/ttymxc1 as kgbd console, ttymxc1 is only initialized by imx_poll_init() cannot enable the TXEN bit, which will cause kernel panic. Signed-off-by: Mingrui Ren Link: https://lore.kernel.org/r/20201202072543.151-1-972931182@qq.com Signed-off-by: Greg Kroah-Hartman commit 7af77ba42467da8a4dbfe0dfd0a467227e8fbe5f Author: Clement Smith Date: Wed Dec 2 11:39:16 2020 +0530 tty : serial: jsm: Fixed file by adding spacing Fixed a coding style issue Signed-off-by: Clement Smith Link: https://lore.kernel.org/r/20201202060916.34130-1-rclemsmith@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0b60525b4e88b0ae656b89733f577a76d474f07a Author: Alexander Sverdlin Date: Fri Nov 27 11:19:53 2020 +0100 tty: serial: uartlite: Support probe deferral Give uartlite a chance to be probed when IRQ controller will be finally available and return potential -EPROBE_DEFER as-is. The condition "<=" has been changed to "<" to follow the recommendation in the header of platform_get_irq(). Signed-off-by: Alexander Sverdlin Link: https://lore.kernel.org/r/20201127101953.23700-1-alexander.sverdlin@nokia.com Signed-off-by: Greg Kroah-Hartman commit e3541d5de544da54a1770e9c82c55f2a6f6b3b67 Author: Dan Carpenter Date: Thu Dec 3 11:41:35 2020 +0300 usb: mtu3: mtu3_debug: remove an unused struct member The "nregs" member is not used. The code uses the "regset.nregs" struct member instead. Acked-by: Chunfeng Yun Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/X8ikv1QA3Do50D+R@mwanda Signed-off-by: Greg Kroah-Hartman commit 9dc9c8543aa0b9ef8852330b27cd2eef337bea18 Author: Johan Hovold Date: Fri Dec 4 09:51:10 2020 +0100 USB: core: return -EREMOTEIO on short usb_control_msg_recv() Return -EREMOTEIO instead of -EINVAL on short control transfers when using the new usb_control_msg_recv() helper. EINVAL is used to report invalid arguments (e.g. to the helper) and should not be used for unrelated errors. Many driver currently return -EIO on short control transfers but since host-controller drivers already use -EREMOTEIO for short transfers whenever the URB_SHORT_NOT_OK flag is set, let's use that here as well. This also allows usb_control_msg_recv() to eventually use URB_SHORT_NOT_OK without changing the return value again. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20201204085110.20055-4-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit baf7df456b3848e4b6f8648e754e3a0f77fe700e Author: Johan Hovold Date: Fri Dec 4 09:51:09 2020 +0100 USB: core: drop short-transfer check from usb_control_msg_send() A failure to send a complete control message is always an error so there's no need to check for short transfers in usb_control_msg_send(). Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20201204085110.20055-3-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit a1dd1d86973182458da7798a95f26cfcbea599b4 Merge: 55fd59b003f6e eceae70bdeaeb Author: Jakub Kicinski Date: Fri Dec 4 07:48:11 2020 -0800 Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Alexei Starovoitov says: ==================== pull-request: bpf-next 2020-12-03 The main changes are: 1) Support BTF in kernel modules, from Andrii. 2) Introduce preferred busy-polling, from Björn. 3) bpf_ima_inode_hash() and bpf_bprm_opts_set() helpers, from KP Singh. 4) Memcg-based memory accounting for bpf objects, from Roman. 5) Allow bpf_{s,g}etsockopt from cgroup bind{4,6} hooks, from Stanislav. * https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (118 commits) selftests/bpf: Fix invalid use of strncat in test_sockmap libbpf: Use memcpy instead of strncpy to please GCC selftests/bpf: Add fentry/fexit/fmod_ret selftest for kernel module selftests/bpf: Add tp_btf CO-RE reloc test for modules libbpf: Support attachment of BPF tracing programs to kernel modules libbpf: Factor out low-level BPF program loading helper bpf: Allow to specify kernel module BTFs when attaching BPF programs bpf: Remove hard-coded btf_vmlinux assumption from BPF verifier selftests/bpf: Add CO-RE relocs selftest relying on kernel module BTF selftests/bpf: Add support for marking sub-tests as skipped selftests/bpf: Add bpf_testmod kernel module for testing libbpf: Add kernel module BTF support for CO-RE relocations libbpf: Refactor CO-RE relocs to not assume a single BTF object libbpf: Add internal helper to load BTF data by FD bpf: Keep module's btf_data_size intact after load bpf: Fix bpf_put_raw_tracepoint()'s use of __module_address() selftests/bpf: Add Userspace tests for TCP_WINDOW_CLAMP bpf: Adds support for setting window clamp samples/bpf: Fix spelling mistake "recieving" -> "receiving" bpf: Fix cold build of test_progs-no_alu32 ... ==================== Link: https://lore.kernel.org/r/20201204021936.85653-1-alexei.starovoitov@gmail.com Signed-off-by: Jakub Kicinski commit cf5fbe02042e52a5a3d93223770db39002b313c6 Author: Dan Carpenter Date: Thu Dec 3 11:42:10 2020 +0300 USB: apple-mfi-fastcharge: Fix use after free in probe This code frees "mfi" and then derefences it on the next line to get the error code. Fixes: b0eec52fbe63 ("USB: apple-mfi-fastcharge: Fix kfree after failed kzalloc") Reviewed-by: Bastien Nocera Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/X8ik4j8yJitVUyfU@mwanda Signed-off-by: Greg Kroah-Hartman commit 138f3e1265488a9163be7f379073297ba8545cca Author: Brother Matthew De Angelis Date: Wed Dec 2 20:58:36 2020 -0600 Staging: rtl8723bs/core fix brace coding style issues in rtw_ioctl_set.c Fix all the brace code style warnings found by the checkpatch tool at the following lines: rtw_ioctl_set.c:178: WARNING: braces {} are not necessary for any arm of this statement rtw_ioctl_set.c:219: WARNING: braces {} are not necessary for any arm of this statement rtw_ioctl_set.c:255: WARNING: braces {} are not necessary for any arm of this statement rtw_ioctl_set.c:324: WARNING: braces {} are not necessary for any arm of this statement rtw_ioctl_set.c:372: WARNING: braces {} are not necessary for any arm of this statement rtw_ioctl_set.c:396: WARNING: braces {} are not necessary for any arm of this statement rtw_ioctl_set.c:441: WARNING: braces {} are not necessary for single statement blocks rtw_ioctl_set.c:527: WARNING: braces {} are not necessary for any arm of this statement Signed-off-by: Brother Matthew De Angelis Link: https://lore.kernel.org/r/20201203025836.GA420974@a Signed-off-by: Greg Kroah-Hartman commit 888982a847520a5abfd036a0cc6426c55e71f76c Merge: 9fb3b4cae4e64 4ea6fa2cb921c Author: Greg Kroah-Hartman Date: Fri Dec 4 16:25:17 2020 +0100 Merge tag 'mhi-for-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/mhi into char-misc-next Manivannan writes: MHI patches for v5.11 Here is the MHI patch set for v5.11. Most of the patches are cleanups and fixes but there are some noticeable changes too: 1. Loic finally removed the auto-start option from the channel parameters of the MHI controller. It is the duty of the client drivers like qrtr to start/stop the channels when required, so we decided to remove this option. As a side effect, we changed the qrtr driver to start the channels during its probe and removed the auto-start option from ath11k controller. **NOTE** Since these changes spawns both MHI and networking trees, the patches are maintained in an immutable branch [1] and pulled into both mhi-next and ath11k-next branches. The networking patches got acks from ath11k and networking maintainers as well. 2. Loic added a generic MHI pci controller driver. This driver will be used by the PCI based Qualcomm modems like SDX55 and exposes channels such as QMI, IP_HW0, IPCR etc... 3. Loic fixed the MHI device hierarchy by maintaining the correct parent child relationships. Earlier all MHI devices lived in the same level under the parent device like PCIe. But now, the MHI devices belonging to channels will become the children of controller MHI device. 4. Finally Loic also improved the MHI device naming by using indexed names such as mhi0, mhi1, etc... This will break the userspace applications depending on the old naming convention but since the only one user so far is Jeff Hugo's AI accelerator apps, we decided to make this change now itself with his agreement. 5. Bhaumik fixed the qrtr driver by stopping the channels during remove. This patch also got ack from networking maintainer and we decided to take it through MHI tree (via immutable branch) since we already had a qrtr change. [1] https://git.kernel.org/pub/scm/linux/kernel/git/mani/mhi.git/log/?h=mhi-ath11k-immutable * tag 'mhi-for-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/mhi: (30 commits) mhi: pci_generic: Fix implicit conversion warning bus: mhi: core: Fix error handling in mhi_register_controller() bus: mhi: core: Fix device hierarchy bus: mhi: core: Indexed MHI controller name net: qrtr: Unprepare MHI channels during remove bus: mhi: core: Remove MHI event ring IRQ handlers when powering down bus: mhi: core: Mark and maintain device states early on after power down bus: mhi: core: Separate system error and power down handling bus: mhi: core: Check for IRQ availability during registration bus: mhi: core: Move to an error state on mission mode failure bus: mhi: core: Use appropriate label in firmware load handler API bus: mhi: core: Move to an error state on any firmware load failure bus: mhi: core: Prevent sending multiple RDDM entry callbacks bus: mhi: core: Move to SYS_ERROR regardless of RDDM capability bus: mhi: core: Skip device wake in error or shutdown states bus: mhi: core: Move to using high priority workqueue bus: mhi: core: Use appropriate names for firmware load functions bus: mhi: core: Skip RDDM download for unknown execution environment bus: mhi: core: Rename RDDM download function to use proper words bus: mhi: core: Remove unused mhi_fw_load_worker() declaration ... commit 5812b32e01c6d86ba7a84110702b46d8a8531fe9 Author: Johan Hovold Date: Mon Nov 23 11:23:12 2020 +0100 of: fix linker-section match-table corruption Specify type alignment when declaring linker-section match-table entries to prevent gcc from increasing alignment and corrupting the various tables with padding (e.g. timers, irqchips, clocks, reserved memory). This is specifically needed on x86 where gcc (typically) aligns larger objects like struct of_device_id with static extent on 32-byte boundaries which at best prevents matching on anything but the first entry. Specifying alignment when declaring variables suppresses this optimisation. Here's a 64-bit example where all entries are corrupt as 16 bytes of padding has been inserted before the first entry: ffffffff8266b4b0 D __clk_of_table ffffffff8266b4c0 d __of_table_fixed_factor_clk ffffffff8266b5a0 d __of_table_fixed_clk ffffffff8266b680 d __clk_of_table_sentinel And here's a 32-bit example where the 8-byte-aligned table happens to be placed on a 32-byte boundary so that all but the first entry are corrupt due to the 28 bytes of padding inserted between entries: 812b3ec0 D __irqchip_of_table 812b3ec0 d __of_table_irqchip1 812b3fa0 d __of_table_irqchip2 812b4080 d __of_table_irqchip3 812b4160 d irqchip_of_match_end Verified on x86 using gcc-9.3 and gcc-4.9 (which uses 64-byte alignment), and on arm using gcc-7.2. Note that there are no in-tree users of these tables on x86 currently (even if they are included in the image). Fixes: 54196ccbe0ba ("of: consolidate linker section OF match table declarations") Fixes: f6e916b82022 ("irqchip: add basic infrastructure") Cc: stable # 3.9 Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20201123102319.8090-2-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 62dcd9c59f324e484c1d655884e0101a988f6671 Author: Johan Hovold Date: Mon Nov 23 11:23:13 2020 +0100 earlycon: simplify earlycon-table implementation Instead of using the array-of-pointers trick to avoid having gcc mess up the earlycon array stride, specify type alignment when declaring entries to prevent gcc from increasing alignment. This is essentially an alternative (one-line) fix to the problem addressed by commit dd709e72cb93 ("earlycon: Use a pointer table to fix __earlycon_table stride"). gcc can increase the alignment of larger objects with static extent as an optimisation, but this can be suppressed by using the aligned attribute when declaring variables. Note that we have been relying on this behaviour for kernel parameters for 16 years and it indeed hasn't changed since the introduction of the aligned attribute in gcc-3.1. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20201123102319.8090-3-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 6f56023aea3ac86f4fc8611161affb7f265ff662 Merge: 2a394808580d8 c0d638a03bc5d Author: Ulf Hansson Date: Fri Dec 4 15:36:56 2020 +0100 Merge branch 'fixes' into next commit daa919196be49815e342eb79fab81852102703c2 Author: Johan Hovold Date: Mon Nov 16 17:18:26 2020 +0100 USB: serial: cp210x: clean up dtr_rts() Clean up dtr_rts() by renaming the port parameter and adding missing whitespace. Signed-off-by: Johan Hovold commit ed921771ffb65ce1f65d746fe8f88c0e0a829d76 Author: Johan Hovold Date: Mon Nov 16 17:18:25 2020 +0100 USB: serial: cp210x: refactor flow-control handling Add a helper function to be used to configure flow control. The flow-control code was the last caller that relied on the memset-on-failure behaviour of cp210x_read_reg_block(), which we can now drop in favour of bailing out on errors when retrieving the flow-control settings. This should also simplify adding support for software flow control. Signed-off-by: Johan Hovold commit b339628ec08c51c3445f4b094e0011406fc36344 Author: Johan Hovold Date: Mon Nov 16 17:18:24 2020 +0100 USB: serial: cp210x: drop flow-control debugging Drop some unnecessary flow-control debugging. Signed-off-by: Johan Hovold commit 46827bda2dd635aed8af0a232a8992d1481140d6 Author: Johan Hovold Date: Mon Nov 16 17:18:23 2020 +0100 USB: serial: cp210x: set terminal settings on open Unlike other drivers cp210x have been retrieving the current terminal settings from the device on open and reflecting those in termios. Due to how set_termios() used to be implemented, this saved a few control requests on open but has instead caused problems like broken flow control and has required adding workarounds for swapped line-control in cp2108 and line-speed initialisation on cp2104. This unusual implementation also complicates adding new features for no good reason. Rip out the corresponding code and the above mentioned workarounds and instead initialise the terminal settings unconditionally on open. Signed-off-by: Johan Hovold commit d42976296c3389b556913d249f7c5626b754ec26 Author: Johan Hovold Date: Mon Nov 16 17:18:22 2020 +0100 USB: serial: cp210x: clean up line-control handling Update the line-control settings in one request unconditionally instead of setting the word-length, parity and stop-bit settings separately. This avoids multiple requests when several settings are changed even if this scheme could potentially also be used to detect unsupported device settings. Since all device types but CP2101 appears to support all settings, let's handle that one specifically and also report back the unsupported settings properly through termios by clearing the corresponding bits. Also drop the related unnecessary debug printks. Signed-off-by: Johan Hovold commit 95168d624f3a8dee466525767200391a0fb006b9 Author: Johan Hovold Date: Mon Nov 16 17:18:21 2020 +0100 USB: serial: cp210x: return early on unchanged termios Return early from set_termios() in case no relevant terminal settings have changed. This avoids testing each parameter in turn and specifically allows the line-control handling to be cleaned up further. Signed-off-by: Johan Hovold commit 9716ef046b46a6426b2a11301ea5232fc8cdce63 Author: Felix Fietkau Date: Sat Nov 21 18:23:35 2020 +0100 mt76: attempt to free up more room when filling the tx queue Run dma cleanup immediately if the queue is almost full, instead of waiting for the tx interrupt Signed-off-by: Felix Fietkau commit 5342758d5522dbf8081360be9c8545bac84b80f3 Author: Felix Fietkau Date: Sat Nov 21 16:00:14 2020 +0100 mt76: mt7915: stop queues when running out of tx tokens Avoids packet drops under load with lots of stations Signed-off-by: Felix Fietkau commit 90d494c99a99fa2eb858754345c4a9c851b409a0 Author: Felix Fietkau Date: Sat Nov 21 14:00:47 2020 +0100 mt76: improve tx queue stop/wake Instead of stopping and waking only a single queue, handle all phy tx queues mapped ot the same hardware queue. Also allow the driver to block tx queues Signed-off-by: Felix Fietkau commit d211c003389ade3f8e31d1217c38f056e033d841 Author: Shayne Chen Date: Mon Nov 16 19:45:54 2020 +0800 mt76: mt7915: fix memory leak in mt7915_mcu_get_rx_rate() Free the skb to prevent memory leak. Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 0211c282bc8aaa15343aadbc6e23043e7057f77d Author: Lorenzo Bianconi Date: Wed Nov 18 00:18:18 2020 +0100 mt76: mt7615: fix rdd mcu cmd endianness Similar to mt7915 driver, fix mt7615 radar mcu command endianness Fixes: 2ce73efe0f8e5 ("mt76: mt7615: initialize radar specs from host driver") Fixes: 70911d9638069 ("mt76: mt7615: add radar pattern test knob to debugfs") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit cee236e1489ecca9d23d6ce6f60d126cc651a5ba Author: Felix Fietkau Date: Thu Nov 12 15:23:28 2020 +0100 mt76: mt7915: fix endian issues Multiple MCU messages were using u16/u32 fields without endian annotations or conversions Fixes: e57b7901469f ("mt76: add mac80211 driver for MT7915 PCIe-based chipsets") Fixes: 5517f78b0063 ("mt76: mt7915: enable firmware module debug support") Signed-off-by: Felix Fietkau commit af901eb4ab80e6398a79763a17d662234dab06b6 Author: Lorenzo Bianconi Date: Fri Nov 13 11:11:32 2020 +0100 mt76: mt7915: get rid of dbdc debugfs knob mt7915 automatically detects dbdc feature so drop debugfs knob. Move if_comb, mt7915_rates, if_limits structs and mt7915_regd_notifier(), mt7915_init_wiphy() routines at the begging of init.c in order to make mt7915_register_ext_phy routine static Co-developed-by: Shayne Chen Signed-off-by: Shayne Chen Co-developed-by: Ryder Lee Signed-off-by: Ryder Lee Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 4c430774e01b06337a1aaeabc3f9f62815ed1a58 Author: Lorenzo Bianconi Date: Fri Nov 13 11:11:31 2020 +0100 mt76: mt7915: introduce dbdc support Introduce mt7915 dbdc support. If dbdc is available, mt7915 primary phy will work on 2.4GHz band, while secondary one on 5GHz band. Co-developed-by: Shayne Chen Signed-off-by: Shayne Chen Co-developed-by: Ryder Lee Signed-off-by: Ryder Lee Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 98df2baeb364389948f56d2b235bfc5902d64e01 Author: Lorenzo Bianconi Date: Fri Nov 13 11:11:30 2020 +0100 mt76: move hw mac_addr in mt76_phy This is a preliminary patch to properly support mt7915 dbdc Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit db78a791ca0f0c1d9dc3a00369d6d8c7ce6c3aa8 Author: Lorenzo Bianconi Date: Thu Nov 12 10:56:58 2020 +0100 mt76: move band allocation in mt76_register_phy This is a preliminary patch to introduce dbdc support to mt7915 devices Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 77af762e42f1f959d8a70c17c24accc96d7ee18d Author: Lorenzo Bianconi Date: Thu Nov 12 10:56:57 2020 +0100 mt76: rely on mt76_phy in mt76_init_sband_2g and mt76_init_sband_5g This is a preliminary patch to properly support mt7915 dbdc Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 48dbce5cb1ba3ce5b2ed3e997bcb1e4697d41b71 Author: Lorenzo Bianconi Date: Thu Nov 12 10:56:56 2020 +0100 mt76: move band capabilities in mt76_phy This is a preliminary patch to move properly support mt7915 dbdc Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 91990519298e231bf102f7242d5f483bef5e514a Author: Lorenzo Bianconi Date: Wed Nov 11 14:47:32 2020 +0100 mt76: move tx hw data queues in mt76_phy Move hw data queues in mt76_phy from mt76_dev since mt7915 supports per phy hw queues in dbdc mode Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit e637763b606b7a4512e4324529170b193cbe2848 Author: Lorenzo Bianconi Date: Wed Nov 11 14:47:31 2020 +0100 mt76: move mcu queues to mt76_dev q_mcu array Move mcu queue to a dedicated array q_mcu in mt76_dev structure. This is a preliminary patch to move data queues in mt76_phy and properly support dbdc Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit d95093a14369c71c8b70972853ac051012217072 Author: Lorenzo Bianconi Date: Wed Nov 11 14:47:30 2020 +0100 mt76: rely on mt76_queue in tx_queue_skb_raw signature This is a preliminary patch to move data queues in mt76_phy and properly support dbdc Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit b1cb42add6d60560e21e53bcec63d150cab7e1df Author: Lorenzo Bianconi Date: Wed Nov 11 14:47:29 2020 +0100 mt76: introduce mt76_init_mcu_queue utility routine Introduce mt76_init_mcu_queue utility routine in order to allocate dedicate q_mcu pointers for mcu hw queues. This is a preliminary patch to move data queues in mt76_phy and add dbdc support to mt7915 driver Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 8987059475f503cbf8c5fbb8e8fe537d602bec92 Author: Lorenzo Bianconi Date: Wed Nov 11 14:47:28 2020 +0100 mt76: rely on mt76_queue in tx_queue_skb signature Rely on mt76_queue instead of qid in tx_queue_skb signature. This is a preliminary patch to move data queues in mt76_phy and add dbdc support to mt7915 driver Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit e5655492e33c2e6b83ddb07c75fe91a64f07b8bc Author: Lorenzo Bianconi Date: Wed Nov 11 14:47:27 2020 +0100 mt76: dma: rely on mt76_queue in mt76_dma_tx_cleanup signature This is a preliminary patch to move data queues in mt76_phy and properly support dbdc Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 264b7b19861d39bf01c3c4fcc4c786c28adcce3e Author: Lorenzo Bianconi Date: Wed Nov 11 14:47:26 2020 +0100 mt76: mt7663s: rely on mt76_queue in mt7663s_tx_run_queue signature This is a preliminary patch to move data queues in mt76_phy and properly support dbdc for mt7915 Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit afc2b59cb985b5007666ff0adad29f3457892419 Author: Lorenzo Bianconi Date: Wed Nov 11 14:47:25 2020 +0100 mt76: sdio: rely on mt76_queue in mt76s_process_tx_queue signature This is a preliminary patch to move data queues in mt76_phy and properly support dbdc for mt7915 Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit a2a93548db88b73f5781f4c3df3c757656d50c67 Author: Lorenzo Bianconi Date: Wed Nov 11 14:47:24 2020 +0100 mt76: sdio: introduce mt76s_alloc_tx_queue This is a preliminary patch to move hw data queues in mt76_phy for mt7915 dbdc support Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit b671da33d1c5973f90f098ff66a91953691df582 Author: Lorenzo Bianconi Date: Wed Nov 11 14:47:23 2020 +0100 mt76: move mt76_init_tx_queue in common code Move mt76_init_tx_queue in mac80211.c since it is shared by all drivers. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 3d51a3e993803f1180f1a31ff763b040667ba7c5 Author: Lorenzo Bianconi Date: Tue Nov 10 12:17:37 2020 +0100 mt76: mt7915: rely on eeprom definitions In order to make the code more readable, rely on mt7915_eeprom_field definitions for eeprom parsing Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit d927ebb99d0895fa75fafa540d59336544e8cd02 Author: Lorenzo Bianconi Date: Sun Nov 8 11:27:45 2020 +0100 mt76: mt7615: refactor usb/sdio rate code Since wtbl workqueue is used only for rate handling, refactor code to make it more clear Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit d8d59f66d136bf5d81322fcba261381276e9b094 Author: Ryder Lee Date: Fri Oct 30 01:11:17 2020 +0800 mt76: mt7615: support 16 interfaces When looking for a MAC address slot, start by using main BSSID slots 1-3, afterwards use 16 repeater mode BSSID slots, then start using the slots usually used for AP mode. This search order should prevent unnecessary conflicts with AP mode interfaces on the same PHY. Note that two PHYs share global 32 omac slots with each other. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 802145e2ed2f71e1a29f64d5873e9e71e3495676 Author: Ryder Lee Date: Fri Oct 30 01:11:16 2020 +0800 mt76: mt7915: remove unused mt7915_mcu_bss_sync_tlv() mt7915_mcu_bss_sync_tlv() is no longer used, so remove it. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 4812e0bc379010fff767578cf743ccb4e5783bac Author: Ryder Lee Date: Fri Oct 30 01:11:15 2020 +0800 mt76: mt7915: use BIT_ULL for omac_idx The omac_idx variable is u64 so we should use the 64-bit BIT_ULL(). Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 078b6d21b89ad3c3dd323f845c354ee536d03f5d Author: Lorenzo Bianconi Date: Sun Oct 25 11:56:16 2020 +0100 mt76: mt7915: make mt7915_eeprom_read static Make mt7915_eeprom_read routine static since it is used only in eeprom.c Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit ed3c9072fa4f8f23608e1705dd2bc704725da585 Author: Shayne Chen Date: Thu Oct 22 10:28:20 2020 +0800 mt76: mt7915: add support to set tx frequency offset in testmode Support to set tx frequency offset in testmode, which is usally used in the pre-calibration stage. Reviewed-by: Ryder Lee Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit e0852d9083fa1a96aec2d3b7492f913c7371f75c Author: Shayne Chen Date: Thu Oct 22 10:28:19 2020 +0800 mt76: mt7915: add support to set txpower in testmode Support tx_power setting in testmode. Note that the tx power value of antenna 1-3 equal to antenna 0. Reviewed-by: Ryder Lee Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 5d8a83f099413432629e613a98e6cbcd12a02e5c Author: Shayne Chen Date: Thu Oct 22 10:28:18 2020 +0800 mt76: mt7915: implement testmode rx support Support testmode rx and display rx statistic by parsing RXV packet type, which is currently only enabled in testmode. Reviewed-by: Ryder Lee Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit aadf09537c575db5c9c19b0f3e98f6c569015073 Author: Shayne Chen Date: Thu Oct 22 10:28:17 2020 +0800 mt76: mt7915: implement testmode tx support Support testmode tx for MT7915A, including tx streams and HE rate settings. Reviewed-by: Ryder Lee Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 61fe73577d1797477cc6ceb05a013ccd3a4f8dba Author: Shayne Chen Date: Thu Oct 22 10:28:16 2020 +0800 mt76: testmode: add support for HE rate modes Extend enum mt76_testmode_tx_mode to support various HE rate modes. Reviewed-by: Ryder Lee Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit c31d94af18437a46c38f5c015e4c22f198ef6cf9 Author: Shayne Chen Date: Thu Oct 22 10:28:15 2020 +0800 mt76: mt7915: fix tx rate related fields in tx descriptor Correct the bitfields of tx rateval and bw in tx descriptor. Reviewed-by: Ryder Lee Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 1a38c2f5356a0af24bb121b9ff53d6a7049b4ac7 Author: Shayne Chen Date: Thu Oct 22 10:28:14 2020 +0800 mt76: testmode: add support for LTF and GI combinations for HE mode Prepare for setting different LTF (1x, 2x, and 4x) and GI (0.8us, 1.6us, 3.2us) combinations in HE rate mode. Reviewed-by: Ryder Lee Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 7f54c7425d8f4ce13fbe92ad0763ef457996f6c9 Author: Shayne Chen Date: Thu Oct 22 10:28:13 2020 +0800 mt76: testmode: add tx_rate_stbc parameter Add the parameter to control STBC function in testmode. Reviewed-by: Ryder Lee Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 0922999223583d0efa694b06a4d0a0ac62801493 Author: Shayne Chen Date: Thu Oct 22 10:28:12 2020 +0800 mt76: testmode: add snr attribute in rx statistics Support to display snr value when dumping rx statistics. Reviewed-by: Ryder Lee Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 8248bb58e2f1093ddccb9b2768412dc2b5abd286 Author: Shayne Chen Date: Thu Oct 22 10:28:11 2020 +0800 mt76: testmode: switch ib and wb rssi to array type for per-antenna report Change ib_rssi and wb_rssi into array type, since they could be reported by per-antenna. Reviewed-by: Ryder Lee Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 9daf27e62852d68c6ffc2c21090238ea51bb0a7f Author: Lorenzo Bianconi Date: Tue Oct 20 11:13:11 2020 +0200 mt76: mt76u: use dedicated thread for status work Split tx and status path in mt76-usb module relying on mt76 workers APIs Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit be83a7e20c5735d3a687db92e9fe9db944dead20 Author: Lorenzo Bianconi Date: Tue Oct 20 11:13:10 2020 +0200 mt76: mt76u: rely on woker APIs for rx work In order to improve parallelism, convert rx path in mt76-usb module to mt76 workers APIs Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit faa72684b42986b7f5b29236864b6bce2baa7e6f Author: Lorenzo Bianconi Date: Tue Oct 20 10:03:17 2020 +0200 mt76: mt7615: run key configuration in mt7615_set_key for usb/sdio devices Since rate configuration is run holding dev mutex, we can run key configuration in mt7615_set_key for usb/sdio devices avoiding to schedule the workqueue Tested-by: Tested-by: YN Chen Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 930e0eaddf810cfa90e114a0df02f48539e1346f Author: Lorenzo Bianconi Date: Sat Oct 17 17:15:25 2020 +0200 mt76: fix tkip configuration for mt7615/7663 devices Fix Tx-Rx MIC overwrite during TKIP hw key configuration Fixes: 01cfc1b45421 ("mt76: mt7615: add BIP_CMAC_128 cipher support") Tested-by: YN Chen Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit d3a5d89ea9d40ad82858c8cf09dd885ff811d62f Author: Lorenzo Bianconi Date: Sat Oct 17 11:43:35 2020 +0200 mt76: switch to wep sw crypto for mt7615/mt7915 Switch to wep sw crypto for mt7615/mt7915 since wtbl require a sta reference and wep key is not pairwise Tested-by: YN Chen Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 406d99dfe21fe7c29b2e58e9eab8a182b604f09d Author: Sean Wang Date: Fri Oct 16 08:26:42 2020 +0800 mt76: mt7663s: introduce WoW support via GPIO SDIO-based WiFi would rely on an additional GPIO pin to wake up the host. Co-developed-by: YN Chen Signed-off-by: YN Chen Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit 3cb43b66060a5620cb1878668740c799235ad463 Author: Lorenzo Bianconi Date: Wed Oct 14 12:03:58 2020 +0200 mt76: move mt76_mcu_send_firmware in common module Move mt76_mcu_send_firmware routine in common code since it is actually shared between mt7615, mt7663, mt7603 and mt7915 devices Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit bf4a938ab2cf854ed17f134e89e8aeff27c027f3 Author: David Bauer Date: Tue Oct 13 16:23:26 2020 +0200 mt76: mt7603: add additional EEPROM chip ID Some newer MT7628 based routers (notably the TP-Link Archer C50 v4) are shipped with a chip-id of 0x7600 in the on-flash EEPROM. Add this as a possible valid ID. Ref: https://bugs.openwrt.org/index.php?do=details&task_id=2781 Suggested-by: Ron Asimi Signed-off-by: David Bauer Signed-off-by: Felix Fietkau commit bc348defcc6eceeb4f7784bf9a263ddb72fd3fb4 Author: Lorenzo Bianconi Date: Tue Oct 13 10:33:49 2020 +0200 mt76: fix memory leak if device probing fails Run mt76_free_device instead of ieee80211_free_hw if device probing fails in order to remove the already allocated mt76 workqueue Fixes: a86f1d01f5ce5 ("mt76: move mt76 workqueue in common code") Fixes: f1d962369d568 ("mt76: mt7915: implement HE per-rate tx power support") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 468cc93be797301a99a95ac687f4ba5d749d02ba Author: Ryder Lee Date: Tue Oct 13 00:21:21 2020 +0800 mt76: mt7915: fix sparse warning cast from restricted __le16 drivers/net/wireless/mediatek/mt76/mt7915/init.c:339:26: sparse: sparse: cast from restricted __le16 Fixes: 00b2e16e0063 ("mt76: mt7915: add TxBF capabilities") Reported-by: kernel test robot Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 2a394808580d847c1af2c1e431255e32bfb0ae33 Author: Michal Simek Date: Wed Dec 2 14:16:31 2020 +0100 dt-bindings: mmc: Fix xlnx,mio-bank property values for arasan driver Xilinx ZynqMP has 3 mio banks and all of them are valid. That's why also list the first one which is missing. Property is enumeration not range. Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/5fa17dfe4b42abefd84b4cbb7b8bcd4d31398f40.1606914986.git.michal.simek@xilinx.com Signed-off-by: Ulf Hansson commit 9fb3b4cae4e64ed2520cf52fb6820f01185ba965 Merge: 907d4ad59904a 2a211904aca6e Author: Greg Kroah-Hartman Date: Fri Dec 4 14:11:20 2020 +0100 Merge tag 'icc-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-misc-next Georgi writes: interconnect changes for 5.11 Here are the interconnect changes for the 5.10-rc1 merge window consisting of new driver and a cleanup. Driver changes: - New driver for Samsung Exynos SoCs - Misc cleanups Signed-off-by: Georgi Djakov * tag 'icc-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc: MAINTAINERS: Add entry for Samsung interconnect drivers interconnect: Add generic interconnect driver for Exynos SoCs interconnect: qcom: Simplify the vcd compare function commit a925b5e309c9b998658a6a94dbb53154ea901299 Author: Leon Romanovsky Date: Thu Oct 8 16:06:37 2020 +0300 net/mlx5: Register mlx5 devices to auxiliary virtual bus Create auxiliary devices under new virtual bus. This will replace the custom-made mlx5 ->add()/->remove() interfaces and next patches will fill the missing callback and remove the old interface logic. The attachment of auxiliary drivers to the devices is possible in 1-to-1 manner only and it requires us to create device for every protocol, so that device (module) will be able to connect to it. System with 2 IB and 1 RoCE cards: [leonro@vm ~]$ lspci |grep nox 00:09.0 Ethernet controller: Mellanox Technologies MT27800 Family [ConnectX-5] 00:0a.0 Ethernet controller: Mellanox Technologies MT28908 Family [ConnectX-6] 00:0b.0 Ethernet controller: Mellanox Technologies MT2910 Family [ConnectX-7] [leonro@vm ~]$ ls -l /sys/bus/auxiliary/devices/ mlx5_core.eth.2 -> ../../../devices/pci0000:00/0000:00:0b.0/mlx5_core.eth.2 mlx5_core.rdma.0 -> ../../../devices/pci0000:00/0000:00:09.0/mlx5_core.rdma.0 mlx5_core.rdma.1 -> ../../../devices/pci0000:00/0000:00:0a.0/mlx5_core.rdma.1 mlx5_core.rdma.2 -> ../../../devices/pci0000:00/0000:00:0b.0/mlx5_core.rdma.2 mlx5_core.vdpa.1 -> ../../../devices/pci0000:00/0000:00:0a.0/mlx5_core.vdpa.1 mlx5_core.vdpa.2 -> ../../../devices/pci0000:00/0000:00:0b.0/mlx5_core.vdpa.2 [leonro@vm ~]$ rdma dev 0: ibp0s9: node_type ca fw 4.6.9999 node_guid 5254:00c0:fe12:3455 sys_image_guid 5254:00c0:fe12:3455 1: ibp0s10: node_type ca fw 4.6.9999 node_guid 5254:00c0:fe12:3456 sys_image_guid 5254:00c0:fe12:3456 2: rdmap0s11: node_type ca fw 4.6.9999 node_guid 5254:00c0:fe12:3457 sys_image_guid 5254:00c0:fe12:3457 System with RoCE SR-IOV card with 4 VFs: [leonro@vm ~]$ lspci |grep nox 01:00.0 Ethernet controller: Mellanox Technologies MT28908 Family [ConnectX-6] 01:00.1 Ethernet controller: Mellanox Technologies MT28908 Family [ConnectX-6 Virtual Function] 01:00.2 Ethernet controller: Mellanox Technologies MT28908 Family [ConnectX-6 Virtual Function] 01:00.3 Ethernet controller: Mellanox Technologies MT28908 Family [ConnectX-6 Virtual Function] 01:00.4 Ethernet controller: Mellanox Technologies MT28908 Family [ConnectX-6 Virtual Function] [leonro@vm ~]$ ls -l /sys/bus/auxiliary/devices/ mlx5_core.eth.0 -> ../../../devices/pci0000:00/0000:00:09.0/0000:01:00.0/mlx5_core.eth.0 mlx5_core.eth.1 -> ../../../devices/pci0000:00/0000:00:09.0/0000:01:00.1/mlx5_core.eth.1 mlx5_core.eth.2 -> ../../../devices/pci0000:00/0000:00:09.0/0000:01:00.2/mlx5_core.eth.2 mlx5_core.eth.3 -> ../../../devices/pci0000:00/0000:00:09.0/0000:01:00.3/mlx5_core.eth.3 mlx5_core.eth.4 -> ../../../devices/pci0000:00/0000:00:09.0/0000:01:00.4/mlx5_core.eth.4 mlx5_core.rdma.0 -> ../../../devices/pci0000:00/0000:00:09.0/0000:01:00.0/mlx5_core.rdma.0 mlx5_core.rdma.1 -> ../../../devices/pci0000:00/0000:00:09.0/0000:01:00.1/mlx5_core.rdma.1 mlx5_core.rdma.2 -> ../../../devices/pci0000:00/0000:00:09.0/0000:01:00.2/mlx5_core.rdma.2 mlx5_core.rdma.3 -> ../../../devices/pci0000:00/0000:00:09.0/0000:01:00.3/mlx5_core.rdma.3 mlx5_core.rdma.4 -> ../../../devices/pci0000:00/0000:00:09.0/0000:01:00.4/mlx5_core.rdma.4 mlx5_core.vdpa.1 -> ../../../devices/pci0000:00/0000:00:09.0/0000:01:00.1/mlx5_core.vdpa.1 mlx5_core.vdpa.2 -> ../../../devices/pci0000:00/0000:00:09.0/0000:01:00.2/mlx5_core.vdpa.2 mlx5_core.vdpa.3 -> ../../../devices/pci0000:00/0000:00:09.0/0000:01:00.3/mlx5_core.vdpa.3 mlx5_core.vdpa.4 -> ../../../devices/pci0000:00/0000:00:09.0/0000:01:00.4/mlx5_core.vdpa.4 [leonro@vm ~]$ rdma dev 0: rocep1s0f0: node_type ca fw 4.6.9999 node_guid 5254:00c0:fe12:3455 sys_image_guid 5254:00c0:fe12:3455 1: rocep1s0f0v0: node_type ca fw 4.6.9999 node_guid 0000:0000:0000:0000 sys_image_guid 5254:00c0:fe12:3456 2: rocep1s0f0v1: node_type ca fw 4.6.9999 node_guid 0000:0000:0000:0000 sys_image_guid 5254:00c0:fe12:3457 3: rocep1s0f0v2: node_type ca fw 4.6.9999 node_guid 0000:0000:0000:0000 sys_image_guid 5254:00c0:fe12:3458 4: rocep1s0f0v3: node_type ca fw 4.6.9999 node_guid 0000:0000:0000:0000 sys_image_guid 5254:00c0:fe12:3459 Signed-off-by: Leon Romanovsky commit 0aae392bea4da1a2a9f2e22683c0fa751dc07333 Author: Leon Romanovsky Date: Tue Oct 6 12:34:25 2020 +0300 vdpa/mlx5: Make hardware definitions visible to all mlx5 devices Move mlx5_vdpa IFC header file to the general include folder, so mlx5_core will be able to reuse it to check if VDPA is supported prior to creating an auxiliary device. As part of this move, update the header file name to mlx5 general naming scheme. Reviewed-by: Parav Pandit Signed-off-by: Leon Romanovsky commit 17a7612b99e66d2539341ab4f888f970c2c7f76d Author: Leon Romanovsky Date: Sun Oct 4 14:30:58 2020 +0300 net/mlx5_core: Clean driver version and name Remove exposed driver version as it was done in other drivers, so module version will work correctly by displaying the kernel version for which it is compiled. And move mlx5_core module name to general include, so auxiliary drivers will be able to use it as a basis for a name in their device ID tables. Reviewed-by: Parav Pandit Reviewed-by: Roi Dayan Signed-off-by: Leon Romanovsky commit 907af0f0cab4ee5d5604f182ecec2c5b5119d294 Author: Leon Romanovsky Date: Thu Oct 15 14:52:00 2020 +0300 net/mlx5: Properly convey driver version to firmware mlx5 firmware expects driver version in specific format X.X.X, so make it always correct and based on real kernel version aligned with the driver. Fixes: 012e50e109fd ("net/mlx5: Set driver version into firmware") Signed-off-by: Leon Romanovsky commit 5f0ce5848733b86deaba1c6d102e20479230b20a Author: Lorenzo Bianconi Date: Mon Oct 12 00:43:55 2020 +0200 mt76: dma: fix possible deadlock running mt76_dma_cleanup Fix the following possible deadlock reported by lockdep disabling BH running mt76_free_pending_txwi() ================================ WARNING: inconsistent lock state 5.9.0-rc6 #14 Not tainted -------------------------------- inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. rmmod/1227 [HC0[0]:SC0[0]:HE1:SE1] takes: ffff888156a83530 (&dev->lock#2){+.?.}-{2:2}, at: mt76_dma_cleanup+0x125/0x150 [mt76] {IN-SOFTIRQ-W} state was registered at: __lock_acquire+0x20c/0x6b0 lock_acquire+0x9d/0x220 _raw_spin_lock+0x2c/0x70 mt76_dma_tx_cleanup+0xc7/0x200 [mt76] mt76x02_poll_tx+0x31/0xb0 [mt76x02_lib] napi_poll+0x3a/0x100 net_rx_action+0xa8/0x200 __do_softirq+0xc4/0x430 asm_call_on_stack+0xf/0x20 do_softirq_own_stack+0x49/0x60 irq_exit_rcu+0x9a/0xd0 common_interrupt+0xa4/0x190 asm_common_interrupt+0x1e/0x40 irq event stamp: 9915 hardirqs last enabled at (9915): [] __free_pages_ok+0x336/0x3b0 hardirqs last disabled at (9914): [] __free_pages_ok+0x2fe/0x3b0 softirqs last enabled at (9912): [] mt76_dma_rx_cleanup+0xa2/0x120 [mt76] softirqs last disabled at (9846): [] mt76_dma_rx_cleanup+0x1a/0x120 [mt76] other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&dev->lock#2); lock(&dev->lock#2); *** DEADLOCK *** 1 lock held by rmmod/1227: #0: ffff88815b5eb240 (&dev->mutex){....}-{3:3}, at: driver_detach+0xb5/0x110 stack backtrace: CPU: 1 PID: 1227 Comm: rmmod Kdump: loaded Not tainted 5.9.0-rc6-wdn-src+ #14 Hardware name: Dell Inc. Studio XPS 1340/0K183D, BIOS A11 09/08/2009 Call Trace: dump_stack+0x77/0xa0 mark_lock_irq.cold+0x15/0x39 mark_lock+0x1fc/0x500 mark_usage+0xc7/0x140 __lock_acquire+0x20c/0x6b0 ? find_held_lock+0x2b/0x80 ? sched_clock_cpu+0xc/0xb0 lock_acquire+0x9d/0x220 ? mt76_dma_cleanup+0x125/0x150 [mt76] _raw_spin_lock+0x2c/0x70 ? mt76_dma_cleanup+0x125/0x150 [mt76] mt76_dma_cleanup+0x125/0x150 [mt76] mt76x2_cleanup+0x5a/0x70 [mt76x2e] mt76x2e_remove+0x18/0x30 [mt76x2e] pci_device_remove+0x36/0xa0 __device_release_driver+0x16c/0x220 driver_detach+0xcf/0x110 bus_remove_driver+0x56/0xca pci_unregister_driver+0x36/0x80 __do_sys_delete_module.constprop.0+0x127/0x200 ? syscall_enter_from_user_mode+0x1d/0x50 ? trace_hardirqs_on+0x1c/0xe0 do_syscall_64+0x33/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7ff0da54e36b Code: 73 01 c3 48 8b 0d 2d 0b 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa b8 b0 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d fd 0a 0c 00 f7 d8 64 89 01 48 Fixes: dd57a95cfddc ("mt76: move txwi handling code to dma.c, since it is mmio specific") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit f9df085ce1be5c599e4df590ff7ba853786c6d95 Author: Taehee Yoo Date: Thu Oct 8 15:51:56 2020 +0000 mt76: set fops_tx_stats.owner to THIS_MODULE If THIS_MODULE is not set, the module would be removed while debugfs is being used. It eventually makes kernel panic. Fixes: e57b7901469f ("mt76: add mac80211 driver for MT7915 PCIe-based chipsets") Signed-off-by: Taehee Yoo Signed-off-by: Felix Fietkau commit e4c5ead632ffd87fc387f306b9e622fe52e97e5a Author: Ryder Lee Date: Fri Oct 9 00:57:36 2020 +0800 mt76: mt7915: rename mt7915_mcu_get_rate_info to mt7915_mcu_get_tx_rate Avoid confusion with rx rate query function. Signed-off-by: Ryder Lee Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 405130869599bf85bbb0480fb51e778ca99517f3 Author: Ryder Lee Date: Fri Oct 9 00:57:35 2020 +0800 mt76: mt7915: update ppe threshold Update ppe_thresh capability to sync SDK setting. Signed-off-by: Shayne Chen Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 5efbe3b1b8992d5f837388091920945c23212159 Author: Taehee Yoo Date: Thu Oct 8 15:51:57 2020 +0000 mt76: mt7915: set fops_sta_stats.owner to THIS_MODULE If THIS_MODULE is not set, the module would be removed while debugfs is being used. It eventually makes kernel panic. Fixes: ec9742a8f38e ("mt76: mt7915: add .sta_add_debugfs support") Signed-off-by: Taehee Yoo Signed-off-by: Felix Fietkau commit 5ee3e780cf26ff07948a1447d840659408988d2c Author: Allen Pais Date: Wed Oct 7 16:03:07 2020 +0530 wireless: mt76: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: Felix Fietkau commit 30578752f250aeddedf68b1deed4580125fc2517 Author: Lorenzo Bianconi Date: Tue Oct 6 14:00:01 2020 +0200 mt76: sdio: get rid of sched.lock sched quota is now updated in mt7663s_txrx_worker so there is no more need of sched.lock mutex Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 1c79a190e94325e01811f653f770a34e816fdd8f Author: Lorenzo Bianconi Date: Mon Oct 5 17:22:23 2020 +0200 mt76: mt7663s: fix a possible ple quota underflow Properly account current consumed ple quota in mt7663s_tx_pick_quota routine and avoid possible underflow. Fixes: 6ef2d665f64d ("mt76: mt7663s: split mt7663s_tx_update_sched in mt7663s_tx_{pick,update}_quota") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 80dda1ed4908704d5e6847f9835ceee0bb00b2d4 Author: Lorenzo Bianconi Date: Mon Oct 5 13:36:31 2020 +0200 mt76: mt7663s: get rid of mt7663s_sta_add Get rid of mt7663s_sta_add routine and rely on mt7615_mac_sta_add since sched quota is already initialized in mt7663s_mcu_init_sched routine Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 2f89ab5db6bab3219a66032fc41057e0a5d00ee2 Author: Lorenzo Bianconi Date: Mon Oct 5 10:18:33 2020 +0200 mt76: mt7615: introduce quota debugfs node for mt7663s Add sched_quota debugfs node for mt7663s. Scheduling quota stats are useful for debugging Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 7124198ab1a48ac1f29766aeba76cb176905b348 Author: Lorenzo Bianconi Date: Wed Sep 30 10:57:15 2020 +0200 mt76: mt7615: enable beacon filtering by default for offload fw In order to reduce cpu cycles, enable hw beacon filter by default if the device is running offload fw with sta only interfaces. Disable runtime pm for multi-vif scenario. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit ed89b89330b521f20682ead6bf93e1014b21a200 Author: Felix Fietkau Date: Sat Oct 10 15:20:18 2020 +0200 mt76: add back the SUPPORTS_REORDERING_BUFFER flag It was accidentally dropped while adding multiple wiphy support Fixes fast-rx support and avoids handling reordering in both mac80211 and the driver Cc: stable@vger.kernel.org Fixes: c89d36254155 ("mt76: add function for allocating an extra wiphy") Signed-off-by: Felix Fietkau commit 11553d88d0b99bdde4687b0096eea2c9809301a0 Author: Felix Fietkau Date: Wed Sep 30 11:39:04 2020 +0200 mt76: mt7915: query station rx rate from firmware When per-packet rate reporting is enabled, the hardware can get stuck under some conditions. It self-recovers quickly, but in practice this leads to reduced performance. In order to avoid running into this issue, disable per-packet rate reporting by default and query the rx rate from firmware instead, unless monitor mode is enabled. Signed-off-by: Felix Fietkau commit 99de49fc6f73f68157d946297370fb04f64bfe81 Author: Felix Fietkau Date: Wed Sep 30 05:45:46 2020 +0200 mt76: mt7915: move eeprom parsing out of mt7915_mcu_parse_response Use the new mt76_mcu_send_and_get_msg function Signed-off-by: Felix Fietkau commit ae5ad6272d25775944e7cbab15a5020107bab56e Author: Felix Fietkau Date: Wed Sep 30 05:03:21 2020 +0200 mt76: implement functions to get the response skb for MCU calls Can be used by the caller to get the response data directly instead of using the hack of storing the result in internal data structures from .mcu_parse_response Signed-off-by: Felix Fietkau commit 14b80ba24592d1db67fae8af7e1375d29d580deb Author: Felix Fietkau Date: Wed Sep 30 04:51:03 2020 +0200 mt76: mt7603: switch to .mcu_skb_send_msg Reduces code duplication Signed-off-by: Felix Fietkau commit 64537a02131712a3b2f596c8a5785a8f3c0b6c47 Author: Felix Fietkau Date: Wed Sep 30 04:46:43 2020 +0200 mt76: make mcu_ops->mcu_send_msg optional Remove it from mt7615 and mt7915 and implement it in core code instead Signed-off-by: Felix Fietkau commit e452c6eb55fbfd21eef6e95f63a0265655d5b677 Author: Felix Fietkau Date: Wed Sep 30 04:35:11 2020 +0200 mt76: move waiting and locking out of mcu_ops->mcu_skb_send_msg This removes some code duplication and prepares the code for making the MCU API more flexible Signed-off-by: Felix Fietkau commit 96a607b643e2d81351a9de584928928d3e54f395 Author: Felix Fietkau Date: Wed Sep 30 04:01:01 2020 +0200 mt76: move mcu timeout handling to .mcu_parse_response Preparation for further cleanup Signed-off-by: Felix Fietkau commit f320d812b7bbd30abb5699971051e8b494df6278 Author: Felix Fietkau Date: Wed Sep 30 03:53:59 2020 +0200 mt76: implement .mcu_parse_response in struct mt76_mcu_ops Do not free skb inside that function Preparation for further cleanup Signed-off-by: Felix Fietkau commit fa62d0e0080bca76288b5184bbc2e04f5709b069 Author: Felix Fietkau Date: Wed Sep 30 03:10:52 2020 +0200 mt76: rename __mt76_mcu_skb_send_msg to mt76_mcu_skb_send_msg Preparation for further cleanup Signed-off-by: Felix Fietkau commit cb5cdd4c8d3304965f157c7e9174193e47b58b1d Author: Felix Fietkau Date: Wed Sep 30 03:09:19 2020 +0200 mt76: rename __mt76_mcu_send_msg to mt76_mcu_send_msg Preparation for further cleanup Signed-off-by: Felix Fietkau commit 9b60eb90a1156f2286dac5b381fbb7d798302723 Author: Felix Fietkau Date: Tue Sep 29 08:48:19 2020 +0200 mt76: mt7915: disable OFDMA/MU-MIMO UL The feature is not ready in firmware yet, and it leads to hangs Signed-off-by: Felix Fietkau commit bfff24de19ca1b143c87a21413c472d1bcb9cd90 Author: Felix Fietkau Date: Mon Sep 28 15:14:50 2020 +0200 mt76: mt7915: fix DRR sta bss group index The firmware/hardware supports only 16 entries. Trying to use more can lead to timeouts on some firmware versions Signed-off-by: Felix Fietkau commit 660915d052c6063be4dde3a423e4a8c2de4cab07 Author: Felix Fietkau Date: Tue Sep 1 17:46:19 2020 +0200 mt76: mt7915: use napi_consume_skb to bulk-free tx skbs Slightly improves performance Signed-off-by: Felix Fietkau commit 6425791d350301b50f5e0332007723de7710d07e Author: Felix Fietkau Date: Sun Sep 27 16:36:25 2020 +0200 mt76: mt7915: fix processing txfree events In the MT7915 info, the fields for the WLAN index / queue overlap with the token id, and the MT_TX_FREE_PAIR bit indicates, which one is present. If MT_TX_FREE_PAIR is set, skip processing the token index, since the data will not be valid. This fixes accidentally freeing tokens which are still in use by the hardware with a wrong station pointer. Signed-off-by: Felix Fietkau commit 8aa2c6f4714ecccbf1e149c6ff2fde5284e03be7 Author: Felix Fietkau Date: Sat Sep 26 22:40:41 2020 +0200 mt76: mt7915: support 32 station interfaces When looking for a MAC address slot, start by using main BSSID slots 1-3, afterwards use 16 repeater mode BSSID slots, then start using the slots usually used for AP mode. This search order should prevent unnecessary conflicts with AP mode interfaces on the same PHY Signed-off-by: Felix Fietkau commit 7af1ae62dd77ef4ed84b26681d4da1774f99f680 Author: Felix Fietkau Date: Sat Sep 26 22:39:31 2020 +0200 mt76: do not set NEEDS_UNIQUE_STA_ADDR for 7615 and 7915 The newer chipsets can deal with the same STA on multiple interfaces Preparation for supporting more station interfaces Signed-off-by: Felix Fietkau commit d22da02842e284eecd37dd5fdb2390206392e8b2 Author: Felix Fietkau Date: Fri Sep 25 15:56:49 2020 +0200 mt76: mt7615: add debugfs knob for setting extended local mac addresses This is primarily for testing and can be used in combination with monitor mode to make the card respond to packets sent to a specific MAC address. For now this is only exposed as a debug/testing feature, later on the approach might be used to support more concurrent station interfaces Signed-off-by: Felix Fietkau commit 3298b1f866fb410710547f5dc9cfff408b9de21d Author: Felix Fietkau Date: Sat Jul 25 19:03:17 2020 +0200 mt76: use ieee80211_rx_list to pass frames to the network stack as a batch Improves icache footprint Signed-off-by: Felix Fietkau commit e151d71e503d032ba0fea5afe5fced5639143856 Author: Felix Fietkau Date: Fri Aug 21 08:42:46 2020 +0200 mt76: mt7915: add encap offload for 4-address mode stations Enable MWDS mode in firmware as well and fix txp->rept_wds_wcid for wcid >= 255 Signed-off-by: Felix Fietkau commit 55f7c9b02790d2436ddbac5e6f8205ec9fa21b12 Author: Felix Fietkau Date: Mon Aug 17 07:30:54 2020 +0200 mt76: mt7915: add 802.11 encap offload support It is currently limited to 3-address mode AP and STA interfaces Signed-off-by: Felix Fietkau commit 6a618acb7e623eb721b21b129a52439d323b75f1 Author: Lorenzo Bianconi Date: Sat Sep 26 17:06:25 2020 +0200 mt76: sdio: convert {status/net}_work to mt76_worker In order to improve driver throughput, convert status_work and net_work to mt76 worker APIs. Remove txrx_wq sdio workqueue since it is no longer used Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 1a3efbcc4281f2fbe602e67d7b7dfe64da818af9 Author: Lorenzo Bianconi Date: Sat Sep 26 17:06:24 2020 +0200 mt76: mt7663s: disable interrupt during txrx_worker processing In order to reduce sdio bus contention, disable interrupts during txrx_worker processing Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit fefb584d460a17ac68e0b03f0dbb57beb142d1d9 Author: Lorenzo Bianconi Date: Sat Sep 26 17:06:23 2020 +0200 mt76: mt7663s: convert txrx_work to mt76_worker In order to improve driver throughput, convert txrx_work to mt76 worker threads APIs. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit e0ad800243291dc34250997ce8b4ab602651522f Author: Lorenzo Bianconi Date: Sat Sep 26 17:06:22 2020 +0200 mt76: mt7663s: move tx/rx processing in the same txrx workqueue Move mt7663 tx and rx processing in the same workqueue in order to reduce jitter that can hit tcp performances. This is a preliminary patch to switch to mt76 workers APIs Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit ced050ae3ab6bef58a02832dff735a1988cf3f2e Author: Chuanhong Guo Date: Wed Sep 23 15:23:03 2020 +0800 mt76: mt7615: retry if mt7615_mcu_init returns -EAGAIN mt7615_load_patch in mt7615/mcu.c sometimes fails with: mt7622-wmac 18000000.wmac: Failed to get patch semaphore and returns -EAGAIN. But this error is returned all the way up to mt7615_init_work with no actual retrial performed, leaving a broken wireless phy. Wait a bit and retry for up to 10 times before giving up. Signed-off-by: Chuanhong Guo Signed-off-by: Felix Fietkau commit 77d157f2009e2bcef48e0306bacfcced5b0ed887 Author: Ryder Lee Date: Thu Sep 24 23:23:14 2020 +0800 mt76: mt7915: fix VHT LDPC capability The MCU field should contain a boolean 0/1, not the flag itself. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 998493980e23b29d72c67a3bc3eb674278ce6983 Author: Ryder Lee Date: Thu Sep 24 23:23:13 2020 +0800 mt76: mt7915: measure channel noise and report it via survey Read per-stream measurements every 100 ms and build a simple moving average. Tested-by: Shayne Chen Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 354ad58b778043fbf064421ada6333e0bedb6f83 Merge: b65054597872c 0d2bf11a6b3e2 Author: Leon Romanovsky Date: Fri Dec 4 14:46:02 2020 +0200 Merge tag 'auxbus-5.11-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core into mlx5-next Auxiliary Bus support tag for 5.11-rc1 This is a signed tag for other subsystems to be able to pull in the auxiliary bus support into their trees for the 5.11-rc1 merge. Signed-off-by: Greg Kroah-Hartman * tag 'auxbus-5.11-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: driver core: auxiliary bus: minor coding style tweaks driver core: auxiliary bus: make remove function return void driver core: auxiliary bus: move slab.h from include file Add auxiliary bus support commit 2e37d91cada138f1c41b5706698b68355d0bafe4 Merge: 33c0c9bdf7a59 0d2bf11a6b3e2 Author: Greg Kroah-Hartman Date: Fri Dec 4 13:37:13 2020 +0100 Merge tag 'auxbus-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core into driver-core-next Auxiliary Bus support tag for 5.11-rc1 This is a signed tag for other subsystems to be able to pull in the auxiliary bus support into their trees for the 5.11-rc1 merge. Signed-off-by: Greg Kroah-Hartman commit 0d2bf11a6b3e275a526b8d42d8d4a3a6067cf953 Author: Greg Kroah-Hartman Date: Fri Dec 4 12:49:28 2020 +0100 driver core: auxiliary bus: minor coding style tweaks For some reason, the original aux bus patch had some really long lines in a few places, probably due to it being a very long-lived patch in development by many different people. Fix that up so that the two files all have the same length lines and function formatting styles. Cc: Dan Williams Cc: Dave Ertman Cc: Fred Oh Cc: Kiran Patil Cc: Leon Romanovsky Cc: Martin Habets Cc: Parav Pandit Cc: Pierre-Louis Bossart Cc: Ranjani Sridharan Cc: Shiraz Saleem Link: https://lore.kernel.org/r/X8oiSFTpYHw1xE/o@kroah.com Signed-off-by: Greg Kroah-Hartman commit 8142a46c50d2dd8160c42284e1044eed3bec0d18 Author: Greg Kroah-Hartman Date: Fri Dec 4 12:44:07 2020 +0100 driver core: auxiliary bus: make remove function return void There's an effort to move the remove() callback in the driver core to not return an int, as nothing can be done if this function fails. To make that effort easier, make the aux bus remove function void to start with so that no users have to be changed sometime in the future. Cc: Dan Williams Cc: Dave Ertman Cc: Fred Oh Cc: Kiran Patil Cc: Leon Romanovsky Cc: Martin Habets Cc: Parav Pandit Cc: Pierre-Louis Bossart Cc: Ranjani Sridharan Cc: Shiraz Saleem Link: https://lore.kernel.org/r/X8ohB1ks1NK7kPop@kroah.com Signed-off-by: Greg Kroah-Hartman commit 7bbb79ff5f7499e0c5d65987458410e8099207d8 Author: Greg Kroah-Hartman Date: Fri Dec 4 12:43:47 2020 +0100 driver core: auxiliary bus: move slab.h from include file No need to include slab.h in include/linux/auxiliary_bus.h, as it is not needed there. Move it to drivers/base/auxiliary.c instead. Cc: Dan Williams Cc: Dave Ertman Cc: Fred Oh Cc: Kiran Patil Cc: Leon Romanovsky Cc: Martin Habets Cc: Parav Pandit Cc: Pierre-Louis Bossart Cc: Ranjani Sridharan Cc: Shiraz Saleem Link: https://lore.kernel.org/r/X8og8xi3WkoYXet9@kroah.com Signed-off-by: Greg Kroah-Hartman commit b191deced78a12e26a827db03745b0da6cbc4f0e Author: Wolfram Sang Date: Wed Nov 25 22:30:01 2020 +0100 mmc: renesas_sdhi: populate hook for longer busy_wait Make use of the EXTOP bit in R-Car Gen3 SoCs to have a twice as large busy wait duration. Signed-off-by: Wolfram Sang Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20201125213001.15003-4-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 58959f89dd3d8cc8bedcd2d665496603098b29a2 Author: Wolfram Sang Date: Wed Nov 25 22:30:00 2020 +0100 mmc: tmio: add hook for custom busy_wait calculation Newer SDHI variants can 'wait while busy' longer than the generic TMIO. Provide a hook to get the maximum cycle count to wait for. If the hook is not populated, fall back to a generic version which works well with all older TMIO/SDHI variants. Signed-off-by: Wolfram Sang Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20201125213001.15003-3-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 30ae3e13caeaa47884c222ebf5711ce27ed25f19 Author: Wolfram Sang Date: Wed Nov 25 22:29:59 2020 +0100 mmc: tmio: set max_busy_timeout Set max_busy_timeouts for variants known to support the TOPxx bits in the SD_OPTION register. The timeout mechanism was running in the background but not yet properly handled in the driver. So, let the MMC core know when to not use R1B to avoid unhandled timeouts. My datasheets for older variants (tmio_mmc.c) suggest that they support it, too. However, actual bit descriptions are lacking, so I chose an opt-in approach. Signed-off-by: Wolfram Sang Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20201125213001.15003-2-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 9d348477ddbbc7e2d16032a945a841a7624fef25 Author: Dong Aisheng Date: Thu Nov 26 18:58:43 2020 +0800 dt-bindings: mmc: imx: fix the wrongly dropped imx8qm compatible string The compatible string "fsl,imx8qm-usdhc" was wrongly dropped in commit 80fd350b9590 ("dt-bindings: mmc: fsl-imx-esdhc: Fix i.MX 8 compatible matching"), let's add it back. Cc: Haibo Chen Cc: Krzysztof Kozlowski Cc: Ulf Hansson Fixes: 80fd350b9590 ("dt-bindings: mmc: fsl-imx-esdhc: Fix i.MX 8 compatible matching") Signed-off-by: Dong Aisheng Reviewed-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20201126105900.26658-2-aisheng.dong@nxp.com Signed-off-by: Ulf Hansson commit 4f1682b8a97dc24e57e8bcb62b23c216d8425266 Author: Tiezhu Yang Date: Thu Dec 3 11:19:03 2020 +0800 MIPS: Move memblock_dump_all() to the end of setup_arch() In order to get more memblock configuration with memblock=debug in the boot cmdline, move memblock_dump_all() to the end of setup_arch(), this can help us to get dmi_setup() and resource_init() memblock info, at least for now. Signed-off-by: Tiezhu Yang Signed-off-by: Thomas Bogendoerfer commit d8d3276bfc49e114103c54d5f93268c70dcf3600 Author: Wei Li Date: Thu Dec 3 14:54:43 2020 +0800 MIPS: SMP-CPS: Add support for irq migration when CPU offline Currently we won't migrate irqs when offline CPUs, which has been implemented on most architectures. That will lead to some devices work incorrectly if the bound cores are offline. While that can be easily supported by enabling GENERIC_IRQ_MIGRATION. But i don't pretty known the reason it was not supported on all MIPS platforms. This patch add the support for irq migration on MIPS CPS platform, and it's tested on the interAptiv processor. Signed-off-by: Wei Li Signed-off-by: Thomas Bogendoerfer commit ca13300a88a37a90160d352cede05776ea723919 Author: Alexander Sverdlin Date: Thu Dec 3 13:36:49 2020 +0100 MIPS: OCTEON: Don't add kernel sections into memblock allocator Because check_kernel_sections_mem() does exactly this for all platforms. Signed-off-by: Alexander Sverdlin Signed-off-by: Thomas Bogendoerfer commit d121f125af22a16f0f679293756d28a9691fa46d Author: Alexander Sverdlin Date: Thu Dec 3 13:36:48 2020 +0100 MIPS: Don't round up kernel sections size for memblock_add() Linux doesn't own the memory immediately after the kernel image. On Octeon bootloader places a shared structure right close after the kernel _end, refer to "struct cvmx_bootinfo *octeon_bootinfo" in cavium-octeon/setup.c. If check_kernel_sections_mem() rounds the PFNs up, first memblock_alloc() inside early_init_dt_alloc_memory_arch() <= device_tree_init() returns memory block overlapping with the above octeon_bootinfo structure, which is being overwritten afterwards. Fixes: a94e4f24ec83 ("MIPS: init: Drop boot_mem_map") Signed-off-by: Alexander Sverdlin Signed-off-by: Thomas Bogendoerfer commit 8b3165e54566e8bb8f4b7d4e5f12ced78ce462bb Author: Xingxing Su Date: Thu Dec 3 15:22:51 2020 +0800 MIPS: Enable GCOV Enable gcov profiling of the entire kernel on mips. Required changes include disabling profiling for: * arch/kernel/boot/compressed: not linked to main kernel. Lightly tested on Loongson 3A3000 an 3A4000, seems to work as expected. without "GCOV_PROFILE := n" in compressed Makefile, build errors as follows: ... ld: arch/mips/boot/compressed/string.o:(.data+0x88): undefined reference to `__gcov_merge_add' ld: arch/mips/boot/compressed/string.o: in function `_GLOBAL__sub_I_00100_0_memcpy': string.c:(.text.startup+0x4): undefined reference to `__gcov_init' ld: arch/mips/boot/compressed/string.o: in function `_GLOBAL__sub_D_00100_1_memcpy': string.c:(.text.exit+0x0): undefined reference to `__gcov_exit' ... Signed-off-by: Youling Tang Signed-off-by: Xingxing Su Signed-off-by: Thomas Bogendoerfer commit 79109a515ac3f1009632f4a4c81597e9438a2d65 Author: Andrey Zhizhikin Date: Tue Dec 1 22:29:20 2020 +0000 MIPS: configs: drop unused BACKLIGHT_GENERIC option Commit 7ecdea4a0226 ("backlight: generic_bl: Remove this driver as it is unused") removed geenric_bl driver from the tree, together with corresponding config option. Remove BACKLIGHT_GENERIC config item from all MIPS configurations. Fixes: 7ecdea4a0226 ("backlight: generic_bl: Remove this driver as it is unused") Signed-off-by: Andrey Zhizhikin Reviewed-by: Krzysztof Kozlowski Acked-by: Daniel Thompson Acked-by: Sam Ravnborg Cc: Sam Ravnborg Signed-off-by: Thomas Bogendoerfer commit 46ed0810780f0b4e67d980b450973cdaabf10767 Merge: 98991b1853ab6 32a9e0c445fa5 Author: Ulf Hansson Date: Fri Dec 4 12:34:19 2020 +0100 Merge branch 'fixes' into next commit 98991b1853ab699451afcc2223c5f1173a0aade9 Author: Ben Chuang Date: Wed Nov 25 19:01:45 2020 +0800 mmc: sdhci-pci-gli: Disable slow mode in HS400 mode for GL9763E The GL9763E uses 150Mhz (slow mode) by default in HS400 mode. In order to make HS400 mode run at 200Mhz, the slow mode needs to be turned off. Signed-off-by: Ben Chuang Link: https://lore.kernel.org/r/20201125110145.2824-1-benchuanggli@gmail.com Signed-off-by: Ulf Hansson commit cb80a7e917483150ca592bc7e15163341e7d4150 Author: Jeremy Linton Date: Tue Nov 24 21:36:30 2020 -0600 mmc: sdhci: Use more concise device_property_read_u64 Since we only need a single u64 the _array form is unnecessarily. Use device_property_read_u64 instead. Signed-off-by: Jeremy Linton Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20201125033630.603863-1-jeremy.linton@arm.com Signed-off-by: Ulf Hansson commit db29d3d1c2451e673e29c7257471e3ce9d50383a Author: Jing Xiangfeng Date: Wed Nov 25 09:47:18 2020 +0800 memstick: r592: Fix error return in r592_probe() Fix to return a error code from the error handling case instead of 0. Fixes: 926341250102 ("memstick: add driver for Ricoh R5C592 card reader") Signed-off-by: Jing Xiangfeng Link: https://lore.kernel.org/r/20201125014718.153563-1-jingxiangfeng@huawei.com Signed-off-by: Ulf Hansson commit 7de3697e9cbd4bd3d62bafa249d57990e1b8f294 Author: Dave Ertman Date: Wed Dec 2 16:54:24 2020 -0800 Add auxiliary bus support Add support for the Auxiliary Bus, auxiliary_device and auxiliary_driver. It enables drivers to create an auxiliary_device and bind an auxiliary_driver to it. The bus supports probe/remove shutdown and suspend/resume callbacks. Each auxiliary_device has a unique string based id; driver binds to an auxiliary_device based on this id through the bus. Co-developed-by: Kiran Patil Co-developed-by: Ranjani Sridharan Co-developed-by: Fred Oh Co-developed-by: Leon Romanovsky Signed-off-by: Kiran Patil Signed-off-by: Ranjani Sridharan Signed-off-by: Fred Oh Signed-off-by: Leon Romanovsky Signed-off-by: Dave Ertman Reviewed-by: Pierre-Louis Bossart Reviewed-by: Shiraz Saleem Reviewed-by: Parav Pandit Reviewed-by: Dan Williams Reviewed-by: Martin Habets Link: https://lore.kernel.org/r/20201113161859.1775473-2-david.m.ertman@intel.com Signed-off-by: Dan Williams Link: https://lore.kernel.org/r/160695681289.505290.8978295443574440604.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Greg Kroah-Hartman commit ff57698a9610fcf7d9c4469bf68c881eff22e2f8 Author: Christophe Leroy Date: Thu Oct 22 09:29:21 2020 +0000 powerpc: Fix update form addressing in inline assembly In several places, inline assembly uses the "%Un" modifier to enable the use of instruction with update form addressing, but the associated "<>" constraint is missing. As mentioned in previous patch, this fails with gcc 4.9, so "<>" can't be used directly. Use UPD_CONSTR macro everywhere %Un modifier is used. Signed-off-by: Christophe Leroy Reviewed-by: Segher Boessenkool Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/62eab5ca595485c192de1765bdac099f633a21d0.1603358942.git.christophe.leroy@csgroup.eu commit d85be8a49e733dcd23674aa6202870d54bf5600d Author: Mathieu Desnoyers Date: Thu Oct 22 09:29:20 2020 +0000 powerpc: Fix incorrect stw{, ux, u, x} instructions in __set_pte_at The placeholder for instruction selection should use the second argument's operand, which is %1, not %0. This could generate incorrect assembly code if the memory addressing of operand %0 is a different form from that of operand %1. Also remove the %Un placeholder because having %Un placeholders for two operands which are based on the same local var (ptep) doesn't make much sense. By the way, it doesn't change the current behaviour because "<>" constraint is missing for the associated "=m". [chleroy: revised commit log iaw segher's comments and removed %U0] Fixes: 9bf2b5cdc5fe ("powerpc: Fixes for CONFIG_PTE_64BIT for SMP support") Cc: # v2.6.28+ Signed-off-by: Mathieu Desnoyers Signed-off-by: Christophe Leroy Acked-by: Segher Boessenkool Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/96354bd77977a6a933fe9020da57629007fdb920.1603358942.git.christophe.leroy@csgroup.eu commit 23afeaeff3d985b07abf2c76fd12b8c548da8367 Author: Giuseppe Scrivano Date: Wed Nov 18 11:47:46 2020 +0100 selftests: core: add tests for CLOSE_RANGE_CLOEXEC check that close_range(initial_fd, last_fd, CLOSE_RANGE_CLOEXEC) correctly sets the close-on-exec bit for the specified file descriptors. Open 100 file descriptors and set the close-on-exec flag for a subset of them first, then set it for every file descriptor above 2. Make sure RLIMIT_NOFILE doesn't affect the result. Signed-off-by: Giuseppe Scrivano Link: https://lore.kernel.org/r/20201118104746.873084-3-gscrivan@redhat.com Signed-off-by: Christian Brauner commit 582f1fb6b721facf04848d2ca57f34468da1813e Author: Giuseppe Scrivano Date: Wed Nov 18 11:47:45 2020 +0100 fs, close_range: add flag CLOSE_RANGE_CLOEXEC When the flag CLOSE_RANGE_CLOEXEC is set, close_range doesn't immediately close the files but it sets the close-on-exec bit. It is useful for e.g. container runtimes that usually install a seccomp profile "as late as possible" before execv'ing the container process itself. The container runtime could either do: 1 2 - install_seccomp_profile(); - close_range(MIN_FD, MAX_INT, 0); - close_range(MIN_FD, MAX_INT, 0); - install_seccomp_profile(); - execve(...); - execve(...); Both alternative have some disadvantages. In the first variant the seccomp_profile cannot block the close_range syscall, as well as opendir/read/close/... for the fallback on older kernels. In the second variant, close_range() can be used only on the fds that are not going to be needed by the runtime anymore, and it must be potentially called multiple times to account for the different ranges that must be closed. Using close_range(..., ..., CLOSE_RANGE_CLOEXEC) solves these issues. The runtime is able to use the existing open fds, the seccomp profile can block close_range() and the syscalls used for its fallback. Signed-off-by: Giuseppe Scrivano Link: https://lore.kernel.org/r/20201118104746.873084-2-gscrivan@redhat.com Signed-off-by: Christian Brauner commit 7c6c86b36a36dd4a13d30bba07718e767aa2e7a1 Author: Christophe Leroy Date: Fri Dec 4 10:35:38 2020 +0000 powerpc/xmon: Change printk() to pr_cont() Since some time now, printk() adds carriage return, leading to unusable xmon output if there is no udbg backend available: [ 54.288722] sysrq: Entering xmon [ 54.292209] Vector: 0 at [cace3d2c] [ 54.292274] pc: [ 54.292331] c0023650 [ 54.292468] : xmon+0x28/0x58 [ 54.292519] [ 54.292574] lr: [ 54.292630] c0023724 [ 54.292749] : sysrq_handle_xmon+0xa4/0xfc [ 54.292801] [ 54.292867] sp: cace3de8 [ 54.292931] msr: 9032 [ 54.292999] current = 0xc28d0000 [ 54.293072] pid = 377, comm = sh [ 54.293157] Linux version 5.10.0-rc6-s3k-dev-01364-gedf13f0ccd76-dirty (root@po17688vm.idsi0.si.c-s.fr) (powerpc64-linux-gcc (GCC) 10.1.0, GNU ld (GNU Binutils) 2.34) #4211 PREEMPT Fri Dec 4 09:32:11 UTC 2020 [ 54.293287] enter ? for help [ 54.293470] [cace3de8] [ 54.293532] c0023724 [ 54.293654] sysrq_handle_xmon+0xa4/0xfc [ 54.293711] (unreliable) ... [ 54.296002] [ 54.296159] --- Exception: c01 (System Call) at [ 54.296217] 0fd4e784 [ 54.296303] [ 54.296375] SP (7fca6ff0) is in userspace [ 54.296431] mon> [ 54.296484] Use pr_cont() instead. Fixes: 4bcc595ccd80 ("printk: reinstate KERN_CONT for printing continuation lines") Cc: stable@vger.kernel.org # v4.9+ Signed-off-by: Christophe Leroy [mpe: Mention that it only happens when udbg is not available] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/c8a6ec704416ecd5ff2bd26213c9bc026bdd19de.1607077340.git.christophe.leroy@csgroup.eu commit e12f67fe83446432ef16704c22ec23bd1dbcd094 Author: Vicente Bergas Date: Tue Dec 1 16:41:32 2020 +0100 arm64: dts: rockchip: use USB host by default on rk3399-rock-pi-4 Based on the board schematics at https://dl.radxa.com/rockpi4/docs/hw/rockpi4/rockpi_4c_v12_sch_20200620.pdf on page 19 there is an USB Type-A receptacle being used as an USB-OTG port. But the Type-A connector is not valid for OTG operation, for this reason there is a switch to select host or device role. This is non-compliant and error prone because switching is manual. So, use host mode as it corresponds for a Type-A receptacle. Signed-off-by: Vicente Bergas Link: https://lore.kernel.org/r/20201201154132.1286-4-vicencb@gmail.com Signed-off-by: Heiko Stuebner commit eff57d38b546b3a50588e447a41ff3571a407c9f Author: Vicente Bergas Date: Tue Dec 1 16:41:31 2020 +0100 arm64: dts: rockchip: fix I2S conflict on rk3399-rock-pi-4 Based on the board schematics at https://dl.radxa.com/rockpi4/docs/hw/rockpi4/rockpi_4c_v12_sch_20200620.pdf on page 14: Only two channels of I2S are connected and the extra I2S pins are in conflict with other functions like USB power. Signed-off-by: Vicente Bergas Link: https://lore.kernel.org/r/20201201154132.1286-3-vicencb@gmail.com Signed-off-by: Heiko Stuebner commit 328c6112787bf7562dbea638840366cd197868d6 Author: Vicente Bergas Date: Tue Dec 1 16:41:30 2020 +0100 arm64: dts: rockchip: fix supplies on rk3399-rock-pi-4 Based on the board schematics at https://dl.radxa.com/rockpi4/docs/hw/rockpi4/rockpi_4c_v12_sch_20200620.pdf on page 18: vcc_lan is not controllable by software, it is just an analog LC filter. Because of this, it can not be turned off-in-suspend. and on page 17: vcc_cam and vcc_mipi are not voltage regulators, they are just switches. So, the voltage range is not applicable. This silences an error message about not being able to adjust the voltage. Signed-off-by: Vicente Bergas Link: https://lore.kernel.org/r/20201201154132.1286-2-vicencb@gmail.com Signed-off-by: Heiko Stuebner commit 94dad6bed3c86c00050bf7c2b2ad6b630facae31 Author: Chen-Yu Tsai Date: Fri Dec 4 14:48:05 2020 +0800 arm64: dts: rockchip: Fix UART pull-ups on rk3328 For UARTs, the local pull-ups should be on the RX pin, not the TX pin. UARTs transmit active-low, so a disconnected RX pin should be pulled high instead of left floating to prevent noise being interpreted as transmissions. This gets rid of bogus sysrq events when the UART console is not connected. Fixes: 52e02d377a72 ("arm64: dts: rockchip: add core dtsi file for RK3328 SoCs") Signed-off-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20201204064805.6480-1-wens@kernel.org Signed-off-by: Heiko Stuebner commit c2867b2e710fc85bb39c6f6e5948450c48e8a33e Author: Zhang Changzhong Date: Fri Dec 4 16:33:25 2020 +0800 soc: rockchip: io-domain: Fix error return code in rockchip_iodomain_probe() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: e943c43b32ce ("PM: AVS: rockchip-io: Move the driver to the rockchip specific drivers") Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Link: https://lore.kernel.org/r/1607070805-33038-1-git-send-email-zhangchangzhong@huawei.com Signed-off-by: Heiko Stuebner commit 17f84520cb8fcaf475c96c3ee90dd97b55a63669 Merge: f86e54653e671 652d0b701d136 Author: Marc Zyngier Date: Fri Dec 4 10:12:55 2020 +0000 Merge remote-tracking branch 'origin/kvm-arm64/misc-5.11' into kvmarm-master/queue Signed-off-by: Marc Zyngier commit f19f6644a5433cfae8a068445b149bc2247c1445 Author: David Brazdil Date: Wed Dec 2 18:41:22 2020 +0000 KVM: arm64: Fix EL2 mode availability checks With protected nVHE hyp code interception host's PSCI SMCs, the host starts seeing new CPUs boot in EL1 instead of EL2. The kernel logic that keeps track of the boot mode needs to be adjusted. Add a static key enabled if KVM protected mode initialization is successful. When the key is enabled, is_hyp_mode_available continues to report `true` because its users either treat it as a check whether KVM will be / was initialized, or whether stub HVCs can be made (eg. hibernate). is_hyp_mode_mismatched is changed to report `false` when the key is enabled. That's because all cores' modes matched at the point of KVM init and KVM will not allow cores not present at init to boot. That said, the function is never used after KVM is initialized. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201202184122.26046-27-dbrazdil@google.com commit b93c17c4185bf6b50f2f0b332afb4abe8b766a7a Author: David Brazdil Date: Wed Dec 2 18:41:21 2020 +0000 KVM: arm64: Trap host SMCs in protected mode While protected KVM is installed, start trapping all host SMCs. For now these are simply forwarded to EL3, except PSCI CPU_ON/CPU_SUSPEND/SYSTEM_SUSPEND which are intercepted and the hypervisor installed on newly booted cores. Create new constant HCR_HOST_NVHE_PROTECTED_FLAGS with the new set of HCR flags to use while the nVHE vector is installed when the kernel was booted with the protected flag enabled. Switch back to the default HCR flags when switching back to the stub vector. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201202184122.26046-26-dbrazdil@google.com commit fa8c3d65538aa11bb117cbf872400d5caa7f340b Author: David Brazdil Date: Wed Dec 2 18:41:20 2020 +0000 KVM: arm64: Keep nVHE EL2 vector installed KVM by default keeps the stub vector installed and installs the nVHE vector only briefly for init and later on demand. Change this policy to install the vector at init and then never uninstall it if the kernel was given the protected KVM command line parameter. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201202184122.26046-25-dbrazdil@google.com commit d945f8d9ec4ab5b062ce9696761ca3a21de1e64d Author: David Brazdil Date: Wed Dec 2 18:41:19 2020 +0000 KVM: arm64: Intercept host's SYSTEM_SUSPEND PSCI SMCs Add a handler of SYSTEM_SUSPEND host PSCI SMCs. The semantics are equivalent to CPU_SUSPEND, typically called on the last online CPU. Reuse the same entry point and boot args struct as CPU_SUSPEND. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201202184122.26046-24-dbrazdil@google.com commit abf16336dd22d018cd2577f0789b01ed705484d7 Author: David Brazdil Date: Wed Dec 2 18:41:18 2020 +0000 KVM: arm64: Intercept host's CPU_SUSPEND PSCI SMCs Add a handler of CPU_SUSPEND host PSCI SMCs. The SMC can either enter a sleep state indistinguishable from a WFI or a deeper sleep state that behaves like a CPU_OFF+CPU_ON except that the core is still considered online while asleep. The handler saves r0,pc of the host and makes the same call to EL3 with the hyp CPU entry point. It either returns back to the handler and then back to the host, or wakes up into the entry point and initializes EL2 state before dropping back to EL1. No EL2 state needs to be saved/restored for this purpose. CPU_ON and CPU_SUSPEND are both implemented using struct psci_boot_args to store the state upon powerup, with each CPU having separate structs for CPU_ON and CPU_SUSPEND so that CPU_SUSPEND can operate locklessly and so that a CPU_ON call targeting a CPU cannot interfere with a concurrent CPU_SUSPEND call on that CPU. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201202184122.26046-23-dbrazdil@google.com commit cdf367192766ad11a03e8d5098556be43b8eb6b0 Author: David Brazdil Date: Wed Dec 2 18:41:17 2020 +0000 KVM: arm64: Intercept host's CPU_ON SMCs Add a handler of the CPU_ON PSCI call from host. When invoked, it looks up the logical CPU ID corresponding to the provided MPIDR and populates the state struct of the target CPU with the provided x0, pc. It then calls CPU_ON itself, with an entry point in hyp that initializes EL2 state before returning ERET to the provided PC in EL1. There is a simple atomic lock around the boot args struct. If it is already locked, CPU_ON will return PENDING_ON error code. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201202184122.26046-22-dbrazdil@google.com commit 04e05f057a04275cb68c8053b29c5642ae0bad4f Author: David Brazdil Date: Wed Dec 2 18:41:16 2020 +0000 KVM: arm64: Add function to enter host from KVM nVHE hyp code All nVHE hyp code is currently executed as handlers of host's HVCs. This will change as nVHE starts intercepting host's PSCI CPU_ON SMCs. The newly booted CPU will need to initialize EL2 state and then enter the host. Add __host_enter function that branches into the existing host state-restoring code after the trap handler would have returned. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201202184122.26046-21-dbrazdil@google.com commit f74e1e2128b7681f0d9c2a66dc4480e7d7196b49 Author: David Brazdil Date: Wed Dec 2 18:41:15 2020 +0000 KVM: arm64: Extract __do_hyp_init into a helper function In preparation for adding a CPU entry point in nVHE hyp code, extract most of __do_hyp_init hypervisor initialization code into a common helper function. This will be invoked by the entry point to install KVM on the newly booted CPU. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201202184122.26046-20-dbrazdil@google.com commit 1fd12b7e4d0082a9f373e26ab11fc94bcc307d33 Author: David Brazdil Date: Wed Dec 2 18:41:14 2020 +0000 KVM: arm64: Forward safe PSCI SMCs coming from host Forward the following PSCI SMCs issued by host to EL3 as they do not require the hypervisor's intervention. This assumes that EL3 correctly implements the PSCI specification. Only function IDs implemented in Linux are included. Where both 32-bit and 64-bit variants exist, it is assumed that the host will always use the 64-bit variant. * SMCs that only return information about the system * PSCI_VERSION - PSCI version implemented by EL3 * PSCI_FEATURES - optional features supported by EL3 * AFFINITY_INFO - power state of core/cluster * MIGRATE_INFO_TYPE - whether Trusted OS can be migrated * MIGRATE_INFO_UP_CPU - resident core of Trusted OS * operations which do not affect the hypervisor * MIGRATE - migrate Trusted OS to a different core * SET_SUSPEND_MODE - toggle OS-initiated mode * system shutdown/reset * SYSTEM_OFF * SYSTEM_RESET * SYSTEM_RESET2 Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201202184122.26046-19-dbrazdil@google.com commit d084ecc5c72811e7231838f7c128bfcc7f8d2889 Author: David Brazdil Date: Wed Dec 2 18:41:13 2020 +0000 KVM: arm64: Add offset for hyp VA <-> PA conversion Add a host-initialized constant to KVM nVHE hyp code for converting between EL2 linear map virtual addresses and physical addresses. Also add `__hyp_pa` macro that performs the conversion. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201202184122.26046-18-dbrazdil@google.com commit eeeee7193df015074c8302381356e8e617a5e2b0 Author: David Brazdil Date: Wed Dec 2 18:41:12 2020 +0000 KVM: arm64: Bootstrap PSCI SMC handler in nVHE EL2 Add a handler of PSCI SMCs in nVHE hyp code. The handler is initialized with the version used by the host's PSCI driver and the function IDs it was configured with. If the SMC function ID matches one of the configured PSCI calls (for v0.1) or falls into the PSCI function ID range (for v0.2+), the SMC is handled by the PSCI handler. For now, all SMCs return PSCI_RET_NOT_SUPPORTED. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201202184122.26046-17-dbrazdil@google.com commit a805e1fb30990e29b3174c39bf39015065e5dc19 Author: David Brazdil Date: Wed Dec 2 18:41:11 2020 +0000 KVM: arm64: Add SMC handler in nVHE EL2 Add handler of host SMCs in KVM nVHE trap handler. Forward all SMCs to EL3 and propagate the result back to EL1. This is done in preparation for validating host SMCs in KVM protected mode. The implementation assumes that firmware uses SMCCC v1.2 or older. That means x0-x17 can be used both for arguments and results, other GPRs are preserved. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201202184122.26046-16-dbrazdil@google.com commit 94f5e8a4642aedb19ca73f534372d7ed65e1c84e Author: David Brazdil Date: Wed Dec 2 18:41:10 2020 +0000 KVM: arm64: Create nVHE copy of cpu_logical_map When KVM starts validating host's PSCI requests, it will need to map MPIDR back to the CPU ID. To this end, copy cpu_logical_map into nVHE hyp memory when KVM is initialized. Only copy the information for CPUs that are online at the point of KVM initialization so that KVM rejects CPUs whose features were not checked against the finalized capabilities. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201202184122.26046-15-dbrazdil@google.com commit 687413d34d4aa72103de3e545f431f480dd21d7f Author: David Brazdil Date: Wed Dec 2 18:41:09 2020 +0000 KVM: arm64: Support per_cpu_ptr in nVHE hyp code When compiling with __KVM_NVHE_HYPERVISOR__, redefine per_cpu_offset() to __hyp_per_cpu_offset() which looks up the base of the nVHE per-CPU region of the given cpu and computes its offset from the .hyp.data..percpu section. This enables use of per_cpu_ptr() helpers in nVHE hyp code. Until now only this_cpu_ptr() was supported by setting TPIDR_EL2. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201202184122.26046-14-dbrazdil@google.com commit 2d7bf218ca739554bf7277ab0dbfa5399d01f7c6 Author: David Brazdil Date: Wed Dec 2 18:41:08 2020 +0000 KVM: arm64: Add .hyp.data..ro_after_init ELF section Add rules for renaming the .data..ro_after_init ELF section in KVM nVHE object files to .hyp.data..ro_after_init, linking it into the kernel and mapping it in hyp at runtime. The section is RW to the host, then mapped RO in hyp. The expectation is that the host populates the variables in the section and they are never changed by hyp afterwards. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201202184122.26046-13-dbrazdil@google.com commit d3e1086c64528ee0b955326b4c0e947cde3b6923 Author: David Brazdil Date: Wed Dec 2 18:41:07 2020 +0000 KVM: arm64: Init MAIR/TCR_EL2 from params struct MAIR_EL2 and TCR_EL2 are currently initialized from their _EL1 values. This will not work once KVM starts intercepting PSCI ON/SUSPEND SMCs and initializing EL2 state before EL1 state. Obtain the EL1 values during KVM init and store them in the init params struct. The struct will stay in memory and can be used when booting new cores. Take the opportunity to move copying the T0SZ value from idmap_t0sz in KVM init rather than in .hyp.idmap.text. This avoids the need for the idmap_t0sz symbol alias. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201202184122.26046-12-dbrazdil@google.com commit 63fec24351e827021137a15b307bd1e64772b7fe Author: David Brazdil Date: Wed Dec 2 18:41:06 2020 +0000 KVM: arm64: Move hyp-init params to a per-CPU struct Once we start initializing KVM on newly booted cores before the rest of the kernel, parameters to __do_hyp_init will need to be provided by EL2 rather than EL1. At that point it will not be possible to pass its three arguments directly because PSCI_CPU_ON only supports one context argument. Refactor __do_hyp_init to accept its parameters in a struct. This prepares the code for KVM booting cores as well as removes any limits on the number of __do_hyp_init arguments. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201202184122.26046-11-dbrazdil@google.com commit 5be1d6226d35800393579340f35b8b0d7b2a3177 Author: David Brazdil Date: Wed Dec 2 18:41:05 2020 +0000 KVM: arm64: Remove vector_ptr param of hyp-init KVM precomputes the hyp VA of __kvm_hyp_host_vector, essentially a constant (minus ASLR), before passing it to __kvm_hyp_init. Now that we have alternatives for converting kimg VA to hyp VA, replace this with computing the constant inside __kvm_hyp_init, thus removing the need for an argument. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201202184122.26046-10-dbrazdil@google.com commit 78869f0f0552d032c7e32724c4abb2715e8f974a Author: David Brazdil Date: Wed Dec 2 18:41:04 2020 +0000 arm64: Extract parts of el2_setup into a macro When a CPU is booted in EL2, the kernel checks for VHE support and initializes the CPU core accordingly. For nVHE it also installs the stub vectors and drops down to EL1. Once KVM gains the ability to boot cores without going through the kernel entry point, it will need to initialize the CPU the same way. Extract the relevant bits of el2_setup into an init_el2_state macro with an argument specifying whether to initialize for VHE or nVHE. The following ifdefs are removed: * CONFIG_ARM_GIC_V3 - always selected on arm64 * CONFIG_COMPAT - hstr_el2 can be set even without 32-bit support No functional change intended. Size of el2_setup increased by 148 bytes due to duplication. Signed-off-by: David Brazdil [maz: reworked to fit the new PSTATE initial setup code] Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201202184122.26046-9-dbrazdil@google.com commit ce4b2c01781a24b0a04845f683feea44ade70503 Author: Will Deacon Date: Fri Dec 4 09:19:35 2020 +0000 arm64: Fix build failure when HARDLOCKUP_DETECTOR_PERF is enabled If HARDLOCKUP_DETECTOR_PERF is selected but HW_PERF_EVENTS is not, then the associated watchdog driver will fail to link: | aarch64-linux-ld: Unexpected GOT/PLT entries detected! | aarch64-linux-ld: Unexpected run-time procedure linkages detected! | aarch64-linux-ld: kernel/watchdog_hld.o: in function `hardlockup_detector_event_create': | >> watchdog_hld.c:(.text+0x68): undefined reference to `hw_nmi_get_sample_period Change the Kconfig dependencies so that HAVE_PERF_EVENTS_NMI requires the hardware PMU driver to be enabled, ensuring that the required symbols are present. Cc: Sumit Garg Reported-by: kernel test robot Link: https://lore.kernel.org/r/202012031509.4O5ZoWNI-lkp@intel.com Fixes: 367c820ef080 ("arm64: Enable perf events based hard lockup detector") Signed-off-by: Will Deacon commit ceb58de4365fff8b503b1e6ba7d1110613adb305 Author: Vinod Koul Date: Thu Nov 26 14:51:51 2020 +0530 pinctrl: qcom-pmic-gpio: Add support for pmx55 PM55 pmic support gpio controller so add compatible and comment for gpio holes Signed-off-by: Vinod Koul Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20201126092151.1082697-2-vkoul@kernel.org Signed-off-by: Linus Walleij commit 4247e3f562619a05682b3d3d5d92d54ca46a2a43 Author: Vinod Koul Date: Thu Nov 26 14:51:50 2020 +0530 dt-bindings: pinctrl: qcom-pmic-gpio: Add pmx55 support Add support for the PMX55 GPIO support to the Qualcomm PMIC GPIO binding. Signed-off-by: Vinod Koul Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20201126092151.1082697-1-vkoul@kernel.org Signed-off-by: Linus Walleij commit d05b7691904b4b754b8469aa98a6b82523fdadad Author: Zou Wei Date: Tue Nov 24 19:42:53 2020 +0800 pinctrl: pinctrl-microchip-sgpio: Mark some symbols with static keyword Fix the following sparse warnings: drivers/pinctrl/pinctrl-microchip-sgpio.c:63:31: warning: symbol 'properties_luton' was not declared. Should it be static? drivers/pinctrl/pinctrl-microchip-sgpio.c:68:31: warning: symbol 'properties_ocelot' was not declared. Should it be static? drivers/pinctrl/pinctrl-microchip-sgpio.c:73:31: warning: symbol 'properties_sparx5' was not declared. Should it be static? Signed-off-by: Zou Wei Link: https://lore.kernel.org/r/1606218173-3722-1-git-send-email-zou_wei@huawei.com Signed-off-by: Linus Walleij commit 0a03658d222a99b192a7f84e41e8af197a87259e Author: Tiezhu Yang Date: Tue Nov 24 17:17:03 2020 +0800 pinctrl: at91-pio4: Make PINCTRL_AT91PIO4 depend on HAS_IOMEM to fix build error If CONFIG_HAS_IOMEM is not set, devm_platform_ioremap_resource() will be not built in drivers/base/platform.c and then there exists a build error about undefined reference to "devm_platform_ioremap_resource" in pinctrl-at91-pio4.c under COMPILE_TEST and CONFIG_PINCTRL_AT91PIO4, make PINCTRL_AT91PIO4 depend on HAS_IOMEM to fix it. Reported-by: kernel test robot Signed-off-by: Tiezhu Yang Link: https://lore.kernel.org/r/1606209423-4742-1-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Linus Walleij commit c1f45f4eb6fd8704f72d5ed64184121e9fe129a0 Author: David Brazdil Date: Wed Dec 2 18:41:03 2020 +0000 arm64: Make cpu_logical_map() take unsigned int CPU index should never be negative. Change the signature of (set_)cpu_logical_map to take an unsigned int. This still works even if the users treat the CPU index as an int, and will allow the hypervisor's implementation to check that the index is valid with a single upper-bound check. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201202184122.26046-8-dbrazdil@google.com commit 6df3e14436f6ee254b1a4952d90ee8988be59c89 Author: David Brazdil Date: Wed Dec 2 18:41:02 2020 +0000 psci: Add accessor for psci_0_1_function_ids Make it possible to retrieve a copy of the psci_0_1_function_ids struct. This is useful for KVM if it is configured to intercept host's PSCI SMCs. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20201202184122.26046-7-dbrazdil@google.com commit 82ac62d1658b42392282550078a189ccd3f50214 Author: David Brazdil Date: Wed Dec 2 18:41:01 2020 +0000 psci: Replace psci_function_id array with a struct Small refactor that replaces array of v0.1 function IDs indexed by an enum of function-name constants with a struct of function IDs "indexed" by field names. This is done in preparation for exposing the IDs to other parts of the kernel. Exposing a struct avoids the need for bounds checking. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20201202184122.26046-6-dbrazdil@google.com commit 0bc7474fb7673422b134e88feb49cde54b22bb75 Author: David Brazdil Date: Wed Dec 2 18:41:00 2020 +0000 psci: Split functions to v0.1 and v0.2+ variants Refactor implementation of v0.1+ functions (CPU_SUSPEND, CPU_OFF, CPU_ON, MIGRATE) to have two functions psci_0_1_foo / psci_0_2_foo that select the function ID and call a common helper __psci_foo. This is a small cleanup so that the function ID array is only used for v0.1 configurations. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20201202184122.26046-5-dbrazdil@google.com commit e6dd9d89a64e30b25339d0dbe5c5aa589db8d530 Author: David Brazdil Date: Wed Dec 2 18:40:59 2020 +0000 psci: Support psci_ops.get_version for v0.1 KVM's host PSCI SMC filter needs to be aware of the PSCI version of the system but currently it is impossible to distinguish between v0.1 and PSCI disabled because both have get_version == NULL. Populate get_version for v0.1 with a function that returns a constant. psci_opt.get_version is currently unused so this has no effect on existing functionality. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20201202184122.26046-4-dbrazdil@google.com commit 3eb681fba2bf8b67b65ce92d0ebfd7cbfc263da9 Author: David Brazdil Date: Wed Dec 2 18:40:58 2020 +0000 KVM: arm64: Add ARM64_KVM_PROTECTED_MODE CPU capability Expose the boolean value whether the system is running with KVM in protected mode (nVHE + kernel param). CPU capability was selected over a global variable to allow use in alternatives. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201202184122.26046-3-dbrazdil@google.com commit 517c3f5a8683c950efe17aa01e55efb3b0f2c770 Author: Zhiyong Tao Date: Fri Nov 20 17:30:58 2020 +0800 pinctrl: mtk: Fix low level output voltage issue This patch is used to fix low level output voltage issue. A pin is changed from input pull-up to output high. The Dout value of the pin is default as 0. If we change the direction of the pin before the dout value of the pin, It maybe produce a low level output voltage between "input pull-up" and "output high". Signed-off-by: Zhiyong Tao Link: https://lore.kernel.org/r/20201120093058.7248-2-zhiyong.tao@mediatek.com Signed-off-by: Linus Walleij commit d8b369c4e31430a4746571bcae45a98933827232 Author: David Brazdil Date: Wed Dec 2 18:40:57 2020 +0000 KVM: arm64: Add kvm-arm.mode early kernel parameter Add an early parameter that allows users to select the mode of operation for KVM/arm64. For now, the only supported value is "protected". By passing this flag users opt into the hypervisor placing additional restrictions on the host kernel. These allow the hypervisor to spawn guests whose state is kept private from the host. Restrictions will include stage-2 address translation to prevent host from accessing guest memory, filtering its SMC calls, etc. Without this parameter, the default behaviour remains selecting VHE/nVHE based on hardware support and CONFIG_ARM64_VHE. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201202184122.26046-2-dbrazdil@google.com commit 64dad8e49d6dd364c04142ba18b937be0500ab74 Merge: 83fa381f66ccb 701f49065e687 Author: Marc Zyngier Date: Fri Dec 4 08:43:37 2020 +0000 Merge remote-tracking branch 'arm64/for-next/uaccess' into HEAD Signed-off-by: Marc Zyngier commit 89cce2b3f247a434ee174ab6803698041df98014 Author: Yu Kuai Date: Thu Nov 19 09:12:19 2020 +0800 pinctrl: falcon: add missing put_device() call in pinctrl_falcon_probe() if of_find_device_by_node() succeed, pinctrl_falcon_probe() doesn't have a corresponding put_device(). Thus add put_device() to fix the exception handling for this function implementation. Fixes: e316cb2b16bb ("OF: pinctrl: MIPS: lantiq: adds support for FALCON SoC") Signed-off-by: Yu Kuai Link: https://lore.kernel.org/r/20201119011219.2248232-1-yukuai3@huawei.com Signed-off-by: Linus Walleij commit 105e051f1ae4cf1e94110a834987fdc78673f0c8 Author: Fabio Estevam Date: Wed Nov 18 16:19:38 2020 -0300 gpio: mxs: Remove unused .id_table support mxs is a devicetree-only platform and hence it does not make use of the id_table mechanism. Get rid of the .id_table as it is unused. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20201118191938.32693-1-festevam@gmail.com Signed-off-by: Linus Walleij commit 43bb48c38e817b5f89fce340f49436a605e47e66 Author: Cristian Ciocaltea Date: Wed Nov 18 20:10:00 2020 +0200 pinctrl: actions: pinctrl-s500: Constify s500_padinfo[] s500_padinfo[] is never modified and should be made 'const' to allow the compiler to optimize code generation, i.e. put it in the text section instead of the data section. Before: text data bss dec hex filename 12503 5088 0 17591 44b7 drivers/pinctrl/actions/pinctrl-s500.o After: text data bss dec hex filename 14435 3156 0 17591 44b7 drivers/pinctrl/actions/pinctrl-s500.o Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/24505deb08d050eb4ce38f186f4037d7541ea217.1605722628.git.cristian.ciocaltea@gmail.com Signed-off-by: Linus Walleij commit c4e1f7d92cd609e4929b2b3d8abe5eb21b9823ef Author: Linus Walleij Date: Tue Nov 17 22:33:51 2020 +0100 gpio: tegra186: Set affinity callback to parent This assigns the .irq_set_affinity to the parent callback. I assume the Tegra186 is an SMP system so this would be beneficial. I used the pattern making the hirerarchy tolerant for missing parent as in Marc's earlier patch. Suggested-by: Marc Zyngier Signed-off-by: Linus Walleij Cc: Thierry Reding Cc: Vidya Sagar Link: https://lore.kernel.org/r/20201117213351.249668-2-linus.walleij@linaro.org commit 011a78c1942ed6441880786d96cb90229e3ab0c9 Author: Linus Walleij Date: Tue Nov 17 22:33:50 2020 +0100 gpio: sifive: Set affinity callback to parent This assigns the .irq_set_affinity to the parent callback. I assume the sifive GPIO can be used in systems with SMP. I used the pattern making the hirerarchy tolerant for missing parent as in Marc's earlier patches. Suggested-by: Marc Zyngier Signed-off-by: Linus Walleij Cc: Yash Shah Cc: Wesley W. Terpstra Link: https://lore.kernel.org/r/20201117213351.249668-1-linus.walleij@linaro.org commit 3b4feb21158f873269ff3fbe2fe8d23a88d64b24 Author: Linus Walleij Date: Tue Nov 10 15:27:24 2020 +0100 gpio: sysfs: Enforce character device If users select sysfs support they get the character device as well so that end-users cannot complain that they "only have sysfs on my system". They should have the character device at all times. If someone is in so dire need of stripping out the character device while still enabling the sysfs ABI they can very well patch the kernel. Also only show this obsolete option to expert users. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20201110142724.14760-1-linus.walleij@linaro.org commit 34a14c2e6310a348a3f23af6e95bf9ea040f3ec8 Author: Simon Wunderlich Date: Fri Dec 4 08:41:16 2020 +0100 batman-adv: Drop unused soft-interface.h include in fragmentation.c The commit 992b03b88e36 ("batman-adv: Don't always reallocate the fragmentation skb head") removed the last user of functions from soft-interface.h. Signed-off-by: Simon Wunderlich commit a962cb29bb608acdbf88a64368159d099671380e Author: Sven Eckelmann Date: Mon Aug 17 14:37:13 2020 +0200 batman-adv: Drop legacy code for auto deleting mesh interfaces The only way to automatically drop batadv mesh interfaces when all soft interfaces were removed was dropped with the sysfs support. It is no longer needed to have them handled by kernel anymore. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit aff6f5a68b921aa8d49c9a50e0115a5b099732ef Author: Sven Eckelmann Date: Mon Aug 17 13:42:29 2020 +0200 batman-adv: Drop deprecated debugfs support The debugfs support in batman-adv was marked as deprecated by the commit 00caf6a2b318 ("batman-adv: Mark debugfs functionality as deprecated") and scheduled for removal in 2021. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 76e9f276285de08695c62c4cf0caa5ad5b5cb9a3 Author: Sven Eckelmann Date: Mon Aug 17 13:42:29 2020 +0200 batman-adv: Drop deprecated sysfs support The sysfs in batman-adv support was marked as deprecated by the commit 42cdd521487f ("batman-adv: ABI: Mark sysfs files as deprecated") and scheduled for removal in 2021. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit a5ad457eea41ef7209f3a1765f853a2c7f191131 Author: Sven Eckelmann Date: Sun Oct 11 12:25:24 2020 +0200 batman-adv: Allow selection of routing algorithm over rtnetlink A batadv net_device is associated to a B.A.T.M.A.N. routing algorithm. This algorithm has to be selected before the interface is initialized and cannot be changed after that. The only way to select this algorithm was a module parameter which specifies the default algorithm used during the creation of the net_device. This module parameter is writeable over /sys/module/batman_adv/parameters/routing_algo and thus allows switching of the routing algorithm: 1. change routing_algo parameter 2. create new batadv net_device But this is not race free because another process can be scheduled between 1 + 2 and in that time frame change the routing_algo parameter again. It is much cleaner to directly provide this information inside the rtnetlink's RTM_NEWLINK message. The two processes would be (in regards of the creation parameter of their batadv interfaces) be isolated. This also eases the integration of batadv devices inside tools like network-manager or systemd-networkd which are not expecting to operate on /sys before a new net_device is created. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 128254ceea6ffe59300d3cca6fc83b842048f4c4 Author: Sven Eckelmann Date: Sun Oct 11 12:25:23 2020 +0200 batman-adv: Prepare infrastructure for newlink settings The batadv generic netlink family can be used to retrieve the current state and set various configuration settings. But there are also settings which must be set before the actual interface is created. The rtnetlink already uses IFLA_INFO_DATA to allow net_device families to transfer such configurations. The minimal required functionality for this is now available for the batadv rtnl_link_ops. Also a new IFLA class of attributes will be attached to it because rtnetlink only allows 51 different attributes but batadv_nl_attrs already contains 62 attributes. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit fcd193e1dfa6842e2783b04d98345767fe99cf31 Author: Sven Eckelmann Date: Mon Oct 26 21:01:59 2020 +0100 batman-adv: Add new include for min/max helpers The commit b296a6d53339 ("kernel.h: split out min()/max() et al. helpers") moved the min/max helper functionality from kernel.h to minmax.h. Adjust the kernel code accordingly to avoid fragile indirect includes. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit fee3e9554ac0fe897a6b1fbadde1bf1663412973 Author: Simon Wunderlich Date: Tue Oct 27 14:58:32 2020 +0100 batman-adv: Start new development cycle Signed-off-by: Simon Wunderlich commit 0464e0ef4f144bd5f2fa6ef6e06ab1e0ae4806f6 Author: Ard Biesheuvel Date: Mon Nov 30 13:26:20 2020 +0100 crypto: aegis128 - avoid spurious references crypto_aegis128_update_simd Geert reports that builds where CONFIG_CRYPTO_AEGIS128_SIMD is not set may still emit references to crypto_aegis128_update_simd(), which cannot be satisfied and therefore break the build. These references only exist in functions that can be optimized away, but apparently, the compiler is not always able to prove this. So add some explicit checks for CONFIG_CRYPTO_AEGIS128_SIMD to help the compiler figure this out. Tested-by: Geert Uytterhoeven Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 1069e97688b21b9c754dc8364ccfb3fea79788bf Author: Tom Rix Date: Fri Nov 27 08:23:45 2020 -0800 crypto: seed - remove trailing semicolon in macro definition The macro use will already have a semicolon. Signed-off-by: Tom Rix Signed-off-by: Herbert Xu commit be169fe3cec9efe2bfff98b3f645bca6cc7d09cd Author: Uros Bizjak Date: Fri Nov 27 11:18:12 2020 +0100 crypto: x86/poly1305 - Use TEST %reg,%reg instead of CMP $0,%reg CMP $0,%reg can't set overflow flag, so we can use shorter TEST %reg,%reg instruction when only zero and sign flags are checked (E,L,LE,G,GE conditions). Signed-off-by: Uros Bizjak Cc: Herbert Xu Cc: Borislav Petkov Cc: "H. Peter Anvin" Signed-off-by: Herbert Xu commit 0b837f1ef8822a8df880ffba6778ba42f707b83d Author: Uros Bizjak Date: Fri Nov 27 10:59:43 2020 +0100 crypto: x86/sha512 - Use TEST %reg,%reg instead of CMP $0,%reg CMP $0,%reg can't set overflow flag, so we can use shorter TEST %reg,%reg instruction when only zero and sign flags are checked (E,L,LE,G,GE conditions). Signed-off-by: Uros Bizjak Cc: Herbert Xu Cc: Borislav Petkov Cc: "H. Peter Anvin" Signed-off-by: Herbert Xu commit 032d049ea0f45b45c21f3f02b542aa18bc6b6428 Author: Uros Bizjak Date: Fri Nov 27 10:44:52 2020 +0100 crypto: aesni - Use TEST %reg,%reg instead of CMP $0,%reg CMP $0,%reg can't set overflow flag, so we can use shorter TEST %reg,%reg instruction when only zero and sign flags are checked (E,L,LE,G,GE conditions). Signed-off-by: Uros Bizjak Cc: Herbert Xu Cc: Borislav Petkov Cc: "H. Peter Anvin" Signed-off-by: Herbert Xu commit f2d4576a9d38f0a35bc1a5436f5e6e15b6c46aa4 Author: Herbert Xu Date: Fri Nov 27 17:23:29 2020 +1100 crypto: cpt - Fix sparse warnings in cptpf This patch fixes a few sparse warnings that were missed in the last round. Signed-off-by: Herbert Xu commit a1315dcb7b6a7d3a78df848eed5b331a4b3ec28a Author: Herbert Xu Date: Fri Nov 27 16:49:40 2020 +1100 hwrng: ks-sa - Add dependency on IOMEM and OF This patch adds a dependency for KEYSTONE on HAS_IOMEM and OF to prevent COMPILE_TEST build failures. Reported-by: kernel test robot Signed-off-by: Herbert Xu commit ce0d5d63e897cc7c3a8fd043c7942fc6a78ec6f4 Author: Herbert Xu Date: Fri Nov 27 16:43:18 2020 +1100 crypto: lib/blake2s - Move selftest prototype into header file This patch fixes a missing prototype warning on blake2s_selftest. Reported-by: kernel test robot Signed-off-by: Herbert Xu commit f3456b9fd269c6d0c973b136c5449d46b2510f4b Author: Ard Biesheuvel Date: Thu Nov 26 08:49:07 2020 +0100 crypto: arm/aes-ce - work around Cortex-A57/A72 silion errata ARM Cortex-A57 and Cortex-A72 cores running in 32-bit mode are affected by silicon errata #1742098 and #1655431, respectively, where the second instruction of a AES instruction pair may execute twice if an interrupt is taken right after the first instruction consumes an input register of which a single 32-bit lane has been updated the last time it was modified. This is not such a rare occurrence as it may seem: in counter mode, only the least significant 32-bit word is incremented in the absence of a carry, which makes our counter mode implementation susceptible to these errata. So let's shuffle the counter assignments around a bit so that the most recent updates when the AES instruction pair executes are 128-bit wide. [0] ARM-EPM-049219 v23 Cortex-A57 MPCore Software Developers Errata Notice [1] ARM-EPM-012079 v11.0 Cortex-A72 MPCore Software Developers Errata Notice Cc: # v5.4+ Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 17858b140bf49961b71d4e73f1c3ea9bc8e7dda0 Author: Ard Biesheuvel Date: Tue Nov 24 11:47:19 2020 +0100 crypto: ecdh - avoid unaligned accesses in ecdh_set_secret() ecdh_set_secret() casts a void* pointer to a const u64* in order to feed it into ecc_is_key_valid(). This is not generally permitted by the C standard, and leads to actual misalignment faults on ARMv6 cores. In some cases, these are fixed up in software, but this still leads to performance hits that are entirely avoidable. So let's copy the key into the ctx buffer first, which we will do anyway in the common case, and which guarantees correct alignment. Cc: Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit b1198a88230f2ce50c271e22b82a8b8610b2eea9 Author: Alexey Kardashevskiy Date: Sun Nov 22 18:38:28 2020 +1100 powerpc/powernv/npu: Do not attempt NPU2 setup on POWER8NVL NPU We execute certain NPU2 setup code (such as mapping an LPID to a device in NPU2) unconditionally if an Nvlink bridge is detected. However this cannot succeed on POWER8NVL machines and errors appear in dmesg. This is harmless as skiboot returns an error and the only place we check it is vfio-pci but that code does not get called on P8+ either. This adds a check if pnv_npu2_xxx helpers are called on a machine with NPU2 which initializes pnv_phb::npu in pnv_npu2_init(); pnv_phb::npu==NULL on POWER8/NVL (Naples). While at this, fix NULL derefencing in pnv_npu_peers_take_ownership/ pnv_npu_peers_release_ownership which occurs when GPUs on mentioned P8s cause EEH which happens if "vfio-pci" disables devices using the D3 power state; the vfio-pci's disable_idle_d3 module parameter controls this and must be set on Naples. The EEH handling clears the entire pnv_ioda_pe struct in pnv_ioda_free_pe() hence the NULL derefencing. We cannot recover from that but at least we stop crashing. Tested on - POWER9 pvr=004e1201, Ubuntu 19.04 host, Ubuntu 18.04 vm, NVIDIA GV100 10de:1db1 driver 418.39 - POWER8 pvr=004c0100, RHEL 7.6 host, Ubuntu 16.10 vm, NVIDIA P100 10de:15f9 driver 396.47 Fixes: 1b785611e119 ("powerpc/powernv/npu: Add release_ownership hook") Cc: stable@vger.kernel.org # 5.0 Signed-off-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201122073828.15446-1-aik@ozlabs.ru commit eceae70bdeaeb6b8ceb662983cf663ff352fbc96 Author: Andrii Nakryiko Date: Thu Dec 3 15:54:40 2020 -0800 selftests/bpf: Fix invalid use of strncat in test_sockmap strncat()'s third argument is how many bytes will be added *in addition* to already existing bytes in destination. Plus extra zero byte will be added after that. So existing use in test_sockmap has many opportunities to overflow the string and cause memory corruptions. And in this case, GCC complains for a good reason. Fixes: 16962b2404ac ("bpf: sockmap, add selftests") Fixes: 73563aa3d977 ("selftests/bpf: test_sockmap, print additional test options") Fixes: 1ade9abadfca ("bpf: test_sockmap, add options for msg_pop_data() helper") Fixes: 463bac5f1ca7 ("bpf, selftests: Add test for ktls with skb bpf ingress policy") Fixes: e9dd904708c4 ("bpf: add tls support for testing in test_sockmap") Fixes: 753fb2ee0934 ("bpf: sockmap, add msg_peek tests to test_sockmap") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201203235440.2302137-2-andrii@kernel.org commit 3015b500ae42356936b9b4a8b660eacaee7a6147 Author: Andrii Nakryiko Date: Thu Dec 3 15:54:39 2020 -0800 libbpf: Use memcpy instead of strncpy to please GCC Some versions of GCC are really nit-picky about strncpy() use. Use memcpy(), as they are pretty much equivalent for the case of fixed length strings. Fixes: e459f49b4394 ("libbpf: Separate XDP program load with xsk socket creation") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201203235440.2302137-1-andrii@kernel.org commit 8158c5fd619d42e94a006e9fb8005fb8a4e6f4d4 Merge: cadd64807cd83 1e38abefcfd65 Author: Alexei Starovoitov Date: Thu Dec 3 17:38:22 2020 -0800 Merge branch 'Support BTF-powered BPF tracing programs for kernel modules' Andrii Nakryiko says: ==================== This patch sets extends kernel and libbpf with support for attaching BTF-powered raw tracepoint (tp_btf) and tracing (fentry/fexit/fmod_ret/lsm) BPF programs to BPF hooks defined in kernel modules. As part of that, libbpf now supports performing CO-RE relocations against types in kernel module BTFs, in addition to existing vmlinux BTF support. Kernel UAPI for BPF_PROG_LOAD now allows to specify kernel module (or vmlinux) BTF object FD in attach_btf_obj_fd field, aliased to attach_prog_fd. This is used to identify which BTF object needs to be used for finding BTF type by provided attach_btf_id. This patch set also sets up a convenient and fully-controlled custom kernel module (called "bpf_testmod"), that is a predictable playground for all the BPF selftests, that rely on module BTFs. Currently pahole doesn't generate BTF_KIND_FUNC info for ftrace-able static functions in kernel modules, so expose traced function in bpf_sidecar.ko. Once pahole is enhanced, we can go back to static function. From end user perspective there are no extra actions that need to happen. Libbpf will continue searching across all kernel module BTFs, if desired attach BTF type is not found in vmlinux. That way it doesn't matter if BPF hook that user is trying to attach to is built into vmlinux image or is loaded in kernel module. v5->v6: - move btf_put() back to syscall.c (kernel test robot); - added close(fd) in patch #5 (John); v4->v5: - use FD to specify BTF object (Alexei); - move prog->aux->attach_btf putting into bpf_prog_free() for consistency with putting prog->aux->dst_prog; - fix BTF FD leak(s) in libbpf; v3->v4: - merge together patch sets [0] and [1]; - avoid increasing bpf_reg_state by reordering fields (Alexei); - preserve btf_data_size in struct module; v2->v3: - fix subtle uninitialized variable use in BTF ID iteration code; v1->v2: - module_put() inside preempt_disable() region (Alexei); - bpf_sidecar -> bpf_testmod rename (Alexei); - test_progs more relaxed handling of bpf_testmod; - test_progs marks skipped sub-tests properly as SKIP now. [0] https://patchwork.kernel.org/project/netdevbpf/list/?series=393677&state=* [1] https://patchwork.kernel.org/project/netdevbpf/list/?series=393679&state=* ==================== Signed-off-by: Alexei Starovoitov commit 1e38abefcfd65f3ef7b12895dfd48db80aca28da Author: Andrii Nakryiko Date: Thu Dec 3 12:46:34 2020 -0800 selftests/bpf: Add fentry/fexit/fmod_ret selftest for kernel module Add new selftest checking attachment of fentry/fexit/fmod_ret (and raw tracepoint ones for completeness) BPF programs to kernel module function. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201203204634.1325171-15-andrii@kernel.org commit bc9ed69c79ae7577314a24e09c5b0d1c1c314ced Author: Andrii Nakryiko Date: Thu Dec 3 12:46:33 2020 -0800 selftests/bpf: Add tp_btf CO-RE reloc test for modules Add another CO-RE relocation test for kernel module relocations. This time for tp_btf with direct memory reads. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201203204634.1325171-14-andrii@kernel.org commit 91abb4a6d79df6c4dcd86d85632df53c8cca2dcf Author: Andrii Nakryiko Date: Thu Dec 3 12:46:32 2020 -0800 libbpf: Support attachment of BPF tracing programs to kernel modules Teach libbpf to search for BTF types in kernel modules for tracing BPF programs. This allows attachment of raw_tp/fentry/fexit/fmod_ret/etc BPF program types to tracepoints and functions in kernel modules. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201203204634.1325171-13-andrii@kernel.org commit 6aef10a481a3f42c8021fe410e07440c0d71a5fc Author: Andrii Nakryiko Date: Thu Dec 3 12:46:31 2020 -0800 libbpf: Factor out low-level BPF program loading helper Refactor low-level API for BPF program loading to not rely on public API types. This allows painless extension without constant efforts to cleverly not break backwards compatibility. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201203204634.1325171-12-andrii@kernel.org commit 290248a5b7d829871b3ea3c62578613a580a1744 Author: Andrii Nakryiko Date: Thu Dec 3 12:46:30 2020 -0800 bpf: Allow to specify kernel module BTFs when attaching BPF programs Add ability for user-space programs to specify non-vmlinux BTF when attaching BTF-powered BPF programs: raw_tp, fentry/fexit/fmod_ret, LSM, etc. For this, attach_prog_fd (now with the alias name attach_btf_obj_fd) should specify FD of a module or vmlinux BTF object. For backwards compatibility reasons, 0 denotes vmlinux BTF. Only kernel BTF (vmlinux or module) can be specified. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201203204634.1325171-11-andrii@kernel.org commit 22dc4a0f5ed11b6dc8fd73a0892fa0ea1a4c3cdf Author: Andrii Nakryiko Date: Thu Dec 3 12:46:29 2020 -0800 bpf: Remove hard-coded btf_vmlinux assumption from BPF verifier Remove a permeating assumption thoughout BPF verifier of vmlinux BTF. Instead, wherever BTF type IDs are involved, also track the instance of struct btf that goes along with the type ID. This allows to gradually add support for kernel module BTFs and using/tracking module types across BPF helper calls and registers. This patch also renames btf_id() function to btf_obj_id() to minimize naming clash with using btf_id to denote BTF *type* ID, rather than BTF *object*'s ID. Also, altough btf_vmlinux can't get destructed and thus doesn't need refcounting, module BTFs need that, so apply BTF refcounting universally when BPF program is using BTF-powered attachment (tp_btf, fentry/fexit, etc). This makes for simpler clean up code. Now that BTF type ID is not enough to uniquely identify a BTF type, extend BPF trampoline key to include BTF object ID. To differentiate that from target program BPF ID, set 31st bit of type ID. BTF type IDs (at least currently) are not allowed to take full 32 bits, so there is no danger of confusing that bit with a valid BTF type ID. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201203204634.1325171-10-andrii@kernel.org commit 6bcd39d366b64318562785d5b47c2837e3a53ae5 Author: Andrii Nakryiko Date: Thu Dec 3 12:46:28 2020 -0800 selftests/bpf: Add CO-RE relocs selftest relying on kernel module BTF Add a self-tests validating libbpf is able to perform CO-RE relocations against the type defined in kernel module BTF. if bpf_testmod.o is not supported by the kernel (e.g., due to version mismatch), skip tests, instead of failing. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201203204634.1325171-9-andrii@kernel.org commit 5ed31472b9ad6373a0a24bc21186b5eac999213d Author: Andrii Nakryiko Date: Thu Dec 3 12:46:27 2020 -0800 selftests/bpf: Add support for marking sub-tests as skipped Previously skipped sub-tests would be counted as passing with ":OK" appened in the log. Change that to be accounted as ":SKIP". Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201203204634.1325171-8-andrii@kernel.org commit 9f7fa225894c7fcb014f3699a402fcc4d896cb1c Author: Andrii Nakryiko Date: Thu Dec 3 12:46:26 2020 -0800 selftests/bpf: Add bpf_testmod kernel module for testing Add bpf_testmod module, which is conceptually out-of-tree module and provides ways for selftests/bpf to test various kernel module-related functionality: raw tracepoint, fentry/fexit/fmod_ret, etc. This module will be auto-loaded by test_progs test runner and expected by some of selftests to be present and loaded. Pahole currently isn't able to generate BTF for static functions in kernel modules, so make sure traced function is global. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20201203204634.1325171-7-andrii@kernel.org commit 4f33a53d56000cfa67e2e4e8a5dac08f084a979b Author: Andrii Nakryiko Date: Thu Dec 3 12:46:25 2020 -0800 libbpf: Add kernel module BTF support for CO-RE relocations Teach libbpf to search for candidate types for CO-RE relocations across kernel modules BTFs, in addition to vmlinux BTF. If at least one candidate type is found in vmlinux BTF, kernel module BTFs are not iterated. If vmlinux BTF has no matching candidates, then find all kernel module BTFs and search for all matching candidates across all of them. Kernel's support for module BTFs are inferred from the support for BTF name pointer in BPF UAPI. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201203204634.1325171-6-andrii@kernel.org commit 0f7515ca7cddadabe04e28e20a257b1bbb6cb98a Author: Andrii Nakryiko Date: Thu Dec 3 12:46:24 2020 -0800 libbpf: Refactor CO-RE relocs to not assume a single BTF object Refactor CO-RE relocation candidate search to not expect a single BTF, rather return all candidate types with their corresponding BTF objects. This will allow to extend CO-RE relocations to accommodate kernel module BTFs. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20201203204634.1325171-5-andrii@kernel.org commit a19f93cfafdf85851c69bc9f677aa4f40c53610f Author: Andrii Nakryiko Date: Thu Dec 3 12:46:23 2020 -0800 libbpf: Add internal helper to load BTF data by FD Add a btf_get_from_fd() helper, which constructs struct btf from in-kernel BTF data by FD. This is used for loading module BTFs. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201203204634.1325171-4-andrii@kernel.org commit 2fe8890848c799515a881502339a0a7b2b555988 Author: Andrii Nakryiko Date: Thu Dec 3 12:46:22 2020 -0800 bpf: Keep module's btf_data_size intact after load Having real btf_data_size stored in struct module is benefitial to quickly determine which kernel modules have associated BTF object and which don't. There is no harm in keeping this info, as opposed to keeping invalid pointer. Fixes: 607c543f939d ("bpf: Sanitize BTF data pointer after module is loaded") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201203204634.1325171-3-andrii@kernel.org commit 12cc126df82c96c89706aa207ad27c56f219047c Author: Andrii Nakryiko Date: Thu Dec 3 12:46:21 2020 -0800 bpf: Fix bpf_put_raw_tracepoint()'s use of __module_address() __module_address() needs to be called with preemption disabled or with module_mutex taken. preempt_disable() is enough for read-only uses, which is what this fix does. Also, module_put() does internal check for NULL, so drop it as well. Fixes: a38d1107f937 ("bpf: support raw tracepoints in modules") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20201203204634.1325171-2-andrii@kernel.org commit cadd64807cd83e2213dcb70f93d12d978c02b5fa Merge: 2faa7328f53b3 55144f31f0d2f Author: Alexei Starovoitov Date: Thu Dec 3 17:23:24 2020 -0800 Merge branch 'Add support to set window_clamp from bpf setsockops' Prankur gupta says: ==================== This patch contains support to set tcp window_field field from bpf setsockops. v2: Used TCP_WINDOW_CLAMP setsockopt logic for bpf_setsockopt (review comment addressed) v3: Created a common function for duplicated code (review comment addressed) v4: Removing logic to pass struct sock and struct tcp_sock together (review comment addressed) ==================== Acked-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov commit 55144f31f0d2fdd3e74ead67f1649bf577961eaa Author: Prankur gupta Date: Wed Dec 2 13:31:52 2020 -0800 selftests/bpf: Add Userspace tests for TCP_WINDOW_CLAMP Adding selftests for new added functionality to set TCP_WINDOW_CLAMP from bpf setsockopt. Signed-off-by: Prankur gupta Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201202213152.435886-3-prankgup@fb.com commit cb81110997d1f5097f29dd8e49d32a1fc55cbf86 Author: Prankur gupta Date: Wed Dec 2 13:31:51 2020 -0800 bpf: Adds support for setting window clamp Adds a new bpf_setsockopt for TCP sockets, TCP_BPF_WINDOW_CLAMP, which sets the maximum receiver window size. It will be useful for limiting receiver window based on RTT. Signed-off-by: Prankur gupta Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201202213152.435886-2-prankgup@fb.com commit 55fd59b003f6e8fd88cf16590e79823d7ccf3026 Merge: a4390e966f952 bbe2ba04c5a92 Author: Jakub Kicinski Date: Thu Dec 3 15:42:13 2020 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Conflicts: drivers/net/ethernet/ibm/ibmvnic.c Signed-off-by: Jakub Kicinski commit fef92cd2bc04c64bb3743d40c0b4be47aedf9e23 Merge: b996544916429 ab3105446f1ec Author: Thomas Gleixner Date: Fri Dec 4 00:39:45 2020 +0100 Merge tag 'timers-v5.11' of https://git.linaro.org/people/daniel.lezcano/linux into timers/core Pull clocksource/event driver updates from Daniel Lezcano: - Add static annotation for the sp804 init functions (Zhen Lei) - Code cleanups and error code path at init time fixes on the sp804 (Kefen Wang) - Add new OST timer driver device tree bindings (Zhou Yanjie) - Remove EZChip NPS clocksource driver corresponding to the NPS platform which was removed from the ARC architecture (Vineet Gupta) - Add missing clk_disable_unprepare() on error path for Orion (Yang Yingliang) - Add device tree bindings documentation for Renesas r8a774e1 (Marian-Cristian Rotariu) - Convert Renesas TMU to json-schema (Geert Uytterhoeven) - Fix memory leak on the error path at init time on the cadence_ttc driver (Yu Kuai) - Fix section mismatch for Ingenic timer driver (Daniel Lezcano) - Make RISCV_TIMER depends on RISCV_SBI (Kefeng Wang) Link: https://lore.kernel.org/r/028084fa-d29b-a1d5-7eab-17f77ef69863@linaro.org commit bccce80bbd44ab50bbec761a51c6293c1ce47e34 Author: Eric Farman Date: Thu Dec 3 22:35:12 2020 +0100 vfio-ccw: Wire in the request callback The device is being unplugged, so pass the request to userspace to ask for a graceful cleanup. This should free up the thread that would otherwise loop waiting for the device to be fully released. Signed-off-by: Eric Farman Reviewed-by: Cornelia Huck Signed-off-by: Alex Williamson commit a15ac665b9e9c90b1557499f2a46c1e89d29154a Author: Eric Farman Date: Thu Dec 3 22:35:11 2020 +0100 vfio-mdev: Wire in a request handler for mdev parent While performing some destructive tests with vfio-ccw, where the paths to a device are forcible removed and thus the device itself is unreachable, it is rather easy to end up in an endless loop in vfio_del_group_dev() due to the lack of a request callback for the associated device. In this example, one MDEV (77c) is used by a guest, while another (77b) is not. The symptom is that the iommu is detached from the mdev for 77b, but not 77c, until that guest is shutdown: [ 238.794867] vfio_ccw 0.0.077b: MDEV: Unregistering [ 238.794996] vfio_mdev 11f2d2bc-4083-431d-a023-eff72715c4f0: Removing from iommu group 2 [ 238.795001] vfio_mdev 11f2d2bc-4083-431d-a023-eff72715c4f0: MDEV: detaching iommu [ 238.795036] vfio_ccw 0.0.077c: MDEV: Unregistering ...silence... Let's wire in the request call back to the mdev device, so that a device being physically removed from the host can be (gracefully?) handled by the parent device at the time the device is removed. Add a message when registering the device if a driver doesn't provide this callback, so a clue is given that this same loop may be encountered in a similar situation, and a message when this occurs instead of the awkward silence noted above. Signed-off-by: Eric Farman Reviewed-by: Cornelia Huck Signed-off-by: Alex Williamson commit 7d2c6b1edf790d96e9017a0b27be2425e1af1532 Author: Mauro Carvalho Chehab Date: Wed Dec 2 09:17:32 2020 +0100 scripts: kernel-doc: fix parsing function-like typedefs Changeset 6b80975c6308 ("scripts: kernel-doc: fix typedef parsing") added support for things like: typedef unsigned long foo(); However, it caused a regression on this prototype: typedef bool v4l2_check_dv_timings_fnc(const struct v4l2_dv_timings *t, void *handle); This is only noticed after adding a patch that checks if the kernel-doc identifier matches the typedef: ./scripts/kernel-doc -none $(git grep '^.. kernel-doc::' Documentation/ |cut -d ' ' -f 3|sort|uniq) 2>&1|grep expecting include/media/v4l2-dv-timings.h:38: warning: expecting prototype for typedef v4l2_check_dv_timings_fnc. Prototype was for typedef nc instead The problem is that, with the new parsing logic, it is not checking for complete words at the type part. Fix it by adding a \b at the end of each type word at the regex. fixes: 6b80975c6308 ("scripts: kernel-doc: fix typedef parsing") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/218ff56dcb8e73755005d3fb64586eb1841a276b.1606896997.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit e0a45cda66423e56d15b219e4da4f4d530cf9236 Author: Andrew Klychkov Date: Wed Dec 2 10:54:38 2020 +0300 Documentation: fix typos found in process, dev-tools, and doc-guide subdirectories Fix four typos in kcov.rst, sphinx.rst, clang-format.rst, and embargoed-hardware-issues.rst Signed-off-by: Andrew Klychkov Acked-by: Randy Dunlap Acked-by: Miguel Ojeda Link: https://lore.kernel.org/r/20201202075438.GA35516@spblnx124.lan Signed-off-by: Jonathan Corbet commit c900acb7dfe1ae1f5ceca75cc1317f4cda0d3276 Author: Andrew Klychkov Date: Wed Dec 2 10:49:38 2020 +0300 Documentation: fix typos in process/kernel-docs.rst Fix two typos in kernel-docs.rst Signed-off-by: Andrew Klychkov Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20201202074938.GA35075@spblnx124.lan Signed-off-by: Jonathan Corbet commit 263b6a5b96a3c35aa025e2a3e8d2a0698cb5af36 Author: Randy Dunlap Date: Tue Dec 1 17:24:09 2020 -0800 Documentation: mount_api: change kernel log wording Change wording to say that messages are logged to the kernel log buffer instead of to dmesg. dmesg is just one program that can print the kernel log buffer. Signed-off-by: Randy Dunlap Cc: David Howells Cc: Andrew Morton Cc: Alexander Viro Link: https://lore.kernel.org/r/20201202012409.19194-1-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit ce9af89392024f57247187afc345991b784f9bae Author: Marek Szyprowski Date: Wed Dec 2 12:13:18 2020 +0100 rtc: s3c: Remove dead code related to periodic tick handling Support for periodic tick interrupts has been moved from the RTC class to the HR-timers long time ago. Then it has been removed from this driver by commits 80d4bb515b78 ("RTC: Cleanup rtc_class_ops->irq_set_state") and 696160fec162 ("RTC: Cleanup rtc_class_ops->irq_set_freq()"). They however did not remove all the code related to the tick handling. Do it now then. Signed-off-by: Marek Szyprowski Signed-off-by: Alexandre Belloni Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201202111318.5353-2-m.szyprowski@samsung.com commit 31b16d978f902bd9ac7fdc20738f67e39959cd5c Author: Marek Szyprowski Date: Wed Dec 2 12:13:17 2020 +0100 rtc: s3c: Disable all enable (RTC, tick) bits in the probe Bootloader might use RTC hardware and leave it in the enabled state. Ensure that the potentially enabled periodic tick interrupts are disabled before enabling the driver, because they might cause lockup if tick interrupt happens after disabling RTC gate clock. Signed-off-by: Marek Szyprowski Signed-off-by: Alexandre Belloni Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201202111318.5353-1-m.szyprowski@samsung.com commit 00c33482bb6110bce8110daa351f9b3baf4df7dc Author: Nikita Shubin Date: Tue Dec 1 12:55:07 2020 +0300 rtc: ep93xx: Fix NULL pointer dereference in ep93xx_rtc_read_time Mismatch in probe platform_set_drvdata set's and method's that call dev_get_platdata will result in "Unable to handle kernel NULL pointer dereference", let's use according method for getting driver data after platform_set_drvdata. 8<--- cut here --- Unable to handle kernel NULL pointer dereference at virtual address 00000000 pgd = (ptrval) [00000000] *pgd=00000000 Internal error: Oops: 5 [#1] ARM Modules linked in: CPU: 0 PID: 1 Comm: swapper Not tainted 5.9.10-00003-g723e101e0037-dirty #4 Hardware name: Technologic Systems TS-72xx SBC PC is at ep93xx_rtc_read_time+0xc/0x2c LR is at __rtc_read_time+0x4c/0x8c [...] [] (ep93xx_rtc_read_time) from [] (__rtc_read_time+0x4c/0x8c) [] (__rtc_read_time) from [] (rtc_read_time+0x2c/0x4c) [] (rtc_read_time) from [] (__rtc_read_alarm+0x28/0x358) [] (__rtc_read_alarm) from [] (__rtc_register_device+0x124/0x2ec) [] (__rtc_register_device) from [] (ep93xx_rtc_probe+0xa4/0xac) [] (ep93xx_rtc_probe) from [] (platform_drv_probe+0x24/0x5c) [] (platform_drv_probe) from [] (really_probe+0x218/0x374) [] (really_probe) from [] (device_driver_attach+0x44/0x60) [] (device_driver_attach) from [] (__driver_attach+0xb4/0xc0) [] (__driver_attach) from [] (bus_for_each_dev+0x68/0xac) [] (bus_for_each_dev) from [] (driver_attach+0x18/0x24) [] (driver_attach) from [] (bus_add_driver+0x150/0x1b4) [] (bus_add_driver) from [] (driver_register+0xb0/0xf4) [] (driver_register) from [] (__platform_driver_register+0x30/0x48) [] (__platform_driver_register) from [] (ep93xx_rtc_driver_init+0x10/0x1c) [] (ep93xx_rtc_driver_init) from [] (do_one_initcall+0x7c/0x1c0) [] (do_one_initcall) from [] (kernel_init_freeable+0x168/0x1ac) [] (kernel_init_freeable) from [] (kernel_init+0x8/0xf4) [] (kernel_init) from [] (ret_from_fork+0x14/0x34) Exception stack(0xc441dfb0 to 0xc441dff8) dfa0: 00000000 00000000 00000000 00000000 dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 Code: e12fff1e e92d4010 e590303c e1a02001 (e5933000) ---[ end trace c914d6030eaa95c8 ]--- Fixes: b809d192eb98 ("rtc: ep93xx: stop setting platform_data") Signed-off-by: Nikita Shubin Signed-off-by: Alexandre Belloni Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20201201095507.10317-1-nikita.shubin@maquefel.me commit 27b03cf1b772f40f97f5c22dafce668436fb548d Author: Sumera Priyadarsini Date: Thu Nov 26 13:27:30 2020 +0530 Documentation: Coccinelle: Improve command example for debugging patches Modify Coccinelle documentation to clarify usage of make command to run coccicheck on a folder. Changes in v2: - Give example of folder instead of file - Add note Signed-off-by: Sumera Priyadarsini Link: https://lore.kernel.org/r/20201126075730.w6brpeuviefmsxhl@adolin Signed-off-by: Jonathan Corbet commit 1ae20eb1eca733c640f6d478bbd57c1d814b6064 Author: Alexandre Belloni Date: Sun Nov 22 00:06:44 2020 +0100 rtc: test: remove debug message Remove leftover debug message Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201121230644.572419-1-alexandre.belloni@bootlin.com commit 0020868f2a7037e87d6b3b196526de2fb885830d Author: Alexandre Belloni Date: Sat Nov 21 23:45:29 2020 +0100 rtc: mxc{,_v2}: enable COMPILE_TEST Extend code coverage for the rtc-mxc and rtc-mxc-v2 drivers. Signed-off-by: Alexandre Belloni Reviewed-by: Fabio Estevam Link: https://lore.kernel.org/r/20201121224529.568237-1-alexandre.belloni@bootlin.com commit 9c7957991e56291c59803cf0412127ae7177beac Author: Johannes Berg Date: Fri Nov 20 21:11:06 2020 +0100 rtc: enable RTC framework on ARCH=um There's no real reason it should be disabled, and at least we can use it for development & testing with the RTC test driver. However, two devices are missing a HAS_IOMEM dependency, so add that to avoid build failures from e.g. allyesconfig. Signed-off-by: Johannes Berg Signed-off-by: Alexandre Belloni Acked-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201120211103.6895ac740d11.Ic19a9926e8e4c70c03329e55f9e5b1d45095b904@changeid commit ed13a92d0fdec0f36791343d39bc646d91cd7d98 Author: Mauro Carvalho Chehab Date: Mon Nov 30 16:36:35 2020 +0100 docs: archis: add a per-architecture features list Add a feature list matrix for each architecture to their respective Kernel books. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/9c39d4dd93e05c0008205527d2c3450912f029ed.1606748711.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 63fdc4625a5a8b726b3bd12788715ade33f0df17 Author: Mauro Carvalho Chehab Date: Mon Nov 30 16:36:34 2020 +0100 docs: admin-guide: add a features list Add a feature list matrix at the admin-guide. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/f6c1e366fbc7ce1c9c94c7dc6c7852c6377cc0be.1606748711.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit b97212255f44b70c986ecde6004021ba6c835614 Author: Mauro Carvalho Chehab Date: Mon Nov 30 16:36:33 2020 +0100 sphinx: kernel_feat.py: add a script to parse feature files The feature files have a special well-defined format. Add a script that parses them, allowing to search for a feature and/or by an architecture and to produce ReST-compatible outputs. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/bb2e51e5aa883e2583a4a6280f1c1b391bd8ef4c.1606748711.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit ca908577790fd0dc3070813b752d7eb7f74e609f Author: Mauro Carvalho Chehab Date: Mon Nov 30 16:36:32 2020 +0100 scripts: get_feat.pl: use its implementation for list-arch.sh Add support for the same output format as the bash script, and use its implementation instead of the previous one. I opted to do such patch in order to have a single script responsible for parsing Documentation/features and produce different outputs. As someone may rely on the past format, which is easy to parse it, get_feat.pl now gains a new command with the same output format as the previous script. As a side effect, the perl script is a lot faster, as it reads each file only once, instead of parsing files several times via a for command and grep commands inside it. This patch also changes the features list order to be case-insensitive, in order to better match the output of the existing script. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/a97f49677805ad4e6b982d02c0db8c9dfbbd20a6.1606748711.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit ba813f7c2dc894eebcb3f8a66c0e9e26e53a4923 Author: Mauro Carvalho Chehab Date: Mon Nov 30 16:36:31 2020 +0100 scripts: get_feat.pl: improve matrix output Instead of producing a too wide table, let's split it per subsystem, and use a better notation in order to make easier for the reader to identify how a feature is supported on multiple architectures. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/9c3e8c813e8146c5c30e10fa75974f8fbfe6016a.1606748711.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 52a4be3ffc0fe2cc6af779c35525846cda7dea28 Author: Mauro Carvalho Chehab Date: Mon Nov 30 16:36:30 2020 +0100 scripts: get_feat.pl: add a script to handle Documentation/features The Documentation/features contains a set of parseable files. It is not worth converting them to ReST format, as they're useful the way it is. It is, however, interesting to parse them and produce output on different formats: 1) Output the contents of a feature in ReST format; 2) Output what features a given architecture supports; 3) Output a matrix with features x architectures. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/8b0c1ad06d689283a6d78c4ccd188a02c3acc0de.1606748711.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 332037d4bb28ee6ca1fb6e945be425ecf15da9f8 Merge: 1de16e38f1fdb 560c6b914c6ec Author: Greg Kroah-Hartman Date: Thu Dec 3 22:10:58 2020 +0100 Merge tag 'iio-for-5.11b-take2' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: 2nd set of IIO device support, features, cleanups and yaml conversions for 5.11 v2: Fix some missing Sign offs from me that Greg found in v1. Includes low priority/late breaking/long standing bug fixes. Note this includes the last few patches that were listed in the description for the previous pull request but weren't actually in the PULL. New devices support * bosch,bmc150-accel - Support for BMA222, including adding binding doc that was previously missing. * st,lsm6dsx - Support LSM6DSOP accelerometer + gyroscope sensor. yaml-conversions by manufacturer * core - adc - iio-binding (drop as now in dt-schema) - temperature (drop as not clear it is generic) * generic (no specific manufacturer) - dpot-dac - current-sense-amplifier - current-sense-shunt - envelope-detector - voltage-divider * adi,ad5592r adi,ad7124 adi,ad7292 adi,adf4350 * atmel,sama9260-adc * bosch,bma180 bosch,bmg180 * brcm,iproc-static-adc * capella,cm3605 * fsl,mma8452 * kionix,kxcjk1013 * maxim,max1027 (from trivial) * mediatek,mt2701-auxdac * microchip,mcp4531 (from trivial) * qcom,pm8018-adc qcom,spi-iadc * st,st-sensors * ti,ads124s08 ti,afe4403 ti,afe4404 ti,lmp91000 ti,palmas-gpadc Features * bosch,bmc150 - Handle unusual ACPI binding where two devices are provided in a single ACPI device (BOSC0200). - ACPI based mount matrix handling * st,hts221 - regulator control * st,lsm6dsx - regulator control Cleanup + minor fixes * core - Reduce duplication in iio_format_avail_{list,range}() and iio_format_list() - Fix an issue in the demux update code that could lead to misaligned data. Possible no existing driver hits this. Been there a very long time with no bug reports. - Improve iio_map_array_register() error handling. - Avoid polling driver again if try_reenable() callback returns non 0. Only users of this were bugs so also drop the return value. * core/cb_buffer - Return an error if no callback provided (include adding a dummy for one unusual case where no callback is valid). * trigger/hrtimer-trig, sysfs-trig - Fix an issue seen with PREEMPT_RT by marking irq_work as expiring in hard interrupt context. * adi,ad_sigma_delta library - Avoid putting SPI transfer buffers on stack for DMA safety reasons * adi,ad5272 - Fix discrepancy in polarity of reset line between binding documentation (which was right) and driver. * adi,ad7298 - Use devm for all of probe * atmel,at91_adc - Drop at91_adc_ids as only support DT probe - Simplify resolution selection and bindings - Drop binding for triggers and move into driver based on compatible. - Merge at91_adc_probe_dt() into main at91_adc_probe() * bosch,bmc150 - Drop unused structure member. * bosch,bmi160 - Fix overly long buffer due to wrong channel count. - Fix potential buffer alignment into iio_push_to_buffers_with_timestamp() * fsl,mag3110 - Fix potential buffer alignment into iio_push_to_buffers_with_timestamp() * fsl,mpl3115 - Fix potential buffer alignment into iio_push_to_buffers_with_timestamp() * invn,mpu3050 - Use 64 bit local variable and FIELD_GET to simplify code that extracts values from OTP. * qcom,spmi-vadc - Drop wrong use of io-channel-ranges in binding doc. * rockchip,saradc - Fix a missing clk_disable_unprepare() in an error path. * rohm,rpr0521 - Fix potential buffer alignment into iio_push_to_buffers_with_timestamp() * samsung,exynos-adc - Drop wrong use of io-channel-ranges in binding doc. * st,lsm6dsx - Reduce duplication in the chip model specific tables. - Fix an issue with missed edge-interrupts that can occur when using the FIFO. * st,uvis21 - Fix potential buffer alignment into iio_push_to_buffers_with_timestamp() * ti,adc084s021 - Tidy up endian types to clear a warning. * ti,ads124s08 - Fix too long a buffer. - Fix potential buffer alignment into iio_push_to_buffers_with_timestamp() Counter * microchip,tcb-counter - Add Kamel Bouhara to MAINTAINERS - Fix CMR value check * tag 'iio-for-5.11b-take2' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (80 commits) iio: adc: rockchip_saradc: fix missing clk_disable_unprepare() on error in rockchip_saradc_resume iio: imu: st_lsm6dsx: fix edge-trigger interrupts counter: microchip-tcb-capture: Fix CMR value check iio: sysfs-trigger: Mark irq_work to expire in hardirq context iio: hrtimer-trigger: Mark hrtimer to expire in hard interrupt context iio: accel: bmc150: Get mount-matrix from ACPI iio: accel: bmc150: Check for a second ACPI device for BOSC0200 iio: accel: bmc150: Removed unused bmc150_accel_dat irq member iio:gyro:mpu3050 Treat otp value as a __le64 and use FIELD_GET() to break up iio:adc:ti-ads124s08: Fix alignment and data leak issues. iio:adc:ti-ads124s08: Fix buffer being too long. iio:pressure:mpl3115: Force alignment of buffer iio:imu:bmi160: Fix alignment and data leak issues iio:imu:bmi160: Fix too large a buffer. iio:magnetometer:mag3110: Fix alignment and data leak issues. iio:light:st_uvis25: Fix timestamp alignment and prevent data leak. iio:light:rpr0521: Fix timestamp alignment and prevent data leak. iio:adc:ti-adc084s021 Tidy up endian types iio:trigger: rename try_reenable() to reenable() plus return void iio: Fix: Do not poll the driver again if try_reenable() callback returns non 0. ... commit a4390e966f952510808b10ce7ae2a7dd2a08c0e5 Merge: d4bff72c8401e 3ecfbe3e82099 Author: Jakub Kicinski Date: Thu Dec 3 12:56:05 2020 -0800 Merge branch 'mptcp-reject-invalid-mp_join-requests-right-away' Florian Westphal says: ==================== mptcp: reject invalid mp_join requests right away At the moment MPTCP can detect an invalid join request (invalid token, max number of subflows reached, and so on) right away but cannot reject the connection until the 3WHS has completed. Instead the connection will complete and the subflow is reset afterwards. To send the reset most information is already available, but we don't have good spot where the reset could be sent: 1. The ->init_req callback is too early and also doesn't allow to return an error that could be used to inform the TCP stack that the SYN should be dropped. 2. The ->route_req callback lacks the skb needed to send a reset. 3. The ->send_synack callback is the best fit from the available hooks, but its called after the request socket has been inserted into the queue already. This means we'd have to remove it again right away. From a technical point of view, the second hook would be best: 1. Its before insertion into listener queue. 2. If it returns NULL TCP will drop the packet for us. Problem is that we'd have to pass the skb to the function just for MPTCP. Paolo suggested to merge init_req and route_req callbacks instead: This makes all info available to MPTCP -- a return value of NULL drops the packet and MPTCP can send the reset if needed. Because 'route_req' has a 'const struct sock *', this means either removal of const qualifier, or a bit of code churn to pass 'const' in security land. This does the latter; I did not find any spots that need write access to struct sock. To recap, the two alternatives are: 1. Solve it entirely in MPTCP: use the ->send_synack callback to unlink the request socket from the listener & drop it. 2. Avoid 'security' churn by removing the const qualifier. ==================== Link: https://lore.kernel.org/r/20201130153631.21872-1-fw@strlen.de Signed-off-by: Jakub Kicinski commit 3ecfbe3e820997033beb4181c95d80d5c9ac6f85 Author: Florian Westphal Date: Mon Nov 30 16:36:31 2020 +0100 mptcp: emit tcp reset when a join request fails RFC 8684 says: If the token is unknown or the host wants to refuse subflow establishment (for example, due to a limit on the number of subflows it will permit), the receiver will send back a reset (RST) signal, analogous to an unknown port in TCP, containing an MP_TCPRST option (Section 3.6) with an "MPTCP specific error" reason code. mptcp-next doesn't support MP_TCPRST yet, this can be added in another change. Signed-off-by: Florian Westphal Reviewed-by: Mat Martineau Signed-off-by: Jakub Kicinski commit 7ea851d19b23593d7601ecb8091d529f4f475bf5 Author: Florian Westphal Date: Mon Nov 30 16:36:30 2020 +0100 tcp: merge 'init_req' and 'route_req' functions The Multipath-TCP standard (RFC 8684) says that an MPTCP host should send a TCP reset if the token in a MP_JOIN request is unknown. At this time we don't do this, the 3whs completes and the 'new subflow' is reset afterwards. There are two ways to allow MPTCP to send the reset. 1. override 'send_synack' callback and emit the rst from there. The drawback is that the request socket gets inserted into the listeners queue just to get removed again right away. 2. Send the reset from the 'route_req' function instead. This avoids the 'add&remove request socket', but route_req lacks the skb that is required to send the TCP reset. Instead of just adding the skb to that function for MPTCP sake alone, Paolo suggested to merge init_req and route_req functions. This saves one indirection from syn processing path and provides the skb to the merged function at the same time. 'send reset on unknown mptcp join token' is added in next patch. Suggested-by: Paolo Abeni Cc: Eric Dumazet Signed-off-by: Florian Westphal Signed-off-by: Jakub Kicinski commit 41dd9596d6b239a125c3d19f9d0ca90bdbfbf876 Author: Florian Westphal Date: Mon Nov 30 16:36:29 2020 +0100 security: add const qualifier to struct sock in various places A followup change to tcp_request_sock_op would have to drop the 'const' qualifier from the 'route_req' function as the 'security_inet_conn_request' call is moved there - and that function expects a 'struct sock *'. However, it turns out its also possible to add a const qualifier to security_inet_conn_request instead. Signed-off-by: Florian Westphal Acked-by: James Morris Signed-off-by: Jakub Kicinski commit b7a1f38256da93086fc0c30c986de4b729899148 Author: Alex Deucher Date: Tue Dec 1 17:44:58 2020 -0500 drm/amdgpu/powerplay: parse fan table for CI asics Set up all the parameters required for SMU fan control if supported. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=201539 Acked-by: Evan Quan Signed-off-by: Alex Deucher commit 25dd7a4469ae42369c2d90b1c73cde1e27bf4b54 Author: Mauro Carvalho Chehab Date: Wed Dec 2 09:27:15 2020 +0100 drm: amdgpu: fix a kernel-doc markup The function name at kernel-doc markup doesn't match the name of the function: drivers/gpu/drm/amd/amdgpu/amdgpu_object.c:1534: warning: expecting prototype for amdgpu_debugfs_print_bo_info(). Prototype was for amdgpu_bo_print_info() instead Fix it. Reviewed-by: Christian König Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Alex Deucher commit 85b8350ae99d1300eb6dc072459246c2649a8e50 Author: Nicolas Ferre Date: Thu Dec 3 10:19:49 2020 +0100 ARM: dts: at91: sama5d2: fix CAN message ram offset and size CAN0 and CAN1 instances share the same message ram configured at 0x210000 on sama5d2 Linux systems. According to current configuration of CAN0, we need 0x1c00 bytes so that the CAN1 don't overlap its message ram: 64 x RX FIFO0 elements => 64 x 72 bytes 32 x TXE (TX Event FIFO) elements => 32 x 8 bytes 32 x TXB (TX Buffer) elements => 32 x 72 bytes So a total of 7168 bytes (0x1C00). Fix offset to match this needed size. Make the CAN0 message ram ioremap match exactly this size so that is easily understandable. Adapt CAN1 size accordingly. Fixes: bc6d5d7666b7 ("ARM: dts: at91: sama5d2: add m_can nodes") Reported-by: Dan Sneddon Signed-off-by: Nicolas Ferre Signed-off-by: Alexandre Belloni Tested-by: Cristian Birsan Cc: stable@vger.kernel.org # v4.13+ Link: https://lore.kernel.org/r/20201203091949.9015-1-nicolas.ferre@microchip.com commit 9b5dcc8d427e2bcb84c49eb03ffefe11e7537a55 Author: Claudiu Beznea Date: Wed Dec 2 11:57:05 2020 +0200 ARM: dts: at91: sama5d2: map securam as device Due to strobe signal not being propagated from CPU to securam the securam needs to be mapped as device or strongly ordered memory to work properly. Otherwise, updating to one offset may affect the adjacent locations in securam. Fixes: d4ce5f44d4409 ("ARM: dts: at91: sama5d2: Add securam node") Signed-off-by: Claudiu Beznea Signed-off-by: Alexandre Belloni Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/1606903025-14197-3-git-send-email-claudiu.beznea@microchip.com commit ab8a9bb41b2c330a0b280280bf37b6f3b1dd1e58 Author: Claudiu Beznea Date: Wed Dec 2 11:57:04 2020 +0200 ARM: dts: at91: sam9x60ek: remove bypass property atmel,osc-bypass property sets the bit 1 at main oscillator register. On SAM9X60 this bit is not valid according to datasheet (chapter 28.16.9 PMC Clock Generator Main Oscillator Register). Fixes: 1e5f532c2737 ("ARM: dts: at91: sam9x60: add device tree for soc and board") Signed-off-by: Claudiu Beznea Signed-off-by: Alexandre Belloni Acked-by: Nicolas Ferre Cc: Marco Cardellini Link: https://lore.kernel.org/r/1606903025-14197-2-git-send-email-claudiu.beznea@microchip.com commit 7995fb896b9637a5f59a56ae0d8f2b7ca71a040d Author: Marek Szyprowski Date: Wed Dec 2 13:20:29 2020 +0100 ARM: dts: exynos: Reduce assigned-clocks entries for SPI0 on Artik5 board Commit 2024b130b0c8 ("ARM: dts: exynos: Add Ethernet to Artik 5 board") added ethernet chip on SPI0 bus and the whole bunch of assigned clock entries to ensure proper clock rates and topology. Limit the assigned clock parents only to the direct clocks of the SPI0 device and assume that MPLL clock is already properly configured. The applied clock topology was incorrect as some clocks between were missing, what resulted in the following warning: clk: failed to reparent div_mpll_pre to mout_mpll: -22 Fixes: 2024b130b0c8 ("ARM: dts: exynos: Add Ethernet to Artik 5 board") Signed-off-by: Marek Szyprowski Link: https://lore.kernel.org/r/20201202122029.22198-1-m.szyprowski@samsung.com Signed-off-by: Krzysztof Kozlowski commit 5e9a97b1f4491b8b65874901ad084348fcaba327 Author: Mario Alejandro Posso Escobar Date: Mon Nov 16 17:32:45 2020 +0200 i2c: ismt: Adding support for I2C_SMBUS_BLOCK_PROC_CALL Expand the driver to support I2C_SMBUS_BLOCK_PROC_CALL since HW supports it already. Co-developed-by: Andy Shevchenko Signed-off-by: Andy Shevchenko Signed-off-by: Mario Alejandro Posso Escobar Signed-off-by: Wolfram Sang commit dc4e10b62695558a39aafa65210f5980125285b3 Author: Stefan Lässer Date: Thu Dec 3 16:02:52 2020 +0100 i2c: ocores: Avoid false-positive error log message. Since commit 7723f4c5ecdb ("driver core: platform: Add an error message to platform_get_irq*()"), platform_get_irq() will call dev_err() on an error. In case of i2c ocores this leads to a false-positive error being logged: [ 4.173989] 007: ocores-i2c ocores-i2c: IRQ index 0 not found i2c ocores already handles the case when the IRQ cannot be found and therefore there is no benefit in having this error message being logged. This commit switches to platform_get_irq_optional(), which does not log in case the IRQ cannot be found. Signed-off-by: Stefan Lässer Reviewed-by: Andrew Lunn Reviewed-by: Peter Korsgaard Signed-off-by: Wolfram Sang commit 2faa7328f53b36b2b171501154bba3fd66d8f5da Author: Colin Ian King Date: Thu Dec 3 11:44:52 2020 +0000 samples/bpf: Fix spelling mistake "recieving" -> "receiving" There is a spelling mistake in an error message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Andrii Nakryiko Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/20201203114452.1060017-1-colin.king@canonical.com commit 70f16fab5272bfc5b83c24bc1a8e877697bf17cc Author: Bjorn Andersson Date: Tue Nov 24 12:57:43 2020 -0600 Revert "i2c: qcom-geni: Disable DMA processing on the Lenovo Yoga C630" A combination of recent bug fixes by Doug Anderson and the proper definition of iommu streams means that this hack is no longer needed. Let's clean up the code by reverting '127068abe85b ("i2c: qcom-geni: Disable DMA processing on the Lenovo Yoga C630")'. Signed-off-by: Bjorn Andersson Acked-by: Shawn Guo Acked-by: Caleb Connolly Tested-by: Steev Klimaszewski Reviewed-by: Akash Asthana Signed-off-by: Wolfram Sang commit 58c185b85d0c1753b0b6a9390294bd883faf4d77 Author: Brendan Jackman Date: Thu Dec 3 12:08:50 2020 +0000 bpf: Fix cold build of test_progs-no_alu32 This object lives inside the trunner output dir, i.e. tools/testing/selftests/bpf/no_alu32/btf_data.o At some point it gets copied into the parent directory during another part of the build, but that doesn't happen when building test_progs-no_alu32 from clean. Signed-off-by: Brendan Jackman Signed-off-by: Andrii Nakryiko Acked-by: Jiri Olsa Link: https://lore.kernel.org/bpf/20201203120850.859170-1-jackmanb@google.com commit d6d418bd8f92aaa4c7c26d606188147c2ee0dae9 Author: Stanislav Fomichev Date: Wed Dec 2 15:13:32 2020 -0800 libbpf: Cap retries in sys_bpf_prog_load I've seen a situation, where a process that's under pprof constantly generates SIGPROF which prevents program loading indefinitely. The right thing to do probably is to disable signals in the upper layers while loading, but it still would be nice to get some error from libbpf instead of an endless loop. Let's add some small retry limit to the program loading: try loading the program 5 (arbitrary) times and give up. v2: * 10 -> 5 retires (Andrii Nakryiko) Signed-off-by: Stanislav Fomichev Signed-off-by: Andrii Nakryiko Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201202231332.3923644-1-sdf@google.com commit 9cf309c56f7910a81fbe053b6f11c3b1f0987b12 Author: Toke Høiland-Jørgensen Date: Thu Dec 3 10:33:06 2020 +0100 libbpf: Sanitise map names before pinning When we added sanitising of map names before loading programs to libbpf, we still allowed periods in the name. While the kernel will accept these for the map names themselves, they are not allowed in file names when pinning maps. This means that bpf_object__pin_maps() will fail if called on an object that contains internal maps (such as sections .rodata). Fix this by replacing periods with underscores when constructing map pin paths. This only affects the paths generated by libbpf when bpf_object__pin_maps() is called with a path argument. Any pin paths set by bpf_map__set_pin_path() are unaffected, and it will still be up to the caller to avoid invalid characters in those. Fixes: 113e6b7e15e2 ("libbpf: Sanitise internal map names so they are not rejected by the kernel") Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201203093306.107676-1-toke@redhat.com commit 560c6b914c6ec7d9d9a69fddbb5bf3bf71433e8b Author: Qinglang Miao Date: Tue Nov 3 20:07:43 2020 +0800 iio: adc: rockchip_saradc: fix missing clk_disable_unprepare() on error in rockchip_saradc_resume Fix the missing clk_disable_unprepare() of info->pclk before return from rockchip_saradc_resume in the error handling case when fails to prepare and enable info->clk. Suggested-by: Robin Murphy Fixes: 44d6f2ef94f9 ("iio: adc: add driver for Rockchip saradc") Signed-off-by: Qinglang Miao Cc: Link: https://lore.kernel.org/r/20201103120743.110662-1-miaoqinglang@huawei.com Signed-off-by: Jonathan Cameron commit 3f9bce7a22a3f8ac9d885c9d75bc45569f24ac8b Author: Lorenzo Bianconi Date: Sat Nov 14 19:39:05 2020 +0100 iio: imu: st_lsm6dsx: fix edge-trigger interrupts If we are using edge IRQs, new samples can arrive while processing current interrupt since there are no hw guarantees the irq line stays "low" long enough to properly detect the new interrupt. In this case the new sample will be missed. Polling FIFO status register in st_lsm6dsx_handler_thread routine allow us to read new samples even if the interrupt arrives while processing previous data and the timeslot where the line is "low" is too short to be properly detected. Fixes: 89ca88a7cdf2 ("iio: imu: st_lsm6dsx: support active-low interrupts") Fixes: 290a6ce11d93 ("iio: imu: add support to lsm6dsx driver") Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/5e93cda7dc1e665f5685c53ad8e9ea71dbae782d.1605378871.git.lorenzo@kernel.org Cc: Signed-off-by: Jonathan Cameron commit 3418bd7cfce0bd8ef1ccedc4655f9f86f6c3b0ca Author: William Breathitt Gray Date: Sat Nov 14 18:28:05 2020 -0500 counter: microchip-tcb-capture: Fix CMR value check The ATMEL_TC_ETRGEDG_* defines are not masks but rather possible values for CMR. This patch fixes the action_get() callback to properly check for these values rather than mask them. Fixes: 106b104137fd ("counter: Add microchip TCB capture counter") Signed-off-by: William Breathitt Gray Acked-by: Alexandre Belloni Acked-by: Kamel Bouhara Cc: Link: https://lore.kernel.org/r/20201114232805.253108-1-vilhelm.gray@gmail.com Signed-off-by: Jonathan Cameron commit 0449fc4eead7af2523cd12f312b856dfa93731ed Author: Lars-Peter Clausen Date: Tue Nov 17 11:37:51 2020 +0100 iio: sysfs-trigger: Mark irq_work to expire in hardirq context Mark the IIO sysfs-trigger irq_work with IRQ_WORK_HARD_IRQ to ensure that it is always executed in hard interrupt context, even with PREEMPT_RT=y. The IIO sysfs-trigger irq_work needs to run in hard interrupt context since it will end up calling generic_handle_irq() which has the requirement to run in hard interrupt context. Note that the IRQ_WORK_HARD_IRQ flag, while it exists, does not seem to do anything in the mainline kernel yet. It does have an effect in the RT patchset though and presumably this is sooner or later going to be added to mainline as well. Reported-by: Christian Eggers Signed-off-by: Lars-Peter Clausen Acked-by: Sebastian Andrzej Siewior Link: https://lore.kernel.org/r/20201117103751.16131-2-lars@metafoo.de Signed-off-by: Jonathan Cameron commit 0178297c1e6898e2197fe169ef3be723e019b971 Author: Lars-Peter Clausen Date: Tue Nov 17 11:37:50 2020 +0100 iio: hrtimer-trigger: Mark hrtimer to expire in hard interrupt context On PREEMPT_RT enabled kernels unmarked hrtimers are moved into soft interrupt expiry mode by default. The IIO hrtimer-trigger needs to run in hard interrupt context since it will end up calling generic_handle_irq() which has the requirement to run in hard interrupt context. Explicitly specify that the timer needs to run in hard interrupt context by using the HRTIMER_MODE_REL_HARD flag. Fixes: f5c2f0215e36 ("hrtimer: Move unmarked hrtimers to soft interrupt expiry on RT") Reported-by: Christian Eggers Signed-off-by: Lars-Peter Clausen Acked-by: Sebastian Andrzej Siewior Link: https://lore.kernel.org/r/20201117103751.16131-1-lars@metafoo.de Signed-off-by: Jonathan Cameron commit 8a0672003421fa153d380ad863a405565bf551af Author: Hans de Goede Date: Mon Nov 30 15:19:54 2020 +0100 iio: accel: bmc150: Get mount-matrix from ACPI bmc150 accelerometers with an ACPI hardware-id of BOSC0200 have an ACPI method providing their mount-matrix, add support for retrieving this. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201130141954.339805-3-hdegoede@redhat.com Signed-off-by: Jonathan Cameron commit 5bfb3a4bd8f6b5329464edb9b772738708509d4a Author: Jeremy Cline Date: Mon Nov 30 15:19:53 2020 +0100 iio: accel: bmc150: Check for a second ACPI device for BOSC0200 Some BOSC0200 acpi_device-s describe two accelerometers in a single ACPI device. Normally we would handle this by letting the special drivers/platform/x86/i2c-multi-instantiate.c driver handle the BOSC0200 ACPI id and let it instantiate 2 bmc150_accel type i2c_client-s for us. But doing so changes the modalias for the first accelerometer (which is already supported and used on many devices) from acpi:BOSC0200 to i2c:bmc150_accel. The modalias is not only used to load the driver, but is also used by hwdb matches in /lib/udev/hwdb.d/60-sensor.hwdb which provide a mountmatrix to userspace by setting the ACCEL_MOUNT_MATRIX udev property. Switching the handling of the BOSC0200 over to i2c-multi-instantiate.c will break the hwdb matches causing the ACCEL_MOUNT_MATRIX udev prop to no longer be set. So switching over to i2c-multi-instantiate.c is not an option. Changes by Hans de Goede: -Add explanation to the commit message why i2c-multi-instantiate.c cannot be used -Also set the dev_name, fwnode and irq i2c_board_info struct members for the 2nd client Signed-off-by: Jeremy Cline Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201130141954.339805-2-hdegoede@redhat.com BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=198671 Signed-off-by: Jonathan Cameron commit e488fed07f7bfa2eff113467d7046b79a51c8c44 Author: Hans de Goede Date: Mon Nov 30 15:19:52 2020 +0100 iio: accel: bmc150: Removed unused bmc150_accel_dat irq member The bmc150_accel_dat struct irq member is only ever used inside bmc150_accel_core_probe, drop it and just use the function argument directly. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201130141954.339805-1-hdegoede@redhat.com Signed-off-by: Jonathan Cameron commit 26aec6e1b714f954b22bc7ad3239b6c0e917c90f Author: Jonathan Cameron Date: Sun Nov 29 18:44:59 2020 +0000 iio:gyro:mpu3050 Treat otp value as a __le64 and use FIELD_GET() to break up Inspired by Andy Shevchenko's proposal to use get_unaligned_leXX(). The whole one time programable memory is treated as a single 64bit little endian value. Thus we can avoid a lot of messy handling of fields overlapping byte boundaries by just loading and manipulating it as an __le64 converted to a u64. That lets us just use FIELD_GET() and GENMASK() to extract the values desired. Note only build tested. We need to use GENMASK_ULL and %llX formatters to account for the larger types used in computing the various fields. Signed-off-by: Jonathan Cameron Tested-by: Linus Walleij Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij Cc: Andy Shevchenko Cc: Linus Walleij Link: https://lore.kernel.org/r/20201128185156.428327-1-jic23@kernel.org Link: https://lore.kernel.org/r/20201129184459.647538-1-jic23@kernel.org commit 1e405bc2512f80a903ddd6ba8740cee885238d7f Author: Jonathan Cameron Date: Sun Sep 20 12:27:42 2020 +0100 iio:adc:ti-ads124s08: Fix alignment and data leak issues. One of a class of bugs pointed out by Lars in a recent review. iio_push_to_buffers_with_timestamp() assumes the buffer used is aligned to the size of the timestamp (8 bytes). This is not guaranteed in this driver which uses an array of smaller elements on the stack. As Lars also noted this anti pattern can involve a leak of data to userspace and that indeed can happen here. We close both issues by moving to a suitable structure in the iio_priv() data with alignment explicitly requested. This data is allocated with kzalloc() so no data can leak apart from previous readings. In this driver the timestamp can end up in various different locations depending on what other channels are enabled. As a result, we don't use a structure to specify it's position as that would be misleading. Fixes: e717f8c6dfec ("iio: adc: Add the TI ads124s08 ADC code") Reported-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Cc: Dan Murphy Cc: Link: https://lore.kernel.org/r/20200920112742.170751-9-jic23@kernel.org commit b0bd27f02d768e3a861c4e6c27f8e369720e6c25 Author: Jonathan Cameron Date: Sun Sep 20 12:27:41 2020 +0100 iio:adc:ti-ads124s08: Fix buffer being too long. The buffer is expressed as a u32 array, yet the extra space for the s64 timestamp was expressed as sizeof(s64)/sizeof(u16). This will result in 2 extra u32 elements. Fix by dividing by sizeof(u32). Fixes: e717f8c6dfec ("iio: adc: Add the TI ads124s08 ADC code") Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Cc: Dan Murphy Cc: Link: https://lore.kernel.org/r/20200920112742.170751-8-jic23@kernel.org commit 198cf32f0503d2ad60d320b95ef6fb8243db857f Author: Jonathan Cameron Date: Sun Sep 20 12:27:40 2020 +0100 iio:pressure:mpl3115: Force alignment of buffer Whilst this is another case of the issue Lars reported with an array of elements of smaller than 8 bytes being passed to iio_push_to_buffers_with_timestamp(), the solution here is a bit different from the other cases and relies on __aligned working on the stack (true since 4.6?) This one is unusual. We have to do an explicit memset() each time as we are reading 3 bytes into a potential 4 byte channel which may sometimes be a 2 byte channel depending on what is enabled. As such, moving the buffer to the heap in the iio_priv structure doesn't save us much. We can't use a nice explicit structure on the stack either as the data channels have different storage sizes and are all separately controlled. Fixes: cc26ad455f57 ("iio: Add Freescale MPL3115A2 pressure / temperature sensor driver") Reported-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Reviewed-by: Alexandru Ardelean Cc: Peter Meerwald Cc: Link: https://lore.kernel.org/r/20200920112742.170751-7-jic23@kernel.org commit 7b6b51234df6cd8b04fe736b0b89c25612d896b8 Author: Jonathan Cameron Date: Sun Sep 20 12:27:39 2020 +0100 iio:imu:bmi160: Fix alignment and data leak issues One of a class of bugs pointed out by Lars in a recent review. iio_push_to_buffers_with_timestamp assumes the buffer used is aligned to the size of the timestamp (8 bytes). This is not guaranteed in this driver which uses an array of smaller elements on the stack. As Lars also noted this anti pattern can involve a leak of data to userspace and that indeed can happen here. We close both issues by moving to a suitable array in the iio_priv() data with alignment explicitly requested. This data is allocated with kzalloc() so no data can leak apart from previous readings. In this driver, depending on which channels are enabled, the timestamp can be in a number of locations. Hence we cannot use a structure to specify the data layout without it being misleading. Fixes: 77c4ad2d6a9b ("iio: imu: Add initial support for Bosch BMI160") Reported-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Cc: Daniel Baluta Cc: Daniel Baluta Cc: Link: https://lore.kernel.org/r/20200920112742.170751-6-jic23@kernel.org commit dc7de42d6b50a07b37feeba4c6b5136290fcee81 Author: Jonathan Cameron Date: Sun Sep 20 12:27:38 2020 +0100 iio:imu:bmi160: Fix too large a buffer. The comment implies this device has 3 sensor types, but it only has an accelerometer and a gyroscope (both 3D). As such the buffer does not need to be as long as stated. Note I've separated this from the following patch which fixes the alignment for passing to iio_push_to_buffers_with_timestamp() as they are different issues even if they affect the same line of code. Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Cc: Daniel Baluta Cc: Link: https://lore.kernel.org/r/20200920112742.170751-5-jic23@kernel.org commit 89deb1334252ea4a8491d47654811e28b0790364 Author: Jonathan Cameron Date: Sun Sep 20 12:27:37 2020 +0100 iio:magnetometer:mag3110: Fix alignment and data leak issues. One of a class of bugs pointed out by Lars in a recent review. iio_push_to_buffers_with_timestamp() assumes the buffer used is aligned to the size of the timestamp (8 bytes). This is not guaranteed in this driver which uses an array of smaller elements on the stack. As Lars also noted this anti pattern can involve a leak of data to userspace and that indeed can happen here. We close both issues by moving to a suitable structure in the iio_priv() data. This data is allocated with kzalloc() so no data can leak apart from previous readings. The explicit alignment of ts is not necessary in this case but does make the code slightly less fragile so I have included it. Fixes: 39631b5f9584 ("iio: Add Freescale mag3110 magnetometer driver") Reported-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Cc: Link: https://lore.kernel.org/r/20200920112742.170751-4-jic23@kernel.org commit d837a996f57c29a985177bc03b0e599082047f27 Author: Jonathan Cameron Date: Sun Sep 20 12:27:36 2020 +0100 iio:light:st_uvis25: Fix timestamp alignment and prevent data leak. One of a class of bugs pointed out by Lars in a recent review. iio_push_to_buffers_with_timestamp() assumes the buffer used is aligned to the size of the timestamp (8 bytes). This is not guaranteed in this driver which uses an array of smaller elements on the stack. As Lars also noted this anti pattern can involve a leak of data to userspace and that indeed can happen here. We close both issues by moving to a suitable structure in the iio_priv() This data is allocated with kzalloc() so no data can leak apart from previous readings. A local unsigned int variable is used for the regmap call so it is clear there is no potential issue with writing into the padding of the structure. Fixes: 3025c8688c1e ("iio: light: add support for UVIS25 sensor") Reported-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Acked-by: Lorenzo Bianconi Cc: Link: https://lore.kernel.org/r/20200920112742.170751-3-jic23@kernel.org commit a61817216bcc755eabbcb1cf281d84ccad267ed1 Author: Jonathan Cameron Date: Sun Sep 20 12:27:35 2020 +0100 iio:light:rpr0521: Fix timestamp alignment and prevent data leak. One of a class of bugs pointed out by Lars in a recent review. iio_push_to_buffers_with_timestamp() assumes the buffer used is aligned to the size of the timestamp (8 bytes). This is not guaranteed in this driver which uses an array of smaller elements on the stack. As Lars also noted this anti pattern can involve a leak of data to userspace and that indeed can happen here. We close both issues by moving to a suitable structure in the iio_priv(). This data is allocated with kzalloc() so no data can leak apart from previous readings and in this case the status byte from the device. The forced alignment of ts is not necessary in this case but it potentially makes the code less fragile. >From personal communications with Mikko: We could probably split the reading of the int register, but it would mean a significant performance cost of 20 i2c clock cycles. Fixes: e12ffd241c00 ("iio: light: rpr0521 triggered buffer") Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Cc: Mikko Koivunen Cc: Link: https://lore.kernel.org/r/20200920112742.170751-2-jic23@kernel.org commit a96bd58090af6cade3cdf736111aacf23464cab8 Author: Jonathan Cameron Date: Wed Jul 22 16:50:58 2020 +0100 iio:adc:ti-adc084s021 Tidy up endian types By adding a few local variables and avoiding a void * for a parameter we can easily make all the endian types explicit and get rid of the warnings from sparse: CHECK drivers/iio/adc/ti-adc084s021.c drivers/iio/adc/ti-adc084s021.c:84:26: warning: incorrect type in assignment (different base types) drivers/iio/adc/ti-adc084s021.c:84:26: expected unsigned short [usertype] drivers/iio/adc/ti-adc084s021.c:84:26: got restricted __be16 drivers/iio/adc/ti-adc084s021.c:115:24: warning: cast to restricted __be16 drivers/iio/adc/ti-adc084s021.c:115:24: warning: cast to restricted __be16 drivers/iio/adc/ti-adc084s021.c:115:24: warning: cast to restricted __be16 drivers/iio/adc/ti-adc084s021.c:115:24: warning: cast to restricted __be16 Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200722155103.979802-23-jic23@kernel.org commit eca8523a388f65cc0f515e3db4f3b027d7546532 Author: Jonathan Cameron Date: Sun Sep 20 14:25:48 2020 +0100 iio:trigger: rename try_reenable() to reenable() plus return void As we no longer support a try again if we cannot reenable the trigger rename the function to reflect this. Also we don't do anything with the value returned so stop it returning anything. For the few drivers that didn't already print an error message in this patch, add such a print. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen Acked-by: Linus Walleij Acked-by: Srinivas Pandruvada Cc: Linus Walleij Cc: Srinivas Pandruvada Cc: Christian Oder Cc: Eugen Hristev Cc: Nishant Malpani Cc: Daniel Baluta Link: https://lore.kernel.org/r/20200920132548.196452-3-jic23@kernel.org commit 01d37c8318d0e624e3df63b53e4c3efa0aecb187 Author: Jonathan Cameron Date: Sun Sep 20 14:25:47 2020 +0100 iio: Fix: Do not poll the driver again if try_reenable() callback returns non 0. The original reason for this behaviour is long gone and no current drivers are making use of this function correctly. Note however, that you would be very unlucky to actually hit the problem as it would require a bus comms failure in the callback. This dates back a long way. The original board on which I did a lot of early IIO development only supported edge interrupts, but some of the sensors were level interrupt based. As such, the lis3l02dq driver did a dance with checking a GPIO to identify if it should retrigger. That was an unsustainable hack so we later just stopped supporting interrupts for that particular combination. There are a number of drivers where a fault on a bus read in the try_reenable() callback will result in them returning non 0 and incorrectly then causing iio_trigger_poll() to be called. Anyhow, this handling is unused and causing issues so let us rip it out. Link: https://lore.kernel.org/linux-iio/20200813075358.13310-1-lars@metafoo.de/ After this the try_reenable() naming makes no sense, so as a follow up patch I'll rename it to simply reenable(). I haven't done that here as it will add noise to the fix for backporting. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen Cc: Lars-Peter Clausen Cc: Sebastian Andrzej Siewior Cc: Christian Eggers Link: https://lore.kernel.org/r/20200920132548.196452-2-jic23@kernel.org commit 34fce6cadf3b913fce7104b802110dedbccc5dcc Author: Lino Sanfilippo Date: Sat Nov 28 14:44:19 2020 +0100 io:core: In iio_map_array_register() cleanup in case of error In function iio_map_array_register() properly rewind in case of error. Signed-off-by: Lino Sanfilippo Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/1606571059-13974-2-git-send-email-LinoSanfilippo@gmx.de Signed-off-by: Jonathan Cameron commit cc9fb60eaf092be8f7f51a5cbfa23e70edfa453b Author: Lino Sanfilippo Date: Sat Nov 28 14:44:18 2020 +0100 iio:core: Introduce unlocked version of iio_map_array_unregister() Introduce an unlocked version of iio_map_array_unregister(). This function can help to unwind in case of error while the iio_map_list_lock mutex is held. Signed-off-by: Lino Sanfilippo Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/1606571059-13974-1-git-send-email-LinoSanfilippo@gmx.de Signed-off-by: Jonathan Cameron commit 619c7e60ff997ea2fafebc8473724d202d5246aa Author: Lorenzo Bianconi Date: Sun Nov 29 10:43:07 2020 +0100 dt-bindings: iio: imu: st_lsm6dsx: add lsm6dsop device bindings Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/501ff8187d2df584ec978c7e7ec5c445c3d0741c.1606642528.git.lorenzo@kernel.org Signed-off-by: Jonathan Cameron commit 2c57d2650552f9834a557d35b27c06c73599e997 Author: Lorenzo Bianconi Date: Sun Nov 29 10:43:06 2020 +0100 iio: imu: st_lsm6dsx: add support to LSM6DSOP Add support to STM LSM6DSOP (acc + gyro) Mems sensor https://www.st.com/resource/en/datasheet/lsm6dsop.pdf Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/d3c459ad945ccd1a256f4a217128be214b0c024e.1606642528.git.lorenzo@kernel.org Signed-off-by: Jonathan Cameron commit 98c3544a117e910604d4baf194ea2d0979fbad1d Author: Lorenzo Bianconi Date: Sat Nov 28 11:08:01 2020 +0100 iio: imu: st_lsmdsx: compact st_lsm6dsx_sensor_settings table Shrink st_lsm6dsx_sensor_settings table size moving wai address info in id array and remove duplicated code Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/c43286938b2fe03ab3abdb5fc095ea6b950abcb1.1606557946.git.lorenzo@kernel.org Signed-off-by: Jonathan Cameron commit 9054c15c1bf3a4365cde3630b929ad699c488698 Author: Alexandre Belloni Date: Sat Nov 28 23:28:15 2020 +0100 iio: adc: at91_adc: merge at91_adc_probe_dt back in at91_adc_probe at91_adc_probe_dt is now small enough to be merged back in at91_adc_probe. Signed-off-by: Alexandre Belloni Reviewed-by: Ludovic Desroches Link: https://lore.kernel.org/r/20201128222818.1910764-8-alexandre.belloni@bootlin.com Signed-off-by: Jonathan Cameron commit f1005415a8bf4d6359626210a31c8a7b08780667 Author: Alexandre Belloni Date: Sat Nov 28 23:28:14 2020 +0100 dt-bindings:iio:adc:remove triggers The trigger child nodes are not necessary anymore as they are defined directly by the driver, depending on the compatible string. Signed-off-by: Alexandre Belloni Cc: Rob Herring Link: https://lore.kernel.org/r/20201128222818.1910764-7-alexandre.belloni@bootlin.com Signed-off-by: Jonathan Cameron commit 09d4726b0af6c867cb3884e5e924f778fe6bc79a Author: Alexandre Belloni Date: Sat Nov 28 23:28:13 2020 +0100 iio: adc: at91_adc: rework trigger definition Move the available trigger definition back in the driver to stop cluttering the device tree. There is no functional change except that it actually fixes the available triggers for at91sam9rl as it inherited the list from at91sam9260 but actually has the triggers from at91sam9x5. Signed-off-by: Alexandre Belloni Reviewed-by: Ludovic Desroches Link: https://lore.kernel.org/r/20201128222818.1910764-6-alexandre.belloni@bootlin.com Signed-off-by: Jonathan Cameron commit 72820915817773e728b18c82545db040e56d17e7 Author: Jonathan Cameron Date: Sat Nov 28 23:28:12 2020 +0100 dt-bindings:iio:adc:atmel, sama9260-adc: conversion to yaml from at91_adc.txt There are a few things we would do differently in an ADC binding if we were starting from scratch but we are stuck with what we have (which made sense back when this was written!) We may be able to tighten up some elements of this binding in the future by careful checking of what values properties can actually take. Note the unusual sign off chain is representative of the path this patch took. Jonathan wrote the patch, which was then included in a series by Alexandre and ultimately applied by Jonathan. [Alexandre Belloni: add sama5d3, remove atmel,adc-res and atmel,adc-res-names] Signed-off-by: Jonathan Cameron Signed-off-by: Alexandre Belloni Reviewed-by: Rob Herring Reviewed-by: Ludovic Desroches Cc: Alexandre Belloni Cc: Nicolas Ferre Link: https://lore.kernel.org/r/20201128222818.1910764-5-alexandre.belloni@bootlin.com Signed-off-by: Jonathan Cameron commit d1ad1041323ff6886606db6f2fd4bcac198e11d5 Author: Alexandre Belloni Date: Sat Nov 28 23:28:11 2020 +0100 dt-bindings:iio:adc:remove atmel, adc-res and atmel, adc-res-names Remove atmel,adc-res and atmel,adc-res-names as they are not necessary and are handled by the driver. Also add sama5d3 to the list of possible chips. Signed-off-by: Alexandre Belloni Cc: Rob Herring Link: https://lore.kernel.org/r/20201128222818.1910764-4-alexandre.belloni@bootlin.com Signed-off-by: Jonathan Cameron commit 5eb39ef81ab9c8376df27dab20ca63c6e4c76870 Author: Alexandre Belloni Date: Sat Nov 28 23:28:10 2020 +0100 iio: adc: at91_adc: rework resolution selection Move the possible resolution values back to the driver. This removes the atmel,adc-res and atmel,adc-res-names properties, leaving only atmel,adc-use-res. As atmel,adc-res-names had to contain "lowres" and "highres", those where already the only allowed values for atmel,adc-use-res. Also introduce a new compatible string for the sama5d3 as this is the only one with a different resolution. Also it doesn't even have the LOWRES bit. Signed-off-by: Alexandre Belloni Reviewed-by: Ludovic Desroches Link: https://lore.kernel.org/r/20201128222818.1910764-3-alexandre.belloni@bootlin.com Signed-off-by: Jonathan Cameron commit 197cefcdc81d6a253487e5dfbaffb01f0a2f9172 Author: Alexandre Belloni Date: Sat Nov 28 23:28:09 2020 +0100 iio: adc: at91_adc: remove at91_adc_ids The driver is DT only since commit ead1c9f376db ("iio: adc: at91_adc: remove platform data and move defs in driver file"). Remove the leftover platform_device_id array. Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201128222818.1910764-2-alexandre.belloni@bootlin.com Signed-off-by: Jonathan Cameron commit c7c9b1d1697f1f7b12fa6b61166a9263f6d2f5a9 Author: Jonathan Cameron Date: Sat Oct 31 18:12:42 2020 +0000 dt-bindings:iio:potentiostat:ti,lmp91000: txt to yaml conversion. There were a few parts of the example that did not conform to the binding description and would not have worked with the Linux driver as a result. Fixed them whilst doing this conversion. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Acked-by: Matt Ranostay Cc: Matt Ranostay Link: https://lore.kernel.org/r/20201031181242.742301-11-jic23@kernel.org commit 8c693432653672c4c45ef8a9beb019671eb39d6d Author: Jonathan Cameron Date: Sat Oct 31 18:12:41 2020 +0000 dt-bindings:iio:light:capella,cm3605: txt to yaml conversion. Simple conversion using the new iio-consumers.yaml binding in the dt-schema. Signed-off-by: Jonathan Cameron Reviewed-by: Linus Walleij Reviewed-by: Rob Herring Cc: Linus Walleij Link: https://lore.kernel.org/r/20201031181242.742301-10-jic23@kernel.org commit 6f633bc91ac14c8f5f587bbfb4153963f7fc7491 Author: Jonathan Cameron Date: Sat Oct 31 18:12:40 2020 +0000 dt-bindings:iio:afe:voltage-divider: txt to yaml conversion Simple binding so straight forward conversion, though did require adding a separate binding document for the max1027 to reflect its abilities to provide channels to consumers. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Peter Rosin Link: https://lore.kernel.org/r/20201031181242.742301-9-jic23@kernel.org commit bd690dfab1e74b0684ef236826c16dd2375cb948 Author: Jonathan Cameron Date: Sat Oct 31 18:12:39 2020 +0000 dt-bindings:iio:adc:maxim,max1027: Pull out to separate binding doc. The afe/voltage-divider.yaml example uses this device with 2 properties not provided by trivial-devices.yaml (spi-max-frequency and #io-channel-cells) Solve that by creating a more specific binding doc. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Miquel Raynal Cc: Philippe Reynes Link: https://lore.kernel.org/r/20201031181242.742301-8-jic23@kernel.org commit ce66e52b6c169910c750ad276afd1db83ffd258e Author: Jonathan Cameron Date: Sat Oct 31 18:12:38 2020 +0000 dt-bindings:iio:afe:current-sense-shunt: txt to yaml conversion. Very simple binding. As such straight forward conversion. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Peter Rosin Link: https://lore.kernel.org/r/20201031181242.742301-7-jic23@kernel.org commit fbac26b9ad21f1311136e3dd9b342d693062cddc Author: Jonathan Cameron Date: Sat Oct 31 18:12:37 2020 +0000 dt-bindings:iio:afe:current-sense-amplifier: txt to yaml conversion. Note this includes a fix in the example where we had *-mul instead of *-mult. The binding doc and driver agree that it should be *-mult Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Peter Rosin Link: https://lore.kernel.org/r/20201031181242.742301-6-jic23@kernel.org commit 66a6dcc20e6317cfbcc6181d2b98900db7b93b17 Author: Jonathan Cameron Date: Sat Oct 31 18:12:36 2020 +0000 dt-bindings:iio:adc:envelope-detector: txt to yaml conversion. Straight forward format conversion. The example in here is fun in that it has 2 separate provider / consumer pairs. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Peter Rosin Link: https://lore.kernel.org/r/20201031181242.742301-5-jic23@kernel.org commit a86319f42c7b5f807fb03241a87023fa4640b4c7 Author: Jonathan Cameron Date: Sat Oct 31 18:12:35 2020 +0000 dt-bindings:iio:potentiometer: give microchip,mcp4531 its own binding We use this part in an example for the envelope detector. That showed that we need to allow for the #io-channel-cells property which trivial-devices.yaml does not. It doesn't make sense to add that property to trivial-devices as it only applies for those devices that can provide some sort of DAC or ADC service to another device driver. Hence solution will be to pull some IIO devices out to have their own file on a case by case basis. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Peter Rosin Link: https://lore.kernel.org/r/20201031181242.742301-4-jic23@kernel.org commit 06d2ff6fe11e410c614e44fbb690382b3a8592fa Author: Jonathan Cameron Date: Sat Oct 31 18:12:34 2020 +0000 dt-bindings:iio:dac:dpot-dac: yaml conversion. Txt to yaml format conversion. I dropped the example section describing the measurement ADC, as that isn't strictly part of this binding. Uses the new dt-schema/schema/iio/iio-consumer.yaml schema. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Peter Rosin Link: https://lore.kernel.org/r/20201031181242.742301-3-jic23@kernel.org commit dba91f82d58023d961b793fe35ff1d1305d92aab Author: Jonathan Cameron Date: Sat Oct 31 18:12:33 2020 +0000 dt-bindings:iio:iio-binding.txt Drop file as content now in dt-schema File contained generic IIO wide bindings. Now part of the external dt-schema repository. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201031181242.742301-2-jic23@kernel.org commit f759f020fbc3fad9f0aab27f4056799a21237c7b Author: Jonathan Cameron Date: Sat Oct 31 18:24:23 2020 +0000 dt-bindings:iio:adc:adi,ad7292: Use new adc.yaml binding for channels. Also add additionalProperties: false for the child nodes. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Marcelo Schmitt Link: https://lore.kernel.org/r/20201031182423.742798-4-jic23@kernel.org commit 26d146e29600c2b27856d80dbdcba93f82eb0f16 Author: Jonathan Cameron Date: Sat Oct 31 18:24:22 2020 +0000 dt-bindings:iio:adc:adi,ad7124: Use the new adc.yaml channel binding This both ensures this binding is compliant with the generic properties and reduces the amount we need to specify in this separate binding. Whilst here mark the child node as additionalProperties: false Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Michael Hennerich Link: https://lore.kernel.org/r/20201031182423.742798-3-jic23@kernel.org commit 80b2b5c3a701d56de98d00d99bc9cc384fb316d9 Author: Andrei Matei Date: Wed Dec 2 23:34:10 2020 -0500 libbpf: Fail early when loading programs with unspecified type Before this patch, a program with unspecified type (BPF_PROG_TYPE_UNSPEC) would be passed to the BPF syscall, only to have the kernel reject it with an opaque invalid argument error. This patch makes libbpf reject such programs with a nicer error message - in particular libbpf now tries to diagnose bad ELF section names at both open time and load time. Signed-off-by: Andrei Matei Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201203043410.59699-1-andreimatei1@gmail.com commit b70d154d655806838ea4bae11622a82c293d1b46 Author: Jonathan Cameron Date: Sat Oct 31 18:24:21 2020 +0000 dt-bindings:iio:adc: convert adc.txt to yaml Each driver that uses this will need to use a $ref We can't always enable it like most of the generic bindings due to channel@X matching far more widely than IIO. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201031182423.742798-2-jic23@kernel.org commit f494151b5eba0140d97729e33038ccc8ff440305 Author: Jonathan Cameron Date: Sat Oct 31 18:48:16 2020 +0000 dt-bindings:iio:health:ti,afe4404: txt to yaml conversion This basically has same questions as for the afe4403. We could combine the two bindings, but as the drivers are separate and it would be a little fiddly due to different buses let's keep the separating. To repeat questions from the ti,afe4403 binding. A few questions came up whilst converting this one. 1) What is actually required? - Checking Linux driver, interrupt is not, and the tx-supply could be supplied by a stub regulator as long as it's always on. As such I have reduced the required list to just compatible and reg. 2) What is the regulator called? - It's tx-supply in the binding doc, but the driver request tx_sup I will shortly send out a fix for the driver to match the binding doc which is the better choice of naming. As Andrew's email is bouncing, I've put myself as temporary maintainer for this binding until someone else steps up. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201031184854.745828-9-jic23@kernel.org commit f2c38f9fb4b0bda2ca59013446070a625bb367a7 Author: Jonathan Cameron Date: Sat Oct 31 18:48:15 2020 +0000 dt-bindings:iio:health:ti,afe4403: txt to yaml binding A few questions came up whilst converting this one. 1) What is actually required? - Checking Linux driver, interrupt is not, and the tx-supply could be supplied by a stub regulator as long as it's always on. As such I have reduced the required list to just compatible and reg. 2) What is the regulator called? - It's tx-supply in the binding doc, but the driver requests tx_sup. I'll post a fix patch to change the driver to fix this as it makes little sense. Andrew's email is bouncing so until someone else steps up I have listed myself as maintainer for this binding. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201031184854.745828-8-jic23@kernel.org commit 19ef7b70ca9487773c29b449adf0c70f540a0aab Author: Nuno Sá Date: Thu Nov 12 15:43:22 2020 +0100 iio: buffer: Fix demux update When updating the buffer demux, we will skip a scan element from the device in the case `in_ind != out_ind` and we enter the while loop. in_ind should only be refreshed with `find_next_bit()` in the end of the loop. Note, to cause problems we need a situation where we are skippig over an element (channel not enabled) that happens to not have the same size as the next element. Whilst this is a possible situation we haven't actually identified any cases in mainline where it happens as most drivers have consistent channel storage sizes with the exception of the timestamp which is the last element and hence never skipped over. Fixes: 5ada4ea9be16 ("staging:iio: add demux optionally to path from device to buffer") Signed-off-by: Nuno Sá Link: https://lore.kernel.org/r/20201112144323.28887-1-nuno.sa@analog.com Cc: Signed-off-by: Jonathan Cameron commit e08b60d352dbc3c32d64bdaedbb481fcdc14ff6c Author: Lars-Peter Clausen Date: Sat Nov 14 13:00:00 2020 +0100 iio: core: Simplify iio_format_list() iio_format_list() has two branches in a switch statement that are almost identical. They only differ in the stride that is used to iterate through the item list. Consolidate this into a common code path to simplify the code. Signed-off-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20201114120000.6533-2-lars@metafoo.de Signed-off-by: Jonathan Cameron commit eda20ba1e25e6d8e7fa0c62d1bd685aa5de8e8ff Author: Lars-Peter Clausen Date: Sat Nov 14 12:59:59 2020 +0100 iio: core: Consolidate iio_format_avail_{list,range}() The iio_format_avail_list() and iio_format_avail_range() functions are almost identical. The only differences are that iio_format_avail_range() expects a fixed amount of items and adds brackets "[ ]" around the output. Refactor them into a common helper function. This improves the maintainability of the code as it makes it easier to modify the implementation of these functions. Signed-off-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20201114120000.6533-1-lars@metafoo.de Signed-off-by: Jonathan Cameron commit 6d90c9a96e68967118149e04b7b170115866795b Author: Jonathan Cameron Date: Sun Nov 15 19:29:44 2020 +0000 dt-bindings:iio:samsung, exynos-adc: drop missuse of io-channel-ranges io-channel-ranges is a property for consumers of io-channels, not providers. Hence it is not relevant in this binding or the examples given. Recent changes to dt-schema result in this being reported as an error as a dependency is enforced between this property and io-channels. Reported-by: Rob Herring Signed-off-by: Jonathan Cameron Reviewed-by: Krzysztof Kozlowski Cc: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201115192951.1073632-3-jic23@kernel.org commit 044b32fa522955c997c01340bbacef2d4f4d1f92 Author: Jonathan Cameron Date: Sun Nov 15 19:29:43 2020 +0000 dt-bindings:iio:qcom-spmi-vadc drop incorrect io-channel-ranges from example io-channel-ranges is a property for io-channel consumers. Here it is in an example of a provider of channels so doesn't do anything useful. Recent additions to dt-schema check this property is only provided alongside io-channels which is not true here and hence an error is reported. Reported-by: Rob Herring Signed-off-by: Jonathan Cameron Reviewed-by: Bjorn Andersson Cc: Andy Gross Cc: Jishnu Prakash Link: https://lore.kernel.org/r/20201115192951.1073632-2-jic23@kernel.org commit 7dd94246fe542e45915ad27817317a41d796d13a Author: Phil Reid Date: Tue Nov 24 13:00:14 2020 +0800 iio: potentiometer: ad5272: Correct polarity of reset The driver should assert reset by setting the gpio high, and then release it by setting it the gpio low. This allows the device tree (or other hardware definition) to specify how the gpio is configured. For example as open drain or push-pull depending on the connected hardware. Signed-off-by: Phil Reid Link: https://lore.kernel.org/r/20201124050014.4453-1-preid@electromag.com.au Signed-off-by: Jonathan Cameron commit 672f3022837968958980b0634ebdcf98355a47ed Author: Linus Walleij Date: Sun Nov 15 21:57:45 2020 +0100 iio: accel: bmc150-accel: Add rudimentary regulator support These Bosch accelerometers have two supplies, VDD and VDDIO. Add some rudimentary support to obtain and enable these regulators during probe() and disable them during remove() or on the errorpath. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20201115205745.618455-3-linus.walleij@linaro.org Signed-off-by: Jonathan Cameron commit a1a210bf29a1a232a37c69588aff9690e671a5b3 Author: Linus Walleij Date: Sun Nov 15 21:57:44 2020 +0100 iio: accel: bmc150-accel: Add support for BMA222 This adds support for the BMA222 version of this sensor, found in for example the Samsung GT-I9070 mobile phone. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20201115205745.618455-2-linus.walleij@linaro.org Signed-off-by: Jonathan Cameron commit 6259551cf19bffebbae75923e025f0398c7c889c Author: Linus Walleij Date: Sun Nov 15 21:57:43 2020 +0100 iio: accel: bmc150-accel: Add DT bindings These accelerometers have bindings used in the kernel and several device trees but no proper bindings documentation. Add it. Also add a compatible for the BMA222 that I am right now adding support for in the driver. Signed-off-by: Linus Walleij Cc: devicetree@vger.kernel.org Link: https://lore.kernel.org/r/20201115205745.618455-1-linus.walleij@linaro.org Signed-off-by: Jonathan Cameron commit 0fb6ee8d0b5e90b72f870f76debc8bd31a742014 Author: Lars-Peter Clausen Date: Tue Nov 24 14:38:07 2020 +0200 iio: ad_sigma_delta: Don't put SPI transfer buffer on the stack Use a heap allocated memory for the SPI transfer buffer. Using stack memory can corrupt stack memory when using DMA on some systems. This change moves the buffer from the stack of the trigger handler call to the heap of the buffer of the state struct. The size increases takes into account the alignment for the timestamp, which is 8 bytes. The 'data' buffer is split into 'tx_buf' and 'rx_buf', to make a clearer separation of which part of the buffer should be used for TX & RX. Fixes: af3008485ea03 ("iio:adc: Add common code for ADI Sigma Delta devices") Signed-off-by: Lars-Peter Clausen Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201124123807.19717-1-alexandru.ardelean@analog.com Cc: Signed-off-by: Jonathan Cameron commit 6d74a3ee1ee1c7b62de656c26d370448ed5885c3 Author: Nuno Sá Date: Sat Nov 21 17:14:57 2020 +0100 iio: buffer: Return error if no callback is given Return error in case no callback is provided to `iio_channel_get_all_cb()`. There's no point in setting up a buffer-cb if no callback is provided. Signed-off-by: Nuno Sá Reviewed-by: Olivier Moysan Link: https://lore.kernel.org/r/20201121161457.957-3-nuno.sa@analog.com Signed-off-by: Jonathan Cameron commit 9afaf9a5b80e6f4fd29a9d04476f2f1a0a8fd995 Author: Olivier Moysan Date: Sat Nov 21 17:14:56 2020 +0100 ASoC: stm32: dfsdm: add stm32_adfsdm_dummy_cb() callback Adapt STM32 DFSDM driver to a change in iio_channel_get_all_cb() API. The callback pointer becomes a requested parameter of this API, so add a dummy callback to be given as parameter of this function. However, the stm32_dfsdm_get_buff_cb() API is still used instead, to optimize DMA transfers. Signed-off-by: Olivier Moysan Signed-off-by: Nuno Sá Acked-by: Mark Brown Link: https://lore.kernel.org/r/20201121161457.957-2-nuno.sa@analog.com Signed-off-by: Jonathan Cameron commit 29e96f5a6e8178277a05c80e58ad056c5e68b934 Author: Lorenzo Bianconi Date: Sun Nov 22 12:56:49 2020 +0100 dt-bindings: iio: humidity: hts221: introduce vdd regulator bindings Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/9579804f52ccab74a5ca5c7a55b5072b7304bea9.1606045688.git.lorenzo@kernel.org Signed-off-by: Jonathan Cameron commit aa784a54102e93221030cb702430b5e953f4b347 Author: Lorenzo Bianconi Date: Sun Nov 22 12:56:48 2020 +0100 iio: humidity: hts221: add vdd voltage regulator Like all other ST sensors, hts221 devices have VDD power line. Introduce VDD voltage regulator to control it. Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/6b3347e78f4f920c48eb6a66936d3b69cb9ff53a.1606045688.git.lorenzo@kernel.org Signed-off-by: Jonathan Cameron commit 6c050782d0f035d3b97be75c556d271610158ba2 Author: William Breathitt Gray Date: Sat Nov 21 13:58:24 2020 -0500 MAINTAINERS: Add Kamel Bouhara as TCB counter driver maintainer Signed-off-by: William Breathitt Gray Acked-by: Kamel Bouhara Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20201121185824.451477-1-vilhelm.gray@gmail.com Signed-off-by: Jonathan Cameron commit 53c6b0d5d27114a738ac0b312f292aec7f64e9d4 Author: Alexandru Ardelean Date: Fri Nov 27 11:40:38 2020 +0200 iio: adc: ad7298: check regulator for null in ad7298_get_ref_voltage() 'st->ext_ref' & 'st->reg' are both non-zero/non-null at the same time, so logically the code isn't broken. But it is more correct to check that 'st->reg' is non-null, since we make sure that the regulator is NULL (in probe) in case one isn't defined. Signed-off-by: Alexandru Ardelean Cc: Colin Ian King Link: https://lore.kernel.org/r/20201127094038.91714-2-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit a8b415c9bde69dc194e57db8c27cb96908b30aca Merge: 61b759480ec54 ffebecd9d4954 Author: Andrii Nakryiko Date: Thu Dec 3 11:20:21 2020 -0800 Merge branch 'Fixes for ima selftest' KP Singh says: ==================== From: KP Singh # v3 -> v4 * Fix typos. * Update commit message for the indentation patch. * Added Andrii's acks. # v2 -> v3 * Added missing tags. * Indentation fixes + some other fixes suggested by Andrii. * Re-indent file to tabs. The selftest for the bpf_ima_inode_hash helper uses a shell script to setup the system for ima. While this worked without an issue on recent desktop distros, it failed on environments with stripped out shells like busybox which is also used by the bpf CI. This series fixes the assumptions made on the availablity of certain command line switches and the expectation that securityfs being mounted by default. It also adds the missing kernel config dependencies in tools/testing/selftests/bpf and, lastly, changes the indentation of ima_setup.sh to use tabs. ==================== Signed-off-by: Andrii Nakryiko commit ffebecd9d49542046c5ecbb410af01e016636e19 Author: KP Singh Date: Thu Dec 3 19:14:37 2020 +0000 selftests/bpf: Indent ima_setup.sh with tabs. The file was formatted with spaces instead of tabs and went unnoticed as checkpatch.pl did not complain (probably because this is a shell script). Re-indent it with tabs to be consistent with other scripts. Signed-off-by: KP Singh Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201203191437.666737-5-kpsingh@chromium.org commit d932e043b9d6d60113e90267ae2fbe4e946d7b08 Author: KP Singh Date: Thu Dec 3 19:14:36 2020 +0000 selftests/bpf: Add config dependency on BLK_DEV_LOOP The ima selftest restricts its scope to a test filesystem image mounted on a loop device and prevents permanent ima policy changes for the whole system. Fixes: 34b82d3ac105 ("bpf: Add a selftest for bpf_ima_inode_hash") Reported-by: Andrii Nakryiko Signed-off-by: KP Singh Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201203191437.666737-4-kpsingh@chromium.org commit 1ee076719d4e14c005f375c50731ed44eb48fee4 Author: KP Singh Date: Thu Dec 3 19:14:35 2020 +0000 selftests/bpf: Ensure securityfs mount before writing ima policy SecurityFS may not be mounted even if it is enabled in the kernel config. So, check if the mount exists in /proc/mounts by parsing the file and, if not, mount it on /sys/kernel/security. Fixes: 34b82d3ac105 ("bpf: Add a selftest for bpf_ima_inode_hash") Reported-by: Andrii Nakryiko Signed-off-by: KP Singh Signed-off-by: Andrii Nakryiko Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201203191437.666737-3-kpsingh@chromium.org commit 3db980449bc3b9765c78210787bcbf4305636982 Author: KP Singh Date: Thu Dec 3 19:14:34 2020 +0000 selftests/bpf: Update ima_setup.sh for busybox losetup on busybox does not output the name of loop device on using -f with --show. It also doesn't support -j to find the loop devices for a given backing file. losetup is updated to use "-a" which is available on busybox. blkid does not support options (-s and -o) to only display the uuid, so parse the output instead. Not all environments have mkfs.ext4, the test requires a loop device with a backing image file which could formatted with any filesystem. Update to using mkfs.ext2 which is available on busybox. Fixes: 34b82d3ac105 ("bpf: Add a selftest for bpf_ima_inode_hash") Reported-by: Andrii Nakryiko Signed-off-by: KP Singh Signed-off-by: Andrii Nakryiko Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201203191437.666737-2-kpsingh@chromium.org commit f86e54653e67171a7cc0f85e0fe5766deb310e03 Merge: 90f0e16c649ac 4f1df628d4ec2 Author: Marc Zyngier Date: Thu Dec 3 19:12:24 2020 +0000 Merge remote-tracking branch 'origin/kvm-arm64/csv3' into kvmarm-master/queue Signed-off-by: Marc Zyngier commit 652d0b701d136ede6bc8a977b3abbe2d420226b9 Author: Keqian Zhu Date: Mon Aug 17 19:07:28 2020 +0800 KVM: arm64: Use kvm_write_guest_lock when init stolen time There is a lock version kvm_write_guest. Use it to simplify code. Signed-off-by: Keqian Zhu Signed-off-by: Marc Zyngier Reviewed-by: Andrew Jones Reviewed-by: Steven Price Link: https://lore.kernel.org/r/20200817110728.12196-3-zhukeqian1@huawei.com commit 94558543213ae8c83be5d01b83c1fe7530e8a1a0 Author: Keqian Zhu Date: Mon Aug 17 19:07:27 2020 +0800 KVM: arm64: Some fixes of PV-time interface document Rename PV_FEATURES to PV_TIME_FEATURES. Signed-off-by: Keqian Zhu Signed-off-by: Marc Zyngier Reviewed-by: Andrew Jones Reviewed-by: Steven Price Link: https://lore.kernel.org/r/20200817110728.12196-2-zhukeqian1@huawei.com commit a4b9c48b96517ff4780b22a784e7537eac5dc21b Author: Jarkko Sakkinen Date: Thu Dec 3 20:35:27 2020 +0200 x86/sgx: Return -EINVAL on a zero length buffer in sgx_ioc_enclave_add_pages() The sgx_enclave_add_pages.length field is documented as * @length: length of the data (multiple of the page size) Fail with -EINVAL, when the caller gives a zero length buffer of data to be added as pages to an enclave. Right now 'ret' is returned as uninitialized in that case. [ bp: Flesh out commit message. ] Fixes: c6d26d370767 ("x86/sgx: Add SGX_IOC_ENCLAVE_ADD_PAGES") Reported-by: Dan Carpenter Signed-off-by: Jarkko Sakkinen Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/linux-sgx/X8ehQssnslm194ld@mwanda/ Link: https://lkml.kernel.org/r/20201203183527.139317-1-jarkko@kernel.org commit 61b759480ec54d0ade53d834d550849ffdfe716a Merge: 22e8ebe35a2e3 3627d9702d789 Author: Alexei Starovoitov Date: Thu Dec 3 10:37:59 2020 -0800 Merge branch 'libbpf: add support for privileged/unprivileged control separation' Mariusz Dudek says: ==================== From: Mariusz Dudek This patch series adds support for separation of eBPF program load and xsk socket creation. In for example a Kubernetes environment you can have an AF_XDP CNI or daemonset that is responsible for launching pods that execute an application using AF_XDP sockets. It is desirable that the pod runs with as low privileges as possible, CAP_NET_RAW in this case, and that all operations that require privileges are contained in the CNI or daemonset. In this case, you have to be able separate ePBF program load from xsk socket creation. Currently, this will not work with the xsk_socket__create APIs because you need to have CAP_NET_ADMIN privileges to load eBPF program and CAP_SYS_ADMIN privileges to create update xsk_bpf_maps. To be exact xsk_set_bpf_maps does not need those privileges but it takes the prog_fd and xsks_map_fd and those are known only to process that was loading eBPF program. The api bpf_prog_get_fd_by_id that looks up the fd of the prog using an prog_id and bpf_map_get_fd_by_id that looks for xsks_map_fd usinb map_id both requires CAP_SYS_ADMIN. With this patch, the pod can be run with CAP_NET_RAW capability only. In case your umem is larger or equal process limit for MEMLOCK you need either increase the limit or CAP_IPC_LOCK capability. Without this patch in case of insufficient rights ENOPERM is returned by xsk_socket__create. To resolve this privileges issue two new APIs are introduced: - xsk_setup_xdp_prog - loads the built in XDP program. It can also return xsks_map_fd which is needed by unprivileged process to update xsks_map with AF_XDP socket "fd" - xsk_sokcet__update_xskmap - inserts an AF_XDP socket into an xskmap for a particular xsk_socket Usage example: int xsk_setup_xdp_prog(int ifindex, int *xsks_map_fd) int xsk_socket__update_xskmap(struct xsk_socket *xsk, int xsks_map_fd); Inserts AF_XDP socket "fd" into the xskmap. The first patch introduces the new APIs. The second patch provides a new sample applications working as control and modification to existing xdpsock application to work with less privileges. This patch set is based on bpf-next commit 97306be45fbe (Merge branch 'switch to memcg-based memory accounting') Since v6 - rebase on 97306be45fbe to resolve RLIMIT conflicts Since v5 - fixed sample/bpf/xdpsock_user.c to resolve merge conflicts Since v4 - sample/bpf/Makefile issues fixed Since v3: - force_set_map flag removed - leaking of xsk struct fixed - unified function error returning policy implemented Since v2: - new APIs moved itto LIBBPF_0.3.0 section - struct bpf_prog_cfg_opts removed - loading own eBPF program via xsk_setup_xdp_prog functionality removed Since v1: - struct bpf_prog_cfg improved for backward/forward compatibility - API xsk_update_xskmap renamed to xsk_socket__update_xskmap - commit message formatting fixed ==================== Signed-off-by: Alexei Starovoitov commit 3627d9702d789804a1f4c5a52eabdae810cd9def Author: Mariusz Dudek Date: Thu Dec 3 10:05:46 2020 +0100 samples/bpf: Sample application for eBPF load and socket creation split Introduce a sample program to demonstrate the control and data plane split. For the control plane part a new program called xdpsock_ctrl_proc is introduced. For the data plane part, some code was added to xdpsock_user.c to act as the data plane entity. Application xdpsock_ctrl_proc works as control entity with sudo privileges (CAP_SYS_ADMIN and CAP_NET_ADMIN are sufficient) and the extended xdpsock as data plane entity with CAP_NET_RAW capability only. Usage example: sudo ./samples/bpf/xdpsock_ctrl_proc -i sudo ./samples/bpf/xdpsock -i -q -n -N -l -R Signed-off-by: Mariusz Dudek Signed-off-by: Alexei Starovoitov Acked-by: Magnus Karlsson Link: https://lore.kernel.org/bpf/20201203090546.11976-3-mariuszx.dudek@intel.com commit e459f49b4394e2630ea55d5ac7a49402686848fe Author: Mariusz Dudek Date: Thu Dec 3 10:05:45 2020 +0100 libbpf: Separate XDP program load with xsk socket creation Add support for separation of eBPF program load and xsk socket creation. This is needed for use-case when you want to privide as little privileges as possible to the data plane application that will handle xsk socket creation and incoming traffic. With this patch the data entity container can be run with only CAP_NET_RAW capability to fulfill its purpose of creating xsk socket and handling packages. In case your umem is larger or equal process limit for MEMLOCK you need either increase the limit or CAP_IPC_LOCK capability. To resolve privileges issue two APIs are introduced: - xsk_setup_xdp_prog - loads the built in XDP program. It can also return xsks_map_fd which is needed by unprivileged process to update xsks_map with AF_XDP socket "fd" - xsk_socket__update_xskmap - inserts an AF_XDP socket into an xskmap for a particular xsk_socket Signed-off-by: Mariusz Dudek Signed-off-by: Alexei Starovoitov Acked-by: Magnus Karlsson Link: https://lore.kernel.org/bpf/20201203090546.11976-2-mariuszx.dudek@intel.com commit 22e8ebe35a2e30ee19e02c41cacc99c2f896bc4b Author: Brendan Jackman Date: Thu Dec 3 10:22:34 2020 +0000 tools/resolve_btfids: Fix some error messages Add missing newlines and fix polarity of strerror argument. Signed-off-by: Brendan Jackman Signed-off-by: Alexei Starovoitov Acked-by: Jiri Olsa Link: https://lore.kernel.org/bpf/20201203102234.648540-1-jackmanb@google.com commit a874c8c389a12b9f5ab67ba01995f06bf82e94fe Author: Stanislav Fomichev Date: Wed Dec 2 09:49:47 2020 -0800 selftests/bpf: Copy file using read/write in local storage test Splice (copy_file_range) doesn't work on all filesystems. I'm running test kernels on top of my read-only disk image and it uses plan9 under the hood. This prevents test_local_storage from successfully passing. There is really no technical reason to use splice, so lets do old-school read/write to copy file; this should work in all environments. Signed-off-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201202174947.3621989-1-sdf@google.com commit 929c1f3384d7e5cd319d03242cb925c3f91236f7 Author: Peter Collingbourne Date: Wed Dec 2 23:51:10 2020 -0800 arm64: mte: fix prctl(PR_GET_TAGGED_ADDR_CTRL) if TCF0=NONE Previously we were always returning a tag inclusion mask of zero via PR_GET_TAGGED_ADDR_CTRL if TCF0 was set to NONE. Fix it by making the code for the NONE case match the others. Signed-off-by: Peter Collingbourne Link: https://linux-review.googlesource.com/id/Iefbea66cf7d2b4c80b82f9639b9ea7f33f7fac53 Fixes: af5ce95282dc ("arm64: mte: Allow user control of the generated random tags via prctl()") Reviewed-by: Catalin Marinas Link: https://lore.kernel.org/r/20201203075110.2781021-1-pcc@google.com Signed-off-by: Will Deacon commit 0d1e02695979bdf5fb08425cd823d6e906e09378 Merge: 97306be45fbe7 fa4528379a51f Author: Alexei Starovoitov Date: Thu Dec 3 10:17:27 2020 -0800 Merge branch 'bpftool: improve split BTF support' Andrii Nakryiko says: ==================== Few follow up improvements to bpftool for split BTF support: - emit "name " for non-named BTFs in `bpftool btf show` command; - when dumping /sys/kernel/btf/ use /sys/kernel/btf/vmlinux as the base BTF, unless base BTF is explicitly specified with -B flag. This patch set also adds btf__base_btf() getter to access base BTF of the struct btf. ==================== Signed-off-by: Alexei Starovoitov commit fa4528379a51ff8d5271e1bcfa0d5ef71657869f Author: Andrii Nakryiko Date: Tue Dec 1 22:52:43 2020 -0800 tools/bpftool: Auto-detect split BTFs in common cases In case of working with module's split BTF from /sys/kernel/btf/*, auto-substitute /sys/kernel/btf/vmlinux as the base BTF. This makes using bpftool with module BTFs faster and simpler. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201202065244.530571-4-andrii@kernel.org commit 0cfdcd6378071f383c900e3d8862347e2af1d1ca Author: Andrii Nakryiko Date: Tue Dec 1 22:52:42 2020 -0800 libbpf: Add base BTF accessor Add ability to get base BTF. It can be also used to check if BTF is split BTF. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201202065244.530571-3-andrii@kernel.org commit 71ccb50074f31a50a1da4c1d8306d54da0907b00 Author: Andrii Nakryiko Date: Tue Dec 1 22:52:41 2020 -0800 tools/bpftool: Emit name for anonymous BTFs For consistency of output, emit "name " for BTFs without the name. This keeps output more consistent and obvious. Suggested-by: Song Liu Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201202065244.530571-2-andrii@kernel.org commit ab3105446f1ec4e98fadfc998ee24feec271c16c Author: Kefeng Wang Date: Wed Oct 28 21:12:30 2020 +0800 clocksource/drivers/riscv: Make RISCV_TIMER depends on RISCV_SBI The riscv timer is set via SBI timer call, let's make RISCV_TIMER depends on RISCV_SBI, and it also fixes some build issue. Fixes: d5be89a8d118 ("RISC-V: Resurrect the MMIO timer implementation for M-mode systems") Signed-off-by: Kefeng Wang Reviewed-by: Palmer Dabbelt Acked-by: Palmer Dabbelt Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201028131230.72907-1-wangkefeng.wang@huawei.com commit 5bd7cb29eceb52e4b108917786fdbf2a2c2048ef Author: Daniel Lezcano Date: Wed Nov 25 11:23:45 2020 +0100 clocksource/drivers/ingenic: Fix section mismatch The function ingenic_tcu_get_clock() is annotated for the __init section but it is actually called from the online cpu callback. That will lead to a crash if a CPU is hotplugged after boot time. Remove the __init annotation for the ingenic_tcu_get_clock() function. Fixes: f19d838d08fc (clocksource/drivers/ingenic: Add high resolution timer support for SMP/SMT) Reported-by: kernel test robot Signed-off-by: Daniel Lezcano Reviewed-by: Paul Cercueil Tested-by: 周琰杰 (Zhou Yanjie) Link: https://lore.kernel.org/r/20201125102346.1816310-1-daniel.lezcano@linaro.org commit eee422c46e6840a81c9db18a497b74387a557b29 Author: Yu Kuai Date: Mon Nov 16 21:51:23 2020 +0800 clocksource/drivers/cadence_ttc: Fix memory leak in ttc_setup_clockevent() If clk_notifier_register() failed, ttc_setup_clockevent() will return without freeing 'ttcce', which will leak memory. Fixes: 70504f311d4b ("clocksource/drivers/cadence_ttc: Convert init function to return error") Reported-by: Hulk Robot Signed-off-by: Yu Kuai Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201116135123.2164033-1-yukuai3@huawei.com commit b7c0fed5ccf2c5cb4bb43ddc6b1625f042a83d0a Author: Geert Uytterhoeven Date: Tue Nov 10 17:20:14 2020 +0100 dt-bindings: timer: renesas: tmu: Convert to json-schema Convert the Renesas R-Mobile/R-Car Timer Unit (TMU) Device Tree binding documentation to json-schema. Document missing properties. Update the example to match reality. Signed-off-by: Geert Uytterhoeven Reviewed-by: Rob Herring Signed-off-by: Daniel Lezcano Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20201110162014.3290109-3-geert+renesas@glider.be commit db08e6c0e2513d1341369ec6a4f1774ee20b290b Author: Marian-Cristian Rotariu Date: Tue Nov 10 17:20:13 2020 +0100 dt-bindings: timer: renesas: tmu: Document r8a774e1 bindings Document RZ/G2H (R8A774E1) SoC in the Renesas TMU bindings. Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201110162014.3290109-2-geert+renesas@glider.be commit c1e6cad00aa2f17845e7270e38ff3cc82c7b022a Author: Yang Yingliang Date: Wed Nov 11 14:47:06 2020 +0800 clocksource/drivers/orion: Add missing clk_disable_unprepare() on error path After calling clk_prepare_enable(), clk_disable_unprepare() need be called on error path. Fixes: fbe4b3566ddc ("clocksource/drivers/orion: Convert init function...") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201111064706.3397156-1-yangyingliang@huawei.com commit b6ea209ef124dad4045772a759e2aecd191534c0 Author: Vineet Gupta Date: Thu Nov 5 13:22:08 2020 -0800 clocksource/drivers/nps: Remove EZChip NPS clocksource driver NPS platform has been removed from ARC port and there are no in-tree users of it now. So RIP ! Cc: Daniel Lezcano Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Vineet Gupta Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201105212210.1891598-2-vgupta@synopsys.com commit 0fce2e02a29ca5420472f03d3f2858eedded3fe7 Author: 周琰杰 (Zhou Yanjie) Date: Mon Oct 26 23:58:42 2020 +0800 dt-bindings: timer: Add new OST support for the upcoming new driver. The new OST has one global timer and two or four percpu timers, so there will be three combinations in the upcoming new OST driver: the original GLOBAL_TIMER + PERCPU_TIMER, the new GLOBAL_TIMER + PERCPU_TIMER0/1 and GLOBAL_TIMER + PERCPU_TIMER0/1/2/3, For this, add the macro definition about OST_CLK_PERCPU_TIMER0/1/2/3. And in order to ensure that all the combinations work normally, the original ABI values of OST_CLK_PERCPU_TIMER and OST_CLK_GLOBAL_TIMER need to be exchanged to ensure that in any combinations, the clock can be registered (by calling clk_hw_register()) from index 0. Before this patch, OST_CLK_PERCPU_TIMER and OST_CLK_GLOBAL_TIMER are only used in two places, one is when using "assigned-clocks" to configure the clocks in the DTS file; the other is when registering the clocks in the sysost driver. When the values of these two ABIs are exchanged, the ABI value used by sysost driver when registering the clock, and the ABI value used by DTS when configuring the clock using "assigned-clocks" will also change accordingly. Therefore, there is no situation that causes the wrong clock to the configured. Therefore, exchanging ABI values will not cause errors in the existing codes when registering and configuring the clocks. Currently, in the mainline, only X1000 and X1830 are using sysost driver, and the upcoming X2000 will also use sysost driver. This patch has been tested on all three SoCs and all works fine. Tested-by: 周正 (Zhou Zheng) Signed-off-by: 周琰杰 (Zhou Yanjie) Reviewed-by: Rob Herring Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201026155842.10196-2-zhouyanjie@wanyeetech.com commit 19f7ce8e36c09f4a2491b065dabd9162018309b6 Author: Kefeng Wang Date: Thu Oct 29 20:33:17 2020 +0800 clocksource/drivers/sp804: Use pr_fmt Add pr_fmt to prefix pr_ output. Signed-off-by: Kefeng Wang Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201029123317.90286-5-wangkefeng.wang@huawei.com commit dca54f8ce1c3c979caf06cfdcdf8eab05a00f5ff Author: Kefeng Wang Date: Thu Oct 29 20:33:16 2020 +0800 clocksource/drivers/sp804: Correct clk_get_rate handle clk_get_rate won't return negative value, correct clk_get_rate handle. Signed-off-by: Kefeng Wang Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201029123317.90286-4-wangkefeng.wang@huawei.com commit 9d4965eb438f0c9f93e91ce6bfec72bbb8def988 Author: Kefeng Wang Date: Thu Oct 29 20:33:15 2020 +0800 clocksource/drivers/sp804: Use clk_prepare_enable and clk_disable_unprepare Directly use clk_prepare_enable and clk_disable_unprepare. Signed-off-by: Kefeng Wang Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201029123317.90286-3-wangkefeng.wang@huawei.com commit 3c07bf0fc3558f680374f8ac6d148b0082aa08c6 Author: Kefeng Wang Date: Thu Oct 29 20:33:14 2020 +0800 clocksource/drivers/sp804: Make some symbol static drivers/clocksource/timer-sp804.c:38:31: warning: symbol 'arm_sp804_timer' was not declared. Should it be static? drivers/clocksource/timer-sp804.c:47:31: warning: symbol 'hisi_sp804_timer' was not declared. Should it be static? drivers/clocksource/timer-sp804.c:120:12: warning: symbol 'sp804_clocksource_and_sched_clock_init' was not declared. Should it be static? drivers/clocksource/timer-sp804.c:219:12: warning: symbol 'sp804_clockevents_init' was not declared. Should it be static? And move __initdata after the variables. Signed-off-by: Kefeng Wang Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201029123317.90286-2-wangkefeng.wang@huawei.com commit 3c0a4b185f6c82c06025720b00a490c719a6f0ff Author: Zhen Lei Date: Wed Oct 21 09:22:59 2020 +0800 clocksource/drivers/sp804: Add static for functions such as sp804_clockevents_init() Add static for sp804_clocksource_and_sched_clock_init() and sp804_clockevents_init(), they are only used in timer-sp804.c now. Otherwise, the following warning will be reported: drivers/clocksource/timer-sp804.c:68:12: warning: no previous prototype \ for 'sp804_clocksource_and_sched_clock_init' [-Wmissing-prototypes] drivers/clocksource/timer-sp804.c:162:12: warning: no previous prototype \ for 'sp804_clockevents_init' [-Wmissing-prototypes] Fixes: 975434f8b24a ("clocksource/drivers/sp804: Delete the leading "__" of some functions") Fixes: 65f4d7ddc7b6 ("clocksource/drivers/sp804: Remove unused sp804_timer_disable() and timer-sp804.h") Reported-by: kernel test robot Signed-off-by: Zhen Lei Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201021012259.2067-2-thunder.leizhen@huawei.com commit 9b73bde39cf24bb516f43a4caf1780c501b86f79 Author: Iskren Chernev Date: Thu Nov 26 15:02:23 2020 +0200 drm/msm: Fix use-after-free in msm_gem with carveout When using gem with vram carveout the page allocation is managed via drm_mm. The necessary drm_mm_node is allocated in add_vma, but it is referenced in msm_gem_object as well. It is freed before the drm_mm_node has been deallocated leading to use-after-free on every single vram allocation. Currently put_iova is called before put_pages in both msm_gem_free_object and msm_gem_purge: put_iova -> del_vma -> kfree(vma) // vma holds drm_mm_node /* later */ put_pages -> put_pages_vram -> drm_mm_remove_node( msm_obj->vram_node) // vram_node is a ref to // drm_mm_node; in _msm_gem_new It looks like del_vma does nothing else other than freeing the vma object and removing it from it's list, so delaying the deletion should be harmless. This patch splits put_iova in put_iova_spaces and put_iova_vmas, so the vma can be freed after the mm_node has been deallocated with the mm. Note: The breaking commit separated the vma allocation from within msm_gem_object to outside, so the vram_node reference became outside the msm_gem_object allocation, and freeing order was therefore overlooked. Fixes: 4b85f7f5cf7 ("drm/msm: support for an arbitrary number of address spaces") Signed-off-by: Iskren Chernev Signed-off-by: Rob Clark commit dee734a7de9169018b8108208587d3ff1fdfff18 Author: Paolo Bonzini Date: Mon Nov 30 09:39:59 2020 -0500 KVM: x86: adjust SEV for commit 7e8e6eed75e Since the ASID is now stored in svm->asid, pre_sev_run should also place it there and not directly in the VMCB control area. Reported-by: Ashish Kalra Signed-off-by: Paolo Bonzini commit 701f49065e68741a26752e6ae235c02bcafa2424 Author: Mark Rutland Date: Thu Dec 3 15:24:03 2020 +0000 arm64: mark __system_matches_cap as __maybe_unused Now that the PAN toggling has been removed, the only user of __system_matches_cap() is has_generic_auth(), which is only built when CONFIG_ARM64_PTR_AUTH is selected, and Qian reports that this results in a build-time warning when CONFIG_ARM64_PTR_AUTH is not selected: | arch/arm64/kernel/cpufeature.c:2649:13: warning: '__system_matches_cap' defined but not used [-Wunused-function] | static bool __system_matches_cap(unsigned int n) | ^~~~~~~~~~~~~~~~~~~~ It's tricky to restructure things to prevent this, so let's mark __system_matches_cap() as __maybe_unused, as we used to do for the other user of __system_matches_cap() which we just removed. Reported-by: Qian Cai Suggested-by: Qian Cai Signed-off-by: Mark Rutland Link: https://lore.kernel.org/r/20201203152403.26100-1-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit c58eb1b54feefc3a47fab78addd14083bc941c44 Author: Kuogee Hsieh Date: Wed Nov 18 13:00:14 2020 -0800 drm/msm/dp: fix connect/disconnect handled at irq_hpd Some usb type-c dongle use irq_hpd request to perform device connection and disconnection. This patch add handling of both connection and disconnection are based on the state of hpd_state and sink_count. Changes in V2: -- add dp_display_handle_port_ststus_changed() -- fix kernel test robot complaint Changes in V3: -- add encoder_mode_set into struct dp_display_private Reported-by: kernel test robot Fixes: 26b8d66a399e ("drm/msm/dp: promote irq_hpd handle to handle link training correctly") Tested-by: Stephen Boyd Signed-off-by: Kuogee Hsieh Signed-off-by: Rob Clark commit 854f6f1c653ba7d38acc3fc9dabb42e2db5837c1 Author: Abhinav Kumar Date: Tue Dec 1 15:38:55 2020 -0800 drm/msm/dpu: update the qos remap only if the client type changes Update the qos remap only if the client type changes for the plane. This will avoid unnecessary register programming and also avoid log spam from the dpu_vbif_set_qos_remap() function. changes in v2: - get rid of the dirty flag and simplify the logic to call _dpu_plane_set_qos_remap() Signed-off-by: Abhinav Kumar Signed-off-by: Rob Clark commit 849652c1ab9704b7f7f58704a71cf0310ae58f42 Author: Lee Jones Date: Thu Nov 26 13:42:15 2020 +0000 drm/msm/disp/dpu1/dpu_hw_interrupts: Demote kernel-doc formatting misuse Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c:246: error: Cannot parse struct or union! drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c:756: error: Cannot parse struct or union! Cc: Rob Clark Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: Shubhashree Dhar Cc: linux-arm-msm@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org Signed-off-by: Lee Jones Reviewed-by: Abhinav Kumar Signed-off-by: Rob Clark commit d4bff72c8401e6f56194ecf455db70ebc22929e2 Author: Thomas Karlsson Date: Wed Dec 2 19:49:58 2020 +0100 macvlan: Support for high multicast packet rate Background: Broadcast and multicast packages are enqueued for later processing. This queue was previously hardcoded to 1000. This proved insufficient for handling very high packet rates. This resulted in packet drops for multicast. While at the same time unicast worked fine. The change: This patch make the queue length adjustable to accommodate for environments with very high multicast packet rate. But still keeps the default value of 1000 unless specified. The queue length is specified as a request per macvlan using the IFLA_MACVLAN_BC_QUEUE_LEN parameter. The actual used queue length will then be the maximum of any macvlan connected to the same port. The actual used queue length for the port can be retrieved (read only) by the IFLA_MACVLAN_BC_QUEUE_LEN_USED parameter for verification. This will be followed up by a patch to iproute2 in order to adjust the parameter from userspace. Signed-off-by: Thomas Karlsson Link: https://lore.kernel.org/r/dd4673b2-7eab-edda-6815-85c67ce87f63@paneda.se Signed-off-by: Jakub Kicinski commit 6e5c4ea37a99e5b97aba227fc43f3682d4bc0496 Author: Bob Peterson Date: Thu Dec 3 08:51:41 2020 -0500 gfs2: in signal_our_withdraw wait for unfreeze of _this_ fs only Function signal_our_withdraw needs to work on file systems that have been partially frozen. To do this, it called flush_workqueue(gfs2_freeze_wq). This this wrong because it waits for *ALL* file systems to be unfrozen, not just the one we're withdrawing from. It should only wait for the targetted file system to be unfrozen. Otherwise it would wait until ALL file systems are thawed before signaling the withdraw. This patch changes signal_our_withdraw so it calls flush_work() for the target file system's freeze work (only) to be completed. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit dd64fe8167ba4cbda343f0a40c5a7c2143d48866 Author: Bob Peterson Date: Thu Dec 3 08:49:55 2020 -0500 gfs2: Remove sb_start_write from gfs2_statfs_sync Before this patch, function gfs2_statfs_sync called sb_start_write and sb_end_write. This is completely unnecessary because, aside from grabbing glocks, gfs2_statfs_sync does all its updates to statfs with a transaction: gfs2_trans_begin and _end. And transactions always do sb_start_intwrite in gfs2_trans_begin and sb_end_intwrite in gfs2_trans_end. This patch simply removes the call to sb_start_write. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit c8dbf2f200de8c9cba3b332522fabad114cf9f53 Author: Zou Wei Date: Thu Dec 3 19:26:35 2020 +0800 regulator: da9121: Mark some symbols with static keyword Fix the following sparse warnings: drivers/regulator/da9121-regulator.c:55:21: warning: symbol 'da9121_10A_2phase_current' was not declared. Should it be static? drivers/regulator/da9121-regulator.c:63:21: warning: symbol 'da9121_6A_2phase_current' was not declared. Should it be static? drivers/regulator/da9121-regulator.c:71:21: warning: symbol 'da9121_5A_1phase_current' was not declared. Should it be static? drivers/regulator/da9121-regulator.c:79:21: warning: symbol 'da9121_3A_1phase_current' was not declared. Should it be static? drivers/regulator/da9121-regulator.c:151:32: warning: symbol 'status_event_handling' was not declared. Should it be static? Signed-off-by: Zou Wei Acked-by: Adam Ward Link: https://lore.kernel.org/r/1606994795-36182-1-git-send-email-zou_wei@huawei.com Signed-off-by: Mark Brown commit ce3cca337401123c9cf96896fc4e1657bb016bd3 Author: Chunguang Xu Date: Sat Nov 7 23:58:13 2020 +0800 ext4: simplify the code of mb_find_order_for_block The code of mb_find_order_for_block is a bit obscure, but we can simplify it with mb_find_buddy(), make the code more concise. Signed-off-by: Chunguang Xu Reviewed-by: Andreas Dilger Link: https://lore.kernel.org/r/1604764698-4269-3-git-send-email-brookxu@tencent.com Signed-off-by: Theodore Ts'o commit 6bd97bf273bdb4944904e57480f6545bca48ad77 Author: Chunguang Xu Date: Sat Nov 7 23:58:12 2020 +0800 ext4: remove redundant mb_regenerate_buddy() After this patch (163a203), if an abnormal bitmap is detected, we will mark the group as corrupt, and we will not use this group in the future. Therefore, it should be meaningless to regenerate the buddy bitmap of this group, It might be better to delete it. Signed-off-by: Chunguang Xu Reviewed-by: Andreas Dilger Link: https://lore.kernel.org/r/1604764698-4269-2-git-send-email-brookxu@tencent.com Signed-off-by: Theodore Ts'o commit 1a2620a99803ad660edc5d22fd9c66cce91ceb1c Author: Amir Goldstein Date: Wed Dec 2 14:07:08 2020 +0200 inotify: convert to handle_inode_event() interface Convert inotify to use the simple handle_inode_event() interface to get rid of the code duplication between the generic helper fsnotify_handle_event() and the inotify_handle_event() callback, which also happen to be buggy code. The bug will be fixed in the generic helper. Link: https://lore.kernel.org/r/20201202120713.702387-3-amir73il@gmail.com CC: stable@vger.kernel.org Fixes: b9a1b9772509 ("fsnotify: create method handle_inode_event() in fsnotify_operations") Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 837c23fbc1b812f814c75388b6b364349c02efd8 Author: Chunguang Xu Date: Sat Nov 7 23:58:11 2020 +0800 ext4: use ASSERT() to replace J_ASSERT() There are currently multiple forms of assertion, such as J_ASSERT(). J_ASEERT() is provided for the jbd module, which is a public module. Maybe we should use custom ASSERT() like other file systems, such as xfs, which would be better. Signed-off-by: Chunguang Xu Reviewed-by: Andreas Dilger Link: https://lore.kernel.org/r/1604764698-4269-1-git-send-email-brookxu@tencent.com Signed-off-by: Theodore Ts'o commit ca9b404ff137d67e559c5bd77533408bb0fa41dc Author: Roman Anufriev Date: Thu Oct 22 06:21:00 2020 +0300 ext4: print quota journalling mode on (re-)mount Right now, it is hard to understand which quota journalling type is enabled: you need to be quite familiar with kernel code and trace it or really understand what different combinations of fs flags/mount options lead to. This patch adds printing of current quota jounalling mode on each mount/remount, thus making it easier to check it at a glance/in autotests. The semantics is similar to ext4 data journalling modes: * journalled - quota configured, journalling will be enabled * writeback - quota configured, journalling won't be enabled * none - quota isn't configured * disabled - kernel compiled without CONFIG_QUOTA feature Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/1603336860-16153-2-git-send-email-dotdot@yandex-team.ru Signed-off-by: Roman Anufriev Signed-off-by: Theodore Ts'o commit f177ee0882af031b3d7a1e66e1639a58c7932dee Author: Roman Anufriev Date: Thu Oct 22 06:20:59 2020 +0300 ext4: add helpers for checking whether quota can be enabled/is journalled Right now, there are several places, where we check whether fs is capable of enabling quota or if quota is journalled with quite long and non-self-descriptive condition statements. This patch wraps these statements into helpers for better readability and easier usage. Link: https://lore.kernel.org/r/1603336860-16153-1-git-send-email-dotdot@yandex-team.ru Reviewed-by: Jan Kara Signed-off-by: Roman Anufriev Signed-off-by: Theodore Ts'o commit face525ecb30b3d7e35be21911a933980ab504f9 Author: Colin Ian King Date: Wed Oct 21 14:23:26 2020 +0100 ext4: remove redundant assignment of variable ex Variable ex is assigned a variable that is not being read, the assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20201021132326.148052-1-colin.king@canonical.com Signed-off-by: Theodore Ts'o commit 46bac5352929f75c1ec0c2395b06dcbc0fbaee69 Author: Xianting Tian Date: Tue Oct 20 16:22:01 2020 +0800 ext4: remove the null check of bio_vec page bv_page can't be NULL in a valid bio_vec, so we can remove the NULL check, as we did in other places when calling bio_for_each_segment_all() to go through all bio_vec of a bio. Reviewed-by: Jan Kara Signed-off-by: Xianting Tian Link: https://lore.kernel.org/r/20201020082201.34257-1-tian.xianting@h3c.com Signed-off-by: Theodore Ts'o commit 7b721e6d334c9699fcd94553a7fe073ec717d926 Author: Kaixu Xia Date: Tue Oct 20 19:41:09 2020 +0800 ext4: remove redundant operation that set bh to NULL The out_fail branch path don't release the bh and the second bh is valid only in the for statement, so we don't need to set them to NULL. Signed-off-by: Kaixu Xia Reviewed-by: zhangyi (F) Link: https://lore.kernel.org/r/1603194069-17557-1-git-send-email-kaixuxia@tencent.com Signed-off-by: Theodore Ts'o commit 3ba150fb21207e4a7f4b600eb2dbbe83f94571fe Author: Ganesh Goudar Date: Mon Nov 30 14:00:57 2020 +0530 lkdtm/powerpc: Add SLB multihit test To check machine check handling, add support to inject slb multihit errors. Co-developed-by: Mahesh Salgaonkar Signed-off-by: Mahesh Salgaonkar Signed-off-by: Ganesh Goudar [mpe: Use CONFIG_PPC_BOOK3S_64 to fix compile errors reported by lkp@intel.com] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201130083057.135610-1-ganeshgr@linux.ibm.com commit 6c58b1b41b19c00099e4771ee55e21eb9aa245c1 Author: Oliver O'Halloran Date: Thu Apr 9 16:13:37 2020 +1000 powernv/pci: Print an error when device enable is blocked If the platform decides to block enabling the device nothing is printed currently. This can lead to some confusion since the dmesg output will usually print an error with no context e.g. e1000e: probe of 0022:01:00.0 failed with error -22 This shouldn't be spammy since pci_enable_device() already prints a messages when it succeeds. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200409061337.9187-1-oohall@gmail.com commit 450be4960a0fb89b931a6bb3c3f0bb538ac4c03c Author: Oliver O'Halloran Date: Wed Dec 2 11:52:22 2020 +1100 powerpc/pci: Remove LSI mappings on device teardown When a passthrough IO adapter is removed from a pseries machine using hash MMU and the XIVE interrupt mode, the POWER hypervisor expects the guest OS to clear all page table entries related to the adapter. If some are still present, the RTAS call which isolates the PCI slot returns error 9001 "valid outstanding translations" and the removal of the IO adapter fails. This is because when the PHBs are scanned, Linux maps automatically the INTx interrupts in the Linux interrupt number space but these are never removed. This problem can be fixed by adding the corresponding unmap operation when the device is removed. There's no pcibios_* hook for the remove case, but the same effect can be achieved using a bus notifier. Because INTx are shared among PHBs (and potentially across the system), this adds tracking of virq to unmap them only when the last user is gone. [aik: added refcounter] Signed-off-by: Oliver O'Halloran Signed-off-by: Alexey Kardashevskiy Tested-by: Cédric Le Goater Reviewed-by: Frederic Barrat Reviewed-by: Cédric Le Goater Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201202005222.5477-1-aik@ozlabs.ru commit ed2bbd2b8581313ca18a7c586a947f6cdd93a52a Author: Daniel Axtens Date: Thu Dec 3 15:28:07 2020 +1100 powerpc: add security.config, enforcing lockdown=integrity It's sometimes handy to have a config that boots a bit like a system under secure boot (forcing lockdown=integrity, without needing any extra stuff like a command line option). This config file allows that, and also turns on a few assorted security and hardening options for good measure. Suggested-by: Michael Ellerman Signed-off-by: Daniel Axtens Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201203042807.1293655-1-dja@axtens.net commit 1f69aa0b89240653fdf708aada6a3d968447cce7 Author: Christophe Leroy Date: Sun Oct 18 17:25:18 2020 +0000 powerpc/44x: Don't support 47x code and non 47x code at the same time 440/460 variants and 470 variants are not compatible, no need to make code supporting both and using MMU features. Just use CONFIG_PPC_47x to decide what to build. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/c3e64da3d5d068c69a201e03bbae7da055761e5b.1603041883.git.christophe.leroy@csgroup.eu commit 8b8319b181fd9d6821703fef1228b4dcde613a16 Author: Christophe Leroy Date: Sun Oct 18 17:25:17 2020 +0000 powerpc/44x: Don't support 440 when CONFIG_PPC_47x is set As stated in platform/44x/Kconfig, CONFIG_PPC_47x is not compatible with 440 and 460 variants. This is confirmed in asm/cache.h as L1_CACHE_SHIFT is different for 47x, meaning a kernel built for 47x will not run correctly on a 440. In cputable, opt out all 440 and 460 variants when CONFIG_PPC_47x is set. Also add a default match dedicated to 470. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/822833ce3dc10634339818f7d1ab616edf63b0c6.1603041883.git.christophe.leroy@csgroup.eu commit 7d47034551687eb6c15e8431d897a3758fc5f83e Author: Christophe Leroy Date: Tue Oct 13 11:11:21 2020 +0000 powerpc/feature: Remove CPU_FTR_NODSISRALIGN CPU_FTR_NODSISRALIGN has not been used since commit 31bfdb036f12 ("powerpc: Use instruction emulation infrastructure to handle alignment faults") Remove it. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/05d98136b24bbf11525445414bb18cffe2724f48.1602587470.git.christophe.leroy@csgroup.eu commit 0e8ff4f8d2faa2e3381e774c9e2fb975e8b4598f Author: Christophe Leroy Date: Mon Oct 12 08:04:24 2020 +0000 powerpc/mm: Desintegrate MMU_FTR_PPCAS_ARCH_V2 MMU_FTR_PPCAS_ARCH_V2 is defined in cpu_table.h as MMU_FTR_TLBIEL | MMU_FTR_16M_PAGE. MMU_FTR_TLBIEL and MMU_FTR_16M_PAGE are defined in mmu.h MMU_FTR_PPCAS_ARCH_V2 is used only in mmu.h and it is used only once. Remove MMU_FTR_PPCAS_ARCH_V2 and use directly MMU_FTR_TLBIEL | MMU_FTR_16M_PAGE Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/829ae1aed1d2fc6b5fc5818362e573dee5d6ecde.1602489852.git.christophe.leroy@csgroup.eu commit b68e3a3dff97bdc1cba79dc5f80cede8a2419cac Author: Christophe Leroy Date: Mon Oct 12 08:05:49 2020 +0000 powerpc/mm: MMU_FTR_NEED_DTLB_SW_LRU is only possible with CONFIG_PPC_83xx Only mpc83xx will set MMU_FTR_NEED_DTLB_SW_LRU and its definition is enclosed in #ifdef CONFIG_PPC_83xx. Make MMU_FTR_NEED_DTLB_SW_LRU possible only when CONFIG_PPC_83xx is set. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/d01d7613664fafa43de1f1ae89924075bc24241c.1602489931.git.christophe.leroy@csgroup.eu commit 1a1be322178ca8097abeee244262ce0da5b519a9 Author: Christophe Leroy Date: Mon Oct 12 08:02:30 2020 +0000 powerpc/mm: Remove useless #ifndef CPU_FTR_COHERENT_ICACHE in mem.c Since commit 10b35d9978ac ("[PATCH] powerpc: merged asm/cputable.h"), CPU_FTR_COHERENT_ICACHE has always been defined. Remove the #ifndef CPU_FTR_COHERENT_ICACHE block. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/e26ddc1d6f6aca739dd8d2b7c67351ead559b084.1602489664.git.christophe.leroy@csgroup.eu commit 197493af414ee22427be3343637ac290a791925a Author: Christophe Leroy Date: Mon Oct 12 08:02:13 2020 +0000 powerpc/feature: Add CPU_FTR_NOEXECUTE to G2_LE G2_LE has a 603 core, add CPU_FTR_NOEXECUTE. Fixes: 385e89d5b20f ("powerpc/mm: add exec protection on powerpc 603") Cc: stable@vger.kernel.org Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/39a530ee41d83f49747ab3af8e39c056450b9b4d.1602489653.git.christophe.leroy@csgroup.eu commit 17179aeb9d34cc81e1a4ae3f85e5b12b13a1f8d0 Author: Christophe Leroy Date: Sat Oct 10 17:30:59 2020 +0000 powerpc/mm: Fix verification of MMU_FTR_TYPE_44x MMU_FTR_TYPE_44x cannot be checked by cpu_has_feature() Use mmu_has_feature() instead Fixes: 23eb7f560a2a ("powerpc: Convert flush_icache_range & friends to C") Cc: stable@vger.kernel.org Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/ceede82fadf37f3b8275e61fcf8cf29a3e2ec7fe.1602351011.git.christophe.leroy@csgroup.eu commit c3cb5dbd85dbd9ae51fadf867782dc34806f04d8 Author: Christophe Leroy Date: Thu Oct 1 10:59:20 2020 +0000 powerpc/time: Remove ifdef in get_vtb() SPRN_VTB and CPU_FTR_ARCH_207S are always defined, no need of an ifdef. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/a0fc81cd85121407726bcf480fc9a0d8e7617fce.1601549933.git.christophe.leroy@csgroup.eu commit d2e006036082e2dc394c5ec86c5bb88cc27c0749 Author: Christophe Leroy Date: Wed Nov 25 07:10:53 2020 +0000 powerpc/32: Use SPRN_SPRG_SCRATCH2 in exception prologs Use SPRN_SPRG_SCRATCH2 as a third scratch register in exception prologs in order to simplify them and avoid data going back and forth from/to CR. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/6f5c8a7faa8cc54acb89c55c20aa579a2f30a4e9.1606285014.git.christophe.leroy@csgroup.eu commit de1cd0790697e67b728de43e8657bb52f528bfb9 Author: Christophe Leroy Date: Wed Nov 25 07:10:52 2020 +0000 powerpc/32s: Use SPRN_SPRG_SCRATCH2 in DSI prolog Use SPRN_SPRG_SCRATCH2 as an alternative scratch register in the early part of DSI prolog in order to avoid clobbering SPRN_SPRG_SCRATCH0/1 used by other prologs. The 603 doesn't like a jump from DataLoadTLBMiss to the 10 nops that are now in the beginning of DSI exception as a result of the feature section. To workaround this, add a jump as alternative. It also avoids fetching 10 nops for nothing. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/f9f8df2a2be93568768ef1ac793639f7914cf103.1606285014.git.christophe.leroy@csgroup.eu commit 6285f9cff570bfd07b542840912c1d01bd5428e0 Author: Christophe Leroy Date: Wed Nov 25 07:10:51 2020 +0000 powerpc/32: Simplify EXCEPTION_PROLOG_1 macro Make code more readable with a clear CONFIG_VMAP_STACK section and a clear non CONFIG_VMAP_STACK section. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/c0f16cf432d22fc80097264d94649460d3dd761d.1606285014.git.christophe.leroy@csgroup.eu commit c4a22611bf6ced73d86bdfc0604d7db8982a24a4 Author: Christophe Leroy Date: Wed Nov 25 07:10:50 2020 +0000 powerpc/603: Use SPRN_SDR1 to store the pgdir phys address On the 603, SDR1 is not used. In order to free SPRN_SPRG2, use SPRN_SDR1 to store the pgdir phys addr. But only some bits of SDR1 can be used (0xffff01ff). As the pgdir is 4k aligned, rotate it by 4 bits to the left. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/7370574b49d8476878ce5480726197993cb76108.1606285014.git.christophe.leroy@csgroup.eu commit 03d701c2d9b0091cf8e96cb49ab7d2a6a9f19937 Author: Christophe Leroy Date: Wed Nov 25 07:10:49 2020 +0000 powerpc/32s: Don't use SPRN_SPRG_PGDIR in hash_page SPRN_SPRG_PGDIR is there mainly to speedup SW TLB miss handlers for powerpc 603. We need to free SPRN_SPRG2 to reduce the mess with CONFIG_VMAP_STACK. In hash_page(), reading PGDIR from thread_struct will be in the noise performance wise. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/4adca19b7120cdf619956768ed09e74fc6a558f3.1606285014.git.christophe.leroy@csgroup.eu commit 7b107a71e732c298d684ee1bafd82f1a2be58d5e Author: Christophe Leroy Date: Wed Nov 25 07:10:48 2020 +0000 powerpc/32s: Fix an FTR_SECTION_ELSE An FTR_SECTION_ELSE is in the middle of BEGIN_MMU_FTR_SECTION/ALT_MMU_FTR_SECTION_END_IFSET Change it to MMU_FTR_SECTION_ELSE Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/61790f1a91692950a6bb5bb53d6d514d9bcdad74.1606285014.git.christophe.leroy@csgroup.eu commit 79d1befe054ad4adb277fbd2d2756b1394eaf24e Author: Christophe Leroy Date: Wed Nov 25 07:10:47 2020 +0000 powerpc/32s: Don't hash_preload() kernel text We now always map kernel text with BATs. Neither need to preload hash with kernel text addresses nor ensure they are never evicted. This is more or less a revert of commit ee4f2ea48674 ("[POWERPC] Fix 32-bit mm operations when not using BATs") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/0a0bab7fadd89aa829e33420fbc10d60c59040a7.1606285014.git.christophe.leroy@csgroup.eu commit 035b19a15a98907916a42a6b1d025877c42f10ad Author: Christophe Leroy Date: Wed Nov 25 07:10:46 2020 +0000 powerpc/32s: Always map kernel text and rodata with BATs Since commit 2b279c0348af ("powerpc/32s: Allow mapping with BATs with DEBUG_PAGEALLOC"), there is no real situation where mapping without BATs is required. In order to simplify memory handling, always map kernel text and rodata with BATs even when "nobats" kernel parameter is set. Also fix the 603 TLB miss exceptions that don't require anymore kernel page table if DEBUG_PAGEALLOC. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/da51f7ec632825a4ce43290a904aad61648408c0.1606285013.git.christophe.leroy@csgroup.eu commit 98f5559a439a68e0773f42352f7c0806cac9e76e Author: Christophe Lombard Date: Wed Nov 25 16:50:13 2020 +0100 ocxl: Add new kernel traces Add specific kernel traces which provide information on mmu notifier and on pages range. Signed-off-by: Christophe Lombard Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201125155013.39955-6-clombard@linux.vnet.ibm.com commit 5f686eea4b3cb1d311f02b81ce4264e66a21d979 Author: Christophe Lombard Date: Wed Nov 25 16:50:12 2020 +0100 ocxl: Add mmu notifier Add invalidate_range mmu notifier, when required (ATSD access of MMIO registers is available), to initiate TLB invalidation commands. For the time being, the ATSD0 set of registers is used by default. The pasid and bdf values have to be configured in the Process Element Entry. The PEE must be set up to match the BDF/PASID of the AFU. Signed-off-by: Christophe Lombard Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201125155013.39955-5-clombard@linux.vnet.ibm.com commit d731feea00c7c1734c9697558f2a1962c12d2710 Author: Christophe Lombard Date: Wed Nov 25 16:50:11 2020 +0100 ocxl: Update the Process Element Entry To complete the MMIO based mechanism, the fields: PASID, bus, device and function of the Process Element Entry have to be filled. (See OpenCAPI Power Platform Architecture document) Hypervisor Process Element Entry Word 0 1 .... 7 8 ...... 12 13 ..15 16.... 19 20 ........... 31 0 OSL Configuration State (0:31) 1 OSL Configuration State (32:63) 2 PASID | Reserved 3 Bus | Device |Function | Reserved 4 Reserved 5 Reserved 6 .... Signed-off-by: Christophe Lombard Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201125155013.39955-4-clombard@linux.vnet.ibm.com commit 19b311ca51e108b6d8d679496af8635fdc1984a8 Author: Christophe Lombard Date: Wed Nov 25 16:50:10 2020 +0100 ocxl: Initiate a TLB invalidate command When a TLB Invalidate is required for the Logical Partition, the following sequence has to be performed: 1. Load MMIO ATSD AVA register with the necessary value, if required. 2. Write the MMIO ATSD launch register to initiate the TLB Invalidate command. 3. Poll the MMIO ATSD status register to determine when the TLB Invalidate has been completed. Signed-off-by: Christophe Lombard Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201125155013.39955-3-clombard@linux.vnet.ibm.com commit fc1347b5feb685073ce2108c68cd8147340be016 Author: Christophe Lombard Date: Wed Nov 25 16:50:09 2020 +0100 ocxl: Assign a register set to a Logical Partition Platform specific function to assign a register set to a Logical Partition. The "ibm,mmio-atsd" property, provided by the firmware, contains the 16 base ATSD physical addresses (ATSD0 through ATSD15) of the set of MMIO registers (XTS MMIO ATSDx LPARID/AVA/launch/status register). For the time being, the ATSD0 set of registers is used by default. Signed-off-by: Christophe Lombard Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201125155013.39955-2-clombard@linux.vnet.ibm.com commit 91668ab7db4bcfae332e561df1de2401f3f18553 Author: Athira Rajeev Date: Thu Nov 26 11:54:44 2020 -0500 powerpc/perf: MMCR0 control for PMU registers under PMCC=00 PowerISA v3.1 introduces new control bit (PMCCEXT) for restricting access to group B PMU registers in problem state when MMCR0 PMCC=0b00. In problem state and when MMCR0 PMCC=0b00, setting the Monitor Mode Control Register bit 54 (MMCR0 PMCCEXT), will restrict read permission on Group B Performance Monitor Registers (SIER, SIAR, SDAR and MMCR1). When this bit is set to zero, group B registers will be readable. In other platforms (like power9), the older behaviour is retained where group B PMU SPRs are readable. Patch adds support for MMCR0 PMCCEXT bit in power10 by enabling this bit during boot and during the PMU event enable/disable callback functions. Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1606409684-1589-8-git-send-email-atrajeev@linux.vnet.ibm.com commit 9a8ee52634235993273c43ef67669d8168497dd7 Author: Athira Rajeev Date: Thu Nov 26 11:54:43 2020 -0500 powerpc/perf: Fix to update cache events with l2l3 events in power10 Export l2l3 events (PM_L2_ST_MISS and PM_L2_ST) and LLC-prefetches (PM_L3_PF_MISS_L3) via sysfs, and also add these to list of cache_events. Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1606409684-1589-7-git-send-email-atrajeev@linux.vnet.ibm.com commit 1f12316394e3b241e70ed620ca846002c8ace3ec Author: Athira Rajeev Date: Thu Nov 26 11:54:42 2020 -0500 powerpc/perf: Fix to update generic event codes for power10 Fix the event code for events: branch-instructions (to PM_BR_FIN), branch-misses (to PM_MPRED_BR_FIN) and cache-misses (to PM_LD_DEMAND_MISS_L1_FIN) for power10 PMU. Update the list of generic events with this modified event code. Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1606409684-1589-6-git-send-email-atrajeev@linux.vnet.ibm.com commit c0e3985790251b307b7b71b687ed0128741b3f34 Author: Athira Rajeev Date: Thu Nov 26 11:54:41 2020 -0500 powerpc/perf: Add generic and cache event list for power10 DD1 There are event code updates for some of the generic events and cache events for power10. Inorder to maintain the current event codes work with DD1 also, create a new array of generic_events, cache_events and pmu_attr_groups with suffix _dd1, example, power10_events_attr_dd1. So that further updates to event codes can be made in the original list, ie, power10_events_attr. Update the power10 pmu init code to pick the dd1 list while registering the power PMU, based on the pvr (Processor Version Register) value. Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1606409684-1589-5-git-send-email-atrajeev@linux.vnet.ibm.com commit 0263bbb377af0c2d38bc8b2ad2ff147e240094de Author: Athira Rajeev Date: Thu Nov 26 11:54:40 2020 -0500 powerpc/perf: Fix the PMU group constraints for threshold events in power10 The PMU group constraints mask for threshold events covers all thresholding bits which includes threshold control value (start/stop), select value as well as thresh_cmp value (MMCRA[9:18]. In power9, thresh_cmp bits were part of the event code. But in case of power10, thresh_cmp bits are not part of event code due to inclusion of MMCR3 bits. Hence thresh_cmp is not valid for group constraints for power10. Fix the PMU group constraints checking for threshold events in power10 by using constraint mask and value for only threshold control and select bits. Fixes: a64e697cef23 ("powerpc/perf: power10 Performance Monitoring support") Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1606409684-1589-4-git-send-email-atrajeev@linux.vnet.ibm.com commit e924be7b0b0d1f37d0509c854a92c7a71e3cdfe7 Author: Athira Rajeev Date: Thu Nov 26 11:54:39 2020 -0500 powerpc/perf: Update the PMU group constraints for l2l3 events in power10 In Power9, L2/L3 bus events are always available as a "bank" of 4 events. To obtain the counts for any of the l2/l3 bus events in a given bank, the user will have to program PMC4 with corresponding l2/l3 bus event for that bank. Commit 59029136d750 ("powerpc/perf: Add constraints for power9 l2/l3 bus events") enforced this rule in Power9. But this is not valid for Power10, since in Power10 Monitor Mode Control Register2 (MMCR2) has bits to configure l2/l3 event bits. Hence remove this PMC4 constraint check from power10. Since the l2/l3 bits in MMCR2 are not per-pmc, patch handles group constrints checks for l2/l3 bits in MMCR2. Fixes: a64e697cef23 ("powerpc/perf: power10 Performance Monitoring support") Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1606409684-1589-3-git-send-email-atrajeev@linux.vnet.ibm.com commit d3afd28cd2f35b2a1046b76e0cf010b684da2e84 Author: Athira Rajeev Date: Thu Nov 26 11:54:38 2020 -0500 powerpc/perf: Fix to update radix_scope_qual in power10 power10 uses bit 9 of the raw event code as RADIX_SCOPE_QUAL. This bit is used for enabling the radix process events. Patch fixes the PMU counter support functions to program bit 18 of MMCR1 ( Monitor Mode Control Register1 ) with the RADIX_SCOPE_QUAL bit value. Since this field is not per-pmc, add this to PMU group constraints to make sure events in a group will have same bit value for this field. Use bit 21 as constraint bit field for radix_scope_qual. Patch also updates the power10 raw event encoding layout information, format field and constraints bit layout to include the radix_scope_qual bit. Fixes: a64e697cef23 ("powerpc/perf: power10 Performance Monitoring support") Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1606409684-1589-2-git-send-email-atrajeev@linux.vnet.ibm.com commit ec0f9b98f7d01b15c804e77e12a515ffc56d7309 Author: Aneesh Kumar K.V Date: Fri Nov 27 10:14:24 2020 +0530 powerpc/book3s64/pkeys: Optimize KUAP and KUEP feature disabled case If FTR_BOOK3S_KUAP is disabled, kernel will continue to run with the same AMR value with which it was entered. Hence there is a high chance that we can return without restoring the AMR value. This also helps the case when applications are not using the pkey feature. In this case, different applications will have the same AMR values and hence we can avoid restoring AMR in this case too. Also avoid isync() if not really needed. Do the same for IAMR. null-syscall benchmark results: With smap/smep disabled: Without patch: 957.95 ns 2778.17 cycles With patch: 858.38 ns 2489.30 cycles With smap/smep enabled: Without patch: 1017.26 ns 2950.36 cycles With patch: 1021.51 ns 2962.44 cycles Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201127044424.40686-23-aneesh.kumar@linux.ibm.com commit 61130e203dca3ba1f0c510eb12f7a4294e31a834 Author: Aneesh Kumar K.V Date: Wed Dec 2 10:08:54 2020 +0530 powerpc/book3s64/kup: Check max key supported before enabling kup Don't enable KUEP/KUAP if we support less than or equal to 3 keys. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201202043854.76406-1-aneesh.kumar@linux.ibm.com commit c91435d95c49f4053b05ba03b41dd7ed0fbd6c71 Author: Aneesh Kumar K.V Date: Fri Nov 27 10:14:22 2020 +0530 powerpc/book3s64/hash/kuep: Enable KUEP on hash Signed-off-by: Aneesh Kumar K.V Reviewed-by: Sandipan Das Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201127044424.40686-21-aneesh.kumar@linux.ibm.com commit b2ff33a10c8b3e9d260c57df38b5cd3765a0b785 Author: Aneesh Kumar K.V Date: Fri Nov 27 10:14:21 2020 +0530 powerpc/book3s64/hash/kuap: Enable kuap on hash Signed-off-by: Aneesh Kumar K.V Reviewed-by: Sandipan Das Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201127044424.40686-20-aneesh.kumar@linux.ibm.com commit 292f86c4c683a1064aff7210348da088c1573ee0 Author: Aneesh Kumar K.V Date: Fri Nov 27 10:14:20 2020 +0530 powerpc/book3s64/kuep: Use Key 3 to implement KUEP with hash translation. Radix use IAMR Key 0 and hash translation use IAMR key 3. Signed-off-by: Aneesh Kumar K.V Reviewed-by: Sandipan Das Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201127044424.40686-19-aneesh.kumar@linux.ibm.com commit fa46c2fa6ffbedab3a3cbcbde1292468979e830b Author: Aneesh Kumar K.V Date: Fri Nov 27 10:14:19 2020 +0530 powerpc/book3s64/kuap: Use Key 3 to implement KUAP with hash translation. Radix use AMR Key 0 and hash translation use AMR key 3. Signed-off-by: Aneesh Kumar K.V Reviewed-by: Sandipan Das Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201127044424.40686-18-aneesh.kumar@linux.ibm.com commit eb232b1624462752dc916d9015b31ecdac0a01f1 Author: Aneesh Kumar K.V Date: Fri Nov 27 10:14:18 2020 +0530 powerpc/book3s64/kuap: Improve error reporting with KUAP With hash translation use DSISR_KEYFAULT to identify a wrong access. With Radix we look at the AMR value and type of fault. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201127044424.40686-17-aneesh.kumar@linux.ibm.com commit 4d6c551e9f548f7675a01eff229d09ab41162a25 Author: Aneesh Kumar K.V Date: Fri Nov 27 10:14:17 2020 +0530 powerpc/book3s64/kuap: Restrict access to userspace based on userspace AMR If an application has configured address protection such that read/write is denied using pkey even the kernel should receive a FAULT on accessing the same. This patch use user AMR value stored in pt_regs.amr to achieve the same. Signed-off-by: Aneesh Kumar K.V Reviewed-by: Sandipan Das Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201127044424.40686-16-aneesh.kumar@linux.ibm.com commit 48a8ab4eeb8271f2a0e2ca3cf80844a59acca153 Author: Aneesh Kumar K.V Date: Fri Nov 27 10:14:16 2020 +0530 powerpc/book3s64/pkeys: Don't update SPRN_AMR when in kernel mode. Now that kernel correctly store/restore userspace AMR/IAMR values, avoid manipulating AMR and IAMR from the kernel on behalf of userspace. Signed-off-by: Aneesh Kumar K.V Reviewed-by: Sandipan Das Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201127044424.40686-15-aneesh.kumar@linux.ibm.com commit edc541ecaae73d498a49b9ca82bc66255d9e0720 Author: Aneesh Kumar K.V Date: Fri Nov 27 10:14:15 2020 +0530 powerpc/ptrace-view: Use pt_regs values instead of thread_struct based one. We will remove thread.amr/iamr/uamor in a later patch Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201127044424.40686-14-aneesh.kumar@linux.ibm.com commit d5fa30e6993ffcdd1859d8dab1a07a6f6c6e7c3f Author: Aneesh Kumar K.V Date: Fri Nov 27 10:14:14 2020 +0530 powerpc/book3s64/pkeys: Reset userspace AMR correctly on exec On fork, we inherit from the parent and on exec, we should switch to default_amr values. Also, avoid changing the AMR register value within the kernel. The kernel now runs with different AMR values. Signed-off-by: Aneesh Kumar K.V Reviewed-by: Sandipan Das Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201127044424.40686-13-aneesh.kumar@linux.ibm.com commit f643fcab74c005ddfdda68c69909f03bde766ff1 Author: Aneesh Kumar K.V Date: Fri Nov 27 10:14:13 2020 +0530 powerpc/book3s64/pkeys: Inherit correctly on fork. Child thread.kuap value is inherited from the parent in copy_thread_tls. We still need to make sure when the child returns from a fork in the kernel we start with the kernel default AMR value. Signed-off-by: Aneesh Kumar K.V Reviewed-by: Sandipan Das Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201127044424.40686-12-aneesh.kumar@linux.ibm.com commit 8e560921b58cbc18e192f0ac273d307a37a144f9 Author: Aneesh Kumar K.V Date: Fri Nov 27 10:14:12 2020 +0530 powerpc/book3s64/pkeys: Store/restore userspace AMR/IAMR correctly on entry and exit from kernel This prepare kernel to operate with a different value than userspace AMR/IAMR. For this, AMR/IAMR need to be saved and restored on entry and return from the kernel. With KUAP we modify kernel AMR when accessing user address from the kernel via copy_to/from_user interfaces. We don't need to modify IAMR value in similar fashion. If MMU_FTR_PKEY is enabled we need to save AMR/IAMR in pt_regs on entering kernel from userspace. If not we can assume that AMR/IAMR is not modified from userspace. We need to save AMR if we have MMU_FTR_BOOK3S_KUAP feature enabled and we are interrupted within kernel. This is required so that if we get interrupted within copy_to/from_user we continue with the right AMR value. If we hae MMU_FTR_BOOK3S_KUEP enabled we need to restore IAMR on return to userspace beause kernel will be running with a different IAMR value. Signed-off-by: Aneesh Kumar K.V Reviewed-by: Sandipan Das Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201127044424.40686-11-aneesh.kumar@linux.ibm.com commit d7df77e89039623ededf0ece7b4358f7c9ecbaae Author: Aneesh Kumar K.V Date: Fri Nov 27 10:14:11 2020 +0530 powerpc/exec: Set thread.regs early during exec In later patches during exec, we would like to access default regs.amr to control access to the user mapping. Having thread.regs set early makes the code changes simpler. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201127044424.40686-10-aneesh.kumar@linux.ibm.com commit d94b827e89dc3f92cd871d10f4992a6bd3c861e5 Author: Aneesh Kumar K.V Date: Fri Nov 27 10:14:10 2020 +0530 powerpc/book3s64/kuap: Use Key 3 for kernel mapping with hash translation This patch updates kernel hash page table entries to use storage key 3 for its mapping. This implies all kernel access will now use key 3 to control READ/WRITE. The patch also prevents the allocation of key 3 from userspace and UAMOR value is updated such that userspace cannot modify key 3. Signed-off-by: Aneesh Kumar K.V Reviewed-by: Sandipan Das Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201127044424.40686-9-aneesh.kumar@linux.ibm.com commit d5b810b5c938e73fd21b2b05ef6a79837eeaa305 Author: Aneesh Kumar K.V Date: Fri Nov 27 10:14:09 2020 +0530 powerpc/book3s64/kuap: Rename MMU_FTR_RADIX_KUAP and MMU_FTR_KUEP This is in preparation to adding support for kuap with hash translation. In preparation for that rename/move kuap related functions to non radix names. Also move the feature bit closer to MMU_FTR_KUEP. MMU_FTR_KUEP is renamed to MMU_FTR_BOOK3S_KUEP to indicate the feature is only relevant to BOOK3S_64 Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201127044424.40686-8-aneesh.kumar@linux.ibm.com commit 57b7505aa8ba13eb18ffabeb689ac64343c53aaa Author: Aneesh Kumar K.V Date: Fri Nov 27 10:14:08 2020 +0530 powerpc/book3s64/kuep: Move KUEP related function outside radix The next set of patches adds support for kuep with hash translation. In preparation for that rename/move kuap related functions to non radix names. Also set MMU_FTR_KUEP and add the missing isync(). Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201127044424.40686-7-aneesh.kumar@linux.ibm.com commit 3b47b7549ead0719e94022c6742199333c7c8d9f Author: Aneesh Kumar K.V Date: Fri Nov 27 10:14:07 2020 +0530 powerpc/book3s64/kuap: Move KUAP related function outside radix The next set of patches adds support for kuap with hash translation. In preparation for that rename/move kuap related functions to non radix names. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201127044424.40686-6-aneesh.kumar@linux.ibm.com commit 39df17bc20059c84ddc6f91831fce2e2cc79a6f3 Author: Aneesh Kumar K.V Date: Fri Nov 27 10:14:06 2020 +0530 powerpc/book3s64/kuap/kuep: Move uamor setup to pkey init This patch consolidates UAMOR update across pkey, kuap and kuep features. The boot cpu initialize UAMOR via pkey init and both radix/hash do the secondary cpu UAMOR init in early_init_mmu_secondary. We don't check for mmu_feature in radix secondary init because UAMOR is a supported SPRN with all CPUs supporting radix translation. The old code was not updating UAMOR if we had smap disabled and smep enabled. This change handles that case. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201127044424.40686-5-aneesh.kumar@linux.ibm.com commit 227ae625522c65c4535cabe407f47abc058585ed Author: Aneesh Kumar K.V Date: Fri Nov 27 10:14:05 2020 +0530 powerpc/book3s64/kuap/kuep: Add PPC_PKEY config on book3s64 The config CONFIG_PPC_PKEY is used to select the base support that is required for PPC_MEM_KEYS, KUAP, and KUEP. Adding this dependency reduces the code complexity(in terms of #ifdefs) and enables us to move some of the initialization code to pkeys.c Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201127044424.40686-4-aneesh.kumar@linux.ibm.com commit 9f378b9f007cc94beadea40df83cc62a76975c6f Author: Aneesh Kumar K.V Date: Fri Nov 27 10:14:04 2020 +0530 KVM: PPC: BOOK3S: PR: Ignore UAMOR SPR With power7 and above we expect the cpu to support keys. The number of keys are firmware controlled based on device tree. PR KVM do not expose key details via device tree. Hence when running with PR KVM we do run with MMU_FTR_KEY support disabled. But we can still get updates on UAMOR. Hence ignore access to them and for mfstpr return 0 indicating no AMR/IAMR update is no allowed. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201127044424.40686-3-aneesh.kumar@linux.ibm.com commit c3d35ddd1ec874690a4e8da5a18497256f1ffa9a Author: Aneesh Kumar K.V Date: Fri Nov 27 10:14:03 2020 +0530 powerpc: Add new macro to handle NESTED_IFCLR This will be used by the following patches Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201127044424.40686-2-aneesh.kumar@linux.ibm.com commit 865ae6f27789dcc3f92341d935f4439e8730a9fe Author: Nicholas Piggin Date: Sat Nov 28 17:07:28 2020 +1000 powerpc/64s: Tidy machine check SLB logging Since ISA v3.0, SLB no longer uses the slb_cache, and stab_rr is no longer correlated with SLB allocation. Move those to pre-3.0. While here, improve some alignments and reduce whitespace. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201128070728.825934-9-npiggin@gmail.com commit 4a869531ddbf5939c45eab6ff389e4e58c8ed19c Author: Nicholas Piggin Date: Sat Nov 28 17:07:27 2020 +1000 powerpc/64s: Remove "Host" from MCE logging "Host" caused machine check is printed when the kernel sees a MCE hit in this kernel or userspace, and "Guest" if it hit one of its guests. This is confusing when a guest kernel handles a hypervisor- delivered MCE, it also prints "Host". Just remove "Host". "Guest" is adequate to make the distinction. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201128070728.825934-8-npiggin@gmail.com commit 82f70a05108c98aea4f140067c44a606262d2af7 Author: Nicholas Piggin Date: Sat Nov 28 17:07:26 2020 +1000 powerpc/64s/pseries: Add ERAT specific machine check handler Don't treat ERAT MCEs as SLB, don't save the SLB and use a specific ERAT flush to recover it. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201128070728.825934-7-npiggin@gmail.com commit f4b239e4c6bddf63d00cd460eabb933232dbc326 Author: Nicholas Piggin Date: Sat Nov 28 17:07:25 2020 +1000 powerpc/64s/powernv: Ratelimit harmless HMI error printing Harmless HMI errors can be triggered by guests in some cases, and don't contain much useful information anyway. Ratelimit these to avoid flooding the console/logs. Signed-off-by: Nicholas Piggin [mpe: Use dedicated ratelimit state, not printk_ratelimit()] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201128070728.825934-6-npiggin@gmail.com commit 1d15ffdfc94127d75e04a88344ee1ce8c79f05fd Author: Nicholas Piggin Date: Sat Nov 28 17:07:24 2020 +1000 KVM: PPC: Book3S HV: Ratelimit machine check messages coming from guests A number of machine check exceptions are triggerable by the guest. Ratelimit these to avoid a guest flooding the host console and logs. Signed-off-by: Nicholas Piggin [mpe: Use dedicated ratelimit state, not printk_ratelimit()] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201128070728.825934-5-npiggin@gmail.com commit 067c9f9c98c8804b07751994c51d8557e440821e Author: Nicholas Piggin Date: Sat Nov 28 17:07:23 2020 +1000 KVM: PPC: Book3S HV: Don't attempt to recover machine checks for FWNMI enabled guests Guests that can deal with machine checks would actually prefer the hypervisor not to try recover for them. For example if SLB multi-hits are recovered by the hypervisor by clearing the SLB then the guest will not be able to log the contents and debug its programming error. If guests don't register for FWNMI, they may not be so capable and so the hypervisor will continue to recover for those. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201128070728.825934-4-npiggin@gmail.com commit 0ce2382657f39ced2adbb927355360c3aaeb05f8 Author: Nicholas Piggin Date: Sat Nov 28 17:07:22 2020 +1000 powerpc/64s/powernv: Allow KVM to handle guest machine check details KVM has strategies to perform machine check recovery. If a MCE hits in a guest, have the low level handler just decode and save the MCE but not try to recover anything, so KVM can deal with it. The host does not own SLBs and does not need to report the SLB state in case of a multi-hit for example, or know about the virtual memory map of the guest. UE and memory poisoning of guest pages in the host is one thing that is possibly not completely robust at the moment, but this too needs to go via KVM (possibly via the guest and back out to host via hcall) rather than being handled at a low level in the host handler. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201128070728.825934-3-npiggin@gmail.com commit 6d247e4d264961aa3b871290f9b11a48d5a567f2 Author: Uwe Kleine-König Date: Thu Nov 26 17:59:50 2020 +0100 powerpc/ps3: make system bus's remove and shutdown callbacks return void The driver core ignores the return value of struct device_driver::remove because there is only little that can be done. For the shutdown callback it's ps3_system_bus_shutdown() which ignores the return value. To simplify the quest to make struct device_driver::remove return void, let struct ps3_system_bus_driver::remove return void, too. All users already unconditionally return 0, this commit makes it obvious that returning an error code is a bad idea and ensures future users behave accordingly. Signed-off-by: Uwe Kleine-König Reviewed-by: Geert Uytterhoeven Acked-by: Takashi Iwai Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201126165950.2554997-2-u.kleine-koenig@pengutronix.de commit 7ff94669e7d8e50756cd57947283381ae9665759 Author: Uwe Kleine-König Date: Thu Nov 26 17:59:49 2020 +0100 ALSA: ppc: drop if block with always false condition The remove callback is only called for devices that were probed successfully before. As the matching probe function cannot complete without error if dev->match_id != PS3_MATCH_ID_SOUND, we don't have to check this here. Signed-off-by: Uwe Kleine-König Reviewed-by: Geert Uytterhoeven Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201126165950.2554997-1-u.kleine-koenig@pengutronix.de commit ca3f969dcb111d35674b66bdcb72beb2c426b9b5 Author: Srikar Dronamraju Date: Wed Dec 2 10:34:56 2020 +0530 powerpc/paravirt: Use is_kvm_guest() in vcpu_is_preempted() If its a shared LPAR but not a KVM guest, then see if the vCPU is related to the calling vCPU. On PowerVM, only cores can be preempted. So if one vCPU is a non-preempted state, we can decipher that all other vCPUs sharing the same core are in non-preempted state. Performance results: $ perf stat -r 5 -a perf bench sched pipe -l 10000000 (lesser time is better) powerpc/next 35,107,951.20 msec cpu-clock # 255.898 CPUs utilized ( +- 0.31% ) 23,655,348 context-switches # 0.674 K/sec ( +- 3.72% ) 14,465 cpu-migrations # 0.000 K/sec ( +- 5.37% ) 82,463 page-faults # 0.002 K/sec ( +- 8.40% ) 1,127,182,328,206 cycles # 0.032 GHz ( +- 1.60% ) (66.67%) 78,587,300,622 stalled-cycles-frontend # 6.97% frontend cycles idle ( +- 0.08% ) (50.01%) 654,124,218,432 stalled-cycles-backend # 58.03% backend cycles idle ( +- 1.74% ) (50.01%) 834,013,059,242 instructions # 0.74 insn per cycle # 0.78 stalled cycles per insn ( +- 0.73% ) (66.67%) 132,911,454,387 branches # 3.786 M/sec ( +- 0.59% ) (50.00%) 2,890,882,143 branch-misses # 2.18% of all branches ( +- 0.46% ) (50.00%) 137.195 +- 0.419 seconds time elapsed ( +- 0.31% ) powerpc/next + patchset 29,981,702.64 msec cpu-clock # 255.881 CPUs utilized ( +- 1.30% ) 40,162,456 context-switches # 0.001 M/sec ( +- 0.01% ) 1,110 cpu-migrations # 0.000 K/sec ( +- 5.20% ) 62,616 page-faults # 0.002 K/sec ( +- 3.93% ) 1,430,030,626,037 cycles # 0.048 GHz ( +- 1.41% ) (66.67%) 83,202,707,288 stalled-cycles-frontend # 5.82% frontend cycles idle ( +- 0.75% ) (50.01%) 744,556,088,520 stalled-cycles-backend # 52.07% backend cycles idle ( +- 1.39% ) (50.01%) 940,138,418,674 instructions # 0.66 insn per cycle # 0.79 stalled cycles per insn ( +- 0.51% ) (66.67%) 146,452,852,283 branches # 4.885 M/sec ( +- 0.80% ) (50.00%) 3,237,743,996 branch-misses # 2.21% of all branches ( +- 1.18% ) (50.01%) 117.17 +- 1.52 seconds time elapsed ( +- 1.30% ) This is around 14.6% improvement in performance. Signed-off-by: Srikar Dronamraju Acked-by: Waiman Long [mpe: Fold in performance results from cover letter] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201202050456.164005-5-srikar@linux.vnet.ibm.com commit a21d1becaa3f17a97b933ffa677b526afc514ec5 Author: Srikar Dronamraju Date: Wed Dec 2 10:34:55 2020 +0530 powerpc: Reintroduce is_kvm_guest() as a fast-path check Introduce a static branch that would be set during boot if the OS happens to be a KVM guest. Subsequent checks to see if we are on KVM will rely on this static branch. This static branch would be used in vcpu_is_preempted() in a subsequent patch. Signed-off-by: Srikar Dronamraju Acked-by: Waiman Long Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201202050456.164005-4-srikar@linux.vnet.ibm.com commit 16520a858a995742c2d2248e86a6026bd0316562 Author: Srikar Dronamraju Date: Wed Dec 2 10:34:54 2020 +0530 powerpc: Rename is_kvm_guest() to check_kvm_guest() We want to reuse the is_kvm_guest() name in a subsequent patch but with a new body. Hence rename is_kvm_guest() to check_kvm_guest(). No additional changes. Signed-off-by: Srikar Dronamraju Acked-by: Waiman Long Signed-off-by: kernel test robot # int -> bool fix [mpe: Fold in fix from lkp to use true/false not 0/1] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201202050456.164005-3-srikar@linux.vnet.ibm.com commit 92cc6bf01c7f4c5cfefd1963985c0064687ebeda Author: Srikar Dronamraju Date: Wed Dec 2 10:34:53 2020 +0530 powerpc: Refactor is_kvm_guest() declaration to new header Only code/declaration movement, in anticipation of doing a KVM-aware vcpu_is_preempted(). No additional changes. Signed-off-by: Srikar Dronamraju Acked-by: Waiman Long Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201202050456.164005-2-srikar@linux.vnet.ibm.com commit bf13718bc57ada25016d9fe80323238d0b94506e Author: Nicholas Piggin Date: Sat Nov 7 12:33:05 2020 +1000 powerpc: show registers when unwinding interrupt frames It's often useful to know the register state for interrupts in the stack frame. In the below example (with this patch applied), the important information is the state of the page fault. A blatant case like this probably rather should have the page fault regs passed down to the warning, but quite often there are less obvious cases where an interrupt shows up that might give some more clues. The downside is longer and more complex bug output. Bug: Write fault blocked by AMR! WARNING: CPU: 0 PID: 72 at arch/powerpc/include/asm/book3s/64/kup-radix.h:164 __do_page_fault+0x880/0xa90 Modules linked in: CPU: 0 PID: 72 Comm: systemd-gpt-aut Not tainted NIP: c00000000006e2f0 LR: c00000000006e2ec CTR: 0000000000000000 REGS: c00000000a4f3420 TRAP: 0700 MSR: 8000000000021033 CR: 28002840 XER: 20040000 CFAR: c000000000128be0 IRQMASK: 3 GPR00: c00000000006e2ec c00000000a4f36c0 c0000000014f0700 0000000000000020 GPR04: 0000000000000001 c000000001290f50 0000000000000001 c000000001290f80 GPR08: c000000001612b08 0000000000000000 0000000000000000 00000000ffffe0f7 GPR12: 0000000048002840 c0000000016e0000 c00c000000021c80 c000000000fd6f60 GPR16: 0000000000000000 c00000000a104698 0000000000000003 c0000000087f0000 GPR20: 0000000000000100 c0000000070330b8 0000000000000000 0000000000000004 GPR24: 0000000002000000 0000000000000300 0000000002000000 c00000000a5b0c00 GPR28: 0000000000000000 000000000a000000 00007fffb2a90038 c00000000a4f3820 NIP [c00000000006e2f0] __do_page_fault+0x880/0xa90 LR [c00000000006e2ec] __do_page_fault+0x87c/0xa90 Call Trace: [c00000000a4f36c0] [c00000000006e2ec] __do_page_fault+0x87c/0xa90 (unreliable) [c00000000a4f3780] [c000000000e1c034] do_page_fault+0x34/0x90 [c00000000a4f37b0] [c000000000008908] data_access_common_virt+0x158/0x1b0 --- interrupt: 300 at __copy_tofrom_user_base+0x9c/0x5a4 NIP: c00000000009b028 LR: c000000000802978 CTR: 0000000000000800 REGS: c00000000a4f3820 TRAP: 0300 MSR: 800000000280b033 CR: 24004840 XER: 00000000 CFAR: c00000000009aff4 DAR: 00007fffb2a90038 DSISR: 0a000000 IRQMASK: 0 GPR00: 0000000000000000 c00000000a4f3ac0 c0000000014f0700 00007fffb2a90028 GPR04: c000000008720010 0000000000010000 0000000000000000 0000000000000000 GPR08: 0000000000000000 0000000000000000 0000000000000000 0000000000000001 GPR12: 0000000000004000 c0000000016e0000 c00c000000021c80 c000000000fd6f60 GPR16: 0000000000000000 c00000000a104698 0000000000000003 c0000000087f0000 GPR20: 0000000000000100 c0000000070330b8 0000000000000000 0000000000000004 GPR24: c00000000a4f3c80 c000000008720000 0000000000010000 0000000000000000 GPR28: 0000000000010000 0000000008720000 0000000000010000 c000000001515b98 NIP [c00000000009b028] __copy_tofrom_user_base+0x9c/0x5a4 LR [c000000000802978] copyout+0x68/0xc0 --- interrupt: 300 [c00000000a4f3af0] [c0000000008074b8] copy_page_to_iter+0x188/0x540 [c00000000a4f3b50] [c00000000035c678] generic_file_buffered_read+0x358/0xd80 [c00000000a4f3c40] [c0000000004c1e90] blkdev_read_iter+0x50/0x80 [c00000000a4f3c60] [c00000000045733c] new_sync_read+0x12c/0x1c0 [c00000000a4f3d00] [c00000000045a1f0] vfs_read+0x1d0/0x240 [c00000000a4f3d50] [c00000000045a7f4] ksys_read+0x84/0x140 [c00000000a4f3da0] [c000000000033a60] system_call_exception+0x100/0x280 [c00000000a4f3e10] [c00000000000c508] system_call_common+0xf8/0x2f8 Instruction dump: eae10078 3be0000b 4bfff890 60420000 792917e1 4182ff18 3c82ffab 3884a5e0 3c62ffab 3863a6e8 480ba891 60000000 <0fe00000> 3be0000b 4bfff860 e93c0938 Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201107023305.2384874-1-npiggin@gmail.com commit f66de7ac4849eb42a7b18e26b8ee49e08130fd27 Author: Athira Rajeev Date: Tue Dec 1 04:28:00 2020 -0500 powerpc/perf: Invoke per-CPU variable access with disabled interrupts The power_pmu_event_init() callback access per-cpu variable (cpu_hw_events) to check for event constraints and Branch Stack (BHRB). Current usage is to disable preemption when accessing the per-cpu variable, but this does not prevent timer callback from interrupting event_init. Fix this by using 'local_irq_save/restore' to make sure the code path is invoked with disabled interrupts. This change is tested in mambo simulator to ensure that, if a timer interrupt comes in during the per-cpu access in event_init, it will be soft masked and replayed later. For testing purpose, introduced a udelay() in power_pmu_event_init() to make sure a timer interrupt arrives while in per-cpu variable access code between local_irq_save/resore. As expected the timer interrupt was replayed later during local_irq_restore called from power_pmu_event_init. This was confirmed by adding breakpoint in mambo and checking the backtrace when timer_interrupt was hit. Reported-by: Sebastian Andrzej Siewior Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1606814880-1720-1-git-send-email-atrajeev@linux.vnet.ibm.com commit c9344769e2b46ba28b947bec7a8a8f0a091ecd57 Author: Harish Date: Tue Dec 1 14:54:03 2020 +0530 selftests/powerpc: Fix uninitialized variable warning Patch fixes uninitialized variable warning in bad_accesses test which causes the selftests build to fail in older distibutions bad_accesses.c: In function ‘bad_access’: bad_accesses.c:52:9: error: ‘x’ may be used uninitialized in this function [-Werror=maybe-uninitialized] printf("Bad - no SEGV! (%c)\n", x); ^ cc1: all warnings being treated as errors Signed-off-by: Harish Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201201092403.238182-1-harish@linux.ibm.com commit f0812f6ca8299e864fe0f41bd7ffdaae3ce7630e Author: Daniel Axtens Date: Wed Dec 2 01:44:27 2020 +1100 selftests/powerpc: update .gitignore I did an in-place build of the self-tests and found that it left the tree dirty. Add missed test binaries to .gitignore Signed-off-by: Daniel Axtens Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201201144427.1228745-1-dja@axtens.net commit 1fc0c27b14b93b2506953ef59e965d98ccc78122 Author: Daniel Axtens Date: Wed Dec 2 01:43:44 2020 +1100 powerpc/feature-fixups: use a semicolon rather than a comma In a bunch of our security flushes, we use a comma rather than a semicolon to 'terminate' an assignment. Nothing breaks, but checkpatch picks it up if you copy it into another flush. Switch to semicolons for ending statements. Signed-off-by: Daniel Axtens Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201201144344.1228421-1-dja@axtens.net commit c8754c517e37270a01b0561ad46ee647a721a09b Author: Frederic Barrat Date: Mon Nov 30 16:29:49 2020 +0100 powerpc/pseries: Define PCI bus speed for Gen4 and Gen5 Update bus speed definition for PCI Gen4 and 5. Signed-off-by: Frederic Barrat Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201130152949.26467-1-fbarrat@linux.ibm.com commit 1baa1f70ef77c4447628992ad50ab83213e2eb6c Author: Jordan Niethe Date: Tue Dec 1 11:52:03 2020 +1100 powerpc: Allow relative pointers in bug table entries This enables GENERIC_BUG_RELATIVE_POINTERS on Power so that 32-bit offsets are stored in the bug entries rather than 64-bit pointers. While this doesn't save space for 32-bit machines, use it anyway so there is only one code path. Signed-off-by: Jordan Niethe Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201201005203.15210-1-jniethe5@gmail.com commit f3e90408019b353fd1fcd338091fb8d3c4a1c1a5 Author: Ravi Bangoria Date: Mon Nov 30 09:14:06 2020 +0530 powerpc/xmon: Fix build failure for 8xx With CONFIG_PPC_8xx and CONFIG_XMON set, kernel build fails with arch/powerpc/xmon/xmon.c:1379:12: error: 'find_free_data_bpt' defined but not used [-Werror=unused-function] Fix it by enclosing find_free_data_bpt() inside #ifndef CONFIG_PPC_8xx. Fixes: 30df74d67d48 ("powerpc/watchpoint/xmon: Support 2nd DAWR") Reported-by: kernel test robot Signed-off-by: Ravi Bangoria Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201130034406.288047-1-ravi.bangoria@linux.ibm.com commit a21df7a1d6ca9bd387a17841863a99431c4aa730 Author: Youling Tang Date: Fri Nov 27 15:07:37 2020 +0800 powerpc: Use common STABS_DEBUG and DWARF_DEBUG and ELF_DETAILS macro Use the common STABS_DEBUG and DWARF_DEBUG and ELF_DETAILS macro rule for the linker script in an effort. Signed-off-by: Youling Tang Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1606460857-2723-1-git-send-email-tangyouling@loongson.cn commit fe18a35e685c9bdabc8b11b3e19deb85a068b75d Author: Jordan Niethe Date: Mon Nov 30 11:44:04 2020 +1100 powerpc/64: Fix an EMIT_BUG_ENTRY in head_64.S Commit 63ce271b5e37 ("powerpc/prom: convert PROM_BUG() to standard trap") added an EMIT_BUG_ENTRY for the trap after the branch to start_kernel(). The EMIT_BUG_ENTRY was for the address "0b", however the trap was not labeled with "0". Hence the address used for bug is in relative_toc() where the previous "0" label is. Label the trap as "0" so the correct address is used. Fixes: 63ce271b5e37 ("powerpc/prom: convert PROM_BUG() to standard trap") Signed-off-by: Jordan Niethe Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201130004404.30953-1-jniethe5@gmail.com commit 65d2150c89121a49e4bd4abbb99c436c77003eed Author: Christophe Leroy Date: Sun Sep 27 09:16:48 2020 +0000 powerpc/vdso: Cleanup vdso.h Rename the guard define to _ASM_POWERPC_VDSO_H And remove useless #ifdef __KERNEL__ Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/9902590d410cd1c2afa48b83b277faf0711f07b2.1601197618.git.christophe.leroy@csgroup.eu commit 676155ab239dc2035d5306438b45695b6fa165e2 Author: Christophe Leroy Date: Sun Sep 27 09:16:47 2020 +0000 powerpc/vdso: Remove VDSO32_LBASE and VDSO64_LBASE VDSO32_LBASE and VDSO64_LBASE are 0. Remove them to simplify code. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/6c4d6570d886bbe1cc471e8ca01602e4b4d9beb5.1601197618.git.christophe.leroy@csgroup.eu commit e90903203d94d0a0d0e8ebc979aa0617a7bbe9a3 Author: Christophe Leroy Date: Sun Sep 27 09:16:46 2020 +0000 powerpc/vdso: Remove DBG() DBG() is not used anymore. Remove it. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/e11a9b50e709f197bb3aa2ed1d80d2dee8714afc.1601197618.git.christophe.leroy@csgroup.eu commit 23c4ceaf1a457808d031c666760fa325c7b7f23f Author: Christophe Leroy Date: Sun Sep 27 09:16:45 2020 +0000 powerpc/vdso: Remove vdso_ready There is no way to get out of vdso_init() prematuraly anymore. Remove vdso_ready as it will always be 1. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/0e1e18c6329b848aa3edeeba76509b4d76182e7d.1601197618.git.christophe.leroy@csgroup.eu commit a4ccd64acb8c08ce8d36001cdd06477deec6ae89 Author: Christophe Leroy Date: Sun Sep 27 09:16:43 2020 +0000 powerpc/vdso: Remove vdso_setup() vdso_fixup_features() cannot fail anymore and that's the only function called by vdso_setup(). vdso_setup() has become trivial and can be removed. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/11522eec6140f510a8c89c63cbb739277d097fdc.1601197618.git.christophe.leroy@csgroup.eu commit 67a354051da28d482e53146def212b102664ce0e Author: Christophe Leroy Date: Sun Sep 27 09:16:42 2020 +0000 powerpc/vdso: Remove lib32_elfinfo and lib64_elfinfo lib32_elfinfo and lib64_elfinfo are not used anymore, remove them. Also remove vdso32_kbase and vdso64_kbase while removing the last use. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/01ac65abf22f0428f8f764525a7d84459c54d806.1601197618.git.christophe.leroy@csgroup.eu commit 6ed613ad572a84c175629fc8657a197c6415b7d6 Author: Christophe Leroy Date: Sun Sep 27 09:16:41 2020 +0000 powerpc/vdso: Remove symbol section information in struct lib32/64_elfinfo The members related to the symbol section in struct lib32_elfinfo and struct lib64_elfinfo are not used anymore, removed them. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/b779e5b7cc0354e2f87fd407fe5b02f4a8a73825.1601197618.git.christophe.leroy@csgroup.eu commit e113f8ef1c7e5fd79b440e5565c8552b36122bfa Author: Christophe Leroy Date: Sun Sep 27 09:16:40 2020 +0000 powerpc/vdso: Remove unused text member in struct lib32/64_elfinfo The text member in struct lib32_elfinfo and struct lib64_elfinfo is not used, remove it. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/f53dcc9bb1946a7854d15b34d03d3d2e2003848c.1601197618.git.christophe.leroy@csgroup.eu commit 5cda7c75493fd17a010d7399e39fda6619f69043 Author: Christophe Leroy Date: Sun Sep 27 09:16:39 2020 +0000 powerpc/vdso: Remove vdso_patches[] and associated functions vdso_patches[] is now empty, remove it and remove all functions that depends on it. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/27d75debd6e4ddeaffe1d66ffed1e7526684a004.1601197618.git.christophe.leroy@csgroup.eu commit 899367ea50637f382fdc5c927fe47e6090d4aefe Author: Christophe Leroy Date: Sun Sep 27 09:16:38 2020 +0000 powerpc/vdso: Remove runtime generated sigtramp offsets Signal trampoline offsets are now generated at buildtime. Runtime generated offsets are not used anymore, remove them. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/7c192d35a437151837cf4c48aeccb42380d6daac.1601197618.git.christophe.leroy@csgroup.eu commit 49bf59fd0371b1053a17021f27605f43071584ee Author: Christophe Leroy Date: Sun Sep 27 09:16:37 2020 +0000 powerpc/vdso: Remove __kernel_datapage_offset __kernel_datapage_offset is not used anymore, remove it. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/ddb5c746bec4e1a026d7c85243213a1876ef844f.1601197618.git.christophe.leroy@csgroup.eu commit b7fe9c15b57d767fda250e8eff79be435996ef33 Author: Christophe Leroy Date: Sun Sep 27 09:16:36 2020 +0000 powerpc/vdso: Remove vdso32_pages and vdso64_pages vdso32_pages and vdso64_pages are not used anymore. Remove them. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/bce021f616cbaf39dfb5766cf7ef114adcb918d9.1601197618.git.christophe.leroy@csgroup.eu commit 0fc980db9a404a993c4ed542369a745d8a14b0b7 Author: Christophe Leroy Date: Sun Sep 27 09:16:35 2020 +0000 powerpc/vdso: Merge __kernel_sync_dicache_p5() into __kernel_sync_dicache() __kernel_sync_dicache_p5() is an alternative to __kernel_sync_dicache() when cpu has CPU_FTR_COHERENT_ICACHE Remove this alternative function and merge __kernel_sync_dicache_p5() into __kernel_sync_dicache() using standard CPU feature fixup. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/4c7dcc6544882761b2b0249d7a8ec2c3a8088cb5.1601197618.git.christophe.leroy@csgroup.eu commit ed07f6353ddf19e51c4db6d2be72ca97f7ed8a08 Author: Christophe Leroy Date: Sun Sep 27 09:16:34 2020 +0000 powerpc/vdso: Use builtin symbols to locate fixup section Add builtin symbols to locate fixup section and use them instead of locating sections through elf headers at runtime. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/2954526981859ca1ccfcfc7a7c4263920e9ddfcb.1601197618.git.christophe.leroy@csgroup.eu commit 91bf695596f594e42d69d70deb2ae53cafecf77c Author: Christophe Leroy Date: Sun Sep 27 09:16:33 2020 +0000 powerpc/vdso: Retrieve sigtramp offsets at buildtime This is copied from arm64. Instead of using runtime generated signal trampoline offsets, get offsets at buildtime. If the said trampoline doesn't exist, build will fail. So no need to check whether the trampoline exists or not in the VDSO. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/f8bfd6812c3e3678b1cdb4d55a52f9eb022b40d3.1601197618.git.christophe.leroy@csgroup.eu commit 550e6074c106e1a6fb57dfef62f0daede12d832c Author: Christophe Leroy Date: Sun Sep 27 09:16:32 2020 +0000 powerpc/vdso: Remove unused \tmp param in __get_datapage() The \tmp param is not used anymore, remove it. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/4b13f897dcccce8ae03c031a4598cf26b32e2f1c.1601197618.git.christophe.leroy@csgroup.eu commit 591857b635c1f635cae556e1b1f9d81808242493 Author: Christophe Leroy Date: Sun Sep 27 09:16:31 2020 +0000 powerpc/vdso: Simplify __get_datapage() The VDSO datapage and the text pages are always located immediately next to each other, so it can be hardcoded without an indirection through __kernel_datapage_offset Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/b08f5ef99d64cfc38f79b7ad5310d9b4d2479eeb.1601197618.git.christophe.leroy@csgroup.eu commit 511157ab641eb6bedd00d62673388e78a4f871cf Author: Christophe Leroy Date: Sun Sep 27 09:16:30 2020 +0000 powerpc/vdso: Move vdso datapage up front Move the vdso datapage in front of the VDSO area, before vdso test. This will allow to remove the __kernel_datapage_offset symbol and simplify __get_datapage() in following patches. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/b68c99b6e8ee0b1d99bfa4c7e34c359fc1bc1000.1601197618.git.christophe.leroy@csgroup.eu commit c102f07667486dc4a6ae1e3fe7aa67135cb40e3e Author: Christophe Leroy Date: Sun Sep 27 09:16:29 2020 +0000 powerpc/vdso: Replace vdso_base by vdso All other architectures but s390 use a void pointer named 'vdso' to reference the VDSO mapping. In a following patch, the VDSO data page will be put in front of text, vdso_base will then not anymore point to VDSO text. To avoid confusion between vdso_base and VDSO text, rename vdso_base into vdso and make it a void __user *. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/8e6cefe474aa4ceba028abb729485cd46c140990.1601197618.git.christophe.leroy@csgroup.eu commit 526a9c4a7234cccf6d900c6e82d79356f974cbfd Author: Christophe Leroy Date: Sun Sep 27 09:16:28 2020 +0000 powerpc/vdso: Provide vdso_remap() Provide vdso_remap() through _install_special_mapping() and drop arch_remap(). This adds a test of the size and returns -EINVAL if the size is not correct. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/373c66f768fa9cc8890f3b55462209a98c522326.1601197618.git.christophe.leroy@csgroup.eu commit c1bab64360e6850ca54305d2f1902dac829c9752 Author: Christophe Leroy Date: Sun Sep 27 09:16:27 2020 +0000 powerpc/vdso: Move to _install_special_mapping() and remove arch_vma_name() Copied from commit 2fea7f6c98f5 ("arm64: vdso: move to _install_special_mapping and remove arch_vma_name"). Use the new _install_special_mapping() API added by commit a62c34bd2a8a ("x86, mm: Improve _install_special_mapping and fix x86 vdso naming") which obsolete install_special_mapping(). And remove arch_vma_name() as the name is handled by the new API. Signed-off-by: Christophe Leroy Signed-off-by: kernel test robot [mpe: Squash fix to use PTR_ERR_OR_ZERO() from lkp] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/e7e5dfe0f93234e31051f2a610b4b07f50b0082f.1601197618.git.christophe.leroy@csgroup.eu commit b2df3f60b452ab496adcef1b2f9c2560f6d8e8e0 Author: Christophe Leroy Date: Sun Sep 27 09:16:26 2020 +0000 powerpc/vdso: Simplify arch_setup_additional_pages() exit To simplify arch_setup_additional_pages() exit, rename it __arch_setup_additional_pages() and create a caller arch_setup_additional_pages() which does the locking. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/603c1d039d3f928ee95e547fcd2219fcf4c3b514.1601197618.git.christophe.leroy@csgroup.eu commit 7461a4f79ba16dc7733c07c00883a10c7e46b602 Author: Christophe Leroy Date: Sun Sep 27 09:16:25 2020 +0000 powerpc/vdso: Use VDSO size in arch_setup_additional_pages() In arch_setup_additional_pages(), instead of using number of VDSO pages and recalculate VDSO size, directly use the VDSO size. As vdso_ready is set, vdso_pages can't be 0 so just remove the test. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/4edfa548c3885a430b765335dc720105716e273f.1601197618.git.christophe.leroy@csgroup.eu commit 4fe0e3c1724e397845df75f64059bcea4ff590e8 Author: Christophe Leroy Date: Sun Sep 27 09:16:24 2020 +0000 powerpc/vdso: Remove unnecessary ifdefs in vdso_pagelist initialization No need of all those #ifdefs around the pagelist initialisation, use IS_ENABLED(), GCC will kick out unused static variables. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/f9333432e329b1fcbbbf846cb1cd4a1c4127a60b.1601197618.git.christophe.leroy@csgroup.eu commit 3cf63825413c9eed2dae06070464efb27381bdac Author: Christophe Leroy Date: Sun Sep 27 09:16:23 2020 +0000 powerpc/vdso: Refactor 32 bits and 64 bits pages setup The setup of VDSO pages is identical for 32 bits VDSO and 64 bits VDSO. Refactor that setup. And use &vdsoXX_start which is synonym of vdsoXX_kbase. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/269ffb54c37fc1d46128f77d7a39f88ef4a9957d.1601197618.git.christophe.leroy@csgroup.eu commit 35c1c7c0bc354d8c3d55bea3bf3e239797980013 Author: Christophe Leroy Date: Sun Sep 27 09:16:22 2020 +0000 powerpc/vdso: Remove NULL termination element in vdso_pagelist No need of a NULL last element in pagelists, install_special_mapping() knows how long the list is. Remove that element. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/e58d95ab859e3cbc9bae3c9ce2959e17d2864f5d.1601197618.git.christophe.leroy@csgroup.eu commit abcdbd039e6823305c2841d07a352fbd2343564e Author: Christophe Leroy Date: Sun Sep 27 09:16:21 2020 +0000 powerpc/vdso: Remove get_page() in vdso_pagelist initialization Partly copied from commit 16fb1a9bec61 ("arm64: vdso: clean up vdso_pagelist initialization"). No need to get_page() the vdso text/data - these are part of the kernel image. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/9d14540bd10832b6c9519d74fb5728fdc4974b36.1601197618.git.christophe.leroy@csgroup.eu commit 1bb30b7a45976ae02d54fd43a8665e77314cc05e Author: Christophe Leroy Date: Sun Sep 27 09:16:20 2020 +0000 powerpc/vdso: Rename syscall_map_32/64 to simplify vdso_setup_syscall_map() Today vdso_data structure has: - syscall_map_32[] and syscall_map_64[] on PPC64 - syscall_map_32[] on PPC32 On PPC32, syscall_map_32[] is populated using sys_call_table[]. On PPC64, syscall_map_64[] is populated using sys_call_table[] and syscal_map_32[] is populated using compat_sys_call_table[]. To simplify vdso_setup_syscall_map(), - On PPC32 rename syscall_map_32[] into syscall_map[], - On PPC64 rename syscall_map_64[] into syscall_map[], - On PPC64 rename syscall_map_32[] into compat_syscall_map[]. That way, syscall_map[] gets populated using sys_call_table[] and compat_syscall_map[] gets population using compat_sys_call_table[]. Also define an empty compat_syscall_map[] on PPC32 to avoid ifdefs. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/472734be0d9991eee320a06824219a5b2663736b.1601197618.git.christophe.leroy@csgroup.eu commit bc9d5bfc4d23fb3580e7da360f2c9bd878dda9b2 Author: Christophe Leroy Date: Sun Sep 27 09:16:19 2020 +0000 powerpc/vdso: Add missing includes and clean vdso_setup_syscall_map() Instead of including extern references locally in vdso_setup_syscall_map(), add the missing headers. sys_ni_syscall() being a function, cast its address to an unsigned long instead of declaring it as a fake unsigned long object. At the same time, remove a comment which paraphrases the function name. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/b4afedce748ed2858299ceab5ae29b52109263ef.1601197618.git.christophe.leroy@csgroup.eu commit 7fe2de246e21f01212a8923fbabb4ac84c944d4a Author: Christophe Leroy Date: Sun Sep 27 09:16:18 2020 +0000 powerpc/vdso: Stripped VDSO is not needed, don't build it Since commit 24b659a13866 ("powerpc: Use unstripped VDSO image for more accurate profiling data"), only the unstripped VDSO image has been used. Partially revert commit 8150caad0226 ("[POWERPC] powerpc vDSO: install unstripped copies on disk") to avoid building the stripped version. And the unstripped version in $(MODLIB)/vdso/ is not required anymore as it is the one embedded in the kernel image. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/5986ca25be44fe6e9790486304507f240077d8c4.1601197618.git.christophe.leroy@csgroup.eu commit ef75e73182949a94bde169a774de1b62ae21fbbc Author: Christophe Leroy Date: Tue Aug 18 17:19:38 2020 +0000 powerpc/signal32: Transform save_user_regs() and save_tm_user_regs() in 'unsafe' version Change those two functions to be used within a user access block. For that, change save_general_regs() to and unsafe_save_general_regs(), then replace all user accesses by unsafe_ versions. This series leads to a reduction from 2.55s to 1.73s of the system CPU time with the following microbench app on an mpc832x with KUAP (approx 32%) Without KUAP, the difference is in the noise. void sigusr1(int sig) { } int main(int argc, char **argv) { int i = 100000; signal(SIGUSR1, sigusr1); for (;i--;) raise(SIGUSR1); exit(0); } An additional 0.10s reduction is achieved by removing CONFIG_PPC_FPU, as the mpc832x has no FPU. A bit less spectacular on an 8xx as KUAP is less heavy, prior to the series (with KUAP) it ran in 8.10 ms. Once applies the removal of FPU regs handling, we get 7.05s. With the full series, we get 6.9s. If artificially re-activating FPU regs handling with the full series, we get 7.6s. So for the 8xx, the removal of the FPU regs copy is what makes the difference, but the rework of handle_signal also have a benefit. Same as above, without KUAP the difference is in the noise. Signed-off-by: Christophe Leroy [mpe: Fixup typo in SPE handling] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/c7b37b385ccf9666066452e58f018a86573f83e8.1597770847.git.christophe.leroy@csgroup.eu commit 968c4fccd1bb8b440326dac5078ad87d17af4a47 Author: Christophe Leroy Date: Tue Aug 18 17:19:36 2020 +0000 powerpc/signal32: Isolate non-copy actions in save_user_regs() and save_tm_user_regs() Reorder actions in save_user_regs() and save_tm_user_regs() to regroup copies together in order to switch to user_access_begin() logic in a later patch. Move non-copy actions into new functions called prepare_save_user_regs() and prepare_save_tm_user_regs(). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/f6eac65781b4a57220477c8864bca2b57f29a5d5.1597770847.git.christophe.leroy@csgroup.eu commit b3484a1d4d1fb54ad7b615a13003d8bc11919c96 Author: Christophe Leroy Date: Tue Aug 18 17:19:35 2020 +0000 powerpc/signal: Create 'unsafe' versions of copy_[ck][fpr/vsx]_to_user() For the non VSX version, that's trivial. Just use unsafe_copy_to_user() instead of __copy_to_user(). For the VSX version, remove the intermediate step through a buffer and use unsafe_put_user() directly. This generates a far smaller code which is acceptable to inline, see below: Standard VSX version: 0000000000000000 <.copy_fpr_to_user>: 0: 7c 08 02 a6 mflr r0 4: fb e1 ff f8 std r31,-8(r1) 8: 39 00 00 20 li r8,32 c: 39 24 0b 80 addi r9,r4,2944 10: 7d 09 03 a6 mtctr r8 14: f8 01 00 10 std r0,16(r1) 18: f8 21 fe 71 stdu r1,-400(r1) 1c: 39 41 00 68 addi r10,r1,104 20: e9 09 00 00 ld r8,0(r9) 24: 39 4a 00 08 addi r10,r10,8 28: 39 29 00 10 addi r9,r9,16 2c: f9 0a 00 00 std r8,0(r10) 30: 42 00 ff f0 bdnz 20 <.copy_fpr_to_user+0x20> 34: e9 24 0d 80 ld r9,3456(r4) 38: 3d 42 00 00 addis r10,r2,0 3a: R_PPC64_TOC16_HA .toc 3c: eb ea 00 00 ld r31,0(r10) 3e: R_PPC64_TOC16_LO_DS .toc 40: f9 21 01 70 std r9,368(r1) 44: e9 3f 00 00 ld r9,0(r31) 48: 81 29 00 20 lwz r9,32(r9) 4c: 2f 89 00 00 cmpwi cr7,r9,0 50: 40 9c 00 18 bge cr7,68 <.copy_fpr_to_user+0x68> 54: 4c 00 01 2c isync 58: 3d 20 40 00 lis r9,16384 5c: 79 29 07 c6 rldicr r9,r9,32,31 60: 7d 3d 03 a6 mtspr 29,r9 64: 4c 00 01 2c isync 68: 38 a0 01 08 li r5,264 6c: 38 81 00 70 addi r4,r1,112 70: 48 00 00 01 bl 70 <.copy_fpr_to_user+0x70> 70: R_PPC64_REL24 .__copy_tofrom_user 74: 60 00 00 00 nop 78: e9 3f 00 00 ld r9,0(r31) 7c: 81 29 00 20 lwz r9,32(r9) 80: 2f 89 00 00 cmpwi cr7,r9,0 84: 40 9c 00 18 bge cr7,9c <.copy_fpr_to_user+0x9c> 88: 4c 00 01 2c isync 8c: 39 20 ff ff li r9,-1 90: 79 29 00 44 rldicr r9,r9,0,1 94: 7d 3d 03 a6 mtspr 29,r9 98: 4c 00 01 2c isync 9c: 38 21 01 90 addi r1,r1,400 a0: e8 01 00 10 ld r0,16(r1) a4: eb e1 ff f8 ld r31,-8(r1) a8: 7c 08 03 a6 mtlr r0 ac: 4e 80 00 20 blr 'unsafe' simulated VSX version (The ... are only nops) using unsafe_copy_fpr_to_user() macro: unsigned long copy_fpr_to_user(void __user *to, struct task_struct *task) { unsafe_copy_fpr_to_user(to, task, failed); return 0; failed: return 1; } 0000000000000000 <.copy_fpr_to_user>: 0: 39 00 00 20 li r8,32 4: 39 44 0b 80 addi r10,r4,2944 8: 7d 09 03 a6 mtctr r8 c: 7c 69 1b 78 mr r9,r3 ... 20: e9 0a 00 00 ld r8,0(r10) 24: f9 09 00 00 std r8,0(r9) 28: 39 4a 00 10 addi r10,r10,16 2c: 39 29 00 08 addi r9,r9,8 30: 42 00 ff f0 bdnz 20 <.copy_fpr_to_user+0x20> 34: e9 24 0d 80 ld r9,3456(r4) 38: f9 23 01 00 std r9,256(r3) 3c: 38 60 00 00 li r3,0 40: 4e 80 00 20 blr ... 50: 38 60 00 01 li r3,1 54: 4e 80 00 20 blr Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/29f6c4b8e7a5bbc61e6a8801b78bbf493f9f819e.1597770847.git.christophe.leroy@csgroup.eu commit 31147d7d6133ea17504b118114a191a8af85f3de Author: Christophe Leroy Date: Tue Aug 18 17:19:34 2020 +0000 powerpc/signal32: Switch swap_context() to user_access_begin() logic As this was the last user of put_sigset_t(), remove it as well. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/c3ac4f2d134a3391bb51bdaa2d00e9a409aba9f8.1597770847.git.christophe.leroy@csgroup.eu commit de781ebdf6b8a256742da4fd6b0e39bb22ed9fe3 Author: Christophe Leroy Date: Tue Aug 18 17:19:33 2020 +0000 powerpc/signal32: Add and use unsafe_put_sigset_t() put_sigset_t() calls copy_to_user() for copying two words. This is terribly inefficient for copying two words. By switching to unsafe_put_user(), we end up with something as simple as: 3cc: 81 3d 00 00 lwz r9,0(r29) 3d0: 91 26 00 b4 stw r9,180(r6) 3d4: 81 3d 00 04 lwz r9,4(r29) 3d8: 91 26 00 b8 stw r9,184(r6) Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/06def97e87ac1c4ae8e3197e0982e1fab7b3c8ae.1597770847.git.christophe.leroy@csgroup.eu commit 14026b94ccfe626e512bc9fa01e0e72ee75c7a98 Author: Christophe Leroy Date: Tue Aug 18 17:19:32 2020 +0000 signal: Add unsafe_put_compat_sigset() Implement 'unsafe' version of put_compat_sigset() For the bigendian, use unsafe_put_user() directly to avoid intermediate copy through the stack. For the littleendian, use a straight unsafe_copy_to_user(). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/537c7082ee309a0bb9c67a50c5d9dd929aedb82d.1597770847.git.christophe.leroy@csgroup.eu commit f1cf4f93de2ff66313a091320d7683735816a0bc Author: Christophe Leroy Date: Tue Aug 18 17:19:31 2020 +0000 powerpc/signal32: Remove ifdefery in middle of if/else MSR_TM_ACTIVE() is always defined and returns always 0 when CONFIG_PPC_TRANSACTIONAL_MEM is not selected, so the awful ifdefery in the middle of an if/else can be removed. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/f3c36d687e4228f58d5c207a4036aa9ddcc7420a.1597770847.git.christophe.leroy@csgroup.eu commit 9504db3e90b22dca19d8152ed5a82c68512dac0e Author: Christophe Leroy Date: Tue Aug 18 17:19:30 2020 +0000 powerpc/signal32: Switch handle_rt_signal32() to user_access_begin() logic On the same way as handle_signal32(), replace all user accesses with equivalent unsafe_ versions, and move the trampoline code icache flush outside the user access block. Functions that have no unsafe_ equivalent also remains outside the access block. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/2974314226256f958e2984912b48883ef1754185.1597770847.git.christophe.leroy@csgroup.eu commit ad65f4909fd3736d84533784cd9ab76905536b34 Author: Christophe Leroy Date: Tue Aug 18 17:19:29 2020 +0000 powerpc/signal32: Switch handle_signal32() to user_access_begin() logic Replace the access_ok() by user_access_begin() and change all user accesses to unsafe_ version. Move flush_icache_range() outside the user access block. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/a27797f781aa00da96f8284c898173d18e952361.1597770847.git.christophe.leroy@csgroup.eu commit 8d33001dd650b88e915a1a13e2ca807350e374df Author: Christophe Leroy Date: Tue Aug 18 17:19:28 2020 +0000 powerpc/signal32: Move signal trampoline setup to handle_[rt_]signal32 Move signal trampoline setup into handle_signal32() and handle_rt_signal32(). At the same time, remove the define which hides the mc_pad field used for trampoline. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/e439cc0fa35aa45da6776520777a61848b92fd4b.1597770847.git.christophe.leroy@csgroup.eu commit 91b8ecd419cb46058e99b3a574184883c02b7729 Author: Christophe Leroy Date: Tue Aug 18 17:19:27 2020 +0000 powerpc/signal32: Misc changes to make handle_[rt_]_signal32() more similar Miscellaneous changes to clean and make handle_signal32() and handle_rt_signal32() even more similar. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/df0bc8c3b8fa96390c46f611df79b2a94ac21844.1597770847.git.christophe.leroy@csgroup.eu commit 8e91cf8501f14d8b6727c71c98fd743e95e9b402 Author: Christophe Leroy Date: Tue Aug 18 17:19:26 2020 +0000 powerpc/signal32: Rename local pointers in handle_rt_signal32() Rename pointers in handle_rt_signal32() to make it more similar to handle_signal32() tm_frame becomes tm_mctx frame becomes mctx rt_sf becomes frame Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/be77477b0f05397876015b218e36548ee8f5e10b.1597770847.git.christophe.leroy@csgroup.eu commit 3eea688be0ccba2221e047b7df6f9ae87361cdd6 Author: Christophe Leroy Date: Tue Aug 18 17:19:25 2020 +0000 powerpc/signal32: Move handle_signal32() close to handle_rt_signal32() Those two functions are similar and serving the same purpose. To ease refactorisation, move them close to each other. This is pure move, no code change, no cosmetic. Yes, checkpatch is not happy, most will clear later. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/dbce67900bf566bcf40179467bf1eb500814c405.1597770847.git.christophe.leroy@csgroup.eu commit debf122c777f361137a3114db7be8aecc65f6af2 Author: Christophe Leroy Date: Tue Aug 18 17:19:24 2020 +0000 powerpc/signal32: Simplify logging in handle_rt_signal32() If something is bad in the frame, there is no point in knowing which part of the frame exactly is wrong as it got allocated as a single block. Always print the root address of the frame in case of failed user access, just like handle_signal32(). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/691895bd31fee89a2d8370befd66ad4eff5b63f2.1597770847.git.christophe.leroy@csgroup.eu commit 7fe8f773ee248c726cec2addcdb94056049d6e34 Author: Christophe Leroy Date: Tue Aug 18 17:19:23 2020 +0000 powerpc/signal: Refactor bad frame logging The logging of bad frame appears half a dozen of times and is pretty similar. Create signal_fault() fonction to perform that logging. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/fa094445c119fc00315e1c13783b493346306c6a.1597770847.git.christophe.leroy@csgroup.eu commit c180cb305c9bba094657259487d563c8fbfb648b Author: Christophe Leroy Date: Tue Aug 18 17:19:22 2020 +0000 powerpc/signal: Call get_tm_stackpointer() from get_sigframe() Instead of calling get_tm_stackpointer() from the caller, call it directly from get_sigframe(). This avoids a double call and allows get_tm_stackpointer() to become static and be inlined into get_sigframe() by GCC. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/abfdc105b8b28c4eb3ab9a26297d17f302b600ea.1597770847.git.christophe.leroy@csgroup.eu commit 0ecbc6ad18e324012234183e21805423f5e0cc79 Author: Christophe Leroy Date: Tue Aug 18 17:19:21 2020 +0000 powerpc/signal: Remove get_clean_sp() get_clean_sp() is only used once in kernel/signal.c . GCC is smart enough to see that x & 0xffffffff is a nop calculation on PPC32, no need of a special PPC32 trivial version. Include the logic from the PPC64 version of get_clean_sp() directly in get_sigframe(). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/13ef6510ce30a4867e043157b93af5bb8c67fb3b.1597770847.git.christophe.leroy@csgroup.eu commit 454b1abb588b3942655638a8bcf1ea4501260579 Author: Christophe Leroy Date: Tue Aug 18 17:19:20 2020 +0000 powerpc/signal: Move access_ok() out of get_sigframe() This access_ok() will soon be performed by user_access_begin(). So move it out of get_sigframe(). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/900b93744732ed0887f28f5b6a40730fb04a43fa.1597770847.git.christophe.leroy@csgroup.eu commit 3fcfb5d1bf731bdbd847c29df57a5372d8ea58d3 Author: Christophe Leroy Date: Tue Aug 18 17:19:19 2020 +0000 powerpc/signal: Remove BUG_ON() in handler_signal functions There is already the same BUG_ON() check in do_signal() which is the only caller of handle_rt_signal64() handle_rt_signal32() and handle_signal32(). Remove those three redundant BUG_ON(). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/3582e10a341d523c9c3f1ac925c3aaefc9d9293d.1597770847.git.christophe.leroy@csgroup.eu commit 7d68c89169508064c460a1208f38ed0589d226fa Author: Christophe Leroy Date: Tue Aug 18 17:19:18 2020 +0000 powerpc/32s: Allow deselecting CONFIG_PPC_FPU on mpc832x The e300c2 core which is embedded in mpc832x CPU doesn't have an FPU. Make it possible to not select CONFIG_PPC_FPU when building a kernel dedicated to that target. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/fcdc60d85baf80eaa0a7f3261d9d889282068216.1597770847.git.christophe.leroy@csgroup.eu commit b6254ced4da6cf28d49fbffe24ee4b3286dcb3f4 Author: Christophe Leroy Date: Tue Aug 18 17:19:17 2020 +0000 powerpc/signal: Don't manage floating point regs when no FPU There is no point in copying floating point regs when there is no FPU and MATH_EMULATION is not selected. Create a new CONFIG_PPC_FPU_REGS bool that is selected by CONFIG_MATH_EMULATION and CONFIG_PPC_FPU, and use it to opt out everything related to fp_state in thread_struct. The asm const used only by fpu.S are opted out with CONFIG_PPC_FPU as fpu.S build is conditionnal to CONFIG_PPC_FPU. The following app spends approx 8.1 seconds system time on an 8xx without the patch, and 7.0 seconds with the patch (13.5% reduction). On an 832x, it spends approx 2.6 seconds system time without the patch and 2.1 seconds with the patch (19% reduction). void sigusr1(int sig) { } int main(int argc, char **argv) { int i = 100000; signal(SIGUSR1, sigusr1); for (;i--;) raise(SIGUSR1); exit(0); } Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/7569070083e6cd5b279bb5023da601aba3c06f3c.1597770847.git.christophe.leroy@csgroup.eu commit 4d90eb97e292c7b14de8ba59fded35b340c73101 Author: Christophe Leroy Date: Tue Aug 18 17:19:16 2020 +0000 powerpc/ptrace: Create ptrace_get_fpr() and ptrace_put_fpr() On the same model as ptrace_get_reg() and ptrace_put_reg(), create ptrace_get_fpr() and ptrace_put_fpr() to get/set the floating points registers. We move the boundary checkings in them. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/24a1baedea7f7ae7b6bf27be98bab6d01b5ca2c1.1597770847.git.christophe.leroy@csgroup.eu commit e009fa433542cd09d6279e361b767a1f44ffd29a Author: Christophe Leroy Date: Tue Aug 18 17:19:15 2020 +0000 powerpc/ptrace: Consolidate reg index calculation Today we have: #ifdef CONFIG_PPC32 index = addr >> 2; if ((addr & 3) || child->thread.regs == NULL) #else index = addr >> 3; if ((addr & 7)) #endif sizeof(long) has value 4 for PPC32 and value 8 for PPC64. Dividing by 4 is equivalent to >> 2 and dividing by 8 is equivalent to >> 3. And 3 and 7 are respectively (sizeof(long) - 1). Use sizeof(long) to get rid of the #ifdef CONFIG_PPC32 and consolidate the calculation and checking. thread.regs have to be not NULL on both PPC32 and PPC64 so adding that test on PPC64 is harmless. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/3cd1e284e93c60db981659585e18d1f6bb73ed2f.1597770847.git.christophe.leroy@csgroup.eu commit 67e364b3295f9dbf3b820d0edde86fb7c95efc98 Author: Christophe Leroy Date: Tue Aug 18 17:19:14 2020 +0000 powerpc/ptrace: Move declaration of ptrace_get_reg() and ptrace_set_reg() ptrace_get_reg() and ptrace_set_reg() are only used internally by ptrace. Move them in arch/powerpc/kernel/ptrace/ptrace-decl.h Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/376c258267aeae54a4423bc4a2e107a9611f0039.1597770847.git.christophe.leroy@csgroup.eu commit 95593e930d7d067ca9bbee996c845248930a01f9 Author: Christophe Leroy Date: Tue Aug 18 17:19:13 2020 +0000 powerpc/signal: Move inline functions in signal.h To really be inlined, the functions need to be defined in the same C file as the caller, or in an included header. Move functions defined inline from signal .c in signal.h Fixes: 3dd4eb83a9c0 ("powerpc: move common register copy functions from signal_32.c to signal.c") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/35b1bd44a1a66f5bcf9b457a1c480ac8d5ef50b2.1597770847.git.christophe.leroy@csgroup.eu commit d0e3fc69d00d1f50d22d6b6acfc555ccda80ad1e Author: Christophe Leroy Date: Fri Nov 27 00:10:06 2020 +1100 powerpc/vdso: Provide __kernel_clock_gettime64() on vdso32 Provides __kernel_clock_gettime64() on vdso32. This is the 64 bits version of __kernel_clock_gettime() which is y2038 compliant. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201126131006.2431205-9-mpe@ellerman.id.au commit ab037dd87a2f946556850e204c06cbd7a2a19390 Author: Christophe Leroy Date: Fri Nov 27 00:10:05 2020 +1100 powerpc/vdso: Switch VDSO to generic C implementation. With the C VDSO, the performance is slightly lower, but it is worth it as it will ease maintenance and evolution, and also brings clocks that are not supported with the ASM VDSO. On an 8xx at 132 MHz, vdsotest with the ASM VDSO: gettimeofday: vdso: 828 nsec/call clock-getres-realtime-coarse: vdso: 391 nsec/call clock-gettime-realtime-coarse: vdso: 614 nsec/call clock-getres-realtime: vdso: 460 nsec/call clock-gettime-realtime: vdso: 876 nsec/call clock-getres-monotonic-coarse: vdso: 399 nsec/call clock-gettime-monotonic-coarse: vdso: 691 nsec/call clock-getres-monotonic: vdso: 460 nsec/call clock-gettime-monotonic: vdso: 1026 nsec/call On an 8xx at 132 MHz, vdsotest with the C VDSO: gettimeofday: vdso: 955 nsec/call clock-getres-realtime-coarse: vdso: 545 nsec/call clock-gettime-realtime-coarse: vdso: 592 nsec/call clock-getres-realtime: vdso: 545 nsec/call clock-gettime-realtime: vdso: 941 nsec/call clock-getres-monotonic-coarse: vdso: 545 nsec/call clock-gettime-monotonic-coarse: vdso: 591 nsec/call clock-getres-monotonic: vdso: 545 nsec/call clock-gettime-monotonic: vdso: 940 nsec/call It is even better for gettime with monotonic clocks. Unsupported clocks with ASM VDSO: clock-gettime-boottime: vdso: 3851 nsec/call clock-gettime-tai: vdso: 3852 nsec/call clock-gettime-monotonic-raw: vdso: 3396 nsec/call Same clocks with C VDSO: clock-gettime-tai: vdso: 941 nsec/call clock-gettime-monotonic-raw: vdso: 1001 nsec/call clock-gettime-monotonic-coarse: vdso: 591 nsec/call On an 8321E at 333 MHz, vdsotest with the ASM VDSO: gettimeofday: vdso: 220 nsec/call clock-getres-realtime-coarse: vdso: 102 nsec/call clock-gettime-realtime-coarse: vdso: 178 nsec/call clock-getres-realtime: vdso: 129 nsec/call clock-gettime-realtime: vdso: 235 nsec/call clock-getres-monotonic-coarse: vdso: 105 nsec/call clock-gettime-monotonic-coarse: vdso: 208 nsec/call clock-getres-monotonic: vdso: 129 nsec/call clock-gettime-monotonic: vdso: 274 nsec/call On an 8321E at 333 MHz, vdsotest with the C VDSO: gettimeofday: vdso: 272 nsec/call clock-getres-realtime-coarse: vdso: 160 nsec/call clock-gettime-realtime-coarse: vdso: 184 nsec/call clock-getres-realtime: vdso: 166 nsec/call clock-gettime-realtime: vdso: 281 nsec/call clock-getres-monotonic-coarse: vdso: 160 nsec/call clock-gettime-monotonic-coarse: vdso: 184 nsec/call clock-getres-monotonic: vdso: 169 nsec/call clock-gettime-monotonic: vdso: 275 nsec/call On a Power9 Nimbus DD2.2 at 3.8GHz, with the ASM VDSO: clock-gettime-monotonic: vdso: 35 nsec/call clock-getres-monotonic: vdso: 16 nsec/call clock-gettime-monotonic-coarse: vdso: 18 nsec/call clock-getres-monotonic-coarse: vdso: 522 nsec/call clock-gettime-monotonic-raw: vdso: 598 nsec/call clock-getres-monotonic-raw: vdso: 520 nsec/call clock-gettime-realtime: vdso: 34 nsec/call clock-getres-realtime: vdso: 16 nsec/call clock-gettime-realtime-coarse: vdso: 18 nsec/call clock-getres-realtime-coarse: vdso: 517 nsec/call getcpu: vdso: 8 nsec/call gettimeofday: vdso: 25 nsec/call And with the C VDSO: clock-gettime-monotonic: vdso: 37 nsec/call clock-getres-monotonic: vdso: 20 nsec/call clock-gettime-monotonic-coarse: vdso: 21 nsec/call clock-getres-monotonic-coarse: vdso: 19 nsec/call clock-gettime-monotonic-raw: vdso: 38 nsec/call clock-getres-monotonic-raw: vdso: 20 nsec/call clock-gettime-realtime: vdso: 37 nsec/call clock-getres-realtime: vdso: 20 nsec/call clock-gettime-realtime-coarse: vdso: 20 nsec/call clock-getres-realtime-coarse: vdso: 19 nsec/call getcpu: vdso: 8 nsec/call gettimeofday: vdso: 28 nsec/call Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201126131006.2431205-8-mpe@ellerman.id.au commit 7fec9f5d41979dbe273ec337327d5939449562e7 Author: Christophe Leroy Date: Fri Nov 27 00:10:04 2020 +1100 powerpc/vdso: Save and restore TOC pointer on PPC64 On PPC64, the TOC pointer needs to be saved and restored. Suggested-by: Michael Ellerman Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201126131006.2431205-7-mpe@ellerman.id.au commit ce7d8056e38b770f070fc4499c577322b6ccb9c7 Author: Christophe Leroy Date: Fri Nov 27 00:10:03 2020 +1100 powerpc/vdso: Prepare for switching VDSO to generic C implementation. Prepare for switching VDSO to generic C implementation in following patch. Here, we: - Prepare the helpers to call the C VDSO functions - Prepare the required callbacks for the C VDSO functions - Prepare the clocksource.h files to define VDSO_ARCH_CLOCKMODES - Add the C trampolines to the generic C VDSO functions powerpc is a bit special for VDSO as well as system calls in the way that it requires setting CR SO bit which cannot be done in C. Therefore, entry/exit needs to be performed in ASM. Implementing __arch_get_vdso_data() would clobber the link register, requiring the caller to save it. As the ASM calling function already has to set a stack frame and saves the link register before calling the C vdso function, retriving the vdso data pointer there is lighter. Implement __arch_vdso_capable() and always return true. Provide vdso_shift_ns(), as the generic x >> s gives the following bad result: 18: 35 25 ff e0 addic. r9,r5,-32 1c: 41 80 00 10 blt 2c 20: 7c 64 4c 30 srw r4,r3,r9 24: 38 60 00 00 li r3,0 ... 2c: 54 69 08 3c rlwinm r9,r3,1,0,30 30: 21 45 00 1f subfic r10,r5,31 34: 7c 84 2c 30 srw r4,r4,r5 38: 7d 29 50 30 slw r9,r9,r10 3c: 7c 63 2c 30 srw r3,r3,r5 40: 7d 24 23 78 or r4,r9,r4 In our case the shift is always <= 32. In addition, the upper 32 bits of the result are likely nul. Lets GCC know it, it also optimises the following calculations. With the patch, we get: 0: 21 25 00 20 subfic r9,r5,32 4: 7c 69 48 30 slw r9,r3,r9 8: 7c 84 2c 30 srw r4,r4,r5 c: 7d 24 23 78 or r4,r9,r4 10: 7c 63 2c 30 srw r3,r3,r5 Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201126131006.2431205-6-mpe@ellerman.id.au commit 1f1676bb2dd52c1054db8476d6387e6dcf62a1ba Author: Michael Ellerman Date: Fri Nov 27 00:10:02 2020 +1100 powerpc/barrier: Use CONFIG_PPC64 for barrier selection Currently we use ifdef __powerpc64__ in barrier.h to decide if we should use lwsync or eieio for SMPWMB which is then used by __smp_wmb(). That means when we are building the compat VDSO we will use eieio, because it's 32-bit code, even though we're building a 64-bit kernel for a 64-bit CPU. Although eieio should work, it would be cleaner if we always used the same barrier, even for the 32-bit VDSO. So change the ifdef to CONFIG_PPC64, so that the selection is made based on the bitness of the kernel we're building for, not the current compilation unit. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201126131006.2431205-5-mpe@ellerman.id.au commit 5c189c523e78d4a70e874477e4b0628fd74207e4 Author: Michael Ellerman Date: Fri Nov 27 00:10:01 2020 +1100 powerpc/time: Fix mftb()/get_tb() for use with the compat VDSO When we're building the compat VDSO we are building 32-bit code but in the context of a 64-bit kernel configuration. To make this work we need to be careful in some places when using ifdefs to differentiate between CONFIG_PPC64 and __powerpc64__. CONFIG_PPC64 indicates the kernel we're building is 64-bit, but it doesn't tell us that we're currently building 64-bit code - we could be building 32-bit code for the compat VDSO. On the other hand __powerpc64__ tells us that we are currently building 64-bit code (and therefore we must also be building a 64-bit kernel). In the case of get_tb() we want to use the 32-bit code sequence regardless of whether the kernel we're building for is 64-bit or 32-bit, what matters is the word size of the current object. So we need to check __powerpc64__ to decide if we use mftb() or the mftbu()/mftb() sequence. For mftb() the logic for CPU_FTR_CELL_TB_BUG only makes sense if we're building 64-bit code, so guard that with a __powerpc64__ check. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201126131006.2431205-4-mpe@ellerman.id.au commit d26b3817d9eefae6b777739c1ea5daba5e72624e Author: Christophe Leroy Date: Fri Nov 27 00:10:00 2020 +1100 powerpc/time: Move timebase functions into new asm/vdso/timebase.h In order to easily use get_tb() from C VDSO, move timebase functions into a new header named asm/vdso/timebase.h Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201126131006.2431205-3-mpe@ellerman.id.au commit 8f8cffd9df81612b5b06d2c57ebf74f8961b41be Author: Christophe Leroy Date: Fri Nov 27 00:09:59 2020 +1100 powerpc/processor: Move cpu_relax() into asm/vdso/processor.h cpu_relax() need to be in asm/vdso/processor.h to be used by the C VDSO generic library. Move it there. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201126131006.2431205-2-mpe@ellerman.id.au commit 8d1eeabf253657ae3e76970514f30b7e53a6898f Author: Christophe Leroy Date: Fri Nov 27 00:09:58 2020 +1100 powerpc/feature: Use CONFIG_PPC64 instead of __powerpc64__ to define possible features In order to build VDSO32 for PPC64, we need to have CPU_FTRS_POSSIBLE and CPU_FTRS_ALWAYS independant of whether we are building the 32 bits VDSO or the 64 bits VDSO. Use #ifdef CONFIG_PPC64 instead of #ifdef __powerpc64__ Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201126131006.2431205-1-mpe@ellerman.id.au commit bae80c27fc2195b9e5723d7b05c592e0874f4ba9 Author: Michael Ellerman Date: Tue Nov 24 23:05:47 2020 +1100 powerpc: Update NUMA Kconfig description & help text Update the NUMA Kconfig description to match other architectures, and add some help text. Shamelessly borrowed from x86/arm64. Signed-off-by: Michael Ellerman Reviewed-by: Randy Dunlap Link: https://lore.kernel.org/r/20201124120547.1940635-3-mpe@ellerman.id.au commit 4c28b32b886f1489c5f510ed8e3f0c4e3dcb59f5 Author: Michael Ellerman Date: Tue Nov 24 23:05:46 2020 +1100 powerpc: Make NUMA default y for powernv Our NUMA option is default y for pseries, but not powernv. The bulk of powernv systems are NUMA, so make NUMA default y for powernv also. Signed-off-by: Michael Ellerman Reviewed-by: Srikar Dronamraju Link: https://lore.kernel.org/r/20201124120547.1940635-2-mpe@ellerman.id.au commit 25395cd2f8cb24ce6a5ce073c898acfb091e06cf Author: Michael Ellerman Date: Tue Nov 24 23:05:45 2020 +1100 powerpc: Make NUMA depend on SMP Our Kconfig allows NUMA to be enabled without SMP, but none of our defconfigs use that combination. This means it can easily be broken inadvertently by code changes, which has happened recently. Although it's theoretically possible to have a machine with a single CPU and multiple memory nodes, I can't think of any real systems where that's the case. Even so if such a system exists, it can just run an SMP kernel anyway. So to avoid the need to add extra #ifdefs and/or build breaks, make NUMA depend on SMP. Reported-by: kernel test robot Reported-by: Randy Dunlap Signed-off-by: Michael Ellerman Reviewed-by: Srikar Dronamraju Reviewed-by: Randy Dunlap Link: https://lore.kernel.org/r/20201124120547.1940635-1-mpe@ellerman.id.au commit 894fa235eb4ca0bfa692dbe4932c2f940cdc8c1e Author: Christophe Leroy Date: Sat Nov 21 17:59:19 2020 +0000 powerpc: inline iomap accessors ioreadXX()/ioreadXXbe() accessors are equivalent to ppc in_leXX()/in_be16() accessors but they are not inlined. Since commit 0eb573682872 ("powerpc/kerenl: Enable EEH for IO accessors"), the 'le' versions are equivalent to the ones defined in asm-generic/io.h, allthough the ones there are inlined. Include asm-generic/io.h to get them. Keep ppc versions of the 'be' ones as they are optimised, but make them inline in ppc io.h. This reduces the size of ppc64e_defconfig build by 3 kbytes: text data bss dec hex filename 10160733 4343422 562972 15067127 e5e7f7 vmlinux.before 10159239 4341590 562972 15063801 e5daf9 vmlinux.after A typical function using ioread and iowrite before the change: c00000000066a3c4 <.ata_bmdma_stop>: c00000000066a3c4: 7c 08 02 a6 mflr r0 c00000000066a3c8: fb c1 ff f0 std r30,-16(r1) c00000000066a3cc: f8 01 00 10 std r0,16(r1) c00000000066a3d0: fb e1 ff f8 std r31,-8(r1) c00000000066a3d4: f8 21 ff 81 stdu r1,-128(r1) c00000000066a3d8: eb e3 00 00 ld r31,0(r3) c00000000066a3dc: eb df 00 98 ld r30,152(r31) c00000000066a3e0: 7f c3 f3 78 mr r3,r30 c00000000066a3e4: 4b 9b 6f 7d bl c000000000021360 <.ioread8> c00000000066a3e8: 60 00 00 00 nop c00000000066a3ec: 7f c4 f3 78 mr r4,r30 c00000000066a3f0: 54 63 06 3c rlwinm r3,r3,0,24,30 c00000000066a3f4: 4b 9b 70 4d bl c000000000021440 <.iowrite8> c00000000066a3f8: 60 00 00 00 nop c00000000066a3fc: 7f e3 fb 78 mr r3,r31 c00000000066a400: 38 21 00 80 addi r1,r1,128 c00000000066a404: e8 01 00 10 ld r0,16(r1) c00000000066a408: eb c1 ff f0 ld r30,-16(r1) c00000000066a40c: 7c 08 03 a6 mtlr r0 c00000000066a410: eb e1 ff f8 ld r31,-8(r1) c00000000066a414: 4b ff ff 8c b c00000000066a3a0 <.ata_sff_dma_pause> The same function with this patch: c000000000669cb4 <.ata_bmdma_stop>: c000000000669cb4: e8 63 00 00 ld r3,0(r3) c000000000669cb8: e9 43 00 98 ld r10,152(r3) c000000000669cbc: 7c 00 04 ac hwsync c000000000669cc0: 89 2a 00 00 lbz r9,0(r10) c000000000669cc4: 0c 09 00 00 twi 0,r9,0 c000000000669cc8: 4c 00 01 2c isync c000000000669ccc: 55 29 06 3c rlwinm r9,r9,0,24,30 c000000000669cd0: 7c 00 04 ac hwsync c000000000669cd4: 99 2a 00 00 stb r9,0(r10) c000000000669cd8: a1 4d 06 f0 lhz r10,1776(r13) c000000000669cdc: 2c 2a 00 00 cmpdi r10,0 c000000000669ce0: 41 c2 00 08 beq- c000000000669ce8 <.ata_bmdma_stop+0x34> c000000000669ce4: b1 4d 06 f2 sth r10,1778(r13) c000000000669ce8: 4b ff ff a8 b c000000000669c90 <.ata_sff_dma_pause> Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/18b357d68c4cde149f75c7a1031c850925cd8128.1605981539.git.christophe.leroy@csgroup.eu commit f75e7d73bdf73f07b0701a6d21c111ef5d9021dd Author: Athira Rajeev Date: Mon Nov 23 21:40:40 2020 -0500 powerpc/perf: Fix crash with is_sier_available when pmu is not set On systems without any specific PMU driver support registered, running 'perf record' with —intr-regs will crash ( perf record -I ). The relevant portion from crash logs and Call Trace: Unable to handle kernel paging request for data at address 0x00000068 Faulting instruction address: 0xc00000000013eb18 Oops: Kernel access of bad area, sig: 11 [#1] CPU: 2 PID: 13435 Comm: kill Kdump: loaded Not tainted 4.18.0-193.el8.ppc64le #1 NIP: c00000000013eb18 LR: c000000000139f2c CTR: c000000000393d80 REGS: c0000004a07ab4f0 TRAP: 0300 Not tainted (4.18.0-193.el8.ppc64le) NIP [c00000000013eb18] is_sier_available+0x18/0x30 LR [c000000000139f2c] perf_reg_value+0x6c/0xb0 Call Trace: [c0000004a07ab770] [c0000004a07ab7c8] 0xc0000004a07ab7c8 (unreliable) [c0000004a07ab7a0] [c0000000003aa77c] perf_output_sample+0x60c/0xac0 [c0000004a07ab840] [c0000000003ab3f0] perf_event_output_forward+0x70/0xb0 [c0000004a07ab8c0] [c00000000039e208] __perf_event_overflow+0x88/0x1a0 [c0000004a07ab910] [c00000000039e42c] perf_swevent_hrtimer+0x10c/0x1d0 [c0000004a07abc50] [c000000000228b9c] __hrtimer_run_queues+0x17c/0x480 [c0000004a07abcf0] [c00000000022aaf4] hrtimer_interrupt+0x144/0x520 [c0000004a07abdd0] [c00000000002a864] timer_interrupt+0x104/0x2f0 [c0000004a07abe30] [c0000000000091c4] decrementer_common+0x114/0x120 When perf record session is started with "-I" option, capturing registers on each sample calls is_sier_available() to check for the SIER (Sample Instruction Event Register) availability in the platform. This function in core-book3s accesses 'ppmu->flags'. If a platform specific PMU driver is not registered, ppmu is set to NULL and accessing its members results in a crash. Fix the crash by returning false in is_sier_available() if ppmu is not set. Fixes: 333804dc3b7a ("powerpc/perf: Update perf_regs structure to include SIER") Reported-by: Sachin Sant Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1606185640-1720-1-git-send-email-atrajeev@linux.vnet.ibm.com commit 50a4952fd67b7f7f551e82ac07c51c1a7a74d474 Author: Alexander Lochmann Date: Thu Oct 15 15:24:52 2020 +0200 Updated locking documentation for transaction_t We used LockDoc to derive locking rules for each member of struct transaction_t. Based on those results, we extended the existing documentation by more members of struct transaction_t, and updated the existing documentation. Link: https://lore.kernel.org/r/10cfbef1-994c-c604-f8a6-b1042fcc622f@tu-dortmund.de Signed-off-by: Alexander Lochmann Signed-off-by: Horst Schirmeier Signed-off-by: Theodore Ts'o commit 3d635aba0b35ad5412042d40732f8cec5f58e6c6 Author: Alan Modra Date: Fri Nov 27 11:48:42 2020 +1100 powerpc/boot: Make use of REL16 relocs in powerpc/boot/util.S Use bcl 20,31,0f rather than plain bl to avoid unbalancing the link stack. Update the code to use REL16 relocs, available for ppc64 in 2009 (and ppc32 in 2005). Signed-off-by: Alan Modra [mpe: Incorporate more detail into the change log] Signed-off-by: Michael Ellerman commit 950cc0d2bef078e1f6459900ca4d4b2a2e0e3c37 Author: Amir Goldstein Date: Wed Dec 2 14:07:07 2020 +0200 fsnotify: generalize handle_inode_event() The handle_inode_event() interface was added as (quoting comment): "a simple variant of handle_event() for groups that only have inode marks and don't have ignore mask". In other words, all backends except fanotify. The inotify backend also falls under this category, but because it required extra arguments it was left out of the initial pass of backends conversion to the simple interface. This results in code duplication between the generic helper fsnotify_handle_event() and the inotify_handle_event() callback which also happen to be buggy code. Generalize the handle_inode_event() arguments and add the check for FS_EXCL_UNLINK flag to the generic helper, so inotify backend could be converted to use the simple interface. Link: https://lore.kernel.org/r/20201202120713.702387-2-amir73il@gmail.com CC: stable@vger.kernel.org Fixes: b9a1b9772509 ("fsnotify: create method handle_inode_event() in fsnotify_operations") Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 0b3355b070434f9901f641aac9000df93e2c96ad Author: Shengjiu Wang Date: Mon Nov 30 11:57:48 2020 +0800 ASoC: bindings: fsl-asoc-card: add compatible string for si476x codec The si476x codec is used for FM radio function on i.MX6 auto board. Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1606708668-28786-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 77f1ff751037fcd39c8fc37b3c3796fb139fb388 Author: Shengjiu Wang Date: Mon Nov 30 11:57:47 2020 +0800 ASoC: fsl-asoc-card: Add support for si476x codec The si476x codec is used for FM radio function on i.MX6 auto board, it only supports recording function. Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/1606708668-28786-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 5057d108d69a55f97f3e436aefbabb9c4064d9d6 Author: Fabio Estevam Date: Wed Dec 2 22:34:39 2020 -0300 ASoC: fsl_audmix: Remove unneeded data field The .data field is only used to pass the string name to platform_device_register_data(). Pass the string name directly to make the code simpler. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20201203013439.10617-1-festevam@gmail.com Signed-off-by: Mark Brown commit 38d8dfe0a9e16c2260d1325afd7465215e4fd278 Author: Mauro Carvalho Chehab Date: Thu Dec 3 13:50:33 2020 +0100 media: pixfmt-meta-rkisp1.rst: fix two build warnings With Sphinx 2.x: those two warnings are produced: /devel/v4l/docs/sphinx2/Documentation/output/videodev2.h.rst:6: WARNING: undefined label: v4l2-meta-fmt-rk-isp1-params (if the link has no caption the label must precede a section header) /devel/v4l/docs/sphinx2/Documentation/output/videodev2.h.rst:6: WARNING: undefined label: v4l2-meta-fmt-rk-isp1-stat-3a (if the link has no caption the label must precede a section header) The reason is that there's no blank line between the two identifiers. Fixes: 3f46cac6787f ("media: admin-guide/pixfmt-meta-rkisp1.rst: pixfmt reference conforming with macro") Signed-off-by: Mauro Carvalho Chehab commit 4a85d1cbaa284c518a3748115759fe1dfe036a23 Author: Hans Verkuil Date: Thu Nov 26 14:27:17 2020 +0100 media: userspace-api/media: finalize stateless FWHT codec docs Document V4L2_CTRL_TYPE_FWHT_PARAMS and p_fwht_params. Also improve the V4L2_PIX_FMT_FWHT_STATELESS description. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 63e799b98042e06bec191d2e2079d04590a18a1e Author: Hans Verkuil Date: Thu Nov 26 14:27:16 2020 +0100 media: vidioc-g-ext-ctrls.rst: add missing 'struct' before the types Add 'struct' to clarify that these are pointers to structs. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 63288c829b1a5991d8f8c15cab596108ed206ba6 Author: Hans Verkuil Date: Thu Nov 26 14:12:03 2020 +0100 media: pixfmt-compressed.rst: fix 'bullet' formatting Drop the 'bullets' for the HEVC stateless codec documentation. It doesn't work, and they just show up as asterisks. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d98c34beb8fe539fa872245da76ce2c600180af8 Author: Hans Verkuil Date: Thu Nov 26 14:08:36 2020 +0100 media: ext-ctrls-codec.rst: move FWHT docs to ext-ctrls-codec-stateless.rst Move the documentation for the stateless FWHT codec to ext-ctrls-codec-stateless.rst since that is the proper place for the stable stateless API documentation. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 206bc0f6fb945e90cfea677339ef8adfaedc4b4f Author: Hans Verkuil Date: Thu Nov 26 14:02:18 2020 +0100 media: vicodec: mark the stateless FWHT API as stable The FWHT stateless 'uAPI' was staging and marked explicitly in the V4L2 specification that it will change and is unstable. Note that these control IDs were never exported as a public API, they were only defined in kernel-local headers (fwht-ctrls.h). Now, the FWHT stateless controls is ready to be part of the stable uAPI. While not too late: - Rename V4L2_CID_MPEG_VIDEO_FWHT_PARAMS to V4L2_CID_STATELESS_FWHT_PARAMS. - Move the contents of fwht-ctrls.h to v4l2-controls.h. - Move the public parts of drivers/media/test-drivers/vicodec/codec-fwht.h to v4l2-controls.h. - Add V4L2_CTRL_TYPE_FWHT_PARAMS control initialization and validation. - Add p_fwht_params to struct v4l2_ext_control. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3abfc314c5e60a54973a6f3cefd591bfdad8adf6 Author: Hans Verkuil Date: Thu Nov 26 13:58:20 2020 +0100 media: vicodec: add V4L2_ prefix before FWHT_VERSION and FWHT_FL_* The FWHT stateless 'uAPI' was staging and marked explicitly in the V4L2 specification that it will change and is unstable. Note that these control IDs were never exported as a public API, they were only defined at the driver's code. While not too late, let's rename them is preparation for promoting the stateless FWHT codec API as a public API. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7403fa17c5dfc141291293cdd9d39161031ff995 Author: Hans Verkuil Date: Wed Nov 25 11:19:06 2020 +0100 media: ext-ctrls-image-source.rst: document v4l2_area The v4l2_area struct was not documented in the media documentation, which meant that references to that struct elsewhere in the documentation never linked to anything. [mchehab: remove .. cssclass:: longtable] Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3f46cac6787f371c89d13d6cdd611f81a93ca2b3 Author: Helen Koike Date: Wed Nov 18 15:24:00 2020 +0100 media: admin-guide/pixfmt-meta-rkisp1.rst: pixfmt reference conforming with macro Fix warnings from make htmlddocs: Documentation/output/videodev2.h.rst:6: WARNING: undefined label: v4l2-meta-fmt-rk-isp1-params (if the link has no caption the label must precede a section header) Documentation/output/videodev2.h.rst:6: WARNING: undefined label: v4l2-meta-fmt-rk-isp1-stat-3a (if the link has no caption the label must precede a section header) Fixes: df22026aebd8 ("media: videodev2.h, v4l2-ioctl: add rkisp1 meta buffer format") Signed-off-by: Helen Koike Reported-by: Stephen Rothwell Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 81c6892d5b87a937968725426b1edb2fb5296ca8 Author: Ezequiel Garcia Date: Thu Nov 26 10:36:18 2020 +0100 media: docs: Move the H264 stateless codec uAPI Now that we've destaged the H264 stateless codec controls, and with all the pieces in place, update the documentation and move it to its own section. Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 46a309d27517873b7cd5cd6b81da3a84b48162bc Author: Ezequiel Garcia Date: Thu Nov 26 10:36:17 2020 +0100 media: uapi: move H264 stateless controls out of staging The H.264 stateless 'uAPI' was staging and marked explicitly in the V4L2 specification that it will change and is unstable. Note that these control IDs were never exported as a public API, they were only defined in kernel-local headers (h264-ctrls.h). Now, the H264 stateless controls is ready to be part of the stable uAPI. While not too late, let's rename them and re-number their control IDs, moving them to the newly created stateless control class, and updating all the drivers accordingly. Signed-off-by: Ezequiel Garcia Tested-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit afc5329ea76d0706d0db6d26ff98b890bba1d112 Author: Ezequiel Garcia Date: Thu Nov 26 10:36:16 2020 +0100 media: controls: Log H264 stateless controls in .std_log For now, only print the type of the control. In the future, we might want to be able to print the values of all the stateless codec controls currently set in the control handler, which should be useful for debugging reasons. Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a7ead39700e10df7aaadc13c72e3a0cefcbb7f4e Author: Ezequiel Garcia Date: Thu Nov 26 10:36:15 2020 +0100 media: uapi: Move the H264 stateless control types out of staging Move the H264 stateless control types out of staging, and re-number them to avoid any confusion. Signed-off-by: Ezequiel Garcia Tested-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ee6fcc67db54f699c1ab53a3939fcf62d7cfb311 Author: Ezequiel Garcia Date: Thu Nov 26 10:36:14 2020 +0100 media: doc: Replace symbol for V4L2_CTRL_TYPE_H264_PRED_WEIGHTS When V4L2_CTRL_TYPE_H264_PRED_WEIGHTS was added, adding a replace symbol directive in videodev2.h.rst.exceptions was missed. Now that the control type is destaged, it's important to fix this. Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 95e95ebe9119dcdf04e8aa9e1d9e8de4f1150c67 Author: Ezequiel Garcia Date: Thu Nov 26 10:36:13 2020 +0100 media: uapi: Move parsed H264 pixel format out of staging Since we are ready to stabilize the H264 stateless API, start by first moving the parsed H264 pixel format. Signed-off-by: Ezequiel Garcia Tested-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 008d2bd6e96b5a7e80dacfb02cd182c3839ce819 Author: Ezequiel Garcia Date: Thu Nov 26 10:36:12 2020 +0100 media: controls: Add the stateless codec control class Add a new control class to hold the stateless codecs controls that are ready to be moved out of staging. Signed-off-by: Ezequiel Garcia Tested-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b32e48503df05bd1ca95dc1a07824afc2c7c9c4e Author: Ezequiel Garcia Date: Thu Nov 26 10:36:11 2020 +0100 media: controls: Validate H264 stateless controls Check that all the fields that correspond or are related to a H264 specification syntax element have legal values. Signed-off-by: Ezequiel Garcia Tested-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8917a5f61e4614d6f073cfe59e59c5faa58c026c Author: Ezequiel Garcia Date: Thu Nov 26 10:36:10 2020 +0100 media: Clean stateless control includes Avoid including h264-ctrls.h, vp8-ctrls.h, etc, and instead just include v4l2-ctrls.h which does the right thing. This is in preparation for moving the stateless controls out of staging, which will mean removing some of these headers. Signed-off-by: Ezequiel Garcia Tested-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 35aaa6e650c24212316781b63005f52c1988cd4e Author: Ezequiel Garcia Date: Thu Nov 26 10:36:09 2020 +0100 media: Rename stateful codec control macros For historical reasons, stateful codec controls are named as {}_MPEG_{}. While we can't at this point sanely change all control IDs (such as V4L2_CID_MPEG_VIDEO_VP8_FRAME_HEADER), we can least change the more meaningful macros such as classes macros. Signed-off-by: Ezequiel Garcia Tested-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c8363ff21b5168f2252aa8b8447173ce48ff0149 Author: Ezequiel Garcia Date: Thu Nov 26 10:36:08 2020 +0100 media: cedrus: h264: Support profile controls Cedrus supports H.264 profiles from Baseline to High, except for the Extended profile Expose the V4L2_CID_MPEG_VIDEO_H264_PROFILE so that userspace can query the driver for the supported profiles and levels. Signed-off-by: Ezequiel Garcia Reviewed-by: Jernej Skrabec Tested-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b74593ebb4829ab82787437c77fb9e1ed7150538 Author: Jonas Karlman Date: Thu Nov 26 10:36:07 2020 +0100 media: rkvdec: h264: Support profile and level controls The Rockchip Video Decoder used in RK3399 supports H.264 profiles from Baseline to High 4:2:2 up to Level 5.1, except for the Extended profile. Expose the V4L2_CID_MPEG_VIDEO_H264_PROFILE and the V4L2_CID_MPEG_VIDEO_H264_LEVEL control, so that userspace can query the driver for the list of supported profiles and level. For now, we don't expose 4:2:2 since the driver doesn't implement the required support. [Ezequiel: Don't expose 4:2:2 profile for now] Signed-off-by: Jonas Karlman Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 32143c583870365ff6f1d1558e7833bffe49a820 Author: Ezequiel Garcia Date: Thu Nov 26 10:36:06 2020 +0100 media: controls: Add validate failure debug message Add a debug message for control validation (validate_new) failures. This is useful to debug issues with ioctls such as VIDIOC_TRY_EXT_CTRLS and VIDIOC_S_EXT_CTRLS. Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit df23e0c12582ee18074975b7916b1a0ce620decd Author: Hans Verkuil Date: Thu Nov 26 10:36:05 2020 +0100 media: vidioc-g-ext-ctrls.rst: document V4L2_CTRL_CLASS_DETECT V4L2_CTRL_CLASS_DETECT was never documented here, add it. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 67f577b4d4f78168a4981235917f322e24c6d05e Author: Ezequiel Garcia Date: Mon Nov 23 16:00:19 2020 +0100 media: controls: Add VP8 stateless type initialization The VP8_FRAME_HEADER control type is validated, so it needs a corresponding initialization to produce default legal values. For now, only add the minimum required initialization to satisfy current validation. Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 621214c36e84643bc104e030ef1e1422ff45156c Author: Sakari Ailus Date: Tue Oct 6 15:05:25 2020 +0200 media: ccs: Use all regulators Use regulators vio and vcore besides vana. The regulators were always there but on many boards they've been hard wired. Control them explicitly now. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 6904d4a988d65d1bc373740cda0940fb1a2f665e Author: Sakari Ailus Date: Mon Oct 5 23:36:52 2020 +0200 media: dt-bindings: mipi,ccs: Add vcore and vio supplies Vcore and vio supplies are also part of the spec and used by many sensors. Do not specify the voltages as they are generally sensor dependent. Signed-off-by: Sakari Ailus Reviewed-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab commit 87e4b53f8aba0d45b1c52677e74d7fcf9f56d7d0 Author: Sakari Ailus Date: Mon Oct 5 23:36:00 2020 +0200 media: dt-bindings: mipi,ccs: Don't mention vana voltage It was mentioned vana voltage is typically 2,8 volts. This is truly sensor dependent, and nowadays 2,8 volts is a lot. Signed-off-by: Sakari Ailus Reviewed-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab commit f9947ed66a87d019144675d43be548954ea36510 Author: Sakari Ailus Date: Mon Oct 5 23:17:12 2020 +0200 media: ccs: Remove unnecessary delays from power-up sequence SMIA nor CCS need these delays; remove them. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit ebc0bc270e09671b245ebc0bd3e99138bd16e2be Author: Sakari Ailus Date: Mon Sep 21 18:08:20 2020 +0200 media: ccs: Use longer pre-I²C sleep for CCS compliant devices Longer idle period is required on I²C bus before the first transaction after lifting xshutdown. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 2b5b9af811ae0b1376d5ac87cac26757d773c317 Author: Sakari Ailus Date: Fri Sep 18 11:36:38 2020 +0200 media: ccs: Wrap long lines, unwrap short ones Over the years (and renaming) some lines that may well be wrapped ended up being over 80 characters, likewise there are shorter lines that can be merged. Do that. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit fd5cfde331f86e7712a037e68e9e66b29eaea9fa Author: Sakari Ailus Date: Fri Sep 18 11:23:39 2020 +0200 media: ccs: Clean up runtime PM usage If pm_runtime_get_sync() fails, there's no need to set the device active again. Also, in the same case to return the usage_count to zero, pm_runtime_put_noidle() is enough. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 1b398012cee8d6c9fff15d74e462a5ace6f9ef7c Author: Sakari Ailus Date: Thu Sep 3 21:52:29 2020 +0200 media: ccs: Use static data read-only registers Access read-only registers from CCS static data. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 2538d322108309c4738d0a3c12ef78b98aeb9d00 Author: Sakari Ailus Date: Thu Sep 3 11:32:56 2020 +0200 media: ccs: Add support for manufacturer regs from sensor and module files Write manufacturer specific registers (MSRs) from file to the sensor on sensor power-on. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 2dd4b57944cc49b0693e17e6169b6c6ca0166abd Author: Sakari Ailus Date: Fri Nov 13 16:07:28 2020 +0100 media: ccs: Allow range in between I²C retries Make the delay between I²C access retries a range between 1 and 2 ms. Also make the number of retries 10 instead of 5, in order not to reduce the total amount of time. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 7389d01cc5d7cac6920f28e04afdf85c287e25a1 Author: Sakari Ailus Date: Wed Jun 24 23:57:46 2020 +0200 media: ccs: Change my e-mail address Use my @linux.intel.com e-mail address in the CCS driver. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit b3c0115e34adcabe12fce8845e24ca6f04c1554e Author: Sakari Ailus Date: Fri Oct 2 13:36:14 2020 +0200 media: ccs-pll: Fix MODULE_LICENSE Change MODULE_LICENSE to "GPL v2" as indicated by the SPDX tag. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 9e05bbac43ebfc2fd1ff95e072730ceed807d149 Author: Sakari Ailus Date: Wed May 27 23:59:40 2020 +0200 media: smiapp-pll: Rename as ccs-pll MIPI CCS replaces SMIA and SMIA++ as the current standard. CCS brings new features while existing functionality will be supported. Rename the smiapp-pll as ccs-pll accordingly. Also add Intel copyright to the files. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit fe652254e243a58daf50aa0ddb938885ae2ba565 Author: Sakari Ailus Date: Wed Jun 24 15:39:05 2020 +0200 media: ccs: Read ireal numbers correctly Some limit values are available in q16.q16 format, referred to as 32-bit unsigned ireal in CCS. Read these correctly. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 5017f8b4e0ed9ec39c04ac85de6ce49603f5f02b Author: Sakari Ailus Date: Wed Sep 2 12:46:59 2020 +0200 media: ccs: Move limit value real to integer conversion from read to access time Instead of converting the limit values at register read time, do that at access time instead. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 7d2f8ddaac2c1d938302022d40b057b5f31c4e9d Author: Sakari Ailus Date: Wed Sep 2 12:23:40 2020 +0200 media: ccs: Make real to integer number conversion optional The limit values will be raw soon, and the conversion takes place later on. Prepare for that. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 2989a457171d2b1d457bd378450fe3909eb02623 Author: Sakari Ailus Date: Wed Sep 2 12:09:03 2020 +0200 media: ccs: Refactor register reading a little Rework quirk and 8-bit only access functions with a single function that takes arguments. This is later extensible to support yet more flags. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit e40f1bcbeea6482bae1e077bb57a21ef5db2b499 Author: Sakari Ailus Date: Thu May 28 01:00:29 2020 +0200 media: ccs: Replace somewhat harsh internal checks based on BUG with WARN_ON If an internal driver error was encountered, BUG was issued. Instead, do less harsh WARN_ON_ONCE and try to manage with the consequences. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 7d8d59f260bad0b3b11dc94e88b4195a2d1798af Author: Sakari Ailus Date: Thu May 28 01:02:07 2020 +0200 media: ccs: The functions to get compose or crop rectangle never return NULL The NULL check is not needed as the functions do not return NULL. Remove the check (and BUG). Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 6a0970986e425f5750b081542c340c855d8890e5 Author: Sakari Ailus Date: Wed May 27 10:35:01 2020 +0200 media: ccs: Stop reading arrays after the first zero The register arrays have a certain size but not all the entries will be relevant. In practice reading can be stopped after encountering a zero value in the array. Do that to avoid extra reads. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit a11d3d6891f042b3537b7f113462bcac8088ba70 Author: Sakari Ailus Date: Fri Feb 14 14:49:42 2020 +0100 media: ccs: Read CCS static data from firmware binaries Read the CCS static data for sensors and modules. The files are expected to be found in "ccs" directory. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit f86ae91627f13f8e1231a782c25c00f4dc08e0c9 Author: Sakari Ailus Date: Fri Feb 14 14:14:18 2020 +0100 media: ccs: Combine revision number major and minor into one The module revision number major and minor are both 8 bits while the sensor revision number is 16 bits. Combine the module revision into one number. This also adds printing the lowest 8 bits of the module version through the sysfs attribute. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit a6b396f410b1e77e567dc7ca6f581c3f91e6e7cf Author: Sakari Ailus Date: Fri Feb 14 10:00:35 2020 +0100 media: ccs: Add CCS static data parser library Add a parser library for parsing the CCS static data format. The library may be also compiled in user space as the format has uses also in the user space. Therefore it is dual licensed under the 3-clause BSD license as well. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 97d62caa32d6d79dadae3f8d19af5c92ea9a589a Author: Mauro Carvalho Chehab Date: Tue Dec 1 13:09:08 2020 +0100 refcount: Fix a kernel-doc markup The kernel-doc markup is wrong: it is asking the tool to document struct refcount_struct, instead of documenting typedef refcount_t. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Peter Zijlstra (Intel) Acked-by: Kees Cook Link: https://lkml.kernel.org/r/afb9bb1e675bf5f72a34a55d780779d7d5916b4c.1606823973.git.mchehab+huawei@kernel.org commit b6498aad59b091e5618a9f05e7636e2ad2c6732d Author: Mauro Carvalho Chehab Date: Tue Dec 1 13:09:00 2020 +0100 completion: Drop init_completion define Changeset cd8084f91c02 ("locking/lockdep: Apply crossrelease to completions") added a CONFIG_LOCKDEP_COMPLETE (that was later renamed to CONFIG_LOCKDEP_COMPLETIONS). Such changeset renamed the init_completion, and add a macro that would either run a modified version or the original code. However, such code reported too many false positives. So, it ended being dropped later on by changeset e966eaeeb623 ("locking/lockdep: Remove the cross-release locking checks"). Yet, the define remained there as just: #define init_completion(x) __init_completion(x) Get rid of the define, and return __init_completion() function to its original name. Fixes: e966eaeeb623 ("locking/lockdep: Remove the cross-release locking checks") Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/e657bfc533545c185b1c3c55926a449ead56a88b.1606823973.git.mchehab+huawei@kernel.org commit 79f3b4372b74f03ba25784f7f2e4b0c90e3aef47 Author: Peter Zijlstra Date: Mon Nov 16 16:02:29 2020 +0100 atomic: Update MAINTAINERS Update the files list to include refcount.h and the Documentation/ Signed-off-by: Peter Zijlstra (Intel) commit f0400a77ebdc0a54383c978c7c0d3fc4af203e6b Author: Peter Zijlstra Date: Mon Nov 16 15:57:26 2020 +0100 atomic: Delete obsolete documentation It's been superseded by Documentation/atomic_*.txt. Signed-off-by: Peter Zijlstra (Intel) commit ab440b2c604b60fe90885270fcfeb5c3dd5d6fae Author: Peter Zijlstra Date: Tue Nov 10 13:44:17 2020 +0100 seqlock: Rename __seqprop() users More consistent naming should make it easier to untangle the _Generic token pasting maze called __seqprop(). Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201110115358.GE2594@hirez.programming.kicks-ass.net commit e04ce676e7aa490dcf5df880592e3db5e842a9bc Author: Boqun Feng Date: Mon Nov 2 13:37:42 2020 +0800 lockdep/selftest: Add spin_nest_lock test Add a self test case to test the behavior for the following case: lock(A); lock_nest_lock(C1, A); lock(B); lock_nest_lock(C2, A); This is a reproducer for a problem[1] reported by Chris Wilson, and is helpful to prevent this. [1]: https://lore.kernel.org/lkml/160390684819.31966.12048967113267928793@build.alporthouse.com/ Signed-off-by: Boqun Feng Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201102053743.450459-2-boqun.feng@gmail.com commit a2e9ae58d5042b3aa4a61f676ff6975ff3bc7bc7 Author: Peter Zijlstra Date: Fri Oct 30 12:37:43 2020 +0100 lockdep/selftests: Fix PROVE_RAW_LOCK_NESTING The selftest nests rwlock_t inside raw_spinlock_t, this is invalid. Reported-by: Boqun Feng Signed-off-by: Peter Zijlstra (Intel) commit a07c45312f06e288417049208c344ad76074627d Author: Arnd Bergmann Date: Mon Oct 26 17:50:38 2020 +0100 seqlock: avoid -Wshadow warnings When building with W=2, there is a flood of warnings about the seqlock macros shadowing local variables: 19806 linux/seqlock.h:331:11: warning: declaration of 'seq' shadows a previous local [-Wshadow] 48 linux/seqlock.h:348:11: warning: declaration of 'seq' shadows a previous local [-Wshadow] 8 linux/seqlock.h:379:11: warning: declaration of 'seq' shadows a previous local [-Wshadow] Prefix the local variables to make the warning useful elsewhere again. Fixes: 52ac39e5db51 ("seqlock: seqcount_t: Implement all read APIs as statement expressions") Signed-off-by: Arnd Bergmann Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201026165044.3722931-1-arnd@kernel.org commit 9f65192d8d256dcac99a81c8129234b999704772 Author: Sakari Ailus Date: Wed Sep 30 18:20:42 2020 +0200 media: ccs: Fix obtaining bus information from firmware Let v4l2_fwnode_endpoint_alloc_parse to figure out the type of the data bus. As the old bindings did not require the "bus-type" property, we need to rely on guessing between CSI-2 D-PHY and CCP2. Setting the type to CSI-2 D-PHY will parse just that and succeed even if no data-lanes are set. Also add a comment on the matter to the driver to avoid breaking this in the future. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 7b1dd0f85013c33d5eba1f69503bf29c8e17131e Author: Sakari Ailus Date: Tue Feb 11 22:41:39 2020 +0100 media: ccs: Make hwcfg part of the device specific struct There's no need to allocate the hardware configuration struct separately. Put it in struct ccs_sensor. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 5323aaf19e6c0e184edb23eb70cfe5da38f2c1fb Author: Sakari Ailus Date: Tue Feb 11 22:35:40 2020 +0100 media: ccs: Remove remaining support for platform data No need to support platform data; remove support for conveying hardware configuration that way. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit af1eed0ccd8691b8eb25dcc659fbea7c07730ce5 Author: Sakari Ailus Date: Tue Feb 11 22:32:36 2020 +0100 media: ccs: Remove the I²C ID table The I²C ID table is no longer needed; remove it. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 67b8dc1d0c4a82a8001e36f8763aba5b754e6601 Author: Sakari Ailus Date: Mon Feb 3 12:44:35 2020 +0100 media: ccs: Add CCS ACPI device ID The CCS compliant sensors use device ID "MIPI0200". Use this id for ACPI device matching. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit ca21c45a86ff07e11c7b753072f4e4cc6cd6e093 Author: Sakari Ailus Date: Mon Sep 21 18:04:47 2020 +0200 media: ccs: Add device compatible identifiers for telling SMIA and CCS apart Add device data specific to DT compatible ID to tell SMIA and CCS devices apart already in power-up. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit adc00b457937233b4f392e7fcc6d20ab0227e414 Author: Sakari Ailus Date: Tue Feb 11 22:31:51 2020 +0100 media: ccs: Add MIPI CCS compatible strings Add "mipi-ccs-1.0" and "mipi-ccs-1.1" compatible strings to the CCS driver. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 91f76941dd61da09b537658cdad02207a36585df Author: Sakari Ailus Date: Wed Dec 2 15:18:19 2020 +0100 media: Documentation: ccs: Reorder SPDX and copyright notice lines Move the SPDX tag to the top, placing the copyright notice after that. This aligns the file with existing practices. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 3bf10ebc6d12503edb3430234341491bdc9fff09 Author: Sakari Ailus Date: Wed Dec 2 15:16:57 2020 +0100 media: Documentation: ccs: Rename ccs-regs.txt as ccs-regs.asc As documentation used to be in .txt files before converting to ReST, rename ccs-regs.txt to avoid it being taken as documentation that pre-dates ReST conversion and so target for further conversion to ReST. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 4e62d55d77bbdb33d821f5e16306caab38d42267 Author: Aleksa Sarai Date: Wed Oct 28 10:50:44 2020 +1100 selftests: openat2: add RESOLVE_ conflict test Now that we reject conflicting RESOLVE_ flags, add a selftest to avoid regressions. Signed-off-by: Aleksa Sarai Link: https://lore.kernel.org/r/20201027235044.5240-3-cyphar@cyphar.com Signed-off-by: Christian Brauner commit 398840f8bb935d33c64df4ec4fed77a7d24c267d Author: Aleksa Sarai Date: Wed Oct 28 10:50:43 2020 +1100 openat2: reject RESOLVE_BENEATH|RESOLVE_IN_ROOT This was an oversight in the original implementation, as it makes no sense to specify both scoping flags to the same openat2(2) invocation (before this patch, the result of such an invocation was equivalent to RESOLVE_IN_ROOT being ignored). This is a userspace-visible ABI change, but the only user of openat2(2) at the moment is LXC which doesn't specify both flags and so no userspace programs will break as a result. Fixes: fddb5d430ad9 ("open: introduce openat2(2) syscall") Signed-off-by: Aleksa Sarai Acked-by: Christian Brauner Cc: # v5.6+ Link: https://lore.kernel.org/r/20201027235044.5240-2-cyphar@cyphar.com Signed-off-by: Christian Brauner commit d55863db1dfec8845067f5625f1b0ab18c8948be Author: Peter Zijlstra Date: Fri Nov 13 11:46:06 2020 +0100 arm64/mm: Implement pXX_leaf_size() support ARM64 has non-pagetable aligned large page support with PTE_CONT, when this bit is set the page is part of a super-page. Match the hugetlb code and support these super pages for PTE and PMD levels. This enables PERF_SAMPLE_{DATA,CODE}_PAGE_SIZE to report accurate pagetable leaf sizes. Signed-off-by: Peter Zijlstra (Intel) Acked-by: Will Deacon Link: https://lkml.kernel.org/r/20201126125747.GG2414@hirez.programming.kicks-ass.net commit 8af26be062721e52eba1550caf50b712f774c5fd Author: Peter Zijlstra Date: Wed Nov 11 13:43:57 2020 +0100 perf/core: Fix arch_perf_get_page_size() The (new) page-table walker in arch_perf_get_page_size() is broken in various ways. Specifically while it is used in a lockless manner, it doesn't depend on CONFIG_HAVE_FAST_GUP nor uses the proper _lockless offset methods, nor is careful to only read each entry only once. Also the hugetlb support is broken due to calling pte_page() without first checking pte_special(). Rewrite the whole thing to be a proper lockless page-table walker and employ the new pXX_leaf_size() pgtable functions to determine the pagetable size without looking at the page-frames. Fixes: 51b646b2d9f8 ("perf,mm: Handle non-page-table-aligned hugetlbfs") Fixes: 8d97e71811aa ("perf/core: Add PERF_SAMPLE_DATA_PAGE_SIZE") Signed-off-by: Peter Zijlstra (Intel) Tested-by: Kan Liang Link: https://lkml.kernel.org/r/20201126124207.GM3040@hirez.programming.kicks-ass.net commit 560dabbdf68bb15f9e241af8f828b1c8c38d6c6f Author: Peter Zijlstra Date: Fri Nov 13 11:45:36 2020 +0100 mm: Introduce pXX_leaf_size() A number of architectures have non-pagetable aligned huge/large pages. For such architectures a leaf can actually be part of a larger entry. Provide generic helpers to determine the size of a page-table leaf. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Matthew Wilcox (Oracle) Link: https://lkml.kernel.org/r/20201126121121.102580109@infradead.org commit 2a4a06da8a4b93dd189171eed7a99fffd38f42f3 Author: Peter Zijlstra Date: Fri Nov 13 11:41:40 2020 +0100 mm/gup: Provide gup_get_pte() more generic In order to write another lockless page-table walker, we need gup_get_pte() exposed. While doing that, rename it to ptep_get_lockless() to match the existing ptep_get() naming. Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201126121121.036370527@infradead.org commit a95ba66ac1457b76fe472c8e092ab1006271f16c Author: Jaegeuk Kim Date: Fri Nov 6 13:22:05 2020 -0800 f2fs: avoid race condition for shrinker count Light reported sometimes shinker gets nat_cnt < dirty_nat_cnt resulting in wrong do_shinker work. Let's avoid to return insane overflowed value by adding single tracking value. Reported-by: Light Hsieh Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 5fdb322ff2c2b4ad519f490dcb7ebb96c5439af7 Author: Daeho Jeong Date: Thu Dec 3 15:56:15 2020 +0900 f2fs: add F2FS_IOC_DECOMPRESS_FILE and F2FS_IOC_COMPRESS_FILE Added two ioctl to decompress/compress explicitly the compression enabled file in "compress_mode=user" mount option. Using these two ioctls, the users can make a control of compression and decompression of their files. Signed-off-by: Daeho Jeong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 602a16d58e9aab3c423bcf051033ea6c9e8a6d37 Author: Daeho Jeong Date: Tue Dec 1 13:08:02 2020 +0900 f2fs: add compress_mode mount option We will add a new "compress_mode" mount option to control file compression mode. This supports "fs" and "user". In "fs" mode (default), f2fs does automatic compression on the compression enabled files. In "user" mode, f2fs disables the automaic compression and gives the user discretion of choosing the target file and the timing. It means the user can do manual compression/decompression on the compression enabled files using ioctls. Signed-off-by: Daeho Jeong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 42ad70c469665387e8f7b53cb6d4581492dff906 Author: Dan Carpenter Date: Tue Dec 1 15:30:58 2020 +0100 media: rockchip: rkisp1: remove useless debugfs checks The debugfs_create_dir() function never returns NULLs so this code will never be executed. It's not intended that callers will check for debugfs errors in the normal case and it's not necessary in this driver, so we can just delete this code. Signed-off-by: Dan Carpenter Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0b6a3bf8f5630eced6bf04b3416ebaadc8d153cf Author: Jonathan Corbet Date: Mon Nov 30 23:52:21 2020 +0100 media: stop pretending to maintain cafe and ov7670 It's been a long time since I could credibly claim to be maintaining these drivers; I'm not even sure my hardware works anymore. Mark them orphan. Signed-off-by: Jonathan Corbet Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9c0660e4477a0d33341f8ae6f208db30c57d60bd Author: Christophe JAILLET Date: Sun Nov 29 13:30:11 2020 +0100 media: saa7146: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'saa7146_pgtable_alloc()' GFP_KERNEL can be used because the callers are either .buf_prepare functions or function that already use GFP_KERNEL (hidden in a 'vmalloc_32()' call). When memory is allocated in 'saa7146_init_one()' GFP_KERNEL can be used because it is probe function and no lock is taken in the between. When memory is allocated in 'saa7146_vv_init()' GFP_KERNEL can be used because this function already uses GFP_KERNEL and no lock is taken in the between. When memory is allocated in 'vbi_workaround()' GFP_KERNEL can be used because it is only called from a .open function. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8a9e71e05a22ff22589e1e60c6fb433c96c79e43 Author: Christophe JAILLET Date: Fri Nov 27 21:58:01 2020 +0100 media: ttpci: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'av7110_attach()' GFP_KERNEL can be used because this flag is already used above in the same function and no lock is taken in the between. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0c5a71dc6b8c037b51ad07e0267b9e4eca41652c Author: Christophe JAILLET Date: Fri Nov 27 21:34:40 2020 +0100 media: solo6x10: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'snd_solo_pcm_open()' (solo6x10-g723.c) GFP_KERNEL can be used because this flag is already used jew a few lines above. When memory is allocated in 'solo_enc_alloc()' (solo6x10-v4l2-enc.c) GFP_KERNEL can be used because this flag is already used jew a few lines above. When memory is allocated in 'solo_enc_v4l2_init()' (solo6x10-v4l2-enc.c) GFP_KERNEL can be used because calls 'solo_enc_alloc()' which already uses this flag. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: Ismael Luceno Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5049c15e41c6abceef614810cf2b9454ba5facaa Author: Tom Rix Date: Fri Nov 27 17:44:08 2020 +0100 media: si4713: remove trailing semicolon in macro definition The macro use will already have a semicolon. [hverkuil: also add () around p in the macro] Signed-off-by: Tom Rix Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0c683e9de0c78ee53e220eac9ee3604ca662737a Author: Zou Wei Date: Mon Nov 30 19:11:53 2020 +0800 x86/platform/uv: Make uv_pcibus_kset and uv_hubs_kset static Fix the following sparse warnings: drivers/platform/x86/uv_sysfs.c:22:13: warning: symbol \ 'uv_pcibus_kset' was not declared. Should it be static? drivers/platform/x86/uv_sysfs.c:23:13: warning: symbol \ 'uv_hubs_kset' was not declared. Should it be static? Signed-off-by: Zou Wei Signed-off-by: Borislav Petkov Acked-by: Hans de Goede Link: https://lkml.kernel.org/r/1606734713-43919-1-git-send-email-zou_wei@huawei.com commit 9fe46e7946fca0e9444c1481fec01e7bdcf636ea Author: Fabio Estevam Date: Fri Nov 27 17:09:45 2020 +0100 media: staging/imx: Increase IMX_MEDIA_EOF_TIMEOUT When trying to capture video on a imx6dl-based board with an ADV7280, the following timeout error is observed: v4l2-ctl --stream-mmap -d /dev/video2 [ 22.792049] ipu1_csi1: EOF timeout VIDIOC_DQBUF: failed: Input/output error Increase the IMX_MEDIA_EOF_TIMEOUT to avoid such problem. Signed-off-by: Fabio Estevam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit dfb5d32897167cc4e6c833d3d360b48cd9343d5e Author: Andrey Konovalov Date: Thu Nov 26 16:01:57 2020 +0100 media: camss: Make use of V4L2_CAP_IO_MC Implement mbus_code filtering for format enumeration. Without this patch libcamera errors out with: "ERROR V4L2 v4l2_videodevice.cpp:982 /dev/video0[cap]: Media bus code filtering not supported by the device" This is the second version of this change which handles the case of several pixel formats corresponding to one media bus format correctly. Signed-off-by: Andrey Konovalov Reviewed-by: Robert Foss Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 18d047bd89b8c1f9ba3c9b2d2f7309c953b3ce97 Author: Dan Carpenter Date: Wed Dec 2 17:44:07 2020 +0300 x86/platform/uv: Fix an error code in uv_hubs_init() Return -ENOMEM on allocation failure instead of returning random stack memory contents. Fixes: 4fc2cf1f2daf ("x86/platform/uv: Add new uv_sysfs platform driver") Signed-off-by: Dan Carpenter Signed-off-by: Borislav Petkov Reviewed-by: Justin Ernst Link: https://lkml.kernel.org/r/X8eoN/jMAJb3H3iv@mwanda commit d06c4dec98b655e2808d2a59681ec24197c59c9d Author: Crystal Guo Date: Wed Sep 30 10:21:59 2020 +0800 reset-controller: ti: force the write operation when assert or deassert Force the write operation in case the read already happens to return the correct value. Signed-off-by: Crystal Guo Signed-off-by: Philipp Zabel commit a3d412d4b9f3e1d016cd7c49dfa31a4711c7db90 Author: Andrey Konovalov Date: Thu Nov 26 16:01:56 2020 +0100 media: Revert "media: camss: Make use of V4L2_CAP_IO_MC" This reverts commit c90f1178dcac30dee5ddd29ec0513e7589aa866e. The assumption of "Each entry in formats[] table has unique mbus_code" is valid for the RDI entities, but not for the PIX ones. Reverting this patch and creating a new one which handles the PIX entities correctly results in smaller and more straightforward patch than doing the changes on top of the current version. Signed-off-by: Andrey Konovalov Reviewed-by: Robert Foss Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6b94c09f820d6a34d45d9397e99000444fe41cfb Author: Peilin Ye Date: Thu Nov 26 13:21:48 2020 +0100 media: rockchip: rkisp1: Fix typos in comments and macro definitions Fix 4 typos under drivers/media/platform/rockchip/rkisp1/ found by checkpatch, including the RKISP1_CIF_MI_{M,S}P_PINGPONG_ENABLE macro definitions. Signed-off-by: Peilin Ye Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7aad6a73cb6256040cef7ec5c8bb6534e44a3f80 Author: Jacopo Mondi Date: Thu Nov 26 08:47:56 2020 +0100 media: rcar-vin: Remove unused macro The VNCSI_IFMD_CSI_CHSEL_MASK is not used: remove it. Signed-off-by: Jacopo Mondi Reviewed-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8e06053d339af3caae1c68435cfdb9ac95b0ff25 Author: Fabio Estevam Date: Wed Nov 25 13:04:47 2020 +0100 media: fsl-viu: Use the ioread/write32be() accessors Since commit 29d750686331 ("media: fsl-viu: allow building it with COMPILE_TEST") there were several attempts to fix build failures on PPC, MICROBLAZE and M68K. However, such errors are still present as reported by kbuild robot. Fix the problem by using the ioread/write32be() accessors, which build fine on all platforms. Reported-by: kernel test robot Suggested-by: Michael Ellerman Signed-off-by: Fabio Estevam Reviewed-by: Michael Ellerman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit db47622c13ae8e164505866d1f251de64d68e66a Author: Marek Szyprowski Date: Tue Nov 24 09:41:28 2020 +0100 media: platform: exynos4-is: remove all references to physical addresses This driver always operates on the DMA/IOVA addresses, so calling them physical addresses is misleading, although when no IOMMU is used they equal each other. Fix this by renaming all such entries to 'addr' and adjusting comments. Signed-off-by: Marek Szyprowski Reviewed-by: Sylwester Nawrocki Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5e67276638765f8dc2327dcf33c0e1f4d5726b7b Author: Niklas Söderlund Date: Sun Nov 22 17:36:37 2020 +0100 media: adv748x: Configure device when resuming from sleep If the device is powered off (for example during system suspend to ram) the devices loses its configuration, especially the slave i2c mappings and other configuration set at probe time. This renders the device unusable and the only way to recover is to unbind and rebind the device to the driver to run the probe setup again. Add an early resume callback that reinitializes the device and setup the slave i2c address mappings and other probe time configuration. Signed-off-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 42bff048f4055f2865b77f4cdd8a0b0e209a9397 Author: Niklas Söderlund Date: Sun Nov 22 17:36:36 2020 +0100 media: adv748x: csi2: Set virtual channel when device is reset It's not enough to set the CSI-2 virtual channel for TXA and TXB during probe: it also needs to be set when the device is reset. Move the virtual channel selection to adv748x_reset() that is called during probe and when the device needs to be reset. Signed-off-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c30ed81afe890eb021cb4737fa82c127817b5e69 Author: Niklas Söderlund Date: Sun Nov 22 17:36:35 2020 +0100 media: adv748x: afe: Select input port when device is reset It's not enough to select the AFE input port during probe: it also needs to be set when the device is reset. Move the port selection to adv748x_reset() that is called during probe and when the device needs to be reset. Signed-off-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4deff542d70aa8ffe83cf6de0e14b4e0cb24b95b Author: Niklas Söderlund Date: Sun Nov 22 17:30:48 2020 +0100 media: adv748x: Only set i2c addresses once during probe During probe the i2c slave addresses are set two times in a row, once in adv748x_initialise_clients() and once directly after in adv748x_reset(). Remove the call to adv748x_set_slave_addresses() in adv748x_initialise_clients() as it's only called during probe while adv748x_reset() is called during probe and normal operation. Signed-off-by: Niklas Söderlund Reviewed-by: Kieran Bingham Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8e4d86e241cf035d6d3467cd346e7ce490681937 Author: Dan Carpenter Date: Tue Nov 17 08:23:40 2020 +0100 media: saa7146: fix array overflow in vidioc_s_audio() The "a->index" value comes from the user via the ioctl. The problem is that the shift can wrap resulting in setting "mxb->cur_audinput" to an invalid value, which later results in an array overflow. Fixes: 6680427791c9 ("[media] mxb: fix audio handling") Signed-off-by: Dan Carpenter Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 28c1e371c2ff445162ca6de9a81463351d9e137d Author: Christian Hewitt Date: Mon Nov 16 05:30:55 2020 +0100 media: meson: vdec: add G12/SM1 to module description The meson vdec driver also supports Amlogic G12/SM1 hardware. Signed-off-by: Christian Hewitt Reviewed-by: Neil Armstrong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0862d95b437b7687622bfc274e410549853825c3 Author: Baskov Evgeniy Date: Fri Nov 13 17:06:25 2020 +0100 media: s5p-jpeg: handle error condition in s5p_jpeg_probe If an error happens in jpeg_get_drv_data(), i.e. match fails, jpeg->variant field is NULL, so we cannot access it. Consider device probe failed if jpeg->variant is NULL. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Baskov Evgeniy Acked-by: Andrzej Pietrasiewicz Acked-by: Jacek Anaszewski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3c39a16d30d8d1bcbd3602a967735b98318c0993 Author: Jernej Skrabec Date: Tue Nov 10 23:35:40 2020 +0100 media: cedrus: Add support for VP8 decoding VP8 in Cedrus shares same engine as H264. Note that it seems necessary to call bitstream parsing functions, to parse frame header, otherwise decoded image is garbage. This is contrary to what is driver supposed to do. However, values are not really used, so this might be acceptable. It's possible that bitstream parsing functions set some internal VPU state, which is later necessary for proper decoding. Biggest suspect is "VP8 probs update" trigger. Signed-off-by: Jernej Skrabec Signed-off-by: Emmanuel Gil Peyrot Reviewed-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b4b3564c5646ee190e637bbf95424719d831e1b2 Author: Emmanuel Gil Peyrot Date: Mon Nov 9 17:22:44 2020 +0100 media: hantro: Use VP8 lengths defined in uapi Use the new defines instead of hardcoding the VP8 lengths. [hverkuil: add commit log] Signed-off-by: Emmanuel Gil Peyrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8d48b611685cd64e8df366d6ccbaad8cf1a4260c Author: Emmanuel Gil Peyrot Date: Mon Nov 9 17:22:43 2020 +0100 media: uapi: Expose VP8 probability lengths as defines These values will be used by various drivers implementing the VP8 stateless API. This had been suggested by Ezequiel Garcia for the Cedrus VP8 driver. Signed-off-by: Emmanuel Gil Peyrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 040d31ccf2bd873b32961eb1cf4a0a78423caca8 Author: Irui Wang Date: Thu Oct 29 02:17:21 2020 +0100 media: mtk-vpu: dump VPU status when IPI times out when IPI time out, dump VPU status to get more debug information Signed-off-by: Irui Wang Reviewed-by: Alexandre Courbot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1f565e263c3e95ccd79fececc51ae7d55ccbddb6 Author: Irui Wang Date: Thu Oct 29 02:17:20 2020 +0100 media: mtk-vpu: VPU should be in idle state before system is suspended VPU should be in idle state before system is suspended or it will work abnormally like VPU program counter not in a correct address or VPU reset Signed-off-by: Irui Wang Reviewed-by: Alexandre Courbot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 41a340941854c4606a9b71b9d68db412747e7c84 Author: Fabio Estevam Date: Wed Dec 2 15:13:26 2020 +0100 media: coda: Convert the driver to DT-only Since 5.10-rc1 i.MX is a devicetree-only platform, so simplify the code by removing the unused non-DT support. Signed-off-by: Fabio Estevam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit eb08c48132a1f594478ab9fa2b6ee646c3513a49 Author: Zhang Xiaoxu Date: Mon Nov 16 15:18:01 2020 +0100 media: tvp5150: Fix wrong return value of tvp5150_parse_dt() If of_graph_get_endpoint_by_regs() return NULL, it will return 0 rather than an errno, because we doesn't initialize the return value. Fixes: 0556f1d580d4 ("media: tvp5150: add input source selection of_graph support") Reported-by: Hulk Robot Signed-off-by: Zhang Xiaoxu Reviewed-by: Marco Felsch Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ca1cfc3fa2d32960bbf55e5c4785151b7034feb0 Author: Xu Wang Date: Fri Nov 13 08:21:11 2020 +0100 media: cx88: use ARRAY_SIZE Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element Signed-off-by: Xu Wang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5cc794be382bba529677352a1f5fd0be08208915 Author: Martin Cerveny Date: Mon Nov 16 13:56:15 2020 +0100 media: cedrus: Add support for V3s V3s video engine runs at lower speed and support video decoder for H.264 and JPEG/MJPEG only. Signed-off-by: Martin Cerveny Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4c7047b7dc90d212fb09bee23275f53750f6a2c1 Author: Martin Cerveny Date: Mon Nov 16 13:56:16 2020 +0100 media: dt-bindings: media: cedrus: Add V3s compatible Allwinner V3s SoC contains video engine. Add compatible for it. Signed-off-by: Martin Cerveny Acked-by: Chen-Yu Tsai Acked-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 503dab0b8a56e21a4397668e525273e3b528c78a Author: Martin Cerveny Date: Mon Nov 16 13:56:12 2020 +0100 media: cedrus: Register all codecs as capability All codecs should have capabilities. For example "Allwinner V3s" does not support "MPEG2". Signed-off-by: Martin Cerveny Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit dbf0b3a7b719eb3f72cb53c2ce7d34a012a9c261 Author: Daniel Lee Kruse Date: Wed Sep 30 05:36:35 2020 +0200 media: cx23885: add more quirks for reset DMA on some AMD IOMMU On AMD Family 15h (Models 30h-3fh), I/O Memory Management Unit RiSC engine sometimes stalls, requiring a reset. As result, MythTV and w-scan won't scan channels on the AMD Kaveri APU with the Hauppauge QuadHD TV tuner card. For the solution I added the Input/Output Memory Management Unit's PCI Identity of 0x1423 to the broken_dev_id[] array, which is used by a quirks logic meant to fix similar problems with other AMD chipsets. Signed-off-by: Daniel Lee Kruse Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a109073bb9ec69ed9ec6eb541485e1dae63c13b4 Author: Rikard Falkeborn Date: Thu Nov 19 23:18:49 2020 +0100 media: rockchip: rkisp1: Constify static structs These 'ops' structs are never modified, so make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Reviewed-by: Dafna Hirschfeld Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6d59224fdcc532dd7292e3657d796b3728ec1e8e Author: Andrzej Pietrasiewicz Date: Wed Dec 2 14:44:26 2020 -0800 Input: document inhibiting Document inhibiting input devices and its relation to being a wakeup source. Signed-off-by: Andrzej Pietrasiewicz Reviewed-by: Hans de Goede Reviewed-by: Randy Dunlap Link: https://lore.kernel.org/r/20200617101822.8558-1-andrzej.p@collabora.com Signed-off-by: Dmitry Torokhov commit a181616487dbdbc953e476d1da15365f887859ed Author: Patrik Fimml Date: Wed Dec 2 14:42:04 2020 -0800 Input: Add "inhibited" property Userspace might want to implement a policy to temporarily disregard input from certain devices, including not treating them as wakeup sources. An example use case is a laptop, whose keyboard can be folded under the screen to create tablet-like experience. The user then must hold the laptop in such a way that it is difficult to avoid pressing the keyboard keys. It is therefore desirable to temporarily disregard input from the keyboard, until it is folded back. This obviously is a policy which should be kept out of the kernel, but the kernel must provide suitable means to implement such a policy. This patch adds a sysfs interface for exactly this purpose. To implement the said interface it adds an "inhibited" property to struct input_dev, and effectively creates four states a device can be in: closed uninhibited, closed inhibited, open uninhibited, open inhibited. It also defers calling driver's ->open() and ->close() to until they are actually needed, e.g. it makes no sense to prepare the underlying device for generating events (->open()) if the device is inhibited. uninhibit closed <------------ closed uninhibited ------------> inhibited | ^ inhibit | ^ 1st | | 1st | | open | | open | | | | | | | | last | | last | | close | | close v | uninhibit v | open <------------ open uninhibited ------------> inhibited The top inhibit/uninhibit transition happens when users == 0. The bottom inhibit/uninhibit transition happens when users > 0. The left open/close transition happens when !inhibited. The right open/close transition happens when inhibited. Due to all transitions being serialized with dev->mutex, it is impossible to have "diagonal" transitions between closed uninhibited and open inhibited or between open uninhibited and closed inhibited. No new callbacks are added to drivers, because their open() and close() serve exactly the purpose to tell the driver to start/stop providing events to the input core. Consequently, open() and close() - if provided - are called in both inhibit and uninhibit paths. Signed-off-by: Patrik Fimml Co-developed-by: Andrzej Pietrasiewicz Signed-off-by: Andrzej Pietrasiewicz Link: https://lore.kernel.org/r/20200608112211.12125-8-andrzej.p@collabora.com Signed-off-by: Dmitry Torokhov commit d69f0a43c677e8afc67a222e1e7b51b9acc69cd3 Author: Andrzej Pietrasiewicz Date: Sun Oct 4 21:16:07 2020 -0700 Input: use input_device_enabled() Use the newly added helper in relevant input drivers. Signed-off-by: Andrzej Pietrasiewicz Link: https://lore.kernel.org/r/20200608112211.12125-3-andrzej.p@collabora.com Signed-off-by: Dmitry Torokhov commit 39be39ceffd572baddfeff8b50aba931d3d6d785 Author: Andrzej Pietrasiewicz Date: Sun Oct 4 21:15:46 2020 -0700 Input: add input_device_enabled() A helper function for drivers to decide if the device is used or not. A lockdep check is introduced as inspecting ->users should be done under input device's mutex. Signed-off-by: Andrzej Pietrasiewicz Link: https://lore.kernel.org/r/20200608112211.12125-2-andrzej.p@collabora.com Signed-off-by: Dmitry Torokhov commit c1b46cd4df97534c6b942bb30526a2c47f0cb3c8 Author: Dmitry Torokhov Date: Sun Nov 22 17:52:32 2020 -0800 Input: omap4-keypad - set up interrupt as wakeup source Marking main interrupt as wakeup interrupt in probe allows us to drop custom suspend/resume methods whose only purpose was to configure interrupt for waking up the system. Signed-off-by: Dmitry Torokhov commit db48965264110dd74d1436fc21dac328d04385d2 Author: Yangtao Li Date: Tue Dec 1 15:17:39 2020 +0800 f2fs: Remove unnecessary unlikely() WARN_ON() already contains an unlikely(), so it's not necessary to use unlikely. Signed-off-by: Yangtao Li Signed-off-by: Shuosheng Huang Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 5335bfc6eb688344bfcd4b4133c002c0ae0d0719 Author: Jack Qiu Date: Tue Dec 1 15:45:47 2020 +0800 f2fs: init dirty_secmap incorrectly section is dirty, but dirty_secmap may not set Reported-by: Jia Yang Fixes: da52f8ade40b ("f2fs: get the right gc victim section when section has several segments") Cc: Signed-off-by: Jack Qiu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit b876f4c94c3d1688edea021d45a528571499e0b9 Author: Jaegeuk Kim Date: Tue Nov 24 15:19:10 2020 -0800 f2fs: remove buffer_head which has 32bits limit This patch removes buffer_head dependency when getting block addresses. Light reported there's a 32bit issue in f2fs_fiemap where map_bh.b_size is 32bits while len is 64bits given by user. This will give wrong length to f2fs_map_block. Reported-by: Light Hsieh Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 963ba7f983767d79e914cd616c3e57be1938677e Author: Jaegeuk Kim Date: Tue Nov 24 15:09:07 2020 -0800 f2fs: fix wrong block count instead of bytes We should convert cur_lblock, a block count, to bytes for len. Fixes: af4b6b8edf6a ("f2fs: introduce check_swap_activate_fast()") Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 43b9d4b4d91c02ca1159507d46e3687d98b4cb8f Author: Jaegeuk Kim Date: Tue Nov 24 15:04:27 2020 -0800 f2fs: use new conversion functions between blks and bytes This patch cleans up blks and bytes conversions. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 6cbfcab5ff51491e67c75fd8d672cff97127fd55 Author: Jaegeuk Kim Date: Tue Nov 24 14:55:47 2020 -0800 f2fs: rename logical_to_blk and blk_to_logical This patch renames two functions like below having u64. - logical_to_blk to bytes_to_blks - blk_to_logical to blks_to_bytes Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 3a0a9cbc44bbb8a23a3fc12edfd1834452360a50 Author: Chao Yu Date: Fri Nov 27 21:20:06 2020 +0800 f2fs: fix kbytes written stat for multi-device case For multi-device case, one f2fs image includes multi devices, so it needs to account bytes written of all block devices belong to the image rather than one main block device, fix it. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit b28f047b28c51d0b9864c34b097bb0b221ea7247 Author: Chao Yu Date: Thu Nov 26 18:32:09 2020 +0800 f2fs: compress: support chksum This patch supports to store chksum value with compressed data, and verify the integrality of compressed data while reading the data. The feature can be enabled through specifying mount option 'compress_chksum'. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 493720a4854343b7c3fe100cda6a3a2c3f8d4b5d Author: Chao Yu Date: Wed Nov 25 10:57:36 2020 +0800 f2fs: fix to avoid REQ_TIME and CP_TIME collision Lei Li reported a issue: if foreground operations are frequent, background checkpoint may be always skipped due to below check, result in losing more data after sudden power-cut. f2fs_balance_fs_bg() ... if (!is_idle(sbi, REQ_TIME) && (!excess_dirty_nats(sbi) && !excess_dirty_nodes(sbi))) return; E.g: cp_interval = 5 second idle_interval = 2 second foreground operation interval = 1 second (append 1 byte per second into file) In such case, no matter when it calls f2fs_balance_fs_bg(), is_idle(, REQ_TIME) returns false, result in skipping background checkpoint. This patch changes as below to make trigger condition being more reasonable: - trigger sync_fs() if dirty_{nats,nodes} and prefree segs exceeds threshold; - skip triggering sync_fs() if there is any background inflight IO or there is foreground operation recently and meanwhile cp_rwsem is being held by someone; Reported-by: Lei Li Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 8769918bf06c9cfb01a1a6ee0e547c9916881496 Author: Sahitya Tummala Date: Mon Nov 23 10:58:32 2020 +0530 f2fs: change to use rwsem for cp_mutex Use rwsem to ensure serialization of the callers and to avoid starvation of high priority tasks, when the system is under heavy IO workload. Signed-off-by: Sahitya Tummala Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 7ad08a58bf67594057362e45cbddd3e27e53e557 Author: Daniel Rosenberg Date: Thu Nov 19 06:09:04 2020 +0000 f2fs: Handle casefolding with Encryption Expand f2fs's casefolding support to include encrypted directories. To index casefolded+encrypted directories, we use the SipHash of the casefolded name, keyed by a key derived from the directory's fscrypt master key. This ensures that the dirhash doesn't leak information about the plaintext filenames. Encryption keys are unavailable during roll-forward recovery, so we can't compute the dirhash when recovering a new dentry in an encrypted + casefolded directory. To avoid having to force a checkpoint when a new file is fsync'ed, store the dirhash on-disk appended to i_name. This patch incorporates work by Eric Biggers and Jaegeuk Kim . Co-developed-by: Eric Biggers Signed-off-by: Eric Biggers Signed-off-by: Daniel Rosenberg Reviewed-by: Eric Biggers Signed-off-by: Jaegeuk Kim commit bb9cd9106b22b4fc5ff8d78a752be8a4ba2cbba5 Author: Daniel Rosenberg Date: Thu Nov 19 06:09:03 2020 +0000 fscrypt: Have filesystems handle their d_ops This shifts the responsibility of setting up dentry operations from fscrypt to the individual filesystems, allowing them to have their own operations while still setting fscrypt's d_revalidate as appropriate. Most filesystems can just use generic_set_encrypted_ci_d_ops, unless they have their own specific dentry operations as well. That operation will set the minimal d_ops required under the circumstances. Since the fscrypt d_ops are set later on, we must set all d_ops there, since we cannot adjust those later on. This should not result in any change in behavior. Signed-off-by: Daniel Rosenberg Acked-by: Theodore Ts'o Acked-by: Eric Biggers Signed-off-by: Jaegeuk Kim commit 608af703519a58f5a7da4273809211cac27edfb2 Author: Daniel Rosenberg Date: Thu Nov 19 06:09:02 2020 +0000 libfs: Add generic function for setting dentry_ops This adds a function to set dentry operations at lookup time that will work for both encrypted filenames and casefolded filenames. A filesystem that supports both features simultaneously can use this function during lookup preparations to set up its dentry operations once fscrypt no longer does that itself. Currently the casefolding dentry operation are always set if the filesystem defines an encoding because the features is toggleable on empty directories. Unlike in the encryption case, the dentry operations used come from the parent. Since we don't know what set of functions we'll eventually need, and cannot change them later, we enable the casefolding operations if the filesystem supports them at all. By splitting out the various cases, we support as few dentry operations as we can get away with, maximizing compatibility with overlayfs, which will not function if a filesystem supports certain dentry_operations. Signed-off-by: Daniel Rosenberg Reviewed-by: Theodore Ts'o Reviewed-by: Eric Biggers Reviewed-by: Gabriel Krisman Bertazi Signed-off-by: Jaegeuk Kim commit beb78181f13430ed7a1e621d9faa50e076d7906f Author: Zhang Qilong Date: Fri Nov 20 21:33:34 2020 +0800 f2fs: Remove the redundancy initialization There are two assignments are meaningless, and remove them. Signed-off-by: Zhang Qilong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 9f7e334aec1671b89df12b98002705cb254de5d9 Author: Liu Song Date: Wed Nov 18 22:01:04 2020 +0800 f2fs: remove writeback_inodes_sb in f2fs_remount Since sync_inodes_sb has been used, there is no need to use writeback_inodes_sb, so remove it. Signed-off-by: Liu Song Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 89ff6005039a878afac87889fee748fa3f957c3a Author: Hyeongseok Kim Date: Thu Nov 12 18:14:54 2020 +0900 f2fs: fix double free of unicode map In case of retrying fill_super with skip_recovery, s_encoding for casefold would not be loaded again even though it's already been freed because it's not NULL. Set NULL after free to prevent double freeing when unmount. Fixes: eca4873ee1b6 ("f2fs: Use generic casefolding support") Signed-off-by: Hyeongseok Kim Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 34178b1bc4b5c936eab3adb4835578093095a571 Author: Chao Yu Date: Tue Nov 10 09:24:37 2020 +0800 f2fs: fix compat F2FS_IOC_{MOVE,GARBAGE_COLLECT}_RANGE Eric reported a ioctl bug in below link: https://lore.kernel.org/linux-f2fs-devel/20201103032234.GB2875@sol.localdomain/ That said, on some 32-bit architectures, u64 has only 32-bit alignment, notably i386 and x86_32, so that size of struct f2fs_gc_range compiled in x86_32 is 20 bytes, however the size in x86_64 is 24 bytes, binary compiled in x86_32 can not call F2FS_IOC_GARBAGE_COLLECT_RANGE successfully due to mismatched value of ioctl command in between binary and f2fs module, similarly, F2FS_IOC_MOVE_RANGE will fail too. In this patch we introduce two ioctls for compatibility of above special 32-bit binary: - F2FS_IOC32_GARBAGE_COLLECT_RANGE - F2FS_IOC32_MOVE_RANGE Reported-by: Eric Biggers Signed-off-by: Chao Yu Reviewed-by: Eric Biggers Signed-off-by: Jaegeuk Kim commit 3a1b9eaf727b4ab84ebf059e09c38fc6a53e5614 Author: Chao Yu Date: Tue Nov 10 09:24:36 2020 +0800 f2fs: avoid unneeded data copy in f2fs_ioc_move_range() Fields in struct f2fs_move_range won't change in f2fs_ioc_move_range(), let's avoid copying this structure's data to userspace. Signed-off-by: Chao Yu Reviewed-by: Eric Biggers Signed-off-by: Jaegeuk Kim commit e1e8debec6564d0c355aab84c93de8e357f397bd Author: Daeho Jeong Date: Fri Oct 30 13:10:35 2020 +0900 f2fs: add F2FS_IOC_SET_COMPRESS_OPTION ioctl Added a new F2FS_IOC_SET_COMPRESS_OPTION ioctl to change file compression option of a file. struct f2fs_comp_option { u8 algorithm; => compression algorithm => 0:lzo, 1:lz4, 2:zstd, 3:lzorle u8 log_cluster_size; => log scale cluster size => 2 ~ 8 }; struct f2fs_comp_option option; option.algorithm = 1; option.log_cluster_size = 7; ioctl(fd, F2FS_IOC_SET_COMPRESS_OPTION, &option); Signed-off-by: Daeho Jeong [Chao Yu: remove f2fs_is_compress_algorithm_valid()] Signed-off-by: Jaegeuk Kim commit 6b3211842a115d697fbf78d09f3e83852200e413 Author: Yejune Deng Date: Mon Nov 30 16:35:45 2020 +0800 audit: replace atomic_add_return() atomic_inc_return() is a little neater Signed-off-by: Yejune Deng Signed-off-by: Paul Moore commit 5eb3c85e343ae62ed47fa3c9816d79f95809fe27 Merge: e6c7c9d01f5b1 4612bad5701e1 Author: Dave Airlie Date: Thu Dec 3 13:25:09 2020 +1000 Merge branch 'etnaviv/next' of https://git.pengutronix.de/git/lst/linux into drm-next Again, nothing big this time. Mostly a new performance counter from Christian, some more lockdep annotations from Guido and removal of functionality that duplicates driver core from Robin. Signed-off-by: Dave Airlie From: Lucas Stach Link: https://patchwork.freedesktop.org/patch/msgid/81367a99b8949584e5becd334ac001b9ad3dc37a.camel@pengutronix.de commit e6c7c9d01f5b1ca3141dca43159a909a596a60a2 Merge: 207665fd37561 a4423bec44744 Author: Dave Airlie Date: Thu Dec 3 13:13:32 2020 +1000 Merge tag 'mediatek-drm-next-5.11-2' of https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux into drm-next Mediatek DRM Next for Linux 5.11-2 1. Add MT8167 support 2. Cleanup function 3. Convert the dpi bindings to yaml 4. Drop local dma_parms 5. Fix formatting and provide missing member description 6. Introduce GEM object functions 7. Fix aliases name 8. Move MIPI DSI phy driver to phy folder Signed-off-by: Dave Airlie From: Chun-Kuang Hu Link: https://patchwork.freedesktop.org/patch/msgid/20201130234807.936-1-chunkuang.hu@kernel.org commit 207665fd37561f97591e74d0ee80f24bdf06b789 Merge: 46fe37b98ed8f e11e6df2a8677 Author: Dave Airlie Date: Thu Dec 3 13:04:51 2020 +1000 Merge tag 'exynos-drm-next-for-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next Add a new mode support for HDMI - support for 1920x1200x60Hz mode. Cleanups - Drop in_bridge_node from exynos_dsi - Use a exynos_dsi object instead of a encoder object as drvdata. Signed-off-by: Dave Airlie From: Inki Dae Link: https://patchwork.freedesktop.org/patch/msgid/1606798227-31967-1-git-send-email-inki.dae@samsung.com commit 46fe37b98ed8f67e3d68177eefe076fdaff643a2 Merge: 22f8c80566c4a b3bf99daaee96 Author: Dave Airlie Date: Thu Dec 3 13:01:44 2020 +1000 Merge tag 'drm-intel-next-queued-2020-11-27' of git://anongit.freedesktop.org/drm/drm-intel into drm-next drm/i915 features for v5.11: Highlights: - Enable big joiner to join two pipes to one port to overcome pipe restrictions (Manasi, Ville, Maarten) Display: - More DG1 enabling (Lucas, Aditya) - Fixes to cases without display (Lucas, José, Jani) - Initial PSR state improvements (José) - JSL eDP vswing updates (Tejas) - Handle EDID declared max 16 bpc (Ville) - Display refactoring (Ville) Other: - GVT features - Backmerge Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87czzzkk1s.fsf@intel.com commit 97306be45fbe7a02461c3c2a57e666cf662b1aaf Merge: 9e83f54f532bf 5b0764b2d3451 Author: Alexei Starovoitov Date: Wed Dec 2 18:28:09 2020 -0800 Merge branch 'switch to memcg-based memory accounting' Roman Gushchin says: ==================== Currently bpf is using the memlock rlimit for the memory accounting. This approach has its downsides and over time has created a significant amount of problems: 1) The limit is per-user, but because most bpf operations are performed as root, the limit has a little value. 2) It's hard to come up with a specific maximum value. Especially because the counter is shared with non-bpf use cases (e.g. memlock()). Any specific value is either too low and creates false failures or is too high and useless. 3) Charging is not connected to the actual memory allocation. Bpf code should manually calculate the estimated cost and charge the counter, and then take care of uncharging, including all fail paths. It adds to the code complexity and makes it easy to leak a charge. 4) There is no simple way of getting the current value of the counter. We've used drgn for it, but it's far from being convenient. 5) Cryptic -EPERM is returned on exceeding the limit. Libbpf even had a function to "explain" this case for users. 6) rlimits are generally considered as (at least partially) obsolete. They do not provide a comprehensive system for the control of physical resources: memory, cpu, io etc. All resource control developments in the recent years were related to cgroups. In order to overcome these problems let's switch to the memory cgroup-based memory accounting of bpf objects. With the recent addition of the percpu memory accounting, now it's possible to provide a comprehensive accounting of the memory used by bpf programs and maps. This approach has the following advantages: 1) The limit is per-cgroup and hierarchical. It's way more flexible and allows a better control over memory usage by different workloads. 2) The actual memory consumption is taken into account. It happens automatically on the allocation time if __GFP_ACCOUNT flags is passed. Uncharging is also performed automatically on releasing the memory. So the code on the bpf side becomes simpler and safer. 3) There is a simple way to get the current value and statistics. Cgroup-based accounting adds new requirements: 1) The kernel config should have CONFIG_CGROUPS and CONFIG_MEMCG_KMEM enabled. These options are usually enabled, maybe excluding tiny builds for embedded devices. 2) The system should have a configured cgroup hierarchy, including reasonable memory limits and/or guarantees. Modern systems usually delegate this task to systemd or similar task managers. Without meeting these requirements there are no limits on how much memory bpf can use and a non-root user is able to hurt the system by allocating too much. But because per-user rlimits do not provide a functional system to protect and manage physical resources anyway, anyone who seriously depends on it, should use cgroups. When a bpf map is created, the memory cgroup of the process which creates the map is recorded. Subsequently all memory allocation related to the bpf map are charged to the same cgroup. It includes allocations made from interrupts and by any processes. Bpf program memory is charged to the memory cgroup of a process which loads the program. The patchset consists of the following parts: 1) 4 mm patches are required on the mm side, otherwise vmallocs cannot be mapped to userspace 2) memcg-based accounting for various bpf objects: progs and maps 3) removal of the rlimit-based accounting 4) removal of rlimit adjustments in userspace samples v9: - always charge the saved memory cgroup, by Daniel, Toke and Alexei - added bpf_map_kzalloc() - rebase and minor fixes v8: - extended the cover letter to be more clear on new requirements, by Daniel - an approximate value is provided by map memlock info, by Alexei v7: - introduced bpf_map_kmalloc_node() and bpf_map_alloc_percpu(), by Alexei - switched allocations made from an interrupt context to new helpers, by Daniel - rebase and minor fixes v6: - rebased to the latest version of the remote charging API - fixed signatures, added acks v5: - rebased to the latest version of the remote charging API - implemented kmem accounting from an interrupt context, by Shakeel - rebased to latest changes in mm allowed to map vmallocs to userspace - fixed a build issue in kselftests, by Alexei - fixed a use-after-free bug in bpf_map_free_deferred() - added bpf line info coverage, by Shakeel - split bpf map charging preparations into a separate patch v4: - covered allocations made from an interrupt context, by Daniel - added some clarifications to the cover letter v3: - droped the userspace part for further discussions/refinements, by Andrii and Song v2: - fixed build issue, caused by the remaining rlimit-based accounting for sockhash maps ==================== Signed-off-by: Alexei Starovoitov commit 5b0764b2d34510bc87d33a580da98f77789ac36f Author: Roman Gushchin Date: Tue Dec 1 13:59:00 2020 -0800 bpf: samples: Do not touch RLIMIT_MEMLOCK Since bpf is not using rlimit memlock for the memory accounting and control, do not change the limit in sample applications. Signed-off-by: Roman Gushchin Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20201201215900.3569844-35-guro@fb.com commit 3ac1f01b43b6e2759cc34d3a715ba5eed04c5805 Author: Roman Gushchin Date: Tue Dec 1 13:58:59 2020 -0800 bpf: Eliminate rlimit-based memory accounting for bpf progs Do not use rlimit-based memory accounting for bpf progs. It has been replaced with memcg-based memory accounting. Signed-off-by: Roman Gushchin Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20201201215900.3569844-34-guro@fb.com commit 80ee81e0403c48f4eb342f7c8d40477c89b8836a Author: Roman Gushchin Date: Tue Dec 1 13:58:58 2020 -0800 bpf: Eliminate rlimit-based memory accounting infra for bpf maps Remove rlimit-based accounting infrastructure code, which is not used anymore. To provide a backward compatibility, use an approximation of the bpf map memory footprint as a "memlock" value, available to a user via map info. The approximation is based on the maximal number of elements and key and value sizes. Signed-off-by: Roman Gushchin Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20201201215900.3569844-33-guro@fb.com commit ab31be378a63a8bc1868c9890d28b0206f81396e Author: Roman Gushchin Date: Tue Dec 1 13:58:57 2020 -0800 bpf: Eliminate rlimit-based memory accounting for bpf local storage maps Do not use rlimit-based memory accounting for bpf local storage maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20201201215900.3569844-32-guro@fb.com commit 819a4f323579b56cd942f14718edd1f308adbbe2 Author: Roman Gushchin Date: Tue Dec 1 13:58:56 2020 -0800 bpf: Eliminate rlimit-based memory accounting for xskmap maps Do not use rlimit-based memory accounting for xskmap maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20201201215900.3569844-31-guro@fb.com commit 370868107bf6624cc104038bf38be2ca153eeb2e Author: Roman Gushchin Date: Tue Dec 1 13:58:55 2020 -0800 bpf: Eliminate rlimit-based memory accounting for stackmap maps Do not use rlimit-based memory accounting for stackmap maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20201201215900.3569844-30-guro@fb.com commit 0d2c4f9640501ff57ba0be1f5644a02c29a02fa1 Author: Roman Gushchin Date: Tue Dec 1 13:58:54 2020 -0800 bpf: Eliminate rlimit-based memory accounting for sockmap and sockhash maps Do not use rlimit-based memory accounting for sockmap and sockhash maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20201201215900.3569844-29-guro@fb.com commit abbdd0813f347f9d1eea376409a68295318b2ef5 Author: Roman Gushchin Date: Tue Dec 1 13:58:53 2020 -0800 bpf: Eliminate rlimit-based memory accounting for bpf ringbuffer Do not use rlimit-based memory accounting for bpf ringbuffer. It has been replaced with the memcg-based memory accounting. bpf_ringbuf_alloc() can't return anything except ERR_PTR(-ENOMEM) and a valid pointer, so to simplify the code make it return NULL in the first case. This allows to drop a couple of lines in ringbuf_map_alloc() and also makes it look similar to other memory allocating function like kmalloc(). Signed-off-by: Roman Gushchin Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201201215900.3569844-28-guro@fb.com commit db54330d3e137c23bea26784cecf5ae17e72e4c6 Author: Roman Gushchin Date: Tue Dec 1 13:58:52 2020 -0800 bpf: Eliminate rlimit-based memory accounting for reuseport_array maps Do not use rlimit-based memory accounting for reuseport_array maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20201201215900.3569844-27-guro@fb.com commit a37fb7ef24a475012547fa28f0148d2e538ad5d4 Author: Roman Gushchin Date: Tue Dec 1 13:58:51 2020 -0800 bpf: Eliminate rlimit-based memory accounting for queue_stack_maps maps Do not use rlimit-based memory accounting for queue_stack maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20201201215900.3569844-26-guro@fb.com commit cbddcb574d419fd5b70c5f87ba733feec6147aeb Author: Roman Gushchin Date: Tue Dec 1 13:58:50 2020 -0800 bpf: Eliminate rlimit-based memory accounting for lpm_trie maps Do not use rlimit-based memory accounting for lpm_trie maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20201201215900.3569844-25-guro@fb.com commit 755e5d55367af5ff75a4db9b6cf439416878e2c7 Author: Roman Gushchin Date: Tue Dec 1 13:58:49 2020 -0800 bpf: Eliminate rlimit-based memory accounting for hashtab maps Do not use rlimit-based memory accounting for hashtab maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20201201215900.3569844-24-guro@fb.com commit 844f157f6c0a905d039d2e20212ab3231f2e5eaf Author: Roman Gushchin Date: Tue Dec 1 13:58:48 2020 -0800 bpf: Eliminate rlimit-based memory accounting for devmap maps Do not use rlimit-based memory accounting for devmap maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20201201215900.3569844-23-guro@fb.com commit 087b0d39fe22dcc2ddcef7ed699c658f0e725bac Author: Roman Gushchin Date: Tue Dec 1 13:58:47 2020 -0800 bpf: Eliminate rlimit-based memory accounting for cgroup storage maps Do not use rlimit-based memory accounting for cgroup storage maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20201201215900.3569844-22-guro@fb.com commit 711cabaf1432fbec4a5f9ffcfbfe2ed7a78cd096 Author: Roman Gushchin Date: Tue Dec 1 13:58:46 2020 -0800 bpf: Eliminate rlimit-based memory accounting for cpumap maps Do not use rlimit-based memory accounting for cpumap maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20201201215900.3569844-21-guro@fb.com commit f043733f31e5e12c6254045a03e519290543fa1b Author: Roman Gushchin Date: Tue Dec 1 13:58:45 2020 -0800 bpf: Eliminate rlimit-based memory accounting for bpf_struct_ops maps Do not use rlimit-based memory accounting for bpf_struct_ops maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20201201215900.3569844-20-guro@fb.com commit 1bc5975613ed155fc57ee321041d3463e580b4a3 Author: Roman Gushchin Date: Tue Dec 1 13:58:44 2020 -0800 bpf: Eliminate rlimit-based memory accounting for arraymap maps Do not use rlimit-based memory accounting for arraymap maps. It has been replaced with the memcg-based memory accounting. Signed-off-by: Roman Gushchin Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20201201215900.3569844-19-guro@fb.com commit 28e1dcdef0cbf5ff79aceb149c7ab14589598af0 Author: Roman Gushchin Date: Tue Dec 1 13:58:43 2020 -0800 bpf: Refine memcg-based memory accounting for xskmap maps Extend xskmap memory accounting to include the memory taken by the xsk_map_node structure. Signed-off-by: Roman Gushchin Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201201215900.3569844-18-guro@fb.com commit 7846dd9f835e248901a9f77a43745f8f1de04741 Author: Roman Gushchin Date: Tue Dec 1 13:58:42 2020 -0800 bpf: Refine memcg-based memory accounting for sockmap and sockhash maps Include internal metadata into the memcg-based memory accounting. Also include the memory allocated on updating an element. Signed-off-by: Roman Gushchin Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201201215900.3569844-17-guro@fb.com commit e9aae8beba825e4670463ddcf420b954f18d5ced Author: Roman Gushchin Date: Tue Dec 1 13:58:41 2020 -0800 bpf: Memcg-based memory accounting for bpf local storage maps Account memory used by bpf local storage maps: per-socket, per-inode and per-task storages. Signed-off-by: Roman Gushchin Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201201215900.3569844-16-guro@fb.com commit be4035c734d12918866c5eb2c496d420aa80adeb Author: Roman Gushchin Date: Tue Dec 1 13:58:40 2020 -0800 bpf: Memcg-based memory accounting for bpf ringbuffer Enable the memcg-based memory accounting for the memory used by the bpf ringbuffer. Signed-off-by: Roman Gushchin Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201201215900.3569844-15-guro@fb.com commit 353e7af4bf5e7247c35e9ba5beab42904f1b3499 Author: Roman Gushchin Date: Tue Dec 1 13:58:39 2020 -0800 bpf: Memcg-based memory accounting for lpm_trie maps Include lpm trie and lpm trie node objects into the memcg-based memory accounting. Signed-off-by: Roman Gushchin Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201201215900.3569844-14-guro@fb.com commit 881456811a33b9d3952897f4d01ee4d74fa2f30e Author: Roman Gushchin Date: Tue Dec 1 13:58:38 2020 -0800 bpf: Refine memcg-based memory accounting for hashtab maps Include percpu objects and the size of map metadata into the accounting. Signed-off-by: Roman Gushchin Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201201215900.3569844-13-guro@fb.com commit 1440290adf7bb27602bbb7d8b2dc3d903ed3c6c9 Author: Roman Gushchin Date: Tue Dec 1 13:58:37 2020 -0800 bpf: Refine memcg-based memory accounting for devmap maps Include map metadata and the node size (struct bpf_dtab_netdev) into the accounting. Signed-off-by: Roman Gushchin Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201201215900.3569844-12-guro@fb.com commit 3a61c7c58b3012ac28c166801842615ca99b49c5 Author: Roman Gushchin Date: Tue Dec 1 13:58:36 2020 -0800 bpf: Memcg-based memory accounting for cgroup storage maps Account memory used by cgroup storage maps including metadata structures. Account the percpu memory for the percpu flavor of cgroup storage. Signed-off-by: Roman Gushchin Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201201215900.3569844-11-guro@fb.com commit e88cc05b61f3fe8bd4bd8ce1a0a2d03357225305 Author: Roman Gushchin Date: Tue Dec 1 13:58:35 2020 -0800 bpf: Refine memcg-based memory accounting for cpumap maps Include metadata and percpu data into the memcg-based memory accounting. Signed-off-by: Roman Gushchin Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201201215900.3569844-10-guro@fb.com commit 6d192c7938b7e53a6bb55b90b86bd02ea0153731 Author: Roman Gushchin Date: Tue Dec 1 13:58:34 2020 -0800 bpf: Refine memcg-based memory accounting for arraymap maps Include percpu arrays and auxiliary data into the memcg-based memory accounting. Signed-off-by: Roman Gushchin Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201201215900.3569844-9-guro@fb.com commit d5299b67dd59445902cd30cbc60a03c869cf1adb Author: Roman Gushchin Date: Tue Dec 1 13:58:33 2020 -0800 bpf: Memcg-based memory accounting for bpf maps This patch enables memcg-based memory accounting for memory allocated by __bpf_map_area_alloc(), which is used by many types of bpf maps for large initial memory allocations. Please note, that __bpf_map_area_alloc() should not be used outside of map creation paths without setting the active memory cgroup to the map's memory cgroup. Following patches in the series will refine the accounting for some of the map types. Signed-off-by: Roman Gushchin Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201201215900.3569844-8-guro@fb.com commit 48edc1f78aabeba35ed00e40c36f211de89e0090 Author: Roman Gushchin Date: Tue Dec 1 13:58:32 2020 -0800 bpf: Prepare for memcg-based memory accounting for bpf maps Bpf maps can be updated from an interrupt context and in such case there is no process which can be charged. It makes the memory accounting of bpf maps non-trivial. Fortunately, after commit 4127c6504f25 ("mm: kmem: enable kernel memcg accounting from interrupt contexts") and commit b87d8cefe43c ("mm, memcg: rework remote charging API to support nesting") it's finally possible. To make the ownership model simple and consistent, when the map is created, the memory cgroup of the current process is recorded. All subsequent allocations related to the bpf map are charged to the same memory cgroup. It includes allocations made by any processes (even if they do belong to a different cgroup) and from interrupts. This commit introduces 3 new helpers, which will be used by following commits to enable the accounting of bpf maps memory: - bpf_map_kmalloc_node() - bpf_map_kzalloc() - bpf_map_alloc_percpu() They are wrapping popular memory allocation functions. They set the active memory cgroup to the map's memory cgroup and add __GFP_ACCOUNT to the passed gfp flags. Then they call into the corresponding memory allocation function and restore the original active memory cgroup. These helpers are supposed to use everywhere except the map creation path. During the map creation when the map structure is allocated by itself, it cannot be passed to those helpers. In those cases default memory allocation function will be used with the __GFP_ACCOUNT flag. Signed-off-by: Roman Gushchin Acked-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201201215900.3569844-7-guro@fb.com commit ddf8503c7c434374a1112e89bcedfe1ccb3057df Author: Roman Gushchin Date: Tue Dec 1 13:58:31 2020 -0800 bpf: Memcg-based memory accounting for bpf progs Include memory used by bpf programs into the memcg-based accounting. This includes the memory used by programs itself, auxiliary data, statistics and bpf line info. A memory cgroup containing the process which loads the program is getting charged. Signed-off-by: Roman Gushchin Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20201201215900.3569844-6-guro@fb.com commit 18b2db3b0385226b71cb3288474fa5a6e4a45474 Author: Roman Gushchin Date: Tue Dec 1 13:58:30 2020 -0800 mm: Convert page kmemcg type to a page memcg flag PageKmemcg flag is currently defined as a page type (like buddy, offline, table and guard). Semantically it means that the page was accounted as a kernel memory by the page allocator and has to be uncharged on the release. As a side effect of defining the flag as a page type, the accounted page can't be mapped to userspace (look at page_has_type() and comments above). In particular, this blocks the accounting of vmalloc-backed memory used by some bpf maps, because these maps do map the memory to userspace. One option is to fix it by complicating the access to page->mapcount, which provides some free bits for page->page_type. But it's way better to move this flag into page->memcg_data flags. Indeed, the flag makes no sense without enabled memory cgroups and memory cgroup pointer set in particular. This commit replaces PageKmemcg() and __SetPageKmemcg() with PageMemcgKmem() and an open-coded OR operation setting the memcg pointer with the MEMCG_DATA_KMEM bit. __ClearPageKmemcg() can be simple deleted, as the whole memcg_data is zeroed at once. As a bonus, on !CONFIG_MEMCG build the PageMemcgKmem() check will be compiled out. Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Signed-off-by: Alexei Starovoitov Reviewed-by: Shakeel Butt Acked-by: Johannes Weiner Acked-by: Michal Hocko Link: https://lkml.kernel.org/r/20201027001657.3398190-5-guro@fb.com Link: https://lore.kernel.org/bpf/20201201215900.3569844-5-guro@fb.com commit 87944e2992bd28098c6806086a1e96bb4d0e502b Author: Roman Gushchin Date: Tue Dec 1 13:58:29 2020 -0800 mm: Introduce page memcg flags The lowest bit in page->memcg_data is used to distinguish between struct memory_cgroup pointer and a pointer to a objcgs array. All checks and modifications of this bit are open-coded. Let's formalize it using page memcg flags, defined in enum page_memcg_data_flags. Additional flags might be added later. Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Signed-off-by: Alexei Starovoitov Reviewed-by: Shakeel Butt Acked-by: Johannes Weiner Acked-by: Michal Hocko Link: https://lkml.kernel.org/r/20201027001657.3398190-4-guro@fb.com Link: https://lore.kernel.org/bpf/20201201215900.3569844-4-guro@fb.com commit 270c6a71460e12b07b1dcadf7457ff95b6c6e8f4 Author: Roman Gushchin Date: Tue Dec 1 13:58:28 2020 -0800 mm: memcontrol/slab: Use helpers to access slab page's memcg_data To gather all direct accesses to struct page's memcg_data field in one place, let's introduce 3 new helpers to use in the slab accounting code: struct obj_cgroup **page_objcgs(struct page *page); struct obj_cgroup **page_objcgs_check(struct page *page); bool set_page_objcgs(struct page *page, struct obj_cgroup **objcgs); They are similar to the corresponding API for generic pages, except that the setter can return false, indicating that the value has been already set from a different thread. Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Signed-off-by: Alexei Starovoitov Reviewed-by: Shakeel Butt Acked-by: Johannes Weiner Link: https://lkml.kernel.org/r/20201027001657.3398190-3-guro@fb.com Link: https://lore.kernel.org/bpf/20201201215900.3569844-3-guro@fb.com commit bcfe06bf2622f7c4899468e427683aec49070687 Author: Roman Gushchin Date: Tue Dec 1 13:58:27 2020 -0800 mm: memcontrol: Use helpers to read page's memcg data Patch series "mm: allow mapping accounted kernel pages to userspace", v6. Currently a non-slab kernel page which has been charged to a memory cgroup can't be mapped to userspace. The underlying reason is simple: PageKmemcg flag is defined as a page type (like buddy, offline, etc), so it takes a bit from a page->mapped counter. Pages with a type set can't be mapped to userspace. But in general the kmemcg flag has nothing to do with mapping to userspace. It only means that the page has been accounted by the page allocator, so it has to be properly uncharged on release. Some bpf maps are mapping the vmalloc-based memory to userspace, and their memory can't be accounted because of this implementation detail. This patchset removes this limitation by moving the PageKmemcg flag into one of the free bits of the page->mem_cgroup pointer. Also it formalizes accesses to the page->mem_cgroup and page->obj_cgroups using new helpers, adds several checks and removes a couple of obsolete functions. As the result the code became more robust with fewer open-coded bit tricks. This patch (of 4): Currently there are many open-coded reads of the page->mem_cgroup pointer, as well as a couple of read helpers, which are barely used. It creates an obstacle on a way to reuse some bits of the pointer for storing additional bits of information. In fact, we already do this for slab pages, where the last bit indicates that a pointer has an attached vector of objcg pointers instead of a regular memcg pointer. This commits uses 2 existing helpers and introduces a new helper to converts all read sides to calls of these helpers: struct mem_cgroup *page_memcg(struct page *page); struct mem_cgroup *page_memcg_rcu(struct page *page); struct mem_cgroup *page_memcg_check(struct page *page); page_memcg_check() is intended to be used in cases when the page can be a slab page and have a memcg pointer pointing at objcg vector. It does check the lowest bit, and if set, returns NULL. page_memcg() contains a VM_BUG_ON_PAGE() check for the page not being a slab page. To make sure nobody uses a direct access, struct page's mem_cgroup/obj_cgroups is converted to unsigned long memcg_data. Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Signed-off-by: Alexei Starovoitov Reviewed-by: Shakeel Butt Acked-by: Johannes Weiner Acked-by: Michal Hocko Link: https://lkml.kernel.org/r/20201027001657.3398190-1-guro@fb.com Link: https://lkml.kernel.org/r/20201027001657.3398190-2-guro@fb.com Link: https://lore.kernel.org/bpf/20201201215900.3569844-2-guro@fb.com commit a14d0b6764917b21ee6fdfd2a8a4c2920fbefcce Author: Eric Biggers Date: Wed Dec 2 18:20:41 2020 -0800 fscrypt: allow deleting files with unsupported encryption policy Currently it's impossible to delete files that use an unsupported encryption policy, as the kernel will just return an error when performing any operation on the top-level encrypted directory, even just a path lookup into the directory or opening the directory for readdir. More specifically, this occurs in any of the following cases: - The encryption context has an unrecognized version number. Current kernels know about v1 and v2, but there could be more versions in the future. - The encryption context has unrecognized encryption modes (FSCRYPT_MODE_*) or flags (FSCRYPT_POLICY_FLAG_*), an unrecognized combination of modes, or reserved bits set. - The encryption key has been added and the encryption modes are recognized but aren't available in the crypto API -- for example, a directory is encrypted with FSCRYPT_MODE_ADIANTUM but the kernel doesn't have CONFIG_CRYPTO_ADIANTUM enabled. It's desirable to return errors for most operations on files that use an unsupported encryption policy, but the current behavior is too strict. We need to allow enough to delete files, so that people can't be stuck with undeletable files when downgrading kernel versions. That includes allowing directories to be listed and allowing dentries to be looked up. Fix this by modifying the key setup logic to treat an unsupported encryption policy in the same way as "key unavailable" in the cases that are required for a recursive delete to work: preparing for a readdir or a dentry lookup, revalidating a dentry, or checking whether an inode has the same encryption policy as its parent directory. Reviewed-by: Andreas Dilger Link: https://lore.kernel.org/r/20201203022041.230976-10-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 5b421f08801fe8247dec368b3d323958f419e769 Author: Eric Biggers Date: Wed Dec 2 18:20:40 2020 -0800 fscrypt: unexport fscrypt_get_encryption_info() Now that fscrypt_get_encryption_info() is only called from files in fs/crypto/ (due to all key setup now being handled by higher-level helper functions instead of directly by filesystems), unexport it and move its declaration to fscrypt_private.h. Reviewed-by: Andreas Dilger Link: https://lore.kernel.org/r/20201203022041.230976-9-ebiggers@kernel.org Signed-off-by: Eric Biggers commit de3cdc6e75179a2324c23400b21483a1372c95e1 Author: Eric Biggers Date: Wed Dec 2 18:20:39 2020 -0800 fscrypt: move fscrypt_require_key() to fscrypt_private.h fscrypt_require_key() is now only used by files in fs/crypto/. So reduce its visibility to fscrypt_private.h. This is also a prerequsite for unexporting fscrypt_get_encryption_info(). Reviewed-by: Andreas Dilger Link: https://lore.kernel.org/r/20201203022041.230976-8-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 7622350e5eda2cc57a72c6b27f1405d8b4f94670 Author: Eric Biggers Date: Wed Dec 2 18:20:38 2020 -0800 fscrypt: move body of fscrypt_prepare_setattr() out-of-line In preparation for reducing the visibility of fscrypt_require_key() by moving it to fscrypt_private.h, move the call to it from fscrypt_prepare_setattr() to an out-of-line function. Reviewed-by: Andreas Dilger Link: https://lore.kernel.org/r/20201203022041.230976-7-ebiggers@kernel.org Signed-off-by: Eric Biggers commit ec0caa974cd092549ab282deb8ec7ea73b36eba0 Author: Eric Biggers Date: Wed Dec 2 18:20:37 2020 -0800 fscrypt: introduce fscrypt_prepare_readdir() The last remaining use of fscrypt_get_encryption_info() from filesystems is for readdir (->iterate_shared()). Every other call is now in fs/crypto/ as part of some other higher-level operation. We need to add a new argument to fscrypt_get_encryption_info() to indicate whether the encryption policy is allowed to be unrecognized or not. Doing this is easier if we can work with high-level operations rather than direct filesystem use of fscrypt_get_encryption_info(). So add a function fscrypt_prepare_readdir() which wraps the call to fscrypt_get_encryption_info() for the readdir use case. Reviewed-by: Andreas Dilger Link: https://lore.kernel.org/r/20201203022041.230976-6-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 91d0d89241b4201d612bfac623199c84363286e9 Author: Eric Biggers Date: Wed Dec 2 18:20:36 2020 -0800 ext4: don't call fscrypt_get_encryption_info() from dx_show_leaf() The call to fscrypt_get_encryption_info() in dx_show_leaf() is too low in the call tree; fscrypt_get_encryption_info() should have already been called when starting the directory operation. And indeed, it already is. Moreover, the encryption key is guaranteed to already be available because dx_show_leaf() is only called when adding a new directory entry. And even if the key wasn't available, dx_show_leaf() uses fscrypt_fname_disk_to_usr() which knows how to create a no-key name. So for the above reasons, and because it would be desirable to stop exporting fscrypt_get_encryption_info() directly to filesystems, remove the call to fscrypt_get_encryption_info() from dx_show_leaf(). Reviewed-by: Andreas Dilger Link: https://lore.kernel.org/r/20201203022041.230976-5-ebiggers@kernel.org Signed-off-by: Eric Biggers commit a302052b9586f2fdf8c3a7d9b907e71b25d7d463 Author: Eric Biggers Date: Wed Dec 2 18:20:35 2020 -0800 ubifs: remove ubifs_dir_open() Since encrypted directories can be opened and searched without their key being available, and each readdir and ->lookup() tries to set up the key, trying to set up the key in ->open() too isn't really useful. Just remove it so that directories don't need an ->open() method anymore, and so that we eliminate a use of fscrypt_get_encryption_info() (which I'd like to stop exporting to filesystems). Link: https://lore.kernel.org/r/20201203022041.230976-4-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 73114b6d28727b3f98b6a673c54c64b2c46ce4f5 Author: Eric Biggers Date: Wed Dec 2 18:20:34 2020 -0800 f2fs: remove f2fs_dir_open() Since encrypted directories can be opened and searched without their key being available, and each readdir and ->lookup() tries to set up the key, trying to set up the key in ->open() too isn't really useful. Just remove it so that directories don't need an ->open() method anymore, and so that we eliminate a use of fscrypt_get_encryption_info() (which I'd like to stop exporting to filesystems). Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/20201203022041.230976-3-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 65f62515e9e55056a06c14a19150c1ea7760e2af Author: Eric Biggers Date: Wed Dec 2 18:20:33 2020 -0800 ext4: remove ext4_dir_open() Since encrypted directories can be opened and searched without their key being available, and each readdir and ->lookup() tries to set up the key, trying to set up the key in ->open() too isn't really useful. Just remove it so that directories don't need an ->open() method anymore, and so that we eliminate a use of fscrypt_get_encryption_info() (which I'd like to stop exporting to filesystems). Reviewed-by: Andreas Dilger Link: https://lore.kernel.org/r/20201203022041.230976-2-ebiggers@kernel.org Signed-off-by: Eric Biggers commit cec85994c6b4fa6beb5de61dcd03e23001b9deb5 Author: Jonas Bonn Date: Wed Dec 2 13:23:24 2020 +0100 bareudp: constify device_type declaration device_type may be declared as const. Signed-off-by: Jonas Bonn Link: https://lore.kernel.org/r/20201202122324.564918-1-jonas@norrbonn.se Signed-off-by: Jakub Kicinski commit db774712596810d7808b8fcc37fa3086a682fb07 Merge: 32e417024fe28 3f52c2cb7e3ad Author: Jakub Kicinski Date: Wed Dec 2 17:55:27 2020 -0800 Merge branch 'nfc-s3fwrn5-support-a-uart-interface' Bongsu Jeon says: ==================== nfc: s3fwrn5: Support a UART interface S3FWRN82 is the Samsung's NFC chip that supports the UART communication. Before adding the UART driver module, I did refactoring the s3fwrn5_i2c module to reuse the common blocks. ==================== Link: https://lore.kernel.org/r/1606909661-3814-1-git-send-email-bongsu.jeon@samsung.com Signed-off-by: Jakub Kicinski commit 3f52c2cb7e3ada37513dabb69a22cf917dba754f Author: Bongsu Jeon Date: Wed Dec 2 20:47:41 2020 +0900 nfc: s3fwrn5: Support a UART interface Since S3FWRN82 NFC Chip, The UART interface can be used. S3FWRN82 uses NCI protocol and supports I2C and UART interface. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bongsu Jeon Signed-off-by: Jakub Kicinski commit b3799d592f26faaafdfe82fef3f5f91f9764da5f Author: Bongsu Jeon Date: Wed Dec 2 20:47:40 2020 +0900 nfc: s3fwrn5: extract the common phy blocks Extract the common phy blocks to reuse it. The UART module will use the common blocks. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bongsu Jeon Signed-off-by: Jakub Kicinski commit 337da1499586ed452c1db1e4bbd3106bbafddb6f Author: Bongsu Jeon Date: Wed Dec 2 20:47:39 2020 +0900 nfc: s3fwrn5: reduce the EN_WAIT_TIME The delay of 20ms is enough to enable and wake up the Samsung's nfc chip. Acked-by: Krzysztof Kozlowski Signed-off-by: Bongsu Jeon Signed-off-by: Jakub Kicinski commit 36d076201bd467d6bd22ba14e56e457d55e32be7 Author: Bongsu Jeon Date: Wed Dec 2 20:47:38 2020 +0900 dt-bindings: net: nfc: s3fwrn5: Support a UART interface Since S3FWRN82 NFC Chip, The UART interface can be used. S3FWRN82 supports I2C and UART interface. Signed-off-by: Bongsu Jeon Reviewed-by: Krzysztof Kozlowski Signed-off-by: Jakub Kicinski commit daf4fedde6177941b55ba3c3293a8585d5280b94 Author: David Bartley Date: Tue Dec 1 18:50:57 2020 -0800 hwmon: (nct6683) Support NCT6687D. This is found on many MSI motherboards. Signed-off-by: David Bartley Link: https://lore.kernel.org/r/20201202025057.5492-1-andareed@gmail.com Signed-off-by: Guenter Roeck commit 6cbf7964b4af7952add97f440a6ceb6564451897 Author: Joe Jamison Date: Sat Nov 28 10:54:03 2020 -0600 hwmon: (applesmc) Add DMI product matches for Intel-based Xserves (non-RackMac*) This patch adds the DMI Product ID for Intel-based Xserve machines. They use the same SMC accessible from the same data ports. The 'Xserve' product ID only resolves to SMC-containing Intel-based Xserves, as the PowerPC machines are identified by the 'RackMac' identifier. Tested on: Xserve3,1 Tested-by: Joe Jamison # Xserve3,1 Signed-off-by: Joe Jamison Signed-off-by: Guenter Roeck commit 1aa0365574ab63838ac851ca340475bf4b58b9af Author: Paul Barker Date: Sat Nov 28 17:49:09 2020 +0000 hwmon: (pwm-fan) Convert to hwmon_device_register_with_info API The pwm-fan driver is updated to use the recommended API. Signed-off-by: Paul Barker [groeck: Dropped unused variable] Signed-off-by: Guenter Roeck commit b5fcb8a4018dabf9cbcb9a83757bd74576c66174 Author: Paul Barker Date: Thu Nov 26 17:44:07 2020 +0000 hwmon: pwm-fan: Refactor pwm_fan_probe Use platform_irq_count to determine the number of fan tachometer inputs configured in the device tree. At this stage we support either 0 or 1 inputs. Once we have this information we only need to read the pulses-per-revolution value if a fan tachometer is actually configured via an IRQ value. Also add a debug print of the IRQ number and the pulses-per-revolution value to aid in investigating issues. Signed-off-by: Paul Barker Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20201126174408.755-2-pbarker@konsulko.com Signed-off-by: Guenter Roeck commit 02c155cb321643df9400a9af082902fcff222ad9 Author: Tian Tao Date: Thu Nov 26 10:21:20 2020 +0800 hwmon: (abx500) Switch to using the new API kobj_to_dev() fixed the following coccicheck: drivers/hwmon/abx500.c:266:60-61: WARNING opportunity for kobj_to_dev(). Signed-off-by: Tian Tao Link: https://lore.kernel.org/r/1606357280-51921-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Guenter Roeck commit 12d36c8362d090ce108ce4283f9e655373e2b472 Author: Tao Ren Date: Mon Nov 23 10:56:58 2020 -0800 docs: hwmon: Document max127 driver Add documentation for the max127 hardware monitoring driver. Signed-off-by: Tao Ren Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20201123185658.7632-3-rentao.bupt@gmail.com Signed-off-by: Guenter Roeck commit 8efd10147cd282c99fa5109b5497017a503ecbcd Author: Tao Ren Date: Mon Nov 23 10:56:57 2020 -0800 hwmon: (max127) Add Maxim MAX127 hardware monitoring driver Add hardware monitoring driver for the Maxim MAX127 chip. MAX127 min/max range handling code is inspired by the max197 driver. Signed-off-by: Tao Ren Link: https://lore.kernel.org/r/20201123185658.7632-2-rentao.bupt@gmail.com Signed-off-by: Guenter Roeck commit 09c7188be3a6b8c141bdf24d31fba9fb078325c3 Author: Paul Barker Date: Sun Sep 20 19:09:40 2020 +0100 dt-bindings: hwmon: pwm-fan: Support multiple fan tachometer inputs Document and give an example of how to define multiple fan tachometer inputs for the pwm-fan driver. Signed-off-by: Paul Barker Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200920180943.352526-2-pbarker@konsulko.com Signed-off-by: Guenter Roeck commit bde58ca86df9b4974dddd651a54f0793007d4fac Author: Corentin Labbe Date: Sun Nov 15 19:09:10 2020 +0000 hwmon: drivetemp: fix typo temperatire => temperature This patch fix a trivial typo temperatire => temperature. Signed-off-by: Corentin Labbe Link: https://lore.kernel.org/r/20201115190910.12539-1-clabbe@baylibre.com Signed-off-by: Guenter Roeck commit 0c8bed26044445cda6afb6fe4875752164cb03cd Author: Naveen Krishna Chatradhi Date: Fri Nov 20 00:12:46 2020 +0530 docs: hwmon: (amd_energy) update documentation Update the supported processors and mention vulnerability fix. Signed-off-by: Naveen Krishna Chatradhi Link: https://lore.kernel.org/r/20201119184246.228322-2-NaveenKrishna.Chatradhi@amd.com Signed-off-by: Guenter Roeck commit 00e1fc8247167f3cc298923a134a37f61e8ed495 Author: Naveen Krishna Chatradhi Date: Fri Nov 20 00:12:45 2020 +0530 hwmon: (amd_energy) Add AMD family 19h model 01h x86 match Add X86 CPU match for AMD family 19h model 01h. This is necessary to enable support for energy reporting via the amd_energy module. Signed-off-by: Naveen Krishna Chatradhi Link: https://lore.kernel.org/r/20201119184246.228322-1-NaveenKrishna.Chatradhi@amd.com Signed-off-by: Guenter Roeck commit 72969073dedb678d5ec5abfeb840a0863f79c5a9 Author: Wilken Gottwalt Date: Fri Nov 13 13:19:54 2020 +0100 hwmon: (corsair-psu) Fix fan rpm calculation The correct fan rpm value is also a LINEAR11 value but without a factor. Verified by using the fan test button on the psu to let the fan spin up to maximum for some seconds. Fixes: 933222c98445 ("hwmon: (corsair-psu) fix unintentional sign extension issue") Signed-off-by: Wilken Gottwalt Link: https://lore.kernel.org/r/20201113121954.GA8488@monster.powergraphx.local Signed-off-by: Guenter Roeck commit 66d5b034ea5cc617a402c5d81f56c22aa85a801f Author: Lee Jones Date: Thu Nov 12 09:57:15 2020 +0000 hwmon: (ibmpowernv) Silence strncpy() warning Fixes the following W=1 kernel build warning(s): from drivers/hwmon/ibmpowernv.c:11: In function ‘strncpy’, inlined from ‘get_sensor_index_attr’ at drivers/hwmon/ibmpowernv.c:243:2, inlined from ‘create_device_attrs’ at drivers/hwmon/ibmpowernv.c:280:8: include/linux/string.h:297:30: warning: ‘__builtin_strncpy’ specified bound 32 equals destination size [-Wstringop-truncation] 297 | #define __underlying_strncpy __builtin_strncpy | ^ include/linux/string.h:307:9: note: in expansion of macro ‘__underlying_strncpy’ 307 | return __underlying_strncpy(p, q, size); | ^~~~~~~~~~~~~~~~~~~~ Cc: Jean Delvare Cc: Guenter Roeck Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Neelesh Gupta Cc: linux-hwmon@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201112095715.1993117-4-lee.jones@linaro.org Signed-off-by: Guenter Roeck commit f9279cdaa69f96dd04ad644e2713abdee606d05d Author: Lee Jones Date: Thu Nov 12 09:57:14 2020 +0000 hwmon: (ina3221) Demote seemingly unintentional kerneldoc header This is the only use of kerneldoc in the sourcefile and no descriptions are provided. Fixes the following W=1 kernel build warning(s): drivers/hwmon/ina3221.c:152: warning: Function parameter or member 'ina' not described in 'ina3221_summation_shunt_resistor' Cc: "Andrew F. Davis" Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201112095715.1993117-3-lee.jones@linaro.org Signed-off-by: Guenter Roeck commit 3478c2699346deef69474d9892cd25f07b7b5442 Author: Lee Jones Date: Thu Nov 12 09:57:13 2020 +0000 hwmon: (adm1177) Fix kerneldoc attribute formatting Kerneldoc expects attributes/parameters to be in '@*.: ' format. Also fix repeated word "the the". Fixes the following W=1 kernel build warning(s): drivers/hwmon/adm1177.c:40: warning: Function parameter or member 'client' not described in 'adm1177_state' drivers/hwmon/adm1177.c:40: warning: Function parameter or member 'reg' not described in 'adm1177_state' drivers/hwmon/adm1177.c:40: warning: Function parameter or member 'r_sense_uohm' not described in 'adm1177_state' drivers/hwmon/adm1177.c:40: warning: Function parameter or member 'alert_threshold_ua' not described in 'adm1177_state' drivers/hwmon/adm1177.c:40: warning: Function parameter or member 'vrange_high' not described in 'adm1177_state' Cc: Beniamin Bia Cc: Michael Hennerich Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201112095715.1993117-2-lee.jones@linaro.org Signed-off-by: Guenter Roeck commit 90673f713fceaa50eef1bff0bcc8ee4e6fbc8953 Author: Colin Ian King Date: Thu Nov 5 11:50:19 2020 +0000 hwmon: (corsair-psu) fix unintentional sign extension issue The shifting of the u8 integer data[3] by 24 bits to the left will be promoted to a 32 bit signed int and then sign-extended to a long. In the event that the top bit of data[3] is set then all then all the upper 32 bits of a 64 bit long end up as also being set because of the sign-extension. Fix this by casting data[3] to a long before the shift. Addresses-Coverity: ("Unintended sign extension") Fixes: ce15cd2cee8b ("hwmon: add Corsair PSU HID controller driver") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20201105115019.41735-1-colin.king@canonical.com Signed-off-by: Guenter Roeck commit d115b51e0e567199c821fc39e13b6af7e78f247d Author: Wilken Gottwalt Date: Tue Oct 27 14:17:10 2020 +0100 hwmon: add Corsair PSU HID controller driver The Corsair digital power supplies of the series RMi, HXi and AXi include a small micro-controller with a lot of sensors attached. The sensors can be accessed by an USB connector from the outside. This micro-controller provides the data by a simple proprietary USB HID protocol. The data consist of temperatures, current and voltage levels, power usage, uptimes, fan speed and some more. It is also possible to configure the PSU (fan mode, mono/multi-rail, over current protection). This driver provides access to the sensors/statistics of the RMi and HXi series power supplies. It does not support configuring these devices, because there would be many ways to misconfigure or even damage the PSU. This patch adds: - hwmon driver corsair-psu - hwmon documentation - updates MAINTAINERS Signed-off-by: Wilken Gottwalt Link: https://lore.kernel.org/r/20201027131710.GA253280@monster.powergraphx.local Signed-off-by: Guenter Roeck commit 3bce071a301f44ffd08bada9b2e8238b625f8f8c Author: Bartosz Golaszewski Date: Mon Oct 26 11:53:52 2020 +0100 hwmon: (pmbus) shrink code and remove pmbus_do_remove() The only action currently performed in pmbus_do_remove() is removing the debugfs hierarchy. We can schedule a devm action at probe time and remove pmbus_do_remove() entirely from all pmbus drivers. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20201026105352.20359-1-brgl@bgdev.pl [groeck: Removed references to pmbus_do_remove from documentation] Signed-off-by: Guenter Roeck commit ad00a02e34b481396938c5fa62ee642bff7fbb08 Author: Chris Packham Date: Tue Oct 20 11:34:22 2020 +1300 hwmon: (adt7470) Create functions for updating readings and limits Split the body of adt7470_update_device() into two helper functions adt7470_update_sensors() and adt7470_update_limits(). Although neither of the new helpers returns an error yet lay the groundwork for propagating failures through to the sysfs readers. Signed-off-by: Chris Packham Link: https://lore.kernel.org/r/20201019223423.31488-2-chris.packham@alliedtelesis.co.nz Signed-off-by: Guenter Roeck commit 92bc2e1f82afa2e456d7416598ffdf3dbf267835 Author: Dan Carpenter Date: Thu Oct 22 10:06:59 2020 +0300 hwmon: (pmbus/max20730) delete some dead code The debugfs_create_dir() function never returns NULL. Normal users are not supposed to check the return value so the correct fix is just to delete this check. In the case where the debugfs_create_dir() fails, the function returns NULL. The other debugfs function check for NULL directory and handle it. Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20201022070659.GA2817762@mwanda Signed-off-by: Guenter Roeck commit 96eca8c97fccd3c02f61a87b0341a079b4096730 Author: Dan Carpenter Date: Wed Oct 7 10:51:48 2020 +0300 hwmon: (acpi_power_meter) clean up freeing code This code works okay but Smatch flagged it as a double free. I've changed three things to make it more clear. 1) Remove the call to free_capabilities() in acpi_power_meter_add(). This call is a no-op because the capabilities have not been allocated yet. 2) Set "*str" to NULL in free_capabilities() so that way the function can be called twice in a row without leading to a double free. 3) Call free_capabilities() in read_capabilities() instead of open coding the free. Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20201007075148.GB2529578@mwanda Signed-off-by: Guenter Roeck commit bce776f10069c806290eaac712ba73432ae8ecd7 Author: Zhang Qilong Date: Wed Dec 2 22:53:20 2020 +0800 hwmon: (ina3221) Fix PM usage counter unbalance in ina3221_write_enable pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. We fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. It depends on the mainline commit[PM: runtime: Add pm_runtime_resume_and_get to deal with usagecounter]. Fixes: 323aeb0eb5d9a ("hwmon: (ina3221) Add PM runtime support") Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20201202145320.1135614-1-zhangqilong3@huawei.com Signed-off-by: Guenter Roeck commit 32e417024fe28cc87fc3d74728e21a3e2ba2c2bf Merge: 6ec1dfb5681f9 617b860c18758 Author: Jakub Kicinski Date: Wed Dec 2 17:28:36 2020 -0800 Merge tag 'mlx5-next-2020-12-02' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux Saeed Mahameed says: ==================== mlx5-next-2020-12-02 Low level mlx5 updates required by both netdev and rdma trees. * tag 'mlx5-next-2020-12-02' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux: net/mlx5: Treat host PF vport as other (non eswitch manager) vport net/mlx5: Enable host PF HCA after eswitch is initialized net/mlx5: Rename peer_pf to host_pf net/mlx5: Make API mlx5_core_is_ecpf accept const pointer net/mlx5: Export steering related functions net/mlx5: Expose other function ifc bits net/mlx5: Expose IP-in-IP TX and RX capability bits net/mlx5: Update the hardware interface definition for vhca state net/mlx5: Update the list of the PCI supported devices net/mlx5: Avoid exposing driver internal command helpers net/mlx5: Add ts_cqe_to_dest_cqn related bits net/mlx5: Add misc4 to mlx5_ifc_fte_match_param_bits net/mlx5: Check dr mask size against mlx5_match_param size net/mlx5: Add sampler destination type net/mlx5: Add sample offload hardware bits and structures ==================== Link: https://lore.kernel.org/r/20201203011010.213440-1-saeedm@nvidia.com Signed-off-by: Jakub Kicinski commit 6ec1dfb5681f9576ea30a300e0176dc66fbf2ed3 Merge: 9693e08f2814e 02ffbb0270efb Author: Jakub Kicinski Date: Wed Dec 2 17:16:31 2020 -0800 Merge branch 'net-dsa-microchip-make-ksz8795-driver-more-versatile' Michael Grzeschik says: ==================== net: dsa: microchip: make ksz8795 driver more versatile This series changes the ksz8795 driver to use more dynamic variables instead of static defines. The purpose is to prepare the driver to be used with other microchip switches with a similar layout. ==================== Link: https://lore.kernel.org/r/20201201204506.13473-1-m.grzeschik@pengutronix.de Signed-off-by: Jakub Kicinski commit 02ffbb0270efb372f163d21ef1b25e89ffd4190c Author: Michael Grzeschik Date: Tue Dec 1 21:45:06 2020 +0100 net: dsa: microchip: ksz8795: use num_vlans where possible The value of the define VLAN_TABLE_ENTRIES can be derived from num_vlans. This patch is using the variable num_vlans instead and removes the extra define. Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Michael Grzeschik Signed-off-by: Jakub Kicinski commit 241ed719bc9884758f8953550f2ed22715b24339 Author: Michael Grzeschik Date: Tue Dec 1 21:45:05 2020 +0100 net: dsa: microchip: ksz8795: use port_cnt instead of TOTOAL_PORT_NUM To get the driver working with other chips using different port counts the dyn_mac_table should be flushed depending on the amount of available ports. This patch remove the extra define TOTOAL_PORT_NUM and is making use of the dynamic port_cnt variable instead. Reviewed-by: Florian Fainelli Signed-off-by: Michael Grzeschik Signed-off-by: Jakub Kicinski commit c9f4633b93ea5a138626fb9ca8fa43e923caad4a Author: Michael Grzeschik Date: Tue Dec 1 21:45:04 2020 +0100 net: dsa: microchip: remove usage of mib_port_count The variable mib_port_cnt has the same meaning as port_cnt. This driver removes the extra variable and is using port_cnt everywhere instead. Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Michael Grzeschik Signed-off-by: Jakub Kicinski commit 94374dd162dcb6821df63149df85e6523e518c0d Author: Michael Grzeschik Date: Tue Dec 1 21:45:03 2020 +0100 net: dsa: microchip: ksz8795: align port_cnt usage with other microchip drivers The ksz8795 driver is using port_cnt differently to the other microchip DSA drivers. It sets it to the external physical port count, than the whole port count (including the cpu port). This patch is aligning the variables purpose with the other microchip drivers. Reviewed-by: Florian Fainelli Signed-off-by: Michael Grzeschik Signed-off-by: Jakub Kicinski commit 557d1a1fbad3023b31ea26eedddd7480350b8359 Author: Michael Grzeschik Date: Tue Dec 1 21:45:02 2020 +0100 net: dsa: microchip: remove superfluous num_ports assignment The variable num_ports is already assigned in the init function. The drivers individual init function already handles the different purpose of port_cnt vs port_cnt + 1. This patch removes the extra assignment of the variable. Reviewed-by: Florian Fainelli Signed-off-by: Michael Grzeschik Signed-off-by: Jakub Kicinski commit 4ce2a984abd86b002c22b9b84842e32e973a5fec Author: Michael Grzeschik Date: Tue Dec 1 21:45:01 2020 +0100 net: dsa: microchip: ksz8795: use phy_port_cnt where possible The driver is currently hard coded to SWITCH_PORT_NUM being (TOTAL_PORT_NUM - 1) which is limited to 4 user ports for the ksz8795. The phy_port_cnt is referring to its user ports. The patch removes the extra define and use the assigned variable phy_port_cnt instead so the driver can be used on different switches. Reviewed-by: Florian Fainelli Signed-off-by: Michael Grzeschik Signed-off-by: Jakub Kicinski commit 65fe1acf07d76198c77a9c9a672928c539bcbc72 Author: Michael Grzeschik Date: Tue Dec 1 21:45:00 2020 +0100 net: dsa: microchip: ksz8795: use mib_cnt where possible The variable mib_cnt is assigned with TOTAL_SWITCH_COUNTER_NUM. This value can also be derived from the array size of mib_names. This patch uses this calculated value instead, removes the extra define and uses mib_cnt everywhere possible instead of the static define TOTAL_SWITCH_COUNTER_NUM. Keeping it in a separate variable instead of using ARRAY_SIZE everywhere instead makes the driver more flexible for future use of devices with different amount of counters. Reviewed-by: Florian Fainelli Signed-off-by: Michael Grzeschik Signed-off-by: Jakub Kicinski commit 31b62c78c1645e829a08453458224f832ac1ac7b Author: Michael Grzeschik Date: Tue Dec 1 21:44:59 2020 +0100 net: dsa: microchip: ksz8795: use reg_mib_cnt where possible The extra define SWITCH_COUNTER_NUM is a copy of the KSZ8795_COUNTER_NUM define. This patch initializes reg_mib_cnt with KSZ8795_COUNTER_NUM, makes use of reg_mib_cnt everywhere instead and removes the extra define. Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Michael Grzeschik Signed-off-by: Jakub Kicinski commit 7fc32b41fef6351527d946dd62ac865e70fc636d Author: Michael Grzeschik Date: Tue Dec 1 21:44:58 2020 +0100 net: dsa: microchip: ksz8795: move variable assignments from detect to init This patch moves all variable assignments to the init function. It leaves the detect function for its single purpose to detect which chip version is found. Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Michael Grzeschik Signed-off-by: Jakub Kicinski commit 68a1b676db52435725deec33389cb362bb64c6e6 Author: Michael Grzeschik Date: Tue Dec 1 21:44:57 2020 +0100 net: dsa: microchip: ksz8795: remove superfluous port_cnt assignment The port_cnt assignment will be done again in the init function. This patch removes the previous assignment in the detect function. Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Michael Grzeschik Signed-off-by: Jakub Kicinski commit 453aa4cd7edfa9117a57a20d96a875d815251156 Author: Michael Grzeschik Date: Tue Dec 1 21:44:56 2020 +0100 net: dsa: microchip: ksz8795: remove unused last_port variable The variable last_port is not used anywhere, this patch removes it. Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Michael Grzeschik Signed-off-by: Jakub Kicinski commit 9693e08f2814e37fce6941b140294eeb8e785375 Author: Alex Elder Date: Wed Dec 2 08:15:02 2020 -0600 net: ipa: fix build-time bug in ipa_hardware_config_qsb() Jon Hunter reported observing a build bug in the IPA driver: https://lore.kernel.org/netdev/5b5d9d40-94d5-5dad-b861-fd9bef8260e2@nvidia.com The problem is that the QMB0 max read value set for IPA v4.5 (16) is too large to fit in the 4-bit field. The actual value we want is 0, which requests that the hardware use the maximum it is capable of. Reported-by: Jon Hunter Tested-by: Jon Hunter Signed-off-by: Alex Elder Link: https://lore.kernel.org/r/20201202141502.21265-1-elder@linaro.org Signed-off-by: Jakub Kicinski commit 5f6b99d0287de2c2d0b5e7abcb0092d553ad804a Author: Arpitha Raghunandan <98.arpi@gmail.com> Date: Mon Nov 16 11:11:50 2020 +0530 fs: ext4: Modify inode-test.c to use KUnit parameterized testing feature Modify fs/ext4/inode-test.c to use the parameterized testing feature of KUnit. Signed-off-by: Arpitha Raghunandan <98.arpi@gmail.com> Signed-off-by: Marco Elver Reviewed-by: Marco Elver Tested-by: David Gow Reviewed-by: David Gow Reviewed-by: Iurii Zaikin Acked-by: Theodore Ts'o Signed-off-by: Shuah Khan commit fadb08e7c7501ed42949e646c6865ba4ec5dd948 Author: Arpitha Raghunandan <98.arpi@gmail.com> Date: Mon Nov 16 11:10:35 2020 +0530 kunit: Support for Parameterized Testing Implementation of support for parameterized testing in KUnit. This approach requires the creation of a test case using the KUNIT_CASE_PARAM() macro that accepts a generator function as input. This generator function should return the next parameter given the previous parameter in parameterized tests. It also provides a macro to generate common-case generators based on arrays. Generators may also optionally provide a human-readable description of parameters, which is displayed where available. Note, currently the result of each parameter run is displayed in diagnostic lines, and only the overall test case output summarizes TAP-compliant success or failure of all parameter runs. In future, when supported by kunit-tool, these can be turned into subsubtest outputs. Signed-off-by: Arpitha Raghunandan <98.arpi@gmail.com> Co-developed-by: Marco Elver Signed-off-by: Marco Elver Reviewed-by: David Gow Tested-by: David Gow Signed-off-by: Shuah Khan commit 9bf1019c5f3f11ab615c2d531868d1fe9887e560 Author: Simon Ser Date: Wed Dec 2 21:09:13 2020 +0000 drm/amd/display: add cursor pitch check Replace the width check with a pitch check, which matches DM internals. Add a new check to make sure the pitch (in pixels) matches the width. Reviewed-by: Nicholas Kazlauskas Signed-off-by: Simon Ser Cc: Alex Deucher Cc: Harry Wentland Cc: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 03a663673063d04c2358be754a08e62a465bb8f0 Author: Simon Ser Date: Wed Dec 2 21:09:07 2020 +0000 drm/amd/display: use FB pitch to fill dc_cursor_attributes Instead of relying on pitch (in pixels) == width, use the FB pitch. This is less confusing to readers, and works correctly if we ever support FBs with a pitch (in pixels) != width. This also makes the code symmetrical with fill_plane_buffer_attributes. Reviewed-by: Nicholas Kazlauskas Signed-off-by: Simon Ser Cc: Alex Deucher Cc: Harry Wentland Cc: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit ea9522f5e59d35a8774a6c68e98fc9d1f240a8f8 Author: Simon Ser Date: Wed Dec 2 17:38:46 2020 -0500 drm/amd/display: add debug logs for dm_crtc_helper_atomic_check Instead of silently failing the atomic check, explain what happened via a debug log. This makes it easier for user-space to figure out why something failed. Signed-off-by: Simon Ser Cc: Alex Deucher Cc: Harry Wentland Cc: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 22ca75ea6a28c62fd3648b99f4baae1a4f0f7710 Author: Alex Deucher Date: Tue Dec 1 12:29:31 2020 -0500 drm/amdgpu/swsmu/renoir: simplify sensor handling (v2) Just query the metrics table directly rather than going through an extra level of functions. v2: use proper enum Reviewed-by: Evan Quan Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 2139d12b3b5bba20f967ee8152e4ac05dbb5d089 Author: Alex Deucher Date: Tue Dec 1 10:42:49 2020 -0500 drm/amdgpu/swsmu/vangogh: use metrics table for voltages (v2) Fixes voltage reading for vddgfx and adds support for vddsoc. v2: use new voltage enum Reviewed-by: Evan Quan Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 6cc24d8d48e3fcdaca6154ab4e0db114e4d37b19 Author: Alex Deucher Date: Tue Dec 1 10:34:07 2020 -0500 drm/amdgpu/swsmu/vangogh: simplify sensor handling Just query the metrics table directly rather than going through an extra level of functions. Reviewed-by: Evan Quan Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit e408f2ba43f0c723a200aac43db75a885d6a71a6 Author: Alex Deucher Date: Tue Dec 1 21:48:23 2020 -0500 drm/amdgpu/swsmu: add metrics enums for voltage To be used in subsequent patches. Reviewed-by: Evan Quan Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 60e317a277e8b2440178f4fed48a954c9de379ec Author: Alex Deucher Date: Tue Dec 1 13:35:56 2020 -0500 drm/amdgpu/swsmu/sienna_cichlid: simplify sensor handling Just query the metrics table directly rather than going through an extra level of functions. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 2bebe9148a484fe5b5092a7a013efd6c8f941280 Author: Alex Deucher Date: Tue Dec 1 13:31:31 2020 -0500 drm/amdgpu/swsmu/arcturus: simplify sensor handling Just query the metrics table directly rather than going through an extra level of functions. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit fae3a572c9a622697392c4a2e0e74191619dd971 Author: Alex Deucher Date: Tue Dec 1 13:24:28 2020 -0500 drm/amdgpu/swsmu/navi1x: simplify sensor handling Just query the metrics table directly rather than going through an extra level of functions. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 902bc65de0b3d72c481b45cbac3e97ab8cb399c2 Author: Alex Deucher Date: Tue Dec 1 08:57:02 2020 -0500 drm/amdgpu/powerplay/psm: return an error in power state init Rather than just silently dropping it. Also fixes a set but unused variable warning. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 9805e1adab1198a52db035901f872019ffdacc68 Author: Alex Deucher Date: Tue Dec 1 08:51:06 2020 -0500 drm/amdgpu/powerplay/vega10: handle error in getting pptable Rather than just silently dropping it. Also fixes a set but unused variable warning. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 402bdef8a5cbd5a6922a5bd7e109c411ef7d28ee Author: Alex Deucher Date: Mon Nov 30 18:36:41 2020 -0500 drm/amdgpu/powerplay/iceland: return an error if copying to smc fails Rather than just silently dropping it. Also fixes a set but unused variable warning. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit cfcc59d4c1af761a262c38e5bb65a4d631e1e9c6 Author: Alex Deucher Date: Mon Nov 30 18:12:27 2020 -0500 drm/amdgpu/powerplay/ci: return an error if copying to smc fails Rather than just silently dropping it. Also fixes a set but unused variable warning. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 54915feea3cab80f4b3bc8947d69484e3791292b Author: Alex Deucher Date: Mon Nov 30 18:06:49 2020 -0500 drm/amdgpu/powerplay/tonga: return an error if copying to smc fails Rather than just silently dropping it. Also fixes a set but unused variable warning. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 3fabf0fdfff67e79286d859dd0b838d49a5b6d36 Author: Boyuan Zhang Date: Tue May 19 11:38:44 2020 -0400 drm/amdgpu/vcn3.0: remove old DPG workaround Port from VCN2.5 SCRATCH2 is used to keep decode wptr as a workaround which fix a hardware DPG decode wptr update bug for vcn2.5 beforehand. Signed-off-by: Boyuan Zhang Reviewed-by: James Zhu Signed-off-by: Alex Deucher commit 7643023eefcdc1161b7beb92ee925e53444bdbd1 Author: Boyuan Zhang Date: Sun May 10 15:47:03 2020 -0400 drm/amdgpu/vcn3.0: stall DPG when WPTR/RPTR reset Port from VCN2.5 Add vcn dpg harware synchronization to fix race condition issue between vcn driver and hardware. Signed-off-by: Boyuan Zhang Reviewed-by: James Zhu Signed-off-by: Alex Deucher commit 8a77ed6d1fdda752f6b3203391a099f590a9454f Author: Mauro Carvalho Chehab Date: Tue Dec 1 13:08:54 2020 +0100 HSI: core: fix a kernel-doc markup A function has a different name between their prototype and its kernel-doc markup. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sebastian Reichel commit 9e83f54f532bf2e66f6808922a4646cab7123033 Merge: ba0581749fec3 a540c81a2bcb9 Author: Alexei Starovoitov Date: Wed Dec 2 13:25:11 2020 -0800 Merge branch 'bpf: expose bpf_{s,g}etsockopt helpers to bind{4,6} hooks' Stanislav Fomichev says: ==================== This might be useful for the listener sockets to pre-populate some options. Since those helpers require locked sockets, I'm changing bind hooks to lock/unlock the sockets. This should not cause any performance overhead because at this point there shouldn't be any socket lock contention and the locking/unlocking should be cheap. Also, as part of the series, I convert test_sock_addr bpf assembly into C (and preserve the narrow load tests) to make it easier to extend with th bpf_setsockopt later on. v2: * remove version from bpf programs (Andrii Nakryiko) ==================== Signed-off-by: Alexei Starovoitov commit a540c81a2bcb95227c3e24a4478956824858a6b0 Author: Stanislav Fomichev Date: Wed Dec 2 09:25:16 2020 -0800 selftests/bpf: Extend bind{4,6} programs with a call to bpf_setsockopt To make sure it doesn't trigger sock_owned_by_me splat. Signed-off-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201202172516.3483656-4-sdf@google.com commit 427167c0b064ed898b848209add62b4322ec7840 Author: Stanislav Fomichev Date: Wed Dec 2 09:25:15 2020 -0800 bpf: Allow bpf_{s,g}etsockopt from cgroup bind{4,6} hooks I have to now lock/unlock socket for the bind hook execution. That shouldn't cause any overhead because the socket is unbound and shouldn't receive any traffic. Signed-off-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov Acked-by: Andrey Ignatov Link: https://lore.kernel.org/bpf/20201202172516.3483656-3-sdf@google.com commit a999696c547f1a8ef2ddbb9b0e77abc3f6db4ff1 Author: Stanislav Fomichev Date: Wed Dec 2 09:25:14 2020 -0800 selftests/bpf: Rewrite test_sock_addr bind bpf into C I'm planning to extend it in the next patches. It's much easier to work with C than BPF assembly. Signed-off-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201202172516.3483656-2-sdf@google.com commit 278b13ce3a89698711c5a67792ba2dba41555433 Author: Dmitry Torokhov Date: Wed Oct 2 10:33:02 2019 -0700 Input: remove input_polled_dev implementation Now that normal input devices support polling mode, and all users of input_polled_dev API have been converted, we can remove it. Signed-off-by: Dmitry Torokhov commit c32abd8b569144b20c9c9b6dd7232828c612452f Author: Fabio Estevam Date: Mon Nov 23 21:28:49 2020 -0300 i2c: mxs: Remove unneeded platform_device_id The i2c-mxs driver only runs on DT-platform and there is no need to use the platform_device_id structure to pass the driver data. Get rid of it to make the code simpler. Signed-off-by: Fabio Estevam Reported-by: kernel test robot Signed-off-by: Wolfram Sang commit 83eb65b6ac7cd17ba87e5ebd15cd44f4034ccf3d Author: Uwe Kleine-König Date: Mon Nov 23 21:27:46 2020 +0100 i2c: pca-platform: drop two members from driver data that are assigned to only io_base and io_size are assigned to only in .probe() and otherwise unused. Signed-off-by: Uwe Kleine-König Signed-off-by: Wolfram Sang commit c610199cd392e6e2d41811ef83d85355c1b862b3 Author: Fabio Estevam Date: Mon Nov 16 17:29:10 2020 -0300 i2c: imx: Remove unused .id_table support Since 5.10-rc1 i.MX is a devicetree-only platform and the existing .id_table support in this driver was only useful for old non-devicetree platforms. Signed-off-by: Fabio Estevam Acked-by: Uwe Kleine-König Signed-off-by: Wolfram Sang commit b4ff421f123ebc16b4c8cb4474485be29812b5ed Author: Vaibhav Gupta Date: Sat Nov 7 13:51:51 2020 +0530 i2c: nvidia-gpu: drop empty stub for runtime pm After the commit c5eb1190074c ("PCI / PM: Allow runtime PM without callback functions") we no more need empty stubs for runtime-pm to work. The driver has no device specific task(s) for .suspend() . The stub was placed just for runtime-pm, which can be dropped now. Reported-by: Bjorn Helgaas Signed-off-by: Vaibhav Gupta Reviewed-by: Jarkko Nikula Signed-off-by: Wolfram Sang commit 579f8983c4597ccb0011fa7c5a388c322f4b46ef Author: Khalil Blaiech Date: Fri Nov 20 18:06:06 2020 -0500 dt-bindings: i2c: mellanox,i2c-mlxbf: convert txt to YAML schema Write the devicetree binding text file associated with the Mellanox BlueField I2C controller in schema file, JSON compatible subset of YAML. Besides, add an entry within MAINTAINERS file. Signed-off-by: Khalil Blaiech Reviewed-by: Rob Herring Signed-off-by: Wolfram Sang commit 9c7cae2427715502227f823364a6a77828fdf3ea Author: Mark Tomlinson Date: Thu Aug 27 10:35:16 2020 +1200 i2c: mv64xxx: Add bus error recovery This adds i2c bus recovery to the mv64xxx driver. Implement bus recovery to recover from SCL/SDA stuck low. This uses the generic recovery function, setting the clock/data lines as GPIO pins, and sending 9 clocks to try and recover the bus. Signed-off-by: Mark Tomlinson [wsa: added some curly braces] Signed-off-by: Wolfram Sang commit 05e3ecea4a6305597a060da0a123c80df8827bf1 Author: Eric Dumazet Date: Wed Dec 2 09:16:57 2020 -0800 mptcp: avoid potential infinite loop in mptcp_recvmsg() If a packet is ready in receive queue, and application isssues a recvmsg()/recvfrom()/recvmmsg() request asking for zero bytes, we hang in mptcp_recvmsg(). Fixes: ea4ca586b16f ("mptcp: refine MPTCP-level ack scheduling") Signed-off-by: Eric Dumazet Tested-by: Paolo Abeni Reviewed-by: Mat Martineau Link: https://lore.kernel.org/r/20201202171657.1185108-1-eric.dumazet@gmail.com Signed-off-by: Jakub Kicinski commit d22f9a6c92de96304c81792942ae7c306f08ac77 Author: Alexey Kardashevskiy Date: Sun Nov 22 18:39:50 2020 +1100 vfio/pci/nvlink2: Do not attempt NPU2 setup on POWER8NVL NPU We execute certain NPU2 setup code (such as mapping an LPID to a device in NPU2) unconditionally if an Nvlink bridge is detected. However this cannot succeed on POWER8NVL machines as the init helpers return an error other than ENODEV which means the device is there is and setup failed so vfio_pci_enable() fails and pass through is not possible. This changes the two NPU2 related init helpers to return -ENODEV if there is no "memory-region" device tree property as this is the distinction between NPU and NPU2. Tested on - POWER9 pvr=004e1201, Ubuntu 19.04 host, Ubuntu 18.04 vm, NVIDIA GV100 10de:1db1 driver 418.39 - POWER8 pvr=004c0100, RHEL 7.6 host, Ubuntu 16.10 vm, NVIDIA P100 10de:15f9 driver 396.47 Fixes: 7f92891778df ("vfio_pci: Add NVIDIA GV100GL [Tesla V100 SXM2] subdriver") Cc: stable@vger.kernel.org # 5.0 Signed-off-by: Alexey Kardashevskiy Signed-off-by: Alex Williamson commit 32ccdde0a794700f29d190eae77eb41f1b8926ce Author: Krzysztof Kozlowski Date: Tue Nov 17 21:11:06 2020 +0100 ARM: dts: s3c6410: correct SMDK6410 board compatible The SMDK6410 DTS was incorrectly called mini6410, probably copy-paste from FriendlyARM Mini6410 board. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201117201106.128813-4-krzk@kernel.org commit 7dc4c0b42d82d9b633663eadcd821f3a109af4e4 Author: Krzysztof Kozlowski Date: Tue Nov 17 21:11:05 2020 +0100 ARM: dts: s3c24xx: add SMDK2416 board compatible Add a compatible for SMDK2416 board next to the SoC compatible. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201117201106.128813-3-krzk@kernel.org commit 7b06a56d468b756ad6bb43ac21b11e474ebc54a0 Author: Jason Gunthorpe Date: Thu Nov 5 12:34:58 2020 -0400 vfio-pci: Use io_remap_pfn_range() for PCI IO memory commit f8f6ae5d077a ("mm: always have io_remap_pfn_range() set pgprot_decrypted()") allows drivers using mmap to put PCI memory mapped BAR space into userspace to work correctly on AMD SME systems that default to all memory encrypted. Since vfio_pci_mmap_fault() is working with PCI memory mapped BAR space it should be calling io_remap_pfn_range() otherwise it will not work on SME systems. Fixes: 11c4cd07ba11 ("vfio-pci: Fault mmaps to enable vma tracking") Signed-off-by: Jason Gunthorpe Acked-by: Peter Xu Tested-by: Tom Lendacky Signed-off-by: Alex Williamson commit 16b8fe4caf499ae8e12d2ab1b1324497e36a7b83 Author: Eric Auger Date: Fri Nov 13 18:52:02 2020 +0100 vfio/pci: Move dummy_resources_list init in vfio_pci_probe() In case an error occurs in vfio_pci_enable() before the call to vfio_pci_probe_mmaps(), vfio_pci_disable() will try to iterate on an uninitialized list and cause a kernel panic. Lets move to the initialization to vfio_pci_probe() to fix the issue. Signed-off-by: Eric Auger Fixes: 05f0c03fbac1 ("vfio-pci: Allow to mmap sub-page MMIO BARs if the mmio page is exclusive") CC: Stable # v4.7+ Signed-off-by: Alex Williamson commit 1aa386106b445b95b4a1f485d3a76fa8bca21ba3 Author: Krzysztof Kozlowski Date: Tue Nov 17 21:11:04 2020 +0100 dt-bindings: arm: samsung: document S3C6410-based boards binding Add bindings for the FriendlyARM Mini6410 and Samsung SMDK6410 boards. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201117201106.128813-2-krzk@kernel.org commit 8523df80815bc438b6e6aa9db959c0eed0185695 Author: Krzysztof Kozlowski Date: Tue Nov 17 21:11:03 2020 +0100 dt-bindings: arm: samsung: document SMDK2416 board binding Add binding for the SMDK2416 board. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201117201106.128813-1-krzk@kernel.org commit 2ce5a30711abdb690f916d21cb524021e2368d41 Author: Dan Carpenter Date: Wed Dec 2 09:57:02 2020 +0300 octeontx2-af: debugfs: delete dead code These debugfs never return NULL so all this code will never be run. In the normal case, (and in this case particularly), the debugfs functions are not supposed to be checked for errors so all this error checking code can be safely deleted. Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/X8c6vpapJDYI2eWI@mwanda Signed-off-by: Jakub Kicinski commit 59f96cf6ba88c64278c35d11957a36faaca33de7 Author: Frieder Schrempf Date: Tue Dec 1 12:39:09 2020 +0100 NFC: nxp-nci: Make firmware GPIO pin optional There are other NXP NCI compatible NFC controllers such as the PN7150 that use an integrated firmware and therefore do not have a GPIO to select firmware downloading mode. To support this kind of controller, let's make the firmware GPIO optional. Signed-off-by: Frieder Schrempf Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201201113921.6572-1-frieder.schrempf@kontron.de Signed-off-by: Jakub Kicinski commit 1517c4facf2e66401394998dba1ee236fd261310 Author: Mark Rutland Date: Wed Dec 2 13:15:58 2020 +0000 arm64: uaccess: remove vestigal UAO support Now that arm64 no longer uses UAO, remove the vestigal feature detection code and Kconfig text. Signed-off-by: Mark Rutland Cc: Christoph Hellwig Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20201202131558.39270-13-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 7cf283c7bd6260ae43a74cd213f5ec9d665a19b5 Author: Mark Rutland Date: Wed Dec 2 13:15:57 2020 +0000 arm64: uaccess: remove redundant PAN toggling Some code (e.g. futex) needs to make privileged accesses to userspace memory, and uses uaccess_{enable,disable}_privileged() in order to permit this. All other uaccess primitives use LDTR/STTR, and never need to toggle PAN. Remove the redundant PAN toggling. Signed-off-by: Mark Rutland Cc: Christoph Hellwig Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20201202131558.39270-12-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit b5a5a01d8e9a44ecb18dc31d471233cad2f88291 Author: Mark Rutland Date: Wed Dec 2 13:15:56 2020 +0000 arm64: uaccess: remove addr_limit_user_check() Now that set_fs() is gone, addr_limit_user_check() is redundant. Remove the checks and associated thread flag. To ensure that _TIF_WORK_MASK can be used as an immediate value in an AND instruction (as it is in `ret_to_user`), TIF_MTE_ASYNC_FAULT is renumbered to keep the constituent bits of _TIF_WORK_MASK contiguous. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Christoph Hellwig Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20201202131558.39270-11-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 3d2403fd10a1dbb359b154af41ffed9f2a7520e8 Author: Mark Rutland Date: Wed Dec 2 13:15:55 2020 +0000 arm64: uaccess: remove set_fs() Now that the uaccess primitives dont take addr_limit into account, we have no need to manipulate this via set_fs() and get_fs(). Remove support for these, along with some infrastructure this renders redundant. We no longer need to flip UAO to access kernel memory under KERNEL_DS, and head.S unconditionally clears UAO for all kernel configurations via an ERET in init_kernel_el. Thus, we don't need to dynamically flip UAO, nor do we need to context-switch it. However, we still need to adjust PAN during SDEI entry. Masking of __user pointers no longer needs to use the dynamic value of addr_limit, and can use a constant derived from the maximum possible userspace task size. A new TASK_SIZE_MAX constant is introduced for this, which is also used by core code. In configurations supporting 52-bit VAs, this may include a region of unusable VA space above a 48-bit TTBR0 limit, but never includes any portion of TTBR1. Note that TASK_SIZE_MAX is an exclusive limit, while USER_DS and KERNEL_DS were inclusive limits, and is converted to a mask by subtracting one. As the SDEI entry code repurposes the otherwise unnecessary pt_regs::orig_addr_limit field to store the TTBR1 of the interrupted context, for now we rename that to pt_regs::sdei_ttbr1. In future we can consider factoring that out. Signed-off-by: Mark Rutland Acked-by: James Morse Cc: Christoph Hellwig Cc: Will Deacon Link: https://lore.kernel.org/r/20201202131558.39270-10-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 7b90dc40e36e0beb0fdecfef80f33a2e88aced14 Author: Mark Rutland Date: Wed Dec 2 13:15:54 2020 +0000 arm64: uaccess cleanup macro naming Now the uaccess primitives use LDTR/STTR unconditionally, the uao_{ldp,stp,user_alternative} asm macros are misnamed, and have a redundant argument. Let's remove the redundant argument and rename these to user_{ldp,stp,ldst} respectively to clean this up. Signed-off-by: Mark Rutland Reviewed-by: Robin Murohy Cc: Christoph Hellwig Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20201202131558.39270-9-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit fc703d80130b1c9d6783f4cbb9516fd5fe4a750d Author: Mark Rutland Date: Wed Dec 2 13:15:53 2020 +0000 arm64: uaccess: split user/kernel routines This patch separates arm64's user and kernel memory access primitives into distinct routines, adding new __{get,put}_kernel_nofault() helpers to access kernel memory, upon which core code builds larger copy routines. The kernel access routines (using LDR/STR) are not affected by PAN (when legitimately accessing kernel memory), nor are they affected by UAO. Switching to KERNEL_DS may set UAO, but this does not adversely affect the kernel access routines. The user access routines (using LDTR/STTR) are not affected by PAN (when legitimately accessing user memory), but are affected by UAO. As these are only legitimate to use under USER_DS with UAO clear, this should not be problematic. Routines performing atomics to user memory (futex and deprecated instruction emulation) still need to transiently clear PAN, and these are left as-is. These are never used on kernel memory. Subsequent patches will refactor the uaccess helpers to remove redundant code, and will also remove the redundant PAN/UAO manipulation. Signed-off-by: Mark Rutland Cc: Christoph Hellwig Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20201202131558.39270-8-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit f253d827f33cb5a5990b5cfd271941d1a21ecd85 Author: Mark Rutland Date: Wed Dec 2 13:15:52 2020 +0000 arm64: uaccess: refactor __{get,put}_user As a step towards implementing __{get,put}_kernel_nofault(), this patch splits most user-memory specific logic out of __{get,put}_user(), with the memory access and fault handling in new __{raw_get,put}_mem() helpers. For now the LDR/LDTR patching is left within the *get_mem() helpers, and will be removed in a subsequent patch. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Christoph Hellwig Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20201202131558.39270-7-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 9e94fdade4d8f3c9b64c302ba081e2718c9e4087 Author: Mark Rutland Date: Wed Dec 2 13:15:51 2020 +0000 arm64: uaccess: simplify __copy_user_flushcache() Currently __copy_user_flushcache() open-codes raw_copy_from_user(), and doesn't use uaccess_mask_ptr() on the user address. Let's have it call raw_copy_from_user(), which is both a simplification and ensures that user pointers are masked under speculation. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Reviewed-by: Robin Murphy Cc: Christoph Hellwig Cc: Will Deacon Link: https://lore.kernel.org/r/20201202131558.39270-6-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 923e1e7d8223cfa6e67d00ad238ee415c3c59320 Author: Mark Rutland Date: Wed Dec 2 13:15:50 2020 +0000 arm64: uaccess: rename privileged uaccess routines We currently have many uaccess_*{enable,disable}*() variants, which subsequent patches will cut down as part of removing set_fs() and friends. Once this simplification is made, most uaccess routines will only need to ensure that the user page tables are mapped in TTBR0, as is currently dealt with by uaccess_ttbr0_{enable,disable}(). The existing uaccess_{enable,disable}() routines ensure that user page tables are mapped in TTBR0, and also disable PAN protections, which is necessary to be able to use atomics on user memory, but also permit unrelated privileged accesses to access user memory. As preparatory step, let's rename uaccess_{enable,disable}() to uaccess_{enable,disable}_privileged(), highlighting this caveat and discouraging wider misuse. Subsequent patches can reuse the uaccess_{enable,disable}() naming for the common case of ensuring the user page tables are mapped in TTBR0. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Christoph Hellwig Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20201202131558.39270-5-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 2376e75cc77eeb80bf30447f35e9ceb0997508a8 Author: Mark Rutland Date: Wed Dec 2 13:15:48 2020 +0000 arm64: sdei: explicitly simulate PAN/UAO entry In preparation for removing addr_limit and set_fs() we must decouple the SDEI PAN/UAO manipulation from the uaccess code, and explicitly reinitialize these as required. SDEI enters the kernel with a non-architectural exception, and prior to the most recent revision of the specification (ARM DEN 0054B), PSTATE bits (e.g. PAN, UAO) are not manipulated in the same way as for architectural exceptions. Notably, older versions of the spec can be read ambiguously as to whether PSTATE bits are inherited unchanged from the interrupted context or whether they are generated from scratch, with TF-A doing the latter. We have three cases to consider: 1) The existing TF-A implementation of SDEI will clear PAN and clear UAO (along with other bits in PSTATE) when delivering an SDEI exception. 2) In theory, implementations of SDEI prior to revision B could inherit PAN and UAO (along with other bits in PSTATE) unchanged from the interrupted context. However, in practice such implementations do not exist. 3) Going forward, new implementations of SDEI must clear UAO, and depending on SCTLR_ELx.SPAN must either inherit or set PAN. As we can ignore (2) we can assume that upon SDEI entry, UAO is always clear, though PAN may be clear, inherited, or set per SCTLR_ELx.SPAN. Therefore, we must explicitly initialize PAN, but do not need to do anything for UAO. Considering what we need to do: * When set_fs() is removed, force_uaccess_begin() will have no HW side-effects. As this only clears UAO, which we can assume has already been cleared upon entry, this is not a problem. We do not need to add code to manipulate UAO explicitly. * PAN may be cleared upon entry (in case 1 above), so where a kernel is built to use PAN and this is supported by all CPUs, the kernel must set PAN upon entry to ensure expected behaviour. * PAN may be inherited from the interrupted context (in case 3 above), and so where a kernel is not built to use PAN or where PAN support is not uniform across CPUs, the kernel must clear PAN to ensure expected behaviour. This patch reworks the SDEI code accordingly, explicitly setting PAN to the expected state in all cases. To cater for the cases where the kernel does not use PAN or this is not uniformly supported by hardware we add a new cpu_has_pan() helper which can be used regardless of whether the kernel is built to use PAN. The existing system_uses_ttbr0_pan() is redefined in terms of system_uses_hw_pan() both for clarity and as a minor optimization when HW PAN is not selected. Signed-off-by: Mark Rutland Reviewed-by: James Morse Cc: James Morse Cc: Christoph Hellwig Cc: Will Deacon Link: https://lore.kernel.org/r/20201202131558.39270-3-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 9eb597c74483ad5c230a884449069adfb68285ea Merge: fc6877b87982d cd6181ff7e938 Author: Kalle Valo Date: Wed Dec 2 21:46:55 2020 +0200 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for v5.11. Major changes: ath11k * Fast Initial Link Setup (FILS) discovery and unsolicited broadcast probe response support * qcom,ath11k-calibration-variant Device Tree setting * cold boot calibration support * new DFS region: JP wnc36xx * enable connection monitoring and keepalive in firmware ath10k * firmware IRAM recovery feature mhi * merge mhi-ath11k-immutable branch to make MHI API change go smoothly commit a0ccf2ba689f773f2882b9c1e79d8a43a19cb513 Author: Mark Rutland Date: Wed Dec 2 13:15:47 2020 +0000 arm64: sdei: move uaccess logic to arch/arm64/ The SDEI support code is split across arch/arm64/ and drivers/firmware/, largley this is split so that the arch-specific portions are under arch/arm64, and the management logic is under drivers/firmware/. However, exception entry fixups are currently under drivers/firmware. Let's move the exception entry fixups under arch/arm64/. This de-clutters the management logic, and puts all the arch-specific portions in one place. Doing this also allows the fixups to be applied earlier, so things like PAN and UAO will be in a known good state before we run other logic. This will also make subsequent refactoring easier. Signed-off-by: Mark Rutland Reviewed-by: James Morse Cc: Christoph Hellwig Cc: Will Deacon Link: https://lore.kernel.org/r/20201202131558.39270-2-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit acaf523a7bf226b28504306c1cfee194520123b3 Author: Yu Kuai Date: Thu Nov 26 11:18:34 2020 +0800 blk-throttle: don't check whether or not lower limit is valid if CONFIG_BLK_DEV_THROTTLING_LOW is off blk_throtl_update_limit_valid() will search for descendants to see if 'LIMIT_LOW' of bps/iops and READ/WRITE is nonzero. However, they're always zero if CONFIG_BLK_DEV_THROTTLING_LOW is not set, furthermore, a lot of time will be wasted to iterate descendants. Thus do nothing in blk_throtl_update_limit_valid() in such situation. Signed-off-by: Yu Kuai Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit d87a8e65b5101123a24cddeb7a8a2c7b45f7b60c Author: Mark Rutland Date: Fri Nov 13 12:49:25 2020 +0000 arm64: head.S: always initialize PSTATE As with SCTLR_ELx and other control registers, some PSTATE bits are UNKNOWN out-of-reset, and we may not be able to rely on hardware or firmware to initialize them to our liking prior to entry to the kernel, e.g. in the primary/secondary boot paths and return from idle/suspend. It would be more robust (and easier to reason about) if we consistently initialized PSTATE to a default value, as we do with control registers. This will ensure that the kernel is not adversely affected by bits it is not aware of, e.g. when support for a feature such as PAN/UAO is disabled. This patch ensures that PSTATE is consistently initialized at boot time via an ERET. This is not intended to relax the existing requirements (e.g. DAIF bits must still be set prior to entering the kernel). For features detected dynamically (which may require system-wide support), it is still necessary to subsequently modify PSTATE. As ERET is not always a Context Synchronization Event, an ISB is placed before each exception return to ensure updates to control registers have taken effect. This handles the kernel being entered with SCTLR_ELx.EOS clear (or any future control bits being in an UNKNOWN state). Signed-off-by: Mark Rutland Cc: Christoph Hellwig Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20201113124937.20574-6-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 2ffac9e3fdbd54be953e773f9deb08fc6a488a9f Author: Mark Rutland Date: Fri Nov 13 12:49:24 2020 +0000 arm64: head.S: cleanup SCTLR_ELx initialization Let's make SCTLR_ELx initialization a bit clearer by using meaningful names for the initialization values, following the same scheme for SCTLR_EL1 and SCTLR_EL2. These definitions will be used more widely in subsequent patches. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Christoph Hellwig Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20201113124937.20574-5-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit ecbb11ab3ebc02763ec53489c9b1f983be9dc882 Author: Mark Rutland Date: Fri Nov 13 12:49:23 2020 +0000 arm64: head.S: rename el2_setup -> init_kernel_el For a while now el2_setup has performed some basic initialization of EL1 even when the kernel is booted at EL1, so the name is a little misleading. Further, some comments are stale as with VHE it doesn't drop the CPU to EL1. To clarify things, rename el2_setup to init_kernel_el, and update comments to be clearer as to the function's purpose. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Christoph Hellwig Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20201113124937.20574-4-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 515d5c8a1374b307225e41b3e66b0aad08585f53 Author: Mark Rutland Date: Fri Nov 13 12:49:22 2020 +0000 arm64: add C wrappers for SET_PSTATE_*() To make callsites easier to read, add trivial C wrappers for the SET_PSTATE_*() helpers, and convert trivial uses over to these. The new wrappers will be used further in subsequent patches. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Christoph Hellwig Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20201113124937.20574-3-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit f80d034086d5bfcfd3bf4ab6f52b2df78c3ad2fa Author: Mark Rutland Date: Fri Nov 13 12:49:21 2020 +0000 arm64: ensure ERET from kthread is illegal For consistency, all tasks have a pt_regs reserved at the highest portion of their task stack. Among other things, this ensures that a task's SP is always pointing within its stack rather than pointing immediately past the end. While it is never legitimate to ERET from a kthread, we take pains to initialize pt_regs for kthreads as if this were legitimate. As this is never legitimate, the effects of an erroneous return are rarely tested. Let's simplify things by initializing a kthread's pt_regs such that an ERET is caught as an illegal exception return, and removing the explicit initialization of other exception context. Note that as spectre_v4_enable_task_mitigation() only manipulates the PSTATE within the unused regs this is safe to remove. As user tasks will have their exception context initialized via start_thread() or start_compat_thread(), this should only impact cases where something has gone very wrong and we'd like that to be clearly indicated. Signed-off-by: Mark Rutland Cc: Christoph Hellwig Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20201113124937.20574-2-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit b0d97557ebfc9d5ba5f2939339a9fdd267abafeb Author: Jeffle Xu Date: Wed Dec 2 19:11:45 2020 +0800 block: fix inflight statistics of part0 The inflight of partition 0 doesn't include inflight IOs to all sub-partitions, since currently mq calculates inflight of specific partition by simply camparing the value of the partition pointer. Thus the following case is possible: $ cat /sys/block/vda/inflight        0        0 $ cat /sys/block/vda/vda1/inflight        0      128 While single queue device (on a previous version, e.g. v3.10) has no this issue: $cat /sys/block/sda/sda3/inflight 0 33 $cat /sys/block/sda/inflight 0 33 Partition 0 should be specially handled since it represents the whole disk. This issue is introduced since commit bf0ddaba65dd ("blk-mq: fix sysfs inflight counter"). Besides, this patch can also fix the inflight statistics of part 0 in /proc/diskstats. Before this patch, the inflight statistics of part 0 doesn't include that of sub partitions. (I have marked the 'inflight' field with asterisk.) $cat /proc/diskstats 259 0 nvme0n1 45974469 0 367814768 6445794 1 0 1 0 *0* 111062 6445794 0 0 0 0 0 0 259 2 nvme0n1p1 45974058 0 367797952 6445727 0 0 0 0 *33* 111001 6445727 0 0 0 0 0 0 This is introduced since commit f299b7c7a9de ("blk-mq: provide internal in-flight variant"). Fixes: bf0ddaba65dd ("blk-mq: fix sysfs inflight counter") Fixes: f299b7c7a9de ("blk-mq: provide internal in-flight variant") Signed-off-by: Jeffle Xu Reviewed-by: Christoph Hellwig [axboe: adapt for 5.11 partition change] Signed-off-by: Jens Axboe commit fc6877b87982defcacef96934b8aafa4a31c7d83 Author: Tom Rix Date: Fri Nov 27 10:08:35 2020 -0800 wl1251: remove trailing semicolon in macro definition The macro use will already have a semicolon. Signed-off-by: Tom Rix Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201127180835.2769297-1-trix@redhat.com commit a460b0e1bab831076b42b6027b1547953c209036 Author: Tom Rix Date: Fri Nov 27 09:58:21 2020 -0800 airo: remove trailing semicolon in macro definition The macro use will already have a semicolon. Signed-off-by: Tom Rix Reviewed-by: Kieran Bingham Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201127175821.2756988-1-trix@redhat.com commit 339754ffdb928c212658fc3a43e6050f2fd79dab Author: Ajay Singh Date: Wed Nov 25 11:41:10 2020 +0000 wilc1000: added queue support for WMM Added multiple queues[BK,BE,VI,VO] to handle different priority data packets. Before adding a packet to the queue, checked its priority from the header, and then add to the suitable queue. The limit for each queue is maintained separately. Also while passing the packets to the firmware via VMM take care to select data packets based on priority and available space. Signed-off-by: Ajay Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201125114059.10006-6-ajay.kathat@microchip.com commit 9c172f30b40bb2c50b357930e6a6b7950e610053 Author: Ajay Singh Date: Wed Nov 25 11:41:10 2020 +0000 wilc1000: call complete() for failure in wilc_wlan_txq_add_cfg_pkt() Added complete() call for failure case in wilc_wlan_txq_add_cfg_pkt(). Signed-off-by: Ajay Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201125114059.10006-5-ajay.kathat@microchip.com commit 66aea5d198c3ad4434e6adfb66dcb574c9a14779 Author: Ajay Singh Date: Wed Nov 25 11:41:09 2020 +0000 wilc1000: free resource in wilc_wlan_txq_add_mgmt_pkt() for failure path Before returing from wilc_wlan_txq_add_mgmt_pkt() invoke tx_complete_fn() callback to free up allocated memory for failure case. Signed-off-by: Ajay Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201125114059.10006-4-ajay.kathat@microchip.com commit dd460e2ac05ffa52db52a2ab9e64f82ce402eab9 Author: Ajay Singh Date: Wed Nov 25 11:41:08 2020 +0000 wilc1000: free resource in wilc_wlan_txq_add_net_pkt() for failure path Before returing from wilc_wlan_txq_add_net_pkt() invoke tx_complete_fn() callback to free up allocated memory for failure cases. Signed-off-by: Ajay Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201125114059.10006-3-ajay.kathat@microchip.com commit c04fabacb780b6d8dbc2e7258b383d7a91f69ad9 Author: Ajay Singh Date: Wed Nov 25 11:41:08 2020 +0000 wilc1000: added 'ndo_set_mac_address' callback support Added support for 'ndo_set_mac_address call' callback to allow change of interface MAC address. Signed-off-by: Ajay Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201125114059.10006-2-ajay.kathat@microchip.com commit 75729e110e680687668fd5b4bdd7b25c92e9c00d Author: Matthias Brugger Date: Tue Nov 24 13:00:18 2020 +0100 brcmfmac: expose firmware config files through modinfo Apart from a firmware binary the chip needs a config file used by the FW. Add the config files to modinfo so that they can be read by userspace. Signed-off-by: Matthias Brugger Reviewed-by: Hans de Goede Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201124120018.31358-1-matthias.bgg@kernel.org commit 3b52cf6242b49c86bba2b5753a43a4e5999c4171 Author: Tian Tao Date: Mon Nov 23 09:47:42 2020 +0800 wlcore: Switch to using the new API kobj_to_dev() Switch to using the new API kobj_to_dev(). Signed-off-by: Tian Tao Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1606096062-32251-1-git-send-email-tiantao6@hisilicon.com commit 5b2e9a35e456619f9477eefb6aa029390b763f79 Author: Ching-Te Ku Date: Thu Nov 26 10:10:59 2020 +0800 rtw88: coex: add feature to enhance HID coexistence performance Add toggle table related function to enhance WL throughput when WL coexist with 4/18 HID. The toggle table feature will toggle WL/BT priority table during WL slot, it can decrease the impact from HID's frequently packets and prevent HID lag. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201126021059.11981-11-pkshih@realtek.com commit 1a74daed6cef336d4afe482edb1e6cc785c65f7c Author: Ching-Te Ku Date: Thu Nov 26 10:10:58 2020 +0800 rtw88: coex: upgrade coexistence A2DP mechanism Add modifications for A2DP interoperability issue of TWS earphones. Some TWS earphones has low buffer size, so it's necessary to reduce the slot period to let it get data more frequently. (e.g. use 4-slot to replace the original 2-slot method). Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201126021059.11981-10-pkshih@realtek.com commit 79d06b20d00bda8daaefcdc8f8c78fd8a5c9376f Author: Ching-Te Ku Date: Thu Nov 26 10:10:57 2020 +0800 rtw88: coex: add action for coexistence in hardware initial The original setting misses some necessary configuration. Make coexistence slot align to beacon and check the connection situation to know if we need to extend WLAN slot or not. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201126021059.11981-9-pkshih@realtek.com commit 8e6947dcb95d7721ffefff01a988145a4faee938 Author: Ching-Te Ku Date: Thu Nov 26 10:10:56 2020 +0800 rtw88: coex: add function to avoid cck lock Some AP will not follow the power save request, or it cannot stop transmission until its queue is empty. It may bring the decreasing of data rate. WLAN firmware will count is the AP still leaked packet after power save handshake was done or not to enable WLAN slot extend mechanism. The extend WLAN slot mechanism will extend the WLAN slot after power save handshake, 5 ms per times, maximum is 5 times to received the leaked packet to avoid the rate lower down. And if the transmission was already locked at CCK rate. The extended WLAN slot can also increase the opportunity that we can received the CCK's long packet and be released from CCK rate. While BT multi-link status was finished, there is possible that it still has some packet remained for seconds. Add a timer to remain the multi-link mechanism to protect WLAN Rx. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201126021059.11981-8-pkshih@realtek.com commit c404dbd4fbfc8f871158052d8554ae4fb4bcb090 Author: Ching-Te Ku Date: Thu Nov 26 10:10:55 2020 +0800 rtw88: coex: change the coexistence mechanism for WLAN connected Add a flag to make decision whether the mechanism should go into free-run mode or not. For now, it is always false, the flag assignment will be implemented later. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201126021059.11981-7-pkshih@realtek.com commit 6a910a2a7d5def5179b8251374299f9c5a8dc028 Author: Ching-Te Ku Date: Thu Nov 26 10:10:54 2020 +0800 rtw88: coex: change the coexistence mechanism for HID Add TDMA slot type setting for later usage. Since the transmission of HID profile is very frequently, it may bring a big impact to WLAN performance. To change slot type, it can make mechanism be more flexible. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201126021059.11981-6-pkshih@realtek.com commit 4d0087e763a856e537e07e8e8677cc1e902f86f0 Author: Ching-Te Ku Date: Thu Nov 26 10:10:53 2020 +0800 rtw88: coex: update AFH information while in free-run mode In free run mode, this WLAN info updating is only related to AFH information, not related to the connection state, which is the current implementation. Always update WLAN info in free run mode now. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201126021059.11981-5-pkshih@realtek.com commit 76f631cb401fbfb5993c6958a8032db4f87881cb Author: Ching-Te Ku Date: Thu Nov 26 10:10:52 2020 +0800 rtw88: coex: update the mechanism for A2DP + PAN Update A2DP+PAN+WL mechanism for CPT(Coexistence Performance Test) to enhance WL/BT performance at the environment that some specific AP are existing. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201126021059.11981-4-pkshih@realtek.com commit 1a589bd5be9260f59adf34e0a6dc21644f3cf74b Author: Ching-Te Ku Date: Thu Nov 26 10:10:51 2020 +0800 rtw88: coex: add debug message Add message for debugging usage and the program flow is no change. Add a variable reserved for WLAN firmware synchronize. Add a group of variable to save BT packet counter, it will be assigned as mechanism judgment in the future. Now it is just for debug usage. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201126021059.11981-3-pkshih@realtek.com commit 1329c0dbd485a48979c386088166ee2c3e28ddb8 Author: Ching-Te Ku Date: Thu Nov 26 10:10:50 2020 +0800 rtw88: coex: run coexistence when WLAN entering/leaving LPS When WLAN entering or leaving, it's necessary to run coexistence mechanism to ensure the setting matched current status. Without calling rtw_coex_run_coex(), WLAN poor throughput or bad A2DP quality may happen. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201126021059.11981-2-pkshih@realtek.com commit 2c07343abd8932200a45ff7b10950e71081e9e77 Author: Mickaël Salaün Date: Wed Dec 2 17:26:43 2020 +0100 selftests/seccomp: Update kernel config seccomp_bpf.c uses unshare(CLONE_NEWPID), which requires CONFIG_PID_NS to be set. Cc: Kees Cook Cc: Shuah Khan Fixes: 6a21cc50f0c7 ("seccomp: add a return code to trap to userspace") Signed-off-by: Mickaël Salaün Acked-by: Tycho Andersen Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20201202162643.249276-1-mic@digikod.net commit d14ce74f1fb376ccbbc0b05ded477ada51253729 Author: Frederic Weisbecker Date: Wed Dec 2 12:57:32 2020 +0100 irq: Call tick_irq_enter() inside HARDIRQ_OFFSET Now that account_hardirq_enter() is called after HARDIRQ_OFFSET has been incremented, there is nothing left that prevents us from also moving tick_irq_enter() after HARDIRQ_OFFSET is incremented. The desired outcome is to remove the nasty hack that prevents softirqs from being raised through ksoftirqd instead of the hardirq bottom half. Also tick_irq_enter() then becomes appropriately covered by lockdep. Signed-off-by: Frederic Weisbecker Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201202115732.27827-6-frederic@kernel.org commit d3759e7184f8f6187e62f8c4e7dcb1f6c47c075a Author: Frederic Weisbecker Date: Wed Dec 2 12:57:31 2020 +0100 irqtime: Move irqtime entry accounting after irq offset incrementation IRQ time entry is currently accounted before HARDIRQ_OFFSET or SOFTIRQ_OFFSET are incremented. This is convenient to decide to which index the cputime to account is dispatched. Unfortunately it prevents tick_irq_enter() from being called under HARDIRQ_OFFSET because tick_irq_enter() has to be called before the IRQ entry accounting due to the necessary clock catch up. As a result we don't benefit from appropriate lockdep coverage on tick_irq_enter(). To prepare for fixing this, move the IRQ entry cputime accounting after the preempt offset is incremented. This requires the cputime dispatch code to handle the extra offset. Signed-off-by: Frederic Weisbecker Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20201202115732.27827-5-frederic@kernel.org commit 8a6a5920d3286eb0eae9f36a4ec4fc9df511eccb Author: Frederic Weisbecker Date: Wed Dec 2 12:57:30 2020 +0100 sched/vtime: Consolidate IRQ time accounting The 3 architectures implementing CONFIG_VIRT_CPU_ACCOUNTING_NATIVE all have their own version of irq time accounting that dispatch the cputime to the appropriate index: hardirq, softirq, system, idle, guest... from an all-in-one function. Instead of having these ad-hoc versions, move the cputime destination dispatch decision to the core code and leave only the actual per-index cputime accounting to the architecture. Signed-off-by: Frederic Weisbecker Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201202115732.27827-4-frederic@kernel.org commit 2b91ec9f551b56751cde48792f1c0a1130358844 Author: Frederic Weisbecker Date: Wed Dec 2 12:57:29 2020 +0100 s390/vtime: Use the generic IRQ entry accounting s390 has its own version of IRQ entry accounting because it doesn't account the idle time the same way the other architectures do. Only the actual idle sleep time is accounted as idle time, the rest of the idle task execution is accounted as system time. Make the generic IRQ entry accounting aware of architectures that have their own way of accounting idle time and convert s390 to use it. This prepares s390 to get involved in further consolidations of IRQ time accounting. Signed-off-by: Frederic Weisbecker Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201202115732.27827-3-frederic@kernel.org commit 7197688b2006357da75a014e0a76be89ca9c2d46 Author: Frederic Weisbecker Date: Wed Dec 2 12:57:28 2020 +0100 sched/cputime: Remove symbol exports from IRQ time accounting account_irq_enter_time() and account_irq_exit_time() are not called from modules. EXPORT_SYMBOL_GPL() can be safely removed from the IRQ cputime accounting functions called from there. Signed-off-by: Frederic Weisbecker Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201202115732.27827-2-frederic@kernel.org commit e220332c3a1a26c3f2adc58984fb627728c2f8d2 Author: Tokunori Ikegami Date: Sat Nov 21 09:34:11 2020 +0900 Revert "rtl8xxxu: Add Buffalo WI-U3-866D to list of supported devices" This reverts commit 28606150768a20b291a35dbbbb0ab4dd7d4739db. Since actually Buffalo WI-U3-866D is falied to power on with the change. The rtl8812au driver code to power on is same with the rtl8821a code. But the rtl8821ae included rtl8821a does not support USB interface. So seems that rtl8812au should be supported by rt1l8821a code with USB. Signed-off-by: Tokunori Ikegami Cc: linux-wireless@vger.kernel.org Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201121003411.9450-1-ikegami.t@gmail.com commit bf701b765eaa82dd164d65edc5747ec7288bb5c3 Author: NeilBrown Date: Fri Nov 27 11:24:33 2020 +1100 NFS: switch nfsiod to be an UNBOUND workqueue. nfsiod is currently a concurrency-managed workqueue (CMWQ). This means that workitems scheduled to nfsiod on a given CPU are queued behind all other work items queued on any CMWQ on the same CPU. This can introduce unexpected latency. Occaionally nfsiod can even cause excessive latency. If the work item to complete a CLOSE request calls the final iput() on an inode, the address_space of that inode will be dismantled. This takes time proportional to the number of in-memory pages, which on a large host working on large files (e.g.. 5TB), can be a large number of pages resulting in a noticable number of seconds. We can avoid these latency problems by switching nfsiod to WQ_UNBOUND. This causes each concurrent work item to gets a dedicated thread which can be scheduled to an idle CPU. There is precedent for this as several other filesystems use WQ_UNBOUND workqueue for handling various async events. Signed-off-by: NeilBrown Fixes: ada609ee2ac2 ("workqueue: use WQ_MEM_RECLAIM instead of WQ_RESCUER") Signed-off-by: Trond Myklebust commit 9b82d88d5976e5f2b8015d58913654856576ace5 Author: Calum Mackay Date: Wed Oct 28 20:16:27 2020 +0000 lockd: don't use interval-based rebinding over TCP NLM uses an interval-based rebinding, i.e. it clears the transport's binding under certain conditions if more than 60 seconds have elapsed since the connection was last bound. This rebinding is not necessary for an autobind RPC client over a connection-oriented protocol like TCP. It can also cause problems: it is possible for nlm_bind_host() to clear XPRT_BOUND whilst a connection worker is in the middle of trying to reconnect, after it had already been checked in xprt_connect(). When the connection worker notices that XPRT_BOUND has been cleared under it, in xs_tcp_finish_connecting(), that results in: xs_tcp_setup_socket: connect returned unhandled error -107 Worse, it's possible that the two can get into lockstep, resulting in the same behaviour repeated indefinitely, with the above error every 300 seconds, without ever recovering, and the connection never being established. This has been seen in practice, with a large number of NLM client tasks, following a server restart. The existing callers of nlm_bind_host & nlm_rebind_host should not need to force the rebind, for TCP, so restrict the interval-based rebinding to UDP only. For TCP, we will still rebind when needed, e.g. on timeout, and connection error (including closure), since connection-related errors on an existing connection, ECONNREFUSED when trying to connect, and rpc_check_timeout(), already unconditionally clear XPRT_BOUND. To avoid having to add the fix, and explanation, to both nlm_bind_host() and nlm_rebind_host(), remove the duplicate code from the former, and have it call the latter. Drop the dprintk, which adds no value over a trace. Signed-off-by: Calum Mackay Fixes: 35f5a422ce1a ("SUNRPC: new interface to force an RPC rebind") Signed-off-by: Trond Myklebust commit 35a6d396721e28ba161595b0fc9e8896c00399bb Author: Fedor Tokarev Date: Thu Oct 15 16:59:08 2020 +0300 net: sunrpc: Fix 'snprintf' return value check in 'do_xprt_debugfs' 'snprintf' returns the number of characters which would have been written if enough space had been available, excluding the terminating null byte. Thus, the return value of 'sizeof(buf)' means that the last character has been dropped. Signed-off-by: Fedor Tokarev Fixes: 2f34b8bfae19 ("SUNRPC: add links for all client xprts to debugfs") Signed-off-by: Trond Myklebust commit d3ff46fe693683cb9660e9b93e8c932cc8e0c1f8 Author: Sargun Dhillon Date: Thu Nov 12 02:09:52 2020 -0800 NFSv4: Refactor to use user namespaces for nfs4idmap In several patches work has been done to enable NFSv4 to use user namespaces: 58002399da65: NFSv4: Convert the NFS client idmapper to use the container user namespace 3b7eb5e35d0f: NFS: When mounting, don't share filesystems between different user namespaces Unfortunately, the userspace APIs were only such that the userspace facing side of the filesystem (superblock s_user_ns) could be set to a non init user namespace. This furthers the fs_context related refactoring, and piggybacks on top of that logic, so the superblock user namespace, and the NFS user namespace are the same. Users can still use rpc.idmapd if they choose to, but there are complexities with user namespaces and request-key that have yet to be addresssed. Eventually, we will need to at least: * Come up with an upcall mechanism that can be triggered inside of the container, or safely triggered outside, with the requisite context to do the right mapping. * Handle whatever refactoring needs to be done in net/sunrpc. Signed-off-by: Sargun Dhillon Tested-by: Alban Crequy Fixes: 62a55d088cd8 ("NFS: Additional refactoring for fs_context conversion") Signed-off-by: Trond Myklebust commit d18a9d3fa0f27a47706fb67f1ee0f4d971587c4e Author: Sargun Dhillon Date: Thu Nov 12 02:09:51 2020 -0800 NFS: NFSv2/NFSv3: Use cred from fs_context during mount There was refactoring done to use the fs_context for mounting done in: 62a55d088cd87: NFS: Additional refactoring for fs_context conversion This made it so that the net_ns is fetched from the fs_context (the netns that fsopen is called in). This change also makes it so that the credential fetched during fsopen is used as well as the net_ns. NFS has already had a number of changes to prepare it for user namespaces: 1a58e8a0e5c1: NFS: Store the credential of the mount process in the nfs_server 264d948ce7d0: NFS: Convert NFSv3 to use the container user namespace c207db2f5da5: NFS: Convert NFSv2 to use the container user namespace Previously, different credentials could be used for creation of the fs_context versus creation of the nfs_server, as FSCONFIG_CMD_CREATE did the actual credential check, and that's where current_creds() were fetched. This meant that the user namespace which fsopen was called in could be a non-init user namespace. This still requires that the user that calls FSCONFIG_CMD_CREATE has CAP_SYS_ADMIN in the init user ns. This roughly allows a privileged user to mount on behalf of an unprivileged usernamespace, by forking off and calling fsopen in the unprivileged user namespace. It can then pass back that fsfd to the privileged process which can configure the NFS mount, and then it can call FSCONFIG_CMD_CREATE before switching back into the mount namespace of the container, and finish up the mounting process and call fsmount and move_mount. Signed-off-by: Sargun Dhillon Tested-by: Alban Crequy Fixes: 62a55d088cd8 ("NFS: Additional refactoring for fs_context conversion") Signed-off-by: Trond Myklebust commit b6d49ecd1081740b6e632366428b960461f8158b Author: Trond Myklebust Date: Wed Nov 25 12:06:14 2020 -0500 NFSv4: Fix a pNFS layout related use-after-free race when freeing the inode When returning the layout in nfs4_evict_inode(), we need to ensure that the layout is actually done being freed before we can proceed to free the inode itself. Signed-off-by: Trond Myklebust commit 17068466ad02d3ec07ab1b8f3f97928598affc9a Author: Trond Myklebust Date: Sat Nov 21 21:41:08 2020 -0500 NFSv4: Fix open coded xdr_stream_remaining() Signed-off-by: Trond Myklebust commit eee1f54964fe868da425fe52a03666377335de01 Author: Trond Myklebust Date: Sat Nov 21 21:39:02 2020 -0500 SUNRPC: Fix open coded xdr_stream_remaining() Signed-off-by: Trond Myklebust commit 0279024f22705128c7139bd55af6981afe90e876 Author: Trond Myklebust Date: Sat Nov 21 21:21:11 2020 -0500 SUNRPC: Fix up xdr_set_page() While we always want to align to the next page and/or the beginning of the tail buffer when we call xdr_set_next_page(), the functions xdr_align_data() and xdr_expand_hole() really want to align to the next object in that next page or tail. Signed-off-by: Trond Myklebust commit 9ed5af268e88f6e5b65376be98d652b37cb20d7b Author: Trond Myklebust Date: Sat Nov 21 20:46:18 2020 -0500 SUNRPC: Clean up the handling of page padding in rpc_prepare_reply_pages() rpc_prepare_reply_pages() currently expects the 'hdrsize' argument to contain the length of the data that we expect to want placed in the head kvec plus a count of 1 word of padding that is placed after the page data. This is very confusing when trying to read the code, and sometimes leads to callers adding an arbitrary value of '1' just in order to satisfy the requirement (whether or not the page data actually needs such padding). This patch aims to clarify the code by changing the 'hdrsize' argument to remove that 1 word of padding. This means we need to subtract the padding from all the existing callers. Fixes: 02ef04e432ba ("NFS: Account for XDR pad of buf->pages") Signed-off-by: Trond Myklebust commit 1d97316692f708de755655ac1cfd704d7a55843f Author: Trond Myklebust Date: Fri Nov 20 16:31:03 2020 -0500 SUNRPC: Fix up xdr_read_pages() to take arbitrary object lengths Fix up xdr_read_pages() so that it can handle object lengths that are larger than the page length, by simply aligning to the next object in the buffer tail. The function will continue to return the length of the truncate object data that actually fit into the pages. Signed-off-by: Trond Myklebust commit 8d86e373b0ef52d091ced9583ffbb33ad2771576 Author: Trond Myklebust Date: Sat Nov 21 14:50:43 2020 -0500 SUNRPC: Clean up helpers xdr_set_iov() and xdr_set_page_base() Allow xdr_set_iov() to set a base so that we can use it to set the cursor to a specific position in the kvec buffer. If the new base overflows the kvec/pages buffer in either xdr_set_iov() or xdr_set_page_base(), then truncate it so that we point to the end of the buffer. Finally, change both function to return the number of bytes remaining to read in their buffers. Signed-off-by: Trond Myklebust commit 2b1f83d108bd35d12d8a833298d2a033f9121aac Author: Trond Myklebust Date: Sat Nov 21 14:01:50 2020 -0500 SUNRPC: Fix up typo in xdr_init_decode() We already know that the head buffer and page are empty, so if there is any data, it is in the tail. Signed-off-by: Trond Myklebust commit 046e5ccb4198b990190e11fb52fd9cfd264402eb Author: Trond Myklebust Date: Fri Nov 13 21:42:16 2020 -0500 NFSv4: Fix the alignment of page data in the getdeviceinfo reply We can fit the device_addr4 opaque data padding in the pages. Fixes: cf500bac8fd4 ("SUNRPC: Introduce rpc_prepare_reply_pages()") Signed-off-by: Trond Myklebust commit 988998134996a397a47cf758627def5f20dc1e88 Author: Trond Myklebust Date: Mon Nov 9 16:06:15 2020 -0500 pNFS: Clean up open coded xdr string decoding Use the existing xdr_stream_decode_string_dup() to safely decode into kmalloced strings. Signed-off-by: Trond Myklebust commit 4aceaaea5eccd32bc40c6c76b262489b2f53ca8d Author: Trond Myklebust Date: Tue Nov 10 10:56:53 2020 -0500 SUNRPC: Fix up open coded kmemdup_nul() Signed-off-by: Trond Myklebust commit 9a7016319e1e7c6348a960931182f5f71b95f24e Author: Trond Myklebust Date: Mon Nov 9 15:42:03 2020 -0500 pNFS/flexfiles: Fix up layoutstats reporting for non-TCP transports Ensure that we report the correct netid when using UDP or RDMA transports to the DSes. Signed-off-by: Trond Myklebust commit 4be78d26810bc506769773ca2f81b4de65f43fd5 Author: Trond Myklebust Date: Fri Nov 6 16:10:52 2020 -0500 NFSv4/pNFS: Store the transport type in struct nfs4_pnfs_ds_addr We want to enable RDMA and UDP as valid transport methods if a GETDEVICEINFO call specifies it. Do so by adding a parser for the netid that translates it to an appropriate argument for the RPC transport layer. Signed-off-by: Trond Myklebust commit 190c75a31fe65e311f3628bd97bd58cff50d221f Author: Trond Myklebust Date: Tue Nov 10 09:21:48 2020 -0500 pNFS: Add helpers for allocation/free of struct nfs4_pnfs_ds_addr Signed-off-by: Trond Myklebust commit a12f996d3413ae41b6c0952013cd7a11396e14eb Author: Trond Myklebust Date: Fri Nov 6 16:58:53 2020 -0500 NFSv4/pNFS: Use connections to a DS that are all of the same protocol family If the pNFS metadata server advertises multiple addresses for the same data server, we should try to connect to just one protocol family and transport type on the assumption that homogeneity will improve performance. Signed-off-by: Trond Myklebust commit c87b056e58e71ba7a3f603700618f8da9742aa29 Author: Trond Myklebust Date: Tue Nov 10 10:32:14 2020 -0500 SUNRPC: Remove unused function xprt_load_transport() Signed-off-by: Trond Myklebust commit 1c3695d0bb3869fedcde4538d831003519576ece Author: Trond Myklebust Date: Tue Nov 10 10:30:35 2020 -0500 NFS: Switch mount code to use xprt_find_transport_ident() Switch the mount code to use xprt_find_transport_ident() and to check the results before allowing the mount to proceed. Signed-off-by: Trond Myklebust commit 1fc5f13186440973e1aa1d85aa263326756af431 Author: Trond Myklebust Date: Tue Nov 10 09:41:21 2020 -0500 SUNRPC: Add a helper to return the transport identifier given a netid Signed-off-by: Trond Myklebust commit 9bccd264611b5345d85138dc7fd55bdeb9e6942e Author: Trond Myklebust Date: Tue Nov 10 12:58:22 2020 -0500 SUNRPC: Close a race with transport setup and module put After we've looked up the transport module, we need to ensure it can't go away until we've finished running the transport setup code. Signed-off-by: Trond Myklebust commit d5aa6b22e2258f05317313ecc02efbb988ed6d38 Author: Trond Myklebust Date: Fri Nov 6 16:33:38 2020 -0500 SUNRPC: xprt_load_transport() needs to support the netid "rdma6" According to RFC5666, the correct netid for an IPv6 addressed RDMA transport is "rdma6", which we've supported as a mount option since Linux-4.7. The problem is when we try to load the module "xprtrdma6", that will fail, since there is no modulealias of that name. Fixes: 181342c5ebe8 ("xprtrdma: Add rdma6 option to support NFS/RDMA IPv6") Signed-off-by: Trond Myklebust commit 794092c57f89c2c833da00f82f38a0afcb4033bc Author: Trond Myklebust Date: Fri Nov 6 20:47:05 2020 -0500 NFS: Do uncached readdir when we're seeking a cookie in an empty page cache If the directory is changing, causing the page cache to get invalidated while we are listing the contents, then the NFS client is currently forced to read in the entire directory contents from scratch, because it needs to perform a linear search for the readdir cookie. While this is not an issue for small directories, it does not scale to directories with millions of entries. In order to be able to deal with large directories that are changing, add a heuristic to ensure that if the page cache is empty, and we are searching for a cookie that is not the zero cookie, we just default to performing uncached readdir. Signed-off-by: Trond Myklebust Reviewed-by: Benjamin Coddington Tested-by: Benjamin Coddington Tested-by: Dave Wysochanski commit 35df59d3ef693292840a61cdb04b39d8c9412f4e Author: Trond Myklebust Date: Fri Nov 6 20:38:47 2020 -0500 NFS: Reduce number of RPC calls when doing uncached readdir If we're doing uncached readdir, allocate multiple pages in order to try to avoid duplicate RPC calls for the same getdents() call. Signed-off-by: Trond Myklebust Reviewed-by: Benjamin Coddington Tested-by: Benjamin Coddington Tested-by: Dave Wysochanski commit 762567b7c798afd08c22811ecfc66885a2b50f91 Author: Trond Myklebust Date: Wed Nov 4 08:32:19 2020 -0500 NFS: Optimisations for monotonically increasing readdir cookies If the server is handing out monotonically increasing readdir cookie values, then we can optimise away searches through pages that contain cookies that lie outside our search range. Signed-off-by: Trond Myklebust Reviewed-by: Benjamin Coddington Tested-by: Benjamin Coddington Tested-by: Dave Wysochanski commit b593c09f83a2732a0f0298c8f3468236a83cdd9f Author: Trond Myklebust Date: Mon Nov 2 20:06:12 2020 -0500 NFS: Improve handling of directory verifiers If the server insists on using the readdir verifiers in order to allow cookies to expire, then we should ensure that we cache the verifier with the cookie, so that we can return an error if the application tries to use the expired cookie. Signed-off-by: Trond Myklebust Reviewed-by: Benjamin Coddington Tested-by: Benjamin Coddington Tested-by: Dave Wysochanski commit 9fff59ed4c4d239125f8529a9971c46defd2e2b0 Author: Trond Myklebust Date: Mon Nov 2 20:11:32 2020 -0500 NFS: Handle NFS4ERR_NOT_SAME and NFSERR_BADCOOKIE from readdir calls If the server returns NFS4ERR_NOT_SAME or tells us that the cookie is bad in response to a READDIR call, then we should empty the page cache so that we can fill it from scratch again. Signed-off-by: Trond Myklebust Reviewed-by: Benjamin Coddington Tested-by: Benjamin Coddington Tested-by: Dave Wysochanski commit 82e22a5e6245873779db1607d3b0fec6f9ca07d0 Author: Trond Myklebust Date: Mon Nov 2 17:34:23 2020 -0500 NFS: Allow the NFS generic code to pass in a verifier to readdir If we're ever going to allow support for servers that use the readdir verifier, then that use needs to be managed by the middle layers as those need to be able to reject cookies from other verifiers. Signed-off-by: Trond Myklebust Reviewed-by: Benjamin Coddington Tested-by: Benjamin Coddington Tested-by: Dave Wysochanski commit 6c981eff23b894ce429281dc45a5589359eef2c1 Author: Trond Myklebust Date: Tue Nov 3 07:42:04 2020 -0500 NFS: Cleanup to remove nfs_readdir_descriptor_t typedef Signed-off-by: Trond Myklebust Reviewed-by: Benjamin Coddington Tested-by: Benjamin Coddington Tested-by: Dave Wysochanski commit 6b75cf9e309d18664f964889ac026096ba0d1919 Author: Trond Myklebust Date: Mon Nov 2 08:55:03 2020 -0500 NFS: Reduce readdir stack usage The descriptor and the struct nfs_entry are both large structures, so don't allocate them from the stack. Signed-off-by: Trond Myklebust Reviewed-by: Benjamin Coddington Tested-by: Benjamin Coddington Tested-by: Dave Wysochanski commit dbeaf8c984ca689c2c0966c41bd78dee178b5dfe Author: Trond Myklebust Date: Sun Nov 1 18:20:03 2020 -0500 NFS: nfs_do_filldir() does not return a value Clean up nfs_do_filldir(). Signed-off-by: Trond Myklebust Reviewed-by: Benjamin Coddington Tested-by: Benjamin Coddington Tested-by: Dave Wysochanski commit 93b8959a0a8cf1b1a493efee9e8328681e111862 Author: Trond Myklebust Date: Sun Nov 1 15:24:41 2020 -0500 NFS: More readdir cleanups Remove the redundant caching of the credential in struct nfs_open_dir_context. Pass the buffer size as an argument to nfs_readdir_xdr_filler(). Signed-off-by: Trond Myklebust Reviewed-by: Benjamin Coddington Tested-by: Benjamin Coddington Tested-by: Dave Wysochanski commit 1a34c8c9a49ee10ccaf91091ddd98c25e4d567dd Author: Trond Myklebust Date: Sun Nov 1 14:26:47 2020 -0500 NFS: Support larger readdir buffers Support readdir buffers of up to 1MB in size so that we can read large directories using few RPC calls. Signed-off-by: Trond Myklebust Reviewed-by: Benjamin Coddington Tested-by: Benjamin Coddington Tested-by: Dave Wysochanski commit a52a8a6adad99e1162c27f70cd6495626a48064d Author: Trond Myklebust Date: Sun Nov 1 19:17:29 2020 -0500 NFS: Simplify struct nfs_cache_array_entry We don't need to store a hash, so replace struct qstr with a simple const char pointer and length. Signed-off-by: Trond Myklebust Reviewed-by: Benjamin Coddington Tested-by: Benjamin Coddington Tested-by: Dave Wysochanski commit ed09222d651dbd30e707f96180628229146b885c Author: Trond Myklebust Date: Sun Nov 1 13:34:32 2020 -0500 NFS: Replace kmap() with kmap_atomic() in nfs_readdir_search_array() Signed-off-by: Trond Myklebust Reviewed-by: Benjamin Coddington Tested-by: Benjamin Coddington Tested-by: Dave Wysochanski commit e762a639816015a70bb1af8ea4baf54f4facb591 Author: Trond Myklebust Date: Sun Nov 1 13:31:20 2020 -0500 NFS: Remove unnecessary kmap in nfs_readdir_xdr_to_array() The kmapped pointer is only used once per loop to check if we need to exit. Signed-off-by: Trond Myklebust Reviewed-by: Benjamin Coddington Tested-by: Benjamin Coddington Tested-by: Dave Wysochanski commit 3b2a09f127e025674945e82c1ec0c88d6740280e Author: Trond Myklebust Date: Sun Nov 1 13:14:10 2020 -0500 NFS: Don't discard readdir results If a readdir call returns more data than we can fit into one page cache page, then allocate a new one for that data rather than discarding the data. Signed-off-by: Trond Myklebust Reviewed-by: Benjamin Coddington Tested-by: Benjamin Coddington Tested-by: Dave Wysochanski commit 1f1d4aa4e4bcb4721d3c51f4c07dda790b6accd9 Author: Trond Myklebust Date: Sun Nov 1 12:34:43 2020 -0500 NFS: Clean up directory array handling Refactor to use pagecache_get_page() so that we can fill the page in multiple stages. Signed-off-by: Trond Myklebust Reviewed-by: Benjamin Coddington Tested-by: Benjamin Coddington Tested-by: Dave Wysochanski commit 972bcdf233096d36b2f3e02f34a80d0f073b6b05 Author: Trond Myklebust Date: Sun Nov 1 17:15:43 2020 -0500 NFS: Clean up nfs_readdir_page_filler() Clean up handling of the case where there are no entries in the readdir reply. Signed-off-by: Trond Myklebust Reviewed-by: Benjamin Coddington Tested-by: Benjamin Coddington Tested-by: Dave Wysochanski commit b1e21c97437f64d0a00f8fea1f9e64e77e0e4242 Author: Trond Myklebust Date: Sun Nov 1 13:45:55 2020 -0500 NFS: Clean up readdir struct nfs_cache_array Since the 'eof_index' is only ever used as a flag, make it so. Also add a flag to detect if the page has been completely filled. Signed-off-by: Trond Myklebust Reviewed-by: Benjamin Coddington Tested-by: Benjamin Coddington Tested-by: Dave Wysochanski commit 2e7a46417952ae480cb5091ed5ade73078630b40 Author: Trond Myklebust Date: Sun Nov 1 09:56:18 2020 -0500 NFS: Ensure contents of struct nfs_open_dir_context are consistent Ensure that the contents of struct nfs_open_dir_context are consistent by setting them under the file->f_lock from a private copy (that is known to be consistent). Signed-off-by: Trond Myklebust Reviewed-by: Benjamin Coddington Tested-by: Benjamin Coddington Tested-by: Dave Wysochanski commit 05ad917561fca39a03338cb21fe9622f998b0f9c Author: Olga Kornievskaia Date: Fri Nov 6 16:03:38 2020 -0500 NFSv4.2: condition READDIR's mask for security label based on LSM state Currently, the client will always ask for security_labels if the server returns that it supports that feature regardless of any LSM modules (such as Selinux) enforcing security policy. This adds performance penalty to the READDIR operation. Client adjusts superblock's support of the security_label based on the server's support but also current client's configuration of the LSM modules. Thus, prior to using the default bitmask in READDIR, this patch checks the server's capabilities and then instructs READDIR to remove FATTR4_WORD2_SECURITY_LABEL from the bitmask. v5: fixing silly mistakes of the rushed v4 v4: simplifying logic v3: changing label's initialization per Ondrej's comment v2: dropping selinux hook and using the sb cap. Suggested-by: Ondrej Mosnacek Suggested-by: Scott Mayhew Signed-off-by: Olga Kornievskaia Fixes: 2b0143b5c986 ("VFS: normal filesystems (and lustre): d_inode() annotations") Signed-off-by: Trond Myklebust commit e4c72201b6ec3173dfe13fa2e2335a3ad78d4921 Author: Trond Myklebust Date: Thu Oct 22 17:40:33 2020 -0400 SUNRPC: rpc_wake_up() should wake up tasks in the correct order Currently, we wake up the tasks by priority queue ordering, which means that we ignore the batching that is supposed to help with QoS issues. Fixes: c049f8ea9a0d ("SUNRPC: Remove the bh-safe lock requirement on the rpc_wait_queue->lock") Signed-off-by: Trond Myklebust commit 76998ebb91582812540f591f9e148daa0f08c76d Author: Trond Myklebust Date: Tue Oct 20 14:30:35 2020 -0400 NFSv4: Observe the NFS_MOUNT_SOFTREVAL flag in _nfs4_proc_lookupp We need to respect the NFS_MOUNT_SOFTREVAL flag in _nfs4_proc_lookupp, by timing out if the server is unavailable. Signed-off-by: Trond Myklebust commit 3c5e9a59faa6b1bb3110b961e695502c7ee8699b Author: Trond Myklebust Date: Mon Oct 19 12:45:53 2020 -0400 NFSv3: Add emulation of the lookupp() operation In order to use the open_by_filehandle() operations on NFSv3, we need to be able to emulate lookupp() so that nfs_get_parent() can be used to convert disconnected dentries into connected ones. Signed-off-by: Trond Myklebust commit 5f447cb88123857d69f0c1a665356688037c6ad3 Author: Trond Myklebust Date: Mon Oct 19 12:40:59 2020 -0400 NFSv3: Refactor nfs3_proc_lookup() to split out the dentry We want to reuse the lookup code in NFSv3 in order to emulate the NFSv4 lookupp operation. Signed-off-by: Trond Myklebust commit bd75475c2fa161acec0017e030f6e8c01cb0d107 Author: Dai Ngo Date: Mon Nov 23 22:15:17 2020 -0500 NFSv4.2: Fix 5 seconds delay when doing inter server copy Since commit b4868b44c5628 ("NFSv4: Wait for stateid updates after CLOSE/OPEN_DOWNGRADE"), every inter server copy operation suffers 5 seconds delay regardless of the size of the copy. The delay is from nfs_set_open_stateid_locked when the check by nfs_stateid_is_sequential fails because the seqid in both nfs4_state and nfs4_stateid are 0. Fix __nfs42_ssc_open to delay setting of NFS_OPEN_STATE in nfs4_state, until after the call to update_open_stateid, to indicate this is the 1st open. This fix is part of a 2 patches, the other patch is the fix in the source server to return the stateid for COPY_NOTIFY request with seqid 1 instead of 0. Fixes: ce0887ac96d3 ("NFSD add nfs4 inter ssc to nfsd4_copy") Signed-off-by: Dai Ngo Signed-off-by: Anna Schumaker commit cd6181ff7e93808fbb7b6330e3ee8bc8d722a9ba Author: Kalle Valo Date: Tue Nov 24 17:59:20 2020 +0200 ath11k: dp_rx: fix monitor status dma unmap direction After enabling CONFIG_DMA_API_DEBUG there was a warning about using dma_unmap_single() in wrong direction from ath11k_dp_rx_process_mon_status(). [ 140.279477] ------------[ cut here ]------------ [ 140.279908] DMA-API: ath11k_pci 0000:06:00.0: device driver syncs DMA memory with different direction [device address=0x00000000fac08a40] [size=2176 bytes] [mapped with DMA_FROM_DEVICE] [s [ 140.279925] WARNING: CPU: 7 PID: 97 at kernel/dma/debug.c:1120 check_sync+0x494/0x730 [ 140.279939] Modules linked in: ath11k_pci ath11k mac80211 libarc4 cfg80211 qmi_helpers qrtr_mhi mhi qrtr ns nvme nvme_core [ 140.279958] CPU: 7 PID: 97 Comm: kworker/u16:1 Not tainted 5.10.0-rc4+ #262 [ 140.279968] Hardware name: Intel(R) Client Systems NUC8i7HVK/NUC8i7HVB, BIOS HNKBLi70.86A.0049.2018.0801.1601 08/01/2018 [ 140.279995] Workqueue: phy0 ieee80211_scan_work [mac80211] [ 140.280009] RIP: 0010:check_sync+0x494/0x730 [ 140.280022] Code: 8b 4c 24 10 4c 8b 44 24 18 4c 8b 54 24 20 48 89 c6 4c 89 54 24 10 4c 89 f9 4c 89 ea 48 c7 c7 40 b9 74 9c 41 56 e8 2f a0 ab 00 <0f> 0b 48 89 ef e8 e5 17 ac 00 41 58 4c 8b [ 140.280033] RSP: 0018:ffff9f588024cbd8 EFLAGS: 00010086 [ 140.280046] RAX: 0000000000000000 RBX: ffff9f588024cc40 RCX: ffff8eed18dd9f98 [ 140.280057] RDX: 00000000ffffffd8 RSI: 0000000000000027 RDI: ffff8eed18dd9f90 [ 140.280067] RBP: ffff8eebc1407800 R08: 00000000ffffffea R09: 0000000000000000 [ 140.280082] R10: 0000000000000003 R11: 3fffffffffffffff R12: ffffffff9e081060 [ 140.280093] R13: ffff8eebc43908b0 R14: ffffffff9c74c104 R15: 00000000fac08a40 [ 140.280104] FS: 0000000000000000(0000) GS:ffff8eed18c00000(0000) knlGS:0000000000000000 [ 140.280115] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 140.280127] CR2: 00007f6feafb12a0 CR3: 00000001604ca001 CR4: 00000000003706e0 [ 140.280138] Call Trace: [ 140.280149] [ 140.280161] debug_dma_sync_single_for_cpu+0x79/0x80 [ 140.280173] ? mark_held_locks+0x50/0x80 [ 140.280185] ? lockdep_hardirqs_on_prepare.part.0+0x65/0x130 [ 140.280197] ? __local_bh_enable_ip+0x6f/0xb0 [ 140.280215] ? ath11k_dp_rx_reap_mon_status_ring+0x202/0x340 [ath11k] [ 140.280231] ath11k_dp_rx_reap_mon_status_ring+0x22c/0x340 [ath11k] [ 140.280249] ? ath11k_dp_rx_process_mon_rings+0x1a0/0x1a0 [ath11k] [ 140.280265] ath11k_dp_rx_process_mon_status+0x83/0x3c0 [ath11k] [ 140.280278] ? __lock_acquire+0x3bd/0x6d0 [ 140.280296] ? ath11k_dp_rx_process_mon_rings+0x1a0/0x1a0 [ath11k] [ 140.280311] ? ath11k_dp_rx_process_mon_rings+0x1a0/0x1a0 [ath11k] [ 140.280326] ? ath11k_hw_mac_id_to_srng_id_qca6390+0x10/0x10 [ath11k] [ 140.280341] ? ath11k_dp_rx_process_mon_rings+0x4a/0x1a0 [ath11k] [ 140.280353] ? timer_fixup_init+0x30/0x30 [ 140.280367] ? ath11k_dp_rx_process_mon_rings+0x1a0/0x1a0 [ath11k] [ 140.280385] ath11k_dp_service_mon_ring+0x2b/0x50 [ath11k] [ 140.280400] ? ath11k_dp_rx_process_mon_rings+0x1a0/0x1a0 [ath11k] [ 140.280413] call_timer_fn+0xb1/0x2d0 [ 140.280426] __run_timers.part.0+0x205/0x2f0 [ 140.280439] run_timer_softirq+0x21/0x50 [ 140.280450] __do_softirq+0xc2/0x454 [ 140.280463] asm_call_irq_on_stack+0x12/0x20 [ 140.280476] [ 140.280488] do_softirq_own_stack+0x56/0x60 [ 140.280500] irq_exit_rcu+0x9a/0xd0 [ 140.280511] sysvec_apic_timer_interrupt+0x43/0xa0 [ 140.280526] asm_sysvec_apic_timer_interrupt+0x12/0x20 [ 140.280540] RIP: 0010:_raw_spin_unlock_irqrestore+0x25/0x40 [ 140.280551] Code: 80 00 00 00 00 55 48 89 fd 48 83 c7 18 53 48 89 f3 48 8b 74 24 10 e8 ca 8f 4b ff 48 89 ef e8 22 dc 4b ff f6 c7 02 75 0c 53 9d <65> ff 0d 04 51 20 64 5b 5d c3 e8 9c 08 56 [ 140.280563] RSP: 0018:ffff9f58802e7878 EFLAGS: 00000246 [ 140.280578] RAX: 00000000000435ef RBX: 0000000000000246 RCX: 0000000000000040 [ 140.280592] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff9be13e84 [ 140.280603] RBP: ffff8eed18dde480 R08: 0000000000000001 R09: ffff8eebc2292760 [ 140.280614] R10: 0000000000000005 R11: ffff8eebc2292760 R12: 0000000000000000 [ 140.280625] R13: ffff9f58802e7900 R14: ffff8eed18dde480 R15: ffff8eed18dde480 [ 140.280637] ? _raw_spin_unlock_irqrestore+0x34/0x40 [ 140.280649] __mod_timer+0x274/0x400 [ 140.280661] ? wait_for_completion_timeout+0x76/0x110 [ 140.280675] schedule_timeout+0xa8/0x140 [ 140.280687] ? __next_timer_interrupt+0x100/0x100 [ 140.280698] wait_for_completion_timeout+0xa2/0x110 [ 140.280714] ath11k_start_scan+0x4c/0xf0 [ath11k] [ 140.280730] ath11k_mac_op_hw_scan+0x1e9/0x2c0 [ath11k] [ 140.280763] drv_hw_scan+0x79/0x260 [mac80211] [ 140.280789] __ieee80211_scan_completed+0x379/0x440 [mac80211] [ 140.280816] ieee80211_scan_work+0x12f/0x330 [mac80211] [ 140.280830] process_one_work+0x279/0x5b0 [ 140.280842] worker_thread+0x49/0x300 [ 140.280854] ? process_one_work+0x5b0/0x5b0 [ 140.280868] kthread+0x135/0x150 [ 140.280880] ? __kthread_bind_mask+0x60/0x60 [ 140.280891] ret_from_fork+0x22/0x30 [ 140.280903] irq event stamp: 275961 [ 140.280918] hardirqs last enabled at (275960): [] __local_bh_enable_ip+0x6f/0xb0 [ 140.280931] hardirqs last disabled at (275961): [] _raw_spin_lock_irqsave+0x63/0x80 [ 140.280946] softirqs last enabled at (275944): [] ath11k_ce_send+0x14d/0x260 [ath11k] [ 140.280958] softirqs last disabled at (275953): [] asm_call_irq_on_stack+0x12/0x20 [ 140.280971] ---[ end trace 31cb94e18d401398 ]--- Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1606156046-24764-1-git-send-email-kvalo@codeaurora.org commit 9bc3a55f4ae5c1c32b4b0b028b423833f1565c62 Author: Bryan O'Donoghue Date: Tue Nov 24 17:59:19 2020 +0200 wcn36xx: Send NULL data packet when exiting BMPS This commit updates the BMPS exit path to be consistent with downstream in terms of exiting BMPS mode. Downstream sets the flag to send a NULL data frame to the host on exiting BMPS. This will tell the AP to send any queued frames to the STA immediately. Verified the relevant bit toggle in wireshark. Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201120021403.2646574-2-bryan.odonoghue@linaro.org commit ad37a46e8cb5e108ddb564ca431d05c4ba7cf052 Author: Rikard Falkeborn Date: Tue Nov 24 17:59:18 2020 +0200 ath10k: Constify static qmi structs qmi_msg_handler[] and ath10k_qmi_ops are only used as input arguments to qmi_handle_init() which accepts const pointers to both qmi_ops and qmi_msg_handler. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201122234031.33432-3-rikard.falkeborn@gmail.com commit 6364e693f4a7a89a2fb3dd2cbd6cc06d5fd6e26d Author: Christophe JAILLET Date: Tue Nov 24 17:59:18 2020 +0200 ath10k: Release some resources in an error handling path Should an error occur after calling 'ath10k_usb_create()', it should be undone by a corresponding 'ath10k_usb_destroy()' call Fixes: 4db66499df91 ("ath10k: add initial USB support") Signed-off-by: Christophe JAILLET Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201122170358.1346065-1-christophe.jaillet@wanadoo.fr commit ed3573bc3943c27d2d8e405a242f87ed14572ca1 Author: Christophe JAILLET Date: Tue Nov 24 17:59:18 2020 +0200 ath10k: Fix an error handling path If 'ath10k_usb_create()' fails, we should release some resources and report an error instead of silently continuing. Fixes: 4db66499df91 ("ath10k: add initial USB support") Signed-off-by: Christophe JAILLET Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201122170342.1346011-1-christophe.jaillet@wanadoo.fr commit c7cee9c0f499f27ec6de06bea664b61320534768 Author: Rakesh Pillai Date: Tue Nov 24 17:59:17 2020 +0200 ath10k: Fix the parsing error in service available event The wmi service available event has been extended to contain extra 128 bit for new services to be indicated by firmware. Currently the presence of any optional TLVs in the wmi service available event leads to a parsing error with the below error message: ath10k_snoc 18800000.wifi: failed to parse svc_avail tlv: -71 The wmi service available event parsing should not return error for the newly added optional TLV. Fix this parsing for service available event message. Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.3.2.2-00720-QCAHLSWMTPL-1 Fixes: cea19a6ce8bf ("ath10k: add WMI_SERVICE_AVAILABLE_EVENT support") Signed-off-by: Rakesh Pillai Reviewed-by: Douglas Anderson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1605501291-23040-1-git-send-email-pillair@codeaurora.org commit e7bcc145bcd035e56da7b97b033c463b32a5ff80 Author: Christophe JAILLET Date: Tue Nov 24 17:59:16 2020 +0200 ath11k: Fix an error handling path If 'kzalloc' fails, we must return an error code. While at it, remove a useless initialization of 'err' which could hide the issue. Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Signed-off-by: Christophe JAILLET Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201122173943.1366167-1-christophe.jaillet@wanadoo.fr commit 5482e09a8840ee3bb1848d73d05301eafc0e6199 Author: Chuck Lever Date: Tue Nov 24 19:15:18 2020 -0500 NFS: Fix rpcrdma_inline_fixup() crash with new LISTXATTRS operation By switching to an XFS-backed export, I am able to reproduce the ibcomp worker crash on my client with xfstests generic/013. For the failing LISTXATTRS operation, xdr_inline_pages() is called with page_len=12 and buflen=128. - When ->send_request() is called, rpcrdma_marshal_req() does not set up a Reply chunk because buflen is smaller than the inline threshold. Thus rpcrdma_convert_iovs() does not get invoked at all and the transport's XDRBUF_SPARSE_PAGES logic is not invoked on the receive buffer. - During reply processing, rpcrdma_inline_fixup() tries to copy received data into rq_rcv_buf->pages because page_len is positive. But there are no receive pages because rpcrdma_marshal_req() never allocated them. The result is that the ibcomp worker faults and dies. Sometimes that causes a visible crash, and sometimes it results in a transport hang without other symptoms. RPC/RDMA's XDRBUF_SPARSE_PAGES support is not entirely correct, and should eventually be fixed or replaced. However, my preference is that upper-layer operations should explicitly allocate their receive buffers (using GFP_KERNEL) when possible, rather than relying on XDRBUF_SPARSE_PAGES. Reported-by: Olga kornievskaia Suggested-by: Olga kornievskaia Fixes: c10a75145feb ("NFSv4.2: add the extended attribute proc functions.") Signed-off-by: Chuck Lever Reviewed-by: Olga kornievskaia Reviewed-by: Frank van der Linden Tested-by: Olga kornievskaia Signed-off-by: Anna Schumaker commit d35d1375493b0f962a5da5aef015b8bd215e059d Author: Sven Eckelmann Date: Tue Nov 24 17:59:16 2020 +0200 ath11k: Build check size of ath11k_skb_cb It is rather easy to add more entries to ath11k_skb_cb while forgetting the size limit of ieee80211_tx_info->driver_data. So just check this during the build to reduce the change of accidental buffer overflow in the skbuff->cb. Signed-off-by: Sven Eckelmann Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201119154235.263250-3-sven@narfation.org commit 5da7acfec5ec55aa0b69b8760f1d2116b4e2ad26 Author: Sven Eckelmann Date: Tue Nov 24 17:59:15 2020 +0200 ath11k: Reset ath11k_skb_cb before setting new flags It was observed that the codepath for the ATH11K_SKB_HW_80211_ENCAP was used even when the IEEE80211_TX_CTRL_HW_80211_ENCAP was not enabled for a an skbuff. This became even more prominent when the QCAs wlan-open patchset for ath11k [1] was applied and a sane looking fix just caused crashes when injecting frames via a monitor interface (for example with ratechecker): [ 86.963152] Unable to handle kernel NULL pointer dereference at virtual address 00000338 [ 86.963192] pgd = ffffffc0008f0000 [ 86.971034] [00000338] *pgd=0000000051706003, *pud=0000000051706003, *pmd=0000000051707003, *pte=00e800000b000707 [ 86.984292] Internal error: Oops: 96000006 [#1] PREEMPT SMP [...] [ 87.713339] [] ieee80211_tx_status_8023+0xf8/0x220 [mac80211] [ 87.715654] [] ath11k_dp_tx_completion_handler+0x42c/0xa10 [ath11k] [ 87.722924] [] ath11k_dp_service_srng+0x70/0x3c8 [ath11k] [ 87.730831] [] 0xffffffbffca03460 [ 87.737599] [] net_rx_action+0xf8/0x288 [ 87.742462] [] __do_softirq+0xfc/0x220 [ 87.748014] [] irq_exit+0x98/0xe8 [ 87.753396] [] __handle_domain_irq+0x90/0xb8 [ 87.757999] [] gic_handle_irq+0x6c/0xc8 [ 87.763899] Exception stack(0xffffffc00081bdc0 to 0xffffffc00081bef0) Problem is that the state of ath11k_skb_cb->flags must be considered unknown and could contain anything when it is not manually initialized. So it could also contain ATH11K_SKB_HW_80211_ENCAP. And this can result in the code to assume that the ath11k_skb_cb->vif is set - even when this is not always the case for non ATH11K_SKB_HW_80211_ENCAP transmissions. Tested-on: IPQ8074 hw2.0 WLAN.HK.2.4.0.1.r1-00026-QCAHKSWPL_SILICONZ-2 [1] https://source.codeaurora.org/quic/qsdk/oss/system/feeds/wlan-open/tree/mac80211/patches?h=NHSS.QSDK.11.4.r3 (162 patches at the moment which are often not upstreamed but essential to get ath11k working) Fixes: e7f33e0c52c0 ("ath11k: add tx hw 802.11 encapsulation offloading support") Signed-off-by: Sven Eckelmann Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201119154235.263250-2-sven@narfation.org commit f4d291b43f809b74c66b21f5190cd578af43070b Author: Sven Eckelmann Date: Tue Nov 24 17:59:15 2020 +0200 ath11k: Don't cast ath11k_skb_cb to ieee80211_tx_info.control The driver_data area of ieee80211_tx_info is used in ath11k for ath11k_skb_cb. The first function in the TX patch which rewrites it to ath11k_skb_cb is already ath11k_mac_op_tx. No one else in the code path must use it for something else before it reinitializes it. Otherwise the data has to be considered uninitialized or corrupt. But the ieee80211_tx_info.control shares exactly the same area as ieee80211_tx_info.driver_data and ath11k is still using it. This results in best case in a ath11k c000000.wifi1: no vif found for mgmt frame, flags 0x0 or (slightly worse) in a kernel oops. Instead, the interesting data must be moved first into the ath11k_skb_cb and ieee80211_tx_info.control must then not be used anymore. Tested-on: IPQ8074 hw2.0 WLAN.HK.2.4.0.1.r1-00026-QCAHKSWPL_SILICONZ-2 Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Signed-off-by: Sven Eckelmann Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201119154235.263250-1-sven@narfation.org commit 492096ecfa39d5b6a82a6959b848b78d0112bb09 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:32:32 2020 -0600 scsi: target: core: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a couple of warnings by explicitly adding a break statement and a fallthrough pseudo-keyword instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Link: https://lore.kernel.org/r/761d6f755e8a6f8a6daebd1e5c1394167e5c780a.1605896059.git.gustavoars@kernel.org Signed-off-by: Gustavo A. R. Silva Signed-off-by: Martin K. Petersen commit 8b185fc6e3fe5d16abcd2753f504d1c54134f03a Author: Gustavo A. R. Silva Date: Fri Nov 20 12:39:36 2020 -0600 scsi: stex: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Link: https://lore.kernel.org/r/20a7bcc10af2b762325c7078a4f472121a4fabc7.1605896060.git.gustavoars@kernel.org Signed-off-by: Gustavo A. R. Silva Signed-off-by: Martin K. Petersen commit e9a7c7117103f6e8085ed3caecba6a1e6715e862 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:39:31 2020 -0600 scsi: lpfc: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Link: https://lore.kernel.org/r/fff8d6f1d33b9e2c94dbe024a4f8df22866d3bf8.1605896060.git.gustavoars@kernel.org Signed-off-by: Gustavo A. R. Silva Signed-off-by: Martin K. Petersen commit 965077585513d83fd937bf788557af8cc48745c7 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:39:26 2020 -0600 scsi: csiostor: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Link: https://lore.kernel.org/r/b77ee091548f16b52056c3b9ee8c76dc6691f868.1605896060.git.gustavoars@kernel.org Signed-off-by: Gustavo A. R. Silva Signed-off-by: Martin K. Petersen commit 5133dc4764844575da10a7b6dc12cd87a0ca9d19 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:39:21 2020 -0600 scsi: aha1740: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Link: https://lore.kernel.org/r/e9fc10eb7d843e6f31e50400d428bd7a217684ac.1605896060.git.gustavoars@kernel.org Signed-off-by: Gustavo A. R. Silva Signed-off-by: Martin K. Petersen commit da38e8917d65edc8387a5154fff7366277c61783 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:39:15 2020 -0600 scsi: aacraid: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Link: https://lore.kernel.org/r/e4e25e57964a69f7173f868ff93df9d6d08f360f.1605896060.git.gustavoars@kernel.org Signed-off-by: Gustavo A. R. Silva Signed-off-by: Martin K. Petersen commit 4c7bd259d66c9f94d3937bce3de5f16a8fd812a1 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:27:30 2020 -0600 scsi: bfa: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding a couple break statements and replacing /* fall through */ comments with the new pseudo-keyword macro fallthrough; instead of just letting the code fall through to the next case. Notice that Clang doesn't recognize /* fall through */ comments as implicit fall-through markings. Link: https://github.com/KSPP/linux/issues/115 Link: https://lore.kernel.org/r/2ae1cafd858238b85fc5e7fe5cc183843e21ec9f.1605896059.git.gustavoars@kernel.org Signed-off-by: Gustavo A. R. Silva Signed-off-by: Martin K. Petersen commit 4886dd0a04b47a3da81b2d9c46c32c1035410ea2 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:27:24 2020 -0600 scsi: aic94xx: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding a couple of break and fallthrough statements instead of just letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Link: https://lore.kernel.org/r/9b58459045d303bbea0160f2e349f5799402a2bf.1605896059.git.gustavoars@kernel.org Signed-off-by: Gustavo A. R. Silva Signed-off-by: Martin K. Petersen commit 995ae10f8000699b6ac8186489235bc9f0b8de34 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:27:16 2020 -0600 scsi: aic7xxx: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of just letting the code fall through to the next case, and by adding fallthrough statements in places where the code is intended to fall through, and finally by replacing /* FALLTHROUGH */ comments with the new pseudo-keyword macro fallthrough. Link: https://github.com/KSPP/linux/issues/115 Link: https://lore.kernel.org/r/1a7cd2f77623e6ab46bbec0b6103b18491419206.1605896059.git.gustavoars@kernel.org Signed-off-by: Gustavo A. R. Silva Signed-off-by: Martin K. Petersen commit 8cc0dcfdc1c0e0be107d0288f9c0cf1f4201be62 Author: Vineeth Vijayan Date: Fri Nov 20 09:36:38 2020 +0100 s390/cio: remove pm support from ccw bus driver As part of removing broken pm-support from s390 arch, remove the pm callbacks from ccw-bus driver.The power-management functions are unused since the 'commit 394216275c7d ("s390: remove broken hibernate / power management support")'. Signed-off-by: Vineeth Vijayan Reviewed-by: Peter Oberparleiter Signed-off-by: Heiko Carstens commit ef2eea78a6f363a58c909b7a0fd002df7cc52991 Author: Vineeth Vijayan Date: Thu Nov 12 16:26:29 2020 +0100 s390/cio: remove pm support from css-bus driver The power-management functions are unused since the 'commit 394216275c7d ("s390: remove broken hibernate / power management support")'. Remove the unused pm callbacks from css-bus driver. Signed-off-by: Vineeth Vijayan Reviewed-by: Peter Oberparleiter Signed-off-by: Heiko Carstens commit 796cfabde5b23e1e506994fd11d2609ec2818e8d Author: Vineeth Vijayan Date: Thu Apr 2 10:34:02 2020 +0200 s390/cio: remove pm support from IO subchannel drivers The power-management functions are unused since the 'commit 394216275c7d ("s390: remove broken hibernate / power management support")'. Remove these unused pm callbacks from io-subchannel drivers. Signed-off-by: Vineeth Vijayan Reviewed-by: Peter Oberparleiter Signed-off-by: Heiko Carstens commit bfa11151d223016ceca008dce7f1e55ca78c21bb Author: Vineeth Vijayan Date: Thu Apr 2 10:35:40 2020 +0200 s390/cio: remove pm support from chsc subchannel driver As part of removing the broken pm-support from s390 arch, remove the pm-calls from chsc subchannel driver. The power-management functions are unused since the 'commit 394216275c7d ("s390: remove broken hibernate / power management support")'. Signed-off-by: Vineeth Vijayan Reviewed-by: Peter Oberparleiter Signed-off-by: Heiko Carstens commit 74cee7f3b0ea7fd6231f037ce37be6d9c6d2b4b6 Author: Vineeth Vijayan Date: Mon Sep 28 21:29:01 2020 +0200 s390/vmur: remove unused pm related functions The Power-management related functions are unused since 'commit 394216275c7d ("s390: remove broken hibernate / power management support")'. Remove them from the unit-record device driver. Signed-off-by: Vineeth Vijayan Signed-off-by: Heiko Carstens commit 2f6ea6fb88ab9d517644a098fc670b4d5dd1735e Author: Vineeth Vijayan Date: Mon Sep 28 21:28:20 2020 +0200 s390/tape: remove unsupported PM functions The power-management related functions are unused since 'commit 394216275c7d ("s390: remove broken hibernate / power management support")'. Remove them from tape drivers. Signed-off-by: Vineeth Vijayan Reviewed-by: Jan Höppner Signed-off-by: Heiko Carstens commit 6b532eec75ef2b470a38aeda6479da8689ce7f69 Author: Vineeth Vijayan Date: Mon Sep 28 16:16:45 2020 +0200 s390/cio: remove pm support from eadm-sch drivers The 'commit 394216275c7d ("s390: remove broken hibernate / power management support")' removes the pm-support. Remove the unused functions in eadm-sch drivers. Signed-off-by: Vineeth Vijayan Reviewed-by: Peter Oberparleiter Signed-off-by: Heiko Carstens commit 1cf69b7b51d79eff839c8945cd909e13600f81c7 Author: Vineeth Vijayan Date: Mon Mar 30 14:36:57 2020 +0200 s390: remove pm support from console drivers The power-management functions are unused since the 'commit 394216275c7d ("s390: remove broken hibernate / power management support")'. Remove the unsued pm functions from the console drivers. Signed-off-by: Vineeth Vijayan Signed-off-by: Heiko Carstens commit 127fca609385955a3d8d4f95205e932981b10ea8 Author: Vineeth Vijayan Date: Tue Nov 10 09:28:33 2020 +0100 s390/dasd: remove unused pm related functions The power-management related functions are unused since the 'commit 394216275c7d ("s390: remove broken hibernate / power management support")'. Remove them from dasd drivers. Signed-off-by: Vineeth Vijayan Reviewed-by: Stefan Haberland Signed-off-by: Heiko Carstens commit 5db44cfe2e6ee247a5806e814a328f26d1f21f55 Author: Vineeth Vijayan Date: Mon May 25 10:36:42 2020 +0200 s390/zfcp: remove pm support from zfcp driver As part of removing the power management support from s390 arch, remove PM callbacks from the scsi/zfcp driver. Signed-off-by: Vineeth Vijayan Reviewed-by: Steffen Maier Signed-off-by: Heiko Carstens commit aed5041ef9a3f594ed9dc0bb5ee7e1bbccfd3366 Author: Catalin Marinas Date: Tue Dec 1 12:47:25 2020 +0000 of: unittest: Fix build on architectures without CONFIG_OF_ADDRESS of_dma_get_max_cpu_address() is not defined if !CONFIG_OF_ADDRESS, so return early in of_unittest_dma_get_max_cpu_address(). Fixes: 07d13a1d6120 ("of: unittest: Add test for of_dma_get_max_cpu_address()") Reported-by: kernel test robot Signed-off-by: Catalin Marinas commit 22b56c2964386ddced252be407150b22f85e209e Author: Pavel Begunkov Date: Tue Nov 24 17:58:13 2020 +0000 bio: optimise bvec iteration __bio_for_each_bvec(), __bio_for_each_segment() and bio_copy_data_iter() fall under conditions of bvec_iter_advance_single(), which is a faster and slimmer version of bvec_iter_advance(). Add bio_advance_iter_single() and convert them. Signed-off-by: Pavel Begunkov Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 6b6667aa4d1e0866f00b62d35a9be3875c7551f8 Author: Pavel Begunkov Date: Tue Nov 24 17:58:12 2020 +0000 block: optimise for_each_bvec() advance Because of how for_each_bvec() works it never advances across multiple entries at a time, so bvec_iter_advance() is an overkill. Add specialised bvec_iter_advance_single() that is faster. It also handles zero-len bvecs, so can kill bvec_iter_skip_zero_bvec(). text data bss dec hex filename before: 23977 805 0 24782 60ce lib/iov_iter.o before, bvec_iter_advance() w/o WARN_ONCE() 22886 600 0 23486 5bbe ./lib/iov_iter.o after: 21862 600 0 22462 57be lib/iov_iter.o Signed-off-by: Pavel Begunkov Reviewed-by: Ming Lei Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 5e191d2e05a4fe098632006bb3afa5e21c8789db Author: Adam Ward Date: Wed Dec 2 11:32:47 2020 +0000 regulator: da9121: Request IRQ directly and free in release function to avoid masking race Signed-off-by: Adam Ward Link: https://lore.kernel.org/r/24b2d8b0c3536408369add034221b1141e58bbfc.1606908582.git.Adam.Ward.opensource@diasemi.com Signed-off-by: Mark Brown commit 3b9351f0fd14f2e9ef3141f0d894076517400e6e Merge: 48332ff295878 2f4c9ba23b887 Author: Jens Axboe Date: Wed Dec 2 08:56:55 2020 -0700 Merge tag 'nvme-5.11-20201202' of git://git.infradead.org/nvme into for-5.11/drivers Pull NVMe updates from Christoph: "nvme updates for 5.11 - nvmet passthrough improvements (Chaitanya Kulkarni) - fcloop error injection support (James Smart) - read-only support for zoned namespaces without Zone Append (Javier González) - improve some error message (Minwoo Im) - reject I/O to offline fabrics namespaces (Victor Gladkov) - PCI queue allocation cleanups (Niklas Schnelle) - remove an unused allocation in nvmet (Amit Engel) - a Kconfig spelling fix (Colin Ian King) - nvme_req_qid simplication (Baolin Wang)" * tag 'nvme-5.11-20201202' of git://git.infradead.org/nvme: (23 commits) nvme: export zoned namespaces without Zone Append support read-only nvme: rename bdev operations nvme: rename controller base dev_t char device nvme: remove unnecessary return values nvme: print a warning for when listing active namespaces fails nvme: improve an error message on Identify failure nvme-fabrics: reject I/O to offline device nvmet: fix a spelling mistake "incuding" -> "including" in Kconfig nvmet: make sure discovery change log event is protected nvmet: remove unused ctrl->cqs nvme-pci: don't allocate unused I/O queues nvme-pci: drop min() from nr_io_queues assignment nvmet: use inline bio for passthru fast path nvmet: use blk_rq_bio_prep instead of blk_rq_append_bio nvmet: remove op_flags for passthru commands nvme: split nvme_alloc_request() block: move blk_rq_bio_prep() to linux/blk-mq.h nvmet: add passthru io timeout value attr nvmet: add passthru admin timeout value attr nvme: use consistent macro name for timeout ... commit 7a51b4cb97087d6b9e7769ba5f9d4cad20c4c1aa Merge: adc7d56180099 cfd8bb254c998 Author: Mark Brown Date: Wed Dec 2 15:19:11 2020 +0000 Merge series "ASoC: mediatek: mt8192: support new machine rt1015p_rt5682" from Tzung-Bi Shih : The series supports new machines with rt1015p and rt5682. Reuses most of the code in mt8192-mt6359-rt1015-rt5682.c. The first 3 patches refactor the existing mt8192-mt6359-rt1015-rt5682.c. For easier to support newly added components later. The 4th patch fixes a typo in DT bindings document. The 5th patch proposes a new compatible string "mt8192_mt6359_rt1015p_rt5682" for machines with rt1015p and rt5682. The 6th patch reuses the existing machine driver to support machines with rt1015p and rt5682. Tzung-Bi Shih (6): ASoC: mediatek: mt8192: rename common symbols ASoC: mediatek: mt8192: extract rt1015_rt5682 specific DAI link ASoC: mediatek: mt8192: move rt1015_rt5682 specific data ASoC: dt-bindings: mt8192-mt6359: fix typo in the example ASoC: dt-bindings: mt8192-mt6359: add new compatible for using rt1015p ASoC: mediatek: mt8192: support rt1015p_rt5682 .../sound/mt8192-mt6359-rt1015-rt5682.yaml | 6 +- sound/soc/mediatek/Kconfig | 1 + .../mt8192/mt8192-mt6359-rt1015-rt5682.c | 171 +++++++++++++----- 3 files changed, 129 insertions(+), 49 deletions(-) -- 2.29.2.454.gaff20da3a2-goog commit adc7d561800997d39abc689ad05cf3cd1270b97a Author: Alexandre Belloni Date: Mon Nov 30 22:56:26 2020 +0100 ASoC: adau1372: add missing dependencies SND_SOC_ADAU1372_I2C and SND_SOC_ADAU1372_SPI prpoerly select the REGMAP config they need but forget to depend on the underlying bus. Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201130215626.2400999-1-alexandre.belloni@bootlin.com Signed-off-by: Mark Brown commit 4d638b9cc79eff11bad13fb3715c0ef38a9edaec Author: Dan Carpenter Date: Wed Dec 2 09:51:46 2020 +0300 ASoC: codecs: lpass-va-macro: remove some dead code The "decimator" variable is in the 0-7 range and it's unsigned so there is no need to check for negative values. Fixes: 908e6b1df26e ("ASoC: codecs: lpass-va-macro: Add support to VA Macro") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/X8c5gjZO7YN/CFsq@mwanda Signed-off-by: Mark Brown commit 569c167ce3bb145662cbdd37924017f5a3071024 Author: Jack Yu Date: Wed Dec 2 10:13:36 2020 +0800 ASoC: rt715: remove unused parameter Remove unused parameter in rt715.h. Signed-off-by: Jack Yu Link: https://lore.kernel.org/r/20201202021336.3591-1-jack.yu@realtek.com Signed-off-by: Mark Brown commit 1ed36ecd1459b653cced8929bfb37dba94b64c5d Author: Hans Verkuil Date: Wed Aug 5 12:57:21 2020 +0200 media: i2c: imx219: Selection compliance fixes To comply with the intended usage of the V4L2 selection target when used to retrieve a sensor image properties, adjust the rectangles returned by the imx219 driver. The top/left crop coordinates of the TGT_CROP rectangle were set to (0, 0) instead of (8, 8) which is the offset from the larger physical pixel array rectangle. This was also a mismatch with the default values crop rectangle value, so this is corrected. Found with v4l2-compliance. While at it, add V4L2_SEL_TGT_CROP_BOUNDS support: CROP_DEFAULT and CROP_BOUNDS have the same size as the non-active pixels are not readable using the selection API. Found with v4l2-compliance. [reword commit message, use macros for pixel offsets] Fixes: e6d4ef7d58aa7 ("media: i2c: imx219: Implement get_selection") Signed-off-by: Hans Verkuil Signed-off-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit f61eb7bc9256aeb173d2d730f59cdd569d261c52 Author: Rob Herring Date: Tue Nov 17 02:39:47 2020 +0100 media: dt-bindings: media: Use OF graph schema Now that we have a graph schema, rework the media related schemas to use it. Mostly this is adding a reference to graph.yaml and dropping duplicate parts from schemas. Cc: Maxime Ripard Cc: Jacopo Mondi Cc: Laurent Pinchart Signed-off-by: Rob Herring Acked-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 7fe1d4453fb6bf103d668a19d957a7b2fc21887c Author: Jacopo Mondi Date: Fri Nov 20 17:15:29 2020 +0100 media: rdacm20: Enable GPIO1 explicitly The MAX9271 GPIO1 line that controls the sensor reset is by default enabled after a serializer chip reset. As rdacm20 does not go through an explicit serializer reset, make sure GPIO1 is enabled to make the camera module driver more robust. Fixes: 34009bffc1c6 ("media: i2c: Add RDACM20 driver") Signed-off-by: Jacopo Mondi Reviewed-by: Kieran Bingham Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 909a0a189c677307edd461e21fd962784370d27f Author: Jacopo Mondi Date: Fri Nov 20 17:15:28 2020 +0100 media: max9271: Fix GPIO enable/disable Fix GPIO enable/disable operations which wrongly read the 0x0f register to obtain the current mask of the enabled lines instead of using the correct 0x0e register. Also fix access to bit 0 of the register which is marked as reserved. Fixes: 34009bffc1c6 ("media: i2c: Add RDACM20 driver") Signed-off-by: Jacopo Mondi Reviewed-by: Geert Uytterhoeven Reviewed-by: Kieran Bingham Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 0ae426ebd0dcef811a012b33345e6f7ca56256f4 Author: Niklas Söderlund Date: Wed Nov 25 17:44:50 2020 +0100 media: v4l2-fwnode: Remove v4l2_async_notifier_parse_fwnode_endpoints_by_port() There are no users left of this helper and as it implements an undesirable and too simple behaviour that should instead be implemented directly by drivers remove it to prevent future uses of it. Suggested-by: Sakari Ailus Signed-off-by: Niklas Söderlund Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit e8117de78b2c5b2035dd25fe25d16403c477370b Author: Niklas Söderlund Date: Wed Nov 25 17:44:49 2020 +0100 media: rcar-vin: Rework CSI-2 firmware parsing Rework the CSI-2 firmware parsing code to not use the soon to be removed v4l2_async_notifier_parse_fwnode_endpoints_by_port() helper. The change only aims to prepare for the removing of the old helper and there are no functional change. Signed-off-by: Niklas Söderlund Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 497d574d9b498aa34b0071e381c23cfc34805f14 Author: Niklas Söderlund Date: Wed Nov 25 17:44:48 2020 +0100 media: rcar-vin: Use v4l2_async_subdev instead of fwnode_handle to match subdevices In preparation of removing the usage of the old helper v4l2_async_notifier_parse_fwnode_endpoints_by_port() use the v4l2_async_subdev instead of fwnode_handle to match subdevices. Signed-off-by: Niklas Söderlund Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit b9ad52aafe38f8c54f344f30a3698de8e72315c2 Author: Niklas Söderlund Date: Wed Nov 25 17:44:47 2020 +0100 media: rcar-vin: Rework parallel firmware parsing Rework the parallel firmware parsing code to not use the soon to be removed v4l2_async_notifier_parse_fwnode_endpoints_by_port() helper. The change only aims to prepare for the removing of the old helper and there are no functional change. Signed-off-by: Niklas Söderlund Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit d7592b2ec9441f44dd055623288fa5a258b5a07f Author: Niklas Söderlund Date: Wed Nov 25 17:44:46 2020 +0100 media: rcar-vin: Only dynamically allocate v4l2_async_subdev In preparation of removing the usage of the old helper v4l2_async_notifier_parse_fwnode_endpoints_by_port() do not dynamically allocate the whole structure containing the parameters for the parallel interface, instead only allocate the v4l2_async_subdev structure. There is no functional change. Signed-off-by: Niklas Söderlund Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit cf10e09b9a4b28fe6df3fe8fc851fb2c4bd18a14 Author: Colin Ian King Date: Thu Nov 26 12:49:32 2020 +0100 media: ov2740: fix dereference before null check on pointer nvm Currently pointer nvm is being dereferenced before it is being null checked. Fix this by moving the assignments of pointers client and ov2740 so that are after the null check hence avoiding any potential null pointer dereferences on pointer nvm. Fixes: 5e6fd339b68d ("media: ov2740: allow OTP data access during streaming") Signed-off-by: Colin Ian King Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 0359af7ac318495432e5a06f671c80dc29274f18 Author: Chuck Lever Date: Mon Nov 30 14:58:19 2020 -0500 SUNRPC: Remove XDRBUF_SPARSE_PAGES flag in gss_proxy upcall There's no need to defer allocation of pages for the receive buffer. - This upcall is quite infrequent - gssp_alloc_receive_pages() can allocate the pages with GFP_KERNEL, unlike the transport - gssp_alloc_receive_pages() knows exactly how many pages are needed Signed-off-by: Chuck Lever Reviewed-by: Olga Kornievskaia Signed-off-by: Anna Schumaker commit 91807efbe8ec7f591085067d9f96a112e015274b Author: Dongchun Zhu Date: Wed Nov 25 15:17:56 2020 +0100 media: i2c: add OV02A10 image sensor driver Add a V4L2 sub-device driver for OmniVision OV02A10 image sensor. Signed-off-by: Dongchun Zhu Reviewed-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 34487ad0c0aedc32ab18a25a274025e73ea00834 Author: Dongchun Zhu Date: Wed Nov 25 15:17:55 2020 +0100 media: dt-bindings: media: i2c: document OV02A10 DT bindings Add device-tree binding documentation for OV02A10 image sensor driver, and the relevant MAINTAINERS entries. Signed-off-by: Dongchun Zhu Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 9677958d1d3d21923ca26cb5e989edc18ecf2786 Author: Bingbu Cao Date: Fri Nov 27 04:48:12 2020 +0100 media: ov9734: hold lock to check streaming state The lock in ov9734 is used to protect the streaming state and serialize the stream on and off callbacks, it should be hold before checking the streaming state in ov9734_set_stream(). Reported-by: Tomasz Figa Reported-by: Sergey Senozhatsky Signed-off-by: Bingbu Cao Reviewed-by: Sergey Senozhatsky Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 989bea48915861171421bd6e1367bf4c9407513d Author: Sakari Ailus Date: Thu Aug 15 09:36:49 2019 +0200 media: v4l: subdev: Set sd->devnode before registering the subdev The subdev's video device node was only assigned after registering the device node in the system. While it is unlikely that a driver needed to use this field in handling system calls to its file handle, there remains a slim chance the devnode field remains NULL while the driver expects to find a video node there. Assign the devnode field before registering the device, and assign it back to NULL if the registration failed. Signed-off-by: Sakari Ailus Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7daaf0bc24ad81ec13b444a047cf4f66827ba96e Author: Thomas Gleixner Date: Fri Nov 13 15:28:31 2020 +0100 media: omap3isp: Remove misleading comment in_interrupt() covers hard and soft interrupt servicing and bottom half disabled contexts, which is semantically undefined and useless. The comment for __ccdc_lsc_configure() "Context: in_interrupt()" is therefore as useful as "Context: unknown'. Remove it. Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit d0fbdcbe75950a4f93edcece34622888c4395133 Author: Sakari Ailus Date: Thu Jun 18 13:12:51 2020 +0200 media: ccs: Request for "reset" GPIO The DT bindings documented "reset-gpios" property but the driver never made use of it. Instead it used a GPIO called "xshutdown", with apprently wrong polarity. Fix this by requesting "reset" GPIO with the right polarity first, and if that fails, then request "xshutdown" GPIO with the old polarity. This way it works for new users as expected while if someone, somewhere, depended on "xshutdown" GPIO, that continues to work as well. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit aab402ea9b4827f6d8d4a7c58d7492124b493e02 Author: Sakari Ailus Date: Tue Sep 29 14:51:29 2020 +0200 media: dt-bindings: mipi-ccs: Add bus-type for C-PHY support The bus-type property is required for C-PHY support. Add it, including values for CCP2 and CSI-2 D-PHY. Also require the bus-type property. Effectively all new sensors are MIPI D-PHY or C-PHY that cannot be told apart without the bus-type property. Signed-off-by: Sakari Ailus Reviewed-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab commit 72051783cd736d82711fe6fd1df2b71a0d4d6e82 Author: Sakari Ailus Date: Tue Feb 11 22:26:25 2020 +0100 media: dt-bindings: nokia,smia: Amend SMIA bindings with MIPI CCS support Amend the existing SMIA bindings by adding MIPI CCS support, with separate compatible strings for CCS 1.0 and CCS 1.1. Rename the old bindings accordingly as CCS is the current standard. Signed-off-by: Sakari Ailus Reviewed-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab commit 701b8c2c750b830e0508b8435d94f34ad0426918 Author: Sakari Ailus Date: Tue Sep 29 14:40:40 2020 +0200 media: dt-bindings: nokia,smia: Use better active polarity for reset Generally reset signal is active low on camera sensors. The example had it high. Make it low, and use GPIO_ACTIVE_LOW in gpio.h for that. Signed-off-by: Sakari Ailus Acked-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab commit 8265d427eddcfcfe01cd98f6fa3a5acb79f76fe8 Author: Sakari Ailus Date: Tue Sep 29 13:32:17 2020 +0200 media: dt-bindings: nokia,smia: Convert to YAML Convert nokia,smia DT bindings to YAML. Also add explicit license to bindings. Signed-off-by: Sakari Ailus Reviewed-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab commit 390bb477ebd54f2e286936682eea3a590e0538cd Author: Sakari Ailus Date: Thu Oct 1 13:50:44 2020 +0200 media: dt-bindings: nokia,smia: Remove nokia,nvm-size property nokia,nvm-size property was removed from the bindings but it was left in the example. Remove it from the example, too. Signed-off-by: Sakari Ailus Acked-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab commit 2d720d365bc1f438e860452735c5350e3cf136e1 Author: Sakari Ailus Date: Tue Sep 29 13:28:28 2020 +0200 media: dt-bindings: nokia,smia: Make vana-supply optional vana-supply is optional in the spec, therefore make it optional in bindings, too. Signed-off-by: Sakari Ailus Acked-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab commit bbe5062e27ddac05216263b519bd2d163c798a33 Author: Sakari Ailus Date: Tue Sep 29 13:14:00 2020 +0200 media: dt-bindings: nokia,smia: Fix link-frequencies documentation The link-frequencies property belongs to the endpoint, not to the node representing the device. Signed-off-by: Sakari Ailus Acked-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab commit 9ec2ac9bd0f91caa0fc4b04bbc221b36220096ae Author: Sakari Ailus Date: Tue Feb 11 22:01:14 2020 +0100 media: ccs: Give all subdevs a function This removes a warning at driver probe time telling that one or two entities have no function set. The function used for both the binner and scaler is the scaler. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit ae7855a4f927cb7362926123851399073a7d54c2 Author: Sakari Ailus Date: Tue Feb 11 20:22:26 2020 +0100 media: ccs: Remove profile concept The driver doesn't do anything tangible with profiles. Remove the notion, and use the capabilities directly. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit b24cc2a18c50e4e315abc76a86b26b4c49652f79 Author: Sakari Ailus Date: Tue Feb 11 19:05:57 2020 +0100 media: smiapp: Rename as "ccs" Rename the "smiapp" driver as "ccs". MIPI CCS is the contemporary standard for raw Bayer camera sensors. The driver retains support for the SMIA++ and SMIA compliant camera sensors. A module alias is added for old user space using "smiapp" module name. Add Intel copyright while at it. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 571b6caff4e890035deeb1451f2c1e5dca0e0dd2 Author: Sakari Ailus Date: Wed Sep 2 15:51:29 2020 +0200 media: smiapp: Differentiate CCS sensors from SMIA in subdev naming Call CCS compliant sensors as "ccs" instead of "smiapp" in absence of a device specific name. This is done based on the value of the manufacturer ID register that is only present in CCS. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 161cc847370a92f2d39f79edc640b599a497c862 Author: Sakari Ailus Date: Tue Feb 11 14:19:13 2020 +0100 media: smiapp: Internal rename to CCS Rename internal names to reflect the driver's new reference. The module name remains the same. Also fix trivial coding style issues on the way related to e.g. alignment changes due to the rename. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 47ff2ff267ee4f259154ddd578b25224393d306b Author: Sakari Ailus Date: Tue Feb 11 12:16:14 2020 +0100 media: smiapp: Rename register access functions Rename register access functions by changing smiapp to ccs. The functions operating on register addresses have "addr" appended to the name. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 235ac9a4b36c4173d2f318098544bb010bfc3295 Author: Sakari Ailus Date: Tue Feb 11 11:14:10 2020 +0100 media: smiapp: Remove quirk function for writing a single 8-bit register This function is no longer needed as the smiapp_write() function can be used to write 8-bit registers with plain register addresses. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 42aab58f456a28a5d4b175e7cf7d43276ed3d06b Author: Sakari Ailus Date: Tue Feb 11 10:18:31 2020 +0100 media: smiapp: Use CCS registers Switch to CCS standard registers where they exist. The still relevant SMIA registers are left as-is and the redundant ones are removed. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 19a435f9ea48f296527f713e0afb25d89527c63b Author: Sakari Ailus Date: Tue Feb 11 10:37:47 2020 +0100 media: smiapp: Use CCS limits in reading binning capabilities Use CCS limits for obtaining binning capabilities and subtypes. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 642d7c3eafaac33b6c09f220c7d72a58929b913a Author: Sakari Ailus Date: Mon Feb 10 15:02:32 2020 +0100 media: smiapp: Use CCS limits in reading data format descriptors The CCS limits have the information so use it instead. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit fd9065812c7b4537f73c0f83cb5e955bddc070ad Author: Sakari Ailus Date: Mon Feb 10 12:53:14 2020 +0100 media: smiapp: Obtain frame descriptor from CCS limits Obtain the frame descriptor from the CCS limits, instead of reading them directly from the frame descriptor registers. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 3e158e1f1ec2aca4287bc12323c7e88d4e3b4f38 Author: Sakari Ailus Date: Mon Feb 10 10:09:03 2020 +0100 media: smiapp: Switch to CCS limits Use the CCS limit definitions instead of the SMIA ones. This allows accessing CCS capabilities where needed as well as dropping the old SMIA limits. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit ca296a11156a00cc2336ba5fbcbcf2c6c41755c5 Author: Sakari Ailus Date: Thu Feb 6 15:06:12 2020 +0100 media: smiapp: Read CCS limit values Read limit and capability values into a driver allocated buffer. This will later replace (most of) the existing SMIA limits. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 503a88422fb0fc021b22b276f5d906eb9e7fce6e Author: Sakari Ailus Date: Mon Feb 3 15:54:53 2020 +0100 media: smiapp: Use MIPI CCS version and manufacturer ID information Read MIPI CCS manufacturer and version information, and use the CCS IDs over SMIA whenever they are set. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit e66a7c84908688e99bd7da4a48bfcba1b292fe54 Author: Sakari Ailus Date: Mon Feb 3 14:48:48 2020 +0100 media: smiapp: Add macros for accessing CCS registers Add two helper macros for reading and writing the CCS registers as defined in ccs-regs.h. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit cb50351be662729834e8159cc29af8be35a7c277 Author: Sakari Ailus Date: Thu May 28 11:39:00 2020 +0200 media: smiapp: Remove macros for defining registers, merge definitions Remove macros for defining new SMIA registers, instead put the register flags to the register definition itself. Also move the register flags to the same file. This is not expected to be updated but rather left there as a reference. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit ab47d5cd825310478900b33d712a0e39bf3bb716 Author: Sakari Ailus Date: Wed Feb 5 15:21:06 2020 +0100 media: smiapp: Calculate CCS limit offsets and limit buffer size Calculate the limit offsets and the size of the limit buffer. CCS limits are read into this buffer, and the offsets are helpful in accessing the information in it. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 82731a194fc155eb734941bb1f777caea4077ffa Author: Sakari Ailus Date: Mon Feb 3 12:38:42 2020 +0100 media: smiapp: Use CCS register flags Use the CCS register flags instead of the old smia flags. The new flags include the register width information that was separate from the register flags previously. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 6493c4b777c2bca7fcfaabca2388d82f186f9be3 Author: Sakari Ailus Date: Thu Oct 22 08:57:04 2020 +0200 media: smiapp: Import CCS definitions Import CCS register and limit definitions. These files are generated by a Perl script based on a text-based register definition file. The generator was added on commit 1ec0b899c2b7 ("media: ccs: Add the generator for CCS register definitions and limits") Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 4ad97bfb1a7ee826b7f253750ba47f2e991c12ec Author: Sakari Ailus Date: Thu Nov 5 17:08:23 2020 +0100 media: Documentation: ccs: Add CCS driver documentation Document the MIPI CCS driver and the C register definition generator. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 1ec0b899c2b776c0c2dd03044b171a52b5211570 Author: Sakari Ailus Date: Mon Feb 3 10:39:24 2020 +0100 media: ccs: Add the generator for CCS register definitions and limits Add register definitions of the MIPI CCS 1.1 standard. The CCS driver makes extended use of device's capability registers that are dependent on CCS version. This involves having an in-memory data structure for limit and capability information, creating that data structure and accessing it. The register definitions as well as the definitions of this data structure are generated from a text file using a Perl script. Add the generator script to make it easy to update the generated files. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit c6156e1da633f241e132eaea3b676d674376d770 Author: Sven Schnelle Date: Tue Dec 1 15:27:55 2020 +0100 entry: Add syscall_exit_to_user_mode_work() This is the same as syscall_exit_to_user_mode() but without calling exit_to_user_mode(). This can be used if there is an architectural reason to avoid the combo function, e.g. restarting a syscall without returning to userspace. Before returning to user space the caller has to invoke exit_to_user_mode(). [ tglx: Amended comments ] Signed-off-by: Sven Schnelle Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201201142755.31931-6-svens@linux.ibm.com commit 310de1a678b2184c078c593dae343cb79c807f8d Author: Sven Schnelle Date: Tue Dec 1 15:27:54 2020 +0100 entry: Add exit_to_user_mode() wrapper Called from architecture specific code when syscall_exit_to_user_mode() is not suitable. It simply calls __exit_to_user_mode(). This way __exit_to_user_mode() can still be inlined because it is declared static __always_inline. [ tglx: Amended comments and moved it to a different place in the header ] Signed-off-by: Sven Schnelle Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201201142755.31931-5-svens@linux.ibm.com commit 96e2fbccd0fc806364a964fdf072bfc858a66109 Author: Sven Schnelle Date: Tue Dec 1 15:27:53 2020 +0100 entry_Add_enter_from_user_mode_wrapper To be called from architecture specific code if the combo interfaces are not suitable. It simply calls __enter_from_user_mode(). This way __enter_from_user_mode will still be inlined because it is declared static __always_inline. [ tglx: Amend comments and move it to a different location in the header ] Signed-off-by: Sven Schnelle Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201201142755.31931-4-svens@linux.ibm.com commit bb793562f0da7317adf6c456316bca651ff46f5d Author: Sven Schnelle Date: Tue Dec 1 15:27:52 2020 +0100 entry: Rename exit_to_user_mode() In order to make this function publicly available rename it so it can still be inlined. An additional exit_to_user_mode() function will be added with a later commit. Signed-off-by: Sven Schnelle Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201201142755.31931-3-svens@linux.ibm.com commit 6666bb714fb3bc7b2e8be72b9c92f2d8a89ea2dc Author: Sven Schnelle Date: Tue Dec 1 15:27:51 2020 +0100 entry: Rename enter_from_user_mode() In order to make this function publicly available rename it so it can still be inlined. An additional enter_from_user_mode() function will be added with a later commit. Signed-off-by: Sven Schnelle Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201201142755.31931-2-svens@linux.ibm.com commit a4452e671c6770e1bb80764f39995934067f70a0 Author: Gabriel Krisman Bertazi Date: Fri Nov 27 14:32:38 2020 -0500 docs: Document Syscall User Dispatch Explain the interface, provide some background and security notes. [ tglx: Add note about non-visibility, add it to the index and fix the kerneldoc warning ] Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Thomas Gleixner Reviewed-by: Kees Cook Reviewed-by: Andy Lutomirski Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20201127193238.821364-8-krisman@collabora.com commit d87ae0fa21c26db2d7c66f22dee9c27ecda48ce2 Author: Gabriel Krisman Bertazi Date: Fri Nov 27 14:32:37 2020 -0500 selftests: Add benchmark for syscall user dispatch This is the patch I'm using to evaluate the impact syscall user dispatch has on native syscall (syscalls not redirected to userspace) when enabled for the process and submiting syscalls though the unblocked dispatch selector. It works by running a step to define a baseline of the cost of executing sysinfo, then enabling SUD, and rerunning that step. On my test machine, an AMD Ryzen 5 1500X, I have the following results with the latest version of syscall user dispatch patches. root@olga:~# syscall_user_dispatch/sud_benchmark Calibrating test set to last ~5 seconds... test iterations = 37500000 Avg syscall time 134ns. Caught sys_ff00 trapped_call_count 1, native_call_count 0. Avg syscall time 147ns. Interception overhead: 9.7% (+13ns). Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Thomas Gleixner Reviewed-by: Kees Cook Reviewed-by: Andy Lutomirski Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20201127193238.821364-7-krisman@collabora.com commit 179ef035992e89646e17138b18b130bb874b86bb Author: Gabriel Krisman Bertazi Date: Fri Nov 27 14:32:36 2020 -0500 selftests: Add kselftest for syscall user dispatch Implement functionality tests for syscall user dispatch. In order to make the test portable, refrain from open coding syscall dispatchers and calculating glibc memory ranges. Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Thomas Gleixner Reviewed-by: Andy Lutomirski Acked-by: Kees Cook Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20201127193238.821364-6-krisman@collabora.com commit 11894468e39def270199f845b76df6c36d4ed133 Author: Gabriel Krisman Bertazi Date: Fri Nov 27 14:32:35 2020 -0500 entry: Support Syscall User Dispatch on common syscall entry Syscall User Dispatch (SUD) must take precedence over seccomp and ptrace, since the use case is emulation (it can be invoked with a different ABI) such that seccomp filtering by syscall number doesn't make sense in the first place. In addition, either the syscall is dispatched back to userspace, in which case there is no resource for to trace, or the syscall will be executed, and seccomp/ptrace will execute next. Since SUD runs before tracepoints, it needs to be a SYSCALL_WORK_EXIT as well, just to prevent a trace exit event when dispatch was triggered. For that, the on_syscall_dispatch() examines context to skip the tracepoint, audit and other work. [ tglx: Add a comment on the exit side ] Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Thomas Gleixner Reviewed-by: Andy Lutomirski Acked-by: Peter Zijlstra (Intel) Acked-by: Kees Cook Link: https://lore.kernel.org/r/20201127193238.821364-5-krisman@collabora.com commit 1446e1df9eb183fdf81c3f0715402f1d7595d4cb Author: Gabriel Krisman Bertazi Date: Fri Nov 27 14:32:34 2020 -0500 kernel: Implement selective syscall userspace redirection Introduce a mechanism to quickly disable/enable syscall handling for a specific process and redirect to userspace via SIGSYS. This is useful for processes with parts that require syscall redirection and parts that don't, but who need to perform this boundary crossing really fast, without paying the cost of a system call to reconfigure syscall handling on each boundary transition. This is particularly important for Windows games running over Wine. The proposed interface looks like this: prctl(PR_SET_SYSCALL_USER_DISPATCH, , , , [selector]) The range [,+) is a part of the process memory map that is allowed to by-pass the redirection code and dispatch syscalls directly, such that in fast paths a process doesn't need to disable the trap nor the kernel has to check the selector. This is essential to return from SIGSYS to a blocked area without triggering another SIGSYS from rt_sigreturn. selector is an optional pointer to a char-sized userspace memory region that has a key switch for the mechanism. This key switch is set to either PR_SYS_DISPATCH_ON, PR_SYS_DISPATCH_OFF to enable and disable the redirection without calling the kernel. The feature is meant to be set per-thread and it is disabled on fork/clone/execv. Internally, this doesn't add overhead to the syscall hot path, and it requires very little per-architecture support. I avoided using seccomp, even though it duplicates some functionality, due to previous feedback that maybe it shouldn't mix with seccomp since it is not a security mechanism. And obviously, this should never be considered a security mechanism, since any part of the program can by-pass it by using the syscall dispatcher. For the sysinfo benchmark, which measures the overhead added to executing a native syscall that doesn't require interception, the overhead using only the direct dispatcher region to issue syscalls is pretty much irrelevant. The overhead of using the selector goes around 40ns for a native (unredirected) syscall in my system, and it is (as expected) dominated by the supervisor-mode user-address access. In fact, with SMAP off, the overhead is consistently less than 5ns on my test box. Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Thomas Gleixner Reviewed-by: Andy Lutomirski Acked-by: Peter Zijlstra (Intel) Acked-by: Kees Cook Link: https://lore.kernel.org/r/20201127193238.821364-4-krisman@collabora.com commit 55a901f028d48e13353076a035c05231475b0cb1 Merge: c075a0c0f102a 6f4a038b99677 Author: Mark Brown Date: Wed Dec 2 13:56:48 2020 +0000 Merge branch '20201104_yung_chuan_liao_regmap_soundwire_asoc_add_soundwire_sdca_support' (early part) into asoc-5.11 commit c075a0c0f102a23f01dc9b5684b412604da25629 Merge: e5879d988291a b7cab9be7c161 Author: Mark Brown Date: Wed Dec 2 13:55:06 2020 +0000 Merge tag 'soundwire-for-asoc-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire into asoc-5.11 soundwire-for-asoc-5.11 Tag for asoc to resolve build dependency with commit b7cab9be7c16 ("soundwire: SDCA: detect sdca_cascade interrupt") commit cfd8bb254c9985266e4be7f59042170a72548a8f Author: Tzung-Bi Shih Date: Tue Dec 1 21:26:14 2020 +0800 ASoC: mediatek: mt8192: support rt1015p_rt5682 Supports machines with rt1015p and rt5682. Uses new proposed compatible string "mt8192_mt6359_rt1015p_rt5682". Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20201201132614.1691352-7-tzungbi@google.com Signed-off-by: Mark Brown commit 6986256fdfefc2eeaec5f21d7937d57850fd57fe Author: Tzung-Bi Shih Date: Tue Dec 1 21:26:13 2020 +0800 ASoC: dt-bindings: mt8192-mt6359: add new compatible for using rt1015p Adds new compatible string "mt8192_mt6359_rt1015p_rt5682" for machines with rt1015p and rt5682. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20201201132614.1691352-6-tzungbi@google.com Signed-off-by: Mark Brown commit 6552c35de1915c8b423e4969ada1f1f8a53847e1 Author: Tzung-Bi Shih Date: Tue Dec 1 21:26:12 2020 +0800 ASoC: dt-bindings: mt8192-mt6359: fix typo in the example Both driver "sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c" and DT binding property use underscore version compatible string. Fixes the typo in the example. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20201201132614.1691352-5-tzungbi@google.com Signed-off-by: Mark Brown commit ba499c36d12bcea9d4eba0b021c508bfe13c515d Author: Tzung-Bi Shih Date: Tue Dec 1 21:26:11 2020 +0800 ASoC: mediatek: mt8192: move rt1015_rt5682 specific data Moves rt1015_rt5682 specific data right before the snd_soc_card definition for neat purpose. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20201201132614.1691352-4-tzungbi@google.com Signed-off-by: Mark Brown commit 2b53d2e16f735d8f13b77fefe03ce6b43c726beb Author: Tzung-Bi Shih Date: Tue Dec 1 21:26:10 2020 +0800 ASoC: mediatek: mt8192: extract rt1015_rt5682 specific DAI link Extracts rt1015_rt5682 specific DAI link from the common one. Fills the DAI link data according to of_match. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20201201132614.1691352-3-tzungbi@google.com Signed-off-by: Mark Brown commit a5f8037505cbae5b877dea3e15acce4c29e9e797 Author: Tzung-Bi Shih Date: Tue Dec 1 21:26:09 2020 +0800 ASoC: mediatek: mt8192: rename common symbols Renames common symbols from "mt8192_mt6359_rt1015_rt5682" to "mt8192_mt6359". They will share between a few machine drivers on MT8192 and MT6359 with some different audio components. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20201201132614.1691352-2-tzungbi@google.com Signed-off-by: Mark Brown commit 0d7f2459ae926a964ab211aac413d72074131727 Author: Sathyanarayana Nujella Date: Tue Dec 1 13:11:50 2020 -0800 ASoC: Intel: Boards: tgl_max98373: update TDM slot_width Speaker amp's SSP bclk configuration was changed in the topology file to be based on 12.288MHz and dai_ops->hw_params is based on s32le format. But, the TDM slot size remained set to 24 bits. This inconsistency created audible noises and needs to be corrected. This patch updates TDM slot width to 32. Fixes: bc7477fc2ab4 ("ASoC: Intel: Boards: tgl_max98373: Update TDM configuration in hw_params") Signed-off-by: Sathyanarayana Nujella Reviewed-by: Pierre-Louis Bossart Signed-off-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20201201211150.433472-1-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown commit 6091b2631032adafa1c8c0bd181aa5d153185c6f Author: Hans de Goede Date: Sat Nov 21 21:30:35 2020 +0100 ACPI: scan: Call acpi_get_object_info() from acpi_add_single_object() Call acpi_get_object_info() from acpi_add_single_object() instead of calling it from acpi_set_pnp_ids() and pass the result down to the latter so as to allow acpi_add_single_object() to use that data for other purposes. Signed-off-by: Hans de Goede [ rjw: Changelog rewrite ] Signed-off-by: Rafael J. Wysocki commit 637b9f1a1194cc671bac0039824cc472a2960b2f Author: Hans de Goede Date: Sat Nov 21 21:30:34 2020 +0100 ACPI: scan: Add acpi_info_matches_hids() helper acpi_device_dep_initialize() disergards _DEP "suppliers" with a _HID of "INT3396" and checks this using an acpi_device_info struct. Because in general there are other device IDs that need to be treated in the same way, add acpi_info_matches_hids() which checks a list of _HIDs for this purpose and switch acpi_device_dep_initialize() over to using it. Signed-off-by: Hans de Goede [ rjw: Changelog rewrite ] Signed-off-by: Rafael J. Wysocki commit 0cd3aa995740eabf8af1c794ac1d9ae314c928c3 Author: Michael Brunner Date: Mon Nov 23 15:53:27 2020 +0000 mfd: kempld-core: Add support for additional devices This update includes DMI IDs for the following Kontron modules and systems: COMe-bDV7, COMe-cDV7, COMe-m4AL, COMe-mCT10, SMARC-sXAL, SMARC-sXA4, Qseven-Q7AL, mITX-APL, pITX-APL and KBox A-203 Furthermore the ACPI HID KEM0000 is added, as it is also reserved for kempld devices. Instead of also adding the newly supported devices to the Kconfig description this patch removes the lengthy list. With future usage of the ACPI HIDs it will not be necessary to explicitly add support for each individual device to the driver and therefore the list would become incomplete anyway. Signed-off-by: Michael Brunner Reviewed-by: Guenter Roeck Signed-off-by: Lee Jones commit 1967939462641d8b36bcb3fcf06d48e66cd67a4f Author: Masahiro Yamada Date: Sun Nov 29 04:33:35 2020 +0900 Compiler Attributes: remove CONFIG_ENABLE_MUST_CHECK Revert commit cebc04ba9aeb ("add CONFIG_ENABLE_MUST_CHECK"). A lot of warn_unused_result warnings existed in 2006, but until now they have been fixed thanks to people doing allmodconfig tests. Our goal is to always enable __must_check where appropriate, so this CONFIG option is no longer needed. I see a lot of defconfig (arch/*/configs/*_defconfig) files having: # CONFIG_ENABLE_MUST_CHECK is not set I did not touch them for now since it would be a big churn. If arch maintainers want to clean them up, please go ahead. While I was here, I also moved __must_check to compiler_attributes.h from compiler_types.h Signed-off-by: Masahiro Yamada Acked-by: Jason A. Donenfeld Acked-by: Nathan Chancellor Reviewed-by: Nick Desaulniers [Moved addition in compiler_attributes.h to keep it sorted] Signed-off-by: Miguel Ojeda commit 06706da2bb5e239df31f39c7247087ac07fb039e Author: Tom Rix Date: Fri Nov 27 10:10:24 2020 -0800 platform/x86: thinkpad_acpi: remove trailing semicolon in macro definition The macro use will already have a semicolon. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20201127181024.2771890-1-trix@redhat.com Signed-off-by: Hans de Goede commit 2425ccd30fd78ce35237350fe8baac31dc18bd45 Author: Qinglang Miao Date: Wed Nov 25 14:50:32 2020 +0800 platform/x86: dell-smbios-base: Fix error return code in dell_smbios_init Fix to return the error code -ENODEV when fails to init wmi and smm. Fixes: 41e36f2f85af ("platform/x86: dell-smbios: Link all dell-smbios-* modules together") Reported-by: Hulk Robot Signed-off-by: Qinglang Miao Reviewed-by: Mario Limonciello Link: https://lore.kernel.org/r/20201125065032.154125-1-miaoqinglang@huawei.com Signed-off-by: Hans de Goede commit fe6000990394639ed374cb76c313be3640714f47 Author: Carlos Garnacho Date: Tue Dec 1 14:57:27 2020 +0100 platform/x86: intel-vbtn: Allow switch events on Acer Switch Alpha 12 This 2-in-1 model (Product name: Switch SA5-271) features a SW_TABLET_MODE that works as it would be expected, both when detaching the keyboard and when folding it behind the tablet body. It used to work until the introduction of the allow list at commit 8169bd3e6e193 ("platform/x86: intel-vbtn: Switch to an allow-list for SW_TABLET_MODE reporting"). Add this model to it, so that the Virtual Buttons device announces the EV_SW features again. Fixes: 8169bd3e6e193 ("platform/x86: intel-vbtn: Switch to an allow-list for SW_TABLET_MODE reporting") Cc: stable@vger.kernel.org Signed-off-by: Carlos Garnacho Link: https://lore.kernel.org/r/20201201135727.212917-1-carlosg@gnome.org Signed-off-by: Hans de Goede commit bab8c183d1d452f5fdc059aef2f0788bd2986231 Author: Mauro Carvalho Chehab Date: Wed Dec 2 09:27:14 2020 +0100 x86/sgx: Fix a typo in kernel-doc markup Fix the following kernel-doc warning: arch/x86/include/uapi/asm/sgx.h:19: warning: expecting prototype \ for enum sgx_epage_flags. Prototype was for enum sgx_page_flags instead [ bp: Launder the commit message. ] Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/ca11a4540d981cbd5f026b6cbc8931aa55654e00.1606897462.git.mchehab+huawei@kernel.org commit b0c03eff79a67aa43f17249dd42fac58e96718dc Author: Matheus Castello Date: Wed Nov 25 00:29:26 2020 -0300 drivers: hv: vmbus: Fix checkpatch SPLIT_STRING Checkpatch emits WARNING: quoted string split across lines. To keep the code clean and with the 80 column length indentation the check and registration code for kmsg_dump_register has been transferred to a new function hv_kmsg_dump_register. Signed-off-by: Matheus Castello Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20201125032926.17002-1-matheus@castello.eng.br Signed-off-by: Wei Liu commit 48f32a835373779c6357accd36cc34a4080b5065 Author: Baruch Siach Date: Wed Dec 2 09:15:34 2020 +0200 gpio: mvebu: switch pwm duration registers to regmap Commit 2233bf7a92e ("gpio: mvebu: switch to regmap for register access") changed most readl/writel registers access calls to the regmap API in preparation for Armada 7K/8K support. PWM duration registers were left using readl/writel, as the driver does not support PWM for Armada 7K/8K. Switch PWM duration registers to regmap as first step in adding Armada 7K/8K PWM functionality support. Reviewed-by: Andrew Lunn Signed-off-by: Baruch Siach Signed-off-by: Bartosz Golaszewski commit 64b19f6abedc0b7c8087b64e49f293bc4603ac23 Author: Baruch Siach Date: Wed Dec 2 09:15:33 2020 +0200 gpio: mvebu: update Armada XP per-CPU comment Commit 2233bf7a92e ("gpio: mvebu: switch to regmap for register access") introduced percpu_regs to replace percpu_membase. Update the comment to match. Cc: Thomas Petazzoni Fixes: 2233bf7a92e7 ("gpio: mvebu: switch to regmap for register access") Reviewed-by: Andrew Lunn Signed-off-by: Baruch Siach Signed-off-by: Bartosz Golaszewski commit 26ab12bb9d96133b7880141d68b5e01a8783de9d Author: Dexuan Cui Date: Tue Dec 1 16:45:10 2020 -0800 iommu/hyper-v: Remove I/O-APIC ID check from hyperv_irq_remapping_select() commit a491bb19f728 ("iommu/hyper-v: Implement select() method on remapping irqdomain") restricted the irq_domain_ops::select() callback to match on I/O-APIC index 0, which was correct until the parameter was changed to carry the I/O APIC ID in commit f36a74b9345a. If the ID is not 0 then the match fails. Therefore I/O-APIC init fails to retrieve the parent irqdomain for the I/O-APIC resulting in a boot panic: kernel BUG at arch/x86/kernel/apic/io_apic.c:2408! Fix it by matching the I/O-APIC independent of the ID as there is only one I/O APIC emulated by Hyper-V. [ tglx: Amended changelog ] Fixes: f36a74b9345a ("x86/ioapic: Use I/O-APIC ID for finding irqdomain, not index") Signed-off-by: Dexuan Cui Signed-off-by: Thomas Gleixner Reviewed-by: David Woodhouse Link: https://lore.kernel.org/r/20201202004510.1818-1-decui@microsoft.com commit 1d7637d89cfce54a4f4a41c2325288c2f47470e8 Author: Gabriel Krisman Bertazi Date: Fri Nov 27 14:32:33 2020 -0500 signal: Expose SYS_USER_DISPATCH si_code type SYS_USER_DISPATCH will be triggered when a syscall is sent to userspace by the Syscall User Dispatch mechanism. This adjusts eventual BUILD_BUG_ON around the tree. Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Thomas Gleixner Reviewed-by: Andy Lutomirski Acked-by: Kees Cook Acked-by: Christian Brauner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20201127193238.821364-3-krisman@collabora.com commit c5c878125ad5aca199dfc10b1af4010165aaa596 Author: Gabriel Krisman Bertazi Date: Fri Nov 27 14:32:32 2020 -0500 x86: vdso: Expose sigreturn address on vdso to the kernel Syscall user redirection requires the signal trampoline code to not be captured, in order to support returning with a locked selector while avoiding recursion back into the signal handler. For ia-32, which has the trampoline in the vDSO, expose the entry points to the kernel, such that it can avoid dispatching syscalls from that region to userspace. Suggested-by: Andy Lutomirski Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Thomas Gleixner Reviewed-by: Kees Cook Reviewed-by: Andy Lutomirski Acked-by: Andy Lutomirski Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20201127193238.821364-2-krisman@collabora.com commit 01fe185d95ba3cdd6629859dd911a94de8800562 Author: Thomas Gleixner Date: Wed Dec 2 01:34:40 2020 +0100 MAINTAINERS: Add entry for common entry code Signed-off-by: Thomas Gleixner commit 4ea6fa2cb921cb17812501a27c3761037d64a217 Author: Loic Poulain Date: Wed Dec 2 09:12:30 2020 +0100 mhi: pci_generic: Fix implicit conversion warning Fix the following warning with explicit cast: warning: implicit conversion from 'unsigned long long' to 'dma_addr_t' (aka 'unsigned int') mhi_cntrl->iova_stop = DMA_BIT_MASK(info->dma_data_width); Fixes: 855a70c12021 ("bus: mhi: Add MHI PCI support for WWAN modems") Signed-off-by: Loic Poulain Reported-by: kernel test robot Reviewed-by: Nathan Chancellor Reviewed-by: Manivannan Sadhasivam Signed-off-by: Manivannan Sadhasivam commit ab7dd2008b29e48cff216aa984902d59b583d36d Author: Tiezhu Yang Date: Tue Nov 24 19:11:27 2020 +0800 phy/rockchip: Make PHY_ROCKCHIP_INNO_HDMI depend on HAS_IOMEM to fix build error devm_ioremap_resource() will be not built in lib/devres.c if CONFIG_HAS_IOMEM is not set, and then there exists a build error about undefined reference to "devm_ioremap_resource" in the file phy-rockchip-inno-hdmi.c under COMPILE_TEST and CONFIG_PHY_ROCKCHIP_INNO_HDMI, make PHY_ROCKCHIP_INNO_HDMI depend on HAS_IOMEM to fix it. Reported-by: kernel test robot Signed-off-by: Tiezhu Yang Reviewed-by: Heiko Stuebner Link: https://lore.kernel.org/r/1606216287-14648-1-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Vinod Koul commit e04e60fce47e61743a8726d76b0149c1f4ad8957 Author: Pierre-Louis Bossart Date: Tue Nov 24 21:07:42 2020 +0800 soundwire: master: use pm_runtime_set_active() on add The 'master' device acts as a glue layer used during bus initialization only, and it needs to be 'transparent' for pm_runtime management. Its behavior should be that it becomes active when one of its children becomes active, and suspends when all of its children are suspended. In our tests on Intel platforms, we routinely see these sort of warnings on the initial boot: [ 21.447345] rt715 sdw:3:25d:715:0: runtime PM trying to activate child device sdw:3:25d:715:0 but parent (sdw-master-3) is not active This is root-caused to a missing setup to make the device 'active' on probe. Since we don't want the device to remain active forever after the probe, the autosuspend configuration is also enabled at the end of the probe - the device will actually autosuspend only in the case where there are no devices physically attached. In practice, the master device will suspend when all its children are no longer active. Fixes: bd84256e86ecf ('soundwire: master: enable pm runtime') Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20201124130742.10986-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 3eaf2da98993ecdf6e46a2b27cd31ef84a12e45f Author: Marek Szyprowski Date: Wed Dec 2 07:47:59 2020 +0100 phy: samsung: Merge Kconfig for Exynos5420 and Exynos5250 Exynos5420 variant of USB2 PHY is handled by the same code as the Exynos5250 one. Introducing a separate Kconfig symbol for it was an over-engineering, which turned out to cause build break for certain configurations: ERROR: modpost: "exynos5420_usb2_phy_config" [drivers/phy/samsung/phy-exynos-usb2.ko] undefined! Fix this by removing PHY_EXYNOS5420_USB2 symbol and using PHY_EXYNOS5250_USB2 also for Exynos5420 SoCs. Reported-by: Markus Reichl Fixes: 81b534f7e9b2 ("phy: samsung: Add support for the Exynos5420 variant of the USB2 PHY") Signed-off-by: Marek Szyprowski Acked-by: Krzysztof Kozlowski Reviewed-by: Jaehoon Chung Link: https://lore.kernel.org/r/20201202064759.24300-1-m.szyprowski@samsung.com Signed-off-by: Vinod Koul commit 5b7be9c709e10e88531f1f81e1150bbad65be1aa Author: Steven Rostedt (VMware) Date: Mon Nov 30 23:37:33 2020 -0500 ring-buffer: Add test to validate the time stamp deltas While debugging a situation where a delta for an event was calucalted wrong, I realize there was nothing making sure that the delta of events are correct. If a single event has an incorrect delta, then all events after it will also have one. If the discrepency gets large enough, it could cause the time stamps to go backwards when crossing sub buffers, that record a full 64 bit time stamp, and the new deltas are added to that. Add a way to validate the events at most events and when crossing a buffer page. This will help make sure that the deltas are always correct. This test will detect if they are ever corrupted. The test adds a high overhead to the ring buffer recording, as it does the audit for almost every event, and should only be used for testing the ring buffer. This will catch the bug that is fixed by commit 55ea4cf40380 ("ring-buffer: Update write stamp with the correct ts"), which is not applied when this commit is applied. Signed-off-by: Steven Rostedt (VMware) commit 6b4f503186b73e3da24c6716c8c7ea903e6b74d4 Author: Heiner Kallweit Date: Tue Dec 1 09:57:29 2020 +0100 r8169: set tc_offset only if tally counter reset isn't supported On chip versions supporting tally counter reset we currently update the counters after a reset although we know all counters are zero. Skip this unnecessary step. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/526618b2-b1bf-1844-b82a-dab2df7bdc8f@gmail.com Signed-off-by: Jakub Kicinski commit 87f75e5860e0a5609b0ac991ff1bd8fb0a4c7244 Merge: 06f90dde4eb0d 63e5afc86aeb1 Author: Jakub Kicinski Date: Tue Dec 1 18:05:38 2020 -0800 Merge branch 'net-ipa-ipa-v4-5-aggregation-and-qtime' Alex Elder says: ==================== net: ipa: IPA v4.5 aggregation and Qtime This series updates some IPA register definitions that change in substantive ways for IPA v4.5. One register defines parameters used by an endpoint to aggregate multiple packets into a buffer. The size and position of most fields in that register have changed with this new hardware version, and consequently the function that programs it needs to be done a bit differently. The first patch takes care of this. Second, IPA v4.5 introduces a unified time keeping component to be used in several places by the IPA hardware. A main clock divider provides a fundamental tick rate, and several timestamped features now define their granularity based on that. There is also a set of "pulse generators" derived from the main tick, and these are used to implement timers used for aggregation and head-of-line block avoidance. The second patch adds IPA register updates to support Qtime along with its configuration, and the last two patches configure the timers that use it. ==================== Link: https://lore.kernel.org/r/20201130233712.29113-1-elder@linaro.org Signed-off-by: Jakub Kicinski commit 63e5afc86aeb1a55bdfd8fe6dd5f6fb5fb90ed1a Author: Alex Elder Date: Mon Nov 30 17:37:12 2020 -0600 net: ipa: use Qtime for IPA v4.5 head-of-line time limit Extend ipa_reg_init_hol_block_timer_val() so it properly calculates the head-of-line block timeout to use for IPA v4.5. Introduce hol_block_timer_qtime_val() to compute the value to use for IPA v4.5, where Qtime is used as the basis of the timer. Call that function from hol_block_timer_val() for IPA v4.5. Both of these are private functions, so shorten their names a bit so they don't take up so much space on the line. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 1954704136d3d3f168fc38ebe4024d7574faf1ef Author: Alex Elder Date: Mon Nov 30 17:37:11 2020 -0600 net: ipa: use Qtime for IPA v4.5 aggregation time limit Change aggr_time_limit_encoded() to properly calculate the aggregation time limit to use for IPA v4.5. Older IPA versions program the AGGR_GRANULARITY field of the of the COUNTER_CFG register to set the granularity of the aggregation timer, which we configure to be 500 microseconds. Instead, IPA v4.5 selects between two possible granularity values derived from the 19.2 MHz Qtime clock. These granularities are 100 microseconds or 1 millisecond per tick. We use the smaller granularity if possible, unless the desired period is too large to be specified that way. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 36426411021a6b4082c6203a6e9ee244c5887026 Author: Alex Elder Date: Mon Nov 30 17:37:10 2020 -0600 net: ipa: set up IPA v4.5 Qtime configuration IPA v4.5 introduces a new unified timer architecture driven on the 19.2 MHz SoC crystal oscillator (XO). It is independent of the IPA core clock and avoids some duplication. Lower-resolution time stamps are derived from this by using only the high-order bits of the 19.2 MHz Qtime clock. And timers are derived from this based on "pulse generators" configured to fire at a fixed rate based on the Qtime clock. This patch introduces ipa_qtime_config(), which configures the Qtime mechanism for use. It also adds to the IPA register definitions related to timers and time stamping. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 6bf754c7e677a0fbd8915316e4a944a0aded9af1 Author: Alex Elder Date: Mon Nov 30 17:37:09 2020 -0600 net: ipa: update IPA aggregation registers for IPA v4.5 IPA v4.5 significantly changes the format of the configuration register used for endpoint aggregation. The AGGR_BYTE_LIMIT field is now larger, and the positions of other fields are shifted. This complicates the way we have to access this register because functions like u32_encode_bits() require their field mask argument to be constant. A further complication is that we want to know the maximum value representable by at least one of these fields, and that too requires a constant field mask. This patch adds support for IPA v4.5 endpoint aggregation registers in a way that continues to support "legacy" IPA hardware. It does so in a way that keeps field masks constant. First, for each variable field mask, we define an inline function whose return value is either the legacy value or the IPA v4.5 value. Second, we define functions for these fields that encode a value to use in each field based on the IPA version (this approach is already used elsewhere). The field mask provided is supplied by the function mentioned above. Finally, for the aggregation byte limit fields where we want to know the maximum representable value, we define a function that returns that maximum, computed from the appropriate field mask. We can no longer verify at build time that our buffer size is in the range that can be represented by the aggregation byte limit field. So remove the test done by a BUILD_BUG_ON() call in ipa_endpoint_validate_build(), and implement a comparable check at the top of ipa_endpoint_data_valid(). Doing that makes ipa_endpoint_validate_build() contain a single line BUILD_BUG_ON() call, so just remove that function and move the remaining line into ipa_endpoint_data_valid(). One final note: the aggregation time limit value for IPA v4.5 needs to be computed differently. That is handled in an upcoming patch. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 06f90dde4eb0d9ef9589a876c80f9ebf5d130737 Merge: d31c080075232 a3db10efcc4cc Author: Jakub Kicinski Date: Tue Dec 1 17:56:15 2020 -0800 Merge branch 'net-smc-add-support-for-generic-netlink-api' Karsten Graul says: ==================== net/smc: Add support for generic netlink API Up to version 4 this patch series was using the sock_diag netlink infrastructure. This version is using the generic netlink API. Generic netlink API offers a better type safety between kernel and userspace communication. Using the generic netlink API the smc module can now provide information about SMC linkgroups, links and devices (both for SMC-R and SMC-D). v2: Add missing include to uapi header smc_diag.h. v3: Apply code style recommendations from review comments. Instead of using EXPORTs to allow the smc_diag module to access data of the smc module, introduce struct smc_diag_ops and let smc_diag access the required data using function pointers. v4: Address checkpatch.pl warnings. Do not use static inline for functions. v5: Use generic netlink API instead of the sock_diag netlink infrastructure. v6: Integrate more review comments from Jakub. v7: Use nla_nest_start() with the new family. Use .maxattr=1 in the genl family and define one entry for attribute 1 in the policy to reject this attritbute for all commands. All other possible attributes are rejected because NL_VALIDATE_STRICT is set for the policy implicitely, which includes NL_VALIDATE_MAXTYPE. Setting policy[0].strict_start_type=1 does not work here because there is no valid attribute defined for this family, only plain commands. For any type > maxtype (which is .maxattr) validate_nla() would return 0 to userspace instead of -EINVAL. What helps here is __nla_validate_parse() which checks for type > maxtype and returns -EINVAL when NL_VALIDATE_MAXTYPE is set. This requires the one entry for type == .maxattr with .type = NLA_REJECT in the nla_policy. When a future command wants to allow attributes then it can easily specify a dedicated .policy for this new command in the genl_ops array. This dedicated policy overlays the global policy specified in the genl_family structure. ==================== Link: https://lore.kernel.org/r/20201201192049.53517-1-kgraul@linux.ibm.com Signed-off-by: Jakub Kicinski commit a3db10efcc4cc9c03a6375920179ade75ea2df7a Author: Guvenc Gulce Date: Tue Dec 1 20:20:49 2020 +0100 net/smc: Add support for obtaining SMCR device list Deliver SMCR device information via netlink based diagnostic interface. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit aaf95523d5824ebc2c8c185a2de51063a750c446 Author: Guvenc Gulce Date: Tue Dec 1 20:20:48 2020 +0100 net/smc: Add support for obtaining SMCD device list Deliver SMCD device information via netlink based diagnostic interface. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit 8f9dde4bf230f5c54a24c42a989dd9d88ec95695 Author: Guvenc Gulce Date: Tue Dec 1 20:20:47 2020 +0100 net/smc: Add SMC-D Linkgroup diagnostic support Deliver SMCD Linkgroup information via netlink based diagnostic interface. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit 5a7e09d58f3fe2f0d5e8f0da4b1f686491245eb5 Author: Guvenc Gulce Date: Tue Dec 1 20:20:46 2020 +0100 net/smc: Introduce SMCR get link command Introduce get link command which loops through all available links of all available link groups. It uses the SMC-R linkgroup list as entry point, not the socket list, which makes linkgroup diagnosis possible, in case linkgroup does not contain active connections anymore. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit e9b8c845cb342a3ab3d92235a54d0d1ad06d7204 Author: Guvenc Gulce Date: Tue Dec 1 20:20:45 2020 +0100 net/smc: Introduce SMCR get linkgroup command Introduce get linkgroup command which loops through all available SMCR linkgroups. It uses the SMC-R linkgroup list as entry point, not the socket list, which makes linkgroup diagnosis possible, in case linkgroup does not contain active connections anymore. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit 099b990bd11a3a96b5d59973f482018e5cbde6c3 Author: Guvenc Gulce Date: Tue Dec 1 20:20:44 2020 +0100 net/smc: Add support for obtaining system information Add new netlink command to obtain system information of the smc module. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit e8372d9d21451a2f2947c2b63b5184f3d4d0bff9 Author: Guvenc Gulce Date: Tue Dec 1 20:20:43 2020 +0100 net/smc: Introduce generic netlink interface for diagnostic purposes Introduce generic netlink interface infrastructure to expose the diagnostic information regarding smc linkgroups, links and devices. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit 49407ae2bc79da1ce29d6ff16c9acb45128b0bf6 Author: Guvenc Gulce Date: Tue Dec 1 20:20:42 2020 +0100 net/smc: Refactor smc ism v2 capability handling Encapsulate the smc ism v2 capability boolean value in a function for better information hiding. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit 6443b2f60e5754d344bd3a19a0bca9c8fb81737c Author: Guvenc Gulce Date: Tue Dec 1 20:20:41 2020 +0100 net/smc: Add diagnostic information to link structure During link creation add net-device ifindex and ib-device name to link structure. This is needed for diagnostic purposes. When diagnostic information is gathered, we need to traverse device, linkgroup and link structures, to be able to do that we need to hold a spinlock for the linkgroup list, without this diagnostic information in link structure, another device list mutex holding would be necessary to dereference the device pointer in the link structure which would be impossible when holding a spinlock already. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit 3d453f53c786ac4f1c97022f4bc0e9d7613a05c3 Author: Guvenc Gulce Date: Tue Dec 1 20:20:40 2020 +0100 net/smc: Add diagnostic information to smc ib-device During smc ib-device creation, add network device ifindex to smc ib-device structure. Register for netdevice changes and update ib-device accordingly. This is needed for diagnostic purposes. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit ddc992866f13373e3fd63fd70d9a4452e0d17d69 Author: Guvenc Gulce Date: Tue Dec 1 20:20:39 2020 +0100 net/smc: Add link counters for IB device ports Add link counters to the structure of the smc ib device, one counter per ib port. Increase/decrease the counters as needed in the corresponding routines. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit 07d51580ff6594dc7261821ee40b37392040db2a Author: Guvenc Gulce Date: Tue Dec 1 20:20:38 2020 +0100 net/smc: Add connection counters for links Add connection counters to the structure of the link. Increase/decrease the counters as needed in the corresponding routines. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit 8b2f0f44f06bd5f00d7d5e6c20a4dc3ec28e0ecd Author: Guvenc Gulce Date: Tue Dec 1 20:20:37 2020 +0100 net/smc: Use active link of the connection Use active link of the connection directly and not via linkgroup array structure when obtaining link data of the connection. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit 8cf3f3e42374cc030b814ee2202eba14c5812d14 Author: Karsten Graul Date: Tue Dec 1 20:20:36 2020 +0100 net/smc: use helper smc_conn_abort() in listen processing The helper smc_connect_abort() can be used by the listen processing functions, too. And rename this helper to smc_conn_abort() to make the purpose clearer. No functional change. Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit d31c080075232a37bf70ddc1fd9ea80433842f43 Author: Rohit Maheshwari Date: Tue Dec 1 14:37:52 2020 +0530 net/tls: make sure tls offload sets salt_size Recent changes made to remove AES constants started using protocol aware salt_size. ctx->prot_info's salt_size is filled in tls sw case, but not in tls offload mode, and was working so far because of the hard coded value was used. Fixes: 6942a284fb3e ("net/tls: make inline helpers protocol-aware") Signed-off-by: Rohit Maheshwari Link: https://lore.kernel.org/r/20201201090752.27355-1-rohitm@chelsio.com Signed-off-by: Jakub Kicinski commit 3a71e423133a4b1166ffafcb4a7cfa87ddecb910 Author: Masahiro Yamada Date: Sun Nov 22 04:36:57 2020 +0900 ARC: build: use $(READELF) instead of hard-coded readelf The top Makefile defines READELF as the readelf in the cross-toolchains. Use it rather than the host readelf. Signed-off-by: Masahiro Yamada Signed-off-by: Vineet Gupta commit a4e070cfeb9d4961a169a2f1a614665cf51de963 Author: Masahiro Yamada Date: Sun Nov 22 04:36:56 2020 +0900 ARC: build: remove unneeded extra-y Adding vmlinux.* to extra-y has no point because we expect they are built on demand while building uImage.* Add them to 'targets' is enough to include the corresponding .cmd file. Signed-off-by: Masahiro Yamada Signed-off-by: Vineet Gupta commit c5e6ae563c802c4d828d42e134af64004db2e58c Author: Masahiro Yamada Date: Sun Nov 22 04:36:55 2020 +0900 ARC: build: move symlink creation to arch/arc/Makefile to avoid race If you run 'make uImage uImage.gz' with the parallel option, uImage.gz will be created by two threads simultaneously. This is because arch/arc/Makefile does not specify the dependency between uImage and uImage.gz. Hence, GNU Make assumes they can be built in parallel. One thread descends into arch/arc/boot/ to create uImage, and another to create uImage.gz. Please notice the same log is displayed twice in the following steps: $ export CROSS_COMPILE= $ make -s ARCH=arc defconfig $ make -j$(nproc) ARCH=arc uImage uImage.gz [ snip ] LD vmlinux SORTTAB vmlinux SYSMAP System.map OBJCOPY arch/arc/boot/vmlinux.bin OBJCOPY arch/arc/boot/vmlinux.bin GZIP arch/arc/boot/vmlinux.bin.gz GZIP arch/arc/boot/vmlinux.bin.gz UIMAGE arch/arc/boot/uImage.gz UIMAGE arch/arc/boot/uImage.gz Image Name: Linux-5.10.0-rc4-00003-g62f23044 Created: Sun Nov 22 02:52:26 2020 Image Type: ARC Linux Kernel Image (gzip compressed) Data Size: 2109376 Bytes = 2059.94 KiB = 2.01 MiB Load Address: 80000000 Entry Point: 80004000 Image arch/arc/boot/uImage is ready Image Name: Linux-5.10.0-rc4-00003-g62f23044 Created: Sun Nov 22 02:52:26 2020 Image Type: ARC Linux Kernel Image (gzip compressed) Data Size: 2815455 Bytes = 2749.47 KiB = 2.69 MiB Load Address: 80000000 Entry Point: 80004000 This is a race between the two threads trying to write to the same file arch/arc/boot/uImage.gz. This is a potential problem that can generate a broken file. I fixed a similar problem for ARM by commit 3939f3345050 ("ARM: 8418/1: add boot image dependencies to not generate invalid images"). I highly recommend to avoid such build rules that cause a race condition. Move the uImage rule to arch/arc/Makefile. Another strangeness is that arch/arc/boot/Makefile compares the timestamps between $(obj)/uImage and $(obj)/uImage.*: $(obj)/uImage: $(obj)/uImage.$(suffix-y) @ln -sf $(notdir $<) $@ @echo ' Image $@ is ready' This does not work as expected since $(obj)/uImage is a symlink. The symlink should be created in a phony target rule. I used $(kecho) instead of echo to suppress the message 'Image arch/arc/boot/uImage is ready' when the -s option is given. Signed-off-by: Masahiro Yamada Signed-off-by: Vineet Gupta commit 0cfccb3c04934cdef42ae26042139f16e805b5f7 Author: Masahiro Yamada Date: Sun Nov 22 04:36:54 2020 +0900 ARC: build: add boot_targets to PHONY The top-level boot_targets (uImage and uImage.*) should be phony targets. They just let Kbuild descend into arch/arc/boot/ and create files there. If a file exists in the top directory with the same name, the boot image will not be created. You can confirm it by the following steps: $ export CROSS_COMPILE= $ make -s ARCH=arc defconfig all # vmlinux will be built $ touch uImage.gz $ make ARCH=arc uImage.gz CALL scripts/atomic/check-atomics.sh CALL scripts/checksyscalls.sh CHK include/generated/compile.h # arch/arc/boot/uImage.gz is not created Specify the targets as PHONY to fix this. Signed-off-by: Masahiro Yamada Signed-off-by: Vineet Gupta commit f2712ec76a5433e5ec9def2bd52a95df1f96d050 Author: Masahiro Yamada Date: Sun Nov 22 04:36:53 2020 +0900 ARC: build: add uImage.lzma to the top-level target arch/arc/boot/Makefile supports uImage.lzma, but you cannot do 'make uImage.lzma' because the corresponding target is missing in arch/arc/Makefile. Add it. I also changed the assignment operator '+=' to ':=' since this is the only place where we expect this variable to be set. Signed-off-by: Masahiro Yamada Signed-off-by: Vineet Gupta commit 9836720911cfec25d3fbdead1c438bf87e0f2841 Author: Masahiro Yamada Date: Sun Nov 22 04:36:52 2020 +0900 ARC: build: remove non-existing bootpImage from KBUILD_IMAGE The deb-pkg builds for ARCH=arc fail. $ export CROSS_COMPILE= $ make -s ARCH=arc defconfig $ make ARCH=arc bindeb-pkg SORTTAB vmlinux SYSMAP System.map MODPOST Module.symvers make KERNELRELEASE=5.10.0-rc4 ARCH=arc KBUILD_BUILD_VERSION=2 -f ./Makefile intdeb-pkg sh ./scripts/package/builddeb cp: cannot stat 'arch/arc/boot/bootpImage': No such file or directory make[4]: *** [scripts/Makefile.package:87: intdeb-pkg] Error 1 make[3]: *** [Makefile:1527: intdeb-pkg] Error 2 make[2]: *** [debian/rules:13: binary-arch] Error 2 dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2 make[1]: *** [scripts/Makefile.package:83: bindeb-pkg] Error 2 make: *** [Makefile:1527: bindeb-pkg] Error 2 The reason is obvious; arch/arc/Makefile sets $(boot)/bootpImage as the default image, but there is no rule to build it. Remove the meaningless KBUILD_IMAGE assignment so it will fallback to the default vmlinux. With this change, you can build the deb package. I removed the 'bootpImage' target as well. At best, it provides 'make bootpImage' as an alias of 'make vmlinux', but I do not see much sense in doing so. Signed-off-by: Masahiro Yamada Signed-off-by: Vineet Gupta commit 017909281eb0f8a00445840a36c799d3aed00841 Author: Martin Kaiser Date: Sun Nov 29 19:52:28 2020 +0100 mailbox: stm32-ipcc: cast void pointers to unsigned long Now that the driver can be enabled by COMPILE_TEST, we see warnings on 64bit platforms when void pointers are cast to unsigned int (and vice versa). warning: cast to smaller integer type 'unsigned int' from 'void *' unsigned int chan = (unsigned int)link->con_priv; ... warning: cast to 'void *' from smaller integer type 'unsigned int' ipcc->controller.chans[i].con_priv = (void *)i; Update these casts to use unsigned long variables, which are the same size as pointers on all platforms. Reported-by: kernel test robot Signed-off-by: Martin Kaiser Reviewed-by: Fabien Dessenne Signed-off-by: Jassi Brar commit 133af21f7c00a2bfc2b6c6aa7bfad4dc3eeb0401 Author: Martin Kaiser Date: Sun Nov 29 19:52:27 2020 +0100 mailbox: stm32-ipcc: remove duplicate error message platform_get_irq_byname already prints an error message if the requested irq was not found. Don't print another message in the driver. Signed-off-by: Martin Kaiser Reviewed-by: Fabien Dessenne Signed-off-by: Jassi Brar commit d68f17291ccf86442c3d367ba83581b81541baae Author: Martin Kaiser Date: Sun Nov 1 16:42:29 2020 +0100 mailbox: stm32-ipcc: add COMPILE_TEST dependency This allows compiling the driver on architectures where the hardware is not available. Most other mailbox drivers support this as well. Signed-off-by: Martin Kaiser Reviewed-by: Fabien Dessenne Signed-off-by: Jassi Brar commit 9905f728b0bda737fe2c2afd7c24f3365a45cc7b Author: Sudeep Holla Date: Mon Nov 30 10:28:04 2020 +0000 mailbox: arm_mhu_db: Fix mhu_db_shutdown by replacing kfree with devm_kfree The mhu_db_channel info is allocated per channel using devm_kzalloc from mhu_db_mbox_xlate which gets called from mbox_request_channel. However we are releasing the allocated mhu_db_channel info using plain kfree from mhu_db_shutdown which is called from mbox_free_channel. This leads to random crashes when the channel is freed like below one: Unable to handle kernel paging request at virtual address 0080000400000008 [0080000400000008] address between user and kernel address ranges Internal error: Oops: 96000044 [#1] PREEMPT SMP Modules linked in: scmi_module(-) CPU: 1 PID: 2212 Comm: rmmod Not tainted 5.10.0-rc5 #31 Hardware name: ARM LTD ARM Juno Development Platform/ARM Juno Development Platform, BIOS EDK II Nov 19 2020 pstate: 20000085 (nzCv daIf -PAN -UAO -TCO BTYPE=--) pc : release_nodes+0x74/0x230 lr : devres_release_all+0x40/0x68 Call trace: release_nodes+0x74/0x230 devres_release_all+0x40/0x68 device_release_driver_internal+0x12c/0x1f8 driver_detach+0x58/0xe8 bus_remove_driver+0x64/0xe0 driver_unregister+0x38/0x68 platform_driver_unregister+0x1c/0x28 scmi_driver_exit+0x38/0x44 [scmi_module] __arm64_sys_delete_module+0x188/0x260 el0_svc_common.constprop.0+0x80/0x1a8 do_el0_svc+0x2c/0x98 el0_sync_handler+0x160/0x168 el0_sync+0x174/0x180 Code: 1400000d eb07009f 54000460 f9400486 (f90004a6) ---[ end trace c55ffd306c140233 ]--- Fix it by replacing kfree with devm_kfree as required. Fixes: 7002ca237b21 ("mailbox: arm_mhu: Add ARM MHU doorbell driver") Reported-by: Cristian Marussi Signed-off-by: Sudeep Holla Tested-by: Cristian Marussi Reviewed-by: Cristian Marussi Signed-off-by: Jassi Brar commit 3d2f670a87b4ef68faa34cf53f8cf2c6695f5e1a Merge: 832913c31e2b1 79ba55a36e64c Author: Jakub Kicinski Date: Tue Dec 1 17:14:26 2020 -0800 Merge branch 'ionic-updates' Shannon Nelson says: ==================== ionic updates These are a pair of small code cleanups. ==================== Link: https://lore.kernel.org/r/20201201002546.4123-1-snelson@pensando.io Signed-off-by: Jakub Kicinski commit 79ba55a36e64c9b69b2b41667c869f6587cc0be4 Author: Shannon Nelson Date: Mon Nov 30 16:25:46 2020 -0800 ionic: change mtu after queues are stopped Order of operations is slightly more correct in the driver to change the netdev->mtu after the queues have been stopped rather than before. Signed-off-by: Shannon Nelson Signed-off-by: Jakub Kicinski commit c0c682eeb8ccb11c05c29c34820224b7556cdf19 Author: Shannon Nelson Date: Mon Nov 30 16:25:45 2020 -0800 ionic: remove some unnecessary oom messages Remove memory allocation fail messages where the OOM stack trace will make it obvious which allocation request failed. Signed-off-by: Shannon Nelson Signed-off-by: Jakub Kicinski commit 832913c31e2b1a5f17fb5633eb036d645f091f17 Author: Yejune Deng Date: Mon Nov 30 18:41:35 2020 +0800 net: phy: marvell: replace phy_modify() a set of phy_set_bits() looks more neater Signed-off-by: Yejune Deng Link: https://lore.kernel.org/r/1606732895-9136-1-git-send-email-yejune.deng@gmail.com Signed-off-by: Jakub Kicinski commit 87524494a7d939e6e120e893e2bdcc35599dfda1 Author: Gal Pressman Date: Tue Dec 1 11:18:11 2020 +0200 RDMA/efa: Use dma_set_mask_and_coherent() to simplify code Use dma_set_mask_and_coherent() instead of pci_set_dma_mask() followed by a pci_set_consistent_dma_mask(). Link: https://lore.kernel.org/r/20201201091811.37984-1-galpress@amazon.com Reviewed-by: Firas JahJah Reviewed-by: Yossi Leybovich Signed-off-by: Gal Pressman Signed-off-by: Jason Gunthorpe commit 05201e01be937be47e4c970c0a9eb6b6fb375b1e Author: Weihang Li Date: Sat Nov 28 18:22:39 2020 +0800 RDMA/hns: Refactor process of setting extended sge The variable 'cnt' is used to represent the max number of sge an SQ WQE can use at first, then it means how many extended sge an SQ has. In addition, this function has no need to return a value. So refactor and encapsulate the parts of getting number of extended sge a WQE can use to make it easier to understand. Link: https://lore.kernel.org/r/1606558959-48510-4-git-send-email-liweihang@huawei.com Signed-off-by: Weihang Li Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit d34895c319faa1e0fc1a48c3b06bba6a8a39ba44 Author: Yangyang Li Date: Sat Nov 28 18:22:38 2020 +0800 RDMA/hns: Bugfix for calculation of extended sge Page alignment is required when setting the number of extended sge according to the hardware's achivement. If the space of needed extended sge is greater than one page, the roundup_pow_of_two() can ensure that. But if the needed extended sge isn't 0 and can not be filled in a whole page, the driver should align it specifically. Fixes: 54d6638765b0 ("RDMA/hns: Optimize WQE buffer size calculating process") Link: https://lore.kernel.org/r/1606558959-48510-3-git-send-email-liweihang@huawei.com Signed-off-by: Yangyang Li Signed-off-by: Weihang Li Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 0fd0175e30e487f8d70ecb2cdd67fbb514fdf50f Author: Lang Cheng Date: Sat Nov 28 18:22:37 2020 +0800 RDMA/hns: Fix 0-length sge calculation error One RC SQ WQE can store 2 sges but UD can't, so ignore 2 valid sges of wr.sglist for RC which have been filled in WQE before setting extended sge. Either of RC and UD can not contain 0-length sges, so these 0-length sges should be skipped. Fixes: 54d6638765b0 ("RDMA/hns: Optimize WQE buffer size calculating process") Link: https://lore.kernel.org/r/1606558959-48510-2-git-send-email-liweihang@huawei.com Signed-off-by: Lang Cheng Signed-off-by: Weihang Li Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit aaea1babe73ea16672dea9d2566d1fe8e51277cf Merge: 2bf7d3776b749 8f4b6e35e270b Author: Jakub Kicinski Date: Tue Dec 1 16:56:05 2020 -0800 Merge branch 's390-ctcm-updates-2020-11-30' Julian Wiedmann says: ==================== s390/ctcm: updates 2020-11-30 Some rare ctcm updates by Sebastian, who cleans up all places where in_interrupt() was used to determine the correct GFP_* mask for allocations. In the first three patches we can get rid of those allocations entirely, as they just end up being copied into the skb. ==================== Link: https://lore.kernel.org/r/20201130100950.42051-1-jwi@linux.ibm.com Signed-off-by: Jakub Kicinski commit 8f4b6e35e270b3dca8943cf1a2de8d40b6074272 Author: Sebastian Andrzej Siewior Date: Mon Nov 30 11:09:50 2020 +0100 s390/ctcm: Use GFP_ATOMIC in ctcmpc_tx(). gfp_type() uses in_interrupt() to figure out the correct GFP mask. The usage of in_interrupt() in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be separated or the context be conveyed in an argument passed by the caller, which usually knows the context. ctcmpc_tx() is used as net_device_ops::ndo_start_xmit. This callback is invoked with disabled bottom halves. Use GFP_ATOMIC for memory allocation in ctcmpc_tx(). Remove gfp_type() since the last user is gone. Reviewed-by: Julian Wiedmann Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Julian Wiedmann Signed-off-by: Jakub Kicinski commit 04e4e469f99ae117080135d5069767f3c2455191 Author: Sebastian Andrzej Siewior Date: Mon Nov 30 11:09:49 2020 +0100 s390/ctcm: Use GFP_KERNEL in add_channel(). gfp_type() uses in_interrupt() to figure out the correct GFP mask. The usage of in_interrupt() in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be separated or the context be conveyed in an argument passed by the caller, which usually knows the context. The memory allocation of `ch' a few lines above is using GFP_KERNEL, also an allocation a few lines later is using GFP_KERNEL. Use GFP_KERNEL for the memory allocation. Reviewed-by: Julian Wiedmann Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Julian Wiedmann Signed-off-by: Jakub Kicinski commit 8dc4b6af0838cbad8e045a410667e7009bbc7c67 Author: Sebastian Andrzej Siewior Date: Mon Nov 30 11:09:48 2020 +0100 s390/ctcm: Use explicit allocation mask in ctcmpc_unpack_skb(). gfp_type() uses in_interrupt() to figure out the correct GFP mask. The usage of in_interrupt() in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be separated or the context be conveyed in an argument passed by the caller, which usually knows the context. The call chain of ctcmpc_unpack_skb(): ctcmpc_bh() -> ctcmpc_unpack_skb() ctcmpc_bh() is a tasklet handler so GFP_ATOMIC is needed. Use GFP_ATOMIC as allocation type in ctcmpc_unpack_skb(). Reviewed-by: Julian Wiedmann Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Julian Wiedmann Signed-off-by: Jakub Kicinski commit ca738f5aa94560a0848df3dba3bdcf761d39714d Author: Sebastian Andrzej Siewior Date: Mon Nov 30 11:09:47 2020 +0100 s390/ctcm: Avoid temporary allocation of struct pdu. The size of struct pdu is 8 byte. The memory is allocated, initialized, used and deallocated a few lines later. It is more efficient to avoid the allocation/free dance and assign the values directly to skb's data part instead of using memcpy() for it. Avoid an allocation of struct pdu and use the resulting skb pointer instead. Signed-off-by: Sebastian Andrzej Siewior [jwi: Fix-up the pdu_offset, adjust skb->len for the pushed length. Reflow the commit msg.] Signed-off-by: Julian Wiedmann Signed-off-by: Jakub Kicinski commit d38aa3962687d06e62bd7bae47a655f359261324 Author: Sebastian Andrzej Siewior Date: Mon Nov 30 11:09:46 2020 +0100 s390/ctcm: Avoid temporary allocation of struct qllc. The size of struct qllc is 2 byte. The memory for is allocated, initialized, used and deallocated a few lines later. It is more efficient to avoid the allocation/free dance and assign the values directly to skb's data part instead of using memcpy() for it. Avoid an allocation of struct qllc and use the resulting skb pointer instead. Signed-off-by: Sebastian Andrzej Siewior [jwi: remove a newline, reflow the commit msg] Signed-off-by: Julian Wiedmann Signed-off-by: Jakub Kicinski commit 94e0028a052ad3df1c0229f66104eff16525da11 Author: Sebastian Andrzej Siewior Date: Mon Nov 30 11:09:45 2020 +0100 s390/ctcm: Avoid temporary allocation of struct th_header and th_sweep. The size of struct th_header is 8 byte and the size of struct th_sweep is 16 byte. The memory for is allocated, initialized, used and deallocated a few lines later. It is more efficient to avoid the allocation/free dance and assign the values directly to skb's data part instead of using memcpy() for it. Avoid an allocation of struct th_sweep/th_header and use the resulting skb pointer instead. Signed-off-by: Sebastian Andrzej Siewior [jwi: use skb_put_zero(), instead of skb_put() + memset to 0] Signed-off-by: Julian Wiedmann Signed-off-by: Jakub Kicinski commit 2bf7d3776b7492a3585c876ab595254b2756437e Author: Chris Packham Date: Mon Nov 30 13:10:10 2020 +1300 net: freescale: ucc_geth: remove unused SKB_ALLOC_TIMEOUT This was added in commit ce973b141dfa ("[PATCH] Freescale QE UCC gigabit ethernet driver") but doesn't appear to have been used. Remove it now. Signed-off-by: Chris Packham Link: https://lore.kernel.org/r/20201130001010.28998-1-chris.packham@alliedtelesis.co.nz Signed-off-by: Jakub Kicinski commit 1d11d26cf0d6974551049a3d7353ee1336b8632e Author: Shiraz Saleem Date: Tue Nov 24 18:56:17 2020 -0600 RDMA/i40iw: Remove push code from i40iw The push feature does not work as expected in x722 and has historically been disabled in the driver. Purge all remaining code related to the push feature in i40iw. Link: https://lore.kernel.org/r/20201125005616.1800-3-shiraz.saleem@intel.com Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe commit 2b0a999ba003ea9b48910d75c318ae63246bc6f3 Merge: f93c39bc95472 b65054597872c Author: Jason Gunthorpe Date: Tue Dec 1 20:40:50 2020 -0400 Merge tag 'v5.10-rc6' into rdma.git for-next For dependencies in following patches Signed-off-by: Jason Gunthorpe commit 50cc18fcd3053fb46a09db5a39e6516e9560f765 Author: Sean V Kelley Date: Fri Nov 20 16:10:22 2020 -0800 PCI/AER: Write AER Capability only when we control it If an OS has not been granted AER control via _OSC, it should not make changes to PCI_ERR_ROOT_COMMAND and PCI_ERR_ROOT_STATUS related registers. Per section 4.5.1 of the System Firmware Intermediary (SFI) _OSC and DPC Updates ECN [1], this bit also covers these aspects of the PCI Express Advanced Error Reporting. Based on the above and earlier discussion [2], make the following changes: Add a check for the native case (i.e., AER control via _OSC) Note that the previous "clear, reset, enable" order suggests that the reset might cause errors that we should ignore. After this commit, those errors (if any) will remain logged in the PCI_ERR_ROOT_STATUS register. [1] System Firmware Intermediary (SFI) _OSC and DPC Updates ECN, Feb 24, 2020, affecting PCI Firmware Specification, Rev. 3.2 https://members.pcisig.com/wg/PCI-SIG/document/14076 [2] https://lore.kernel.org/linux-pci/20201020162820.GA370938@bjorn-Precision-5520/ Link: https://lore.kernel.org/r/20201121001036.8560-2-sean.v.kelley@intel.com Tested-by: Jonathan Cameron # non-native/no RCEC Signed-off-by: Sean V Kelley Signed-off-by: Bjorn Helgaas commit c214550ff8eae9623605149fa4e3da3ba43df145 Author: Vladimir Oltean Date: Sun Nov 29 22:05:50 2020 +0200 net: delete __dev_getfirstbyhwtype The last user of the RTNL brother of dev_getfirstbyhwtype (the latter being synchronized under RCU) has been deleted in commit b4db2b35fc44 ("afs: Use core kernel UUID generation"). Cc: Arnd Bergmann Cc: David Howells Cc: Eric Dumazet Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20201129200550.2433401-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit f7cf335c7d008543539708e8051d27c4265fa103 Merge: 7fe2af16e6a18 2fc30decf7308 Author: Jakub Kicinski Date: Tue Dec 1 15:38:46 2020 -0800 Merge branch 'net-tipc-fix-all-kernel-doc-and-add-tipc-networking-chapter' Randy Dunlap says: ==================== net/tipc: fix all kernel-doc and add TIPC networking chapter Fix lots of net/tipc/ kernel-doc warnings. Add many struct field and function parameter descriptions. Then add a TIPC chapter to the networking documentation book. All patches have been rebased to current net-next. Note: some of the struct members and function parameters are marked with "FIXME". They could use some additional descriptions if someone could help add to them. Thanks. ==================== Link: https://lore.kernel.org/r/20201129183251.7049-1-rdunlap@infradead.org Signed-off-by: Jakub Kicinski commit 2fc30decf730832f05a07fae710869c3577a36a8 Author: Randy Dunlap Date: Sun Nov 29 10:32:51 2020 -0800 net/tipc: add TIPC chapter to networking Documentation Add a TIPC chapter to the networking docbook. Signed-off-by: Randy Dunlap Signed-off-by: Jakub Kicinski commit 637b77fdca5c5e74e9f3f45aca9f52a763edd0ff Author: Randy Dunlap Date: Sun Nov 29 10:32:48 2020 -0800 net/tipc: fix all function Return: notation Fix Return: kernel-doc notation in all net/tipc/ source files. Also keep ReST list notation intact for output formatting. Fix a few typos in comments. Signed-off-by: Randy Dunlap Signed-off-by: Jakub Kicinski commit f172f4b81aea899b52923b77e01e2a247f14c207 Author: Randy Dunlap Date: Sun Nov 29 10:32:49 2020 -0800 net/tipc: fix socket.c kernel-doc Fix socket.c kernel-doc warnings in preparation for adding to the networking docbook. Also, for rcvbuf_limit(), use bullet notation so that the lines do not run together. ../net/tipc/socket.c:130: warning: Function parameter or member 'cong_links' not described in 'tipc_sock' ../net/tipc/socket.c:130: warning: Function parameter or member 'probe_unacked' not described in 'tipc_sock' ../net/tipc/socket.c:130: warning: Function parameter or member 'snd_win' not described in 'tipc_sock' ../net/tipc/socket.c:130: warning: Function parameter or member 'peer_caps' not described in 'tipc_sock' ../net/tipc/socket.c:130: warning: Function parameter or member 'rcv_win' not described in 'tipc_sock' ../net/tipc/socket.c:130: warning: Function parameter or member 'group' not described in 'tipc_sock' ../net/tipc/socket.c:130: warning: Function parameter or member 'oneway' not described in 'tipc_sock' ../net/tipc/socket.c:130: warning: Function parameter or member 'nagle_start' not described in 'tipc_sock' ../net/tipc/socket.c:130: warning: Function parameter or member 'snd_backlog' not described in 'tipc_sock' ../net/tipc/socket.c:130: warning: Function parameter or member 'msg_acc' not described in 'tipc_sock' ../net/tipc/socket.c:130: warning: Function parameter or member 'pkt_cnt' not described in 'tipc_sock' ../net/tipc/socket.c:130: warning: Function parameter or member 'expect_ack' not described in 'tipc_sock' ../net/tipc/socket.c:130: warning: Function parameter or member 'nodelay' not described in 'tipc_sock' ../net/tipc/socket.c:130: warning: Function parameter or member 'group_is_open' not described in 'tipc_sock' ../net/tipc/socket.c:267: warning: Function parameter or member 'sk' not described in 'tsk_advance_rx_queue' ../net/tipc/socket.c:295: warning: Function parameter or member 'sk' not described in 'tsk_rej_rx_queue' ../net/tipc/socket.c:295: warning: Function parameter or member 'error' not described in 'tsk_rej_rx_queue' ../net/tipc/socket.c:894: warning: Function parameter or member 'tsk' not described in 'tipc_send_group_msg' ../net/tipc/socket.c:1187: warning: Function parameter or member 'net' not described in 'tipc_sk_mcast_rcv' ../net/tipc/socket.c:1323: warning: Function parameter or member 'inputq' not described in 'tipc_sk_conn_proto_rcv' ../net/tipc/socket.c:1323: warning: Function parameter or member 'xmitq' not described in 'tipc_sk_conn_proto_rcv' ../net/tipc/socket.c:1885: warning: Function parameter or member 'sock' not described in 'tipc_recvmsg' ../net/tipc/socket.c:1993: warning: Function parameter or member 'sock' not described in 'tipc_recvstream' ../net/tipc/socket.c:2313: warning: Function parameter or member 'xmitq' not described in 'tipc_sk_filter_rcv' ../net/tipc/socket.c:2404: warning: Function parameter or member 'xmitq' not described in 'tipc_sk_enqueue' ../net/tipc/socket.c:2456: warning: Function parameter or member 'net' not described in 'tipc_sk_rcv' ../net/tipc/socket.c:2693: warning: Function parameter or member 'kern' not described in 'tipc_accept' ../net/tipc/socket.c:3816: warning: Excess function parameter 'sysctl_tipc_sk_filter' description in 'tipc_sk_filtering' Signed-off-by: Randy Dunlap Signed-off-by: Jakub Kicinski commit 4476441e4894b9108b6ddab3612e830416bf2ff9 Author: Randy Dunlap Date: Sun Nov 29 10:32:47 2020 -0800 net/tipc: fix node.c kernel-doc Fix node.c kernel-doc warnings in preparation for adding to the networking docbook. ../net/tipc/node.c:141: warning: Function parameter or member 'kref' not described in 'tipc_node' ../net/tipc/node.c:141: warning: Function parameter or member 'bc_entry' not described in 'tipc_node' ../net/tipc/node.c:141: warning: Function parameter or member 'failover_sent' not described in 'tipc_node' ../net/tipc/node.c:141: warning: Function parameter or member 'peer_id' not described in 'tipc_node' ../net/tipc/node.c:141: warning: Function parameter or member 'peer_id_string' not described in 'tipc_node' ../net/tipc/node.c:141: warning: Function parameter or member 'conn_sks' not described in 'tipc_node' ../net/tipc/node.c:141: warning: Function parameter or member 'keepalive_intv' not described in 'tipc_node' ../net/tipc/node.c:141: warning: Function parameter or member 'timer' not described in 'tipc_node' ../net/tipc/node.c:141: warning: Function parameter or member 'peer_net' not described in 'tipc_node' ../net/tipc/node.c:141: warning: Function parameter or member 'peer_hash_mix' not described in 'tipc_node' ../net/tipc/node.c:273: warning: Function parameter or member '__n' not described in 'tipc_node_crypto_rx' ../net/tipc/node.c:822: warning: Function parameter or member 'n' not described in '__tipc_node_link_up' ../net/tipc/node.c:822: warning: Function parameter or member 'bearer_id' not described in '__tipc_node_link_up' ../net/tipc/node.c:822: warning: Function parameter or member 'xmitq' not described in '__tipc_node_link_up' ../net/tipc/node.c:888: warning: Function parameter or member 'n' not described in 'tipc_node_link_up' ../net/tipc/node.c:888: warning: Function parameter or member 'bearer_id' not described in 'tipc_node_link_up' ../net/tipc/node.c:888: warning: Function parameter or member 'xmitq' not described in 'tipc_node_link_up' ../net/tipc/node.c:948: warning: Function parameter or member 'n' not described in '__tipc_node_link_down' ../net/tipc/node.c:948: warning: Function parameter or member 'bearer_id' not described in '__tipc_node_link_down' ../net/tipc/node.c:948: warning: Function parameter or member 'xmitq' not described in '__tipc_node_link_down' ../net/tipc/node.c:948: warning: Function parameter or member 'maddr' not described in '__tipc_node_link_down' ../net/tipc/node.c:1537: warning: Function parameter or member 'net' not described in 'tipc_node_get_linkname' ../net/tipc/node.c:1537: warning: Function parameter or member 'len' not described in 'tipc_node_get_linkname' ../net/tipc/node.c:1891: warning: Function parameter or member 'n' not described in 'tipc_node_check_state' ../net/tipc/node.c:1891: warning: Function parameter or member 'xmitq' not described in 'tipc_node_check_state' Signed-off-by: Randy Dunlap Signed-off-by: Jakub Kicinski commit 5c5d6796d42091c99e7192845a6f94b4754735a3 Author: Randy Dunlap Date: Sun Nov 29 10:32:46 2020 -0800 net/tipc: fix name_table.c kernel-doc Fix name_table.c kernel-doc warnings in preparation for adding to the networking docbook. ../net/tipc/name_table.c:115: warning: Function parameter or member 'start' not described in 'service_range_foreach_match' ../net/tipc/name_table.c:115: warning: Function parameter or member 'end' not described in 'service_range_foreach_match' ../net/tipc/name_table.c:127: warning: Function parameter or member 'start' not described in 'service_range_match_first' ../net/tipc/name_table.c:127: warning: Function parameter or member 'end' not described in 'service_range_match_first' ../net/tipc/name_table.c:176: warning: Function parameter or member 'start' not described in 'service_range_match_next' ../net/tipc/name_table.c:176: warning: Function parameter or member 'end' not described in 'service_range_match_next' ../net/tipc/name_table.c:225: warning: Function parameter or member 'type' not described in 'tipc_publ_create' ../net/tipc/name_table.c:225: warning: Function parameter or member 'lower' not described in 'tipc_publ_create' ../net/tipc/name_table.c:225: warning: Function parameter or member 'upper' not described in 'tipc_publ_create' ../net/tipc/name_table.c:225: warning: Function parameter or member 'scope' not described in 'tipc_publ_create' ../net/tipc/name_table.c:225: warning: Function parameter or member 'node' not described in 'tipc_publ_create' ../net/tipc/name_table.c:225: warning: Function parameter or member 'port' not described in 'tipc_publ_create' ../net/tipc/name_table.c:225: warning: Function parameter or member 'key' not described in 'tipc_publ_create' ../net/tipc/name_table.c:252: warning: Function parameter or member 'type' not described in 'tipc_service_create' ../net/tipc/name_table.c:252: warning: Function parameter or member 'hd' not described in 'tipc_service_create' ../net/tipc/name_table.c:367: warning: Function parameter or member 'sr' not described in 'tipc_service_remove_publ' ../net/tipc/name_table.c:367: warning: Function parameter or member 'node' not described in 'tipc_service_remove_publ' ../net/tipc/name_table.c:367: warning: Function parameter or member 'key' not described in 'tipc_service_remove_publ' ../net/tipc/name_table.c:383: warning: Function parameter or member 'pa' not described in 'publication_after' ../net/tipc/name_table.c:383: warning: Function parameter or member 'pb' not described in 'publication_after' ../net/tipc/name_table.c:401: warning: Function parameter or member 'service' not described in 'tipc_service_subscribe' ../net/tipc/name_table.c:401: warning: Function parameter or member 'sub' not described in 'tipc_service_subscribe' ../net/tipc/name_table.c:546: warning: Function parameter or member 'net' not described in 'tipc_nametbl_translate' ../net/tipc/name_table.c:546: warning: Function parameter or member 'type' not described in 'tipc_nametbl_translate' ../net/tipc/name_table.c:546: warning: Function parameter or member 'instance' not described in 'tipc_nametbl_translate' ../net/tipc/name_table.c:546: warning: Function parameter or member 'dnode' not described in 'tipc_nametbl_translate' ../net/tipc/name_table.c:762: warning: Function parameter or member 'net' not described in 'tipc_nametbl_withdraw' ../net/tipc/name_table.c:762: warning: Function parameter or member 'type' not described in 'tipc_nametbl_withdraw' ../net/tipc/name_table.c:762: warning: Function parameter or member 'lower' not described in 'tipc_nametbl_withdraw' ../net/tipc/name_table.c:762: warning: Function parameter or member 'upper' not described in 'tipc_nametbl_withdraw' ../net/tipc/name_table.c:762: warning: Function parameter or member 'key' not described in 'tipc_nametbl_withdraw' ../net/tipc/name_table.c:796: warning: Function parameter or member 'sub' not described in 'tipc_nametbl_subscribe' ../net/tipc/name_table.c:826: warning: Function parameter or member 'sub' not described in 'tipc_nametbl_unsubscribe' ../net/tipc/name_table.c:876: warning: Function parameter or member 'net' not described in 'tipc_service_delete' ../net/tipc/name_table.c:876: warning: Function parameter or member 'sc' not described in 'tipc_service_delete' Signed-off-by: Randy Dunlap Signed-off-by: Jakub Kicinski commit cb67296e8cc86c0021f5859f8671e2fb5b8d6df5 Author: Randy Dunlap Date: Sun Nov 29 10:32:45 2020 -0800 net/tipc: fix name_distr.c kernel-doc Fix name_distr.c kernel-doc warnings in preparation for adding to the networking docbook. ../net/tipc/name_distr.c:55: warning: Function parameter or member 'i' not described in 'publ_to_item' ../net/tipc/name_distr.c:55: warning: Function parameter or member 'p' not described in 'publ_to_item' ../net/tipc/name_distr.c:70: warning: Function parameter or member 'net' not described in 'named_prepare_buf' ../net/tipc/name_distr.c:70: warning: Function parameter or member 'type' not described in 'named_prepare_buf' ../net/tipc/name_distr.c:70: warning: Function parameter or member 'size' not described in 'named_prepare_buf' ../net/tipc/name_distr.c:70: warning: Function parameter or member 'dest' not described in 'named_prepare_buf' ../net/tipc/name_distr.c:88: warning: Function parameter or member 'net' not described in 'tipc_named_publish' ../net/tipc/name_distr.c:88: warning: Function parameter or member 'publ' not described in 'tipc_named_publish' ../net/tipc/name_distr.c:116: warning: Function parameter or member 'net' not described in 'tipc_named_withdraw' ../net/tipc/name_distr.c:116: warning: Function parameter or member 'publ' not described in 'tipc_named_withdraw' ../net/tipc/name_distr.c:147: warning: Function parameter or member 'net' not described in 'named_distribute' ../net/tipc/name_distr.c:147: warning: Function parameter or member 'seqno' not described in 'named_distribute' ../net/tipc/name_distr.c:199: warning: Function parameter or member 'net' not described in 'tipc_named_node_up' ../net/tipc/name_distr.c:199: warning: Function parameter or member 'dnode' not described in 'tipc_named_node_up' ../net/tipc/name_distr.c:199: warning: Function parameter or member 'capabilities' not described in 'tipc_named_node_up' ../net/tipc/name_distr.c:225: warning: Function parameter or member 'net' not described in 'tipc_publ_purge' ../net/tipc/name_distr.c:225: warning: Function parameter or member 'publ' not described in 'tipc_publ_purge' ../net/tipc/name_distr.c:225: warning: Function parameter or member 'addr' not described in 'tipc_publ_purge' ../net/tipc/name_distr.c:272: warning: Function parameter or member 'net' not described in 'tipc_update_nametbl' ../net/tipc/name_distr.c:272: warning: Function parameter or member 'i' not described in 'tipc_update_nametbl' ../net/tipc/name_distr.c:272: warning: Function parameter or member 'node' not described in 'tipc_update_nametbl' ../net/tipc/name_distr.c:272: warning: Function parameter or member 'dtype' not described in 'tipc_update_nametbl' ../net/tipc/name_distr.c:353: warning: Function parameter or member 'net' not described in 'tipc_named_rcv' ../net/tipc/name_distr.c:353: warning: Function parameter or member 'namedq' not described in 'tipc_named_rcv' ../net/tipc/name_distr.c:353: warning: Function parameter or member 'rcv_nxt' not described in 'tipc_named_rcv' ../net/tipc/name_distr.c:353: warning: Function parameter or member 'open' not described in 'tipc_named_rcv' ../net/tipc/name_distr.c:383: warning: Function parameter or member 'net' not described in 'tipc_named_reinit' Signed-off-by: Randy Dunlap Signed-off-by: Jakub Kicinski commit a99df449b01880646ded2c522d10552a5133b04e Author: Randy Dunlap Date: Sun Nov 29 10:32:44 2020 -0800 net/tipc: fix link.c kernel-doc Fix link.c kernel-doc warnings in preparation for adding to the networking docbook. ../net/tipc/link.c:200: warning: Function parameter or member 'session' not described in 'tipc_link' ../net/tipc/link.c:200: warning: Function parameter or member 'snd_nxt_state' not described in 'tipc_link' ../net/tipc/link.c:200: warning: Function parameter or member 'rcv_nxt_state' not described in 'tipc_link' ../net/tipc/link.c:200: warning: Function parameter or member 'in_session' not described in 'tipc_link' ../net/tipc/link.c:200: warning: Function parameter or member 'active' not described in 'tipc_link' ../net/tipc/link.c:200: warning: Function parameter or member 'if_name' not described in 'tipc_link' ../net/tipc/link.c:200: warning: Function parameter or member 'rst_cnt' not described in 'tipc_link' ../net/tipc/link.c:200: warning: Function parameter or member 'drop_point' not described in 'tipc_link' ../net/tipc/link.c:200: warning: Function parameter or member 'failover_reasm_skb' not described in 'tipc_link' ../net/tipc/link.c:200: warning: Function parameter or member 'failover_deferdq' not described in 'tipc_link' ../net/tipc/link.c:200: warning: Function parameter or member 'transmq' not described in 'tipc_link' ../net/tipc/link.c:200: warning: Function parameter or member 'backlog' not described in 'tipc_link' ../net/tipc/link.c:200: warning: Function parameter or member 'snd_nxt' not described in 'tipc_link' ../net/tipc/link.c:200: warning: Function parameter or member 'rcv_unacked' not described in 'tipc_link' ../net/tipc/link.c:200: warning: Function parameter or member 'deferdq' not described in 'tipc_link' ../net/tipc/link.c:200: warning: Function parameter or member 'window' not described in 'tipc_link' ../net/tipc/link.c:200: warning: Function parameter or member 'min_win' not described in 'tipc_link' ../net/tipc/link.c:200: warning: Function parameter or member 'ssthresh' not described in 'tipc_link' ../net/tipc/link.c:200: warning: Function parameter or member 'max_win' not described in 'tipc_link' ../net/tipc/link.c:200: warning: Function parameter or member 'cong_acks' not described in 'tipc_link' ../net/tipc/link.c:200: warning: Function parameter or member 'checkpoint' not described in 'tipc_link' ../net/tipc/link.c:200: warning: Function parameter or member 'reasm_tnlmsg' not described in 'tipc_link' ../net/tipc/link.c:200: warning: Function parameter or member 'last_gap' not described in 'tipc_link' ../net/tipc/link.c:200: warning: Function parameter or member 'last_ga' not described in 'tipc_link' ../net/tipc/link.c:200: warning: Function parameter or member 'bc_rcvlink' not described in 'tipc_link' ../net/tipc/link.c:200: warning: Function parameter or member 'bc_sndlink' not described in 'tipc_link' ../net/tipc/link.c:200: warning: Function parameter or member 'nack_state' not described in 'tipc_link' ../net/tipc/link.c:200: warning: Function parameter or member 'bc_peer_is_up' not described in 'tipc_link' ../net/tipc/link.c:473: warning: Function parameter or member 'self' not described in 'tipc_link_create' ../net/tipc/link.c:473: warning: Function parameter or member 'peer_id' not described in 'tipc_link_create' ../net/tipc/link.c:473: warning: Excess function parameter 'ownnode' description in 'tipc_link_create' ../net/tipc/link.c:544: warning: Function parameter or member 'ownnode' not described in 'tipc_link_bc_create' ../net/tipc/link.c:544: warning: Function parameter or member 'peer' not described in 'tipc_link_bc_create' ../net/tipc/link.c:544: warning: Function parameter or member 'peer_id' not described in 'tipc_link_bc_create' ../net/tipc/link.c:544: warning: Function parameter or member 'peer_caps' not described in 'tipc_link_bc_create' ../net/tipc/link.c:544: warning: Function parameter or member 'bc_sndlink' not described in 'tipc_link_bc_create' Signed-off-by: Randy Dunlap Signed-off-by: Jakub Kicinski commit ec6a1649fe27821207631e081f200c6d6f98d4e5 Author: Randy Dunlap Date: Sun Nov 29 10:32:42 2020 -0800 net/tipc: fix bearer.c for kernel-doc Fix kernel-doc warnings in bearer.c: ../net/tipc/bearer.c:77: warning: Function parameter or member 'name' not described in 'tipc_media_find' ../net/tipc/bearer.c:91: warning: Function parameter or member 'type' not described in 'media_find_id' ../net/tipc/bearer.c:105: warning: Function parameter or member 'buf' not described in 'tipc_media_addr_printf' ../net/tipc/bearer.c:105: warning: Function parameter or member 'len' not described in 'tipc_media_addr_printf' ../net/tipc/bearer.c:105: warning: Function parameter or member 'a' not described in 'tipc_media_addr_printf' ../net/tipc/bearer.c:174: warning: Function parameter or member 'net' not described in 'tipc_bearer_find' ../net/tipc/bearer.c:174: warning: Function parameter or member 'name' not described in 'tipc_bearer_find' ../net/tipc/bearer.c:238: warning: Function parameter or member 'net' not described in 'tipc_enable_bearer' ../net/tipc/bearer.c:238: warning: Function parameter or member 'name' not described in 'tipc_enable_bearer' ../net/tipc/bearer.c:238: warning: Function parameter or member 'disc_domain' not described in 'tipc_enable_bearer' ../net/tipc/bearer.c:238: warning: Function parameter or member 'prio' not described in 'tipc_enable_bearer' ../net/tipc/bearer.c:238: warning: Function parameter or member 'attr' not described in 'tipc_enable_bearer' ../net/tipc/bearer.c:350: warning: Function parameter or member 'net' not described in 'tipc_reset_bearer' ../net/tipc/bearer.c:350: warning: Function parameter or member 'b' not described in 'tipc_reset_bearer' ../net/tipc/bearer.c:374: warning: Function parameter or member 'net' not described in 'bearer_disable' ../net/tipc/bearer.c:374: warning: Function parameter or member 'b' not described in 'bearer_disable' ../net/tipc/bearer.c:462: warning: Function parameter or member 'net' not described in 'tipc_l2_send_msg' ../net/tipc/bearer.c:479: warning: Function parameter or member 'net' not described in 'tipc_l2_send_msg' Signed-off-by: Randy Dunlap Signed-off-by: Jakub Kicinski commit 5fcb7d47fef3862ee59d08d501dff7442b3ed391 Author: Randy Dunlap Date: Sun Nov 29 10:32:50 2020 -0800 net/tipc: fix various kernel-doc warnings kernel-doc and Sphinx fixes to eliminate lots of warnings in preparation for adding to the networking docbook. ../net/tipc/crypto.c:57: warning: cannot understand function prototype: 'enum ' ../net/tipc/crypto.c:69: warning: cannot understand function prototype: 'enum ' ../net/tipc/crypto.c:130: warning: Function parameter or member 'tfm' not described in 'tipc_tfm' ../net/tipc/crypto.c:130: warning: Function parameter or member 'list' not described in 'tipc_tfm' ../net/tipc/crypto.c:172: warning: Function parameter or member 'stat' not described in 'tipc_crypto_stats' ../net/tipc/crypto.c:232: warning: Function parameter or member 'flags' not described in 'tipc_crypto' ../net/tipc/crypto.c:329: warning: Function parameter or member 'ukey' not described in 'tipc_aead_key_validate' ../net/tipc/crypto.c:329: warning: Function parameter or member 'info' not described in 'tipc_aead_key_validate' ../net/tipc/crypto.c:482: warning: Function parameter or member 'aead' not described in 'tipc_aead_tfm_next' ../net/tipc/trace.c:43: warning: cannot understand function prototype: 'unsigned long sysctl_tipc_sk_filter[5] __read_mostly = ' Documentation/networking/tipc:57: ../net/tipc/msg.c:584: WARNING: Unexpected indentation. Documentation/networking/tipc:63: ../net/tipc/name_table.c:536: WARNING: Unexpected indentation. Documentation/networking/tipc:63: ../net/tipc/name_table.c:537: WARNING: Block quote ends without a blank line; unexpected unindent. Documentation/networking/tipc:78: ../net/tipc/socket.c:3809: WARNING: Unexpected indentation. Documentation/networking/tipc:78: ../net/tipc/socket.c:3807: WARNING: Inline strong start-string without end-string. Documentation/networking/tipc:72: ../net/tipc/node.c:904: WARNING: Unexpected indentation. Documentation/networking/tipc:39: ../net/tipc/crypto.c:97: WARNING: Block quote ends without a blank line; unexpected unindent. Documentation/networking/tipc:39: ../net/tipc/crypto.c:98: WARNING: Block quote ends without a blank line; unexpected unindent. Documentation/networking/tipc:39: ../net/tipc/crypto.c:141: WARNING: Inline strong start-string without end-string. ../net/tipc/discover.c:82: warning: Function parameter or member 'skb' not described in 'tipc_disc_init_msg' ../net/tipc/msg.c:69: warning: Function parameter or member 'gfp' not described in 'tipc_buf_acquire' ../net/tipc/msg.c:382: warning: Function parameter or member 'offset' not described in 'tipc_msg_build' ../net/tipc/msg.c:708: warning: Function parameter or member 'net' not described in 'tipc_msg_lookup_dest' ../net/tipc/subscr.c:65: warning: Function parameter or member 'seq' not described in 'tipc_sub_check_overlap' ../net/tipc/subscr.c:65: warning: Function parameter or member 'found_lower' not described in 'tipc_sub_check_overlap' ../net/tipc/subscr.c:65: warning: Function parameter or member 'found_upper' not described in 'tipc_sub_check_overlap' ../net/tipc/udp_media.c:75: warning: Function parameter or member 'proto' not described in 'udp_media_addr' ../net/tipc/udp_media.c:75: warning: Function parameter or member 'port' not described in 'udp_media_addr' ../net/tipc/udp_media.c:75: warning: Function parameter or member 'ipv4' not described in 'udp_media_addr' ../net/tipc/udp_media.c:75: warning: Function parameter or member 'ipv6' not described in 'udp_media_addr' ../net/tipc/udp_media.c:98: warning: Function parameter or member 'rcast' not described in 'udp_bearer' Also fixed a typo of "duest" to "dest". Signed-off-by: Randy Dunlap Signed-off-by: Jakub Kicinski commit ff10527e89826aaf76480ee47e6fd05213189963 Author: Randy Dunlap Date: Sun Nov 29 10:32:43 2020 -0800 net/tipc: fix tipc header files for kernel-doc Fix tipc header files for adding to the networking docbook. Remove some uses of "/**" that were not kernel-doc notation. Fix some source formatting to eliminate Sphinx warnings. Add missing struct member and function argument kernel-doc descriptions. Correct the description of a couple of struct members that were marked as "(FIXME)". Documentation/networking/tipc:18: ../net/tipc/name_table.h:65: WARNING: Unexpected indentation. Documentation/networking/tipc:18: ../net/tipc/name_table.h:66: WARNING: Block quote ends without a blank line; unexpected unindent. ../net/tipc/bearer.h:128: warning: Function parameter or member 'min_win' not described in 'tipc_media' ../net/tipc/bearer.h:128: warning: Function parameter or member 'max_win' not described in 'tipc_media' ../net/tipc/bearer.h:171: warning: Function parameter or member 'min_win' not described in 'tipc_bearer' ../net/tipc/bearer.h:171: warning: Function parameter or member 'max_win' not described in 'tipc_bearer' ../net/tipc/bearer.h:171: warning: Function parameter or member 'disc' not described in 'tipc_bearer' ../net/tipc/bearer.h:171: warning: Function parameter or member 'up' not described in 'tipc_bearer' ../net/tipc/bearer.h:171: warning: Function parameter or member 'refcnt' not described in 'tipc_bearer' ../net/tipc/name_distr.h:68: warning: Function parameter or member 'port' not described in 'distr_item' ../net/tipc/name_table.h:111: warning: Function parameter or member 'services' not described in 'name_table' ../net/tipc/name_table.h:111: warning: Function parameter or member 'cluster_scope_lock' not described in 'name_table' ../net/tipc/name_table.h:111: warning: Function parameter or member 'rc_dests' not described in 'name_table' ../net/tipc/name_table.h:111: warning: Function parameter or member 'snd_nxt' not described in 'name_table' ../net/tipc/subscr.h:67: warning: Function parameter or member 'kref' not described in 'tipc_subscription' ../net/tipc/subscr.h:67: warning: Function parameter or member 'net' not described in 'tipc_subscription' ../net/tipc/subscr.h:67: warning: Function parameter or member 'service_list' not described in 'tipc_subscription' ../net/tipc/subscr.h:67: warning: Function parameter or member 'conid' not described in 'tipc_subscription' ../net/tipc/subscr.h:67: warning: Function parameter or member 'inactive' not described in 'tipc_subscription' ../net/tipc/subscr.h:67: warning: Function parameter or member 'lock' not described in 'tipc_subscription' Signed-off-by: Randy Dunlap Signed-off-by: Jakub Kicinski commit 7fe2af16e6a18e0e5a34a139f2b2e38106d67e07 Merge: ac6e918554add 008cb2ec4354f Author: Jakub Kicinski Date: Tue Dec 1 15:21:15 2020 -0800 Merge branch 'mlxsw-add-support-for-802-1ad-bridging' Ido Schimmel says: ==================== mlxsw: Add support for 802.1ad bridging 802.1ad, also known as QinQ, is an extension to the 802.1q standard, which is concerned with passing possibly 802.1q-tagged packets through another VLAN-like tunnel. The format of 802.1ad tag is the same as 802.1q, except it uses the EtherType of 0x88a8, unlike 802.1q's 0x8100. Currently, mlxsw supports bridging with VLAN-unaware (802.1d) bridges and with VLAN-aware bridges whose VLAN protocol is 802.1q. This set adds support for VLAN-aware bridges whose VLAN protocol is 802.1ad. From mlxsw perspective, 802.1ad support entails two main changes: 1. Ports member in an 802.1ad bridge need to be configured to classify 802.1ad packets as tagged and all other packets as untagged 2. When pushing a VLAN at ingress (PVID), its EtherType needs to be 0x88a8 instead of 802.1q's 0x8100 The rest stays the same as with 802.1q bridges. A follow-up patch set will add support for QinQ with VXLAN, also known as QinVNI. Currently, linking of a VXLAN netdev to an 802.1ad bridge is vetoed and an error is returned to user space. Patch set overview: Patches #1-#2 add the registers required to configure the two changes described above. Patch #3 changes the device to only treat 802.1q packets as tagged by default, as opposed to both 802.1q and 802.1ad packets. This is more inline with the behavior supported by the driver. Patch #4 adds the ability to configure the EtherType when pushing a PVID at ingress. Patch #5 performs small refactoring to allow for code re-use in the next patch. Patch #6 adds support for 802.1ad bridging and allows mlxsw ports and their uppers to join such a bridge. Patch #7 changes the bridge driver to notify about changes to its VLAN protocol, so that these could be vetoed by mlxsw in the next patch. Patches #8-#9 teach mlxsw to veto unsupported 802.1ad configurations and add a corresponding selftest to make sure such configurations are indeed vetoed. ==================== Link: https://lore.kernel.org/r/20201129125407.1391557-1-idosch@idosch.org Signed-off-by: Jakub Kicinski commit 008cb2ec4354fa1c4a166eca8e5eec15112847b3 Author: Danielle Ratson Date: Sun Nov 29 14:54:07 2020 +0200 selftests: forwarding: Add QinQ veto testing Test that each veto that was added in the previous patch, is indeed vetoed. $ ./q_in_q_veto.sh TEST: create 802.1ad vlan upper on top of a front panel [ OK ] TEST: create 802.1ad vlan upper on top of a bridge port [ OK ] TEST: create 802.1ad vlan upper on top of a lag [ OK ] TEST: create 802.1ad vlan upper on top 802.1q bridge [ OK ] TEST: create 802.1ad vlan upper on top 802.1ad bridge [ OK ] TEST: create 802.1q vlan upper on top 802.1ad bridge [ OK ] TEST: create vlan upper on top of front panel enslaved to 802.1ad bridge [ OK ] TEST: create vlan upper on top of lag enslaved to 802.1ad bridge [ OK ] TEST: enslave front panel with vlan upper to 802.1ad bridge [ OK ] TEST: enslave lag with vlan upper to 802.1ad bridge [ OK ] TEST: IP address addition to 802.1ad bridge [ OK ] TEST: switch bridge protocol [ OK ] Signed-off-by: Danielle Ratson Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit 09139f67d34667ef92b7d76cddc7b37f2841bd3d Author: Danielle Ratson Date: Sun Nov 29 14:54:06 2020 +0200 mlxsw: Add QinQ configuration vetoes After adding support for QinQ, a.k.a 802.1ad protocol, there are a few scenarios that should be vetoed. The vetoes are motivated by various ASIC limitations. For example, a port that is member in a 802.1ad bridge cannot have 802.1q uppers as the port needs to be configured to treat 802.1q packets as untagged packets. Veto all those unsupported scenarios and return suitable messages. Signed-off-by: Danielle Ratson Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit 22ec19f3aee327806c37c9fa1188741574bc6445 Author: Danielle Ratson Date: Sun Nov 29 14:54:05 2020 +0200 bridge: switchdev: Notify about VLAN protocol changes Drivers that support bridge offload need to be notified about changes to the bridge's VLAN protocol so that they could react accordingly and potentially veto the change. Add a new switchdev attribute to communicate the change to drivers. Signed-off-by: Danielle Ratson Reviewed-by: Petr Machata Acked-by: Nikolay Aleksandrov Signed-off-by: Ido Schimmel Reviewed-by: Ivan Vecera Signed-off-by: Jakub Kicinski commit 80dfeafd64792a634054bfde63018aa564d82f0f Author: Amit Cohen Date: Sun Nov 29 14:54:04 2020 +0200 mlxsw: spectrum_switchdev: Add support of QinQ traffic 802.1ad, also known as QinQ is an extension to the 802.1q standard, which is concerned with passing possibly 802.1q-tagged packets through another VLAN-like tunnel. The format of 802.1ad tag is the same as 802.1q, except it uses the EtherType of 0x88a8, unlike 802.1q's 0x8100. Add support for 802.1ad protocol. Most of the configuration is the same as 802.1q. The difference is that before a port joins an 802.1ad bridge it needs to be configured to recognize 802.1ad packets as tagged and other packets (e.g., 802.1q) as untagged. VXLAN is not currently supported with 802.1ad bridge, so return an error with an appropriate extack message. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit 773ce33a48602126499bd603b9c804f15bf8c730 Author: Amit Cohen Date: Sun Nov 29 14:54:03 2020 +0200 mlxsw: spectrum_switchdev: Create common functions for VLAN-aware bridge The code in mlxsw_sp_bridge_8021q_port_{join, leave}() can be used also for 802.1ad bridge. Move the code to functions called mlxsw_sp_bridge_vlan_aware_port_{join, leave}() and call them from mlxsw_sp_bridge_8021q_port_{join, leave}() respectively to enable code reuse. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit 3ae7a65b6424154cb5d606ccae27ffd0ac76ed56 Author: Amit Cohen Date: Sun Nov 29 14:54:02 2020 +0200 mlxsw: Make EtherType configurable when pushing VLAN at ingress Currently, when pushing a PVID at ingress, mlxsw always uses 802.1q EtherType. Make this EtherType configurable by extending mlxsw_sp_port_pvid_set() with an EtherType argument. This is a preparation for QinQ support, that needs to push a PVID with 802.1ad EtherType. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit a2ef3ae15834183a43016cff2df3c51ea5bb445f Author: Amit Cohen Date: Sun Nov 29 14:54:01 2020 +0200 mlxsw: spectrum: Only treat 802.1q packets as tagged packets By default, the device considers both 802.1ad and 802.1q packets as tagged, but this is not supported by the driver. It only supports VLAN and bridge devices that use 802.1q protocol. Instead, configure the device to only treat 802.1q packets as tagged packets. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit 2a5a290d6d941ad51ce78314d5fcd76c1f9184a8 Author: Amit Cohen Date: Sun Nov 29 14:54:00 2020 +0200 mlxsw: reg: Add et_vlan field to SPVID register et_vlan field is used to configure which EtherType is used when VLAN is pushed at ingress (for untagged packets or for QinQ push mode). It will be used to configure tagging with ether_type1 (i.e., 0x88A8) for QinQ mode. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit 7e9a6620d5c3a9ac048d2cb5d1d116385ef31877 Author: Amit Cohen Date: Sun Nov 29 14:53:59 2020 +0200 mlxsw: reg: Add Switch Port VLAN Classification Register SPVC configures the port to identify packets as untagged / single tagged / double tagged packets based on the packet EtherTypes. It will be used to classify 802.1q packets as untagged and 802.1ad packets as tagged when received by ports member in a 802.1ad bridge. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit ac6e918554add29d004a08bd5c1102524287403c Merge: 9e39394faef6d d78e5b6a6764c Author: Jakub Kicinski Date: Tue Dec 1 15:16:33 2020 -0800 Merge branch 'net-hns3-updates-for-next' Huazhong Tan says: ==================== net: hns3: updates for -next This series includes some updates for the HNS3 ethernet driver. #1~#6: add some updates related to the checksum offload. #7: add support for multiple TCs' MAC pauce mode. ==================== Link: https://lore.kernel.org/r/1606535510-44346-1-git-send-email-tanhuazhong@huawei.com Signed-off-by: Jakub Kicinski commit d78e5b6a6764cb6e83668806b63d74566db36399 Author: Yonglong Liu Date: Sat Nov 28 11:51:50 2020 +0800 net: hns3: keep MAC pause mode when multiple TCs are enabled Bellow HNAE3_DEVICE_VERSION_V3, MAC pause mode just support one TC, when enabled multiple TCs, force enable PFC mode. HNAE3_DEVICE_VERSION_V3 can support MAC pause mode on multiple TCs, so when enable multiple TCs, just keep MAC pause mode, and enable PFC mode just according to the user settings. Signed-off-by: Yonglong Liu Signed-off-by: Huazhong Tan Signed-off-by: Jakub Kicinski commit ade36ccef1d7d830a17bbe7eba3a6223e81cdc80 Author: Huazhong Tan Date: Sat Nov 28 11:51:49 2020 +0800 net: hns3: add a check for devcie's verion in hns3_tunnel_csum_bug() For the device whose version is above V3(include V3), the hardware can do checksum offload for the non-tunnel udp packet, who has a dest port as the IANA assigned. So add a check for devcie's verion in hns3_tunnel_csum_bug(). Signed-off-by: Huazhong Tan Signed-off-by: Jakub Kicinski commit b1533ada7480237be6ffac86092495450f3de3a4 Author: Huazhong Tan Date: Sat Nov 28 11:51:48 2020 +0800 net: hns3: add more info to hns3_dbg_bd_info() Since TX hardware checksum and RX completion checksum have been supported now, so add related information in hns3_dbg_bd_info(). Signed-off-by: Huazhong Tan Signed-off-by: Jakub Kicinski commit 3e2816219d7ccae4ab4b5ed480566e05aef9cf1a Author: Huazhong Tan Date: Sat Nov 28 11:51:47 2020 +0800 net: hns3: add udp tunnel checksum segmentation support For the device who has the capability to handle udp tunnel checksum segmentation, add support for it. Signed-off-by: Huazhong Tan Signed-off-by: Jakub Kicinski commit 57e72c121c7fab33d643f97b617a2c2bb83ea533 Author: Huazhong Tan Date: Sat Nov 28 11:51:46 2020 +0800 net: hns3: remove unsupported NETIF_F_GSO_UDP_TUNNEL_CSUM Currently, device V1 and V2 do not support segmentation offload for UDP based tunnel packet who needs outer UDP checksum offload, so there is a workaround in the driver to set the checksum of the outer UDP checksum as zero. This is not what the user wants, so remove this feature for device V1 and V2, add support for it later(when the device has the ability to do that). Signed-off-by: Huazhong Tan Signed-off-by: Jakub Kicinski commit 66d52f3bf385c8d969e9ca6b281ddf773c9691d7 Author: Huazhong Tan Date: Sat Nov 28 11:51:45 2020 +0800 net: hns3: add support for TX hardware checksum offload For the device that supports TX hardware checksum, the hardware can calculate the checksum from the start and fill the checksum to the offset position, which reduces the operations of calculating the type and header length of L3/L4. So add this feature for the HNS3 ethernet driver. The previous simple BD description is unsuitable, rename it as HW TX CSUM. Signed-off-by: Huazhong Tan Signed-off-by: Jakub Kicinski commit 4b2fe769aad9736624147882e566eeeb8dd4c187 Author: Huazhong Tan Date: Sat Nov 28 11:51:44 2020 +0800 net: hns3: add support for RX completion checksum In some cases (for example ip fragment), hardware will calculate the checksum of whole packet in RX, and setup the HNS3_RXD_L2_CSUM_B flag in the descriptor, so add support to utilize this checksum. Signed-off-by: Huazhong Tan Signed-off-by: Jakub Kicinski commit 552a9cc02b0e8a63d802b3a80ceefce0c89cee8a Author: Lars Povlsen Date: Wed Nov 25 13:20:14 2020 +0100 pinctrl: pinctrl-microchip-sgpio: Add OF config dependency The pinctrl-microchip-sgpio driver needs OF support, so add that to Kconfig. Reported-by: Randy Dunlap Signed-off-by: Lars Povlsen Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20201125122014.11237-1-lars.povlsen@microchip.com Signed-off-by: Linus Walleij commit 7e5ea974e61c8dd0832dcfe931ef959b2eb02587 Author: Lars Povlsen Date: Fri Nov 13 15:51:50 2020 +0100 pinctrl: pinctrl-microchip-sgpio: Add pinctrl driver for Microsemi Serial GPIO This adds a pinctrl driver for the Microsemi/Microchip Serial GPIO (SGPIO) device used in various SoC's. The driver is added as a pinctrl driver, albeit only having just GPIO support currently. The hardware supports other functions that will be added following. Signed-off-by: Lars Povlsen Link: https://lore.kernel.org/r/20201113145151.68900-3-lars.povlsen@microchip.com Signed-off-by: Linus Walleij commit ce4d7816c827a35516ecd89303847e658d67b738 Author: Lars Povlsen Date: Fri Nov 13 15:51:49 2020 +0100 dt-bindings: pinctrl: Add bindings for pinctrl-microchip-sgpio driver This adds DT bindings for the Microsemi/Microchip SGPIO controller, bindings microchip,sparx5-sgpio, mscc,ocelot-sgpio and mscc,luton-sgpio. Signed-off-by: Lars Povlsen Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201113145151.68900-2-lars.povlsen@microchip.com Signed-off-by: Linus Walleij commit e5a4b7ea154ad08977453f4879e7983e2c490eee Merge: 6b99afc01a5bc c5564a50d9901 Author: Linus Walleij Date: Tue Dec 1 23:54:32 2020 +0100 Merge tag 'samsung-pinctrl-5.11' of https://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/samsung into devel Samsung pinctrl drivers changes for v5.11 Only a cleanup of unneeded breaks. commit 6b99afc01a5bc01f205966bff74dbfee86a78344 Merge: b6071c8914648 7ba4a9591a8ac Author: Linus Walleij Date: Tue Dec 1 23:53:37 2020 +0100 Merge tag 'renesas-pinctrl-for-v5.11-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: renesas: Updates for v5.11 (take two) - Add QSPI pin groups on R-Car E3, H3, M3-W/W+, and M3-N, - A small fix for a Clang warning. commit 0c7a7e1a8ff3fb6d01467b43c62760e6bf0afab3 Author: David Gow Date: Mon Nov 9 23:29:36 2020 -0800 kunit: kunit_tool: Correctly parse diagnostic messages Currently, kunit_tool expects all diagnostic lines in test results to contain ": " somewhere, as both the subtest header and the crash report do. Fix this to accept any line starting with (minus indent) "# " as being a valid diagnostic line. This matches what the TAP spec[1] and the draft KTAP spec[2] are expecting. [1]: http://testanything.org/tap-specification.html [2]: https://lore.kernel.org/linux-kselftest/CY4PR13MB1175B804E31E502221BC8163FD830@CY4PR13MB1175.namprd13.prod.outlook.com/T/ Signed-off-by: David Gow Acked-by: Marco Elver Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan commit 1f0e943df68ab407f523d9f47d96a535686a2293 Author: Daniel Latypov Date: Mon Nov 23 14:57:59 2020 -0800 Documentation: kunit: provide guidance for testing many inputs usage.rst goes into a detailed section about faking out classes, but currently lacks wording about how one might idiomatically test a range of inputs. Add a new chapter for "Common Patterns" and group "Isolating behvaior" and this new section under there. Give an example of how one might test a hash function via macros/helper funcs and a table-driven test and very briefly discuss pros and cons. Also highlight the KUNIT_EXPECT_*_MSG() variants (that aren't mentioned elsewhere [1]) which are particularly useful in these situations. It is also criminally underused at the moment, only appearing in 2 tests (both written by people involved in KUnit). [1] not even on https://www.kernel.org/doc/html/latest/dev-tools/kunit/api/test.html Signed-off-by: Daniel Latypov Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan commit 977115c0f664e016a6b2774d4f97116ade23d732 Author: Christoph Hellwig Date: Thu Nov 26 10:41:07 2020 +0100 block: stop using bdget_disk for partition 0 We can just dereference the point in struct gendisk instead. Also remove the now unused export. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 0d02129e76edf91cf04fabf1efbc3a9a1f1d729a Author: Christoph Hellwig Date: Fri Nov 27 16:43:51 2020 +0100 block: merge struct block_device and struct hd_struct Instead of having two structures that represent each block device with different life time rules, merge them into a single one. This also greatly simplifies the reference counting rules, as we can use the inode reference count as the main reference count for the new struct block_device, with the device model reference front ending it for device model interaction. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 9499ffc7521742e3fea32f6ac6c1213b6fc4e914 Author: Christoph Hellwig Date: Tue Nov 24 09:21:57 2020 +0100 f2fs: remove a few bd_part checks bd_part is never NULL for a block device in use by a file system, so remove the checks. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Chao Yu Signed-off-by: Jens Axboe commit ad1eaa5344b293552b6ba43f5709c76a9aa14d17 Author: Christoph Hellwig Date: Tue Nov 24 09:52:59 2020 +0100 block: switch disk_part_iter_* to use a struct block_device Switch the partition iter infrastructure to iterate over block_device references instead of hd_struct ones mostly used to get at the block_device. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 71773cf797490e1cbe4909b25a2543937e7eea82 Author: Christoph Hellwig Date: Tue Nov 24 09:20:37 2020 +0100 block: pass a block_device to invalidate_partition Pass the block_device actually needed instead of looking it up using bdget_disk. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 9fc995a6e08349b5c5baff2cc31544b96ee2b1c3 Author: Christoph Hellwig Date: Tue Nov 24 09:17:46 2020 +0100 block: pass a block_device to blk_alloc_devt Pass the block_device actually needed instead of the hd_struct. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 41e5c81984eac8ce87f2b4f57fec0bd90a049b2b Author: Christoph Hellwig Date: Tue Nov 24 09:37:14 2020 +0100 block: remove the partno field from struct hd_struct Just use the bd_partno field in struct block_device everywhere. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 8446fe9255be821cb38ffd306d7e8edc4b9ea662 Author: Christoph Hellwig Date: Tue Nov 24 09:36:54 2020 +0100 block: switch partition lookup to use struct block_device Use struct block_device to lookup partitions on a disk. This removes all usage of struct hd_struct from the I/O path. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Hannes Reinecke Acked-by: Coly Li [bcache] Acked-by: Chao Yu [f2fs] Signed-off-by: Jens Axboe commit cb8432d650fe3be58bb962bc8e602dc405510327 Author: Christoph Hellwig Date: Thu Nov 26 18:47:17 2020 +0100 block: allocate struct hd_struct as part of struct bdev_inode Allocate hd_struct together with struct block_device to pre-load the lifetime rule changes in preparation of merging the two structures. Note that part0 was previously embedded into struct gendisk, but is a separate allocation now, and already points to the block_device instead of the hd_struct. The lifetime of struct gendisk is still controlled by the struct device embedded in the part0 hd_struct. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 83950d359010a493462d58c712b1124c877d1b3b Author: Christoph Hellwig Date: Mon Nov 23 16:36:02 2020 +0100 block: move the policy field to struct block_device Move the policy field to struct block_device and rename it to the more descriptive bd_read_only. Also turn the field into a bool as it is used as such. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit b309e9936347232c724eaa13f70533128b4864e9 Author: Christoph Hellwig Date: Mon Nov 23 16:28:47 2020 +0100 block: move make_it_fail to struct block_device Move the make_it_fail flag to struct block_device an turn it into a bool in preparation of killing struct hd_struct. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 1bdd5ae0251d678488dffcf455d4633c2beef1bc Author: Christoph Hellwig Date: Mon Nov 23 19:00:13 2020 +0100 block: move holder_dir to struct block_device Move the holder_dir field to struct block_device in preparation for kill struct hd_struct. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 231926dbf0f084211e4ec4f4c006f0bf1f47809a Author: Christoph Hellwig Date: Tue Nov 24 12:01:45 2020 +0100 block: move the partition_meta_info to struct block_device Move the partition_meta_info to struct block_device in preparation for killing struct hd_struct. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 29ff57c61094e7bbd921ab10b5a99dce9a0132e0 Author: Christoph Hellwig Date: Tue Nov 24 09:34:24 2020 +0100 block: move the start_sect field to struct block_device Move the start_sect field to struct block_device in preparation of killing struct hd_struct. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 15e3d2c5cd53298272e59ad9072d3468f9dd3781 Author: Christoph Hellwig Date: Tue Nov 24 09:34:00 2020 +0100 block: move disk stat accounting to struct block_device Move the dkstats and stamp field to struct block_device in preparation of killing struct hd_struct. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit a782483cc1f875355690625d8253a232f2581418 Author: Christoph Hellwig Date: Thu Nov 26 18:43:37 2020 +0100 block: remove the nr_sects field in struct hd_struct Now that the hd_struct always has a block device attached to it, there is no need for having two size field that just get out of sync. Additionally the field in hd_struct did not use proper serialization, possibly allowing for torn writes. By only using the block_device field this problem also gets fixed. Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jan Kara Reviewed-by: Hannes Reinecke Acked-by: Coly Li [bcache] Acked-by: Chao Yu [f2fs] Signed-off-by: Jens Axboe commit e6cb53827ed60019bbbc5cf189dd204b3b0e8121 Author: Christoph Hellwig Date: Mon Nov 23 15:41:40 2020 +0100 block: initialize struct block_device in bdev_alloc Don't play tricks with slab constructors as bdev structures tends to not get reused very much, and this makes the code a lot less error prone. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Hannes Reinecke Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit c64dc3bd87097e7f08b9437819440f8bfddef995 Author: Christoph Hellwig Date: Mon Nov 23 16:38:15 2020 +0100 block: simplify part_to_disk Now that struct hd_struct has a block_device pointer use that to find the disk. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Hannes Reinecke Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit 37c3fc9abb25cd767ad5b048358336ac89488c16 Author: Christoph Hellwig Date: Wed Nov 25 21:20:08 2020 +0100 block: simplify the block device claiming interface Stop passing the whole device as a separate argument given that it can be trivially deducted and cleanup the !holder debug check. Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jan Kara Reviewed-by: Hannes Reinecke Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit a954ea812018a84d350b316c39a2be3edc4b7ca8 Author: Christoph Hellwig Date: Mon Nov 23 13:29:55 2020 +0100 block: remove ->bd_contains Now that each hd_struct has a reference to the corresponding block_device, there is no need for the bd_contains pointer. Add a bdev_whole() helper to look up the whole device block_device struture instead. Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jan Kara Reviewed-by: Hannes Reinecke Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit 22ae8ce8b89241c94ac00c237752c0ffa37ba5ae Author: Christoph Hellwig Date: Thu Nov 26 09:23:26 2020 +0100 block: simplify bdev/disk lookup in blkdev_get To simplify block device lookup and a few other upcoming areas, make sure that we always have a struct block_device available for each disk and each partition, and only find existing block devices in bdget. The only downside of this is that each device and partition uses a little more memory. The upside will be that a lot of code can be simplified. With that all we need to look up the block device is to lookup the inode and do a few sanity checks on the gendisk, instead of the separate lookup for the gendisk. For blk-cgroup which wants to access a gendisk without opening it, a new blkdev_{get,put}_no_open low-level interface is added to replace the previous get_gendisk use. Note that the change to look up block device directly instead of the two step lookup using struct gendisk causes a subtile change in behavior: accessing a non-existing partition on an existing block device can now cause a call to request_module. That call is harmless, and in practice no recent system will access these nodes as they aren't created by udev and static /dev/ setups are unusual. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 4e7b5671c6a883d94b5428e1a9c141bbd56cb2a6 Author: Christoph Hellwig Date: Mon Nov 23 13:38:40 2020 +0100 block: remove i_bdev Switch the block device lookup interfaces to directly work with a dev_t so that struct block_device references are only acquired by the blkdev_get variants (and the blk-cgroup special case). This means that we now don't need an extra reference in the inode and can generally simplify handling of struct block_device to keep the lookups contained in the core block layer code. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Hannes Reinecke Acked-by: Tejun Heo Acked-by: Coly Li [bcache] Signed-off-by: Jens Axboe commit 7918f0f6fdafa1e52c2d77c537cb55ef25fb69a3 Author: Christoph Hellwig Date: Mon Nov 23 13:44:44 2020 +0100 block: opencode devcgroup_inode_permission Just call devcgroup_check_permission to avoid various superflous checks and a double conversion of the access flags. Signed-off-by: Christoph Hellwig Acked-by: Tejun Heo Reviewed-by: Jan Kara Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 63d9932caecee8b0a295c608d083280b45885d10 Author: Christoph Hellwig Date: Thu Nov 26 09:22:18 2020 +0100 block: move bdput() to the callers of __blkdev_get This will allow for a more symmetric calling convention going forward. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 5b56b6ed574b583b07da9d824c1eca6d67c1074e Author: Christoph Hellwig Date: Mon Nov 23 10:19:22 2020 +0100 block: refactor blkdev_get Move more code that is only run on the outer open but not the open of the underlying whole device when opening a partition into blkdev_get, which leads to a much easier to follow structure. This allows to simplify the disk and module refcounting so that one reference is held for each open, similar to what we do with normal file operations. Signed-off-by: Christoph Hellwig Acked-by: Tejun Heo Reviewed-by: Jan Kara Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit ec5d451438a2f24c9b9c33c195bc2c39dcd3d3f0 Author: Christoph Hellwig Date: Tue Nov 17 12:01:26 2020 +0100 block: refactor __blkdev_put Reorder the code to have one big section for the last close, and to use bdev_is_partition. Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jan Kara Reviewed-by: Hannes Reinecke Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit 013b0e96ae2225a649b48a2f8fc4f87429483cb1 Author: Christoph Hellwig Date: Sat Nov 14 19:41:48 2020 +0100 init: cleanup match_dev_by_uuid and match_dev_by_label Avoid a totally pointless goto label, and use the same style of comparism for both helpers. Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jan Kara Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit e036bb8e0cdf9dbac3b76fb0a576100eaa81f0be Author: Christoph Hellwig Date: Sat Nov 14 19:35:28 2020 +0100 init: refactor devt_from_partuuid The code in devt_from_partuuid is very convoluted. Refactor a bit by sanitizing the goto and variable name usage. Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jan Kara Reviewed-by: Hannes Reinecke Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit c2637e80a09e0d6c698d2771d7230f59c2138122 Author: Christoph Hellwig Date: Sat Nov 14 19:19:57 2020 +0100 init: refactor name_to_dev_t Split each case into a self-contained helper, and move the block dependent code entirely under the pre-existing #ifdef CONFIG_BLOCK. This allows to remove the blk_lookup_devt stub in genhd.h. Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jan Kara Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit 3a4174e68684e43ecdcb59126a441b29d5e94f7f Author: Christoph Hellwig Date: Fri Nov 27 16:45:27 2020 +0100 block: switch bdgrab to use igrab All of the current callers already have a reference, but to prepare for additional users ensure bdgrab returns NULL if the block device is being freed. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe commit 612c6aa7817f1c89b6a92fc724331aa7c9d77f6e Author: Christoph Hellwig Date: Mon Nov 9 17:52:02 2020 +0100 block: change the hash used for looking up block devices Adding the minor to the major creates tons of pointless conflicts. Just use the dev_t itself, which is 32-bits and thus is guaranteed to fit into ino_t. Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jan Kara Reviewed-by: Hannes Reinecke Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit efdc41c8d49fc1ff9bbef8f68f1cf1d8d59164a1 Author: Christoph Hellwig Date: Tue Nov 10 07:25:37 2020 +0100 block: use put_device in put_disk Use put_device to put the device instead of poking into the internals and using kobject_put. Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jan Kara Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit e79319af6d8cfd7311fef1bfbb1c59c94e6e10a9 Author: Christoph Hellwig Date: Tue Nov 10 06:48:53 2020 +0100 block: use disk_part_iter_exit in disk_part_iter_next Call disk_part_iter_exit in disk_part_iter_next instead of duplicating the functionality. Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jan Kara Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit 8d65269fe8065fee889bca5b204d711b0695a8f6 Author: Christoph Hellwig Date: Tue Nov 17 08:18:55 2020 +0100 block: add a bdev_kobj helper Add a little helper to find the kobject for a struct block_device. Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jan Kara Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Acked-by: Tejun Heo Acked-by: Coly Li [bcache] Acked-by: David Sterba [btrfs] Signed-off-by: Jens Axboe commit 3f50b95e0edd22824b2650eb65466bf7060f7488 Author: Christoph Hellwig Date: Tue Nov 24 09:43:52 2020 +0100 block: remove a superflous check in blkpg_do_ioctl sector_t is now always a u64, so this check is not needed. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit b601d148a16ea16dfbaf3600be35ee175847a09b Author: Christoph Hellwig Date: Fri Nov 27 16:21:52 2020 +0100 block: remove a duplicate __disk_get_part prototype Signed-off-by: Christoph Hellwig Acked-by: Tejun Heo Reviewed-by: Jan Kara Reviewed-by: Greg Kroah-Hartman Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe commit b0519b542303bc167d22bf11dadd3f18d37dbfe2 Author: Christoph Hellwig Date: Fri Nov 27 16:21:42 2020 +0100 dm: remove the block_device reference in struct mapped_device Get rid of the long-lasting struct block_device reference in struct mapped_device. The only remaining user is the freeze code, where we can trivially look up the block device at freeze time and release the reference at thaw time. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Acked-by: Mike Snitzer Signed-off-by: Jens Axboe commit 47d951023a242bb159534573a4a76fef9a31dc9b Author: Christoph Hellwig Date: Sat Nov 7 09:30:05 2020 +0100 dm: simplify flush_bio initialization in __send_empty_flush We don't really need the struct block_device to initialize a bio. So switch from using bio_set_dev to manually setting up bi_disk (bi_partno will always be zero and has been cleared by bio_init already). Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Acked-by: Mike Snitzer Signed-off-by: Jens Axboe commit f46f2a3198017cff1f3f8f71de74ff7abee3aa16 Author: Christoph Hellwig Date: Mon Nov 16 15:38:30 2020 +0100 loop: do not call set_blocksize set_blocksize is used by file systems to use their preferred buffer cache block size. Block drivers should not set it. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe commit ee763e2143e79fa41d2818e620e1e8ff69af87bf Author: Christoph Hellwig Date: Mon Nov 16 15:43:46 2020 +0100 zram: do not call set_blocksize set_blocksize is used by file systems to use their preferred buffer cache block size. Block drivers should not set it. Signed-off-by: Christoph Hellwig Acked-by: Minchan Kim Signed-off-by: Jens Axboe commit a6419fd810c6b3b060f75b69b09d25ea2ac1f200 Author: Christoph Hellwig Date: Tue Jun 30 16:33:54 2020 +0200 mtip32xx: remove the call to fsync_bdev on removal del_gendisk already calls fsync_bdev for every partition, no need to do this twice. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe commit 040f04bd2e825f1d80b14a0e0ac3d830339eb779 Author: Christoph Hellwig Date: Tue Nov 24 11:54:06 2020 +0100 fs: simplify freeze_bdev/thaw_bdev Store the frozen superblock in struct block_device to avoid the awkward interface that can return a sb only used a cookie, an ERR_PTR or NULL. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Acked-by: Chao Yu [f2fs] Signed-off-by: Jens Axboe commit 60b498852bf219c0bf2b0864c69972840978ca43 Author: Christoph Hellwig Date: Mon Nov 16 15:21:18 2020 +0100 fs: remove get_super_thawed and get_super_exclusive_thawed Just open code the wait in the only caller of both functions. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 5df1a6726973ee2444e11f16daa013971dc52e8b Author: Christoph Hellwig Date: Mon Nov 16 14:33:37 2020 +0100 filemap: consistently use ->f_mapping over ->i_mapping Use file->f_mapping in all remaining places that have a struct file available to properly handle the case where inode->i_mapping != file_inode(file)->i_mapping. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Reviewed-by: Matthew Wilcox (Oracle) Signed-off-by: Jens Axboe commit 3a651b3a27a1ee35879499ead3942dc854a20968 Author: Cong Wang Date: Tue Nov 17 18:25:34 2020 +0800 iommu: avoid taking iova_rbtree_lock twice Both find_iova() and __free_iova() take iova_rbtree_lock, there is no reason to take and release it twice inside free_iova(). Fold them into one critical section by calling the unlock versions instead. Signed-off-by: Cong Wang Reviewed-by: Robin Murphy Signed-off-by: John Garry Link: https://lore.kernel.org/r/1605608734-84416-5-git-send-email-john.garry@huawei.com Signed-off-by: Will Deacon commit fb8284a50e9f7c5506f55bc2ab8762a0f1b855ab Author: Lee Jones Date: Thu Nov 26 13:42:34 2020 +0000 drm/amd/display/amdgpu_dm/amdgpu_dm_helpers: Use 'gnu_printf' format notation Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_helpers.c: In function ‘dm_dtn_log_append_v’: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_helpers.c:345:2: warning: function ‘dm_dtn_log_append_v’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_helpers.c:375:3: warning: function ‘dm_dtn_log_append_v’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit da03e4224b254b419be6670ff30e1af4cd6ef9b2 Author: Lee Jones Date: Thu Nov 26 13:42:31 2020 +0000 drm/amd/pm/powerplay/kv_dpm: Remove unused variable 'ret' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../pm/powerplay/kv_dpm.c: In function ‘kv_dpm_powergate_uvd’: drivers/gpu/drm/amd/amdgpu/../pm/powerplay/kv_dpm.c:1678:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] drivers/gpu/drm/amd/amdgpu/../pm/powerplay/kv_dpm.c: In function ‘kv_dpm_powergate_vce’: drivers/gpu/drm/amd/amdgpu/../pm/powerplay/kv_dpm.c:1706:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 6ee5a7957aceef415419ab5a557932290759b350 Author: Lee Jones Date: Thu Nov 26 13:42:40 2020 +0000 drm/amd/display/dc/basics/vector: Make local function 'dal_vector_presized_costruct' static Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/basics/vector.c:55:6: warning: no previous prototype for ‘dal_vector_presized_costruct’ [-Wmissing-prototypes] Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 3dcd202599d3be80976a1dc7ff29f87e252c8d59 Author: Lee Jones Date: Thu Nov 26 13:42:39 2020 +0000 drm/amd/display/dc/basics/fixpt31_32: Remove unused variable 'dc_fixpt_pi' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/basics/fixpt31_32.c:29:32: warning: ‘dc_fixpt_pi’ defined but not used [-Wunused-const-variable=] Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Lee Jones Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit ef80cb02d5f1041f10f7e7406a5b77b9ccfb810d Author: Lee Jones Date: Thu Nov 26 13:42:38 2020 +0000 drm/amd/display/dc/basics/conversion: Include header containing our prototypes Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/basics/conversion.c:34:10: warning: no previous prototype for ‘fixed_point_to_int_frac’ [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/dc/basics/conversion.c:81:6: warning: no previous prototype for ‘convert_float_matrix’ [-Wmissing-prototypes] Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 679c6771b6c85fd8a127719c7363171f380817c3 Author: Lee Jones Date: Thu Nov 26 13:42:37 2020 +0000 drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu: Remove unused function 'pp_nv_set_pme_wa_enable()' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:664:20: warning: no previous prototype for ‘pp_nv_set_pme_wa_enable’ [-Wmissing-prototypes] Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 3d3e9cddd7471b250aed6530bc186515d75021de Author: Lee Jones Date: Thu Nov 26 13:42:36 2020 +0000 drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu: Mark local functions invoked by reference as static Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:538:6: warning: no previous prototype for ‘pp_rv_set_wm_ranges’ [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:590:6: warning: no previous prototype for ‘pp_rv_set_pme_wa_enable’ [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:601:6: warning: no previous prototype for ‘pp_rv_set_active_display_count’ [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:614:6: warning: no previous prototype for ‘pp_rv_set_min_deep_sleep_dcfclk’ [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:627:6: warning: no previous prototype for ‘pp_rv_set_hard_min_dcefclk_by_freq’ [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:640:6: warning: no previous prototype for ‘pp_rv_set_hard_min_fclk_by_freq’ [-Wmissing-prototypes] Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 15e480371b74e0993652f8558b6d936c965e1964 Author: Lee Jones Date: Thu Nov 26 13:42:35 2020 +0000 drm/amd/display/amdgpu_dm/amdgpu_dm_color: Demote a misuse and fix another kernel-doc header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c:128: warning: Function parameter or member 'lut' not described in '__drm_lut_to_dc_gamma' drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c:128: warning: Function parameter or member 'gamma' not described in '__drm_lut_to_dc_gamma' drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c:128: warning: Function parameter or member 'is_legacy' not described in '__drm_lut_to_dc_gamma' drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c:426: warning: Function parameter or member 'dc_plane_state' not described in 'amdgpu_dm_update_plane_color_mgmt' Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 50fe434196dafae18099adcc69687abb431b6e8a Author: Lee Jones Date: Thu Nov 26 13:42:33 2020 +0000 drm/amd/display/dc/inc/hw/dpp: Mark 'dpp_input_csc_matrix' as __maybe_unused 'dpp_input_csc_matrix' is used by some, but not all source files which include dpp.h. Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/inc/hw/dpp.h:50:42: warning: ‘dpp_input_csc_matrix’ defined but not used [-Wunused-const-variable=] NB: Snipped lots of these for brevity Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 7a31972c316745a688a60733558963476a828a65 Author: Lee Jones Date: Thu Nov 26 13:42:30 2020 +0000 drm/amd/pm/powerplay/hwmgr/vega12_thermal: Fix some outdated function documentation Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:63: warning: Cannot understand * @fn vega12_enable_fan_control_feature drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:137: warning: Function parameter or member 'hwmgr' not described in 'vega12_fan_ctrl_reset_fan_speed_to_default' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:147: warning: Function parameter or member 'hwmgr' not described in 'vega12_thermal_get_temperature' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:172: warning: Function parameter or member 'hwmgr' not described in 'vega12_thermal_set_temperature_range' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:172: warning: Function parameter or member 'range' not described in 'vega12_thermal_set_temperature_range' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:208: warning: Function parameter or member 'hwmgr' not described in 'vega12_thermal_enable_alert' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:226: warning: Function parameter or member 'hwmgr' not described in 'vega12_thermal_disable_alert' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:240: warning: Function parameter or member 'hwmgr' not described in 'vega12_thermal_stop_thermal_controller' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:256: warning: Function parameter or member 'hwmgr' not described in 'vega12_thermal_setup_fan_table' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:279: warning: Function parameter or member 'hwmgr' not described in 'vega12_thermal_start_smc_fan_control' Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 19744ada5c3b218c63ba2613f9d3158c1f81416e Author: Lee Jones Date: Thu Nov 26 13:42:29 2020 +0000 drm/amd/pm/powerplay/hwmgr/vega20_thermal: Fix some outdated function documentation Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_thermal.c:217: warning: Function parameter or member 'hwmgr' not described in 'vega20_thermal_get_temperature' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_thermal.c:242: warning: Function parameter or member 'hwmgr' not described in 'vega20_thermal_set_temperature_range' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_thermal.c:242: warning: Function parameter or member 'range' not described in 'vega20_thermal_set_temperature_range' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_thermal.c:278: warning: Function parameter or member 'hwmgr' not described in 'vega20_thermal_enable_alert' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_thermal.c:296: warning: Function parameter or member 'hwmgr' not described in 'vega20_thermal_disable_alert' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_thermal.c:310: warning: Function parameter or member 'hwmgr' not described in 'vega20_thermal_stop_thermal_controller' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_thermal.c:326: warning: Function parameter or member 'hwmgr' not described in 'vega20_thermal_setup_fan_table' Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit d3c648ec62b05b994745093b308908a7ef33e6f3 Author: Lee Jones Date: Thu Nov 26 13:42:28 2020 +0000 drm/amd/pm/powerplay/hwmgr/smu_helper: Demote or fix kernel-doc headers Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu_helper.c:112: warning: Function parameter or member 'hwmgr' not described in 'phm_wait_on_register' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu_helper.c:112: warning: Function parameter or member 'index' not described in 'phm_wait_on_register' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu_helper.c:112: warning: Function parameter or member 'value' not described in 'phm_wait_on_register' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu_helper.c:112: warning: Function parameter or member 'mask' not described in 'phm_wait_on_register' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu_helper.c:145: warning: Function parameter or member 'hwmgr' not described in 'phm_wait_on_indirect_register' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu_helper.c:145: warning: Function parameter or member 'indirect_port' not described in 'phm_wait_on_indirect_register' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu_helper.c:145: warning: Function parameter or member 'index' not described in 'phm_wait_on_indirect_register' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu_helper.c:145: warning: Function parameter or member 'value' not described in 'phm_wait_on_indirect_register' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu_helper.c:145: warning: Function parameter or member 'mask' not described in 'phm_wait_on_indirect_register' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu_helper.c:494: warning: Function parameter or member 'hwmgr' not described in 'phm_initializa_dynamic_state_adjustment_rule_settings' Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit e0ef04b8d0d11f326985bde306b58d6c69c1c8e6 Author: Lee Jones Date: Thu Nov 26 13:42:27 2020 +0000 drm/amd/pm/powerplay/hwmgr/hwmgr: Move 'vega20_hwmgr_init()'s prototype to shared header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_hwmgr.c:4403:5: warning: no previous prototype for ‘vega20_hwmgr_init’ [-Wmissing-prototypes] 4403 | int vega20_hwmgr_init(struct pp_hwmgr *hwmgr) | ^~~~~~~~~~~~~~~~~ Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 4cbcfd60d5e01ad78594a2d288c465c670d7f674 Author: Lee Jones Date: Thu Nov 26 13:42:26 2020 +0000 drm/amd/pm/powerplay/hwmgr/hwmgr: Move 'vega12_hwmgr_init()'s prototype to shared header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_hwmgr.c:2862:5: warning: no previous prototype for ‘vega12_hwmgr_init’ [-Wmissing-prototypes] 2862 | int vega12_hwmgr_init(struct pp_hwmgr *hwmgr) | ^~~~~~~~~~~~~~~~~ Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit d92616480e766b8a96201591a298f39edbacda15 Author: Lee Jones Date: Thu Nov 26 13:42:24 2020 +0000 drm/amd/pm/powerplay/hwmgr/vega10_thermal: Fix a bunch of dated function doc formatting Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:128: warning: Function parameter or member 'hwmgr' not described in 'vega10_fan_ctrl_set_static_mode' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:128: warning: Function parameter or member 'mode' not described in 'vega10_fan_ctrl_set_static_mode' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:157: warning: Function parameter or member 'hwmgr' not described in 'vega10_fan_ctrl_set_default_mode' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:176: warning: Cannot understand * @fn vega10_enable_fan_control_feature drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:252: warning: Function parameter or member 'hwmgr' not described in 'vega10_fan_ctrl_set_fan_speed_percent' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:252: warning: Function parameter or member 'speed' not described in 'vega10_fan_ctrl_set_fan_speed_percent' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:290: warning: Function parameter or member 'hwmgr' not described in 'vega10_fan_ctrl_reset_fan_speed_to_default' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:307: warning: Function parameter or member 'hwmgr' not described in 'vega10_fan_ctrl_set_fan_speed_rpm' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:307: warning: Function parameter or member 'speed' not described in 'vega10_fan_ctrl_set_fan_speed_rpm' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:339: warning: Function parameter or member 'hwmgr' not described in 'vega10_thermal_get_temperature' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:365: warning: Function parameter or member 'hwmgr' not described in 'vega10_thermal_set_temperature_range' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:365: warning: Function parameter or member 'range' not described in 'vega10_thermal_set_temperature_range' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:414: warning: Function parameter or member 'hwmgr' not described in 'vega10_thermal_initialize' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:437: warning: Function parameter or member 'hwmgr' not described in 'vega10_thermal_enable_alert' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:468: warning: Function parameter or member 'hwmgr' not described in 'vega10_thermal_disable_alert' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:496: warning: Function parameter or member 'hwmgr' not described in 'vega10_thermal_stop_thermal_controller' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:515: warning: Function parameter or member 'hwmgr' not described in 'vega10_thermal_setup_fan_table' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:618: warning: Function parameter or member 'hwmgr' not described in 'vega10_thermal_start_smc_fan_control' Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit aa68e9a3cada4834e4141cffdbb9baf183e6ad2d Author: Lee Jones Date: Thu Nov 26 13:42:23 2020 +0000 drm/amd/pm/powerplay/hwmgr/smu7_thermal: Repair formatting in a bunch of function docs Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:112: warning: Function parameter or member 'hwmgr' not described in 'smu7_fan_ctrl_set_static_mode' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:112: warning: Function parameter or member 'mode' not described in 'smu7_fan_ctrl_set_static_mode' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:137: warning: Function parameter or member 'hwmgr' not described in 'smu7_fan_ctrl_set_default_mode' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:209: warning: Function parameter or member 'hwmgr' not described in 'smu7_fan_ctrl_set_fan_speed_percent' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:209: warning: Function parameter or member 'speed' not described in 'smu7_fan_ctrl_set_fan_speed_percent' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:245: warning: Function parameter or member 'hwmgr' not described in 'smu7_fan_ctrl_reset_fan_speed_to_default' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:268: warning: Function parameter or member 'hwmgr' not described in 'smu7_fan_ctrl_set_fan_speed_rpm' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:268: warning: Function parameter or member 'speed' not described in 'smu7_fan_ctrl_set_fan_speed_rpm' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:299: warning: Function parameter or member 'hwmgr' not described in 'smu7_thermal_get_temperature' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:325: warning: Function parameter or member 'hwmgr' not described in 'smu7_thermal_set_temperature_range' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:325: warning: Function parameter or member 'low_temp' not described in 'smu7_thermal_set_temperature_range' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:325: warning: Function parameter or member 'high_temp' not described in 'smu7_thermal_set_temperature_range' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:358: warning: Function parameter or member 'hwmgr' not described in 'smu7_thermal_initialize' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:377: warning: Function parameter or member 'hwmgr' not described in 'smu7_thermal_enable_alert' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:395: warning: Function parameter or member 'hwmgr' not described in 'smu7_thermal_disable_alert' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:414: warning: Function parameter or member 'hwmgr' not described in 'smu7_thermal_stop_thermal_controller' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:433: warning: Function parameter or member 'hwmgr' not described in 'smu7_thermal_start_smc_fan_control' Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 1c2063704810902224f31d1d70e3616473a1614c Author: Lee Jones Date: Thu Nov 26 13:42:21 2020 +0000 drm/amd/pm/powerplay/hwmgr/smu7_hwmgr: Fix a whole bunch of historical function doc issues Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:202: warning: Function parameter or member 'hwmgr' not described in 'smu7_get_mc_microcode_version' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:242: warning: Function parameter or member 'hwmgr' not described in 'smu7_enable_smc_voltage_controller' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:263: warning: Function parameter or member 'hwmgr' not described in 'smu7_voltage_control' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:277: warning: Function parameter or member 'hwmgr' not described in 'smu7_enable_voltage_control' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:315: warning: Function parameter or member 'hwmgr' not described in 'smu7_construct_voltage_tables' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:428: warning: Function parameter or member 'hwmgr' not described in 'smu7_program_static_screen_threshold_parameters' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:450: warning: Function parameter or member 'hwmgr' not described in 'smu7_enable_display_gap' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:474: warning: Function parameter or member 'hwmgr' not described in 'smu7_program_voting_clients' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:570: warning: Function parameter or member 'hwmgr' not described in 'smu7_initial_switch_from_arbf0_to_f1' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:1926: warning: Function parameter or member 'hwmgr' not described in 'smu7_get_evv_voltages' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2028: warning: Function parameter or member 'hwmgr' not described in 'smu7_patch_ppt_v1_with_vdd_leakage' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2028: warning: Function parameter or member 'voltage' not described in 'smu7_patch_ppt_v1_with_vdd_leakage' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2028: warning: Function parameter or member 'leakage_table' not described in 'smu7_patch_ppt_v1_with_vdd_leakage' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2056: warning: Function parameter or member 'hwmgr' not described in 'smu7_patch_lookup_table_with_leakage' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2056: warning: Function parameter or member 'lookup_table' not described in 'smu7_patch_lookup_table_with_leakage' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2056: warning: Function parameter or member 'leakage_table' not described in 'smu7_patch_lookup_table_with_leakage' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2511: warning: Function parameter or member 'hwmgr' not described in 'smu7_patch_ppt_v0_with_vdd_leakage' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2511: warning: Function parameter or member 'voltage' not described in 'smu7_patch_ppt_v0_with_vdd_leakage' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2511: warning: Function parameter or member 'leakage_table' not described in 'smu7_patch_ppt_v0_with_vdd_leakage' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:4449: warning: Function parameter or member 'hwmgr' not described in 'smu7_program_display_gap' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:4508: warning: Function parameter or member 'hwmgr' not described in 'smu7_set_max_fan_rpm_output' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:4508: warning: Function parameter or member 'us_max_fan_rpm' not described in 'smu7_set_max_fan_rpm_output' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:4707: warning: Function parameter or member 'hwmgr' not described in 'smu7_get_memory_type' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:4723: warning: Function parameter or member 'hwmgr' not described in 'smu7_enable_acpi_power_management' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:4737: warning: Function parameter or member 'hwmgr' not described in 'smu7_init_power_gate_state' Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit fb73edc64927353236b4a9e01a449e1db3da2d20 Author: Lee Jones Date: Thu Nov 26 13:42:20 2020 +0000 drm/amd/pm/powerplay/hwmgr/vega10_processpptables: Make function invoked by reference static Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_processpptables.c:1148:5: warning: no previous prototype for ‘vega10_pp_tables_initialize’ [-Wmissing-prototypes] Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: "Gustavo A. R. Silva" Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 58cfaf256ef9ecb72677cefc87cc3c591853d604 Author: Lee Jones Date: Thu Nov 26 13:42:19 2020 +0000 drm/amd/pm/powerplay/hwmgr/ppatomctrl: Fix a myriad of kernel-doc issues Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:104: warning: Function parameter or member 'reg_block' not described in 'atomctrl_set_mc_reg_address_table' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:104: warning: Function parameter or member 'table' not described in 'atomctrl_set_mc_reg_address_table' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:213: warning: Function parameter or member 'hwmgr' not described in 'atomctrl_set_engine_dram_timings_rv770' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:213: warning: Function parameter or member 'engine_clock' not described in 'atomctrl_set_engine_dram_timings_rv770' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:213: warning: Function parameter or member 'memory_clock' not described in 'atomctrl_set_engine_dram_timings_rv770' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:239: warning: Function parameter or member 'device' not described in 'get_voltage_info_table' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:519: warning: Function parameter or member 'hwmgr' not described in 'atomctrl_get_reference_clock' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:548: warning: Function parameter or member 'hwmgr' not described in 'atomctrl_is_voltage_controlled_by_gpio_v3' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:548: warning: Function parameter or member 'voltage_type' not described in 'atomctrl_is_voltage_controlled_by_gpio_v3' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:548: warning: Function parameter or member 'voltage_mode' not described in 'atomctrl_is_voltage_controlled_by_gpio_v3' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:640: warning: Function parameter or member 'device' not described in 'get_gpio_lookup_table' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:663: warning: Function parameter or member 'hwmgr' not described in 'atomctrl_get_pp_assign_pin' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:663: warning: Function parameter or member 'pinId' not described in 'atomctrl_get_pp_assign_pin' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:663: warning: Function parameter or member 'gpio_pin_assignment' not described in 'atomctrl_get_pp_assign_pin' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1152: warning: Function parameter or member 'hwmgr' not described in 'atomctrl_get_voltage_evv' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1152: warning: Function parameter or member 'virtual_voltage_id' not described in 'atomctrl_get_voltage_evv' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1152: warning: Function parameter or member 'voltage' not described in 'atomctrl_get_voltage_evv' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1194: warning: Function parameter or member 'hwmgr' not described in 'atomctrl_get_mpll_reference_clock' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1227: warning: Function parameter or member 'device' not described in 'asic_internal_ss_get_ss_table' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1258: warning: Function parameter or member 'hwmgr' not described in 'asic_internal_ss_get_ss_asignment' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1258: warning: Function parameter or member 'clockSource' not described in 'asic_internal_ss_get_ss_asignment' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1258: warning: Function parameter or member 'clockSpeed' not described in 'asic_internal_ss_get_ss_asignment' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1258: warning: Function parameter or member 'ssEntry' not described in 'asic_internal_ss_get_ss_asignment' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1321: warning: Function parameter or member 'hwmgr' not described in 'atomctrl_get_memory_clock_spread_spectrum' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1321: warning: Function parameter or member 'memory_clock' not described in 'atomctrl_get_memory_clock_spread_spectrum' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1321: warning: Function parameter or member 'ssInfo' not described in 'atomctrl_get_memory_clock_spread_spectrum' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1332: warning: Function parameter or member 'hwmgr' not described in 'atomctrl_get_engine_clock_spread_spectrum' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1332: warning: Function parameter or member 'engine_clock' not described in 'atomctrl_get_engine_clock_spread_spectrum' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1332: warning: Function parameter or member 'ssInfo' not described in 'atomctrl_get_engine_clock_spread_spectrum' Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 9795f4eb59185dff008081fed32db63979d2a9fa Author: Lee Jones Date: Thu Nov 26 13:42:18 2020 +0000 drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0: Convert to proper kernel-doc format Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:41: warning: Function parameter or member 'hwmgr' not described in 'set_hw_cap' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:41: warning: Function parameter or member 'setIt' not described in 'set_hw_cap' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:41: warning: Function parameter or member 'cap' not described in 'set_hw_cap' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:56: warning: Function parameter or member 'hwmgr' not described in 'set_platform_caps' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:56: warning: Function parameter or member 'powerplay_caps' not described in 'set_platform_caps' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:135: warning: Function parameter or member 'hwmgr' not described in 'get_powerplay_table' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:202: warning: Function parameter or member 'hwmgr' not described in 'get_platform_power_management_table' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:202: warning: Function parameter or member 'atom_ppm_table' not described in 'get_platform_power_management_table' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:246: warning: Function parameter or member 'hwmgr' not described in 'init_dpm_2_parameters' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:246: warning: Function parameter or member 'powerplay_table' not described in 'init_dpm_2_parameters' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:791: warning: Function parameter or member 'hwmgr' not described in 'init_clock_voltage_dependency' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:791: warning: Function parameter or member 'powerplay_table' not described in 'init_clock_voltage_dependency' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:911: warning: Function parameter or member 'hwmgr' not described in 'init_thermal_controller' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:911: warning: Function parameter or member 'powerplay_table' not described in 'init_thermal_controller' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:1121: warning: Function parameter or member 'hwmgr' not described in 'check_powerplay_tables' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:1121: warning: Function parameter or member 'powerplay_table' not described in 'check_powerplay_tables' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:1263: warning: Function parameter or member 'hwmgr' not described in 'make_classification_flags' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:1263: warning: Function parameter or member 'classification' not described in 'make_classification_flags' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:1263: warning: Function parameter or member 'classification2' not described in 'make_classification_flags' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:1370: warning: Function parameter or member 'hwmgr' not described in 'get_powerplay_table_entry_v1_0' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:1370: warning: Function parameter or member 'entry_index' not described in 'get_powerplay_table_entry_v1_0' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:1370: warning: Function parameter or member 'power_state' not described in 'get_powerplay_table_entry_v1_0' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:1370: warning: Function parameter or member 'call_back_func' not described in 'get_powerplay_table_entry_v1_0' Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit b4643c50d0d51ffb133cb1d580e3ac887fda1ac8 Author: Lee Jones Date: Thu Nov 26 13:42:17 2020 +0000 drm/amd/pm/powerplay/hwmgr/hardwaremanager: Fix function header related formatting issues Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/hardwaremanager.c:232: warning: Function parameter or member 'hwmgr' not described in 'phm_start_thermal_controller' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/hardwaremanager.c:383: warning: Function parameter or member 'hwmgr' not described in 'phm_get_clock_info' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/hardwaremanager.c:383: warning: Function parameter or member 'state' not described in 'phm_get_clock_info' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/hardwaremanager.c:383: warning: Function parameter or member 'pclock_info' not described in 'phm_get_clock_info' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/hardwaremanager.c:383: warning: Function parameter or member 'designation' not described in 'phm_get_clock_info' Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 5ca53687171e56d0f8ceba5a9b2199b17d62b7a7 Author: Lee Jones Date: Thu Nov 26 13:42:14 2020 +0000 drm/amd/pm/powerplay/hwmgr/ppatomfwctrl: Demote kernel-doc formatting abuses Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.c:78: warning: Function parameter or member 'hwmgr' not described in 'pp_atomfwctrl_is_voltage_controlled_by_gpio_v4' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.c:78: warning: Function parameter or member 'voltage_type' not described in 'pp_atomfwctrl_is_voltage_controlled_by_gpio_v4' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.c:78: warning: Function parameter or member 'voltage_mode' not described in 'pp_atomfwctrl_is_voltage_controlled_by_gpio_v4' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.c:211: warning: Function parameter or member 'hwmgr' not described in 'pp_atomfwctrl_get_pp_assign_pin' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.c:211: warning: Function parameter or member 'pin_id' not described in 'pp_atomfwctrl_get_pp_assign_pin' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.c:211: warning: Function parameter or member 'gpio_pin_assignment' not described in 'pp_atomfwctrl_get_pp_assign_pin' drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.c:232: warning: Function parameter or member 'hwmgr' not described in 'pp_atomfwctrl_enter_self_refresh' Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 7731653f83ecfa86276931c9c73f24dfaababbe5 Author: Lee Jones Date: Thu Nov 26 13:42:13 2020 +0000 drm/amd/pm/powerplay/hwmgr/hwmgr: Move 'smu7_init_function_pointers()'s prototype to header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:5696:5: warning: no previous prototype for ‘smu7_init_function_pointers’ [-Wmissing-prototypes] 5696 | int smu7_init_function_pointers(struct pp_hwmgr *hwmgr) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit ddb0fc9ac4d37cd10e2372f29a4147c18b6335c1 Author: Lee Jones Date: Thu Nov 26 13:42:12 2020 +0000 drm/amd/pm/powerplay/hwmgr/ppatomctrl: Remove unused variable 'fPowerDPMx' Fixes the following W=1 kernel build warning(s): In file included from drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:31: drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c: In function ‘atomctrl_calculate_voltage_evv_on_sclk’: drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:702:22: warning: variable ‘fPowerDPMx’ set but not used [-Wunused-but-set-variable] Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 4c3508fe2382dd7933eca0fa9ef1920e7c6328ef Author: Lee Jones Date: Thu Nov 26 13:42:11 2020 +0000 drm/amd/pm/powerplay/hwmgr/ppevvmath: Place variable declaration under same clause as its use Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppevvmath.h: In function ‘fMultiply’: drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppevvmath.h:336:22: warning: variable ‘Y_LessThanOne’ set but not used [-Wunused-but-set-variable] drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppevvmath.h:336:7: warning: variable ‘X_LessThanOne’ set but not used [-Wunused-but-set-variable] Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 874f1c3f9eab6c4b3a550d2c0d2735ce48eacd61 Author: Lee Jones Date: Thu Nov 26 13:42:10 2020 +0000 drm/amd/pm/inc/pp_thermal: Mark 'SMU7Thermal{WithDelay}Policy' as __maybe_unused They are used by some source files which include pp_thermal.h, but not all. Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../pm/inc/pp_thermal.h:28:41: warning: ‘SMU7ThermalWithDelayPolicy’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/amd/amdgpu/../pm/inc/pp_thermal.h:28:41: warning: ‘SMU7ThermalWithDelayPolicy’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/amd/amdgpu/../pm/inc/pp_thermal.h:34:41: warning: ‘SMU7ThermalPolicy’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/amd/amdgpu/../pm/inc/pp_thermal.h:34:41: warning: ‘SMU7ThermalPolicy’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/amd/amdgpu/../pm/inc/pp_thermal.h:34:41: warning: ‘SMU7ThermalPolicy’ defined but not used [-Wunused-const-variable=] Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Evan Quan Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 04d7b8fe82fdaaceeecc454a7efaa4ec9ffdcb54 Author: Lee Jones Date: Thu Nov 26 13:42:09 2020 +0000 drm/amd/pm/powerplay/hwmgr/hwmgr: Move 'smu8_init_function_pointers()' prototype to shared header Fixes the following W=1 kernel build warning(s): Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit dc93d480597f7d8d1ad67ce7a94d53e264fc65bb Author: Lee Jones Date: Thu Nov 26 13:42:08 2020 +0000 drm/amd/pm/powerplay/hwmgr/hardwaremanager: Remove unused 'phm_set_*()' functions Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/hardwaremanager.c:518:5: warning: no previous prototype for ‘phm_set_min_deep_sleep_dcefclk’ [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/hardwaremanager.c:528:5: warning: no previous prototype for ‘phm_set_hard_min_dcefclk_by_freq’ [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/hardwaremanager.c:538:5: warning: no previous prototype for ‘phm_set_hard_min_fclk_by_freq’ [-Wmissing-prototypes] Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit faa1e2f0d7458a8be073eadcdedba59a3c91d564 Author: Lee Jones Date: Thu Nov 26 13:42:07 2020 +0000 drm/amd/pm/powerplay/smumgr/fiji_smumgr: Demote kernel-doc format abuse Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1107: warning: Function parameter or member 'mem_clock' not described in 'fiji_get_mclk_frequency_ratio' Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit c9a55b3c1c788f7f6f3890abb4dda9c3e20c524a Author: Lee Jones Date: Thu Nov 26 13:42:06 2020 +0000 drm/amd/pm/powerplay/smumgr/smu9_smumgr: Include our own header containing our prototypes Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/smu9_smumgr.c:38:6: warning: no previous prototype for ‘smu9_is_smc_ram_running’ [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/smu9_smumgr.c:112:5: warning: no previous prototype for ‘smu9_send_msg_to_smc’ [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/smu9_smumgr.c:140:5: warning: no previous prototype for ‘smu9_send_msg_to_smc_with_parameter’ [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/smu9_smumgr.c:165:10: warning: no previous prototype for ‘smu9_get_argument’ [-Wmissing-prototypes] Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit aa57f514c3d94ba7145a760318e494a889f091d2 Author: Lee Jones Date: Thu Nov 26 13:42:05 2020 +0000 drm/amd/pm/powerplay/smumgr/vegam_smumgr: Make function called by reference static Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/vegam_smumgr.c:2249:5: warning: no previous prototype for ‘vegam_thermal_avfs_enable’ [-Wmissing-prototypes] Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit ca2d038f06fcaa395dc60c39b8e2ac6c05786baf Author: Lee Jones Date: Thu Nov 26 13:42:04 2020 +0000 drm/amd/pm/powerplay/smumgr/iceland_smumgr: Make function called by reference static Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/iceland_smumgr.c:2085:5: warning: no previous prototype for ‘iceland_thermal_setup_fan_table’ [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/iceland_smumgr.c: In function ‘iceland_thermal_setup_fan_table’: drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/iceland_smumgr.c:2093:6: warning: variable ‘res’ set but not used [-Wunused-but-set-variable] Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Huang Rui Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 2d5da9e6e3ac7a9f57bcc534a2f50e166183b1d9 Author: Lee Jones Date: Thu Nov 26 13:42:02 2020 +0000 drm/amd/pm/powerplay/smumgr/polaris10_smumgr: Make function called by reference static Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/polaris10_smumgr.c:2145:5: warning: no previous prototype for ‘polaris10_thermal_avfs_enable’ [-Wmissing-prototypes] Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 05a7e1cf45898d63a6839c4508567b263f52fd4f Author: Lee Jones Date: Tue Nov 24 19:38:24 2020 +0000 drm/amd/amdgpu/amdgpu_uvd: Add description for amdgpu_uvd_cs_msg_decode()'s 'buf_sizes' param Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:555: warning: Function parameter or member 'buf_sizes' not described in 'amdgpu_uvd_cs_msg_decode' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit dcaf3483ae463fc74a40af1a994f4d7def9eafaa Author: Lee Jones Date: Tue Nov 24 19:38:23 2020 +0000 drm/amd/pm/powerplay/smumgr/fiji_smumgr: Remove unused variable 'result' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c: In function ‘fiji_populate_smc_boot_level’: drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1603:6: warning: variable ‘result’ set but not used [-Wunused-but-set-variable] Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit b0da6cc1982520c25411038888e15acd40568827 Author: Lee Jones Date: Tue Nov 24 19:38:22 2020 +0000 drm/amd/pm/swsmu/smu11/navi10_ppt: Remove unused 'struct i2c_algorithm navi10_i2c_algo' Fixes the following W=1 kernel build warning(s): Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Evan Quan Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit fecc72f181b5643580a46141c72b5a33b251f7c4 Author: Lee Jones Date: Tue Nov 24 19:38:21 2020 +0000 drm/amd/pm/swsmu/smu12/renoir_ppt: Demote kernel-doc formatting abuse Fixes the following W=1 kernel build warning(s): Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 75a8661ef4bbdb6e9c705b3954397e5550db2b3f Author: Lee Jones Date: Tue Nov 24 19:38:20 2020 +0000 drm/amd/pm/inc/smu_v11_0: Mark 'smu11_thermal_policy' as __maybe_unused It's used in some, but not all source files which include 'smu_v11_0.h'. Fixes the following W=1 kernel build warning(s): In file included from drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/smu_v11_0.c:36: drivers/gpu/drm/amd/amdgpu/../pm/inc/smu_v11_0.h:61:43: warning: ‘smu11_thermal_policy’ defined but not used [-Wunused-const-variable=] 61 | static const struct smu_temperature_range smu11_thermal_policy[] = | ^~~~~~~~~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit adf0125a53bc89b160bf6dddf243f53d943faf1d Author: Lee Jones Date: Tue Nov 24 19:38:18 2020 +0000 drm/amd/amdgpu/amdgpu_acp: Fix doc-rot issues pertaining to a couple of 'handle' params Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c:183: warning: Function parameter or member 'handle' not described in 'acp_hw_init' drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c:183: warning: Excess function parameter 'adev' description in 'acp_hw_init' drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c:412: warning: Function parameter or member 'handle' not described in 'acp_hw_fini' drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c:412: warning: Excess function parameter 'adev' description in 'acp_hw_fini' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 5141154dcdae63cd6d81b9daf7f9f28ed8186777 Author: Lee Jones Date: Tue Nov 24 19:38:17 2020 +0000 drm/amd/amdgpu/vcn_v3_0: Remove unused variable 'direct_poll' from 'vcn_v3_0_start_sriov()' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c: In function ‘vcn_v3_0_start_sriov’: drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c:1242:3: warning: variable ‘direct_poll’ set but not used [-Wunused-but-set-variable] Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit b4234aec4f28ee145018ace169941b0fed4e5863 Author: Lee Jones Date: Tue Nov 24 19:38:07 2020 +0000 drm/amd/amdgpu/sdma_v5_0: Provide some missing and repair other function params Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:403: warning: Function parameter or member 'job' not described in 'sdma_v5_0_ring_emit_ib' drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:403: warning: Function parameter or member 'flags' not described in 'sdma_v5_0_ring_emit_ib' drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:480: warning: Function parameter or member 'addr' not described in 'sdma_v5_0_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:480: warning: Function parameter or member 'seq' not described in 'sdma_v5_0_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:480: warning: Function parameter or member 'flags' not described in 'sdma_v5_0_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:480: warning: Excess function parameter 'fence' description in 'sdma_v5_0_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:967: warning: Function parameter or member 'timeout' not described in 'sdma_v5_0_ring_test_ib' drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:1074: warning: Function parameter or member 'value' not described in 'sdma_v5_0_vm_write_pte' drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:1074: warning: Excess function parameter 'addr' description in 'sdma_v5_0_vm_write_pte' drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:1074: warning: Excess function parameter 'flags' description in 'sdma_v5_0_vm_write_pte' drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:1126: warning: Function parameter or member 'ring' not described in 'sdma_v5_0_ring_pad_ib' drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:1180: warning: Function parameter or member 'vmid' not described in 'sdma_v5_0_ring_emit_vm_flush' drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:1180: warning: Function parameter or member 'pd_addr' not described in 'sdma_v5_0_ring_emit_vm_flush' drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:1180: warning: Excess function parameter 'vm' description in 'sdma_v5_0_ring_emit_vm_flush' drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:1703: warning: Function parameter or member 'ib' not described in 'sdma_v5_0_emit_copy_buffer' drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:1703: warning: Function parameter or member 'tmz' not described in 'sdma_v5_0_emit_copy_buffer' drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:1703: warning: Excess function parameter 'ring' description in 'sdma_v5_0_emit_copy_buffer' drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:1729: warning: Function parameter or member 'ib' not described in 'sdma_v5_0_emit_fill_buffer' drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:1729: warning: Excess function parameter 'ring' description in 'sdma_v5_0_emit_fill_buffer' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 6c93cc2c6c8cbffeb5d7d76828b2150da9434a07 Author: Lee Jones Date: Tue Nov 24 19:38:16 2020 +0000 drm/amd/amdgpu/vcn_v2_0: Fix a few kernel-doc misdemeanours Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c:483: warning: Excess function parameter 'sw' description in 'vcn_v2_0_disable_clock_gating' drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c:644: warning: Excess function parameter 'sw' description in 'vcn_v2_0_enable_clock_gating' drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c:1404: warning: Function parameter or member 'count' not described in 'vcn_v2_0_dec_ring_insert_nop' drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c:1426: warning: Function parameter or member 'addr' not described in 'vcn_v2_0_dec_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c:1426: warning: Function parameter or member 'seq' not described in 'vcn_v2_0_dec_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c:1426: warning: Function parameter or member 'flags' not described in 'vcn_v2_0_dec_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c:1426: warning: Excess function parameter 'fence' description in 'vcn_v2_0_dec_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c:1465: warning: Function parameter or member 'job' not described in 'vcn_v2_0_dec_ring_emit_ib' drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c:1465: warning: Function parameter or member 'flags' not described in 'vcn_v2_0_dec_ring_emit_ib' drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c:1609: warning: Function parameter or member 'addr' not described in 'vcn_v2_0_enc_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c:1609: warning: Function parameter or member 'seq' not described in 'vcn_v2_0_enc_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c:1609: warning: Function parameter or member 'flags' not described in 'vcn_v2_0_enc_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c:1609: warning: Excess function parameter 'fence' description in 'vcn_v2_0_enc_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c:1636: warning: Function parameter or member 'job' not described in 'vcn_v2_0_enc_ring_emit_ib' drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c:1636: warning: Function parameter or member 'flags' not described in 'vcn_v2_0_enc_ring_emit_ib' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit f3d6280c26e9a3ace373a7f6fbe61609a2bf265f Author: Lee Jones Date: Tue Nov 24 19:38:15 2020 +0000 drm/amd/amdgpu/jpeg_v2_0: Add some missing kernel-doc descriptions Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c:498: warning: Function parameter or member 'addr' not described in 'jpeg_v2_0_dec_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c:498: warning: Function parameter or member 'seq' not described in 'jpeg_v2_0_dec_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c:498: warning: Function parameter or member 'flags' not described in 'jpeg_v2_0_dec_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c:498: warning: Excess function parameter 'fence' description in 'jpeg_v2_0_dec_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c:549: warning: Function parameter or member 'job' not described in 'jpeg_v2_0_dec_ring_emit_ib' drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c:549: warning: Function parameter or member 'flags' not described in 'jpeg_v2_0_dec_ring_emit_ib' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 8608c861e21c48f7f170f50a7e048e38afde374c Author: Lee Jones Date: Tue Nov 24 19:38:14 2020 +0000 drm/amd/amdgpu/jpeg_v1_0: Add some missing function param descriptions Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c:219: warning: Function parameter or member 'addr' not described in 'jpeg_v1_0_decode_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c:219: warning: Function parameter or member 'seq' not described in 'jpeg_v1_0_decode_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c:219: warning: Function parameter or member 'flags' not described in 'jpeg_v1_0_decode_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c:219: warning: Excess function parameter 'fence' description in 'jpeg_v1_0_decode_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c:293: warning: Function parameter or member 'job' not described in 'jpeg_v1_0_decode_ring_emit_ib' drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c:293: warning: Function parameter or member 'flags' not described in 'jpeg_v1_0_decode_ring_emit_ib' drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c:518: warning: Function parameter or member 'mode' not described in 'jpeg_v1_0_start' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Veerabadhran G Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 4e1f56b7c404a44b1f30c72dff57900443a59bda Author: Lee Jones Date: Tue Nov 24 19:38:13 2020 +0000 drm/amd/amdgpu/vcn_v1_0: Fix a few kernel-doc misdemeanours Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c:439: warning: Excess function parameter 'sw' description in 'vcn_v1_0_disable_clock_gating' drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c:566: warning: Excess function parameter 'sw' description in 'vcn_v1_0_enable_clock_gating' drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c:1454: warning: Function parameter or member 'addr' not described in 'vcn_v1_0_dec_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c:1454: warning: Function parameter or member 'seq' not described in 'vcn_v1_0_dec_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c:1454: warning: Function parameter or member 'flags' not described in 'vcn_v1_0_dec_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c:1454: warning: Excess function parameter 'fence' description in 'vcn_v1_0_dec_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c:1495: warning: Function parameter or member 'job' not described in 'vcn_v1_0_dec_ring_emit_ib' drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c:1495: warning: Function parameter or member 'flags' not described in 'vcn_v1_0_dec_ring_emit_ib' drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c:1628: warning: Function parameter or member 'addr' not described in 'vcn_v1_0_enc_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c:1628: warning: Function parameter or member 'seq' not described in 'vcn_v1_0_enc_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c:1628: warning: Function parameter or member 'flags' not described in 'vcn_v1_0_enc_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c:1628: warning: Excess function parameter 'fence' description in 'vcn_v1_0_enc_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c:1655: warning: Function parameter or member 'job' not described in 'vcn_v1_0_enc_ring_emit_ib' drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c:1655: warning: Function parameter or member 'flags' not described in 'vcn_v1_0_enc_ring_emit_ib' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 107a543066083adcdf0f873d4937ae7b811a8b0f Author: Lee Jones Date: Tue Nov 24 19:38:12 2020 +0000 drm/amd/amdgpu/gfx_v10_0: Make local function 'gfx_v10_0_rlc_stop()' static Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:5008:6: warning: no previous prototype for ‘gfx_v10_0_rlc_stop’ [-Wmissing-prototypes] Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 9307d1b01b647dd4f1a947c91039956edae0cd38 Author: Lee Jones Date: Tue Nov 24 19:38:11 2020 +0000 drm/amd/amdgpu/uvd_v7_0: Fix a bunch of kernel-doc function documentation issues Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:219: warning: Function parameter or member 'bo' not described in 'uvd_v7_0_enc_get_create_msg' drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:219: warning: Excess function parameter 'adev' description in 'uvd_v7_0_enc_get_create_msg' drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:282: warning: Function parameter or member 'bo' not described in 'uvd_v7_0_enc_get_destroy_msg' drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:282: warning: Excess function parameter 'adev' description in 'uvd_v7_0_enc_get_destroy_msg' drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:339: warning: Function parameter or member 'timeout' not described in 'uvd_v7_0_enc_ring_test_ib' drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:527: warning: Function parameter or member 'handle' not described in 'uvd_v7_0_hw_init' drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:527: warning: Excess function parameter 'adev' description in 'uvd_v7_0_hw_init' drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:605: warning: Function parameter or member 'handle' not described in 'uvd_v7_0_hw_fini' drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:605: warning: Excess function parameter 'adev' description in 'uvd_v7_0_hw_fini' drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:1156: warning: Function parameter or member 'addr' not described in 'uvd_v7_0_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:1156: warning: Function parameter or member 'seq' not described in 'uvd_v7_0_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:1156: warning: Function parameter or member 'flags' not described in 'uvd_v7_0_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:1156: warning: Excess function parameter 'fence' description in 'uvd_v7_0_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:1195: warning: Function parameter or member 'addr' not described in 'uvd_v7_0_enc_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:1195: warning: Function parameter or member 'seq' not described in 'uvd_v7_0_enc_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:1195: warning: Function parameter or member 'flags' not described in 'uvd_v7_0_enc_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:1195: warning: Excess function parameter 'fence' description in 'uvd_v7_0_enc_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:1293: warning: Function parameter or member 'job' not described in 'uvd_v7_0_ring_emit_ib' drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:1293: warning: Function parameter or member 'flags' not described in 'uvd_v7_0_ring_emit_ib' drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:1324: warning: Function parameter or member 'job' not described in 'uvd_v7_0_enc_ring_emit_ib' drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:1324: warning: Function parameter or member 'flags' not described in 'uvd_v7_0_enc_ring_emit_ib' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 166c20895c216f845a3b082ddf56261e3762ec84 Author: Lee Jones Date: Tue Nov 24 19:38:10 2020 +0000 drm/amd/amdgpu/uvd_v6_0: Fix a bunch of kernel-doc function documentation issues Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:211: warning: Function parameter or member 'bo' not described in 'uvd_v6_0_enc_get_create_msg' drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:211: warning: Excess function parameter 'adev' description in 'uvd_v6_0_enc_get_create_msg' drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:275: warning: Function parameter or member 'bo' not described in 'uvd_v6_0_enc_get_destroy_msg' drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:275: warning: Excess function parameter 'adev' description in 'uvd_v6_0_enc_get_destroy_msg' drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:332: warning: Function parameter or member 'timeout' not described in 'uvd_v6_0_enc_ring_test_ib' drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:472: warning: Function parameter or member 'handle' not described in 'uvd_v6_0_hw_init' drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:472: warning: Excess function parameter 'adev' description in 'uvd_v6_0_hw_init' drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:541: warning: Function parameter or member 'handle' not described in 'uvd_v6_0_hw_fini' drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:541: warning: Excess function parameter 'adev' description in 'uvd_v6_0_hw_fini' drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:900: warning: Function parameter or member 'addr' not described in 'uvd_v6_0_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:900: warning: Function parameter or member 'seq' not described in 'uvd_v6_0_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:900: warning: Function parameter or member 'flags' not described in 'uvd_v6_0_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:900: warning: Excess function parameter 'fence' description in 'uvd_v6_0_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:930: warning: Function parameter or member 'addr' not described in 'uvd_v6_0_enc_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:930: warning: Function parameter or member 'seq' not described in 'uvd_v6_0_enc_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:930: warning: Function parameter or member 'flags' not described in 'uvd_v6_0_enc_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:930: warning: Excess function parameter 'fence' description in 'uvd_v6_0_enc_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:997: warning: Function parameter or member 'job' not described in 'uvd_v6_0_ring_emit_ib' drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:997: warning: Function parameter or member 'flags' not described in 'uvd_v6_0_ring_emit_ib' drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:1023: warning: Function parameter or member 'job' not described in 'uvd_v6_0_enc_ring_emit_ib' drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:1023: warning: Function parameter or member 'flags' not described in 'uvd_v6_0_enc_ring_emit_ib' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 184b762d5b75e3eefc716d8cbf6dd7c544af0fcc Author: Lee Jones Date: Tue Nov 24 19:38:09 2020 +0000 drm/amd/amdgpu/amdgpu_vce: Provide some missing and repair other function params Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:97: warning: Function parameter or member 'size' not described in 'amdgpu_vce_sw_init' drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:441: warning: Function parameter or member 'bo' not described in 'amdgpu_vce_get_create_msg' drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:441: warning: Excess function parameter 'adev' description in 'amdgpu_vce_get_create_msg' drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:521: warning: Function parameter or member 'direct' not described in 'amdgpu_vce_get_destroy_msg' drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:521: warning: Excess function parameter 'adev' description in 'amdgpu_vce_get_destroy_msg' drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:588: warning: Function parameter or member 'ib_idx' not described in 'amdgpu_vce_validate_bo' drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:636: warning: Function parameter or member 'ib_idx' not described in 'amdgpu_vce_cs_reloc' drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:636: warning: Function parameter or member 'index' not described in 'amdgpu_vce_cs_reloc' drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:720: warning: Function parameter or member 'ib_idx' not described in 'amdgpu_vce_ring_parse_cs' drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:956: warning: Function parameter or member 'ib_idx' not described in 'amdgpu_vce_ring_parse_cs_vm' drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:1050: warning: Function parameter or member 'job' not described in 'amdgpu_vce_ring_emit_ib' drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:1050: warning: Function parameter or member 'flags' not described in 'amdgpu_vce_ring_emit_ib' drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:1066: warning: Function parameter or member 'addr' not described in 'amdgpu_vce_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:1066: warning: Function parameter or member 'seq' not described in 'amdgpu_vce_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:1066: warning: Function parameter or member 'flags' not described in 'amdgpu_vce_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:1066: warning: Excess function parameter 'fence' description in 'amdgpu_vce_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:1122: warning: Function parameter or member 'timeout' not described in 'amdgpu_vce_ring_test_ib' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit fd1c541d94e7fb092dafa679e393683ab81a981f Author: Lee Jones Date: Tue Nov 24 19:38:08 2020 +0000 drm/amd/amdgpu/sdma_v5_2: Provide some missing and repair other function params Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:367: warning: Function parameter or member 'job' not described in 'sdma_v5_2_ring_emit_ib' drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:367: warning: Function parameter or member 'flags' not described in 'sdma_v5_2_ring_emit_ib' drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:429: warning: Function parameter or member 'addr' not described in 'sdma_v5_2_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:429: warning: Function parameter or member 'seq' not described in 'sdma_v5_2_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:429: warning: Function parameter or member 'flags' not described in 'sdma_v5_2_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:429: warning: Excess function parameter 'fence' description in 'sdma_v5_2_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:924: warning: Function parameter or member 'timeout' not described in 'sdma_v5_2_ring_test_ib' drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:1030: warning: Function parameter or member 'value' not described in 'sdma_v5_2_vm_write_pte' drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:1030: warning: Excess function parameter 'addr' description in 'sdma_v5_2_vm_write_pte' drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:1030: warning: Excess function parameter 'flags' description in 'sdma_v5_2_vm_write_pte' drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:1083: warning: Function parameter or member 'ring' not described in 'sdma_v5_2_ring_pad_ib' drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:1137: warning: Function parameter or member 'vmid' not described in 'sdma_v5_2_ring_emit_vm_flush' drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:1137: warning: Function parameter or member 'pd_addr' not described in 'sdma_v5_2_ring_emit_vm_flush' drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:1137: warning: Excess function parameter 'vm' description in 'sdma_v5_2_ring_emit_vm_flush' drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:1717: warning: Function parameter or member 'ib' not described in 'sdma_v5_2_emit_copy_buffer' drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:1717: warning: Function parameter or member 'tmz' not described in 'sdma_v5_2_emit_copy_buffer' drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:1717: warning: Excess function parameter 'ring' description in 'sdma_v5_2_emit_copy_buffer' drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:1743: warning: Function parameter or member 'ib' not described in 'sdma_v5_2_emit_fill_buffer' drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:1743: warning: Excess function parameter 'ring' description in 'sdma_v5_2_emit_fill_buffer' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit ce0e124adf9fe33cc452d69831486d5bae23af4b Author: Lee Jones Date: Tue Nov 24 19:38:06 2020 +0000 drm/amd/amdgpu/amdgpu_uvd: Fix some function documentation headers Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:95: warning: cannot understand function prototype: 'struct amdgpu_uvd_cs_ctx ' drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:555: warning: Function parameter or member 'adev' not described in 'amdgpu_uvd_cs_msg_decode' drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1012: warning: Function parameter or member 'ib_idx' not described in 'amdgpu_uvd_ring_parse_cs' drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1286: warning: Function parameter or member 'timeout' not described in 'amdgpu_uvd_ring_test_ib' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 4c724ae91d983c7ee701fea146d13c08a0af9fdd Author: Lee Jones Date: Tue Nov 24 19:38:05 2020 +0000 drm/amd/amdgpu/sdma_v4_0: Repair a bunch of kernel-doc problems Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:848: warning: Function parameter or member 'job' not described in 'sdma_v4_0_ring_emit_ib' drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:848: warning: Function parameter or member 'flags' not described in 'sdma_v4_0_ring_emit_ib' drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:923: warning: Function parameter or member 'addr' not described in 'sdma_v4_0_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:923: warning: Function parameter or member 'seq' not described in 'sdma_v4_0_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:923: warning: Function parameter or member 'flags' not described in 'sdma_v4_0_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:923: warning: Excess function parameter 'fence' description in 'sdma_v4_0_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:1117: warning: Function parameter or member 'ring' not described in 'sdma_v4_0_rb_cntl' drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:1117: warning: Function parameter or member 'rb_cntl' not described in 'sdma_v4_0_rb_cntl' drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:1581: warning: Function parameter or member 'timeout' not described in 'sdma_v4_0_ring_test_ib' drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:1682: warning: Function parameter or member 'value' not described in 'sdma_v4_0_vm_write_pte' drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:1682: warning: Excess function parameter 'addr' description in 'sdma_v4_0_vm_write_pte' drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:1682: warning: Excess function parameter 'flags' description in 'sdma_v4_0_vm_write_pte' drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:1734: warning: Function parameter or member 'ring' not described in 'sdma_v4_0_ring_pad_ib' drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:1782: warning: Function parameter or member 'vmid' not described in 'sdma_v4_0_ring_emit_vm_flush' drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:1782: warning: Function parameter or member 'pd_addr' not described in 'sdma_v4_0_ring_emit_vm_flush' drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:1782: warning: Excess function parameter 'vm' description in 'sdma_v4_0_ring_emit_vm_flush' drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:2508: warning: Function parameter or member 'ib' not described in 'sdma_v4_0_emit_copy_buffer' drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:2508: warning: Function parameter or member 'tmz' not described in 'sdma_v4_0_emit_copy_buffer' drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:2508: warning: Excess function parameter 'ring' description in 'sdma_v4_0_emit_copy_buffer' drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:2534: warning: Function parameter or member 'ib' not described in 'sdma_v4_0_emit_fill_buffer' drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:2534: warning: Excess function parameter 'ring' description in 'sdma_v4_0_emit_fill_buffer' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit c890ace58d44a252f25002900ffa1e795999073c Author: Lee Jones Date: Tue Nov 24 19:38:04 2020 +0000 drm/amd/amdgpu/uvd_v5_0: Fix a bunch of kernel-doc function documentation issues Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c:153: warning: Function parameter or member 'handle' not described in 'uvd_v5_0_hw_init' drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c:153: warning: Excess function parameter 'adev' description in 'uvd_v5_0_hw_init' drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c:210: warning: Function parameter or member 'handle' not described in 'uvd_v5_0_hw_fini' drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c:210: warning: Excess function parameter 'adev' description in 'uvd_v5_0_hw_fini' drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c:463: warning: Function parameter or member 'addr' not described in 'uvd_v5_0_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c:463: warning: Function parameter or member 'seq' not described in 'uvd_v5_0_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c:463: warning: Function parameter or member 'flags' not described in 'uvd_v5_0_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c:463: warning: Excess function parameter 'fence' description in 'uvd_v5_0_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c:529: warning: Function parameter or member 'job' not described in 'uvd_v5_0_ring_emit_ib' drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c:529: warning: Function parameter or member 'flags' not described in 'uvd_v5_0_ring_emit_ib' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Nirmoy Das Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit f719d5339706a24f8dfacca93b258f7e206d89df Author: Lee Jones Date: Tue Nov 24 19:38:03 2020 +0000 drm/amd/amdgpu/sdma_v3_0: Fix incorrect param doc-rot issue Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c:1651: warning: Function parameter or member 'ib' not described in 'sdma_v3_0_emit_copy_buffer' drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c:1651: warning: Excess function parameter 'ring' description in 'sdma_v3_0_emit_copy_buffer' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit fe2788f37e5d66edc5d8726983ba2842c21d3427 Author: Lee Jones Date: Tue Nov 24 19:38:02 2020 +0000 drm/amd/amdgpu/sdma_v3_0: Fix a bunch of kernel-doc function documentation issues Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c:428: warning: Function parameter or member 'job' not described in 'sdma_v3_0_ring_emit_ib' drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c:428: warning: Function parameter or member 'flags' not described in 'sdma_v3_0_ring_emit_ib' drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c:484: warning: Function parameter or member 'addr' not described in 'sdma_v3_0_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c:484: warning: Function parameter or member 'seq' not described in 'sdma_v3_0_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c:484: warning: Function parameter or member 'flags' not described in 'sdma_v3_0_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c:484: warning: Excess function parameter 'fence' description in 'sdma_v3_0_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c:870: warning: Function parameter or member 'timeout' not described in 'sdma_v3_0_ring_test_ib' drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c:1018: warning: Function parameter or member 'ring' not described in 'sdma_v3_0_ring_pad_ib' drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c:1070: warning: Function parameter or member 'vmid' not described in 'sdma_v3_0_ring_emit_vm_flush' drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c:1070: warning: Function parameter or member 'pd_addr' not described in 'sdma_v3_0_ring_emit_vm_flush' drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c:1070: warning: Excess function parameter 'vm' description in 'sdma_v3_0_ring_emit_vm_flush' drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c:1643: warning: Function parameter or member 'ib' not described in 'sdma_v3_0_emit_copy_buffer' drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c:1643: warning: Function parameter or member 'tmz' not described in 'sdma_v3_0_emit_copy_buffer' drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c:1643: warning: Excess function parameter 'ring' description in 'sdma_v3_0_emit_copy_buffer' drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c:1668: warning: Function parameter or member 'ib' not described in 'sdma_v3_0_emit_fill_buffer' drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c:1668: warning: Excess function parameter 'ring' description in 'sdma_v3_0_emit_fill_buffer' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 2434becdd5fd2d045b3975bede64e45d16b3a6b0 Author: Lee Jones Date: Tue Nov 24 19:38:01 2020 +0000 drm/amd/amdgpu/sdma_v2_4: Fix a bunch of kernel-doc function documentation issues Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c:254: warning: Function parameter or member 'job' not described in 'sdma_v2_4_ring_emit_ib' drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c:254: warning: Function parameter or member 'flags' not described in 'sdma_v2_4_ring_emit_ib' drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c:310: warning: Function parameter or member 'addr' not described in 'sdma_v2_4_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c:310: warning: Function parameter or member 'seq' not described in 'sdma_v2_4_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c:310: warning: Function parameter or member 'flags' not described in 'sdma_v2_4_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c:310: warning: Excess function parameter 'fence' description in 'sdma_v2_4_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c:598: warning: Function parameter or member 'timeout' not described in 'sdma_v2_4_ring_test_ib' drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c:747: warning: Function parameter or member 'ring' not described in 'sdma_v2_4_ring_pad_ib' drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c:799: warning: Function parameter or member 'vmid' not described in 'sdma_v2_4_ring_emit_vm_flush' drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c:799: warning: Function parameter or member 'pd_addr' not described in 'sdma_v2_4_ring_emit_vm_flush' drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c:799: warning: Excess function parameter 'vm' description in 'sdma_v2_4_ring_emit_vm_flush' drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c:1205: warning: Function parameter or member 'ib' not described in 'sdma_v2_4_emit_copy_buffer' drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c:1205: warning: Function parameter or member 'tmz' not described in 'sdma_v2_4_emit_copy_buffer' drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c:1205: warning: Excess function parameter 'ring' description in 'sdma_v2_4_emit_copy_buffer' drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c:1230: warning: Function parameter or member 'ib' not described in 'sdma_v2_4_emit_fill_buffer' drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c:1230: warning: Excess function parameter 'ring' description in 'sdma_v2_4_emit_fill_buffer' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 3e1b1b778806579b33b49bd635355948ed74b90d Author: Lee Jones Date: Tue Nov 24 19:38:00 2020 +0000 drm/amd/amdgpu/gfx_v10_0: Remove a bunch of set but unused variables Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c: In function ‘gfx_v10_rlcg_wreg’: drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:1416:18: warning: variable ‘grbm_idx’ set but not used [-Wunused-but-set-variable] drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:1415:18: warning: variable ‘grbm_cntl’ set but not used [-Wunused-but-set-variable] drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:1413:15: warning: variable ‘scratch_reg3’ set but not used [-Wunused-but-set-variable] drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:1412:15: warning: variable ‘scratch_reg2’ set but not used [-Wunused-but-set-variable] Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit c5ce5115fd2a4effe1a581f618a1410c811bcdd0 Author: Lee Jones Date: Tue Nov 24 19:37:59 2020 +0000 drm/amd/amdgpu/gfx_v8_0: Functions must follow directly after their headers Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c:3698: warning: Excess function parameter 'adev' description in 'DEFAULT_SH_MEM_BASES' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit a2ef32c5bbe255967edc52d4dcf3c818fd4afab5 Author: Lee Jones Date: Tue Nov 24 19:37:58 2020 +0000 drm/amd/amdgpu/gfx_v9_0: Make called-by-reference only function static Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c:2998:6: warning: no previous prototype for ‘gfx_v9_0_rlc_stop’ [-Wmissing-prototypes] Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit c44037549afada32f212abaf725bb01ce5ac761e Author: Lee Jones Date: Tue Nov 24 19:37:57 2020 +0000 drm/amd/amdgpu/dce_v11_0: Supply description for function param 'async' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/dce_v11_0.c:255: warning: Function parameter or member 'async' not described in 'dce_v11_0_page_flip' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Luben Tuikov Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 5c03e8b229f47c0fa17865e22c364675bfc85748 Author: Lee Jones Date: Tue Nov 24 19:37:56 2020 +0000 drm/amd/amdgpu/dce_v10_0: Supply description for function param 'async' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/dce_v10_0.c:237: warning: Function parameter or member 'async' not described in 'dce_v10_0_page_flip' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Luben Tuikov Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 3fdd2da061c543658f1e4ee599abd51e140991fe Author: Lee Jones Date: Tue Nov 24 19:37:55 2020 +0000 drm/amd/amdgpu/psp_v11_0: Make local function 'psp_v11_0_wait_for_bootloader()' static Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/psp_v11_0.c:223:5: warning: no previous prototype for ‘psp_v11_0_wait_for_bootloader’ [-Wmissing-prototypes] Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Hawking Zhang Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit c56fb081897941eb88c3ab1c245bf7e66489c9a6 Author: Lee Jones Date: Tue Nov 24 19:37:54 2020 +0000 drm/amd/amdgpu/navi10_ih: Add descriptions for 'ih' and 'entry' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/navi10_ih.c:453: warning: Function parameter or member 'ih' not described in 'navi10_ih_get_wptr' drivers/gpu/drm/amd/amdgpu/navi10_ih.c:512: warning: Function parameter or member 'ih' not described in 'navi10_ih_decode_iv' drivers/gpu/drm/amd/amdgpu/navi10_ih.c:512: warning: Function parameter or member 'entry' not described in 'navi10_ih_decode_iv' drivers/gpu/drm/amd/amdgpu/navi10_ih.c:552: warning: Function parameter or member 'ih' not described in 'navi10_ih_irq_rearm' drivers/gpu/drm/amd/amdgpu/navi10_ih.c:585: warning: Function parameter or member 'ih' not described in 'navi10_ih_set_rptr' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Alex Sierra Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 5162e40e1558f681853fbdf5399132f50c857746 Author: Lee Jones Date: Tue Nov 24 19:37:53 2020 +0000 drm/amd/amdgpu/vega10_ih: Add descriptions for 'ih' and 'entry' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/vega10_ih.c:377: warning: Function parameter or member 'ih' not described in 'vega10_ih_get_wptr' drivers/gpu/drm/amd/amdgpu/vega10_ih.c:440: warning: Function parameter or member 'ih' not described in 'vega10_ih_decode_iv' drivers/gpu/drm/amd/amdgpu/vega10_ih.c:440: warning: Function parameter or member 'entry' not described in 'vega10_ih_decode_iv' drivers/gpu/drm/amd/amdgpu/vega10_ih.c:480: warning: Function parameter or member 'ih' not described in 'vega10_ih_irq_rearm' drivers/gpu/drm/amd/amdgpu/vega10_ih.c:513: warning: Function parameter or member 'ih' not described in 'vega10_ih_set_rptr' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Zhigang Luo Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit a549a9da37f8200640c7006d92ee2c5d1e52c8ea Author: Lee Jones Date: Tue Nov 24 19:37:50 2020 +0000 drm/amd/amdgpu/cz_ih: Add missing function param descriptions for 'ih' and 'entry' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/cz_ih.c:191: warning: Function parameter or member 'ih' not described in 'cz_ih_get_wptr' drivers/gpu/drm/amd/amdgpu/cz_ih.c:223: warning: Function parameter or member 'ih' not described in 'cz_ih_decode_iv' drivers/gpu/drm/amd/amdgpu/cz_ih.c:223: warning: Function parameter or member 'entry' not described in 'cz_ih_decode_iv' drivers/gpu/drm/amd/amdgpu/cz_ih.c:253: warning: Function parameter or member 'ih' not described in 'cz_ih_set_rptr' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit c18dd61ae42a63de56db64574e0ccccfe963d1da Author: Lee Jones Date: Tue Nov 24 19:37:51 2020 +0000 drm/amd/amdgpu/amdgpu_psp: Make local function 'parse_ta_bin_descriptor' static Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c:2576:5: warning: no previous prototype for ‘parse_ta_bin_descriptor’ [-Wmissing-prototypes] Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 39902109aada7c4138bfbaa7879cdb460e2a06a3 Author: Lee Jones Date: Tue Nov 24 19:37:49 2020 +0000 drm/amd/amdgpu/tonga_ih: Provide some missing descriptions for 'ih' and 'entry' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/tonga_ih.c:193: warning: Function parameter or member 'ih' not described in 'tonga_ih_get_wptr' drivers/gpu/drm/amd/amdgpu/tonga_ih.c:225: warning: Function parameter or member 'ih' not described in 'tonga_ih_decode_iv' drivers/gpu/drm/amd/amdgpu/tonga_ih.c:225: warning: Function parameter or member 'entry' not described in 'tonga_ih_decode_iv' drivers/gpu/drm/amd/amdgpu/tonga_ih.c:255: warning: Function parameter or member 'ih' not described in 'tonga_ih_set_rptr' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 5530ac8e8c6839977bc6bc66cc1b25b3e4d494a1 Author: Lee Jones Date: Tue Nov 24 19:37:48 2020 +0000 drm/amd/amdgpu/iceland_ih: Add missing function param descriptions for 'ih' and 'entry' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/iceland_ih.c:191: warning: Function parameter or member 'ih' not described in 'iceland_ih_get_wptr' drivers/gpu/drm/amd/amdgpu/iceland_ih.c:223: warning: Function parameter or member 'ih' not described in 'iceland_ih_decode_iv' drivers/gpu/drm/amd/amdgpu/iceland_ih.c:223: warning: Function parameter or member 'entry' not described in 'iceland_ih_decode_iv' drivers/gpu/drm/amd/amdgpu/iceland_ih.c:253: warning: Function parameter or member 'ih' not described in 'iceland_ih_set_rptr' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 185ef9ef2f6ffadc4907efb89107b19f1c606596 Author: Lee Jones Date: Tue Nov 24 19:37:46 2020 +0000 drm/amd/amdgpu/gmc_v10_0: Suppy some missing function doc descriptions Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c:278: warning: Function parameter or member 'vmhub' not described in 'gmc_v10_0_flush_gpu_tlb' drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c:278: warning: Function parameter or member 'flush_type' not described in 'gmc_v10_0_flush_gpu_tlb' drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c:371: warning: Function parameter or member 'flush_type' not described in 'gmc_v10_0_flush_gpu_tlb_pasid' drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c:371: warning: Function parameter or member 'all_hub' not described in 'gmc_v10_0_flush_gpu_tlb_pasid' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit b4339bb9a4f807f0acfbcc89e7abe77f431058c8 Author: Alex Deucher Date: Mon Nov 30 17:53:43 2020 -0500 drm/amdgpu/swsmu/vangogh: return error if fetching metrics fails rather than just dropping the error. Also fixes a set but not used variable warning. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 99698b51e58509d6eaf3768ac9f38db979b721ee Author: Alex Deucher Date: Mon Nov 30 10:44:51 2020 -0500 drm/amdgpu: enable AGP aperture on gmc10.x (v2) Just a small optimization for accessing system pages directly. Was missed for gmc v10 since the feature landed for older gmcs while we were still on the emulator or gmc10 and we use the AGP aperture for zfb on the emulator. v2: fix up the system aperture as well Reviewed-and-tested-by: Evan Quan Signed-off-by: Alex Deucher commit 7624897c10540d82f78c63ed7bad1c1d011b9fd6 Author: Alex Deucher Date: Mon Nov 30 13:55:45 2020 -0500 drm/amdgpu: default noretry=0 for navi1x and newer (v2) There are no performance advantages to setting it to 1 and it causes stability issues in some cases. v2: simplify the code Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1374 Reviewed-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 15024daf4e5b30888b8b950e3e5988f0bf39ee08 Author: Philip Yang Date: Mon Nov 30 16:02:00 2020 -0500 drm/amdkfd: keep BOs in system memory if restore failed If vram is used up, display allocate vram evict the KFD BOs to system memory. KFD schedule restore work to restore BOs back to vram. If display BOs are pinned in vram, KFD restore work will keep retry, and may never success. If restore BO back to vram failed, keep the BO in system memory to prevent endless retry restore, and GPU mapping will update to system memory. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit c529b685e1c05440ad6af10673e00c4a49b926aa Author: Aric Cyr Date: Mon Nov 23 09:56:00 2020 -0500 drm/amd/display: DC Release 3.2.114 Signed-off-by: Aric Cyr Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 34ba432c946dfcd205813b1047790aedc562140e Author: Anthony Koo Date: Sun Nov 22 20:31:45 2020 -0500 drm/amd/display: [FW Promotion] Release 0.0.44 Add feature caps to allow way for driver to query what features FW supports Signed-off-by: Anthony Koo Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit f5041bc1fcc3c476e08a28cb393a6869536e33c8 Author: Zhan Liu Date: Thu Nov 19 22:48:29 2020 -0500 drm/amd/display: Properly define DPCS related info for DCN301 [Why] DPCS related info needs to be properly defined within code. [How] Add missing DPCS related info to code. Signed-off-by: Zhan Liu Reviewed-by: Nikola Cornij Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 115a385c08d8d1874b3496d134cba0cc218f0fda Author: Eryk Brol Date: Thu Nov 19 16:48:57 2020 -0500 drm/amd/display: Do full modeset when DSC debugfs is changed [Why] Whenever DSC parameters are changed we need to perform full modeset to commit DSC changes to DC. [How] If dsc_force_changed is set, need to set mode_changed on new CRTC state Signed-off-by: Eryk Brol Signed-off-by: Mikita Lipski Reviewed-by: Mikita Lipski Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit d0274aba24bf98aad04beb917dea4fbe45659a79 Author: Jacky Liao Date: Mon Nov 16 17:04:35 2020 -0500 drm/amd/display: Add DSCL memory low power support [Why] The DSCL memory blocks should be powered down when they're not in use. This will reduce power consumption. [How] 1. Write to DSCL_MEM_PWR_FORCE to put memory to shutdown when DSCL is not used. 2. Added a debug option to allow this behaviour to be turned off Signed-off-by: Jacky Liao Reviewed-by: Eric Yang Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 99349a8aeda7a044fc5850924bc3b57c306a1553 Author: Brandon Syu Date: Thu Nov 12 15:35:52 2020 +0800 drm/amd/display: Init clock value by current vbios CLKs [Why] While booting into OS, driver updates DPP/DISP CLKs. But init clock value is zero which is invalid. [How] Get current clocks value to update init clocks. To avoid underflow. Signed-off-by: Brandon Syu Reviewed-by: Tony Cheng Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 079204508ec0cd32a66c5ca8b9f977383355b181 Author: Joshua Aberback Date: Tue Nov 17 11:27:33 2020 -0500 drm/amd/display: Check link_active instead of lane_settings != unknown [Why] enable_link_dp_mst checks that cur_link_settings != unknown to determine that the link is already enabled, to skip redundant enablement calls for multiple streams on the same link. During dc_reinitialize_hardware, cur_link_settings on previously-active links is not cleared, which blocks MST links from being re-enabled after a reinitialization. [How] - check for link_status->link_active instead, as it's the real intent - clear cur_link_settings when we clear link_active Signed-off-by: Joshua Aberback Reviewed-by: Wenjing Liu Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 901c1ec05ef277ce9d43cb806a225b28b3efe89a Author: Sung Lee Date: Fri Nov 13 13:34:55 2020 -0500 drm/amd/display: Update dram_clock_change_latency for DCN2.1 [WHY] dram clock change latencies get updated using ddr4 latency table, but does that update does not happen before validation. This value should not be the default and should be number received from df for better mode support. This may cause a PState hang on high refresh panels with short vblanks such as on 1080p 360hz or 300hz panels. [HOW] Update latency from 23.84 to 11.72. Signed-off-by: Sung Lee Reviewed-by: Tony Cheng Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 00b0ac67811b96d32940fa705fb1405139bb3aab Author: Jacky Liao Date: Fri Nov 13 13:13:27 2020 -0500 drm/amd/display: Add HDR3DLUT and SHAPER memory shutdown support [Why] The HDR3DLUT and SHAPER memory blocks should be powered down when they're not in use. This will reduce power consumption. [How] 1. Write to HDR3DLUT_MEM_PWR_FORCE to put memory to shutdown when HDR3DLUT is not used. 2. Write to SHAPER_MEM_PWR_FORCE to put memory to shutdown when SHAPER is not used. Signed-off-by: Jacky Liao Reviewed-by: Eric Yang Acked-by: Yongqiang Sun Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit bc1e089476dcad26a27a2714baa7169774f89d51 Author: Eric Bernstein Date: Thu Nov 12 16:18:48 2020 -0500 drm/amd/display: Revert update clk_mgr for vg This reverts commit 2208f39c750972ad3796b4353ccf9f7c8636931c. It caused a regression in internal FPGA tests. Signed-off-by: Eric Bernstein Reviewed-by: Eric Yang Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 0c056b14d82eeb95c41b78901dbf2872de70b607 Author: Marek Olšák Date: Wed Nov 25 01:40:51 2020 -0500 drm/amdgpu: set LDS_CONFIG=0x20 on VanGogh to fix MGCG hang Same as Sienna Cichlid and Navy Flounder. Signed-off-by: Marek Olšák Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 3c4d55c9b9becedd8d31a7c96783a364533713ab Author: Aurabindo Pillai Date: Thu Nov 26 16:45:59 2020 -0500 drm/amd/display: turn DPMS off on connector unplug [Why&How] Set dpms off on the connector that was unplugged, for the side effect of releasing some references held through deallocation of MST payload. This is the expected behaviour for non MST devices as well. Signed-off-by: Aurabindo Pillai Signed-off-by: Eryk Brol Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 3f16ae825697fe317c14e97f80c2ad487b55b3e9 Author: Aurabindo Pillai Date: Thu Nov 26 09:31:05 2020 -0500 drm/amd/display: Clear dc remote sinks on MST disconnect [Why&How] Recent changes to upstream mst code remove the callback which cleared the internal state for mst. Move the missing functionality that was previously called through the destroy call back for mst connector destroy Signed-off-by: Aurabindo Pillai Signed-off-by: Eryk Brol Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 22dd89828a681d0437b7941e26366b0ff36c771f Author: Arunpravin Date: Fri Nov 27 21:40:24 2020 +0530 drm/amdgpu/pm/smu11: Fix fan set speed bug Fix fan set speed calculation. Suggested-by: Kenneth Feng Signed-off-by: Arunpravin Acked-by: Alex Deucher Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 79c77ac60336ed25107099e222fe4381e7f3a42d Author: Jinzhou Su Date: Fri Nov 27 16:06:30 2020 +0800 drm/amdgpu: Set doorbell range for gfx ring If there are 2 gfx rings, the doorbell lower range of second ring will override the first ring. Signed-off-by: Jinzhou.Su Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 3591ecd630ab46ed750216c6b8768aea5a75611e Author: Tao Zhou Date: Fri Nov 27 11:55:30 2020 +0800 drm/amdgpu: update GC golden setting for dimgrey_cavefish Update GC golden setting for dimgrey_cavefish. Signed-off-by: Tao Zhou Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit 7cf7a392af269fb83d8695be2ea92de3959bbd60 Author: Jingwen Chen Date: Tue Nov 24 14:06:54 2020 +0800 drm/amdgpu: skip power profile switch in sriov power profile switch in vcn need to send SetWorkLoad msg to smu, which is not supported in sriov. Signed-off-by: Jingwen Chen Reviewed-by: Jiange Zhao Signed-off-by: Alex Deucher commit d503d8b81d06e3b2ef4a7df002d07bcc7d299216 Author: Jiansong Chen Date: Thu Nov 26 12:16:32 2020 +0800 drm/amd/pm: update driver if version for navy_flounder It's in accordance with pmfw 65.18.0 for navy_flounder. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 91a7f887816dba3f06f2e62ffe7a5b722c45a234 Author: James Zhu Date: Wed Nov 25 09:04:11 2020 -0500 drm/amdgpu/vcn3.0: fix compilation warning Fixed warning: no previous prototype. Signed-off-by: James Zhu Reported-by: kernel test robot Reviewed-by: Nirmoy Das Signed-off-by: Alex Deucher commit 8c8244ca4eee755c92c459a17230faa9fc2dd828 Author: Likun Gao Date: Wed Nov 25 21:03:01 2020 +0800 drm/amdgpu: increase reserved VRAM size to 8MB 4MB reserved VRAM size which used for page tables was not enough for some condition, increase it to 8MB to reduce page table contention. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 055e94a867c49ebb13de18287b3b663d1787f515 Author: Stanley.Yang Date: Fri Nov 20 14:14:53 2020 +0800 drm/amdgpu: only skip smc sdma sos ta and asd fw in SRIOV for navi12 The KFDTopologyTest.BasicTest will failed if skip smc, sdma, sos, ta and asd fw in SRIOV for vega10, so adjust above fw and skip load them in SRIOV only for navi12. v2: remove unnecessary asic type check. Signed-off-by: Stanley.Yang Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 9ccde05c0a68d8d06bf2b7c5f886ecd58ecd1c9a Author: Stanley.Yang Date: Mon Nov 23 16:17:40 2020 +0800 drm/amdgpu: set default value of noretry to 1 for specified asic noretry = 0 casue KFDGraphicsInterop test failed on SRIOV platform for vega10, so set noretry to 1 for vega10. Signed-off-by: Stanley.Yang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 32b7cfbd4bb2d63fffc34a781e1f3cd911190aef Author: Alexandre Belloni Date: Sat Nov 28 23:28:18 2020 +0100 ARM: dts: at91: remove deprecated ADC properties atmel,adc-res, atmel,adc-res-names and the trigger nodes are not parsed by the driver anymore and the information is now defined in the driver data. Also remove the leftover #address-cells and #size-cells that were used when the trigger nodes had a unit-address. Finally, the default is already to use the highest resoution. Remove atmel,adc-use-res from the SoC dtsi. Signed-off-by: Alexandre Belloni Reviewed-by: Ludovic Desroches Link: https://lore.kernel.org/r/20201128222818.1910764-11-alexandre.belloni@bootlin.com commit 851a95da583c26e2ddeb7281e9b61f0d76ea5aba Author: Alexandre Belloni Date: Sat Nov 28 23:28:17 2020 +0100 ARM: dts: at91: at91sam9rl: fix ADC triggers The triggers for the ADC were taken from at91sam9260 dtsi but are not correct. Fixes: a4c1d6c75822 ("ARM: at91/dt: sam9rl: add lcd, adc, usb gadget and pwm support") Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201128222818.1910764-10-alexandre.belloni@bootlin.com commit 53de2d127430d0b5300de5d6ada0f17df0379511 Author: Alexandre Belloni Date: Sat Nov 28 23:28:16 2020 +0100 ARM: dts: at91: sama5d3: use proper ADC compatible The ADC is different from the at91sam9x5 ADC. Not only it doesn't have the same resolution but it even has only one and the LOWRES bit doesn't exist. Signed-off-by: Alexandre Belloni Reviewed-by: Ludovic Desroches Link: https://lore.kernel.org/r/20201128222818.1910764-9-alexandre.belloni@bootlin.com commit 26fecbf7602dd69b649914e61526bd67c557fece Author: Vasile-Laurentiu Stanimir Date: Wed Nov 4 15:05:32 2020 +0200 pstore: Move kmsg_bytes default into Kconfig While kmsg_bytes can be set for pstore via mount, if a crash occurs before the mount only partial console log will be stored as kmsg_bytes defaults to a potentially different hardcoded value in the kernel (PSTORE_DEFAULT_KMSG_BYTES). This makes it impossible to analyze valuable post-mortem data especially on the embedded development or in the process of bringing up new boards. Change this value to be a Kconfig option with the default of old PSTORE_DEFAULT_KMSG_BYTES Signed-off-by: Vasile-Laurentiu Stanimir Signed-off-by: Kees Cook commit 8caaf0610fb9948b1f3ad220f83fccfc24e33333 Author: Alexandre Belloni Date: Fri Oct 30 19:36:58 2020 +0100 ARM: dts: at91: kizbox: switch to new pwm-atmel-tcb binding Switch to the new pwm-atmel-tcb binding that avoid wasting TCB channels. Signed-off-by: Alexandre Belloni Cc: Antoine Aubert Link: https://lore.kernel.org/r/20201030183658.1007395-5-alexandre.belloni@bootlin.com commit b6f8ed33ab2bbc58e40fb1e2fb0f9c90cab04baf Author: Christoph Hellwig Date: Fri Oct 16 15:20:41 2020 +0200 pstore/blk: remove {un,}register_pstore_blk This interface is entirely unused, so remove them and various bits of unreachable code. Signed-off-by: Christoph Hellwig Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20201016132047.3068029-4-hch@lst.de commit 9e39394faef6d436f0c9900d2a5c690c13bc1cac Author: Lukas Bulwahn Date: Fri Nov 27 10:34:21 2020 +0100 net/ipv6: propagate user pointer annotation For IPV6_2292PKTOPTIONS, do_ipv6_getsockopt() stores the user pointer optval in the msg_control field of the msghdr. Hence, sparse rightfully warns at ./net/ipv6/ipv6_sockglue.c:1151:33: warning: incorrect type in assignment (different address spaces) expected void *msg_control got char [noderef] __user *optval Since commit 1f466e1f15cf ("net: cleanly handle kernel vs user buffers for ->msg_control"), user pointers shall be stored in the msg_control_user field, and kernel pointers in the msg_control field. This allows to propagate __user annotations nicely through this struct. Store optval in msg_control_user to properly record and propagate the memory space annotation of this pointer. Note that msg_control_is_user is set to true, so the key invariant, i.e., use msg_control_user if and only if msg_control_is_user is true, holds. The msghdr is further used in the six alternative put_cmsg() calls, with msg_control_is_user being true, put_cmsg() picks msg_control_user preserving the __user annotation and passes that properly to copy_to_user(). No functional change. No change in object code. Signed-off-by: Lukas Bulwahn Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20201127093421.21673-1-lukas.bulwahn@gmail.com Signed-off-by: Jakub Kicinski commit 2f4c9ba23b887e7a69a474e9d53f38b5833a2119 Author: Javier González Date: Tue Dec 1 13:02:21 2020 +0100 nvme: export zoned namespaces without Zone Append support read-only Allow ZNS NVMe SSDs to present a read-only namespace when append is not supported, instead of rejecting the namespace directly. This allows (i) the namespace to be used in read-only mode, which is not a problem as the append command only affects the write path, and (ii) to use standard management tools such as nvme-cli to choose a different format or firmware slot that is compatible with the Linux zoned block device. Signed-off-by: Javier González Signed-off-by: Christoph Hellwig commit ba4fb3205680ade6c29c80102e86b88641709561 Author: Javier González Date: Tue Dec 1 13:56:09 2020 +0100 nvme: rename bdev operations Remane block device operations in preparation to add char device file operations. Signed-off-by: Javier González Reviewed-by: Minwoo Im Signed-off-by: Christoph Hellwig commit f68abd9cc00cce58c5dbe5953ac190d25f1e4f8e Author: Javier González Date: Tue Dec 1 13:56:08 2020 +0100 nvme: rename controller base dev_t char device Rename controller base dev_t char device in preparation for adding a namespace char device. Signed-off-by: Javier González Reviewed-by: Minwoo Im Signed-off-by: Christoph Hellwig commit e1aaf5cacba9d994d825a87a33bdd33343477f16 Author: Javier González Date: Tue Dec 1 13:56:07 2020 +0100 nvme: remove unnecessary return values Cleanup unnecessary ret values that are not checked or used in nvme_alloc_ns(). Signed-off-by: Javier González Reviewed-by: Minwoo Im Signed-off-by: Christoph Hellwig commit f781f3dd6a165d860c29eeb092af8584284e50f3 Author: Minwoo Im Date: Mon Nov 30 21:47:47 2020 +0900 nvme: print a warning for when listing active namespaces fails During the scan_work, an Identify command is issued to figure out which namespaces are active. If this command fails, the nvme driver falls back to scanning namespaces sequentially. In this situation, we don't see any warnings and don't even know whether list-ns command has been failed or not easiliy. Printa warning when the Identify command executin fail: [ 1.108399] nvme nvme0: Identify NS List failed (status=0x400b) [ 1.109583] nvme0n1: detected capacity change from 0 to 1048576 [ 1.112186] nvme nvme0: Identify Descriptors failed (nsid=2, status=0x4002) [ 1.113929] nvme nvme0: Identify Descriptors failed (nsid=3, status=0x4002) [ 1.116537] nvme nvme0: Identify Descriptors failed (nsid=4, status=0x4002) ... Signed-off-by: Minwoo Im Signed-off-by: Christoph Hellwig commit aa9d729592316e121110daa81604f71f82663167 Author: Minwoo Im Date: Mon Nov 30 21:47:46 2020 +0900 nvme: improve an error message on Identify failure Add the namespace ID to the error message when the Identify command used to retrieve the Namespace Identification Descriptor list fails. This avoids rather useless and duplicative messages like the following: [ 1.321031] nvme nvme0: Identify Descriptors failed (16386) [ 1.321948] nvme nvme0: Identify Descriptors failed (16386) [ 1.322872] nvme nvme0: Identify Descriptors failed (16386) [ 1.323775] nvme nvme0: Identify Descriptors failed (16386) [ 1.324687] nvme nvme0: Identify Descriptors failed (16386) ... Also, print the nvme status code in hexadecimal rather than decimal format rather for better readability. Signed-off-by: Minwoo Im Signed-off-by: Christoph Hellwig commit 8c4dfea97f15b80097b3f882ca428fb2751ec30c Author: Victor Gladkov Date: Tue Nov 24 18:34:59 2020 +0000 nvme-fabrics: reject I/O to offline device Commands get stuck while Host NVMe-oF controller is in reconnect state. The controller enters into reconnect state when it loses connection with the target. It tries to reconnect every 10 seconds (default) until a successful reconnect or until the reconnect time-out is reached. The default reconnect time out is 10 minutes. Applications are expecting commands to complete with success or error within a certain timeout (30 seconds by default). The NVMe host is enforcing that timeout while it is connected, but during reconnect the timeout is not enforced and commands may get stuck for a long period or even forever. To fix this long delay due to the default timeout, introduce new "fast_io_fail_tmo" session parameter. The timeout is measured in seconds from the controller reconnect and any command beyond that timeout is rejected. The new parameter value may be passed during 'connect'. The default value of -1 means no timeout (similar to current behavior). Signed-off-by: Victor Gladkov Signed-off-by: Chaitanya Kulkarni Reviewed-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Reviewed-by: Chao Leng Signed-off-by: Christoph Hellwig commit 9f20599c4821d1f7281a3efb3ef94ff3cfdd5e10 Author: Colin Ian King Date: Thu Nov 26 22:40:29 2020 +0000 nvmet: fix a spelling mistake "incuding" -> "including" in Kconfig There is a spelling mistake in the Kconfig help text. Fix it. Signed-off-by: Colin Ian King Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 0068a7b010533872b6e71a376771dc310d90fa1c Author: Max Gurtovoy Date: Wed Nov 25 12:27:36 2020 +0000 nvmet: make sure discovery change log event is protected Generation counter is protected by nvmet_config_sem. Make sure the callers that call functions that might change it, are calling it properly. Signed-off-by: Max Gurtovoy Reviewed-by: Israel Rukshin Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 6d65aeab7bf6e83e75f53cfdbdb84603e52e1182 Author: Amit Date: Sun Nov 15 14:19:51 2020 +0200 nvmet: remove unused ctrl->cqs remove unused cqs from nvmet_ctrl struct this will reduce the allocated memory. Signed-off-by: Amit Signed-off-by: Christoph Hellwig commit e3aef0950a30ecbf475be52509ca178907410709 Author: Niklas Schnelle Date: Thu Nov 12 09:23:02 2020 +0100 nvme-pci: don't allocate unused I/O queues currently the NVME_QUIRK_SHARED_TAGS quirk for Apple devices is handled during the assignment of nr_io_queues in nvme_setup_io_queues(). This however means that for these devices nvme_max_io_queues() will actually not return the supported maximum which is confusing and unexpected and also means that in nvme_probe() we are allocating for I/O queues that will never be used. Fix this by moving the quirk handling into nvme_max_io_queues(). Signed-off-by: Niklas Schnelle Signed-off-by: Christoph Hellwig commit ff4e5fbad06f762b8551da56e8fd64ad14c8aa3e Author: Niklas Schnelle Date: Thu Nov 12 09:23:01 2020 +0100 nvme-pci: drop min() from nr_io_queues assignment in nvme_setup_io_queues() the number of I/O queues is set to either 1 in case of a quirky Apple device or to the min of nvme_max_io_queues() or dev->nr_allocated_queues - 1. This is unnecessarily complicated as dev->nr_allocated_queues is only assigned once and is nvme_max_io_queues() + 1. Signed-off-by: Niklas Schnelle Signed-off-by: Christoph Hellwig commit dab3902b19a0dd1668d0cc3e8e4b976b1ee8638c Author: Chaitanya Kulkarni Date: Mon Nov 9 18:24:05 2020 -0800 nvmet: use inline bio for passthru fast path In nvmet_passthru_execute_cmd() which is a high frequency function it uses bio_alloc() which leads to memory allocation from the fs pool for each I/O. For NVMeoF nvmet_req we already have inline_bvec allocated as a part of request allocation that can be used with preallocated bio when we already know the size of request before bio allocation with bio_alloc(), which we already do. Introduce a bio member for the nvmet_req passthru anon union. In the fast path, check if we can get away with inline bvec and bio from nvmet_req with bio_init() call before actually allocating from the bio_alloc(). This will be useful to avoid any new memory allocation under high memory pressure situation and get rid of any extra work of allocation (bio_alloc()) vs initialization (bio_init()) when transfer len is < NVMET_MAX_INLINE_DATA_LEN that user can configure at compile time. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Logan Gunthorpe Signed-off-by: Christoph Hellwig commit a4fe2d3afe3ce77edeadb567c0d0a8d102c6b159 Author: Chaitanya Kulkarni Date: Mon Nov 9 18:24:04 2020 -0800 nvmet: use blk_rq_bio_prep instead of blk_rq_append_bio The function blk_rq_append_bio() is a genereric API written for all types driver (having bounce buffers) and different context (where request is already having a bio i.e. rq->bio != NULL). It does mainly three things: calculating the segments, bounce queue and if req->bio == NULL call blk_rq_bio_prep() or handle low level merge() case. The NVMe PCIe and fabrics transports currently does not use queue bounce mechanism. In order to find this for each request processing in the passthru blk_rq_append_bio() does extra work in the fast path for each request. When I ran I/Os with different block sizes on the passthru controller I found that we can reuse the req->sg_cnt instead of iterating over the bvecs to find out nr_segs in blk_rq_append_bio(). This calculation in blk_rq_append_bio() is a duplication of work given that we have the value in req->sg_cnt. (correct me here if I'm wrong). With NVMe passthru request based driver we allocate fresh request each time, so every call to blk_rq_append_bio() rq->bio will be NULL i.e. we don't really need the second condition in the blk_rq_append_bio() and the resulting error condition in the caller of blk_rq_append_bio(). So for NVMeOF passthru driver recalculating the segments, bounce check and ll_back_merge code is not needed such that we can get away with the minimal version of the blk_rq_append_bio() which removes the error check in the fast path along with extra variable in nvmet_passthru_map_sg(). This patch updates the nvmet_passthru_map_sg() such that it does only appending the bio to the request in the context of the NVMeOF Passthru driver. Following are perf numbers :- With current implementation (blk_rq_append_bio()) :- ---------------------------------------------------- + 5.80% 0.02% kworker/0:2-mm_ [nvmet] [k] nvmet_passthru_execute_cmd + 5.44% 0.01% kworker/0:2-mm_ [nvmet] [k] nvmet_passthru_execute_cmd + 4.88% 0.00% kworker/0:2-mm_ [nvmet] [k] nvmet_passthru_execute_cmd + 5.44% 0.01% kworker/0:2-mm_ [nvmet] [k] nvmet_passthru_execute_cmd + 4.86% 0.01% kworker/0:2-mm_ [nvmet] [k] nvmet_passthru_execute_cmd + 5.17% 0.00% kworker/0:2-eve [nvmet] [k] nvmet_passthru_execute_cmd With this patch using blk_rq_bio_prep() :- ---------------------------------------------------- + 3.14% 0.02% kworker/0:2-eve [nvmet] [k] nvmet_passthru_execute_cmd + 3.26% 0.01% kworker/0:2-eve [nvmet] [k] nvmet_passthru_execute_cmd + 5.37% 0.01% kworker/0:2-mm_ [nvmet] [k] nvmet_passthru_execute_cmd + 5.18% 0.02% kworker/0:2-eve [nvmet] [k] nvmet_passthru_execute_cmd + 4.84% 0.02% kworker/0:2-mm_ [nvmet] [k] nvmet_passthru_execute_cmd + 4.87% 0.01% kworker/0:2-mm_ [nvmet] [k] nvmet_passthru_execute_cmd Signed-off-by: Chaitanya Kulkarni Reviewed-by: Logan Gunthorpe Signed-off-by: Christoph Hellwig commit 06b3bec8204b4c6433ccb2f6ec60fedb77b34cb3 Author: Chaitanya Kulkarni Date: Mon Nov 9 18:24:02 2020 -0800 nvmet: remove op_flags for passthru commands For passthru commands setting op_flags has no meaning. Remove the code that sets the op flags in nvmet_passthru_map_sg(). Signed-off-by: Chaitanya Kulkarni Reviewed-by: Logan Gunthorpe Signed-off-by: Christoph Hellwig commit 39dfe84451b4526a8054cc5a127337bca980dfa3 Author: Chaitanya Kulkarni Date: Mon Nov 9 18:24:00 2020 -0800 nvme: split nvme_alloc_request() Right now nvme_alloc_request() allocates a request from block layer based on the value of the qid. When qid set to NVME_QID_ANY it used blk_mq_alloc_request() else blk_mq_alloc_request_hctx(). The function nvme_alloc_request() is called from different context, The only place where it uses non NVME_QID_ANY value is for fabrics connect commands :- nvme_submit_sync_cmd() NVME_QID_ANY nvme_features() NVME_QID_ANY nvme_sec_submit() NVME_QID_ANY nvmf_reg_read32() NVME_QID_ANY nvmf_reg_read64() NVME_QID_ANY nvmf_reg_write32() NVME_QID_ANY nvmf_connect_admin_queue() NVME_QID_ANY nvme_submit_user_cmd() NVME_QID_ANY nvme_alloc_request() nvme_keep_alive() NVME_QID_ANY nvme_alloc_request() nvme_timeout() NVME_QID_ANY nvme_alloc_request() nvme_delete_queue() NVME_QID_ANY nvme_alloc_request() nvmet_passthru_execute_cmd() NVME_QID_ANY nvme_alloc_request() nvmf_connect_io_queue() QID __nvme_submit_sync_cmd() nvme_alloc_request() With passthru nvme_alloc_request() now falls into the I/O fast path such that blk_mq_alloc_request_hctx() is never gets called and that adds additional branch check in fast path. Split the nvme_alloc_request() into nvme_alloc_request() and nvme_alloc_request_qid(). Replace each call of the nvme_alloc_request() with NVME_QID_ANY param with a call to newly added nvme_alloc_request() without NVME_QID_ANY. Replace a call to nvme_alloc_request() with QID param with a call to newly added nvme_alloc_request() and nvme_alloc_request_qid() based on the qid value set in the __nvme_submit_sync_cmd(). Signed-off-by: Chaitanya Kulkarni Reviewed-by: Logan Gunthorpe Signed-off-by: Christoph Hellwig commit 53ffabfd4ddb3a24c5603ae82eefb5537ecb5c20 Author: Chaitanya Kulkarni Date: Mon Nov 9 18:24:03 2020 -0800 block: move blk_rq_bio_prep() to linux/blk-mq.h This is a preparation patch to have minimal block layer request bio append functionality in the context of the NVMeOF Passthru driver which falls in the fast path and doesn't need calls from blk_rq_append_bio(). Signed-off-by: Chaitanya Kulkarni Reviewed-by: Logan Gunthorpe Signed-off-by: Christoph Hellwig commit 47e9730c26a4a5d4eab2124d6bbeb94693e44b46 Author: Chaitanya Kulkarni Date: Mon Nov 9 16:33:44 2020 -0800 nvmet: add passthru io timeout value attr NVMeOF controller in the passsthru mode is capable of handling wide set of I/O commands including vender specific passhtru io comands. The vendor specific I/O commands are used to read the large drive logs and can take longer than default NVMe commands, i.e. for passthru requests the timeout value may differ from the passthru controller's default timeout values (nvme-core:io_timeout). Add a configfs attribute so that user can set the io timeout values. In case if this configfs value is not set nvme_alloc_request() will set the NVME_IO_TIMEOUT value when request queuedata is NULL. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit a2f6a2b8ce43db608357a490e028166f9e4bab0d Author: Chaitanya Kulkarni Date: Mon Nov 9 16:33:43 2020 -0800 nvmet: add passthru admin timeout value attr NVMeOF controller in the passsthru mode is capable of handling wide set of admin commands including vender specific passhtru admin comands. The vendor specific admin commands are used to read the large drive logs and can take longer than default NVMe commands, i.e. for passthru requests the timeout value may differ from the passthru controller's default timeout values (nvme-core:admin_timeout). Add a configfs attribute so that user can set the admin timeout values. In case if this configfs value is not set nvme_alloc_request() will set the ADMIN_TIMEOUT value when request queuedata is NULL. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit dc96f93874c63e126087e1adf1973c9fecfdaa0c Author: Chaitanya Kulkarni Date: Mon Nov 9 16:33:45 2020 -0800 nvme: use consistent macro name for timeout This is purely a clenaup patch, add prefix NVME to the ADMIN_TIMEOUT to make consistent with NVME_IO_TIMEOUT. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 0d2e7c840b178bf9a47bd0de89d8f9182fa71d86 Author: Chaitanya Kulkarni Date: Mon Nov 9 16:33:42 2020 -0800 nvme: centralize setting the timeout in nvme_alloc_request The function nvme_alloc_request() is called from different context (I/O and Admin queue) where callers do not consider the I/O timeout when called from I/O queue context. Update nvme_alloc_request() to set the default I/O and Admin timeout value based on whether the queuedata is set or not. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 84115d6d80c809d65c42f9383f22c10b91a4eb1c Author: Baolin Wang Date: Tue Oct 27 16:15:16 2020 +0800 nvme: simplify nvme_req_qid() Use the request's '->mq_hctx->queue_num' directly to simplify the nvme_req_qid() function. Signed-off-by: Baolin Wang Signed-off-by: Christoph Hellwig commit 03d99e5d63dabe2c0cea0d8fe1cb89bde33f7939 Author: James Smart Date: Fri Oct 16 14:28:38 2020 -0700 nvme-fcloop: add sysfs attribute to inject command drop Add sysfs attribute to specify parameters for dropping a command. The attribute takes a string of: :: Opcode is formatted as lower 8 bits are opcode. If a fabrics opcode, a bit above bits 7:0 will be set. Once set, each sqe is looked at. If the opcode matches the running instance count is updated. If the instance count is in the range of where to drop (based on starting and # of times), then drop the command by not passing it to the target layer. Signed-off-by: James Smart commit 45a8af4412b1143760cbc7255b8c53271df89ed7 Author: Christoph Hellwig Date: Fri Oct 16 15:20:40 2020 +0200 pstore/blk: update the command line example Use the human readable device name instead of the device number, and add the required best_effort parameter. Signed-off-by: Christoph Hellwig Reviewed-by: WeiXiong Liao Reviewed-by: Kees Cook Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20201016132047.3068029-3-hch@lst.de commit cbf82e35031b135928f36e72c6d166e935530b6a Author: Christoph Hellwig Date: Fri Oct 16 15:20:39 2020 +0200 pstore/zone: cap the maximum device size Introduce an abritrary 128MiB cap to avoid malloc failures when using a larger block device. Signed-off-by: Christoph Hellwig Reviewed-by: WeiXiong Liao Reviewed-by: Kees Cook Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20201016132047.3068029-2-hch@lst.de commit 868770c92b612cff5de9b262d1853d7512b7cb43 Author: Szabolcs Nagy Date: Fri Nov 6 10:19:40 2020 +0000 Documentation: document /proc api for arm64 MTE vm flags Document that /proc/PID/smaps shows PROT_MTE settings in VmFlags. Support for this was introduced in commit 9f3419315f3cdc41a7318e4d50ba18a592b30c8c arm64: mte: Add PROT_MTE support to mmap() and mprotect() Signed-off-by: Szabolcs Nagy Reviewed-by: Catalin Marinas Cc: linux-doc@vger.kernel.org Link: https://lore.kernel.org/r/20201106101940.5777-1-szabolcs.nagy@arm.com Signed-off-by: Jonathan Corbet commit fa69ee5aa48b5b52e8028c2eb486906e9998d081 Author: Marco Elver Date: Wed Nov 25 23:48:40 2020 +0100 net: switch to storing KCOV handle directly in sk_buff It turns out that usage of skb extensions can cause memory leaks. Ido Schimmel reported: "[...] there are instances that blindly overwrite 'skb->extensions' by invoking skb_copy_header() after __alloc_skb()." Therefore, give up on using skb extensions for KCOV handle, and instead directly store kcov_handle in sk_buff. Fixes: 6370cc3bbd8a ("net: add kcov handle to skb extensions") Fixes: 85ce50d337d1 ("net: kcov: don't select SKB_EXTENSIONS when there is no NET") Fixes: 97f53a08cba1 ("net: linux/skbuff.h: combine SKB_EXTENSIONS + KCOV handling") Link: https://lore.kernel.org/linux-wireless/20201121160941.GA485907@shredder.lan/ Reported-by: Ido Schimmel Signed-off-by: Marco Elver Link: https://lore.kernel.org/r/20201125224840.2014773-1-elver@google.com Signed-off-by: Jakub Kicinski commit 0fca55ed988a694f5896f36de2a8f18715a78279 Author: Vlad Buslov Date: Fri Nov 27 17:12:05 2020 +0200 net: sched: remove redundant 'rtnl_held' argument Functions tfilter_notify_chain() and tcf_get_next_proto() are always called with rtnl lock held in current implementation. Moreover, attempting to call them without rtnl lock would cause a warning down the call chain in function __tcf_get_next_proto() that requires the lock to be held by callers. Remove the 'rtnl_held' argument in order to simplify the code and make rtnl lock requirement explicit. Signed-off-by: Vlad Buslov Link: https://lore.kernel.org/r/20201127151205.23492-1-vladbu@nvidia.com Signed-off-by: Jakub Kicinski commit 3cc1fb73993905b598da3802f87ac59411c52516 Author: Grygorii Strashko Date: Wed Nov 18 16:29:17 2020 +0200 gpiolib: do not print err message for EPROBE_DEFER The gpiochip may have dependencies from pinmux and so got deferred. Now it will print error message every time -EPROBE_DEFER is returned which is unnecessary: "gpiochip_add_data_with_key: GPIOs 0..31 (gpio-0-31) failed to register, -517" Hence, do suppress error message for -EPROBE_DEFER case. Signed-off-by: Grygorii Strashko Signed-off-by: Bartosz Golaszewski commit e1c06d2366e743475b91045ef0c2ce1bbd028cb6 Author: Gabriele Paoloni Date: Fri Nov 27 16:18:19 2020 +0000 x86/mce: Rename kill_it to kill_current_task Currently, if an MCE happens in user-mode or while the kernel is copying data from user space, 'kill_it' is used to check if execution of the interrupted task can be recovered or not; the flag name however is not very meaningful, hence rename it to match its goal. [ bp: Massage commit message, rename the queue_task_work() arg too. ] Signed-off-by: Gabriele Paoloni Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201127161819.3106432-6-gabriele.paoloni@intel.com commit d5b38e3d0fdb1a16994b449bc338fb8b26816b07 Author: Gabriele Paoloni Date: Fri Nov 27 16:18:18 2020 +0000 x86/mce: Remove redundant call to irq_work_queue() Currently, __mc_scan_banks() in do_machine_check() does the following callchain: __mc_scan_banks()->mce_log()->irq_work_queue(&mce_irq_work). Hence, the call to irq_work_queue() below after __mc_scan_banks() seems redundant. Just remove it. Signed-off-by: Gabriele Paoloni Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Link: https://lkml.kernel.org/r/20201127161819.3106432-5-gabriele.paoloni@intel.com commit 907d4ad59904a1b327c92c9fbaa990e961f9a8f2 Author: Moritz Fischer Date: Sun Nov 15 11:51:27 2020 -0800 fpga: fpga-mgr: altera-pr-ip: Simplify registration Simplify registration using new devm_fpga_mgr_register() API. Reviewed-by: Tom Rix Signed-off-by: Moritz Fischer Link: https://lore.kernel.org/r/20201115195127.284487-11-mdf@kernel.org Signed-off-by: Greg Kroah-Hartman commit 2630fa8d00318346b73f692d90863468d8cfe27d Author: Moritz Fischer Date: Sun Nov 15 11:51:26 2020 -0800 fpga: fpga-mgr: zynqmp: Simplify registration Simplify registration using new devm_fpga_mgr_register() API. Reviewed-by: Tom Rix Signed-off-by: Moritz Fischer Link: https://lore.kernel.org/r/20201115195127.284487-10-mdf@kernel.org Signed-off-by: Greg Kroah-Hartman commit f4ce435b732adfcca1dc70fd3050f9ffc80d9add Author: Moritz Fischer Date: Sun Nov 15 11:51:25 2020 -0800 fpga: fpga-mgr: xilinx-spi: Simplify registration Simplify registration using new devm_fpga_mgr_register() API. Reviewed-by: Tom Rix Signed-off-by: Moritz Fischer Link: https://lore.kernel.org/r/20201115195127.284487-9-mdf@kernel.org Signed-off-by: Greg Kroah-Hartman commit d6530c0a48b77c1460eb4125009ebb37e4e0d8de Author: Moritz Fischer Date: Sun Nov 15 11:51:24 2020 -0800 fpga: fpga-mgr: ts73xx: Simplify registration Simplify registration using new devm_fpga_mgr_register() API. Reviewed-by: Tom Rix Signed-off-by: Moritz Fischer Link: https://lore.kernel.org/r/20201115195127.284487-8-mdf@kernel.org Signed-off-by: Greg Kroah-Hartman commit 20e8963f4f38a9bfaffa74198efae3eb9a8bb7ed Author: Moritz Fischer Date: Sun Nov 15 11:51:23 2020 -0800 fpga: fpga-mgr: socfpga: Simplify registration Simplify registration using new devm_fpga_mgr_register() API. Reviewed-by: Tom Rix Signed-off-by: Moritz Fischer Link: https://lore.kernel.org/r/20201115195127.284487-7-mdf@kernel.org Signed-off-by: Greg Kroah-Hartman commit a3b79b2a58f0862378817998eecc023e93ab5a46 Author: Moritz Fischer Date: Sun Nov 15 11:51:22 2020 -0800 fpga: fpga-mgr: machxo2-spi: Simplify registration Simplify registration using new devm_fpga_mgr_register() API. Reviewed-by: Tom Rix Signed-off-by: Moritz Fischer Link: https://lore.kernel.org/r/20201115195127.284487-6-mdf@kernel.org Signed-off-by: Greg Kroah-Hartman commit 7027b7305d16f7b4db36139cc0c063e5d2fd216d Author: Moritz Fischer Date: Sun Nov 15 11:51:21 2020 -0800 fpga: fpga-mgr: ice40-spi: Simplify registration Simplify registration using new devm_fpga_mgr_register() API. Reviewed-by: Tom Rix Signed-off-by: Moritz Fischer Link: https://lore.kernel.org/r/20201115195127.284487-5-mdf@kernel.org Signed-off-by: Greg Kroah-Hartman commit 83eb4fbdcfda8b8e9a5c74c1d27e280183f1a77b Author: Moritz Fischer Date: Sun Nov 15 11:51:20 2020 -0800 fpga: fpga-mgr: dfl-fme-mgr: Simplify registration Simplify registration using new devm_fpga_mgr_register() API. Reviewed-by: Tom Rix Signed-off-by: Moritz Fischer Link: https://lore.kernel.org/r/20201115195127.284487-4-mdf@kernel.org Signed-off-by: Greg Kroah-Hartman commit c9d754d6f71c780caa2d496b39e54f86a6622a0d Author: Moritz Fischer Date: Sun Nov 15 11:51:19 2020 -0800 fpga: fpga-mgr: altera-ps-spi: Simplify registration Simplify registration by using new devm_fpga_mgr_register() API. Reviewed-by: Tom Rix Signed-off-by: Moritz Fischer Link: https://lore.kernel.org/r/20201115195127.284487-3-mdf@kernel.org Signed-off-by: Greg Kroah-Hartman commit 57d9352b6c651b090179f8b223b6681275c64a4f Author: Moritz Fischer Date: Sun Nov 15 11:51:18 2020 -0800 fpga: fpga-mgr: Add devm_fpga_mgr_register() API Add a devm_fpga_mgr_register() API that can be used to register a FPGA Manager that was created using devm_fpga_mgr_create(). Introduce a struct fpga_mgr_devres that makes the devres allocation a little bit more readable and gets reused for devm_fpga_mgr_create() devm_fpga_mgr_register(). Reviewed-by: Tom Rix Signed-off-by: Moritz Fischer Link: https://lore.kernel.org/r/20201115195127.284487-2-mdf@kernel.org Signed-off-by: Greg Kroah-Hartman commit 3a866b16fd2360a9c4ebf71cfbf7ebfe968c1409 Author: Gabriele Paoloni Date: Fri Nov 27 16:18:17 2020 +0000 x86/mce: Panic for LMCE only if mca_cfg.tolerant < 3 Right now for LMCE, if no_way_out is set, mce_panic() is called regardless of mca_cfg.tolerant. This is not correct as, if mca_cfg.tolerant = 3, the code should never panic. Add that check. [ bp: use local ptr 'cfg'. ] Signed-off-by: Gabriele Paoloni Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Link: https://lkml.kernel.org/r/20201127161819.3106432-4-gabriele.paoloni@intel.com commit e273e6e12ab1db3eb57712bd60655744d0091fa3 Author: Gabriele Paoloni Date: Fri Nov 27 16:18:16 2020 +0000 x86/mce: Move the mce_panic() call and 'kill_it' assignments to the right places Right now, for local MCEs the machine calls panic(), if needed, right after lmce is set. For MCE broadcasting, mce_reign() takes care of calling mce_panic(). Hence: - improve readability by moving the conditional evaluation of tolerant up to when kill_it is set first; - move the mce_panic() call up into the statement where mce_end() fails. [ bp: Massage, remove comment in the mce_end() failure case because it is superfluous; use local ptr 'cfg' in both tests. ] Signed-off-by: Gabriele Paoloni Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Link: https://lkml.kernel.org/r/20201127161819.3106432-3-gabriele.paoloni@intel.com commit 15936ca13dac032a3f4e6b4ba78add3880bddcf3 Merge: 4a24d80b8c3e9 b65054597872c Author: Borislav Petkov Date: Tue Dec 1 18:22:55 2020 +0100 Merge tag 'v5.10-rc6' into ras/core Merge the -rc6 tag to pick up dependent changes. Signed-off-by: Borislav Petkov commit 6d5acf38183937ee31e9aafe91af4ac74b2d1907 Author: Bob Moore Date: Mon Nov 30 11:20:48 2020 -0800 ACPICA: Update version to 20201113 ACPICA commit 090f0444238bd49f563bf80f4f3a863463dfdf78 Version 20201113. Link: https://github.com/acpica/acpica/commit/090f0444 Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit 32cf1a12cad43358e47dac8014379c2f33dfbed4 Author: Erik Kaneda Date: Mon Nov 30 11:20:47 2020 -0800 ACPICA: Interpreter: fix memory leak by using existing buffer ACPICA commit 52d1da5dcbd79a722b70f02a1a83f04088f51ff6 There was a memory leak that ocurred when a _CID object is defined as a package containing string objects. When _CID is checked for any possible repairs, it calls a helper function to repair _HID (because _CID basically contains multiple _HID entries). The _HID repair function assumes that string objects are standalone objects that are not contained inside of any packages. The _HID repair function replaces the string object with a brand new object and attempts to delete the old object by decrementing the reference count of the old object. Strings inside of packages have a reference count of 2 so the _HID repair function leaves this object in a dangling state and causes a memory leak. Instead of allocating a brand new object and removing the old object, use the existing object when repairing the _HID object. Link: https://github.com/acpica/acpica/commit/52d1da5d Signed-off-by: Erik Kaneda Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 0766efdf9a9d24eaefe260c787f49af225018b16 Author: Erik Kaneda Date: Mon Nov 30 11:20:46 2020 -0800 ACPICA: Add function trace macros to improve debugging ACPICA commit 87b8dba05b4cf8c111948327023c710e2b6b5a05 The namespace repair mechanism does not have function tracing macros. Add several trace macros to improve debuggability. Link: https://github.com/acpica/acpica/commit/87b8dba0 Signed-off-by: Erik Kaneda Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 0306f035738fa6981e4e9eb68ab0316ceaa26c88 Author: Hans de Goede Date: Mon Nov 30 11:20:45 2020 -0800 ACPICA: Also handle "orphan" _REG methods for GPIO OpRegions ACPICA commit b9dc31e2fc67cf196fab5253a9a673bee68b2ef5 Before this commit acpi_ev_execute_reg_methods() had special handling to handle "orphan" (no matching op_region declared) _REG methods for EC nodes. On Intel Cherry Trail devices there are 2 possible ACPI op_regions for accessing GPIOs. The standard general_purpose_io op_region and the Cherry Trail specific user_defined 0x9X op_regions. Having 2 different types of op_regions leads to potential issues with checks for op_region availability, or in other words checks if _REG has been called for the op_region which the ACPI code wants to use. Except for the "orphan" EC handling, ACPICA core does not call _REG on an ACPI node which does not define an op_region matching the type being registered; and the reference design DSDT, from which most Cherry Trail DSDTs are derived, does not define general_purpose_io, nor user_defined(0x93) op_regions for the GPO2 (UID 3) device, because no pins were assigned ACPI controlled functions in the reference design. Together this leads to the perfect storm, at least on the Cherry Trail based Medion Akayo E1239T. This design does use a GPO2 pin from its ACPI code and has added the Cherry Trail specific user_defined(0x93) opregion to its GPO2 ACPI node to access this pin. But it uses a has _REG been called availability check for the standard general_purpose_io op_region. This clearly is a bug in the DSDT, but this does work under Windows. This issue leads to the intel_vbtn driver reporting the device always being in tablet-mode at boot, even if it is in laptop mode. Which in turn causes userspace to ignore touchpad events. So iow this issues causes the touchpad to not work at boot. This commit fixes this by extending the "orphan" _REG method handling to also apply to GPIO address-space handlers. Note it seems that Windows always calls "orphan" _REG methods so me may want to consider dropping the space-id check and always do "orphan" _REG method handling. Link: https://github.com/acpica/acpica/commit/b9dc31e2 Signed-off-by: Hans de Goede Signed-off-by: Erik Kaneda Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit f2f51e7a13e2de5bedffbd693c43658d2d37854e Author: Colin Ian King Date: Mon Nov 30 11:20:44 2020 -0800 ACPICA: Remove extreaneous "the" in comments ACPICA commit f6eae3961bf39ad8beda70c001d1815780600e39 There are several ocurrances of "the the", remove the extraneous "the". Link: https://github.com/acpica/acpica/commit/f6eae396 Signed-off-by: Colin Ian King Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit c59fe83a3d4f8852fc9f26af057edb5c70e0f18d Author: Bob Moore Date: Mon Nov 30 11:20:43 2020 -0800 ACPICA: Add 5 new UUIDs to the known UUID table All UUID entries are related to NVDIMM and the NFIT table. ACPICA commit c114a02798dd07ccc7e51ffa4365bf039a0dd8d5 Link: https://github.com/acpica/acpica/commit/c114a027 Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit 19eb86a72df50adcf554f234469bb5b7209b7640 Author: Xiaochen Shen Date: Tue Dec 1 02:06:58 2020 +0800 x86/resctrl: Clean up unused function parameter in rmdir path Commit fd8d9db3559a ("x86/resctrl: Remove superfluous kernfs_get() calls to prevent refcount leak") removed superfluous kernfs_get() calls in rdtgroup_ctrl_remove() and rdtgroup_rmdir_ctrl(). That change resulted in an unused function parameter to these two functions. Clean up the unused function parameter in rdtgroup_ctrl_remove(), rdtgroup_rmdir_mon() and their callers rdtgroup_rmdir_ctrl() and rdtgroup_rmdir(). Signed-off-by: Xiaochen Shen Signed-off-by: Borislav Petkov Reviewed-by: Reinette Chatre Link: https://lkml.kernel.org/r/1606759618-13181-1-git-send-email-xiaochen.shen@intel.com commit 87314fb181f9042a226d721ab4a5579ddfca139c Merge: 2002d29513983 b65054597872c Author: Borislav Petkov Date: Tue Dec 1 18:01:27 2020 +0100 Merge tag 'v5.10-rc6' into x86/cache Merge -rc6 tag to pick up dependent changes. Signed-off-by: Borislav Petkov commit 7a25759eaa04b8c0ecb3db134922d6641ab2e6d1 Author: Mel Gorman Date: Mon Nov 30 22:32:02 2020 +0000 cpuidle: Select polling interval based on a c-state with a longer target residency It was noted that a few workloads that idle rapidly regressed when commit 36fcb4292473 ("cpuidle: use first valid target residency as poll time") was merged. The workloads in question were heavy communicators that idle rapidly and were impacted by the c-state exit latency as the active CPUs were not polling at the time of wakeup. As they were not particularly realistic workloads, it was not considered to be a major problem. Unfortunately, a bug was reported for a real workload in a production environment that relied on large numbers of threads operating in a worker pool pattern. These threads would idle for periods of time longer than the C1 target residency and so incurred the c-state exit latency penalty. The application is very sensitive to wakeup latency and indirectly relying on behaviour prior to commit on a37b969a61c1 ("cpuidle: poll_state: Add time limit to poll_idle()") to poll for long enough to avoid the exit latency cost. The target residency of C1 is typically very short. On some x86 machines, it can be as low as 2 microseconds. In poll_idle(), the clock is checked every POLL_IDLE_RELAX_COUNT interations of cpu_relax() and even one iteration of that loop can be over 1 microsecond so the polling interval is very close to the granularity of what poll_idle() can detect. Furthermore, a basic ping pong workload like perf bench pipe has a longer round-trip time than the 2 microseconds meaning that the CPU will almost certainly not be polling when the ping-pong completes. This patch selects a polling interval based on an enabled c-state that has an target residency longer than 10usec. If there is no enabled-cstate then polling will be up to a TICK_NSEC/16 similar to what it was up until kernel 4.20. Polling for a full tick is unlikely (rescheduling event) and is much longer than the existing target residencies for a deep c-state. As an example, consider a CPU with the following c-state information from an Intel CPU; residency exit_latency C1 2 2 C1E 20 10 C3 100 33 C6 400 133 The polling interval selected is 20usec. If booted with intel_idle.max_cstate=1 then the polling interval is 250usec as the deeper c-states were not available. On an AMD EPYC machine, the c-state information is more limited and looks like residency exit_latency C1 2 1 C2 800 400 The polling interval selected is 250usec. While C2 was considered, the polling interval was clamped by CPUIDLE_POLL_MAX. Note that it is not expected that polling will be a universal win. As well as potentially trading power for performance, the performance is not guaranteed if the extra polling prevented a turbo state being reached. Making it a tunable was considered but it's driver-specific, may be overridden by a governor and is not a guaranteed polling interval making it difficult to describe without knowledge of the implementation. tbench4 vanilla polling Hmean 1 497.89 ( 0.00%) 543.15 * 9.09%* Hmean 2 975.88 ( 0.00%) 1059.73 * 8.59%* Hmean 4 1953.97 ( 0.00%) 2081.37 * 6.52%* Hmean 8 3645.76 ( 0.00%) 4052.95 * 11.17%* Hmean 16 6882.21 ( 0.00%) 6995.93 * 1.65%* Hmean 32 10752.20 ( 0.00%) 10731.53 * -0.19%* Hmean 64 12875.08 ( 0.00%) 12478.13 * -3.08%* Hmean 128 21500.54 ( 0.00%) 21098.60 * -1.87%* Hmean 256 21253.70 ( 0.00%) 21027.18 * -1.07%* Hmean 320 20813.50 ( 0.00%) 20580.64 * -1.12%* Signed-off-by: Mel Gorman Signed-off-by: Rafael J. Wysocki commit f8edfa6d1e077011cb567b35c29cb7a73c266d91 Merge: d23e95c090676 748f0d70087c5 Author: Rafael J. Wysocki Date: Tue Dec 1 17:26:49 2020 +0100 Merge tag 'linux-cpupower-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux Pull cpupower utility update for v5.11-rc1 from Shuah Khan: "This consists of a change to provide online and offline CPU information. This change makes it easier to keep track of offline cpus whose cpuidle or cpufreq property aren't changed when updates are made to online cpus." * tag 'linux-cpupower-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux: cpupower: Provide online and offline CPU information commit 2838307b019dfec0c309c4e8e589658736cff4c9 Author: Nick Desaulniers Date: Mon Nov 30 17:13:06 2020 -0800 x86/build: Remove -m16 workaround for unsupported versions of GCC Revert the following two commits: de3accdaec88 ("x86, build: Build 16-bit code with -m16 where possible") a9cfccee6604 ("x86, build: Change code16gcc.h from a C header to an assembly header") Since 0bddd227f3dc ("Documentation: update for gcc 4.9 requirement") the minimum supported version of GCC is gcc-4.9. It's now safe to remove this code. Signed-off-by: Nick Desaulniers Signed-off-by: Borislav Petkov Reviewed-by: Nathan Chancellor Reviewed-by: David Woodhouse Link: https://lkml.kernel.org/r/20201201011307.3676986-1-ndesaulniers@google.com commit 67e061f044e46c9823e59ca7981786f858bfa292 Merge: a3f132df0e5f2 b65054597872c Author: Mauro Carvalho Chehab Date: Tue Dec 1 16:21:40 2020 +0100 Merge tag 'v5.10-rc6' into patchwork Linux 5.10-rc6 * tag 'v5.10-rc6': (1815 commits) Linux 5.10-rc6 sock: set sk_err to ee_errno on dequeue from errq mptcp: fix NULL ptr dereference on bad MPJ net: openvswitch: fix TTL decrement action netlink message format perf probe: Change function definition check due to broken DWARF perf probe: Fix to die_entrypc() returns error correctly perf stat: Use proper cpu for shadow stats perf record: Synthesize cgroup events only if needed perf diff: Fix error return value in __cmd_diff() perf tools: Update copy of libbpf's hashmap.c x86/mce: Do not overwrite no_way_out if mce_end() fails kvm: x86/mmu: Fix get_mmio_spte() on CPUs supporting 5-level PT KVM: x86: Fix split-irqchip vs interrupt injection window request KVM: x86: handle !lapic_in_kernel case in kvm_cpu_*_extint usb: typec: stusb160x: fix power-opmode property with typec-power-opmode printk: finalize records with trailing newlines can: af_can: can_rx_unregister(): remove WARN() statement from list operation sanity check can: m_can: m_can_dev_setup(): add support for bosch mcan version 3.3.0 can: m_can: fix nominal bitiming tseg2 min for version >= 3.1 can: m_can: m_can_open(): remove IRQF_TRIGGER_FALLING from request_threaded_irq()'s flags ... commit 33e07157105e472b746b70b3ed4197c57c43ab68 Author: Christophe JAILLET Date: Tue Dec 1 09:31:49 2020 +0800 iommu/vt-d: Avoid GFP_ATOMIC where it is not needed There is no reason to use GFP_ATOMIC in a 'suspend' function. Use GFP_KERNEL instead to give more opportunities to allocate the requested memory. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/20201030182630.5154-1-christophe.jaillet@wanadoo.fr Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20201201013149.2466272-2-baolu.lu@linux.intel.com Signed-off-by: Will Deacon commit ba0581749fec389e55c9d761f2716f8fcbefced5 Author: Daniel Borkmann Date: Tue Dec 1 15:22:59 2020 +0100 net, xdp, xsk: fix __sk_mark_napi_id_once napi_id error Stephen reported the following build error for !CONFIG_NET_RX_BUSY_POLL built kernels: In file included from fs/select.c:32: include/net/busy_poll.h: In function 'sk_mark_napi_id_once': include/net/busy_poll.h:150:36: error: 'const struct sk_buff' has no member named 'napi_id' 150 | __sk_mark_napi_id_once_xdp(sk, skb->napi_id); | ^~ Fix it by wrapping a CONFIG_NET_RX_BUSY_POLL around the helpers. Fixes: b02e5a0ebb17 ("xsk: Propagate napi_id to XDP socket Rx path") Reported-by: Stephen Rothwell Signed-off-by: Stephen Rothwell Signed-off-by: Daniel Borkmann Cc: Björn Töpel Link: https://lore.kernel.org/linux-next/20201201190746.7d3357fb@canb.auug.org.au commit d49ee56292d7d11586efd0b4feaafafc36d54101 Author: Gustavo A. R. Silva Date: Thu Nov 19 11:09:01 2020 -0600 gpio: ath79: Fix fall-through warning for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a fallthrough pseudo-keyword to indicate that the code is intended to fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Bartosz Golaszewski commit bc5d098432225e381328be0301948a6cb34f11e3 Author: Gustavo A. R. Silva Date: Thu Nov 19 11:07:39 2020 -0600 gpiolib: acpi: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 89828f632dec8ab1e19f23771b313c1942e102c0 Author: Dan Carpenter Date: Tue Dec 1 10:02:54 2020 +0300 bus: mhi: core: Fix error handling in mhi_register_controller() There are a few problems with the error handling in this function. They mostly center around the alloc_ordered_workqueue() allocation. 1) If that allocation fails or if the kcalloc() prior to it fails then it leads to a NULL dereference when we call destroy_workqueue(mhi_cntrl->hiprio_wq). 2) The error code is not set. 3) The "mhi_cntrl->mhi_cmd" allocation is not freed. The error handling was slightly confusing and I re-ordered it to be in the exact mirror/reverse order of how things were allocated. I changed the label names to say what the goto does instead of describing where the goto comes from. Fixes: 8f7039787687 ("bus: mhi: core: Move to using high priority workqueue") Signed-off-by: Dan Carpenter Reviewed-by: Loic Poulain Reviewed-by: Manivannan Sadhasivam Signed-off-by: Manivannan Sadhasivam commit 04295878beac396dae47ba93141cae0d9386e7ef Author: Jan Engelhardt Date: Sat Nov 21 12:11:51 2020 +0100 netfilter: use actual socket sk for REJECT action True to the message of commit v5.10-rc1-105-g46d6c5ae953c, _do_ actually make use of state->sk when possible, such as in the REJECT modules. Reported-by: Minqiang Chen Cc: Jason A. Donenfeld Signed-off-by: Jan Engelhardt Signed-off-by: Pablo Neira Ayuso commit 83321c335dccba262a57378361d63da96b8166d6 Author: Sami Tolvanen Date: Mon Nov 30 11:39:00 2020 -0800 x86/pci: Fix the function type for check_reserved_t e820__mapped_all() is passed as a callback to is_mmconf_reserved(), which expects a function of type: typedef bool (*check_reserved_t)(u64 start, u64 end, unsigned type); However, e820__mapped_all() accepts enum e820_type as the last argument and this type mismatch trips indirect call checking with Clang's Control-Flow Integrity (CFI). As is_mmconf_reserved() only passes enum e820_type values for the type argument, change the typedef and the unused type argument in is_acpi_reserved() to enum e820_type to fix the type mismatch. Reported-by: Sedat Dilek Suggested-by: Borislav Petkov Signed-off-by: Sami Tolvanen Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201130193900.456726-1-samitolvanen@google.com commit 6043082c96844fa3a047896212e2da0adc1dde81 Author: Justin Ernst Date: Wed Nov 25 11:54:44 2020 -0600 x86/platform/uv: Update MAINTAINERS for uv_sysfs driver Add an entry and email address for the new uv_sysfs driver and its maintainer. Signed-off-by: Justin Ernst Signed-off-by: Borislav Petkov Acked-by: Hans de Goede Acked-by: Steve Wahl Link: https://lkml.kernel.org/r/20201125175444.279074-6-justin.ernst@hpe.com commit c159376490eef39f0f2cb1ce5dd38a6d41c859b4 Author: Justin Ernst Date: Wed Nov 25 11:54:43 2020 -0600 x86/platform/uv: Update ABI documentation of /sys/firmware/sgi_uv/ Update the ABI documentation to describe the sysfs interface provided by the new uv_sysfs platform driver. [ bp: Merge in kernel-doc warning fixes, see second Link: below. ] Signed-off-by: Justin Ernst Signed-off-by: Borislav Petkov Reviewed-by: Steve Wahl Acked-by: Hans de Goede Link: https://lkml.kernel.org/r/20201125175444.279074-5-justin.ernst@hpe.com Link: https://lkml.kernel.org/r/20201130214304.369348-1-justin.ernst@hpe.com commit 40bb5b02ff10f6b68925850e7dedaeec532abb88 Author: Adam Ward Date: Mon Nov 30 16:59:14 2020 +0000 regulator: da9121: add interrupt support Adds interrupt handler for variants, and notifications for events; over temperature/voltage/current. Because the IRQs are triggered by persisting status, they must be masked and the status polled until clear, before the IRQ can be enabled again. Signed-off-by: Adam Ward Link: https://lore.kernel.org/r/fe21796bbcbadff84a472a4cc581ae8fafc7f8f5.1606755367.git.Adam.Ward.opensource@diasemi.com Signed-off-by: Mark Brown commit 65ac97042d4e0918b401b5f21e2810efa27be848 Author: Adam Ward Date: Mon Nov 30 16:59:13 2020 +0000 regulator: da9121: add mode support Adds get/set for mode, and mapping from REGULATOR_MODE_* to select PFM/PWM/Auto operation. Signed-off-by: Adam Ward Link: https://lore.kernel.org/r/7844c8f6facb6f7c0649381629cc75ccad14723d.1606755367.git.Adam.Ward.opensource@diasemi.com Signed-off-by: Mark Brown commit 5c4b62af1d58fe3823dfb462ce553ceb9729c8fa Author: Adam Ward Date: Mon Nov 30 16:59:12 2020 +0000 regulator: da9121: add current support This commit adds support for getting/setting current for all supported variants. Limits are adjusted per variant to match HW implementation. Signed-off-by: Adam Ward Link: https://lore.kernel.org/r/9aa80b909893dbe609730919ed595c6a8ac26606.1606755367.git.Adam.Ward.opensource@diasemi.com Signed-off-by: Mark Brown commit 9929900d1878565a90a70bf25baa7d3e4187ae99 Author: Adam Ward Date: Mon Nov 30 16:59:11 2020 +0000 regulator: da9121: Update registration to support multiple buck variants Add function which iterates the regulator descriptors for the confirmed variant ID and registers each buck. Signed-off-by: Adam Ward Link: https://lore.kernel.org/r/1fd53c3ab032ef3c8a92f80a2247381db1c09ced.1606755367.git.Adam.Ward.opensource@diasemi.com Signed-off-by: Mark Brown commit 46c413d5bb239769e6f1de706adf422c807c7a5f Author: Adam Ward Date: Mon Nov 30 16:59:10 2020 +0000 regulator: da9121: Add support for device variants via devicetree Add devicetree configuration and device variant parameters. Use the latter to enable the check and use of parameters specific to dual buck variants. Signed-off-by: Adam Ward Link: https://lore.kernel.org/r/5849ce60595aef1018bdde7dcfb54a7397597545.1606755367.git.Adam.Ward.opensource@diasemi.com Signed-off-by: Mark Brown commit 91863239ce0366c801f1f128246f30ea80d7727b Author: Adam Ward Date: Mon Nov 30 16:59:09 2020 +0000 regulator: da9121: Add device variant descriptors Descriptors for bucks in all variants, ready for of_regulator_match Signed-off-by: Adam Ward Link: https://lore.kernel.org/r/8f7a11d59e5ac3ba1bfd448bcfc905efc99b7874.1606755367.git.Adam.Ward.opensource@diasemi.com Signed-off-by: Mark Brown commit c860476b9e3a420192b28e580cb749e024d032eb Author: Adam Ward Date: Mon Nov 30 16:59:08 2020 +0000 regulator: da9121: Add device variant regmaps Add ability to probe device and validate configuration, then apply a regmap configuration for a single or dual buck device accordingly. Signed-off-by: Adam Ward Link: https://lore.kernel.org/r/068c6b8d5e1b4e221e899e4c914c429429a2ec7d.1606755367.git.Adam.Ward.opensource@diasemi.com Signed-off-by: Mark Brown commit f3fbd5566f6a8cdb7c48ab29bd1096205b7fbcaf Author: Adam Ward Date: Mon Nov 30 16:59:07 2020 +0000 regulator: da9121: Add device variants Add basic support for configuration to reference variants of this device, and track the selected variant within the driver. Signed-off-by: Adam Ward Link: https://lore.kernel.org/r/aaabd3063593e5172fa6b605884d475df64e6d65.1606755367.git.Adam.Ward.opensource@diasemi.com Signed-off-by: Mark Brown commit 86f162c91f274e0d8a0c440d7a991230f6ac7725 Author: Adam Ward Date: Mon Nov 30 16:59:06 2020 +0000 regulator: da9121: Add header file Add header file for Dialog Semiconductor DA9121 regulator and related devices, mostly autogenerated from the chip design databases, and update driver to replace local defines with those from header. Signed-off-by: Adam Ward Link: https://lore.kernel.org/r/3527d84448d1e6ddc0fcb883ae564880f75a6cb0.1606755367.git.Adam.Ward.opensource@diasemi.com Signed-off-by: Mark Brown commit 744ef9b091b8b4f6c6246c8e70dd817175bde8bc Author: Adam Ward Date: Mon Nov 30 16:59:05 2020 +0000 regulator: Update DA9121 dt-bindings Update bindings for the Dialog Semiconductor DA9121 voltage regulator to add device variants. Because several variants have multiple regulators, and to regard potential to add GPIO support in future, the 'regulators' sub-node is added, following the precedent set by other multi-regulator devices, including the DA9211 family. This breaks compatibility with the original submission by Vincent Whitchurch - but as this is still in for-next, the alignment could be made before upstreaming occurs. Signed-off-by: Adam Ward Link: https://lore.kernel.org/r/0606d3ded5fef4c38760246146f197db4ce3a374.1606755367.git.Adam.Ward.opensource@diasemi.com Signed-off-by: Mark Brown commit 2c2b3ad2c4c801bab1eec7264ea6991b1e4e8f2c Author: Maxim Kochetkov Date: Tue Dec 1 11:59:16 2020 +0300 spi: spi-fsl-dspi: Use max_native_cs instead of num_chipselect to set SPI_MCR If cs-gpios property is used in devicetree then ctlr->num_chipselect value may be changed by spi_get_gpio_descs(). So use ctlr->max_native_cs instead of ctlr->num_chipselect to set SPI_MCR Fixes: 4fcc7c2292de (spi: spi-fsl-dspi: Don't access reserved fields in SPI_MCR) Signed-off-by: Maxim Kochetkov Link: https://lore.kernel.org/r/20201201085916.63543-1-fido_max@inbox.ru Signed-off-by: Mark Brown commit 8145dcb07d0c8bdb1e8e76a5df18779431f7af8e Author: Sergio Paracuellos Date: Tue Dec 1 12:20:51 2020 +0100 phy: ralink: phy-mt7621-pci: set correct name in MODULE_DEVICE_TABLE macro Correct name passed into 'MODULE_DEVICE_TABLE' which was wrong and was showing a warning when the driver is enabled for 'COMPILE_TEST'. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20201201112051.17463-3-sergio.paracuellos@gmail.com Signed-off-by: Vinod Koul commit 0e055d179ea9368f882d2060b0d82341ee90bae3 Author: Sergio Paracuellos Date: Tue Dec 1 12:20:50 2020 +0100 phy: ralink: phy-mt7621-pci: drop 'COMPILE_TEST' from Kconfig This driver includes the following two files directly: - mt7621.h - ralink_regs.h Compilation for its related platform properly works because its real path is included in 'arch/mips/ralink/Platform' as cflags. This driver depends on RALINK but also is enabled for COMPILE_TEST where nothing about its platform is known and this directly included files are not found at all breaking compilation. If we want 'COMPILE_TEST' we have to change cflags also inside 'phy/ralink' subdirectory Makefile which seems that does not like to linux-phy maintainers. Hence remove COMPILE_TEST from Kconfig to avoid the problem. Fixes: d87da32372a0 ("phy: ralink: Add PHY driver for MT7621 PCIe PHY") Reported-by: Stephen Rothwell Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20201201112051.17463-2-sergio.paracuellos@gmail.com Signed-off-by: Vinod Koul commit eec3bf6861a8703ab63992578b1776353c5ac2a1 Author: Will Deacon Date: Tue Dec 1 11:24:16 2020 +0000 arm64: sdei: Push IS_ENABLED() checks down to callee functions Handling all combinations of the VMAP_STACK and SHADOW_CALL_STACK options in sdei_arch_get_entry_point() makes the code difficult to read, particularly when considering the error and cleanup paths. Move the checking of these options into the callee functions, so that they return early if the relevant option is not enabled. Signed-off-by: Will Deacon commit ac20ffbb0279aae7be48567fb734eae7d050769e Author: Sami Tolvanen Date: Mon Nov 30 15:34:42 2020 -0800 arm64: scs: use vmapped IRQ and SDEI shadow stacks Use scs_alloc() to allocate also IRQ and SDEI shadow stacks instead of using statically allocated stacks. Signed-off-by: Sami Tolvanen Acked-by: Will Deacon Link: https://lore.kernel.org/r/20201130233442.2562064-3-samitolvanen@google.com [will: Move CONFIG_SHADOW_CALL_STACK check into init_irq_scs()] Signed-off-by: Will Deacon commit d5353c00cfd93b1c03fb16a5e6b5b49026534755 Author: Vidya Sagar Date: Thu Nov 26 00:55:54 2020 +0530 PCI: tegra: Read "dbi" base address to program in application logic PCIe controller in Tegra194 requires the "dbi" region base address to be programmed in one of the application logic registers to enable CPU access to the "dbi" region. But, commit a0fd361db8e5 ("PCI: dwc: Move "dbi", "dbi2", and "addr_space" resource setup into common code") moved the code that reads the whereabouts of "dbi" region to the common code causing the existing code in pcie-tegra194.c file to program NULL in the application logic registers. This is causing null pointer dereference when the "dbi" registers are accessed. This issue is fixed by explicitly reading the "dbi" base address from DT node. Link: https://lore.kernel.org/r/20201125192554.5401-1-vidyas@nvidia.com Fixes: a0fd361db8e5 ("PCI: dwc: Move "dbi", "dbi2", and "addr_space" resource setup into common code") Tested-by: Thierry Reding Signed-off-by: Vidya Sagar Signed-off-by: Lorenzo Pieralisi Acked-by: Thierry Reding commit 0d625a167b169f0bfdfd2e4dc05b9c89b81efe98 Author: Dinh Nguyen Date: Mon Nov 9 13:21:41 2020 -0600 reset: socfpga: add error handling and release mem-region In case of an error, call release_mem_region when an error happens during allocation of resources. Also add error handling for the case that reset_controller_register fails. Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Dinh Nguyen Signed-off-by: Philipp Zabel commit 369b868f4a2ef89ee1c929d630058eac83015189 Author: Vidya Sagar Date: Thu Nov 26 00:52:34 2020 +0530 PCI: tegra: Move "dbi" accesses to post common DWC initialization commit a0fd361db8e5 ("PCI: dwc: Move "dbi", "dbi2", and "addr_space" resource setup into common code") moved the code that sets up dbi_base to DWC common code thereby creating a requirement to not access the "dbi" region before calling common DWC initialization code. But, Tegra194 already had some code that programs some of the "dbi" registers resulting in system crash. This patch addresses that issue by refactoring the code to have accesses to the "dbi" region only after common DWC initialization. Link: https://lore.kernel.org/r/20201125192234.2270-1-vidyas@nvidia.com Fixes: a0fd361db8e5 ("PCI: dwc: Move "dbi", "dbi2", and "addr_space" resource setup into common code") Tested-by: Thierry Reding Signed-off-by: Vidya Sagar Signed-off-by: Lorenzo Pieralisi Acked-by: Thierry Reding commit a2abe7cbd8fe2db5ff386c968e2273d9dc6c468d Author: Sami Tolvanen Date: Mon Nov 30 15:34:41 2020 -0800 scs: switch to vmapped shadow stacks The kernel currently uses kmem_cache to allocate shadow call stacks, which means an overflows may not be immediately detected and can potentially result in another task's shadow stack to be overwritten. This change switches SCS to use virtually mapped shadow stacks for tasks, which increases shadow stack size to a full page and provides more robust overflow detection, similarly to VMAP_STACK. Signed-off-by: Sami Tolvanen Acked-by: Will Deacon Link: https://lore.kernel.org/r/20201130233442.2562064-2-samitolvanen@google.com Signed-off-by: Will Deacon commit 778f7c194b1dac351d345ce723f8747026092949 Author: Jaehoon Chung Date: Fri Nov 13 18:01:39 2020 +0100 PCI: dwc: exynos: Rework the driver to support Exynos5433 variant Exynos5440 SoC support has been dropped since commit 8c83315da1cf ("ARM: dts: exynos: Remove Exynos5440"). Rework this driver to support DWC PCIe variant found in the Exynos5433 SoCs. The main difference in Exynos5433 variant is lack of the MSI support (the MSI interrupt is not even routed to the CPU). [mszyprow: reworked the driver to support only Exynos5433 variant, simplified code, rebased onto current kernel code, added regulator support, converted to the regular platform driver, removed MSI related code, rewrote commit message, added help] Link: https://lore.kernel.org/r/20201113170139.29956-6-m.szyprowski@samsung.com Signed-off-by: Jaehoon Chung Signed-off-by: Marek Szyprowski Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Acked-by: Krzysztof Kozlowski Acked-by: Jingoo Han commit 147ad605dc12c515c97136899ccb5c70e6c674e1 Author: Johan Hovold Date: Mon Nov 23 11:23:16 2020 +0100 init: use type alignment for kernel parameters Specify type alignment for kernel parameters instead of sizeof(long). The alignment attribute is used to prevent gcc from increasing the alignment of objects with static extent as an optimisation, something which would mess up the __setup array stride. Using __alignof__(struct obs_kernel_param) rather than sizeof(long) is preferred since it better indicates why it is there and doesn't break should the type size or alignment change. Note that on m68k the alignment of struct obs_kernel_param is actually two and that adding a 1- or 2-byte field to the 12-byte struct would cause a breakage with the current 4-byte alignment. Link: https://lore.kernel.org/lkml/20201103175711.10731-1-johan@kernel.org Signed-off-by: Johan Hovold Signed-off-by: Jessica Yu commit f7583f02a538bdb6d5191e82bacc7b85a27d4b0a Author: Wang Shanker Date: Mon Nov 16 12:17:24 2020 +0800 netfilter: nfnl_acct: remove data from struct net This patch removes nfnl_acct_list from struct net to reduce the default memory footprint for the netns structure. Signed-off-by: Miao Wang Signed-off-by: Pablo Neira Ayuso commit 0ef083d51ba1f4a2e890807d49d53ad20eee0ffd Author: Kaixu Xia Date: Fri Nov 6 16:20:13 2020 +0800 netfilter: Remove unnecessary conversion to bool Here we could use the '!=' expression to fix the following coccicheck warning: ./net/netfilter/xt_nfacct.c:30:41-46: WARNING: conversion to bool not needed here Reported-by: Tosk Robot Signed-off-by: Kaixu Xia Signed-off-by: Pablo Neira Ayuso commit f1dc15cd7fc146107cad2a926d9c1d005f69002a Author: Aaro Koskinen Date: Sun Nov 29 16:47:10 2020 +0200 ARM: dts: OMAP3: disable AES on N950/N9 AES needs to be disabled on Nokia N950/N9 as well (HS devices), otherwise kernel fails to boot. Fixes: c312f066314e ("ARM: dts: omap3: Migrate AES from hwmods to sysc-omap2") Signed-off-by: Aaro Koskinen Signed-off-by: Tony Lindgren commit 665f1388bc9713c81989dda6eed5cde52d57c255 Author: Andrey Zhizhikin Date: Mon Nov 30 12:42:33 2020 +0000 ARM: omap2plus_defconfig: drop unused POWER_AVS option Commit 785b5bb41b0a ("PM: AVS: Drop the avs directory and the corresponding Kconfig") moved AVS code to SOC-specific folders, and removed corresponding Kconfig from drivers/power, leaving original POWER_AVS config option enabled in omap2plus_defconfig file. Remove the option, which has no references in the tree anymore. Fixes: 785b5bb41b0a ("PM: AVS: Drop the avs directory and the corresponding Kconfig") Signed-off-by: Andrey Zhizhikin Reviewed-by: Krzysztof Kozlowski Reviewed-by: Nishanth Menon Cc: Nishanth Menon Cc: Ulf Hansson Signed-off-by: Tony Lindgren commit cfd1d0f524a87b7d6d14b41a14fa4cbe522cf8cc Author: Dan Carpenter Date: Tue Dec 1 10:04:34 2020 +0300 9p: Remove unnecessary IS_ERR() check The "fid" variable can't be an error pointer so there is no need to check. The code is slightly cleaner if we move the increment before the break and remove the NULL check as well. Signed-off-by: Dan Carpenter Signed-off-by: Dominique Martinet commit dfd375864ac1e2ee60ed2d61820697ac01642f80 Author: Dan Carpenter Date: Mon Nov 30 23:04:12 2020 -0800 9p: Uninitialized variable in v9fs_writeback_fid() If v9fs_fid_lookup_with_uid() fails then "fid" is not initialized. The v9fs_fid_lookup_with_uid() can't return NULL. If it returns an error pointer then we can still pass that to clone_fid() and it will return the error pointer back again. Fixes: 6636b6dcc3db ("9p: add refcount to p9_fid struct") Signed-off-by: Dan Carpenter Signed-off-by: Dominique Martinet commit 9d8de441db261dbb4abb989674a62d1c13fe4f93 Author: James Smart Date: Mon Nov 30 10:12:26 2020 -0800 scsi: lpfc: Correct null ndlp reference on routine exit smatch correctly called out a logic error with accessing a pointer after checking it for null: drivers/scsi/lpfc/lpfc_els.c:2043 lpfc_cmpl_els_plogi() error: we previously assumed 'ndlp' could be null (see line 1942) Adjust the exit point to avoid the trace printf ndlp reference. A trace entry was already generated when the ndlp was checked for null. Link: https://lore.kernel.org/r/20201130181226.16675-1-james.smart@broadcom.com Fixes: 4430f7fd09ec ("scsi: lpfc: Rework locations of ndlp reference taking") Reported-by: Dan Carpenter Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 29b87e92a21605ed74888e4d2a31055d95dfafe1 Author: Can Guo Date: Thu Nov 26 17:58:48 2020 -0800 scsi: ufs: Stop hardcoding the scale down gear Instead of hardcoding the scale down gear, make it a member of the ufs_clk_scaling struct. Link: https://lore.kernel.org/r/1606442334-22641-1-git-send-email-cang@codeaurora.org Reviewed-by: Stanley Chu Reviewed-by: Bean Huo Reviewed-by: Asutosh Das Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit 96f08cc5943c0fe943ea10fdead6a80b73270046 Author: Can Guo Date: Wed Nov 25 18:01:01 2020 -0800 scsi: ufs-qcom: Keep core_clk_unipro on while link is active If we want to disable clocks to save power but still keep the link active, core_clk_unipro, like ref_clk, should not be the one being disabled. Link: https://lore.kernel.org/r/1606356063-38380-3-git-send-email-cang@codeaurora.org Reviewed-by: Hongwu Su Reviewed-by: Asutosh Das Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit 81309c247a4dcd597cbda5254fd0afdd61b93f14 Author: Can Guo Date: Wed Nov 25 18:01:00 2020 -0800 scsi: ufs: Refactor ufshcd_setup_clocks() to remove skip_ref_clk Remove the param skip_ref_clk from __ufshcd_setup_clocks(), but keep a flag in struct ufs_clk_info to tell whether a clock can be disabled or not while the link is active. Link: https://lore.kernel.org/r/1606356063-38380-2-git-send-email-cang@codeaurora.org Reviewed-by: Hongwu Su Reviewed-by: Bean Huo Reviewed-by: Stanley Chu Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit 817a7c996786f803a8b5528ca11a842eed88e01f Author: Sebastian Andrzej Siewior Date: Thu Nov 26 14:29:52 2020 +0100 scsi: message: fusion: Remove in_interrupt() usage in mptsas_cleanup_fw_event_q() mptsas_cleanup_fw_event_q() uses in_interrupt() to determine if it is safe to cancel a worker item. Aside of that in_interrupt() is deprecated as it does not provide what the name suggests. It covers more than hard/soft interrupt servicing context and is semantically ill defined. Looking closer there are a few problems with the current construct: - It could be invoked from an interrupt handler / non-blocking context because cancel_delayed_work() has no such restriction. Also, mptsas_free_fw_event() has no such restriction. - The list is accessed unlocked. It may dequeue a valid work-item but at the time of invoking cancel_delayed_work() the memory may be released or reused because the worker has already run. mptsas_cleanup_fw_event_q() is invoked via mptsas_shutdown() which is always invoked from preemtible context on device shutdown. It is also invoked via mptsas_ioc_reset(, MPT_IOC_POST_RESET) which is a MptResetHandlers callback. The only caller here are mpt_SoftResetHandler(), mpt_HardResetHandler() and mpt_Soft_Hard_ResetHandler(). All these functions have a `sleepFlag' argument and each caller uses caller uses `CAN_SLEEP' here and according to current documentation: | @sleepFlag: Indicates if sleep or schedule must be called So it is safe to sleep. Add mptsas_hotplug_event::users member. Initialize it to one by default so mptsas_free_fw_event() will free the memory. mptsas_cleanup_fw_event_q() will increment its value for items it dequeues and then it may keep a pointer after dropping the lock. Invoke cancel_delayed_work_sync() to cancel the work item and wait if the worker is currently busy. Free the memory afterwards since it owns the last reference to it. Link: https://lore.kernel.org/r/20201126132952.2287996-15-bigeasy@linutronix.de Cc: Sathya Prakash Cc: Sreekanth Reddy Cc: Suganath Prabu Subramani Cc: MPT-FusionLinux.pdl@broadcom.com Reviewed-by: Daniel Wagner Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Martin K. Petersen commit b8a5144370bc59dbb192b8f29298920ceadc3d1e Author: Thomas Gleixner Date: Thu Nov 26 14:29:51 2020 +0100 scsi: message: fusion: Remove in_interrupt() usage in mpt_config() in_interrupt() is referenced all over the place in these drivers. Most of these references are comments which are outdated and wrong. Aside of that in_interrupt() is deprecated as it does not provide what the name suggests. It covers more than hard/soft interrupt servicing context and is semantically ill defined. >From reading the mpt_config() code and the history this is clearly a debug mechanism and should probably be replaced by might_sleep() or completely removed because such checks are already in the subsequent functions. Remove the in_interrupt() references and replace the usage in mpt_config() with might_sleep(). Link: https://lore.kernel.org/r/20201126132952.2287996-14-bigeasy@linutronix.de Cc: Sathya Prakash Cc: Sreekanth Reddy Cc: Suganath Prabu Subramani Cc: MPT-FusionLinux.pdl@broadcom.com Reviewed-by: Daniel Wagner Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Martin K. Petersen commit ca6853693cbdcc3f9a38f4544bd3d7b149509784 Author: Ahmed S. Darwish Date: Thu Nov 26 14:29:49 2020 +0100 scsi: myrs: Remove WARN_ON(in_interrupt()) The in_interrupt() macro is ill-defined and does not provide what the name suggests. The usage especially in driver code is deprecated and a tree-wide effort to clean up and consolidate the (ab)usage of in_interrupt() and related checks is happening. In this case the check covers only parts of the contexts in which these functions cannot be called. It fails to detect preemption or interrupt disabled invocations. As wait_for_completion() already contains a broad variety of checks (always enabled or debug option dependent) which cover all invalid conditions already, there is no point in having extra inconsistent warnings in drivers. Just remove it. Link: https://lore.kernel.org/r/20201126132952.2287996-12-bigeasy@linutronix.de Cc: Hannes Reinecke Reviewed-by: Daniel Wagner Signed-off-by: Ahmed S. Darwish Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Martin K. Petersen commit 3bc08b9545dab900bb5902459877bf6a0fb4ec8b Author: Ahmed S. Darwish Date: Thu Nov 26 14:29:48 2020 +0100 scsi: myrb: Remove WARN_ON(in_interrupt()) The in_interrupt() macro is ill-defined and does not provide what the name suggests. The usage especially in driver code is deprecated and a tree-wide effort to clean up and consolidate the (ab)usage of in_interrupt() and related checks is happening. In this case the check covers only parts of the contexts in which these functions cannot be called. It fails to detect preemption or interrupt disabled invocations. As wait_for_completion() already contains a broad variety of checks (always enabled or debug option dependent) which cover all invalid conditions already, there is no point in having extra inconsistent warnings in drivers. Just remove it. Link: https://lore.kernel.org/r/20201126132952.2287996-11-bigeasy@linutronix.de Cc: Hannes Reinecke Reviewed-by: Daniel Wagner Signed-off-by: Ahmed S. Darwish Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Martin K. Petersen commit 547c0d1aeb76fead5177cc30b95e914b498675bd Author: Ahmed S. Darwish Date: Thu Nov 26 14:29:47 2020 +0100 scsi: mpt3sas: Remove in_interrupt() _scsih_fw_event_cleanup_queue() waits for all outstanding firmware events wokrqueue handlers to finish. If in_interrupt() is true, it cancels itself and return early. That in_interrupt() check is ill-defined and does not provide what the name suggests: it does not cover all states in which it is safe to block and call functions like cancel_work_sync(). That check is also not needed: _scsih_fw_event_cleanup_queue() is always invoked from process context. Below is an analysis of its callers: - scsih_remove(), bound to PCI ->remove(), process context - scsih_shutdown(), bound to PCI ->shutdown(), process context - mpt3sas_scsih_clear_outstanding_scsi_tm_commands(), called by => _base_clear_outstanding_commands(), called by =>_base_fault_reset_work(), workqueue => mpt3sas_base_hard_reset_handler(), locks mutex Remove the in_interrupt() check. Change _scsih_fw_event_cleanup_queue() specification to a purely process-context function and mark it with "Context: task, can sleep". Link: https://lore.kernel.org/r/20201126132952.2287996-10-bigeasy@linutronix.de Cc: Sathya Prakash Cc: Sreekanth Reddy Cc: Suganath Prabu Subramani Cc: Reviewed-by: Daniel Wagner Signed-off-by: Ahmed S. Darwish Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Martin K. Petersen commit 014aced18aff34d3b3ed3735b094d538b8c9f66e Author: Ahmed S. Darwish Date: Thu Nov 26 14:29:46 2020 +0100 scsi: qla4xxx: Remove in_interrupt() from qla4_82xx_rom_lock() qla4_82xx_rom_lock() spins on a certain hardware state until it is updated. At the end of each spin, if in_interrupt() is true, it does 20 loops of cpu_relax(). Otherwise, it yields the CPU. While in_interrupt() is ill-defined and does not provide what the name suggests, it is not needed here: qla4_82xx_rom_lock() is always called from process context. Below is an analysis of its callers: - ql4_nx.c: qla4_82xx_rom_fast_read(), all process context callers: => ql4_nx.c: qla4_82xx_pinit_from_rom(), GFP_KERNEL allocation => ql4_nx.c: qla4_82xx_load_from_flash(), msleep() in a loop - ql4_nx.c: qla4_82xx_pinit_from_rom(), earlier discussed - ql4_nx.c: qla4_82xx_rom_lock_recovery(), bound to "isp_operations" ->rom_lock_recovery() hook, which has one process context caller, qla4_8xxx_device_bootstrap(), with callers: => ql4_83xx.c: qla4_83xx_need_reset_handler(), process, msleep() => ql4_nx.c: qla4_8xxx_device_state_handler(), multiple msleep()s - ql4_nx.c: qla4_82xx_read_flash_data(), has cond_resched() Remove the in_interrupt() check. Mark, qla4_82xx_rom_lock(), and the ->rom_lock_recovery() hook, with "Context: task, can sleep". Change qla4_82xx_rom_lock() implementation to sleep 20ms, instead of a schedule(), for each spin. This is more deterministic, and it matches the other implementations bound to ->rom_lock_recovery(). Link: https://lore.kernel.org/r/20201126132952.2287996-9-bigeasy@linutronix.de Cc: Nilesh Javali Cc: Manish Rangankar Cc: Reviewed-by: Daniel Wagner Signed-off-by: Ahmed S. Darwish Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Martin K. Petersen commit 3627668c2e2c9459cff874ad34b82d251038da48 Author: Ahmed S. Darwish Date: Thu Nov 26 14:29:45 2020 +0100 scsi: qla4xxx: Remove in_interrupt() from qla4_82xx_idc_lock() qla4_82xx_idc_lock() spins on a certain hardware state until it is updated. At the end of each spin, if in_interrupt() is true, it does 20 loops of cpu_relax(). Otherwise, it yields the CPU. While in_interrupt() is ill-defined and does not provide what the name suggests, it is not needed here: qla4_82xx_idc_lock() is always called from process context. Below is an analysis of its callers: - ql4_nx.c: qla4_82xx_need_reset_handler(), 1-second msleep() in a loop. - ql4_nx.c: qla4_82xx_isp_reset(), calls qla4_8xxx_device_state_handler(), which has multiple msleep()s. Beside direct calls, qla4_82xx_idc_lock() is also bound to isp_operations ->idc_lock() hook. Other functions which are bound to the same hook, e.g. qla4_83xx_drv_lock(), also have an msleep(). For completeness, below is an analysis of all callers of that hook: - ql4_83xx.c: qla4_83xx_need_reset_handler(), has an msleep() - ql4_83xx.c: qla4_83xx_isp_reset(), calls qla4_8xxx_device_state_handler(), which has multiple msleep()s. - ql4_83xx.c: qla4_83xx_disable_pause(), all process context callers: => ql4_mbx.c: qla4xxx_mailbox_command(), msleep(), mutex_lock() => ql4_os.c: qla4xxx_recover_adapter(), schedule_timeout() in loop => ql4_os.c: qla4xxx_do_dpc(), workqueue context - ql4_attr.c: qla4_8xxx_sysfs_write_fw_dump(), sysfs bin_attribute ->write() hook, process context - ql4_mbx.c: qla4xxx_mailbox_command(), earlier discussed - ql4_nx.c: qla4_8xxx_device_bootstrap(), callers: => ql4_83xx.c: qla4_83xx_need_reset_handler(), process, msleep() => ql4_nx.c: qla4_8xxx_device_state_handler(), earlier discussed - ql4_nx.c: qla4_8xxx_need_qsnt_handler(), callers: => ql4_nx.c: qla4_8xxx_device_state_handler(), multiple msleep()s => ql4_os.c: qla4xxx_do_dpc(), workqueue context - ql4_nx.c: qla4_8xxx_update_idc_reg(), callers: => ql4_nx.c: qla4_8xxx_device_state_handler(), earlier discussed => ql4_os.c: qla4_8xxx_error_recovery(), only called by qla4xxx_pci_slot_reset(), which is bound to PCI ->slot_reset() process-context hook - ql4_nx.c: qla4_8xxx_device_state_handler(), earlier discussed - ql4_os.c: qla4xxx_recover_adapter(), earlier discussed - ql4_os.c: qla4xxx_do_dpc(), earlier discussed Remove the in_interrupt() check. Mark, qla4_82xx_idc_lock(), and the ->idc_lock() hook itself, with "Context: task, can sleep". Change qla4_82xx_idc_lock() implementation to sleep 100ms, instead of a schedule(), for each spin. This is more deterministic, and it matches other PCI HW locking functions in the driver. Link: https://lore.kernel.org/r/20201126132952.2287996-8-bigeasy@linutronix.de Cc: Nilesh Javali Cc: Manish Rangankar Cc: Reviewed-by: Daniel Wagner Signed-off-by: Ahmed S. Darwish Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Martin K. Petersen commit 4f6a57c23b1e002487159791feef7d54b725bfa6 Author: Ahmed S. Darwish Date: Thu Nov 26 14:29:44 2020 +0100 scsi: qla2xxx: Remove in_interrupt() from qla83xx-specific code qla83xx_wait_logic() is used to control the frequency of device IDC lock retries. If in_interrupt() is true, it does 20 loops of cpu_relax(). Otherwise, it sleeps for 100ms and yields the CPU. While in_interrupt() is ill-defined and does not provide what the name suggests, it is not needed here: that qla83xx_wait_logic() is exclusively called by qla83xx_idc_lock() / unlock(), and they always run from process context. Below is an analysis of all the idc lock/unlock callers, in order of appearance: - qla_os.c: qla83xx_nic_core_unrecoverable_work(), qla83xx_idc_state_handler_work(), qla83xx_nic_core_reset_work(), qla83xx_service_idc_aen(), all workqueue context - qla_os.c: qla83xx_check_nic_core_fw_alive(), has msleep() - qla_os.c: qla83xx_set_drv_presence(), called once from qla2x00_abort_isp(), which is bound to process-context ->abort_isp() hook. It also invokes wait_for_completion_timeout() through the chain qla2x00_configure_hba() => qla24xx_link_initialize() => qla2x00_mailbox_command(). - qla_os.c: qla83xx_clear_drv_presence(), which is called from qla2x00_abort_isp() discussed above, and from qla2x00_remove_one() which is PCI process-context ->remove() hook. - qla_os.c: qla83xx_need_reset_handler(), has a one second msleep() in a loop. - qla_os.c: qla83xx_device_bootstrap(), called only by qla83xx_idc_state_handler(), which has multiple msleep() invocations. - qla_os.c: qla83xx_idc_state_handler(), multiple msleep() invocations. - qla_attr.c: qla2x00_sysfs_write_reset(), sysfs bin_attribute ->write() hook, process context - qla_init.c: qla83xx_nic_core_fw_load() => qla_init.c: qla2x00_initialize_adapter() => bound to isp_operations ->initialize_adapter() hook ** => qla_os.c: qla2x00_probe_one(), PCI ->probe() process ctx - qla_init.c: qla83xx_initiating_reset(), msleep() in a loop. - qla_init.c: qla83xx_nic_core_reset(), called by qla83xx_nic_core_reset_work(), workqueue context. Remove the in_interrupt() check, and thus replace the entirety of qla83xx_wait_logic() with an msleep(QLA83XX_WAIT_LOGIC_MS). Mark qla83xx_idc_lock() / unlock() with "Context: task, can sleep". Link: https://lore.kernel.org/r/20201126132952.2287996-7-bigeasy@linutronix.de Cc: Nilesh Javali Cc: GR-QLogic-Storage-Upstream@marvell.com Reviewed-by: Himanshu Madhani Reviewed-by: Daniel Wagner Signed-off-by: Ahmed S. Darwish Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Martin K. Petersen commit 9fef41f25d60d3cb22ee81d5d92cdea99a1b35ea Author: Ahmed S. Darwish Date: Thu Nov 26 14:29:43 2020 +0100 scsi: target: tcm_qla2xxx: Remove BUG_ON(in_interrupt()) tcm_qla2xxx_free_session() has a BUG_ON(in_interrupt()). While in_interrupt() is ill-defined and does not provide what the name suggests, it is not needed here: the function is always invoked from workqueue context through "struct qla_tgt_func_tmpl" ->free_session() hook it is bound to. The function also calls wait_event_timeout() down the chain, which already has a might_sleep(). Remove the in_interrupt() check. Link: https://lore.kernel.org/r/20201126132952.2287996-6-bigeasy@linutronix.de Cc: Nilesh Javali Cc: Reviewed-by: Himanshu Madhani Reviewed-by: Daniel Wagner Signed-off-by: Ahmed S. Darwish Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Martin K. Petersen commit 8ac246bdd07a0f948f0e33eb4797bd2645cd8224 Author: Ahmed S. Darwish Date: Thu Nov 26 14:29:42 2020 +0100 scsi: qla2xxx: Remove in_interrupt() from qla82xx-specific code qla82xx_idc_lock() spins on a certain hardware state until it's updated. At the end of each spin, if in_interrupt() is true, it does 20 loops of cpu_relax(). Otherwise, it yields the CPU. While in_interrupt() is ill-defined and does not provide what the name suggests, it is not needed here: qla82xx_idc_lock() is always called from process context. Below is an analysis of its callers, in order of appearance: - qla_nx.c: qla82xx_device_bootstrap(), only called by qla82xx_device_state_handler(), has multiple msleep()s. - qla_nx.c: qla82xx_need_qsnt_handler(), has one second msleep() - qla_nx.c: qla82xx_wait_for_state_change(), one second msleep() - qla_nx.c: qla82xx_need_reset_handler(), can sleep up to 10 seconds - qla_nx.c: qla82xx_device_state_handler(), has multiple msleep()s - qla_nx.c: qla82xx_abort_isp(), if it's a qla82xx controller, calls qla82xx_device_state_handler(), which sleeps. It's also bound to isp_operations ->abort_isp() hook, where all the callers are in process context. - qla_nx.c: qla82xx_beacon_on(), bound to isp_operations ->beacon_on() hook. That hook is only called once, in a mutex locked context, from qla2x00_beacon_store(). - qla_nx.c: qla82xx_beacon_off(), bound to isp_operations ->beacon_off() hook. Like ->beacon_on(), it's only called once, in a mutex locked context, from qla2x00_beacon_store(). - qla_nx.c: qla82xx_fw_dump(), calls qla2x00_wait_for_chip_reset(), which has msleep() in a loop. It is bound to isp_operations ->fw_dump() hook. That hook *is* called from atomic context at qla_isr.c by multiple interrupt handlers. Nonetheless, it's other controllers interrupt handlers, and not the qla82xx. - qla82xx_msix_default() and qla82xx_msix_rsp_q() call qla24xx_process_response_queue() which doesn't implement the firmware dumping. - qla_attr.c: qla2x00_sysfs_write_fw_dump(), and qla2x00_sysfs_write_reset(), process-context sysfs ->write() hooks. - qla_os.c: qla2x00_probe_one(). PCI ->probe(), process context. - qla_os.c: qla2x00_clear_drv_active(), called solely from qla2x00_remove_one(), which is PCI ->remove() hook, process context. - qla_os.c: qla2x00_do_dpc(), kthread function, process context. Remove the in_interrupt() check. Change qla82xx_idc_lock() specification to a purely process-context function. Mark it with "Context: task, might sleep". Change qla82xx_idc_lock() implementation to sleep 100ms, instead of a schedule(), for each spin. This is more deterministic, and it matches the other qla models idc_lock() functions. Link: https://lore.kernel.org/r/20201126132952.2287996-5-bigeasy@linutronix.de Cc: Nilesh Javali Cc: Reviewed-by: Himanshu Madhani Reviewed-by: Daniel Wagner Signed-off-by: Ahmed S. Darwish Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Martin K. Petersen commit a93c3835319849f0226b9a7101284aeb60a5ed8e Author: Ahmed S. Darwish Date: Thu Nov 26 14:29:41 2020 +0100 scsi: qla4xxx: Remove in_interrupt() qla4_82xx_crb_win_lock() spins on a certain hardware state until it's updated. At the end of each spin, if in_interrupt() is true, it does 20 loops of cpu_relax(). Otherwise, it yields the CPU. The in_interrupt() macro is ill-defined as it does not provide what the name suggests, and it does not catch the intended use-case here. qla4_82xx_crb_win_lock() is always invoked with scsi_qla_host::hw_lock acquired, with disabled interrupts. If the caller is in process context, as in qla4_82xx_need_reset_handler(), then in_interrupt() will return false even though it is not allowed to call schedule(). Remove the in_interrupt() check. Change qla4_82xx_crb_win_lock() specification to a purely atomic function. Mark it as static, remove its forward declaration, and move it above its callers. To avoid hammering the PCI bus while spinning, use a 10 micro-second delay instead of cpu_relax(). Link: https://lore.kernel.org/r/20201126132952.2287996-4-bigeasy@linutronix.de Fixes: f4f5df23bf72 ("[SCSI] qla4xxx: Added support for ISP82XX") Cc: Nilesh Javali Cc: Manish Rangankar Cc: Reviewed-by: Daniel Wagner Signed-off-by: Ahmed S. Darwish Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Martin K. Petersen commit 18577cdcaeeb7a1ca5c3adc4d92ed2ba75699625 Author: Ahmed S. Darwish Date: Thu Nov 26 14:29:40 2020 +0100 scsi: hisi_sas: Remove preemptible() hisi_sas_task_exec() uses preemptible() to see if it's safe to block. This does not work for CONFIG_PREEMPT_COUNT=n kernels in which preemptible() always returns 0. The problem is masked when enabling some of the common Kconfig.debug options (like CONFIG_DEBUG_ATOMIC_SLEEP), as they implicitly enable the preemption counter. In general, driver leaf functions should not make logic decisions based on the context they're called from. The caller should be the entity responsible for explicitly indicating context. Since hisi_sas_task_exec() already has a gfp_t flags parameter, use it as the explicit context marker. Link: https://lore.kernel.org/r/20201126132952.2287996-3-bigeasy@linutronix.de Fixes: 214e702d4b70 ("scsi: hisi_sas: Adjust task reject period during host reset") Fixes: 550c0d89d52d ("scsi: hisi_sas: Replace in_softirq() check in hisi_sas_task_exec()") Cc: Xiaofei Tan Cc: Xiang Chen Cc: John Garry Acked-by: John Garry Signed-off-by: Ahmed S. Darwish Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Martin K. Petersen commit 4ba9e516573e60c471c01bb369144651f6f8d50b Author: Ahmed S. Darwish Date: Thu Nov 26 14:29:39 2020 +0100 scsi: pm80xx: Do not sleep in atomic context hw_event_sas_phy_up() is used in hardirq/softirq context: pm8001_interrupt_handler_msix() || pm8001_interrupt_handler_intx() || pm8001_tasklet => PM8001_CHIP_DISP->isr() = pm80xx_chip_isr() => process_oq() [spin_lock_irqsave(&pm8001_ha->lock,)] => process_one_iomb() => mpi_hw_event() => hw_event_sas_phy_up() => msleep(200) Revert the msleep() back to an mdelay() to avoid sleeping in atomic context. Link: https://lore.kernel.org/r/20201126132952.2287996-2-bigeasy@linutronix.de Fixes: 4daf1ef3c681 ("scsi: pm80xx: Convert 'long' mdelay to msleep") Cc: Vikram Auradkar Cc: Jack Wang Acked-by: Jack Wang Signed-off-by: Ahmed S. Darwish Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Martin K. Petersen commit 939785d35def8d10e8ad312b252dbbecc8d41ca1 Author: Bean Huo Date: Wed Nov 25 19:53:00 2020 +0100 scsi: ufs: Remove unnecessary if condition in ufshcd_suspend() In the case that auto_bkops_enable is false, which means auto bkops has been disabled, there is no need to call ufshcd_disable_auto_bkops(). Link: https://lore.kernel.org/r/20201125185300.3394-1-huobean@gmail.com Reviewed-by: Stanley Chu Reviewed-by: Can Guo Signed-off-by: Bean Huo Signed-off-by: Martin K. Petersen commit 623a4b6d5c2a7595f677fa17348dbca6b461f16a Author: Luo Jiaxing Date: Tue Nov 24 16:46:34 2020 +0800 scsi: hisi_sas: Move debugfs code to v3 hw driver Relocate all the debugfs code for DFX to v3 hw since no other versions support it. Link: https://lore.kernel.org/r/1606207594-196362-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 2ebde94f2ea4cffd812ece2f318c2f4922239b1d Author: Xiang Chen Date: Tue Nov 24 16:46:33 2020 +0800 scsi: hisi_sas: Fix up probe error handling for v3 hw Fix some rollbacks in function hisi_sas_v3_probe() and interrupt_init_v3_hw(). Link: https://lore.kernel.org/r/1606207594-196362-3-git-send-email-john.garry@huawei.com Fixes: 8d98416a55eb ("scsi: hisi_sas: Switch v3 hw to MQ") Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit bec99e5250bfe1c575e72a971bc2b2b21cf6c8b4 Author: John Garry Date: Tue Nov 24 16:46:32 2020 +0800 scsi: hisi_sas: Reduce some indirection in v3 hw driver Sometimes local functions are called indirectly from the hw driver, which only makes the code harder to follow. Remove these. Method .hw_init is only called from platform driver probe, which is not relevant, so don't set this either. Link: https://lore.kernel.org/r/1606207594-196362-2-git-send-email-john.garry@huawei.com Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit c6131854e28a50a7e3eaf7bc900d0780772b222b Author: Colin Ian King Date: Tue Nov 24 09:38:28 2020 +0000 scsi: pm8001: Remove space in a debug message There are two words that need separating with a space in a pm8001_dbg() message. Fix it. Link: https://lore.kernel.org/r/20201124093828.307709-1-colin.king@canonical.com Reviewed-by: Ewan D. Milne Acked-by: Jack Wang Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen commit 9aed578fba7839cab7a64a8184797e082ff759dd Author: Joe Perches Date: Mon Nov 23 20:36:04 2020 -0800 scsi: pm8001: Fix misindentation kernel robot reported a misindentation of a goto. Fix it. At the same time, use a temporary for a repeated entry in the same block to reduce visual noise. Link: https://lore.kernel.org/r/9542a8be9954c1dca744f93f53bb1af6dd1436e8.1606192458.git.joe@perches.com Reported-by: kernel test robot Acked-by: Jack Wang Signed-off-by: Joe Perches Signed-off-by: Martin K. Petersen commit 2ce6e200a04c246a9a60ab3ee05506ed4d778c08 Author: Joe Perches Date: Mon Nov 23 20:36:03 2020 -0800 scsi: pm8001: Convert pm8001_printk() to pm8001_info() Use the more common logging style. [mkp: fixed a few conflicts] Link: https://lore.kernel.org/r/69dc34ff63adfa60b3f203ed2d58143b5692af57.1606192458.git.joe@perches.com Acked-by: Jack Wang Signed-off-by: Joe Perches Signed-off-by: Martin K. Petersen commit cb7fb043e69a109057fa94510ff5d5602207d548 Merge: 76810ed840f81 6d9986b46fc12 Author: Jakub Kicinski Date: Mon Nov 30 19:03:31 2020 -0800 Merge tag 'linux-can-next-for-5.11-20201130' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== pull-request: can-next 2020-11-30 Gustavo A. R. Silva's patch for the pcan_usb driver fixes fall-through warnings for Clang. The next 5 patches target the mcp251xfd driver and are by Ursula Maplehurst and me. They optimizie the TEF and RX path by reducing number of SPI core requests to set the UINC bit. The remaining 8 patches target the m_can driver. The first 4 are various cleanups for the SPI binding driver (tcan4x5x) by Sean Nyekjaer, Dan Murphy and me. Followed by 4 cleanup patches by me for the m_can and m_can_platform driver. * tag 'linux-can-next-for-5.11-20201130' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next: can: m_can: m_can_class_unregister(): move right after m_can_class_register() can: m_can: m_can_plat_remove(): remove unneeded platform_set_drvdata() can: m_can: remove not used variable struct m_can_classdev::freq can: m_can: Kconfig: convert the into menu can: tcan4x5x: tcan4x5x_can_probe(): remove probe failed error message can: tcan4x5x: remove mram_start and reg_offset from struct tcan4x5x_priv can: tcan4x5x: rename parse_config() function can: tcan4x5x: tcan4x5x_clear_interrupts(): remove redundant return statement can: mcp251xfd: tef-path: reduce number of SPI core requests to set UINC bit can: mcp251xfd: move struct mcp251xfd_tef_ring definition can: mcp251xfd: struct mcp251xfd_priv::tef to array of length 1 can: mcp25xxfd: rx-path: reduce number of SPI core requests to set UINC bit can: mcp251xfd: mcp25xxfd_ring_alloc(): add define instead open coding the maximum number of RX objects can: pcan_usb_core: fix fall-through warnings for Clang ==================== Link: https://lore.kernel.org/r/20201130141432.278219-1-mkl@pengutronix.de Signed-off-by: Jakub Kicinski commit 76810ed840f811b312120eb8c61bc9543432901f Author: Tom Rix Date: Fri Nov 27 08:57:34 2020 -0800 net: wan: remove trailing semicolon in macro definition The macro use will already have a semicolon. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20201127165734.2694693-1-trix@redhat.com Signed-off-by: Jakub Kicinski commit e11e6df2a86779cfc73c4fb2e957ff7a70d89f68 Author: Michael Tretter Date: Fri Sep 11 15:54:00 2020 +0200 drm/exynos: use exynos_dsi as drvdata Use the exynos_dsi as drvdata instead of the encoder to further decouple the driver from the encoder. Signed-off-by: Michael Tretter Reviewed-by: Sam Ravnborg Signed-off-by: Inki Dae commit e5d57c54038645928a904042ac89356b66c8cd3f Author: Michael Tretter Date: Fri Sep 11 15:53:59 2020 +0200 drm/exynos: remove in_bridge_node from exynos_dsi We do not need to keep a reference to the in_bridge_node, but we can simply drop it, once we found and attached the previous bridge. Signed-off-by: Michael Tretter Reviewed-by: Sam Ravnborg Signed-off-by: Inki Dae commit 60d1029b3f255640ce48f2ff46a2adac6069e413 Author: Marek Szyprowski Date: Fri Oct 9 15:05:24 2020 +0200 drm/exynos/hdmi: add support for 1920x1200@60Hz mode Add clock configuration for 154MHz pixelclock to Exynos542x HDMIPHY, which is required for 1920x1200@60Hz mode. The PLL configuration data has been taken from the vendor's kernel tree for the Odroid XU4 board. Signed-off-by: Marek Szyprowski Signed-off-by: Inki Dae commit 5f3e915c36d59c94a917e207df4361f23d9c821d Merge: be5724240b390 6e628cd3a8f78 Author: Jakub Kicinski Date: Mon Nov 30 17:55:26 2020 -0800 Merge branch 'mptcp-avoid-workqueue-usage-for-data' Paolo Abeni says: ==================== mptcp: avoid workqueue usage for data The current locking schema used to protect the MPTCP data-path requires the usage of the MPTCP workqueue to process the incoming data, depending on trylock result. The above poses scalability limits and introduces random delays in MPTCP-level acks. With this series we use a single spinlock to protect the MPTCP data-path, removing the need for workqueue and delayed ack usage. This additionally reduces the number of atomic operations required per packet and cleans-up considerably the poll/wake-up code. ==================== Link: https://lore.kernel.org/r/cover.1606413118.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski commit 6e628cd3a8f78cb0dfe85353e5e488bda296bedf Author: Paolo Abeni Date: Fri Nov 27 11:10:27 2020 +0100 mptcp: use mptcp release_cb for delayed tasks We have some tasks triggered by the subflow receive path which require to access the msk socket status, specifically: mptcp_clean_una() and mptcp_push_pending() We have almost everything in place to defer to the msk release_cb such tasks when the msk sock is owned. Since the worker is no more used to clean the acked data, for fallback sockets we need to explicitly flush them. As an added bonus we can move the wake-up code in __mptcp_clean_una(), simplify a lot mptcp_poll() and move the timer update under the data lock. The worker is now used only to process and send DATA_FIN packets and do the mptcp-level retransmissions. Acked-by: Florian Westphal Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Jakub Kicinski commit 7439d687b79cbbd971c6a170be9aefda4a564be4 Author: Paolo Abeni Date: Fri Nov 27 11:10:26 2020 +0100 mptcp: avoid a few atomic ops in the rx path Extending the data_lock scope in mptcp_incoming_option we can use that to protect both snd_una and wnd_end. In the typical case, we will have a single atomic op instead of 2 Acked-by: Florian Westphal Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Jakub Kicinski commit 724cfd2ee8aa12e933253bb7a8bccb743a6fa6ef Author: Paolo Abeni Date: Fri Nov 27 11:10:25 2020 +0100 mptcp: allocate TX skbs in msk context Move the TX skbs allocation in mptcp_sendmsg() scope, and tentatively pre-allocate a skbs number proportional to the sendmsg() length. Use the ssk tx skb cache to prevent the subflow allocation. This allows removing the msk skb extension cache and will make possible the later patches. Acked-by: Florian Westphal Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Jakub Kicinski commit 879526030c8b5e8bd786a6408730893b9b2958ea Author: Paolo Abeni Date: Fri Nov 27 11:10:24 2020 +0100 mptcp: protect the rx path with the msk socket spinlock Such spinlock is currently used only to protect the 'owned' flag inside the socket lock itself. With this patch, we extend its scope to protect the whole msk receive path and sk_forward_memory. Given the above, we can always move data into the msk receive queue (and OoO queue) from the subflow. We leverage the previous commit, so that we need to acquire the spinlock in the tx path only when moving fwd memory. recvmsg() must now explicitly acquire the socket spinlock when moving skbs out of sk_receive_queue. To reduce the number of lock operations required we use a second rx queue and splice the first into the latter in mptcp_lock_sock(). Additionally rmem allocated memory is bulk-freed via release_cb() Acked-by: Florian Westphal Co-developed-by: Florian Westphal Signed-off-by: Florian Westphal Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Jakub Kicinski commit e93da92896bc0ddc26e88bbc09e7e39b84366a38 Author: Paolo Abeni Date: Fri Nov 27 11:10:23 2020 +0100 mptcp: implement wmem reservation This leverages the previous commit to reserve the wmem required for the sendmsg() operation when the msk socket lock is first acquired. Some heuristics are used to get a reasonable [over] estimation of the whole memory required. If we can't forward alloc such amount fallback to a reasonable small chunk, otherwise enter the wait for memory path. When sendmsg() needs more memory it looks at wmem_reserved first and if that is exhausted, move more space from sk_forward_alloc. The reserved memory is not persistent and is released at the next socket unlock via the release_cb(). Overall this will simplify the next patch. Acked-by: Florian Westphal Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Jakub Kicinski commit ad80b0fc6e7f56bb1b09af86749ff3014477cfe6 Author: Paolo Abeni Date: Fri Nov 27 11:10:22 2020 +0100 mptcp: open code mptcp variant for lock_sock This allows invoking an additional callback under the socket spin lock. Will be used by the next patches to avoid additional spin lock contention. Acked-by: Florian Westphal Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Jakub Kicinski commit 0b84862688951ad5f6ad8990dd9a44e1363c4a2b Author: Adam Ford Date: Thu Nov 26 04:45:35 2020 -0600 arm64: dts: imx8mm-beacon-som: Assign PMIC clock The PMIC throws an errors because the clock isn't assigned to it. Fix this by assigning the clocks info. Signed-off-by: Adam Ford Signed-off-by: Shawn Guo commit 6b5cd77371e5e34769284bfb058ff332ae278cc5 Author: Adam Ford Date: Thu Nov 26 04:45:34 2020 -0600 arm64: dts: imx8mm-beacon-som: Configure RTC aliases On the i.MX8MM Beacon SOM, there is an RTC chip which is fed power from the baseboard during power off. The SNVS RTC integrated into the SoC is not fed power. Depending on the order the modules are loaded, this can be a problem if the external RTC isn't rtc0. Make the alias for rtc0 point to the external RTC all the time and rtc1 point to the SVNS in order to correctly hold date/time over a power-cycle. Signed-off-by: Adam Ford Signed-off-by: Shawn Guo commit 327106e4217b8ef4f74640d7de15a0a287690aba Author: Lukasz Majewski Date: Wed Nov 25 17:18:13 2020 +0100 ARM: dts: imx28: Fix label name for L2 switch The 'eth_switch' name has been misspelled in the imx28.dtsi file, so this change fixes it. Signed-off-by: Lukasz Majewski Signed-off-by: Shawn Guo commit b9cf7d3b6592561e2a9f123a989f7dd5708a61d3 Author: Adam Ford Date: Sat Nov 7 05:58:08 2020 -0600 arm64: dts: imx8mn: Add node for SPDIF The i.MX8M Nano can support SPDIF which is compatible to the IP used on the i.MX35. Add the node. Signed-off-by: Adam Ford Signed-off-by: Shawn Guo commit cca69ef6eba514e04717dec49a1dac2a7db221ec Author: Adam Ford Date: Sat Nov 7 05:58:07 2020 -0600 arm64: dts: imx8mn: Add support for micfil The i.MX8M Nano has supports the MICFIL digital interface. It's a 16-bit audio signal from a PDM microphone bitstream. The driver is already in the kernel, but the node is missing. Add the micfil node. Signed-off-by: Adam Ford Signed-off-by: Shawn Guo commit 9e9860069725f81a97571f565a1e93a4734b6dd7 Author: Adam Ford Date: Sat Nov 7 05:58:06 2020 -0600 arm64: dts: imx8mn: Add SAI nodes The i.MX8M Nano has several SAI nodes available to it. Enable them. Signed-off-by: Adam Ford Signed-off-by: Shawn Guo commit 970406eaef3a5304cc1513d8a4aae23e183f7ba8 Author: Adam Ford Date: Sat Nov 7 05:58:05 2020 -0600 arm64: dts: imx8mn: Enable Asynchronous Sample Rate Converter The driver exists for the Enhanced Asynchronous Sample Rate Converter (EASRC) Controller, but there isn't a device tree entry for it. On the vendor kernel, they put this on a spba-bus for SDMA support. Add the node for the spba-bus with the easrc node inside. Signed-off-by: Adam Ford Signed-off-by: Shawn Guo commit 2e6cde96873253fd9eb0f20afd8ffd18278cff75 Author: Vladimir Oltean Date: Thu Nov 19 18:38:21 2020 +0200 arm64: dts: ls1028a: make the eMMC and SD card controllers use fixed indices As the boot order in the kernel continues to change, sometimes it may happen that the eSDHC controller mmc@2150000 (the one for eMMC) gets probed before the one at mmc@2140000 (for external SD cards). The effect is that the eMMC controller gets the /dev/mmcblk0 name, and the SD card gets /dev/mmcblk1. Since the introduction of this SoC, that has never happened in practice, even though it was never guaranteed in theory. Setting "root=/dev/mmcblk0p2" in /proc/cmdline has always caused the kernel to use the second partition from the SD card as the rootfs. The NXP development boards are typically shipped with either - LSDK, which uses "root=UUID=", or - OpenIL, which uses "root=/dev/mmcblkNp2" So for OpenIL, let's preserve that old behavior by adding some aliases which create naming consistency (for LSDK it doesn't matter): - the SD card controller uses /dev/mmcblk0 - the eMMC controller uses /dev/mmcblk1 For the Kontron SL28 boards, Michael Walle says that they are shipped with "root=UUID=" already, so the probing order doesn't matter, but it is more natural to him for /dev/mmcblk0 to be the eMMC, so let's do it the other way around there. The aliases are parsed by mmc_alloc_host() in drivers/mmc/core/host.c. Cc: Ashish Kumar Cc: Yangbo Lu Cc: Michael Walle Signed-off-by: Vladimir Oltean Acked-by: Michael Walle Signed-off-by: Shawn Guo commit be5724240b390b1192635d942d4bd3df57bb6e3c Merge: e71d2b957ee49 ae680bcbd06ae Author: Jakub Kicinski Date: Mon Nov 30 17:32:03 2020 -0800 Merge branch 'dpaa_eth-add-xdp-support' Camelia Groza says: ==================== dpaa_eth: add XDP support Enable XDP support for the QorIQ DPAA1 platforms. Implement all the current actions (DROP, ABORTED, PASS, TX, REDIRECT). No Tx batching is added at this time. Additional XDP_PACKET_HEADROOM bytes are reserved in each frame's headroom. After transmit, a reference to the xdp_frame is saved in the buffer for clean-up on confirmation in a newly created structure for software annotations. DPAA_TX_PRIV_DATA_SIZE bytes are reserved in the buffer for storing this structure and the XDP program is restricted from accessing them. The driver shares the egress frame queues used for XDP with the network stack. The DPAA driver is a LLTX driver so no explicit locking is required on transmission. ==================== Link: https://lore.kernel.org/r/cover.1606322126.git.camelia.groza@nxp.com Signed-off-by: Jakub Kicinski commit ae680bcbd06ae9189e0102f8cdb5fd938b00725f Author: Camelia Groza Date: Wed Nov 25 18:53:36 2020 +0200 dpaa_eth: implement the A050385 erratum workaround for XDP For XDP TX, even tough we start out with correctly aligned buffers, the XDP program might change the data's alignment. For REDIRECT, we have no control over the alignment either. Create a new workaround for xdp_frame structures to verify the erratum conditions and move the data to a fresh buffer if necessary. Create a new xdp_frame for managing the new buffer and free the old one using the XDP API. Due to alignment constraints, all frames have a 256 byte headroom that is offered fully to XDP under the erratum. If the XDP program uses all of it, the data needs to be move to make room for the xdpf backpointer. Disable the metadata support since the information can be lost. Acked-by: Madalin Bucur Signed-off-by: Camelia Groza Reviewed-by: Maciej Fijalkowski Signed-off-by: Jakub Kicinski commit d7af04486d9f58752bf840901908108b1ba08aba Author: Camelia Groza Date: Wed Nov 25 18:53:35 2020 +0200 dpaa_eth: rename current skb A050385 erratum workaround Explicitly point that the current workaround addresses skbs. This change is in preparation for adding a workaround for XDP scenarios. Acked-by: Madalin Bucur Signed-off-by: Camelia Groza Reviewed-by: Maciej Fijalkowski Signed-off-by: Jakub Kicinski commit a1e031ffb422bb89df9ad9c018420d0deff7f2e3 Author: Camelia Groza Date: Wed Nov 25 18:53:34 2020 +0200 dpaa_eth: add XDP_REDIRECT support After transmission, the frame is returned on confirmation queues for cleanup. For this, store a backpointer to the xdp_frame in the private reserved area at the start of the TX buffer. No TX batching support is implemented at this time. Acked-by: Madalin Bucur Signed-off-by: Camelia Groza Reviewed-by: Maciej Fijalkowski Signed-off-by: Jakub Kicinski commit d57e57d0cd04be5ee533a0e1e6d13ba9251114b7 Author: Camelia Groza Date: Wed Nov 25 18:53:33 2020 +0200 dpaa_eth: add XDP_TX support Use an xdp_frame structure for managing the frame. Store a backpointer to the structure at the start of the buffer before enqueueing for cleanup on TX confirmation. Reserve DPAA_TX_PRIV_DATA_SIZE bytes from the frame size shared with the XDP program for this purpose. Use the XDP API for freeing the buffer when it returns to the driver on the TX confirmation path. The frame queues are shared with the netstack. The DPAA driver is a LLTX driver so no explicit locking is required on transmission. This approach will be reused for XDP REDIRECT. Acked-by: Madalin Bucur Signed-off-by: Camelia Groza Reviewed-by: Maciej Fijalkowski Signed-off-by: Jakub Kicinski commit 828eadbaccc1b8090514d4b7ccc92b4876a0bd12 Author: Camelia Groza Date: Wed Nov 25 18:53:32 2020 +0200 dpaa_eth: limit the possible MTU range when XDP is enabled Implement the ndo_change_mtu callback to prevent users from setting an MTU that would permit processing of S/G frames. The maximum MTU size is dependent on the buffer size. Acked-by: Madalin Bucur Signed-off-by: Camelia Groza Reviewed-by: Maciej Fijalkowski Signed-off-by: Jakub Kicinski commit 86c0c196cbe48f844721783d9162e46bc35c0c5a Author: Camelia Groza Date: Wed Nov 25 18:53:31 2020 +0200 dpaa_eth: add basic XDP support Implement the XDP_DROP and XDP_PASS actions. Avoid draining and reconfiguring the buffer pool at each XDP setup/teardown by increasing the frame headroom and reserving XDP_PACKET_HEADROOM bytes from the start. Since we always reserve an entire page per buffer, this change only impacts Jumbo frame scenarios where the maximum linear frame size is reduced by 256 bytes. Multi buffer Scatter/Gather frames are now used instead in these scenarios. Allow XDP programs to access the entire buffer. The data in the received frame's headroom can be overwritten by the XDP program. Extract the relevant fields from the headroom while they are still available, before running the XDP program. Since the headroom might be resized before the frame is passed up to the stack, remove the check for a fixed headroom value when building an skb. Allow the meta data to be updated and pass the information up the stack. Scatter/Gather frames are dropped when XDP is enabled. Acked-by: Madalin Bucur Signed-off-by: Camelia Groza Reviewed-by: Maciej Fijalkowski Signed-off-by: Jakub Kicinski commit fb9afd961c7628d9971fb9ca4096b6164bfe2cba Author: Camelia Groza Date: Wed Nov 25 18:53:30 2020 +0200 dpaa_eth: add struct for software backpointers We maintain an skb backpointer in the software annotations area of Tx frames. Introduce a structure for explicit handling. Acked-by: Madalin Bucur Signed-off-by: Camelia Groza Reviewed-by: Maciej Fijalkowski Signed-off-by: Jakub Kicinski commit 35771b33dd987783171058e7db901f98ddd4c097 Author: Oleksij Rempel Date: Tue Nov 17 14:13:54 2020 +0100 ARM: dts: add Protonic WD3 board Protonic WD3 is a proof of concept platform for tractor e-cockpit applications Signed-off-by: Oleksij Rempel Signed-off-by: Shawn Guo commit 747ec53ea72a548693d0664817776d3634e9b63a Author: Oleksij Rempel Date: Tue Nov 17 14:13:53 2020 +0100 dt-bindings: arm: fsl: add Protonic WD3 board Add Protonic Holland WD3 iMX6qp based board Signed-off-by: Oleksij Rempel Acked-by: Rob Herring Signed-off-by: Shawn Guo commit af038154171ae22642596ebaff5f2e273fc2b602 Author: Oleksij Rempel Date: Tue Nov 17 14:13:52 2020 +0100 dt-bindings: vendor-prefixes: add "virtual" prefix "virtual" is used for vendor-less "devices". For example for the GPIO based MDIO bus "virtual,mdio-gpio". This patch is needed to fix the checkpatch warning for the Protonic WD3 board. Signed-off-by: Oleksij Rempel Acked-by: Rob Herring Signed-off-by: Shawn Guo commit 708ed2649ad86dad2284acac6e4e6829a3cfd604 Author: Marco Felsch Date: Thu Nov 26 20:22:52 2020 +0100 ARM: dts: imx6qdl-kontron-samx6i: increase i2c-frequency Set it to max. allowed 375kHz for faster transfers. The limit is given by the erratum [1]. [1] https://www.nxp.com/docs/en/errata/IMX6DQCE.pdf Signed-off-by: Marco Felsch Signed-off-by: Shawn Guo commit eecc662ff38b498e1fcd971caec3ce448e711d0e Author: Guido Günther Date: Sat Nov 28 19:56:23 2020 +0100 arm64: defconfig: Enable more Librem 5 hardware This enables - CONFIG_BATTERY_MAX17042: battery chip - CONFIG_CHARGER_BQ25980: charge controller - CONFIG_DRM_PANEL_MANTIX_MLAF057WE5: LCD panel - CONFIG_GNSS/CONFIG_GNSS_MTK_SERIAL: GNSS receiver - CONFIG_IIO_ST_LSM6DSX: IMU - CONFIG_IMX_DCSS: 2nd display controller - CONFIG_LEDS_LM3692X: LCD backlight - CONFIG_REGULATOR_TPS65132: regulator for the LCD panel - CONFIG_TOUCHSCREEN_EDT_FT5X06: touch controller - CONFIG_TYPEC_TPS6598X: USB PD controller - CONFIG_VCNL4000: ambient light and proximity sensor as modules. Signed-off-by: Guido Günther Signed-off-by: Shawn Guo commit 1116e43e7e4be7c7d76578ffac1d3a73f4ebcafe Author: Yejune Deng Date: Wed Nov 18 10:48:20 2020 +0800 soc: amlogic: replace devm_reset_control_array_get() devm_reset_control_array_get_exclusive() looks more readable Signed-off-by: Yejune Deng Reviewed-by: Philipp Zabel Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/1605667700-16681-1-git-send-email-yejune.deng@gmail.com commit 28f851e6afa858f182802e23ac60c3ed7d1c04a1 Author: Yu Kuai Date: Tue Nov 17 09:13:22 2020 +0800 soc: amlogic: canvas: add missing put_device() call in meson_canvas_get() if of_find_device_by_node() succeed, meson_canvas_get() doesn't have a corresponding put_device(). Thus add put_device() to fix the exception handling for this function implementation. Fixes: 382f8be04551 ("soc: amlogic: canvas: Fix meson_canvas_get when probe failed") Signed-off-by: Yu Kuai Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20201117011322.522477-1-yukuai3@huawei.com commit b6a1c8a1eaa73b1e2ae251399308e9445d74cef7 Author: Dongjin Kim Date: Mon Nov 30 15:03:20 2020 +0900 arm64: dts: meson-sm1: fix typo in opp table The freqency 1512000000 should be 1500000000. Signed-off-by: Dongjin Kim Fixes: 3d9e76483049 ("arm64: dts: meson-sm1-sei610: enable DVFS") Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20201130060320.GA30098@anyang-linuxfactory-or-kr commit 2493a9a515cf2bfa958d1d68beab507a1c7f5962 Author: Christian Hewitt Date: Thu Nov 26 05:04:40 2020 +0000 arm64: dts: meson: add KHAMSIN IR remote node to SML5442TW Set the IR keymap to the KHAMSIN remote shipped with the SML5442TW. Signed-off-by: Christian Hewitt Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20201126050440.6273-1-christianshewitt@gmail.com commit 6714f28178889da983d020fd9cf3bf7ae1a8c49d Author: Christian Hewitt Date: Wed Nov 25 05:29:14 2020 +0000 arm64: dts: meson: update the Khadas VIM3/3L LED bindings Update the VIM3/3L common dtsi to use the new function/color bindings. Suggested-by: Artem Lapkin Signed-off-by: Christian Hewitt Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20201125052914.4092-1-christianshewitt@gmail.com commit b6c605e00ce8910d7ec3d9a54725d78b14db49b9 Author: Artem Lapkin Date: Wed Nov 25 02:40:01 2020 +0000 arm64: dts: meson: fix spi-max-frequency on Khadas VIM2 The max frequency for the w25q32 (VIM v1.2) and w25q128 (VIM v1.4) spifc chip should be 104Mhz not 30MHz. Fixes: b8b74dda3908 ("ARM64: dts: meson-gxm: Add support for Khadas VIM2") Signed-off-by: Artem Lapkin Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20201125024001.19036-1-christianshewitt@gmail.com commit a6077652cb6595b1d668af41a3978dd965d57b9e Author: Christian Hewitt Date: Tue Nov 24 14:53:38 2020 +0000 arm64: dts: meson: add rtc aliases to meson-khadas-vim3.dtsi Tweak the node name to make it aliasable, then add aliases for the on-board RTC chip and meson-vrtc timer so they probe as rtc0 and rtc1 respectively. before: VIM3:~ # dmesg | grep rtc [ 3.622530] meson-vrtc ff8000a8.rtc: registered as rtc0 [ 3.622574] meson-vrtc ff8000a8.rtc: setting system clock to 1970-01-01T00:00:03 UTC (3) [ 3.646936] rtc-hym8563 0-0051: no valid clock/calendar values available [ 3.647125] rtc-hym8563 0-0051: registered as rtc1 [ 3.852382] rtc-hym8563 0-0051: no valid clock/calendar values available after: VIM3:~ # dmesg | grep rtc [ 3.583735] meson-vrtc ff8000a8.rtc: registered as rtc1 [ 3.633888] rtc-hym8563 0-0051: no valid clock/calendar values available [ 3.634120] rtc-hym8563 0-0051: registered as rtc0 [ 3.635250] rtc-hym8563 0-0051: no valid clock/calendar values available [ 3.635267] rtc-hym8563 0-0051: hctosys: unable to read the hardware clock [ 3.852632] rtc-hym8563 0-0051: no valid clock/calendar values available Signed-off-by: Christian Hewitt Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20201124145338.17137-1-christianshewitt@gmail.com commit 4592bfe9d9f3359ae9db4620a405441530207733 Author: Christian Hewitt Date: Tue Nov 24 12:17:40 2020 +0000 arm64: dts: meson: Add capacity-dmips-mhz attributes to GXM GXM (S912) is a big-little design with CPUs 0-3 clocked at 1.5GHz and CPUs 4-7 at 1.0GHz. Adding capacity-dmips-mhz attributes allows the scheduler to factor the different clock speeds into capacity calculations and prefer the higher-clocked cluster to improve overall performance. This was inspired by the similar change for G12B [0] boards. The diference here is that all cores are A53's so the same dmips-mhz value is used. VIM2:~ # cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq 1512000 1512000 1512000 1512000 1000000 1000000 1000000 1000000 before: VIM2:~ # cat /sys/devices/system/cpu/cpu*/cpu_capacity 1024 1024 1024 1024 1024 1024 1024 1024 after: VIM2:~ # cat /sys/devices/system/cpu/cpu*/cpu_capacity 1024 1024 1024 1024 677 677 677 677 The after value matches my table-napkin calculation: (1000000 / 1512000 = 0.661) * 1024 = 677 [0] https://github.com/torvalds/linux/commit/6eeaf4d2452ec8b1ece58776812140734fc2e088 Signed-off-by: Christian Hewitt Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20201124121740.25704-1-christianshewitt@gmail.com commit 9715b01da6cfb361b2a09fe2ad94287d6fa72261 Author: Neil Armstrong Date: Fri Nov 20 16:32:29 2020 +0100 arm64: dts: meson-axg-s400: enable PCIe M.2 Key E slots Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20201120153229.3920123-5-narmstrong@baylibre.com commit 5b3a9c20926e78f9d226b1853386dee6d22df9c3 Author: Neil Armstrong Date: Fri Nov 20 16:32:28 2020 +0100 arm64: dts: meson-axg: add PCIe nodes This adds the nodes for the : - AXG PCIe PHY, using the shared analog PCIe/MIPI DSI PHY - 2x AXG PCIe controllers Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20201120153229.3920123-4-narmstrong@baylibre.com commit 3d3f1dfa0897bd14eebc3e79b38ae90a2eac67c5 Author: Neil Armstrong Date: Fri Nov 20 16:21:31 2020 +0100 arm64: dts: meson-axg: add MIPI DSI PHY nodes This adds the nodes for : - MIPI DSI+PCIe analog phy - MIPI D-PHY Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20201120152131.3918814-3-narmstrong@baylibre.com commit 78a6dcb52736da4d54e0b42788a4c5f13da9a8e1 Author: Neil Armstrong Date: Fri Nov 20 16:21:30 2020 +0100 arm64: dts: meson-axg: add PWRC node This adds the power controller PWRC node and the corresponding ethernet power domain. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20201120152131.3918814-2-narmstrong@baylibre.com commit 287eb2be4037c3d8d96b5d9490fa0e695e4553b9 Author: Christian Hewitt Date: Mon Nov 16 06:41:47 2020 +0000 arm64: dts: meson: enable rtc node on Khadas VIM1/VIM2 boards Enable the rtc node on VIM1/VIM2 boards so users can simply attach a power cell and use the on-board RTC without modifying the device-tree. Cold boot with no cell attached is gracefully handled: VIM2:~ # dmesg | grep rtc [ 7.716150] rtc-hym8563 1-0051: no valid clock/calendar values available [ 7.716957] rtc-hym8563 1-0051: registered as rtc0 [ 7.729850] rtc-hym8563 1-0051: no valid clock/calendar values available [ 7.729877] rtc-hym8563 1-0051: hctosys: unable to read the hardware clock [ 8.126768] rtc-hym8563 1-0051: no valid clock/calendar values available Warm boot (and any boot with cell attached) recalls stored values resulting in consistently faster (re)boot times: VIM2:~ # dmesg | grep rtc [ 7.441671] rtc-hym8563 1-0051: registered as rtc0 [ 7.442663] rtc-hym8563 1-0051: setting system clock to 2020-11-16T05:49:59 UTC (1605505799) Suggested-by: Artem Lapkin Signed-off-by: Christian Hewitt Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20201116064147.12062-1-christianshewitt@gmail.com commit e059eda7ee513347b330b607ea4f07dd1d3666e1 Merge: 5bc0d7561aa09 cd3caa573ebd1 Author: Kevin Hilman Date: Mon Nov 30 15:53:49 2020 -0800 Merge tag 'clk-meson-v5.11-headers-1' of git://github.com/BayLibre/clk-meson into v5.11/dt64-deps Amlogic clock headers updates for v5.11 * Add axg's video clocks * tag 'clk-meson-v5.11-headers-1' of git://github.com/BayLibre/clk-meson: dt-bindings: clk: axg-clkc: add MIPI DSI Host clock binding dt-bindings: clk: axg-clkc: add Video Clocks commit 28c332b941a7850d3854a00353c83965f3670791 Author: Tom Rix Date: Fri Nov 27 11:12:09 2020 -0800 gfs2: remove trailing semicolons from macro definitions The macro use will already have a semicolon. Signed-off-by: Tom Rix Signed-off-by: Andreas Gruenbacher commit a55a47a3bc82cb53509ed2501697f9b385036195 Author: Andreas Gruenbacher Date: Fri Nov 27 14:23:04 2020 +0100 Revert "GFS2: Prevent delete work from occurring on glocks used for create" Since commit a0e3cc65fa29 ("gfs2: Turn gl_delete into a delayed work"), we're cancelling any pending delete work of an iopen glock before attaching a new inode to that glock in gfs2_create_inode. This means that delete_work_func can no longer be queued or running when attaching the iopen glock to the new inode, and we can revert commit a4923865ea07 ("GFS2: Prevent delete work from occurring on glocks used for create"), which tried to achieve the same but in a racy way. Signed-off-by: Andreas Gruenbacher commit e3a77eebfa256c2f8871b8771f217b1afda4525e Author: Andreas Gruenbacher Date: Wed Nov 25 21:14:15 2020 +0100 gfs2: Make inode operations static The inode operations are not used outside inode.c. Signed-off-by: Andreas Gruenbacher commit 257f160a0e548639251a35ee8d55c94d9607bb12 Author: Andrew Price Date: Wed Nov 18 15:31:20 2020 +0000 MAINTAINERS: Add gfs2 bug tracker link And remove the obsolete website URL. Signed-off-by: Andrew Price Signed-off-by: Andreas Gruenbacher commit d9593868cd58a5c843d871fe728deef166e91eee Author: Andrew Price Date: Wed Nov 4 16:29:15 2020 +0000 Documentation: Update filesystems/gfs2.rst Remove an obsolete URL and generally bring the doc up-to-date Signed-off-by: Andrew Price Signed-off-by: Andreas Gruenbacher commit df54228515593d1dc1df538786a94beb690f8cff Merge: 854055c0cf30d 41bf900fe2a0c Author: Daniel Borkmann Date: Tue Dec 1 00:09:26 2020 +0100 Merge branch 'xdp-preferred-busy-polling' Björn Töpel says: ==================== This series introduces three new features: 1. A new "heavy traffic" busy-polling variant that works in concert with the existing napi_defer_hard_irqs and gro_flush_timeout knobs. 2. A new socket option that let a user change the busy-polling NAPI budget. 3. Allow busy-polling to be performed on XDP sockets. The existing busy-polling mode, enabled by the SO_BUSY_POLL socket option or system-wide using the /proc/sys/net/core/busy_read knob, is an opportunistic. That means that if the NAPI context is not scheduled, it will poll it. If, after busy-polling, the budget is exceeded the busy-polling logic will schedule the NAPI onto the regular softirq handling. One implication of the behavior above is that a busy/heavy loaded NAPI context will never enter/allow for busy-polling. Some applications prefer that most NAPI processing would be done by busy-polling. This series adds a new socket option, SO_PREFER_BUSY_POLL, that works in concert with the napi_defer_hard_irqs and gro_flush_timeout knobs. The napi_defer_hard_irqs and gro_flush_timeout knobs were introduced in commit 6f8b12d661d0 ("net: napi: add hard irqs deferral feature"), and allows for a user to defer interrupts to be enabled and instead schedule the NAPI context from a watchdog timer. When a user enables the SO_PREFER_BUSY_POLL, again with the other knobs enabled, and the NAPI context is being processed by a softirq, the softirq NAPI processing will exit early to allow the busy-polling to be performed. If the application stops performing busy-polling via a system call, the watchdog timer defined by gro_flush_timeout will timeout, and regular softirq handling will resume. In summary; Heavy traffic applications that prefer busy-polling over softirq processing should use this option. Patch 6 touches a lot of drivers, so the Cc: list is grossly long. Example usage: $ echo 2 | sudo tee /sys/class/net/ens785f1/napi_defer_hard_irqs $ echo 200000 | sudo tee /sys/class/net/ens785f1/gro_flush_timeout Note that the timeout should be larger than the userspace processing window, otherwise the watchdog will timeout and fall back to regular softirq processing. Enable the SO_BUSY_POLL/SO_PREFER_BUSY_POLL options on your socket. Performance simple UDP ping-pong: A packet generator blasts UDP packets from a packet generator to a certain {src,dst}IP/port, so a dedicated ksoftirq will be busy handling the packets at a certain core. A simple UDP test program that simply does recvfrom/sendto is running at the host end. Throughput in pps and RTT latency is measured at the packet generator. /proc/sys/net/core/busy_read is set (20). Min Max Avg (usec) 1. Blocking 2-cores: 490Kpps 1218.192 1335.427 1271.083 2. Blocking, 1-core: 155Kpps 1327.195 17294.855 4761.367 3. Non-blocking, 2-cores: 475Kpps 1221.197 1330.465 1270.740 4. Non-blocking, 1-core: 3Kpps 29006.482 37260.465 33128.367 5. Non-blocking, prefer busy-poll, 1-core: 420Kpps 1202.535 5494.052 4885.443 Scenario 2 and 5 shows when the new option should be used. Throughput go from 155 to 420Kpps, average latency are similar, but the tail latencies are much better for the latter. Performance XDP sockets: Again, a packet generator blasts UDP packets from a packet generator to a certain {src,dst}IP/port. Today, running XDP sockets sample on the same core as the softirq handling, performance tanks mainly because we do not yield to user-space when the XDP socket Rx queue is full. # taskset -c 5 ./xdpsock -i ens785f1 -q 5 -n 1 -r Rx: 64Kpps # # preferred busy-polling, budget 8 # taskset -c 5 ./xdpsock -i ens785f1 -q 5 -n 1 -r -B -b 8 Rx 9.9Mpps # # preferred busy-polling, budget 64 # taskset -c 5 ./xdpsock -i ens785f1 -q 5 -n 1 -r -B -b 64 Rx: 19.3Mpps # # preferred busy-polling, budget 256 # taskset -c 5 ./xdpsock -i ens785f1 -q 5 -n 1 -r -B -b 256 Rx: 21.4Mpps # # preferred busy-polling, budget 512 # taskset -c 5 ./xdpsock -i ens785f1 -q 5 -n 1 -r -B -b 512 Rx: 21.7Mpps Compared to the two-core case: # taskset -c 4 ./xdpsock -i ens785f1 -q 20 -n 1 -r Rx: 20.7Mpps We're getting better single-core performance than two, for this naïve drop scenario. Performance netperf UDP_RR: Note that netperf UDP_RR is not a heavy traffic tests, and preferred busy-polling is not typically something we want to use here. $ echo 20 | sudo tee /proc/sys/net/core/busy_read $ netperf -H 192.168.1.1 -l 30 -t UDP_RR -v 2 -- \ -o min_latency,mean_latency,max_latency,stddev_latency,transaction_rate busy-polling blocking sockets: 12,13.33,224,0.63,74731.177 I hacked netperf to use non-blocking sockets and re-ran: busy-polling non-blocking sockets: 12,13.46,218,0.72,73991.172 prefer busy-polling non-blocking sockets: 12,13.62,221,0.59,73138.448 Using the preferred busy-polling mode does not impact performance. The above tests was done for the 'ice' driver. Thanks to Jakub for suggesting this busy-polling addition [1], and Eric for all input/review! Changes: rfc-v1 [2] -> rfc-v2: * Changed name from bias to prefer. * Base the work on Eric's/Luigi's defer irq/gro timeout work. * Proper GRO flushing. * Build issues for some XDP drivers. rfc-v2 [3] -> v1: * Fixed broken qlogic build. * Do not trigger an IPI (XDP socket wakeup) when busy-polling is enabled. v1 [4] -> v2: * Added napi_id to socionext driver, and added Ilias Acked-by:. (Ilias) * Added a samples patch to improve busy-polling for xdpsock/l2fwd. * Correctly mark atomic operations with {WRITE,READ}_ONCE, to make KCSAN and the code readers happy. (Eric) * Check NAPI budget not to exceed U16_MAX. (Eric) * Added kdoc. v2 [5] -> v3: * Collected Acked-by. * Check NAPI disable prior prefer busy-polling. (Jakub) * Added napi_id registration for virtio-net. (Michael) * Added napi_id registration for veth. v3 [6] -> v4: * Collected Acked-by/Reviewed-by. [1] https://lore.kernel.org/netdev/20200925120652.10b8d7c5@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com/ [2] https://lore.kernel.org/bpf/20201028133437.212503-1-bjorn.topel@gmail.com/ [3] https://lore.kernel.org/bpf/20201105102812.152836-1-bjorn.topel@gmail.com/ [4] https://lore.kernel.org/bpf/20201112114041.131998-1-bjorn.topel@gmail.com/ [5] https://lore.kernel.org/bpf/20201116110416.10719-1-bjorn.topel@gmail.com/ [6] https://lore.kernel.org/bpf/20201119083024.119566-1-bjorn.topel@gmail.com/ ==================== Signed-off-by: Daniel Borkmann commit 41bf900fe2a0cd56bdc3639ac73d509d52826149 Author: Björn Töpel Date: Mon Nov 30 19:52:05 2020 +0100 samples/bpf: Add option to set the busy-poll budget Support for the SO_BUSY_POLL_BUDGET setsockopt, via the batching option ('b'). Signed-off-by: Björn Töpel Signed-off-by: Daniel Borkmann Acked-by: Magnus Karlsson Link: https://lore.kernel.org/bpf/20201130185205.196029-11-bjorn.topel@gmail.com commit b35fc1482ceb2f36bedd1587c3cfea3167baa2f1 Author: Björn Töpel Date: Mon Nov 30 19:52:04 2020 +0100 samples/bpf: Add busy-poll support to xdpsock Add a new option to xdpsock, 'B', for busy-polling. This option will also set the batching size, 'b' option, to the busy-poll budget. Signed-off-by: Björn Töpel Signed-off-by: Daniel Borkmann Acked-by: Magnus Karlsson Link: https://lore.kernel.org/bpf/20201130185205.196029-10-bjorn.topel@gmail.com commit 284cbc61f851bf86326b28acfe6d161691d4a4ed Author: Björn Töpel Date: Mon Nov 30 19:52:03 2020 +0100 samples/bpf: Use recvfrom() in xdpsock/l2fwd Start using recvfrom() the l2fwd scenario, instead of poll() which is more expensive and need additional knobs for busy-polling. Signed-off-by: Björn Töpel Signed-off-by: Daniel Borkmann Acked-by: Magnus Karlsson Link: https://lore.kernel.org/bpf/20201130185205.196029-9-bjorn.topel@gmail.com commit f2d2728220ac6482c69c5f018ec09bafd688e7d1 Author: Björn Töpel Date: Mon Nov 30 19:52:02 2020 +0100 samples/bpf: Use recvfrom() in xdpsock/rxdrop Start using recvfrom() the rxdrop scenario. Signed-off-by: Björn Töpel Signed-off-by: Daniel Borkmann Acked-by: Magnus Karlsson Link: https://lore.kernel.org/bpf/20201130185205.196029-8-bjorn.topel@gmail.com commit b02e5a0ebb172c8276cea3151942aac681f7a4a6 Author: Björn Töpel Date: Mon Nov 30 19:52:01 2020 +0100 xsk: Propagate napi_id to XDP socket Rx path Add napi_id to the xdp_rxq_info structure, and make sure the XDP socket pick up the napi_id in the Rx path. The napi_id is used to find the corresponding NAPI structure for socket busy polling. Signed-off-by: Björn Töpel Signed-off-by: Daniel Borkmann Acked-by: Ilias Apalodimas Acked-by: Michael S. Tsirkin Acked-by: Tariq Toukan Link: https://lore.kernel.org/bpf/20201130185205.196029-7-bjorn.topel@gmail.com commit a0731952d9cddc9c11a8352922f449e6ab2f7537 Author: Björn Töpel Date: Mon Nov 30 19:52:00 2020 +0100 xsk: Add busy-poll support for {recv,send}msg() Wire-up XDP socket busy-poll support for recvmsg() and sendmsg(). If the XDP socket prefers busy-polling, make sure that no wakeup/IPI is performed. Signed-off-by: Björn Töpel Signed-off-by: Daniel Borkmann Acked-by: Magnus Karlsson Link: https://lore.kernel.org/bpf/20201130185205.196029-6-bjorn.topel@gmail.com commit e392081837283fbe5df1837fd85012ae5bfae098 Author: Björn Töpel Date: Mon Nov 30 19:51:59 2020 +0100 xsk: Check need wakeup flag in sendmsg() Add a check for need wake up in sendmsg(), so that if a user calls sendmsg() when no wakeup is needed, do not trigger a wakeup. To simplify the need wakeup check in the syscall, unconditionally enable the need wakeup flag for Tx. This has a side-effect for poll(); If poll() is called for a socket without enabled need wakeup, a Tx wakeup is unconditionally performed. The wakeup matrix for AF_XDP now looks like: need wakeup | poll() | sendmsg() | recvmsg() ------------+--------------+-------------+------------ disabled | wake Tx | wake Tx | nop enabled | check flag; | check flag; | check flag; | wake Tx/Rx | wake Tx | wake Rx Signed-off-by: Björn Töpel Signed-off-by: Daniel Borkmann Acked-by: Magnus Karlsson Link: https://lore.kernel.org/bpf/20201130185205.196029-5-bjorn.topel@gmail.com commit 45a86681844e375bef6f6add272ccc309bb6a08d Author: Björn Töpel Date: Mon Nov 30 19:51:58 2020 +0100 xsk: Add support for recvmsg() Add support for non-blocking recvmsg() to XDP sockets. Previously, only sendmsg() was supported by XDP socket. Now, for symmetry and the upcoming busy-polling support, recvmsg() is added. Signed-off-by: Björn Töpel Signed-off-by: Daniel Borkmann Acked-by: Magnus Karlsson Link: https://lore.kernel.org/bpf/20201130185205.196029-4-bjorn.topel@gmail.com commit 7c951cafc0cb2e575f1d58677b95ac387ac0a5bd Author: Björn Töpel Date: Mon Nov 30 19:51:57 2020 +0100 net: Add SO_BUSY_POLL_BUDGET socket option This option lets a user set a per socket NAPI budget for busy-polling. If the options is not set, it will use the default of 8. Signed-off-by: Björn Töpel Signed-off-by: Daniel Borkmann Reviewed-by: Jakub Kicinski Link: https://lore.kernel.org/bpf/20201130185205.196029-3-bjorn.topel@gmail.com commit 7fd3253a7de6a317a0683f83739479fb880bffc8 Author: Björn Töpel Date: Mon Nov 30 19:51:56 2020 +0100 net: Introduce preferred busy-polling The existing busy-polling mode, enabled by the SO_BUSY_POLL socket option or system-wide using the /proc/sys/net/core/busy_read knob, is an opportunistic. That means that if the NAPI context is not scheduled, it will poll it. If, after busy-polling, the budget is exceeded the busy-polling logic will schedule the NAPI onto the regular softirq handling. One implication of the behavior above is that a busy/heavy loaded NAPI context will never enter/allow for busy-polling. Some applications prefer that most NAPI processing would be done by busy-polling. This series adds a new socket option, SO_PREFER_BUSY_POLL, that works in concert with the napi_defer_hard_irqs and gro_flush_timeout knobs. The napi_defer_hard_irqs and gro_flush_timeout knobs were introduced in commit 6f8b12d661d0 ("net: napi: add hard irqs deferral feature"), and allows for a user to defer interrupts to be enabled and instead schedule the NAPI context from a watchdog timer. When a user enables the SO_PREFER_BUSY_POLL, again with the other knobs enabled, and the NAPI context is being processed by a softirq, the softirq NAPI processing will exit early to allow the busy-polling to be performed. If the application stops performing busy-polling via a system call, the watchdog timer defined by gro_flush_timeout will timeout, and regular softirq handling will resume. In summary; Heavy traffic applications that prefer busy-polling over softirq processing should use this option. Example usage: $ echo 2 | sudo tee /sys/class/net/ens785f1/napi_defer_hard_irqs $ echo 200000 | sudo tee /sys/class/net/ens785f1/gro_flush_timeout Note that the timeout should be larger than the userspace processing window, otherwise the watchdog will timeout and fall back to regular softirq processing. Enable the SO_BUSY_POLL/SO_PREFER_BUSY_POLL options on your socket. Signed-off-by: Björn Töpel Signed-off-by: Daniel Borkmann Reviewed-by: Jakub Kicinski Link: https://lore.kernel.org/bpf/20201130185205.196029-2-bjorn.topel@gmail.com commit 48332ff295878b3f4268782f25894dfa44b1f6c1 Merge: 4d063e646b4bf bca5b0658020b Author: Jens Axboe Date: Mon Nov 30 15:52:19 2020 -0700 Merge branch 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into for-5.11/drivers Pull MD changes from Song: "Summary: 1. Fix race condition in md_ioctl(), by Dae R. Jeong; 2. Initialize read_slot properly for raid10, by Kevin Vigor; 3. Code cleanup, by Pankaj Gupta; 4. md-cluster resync/reshape fix, by Zhao Heming." * 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: md/cluster: fix deadlock when node is doing resync job md/cluster: block reshape with remote resync job md: use current request time as base for ktime comparisons md: add comments in md_flush_request() md: improve variable names in md_flush_request() md/raid10: initialize r10_bio->read_slot before use. md: fix a warning caused by a race between concurrent md_ioctl()s commit 5a20d073ec54a72d9a732fa44bfe14954eb6332f Author: Lei Chen Date: Mon Nov 30 10:20:52 2020 +0800 block: wbt: Remove unnecessary invoking of wbt_update_limits in wbt_init It's unnecessary to call wbt_update_limits explicitly within wbt_init, because it will be called in the following function wbt_queue_depth_changed. Signed-off-by: Lei Chen Signed-off-by: Jens Axboe commit 854055c0cf30d732b3514ce7956976f60496b1a1 Author: KP Singh Date: Thu Nov 26 18:49:46 2020 +0000 selftests/bpf: Fix flavored variants of test_ima Flavored variants of test_progs (e.g. test_progs-no_alu32) change their working directory to the corresponding subdirectory (e.g. no_alu32). Since the setup script required by test_ima (ima_setup.sh) is not mentioned in the dependencies, it does not get copied to these subdirectories and causes flavored variants of test_ima to fail. Adding the script to TRUNNER_EXTRA_FILES ensures that the file is also copied to the subdirectories for the flavored variants of test_progs. Fixes: 34b82d3ac105 ("bpf: Add a selftest for bpf_ima_inode_hash") Reported-by: Yonghong Song Suggested-by: Yonghong Song Signed-off-by: KP Singh Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20201126184946.1708213-1-kpsingh@chromium.org commit 170f4869e66275f498ae4736106fb54c0fdcd036 Author: Steven Rostedt (VMware) Date: Mon Nov 30 16:38:41 2020 -0500 ktest.pl: Fix the logic for truncating the size of the log file for email The logic for truncating the log file for emailing based on the MAIL_MAX_SIZE option is confusing and incorrect. Simplify it and have the tail of the log file truncated to the max size specified in the config. Cc: stable@vger.kernel.org Fixes: 855d8abd2e8ff ("ktest.pl: Change the logic to control the size of the log file emailed") Signed-off-by: Steven Rostedt (VMware) commit 8cd6bc0359deebd8500e6de95899a8a78d3ec4ba Author: Steven Rostedt (VMware) Date: Mon Nov 30 16:32:55 2020 -0500 ktest.pl: If size of log is too big to email, email error message If the size of the error log is too big to send via email, and the sending fails, it wont email any result. This can be confusing for the user who is waiting for an email on the completion of the tests. If it fails to send email, then try again without the log file stating that it failed to send an email. Obviously this will not be of use if the sending of email failed for some other reasons, but it will at least give the user some information when it fails for the most common reason. Cc: stable@vger.kernel.org Fixes: c2d84ddb338c8 ("ktest.pl: Add MAIL_COMMAND option to define how to send email") Signed-off-by: Steven Rostedt (VMware) commit eeffc0fbd022422777b91cdfa0e12ba2bcd6c5e7 Author: Jagan Teki Date: Fri Oct 23 23:48:13 2020 +0530 arm64: defconfig: Enable RTC_DRV_HYM8563 RTC HYM8563 used in the ARM64 Rockchip SoC's SDIO power sequence enablement. Enable it as module. Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20201023181814.220974-1-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit 43bc3ed736397e812f14c0eeca27e4fe1ba0577e Author: Nícolas F. R. A. Prado Date: Mon Nov 23 12:13:46 2020 +0000 docs: dt: Use full path to enable cross-reference Use full path to reference writing-schema.rst so that it becomes a cross-reference. Signed-off-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20201123121333.59274-1-nfraprado@protonmail.com Signed-off-by: Jonathan Corbet commit f3ed003e64fe7faecbe4c34bd2a1f5571a23f05a Author: Andy Shevchenko Date: Mon Oct 26 18:59:27 2020 +0200 kunit: Introduce get_file_path() helper Helper allows to derive file names depending on --build_dir argument. Signed-off-by: Andy Shevchenko Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins Signed-off-by: Shuah Khan commit 5cfc822f3e77b0477e6602d399116130317f537a Author: Chuck Lever Date: Wed Nov 4 11:12:18 2020 -0500 NFSD: Remove macros that are no longer used Now that all the NFSv4 decoder functions have been converted to make direct calls to the xdr helpers, remove the unused C macros. Signed-off-by: Chuck Lever commit d9b74bdac6f24afc3101b6a5b6f59842610c9c94 Author: Chuck Lever Date: Wed Nov 4 11:07:06 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_compound() And clean-up: Now that we have removed the DECODE_TAIL macro from nfsd4_decode_compound(), we observe that there's no benefit for nfsd4_decode_compound() to return nfs_ok or nfserr_bad_xdr only to have its sole caller convert those values to one or zero, respectively. Have nfsd4_decode_compound() return 1/0 instead. Signed-off-by: Chuck Lever commit 3a237b4af5b7b0e77588e120554077cab3341943 Author: Chuck Lever Date: Sun Nov 22 12:49:52 2020 -0500 NFSD: Make nfsd4_ops::opnum a u32 Avoid passing a "pointer to int" argument to xdr_stream_decode_u32. Signed-off-by: Chuck Lever commit 2212036cadf4da3c4b0e4bd2a9a8c3d78617ab4f Author: Chuck Lever Date: Wed Nov 4 11:04:02 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_listxattrs() Signed-off-by: Chuck Lever commit 403366a7e8e2930002157525cd44add7fa01bca9 Author: Chuck Lever Date: Wed Nov 4 10:59:57 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_setxattr() Signed-off-by: Chuck Lever commit 830c71502ae0ae1677ac6c08ffbcf85a6e7b2937 Author: Chuck Lever Date: Wed Nov 4 10:56:52 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_xattr_name() Signed-off-by: Chuck Lever commit 3dfd0b0e15671e2b4047ccb9222432f0b2d930be Author: Chuck Lever Date: Wed Nov 4 10:46:46 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_clone() Signed-off-by: Chuck Lever commit 9d32b412fe0a6186cc57789d218e8f8299454ae2 Author: Chuck Lever Date: Wed Nov 4 10:54:47 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_seek() Signed-off-by: Chuck Lever commit 2846bb0525a73e00b3566fda535ea6a5879e2971 Author: Chuck Lever Date: Sat Nov 21 14:21:25 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_offload_status() Signed-off-by: Chuck Lever commit f9a953fb369bbd2135ccead3393ec1ef66544471 Author: Chuck Lever Date: Sat Nov 21 14:19:24 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_copy_notify() Signed-off-by: Chuck Lever commit e8febea7190bcbd1e608093acb67f2a5009556aa Author: Chuck Lever Date: Wed Nov 4 10:49:37 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_copy() Signed-off-by: Chuck Lever commit f49e4b4d58cc835d8bd0cc9663f7b9c5497e0e7e Author: Chuck Lever Date: Mon Nov 16 18:05:06 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_nl4_server() Signed-off-by: Chuck Lever commit 6aef27aaeae7611f98af08205acc79f5a8f3aa59 Author: Chuck Lever Date: Wed Nov 4 10:44:05 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_fallocate() Signed-off-by: Chuck Lever commit 0d6467844d437e07db1e76d96176b1a55401018c Author: Chuck Lever Date: Tue Nov 3 15:02:11 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_reclaim_complete() Signed-off-by: Chuck Lever commit c95f2ec3490586cbb33badc8f4c82d6aa4955078 Author: Chuck Lever Date: Wed Nov 4 15:15:09 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_destroy_clientid() Signed-off-by: Chuck Lever commit b7a0c8f6e741bf9dee0d24e69d3ce51fa4ccce78 Author: Chuck Lever Date: Tue Nov 3 14:57:44 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_test_stateid() Signed-off-by: Chuck Lever commit cf907b11326d9360877d6c6ea8f75e1b29f39f2f Author: Chuck Lever Date: Tue Nov 3 14:55:19 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_sequence() Signed-off-by: Chuck Lever commit 53d70873e37c09a582167ed73d1858e3a2af0157 Author: Chuck Lever Date: Tue Nov 3 14:33:12 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_secinfo_no_name() Signed-off-by: Chuck Lever commit 645fcad371420913c30e9aca80fc0a38f3acf432 Author: Chuck Lever Date: Wed Nov 4 10:42:25 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_layoutreturn() Signed-off-by: Chuck Lever commit c8e88e3aa73889421461f878cd569ef84f231ceb Author: Chuck Lever Date: Tue Nov 3 15:06:04 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_layoutget() Signed-off-by: Chuck Lever commit 5185980d8a23001c2317c290129ab7ab20067e20 Author: Chuck Lever Date: Wed Nov 4 10:40:07 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_layoutcommit() Signed-off-by: Chuck Lever commit 044959715f370b24870c95df3940add8710c5a29 Author: Chuck Lever Date: Tue Nov 3 15:03:50 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_getdeviceinfo() Signed-off-by: Chuck Lever commit aec387d5909304810d899f7d90ae57df33f3a75c Author: Chuck Lever Date: Sun Nov 1 13:38:27 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_free_stateid() Signed-off-by: Chuck Lever commit 94e254af1f873b4b551db4c4549294f2c4d385ef Author: Chuck Lever Date: Wed Nov 4 13:50:55 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_destroy_session() Signed-off-by: Chuck Lever commit 81243e3fe37ed547fc4ed8aab1cec2865540bb18 Author: Chuck Lever Date: Tue Nov 3 14:52:44 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_create_session() Signed-off-by: Chuck Lever commit 3a3f1fbacb0960b628e5a9f07c78287312f7a99d Author: Chuck Lever Date: Mon Nov 16 15:35:05 2020 -0500 NFSD: Add a helper to decode channel_attrs4 De-duplicate some code. Signed-off-by: Chuck Lever commit 10ff84228197f47401833495ba19a50131323b4a Author: Chuck Lever Date: Mon Nov 16 15:21:55 2020 -0500 NFSD: Add a helper to decode nfs_impl_id4 Refactor for clarity. Signed-off-by: Chuck Lever commit 523ec6ed6fb80fd1537d748a06bffd060a8b3235 Author: Chuck Lever Date: Mon Nov 2 15:19:12 2020 -0500 NFSD: Add a helper to decode state_protect4_a Refactor for clarity. Also, remove a stale comment. Commit ed94164398c9 ("nfsd: implement machine credential support for some operations") added support for SP4_MACH_CRED, so state_protect_a is no longer completely ignored. Signed-off-by: Chuck Lever commit 547bfeb4cd8d491aabbd656d5a6f410cb4249b4e Author: Chuck Lever Date: Tue Nov 3 11:17:50 2020 -0500 NFSD: Add a separate decoder for ssv_sp_parms Refactor for clarity. Signed-off-by: Chuck Lever commit 2548aa784d760567c2a77cbd8b7c55b211167c37 Author: Chuck Lever Date: Tue Nov 3 11:13:00 2020 -0500 NFSD: Add a separate decoder to handle state_protect_ops Refactor for clarity and de-duplication of code. Signed-off-by: Chuck Lever commit 571e0451c4de0a545960ffaea16d969931afc563 Author: Chuck Lever Date: Tue Nov 3 13:16:23 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_bind_conn_to_session() A dedicated sessionid4 decoder is introduced that will be used by other operation decoders in subsequent patches. Signed-off-by: Chuck Lever commit 0f81d96098f8eb707afe2f8d5c3fe0f9316ef5ce Author: Chuck Lever Date: Tue Nov 3 13:14:35 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_backchannel_ctl() Signed-off-by: Chuck Lever commit 1a99440807bfc66597aaa2e0f0213c319b023e34 Author: Chuck Lever Date: Tue Nov 3 13:09:34 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_cb_sec() Signed-off-by: Chuck Lever commit a4a80c15ca4dd998ab5cbe87bd856c626a318a80 Author: Chuck Lever Date: Wed Nov 4 13:42:25 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_release_lockowner() Signed-off-by: Chuck Lever commit 244e2befcba80f42c65293b6c56282bb78f9f417 Author: Chuck Lever Date: Tue Nov 3 14:44:28 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_write() Signed-off-by: Chuck Lever commit 67cd453eeda86be90f83a0f4798f33832cf2d98c Author: Chuck Lever Date: Tue Nov 3 14:40:32 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_verify() Signed-off-by: Chuck Lever commit d1ca55149d67e5896f89a30053f5d83c002ac10e Author: Chuck Lever Date: Wed Nov 4 15:12:33 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_setclientid_confirm() Signed-off-by: Chuck Lever commit 92fa6c08c251d52d0d7b46066ecf87b96a0c4b8f Author: Chuck Lever Date: Tue Nov 3 14:35:02 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_setclientid() Signed-off-by: Chuck Lever commit 44592fe9479d8d4b88594365ab825f7b07afdf7c Author: Chuck Lever Date: Sat Nov 21 14:14:59 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_setattr() Signed-off-by: Chuck Lever commit d0abdae5191a916d767164f6fc6c0e2e814a20a7 Author: Chuck Lever Date: Wed Nov 4 15:09:42 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_secinfo() Signed-off-by: Chuck Lever commit d12f90458dc8c11734ba44ec88f109bf8de86ff0 Author: Chuck Lever Date: Wed Nov 4 15:08:50 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_renew() Signed-off-by: Chuck Lever commit ba881a0a5342b3aaf83958901ebe3fe752eaab46 Author: Chuck Lever Date: Wed Nov 4 15:05:58 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_rename() Signed-off-by: Chuck Lever commit b7f5fbf219aecda98e32de305551e445f9438899 Author: Chuck Lever Date: Wed Nov 4 15:04:36 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_remove() Signed-off-by: Chuck Lever commit 0dfaf2a371436860ace6af889e6cd8410ee63164 Author: Chuck Lever Date: Tue Nov 3 14:30:59 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_readdir() Signed-off-by: Chuck Lever commit 3909c3bc604688503e31ddceb429dc156c4720c1 Author: Chuck Lever Date: Tue Nov 3 14:28:24 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_read() Signed-off-by: Chuck Lever commit a73bed98413b1d9eb4466f776a56d2fde8b3b2c9 Author: Chuck Lever Date: Tue Nov 3 14:23:02 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_putfh() Signed-off-by: Chuck Lever commit dca71651f097ea608945d7a66bf62761a630de9a Author: Chuck Lever Date: Tue Nov 3 14:21:01 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_open_downgrade() Signed-off-by: Chuck Lever commit 06bee693a1f1cb774b91000f05a6e183c257d8e9 Author: Chuck Lever Date: Tue Nov 3 14:18:57 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_open_confirm() Signed-off-by: Chuck Lever commit 61e5e0b3ec713d1365008c8af3fe5fdd262e2a60 Author: Chuck Lever Date: Sun Nov 1 12:04:06 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_open() Signed-off-by: Chuck Lever commit 1708e50b0145f393acbec9e319bdf0e33f765d25 Author: Chuck Lever Date: Mon Nov 16 17:45:04 2020 -0500 NFSD: Add helper to decode OPEN's open_claim4 argument Refactor for clarity. Note that op_fname is the only instance of an NFSv4 filename stored in a struct xdr_netobj. Convert it to a u32/char * pair so that the new nfsd4_decode_filename() helper can be used. Signed-off-by: Chuck Lever commit b07bebd9eb9842e2d0dea87efeb92884556e55b0 Author: Chuck Lever Date: Mon Nov 16 17:56:17 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_share_deny() Signed-off-by: Chuck Lever commit 9aa62f5199749b274454b6d7d914c9b2a5e77031 Author: Chuck Lever Date: Mon Nov 16 17:54:48 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_share_access() Signed-off-by: Chuck Lever commit e6ec04b27bfb4869c0e35fbcf24333d379f101d5 Author: Chuck Lever Date: Mon Nov 16 17:41:21 2020 -0500 NFSD: Add helper to decode OPEN's openflag4 argument Refactor for clarity. Signed-off-by: Chuck Lever commit bf33bab3c4182cdd795983f14de5606e82fab377 Author: Chuck Lever Date: Mon Nov 16 17:37:42 2020 -0500 NFSD: Add helper to decode OPEN's createhow4 argument Refactor for clarity. Signed-off-by: Chuck Lever commit 796dd1c6b680959ac968b52aa507911b288b1749 Author: Chuck Lever Date: Mon Nov 16 17:34:01 2020 -0500 NFSD: Add helper to decode NFSv4 verifiers This helper will be used to simplify decoders in subsequent patches. Signed-off-by: Chuck Lever commit 3d5877e8e03f60d7cc804d7b230ff9c00c9c07bd Author: Chuck Lever Date: Wed Nov 4 15:02:40 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_lookup() Signed-off-by: Chuck Lever commit ca9cf9fc27f8f722e9eb2763173ba01f6ac3dad1 Author: Chuck Lever Date: Tue Nov 3 13:33:28 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_locku() Signed-off-by: Chuck Lever commit 0a146f04aa0fa7a57aaed3913d1c2732b3853f31 Author: Chuck Lever Date: Tue Nov 3 13:31:44 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_lockt() Signed-off-by: Chuck Lever commit 7c59deed5cd2e1cfc6cbecf06f4584ac53755f53 Author: Chuck Lever Date: Tue Nov 3 13:29:27 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_lock() Signed-off-by: Chuck Lever commit 8918cc0d2b72db9997390626010b182c4500d749 Author: Chuck Lever Date: Mon Nov 16 17:16:52 2020 -0500 NFSD: Add helper for decoding locker4 Refactor for clarity. Signed-off-by: Chuck Lever commit 144e82694092ff80b5e64749d6822cd8947587f2 Author: Chuck Lever Date: Mon Nov 16 17:25:02 2020 -0500 NFSD: Add helpers to decode a clientid4 and an NFSv4 state owner These helpers will also be used to simplify decoders in subsequent patches. Signed-off-by: Chuck Lever commit 5dcbfabb676b2b6d97767209cf707eb463ca232a Author: Chuck Lever Date: Wed Nov 4 11:41:55 2020 -0500 NFSD: Relocate nfsd4_decode_opaque() Enable nfsd4_decode_opaque() to be used in more decoders, and replace the READ* macros in nfsd4_decode_opaque(). Signed-off-by: Chuck Lever commit 5c505d128691c70991b766dd6a3faf49fa59ecfb Author: Chuck Lever Date: Wed Nov 4 15:01:24 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_link() Signed-off-by: Chuck Lever commit f759eff260f1f0b0f56531517762f27ee3233506 Author: Chuck Lever Date: Thu Nov 19 14:40:20 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_getattr() Signed-off-by: Chuck Lever commit 95e6482cedfc0785b85db49b72a05323bbf41750 Author: Chuck Lever Date: Sat Nov 21 14:11:58 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_delegreturn() Signed-off-by: Chuck Lever commit 000dfa18b3df9c62df5f768f9187cf1a94ded71d Author: Chuck Lever Date: Tue Nov 3 13:24:10 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_create() A dedicated decoder for component4 is introduced here, which will be used by other operation decoders in subsequent patches. Signed-off-by: Chuck Lever commit d1c263a031e876ac3ca5223c728e4d98ed50b3c0 Author: Chuck Lever Date: Tue Nov 3 12:56:05 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_fattr() Let's be more careful to avoid overrunning the memory that backs the bitmap array. This requires updating the synopsis of nfsd4_decode_fattr(). Bruce points out that a server needs to be careful to return nfs_ok when a client presents bitmap bits the server doesn't support. This includes bits in bitmap words the server might not yet support. The current READ* based implementation is good about that, but that requirement hasn't been documented. Signed-off-by: Chuck Lever commit 66f0476c704c86d44aa9da19d4753df66f2dbc96 Author: Chuck Lever Date: Thu Nov 19 14:07:43 2020 -0500 NFSD: Replace READ* macros that decode the fattr4 umask attribute Signed-off-by: Chuck Lever commit dabe91828f92cd493e9e75efbc10f9878d2a73fe Author: Chuck Lever Date: Thu Nov 19 14:05:51 2020 -0500 NFSD: Replace READ* macros that decode the fattr4 security label attribute Signed-off-by: Chuck Lever commit 1c3eff7ea4a98c642134ee493001ae13b79ff38c Author: Chuck Lever Date: Thu Nov 19 14:01:08 2020 -0500 NFSD: Replace READ* macros that decode the fattr4 time_set attributes Signed-off-by: Chuck Lever commit 393c31dd27f83adb06b07a1b5f0a5b8966a0f01e Author: Chuck Lever Date: Thu Nov 19 13:58:18 2020 -0500 NFSD: Replace READ* macros that decode the fattr4 owner_group attribute Signed-off-by: Chuck Lever commit 9853a5ac9be381917e9be0b4133cd4ac5a7ad875 Author: Chuck Lever Date: Thu Nov 19 13:56:42 2020 -0500 NFSD: Replace READ* macros that decode the fattr4 owner attribute Signed-off-by: Chuck Lever commit 1c8f0ad7dd35fd12307904036c7c839f77b6e3f9 Author: Chuck Lever Date: Thu Nov 19 13:54:26 2020 -0500 NFSD: Replace READ* macros that decode the fattr4 mode attribute Signed-off-by: Chuck Lever commit c941a96823cf52e742606b486b81ab346bf111c9 Author: Chuck Lever Date: Thu Nov 19 13:02:54 2020 -0500 NFSD: Replace READ* macros that decode the fattr4 acl attribute Refactor for clarity and to move infrequently-used code out of line. Signed-off-by: Chuck Lever commit 2ac1b9b2afbbacf597dbec722b23b6be62e4e41e Author: Chuck Lever Date: Thu Nov 19 13:47:16 2020 -0500 NFSD: Replace READ* macros that decode the fattr4 size attribute Signed-off-by: Chuck Lever commit 081d53fe0b43c47c36d1832b759bf14edde9cdbb Author: Chuck Lever Date: Thu Nov 19 13:09:13 2020 -0500 NFSD: Change the way the expected length of a fattr4 is checked Because the fattr4 is now managed in an xdr_stream, all that is needed is to store the initial position of the stream before decoding the attribute list. Then the actual length of the list is computed using the final stream position, after decoding is complete. No behavior change is expected. Signed-off-by: Chuck Lever commit cbd9abb3706e96563b36af67595707a7054ab693 Author: Chuck Lever Date: Tue Nov 3 13:19:51 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_commit() Signed-off-by: Chuck Lever commit d3d2f38154571e70d5806b5c5264bf61c101ea15 Author: Chuck Lever Date: Tue Nov 3 13:18:23 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_close() Signed-off-by: Chuck Lever commit d169a6a9e5fd7f9e4b74e5e5d2e5a4fd0f84ef05 Author: Chuck Lever Date: Tue Nov 3 13:12:27 2020 -0500 NFSD: Replace READ* macros in nfsd4_decode_access() Signed-off-by: Chuck Lever commit c1346a1216ab5cb04a265380ac9035d91b16b6d5 Author: Chuck Lever Date: Tue Nov 3 11:54:23 2020 -0500 NFSD: Replace the internals of the READ_BUF() macro Convert the READ_BUF macro in nfs4xdr.c from open code to instead use the new xdr_stream-style decoders already in use by the encode side (and by the in-kernel NFS client implementation). Once this conversion is done, each individual NFSv4 argument decoder can be independently cleaned up to replace these macros with C code. Signed-off-by: Chuck Lever commit 08281341be8ebc97ee47999812bcf411942baa1e Author: Chuck Lever Date: Sat Nov 21 11:36:42 2020 -0500 NFSD: Add tracepoints in nfsd4_decode/encode_compound() For troubleshooting purposes, record failures to decode NFSv4 operation arguments and encode operation results. trace_nfsd_compound_decode_err() replaces the dprintk() call sites that are embedded in READ_* macros that are about to be removed. Signed-off-by: Chuck Lever commit 0dfdad1c1d1b77b9b085f4da390464dd0ac5647a Author: Chuck Lever Date: Mon Oct 19 13:00:29 2020 -0400 NFSD: Add tracepoints in nfsd_dispatch() For troubleshooting purposes, record GARBAGE_ARGS and CANT_ENCODE failures. Signed-off-by: Chuck Lever commit 788f7183fba86b46074c16e7d57ea09302badff4 Author: Chuck Lever Date: Thu Nov 5 14:48:29 2020 -0500 NFSD: Add common helpers to decode void args and encode void results Start off the conversion to xdr_stream by de-duplicating the functions that decode void arguments and encode void results. Signed-off-by: Chuck Lever commit 5191955d6fc65e6d4efe8f4f10a6028298f57281 Author: Chuck Lever Date: Thu Nov 5 11:19:42 2020 -0500 SUNRPC: Prepare for xdr_stream-style decoding on the server-side A "permanent" struct xdr_stream is allocated in struct svc_rqst so that it is usable by all server-side decoders. A per-rqst scratch buffer is also allocated to handle decoding XDR data items that cross page boundaries. To demonstrate how it will be used, add the first call site for the new svcxdr_init_decode() API. As an additional part of the overall conversion, add symbolic constants for successful and failed XDR operations. Returning "0" is overloaded. Sometimes it means something failed, but sometimes it means success. To make it more clear when XDR decoding functions succeed or fail, introduce symbolic constants. Signed-off-by: Chuck Lever commit 0ae4c3e8a64ace1b8d7de033b0751afe43024416 Author: Chuck Lever Date: Wed Nov 11 15:52:47 2020 -0500 SUNRPC: Add xdr_set_scratch_page() and xdr_reset_scratch_buffer() Clean up: De-duplicate some frequently-used code. Signed-off-by: Chuck Lever commit 231307df246eb29f30092836524ebb1fcb8f5b25 Author: Huang Guobin Date: Wed Nov 25 03:39:33 2020 -0500 nfsd: Fix error return code in nfsd_file_cache_init() Fix to return PTR_ERR() error code from the error handling case instead of 0 in function nfsd_file_cache_init(), as done elsewhere in this function. Fixes: 65294c1f2c5e7("nfsd: add a new struct file caching facility to nfsd") Signed-off-by: Huang Guobin Signed-off-by: Chuck Lever commit bc54a5cda97917155b8da0d99afe1dc0ed0b30db Author: Eric W. Biederman Date: Mon Nov 30 11:04:10 2020 -0600 signal/parisc: Remove parisc specific definition of __ARCH_UAPI_SA_FLAGS Randy Dunlap wrote: > On 11/27/20 10:43 AM, Randy Dunlap wrote: > > > on parisc, _SA_SIGGFAULT is undefined and causing build errors. > > > > commit 23acdc76f1798b090bb9dcc90671cd29d929834e > > Author: Peter Collingbourne > > Date: Thu Nov 12 18:53:34 2020 -0800 > > > > signal: clear non-uapi flag bits when passing/returning sa_flags > > > > > > > > _SA_SIGGFAULT is not used or defined anywhere else in the > > kernel source tree. > > > Here is the build error (although it should be obvious): > > ../kernel/signal.c: In function 'do_sigaction': > ../arch/parisc/include/asm/signal.h:24:30: error: '_SA_SIGGFAULT' undeclared (first use in this function) > 24 | #define __ARCH_UAPI_SA_FLAGS _SA_SIGGFAULT > | ^~~~~~~~~~~~~ Stephen Rothwell pointed out: > _SA_SIGGFAULT was removed by commit > > 41f5a81c07cd ("parisc: Drop HP-UX specific fcntl and signal flags") > > which was added to Linus' tree in v5.10-rc1. Solve this by removing the the parisc specific definition of __ARCH_UAPI_SA_FLAGS that was just added. Reported-by: Randy Dunlap Acked-by: Randy Dunlap # build-tested Fixes: 23acdc76f179 ("signal: clear non-uapi flag bits when passing/returning sa_flags") Signed-off-by: "Eric W. Biederman" commit 7698c0f1558afa2236355bcd9afbbf0761ddb868 Author: Srinath Mannam Date: Thu Oct 1 11:30:54 2020 +0530 PCI: iproc: Enhance PCIe Link information display Add logging code so that after successful linkup more comprehensive information about PCIe link speed and link width will be displayed to the console. Link: https://lore.kernel.org/r/20201001060054.6616-4-srinath.mannam@broadcom.com Signed-off-by: Srinath Mannam Signed-off-by: Lorenzo Pieralisi commit 89bbcaac3dff21f3567956b3416f5ec8b45f5555 Author: Roman Bacik Date: Thu Oct 1 11:30:53 2020 +0530 PCI: iproc: Invalidate correct PAXB inbound windows Second stage bootloaders prior to Linux boot may use all inbound windows including IARR1/IMAP1. We need to ensure that all previous configuration of inbound windows are invalidated during the initialization stage of the Linux iProc PCIe driver so let's add a fix to define and invalidate IARR1/IMAP1 because it is currently missing, fixing the issue. Link: https://lore.kernel.org/r/20201001060054.6616-3-srinath.mannam@broadcom.com Fixes: 9415743e4c8a ("PCI: iproc: Invalidate PAXB address mapping") Signed-off-by: Roman Bacik Signed-off-by: Srinath Mannam [lorenzo.pieralisi@arm.com: commit log] Signed-off-by: Lorenzo Pieralisi commit a3ff529f5d368a17ff35ada8009e101162ebeaf9 Author: Bharat Gooty Date: Thu Oct 1 11:30:52 2020 +0530 PCI: iproc: Fix out-of-bound array accesses Declare the full size array for all revisions of PAX register sets to avoid potentially out of bound access of the register array when they are being initialized in iproc_pcie_rev_init(). Link: https://lore.kernel.org/r/20201001060054.6616-2-srinath.mannam@broadcom.com Fixes: 06324ede76cdf ("PCI: iproc: Improve core register population") Signed-off-by: Bharat Gooty Signed-off-by: Lorenzo Pieralisi commit db0ea13cc741e7c93f26bf5b3d313f48d00f15a4 Author: Arnaldo Carvalho de Melo Date: Mon Nov 30 15:19:40 2020 -0300 perf evlist: Use the right prefix for 'struct evlist' record methods perf_evlist__ is for 'struct perf_evlist' methods, in tools/lib/perf/, go on completing this split. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit b979a2f13b1b98c26b8f94d9401cd5255f75f978 Author: Arnaldo Carvalho de Melo Date: Mon Nov 30 15:18:48 2020 -0300 perf evlist: Use the right prefix for 'struct evlist' diff methods perf_evlist__ is for 'struct perf_evlist' methods, in tools/lib/perf/, go on completing this split. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit f63c2f5a8b0eb4a7a8d5d19c8e0ccbbd0ee41d14 Author: Arnaldo Carvalho de Melo Date: Mon Nov 30 15:17:20 2020 -0300 perf evlist: Use the right prefix for 'struct evlist' nr_threads method perf_evlist__ is for 'struct perf_evlist' methods, in tools/lib/perf/, go on completing this split. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 515ea461c26e19ebca4351266480306979a113fc Author: Arnaldo Carvalho de Melo Date: Mon Nov 30 15:16:29 2020 -0300 perf evlist: Use the right prefix for 'struct evlist' deliver event method perf_evlist__ is for 'struct perf_evlist' methods, in tools/lib/perf/, go on completing this split. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 4616c509d187d2afda4a8f1121c2a3ef16bbcefe Merge: e6e9354b58307 a8ecace132fa3 Author: Mark Brown Date: Mon Nov 30 18:16:06 2020 +0000 Merge remote-tracking branch 'regmap/for-5.11' into regmap-next commit 1420ba2f6250270c4143d96af86f654f9f4d9997 Author: Arnaldo Carvalho de Melo Date: Mon Nov 30 15:13:12 2020 -0300 perf evlist: Use the right prefix for 'struct evlist' header methods perf_evlist__ is for 'struct perf_evlist' methods, in tools/lib/perf/, go on completing this split. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 44d2a5573665ab5dfb72572e43184388d15d695e Author: Arnaldo Carvalho de Melo Date: Mon Nov 30 15:11:10 2020 -0300 perf evlist: Use the right prefix for 'struct evlist' raw samples methods perf_evlist__ is for 'struct perf_evlist' methods, in tools/lib/perf/, go on completing this split. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 25f84702f3590ce6caa3e5bb98e001692f3a2b9e Author: Arnaldo Carvalho de Melo Date: Mon Nov 30 15:09:45 2020 -0300 perf evlist: Use the right prefix for 'struct evlist' mmap pages parsing method perf_evlist__ is for 'struct perf_evlist' methods, in tools/lib/perf/, go on completing this split. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 78e1bc25786656c490befc6d44d265f263cb8861 Author: Arnaldo Carvalho de Melo Date: Mon Nov 30 15:07:49 2020 -0300 perf evlist: Use the right prefix for 'struct evlist' event attribute config methods perf_evlist__ is for 'struct perf_evlist' methods, in tools/lib/perf/, go on completing this split. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit bca5b0658020be90b6b504ca514fd80110204f71 Author: Zhao Heming Date: Thu Nov 19 19:41:34 2020 +0800 md/cluster: fix deadlock when node is doing resync job md-cluster uses MD_CLUSTER_SEND_LOCK to make node can exclusively send msg. During sending msg, node can concurrently receive msg from another node. When node does resync job, grab token_lockres:EX may trigger a deadlock: ``` nodeA nodeB -------------------- -------------------- a. send METADATA_UPDATED held token_lockres:EX b. md_do_sync resync_info_update send RESYNCING + set MD_CLUSTER_SEND_LOCK + wait for holding token_lockres:EX c. mdadm /dev/md0 --remove /dev/sdg + held reconfig_mutex + send REMOVE + wait_event(MD_CLUSTER_SEND_LOCK) d. recv_daemon //METADATA_UPDATED from A process_metadata_update + (mddev_trylock(mddev) || MD_CLUSTER_HOLDING_MUTEX_FOR_RECVD) //this time, both return false forever ``` Explaination: a. A send METADATA_UPDATED This will block another node to send msg b. B does sync jobs, which will send RESYNCING at intervals. This will be block for holding token_lockres:EX lock. c. B do "mdadm --remove", which will send REMOVE. This will be blocked by step : MD_CLUSTER_SEND_LOCK is 1. d. B recv METADATA_UPDATED msg, which send from A in step . This will be blocked by step : holding mddev lock, it makes wait_event can't hold mddev lock. (btw, MD_CLUSTER_HOLDING_MUTEX_FOR_RECVD keep ZERO in this scenario.) There is a similar deadlock in commit 0ba959774e93 ("md-cluster: use sync way to handle METADATA_UPDATED msg") In that commit, step c is "update sb". This patch step c is "mdadm --remove". For fixing this issue, we can refer the solution of function: metadata_update_start. Which does the same grab lock_token action. lock_comm can use the same steps to avoid deadlock. By moving MD_CLUSTER_HOLDING_MUTEX_FOR_RECVD from lock_token to lock_comm. It enlarge a little bit window of MD_CLUSTER_HOLDING_MUTEX_FOR_RECVD, but it is safe & can break deadlock. Repro steps (I only triggered 3 times with hundreds tests): two nodes share 3 iSCSI luns: sdg/sdh/sdi. Each lun size is 1GB. ``` ssh root@node2 "mdadm -S --scan" mdadm -S --scan for i in {g,h,i};do dd if=/dev/zero of=/dev/sd$i oflag=direct bs=1M \ count=20; done mdadm -C /dev/md0 -b clustered -e 1.2 -n 2 -l mirror /dev/sdg /dev/sdh \ --bitmap-chunk=1M ssh root@node2 "mdadm -A /dev/md0 /dev/sdg /dev/sdh" sleep 5 mkfs.xfs /dev/md0 mdadm --manage --add /dev/md0 /dev/sdi mdadm --wait /dev/md0 mdadm --grow --raid-devices=3 /dev/md0 mdadm /dev/md0 --fail /dev/sdg mdadm /dev/md0 --remove /dev/sdg mdadm --grow --raid-devices=2 /dev/md0 ``` test script will hung when executing "mdadm --remove". ``` # dump stacks by "echo t > /proc/sysrq-trigger" md0_cluster_rec D 0 5329 2 0x80004000 Call Trace: __schedule+0x1f6/0x560 ? _cond_resched+0x2d/0x40 ? schedule+0x4a/0xb0 ? process_metadata_update.isra.0+0xdb/0x140 [md_cluster] ? wait_woken+0x80/0x80 ? process_recvd_msg+0x113/0x1d0 [md_cluster] ? recv_daemon+0x9e/0x120 [md_cluster] ? md_thread+0x94/0x160 [md_mod] ? wait_woken+0x80/0x80 ? md_congested+0x30/0x30 [md_mod] ? kthread+0x115/0x140 ? __kthread_bind_mask+0x60/0x60 ? ret_from_fork+0x1f/0x40 mdadm D 0 5423 1 0x00004004 Call Trace: __schedule+0x1f6/0x560 ? __schedule+0x1fe/0x560 ? schedule+0x4a/0xb0 ? lock_comm.isra.0+0x7b/0xb0 [md_cluster] ? wait_woken+0x80/0x80 ? remove_disk+0x4f/0x90 [md_cluster] ? hot_remove_disk+0xb1/0x1b0 [md_mod] ? md_ioctl+0x50c/0xba0 [md_mod] ? wait_woken+0x80/0x80 ? blkdev_ioctl+0xa2/0x2a0 ? block_ioctl+0x39/0x40 ? ksys_ioctl+0x82/0xc0 ? __x64_sys_ioctl+0x16/0x20 ? do_syscall_64+0x5f/0x150 ? entry_SYSCALL_64_after_hwframe+0x44/0xa9 md0_resync D 0 5425 2 0x80004000 Call Trace: __schedule+0x1f6/0x560 ? schedule+0x4a/0xb0 ? dlm_lock_sync+0xa1/0xd0 [md_cluster] ? wait_woken+0x80/0x80 ? lock_token+0x2d/0x90 [md_cluster] ? resync_info_update+0x95/0x100 [md_cluster] ? raid1_sync_request+0x7d3/0xa40 [raid1] ? md_do_sync.cold+0x737/0xc8f [md_mod] ? md_thread+0x94/0x160 [md_mod] ? md_congested+0x30/0x30 [md_mod] ? kthread+0x115/0x140 ? __kthread_bind_mask+0x60/0x60 ? ret_from_fork+0x1f/0x40 ``` At last, thanks for Xiao's solution. Cc: stable@vger.kernel.org Signed-off-by: Zhao Heming Suggested-by: Xiao Ni Reviewed-by: Xiao Ni Signed-off-by: Song Liu commit a8da01f79c89755fad55ed0ea96e8d2103242a72 Author: Zhao Heming Date: Thu Nov 19 19:41:33 2020 +0800 md/cluster: block reshape with remote resync job Reshape request should be blocked with ongoing resync job. In cluster env, a node can start resync job even if the resync cmd isn't executed on it, e.g., user executes "mdadm --grow" on node A, sometimes node B will start resync job. However, current update_raid_disks() only check local recovery status, which is incomplete. As a result, we see user will execute "mdadm --grow" successfully on local, while the remote node deny to do reshape job when it doing resync job. The inconsistent handling cause array enter unexpected status. If user doesn't observe this issue and continue executing mdadm cmd, the array doesn't work at last. Fix this issue by blocking reshape request. When node executes "--grow" and detects ongoing resync, it should stop and report error to user. The following script reproduces the issue with ~100% probability. (two nodes share 3 iSCSI luns: sdg/sdh/sdi. Each lun size is 1GB) ``` # on node1, node2 is the remote node. ssh root@node2 "mdadm -S --scan" mdadm -S --scan for i in {g,h,i};do dd if=/dev/zero of=/dev/sd$i oflag=direct bs=1M \ count=20; done mdadm -C /dev/md0 -b clustered -e 1.2 -n 2 -l mirror /dev/sdg /dev/sdh ssh root@node2 "mdadm -A /dev/md0 /dev/sdg /dev/sdh" sleep 5 mdadm --manage --add /dev/md0 /dev/sdi mdadm --wait /dev/md0 mdadm --grow --raid-devices=3 /dev/md0 mdadm /dev/md0 --fail /dev/sdg mdadm /dev/md0 --remove /dev/sdg mdadm --grow --raid-devices=2 /dev/md0 ``` Cc: stable@vger.kernel.org Signed-off-by: Zhao Heming Signed-off-by: Song Liu commit a23f2aae8498d8c8bb6ff5301bda02db8093cb09 Author: Pankaj Gupta Date: Wed Nov 11 06:16:58 2020 +0100 md: use current request time as base for ktime comparisons Request coalescing logic uses 'prev_flush_start' as base to compare the current request start time. 'prev_flush_start' is updated in other context. This patch changes this by using ktime comparison base to 'req_start' for better readability of code. Signed-off-by: Pankaj Gupta Signed-off-by: Song Liu commit 204d1a6434158ac655fc4037f29742b9b6103f0e Author: Pankaj Gupta Date: Wed Nov 11 06:16:57 2020 +0100 md: add comments in md_flush_request() Request coalescing logic is dependent on flush time update in other context. This patch adds comments to understand the code flow better. Signed-off-by: Pankaj Gupta Signed-off-by: Song Liu commit 81ba3c24628c14eb869d81652dbaf50640d8cc24 Author: Pankaj Gupta Date: Wed Nov 11 06:16:56 2020 +0100 md: improve variable names in md_flush_request() This patch improves readability by using better variable names in flush request coalescing logic. Signed-off-by: Pankaj Gupta Reviewed-by: Paul Menzel Signed-off-by: Song Liu commit 93decc563637c4288380912eac0eb42fb246cc04 Author: Kevin Vigor Date: Fri Nov 6 14:20:34 2020 -0800 md/raid10: initialize r10_bio->read_slot before use. In __make_request() a new r10bio is allocated and passed to raid10_read_request(). The read_slot member of the bio is not initialized, and the raid10_read_request() uses it to index an array. This leads to occasional panics. Fix by initializing the field to invalid value and checking for valid value in raid10_read_request(). Cc: stable@vger.kernel.org Signed-off-by: Kevin Vigor Signed-off-by: Song Liu commit c731b84b51bf7fe83448bea8f56a6d55006b0615 Author: Dae R. Jeong Date: Thu Oct 22 10:21:28 2020 +0900 md: fix a warning caused by a race between concurrent md_ioctl()s Syzkaller reports a warning as belows. WARNING: CPU: 0 PID: 9647 at drivers/md/md.c:7169 ... Call Trace: ... RIP: 0010:md_ioctl+0x4017/0x5980 drivers/md/md.c:7169 RSP: 0018:ffff888096027950 EFLAGS: 00010293 RAX: ffff88809322c380 RBX: 0000000000000932 RCX: ffffffff84e266f2 RDX: 0000000000000000 RSI: ffffffff84e299f7 RDI: 0000000000000007 RBP: ffff888096027bc0 R08: ffff88809322c380 R09: ffffed101341a482 R10: ffff888096027940 R11: ffff88809a0d240f R12: 0000000000000932 R13: ffff8880a2c14100 R14: ffff88809a0d2268 R15: ffff88809a0d2408 __blkdev_driver_ioctl block/ioctl.c:304 [inline] blkdev_ioctl+0xece/0x1c10 block/ioctl.c:606 block_ioctl+0xee/0x130 fs/block_dev.c:1930 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:509 [inline] do_vfs_ioctl+0xd5f/0x1380 fs/ioctl.c:696 ksys_ioctl+0xab/0xd0 fs/ioctl.c:713 __do_sys_ioctl fs/ioctl.c:720 [inline] __se_sys_ioctl fs/ioctl.c:718 [inline] __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:718 do_syscall_64+0xfd/0x680 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe This is caused by a race between two concurrenct md_ioctl()s closing the array. CPU1 (md_ioctl()) CPU2 (md_ioctl()) ------ ------ set_bit(MD_CLOSING, &mddev->flags); did_set_md_closing = true; WARN_ON_ONCE(test_bit(MD_CLOSING, &mddev->flags)); if(did_set_md_closing) clear_bit(MD_CLOSING, &mddev->flags); Fix the warning by returning immediately if the MD_CLOSING bit is set in &mddev->flags which indicates that the array is being closed. Fixes: 065e519e71b2 ("md: MD_CLOSING needs to be cleared after called md_set_readonly or do_md_stop") Reported-by: syzbot+1e46a0864c1a6e9bd3d8@syzkaller.appspotmail.com Cc: stable@vger.kernel.org Signed-off-by: Dae R. Jeong Signed-off-by: Song Liu commit 606e2c29334556797e1639115bd198aedb331f07 Author: Arnaldo Carvalho de Melo Date: Mon Nov 30 15:04:05 2020 -0300 perf evlist: Use the right prefix for alternative 'struct evlist' constructors perf_evlist__ is for 'struct perf_evlist' methods, in tools/lib/perf/, go on completing this split. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 900c8ead5b0b21d73236ffbc4bc2f47a506d8297 Author: Arnaldo Carvalho de Melo Date: Mon Nov 30 15:01:08 2020 -0300 perf evlist: Use the right prefix for 'struct evlist' event selection methods perf_evlist__ is for 'struct perf_evlist' methods, in tools/lib/perf/, go on completing this split. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit f45a444cfe582b85af937a30d35d68d9a84399dd Author: Chuck Lever Date: Thu Aug 27 16:09:53 2020 -0400 NFSD: Add SPDX header for fs/nfsd/trace.c Clean up. The file was contributed in 2014 by Christoph Hellwig in commit 31ef83dc0538 ("nfsd: add trace events"). Signed-off-by: Chuck Lever commit 3a90e1dff16afdae6e1c918bfaff24f4d0f84869 Author: Chuck Lever Date: Fri Sep 4 15:06:26 2020 -0400 NFSD: Remove extra "0x" in tracepoint format specifier Clean up: %p adds its own 0x already. Signed-off-by: Chuck Lever commit b76278ae68848cea13b325d247aa5cf31c87edac Author: Chuck Lever Date: Wed Aug 19 12:56:40 2020 -0400 NFSD: Clean up the show_nf_may macro Display all currently possible NFSD_MAY permission flags. Move and rename show_nf_may with a more generic name because the NFSD_MAY permission flags are used in other places besides the file cache. Signed-off-by: Chuck Lever commit 156708adf2d9b8e5227bcb370811dbfd471371d9 Author: Chuck Lever Date: Fri Jul 24 14:39:00 2020 -0400 SUNRPC: Move the svc_xdr_recvfrom() tracepoint Commit c509f15a5801 ("SUNRPC: Split the xdr_buf event class") added display of the rqst's XID to the svc_xdr_buf_class. However, when the recvfrom tracepoint fires, rq_xid has yet to be filled in with the current XID. So it ends up recording the previous XID that was handled by that svc_rqst. Signed-off-by: Chuck Lever commit 71fd721839a74d945c242299f6be29a246fc2131 Author: Alex Shi Date: Fri Nov 6 13:40:57 2020 +0800 nfsd/nfs3: remove unused macro nfsd3_fhandleres The macro is unused, remove it to tame gcc warning: fs/nfsd/nfs3proc.c:702:0: warning: macro "nfsd3_fhandleres" is not used [-Wunused-macros] Signed-off-by: Alex Shi Cc: "J. Bruce Fields" Cc: Chuck Lever Cc: linux-nfs@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Chuck Lever commit 25fef48bdbe7cac5ba5577eab6a750e1caea43bc Author: Tom Rix Date: Sun Nov 1 07:32:34 2020 -0800 NFSD: A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix Signed-off-by: Chuck Lever commit d7cc73972661be4a02a1b09f1d9b3283c6c05154 Author: Chuck Lever Date: Wed Aug 5 14:59:05 2020 -0400 svcrdma: support multiple Read chunks per RPC An efficient way to handle multiple Read chunks is to post them all together and then take a single completion. This is also how the code is already structured: when the Read completion fires, all portions of the incoming RPC message are available to be assembled. The difficult problem is setting up the Read sink buffers so that the server pulls the client's data into place, making subsequent pull-up unnecessary. There are several cases: * No Read chunks. No-op. * One data item Read chunk. This is the fast case, where the inline part of the RPC-over-RDMA message becomes the head and tail, and the data item chunk is placed in buf->pages. * A Position-zero Read chunk. Treated like TCP: the Read chunk is pulled into contiguous pages. + A Position-zero Read chunk with data item chunks. Treated like TCP: all of the Read chunks are pulled into contiguous pages. + Multiple data item chunks. Treated like TCP: the inline part is copied and the data item chunks are pulled into contiguous pages. The "*" cases are already supported. This patch adds support for the "+" cases. Signed-off-by: Chuck Lever commit d96962e6d0e281bab6a48e83b42f5dce6eb28bf4 Author: Chuck Lever Date: Thu Sep 17 13:04:17 2020 -0400 svcrdma: Use the new parsed chunk list when pulling Read chunks As a pre-requisite for handling multiple Read chunks in each Read list, convert svc_rdma_recv_read_chunk() to use the new parsed Read chunk list. Signed-off-by: Chuck Lever commit bafe9c27d537e7bcfacb227413bdaff2dce53d09 Author: Chuck Lever Date: Fri Jul 17 15:05:51 2020 -0400 svcrdma: Rename info::ri_chunklen I'm about to change the purpose of ri_chunklen: Instead of tracking the number of bytes in one Read chunk, it will track the total number of bytes in the Read list. Rename it for clarity. Signed-off-by: Chuck Lever commit b704be09dccf00b14e0b22a4e849e3ce7a10acd2 Author: Chuck Lever Date: Thu Jun 11 13:28:28 2020 -0400 svcrdma: Clean up chunk tracepoints We already have trace_svcrdma_decode_rseg(), which records each ingress Read segment. Instead of reporting those again when they are about to be posted as RDMA Reads, let's fire one tracepoint before posting each type of chunk. So we'll get: nfsd-1998 [002] 321.666615: svcrdma_decode_rseg: cq.id=4 cid=42 segno=0 position=0 192@0x013ca9ebfae14000:0xb0010b05 nfsd-1998 [002] 321.666615: svcrdma_decode_rseg: cq.id=4 cid=42 segno=1 position=0 7688@0x013ca9ebf914e000:0xb0010a05 nfsd-1998 [002] 321.666615: svcrdma_decode_rseg: cq.id=4 cid=42 segno=2 position=0 28@0x013ca9ebfae15000:0xb0010905 nfsd-1998 [002] 321.666622: svcrdma_decode_rqst: cq.id=4 cid=42 xid=0x013ca9eb vers=1 credits=128 proc=RDMA_NOMSG hdrlen=100 nfsd-1998 [002] 321.666642: svcrdma_post_read_chunk: cq.id=3 cid=112 sqecount=3 kworker/2:1H-221 [002] 321.673949: svcrdma_wc_read: cq.id=3 cid=112 status=SUCCESS (0/0x0) Signed-off-by: Chuck Lever commit 7954c8503b8709660d93505a40f1847634d9c3ba Author: Chuck Lever Date: Wed Jun 17 15:19:36 2020 -0400 svcrdma: Remove chunk list pointers Clean up: These pointers are no longer used. Signed-off-by: Chuck Lever commit 41bc163ffe0fe67cba3fff2f5e8c58caa9e46a1e Author: Chuck Lever Date: Mon Mar 9 13:29:28 2020 -0400 svcrdma: Support multiple Write chunks in svc_rdma_send_reply_chunk Refactor svc_rdma_send_reply_chunk() so that it Sends only the parts of rq_res that do not contain a result payload. Signed-off-by: Chuck Lever commit 2371bcc056647327445150d6df0502d92ad68439 Author: Chuck Lever Date: Mon Mar 9 13:29:27 2020 -0400 svcrdma: Support multiple Write chunks in svc_rdma_map_reply_msg() Refactor: svc_rdma_map_reply_msg() is restructured to DMA map only the parts of rq_res that do not contain a result payload. This change has been tested to confirm that it does not cause a regression in the no Write chunk and single Write chunk cases. Multiple Write chunks have not been tested. Signed-off-by: Chuck Lever commit 9d0b09d5ef0c842592a5df3a5b8b59124485ff1b Author: Chuck Lever Date: Fri Mar 13 10:42:11 2020 -0400 svcrdma: Support multiple write chunks when pulling up When counting the number of SGEs needed to construct a Send request, do not count result payloads. And, when copying the Reply message into the pull-up buffer, result payloads are not to be copied to the Send buffer. Signed-off-by: Chuck Lever commit 6911f3e10cd9792ccfd6980da91a171f54984692 Author: Chuck Lever Date: Wed Jun 17 11:50:34 2020 -0400 svcrdma: Use parsed chunk lists to encode Reply transport headers Refactor: Instead of re-parsing the ingress RPC Call transport header when constructing the egress RPC Reply transport header, use the new parsed Write list and Reply chunk, which are version- agnostic and already XDR decoded. Signed-off-by: Chuck Lever commit 7a1cbfa18059a40d4752dab057384c3ca2de326c Author: Chuck Lever Date: Wed Jun 17 11:07:00 2020 -0400 svcrdma: Use parsed chunk lists to construct RDMA Writes Refactor: Instead of re-parsing the ingress RPC Call transport header when constructing RDMA Writes, use the new parsed chunk lists for the Write list and Reply chunk, which are version-agnostic and already XDR-decoded. Signed-off-by: Chuck Lever commit 58b2e0fefa891c99f297120c8c062a35005dc562 Author: Chuck Lever Date: Sun Mar 22 13:06:55 2020 -0400 svcrdma: Use parsed chunk lists to detect reverse direction replies Refactor: Don't duplicate header decoding smarts here. Instead, use the new parsed chunk lists. Note that the XID sanity test is also removed. The XID is already looked up by the cb handler, and is rejected if it's not recognized. Signed-off-by: Chuck Lever commit eb3de6a49dd587d6670c404769561f3e283b71e4 Author: Chuck Lever Date: Mon Jun 22 09:46:05 2020 -0400 svcrdma: Use parsed chunk lists to derive the inv_rkey Refactor: Don't duplicate header decoding smarts here. Instead, use the new parsed chunk lists. Signed-off-by: Chuck Lever commit 78147ca8b4a9b6cf0e597ddd6bf17959e08376c2 Author: Chuck Lever Date: Mon Jun 22 10:15:41 2020 -0400 svcrdma: Add a "parsed chunk list" data structure This simple data structure binds the location of each data payload inside of an RPC message to the chunk that will be used to push it to or pull it from the client. There are several benefits to this small additional overhead: * It enables support for more than one chunk in incoming Read and Write lists. * It translates the version-specific on-the-wire format into a generic in-memory structure, enabling support for multiple versions of the RPC/RDMA transport protocol. * It enables the server to re-organize a chunk list if it needs to adjust where Read chunk data lands in server memory without altering the contents of the XDR-encoded Receive buffer. Construction of these lists is done while sanity checking each incoming RPC/RDMA header. Subsequent patches will make use of the generated data structures. Signed-off-by: Chuck Lever commit ded380f10072c924a17be6ac996019ff6472c9d2 Author: Chuck Lever Date: Fri Mar 13 10:42:10 2020 -0400 svcrdma: Clean up svc_rdma_encode_reply_chunk() Refactor: Match the control flow of svc_rdma_encode_write_list(). Signed-off-by: Chuck Lever commit f6ad77590a5d432589a5d8a211c4e8e50cd8bb63 Author: Chuck Lever Date: Fri Mar 13 10:42:10 2020 -0400 svcrdma: Post RDMA Writes while XDR encoding replies The only RPC/RDMA ordering requirement between RDMA Writes and RDMA Sends is that the responder must post the Writes on the Send queue before posting the Send that conveys the RPC Reply for that Write payload. The Linux NFS server implementation now has a transport method that can post result Payload Writes earlier than svc_rdma_sendto: ->xpo_result_payload() This gets RDMA Writes going earlier so they are more likely to be complete at the remote end before the Send completes. Some care must be taken with pulled-up Replies. We don't want to push the Write chunk and then send the same payload data via Send. Signed-off-by: Chuck Lever commit 76e5492b161f555c0fb69cad9eb39a7d8467f5fe Author: Chuck Lever Date: Thu Nov 5 10:24:19 2020 -0500 NFSD: Invoke svc_encode_result_payload() in "read" NFSD encoders Have the NFSD encoders annotate the boundaries of every direct-data-placement eligible result data payload. Then change svcrdma to use that annotation instead of the xdr->page_len when handling Write chunks. For NFSv4 on RDMA, that enables the ability to recognize multiple result payloads per compound. This is a pre-requisite for supporting multiple Write chunks per RPC transaction. Signed-off-by: Chuck Lever commit 03493bca084fdca48abc59b00e06ce733aa9eb7d Author: Chuck Lever Date: Wed Jun 10 10:36:42 2020 -0400 SUNRPC: Rename svc_encode_read_payload() Clean up: "result payload" is a less confusing name for these payloads. "READ payload" reflects only the NFS usage. Signed-off-by: Chuck Lever commit ab1394ee7a110190c2ea38e1f1b72737daa10f20 Author: Chuck Lever Date: Fri Mar 13 10:42:10 2020 -0400 svcrdma: Refactor the RDMA Write path Refactor for subsequent changes. Constify the xdr_buf argument to ensure the code here does not modify it, and to enable callers to pass in a "const struct xdr_buf *". At the same time, rename the helper functions, which emit RDMA Writes, not RDMA Sends, and add documenting comments. Signed-off-by: Chuck Lever commit 51bad8cc1301f14ebf6840a6d8098520553ed5d5 Author: Chuck Lever Date: Fri Mar 13 10:42:10 2020 -0400 svcrdma: Const-ify the xdr_buf arguments Clean up: Ensure the code in rw.c does not modify the argument, and enable callers to also use "const struct xdr_buf *". Signed-off-by: Chuck Lever commit 5a7e702670adc368caa1b64c2138956d8cba0d4f Author: Chuck Lever Date: Fri Mar 13 10:42:09 2020 -0400 SUNRPC: Adjust synopsis of xdr_buf_subsegment() Clean up: This enables xdr_buf_subsegment()'s callers to pass in a const pointer to that buffer. Signed-off-by: Chuck Lever commit e5decb2eb5f4d1f64ba9196b4bad0e26a441c81c Author: Chuck Lever Date: Thu Nov 12 14:47:14 2020 -0500 svcrdma: Catch another Reply chunk overflow case When space in the Reply chunk runs out in the middle of a segment, we end up passing a zero-length SGL to rdma_rw_ctx_init(), and it oopses. Signed-off-by: Chuck Lever commit 64b4778b863b6fa84e36e043fb34bde6b847fa96 Author: Arnaldo Carvalho de Melo Date: Mon Nov 30 14:58:32 2020 -0300 perf evlist: Use the right prefix for 'struct evlist' event group methods perf_evlist__ is for 'struct perf_evlist' methods, in tools/lib/perf/, go on completing this split. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 7748bb7175ccad5ee29e7355134b0061d8edf3d2 Author: Arnaldo Carvalho de Melo Date: Mon Nov 30 14:56:52 2020 -0300 perf evlist: Use the right prefix for 'struct evlist' create maps methods perf_evlist__ is for 'struct perf_evlist' methods, in tools/lib/perf/, go on completing this split. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 712737241980476a277a4108e3121240a29de968 Author: Arnaldo Carvalho de Melo Date: Mon Nov 30 14:55:12 2020 -0300 perf evlist: Use the right prefix for 'struct evlist' print methods perf_evlist__ is for 'struct perf_evlist' methods, in tools/lib/perf/, go on completing this split. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit fb568273c0555097e8955643fa5d054b4e01bfc7 Author: Nícolas F. R. A. Prado Date: Tue Nov 17 02:12:01 2020 +0000 docs: automarkup.py: Allow automatic cross-reference inside C namespace Sphinx 3.1 introduced namespaces for C cross-references. With this, each C domain type/function declaration is put inside the namespace that was active at the time of its declaration. Add support for automatic cross-referencing inside C namespaces by checking whether the corresponding source file had a C namespace Sphinx directive, and if so, try cross-referencing inside of it before going to the global scope. This assumes there's only one namespace (if any) per rst file. Signed-off-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20201117021107.214704-1-nfraprado@protonmail.com Signed-off-by: Jonathan Corbet commit e414fd1a3f709984a03f0fa287e39df6a7218e22 Author: Arnaldo Carvalho de Melo Date: Mon Nov 30 14:52:44 2020 -0300 perf evlist: Use the right prefix for 'struct evlist' evsel list methods perf_evlist__ is for 'struct perf_evlist' methods, in tools/lib/perf/, go on completing this split. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit a8ecace132fa321f7fcc0650c4e486938a2a4bcb Merge: b6c505525c263 2a56e9c713fe3 Author: Mark Brown Date: Mon Nov 30 17:52:17 2020 +0000 Merge branch '20201104_yung_chuan_liao_regmap_soundwire_asoc_add_soundwire_sdca_support' into regmap-5.11 commit 0a60b339475970213f2685d0da55a26d5f4f22f9 Author: Arnaldo Carvalho de Melo Date: Mon Nov 30 14:49:05 2020 -0300 perf evlist: Use the right prefix for 'struct evlist' pause/resume methods perf_evlist__ is for 'struct perf_evlist' methods, in tools/lib/perf/, go on completing this split. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 37b01abe2a63db1b6a69af32257cb50795c725f8 Author: Arnaldo Carvalho de Melo Date: Mon Nov 30 14:47:05 2020 -0300 perf evlist: Use the right prefix for 'struct evlist' enable event methods perf_evlist__ is for 'struct perf_evlist' methods, in tools/lib/perf/, go on completing this split. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 0a7e7ec90e601d98cc5914626b78fd043598b85b Author: Arnaldo Carvalho de Melo Date: Mon Nov 30 14:44:40 2020 -0300 perf evlist: Use the right prefix for 'struct evlist' id_pos methods perf_evlist__ is for 'struct perf_evlist' methods, in tools/lib/perf/, go on completing this split. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit f59c4966d8508671ae3a990396a9da91f85ad75b Author: Wei Li Date: Thu Nov 19 10:27:09 2020 +0800 Documentation/features: Update feature lists for 5.10 The feature lists don't match reality as of v5.10-rc4, update them accordingly (by features-refresh.sh). Signed-off-by: Wei Li Link: https://lore.kernel.org/r/20201119022709.45843-1-liwei391@huawei.com Signed-off-by: Jonathan Corbet commit 2a99ff822dfa4a88d54b2c4f17d33748bcedd899 Author: Alexandre Truong Date: Fri Nov 27 15:39:23 2020 +0000 perf tools: Add aarch64 registers to --user-regs Previously, this command returns no help message on aarch64: -> ./perf record --user-regs=? available registers: Usage: perf record [] [] or: perf record [] -- [] With this change, the registers are listed. -> ./perf record --user-regs=? available registers: x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 x19 x20 x21 x22 x23 x24 x25 x26 x27 x28 x29 lr sp pc It's also now possible to record subsets of registers on aarch64: -> ./perf record --user-regs=x4,x5 ls -> ./perf report --dump-raw-trace 12801163749305260 0xc70 [0x40]: PERF_RECORD_SAMPLE(IP, 0x2): 51956/51956: 0xffffaa6571f0 period: 145785 addr: 0 ... user regs: mask 0x30 ABI 64-bit .... x4 0x000000000000006c .... x5 0x0000001001000001 ... thread: ls:51956 ...... dso: /usr/lib64/ld-2.17.so Signed-off-by: Alexandre Truong Tested-by: James Clark Acked-by: John Garry Cc: Jiri Olsa Cc: John Garry Cc: Leo Yan Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/20201127153923.26717-1-alexandre.truong@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit e80db255525a014a78af414b346413142e9142da Author: Arnaldo Carvalho de Melo Date: Mon Nov 30 14:39:41 2020 -0300 perf evlist: Use the right prefix for 'struct evlist' tracking event methods perf_evlist__ is for 'struct perf_evlist' methods, in tools/lib/perf/, go on completing this split. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit cc73eb321d246776e5a9f7723d15708809aa3699 Author: Colin Ian King Date: Sat Nov 14 15:48:04 2020 -0600 PCI: Fix overflow in command-line resource alignment requests The shift of 1 by align_order is evaluated using 32 bit arithmetic and the result is assigned to a resource_size_t type variable that is a 64 bit unsigned integer on 64 bit platforms. Fix an overflow before widening issue by making the 1 a ULL. Addresses-Coverity: ("Unintentional integer overflow") Fixes: 32a9a682bef2 ("PCI: allow assignment of memory resources with a specified alignment") Signed-off-by: Colin Ian King Signed-off-by: Bjorn Helgaas Reviewed-by: Logan Gunthorpe commit 6534aac198b58309ff2337981d3f893e0be1d19d Author: Bjorn Helgaas Date: Thu Nov 5 14:51:36 2020 -0600 PCI: Bounds-check command-line resource alignment requests 32-bit BARs are limited to 2GB size (2^31). By extension, I assume 64-bit BARs are limited to 2^63 bytes. Limit the alignment requested by the "pci=resource_alignment=" command-line parameter to 2^63. Link: https://lore.kernel.org/r/20201007123045.GS4282@kadam Reported-by: Dan Carpenter Signed-off-by: Bjorn Helgaas commit 2f0cd59c6ff91b4bae4b6650ef9bfe00639b5061 Author: Mauro Carvalho Chehab Date: Fri Oct 23 18:33:10 2020 +0200 PCI: Fix kernel-doc markup Update kernel-doc so the names in the doc match the prototypes. Link: https://lore.kernel.org/r/f19caf7a68f8365c8b573a42b4ac89ec21925c73.1603469755.git.mchehab+huawei@kernel.org Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Bjorn Helgaas commit 2472943cd4354b67cd6185bb391db2e945bc3764 Author: Bailu Lin Date: Mon Nov 23 18:38:14 2020 -0800 Documentation: Chinese translation of Documentation/arm64/elf_hwcaps.rst This is a Chinese translated version of Documentation/arm64/elf_hwcaps.rst Signed-off-by: Bailu Lin Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/20201124023846.34826-1-bailu.lin@vivo.com Signed-off-by: Jonathan Corbet commit 4c8e3de4b30811ec971fb8b7e168529151e81457 Author: Barry Song Date: Sun Nov 29 08:51:21 2020 +1300 Documentation/admin-guide: mark memmap parameter is supported by a few architectures early_param memmap is only implemented on X86, MIPS and XTENSA. To avoid wasting users’ time on trying this on platform like ARM, mark it clearly. Signed-off-by: Barry Song Reviewed-by: Mike Rapoport Link: https://lore.kernel.org/r/20201128195121.2556-1-song.bao.hua@hisilicon.com Signed-off-by: Jonathan Corbet commit 2a56e9c713fe38106cc62d928d4d73963a8548d5 Author: Mark Brown Date: Mon Nov 30 17:33:48 2020 +0000 ASoC: rt715: Fix build This reverts 6f4a038b99677 (ASoC/SoundWire: rt715-sdca: First version of rt715 sdw sdca codec driver) due to build breakage. Reported-by: Stephen Rothwell Signed-off-by: Mark Brown commit 956e9c85f47bfe874d58d96c85471f2e2ebae626 Author: Bjorn Andersson Date: Fri Nov 27 21:42:31 2020 -0600 arm64: dts: qcom: c630: Define eDP bridge and panel The Lenovo Yoga C630 drives the Boe NV133FHM-N61 eDP display from DSI using a TI SN65DSI86 bridge chip on I2C 10. Define the bridge and eDP panel and enable the display blocks. Tested-by: Steev Klimaszewski Acked-by: Shawn Guo Link: https://lore.kernel.org/r/20201128034231.89750-1-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit f55d373f7953909160cb4c1398f62123cdbe7650 Author: Bjorn Andersson Date: Mon Nov 30 11:00:28 2020 -0600 arm64: dts: qcom: c630: Fix pinctrl pins properties The "pins" property takes an array of pin _names_, not pin numbers. Fix this. Tested-by: Steev Klimaszewski Fixes: 44acee207844 ("arm64: dts: qcom: Add Lenovo Yoga C630") Link: https://lore.kernel.org/r/20201130170028.319798-1-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit 11d0e4f281565ef757479764ce7fd8d35eeb01b0 Author: Bjorn Andersson Date: Mon Nov 30 10:59:24 2020 -0600 arm64: dts: qcom: c630: Polish i2c-hid devices The numbering of the i2c busses differs from ACPI and a number of typos was made in the original patch. Further more the irq flags for the various resources was not correct and i2c3 only has one of the two client devices active in any one device. Also label the various devices, for easier comparison with the ACPI tables. Tested-by: Steev Klimaszewski Fixes: 44acee207844 ("arm64: dts: qcom: Add Lenovo Yoga C630") Link: https://lore.kernel.org/r/20201130165924.319708-1-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit f4bd0b4a9b21c609ede28cee2dcd16824c0489a8 Author: Arnaldo Carvalho de Melo Date: Mon Nov 30 14:23:35 2020 -0300 perf evlist: Use the right prefix for 'struct evlist' browser methods perf_evlist__ is for 'struct perf_evlist' methods, in tools/lib/perf/, go on completing this split. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 3ccf8a7b66b6bff69a7be62f2d5a2a61328ebe91 Author: Arnaldo Carvalho de Melo Date: Mon Nov 30 14:17:57 2020 -0300 perf evlist: Use the right prefix for 'struct evlist' sample id lookup methods perf_evlist__ is for 'struct perf_evlist' methods, in tools/lib/perf/, go on completing this split. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 96ddfbf46a35d75cd496efbd23d714271c0c0d46 Author: Ajit Pandey Date: Fri Sep 18 23:03:46 2020 +0530 arm64: dts: qcom: sc7180: Add lpass cpu node for I2S driver Add the I2S controller node to sc7180 dtsi. Add pinmux for primary and secondary I2S. Reviewed-by: Srinivas Kandagatla Signed-off-by: Ajit Pandey Signed-off-by: Cheng-Yi Chiang Signed-off-by: V Sujith Kumar Reddy Signed-off-by: Srinivasa Rao Mandadapu Link: https://lore.kernel.org/r/1600450426-14063-1-git-send-email-srivasam@codeaurora.org Signed-off-by: Bjorn Andersson commit 74ab8ccfb8f3133acf8b2a2a7bcfba9c1710960d Author: Kathiravan T Date: Mon Nov 30 16:31:45 2020 +0530 arm64: dts: ipq6018: Add the QPIC peripheral nodes Add the QPIC BAM and QPIC NAND controller support and enable the same in board DTS file. Co-developed-by: Anusha Canchi Ramachandra Rao Signed-off-by: Anusha Canchi Ramachandra Rao Signed-off-by: Kathiravan T Link: https://lore.kernel.org/r/1606734105-12414-2-git-send-email-kathirav@codeaurora.org Signed-off-by: Bjorn Andersson commit 05b801afb7d7eb569bfe5bdf9c192e2a5306473a Author: Georgi Djakov Date: Thu Nov 5 15:52:11 2020 +0200 arm64: dts: sdm845: Add interconnect properties for QUP Add the interconnects DT property to describe the ports for GENI QUPs on the sdm845 platform. Signed-off-by: Georgi Djakov Link: https://lore.kernel.org/r/20201105135211.7160-3-georgi.djakov@linaro.org Signed-off-by: Bjorn Andersson commit cd5fc457e5d2b8faf28c45f4beedc05f107a4268 Author: Georgi Djakov Date: Thu Nov 5 15:52:10 2020 +0200 interconnect: qcom: sdm845: Add the missing nodes for QUP The QUP nodes are currently defined just as entries in the topology, but they are not referenced by any of the NoCs. Let's fix this and "attach" them to their NoCs, so that the QUP drivers are able to use them as path endpoints and scale their bandwidth. This is based on the information from the downstream msm-4.9 kernel. Reviewed-by: Bjorn Andersson Signed-off-by: Georgi Djakov Link: https://lore.kernel.org/r/20201105135211.7160-2-georgi.djakov@linaro.org Signed-off-by: Bjorn Andersson commit 8742bb4bf203814b09572b615b5aeab000bf6248 Author: Georgi Djakov Date: Thu Nov 5 15:52:09 2020 +0200 dt-bindings: interconnect: sdm845: Add IDs for the QUP ports The QUP ports exist in the topology, but are not exposed as an endpoints in DT. Fix this by creating IDs and attach them to their NoCs, so that the various QUP drivers (i2c/spi/uart etc.) are able to request their interconnect paths and scale their bandwidth. Reviewed-by: Bjorn Andersson Acked-by: Rob Herring Signed-off-by: Georgi Djakov Link: https://lore.kernel.org/r/20201105135211.7160-1-georgi.djakov@linaro.org Signed-off-by: Bjorn Andersson commit 71b83b74cca3f6b583b7c343896be3922ea80466 Author: Bjorn Andersson Date: Wed Nov 25 00:08:38 2020 -0600 arm64: dts: qcom: c630: Expose LID events The LID state can be read from GPIO 124 and the "tablet mode" from GPIO 95, expose these to the system using gpio-keys and mark the falling edge of the LID state as a wakeup-source - to wake the system from suspend. Tested-by: Steev Klimaszewski Acked-by: Shawn Guo Link: https://lore.kernel.org/r/20201125060838.165576-1-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit 683227e5a34e4ca40bb13bca47952b48516ea87d Author: Bjorn Andersson Date: Tue Nov 24 12:44:14 2020 -0600 arm64: dts: qcom: c630: Re-enable apps_smmu Re-enable the apps_smmu now that the arm-smmu driver supports stream mapping handoff from firmware. Tested-by: Steev Klimaszewski Acked-by: Shawn Guo Link: https://lore.kernel.org/r/20201124184414.380796-1-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit 2ae136a34fce9bbeb7c582449b03bd4e05aac565 Author: Grygorii Strashko Date: Wed Nov 18 16:31:49 2020 +0200 gpio: omap: handle deferred probe with dev_err_probe() for gpiochip_add_data() The gpiochip_add_data() may return -EPROBE_DEFER which is not handled properly by TI GPIO driver and causes unnecessary boot log messages. Hence, add proper deferred probe handling with new dev_err_probe() API. Signed-off-by: Grygorii Strashko Acked-by: Tony Lindgren Signed-off-by: Bartosz Golaszewski commit 0aa42370084cb8c87f5485e04bee50612d4db644 Author: Alexandru Ardelean Date: Thu Nov 19 16:21:04 2020 +0200 gpio: xra1403: remove unneeded spi_set_drvdata() There is no matching spi_get_drvdata() call in the driver, so there is no need to do spi_set_drvdata(). This looks like it probably was copied from a driver that used both spi_set_drvdata() & spi_get_drvdata(). Signed-off-by: Alexandru Ardelean Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 7d3615ae401146ab40115546667e8ebc0d5c7d73 Author: Damien Le Moal Date: Mon Nov 30 19:57:49 2020 +0900 gpio: dwapb: Remove unnecessary error message In dwapb_get_reset(), if devm_reset_control_get_optional_shared() fails, an error message is printed even if the failure is the benign EPROBE_DEFER error due to the reset controller not yet being initialized. Use dev_err_probe() to handle devm_reset_control_get_optional_shared() errors to avoid unnecessarilly printing an error message for the deferred probe error. Signed-off-by: Damien Le Moal Signed-off-by: Bartosz Golaszewski commit 00c543f6f3f46ce02e300d76e22bb21a8a75e872 Merge: bbecede458d04 4da595ddc0690 Author: Arnd Bergmann Date: Mon Nov 30 17:24:21 2020 +0100 Merge tag 'aspeed-5.11-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed into arm/drivers ASPEED soc driver updates for 5.11 New drivers: - SoC info driver to expose revision information New features: - AST2600 support for the LPC control driver. This includes setting the LPC2AHB bridge up in a backwards compatible manner. Cleanups: - LPC control - Kconfig - Bindings updates for AST2600 strings * tag 'aspeed-5.11-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed: soc: aspeed: Enable drivers with ARCH_ASPEED soc: aspeed: Fix a reference leak in aspeed_socinfo_init() soc: aspeed: remove unneeded semicolon soc: aspeed-lpc-ctrl: Fix driver name soc: aspeed-lpc-ctrl: Fix whitespace soc: aspeed-lpc-ctrl: LPC to AHB mapping on ast2600 soc: aspeed-lpc-ctrl: Fail probe of lpc-ctrl if reserved memory is not aligned soc: aspeed: lpc: Add AST2600 compatible strings dt-bindings: aspeed-lpc: Add AST2600 compatible strings ARM: dts: aspeed: Add silicon id node soc: aspeed: Add soc info driver dt-bindings: aspeed: Add silicon id node to SCU soc: aspeed: Improve kconfig Link: https://lore.kernel.org/r/CACPK8Xe=9ezhyWRMqVOEQr7SU1YoYfVBGGdGzjmE4SiBr--vJQ@mail.gmail.com Signed-off-by: Arnd Bergmann commit 3e482859f1ef73244849ea56e08933b2a8d21882 Author: Thara Gopinath Date: Thu Nov 19 10:52:32 2020 -0500 dts: qcom: sdm845: Add dt entries to support crypto engine. Add crypto engine (CE) and CE BAM related nodes and definitions to "sdm845.dtsi". Signed-off-by: Thara Gopinath Link: https://lore.kernel.org/r/20201119155233.3974286-6-thara.gopinath@linaro.org [bjorn: Replaced RPMH_CE_CLK constant, for now] Signed-off-by: Bjorn Andersson commit bbecede458d042a5b71d6f10eedd471615d9ee6c Merge: e9ab9c337beec cc6576029aedc Author: Arnd Bergmann Date: Mon Nov 30 17:22:02 2020 +0100 Merge tag 'v5.10-next-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into arm/drivers power-domains: - add support for new power domain driver. - add support for mt8183 and mt8192 devapc: - add support for the devapc device found on mt6779 to identify of malicious bus accesses from a controller to a device mmsys: - move DDP routing IDs into the driver cmdq: - drop timeout handler support as not usefull scpsys: - print warning on theoretical error * tag 'v5.10-next-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: (21 commits) soc: mediatek: mmsys: Use devm_platform_ioremap_resource() soc / drm: mediatek: Move DDP component defines into mtk-mmsys.h soc: mediatek: add mt6779 devapc driver dt-bindings: devapc: add bindings for mtk-devapc soc / drm: mediatek: cmdq: Remove timeout handler in helper function soc: mediatek: pm-domains: Add support for mt8192 soc: mediatek: pm-domains: Add default power off flag soc: mediatek: pm-domains: Add support for mt8183 soc: mediatek: pm-domains: Allow bus protection to ignore clear ack soc: mediatek: pm-domains: Add subsystem clocks soc: mediatek: pm-domains: Add extra sram control soc: mediatek: pm-domains: Add SMI block as bus protection block soc: mediatek: pm_domains: Make bus protection generic soc: mediatek: pm-domains: Add bus protection protocol soc: mediatek: Add MediaTek SCPSYS power domains dt-bindings: power: Add MT8192 power domains dt-bindings: power: Add MT8183 power domains dt-bindings: power: Add bindings for the Mediatek SCPSYS power domains controller mfd: syscon: Add syscon_regmap_lookup_by_phandle_optional() function. MAINTAINERS: change mediatek wiki page ... Link: https://lore.kernel.org/r/b03fe343-e183-c6f3-f2dc-4c58aae3146b@gmail.com Signed-off-by: Arnd Bergmann commit e9ab9c337beecd41f4cc98d536cd6299264d818f Merge: c6241fd5de13f b96c0546b5908 Author: Arnd Bergmann Date: Mon Nov 30 17:20:57 2020 +0100 Merge tag 'arm-soc/for-5.11/drivers' of https://github.com/Broadcom/stblinux into arm/drivers This pull request contains Broadcom SoCs driver changes for 5.11, please pull the following: - Lee provides a missing function declaration spotted with W=1 builds * tag 'arm-soc/for-5.11/drivers' of https://github.com/Broadcom/stblinux: soc: bcm: brcmstb: pm: pm-arm: Provide prototype for brcmstb_pm_s3_finish() Link: https://lore.kernel.org/r/20201128163410.1691529-5-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann commit c6241fd5de13f561ad147173f93f70a5f7058690 Merge: 270a5bbb090cd 264788c8f2370 Author: Arnd Bergmann Date: Mon Nov 30 17:19:19 2020 +0100 Merge tag 'at91-drivers-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/drivers AT91 drivers for 5.11: - add sam9x60 SiP IDs - at91_cf cleanups * tag 'at91-drivers-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: pcmcia: at91_cf: remove platform data support pcmcia: at91_cf: move definitions locally ARM: at91: sam9x60 SiP types added to soc description Link: https://lore.kernel.org/r/20201127214140.GA1688544@piout.net Signed-off-by: Arnd Bergmann commit e5879d988291a964a87c4868057dc989d901eea0 Merge: 645be01d7b553 f9d8ae0b91763 Author: Mark Brown Date: Mon Nov 30 16:05:07 2020 +0000 Merge branch 'for-5.10' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.11 commit ef098edc9c245dd1c150001e22c78e6a3ffd7ff8 Author: Eddie Cai Date: Tue Oct 20 16:38:50 2020 -0300 arm64: dts: rockchip: add isp and sensors for Scarlet Enable ISP and camera sensor ov2685 and ov5695 for Scarlet Chromebook Verified with: make ARCH=arm64 dtbs_check Signed-off-by: Shunqian Zheng Signed-off-by: Eddie Cai Signed-off-by: Tomasz Figa Signed-off-by: Helen Koike Reviewed-by: Tomasz Figa Link: https://lore.kernel.org/r/20201020193850.1460644-10-helen.koike@collabora.com Signed-off-by: Heiko Stuebner commit 97a0115cd96a173369ef30eee2290184921b3f24 Author: Shunqian Zheng Date: Tue Oct 20 16:38:49 2020 -0300 arm64: dts: rockchip: add isp0 node for rk3399 RK3399 has two ISPs, but only isp0 was tested. Add isp0 node in rk3399 dtsi Verified with: make ARCH=arm64 dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/media/rockchip-isp1.yaml Signed-off-by: Shunqian Zheng Signed-off-by: Jacob Chen Signed-off-by: Helen Koike Link: https://lore.kernel.org/r/20201020193850.1460644-9-helen.koike@collabora.com Signed-off-by: Heiko Stuebner commit 4f1df628d4ec22b04f67e068e6d02538d3dd557b Author: Marc Zyngier Date: Thu Nov 26 17:27:13 2020 +0000 KVM: arm64: Advertise ID_AA64PFR0_EL1.CSV3=1 if the CPUs are Meltdown-safe Cores that predate the introduction of ID_AA64PFR0_EL1.CSV3 to the ARMv8 architecture have this field set to 0, even of some of them are not affected by the vulnerability. The kernel maintains a list of unaffected cores (A53, A55 and a few others) so that it doesn't impose an expensive mitigation uncessarily. As we do for CSV2, let's expose the CSV3 property to guests that run on HW that is effectively not vulnerable. This can be reset to zero by writing to the ID register from userspace, ensuring that VMs can be migrated despite the new property being set. Reported-by: Will Deacon Signed-off-by: Marc Zyngier commit 645be01d7b553e9ab0791ceb88f381a087d691d9 Merge: 853c15b124983 0cde3e9f029c2 Author: Mark Brown Date: Mon Nov 30 15:59:13 2020 +0000 Merge series "ASoC: SOF: Intel: fix ICL boot sequence" from Kai Vehmanen : Series introducing a modified boot sequence for the Intel Ice Lake platform. While no bugs are currently open for this, the current DSP boot implementation does not follow the full programming sequence. This patchset is the first instance where SOF driver uses data in the extended manifest (part of the firmware binary), to influence the boot process. IPC cannot be used to get this information, as it is already needed for early boot. This change is backwards compatible with old firmware versions, where extended manifest is not available. Fred Oh (5): ASoC: SOF: ops: add parse_platform_ext_manifest() op ASoC: SOF: Intel: hda: define parse_platform_ext_manifest op ASoC: SOF: ext_manifest: parse cavs extra config data elem ASoC: SOF: ops: modify the signature of stall op ASoC: SOF: Intel: hda: add sof_icl_ops for ICL platforms include/sound/sof/ext_manifest.h | 1 + sound/soc/sof/intel/Makefile | 2 +- sound/soc/sof/intel/apl.c | 3 + sound/soc/sof/intel/cnl.c | 19 +--- sound/soc/sof/intel/ext_manifest.h | 35 +++++++ sound/soc/sof/intel/hda-loader.c | 100 ++++++++++++++++++++ sound/soc/sof/intel/hda.h | 11 +++ sound/soc/sof/intel/icl.c | 145 +++++++++++++++++++++++++++++ sound/soc/sof/intel/tgl.c | 3 + sound/soc/sof/loader.c | 3 + sound/soc/sof/ops.h | 14 ++- sound/soc/sof/sof-pci-dev.c | 2 +- sound/soc/sof/sof-priv.h | 7 +- 13 files changed, 324 insertions(+), 21 deletions(-) create mode 100644 sound/soc/sof/intel/ext_manifest.h create mode 100644 sound/soc/sof/intel/icl.c -- 2.28.0 commit 853c15b1249832320b625f8a803c42c162301291 Merge: 6cd4c6459e474 ddfbe828f2ed1 Author: Mark Brown Date: Mon Nov 30 15:59:12 2020 +0000 Merge series "ASoC: tidyup for jack.h" from Kuninori Morimoto : Hi Mark These are jack.h related tidyup. Kuninori Morimoto (2): ASoC: soc-core: tidyup jack.h ASoC: add soc-jack.h include/sound/soc-jack.h | 132 ++++++++++++++++++++++++++++++++++++ include/sound/soc.h | 122 +-------------------------------- include/trace/events/asoc.h | 1 + sound/soc/soc-core.c | 1 - 4 files changed, 134 insertions(+), 122 deletions(-) create mode 100644 include/sound/soc-jack.h -- 2.25.1 commit f9d8ae0b91763765686833e500af0256bf769ba2 Merge: bbe1f69dce940 ab5893fdc0693 Author: Mark Brown Date: Mon Nov 30 15:59:10 2020 +0000 Merge series "ASoC: amd: Minor fixes for error handling" from Takashi Iwai : Hi, this is a set of patches to address the errors appearing on the machine that has no I2S DMIC on AMD machine but probed. Takashi === Takashi Iwai (2): ASoC: amd: Downgrade print level for invalid ACP mode ASoC: amd: Return -ENODEV for non-existing ACPI call sound/soc/amd/raven/pci-acp3x.c | 2 +- sound/soc/amd/renoir/rn-pci-acp3x.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.26.2 commit a2081c09d7410c3e55d902a09602b833dc96c58a Author: Marek Behún Date: Mon Nov 16 13:33:03 2020 +0100 arm64: dts: armada-3720-turris-mox: add 3W power capability to SFP cage Add maximum-power-milliwatt = 3000 to SFP node of Turris MOX. Signed-off-by: Marek Behún Fixes: 7109d817db2e ("arm64: dts: marvell: add DTS for Turris Mox") Cc: Gregory CLEMENT Cc: Andrew Lunn Cc: Rob Herring Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Gregory CLEMENT commit f43cadef2df260101497a6aace05e24201f00202 Author: Tomasz Nowicki Date: Thu Nov 5 12:26:02 2020 +0100 arm64: dts: marvell: keep SMMU disabled by default for Armada 7040 and 8040 FW has to configure devices' StreamIDs so that SMMU is able to lookup context and do proper translation later on. For Armada 7040 & 8040 and publicly available FW, most of the devices are configured properly, but some like ap_sdhci0, PCIe, NIC still remain unassigned which results in SMMU faults about unmatched StreamID (assuming ARM_SMMU_DISABLE_BYPASS_BY_DEFAUL=y). Since there is dependency on custom FW let SMMU be disabled by default. People who still willing to use SMMU need to enable manually and use ARM_SMMU_DISABLE_BYPASS_BY_DEFAUL=n (or via kernel command line) with extra caution. Fixes: 83a3545d9c37 ("arm64: dts: marvell: add SMMU support") Cc: # 5.9+ Signed-off-by: Tomasz Nowicki Signed-off-by: Gregory CLEMENT commit da57203dc7fd556fbb3f0ec7d7d7c0b0e893b386 Author: Tomasz Maciej Nowak Date: Tue Nov 10 16:38:31 2020 +0100 arm64: dts: mcbin-singleshot: add heartbeat LED With board revision 1.3, SolidRun moved the power LED to the middle of the board. In old place of power LED a GPIO controllable heartbeat LED was added. This commit only touches Single Shot variant, since only this variant is all revision 1.3. Reported-by: Alexandra Alth Signed-off-by: Tomasz Maciej Nowak Signed-off-by: Gregory CLEMENT commit 83afd0b3e0279107ff06945bad4b63a1fbe83224 Author: Serge Semin Date: Wed Nov 11 12:15:45 2020 +0300 arm64: dts: marvell: cp11x: Harmonize xHCI DT nodes name In accordance with the Generic xHCI bindings the corresponding node name is suppose to comply with the Generic USB HCD DT schema, which requires the USB nodes to have the name acceptable by the regexp: "^usb(@.*)?" . Make sure the "generic-xhci"-compatible nodes are correctly named. Signed-off-by: Serge Semin Acked-by: Krzysztof Kozlowski Signed-off-by: Gregory CLEMENT commit a4423bec44744ce556e91fe8efffbd10327f79fd Author: Chun-Kuang Hu Date: Tue Oct 6 07:48:58 2020 +0800 MAINTAINERS: add files for Mediatek DRM drivers Mediatek MIPI DSI phy driver is moved from drivers/gpu/drm/mediatek to drivers/phy/mediatek, so add the new folder to the Mediatek DRM drivers' information. Signed-off-by: Chun-Kuang Hu Acked-by: Chunfeng Yun commit 90f80d95992f3f08dcc10682a2b1a5ee6d3781a4 Author: Chun-Kuang Hu Date: Tue Oct 6 07:37:07 2020 +0800 phy: mediatek: Move mtk_mipi_dsi_phy driver into drivers/phy/mediatek folder mtk_mipi_dsi_phy is currently placed inside mediatek drm driver, but it's more suitable to place a phy driver into phy driver folder, so move mtk_mipi_dsi_phy driver into phy driver folder. Signed-off-by: Chun-Kuang Hu Acked-by: Chunfeng Yun Acked-by: Vinod Koul commit d7bb92e3c908a9df47bd3a306f6fc3e009babc5b Author: Tiezhu Yang Date: Wed Nov 25 15:37:45 2020 +0800 phy: mediatek: Make PHY_MTK_{XSPHY, TPHY} depend on HAS_IOMEM and OF_ADDRESS to fix build errors devm_ioremap_resource() will be not built in lib/devres.c if CONFIG_HAS_IOMEM is not set, of_address_to_resource() will be not built in drivers/of/address.c if CONFIG_OF_ADDRESS is not set, and then there exists two build errors about undefined reference to "devm_ioremap_resource" and "of_address_to_resource" in phy-mtk-xsphy.c under COMPILE_TEST and CONFIG_PHY_MTK_XSPHY, make PHY_MTK_XSPHY depend on HAS_IOMEM and OF_ADDRESS to fix it. The above issue is reported by kernel test robot , through the discussion in the v1 patch, as Chunfeng said we need also do this for config PHY_MTK_TPHY: drivers/phy/mediatek/phy-mtk-tphy.c:1157: retval = of_address_to_resource(child_np, 0, &res); drivers/phy/mediatek/phy-mtk-tphy.c:1123: tphy->sif_base = devm_ioremap_resource(dev, sif_res); drivers/phy/mediatek/phy-mtk-tphy.c:1164: instance->port_base = devm_ioremap_resource(&phy->dev, &res); Reported-by: kernel test robot Signed-off-by: Tiezhu Yang Acked-by: Randy Dunlap Acked-by: Chunfeng Yun Link: https://lore.kernel.org/r/1606289865-692-1-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Vinod Koul commit 1b57b9597c779f0a20c5837abec31f600240496b Author: Niklas Söderlund Date: Thu Nov 26 23:09:23 2020 +0100 thermal: rcar_gen3_thermal: Do not use interrupts for normal operation Remove the usage of interrupts for the normal temperature operation and depend on the polling performed by the thermal core. This is done to prepare to use the interrupts as they are intended to trigger once specific trip points are passed and not to react to temperature changes in the normal operational range. Signed-off-by: Niklas Söderlund Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201126220923.3107213-1-niklas.soderlund+renesas@ragnatech.se commit c3c88422fabf425cf5e4bac29074ded97e010f57 Author: Chun-Kuang Hu Date: Sun Oct 4 10:30:03 2020 +0800 drm/mediatek: Separate mtk_mipi_tx to an independent module mtk_mipi_tx is a part of mtk_drm module, but phy driver should be an independent module rather than be part of drm module, so separate the phy driver to an independent module. Signed-off-by: Chun-Kuang Hu commit 4ea0bf2a52f1eea76578eac5a9148d95f5e181c0 Author: JC Kuo Date: Tue Nov 17 16:38:03 2020 +0800 phy: tegra: xusb: Fix usb_phy device driver field In commit "phy: tegra: xusb: Add usb-phy support", an OTG capable PHY device, such as phy-usb2.0 device of Jetson-TX1 platform, will be bound to the tegra-xusb-padctl driver by the following line in tegra_xusb_setup_usb_role_switch(). port->usb_phy.dev->driver = port->padctl->dev->driver; With this, dev_pm_ops set of tegra-xusb-padctl driver will be invoked for the OTG capable PHY incorrectly as below logs show. This commit fixes the issue by assigning an empty driver to it. [ 153.451108] tegra-xusb-padctl phy-usb2.0: > tegra_xusb_padctl_suspend_noirq(dev=ffff000080917000) [ 153.460353] tegra-xusb-padctl phy-usb2.0: driver: ffff8000114453e0 (tegra_xusb_padctl_driver) [ 153.469245] tegra-xusb-padctl phy-usb2.0: padctl: ffff0000829f6480 [ 153.475772] tegra-xusb-padctl phy-usb2.0: soc: ef7bdd7fffffffff (0xef7bdd7fffffffff) [ 153.484061] Unable to handle kernel paging request at virtual address 007bdd800000004f [ 153.492132] Mem abort info: [ 153.495083] ESR = 0x96000004 [ 153.498308] EC = 0x25: DABT (current EL), IL = 32 bits [ 153.503771] SET = 0, FnV = 0 [ 153.506979] EA = 0, S1PTW = 0 [ 153.510260] Data abort info: [ 153.513200] ISV = 0, ISS = 0x00000004 [ 153.517181] CM = 0, WnR = 0 [ 153.520302] [007bdd800000004f] address between user and kernel address ranges [ 153.527600] Internal error: Oops: 96000004 [#1] PREEMPT SMP [ 153.533231] Modules linked in: nouveau panel_simple tegra_video(C) tegra_drm drm_ttm_helper videobuf2_dma_contig ttm videobuf2_memops cec videobuf2_v4l2 videobuf2_common drm_kms_helper v4l2_fwnode videodev drm mc snd_hda_codec_hdmi cdc_ether usbnet snd_hda_tegra r8152 crct10dif_ce snd_hda_codec snd_hda_core tegra_xudc host1x lp855x_bl at24 ip_tables x_tables ipv6 [ 153.566417] CPU: 0 PID: 300 Comm: systemd-sleep Tainted: G C 5.10.0-rc3-next-20201113-00019-g5c064d5372b0-dirty #624 [ 153.578283] Hardware name: NVIDIA Jetson TX1 Developer Kit (DT) [ 153.584281] pstate: 40000005 (nZcv daif -PAN -UAO -TCO BTYPE=--) [ 153.590381] pc : tegra_xusb_padctl_suspend_noirq+0x88/0x100 [ 153.596016] lr : tegra_xusb_padctl_suspend_noirq+0x80/0x100 [ 153.601632] sp : ffff8000120dbb60 [ 153.604999] x29: ffff8000120dbb60 x28: ffff000080a1df00 [ 153.610430] x27: 0000000000000002 x26: ffff8000106f8540 [ 153.615858] x25: ffff8000113ac4a4 x24: ffff80001148c198 [ 153.621277] x23: ffff800010c4538c x22: 0000000000000002 [ 153.626692] x21: ffff800010ccde80 x20: ffff0000829f6480 [ 153.632107] x19: ffff000080917000 x18: 0000000000000030 [ 153.637521] x17: 0000000000000000 x16: 0000000000000000 [ 153.642933] x15: ffff000080a1e380 x14: 74636461702d6273 [ 153.648346] x13: ffff8000113ad058 x12: 0000000000000f39 [ 153.653759] x11: 0000000000000513 x10: ffff800011405058 [ 153.659176] x9 : 00000000fffff000 x8 : ffff8000113ad058 [ 153.664590] x7 : ffff800011405058 x6 : 0000000000000000 [ 153.670002] x5 : 0000000000000000 x4 : ffff0000fe908bc0 [ 153.675414] x3 : ffff0000fe910228 x2 : 162ef67e0581e700 [ 153.680826] x1 : 162ef67e0581e700 x0 : ef7bdd7fffffffff [ 153.686241] Call trace: [ 153.688769] tegra_xusb_padctl_suspend_noirq+0x88/0x100 [ 153.694077] __device_suspend_noirq+0x68/0x1cc [ 153.698594] dpm_noirq_suspend_devices+0x10c/0x1d0 [ 153.703456] dpm_suspend_noirq+0x28/0xa0 [ 153.707461] suspend_devices_and_enter+0x234/0x4bc [ 153.712314] pm_suspend+0x1e4/0x270 [ 153.715868] state_store+0x8c/0x110 [ 153.719440] kobj_attr_store+0x1c/0x30 [ 153.723259] sysfs_kf_write+0x4c/0x7c [ 153.726981] kernfs_fop_write+0x124/0x240 [ 153.731065] vfs_write+0xe4/0x204 [ 153.734449] ksys_write+0x6c/0x100 [ 153.737925] __arm64_sys_write+0x20/0x30 [ 153.741931] el0_svc_common.constprop.0+0x78/0x1a0 [ 153.746789] do_el0_svc+0x24/0x90 [ 153.750181] el0_sync_handler+0x254/0x260 [ 153.754251] el0_sync+0x174/0x180 [ 153.757663] Code: aa0303e2 94000f64 f9405680 b40000e0 (f9402803) [ 153.763826] ---[ end trace 81543a3394cb409d ]--- Fixes: e8f7d2f409a1 ("phy: tegra: xusb: Add usb-phy support") Signed-off-by: JC Kuo Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20201117083803.185209-1-jckuo@nvidia.com Signed-off-by: Vinod Koul commit 2a211904aca6e68b800177ba5094a0fbe0a8b522 Author: Sylwester Nawrocki Date: Thu Nov 12 15:09:29 2020 +0100 MAINTAINERS: Add entry for Samsung interconnect drivers Add maintainers entry for the Samsung SoC interconnect drivers, this currently includes the Exynos generic interconnect driver. Reviewed-by: Chanwoo Choi Signed-off-by: Sylwester Nawrocki Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201112140931.31139-4-s.nawrocki@samsung.com Signed-off-by: Georgi Djakov commit 2f95b9d5cf0b3d15154225e369558a3c6b40e948 Author: Sylwester Nawrocki Date: Thu Nov 12 15:09:28 2020 +0100 interconnect: Add generic interconnect driver for Exynos SoCs This patch adds a generic interconnect driver for Exynos SoCs in order to provide interconnect functionality for each "samsung,exynos-bus" compatible device. The SoC topology is a graph (or more specifically, a tree) and its edges are described by specifying in the 'interconnects' property the interconnect consumer path for each interconnect provider DT node. Each bus is now an interconnect provider and an interconnect node as well (cf. Documentation/interconnect/interconnect.rst), i.e. every bus registers itself as a node. Node IDs are not hard coded but rather assigned dynamically at runtime. This approach allows for using this driver with various Exynos SoCs. Frequencies requested via the interconnect API for a given node are propagated to devfreq using dev_pm_qos_update_request(). Please note that it is not an error when CONFIG_INTERCONNECT is 'n', in which case all interconnect API functions are no-op. The samsung,data-clk-ratio DT property is used to specify the ratio of the interconect bandwidth to the minimum data clock frequency for each bus. Due to unspecified relative probing order, -EPROBE_DEFER may be propagated to ensure that the parent is probed before its children. Reviewed-by: Chanwoo Choi Tested-by: Chanwoo Choi Acked-by: Krzysztof Kozlowski Signed-off-by: Artur Świgoń Signed-off-by: Sylwester Nawrocki Link: https://lore.kernel.org/r/20201112140931.31139-3-s.nawrocki@samsung.com Signed-off-by: Georgi Djakov commit be49d5b2985bca407d130305ad78021d3c17db19 Author: Georgi Djakov Date: Tue Oct 13 20:19:23 2020 +0300 interconnect: qcom: Simplify the vcd compare function Let's simplify the cmp_vcd() function and replace the conditionals with just a single statement, which also improves readability. Reviewed-by: Mike Tipton Link: https://lore.kernel.org/r/20201013171923.7351-1-georgi.djakov@linaro.org Signed-off-by: Georgi Djakov commit cd5f82dbbad04418afca092e8c7c6250e6815554 Merge: 3473065927a87 f44afb5b5a5d0 Author: Greg Kroah-Hartman Date: Mon Nov 30 15:38:21 2020 +0100 Merge tag 'misc-habanalabs-next-2020-11-30' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux into char-misc-next This tag contains habanalabs driver changes for v5.11-rc1: - Add support for ability to perform collective stream sync. This is basically a synchronization between compute and network streams. - Add initialization of NIC QMANs and security configuration. This is a pre-requisite for upstreaming the NIC ETH and RDMA code. - Add option to scrub all internal memory (SRAM and DRAM) when the user closes the file-descriptor - Support new firmware that provide enhanced device security. This includes many changes that basically amounts to moving certain configurations to the firmware and stop reading registers directly and instead receiving the information from the firmware. For example: - Retrieve HBM ECC error information - Retrieve PLL configuration - Configure of internal credits, rate-limitation - Support new firmware that performs the GAUDI device reset instead of the driver. The driver now asks the firmware to do it. - Some changes were done as Pre-requisite for future ASICs support: - Add option to put the device's PCI MMU page tables on the host memory. - Support loading multiple types of firmware. - Adding option to user to inquire about usage counter of Command buffer. - Support taking timestamp of Command Submission when it completes and providing it to the user. - Change aggregate cs counters to atomic and fix the cs counters structure to support addition of new counters in the future - Update email address nad git repo of the driver in MAINTAINERS - Many small bug fixes and improvements, such as: - Refactoring in MMU code to move code from ASIC-dependant files to common code - Minimize driver prints when no errors occur - Using enums, defines instead of hard-coded values - Refactoring of Command Submission flow to make it more readable now that we have multiple types of Command Submissions. * tag 'misc-habanalabs-next-2020-11-30' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux: (76 commits) habanalabs: Add CB IOCTL opcode to retrieve CB information habanalabs: Modify the cs_cnt of a CB to be atomic habanalabs: Add mask for CS type bits in CS flags habanalabs: change messages to debug level habanalabs: free host huge va_range if not used habanalabs/gaudi: handle reset when f/w is in preboot habanalabs: add missing counter update habanalabs: add ull to PLL masks habanalabs: add support for cs with timestamp habanalabs: indicate to user that a cs is gone habanalabs/gaudi: print ECC type field habanalabs: update firmware files habanalabs: gaudi_ctx_fini() can be static habanalabs: goya_reset_sob_group() can be static habanalabs: fetch pll frequency from firmware habanalabs: mmu map wrapper for sizes larger than a page habanalabs: print CS type when it is stuck habanalabs/gaudi: align to new FW reset scheme habanalabs: firmware returns 64bit argument habanalabs: fix MMU debugfs operations ... commit 64d81113931b3f73ce2f5783c1032892c5046f93 Author: Yuantian Tang Date: Tue Nov 17 11:43:04 2020 +0800 arm64: dts: freescale: update calibration table for TMU module Update the calibration table to make the temperature more accurate. Three platforms have been updated: ls1012a, ls1043a and ls1046a. Signed-off-by: Yuantian Tang Signed-off-by: Shawn Guo commit 91ab1c12285c9999afe56c09aa296d8b96862976 Author: Michael Walle Date: Sun Nov 15 23:54:35 2020 +0100 arm64: dts: freescale: sl28: combine SPI MTD partitions The upstream port, doesn't really follow the vendor partitioning. The bootloader partition has one U-Boot FIT image containing all needed bits and pieces. Even today the bootloader is already larger than the current "bootloader" partition. Thus, fold all the partitions into one and keep the environment one. The latter is still valid. We keep the failsafe partitions because the first half of the SPI flash is preinstalled by the vendor and immutable. Fixes: 815364d0424e ("arm64: dts: freescale: add Kontron sl28 support") Signed-off-by: Michael Walle Signed-off-by: Shawn Guo commit f90931aeefe3f3edd2556806bbe59df3a5a9790d Author: Michael Walle Date: Sun Nov 15 23:53:14 2020 +0100 arm64: dts: ls1028a: add optee node Add the optee node which can either be enabled by a specific board or by the bootloader. Signed-off-by: Michael Walle Signed-off-by: Shawn Guo commit 588b17eda1356e06efa4b888d0af02c80a2788f6 Author: Michael Walle Date: Sun Nov 8 19:51:06 2020 +0100 arm64: dts: ls1028a: fix FlexSPI clock input On the LS1028A the FlexSPI clock is connected to the first HWA output, see Figure 7 "Clock subsystem block diagram". Fixes: c77fae5ba09a ("arm64: dts: ls1028a: Add FlexSPI support") Signed-off-by: Michael Walle Signed-off-by: Shawn Guo commit d0570a575aa83116bd0f6a99c4de548af773d950 Author: Michael Walle Date: Sun Nov 8 19:51:05 2020 +0100 arm64: dts: ls1028a: fix ENETC PTP clock input On the LS1028A the ENETC reference clock is connected to 4th HWA output, see Figure 7 "Clock subsystem block diagram". The PHC may run with a wrong frequency. ptp_qoriq_auto_config() will read the clock speed of the clock given in the device tree. It is likely that, on the reference board this wasn't noticed because both clocks have the same frequency. But this must not be always the case. Fix it. Fixes: 49401003e260 ("arm64: dts: fsl: ls1028a: add ENETC 1588 timer node") Signed-off-by: Michael Walle Signed-off-by: Shawn Guo commit bd5840df916dc57929af727ff99b63a93be096c6 Author: Nathan Chancellor Date: Sun Nov 8 12:16:15 2020 -0700 arm64: dts: imx: Fix imx8mm-kontron-n801x-s.dtb target While running 'make dtbs_install', the following error occurs: make[3]: *** No rule to make target 'rootfs/freescale/imx8mm-kontron-n801x-s.dts', needed by '__dtbs_install'. It should be .dtb, not .dts. Fixes: 8668d8b2e67f ("arm64: dts: Add the Kontron i.MX8M Mini SoMs and baseboards") Reviewed-by: Krzysztof Kozlowski Signed-off-by: Nathan Chancellor Reviewed-by: Frieder Schrempf Signed-off-by: Shawn Guo commit 29939851a633cd2be1a6e78e3349169a017d0f73 Author: Joakim Zhang Date: Mon Nov 2 10:25:27 2020 +0800 arm64: dts: imx8mn-evk: add IR support Add IR support on i.MX8MN EVK board. Signed-off-by: Joakim Zhang Signed-off-by: Shawn Guo commit 56e08dc3a62d27531fea16a92797573525ddf3f0 Author: Joakim Zhang Date: Mon Nov 2 10:25:26 2020 +0800 arm64: dts: imx8mm-evk: add IR support Add IR support on i.MX8MM EVK board. Signed-off-by: Joakim Zhang Signed-off-by: Shawn Guo commit 4d583263f4c9e6aded6f56f4963fa53f747c83c5 Author: Joakim Zhang Date: Mon Nov 2 10:25:25 2020 +0800 arm64: dts: imx8mq-evk: add linux,autosuspend-period property for IR Add linux,autosuspend-period property for IR, details please refer to: commit ff1c9223b7b8 ("media: rc: gpio-ir-recv: add QoS support for cpuidle system") Signed-off-by: Joakim Zhang Signed-off-by: Shawn Guo commit 3a7d56b3cdc90cbc1d854e0dbde4f2de83bbe6d7 Author: Joakim Zhang Date: Mon Nov 2 10:16:34 2020 +0800 arm64: dts: imx8mp-evk: add CAN support Add CAN device node and pinctrl on i.MX8MP evk board. Signed-off-by: Joakim Zhang Signed-off-by: Shawn Guo commit 08a1a2e205e3a5159a9dcc2c0019e6f9c1e04f90 Author: Shengjiu Wang Date: Mon Nov 2 10:11:17 2020 +0800 arm64: dts: imx8mq-evk: Add spdif sound card support There are two spdif IP on imx8mq, spdif1 is for normal spdif device, spdif2 is for HDMI ARC interface. Enable these spdif sound card in this patch. Signed-off-by: Shengjiu Wang Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 71fa01d3a909446ca70c3b751f5a1124b2552329 Author: Shengjiu Wang Date: Mon Nov 2 10:11:16 2020 +0800 arm64: dts: imx8mq: Configure clock rate for audio plls Configure clock rate for audio plls. audio pll1 is used as parent clock for clocks that is multiple of 8kHz. audio pll2 is used as parent clock for clocks that is multiple of 11kHz. Signed-off-by: Shengjiu Wang Signed-off-by: Shawn Guo commit b6abb31375ededd7d87d5a9b117ee77ca9817fc1 Author: Xiaowei Bao Date: Mon Nov 2 13:44:17 2020 +0800 arm64: dts: layerscape: Add PCIe EP node for ls1088a Add PCIe EP node for ls1088a to support EP mode. Signed-off-by: Xiaowei Bao Signed-off-by: Hou Zhiqiang Reviewed-by: Andrew Murray Signed-off-by: Shawn Guo commit f0f3531f3a540b7d6effa451873b0fefd073e182 Author: Ioana Ciornei Date: Fri Oct 30 13:35:55 2020 +0200 arm64: dts: lx2160ardb: add nodes for the AQR107 PHYs Annotate the EMDIO1 node and describe the 2 AQR107 PHYs found on the LX2160ARDB board. Also, add the necessary phy-handles for DPMACs 3 and 4 to their associated PHY. Signed-off-by: Ioana Ciornei Signed-off-by: Shawn Guo commit f94cfe322f3c9f15e8b0fd0e75bb3acdf5927b84 Author: Ioana Ciornei Date: Fri Oct 30 13:35:54 2020 +0200 arm64: dts: lx2160a: add PCS MDIO and PCS PHY nodes Add PCS MDIO nodes for the internal MDIO buses on the LX2160A, along with their internal PCS PHYs, which will be used when the DPMAC is in TYPE_PHY mode. Also, rename the dpmac@x nodes to ethernet@x in order to be compliant with the naming convention used by ethernet controllers. Signed-off-by: Ioana Ciornei Signed-off-by: Shawn Guo commit 2e7c4c3c2fe7da00bd4061b32307dad4eeb9b39e Author: Ioana Ciornei Date: Fri Oct 30 13:35:53 2020 +0200 arm64: dts: ls208xa: add PCS MDIO and PCS PHY nodes Add PCS MDIO nodes for the internal MDIO buses on the LS208x SoCs, along with their internal PCS PHYs which will be used when the DPMAC object is in TYPE_PHY mode. Also, rename the dpmac@x nodes to ethernet@x in order to be compliant with the naming convention used by ethernet controllers. Signed-off-by: Ioana Ciornei Signed-off-by: Shawn Guo commit dd2ab5c8b81e23847db5477033fc14f9b8783db2 Author: Ioana Ciornei Date: Fri Oct 30 13:35:52 2020 +0200 arm64: dts: ls2088ardb: add PHY nodes for the AQR405 PHYs Annotate the EMDIO2 node and describe the other 4 10GBASER PHYs found on the LS2088ARDB board. Also, add phy-handles for DPMACs 5-8 to their associated PHY. Signed-off-by: Ioana Ciornei Signed-off-by: Shawn Guo commit 173fb0a3f9fb3ce416d2cb78476e0406a6db7490 Author: Ioana Ciornei Date: Fri Oct 30 13:35:51 2020 +0200 arm64: dts: ls2088ardb: add PHY nodes for the CS4340 PHYs Annotate the EMDIO1 node and describe the 4 10GBASER PHYs found on the LS2088ARDB board. Also, add phy-handles for DPMACs 1-4 to their associated PHY. Signed-off-by: Ioana Ciornei Signed-off-by: Shawn Guo commit 0420dde30a90534d7272847aea3f55845b3af22c Author: Ioana Ciornei Date: Fri Oct 30 13:35:50 2020 +0200 arm64: dts: ls208xa: add the external MDIO nodes Add the external MDIO device nodes 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 379b4f764563c094c00aa547c1ff8f4aeda72e23 Author: Ioana Ciornei Date: Fri Oct 30 13:35:49 2020 +0200 arm64: dts: ls1088ardb: add necessary DTS nodes for DPMAC2 Annotate the external MDIO2 node and describe the 10GBASER PHY found on the LS1088ARDB board and add a phy-handle for DPMAC2 to link it. Also, add the internal PCS MDIO node for the internal MDIO buses found on the LS1088A SoC along with its internal PCS PHY and link the corresponding DPMAC to the PCS through the pcs-handle. Signed-off-by: Ioana Ciornei Signed-off-by: Shawn Guo commit 73f034cc45e9bd554003919873066a2acbe0cf22 Author: Ioana Ciornei Date: Fri Oct 30 13:35:48 2020 +0200 arm64: dts: ls1088ardb: add QSGMII PHY nodes Annotate the external MDIO1 node and describe the 8 QSGMII PHYs found on the LS1088ARDB board and add phy-handles for DPMACs 3-10 to its associated PHY. Also, add the internal PCS MDIO nodes for the internal MDIO buses found on the LS1088A SoC along with their internal PCS PHY and link the corresponding DPMAC to the PCS through the pcs-handle. Also, rename the dpmac@x nodes to ethernet@x in order to be compliant with the naming convention used by ethernet controllers. Signed-off-by: Ioana Ciornei Signed-off-by: Shawn Guo commit bbe75af7b092f2d15a146328c107a3ebb5d1e25f Author: Ioana Ciornei Date: Fri Oct 30 13:35:47 2020 +0200 arm64: dts: ls1088a: add external MDIO device nodes Add the external MDIO device nodes 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 87f7ba165168ee0bff0baf6ded6d4dfa5bba1217 Author: Meenakshi Aggarwal Date: Mon Nov 2 11:29:41 2020 +0530 arm64: dts: lx2160a: add device tree for lx2162aqds board Add device tree support for LX2162AQDS board. LX2162A has same die as of LX2160A with different packaging. Signed-off-by: Ioana Ciornei Signed-off-by: Kuldeep Singh Signed-off-by: Meenakshi Aggarwal Signed-off-by: Shawn Guo commit 60a9d6ab2fdd5cac6366eb27de2469c7abee5696 Author: Adam Ford Date: Sat Oct 31 07:31:14 2020 -0500 arm64: dts: imx8mm-beacon-som: Fix whitespace issue The pinmux subnodes are indented too much. This patch does nothing more than remove an extra tab. There are no functional changes. Signed-off-by: Adam Ford Signed-off-by: Shawn Guo commit 51b632c713d50586a844259c56048a280f375406 Author: Aryan Srivastava Date: Thu Nov 26 17:45:44 2020 +1300 ARM: dts: mvebu: Add device tree for RD-AC3X-48G4X2XL board Add device tree for RD-AC3X-48G4X2XL board. This has a Armada 382 SoC on a interposer board connected to a baseboard with a Prestera AC3X ASIC connected via PCI. Signed-off-by: Aryan Srivastava Reviewed-by: Chris Packham Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT commit 98ac141b96034c5d79b512c2db61cd4b0442939d Author: Serge Semin Date: Wed Nov 11 12:15:46 2020 +0300 arm: dts: marvell: armada-375: Harmonize DWC USB3 DT nodes name In accordance with the DWC USB3 bindings the corresponding node name is suppose to comply with the Generic USB HCD DT schema, which requires the USB nodes to have the name acceptable by the regexp: "^usb(@.*)?" . Make sure the "snps,dwc3"-compatible nodes are correctly named. Signed-off-by: Serge Semin Acked-by: Krzysztof Kozlowski Signed-off-by: Gregory CLEMENT commit 6d9986b46fc12f4a36fc243698deb774323b76f3 Author: Marc Kleine-Budde Date: Mon Nov 30 14:37:13 2020 +0100 can: m_can: m_can_class_unregister(): move right after m_can_class_register() This patch moves the function m_can_class_unregister() directly after the m_can_class_register() function. Link: https://lore.kernel.org/r/20201130133713.269256-7-mkl@pengutronix.de Reviewed-by: Dan Murphy Signed-off-by: Marc Kleine-Budde commit ba844cb96f7735cbfea925c5fc723d8d769d5c51 Author: Marc Kleine-Budde Date: Mon Nov 30 14:37:12 2020 +0100 can: m_can: m_can_plat_remove(): remove unneeded platform_set_drvdata() There's no need to unset the drvdata on remove, so remove the unneeded call to platform_set_drvdata() in m_can_plat_remove(). Link: https://lore.kernel.org/r/20201130133713.269256-6-mkl@pengutronix.de Reviewed-by: Dan Murphy Signed-off-by: Marc Kleine-Budde commit 3fb5a7cef92b0c81c66fb0286ee92f64fdca44e4 Author: Marc Kleine-Budde Date: Mon Nov 30 14:37:11 2020 +0100 can: m_can: remove not used variable struct m_can_classdev::freq This patch removes the unused variable freq from the struct m_can_classdev. Link: https://lore.kernel.org/r/20201130133713.269256-5-mkl@pengutronix.de Reviewed-by: Dan Murphy Signed-off-by: Marc Kleine-Budde commit f566373fc5344c74e85832e6fb5674f0fa6e5d37 Author: Marc Kleine-Budde Date: Mon Nov 30 14:37:10 2020 +0100 can: m_can: Kconfig: convert the into menu Since there is more than one base driver for the m_can core, let's convert this into a menu. Link: https://lore.kernel.org/r/20201130133713.269256-4-mkl@pengutronix.de Reviewed-by: Dan Murphy Signed-off-by: Marc Kleine-Budde commit ca3ad869dab1d2fb3dfa070053f1859746a617e3 Author: Marc Kleine-Budde Date: Mon Nov 30 14:37:09 2020 +0100 can: tcan4x5x: tcan4x5x_can_probe(): remove probe failed error message The driver core already emits a probe failed error message, so remove this one from the driver. Link: https://lore.kernel.org/r/20201130133713.269256-3-mkl@pengutronix.de Reviewed-by: Dan Murphy Signed-off-by: Marc Kleine-Budde commit 225dfc2552005ea8dd2b50f6a4a04a2b9ff52d3e Author: Marc Kleine-Budde Date: Mon Nov 30 14:37:08 2020 +0100 can: tcan4x5x: remove mram_start and reg_offset from struct tcan4x5x_priv Both struct tcan4x5x_priv::mram_start and struct tcan4x5x_priv::reg_offset are only assigned once with a constant and then always used read-only. This patch changes the driver to use the constant directly instead. Link: https://lore.kernel.org/r/20201130133713.269256-2-mkl@pengutronix.de Reviewed-by: Dan Murphy Signed-off-by: Marc Kleine-Budde commit 43d2479687c93ed9b93774ef9b46b37de5b3efcc Author: Dong Aisheng Date: Thu Nov 19 19:43:02 2020 +0800 clk: imx: scu: remove the calling of device_is_bound The device_is_bound() is invisible to drivers when built as modules. It's also not aimed to be used by drivers according to Greg K.H. Let's remove it from clk-scu driver and find another way to do proper driver loading sequence. Cc: Shawn Guo Cc: Sascha Hauer Cc: Stephen Boyd Fixes: 77d8f3068c63 ("clk: imx: scu: add two cells binding support") Reported-by: Sudip Mukherjee Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo commit 4615fbc3788ddc8e7c6d697714ad35a53729aa2c Author: Marc Zyngier Date: Sun Nov 29 13:55:51 2020 +0000 genirq/irqdomain: Don't try to free an interrupt that has no mapping When an interrupt allocation fails for N interrupts, it is pretty common for the error handling code to free the same number of interrupts, no matter how many interrupts have actually been allocated. This may result in the domain freeing code to be unexpectedly called for interrupts that have no mapping in that domain. Things end pretty badly. Instead, add some checks to irq_domain_free_irqs_hierarchy() to make sure that thiss does not follow the hierarchy if no mapping exists for a given interrupt. Fixes: 6a6544e520abe ("genirq/irqdomain: Remove auto-recursive hierarchy support") Signed-off-by: Marc Zyngier Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201129135551.396777-1-maz@kernel.org commit 018a0c5845d6da8613a1448b169e96c81dce2531 Author: Dan Murphy Date: Wed Feb 26 08:03:58 2020 -0600 can: tcan4x5x: rename parse_config() function Rename the tcan4x5x_parse_config() function to tcan4x5x_get_gpios() since the function retrieves the gpio configurations from the firmware. Signed-off-by: Dan Murphy Link: http://lore.kernel.org/r/20200226140358.30017-1-dmurphy@ti.com Signed-off-by: Marc Kleine-Budde commit 1a37e18bd4b97df8b51a0e05e314d88de0f915ca Author: Andrew Klychkov Date: Sun Nov 29 22:29:28 2020 +0300 Documentation: fix typos in dev-tools/kasan.rst Documentation: dev-tools: kasan.rst: fix typos Signed-off-by: Andrew Klychkov Link: https://lore.kernel.org/r/20201129192928.GA5692@ak-VirtualBox Signed-off-by: Jonathan Corbet commit e56ed188c83053a505041e1a8ad4fba0f3b39089 Author: Alexis Ballier Date: Thu Oct 22 13:35:32 2020 +0200 arm64: dts: rockchip: Properly define the type C connector on rk3399-orangepi Tested: - USB3 Gigabit adapter - USB2 mass storage The wiring is the same as the pinebook pro according to the schematics, thus this patch is heavily based on its dts. Signed-off-by: Alexis Ballier Cc: devicetree@vger.kernel.org Cc: Heiko Stuebner Cc: linux-arm-kernel@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/20201022113532.18470-1-aballier@gentoo.org Signed-off-by: Heiko Stuebner commit 29952fea5e85083374d19cb0a33206962e087d5b Author: Jagan Teki Date: Fri Oct 23 23:48:14 2020 +0530 ARM: dts: rockchip: Add SDIO0 node for VMARC SOM Rockchip RK3288 and RK3399Pro based VMARC SOM has sdio0 for connecting WiFi/BT devices as a pluggable card via M.2 E-Key. Add associated sdio0 nodes, properties. Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20201023181814.220974-2-jagan@amarulasolutions.com [moved the unrelated rtc addition to a separate patch] Signed-off-by: Heiko Stuebner commit 3f4f3bdadd802dfa1cbb5b905507fdb2e940e830 Author: Jagan Teki Date: Mon Nov 30 14:28:14 2020 +0100 ARM: dts: rockchip: Add rtc node for VMARC SOM Add the hym8563 rtc found on the rk3288 variant of the VMARC SOM. Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20201023181814.220974-2-jagan@amarulasolutions.com [split out of the original patch, as it was a change unrelated to the commit description] Signed-off-by: Heiko Stuebner commit cd48ce86a4d0c1ffec86aa46a26da993c9af5f53 Author: Faiz Abbas Date: Sun Nov 29 23:22:23 2020 +0530 arm64: dts: ti: k3-j721e-common-proc-board: Add support for SD card UHS modes Add support for UHS modes for the SD card connected at sdhci1. This involves adding regulators for voltage switching and power cycling the SD card and removing the no-1-8-v property. Signed-off-by: Faiz Abbas Signed-off-by: Sekhar Nori Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20201129175223.21751-3-nsekhar@ti.com commit 09ff4e90e041485f7562d9baec340a9824af4f45 Author: Faiz Abbas Date: Sun Nov 29 23:22:22 2020 +0530 arm64: dts: ti: k3-j721e-main: Add output tap delay values Add output tap delay values as given in the latest Data Manual[1], SPRSP36E, revised December 2019. [1] https://www.ti.com/lit/gpn/tda4vm Signed-off-by: Faiz Abbas Signed-off-by: Sekhar Nori Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20201129175223.21751-2-nsekhar@ti.com commit 8cb4c20f32f542f78a57e1c6464721526d046acc Author: Julian Wiedmann Date: Mon Nov 9 14:41:07 2020 +0100 s390/ap: let bus_register() add the AP bus sysfs attributes Instead of creating the sysfs attributes for the AP bus by hand, describe them in .bus_groups and let the driver core handle it. Signed-off-by: Julian Wiedmann Signed-off-my: Harald Freudenberger Signed-off-by: Heiko Carstens commit 1ab3001b6efb78e0293f3f02307720f6094db1ae Author: Heiko Carstens Date: Tue Nov 24 14:02:35 2020 +0100 s390/vdso: add missing prototypes for vdso functions clang W=1 warns about missing prototypes: >> arch/s390/kernel/vdso64/getcpu.c:8:5: warning: no previous prototype for function '__s390_vdso_getcpu' [-Wmissing-prototypes] int __s390_vdso_getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *unused) ^ Add a local header file in order to get rid of this warnings. Reported-by: kernel test robot Signed-off-by: Heiko Carstens commit 10e59217479d733ff50b6e8c6316ecffe8b857cb Author: Niklas Schnelle Date: Thu Nov 19 11:38:46 2020 +0100 s390/Kconfig: default PCI_NR_FUNCTIONS to 512 With the addition of more complete SR-IOV support, we are recommending to raise this limit for distributions to 512, as the previous default of 128 can easily be hit with just the VFs of a single PCI physical function. With at least one distribution now shipping with this, supporting only one fourth as many PCI functions on a default upstream build may lead to confusion and reduced testing of the higher limit so increase the default to 512. Acked-by: Christian Borntraeger Signed-off-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit 6cd4c6459e47402ab90802eca61a18b231434053 Author: Lars-Peter Clausen Date: Fri Nov 27 13:30:30 2020 +0100 ASoC: Add ADAU1372 audio CODEC support Add support for the Analog Devices ADAU1372 audio CODEC. [Alexandre Belloni: allow 32kHz for TDM4 in slave mode] Signed-off-by: Lars-Peter Clausen Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201127123030.1610574-2-alexandre.belloni@bootlin.com Signed-off-by: Mark Brown commit 32025c7c50c602a6c0bc3bef0e9a774003e2e7ae Author: Alexandre Belloni Date: Fri Nov 27 13:30:29 2020 +0100 ASoC: adau1372: Add bindings documentation Add device tree binding documentation for Analog Devices ADAU1372. Signed-off-by: Alexandre Belloni Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201127123030.1610574-1-alexandre.belloni@bootlin.com Signed-off-by: Mark Brown commit d3795d6321ecaa55d94dc24c3b1e3cce608aabd6 Author: Jagan Teki Date: Mon Nov 30 16:53:29 2020 +0530 regulator: Add NXP PF8X00 regulator driver Add NXP PF8100/PF8121A/PF8200 regulator driver. PF8100/PF8121A/PF8200 is PMIC designed for highperformance consumer applications. It features seven high efficiency buck, four linear and one vsnvs regulators. Tested in Engicam i.Core MX8M Mini SOM platform boards. Signed-off-by: Troy Kisky Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20201130112329.104614-2-jagan@amarulasolutions.com Signed-off-by: Mark Brown commit 4b748fb3448b5d39a58cdea55d72e8dcd128f4c6 Author: Jagan Teki Date: Mon Nov 30 16:53:28 2020 +0530 regulator: Add pf8x00 regulator bindings Add NXP PF8100/PF8121A/PF8200 regulators bindings. Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20201130112329.104614-1-jagan@amarulasolutions.com Signed-off-by: Mark Brown commit fd643db5a8797dde0fe8d6f2fd01f36971d43fe0 Author: Arnaldo Carvalho de Melo Date: Mon Nov 30 09:54:08 2020 -0300 perf evlist: Ditch unused set/reset sample_bit methods Not used anymore, ditch them. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit ddfbe828f2ed13f9145c5c5fa17cb0a1b58e0bc9 Author: Kuninori Morimoto Date: Mon Nov 30 08:45:26 2020 +0900 ASoC: add soc-jack.h ALSA SoC has soc-jack.c, but doesn't have soc-jack.h. This patch creates new soc-jack.h and moves snd_soc_jack_xxx() from soc.h. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87wny3u3zg.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 9e8434a0083b135b7fc34bd8fbd7cb99a47b3c08 Author: Kuninori Morimoto Date: Mon Nov 30 08:45:19 2020 +0900 ASoC: soc-core: tidyup jack.h soc-core.c don't need sound/jack.h anymore, but asoc.h needs it. This patch fixup header magic. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87y2iju3zm.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 122541f2b10897b08f7f7e6db5f1eb693e51f0a1 Author: Rasmus Villemoes Date: Fri Nov 27 16:29:47 2020 +0100 spi: fsl: fix use of spisel_boot signal on MPC8309 Commit 0f0581b24bd0 ("spi: fsl: Convert to use CS GPIO descriptors") broke the use of the SPISEL_BOOT signal as a chip select on the MPC8309. pdata->max_chipselect, which becomes master->num_chipselect, must be initialized to take into account the possibility that there's one more chip select in use than the number of GPIO chip selects. Cc: stable@vger.kernel.org # v5.4+ Cc: Christophe Leroy Cc: Linus Walleij Fixes: 0f0581b24bd0 ("spi: fsl: Convert to use CS GPIO descriptors") Signed-off-by: Rasmus Villemoes Link: https://lore.kernel.org/r/20201127152947.376-1-rasmus.villemoes@prevas.dk Signed-off-by: Mark Brown commit bbe1f69dce94089943cc407a88325ae7e851d49c Author: Lumi Lee Date: Mon Nov 30 11:11:15 2020 +0800 ASoC: mediatek: btcvsd fix tx stream assign Fix tx/rx stream assign in write. Write should use tx instead of rx. Signed-off-by: Lumi Lee Link: https://lore.kernel.org/r/1606705875-1940-1-git-send-email-Lumi.Lee@mediatek.com Signed-off-by: Mark Brown commit ab5893fdc0693e4f747ef26194b6bbf628bdb044 Author: Takashi Iwai Date: Fri Nov 27 15:31:59 2020 +0100 ASoC: amd: Return -ENODEV for non-existing ACPI call AMD Renoir driver tries to identify the presence of DMIC by evaluating ACPI _WOV entry, and it returns -EINVAL when the ACPI call failed. This ended up an error message like snd_rn_pci_acp3x: probe of 0000:04:00.5 failed with error -22 although the system is correctly set up. For avoiding such a superfluous error message, change the return value to -ENODEV. Then the driver core just skips to the next one without complaining. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20201127143200.16272-3-tiwai@suse.de Signed-off-by: Mark Brown commit 2509bb342e476e740db448cce09c19b92905194e Author: Takashi Iwai Date: Fri Nov 27 15:31:58 2020 +0100 ASoC: amd: Downgrade print level for invalid ACP mode The acp3x raven driver skips the probing when the given device isn't connected with I2S. This skip behavior itself is fine, but the driver also emits an error message "Invalid ACP audio mode" with KERN_ERR. This isn't nice since it appears on the boot screen even if a boot splash is running, although this itself is no real error. Downgrade the print level to KERN_INFO so that this message won't appear on the console unnecessarily. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20201127143200.16272-2-tiwai@suse.de Signed-off-by: Mark Brown commit b02736f776d5f50bb13ff85eb34efaed0c3f5ffa Author: Arnaldo Carvalho de Melo Date: Mon Nov 30 09:48:07 2020 -0300 perf evlist: Use the right prefix for 'struct evlist' 'find' methods perf_evlist__ is for 'struct perf_evlist' methods, in tools/lib/perf/, go on completing this split. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 2a6599cd5e093b3c607a39288f14a618c03a0e24 Author: Arnaldo Carvalho de Melo Date: Mon Nov 30 09:43:07 2020 -0300 perf evlist: Use the right prefix for 'struct evlist' sample parsing methods perf_evlist__ is for 'struct perf_evlist' methods, in tools/lib/perf/, go on completing this split. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 08c83997ca87f9e162563a59ea43eabadc9e4231 Author: Arnaldo Carvalho de Melo Date: Mon Nov 30 09:40:10 2020 -0300 perf evlist: Use the right prefix for 'struct evlist' sideband thread methods perf_evlist__ is for 'struct perf_evlist' methods, in tools/lib/perf/, go on completing this split. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 24bf91a7540bc0d14c389dd4f612eea57c06dc93 Author: Arnaldo Carvalho de Melo Date: Mon Nov 30 09:38:02 2020 -0300 perf evlist: Use the right prefix for 'struct evlist' 'filter' methods perf_evlist__ is for 'struct perf_evlist' methods, in tools/lib/perf/, go on completing this split. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit ade9d208d6f054c0cd69af16c0a23af62b3da3b8 Author: Arnaldo Carvalho de Melo Date: Mon Nov 30 09:33:55 2020 -0300 perf evlist: Use the right prefix for 'struct evlist' 'toggle' methods perf_evlist__ is for 'struct perf_evlist' methods, in tools/lib/perf/, go on completing this split. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 53f5e9084d0195209bfc7e5fa547fd35bbaadbee Author: Arnaldo Carvalho de Melo Date: Mon Nov 30 09:31:04 2020 -0300 perf evlist: Use the right prefix for 'struct evlist' stats methods perf_evlist__ is for 'struct perf_evlist' methods, in tools/lib/perf/, go on completing this split. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 7b392ef04ef570c15de8fc0d36171f9bc80dd539 Author: Arnaldo Carvalho de Melo Date: Mon Nov 30 09:26:54 2020 -0300 perf evlist: Use the right prefix for 'struct evlist' 'workload' methods perf_evlist__ is for 'struct perf_evlist' methods, in tools/lib/perf/, go on completing this split. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit a622eafa1a54043c2eaedfccdd1b1ee5ffeb9d06 Author: Arnaldo Carvalho de Melo Date: Mon Nov 30 09:22:07 2020 -0300 perf evlist: Use the right prefix for 'struct evlist' methods: evlist__set_leader() perf_evlist__ is for 'struct perf_evlist' methods, in tools/lib/perf/, go on completing this split. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 56933029d00c5aaac8ccdc22f1b536dd272902be Author: Arnaldo Carvalho de Melo Date: Mon Nov 30 09:08:24 2020 -0300 perf evsel: Convert last 'struct evsel' methods to the right evsel__ prefix As 'perf_evsel__' means its a function in tools/lib/perf/. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 94b69c615e4e2b04d1392d1193c72406ff9fd73e Author: Namhyung Kim Date: Fri Nov 27 13:14:04 2020 +0900 perf test: Add shadow stat test It calculates IPC from the cycles and instruction counts and compares it with the shadow stat for both global aggregation (default) and no aggregation mode. $ perf stat -a -A -e cycles,instructions sleep 1 Performance counter stats for 'system wide': CPU0 39,580,880 cycles CPU1 45,426,945 cycles CPU2 31,151,685 cycles CPU3 55,167,421 cycles CPU0 17,073,564 instructions # 0.43 insn per cycle CPU1 34,955,764 instructions # 0.77 insn per cycle CPU2 15,688,459 instructions # 0.50 insn per cycle CPU3 34,699,217 instructions # 0.63 insn per cycle 1.003275495 seconds time elapsed In this example, the 'insn per cycle' should be matched to the number for each cpu. For CPU2, 0.50 = 15,688,459 / 31,151,685 . Committer testing: # perf test shadow 78: perf stat metrics (shadow stat) test : Ok # Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Ian Rogers Cc: Mark Rutland Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20201127041404.390276-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 1f195e557d137be004894d2016357013331ec3d0 Merge: fd4ebb457c9ca b65054597872c Author: Arnaldo Carvalho de Melo Date: Mon Nov 30 08:56:55 2020 -0300 Merge remote-tracking branch 'torvalds/master' into perf/core To pick up fixes. Signed-off-by: Arnaldo Carvalho de Melo commit db0746e3399ee87ee5f957880811da16faa89fb8 Author: Mika Westerberg Date: Fri Jan 31 19:24:30 2020 +0300 thunderbolt: Add support for Intel Maple Ridge Maple Ridge is first discrete USB4 host controller from Intel. It comes with firmware based connection manager and the flows are similar as used in Intel Titan Ridge. Signed-off-by: Mika Westerberg commit 9039387e166edab35c89ddcc057529e332cc4089 Author: Mika Westerberg Date: Tue Nov 3 13:55:32 2020 +0200 thunderbolt: Add USB4 router operation proxy for firmware connection manager Intel Maple Ridge and Tiger Lake connection manager firmware implements a USB4 router operation proxy that should be used instead of direct register access to avoid races with the firmware. This is supported in all firmwares where the protocol version field returned in the driver ready response is 3 (or higher). This adds the USB4 router proxy operations support to the driver so that we first check the protocol version and if it is 3 (or higher) the USB4 router operation is run through the firmware provided proxy. Otherwise the native version is used. Most USB4 router proxy operations are pretty straightforward except NVM_AUTH where the firmware only responds once the router is restarted but before it sends device connected notification. To support this we split the operation so that the reply is received asynchronously and stored to struct icm. This last reply is then returned in icm_usb4_switch_nvm_authenticate_status() if available. Signed-off-by: Mika Westerberg commit 579f14217c952975e7d11e300c669af0c47bfe04 Author: Mika Westerberg Date: Thu Nov 12 15:45:18 2020 +0200 thunderbolt: Move constants for USB4 router operations to tb_regs.h We are going to use these in subsequent patch so make them available outside of usb4.c. Signed-off-by: Mika Westerberg commit 9490f71167feba55349e33854f5e51a1a3af9e8c Author: Mika Westerberg Date: Tue Nov 3 13:58:00 2020 +0200 thunderbolt: Add connection manager specific hooks for USB4 router operations Intel USB4 host routers that run the firmware based connection manager (ICM) may implement a proxy for USB4 router operations. This is to avoid the firmware to race with the OS driver, as both may need to run these operations. This adds two new connection manager specific callbacks which, if provided, get called instead of the native USB4 router operation. Signed-off-by: Mika Westerberg commit 83bab44ada0512b054844e661279d68d0c8f3d03 Author: Mika Westerberg Date: Mon Nov 2 15:09:44 2020 +0200 thunderbolt: Pass TX and RX data directly to usb4_switch_op() We are going to make usb4_switch_op() to match better the corresponding firmware (ICM) USB4 router operation proxy interface, so that we can use either based on the connection manager implementation. For this reason rename usb4_switch_op() to __usb4_switch_op() that provides the most complete interface. Then make usb4_switch_op() and usb4_switch_op_data() call it with correct set of parameters and update the callers accordingly. Signed-off-by: Mika Westerberg commit fe265a06319bfa27cfbccd3305d93b33b78f48f2 Author: Mika Westerberg Date: Mon Nov 2 14:54:23 2020 +0200 thunderbolt: Pass metadata directly to usb4_switch_op() We are going to make usb4_switch_op() to match better the corresponding firmware (ICM) USB4 router operation proxy interface, so that we can use either based on the connection manager implementation. For this reason pass metadata directly to usb4_switch_op(). Signed-off-by: Mika Westerberg commit 661b19473bf3ac0924560f0cbf84c15458b3c8de Author: Mika Westerberg Date: Tue Nov 10 11:34:07 2020 +0300 thunderbolt: Perform USB4 router NVM upgrade in two phases The currect code expects that the router returns back the status of the NVM authentication immediately. When tested against a real USB4 device what happens is that the router is reset and only after that the result is updated in the ROUTER_CS_26 register status field. This also seems to align better what the spec suggests. For this reason do the same what we already do with the Thunderbolt 3 devices and perform the NVM upgrade in two phases. First start the NVM_AUTH router operation and once the router is added back after the reset read the status in ROUTER_CS_26 and expose it to the userspace accordingly. Signed-off-by: Mika Westerberg commit 463e48fa544826898791085508459de246fc4c09 Author: Mika Westerberg Date: Tue Nov 17 13:19:41 2020 +0300 thunderbolt: Return -ENOTCONN when ERR_CONN is received This allows the calling code to distinguish if the error was due to ERR_CONN (adapter is disconneced or disabled) or something else. Will be needed in USB4 router NVM update in the following patch. Signed-off-by: Mika Westerberg commit b658eb9d9075aa2b44834962a1efc4bc78e9bed8 Author: Mika Westerberg Date: Tue Nov 10 11:04:31 2020 +0300 thunderbolt: Keep the parent runtime resumed for a while on device disconnect When doing device firmware upgrade the device will disconnect for a while and then reconnect back. Keep the parent device (and the whole domain) powered for a while so we don't need to runtime resume immediately when the device is connected back after the device upgrade completes. Signed-off-by: Mika Westerberg commit a3595258970bf2dfd21ba8fa3fb3d07000ae989c Author: Mika Westerberg Date: Tue Nov 17 13:41:21 2020 +0300 thunderbolt: Log adapter numbers in decimal in path activation/deactivation This makes it consistent with other debug logs that already are using decimal number for adapters (ports). Signed-off-by: Mika Westerberg commit e0258805d71b9e9febeae9d9ae39ae7997384b16 Author: Mika Westerberg Date: Tue Nov 10 11:02:31 2020 +0300 thunderbolt: Log which connection manager implementation is used This makes it easier to figure out whether the driver is using firmware or software based connection manager implementation. Signed-off-by: Mika Westerberg commit 45ef561abcdd6cbaba0ab391b60d1831d2ac47af Author: Mika Westerberg Date: Tue Nov 3 13:59:31 2020 +0200 thunderbolt: Move max_boot_acl field to correct place in struct icm This makes the kernel-doc to match the ordering and also this is better place for it, not between upstream_port and vnd_cap that are used together. Signed-off-by: Mika Westerberg commit 57e3cebd022fbc035dcf190ac789fd2ffc747f5b Author: Shenming Lu Date: Sat Nov 28 22:18:57 2020 +0800 KVM: arm64: Delay the polling of the GICR_VPENDBASER.Dirty bit In order to reduce the impact of the VPT parsing happening on the GIC, we can split the vcpu reseidency in two phases: - programming GICR_VPENDBASER: this still happens in vcpu_load() - checking for the VPT parsing to be complete: this can happen on vcpu entry (in kvm_vgic_flush_hwstate()) This allows the GIC and the CPU to work in parallel, rewmoving some of the entry overhead. Suggested-by: Marc Zyngier Signed-off-by: Shenming Lu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201128141857.983-3-lushenming@huawei.com commit 15ee6277817f9eda605937c254dc8f15f1305c1f Author: Yejune Deng Date: Wed Nov 18 10:36:35 2020 +0800 phy: amlogic: replace devm_reset_control_array_get() devm_reset_control_array_get_exclusive() looks more readable Signed-off-by: Yejune Deng Reviewed-by: Martin Blumenstingl Reviewed-by: Philipp Zabel Link: https://lore.kernel.org/r/1605666995-16462-1-git-send-email-yejune.deng@gmail.com Signed-off-by: Vinod Koul commit 122586d62206c68e061f0329443ff65985e1aae5 Author: Neil Armstrong Date: Fri Nov 20 16:38:55 2020 +0100 phy: amlogic: phy-meson-gxl-usb2: keep ID pull-up even in Host mode In order to keep OTG ID detection even when in Host mode, the ID line of the PHY (if the current phy is an OTG one) pull-up should be kept enable in both modes. This fixes OTG switch on GXL, GXM & AXG platforms, otherwise once switched to Host, the ID detection doesn't work anymore to switch back to Device. Signed-off-by: Neil Armstrong Reviewed-by: Kevin Hilman Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20201120153855.3920757-1-narmstrong@baylibre.com Signed-off-by: Vinod Koul commit 4eed2812de6addc934497688503568435a540b51 Author: Neil Armstrong Date: Fri Nov 20 16:03:47 2020 +0100 phy: amlogic: meson-axg-mipi-pcie-analog: replace DSI_LANE definitions with BIT() macro For consistency, replace DSI_LANE definitions with BIT() macro and remove the unused DSI_LANE_MASK definition. Suggested-by: Vinod Koul Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20201120150347.3914901-1-narmstrong@baylibre.com Signed-off-by: Vinod Koul commit 81b534f7e9b27309b99ac2b870518c17381d2912 Author: Marek Szyprowski Date: Fri Nov 20 09:56:36 2020 +0100 phy: samsung: Add support for the Exynos5420 variant of the USB2 PHY Exynos5420 differs a bit from Exynos5250 in USB2 PHY related registers in the PMU region. Add a variant for the Exynos5420 case. Till now, USB2 PHY worked only because the bootloader enabled the PHY, but then driver messed USB 3.0 DRD related registers during the suspend/resume cycle. Signed-off-by: Marek Szyprowski Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201120085637.7299-2-m.szyprowski@samsung.com Signed-off-by: Vinod Koul commit 06bccda2c13c07d4ac7ebfef766a968c788cbdbf Author: Johan Jonker Date: Mon Nov 16 16:07:56 2020 +0100 ARM: dts: rockchip: rename wdt nodename to watchdog on rv1108 A test with the command below gives for example this error: /arch/arm/boot/dts/rv1108-evb.dt.yaml: wdt@10360000: $nodename:0: 'wdt@10360000' does not match '^watchdog(@.*|-[0-9a-f])?$' Fix it by renaming the wdt nodename to watchdog in the rv1108.dtsi file. make ARCH=arm dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/watchdog/snps,dw-wdt.yaml Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20201116150756.14265-1-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 53e7c92c7fa0077f507951206bb329aadab785fb Author: Sergio Paracuellos Date: Sat Nov 21 16:50:37 2020 +0100 staging: mt7621-pci-phy: remove driver from staging Remove this driver from staging because it has been moved into its properly place in the kernel. Signed-off-by: Sergio Paracuellos Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20201121155037.21354-5-sergio.paracuellos@gmail.com Signed-off-by: Vinod Koul commit 370c10afc14c79ff08406f99a95de7123178af48 Author: Sergio Paracuellos Date: Sat Nov 21 16:50:36 2020 +0100 MAINTAINERS: add MT7621 PHY PCI maintainer Adding myself as maintainer for mt7621 pci phy driver. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20201121155037.21354-4-sergio.paracuellos@gmail.com Signed-off-by: Vinod Koul commit d87da32372a03ce121fc65ccd2c9a43edf56b364 Author: Sergio Paracuellos Date: Sat Nov 21 16:50:35 2020 +0100 phy: ralink: Add PHY driver for MT7621 PCIe PHY This patch adds a driver for the PCIe PHY of MT7621 SoC. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20201121155037.21354-3-sergio.paracuellos@gmail.com Signed-off-by: Vinod Koul commit 27076a7358b5e170b7cba80b43b4e49ac3e279fc Author: Sergio Paracuellos Date: Sat Nov 21 16:50:34 2020 +0100 dt-bindings: phy: Add binding for Mediatek MT7621 PCIe PHY Add bindings to describe Mediatek MT7621 PCIe PHY. Signed-off-by: Sergio Paracuellos Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201121155037.21354-2-sergio.paracuellos@gmail.com Signed-off-by: Vinod Koul commit 983b95e9ab76766a5a13ed64b5b0fe716b80e939 Author: Marek Behún Date: Sun Nov 15 14:59:23 2020 +0100 ARM: dts: turris-omnia: remove unneeded status = "okay" properties Only nodes which have status = "disabled" defined from included files need status = "okay". The ethernet-phy node and the i2cmux node do not need it, since they are wholly defined here. Signed-off-by: Marek Behún Cc: linux-arm-kernel@lists.infradead.org Cc: Uwe Kleine-König Cc: Jason Cooper Cc: Gregory CLEMENT Cc: Andreas Färber Cc: Andrew Lunn Cc: Rob Herring Cc: devicetree@vger.kernel.org Signed-off-by: Gregory CLEMENT commit 8ee4a5f4f40da60bb85e13d9dd218a3c9197e3e3 Author: Marek Behún Date: Sun Nov 15 14:59:22 2020 +0100 ARM: dts: turris-omnia: update ethernet-phy node and handle name Use property name `phy-handle` instead of the deprecated `phy` to connect eth2 to the PHY. Rename the node from "phy@1" to "ethernet-phy@1", since "phy@1" is incorrect according to device-tree bindings documentation. Also remove the "ethernet-phy-id0141.0DD1" compatible string, it is not needed. Kernel can read the PHY identifier itself. Signed-off-by: Marek Behún Reviewed-by: Andrew Lunn Cc: linux-arm-kernel@lists.infradead.org Cc: Uwe Kleine-König Cc: Jason Cooper Cc: Gregory CLEMENT Cc: Andreas Färber Cc: Rob Herring Cc: devicetree@vger.kernel.org Signed-off-by: Gregory CLEMENT commit 91dd42d0e30fdbb250c61d1192af569f07e6ada4 Author: Marek Behún Date: Sun Nov 15 14:59:21 2020 +0100 ARM: dts: turris-omnia: add LED controller node Linux now has incomplete support for the LED controller on Turris Omnia: it can set brightness and colors for each LED. The controller can also put these LEDs into HW controlled mode, in which the LEDs are controlled by HW: for example the WAN LED is connected via MCU to the WAN PHY LED pin. The driver does not support these HW controlled modes yet, and on probe puts the LEDs into SW controlled mode. Add node describing the LED controller, but disable it for now. Signed-off-by: Marek Behún Cc: linux-arm-kernel@lists.infradead.org Cc: Uwe Kleine-König Cc: Jason Cooper Cc: Gregory CLEMENT Cc: Andreas Färber Cc: Rob Herring Cc: devicetree@vger.kernel.org Signed-off-by: Gregory CLEMENT commit add2d65962977caf23ca2fa21a2457d31b636574 Author: Marek Behún Date: Mon Nov 16 13:24:22 2020 +0100 ARM: dts: turris-omnia: add SFP node Turris Omnia has an SFP cage that, together with WAN PHY, is connected to eth2 SerDes via a SerDes multiplexor. When a SFP module is present, the multiplexor switches the SerDes signal from PHY to SFP. Describe the SFP cage, but leave it disabled. Until phylink has support for such configuration, we are leaving it to U-Boot to enable SFP and disable WAN PHY at boot time depending on whether a SFP module is present. Signed-off-by: Marek Behún Fixes: 26ca8b52d6e1 ("ARM: dts: add support for Turris Omnia") Reviewed-by: Andrew Lunn Cc: Russell King - ARM Linux admin Cc: linux-arm-kernel@lists.infradead.org Cc: Uwe Kleine-König Cc: Jason Cooper Cc: Gregory CLEMENT Cc: Andreas Färber Cc: Rob Herring Cc: devicetree@vger.kernel.org Signed-off-by: Gregory CLEMENT commit d29b67c220caf5f4905e1f1576e71bcb6de4af9e Author: Marek Behún Date: Sun Nov 15 14:59:19 2020 +0100 ARM: dts: turris-omnia: describe switch interrupt Describe switch interrupt for Turris Omnia so that the CPU does not have to poll the switch. We also need to to set mpp45 pin to gpio function for this. Signed-off-by: Marek Behún Fixes: 26ca8b52d6e1 ("ARM: dts: add support for Turris Omnia") Cc: linux-arm-kernel@lists.infradead.org Cc: Uwe Kleine-König Cc: Jason Cooper Cc: Gregory CLEMENT Cc: Andreas Färber Cc: Andrew Lunn Cc: Rob Herring Cc: devicetree@vger.kernel.org Signed-off-by: Gregory CLEMENT commit 9ec25ef84832209a8326f9a71fe3ba14f4bcf301 Author: Marek Behún Date: Sun Nov 15 14:59:18 2020 +0100 ARM: dts: turris-omnia: add comphy handle to eth2 The eth2 controller on Turris Omnia is connected to SerDes. For SFP to be able to switch between 1G and 2.5G modes the comphy link has to be defined. Signed-off-by: Marek Behún Fixes: f3a6a9f3704a ("ARM: dts: add description for Armada 38x ...") Reviewed-by: Andrew Lunn Reviewed-by: Andreas Färber Cc: linux-arm-kernel@lists.infradead.org Cc: Uwe Kleine-König Cc: Jason Cooper Cc: Gregory CLEMENT Cc: Rob Herring Cc: devicetree@vger.kernel.org Signed-off-by: Gregory CLEMENT commit 018b88eee1a2efda26ed2f09aab33ccdc40ef18f Author: Marek Behún Date: Sun Nov 15 14:59:17 2020 +0100 ARM: dts: turris-omnia: enable HW buffer management The buffer manager is available on Turris Omnia but needs to be described in device-tree to be used. Signed-off-by: Marek Behún Fixes: 26ca8b52d6e1 ("ARM: dts: add support for Turris Omnia") Cc: linux-arm-kernel@lists.infradead.org Cc: Uwe Kleine-König Cc: Jason Cooper Cc: Gregory CLEMENT Cc: Andreas Färber Cc: Andrew Lunn Cc: Rob Herring Cc: devicetree@vger.kernel.org Signed-off-by: Gregory CLEMENT commit cbc4a395dcc730be9114ef077a67e07b32a029a4 Author: Pali Rohár Date: Mon Oct 5 15:35:13 2020 +0200 arm64: dts: marvell: espressobin: Update link to V7 schematic Up-to-date version of V7 schematic is on new URL linked from official tech-spec webpage http://espressobin.net/tech-spec/ Signed-off-by: Pali Rohár Signed-off-by: Gregory CLEMENT commit bf4d01e107e3fdc03104fa0db96d8d2721529eb6 Author: Wan Ahmad Zainie Date: Mon Nov 16 20:08:31 2020 +0800 phy: intel: Add Keem Bay USB PHY support Add PHY driver for the USB3.1 and USB 2.0 PHYs found on Intel Keem Bay SoC. This driver takes care of enabling the required USB susbsystem (USS) clocks, initializing the PHYs and turning on/off the USB dwc3 core. Signed-off-by: Wan Ahmad Zainie Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201116120831.32641-3-wan.ahmad.zainie.wan.mohamad@intel.com Signed-off-by: Vinod Koul commit 4086afa2a16279392e453605aac09728e60d9316 Author: Wan Ahmad Zainie Date: Mon Nov 16 20:08:30 2020 +0800 dt-bindings: phy: Add Intel Keem Bay USB PHY bindings Binding description for Intel Keem Bay USB PHY. Signed-off-by: Wan Ahmad Zainie Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201116120831.32641-2-wan.ahmad.zainie.wan.mohamad@intel.com Signed-off-by: Vinod Koul commit 1e1a5afde9f79386815233aacf48e188a6710fc2 Author: Bruno Thomsen Date: Wed Nov 18 11:21:19 2020 +0100 ARM: dts: imx7: add support for kamstrup flex concentrator This adds support for the OMNIA Flex Concentrator product from Kamstrup A/S. It's providing radio mesh communication infrastructure for smart electricity meters. Kamstrup OMNIA is a modular and scalable smart grid platform. Signed-off-by: Bruno Thomsen Signed-off-by: Shawn Guo commit 11916ecb8363e3661635fe66d4b25e27451853ee Author: Bruno Thomsen Date: Wed Nov 18 11:21:18 2020 +0100 dt-bindings: fsl: add kamstrup flex concentrator to schema Add Kamstrup OMNIA Flex Concentrator compatibles to the schema so we can make use of them for the validation. Signed-off-by: Bruno Thomsen Acked-by: Rob Herring Signed-off-by: Shawn Guo commit e00e70a4dae4cae026d43f2f05ba46a19c4ef22d Author: Liu Ying Date: Wed Nov 18 15:31:23 2020 +0800 firmware: imx: scu-pd: Add some power domains support for i.MX8qxp MIPI1 subsystem This patch adds the main power domain, pwm0 power domain and i2c0/1 power domains support for i.MX8qxp MIPI1 subsystem. Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Signed-off-by: Liu Ying Signed-off-by: Shawn Guo commit f57afc6f77dae77d52eba32d4c4c7d2252021646 Author: Liu Ying Date: Wed Nov 18 15:31:22 2020 +0800 firmware: imx: scu-pd: Add main power domain support for i.MX8qxp LVDS1 subsystem This patch adds the main power domain support for i.MX8qxp LVDS1 subsystem. Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Signed-off-by: Liu Ying Signed-off-by: Shawn Guo commit 90ad8e0acd0d4e874a84ffca3ab58cbafcc2dd42 Author: Liu Ying Date: Wed Nov 18 15:31:21 2020 +0800 firmware: imx: scu-pd: Add video0/1 power domains support for i.MX8qxp DC0 subsystem This patch adds video0/1 power domains support for i.MX8qxp DC0 subsystem. Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Signed-off-by: Liu Ying Signed-off-by: Shawn Guo commit b675aaee5464ca8384853145578e662e54debf7a Author: Yuantian Tang Date: Tue Nov 17 11:43:05 2020 +0800 ARM: dts: ls1021a: update calibration table for TMU module Update the calibration table to make the temperature more accurate. Signed-off-by: Yuantian Tang Signed-off-by: Shawn Guo commit 4ba79e25d7f1a7394021ba4c215a7ecdcc270fb6 Author: Ivan Zaentsev Date: Mon Nov 16 19:58:26 2020 +0300 ARM: mxs: Add serial number support for i.MX23, i.MX28 SoCs i.MX23 and i.MX28 SoCs unique identifiers are factory-programmed in On-Chip OTP memory. i.MX28's 64-bit unique id is in HW_OCOTP_OPS2:HW_OCOTP_OPS3 (see MCIMX28 Ref. Man., sec. 20.4.22-23). i.MX23 provides 32-bit long unique id in HW_OCOTP_OPS3. Though not clearly documented, there is a clue in sec. 35.9.3. The unique id is reported in /sys/devices/soc0/serial_number and in /proc/cpuinfo Signed-off-by: Ivan Zaentsev Suggested-by: Evgeny Boger Signed-off-by: Shawn Guo commit f44afb5b5a5d04448da843b2fe872e01669bc317 Author: Tomer Tayar Date: Wed Sep 2 13:43:32 2020 +0300 habanalabs: Add CB IOCTL opcode to retrieve CB information Add a new CB IOCTL opcode that enables a user to query about a CB and get its usage count. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit f07486745442f6118ede18e2b52ee7be69cde5a4 Author: Tomer Tayar Date: Sun Aug 2 22:51:31 2020 +0300 habanalabs: Modify the cs_cnt of a CB to be atomic Modify the CS counter of a CB to be atomic, so no locking is required when it is being modified or read. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 3e438b42a5fbf19e44c6c3e0481ed4b5672d8f42 Author: Tomer Tayar Date: Sun Nov 22 11:02:50 2020 +0200 habanalabs: Add mask for CS type bits in CS flags hl_cs_sanity_checks() extracts the CS type bits of the CS flags, by masking out the non-type bits. To save the need for updating the function whenever new bits for non-type flags are added, add an explicit mask for the CS type bits. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 3b82c34f0662cc311a81b4b0e94b982db3d24a7c Author: Oded Gabbay Date: Fri Nov 27 18:10:20 2020 +0200 habanalabs: change messages to debug level Some messages should be changed to debug mode as we want to keep minimal prints during normal operation of the device. Signed-off-by: Oded Gabbay commit 8e718f2eda8d4d2268f1872bd4deddd54900283a Author: Ofir Bitton Date: Thu Nov 26 13:01:11 2020 +0200 habanalabs: free host huge va_range if not used If huge range is not valid, driver uses the host range also for huge page allocations, but driver never frees its allocation. This introduces a memory leak every time a user closes its context. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit a63c3fb37b157b56d713a386dc024bf6deb9c7cf Author: Oded Gabbay Date: Thu Nov 26 18:11:05 2020 +0200 habanalabs/gaudi: handle reset when f/w is in preboot Currently, if the f/w is in preboot/u-boot they don't perform the new reset mechanism. Therefore, the driver needs to reset the device. To prevent reset of PCI_IF, the driver needs to first configure the reset units. If the security is enabled, the driver can't configure the reset units. In that situation, don't reset the card. Signed-off-by: Oded Gabbay commit ee3287798d49bbe5a9597d51ec914144179c03e8 Author: Oded Gabbay Date: Wed Nov 25 08:02:40 2020 +0200 habanalabs: add missing counter update The global CS drop-on-reset counter wasn't updated together with the context counter. Signed-off-by: Oded Gabbay commit d2bbf2ca33440b8e8cab2387802a6d5694611227 Author: Alon Mizrahi Date: Sun Nov 22 22:09:52 2020 +0200 habanalabs: add ull to PLL masks These defines are 64-bit defines so they need ull suffix. Signed-off-by: Alon Mizrahi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit bd2f477f2037d2638464dc105f16994994308c20 Author: Ofir Bitton Date: Tue Nov 10 17:26:22 2020 +0200 habanalabs: add support for cs with timestamp add support for user to request a timestamp upon cs completion. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 9d127ad5719a865bac668a506dfe924ac11cd9bb Author: Ofir Bitton Date: Tue Nov 10 16:30:53 2020 +0200 habanalabs: indicate to user that a cs is gone We want to indicate to the user that a certain command submission is finished long time ago and it is no longer in database. This means no further information regarding this cs can be obtained. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 64a9d5ab2c1cccf7aa902039887d5911a6060141 Author: Oded Gabbay Date: Sat Nov 21 14:29:25 2020 +0200 habanalabs/gaudi: print ECC type field We have the ECC type field from the firmware but the driver didn't print it, so we need to add that field to the ECC print message. Signed-off-by: Oded Gabbay commit 051504d9f6048509c27a994848ac02796999d6c5 Author: Oded Gabbay Date: Fri Nov 20 21:39:09 2020 +0200 habanalabs: update firmware files Update various firmware header files with new defines. Signed-off-by: Oded Gabbay commit 293744d92c87d50d0b4af89a2459fbd61741ff5e Author: kernel test robot Date: Thu Nov 19 12:25:43 2020 +0800 habanalabs: gaudi_ctx_fini() can be static Make a function in gaudi.c to be static Reported-by: kernel test robot Signed-off-by: kernel test robot Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 2a570736ef3977a8c4d53e2da1861d4f88c0ecdd Author: kernel test robot Date: Thu Nov 19 11:18:30 2020 +0800 habanalabs: goya_reset_sob_group() can be static Make some functions static Reported-by: kernel test robot Signed-off-by: kernel test robot Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 4147864e8d65a0d57dd8573cf306382653616ac2 Author: Alon Mizrahi Date: Tue Nov 17 14:25:14 2020 +0200 habanalabs: fetch pll frequency from firmware Once firmware security is enabled, driver must fetch pll frequencies through the firmware message interface instead of reading the registers directly. Signed-off-by: Alon Mizrahi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 5c05487f15509320572c13fce8f490fb914cf7d4 Author: Ofir Bitton Date: Thu Oct 22 15:13:10 2020 +0300 habanalabs: mmu map wrapper for sizes larger than a page We introduce a new wrapper which allows us to mmu map any size to any host va_range available. In addition we remove duplicated code from various places in driver and using this new wrapper instead. This wrapper supports mapping only contiguous physical memory blocks and will be used for mappings that are done to the driver ASID. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 5e5867e51d6eb0a086ead83796efbae4234eab1a Author: Oded Gabbay Date: Mon Nov 16 10:25:53 2020 +0200 habanalabs: print CS type when it is stuck We have several types of command submissions and the user wants to know which type of command submission has not finished in time when that event occurs. This is very helpful for debug. Signed-off-by: Oded Gabbay commit b90c8944346217d82f04acdc69375a4860451484 Author: Ofir Bitton Date: Sun Nov 8 12:59:04 2020 +0200 habanalabs/gaudi: align to new FW reset scheme As part of the security effort in which FW will be handling sensitive HW registers, hard reset flow will be done by FW and will be triggered by driver. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 439bc47b8e833db547c16369ac562f9364e6bc14 Author: Alon Mizrahi Date: Tue Nov 10 13:49:10 2020 +0200 habanalabs: firmware returns 64bit argument F/W message returns 64bit value but up until now we casted it to a 32bit variable, instead of receiving 64bit in the first place. Signed-off-by: Alon Mizrahi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 00e1b59c8b155d524cf416155607c3e52c54c32a Author: Moti Haimovski Date: Tue Oct 27 10:55:42 2020 +0200 habanalabs: fix MMU debugfs operations After the MMU-code refactoring, the existing MMU debugfs operations are no longer working so we need to fix them. In addition, remove the duplicate code that was in the debugfs code and use the already existing MMU-code. Signed-off-by: Moti Haimovski Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit fe2bc2d249539c117cc887dc1f960ffcbba52d1e Author: Moti Haimovski Date: Tue Oct 27 11:03:32 2020 +0200 habanalabs: share a single ctx-mutex between all MMUs Multiple locks are usually a source of problems, which in the MMU case can be avoided since it is relatively rare that both MMU tables are updated at the same time. Therefore, use a single shared lock instead of two separate ones. Signed-off-by: Moti Haimovski Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 412c41fcd526b239472a24974591a05227bf5225 Author: Ofir Bitton Date: Wed Nov 4 15:18:55 2020 +0200 habanalabs: support reserving aligned va block Add support for reserving va block with alignment different than page size. This is a pre-requisite for allocations needed in future ASICs Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit b2d09622bec3f59bc51417ef672c105f3c5fc4d7 Author: Guy Nisan Date: Thu Nov 12 17:52:52 2020 +0200 habanalabs: add boot errors prints Add log prints for security and eFuse boot error bits Signed-off-by: Guy Nisan Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 92ede12a07d613540c966866039e7359f373d9ac Author: Oded Gabbay Date: Tue Nov 10 22:03:43 2020 +0200 habanalabs: print message with correct device During hard-reset, the driver rejects further IOCTL calls and prints an error message. That error message should be printed with the correct device instead of using only the control device. Signed-off-by: Oded Gabbay commit 5a2998f46c8555815b1bf367daf0bf42b0440300 Author: Ofir Bitton Date: Mon Oct 5 13:44:59 2020 +0300 habanalabs/gaudi: fetch HBM ecc info from FW Once FW security is enabled there is no access to HBM ecc registers, need to read values from FW using a dedicated interface. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit d611b9f0b199ebfaca78ec4205a889831fdd45cd Author: Ofir Bitton Date: Sun Nov 8 13:10:09 2020 +0200 habanalabs: fetch hard reset capability from FW Driver must fetch FW hard reset capability during boot time, in order to skip the hard reset flow if necessary. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 7f070c913c361ed79dd29d9256b486b1b105d7f0 Author: Oded Gabbay Date: Mon Nov 9 09:48:31 2020 +0200 habanalabs: move asic property to correct structure Whether an ASIC has MMU towards its DRAM is an ASIC property, so move it to the asic fixed properties structure. Signed-off-by: Oded Gabbay commit be91b91fa40f5d2b1c8b79dbc34c1130de16f9e7 Author: Ofir Bitton Date: Thu Oct 22 15:04:10 2020 +0300 habanalabs: use host va range for internal pools Instead of using a dedicated va range for each internal pool, we introduce a new way for reserving a va block from an existing va range. This is a more generic way of reserving va blocks for future use. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit adb51298fdc41b89f47c520171d86e4859cc7731 Author: Ofir Bitton Date: Thu Oct 8 10:27:42 2020 +0300 habanalabs: improve hard reset procedure We want to handle the scenario in which the driver was not able to kill all user processes due to many memory mappings. We need to retry again after some period while releasing the cores. The devices will be unusable and "in-reset" status during that time. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 804a72276cc4a1e27822d611907350b74f7fe561 Author: Tomer Tayar Date: Fri Oct 30 11:16:23 2020 +0200 habanalabs: Rename hw_queues_mirror to cs_mirror Future command submission types might be submitted to HW not via the QMAN queues path. However, it would be still required to have the TDR mechanism for these CS, and thus the patch renames the TDR fields and replaces the hw_queues_ prefix with cs_. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 784b916dad2f9968bf732b061914390db24ddf8a Author: Ofir Bitton Date: Thu Oct 22 11:05:55 2020 +0300 habanalabs: refactor mmu va_range db structure Use an array of va_ranges instead of keeping each va_range separately, we do this for better readability and in order to support access to a specific range in a much elegant manner. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit d1ddd90551b2ec3ed3b72daa09ecf38c174c1f61 Author: Ofir Bitton Date: Mon Oct 19 17:04:20 2020 +0300 habanalabs: move HW dirty check to a proper location Driver must verify if HW is dirty before trying to fetch preboot information. Hence, we move this validation to a prior stage of the boot sequence. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 28e052c95292410922d487c48d2f841ccd6495e7 Author: Oded Gabbay Date: Thu Oct 29 18:38:31 2020 +0200 habanalabs: restore vm_pgoff after mmap Due to using dma_mmap_coherent() to perform mmap of dma memory, we had to clear the vm_pgoff field before calling that function. However, that broke the userspace (profiler tool) as they relied on searching the /proc/self/maps for these values to correctly "disassemble" the topology recipe. To re-enable that functionality, the driver can simply restore the value of vm_pgoff before returning to userspace but after calling dma_mmap_coherent(). Signed-off-by: Oded Gabbay commit 66a76401c50b2638fd95dd31f365fd64be307d6a Author: Ofir Bitton Date: Mon Oct 5 14:40:10 2020 +0300 habanalabs: add 'needs reset' state in driver The new state indicates that device should be reset in order to re-gain funcionality. This unique state can occur if reset_on_lockup is disabled and an actual lockup has occurred. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit f2d032ee1381ae1eda8846800a304d76d2d8b735 Author: Omer Shpigelman Date: Sat Oct 31 22:03:55 2020 +0200 habanalabs: fix hard reset print and comment One of the first steps of a hard reset flow is to close all open user contexts. This user process teradown might take some time due to long cleanup in our driver or some other reason even before our cleanup flow. Hence fix the relevant print and comment to be more accurate. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit b726a2f7c0bcdb6ff02d4fa257df7e8a9509c686 Author: Igor Grinberg Date: Thu Oct 29 14:06:54 2020 +0200 habanalabs/gaudi: remove pcie_en strap toggle Since the very large grace period is over and this functionality prevents us to implement the new reset sequence and apply security settings, we need to remove the code toggling the PCIE_EN bit in the straps register. Remove it for good. Signed-off-by: Igor Grinberg Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 66bfcccdb893f2dfefe3fb19795034ac213667ad Author: Oded Gabbay Date: Wed Oct 28 21:05:20 2020 +0200 habanalabs: remove duplicate print We print twice the firmware status regarding security, once in common code and once in asic code. Remove the print in asic code and leave the common code print. Signed-off-by: Oded Gabbay commit 649c4592124b0cf1faf044b5f14de208d08ebb50 Author: Tomer Tayar Date: Mon Aug 10 17:30:35 2020 +0300 habanalabs: Separate CS job completion from its deallocation Current CS jobs are no longer needed after their completion. However, jobs of future workload might be in use even after they are completed. To allow that, the patch adds a refcount to the job object, and decouples its completion handling from its deallocation. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 0da5698bf4b8c699e5e5e23d067f5a1bb1bb2401 Author: Oded Gabbay Date: Tue Oct 27 09:34:44 2020 +0200 habanalabs/gaudi: increase MAX CS to 16K We need to have the MAX CS be much larger than the size of the different queues. In GAUDI we have around 8 groups of queues, and each group has 1K queue size. To prevent head-of-the-line blocking, we need to make sure there is sufficient number of available CS allocations even if one or more of those queues are full. Signed-off-by: Oded Gabbay commit eb10b897e45968740fde22626843177b7b2f2191 Author: farah kassabri Date: Wed Oct 14 15:17:36 2020 +0300 habanalabs: reset device upon fw read failure failure in reading pre-boot verion is not handled correctly, upon failure we need to reset the device in order to be able to reinstall the driver. Signed-off-by: farah kassabri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit ba7e389c30c6bfb78857ba7a6f8d2cd4bbf5bde7 Author: Tomer Tayar Date: Sun Oct 25 17:47:22 2020 +0200 habanalabs: Move repeatedly included headers to habanalabs.h Several header files are repeatedly included in many files. Move these files to habanalabs.h which is included by all. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit c1d505a922fe89ff44db4de5f88f20037a571c7a Author: Ofir Bitton Date: Sun Oct 25 09:36:08 2020 +0200 habanalabs: release signal if collective wait was dropped As in standard wait cs, we must release a signal fence once a collective wait cs was dropped and not submitted. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 4ba1b227b6c77252f49f96aa77cf1b50b9d2542c Author: Tomer Tayar Date: Tue Jul 28 00:28:51 2020 +0300 habanalabs: Skip updating CI of internal queues if not in use There are no internal queues if H/W queues are being used. In this case we can skip the redundant traversal over the queues array, looking for internal queues. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit ea6ee260cbcdd1e00d8eb62057d432dddd2a71d1 Author: Tomer Tayar Date: Mon Jul 27 23:49:41 2020 +0300 habanalabs: Small refactoring of cs_do_release() Slightly refactor the cs_do_release() function, to reduce nesting level and to ease the handling of future CS types. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 6de3d769fde0303a746a5e540bf23fa4b07d0ad5 Author: Tomer Tayar Date: Sun Jul 19 21:07:15 2020 +0300 habanalabs: Small refactoring of CS IOCTL handling Refactor the CS IOCTL handling by gathering common code into sub-functions, in order to ease future additions of new CS types. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 1cbca899fa57637036aa3199bd3f2208db2efff5 Author: Ofir Bitton Date: Mon Oct 5 11:36:00 2020 +0300 habanalabs/gaudi: fetch PLL info from FW Once FW security is enabled there is no access to PLL registers, need to read values from FW using a dedicated interface. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit ccf979ee330b195961116f74cd75ba677fdc4cd7 Author: Moti Haimovski Date: Mon Oct 5 17:59:29 2020 +0300 habanalabs: refactor MMU to support dual residency MMU This commit refactors the MMU code to support PCI MMU page tables residing on host and DCORE MMU residing on the device DRAM at the same time. This is needed for future devices as on GAUDI and GOYA we have a single MMU where its page tables always reside on DRAM. Signed-off-by: Moti Haimovski Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit a6722d6a97de26f81c86d28ffd535b8bc005d436 Author: Moti Haimovski Date: Mon Oct 5 19:33:10 2020 +0300 habanalabs: fix MMU print message This commit fixes an incorrect error message Signed-off-by: Moti Haimovski Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 03df136bc5dd5be111c6c4b8dc265615e190fe75 Author: farah kassabri Date: Wed May 6 11:17:38 2020 +0300 habanalabs/gaudi: scrub all memory upon closing FD In cases of multi-tenants, administrators may want to prevent data leakage between users running on the same device one after another. To do that the driver can scrub the internal memory (both SRAM and DRAM) after a user finish to use the memory. Because in GAUDI the driver allows only one application to use the device at a time, it can scrub the memory when user app close FD. In future devices where we have MMU on the DRAM, we can scrub the DRAM memory with a finer granularity (page granularity) when the user allocates the memory. This feature is not supported in Goya. To allow users that want to debug their applications, we add a kernel module parameter to load the driver with this feature disabled. Signed-off-by: farah kassabri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit c692dec70379526b0bb09f94467bbd456859dcad Author: Ofir Bitton Date: Sun Oct 4 17:34:37 2020 +0300 habanalabs/gaudi: add support for FW security Skip relevant HW configurations once FW security is enabled because these configurations are being performed by FW. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 323b726706be3b1e547d2662dd77611b8bd82a3a Author: Ofir Bitton Date: Sun Oct 4 09:09:19 2020 +0300 habanalabs: fetch security indication from FW Add support for fetching security indication from FW. This indication is needed in order to skip unnecessary initializations done by FW. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit e753643d516c7c38f69f3d73169bb00cd70a60b9 Author: farah kassabri Date: Mon Oct 12 14:30:26 2020 +0300 habanalabs: fix cs counters structure Fix cs counters structure in uapi to be one flat structure instead of two instances of the same other structure. use atomic read/increment for context counters so we could use one structure for both aggregated and context counters. Signed-off-by: farah kassabri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 9bb86b63d86493ca10b005e9e49d1d08f998a0ac Author: Ofir Bitton Date: Tue Oct 20 10:45:37 2020 +0300 habanalabs: advanced FW loading Today driver is able to load a whole FW binary into a specific location on ASIC. We add support for loading sections from the same FW binary into different loactions. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 977d53a614fb7562a80cc2da2b64d426002d47c0 Author: Oded Gabbay Date: Tue Oct 20 18:37:56 2020 +0300 habanalabs: initialize variable before use GCC 7.3.1 20180303 (Red Hat 7.3.1-5) complains that collective_engine_id might be used uninitialized. Signed-off-by: Oded Gabbay commit 71a984f9ae0999ea2ea92003f56d306f03203ba0 Author: Ofir Bitton Date: Mon Oct 19 16:52:00 2020 +0300 habanalabs/gaudi: remove unreachable code Remove unreachable code in gaudi collective flow. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit e716ad3c76c8cf1722f674e43103c74cad85438f Author: Oded Gabbay Date: Mon Oct 19 09:06:18 2020 +0300 habanalabs: make sure cs type is valid in cs_ioctl_signal_wait Although we get a valid cs type from the callee, in case new values will be added in the future, it is best to check the expected values in that function. Signed-off-by: Oded Gabbay commit 3e6229965763129da2105f61cd4e0570ba53cb2b Author: Oded Gabbay Date: Sun Oct 18 15:32:23 2020 +0300 habanalabs/gaudi: monitor device memory usage In GAUDI we don't have an MMU towards the HBM device memory. Therefore, the user access that memory directly through physical address (via the different engines) without the need to go through the driver to allocate/free memory on the HBM. For system monitoring purposes, the driver will keep track of the HBM usage. This can be done as long as the user accurately reports the allocations and releases of HBM memory, through the existing MEMORY IOCTL uapi. Signed-off-by: Oded Gabbay commit 5de406c0b5c747c40277861ecf204ebfa095caa5 Author: Ofir Bitton Date: Thu Sep 10 10:56:26 2020 +0300 habanalabs: sync stream collective support Implement sync stream collective for GAUDI. Need to allocate additional resources for that and add ctx_fini() to clean up those resources. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 0940cabafde98466bec8ba32dd567f0ec060478d Author: Ofir Bitton Date: Mon Aug 31 08:52:56 2020 +0300 habanalabs/gaudi: Set DMA5 QMAN internal DMA5 QMAN is designated to be used for reduction process, hence it will be no longer configured as external queue. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 5fe1c17ddf2e5e5d05e983b56ebbc0d1c702b16a Author: Ofir Bitton Date: Thu Sep 10 10:10:55 2020 +0300 habanalabs: sync stream collective infrastructure Define new API for collective wait support and modify sync stream common flow. In addition add kernel CB allocation support for internal queues. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 4bb1f2f3fb31ed60a23064a8fc4d5ecde5d1002d Author: Tal Cohen Date: Wed Jun 3 09:25:27 2020 +0300 habanalabs: use enum for CB allocation options In the future there will be situations where queues can accept either kernel allocated CBs or user allocated CBs, depending on different states. Therefore, instead of using a boolean variable of kernel/user allocated CB, we need to use a bitmask to indicate that, which will allow to combine the two options. Add a flag to the uapi so the user will be able to indicate whether the CB was allocated by kernel or by user. Of course the driver validates that. Signed-off-by: Tal Cohen Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 3c68157fb829a1b1c9615a6a78179a664602f96a Author: Oded Gabbay Date: Mon Nov 2 21:10:39 2020 +0200 habanalabs/gaudi: add support for NIC QMANs Initialize the QMANs that are responsible to submit doorbells to the NIC engines. Add support for stopping and disabling them, and reset them as part of the hard-reset procedure of GAUDI. This will allow the user to submit work to the NICs. Add support for receiving events on QMAN errors from the firmware. However, the nic_ports_mask is still initialized to 0. That means this code won't initialize the QMANs just yet. That will be in a later patch. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 11dcb8c712354709b9d9aa6d6d0880217d008e99 Author: Oded Gabbay Date: Mon Nov 2 21:09:33 2020 +0200 habanalabs/gaudi: add NIC security configuration Configure the security properties of the NIC IP. This is to prevent the user process from doing something with the NIC that he shouldn't do. e.g. crash the server, steal data, etc. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit b3a9c0bd2f1847e637147b7175fe7d99d28bef33 Author: Oded Gabbay Date: Mon Nov 2 21:07:51 2020 +0200 habanalabs/gaudi: add NIC firmware-related definitions Add new structures and messages that the driver use to interact with the firmware to receive information and events (errors) about GAUDI's NIC. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 16ac36504548e70b78c552ead1cd5e9d6477e0d3 Author: Oded Gabbay Date: Mon Nov 2 21:00:18 2020 +0200 habanalabs/gaudi: add NIC QMAN H/W and registers definitions Add auto-generated header files that describe the NIC QMANs registers used by the driver. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit becce5f9948db2d172334d5fdde35eca4a3171f3 Author: Oded Gabbay Date: Mon Oct 12 20:56:33 2020 +0300 habanalabs: remove duplicate check We already check if queue index is smaller than max queues a few lines above this check so no need to check this again. Signed-off-by: Oded Gabbay commit 06f791f74fab6bf056013fe723d580d47199fdb3 Author: Ofir Bitton Date: Thu Sep 10 09:43:43 2020 +0300 habanalabs: sync stream refactor functions Refactor sync stream implementation by reducing function length for better readability. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 2992c1dcd314b8140131298d3ad245de1ba1821b Author: Ofir Bitton Date: Thu Sep 10 09:40:35 2020 +0300 habanalabs: add support for multiple SOBs per monitor Support advanced monitor functionality to monitor more than a single SOB. In addition expand all CB generation functions with buffer offset in order to put in them multiple packets that are generated by different functions. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 3cf74b3656a24bd4d3862354ec2c8f205ff464f0 Author: Ofir Bitton Date: Thu Sep 10 09:17:50 2020 +0300 habanalabs: sync stream structures refactor Refactor sync stream implementation by adding more structures for better readability. In addition reducing allocated resources. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit f3a965c25075285f4b7af48d8613610a403231b6 Author: Oded Gabbay Date: Sun Oct 4 23:00:39 2020 +0300 habanalabs: don't init vm module if no MMU In case we are running without MMU enabled (debug mode), no need to initialize the VM module in the driver. Signed-off-by: Oded Gabbay commit 8f503146746b07ede1d0ceef728332e6bb50329d Author: Oded Gabbay Date: Sat Oct 3 00:14:27 2020 +0300 habanalabs: minimize prints when everything is fine No need to print when the driver starts to initialize the H/W. Drivers should be silent when everything is OK. Signed-off-by: Oded Gabbay commit 596553dbf9b2354c87eca5d96d96c09eb84b80e4 Author: Oded Gabbay Date: Thu Oct 1 13:46:37 2020 +0300 habanalabs: support multiple types of firmwares The driver now loads the firmware in two stages. For debugging purposes we need to support situations where only the first stage firmware is loaded. Therefore, use a bitmask to determine which F/W is loaded Signed-off-by: Oded Gabbay commit 28958207e9187da6171f3a418464a47216e0f3e2 Author: Oded Gabbay Date: Thu Oct 1 13:44:22 2020 +0300 habanalabs: we need CPU queues for hwmon F/W can be loaded but device CPU queues disabled. In that case, HWMON should be disabled. This is only relevant when debugging Signed-off-by: Oded Gabbay commit 20b7525dc430aa97748c5ddaff9f791ce1022690 Author: Ofir Bitton Date: Wed Sep 30 15:51:10 2020 +0300 habanalabs/gaudi: move mmu_prepare to context init Currently mmu_prepare is located at context switch. Since we support a single context, no reason to reconfigure the MMU registers every context switch. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 23c15ae615175637ae4449aa6e64c0584474ddaa Author: Oded Gabbay Date: Wed Sep 30 14:25:55 2020 +0300 habanalabs: change aggregate cs counters to atomic In case we will have multiple contexts/processes, we can't just increment aggregated counters. We need to make them atomic as they can be incremented by multiple processes Signed-off-by: Oded Gabbay commit 6c38e7c60fe772653128667a8cebe16612e819e4 Author: Oded Gabbay Date: Mon Nov 2 21:15:47 2020 +0200 MAINTAINERS: update email, git repo of habanalabs driver Update the email to my kernel.org email address and update the git repository address to the git.kernel.org Signed-off-by: Oded Gabbay Reviewed-by: Greg Kroah-Hartman commit 2c854e5c63ac56e7e0633fb6140c1bdf4d3dad96 Author: Takashi Iwai Date: Mon Nov 30 09:37:14 2020 +0100 ALSA: usb-audio: Add quirk for Pioneer DJ DDJ-SR2 Yet another quirk for Pioneer DJ DDJ-SR2, which is quite similar like other DJ DDJ models but with slightly different EPs or channels. Reported-by: Geraldo Link: https://lore.kernel.org/r/20201130083714.10640-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 80fe603160a4732a08f0f08f3e3312a3f3a79eee Author: Miquel Raynal Date: Wed Sep 30 01:01:12 2020 +0200 mtd: nand: ecc-bch: Stop using raw NAND structures This code is meant to be reused by the SPI-NAND core. Now that the driver has been cleaned and reorganized, use a generic ECC engine object to store the driver's data instead of accessing members of the nand_chip structure. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200929230124.31491-9-miquel.raynal@bootlin.com commit ea146d7fbf5081b5eb2777df5e30ed70ca68985b Author: Miquel Raynal Date: Wed Sep 30 01:01:11 2020 +0200 mtd: nand: ecc-bch: Update the prototypes to be more generic These functions must be usable by the main NAND core, so their names must be technology-agnostic as well as the parameters. Hence, we pass a generic nand_device instead of a raw nand_chip structure. As it seems that changing the raw NAND functions to always pass a generic NAND device is a lost of time, we prefer to create dedicated raw NAND wrappers that will be useful in the near future to do the translation. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200929230124.31491-8-miquel.raynal@bootlin.com commit 127aae6077562e3926ebad7c782123c2afe95846 Author: Miquel Raynal Date: Wed Sep 30 01:01:10 2020 +0200 mtd: nand: ecc-bch: Drop mtd_nand_has_bch() Like for any other compilation option, use the IS_ENABLED() macro instead of hardcoding it. By droping this helper we can get rid of the BCH header in nandsim.c. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200929230124.31491-7-miquel.raynal@bootlin.com commit e3010bd3ef1eda13f08155fe43846a64d0990a86 Author: Miquel Raynal Date: Wed Sep 30 01:01:09 2020 +0200 mtd: nand: ecc-bch: Return only valid error codes When a function is not available, returning -ENOTSUPP makes much more sense than returning -1. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200929230124.31491-6-miquel.raynal@bootlin.com commit 3c0fe36abebee55821badaa9d6cecd03799f7843 Author: Miquel Raynal Date: Wed Sep 30 01:01:08 2020 +0200 mtd: nand: ecc-bch: Stop exporting the private structure The NAND BCH control structure has nothing to do outside of this driver, all users of the nand_bch_init/free() functions just save it to chip->ecc.priv so do it in this driver directly and return a regular error code instead. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200929230124.31491-5-miquel.raynal@bootlin.com commit 8c5c209218564a180e8b90fb12d29f72485c6c72 Author: Miquel Raynal Date: Wed Sep 30 01:01:07 2020 +0200 mtd: nand: ecc-bch: Cleanup and style fixes Fix function headers, capitals and reword a little bit the comments to make this driver more readable. There is not functional change. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200929230124.31491-4-miquel.raynal@bootlin.com commit cdbe8df5e28e452c232c0c16b205edfd390d28e5 Author: Miquel Raynal Date: Wed Sep 30 01:01:06 2020 +0200 mtd: nand: ecc-bch: Move BCH code to the generic NAND layer BCH ECC code might be later re-used by the SPI NAND layer. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200929230124.31491-3-miquel.raynal@bootlin.com commit 51e7bf4534da678da27c0f51e7ff21804fae88ca Author: Miquel Raynal Date: Wed Sep 30 01:01:05 2020 +0200 mtd: nand: ecc: Add an I/O request tweaking mechanism Currently, BCH and Hamming engine are sharing the same tweaking/restoring I/O mechanism: they need the I/O request to fully cover the main/OOB area. Let's make this code generic as sharing the code between two drivers is already a win. Maybe other ECC engine drivers will need it too. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200929230124.31491-2-miquel.raynal@bootlin.com commit f74bed6a4e0d7f51da7f624e47f6e9423920e1e0 Author: Rikard Falkeborn Date: Sun Nov 29 00:43:42 2020 +0100 thermal: core: Constify static attribute_group structs The only usage of these structs is to assign their address to the thermal_zone_attribute_groups array, which consists of pointers to const, so make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201128234342.36684-1-rikard.falkeborn@gmail.com commit 3473065927a877e0a15c4d4b64f245ccaba24e3f Merge: f80c215099841 b65054597872c Author: Greg Kroah-Hartman Date: Mon Nov 30 08:33:06 2020 +0100 Merge 5.10-rc6 into char-misc-next We need the fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit ebad43260d225bccd57c7144a6eecbef3cd88f7f Merge: ab37fa851c488 b65054597872c Author: Greg Kroah-Hartman Date: Mon Nov 30 08:29:30 2020 +0100 Merge 5.10-rc6 into usb-next We need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 4ebd35bfb1831e549467a0deda99b39acb62cf50 Author: Ran Wang Date: Mon Nov 2 15:26:52 2020 +0800 ARM: dts: ls1021a: fix rcpm failed to claim resource The range of dcfg reg is wrong, which overlap with other device, such as rcpm. This issue causing rcpm driver failed to claim reg resource when calling devm_ioremap_resource(). Signed-off-by: Ran Wang Acked-by: Li Yang Signed-off-by: Shawn Guo commit 7a1980567fa0b8f37c0fc7d9ca0c7c70724bae3d Author: Ran Wang Date: Mon Nov 2 15:26:51 2020 +0800 ARM: dts: ls1021a: fix flextimer failed to wake system The data of property 'fsl,rcpm-wakeup' is not corrcet, which causing RCPM driver incorrectly program register IPPDEXPCR1, then flextimer is wrongly clock gated during system suspend, can't send interrupt to wake. Signed-off-by: Ran Wang Acked-by: Li Yang Signed-off-by: Shawn Guo commit 879e5b3f98bae035cf8e2f777cc3c64bde8d6d9b Author: Joel Stanley Date: Thu Nov 19 18:02:30 2020 +1030 dt-bindings: vendor-prefixes: Add FII Adds Foxconn Industrial Internet, who have submitted a BMC device tree. Signed-off-by: Joel Stanley Reviewed-by: Benjamin Fair Link: https://lore.kernel.org/r/20201119073230.123888-1-joel@jms.id.au Signed-off-by: Joel Stanley commit faa2cec66798b17aea9c53756a1354e8a7ea54ef Author: Tom Rix Date: Mon Oct 19 11:59:37 2020 -0700 power: supply: wm831x_power: remove unneeded break A break is not needed if it is preceded by a goto. Signed-off-by: Tom Rix Acked-by: Charles Keepax Signed-off-by: Sebastian Reichel commit 4e586fe990b199bdcb9d9f32071a13388cbae23b Author: Linus Walleij Date: Fri Oct 30 01:37:32 2020 +0100 power: supply: bq24735: Drop unused include The driver include but actually only use which is includes below. Drop the surplus legacy header include. Cc: Peter Rosin Signed-off-by: Linus Walleij Signed-off-by: Sebastian Reichel commit 846651bf976fee3900e0ddab57bab5bb1b5d3d16 Author: Linus Walleij Date: Fri Oct 30 01:33:36 2020 +0100 power: supply: bq24190_charger: Drop unused include The driver includes but fails to use any symbols from the file. Signed-off-by: Linus Walleij Signed-off-by: Sebastian Reichel commit b0327ffb133fb2148fc3bc2afb39af2871ab21cb Author: Linus Walleij Date: Fri Oct 30 13:24:24 2020 +0100 power: supply: generic-adc-battery: Use GPIO descriptors This driver uses platform data to pass GPIO lines using the deprecated global GPIO numbers. There are no in-tree users of this platform data. Any out-of-tree or coming users of this driver can easily be migrated to use machine descriptor tables as described in Documentation/driver-api/gpio/board.rst section "platform data". Cc: Anish Kumar Cc: H. Nikolaus Schaller Signed-off-by: Linus Walleij Signed-off-by: Sebastian Reichel commit cf35bff64f79b4ca8785766d67b608b76404d43f Author: Jagan Teki Date: Mon Nov 9 23:40:17 2020 +0530 arm64: defconfig: Enable USB_SERIAL_CP210X Some hardware platforms required CP20x USB to Serial converter in order to work onboard functionalities like Bluetooth. An example of such a platform is from Engicam's PX30 (ARM64). Mark it as module in defconfig. Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20201109181017.206834-10-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit ec68a66395d9ccedc9b2b2f6452edfd7cb0fdfd5 Author: Jagan Teki Date: Mon Nov 9 23:40:16 2020 +0530 arm64: defconfig: Enable PHY_ROCKCHIP_INNO_DSIDPHY In order to work LDVS, DSI in mainline tree for Rockchip based hardware platforms, the associated PHY driver has to enable in default defconfig. Enable rockchip DSI phy driver. Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20201109181017.206834-9-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit dbb378a59cb2bdb01454098513d9b61355fbe377 Author: Jagan Teki Date: Mon Nov 9 23:40:15 2020 +0530 arm64: defconfig: Enable ROCKCHIP_LVDS Now, some of the rockchip hardware platforms do enable lvds in mainline tree. So, enable Rockchip LVDS driver via default defconfig. Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20201109181017.206834-8-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit 1cc1e851d15b4ebd4c6c5f741cfdb58b988a4445 Author: Suniel Mahesh Date: Mon Nov 9 23:40:14 2020 +0530 arm64: dts: rockchip: Add BT support on px30-engicam Engicam PX30 carrier boards like EDIMM2.2 and C.TOUCH2.0 have an onboard Sterling-LWD Wifi/BT chip based on BCM43430 connected on the UART bus. UART bus on the design routed via USB to UART CP20x bridge. This bridge powered from 3V3 regualtor gpio. This patch adds BT enablement nodes for these respective boards. Signed-off-by: Michael Trimarchi Signed-off-by: Suniel Mahesh Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20201109181017.206834-7-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit 93a4e7d12468b0ab46796f3ed8dc5838dc7f63bc Author: Suniel Mahesh Date: Mon Nov 9 23:40:13 2020 +0530 arm64: dts: rockchip: Add WiFi support on px30-engicam Engicam PX30 carrier boards like EDIMM2.2 and C.TOUCH2.0 have an onboard Sterling-LWD Wifi/BT chip based on BCM43430 connected on the SDIO bus. The SDIO power sequnce is connacted with exteernal 32KHz oscillator and it require 3V3 regulator input. This patch adds WiFi enablement nodes for these respective boards. Signed-off-by: Michael Trimarchi Signed-off-by: Suniel Mahesh Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20201109181017.206834-6-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit 0e418423be1c824b2cda37fd00528f62231cd219 Author: Jagan Teki Date: Mon Nov 9 23:40:12 2020 +0530 arm64: dts: rockchip: Add Engicam PX30.Core C.TOUCH 2.0 10.1" OF PX30.Core is an EDIMM SOM based on Rockchip PX30 from Engicam. C.TOUCH 2.0 is a general purpose carrier board with capacitive touch interface support. 10.1" OF is a capacitive touch 10.1" Open Frame panel solutions. PX30.Core needs to mount on top of C.TOUCH 2.0 carrier with pluged 10.1" OF for creating complete PX30.Core C.TOUCH 2.0 10.1" Open Frame. Add support for it. Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20201109181017.206834-5-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit 23708d46101b5d5538c88b84b764d0ed9d8957ca Author: Jagan Teki Date: Mon Nov 9 23:40:11 2020 +0530 dt-bindings: arm: rockchip: Add Engicam PX30.Core C.TOUCH 2.0 10.1" OF PX30.Core is an EDIMM SOM based on Rockchip PX30 from Engicam. C.TOUCH 2.0 is a general purpose carrier board with capacitive touch interface support. 10.1" OF is a capacitive touch 10.1" Open Frame panel solutions. PX30.Core needs to mount on top of C.TOUCH 2.0 carrier with pluged 10.1" OF for creating complete PX30.Core C.TOUCH 2.0 10.1" Open Frame. Add bindings for it. Acked-by: Rob Herring Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20201109181017.206834-4-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit 87761edeb2cd90b8251f269eb52c4b48152aace8 Author: Jagan Teki Date: Mon Nov 9 23:40:10 2020 +0530 arm64: dts: rockchip: Enable LVDS panel on px30-engicam-edimm2.2 Engicam PX30.Core EDIMM2.2 developement Kit has on board 10" LVDS panel from yes-optoelectronics. This patch adds panel enablement nodes on respective dts(i) files. Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20201109181017.206834-3-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit 4548ea027c900f1e0f07a292b8e10dc3d2725f44 Author: Jagan Teki Date: Mon Nov 9 23:40:09 2020 +0530 arm64: dts: rockchip: Enable USB Host, OTG on px30-enagicam Engicam EDIMM2.2 and C.Touch 2.0 Kits support USB Host and OTG ports. Add support to enable USB on these kits while mounting px30-core SOM. Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20201109181017.206834-2-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit ba940ed83218f034f728184439c7e87795237752 Author: Linus Walleij Date: Fri Oct 30 15:34:01 2020 +0100 power: supply: collie_battery: Convert to GPIO descriptors This converts the Collie battery driver to use GPIO descriptors. We use a mixture of 3 GPIOs defined in the machine and 3 GPIOs requested directly from the ucb1x00 chip. Cc: Robert Jarzmik Cc: Dmitry Eremin-Solenikov Signed-off-by: Linus Walleij Signed-off-by: Sebastian Reichel commit b2f6cb78eaa1cad57dd3fe11d0458cd4fae9a584 Author: Zhang Qilong Date: Mon Nov 2 22:33:21 2020 +0800 power: supply: bq24190_charger: fix reference leak pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to call pm_runtime_put_noidle will result in reference leak in callers(bq24190_sysfs_show, bq24190_charger_get_property, bq24190_charger_set_property, bq24190_battery_get_property, bq24190_battery_set_property), so we should fix it. Fixes: f385e6e2a1532 ("power: bq24190_charger: Use PM runtime autosuspend") Signed-off-by: Zhang Qilong Signed-off-by: Sebastian Reichel commit 7776bcd241e08e13ef009926c6dea84dc3b2f8ff Author: Linus Walleij Date: Tue Nov 3 00:48:44 2020 +0100 power: supply: s3c-adc-battery: Convert to GPIO descriptors This converts the S3C ADC battery to use GPIO descriptors instead of a global GPIO number for the charging completed GPIO. Using the pattern from the GPIO charger we name this GPIO line "charge-status" in the board file. Cc: linux-samsung-soc@vger.kernel.org Cc: Sergiy Kibrik Signed-off-by: Linus Walleij Signed-off-by: Sebastian Reichel commit 36dbca148bf8e3b8658982aa2256bdc7ef040256 Author: Helge Deller Date: Thu Nov 5 14:32:50 2020 +0100 power: reset: Use printk format symbol resolver Instead of looking up a symbol name by hand, use the %ps printk format specifier. Signed-off-by: Helge Deller Signed-off-by: Sebastian Reichel commit 0dd713ef2134bac2ee25562990dd6ecbc6feb615 Author: Yangtao Li Date: Mon Nov 9 20:11:04 2020 +0800 power: supply: axp20x_usb_power: Use power efficient workqueue for debounce The debounce timeout is generally quite long and the work not performance critical so allow the scheduler to run the work anywhere rather than in the normal per-CPU workqueue. Signed-off-by: Yangtao Li Signed-off-by: Sebastian Reichel commit fbda05f7c6487ac88c5f273a74735c3afe414db6 Author: Yangtao Li Date: Mon Nov 9 20:10:38 2020 +0800 power: supply: axp20x_usb_power: fix typo s/on on/on Signed-off-by: Yangtao Li Signed-off-by: Sebastian Reichel commit 9c65f6c4482d0e3e3681c113f77f82ac571ceaa7 Author: Timon Baetz Date: Mon Nov 9 19:43:55 2020 +0000 power: supply: max8997-charger: Improve getting charger status Detect charging and discharging state. Ported from downstream Samsung Galaxy S2 (i9100) kernel fork. Signed-off-by: Timon Baetz Signed-off-by: Sebastian Reichel commit 5976a8d0bd4796ef6a0cb1f567a0d82967c62408 Author: Timon Baetz Date: Mon Nov 9 19:43:28 2020 +0000 power: supply: max8997-charger: Fix platform data retrieval Use pdata field of max8998_dev struct to obtain platform data. Signed-off-by: Timon Baetz Signed-off-by: Sebastian Reichel commit 70bd58fff29dc4c53cfea2da01f05d2377d2ffa9 Author: Timon Baetz Date: Mon Nov 9 19:43:12 2020 +0000 power: supply: max8997-charger: Use module_platform_driver() Replace register and unregister function calls with module_platform_driver(). Signed-off-by: Timon Baetz Signed-off-by: Sebastian Reichel commit 91bc9e1938c4682972541cba784f335af2b81f66 Author: Nigel Christian Date: Fri Nov 13 23:57:47 2020 -0500 power: supply: pm2301_charger: remove unnecessary variable The variable "ret" is initialized to zero and then returned. Remove it and return zero. Signed-off-by: Nigel Christian Signed-off-by: Sebastian Reichel commit df12470ce775cd126f26c96d240959b0c1929e23 Author: Tian Tao Date: Mon Nov 16 09:07:19 2020 +0800 power: supply: Fix missing IRQF_ONESHOT as only threaded handler Coccinelle noticed: drivers/power/supply/ab8500_btemp.c:1107:8-28: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT. Signed-off-by: Tian Tao Signed-off-by: Sebastian Reichel commit a0f1ccd96c7049377d892a4299b6d5e47ec9179d Author: Hans de Goede Date: Wed Nov 18 13:13:12 2020 +0100 power: supply: axp288_charger: Fix HP Pavilion x2 10 DMI matching Commit 9c80662a74cd ("power: supply: axp288_charger: Add special handling for HP Pavilion x2 10") added special handling for HP Pavilion x2 10 models which use the weird combination of a Type-C connector and the non Type-C aware AXP288 PMIC. This special handling was activated by a DMI match a the product-name of "HP Pavilion x2 Detachable". Recently I've learned that there are also older "HP Pavilion x2 Detachable" models with an AXP288 PMIC + a micro-usb connector where we should not activate the special handling for the Type-C connectors. Extend the matching to also match on the DMI board-name and match on the 2 boards (one Bay Trail based one Cherry Trail based) of which we are certain that they use the AXP288 + Type-C connector combination. Note the DSDT code from these older (AXP288 + micro-USB) models contains some AML code (which never runs under Linux) which reads the micro-USB connector id-pin and if it is pulled to ground, which would normally mean the port is in host mode!, then it sets the input-current-limit to 3A, it seems HP is using the micro-USB port as a charging only connector and identifies their own 3A capable charger though this hack which is a major violation of the USB specs. Note HP also hardcodes a 2A limit when the id-pin is not pulled to ground, which is also in violation of the specs. I've no intention to add support for HP's hack to support 3A charging on these older models. By making the DMI matches for the Type-C equipped models workaround more tighter, these older models will be treated just like any other AXP288 + micro-USB equipped device and the input-current limit will follow the BC 1.2 spec (using the defacto standard values there where the BC 1.2 spec defines a range). Fixes: 9c80662a74cd ("power: supply: axp288_charger: Add special handling for HP Pavilion x2 10") BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1896924 Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel commit 5225371e56c512abe5c5acc271256c2c390903c5 Author: Sebastian Krzyszkowiak Date: Wed Nov 25 05:48:30 2020 +0100 power: supply: max17042_battery: Export charge termination current property The value is there, so let's export it. Signed-off-by: Sebastian Krzyszkowiak Signed-off-by: Sebastian Reichel commit 6dcfa009f8a96273f074032c888409ee2b26f498 Author: Sebastian Krzyszkowiak Date: Wed Nov 25 05:47:04 2020 +0100 power: supply: max17042_battery: Take r_sns value into account in charge_counter The default r_sns value was hardcoded there, so let's change it to the actually configured one. Signed-off-by: Sebastian Krzyszkowiak Signed-off-by: Sebastian Reichel commit 9e39ef148777727360dabebacd70d60f3e0edc48 Author: Sebastian Krzyszkowiak Date: Wed Nov 25 05:46:17 2020 +0100 power: supply: max17042_battery: Improve accuracy of current_now and current_avg readings Dividing 1562500 by r_sns value usually doesn't result in an integer. Signed-off-by: Sebastian Krzyszkowiak Signed-off-by: Sebastian Reichel commit 4b0a56e692503692da6555337a697c17feabbb3e Author: Sebastian Krzyszkowiak Date: Wed Nov 25 05:44:44 2020 +0100 power: supply: max17042_battery: Fix current_{avg,now} hiding with no current sense When current sense is disabled, max17042_no_current_sense_psy_desc gets used which ignores two last properties from the list. Fixes: 21b01cc879cc ("power: supply: max17042_battery: Add support for the TTE_NOW prop") Reported-by: Timon Baetz Signed-off-by: Sebastian Krzyszkowiak Signed-off-by: Sebastian Reichel commit 9a9f642784074d09efe9337e64b959f76c9f6913 Author: Johan Jonker Date: Mon Nov 16 14:23:11 2020 +0100 arm64: dts: rockchip: rename sdhci nodename to mmc on rk3399 A test with the command below gives for example this error: /arch/arm64/boot/dts/rockchip/rk3399-evb.dt.yaml: sdhci@fe330000: $nodename:0: 'sdhci@fe330000' does not match '^mmc(@.*)?$' Fix it by renaming sdhci to mmc. make ARCH=arm64 dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/ mmc/arasan,sdhci.yaml Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20201116132311.8318-1-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 5df4d4d16ce4c6e6a5cb9d4b684b187f28258219 Author: Chen-Yu Tsai Date: Thu Nov 26 15:33:36 2020 +0800 arm64: dts: rockchip: Enable analog audio on rk3328-roc-cc Now that driver support for the RK3328's audio codec, and the plumbing is defined at the SoC level, we can enable analog audio at the board level. Enable analog audio by enabling the codec and the I2S interface connected and the simple-audio-card that binds them together. Signed-off-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20201126073336.30794-4-wens@kernel.org Signed-off-by: Heiko Stuebner commit 65f0b420dea7e70d70cd6ef0f12f9ff81ab90d23 Author: Chen-Yu Tsai Date: Thu Nov 26 15:33:35 2020 +0800 arm64: dts: rockchip: Enable HDMI audio on rk3328-roc-cc The RK3328-ROC-CC already has HDMI display output enabled. Now that audio for the HDMI controller is supported, it can be enabled as well. Enable the simple-audio-card, and the I2S interface the audio is fed from. Signed-off-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20201126073336.30794-3-wens@kernel.org Signed-off-by: Heiko Stuebner commit 4076a007bd0f6171434bdb119a0b8797749b0502 Author: Chen-Yu Tsai Date: Thu Nov 26 15:33:34 2020 +0800 arm64: dts: rockchip: Set dr_mode to "host" for OTG on rk3328-roc-cc The board has a standard USB A female port connected to the USB OTG controller's data pins. Set dr_mode in the OTG controller node to indicate this usage, instead of having the implementation guess. Fixes: 2171f4fdac06 ("arm64: dts: rockchip: add roc-rk3328-cc board") Signed-off-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20201126073336.30794-2-wens@kernel.org Signed-off-by: Heiko Stuebner commit d4e9e7b6f7ae37a99bc11ce9efe6e8bdc711362f Author: Sebastian Krzyszkowiak Date: Wed Nov 25 04:48:05 2020 +0100 power: supply: bq25890: Use the correct range for IILIM register I've checked bq25890, bq25892, bq25895 and bq25896 datasheets and they all define IILIM to be between 100mA-3.25A with 50mA steps. Fixes: 478efc79ee32 ("power: bq25890: implement INPUT_CURRENT_LIMIT property") Signed-off-by: Sebastian Krzyszkowiak Reviewed-by: Michał Mirosław Signed-off-by: Sebastian Reichel commit aa4302c4933a419baf0546d7f6e59f27d4250797 Author: Gregory CLEMENT Date: Wed Nov 25 08:19:19 2020 +0100 power: reset: ocelot: Add support 2 other MIPS based SoCs This adds reset support for Luton and Jaguar2 in the ocelot-reset driver. They are both MIPS based belonging to the Vcore III family. Acked-by: Alexandre Belloni Signed-off-by: Gregory CLEMENT Signed-off-by: Sebastian Reichel commit 01b8f5b53e4df5d22d0e273fea5124a972e8d5c4 Author: Gregory CLEMENT Date: Wed Nov 25 08:19:18 2020 +0100 dt-bindings: reset: ocelot: Add Luton and Jaguar2 support This adds the support for 2 others MIPS based VCore III SoCs: Luton and Jaguar2. Signed-off-by: Gregory CLEMENT Signed-off-by: Sebastian Reichel commit d1390d7d55a59d39a6a113f00c6452b980d514ec Author: Sean Nyekjaer Date: Wed Dec 11 15:16:35 2019 +0100 can: tcan4x5x: tcan4x5x_clear_interrupts(): remove redundant return statement This patch removes a redundant return at the end of tcan4x5x_clear_interrupts(). Signed-off-by: Sean Nyekjaer Link: http://lore.kernel.org/r/20191211141635.322577-1-sean@geanix.com Reported-by: Daniels Umanovskis Acked-by: Dan Murphy Fixes: 5443c226ba91 ("can: tcan4x5x: Add tcan4x5x driver to the kernel") Signed-off-by: Marc Kleine-Budde commit 68c0c1c7f9668e7a7f2e18dbf951cfee57af1c0e Author: Marc Kleine-Budde Date: Thu Nov 26 14:21:44 2020 +0100 can: mcp251xfd: tef-path: reduce number of SPI core requests to set UINC bit Reduce the number of separate SPI core requests when setting the UINC bit in the TEF FIFO, and instead batch them up into a single SPI core request. Link: https://lore.kernel.org/r/20201126132144.351154-6-mkl@pengutronix.de Tested-by: Thomas Kopp Signed-off-by: Marc Kleine-Budde commit 63e70488b49acc0c3bcca354539806742ea8b888 Author: Marc Kleine-Budde Date: Thu Nov 26 14:21:43 2020 +0100 can: mcp251xfd: move struct mcp251xfd_tef_ring definition This patch moves the struct mcp251xfd_tef_ring upwards, so that the union mcp251xfd_write_reg_buf and struct spi_transfer can be made members of it. Link: https://lore.kernel.org/r/20201126132144.351154-5-mkl@pengutronix.de Tested-by: Thomas Kopp Signed-off-by: Marc Kleine-Budde commit dada6a6c7d3f1929dd530d67002d7475fec81c3d Author: Marc Kleine-Budde Date: Thu Nov 26 14:21:42 2020 +0100 can: mcp251xfd: struct mcp251xfd_priv::tef to array of length 1 This patch converts the struct mcp251xfd_tef_ring member within the struct mcp251xfd_priv into an array of length one. This way all rings (tef, tx and rx) can be accessed in the same way. Link: https://lore.kernel.org/r/20201126132144.351154-4-mkl@pengutronix.de Tested-by: Thomas Kopp Signed-off-by: Marc Kleine-Budde commit 1f652bb6bae7f211f3131ddbc380bb839680068f Author: Ursula Maplehurst Date: Thu Nov 26 14:21:41 2020 +0100 can: mcp25xxfd: rx-path: reduce number of SPI core requests to set UINC bit Reduce the number of separate SPI core requests when setting the UINC bit in the RX FIFO, and instead batch them up into a single SPI core request. Link: https://github.com/marckleinebudde/linux/issues/4 Link: https://lore.kernel.org/r/20201126132144.351154-3-mkl@pengutronix.de Tested-by: Thomas Kopp Signed-off-by: Ursula Maplehurst Signed-off-by: Marc Kleine-Budde commit 4843ad9b613aa72258bd122d7884d311dad334e4 Author: Marc Kleine-Budde Date: Thu Nov 26 14:21:40 2020 +0100 can: mcp251xfd: mcp25xxfd_ring_alloc(): add define instead open coding the maximum number of RX objects This patch add a define for the maximum number of RX objects instead of open coding it. Link: https://lore.kernel.org/r/20201126132144.351154-2-mkl@pengutronix.de Tested-by: Thomas Kopp Signed-off-by: Marc Kleine-Budde commit 368444dd7a2c9180bcc0f95c4d5c79a8f56aa209 Author: Gustavo A. R. Silva Date: Wed Nov 25 10:33:26 2020 +0100 can: pcan_usb_core: fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by moving the "default" to the end of the "switch" statement and explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Reported-by: Gustavo A. R. Silva Link: http://lore.kernel.org/r/aab7cf16bf43cc7c3e9c9930d2dae850c1d07a3c.1605896059.git.gustavoars@kernel.org Signed-off-by: Gustavo A. R. Silva [mkl: move default to end] Signed-off-by: Marc Kleine-Budde commit caa2fd752ecb80faf7a2e1cdadc737187934675e Author: Johan Jonker Date: Wed Nov 18 14:58:17 2020 +0100 clk: rockchip: fix i2s gate bits on rk3066 and rk3188 The Rockchip PX2/RK3066 uses these bits in CRU_CLKGATE7_CON: hclk_i2s_8ch_gate_en bit 4 (dtsi: i2s0) hclk_i2s0_2ch_gate_en bit 2 (dtsi: i2s1) hclk_i2s1_2ch_gate_en bit 3 (dtsi: i2s2) The Rockchip PX3/RK3188 uses this bit in CRU_CLKGATE7_CON: hclk_i2s_2ch_gate_en bit 2 (dtsi: i2s0) The bits got somehow mixed up in the clk-rk3188.c file. The labels in the dtsi files are not suppose to change. The sclk and hclk names should match for "trace_event=clk_disable,clk_enable", so remove GATE HCLK_I2S0 from the common clock tree and fix the bits in the rk3066 and rk3188 clock tree. Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20201118135822.9582-3-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 5868491e1257786628fdd2457dfb77609f49f91d Author: Johan Jonker Date: Wed Nov 18 14:58:16 2020 +0100 clk: rockchip: add CLK_SET_RATE_PARENT to sclk for rk3066a i2s and uart clocks Add CLK_SET_RATE_PARENT to sclk for rk3066a i2s and uart clocks, so that the parent COMPOSITE_FRACMUX and COMPOSITE_NOMUX also update. Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20201118135822.9582-2-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 0c3d3cc93811c9b2413a17e06a91ca39a19ad871 Author: Kalyan Thota Date: Wed Nov 25 02:02:40 2020 -0800 drm/msm/dpu: consider vertical front porch in the prefill bw calculation In case of panels with low vertical back porch, the prefill bw requirement will be high as we will have less time(vbp+pw) to fetch and fill the hw latency buffers before start of first line in active period. For ex: Say hw_latency_line_buffers = 24, and if blanking vbp+pw = 10 Here we need to fetch 24 lines of data in 10 line times. This will increase the bw to the ratio of linebuffers to blanking. DPU hw can also fetch data during vertical front porch provided interface prefetch is enabled. Use vfp in the prefill calculation as dpu driver enables prefetch if the blanking is not sufficient to fill the latency lines. Signed-off-by: Kalyan Thota Tested-by: Amit Pundir Signed-off-by: Rob Clark commit 3d247123b5a16f5f43ddc0c86dba05b417b6cadc Author: Jordan Crouse Date: Wed Nov 25 12:30:16 2020 +0530 drm/msm/a6xx: Add support for using system cache on MMU500 based targets GPU targets with an MMU-500 attached have a slightly different process for enabling system cache. Use the compatible string on the IOMMU phandle to see if an MMU-500 is attached and modify the programming sequence accordingly. Signed-off-by: Jordan Crouse Signed-off-by: Sai Prakash Ranjan Signed-off-by: Rob Clark commit 474dadb8b0d557661cb3d1727f1ff2f82bac6b4c Author: Sharat Masetty Date: Wed Nov 25 12:30:15 2020 +0530 drm/msm/a6xx: Add support for using system cache(LLC) The last level system cache can be partitioned to 32 different slices of which GPU has two slices preallocated. One slice is used for caching GPU buffers and the other slice is used for caching the GPU SMMU pagetables. This talks to the core system cache driver to acquire the slice handles, configure the SCID's to those slices and activates and deactivates the slices upon GPU power collapse and restore. Some support from the IOMMU driver is also needed to make use of the system cache to set the right TCR attributes. GPU then has the ability to override a few cacheability parameters which it does to override write-allocate to write-no-allocate as the GPU hardware does not benefit much from it. DOMAIN_ATTR_IO_PGTABLE_CFG is another domain level attribute used by the IOMMU driver for pagetable configuration which will be used to set a quirk initially to set the right attributes to cache the hardware pagetables into the system cache. Signed-off-by: Sharat Masetty [saiprakash.ranjan: fix to set attr before device attach to iommu and rebase] Signed-off-by: Sai Prakash Ranjan Signed-off-by: Rob Clark commit 40a72b0c7f99cf7b856dccca9624b81140955911 Author: Sharat Masetty Date: Wed Nov 25 12:30:14 2020 +0530 drm/msm: rearrange the gpu_rmw() function The register read-modify-write construct is generic enough that it can be used by other subsystems as needed, create a more generic rmw() function and have the gpu_rmw() use this new function. Signed-off-by: Sharat Masetty Reviewed-by: Jordan Crouse Signed-off-by: Sai Prakash Ranjan Signed-off-by: Rob Clark commit 7f5b57a095f3b9532793d143655e83433bb448af Author: Xu Wang Date: Fri Nov 27 09:05:51 2020 +0000 clk: rockchip: Remove redundant null check before clk_prepare_enable Because clk_prepare_enable() already checked NULL clock parameter, so the additional check is unnecessary, just remove it. Signed-off-by: Xu Wang Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/20201127090551.50254-1-vulab@iscas.ac.cn Signed-off-by: Heiko Stuebner commit 9e0673c00cb0839fbe64e4ee4dbf150fd28483eb Merge: 64aec620b7f20 e67890c97944b Author: Rob Clark Date: Sun Nov 29 11:00:49 2020 -0800 Merge remote-tracking branch 'arm64/for-next/iommu/io-pgtable-domain-attr' into msm-next-staging Pull in new iommu domain attr. Signed-off-by: Rob Clark commit 64aec620b7f20cd925ef4641731539f946f5c011 Author: Tian Tao Date: Wed Nov 11 15:57:56 2020 +0800 drm/msm/dp: remove duplicate include statement linux/rational.h is included more than once, Remove the one that isn't necessary. Signed-off-by: Tian Tao Reviewed-by: Stephen Boyd Signed-off-by: Rob Clark commit 8b6947a81e56f0ef06be8a6d805df9634b4fd3f7 Author: Rikard Falkeborn Date: Sun Nov 8 23:37:38 2020 +0100 drm/msm: dsi: Constify dsi_host_ops The only usage of dsi_host_ops is to assign its address to the ops field in the mipi_dsi_host struct, which is a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Signed-off-by: Rob Clark commit cc9014bf63a4d8fef0eee88e92f027928683ca12 Author: Lee Jones Date: Tue Nov 24 19:37:52 2020 +0000 drm/msm/dp/dp_ctrl: Move 'tu' from the stack to the heap 'struct tu_algo_data' is huge ~400 Bytes. Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/msm/dp/dp_ctrl.c: In function ‘_dp_ctrl_calc_tu.constprop’: drivers/gpu/drm/msm/dp/dp_ctrl.c:938:1: warning: the frame size of 1184 bytes is larger than 1024 bytes [-Wframe-larger-than=] Cc: Rob Clark Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: Chandan Uddaraju Cc: Kuogee Hsieh Cc: linux-arm-msm@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Rob Clark commit 692bdf972dc493cd96b4d05f58594278a776eb0e Author: Lee Jones Date: Tue Nov 24 19:37:47 2020 +0000 drm/msm/adreno/a6xx_gpu_state: Make some local functions static Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c:83:7: warning: no previous prototype for ‘state_kcalloc’ [-Wmissing-prototypes] drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c:95:7: warning: no previous prototype for ‘state_kmemdup’ [-Wmissing-prototypes] drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c:947:6: warning: no previous prototype for ‘a6xx_gpu_state_destroy’ [-Wmissing-prototypes] Cc: Rob Clark Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: linux-arm-msm@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Rob Clark commit 324dca17b60c8df726f7b0d3116e23b65e6634c3 Author: Lee Jones Date: Tue Nov 24 19:37:45 2020 +0000 drm/msm/msm_gem_shrinker: Fix descriptions for 'drm_device' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/msm/msm_gem_shrinker.c:108: warning: Function parameter or member 'dev' not described in 'msm_gem_shrinker_init' drivers/gpu/drm/msm/msm_gem_shrinker.c:108: warning: Excess function parameter 'dev_priv' description in 'msm_gem_shrinker_init' drivers/gpu/drm/msm/msm_gem_shrinker.c:126: warning: Function parameter or member 'dev' not described in 'msm_gem_shrinker_cleanup' drivers/gpu/drm/msm/msm_gem_shrinker.c:126: warning: Excess function parameter 'dev_priv' description in 'msm_gem_shrinker_cleanup' Cc: Rob Clark Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: linux-arm-msm@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Rob Clark commit ea8742c63a1f7cb2e4f9b236ae9efd049fdbdca7 Author: Lee Jones Date: Mon Nov 23 11:19:17 2020 +0000 drm/msm/msm_drv: Make '_msm_ioremap()' static Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/msm/msm_drv.c:124:15: warning: no previous prototype for ‘_msm_ioremap’ [-Wmissing-prototypes] Cc: Rob Clark Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: linux-arm-msm@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org Signed-off-by: Lee Jones Reviewed-by: Abhinav Kumar Signed-off-by: Rob Clark commit 9ddf3fd3739143dfd4083872dda94260c78e0160 Author: Lee Jones Date: Mon Nov 23 11:19:14 2020 +0000 drm/msm/disp/dpu1/dpu_plane: Fix some spelling and missing function param descriptions Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c:152: warning: Function parameter or member 'plane' not described in '_dpu_plane_calc_bw' drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c:152: warning: Function parameter or member 'fb' not described in '_dpu_plane_calc_bw' drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c:152: warning: Excess function parameter 'Plane' description in '_dpu_plane_calc_bw' drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c:200: warning: Function parameter or member 'plane' not described in '_dpu_plane_calc_clk' drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c:200: warning: Excess function parameter 'Plane' description in '_dpu_plane_calc_clk' drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c:232: warning: Function parameter or member 'src_width' not described in '_dpu_plane_calc_fill_level' drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c:232: warning: Excess function parameter 'src_wdith' description in '_dpu_plane_calc_fill_level' drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c:1060: warning: Function parameter or member 'error' not described in 'dpu_plane_set_error' Cc: Rob Clark Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: Kalyan Thota Cc: linux-arm-msm@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org Signed-off-by: Lee Jones Reviewed-by: Abhinav Kumar Signed-off-by: Rob Clark commit 4c99c358954000868972118a94d3422e25a21219 Author: Lee Jones Date: Mon Nov 23 11:19:11 2020 +0000 drm/msm/disp/dpu1/dpu_vbif: Fix a couple of function param descriptions Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c:150: warning: Function parameter or member 'dpu_kms' not described in 'dpu_vbif_set_ot_limit' drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c:150: warning: Excess function parameter 'vbif' description in 'dpu_vbif_set_ot_limit' Cc: Rob Clark Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: linux-arm-msm@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Rob Clark commit 0d88dda62c80dd14a1a8624bd583ba9d06ac231d Author: Lee Jones Date: Mon Nov 23 11:19:10 2020 +0000 drm/msm/disp/dpu1/dpu_rm: Fix formatting issues and supply 'global_state' description Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c:247: warning: Excess function parameter 'Return' description in '_dpu_rm_check_lm_peer' drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c:283: warning: Function parameter or member 'global_state' not described in '_dpu_rm_check_lm_and_get_connected_blks' drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c:283: warning: Excess function parameter 'Return' description in '_dpu_rm_check_lm_and_get_connected_blks' Cc: Rob Clark Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: Drew Davenport Cc: linux-arm-msm@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org Signed-off-by: Lee Jones Reviewed-by: Abhinav Kumar Signed-off-by: Rob Clark commit 6008cd431b2f138a26fe08f4a1c66bb6a161b466 Author: Lee Jones Date: Mon Nov 23 11:18:59 2020 +0000 drm/msm/disp/dpu1/dpu_hw_sspp: Fix kernel-doc formatting abuse Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c:240: warning: Function parameter or member 'ctx' not described in 'dpu_hw_sspp_setup_format' drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c:240: warning: Function parameter or member 'fmt' not described in 'dpu_hw_sspp_setup_format' drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c:240: warning: Function parameter or member 'flags' not described in 'dpu_hw_sspp_setup_format' drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c:240: warning: Function parameter or member 'rect_mode' not described in 'dpu_hw_sspp_setup_format' drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c:446: warning: Function parameter or member 'ctx' not described in 'dpu_hw_sspp_setup_rects' drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c:446: warning: Function parameter or member 'cfg' not described in 'dpu_hw_sspp_setup_rects' drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c:446: warning: Function parameter or member 'rect_index' not described in 'dpu_hw_sspp_setup_rects' Cc: Rob Clark Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: Jonathan Marek Cc: linux-arm-msm@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org Signed-off-by: Lee Jones Reviewed-by: Abhinav Kumar Signed-off-by: Rob Clark commit 0177aef3297242d62ed19206e2c06c498f8313df Author: Lee Jones Date: Mon Nov 23 11:18:58 2020 +0000 drm/msm/disp/dpu1/dpu_hw_lm: Fix misnaming of parameter 'ctx' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c:55: warning: Function parameter or member 'ctx' not described in '_stage_offset' drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c:55: warning: Excess function parameter 'c' description in '_stage_offset' Cc: Rob Clark Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: linux-arm-msm@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org Signed-off-by: Lee Jones Reviewed-by: Abhinav Kumar Signed-off-by: Rob Clark commit cca5ff947c7c6e35a7c04a4d6659077fb7e634ae Author: Lee Jones Date: Mon Nov 23 11:18:57 2020 +0000 drm/msm/disp/dpu1/dpu_encoder: Fix a few parameter/member formatting issues Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:207: warning: Function parameter or member 'cur_slave' not described in 'dpu_encoder_virt' drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:207: warning: Function parameter or member 'hw_pp' not described in 'dpu_encoder_virt' drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:207: warning: Function parameter or member 'intfs_swapped' not described in 'dpu_encoder_virt' drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:1445: warning: Function parameter or member 'drm_enc' not described in '_dpu_encoder_trigger_flush' drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:1445: warning: Function parameter or member 'phys' not described in '_dpu_encoder_trigger_flush' drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:1445: warning: Function parameter or member 'extra_flush_bits' not described in '_dpu_encoder_trigger_flush' drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:1481: warning: Function parameter or member 'phys' not described in '_dpu_encoder_trigger_start' drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:1564: warning: Function parameter or member 'dpu_enc' not described in '_dpu_encoder_kickoff_phys' Cc: Rob Clark Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: linux-arm-msm@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org Signed-off-by: Lee Jones Reviewed-by: Abhinav Kumar Signed-off-by: Rob Clark commit 09c7e37088b06fb7e18706411cb077354070e559 Author: Lee Jones Date: Mon Nov 23 11:18:53 2020 +0000 drm/msm/disp/dpu1/dpu_hw_catalog: Move definitions to the only place they are used These tables are not large or overbearing, so moving them into the source file seems like the right thing to do. The alternative is to use __maybe_unused, which is undesirable. Fixes the following W=1 kernel build warning(s): In file included from drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c:11: drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog_format.h:7:23: warning: ‘qcom_compressed_supported_formats’ defined but not used [-Wunused-const-variable=] 7 | static const uint32_t qcom_compressed_supported_formats[] = { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog_format.h:48:23: warning: ‘plane_formats_yuv’ defined but not used [-Wunused-const-variable=] 48 | static const uint32_t plane_formats_yuv[] = { | ^~~~~~~~~~~~~~~~~ drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog_format.h:17:23: warning: ‘plane_formats’ defined but not used [-Wunused-const-variable=] 17 | static const uint32_t plane_formats[] = { | ^~~~~~~~~~~~~ Cc: Rob Clark Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: linux-arm-msm@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org Signed-off-by: Lee Jones Reviewed-by: Abhinav Kumar Signed-off-by: Rob Clark commit 14bcdfe4e208b82040ca594df76757d156bddf4d Author: Lee Jones Date: Mon Nov 23 11:18:52 2020 +0000 drm/msm/disp/dpu1/dpu_hw_catalog: Remove duplicated initialisation of 'max_linewidth' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c:124:19: warning: initialized field overwritten [-Woverride-init] drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c:124:19: note: (near initialization for ‘sm8250_dpu_caps.max_linewidth’) Cc: Rob Clark Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: linux-arm-msm@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org Signed-off-by: Lee Jones Reviewed-by: Abhinav Kumar Signed-off-by: Rob Clark commit 0070e6d272e4d2ae8f6c6b56b0e6be36979858af Author: Lee Jones Date: Mon Nov 23 11:18:51 2020 +0000 drm/msm/disp/dpu1/dpu_formats: Demote non-conformant kernel-doc header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c:50: warning: Function parameter or member 'fmt' not described in 'INTERLEAVED_RGB_FMT' drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c:50: warning: Function parameter or member 'a' not described in 'INTERLEAVED_RGB_FMT' drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c:50: warning: Function parameter or member 'r' not described in 'INTERLEAVED_RGB_FMT' drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c:50: warning: Function parameter or member 'g' not described in 'INTERLEAVED_RGB_FMT' drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c:50: warning: Function parameter or member 'b' not described in 'INTERLEAVED_RGB_FMT' drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c:50: warning: Function parameter or member 'e0' not described in 'INTERLEAVED_RGB_FMT' drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c:50: warning: Function parameter or member 'e1' not described in 'INTERLEAVED_RGB_FMT' drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c:50: warning: Function parameter or member 'e2' not described in 'INTERLEAVED_RGB_FMT' drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c:50: warning: Function parameter or member 'e3' not described in 'INTERLEAVED_RGB_FMT' drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c:50: warning: Function parameter or member 'uc' not described in 'INTERLEAVED_RGB_FMT' drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c:50: warning: Function parameter or member 'alpha' not described in 'INTERLEAVED_RGB_FMT' drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c:50: warning: Function parameter or member 'bp' not described in 'INTERLEAVED_RGB_FMT' drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c:50: warning: Function parameter or member 'flg' not described in 'INTERLEAVED_RGB_FMT' drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c:50: warning: Function parameter or member 'fm' not described in 'INTERLEAVED_RGB_FMT' drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c:50: warning: Function parameter or member 'np' not described in 'INTERLEAVED_RGB_FMT' Cc: Rob Clark Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: Fritz Koenig Cc: linux-arm-msm@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org Signed-off-by: Lee Jones Reviewed-by: Abhinav Kumar Signed-off-by: Rob Clark commit dbce3d097c2e32b6acbb4a6162d0dec2a813f4b1 Author: Lee Jones Date: Mon Nov 23 11:18:50 2020 +0000 drm/msm/disp/dpu1/dpu_hw_blk: Add one missing and remove an extra param description Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/msm/disp/dpu1/dpu_hw_blk.c:28: warning: Function parameter or member 'hw_blk' not described in 'dpu_hw_blk_init' drivers/gpu/drm/msm/disp/dpu1/dpu_hw_blk.c:120: warning: Excess function parameter 'free_blk' description in 'dpu_hw_blk_put' Cc: Rob Clark Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: linux-arm-msm@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org Signed-off-by: Lee Jones Reviewed-by: Abhinav Kumar Signed-off-by: Rob Clark commit 2785fd4795900304f4e7ab1da01af9000ec2bd1e Author: Lee Jones Date: Mon Nov 23 11:18:49 2020 +0000 drm/msm/disp/dpu1/dpu_core_perf: Fix kernel-doc formatting issues Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c:31: warning: Enum value 'DPU_PERF_MODE_MAX' not described in enum 'dpu_perf_mode' drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c:34: warning: Cannot understand * @_dpu_core_perf_calc_bw() - to calculate BW per crtc drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c:73: warning: Function parameter or member 'kms' not described in '_dpu_core_perf_calc_clk' drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c:73: warning: Function parameter or member 'crtc' not described in '_dpu_core_perf_calc_clk' drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c:73: warning: Function parameter or member 'state' not described in '_dpu_core_perf_calc_clk' drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c:249: warning: Cannot understand * @dpu_core_perf_crtc_release_bw() - request zero bandwidth Cc: Rob Clark Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: Kalyan Thota Cc: linux-arm-msm@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org Signed-off-by: Lee Jones Reviewed-by: Abhinav Kumar Signed-off-by: Rob Clark commit 03b6f2d6204a0321332e66edd517c7db63017ebf Author: Rob Clark Date: Sun Nov 29 10:11:41 2020 -0800 msm/mdp5: Fix some kernel-doc warnings Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c:227: warning: Function parameter or member 'ctl' not described in 'mdp5_ctl_set_encoder_state' drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c:227: warning: Function parameter or member 'pipeline' not described in 'mdp5_ctl_set_encoder_state' drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c:227: warning: Function parameter or member 'enabled' not described in 'mdp5_ctl_set_encoder_state' drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c:227: warning: Excess function parameter 'enable' description in 'mdp5_ctl_set_encoder_state' drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c:529: warning: Function parameter or member 'ctl' not described in 'mdp5_ctl_commit' drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c:529: warning: Function parameter or member 'pipeline' not described in 'mdp5_ctl_commit' drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c:529: warning: Function parameter or member 'flush_mask' not described in 'mdp5_ctl_commit' drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c:529: warning: Function parameter or member 'start' not described in 'mdp5_ctl_commit' Cc: Lee Jones Signed-off-by: Rob Clark Acked-by: Sam Ravnborg commit 207cdd565dfc95a0a5185263a567817b7ebf5467 Author: Roberto Sassu Date: Thu Nov 26 11:34:56 2020 +0100 ima: Don't modify file descriptor mode on the fly Commit a408e4a86b36b ("ima: open a new file instance if no read permissions") already introduced a second open to measure a file when the original file descriptor does not allow it. However, it didn't remove the existing method of changing the mode of the original file descriptor, which is still necessary if the current process does not have enough privileges to open a new one. Changing the mode isn't really an option, as the filesystem might need to do preliminary steps to make the read possible. Thus, this patch removes the code and keeps the second open as the only option to measure a file when it is unreadable with the original file descriptor. Cc: # 4.20.x: 0014cc04e8ec0 ima: Set file->f_mode Fixes: 2fe5d6def1672 ("ima: integrity appraisal extension") Signed-off-by: Roberto Sassu Reviewed-by: Christoph Hellwig Signed-off-by: Mimi Zohar commit 3aa669a994c9110a2dc7e08a5c0958a9ea5eb17c Author: Marek Behún Date: Sat Nov 14 21:42:53 2020 +0100 arm64: dts: armada-3720-turris-mox: update ethernet-phy handle name Use property name `phy-handle` instead of the deprecated `phy` to connect eth2 to the PHY. Signed-off-by: Marek Behún Fixes: 7109d817db2e ("arm64: dts: marvell: add DTS for Turris Mox") Cc: Gregory CLEMENT Cc: Andrew Lunn Cc: Rob Herring Cc: devicetree@vger.kernel.org Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT commit 53e950d597e3578da84238b86424bfcc9e101d87 Author: Sven Auhagen Date: Mon Nov 9 18:39:48 2020 +0100 arm64: dts: marvell: armada-cp110: Switch to per-port SATA interrupts There are two SATA ports per CP110. Each of them has a dedicated interrupt. Describe the real hardware by adding two SATA ports to the CP110 SATA node. Reviewed-by: Hans de Goede Signed-off-by: Sven Auhagen Signed-off-by: Thomas Petazzoni Signed-off-by: Miquel Raynal Signed-off-by: Gregory CLEMENT commit 3404fe15a60fe790799d6e1dd5de51997f338cc6 Author: Vladimir Vid Date: Mon Oct 26 19:44:42 2020 +0100 arm64: dts: marvell: add DT for ESPRESSObin-Ultra This adds support for ESPRESSObin-Ultra from Globalscale. Specifications are similar to the base ESPRESSObin board, with main difference being being WAN port with PoE capability and 2 additional ethernet ports. Full specifications: 1x Marvell 64 bit Dual Core ARM A53 Armada 3700 SOC clocked up to 1.2Ghz 1x Topaz 6341 Networking Switch 1GB DDR4 8GB eMMC 1x WAN with 30W POE 4x Gb LAN 1x RTC Clock and battery 1x DC Jack 1x USB 3.0 Type A 1x USB 2.0 Type A 1x SIM NanoSIM card Slot 1x Power Button 4x LED 1x Reset button 1x microUSB for UART 1x M.2 2280 slot for memory 1x 2x2 802.11ac Wi-Fi 1x MiniPCIE slot for Wi-Fi (PCIe interface) Signed-off-by: Vladimir Vid Signed-off-by: Gregory CLEMENT commit c1e9911fcc54afb2ccfe8bab213ec6679c455675 Author: Pali Rohár Date: Tue Oct 6 14:44:55 2020 +0200 arm64: dts: marvell: espressobin: Add support for LED2 LED2 is connected to MPP1_2 pin. It is working only on V7 boards. V5 boards have hw bug which cause that LED2 is non-working. So enable LED2 only for Espressobin V7 boards. Note that LED1 is connected to LED_WLAN# pin on miniPCIe card and LED3 to power supply. Therefore on Espressobin board only LED2 can be controlled directly from the host. LED1 is possible to control via WiFi card inserted in miniPCIe slot if driver for particular card supports it. Signed-off-by: Pali Rohár Tested-by: Gérald Kerma Signed-off-by: Gregory CLEMENT commit 6d96e11b777129d709096744e125bd866ff8b5a1 Author: Luka Kovacic Date: Sun Oct 25 02:13:51 2020 +0100 arm64: dts: marvell: Add a device tree for the IEI Puzzle-M801 board Add initial support for the IEI Puzzle-M801 1U Rackmount Network Appliance board. The board is based on the quad-core Marvell Armada 8040 SoC and supports up to 16 GB of DDR4 2400 MHz ECC RAM. It has a PCIe x16 slot (x2 lanes only) and an M.2 type B slot. Main system hardware: 2x USB 3.0 4x Gigabit Ethernet 2x SFP+ 1x SATA 3.0 1x M.2 type B 1x RJ45 UART 1x SPI flash 1x IEI WT61P803 PUZZLE Microcontroller 1x EPSON RX8010 RTC (used instead of the integrated Marvell RTC controller) 6x SFP+ LED 1x HDD LED All of the hardware listed above is supported and tested in this port. Signed-off-by: Luka Kovacic Acked-by: Andrew Lunn Cc: Luka Perkov Cc: Robert Marko Signed-off-by: Gregory CLEMENT commit d7ce8739f50e9e8c55a3c7651ebfbca57199553f Author: Gregory CLEMENT Date: Wed Sep 23 15:59:18 2020 +0200 MAINTAINERS: switch mvebu tree to kernel.org We have switched mvebu tree to kernel.org now, so update in MAINTAINERS file Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT commit 8c4e256e3d425e73e02b6e9fa18c0aa3425970d7 Author: Luka Kovacic Date: Fri Jul 24 12:38:40 2020 +0200 MAINTAINERS: Add an entry for MikroTik CRS3xx 98DX3236 boards An entry is added for MikroTik CRS3xx 98DX3236 based switches. Signed-off-by: Luka Kovacic Cc: Luka Perkov Cc: Jakov Petrina Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT commit f9559f029ebe05a87e9689f4aa444e19cc7426e4 Author: Pali Rohár Date: Fri Sep 25 10:50:43 2020 +0200 arm64: dts: marvell: espressobin: De-duplicate eMMC definitions eMMC definitions in files armada-3720-espressobin-emmc.dts and armada-3720-espressobin-v7-emmc.dts is same. So move it into common armada-3720-espressobin.dtsi file with status "disabled". This change simplifies eMMC variants of DTS files for Espressobin. Signed-off-by: Pali Rohár Reviewed-by: Andre Heider Tested-by: Andre Heider Signed-off-by: Gregory CLEMENT commit d77998497783cab316acde46add4ee4cc70fb76f Author: Andre Heider Date: Tue Sep 22 06:31:41 2020 +0200 arm64: dts: marvell: espressobin: Get rid of duplicate serial aliases The included armada-37xx.dtsi already defines these two aliases. Signed-off-by: Andre Heider Reviewed-by: Pali Rohár Signed-off-by: Gregory CLEMENT commit 8077f593d77cf53b0e0ee467b2de2f9e781ab437 Author: Andre Heider Date: Tue Sep 8 09:30:50 2020 +0200 arm64: dts: marvell: espressobin: Simplify v7 ethernet port labeling Now that the switch ports have a label in the .dtsi, simplify the whole "switch0" block for the v7 dts files. Signed-off-by: Andre Heider Reviewed-by: Pali Rohár Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT commit 44144cc948013a66e3f17269a23653a3d803264a Author: Chris Packham Date: Tue Sep 8 09:17:12 2020 +1200 ARM: dts: Add i2c0 pinctrl information for 98dx3236 Add pinctrl information for the 98dx3236 (and variants). There is only one choice for i2c0 MPP14 and MPP15. Signed-off-by: Chris Packham Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT commit 7f24479ead579459106bb55c2320a000135731f9 Author: Chris Packham Date: Tue Sep 8 09:17:11 2020 +1200 ARM: dts: Remove non-existent i2c1 from 98dx3236 The switches with integrated CPUs have only got a single i2c controller. They incorrectly gained one when they were split from the Armada-XP. Fixes: 43e28ba87708 ("ARM: dts: Use armada-370-xp as a base for armada-xp-98dx3236") Signed-off-by: Chris Packham Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT commit 493c6469a6dd911654f04a656ce2d91021e1e915 Author: Krzysztof Kozlowski Date: Wed Sep 16 17:57:14 2020 +0200 ARM: dts: armada: align GPIO hog names with dtschema The convention for node names is to use hyphens, not underscores. dtschema for pca95xx expects GPIO hogs to end with 'hog' prefix. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Gregory CLEMENT commit 6ac30b5c9956ff03fe8eed0a0ea5430426c99b89 Author: Krzysztof Kozlowski Date: Wed Sep 16 17:57:13 2020 +0200 ARM: dts: dove: fix PCA95xx GPIO expander properties on A510 The PCA95xx GPIO expander requires GPIO controller properties to operate properly. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Linus Walleij Signed-off-by: Gregory CLEMENT commit 8f32220969109b68d766f9b84a682cf3d07ecd33 Author: Adrian Schmutzler Date: Sun Aug 30 21:35:43 2020 +0200 ARM: dts: kirkwood: replace status value "ok" by "okay" While the DT parser recognizes "ok" as a valid value for the "status" property, it is actually mentioned nowhere. Use the proper value "okay" instead, as done in the majority of files already. Signed-off-by: Adrian Schmutzler Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT commit d7c51bfa8664e91989f002af9e81983a4fd8326f Author: Luka Kovacic Date: Fri Jul 24 12:38:39 2020 +0200 ARM: dts: mvebu: Add CRS328-4C-20S-4S board MikroTik CRS328-4C-20S-4S board has a switch chip with an integrated Marvell Prestera 98DX3236 CPU. This commit includes two board variants, namely the factory default one and a Bit variant. The Bit variant has a bigger Macronix flash. This device tree includes basic Linux support. Signed-off-by: Luka Kovacic Cc: Luka Perkov Cc: Jakov Petrina Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT commit 1b7b86f68c24f372e6cf4af4874dc5df3b8aa61b Author: Luka Kovacic Date: Fri Jul 24 12:38:38 2020 +0200 ARM: dts: mvebu: Add CRS305-1G-4S board MikroTik CRS305-1G-4S board has a switch chip with an integrated Marvell Prestera 98DX3236 CPU. This commit includes two board variants, namely the factory default one and a Bit variant. The Bit variant has a bigger Macronix flash. This device tree includes basic Linux support. Signed-off-by: Luka Kovacic Cc: Luka Perkov Cc: Jakov Petrina Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT commit b08770ff622829285d5b113602b1454910b34044 Author: Luka Kovacic Date: Fri Jul 24 12:38:37 2020 +0200 ARM: dts: mvebu: Add CRS326-24G-2S board MikroTik CRS326-24G-2S board has a switch chip with an integrated Marvell Prestera 98DX3236 CPU. This commit includes two board variants, namely the factory default one and a Bit variant. The Bit variant has a bigger Macronix flash. This device tree includes basic Linux support. Signed-off-by: Luka Kovacic Cc: Luka Perkov Cc: Jakov Petrina Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT commit 5c44c564e4491758124050643f00c6bad9bfbea8 Author: Manivannan Sadhasivam Date: Fri Nov 27 23:00:44 2020 +0530 arm64: dts: qcom: qrb5165-rb5: Add support for MCP2518FD Add support for onboard MCP2518FD SPI CAN transceiver attached to SPI0 of RB5. Tested-by: Dmitry Baryshkov Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20201127173044.55144-1-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit 41fff6e19bc8d6d8bca79ea388427c426e72e097 Author: Jing Xiangfeng Date: Mon Oct 12 10:56:43 2020 +0800 HSI: omap_ssi: Don't jump to free ID in ssi_add_controller() In current code, it jumps to ida_simple_remove() when ida_simple_get() failes to allocate an ID. Just return to fix it. Fixes: 0fae198988b8 ("HSI: omap_ssi: built omap_ssi and omap_ssi_port into one module") Signed-off-by: Jing Xiangfeng Signed-off-by: Sebastian Reichel commit e71d2b957ee49fe3ed35a384a4e31774de1316c1 Merge: 3567e23379046 cdeee49f3ef7f Author: Jakub Kicinski Date: Sat Nov 28 12:14:01 2020 -0800 Merge branch 'net-ipa-start-adding-ipa-v4-5-support' Alex Elder says: ==================== net: ipa: start adding IPA v4.5 support This series starts updating the IPA code to support IPA hardware version 4.5. The first patch fixes a problem found while preparing these updates. Testing shows the code works with or without the change, and with the fix the code matches "downstream" Qualcomm code. The second patch updates the definitions for IPA register offsets and field masks to reflect the changes that come with IPA v4.5. A few register updates have been deferred until later, because making use of them involves some nontrivial code updates. One type of change that IPA v4.5 brings is expanding the range of certain configuration values. High-order bits are added in a few cases, and the third patch implements the code changes necessary to use those newly available bits. The fourth patch implements several fairly minor changes to the code required for IPA v4.5 support. The last two patches implement changes to the GSI registers used for IPA. Almost none of the registers change, but the range of memory in which most of the GSI registers is located is shifted by a fixed amount. The fifth patch updates the GSI register definitions, and the last patch implements the memory shift for IPA v4.5. ==================== Link: https://lore.kernel.org/r/20201125204522.5884-1-elder@linaro.org Signed-off-by: Jakub Kicinski commit cdeee49f3ef7f963567078ffac8921745f90e94d Author: Alex Elder Date: Wed Nov 25 14:45:22 2020 -0600 net: ipa: adjust GSI register addresses The offsets for almost all GSI registers we use have different offsets starting at IPA version 4.5. Only two registers remain in their original location. In a way though, the new register locations are not *that* different. The entire group of affected registers has simply been shifted down in memory by a fixed amount (0xd000). So for example, the channel context 0 register that has a base offset of 0x0001c000 for "older" hardware now has a base offset of 0x0000f000. This patch aims to add support for IPA v4.5 registers at their new offets in a way that minimizes the amount of code that needs to change. It is not ideal, but it avoids the need to maintain a nearly complete set of additional register offset definitions. The approach takes advantage of the fact that when accessing GSI registers we do not access any of memory at lower end of the "gsi" memory range (with two exceptions already noted). In particular, we do not access anything within the bottom 0xd000 bytes of the GSI memory range. For IPA version 4.5, after we map the GSI memory, we adjust the virtual memory pointer downward by the fixed amount (0xd000). That way, register accesses using the offsets defined by the existing GSI_REG_*() macros will resolve to the proper locations for IPA version 4.5. The two registers *not* affected by this offset are accessed only in gsi_irq_setup(). There, for IPA version 4.5, we undo the general register adjustment by adding the fixed amount back to the virtual address to access these registers. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit b0b6f0ddce853f710c67fdaa19facab142b6306f Author: Alex Elder Date: Wed Nov 25 14:45:21 2020 -0600 net: ipa: update gsi registers for IPA v4.5 Very few GSI register definitions change for IPA v4.5, however as a group their position in memory shifts a constant amount (handled by the next commit). Add definitions and update comments to the set of GSI registers to support changes that come with IPA v4.5. Update the logic in gsi_channel_program() to accommodate the new (expanded) PREFETCH_MODE field in the CH_C_QOS register. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 8bfc4e21d5b3fa5caeb54b2f1d7c368f218d23f2 Author: Alex Elder Date: Wed Nov 25 14:45:20 2020 -0600 net: ipa: add support to code for IPA v4.5 Update the IPA code to make use of the updated IPA v4.5 register definitions. Generally what this patch does is, if IPA v4.5 hardware is in use: - Ensure new registers or fields in IPA v4.5 are updated where required - Ensure registers or fields not supported in IPA v4.5 are not examined when read, or are set to 0 when written It does this while preserving the existing functionality for IPA versions lower than v4.5. The values to program for QSB_MAX_READS and QSB_MAX_WRITES and the source and destination resource counts are updated to be correct for all versions through v4.5 as well. Note that IPA_RESOURCE_GROUP_SRC_MAX and IPA_RESOURCE_GROUP_DST_MAX already reflect that 5 is an acceptable number of resources (which IPA v4.5 implements). Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 1af15c2a781d938e94dcdb9a872ce4157730569d Author: Alex Elder Date: Wed Nov 25 14:45:19 2020 -0600 net: ipa: add new most-significant bits to registers IPA v4.5 adds a few fields to the endpoint header and extended header configuration registers that represent new high-order bits for certain offsets and sizes. Add code to incorporate these upper bits into the registers for IPA v4.5. This includes creating ipa_header_size_encoded(), which handles encoding the metadata offset field for use in the ENDP_INIT_HDR register in a way appropriate for the hardware version. This and ipa_metadata_offset_encoded() ensure the mask argument passed to u32_encode_bits() is constant. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 5b6cd69e89c4ace7497609c52ca4d9aab5ae8a46 Author: Alex Elder Date: Wed Nov 25 14:45:18 2020 -0600 net: ipa: update IPA registers for IPA v4.5 Update "ipa_reg.h" so that register definitions support IPA hardware version 4.5, in addition to versions 3.5.1 through v4.2. Most of the register definitions are the same, but in some cases fields are added, changed, or eliminated. Updates for a few IPA v4.5 registers are more complex, and adding those definition will be deferred to separate patches. This patch only updates the register offset and field definitions, and adds informational comments. The only code change avoids accessing the backward compatibility register for IPA version 4.5 in ipa_hardware_config(). Other IPA v4.5-specific code changes will come later. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 9f848198607f23626deddceb9da9307464031258 Author: Alex Elder Date: Wed Nov 25 14:45:17 2020 -0600 net: ipa: reverse logic on escape buffer use Starting with IPA v4.2 there is a GSI channel option to use an "escape buffer" instead of prefetch buffers. This should be used for all channels *except* the AP command TX channel. The logic that implements this has it backwards; fix this bug. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 3567e23379046a1c7fa730c2af7f5f3e53ff0039 Author: Marcelo Ricardo Leitner Date: Thu Nov 26 15:40:49 2020 -0300 net/sched: act_ct: enable stats for HW offloaded entries By setting NF_FLOWTABLE_COUNTER. Otherwise, the updates added by commit ef803b3cf96a ("netfilter: flowtable: add counter support in HW offload") are not effective when using act_ct. While at it, now that we have the flag set, protect the call to nf_ct_acct_update() by commit beb97d3a3192 ("net/sched: act_ct: update nf_conn_acct for act_ct SW offload in flowtable") with the check on NF_FLOWTABLE_COUNTER, as also done on other places. Note that this shouldn't impact performance as these stats are only enabled when net.netfilter.nf_conntrack_acct is enabled. Signed-off-by: Marcelo Ricardo Leitner Acked-by: wenxu Acked-by: Pablo Neira Ayuso Link: https://lore.kernel.org/r/481a65741261fd81b0a0813e698af163477467ec.1606415787.git.marcelo.leitner@gmail.com Signed-off-by: Jakub Kicinski commit fbdb20b1fcb1a252a70f31b35976cf79dc051f19 Author: Jonathan Cameron Date: Sun Nov 15 19:29:48 2020 +0000 ARM: dts: qcom-pma8084: Drop incorrect use of io-channel-ranges This property is used by io-channel consumers, not providers so should not present here. Note dt_schema will now detect this error as there is a dependency between this property and io-channels. Signed-off-by: Jonathan Cameron Cc: Andy Gross Cc: Bjorn Andersson Link: https://lore.kernel.org/r/20201115192951.1073632-7-jic23@kernel.org Signed-off-by: Bjorn Andersson commit 15ffd94a904bafcce6dd4babf8f26bd8fe965bff Author: Sekhar Nori Date: Sat Nov 28 02:31:28 2020 +0530 arm64: dts: ti: k3: squelch warning about lack of #interrupt-cells There are couple of places where INTA interrupt controller lacks #interrupt-cells property. This leads to warnings of the type: arch/arm64/boot/dts/ti/k3-j721e-main.dtsi:147.51-156.5: Warning (interrupt_provider): /bus@100000/main-navss/interrupt-controller@33d00000: Missing #interrupt-cells in interrupt provider when building TI device-tree files with W=2 warning level. Fix these. Signed-off-by: Sekhar Nori Signed-off-by: Nishanth Menon Reviewed-by: Grygorii Strashko Link: https://lore.kernel.org/r/20201127210128.9151-1-nsekhar@ti.com commit b6a3f8326cfddad455d832d4ff9392286280a31c Author: Alexandru Ardelean Date: Fri Nov 27 11:40:37 2020 +0200 iio: adc: ad7298: convert probe to device-managed functions This change converts the probe of this driver to use device-managed register functions, and a devm_add_action_or_reset() for the regulator disable. With this, the exit & error paths can be removed. Another side-effect is that this should avoid some static-analyzer's check with respect to a potential null dereference of the regulator. The null dereference isn't likely to happen (under normal operation), so there isn't a requirement to have this fixed/backported in other releases. As a note: this is removing spi_set_drvdata() since there is no other spi_get_drvdata() (or dev_get_drvdata()) call that need it. Signed-off-by: Alexandru Ardelean Cc: Colin Ian King Link: https://lore.kernel.org/r/20201127094038.91714-1-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 7f43c2014fa03bb8718569ae628acf2089683bff Author: Marc Zyngier Date: Thu Nov 26 17:25:30 2020 +0000 arm64: Make the Meltdown mitigation state available Our Meltdown mitigation state isn't exposed outside of cpufeature.c, contrary to the rest of the Spectre mitigation state. As we are going to use it in KVM, expose a arm64_get_meltdown_state() helper which returns the same possible values as arm64_get_spectre_v?_state(). Signed-off-by: Marc Zyngier commit 7889a7da59e0131ac60b858c73a3604ef88b1d96 Author: Lad Prabhakar Date: Thu Nov 26 19:11:45 2020 +0000 memory: renesas-rpc-if: Make rpcif_enable/disable_rpm() as static inline Define rpcif_enable_rpm() and rpcif_disable_rpm() as static inline in the header instead of exporting them. Suggested-by: Pavel Machek Signed-off-by: Lad Prabhakar Reviewed-by: Pavel Machek (CIP) Link: https://lore.kernel.org/r/20201126191146.8753-5-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Krzysztof Kozlowski commit 4e6b86b409f9fc63fedb39d6e3a0202c4b0244ce Author: Lad Prabhakar Date: Thu Nov 26 19:11:44 2020 +0000 memory: renesas-rpc-if: Fix a node reference leak in rpcif_probe() Release the node reference by calling of_node_put(flash) in the probe. Fixes: ca7d8b980b67f ("memory: add Renesas RPC-IF driver") Reported-by: Pavel Machek Signed-off-by: Lad Prabhakar Reviewed-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Reviewed-by: Pavel Machek (CIP) Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20201126191146.8753-4-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Krzysztof Kozlowski commit 61a6d854b9555b420fbfae62ef26baa8b9493b32 Author: Lad Prabhakar Date: Thu Nov 26 19:11:43 2020 +0000 memory: renesas-rpc-if: Fix unbalanced pm_runtime_enable in rpcif_{enable,disable}_rpm rpcif_enable_rpm calls pm_runtime_enable, so rpcif_disable_rpm needs to call pm_runtime_disable and not pm_runtime_put_sync. Fixes: ca7d8b980b67f ("memory: add Renesas RPC-IF driver") Reported-by: Geert Uytterhoeven Signed-off-by: Lad Prabhakar Reviewed-by: Sergei Shtylyov Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20201126191146.8753-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Krzysztof Kozlowski commit a0453f4ed066cae651b3119ed11f52d31dae1eca Author: Lad Prabhakar Date: Thu Nov 26 19:11:42 2020 +0000 memory: renesas-rpc-if: Return correct value to the caller of rpcif_manual_xfer() In the error path of rpcif_manual_xfer() the value of ret is overwritten by value returned by reset_control_reset() function and thus returning incorrect value to the caller. This patch makes sure the correct value is returned to the caller of rpcif_manual_xfer() by dropping the overwrite of ret in error path. Also now we ignore the value returned by reset_control_reset() in the error path and instead print a error message when it fails. Fixes: ca7d8b980b67f ("memory: add Renesas RPC-IF driver") Reported-by: Pavel Machek Signed-off-by: Lad Prabhakar Reviewed-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Reviewed-by: Pavel Machek (CIP) Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20201126191146.8753-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Krzysztof Kozlowski commit 414562b0ef36ce658f0ffec00e7039c7911e4cdc Author: Enric Balletbo i Serra Date: Fri Nov 27 12:02:04 2020 +0100 drm/mediatek: Use correct aliases name for ovl Aliases property name must include only lowercase and '-', so fix this in the driver, so we're not tempted to do "ovl_2l0 = &ovl_2l0" in the device-tree instead of the right one which is "ovl-2l0 = &ovl_2l0". Fixes: b17bdd0d7a73 ("drm/mediatek: add component OVL_2L0") Signed-off-by: Enric Balletbo i Serra Signed-off-by: Chun-Kuang Hu commit 0183a855eeb78c11b45505d72a078c145a71e6fc Author: Tom Rix Date: Fri Nov 27 11:23:12 2020 -0800 ALSA: remove trailing semicolon in macro definition The macro use will already have a semicolon. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20201127192312.2861127-1-trix@redhat.com Signed-off-by: Takashi Iwai commit e4e1d47c7906cf108584c617c0b2ba32ed5428ed Author: Leonard Goehrs Date: Fri Nov 27 16:22:59 2020 +0100 ALSA: ppc: remove redundant checks in PS3 driver probe The check for the FW_FEATURE_PS3_LV1 firmware feature is already performed in ps3_system_bus_init() before registering the driver. So if the probe function is actually used, this feature is already known to be available. The check for the match id is also superfluous; the condition is always true because the bus' match function (ps3_system_bus_match()) only considers this driver for devices having: dev->match_id == snd_ps3_bus_driver_info.match_id. Suggested-by: Geert Uytterhoeven Signed-off-by: Leonard Goehrs Reviewed-by: Uwe Kleine-König Tested-by: Geoff Levand Link: https://lore.kernel.org/r/20201127152259.1470079-1-l.goehrs@pengutronix.de Signed-off-by: Takashi Iwai commit 5c7797022fe9a95a4417c75fa59a1a2bfdc5a3be Author: Uwe Kleine-König Date: Thu Nov 26 17:59:49 2020 +0100 ALSA: ppc: drop if block with always false condition The remove callback is only called for devices that were probed successfully before. As the matching probe function cannot complete without error if dev->match_id != PS3_MATCH_ID_SOUND, we don't have to check this here. Signed-off-by: Uwe Kleine-König Reviewed-by: Geert Uytterhoeven Tested-by: Geoff Levand Link: https://lore.kernel.org/r/20201126165950.2554997-1-u.kleine-koenig@pengutronix.de Signed-off-by: Takashi Iwai commit 83ab7b45a2c24997ce1831f8bc829b29e6b7c890 Author: Daniel Martin Date: Sat Nov 28 09:40:35 2020 +0100 ALSA: usb-audio: Add support for Pioneer DJ DDJ-RR controller This patch allows the Pioneer DJ DDJ-RR to be seen as a USB audio device under Linux and therefore usable in such applications as Mixxx. Tested Master Audio out, headphones (both output jacks) and microphone input. All work perfectly. Signed-off-by: Daniel Martin Link: https://lore.kernel.org/r/20201128084035.2958-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit faba002e5fe91aae09ac591187be71c9e201b8f0 Author: Takashi Iwai Date: Wed Sep 30 13:30:08 2020 +0200 ALSA: hda/ca0132: Move unsol callback setups to parser The setup of unsolicited event callbacks should be done only once at the parser phase, not in the init phase that is called multiple times at each resume. This patch moves the unsol setup code in ca0132 codec driver to the more appropriate place. Reported-by: Hui Wang Link: https://lore.kernel.org/r/20200930113008.9307-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 10ea8bcda5ae5463889e15dfc98aa2a73270ea58 Author: Loic Poulain Date: Wed Nov 25 14:24:49 2020 +0100 bus: mhi: core: Fix device hierarchy This patch fixes the hierarchical structure of MHI devices. Indeed, MHI client devices are directly 'enumerated' from the mhi controller and therefore must be direct descendants/children of their mhi controller device, in accordance with the Linux Device Model. Today both MHI clients and controller devices are at the same level, this patch ensures that MHI controller is parent of its client devices. The hierarchy is especially important for power management (safe suspend/resume order). It is also useful for userspace to determine relationship between MHI client devices and controllers. Signed-off-by: Loic Poulain Reviewed-by: Bjorn Andersson Reviewed-by: Manivannan Sadhasivam Reviewed-by: Hemant Kumar Signed-off-by: Manivannan Sadhasivam commit 206e7383b34316cf56cdde96eab9d97e9a1dbd70 Author: Loic Poulain Date: Thu Nov 26 11:20:35 2020 +0100 bus: mhi: core: Indexed MHI controller name Today the MHI controller name is simply cloned from the underlying bus device (its parent), that gives the following device structure for e.g. a MHI/PCI controller: devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:02:00.0 devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:02:00.0/0000:02:00.0_IPCR ... That's quite misleading/confusing and can cause device registering issues because of duplicate dev name (e.g. if a PCI device register two different MHI instances). This patch changes MHI core to create indexed mhi controller names (mhi0, mhi1...) in the same way as other busses (i2c0, usb0...). The previous example becomes: devices/pci0000:00/0000:00:01.2/0000:02:00.0/mhi0 devices/pci0000:00/0000:00:01.2/0000:02:00.0/mhi0/mhi0_IPCR ... v2: move index field at the end of mhi_controller struct (before bool) to avoid breaking well packed alignment. Signed-off-by: Loic Poulain Reviewed-by: Jeffrey Hugo Reviewed-by: Manivannan Sadhasivam Signed-off-by: Manivannan Sadhasivam commit 6a7dc2b3639adc7f9ff5c148aeaef0ee775f6c3a Author: Florian Fainelli Date: Sun Nov 8 20:42:28 2020 -0800 arm64: defconfig: Enable ARM SCMI protocol and drivers Enable the ARM SCMI protocol and the common clock, cpufreq, reset and sensors drivers. Broadcom STB platforms (ARCH_BRCMSTB) implement SCMI to provide support for CPU frequency scaling, clock configuration and temperature and current sensors. Signed-off-by: Florian Fainelli Acked-by: Sudeep Holla commit 950be99fccffa920e148fd46e33db4d509e8af63 Author: Florian Fainelli Date: Sun Nov 8 20:42:27 2020 -0800 ARM: multi_v7_defconfig: Enable ARM SCMI protocol and drivers Enable the ARM SCMI protocol and the common clock, cpufreq and sensors drivers. Broadcom STB platforms (ARCH_BRCMSTB) implement SCMI to provide support for CPU frequency scaling, clock configuration and temperature and current sensors. Signed-off-by: Florian Fainelli Acked-by: Sudeep Holla commit 5c39f26e67c984db0fa95f9faecf06eb0198dce7 Merge: 6375da9dac8be c84e1efae0220 Author: Jakub Kicinski Date: Fri Nov 27 18:25:27 2020 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Trivial conflict in CAN, keep the net-next + the byteswap wrapper. Conflicts: drivers/net/can/usb/gs_usb.c Signed-off-by: Jakub Kicinski commit 6375da9dac8bec05a022f22ab22300cc824ec268 Merge: fff4c74690018 b6f88d9c2faec Author: Jakub Kicinski Date: Fri Nov 27 17:34:04 2020 -0800 Merge branch 'tipc-some-minor-improvements' Jon Maloy says: ==================== tipc: some minor improvements We add some improvements that will be useful in future commits. ==================== Link: https://lore.kernel.org/r/20201125182915.711370-1-jmaloy@redhat.com Signed-off-by: Jakub Kicinski commit b6f88d9c2faec015491a4c9936c170d7bc8539d5 Author: Jon Maloy Date: Wed Nov 25 13:29:15 2020 -0500 tipc: update address terminology in code We update the terminology in the code so that deprecated structure names and macros are replaced with those currently recommended in the user API. struct tipc_portid -> struct tipc_socket_addr struct tipc_name -> struct tipc_service_addr struct tipc_name_seq -> struct tipc_service_range TIPC_ADDR_ID -> TIPC_SOCKET_ADDR TIPC_ADDR_NAME -> TIPC_SERVICE_ADDR TIPC_ADDR_NAMESEQ -> TIPC_SERVICE_RANGE TIPC_CFG_SRV -> TIPC_NODE_STATE Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: Jakub Kicinski commit 5f75e0a0e92a6c6ef93d61fb4d1d2a185cdbc2f9 Author: Jon Maloy Date: Wed Nov 25 13:29:14 2020 -0500 tipc: make node number calculation reproducible The 32-bit node number, aka node hash or node address, is calculated based on the 128-bit node identity when it is not set explicitly by the user. In future commits we will need to perform this hash operation on peer nodes while feeling safe that we obtain the same result. We do this by interpreting the initial hash as a network byte order number. Whenever we need to use the number locally on a node we must therefore translate it to host byte order to obtain an architecure independent result. Furthermore, given the context where we use this number, we must not allow it to be zero unless the node identity also is zero. Hence, in the rare cases when the xor-ed hash value may end up as zero we replace it with a fix number, knowing that the code anyway is capable of handling hash collisions. Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: Jakub Kicinski commit 60c102eedea0e487c897dd23cc7fefecf4449769 Author: Jon Maloy Date: Wed Nov 25 13:29:13 2020 -0500 tipc: refactor tipc_sk_bind() function We refactor the tipc_sk_bind() function, so that the lock handling is handled separately from the logics. We also move some sanity tests to earlier in the call chain, to the function tipc_bind(). Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: Jakub Kicinski commit fff4c74690018c4f741d1ae68c2ba2143b66844a Author: Oleksij Rempel Date: Fri Nov 27 13:36:21 2020 +0100 net: phy: micrel: fix interrupt handling After migration to the shared interrupt support, the KSZ8031 PHY with enabled interrupt support was not able to notify about link status change. Fixes: 59ca4e58b917 ("net: phy: micrel: implement generic .handle_interrupt() callback") Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20201127123621.31234-1-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski commit 35c58418898b5e80eaa55f5ce861734302c6f157 Merge: f5d709ffde6b8 139d6eb149de0 Author: Jakub Kicinski Date: Fri Nov 27 17:23:01 2020 -0800 Merge branch 'net-x25-netdev-event-handling' Martin Schiller says: ==================== net/x25: netdev event handling ==================== Link: https://lore.kernel.org/r/20201126063557.1283-1-ms@dev.tdt.de Signed-off-by: Jakub Kicinski commit 139d6eb149de0cb8726d0d8e722ab8d4ddcc60bb Author: Martin Schiller Date: Thu Nov 26 07:35:57 2020 +0100 net/x25: remove x25_kill_by_device() Remove obsolete function x25_kill_by_device(). It's not used any more. Signed-off-by: Martin Schiller Signed-off-by: Jakub Kicinski commit d023b2b9ccc2e7ec14b83aec634b5b51f621ef3a Author: Martin Schiller Date: Thu Nov 26 07:35:56 2020 +0100 net/x25: fix restart request/confirm handling We have to take the actual link state into account to handle restart requests/confirms well. Signed-off-by: Martin Schiller Signed-off-by: Jakub Kicinski commit 62480b992ba3fb1d7260b11293aed9d6557831c7 Author: Martin Schiller Date: Thu Nov 26 07:35:55 2020 +0100 net/lapb: fix t1 timer handling for LAPB_STATE_0 1. DTE interface changes immediately to LAPB_STATE_1 and start sending SABM(E). 2. DCE interface sends N2-times DM and changes to LAPB_STATE_1 afterwards if there is no response in the meantime. Signed-off-by: Martin Schiller Signed-off-by: Jakub Kicinski commit a4989fa91110508b64eea7ccde63d062113988ff Author: Martin Schiller Date: Thu Nov 26 07:35:54 2020 +0100 net/lapb: support netdev events This patch allows layer2 (LAPB) to react to netdev events itself and avoids the detour via layer3 (X.25). 1. Establish layer2 on NETDEV_UP events, if the carrier is already up. 2. Call lapb_disconnect_request() on NETDEV_GOING_DOWN events to signal the peer that the connection will go down. (Only when the carrier is up.) 3. When a NETDEV_DOWN event occur, clear all queues, enter state LAPB_STATE_0 and stop all timers. 4. The NETDEV_CHANGE event makes it possible to handle carrier loss and detection. In case of Carrier Loss, clear all queues, enter state LAPB_STATE_0 and stop all timers. In case of Carrier Detection, we start timer t1 on a DCE interface, and on a DTE interface we change to state LAPB_STATE_1 and start sending SABM(E). Signed-off-by: Martin Schiller Acked-by: Xie He Signed-off-by: Jakub Kicinski commit 7eed751b3b2a6949932a6a59fa2792c584641618 Author: Martin Schiller Date: Thu Nov 26 07:35:53 2020 +0100 net/x25: handle additional netdev events 1. Add / remove x25_link_device by NETDEV_REGISTER/UNREGISTER and also by NETDEV_POST_TYPE_CHANGE/NETDEV_PRE_TYPE_CHANGE. This change is needed so that the x25_neigh struct for an interface is already created when it shows up and is kept independently if the interface goes UP or DOWN. This is used in an upcomming commit, where x25 params of an neighbour will get configurable through ioctls. 2. NETDEV_CHANGE event makes it possible to handle carrier loss and detection. If carrier is lost, clean up everything related to this neighbour by calling x25_link_terminated(). 3. Also call x25_link_terminated() for NETDEV_DOWN events and remove the call to x25_clear_forward_by_dev() in x25_route_device_down(), as this is already called by x25_kill_by_neigh() which gets called by x25_link_terminated(). 4. Do nothing for NETDEV_UP and NETDEV_GOING_DOWN events, as these will be handled in layer 2 (LAPB) and layer3 (X.25) will be informed by layer2 when layer2 link is established and layer3 link should be initiated. Signed-off-by: Martin Schiller Signed-off-by: Jakub Kicinski commit f5d709ffde6b826133ccf9e8a104ce00fe31dbfb Merge: 4be074e6dd24e ff47fa13c9916 Author: Jakub Kicinski Date: Fri Nov 27 17:17:37 2020 -0800 Merge branch 'mlxsw-update-adjacency-index-more-efficiently' Ido Schimmel says: ==================== mlxsw: Update adjacency index more efficiently The device supports an operation that allows the driver to issue one request to update the adjacency index for all the routes in a given virtual router (VR) from old index and size to new ones. This is useful in case the configuration of a certain nexthop group is updated and its adjacency index changes. Currently, the driver does not use this operation in an efficient manner. It iterates over all the routes using the nexthop group and issues an update request for the VR if it is not the same as the previous VR. Instead, this patch set tracks the VRs in which the nexthop group is used and issues one request for each VR. Example: 8k IPv6 routes were added in an alternating manner to two VRFs. All the routes are using the same nexthop object ('nhid 1'). Before: Performance counter stats for 'ip nexthop replace id 1 via 2001:db8:1::2 dev swp3': 16,385 devlink:devlink_hwmsg 4.255933213 seconds time elapsed 0.000000000 seconds user 0.666923000 seconds sys Number of EMAD transactions corresponds to number of routes using the nexthop group. After: Performance counter stats for 'ip nexthop replace id 1 via 2001:db8:1::2 dev swp3': 3 devlink:devlink_hwmsg 0.077655094 seconds time elapsed 0.000000000 seconds user 0.076698000 seconds sys Number of EMAD transactions corresponds to number of VRFs / VRs. Patch set overview: Patch #1 is a fix for a bug introduced in previous submission. Detected by Coverity. Patches #2 and #3 are preparations. Patch #4 tracks the VRs a nexthop group is member of. Patch #5 uses the membership tracking from the previous patch to issue one update request per each VR. ==================== Link: https://lore.kernel.org/r/20201125193505.1052466-1-idosch@idosch.org Signed-off-by: Jakub Kicinski commit ff47fa13c9916643501d4fad67e683cc9468ee94 Author: Ido Schimmel Date: Wed Nov 25 21:35:05 2020 +0200 mlxsw: spectrum_router: Update adjacency index more efficiently The device supports an operation that allows the driver to issue one request to update the adjacency index for all the routes in a given virtual router (VR) from old index and size to new ones. This is useful in case the configuration of a certain nexthop group is updated and its adjacency index changes. Currently, the driver does not use this operation in an efficient manner. It iterates over all the routes using the nexthop group and issues an update request for the VR if it is not the same as the previous VR. Instead, use the VR tracking added in the previous patch to update the adjacency index once for each VR currently using the nexthop group. Example: 8k IPv6 routes were added in an alternating manner to two VRFs. All the routes are using the same nexthop object ('nhid 1'). Before: # perf stat -e devlink:devlink_hwmsg --filter='incoming==0' -- ip nexthop replace id 1 via 2001:db8:1::2 dev swp3 Performance counter stats for 'ip nexthop replace id 1 via 2001:db8:1::2 dev swp3': 16,385 devlink:devlink_hwmsg 4.255933213 seconds time elapsed 0.000000000 seconds user 0.666923000 seconds sys Number of EMAD transactions corresponds to number of routes using the nexthop group. After: # perf stat -e devlink:devlink_hwmsg --filter='incoming==0' -- ip nexthop replace id 1 via 2001:db8:1::2 dev swp3 Performance counter stats for 'ip nexthop replace id 1 via 2001:db8:1::2 dev swp3': 3 devlink:devlink_hwmsg 0.077655094 seconds time elapsed 0.000000000 seconds user 0.076698000 seconds sys Number of EMAD transactions corresponds to number of VRFs / VRs. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit d2141a42b96ad8bbc221bf6e0706764d5c4440fd Author: Ido Schimmel Date: Wed Nov 25 21:35:04 2020 +0200 mlxsw: spectrum_router: Track nexthop group virtual router membership For each nexthop group, track in which virtual routers (VRs) the group is used. This is going to be used by the next patch to perform a more efficient adjacency index update whenever the group's adjacency index changes. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit 9a4ab10c74a0badeed2085ad42513d3f3c44ff7a Author: Ido Schimmel Date: Wed Nov 25 21:35:03 2020 +0200 mlxsw: spectrum_router: Rollback virtual router adjacency pointer update In the rare case where the adjacency pointer cannot be updated for a given virtual router, rollback the operation so that virtual routers that are already using the new index will use the old one again. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit 40e4413d5dde8e4c2f57e1f68576e17fc0fffcf1 Author: Ido Schimmel Date: Wed Nov 25 21:35:02 2020 +0200 mlxsw: spectrum_router: Pass virtual router parameters directly instead of pointer mlxsw_sp_adj_index_mass_update_vr() only needs the virtual router's identifier and protocol, so pass them directly. In a subsequent patch the caller will not have access to the pointer. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit 1c2c5eb6e10828bcfef1ac5f1f688ff457c04599 Author: Ido Schimmel Date: Wed Nov 25 21:35:01 2020 +0200 mlxsw: spectrum_router: Fix error handling issue Return error to the caller instead of suppressing it. Fixes: e3ddfb45bacd ("mlxsw: spectrum_router: Allow returning errors from mlxsw_sp_nexthop_group_refresh()") Addresses-Coverity: ("Error handling issues (CHECKED_RETURN)") Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit cc6576029aedc79ce87b9fcb22cbd396d47f2852 Author: Enric Balletbo i Serra Date: Tue Oct 6 21:33:18 2020 +0200 soc: mediatek: mmsys: Use devm_platform_ioremap_resource() For the common platform_get_resource()+devm_platform_ioremap() combination, there is a helper, so use it and make the code a bit more compact. Signed-off-by: Enric Balletbo i Serra Reviewed-by: Chun-Kuang Hu Link: https://lore.kernel.org/r/20201006193320.405529-3-enric.balletbo@collabora.com Signed-off-by: Matthias Brugger commit 51c0e618b219c025ddaaf14baea8942cb7e2105b Author: Yongqiang Niu Date: Tue Oct 6 21:33:17 2020 +0200 soc / drm: mediatek: Move DDP component defines into mtk-mmsys.h MMSYS is the driver which controls the routing of these DDP components, so the definition of the mtk_ddp_comp_id enum should be placed in mtk-mmsys.h Signed-off-by: Yongqiang Niu Signed-off-by: Enric Balletbo i Serra Reviewed-by: Chun-Kuang Hu Link: https://lore.kernel.org/r/20201006193320.405529-2-enric.balletbo@collabora.com Signed-off-by: Matthias Brugger commit 0890beb22618c0359f1e2652fc1e49bb5c5e876d Author: Neal Liu Date: Thu Oct 15 11:20:39 2020 +0800 soc: mediatek: add mt6779 devapc driver MediaTek bus fabric provides TrustZone security support and data protection to prevent slaves from being accessed by unexpected masters. The security violation is logged and sent to the processor for further analysis or countermeasures. Any occurrence of security violation would raise an interrupt, and it will be handled by mtk-devapc driver. The violation information is printed in order to find the murderer. Signed-off-by: Neal Liu Link: https://lore.kernel.org/r/1602732039-12179-3-git-send-email-neal.liu@mediatek.com Signed-off-by: Matthias Brugger commit aaf162d4a5dfdf623a48b3bd6af2af4c237c38f3 Author: Neal Liu Date: Thu Oct 15 11:20:38 2020 +0800 dt-bindings: devapc: add bindings for mtk-devapc Add bindings for mtk-devapc. Signed-off-by: Neal Liu Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1602732039-12179-2-git-send-email-neal.liu@mediatek.com Signed-off-by: Matthias Brugger commit 4be074e6dd24e83da38e7b700c150a62667cf2f7 Merge: fb3158ea612c5 c129412f74e99 Author: Jakub Kicinski Date: Fri Nov 27 14:36:04 2020 -0800 Merge branch 'net-sched-fix-over-mtu-packet-of-defrag-in' wenxu says: ==================== net/sched: fix over mtu packet of defrag in Currently kernel tc subsystem can do conntrack in act_ct. But when several fragment packets go through the act_ct, function tcf_ct_handle_fragments will defrag the packets to a big one. But the last action will redirect mirred to a device which maybe lead the reassembly big packet over the mtu of target device. The first patch fix miss init the qdisc_skb_cb->mru The send one refactor the hanle of xmit in act_mirred and prepare for the third one The last one add implict packet fragment support to fix the over mtu for defrag in act_ct. ==================== Link: https://lore.kernel.org/r/1606276883-6825-1-git-send-email-wenxu@ucloud.cn Signed-off-by: Jakub Kicinski commit c129412f74e99b609f0a8e95fc3915af1fd40f34 Author: wenxu Date: Wed Nov 25 12:01:23 2020 +0800 net/sched: sch_frag: add generic packet fragment support. Currently kernel tc subsystem can do conntrack in cat_ct. But when several fragment packets go through the act_ct, function tcf_ct_handle_fragments will defrag the packets to a big one. But the last action will redirect mirred to a device which maybe lead the reassembly big packet over the mtu of target device. This patch add support for a xmit hook to mirred, that gets executed before xmiting the packet. Then, when act_ct gets loaded, it configs that hook. The frag xmit hook maybe reused by other modules. Signed-off-by: wenxu Acked-by: Cong Wang Acked-by: Jamal Hadi Salim Signed-off-by: Jakub Kicinski commit fa6d639930ee5cd3f932cc314f3407f07a06582d Author: wenxu Date: Wed Nov 25 12:01:22 2020 +0800 net/sched: act_mirred: refactor the handle of xmit This one is prepare for the next patch. Signed-off-by: wenxu Signed-off-by: Jakub Kicinski commit aadaca9e7c392dbf877af8cefb156199f1a67bbe Author: wenxu Date: Wed Nov 25 12:01:21 2020 +0800 net/sched: fix miss init the mru in qdisc_skb_cb The mru in the qdisc_skb_cb should be init as 0. Only defrag packets in the act_ct will set the value. Fixes: 038ebb1a713d ("net/sched: act_ct: fix miss set mru for ovs after defrag in act_ct") Signed-off-by: wenxu Signed-off-by: Jakub Kicinski commit a69dcdfc2dd21f86cb1f79f98fc94c52f96cff64 Author: Chun-Kuang Hu Date: Mon Nov 2 08:04:38 2020 +0800 soc / drm: mediatek: cmdq: Remove timeout handler in helper function For each client driver, its timeout handler need to dump hardware register or its state machine information, and their way to detect timeout are also different, so remove timeout handler in helper function and let client driver implement its own timeout handler. Signed-off-by: Chun-Kuang Hu Acked-by: Matthias Brugger Link: https://lore.kernel.org/r/20201102000438.29225-1-chunkuang.hu@kernel.org Signed-off-by: Matthias Brugger commit fb3158ea612c5a0bda8ce07977c573757753a270 Merge: 594e31bcebd6b 4f336e88a870e Author: Jakub Kicinski Date: Fri Nov 27 14:32:40 2020 -0800 Merge branch 'add-chacha20-poly1305-cipher-to-kernel-tls' Vadim Fedorenko says: ==================== Add CHACHA20-POLY1305 cipher to Kernel TLS RFC 7905 defines usage of ChaCha20-Poly1305 in TLS connections. This cipher is widely used nowadays and it's good to have a support for it in TLS connections in kernel. ==================== Link: https://lore.kernel.org/r/1606231490-653-1-git-send-email-vfedorenko@novek.ru Signed-off-by: Jakub Kicinski commit 4f336e88a870ecc56832154dff22853a3ca33e24 Author: Vadim Fedorenko Date: Tue Nov 24 18:24:50 2020 +0300 selftests/tls: add CHACHA20-POLY1305 to tls selftests Add new cipher as a variant of standard tls selftests Signed-off-by: Vadim Fedorenko Signed-off-by: Jakub Kicinski commit 74ea610602e607338d7301e0061d6b33b6b2ad0a Author: Vadim Fedorenko Date: Tue Nov 24 18:24:49 2020 +0300 net/tls: add CHACHA20-POLY1305 configuration Add ChaCha-Poly specific configuration code. Signed-off-by: Vadim Fedorenko Signed-off-by: Jakub Kicinski commit a6acbe62353834dc1913d96e1ace140bc9aafca3 Author: Vadim Fedorenko Date: Tue Nov 24 18:24:48 2020 +0300 net/tls: add CHACHA20-POLY1305 specific behavior RFC 7905 defines special behavior for ChaCha-Poly TLS sessions. The differences are in the calculation of nonce and the absence of explicit IV. This behavior is like TLSv1.3 partly. Signed-off-by: Vadim Fedorenko Signed-off-by: Jakub Kicinski commit 923c40c4651ed8b30cbd9fbac0f0ab612216cccc Author: Vadim Fedorenko Date: Tue Nov 24 18:24:47 2020 +0300 net/tls: add CHACHA20-POLY1305 specific defines and structures To provide support for ChaCha-Poly cipher we need to define specific constants and structures. Signed-off-by: Vadim Fedorenko Signed-off-by: Jakub Kicinski commit 6942a284fb3e6bcb8ab03c98ef5cb048e0fbb3e9 Author: Vadim Fedorenko Date: Tue Nov 24 18:24:46 2020 +0300 net/tls: make inline helpers protocol-aware Inline functions defined in tls.h have a lot of AES-specific constants. Remove these constants and change argument to struct tls_prot_info to have an access to cipher type in later patches Signed-off-by: Vadim Fedorenko Signed-off-by: Jakub Kicinski commit bb1b25cab04324d0749f7ae22653aff58157bf83 Author: Zhu Yanjun Date: Thu Nov 26 23:03:18 2020 +0800 xdp: Remove the functions xsk_map_inc and xsk_map_put The functions xsk_map_put() and xsk_map_inc() are simple wrappers and as such, replace these functions with the functions bpf_map_inc() and bpf_map_put() and remove some error testing code. Signed-off-by: Zhu Yanjun Signed-off-by: Daniel Borkmann Acked-by: Magnus Karlsson Link: https://lore.kernel.org/bpf/1606402998-12562-1-git-send-email-yanjunz@nvidia.com commit 264788c8f23703d0d3e967fb5aea83eb64d2cb2b Author: Alexandre Belloni Date: Wed Sep 30 20:48:03 2020 +0200 pcmcia: at91_cf: remove platform data support Board file support has been removed for at91rm9200 back in 2014, make the CF driver DT only. Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200930184804.3127757-2-alexandre.belloni@bootlin.com commit 24c8a743336a1fdf42c0c768b4435633069c6a39 Author: Alexandre Belloni Date: Wed Sep 30 20:48:02 2020 +0200 pcmcia: at91_cf: move definitions locally struct at91_cf_data is only used in the driver since all the platforms moved to device tree, move its definition locally. Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200930184804.3127757-1-alexandre.belloni@bootlin.com commit 105c4e75feb411a60f5089f7a1e68b8523f986cc Author: Magnus Karlsson Date: Thu Nov 26 10:37:35 2020 +0100 libbpf: Replace size_t with __u32 in xsk interfaces Replace size_t with __u32 in the xsk interfaces that contain this. There is no reason to have size_t since the internal variable that is manipulated is a __u32. The following APIs are affected: __u32 xsk_ring_prod__reserve(struct xsk_ring_prod *prod, __u32 nb, __u32 *idx) void xsk_ring_prod__submit(struct xsk_ring_prod *prod, __u32 nb) __u32 xsk_ring_cons__peek(struct xsk_ring_cons *cons, __u32 nb, __u32 *idx) void xsk_ring_cons__cancel(struct xsk_ring_cons *cons, __u32 nb) void xsk_ring_cons__release(struct xsk_ring_cons *cons, __u32 nb) The "nb" variable and the return values have been changed from size_t to __u32. Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/1606383455-8243-1-git-send-email-magnus.karlsson@gmail.com commit 02d8e879e4101c2baa1f7a99c1a266742872a049 Author: Colin Ian King Date: Thu Nov 26 23:24:00 2020 +0000 clk: qcom: Kconfig: Fix spelling mistake "dyanmic" -> "dynamic" There is a spelling mistake in the Kconfig help text. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20201126232400.15011-1-colin.king@canonical.com Signed-off-by: Stephen Boyd commit 55cd03e8095d46c5cc4b72e71af7ea3e34eb3c2f Merge: 3650b228f83ad a886c310d9fcb Author: Stephen Boyd Date: Fri Nov 27 12:19:48 2020 -0800 Merge tag 'for-5.11-clk' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into clk-tegra Pull a couple Tegra clk driver updates from Thierry Reding: This set consists of two fixes for minor issues that rarely, if ever, happen, so not urgent enough for these to go into v5.10. * tag 'for-5.11-clk' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: clk: tegra: bpmp: Clamp clock rates on requests clk: tegra: Do not return 0 on failure commit 270a5bbb090cd235a75739dc76684f8e93f3516b Merge: 718e43b5f850a f83eb664cdb45 Author: Arnd Bergmann Date: Fri Nov 27 21:06:06 2020 +0100 Merge tag 'scmi-updates-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/drivers ARM SCMI updates for v5.11 Two main additions this time: 1. Support for SCMI v3.0 sensor extensions 2. Support for voltage domain management protocol added newly to SCMI v3.0 * tag 'scmi-updates-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_scmi: Remove residual _le structs naming firmware: arm_scmi: Add SCMI v3.0 sensor notifications firmware: arm_scmi: Add SCMI v3.0 sensor configuration support firmware: arm_scmi: Add SCMI v3.0 sensors timestamped reads hwmon: (scmi) Update hwmon internal scale data type firmware: arm_scmi: Add support to enumerated SCMI voltage domain device firmware: arm_scmi: Add voltage domain management protocol support dt-bindings: arm: Add support for SCMI Regulators firmware: arm_scmi: Add SCMI v3.0 sensors descriptors extensions firmware: arm_scmi: Add full list of sensor type enumeration firmware: arm_scmi: Rework scmi_sensors_protocol_init firmware: arm_scmi: Fix missing destroy_workqueue() Link: https://lore.kernel.org/r/20201124122412.22386-1-sudeep.holla@arm.com Signed-off-by: Arnd Bergmann commit 718e43b5f850a8fb52933ac5ecf29f5eef48a349 Merge: 85ccf83e5c5b0 3cea11cd5e3b0 Author: Arnd Bergmann Date: Fri Nov 27 21:04:53 2020 +0100 Backmerge tag 'v5.10-rc2' into arm/drivers The SCMI pull request for the arm/drivers branch requires v5.10-rc2 because of dependencies with other git trees, so merge that in here. Signed-off-by: Arnd Bergmann commit 90f0e16c649ac3e93094cb491072d6424f53be43 Merge: bb528f4f57d09 bf118a5cb7e6d Author: Marc Zyngier Date: Fri Nov 27 19:48:24 2020 +0000 Merge branch 'kvm-arm64/misc-5.11' into kvmarm-master/next Signed-off-by: Marc Zyngier commit bb528f4f57d096793c133f44e1ac70db602d8c28 Merge: dc2286f397e69 c6232bd40b2ed Author: Marc Zyngier Date: Fri Nov 27 19:48:12 2020 +0000 Merge branch 'kvm-arm64/cache-demux' into kvmarm-master/next Signed-off-by: Marc Zyngier commit c6232bd40b2eda3819d108e6e3f621ec604e15d8 Author: Andrew Jones Date: Thu Nov 26 14:46:41 2020 +0100 KVM: arm64: selftests: Filter out DEMUX registers DEMUX register presence depends on the host's hardware (the CLIDR_EL1 register to be precise). This means there's no set of them that we can bless and that it's possible to encounter new ones when running on different hardware (which would generate "Consider adding them ..." messages, but we'll never want to add them.) Remove the ones we have in the blessed list and filter them out of the new list, but also provide a new command line switch to list them if one so desires. Signed-off-by: Andrew Jones Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201126134641.35231-3-drjones@redhat.com commit c73a44161776f6e60d933717f3b34084b0a0eba0 Author: Andrew Jones Date: Thu Nov 26 14:46:40 2020 +0100 KVM: arm64: CSSELR_EL1 max is 13 Not counting TnD, which KVM doesn't currently consider, CSSELR_EL1 can have a maximum value of 0b1101 (13), which corresponds to an instruction cache at level 7. With CSSELR_MAX set to 12 we can only select up to cache level 6. Change it to 14. Signed-off-by: Andrew Jones Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201126134641.35231-2-drjones@redhat.com commit f80c21509984190b7fd462ed2c9ac5a294a99dc5 Author: Mathieu Poirier Date: Fri Nov 27 10:52:56 2020 -0700 coresight-stm: Fix W=1 warning in STM driver CC drivers/hwtracing/coresight/coresight-cti-core.o CC drivers/hwtracing/coresight/coresight-cti-platform.o CC drivers/hwtracing/coresight/coresight-cti-sysfs.o drivers/hwtracing/coresight/coresight-stm.c:109: warning: Function parameter or member 'guaranteed' not described in 'channel_space' Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20201127175256.1092685-16-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit ea966a4a5fa59d9dc57f19427e3ba2b70766860b Author: Mathieu Poirier Date: Fri Nov 27 10:52:55 2020 -0700 coresight-tpiu: Fix W=1 warning in TPIU driver CC drivers/hwtracing/coresight/coresight-etm4x-core.o CC drivers/hwtracing/coresight/coresight-etm4x-sysfs.o CC drivers/hwtracing/coresight/coresight-stm.o drivers/hwtracing/coresight/coresight-tpiu.c:53: warning: Cannot understand * @base: memory mapped base address for this component. on line 53 - I thought it was a doc line CC drivers/hwtracing/coresight/coresight-cpu-debug.o CC drivers/hwtracing/coresight/coresight-catu.o Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20201127175256.1092685-15-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 56a9ecd2a26d7c4997e7b4355a5559e3adc23ac6 Author: Mathieu Poirier Date: Fri Nov 27 10:52:54 2020 -0700 coresight: Fix W=1 warnings in core framework CC drivers/hwtracing/coresight/coresight-etm4x-sysfs.o CC drivers/hwtracing/coresight/coresight-stm.o drivers/hwtracing/coresight/coresight-core.c:440: warning: Function parameter or member 'csdev' not described in 'coresight_disable_source' drivers/hwtracing/coresight/coresight-core.c:670: warning: Function parameter or member 'csdev' not described in 'coresight_get_ref' drivers/hwtracing/coresight/coresight-core.c:687: warning: Function parameter or member 'csdev' not described in 'coresight_put_ref' drivers/hwtracing/coresight/coresight-core.c:758: warning: Function parameter or member 'sink' not described in '_coresight_build_path' CC drivers/hwtracing/coresight/coresight-cpu-debug.o CC drivers/hwtracing/coresight/coresight-catu.o Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20201127175256.1092685-14-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 1cc573d5754e92372a7e30e35468644f8811e1a4 Author: Mao Jinlong Date: Fri Nov 27 10:52:53 2020 -0700 coresight: tmc-etr: Check if page is valid before dma_map_page() alloc_pages_node() return should be checked before calling dma_map_page() to make sure that valid page is mapped or else it can lead to aborts as below: Unable to handle kernel paging request at virtual address ffffffc008000000 Mem abort info: ... pc : __dma_inv_area+0x40/0x58 lr : dma_direct_map_page+0xd8/0x1c8 Call trace: __dma_inv_area tmc_pages_alloc tmc_alloc_data_pages tmc_alloc_sg_table tmc_init_etr_sg_table tmc_alloc_etr_buf tmc_enable_etr_sink_sysfs tmc_enable_etr_sink coresight_enable_path coresight_enable enable_source_store dev_attr_store sysfs_kf_write Fixes: 99443ea19e8b ("coresight: Add generic TMC sg table framework") Cc: stable@vger.kernel.org Reviewed-by: Suzuki K Poulose Signed-off-by: Mao Jinlong Signed-off-by: Sai Prakash Ranjan Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20201127175256.1092685-13-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 92815c0041ffd16799b408ff9fce9bae697e2bf8 Author: Kaixu Xia Date: Fri Nov 27 10:52:52 2020 -0700 coresight: tmc-etr: Assign boolean values to a bool variable Fix the following coccinelle warnings: ./drivers/hwtracing/coresight/coresight-tmc-etr.c:957:2-15: WARNING: Assignment of 0/1 to bool variable Fix them by assigning boolean values. Reported-by: Tosk Robot Signed-off-by: Kaixu Xia Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20201127175256.1092685-12-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 22b2beaa7f166f550424cbb3b988aeaa7ef0425a Author: Sai Prakash Ranjan Date: Fri Nov 27 10:52:51 2020 -0700 coresight: etb10: Fix possible NULL ptr dereference in etb_enable_perf() There was a report of NULL pointer dereference in ETF enable path for perf CS mode with PID monitoring. It is almost 100% reproducible when the process to monitor is something very active such as chrome and with ETF as the sink, not ETR. But code path shows that ETB has a similar path as ETF, so there could be possible NULL pointer dereference crash in ETB as well. Currently in a bid to find the pid, the owner is dereferenced via task_pid_nr() call in etb_enable_perf() and with owner being NULL, we can get a NULL pointer dereference, so have a similar fix as ETF where we cache PID in alloc_buffer() callback which is called as the part of etm_setup_aux(). Fixes: 75d7dbd38824 ("coresight: etb10: Add support for CPU-wide trace scenarios") Cc: stable@vger.kernel.org Signed-off-by: Sai Prakash Ranjan Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20201127175256.1092685-11-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 868663dd5d69fef05bfb004f91da5c30e9b93461 Author: Sai Prakash Ranjan Date: Fri Nov 27 10:52:50 2020 -0700 coresight: tmc-etf: Fix NULL ptr dereference in tmc_enable_etf_sink_perf() There was a report of NULL pointer dereference in ETF enable path for perf CS mode with PID monitoring. It is almost 100% reproducible when the process to monitor is something very active such as chrome and with ETF as the sink and not ETR. Currently in a bid to find the pid, the owner is dereferenced via task_pid_nr() call in tmc_enable_etf_sink_perf() and with owner being NULL, we get a NULL pointer dereference. Looking at the ETR and other places in the kernel, ETF and the ETB are the only places trying to dereference the task(owner) in tmc_enable_etf_sink_perf() which is also called from the sched_in path as in the call trace. Owner(task) is NULL even in the case of ETR in tmc_enable_etr_sink_perf(), but since we cache the PID in alloc_buffer() callback and it is done as part of etm_setup_aux() when allocating buffer for ETR sink, we never dereference this NULL pointer and we are safe. So lets do the same thing with ETF and cache the PID to which the cs_buffer belongs in tmc_alloc_etf_buffer() as done for ETR. This will also remove the unnecessary function calls(task_pid_nr()) since we are caching the PID. Easily reproducible running below: perf record -e cs_etm/@tmc_etf0/ -N -p Unable to handle kernel NULL pointer dereference at virtual address 0000000000000548 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 ... Call trace: tmc_enable_etf_sink+0xe4/0x280 coresight_enable_path+0x168/0x1fc etm_event_start+0x8c/0xf8 etm_event_add+0x38/0x54 event_sched_in+0x194/0x2ac group_sched_in+0x54/0x12c flexible_sched_in+0xd8/0x120 visit_groups_merge+0x100/0x16c ctx_flexible_sched_in+0x50/0x74 ctx_sched_in+0xa4/0xa8 perf_event_sched_in+0x60/0x6c perf_event_context_sched_in+0x98/0xe0 __perf_event_task_sched_in+0x5c/0xd8 finish_task_switch+0x184/0x1cc schedule_tail+0x20/0xec ret_from_fork+0x4/0x18 Fixes: 880af782c6e8 ("coresight: tmc-etf: Add support for CPU-wide trace scenarios") Cc: stable@vger.kernel.org Signed-off-by: Sai Prakash Ranjan Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20201127175256.1092685-10-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit a4ecf0e047c66382de1463d2e47d5683b934e008 Author: Qi Liu Date: Fri Nov 27 10:52:49 2020 -0700 coresight: Remove unnecessary THIS_MODULE of funnel and replicator driver As THIS_MODULE has been set in platform_driver_register(), so remove it from static funnel driver and static replicator driver to avoid set it twice. Signed-off-by: Qi Liu Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20201127175256.1092685-9-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 60c519c5d3629c21ba356782434d5b612d312de4 Author: Suzuki K Poulose Date: Fri Nov 27 10:52:48 2020 -0700 coresight: etm4x: Handle TRCVIPCSSCTLR accesses TRCVIPCSSCTLR is not present if the TRCIDR4.NUMPC > 0. Thus we should only access the register if it is present, preventing any undesired behavior. Cc: stable@vger.kernel.org Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20201127175256.1092685-8-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 6288b4ceca868eac4bf729532f8d845e3ecbed98 Author: Suzuki K Poulose Date: Fri Nov 27 10:52:47 2020 -0700 coresight: etm4x: Fix accesses to TRCPROCSELR TRCPROCSELR is not implemented if the TRCIDR3.NUMPROC == 0. Skip accessing the register in such cases. Cc: stable@vger.kernel.org Cc: Mathieu Poirier Cc: Mike Leach Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20201127175256.1092685-7-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 4e2187274fe8f3ddf55870e7e6b1aa7d65ba12eb Author: Suzuki K Poulose Date: Fri Nov 27 10:52:46 2020 -0700 coresight: etm4x: Update TRCIDR3.NUMPROCS handling to match v4.2 Since ETMv4.2, TRCIDR3.NUMPROCS has been extended to a 5bit field by encoding the top 2 bits[4:3] in TRCIDR3.[13:12], which were RES0. Fix the driver to compute the field correctly for ETMv4.2+ Cc: Mike Leach Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20201127175256.1092685-6-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit f2603b22e3d2dcffd8b0736e5c68df497af6bc84 Author: Suzuki K Poulose Date: Fri Nov 27 10:52:45 2020 -0700 coresight: etm4x: Fix accesses to TRCCIDCTLR1 The TRCCIDCTLR1 is only implemented if TRCIDR4.NUMCIDC > 4. Don't touch the register if it is not implemented. Cc: stable@vger.kernel.org Cc: Mathieu Poirier Cc: Mike Leach Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20201127175256.1092685-5-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 93dd64404cbe63b0afba371acd8db36e84b286c7 Author: Suzuki K Poulose Date: Fri Nov 27 10:52:44 2020 -0700 coresight: etm4x: Fix accesses to TRCVMIDCTLR1 TRCVMIDCTRL1 is only implemented only if the TRCIDR4.NUMVMIDC > 4. We must not touch the register otherwise. Cc: stable@vger.kernel.org Cc: Mathieu Poirier Cc: Mike Leach Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20201127175256.1092685-4-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 3ac1e0069b2c4fafce1317b389e7d1cfac69a039 Author: Zou Wei Date: Fri Nov 27 10:52:43 2020 -0700 coresight: core: Remove unneeded semicolon Fixes coccicheck warning: ./drivers/hwtracing/coresight/coresight-core.c:421:4-5: Unneeded semicolon Reported-by: Hulk Robot Signed-off-by: Zou Wei Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20201127175256.1092685-3-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit ac0f82b1b4956e348a6b2de8104308144ffb6ef7 Author: Sai Prakash Ranjan Date: Fri Nov 27 10:52:42 2020 -0700 coresight: etm4x: Skip setting LPOVERRIDE bit for qcom, skip-power-up There is a bug on the systems supporting to skip power up (qcom,skip-power-up) where setting LPOVERRIDE bit(low-power state override behaviour) will result in CPU hangs/lockups even on the implementations which supports it. So skip setting the LPOVERRIDE bit for such platforms. Fixes: 02510a5aa78d ("coresight: etm4x: Add support to skip trace unit power up") Cc: stable@vger.kernel.org Reviewed-by: Suzuki K Poulose Signed-off-by: Sai Prakash Ranjan Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20201127175256.1092685-2-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 344f2db2a18af45faafce13133c84c4f076876a6 Author: Youling Tang Date: Thu Nov 19 09:45:40 2020 +0800 arm64: vmlinux.lds.S: Drop redundant *.init.rodata.* We currently try to emit *.init.rodata.* twice, once in INIT_DATA, and once in the line immediately following it. As the two section definitions are identical, the latter is redundant and can be dropped. This patch drops the redundant *.init.rodata.* section definition. Signed-off-by: Youling Tang Acked-by: Will Deacon Link: https://lore.kernel.org/r/1605750340-910-1-git-send-email-tangyouling@loongson.cn Signed-off-by: Catalin Marinas commit bf118a5cb7e6d17e7ec9492e4dc676e7e7b69d01 Author: Will Deacon Date: Wed Nov 18 19:44:02 2020 +0000 KVM: arm64: Remove unused __extended_idmap_trampoline() prototype __extended_idmap_trampoline() was removed a long time ago by 3421e9d88d7a ("arm64: KVM: Simplify HYP init/teardown") so remove the unused function prototype. Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Cc: Marc Zyngier Link: https://lore.kernel.org/r/20201118194402.2892-4-will@kernel.org commit 36fb4cd55f626dff0f6e76bed14707fa00147b7f Author: Will Deacon Date: Wed Nov 18 19:44:01 2020 +0000 KVM: arm64: Remove kvm_arch_vm_ioctl_check_extension() kvm_arch_vm_ioctl_check_extension() is only called from kvm_vm_ioctl_check_extension(), so we can inline it and remove the extra function. Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Cc: Marc Zyngier Link: https://lore.kernel.org/r/20201118194402.2892-3-will@kernel.org commit 8d14797b53f044fda3ed42b5b6357c7622b8af58 Author: Will Deacon Date: Wed Nov 18 19:44:00 2020 +0000 KVM: arm64: Move 'struct kvm_arch_memory_slot' out of uapi/ 'struct kvm_arch_memory_slot' isn't part of the user ABI, so move it out of the uapi/ headers in case we start using it in future and accidentally back ourselves into a corner. Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201118194402.2892-2-will@kernel.org commit 9be9f2d3d073ef42127475f4fb6a392ab133f629 Author: Gyeongtaek Lee Date: Thu Nov 26 21:34:52 2020 +0900 ALSA: compress: allow pause and resume during draining With a stream with low bitrate, user can't pause or resume the stream near the end of the stream because current ALSA doesn't allow it. If the stream has very low bitrate enough to store whole stream into the buffer, user can't do anything except stop the stream and then restart it from the first because most of applications call draining after sending last frame to the kernel. If pause, resume are allowed during draining, user experience can be enhanced. To prevent malfunction in HW drivers which don't support pause during draining, pause during draining will only work if HW driver enable this feature explicitly by calling snd_compr_use_pause_in_draining(). Signed-off-by: Gyeongtaek Lee Acked-by: Vinod Koul Link: https://lore.kernel.org/r/000101d6c3f0$89b312b0$9d193810$@samsung.com Signed-off-by: Takashi Iwai commit 1e40d105dae5b7aca8ca7bfd7a0c348c0c509dba Author: Tyler Hicks Date: Mon Sep 21 14:15:57 2020 -0500 arm64: Extend the kernel command line from the bootloader Provide support for additional kernel command line parameters to be concatenated onto the end of the command line provided by the bootloader. Additional parameters are specified in the CONFIG_CMDLINE option when CONFIG_CMDLINE_EXTEND is selected, matching other architectures and leveraging existing support in the FDT and EFI stub code. Special care must be taken for the arch-specific nokaslr parsing. Search the bootargs FDT property and the CONFIG_CMDLINE when CONFIG_CMDLINE_EXTEND is in use. There are a couple of known use cases for this feature: 1) Switching between stable and development kernel versions, where one of the versions benefits from additional command line parameters, such as debugging options. 2) Specifying additional command line parameters, for additional tuning or debugging, when the bootloader does not offer an interactive mode. Signed-off-by: Tyler Hicks Link: https://lore.kernel.org/r/20200921191557.350256-3-tyhicks@linux.microsoft.com Signed-off-by: Catalin Marinas commit 52ec03f75d599d5bc240422bac8574724a319bec Author: Tyler Hicks Date: Mon Sep 21 14:15:56 2020 -0500 arm64: kaslr: Refactor early init command line parsing Don't ask for *the* command line string to search for "nokaslr" in kaslr_early_init(). Instead, tell a helper function to search all the appropriate command line strings for "nokaslr" and return the result. This paves the way for searching multiple command line strings without having to concatenate the strings in early init. Signed-off-by: Tyler Hicks Link: https://lore.kernel.org/r/20200921191557.350256-2-tyhicks@linux.microsoft.com Signed-off-by: Catalin Marinas commit 8cce12b3c82717df72afb955ce74c769b0eb2b4f Author: Paolo Bonzini Date: Fri Nov 27 12:46:36 2020 -0500 KVM: nSVM: set fixed bits by hand SVM generally ignores fixed-1 bits. Set them manually so that we do not end up by mistake without those bits set in struct kvm_vcpu; it is part of userspace API that KVM always returns value with the bits set. Signed-off-by: Paolo Bonzini commit 0cde3e9f029c25b671402425a01e029952a38c8e Author: Fred Oh Date: Fri Nov 27 18:40:22 2020 +0200 ASoC: SOF: Intel: hda: add sof_icl_ops for ICL platforms Separate the dsp ops for ICL ops to specify the use of ICCMAX FW boot sequence in the run op. All other ops are identical with TGL except post_fw_run. The recommended HW programming sequence for ICL is to power up core 3 and keep it in stall if HPRO is enabled. Signed-off-by: Fred Oh Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20201127164022.2498406-6-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit a70eb70827b4160ada657649c74647f8bb7768ae Author: Fred Oh Date: Fri Nov 27 18:40:21 2020 +0200 ASoC: SOF: ops: modify the signature of stall op Modify the signature of stall op to specify core_mask to stall cores. Signed-off-by: Fred Oh Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20201127164022.2498406-5-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit e3a85dbe30cf4c6904640da10e7dbd18c4ee7be7 Author: Fred Oh Date: Fri Nov 27 18:40:20 2020 +0200 ASoC: SOF: ext_manifest: parse cavs extra config data elem OUTBOX_SIZE, INBOX_SIZE are defined but not being used yet. Handle these elements to avoid warning about unknown token type. Signed-off-by: Fred Oh Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20201127164022.2498406-4-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit edbaaada5c9b57e243a98bf5b442f3a7a43ed14d Author: Fred Oh Date: Fri Nov 27 18:40:19 2020 +0200 ASoC: SOF: Intel: hda: define parse_platform_ext_manifest op Define the parse_platform_ext_manifest() op for HDA platforms to parse the SOF_EXT_MAN_CAVS_CONFIG_CAVS_LPRO config item to determine if the FW is configured for LPRO. The default clock configuration is assumed to be HPRO in the absence of this item in the extended manifest. New member clk_config_lpro is added to struct sof_intel_hda_dev to store the FW clock config information and that this will be used later to perform platform-specific operations in the post_fw_run op. Signed-off-by: Fred Oh Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20201127164022.2498406-3-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit e984f3ef3d2ac4a1896f7a3845b7c89c27841cbe Author: Fred Oh Date: Fri Nov 27 18:40:18 2020 +0200 ASoC: SOF: ops: add parse_platform_ext_manifest() op Add parse_platform_ext_manifest() op to parse platform-specific config data in the extended manifest. Signed-off-by: Fred Oh Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20201127164022.2498406-2-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 914b8de3dd9e910b45418744d6bc0c1b6fd591b1 Merge: 9c49a39c8cd7e 48f6e19503948 Author: Arnd Bergmann Date: Fri Nov 27 18:05:15 2020 +0100 Merge tag 'tegra-for-5.11-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/dt arm64: tegra: Device tree changes for v5.11-rc1 These changes are mostly minor fixes across the board, but they also enable PMUs on Tegra186 and enable SATA support on Jetson TX2. * tag 'tegra-for-5.11-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: arm64: tegra: Fix Tegra194 HDA {clock,reset}-names ordering arm64: tegra: Enable AHCI on Jetson TX2 arm64: tegra: Change order of SATA resets for Tegra132 and Tegra210 arm64: tegra: Add XUSB pad controller interrupt arm64: tegra: Rename ADMA device nodes for Tegra210 arm64: tegra: Hook up edp interrupt on Tegra132 SOCTHERM arm64: tegra: Add missing hot temperatures to Tegra210 thermal-zones arm64: tegra: Add missing gpu-throt-level to Tegra210 soctherm arm64: tegra: Add missing hot temperatures to Tegra132 thermal-zones arm64: tegra: Fix DT binding for IO High Voltage entry arm64: tegra: Fix GIC400 missing GICH/GICV register regions arm64: tegra: Add missing CPU PMUs on Tegra186 arm64: tegra: Fix Tegra234 VDK node names arm64: tegra: Wrong AON HSP reg property size arm64: tegra: Fix USB_VBUS_EN0 regulator on Jetson TX1 arm64: tegra: Correct the UART for Jetson Xavier NX arm64: tegra: Disable the ACONNECT for Jetson TX2 Link: https://lore.kernel.org/r/20201127144329.124891-5-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit 9c49a39c8cd7e57c18907643af5196eddea82684 Merge: 3f02c6a8280bf d63250d7fd495 Author: Arnd Bergmann Date: Fri Nov 27 18:04:28 2020 +0100 Merge tag 'tegra-for-5.11-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/dt ARM: tegra: Device tree changes for v5.11-rc1 This adds support for the Tegra30-based Ouya game console and enhances a number of existing device trees. It also fixes a couple of minor issues that were found during DT validation. * tag 'tegra-for-5.11-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: (23 commits) ARM: tegra: Add EMC OPP and ICC properties to Tegra124 EMC and ACTMON device-tree nodes ARM: tegra: Add EMC OPP and ICC properties to Tegra30 EMC and ACTMON device-tree nodes ARM: tegra: Add EMC OPP properties to Tegra20 device-trees ARM: tegra: Add nvidia,memory-controller phandle to Tegra20 EMC device-tree ARM: tegra: Add interconnect properties to Tegra124 device-tree ARM: tegra: Add interconnect properties to Tegra30 device-tree ARM: tegra: Add interconnect properties to Tegra20 device-tree ARM: tegra: acer-a500: Add Embedded Controller ARM: tegra: Change order of SATA resets for Tegra124 ARM: tegra: Correct EMC registers size in Tegra20 device-tree ARM: tegra: Properly align clocks for SOCTHERM ARM: tegra: Hook up edp interrupt on Tegra124 SOCTHERM ARM: tegra: Add missing hot temperatures to Tegra124 thermal-zones ARM: tegra: Add missing gpu-throt-level to Tegra124 soctherm ARM: tegra: Populate OPP table for Tegra20 Ventana ARM: tegra: nexus7: Use panel-lvds as the only panel compatible ARM: tegra: nexus7: Rename gpio-hog nodes ARM: tegra: nexus7: Add power-supply to lvds-encoder node ARM: tegra: nexus7: Improve CPU passive-cooling threshold ARM: tegra: nexus7: Correct thermal zone names ... Link: https://lore.kernel.org/r/20201127144329.124891-4-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit 3f02c6a8280bf04086cf74f51968f69a3979b757 Merge: eb149c927d58a e36f9381420b2 Author: Arnd Bergmann Date: Fri Nov 27 18:03:16 2020 +0100 Merge tag 'tegra-for-5.11-dt-bindings' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/dt dt-bindings: Changes for v5.11-rc1 This contains a couple of conversions of bindings to json-schema, as well as symbolic names for the various memory clients on Tegra20, Tegra30 and Tegra124. There's also a couple of fixes for Tegra194 pinmux and ARM GIC bindings. Finally, a new vendor prefix is added for Ouya and the Ouya game console compatible string is defined. * tag 'tegra-for-5.11-dt-bindings' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: dt-bindings: bus: Convert ACONNECT doc to json-schema dt-bindings: interrupt-controller: arm,gic: Update Tegra compatibles dt-bindings: dma: Convert ADMA doc to json-schema dt-bindings: Fix entry name for I/O High Voltage property dt-bindings: ARM: tegra: Add Ouya game console dt-bindings: Add vendor prefix for Ouya Inc. dt-bindings: memory: tegra124: Add memory client IDs dt-bindings: memory: tegra30: Add memory client IDs dt-bindings: memory: tegra20: Add memory client IDs Link: https://lore.kernel.org/r/20201127144329.124891-1-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit eb149c927d58adc57e6aa9450378ca72c541a97d Merge: fcc3e3c3a4a2b 0f80b9b8126cf Author: Arnd Bergmann Date: Fri Nov 27 18:02:45 2020 +0100 Merge tag 'renesas-arm-dt-for-v5.11-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/dt Renesas ARM DT updates for v5.11 (take two) - PCIe endpoint support for the R-Car H3 ES2.0+ SoC. * tag 'renesas-arm-dt-for-v5.11-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: arm64: dts: renesas: r8a77951: Add PCIe EP nodes Link: https://lore.kernel.org/r/20201127132155.77418-2-geert@linux-m68k.org Signed-off-by: Arnd Bergmann commit fcc3e3c3a4a2b05c8775ecddbef56ff1dcca31c2 Merge: 3a53840627b17 6660e2445523a Author: Arnd Bergmann Date: Fri Nov 27 18:00:07 2020 +0100 Merge tag 'stm32-dt-for-v5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into arm/dt STM32 DT updates for v5.11, round 1 Highlights: ---------- MCU part: -Fix dmamux reg property (length) on stm32h743. -Explicitly set DCMI bus type on stm32429i eval board. MPU part: -Enable FIFO mode with half-full threshold for DCMI. -Harmonize EHCI/OHCI nodes. -Move SDMMC IP version to v2.0 to get features improvements. -Add LP-timer wakeup support. -Enable crypto/hash/crc support. -Explicitly set DCMI bus type on stm32mp157 eval board. -Add USB type-c controller (STUSB1600) on stm32mp15 DK boards (It is connected to I2C4). -Fix dmamux reg property (length) on stm32mp151. -Optimize USB OTG FIFO sizes on stm32mp151. -Declare tamp node also as "simple-mfd". -LXA: -Document Octavo vendor-prefixes yaml file. -Document lxa,stm32mp157c-mc1 in STM32 yaml file. -DH: -Connect PHY IRQ line on DH SoM. -Add KS8851 Ethernet support on DHCOM which is mapped to FMC2. -Document all DH compatible strings in STM32 yaml file. -Add DHCOM based PicoITX board. This board embedds ethernet port, USB, CAN LEDS and a custom board-to-board connector. * tag 'stm32-dt-for-v5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32: (34 commits) ARM: dts: stm32: lxa-mc1: add OSD32MP15x to list of compatibles dt-bindings: arm: stm32: add extra SiP compatible for lxa,stm32mp157c-mc1 dt-bindings: vendor-prefixes: document Octavo Systems oct prefix ARM: dts: stm32: Add DHCOM based PicoITX board dt-bindings: arm: stm32: Add compatible strings for DH SoMs and boards ARM: dts: stm32: support child mfd cells for the stm32mp1 TAMP syscon dt-bindings: arm: stm32: add simple-mfd compatible for tamp node ARM: dts: stm32: update stm32mp151 for remote proc synchronization support ARM: dts: stm32: adjust USB OTG gadget fifo sizes in stm32mp151 ARM: dts: stm32: fix dmamux reg property on stm32h743 ARM: dts: stm32: fix dmamux reg property on stm32mp151 ARM: dts: stm32: fix mdma1 clients channel priority level on stm32mp151 ARM: dts: stm32: add STUSB1600 Type-C using I2C4 on stm32mp15xx-dkx dt-bindings: usb: Add DT bindings for STUSB160x Type-C controller dt-bindings: connector: add typec-power-opmode property to usb-connector ARM: dts: stm32: reorder spi4 within stm32mp15-pinctrl ARM: dts: stm32: set bus-type in DCMI endpoint for stm32429i-eval board ARM: dts: stm32: set bus-type in DCMI endpoint for stm32mp157c-ev1 board ARM: dts: stm32: enable CRYP by default on stm32mp15 ARM: dts: stm32: enable CRC1 by default on stm32mp15 ... Link: https://lore.kernel.org/r/873c17a5-28d5-9261-f691-1b917611c932@foss.st.com Signed-off-by: Arnd Bergmann commit 3a53840627b177f421b36c81610ffb3f9e6052c7 Merge: 2df8aa0373489 d7356a7ab125c Author: Arnd Bergmann Date: Fri Nov 27 17:58:27 2020 +0100 Merge tag 'omap-for-v5.11/dt-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/dt Devicetree changes for omaps for v5.11 merge window - Two non-urgent pandaboard updates to get gpio button and bluetooth working on pandaboard-es - Updates to follow devicetree binding docs for dwc3 and pwm-leds - Add initial support for droid bionic based on what we have for droid4 - Add second sha instance for dra7 - Add eQEP nodes for am335x for boneblue - Fix wrong comments for am335x gpio_31 * tag 'omap-for-v5.11/dt-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: am335x: Fix comments for AM335X_PIN_GPMC_WPN pin in GPIO mode ARM: dts: am335x-boneblue: Enable eQEP ARM: dts: am33xx: Add nodes for eQEP ARM: dts: dra7: add second SHA instance ARM: dts: xt875: add section for kionix kxtf9 ARM: dts: mapphone: separate out xt894 specific things ARM: dts: omap: Fix schema warnings for pwm-leds ARM: dts: omap5: Harmonize DWC USB3 DT nodes name ARM: dts: am437x: Correct DWC USB3 compatible string ARM: dts: pandaboard es: add bluetooth uart for HCI ARM: dts: pandaboard: fix pinmux for gpio user button of Pandaboard ES Link: https://lore.kernel.org/r/pull-1606462656-588116@atomide.com-2 Signed-off-by: Arnd Bergmann commit 85ccf83e5c5b032dad0d3b162f3408a7fc32c0e7 Merge: 3afd2823c1195 9294996f0be40 Author: Arnd Bergmann Date: Fri Nov 27 17:57:13 2020 +0100 Merge tag 'tegra-for-5.11-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/drivers firmware: tegra: Changes for v5.11-rc1 Contains a single fix for a strncpy()/strncat() issue that some versions of GCC are reporting. * tag 'tegra-for-5.11-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: firmware: tegra: fix strncpy()/strncat() confusion Link: https://lore.kernel.org/r/20201127144329.124891-3-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit 3afd2823c1195b77047cad33b208f5b5032f53b3 Merge: 72c7b0857069b b9ce9b0f83b53 Author: Arnd Bergmann Date: Fri Nov 27 17:56:09 2020 +0100 Merge tag 'tegra-for-5.11-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/drivers soc/tegra: Changes for v5.11-rc1 This contains a couple of warning fixes and a fix for a mostly harmless bug in the process ID retrieval code. * tag 'tegra-for-5.11-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: soc/tegra: fuse: Fix index bug in get_process_id soc: tegra: fuse: speedo-tegra210: Remove a group of set but unused variables soc: tegra: fuse: speedo-tegra124: Remove some set but unused variables Link: https://lore.kernel.org/r/20201127144329.124891-2-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit 72c7b0857069bce092f00a4c5b6eac6b2b6c5b6b Merge: 8f2685c9c4ffb 8b6bed678428b Author: Arnd Bergmann Date: Fri Nov 27 17:55:09 2020 +0100 Merge tag 'renesas-drivers-for-v5.11-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/drivers Renesas driver updates for v5.11 (take two) - Stop using __raw_*() I/O accessors. * tag 'renesas-drivers-for-v5.11-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: soc: renesas: rmobile-sysc: Stop using __raw_*() I/O accessors Link: https://lore.kernel.org/r/20201127132155.77418-4-geert@linux-m68k.org Signed-off-by: Arnd Bergmann commit f93c39bc95472dae3b5de71da5c005f47ece3148 Author: Lang Cheng Date: Thu Nov 26 15:04:11 2020 +0800 RDMA/hns: Add support for QP stash Stash is a mechanism that uses the core information carried by the ARM AXI bus to access the L3 cache. It can be used to improve the performance by increasing the hit ratio of L3 cache. QPs need to enable stash by default. Link: https://lore.kernel.org/r/1606374251-21512-3-git-send-email-liweihang@huawei.com Signed-off-by: Lang Cheng Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit bfefae9f108dfa62eb9c16c9e97086fddb4ece04 Author: Lang Cheng Date: Thu Nov 26 15:04:10 2020 +0800 RDMA/hns: Add support for CQ stash Stash is a mechanism that uses the core information carried by the ARM AXI bus to access the L3 cache. It can be used to improve the performance by increasing the hit ratio of L3 cache. CQs need to enable stash by default. Link: https://lore.kernel.org/r/1606374251-21512-2-git-send-email-liweihang@huawei.com Signed-off-by: Lang Cheng Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit aa26d828df8fddc21a8de64adb6e225996fbbe34 Merge: bdc0065c03896 35552c7cb672d Author: Arnd Bergmann Date: Fri Nov 27 17:52:13 2020 +0100 Merge tag 'tegra-for-5.11-arm64-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/defconfig arm64: tegra: Default configuration changes for v5.11-rc1 The Tegra234 VDK support that was introduced in v5.10-rc1 is now enabled by default. * tag 'tegra-for-5.11-arm64-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: arm64: defconfig: Enable Tegra234 support Link: https://lore.kernel.org/r/20201127144329.124891-6-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit bdc0065c03896b70b16c7bcfd29c013ab3fb4a2e Merge: 44000366eb047 01d13862543d3 Author: Arnd Bergmann Date: Fri Nov 27 17:51:47 2020 +0100 Merge tag 'stm32-config-for-v5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into arm/defconfig STM32 config updates for v5.11, round 1 Highlights: ---------- -Enable counters for STM32 -Enable crypto for STM32 -Enable audio for STM32: DFSDM and SPDIFRX -Enable STUSB160x Type-C controller All configs are enabled as module. * tag 'stm32-config-for-v5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32: ARM: multi_v7_defconfig: enable STM32 dfsdm audio support ARM: multi_v7_defconfig: enable STM32 spdifrx support ARM: multi_v7_defconfig: enable STUSB160X Type-C port controller support ARM: multi_v7_defconfig: add STM32 crypto support ARM: multi_v7_defconfig: enable counter subsystem and stm32 counter drivers Link: https://lore.kernel.org/r/a6ea4940-a9a3-eba6-4ef5-aba7ff382009@foss.st.com Signed-off-by: Arnd Bergmann commit 44000366eb0479753ff609fe1c36a75d91b596a6 Merge: 8195fceca0316 eaf7697b6febe Author: Arnd Bergmann Date: Fri Nov 27 17:51:22 2020 +0100 Merge tag 'omap-for-v5.11/defconfig-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/defconfig Defconfig changes for omaps for v5.11 merge window - Enable thermal support for omap3 now that the driver changes have been merged - Enable magnetometer and accelerometer support as loadable modules for Motorola mapphone devices - Enable eQEP counter for beaglebone blue as loadable modules * tag 'omap-for-v5.11/defconfig-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: omap2plus_defconfig: Enable TI eQEP counter driver ARM: omap2plus_defconfig: add CONFIG_AK8975=m and CONFIG_KXCJK1013=m ARM: omap2plus_defconfig: Enable OMAP3_THERMAL Link: https://lore.kernel.org/r/pull-1606462656-588116@atomide.com-3 Signed-off-by: Arnd Bergmann commit 334d09c218c11c850510f79454f0c771e7243cc3 Merge: 31216ef56126d d4a617c9bbef9 Author: Arnd Bergmann Date: Fri Nov 27 17:49:54 2020 +0100 Merge tag 'renesas-arm-soc-for-v5.11-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/soc Renesas ARM SoC updates for v5.11 - Stop using static I/O mappings and __raw_*() I/O accessors. * tag 'renesas-arm-soc-for-v5.11-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: ARM: shmobile: Stop using __raw_*() I/O accessors ARM: shmobile: sh73a0: Remove obsolete static mapping ARM: shmobile: sh73a0: Use ioremap() to map SMP registers ARM: shmobile: sh73a0: Use ioremap() to map L2C registers ARM: shmobile: r8a7779: Remove obsolete static mappings ARM: shmobile: r8a7779: Use ioremap() to map SMP registers ARM: shmobile: r8a7779: Use ioremap() to map INTC2 registers ARM: shmobile: r8a7778: Introduce HPBREG_BASE Link: https://lore.kernel.org/r/20201127132155.77418-3-geert@linux-m68k.org Signed-off-by: Arnd Bergmann commit 31216ef56126d7bfcacbfa6c31cb06e58b483d53 Merge: 418baf2c28f34 2e023b938048c Author: Arnd Bergmann Date: Fri Nov 27 17:46:50 2020 +0100 Merge tag 'omap-for-v5.11/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/soc SoC changes for omaps for v5.11 merge window: Several non-urgent fixes for various issues found by automated tests. So far we have not been hitting any of these so these can wait for the merge window no problem. * tag 'omap-for-v5.11/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP1: clock: Use IS_ERR_OR_NULL() to clean code ARM: OMAP2+: Remove redundant null check before clk_prepare_enable/clk_disable_unprepare ARM: OMAP2+: Remove redundant assignment to variable ret ARM: OMAP2+: Fix kfree NULL pointer in omap2xxx_clkt_vps_init ARM: OMAP2+: Fix memleak in omap2xxx_clkt_vps_init Link: https://lore.kernel.org/r/pull-1606462656-588116@atomide.com Signed-off-by: Arnd Bergmann commit 71586dd2001087e89e344e2c7dcee6b4a53bb6de Author: Yangyang Li Date: Tue Nov 24 20:24:09 2020 +0800 RDMA/hns: Create QP with selected QPN for bank load balance In order to improve performance by balancing the load between different banks of cache, the QPC cache is desigend to choose one of 8 banks according to lower 3 bits of QPN. The hns driver needs to count the number of QP on each bank and then assigns the QP being created to the bank with the minimum load first. Link: https://lore.kernel.org/r/1606220649-1465-1-git-send-email-liweihang@huawei.com Signed-off-by: Yangyang Li Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit db4a831997047809229152261a462c17cb857c84 Merge: 459ea85049b01 7218838109fef Author: Mark Brown Date: Fri Nov 27 16:18:32 2020 +0000 Merge branch 'for-5.10' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi into spi-5.11 commit 5833bc6c7319dd59441562d853b8e435e3bc8ac2 Author: Frank Wunderlich Date: Fri Oct 16 22:40:18 2020 +0200 dts64: mt7622: disable spi1 and uart2 because pins are used by pwm MDI_TP_P0 (gpio51) is used by pwm1 and uart2 (uart1 on gpio-header) MDI_RP_P4 (gpio67) is used by pwm4 and spi1 Signed-off-by: Frank Wunderlich Link: https://lore.kernel.org/r/20201016204019.2606-3-linux@fw-web.de Signed-off-by: Matthias Brugger commit 3f0716710ae93e467cd313855c1aa96dd40321d2 Author: Frank Wunderlich Date: Fri Oct 16 22:40:17 2020 +0200 dts64: mt7622: enable all pwm for bananapi r64 mt7622 only supports 6 pwm-channels so drop pwm7 third pwm (pwm2) is inverted and connected to fan-socket Signed-off-by: Frank Wunderlich Link: https://lore.kernel.org/r/20201016204019.2606-2-linux@fw-web.de Signed-off-by: Matthias Brugger commit 66f57b871efc576dfe8117b65af4e805e03ea689 Author: Leon Romanovsky Date: Tue Nov 17 09:01:48 2020 +0200 RDMA/restrack: Support all QP types The latest changes in restrack name handling allowed to simplify the QP creation code to support all types of QPs. For example XRC QP are presented with rdmatool. $ ibv_xsrq_pingpong & $ rdma res show qp link ibp0s9/1 lqpn 0 type SMI state RTS sq-psn 0 comm [ib_core] link ibp0s9/1 lqpn 1 type GSI state RTS sq-psn 0 comm [ib_core] link ibp0s9/1 lqpn 7 type UD state RTS sq-psn 0 comm [mlx5_ib] link ibp0s9/1 lqpn 42 type XRC_TGT state INIT sq-psn 0 path-mig-state MIGRATED comm [ib_uverbs] link ibp0s9/1 lqpn 43 type XRC_INI state INIT sq-psn 0 path-mig-state MIGRATED pdn 197 pid 419 comm ibv_xsrq_pingpong Link: https://lore.kernel.org/r/20201117070148.1974114-4-leon@kernel.org Reviewed-by: Mark Zhang Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 2b1f747071c5ce5ad571d80c1541b732cf07f9c1 Author: Leon Romanovsky Date: Tue Nov 17 09:01:47 2020 +0200 RDMA/core: Allow drivers to disable restrack DB Driver QP types are special case with no IBTA restrictions. For example, EFA implemented creation of this QP type as regular one, while mlx5 separated create to two step: create and modify. That separation causes to the situation where DC QP (mlx5) is always added to the same xarray index zero. This change allows to drivers like mlx5 simply disable restrack DB tracking, but it doesn't disable kref on the memory. Fixes: 52e0a118a203 ("RDMA/restrack: Track driver QP types in resource tracker") Link: https://lore.kernel.org/r/20201117070148.1974114-3-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit b47a98efa97889c5b16d17e77eed3dc4500674eb Author: Leon Romanovsky Date: Tue Nov 17 09:01:46 2020 +0200 RDMA/core: Track device memory MRs Device memory (DM) are registered as MR during initialization flow, these MRs were not tracked by resource tracker and had res->valid set as a false. Update the code to manage them too. Before this change: $ ibv_rc_pingpong -j & $ rdma res show mr <-- shows nothing After this change: $ ibv_rc_pingpong -j & $ rdma res show mr dev ibp0s9 mrn 0 mrlen 4096 pdn 3 pid 734 comm ibv_rc_pingpong Fixes: be934cca9e98 ("IB/uverbs: Add device memory registration ioctl support") Link: https://lore.kernel.org/r/20201117070148.1974114-2-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit c870d50ce387d84b6438211a7044c60afbd5d60a Author: Julian Sax Date: Thu Nov 26 18:51:58 2020 +0100 HID: i2c-hid: add Vero K147 to descriptor override This device uses the SIPODEV SP1064 touchpad, which does not supply descriptors, so it has to be added to the override list. Cc: stable@vger.kernel.org Signed-off-by: Julian Sax Reviewed-by: Hans de Goede Signed-off-by: Jiri Kosina commit c961facb5b19634eee5bcdd91fc5bf3f1c545bc5 Author: Hans de Goede Date: Wed Nov 25 23:37:45 2020 +0100 HID: ite: Add support for Acer S1002 keyboard-dock Make the hid-ite driver handle the Acer S1002 keyboard-dock, this leads to 2 improvements: 1. The non working wifi-toggle hotkey now works. 2. Toggling the touchpad on of with the hotkey will no show OSD notifications in e.g. GNOME3. The actual toggling is handled inside the keyboard, this adds support for notifying evdev listeners about this. Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit 3311bf18467272388039922a5e29c4925b291f73 Author: Peng Fan Date: Fri Nov 27 10:28:37 2020 +0000 nvmem: imx-ocotp: add support for the unaliged word count When offset is not 4 bytes aligned, directly shift righty by 2 bits will cause reading out wrong data. Since imx ocotp only supports 4 bytes reading once, we need handle offset is not 4 bytes aligned and enlarge the bytes to 4 bytes aligned. After reading finished, copy the needed data from buffer to caller and free buffer. Signed-off-by: Peng Fan Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20201127102837.19366-6-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 044ee8f85267599a9b0112911f5c16d4548b4289 Author: Evan Green Date: Fri Nov 27 10:28:36 2020 +0000 nvmem: qfprom: Don't touch certain fuses Some fuse ranges are protected by the XPU such that the AP cannot access them. Attempting to do so causes an SError. Use the newly introduced per-soc compatible string, and the newly introduced nvmem keepout support to attach the set of regions we should not access. Reviewed-by: Douglas Anderson Signed-off-by: Evan Green Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20201127102837.19366-5-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit c8b336bb1aeb88baebdf116f151a4afe712512c5 Author: Evan Green Date: Fri Nov 27 10:28:35 2020 +0000 dt-bindings: nvmem: Add soc qfprom compatible strings Add SoC-specific compatible strings so that data can be attached to it in the driver. Reviewed-by: Rob Herring Signed-off-by: Evan Green Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20201127102837.19366-4-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit fd3bb8f54a88107570334c156efb0c724a261003 Author: Evan Green Date: Fri Nov 27 10:28:34 2020 +0000 nvmem: core: Add support for keepout regions Introduce support into the nvmem core for arrays of register ranges that should not result in actual device access. For these regions a constant byte (repeated) is returned instead on read, and writes are quietly ignored and returned as successful. This is useful for instance if certain efuse regions are protected from access by Linux because they contain secret info to another part of the system (like an integrated modem). Signed-off-by: Evan Green Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20201127102837.19366-3-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 8f3991f0669ef271615e25c3390c20b8fb00d674 Author: Fabien Parent Date: Fri Nov 27 10:28:33 2020 +0000 dt-bindings: nvmem: mtk-efuse: add documentation for MT8516 SoC Add binding documentation for MT8516 SoCs. Acked-by: Rob Herring Signed-off-by: Fabien Parent Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20201127102837.19366-2-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit d3bb5fe9ca108c07c0db7e04cc490b97b1c235f1 Author: Srinivas Kandagatla Date: Fri Nov 27 10:24:51 2020 +0000 slimbus: qcom-ngd-ctrl: remove redundant out of memory messages Failure of dma_alloc_coherent will already throw a error message, so addition message is really redundant here. Remove it! Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20201127102451.17114-8-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 39014ce6d6028614a46395923a2c92d058b6fa87 Author: Bjorn Andersson Date: Fri Nov 27 10:24:50 2020 +0000 slimbus: qcom-ngd-ctrl: Avoid sending power requests without QMI Attempting to send a power request during PM operations, when the QMI handle isn't initialized results in a NULL pointer dereference. So check if the QMI handle has been initialized before attempting to post the power requests. Fixes: 917809e2280b ("slimbus: ngd: Add qcom SLIMBus NGD driver") Signed-off-by: Bjorn Andersson Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20201127102451.17114-7-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit a35c6e18abae71c1321a9d1d16d975bd7de65273 Author: Rikard Falkeborn Date: Fri Nov 27 10:24:49 2020 +0000 slimbus: qcom-ngd-ctrl: Constify static structs qcom_slim_qmi_msg_handlers[] and qcom_slim_ngd_qmi_svc_event_ops are only used as input arguments to qmi_handle_init() which accepts const pointers to both qmi_ops and qmi_msg_handler. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20201127102451.17114-6-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 50df9842030f899d60e96f1c3ed0c9692338adf7 Author: Gustavo A. R. Silva Date: Fri Nov 27 10:24:48 2020 +0000 slimbus: messaging: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20201127102451.17114-5-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit e1ae85e1830e167a63f94007e50e088b86aa0a16 Author: Srinivas Kandagatla Date: Fri Nov 27 10:24:47 2020 +0000 slimbus: qcom-ngd-ctrl: add Protection Domain Restart Support Add support to protection domain restart. Protection domain restart would also restart the service just like SSR. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20201127102451.17114-4-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit a899d324863a3d15ce0eea513884e1b73a758c58 Author: Srinivas Kandagatla Date: Fri Nov 27 10:24:46 2020 +0000 slimbus: qcom-ngd-ctrl: add Sub System Restart support This patch adds SSR(SubSystem Restart) support which includes, synchronisation between SSR and QMI server notifications. Also with this patch now NGD is taken down by SSR instead of QMI server down notification. NGD up path now relies on both SSR and QMI notifications and particularly sequence of SSR up followed by QMI server up notification. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20201127102451.17114-3-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit abe9af53c0dce47509afac18264efaaf4059a3c8 Author: Mauro Carvalho Chehab Date: Fri Nov 27 10:24:45 2020 +0000 slimbus: fix a kernel-doc markup Fix the name of the enum on its kernel-doc markup: enum slim_ch_aux_fmt -> enum slim_ch_aux_bit_fmt Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20201127102451.17114-2-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 7f2c63d6ae0754e5389c5942cb3bd670ea6cff40 Author: xuyuqing Date: Wed Nov 18 08:58:58 2020 +0800 ASoC: qcom: sc7180: fix 32 bit format for adau7002 the microphone is attached to external codec(adau7002) instead of rt5682.We need to always use 32 bit format on sc7180 to meet the clock requirement of adau7002: The ADAU7002 requires a BCLK rate that is a minimum of 64× the LRCLK sample rate Signed-off-by: xuyuqing Link: https://lore.kernel.org/r/20201118005858.123013-2-xuyuqing@huaqin.corp-partner.google.com Signed-off-by: Mark Brown commit cc894ac553605c9193a7a94372ff2f8af5766f46 Author: Pascal Giard Date: Wed Nov 25 22:02:30 2020 -0500 HID: sony: support for ghlive ps3/wii u dongles This commit adds support for the Guitar Hero Live PS3 and Wii U dongles. These dongles require a "magic" USB control message [1] to be sent approximately every 10 seconds otherwise the dongle will not report events where the strumbar is hit while a fret is being held. Also, inspired by a patch sent on linux-input by Sanjay Govind [2], the accelerometer is mapped to ABS_RY for tilt. Interestingly, the Wii U and PS3 dongles share the same VID and PID. [1] https://github.com/ghlre/GHLtarUtility/ [2] https://marc.info/?l=linux-input&m=157242835928542&w=2 Signed-off-by: Pascal Giard Signed-off-by: Jiri Kosina commit 7218838109fef61cdec988ff728e902d434c9cc5 Author: Serge Semin Date: Fri Nov 27 17:46:11 2020 +0300 spi: dw-bt1: Fix undefined devm_mux_control_get symbol I mistakenly added the select attributes to the SPI_DW_BT1_DIRMAP config instead of having them defined in SPI_DW_BT1. If the kernel doesn't have the MULTIPLEXER and MUX_MMIO configs manually enabled and the SPI_DW_BT1_DIRMAP config hasn't been selected, Baikal-T1 SPI device will always fail to be probed by the driver. Fix that and the error reported by the test robot: >> ld.lld: error: undefined symbol: devm_mux_control_get >>> referenced by spi-dw-bt1.c >>> spi/spi-dw-bt1.o:(dw_spi_bt1_sys_init) in archive drivers/built-in.a by moving the MULTIPLEXER/MUX_MMIO configs selection to the SPI_DW_BT1 config. Link: https://lore.kernel.org/lkml/202011161745.uYRlekse-lkp@intel.com/ Link: https://lore.kernel.org/linux-spi/20201116040721.8001-1-rdunlap@infradead.org/ Fixes: abf00907538e ("spi: dw: Add Baikal-T1 SPI Controller glue driver") Reported-by: kernel test robot Signed-off-by: Serge Semin Cc: Randy Dunlap Cc: Ramil Zaripov Link: https://lore.kernel.org/r/20201127144612.4204-1-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit f43d3870cafa2a0f3854c1819c8385733db8f9ae Author: Dean Camera Date: Thu Nov 26 09:39:57 2020 +1100 HID: hidraw: Add additional hidraw input/output report ioctls. Currently the hidraw module can only read and write feature HID reports on demand, via dedicated ioctls. Input reports are read from the device through the read() interface, while output reports are written through the write interface(). This is insufficient; it is desirable in many situations to be able to read and write input and output reports through the control interface to cover additional scenarios: - Reading an input report by its report ID, to get initial state - Writing an input report, to set initial input state in the device - Reading an output report by its report ID, to obtain current state - Writing an output report by its report ID, out of band This patch adds these missing ioctl requests to read and write the remaining HID report types. Note that not all HID backends will neccesarily support this (e.g. while the USB link layer supports setting Input reports, others may not). Also included are documentation and example updates. The current hidraw documentation states that feature reports read from the device does *not* include the report ID, however this is not the case and the returned report will have its report ID prepended by conforming HID devices, as the report data sent from the device over the control endpoint must be indentical in format to those sent over the regular transport. Signed-off-by: Dean Camera Signed-off-by: Jiri Kosina commit 6a0eaf5123e0e1223252b88cd5775f74105e27bd Author: Dean Camera Date: Thu Nov 26 09:39:34 2020 +1100 HID: Increase HID maximum report size to 16KB Currently the maximum HID report size which can be buffered by the kernel is 8KB. This is sufficient for the vast majority of HID devices on the market, as most HID reports are fairly small. However, some unusual devices such as the Elgate Stream Deck exist which use a report size slightly over 8KB for the image data that is sent to the device. Reports these large cannot be buffered by the regular HID subsystem currently, thus the only way to use such device is to bypass the HID subsystem entirely. This increases the maximum HID report size to 16KB, which should cover all sanely designed HID devices. Signed-off-by: Dean Camera Signed-off-by: Jiri Kosina commit 2eefbf5f862ed98a043917fa54c7a79a56ec08f6 Author: Peter Ujfalusi Date: Fri Nov 20 09:35:33 2020 +0200 arm64: dts: ti: k3-j7200-common-proc-board: Correct the name of io expander on main_i2c1 J7200 main_i2c1 is connected to the i2c bus on the CPB marked as main_i2c3 The i2c1 devices on the CPB are _not_ connected to the SoC, they are not usable with the J7200 SOM. Correct the expander name from exp4 to exp3 and at the same time add the line names as well. Signed-off-by: Peter Ujfalusi Signed-off-by: Nishanth Menon Reviewed-by: Vignesh Raghavendra Reviewed-by: Grygorii Strashko Link: https://lore.kernel.org/r/20201120073533.24486-3-peter.ujfalusi@ti.com commit b6633d778675a58fba1d7f795169da212a76231d Author: Peter Ujfalusi Date: Fri Nov 20 09:35:32 2020 +0200 arm64: dts: ti: k3-j7200-som-p0: main_i2c0 have an ioexpander on the SOM The J7200 SOM have additional io expander which is used to control several SOM level muxes to make sure that the correct signals are routed to the correct pin on the SOM <-> CPB connectors. Signed-off-by: Peter Ujfalusi Signed-off-by: Nishanth Menon Reviewed-by: Vignesh Raghavendra Reviewed-by: Grygorii Strashko Link: https://lore.kernel.org/r/20201120073533.24486-2-peter.ujfalusi@ti.com commit baed393e8550fa075512772fad27e98ba9dcb527 Author: Kuninori Morimoto Date: Fri Nov 27 09:07:40 2020 +0900 ASoC: soc-core: add soc_dapm_suspend_resume() snd_soc_suspend() and soc_resume_deferred() are calling same snd_soc_dapm_stream_event() with same logic with different parameter. This patch adds new soc_dapm_suspend_resume() and share the code. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87im9rekfp.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit d4c1d9eb6611fee6cd3623e810282342757b57f6 Author: Kuninori Morimoto Date: Fri Nov 27 09:07:35 2020 +0900 ASoC: soc-core: add soc_playback_digital_mute() snd_soc_suspend() and soc_resume_deferred() are calling same snd_soc_dai_digital_mute() with same logic with different parameter. This patch adds new soc_playback_digital_mute() and share the code. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87k0u7ekfv.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 431ec7bd4d52caa2fc20fbe87744f522e3d1efad Author: Michael Klein Date: Fri Nov 27 13:52:01 2020 +0100 mfd: si476x-core.h: Fix "regulator" spelling in comment "regualtor" -> "regulator" Signed-off-by: Michael Klein Signed-off-by: Lee Jones commit a3f132df0e5f25399c9592c2d14997975ddbf290 Author: Vaibhav Gupta Date: Tue Jul 28 12:24:18 2020 +0200 media: bttv: use generic power management Drivers using legacy power management .suspen()/.resume() callbacks have to manage PCI states and device's PM states themselves. They also need to take care of standard configuration registers. Switch to generic power management framework using a single "struct dev_pm_ops" variable to take the unnecessary load from the driver. This also avoids the need for the driver to directly call most of the PCI helper functions and device power state control functions, as through the generic framework PCI Core takes care of the necessary operations, and drivers are required to do only device-specific jobs. Signed-off-by: Vaibhav Gupta Signed-off-by: Mauro Carvalho Chehab commit acc4c91ebbfb29bad4a55b923175170b297ff431 Author: Christophe JAILLET Date: Tue Jul 28 12:18:54 2020 +0200 media: dm1105: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated, GFP_KERNEL can be used because it is called from the probe function and no lock is taken. The call chain is: dm1105_probe --> dm1105_hw_init --> dm1105_dma_map @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: Mauro Carvalho Chehab commit 8b6bed678428b6df66741cb0956e076d579e3891 Author: Geert Uytterhoeven Date: Thu Nov 19 13:52:14 2020 +0100 soc: renesas: rmobile-sysc: Stop using __raw_*() I/O accessors There is no reason to keep on using the __raw_{read,write}l() I/O accessors in Renesas ARM driver code. Switch to using the plain {read,write}l() I/O accessors, to have a chance that this works on big-endian. Suggested-by: Arnd Bergmann Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201119125214.4065925-1-geert+renesas@glider.be commit c79464f30e18dd02a66333d60c437c1fa98ee28f Author: Christophe JAILLET Date: Mon Jul 27 15:51:51 2020 +0200 media: bt8xx: avoid a useless memset Avoid a memset after a call to 'dma_alloc_coherent()'. This is useless since commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*") Signed-off-by: Christophe JAILLET Signed-off-by: Mauro Carvalho Chehab commit b2a004d3d8407a1544acd01e3ae2db5bc60afe4b Author: Christophe JAILLET Date: Mon Jul 27 15:51:37 2020 +0200 media: bt8xx: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'bt878_mem_alloc()' (bt878.c), GFP_KERNEL can be used because it is only called from the probe function (i.e. 'bt878_probe()') and no lock is taken. When memory is allocated in 'btcx_riscmem_alloc()' (btcx-risc.c), GFP_KERNEL can be used because all the callers either already use GFP_KERNEL or are called from a probe function or are called from a .buf_prepare function. The 4 callers are all in 'bttv-risc.c'. - bttv_risc_packed() and bttv_risc_planar(): only called from 'videobuf_queue_ops''s '.buf_prepare' functions. The call chains are: .buf_prepare (in 'bttv-driver.c') --> buffer_prepare (in 'bttv-driver.c') --> bttv_prepare_buffer --> bttv_buffer_risc --> bttv_risc_packed (x8 times) --> bttv_risc_planar (x6 times) .buf_prepare (in 'bttv-vbi.c') --> vbi_buffer_prepare (in 'bttv-vbi.c') --> bttv_risc_packed (x2 times) - bttv_risc_overlay(): already uses GFP_KERNEL - bttv_risc_init_main(): only called from the 'bttv_probe()' probe function and no spin_lock is taken in the between @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: Mauro Carvalho Chehab commit f79469016e579346ebb581f4645056ff0597e1fa Author: Christophe JAILLET Date: Mon Jul 27 14:45:27 2020 +0200 media: b2c2: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'flexcop_dma_allocate()', GFP_KERNEL can be used because it is only called from the probe function (i.e. 'flexcop_pci_probe()') and no lock is taken. The call chain is: flexcop_pci_probe --> flexcop_pci_dma_init --> flexcop_dma_allocate @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: Mauro Carvalho Chehab commit f0cf9985507c649b033affe206f94adea288a5ee Author: Bixuan Cui Date: Thu Jul 16 19:17:42 2020 +0200 media: tuners: reduce stack usage in mxl5005s_reconfigure Fix the warning: [-Werror=-Wframe-larger-than=] drivers/media/tuners/mxl5005s.c: In function 'mxl5005s_reconfigure': drivers/media/tuners/mxl5005s.c:3953:1: warning: the frame size of 1152 bytes is larger than 1024 bytes Signed-off-by: Bixuan Cui Signed-off-by: Mauro Carvalho Chehab commit 638920a66a17c8e1f4415cbab0d49dc4a344c2a7 Author: Alex Shi Date: Fri Nov 13 16:58:14 2020 +0800 x86/PCI: Make a kernel-doc comment a normal one The comment is using kernel-doc markup but that comment isn't a kernel-doc comment so make it a normal one to avoid: arch/x86/pci/i386.c:373: warning: Function parameter or member \ 'pcibios_assign_resources' not described in 'fs_initcall' [ bp: Massage and fixup comment while at it. ] Signed-off-by: Alex Shi Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/1605257895-5536-5-git-send-email-alex.shi@linux.alibaba.com commit 965045caa11c43adfdf720c8009fea0b33bfc0a6 Author: Alexander A. Klimov Date: Wed Jul 8 17:18:13 2020 +0200 media: Replace HTTP links with HTTPS ones: SI2165 MEDIA DRIVER Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Mauro Carvalho Chehab commit 1785c8290489bb4b9f2897b7f545fd06e1f6d226 Author: Randy Dunlap Date: Sat Jul 4 05:44:54 2020 +0200 media: Documentation/driver-api: media/dtv-frontend: drop doubled word Drop the doubled word "errors". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab commit 3cf80a75e16a1146645b869a579748e945da6c42 Author: Randy Dunlap Date: Sat Jul 4 05:44:55 2020 +0200 media: Documentation/driver-api: media/v4l2-dev: drop doubled word Drop the doubled word "device". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab commit eeee0dfda6d51a6c1ee5959680bcf299fcd5cfa9 Author: Randy Dunlap Date: Sat Jul 4 05:45:01 2020 +0200 media: Documentation/driver-api: media/v4l2-controls: drop doubled words Drop the doubled words "type" and "the". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab commit fe209bf531d65012a157e7033119b0ebdeaa0935 Author: Randy Dunlap Date: Sat Jul 4 05:44:53 2020 +0200 media: Documentation/driver-api: media/cec-core: drop doubled word Drop the doubled word "the". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab commit e2c8f9ad20ea354cd713bf274f92769ab3c845cd Author: Randy Dunlap Date: Sat Jul 4 01:55:26 2020 +0200 media: Documentation: userspace-api/media: dvb/audio: drop doubled word Drop the doubled word "and". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab commit fbb89ee65da81d51d4d8e4718710d2a3ff53bc5b Author: Randy Dunlap Date: Sat Jul 4 01:55:30 2020 +0200 media: Documentation: userspace-api/media: dvb/net: drop doubled word Drop the doubled word "and". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab commit f9b7dd05b7a5fb848eef6276db32bbb17b5000c7 Author: Randy Dunlap Date: Sat Jul 4 01:55:32 2020 +0200 media: Documentation: userspace-api/media: dvb/audio: drop doubled word Drop the doubled word "Any". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab commit 4d06867e7d420ee58c5008397f1dbafb099a84b7 Author: Randy Dunlap Date: Sat Jul 4 01:55:33 2020 +0200 media: Documentation: userspace-api/media: v4l/selection-api-config: drop doubled word Drop the doubled word "in". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab commit c5c91a1d0b17cba2d532157332ca2e65983a7dd5 Author: Randy Dunlap Date: Sat Jul 4 01:55:34 2020 +0200 media: Documentation: userspace-api/media: v4l/vidioc-g-ext-ctrls: drop doubled word Drop the doubled word "controls". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab commit 650ddad381caac23de0f4e538d4a45c902911cc4 Author: Randy Dunlap Date: Sat Jul 4 01:55:35 2020 +0200 media: Documentation: userspace-api/media: v4l/vidioc-g-output: drop doubled word Drop the doubled word "standard.". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab commit 33bbc0b35bbb77559246134cfc0ecc2e1a9126ea Author: Randy Dunlap Date: Sat Jul 4 01:55:36 2020 +0200 media: Documentation: userspace-api/media: v4l/vidioc-qbuf: drop doubled word Drop the doubled word "the". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab commit c302763139246d613d1c2693ae0b5b3830367d57 Author: Randy Dunlap Date: Sat Jul 4 01:55:31 2020 +0200 media: Documentation: userspace-api/media: dvb/video: drop doubled word Drop the doubled word "and". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab commit 08bbe2d882b3b97b9c453b7d4a9fca4b8c27d921 Author: Randy Dunlap Date: Sat Jul 4 01:55:29 2020 +0200 media: Documentation: userspace-api/media: dvb/dmx-qbuf: drop doubled word Drop the doubled word "the". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab commit eabed8f256426a2008bace782fdf6c9a5cb8020f Author: Randy Dunlap Date: Sat Jul 4 01:55:28 2020 +0200 media: Documentation: userspace-api/media: dvb/demux: drop doubled word Drop the doubled word "and". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab commit 4aab0a2d471837de024b1227103872816b20b82e Author: Randy Dunlap Date: Sat Jul 4 01:55:27 2020 +0200 media: Documentation: userspace-api/media: dvb/ca: drop doubled word Drop the doubled word "and". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab commit dc2286f397e69989c803abfdb0d75ae90b88c98c Merge: 6e5d8c713d1e0 4f6a36fed71df Author: Marc Zyngier Date: Fri Nov 27 11:47:08 2020 +0000 Merge branch 'kvm-arm64/vector-rework' into kvmarm-master/next Signed-off-by: Marc Zyngier commit 6e5d8c713d1e0d1e3efb327dd61fdf01ffd256db Merge: 8c38602fb3ebe 7521c3a9e6304 Author: Marc Zyngier Date: Fri Nov 27 11:46:47 2020 +0000 Merge branch 'kvm-arm64/pmu-undef' into kvmarm-master/next Signed-off-by: Marc Zyngier commit 7521c3a9e63041602d531e36c07a340f188dc1fa Author: Marc Zyngier Date: Fri Nov 13 16:42:08 2020 +0000 KVM: arm64: Get rid of the PMU ready state The PMU ready state has no user left. Goodbye. Reviewed-by: Alexandru Elisei Signed-off-by: Marc Zyngier commit 46acf89de499b2db07e120c62a796e8a0efbad8d Author: Marc Zyngier Date: Fri Nov 13 16:41:40 2020 +0000 KVM: arm64: Gate kvm_pmu_update_state() on the PMU feature We currently gate the update of the PMU state on the PMU being "ready". The "ready" state is only set to true when the first vcpu run is successful, and if it isn't, we never reach the update code. So the "ready" state is never the right thing to check for, and it should instead be the presence of the PMU feature, which makes a bit more sense. Reviewed-by: Alexandru Elisei Signed-off-by: Marc Zyngier commit a3da93580202ac9075d4e96f73c8435b9d7262c1 Author: Marc Zyngier Date: Thu Nov 12 18:50:06 2020 +0000 KVM: arm64: Remove dead PMU sysreg decoding code The handling of traps in access_pmu_evcntr() has a couple of omminous "else return false;" statements that don't make any sense: the decoding tree coverse all the registers that trap to this handler, and returning false implies that we change PC, which we don't. Get rid of what is evidently dead code. Reviewed-by: Alexandru Elisei Signed-off-by: Marc Zyngier commit f975ccb08d6530e58bac660c7a938f98bae5a651 Author: Marc Zyngier Date: Fri Nov 13 14:12:53 2020 +0000 KVM: arm64: Remove PMU RAZ/WI handling There is no RAZ/WI handling allowed for the PMU registers in the ARMv8 architecture. Nobody can remember how we cam to the conclusion that we could do this, but the ARMv8 ARM is pretty clear that we cannot. Remove the RAZ/WI handling of the PMU system registers when it is not configured. Reviewed-by: Alexandru Elisei Signed-off-by: Marc Zyngier commit b0737e999ec0af007b10ac0b7db97932394a248f Author: Marc Zyngier Date: Thu Nov 12 18:49:28 2020 +0000 KVM: arm64: Inject UNDEF on PMU access when no PMU configured The ARMv8 architecture says that in the absence of FEAT_PMUv3, all the PMU-related register generate an UNDEF. Let's make sure that all our PMU handers catch this case by hooking into check_pmu_access_disabled(), and add checks in a couple of other places. Note that we still cannot deliver an exception into the guest as the offending cases are already caught by the RAZ/WI handling. But this puts us one step away to architectural compliance. Reviewed-by: Alexandru Elisei Signed-off-by: Marc Zyngier commit 77da43039ab5cfc9631159fd87fe38d4c34cdaf5 Author: Marc Zyngier Date: Thu Nov 12 18:13:27 2020 +0000 KVM: arm64: Refuse illegal KVM_ARM_VCPU_PMU_V3 at reset time We accept to configure a PMU when a vcpu is created, even if the HW (or the host) doesn't support it. This results in failures when attributes get set, which is a bit odd as we should have failed the vcpu creation the first place. Move the check to the point where we check the vcpu feature set, and fail early if we cannot support a PMU. This further simplifies the attribute handling. Reviewed-by: Alexandru Elisei Signed-off-by: Marc Zyngier commit 04355e41a60338206d6498fe463a86131d5ca06b Author: Marc Zyngier Date: Thu Nov 12 18:00:30 2020 +0000 KVM: arm64: Set ID_AA64DFR0_EL1.PMUVer to 0 when no PMU support We always expose the HW view of PMU in ID_AA64FDR0_EL1.PMUver, even when the PMU feature is disabled, while the architecture says that FEAT_PMUv3 not being implemented should result in this field being zero. Let's follow the architecture's guidance. Reviewed-by: Alexandru Elisei Signed-off-by: Marc Zyngier commit 9bbfa4b565379eeb2fb8fdbcc9979549ae0e48d9 Author: Alexandru Elisei Date: Thu Nov 26 14:49:16 2020 +0000 KVM: arm64: Refuse to run VCPU if PMU is not initialized When enabling the PMU in kvm_arm_pmu_v3_enable(), KVM returns early if the PMU flag created is false and skips any other checks. Because PMU emulation is gated only on the VCPU feature being set, this makes it possible for userspace to get away with setting the VCPU feature but not doing any initialization for the PMU. Fix it by returning an error when trying to run the VCPU if the PMU hasn't been initialized correctly. The PMU is marked as created only if the interrupt ID has been set when using an in-kernel irqchip. This means the same check in kvm_arm_pmu_v3_enable() is redundant, remove it. Signed-off-by: Alexandru Elisei Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201126144916.164075-1-alexandru.elisei@arm.com commit 14bda7a927336055d7c0deb1483f9cdb687c2080 Author: Marc Zyngier Date: Fri Nov 13 16:39:44 2020 +0000 KVM: arm64: Add kvm_vcpu_has_pmu() helper There are a number of places where we check for the KVM_ARM_VCPU_PMU_V3 feature. Wrap this check into a new kvm_vcpu_has_pmu(), and use it at the existing locations. No functional change. Reviewed-by: Alexandru Elisei Signed-off-by: Marc Zyngier commit fd4ebb457c9ca90d10a74aeb85d54e27b08d5e76 Author: Jiri Olsa Date: Thu Nov 26 18:00:22 2020 +0100 perf build-id: Add build_id_cache__add function Adding build_id_cache__add function as core function that adds file into build id database. It will be set from another callers in following changes. Signed-off-by: Jiri Olsa Acked-by: Ian Rogers Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Andi Kleen Cc: Mark Rutland Cc: Michael Petlan Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20201126170026.2619053-22-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 75fb2af68e358324c2bdcb61be8376cffcb2d034 Author: Jiri Olsa Date: Thu Nov 26 18:00:20 2020 +0100 perf build-id: Add __perf_session__cache_build_ids function Adding __perf_session__cache_build_ids function as an interface for caching sessions build ids with callback function and its data pointer. Signed-off-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Andi Kleen Cc: Ian Rogers Cc: Mark Rutland Cc: Michael Petlan Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20201126170026.2619053-20-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 0b7b9e83c76ccffb994da8266110592e5e767718 Author: Jiri Olsa Date: Thu Nov 26 18:00:19 2020 +0100 perf build-id: Use machine__for_each_dso in perf_session__cache_build_ids Using machine__for_each_dso in perf_session__cache_build_ids, so we can reuse perf_session__cache_build_ids with different callback in following changes. Signed-off-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Andi Kleen Cc: Ian Rogers Cc: Mark Rutland Cc: Michael Petlan Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20201126170026.2619053-19-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 058f15113042bc2fa03b0b134bfc7fb8cd156878 Author: Jiri Olsa Date: Thu Nov 26 18:00:21 2020 +0100 perf data: Add is_perf_data function Adding is_perf_data function that returns true if the given path is perf data file. It will be used in following patches. Signed-off-by: Jiri Olsa Acked-by: Ian Rogers Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Andi Kleen Cc: Mark Rutland Cc: Michael Petlan Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20201126170026.2619053-21-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit ca8ea73ae109900cec4c3a1f0d3486a01a0e4434 Author: Jiri Olsa Date: Thu Nov 26 18:00:13 2020 +0100 perf symbols: Try to load vmlinux from buildid database Currently we don't check on kernel's vmlinux the same way as we do for normal binaries, but we either look for kallsyms file in build id database or check on known vmlinux locations (plus some other optional paths). This patch adds the check for standard build id binary location, so we are ready once we start to store it there from debuginfod in following changes. Signed-off-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Andi Kleen Cc: Ian Rogers Cc: Mark Rutland Cc: Michael Petlan Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20201126170026.2619053-13-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 031f112f8dc0f211b59b1b33032671f035edc25d Author: Jiri Olsa Date: Thu Nov 26 18:00:12 2020 +0100 perf tools: Use struct extra_kernel_map in machine__process_kernel_mmap_event Using struct extra_kernel_map in machine__process_kernel_mmap_event, to pass mmap details. This way we can used single function for all 3 mmap versions. Signed-off-by: Jiri Olsa Acked-by: Ian Rogers Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Andi Kleen Cc: Mark Rutland Cc: Michael Petlan Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20201126170026.2619053-12-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit af21c579c860d10da1b0620e3d5d14abdc0b5fff Author: Jiri Olsa Date: Thu Nov 26 18:00:11 2020 +0100 perf build-id: Add check for existing link in buildid dir When adding new build id link we fail if the link is already there. Adding check for existing link and output debug message that the build id is already linked. Signed-off-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Andi Kleen Cc: Ian Rogers Cc: Mark Rutland Cc: Michael Petlan Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20201126170026.2619053-11-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 7ac22b088afe26a42978ff7576730ca419da76aa Author: Jiri Olsa Date: Thu Nov 26 18:00:09 2020 +0100 perf tools: Add filename__decompress function Factor filename__decompress from decompress_kmodule function. It can decompress files with compressions supported in perf - xz and gz, the support needs to be compiled in. It will to be used in following changes to get build id out of compressed elf objects. Signed-off-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Andi Kleen Cc: Ian Rogers Cc: Mark Rutland Cc: Michael Petlan Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20201126170026.2619053-9-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit f45edd86b23a7dc576b881b3da53936ac9f8dffb Author: Jiri Olsa Date: Thu Nov 26 18:00:08 2020 +0100 perf tools: Add build_id__is_defined function Adding build_id__is_defined helper to check build id is defined and is != zero build id. Signed-off-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Andi Kleen Cc: Ian Rogers Cc: Mark Rutland Cc: Michael Petlan Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20201126170026.2619053-8-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit b3e453272d436aab8adbe810c6d7043670281487 Author: Jiri Olsa Date: Thu Nov 26 18:00:06 2020 +0100 tools lib: Adopt memchr_inv() from kernel We'll use it to check for undefined/zero data. Signed-off-by: Jiri Olsa Suggested-by: Arnaldo Carvalho de Melo Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Andi Kleen Cc: Ian Rogers Cc: Mark Rutland Cc: Michael Petlan Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20201126170026.2619053-6-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 8c38602fb3ebe12ff8c63588147ed1cfb6890733 Merge: 149f120edbf89 83fa381f66ccb Author: Marc Zyngier Date: Fri Nov 27 11:33:27 2020 +0000 Merge branch 'kvm-arm64/host-hvc-table' into kvmarm-master/next Signed-off-by: Marc Zyngier commit 149f120edbf89d894bd4e2c83ad7aa55c780d569 Merge: 37da329ed6a7f 6ac4a5ac50d1d Author: Marc Zyngier Date: Fri Nov 27 11:33:16 2020 +0000 Merge branch 'kvm-arm64/copro-no-more' into kvmarm-master/next Signed-off-by: Marc Zyngier commit 37da329ed6a7fd7d5c874ff99b9fc3a18e9c7c64 Merge: 09162bc32c880 90c1f934ed714 Author: Marc Zyngier Date: Fri Nov 27 11:33:10 2020 +0000 Merge branch 'kvm-arm64/el2-pc' into kvmarm-master/next Signed-off-by: Marc Zyngier commit 83fa381f66ccb025f9e182d0b2ef9cd53c1f33ab Author: Marc Zyngier Date: Sat Oct 24 10:56:55 2020 +0100 KVM: arm64: Avoid repetitive stack access on host EL1 to EL2 exception Registers x0/x1 get repeateadly pushed and poped during a host HVC call. Instead, leave the registers on the stack, trading a store instruction on the fast path for an add on the slow path. Reviewed-by: Alexandru Elisei Signed-off-by: Marc Zyngier commit 29052f1b92f2bcb0419c544459f4c919bfb20898 Author: Marc Zyngier Date: Wed Oct 21 21:52:54 2020 +0100 KVM: arm64: Simplify __kvm_enable_ssbs() Move the setting of SSBS directly into the HVC handler, using the C helpers rather than the inline asssembly code. Reviewed-by: Alexandru Elisei Signed-off-by: Marc Zyngier commit 68b824e428c5fb5c3dc5ef80b1543e767534b58e Author: Marc Zyngier Date: Sat Oct 24 16:33:38 2020 +0100 KVM: arm64: Patch kimage_voffset instead of loading the EL1 value Directly using the kimage_voffset variable is fine for now, but will become more problematic as we start distrusting EL1. Instead, patch the kimage_voffset into the HYP text, ensuring we don't have to load an untrusted value later on. Signed-off-by: Marc Zyngier commit 91f9c963ce79fcc34577fc008d54f633c3e11d42 Author: Enric Balletbo i Serra Date: Fri Nov 27 11:49:30 2020 +0100 arm64: dts: mt8183: Add display nodes for MT8183 Add display subsystem device nodes to allow video output. Signed-off-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20201127104930.1981497-4-enric.balletbo@collabora.com Signed-off-by: Matthias Brugger commit c6080916310b6d47bb7d75a5647a346ae7c4b56f Author: Enric Balletbo i Serra Date: Fri Nov 27 11:49:29 2020 +0100 arm64: dts: mt8183: Add iommu and larb nodes Add iommu and larb nodes to the MT8183. Signed-off-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20201127104930.1981497-3-enric.balletbo@collabora.com Signed-off-by: Matthias Brugger commit 88ec840270e62e18dac4bb678fb0823077378b8d Author: Jitao Shi Date: Fri Nov 27 11:49:28 2020 +0100 arm64: dts: mt8183: Add dsi node Add dsi and mipitx nodes to the MT8183. Signed-off-by: Jitao Shi Signed-off-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20201127104930.1981497-2-enric.balletbo@collabora.com Signed-off-by: Matthias Brugger commit f15722c0fef05a62d64ca1b1fc682f6f7396c108 Author: Hsin-Yi Wang Date: Tue Nov 24 12:12:54 2020 +0800 arm64: dts: mt8183: Add pwm and backlight node Add pwm to mt8183 and backlight to mt8183-kukui. Signed-off-by: Hsin-Yi Wang Tested-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20201124041253.4181273-1-hsinyi@chromium.org Signed-off-by: Matthias Brugger commit 8b0ff6650325ed7a166c2b971e9319e5b5facef0 Author: Geert Uytterhoeven Date: Thu Jun 4 11:40:30 2020 +0200 media: Remove superfluous dependency for MEDIA_SUPPORT_FILTER The MEDIA_SUPPORT_FILTER configuration option is located inside a block protected by "#if MEDIA_SUPPORT", so there is no need to have an explicit dependency on MEDIA_SUPPORT. Drop it. Fixes: c6774ee035dcb878 ("media: Kconfig: make filtering devices optional") Signed-off-by: Geert Uytterhoeven Signed-off-by: Mauro Carvalho Chehab commit a49d5e7a89d644a5c0ddc851be4bbf08614e6015 Author: Weiyi Lu Date: Fri Oct 30 12:36:22 2020 +0100 soc: mediatek: pm-domains: Add support for mt8192 Add the needed board data to support mt8192 SoC. Signed-off-by: Weiyi Lu Signed-off-by: Enric Balletbo i Serra Tested-by: Weiyi Lu Link: https://lore.kernel.org/r/20201030113622.201188-17-enric.balletbo@collabora.com Signed-off-by: Matthias Brugger commit c1f3163d8ff36f5b75d467bf95581b8f2319cd64 Author: Weiyi Lu Date: Fri Oct 30 12:36:21 2020 +0100 soc: mediatek: pm-domains: Add default power off flag For some power domain, like conn on MT8192, it should be default OFF. Because the power on/off control relies the function of connectivity chip and its firmware. And if project choose other chip vendor solution, those necessary connectivity functions will not provided. Signed-off-by: Weiyi Lu Signed-off-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20201030113622.201188-16-enric.balletbo@collabora.com Signed-off-by: Matthias Brugger commit eb9fa767fbe19d3db7d303e9fde7f3056221ffe1 Author: Matthias Brugger Date: Fri Oct 30 12:36:17 2020 +0100 soc: mediatek: pm-domains: Add support for mt8183 Add the needed board data to support mt8183 SoC. Signed-off-by: Matthias Brugger Signed-off-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20201030113622.201188-12-enric.balletbo@collabora.com Signed-off-by: Matthias Brugger commit 1d4597fa18b2e5d38deebdaa8121734a166a6c73 Author: Matthias Brugger Date: Fri Oct 30 12:36:15 2020 +0100 soc: mediatek: pm-domains: Allow bus protection to ignore clear ack In some cases the hardware does not create an acknowledgment of the bus protection clearing. Add a flag to the bus protection indicating that a clear event will be ignored. Signed-off-by: Matthias Brugger Signed-off-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20201030113622.201188-10-enric.balletbo@collabora.com Signed-off-by: Matthias Brugger commit 123e8b4fd0cd9999dd384bef1d7417da68fde962 Author: Matthias Brugger Date: Fri Oct 30 12:36:14 2020 +0100 soc: mediatek: pm-domains: Add subsystem clocks For the bus protection operations, some subsystem clocks need to be enabled before releasing the protection. This patch identifies the subsystem clocks by it's name. Suggested-by: Weiyi Lu [Adapted the patch to the mtk-pm-domains driver] Signed-off-by: Matthias Brugger Signed-off-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20201030113622.201188-9-enric.balletbo@collabora.com Signed-off-by: Matthias Brugger commit 58a17e310a1c638a71892506f14c1e09b326ed56 Author: Matthias Brugger Date: Fri Oct 30 12:36:13 2020 +0100 soc: mediatek: pm-domains: Add extra sram control For some power domains like vpu_core on MT8183 whose sram need to do clock and internal isolation while power on/off sram. We add a cap "MTK_SCPD_SRAM_ISO" to judge if we need to do the extra sram isolation control or not. Signed-off-by: Weiyi Lu Signed-off-by: Matthias Brugger Signed-off-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20201030113622.201188-8-enric.balletbo@collabora.com Signed-off-by: Matthias Brugger commit f414854c884364b8a563760054be615555a62b3a Author: Matthias Brugger Date: Fri Oct 30 12:36:12 2020 +0100 soc: mediatek: pm-domains: Add SMI block as bus protection block Apart from the infracfg block, the SMI block is used to enable the bus protection for some power domains. Add support for this block. Signed-off-by: Matthias Brugger Signed-off-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20201030113622.201188-7-enric.balletbo@collabora.com Signed-off-by: Matthias Brugger commit 928296ea5da37838d7127de4b10f47cd97401b13 Author: Matthias Brugger Date: Fri Oct 30 12:36:11 2020 +0100 soc: mediatek: pm_domains: Make bus protection generic Bus protection is not exclusively done by calling the infracfg misc driver. Make the calls for setting and clearing the bus protection generic so that we can use other blocks for it as well. Signed-off-by: Matthias Brugger Signed-off-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20201030113622.201188-6-enric.balletbo@collabora.com Signed-off-by: Matthias Brugger commit 916d6d71ba56cfc19a0bfd8a0e181443a13cb865 Author: Matthias Brugger Date: Fri Oct 30 12:36:10 2020 +0100 soc: mediatek: pm-domains: Add bus protection protocol Bus protection will need to update more then one register in infracfg. Add support for several operations. Signed-off-by: Matthias Brugger Signed-off-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20201030113622.201188-5-enric.balletbo@collabora.com Signed-off-by: Matthias Brugger commit 59b644b01cf48d6042f3c5983d464921a4920845 Author: Enric Balletbo i Serra Date: Fri Oct 30 12:36:08 2020 +0100 soc: mediatek: Add MediaTek SCPSYS power domains The System Control Processor System (SCPSYS) has several power management related tasks in the system. This driver implements support to handle the different power domains supported in order to meet high performance and low power requirements. Co-developed-by: Matthias Brugger Signed-off-by: Matthias Brugger Signed-off-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20201030113622.201188-3-enric.balletbo@collabora.com Signed-off-by: Matthias Brugger commit 2676a72aeaa189e8892b41f77071559a64f603e7 Merge: 63e5dcc033696 343106d9e6126 Author: Matthias Brugger Date: Fri Nov 27 12:04:34 2020 +0100 Merge tag 'v5.10-next-pm-domains-stable' into HEAD commit 63e5dcc03369602ec5c8165febfb64c37eb37b39 Merge: cc7a16b14f386 86b9d170da98b Author: Matthias Brugger Date: Fri Nov 27 12:04:26 2020 +0100 Merge tag 'ib-mfd-mediatek-v5.11' into HEAD Immutable branch between MFD and MediaTek due for the v5.11 merge window commit 37fb78b9aeb75d79f0bdfbbbdcb85ebb68ae1476 Author: Matthias Brugger Date: Fri Oct 30 12:36:19 2020 +0100 arm64: dts: mediatek: Add mt8183 power domains controller Add power domains controller node for SoC mt8183 Signed-off-by: Matthias Brugger Signed-off-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20201030113622.201188-14-enric.balletbo@collabora.com Signed-off-by: Matthias Brugger commit ddebdbad8149af123574b87596927437339318f7 Author: Enric Balletbo i Serra Date: Fri Oct 30 12:36:18 2020 +0100 arm64: dts: mediatek: Add smi_common node for MT8183 The SMI (Smart Multimedia Interface) Common is a bridge between the m4u (Multimedia Memory Management Unit) and the Multimedia HW. This block is needed to support different multimedia features, like display, video decode, and camera. Also is needed to control the power domains of such HW blocks. Signed-off-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20201030113622.201188-13-enric.balletbo@collabora.com Signed-off-by: Matthias Brugger commit 8b6562644df9de4e01387635f4d8bf3852d7ad92 Author: Enric Balletbo i Serra Date: Fri Oct 30 12:36:09 2020 +0100 arm64: dts: mediatek: Add mt8173 power domain controller Add power domain controller node for SoC mt8173. Signed-off-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20201030113622.201188-4-enric.balletbo@collabora.com Signed-off-by: Matthias Brugger commit 8d7d44f25cd82d0622b90cbb0df430be4bc68b9b Merge: 48489980e27e0 343106d9e6126 Author: Matthias Brugger Date: Fri Nov 27 12:01:31 2020 +0100 Merge tag 'v5.10-next-pm-domains-stable' into HEAD commit 343106d9e61260e4ac569c54dd19201b9e704d46 Author: Weiyi Lu Date: Fri Oct 30 12:36:20 2020 +0100 dt-bindings: power: Add MT8192 power domains Add power domains dt-bindings for MT8192. Signed-off-by: Weiyi Lu Signed-off-by: Enric Balletbo i Serra Acked-by: Rob Herring Link: https://lore.kernel.org/r/20201030113622.201188-15-enric.balletbo@collabora.com Signed-off-by: Matthias Brugger commit 86a378bb1e98793409e5decfef50edadbca659c5 Author: Enric Balletbo i Serra Date: Fri Oct 30 12:36:16 2020 +0100 dt-bindings: power: Add MT8183 power domains Add power domains dt-bindings for MT8183. Signed-off-by: Matthias Brugger Signed-off-by: Enric Balletbo i Serra Acked-by: Rob Herring Link: https://lore.kernel.org/r/20201030113622.201188-11-enric.balletbo@collabora.com Signed-off-by: Matthias Brugger commit d392fe78f50bc9e08ac6dfd976ad6e922704b1bf Author: Enric Balletbo i Serra Date: Fri Oct 30 12:36:07 2020 +0100 dt-bindings: power: Add bindings for the Mediatek SCPSYS power domains controller The System Control Processor System (SCPSYS) has several power management related tasks in the system. Add the bindings to define the power domains for the SCPSYS power controller. Co-developed-by: Matthias Brugger Signed-off-by: Matthias Brugger Signed-off-by: Enric Balletbo i Serra Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201030113622.201188-2-enric.balletbo@collabora.com Signed-off-by: Matthias Brugger commit 1b6b924efeb9e46f0ca2ebe5b9bb6b276defe52d Author: Zheng Zengkai Date: Thu Nov 26 22:38:15 2020 +0800 tomoyo: Fix null pointer check Since tomoyo_memory_ok() will check for null pointer returned by kzalloc() in tomoyo_assign_profile(), tomoyo_assign_namespace(), tomoyo_get_name() and tomoyo_commit_ok(), then emit OOM warnings if needed. And this is the expected behavior as informed by Tetsuo Handa. Let's add __GFP_NOWARN to kzalloc() in those related functions. Besides, to achieve this goal, remove the null check for entry right after kzalloc() in tomoyo_assign_namespace(). Reported-by: Hulk Robot Suggested-by: Tetsuo Handa Signed-off-by: Zheng Zengkai Signed-off-by: Tetsuo Handa commit fbef89886da6d7735d20fdde16a1ee6ed6c6ab56 Author: Sameer Puri Date: Mon Apr 13 17:51:47 2020 +0200 media: i2c: imx219: remove redundant writes These writes to 0x162, 0x163 already appear earlier in the struct for the 1920x1080 mode and do not need to be repeated. Signed-off-by: Sameer Puri Reviewed-by: Dave Stevenson Signed-off-by: Mauro Carvalho Chehab commit 6814e218b9c0fc3a1a6aaf8ee186f7e91968173c Author: Colin Ian King Date: Fri Apr 10 13:39:13 2020 +0200 media: mantis: remove redundant assignment to variable err The variable err is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Mauro Carvalho Chehab commit 706657b1febf446a9ba37dc51b89f46604f57ee9 Author: Borislav Petkov Date: Sun Nov 22 15:57:21 2020 +0100 EDAC/amd64: Fix PCI component registration In order to setup its PCI component, the driver needs any node private instance in order to get a reference to the PCI device and hand that into edac_pci_create_generic_ctl(). For convenience, it uses the 0th memory controller descriptor under the assumption that if any, the 0th will be always present. However, this assumption goes wrong when the 0th node doesn't have memory and the driver doesn't initialize an instance for it: EDAC amd64: F17h detected (node 0). ... EDAC amd64: Node 0: No DIMMs detected. But looking up node instances is not really needed - all one needs is the pointer to the proper device which gets discovered during instance init. So stash that pointer into a variable and use it when setting up the EDAC PCI component. Clear that variable when the driver needs to unwind due to some instances failing init to avoid any registration imbalance. Cc: Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201122150815.13808-1-bp@alien8.de commit a787bdaff83a085288b6fc607afb4bb648da3cc9 Merge: 2914b0ba61a9d 85a2c56cb4454 Author: Ingo Molnar Date: Fri Nov 27 11:09:57 2020 +0100 Merge branch 'linus' into sched/core, to resolve semantic conflict Signed-off-by: Ingo Molnar commit c7a5899eb26e2a4d516d53f65b6dd67be2228041 Author: Antony Antony Date: Tue Nov 17 17:47:23 2020 +0100 xfrm: redact SA secret with lockdown confidentiality redact XFRM SA secret in the netlink response to xfrm_get_sa() or dumpall sa. Enable lockdown, confidentiality mode, at boot or at run time. e.g. when enabled: cat /sys/kernel/security/lockdown none integrity [confidentiality] ip xfrm state src 172.16.1.200 dst 172.16.1.100 proto esp spi 0x00000002 reqid 2 mode tunnel replay-window 0 aead rfc4106(gcm(aes)) 0x0000000000000000000000000000000000000000 96 note: the aead secret is redacted. Redacting secret is also a FIPS 140-2 requirement. v1->v2 - add size checks before memset calls v2->v3 - replace spaces with tabs for consistency v3->v4 - use kernel lockdown instead of a /proc setting v4->v5 - remove kconfig option Reviewed-by: Stephan Mueller Signed-off-by: Antony Antony Signed-off-by: Steffen Klassert commit 9b1b0cb0636166187478ef68d5b95f5caea062ec Author: Dan Carpenter Date: Wed Mar 4 15:23:12 2020 +0100 media: max2175: fix max2175_set_csm_mode() error code This is supposed to return negative error codes but the type is bool so it returns true instead. Fixes: b47b79d8a231 ("[media] media: i2c: max2175: Add MAX2175 support") Signed-off-by: Dan Carpenter Signed-off-by: Mauro Carvalho Chehab commit 1dac4585f585d3aa1a5af4821128ea2642700e48 Author: Jinyang He Date: Wed Nov 25 18:11:02 2020 +0800 MIPS: Loongson64: Fix up reserving kernel memory range Reserve memory from &_text to &_end. Otherwise if kernel address was modified, the memory range of start_pfn to kernel_start_pfn would be reserved. Then we could not use this range. Signed-off-by: Jinyang He Signed-off-by: Thomas Bogendoerfer commit 915d8aac69d32bf4272a015bf7bf3516deeaad5e Author: Thomas Bogendoerfer Date: Fri Nov 27 10:53:32 2020 +0100 MIPS: mm: Remove unused is_aligned_hugepage_range Function is_aligned_hugepage_range is no longer needed. Signed-off-by: Thomas Bogendoerfer commit 405a43cc00471d9f06c58704448f1a43e331826a Author: Lu Baolu Date: Fri Nov 27 09:33:08 2020 +0800 iommu/vt-d: Remove set but not used variable Fixes gcc '-Wunused-but-set-variable' warning: drivers/iommu/intel/iommu.c:5643:27: warning: variable 'last_pfn' set but not used [-Wunused-but-set-variable] 5643 | unsigned long start_pfn, last_pfn; | ^~~~~~~~ This variable is never used, so remove it. Fixes: 2a2b8eaa5b25 ("iommu: Handle freelists when using deferred flushing in iommu drivers") Reported-by: kernel test robot Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20201127013308.1833610-1-baolu.lu@linux.intel.com Signed-off-by: Will Deacon commit dc10472baf6d55eda47d54c2ca8b7aaefbe1e799 Author: Dan Carpenter Date: Tue Jan 14 06:10:05 2020 +0100 media: c8sectpfe: clean up some indenting The "seg_num," line wasn't indented. All the arguments can fit nicely on two lines. Signed-off-by: Dan Carpenter Reviewed-by: Patrice Chotard Signed-off-by: Mauro Carvalho Chehab commit cbab54d9c2b2a73abe541790df28add14b2385bd Author: Tiezhu Yang Date: Wed Nov 25 18:11:30 2020 +0800 MIPS: No need to check CPU 0 in {loongson3,bmips,octeon}_cpu_disable() After commit 9cce844abf07 ("MIPS: CPU#0 is not hotpluggable"), c->hotpluggable is 0 for CPU 0 and it will not generate a control file in sysfs for this CPU: [root@linux loongson]# cat /sys/devices/system/cpu/cpu0/online cat: /sys/devices/system/cpu/cpu0/online: No such file or directory [root@linux loongson]# echo 0 > /sys/devices/system/cpu/cpu0/online bash: /sys/devices/system/cpu/cpu0/online: Permission denied So no need to check CPU 0 in {loongson3,bmips,octeon}_cpu_disable(), just remove them. Signed-off-by: Tiezhu Yang Acked-by: Florian Fainelli Signed-off-by: Thomas Bogendoerfer commit f0e82242b16826077a2775eacfe201d803bb7a22 Author: Qinglang Miao Date: Fri Nov 20 15:48:47 2020 +0800 mips: cdmm: fix use-after-free in mips_cdmm_bus_discover kfree(dev) has been called inside put_device so anther kfree would cause a use-after-free bug/ Fixes: 8286ae03308c ("MIPS: Add CDMM bus support") Reported-by: Hulk Robot Signed-off-by: Qinglang Miao Acked-by: Serge Semin Signed-off-by: Thomas Bogendoerfer commit 7679325702c90aecd393cd7cde685576c14489c0 Author: Barry Song Date: Mon Nov 16 19:08:48 2020 +1300 selftests/dma: add test application for DMA_MAP_BENCHMARK This patch provides the test application for DMA_MAP_BENCHMARK. Before running the test application, we need to bind a device to dma_map_ benchmark driver. For example, unbind "xxx" from its original driver and bind to dma_map_benchmark: echo dma_map_benchmark > /sys/bus/platform/devices/xxx/driver_override echo xxx > /sys/bus/platform/drivers/xxx/unbind echo xxx > /sys/bus/platform/drivers/dma_map_benchmark/bind Another example for PCI devices: echo dma_map_benchmark > /sys/bus/pci/devices/0000:00:01.0/driver_override echo 0000:00:01.0 > /sys/bus/pci/drivers/xxx/unbind echo 0000:00:01.0 > /sys/bus/pci/drivers/dma_map_benchmark/bind The below command will run 16 threads on numa node 0 for 10 seconds on the device bound to dma_map_benchmark platform_driver or pci_driver: ./dma_map_benchmark -t 16 -s 10 -n 0 dma mapping benchmark: threads:16 seconds:10 average map latency(us):1.1 standard deviation:1.9 average unmap latency(us):0.5 standard deviation:0.8 Cc: Will Deacon Cc: Shuah Khan Cc: Christoph Hellwig Cc: Marek Szyprowski Cc: Robin Murphy Signed-off-by: Barry Song Signed-off-by: Christoph Hellwig commit 65789daa8087e125927230ccb7e1eab13999b0cf Author: Barry Song Date: Mon Nov 16 19:08:47 2020 +1300 dma-mapping: add benchmark support for streaming DMA APIs Nowadays, there are increasing requirements to benchmark the performance of dma_map and dma_unmap particually while the device is attached to an IOMMU. This patch enables the support. Users can run specified number of threads to do dma_map_page and dma_unmap_page on a specific NUMA node with the specified duration. Then dma_map_benchmark will calculate the average latency for map and unmap. A difficulity for this benchmark is that dma_map/unmap APIs must run on a particular device. Each device might have different backend of IOMMU or non-IOMMU. So we use the driver_override to bind dma_map_benchmark to a particual device by: For platform devices: echo dma_map_benchmark > /sys/bus/platform/devices/xxx/driver_override echo xxx > /sys/bus/platform/drivers/xxx/unbind echo xxx > /sys/bus/platform/drivers/dma_map_benchmark/bind For PCI devices: echo dma_map_benchmark > /sys/bus/pci/devices/0000:00:01.0/driver_override echo 0000:00:01.0 > /sys/bus/pci/drivers/xxx/unbind echo 0000:00:01.0 > /sys/bus/pci/drivers/dma_map_benchmark/bind Cc: Will Deacon Cc: Shuah Khan Cc: Christoph Hellwig Cc: Marek Szyprowski Cc: Robin Murphy Signed-off-by: Barry Song [hch: folded in two fixes from Colin Ian King ] Signed-off-by: Christoph Hellwig commit 819b70ad620119d21a9e4be6ad665ece26fc0db8 Author: tangjianqiang Date: Tue Nov 24 18:40:19 2020 +0800 dma-contiguous: fix a typo error in a comment Fix a typo error in cma description comment: "then" -> "than". Signed-off-by: tangjianqiang Signed-off-by: Christoph Hellwig commit 94035edcb4e3bbc9f445bee706722ef64e044095 Author: Tiezhu Yang Date: Sat Nov 7 18:03:12 2020 +0800 dma-pool: no need to check return value of debugfs_create functions When calling debugfs functions, there 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. Signed-off-by: Tiezhu Yang Reviewed-by: Robin Murphy Signed-off-by: Christoph Hellwig commit bf6e2d562bbc4d115cf322b0bca57fe5bbd26f48 Author: Alexey Kardashevskiy Date: Thu Oct 29 12:52:41 2020 +1100 powerpc/dma: Fallback to dma_ops when persistent memory present So far we have been using huge DMA windows to map all the RAM available. The RAM is normally mapped to the VM address space contiguously, and there is always a reasonable upper limit for possible future hot plugged RAM which makes it easy to map all RAM via IOMMU. Now there is persistent memory ("ibm,pmemory" in the FDT) which (unlike normal RAM) can map anywhere in the VM space beyond the maximum RAM size and since it can be used for DMA, it requires extending the huge window up to MAX_PHYSMEM_BITS which requires hypervisor support for: 1. huge TCE tables; 2. multilevel TCE tables; 3. huge IOMMU pages. Certain hypervisors cannot do either so the only option left is restricting the huge DMA window to include only RAM and fallback to the default DMA window for persistent memory. This defines arch_dma_map_direct/etc to allow generic DMA code perform additional checks on whether direct DMA is still possible. This checks if the system has persistent memory. If it does not, the DMA bypass mode is selected, i.e. * dev->bus_dma_limit = 0 * dev->dma_ops_bypass = true <- this avoid calling dma_ops for mapping. If there is such memory, this creates identity mapping only for RAM and sets the dev->bus_dma_limit to let the generic code decide whether to call into the direct DMA or the indirect DMA ops. This should not change the existing behaviour when no persistent memory as dev->dma_ops_bypass is expected to be set. Signed-off-by: Alexey Kardashevskiy Acked-by: Michael Ellerman Signed-off-by: Christoph Hellwig commit 8d8d53cf8fd028310b1189165b939cde124895d7 Author: Alexey Kardashevskiy Date: Thu Oct 29 12:52:40 2020 +1100 dma-mapping: Allow mixing bypass and mapped DMA operation At the moment we allow bypassing DMA ops only when we can do this for the entire RAM. However there are configs with mixed type memory where we could still allow bypassing IOMMU in most cases; POWERPC with persistent memory is one example. This adds an arch hook to determine where bypass can still work and we invoke direct DMA API. The following patch checks the bus limit on POWERPC to allow or disallow direct mapping. This adds a ARCH_HAS_DMA_MAP_DIRECT config option to make the arch_xxxx hooks no-op by default. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Christoph Hellwig commit a307a4ce9ecd2e23c71318201330d9d648b3f818 Author: Jinyang He Date: Wed Nov 25 18:07:46 2020 +0800 MIPS: Loongson64: Add KASLR support Provide a weak plat_get_fdt() in relocate.c in case some platform enable USE_OF while plat_get_fdt() is useless. 1MB RELOCATION_TABLE_SIZE is small for Loongson64 because too many instructions should be relocated. 2MB is enough in present. Add KASLR support for Loongson64. KASLR(kernel address space layout randomization) To enable KASLR on Loongson64: First, make loongson3_defconfig. Then, enable CONFIG_RELOCATABLE and CONFIG_RANDOMIZE_BASE. Finally, compile the kernel. To test KASLR on Loongson64: Start machine with KASLR kernel. The first time: # cat /proc/iomem 00200000-0effffff : System RAM 02f30000-03895e9f : Kernel code 03895ea0-03bc7fff : Kernel data 03e30000-04f43f7f : Kernel bss The second time: # cat /proc/iomem 00200000-0effffff : System RAM 022f0000-02c55e9f : Kernel code 02c55ea0-02f87fff : Kernel data 031f0000-04303f7f : Kernel bss We see that code, data and bss sections become randomize. Signed-off-by: Jinyang He Signed-off-by: Thomas Bogendoerfer commit 7ae53081901b52cebfdd5b39b373abaac5d1d4ef Author: zhong jiang Date: Wed Oct 9 16:55:24 2019 +0200 media: uvcvideo: Use DIV_ROUND_CLOSEST directly to make it readable The kernel.h macro DIV_ROUND_CLOSEST performs the computation (x + d/2)/d but is perhaps more readable. Signed-off-by: zhong jiang Signed-off-by: Mauro Carvalho Chehab commit 74a2810b7c1fcd60c87a8c47f95660628e00e97c Author: Jinyang He Date: Wed Nov 25 18:07:18 2020 +0800 MIPS: KASLR: Correct valid bits in apply_r_mips_26_rel() Apply_r_mips_26_rel() relocates instructions like j, jal and etc. These instructions consist of 6bits function field and 26bits address field. The value of target_addr as follows, ================================================================= | high 4bits | low 28bits | ================================================================= |the high 4bits of this PC | the low 26bits of instructions << 2| ================================================================= Thus, loc_orig and log_new both need high 4bits rather than high 6bits. Signed-off-by: Jinyang He Signed-off-by: Thomas Bogendoerfer commit 48489980e27e091c9e871a48157ceda2db855974 Author: Seiya Wang Date: Fri Oct 30 17:22:07 2020 +0800 arm64: dts: Add Mediatek SoC MT8192 and evaluation board dts and Makefile Add basic chip support for Mediatek MT8192 Signed-off-by: Seiya Wang Link: https://lore.kernel.org/r/20201030092207.26488-2-seiya.wang@mediatek.com Signed-off-by: Matthias Brugger commit eeb76afbe8d91e112396c6281cd020725160f006 Author: Daniel Gomez Date: Thu Oct 3 16:46:24 2019 +0200 media: imx214: Fix stop streaming Stop video streaming when requested. When s_stream is called to stop the video streaming, if/else condition calls start_streaming function instead of the one for stopping it. Fixes: 436190596241 ("media: imx214: Add imx214 camera sensor driver") Signed-off-by: Daniel Gomez Signed-off-by: Ricardo Ribalda Signed-off-by: Mauro Carvalho Chehab commit 7f1e3823ba03a60dd61731ed752f08790806e74d Author: Fabien Parent Date: Tue Oct 27 20:48:15 2020 +0100 arm64: dts: mediatek: add MT8167 pumpkin board dts The pumpkin board is made by Gossamer Engineering and is using a MediaTek SoC. The board currently comes in two available version: MT8516 SoC and MT8167 SoC. The board provides the following IOs: eMMC, NAND, SD card, USB type-A, Ethernet, Wi-Fi, Bluetooth, Audio (jack out, 2 PDM port, 1 analog in), serial over USB, HDMI, DSI, CSI, and an expansion header. The board can be powered by battery and/or via a USB Type-C port and is using a PMIC MT6392. The eMMC and NAND are sharing pins and cannot be used together. This commit is adding the basic boot support for the Pumpkin MT8167 board. Signed-off-by: Fabien Parent Link: https://lore.kernel.org/r/20201027194816.1227654-3-fparent@baylibre.com Signed-off-by: Matthias Brugger commit 08d73b65abaf154a5d685d5dcd208d191115b24d Author: Fabien Parent Date: Tue Oct 27 20:48:14 2020 +0100 arm64: dts: mediatek: add dtsi for MT8167 The MT8167 SoC provides the following peripherals: GPIO, UART, USB2, SPI, eMMC, SDIO, NAND, Flash, ADC, I2C, PWM, TImers, IR, Ethernet, Audio (I2S, SPDIF, TDM, HDMI), HDMI, DSI, CSI, MDP (Multimedia Data Path), Video encoding (H.264), Video Decoding (H.264, VP8). The MT8167 is compatible with MT8516 but provides multimedia IPs to it. This commit is just adding the basic dtsi file with the support of the following IOs: GPIO, Clocks. Signed-off-by: Fabien Parent Link: https://lore.kernel.org/r/20201027194816.1227654-2-fparent@baylibre.com Signed-off-by: Matthias Brugger commit 6d5af8c9062780889e66281a8dfbe4961b7a0cf5 Author: Fabien Parent Date: Tue Oct 27 20:48:13 2020 +0100 dt-bindings: arm64: dts: mediatek: Add mt8167-pumpkin board Add binding documentation for the MT8167 Pumpkin board. Signed-off-by: Fabien Parent Acked-by: Rob Herring Link: https://lore.kernel.org/r/20201027194816.1227654-1-fparent@baylibre.com Signed-off-by: Matthias Brugger commit 17fb46bf56864d7a2020f06ff549d5fa8b4426d7 Author: Fabien Parent Date: Fri Oct 16 19:18:37 2020 +0200 arm64: dts: mediatek: mt8516: add efuse node Add node to support e-fuses on MT8516 Signed-off-by: Fabien Parent Link: https://lore.kernel.org/r/20201016171837.3261310-2-fparent@baylibre.com Signed-off-by: Matthias Brugger commit 0f80b9b8126cf3e352aa6b270ed24c9cd9a6272b Author: Yuya Hamamachi Date: Wed Nov 25 16:33:03 2020 +0900 arm64: dts: renesas: r8a77951: Add PCIe EP nodes Add PCIe EP nodes for R8A77951 SoC dtsi. Signed-off-by: Yuya Hamamachi Link: https://lore.kernel.org/r/20201125073303.19057-3-yuya.hamamachi.sx@renesas.com Signed-off-by: Geert Uytterhoeven commit e73fd3f265f84a22e93476db2498a4cd4dd255c5 Author: Krzysztof Kozlowski Date: Fri Nov 20 17:21:33 2020 +0100 mfd: twl6030: Mark of_device_id table as maybe unused The driver references of_device_id table via of_match_device() so it will be unused for !CONFIG_OF builds: drivers/mfd/twl6030-irq.c:359:34: warning: ‘twl6030_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Lee Jones commit 06b324fc856941a487f4ae3b58157f907ceb9309 Author: Krzysztof Kozlowski Date: Fri Nov 20 17:21:32 2020 +0100 mfd: axp20x: Skip of_device_id table when !CONFIG_OF The driver can match either via ACPI or OF. Its of_device_id table is referenced via of_match_ptr() so it will be unused for !CONFIG_OF builds: drivers/mfd/axp20x-i2c.c:60:34: warning: ‘axp20x_i2c_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Acked-by: Chen-Yu Tsai Signed-off-by: Lee Jones commit 7b64f24595f04b3b467b1e6f3617a114cc2cb8ca Author: Krzysztof Kozlowski Date: Fri Nov 20 17:21:31 2020 +0100 mfd: wm8994: Drop of_match_ptr from of_device_id table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant here). This fixes compile warning (!CONFIG_OF on x86_64): drivers/mfd/wm8994-core.c:618:34: warning: ‘wm8994_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Acked-by: Charles Keepax Signed-off-by: Lee Jones commit cc5b7ebe45f3cecf5571a30125f62709aa494a8a Author: Krzysztof Kozlowski Date: Fri Nov 20 17:21:30 2020 +0100 mfd: sun4i: Drop of_match_ptr from of_device_id table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant here). This fixes compile warning (!CONFIG_OF on x86_64): drivers/mfd/sun4i-gpadc.c:79:34: warning: ‘sun4i_gpadc_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Lee Jones commit 608a4758575df01076e550ceb1a97fa326e19e63 Author: Krzysztof Kozlowski Date: Fri Nov 20 17:21:26 2020 +0100 mfd: max77686: Drop of_match_ptr from of_device_id table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant here). This fixes compile warning (!CONFIG_OF on x86_64): drivers/mfd/max77686.c:148:34: warning: ‘max77686_pmic_dt_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Acked-by: Chanwoo Choi Signed-off-by: Lee Jones commit a06d0dc4fe73d06cd95b771a73fc7cda291466fc Author: Krzysztof Kozlowski Date: Fri Nov 20 17:21:29 2020 +0100 mfd: stmfx: Drop of_match_ptr from of_device_id table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant here). This fixes compile warning (!CONFIG_OF on x86_64): drivers/mfd/stmfx.c:542:34: warning: ‘stmfx_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Lee Jones commit a232bcd20108e337ba9a102c935cf3e8e96f348e Author: Krzysztof Kozlowski Date: Fri Nov 20 17:21:28 2020 +0100 mfd: rt5033: Drop of_match_ptr from of_device_id table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant here). This fixes compile warning (!CONFIG_OF on x86_64): drivers/mfd/rt5033.c:116:34: warning: ‘rt5033_dt_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Lee Jones commit 4fae30103194226eb29ee118ac74e83d2a7bde6e Author: Krzysztof Kozlowski Date: Fri Nov 20 17:21:27 2020 +0100 mfd: mt6397: Drop of_match_ptr from of_device_id table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant here). This fixes compile warning (!CONFIG_OF on x86_64): drivers/mfd/mt6397-core.c:214:34: warning: ‘mt6397_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Lee Jones commit 4dfdc9a8f136b6198db4ae416c265b1875dc487c Author: Krzysztof Kozlowski Date: Fri Nov 20 17:21:25 2020 +0100 mfd: max77650: Drop of_match_ptr from of_device_id table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant here). This fixes compile warning (!CONFIG_OF on x86_64): drivers/mfd/max77650.c:215:34: warning: ‘max77650_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Lee Jones commit 130e085a3380f2df12ae9502d709187e254bde0e Author: Krzysztof Kozlowski Date: Fri Nov 20 17:21:24 2020 +0100 mfd: fsl-imx25: Drop of_match_ptr from of_device_id table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant here). This fixes compile warning (!CONFIG_OF on x86_64): drivers/mfd/fsl-imx25-tsadc.c:190:34: warning: ‘mx25_tsadc_ids’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Lee Jones commit e9063fee2beadd0483b24533965d1ec07f3b83a0 Author: Krzysztof Kozlowski Date: Fri Nov 20 17:21:23 2020 +0100 mfd: ene-kb3930: Drop of_match_ptr from of_device_id table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant here). This fixes compile warning (!CONFIG_OF on x86_64): drivers/mfd/ene-kb3930.c:194:34: warning: ‘kb3930_dt_ids’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Lee Jones commit 98a6521c352fc764581f0317842c5520bb616c16 Author: Krzysztof Kozlowski Date: Fri Nov 20 17:21:22 2020 +0100 mfd: da9150: Drop of_match_ptr from of_device_id table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant here). This fixes compile warning (!CONFIG_OF on x86_64): drivers/mfd/da9150-core.c:505:34: warning: ‘da9150_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Lee Jones commit 5f2bf438000073aa81341ec4ff28bfa02602eced Author: Krzysztof Kozlowski Date: Fri Nov 20 17:21:21 2020 +0100 mfd: da9063: Drop of_match_ptr from of_device_id table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant here). This fixes compile warning (!CONFIG_OF on x86_64): drivers/mfd/da9063-i2c.c:348:34: warning: ‘da9063_dt_ids’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Lee Jones commit b62a16a51ae0bdf8fa8c360d5e993a4e24eed465 Author: Krzysztof Kozlowski Date: Fri Nov 20 17:21:20 2020 +0100 mfd: da9062: Drop of_match_ptr from of_device_id table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant here). This fixes compile warning (!CONFIG_OF on x86_64): drivers/mfd/da9062-core.c:614:34: warning: ‘da9062_dt_ids’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Lee Jones commit 62e7407349f52c35fd6479ff871f4259fea27cff Author: Krzysztof Kozlowski Date: Fri Nov 20 17:21:19 2020 +0100 mfd: da9055: Drop of_match_ptr from of_device_id table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant here). This fixes compile warning (!CONFIG_OF on x86_64): drivers/mfd/da9055-i2c.c:66:34: warning: ‘da9055_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Lee Jones commit b0ad7ebe30c085158925dd71672282e6480d4d65 Author: Krzysztof Kozlowski Date: Fri Nov 20 17:21:18 2020 +0100 mfd: bcm590xx: Drop of_match_ptr from of_device_id table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant here). This fixes compile warning (!CONFIG_OF on x86_64): drivers/mfd/bcm590xx.c:95:34: warning: ‘bcm590xx_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Lee Jones commit 7a69a6f68da5084e7f42df18bbc3b38f3785cccf Author: Krzysztof Kozlowski Date: Sun Nov 22 13:01:33 2020 +0100 mfd: omap-usb: Depend on COMMON_CLK to fix compile tests The MFD_OMAP_USB_HOST uses Common Clock Framework thus it cannot be built on platforms without it (e.g. compile test on MIPS with LANTIQ): mips-linux-ld: drivers/mfd/omap-usb-host.o: in function `usbhs_omap_probe': omap-usb-host.c:(.text+0x940): undefined reference to `clk_set_parent' Reported-by: kernel test robot Signed-off-by: Krzysztof Kozlowski Signed-off-by: Lee Jones commit f31cc6afabed4487956118af1ebe3ac603fa92b8 Author: Michael Brunner Date: Mon Nov 16 06:42:24 2020 +0000 mfd: kempld-core: Check for DMI definition before ACPI Change the detection order to priorize DMI table entries over available ACPI entries. This makes it more easy for product developers to patch product specific handling into the driver. Furthermore it allows to simplify the implementation a bit and especially to remove the need to force synchronous probing. Signed-off-by: Michael Brunner Reviewed-by: Guenter Roeck Signed-off-by: Lee Jones commit 129989d5ca63884572d22a5a271d93d0eddf8a52 Author: Dmitry Osipenko Date: Sun Nov 15 23:45:05 2020 +0300 mfd: tps65910: Correct power-off programming sequence Correct power-off programming sequence in order to fix shutting down devices which are using TPS65910 PMIC. In accordance to the TPS65910 datasheet, the PMIC's state-machine transitions into the OFF state only when DEV_OFF bit of DEVCTRL_REG is set. The ON / SLEEP states also should be cleared, otherwise PMIC won't get into a proper state on shutdown. Devices like Nexus 7 tablet and Ouya game console are shutting down properly now. Tested-by: Peter Geis Tested-by: Zack Pearsall Signed-off-by: Dmitry Osipenko Signed-off-by: Lee Jones commit d12edf9661a408d04efc9c0a4ff9a15413195d8a Author: Zou Wei Date: Sat Nov 14 17:24:20 2020 +0800 mfd: altera-sysmgr: Use resource_size function on resource object drivers/mfd/altera-sysmgr.c:155:36-39: WARNING: Suspicious code. resource_size is maybe missing with res Generated by: scripts/coccinelle/api/resource_size.cocci Signed-off-by: Zou Wei Signed-off-by: Lee Jones commit 9c60cc797cf72e95bb39f32316e9f0e5f85435f9 Author: Antti Palosaari Date: Sat Aug 17 03:12:10 2019 +0200 media: msi2500: assign SPI bus number dynamically SPI bus number must be assigned dynamically for each device, otherwise it will crash when multiple devices are plugged to system. Reported-and-tested-by: syzbot+c60ddb60b685777d9d59@syzkaller.appspotmail.com Cc: stable@vger.kernel.org Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab commit 3ec7fdc58363bb204c75d6158e3560fd7cabbf5c Author: Jia-Ju Bai Date: Mon Jul 29 12:14:44 2019 +0200 media: usb: msi2500: Fix a possible null-pointer dereference in msi2500_stop_streaming() In msi2500_stop_streaming(), there is an if statement on line 870 to check whether dev->udev is NULL: if (dev->udev) When dev->udev is NULL, it is used on line 877: msi2500_ctrl_msg(dev, CMD_STOP_STREAMING, 0) usb_control_msg(dev->udev, usb_sndctrlpipe(dev->udev, 0), ...) Thus, a possible null-pointer dereference may occur. To fix this bug, dev->udev is checked before calling msi2500_ctrl_msg(). This bug is found by a static analysis tool STCheck written by us. Signed-off-by: Jia-Ju Bai Signed-off-by: Mauro Carvalho Chehab commit bf9d46f751e75bf3d9a48bd69675f95d86ff7eb9 Author: Nishka Dasgupta Date: Tue Jul 16 07:38:31 2019 +0200 media: platform: sti: c8sectpfe: core: Add of_node_put() at goto Each iteration of for_each_child_of_node puts the previous node, but in the case of a goto from the middle of the loop, there is no put, thus causing a memory leak. Hence add a new label that puts the last used node, and edit the goto statements in the middle of the loop to first go to the new label. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Acked-by: Patrice Chotard Signed-off-by: Mauro Carvalho Chehab commit d0ac1a26ed5943127cb0156148735f5f52a07075 Author: Mauro Carvalho Chehab Date: Fri Nov 27 07:40:21 2020 +0100 media: gp8psk: initialize stats at power control logic As reported on: https://lore.kernel.org/linux-media/20190627222020.45909-1-willemdebruijn.kernel@gmail.com/ if gp8psk_usb_in_op() returns an error, the status var is not initialized. Yet, this var is used later on, in order to identify: - if the device was already started; - if firmware has loaded; - if the LNBf was powered on. Using status = 0 seems to ensure that everything will be properly powered up. So, instead of the proposed solution, let's just set status = 0. Reported-by: syzbot Reported-by: Willem de Bruijn Signed-off-by: Mauro Carvalho Chehab commit 05c2a705917b77e0915cca3551583583f4eafcf8 Author: Gilad Ben-Yossef Date: Sun Nov 22 09:51:53 2020 +0200 crypto: ccree - rework cache parameters handling Rework the setting of DMA cache parameters, program more appropriate values and explicitly set sharability domain. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu commit aeb4d8c0f855304c158195ebae3917e244e63e57 Author: Christophe JAILLET Date: Sat Nov 21 08:56:47 2020 +0100 crypto: cavium - Use dma_set_mask_and_coherent to simplify code 'pci_set_dma_mask()' + 'pci_set_consistent_dma_mask()' can be replaced by an equivalent 'dma_set_mask_and_coherent()' which is much less verbose. Signed-off-by: Christophe JAILLET Signed-off-by: Herbert Xu commit 7f6c383b9505f7f9ec75831b154be97e7df49cac Author: Christophe JAILLET Date: Sat Nov 21 08:49:16 2020 +0100 crypto: marvell/octeontx - Use dma_set_mask_and_coherent to simplify code 'pci_set_dma_mask()' + 'pci_set_consistent_dma_mask()' can be replaced by an equivalent 'dma_set_mask_and_coherent()' which is much less verbose. Signed-off-by: Christophe JAILLET Signed-off-by: Herbert Xu commit d4f9afb23378f50e40cd3bc8aee35679bfd1d27b Author: Christophe JAILLET Date: Sat Nov 21 08:31:31 2020 +0100 crypto: cavium/zip - Use dma_set_mask_and_coherent to simplify code 'pci_set_dma_mask()' + 'pci_set_consistent_dma_mask()' can be replaced by an equivalent 'dma_set_mask_and_coherent()' which is much less verbose. Signed-off-by: Christophe JAILLET Signed-off-by: Herbert Xu commit abc6146aba40ea3b8996773e6ad0e60fd70f7a3f Author: Gustavo A. R. Silva Date: Fri Nov 20 12:34:56 2020 -0600 crypto: ccree - Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Acked-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu commit ad6d66bcac77e5145eb67449f8354ed0f936258c Author: Ard Biesheuvel Date: Fri Nov 20 12:04:33 2020 +0100 crypto: tcrypt - include 1420 byte blocks in aead and skcipher benchmarks WireGuard and IPsec both typically operate on input blocks that are ~1420 bytes in size, given the default Ethernet MTU of 1500 bytes and the overhead of the VPN metadata. Many aead and sckipher implementations are optimized for power-of-2 block sizes, and whether they perform well when operating on 1420 byte blocks cannot be easily extrapolated from the performance on power-of-2 block size. So let's add 1420 bytes explicitly, and round it up to the next blocksize multiple of the algo in question if it does not support 1420 byte blocks. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 00ea27f11c4f96ffc9ebc147b5ea045babb02ce3 Author: Ard Biesheuvel Date: Fri Nov 20 12:04:32 2020 +0100 crypto: tcrypt - permit tcrypt.ko to be builtin When working on crypto algorithms, being able to run tcrypt quickly without booting an entire Linux installation can be very useful. For instance, QEMU/kvm can be used to boot a kernel from the command line, and having tcrypt.ko builtin would allow tcrypt to be executed to run benchmarks, or to run tests for algorithms that need to be instantiated from templates, without the need to make it past the point where the rootfs is mounted. So let's relax the requirement that tcrypt can only be built as a module when CONFIG_EXPERT is enabled. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 08a7e33c083b60c1ddd330df22fb56038e4a40ad Author: Ard Biesheuvel Date: Fri Nov 20 12:04:31 2020 +0100 crypto: tcrypt - don't initialize at subsys_initcall time Commit c4741b2305979 ("crypto: run initcalls for generic implementations earlier") converted tcrypt.ko's module_init() to subsys_initcall(), but this was unintentional: tcrypt.ko currently cannot be built into the core kernel, and so the subsys_initcall() gets converted into module_init() under the hood. Given that tcrypt.ko does not implement a generic version of a crypto algorithm that has to be available early during boot, there is no point in running the tcrypt init code earlier than implied by module_init(). However, for crypto development purposes, we will lift the restriction that tcrypt.ko must be built as a module, and when builtin, it makes sense for tcrypt.ko (which does its work inside the module init function) to run as late as possible. So let's switch to late_initcall() instead. Signed-off-by: Ard Biesheuvel Reviewed-by: Eric Biggers Signed-off-by: Herbert Xu commit e8a3dae6910157180c88c8b0e0dd06aee849b7fc Author: Weili Qian Date: Fri Nov 20 17:02:34 2020 +0800 MAINTAINERS: Move HiSilicon TRNG V2 driver Move HiSilicon TRNG V2 driver into 'drivers/crypto/hisilicon/trng' with some updating on 'MAINTAINERS'. Signed-off-by: Weili Qian Reviewed-by: Zaibo Xu Signed-off-by: Herbert Xu commit e4d9d10ef4be0366316b3114593e4becf5b98a49 Author: Weili Qian Date: Fri Nov 20 17:02:33 2020 +0800 crypto: hisilicon/trng - add support for PRNG This patch adds support for pseudo random number generator(PRNG) in Crypto subsystem. Signed-off-by: Weili Qian Reviewed-by: Zaibo Xu Signed-off-by: Herbert Xu commit 56c6da16c3631f953fb20d8b7ddccdf493377ad4 Author: Weili Qian Date: Fri Nov 20 17:02:32 2020 +0800 crypto: hisilicon/trng - add HiSilicon TRNG driver support Move existing char/hw_random/hisi-trng-v2.c to crypto/hisilicon/trng.c. Signed-off-by: Weili Qian Reviewed-by: Zaibo Xu Signed-off-by: Herbert Xu commit 4e0b858b1a8f165016d124c7c1e2baed88f6250f Author: Weili Qian Date: Fri Nov 20 17:02:31 2020 +0800 hwrng: hisi - remove HiSilicon TRNG driver Driver of HiSilicon true random number generator(TRNG) is removed from 'drivers/char/hw_random'. Both 'Kunpeng 920' and 'Kunpeng 930' chips have TRNG, however, PRNG is only supported by 'Kunpeng 930'. So, this driver is moved to 'drivers/crypto/hisilicon/trng/' in the next to enable the two's TRNG better. Signed-off-by: Weili Qian Reviewed-by: Zaibo Xu Signed-off-by: Herbert Xu commit 6cf1a144d3f5752400cad99d9142fba668cc4ddb Author: Herbert Xu Date: Fri Nov 20 17:41:26 2020 +1100 crypto: sparc - Fix sparse endianness warnings This patch fixes a coulpe of sparse endianness warnings. Signed-off-by: Herbert Xu commit e547655238f70a7b238e14f18d968428ff6b6b93 Author: Herbert Xu Date: Fri Nov 20 17:28:38 2020 +1100 crypto: powerpc/sha256-spe - Fix sparse endianness warning This patch fixes a sparse endianness warning in sha256-spe. Signed-off-by: Herbert Xu commit 7c2f5537ca196ddd00639f66f0d58c9f8d265b27 Author: Herbert Xu Date: Fri Nov 20 17:01:31 2020 +1100 crypto: mips/octeon - Fix sparse endianness warnings This patch fixes a number of endianness warnings in the mips/octeon code. Signed-off-by: Herbert Xu commit da6d57948fa23f6d3aa7405b9f1c1de96f7e450e Author: kernel test robot Date: Fri Nov 13 18:14:00 2020 +0100 crypto: qat - fix excluded_middle.cocci warnings Condition !A || A && B is equivalent to !A || B. Generated by: scripts/coccinelle/misc/excluded_middle.cocci Fixes: b76f0ea01312 ("coccinelle: misc: add excluded_middle.cocci script") CC: Denis Efremov Reported-by: kernel test robot Signed-off-by: kernel test robot Signed-off-by: Julia Lawall Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 1148a9654b5a69611d33e14719251c6ec20f5f2c Author: Thara Gopinath Date: Thu Nov 19 10:52:31 2020 -0500 crypto: qce - Fix SHA result buffer corruption issues Partial hash was being copied into the final result buffer without the entire message block processed. Depending on how the end user processes this result buffer, errors vary from result buffer corruption to result buffer poisoing. Fix this issue by ensuring that only the final hash value is copied into the result buffer. Reviewed-by: Bjorn Andersson Signed-off-by: Thara Gopinath Signed-off-by: Herbert Xu commit 8cbc3448214a9d4534f8381ec23ef5add0ae8d91 Author: Thara Gopinath Date: Thu Nov 19 10:52:30 2020 -0500 crypto: qce - Enable support for crypto engine on sdm845 Add support Qualcomm Crypto Engine accelerated encryption and authentication algorithms on sdm845. Reviewed-by: Bjorn Andersson Signed-off-by: Thara Gopinath Signed-off-by: Herbert Xu commit ac50aec41a9f9590b1d48bd4daa2251f0025052a Author: Ard Biesheuvel Date: Tue Nov 17 14:32:14 2020 +0100 crypto: aegis128 - expose SIMD code path as separate driver Wiring the SIMD code into the generic driver has the unfortunate side effect that the tcrypt testing code cannot distinguish them, and will therefore not use the latter to fuzz test the former, as it does for other algorithms. So let's refactor the code a bit so we can register two implementations: aegis128-generic and aegis128-simd. Signed-off-by: Ard Biesheuvel Reviewed-by: Ondrej Mosnacek Signed-off-by: Herbert Xu commit 97b70180b7f97224762b63f211305a8052d07960 Author: Ard Biesheuvel Date: Tue Nov 17 14:32:13 2020 +0100 crypto: aegis128/neon - move final tag check to SIMD domain Instead of calculating the tag and returning it to the caller on decryption, use a SIMD compare and min across vector to perform the comparison. This is slightly more efficient, and removes the need on the caller's part to wipe the tag from memory if the decryption failed. While at it, switch to unsigned int when passing cryptlen and assoclen - we don't support input sizes where it matters anyway. Signed-off-by: Ard Biesheuvel Reviewed-by: Ondrej Mosnacek Signed-off-by: Herbert Xu commit ad00d41b47e6c86f4da61b9812b81cd4cd74be64 Author: Ard Biesheuvel Date: Tue Nov 17 14:32:12 2020 +0100 crypto: aegis128/neon - optimize tail block handling Avoid copying the tail block via a stack buffer if the total size exceeds a single AEGIS block. In this case, we can use overlapping loads and stores and NEON permutation instructions instead, which leads to a modest performance improvement on some cores (< 5%), and is slightly cleaner. Note that we still need to use a stack buffer if the entire input is smaller than 16 bytes, given that we cannot use 16 byte NEON loads and stores safely in this case. Signed-off-by: Ard Biesheuvel Reviewed-by: Ondrej Mosnacek Signed-off-by: Herbert Xu commit 02685906d3afa4f7c72d86cf99242e3b08078865 Author: Ard Biesheuvel Date: Tue Nov 17 14:32:11 2020 +0100 crypto: aegis128 - wipe plaintext and tag if decryption fails The AEGIS spec mentions explicitly that the security guarantees hold only if the resulting plaintext and tag of a failed decryption are withheld. So ensure that we abide by this. While at it, drop the unused struct aead_request *req parameter from crypto_aegis128_process_crypt(). Reviewed-by: Ondrej Mosnacek Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit b62168e516dab1b7cb7bb90976755b08d273cc3a Author: Tony Lindgren Date: Fri Nov 27 08:13:25 2020 +0200 ARM: OMAP2+: Fix am4 only build after genpd changes With commit df6c2ec872a6 ("ARM: OMAP2+: Drop legacy remaining legacy platform data for am4") we moved am4 to boot with simple-pm-bus using genpd and devicetree based data. But I forgot to test am4 only build that still has few references to the old platform data left, and cause undefined reference errors with omap_hwmod_set_postsetup_state and omap_hwmod_for_each. We can just drop the related calls for am4 now, and also drop the references to unused struct wkup_m3_platform_data. Reported-by: Nishanth Menon Signed-off-by: Tony Lindgren commit 830382e4ccb5e5d9164fcd28854238ef5f5a1751 Merge: fb3558127cb62 ceb5dea565435 Author: Andrii Nakryiko Date: Thu Nov 26 19:33:36 2020 -0800 Merge branch 'bpf: remove bpf_load loader completely' "Daniel T. says: ==================== Numerous refactoring that rewrites BPF programs written with bpf_load to use the libbpf loader was finally completed, resulting in BPF programs using bpf_load within the kernel being completely no longer present. This patchset refactors remaining bpf programs with libbpf and completely removes bpf_load, an outdated bpf loader that is difficult to keep up with the latest kernel BPF and causes confusion. Changes in v2: - drop 'move tracing helpers to trace_helper' patch - add link pinning to prevent cleaning up on process exit - add static at global variable and remove unused variable - change to destroy link even after link__pin() - fix return error code on exit - merge commit with changing Makefile Changes in v3: - cleanup bpf_link, bpf_object and cgroup fd both on success and error ==================== Signed-off-by: Andrii Nakryiko commit ceb5dea5654354fb4e6e393c99f1d0bf4debab0e Author: Daniel T. Lee Date: Tue Nov 24 09:03:10 2020 +0000 samples: bpf: Remove bpf_load loader completely Numerous refactoring that rewrites BPF programs written with bpf_load to use the libbpf loader was finally completed, resulting in BPF programs using bpf_load within the kernel being completely no longer present. This commit removes bpf_load, an outdated bpf loader that is difficult to keep up with the latest kernel BPF and causes confusion. Also, this commit removes the unused trace_helper and bpf_load from samples/bpf target objects from Makefile. Signed-off-by: Daniel T. Lee Signed-off-by: Andrii Nakryiko Acked-by: Jesper Dangaard Brouer Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201124090310.24374-8-danieltimlee@gmail.com commit 0afe0a998c40085a6342e1aeb4c510cccba46caf Author: Daniel T. Lee Date: Tue Nov 24 09:03:09 2020 +0000 samples: bpf: Fix lwt_len_hist reusing previous BPF map Currently, lwt_len_hist's map lwt_len_hist_map is uses pinning, and the map isn't cleared on test end. This leds to reuse of that map for each test, which prevents the results of the test from being accurate. This commit fixes the problem by removing of pinned map from bpffs. Also, this commit add the executable permission to shell script files. Fixes: f74599f7c5309 ("bpf: Add tests and samples for LWT-BPF") Signed-off-by: Daniel T. Lee Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201124090310.24374-7-danieltimlee@gmail.com commit c6497df0ddc3363c2c940d92c3af0b2620477003 Author: Daniel T. Lee Date: Tue Nov 24 09:03:08 2020 +0000 samples: bpf: Refactor test_overhead program with libbpf This commit refactors the existing program with libbpf bpf loader. Since the kprobe, tracepoint and raw_tracepoint bpf program can be attached with single bpf_program__attach() interface, so the corresponding function of libbpf is used here. Rather than specifying the number of cpus inside the code, this commit uses the number of available cpus with _SC_NPROCESSORS_ONLN. Signed-off-by: Daniel T. Lee Signed-off-by: Andrii Nakryiko Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201124090310.24374-6-danieltimlee@gmail.com commit 763af200d6160b2f79f45cbf9a85b8dc6e20f2c7 Author: Daniel T. Lee Date: Tue Nov 24 09:03:07 2020 +0000 samples: bpf: Refactor ibumad program with libbpf This commit refactors the existing ibumad program with libbpf bpf loader. Attach/detach of Tracepoint bpf programs has been managed with the generic bpf_program__attach() and bpf_link__destroy() from the libbpf. Also, instead of using the previous BPF MAP definition, this commit refactors ibumad MAP definition with the new BTF-defined MAP format. To verify that this bpf program works without an infiniband device, try loading ib_umad kernel module and test the program as follows: # modprobe ib_umad # ./ibumad Moreover, TRACE_HELPERS has been removed from the Makefile since it is not used on this program. Signed-off-by: Daniel T. Lee Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201124090310.24374-5-danieltimlee@gmail.com commit 4fe6641526dbee115d9d037e94a344f4f448aaa4 Author: Daniel T. Lee Date: Tue Nov 24 09:03:06 2020 +0000 samples: bpf: Refactor task_fd_query program with libbpf This commit refactors the existing kprobe program with libbpf bpf loader. To attach bpf program, this uses generic bpf_program__attach() approach rather than using bpf_load's load_bpf_file(). To attach bpf to perf_event, instead of using previous ioctl method, this commit uses bpf_program__attach_perf_event since it manages the enable of perf_event and attach of BPF programs to it, which is much more intuitive way to achieve. Also, explicit close(fd) has been removed since event will be closed inside bpf_link__destroy() automatically. Furthermore, to prevent conflict of same named uprobe events, O_TRUNC flag has been used to clear 'uprobe_events' interface. Signed-off-by: Daniel T. Lee Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201124090310.24374-4-danieltimlee@gmail.com commit d89af13c92056c46dfc4bcb3d90efe88937c3381 Author: Daniel T. Lee Date: Tue Nov 24 09:03:05 2020 +0000 samples: bpf: Refactor test_cgrp2_sock2 program with libbpf This commit refactors the existing cgroup program with libbpf bpf loader. The original test_cgrp2_sock2 has keeped the bpf program attached to the cgroup hierarchy even after the exit of user program. To implement the same functionality with libbpf, this commit uses the BPF_LINK_PINNING to pin the link attachment even after it is closed. Since this uses LINK instead of ATTACH, detach of bpf program from cgroup with 'test_cgrp2_sock' is not used anymore. The code to mount the bpf was added to the .sh file in case the bpff was not mounted on /sys/fs/bpf. Additionally, to fix the problem that shell script cannot find the binary object from the current path, relative path './' has been added in front of binary. Fixes: 554ae6e792ef3 ("samples/bpf: add userspace example for prohibiting sockets") Signed-off-by: Daniel T. Lee Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201124090310.24374-3-danieltimlee@gmail.com commit c5815ac7e2aaff4f00b2b9e21d84b9f2fddddb48 Author: Daniel T. Lee Date: Tue Nov 24 09:03:04 2020 +0000 samples: bpf: Refactor hbm program with libbpf This commit refactors the existing cgroup programs with libbpf bpf loader. Since bpf_program__attach doesn't support cgroup program attachment, this explicitly attaches cgroup bpf program with bpf_program__attach_cgroup(bpf_prog, cg1). Also, to change attach_type of bpf program, this uses libbpf's bpf_program__set_expected_attach_type helper to switch EGRESS to INGRESS. To keep bpf program attached to the cgroup hierarchy even after the exit, this commit uses the BPF_LINK_PINNING to pin the link attachment even after it is closed. Besides, this program was broken due to the typo of BPF MAP definition. But this commit solves the problem by fixing this from 'queue_stats' map struct hvm_queue_stats -> hbm_queue_stats. Fixes: 36b5d471135c ("selftests/bpf: samples/bpf: Split off legacy stuff from bpf_helpers.h") Signed-off-by: Daniel T. Lee Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201124090310.24374-2-danieltimlee@gmail.com commit 617b860c1875842d9cc3338d7dabd2b3538038f1 Author: Parav Pandit Date: Fri Nov 20 15:03:39 2020 -0800 net/mlx5: Treat host PF vport as other (non eswitch manager) vport When eswitch manager is running on ECPF, host PF should be treated as non eswitch manager port, similar to other VF vports. Fail to do so, results in firmware treating PF's vport as ECPF vport for eswitch ACL tables. Non zero check to figure out if a given vport is other vport or not is not sufficient becase PF vport number = 0 on ECPF. Hence, create esw acl tables with an attribute of other vport. Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed commit 5bef709d76a28a50a5beaac9f1af1facf66af7f3 Author: Parav Pandit Date: Fri Nov 20 15:03:38 2020 -0800 net/mlx5: Enable host PF HCA after eswitch is initialized Currently ECPF enables external host PF too early in the initialization sequence for Ethernet links when ECPF is eswitch manager. Due to this, when external host PF driver is loaded, host PF's HCA CAP has inner_ip_version supported by NIC RX flow table. This capability is later updated by firmware after ECPF driver enables ENCAP/DECAP as eswitch manager. This results into a timing race condition, where CREATE_TIR command fails with a below syndrome on host PF. mlx5_cmd_check:775:(pid 510): CREATE_TIR(0x900) op_mod(0x0) failed, status bad parameter(0x3), syndrome (0x562b00) Hence, enable the external host PF after necessary eswitch and per vport initialization is completed. Continue to enable host PF when eswitch manager capability is off for a ECPF. Signed-off-by: Parav Pandit Reviewed-by: Bodong Wang Signed-off-by: Saeed Mahameed commit 8a90f2fc67826a3876df1cb72e42d4a9a135f4fa Author: Parav Pandit Date: Fri Nov 20 15:03:37 2020 -0800 net/mlx5: Rename peer_pf to host_pf To match the hardware spec, rename peer_pf to host_pf. Signed-off-by: Parav Pandit Reviewed-by: Bodong Wang Signed-off-by: Saeed Mahameed commit 3b1e58aa832ed537289be6a51a2015309688a90c Author: Parav Pandit Date: Fri Nov 20 15:03:36 2020 -0800 net/mlx5: Make API mlx5_core_is_ecpf accept const pointer Subsequent patch implements helper API which has mlx5_core_dev as const pointer, make its caller API too const *. Signed-off-by: Parav Pandit Reviewed-by: Bodong Wang Signed-off-by: Saeed Mahameed commit 8d2a9d8d640b2aa860dcd8cdf35002e857126eca Author: Eli Cohen Date: Fri Nov 20 15:03:35 2020 -0800 net/mlx5: Export steering related functions Export mlx5_create_flow_table() mlx5_create_flow_group() mlx5_destroy_flow_group(). These symbols are required by the VDPA implementation to create rules that consume VDPA specific traffic. We do not deal with putting the prototypes in a header file since they already exist in include/linux/mlx5/fs.h. Signed-off-by: Eli Cohen Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit 959af5569f57d189b5c4fccae45f16d5ff01aa39 Author: Yishai Hadas Date: Fri Nov 20 15:03:33 2020 -0800 net/mlx5: Expose other function ifc bits Expose other function ifc bits to enable setting HCA caps on behalf of other function. In addition, expose vhca_resource_manager bit to control whether the other function functionality is supported by firmware. Signed-off-by: Yishai Hadas Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed commit 21adf05d4584c99a07a604224b9cfeddcc6bc47c Author: Aya Levin Date: Fri Nov 20 15:03:32 2020 -0800 net/mlx5: Expose IP-in-IP TX and RX capability bits Expose FW indication that it supports stateless offloads for IP over IP tunneled packets per direction. In some HW like ConnectX-4 IP-in-IP support is not symmetric, it supports steering on the inner header but it doesn't TX-Checksum and TSO. Add IP-in-IP capability per direction to cover this case as well. Note: only if both indications are turned on, the global tunnel_stateless_ip_over_ip is on too. Signed-off-by: Aya Levin Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit 349125ba232ea53d71a57c65c81f109c323cc369 Author: Parav Pandit Date: Fri Nov 20 15:03:31 2020 -0800 net/mlx5: Update the hardware interface definition for vhca state Update the hardware interface definitions to query and modify vhca state, related EQE and event code. Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed commit dd8595eabeb486d41ad9994e6cece36e0e25e313 Author: Meir Lichtinger Date: Fri Nov 20 15:03:30 2020 -0800 net/mlx5: Update the list of the PCI supported devices Add the upcoming BlueField-3 device ID. Signed-off-by: Meir Lichtinger Reviewed-by: Eran Ben Elisha Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit e5dfe6b57e8eada1c238dd2c7020345b0d8f6454 Author: Parav Pandit Date: Fri Nov 20 15:03:29 2020 -0800 net/mlx5: Avoid exposing driver internal command helpers mlx5 command init and cleanup routines are internal to mlx5_core driver. Hence, avoid exporting them and move their definition to mlx5_core driver's internal file mlx5_core.h Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed commit 59d2ae1db89f5a491d48f798ffccef36cc69ca65 Author: Eran Ben Elisha Date: Fri Nov 20 15:03:28 2020 -0800 net/mlx5: Add ts_cqe_to_dest_cqn related bits Add a bit in HCA capabilities layout to indicate if ts_cqe_to_dest_cqn is supported. In addition, add ts_cqe_to_dest_cqn field to SQ context, for driver to set the actual CQN. Signed-off-by: Eran Ben Elisha Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 7da3ad6c26f41f403fe6823c3de242551db09c37 Author: Muhammad Sammar Date: Fri Nov 20 15:03:27 2020 -0800 net/mlx5: Add misc4 to mlx5_ifc_fte_match_param_bits Add misc4 match params to enable matching on prog_sample_fields. Signed-off-by: Muhammad Sammar Reviewed-by: Alex Vesker Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit 699d531f55d5dc6394ca32ff42797b9ab7c15fe1 Author: Muhammad Sammar Date: Fri Nov 20 15:03:26 2020 -0800 net/mlx5: Check dr mask size against mlx5_match_param size This is to allow passing misc4 match param from userspace when function like ib_flow_matcher_create is called. Signed-off-by: Muhammad Sammar Reviewed-by: Alex Vesker Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit 38730630880c6f47ad73dd90524ff52443b8bc48 Author: Chris Mi Date: Fri Nov 20 15:03:25 2020 -0800 net/mlx5: Add sampler destination type The flow sampler object is a new destination type. Add a new member for the flow destination. Signed-off-by: Chris Mi Reviewed-by: Oz Shlomo Signed-off-by: Saeed Mahameed commit 2a2970891647fee7e7ea767425f895140faffaa8 Author: Chris Mi Date: Fri Nov 20 15:03:24 2020 -0800 net/mlx5: Add sample offload hardware bits and structures Hardware introduces flow sampler object for packet sampling. Add the offload hardware bits and structures. Signed-off-by: Chris Mi Reviewed-by: Oz Shlomo Signed-off-by: Saeed Mahameed commit 22f8c80566c4a29a0d8b5ebf24aa1fd1679b39e5 Merge: 31b05212360cb fa388231fec99 Author: Dave Airlie Date: Fri Nov 27 09:23:36 2020 +1000 Merge tag 'drm-misc-next-2020-11-18' of ssh://git.freedesktop.org/git/drm/drm-misc into drm-next drm-misc-next for 5.11: UAPI Changes: * media: Add MEDIA_BUS_FMT_RGB888_3X8_DELTA format Cross-subsystem Changes: * console: Remove unused functions; Store characters-per-font in font- descriptor structure instead of hard-coding * DT: Add vendor prefix for ShenZhen Asia Better Technology Ltd. (ABT) Core Changes: * Fix build warnings * Update debug logging to new interfaces, plus fixes * Add error messages for ioctls; * Fix kernel docs * doc: Fix kernel docs * fbcon: Remove accelerated scrolling * selftests: Fix build warnings * ttm: Fix missing NULL check in new page pool; Fix build warnings * video: Fix kernel docs Driver Changes: * armada: Fix build warnings * atmel-hlcdc: Fix build warnings * exynos: Fix build warnings * gma500: Remove 2d framebuffer acceleration * lima: Fix build warnings; Cleanups * mediatek: Fix build warnings * meson: Module removal fixes; Fix build warnings * nouveau: Fix build warnings * omap: Fix return values * panel: Fix build warnings; Add support and DT bindings for OnePlus 6/T; Add support and DT bindings for ABT Y030XX067A * panel/s6e63m0: Add/improve SPi reading/writing; Support 3WIRE protocol; Set connector display info; Add more comments * panfrost: Move GPU reset into separate worker, avoid race conditions * pl111: Fix build warnings * qxl: Cleanup fbcon acceleration * rockchip: Fix build warnings * savage: Fix build warnings * sti: Fix build warnings * udl: Fix missing error code in udl_handle_damage() * v3d: Fix build warnings * vc4: Fix build warnings * via: Fix build warnings * virtio: Make dma-buf ops static Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20201118123221.GA19755@linux-uq9g commit 2df8aa0373489534a14be5ef48a2dc1215ef9270 Merge: 3319f1489ef85 25df3e1f64f54 Author: Arnd Bergmann Date: Thu Nov 26 22:11:52 2020 +0100 Merge tag 'hisi-arm64-dt-for-5.11' of git://github.com/hisilicon/linux-hisi into arm/dt ARM64: DT: Hisilicon ARM64 DT updates for 5.11 - Cleanups of the hisilicon DTS to align with the dtschema. All of them do not have any functional effect except passing dtschema checks or dtc W=2 builds. * tag 'hisi-arm64-dt-for-5.11' of git://github.com/hisilicon/linux-hisi: arm64: dts: hisilicon: Use generic "ngpios" rather than "snps,nr-gpios" arm64: dts: hi3660: Harmonize DWC USB3 DT nodes name arm64: dts: hisilicon: list all clocks required by snps-dw-apb-uart.yaml arm64: dts: hisilicon: list all clocks required by pl011.yaml arm64: dts: hisilicon: list all clocks required by spi-pl022.yaml arm64: dts: hisilicon: normalize the node name of the UART devices arm64: dts: hisilicon: normalize the node name of the usb devices arm64: dts: hisilicon: normalize the node name of the SMMU devices arm64: dts: hisilicon: place clock-names "biu" before "ciu" arm64: dts: hisilicon: remove unused property pinctrl-names arm64: dts: hisilicon: write the values of property-units into a uint32 array arm64: dts: hisilicon: separate each group of data in the property "reg" arm64: dts: hisilicon: normalize the node name of the ITS devices Link: https://lore.kernel.org/r/5FBDC416.5060008@hisilicon.com Signed-off-by: Arnd Bergmann commit 3319f1489ef8516981a153ca4c96c442b356dc2c Merge: c7cf673399144 d48b6ef74ab06 Author: Arnd Bergmann Date: Thu Nov 26 22:09:35 2020 +0100 Merge tag 'hisi-arm32-dt-for-5.11' of git://github.com/hisilicon/linux-hisi into arm/dt ARM: DT: Hisilicon ARM32 DT updates for 5.11 - Cleanups of the hisilicon DTS to align with the dtschema including serial, usb, amba-bus, memory, mmc, spi and syscon. All of them do not have any functional effect except passing dtschema checks or dtc W=2 builds. * tag 'hisi-arm32-dt-for-5.11' of git://github.com/hisilicon/linux-hisi: ARM: dts: hisilicon: fix errors detected by syscon.yaml ARM: dts: hisilicon: fix errors detected by spi-pl022.yaml ARM: dts: hisilicon: fix errors detected by synopsys-dw-mshc.yaml ARM: dts: hisilicon: fix errors detected by root-node.yaml ARM: dts: hisilicon: fix errors detected by simple-bus.yaml ARM: dts: hisilicon: fix errors detected by usb yaml ARM: dts: hisilicon: fix errors detected by pl011.yaml ARM: dts: hisilicon: fix errors detected by snps-dw-apb-uart.yaml Link: https://lore.kernel.org/r/5FBDC347.4050102@hisilicon.com Signed-off-by: Arnd Bergmann commit 8f2685c9c4ffb68dd4360ea8c70fd75c3414bdb3 Merge: 0a3251a174018 0e1bcf2c05d0a Author: Arnd Bergmann Date: Thu Nov 26 22:05:15 2020 +0100 Merge tag 'memory-controller-drv-tegra-5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into arm/drivers Memory controller drivers for v5.11 - Tegra SoC There is a bigger work from Dmitry Osipenko around Tegra SoC memory controller drivers, mostly towards adding interconnect support and integration with devfreq. This work touches all Tegra memory controller drivers and also few other SoC-related parts. It's not yet finished but the intermediate stage seems ready to merge. Beside that Tegra 210 memory controller got few fixes and received new swgroups (work of Nicolin Chen). * tag 'memory-controller-drv-tegra-5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: (38 commits) memory: tegra30-emc: Remove unnecessary of_node_put in tegra_emc_probe memory: tegra: Complete tegra210_swgroups memory: tegra30-emc: Continue probing if timings are missing in device-tree memory: tegra30-emc: Make driver modular memory: tegra30: Add FIFO sizes to memory clients memory: tegra20-emc: Add devfreq support memory: tegra20-emc: Remove IRQ number from error message memory: tegra20-emc: Factor out clk initialization memory: tegra20-emc: Use dev_pm_opp_set_clkname() memory: tegra: Correct stub of devm_tegra_memory_controller_get() memory: tegra20: Support interconnect framework memory: tegra20-emc: Continue probing if timings are missing in device-tree memory: tegra20-emc: Make driver modular memory: tegra-mc: Add interconnect framework memory: tegra: Add missing latency allowness entry for Page Table Cache memory: tegra: Remove superfluous error messages around platform_get_irq() memory: tegra: Use devm_platform_ioremap_resource() memory: tegra: Add and use devm_tegra_memory_controller_get() dt-bindings: host1x: Document new interconnect properties dt-bindings: tegra30-actmon: Document OPP and interconnect properties ... Link: https://lore.kernel.org/r/20201126191241.23302-1-krzk@kernel.org Signed-off-by: Arnd Bergmann commit 0a3251a174018be76b14aa5857e2fef9e6993a53 Merge: ba622a3e74a7f 5445a0c0d3366 Author: Arnd Bergmann Date: Thu Nov 26 22:03:19 2020 +0100 Merge tag 'memory-controller-drv-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into arm/drivers Memory controller drivers for v5.11 1. jz4780_nemc: fix devm_ioremap() return value check leading to potential NULL pointer dereference. 2. mediatek: Convert bindings to dtschema and add support for mt8192. 3. pl353-smc: Fix compile test. * tag 'memory-controller-drv-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: memory: pl353-smc: fix compile test on !ARM_AMBA memory: mtk-smi: Add mt8192 support dt-bindings: memory: mediatek: Add mt8192 support dt-bindings: memory: mediatek: Convert SMI to DT schema MAINTAINERS: add dt binding headers to memory controller drivers entry memory: jz4780_nemc: Fix an error pointer vs NULL check in probe() Link: https://lore.kernel.org/r/20201125184529.5392-1-krzk@kernel.org Signed-off-by: Arnd Bergmann commit ba622a3e74a7fc05e648dbb34483d74852f5ff86 Merge: e24f7fac3b973 e95f287deed24 Author: Arnd Bergmann Date: Thu Nov 26 22:00:55 2020 +0100 Merge tag 'soc-fsl-next-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux into arm/drivers NXP/FSL SoC driver updates for v5.11 - Add RCPM errata workaround for A-008646 on LS1021A - Various W=1 warning fixes for fsl/soc drivers * tag 'soc-fsl-next-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux: soc: fsl: handle RCPM errata A-008646 on SoC LS1021A soc: fsl: qbman: qman: Remove unused variable 'dequeue_wq' soc: fsl: qe: qe_common: Fix misnamed function attribute 'addr' soc: fsl: dpio: qbman-portal: Fix a bunch of kernel-doc misdemeanours Link: https://lore.kernel.org/r/20201125165913.15441-1-leoyang.li@nxp.com Signed-off-by: Arnd Bergmann commit f35a07f92616700733636c06dd6e5b6cdc807fe4 Author: Rafał Miłecki Date: Wed Nov 25 10:06:08 2020 +0100 tty: serial: bcm63xx: lower driver dependencies Hardware supported by bcm63xx is also used by BCM4908 SoCs family that is ARM64. In future more architectures may need it as well. There is nothing arch specific breaking compilation so just stick to requiring COMMON_CLK. Signed-off-by: Rafał Miłecki Link: https://lore.kernel.org/r/20201125090608.28442-1-zajec5@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5f1697fee6f6758ec1001569ae26d7a70a8bbc8e Author: Fabio Estevam Date: Mon Nov 23 16:04:38 2020 -0300 serial: mxs-auart: Remove unneeded platform_device_id The mxs-auart driver is only used for DT platforms and there is no need to use the platform_device_id structure. Get rid the platform_device_id structure and retrieve the data via of_device_get_match_data(), which simplifies the code. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20201123190438.5636-1-festevam@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6e4e636e0e3e0b5deffc5e233adcb2cd4e68f2d0 Author: Zhang Qilong Date: Thu Nov 19 22:11:26 2020 +0800 serial: 8250-mtk: Fix reference leak in mtk8250_probe The pm_runtime_enable will increase power disable depth. Thus a pairing decrement is needed on the error handling path to keep it balanced according to context. Fixes: e32a83c70cf98 ("serial: 8250-mtk: modify mtk uart power and clock management") Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20201119141126.168850-1-zhangqilong3@huawei.com Signed-off-by: Greg Kroah-Hartman commit b6c505525c2638a724becb2b112ec12df94472fe Merge: d9a500b2985b1 6f4a038b99677 Author: Mark Brown Date: Thu Nov 26 20:03:02 2020 +0000 Merge series "regmap/SoundWire/ASoC: Add SoundWire SDCA support" from Bard Liao : The MIPI SoundWire Device Class standard will define audio functionality beyond the scope of the existing SoundWire 1.2 standard, which is limited to the bus and interface. The description is inspired by the USB Audio Class, with "functions", "entities", "control selectors", "audio clusters". The main difference with the USB Audio class is that the devices are typically on a motherboard and descriptors stored in platform firmware instead of being retrieved from the device. The current set of devices managed in this patchset are conformant with the SDCA 0.6 specification and require dedicated drivers since the descriptors and platform firmware specification is not complete at this time. They do however rely on the hierarchical addressing required by the SDCA standard. Future devices conformant with SDCA 1.0 should rely on a class driver. This series adds support for the hierarchical SDCA addressing and extends regmap. It then provides 3 codecs for RT711-sdca headset codec, RT1316 amplifier and RT715-scda microphone codec. Note that the release of this code before the formal adoption of the SDCA 1.0 specification was formally endorsed by the MIPI Board to make sure there is no delay for Linux-based support of this specification. Jack Yu (1): ASoC/SoundWire: rt715-sdca: First version of rt715 sdw sdca codec driver Pierre-Louis Bossart (2): soundwire: SDCA: add helper macro to access controls regmap/SoundWire: sdw: add support for SoundWire 1.2 MBQ Shuming Fan (2): ASoC/SoundWire: rt1316: Add RT1316 SDCA vendor-specific driver ASoC/SoundWire: rt711-sdca: Add RT711 SDCA vendor-specific driver drivers/base/regmap/Kconfig | 6 +- drivers/base/regmap/Makefile | 1 + drivers/base/regmap/regmap-sdw-mbq.c | 101 ++ include/linux/regmap.h | 35 + include/linux/soundwire/sdw_registers.h | 32 + sound/soc/codecs/Kconfig | 20 + sound/soc/codecs/Makefile | 6 + sound/soc/codecs/rt1316-sdw.c | 756 ++++++++++++ sound/soc/codecs/rt1316-sdw.h | 115 ++ sound/soc/codecs/rt711-sdca-sdw.c | 424 +++++++ sound/soc/codecs/rt711-sdca-sdw.h | 101 ++ sound/soc/codecs/rt711-sdca.c | 1481 +++++++++++++++++++++++ sound/soc/codecs/rt711-sdca.h | 246 ++++ sound/soc/codecs/rt715-sdca-sdw.c | 278 +++++ sound/soc/codecs/rt715-sdca-sdw.h | 170 +++ sound/soc/codecs/rt715-sdca.c | 936 ++++++++++++++ sound/soc/codecs/rt715-sdca.h | 124 ++ 17 files changed, 4831 insertions(+), 1 deletion(-) create mode 100644 drivers/base/regmap/regmap-sdw-mbq.c create mode 100644 sound/soc/codecs/rt1316-sdw.c create mode 100644 sound/soc/codecs/rt1316-sdw.h create mode 100644 sound/soc/codecs/rt711-sdca-sdw.c create mode 100644 sound/soc/codecs/rt711-sdca-sdw.h create mode 100644 sound/soc/codecs/rt711-sdca.c create mode 100644 sound/soc/codecs/rt711-sdca.h create mode 100644 sound/soc/codecs/rt715-sdca-sdw.c create mode 100644 sound/soc/codecs/rt715-sdca-sdw.h create mode 100644 sound/soc/codecs/rt715-sdca.c create mode 100644 sound/soc/codecs/rt715-sdca.h base-commit: 3650b228f83adda7e5ee532e2b90429c03f7b9ec -- 2.17.1 commit 6d9b4dbf82c74e9c178e1ce2cff505f17cced23e Merge: 0858fc17b6f73 453d32c2f7f73 Author: Mark Brown Date: Thu Nov 26 20:03:01 2020 +0000 Merge series "ASoC: merge soc_compr_open() rollback and soc_compr_free()" from Kuninori Morimoto : Hi Mark soc_compr_open() does rollback when failed (A), but, it is almost same as soc_compr_free(). static int soc_compr_open(xxx) { ... if (ret < 0) goto xxx_err; ... return 0; ^ machine_err: | ... | out: (A) ... | pm_err: | ... v return ret; } This kind of duplicated code can be a hotbed of bugs, thus, this patch-set share soc_compr_free() and rollback. Kuninori Morimoto (5): ASoC: soc-compress: move soc_compr_free() next to soc_compr_open() ASoC: soc-dai: add mark for snd_soc_dai_compr_startup/shutdown() ASoC: soc-component: add mark for snd_soc_component_compr_open/free() ASoC: soc-component: add mark for snd_soc_link_compr_startup/shutdown() ASoC: soc-compress: add soc_compr_clean() and call it from soc_compr_open/free() include/sound/soc-component.h | 6 +- include/sound/soc-dai.h | 4 +- include/sound/soc-link.h | 3 +- include/sound/soc.h | 1 + sound/soc/soc-component.c | 17 +++-- sound/soc/soc-compress.c | 115 +++++++++++++++++----------------- sound/soc/soc-dai.c | 13 +++- sound/soc/soc-link.c | 11 +++- 8 files changed, 95 insertions(+), 75 deletions(-) -- 2.25.1 commit 0858fc17b6f73f868352ed5f6cd7b655a17ff856 Merge: c61d1142cfd45 0670c9a7239a4 Author: Mark Brown Date: Thu Nov 26 20:03:00 2020 +0000 Merge series "ASoC: fix !OF compile test warnings" from Krzysztof Kozlowski : Hi, Changes since v1: 1. New patch 2/39: ASoC: bd28623: mark OF related data as maybe unused, 2. Patches 1-13: add maybe_unused after discussions with Mark, 3. Add Sylwester's review to two patches (one changed so please review one more time). Best regards, Krzysztof Krzysztof Kozlowski (39): ASoC: ak5558: mark OF related data as maybe unused ASoC: bd28623: mark OF related data as maybe unused ASoC: gtm601: mark OF related data as maybe unused ASoC: inno_rk3036: mark OF related data as maybe unused ASoC: rk3328: mark OF related data as maybe unused ASoC: tas571x: mark OF related data as maybe unused ASoC: kirkwood: armada-370-db: mark OF related data as maybe unused ASoC: meson: t9015: mark OF related data as maybe unused ASoC: qcom: mark OF related data as maybe unused ASoC: samsung: smdk_wm8994: mark OF related data as maybe unused ASoC: rockchip: mark OF related data as maybe unused ASoC: ti: davinci: mark OF related data as maybe unused ASoC: uniphier: mark OF related data as maybe unused ASoC: ak4118: skip of_device_id table when !CONFIG_OF ASoC: alc5623: skip of_device_id table when !CONFIG_OF ASoC: alc5632: skip of_device_id table when !CONFIG_OF ASoC: da7218: skip of_device_id table when !CONFIG_OF ASoC: da7219: skip of_device_id table when !CONFIG_OF ASoC: da9055: skip of_device_id table when !CONFIG_OF ASoC: es8316: skip of_device_id table when !CONFIG_OF ASoC: max98090: skip of_device_id table when !CONFIG_OF ASoC: max98095: skip of_device_id table when !CONFIG_OF ASoC: max98371: skip of_device_id table when !CONFIG_OF ASoC: max9867: skip of_device_id table when !CONFIG_OF ASoC: max98925: skip of_device_id table when !CONFIG_OF ASoC: max98926: skip of_device_id table when !CONFIG_OF ASoC: pcm1789: skip of_device_id table when !CONFIG_OF ASoC: pcm179x: skip of_device_id table when !CONFIG_OF ASoC: rt5660: skip of_device_id table when !CONFIG_OF ASoC: tas2562: skip of_device_id table when !CONFIG_OF ASoC: tlv320: skip of_device_id table when !CONFIG_OF ASoC: ts3a227e: skip of_device_id table when !CONFIG_OF ASoC: es7134: mark OF related data as maybe unused ASoC: es7241: mark OF related data as maybe unused ASoC: samsung: i2s: mark OF related data as maybe unused ASoC: max98371: drop driver pm=NULL assignment ASoC: max98925: drop driver pm=NULL assignment ASoC: max98926: drop driver pm=NULL assignment ASoC: samsung: smdk_wm8994: remove redundant of_match_ptr() sound/soc/codecs/ak4118.c | 2 ++ sound/soc/codecs/ak5558.c | 2 +- sound/soc/codecs/alc5623.c | 2 ++ sound/soc/codecs/alc5632.c | 2 ++ sound/soc/codecs/bd28623.c | 2 +- sound/soc/codecs/da7218.c | 2 ++ sound/soc/codecs/da7219.c | 2 ++ sound/soc/codecs/da9055.c | 2 ++ sound/soc/codecs/es7134.c | 4 ++-- sound/soc/codecs/es7241.c | 2 +- sound/soc/codecs/es8316.c | 2 ++ sound/soc/codecs/gtm601.c | 2 +- sound/soc/codecs/inno_rk3036.c | 2 +- sound/soc/codecs/max98090.c | 2 ++ sound/soc/codecs/max98095.c | 2 ++ sound/soc/codecs/max98371.c | 3 ++- sound/soc/codecs/max9867.c | 2 ++ sound/soc/codecs/max98925.c | 3 ++- sound/soc/codecs/max98926.c | 3 ++- sound/soc/codecs/pcm1789-i2c.c | 2 ++ sound/soc/codecs/pcm179x-i2c.c | 2 ++ sound/soc/codecs/rk3328_codec.c | 2 +- sound/soc/codecs/rt5660.c | 2 ++ sound/soc/codecs/tas2562.c | 2 ++ sound/soc/codecs/tas571x.c | 4 ++-- sound/soc/codecs/tlv320adcx140.c | 2 ++ sound/soc/codecs/tlv320aic23-i2c.c | 2 ++ sound/soc/codecs/ts3a227e.c | 2 ++ sound/soc/kirkwood/armada-370-db.c | 2 +- sound/soc/meson/t9015.c | 2 +- sound/soc/qcom/apq8016_sbc.c | 2 +- sound/soc/qcom/lpass-apq8016.c | 2 +- sound/soc/qcom/lpass-ipq806x.c | 2 +- sound/soc/qcom/lpass-sc7180.c | 2 +- sound/soc/rockchip/rockchip_i2s.c | 2 +- sound/soc/rockchip/rockchip_pdm.c | 2 +- sound/soc/rockchip/rockchip_spdif.c | 2 +- sound/soc/samsung/i2s.c | 8 ++++---- sound/soc/samsung/smdk_wm8994.c | 4 ++-- sound/soc/ti/davinci-i2s.c | 2 +- sound/soc/uniphier/aio-ld11.c | 2 +- sound/soc/uniphier/aio-pxs2.c | 2 +- sound/soc/uniphier/evea.c | 2 +- 43 files changed, 69 insertions(+), 32 deletions(-) -- 2.25.1 commit 7ec3df174f2b225267849d5e645d641d5f98dcd8 Author: Parav Pandit Date: Wed Nov 25 08:46:28 2020 +0200 RDMA/mlx5: Use PCI device for dma mappings DMA operation of the IB device is done using ib_device->dma_device. Instead of accessing parent of the IB device, use the PCI dma device which is setup to ib_device->dma_device during IB device registration. Link: https://lore.kernel.org/r/20201125064628.8431-1-leon@kernel.org Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit d4b2d19dc53ecb5ef4fe79cc2d4b7ae3413b2604 Author: Leon Romanovsky Date: Wed Nov 25 08:17:04 2020 +0200 RDMA/mlx5: Silence the overflow warning while building offset mask Coverity reports "Potentially overflowing expression ..." warning, which is correct thing to complain from the compiler point of view, but this is not possible in the current code. Still, this is a small error as there are some future situations that might need to use a 32 bit offset. Use ULL so the calculation works up to 63. Fixes: b045db62f6f6 ("RDMA/mlx5: Use ib_umem_find_best_pgoff() for SRQ") Link: https://lore.kernel.org/r/20201125061704.6580-1-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit d0b7721c5e0d940a514fbff40b9d7bae92735f7a Author: Jason Gunthorpe Date: Tue Nov 24 19:34:33 2020 -0400 RDMA/mlx5: Check for ERR_PTR from uverbs_zalloc() The return code from uverbs_zalloc() was wrongly checked, it is ERR_PTR not NULL like other allocators: drivers/infiniband/hw/mlx5/devx.c:2110 devx_umem_reg_cmd_alloc() warn: passing zero to 'PTR_ERR' Fixes: 878f7b31c3a7 ("RDMA/mlx5: Use ib_umem_find_best_pgsz() for devx") Link: https://lore.kernel.org/r/0-v1-4d05ccc1c223+173-devx_err_ptr_jgg@nvidia.com Reported-by: kernel test robot Acked-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 66d86e529dd58616495ea0b03cc687e5d6522b59 Author: Weihang Li Date: Mon Nov 16 19:33:27 2020 +0800 RDMA/hns: Add UD support for HIP09 HIP09 supports service type of Unreliable Datagram, add necessary process to enable this feature. Link: https://lore.kernel.org/r/1605526408-6936-7-git-send-email-liweihang@huawei.com Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 534c9bdb025b68b6c575fbc15976b4470e032691 Author: Weihang Li Date: Mon Nov 16 19:33:26 2020 +0800 RDMA/hns: Simplify process of filling UD SQ WQE There are some codes can be simplified or encapsulated in set_ud_wqe() to make them easier to be understand. Link: https://lore.kernel.org/r/1605526408-6936-6-git-send-email-liweihang@huawei.com Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 148f904c6f94cbd9067008142268524a95320dde Author: Weihang Li Date: Mon Nov 16 19:33:25 2020 +0800 RDMA/hns: Remove the portn field in UD SQ WQE This field in UD WQE in not used by hardware. Fixes: 7bdee4158b37 ("RDMA/hns: Fill sq wqe context of ud type in hip08") Link: https://lore.kernel.org/r/1605526408-6936-5-git-send-email-liweihang@huawei.com Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 3631dadfb118821236098a215e59fb5d3e1c30a8 Author: Weihang Li Date: Mon Nov 16 19:33:24 2020 +0800 RDMA/hns: Avoid setting loopback indicator when smac is same as dmac The loopback flag will be set to 1 by the hardware when the source mac address is same as the destination mac address. So the driver don't need to compare them. Fixes: d6a3627e311c ("RDMA/hns: Optimize wqe buffer set flow for post send") Link: https://lore.kernel.org/r/1605526408-6936-4-git-send-email-liweihang@huawei.com Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit fba429fcf9a5e0c4ec2523ecf4cf18bc0507fcbc Author: Weihang Li Date: Mon Nov 16 19:33:23 2020 +0800 RDMA/hns: Fix missing fields in address vector Traffic class and hop limit in address vector is not assigned from GRH, but it will be filled into UD SQ WQE. So the hardware will get a wrong value. Fixes: 82e620d9c3a0 ("RDMA/hns: Modify the data structure of hns_roce_av") Link: https://lore.kernel.org/r/1605526408-6936-3-git-send-email-liweihang@huawei.com Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 7406c0036f851ee1cd93cb08349f24b051b4cbf8 Author: Weihang Li Date: Mon Nov 16 19:33:22 2020 +0800 RDMA/hns: Only record vlan info for HIP08 Information about vlan is stored in GMV(GID/MAC/VLAN) table for HIP09, so there is no need to copy it to address vector. Link: https://lore.kernel.org/r/1605526408-6936-2-git-send-email-liweihang@huawei.com Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit d63250d7fd49503bac48099fcef24ba7985009a3 Author: Dmitry Osipenko Date: Mon Nov 23 03:27:23 2020 +0300 ARM: tegra: Add EMC OPP and ICC properties to Tegra124 EMC and ACTMON device-tree nodes Add EMC OPP DVFS/DFS tables and interconnect paths that will be used for dynamic memory bandwidth scaling based on memory utilization statistics. Update board device-trees by removing unsupported EMC OPPs. Note that ACTMON watches all memory interconnect paths, but we use a single CPU-READ interconnect path for driving memory bandwidth, for simplicity. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 881741fa447d56751fe6f5af66a5c3cae4140903 Author: Dmitry Osipenko Date: Mon Nov 23 03:27:22 2020 +0300 ARM: tegra: Add EMC OPP and ICC properties to Tegra30 EMC and ACTMON device-tree nodes Add EMC OPP tables and interconnect paths that will be used for dynamic memory bandwidth scaling based on memory utilization statistics. Update board device-trees by removing unsupported EMC OPPs. Note that ACTMON watches all memory interconnect paths, but we use a single CPU-READ interconnect path for driving memory bandwidth, for simplicity. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit f5204ac47b298a94eadf8b6c61b534bd9abe2e41 Author: Dmitry Osipenko Date: Mon Nov 23 03:27:21 2020 +0300 ARM: tegra: Add EMC OPP properties to Tegra20 device-trees Add EMC OPP DVFS tables and update board device-trees by removing unsupported OPPs. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit b97967d7d5b73503c9e19557895281af731cdc6a Author: Dmitry Osipenko Date: Mon Nov 23 03:27:20 2020 +0300 ARM: tegra: Add nvidia,memory-controller phandle to Tegra20 EMC device-tree Add nvidia,memory-controller to the Tegra20 External Memory Controller node. This allows to perform a direct lookup of the Memory Controller instead of walking up the whole tree. This puts Tegra20 device-tree on par with Tegra30+. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 5cf0cdbd55892d96168016d097e5657eb9af4b1f Author: Dmitry Osipenko Date: Mon Nov 23 03:27:19 2020 +0300 ARM: tegra: Add interconnect properties to Tegra124 device-tree Add interconnect properties to the Memory Controller, External Memory Controller and the Display Controller nodes in order to describe hardware interconnection. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 69ea8fa77f1c0ce2a726ab283db2472d8a4c3cb6 Author: Dmitry Osipenko Date: Mon Nov 23 03:27:18 2020 +0300 ARM: tegra: Add interconnect properties to Tegra30 device-tree Add interconnect properties to the Memory Controller, External Memory Controller and the Display Controller nodes in order to describe hardware interconnection. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 30b81e77a051e50c1b8d5f3bb697e915231d89a8 Author: Dmitry Osipenko Date: Mon Nov 23 03:27:17 2020 +0300 ARM: tegra: Add interconnect properties to Tegra20 device-tree Add interconnect properties to the Memory Controller, External Memory Controller and the Display Controller nodes in order to describe hardware interconnection. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit d3e815eaab582398ac2257d73399c8cf741bf64b Author: Dmitry Osipenko Date: Mon Nov 16 22:48:27 2020 +0300 ARM: tegra: acer-a500: Add Embedded Controller This patch adds device-tree node for the Embedded Controller which is found on the Picasso board. The Embedded Controller itself is ENE KB930, it provides functions like battery-gauge/LED/GPIO/etc and it uses firmware that is specifically customized for the Acer A500 device. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit dd2a21d0930b3f5b8d5643c8d41008f8f2557d73 Author: Sowjanya Komatineni Date: Mon Nov 23 12:17:20 2020 -0800 ARM: tegra: Change order of SATA resets for Tegra124 Tegra AHCI dt-binding doc is converted from text based to yaml based. dtbs_check valdiation strictly follows reset-names order specified in yaml dt-binding. Tegra124 thru Tegra210 has 3 resets sata, sata-oob and sata-cold. Tegra186 has 2 resets sata and sata-cold. This patch changes order of SATA resets to maintain proper resets order for commonly available resets across Tegra124 thru Tegra186 for dtbs_check to pass. Signed-off-by: Sowjanya Komatineni Signed-off-by: Thierry Reding commit 8b809ba66c29abb0203d43118c31027e43e43648 Author: Dmitry Osipenko Date: Mon Nov 23 03:27:16 2020 +0300 ARM: tegra: Correct EMC registers size in Tegra20 device-tree Fix the size of Tegra20 EMC registers, which should be twice bigger. Acked-by: Krzysztof Kozlowski Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 6fb123f1f5a42136161b7782d9635a684f3036d2 Author: Thierry Reding Date: Fri Nov 20 21:27:12 2020 +0100 ARM: tegra: Properly align clocks for SOCTHERM Entries on subsequent lines should be aligned with the entry on the first line. Signed-off-by: Thierry Reding commit 17401ce98ec6105db8e351c12735b6cc20d73d7e Author: Thierry Reding Date: Fri Nov 20 16:18:08 2020 +0100 ARM: tegra: Hook up edp interrupt on Tegra124 SOCTHERM For some reason this was never hooked up. Do it now so that over-current interrupts can be logged. Reported-by: Nicolas Chauvet Suggested-by: Jon Hunter Signed-off-by: Thierry Reding commit 252cc72af6a2017dae340b4136124d3e625e4e0f Author: Nicolas Chauvet Date: Sun Sep 27 17:09:52 2020 +0200 ARM: tegra: Add missing hot temperatures to Tegra124 thermal-zones According to dmesg, thermal-zones for mem and cpu are missing hot temperatures properties. throttrip: pll: missing hot temperature ... throttrip: mem: missing hot temperature ... Adding them will clear the messages. Signed-off-by: Nicolas Chauvet Signed-off-by: Thierry Reding commit 37ac8c4c04c9441fe05f4215b330775b00df7a99 Author: Nicolas Chauvet Date: Sun Sep 27 17:09:51 2020 +0200 ARM: tegra: Add missing gpu-throt-level to Tegra124 soctherm On Jetson TK1 the following message can be seen: tegra_soctherm 700e2000.thermal-sensor: throttle-cfg: heavy: no throt prop or invalid prop This patch will fix the invalid prop issue according to the binding. Signed-off-by: Nicolas Chauvet Signed-off-by: Thierry Reding commit bd7cd7e05a42491469ca19861da44abc3168cf5f Author: Jon Hunter Date: Wed Nov 11 10:38:47 2020 +0000 ARM: tegra: Populate OPP table for Tegra20 Ventana Commit 9ce274630495 ("cpufreq: tegra20: Use generic cpufreq-dt driver (Tegra30 supported now)") update the Tegra20 CPUFREQ driver to use the generic CPUFREQ device-tree driver. Since this change CPUFREQ support on the Tegra20 Ventana platform has been broken because the necessary device-tree nodes with the operating point information are not populated for this platform. Fix this by updating device-tree for Venata to include the operating point informration for Tegra20. Fixes: 9ce274630495 ("cpufreq: tegra20: Use generic cpufreq-dt driver (Tegra30 supported now)") Cc: stable@vger.kernel.org Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding commit a21f18a993c56566db94ba836684bc32c070a82c Author: Dmitry Osipenko Date: Wed Nov 4 17:12:51 2020 +0300 ARM: tegra: nexus7: Use panel-lvds as the only panel compatible Depending on a driver probe order, panel-simple driver may probe first, which results in this error: panel-simple display-panel: Reject override mode: panel has a fixed mode We don't want to use panel-simple anyways because customized timings are preferred for Nexus 7, hence remove the panel-simple compatibles from the panel node. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit b8ae17150696a3f0f40c91d61103b74884e7ba0a Author: Dmitry Osipenko Date: Wed Nov 4 17:12:49 2020 +0300 ARM: tegra: nexus7: Rename gpio-hog nodes Devicetree schema now requires gpio-hog nodes to have a certain naming pattern, like a -hog suffix. This patch fixes dtbs_check warnings about the names. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 810719453c623e6393cb0b1ca4e41efa08002c9d Author: Dmitry Osipenko Date: Wed Nov 4 17:12:48 2020 +0300 ARM: tegra: nexus7: Add power-supply to lvds-encoder node The lvds-encoder binding now supports power-supply property, let's specify it in the device-tree for completeness. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 2b22393b27670b45a2c870bce3df6579efd9a86a Author: Dmitry Osipenko Date: Wed Nov 4 17:12:47 2020 +0300 ARM: tegra: nexus7: Improve CPU passive-cooling threshold The current CPU thermal limit is a bit inappropriate for Nexus 7 once device is getting used on a daily bases. For example, currently it's may be impossible to watch a hardware accelerated 720p video without hitting a severe CPU throttling, which ruins user experience. This patch improves the thermal throttling thresholds. In my experience setting CPU thermal threshold to 57C provides the most reasonable result, where device is a bit warm under constant load and not getting overly hot, in the same time performance is okay. Let's bump the passive-cooling threshold from 50C to 57C and also lower the thermal hysteresis to 0.2C in order to make throttling more reactive. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 8857779a9faba5789ad30ca1f944a17aaa747056 Author: Dmitry Osipenko Date: Wed Nov 4 17:12:46 2020 +0300 ARM: tegra: nexus7: Correct thermal zone names Rename thermal zones in order fix dt_binding_check warning telling that names do not match the expected pattern. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 5b0455f82b791de3b76bfd220f63dae1ea6b2747 Author: Dmitry Osipenko Date: Wed Nov 4 17:12:45 2020 +0300 ARM: tegra: acer-a500: Add power-supply to lvds-encoder node The lvds-encoder binding now supports power-supply property, let's specify it in the device-tree for completeness. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 94f13b9ca38643e1a1acf3b546d70dea24a17981 Author: Dmitry Osipenko Date: Wed Nov 4 17:12:44 2020 +0300 ARM: tegra: acer-a500: Correct thermal zone names Rename thermal zones in order fix dt_binding_check warning telling that names do not match the expected pattern. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit d7195ac5c9c5356b7cda4668fb64fc537c6be833 Author: Peter Geis Date: Sun Oct 4 13:31:12 2020 +0000 ARM: tegra: Add device-tree for Ouya The Ouya was the sole device produced by Ouya Inc in 2013. It was a game console originally running Android 5 on top of Linux 3.1.10. This patch adds the device tree supporting the Ouya. It has been tested on the original variant with Samsung ram. Signed-off-by: Peter Geis Reviewed-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 85b16c875351e644204223cf4a27804a2204a24b Merge: 3650b228f83ad 24a7eaea0a941 Author: Thierry Reding Date: Thu Nov 26 19:06:15 2020 +0100 Merge branch 'for-5.11/dt-bindings' into for-5.11/arm/dt commit e36f9381420b28e1785d7900d4c1d9db6149cbcd Author: Sameer Pujar Date: Fri Nov 6 21:13:33 2020 +0530 dt-bindings: bus: Convert ACONNECT doc to json-schema Move ACONNECT documentation to YAML format. Signed-off-by: Sameer Pujar Reviewed-by: Rob Herring Signed-off-by: Thierry Reding commit d806cdaea133c0c4d66359e4398651be4715f51f Author: Sameer Pujar Date: Fri Nov 6 21:13:32 2020 +0530 dt-bindings: interrupt-controller: arm,gic: Update Tegra compatibles Update Tegra compatibles to support newer Tegra chips and required combinations. Signed-off-by: Sameer Pujar Reviewed-by: Rob Herring Signed-off-by: Thierry Reding commit 15f76096fabba229476b01c7890f3c3ff843cc11 Author: Sameer Pujar Date: Fri Nov 6 21:13:31 2020 +0530 dt-bindings: dma: Convert ADMA doc to json-schema Move ADMA documentation to YAML format. Signed-off-by: Sameer Pujar Reviewed-by: Rob Herring Signed-off-by: Thierry Reding commit 24a7eaea0a941c9e5e243ffb40073dcafecd3c11 Author: Dmitry Osipenko Date: Wed Nov 4 19:48:55 2020 +0300 dt-bindings: memory: tegra124: Add memory client IDs Each memory client has unique hardware ID, add these IDs. Reviewed-by: Rob Herring Signed-off-by: Dmitry Osipenko Acked-by: Krzysztof Kozlowski Signed-off-by: Thierry Reding commit 3394f98435b598e23cbe8d33f7b9e995535dd721 Author: Vidya Sagar Date: Mon Oct 26 12:09:01 2020 +0530 dt-bindings: Fix entry name for I/O High Voltage property Correct the name of the I/O High Voltage Property from 'nvidia,io-high-voltage' to 'nvidia,io-hv'. Fixes: 2585a584f844 ("pinctrl: Add Tegra194 pinctrl DT bindings") Signed-off-by: Vidya Sagar Acked-by: Rob Herring Signed-off-by: Thierry Reding commit 1f956a64301d5ef4ec8f87e17ef169a3edacfab8 Author: Peter Geis Date: Sun Oct 4 13:31:14 2020 +0000 dt-bindings: ARM: tegra: Add Ouya game console Add a binding for the Tegra30-based Ouya game console. Signed-off-by: Peter Geis Acked-by: Rob Herring Reviewed-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 9572399af3fd40fec85b0da55be37eff4e1498c9 Author: Peter Geis Date: Sun Oct 4 13:31:13 2020 +0000 dt-bindings: Add vendor prefix for Ouya Inc. Ouya is a defunct company from 2012 to 2015. They produced a single device, the Ouya game console. In 2015 they were purchased by Razer Inc. and the Ouya was discontinued. All Ouya services were shuttered in 2019. Signed-off-by: Peter Geis Acked-by: Rob Herring Reviewed-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit f25696bce9604dbfd8d956da6023d18a05ec8ed3 Author: Dmitry Osipenko Date: Wed Nov 4 19:48:54 2020 +0300 dt-bindings: memory: tegra30: Add memory client IDs Each memory client has unique hardware ID, add these IDs. Acked-by: Rob Herring Signed-off-by: Dmitry Osipenko Acked-by: Krzysztof Kozlowski Signed-off-by: Thierry Reding commit 825c7f4aa2866b77c0238855e2f58d56d2f13eae Author: Dmitry Osipenko Date: Wed Nov 4 19:48:53 2020 +0300 dt-bindings: memory: tegra20: Add memory client IDs Each memory client has unique hardware ID, add these IDs. Acked-by: Rob Herring Signed-off-by: Dmitry Osipenko Acked-by: Krzysztof Kozlowski Signed-off-by: Thierry Reding commit 0e1bcf2c05d0a681c04351fbd60812aea99354b6 Author: Nathan Chancellor Date: Thu Nov 19 12:52:44 2020 -0700 memory: tegra30-emc: Remove unnecessary of_node_put in tegra_emc_probe Clang warns: drivers/memory/tegra/tegra30-emc.c:1275:15: warning: variable 'np' is uninitialized when used here [-Wuninitialized] of_node_put(np); ^~ drivers/memory/tegra/tegra30-emc.c:1269:24: note: initialize the variable 'np' to silence this warning There does not need to be an of_node_put call in this error handling block after the shuffling of the np assignment. Remove it so there is no use of uninitialized memory. Fixes: 5e00fd90183a ("memory: tegra30-emc: Continue probing if timings are missing in device-tree") Signed-off-by: Nathan Chancellor Reviewed-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20201119195244.1517236-1-natechancellor@gmail.com Signed-off-by: Krzysztof Kozlowski commit 4a91b11c0a100532c466e07a1372d134ab0e753d Author: Nicolin Chen Date: Wed Oct 7 17:37:46 2020 -0700 memory: tegra: Complete tegra210_swgroups According to Tegra X1 TRM, there are missing swgroups in the tegra210_swgroups list. So this patch adds them to the list. Note that the TEGRA_SWGROUP_GPU (in list) should be actually TEGRA_SWGROUP_GPUB (in TRM), yet TEGRA_SWGROUP_GPU (in TRM) is not being used -- only TEGRA_SWGROUP_GPUB (in TRM) is. So this patch does not add TEGRA_SWGROUP_GPU (in TRM) and keeps TEGRA_SWGROUP_GPU (in list) as it is. Signed-off-by: Nicolin Chen Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20201008003746.25659-6-nicoleotsuka@gmail.com Signed-off-by: Krzysztof Kozlowski commit bf25f3fceffa9e4e5b5a59ed51511ec5ba6a6036 Author: Dmitry Osipenko Date: Wed Nov 11 04:14:38 2020 +0300 memory: tegra30-emc: Continue probing if timings are missing in device-tree EMC driver will become mandatory after turning it into interconnect provider because interconnect users, like display controller driver, will fail to probe using newer device-trees that have interconnect properties. Thus make EMC driver to probe even if timings are missing in device-tree. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20201111011456.7875-9-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit 0c56eda86f8cad705d7d14e81e0e4efaeeaf4613 Author: Dmitry Osipenko Date: Wed Nov 11 04:14:37 2020 +0300 memory: tegra30-emc: Make driver modular Add modularization support to the Tegra30 EMC driver, which now can be compiled as a loadable kernel module. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20201111011456.7875-8-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit 1d1564aabc697d53f19ef40b06d68dc8bde36ad4 Author: Dmitry Osipenko Date: Wed Nov 11 04:14:36 2020 +0300 memory: tegra30: Add FIFO sizes to memory clients The latency allowness is calculated based on buffering capabilities of memory clients. Add FIFO sizes to the Tegra30 memory clients. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20201111011456.7875-7-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit dedf62d6f17fc9cf0389602b6d3d7533cc218679 Author: Dmitry Osipenko Date: Wed Nov 11 04:14:34 2020 +0300 memory: tegra20-emc: Add devfreq support Add devfreq support to the Tegra20 EMC driver. Memory utilization statistics will be periodically polled from the memory controller and appropriate minimum clock rate will be selected by the devfreq governor. Signed-off-by: Dmitry Osipenko Reviewed-by: Chanwoo Choi Link: https://lore.kernel.org/r/20201111011456.7875-5-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit e09312fec1d48c090bc3a4f13c6a01cb94bd5432 Author: Dmitry Osipenko Date: Wed Nov 11 04:14:35 2020 +0300 memory: tegra20-emc: Remove IRQ number from error message Remove IRQ number from error message since it doesn't add any useful information, especially because this number is virtual. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20201111011456.7875-6-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit cba3902b0c3df42969231358a5e8b3d40212b7ad Author: Dmitry Osipenko Date: Wed Nov 11 04:14:33 2020 +0300 memory: tegra20-emc: Factor out clk initialization Factor out clk initialization and make it resource-managed. This makes easier to follow code and will help to make further changes cleaner. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20201111011456.7875-4-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit de47653bd4dd3c1bf38c9983cf19556cab4c4211 Author: Dmitry Osipenko Date: Wed Nov 11 04:14:32 2020 +0300 memory: tegra20-emc: Use dev_pm_opp_set_clkname() The dev_pm_opp_get_opp_table() shouldn't be used by drivers, use dev_pm_opp_set_clkname() instead. Suggested-by: Viresh Kumar Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20201111011456.7875-3-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit 3a0b6b5abfddd0baf0a053aec7e8be59cf33b659 Author: Dmitry Osipenko Date: Wed Nov 11 04:14:31 2020 +0300 memory: tegra: Correct stub of devm_tegra_memory_controller_get() Correct typo in a stub of devm_tegra_memory_controller_get() to fix a non-ARM kernel compile-testing. Reported-by: Stephen Rothwell Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20201111011456.7875-2-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit d5ef16ba5fbe128873a55441d85ccde77f63c129 Author: Dmitry Osipenko Date: Wed Nov 4 19:49:11 2020 +0300 memory: tegra20: Support interconnect framework Now Internal and External Memory Controllers are memory interconnection providers. This allows us to use interconnect API for tuning of memory configuration. EMC driver now supports OPPs and DVFS. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20201104164923.21238-36-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit fa4794ff8fb4b324ae5b9f089312bcd4ce4ff6ed Author: Dmitry Osipenko Date: Wed Nov 4 19:49:10 2020 +0300 memory: tegra20-emc: Continue probing if timings are missing in device-tree EMC driver will become mandatory after turning it into interconnect provider because interconnect users, like display controller driver, will fail to probe using newer device-trees that have interconnect properties. Thus make EMC driver to probe even if timings are missing in device-tree. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20201104164923.21238-35-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit 0260979b018faaf90ff5a7bb04ac3f38e9dee6e3 Author: Dmitry Osipenko Date: Wed Nov 4 19:49:09 2020 +0300 memory: tegra20-emc: Make driver modular Add modularization support to the Tegra20 EMC driver, which now can be compiled as a loadable kernel module. Signed-off-by: Dmitry Osipenko Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20201104164923.21238-34-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit 06f079816d4c4e43d4128f394ae249934a32dffd Author: Dmitry Osipenko Date: Wed Nov 4 19:49:08 2020 +0300 memory: tegra-mc: Add interconnect framework Add common SoC-agnostic ICC framework which turns Tegra Memory Controller into a memory interconnection provider. This allows us to use interconnect API for tuning of memory configurations. Signed-off-by: Dmitry Osipenko Tested-by: Peter Geis Tested-by: Nicolas Chauvet Link: https://lore.kernel.org/r/20201104164923.21238-33-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit d5ecac0afa30811901eb401067f196e688aeb73e Author: Dmitry Osipenko Date: Wed Nov 4 19:49:07 2020 +0300 memory: tegra: Add missing latency allowness entry for Page Table Cache Add missing PTC memory client latency allowness entry to the Tegra MC drivers. This prevents erroneous clearing of MC_INTSTATUS 0x0 register during of the LA programming in tegra_mc_setup_latency_allowance() due to the missing entry. Note that this patch doesn't fix any known problems. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20201104164923.21238-32-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit 162641a6e200e935cd39b26737f3ec0b5ea856fb Author: Dmitry Osipenko Date: Wed Nov 4 19:49:06 2020 +0300 memory: tegra: Remove superfluous error messages around platform_get_irq() The platform_get_irq() prints error message telling that interrupt is missing, hence there is no need to duplicated that message in the drivers. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20201104164923.21238-31-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit 4e84d0a6e1206fda47395b5d3af1453e013d7b38 Author: Dmitry Osipenko Date: Wed Nov 4 19:49:05 2020 +0300 memory: tegra: Use devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() helper which makes code a bit cleaner. Signed-off-by: Dmitry Osipenko Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20201104164923.21238-30-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit 9c45662675b38e80fff48397506cf9fd9936b6f3 Author: Vinod Koul Date: Thu Nov 26 14:57:11 2020 +0530 soc: qcom: rpmhpd: Add SDX55 power domains This adds the power domains found in SDX55 SoC. Downstream code tells me that we have 3 power domains so add them Acked-by: Manivannan Sadhasivam Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20201126092711.1084518-2-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit 6c6bd2075f01f8c8ae4bc803ba5cd23a3d3db533 Author: Dmitry Osipenko Date: Wed Nov 4 19:49:04 2020 +0300 memory: tegra: Add and use devm_tegra_memory_controller_get() Multiple Tegra drivers need to retrieve Memory Controller and there is duplication of the retrieval code among the drivers. Add new devm_tegra_memory_controller_get() helper to remove the code's duplication and to fix put_device() which was missed in the duplicated code. Make EMC drivers to use the new helper. Signed-off-by: Dmitry Osipenko Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20201104164923.21238-29-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit f365bd3355145891762f32f93f2b388c34ed5115 Author: Vinod Koul Date: Thu Nov 26 14:57:10 2020 +0530 dt-bindings: power: Add rpm power domain bindings for sdx55 Add RPM power domain bindings for the SDX55 SoC Acked-by: Manivannan Sadhasivam Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20201126092711.1084518-1-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit 7f3cdaf795dbc4a270d3af304e7eb8d6234b5f07 Merge: c553bb54a486e 245157a31e91a Author: Krzysztof Kozlowski Date: Thu Nov 26 18:50:04 2020 +0100 Merge tag 'tegra-soc-clk-drivers-5.11' into for-v5.11/tegra-mc Tegra SoC and clock controller changes for v5.11 Export symbols and add stubs necessary for upcoming modified Tegra memory controller drivers (touching also devfreq and interconnect). Signed-off-by: Krzysztof Kozlowski commit 0fc0f4b6aded9ac5316e1c0d49c3813586415e90 Author: Alex Elder Date: Wed Nov 25 19:54:57 2020 -0600 arm64: dts: qcom: sdm845: use GIC_SPI for IPA interrupts Use GIC_SPI rather than 0 in the specifiers for the two ARM GIC interrupts used by IPA. Signed-off-by: Alex Elder Link: https://lore.kernel.org/r/20201126015457.6557-4-elder@linaro.org Signed-off-by: Bjorn Andersson commit cfee3ea05cf2c28e24801811b0109689b3303caa Author: Alex Elder Date: Wed Nov 25 19:54:56 2020 -0600 arm64: dts: qcom: sc7180: use GIC_SPI for IPA interrupts Use GIC_SPI rather than 0 in the specifiers for the two ARM GIC interrupts used by IPA. Signed-off-by: Alex Elder Link: https://lore.kernel.org/r/20201126015457.6557-3-elder@linaro.org Signed-off-by: Bjorn Andersson commit 8f34831d3659d38f480fddccb76d84c6c3e0ac0b Author: Alex Elder Date: Wed Nov 25 19:54:55 2020 -0600 arm64: dts: qcom: sc7180: limit IPA iommu streams Recently we learned that Android and Windows firmware don't seem to like using 3 as an iommu mask value for IPA. A simple fix was to specify exactly the streams needed explicitly, rather than implying a range with the mask. Make the same change for the SC7180 platform. See also: https://lore.kernel.org/linux-arm-msm/20201123052305.157686-1-bjorn.andersson@linaro.org/ Fixes: d82fade846aa8 ("arm64: dts: qcom: sc7180: add IPA information") Reviewed-by: Bjorn Andersson Signed-off-by: Alex Elder Link: https://lore.kernel.org/r/20201126015457.6557-2-elder@linaro.org Signed-off-by: Bjorn Andersson commit 0924dad5d45882d7946416fd16c754d2a894d326 Author: Maulik Shah Date: Thu Nov 26 14:01:30 2020 +0530 soc: qcom: rpmh: Use __fill_rpmh_msg API during rpmh_write() Use __fill_rpmh_msg API during rpmh_write(). This allows to remove duplication of code in error checking, copying commands and setting message state. Reviewed-by: Bjorn Andersson Signed-off-by: Maulik Shah Link: https://lore.kernel.org/r/1606379490-4052-1-git-send-email-mkshah@codeaurora.org Signed-off-by: Bjorn Andersson commit 24244cefeddef68da2030dabdcd8079f31c5be25 Author: Sai Prakash Ranjan Date: Thu Nov 26 10:54:22 2020 +0530 arm64: dts: qcom: sm8150: Add Coresight support Add coresight components found on Qualcomm Technologies, Inc. SM8150 SoC. Signed-off-by: Sai Prakash Ranjan Reviewed-by: Mathieu Poirier Link: https://lore.kernel.org/r/20201126052422.24869-1-saiprakash.ranjan@codeaurora.org Signed-off-by: Bjorn Andersson commit 45dfa741df8607ee4a45455c194ce654badb2478 Author: Iskren Chernev Date: Thu Nov 26 16:11:44 2020 +0200 ARM: dts: qcom: msm8974-lge-nexus5: Add fuel gauge The LG Nexus 5 uses a maxim17048 fuelgauge. The maxim,rcomp value is taken from downstream dt. Temperature-based compensation is not yet supported in the mainline driver, but the readings seem fine nevertheless. Signed-off-by: Iskren Chernev Tested-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20201126141144.1763779-2-iskren.chernev@gmail.com Signed-off-by: Bjorn Andersson commit da8d46992e672ec7300b5b6857d0a4eebf0727ac Author: Iskren Chernev Date: Thu Nov 26 16:11:43 2020 +0200 ARM: dts: qcom: msm8974-klte: Add fuel gauge The Samsung Galaxy S5 uses a maxim17048 fuelgauge. The maxim,rcomp value is taken from downstream kernel. Model data and temperature-based compensation are not yet supported in the mainline driver, but the readings seem fine nevertheless. Signed-off-by: Iskren Chernev Link: https://lore.kernel.org/r/20201126141144.1763779-1-iskren.chernev@gmail.com Signed-off-by: Bjorn Andersson commit 90a996544946d1d4834ec2ec8add586edd905779 Author: Lukasz Luba Date: Tue Nov 24 16:10:25 2020 +0000 thermal: power allocator: change the 'k_*' always in estimate_pid_constants() The PID coefficients should be estimated again when there was a change to sustainable power value made by user. This change removes unused argument 'force' and makes the function ready for such updates. Signed-off-by: Lukasz Luba Reviewed-by: Ionela Voinescu Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201124161025.27694-4-lukasz.luba@arm.com commit eda1ecfa772f11b68b0ddb8d1c3948451fcff5d6 Author: Lukasz Luba Date: Tue Nov 24 16:10:24 2020 +0000 thermal: power allocator: refactor sustainable power estimation The sustainable power value might come from the Device Tree or can be estimated in run time. The sustainable power might be updated by the user via sysfs interface, which should trigger new estimation of PID coefficients. There is no need to estimate it every time when the governor is called and temperature is high. Instead, store the estimated value and make it available via standard sysfs interface, so it can be checked from the user-space. Signed-off-by: Lukasz Luba Reviewed-by: Ionela Voinescu Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201124161025.27694-3-lukasz.luba@arm.com commit e34a7233896928e4e39d3cdb201ce605d5b258c2 Author: Lukasz Luba Date: Tue Nov 24 16:10:23 2020 +0000 thermal: power allocator: change the 'k_i' coefficient estimation Intelligent Power Allocation (IPA) is built around the PID controller concept. The initialization code tries to setup the environment based on the information available in DT or estimate the value based on minimum power reported by each of the cooling device. The estimation will have an impact on the PID controller behaviour via the related 'k_po', 'k_pu', 'k_i' coefficients and also on the power budget calculation. This change prevents the situation when 'k_i' is relatively big compared to 'k_po' and 'k_pu' values. This might happen when the estimation for 'sustainable_power' returned small value, thus 'k_po' and 'k_pu' are small. Signed-off-by: Lukasz Luba Reviewed-by: Ionela Voinescu Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201124161025.27694-2-lukasz.luba@arm.com commit 8138a4c21b090ae400916a9fdf0e59296aae01c6 Author: Avihai Horon Date: Sun Nov 15 14:14:25 2020 +0200 RDMA/mlx4: Enable querying AH for XRC QP types Address handle is set for connected QP types such as RC and UC, and thus can also be queried. Since XRC QP types INI and TGT are connected, it should be possible to query their address handle as well. Until now it was not the case, and although the firmware supported it, the driver allowed querying the address handle only for RC and UC. Hence, we enable it now for INI and TGT QPs as well. Link: https://lore.kernel.org/r/20201115121425.139833-3-leon@kernel.org Reviewed-by: Maor Gottlieb Signed-off-by: Avihai Horon Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit f957d4d09a5ff79b0f7d29fb60ba7682260e58a5 Author: Avihai Horon Date: Sun Nov 15 14:14:24 2020 +0200 RDMA/mlx5: Enable querying AH for XRC QP types Address handle is set for connected QP types such as RC and UC, and thus can also be queried. Since XRC QP types INI and TGT are connected, it should be possible to query their address handle as well. Until now it was not the case, and although the firmware supported it, the driver allowed querying the address handle only for RC and UC. Hence, we enable it now for INI and TGT QPs as well. Link: https://lore.kernel.org/r/20201115121425.139833-2-leon@kernel.org Reviewed-by: Maor Gottlieb Signed-off-by: Avihai Horon Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit d24396c5290ba8ab04ba505176874c4e04a2d53c Author: Rustam Kovhaev Date: Sun Nov 1 06:09:58 2020 -0800 reiserfs: add check for an invalid ih_entry_count when directory item has an invalid value set for ih_entry_count it might trigger use-after-free or out-of-bounds read in bin_search_in_dir_item() ih_entry_count * IH_SIZE for directory item should not be larger than ih_item_len Link: https://lore.kernel.org/r/20201101140958.3650143-1-rkovhaev@gmail.com Reported-and-tested-by: syzbot+83b6f7cf9922cae5c4d7@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?extid=83b6f7cf9922cae5c4d7 Signed-off-by: Rustam Kovhaev Signed-off-by: Jan Kara commit 05cdf457477d6603b207d91873f0a3d4c7f8c1cd Author: Michal Simek Date: Thu Nov 26 14:32:25 2020 +0100 microblaze: Remove noMMU code This configuration is obsolete and likely none is really using it. That's why remove it to simplify code. Note about CONFIG_MMU in hw_exception_handler.S is left intentionally for better comment understanding. Cc: Mike Rapoport Cc: Arnd Bergmann Signed-off-by: Michal Simek Acked-by: Mike Rapoport Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/43486cab370e0c0a79860120b71e0caac75a7e44.1606397528.git.michal.simek@xilinx.com commit 48f6e195039486bc303118948f49a9873acc888f Author: Sameer Pujar Date: Wed Nov 18 13:36:20 2020 +0530 arm64: tegra: Fix Tegra194 HDA {clock,reset}-names ordering As per the HDA binding doc reorder {clock,reset}-names entries for Tegra194. This also serves as a preparation for converting existing binding doc to json-schema. Signed-off-by: Sameer Pujar Signed-off-by: Thierry Reding commit a886c310d9fcb0e66253d4af225cba13f9bdf5d2 Author: Sivaram Nair Date: Wed Oct 21 13:10:54 2020 +0300 clk: tegra: bpmp: Clamp clock rates on requests BPMP firmware ABI expects the rate inputs in int64_t. However, tegra_bpmp_clk_round_rate() and tegra_bpmp_clk_set_rate() functions directly assign 'unsigned long' inputs to a int64_t value causing unexpected rounding errors. Fix this by clipping the input rate to S64_MAX. Signed-off-by: Sivaram Nair [mperttunen: slight cleanup] Signed-off-by: Mikko Perttunen Reviewed-by: Sivaram Nair Signed-off-by: Thierry Reding commit e061fbdf7d78813a352a6c179fca837e1842883b Author: Sowjanya Komatineni Date: Mon Nov 23 12:17:24 2020 -0800 arm64: tegra: Enable AHCI on Jetson TX2 This patch enables AHCI on Jetson TX2. Signed-off-by: Sowjanya Komatineni Signed-off-by: Thierry Reding commit c84ebdfd26645731cc1d9255df94b66de489093e Author: Sowjanya Komatineni Date: Mon Nov 23 12:17:21 2020 -0800 arm64: tegra: Change order of SATA resets for Tegra132 and Tegra210 Tegra AHCI dt-binding doc is converted from text based to yaml based. dtbs_check valdiation strictly follows reset-names order specified in yaml dt-binding. Tegra124 thru Tegra210 has 3 resets sata, sata-oob and sata-cold. Tegra186 has 2 resets sata and sata-cold. This patch changes order of SATA resets to maintain proper resets order for commonly available resets across Tegra124 thru Tegra186 for dtbs_check to pass. Signed-off-by: Sowjanya Komatineni Signed-off-by: Thierry Reding commit 6450da3dab73e25e38b7efd57b0699d3d01bde26 Author: JC Kuo Date: Thu Nov 19 16:54:03 2020 +0800 arm64: tegra: Add XUSB pad controller interrupt This commit adds "interrupts" property to Tegra210/Tegra186/Tegra194 XUSB PADCTL node. XUSB PADCTL interrupt will be raised when USB wake event happens. This is required for supporting XUSB host controller ELPG. Signed-off-by: JC Kuo Signed-off-by: Thierry Reding commit 058236eef606ea53ea7317afc20e9469cf3c3b91 Author: Yang Yingliang Date: Thu Nov 26 21:38:25 2020 +0800 iommu: return error code when it can't get group Although iommu_group_get() in iommu_probe_device() will always succeed thanks to __iommu_probe_device() creating the group if it's not present, it's still worth initialising 'ret' to -ENODEV in case this path is reachable in the future. For now, this patch results in no functional change. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20201126133825.3643852-1-yangyingliang@huawei.com Signed-off-by: Will Deacon commit 912b341585e302ee44fc5a2733f7bcf505e2c86f Author: Vadim Pasternak Date: Wed Nov 25 12:10:56 2020 +0200 platform/x86: mlx-platform: Remove PSU EEPROM from MSN274x platform configuration Remove PSU EEPROM configuration for systems class equipped with Mellanox chip Spectrum and ATOM CPU - system types MSN274x. Till now all the systems from this class used few types of power units, all equipped with EEPROM device with address space two bytes. Thus, all these devices have been handled by EEPROM driver "24c02". There is a new requirement is to support power unit replacement by "off the shelf" device, matching electrical required parameters. Such device can be equipped with different EEPROM type, which could be one byte address space addressing or even could be not equipped with EEPROM. In such case "24c02" will not work. Fixes: ef08e14a3 ("platform/x86: mlx-platform: Add support for new msn274x system type") Signed-off-by: Vadim Pasternak Link: https://lore.kernel.org/r/20201125101056.174708-3-vadimp@nvidia.com Signed-off-by: Hans de Goede commit 2bf5046bdb649908df8bcc0a012c56eee931a9af Author: Vadim Pasternak Date: Wed Nov 25 12:10:55 2020 +0200 platform/x86: mlx-platform: Remove PSU EEPROM from default platform configuration Remove PSU EEPROM configuration for systems class equipped with Mellanox chip Spectrum and Celeron CPU - system types MSN2700, MSN2100. Till now all the systems from this class used few types of power units, all equipped with EEPROM device with address space two bytes. Thus, all these devices have been handled by EEPROM driver "24c02". There is a new requirement is to support power unit replacement by "off the shelf" device, matching electrical required parameters. Such device can be equipped with different EEPROM type, which could be one byte address space addressing or even could be not equipped with EEPROM. In such case "24c02" will not work. Fixes: c6acad68e ("platform/mellanox: mlxreg-hotplug: Modify to use a regmap interface") Fixes: ba814fdd0 ("platform/x86: mlx-platform: Use defines for bus assignment") Signed-off-by: Vadim Pasternak Link: https://lore.kernel.org/r/20201125101056.174708-2-vadimp@nvidia.com Signed-off-by: Hans de Goede commit 88b9ae600138baff18c7f4c4870622584acc6111 Author: Neil Armstrong Date: Thu Nov 26 15:16:00 2020 +0100 clk: meson: g12a: add MIPI DSI Host Pixel Clock This adds the MIPI DSI Host Pixel Clock, unlike AXG, the pixel clock can be different from the VPU ENCL output clock to feed the DSI Host controller with a different clock rate. Signed-off-by: Neil Armstrong Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20201126141600.2084586-3-narmstrong@baylibre.com commit dee6ecc7c330ba471192614015f8a072b2d1bb75 Merge: 20425f6319480 312489790cc6c Author: Jerome Brunet Date: Thu Nov 26 15:25:12 2020 +0100 Merge branch 'v5.11/headers' into v5.11/drivers commit e8637dfca15e065f9326e0fad222ccf1fbed1089 Author: Matthias Maier Date: Wed Nov 25 18:04:16 2020 -0600 platform/x86: thinkpad_acpi: Whitelist P15 firmware for dual fan control This commit enables dual fan control for the following new Lenovo models: P15, P15v. Signed-off-by: Matthias Maier Link: https://lore.kernel.org/r/20201126000416.2459645-2-tamiko-ibm-acpi-devel@43-1.org Signed-off-by: Hans de Goede commit 312489790cc6c760f8b7795b8f1ded45bafc318c Author: Neil Armstrong Date: Thu Nov 26 15:15:59 2020 +0100 dt-bindings: clk: g12a-clkc: add DSI Pixel clock bindings This adds the MIPI DSI Host Pixel Clock bindings. Signed-off-by: Neil Armstrong Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20201126141600.2084586-2-narmstrong@baylibre.com commit 4fc2cf1f2daf8303000efb7c9dc0307ea638a8f3 Author: Justin Ernst Date: Wed Nov 25 11:54:42 2020 -0600 x86/platform/uv: Add new uv_sysfs platform driver Add the uv_sysfs driver to construct a read-only sysfs interface at /sys/firmware/sgi_uv/ to expose information gathered from UV BIOS. This information includes: * UV Hub descriptions, including physical location * Cabling layout between hubs on the fabric * PCI topology, including physical location of PCI cards Together, the information provides a robust physical description of a UV system, useful for correlating to performance data or performing remote support. Signed-off-by: Justin Ernst Signed-off-by: Borislav Petkov Reviewed-by: Steve Wahl Acked-by: Hans de Goede Link: https://lkml.kernel.org/r/20201125175444.279074-4-justin.ernst@hpe.com commit 01d13862543d3a017270ad84170579848472589f Author: Olivier Moysan Date: Fri Nov 20 10:15:06 2020 +0100 ARM: multi_v7_defconfig: enable STM32 dfsdm audio support Add STM32 DFSDM audio support by enabling CONFIG_SND_SOC_STM32_DFSDM as module. Signed-off-by: Olivier Moysan Reviewed-by: Krzysztof Kozlowski Signed-off-by: Alexandre Torgue commit 1c6b157ba6bdfd309ce53819116601da230a1431 Author: Olivier Moysan Date: Fri Nov 20 10:15:05 2020 +0100 ARM: multi_v7_defconfig: enable STM32 spdifrx support Add STM32 SPDIFRX support by enabling CONFIG_SND_SOC_STM32_SPDIFRX as module. Signed-off-by: Olivier Moysan Reviewed-by: Krzysztof Kozlowski Signed-off-by: Alexandre Torgue commit 89391783174e12d621d82bc41b4b017363bf2827 Author: Amelie Delaunay Date: Fri Nov 6 17:58:05 2020 +0100 ARM: multi_v7_defconfig: enable STUSB160X Type-C port controller support Enable support for the STMicroelectronics STUSB160X USB Type-C port controller driver by turning on CONFIG_TYPEC and CONFIG_TYPEC_STUSB160X as modules. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre Torgue commit 8e4eeb83a692a4d3be60854e9cf7a045e440db78 Author: Lionel Debieve Date: Thu Nov 5 10:47:30 2020 +0100 ARM: multi_v7_defconfig: add STM32 crypto support Enable crypto controllers enabling following flags as module: CONFIG_CRYPTO_DEV_STM32_CRC CONFIG_CRYPTO_DEV_STM32_HASH CONFIG_CRYPTO_DEV_STM32_CRYP Signed-off-by: Lionel Debieve Signed-off-by: Alexandre Torgue commit 46957c06d35bb0caf07cc032600f6a3391eb47d1 Author: Fabrice Gasnier Date: Fri Oct 16 10:00:29 2020 +0200 ARM: multi_v7_defconfig: enable counter subsystem and stm32 counter drivers This enables the counter subsystem and drivers for the stm32 timer and LP timer. Signed-off-by: Fabrice Gasnier Signed-off-by: Alexandre Torgue commit 6660e2445523a57410de008a9b137d2c0a66e94a Author: Ahmad Fatoum Date: Tue Nov 10 11:25:51 2020 +0100 ARM: dts: stm32: lxa-mc1: add OSD32MP15x to list of compatibles Earlier commit modified the binding, so the SiP is to be specified as well. Adjust the device tree accordingly. Signed-off-by: Ahmad Fatoum Signed-off-by: Alexandre Torgue commit acf6f3316376ea25d74bd8cf6f1f51ecdd67cee9 Author: Ahmad Fatoum Date: Tue Nov 10 11:25:50 2020 +0100 dt-bindings: arm: stm32: add extra SiP compatible for lxa,stm32mp157c-mc1 The Linux Automation MC-1 is built around an OSD32MP15x SiP with CPU, RAM, PMIC, Oscillator and EEPROM. Adjust the binding, so the SiP compatible is contained as well. This allows boot firmware to match against it to apply fixups if necessary. Signed-off-by: Ahmad Fatoum Acked-by: Rob Herring Signed-off-by: Alexandre Torgue commit a24bde12f949c7a694094126a0979b3807274cbb Author: Ahmad Fatoum Date: Tue Nov 10 11:25:49 2020 +0100 dt-bindings: vendor-prefixes: document Octavo Systems oct prefix Octavo Systems is an American company specializing in design and manufacturing of System-in-Package devices. The prefix is already in use for the Octavo Systems OSD3358-SM-RED device tree, but was so far undocumented. Fix this. Signed-off-by: Ahmad Fatoum Acked-by: Rob Herring Cc: Neeraj Dantu Signed-off-by: Alexandre Torgue commit ac68793f49de74c4046e760b6370f70c51d4aef9 Author: Marek Vasut Date: Tue Nov 3 19:11:37 2020 +0100 ARM: dts: stm32: Add DHCOM based PicoITX board Add DT for DH PicoITX unit, which is a bare-bones carrier board for the DHCOM. The board has ethernet port, USB, CAN, LEDs and a custom board-to-board expansion connector. Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Maxime Coquelin Cc: Patrice Chotard Cc: Patrick Delaunay Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue commit 242639c0dc25728b94f5db3072635415d0c4cffa Author: Marek Vasut Date: Sun Nov 8 23:14:38 2020 +0100 dt-bindings: arm: stm32: Add compatible strings for DH SoMs and boards Document devicetree compatible strings of the DH SoMs and boards. Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Maxime Coquelin Cc: Patrice Chotard Cc: Patrick Delaunay Cc: Rob Herring Cc: devicetree@vger.kernel.org Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Acked-by: Rob Herring Signed-off-by: Alexandre Torgue commit b19d3a55d4789a657c3c6b247ab5c9d8611a8a86 Author: Ahmad Fatoum Date: Wed Oct 21 12:28:56 2020 +0200 ARM: dts: stm32: support child mfd cells for the stm32mp1 TAMP syscon The stm32mp1 TAMP peripheral has 32 backup registers that survive a warm reset. This makes them suitable for storing a reboot mode, which the vendor's kernel tree is already doing[0]. The actual syscon-reboot-mode child node can be added by a board.dts or fixed up by the bootloader. For the child node to be probed, the compatible needs to include simple-mfd. The binding now specifies this, so have the SoC dtsi adhere to it. [0]: https://github.com/STMicroelectronics/linux/commit/2e9bfc29dd Signed-off-by: Ahmad Fatoum Signed-off-by: Alexandre Torgue commit 82765d149583730c943a5d23d0bad3e647364dc1 Author: Ahmad Fatoum Date: Wed Oct 21 12:28:55 2020 +0200 dt-bindings: arm: stm32: add simple-mfd compatible for tamp node The stm32mp1 TAMP (Tamper and backup registers) does tamper detection and features 32 backup registers that, being in the RTC domain, may survive even with Vdd switched off. This makes it suitable for use to communicate a reboot mode from OS to bootloader via the syscon-reboot-mode binding. Add a "simple-mfd" to support probing such a child node. The actual reboot mode node could then be defined in a board.dts or fixed up by the bootloader. Signed-off-by: Ahmad Fatoum Reviewed-by: Rob Herring Signed-off-by: Alexandre Torgue commit 4c903a946404dd96c45947c619c42d03020f9097 Author: Arnaud Pouliquen Date: Wed Oct 14 14:54:41 2020 +0200 ARM: dts: stm32: update stm32mp151 for remote proc synchronization support Two backup registers are used to store the Cortex-M4 state and the resource table address. Declare the tamp node and add associated properties in m4_rproc node to allow Linux to attach to a firmware loaded by the first boot stages. Associated driver implementation is available in commit 9276536f455b3 ("remoteproc: stm32: Parse syscon that will manage M4 synchronisation"). Signed-off-by: Arnaud Pouliquen Signed-off-by: Alexandre Torgue commit d27209f04d7f0e388281ba04d3cb97772c0eecff Author: Amelie Delaunay Date: Tue Nov 10 14:10:59 2020 +0100 ARM: dts: stm32: adjust USB OTG gadget fifo sizes in stm32mp151 Defaut use case on stm32mp151 USB OTG is ethernet gadget, using EP1 bulk endpoint (MPS=512 bytes) and EP2 interrupt endpoint (MPS=16 bytes). This patch optimizes USB OTG FIFO sizes accordingly. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre Torgue commit 7e4bc946db78ec0311b486fadc929965fda85808 Author: Amelie Delaunay Date: Tue Nov 10 15:27:37 2020 +0100 ARM: dts: stm32: fix dmamux reg property on stm32h743 Reg property length should cover all DMAMUX_CxCR registers. DMAMUX_CxCR Address offset: 0x000 + 0x04 * x (x = 0 to 15), so latest offset is at 0x3c, so length should be 0x40. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre Torgue commit e3b37ca311bb72411f97d269ee4c6a6738a1e9d9 Author: Amelie Delaunay Date: Tue Nov 10 15:27:36 2020 +0100 ARM: dts: stm32: fix dmamux reg property on stm32mp151 Reg property length should cover all DMAMUX_CxCR registers. DMAMUX_CxCR Address offset: 0x000 + 0x04 * x (x = 0 to 15), so latest offset is at 0x3c, so length should be 0x40. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre Torgue commit fc082d2bb2f4860e065ae4d7f50d123bf4861d66 Author: Amelie Delaunay Date: Tue Nov 10 15:36:41 2020 +0100 ARM: dts: stm32: fix mdma1 clients channel priority level on stm32mp151 Update mdma1 clients channel priority level following stm32-mdma bindings. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre Torgue commit 83686162c0eb9d94dcab5d6a4e34fc545c331c63 Author: Amelie Delaunay Date: Fri Nov 6 17:58:04 2020 +0100 ARM: dts: stm32: add STUSB1600 Type-C using I2C4 on stm32mp15xx-dkx This patch adds support for STUSB1600 USB Type-C port controller, used on I2C4 on stm32mp15xx-dkx. The default configuration on this board, on Type-C connector, is: - Dual Power Role (DRP), so set power-role to "dual"; - Vbus limited to 500mA, so set typec-power-opmode to "default" (it means 500mA in USB 2.0). typec-power-opmode is used to reconfigure the STUSB1600 advertising of current capability when its NVM is not in line with the board layout. On stm32mp15xx-dkx, Vbus power source of STUSB1600 is 5V_VIN. So power operation mode depends on the power supply used. To avoid any power issues, it is better to limit Vbus to 500mA on this board. ALERT# is the interrupt pin of STUSB1600. It needs an external pull-up, and signal is active low. USB OTG controller ID and Vbus signals are not connected on stm32mp15xx-dkx boards, so disconnection are not detected. Without DWC2 usb-role-switch: - if you unplug the USB cable from the Type-C port, you have to manually disconnect the USB gadget: echo disconnect > /sys/devices/platform/soc/49000000.usb-otg/udc/49000000.usb-otg/soft_connect - Then you can plug the USB cable again in the Type-C port, and manually reconnect the USB gadget: echo connect > /sys/devices/platform/soc/49000000.usb-otg/udc/49000000.usb-otg/soft_connect With DWC2 usb-role-switch, USB gadget is dynamically disconnected or connected. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre Torgue commit 70966729b564cb7deb6aee1bd6212a1b594699f4 Author: Amelie Delaunay Date: Fri Nov 6 17:58:02 2020 +0100 dt-bindings: usb: Add DT bindings for STUSB160x Type-C controller Add binding documentation for the STMicroelectronics STUSB160x Type-C port controller. Signed-off-by: Amelie Delaunay Reviewed-by: Rob Herring Signed-off-by: Alexandre Torgue commit 8e568db6020f13561a4e3e025a17a7572f80ed35 Author: Amelie Delaunay Date: Fri Nov 6 17:58:01 2020 +0100 dt-bindings: connector: add typec-power-opmode property to usb-connector Power operation mode may depends on hardware design, so, add the optional property typec-power-opmode for usb-c connector to select the power operation mode capability. Signed-off-by: Amelie Delaunay Reviewed-by: Rob Herring Signed-off-by: Alexandre Torgue commit dc37a51b258c13bf9dc8f34c5772cb45b93d35ae Author: Patrick Delaunay Date: Thu Oct 22 19:38:51 2020 +0200 ARM: dts: stm32: reorder spi4 within stm32mp15-pinctrl Move spi4 at the right alphabetical place within stm32mp15-pinctrl Fixes: 4fe663890ac5 ("ARM: dts: stm32: Fix spi4 pins in stm32mp15-pinctrl") Signed-off-by: Patrick Delaunay Signed-off-by: Alexandre Torgue commit 096b0243fae36282bb774421e4bcaeb8387e87e1 Author: Hugues Fruchet Date: Wed Nov 4 18:32:12 2020 +0100 ARM: dts: stm32: set bus-type in DCMI endpoint for stm32429i-eval board Explicitly set bus-type to parallel mode in DCMI endpoint (bus-type=5). Signed-off-by: Hugues Fruchet Signed-off-by: Alexandre Torgue commit 07e3454493e26fd5830c66a02eba705115748195 Author: Hugues Fruchet Date: Wed Nov 4 18:32:11 2020 +0100 ARM: dts: stm32: set bus-type in DCMI endpoint for stm32mp157c-ev1 board Explicitly set bus-type to parallel mode in DCMI endpoint (bus-type=5). Signed-off-by: Hugues Fruchet Signed-off-by: Alexandre Torgue commit b6aa35c7393680ee0a1286ca3b3237fd106ef896 Author: Lionel Debieve Date: Thu Nov 5 11:23:31 2020 +0100 ARM: dts: stm32: enable CRYP by default on stm32mp15 Enable CRYP1 device for cryp accelerated support on stm32mp157C-EV1/DK2 STMicroelectronics platforms. Signed-off-by: Nicolas Toromanoff Signed-off-by: Lionel Debieve Signed-off-by: Alexandre Torgue commit ee0035b23327007c1455f47ab442e591f0eb8afe Author: Nicolas Toromanoff Date: Thu Nov 5 11:23:30 2020 +0100 ARM: dts: stm32: enable CRC1 by default on stm32mp15 Enable CRC1 device for CRC-32 accelerated support on stm32mp15 STMicroelectronics platforms. Signed-off-by: Nicolas Toromanoff Signed-off-by: Lionel Debieve Signed-off-by: Alexandre Torgue commit 304b5691bfd06c94fedff34a08ffbce0bfcfa0cb Author: Lionel Debieve Date: Thu Nov 5 11:23:29 2020 +0100 ARM: dts: stm32: enable HASH by default on stm32mp15 Enable HASH1 device for HASH accelerated support on stm32mp15 STMicroelectronics platforms. Signed-off-by: Lionel Debieve Signed-off-by: Alexandre Torgue commit 928caf877d149318779f3b188e2e2df0725e60e4 Author: Fabrice Gasnier Date: Fri Oct 16 16:40:19 2020 +0200 ARM: dts: stm32: Add LP timer wakeup-source on stm32mp151 LP timer can be used to wakeup from stop mode on stm32mp151. Add wakeup-source properties to all LP timer instances. Signed-off-by: Fabrice Gasnier Signed-off-by: Alexandre Torgue commit f885fbca0f53bd6a38183c37518b425f0a6944b4 Author: Fabrice Gasnier Date: Fri Oct 16 16:40:18 2020 +0200 ARM: dts: stm32: Add LP timer irqs on stm32mp151 Add all LP timer irqs on stm32mp151. Signed-off-by: Fabrice Gasnier Signed-off-by: Alexandre Torgue commit 08f07e9a195adf8ad73a799dc88d47196ac14dea Author: Yann Gautier Date: Tue Oct 20 16:04:51 2020 +0200 ARM: dts: stm32: update sdmmc IP version for STM32MP15 Update the IP version to v2.0, which supports linked lists in internal DMA, and is present in STM32MP1 SoCs. The mmci driver supports the v2.0 periph id since 7a2a98be672b ("mmc: mmci: Add support for sdmmc variant revision 2.0"), so it's now Ok to add it into the SoC device tree to benefit from the improved DMA support. Signed-off-by: Ludovic Barre Signed-off-by: Yann Gautier Signed-off-by: Ahmad Fatoum Signed-off-by: Alexandre Torgue commit 4f551b7bba09114fb33ccfcd18a3874c7fbcebb4 Author: Serge Semin Date: Tue Oct 20 14:59:38 2020 +0300 ARM: dts: stm32: Harmonize EHCI/OHCI DT nodes name on stm32mp15 In accordance with the Generic EHCI/OHCI bindings the corresponding node name is suppose to comply with the Generic USB HCD DT schema, which requires the USB nodes to have the name acceptable by the regexp: "^usb(@.*)?" . Make sure the "generic-ehci" and "generic-ohci"-compatible nodes are correctly named. Signed-off-by: Serge Semin Acked-by: Amelie Delaunay Acked-by: Krzysztof Kozlowski Signed-off-by: Alexandre Torgue commit 711561a41d1f70ad939c3ff3cf00e75fa8238337 Author: Sean Young Date: Thu Nov 26 10:05:16 2020 +0100 media: lirc: fix lirc.h documentation generation The rc_proto enum values should be ignored for now, otherwise we get warnings like: Documentation/output/lirc.h.rst:6: WARNING: undefined label: rc-proto-max (if the link has no caption the label must precede a section header) Reported-by: Stephen Rothwell Fixes: 72e637fec558 ("media: rc: validate that "rc_proto" is reasonable") Fixes: cea357bc2571 ("media: lirc: ensure RC_PROTO_MAX has documentation") Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 2a14dfaffe2cabf0614e6507d0d749a5b36c2987 Author: Christian Hewitt Date: Wed Nov 25 12:07:21 2020 +0100 media: rc: add keymap for KHAMSIN remote This remote ships with the Amlogic SML-5442TW IPTV/VOD Set-Top Box used by O2.cz. This keymap adds support for the default IR controls. Signed-off-by: Christian Hewitt Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 9cd4bcfb1683fbf7ca603b0f1909f086c0057d1d Author: Kai Muenz Date: Tue Oct 6 20:13:09 2020 +0200 media: dvb-usb: Add Hauppauge MAX S2's USB-IDs Hauppauge MAX S2 or WinTV NOVA HD USB2.0. Signed-off-by: Kai Muenz Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit abf287eeff4c6da6aa804bbd429dfd9d0dfb6ea7 Author: Keita Suzuki Date: Wed Sep 9 14:56:57 2020 +0200 media: siano: fix memory leak of debugfs members in smsdvb_hotplug When dvb_create_media_graph fails, the debugfs kept inside client should be released. However, the current implementation does not release them. Fix this by adding a new goto label to call smsdvb_debugfs_release. Fixes: 0d3ab8410dcb ("[media] dvb core: must check dvb_create_media_graph()") Signed-off-by: Keita Suzuki Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 6f4a038b99677f4db737841b81b9d45ed4b54966 Author: Jack Yu Date: Wed Nov 4 01:22:24 2020 +0800 ASoC/SoundWire: rt715-sdca: First version of rt715 sdw sdca codec driver First version of rt715 sdw sdca codec driver. Signed-off-by: Jack Yu Reviewed-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20201103172226.4278-4-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit fb5103f9d6ce197b4d0b67b4e60e68470f5293d1 Author: Pierre-Louis Bossart Date: Wed Nov 4 01:22:23 2020 +0800 regmap/SoundWire: sdw: add support for SoundWire 1.2 MBQ The SoundWire 1.1 specification only allowed for reads and writes of bytes. The SoundWire 1.2 specification adds a new capability to transfer "Multi-Byte Quantities" (MBQ) across the bus. The transfers still happens one-byte-at-a-time, but the update is atomic. For example when writing a 16-bit volume, the first byte transferred is only taken into account when the second byte is successfully transferred. The mechanism is symmetrical for read and writes: - On a read, the address of the last byte to be read is modified by setting the MBQ bit - On a write, the address of all but the last byte to be written are modified by setting the MBQ bit. The address for the last byte relies on the MBQ bit being cleared. The current definitions for MBQ-based controls in the SDCA draft standard are limited to 16 bits for volumes, so for now this is the only supported format. An update will be provided if and when support for 24-bit and 32-bit values is specified by the SDCA standard. One possible objection is that this code could have been handled with regmap-sdw.c. However this is a new spec addition not handled by every SoundWire 1.1 and non-SDCA device, so there's no reason to load code that will never be used. Also in practice it's extremely unlikely that CONFIG_REGMAP would not be selected with CONFIG_REGMAP_MBQ selected. However there's no functional dependency between the two modules so they can be selected separately. Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Reviewed-by: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Reviewed-by: Vinod Koul Link: https://lore.kernel.org/r/20201103172226.4278-3-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit 07e21d4d96493fd0a8220ab134855253a34a9c84 Author: Pierre-Louis Bossart Date: Wed Nov 4 01:22:22 2020 +0800 soundwire: SDCA: add helper macro to access controls The upcoming SDCA (SoundWire Device Class Audio) specification defines a hierarchical encoding to interface with Class-defined capabilities. The specification is not yet accessible to the general public but this information is released with explicit permission from the MIPI Board to avoid delays with SDCA support on Linux platforms. A block of 64 MBytes of register addresses are allocated to SDCA controls, starting at address 0x40000000. The 26 LSBs which identify individual controls are set based on the following variables: - Function Number. An SCDA device can be split in up to 8 independent Functions. Each of these Functions is described in the SDCA specification, e.g. Smart Amplifier, Smart Microphone, Simple Microphone, Jack codec, HID, etc. - Entity Number. Within each Function, an Entity is an identifiable block. Up to 127 Entities are connected in a pre-defined graph (similar to USB), with Entity0 reserved for Function-level configurations. In contrast to USB, the SDCA spec pre-defines Function Types, topologies, and allowed options, i.e. the degree of freedom is not unlimited to limit the possibility of errors in descriptors leading to software quirks. - Control Selector. Within each Entity, the SDCA specification defines 48 controls such as Mute, Gain, AGC, etc, and 16 implementation defined ones. Some Control Selectors might be used for low-level platform setup, and other exposed to applications and users. Note that the same Control Selector capability, e.g. Latency control, might be located at different offsets in different entities, the Control Selector mapping is Entity-specific. - Control Number. Some Control Selectors allow channel-specific values to be set, with up to 64 channels allowed. This is mostly used for volume control. - Current/Next values. Some Control Selectors are 'Dual-Ranked'. Software may either update the Current value directly for immediate effect. Alternatively, software may write into the 'Next' values and update the SoundWire 1.2 'Commit Groups' register to copy 'Next' values into 'Current' ones in a synchronized manner. This is different from bank switching which is typically used to change the bus configuration only. - MBQ. the Multi-Byte Quantity bit is used to provide atomic updates when accessing more that one byte, for example a 16-bit volume control would be updated consistently, the intermediate values mixing old MSB with new LSB are not applied. These 6 parameters are used to build a 32-bit address to access the desired Controls. Because of address range, paging is required, but the most often used parameter values are placed in the lower 16 bits of the address. This helps to keep the paging registers constant while updating Controls for a specific Device/Function. Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Reviewed-by: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Acked-By: Vinod Koul Link: https://lore.kernel.org/r/20201103172226.4278-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit 4fe21dec6c2830dfcad107ff1ba050c7328f122b Author: Mauro Carvalho Chehab Date: Thu Nov 26 13:55:39 2020 +0100 media: rc: improve LIRC documentation Add documentation for enum rc_proto and struct lirc_scancode at the generated docs. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sean Young commit ac7f9d0283d0d38d8853f67dfd86f02f722f6079 Author: Mauro Carvalho Chehab Date: Thu Nov 26 12:13:36 2020 +0100 media: docs: uAPI: rc: dual-license the docs with GPL v2 Make the license for those documents also compatible with GPLv2. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sean Young commit 1f4079b626eb6d38cfc638fd88903c1a943d2d2d Author: Alexandre GRIVEAUX Date: Thu Nov 26 08:05:16 2020 +0100 ARM: zynq: Add Z-turn board V5 Adding Z-turn board V5 to resolve the change between: "Z-TURNBOARD_schematic.pdf" schematics state version 1 to 4 has Atheros AR8035 "Z-Turn_Board_sch_V15_20160303.pdf" schematics state version 5 has Micrel KSZ9031 Changes v1 -> v2: Instead of using new board, the v2 using a common devicetree for z-turn boards (zynq-zturn-common.dtsi) and for each board a specific DT Signed-off-by: Alexandre GRIVEAUX Link: https://lore.kernel.org/r/20201126070516.85882-1-agriveaux@deutnet.info Signed-off-by: Michal Simek commit 453d32c2f7f7375c223eaf3a0a32efbb71bbd3f3 Author: Kuninori Morimoto Date: Thu Nov 19 08:50:19 2020 +0900 ASoC: soc-compress: add soc_compr_clean() and call it from soc_compr_open/free() soc_compr_open() does rollback when failed (A), but, it is almost same as soc_compr_free(). static int soc_compr_open(xxx) { ... if (ret < 0) goto xxx_err; ... return 0; ^ machine_err: | ... | out: (A) ... | pm_err: | ... v return ret; } The difference is soc_compr_free() is for all dai/component/substream, rollback is for succeeded part only. This kind of duplicated code can be a hotbed of bugs, thus, we want to share soc_compr_free() and rollback. Now, soc_compr_open/free() are handling 1) snd_soc_dai_compr_startup/shutdown() 2) snd_soc_component_compr_open/free() 3) snd_soc_link_compr_startup/shutdown() Now, 1) to 3) are handled. This patch adds new soc_compr_clean() and call it from soc_compr_open() as rollback, and from soc_compr_free_free() as normal close handler. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87ima25iwa.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit cd7c7d10e8f4ab1dac0bdb2019abc0fad995a788 Author: Kuninori Morimoto Date: Thu Nov 19 08:50:14 2020 +0900 ASoC: soc-component: add mark for snd_soc_link_compr_startup/shutdown() soc_compr_open() does rollback when failed (A), but, it is almost same as soc_compr_free(). static int soc_compr_open(xxx) { ... if (ret < 0) goto xxx_err; ... return 0; ^ machine_err: | ... | out: (A) ... | pm_err: | ... v return ret; } The difference is soc_compr_free() is for all dai/component/substream, rollback is for succeeded part only. This kind of duplicated code can be a hotbed of bugs, thus, we want to share soc_compr_free() and rollback. 1) snd_soc_dai_compr_startup/shutdown() 2) snd_soc_component_compr_open/free() => 3) snd_soc_link_compr_startup/shutdown() This patch is for 3) snd_soc_link_compr_startup/shutdown() and adds new cstream mark. It will mark cstream when startup() was suceeded. If rollback happen *after* that, it will check rollback flag and marked cstream. It cares *previous* startup() only now, but we might want to check *whole* marked cstream in the future. This patch is using macro so that it can be easily adjust to it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87k0ui5iwf.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit f94ba9ac20fab9af08240fde3741edf73655411d Author: Kuninori Morimoto Date: Thu Nov 19 08:50:09 2020 +0900 ASoC: soc-component: add mark for snd_soc_component_compr_open/free() soc_compr_open() does rollback when failed (A), but, it is almost same as soc_compr_free(). static int soc_compr_open(xxx) { ... if (ret < 0) goto xxx_err; ... return 0; ^ machine_err: | ... | out: (A) ... | pm_err: | ... v return ret; } The difference is soc_compr_free() is for all dai/component/substream, rollback is for succeeded part only. This kind of duplicated code can be a hotbed of bugs, thus, we want to share soc_compr_free() and rollback. 1) snd_soc_dai_compr_startup/shutdown() => 2) snd_soc_component_compr_open/free() 3) snd_soc_link_compr_startup/shutdown() This patch is for 2) snd_soc_component_compr_open/free(), and adds new cstream mark. It will mark cstream when startup() was suceeded. If rollback happen *after* that, it will check rollback flag and marked cstream. It cares *previous* startup() only now, but we might want to check *whole* marked cstream in the future. This patch is using macro so that it can be easily adjust to it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87lfey5iwk.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 1e6a93cf74979e167cef8d29f6689705d9ec6735 Author: Kuninori Morimoto Date: Thu Nov 19 08:50:04 2020 +0900 ASoC: soc-dai: add mark for snd_soc_dai_compr_startup/shutdown() soc_compr_open() does rollback when failed (A), but, it is almost same as soc_compr_free(). static int soc_compr_open(xxx) { ... if (ret < 0) goto xxx_err; ... return 0; ^ machine_err: | ... | out: (A) ... | pm_err: | ... v return ret; } The difference is soc_compr_free() is for all dai/component/substream, rollback is for succeeded part only. This kind of duplicated code can be a hotbed of bugs, thus, we want to share soc_compr_free() and rollback. => 1) snd_soc_dai_compr_startup/shutdown() 2) snd_soc_component_compr_open/free() 3) snd_soc_link_compr_startup/shutdown() This patch is for 1) snd_soc_dai_compr_startup/shutdown(), and adds new cstream mark. It will mark cstream when startup() was suceeded. If rollback happen *after* that, it will check rollback flag and marked cstream. It cares *previous* startup() only now, but we might want to check *whole* marked cstream in the future. This patch is using macro so that it can be easily adjust to it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87mtze5iwp.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 15a7b8c13653cc88de2db89af486e904aedc75ec Author: Kuninori Morimoto Date: Thu Nov 19 08:49:57 2020 +0900 ASoC: soc-compress: move soc_compr_free() next to soc_compr_open() This patch moves soc_compr_free() next to soc_compr_open(). This is prepare for soc_compr_open() cleanup. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87o8ju5iwv.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 36dd70ceb4d955e6cd3ecd18e78169141aaa23b7 Author: Vinod Koul Date: Thu Nov 26 15:00:18 2020 +0530 regulator: qcom-rpmh: Add support for SDX55 Add support from RPMH regulators found in SDX55 platform Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20201126093018.1085594-2-vkoul@kernel.org Signed-off-by: Mark Brown commit 1008521b9b4f85d80ac1d80391ac39055c89f736 Author: Vinod Koul Date: Thu Nov 26 15:00:17 2020 +0530 regulator: dt-bindings: Add PMX55 compatibles Add PMX55 compatibles for PMIC found in SDX55 platform Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20201126093018.1085594-1-vkoul@kernel.org Signed-off-by: Mark Brown commit 55cca73931c3a08eb74f5ad06e88304af7a292e0 Author: Claudiu Beznea Date: Wed Nov 25 19:25:47 2020 +0200 regulator: core: return zero for selectors lower than linear_min_sel Selectors lower than linear_min_sel should not be considered invalid. Thus return zero in case _regulator_list_voltage(), regulator_list_hardware_vsel() or regulator_list_voltage_table() receives such selectors as argument. Fixes: bdcd1177578c ("regulator: core: validate selector against linear_min_sel") Reported-by: Jon Hunter Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1606325147-606-1-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Mark Brown commit d9a500b2985b139d7019231ec16e379d2031cb40 Author: Pierre-Louis Bossart Date: Wed Nov 25 21:01:28 2020 +0800 regmap: sdw: add required header files Explicitly add header files used by regmap SoundWire support. Suggested-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Reviewed-by: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20201125130128.15952-1-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit c61d1142cfd45f58b63bf9d2d59523f91096e873 Author: Shengjiu Wang Date: Thu Nov 26 14:14:53 2020 +0800 ASoC: fsl: Fix config name of CONFIG_ARCH_MXC CONFIG_ARCH_MXC should be ARCH_MXC Fixes: 674226db62ec ("ASoC: fsl: SND_SOC_FSL_AUD2HTX should depend on ARCH_MXC") Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1606371293-29099-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 144f836646989783cb018d00fa69f3f8dab58349 Author: Shengjiu Wang Date: Thu Nov 26 14:36:48 2020 +0800 ASoC: hdmi-codec: Add RX support HDMI interface can also be used as receiver, this patch is to add such support. The most difference compare with TX is that RX don't need to get edid information. Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1606372608-2329-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 0670c9a7239a478ec9675fa82d7ee0a86ef22fe5 Author: Krzysztof Kozlowski Date: Wed Nov 25 17:44:52 2020 +0100 ASoC: samsung: smdk_wm8994: remove redundant of_match_ptr() of_match_device() already handles properly !CONFIG_OF case, so passing the argument via of_match_ptr() is not needed. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Sylwester Nawrocki Link: https://lore.kernel.org/r/20201125164452.89239-40-krzk@kernel.org Signed-off-by: Mark Brown commit c37de70121a03415acd4c7de58a65c4a55ab4c6b Author: Krzysztof Kozlowski Date: Wed Nov 25 17:44:51 2020 +0100 ASoC: max98926: drop driver pm=NULL assignment There is no point to explicitly set driver .pm field to NULL. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201125164452.89239-39-krzk@kernel.org Signed-off-by: Mark Brown commit 0eb97389cc4d470b3fdf5384f70f4dc074004843 Author: Krzysztof Kozlowski Date: Wed Nov 25 17:44:50 2020 +0100 ASoC: max98925: drop driver pm=NULL assignment There is no point to explicitly set driver .pm field to NULL. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201125164452.89239-38-krzk@kernel.org Signed-off-by: Mark Brown commit fe4b501e56af81f88215f943c2caef5eded26920 Author: Krzysztof Kozlowski Date: Wed Nov 25 17:44:49 2020 +0100 ASoC: max98371: drop driver pm=NULL assignment There is no point to explicitly set driver .pm field to NULL. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201125164452.89239-37-krzk@kernel.org Signed-off-by: Mark Brown commit da773b2b45f9de4f44bd62db8b291e2b0a4c3f5b Author: Krzysztof Kozlowski Date: Wed Nov 25 17:44:48 2020 +0100 ASoC: samsung: i2s: mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: sound/soc/samsung/i2s.c:1646:42: warning: ‘i2sv5_dai_type_i2s1’ defined but not used [-Wunused-const-variable=] sound/soc/samsung/i2s.c:1639:42: warning: ‘i2sv7_dai_type’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Sylwester Nawrocki Link: https://lore.kernel.org/r/20201125164452.89239-36-krzk@kernel.org Signed-off-by: Mark Brown commit 55c259bf06e5f7a899411e474a48d79cf1a0a2f6 Author: Krzysztof Kozlowski Date: Wed Nov 25 17:44:47 2020 +0100 ASoC: es7241: mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: sound/soc/codecs/es7241.c:206:33: warning: ‘es7241_chip’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201125164452.89239-35-krzk@kernel.org Signed-off-by: Mark Brown commit 418fb63003f6e2d99d6f6eb6ba25e1576bf55348 Author: Krzysztof Kozlowski Date: Wed Nov 25 17:44:46 2020 +0100 ASoC: es7134: mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: sound/soc/codecs/es7134.c:264:33: warning: ‘es7154_chip’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201125164452.89239-34-krzk@kernel.org Signed-off-by: Mark Brown commit 62bd3054af54d4d55267a623c4d938fd42f48b59 Author: Krzysztof Kozlowski Date: Wed Nov 25 17:44:45 2020 +0100 ASoC: ts3a227e: skip of_device_id table when !CONFIG_OF The driver can match by multiple methods. Its of_device_id table is referenced via of_match_ptr() so it will be unused for !CONFIG_OF builds: sound/soc/codecs/ts3a227e.c:369:34: warning: ‘ts3a227e_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201125164452.89239-33-krzk@kernel.org Signed-off-by: Mark Brown commit 762e0b8baf63b1bb534254f89148884c873363f3 Author: Krzysztof Kozlowski Date: Wed Nov 25 17:44:44 2020 +0100 ASoC: tlv320: skip of_device_id table when !CONFIG_OF The driver can match by multiple methods. Its of_device_id table is referenced via of_match_ptr() so it will be unused for !CONFIG_OF builds: sound/soc/codecs/tlv320aic23-i2c.c:38:34: warning: ‘tlv320aic23_of_match’ defined but not used [-Wunused-const-variable=] sound/soc/codecs/tlv320adcx140.c:1076:34: warning: ‘tlv320adcx140_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201125164452.89239-32-krzk@kernel.org Signed-off-by: Mark Brown commit 68591e8aa122b43e5f9c6eb5cf49c559e5d6300e Author: Krzysztof Kozlowski Date: Wed Nov 25 17:44:43 2020 +0100 ASoC: tas2562: skip of_device_id table when !CONFIG_OF The driver can match by multiple methods. Its of_device_id table is referenced via of_match_ptr() so it will be unused for !CONFIG_OF builds: sound/soc/codecs/tas2562.c:805:34: warning: ‘tas2562_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201125164452.89239-31-krzk@kernel.org Signed-off-by: Mark Brown commit c7bfb25333526463ffc38b5c3460e6778e474c9d Author: Krzysztof Kozlowski Date: Wed Nov 25 17:44:42 2020 +0100 ASoC: rt5660: skip of_device_id table when !CONFIG_OF The driver can match by multiple methods. Its of_device_id table is referenced via of_match_ptr() so it will be unused for !CONFIG_OF builds: sound/soc/codecs/rt5660.c:1238:34: warning: ‘rt5660_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201125164452.89239-30-krzk@kernel.org Signed-off-by: Mark Brown commit e2baf7fa3e84a6f1fb930f10547401d9363b4caf Author: Krzysztof Kozlowski Date: Wed Nov 25 17:44:41 2020 +0100 ASoC: pcm179x: skip of_device_id table when !CONFIG_OF The driver can match by multiple methods. Its of_device_id table is referenced via of_match_ptr() so it will be unused for !CONFIG_OF builds: sound/soc/codecs/pcm179x-i2c.c:33:34: warning: ‘pcm179x_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201125164452.89239-29-krzk@kernel.org Signed-off-by: Mark Brown commit 36cbbf009f229fe27eac869cb279de1f80aa654b Author: Krzysztof Kozlowski Date: Wed Nov 25 17:44:40 2020 +0100 ASoC: pcm1789: skip of_device_id table when !CONFIG_OF The driver can match by multiple methods. Its of_device_id table is referenced via of_match_ptr() so it will be unused for !CONFIG_OF builds: sound/soc/codecs/pcm1789-i2c.c:36:34: warning: ‘pcm1789_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201125164452.89239-28-krzk@kernel.org Signed-off-by: Mark Brown commit fff68ff65129525c88d52a05a55cabff5a4b0821 Author: Krzysztof Kozlowski Date: Wed Nov 25 17:44:39 2020 +0100 ASoC: max98926: skip of_device_id table when !CONFIG_OF The driver can match by multiple methods. Its of_device_id table is referenced via of_match_ptr() so it will be unused for !CONFIG_OF builds: sound/soc/codecs/max98926.c:574:34: warning: ‘max98926_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201125164452.89239-27-krzk@kernel.org Signed-off-by: Mark Brown commit d39d9cb5a2c9526c19e2d3a0a43465d49143426d Author: Krzysztof Kozlowski Date: Wed Nov 25 17:44:38 2020 +0100 ASoC: max98925: skip of_device_id table when !CONFIG_OF The driver can match by multiple methods. Its of_device_id table is referenced via of_match_ptr() so it will be unused for !CONFIG_OF builds: sound/soc/codecs/max98925.c:630:34: warning: ‘max98925_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201125164452.89239-26-krzk@kernel.org Signed-off-by: Mark Brown commit 682e22193120a87a25ed7d7a71bbac682a33e2ee Author: Krzysztof Kozlowski Date: Wed Nov 25 17:44:37 2020 +0100 ASoC: max9867: skip of_device_id table when !CONFIG_OF The driver can match by multiple methods. Its of_device_id table is referenced via of_match_ptr() so it will be unused for !CONFIG_OF builds: sound/soc/codecs/max9867.c:652:34: warning: ‘max9867_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201125164452.89239-25-krzk@kernel.org Signed-off-by: Mark Brown commit e77332c3e741e88ea025c9d0fbb22c833cdb01ad Author: Krzysztof Kozlowski Date: Wed Nov 25 17:44:36 2020 +0100 ASoC: max98371: skip of_device_id table when !CONFIG_OF The driver can match by multiple methods. Its of_device_id table is referenced via of_match_ptr() so it will be unused for !CONFIG_OF builds: sound/soc/codecs/max98371.c:411:34: warning: ‘max98371_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201125164452.89239-24-krzk@kernel.org Signed-off-by: Mark Brown commit a5a196bf0a0b9af14e0170282a3c8d8febe9fe64 Author: Krzysztof Kozlowski Date: Wed Nov 25 17:44:35 2020 +0100 ASoC: max98095: skip of_device_id table when !CONFIG_OF The driver can match by multiple methods. Its of_device_id table is referenced via of_match_ptr() so it will be unused for !CONFIG_OF builds: sound/soc/codecs/max98095.c:2151:34: warning: ‘max98095_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201125164452.89239-23-krzk@kernel.org Signed-off-by: Mark Brown commit ac792c0ab3db9392bbbc7023fefb41bc9d467bfc Author: Krzysztof Kozlowski Date: Wed Nov 25 17:44:34 2020 +0100 ASoC: max98090: skip of_device_id table when !CONFIG_OF The driver can match by multiple methods. Its of_device_id table is referenced via of_match_ptr() so it will be unused for !CONFIG_OF builds: sound/soc/codecs/max98090.c:2671:34: warning: ‘max98090_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201125164452.89239-22-krzk@kernel.org Signed-off-by: Mark Brown commit 75333af40a25ca33179cbbe68019da0b9a123262 Author: Krzysztof Kozlowski Date: Wed Nov 25 17:44:33 2020 +0100 ASoC: es8316: skip of_device_id table when !CONFIG_OF The driver can match by multiple methods. Its of_device_id table is referenced via of_match_ptr() so it will be unused for !CONFIG_OF builds: sound/soc/codecs/es8316.c:837:34: warning: ‘es8316_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201125164452.89239-21-krzk@kernel.org Signed-off-by: Mark Brown commit a25b45dc143748354947cbc30b682deacb27978f Author: Krzysztof Kozlowski Date: Wed Nov 25 17:44:32 2020 +0100 ASoC: da9055: skip of_device_id table when !CONFIG_OF The driver can match by multiple methods. Its of_device_id table is referenced via of_match_ptr() so it will be unused for !CONFIG_OF builds: sound/soc/codecs/da9055.c:1522:34: warning: ‘da9055_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201125164452.89239-20-krzk@kernel.org Signed-off-by: Mark Brown commit a7de367daa8412fe854a255c2b4ff5bd4399c00a Author: Krzysztof Kozlowski Date: Wed Nov 25 17:44:31 2020 +0100 ASoC: da7219: skip of_device_id table when !CONFIG_OF The driver can match by multiple methods. Its of_device_id table is referenced via of_match_ptr() so it will be unused for !CONFIG_OF builds: sound/soc/codecs/da7219.c:1705:34: warning: ‘da7219_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201125164452.89239-19-krzk@kernel.org Signed-off-by: Mark Brown commit a06cd8cf97a336c87a98c7e64e5692c5391b50e6 Author: Krzysztof Kozlowski Date: Wed Nov 25 17:44:30 2020 +0100 ASoC: da7218: skip of_device_id table when !CONFIG_OF The driver can match by multiple methods. Its of_device_id table is referenced via of_match_ptr() so it will be unused for !CONFIG_OF builds: sound/soc/codecs/da7218.c:2281:34: warning: ‘da7218_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201125164452.89239-18-krzk@kernel.org Signed-off-by: Mark Brown commit 5207e768347dbb3249ee83979e868850b4b9d23b Author: Krzysztof Kozlowski Date: Wed Nov 25 17:44:29 2020 +0100 ASoC: alc5632: skip of_device_id table when !CONFIG_OF The driver can match by multiple methods. Its of_device_id table is referenced via of_match_ptr() so it will be unused for !CONFIG_OF builds: sound/soc/codecs/alc5632.c:1170:34: warning: ‘alc5632_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201125164452.89239-17-krzk@kernel.org Signed-off-by: Mark Brown commit d11f8974896817382f8adda8b6c9071387cb2ce0 Author: Krzysztof Kozlowski Date: Wed Nov 25 17:44:28 2020 +0100 ASoC: alc5623: skip of_device_id table when !CONFIG_OF The driver can match by multiple methods. Its of_device_id table is referenced via of_match_ptr() so it will be unused for !CONFIG_OF builds: sound/soc/codecs/alc5623.c:1071:34: warning: ‘alc5623_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201125164452.89239-16-krzk@kernel.org Signed-off-by: Mark Brown commit bda20fb03e54c261b6ff8b0d04344ed9a1812338 Author: Krzysztof Kozlowski Date: Wed Nov 25 17:44:27 2020 +0100 ASoC: ak4118: skip of_device_id table when !CONFIG_OF The driver can match by multiple methods. Its of_device_id table is referenced via of_match_ptr() so it will be unused for !CONFIG_OF builds: sound/soc/codecs/ak4118.c:407:34: warning: ‘ak4118_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201125164452.89239-15-krzk@kernel.org Signed-off-by: Mark Brown commit c0b7cf59971e9f5fd1960774dc8a1728777cd437 Author: Krzysztof Kozlowski Date: Wed Nov 25 17:44:26 2020 +0100 ASoC: uniphier: mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: sound/soc/uniphier/aio-ld11.c:375:34: warning: ‘uniphier_aio_of_match’ defined but not used [-Wunused-const-variable=] sound/soc/uniphier/evea.c:554:34: warning: ‘evea_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201125164452.89239-14-krzk@kernel.org Signed-off-by: Mark Brown commit 4bad6ec57d8045046ae8f8e410a16c1ad9d652f2 Author: Krzysztof Kozlowski Date: Wed Nov 25 17:44:25 2020 +0100 ASoC: ti: davinci: mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: sound/soc/ti/davinci-i2s.c:750:34: warning: ‘davinci_i2s_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201125164452.89239-13-krzk@kernel.org Signed-off-by: Mark Brown commit 56af27ad5f363e030a1191da459460fcb70cf76a Author: Krzysztof Kozlowski Date: Wed Nov 25 17:44:24 2020 +0100 ASoC: rockchip: mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: sound/soc/rockchip/rockchip_i2s.c:569:34: warning: ‘rockchip_i2s_match’ defined but not used [-Wunused-const-variable=] sound/soc/rockchip/rockchip_pdm.c:463:34: warning: ‘rockchip_pdm_match’ defined but not used [-Wunused-const-variable=] sound/soc/rockchip/rockchip_spdif.c:44:34: warning: ‘rk_spdif_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201125164452.89239-12-krzk@kernel.org Signed-off-by: Mark Brown commit 3285b6623653befaf97687d418c99531a09037db Author: Krzysztof Kozlowski Date: Wed Nov 25 17:44:23 2020 +0100 ASoC: samsung: smdk_wm8994: mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: sound/soc/samsung/smdk_wm8994.c:139:34: warning: ‘samsung_wm8994_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201125164452.89239-11-krzk@kernel.org Signed-off-by: Mark Brown commit 377c7b7cc11d80acf85101416d1122135f997dc5 Author: Krzysztof Kozlowski Date: Wed Nov 25 17:44:22 2020 +0100 ASoC: qcom: mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: sound/soc/qcom/lpass-apq8016.c:294:34: warning: ‘apq8016_lpass_cpu_device_id’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201125164452.89239-10-krzk@kernel.org Signed-off-by: Mark Brown commit b397f02171e6d6ca9b77e4cfec73c0dfe2345562 Author: Krzysztof Kozlowski Date: Wed Nov 25 17:44:21 2020 +0100 ASoC: meson: t9015: mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: sound/soc/meson/t9015.c:315:34: warning: ‘t9015_ids’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201125164452.89239-9-krzk@kernel.org Signed-off-by: Mark Brown commit d013a59a199e81582c6435a924a23ed393279b07 Author: Krzysztof Kozlowski Date: Wed Nov 25 17:44:20 2020 +0100 ASoC: kirkwood: armada-370-db: mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: sound/soc/kirkwood/armada-370-db.c:137:34: warning: ‘a370db_dt_ids’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201125164452.89239-8-krzk@kernel.org Signed-off-by: Mark Brown commit f38c0b1e8a63439edc234a65bb549d3c6e49e66e Author: Krzysztof Kozlowski Date: Wed Nov 25 17:44:19 2020 +0100 ASoC: tas571x: mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: sound/soc/codecs/tas571x.c:892:34: warning: ‘tas571x_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201125164452.89239-7-krzk@kernel.org Signed-off-by: Mark Brown commit 84902aec0886e1a8fdd26ae6b8a65fb2c26018a8 Author: Krzysztof Kozlowski Date: Wed Nov 25 17:44:18 2020 +0100 ASoC: rk3328: mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: sound/soc/codecs/rk3328_codec.c:502:34: warning: ‘rk3328_codec_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201125164452.89239-6-krzk@kernel.org Signed-off-by: Mark Brown commit 66b9890634690c71910c8dd41f273e87f9bc4b4a Author: Krzysztof Kozlowski Date: Wed Nov 25 17:44:17 2020 +0100 ASoC: inno_rk3036: mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: sound/soc/codecs/inno_rk3036.c:470:34: warning: ‘rk3036_codec_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201125164452.89239-5-krzk@kernel.org Signed-off-by: Mark Brown commit 03219faf153c3adb93d68355a8ccbaa48e40735f Author: Krzysztof Kozlowski Date: Wed Nov 25 17:44:16 2020 +0100 ASoC: gtm601: mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: sound/soc/codecs/gtm601.c:90:34: warning: ‘gtm601_codec_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201125164452.89239-4-krzk@kernel.org Signed-off-by: Mark Brown commit 1bab2b22675f2e4bd498a7688b681839a7ecece0 Author: Krzysztof Kozlowski Date: Wed Nov 25 17:44:15 2020 +0100 ASoC: bd28623: mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: sound/soc/codecs/bd28623.c:225:34: warning: ‘bd28623_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201125164452.89239-3-krzk@kernel.org Signed-off-by: Mark Brown commit 9f34c04057232ca2688d26416d3f0011c5ea5377 Author: Krzysztof Kozlowski Date: Wed Nov 25 17:44:14 2020 +0100 ASoC: ak5558: mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: sound/soc/codecs/ak5558.c:418:34: warning: ‘ak5558_i2c_dt_ids’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201125164452.89239-2-krzk@kernel.org Signed-off-by: Mark Brown commit ab37fa851c488be805f6568ecaabb67b13cd937c Author: Heikki Krogerus Date: Thu Nov 26 14:57:35 2020 +0300 usb: typec: Add type sysfs attribute file for partners USB Power Delivery Specification defines a set of product types for partners and cables. The product type can be read from the ID Header VDO which is the first object in the response to the Discover Identity command. This attribute will display the product type of the partner. The cables already have the attribute. This sysfs attribute file is only created for the partners and cables if the product type is really known in the driver. Some interfaces do not give access to the Discover Identity response from the partner or cable, but they may still supply the product type separately in some cases. When the product type of the partner or cable is detected, uevent is also raised with PRODUCT_TYPE set to show the actual product type (for example PRODUCT_TYPE=host). Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20201126115735.50529-1-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 52170e937866b3bac1572ed48a97d370f42e52fa Author: Rikard Falkeborn Date: Wed Nov 25 17:25:00 2020 +0100 usb: common: ulpi: Constify static attribute_group struct It is never modified, so make them const to allow the compiler to put it in read-only memory. Done with the help of coccinelle. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20201125162500.37228-4-rikard.falkeborn@gmail.com Signed-off-by: Greg Kroah-Hartman commit 690756a367649a19c5622d135e00799930e7996c Author: Rikard Falkeborn Date: Wed Nov 25 17:24:59 2020 +0100 usb: typec: Constify static attribute_group structs These are never modified, so make them const to allow the compiler to put them in read-only memory. Done with the help of coccinelle. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20201125162500.37228-3-rikard.falkeborn@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4154a4f70a9488212f8731770e10eae957d33da9 Author: Rikard Falkeborn Date: Wed Nov 25 17:24:58 2020 +0100 USB: core: Constify static attribute_group structs These are never modified, so make them const to allow the compiler to put them in read-only memory. Done with the help of coccinelle. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20201125162500.37228-2-rikard.falkeborn@gmail.com Signed-off-by: Greg Kroah-Hartman commit 11e5e568ceed7c8c570313a14fa96c72f21dad31 Author: Badhri Jagan Sridharan Date: Tue Nov 24 17:48:04 2020 -0800 usb: typec: tcpm: Stay in SNK_TRY_WAIT_DEBOUNCE_CHECK_VBUS till Rp is seen TD.4.7.3. Try SNK DRP Connect Try.SRC DRP fails. The compliance tester mimics being a Try.SRC USB-C port. The failure is due to TCPM exiting SNK_TRY_WAIT_DEBOUNCE_CHECK_VBUS when VBUS is not present eventhough when SNK.Rp is seen. Exit to SRC_TRYWAIT from SNK_TRY_WAIT_DEBOUNCE_CHECK_VBUS only when SNK.Rp is not seen for PD_T_TRY_CC_DEBOUNCE. >From the spec: The port shall then transition to Attached.SNK when the SNK.Rp state is detected on exactly one of the CC1 or CC2 pins for at least tTryCCDebounce and VBUS is detected. Alternatively, the port shall transition to TryWait.SRC if SNK.Rp state is not detected for tTryCCDebounce. Reviewed-by: Guenter Roeck Signed-off-by: Badhri Jagan Sridharan Link: https://lore.kernel.org/r/20201125014804.1596719-1-badhri@google.com Acked-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman commit 7abc6ca5dced0b5953df179007528e39b9fc43b7 Author: Badhri Jagan Sridharan Date: Tue Nov 24 18:07:03 2020 -0800 usb: typec: tcpm: Disregard vbus off while in PR_SWAP_SNK_SRC_SOURCE_ON During PR_SWAP sequence, when TCPM is waiting in PR_SWAP_SNK_SRC_SOURCE_ON for the vbus source to ramp up, TCPM would prematurely exit PR_SWAP_SNK_SRC_SOURCE_ON and transition to SNK_UNATTACHED state when a vbus off notification is received. This should not be the case as vbus can still be off while in PR_SWAP_SNK_SRC_SOURCE_ON and the vbus source has PD_T_NEWSRC to ramp up. Reviewed-by: Guenter Roeck Signed-off-by: Badhri Jagan Sridharan Link: https://lore.kernel.org/r/20201125020703.1604979-1-badhri@google.com Acked-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman commit 05e91e7fe26c6fb116fa16f43c1eed78020f9463 Author: Wei Li Date: Thu Nov 19 23:24:41 2020 +0800 perf arm-spe: Add support for ARMv8.3-SPE This patch is to support Armv8.3 extension for SPE, it adds alignment field in the Events packet and it supports the Scalable Vector Extension (SVE) for Operation packet and Events packet with two additions: - The vector length for SVE operations in the Operation Type packet; - The incomplete predicate and empty predicate fields in the Events packet. Signed-off-by: Wei Li Signed-off-by: Leo Yan Reviewed-by: Andre Przywara Acked-by: Will Deacon Cc: Alexander Shishkin Cc: Al Grant Cc: Arnaldo Carvalho de Melo Cc: Dave Martin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20201119152441.6972-17-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 3601e605501df289db149785e1e6a8d16e557d31 Author: Andre Przywara Date: Thu Nov 19 23:24:40 2020 +0800 perf arm_spe: Decode memory tagging properties When SPE records a physical address, it can additionally tag the event with information from the Memory Tagging architecture extension. Decode the two additional fields in the SPE event payload. [leoy: Refined patch to use predefined macros] Signed-off-by: Andre Przywara Signed-off-by: Leo Yan Reviewed-by: Dave Martin Acked-by: Will Deacon Cc: Alexander Shishkin Cc: Al Grant Cc: Arnaldo Carvalho de Melo Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wei Li Link: https://lore.kernel.org/r/20201119152441.6972-16-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 3d829724b16c5d2de42e6c9601c696c93a10bc61 Author: Leo Yan Date: Thu Nov 19 23:24:39 2020 +0800 perf arm-spe: Add more sub classes for operation packet For the operation type packet payload with load/store class, it misses to support these sub classes: - A load/store targeting the general-purpose registers; - A load/store targeting unspecified registers; - The ARMv8.4 nested virtualisation extension can redirect system register accesses to a memory page controlled by the hypervisor. The SPE profiling feature in newer implementations can tag those memory accesses accordingly. Add the bit pattern describing load/store sub classes, so that the perf tool can decode it properly. Inspired by Andre Przywara, refined the commit log and code for more clear description. Co-developed-by: Andre Przywara Signed-off-by: Leo Yan Reviewed-by: Andre Przywara Acked-by: Will Deacon Cc: Alexander Shishkin Cc: Al Grant Cc: Arnaldo Carvalho de Melo Cc: Dave Martin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wei Li Link: https://lore.kernel.org/r/20201119152441.6972-15-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit e771218f32f97c0940ae46c23e20d27f3d4c05e3 Author: Leo Yan Date: Thu Nov 19 23:24:38 2020 +0800 perf arm-spe: Refactor operation packet handling Defines macros for operation packet header and formats (support sub classes for 'other', 'branch', 'load and store', etc). Uses these macros for operation packet decoding and dumping. Signed-off-by: Leo Yan Reviewed-by: Andre Przywara Acked-by: Will Deacon Cc: Alexander Shishkin Cc: Al Grant Cc: Arnaldo Carvalho de Melo Cc: Dave Martin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wei Li Link: https://lore.kernel.org/r/20201119152441.6972-14-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 7488ffc4d981e19feddfe36a619051bf6216c7a1 Author: Leo Yan Date: Thu Nov 19 23:24:37 2020 +0800 perf arm-spe: Add new function arm_spe_pkt_desc_op_type() The operation type packet is complex and contains subclass; the parsing flow causes deep indentation; for more readable, this patch introduces a new function arm_spe_pkt_desc_op_type() which is used for operation type parsing. Signed-off-by: Leo Yan Reviewed-by: Andre Przywara Acked-by: Will Deacon Cc: Alexander Shishkin Cc: Al Grant Cc: Arnaldo Carvalho de Melo Cc: Dave Martin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wei Li Link: https://lore.kernel.org/r/20201119152441.6972-13-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 4d0f4ca273aa95bf592b8bad3c619b5766c8ecc7 Author: Leo Yan Date: Thu Nov 19 23:24:36 2020 +0800 perf arm-spe: Remove size condition checking for events In the Armv8 ARM (ARM DDI 0487F.c), chapter "D10.2.6 Events packet", it describes the event bit is valid with specific payload requirement. For example, the Last Level cache access event, the bit is defined as: E[8], byte 1 bit [0], when SZ == 0b01 , when SZ == 0b10 , or when SZ == 0b11 It requires the payload size is at least 2 bytes, when byte 1 (start counting from 0) is valid, E[8] (bit 0 in byte 1) can be used for LLC access event type. For safety, the code checks the condition for payload size firstly, if meet the requirement for payload size, then continue to parse event type. If review function arm_spe_get_payload(), it has used cast, so any bytes beyond the valid size have been set to zeros. For this reason, we don't need to check payload size anymore afterwards when parse events, thus this patch removes payload size conditions. Suggested-by: Andre Przywara Signed-off-by: Leo Yan Reviewed-by: Andre Przywara Acked-by: Will Deacon Cc: Alexander Shishkin Cc: Al Grant Cc: Arnaldo Carvalho de Melo Cc: Dave Martin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wei Li Link: https://lore.kernel.org/r/20201119152441.6972-12-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 889d1a675fcfe734f83c459de023a6f0a91a7a0e Author: Leo Yan Date: Thu Nov 19 23:24:35 2020 +0800 perf arm-spe: Refactor event type handling Move the enums of event types to arm-spe-pkt-decoder.h, thus function arm_spe_pkt_desc_event() can use them for bitmasks. Suggested-by: Andre Przywara Signed-off-by: Leo Yan Reviewed-by: Andre Przywara Acked-by: Will Deacon Cc: Alexander Shishkin Cc: Al Grant Cc: Arnaldo Carvalho de Melo Cc: Dave Martin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wei Li Link: https://lore.kernel.org/r/20201119152441.6972-11-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit e66f6d75960220001ce94afe93c981826235c003 Author: Leo Yan Date: Thu Nov 19 23:24:34 2020 +0800 perf arm-spe: Add new function arm_spe_pkt_desc_event() This patch moves out the event packet parsing from arm_spe_pkt_desc() to the new function arm_spe_pkt_desc_event(). Signed-off-by: Leo Yan Reviewed-by: Andre Przywara Acked-by: Will Deacon Cc: Alexander Shishkin Cc: Al Grant Cc: Arnaldo Carvalho de Melo Cc: Dave Martin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wei Li Link: https://lore.kernel.org/r/20201119152441.6972-10-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit d158aa408f221756f99edb128ef35bfd4d3361d5 Author: Leo Yan Date: Thu Nov 19 23:24:33 2020 +0800 perf arm-spe: Refactor counter packet handling This patch defines macros for counter packet header, and uses macros to replace hard code values in functions arm_spe_get_counter() and arm_spe_pkt_desc(). In the function arm_spe_get_counter(), adds a new line for more readable. Signed-off-by: Leo Yan Reviewed-by: Andre Przywara Acked-by: Will Deacon Cc: Alexander Shishkin Cc: Al Grant Cc: Arnaldo Carvalho de Melo Cc: Dave Martin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wei Li Link: https://lore.kernel.org/r/20201119152441.6972-9-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit c52cfe9872132407eef6d734014d6fd7790146f5 Author: Leo Yan Date: Thu Nov 19 23:24:32 2020 +0800 perf arm-spe: Add new function arm_spe_pkt_desc_counter() This patch moves out the counter packet parsing code from arm_spe_pkt_desc() to the new function arm_spe_pkt_desc_counter(). Signed-off-by: Leo Yan Reviewed-by: Andre Przywara Acked-by: Will Deacon Cc: Alexander Shishkin Cc: Al Grant Cc: Arnaldo Carvalho de Melo Cc: Dave Martin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wei Li Link: https://lore.kernel.org/r/20201119152441.6972-8-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 6550149e801a32b1533ed86509af76319cb75eba Author: Leo Yan Date: Thu Nov 19 23:24:31 2020 +0800 perf arm-spe: Refactor context packet handling Minor refactoring to use macro for index mask. Signed-off-by: Leo Yan Reviewed-by: Andre Przywara Acked-by: Will Deacon Cc: Alexander Shishkin Cc: Al Grant Cc: Arnaldo Carvalho de Melo Cc: Dave Martin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wei Li Link: https://lore.kernel.org/r/20201119152441.6972-7-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 5513ddaf103c62dd1eabe9403c0a8d9f810492dc Author: Leo Yan Date: Thu Nov 19 23:24:30 2020 +0800 perf arm_spe: Fixup top byte for data virtual address To establish a valid address from the address packet payload and finally the address value can be used for parsing data symbol in DSO, current code uses 0xff to replace the tag in the top byte of data virtual address. So far the code only fixups top byte for the memory layouts with 4KB pages, it misses to support memory layouts with 64KB pages. This patch adds the conditions for checking bits [55:52] are 0xf, if detects the pattern it will fill 0xff into the top byte of the address, also adds comment to explain the fixing up. Signed-off-by: Leo Yan Reviewed-by: Andre Przywara Acked-by: Will Deacon Cc: Alexander Shishkin Cc: Al Grant Cc: Arnaldo Carvalho de Melo Cc: Dave Martin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wei Li Link: https://lore.kernel.org/r/20201119152441.6972-6-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 09935ca7b64cfa379b6ebf2b8cdb3126e09bffab Author: Leo Yan Date: Thu Nov 19 23:24:29 2020 +0800 perf arm-spe: Refactor address packet handling This patch is to refactor address packet handling, it defines macros for address packet's header and payload, these macros are used by decoder and the dump flow. Signed-off-by: Leo Yan Reviewed-by: Andre Przywara Acked-by: Will Deacon Cc: Alexander Shishkin Cc: Al Grant Cc: Arnaldo Carvalho de Melo Cc: Dave Martin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wei Li Link: https://lore.kernel.org/r/20201119152441.6972-5-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit ab2aa439e4aaa3ce0fdcfa0f847aed4bf13bf353 Author: Leo Yan Date: Thu Nov 19 23:24:28 2020 +0800 perf arm-spe: Add new function arm_spe_pkt_desc_addr() This patch moves out the address parsing code from arm_spe_pkt_desc() and uses the new introduced function arm_spe_pkt_desc_addr() to process address packet. Signed-off-by: Leo Yan Reviewed-by: Andre Przywara Acked-by: Will Deacon Cc: Alexander Shishkin Cc: Al Grant Cc: Arnaldo Carvalho de Melo Cc: Dave Martin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wei Li Link: https://lore.kernel.org/r/20201119152441.6972-4-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 11695142e25e957dc3e56c29dc5f9daaf9530b10 Author: Leo Yan Date: Thu Nov 19 23:24:27 2020 +0800 perf arm-spe: Refactor packet header parsing The packet header parsing uses the hard coded values and it uses nested if-else statements. To improve the readability, this patch refactors the macros for packet header format so it removes the hard coded values. Furthermore, based on the new mask macros it reduces the nested if-else statements and changes to use the flat conditions checking, this is directive and can easily map to the descriptions in ARMv8-a architecture reference manual (ARM DDI 0487E.a), chapter 'D10.1.5 Statistical Profiling Extension protocol packet headers'. Signed-off-by: Leo Yan Reviewed-by: Andre Przywara Acked-by: Will Deacon Cc: Alexander Shishkin Cc: Al Grant Cc: Arnaldo Carvalho de Melo Cc: Dave Martin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wei Li Link: https://lore.kernel.org/r/20201119152441.6972-3-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 75eeaddd57f4a0ac89110547221df8f3757d5a6f Author: Leo Yan Date: Thu Nov 19 23:24:26 2020 +0800 perf arm-spe: Refactor printing string to buffer When outputs strings to the decoding buffer with function snprintf(), SPE decoder needs to detects if any error returns from snprintf() and if so needs to directly bail out. If snprintf() returns success, it needs to update buffer pointer and reduce the buffer length so can continue to output the next string into the consequent memory space. This complex logics are spreading in the function arm_spe_pkt_desc() so there has many duplicate codes for handling error detecting, increment buffer pointer and decrement buffer size. To avoid the duplicate code, this patch introduces a new helper function arm_spe_pkt_out_string() which is used to wrap up the complex logics, and it's used by the caller arm_spe_pkt_desc(). This patch moves the variable 'blen' as the function's local variable so allows to remove the unnecessary braces and improve the readability. This patch simplifies the return value for arm_spe_pkt_desc(): '0' means success and other values mean an error has occurred. To realize this, it relies on arm_spe_pkt_out_string()'s parameter 'err', the 'err' is a cumulative value, returns its final value if printing buffer is called for one time or multiple times. Finally, the error is handled in a central place, rather than directly bailing out in switch-cases, it returns error at the end of arm_spe_pkt_desc(). This patch changes the caller arm_spe_dump() to respect the updated return value semantics of arm_spe_pkt_desc(). Suggested-by: Dave Martin Signed-off-by: Leo Yan Reviewed-by: Andre Przywara Reviewed-by: Dave Martin Acked-by: Will Deacon Cc: Alexander Shishkin Cc: Al Grant Cc: Arnaldo Carvalho de Melo Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wei Li Link: https://lore.kernel.org/r/20201119152441.6972-2-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 20c7775aecea04d8ca322039969d49dcf568e0e9 Merge: 306e3e91edf1c fa02fcd94b0c8 Author: Peter Zijlstra Date: Thu Nov 26 13:16:55 2020 +0100 Merge remote-tracking branch 'origin/master' into perf/core Further perf/core patches will depend on: d3f7b1bb2040 ("mm/gup: fix gup_fast with dynamic page table folding") which is already in Linus' tree. commit 8539d3f06710a9e91b9968fa736549d7c6b44206 Author: Sean Christopherson Date: Tue Oct 27 14:45:32 2020 -0700 x86/asm: Drop unused RDPID macro Drop the GAS-compatible RDPID macro. RDPID is unsafe in the kernel because KVM loads guest's TSC_AUX on VM-entry and may not restore the host's value until the CPU returns to userspace. See 6a3ea3e68b8a ("x86/entry/64: Do not use RDPID in paranoid entry to accomodate KVM") for details. It can always be resurrected from git history, if needed. [ bp: Massage commit message. ] Signed-off-by: Sean Christopherson Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201027214532.1792-1-sean.j.christopherson@intel.com commit 9a3c425cfdfee169622f1cb1a974b2f287e5560c Author: Justin Ernst Date: Wed Nov 25 11:54:41 2020 -0600 x86/platform/uv: Add and export uv_bios_* functions Add additional uv_bios_call() variant functions to expose information needed by the new uv_sysfs driver. This includes the addition of several new data types defined by UV BIOS and used in the new functions. Signed-off-by: Justin Ernst Signed-off-by: Borislav Petkov Reviewed-by: Steve Wahl Acked-by: Hans de Goede Link: https://lkml.kernel.org/r/20201125175444.279074-3-justin.ernst@hpe.com commit 8f061abbf543355d77fac5c23521b6b452da6310 Author: Justin Ernst Date: Wed Nov 25 11:54:40 2020 -0600 x86/platform/uv: Remove existing /sys/firmware/sgi_uv/ interface Remove existing interface at /sys/firmware/sgi_uv/, created by arch/x86/platform/uv/uv_sysfs.c This interface includes: /sys/firmware/sgi_uv/coherence_id /sys/firmware/sgi_uv/partition_id Both coherence_id and partition_id will be re-introduced via a new uv_sysfs driver. Signed-off-by: Justin Ernst Signed-off-by: Borislav Petkov Reviewed-by: Steve Wahl Acked-by: Hans de Goede Link: https://lkml.kernel.org/r/20201125175444.279074-2-justin.ernst@hpe.com commit f47462c9d8af437ae7d3ef410cf11513f5e3714c Author: Bill Wendling Date: Fri Nov 20 14:40:34 2020 -0800 powerpc: Work around inline asm issues in alternate feature sections The clang toolchain treats inline assembly a bit differently than straight assembly code. In particular, inline assembly doesn't have the complete context available to resolve expressions. This is intentional to avoid divergence in the resulting assembly code. We can work around this issue by borrowing a workaround done for ARM, i.e. not directly testing the labels themselves, but by moving the current output pointer by a value that should always be zero. If this value is not null, then we will trigger a backward move, which is explicitly forbidden. Signed-off-by: Bill Wendling [mpe: Put it in a macro and only do the workaround for clang] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201120224034.191382-4-morbo@google.com commit 215fadfe87259f38418ec78744796f099092fff1 Author: Bill Wendling Date: Fri Nov 20 14:40:33 2020 -0800 powerpc/boot: Use clang when CC is clang The gcc compiler may not be available if CC is clang. Signed-off-by: Bill Wendling Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201120224034.191382-3-morbo@google.com commit 4c078c86b4a466db221a08d423c2eae9332c2641 Author: Bill Wendling Date: Fri Nov 20 14:40:32 2020 -0800 powerpc/boot/wrapper: Add "-z notext" flag to disable diagnostic The "-z notext" flag disables reporting an error if DT_TEXTREL is set. ld.lld: error: can't create dynamic relocation R_PPC64_ADDR64 against symbol: _start in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output >>> defined in >>> referenced by crt0.o:(.text+0x8) in archive arch/powerpc/boot/wrapper.a The BFD linker disables this by default (though it's configurable in current versions). LLD enables this by default. So we add the flag to keep LLD from emitting the error. Signed-off-by: Bill Wendling Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201120224034.191382-2-morbo@google.com commit 26ba9f9651d802ba38583138f43fea5dc7eb0fd6 Author: Bill Wendling Date: Wed Nov 18 14:39:10 2020 -0800 powerpc/boot/wrapper: Add "-z rodynamic" when using LLD Normally all read-only sections precede SHF_WRITE sections. .dynamic and .got have the SHF_WRITE flag; .dynamic probably because of DT_DEBUG. LLD emits an error when this happens, so use "-z rodynamic" to mark .dynamic as read-only. Signed-off-by: Bill Wendling Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201118223910.2711337-1-morbo@google.com commit a538d184e3f0e3b5f800c5ab148e83bb5cdd0133 Author: Bill Wendling Date: Fri Oct 16 17:01:51 2020 -0700 powerpc/boot: Move the .got section to after the .dynamic section Both .dynamic and .got are RELRO sections and should be placed together, and LLD emits an error: ld.lld: error: section: .got is not contiguous with other relro sections Place them together to avoid this. Signed-off-by: Bill Wendling Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201017000151.150788-1-morbo@google.com commit 324a69467f12652b21b17f9644faa967d3d8bbdf Author: Oleg Nesterov Date: Thu Nov 19 17:02:47 2020 +0100 powerpc/ptrace: Hard wire PT_SOFTE value to 1 in gpr_get() too The commit a8a4b03ab95f ("powerpc: Hard wire PT_SOFTE value to 1 in ptrace & signals") changed ptrace_get_reg(PT_SOFTE) to report 0x1, but PTRACE_GETREGS still copies pt_regs->softe as is. This is not consistent and this breaks the user-regs-peekpoke test from https://sourceware.org/systemtap/wiki/utrace/tests/ Reported-by: Jan Kratochvil Signed-off-by: Oleg Nesterov Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201119160247.GB5188@redhat.com commit 640586f8af356096e084d69a9909d217852bde48 Author: Oleg Nesterov Date: Thu Nov 19 17:02:21 2020 +0100 powerpc/ptrace: Simplify gpr_get()/tm_cgpr_get() gpr_get() does membuf_write() twice to override pt_regs->msr in between. We can call membuf_write() once and change ->msr in the kernel buffer, this simplifies the code and the next fix. The patch adds a new simple helper, membuf_at(offs), it returns the new membuf which can be safely used after membuf_write(). Signed-off-by: Oleg Nesterov [mpe: Fixup some minor whitespace issues noticed by Christophe] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201119160221.GA5188@redhat.com commit b3bf99daaee96a141536ce5c60a0d6dba6ec1d23 Author: Chris Wilson Date: Wed Nov 25 19:30:32 2020 +0000 drm/i915/display: Defer initial modeset until after GGTT is initialised Prior to sanitizing the GGTT, the only operations allowed in intel_display_init_nogem() are those to reserve the preallocated (and active) regions in the GGTT leftover from the BIOS. Trying to allocate a GGTT vma (such as intel_pin_and_fence_fb_obj during the initial modeset) may then conflict with other preallocated regions that have not yet been protected. Move the initial modesetting from the end of init_nogem to the beginning of init so that any vma pinning (either framebuffers or DSB, for example), is after the GGTT is ready to handle it. This will prevent the DSB object from being destroyed too early: [ 53.449241] BUG: KASAN: use-after-free in i915_init_ggtt+0x324/0x9e0 [i915] [ 53.449309] Read of size 8 at addr ffff88811b1e8070 by task systemd-udevd/345 [ 53.449399] CPU: 1 PID: 345 Comm: systemd-udevd Tainted: G W 5.10.0-rc5+ #12 [ 53.449409] Call Trace: [ 53.449418] dump_stack+0x9a/0xcc [ 53.449558] ? i915_init_ggtt+0x324/0x9e0 [i915] [ 53.449565] print_address_description.constprop.0+0x3e/0x60 [ 53.449577] ? _raw_spin_lock_irqsave+0x4e/0x50 [ 53.449718] ? i915_init_ggtt+0x324/0x9e0 [i915] [ 53.449849] ? i915_init_ggtt+0x324/0x9e0 [i915] [ 53.449857] kasan_report.cold+0x1f/0x37 [ 53.449993] ? i915_init_ggtt+0x324/0x9e0 [i915] [ 53.450130] i915_init_ggtt+0x324/0x9e0 [i915] [ 53.450273] ? i915_ggtt_suspend+0x1f0/0x1f0 [i915] [ 53.450281] ? static_obj+0x69/0x80 [ 53.450289] ? lockdep_init_map_waits+0xa9/0x310 [ 53.450431] ? intel_wopcm_init+0x96/0x3d0 [i915] [ 53.450581] ? i915_gem_init+0x75/0x2d0 [i915] [ 53.450720] i915_gem_init+0x75/0x2d0 [i915] [ 53.450852] i915_driver_probe+0x8c2/0x1210 [i915] [ 53.450993] ? i915_pm_prepare+0x630/0x630 [i915] [ 53.451006] ? check_chain_key+0x1e7/0x2e0 [ 53.451025] ? __pm_runtime_resume+0x58/0xb0 [ 53.451157] i915_pci_probe+0xa6/0x2b0 [i915] [ 53.451285] ? i915_pci_remove+0x40/0x40 [i915] [ 53.451295] ? lockdep_hardirqs_on_prepare+0x124/0x230 [ 53.451302] ? _raw_spin_unlock_irqrestore+0x42/0x50 [ 53.451309] ? lockdep_hardirqs_on+0xbf/0x130 [ 53.451315] ? preempt_count_sub+0xf/0xb0 [ 53.451321] ? _raw_spin_unlock_irqrestore+0x2f/0x50 [ 53.451335] pci_device_probe+0xf9/0x190 [ 53.451350] really_probe+0x17f/0x5b0 [ 53.451365] driver_probe_device+0x13a/0x1c0 [ 53.451376] device_driver_attach+0x82/0x90 [ 53.451386] ? device_driver_attach+0x90/0x90 [ 53.451391] __driver_attach+0xab/0x190 [ 53.451401] ? device_driver_attach+0x90/0x90 [ 53.451407] bus_for_each_dev+0xe4/0x140 [ 53.451414] ? subsys_dev_iter_exit+0x10/0x10 [ 53.451423] ? __list_add_valid+0x2b/0xa0 [ 53.451440] bus_add_driver+0x227/0x2e0 [ 53.451454] driver_register+0xd3/0x150 [ 53.451585] i915_init+0x92/0xac [i915] [ 53.451592] ? 0xffffffffa0a20000 [ 53.451598] do_one_initcall+0xb6/0x3b0 [ 53.451606] ? trace_event_raw_event_initcall_finish+0x150/0x150 [ 53.451614] ? __kasan_kmalloc.constprop.0+0xc2/0xd0 [ 53.451627] ? kmem_cache_alloc_trace+0x4a4/0x8e0 [ 53.451634] ? kasan_unpoison_shadow+0x33/0x40 [ 53.451649] do_init_module+0xf8/0x350 [ 53.451662] load_module+0x43de/0x47f0 [ 53.451716] ? module_frob_arch_sections+0x20/0x20 [ 53.451731] ? rw_verify_area+0x5f/0x130 [ 53.451780] ? __do_sys_finit_module+0x10d/0x1a0 [ 53.451785] __do_sys_finit_module+0x10d/0x1a0 [ 53.451792] ? __ia32_sys_init_module+0x40/0x40 [ 53.451800] ? seccomp_do_user_notification.isra.0+0x5c0/0x5c0 [ 53.451829] ? rcu_read_lock_bh_held+0xb0/0xb0 [ 53.451835] ? mark_held_locks+0x24/0x90 [ 53.451856] do_syscall_64+0x33/0x80 [ 53.451863] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 53.451868] RIP: 0033:0x7fde09b4470d [ 53.451875] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 53 f7 0c 00 f7 d8 64 89 01 48 [ 53.451880] RSP: 002b:00007ffd6abc1718 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 [ 53.451890] RAX: ffffffffffffffda RBX: 000056444e528150 RCX: 00007fde09b4470d [ 53.451895] RDX: 0000000000000000 RSI: 00007fde09a21ded RDI: 000000000000000f [ 53.451899] RBP: 0000000000020000 R08: 0000000000000000 R09: 0000000000000000 [ 53.451904] R10: 000000000000000f R11: 0000000000000246 R12: 00007fde09a21ded [ 53.451909] R13: 0000000000000000 R14: 000056444e329200 R15: 000056444e528150 [ 53.451957] Allocated by task 345: [ 53.451995] kasan_save_stack+0x1b/0x40 [ 53.452001] __kasan_kmalloc.constprop.0+0xc2/0xd0 [ 53.452006] kmem_cache_alloc+0x1cd/0x8d0 [ 53.452146] i915_vma_instance+0x126/0xb70 [i915] [ 53.452304] i915_gem_object_ggtt_pin_ww+0x222/0x3f0 [i915] [ 53.452446] intel_dsb_prepare+0x14f/0x230 [i915] [ 53.452588] intel_atomic_commit+0x183/0x690 [i915] [ 53.452730] intel_initial_commit+0x2bc/0x2f0 [i915] [ 53.452871] intel_modeset_init_nogem+0xa02/0x2af0 [i915] [ 53.452995] i915_driver_probe+0x8af/0x1210 [i915] [ 53.453120] i915_pci_probe+0xa6/0x2b0 [i915] [ 53.453125] pci_device_probe+0xf9/0x190 [ 53.453131] really_probe+0x17f/0x5b0 [ 53.453136] driver_probe_device+0x13a/0x1c0 [ 53.453142] device_driver_attach+0x82/0x90 [ 53.453148] __driver_attach+0xab/0x190 [ 53.453153] bus_for_each_dev+0xe4/0x140 [ 53.453158] bus_add_driver+0x227/0x2e0 [ 53.453164] driver_register+0xd3/0x150 [ 53.453286] i915_init+0x92/0xac [i915] [ 53.453292] do_one_initcall+0xb6/0x3b0 [ 53.453297] do_init_module+0xf8/0x350 [ 53.453302] load_module+0x43de/0x47f0 [ 53.453307] __do_sys_finit_module+0x10d/0x1a0 [ 53.453312] do_syscall_64+0x33/0x80 [ 53.453318] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 53.453345] Freed by task 82: [ 53.453379] kasan_save_stack+0x1b/0x40 [ 53.453384] kasan_set_track+0x1c/0x30 [ 53.453389] kasan_set_free_info+0x1b/0x30 [ 53.453394] __kasan_slab_free+0x112/0x160 [ 53.453399] kmem_cache_free+0xb2/0x3f0 [ 53.453536] i915_gem_flush_free_objects+0x31a/0x3b0 [i915] [ 53.453542] process_one_work+0x519/0x9f0 [ 53.453547] worker_thread+0x75/0x5c0 [ 53.453552] kthread+0x1da/0x230 [ 53.453557] ret_from_fork+0x22/0x30 [ 53.453584] The buggy address belongs to the object at ffff88811b1e8040 which belongs to the cache i915_vma of size 968 [ 53.453692] The buggy address is located 48 bytes inside of 968-byte region [ffff88811b1e8040, ffff88811b1e8408) [ 53.453792] The buggy address belongs to the page: [ 53.453842] page:00000000b35f7048 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88811b1ef940 pfn:0x11b1e8 [ 53.453847] head:00000000b35f7048 order:3 compound_mapcount:0 compound_pincount:0 [ 53.453853] flags: 0x8000000000010200(slab|head) [ 53.453860] raw: 8000000000010200 ffff888115596248 ffff888115596248 ffff8881155b6340 [ 53.453866] raw: ffff88811b1ef940 0000000000170001 00000001ffffffff 0000000000000000 [ 53.453870] page dumped because: kasan: bad access detected [ 53.453895] Memory state around the buggy address: [ 53.453944] ffff88811b1e7f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 53.454011] ffff88811b1e7f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 53.454079] >ffff88811b1e8000: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb [ 53.454146] ^ [ 53.454211] ffff88811b1e8080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 53.454279] ffff88811b1e8100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 53.454347] ================================================================== [ 53.454414] Disabling lock debugging due to kernel taint [ 53.454434] general protection fault, probably for non-canonical address 0xdead0000000000d0: 0000 [#1] PREEMPT SMP KASAN PTI [ 53.454446] CPU: 1 PID: 345 Comm: systemd-udevd Tainted: G B W 5.10.0-rc5+ #12 [ 53.454592] RIP: 0010:i915_init_ggtt+0x26f/0x9e0 [i915] [ 53.454602] Code: 89 8d 48 ff ff ff 4c 8d 60 d0 49 39 c7 0f 84 37 02 00 00 4c 89 b5 40 ff ff ff 4d 8d bc 24 90 00 00 00 4c 89 ff e8 c1 97 f8 e0 <49> 83 bc 24 90 00 00 00 00 0f 84 0f 02 00 00 49 8d 7c 24 08 e8 a8 [ 53.454618] RSP: 0018:ffff88812247f430 EFLAGS: 00010286 [ 53.454625] RAX: 0000000000000000 RBX: ffff888136440000 RCX: ffffffffa03fb78f [ 53.454633] RDX: 0000000000000000 RSI: 0000000000000008 RDI: dead000000000160 [ 53.454641] RBP: ffff88812247f500 R08: ffffffff8113589f R09: 0000000000000000 [ 53.454648] R10: ffffffff83063843 R11: fffffbfff060c708 R12: dead0000000000d0 [ 53.454656] R13: ffff888136449ba0 R14: 0000000000002000 R15: dead000000000160 [ 53.454664] FS: 00007fde095c4880(0000) GS:ffff88840c880000(0000) knlGS:0000000000000000 [ 53.454672] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 53.454679] CR2: 00007fef132b4f28 CR3: 000000012245c002 CR4: 00000000003706e0 [ 53.454686] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 53.454693] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 53.454700] Call Trace: [ 53.454833] ? i915_ggtt_suspend+0x1f0/0x1f0 [i915] Reported-by: Matthew Auld Fixes: afeda4f3b1c8 ("drm/i915/dsb: Pre allocate and late cleanup of cmd buffer") Signed-off-by: Chris Wilson Cc: Ville Syrjälä Cc: Matthew Auld Cc: Lucas De Marchi Tested-by: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20201125193032.29282-1-chris@chris-wilson.co.uk commit 05faf1559de52465f1e753e31883aa294e6179c1 Author: Laurentiu Palcu Date: Thu Nov 5 16:50:18 2020 +0200 drm/imx/dcss: allow using nearest neighbor interpolation scaling This patch adds support for using NN interpolation scaling by setting the SCALING_FILTER plane property to 1. Otherwise, the default method is used. Signed-off-by: Laurentiu Palcu Reviewed-by: Lucas Stach Signed-off-by: Lucas Stach Link: https://patchwork.freedesktop.org/patch/msgid/20201105145018.27255-1-laurentiu.palcu@oss.nxp.com commit 594486b52c8e77378a9b3769be1f2080b891a922 Author: Laurentiu Palcu Date: Thu Nov 5 16:01:26 2020 +0200 drm/imx/dcss: fix coccinelle warning This small patch fixes a warning that I got while running coccinelle: CHECK drivers/gpu/drm/imx/dcss/dcss-plane.c drivers/gpu/drm/imx/dcss/dcss-plane.c:107:21-23: WARNING !A || A && B is equivalent to !A || B Fixes: 9021c317b770 ("drm/imx: Add initial support for DCSS on iMX8MQ") Signed-off-by: Laurentiu Palcu Reviewed-by: Lucas Stach Signed-off-by: Lucas Stach Link: https://patchwork.freedesktop.org/patch/msgid/20201105140127.25249-3-laurentiu.palcu@oss.nxp.com commit 59cb403f38099506ddbe05fd09126f3f0890860b Author: Laurentiu Palcu Date: Thu Nov 5 16:01:25 2020 +0200 drm/imx/dcss: fix rotations for Vivante tiled formats DCSS supports 90/180/270 degree rotations for Vivante tiled and super-tiled formats. Unfortunately, with the current code, they didn't work properly. This simple patch makes the rotations work by fixing the way the scaler is set up for 90/270 degree rotations. In this particular case, the source width and height need to be swapped since DPR is sending the buffer to scaler already rotated. Also, make sure to allow full rotations for DRM_FORMAT_MOD_VIVANTE_SUPER_TILED. Fixes: 9021c317b770 ("drm/imx: Add initial support for DCSS on iMX8MQ") Signed-off-by: Laurentiu Palcu Reviewed-by: Lucas Stach Signed-off-by: Lucas Stach Link: https://patchwork.freedesktop.org/patch/msgid/20201105140127.25249-2-laurentiu.palcu@oss.nxp.com commit 62c9917d9c1041ba175ccf1bc4c010efc0188a2e Author: Lu Baolu Date: Thu Nov 26 17:06:03 2020 +0800 iommu: Fix htmldocs warnings in sysfs-kernel-iommu_groups Below warnings are fixed: Documentation/ABI/testing/sysfs-kernel-iommu_groups:38: WARNING: Unexpected indentation. Documentation/ABI/testing/sysfs-kernel-iommu_groups:38: WARNING: Block quote ends without a blank line; unexpected unindent. Documentation/ABI/testing/sysfs-kernel-iommu_groups:38: WARNING: Enumerated list ends without a blank line; unexpected unindent. Documentation/ABI/testing/sysfs-kernel-iommu_groups:38: WARNING: Unexpected indentation. Documentation/ABI/testing/sysfs-kernel-iommu_groups:38: WARNING: Block quote ends without a blank line; unexpected unindent. Fixes: 63a816749d86 ("iommu: Document usage of "/sys/kernel/iommu_groups//type" file") Reported-by: Stephen Rothwell Link: https://lore.kernel.org/linux-next/20201126174851.200e0e58@canb.auug.org.au/ Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20201126090603.1511589-1-baolu.lu@linux.intel.com Signed-off-by: Will Deacon commit 2e70c495cadebdcc6f80fde3553401bb0987b29f Author: Prashant Malani Date: Wed Nov 25 00:49:11 2020 -0800 usb: typec: Expose Product Type VDOs via sysfs A PD-capable device can return up to 3 Product Type VDOs as part of its DiscoverIdentity Response (USB PD Spec, Rev 3.0, Version 2.0, Section 6.4.4.3.1). Add sysfs attributes to expose these to userspace. Cc: Benson Leung Cc: Heikki Krogerus Reviewed-by: Heikki Krogerus Signed-off-by: Prashant Malani Link: https://lore.kernel.org/r/20201125084911.1077462-2-pmalani@chromium.org Signed-off-by: Greg Kroah-Hartman commit fd2c35b2f59f3d4a92e8604c7105f001d1da503c Author: Prashant Malani Date: Wed Nov 25 00:49:09 2020 -0800 usb: typec: Consolidate sysfs ABI documentation Both partner and cable have identity VDOs. These are listed separately in the Documentation/ABI/testing/sysfs-class-typec. Factor these out into a common location to avoid the duplication. Acked-by: Heikki Krogerus Signed-off-by: Prashant Malani Link: https://lore.kernel.org/r/20201125084911.1077462-1-pmalani@chromium.org Signed-off-by: Greg Kroah-Hartman commit 7656ca71b0ba04ae7437afe3d046e9134442678e Author: Heikki Krogerus Date: Wed Nov 25 15:06:41 2020 +0300 usb: pd: DFP product types USB Power Delivery Specification R3.0 introduced separate field for the DFP product type to the ID Header VDO. Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20201125120642.37156-2-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit f3ef38160e3dacb490483eb2104b4ce05cd97058 Author: Linus Walleij Date: Mon Nov 23 11:23:46 2020 +0100 usb: isp1301-omap: Convert to use GPIO descriptors This modernized the ISP1301 a bit by switching it to provide a GPIO descriptor from the H2 board if used. Cc: Tony Lindgren Cc: Felipe Balbi Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20201123102346.48284-1-linus.walleij@linaro.org Signed-off-by: Greg Kroah-Hartman commit 1de16e38f1fdbfd9d842a06919098813ed93abf7 Author: Sergio Paracuellos Date: Mon Nov 23 10:36:37 2020 +0100 staging: mt7621-pci: remove 'RALINK_PCI_IMBASEBAR0_ADDR' register Register 'RALINK_PCI_IMBASEBAR0_ADDR' contains internal memory base address for BAR0. We don't really need to write anything there at all since its initial value contains always a desired valid value. Hence remove register definition and related code. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20201123093637.8300-8-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman commit 108b2f2a9724548ffa64274731034d9723665c71 Author: Sergio Paracuellos Date: Mon Nov 23 10:36:36 2020 +0100 staging: mt7621-pci: convert to use 'devm_platform_ioremap_resource' Instead of getting resources parsing from DT first and remaping afterwards, this can be done in one step using the kernel function 'devm_platform_ioremap_resource'. Hence, update to use it. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20201123093637.8300-7-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2fc0898bf3661ba576801acf214c08acdaf75761 Author: Sergio Paracuellos Date: Mon Nov 23 10:36:35 2020 +0100 staging: mt7621-pci: parse and prepare resources in 'mt7621_pci_parse_request_of_pci_ranges' Remove 'mt7621_pcie_add_resources' where resources are added to the host windows moving this code into the function where all the parsing and preparing code is being done: 'mt7621_pci_parse_request_of_pci_ranges'. The memory resource has been properly parsed for the PCI APIs so we only need to retrieve it and use it in those places we need. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20201123093637.8300-6-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8713094e5b007a08372e609344f9fd60076e207d Author: Sergio Paracuellos Date: Mon Nov 23 10:36:34 2020 +0100 staging: mt7621-pci: review 'pci_host_bridge' assigned variables PCI kernel apis now set some variables related with pci_host_bridge by default and it is not necessary to setup them in driver code. Host bridge parent device is set by default to the platform device and 'swizzle_irq' is also set to its default function. These two are not necessary to be set here. Hence remove them. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20201123093637.8300-5-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman commit 301c7ed52263b5e3f93ea22d064291cb38f741cd Author: Sergio Paracuellos Date: Mon Nov 23 10:36:33 2020 +0100 staging: mt7621-pci: add comment to clarify IO resource in this driver Because IO_SPACE_LIMIT for mips is 0xFFFF but this platform uses PĈI IO resource at 0x001e160000. Hence instead of directly use some more accurate functions from the PCI kernel for this driver some things must be done in a different way to make things work. Add this explanation as a comment where the IO resource is parsed and virtually mapped into memory. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20201123093637.8300-4-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman commit d7dcee38cbea6931a700bd42435bf403afee826a Author: Sergio Paracuellos Date: Mon Nov 23 10:36:32 2020 +0100 staging: mt7621-pci: remove 'offset' with mem and io resource sizes Offset contains resources size for both io and memory resources. Those fields are directly initialized to zero and set up using 'pci_add_resource_offset' function. Instead of doing that remove them and use directly function 'pci_add_resource' where zero is passed directly to its internal call to 'pci_add_resource_offset'. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20201123093637.8300-3-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0438fb09828eda30076a3e14b62f17aed95c364b Author: Sergio Paracuellos Date: Mon Nov 23 10:36:31 2020 +0100 staging: mt7621-pci: remove bus ranges related code Bus ranges are now discovered by default. Hence remove its related code from the driver. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20201123093637.8300-2-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman commit c3c21b356505e2f4c528d22903531f7764e18998 Author: Suman Anna Date: Wed Nov 18 19:05:31 2020 -0600 remoteproc: k3-r5: Adjust TCM sizes in Split-mode on J7200 SoCs The J7200 SoCs have a revised R5FSS IP that adds a unique feature w.r.t TCM sizing. Each R5F core in a cluster typically has 32 KB each of ATCM and BTCM, with only the Core0 TCMs usable in LockStep mode. This revised IP however doubles the total available TCM in LockStep mode by making the Core1 TCM visible immediately after the corresponding Core0 TCM. The R5F DT nodes on the J7200 SoCs define double (64 KB) the normal TCM size (32 KB) for R5F Core0 for each of ATCM and BTCM to represent the above. This increased TCM memory is only usable in LockStep-mode, and has to be adjusted to the normal 32 KB size in Split mode. Enhance the TI K3 R5F remoteproc for this logic through a new function. The adjustment is a no-op on prior SoCs and relies on the correct DTS node sizes in LockStep-mode on applicable SoCs. Reviewed-by: Mathieu Poirier Signed-off-by: Suman Anna Link: https://lore.kernel.org/r/20201119010531.21083-4-s-anna@ti.com Signed-off-by: Bjorn Andersson commit 7508ea19b20da80fcdde05354c35e2c45e875b5c Author: Suman Anna Date: Wed Nov 18 19:05:30 2020 -0600 remoteproc: k3-r5: Extend support to R5F clusters on J7200 SoCs The K3 J7200 SoC family has a revised R5F sub-system and contains a subset of the R5F clusters present on J721E SoCs. The K3 J7200 SoCs only have two dual-core Arm R5F clusters/subsystems with 2 R5F cores each. One cluster is present within the MCU voltage domain (MCU_R5FSS0), while the other is present in the MAIN voltage domain (MAIN_R5FSS0). The revised IP has the following two new features: 1. TCMs are auto-initialized during module power-up, and the behavior is programmable through a MMR bit. 2. The LockStep-mode allows the Core1 TCMs to be combined with the Core0 TCMs effectively doubling the amount of TCMs available. The LockStep-mode on previous SoCs could only use the Core0 TCMs. This combined TCMs appear contiguous at the respective Core0 TCM addresses. Extend the support to these clusters in the K3 R5F remoteproc driver using J7200 specific compatibles. Logic for the second feature is added in the next patch. The integration of these clusters is very much similar to J721E SoCs otherwise. Reviewed-by: Mathieu Poirier Signed-off-by: Suman Anna Link: https://lore.kernel.org/r/20201119010531.21083-3-s-anna@ti.com Signed-off-by: Bjorn Andersson commit 41e6f43f3b24920ec8d10682005d3eb4a24d6e86 Author: Suman Anna Date: Wed Nov 18 19:05:29 2020 -0600 dt-bindings: remoteproc: k3-r5f: Update bindings for J7200 SoCs The TI K3 J7200 SoCs have two dual-core Arm R5F clusters/subsystems, with 2 R5F cores each, one in each of the MCU and MAIN voltage domains. These clusters are a revised IP version compared to those present on J721E SoCs. Update the K3 R5F remoteproc bindings with the compatible info relevant to these R5F clusters/subsystems on K3 J7200 SoCs. Reviewed-by: Mathieu Poirier Signed-off-by: Suman Anna Link: https://lore.kernel.org/r/20201119010531.21083-2-s-anna@ti.com Signed-off-by: Bjorn Andersson commit 4c1ad562d303526b5d9b49f5e0d72da13ef78dec Author: Suman Anna Date: Fri Nov 20 21:20:42 2020 -0600 remoteproc: Add a rproc_set_firmware() API A new API, rproc_set_firmware() is added to allow the remoteproc platform drivers and remoteproc client drivers to be able to configure a custom firmware name that is different from the default name used during remoteproc registration. This function is being introduced to provide a kernel-level equivalent of the current sysfs interface to remoteproc client drivers, and can only change firmwares when the remoteproc is offline. This allows some remoteproc drivers to choose different firmwares at runtime based on the functionality the remote processor is providing. The TI PRU Ethernet driver will be an example of such usage as it requires to use different firmwares for different supported protocols. Also, update the firmware_store() function used by the sysfs interface to reuse this function to avoid code duplication. Reviewed-by: Rishabh Bhatnagar Signed-off-by: Suman Anna Link: https://lore.kernel.org/r/20201121032042.6195-1-s-anna@ti.com Signed-off-by: Bjorn Andersson commit 0ac72f909ffe37d829deb1d18d057c83bec5e3b1 Author: Bjorn Andersson Date: Sat Nov 21 21:41:35 2020 -0800 remoteproc: sysmon: Improve error messages Improve the style of a few of the error messages printed by the sysmon implementation and fix the copy-pasted shutdown error in the send-event function. Tested-by: Steev Klimaszewski Reviewed-by: Rishabh Bhatnagar Link: https://lore.kernel.org/r/20201122054135.802935-5-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit ed5da80873a792b9b2b560a6417bc60679ba5126 Author: Bjorn Andersson Date: Sat Nov 21 21:41:34 2020 -0800 remoteproc: qcom: q6v5: Query sysmon before graceful shutdown Requesting a graceful shutdown through the shared memory state signals will not be acked in the event that sysmon has already successfully shut down the remote firmware. So extend the stop request API to optionally take the remoteproc's sysmon instance and query if there's already been a successful shutdown attempt, before doing the signal dance. Tested-by: Steev Klimaszewski Reviewed-by: Rishabh Bhatnagar Link: https://lore.kernel.org/r/20201122054135.802935-4-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit 47edc0104c61d609b0898a302267b7269d87a6af Author: Vinod Koul Date: Wed Nov 25 11:21:55 2020 +0530 soundwire: qcom: Fix build failure when slimbus is module Commit 5bd773242f75 ("soundwire: qcom: avoid dependency on CONFIG_SLIMBUS") removed hard dependency on Slimbus for qcom driver but it results in build failure when: CONFIG_SOUNDWIRE_QCOM=y CONFIG_SLIMBUS=m drivers/soundwire/qcom.o: In function `qcom_swrm_probe': qcom.c:(.text+0xf44): undefined reference to `slimbus_bus' Fix this by using IS_REACHABLE() in driver which is recommended to be used with imply. Fixes: 5bd773242f75 ("soundwire: qcom: avoid dependency on CONFIG_SLIMBUS") Reported-by: kernel test robot Tested-by: Srinivas Kandagatla Reviewed-by: Srinivas Kandagatla Acked-by: Randy Dunlap # build-tested Link: https://lore.kernel.org/r/20201125055155.GD8403@vkoul-mobl Signed-off-by: Vinod Koul commit ac85cca316370d897b5af0568d224410b027b5e4 Author: Vaibhav Gupta Date: Mon Nov 2 22:17:30 2020 +0530 scsi: pmcraid: Use generic power management Drivers should do only device-specific jobs. But in general, drivers using legacy PCI PM framework for .suspend()/.resume() have to manage many PCI PM-related tasks themselves which can be done by PCI Core itself. This brings extra load on the driver and it directly calls PCI helper functions to handle them. Switch to the new generic framework by updating function signatures and define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove unnecessary calls to the PCI Helper functions along with the legacy .suspend & .resume bindings. Link: https://lore.kernel.org/r/20201102164730.324035-30-vaibhavgupta40@gmail.com Signed-off-by: Vaibhav Gupta Signed-off-by: Martin K. Petersen commit 0aea8a8f3a77d870a1e3312f561efbcf4907bcd5 Author: Vaibhav Gupta Date: Mon Nov 2 22:17:29 2020 +0530 scsi: pmcraid: Drop PCI Wakeup calls from .resume The driver calls pci_enable_wake(...., false) in pmcraid_resume(), and there is no corresponding pci_enable_wake(...., true) in pmcraid_suspend(). Either it should do enable-wake the device in .suspend() or should not invoke pci_enable_wake() at all. Concluding that this driver doesn't support enable-wake and PCI core calls pci_enable_wake(pci_dev, PCI_D0, false) during resume, drop it from pmcraid_resume(). Link: https://lore.kernel.org/r/20201102164730.324035-29-vaibhavgupta40@gmail.com Signed-off-by: Vaibhav Gupta Signed-off-by: Martin K. Petersen commit 53fdec73c14fdf8653f90078495ac13f7c171aa3 Author: Vaibhav Gupta Date: Mon Nov 2 22:17:28 2020 +0530 scsi: mvumi: Update function description There is no "device" parameter in mvumi_shutdown(). Instead there is "pdev" which is not described. Link: https://lore.kernel.org/r/20201102164730.324035-28-vaibhavgupta40@gmail.com Signed-off-by: Vaibhav Gupta Signed-off-by: Martin K. Petersen commit 0572edbc32c56ca8863e5849051f9dfd06fd38b9 Author: Vaibhav Gupta Date: Mon Nov 2 22:17:27 2020 +0530 scsi: mvumi: Use generic power management Drivers should do only device-specific jobs. But in general, drivers using legacy PCI PM framework for .suspend()/.resume() have to manage many PCI PM-related tasks themselves which can be done by PCI Core itself. This brings extra load on the driver and it directly calls PCI helper functions to handle them. Switch to the new generic framework by updating function signatures and define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove unnecessary calls to the PCI Helper functions along with the legacy .suspend & .resume bindings. Link: https://lore.kernel.org/r/20201102164730.324035-27-vaibhavgupta40@gmail.com Signed-off-by: Vaibhav Gupta Signed-off-by: Martin K. Petersen commit bd7463cdbe1af0e6d120defcbe9cf0e6eb0729c7 Author: Vaibhav Gupta Date: Mon Nov 2 22:17:26 2020 +0530 scsi: mvumi: Drop PCI Wakeup calls from .resume The driver calls pci_enable_wake(...., false) in mvumi_resume(), and there is no corresponding pci_enable_wake(...., true) in mvumi_suspend(). Either it should do enable-wake the device in .suspend() or should not invoke pci_enable_wake() at all. Concluding that this driver doesn't support enable-wake and PCI core calls pci_enable_wake(pci_dev, PCI_D0, false) during resume, drop it from mvumi_resume(). Link: https://lore.kernel.org/r/20201102164730.324035-26-vaibhavgupta40@gmail.com Signed-off-by: Vaibhav Gupta Signed-off-by: Martin K. Petersen commit 99769d8d9109878d3f3e805dd21dfbb44aad035c Author: Vaibhav Gupta Date: Mon Nov 2 22:17:25 2020 +0530 scsi: 3w-sas: Use generic power management Drivers should do only device-specific jobs. But in general, drivers using legacy PCI PM framework for .suspend()/.resume() have to manage many PCI PM-related tasks themselves which can be done by PCI Core itself. This brings extra load on the driver and it directly calls PCI helper functions to handle them. Switch to the new generic framework by updating function signatures and define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove unnecessary calls to the PCI Helper functions along with the legacy .suspend & .resume bindings. Link: https://lore.kernel.org/r/20201102164730.324035-25-vaibhavgupta40@gmail.com Signed-off-by: Vaibhav Gupta Signed-off-by: Martin K. Petersen commit 7ea03ab79e00fccd2a12c1526fb3c7703c8a7baa Author: Vaibhav Gupta Date: Mon Nov 2 22:17:24 2020 +0530 scsi: 3w-sas: Drop PCI Wakeup calls from .resume The driver calls pci_enable_wake(...., false) in twl_resume(), and there is no corresponding pci_enable_wake(...., true) in twl_suspend(). Either it should do enable-wake the device in .suspend() or should not invoke pci_enable_wake() at all. Concluding that this driver doesn't support enable-wake and PCI core calls pci_enable_wake(pci_dev, PCI_D0, false) during resume, drop it from twl_resume(). Link: https://lore.kernel.org/r/20201102164730.324035-24-vaibhavgupta40@gmail.com Signed-off-by: Vaibhav Gupta Signed-off-by: Martin K. Petersen commit d53ae6bbeb71e1d3c1b85e8befce6379642ed2d9 Author: Vaibhav Gupta Date: Mon Nov 2 22:17:23 2020 +0530 scsi: 3w-9xxx: Use generic power management Drivers should do only device-specific jobs. But in general, drivers using legacy PCI PM framework for .suspend()/.resume() have to manage many PCI PM-related tasks themselves which can be done by PCI Core itself. This brings extra load on the driver and it directly calls PCI helper functions to handle them. Switch to the new generic framework by updating function signatures and define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove unnecessary calls to the PCI Helper functions along with the legacy .suspend & .resume bindings. Link: https://lore.kernel.org/r/20201102164730.324035-23-vaibhavgupta40@gmail.com Signed-off-by: Vaibhav Gupta Signed-off-by: Martin K. Petersen commit 3a09951ae3661071a47fead76036d4530c91fd5e Author: Vaibhav Gupta Date: Mon Nov 2 22:17:22 2020 +0530 scsi: 3w-9xxx: Drop PCI Wakeup calls from .resume The driver calls pci_enable_wake(...., false) in twa_resume(), and there is no corresponding pci_enable_wake(...., true) in twa_suspend(). Either it should do enable-wake the device in .suspend() or should not invoke pci_enable_wake() at all. Concluding that this driver doesn't support enable-wake and PCI core calls pci_enable_wake(pci_dev, PCI_D0, false) during resume, drop it from twa_resume(). Link: https://lore.kernel.org/r/20201102164730.324035-22-vaibhavgupta40@gmail.com Acked-by: Don Brace Signed-off-by: Vaibhav Gupta Signed-off-by: Martin K. Petersen commit e5b79ebfb854a1b17a7dff1d3b00027363209e4f Author: Vaibhav Gupta Date: Mon Nov 2 22:17:21 2020 +0530 scsi: hpsa: Use generic power management Drivers should do only device-specific jobs. But in general, drivers using legacy PCI PM framework for .suspend()/.resume() have to manage many PCI PM-related tasks themselves which can be done by PCI Core itself. This brings extra load on the driver and it directly calls PCI helper functions to handle them. Switch to the new generic framework by updating function signatures and define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove unnecessary calls to the PCI Helper functions along with the legacy .suspend & .resume bindings. Link: https://lore.kernel.org/r/20201102164730.324035-21-vaibhavgupta40@gmail.com Acked-by: Don Brace Signed-off-by: Vaibhav Gupta Signed-off-by: Martin K. Petersen commit 47c37c4dbf93fb2f35b715f94baec779bd0b2500 Author: Vaibhav Gupta Date: Mon Nov 2 22:17:20 2020 +0530 scsi: pm_8001: Use generic power management Drivers should do only device-specific jobs. But in general, drivers using legacy PCI PM framework for .suspend()/.resume() have to manage many PCI PM-related tasks themselves which can be done by PCI Core itself. This brings extra load on the driver and it directly calls PCI helper functions to handle them. Switch to the new generic framework by updating function signatures and define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove unnecessary calls to the PCI Helper functions along with the legacy .suspend & .resume bindings. Link: https://lore.kernel.org/r/20201102164730.324035-20-vaibhavgupta40@gmail.com Signed-off-by: Vaibhav Gupta Signed-off-by: Martin K. Petersen commit 66aea31a2d264cc4a6c0470103b313b7bd1600a5 Author: Vaibhav Gupta Date: Mon Nov 2 22:17:19 2020 +0530 scsi: pm_8001: Drop PCI Wakeup calls from .resume The driver calls pci_enable_wake(...., false) in pm8001_pci_resume(), and there is no corresponding pci_enable_wake(...., true) in pm8001_pci_suspend(). Either it should do enable-wake the device in .suspend() or should not invoke pci_enable_wake() at all. Concluding that this driver doesn't support enable-wake and PCI core calls pci_enable_wake(pci_dev, PCI_D0, false) during resume, drop it from pm8001_pci__resume(). Link: https://lore.kernel.org/r/20201102164730.324035-19-vaibhavgupta40@gmail.com Acked-by: Jack Wang Signed-off-by: Vaibhav Gupta Signed-off-by: Martin K. Petersen commit ef6fa16b5d4a9d3f6ba839737b51d1b2f47259ea Author: Vaibhav Gupta Date: Mon Nov 2 22:17:18 2020 +0530 scsi: lpfc: Use generic power management Drivers should do only device-specific jobs. But in general, drivers using legacy PCI PM framework for .suspend()/.resume() have to manage many PCI PM-related tasks themselves which can be done by PCI Core itself. This brings extra load on the driver and it directly calls PCI helper functions to handle them. Switch to the new generic framework by updating function signatures and define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove unnecessary calls to the PCI Helper functions along with the legacy .suspend & .resume bindings. Link: https://lore.kernel.org/r/20201102164730.324035-18-vaibhavgupta40@gmail.com Signed-off-by: Vaibhav Gupta Signed-off-by: Martin K. Petersen commit 17287305a526fa3e3faae0d7c950f5b10df3fe9a Author: Vaibhav Gupta Date: Mon Nov 2 22:17:17 2020 +0530 scsi: mpt3sas_scsih: Use generic power management Drivers should do only device-specific jobs. But in general, drivers using legacy PCI PM framework for .suspend()/.resume() have to manage many PCI PM-related tasks themselves which can be done by PCI Core itself. This brings extra load on the driver and it directly calls PCI helper functions to handle them. Switch to the new generic framework by updating function signatures and define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove unnecessary calls to the PCI Helper functions along with the legacy .suspend & .resume bindings. Link: https://lore.kernel.org/r/20201102164730.324035-17-vaibhavgupta40@gmail.com Signed-off-by: Vaibhav Gupta Signed-off-by: Martin K. Petersen commit eaf148359d009d70aec13ae3772675b25890822e Author: Vaibhav Gupta Date: Mon Nov 2 22:17:16 2020 +0530 scsi: mpt3sas_scsih: Drop PCI Wakeup calls from .resume The driver calls pci_enable_wake(...., false) in scsih_resume(), and there is no corresponding pci_enable_wake(...., true) in scsih_suspend(). Either it should do enable-wake the device in .suspend() or should not invoke pci_enable_wake() at all. Concluding that this driver doesn't support enable-wake and PCI core calls pci_enable_wake(pci_dev, PCI_D0, false) during resume, drop it from scsih_resume(). Link: https://lore.kernel.org/r/20201102164730.324035-16-vaibhavgupta40@gmail.com Signed-off-by: Vaibhav Gupta Signed-off-by: Martin K. Petersen commit 71c8f15e1dbcd202f0b27d7560ce191c5a3b7286 Author: Vaibhav Gupta Date: Mon Nov 2 22:17:15 2020 +0530 scsi: hisi_sas_v3_hw: Remove extra function calls for runtime pm Both runtime_suspend_v3_hw() and runtime_resume_v3_hw() do nothing else but invoke suspend_v3_hw() and resume_v3_hw() respectively. This is the case of unnecessary function calls. To use those functions for runtime pm as well, simply use UNIVERSAL_DEV_PM_OPS. make -j$(nproc) W=1, with CONFIG_PM disabled, throws '-Wunused-function' warning for runtime_suspend_v3_hw() and runtime_resume_v3_hw(). After dropping those function definitions, the warning was thrown for suspend_v3_hw() and resume_v3_hw(). Hence, mark them as '__maybe_unused'. Link: https://lore.kernel.org/r/20201102164730.324035-15-vaibhavgupta40@gmail.com Signed-off-by: Vaibhav Gupta Signed-off-by: Martin K. Petersen commit 027e508aea458719390eb6a83a297940e8ae79f1 Author: Vaibhav Gupta Date: Mon Nov 2 22:17:14 2020 +0530 scsi: hisi_sas_v3_hw: Don't use PCI helper functions Drivers using new-framework/generic-framework should not handle standard power management operations. These operations were performed by legacy framework through PCI helper functions like pci_save/restore_state(), pci_set_power_state(), etc. Drivers should not use them now. Link: https://lore.kernel.org/r/20201102164730.324035-14-vaibhavgupta40@gmail.com Signed-off-by: Vaibhav Gupta Signed-off-by: Martin K. Petersen commit 17b5e4d14837b1f16d583cb66810d8f915ffbfd8 Author: Vaibhav Gupta Date: Mon Nov 2 22:17:13 2020 +0530 scsi: hisi_sas_v3_hw: Drop PCI Wakeup calls from .resume The driver calls pci_enable_wake(...., false) in hisi_sas_v3_resume(), and there is no corresponding pci_enable_wake(...., true) in hisi_sas_v3_suspend(). Either it should do enable-wake the device in .suspend() or should not invoke pci_enable_wake() at all. Concluding that this driver doesn't support enable-wake and PCI core calls pci_enable_wake(pci_dev, PCI_D0, false) during resume, drop it from hisi_sas_v3_resume(). Link: https://lore.kernel.org/r/20201102164730.324035-13-vaibhavgupta40@gmail.com Signed-off-by: Vaibhav Gupta Signed-off-by: Martin K. Petersen commit 5f2d8c365050a53042cb0199caf04b63210c3da0 Author: Vaibhav Gupta Date: Mon Nov 2 22:17:12 2020 +0530 scsi: esas2r: Use generic power management Drivers should do only device-specific jobs. But in general, drivers using legacy PCI PM framework for .suspend()/.resume() have to manage many PCI PM-related tasks themselves which can be done by PCI Core itself. This brings extra load on the driver and it directly calls PCI helper functions to handle them. Switch to the new generic framework by updating function signatures and define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove unnecessary calls to the PCI Helper functions along with the legacy .suspend & .resume bindings. Link: https://lore.kernel.org/r/20201102164730.324035-12-vaibhavgupta40@gmail.com Signed-off-by: Vaibhav Gupta Signed-off-by: Martin K. Petersen commit 996360c141a6097094ca80e50be695b61a63df3c Author: Vaibhav Gupta Date: Mon Nov 2 22:17:11 2020 +0530 scsi: esas2r: Drop PCI Wakeup calls from .resume The driver calls pci_enable_wake(...., false) in esas2r_resume(), and there is no corresponding pci_enable_wake(...., true) in esas2r_suspend(). Either it should do enable-wake the device in .suspend() or should not invoke pci_enable_wake() at all. Concluding that this driver doesn't support enable-wake and PCI core calls pci_enable_wake(pci_dev, PCI_D0, false) during resume, drop it from esas2r_resume(). Link: https://lore.kernel.org/r/20201102164730.324035-11-vaibhavgupta40@gmail.com Signed-off-by: Vaibhav Gupta Signed-off-by: Martin K. Petersen commit 756ebbe73fc48fdcb588d38f8b8874591ed5ab90 Author: Vaibhav Gupta Date: Mon Nov 2 22:17:10 2020 +0530 scsi: arcmsr: Use generic power management Drivers should do only device-specific jobs. But in general, drivers using legacy PCI PM framework for .suspend()/.resume() have to manage many PCI PM-related tasks themselves which can be done by PCI Core itself. This brings extra load on the driver and it directly calls PCI helper functions to handle them. Switch to the new generic framework by updating function signatures and define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove unnecessary calls to the PCI Helper functions along with the legacy .suspend & .resume bindings. Link: https://lore.kernel.org/r/20201102164730.324035-10-vaibhavgupta40@gmail.com Signed-off-by: Vaibhav Gupta Signed-off-by: Martin K. Petersen commit b7b862d75b49cc26038d03e9f723799b938d3bcf Author: Vaibhav Gupta Date: Mon Nov 2 22:17:09 2020 +0530 scsi: arcmsr: Drop PCI wakeup calls from .resume The driver calls pci_enable_wake(...., false) in arcmsr_resume(), and there is no corresponding pci_enable_wake(...., true) in arcmsr_suspend(). Either it should do enable-wake the device in .suspend() or should not invoke pci_enable_wake() at all. Concluding that this driver doesn't support enable-wake and PCI core calls pci_enable_wake(pci_dev, PCI_D0, false) during resume, drop it from arcmsr_resume(). Link: https://lore.kernel.org/r/20201102164730.324035-9-vaibhavgupta40@gmail.com Signed-off-by: Vaibhav Gupta Signed-off-by: Martin K. Petersen commit ec199a8df6989915bd2f099e868f09d6ea6b7f06 Author: Vaibhav Gupta Date: Mon Nov 2 22:17:08 2020 +0530 scsi: aic79xx: Use generic power management Drivers should do only device-specific jobs. But in general, drivers using legacy PCI PM framework for .suspend()/.resume() have to manage many PCI PM-related tasks themselves which can be done by PCI Core itself. This brings extra load on the driver and it directly calls PCI helper functions to handle them. Switch to the new generic framework by updating function signatures and define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove unnecessary calls to the PCI Helper functions along with the legacy .suspend & .resume bindings. Link: https://lore.kernel.org/r/20201102164730.324035-8-vaibhavgupta40@gmail.com Signed-off-by: Vaibhav Gupta Signed-off-by: Martin K. Petersen commit 6897b9a177dfe38795bb4c086dc72edff7aba779 Author: Vaibhav Gupta Date: Mon Nov 2 22:17:07 2020 +0530 scsi: aic7xxx: Use generic power management Drivers should do only device-specific jobs. But in general, drivers using legacy PCI PM framework for .suspend()/.resume() have to manage many PCI PM-related tasks themselves which can be done by PCI Core itself. This brings extra load on the driver and it directly calls PCI helper functions to handle them. Switch to the new generic framework by updating function signatures and define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove unnecessary calls to the PCI Helper functions along with the legacy .suspend & .resume bindings. Link: https://lore.kernel.org/r/20201102164730.324035-7-vaibhavgupta40@gmail.com Signed-off-by: Vaibhav Gupta Signed-off-by: Martin K. Petersen commit 7e380b5c27ea3bab1175584c7763d616ecd6e0c5 Author: Vaibhav Gupta Date: Mon Nov 2 22:17:06 2020 +0530 scsi: aacraid: Use generic power management Drivers should do only device-specific jobs. But in general, drivers using legacy PCI PM framework for .suspend()/.resume() have to manage many PCI PM-related tasks themselves which can be done by PCI Core itself. This brings extra load on the driver and it directly calls PCI helper functions to handle them. Switch to the new generic framework by updating function signatures and define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove unnecessary calls to the PCI Helper functions along with the legacy .suspend & .resume bindings. Link: https://lore.kernel.org/r/20201102164730.324035-6-vaibhavgupta40@gmail.com Acked-by: Balsundar P Signed-off-by: Vaibhav Gupta Signed-off-by: Martin K. Petersen commit 7dd2222180762656ccaf9e42ecc289f59fd43bc4 Author: Vaibhav Gupta Date: Mon Nov 2 22:17:05 2020 +0530 scsi: aacraid: Drop pci_enable_wake() from .resume The driver calls pci_enable_wake(...., false) in aac_resume(), and there is no corresponding pci_enable_wake(...., true) in aac_suspend(). Either it should do enable-wake the device in .suspend() or should not invoke pci_enable_wake() at all. Concluding that this is a bug and PCI core calls pci_enable_wake(pci_dev, PCI_D0, false) during resume, drop it from aac_resume(). Link: https://lore.kernel.org/r/20201102164730.324035-5-vaibhavgupta40@gmail.com Signed-off-by: Vaibhav Gupta Signed-off-by: Martin K. Petersen commit 498854102c1c14af20941c20d8ca996bdcf116f4 Author: Vaibhav Gupta Date: Mon Nov 2 22:17:04 2020 +0530 scsi: megaraid_sas: Update function description Function parameter 'pdev 'is described as Generic Device Structure. It is a PCI device structure. Link: https://lore.kernel.org/r/20201102164730.324035-4-vaibhavgupta40@gmail.com Signed-off-by: Vaibhav Gupta Signed-off-by: Martin K. Petersen commit 977001df03683b0209e56324b51d96ca5362c019 Author: Vaibhav Gupta Date: Mon Nov 2 22:17:03 2020 +0530 scsi: megaraid_sas: Use generic power management Drivers should do only device-specific jobs. But in general, drivers using legacy PCI PM framework for .suspend()/.resume() have to manage many PCI PM-related tasks themselves which can be done by PCI Core itself. This brings extra load on the driver and it directly calls PCI helper functions to handle them. Switch to the new generic framework by updating function signatures and define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove unnecessary calls to the PCI Helper functions along with the legacy .suspend & .resume bindings. Link: https://lore.kernel.org/r/20201102164730.324035-3-vaibhavgupta40@gmail.com Signed-off-by: Vaibhav Gupta Signed-off-by: Martin K. Petersen commit 8ed9d987c6d9c7f262a764c56c27d74a906475f0 Author: Vaibhav Gupta Date: Mon Nov 2 22:17:02 2020 +0530 scsi: megaraid_sas: Drop PCI wakeup calls from .resume The driver calls pci_enable_wake(...., false) in megasas_resume(), and there is no corresponding pci_enable_wake(...., true) in megasas_suspend(). Either it should do enable-wake the device in .suspend() or should not invoke pci_enable_wake() at all. Concluding that this driver doesn't support enable-wake and PCI core calls pci_enable_wake(pci_dev, PCI_D0, false) during resume, drop it from megasas_resume(). Link: https://lore.kernel.org/r/20201102164730.324035-2-vaibhavgupta40@gmail.com Signed-off-by: Vaibhav Gupta Signed-off-by: Martin K. Petersen commit 594e31bcebd6b8127ab8bcf37068ecef6c996459 Merge: 64088b2ac19d1 24453a84285ee Author: Jakub Kicinski Date: Wed Nov 25 18:11:25 2020 -0800 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== 40GbE Intel Wired LAN Driver Updates 2020-11-24 This series contains updates to i40e and igbvf drivers. Marek removes a redundant assignment for i40e. Stefan Assmann corrects reporting of VF link speed for i40e. Karen revises a couple of error messages to warnings for igbvf as they could be misinterpreted as issues when they are not. v2: Dropped PTP patch as it's being updated. * '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: igbvf: Refactor traces i40e: report correct VF link speed when link state is set to enable i40e: remove redundant assignment ==================== Link: https://lore.kernel.org/r/20201124165245.2844118-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 64088b2ac19d146ad54ab95a718ebe155d4c1e43 Merge: 0f614511fa224 0fd5d79efa4a3 Author: Jakub Kicinski Date: Wed Nov 25 17:58:09 2020 -0800 Merge branch 'net-dsa-mv88e6xxx-serdes-link-without-phy' Chris Packham says: ==================== net: dsa: mv88e6xxx: serdes link without phy This small series gets my hardware into a working state. The key points are to make sure we don't force the link and that we ask the MAC for the link status. I also have updated my dts to say `phy-mode = "1000base-x";` and `managed = "in-band-status";` I've dropped the patch for the 88E6123 as it's a distraction and I lack hardware to do any proper testing with it. Earlier versions are on the mailing list if anyone wants to pick it up in the future. I notice there's a series for mv88e6393x circulating on the netdev mailing list. As patch #1 is adding a new device specific op either this series will need updating to cover the mv88e6393x or the mv88e6393x series will need updating for the new op depenting on which lands first. ==================== Link: https://lore.kernel.org/r/20201124043440.28400-1-chris.packham@alliedtelesis.co.nz Signed-off-by: Jakub Kicinski commit 0fd5d79efa4a35c5b0944f7dc42b440d56af4b04 Author: Chris Packham Date: Tue Nov 24 17:34:40 2020 +1300 net: dsa: mv88e6xxx: Handle error in serdes_get_regs If the underlying read operation failed we would end up writing stale data to the supplied buffer. This would end up with the last successfully read value repeating. Fix this by only writing the data when we know the read was good. This will mean that failed values will return 0xffff. Signed-off-by: Chris Packham Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski commit 5c19bc8b57342768087d4ca2f3b29cb69e7dcdfb Author: Chris Packham Date: Tue Nov 24 17:34:39 2020 +1300 net: dsa: mv88e6xxx: Add serdes interrupt support for MV88E6097 The MV88E6097 presents the serdes interrupts for ports 8 and 9 via the Switch Global 2 registers. There is no additional layer of enablinh/disabling the serdes interrupts like other mv88e6xxx switches. Even though most of the serdes behaviour is the same as the MV88E6185 that chip does not provide interrupts for serdes events so unlike earlier commits the functions added here are specific to the MV88E6097. Signed-off-by: Chris Packham Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski commit f5be107c333878b09c2f682967e92f98f7fc80be Author: Chris Packham Date: Tue Nov 24 17:34:38 2020 +1300 net: dsa: mv88e6xxx: Support serdes ports on MV88E6097/6095/6185 Implement serdes_power, serdes_get_lane and serdes_pcs_get_state ops for the MV88E6097/6095/6185 so that ports 8 & 9 can be supported as serdes ports and directly connected to other network interfaces or to SFPs without a PHY. Signed-off-by: Chris Packham Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski commit 4efe766290363abc3b6d4f0ba7e48be756621788 Author: Chris Packham Date: Tue Nov 24 17:34:37 2020 +1300 net: dsa: mv88e6xxx: Don't force link when using in-band-status When a port is configured with 'managed = "in-band-status"' switch chips like the 88E6390 need to propagate the SERDES link state to the MAC because the link state is not correctly detected. This causes problems on the 88E6185/88E6097 where the link partner won't see link state changes because we're forcing the link. To address this introduce a new device specific op port_sync_link() and push the logic from mv88e6xxx_mac_link_up() into that. Provide an implementation for the 88E6185 like devices which doesn't force the link. Signed-off-by: Chris Packham Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski commit 0f614511fa224677ec32c0e8790c3bd0aa5acc3d Merge: 0e1f1cc89a77e 8c4599f49841d Author: Jakub Kicinski Date: Wed Nov 25 17:55:26 2020 -0800 Merge branch 'dt-bindings-net-dsa-microchip-convert-ksz-bindings-to-yaml' Christian Eggers says: ==================== dt-bindings: net: dsa: microchip: convert KSZ bindings to yaml These patches are orginally from the series "net: dsa: microchip: PTP support for KSZ956x" As the the device tree conversion to yaml is not really related to the PTP patches and the original series is going to take more time than I expected, I would like to split this. Changes (original series -> v1) -------------------------------- - dts: moved "allOf" below "maintainers" - dts: use "unevaluatedProperties" instead of "additionalProperties" - dts: removed "spi-cpha" and "spi-cpol" flags as the hardware is fixed - ksz8795: setup SPI for mode 3 - ksz9477: dito ==================== Link: https://lore.kernel.org/r/20201120112107.16334-1-ceggers@arri.de Signed-off-by: Jakub Kicinski commit 8c4599f49841dd663402ec52325dc2233add1d32 Author: Christian Eggers Date: Fri Nov 20 12:21:07 2020 +0100 net: dsa: microchip: ksz8795: setup SPI mode This should be done in the device driver instead of the device tree. Signed-off-by: Christian Eggers Signed-off-by: Jakub Kicinski commit 9ed602bac97166ad816fbdd50c0788b53d8aa413 Author: Christian Eggers Date: Fri Nov 20 12:21:06 2020 +0100 net: dsa: microchip: ksz9477: setup SPI mode This should be done in the device driver instead of the device tree. Signed-off-by: Christian Eggers Signed-off-by: Jakub Kicinski commit 44e53c88828f2bb4cb53c7c35da10fcd70f3287d Author: Christian Eggers Date: Fri Nov 20 12:21:05 2020 +0100 net: dsa: microchip: support for "ethernet-ports" node The dsa.yaml device tree binding allows "ethernet-ports" (preferred) and "ports". Signed-off-by: Christian Eggers Reviewed-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit 4f36d97786c6ab8fc0f266ef62295b5868b7935e Author: Christian Eggers Date: Fri Nov 20 12:21:04 2020 +0100 dt-bindings: net: dsa: convert ksz bindings document to yaml Convert the bindings document for Microchip KSZ Series Ethernet switches from txt to yaml. Removed spi-cpha and spi-cpol flags is this should be handled by the device driver. Signed-off-by: Christian Eggers Signed-off-by: Jakub Kicinski commit 066c2a9448681b5fb1cfe459c5a1b9d817b017fb Author: Matthias Kaehlcke Date: Tue Nov 24 16:48:13 2020 -0800 arm64: dts: qcom: sc7180-trogdor: Make pp3300_a the default supply for pp3300_hub The trogdor design has two options for supplying the 'pp3300_hub' power rail, it can be supplied by 'pp3300_l7c' or 'pp3300_a'. The 'pp3300_a' path includes a load switch that can be controlled through GPIO84. Initially trogdor boards used 'pp3300_l7c' to power the USB hub, newer revisions (will) use 'pp3300_a' as supply for 'pp3300_hub'. Add a DT node for the 'pp3300_a' path and a pinctrl entry for the GPIO. Make this path the default and keep trogdor rev1, lazor rev0 and rev1 on 'pp3300_l7c'. These earlier revisions also allocated the GPIO to the purpose of controlling the power switch, so there is no need to limit the pinctrl config to newer revisions. Remove the platform-wide 'always/boot-on' properties from 'pp3300_l7c' and add them to the boards that use this supply. Also delete the 'always/boot-on' properties of 'pp3300_hub' for these boards. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20201124164714.v4.1.I0ed4abdd2b2916fbedf76be254bc3457fb8b9655@changeid Signed-off-by: Bjorn Andersson commit b5b11a8ac4b5a997a1b3ae388aea3879e26c857f Author: Atish Patra Date: Wed Nov 4 16:04:39 2020 -0800 RISC-V: Move dynamic relocation section under __init Dynamic relocation section are only required during boot. Those sections can be freed after init. Thus, it can be moved to __init section. Signed-off-by: Atish Patra Tested-by: Greentime Hu Signed-off-by: Palmer Dabbelt commit 19a00869028f4a28a36f90649166631dff6e3ccd Author: Atish Patra Date: Wed Nov 4 16:04:38 2020 -0800 RISC-V: Protect all kernel sections including init early Currently, .init.text & .init.data are intermixed which makes it impossible apply different permissions to them. .init.data shouldn't need exec permissions while .init.text shouldn't have write permission. Moreover, the strict permission are only enforced /init starts. This leaves the kernel vulnerable from possible buggy built-in modules. Keep .init.text & .data in separate sections so that different permissions are applied to each section. Apply permissions to individual sections as early as possible. This improves the kernel protection under CONFIG_STRICT_KERNEL_RWX. We also need to restore the permissions for the entire _init section after it is freed so that those pages can be used for other purpose. Signed-off-by: Atish Patra Tested-by: Greentime Hu Signed-off-by: Palmer Dabbelt commit b6566dc1acca38ce6ed845ce8a270fb181ff6d41 Author: Atish Patra Date: Wed Nov 4 16:04:37 2020 -0800 RISC-V: Align the .init.text section In order to improve kernel text protection, we need separate .init.text/ .init.data/.text in separate sections. However, RISC-V linker relaxation code is not aware of any alignment between sections. As a result, it may relax any RISCV_CALL relocations between sections to JAL without realizing that an inter section alignment may move the address farther. That may lead to a relocation truncated fit error. However, linker relaxation code is aware of the individual section alignments. The detailed discussion on this issue can be found here. https://github.com/riscv/riscv-gnu-toolchain/issues/738 Keep the .init.text section aligned so that linker relaxation will take that as a hint while relaxing inter section calls. Here are the code size changes for each section because of this change. section change in size (in bytes) .head.text +4 .text +40 .init.text +6530 .exit.text +84 The only significant increase in size happened for .init.text because all intra relocations also use 2MB alignment. Suggested-by: Jim Wilson Signed-off-by: Atish Patra Tested-by: Greentime Hu Signed-off-by: Palmer Dabbelt commit 62149f3564c5a59cb42834cbe97e6f36ad81a029 Author: Atish Patra Date: Wed Nov 4 16:04:36 2020 -0800 RISC-V: Initialize SBI early Currently, SBI is initialized towards the end of arch setup. This prevents the set memory operations to be invoked earlier as it requires a full tlb flush. Initialize SBI as early as possible. Signed-off-by: Atish Patra Tested-by: Greentime Hu Signed-off-by: Palmer Dabbelt commit 5cb0080f1bfdccb56d5c225d1cd648cdb33fa9bb Author: Kefeng Wang Date: Fri Nov 13 14:42:23 2020 +0800 riscv: Enable ARCH_STACKWALK Convert to ARCH_STACKWALK to reduce duplicated code in stack trace. Signed-off-by: Kefeng Wang Signed-off-by: Palmer Dabbelt commit 5c212aaf5457ca5bd99aba3ad29a4a17f8129939 Author: Bjorn Andersson Date: Sat Nov 21 21:41:33 2020 -0800 remoteproc: sysmon: Expose the shutdown result A graceful shutdown of the Qualcomm remote processors where traditionally performed by invoking a shared memory state signal and waiting for the associated ack. This was later superseded by the "sysmon" mechanism, where some form of shared memory bus is used to send a "graceful shutdown request" message and one of more signals comes back to indicate its success. But when this newer mechanism is in effect the firmware is shut down by the time the older mechanism, implemented in the remoteproc drivers, attempts to perform a graceful shutdown - and as such it will never receive an ack back. This patch therefor track the success of the latest shutdown attempt in sysmon and exposes a new function in the API that the remoteproc driver can use to query the success and the necessity of invoking the older mechanism. Tested-by: Steev Klimaszewski Reviewed-by: Rishabh Bhatnagar Link: https://lore.kernel.org/r/20201122054135.802935-3-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit 138a6428ba9023ae29e103e87a223575fbc3d2b7 Author: Bjorn Andersson Date: Sat Nov 21 21:41:32 2020 -0800 remoteproc: sysmon: Ensure remote notification ordering The reliance on the remoteproc's state for determining when to send sysmon notifications to a remote processor is racy with regard to concurrent remoteproc operations. Further more the advertisement of the state of other remote processor to a newly started remote processor might not only send the wrong state, but might result in a stream of state changes that are out of order. Address this by introducing state tracking within the sysmon instances themselves and extend the locking to ensure that the notifications are consistent with this state. Fixes: 1f36ab3f6e3b ("remoteproc: sysmon: Inform current rproc about all active rprocs") Fixes: 1877f54f75ad ("remoteproc: sysmon: Add notifications for events") Fixes: 1fb82ee806d1 ("remoteproc: qcom: Introduce sysmon") Cc: stable@vger.kernel.org Reviewed-by: Rishabh Bhatnagar Link: https://lore.kernel.org/r/20201122054135.802935-2-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit fb3558127cb62ba2dea9e3d0efa1bb1d7e5eee2a Author: Andrei Matei Date: Tue Nov 24 22:52:55 2020 -0500 bpf: Fix selftest compilation on clang 11 Before this patch, profiler.inc.h wouldn't compile with clang-11 (before the __builtin_preserve_enum_value LLVM builtin was introduced in https://reviews.llvm.org/D83242). Another test that uses this builtin (test_core_enumval) is conditionally skipped if the compiler is too old. In that spirit, this patch inhibits part of populate_cgroup_info(), which needs this CO-RE builtin. The selftests build again on clang-11. The affected test (the profiler test) doesn't pass on clang-11 because it's missing https://reviews.llvm.org/D85570, but at least the test suite as a whole compiles. The test's expected failure is already called out in the README. Signed-off-by: Andrei Matei Signed-off-by: Daniel Borkmann Tested-by: Florian Lehner Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20201125035255.17970-1-andreimatei1@gmail.com commit 34b82d3ac1058653b3de7be4697b55f67533b1f1 Author: KP Singh Date: Tue Nov 24 15:12:10 2020 +0000 bpf: Add a selftest for bpf_ima_inode_hash The test does the following: - Mounts a loopback filesystem and appends the IMA policy to measure executions only on this file-system. Restricting the IMA policy to a particular filesystem prevents a system-wide IMA policy change. - Executes an executable copied to this loopback filesystem. - Calls the bpf_ima_inode_hash in the bprm_committed_creds hook and checks if the call succeeded and checks if a hash was calculated. The test shells out to the added ima_setup.sh script as the setup is better handled in a shell script and is more complicated to do in the test program or even shelling out individual commands from C. The list of required configs (i.e. IMA, SECURITYFS, IMA_{WRITE,READ}_POLICY) for running this test are also updated. Suggested-by: Mimi Zohar (limit policy rule to loopback mount) Signed-off-by: KP Singh Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20201124151210.1081188-4-kpsingh@chromium.org commit 0e1f1cc89a77e8ca63e4c2490e1facdca52f9b04 Merge: b5094a3b535b5 6454eca81eae5 Author: Jakub Kicinski Date: Wed Nov 25 15:08:39 2020 -0800 Merge branch 'add-an-assert-in-napi_consume_skb' Yunsheng Lin says: ==================== Add an assert in napi_consume_skb() This patch introduces a lockdep_assert_in_softirq() interface and uses it to assert the case when napi_consume_skb() is not called in the softirq context. ==================== Link: https://lore.kernel.org/r/1606214969-97849-1-git-send-email-linyunsheng@huawei.com Signed-off-by: Jakub Kicinski commit 6454eca81eae5fd046906ea9af3afc019a9639b0 Author: Yunsheng Lin Date: Tue Nov 24 18:49:29 2020 +0800 net: Use lockdep_assert_in_softirq() in napi_consume_skb() Use napi_consume_skb() to assert the case when it is not called in a atomic softirq context. Signed-off-by: Yunsheng Lin Signed-off-by: Jakub Kicinski commit 8b5536ad1216c47fb9b37ef2cd0cfa70d79d4645 Author: Yunsheng Lin Date: Tue Nov 24 18:49:28 2020 +0800 lockdep: Introduce in_softirq lockdep assert The current semantic for napi_consume_skb() is that caller need to provide non-zero budget when calling from NAPI context, and breaking this semantic will cause hard to debug problem, because _kfree_skb_defer() need to run in atomic context in order to push the skb to the particular cpu' napi_alloc_cache atomically. So add the lockdep_assert_in_softirq() to assert when the running context is not in_softirq, in_softirq means softirq is serving or BH is disabled, which has a ambiguous semantics due to the BH disabled confusion, so add a comment to emphasize that. And the softirq context can be interrupted by hard IRQ or NMI context, lockdep_assert_in_softirq() need to assert about hard IRQ or NMI context too. Suggested-by: Jakub Kicinski Signed-off-by: Yunsheng Lin Signed-off-by: Jakub Kicinski commit 27672f0d280a3f286a410a8db2004f46ace72a17 Author: KP Singh Date: Tue Nov 24 15:12:09 2020 +0000 bpf: Add a BPF helper for getting the IMA hash of an inode Provide a wrapper function to get the IMA hash of an inode. This helper is useful in fingerprinting files (e.g executables on execution) and using these fingerprints in detections like an executable unlinking itself. Since the ima_inode_hash can sleep, it's only allowed for sleepable LSM hooks. Signed-off-by: KP Singh Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20201124151210.1081188-3-kpsingh@chromium.org commit 403319be5de51167cd70ddf594b76c95e6d26844 Author: KP Singh Date: Tue Nov 24 15:12:08 2020 +0000 ima: Implement ima_inode_hash This is in preparation to add a helper for BPF LSM programs to use IMA hashes when attached to LSM hooks. There are LSM hooks like inode_unlink which do not have a struct file * argument and cannot use the existing ima_file_hash API. An inode based API is, therefore, useful in LSM based detections like an executable trying to delete itself which rely on the inode_unlink LSM hook. Moreover, the ima_file_hash function does nothing with the struct file pointer apart from calling file_inode on it and converting it to an inode. Signed-off-by: KP Singh Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Acked-by: Mimi Zohar Link: https://lore.kernel.org/bpf/20201124151210.1081188-2-kpsingh@chromium.org commit 5a7b5f32c5aa628841502d19a813c633ff6ecbe4 Author: Hui Su Date: Fri Nov 6 22:47:40 2020 +0800 cgroup/cgroup.c: replace 'of->kn->priv' with of_cft() we have supplied the inline function: of_cft() in cgroup.h. So replace the direct use 'of->kn->priv' with inline func of_cft(), which is more readable. Signed-off-by: Hui Su Signed-off-by: Tejun Heo commit 58315c96651152b9f438e5e56c910994234e2c7a Author: Bhaskar Chowdhury Date: Mon Nov 9 16:01:11 2020 +0530 kernel: cgroup: Mundane spelling fixes throughout the file Few spelling fixes throughout the file. Signed-off-by: Bhaskar Chowdhury Signed-off-by: Tejun Heo commit 01341fbd0d8d4e717fc1231cdffe00343088ce0b Author: Yunfeng Ye Date: Thu Nov 19 14:21:25 2020 +0800 workqueue: Kick a worker based on the actual activation of delayed works In realtime scenario, We do not want to have interference on the isolated cpu cores. but when invoking alloc_workqueue() for percpu wq on the housekeeping cpu, it kick a kworker on the isolated cpu. alloc_workqueue pwq_adjust_max_active wake_up_worker The comment in pwq_adjust_max_active() said: "Need to kick a worker after thawed or an unbound wq's max_active is bumped" So it is unnecessary to kick a kworker for percpu's wq when invoking alloc_workqueue(). this patch only kick a worker based on the actual activation of delayed works. Signed-off-by: Yunfeng Ye Reviewed-by: Lai Jiangshan Signed-off-by: Tejun Heo commit b5094a3b535b5a258ab49ed9614948df63bc3557 Author: Rikard Falkeborn Date: Mon Nov 23 00:40:30 2020 +0100 soc: qcom: ipa: Constify static qmi structs These are only used as input arguments to qmi_handle_init() which accepts const pointers to both qmi_ops and qmi_msg_handler. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Acked-by: Alex Elder Link: https://lore.kernel.org/r/20201122234031.33432-2-rikard.falkeborn@gmail.com Signed-off-by: Jakub Kicinski commit fd8976790a6c1fee98bd7bc73754ddc9f01273ab Author: Paolo Abeni Date: Tue Nov 24 22:51:24 2020 +0100 mptcp: be careful on MPTCP-level ack. We can enter the main mptcp_recvmsg() loop even when no subflows are connected. As note by Eric, that would result in a divide by zero oops on ack generation. Address the issue by checking the subflow status before sending the ack. Additionally protect mptcp_recvmsg() against invocation with weird socket states. v1 -> v2: - removed unneeded inline keyword - Jakub Reported-and-suggested-by: Eric Dumazet Fixes: ea4ca586b16f ("mptcp: refine MPTCP-level ack scheduling") Signed-off-by: Paolo Abeni Link: https://lore.kernel.org/r/5370c0ae03449239e3d1674ddcfb090cf6f20abe.1606253206.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski commit bfd042321a7afa769c855c37f2bbe2703dc72ef2 Author: Horatiu Vultur Date: Tue Nov 24 09:25:25 2020 +0100 bridge: mrp: Implement LC mode for MRP Extend MRP to support LC mode(link check) for the interconnect port. This applies only to the interconnect ring. Opposite to RC mode(ring check) the LC mode is using CFM frames to detect when the link goes up or down and based on that the userspace will need to react. One advantage of the LC mode over RC mode is that there will be fewer frames in the normal rings. Because RC mode generates InTest on all ports while LC mode sends CFM frame only on the interconnect port. All 4 nodes part of the interconnect ring needs to have the same mode. And it is not possible to have running LC and RC mode at the same time on a node. Whenever the MIM starts it needs to detect the status of the other 3 nodes in the interconnect ring so it would send a frame called InLinkStatus, on which the clients needs to reply with their link status. This patch adds InLinkStatus frame type and extends existing rules on how to forward this frame. Acked-by: Nikolay Aleksandrov Signed-off-by: Horatiu Vultur Link: https://lore.kernel.org/r/20201124082525.273820-1-horatiu.vultur@microchip.com Signed-off-by: Jakub Kicinski commit ab43108d0dd48d287e1b5bb9cd4a969457ed9b0e Author: Colin Ian King Date: Tue Nov 24 12:15:28 2020 +0000 drm/mcde: fix masking and bitwise-or on variable val The masking of val with ~MCDE_CRX1_CLKSEL_MASK is currently being ignored because there seems to be a missing bitwise-or of val in the following statement. Fix this by replacing the assignment of val with a bitwise-or. Fixes: d795fd322063 ("drm/mcde: Support DPI output") Signed-off-by: Colin Ian King Addresses-Coverity: ("Unused valued") Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20201124121528.395681-1-colin.king@canonical.com commit f460019b4c9e0389b932e1ca2c01b598c7ae769e Author: Vlad Buslov Date: Tue Nov 24 18:40:54 2020 +0200 net: sched: alias action flags with TCA_ACT_ prefix Currently both filter and action flags use same "TCA_" prefix which makes them hard to distinguish to code and confusing for users. Create aliases for existing action flags constants with "TCA_ACT_" prefix. Signed-off-by: Vlad Buslov Link: https://lore.kernel.org/r/20201124164054.893168-1-vlad@buslov.dev Signed-off-by: Jakub Kicinski commit b6d69fc8e8cfd1694e709c16e6192339bde68923 Author: Florian Westphal Date: Tue Nov 24 17:24:46 2020 +0100 mptcp: put reference in mptcp timeout timer On close this timer might be scheduled. mptcp uses sk_reset_timer for this, so the a reference on the mptcp socket is taken. This causes a refcount leak which can for example be reproduced with 'mp_join_server_v4.pkt' from the mptcp-packetdrill repo. The leak has nothing to do with join requests, v1_mp_capable_bind_no_cs.pkt works too when replacing the last ack mpcapable to v1 instead of v0. unreferenced object 0xffff888109bba040 (size 2744): comm "packetdrill", [..] backtrace: [..] sk_prot_alloc.isra.0+0x2b/0xc0 [..] sk_clone_lock+0x2f/0x740 [..] mptcp_sk_clone+0x33/0x1a0 [..] subflow_syn_recv_sock+0x2b1/0x690 [..] Fixes: e16163b6e2b7 ("mptcp: refactor shutdown and close") Cc: Davide Caratti Signed-off-by: Florian Westphal Acked-by: Paolo Abeni Link: https://lore.kernel.org/r/20201124162446.11448-1-fw@strlen.de Signed-off-by: Jakub Kicinski commit 4826d2c4fcbfcc3ba7887a197143ffe4d444a3d3 Author: Antonio Borneo Date: Wed Nov 25 00:07:56 2020 +0100 net: phy: realtek: read actual speed on rtl8211f to detect downshift The rtl8211f supports downshift and before commit 5502b218e001 ("net: phy: use phy_resolve_aneg_linkmode in genphy_read_status") the read-back of register MII_CTRL1000 was used to detect the negotiated link speed. The code added in commit d445dff2df60 ("net: phy: realtek: read actual speed to detect downshift") is working fine also for this phy and it's trivial re-using it to restore the downshift detection on rtl8211f. Add the phy specific read_status() pointing to the existing function rtlgen_read_status(). Signed-off-by: Antonio Borneo Link: https://lore.kernel.org/r/478f871a-583d-01f1-9cc5-2eea56d8c2a7@huawei.com Tested-by: Yonglong Liu Link: https://lore.kernel.org/r/20201124230756.887925-1-antonio.borneo@st.com Signed-off-by: Jakub Kicinski commit 16d07c38c4468d0006ecf927453c6c4a4de32073 Merge: 062547380d1fa 298722166ab2f Author: Jakub Kicinski Date: Wed Nov 25 12:23:26 2020 -0800 Merge branch 'net-ptp-use-common-defines-for-ptp-message-types-in-further-drivers' Christian Eggers says: ==================== net: ptp: use common defines for PTP message types in further drivers This series replaces further driver internal enumeration / uses of magic numbers with the newly introduced PTP_MSGTYPE_* defines. ==================== Link: https://lore.kernel.org/r/20201124074418.2609-1-ceggers@arri.de Signed-off-by: Jakub Kicinski commit 298722166ab2fdced64b2ccb2923720153ff2029 Author: Christian Eggers Date: Tue Nov 24 08:44:18 2020 +0100 net: phy: mscc: use new PTP_MSGTYPE_* defines Use recently introduced PTP_MSGTYPE_SYNC and PTP_MSGTYPE_DELAY_REQ defines instead of a driver internal enumeration. Signed-off-by: Christian Eggers Reviewed-by: Antoine Tenart Acked-by: Richard Cochran Signed-off-by: Jakub Kicinski commit 37e9d0559a60eb5711e5d8e8f41959a242450d8b Author: Christian Eggers Date: Tue Nov 24 08:44:17 2020 +0100 mlxsw: spectrum_ptp: use PTP wide message type definitions Use recently introduced PTP wide defines instead of a driver internal enumeration. Signed-off-by: Christian Eggers Reviewed-by: Ido Schimmel Cc: Petr Machata Cc: Jiri Pirko Acked-by: Richard Cochran Signed-off-by: Jakub Kicinski commit 651c814f3c96509052a84d5ee86ec1aff2a40879 Author: Christian Eggers Date: Tue Nov 24 08:44:16 2020 +0100 net: phy: dp83640: use new PTP_MSGTYPE_SYNC define Replace use of magic number with recently introduced define. Signed-off-by: Christian Eggers Reviewed-by: Kurt Kanzenbach Acked-by: Richard Cochran Signed-off-by: Jakub Kicinski commit 062547380d1fa95a5d37573bf22fd219f021dfd0 Merge: 470dfd808ac41 6527b938426f7 Author: Jakub Kicinski Date: Wed Nov 25 11:18:41 2020 -0800 Merge branch 'net-phy-add-support-for-shared-interrupts-part-3' Ioana Ciornei says: ==================== net: phy: add support for shared interrupts (part 3) This patch set aims to actually add support for shared interrupts in phylib and not only for multi-PHY devices. While we are at it, streamline the interrupt handling in phylib. For a bit of context, at the moment, there are multiple phy_driver ops that deal with this subject: - .config_intr() - Enable/disable the interrupt line. - .ack_interrupt() - Should quiesce any interrupts that may have been fired. It's also used by phylib in conjunction with .config_intr() to clear any pending interrupts after the line was disabled, and before it is going to be enabled. - .did_interrupt() - Intended for multi-PHY devices with a shared IRQ line and used by phylib to discern which PHY from the package was the one that actually fired the interrupt. - .handle_interrupt() - Completely overrides the default interrupt handling logic from phylib. The PHY driver is responsible for checking if any interrupt was fired by the respective PHY and choose accordingly if it's the one that should trigger the link state machine. From my point of view, the interrupt handling in phylib has become somewhat confusing with all these callbacks that actually read the same PHY register - the interrupt status. A more streamlined approach would be to just move the responsibility to write an interrupt handler to the driver (as any other device driver does) and make .handle_interrupt() the only way to deal with interrupts. Another advantage with this approach would be that phylib would gain support for shared IRQs between different PHY (not just multi-PHY devices), something which at the moment would require extending every PHY driver anyway in order to implement their .did_interrupt() callback and duplicate the same logic as in .ack_interrupt(). The disadvantage of making .did_interrupt() mandatory would be that we are slightly changing the semantics of the phylib API and that would increase confusion instead of reducing it. What I am proposing is the following: - As a first step, make the .ack_interrupt() callback optional so that we do not break any PHY driver amid the transition. - Every PHY driver gains a .handle_interrupt() implementation that, for the most part, would look like below: irq_status = phy_read(phydev, INTR_STATUS); if (irq_status < 0) { phy_error(phydev); return IRQ_NONE; } if (!(irq_status & irq_mask)) return IRQ_NONE; phy_trigger_machine(phydev); return IRQ_HANDLED; - Remove each PHY driver's implementation of the .ack_interrupt() by actually taking care of quiescing any pending interrupts before enabling/after disabling the interrupt line. - Finally, after all drivers have been ported, remove the .ack_interrupt() and .did_interrupt() callbacks from phy_driver. This patch set is part 3 (and final) of the entire change set and it addresses the remaining PHY drivers that have not been migrated previosly. Also, it finally removed the .did_interrupt() and .ack_interrupt() callbacks since they are of no use anymore. I do not have access to most of these PHY's, therefore I Cc-ed the latest contributors to the individual PHY drivers in order to have access, hopefully, to more regression testing. ==================== Link: https://lore.kernel.org/r/20201123153817.1616814-1-ciorneiioana@gmail.com Signed-off-by: Jakub Kicinski commit 6527b938426f7fa66051273568d234b1fe01a15b Author: Ioana Ciornei Date: Mon Nov 23 17:38:17 2020 +0200 net: phy: remove the .did_interrupt() and .ack_interrupt() callback Now that all the PHY drivers have been migrated to directly implement the generic .handle_interrupt() callback for a seamless support of shared IRQs and all the .config_inter() implementations clear any pending interrupts, we can safely remove the two callbacks. With this patch, phylib has a proper support for shared IRQs (and not just for multi-PHY devices. A PHY driver must implement both the .handle_interrupt() and .config_intr() callbacks for the IRQs to be actually used. Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit a1a4417458cd0b5a9b4ce574524d166f4dcd642f Author: Ioana Ciornei Date: Mon Nov 23 17:38:16 2020 +0200 net: phy: qsemi: remove the use of .ack_interrupt() In preparation of removing the .ack_interrupt() callback, we must replace its occurrences (aka phy_clear_interrupt), from the 2 places where it is called from (phy_enable_interrupts and phy_disable_interrupts), with equivalent functionality. This means that clearing interrupts now becomes something that the PHY driver is responsible of doing, before enabling interrupts and after clearing them. Make this driver follow the new contract. Also, add a comment describing the multiple step interrupt acknoledgement process. Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit efc3d9de7fa64433ceb962815aa16973c1b8d886 Author: Ioana Ciornei Date: Mon Nov 23 17:38:15 2020 +0200 net: phy: qsemi: implement generic .handle_interrupt() callback In an attempt to actually support shared IRQs in phylib, we now move the responsibility of triggering the phylib state machine or just returning IRQ_NONE, based on the IRQ status register, to the PHY driver. Having 3 different IRQ handling callbacks (.handle_interrupt(), .did_interrupt() and .ack_interrupt() ) is confusing so let the PHY driver implement directly an IRQ handler like any other device driver. Make this driver follow the new convention. Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit aa2d603ac8c0a3070e78edd4c07606ae2587754f Author: Ioana Ciornei Date: Mon Nov 23 17:38:14 2020 +0200 net: phy: ti: remove the use of .ack_interrupt() In preparation of removing the .ack_interrupt() callback, we must replace its occurrences (aka phy_clear_interrupt), from the 2 places where it is called from (phy_enable_interrupts and phy_disable_interrupts), with equivalent functionality. This means that clearing interrupts now becomes something that the PHY driver is responsible of doing, before enabling interrupts and after clearing them. Make this driver follow the new contract. Cc: Dan Murphy Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit 1d1ae3c6ca3ff49843d73852bb2a8153ce16f432 Author: Ioana Ciornei Date: Mon Nov 23 17:38:13 2020 +0200 net: phy: ti: implement generic .handle_interrupt() callback In an attempt to actually support shared IRQs in phylib, we now move the responsibility of triggering the phylib state machine or just returning IRQ_NONE, based on the IRQ status register, to the PHY driver. Having 3 different IRQ handling callbacks (.handle_interrupt(), .did_interrupt() and .ack_interrupt() ) is confusing so let the PHY driver implement directly an IRQ handler like any other device driver. Make this driver follow the new convention. Cc: Dan Murphy Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit a4d7742149f6a4880fa8bdf941a40c345162074c Author: Ioana Ciornei Date: Mon Nov 23 17:38:12 2020 +0200 net: phy: national: remove the use of the .ack_interrupt() In preparation of removing the .ack_interrupt() callback, we must replace its occurrences (aka phy_clear_interrupt), from the 2 places where it is called from (phy_enable_interrupts and phy_disable_interrupts), with equivalent functionality. This means that clearing interrupts now becomes something that the PHY driver is responsible of doing, before enabling interrupts and after clearing them. Make this driver follow the new contract. Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit 6571b4555dc94908f13d811898cddc5c0fa8bd71 Author: Ioana Ciornei Date: Mon Nov 23 17:38:11 2020 +0200 net: phy: national: implement generic .handle_interrupt() callback In an attempt to actually support shared IRQs in phylib, we now move the responsibility of triggering the phylib state machine or just returning IRQ_NONE, based on the IRQ status register, to the PHY driver. Having 3 different IRQ handling callbacks (.handle_interrupt(), .did_interrupt() and .ack_interrupt() ) is confusing so let the PHY driver implement directly an IRQ handler like any other device driver. Make this driver follow the new convention. Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit c0c99d0cd107b86fc03ec6c49a03bd01d83b1ce7 Author: Ioana Ciornei Date: Mon Nov 23 17:38:10 2020 +0200 net: phy: micrel: remove the use of .ack_interrupt() In preparation of removing the .ack_interrupt() callback, we must replace its occurrences (aka phy_clear_interrupt), from the 2 places where it is called from (phy_enable_interrupts and phy_disable_interrupts), with equivalent functionality. This means that clearing interrupts now becomes something that the PHY driver is responsible of doing, before enabling interrupts and after clearing them. Make this driver follow the new contract. Cc: Divya Koppera Cc: Oleksij Rempel Cc: Philippe Schenker Cc: Marek Vasut Cc: Antoine Tenart Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit 59ca4e58b9176989b11b1311c903b3a05e6b87a1 Author: Ioana Ciornei Date: Mon Nov 23 17:38:09 2020 +0200 net: phy: micrel: implement generic .handle_interrupt() callback In an attempt to actually support shared IRQs in phylib, we now move the responsibility of triggering the phylib state machine or just returning IRQ_NONE, based on the IRQ status register, to the PHY driver. Having 3 different IRQ handling callbacks (.handle_interrupt(), .did_interrupt() and .ack_interrupt() ) is confusing so let the PHY driver implement directly an IRQ handler like any other device driver. Make this driver follow the new convention. Cc: Divya Koppera Cc: Oleksij Rempel Cc: Philippe Schenker Cc: Marek Vasut Cc: Antoine Tenart Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit 84c8f773d2dc17193aba2e707338f6e107fb71e5 Author: Ioana Ciornei Date: Mon Nov 23 17:38:08 2020 +0200 net: phy: meson-gxl: remove the use of .ack_callback() In preparation of removing the .ack_interrupt() callback, we must replace its occurrences (aka phy_clear_interrupt), from the 2 places where it is called from (phy_enable_interrupts and phy_disable_interrupts), with equivalent functionality. This means that clearing interrupts now becomes something that the PHY driver is responsible of doing, before enabling interrupts and after clearing them. Make this driver follow the new contract. Cc: Jerome Brunet Cc: Neil Armstrong Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit 6719e2be0fcfa404a885e9bf80c7e1139adf0e39 Author: Ioana Ciornei Date: Mon Nov 23 17:38:07 2020 +0200 net: phy: meson-gxl: implement generic .handle_interrupt() callback In an attempt to actually support shared IRQs in phylib, we now move the responsibility of triggering the phylib state machine or just returning IRQ_NONE, based on the IRQ status register, to the PHY driver. Having 3 different IRQ handling callbacks (.handle_interrupt(), .did_interrupt() and .ack_interrupt() ) is confusing so let the PHY driver implement directly an IRQ handler like any other device driver. Make this driver follow the new convention. Cc: Jerome Brunet Cc: Neil Armstrong Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit 12ae7ba3c15aa6aa1eef6deb275bbd9a812a575d Author: Ioana Ciornei Date: Mon Nov 23 17:38:06 2020 +0200 net: phy: icplus: remove the use .ack_interrupt() In preparation of removing the .ack_interrupt() callback, we must replace its occurrences (aka phy_clear_interrupt), from the 2 places where it is called from (phy_enable_interrupts and phy_disable_interrupts), with equivalent functionality. This means that clearing interrupts now becomes something that the PHY driver is responsible of doing, before enabling interrupts and after clearing them. Make this driver follow the new contract. Cc: Martin Blumenstingl Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit 25497b7f0bd90706dd697523f3e9e074641632b5 Author: Ioana Ciornei Date: Mon Nov 23 17:38:05 2020 +0200 net: phy: icplus: implement generic .handle_interrupt() callback In an attempt to actually support shared IRQs in phylib, we now move the responsibility of triggering the phylib state machine or just returning IRQ_NONE, based on the IRQ status register, to the PHY driver. Having 3 different IRQ handling callbacks (.handle_interrupt(), .did_interrupt() and .ack_interrupt() ) is confusing so let the PHY driver implement directly an IRQ handler like any other device driver. Make this driver follow the new convention. Cc: Martin Blumenstingl Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit 16c9709a75043d58ded3fb01807a6c0cd456ea49 Author: Ioana Ciornei Date: Mon Nov 23 17:38:04 2020 +0200 net: phy: intel-xway: remove the use of .ack_interrupt() In preparation of removing the .ack_interrupt() callback, we must replace its occurrences (aka phy_clear_interrupt), from the 2 places where it is called from (phy_enable_interrupts and phy_disable_interrupts), with equivalent functionality. This means that clearing interrupts now becomes something that the PHY driver is responsible of doing, before enabling interrupts and after clearing them. Make this driver follow the new contract. Cc: Mathias Kresin Cc: Hauke Mehrtens Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit 1566db0439525fc0ef29c496d73f7e984d280319 Author: Ioana Ciornei Date: Mon Nov 23 17:38:03 2020 +0200 net: phy: intel-xway: implement generic .handle_interrupt() callback In an attempt to actually support shared IRQs in phylib, we now move the responsibility of triggering the phylib state machine or just returning IRQ_NONE, based on the IRQ status register, to the PHY driver. Having 3 different IRQ handling callbacks (.handle_interrupt(), .did_interrupt() and .ack_interrupt() ) is confusing so let the PHY driver implement directly an IRQ handler like any other device driver. Make this driver follow the new convention. Cc: Mathias Kresin Cc: Hauke Mehrtens Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit 225ef3a3e8f48154ca7a4cfe44d3b576aff2f860 Author: Marek Szyprowski Date: Tue Nov 24 09:33:12 2020 +0100 ARM: multi_v7_defconfig: make Samsung Exynos EHCI driver a module Exynos EHCI driver is compiled as kernel built-in, but it requires Samsung USB2 Generic PHY driver to operate properly, which is compiled as module. Make the Exynos EHCI driver also a module, because having it built-in makes no sense. Exynos OHCI, which also uses that PHY driver, is already compiled as a module. Signed-off-by: Marek Szyprowski Link: https://lore.kernel.org/r/20201124083312.12356-1-m.szyprowski@samsung.com Signed-off-by: Krzysztof Kozlowski commit 63653368c25ff0b1b1aaf045c97ea87bd8c16123 Author: Jeffle Xu Date: Wed Nov 25 14:58:17 2020 +0800 block: remove unused BIO_SPLIT_ENTRIES Since commit 4b1faf931650 ("block: Kill bio_pair_split()"), there's no user of BIO_SPLIT_ENTRIES anymore. Signed-off-by: Jeffle Xu Signed-off-by: Jens Axboe commit b87e745945e3de3e4d5c5eeb53e0e455e5cd5416 Author: Andy Shevchenko Date: Wed Nov 25 18:16:26 2020 +0200 resource: provide meaningful MODULE_LICENSE() in test suite modpost complains that module has no licence provided. Provide it via meaningful MODULE_LICENSE(). Reported-by: Stephen Rothwell Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit dccb22d078ebd098115e4f66bde1ee2249c8640b Author: Rafał Miłecki Date: Thu Nov 12 16:08:30 2020 +0100 arm64: add config for Broadcom BCM4908 SoCs Add ARCH_BCM4908 config that can be used for compiling DTS files. Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli commit 2961f69f151c0a6771f55cef46398fe49ca20902 Author: Rafał Miłecki Date: Thu Nov 12 16:08:32 2020 +0100 arm64: dts: broadcom: add BCM4908 and Asus GT-AC5300 early DTS files They don't descibe hardware fully yet but it's enough to boot a system. Some missing blocks: 1. PMC (Power Management Controller?) 2. Ethernet 3. Crypto 4. Thermal Asus DTS is missing defining full NAND partitions layout and buttons. Further changes will fill those gaps as soon as required bindings will be found / tested / added. Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli commit 2f8913a7b17efd3a116825160a2d3a6610444587 Author: Rafał Miłecki Date: Thu Nov 12 16:08:31 2020 +0100 dt-bindings: arm: bcm: document BCM4908 bindings BCM4908 is a new family that includes BCM4906, BCM4908 and BCM49408. It's mostly used in home routers and often replaces Northstar in vendors portfolio. Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli commit 49b3cf035edc5d7deb3ad1bf6805ce456ababc5b Author: Peter Collingbourne Date: Sat Nov 21 01:59:02 2020 -0800 kasan: arm64: set TCR_EL1.TBID1 when enabled On hardware supporting pointer authentication, we previously ended up enabling TBI on instruction accesses when tag-based ASAN was enabled, but this was costing us 8 bits of PAC entropy, which was unnecessary since tag-based ASAN does not require TBI on instruction accesses. Get them back by setting TCR_EL1.TBID1. Signed-off-by: Peter Collingbourne Reviewed-by: Andrey Konovalov Link: https://linux-review.googlesource.com/id/I3dded7824be2e70ea64df0aabab9598d5aebfcc4 Link: https://lore.kernel.org/r/20f64e26fc8a1309caa446fffcb1b4e2fe9e229f.1605952129.git.pcc@google.com Signed-off-by: Catalin Marinas commit 82514ecd61435c2d47c235e1343872b38db17be4 Author: Jiri Kosina Date: Wed Nov 25 17:40:23 2020 +0100 HID: elecom: drop stray comment Drop spurious leftover comment. Signed-off-by: Jiri Kosina commit 1ac09656bded6e4ea9312631579dd32189e00e62 Author: Mark Pearson Date: Tue Nov 24 13:11:54 2020 -0500 platform/x86: thinkpad_acpi: Add palm sensor support Add support to thinkpad_acpi for returning the status of the palm sensor. This patch builds on the work done previously for the input device implementation (which was not needed). Both lap and palm sensor are using sysfs and they are combined into the proxsensor block. Note: On some platforms, because of an issue in the HW implementation, the palm sensor presence may be incorrectly advertised as always enabled even if a palm sensor is not present. The palm sensor is intended for WWAN transmission power control and should be available and correct on all WWAN enabled systems. It is not recommended to use this interface for other use cases. Signed-off-by: Mark Pearson Link: https://lore.kernel.org/r/20201124181154.547518-1-markpearson@lenovo.com Signed-off-by: Hans de Goede commit eea70586485ca0621c4a896c4a29e2db0a2761d2 Author: Thomas Zimmermann Date: Wed Sep 23 12:21:45 2020 +0200 drm/mediatek: Introduce GEM object functions GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces the per-driver callbacks with per-instance callbacks in mediatek. The only exception is gem_prime_mmap, which is non-trivial to convert. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Signed-off-by: Chun-Kuang Hu commit 85810c1996db86451aa1d08c7de5c51cf8cf3aa3 Author: Andy Shevchenko Date: Tue Nov 24 11:56:28 2020 +0200 ASoC: Intel: catpt: Replace open coded variant of resource_intersection() Since we have resource_intersection() helper, let's utilize it here. Signed-off-by: Andy Shevchenko Acked-by: Cezary Rojewski Signed-off-by: Rafael J. Wysocki commit 55130fb22a1c396139c3da46f939bf5a6a92095e Author: Punit Agrawal Date: Tue Nov 24 08:59:51 2020 +0900 ACPI: processor: Drop duplicate setting of shared_cpu_map 'shared_cpu_map', stored as part of the per-processor acpi_processor_performance structre, is used to store CPUs that share a performance domain. By definition it contains the owning CPU. While building the 'shared_cpu_map' it is being set twice - once while initialising the performance domains and again when matching CPUs belonging to the same domain. Drop the unnecessary initialisation. Signed-off-by: Punit Agrawal Signed-off-by: Rafael J. Wysocki commit 367c820ef08082e68df8a3bc12e62393af21e4b5 Author: Sumit Garg Date: Wed Oct 7 14:21:43 2020 +0530 arm64: Enable perf events based hard lockup detector With the recent feature added to enable perf events to use pseudo NMIs as interrupts on platforms which support GICv3 or later, its now been possible to enable hard lockup detector (or NMI watchdog) on arm64 platforms. So enable corresponding support. One thing to note here is that normally lockup detector is initialized just after the early initcalls but PMU on arm64 comes up much later as device_initcall(). So we need to re-initialize lockup detection once PMU has been initialized. Signed-off-by: Sumit Garg Acked-by: Alexandru Elisei Link: https://lore.kernel.org/r/1602060704-10921-1-git-send-email-sumit.garg@linaro.org Signed-off-by: Will Deacon commit 6b46338f2210e37deeb3cdd40b04e3c597b47570 Author: Joakim Zhang Date: Tue Oct 27 18:44:51 2020 +0800 perf/imx_ddr: Add stop event counters support for i.MX8MP DDR Perf driver only supports free-running event counters(counter1/2/3) now, this patch adds support for stop event counters. Legacy SoCs: Cycle counter(counter0) is a special counter, only count cycles. When cycle counter overflow, it will lock all counters and generate an interrupt. In ddr_perf_irq_handler, disable cycle counter then all counters would stop at the same time, update all counters' count, then enable cycle counter that all counters count again. During this process, only clear cycle counter, no need to clear event counters since they are free-running counters. They would continue counting after overflow and do/while loop from ddr_perf_event_update can handle event counters overflow case. i.MX8MP: Almost all is the same as legacy SoCs, the only difference is that, event counters are not free-running any more. Like cycle counter, when event counters overflow, they would stop counting unless clear the counter, and no interrupt generate for event counters. So we should clear event counters that let them re-count when cycle counter overflow, which ensure event counters will not lose data. This patch adds stop event counters support which would be compatible to free-running event counters. We use the cycle counter to stop overflow of the event counters. Signed-off-by: Joakim Zhang Link: https://lore.kernel.org/r/20201027104451.15434-1-qiangqing.zhang@nxp.com Signed-off-by: Will Deacon commit 2c255223362e9747075320ba618bd5960b76e04f Author: John Garry Date: Thu Oct 8 17:26:21 2020 +0800 perf/smmuv3: Support sysfs identifier file SMMU_PMCG_IIDR was added in the SMMUv3.3 spec. For the perf tool to know the specific HW implementation, expose the PMCG_IIDR contents only when set. Signed-off-by: John Garry Link: https://lore.kernel.org/r/1602149181-237415-5-git-send-email-john.garry@huawei.com Signed-off-by: Will Deacon commit ac4511c9364c9a6390e8585cdd4596103bca16eb Author: John Garry Date: Thu Oct 8 17:26:18 2020 +0800 drivers/perf: hisi: Add identifier sysfs file To allow userspace to identify the specific implementation of the device, add an "identifier" sysfs file. Encoding is as follows (same for all uncore drivers): hi1620: 0x0 hi1630: 0x30 Signed-off-by: John Garry Link: https://lore.kernel.org/r/1602149181-237415-2-git-send-email-john.garry@huawei.com Signed-off-by: Will Deacon commit dd37d2f59eb839d51b988f6668ce5f0d533b23fd Author: Jason Gunthorpe Date: Wed Nov 18 09:33:23 2020 -0400 RDMA/cma: Fix deadlock on &lock in rdma_cma_listen_on_all() error unwind rdma_detroy_id() cannot be called under &lock - we must instead keep the error'd ID around until &lock can be released, then destroy it. This is complicated by the usual way listen IDs are destroyed through cma_process_remove() which can run at any time and will asynchronously destroy the same ID. Remove the ID from visiblity of cma_process_remove() before going down the destroy path outside the locking. Fixes: c80a0c52d85c ("RDMA/cma: Add missing error handling of listen_id") Link: https://lore.kernel.org/r/20201118133756.GK244516@ziepe.ca Reported-by: syzbot+1bc48bf7f78253f664a9@syzkaller.appspotmail.com Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 6c8cfbf5db42bc300372d893a140ea0879fb0772 Author: Wang Qing Date: Fri Nov 6 14:41:42 2020 +0800 perf: remove duplicate check on fwnode fwnode is checked IS_ERR_OR_NULL in following check by is_of_node() or is_acpi_device_node(), remove duplicate check. Signed-off-by: Wang Qing Link: https://lore.kernel.org/r/1604644902-29655-1-git-send-email-wangqing@vivo.com Signed-off-by: Will Deacon commit 53c218da220c3619b5befec4674ffa35d590092a Author: Tuan Phan Date: Wed Nov 4 11:30:43 2020 -0800 driver/perf: Add PMU driver for the ARM DMC-620 memory controller DMC-620 PMU supports total 10 counters which each is independently programmable to different events and can be started and stopped individually. Currently, it only supports ACPI. Other platforms feel free to test and add support for device tree. Usage example: #perf stat -e arm_dmc620_10008c000/clk_cycle_count/ -C 0 Get perf event for clk_cycle_count counter. #perf stat -e arm_dmc620_10008c000/clkdiv2_allocate,mask=0x1f,match=0x2f, incr=2,invert=1/ -C 0 The above example shows how to specify mask, match, incr, invert parameters for clkdiv2_allocate event. Reviewed-by: Robin Murphy Signed-off-by: Tuan Phan Link: https://lore.kernel.org/r/1604518246-6198-1-git-send-email-tuanphan@os.amperecomputing.com Signed-off-by: Will Deacon commit 2aec389e19150ed3bf67ab708f2435563f76050f Author: Johan Hovold Date: Mon Nov 23 11:23:19 2020 +0100 params: clean up module-param macros Clean up the module-param macros by adding some indentation and using the __aligned() macro to improve readability. Link: https://lore.kernel.org/lkml/20201103175711.10731-1-johan@kernel.org Signed-off-by: Johan Hovold Signed-off-by: Jessica Yu commit fe2f4fe139b321a38daafc715aeb7d21d9e8e5ad Author: Johan Hovold Date: Mon Nov 23 11:23:18 2020 +0100 params: use type alignment for kernel parameters Specify type alignment for kernel parameters instead of sizeof(void *). The alignment attribute is used to prevent gcc from increasing the alignment of objects with static extent as an optimisation, something which would mess up the __param array stride. Using __alignof__(struct kernel_param) rather than sizeof(void *) is preferred since it better indicates why it is there and doesn't break should the type size or alignment change. Note that on m68k the alignment of struct kernel_param is actually two and that adding a 1- or 2-byte field to the 20-byte struct would cause a breakage with the current 4-byte alignment. Link: https://lore.kernel.org/lkml/20201103175711.10731-1-johan@kernel.org Signed-off-by: Johan Hovold Signed-off-by: Jessica Yu commit 8d6615f1fccc4f39d7d3dcf286b33e8a1e833d2b Author: Johan Hovold Date: Mon Nov 23 11:23:17 2020 +0100 params: drop redundant "unused" attributes Drop the redundant "unused" attributes from module-parameter structures already marked "used". Link: https://lore.kernel.org/lkml/20201103175711.10731-1-johan@kernel.org Signed-off-by: Johan Hovold Signed-off-by: Jessica Yu commit b112082c8930e7aa72422484b2d31d3aa06f58bc Author: Johan Hovold Date: Mon Nov 23 11:23:15 2020 +0100 module: simplify version-attribute handling Instead of using the array-of-pointers trick to avoid having gcc mess up the built-in module-version array stride, specify type alignment when declaring entries to prevent gcc from increasing alignment. This is essentially an alternative (one-line) fix to the problem addressed by commit b4bc842802db ("module: deal with alignment issues in built-in module versions"). gcc can increase the alignment of larger objects with static extent as an optimisation, but this can be suppressed by using the aligned attribute when declaring variables. Note that we have been relying on this behaviour for kernel parameters for 16 years and it indeed hasn't changed since the introduction of the aligned attribute in gcc-3.1. Link: https://lore.kernel.org/lkml/20201103175711.10731-1-johan@kernel.org Signed-off-by: Johan Hovold Signed-off-by: Jessica Yu commit 0801a0073f86e020987acbbd96b50f9c85d79de8 Author: Johan Hovold Date: Mon Nov 23 11:23:14 2020 +0100 module: drop version-attribute alignment Commit 98562ad8cb03 ("module: explicitly align module_version_attribute structure") added an alignment attribute to the struct module_version_attribute type in order to fix an alignment issue on m68k where the structure is 2-byte aligned while MODULE_VERSION() forced the __modver section entries to be 4-byte aligned (sizeof(void *)). This was essentially an alternative fix to the problem addressed by b4bc842802db ("module: deal with alignment issues in built-in module versions") which used the array-of-pointer trick to prevent gcc from increasing alignment of the version attribute entries. And with the pointer indirection in place there's no need to increase the alignment of the type. Link: https://lore.kernel.org/lkml/20201103175711.10731-1-johan@kernel.org Signed-off-by: Johan Hovold Signed-off-by: Jessica Yu commit 5300ebb695fa0672589ab191062392f686fca75d Author: Bartosz Golaszewski Date: Tue Oct 20 09:24:04 2020 +0200 gpio: exar: use devm action for freeing the IDA and drop remove() We can simplify the error path in probe() and drop remove() entirely if we provide a devm action for freeing the device ID. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko commit 36fb7218e87833b17e3042e77f3b102c75129e8f Author: Bartosz Golaszewski Date: Mon Sep 28 17:00:26 2020 +0200 gpio: exar: switch to using regmap We can simplify the code in gpio-exar by using regmap. This allows us to drop the mutex (regmap provides its own locking) and we can also reuse regmap's bit operations instead of implementing our own update function. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko commit 696868d0a79c211b51d0d0f7a1e6805e12d7fb42 Author: Bartosz Golaszewski Date: Wed Sep 30 10:20:10 2020 +0200 gpio: exar: unduplicate address and offset computation Provide and use helpers for calculating the register address and bit offset instead of hand coding it in every function. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko commit 0c2c7e1323b44548c10f899df565e4c4154600f1 Author: Bartosz Golaszewski Date: Mon Sep 28 16:34:37 2020 +0200 gpio: exar: use a helper variable for &pdev->dev It's more elegant to use a helper local variable to store the address of the underlying struct device than to dereference pdev everywhere. It also has the benefit of avoiding unnecessary line breaks. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko commit 8e27c2aef8c321ce94c69f397f26d7647a1914d0 Author: Bartosz Golaszewski Date: Mon Sep 28 14:35:51 2020 +0200 gpio: exar: switch to a simpler IDA interface We don't need to specify any ranges when allocating IDs so we can switch to ida_alloc() and ida_free() instead of the ida_simple_ counterparts. ida_simple_get(ida, 0, 0, gfp) is equivalent to ida_alloc_range(ida, 0, UINT_MAX, gfp) which is equivalent to ida_alloc(ida, gfp). Note: IDR will never actually allocate an ID larger than INT_MAX. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko commit 26ced453a519629278bfd0ac789a8a1786f71099 Author: Bartosz Golaszewski Date: Sat Sep 19 15:36:56 2020 +0200 gpio: exar: include idr.h This driver uses IDA APIs but doesn't include the relevant header. This fixes it. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko commit 1bfaf1299c38c1215c1ad1c196a8f39e658befec Author: Bartosz Golaszewski Date: Sat Sep 19 15:32:15 2020 +0200 gpio: exar: add a newline after the copyright notice It's customary to have a newline between the copyright header and the includes. Add one to gpio-exar. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko commit 617e38a25cbdd672141afff93b1827a99338f502 Author: Lorenzo Bianconi Date: Tue Nov 17 17:47:26 2020 +0100 dt-bindings: iio: imu: st_lsm6dsx: introduce vdd-vddio regulators bindings Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/ae812b48528c48555a753c081acf1c9bb6376cc6.1605631305.git.lorenzo@kernel.org Signed-off-by: Jonathan Cameron commit f346b16f94af2ac9e6815e883170b78582f56367 Author: Lorenzo Bianconi Date: Tue Nov 17 17:47:25 2020 +0100 iio: imu: st_lsm6dsx: add vdd-vddio voltage regulator Like all other ST sensors, st_lsm6dsx devices have VDD and VDDIO power lines. Introduce voltage regulators to control them. Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/a0427a66360bdec73c3b1fb536a46240f96b2ae7.1605631305.git.lorenzo@kernel.org Signed-off-by: Jonathan Cameron commit 99ff938fea819615943dbf7f14bcfb2d5c2e12c4 Author: Jonathan Cameron Date: Sat Oct 31 18:48:54 2020 +0000 dt-bindings:iio:temperature: Drop generic binding file. So far, the thermocouple-type property described in here is only used in a single driver. Whilst I would like it to be more generally used that hasn't happened yet and I don't see a reason to maintain this small file in the hope that it happens. I pushed for this generic binding in the first place. Hopefully we can bring it back at somepoint. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Patrick Havelange Link: https://lore.kernel.org/r/20201031184854.745828-47-jic23@kernel.org commit 4f078dff65e970af809dab464730e34463aac42b Author: Jonathan Cameron Date: Sat Oct 31 18:48:53 2020 +0000 dt-bindings:iio:frequency:adi,adf4350: txt to yaml format conversion. This is a large but fairly simple binding. It may well be possible to constrain some of the properties more than currently done, but that would involve diving into datasheets for the supported parts. Hence for this initial conversion just use the information that was in the txt file. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Michael Hennerich Link: https://lore.kernel.org/r/20201031184854.745828-46-jic23@kernel.org commit a9aa46861c950b3a3f04645f86d7ee3a3963c31d Author: Jonathan Cameron Date: Sat Oct 31 18:48:52 2020 +0000 dt-bindings:iio:st,st-sensors: txt to yaml conversion. This binding document covers a very large number of different sensors. As such the existing documentation is less specific than it could be (such as which devices have 2 interrupt pin options). That can be improved later. Denis, are you happy to be listed as maintainer for this one? If not feel free to suggestion someone else. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Acked-by: Denis Ciocca Cc: Denis Ciocca Link: https://lore.kernel.org/r/20201031184854.745828-45-jic23@kernel.org commit 1f22b1319a86b6f21fa460880836922dcbd558e9 Author: Jonathan Cameron Date: Sat Oct 31 18:48:51 2020 +0000 dt-bindings:iio:gyro:bosch,bmg180: txt to yaml format conversion. Very simple direct conversion of existing txt file. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: H. Nikolaus Schaller Link: https://lore.kernel.org/r/20201031184854.745828-44-jic23@kernel.org commit 13d4fb3614639c9f86c500a5cef7928725f97ee4 Author: Jonathan Cameron Date: Sat Oct 31 18:48:50 2020 +0000 dt-bindings:iio:accel:fsl,mma8452: txt to yaml conversion. Simple binding so mostly straight forward to convert. Original binding was unclear on how many interrupts there are. The device has two such lines, whilst I believe the driver currently only uses one at a time. The binding should allow both to be specified. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Martin Kepplinger Link: https://lore.kernel.org/r/20201031184854.745828-43-jic23@kernel.org commit 45bdaf5fef9a650a0d5b733088fd7161b395d861 Author: Jonathan Cameron Date: Sat Oct 31 18:48:49 2020 +0000 dt-bindings:iio:accel:kionix,kxcjk1013: txt to yaml format conversion. Very simple binding hence a straight forward conversion. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Dmitry Osipenko Cc: Robert Yang Link: https://lore.kernel.org/r/20201031184854.745828-42-jic23@kernel.org commit 333beb45cf6e7d7dd06b57edba962a6a46b300ad Author: Jonathan Cameron Date: Sat Oct 31 18:48:48 2020 +0000 dt-bindings:iio:accel:bosch,bma180: txt to yaml format conversion. One question in here is whether we want to constrain the number of interrupts. Some parts definitely only have 1 such pin, and others 2 pins but I can not find information on the bma254. Oleksandr's email address is bouncing so I've listed myself as maintainer for this binding until someone else steps up. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201031184854.745828-41-jic23@kernel.org commit 357a80750782f1f6ebc2b7dd6d4810c6e979c0fd Author: Jonathan Cameron Date: Sat Oct 31 18:48:46 2020 +0000 dt-bindings:iio:dac:ad5592r: txt to yaml format conversion. This is a more complex binding. Whilst conversion is straight forward I am unsure if the full nature of required properties has been captured. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Michael Hennerich Link: https://lore.kernel.org/r/20201031184854.745828-39-jic23@kernel.org commit 1668ef26e66338fe9702bdf3267eeda35b023864 Author: Jonathan Cameron Date: Sat Oct 31 18:48:45 2020 +0000 dt-binding:iio:adc:ti,ads124s08: txt to yaml format conversion. Simple binding so straight forward format conversion. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Reviewed-by: Dan Murphy Link: https://lore.kernel.org/r/20201031184854.745828-38-jic23@kernel.org commit a4e6bf69418c0c242f4143ac2719e240acbad566 Author: Jonathan Cameron Date: Sat Oct 31 18:48:44 2020 +0000 dt-bindings:iio:adc:qcom,spmi-iadc: txt to yaml format conversion. Straight forward conversion. Not heard from Ivan in a while so if the email bounces, I'll change the maintainer to myself for this binding unless anyone else comes forwards. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201031184854.745828-37-jic23@kernel.org commit 8d966b5836f11283fb9026663dfac158b70e9d2e Author: Jonathan Cameron Date: Sat Oct 31 18:48:43 2020 +0000 dt-bindings:iio:adc:qcom,pm8018-adc: yaml conversion and rename. Renamed to match a listed compatible rather than relying on wildcards with all their usual problems. Dropped the reference supply as a requirement as at least one dtsi doesn't include it and the example never did. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Reviewed-by: Linus Walleij Cc: Linus Walleij Link: https://lore.kernel.org/r/20201031184854.745828-36-jic23@kernel.org commit e490260a1c564c8c734f2811a65d34651945eb72 Author: Jonathan Cameron Date: Sat Oct 31 18:48:42 2020 +0000 dt-bindings:iio:adc:ti,palmas-gpadc: txt to yaml format conversion. Simple conversion of the binding doc for this subnode of the palmas PMIC. Given age of driver and lack interaction with original authors, I've guessed at Tony for a maintainer on this one. Tony, if you are happy with that great, otherwise I can default back to myself. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Tony Lindgren Link: https://lore.kernel.org/r/20201031184854.745828-35-jic23@kernel.org commit 609538472e932e34ed6850b614a9469206d6667f Author: Jonathan Cameron Date: Sat Oct 31 18:48:41 2020 +0000 dt-bindings:iio:adc:mediatek,mt2701-auxadc: rename and yaml conversion. The current driver and indeed binding are named after a part that they do not list in the compatible. Hence renamed the binding to reflect one that does. >From the driver it looks like there is a lot more backwards compatibility than the binding currently reflects. We could consider expressing that more explicitly in the yaml for the compatible property. I have added one explicit pair that was present in the upstream dtsi files. I added Matthias alongside Zhiyong Tao because I don't think Zhiyong Tao has reviewed recent patches. Please let me know if this isn't the right thing to do. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Zhiyong Tao Cc: Matthias Brugger Link: https://lore.kernel.org/r/20201031184854.745828-34-jic23@kernel.org commit 25b49a31fb03357f5c330ad709f9ec5365136cc0 Author: Jonathan Cameron Date: Sat Oct 31 18:48:40 2020 +0000 dt-bindings:iio:adc:brcm,iproc-static-adc: txt to yaml conversion A few questions came up in this one. 1) Why does the txt file document io-channel-ranges as a required property. That property is for iio-channel consumers, and this is a provider. I have dropped it. 2) The example had an @180a6000 for the ADC but given it uses syscon for all access, it doesn't have its own reg etc. I've dropped that from the binding example. Note this example was lifted directly from bcm-cygnus.dtsi so both issues are present there as well. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Raveendra Padasalagi Link: https://lore.kernel.org/r/20201031184854.745828-33-jic23@kernel.org commit b6e136c7e6ad4e379e58b3838ef3d8a8c669cd6d Author: Sameer Pujar Date: Thu Nov 5 15:54:03 2020 +0530 arm64: tegra: Rename ADMA device nodes for Tegra210 DMA device nodes should follow regex pattern of "^dma-controller(@.*)?$". This is a preparatory patch to use YAML doc format for ADMA. Signed-off-by: Sameer Pujar Signed-off-by: Thierry Reding commit 1289bd9fec206dd8a854d6dba841e8d8a0d84f3e Author: Thierry Reding Date: Fri Nov 20 16:19:29 2020 +0100 arm64: tegra: Hook up edp interrupt on Tegra132 SOCTHERM For some reason this was never hooked up. Do it now so that over-current interrupts can be logged. Reported-by: Nicolas Chauvet Suggested-by: Jon Hunter Signed-off-by: Thierry Reding commit fdf278257e6de4a5754f58778efb3dfc3a646b0e Author: Nicolas Chauvet Date: Sun Sep 27 17:09:55 2020 +0200 arm64: tegra: Add missing hot temperatures to Tegra210 thermal-zones According to dmesg, thermal-zones for mem and cpu are missing hot temperatures properties. throttrip: pll: missing hot temperature ... throttrip: mem: missing hot temperature ... Adding them will clear the messages. Signed-off-by: Nicolas Chauvet Signed-off-by: Thierry Reding commit 3146cd55b00172c33d04638ee4a9287767d289eb Author: Nicolas Chauvet Date: Sun Sep 27 17:09:54 2020 +0200 arm64: tegra: Add missing gpu-throt-level to Tegra210 soctherm On Jetson TX1 the following message can be seen: tegra_soctherm 700e2000.thermal-sensor: throttle-cfg: heavy: no throt prop or invalid prop This patch will fix the invalid prop issue according to the binding. Signed-off-by: Nicolas Chauvet Signed-off-by: Thierry Reding commit 5aaa0de991c7604b94b4765c3f8d054e31363cf1 Author: Nicolas Chauvet Date: Sun Sep 27 17:09:53 2020 +0200 arm64: tegra: Add missing hot temperatures to Tegra132 thermal-zones According to dmesg, thermal-zones for mem and cpu are missing hot temperatures properties. throttrip: pll: missing hot temperature ... throttrip: mem: missing hot temperature ... Adding them will clear the messages. Signed-off-by: Nicolas Chauvet Signed-off-by: Thierry Reding commit 6b26c1a034885923822f6c4d94f8644d32bc2481 Author: Vidya Sagar Date: Mon Oct 26 12:09:02 2020 +0530 arm64: tegra: Fix DT binding for IO High Voltage entry Fix the device-tree entry that represents I/O High Voltage property by replacing 'nvidia,io-high-voltage' with 'nvidia,io-hv' as the former entry is deprecated. Fixes: dbb72e2c305b ("arm64: tegra: Add configuration for PCIe C5 sideband signals") Signed-off-by: Vidya Sagar Signed-off-by: Thierry Reding commit 776a3c04da9fa144241476f4a0d263899d6cad26 Author: Marc Zyngier Date: Mon Oct 5 14:32:56 2020 +0100 arm64: tegra: Fix GIC400 missing GICH/GICV register regions GIC400 has full support for virtualization, and yet the tegra186 DT doesn't expose the GICH/GICV regions (despite exposing the maintenance interrupt that only makes sense for virtualization). Add the missing regions, based on the hunch that the HW doesn't use the CPU build-in interfaces, but instead the external ones provided by the GIC. KVM's virtual GIC now works with this change. Signed-off-by: Marc Zyngier Signed-off-by: Thierry Reding commit 3b4c137856d94f94231415793f45a104a19c3604 Author: Marc Zyngier Date: Tue Oct 13 10:58:51 2020 +0100 arm64: tegra: Add missing CPU PMUs on Tegra186 Add the description of CPU PMUs for both the Denver and A57 clusters, which enables the perf subsystem. Signed-off-by: Marc Zyngier Signed-off-by: Thierry Reding commit 4863b93cfd2dfe88557f820b3399c3fa2163ec43 Author: AngeloGioacchino Del Regno Date: Thu Oct 22 19:47:06 2020 +0200 media: camss: csiphy: Set rate on csiX_phy clock on SDM630/660 The SDM630/660 SoCs (and variants) have another clock source for the PHY, which must be set to a rate that's equal or greater than the CSI PHY timer clock: failing to do this will produce PHY overflows when trying to get a stream from a very high bandwidth camera sensor and outputting no frame or a partial one. Since I haven't found any usecase in which the csiX_phy clock needs to be higher than the csiXphy_timer, let's just set the same rate on both, which seems to work just perfect. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Robert Foss Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e486781b74cc611d85e66ff0fc6324f65b25196c Author: AngeloGioacchino Del Regno Date: Thu Oct 22 19:47:04 2020 +0200 media: camss: csiphy-3ph: Add support for SDM630/660 The CSIPHY on SDM630/660 needs a slightly longer T_HS_CLK_MISS configuration on lanes CFG4. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Robert Foss Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9e5d158189c6a6259c1c78bc95d8ae950b4ec66a Author: AngeloGioacchino Del Regno Date: Thu Oct 22 19:47:03 2020 +0200 media: camss: Add support for SDM630/636/660 camera subsystem Add support for the Qualcomm SDM630/636/660 and SDA variants' camera subsystem. These SoCs are equipped with: - 3x CSI PHY 3-Phase v1.0 (downstream csiphy-v3.5) - 4x CSID v5.0 - 2x ISPIF v3.0 - 2x VFE 4.8 As a note, this camera subsystem is very similar to the one that is found in the MSM8998/APQ8098 SoCs. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Robert Foss Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3cba9d22c358a3a095cbfcc7bec26e67c29ee361 Author: AngeloGioacchino Del Regno Date: Thu Oct 22 19:47:05 2020 +0200 media: dt-bindings: media: qcom,camss: Add bindings for SDM660 camss Add bindings for qcom,sdm660-camss in order to support the camera subsystem on SDM630/660 and SDA variants. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Robert Foss Acked-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 40296e712cad0008f627a56151c1a0e6297e1309 Author: AngeloGioacchino Del Regno Date: Thu Oct 22 19:47:02 2020 +0200 media: camss: vfe: Add support for VFE 4.8 Add the support for VFE 4.8 in the camss-vfe-4-7 driver, as this one really is a minor revision, requiring the very same management and basically having the same register layout as VFE 4.7, but needing a different QoS and DS configuration, using a different register to enable the wm and habing the same UB size for both instances (instead of a different size between instance 0 and 1). Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Robert Foss Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1786653aa2e3b1533cb576b13dabdf4032ce76e5 Author: AngeloGioacchino Del Regno Date: Thu Oct 22 19:47:01 2020 +0200 media: camss: vfe-4-7: Rename get_ub_size, set_qos, set_ds, wm_enable In preparation to add support for VFE 4.8, rename these functions by adding the vfe version that they are referred to (for example, vfe_get_ub_size -> vfe47_get_ub_size), as these are the only ones that will be different for the VFE version 4.8. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Robert Foss Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 864ed874d74a36e9b708e41c98cf791bb7786507 Author: AngeloGioacchino Del Regno Date: Thu Oct 22 19:47:00 2020 +0200 media: camss: ispif: Correctly reset based on the VFE ID Resetting the ISPIF VFE0 context is wrong if we are using the VFE1 for dual-camera or simply because a secondary camera is connected to it: in this case the reset will always happen on the VFE0 ctx of the ISPIF, which is .. useless. Fix this usecase by adding the ISPIF_RST_CMD_1 address and choose where to do the (or what to) reset based on the VFE line id. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Robert Foss Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cea357bc25713f909bd9d6f0d71eae5e3a5b4e85 Author: Sean Young Date: Wed Nov 18 11:43:40 2020 +0100 media: lirc: ensure RC_PROTO_MAX has documentation The enum rc_proto value RC_PROTO_MAX has no documentation, this is causing a warning while building the documentation. Fixes: 72e637fec558 ("media: rc: validate that "rc_proto" is reasonable") Reported-by: Stephen Rothwell Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 371443de3c991f7b025d5203754a3497b7ea7c32 Author: Sean Young Date: Tue Nov 10 09:30:38 2020 +0100 media: sunxi-cir: allow timeout to be set at runtime This allows the timeout to be set with the LIRC_SET_REC_TIMEOUT ioctl. The timeout was hardcoded at just over 20ms, but returned 120ms when queried with the LIRC_GET_REC_TIMEOUT ioctl. This also ensures the idle threshold is set correctly with a base clock other than 8Mhz. Acked-by: Maxime Ripard Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 3f56df4c8ffeb120ed41906d3aae71799b7e726a Author: Sean Young Date: Mon Nov 9 23:16:52 2020 +0100 media: sunxi-cir: ensure IR is handled when it is continuous If a user holds a button down on a remote, then no ir idle interrupt will be generated until the user releases the button, depending on how quickly the remote repeats. No IR is processed until that point, which means that holding down a button may not do anything. This also resolves an issue on a Cubieboard 1 where the IR receiver is picking up ambient infrared as IR and spews out endless "rc rc0: IR event FIFO is full!" messages unless you choose to live in the dark. Cc: stable@vger.kernel.org Tested-by: Hans Verkuil Acked-by: Maxime Ripard Reported-by: Hans Verkuil Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit defbac5d79b02e5c006e08f02a8f6fdcdca1a5db Author: Dave Stevenson Date: Mon Nov 16 16:42:38 2020 +0100 media: i2c: imx219: Declare that the driver can create events The flag V4L2_SUBDEV_FL_HAS_EVENTS is required if the subdev can generate events. It can create events from the ctrl handler, therefore this is required. Signed-off-by: Dave Stevenson Signed-off-by: Dafna Hirschfeld Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 8b7c7828a311a18932ca63228ff3745a86cb880a Author: Rui Miguel Silva Date: Wed Oct 21 23:25:43 2020 +0200 media: dt-bindings: imx7-mipi-csi2: convert bindings to yaml Convert imx7 mipi csi2 bindings documentation to yaml schema, remove the textual document and update MAINTAINERS entry. Signed-off-by: Rui Miguel Silva Reviewed-by: Jacopo Mondi Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 338de94d220d5c413b029460a59e7a5ebeeb903f Author: Rui Miguel Silva Date: Wed Oct 21 23:25:42 2020 +0200 media: dt-bindings: imx7-csi: convert bindings to yaml Convert imx7-csi bindings documentation to yaml schema, remove the textual bindings document and update MAINTAINERS entry. Signed-off-by: Rui Miguel Silva Reviewed-by: Jacopo Mondi Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 57226cd8c8bf14e2dfcb3deb4e44bb74ccdafda2 Author: Rui Miguel Silva Date: Wed Oct 21 23:25:41 2020 +0200 media: dt-bindings: ov2680: convert bindings to yaml Convert ov2680 sensor bindings documentation to yaml schema, remove the textual bindings document and update MAINTAINERS entry. Signed-off-by: Rui Miguel Silva Reviewed-by: Jacopo Mondi Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 7966ceb4dde4d694387c40c5bac5bb01d40d48dc Author: Nigel Christian Date: Sat Oct 31 03:21:55 2020 +0100 media: ipu3-cio2: fix trivial style warning Comment has 'the' repeated twice. Let's clean it up. This patch reduces checkpatch warnings for this file to nil. Signed-off-by: Nigel Christian Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit b5c17905fb97e4e3c2fccdd168f6d2e7d54076e5 Author: Xu Wang Date: Wed Nov 4 10:29:48 2020 +0100 media: i2c: mt9p031: Remove redundant null check before clk_disable_unprepare Because clk_disable_unprepare() already checked NULL clock parameter, so the additional check is unnecessary, just remove it. Signed-off-by: Xu Wang Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 5e6fd339b68df81f35a70b4aa0501e3eec1dd2de Author: Bingbu Cao Date: Fri Nov 13 04:06:58 2020 +0100 media: ov2740: allow OTP data access during streaming OTP data access of ov2740 need enable the streaming mode to load and it could be done in any time, so driver need allow the OTP data access during streaming instead of return EBUSY, this patch try to read the OTP data out in STREAMON if OTP data is not ready before first time streaming start. Signed-off-by: Bingbu Cao Signed-off-by: Qingwu Zhang Reviewed-by: Tomasz Figa Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 798f1a6b0efcb33e5f3abe048aa9d546ca849cd8 Author: Bingbu Cao Date: Fri Nov 13 04:06:57 2020 +0100 media: ov2740: only do OTP data read on demand from user OTP data access of ov2740 in probe need power up, it may cause the camera flash LED blink during probe if the LED use same power rail with camera, this patch move the OTP data access out of probe, it will only occur on demand from user by nvmem sysfs. Signed-off-by: Bingbu Cao Signed-off-by: Qingwu Zhang Reviewed-by: Tomasz Figa Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 3c80f6f81e64de5721867721d4a3e90bb602c787 Author: Hugues Fruchet Date: Wed Nov 4 18:32:09 2020 +0100 media: stm32-dcmi: add support of BT656 bus Add support of BT656 embedded synchronization bus. This mode allows to save hardware synchro lines hsync & vsync by replacing them with synchro codes embedded in data stream. This bus type is only compatible with 8 bits width data bus. Due to reserved values 0x00 & 0xff used for synchro codes, valid data vary from 0x1 to 0xfe, this is up to sensor to clip accordingly pixel data. As a consequence of this clipping, JPEG is not supported with this bus type. DCMI crop feature is also not available with this bus type. Signed-off-by: Hugues Fruchet Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 1008230f2abeb624f6d71b2e1c424fa4eeebbf84 Author: Ethan Warth Date: Tue Nov 17 09:48:00 2020 +0100 HID: mf: add support for 0079:1846 Mayflash/Dragonrise USB Gamecube Adapter Mayflash/Dragonrise seems to have yet another device ID for one of their Gamecube controller adapters. Previous to this commit, the adapter registered only one /dev/input/js* device, and all controller inputs (from any controller) were mapped to this device. This patch defines the 1846 USB device ID and enables the HID_QUIRK_MULTI_INPUT quirk for it, which fixes that (with the patch, four /dev/input/js* devices are created, one for each of the four controller ports). Signed-off-by: Ethan Warth Tested-by: Wladimir J. van der Laan Signed-off-by: Jiri Kosina commit e2881c64519d235a90e93aefd61bb51a4a22d08b Author: Hugues Fruchet Date: Wed Nov 4 18:32:10 2020 +0100 media: dt-bindings: media: st,stm32-dcmi: add support of BT656 bus Add support of BT656 embedded synchronization bus mode in DCMI driver. Add "bus-type" property and make it required so that there is no ambiguity between parallel mode (bus-type=5) and BT656 mode (bus-type=6). BT656 mode allows to save hardware synchro lines hsync & vsync by replacing them with synchro codes embedded in data stream, hence hsync-active & vsync-active properties are useless in this mode. With DCMI, BT656 bus mode is only compatible with 8 bits width data bus. Signed-off-by: Hugues Fruchet Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit d3f863a63fe4332cfda6174dfd4d2532eca7faf0 Author: Tianshu Qiu Date: Thu Oct 29 03:59:01 2020 +0100 media: i2c: Add ov9734 image sensor driver Add a v4l2 sub-device driver for the OminiVision ov9734 image sensor which can deliver maximum 720p image frames at 30 fps. This driver also add vertical blanking, exposure, test pattern, digital and analog gain control for the image sensor. Signed-off-by: Bingbu Cao Signed-off-by: Tianshu Qiu Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 55633e681afb57c9a8ff8a3b22083d44cbaee9e8 Author: YOSHIOKA Takuma Date: Sun Nov 22 05:54:38 2020 +0900 HID: elecom: add support for EX-G M-XGL20DLBK wireless mouse Enables three buttons (Fn1, Fn2, and Fn3) on the ELECOM M-XGL20DLBK wireless mouse. While this mouse is EX-G brand, report descriptor is a bit different from EX-G trackball mouse. To enable extra buttons, report should be rewritten in a similar way to trackballs, but with different position parameters. Signed-off-by: YOSHIOKA Takuma Signed-off-by: Jiri Kosina commit 68d09380a62784ee5abd67462d2c04d094f3a4d2 Author: YOSHIOKA Takuma Date: Sun Nov 22 05:54:37 2020 +0900 HID: elecom: rewrite report based on model specific parameters The report descriptor for EX-G wireless mouse (M-XGL20DLBK) is a bit different from that for trackball mice such as DEFT. For such mouse, the current `mouse_button_fixup` cannot be used as is, because it uses hard-coded indices for a report descriptor. Add parameters to `mouse_button_fixup` function, in order to support fixing report descriptors for more models. Signed-off-by: YOSHIOKA Takuma Signed-off-by: Jiri Kosina commit 2a6a35a9ecddb2b1d58f4948f471b3be8c506640 Author: Rikard Falkeborn Date: Wed Nov 25 00:01:09 2020 +0100 HID: wacom: Constify attribute_groups These are never modified, so make them const to allow the compiler to put them in read-only memory. It also allows the compiler to shrink the resulting module with ~900 bytes, test-built with gcc 10.2 on x86_64. text data bss dec hex filename 204377 42832 576 247785 3c7e9 drivers/hid/wacom_old.ko 204240 42064 576 246880 3c460 drivers/hid/wacom_new.ko Signed-off-by: Rikard Falkeborn Signed-off-by: Jiri Kosina commit 7f575a6087f47cf2a320d32a102be6276e9fd5bc Author: Sai Prakash Ranjan Date: Wed Nov 25 12:30:18 2020 +0530 iommu: arm-smmu-impl: Add a space before open parenthesis Fix the checkpatch warning for space required before the open parenthesis. Signed-off-by: Sai Prakash Ranjan Acked-by: Will Deacon Link: https://lore.kernel.org/r/0b4c3718a87992f11340a1cdd99fd746c647e485.1606287059.git.saiprakash.ranjan@codeaurora.org Signed-off-by: Will Deacon commit 00597f9ff5eccd8b90e34cbd963471c6befcad98 Author: Sai Prakash Ranjan Date: Wed Nov 25 12:30:17 2020 +0530 iommu: arm-smmu-impl: Use table to list QCOM implementations Use table and of_match_node() to match qcom implementation instead of multiple of_device_compatible() calls for each QCOM SMMU implementation. Signed-off-by: Sai Prakash Ranjan Acked-by: Will Deacon Link: https://lore.kernel.org/r/4e11899bc02102a6e6155db215911e8b5aaba950.1606287059.git.saiprakash.ranjan@codeaurora.org Signed-off-by: Will Deacon commit 12bc36793fd6dbc910a6d7c5bec707274815b3c0 Author: Sai Prakash Ranjan Date: Wed Nov 25 12:30:13 2020 +0530 iommu/arm-smmu: Move non-strict mode to use io_pgtable_domain_attr Now that we have a struct io_pgtable_domain_attr with quirks, use that for non_strict mode as well thereby removing the need for more members of arm_smmu_domain in the future. Signed-off-by: Sai Prakash Ranjan Link: https://lore.kernel.org/r/c191265f3db1f6b3e136d4057ca917666680a066.1606287059.git.saiprakash.ranjan@codeaurora.org Signed-off-by: Will Deacon commit c99110a865a3b0e3203a8b3101eae03ae49a1cf2 Author: Sai Prakash Ranjan Date: Wed Nov 25 12:30:12 2020 +0530 iommu/arm-smmu: Add support for pagetable config domain attribute Add support for domain attribute DOMAIN_ATTR_IO_PGTABLE_CFG to get/set pagetable configuration data which initially will be used to set quirks and later can be extended to include other pagetable configuration data. Signed-off-by: Sai Prakash Ranjan Link: https://lore.kernel.org/r/2ab52ced2f853115c32461259a075a2877feffa6.1606287059.git.saiprakash.ranjan@codeaurora.org Signed-off-by: Will Deacon commit 9c00c6400f8008971069fce290d404212b5f35ca Merge: a29bbb0861f48 e67890c97944b Author: Will Deacon Date: Wed Nov 25 13:10:41 2020 +0000 Merge branch 'for-next/iommu/io-pgtable-domain-attr' into for-next/iommu/arm-smmu Merge in support for the new DOMAIN_ATTR_IO_PGTABLE_CFG domain attribute and its associated IO_PGTABLE_QUIRK_ARM_OUTER_WBWA io-pgtable quirk, as these are needed to enable support for Qualcomm's System Cache in conjunction with their GPU SMMU. * for-next/iommu/io-pgtable-domain-attr: iommu/io-pgtable-arm: Add support to use system cache iommu/io-pgtable: Add a domain attribute for pagetable configuration commit 6b5542752605ccf2184f495fae518fac1d573226 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:33:29 2020 -0600 HID: input: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a goto statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Jiri Kosina commit cae96a5d2bf38401b0e380f9025c375e99ac5a57 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:33:24 2020 -0600 HID: usbhid: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a couple of warnings by explicitly adding a couple of break statements instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Jiri Kosina commit ba876cdc6ac9702138000d06613484de3de760db Author: Hans de Goede Date: Thu Nov 19 14:27:27 2020 +0100 HID: logitech-hidpp: Add hid_device_id for V470 bluetooth mouse The Logitech V470 bluetooth mouse supports HID++-1.0 over bluetooth, add its id to the hidpp driver so that it handles it. This enables battery monitoring support. Note this mouse does not support hi-resolution scroll-wheel events. Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit 9735d9deb109afaab747fb853b804cb5dc144c0a Author: Jing Xiangfeng Date: Tue Nov 10 11:20:49 2020 +0800 HID: intel-ish-hid: Remove unnecessary assignment to variable rv This assignment to rv is unused in an error path. So remove it. Signed-off-by: Jing Xiangfeng Signed-off-by: Jiri Kosina commit 459ea85049b01708e364c34deac24b00909c73ed Author: Tian Tao Date: Mon Nov 23 15:02:55 2020 +0800 spi: dw: fixed missing resource_size fixed the coccicheck: drivers/spi/spi-dw-bt1.c:220:27-30: ERROR: Missing resource_size with mem. Signed-off-by: Tian Tao Acked-by: Serge Semin Link: https://lore.kernel.org/r/1606114975-31362-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Mark Brown commit 373c2cebf42772434c8dd0deffc3b3886ea8f1eb Author: Viorel Suman Date: Tue Nov 24 16:19:57 2020 +0200 ASoC: fsl_xcvr: fix potential resource leak "fw" variable must be relased before return. Signed-off-by: Viorel Suman Link: https://lore.kernel.org/r/20201124141957.20481-1-viorel.suman@oss.nxp.com Signed-off-by: Mark Brown commit f5dc93b7875bcb8be77baa792cc9432aaf65365b Author: Roderick Colenbrander Date: Mon Nov 9 23:22:28 2020 -0800 HID: sony: Workaround for DS4 dongle hotplug kernel crash. The hid-sony driver has custom DS4 connect/disconnect logic for the DS4 dongle, which is a USB dongle acting as a proxy to Bluetooth connected DS4. The connect/disconnect logic works fine generally, however not in conjunction with Steam. Steam implements its own DS4 driver using hidraw. Both hid-sony and Steam are issuing their own HID requests and are racing each other during DS4 dongle connect/disconnect resulting in a kernel crash in hid-sony. The problem is that upon a DS4 connect to the dongle, hid-sony kicks of 'ds4_get_calibration_data' from within its dongle hotplug code. The calibration code issues raw HID feature report for reportID 0x02. When Steam is running, it issues a feature report for reportID 0x12 typically just prior to hid-sony requesting feature reportID 0x02. The result is that 'ds4_get_calibration_data' receives the data Steam requested as that's the HID report returing first. Currently this results in it processing invalid data, which ultimately results in a divide by zero upon a future 'dualshock4_parse_report'. The solution for now is to check within 'ds4_get_calibration_data' to check if we received data for the feature report we issued and if not retry. This fixes bug 206785. Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina commit 1a8212e8fd1f50249f30e995460b17c0850c3212 Author: Roderick Colenbrander Date: Mon Nov 9 23:22:29 2020 -0800 HID: sony: Don't use fw_version/hw_version for sysfs cleanup. The DS4 dongle reports fw_version and hw_version as 0 when no actual DS4 is connected to it. This prevents cleaning up sysfs nodes upon device remove. This patch decouples sysfs cleanup from the fw_version and hw_version values by introducing boolean values. Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina commit a76a6c1893b0806657cb747c3c8949d3103fbc3f Author: Roderick Colenbrander Date: Mon Nov 9 23:22:27 2020 -0800 HID: sony: Report more accurate DS4 power status. This patch moves the power supply status logic to DS3/DS4 parse_report, to allow for more accurate DS4 status reporting. The DS4 power status code was actually incorrect, but reported okay'ish data in most cases. There was a different interpretation of the battery_info values 0-10 or 0-9 depending on cable state. It added +1 to extend the range to 0-10. This is actually incorrect, there is no different range. Values higher than 11 actually indicates 'full' and 14/15 'error' for which we reported 100% and a valid power state. Moving the status logic to parse_report avoids having to pass more state to the generic sony_battery_get_property and simplifies the code. Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina commit e67890c97944b9962cf8c140a7f8077ed643b7d7 Author: Sai Prakash Ranjan Date: Wed Nov 25 12:30:11 2020 +0530 iommu/io-pgtable-arm: Add support to use system cache Add a quirk IO_PGTABLE_QUIRK_ARM_OUTER_WBWA to override the outer-cacheability attributes set in the TCR for a non-coherent page table walker when using system cache. Signed-off-by: Sai Prakash Ranjan Link: https://lore.kernel.org/r/f818676b4a2a9ad1edb92721947d47db41ed6a7c.1606287059.git.saiprakash.ranjan@codeaurora.org Signed-off-by: Will Deacon commit a7656ecf825ac0434a5e7bf108ec1a56b65ee5e4 Author: Sai Prakash Ranjan Date: Wed Nov 25 12:30:10 2020 +0530 iommu/io-pgtable: Add a domain attribute for pagetable configuration Add a new iommu domain attribute DOMAIN_ATTR_IO_PGTABLE_CFG for pagetable configuration which initially will be used to set quirks like for system cache aka last level cache to be used by client drivers like GPU to set right attributes for caching the hardware pagetables into the system cache and later can be extended to include other page table configuration data. Signed-off-by: Sai Prakash Ranjan Link: https://lore.kernel.org/r/9190aa16f378fc0a7f8e57b2b9f60b033e7eeb4f.1606287059.git.saiprakash.ranjan@codeaurora.org Signed-off-by: Will Deacon commit 9854bc7dfa5f7661538b08dc44d5e6c8876832fb Author: Michal Simek Date: Thu Nov 12 13:52:34 2020 +0100 arm64: dts: zynqmp: Wire mailbox with zynqmp-power driver The support to driver was added by commit ffdbae28d9d1 ("drivers: soc: xilinx: Use mailbox IPI callback") that's why also enable it via DT by default. It setups communication with firmware via IPI interface. Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/5d3523150890e494df308ee69523d0f0e7b33b22.1605185549.git.michal.simek@xilinx.com commit 48ab2996f6837aa888ccc0671de7ef3e3185992e Author: Michal Simek Date: Tue Sep 29 13:43:22 2020 +0200 arm64: dts: zynqmp: Fix pcie ranges description DT schema is checking tuples which should be properly separated. The patch is doing this separation to avoid the following warning: ..yaml: axi: pcie@fd0e0000:ranges: [[33554432, 0, 3758096384, 0, 3758096384, 0, 268435456, 1124073472, 6, 0, 6, 0, 2, 0]] is not valid under any of the given schemas (Possible causes of the failure): ...dt.yaml: axi: pcie@fd0e0000:ranges: True was expected ...dt.yaml: axi: pcie@fd0e0000:ranges:0: [33554432, 0, 3758096384, 0, 3758096384, 0, 268435456, 1124073472, 6, 0, 6, 0, 2, 0] is too long Signed-off-by: Michal Simek Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/f59a63d8cb941592de6d2dee8afa6f120b2e40c8.1601379794.git.michal.simek@xilinx.com commit 74790cf981afd9806939427ad7701f3022ee5c06 Author: Michal Simek Date: Tue Nov 10 16:20:46 2020 +0100 arm64: zynqmp: Move gic node to axi bus The reason for this change is that after change from amba to axi U-Boot started to show error like: Unable to update property /axi/ethernet@ff0e0000:mac-address, err=FDT_ERR_NOTFOUND Unable to update property /axi/ethernet@ff0e0000:local-mac-address, err=FDT_ERR_NOTFOUND The reason is implementation in fdt_nodename_eq_() which is taken from dtc to the kernel and to the U-Boot. Especially DTC commit d2a9da045897 ("libfdt: Make unit address optional for finding nodes") which is in DTC from 2007. The part of commit description is " This is contrary to traditional OF-like finddevice() behaviour, which allows the unit address to be omitted (which is useful when the device name is unambiguous without the address)." The kernel commit dfff9066e60e ("arm64: dts: zynqmp: Rename buses to be align with simple-bus yaml") changed amba-apu/amba to axi@0/axi but fdt_nodename_eq_() detects /axi/ as match for /axi@0/ because of commit above. That's why it easier to fix one DT inside the kernel by moving GIC node from own bus to generic axi bus as is done by others SoCs. This will avoid incorrect match because the unit address is omitted. Reported-by: Paul Thomas Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/f767fe007e446a2299fda9905e75b723c650a424.1605021644.git.michal.simek@xilinx.com commit 98650b0874171cc443251f7b369d3b1544db9d4e Author: Marek Behún Date: Fri Oct 30 03:39:06 2020 +0100 leds: turris-omnia: check for LED_COLOR_ID_RGB instead LED_COLOR_ID_MULTI LED core does not allow LED_COLOR_ID_MULTI for now and instead for RGB LEDs prefers LED_COLOR_ID_RGB. Signed-off-by: Marek Behún Fixes: 77dce3a22e89 ("leds: disallow /sys/class/leds/*:multi:* for now") Signed-off-by: Pavel Machek commit fca050bb3c81dc7e6df9b1d02f3007cbec0dd898 Author: Marek Behún Date: Fri Oct 30 03:39:04 2020 +0100 leds: turris-omnia: fix checkpatch warning Use kstrtoul instead of sscanf to satisfy checkpatch. Signed-off-by: Marek Behún Signed-off-by: Pavel Machek commit 5d47ce1d814e9136b24341fc5dedcd058caef312 Author: Marek Behún Date: Fri Oct 30 03:39:03 2020 +0100 leds: turris-omnia: wrap to 80 columns Although checkpatch changed the max-line-length default to 100 columns, we still prefer 80 columns somewhere. Signed-off-by: Marek Behún Signed-off-by: Pavel Machek commit 493d2e432f38cd366ab78dcec53781a0fddc2822 Author: Marek Behún Date: Fri Oct 30 03:39:02 2020 +0100 leds: turris-omnia: use constants instead of macros for color command Use integer constants directly when building I2C messages for LED color change command, instead of macros. The command is simple enough to understand what is going on even without these names. Signed-off-by: Marek Behún Signed-off-by: Pavel Machek commit db13db9f67fe5049159a05e870daedcee5879f8d Author: Li RongQing Date: Tue Nov 24 15:21:14 2020 +0800 libbpf: Add support for canceling cached_cons advance Add a new function for returning descriptors the user received after an xsk_ring_cons__peek call. After the application has gotten a number of descriptors from a ring, it might not be able to or want to process them all for various reasons. Therefore, it would be useful to have an interface for returning or cancelling a number of them so that they are returned to the ring. This patch adds a new function called xsk_ring_cons__cancel that performs this operation on nb descriptors counted from the end of the batch of descriptors that was received through the peek call. Signed-off-by: Li RongQing Signed-off-by: Daniel Borkmann [ Magnus Karlsson: rewrote changelog ] Acked-by: Magnus Karlsson Link: https://lore.kernel.org/bpf/1606202474-8119-1-git-send-email-lirongqing@baidu.com commit 0fe5ac3d9667176e236d536ff9c1ec30eb2e6080 Author: Alexander Dahl Date: Mon Oct 5 22:34:41 2020 +0200 dt-bindings: leds: Convert pwm to yaml The example was adapted in the following ways: - make use of the now supported 'function' and 'color' properties - remove pwm nodes, those are documented elsewhere - align node names to new dt schema rules and dt recommendations License was not explicitly set before. The license set now is recommended by DT project. Suggested-by: Jacek Anaszewski Signed-off-by: Alexander Dahl Reviewed-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Cc: Peter Ujfalusi [For the license change only:] Acked-by: Russell King Signed-off-by: Pavel Machek commit 6d8d014c7dcf85a79da71ef586d06d03d2cae558 Author: Christophe JAILLET Date: Tue Sep 22 23:05:15 2020 +0200 leds: lp50xx: Fix an error handling path in 'lp50xx_probe_dt()' In case of memory allocation failure, we must release some resources as done in all other error handling paths of the function. 'goto child_out' instead of a direct return so that 'fwnode_handle_put()' is called when we break out of a 'device_for_each_child_node' loop. Fixes: 242b81170fb8 ("leds: lp50xx: Add the LP50XX family of the RGB LED driver") Signed-off-by: Christophe JAILLET Acked-by: Dan Murphy Signed-off-by: Pavel Machek commit 311066aa9ebcd6f1789c829da5039ca02f2dfe46 Author: Yu Kuai Date: Thu Oct 29 17:23:05 2020 +0800 leds: netxbig: add missing put_device() call in netxbig_leds_get_of_pdata() if of_find_device_by_node() succeed, netxbig_leds_get_of_pdata() doesn't have a corresponding put_device(). Thus add jump target to fix the exception handling for this function implementation. Fixes: 2976b1798909 ("leds: netxbig: add device tree binding") Signed-off-by: Yu Kuai Signed-off-by: Pavel Machek commit 20fa40b147bda9b976227c11ea7afb369827e7d4 Merge: 0bd4b96d99108 b6b79dd53082d Author: Michael Ellerman Date: Wed Nov 25 23:17:31 2020 +1100 Merge branch 'fixes' into next Merge our fixes branch, in particular to bring in the changes for the entry/uaccess flush. commit 63a816749d8670e4a92da5aecfb91238821a3d97 Author: Sai Praneeth Prakhya Date: Tue Nov 24 21:06:04 2020 +0800 iommu: Document usage of "/sys/kernel/iommu_groups//type" file The default domain type of an iommu group can be changed by writing to "/sys/kernel/iommu_groups//type" file. Hence, document it's usage and more importantly spell out its limitations. Signed-off-by: Sai Praneeth Prakhya Signed-off-by: Lu Baolu Cc: Christoph Hellwig Cc: Joerg Roedel Cc: Ashok Raj Cc: Will Deacon Cc: Sohil Mehta Cc: Robin Murphy Cc: Jacob Pan Link: https://lore.kernel.org/r/20201124130604.2912899-5-baolu.lu@linux.intel.com Signed-off-by: Will Deacon commit 0b8a96a3120ffe4d3571d93902693c59f90c3d0c Author: Sai Praneeth Prakhya Date: Tue Nov 24 21:06:03 2020 +0800 iommu: Take lock before reading iommu group default domain type "/sys/kernel/iommu_groups//type" file could be read to find out the default domain type of an iommu group. The default domain of an iommu group doesn't change after booting and hence could be read directly. But, after addding support to dynamically change iommu group default domain, the above assumption no longer stays valid. iommu group default domain type could be changed at any time by writing to "/sys/kernel/iommu_groups//type". So, take group mutex before reading iommu group default domain type so that the user wouldn't see stale values or iommu_group_show_type() doesn't try to derefernce stale pointers. Signed-off-by: Sai Praneeth Prakhya Signed-off-by: Lu Baolu Cc: Christoph Hellwig Cc: Joerg Roedel Cc: Ashok Raj Cc: Will Deacon Cc: Sohil Mehta Cc: Robin Murphy Cc: Jacob Pan Link: https://lore.kernel.org/r/20201124130604.2912899-4-baolu.lu@linux.intel.com Signed-off-by: Will Deacon commit 08a27c1c3ecf5e1da193ce5f8fc97c3be16e75f0 Author: Sai Praneeth Prakhya Date: Tue Nov 24 21:06:02 2020 +0800 iommu: Add support to change default domain of an iommu group Presently, the default domain of an iommu group is allocated during boot time and it cannot be changed later. So, the device would typically be either in identity (also known as pass_through) mode or the device would be in DMA mode as long as the machine is up and running. There is no way to change the default domain type dynamically i.e. after booting, a device cannot switch between identity mode and DMA mode. But, assume a use case wherein the user trusts the device and believes that the OS is secure enough and hence wants *only* this device to bypass IOMMU (so that it could be high performing) whereas all the other devices to go through IOMMU (so that the system is protected). Presently, this use case is not supported. It will be helpful if there is some way to change the default domain of an iommu group dynamically. Hence, add such support. A privileged user could request the kernel to change the default domain type of a iommu group by writing to "/sys/kernel/iommu_groups//type" file. Presently, only three values are supported 1. identity: all the DMA transactions from the device in this group are *not* translated by the iommu 2. DMA: all the DMA transactions from the device in this group are translated by the iommu 3. auto: change to the type the device was booted with Note: 1. Default domain of an iommu group with two or more devices cannot be changed. 2. The device in the iommu group shouldn't be bound to any driver. 3. The device shouldn't be assigned to user for direct access. 4. The change request will fail if any device in the group has a mandatory default domain type and the requested one conflicts with that. Please see "Documentation/ABI/testing/sysfs-kernel-iommu_groups" for more information. Signed-off-by: Sai Praneeth Prakhya Signed-off-by: Lu Baolu Cc: Christoph Hellwig Cc: Joerg Roedel Cc: Ashok Raj Cc: Will Deacon Cc: Sohil Mehta Cc: Robin Murphy Cc: Jacob Pan Link: https://lore.kernel.org/r/20201124130604.2912899-3-baolu.lu@linux.intel.com Signed-off-by: Will Deacon commit 28b41e2c6aebd3caf99a77a76843c0175876bc72 Author: Lu Baolu Date: Tue Nov 24 21:06:01 2020 +0800 iommu: Move def_domain type check for untrusted device into core So that the vendor iommu drivers are no more required to provide the def_domain_type callback to always isolate the untrusted devices. Signed-off-by: Lu Baolu Cc: Shameerali Kolothum Thodi Link: https://lore.kernel.org/linux-iommu/243ce89c33fe4b9da4c56ba35acebf81@huawei.com/ Link: https://lore.kernel.org/r/20201124130604.2912899-2-baolu.lu@linux.intel.com Signed-off-by: Will Deacon commit 58a8bb39490db31acbe8f4e24593a88533b4d947 Author: Lu Baolu Date: Tue Nov 24 16:20:57 2020 +0800 iommu/vt-d: Cleanup after converting to dma-iommu ops Some cleanups after converting the driver to use dma-iommu ops. - Remove nobounce option; - Cleanup and simplify the path in domain mapping. Signed-off-by: Lu Baolu Tested-by: Logan Gunthorpe Link: https://lore.kernel.org/r/20201124082057.2614359-8-baolu.lu@linux.intel.com Signed-off-by: Will Deacon commit c588072bba6b54b4b946485228b0409f23cd68a6 Author: Tom Murphy Date: Tue Nov 24 16:20:56 2020 +0800 iommu/vt-d: Convert intel iommu driver to the iommu ops Convert the intel iommu driver to the dma-iommu api. Remove the iova handling and reserve region code from the intel iommu driver. Signed-off-by: Tom Murphy Signed-off-by: Lu Baolu Tested-by: Logan Gunthorpe Link: https://lore.kernel.org/r/20201124082057.2614359-7-baolu.lu@linux.intel.com Signed-off-by: Will Deacon commit c062db039f40e868c371c36afe8d0fac64305b5d Author: Lu Baolu Date: Tue Nov 24 16:20:55 2020 +0800 iommu/vt-d: Update domain geometry in iommu_ops.at(de)tach_dev The iommu-dma constrains IOVA allocation based on the domain geometry that the driver reports. Update domain geometry everytime a domain is attached to or detached from a device. Signed-off-by: Lu Baolu Tested-by: Logan Gunthorpe Link: https://lore.kernel.org/r/20201124082057.2614359-6-baolu.lu@linux.intel.com Signed-off-by: Will Deacon commit 65f746e8285f0a67d43517d86fedb9e29ead49f2 Author: Lu Baolu Date: Tue Nov 24 16:20:54 2020 +0800 iommu: Add quirk for Intel graphic devices in map_sg Combining the sg segments exposes a bug in the Intel i915 driver which causes visual artifacts and the screen to freeze. This is most likely because of how the i915 handles the returned list. It probably doesn't respect the returned value specifying the number of elements in the list and instead depends on the previous behaviour of the Intel iommu driver which would return the same number of elements in the output list as in the input list. [ This has been fixed in the i915 tree, but we agreed to carry this fix temporarily in the iommu tree and revert it before 5.11 is released: https://lore.kernel.org/linux-iommu/20201103105442.GD22888@8bytes.org/ -- Will ] Signed-off-by: Tom Murphy Signed-off-by: Lu Baolu Tested-by: Logan Gunthorpe Link: https://lore.kernel.org/r/20201124082057.2614359-5-baolu.lu@linux.intel.com Signed-off-by: Will Deacon commit 82612d66d51d3bacdd789e31d2e875d2494b7514 Author: Tom Murphy Date: Tue Nov 24 16:20:53 2020 +0800 iommu: Allow the dma-iommu api to use bounce buffers Allow the dma-iommu api to use bounce buffers for untrusted devices. This is a copy of the intel bounce buffer code. Co-developed-by: Lu Baolu Signed-off-by: Tom Murphy Signed-off-by: Lu Baolu Tested-by: Logan Gunthorpe Link: https://lore.kernel.org/r/20201124082057.2614359-4-baolu.lu@linux.intel.com Signed-off-by: Will Deacon commit 230309d08b871e439f8618db3610f2cc9b5f7c72 Author: Tom Murphy Date: Tue Nov 24 16:20:52 2020 +0800 iommu: Add iommu_dma_free_cpu_cached_iovas() Add a iommu_dma_free_cpu_cached_iovas function to allow drivers which use the dma-iommu ops to free cached cpu iovas. Signed-off-by: Tom Murphy Signed-off-by: Lu Baolu Tested-by: Logan Gunthorpe Link: https://lore.kernel.org/r/20201124082057.2614359-3-baolu.lu@linux.intel.com Signed-off-by: Will Deacon commit 2a2b8eaa5b25668a6f717f94b55f4e3aaf87629d Author: Tom Murphy Date: Tue Nov 24 16:20:51 2020 +0800 iommu: Handle freelists when using deferred flushing in iommu drivers Allow the iommu_unmap_fast to return newly freed page table pages and pass the freelist to queue_iova in the dma-iommu ops path. This is useful for iommu drivers (in this case the intel iommu driver) which need to wait for the ioTLB to be flushed before newly free/unmapped page table pages can be freed. This way we can still batch ioTLB free operations and handle the freelists. Signed-off-by: Tom Murphy Signed-off-by: Lu Baolu Tested-by: Logan Gunthorpe Link: https://lore.kernel.org/r/20201124082057.2614359-2-baolu.lu@linux.intel.com Signed-off-by: Will Deacon commit 33f369efbce15e034db4faabeec8502d7d236859 Author: Michael Klein Date: Tue Nov 24 19:37:29 2020 +0100 regulator: mcp16502-regulator: fix spelling mistake Signed-off-by: Michael Klein Link: https://lore.kernel.org/r/20201124183730.2250690-2-michael@fossekall.de Signed-off-by: Mark Brown commit 5b10b62989219aa527ee4fa555d1995a3b70981b Author: Karol Trzcinski Date: Tue Nov 24 20:00:17 2020 +0200 ASoC: SOF: Add `memory_info` file to debugfs This file content describes memory allocation status at run-time, typically to detect memory leaks. Signed-off-by: Karol Trzcinski Reviewed-by: Pierre-Louis Bossart Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20201124180017.2232128-5-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 6dd958955d3053a9c50353e39671622af4b8fba2 Author: Karol Trzcinski Date: Tue Nov 24 20:00:16 2020 +0200 ASoC: SOF: Change section comment for SOF_IPC_TEST_ Section comment should be coherent with IPC prefix from define names. Signed-off-by: Karol Trzcinski Reviewed-by: Pierre-Louis Bossart Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20201124180017.2232128-4-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 2e4f3f9141cc626147eaf6fbb8a92f17fd069553 Author: Karol Trzcinski Date: Tue Nov 24 20:00:15 2020 +0200 ASoC: SOF: Improve code alignment in header.h Each define value in series should be aligned and tabs should be used instead of spaces to follow code-style. Signed-off-by: Karol Trzcinski Reviewed-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20201124180017.2232128-3-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 7f09f79d5cb13186b0f422cf2e1c711c88c92195 Author: Karol Trzcinski Date: Tue Nov 24 20:00:14 2020 +0200 ASoC: SOF: ext_manifest: Parse firmware config dictionary Values given in this dictionary describes used firmware configuration, like feature availability, buffer size limits and similar properties. Signed-off-by: Karol Trzcinski Reviewed-by: Pierre-Louis Bossart Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20201124180017.2232128-2-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 541f29bb064345897843c02a9ac684fddefd87e5 Author: Nicolin Chen Date: Wed Nov 25 02:10:13 2020 -0800 iommu/tegra-smmu: Add PCI support This patch simply adds support for PCI devices. Signed-off-by: Nicolin Chen Tested-by: Dmitry Osipenko Reviewed-by: Dmitry Osipenko Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20201125101013.14953-6-nicoleotsuka@gmail.com Signed-off-by: Will Deacon commit 25938c73cd7918169f80196e288fc3abb81053e5 Author: Nicolin Chen Date: Wed Nov 25 02:10:12 2020 -0800 iommu/tegra-smmu: Rework tegra_smmu_probe_device() The bus_set_iommu() in tegra_smmu_probe() enumerates all clients to call in tegra_smmu_probe_device() where each client searches its DT node for smmu pointer and swgroup ID, so as to configure an fwspec. But this requires a valid smmu pointer even before mc and smmu drivers are probed. So in tegra_smmu_probe() we added a line of code to fill mc->smmu, marking "a bit of a hack". This works for most of clients in the DTB, however, doesn't work for a client that doesn't exist in DTB, a PCI device for example. Actually, if we return ERR_PTR(-ENODEV) in ->probe_device() when it's called from bus_set_iommu(), iommu core will let everything carry on. Then when a client gets probed, of_iommu_configure() in iommu core will search DTB for swgroup ID and call ->of_xlate() to prepare an fwspec, similar to tegra_smmu_probe_device() and tegra_smmu_configure(). Then it'll call tegra_smmu_probe_device() again, and this time we shall return smmu->iommu pointer properly. So we can get rid of tegra_smmu_find() and tegra_smmu_configure() along with DT polling code by letting the iommu core handle every thing, except a problem that we search iommus property in DTB not only for swgroup ID but also for mc node to get mc->smmu pointer to call dev_iommu_priv_set() and return the smmu->iommu pointer. So we'll need to find another way to get smmu pointer. Referencing the implementation of sun50i-iommu driver, of_xlate() has client's dev pointer, mc node and swgroup ID. This means that we can call dev_iommu_priv_set() in of_xlate() instead, so we can simply get smmu pointer in ->probe_device(). This patch reworks tegra_smmu_probe_device() by: 1) Removing mc->smmu hack in tegra_smmu_probe() so as to return ERR_PTR(-ENODEV) in tegra_smmu_probe_device() during stage of tegra_smmu_probe/tegra_mc_probe(). 2) Moving dev_iommu_priv_set() to of_xlate() so we can get smmu pointer in tegra_smmu_probe_device() to replace DTB polling. 3) Removing tegra_smmu_configure() accordingly since iommu core takes care of it. This also fixes a problem that previously we could add clients to iommu groups before iommu core initializes its default domain: ubuntu@jetson:~$ dmesg | grep iommu platform 50000000.host1x: Adding to iommu group 1 platform 57000000.gpu: Adding to iommu group 2 iommu: Default domain type: Translated platform 54200000.dc: Adding to iommu group 3 platform 54240000.dc: Adding to iommu group 3 platform 54340000.vic: Adding to iommu group 4 Though it works fine with IOMMU_DOMAIN_UNMANAGED, but will have warnings if switching to IOMMU_DOMAIN_DMA: iommu: Failed to allocate default IOMMU domain of type 0 for group (null) - Falling back to IOMMU_DOMAIN_DMA iommu: Failed to allocate default IOMMU domain of type 0 for group (null) - Falling back to IOMMU_DOMAIN_DMA Now, bypassing the first probe_device() call from bus_set_iommu() fixes the sequence: ubuntu@jetson:~$ dmesg | grep iommu iommu: Default domain type: Translated tegra-host1x 50000000.host1x: Adding to iommu group 0 tegra-dc 54200000.dc: Adding to iommu group 1 tegra-dc 54240000.dc: Adding to iommu group 1 tegra-vic 54340000.vic: Adding to iommu group 2 nouveau 57000000.gpu: Adding to iommu group 3 Note that dmesg log above is testing with IOMMU_DOMAIN_UNMANAGED. Signed-off-by: Nicolin Chen Tested-by: Dmitry Osipenko Reviewed-by: Dmitry Osipenko Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20201125101013.14953-5-nicoleotsuka@gmail.com Signed-off-by: Will Deacon commit 8750d207dc98d5f743c28ae41d50ebf8887a2106 Author: Nicolin Chen Date: Wed Nov 25 02:10:11 2020 -0800 iommu/tegra-smmu: Use fwspec in tegra_smmu_(de)attach_dev In tegra_smmu_(de)attach_dev() functions, we poll DTB for each client's iommus property to get swgroup ID in order to prepare "as" and enable smmu. Actually tegra_smmu_configure() prepared an fwspec for each client, and added to the fwspec all swgroup IDs of client DT node in DTB. So this patch uses fwspec in tegra_smmu_(de)attach_dev() so as to replace the redundant DT polling code. Signed-off-by: Nicolin Chen Tested-by: Dmitry Osipenko Reviewed-by: Dmitry Osipenko Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20201125101013.14953-4-nicoleotsuka@gmail.com Signed-off-by: Will Deacon commit d5f583bf8654c231b781096bc1a186065cda72b3 Author: Nicolin Chen Date: Wed Nov 25 02:10:10 2020 -0800 iommu/tegra-smmu: Expand mutex protection range This is used to protect potential race condition at use_count. since probes of client drivers, calling attach_dev(), may run concurrently. Signed-off-by: Nicolin Chen Tested-by: Dmitry Osipenko Reviewed-by: Dmitry Osipenko Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20201125101013.14953-3-nicoleotsuka@gmail.com Signed-off-by: Will Deacon commit cf910f61aff3c1c7cac4dc0706811389051c0f98 Author: Nicolin Chen Date: Wed Nov 25 02:10:09 2020 -0800 iommu/tegra-smmu: Unwrap tegra_smmu_group_get The tegra_smmu_group_get was added to group devices in different SWGROUPs and it'd return a NULL group pointer upon a mismatch at tegra_smmu_find_group(), so for most of clients/devices, it very likely would mismatch and need a fallback generic_device_group(). But now tegra_smmu_group_get handles devices in same SWGROUP too, which means that it would allocate a group for every new SWGROUP or would directly return an existing one upon matching a SWGROUP, i.e. any device will go through this function. So possibility of having a NULL group pointer in device_group() is upon failure of either devm_kzalloc() or iommu_group_alloc(). In either case, calling generic_device_group() no longer makes a sense. Especially for devm_kzalloc() failing case, it'd cause a problem if it fails at devm_kzalloc() yet succeeds at a fallback generic_device_group(), because it does not create a group->list for other devices to match. This patch simply unwraps the function to clean it up. Signed-off-by: Nicolin Chen Tested-by: Dmitry Osipenko Reviewed-by: Dmitry Osipenko Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20201125101013.14953-2-nicoleotsuka@gmail.com Signed-off-by: Will Deacon commit 015cbe1f05067cb0374514fcf0a45e17a2b39527 Author: Boris Brezillon Date: Wed Nov 25 11:16:43 2020 +0100 i3c: Resign from my maintainer role I simply don't have time to maintain the I3C subsystem anymore. Alexandre Belloni proposed to take over which I gladly accepted. Signed-off-by: Boris Brezillon Acked-by: Alexandre Belloni Link: https://lore.kernel.org/linux-i3c/20201125101643.461658-1-boris.brezillon@collabora.com commit 8e3457372c6acd0a9310373de203c2a84b457418 Author: Colin Ian King Date: Tue Nov 24 12:35:04 2020 +0000 i3c/master: Fix uninitialized variable next_addr The variable next_addr is not initialized and is being used in a call to i3c_master_get_free_addr as a starting point to find the next address. Fix this by initializing next_addr to 0 to avoid an uninitialized garbage starting address from being used. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: 9ad9a52cce28 ("i3c/master: introduce the mipi-i3c-hci driver") Signed-off-by: Colin Ian King Acked-by: Nicolas Pitre Signed-off-by: Boris Brezillon Link: https://lore.kernel.org/linux-i3c/20201124123504.396249-1-colin.king@canonical.com commit bf8975837dac156c33a4d15d46602700998cb6dd Author: Maarten Lankhorst Date: Tue Nov 24 12:57:07 2020 +0100 dma-buf/dma-resv: Respect num_fences when initializing the shared fence list. We hardcode the maximum number of shared fences to 4, instead of respecting num_fences. Use a minimum of 4, but more if num_fences is higher. This seems to have been an oversight when first implementing the api. Fixes: 04a5faa8cbe5 ("reservation: update api and add some helpers") Cc: # v3.17+ Reported-by: Niranjana Vishwanathapura Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20201124115707.406917-1-maarten.lankhorst@linux.intel.com commit a25ba1021a6275941c44c639ad76a83248182022 Author: Andy Shevchenko Date: Wed Oct 28 16:55:20 2020 +0100 media: ipu3-cio2: Use macros from mm.h There are few nice macros in mm.h, some of which we may use here. Signed-off-by: Andy Shevchenko Reviewed-by: Bingbu Cao Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 47b8520997a8ec4a1d2b322c61b59ebe078764a9 Author: Pierre-Louis Bossart Date: Tue Nov 24 09:33:18 2020 +0800 soundwire: bus: only clear valid DPN interrupts Mirror the changes made for DP0 and don't modify reserved fields. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20201124013318.8963-6-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit b35991de7a59a06a4ea5aee90b4926f01a72f71b Author: Pierre-Louis Bossart Date: Tue Nov 24 09:33:17 2020 +0800 soundwire: bus: only clear valid DP0 interrupts We should only access the fields that are relevant for DP0, and never write to reserved or read-only SDCA_CASCADE fields. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20201124013318.8963-5-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 2fb94784952e4b290c392b74c2c67b4afa672523 Author: Pierre-Louis Bossart Date: Tue Nov 24 09:33:16 2020 +0800 soundwire: registers: add definitions for clearable interrupt fields DP0 has reserved fields and the read-only SDCA_CASCADE bit. We should not try to write values in these fields, so add a formal definition for clearable interrupts to be used in DP0 interrupt handling. DPN also has reserved fields so add definitions for clearable interrupts as well. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20201124013318.8963-4-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 7ffaba042e0e997832032b2d7b062dc27a7ebb2d Author: Pierre-Louis Bossart Date: Tue Nov 24 09:33:15 2020 +0800 soundwire: bus: reset slave_notify status at each loop The code loops multiple times to deal with pending interrupts, but we never reset the slave_notify status. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20201124013318.8963-3-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 6e06a85556f9725865af91c9fe502c9669518ed5 Author: Pierre-Louis Bossart Date: Tue Nov 24 09:33:14 2020 +0800 soundwire: bus: add comments to explain interrupt loop filter The interrupt handling in SoundWire requires software to re-read the interrupt status after clearing an interrupt. In case the interrupt is still outstanding, the code in bus.c will loop a number of times, however that loop is limited to the interrupts detected in the first read. This strategy helps meet SoundWire requirements without remaining forever in an interrupt handler. Add a couple of comments to document this design. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20201124013318.8963-2-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 59e2e27d227a0a4e7ec0e22c63ca36a5ad1ab438 Author: Wedson Almeida Filho Date: Sat Nov 21 01:55:09 2020 +0000 bpf: Refactor check_cfg to use a structured loop. The current implementation uses a number of gotos to implement a loop and different paths within the loop, which makes the code less readable than it would be with an explicit while-loop. This patch also replaces a chain of if/if-elses keyed on the same expression with a switch statement. No change in behaviour is intended. Signed-off-by: Wedson Almeida Filho Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201121015509.3594191-1-wedsonaf@google.com commit cc563f8f769b9fe4bbe18dcd3cbb382a49cf3585 Author: Bjorn Andersson Date: Tue Nov 24 20:38:31 2020 -0600 arm64: defconfig: Enable Qualcomm PON driver The PON block in the PMIC provides, among other things, support for "reboot reason", power key and reset "key" handling. Let's enable the driver for this block. Reviewed-by: Vinod Koul Link: https://lore.kernel.org/r/20201125023831.99774-1-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit ba59eae723857257a791618092d8022ad82efaa4 Author: Alex Shi Date: Fri Nov 6 16:31:22 2020 +0800 audit: fix macros warnings Some unused macros could cause gcc warning: kernel/audit.c:68:0: warning: macro "AUDIT_UNINITIALIZED" is not used [-Wunused-macros] kernel/auditsc.c:104:0: warning: macro "AUDIT_AUX_IPCPERM" is not used [-Wunused-macros] kernel/auditsc.c:82:0: warning: macro "AUDITSC_INVALID" is not used [-Wunused-macros] AUDIT_UNINITIALIZED and AUDITSC_INVALID are still meaningful and should be in incorporated. Just remove AUDIT_AUX_IPCPERM. Thanks comments from Richard Guy Briggs and Paul Moore. Signed-off-by: Alex Shi Cc: Paul Moore Cc: Richard Guy Briggs Cc: Eric Paris Cc: linux-audit@redhat.com Cc: linux-kernel@vger.kernel.org Signed-off-by: Paul Moore commit dba6bc51975b54b0778678d581df5b423a5a0d81 Author: Thara Gopinath Date: Thu Nov 19 10:52:29 2020 -0500 clk: qcom: rpmh: Add CE clock on sdm845. Qualcomm CE clock resource that is managed by BCM is required by crypto driver to access the core clock. Reviewed-by: Bjorn Andersson Signed-off-by: Thara Gopinath Link: https://lore.kernel.org/r/20201119155233.3974286-3-thara.gopinath@linaro.org Signed-off-by: Stephen Boyd commit 8d5d3c7a5bdd32044f595575f1aa16cd3bdd93a8 Author: Thara Gopinath Date: Thu Nov 19 10:52:28 2020 -0500 dt-bindings: clock: Add entry for crypto engine RPMH clock resource Add clock id forc CE clock resource which is required to bring up the crypto engine on sdm845. Reviewed-by: Bjorn Andersson Signed-off-by: Thara Gopinath Link: https://lore.kernel.org/r/20201119155233.3974286-2-thara.gopinath@linaro.org Signed-off-by: Stephen Boyd commit 5903f61e035320104394f721f74cd22171636f63 Author: Gabriel Krisman Bertazi Date: Mon Nov 23 10:54:58 2020 -0500 entry: Fix boot for !CONFIG_GENERIC_ENTRY A copy-pasta mistake tries to set SYSCALL_WORK flags instead of TIF flags for !CONFIG_GENERIC_ENTRY. Also, add safeguards to catch this at compilation time. Fixes: 3136b93c3fb2 ("entry: Expose helpers to migrate TIF to SYSCALL_WORK flags") Reported-by: Naresh Kamboju Suggested-by: Jann Horn Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Thomas Gleixner Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/87a6v8qd9p.fsf_-_@collabora.com commit 470dfd808ac4135f313967f9d3e107b87fc6a0b3 Author: Sven Van Asbroeck Date: Mon Nov 23 14:15:29 2020 -0500 lan743x: replace polling loop by wait_event_timeout() The driver's ISR sends a 'software interrupt' event to the probe() thread using the following method: - probe(): write 0 to flag, enable s/w interrupt - probe(): poll on flag, relax using usleep_range() - ISR : write 1 to flag Replace with wake_up() / wait_event_timeout(). Besides being easier to get right, this abstraction has better timing and memory consistency properties. Tested-by: Sven Van Asbroeck # lan7430 Signed-off-by: Sven Van Asbroeck Link: https://lore.kernel.org/r/20201123191529.14908-2-TheSven73@gmail.com Signed-off-by: Jakub Kicinski commit c31799bae8511b0947af114f38bd6eb9ba990bfe Author: Sven Van Asbroeck Date: Mon Nov 23 14:15:28 2020 -0500 lan743x: clean up software_isr function For no apparent reason, this function reads the INT_STS register, and checks if the software interrupt bit is set. These things have already been carried out by this function's only caller. Clean up by removing the redundant code. Tested-by: Sven Van Asbroeck # lan7430 Signed-off-by: Sven Van Asbroeck Link: https://lore.kernel.org/r/20201123191529.14908-1-TheSven73@gmail.com Signed-off-by: Jakub Kicinski commit 4a4b8721f1a5e4b01e45b3153c68d5a1014b25de Author: Eric Biggers Date: Mon Nov 16 19:26:26 2020 -0800 fscrypt: simplify master key locking The stated reasons for separating fscrypt_master_key::mk_secret_sem from the standard semaphore contained in every 'struct key' no longer apply. First, due to commit a992b20cd4ee ("fscrypt: add fscrypt_prepare_new_inode() and fscrypt_set_context()"), fscrypt_get_encryption_info() is no longer called from within a filesystem transaction. Second, due to commit d3ec10aa9581 ("KEYS: Don't write out to userspace while holding key semaphore"), the semaphore for the "keyring" key type no longer ranks above page faults. That leaves performance as the only possible reason to keep the separate mk_secret_sem. Specifically, having mk_secret_sem reduces the contention between setup_file_encryption_key() and FS_IOC_{ADD,REMOVE}_ENCRYPTION_KEY. However, these ioctls aren't executed often, so this doesn't seem to be worth the extra complexity. Therefore, simplify the locking design by just using key->sem instead of mk_secret_sem. Link: https://lore.kernel.org/r/20201117032626.320275-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 234f1b7f8daf112655c87f75ae8932564f871225 Author: Eric Biggers Date: Tue Nov 17 23:56:09 2020 -0800 fscrypt: remove unnecessary calls to fscrypt_require_key() In an encrypted directory, a regular dentry (one that doesn't have the no-key name flag) can only be created if the directory's encryption key is available. Therefore the calls to fscrypt_require_key() in __fscrypt_prepare_link() and __fscrypt_prepare_rename() are unnecessary, as these functions already check that the dentries they're given aren't no-key names. Remove these unnecessary calls to fscrypt_require_key(). Link: https://lore.kernel.org/r/20201118075609.120337-6-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 76786a0f083473de31678bdb259a3d4167cf756d Author: Eric Biggers Date: Tue Nov 17 23:56:08 2020 -0800 ubifs: prevent creating duplicate encrypted filenames As described in "fscrypt: add fscrypt_is_nokey_name()", it's possible to create a duplicate filename in an encrypted directory by creating a file concurrently with adding the directory's encryption key. Fix this bug on ubifs by rejecting no-key dentries in ubifs_create(), ubifs_mkdir(), ubifs_mknod(), and ubifs_symlink(). Note that ubifs doesn't actually report the duplicate filenames from readdir, but rather it seems to replace the original dentry with a new one (which is still wrong, just a different effect from ext4). On ubifs, this fixes xfstest generic/595 as well as the new xfstest I wrote specifically for this bug. Fixes: f4f61d2cc6d8 ("ubifs: Implement encrypted filenames") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20201118075609.120337-5-ebiggers@kernel.org Signed-off-by: Eric Biggers commit bfc2b7e8518999003a61f91c1deb5e88ed77b07d Author: Eric Biggers Date: Tue Nov 17 23:56:07 2020 -0800 f2fs: prevent creating duplicate encrypted filenames As described in "fscrypt: add fscrypt_is_nokey_name()", it's possible to create a duplicate filename in an encrypted directory by creating a file concurrently with adding the directory's encryption key. Fix this bug on f2fs by rejecting no-key dentries in f2fs_add_link(). Note that the weird check for the current task in f2fs_do_add_link() seems to make this bug difficult to reproduce on f2fs. Fixes: 9ea97163c6da ("f2fs crypto: add filename encryption for f2fs_add_link") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20201118075609.120337-4-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 75d18cd1868c2aee43553723872c35d7908f240f Author: Eric Biggers Date: Tue Nov 17 23:56:06 2020 -0800 ext4: prevent creating duplicate encrypted filenames As described in "fscrypt: add fscrypt_is_nokey_name()", it's possible to create a duplicate filename in an encrypted directory by creating a file concurrently with adding the directory's encryption key. Fix this bug on ext4 by rejecting no-key dentries in ext4_add_entry(). Note that the duplicate check in ext4_find_dest_de() sometimes prevented this bug. However in many cases it didn't, since ext4_find_dest_de() doesn't examine every dentry. Fixes: 4461471107b7 ("ext4 crypto: enable filename encryption") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20201118075609.120337-3-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 159e1de201b6fca10bfec50405a3b53a561096a8 Author: Eric Biggers Date: Tue Nov 17 23:56:05 2020 -0800 fscrypt: add fscrypt_is_nokey_name() It's possible to create a duplicate filename in an encrypted directory by creating a file concurrently with adding the encryption key. Specifically, sys_open(O_CREAT) (or sys_mkdir(), sys_mknod(), or sys_symlink()) can lookup the target filename while the directory's encryption key hasn't been added yet, resulting in a negative no-key dentry. The VFS then calls ->create() (or ->mkdir(), ->mknod(), or ->symlink()) because the dentry is negative. Normally, ->create() would return -ENOKEY due to the directory's key being unavailable. However, if the key was added between the dentry lookup and ->create(), then the filesystem will go ahead and try to create the file. If the target filename happens to already exist as a normal name (not a no-key name), a duplicate filename may be added to the directory. In order to fix this, we need to fix the filesystems to prevent ->create(), ->mkdir(), ->mknod(), and ->symlink() on no-key names. (->rename() and ->link() need it too, but those are already handled correctly by fscrypt_prepare_rename() and fscrypt_prepare_link().) In preparation for this, add a helper function fscrypt_is_nokey_name() that filesystems can use to do this check. Use this helper function for the existing checks that fs/crypto/ does for rename and link. Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20201118075609.120337-2-ebiggers@kernel.org Signed-off-by: Eric Biggers commit da43f0aadd5d2e49e2e6ee21ae5b3ee3e0a3f14a Merge: 9a71baf719968 039fbc47f9f1e Author: Jakub Kicinski Date: Tue Nov 24 15:09:48 2020 -0800 Merge branch 'mvneta-access-skb_shared_info-only-on-last-frag' Lorenzo Bianconi says: ==================== mvneta: access skb_shared_info only on last frag Build skb_shared_info on mvneta_rx_swbm stack and sync it to xdp_buff skb_shared_info area only on the last fragment. Avoid avoid unnecessary xdp_buff initialization in mvneta_rx_swbm routine. This a preliminary series to complete xdp multi-buff in mvneta driver. ==================== Link: https://lore.kernel.org/r/cover.1605889258.git.lorenzo@kernel.org Signed-off-by: Jakub Kicinski commit 039fbc47f9f1ec4fb2a25aa121750f84ae8b1332 Author: Lorenzo Bianconi Date: Fri Nov 20 18:05:44 2020 +0100 net: mvneta: alloc skb_shared_info on the mvneta_rx_swbm stack Build skb_shared_info on mvneta_rx_swbm stack and sync it to xdp_buff skb_shared_info area only on the last fragment. Leftover cache miss in mvneta_swbm_rx_frame will be addressed introducing mb bit in xdp_buff/xdp_frame struct Signed-off-by: Lorenzo Bianconi Reviewed-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit eb33f11864fbbcf976ddca4a96fca02d5e4b3733 Author: Lorenzo Bianconi Date: Fri Nov 20 18:05:43 2020 +0100 net: mvneta: move skb_shared_info in mvneta_xdp_put_buff caller Pass skb_shared_info pointer from mvneta_xdp_put_buff caller. This is a preliminary patch to reduce accesses to skb_shared_info area and reduce cache misses. Remove napi parameter in mvneta_xdp_put_buff signature since it is always run in NAPI context Signed-off-by: Lorenzo Bianconi Reviewed-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit 05c748f7d09ab1104b309a110f61560945f73f8b Author: Lorenzo Bianconi Date: Fri Nov 20 18:05:42 2020 +0100 net: mvneta: avoid unnecessary xdp_buff initialization Explicitly initialize mandatory fields defining xdp_buff struct in mvneta_rx_swbm routine Signed-off-by: Lorenzo Bianconi Reviewed-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit bfc1b6597f58040ff9116f5acc84ccd6367e2d59 Author: Rikard Falkeborn Date: Tue Nov 24 22:29:54 2020 +0100 samples: qmi: Constify static qmi ops The only usage of qmi_sample_handlers[] and lookup_ops is to pass their addresses to qmi_handle_init() which accepts const pointers to both qmi_ops and qmi_msg_handler. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20201124212954.17750-1-rikard.falkeborn@gmail.com Signed-off-by: Bjorn Andersson commit 607c543f939d8ca6fed7afe90b3a8d6f6684dd17 Author: Andrii Nakryiko Date: Fri Nov 20 23:08:29 2020 -0800 bpf: Sanitize BTF data pointer after module is loaded Given .BTF section is not allocatable, it will get trimmed after module is loaded. BPF system handles that properly by creating an independent copy of data. But prevent any accidental misused by resetting the pointer to BTF data. Fixes: 36e68442d1af ("bpf: Load and verify kernel module BTFs") Suggested-by: Jessica Yu Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Jessica Yu Cc: Greg Kroah-Hartman Link: https://lore.kernel.org/bpf/20201121070829.2612884-2-andrii@kernel.org commit 9a71baf719968576326c6a6bc0a57af0e6413c50 Author: Stefan Chulski Date: Mon Nov 23 19:54:33 2020 +0200 net: mvpp2: divide fifo for dts-active ports only Tx/Rx FIFO is a HW resource limited by total size, but shared by all ports of same CP110 and impacting port-performance. Do not divide the FIFO for ports which are not enabled in DTS, so active ports could have more FIFO. No change in FIFO allocation if all 3 ports on the communication processor enabled in DTS. The active port mapping should be done in probe before FIFO-init. Signed-off-by: Stefan Chulski Reviewed-by: Russell King Link: https://lore.kernel.org/r/1606154073-28267-1-git-send-email-stefanc@marvell.com Signed-off-by: Jakub Kicinski commit e732b538f4557cd0a856bbce3cde55d2dfef3b03 Author: Andrii Nakryiko Date: Fri Nov 20 23:08:28 2020 -0800 kbuild: Skip module BTF generation for out-of-tree external modules In some modes of operation, Kbuild allows to build modules without having vmlinux image around. In such case, generation of module BTF is impossible. This patch changes the behavior to emit a warning about impossibility of generating kernel module BTF, instead of breaking the build. This is especially important for out-of-tree external module builds. In vmlinux-less mode: $ make clean $ make modules_prepare $ touch drivers/acpi/button.c $ make M=drivers/acpi ... CC [M] drivers/acpi/button.o MODPOST drivers/acpi/Module.symvers LD [M] drivers/acpi/button.ko BTF [M] drivers/acpi/button.ko Skipping BTF generation for drivers/acpi/button.ko due to unavailability of vmlinux ... $ readelf -S ~/linux-build/default/drivers/acpi/button.ko | grep BTF -A1 ... empty ... Now with normal build: $ make all ... LD [M] drivers/acpi/button.ko BTF [M] drivers/acpi/button.ko ... $ readelf -S ~/linux-build/default/drivers/acpi/button.ko | grep BTF -A1 [60] .BTF PROGBITS 0000000000000000 00029310 000000000000ab3f 0000000000000000 0 0 1 Fixes: 5f9ae91f7c0d ("kbuild: Build kernel module BTFs if BTF is enabled and pahole supports it") Reported-by: Bruce Allan Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Cc: Jessica Yu Cc: Greg Kroah-Hartman Cc: Masahiro Yamada Link: https://lore.kernel.org/bpf/20201121070829.2612884-1-andrii@kernel.org commit 3c9c31c2523ecd5b609a2eecb5ad524ef4fc931c Author: Sibi Sankar Date: Tue Nov 24 11:51:16 2020 +0530 arm64: dts: qcom: sc7180: Add DDR/L3 votes for the pro variant Add DDR/L3 bandwidth votes for the pro variant of SC7180 SoC, as it support frequencies upto 2.5 GHz. Reviewed-by: Douglas Anderson Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/1606198876-3515-2-git-send-email-sibis@codeaurora.org Signed-off-by: Bjorn Andersson commit 8fd01e01fd6f8ba67e4ed8c5be0ab76d06156287 Author: Sibi Sankar Date: Tue Nov 24 11:51:15 2020 +0530 arm64: dts: qcom: sc7180-lite: Tweak DDR/L3 scaling on SC7180-lite Tweak the DDR/L3 bandwidth votes on the lite variant of the SC7180 SoC since the gold cores only support frequencies upto 2.1 GHz. Reviewed-by: Douglas Anderson Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/1606198876-3515-1-git-send-email-sibis@codeaurora.org Signed-off-by: Bjorn Andersson commit d4b85bc550f49e46cf1d945a342d316c814e94c5 Author: Terry Hsiao Date: Mon Nov 16 16:30:14 2020 +0800 arm64: dts: qcom: sc7180-trogdor: add "pen-insert" label for trogdor Add a label to the "pen-insert" node in sc7180-trogdor.dtsi Reviewed-by: Douglas Anderson Signed-off-by: Terry Hsiao Link: https://lore.kernel.org/r/20201116083014.547-1-terry_hsiao@compal.corp-partner.google.com Signed-off-by: Bjorn Andersson commit bb06eb3607e97842b3475446069e177ed0e6b26b Author: Antony Wang Date: Fri Oct 30 08:48:43 2020 -0700 arm64: qcom: sc7180: trogdor: Add ADC nodes and thermal zone for charger thermistor Trogdor has a thermistor to monitor the temperature of the charger IC. Add the ADC (monitor) nodes and a thermal zone for this thermistor. Signed-off-by: Antony Wang [mka: tweaked commit message] Signed-off-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/20201030084840.1.If389f211a8532b83095ff8c66ec181424440f8d6@changeid Signed-off-by: Bjorn Andersson commit 7ee3eae868335626f83f551daee2fa98735acb74 Author: Jishnu Prakash Date: Thu Oct 8 18:10:25 2020 +0530 arm64: dts: qcom: pm6150x: add ADC_TM definitions Add ADC_TM peripheral definitions for PM6150 and PM6150L. Add ADC peripheral definition for PM6150l, which is needed for ADC_TM. Signed-off-by: Jishnu Prakash Link: https://lore.kernel.org/r/1602160825-10414-2-git-send-email-jprakash@codeaurora.org Signed-off-by: Bjorn Andersson commit 2f1cce214b237143359202abd83575b91130260f Author: Lorenzo Bianconi Date: Mon Nov 23 16:45:46 2020 +0100 net: page_pool: Add page_pool_put_page_bulk() to page_pool.rst Introduce page_pool_put_page_bulk() entry into the API section of page_pool.rst Acked-by: Ilias Apalodimas Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/a6a5141b4d7b7b71fa7778b16b48f80095dd3233.1606146163.git.lorenzo@kernel.org Signed-off-by: Jakub Kicinski commit 1d155dfdf50efc2b0793bce93c06d1a5b23d0877 Author: Heiner Kallweit Date: Sat Nov 21 00:22:20 2020 +0100 net: warn if gso_type isn't set for a GSO SKB In bug report [0] a warning in r8169 driver was reported that was caused by an invalid GSO SKB (gso_type was 0). See [1] for a discussion about this issue. Still the origin of the invalid GSO SKB isn't clear. It shouldn't be a network drivers task to check for invalid GSO SKB's. Also, even if issue [0] can be fixed, we can't be sure that a similar issue doesn't pop up again at another place. Therefore let gso_features_check() check for such invalid GSO SKB's. [0] https://bugzilla.kernel.org/show_bug.cgi?id=209423 [1] https://www.spinics.net/lists/netdev/msg690794.html Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/97c78d21-7f0b-d843-df17-3589f224d2cf@gmail.com Signed-off-by: Jakub Kicinski commit 1c26ac6ab3ce47ee2e6342373681dedbb97e21a3 Author: Andrei Matei Date: Sat Nov 21 21:22:05 2020 -0500 selftest/bpf: Fix rst formatting in readme A couple of places in the readme had invalid rst formatting causing the rendering to be off. This patch fixes them with minimal edits. Signed-off-by: Andrei Matei Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20201122022205.57229-2-andreimatei1@gmail.com commit 05a98d7672731aeb5f9837b35cc7fe70444e70bd Author: Andrei Matei Date: Sat Nov 21 21:22:04 2020 -0500 selftest/bpf: Fix link in readme The link was bad because of invalid rst; it was pointing to itself and was rendering badly. Signed-off-by: Andrei Matei Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20201122022205.57229-1-andreimatei1@gmail.com commit be419fcacf251423afc530b8964a355eb96e4040 Author: Colin Ian King Date: Mon Nov 23 10:34:52 2020 +0000 net: hns3: fix spelling mistake "memroy" -> "memory" There are spelling mistakes in two dev_err messages. Fix them. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20201123103452.197708-1-colin.king@canonical.com Signed-off-by: Jakub Kicinski commit 6c446b63920881994538afe42c72b92872c246c4 Merge: 23c01ed3b0def 84e8feeadcf04 Author: Jakub Kicinski Date: Tue Nov 24 12:15:00 2020 -0800 Merge branch 'mlxsw-add-support-for-blackhole-nexthops' Ido Schimmel says: ==================== mlxsw: Add support for blackhole nexthops This patch set adds support for blackhole nexthops in mlxsw. These nexthops are exactly the same as other nexthops, but instead of forwarding packets to an egress router interface (RIF), they are programmed to silently drop them. Patches #1-#4 are preparations. Patch #5 adds support for blackhole nexthops and removes the check that prevented them from being programmed. Patch #6 adds a selftests over mlxsw which tests that blackhole nexthops can be programmed and are marked as offloaded. Patch #7 extends the existing nexthop forwarding test to also test blackhole functionality. Patches #8-#10 add support for a new packet trap ('blackhole_nexthop') which should be triggered whenever packets are dropped by a blackhole nexthop. Obviously, by default, the trap action is set to 'drop' so that dropped packets will not be reported. ==================== Link: https://lore.kernel.org/r/20201123071230.676469-1-idosch@idosch.org Signed-off-by: Jakub Kicinski commit 84e8feeadcf048903e65b7d82769c58576c506b0 Author: Ido Schimmel Date: Mon Nov 23 09:12:30 2020 +0200 selftests: mlxsw: Add blackhole_nexthop trap test Test that packets hitting a blackhole nexthop are trapped to the CPU when the trap is enabled. Test that packets are not reported when the trap is disabled. Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit 37b50e556ef59e7231e8ef71b28b748b0537972b Author: Ido Schimmel Date: Mon Nov 23 09:12:29 2020 +0200 mlxsw: spectrum_trap: Add blackhole_nexthop trap Register with devlink the blackhole_nexthop trap so that mlxsw will be able to report packets dropped due to a blackhole nexthop. The internal trap identifier is "DISCARD_ROUTER3", which traps packets dropped in the adjacency table. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit f0a5013e29cbfe55b3e26b7548a741d88a779d91 Author: Ido Schimmel Date: Mon Nov 23 09:12:28 2020 +0200 devlink: Add blackhole_nexthop trap Add a packet trap to report packets that were dropped due to a blackhole nexthop. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit 1beaff779f783268dcc61c0a8fbd16e9c8b0abfa Author: Ido Schimmel Date: Mon Nov 23 09:12:27 2020 +0200 selftests: forwarding: Add blackhole nexthops tests Test that IPv4 and IPv6 ping fail when the route is using a blackhole nexthop or a group with a blackhole nexthop. Test that ping passes when the route starts using a valid nexthop. Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit 24eb2a02a68c98d46878214f46f855d934dc73ff Author: Ido Schimmel Date: Mon Nov 23 09:12:26 2020 +0200 selftests: mlxsw: Add blackhole nexthop configuration tests Test the mlxsw allows blackhole nexthops to be installed and that the nexthops are marked as offloaded. Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit 68e92ad855cfa5e9b8db8b875e948b1032dfc2e8 Author: Ido Schimmel Date: Mon Nov 23 09:12:25 2020 +0200 mlxsw: spectrum_router: Add support for blackhole nexthops Add support for blackhole nexthops by programming them to the adjacency table with a discard action. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit 18c4b79d28f9547459ab47d9c93dca03620d1048 Author: Ido Schimmel Date: Mon Nov 23 09:12:24 2020 +0200 mlxsw: spectrum_router: Resolve RIF from nexthop struct instead of neighbour The two are the same, but for blackhole nexthops we will not have an associated neighbour struct, so resolve the RIF from the nexthop struct itself instead. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit 919f6aaa3ae95f98ca57c1c1dd4158a30a3bf3ea Author: Ido Schimmel Date: Mon Nov 23 09:12:23 2020 +0200 mlxsw: spectrum_router: Use loopback RIF for unresolved nexthops Now that the driver creates a loopback RIF during its initialization, it can be used to program the adjacency entries for unresolved nexthops instead of other RIFs. The loopback RIF is guaranteed to exist for the entire life time of the driver, unlike other RIFs that come and go. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit 52d45575ec3cdb5918143832b07aff2c5399f01d Author: Ido Schimmel Date: Mon Nov 23 09:12:22 2020 +0200 mlxsw: spectrum_router: Use different trap identifier for unresolved nexthops Unresolved nexthops are currently written to the adjacency table with a discard action. Packets hitting such entries are trapped to the CPU via the 'DISCARD_ROUTER3' trap which can be enabled or disabled on demand, but is always enabled in order to ensure the kernel can resolve the unresolved neighbours. This trap will be needed for blackhole nexthops support. Therefore, move unresolved nexthops to explicitly program the adjacency entries with a trap action and a different trap identifier, 'RTR_EGRESS0'. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit 07c78536efc5ccb90d55fd8c52bc785caffeb520 Author: Ido Schimmel Date: Mon Nov 23 09:12:21 2020 +0200 mlxsw: spectrum_router: Create loopback RIF during initialization Up until now RIFs (router interfaces) were created on demand (e.g., when an IP address was added to a netdev). However, sometimes the device needs to be provided with a RIF when one might not be available. For example, adjacency entries that drop packets need to be programmed with an egress RIF despite the RIF not being used to forward packets. Create such a RIF during initialization so that it could be used later on to support blackhole nexthops. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit 23c01ed3b0def0e28cca141d11d9e35a7f7acf2f Merge: d5a05e69ac6e4 d7d775b1ffb15 Author: Jakub Kicinski Date: Tue Nov 24 12:05:58 2020 -0800 Merge tag 'rxrpc-next-20201123' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Prelude to gssapi support Here are some patches that do some reorganisation of the security class handling in rxrpc to allow implementation of the RxGK security class that will allow AF_RXRPC to use GSSAPI-negotiated tokens and better crypto. The RxGK security class is not included in this patchset. It does the following things: (1) Add a keyrings patch to provide the original key description, as provided to add_key(), to the payload preparser so that it can interpret the content on that basis. Unfortunately, the rxrpc_s key type wasn't written to interpret its payload as anything other than a string of bytes comprising a key, but for RxGK, more information is required as multiple Kerberos enctypes are supported. (2) Remove the rxk5 security class key parsing. The rxk5 class never got rolled out in OpenAFS and got replaced with rxgk. (3) Support the creation of rxrpc keys with multiple tokens of different types. If some types are not supported, the ENOPKG error is suppressed if at least one other token's type is supported. (4) Punt the handling of server keys (rxrpc_s type) to the appropriate security class. (5) Organise the security bits in the rxrpc_connection struct into a union to make it easier to override for other classes. (6) Move some bits from core code into rxkad that won't be appropriate to rxgk. * tag 'rxrpc-next-20201123' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: rxrpc: Ask the security class how much space to allow in a packet rxrpc: rxkad: Don't use pskb_pull() to advance through the response packet rxrpc: Organise connection security to use a union rxrpc: Don't reserve security header in Tx DATA skbuff rxrpc: Merge prime_packet_security into init_connection_security rxrpc: Fix example key name in a comment rxrpc: Ignore unknown tokens in key payload unless no known tokens rxrpc: Make the parsing of xdr payloads more coherent rxrpc: Allow security classes to give more info on server keys rxrpc: Don't leak the service-side session key to userspace rxrpc: Hand server key parsing off to the security class rxrpc: Split the server key type (rxrpc_s) into its own file rxrpc: Don't retain the server key in the connection rxrpc: Support keys with multiple authentication tokens rxrpc: List the held token types in the key description in /proc/keys rxrpc: Remove the rxk5 security class as it's now defunct keys: Provide the original description to the key preparser ==================== Link: https://lore.kernel.org/r/160616220405.830164.2239716599743995145.stgit@warthog.procyon.org.uk Signed-off-by: Jakub Kicinski commit 95e6f8467c83c4074a6f6b47bad00653549ff90a Author: Bjorn Andersson Date: Sun Nov 22 23:23:05 2020 -0600 arm64: dts: qcom: sdm845: Limit ipa iommu streams The Android and Windows firmware does not accept the use of 3 as a mask to cover the IPA streams. But with 0x721 being related to WiFi and 0x723 being unsed the mapping can be reduced to just cover 0x720 and 0x722, which is accepted. Acked-by: Alex Elder Tested-by: Alex Elder Fixes: e9e89c45bfeb ("arm64: dts: sdm845: add IPA iommus property") Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20201123052305.157686-1-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit a14c6b0eef771c017c3549490fc321f3cd5c0e32 Author: Lukas F. Hartmann Date: Tue Nov 24 18:26:04 2020 +0100 panel-simple: add Innolux N125HCE-GN1 The Innolux N125HCE-GN1 display is used in the MNT Reform 2.0 laptop, attached via eDP to a SN65DSI86 MIPI-DSI to eDP bridge. Signed-off-by: Lukas F. Hartmann Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201124172604.981746-1-lukas@mntre.com commit bcca3e0328fa675b7d0552da15adeef038cace79 Author: Lukas F. Hartmann Date: Tue Nov 24 18:26:06 2020 +0100 dt-bindings: display/panel: add Innolux N125HCE-GN1 The Innolux N125HCE-GN1 display is used in the MNT Reform 2.0 laptop, attached via eDP to a SN65DSI86 MIPI-DSI to eDP bridge. This patch contains the DT binding for "innolux,n125hce-gn1". Signed-off-by: Lukas F. Hartmann Signed-off-by: Sam Ravnborg [reorder so comments comes before the compatible] Link: https://patchwork.freedesktop.org/patch/msgid/20201124172604.981746-2-lukas@mntre.com commit 5d051f37f49d5bf04dca15fadea3a90a6a6f0f15 Author: Krzysztof Kozlowski Date: Fri Nov 20 17:23:03 2020 +0100 dmaengine: ti: drop of_match_ptr and mark of_device_id table as maybe unused The driver can match only via the DT table so the main table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant here). The secondary match of_device_id tables (passed to of_match_node) should be marked as maybe unused to fix compile testing (!CONFIG_OF on x86_64) warnings: drivers/dma/ti/dma-crossbar.c:125:34: warning: ‘ti_am335x_master_match’ defined but not used [-Wunused-const-variable=] drivers/dma/ti/dma-crossbar.c:22:34: warning: ‘ti_dma_xbar_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201120162303.482126-6-krzk@kernel.org Signed-off-by: Vinod Koul commit 25d39b590dac0b8230cc3663c9f8f1a3a21831fd Author: Krzysztof Kozlowski Date: Fri Nov 20 17:23:02 2020 +0100 dmaengine: stm32: mark of_device_id table as maybe unused The driver uses a second of_device_id table in the probe() function by passing it to of_match_node(). This code will be a no-op for compile testing (!CONFIG_OF on x86_64): drivers/dma/stm32-dmamux.c:171:34: warning: ‘stm32_stm32dma_master_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201120162303.482126-5-krzk@kernel.org Signed-off-by: Vinod Koul commit 75fa2d4218c7df7added689dc941ba7b52519b2e Author: Krzysztof Kozlowski Date: Fri Nov 20 17:23:01 2020 +0100 dmaengine: sf: drop of_match_ptr from of_device_id table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant here). This fixes compile warning (!CONFIG_OF on x86_64): drivers/dma/sf-pdma/sf-pdma.c:576:34: warning: ‘sf_pdma_dt_ids’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201120162303.482126-4-krzk@kernel.org Signed-off-by: Vinod Koul commit 890bcd49d8a6d8cb943c8b844bdc1547c1806ad7 Author: Krzysztof Kozlowski Date: Fri Nov 20 17:23:00 2020 +0100 dmaengine: mv_xor: drop of_match_ptr from of_device_id table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant here). This fixes compile warning (!CONFIG_OF on x86_64): drivers/dma/mv_xor.c:1281:34: warning: ‘mv_xor_dt_ids’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201120162303.482126-3-krzk@kernel.org Signed-off-by: Vinod Koul commit 60b6122e86403fae58099dc08ecd319a86d03906 Author: Krzysztof Kozlowski Date: Fri Nov 20 17:22:59 2020 +0100 dmaengine: dw-axi-dmac: drop of_match_ptr from of_device_id table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant here). This fixes compile warning (!CONFIG_OF on x86_64): drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:984:34: warning: ‘dw_dma_of_id_table’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201120162303.482126-2-krzk@kernel.org Signed-off-by: Vinod Koul commit 255c2cc896b1009e7df4c4e32d9090fc22d28293 Author: Krzysztof Kozlowski Date: Fri Nov 20 17:22:58 2020 +0100 dmaengine: jz4780: drop of_match_ptr from of_device_id table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant here). This fixes compile warning (!CONFIG_OF on x86_64): drivers/dma/dma-jz4780.c:1031:34: warning: ‘jz4780_dma_dt_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201120162303.482126-1-krzk@kernel.org Signed-off-by: Vinod Koul commit cc2afb0d4c7cbba6743ed6d9564f0883cab6bae1 Author: Fabio Estevam Date: Mon Nov 23 16:30:51 2020 -0300 dmaengine: mxs-dma: Remove the unused .id_table The mxs-dma driver is only used by DT platforms and the .id_table is unused. Get rid of it to simplify the code. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20201123193051.17285-1-festevam@gmail.com Signed-off-by: Vinod Koul commit c95e6515a8c065862361f7e0e452978ade7f94ec Author: Zhihao Cheng Date: Tue Nov 24 09:08:13 2020 +0800 dmaengine: mv_xor_v2: Fix error return code in mv_xor_v2_probe() Return the corresponding error code when first_msi_entry() returns NULL in mv_xor_v2_probe(). Fixes: 19a340b1a820430 ("dmaengine: mv_xor_v2: new driver") Reported-by: Hulk Robot Signed-off-by: Zhihao Cheng Link: https://lore.kernel.org/r/20201124010813.1939095-1-chengzhihao1@huawei.com Signed-off-by: Vinod Koul commit 0ab785c894e618587e83bb67e8a8e96649868ad1 Author: Fabio Estevam Date: Tue Nov 24 11:34:05 2020 -0300 dmaengine: imx-dma: Remove unused .id_table Since 5.10-rc1 i.MX is a devicetree-only platform, so simplify the code by removing the unused non-DT support. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20201124143405.2764-1-festevam@gmail.com Signed-off-by: Vinod Koul commit beaff108e1bf1e38c9def60dd09f7a4ed7910481 Author: Colin Ian King Date: Mon Nov 23 10:54:17 2020 +0000 drm/amd/powerplay: fix spelling mistake "smu_state_memroy_block" -> "smu_state_memory_block" The struct name smu_state_memroy_block contains a spelling mistake, rename it to smu_state_memory_block Fixes: 8554e67d6e22 ("drm/amd/powerplay: implement power_dpm_state sys interface for SMU11") Reviewed-by: Evan Quan Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit bf0df09c2c1a06a7e4ad13b4979659a5ea273161 Author: Lee Jones Date: Mon Nov 23 11:19:19 2020 +0000 drm/amd/amdgpu/gmc_v9_0: Suppy some missing function doc descriptions Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c:382:23: warning: ‘ecc_umc_mcumc_status_addrs’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c:720: warning: Function parameter or member 'vmhub' not described in 'gmc_v9_0_flush_gpu_tlb' drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c:836: warning: Function parameter or member 'flush_type' not described in 'gmc_v9_0_flush_gpu_tlb_pasid' drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c:836: warning: Function parameter or member 'all_hub' not described in 'gmc_v9_0_flush_gpu_tlb_pasid' Acked-by: Christian König Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit fecf491a6eeaae8c6af0ee1666ba816251b35683 Author: Lee Jones Date: Mon Nov 23 11:19:18 2020 +0000 drm/amd/amdgpu/gmc_v9_0: Remove unused table 'ecc_umc_mcumc_status_addrs' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c:382:23: warning: ‘ecc_umc_mcumc_status_addrs’ defined but not used [-Wunused-const-variable=] Acked-by: Christian König Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit f0d45f259796e6cf1e57db2e0c6ceeeee9a38821 Author: Lee Jones Date: Mon Nov 23 11:19:16 2020 +0000 drm/amd/amdgpu/gmc_v8_0: Fix more issues attributed to copy/paste Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c:618: warning: Function parameter or member 'flush_type' not described in 'gmc_v8_0_flush_gpu_tlb_pasid' drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c:618: warning: Function parameter or member 'all_hub' not described in 'gmc_v8_0_flush_gpu_tlb_pasid' drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c:657: warning: Function parameter or member 'vmhub' not described in 'gmc_v8_0_flush_gpu_tlb' drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c:657: warning: Function parameter or member 'flush_type' not described in 'gmc_v8_0_flush_gpu_tlb' drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c:998: warning: Function parameter or member 'pasid' not described in 'gmc_v8_0_vm_decode_fault' Acked-by: Christian König Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit c39b7992cc88462bd7055b1a7dc39713f4a3f903 Author: Lee Jones Date: Mon Nov 23 11:19:15 2020 +0000 drm/amd/amdgpu/gmc_v7_0: Add some missing kernel-doc descriptions Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c:433: warning: Function parameter or member 'flush_type' not described in 'gmc_v7_0_flush_gpu_tlb_pasid' drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c:433: warning: Function parameter or member 'all_hub' not described in 'gmc_v7_0_flush_gpu_tlb_pasid' drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c:471: warning: Function parameter or member 'vmhub' not described in 'gmc_v7_0_flush_gpu_tlb' drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c:471: warning: Function parameter or member 'flush_type' not described in 'gmc_v7_0_flush_gpu_tlb' drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c:771: warning: Function parameter or member 'pasid' not described in 'gmc_v7_0_vm_decode_fault' Acked-by: Christian König Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 8a0fdc729be79aad8a2eae7862e21554a09f432d Author: Lee Jones Date: Mon Nov 23 11:19:13 2020 +0000 drm/amd/amdgpu/uvd_v4_2: Add one and remove another function param description Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c:448: warning: Function parameter or member 'flags' not described in 'uvd_v4_2_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c:448: warning: Excess function parameter 'fence' description in 'uvd_v4_2_ring_emit_fence' Acked-by: Christian König Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 55c5e65269d24be601ac99f5e5cdeae90e637eb0 Author: Lee Jones Date: Mon Nov 23 11:19:12 2020 +0000 drm/amd/amdgpu/cik_sdma: Add one and remove another function param description Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/cik_sdma.c:282: warning: Function parameter or member 'flags' not described in 'cik_sdma_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/cik_sdma.c:282: warning: Excess function parameter 'fence' description in 'cik_sdma_ring_emit_fence' Acked-by: Christian König Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit d7a9af7d4dacbd73ea2316f6167c6f48488e749e Author: Lee Jones Date: Mon Nov 23 11:19:09 2020 +0000 drm/amd/include/dimgrey_cavefish_ip_offset: Mark top-level IP_BASE as __maybe_unused Fixes the following W=1 kernel build warning(s): In file included from drivers/gpu/drm/amd/amdgpu/dimgrey_cavefish_reg_init.c:28: drivers/gpu/drm/amd/amdgpu/../include/dimgrey_cavefish_ip_offset.h:151:29: warning: ‘UMC_BASE’ defined but not used [-Wunused-const-variable=] 151 | static const struct IP_BASE UMC_BASE = { { { { 0x00014000, 0x02425800, 0, 0, 0, 0 } }, | ^~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/dimgrey_cavefish_ip_offset.h:81:29: warning: ‘FUSE_BASE’ defined but not used [-Wunused-const-variable=] 81 | static const struct IP_BASE FUSE_BASE = { { { { 0x00017400, 0x02401400, 0, 0, 0, 0 } }, | ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/dimgrey_cavefish_ip_offset.h:74:29: warning: ‘DPCS_BASE’ defined but not used [-Wunused-const-variable=] 74 | static const struct IP_BASE DPCS_BASE = { { { { 0x00000012, 0x000000C0, 0x000034C0, 0x00009000, 0x02403C00, 0 } }, | ^~~~~~~~~ NB: Snipped lots of these Acked-by: Christian König Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Tao Zhou Cc: Hawking Zhang Cc: Jiansong Chen Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 6cda1dbca047795db412d662a90db229f6f5a712 Author: Lee Jones Date: Mon Nov 23 11:19:08 2020 +0000 drm/amd/include/vangogh_ip_offset: Mark top-level IP_BASE as __maybe_unused Fixes the following W=1 kernel build warning(s): In file included from drivers/gpu/drm/amd/amdgpu/vangogh_reg_init.c:28: drivers/gpu/drm/amd/amdgpu/../include/vangogh_ip_offset.h:210:29: warning: ‘USB_BASE’ defined but not used [-Wunused-const-variable=] 210 | static const struct IP_BASE USB_BASE = { { { { 0x0242A800, 0x05B00000, 0, 0, 0, 0 } }, | ^~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/vangogh_ip_offset.h:202:29: warning: ‘UMC_BASE’ defined but not used [-Wunused-const-variable=] 202 | static const struct IP_BASE UMC_BASE = { { { { 0x00014000, 0x02425800, 0, 0, 0, 0 } }, | ^~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/vangogh_ip_offset.h:178:29: warning: ‘PCIE0_BASE’ defined but not used [-Wunused-const-variable=] 178 | static const struct IP_BASE PCIE0_BASE = { { { { 0x00000000, 0x00000014, 0x00000D20, 0x00010400, 0x0241B000, 0x04040000 } }, | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/vangogh_ip_offset.h:154:29: warning: ‘MP2_BASE’ defined but not used [-Wunused-const-variable=] 154 | static const struct IP_BASE MP2_BASE = { { { { 0x00016400, 0x02400800, 0x00F40000, 0x00F80000, 0x00FC0000, 0 } }, | ^~~~~~~~ NB: Snipped lots of these Acked-by: Christian König Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Huang Rui Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 8509479df3b5ae6f0cad0a9337d96e9161d68dd3 Author: Lee Jones Date: Mon Nov 23 11:19:07 2020 +0000 drm/amd/include/sienna_cichlid_ip_offset: Mark top-level IP_BASE as __maybe_unused Fixes the following W=1 kernel build warning(s): In file included from drivers/gpu/drm/amd/amdgpu/sienna_cichlid_reg_init.c:28: drivers/gpu/drm/amd/amdgpu/../include/sienna_cichlid_ip_offset.h:186:29: warning: ‘USB0_BASE’ defined but not used [-Wunused-const-variable=] 186 | static const struct IP_BASE USB0_BASE = { { { { 0x0242A800, 0x05B00000, 0, 0, 0 } }, | ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/sienna_cichlid_ip_offset.h:179:29: warning: ‘UMC_BASE’ defined but not used [-Wunused-const-variable=] 179 | static const struct IP_BASE UMC_BASE = { { { { 0x00014000, 0x02425800, 0, 0, 0 } }, | ^~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/sienna_cichlid_ip_offset.h:158:29: warning: ‘SDMA1_BASE’ defined but not used [-Wunused-const-variable=] 158 | static const struct IP_BASE SDMA1_BASE = { { { { 0x00001260, 0x0000A000, 0x0001C000, 0x02402C00, 0 } }, | ^~~~~~~~~~ NB: Snipped lots of these Acked-by: Christian König Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Hawking Zhang Cc: Likun Gao Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 91fadc92bb161766356054c3195182c23155383f Author: Lee Jones Date: Mon Nov 23 11:19:06 2020 +0000 drm/amd/include/navi12_ip_offset: Mark top-level IP_BASE as __maybe_unused Fixes the following W=1 kernel build warning(s): In file included from drivers/gpu/drm/amd/amdgpu/navi12_reg_init.c:27: drivers/gpu/drm/amd/amdgpu/../include/navi12_ip_offset.h:179:29: warning: ‘USB0_BASE’ defined but not used [-Wunused-const-variable=] 179 | static const struct IP_BASE USB0_BASE ={ { { { 0x0242A800, 0x05B00000, 0, 0, 0 } }, | ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/navi12_ip_offset.h:172:29: warning: ‘UMC_BASE’ defined but not used [-Wunused-const-variable=] 172 | static const struct IP_BASE UMC_BASE ={ { { { 0x00014000, 0x02425800, 0, 0, 0 } }, | ^~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/navi12_ip_offset.h:151:29: warning: ‘SDMA_BASE’ defined but not used [-Wunused-const-variable=] 151 | static const struct IP_BASE SDMA_BASE ={ { { { 0x00001260, 0x0000A000, 0x02402C00, 0, 0 } }, | ^~~~~~~~~ NB: Snipped a few of these Acked-by: Christian König Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 66feb6320230f5718024bbe13a3bda9f82f8c27e Author: Lee Jones Date: Mon Nov 23 11:19:05 2020 +0000 drm/amd/include/navi14_ip_offset: Mark top-level IP_BASE as __maybe_unused Fixes the following W=1 kernel build warning(s): In file included from drivers/gpu/drm/amd/amdgpu/navi14_reg_init.c:27: drivers/gpu/drm/amd/amdgpu/../include/navi14_ip_offset.h:179:29: warning: ‘USB0_BASE’ defined but not used [-Wunused-const-variable=] 179 | static const struct IP_BASE USB0_BASE ={ { { { 0x0242A800, 0x05B00000, 0, 0, 0 } }, | ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/navi14_ip_offset.h:172:29: warning: ‘UMC_BASE’ defined but not used [-Wunused-const-variable=] 172 | static const struct IP_BASE UMC_BASE ={ { { { 0x00014000, 0x02425800, 0, 0, 0 } }, | ^~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/navi14_ip_offset.h:151:29: warning: ‘SDMA_BASE’ defined but not used [-Wunused-const-variable=] 151 | static const struct IP_BASE SDMA_BASE ={ { { { 0x00001260, 0x0000A000, 0x02402C00, 0, 0 } }, | ^~~~~~~~~ NB: Snipped a few of these Acked-by: Christian König Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit c0b57a269dfa34ed10d7f0fe3d889aba551c3e46 Author: Lee Jones Date: Mon Nov 23 11:19:04 2020 +0000 drm/amd/include/arct_ip_offset: Mark top-level IP_BASE definition as __maybe_unused Fixes the following W=1 kernel build warning(s): In file included from drivers/gpu/drm/amd/amdgpu/arct_reg_init.c:27: drivers/gpu/drm/amd/amdgpu/../include/arct_ip_offset.h:227:29: warning: ‘DBGU_IO_BASE’ defined but not used [-Wunused-const-variable=] 227 | static const struct IP_BASE DBGU_IO_BASE ={ { { { 0x000001E0, 0x000125A0, 0x0040B400, 0, 0, 0 } }, | ^~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/arct_ip_offset.h:127:29: warning: ‘PCIE0_BASE’ defined but not used [-Wunused-const-variable=] 127 | static const struct IP_BASE PCIE0_BASE ={ { { { 0x000128C0, 0x00411800, 0x04440000, 0, 0, 0 } }, | ^~~~~~~~~~ In file included from drivers/gpu/drm/amd/amdgpu/arct_reg_init.c:27: drivers/gpu/drm/amd/amdgpu/../include/arct_ip_offset.h:63:29: warning: ‘FUSE_BASE’ defined but not used [-Wunused-const-variable=] 63 | static const struct IP_BASE FUSE_BASE ={ { { { 0x000120A0, 0x00017400, 0x00401400, 0, 0, 0 } }, | ^~~~~~~~~ Acked-by: Christian König Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 54dd7aee944ca15b862790b30b30ea2b970df098 Author: Lee Jones Date: Mon Nov 23 11:19:03 2020 +0000 drm/amd/include/navi10_ip_offset: Mark top-level IP_BASE as __maybe_unused Fixes the following W=1 kernel build warning(s): In file included from drivers/gpu/drm/amd/amdgpu/navi10_reg_init.c:27: drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:127:29: warning: ‘UMC_BASE’ defined but not used [-Wunused-const-variable=] 127 | static const struct IP_BASE UMC_BASE ={ { { { 0x00014000, 0, 0, 0, 0, 0 } }, | ^~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:109:29: warning: ‘RSMU_BASE’ defined but not used [-Wunused-const-variable=] 109 | static const struct IP_BASE RSMU_BASE = { { { { 0x00012000, 0, 0, 0, 0, 0 } }, | ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/navi10_ip_offset.h:61:29: warning: ‘FUSE_BASE’ defined but not used [-Wunused-const-variable=] 61 | static const struct IP_BASE FUSE_BASE ={ { { { 0x00017400, 0, 0, 0, 0, 0 } }, | ^~~~~~~~~ Acked-by: Christian König Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit d76dd1779b836755602c483033842496a059c6da Author: Lee Jones Date: Mon Nov 23 11:19:02 2020 +0000 drm/amd/include/vega20_ip_offset: Mark top-level IP_BASE definition as __maybe_unused In file included from drivers/gpu/drm/amd/amdgpu/vega20_reg_init.c:27: drivers/gpu/drm/amd/amdgpu/../include/vega20_ip_offset.h:154:29: warning: ‘XDMA_BASE’ defined but not used [-Wunused-const-variable= 154 | static const struct IP_BASE XDMA_BASE ={ { { { 0x00003400, 0, 0, 0, 0, 0 } }, | ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/vega20_ip_offset.h:63:29: warning: ‘FUSE_BASE’ defined but not used [-Wunused-const-variable=] 63 | static const struct IP_BASE FUSE_BASE ={ { { { 0x00017400, 0, 0, 0, 0, 0 } }, | ^~~~~~~~~ Fixes the following W=1 kernel build warning(s): Acked-by: Christian König Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 8a149a9d4ebc7bf1be8816e759897a1b9f434e9e Author: Lee Jones Date: Mon Nov 23 11:19:01 2020 +0000 drm/amd/amdgpu/dce_v6_0: Fix formatting and missing parameter description issues Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/dce_v6_0.c:192: warning: Function parameter or member 'async' not described in 'dce_v6_0_page_flip' drivers/gpu/drm/amd/amdgpu/dce_v6_0.c:1050: warning: Cannot understand * Acked-by: Christian König Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Luben Tuikov Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit e4c980c37cf4bd63f4e0ede0b779090e4628bf13 Author: Lee Jones Date: Mon Nov 23 11:19:00 2020 +0000 drm/amd/amdgpu/uvd_v3_1: Fix-up some documentation issues Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c:91: warning: Function parameter or member 'job' not described in 'uvd_v3_1_ring_emit_ib' drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c:91: warning: Function parameter or member 'flags' not described in 'uvd_v3_1_ring_emit_ib' drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c:108: warning: Function parameter or member 'addr' not described in 'uvd_v3_1_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c:108: warning: Function parameter or member 'seq' not described in 'uvd_v3_1_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c:108: warning: Function parameter or member 'flags' not described in 'uvd_v3_1_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c:108: warning: Excess function parameter 'fence' description in 'uvd_v3_1_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c:625: warning: Function parameter or member 'handle' not described in 'uvd_v3_1_hw_init' drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c:625: warning: Excess function parameter 'adev' description in 'uvd_v3_1_hw_init' drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c:692: warning: Function parameter or member 'handle' not described in 'uvd_v3_1_hw_fini' drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c:692: warning: Excess function parameter 'adev' description in 'uvd_v3_1_hw_fini' Acked-by: Christian König Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sonny Jiang Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit f0b9f8b131689a5f365f32c24900c054b8445220 Author: Lee Jones Date: Mon Nov 23 11:18:56 2020 +0000 drm/amd/amdgpu/gfx_v6_0: Supply description for 'gfx_v6_0_ring_test_ib()'s 'timeout' param Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c:1903: warning: Function parameter or member 'timeout' not described in 'gfx_v6_0_ring_test_ib' Acked-by: Christian König Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 249403737ae4f8f476979d6a14a7298112c69315 Author: Lee Jones Date: Mon Nov 23 11:18:55 2020 +0000 drm/amd/amdgpu/si_dma: Fix a bunch of function documentation issues Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/si_dma.c:92: warning: Function parameter or member 'addr' not described in 'si_dma_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/si_dma.c:92: warning: Function parameter or member 'seq' not described in 'si_dma_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/si_dma.c:92: warning: Function parameter or member 'flags' not described in 'si_dma_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/si_dma.c:92: warning: Excess function parameter 'fence' description in 'si_dma_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/si_dma.c:252: warning: Function parameter or member 'timeout' not described in 'si_dma_ring_test_ib' drivers/gpu/drm/amd/amdgpu/si_dma.c:408: warning: Function parameter or member 'ring' not described in 'si_dma_ring_pad_ib' drivers/gpu/drm/amd/amdgpu/si_dma.c:446: warning: Function parameter or member 'vmid' not described in 'si_dma_ring_emit_vm_flush' drivers/gpu/drm/amd/amdgpu/si_dma.c:446: warning: Function parameter or member 'pd_addr' not described in 'si_dma_ring_emit_vm_flush' drivers/gpu/drm/amd/amdgpu/si_dma.c:446: warning: Excess function parameter 'vm' description in 'si_dma_ring_emit_vm_flush' drivers/gpu/drm/amd/amdgpu/si_dma.c:781: warning: Function parameter or member 'ib' not described in 'si_dma_emit_copy_buffer' drivers/gpu/drm/amd/amdgpu/si_dma.c:781: warning: Function parameter or member 'tmz' not described in 'si_dma_emit_copy_buffer' drivers/gpu/drm/amd/amdgpu/si_dma.c:781: warning: Excess function parameter 'ring' description in 'si_dma_emit_copy_buffer' drivers/gpu/drm/amd/amdgpu/si_dma.c:804: warning: Function parameter or member 'ib' not described in 'si_dma_emit_fill_buffer' drivers/gpu/drm/amd/amdgpu/si_dma.c:804: warning: Excess function parameter 'ring' description in 'si_dma_emit_fill_buffer' Acked-by: Christian König Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit d14f279a156a2a2ffbda895bf4f8c4661325a34c Author: Lee Jones Date: Mon Nov 23 11:18:48 2020 +0000 drm/amd/amdgpu/gfx_v7_0: Clean-up a bunch of kernel-doc related issues Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:1590: warning: Function parameter or member 'instance' not described in 'gfx_v7_0_select_se_sh' drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:1788: warning: Excess function parameter 'se_num' description in 'gfx_v7_0_setup_rb' drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:1788: warning: Excess function parameter 'sh_per_se' description in 'gfx_v7_0_setup_rb' drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:1852: warning: Excess function parameter 'adev' description in 'DEFAULT_SH_MEM_BASES' drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:2086: warning: Excess function parameter 'adev' description in 'gfx_v7_0_ring_test_ring' drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:2130: warning: Function parameter or member 'ring' not described in 'gfx_v7_0_ring_emit_hdp_flush' drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:2130: warning: Excess function parameter 'adev' description in 'gfx_v7_0_ring_emit_hdp_flush' drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:2130: warning: Excess function parameter 'ridx' description in 'gfx_v7_0_ring_emit_hdp_flush' drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:2182: warning: Function parameter or member 'ring' not described in 'gfx_v7_0_ring_emit_fence_gfx' drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:2182: warning: Function parameter or member 'addr' not described in 'gfx_v7_0_ring_emit_fence_gfx' drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:2182: warning: Function parameter or member 'seq' not described in 'gfx_v7_0_ring_emit_fence_gfx' drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:2182: warning: Function parameter or member 'flags' not described in 'gfx_v7_0_ring_emit_fence_gfx' drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:2182: warning: Excess function parameter 'adev' description in 'gfx_v7_0_ring_emit_fence_gfx' drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:2182: warning: Excess function parameter 'fence' description in 'gfx_v7_0_ring_emit_fence_gfx' drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:2224: warning: Function parameter or member 'ring' not described in 'gfx_v7_0_ring_emit_fence_compute' drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:2224: warning: Function parameter or member 'addr' not described in 'gfx_v7_0_ring_emit_fence_compute' drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:2224: warning: Function parameter or member 'seq' not described in 'gfx_v7_0_ring_emit_fence_compute' drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:2224: warning: Function parameter or member 'flags' not described in 'gfx_v7_0_ring_emit_fence_compute' drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:2224: warning: Excess function parameter 'adev' description in 'gfx_v7_0_ring_emit_fence_compute' drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:2224: warning: Excess function parameter 'fence' description in 'gfx_v7_0_ring_emit_fence_compute' drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:2260: warning: Function parameter or member 'job' not described in 'gfx_v7_0_ring_emit_ib_gfx' drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:2260: warning: Function parameter or member 'flags' not described in 'gfx_v7_0_ring_emit_ib_gfx' drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:2351: warning: Function parameter or member 'timeout' not described in 'gfx_v7_0_ring_test_ib' drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:3244: warning: Function parameter or member 'ring' not described in 'gfx_v7_0_ring_emit_vm_flush' drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:3244: warning: Function parameter or member 'vmid' not described in 'gfx_v7_0_ring_emit_vm_flush' drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:3244: warning: Function parameter or member 'pd_addr' not described in 'gfx_v7_0_ring_emit_vm_flush' drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:3244: warning: Excess function parameter 'adev' description in 'gfx_v7_0_ring_emit_vm_flush' Acked-by: Christian König Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 1edcb5f212be62e6604eb20928b8e580f7501bb7 Author: Lee Jones Date: Mon Nov 23 11:18:47 2020 +0000 drm/amd/amdgpu/cik_sdma: Supply some missing function param descriptions Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/cik_sdma.c:226: warning: Function parameter or member 'job' not described in 'cik_sdma_ring_emit_ib' drivers/gpu/drm/amd/amdgpu/cik_sdma.c:226: warning: Function parameter or member 'flags' not described in 'cik_sdma_ring_emit_ib' drivers/gpu/drm/amd/amdgpu/cik_sdma.c:278: warning: Function parameter or member 'addr' not described in 'cik_sdma_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/cik_sdma.c:278: warning: Function parameter or member 'seq' not described in 'cik_sdma_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/cik_sdma.c:278: warning: Function parameter or member 'flags' not described in 'cik_sdma_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/cik_sdma.c:278: warning: Excess function parameter 'fence' description in 'cik_sdma_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/cik_sdma.c:663: warning: Function parameter or member 'timeout' not described in 'cik_sdma_ring_test_ib' drivers/gpu/drm/amd/amdgpu/cik_sdma.c:808: warning: Function parameter or member 'ring' not described in 'cik_sdma_ring_pad_ib' drivers/gpu/drm/amd/amdgpu/cik_sdma.c:859: warning: Function parameter or member 'vmid' not described in 'cik_sdma_ring_emit_vm_flush' drivers/gpu/drm/amd/amdgpu/cik_sdma.c:859: warning: Function parameter or member 'pd_addr' not described in 'cik_sdma_ring_emit_vm_flush' drivers/gpu/drm/amd/amdgpu/cik_sdma.c:859: warning: Excess function parameter 'vm' description in 'cik_sdma_ring_emit_vm_flush' drivers/gpu/drm/amd/amdgpu/cik_sdma.c:1315: warning: Function parameter or member 'ib' not described in 'cik_sdma_emit_copy_buffer' drivers/gpu/drm/amd/amdgpu/cik_sdma.c:1315: warning: Function parameter or member 'tmz' not described in 'cik_sdma_emit_copy_buffer' drivers/gpu/drm/amd/amdgpu/cik_sdma.c:1315: warning: Excess function parameter 'ring' description in 'cik_sdma_emit_copy_buffer' drivers/gpu/drm/amd/amdgpu/cik_sdma.c:1339: warning: Function parameter or member 'ib' not described in 'cik_sdma_emit_fill_buffer' drivers/gpu/drm/amd/amdgpu/cik_sdma.c:1339: warning: Excess function parameter 'ring' description in 'cik_sdma_emit_fill_buffer' Acked-by: Christian König Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 2b7a8cf3491fd628b1edd63005d6b7d88b389236 Author: Lee Jones Date: Mon Nov 23 11:18:46 2020 +0000 drm/amd/amdgpu/dce_v8_0: Supply description for 'async' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/dce_v8_0.c:185: warning: Function parameter or member 'async' not described in 'dce_v8_0_page_flip' Acked-by: Christian König Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Luben Tuikov Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 44eb261ca46e46cc17205f1d6893db3425d653d6 Author: Lee Jones Date: Mon Nov 23 11:18:45 2020 +0000 drm/amd/amdgpu/uvd_v4_2: Fix some kernel-doc misdemeanours Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c:157: warning: Function parameter or member 'handle' not described in 'uvd_v4_2_hw_init' drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c:157: warning: Excess function parameter 'adev' description in 'uvd_v4_2_hw_init' drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c:212: warning: Function parameter or member 'handle' not described in 'uvd_v4_2_hw_fini' drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c:212: warning: Excess function parameter 'adev' description in 'uvd_v4_2_hw_fini' drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c:446: warning: Function parameter or member 'addr' not described in 'uvd_v4_2_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c:446: warning: Function parameter or member 'seq' not described in 'uvd_v4_2_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c:446: warning: Function parameter or member 'flags' not described in 'uvd_v4_2_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c:446: warning: Excess function parameter 'fence' description in 'uvd_v4_2_ring_emit_fence' drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c:513: warning: Function parameter or member 'job' not described in 'uvd_v4_2_ring_emit_ib' drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c:513: warning: Function parameter or member 'flags' not described in 'uvd_v4_2_ring_emit_ib' Acked-by: Christian König Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit f59bf24e4b85f1d79dfe3d136513e3645a99e43e Author: Lee Jones Date: Mon Nov 23 11:18:43 2020 +0000 drm/amd/amdgpu/amdgpu_virt: Correct possible copy/paste or doc-rot misnaming issue Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c:115: warning: Function parameter or member 'adev' not described in 'amdgpu_virt_request_full_gpu' drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c:115: warning: Excess function parameter 'amdgpu' description in 'amdgpu_virt_request_full_gpu' drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c:138: warning: Function parameter or member 'adev' not described in 'amdgpu_virt_release_full_gpu' drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c:138: warning: Excess function parameter 'amdgpu' description in 'amdgpu_virt_release_full_gpu' drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c:159: warning: Function parameter or member 'adev' not described in 'amdgpu_virt_reset_gpu' drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c:159: warning: Excess function parameter 'amdgpu' description in 'amdgpu_virt_reset_gpu' drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c:194: warning: Function parameter or member 'adev' not described in 'amdgpu_virt_wait_reset' drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c:194: warning: Excess function parameter 'amdgpu' description in 'amdgpu_virt_wait_reset' drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c:210: warning: Function parameter or member 'adev' not described in 'amdgpu_virt_alloc_mm_table' drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c:210: warning: Excess function parameter 'amdgpu' description in 'amdgpu_virt_alloc_mm_table' drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c:239: warning: Function parameter or member 'adev' not described in 'amdgpu_virt_free_mm_table' drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c:239: warning: Excess function parameter 'amdgpu' description in 'amdgpu_virt_free_mm_table' Acked-by: Christian König Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 4aaa7c397d7e82f28cf41398659fc589c28456cc Author: Lee Jones Date: Mon Nov 23 11:18:44 2020 +0000 drm/amd/amdgpu/cik_ih: Supply description for 'ih' in 'cik_ih_{get, set}_wptr()' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/cik_ih.c:189: warning: Function parameter or member 'ih' not described in 'cik_ih_get_wptr' drivers/gpu/drm/amd/amdgpu/cik_ih.c:274: warning: Function parameter or member 'ih' not described in 'cik_ih_set_rptr' Acked-by: Christian König Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Qinglang Miao Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 7ad0c80c5ecbb5e1f8439d181cd660f12139b699 Author: Lee Jones Date: Mon Nov 23 11:18:42 2020 +0000 drm/amd/amdgpu/amdgpu_ib: Provide docs for 'amdgpu_ib_schedule()'s 'job' param Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c:127: warning: Function parameter or member 'job' not described in 'amdgpu_ib_schedule' Acked-by: Christian König Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 6abc3f97628cd33726969f76e5c383db7cc8f876 Author: Lee Jones Date: Mon Nov 23 11:18:41 2020 +0000 drm/amd/amdgpu/amdgpu_ttm: Add description for 'page_flags' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:1214: warning: Function parameter or member 'page_flags' not described in 'amdgpu_ttm_tt_create' Acked-by: Christian König Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: Jerome Glisse Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 2aa3b7c81714ab8d3b8d8cd90a3e3cd82a87e23d Author: Lee Jones Date: Mon Nov 23 11:18:40 2020 +0000 drm/radeon/radeon_device: Consume our own header where the prototypes are located Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_device.c:637:6: warning: no previous prototype for ‘radeon_device_is_virtual’ [-Wmissing-prototypes] Acked-by: Christian König Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 1347385fe18753b3eb8ee76fdaebea392b88b323 Author: Simon Ser Date: Fri Nov 20 20:19:00 2020 +0000 drm/amd/display: don't expose rotation prop for cursor plane Setting any rotation on the cursor plane is ignored by amdgpu. Because of DCE/DCN design, it's not possible to rotate the cursor. Instead of displaying the wrong result, stop advertising the rotation property for the cursor plane. Now that we check all cursor plane properties in amdgpu_dm_atomic_check, remove the TODO. Reviewed-by: Alex Deucher Signed-off-by: Simon Ser Cc: Alex Deucher Cc: Harry Wentland Cc: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 12f4849a1cfd69f3c37cca042f2e9c512f923741 Author: Simon Ser Date: Fri Nov 20 20:18:59 2020 +0000 drm/amd/display: check cursor scaling Don't allow user-space to set different scaling parameters for the cursor plane and for the primary plane. Because of DCE/DCN design, it's not possible to have a mismatch. The old check in dm_update_plane_state is superseded by this new check. Reviewed-by: Alex Deucher Signed-off-by: Simon Ser Cc: Alex Deucher Cc: Harry Wentland Cc: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 5f581248159a005f194ef27aa44ad82d00ba7622 Author: Simon Ser Date: Fri Nov 20 20:18:57 2020 +0000 drm/amd/display: disallow cropping for cursor plane Looking at handle_cursor_update, it doesn't seem like src_{x,y,w,h} are picked up by DC. I also tried to change these parameters via a test KMS client, and amdgpu ignored them. Instead of displaying the wrong result, reject the atomic commit. Reviewed-by: Alex Deucher Signed-off-by: Simon Ser Cc: Alex Deucher Cc: Harry Wentland Cc: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 24f99d2b21db3be1da2800470fecfa583a181929 Author: Simon Ser Date: Fri Nov 20 20:18:55 2020 +0000 drm/amd/display: add cursor FB size check This patch expands the cursor checks added in "drm/amd/display: add basic atomic check for cursor plane" to also include a FB size check. Without this patch, setting a FB smaller than max_cursor_size with an invalid width would result in amdgpu error messages and a fallback to a 64-byte width: [drm:hubp1_cursor_set_attributes [amdgpu]] *ERROR* Invalid cursor pitch of 100. Only 64/128/256 is supported on DCN. Note that DC uses the word "pitch" when actually checking the FB width. Indeed, the function handle_cursor_update does this: attributes.pitch = attributes.width; In my tests, the cursor FB actually had a pitch of 512 bytes. Reviewed-by: Alex Deucher Signed-off-by: Simon Ser Reported-by: Pierre-Loup A. Griffais Cc: Alex Deucher Cc: Harry Wentland Cc: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 7fe466153e5618716f06d09b1b3e1af309dcf0be Author: shaoyunl Date: Mon Nov 23 11:19:20 2020 -0500 drm/amdgpu/dce_virtual: Enable vBlank control for vf This function actually control the vblank on/off. It shouldn't be bypassed for VF. Otherwise all the vblank based feature on VF will not work. Signed-off-by: shaoyunl Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 9a3e698c0758ce42059e74998d27d689dadfebc8 Author: Yongqiang Sun Date: Thu Oct 8 11:07:57 2020 -0400 drm/amd/display: init soc bounding box for dcn3.01. [Why & How] Update init soc bounding box and bw bounding box for DCN3.01. Remove pp smu interface which isn't used. v2: squash in removal of stable function definition (Alex) Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 7530d914633894ea691343e2671c88be36609776 Author: Camille Cho Date: Thu Nov 12 15:33:19 2020 +0800 drm/amd/display: To update backlight restore mechanism [Why] Cached backlight is never being updated since panel_cntl specific registers were moved from abm to panel_cntl. [How] Update cached backlight in set_abm_immediate_disable as what we used to do. Also, update the priority of backlight restore mechanism so that cached backlight has the highest priority since it is always correct. Signed-off-by: Camille Cho Reviewed-by: Anthony Koo Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit eaae693835770eca991f68917304c84130e993e5 Author: Aric Cyr Date: Mon Nov 16 10:27:57 2020 -0500 drm/amd/display: 3.2.113 Signed-off-by: Aric Cyr Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 823b3169fbfc23816dd575214a06864cbcb0454b Author: Sung Joon Kim Date: Fri Nov 13 11:01:19 2020 -0500 drm/amd/display: enable pipe power gating by default [why] ASIC requirement. [how] Make disable_*_power_gate to false. Signed-off-by: Sung Joon Kim Reviewed-by: Charlene Liu Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 3ba0a5f3eef92d3762495af9418b542ad861ca3a Author: Jacky Liao Date: Thu Nov 12 16:18:10 2020 -0500 drm/amd/display: Add GAMCOR memory shutdown support [Why] The GAMCOR memory blocks should be powered down when they're not in use. This will reduce power consumption. [How] Write to GAMCOR_MEM_PWR_FORCE to put memory to shutdown when GAMCOR is not used. Signed-off-by: Jacky Liao Reviewed-by: Eric Yang Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit fe270efa32e64283886bb92cbb029600194cc72b Author: Yongqiang Sun Date: Fri Nov 13 09:05:32 2020 -0500 drm/amd/display: remove macro which is in header already [Why & How] Remove temp macro since the enum is in header file already. Signed-off-by: Yongqiang Sun Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 30bdf50b77bd3dbc111b4aeff7018d8c58ec7d8d Author: Yongqiang Sun Date: Thu Nov 12 11:21:16 2020 -0500 drm/amd/display: Check multiple internal displays for power optimization. [Why & How] only apply multiple display power optimization in case there are more than one internal display. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Anthony Koo Acked-by: Aric Cyr Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit c85ef99a9fa394f1cd3cc3694415f80d2c9378ec Author: Yongqiang Sun Date: Wed Nov 11 15:12:04 2020 -0500 drm/amd/display: Add internal display info [Why & How] Get internal display info from vbios and pass it to dmub fw to determine if multiple display optmization is needed. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Anthony Koo Acked-by: Aric Cyr Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 49d067dcf2844efd78562069574dbe25a75eb5d2 Author: Jacky Liao Date: Wed Nov 11 18:29:42 2020 -0500 drm/amd/display: Add BLNDGAM memory shutdown support [Why] The BLNDGAM memory blocks should be powered down when they're not in use. This will reduce power consumption. [How] 1. Write to BLNDGAM_MEM_PWR_FORCE to put memory to shutdown when BLNDGAM is not used. 2. Added a debug option to allow this behaviour to be turned off Signed-off-by: Jacky Liao Reviewed-by: Eric Yang Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 63c954a1ff8b0f63dcabf8bb2d3b3c895a69ed89 Author: Wyatt Wood Date: Wed Nov 4 19:44:31 2020 -0500 drm/amd/display: Clear sticky vsc sdp error bit [Why] Need to clear sticky error bits generated during hpd irq from receiver. [How] Clear sticky vsc sdp error bit. Signed-off-by: Wyatt Wood Reviewed-by: Anthony Koo Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 014427adc5565a0b46fd3ef6719167a31f04d764 Author: Sherry Date: Wed Nov 11 00:34:22 2020 +0800 drm/amd/display: change hw sequence [Why] t9 delay func is called twice after setting power off, the unexpected action results in a doubling of the added 140ms t9 delay [How] If the backlight has been turned off, does not turn it off again Signed-off-by: Sherry Reviewed-by: Tony Cheng Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 2208f39c750972ad3796b4353ccf9f7c8636931c Author: Eric Yang Date: Thu Nov 5 15:44:55 2020 -0500 drm/amd/display: expose clk_mgr functions for reuse Signed-off-by: Eric Yang Reviewed-by: Dmytro Laktyushkin Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit d4930b7aaefb8050229f41d19da86d3ab5c8f04f Author: Tashfique Abdullah Date: Wed Nov 4 18:51:53 2020 -0500 drm/amd/display: intermittent underflow observed when PIP is toggled in Full screen [Why] The MPCC may change and request data when the pipes are switching from 2 to 1 or 1 to 2. During the switch there is a possibility of underflow and flicker/missing data. [How] During VBlank the MPCC won't request data. The trick is to delay and wait on VBlank, ONLY when pipes are either turning on or off, right before MPCC is reset for the pipes. Signed-off-by: Tashfique Abdullah Reviewed-by: Aric Cyr Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 96879ad3e4e3cf16af78de4fe9cbc9688cb26105 Author: Jacky Liao Date: Wed Oct 21 17:31:26 2020 -0400 drm/amd/display: Add DMCU memory low power support [Why] On some platforms, DMCU is no longer used. In these cases, some DMCU memory should be completely powered off to save power. [How] 1. Set DMCU_ERAM_MEM_PWR_FORCE to shutdown memory when DMCU is not in use 2. Added a debug option to allow this behaviour to be turned off 3. Set all memory low power debug options to off first, to not immediately cause problems Signed-off-by: Jacky Liao Reviewed-by: Eric Yang Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 949c5cde3e0ffca0811ef72b8f4bcd9a483ab558 Author: Yongqiang Sun Date: Wed Oct 21 13:19:44 2020 -0400 drm/amd/display: Enable stutter for dcn3.01. [Why & How] Enable stutter for DCN3.01. Signed-off-by: Yongqiang Sun Reviewed-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 41fd932e1a1518b6ee07f08ca99eb8b6a05e13d8 Author: Chris Park Date: Mon Oct 19 14:32:14 2020 -0400 drm/amd/display: Update panel register [Why] Incorrect panel register settings are applied for power sequence because the register macro is not defined in resource. [How] Implement same register space to future resource files. Signed-off-by: Chris Park Reviewed-by: Joshua Aberback Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 06722b37d1560502901ab1a6fb6e5996cae26b1f Author: Ashley Thomas Date: Thu Oct 1 00:16:05 2020 -0700 drm/amd/display: Source minimum HBlank support [Why] Some sink devices wish to have access to the minimum HBlank supported by the ASIC. [How] Make the ASIC minimum HBlank available in Source Device information address 0x340. Signed-off-by: Ashley Thomas Reviewed-by: Anthony Koo Reviewed-by: Wenjing Liu Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit e97978e8121ecc6e7d16eed55f0bb3987c2993aa Author: Charlene Liu Date: Mon Sep 21 14:24:09 2020 -0400 drm/amd/display: add i2c speed arbitration for dc_i2c and hdcp_i2c [why] HDCP 1.4 failed on SL8800 SW w/a test driver use. [how] slower down the HW i2c speed when used by HW i2c. this request: each acquired_i2c_engine setup the i2c speed needed. and set the I2c engine for HDCP use at release_engine. this covers SW using HW I2c engine and HDCP using HW I2c engine. for dmcu using HW I2c engine, needs add similar logic in dmcufw. Signed-off-by: Charlene Liu Reviewed-by: Chris Park Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit a2a8857ceefe0a5011624779b9edec4412df6b6e Author: Christian König Date: Tue Nov 3 14:40:57 2020 +0100 drm/amdgpu: implement retry fault handling for Navi Same as gmc9, basically filter the fault, reroute or handle it. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit d4581f7dfbe1f115b9f72f80a7f1febb52940bbd Author: Christian König Date: Tue Nov 3 14:22:50 2020 +0100 drm/amdgpu: enabled software IH ring for Navi Felix pointed out that we need this for Navi as well. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 0291150d3c618712337931bf26ef758f944aa32c Author: Christian König Date: Sat Oct 31 18:46:59 2020 +0100 drm/amdgpu: make sure retry faults are handled in a work item on Vega Looks like we can't enabled the IH1/IH2 feature for Vega20, make sure retry faults are handled on a separate ring anyway. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 4750918978a7829954a248da0b964f36740299b5 Author: Christian König Date: Sat Oct 31 18:39:54 2020 +0100 drm/amdgpu: enabled software IH ring for Vega Seems like we won't get the hardware IH1/2 rings on Vega20 working. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 26f32a377eeddc5af24821b1ef3a3a8de7a80211 Author: Christian König Date: Sat Oct 31 18:38:15 2020 +0100 drm/amdgpu: add infrastructure for soft IH ring Add a soft IH ring implementation similar to the hardware IH1/2. This can be used if the hardware delegation of interrupts to IH1/2 doesn't work for some reason. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 45d87b85d39bc68148580be08c6b7aca803ba1a6 Author: Christian König Date: Tue Nov 3 14:34:49 2020 +0100 drm/amdgpu: cleanup gmc_v10_0_process_interrupt a bit Return early in case of a ratelimit and don't print leading zeros for the address. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 18e1a6c95f0a6559794b0427108504213ba2be33 Author: Christian König Date: Tue Nov 3 14:29:42 2020 +0100 drm/amdgpu: drop leading zeros from the gmc9 fault address The address space is only 48bit, not 64bit. And the VMHUBs work with sign extended addresses. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 7e7726ec1f022e73034ef6d1fd75e394d7e03922 Author: Nirmoy Das Date: Fri Nov 20 17:00:21 2020 +0100 drm/radeon: use generic DMA API Use generic DMA api instead of bus-specific API. Signed-off-by: Nirmoy Das Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 7dc7b65a1f3f9f0f24ce5cc52811cfbad4c6b9d3 Author: Nirmoy Das Date: Fri Nov 20 16:29:40 2020 +0100 drm/amdgpu: use generic DMA API Use generic DMA api instead of bus-specific API. Signed-off-by: Nirmoy Das Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 9fa3c953f5ebc4b530974d65bcfeb004311df72e Author: Jiansong Chen Date: Mon Nov 23 11:07:50 2020 +0800 drm/amdgpu: update GC golden setting for navy_flounder Update GC golden setting for navy_flounder. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit be6502f0dbba58f5eb765b8a57f04a2ca4ce3960 Author: Likun Gao Date: Mon Nov 23 10:28:46 2020 +0800 drm/amdgpu: update golden setting for sienna_cichlid Update golden setting for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit b251d357f53f1a43b27f64de1a6239e0e31e1cde Author: Gustavo A. R. Silva Date: Fri Nov 20 12:35:11 2020 -0600 drm/amd/pm: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a couple of warnings by explicitly adding a break statement instead of letting the code fall through to the next case, and a fallthrough pseudo-keyword as a replacement for a /* fall through */ comment, Notice that Clang doesn't recognize /* fall through */ comments as implicit fall-through markings. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Alex Deucher commit 910e834db00e40942e79226d638f0f2217eeedd6 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:28:12 2020 -0600 drm/amd/display: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of just letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Alex Deucher commit d6e1d905009fb42afc6e0a951d90f85a514ef2c7 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:24:49 2020 -0600 drm/radeon: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple fallthrough pseudo-keyword macros, as replacement for /* fall through */ comments. Notice that Clang doesn't recognize /* fall through */ comments as implicit fall-through markings. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Alex Deucher commit 9304ca4de0b9522b5c01efec20b9649c2c069697 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:24:41 2020 -0600 drm/amdgpu: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of just letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Alex Deucher commit af5bbf93101dda20f5d89437ed00696704a65c51 Author: Rodrigo Siqueira Date: Tue Nov 17 15:25:48 2020 -0500 drm/amd/display: Avoid HDCP initialization in devices without output The HDCP feature requires at least one connector attached to the device; however, some GPUs do not have a physical output, making the HDCP initialization irrelevant. This patch disables HDCP initialization when the graphic card does not have output. Acked-by: Alex Deucher Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 38d6be8199331e4739486156c74a64a8ece717a3 Author: Alex Deucher Date: Fri Nov 20 09:53:55 2020 -0500 drm/amdgpu: only register VGA devices with the VGA arbiter We only need to arbitrate VGA access on VGA compatible devices. Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit 95666c6cfe9247610efbd68c228f0831d4c18a51 Author: Bernard Zhao Date: Tue Nov 17 18:55:01 2020 -0800 amd/amdgpu: use kmalloc_array to replace kmalloc with multiply Fix check_patch.pl warning: WARNING: Prefer kmalloc_array over kmalloc with multiply +bps = kmalloc(align_space * sizeof((*data)->bps), GFP_KERNEL); WARNING: Prefer kmalloc_array over kmalloc with multiply +bps_bo = kmalloc(align_space * sizeof((*data)->bps_bo), GFP_KERNEL); kmalloc_array has multiply overflow check, which will be safer. Reviewed-by: Christian König Signed-off-by: Bernard Zhao Signed-off-by: Alex Deucher commit b14a04fee90889b011509fe6ade1ddf93fdd9f49 Author: Bernard Zhao Date: Tue Nov 17 18:42:29 2020 -0800 amdgpu/amdgpu_ids: fix kmalloc_array not uses number as first arg Fix check_patch.pl warning: kmalloc_array uses number as first arg, sizeof is generally wrong. +fences = kmalloc_array(sizeof(void *), id_mgr->num_ids, GFP_KERNEL); Reviewed-by: Christian König Signed-off-by: Bernard Zhao Signed-off-by: Alex Deucher commit a76087cf97afe49a30ba3970a2052ef0f260eebf Author: James Zhu Date: Mon Nov 2 17:03:17 2020 -0500 drm/amdgpu/vcn3.0: add software ring share memory support Support software ring share memory with vcn firmware. Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 52f9535ca4f4268aa7c27975da330cb8dd6a9bf7 Author: James Zhu Date: Mon Nov 2 16:24:18 2020 -0500 drm/amdgpu/vcn3.0: add dec software ring vm functions to support Add dec software ring vm functions to support. Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit bd88596fddb4b09e26c55765284ea8d47e5316e8 Author: James Zhu Date: Mon Nov 2 15:38:42 2020 -0500 drm/amdgpu/vcn: add test for dec software ring Add vcn software ring decode ring test and decode ib test. Signed-off-by: James Zhu Reviewed-by: Leo Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 477f25ebe2fe9a1943ff69ec659c090a7e29e024 Author: James Zhu Date: Mon Nov 2 15:21:49 2020 -0500 drm/amdgpu/vcn: update header to support dec software ring Add macro, structure and function prototype to support vcn dec software ring. Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 9b84ec8e43d6ca6c356705f7b02b51a2d8641d01 Author: James Zhu Date: Wed Nov 18 09:08:03 2020 -0500 drm/amdgpu/vcn: refactor dec message functions refactor dec message functions to add dec software ring support. Signed-off-by: James Zhu Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 2261229cef728da98355e63a6068901640acd504 Author: Likun Gao Date: Fri Nov 20 15:54:00 2020 +0800 drm/amdgpu: add module parameter choose runtime method Default runtime logic not changed. Provide an alternative runtime method. (set 1 to use BACO; 2 to use BAMACO) When set reset_method to 4, it will use BACO or BAMACO for gpu reset, according to runpm value. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit ddc3344f165d0e99d877747e73448c5b9fe0f57e Author: Likun Gao Date: Fri Nov 20 15:44:36 2020 +0800 drm/amd/pm: fix the crash after runtime pm resume Some features are still disabled after runtime pm resume. This can take the hardware back. Unlike other projects, this doesn't need pptable retransfer. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 7203a2fd98c85d366e88e7cbacf5e639060452d9 Author: Sonny Jiang Date: Fri Nov 20 02:38:09 2020 -0500 drm/amdgpu: fix a page fault The UVD firmware is copied to cpu addr in uvd_resume, so it should be used after that. This is to fix a bug introduced by patch drm/amdgpu: fix SI UVD firmware validate resume fail. Signed-off-by: Sonny Jiang Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit fce8a4ac46b0726bc25098855214a67b22b624d0 Author: Jinzhou Su Date: Wed Nov 18 17:14:07 2020 +0800 drm/amdgpu: Add gfx doorbell setting for Vangogh Using KIQ to map GFX queues instead of MMIO for gfx async ring, add missing doorbell range setting. v2: fix typo Signed-off-by: Jinzhou.Su Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit c95ec47ccbcff991935eb711f3d5c29fcdf75ee1 Author: Kenneth Feng Date: Fri Nov 20 14:31:13 2020 +0800 drm/amd/amdgpu: skip unload message in reset This has been confirmed that unload message is not needed from SIENNA_CICHLID in reset. Otherwise it will cause the fw wrong state after reset and no response for any messages. Signed-off-by: Kenneth Feng Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 6fb33209831b387d73dee8720850c7bcb8db93c6 Author: Kenneth Feng Date: Tue Nov 17 21:10:59 2020 +0800 drm/amd/amdgpu: fix null pointer in runtime pm fix the null pointer issue when runtime pm is triggered. Signed-off-by: Kenneth Feng Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 78deaf5f98acce53a805c42b6f56f15ca7958ce4 Author: Bhawanpreet Lakha Date: Wed Nov 18 14:10:44 2020 -0500 drm/amd/display: Add DPCS regs for dcn302 link encoder dpcs reg are missing for dcn302 link encoder regs list, so add them. Just like dcn3 Signed-off-by: Bhawanpreet Lakha Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit bb7978111dd3d0f663509586a8da2e68cda6a7d8 Author: Sonny Jiang Date: Fri Nov 6 16:42:47 2020 -0500 drm/amdgpu: fix SI UVD firmware validate resume fail The SI UVD firmware validate key is stored at the end of firmware, which is changed during resume while playing video. So get the key at sw_init and store it for fw validate using. Signed-off-by: Sonny Jiang Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit e9fd12df325e757b9ab52729260847776b9b2831 Author: Jonathan Marek Date: Mon Nov 23 09:40:16 2020 -0500 arm64: dts: qcom: fix indentation error in sm8250 cpu nodes Use tabs instead of 6 spaces. Signed-off-by: Jonathan Marek Link: https://lore.kernel.org/r/20201123144016.19596-1-jonathan@marek.ca Signed-off-by: Bjorn Andersson commit d5a05e69ac6e4c431c380ced2b534c91f7bc3280 Author: Vincent Whitchurch Date: Fri Nov 20 16:02:08 2020 +0100 net: stmmac: Use hrtimer for TX coalescing This driver uses a normal timer for TX coalescing, which means that the with the default tx-usecs of 1000 microseconds the cleanups actually happen 10 ms or more later with HZ=100. This leads to very low througput with TCP when bridged to a slow link such as a 4G modem. Fix this by using an hrtimer instead. On my ARM platform with HZ=100 and the default TX coalescing settings (tx-frames 25 tx-usecs 1000), with "tc qdisc add dev eth0 root netem delay 60ms 40ms rate 50Mbit" run on the server, netperf's TCP_STREAM improves from ~5.5 Mbps to ~100 Mbps. Signed-off-by: Vincent Whitchurch Link: https://lore.kernel.org/r/20201120150208.6838-1-vincent.whitchurch@axis.com Signed-off-by: Jakub Kicinski commit 206ad34d52a2f1205c84d08c12fc116aad0eb407 Author: Andrea Parri (Microsoft) Date: Wed Nov 18 16:33:10 2020 +0100 hv_netvsc: Validate number of allocated sub-channels Lack of validation could lead to out-of-bound reads and information leaks (cf. usage of nvdev->chan_table[]). Check that the number of allocated sub-channels fits into the expected range. Suggested-by: Saruhan Karademir Signed-off-by: Andrea Parri (Microsoft) Reviewed-by: Haiyang Zhang Acked-by: Jakub Kicinski Cc: "David S. Miller" Cc: Jakub Kicinski Cc: netdev@vger.kernel.org Link: https://lore.kernel.org/r/20201118153310.112404-1-parri.andrea@gmail.com Signed-off-by: Wei Liu commit a7ed5e57bdbab48a6e4cf0a7156c2616844b531e Author: Sibi Sankar Date: Wed Nov 4 12:33:42 2020 +0530 remoteproc: qcom_q6v5_mss: map/unmap MBA region before/after use The application processor accessing the MBA region after assigning it to the remote Q6 would lead to an XPU violation. Fix this by un-mapping the MBA region post firmware copy and MBA text log dumps. Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/1604473422-29639-2-git-send-email-sibis@codeaurora.org [bjorn: Renamed "ptr" to "mba_region"] Signed-off-by: Bjorn Andersson commit 04ff5d19cf6e2f9dbdf137c0c6eb44934d46a99c Author: Sibi Sankar Date: Wed Nov 4 12:33:41 2020 +0530 remoteproc: qcom_q6v5_mss: Replace ioremap with memremap Fix the sparse warnings reported by the kernel test bot by replacing ioremap calls with memremap. Reviewed-by: Bjorn Andersson Reported-by: kernel test robot Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/1604473422-29639-1-git-send-email-sibis@codeaurora.org Signed-off-by: Bjorn Andersson commit 5d0c3533a19f48e5e7e73806a3e4b29cd4364130 Author: Vinod Koul Date: Mon Nov 9 14:24:50 2020 +0530 dmaengine: qcom: Add GPI dma driver This controller provides DMAengine capabilities for a variety of peripheral buses such as I2C, UART, and SPI. By using GPI dmaengine driver, bus drivers can use a standardize interface that is protocol independent to transfer data between memory and peripheral. Link: https://lore.kernel.org/r/20201109085450.24843-4-vkoul@kernel.org Signed-off-by: Vinod Koul commit e7bbb7acabf47d74672e0e314bed4d452d2097b4 Author: Vinod Koul Date: Mon Nov 9 14:24:49 2020 +0530 dmaengine: add peripheral configuration Some complex dmaengine controllers have capability to program the peripheral device, so pass on the peripheral configuration as part of dma_slave_config Link: https://lore.kernel.org/r/20201109085450.24843-3-vkoul@kernel.org Signed-off-by: Vinod Koul commit 950a7388f02bf775515d13dc508cb9d749bd6d91 Author: Arnaud Pouliquen Date: Fri Nov 20 14:42:45 2020 -0700 rpmsg: Turn name service into a stand alone driver Make the RPMSG name service announcement a stand alone driver so that it can be reused by other subsystems. It is also the first step in making the functionatlity transport independent, i.e that is not tied to virtIO. Reviewed-by: Guennadi Liakhovetski Tested-by: Guennadi Liakhovetski Co-developed-by: Mathieu Poirier Signed-off-by: Mathieu Poirier Co-developed-by: Guennadi Liakhovetski Signed-off-by: Guennadi Liakhovetski Signed-off-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20201120214245.172963-9-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit 678198f21135b0aaf9782049d0a6bbbeefff1804 Author: Vinod Koul Date: Mon Nov 9 14:24:48 2020 +0530 dt-bindings: dmaengine: Document qcom,gpi dma binding Add devicetree binding documentation for GPI DMA controller implemented on Qualcomm SoCs Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201109085450.24843-2-vkoul@kernel.org Signed-off-by: Vinod Koul commit 55488110acc1560b4599e3d509b13f2731a6fee1 Author: Mathieu Poirier Date: Fri Nov 20 14:42:44 2020 -0700 rpmsg: Make rpmsg_{register|unregister}_device() public Make function rpmsg_register_device() and rpmsg_unregister_device() functions public so that they can be used by other clients. While doing so get rid of two obsolete function, i.e register_rpmsg_device() and unregister_rpmsg_device(), to prevent confusion. Tested-by: Guennadi Liakhovetski Signed-off-by: Mathieu Poirier Reviewed-by: Arnaud Pouliquen Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20201120214245.172963-8-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit 1ee1e5e162afca87165b1676cc5787a2c89170ba Author: Arnaud Pouliquen Date: Fri Nov 20 14:42:43 2020 -0700 rpmsg: virtio: Add rpmsg channel device ops Implement the create and release of the RPMsg channel for the RPMsg virtio bus. Tested-by: Guennadi Liakhovetski Signed-off-by: Arnaud Pouliquen Signed-off-by: Mathieu Poirier Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20201120214245.172963-7-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit 9753e12cd3bdaf9bb7cbcaa7476c1eb088538e3e Author: Arnaud Pouliquen Date: Fri Nov 20 14:42:42 2020 -0700 rpmsg: core: Add channel creation internal API Add the channel creation API as a first step to be able to define the name service announcement as a rpmsg driver independent from the RPMsg virtio bus. Tested-by: Guennadi Liakhovetski Signed-off-by: Arnaud Pouliquen Signed-off-by: Mathieu Poirier Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20201120214245.172963-6-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit 77d372989db974464b43455a89462720f0d96a0f Author: Arnaud Pouliquen Date: Fri Nov 20 14:42:41 2020 -0700 rpmsg: virtio: Rename rpmsg_create_channel Rename the internal function as it is internal, and as the name will be used in rpmsg_core. Tested-by: Guennadi Liakhovetski Signed-off-by: Arnaud Pouliquen Signed-off-by: Mathieu Poirier Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20201120214245.172963-5-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit c435a04189de372ba9ae72076b18185a884108d6 Author: Mathieu Poirier Date: Fri Nov 20 14:42:40 2020 -0700 rpmsg: Move structure rpmsg_ns_msg to header file Move structure rpmsg_ns_msg to its own header file so that it can be used by other entities. Tested-by: Guennadi Liakhovetski Signed-off-by: Mathieu Poirier Reviewed-by: Arnaud Pouliquen Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20201120214245.172963-4-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit 5c9f8c2dbdbe53818bcde6aa6695e1331e5f841f Author: Jonathan McDowell Date: Sat Nov 14 14:02:33 2020 +0000 dmaengine: qcom: Add ADM driver Add the DMA engine driver for the QCOM Application Data Mover (ADM) DMA controller found in the MSM8x60 and IPQ/APQ8064 platforms. The ADM supports both memory to memory transactions and memory to/from peripheral device transactions. The controller also provides flow control capabilities for transactions to/from peripheral devices. The initial release of this driver supports slave transfers to/from peripherals and also incorporates CRCI (client rate control interface) flow control. The hardware only supports a 32 bit physical address, so specifying !PHYS_ADDR_T_64BIT gives maximum COMPILE_TEST coverage without having to spend effort on kludging things in the code that will never actually be needed on real hardware. Signed-off-by: Andy Gross Signed-off-by: Thomas Pedersen Signed-off-by: Jonathan McDowell Link: https://lore.kernel.org/r/20201114140233.GM32650@earth.li Signed-off-by: Vinod Koul commit 5f2f6b7db1197f9fb99b93261ef0b3ae5ea19cc1 Author: Mathieu Poirier Date: Fri Nov 20 14:42:39 2020 -0700 rpmsg: virtio: Move from virtio to rpmsg byte conversion Use rpmsg byte conversion functions in order for the RPMSG headers and generic functions to be used by external entities. Tested-by: Guennadi Liakhovetski Signed-off-by: Mathieu Poirier Reviewed-by: Arnaud Pouliquen Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20201120214245.172963-3-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit 6bef038011a023db41f1b33f0776224729d52344 Author: Mathieu Poirier Date: Fri Nov 20 14:42:38 2020 -0700 rpmsg: Introduce __rpmsg{16|32|64} types Introduce __rpmsg{16|32|64} types along with byte order conversion functions based on an rpmsg_device operation as a foundation to make RPMSG modular and transport agnostic. Tested-by: Guennadi Liakhovetski Suggested-by: Guennadi Liakhovetski Signed-off-by: Mathieu Poirier Reviewed-by: Arnaud Pouliquen Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20201120214245.172963-2-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit fae0385b29679a13523b3d14f570f0fdc46cd48d Author: Ritesh Singh Date: Tue Nov 24 17:59:14 2020 +0200 ath11k: remove "ath11k_mac_get_ar_vdev_stop_status" references Unused structure ath11k_vdev_stop_status is removed. 'ath11k_mac_get_ar_vdev_stop_status' api has been replaced with 'ath11k_mac_get_ar_by_vdev_id' inside vdev_stopped_event. Signed-off-by: Ritesh Singh Signed-off-by: Maharaja Kennadyrajan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1605514143-17652-4-git-send-email-mkenna@codeaurora.org commit 690ace20ff790f443c3cbaf12e1769e4eb0072db Author: Ritesh Singh Date: Tue Nov 24 17:59:14 2020 +0200 ath11k: peer delete synchronization with firmware Peer creation in firmware fails, if last peer deletion is still in progress. Hence, add wait for the event after deleting every peer from host driver to synchronize with firmware. Signed-off-by: Ritesh Singh Signed-off-by: Maharaja Kennadyrajan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1605514143-17652-3-git-send-email-mkenna@codeaurora.org commit 3cbbdfbed1408ba55e2deeaf913c0e735086589b Author: Ritesh Singh Date: Tue Nov 24 17:59:13 2020 +0200 ath11k: vdev delete synchronization with firmware When the interface is added immediately after removing the interface, vdev deletion in firmware might not have been completed. Hence, add vdev_delete_resp_event and wait_event_timeout to synchronize with firmware. Signed-off-by: Ritesh Singh Signed-off-by: Maharaja Kennadyrajan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1605514143-17652-2-git-send-email-mkenna@codeaurora.org commit 24453a84285ee1de9706a3308a11caf853f96334 Author: Karen Sornek Date: Thu Sep 10 12:36:19 2020 +0200 igbvf: Refactor traces Refactoring "PF still resetting" and changing "Failed to add vlan id" to "Vlan id is not added" messages because previous version looked like a bug - it informed about changes that worked as designed but might confuse users Signed-off-by: Karen Sornek Reviewed-by: Aleksandr Loktionov Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit 6ec12e1e9404acb27a7434220bbe5f75e7bb2859 Author: Stefan Assmann Date: Wed Sep 9 10:22:12 2020 +0200 i40e: report correct VF link speed when link state is set to enable When the virtual link state was set to "enable" ethtool would report link speed as 40000Mb/s regardless of the underlying device. Report the correct link speed. Example from a XXV710 NIC. Before: $ ip link set ens3f0 vf 0 state auto $ ethtool enp8s2 | grep Speed Speed: 25000Mb/s $ ip link set ens3f0 vf 0 state enable $ ethtool enp8s2 | grep Speed Speed: 40000Mb/s After: $ ip link set ens3f0 vf 0 state auto $ ethtool enp8s2 | grep Speed Speed: 25000Mb/s $ ip link set ens3f0 vf 0 state enable $ ethtool enp8s2 | grep Speed Speed: 25000Mb/s Signed-off-by: Stefan Assmann Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit 088d5360d05a9e4e779fc89acd8e63379d21b8b8 Author: Marek Majtyka Date: Tue Sep 8 14:34:40 2020 +0200 i40e: remove redundant assignment Remove a redundant assignment of the software ring pointer in the i40e driver. The variable is assigned twice with no use in between, so just get rid of the first occurrence. Fixes: 3b4f0b66c2b3 ("i40e, xsk: Migrate to new MEM_TYPE_XSK_BUFF_POOL") Signed-off-by: Marek Majtyka Acked-by: Björn Töpel Tested-by: George Kuruvinakunnel Signed-off-by: Tony Nguyen commit 526740b495059ebbc0c3c086dceca1263820fa4f Merge: 11af6de4799ee 2ca7e30d3b1ee Author: Kalle Valo Date: Tue Nov 24 17:57:11 2020 +0200 Merge mhi-ath11k-immutable into ath-next This is an immutable branch from mhi tree for handling an API change in MHI subsystem and minimise conflicts between ath and mhi trees. commit 2914b0ba61a9d253535e51af16c7122a8148995d Author: Peter Zijlstra Date: Thu Jun 18 22:28:37 2020 +0200 irq_work: Optimize irq_work_single() Trade one atomic op for a full memory barrier. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Frederic Weisbecker commit 545b8c8df41f9ecbaf806332d4095bc4bc7c14e8 Author: Peter Zijlstra Date: Mon Jun 15 11:29:31 2020 +0200 smp: Cleanup smp_call_function*() Get rid of the __call_single_node union and cleanup the API a little to avoid external code relying on the structure layout as much. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Frederic Weisbecker commit 7a9f50a05843fee8366bd3a65addbebaa7cf7f07 Author: Peter Zijlstra Date: Mon Jun 15 11:51:29 2020 +0200 irq_work: Cleanup Get rid of the __call_single_node union and clean up the API a little to avoid external code relying on the structure layout as much. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Frederic Weisbecker commit 23e6082a522e32232f7377540b4d42d8304253b8 Author: Mel Gorman Date: Fri Nov 20 09:06:30 2020 +0000 sched: Limit the amount of NUMA imbalance that can exist at fork time At fork time currently, a local node can be allowed to fill completely and allow the periodic load balancer to fix the problem. This can be problematic in cases where a task creates lots of threads that idle until woken as part of a worker poll causing a memory bandwidth problem. However, a "real" workload suffers badly from this behaviour. The workload in question is mostly NUMA aware but spawns large numbers of threads that act as a worker pool that can be called from anywhere. These need to spread early to get reasonable behaviour. This patch limits how much a local node can fill before spilling over to another node and it will not be a universal win. Specifically, very short-lived workloads that fit within a NUMA node would prefer the memory bandwidth. As I cannot describe the "real" workload, the best proxy measure I found for illustration was a page fault microbenchmark. It's not representative of the workload but demonstrates the hazard of the current behaviour. pft timings 5.10.0-rc2 5.10.0-rc2 imbalancefloat-v2 forkspread-v2 Amean elapsed-1 46.37 ( 0.00%) 46.05 * 0.69%* Amean elapsed-4 12.43 ( 0.00%) 12.49 * -0.47%* Amean elapsed-7 7.61 ( 0.00%) 7.55 * 0.81%* Amean elapsed-12 4.79 ( 0.00%) 4.80 ( -0.17%) Amean elapsed-21 3.13 ( 0.00%) 2.89 * 7.74%* Amean elapsed-30 3.65 ( 0.00%) 2.27 * 37.62%* Amean elapsed-48 3.08 ( 0.00%) 2.13 * 30.69%* Amean elapsed-79 2.00 ( 0.00%) 1.90 * 4.95%* Amean elapsed-80 2.00 ( 0.00%) 1.90 * 4.70%* This is showing the time to fault regions belonging to threads. The target machine has 80 logical CPUs and two nodes. Note the ~30% gain when the machine is approximately the point where one node becomes fully utilised. The slower results are borderline noise. Kernel building shows similar benefits around the same balance point. Generally performance was either neutral or better in the tests conducted. The main consideration with this patch is the point where fork stops spreading a task so some workloads may benefit from different balance points but it would be a risky tuning parameter. Signed-off-by: Mel Gorman Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Link: https://lkml.kernel.org/r/20201120090630.3286-5-mgorman@techsingularity.net commit 7d2b5dd0bcc48095651f1b85f751eef610b3e034 Author: Mel Gorman Date: Fri Nov 20 09:06:29 2020 +0000 sched/numa: Allow a floating imbalance between NUMA nodes Currently, an imbalance is only allowed when a destination node is almost completely idle. This solved one basic class of problems and was the cautious approach. This patch revisits the possibility that NUMA nodes can be imbalanced until 25% of the CPUs are occupied. The reasoning behind 25% is somewhat superficial -- it's half the cores when HT is enabled. At higher utilisations, balancing should continue as normal and keep things even until scheduler domains are fully busy or over utilised. Note that this is not expected to be a universal win. Any benchmark that prefers spreading as wide as possible with limited communication will favour the old behaviour as there is more memory bandwidth. Workloads that communicate heavily in pairs such as netperf or tbench benefit. For the tests I ran, the vast majority of workloads saw a benefit so it seems to be a worthwhile trade-off. Signed-off-by: Mel Gorman Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Link: https://lkml.kernel.org/r/20201120090630.3286-4-mgorman@techsingularity.net commit 5c339005f854fa75aa46078ad640919425658b3e Author: Mel Gorman Date: Fri Nov 20 09:06:28 2020 +0000 sched: Avoid unnecessary calculation of load imbalance at clone time In find_idlest_group(), the load imbalance is only relevant when the group is either overloaded or fully busy but it is calculated unconditionally. This patch moves the imbalance calculation to the context it is required. Technically, it is a micro-optimisation but really the benefit is avoiding confusing one type of imbalance with another depending on the group_type in the next patch. No functional change. Signed-off-by: Mel Gorman Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Link: https://lkml.kernel.org/r/20201120090630.3286-3-mgorman@techsingularity.net commit abeae76a47005aa3f07c9be12d8076365622e25c Author: Mel Gorman Date: Fri Nov 20 09:06:27 2020 +0000 sched/numa: Rename nr_running and break out the magic number This is simply a preparation patch to make the following patches easier to read. No functional change. Signed-off-by: Mel Gorman Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Link: https://lkml.kernel.org/r/20201120090630.3286-2-mgorman@techsingularity.net commit 1187ffc41bcad915b5defdfd0ddad4acab9670d0 Author: Simon Ser Date: Fri Nov 20 11:06:22 2020 +0000 drm: fix kernel-doc warnings for SCALING_FILTER This patch fixes the following kernel-doc warnings: /home/simon/src/linux/Documentation/gpu/drm-kms:466: ./drivers/gpu/drm/drm_crtc.c:236: WARNING: Unexpected indentation. /home/simon/src/linux/Documentation/gpu/drm-kms:466: ./drivers/gpu/drm/drm_crtc.c:237: WARNING: Block quote ends without a blank line; unexpected unindent. /home/simon/src/linux/Documentation/gpu/drm-kms:472: ./drivers/gpu/drm/drm_blend.c:203: WARNING: Unexpected indentation. /home/simon/src/linux/Documentation/gpu/drm-kms:472: ./drivers/gpu/drm/drm_blend.c:204: WARNING: Block quote ends without a blank line; unexpected unindent. Signed-off-by: Simon Ser Fixes: 5c759eda9b04 ("drm: Introduce plane and CRTC scaling filter properties") Cc: Pankaj Bharadiya Cc: Jani Nikula Cc: Ville Syrjälä Cc: Uma Shankar Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/zJEUxNx4GwiY4FnqlVsuXdAWuH624SQ9VfN54NeH5E@cp7-web-043.plabs.ch commit c5a0609b064ceb5ffdec9c71825d4fc6a001c068 Author: Jonathan Marek Date: Fri Nov 20 21:58:08 2020 -0800 arm64: dts: qcom: sm8150-mtp: Enable WiFi node Enable the WiFi node and specify its supply regulators. Reviewed-by: Vinod Koul Signed-off-by: Jonathan Marek [bjorn: Extracted patch from larger HDK patch] Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20201121055808.582401-2-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit 05090bb9e53da0d4e913452c450cb5f55baad45a Author: Jonathan Marek Date: Fri Nov 20 21:58:07 2020 -0800 arm64: dts: qcom: sm8150: Add wifi node Add a node for the WCN3990 WiFi module. Reviewed-by: Vinod Koul Signed-off-by: Jonathan Marek [bjorn: Extracted patch from larger "misc" patch, added qdss clock] Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20201121055808.582401-1-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit 036e11092599131a10e34150b5b855ea86ccc546 Author: Bjorn Andersson Date: Fri Nov 20 21:56:03 2020 -0800 arm64: dts: qcom: sm8150-mtp: Specify remoteproc firmware Point the various remoteprocs of SM8150 MTP to a place with the platform specific firmware. Reviewed-by: Vinod Koul Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20201121055603.582281-1-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit 7ec8a926188eb8e7a3cbaca43ec44f2d7146d71b Author: Qinglang Miao Date: Thu Nov 19 15:08:42 2020 +0800 cw1200: fix missing destroy_workqueue() on error in cw1200_init_common Add the missing destroy_workqueue() before return from cw1200_init_common in the error handling case. Fixes: a910e4a94f69 ("cw1200: add driver for the ST-E CW1100 & CW1200 WLAN chipsets") Reported-by: Hulk Robot Signed-off-by: Qinglang Miao Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201119070842.1011-1-miaoqinglang@huawei.com commit 3c72d3843e223abdb3fc0f923a85238bd782df29 Author: Jisheng Zhang Date: Thu Nov 19 10:12:04 2020 +0800 mwifiex: Remove duplicated REG_PORT definition The REG_PORT is defined twice, so remove one of them. Signed-off-by: Jisheng Zhang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201119101204.72fd5f0a@xhacker.debian commit 8b2c13b2e5dab8f2ace44cc775096c6fae0a6f72 Author: Jia-Ju Bai Date: Thu Nov 19 09:52:18 2020 +0800 rtlwifi: rtl8723ae: avoid accessing the data mapped to streaming DMA In rtl8723e_tx_fill_cmddesc(), skb->data is mapped to streaming DMA on line 531: dma_addr_t mapping = dma_map_single(..., skb->data, ...); On line 534, skb->data is assigned to hdr after cast: struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)(skb->data); Then hdr->frame_control is accessed on line 535: __le16 fc = hdr->frame_control; This DMA access may cause data inconsistency between CPU and hardwre. To fix this bug, hdr->frame_control is accessed before the DMA mapping. Signed-off-by: Jia-Ju Bai Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201119015218.12220-1-baijiaju1990@gmail.com commit ff76548338947c2c45b7aaf1d182e331398279b7 Author: Jia-Ju Bai Date: Thu Nov 19 09:52:05 2020 +0800 rtlwifi: rtl8192de: avoid accessing the data mapped to streaming DMA In rtl92de_tx_fill_cmddesc(), skb->data is mapped to streaming DMA on line 667: dma_addr_t mapping = dma_map_single(..., skb->data, ...); On line 669, skb->data is assigned to hdr after cast: struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)(skb->data); Then hdr->frame_control is accessed on line 670: __le16 fc = hdr->frame_control; This DMA access may cause data inconsistency between CPU and hardwre. To fix this bug, hdr->frame_control is accessed before the DMA mapping. Signed-off-by: Jia-Ju Bai Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201119015205.12162-1-baijiaju1990@gmail.com commit c7ba0ea0df370975a484c30e711e8a483c1b96a4 Author: Jia-Ju Bai Date: Thu Nov 19 09:51:51 2020 +0800 rtlwifi: rtl8192ce: avoid accessing the data mapped to streaming DMA In rtl92ce_tx_fill_cmddesc(), skb->data is mapped to streaming DMA on line 530: dma_addr_t mapping = dma_map_single(..., skb->data, ...); On line 533, skb->data is assigned to hdr after cast: struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)(skb->data); Then hdr->frame_control is accessed on line 534: __le16 fc = hdr->frame_control; This DMA access may cause data inconsistency between CPU and hardwre. To fix this bug, hdr->frame_control is accessed before the DMA mapping. Signed-off-by: Jia-Ju Bai Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201119015151.12110-1-baijiaju1990@gmail.com commit 6df3c293d284655c72c1a72356ce4d32217a9c54 Author: Jia-Ju Bai Date: Thu Nov 19 09:51:27 2020 +0800 rtlwifi: rtl8188ee: avoid accessing the data mapped to streaming DMA In rtl88ee_tx_fill_cmddesc(), skb->data is mapped to streaming DMA on line 677: dma_addr_t mapping = dma_map_single(..., skb->data, ...); On line 680, skb->data is assigned to hdr after cast: struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)(skb->data); Then hdr->frame_control is accessed on line 681: __le16 fc = hdr->frame_control; This DMA access may cause data inconsistency between CPU and hardwre. To fix this bug, hdr->frame_control is accessed before the DMA mapping. Signed-off-by: Jia-Ju Bai Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201119015127.12033-1-baijiaju1990@gmail.com commit 00331758137245fd3478404ee81de40dfcb3b7de Author: Gustavo A. R. Silva Date: Tue Nov 17 10:09:58 2020 -0600 mwifiex: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201117160958.GA18807@embeddedor commit fb21d14694bd46a538258d86498736490b3ba855 Author: Zhang Changzhong Date: Tue Nov 17 11:07:34 2020 +0800 rsi: fix error return code in rsi_reset_card() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 17ff2c794f39 ("rsi: reset device changes for 9116") Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1605582454-39649-1-git-send-email-zhangchangzhong@huawei.com commit b6071c8914648703e7c7f7fd9d06a16a0ad030e9 Author: Eugen Hristev Date: Fri Nov 13 15:24:29 2020 +0200 pinctrl: at91-pio4: add support for fewer lines on last PIO bank Some products, like sama7g5, do not have a full last bank of PIO lines. In this case for example, sama7g5 only has 8 lines for the PE bank. PA0-31, PB0-31, PC0-31, PD0-31, PE0-7, in total 136 lines. To cope with this situation, added a data attribute that is product dependent, to specify the number of lines of the last bank. In case this number is different from the macro ATMEL_PIO_NPINS_PER_BANK, adjust the total number of lines accordingly. This will avoid advertising 160 lines instead of the actual 136, as this product supports, and to avoid reading/writing to invalid register addresses. Signed-off-by: Eugen Hristev Acked-by: Ludovic Desroches Link: https://lore.kernel.org/r/20201113132429.420940-1-eugen.hristev@microchip.com Signed-off-by: Linus Walleij commit 01c195de620bb6c3ecda0dbf295fe685d8232e10 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Mon Nov 16 03:06:35 2020 +0000 brcmsmac: ampdu: Check BA window size before checking block ack bindex can be out of BA window (64): tid 0 seq 2983, start_seq 2915, bindex 68, index 39 tid 0 seq 2984, start_seq 2915, bindex 69, index 40 tid 0 seq 2985, start_seq 2915, bindex 70, index 41 tid 0 seq 2986, start_seq 2915, bindex 71, index 42 tid 0 seq 2879, start_seq 2915, bindex 4060, index 63 tid 0 seq 2854, start_seq 2915, bindex 4035, index 38 tid 0 seq 2795, start_seq 2915, bindex 3976, index 43 tid 0 seq 2989, start_seq 2924, bindex 65, index 45 tid 0 seq 2992, start_seq 2924, bindex 68, index 48 tid 0 seq 2993, start_seq 2924, bindex 69, index 49 tid 0 seq 2994, start_seq 2924, bindex 70, index 50 tid 0 seq 2997, start_seq 2924, bindex 73, index 53 tid 0 seq 2795, start_seq 2941, bindex 3950, index 43 tid 0 seq 2921, start_seq 2941, bindex 4076, index 41 tid 0 seq 2929, start_seq 2941, bindex 4084, index 49 tid 0 seq 3011, start_seq 2946, bindex 65, index 3 tid 0 seq 3012, start_seq 2946, bindex 66, index 4 tid 0 seq 3013, start_seq 2946, bindex 67, index 5 In result isset() will try to dereference something on the stack, causing panics: BUG: unable to handle page fault for address: ffffa742800ed01f #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 6a4e9067 P4D 6a4e9067 PUD 6a4ec067 PMD 6a4ed067 PTE 0 Oops: 0000 [#1] PREEMPT SMP PTI CPU: 1 PID: 0 Comm: swapper/1 Kdump: loaded Not tainted 5.8.5-arch1-1-kdump #1 Hardware name: Apple Inc. MacBookAir3,1/Mac-942452F5819B1C1B, BIOS MBA31.88Z.0061.B07.1201241641 01/24/12 RIP: 0010:brcms_c_ampdu_dotxstatus+0x343/0x9f0 [brcmsmac] Code: 54 24 20 66 81 e2 ff 0f 41 83 e4 07 89 d1 0f b7 d2 66 c1 e9 03 0f b7 c9 4c 8d 5c 0c 48 49 8b 4d 10 48 8b 79 68 41 57 44 89 e1 <41> 0f b6 33 41 d3 e0 48 c7 c1 38 e0 ea c0 48 83 c7 10 44 21 c6 4c RSP: 0018:ffffa742800ecdd0 EFLAGS: 00010207 RAX: 0000000000000019 RBX: 000000000000000b RCX: 0000000000000006 RDX: 0000000000000ffe RSI: 0000000000000004 RDI: ffff8fc6ad776800 RBP: ffff8fc6855acb00 R08: 0000000000000001 R09: 00000000000005d9 R10: 00000000fffffffe R11: ffffa742800ed01f R12: 0000000000000006 R13: ffff8fc68d75a000 R14: 00000000000005db R15: 0000000000000019 FS: 0000000000000000(0000) GS:ffff8fc6aad00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffa742800ed01f CR3: 000000002480a000 CR4: 00000000000406e0 Call Trace: brcms_c_dpc+0xb46/0x1020 [brcmsmac] ? wlc_intstatus+0xc8/0x180 [brcmsmac] ? __raise_softirq_irqoff+0x1a/0x80 brcms_dpc+0x37/0xd0 [brcmsmac] tasklet_action_common.constprop.0+0x51/0xb0 __do_softirq+0xff/0x340 ? handle_level_irq+0x1a0/0x1a0 asm_call_on_stack+0x12/0x20 do_softirq_own_stack+0x5f/0x80 irq_exit_rcu+0xcb/0x120 common_interrupt+0xd1/0x200 asm_common_interrupt+0x1e/0x40 RIP: 0010:cpuidle_enter_state+0xb3/0x420 Check if the block is within BA window and only then check block's status. Otherwise as Behan wrote: "When I came back to Dublin I was courtmartialed in my absence and sentenced to death in my absence, so I said they could shoot me in my absence." Also reported: https://bbs.archlinux.org/viewtopic.php?id=258428 https://lore.kernel.org/linux-wireless/87tuwgi92n.fsf@yujinakao.com/ Reported-by: Yuji Nakao Signed-off-by: Dmitry Safonov Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201116030635.645811-1-dima@arista.com commit fa3622bbea10c5083ce4f84da79248d4e22fea4b Author: Remi Depommier Date: Sun Nov 15 19:16:39 2020 -0500 brcmfmac: Fix incorrect type in assignment The left-hand side of the assignment from cpu_to_le32() should be of type __le32. This commit clears the warning reported by sparse when building with C=1 CF="-D__CHECK_ENDIAN__". Fixes: d56fd83cf99c ("brcmfmac: fix SDIO access for big-endian host") Reported-by: kernel test robot Signed-off-by: Remi Depommier Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201116001639.31958-1-rde@setrix.com commit 31e07aa33fa7cdc93fa91c3f78f031e8d38862c2 Author: Wang Hai Date: Sat Nov 14 20:33:47 2020 +0800 qtnfmac: fix error return code in qtnf_pcie_probe() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: b7da53cd6cd1 ("qtnfmac_pcie: use single PCIe driver for all platforms") Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201114123347.29632-1-wanghai38@huawei.com commit 0409d504aa6c621629855f8ac72c29ac6fcebbf0 Author: Kaixu Xia Date: Sat Nov 14 13:45:35 2020 +0800 rtlwifi: rtl8192de: remove the useless value assignment The variable u4tmp is overwritten by the following call and the assignment is useless, so remove it. Reported-by: Tosk Robot Signed-off-by: Kaixu Xia Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1605332735-9648-1-git-send-email-kaixuxia@tencent.com commit a3d8a2599d47164a52af0d8ae2b50e60d41b2d75 Author: Sebastian Andrzej Siewior Date: Fri Nov 13 22:22:52 2020 +0100 orinoco: Annotate ezusb_read_ltv() ezusb_read_ltv() is always invoked via the ->read_ltv() callback. This callback is mostly invoked under orinoco_lock() which disables BH. There are a few invocations during probe which occur in preemptible context via: ezusb_probe() -> orinoco_init() -> determine_fw_capabilities() Extend `hermes_ops' with the ->read_ltv_pr callback which is implemented with the same callback like ->read_ltv on `hermes_ops_local'. On `ezusb_ops' ->read_ltv is used for callbacks under the lock which need to poll. The new ->read_ltv_pr() is used in the preemptible context in which it is possible to wait for the completion. Provide HERMES_READ_RECORD_PR() and hermes_read_wordrec_pr() which behave like their non _pr equivalents and invoke ->read_ltv_pr(). This removes the last user of ezusb_req_ctx_wait() and can now be removed. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201113212252.2243570-11-bigeasy@linutronix.de commit a9a2678abacbcae902b4fb4bc5585a621099cc06 Author: Sebastian Andrzej Siewior Date: Fri Nov 13 22:22:51 2020 +0100 orinoco: Annotate ezusb_docmd_wait() All invocations of ezusb_docmd_wait() happen via ->cmd_wait(). This callback is always invoked under the orinoco_lock() which disables BH. Use ezusb_req_ctx_wait_poll() for ezusb_docmd_wait() because it must not sleep. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201113212252.2243570-10-bigeasy@linutronix.de commit 47ab2a951eb9bdd532f3db89f64445058e37de34 Author: Sebastian Andrzej Siewior Date: Fri Nov 13 22:22:50 2020 +0100 orinoco: Remove ezusb_doicmd_wait() ezusb_doicmd_wait() is invoked via ->init_cmd_wait() callback. This callback is only invoked hermesi_program_init() and hermesi_program_end() which are the ->program_init() and ->program_end() callbacks as assigned by `hermes_ops_local'. They are never used by the USB interface since the USB interface provides its own set of callbacks by `ezusb_ops'. Replace ezusb_doicmd_wait() with a warning in case I missed the obvious. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201113212252.2243570-9-bigeasy@linutronix.de commit 39628fe48cb36b89955eb78e9247eb674155bc59 Author: Sebastian Andrzej Siewior Date: Fri Nov 13 22:22:49 2020 +0100 orinoco: Annotate ezusb_write_ltv() All invocation of ezusb_write_ltv() happen via ->write_ltv() and are performed under the orinoco_lock() which disables BH. Use ezusb_req_ctx_wait_poll() for ezusb_write_ltv() because it must not sleep. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201113212252.2243570-8-bigeasy@linutronix.de commit 154f2bae9bed3b07c4f328739361d9317122d199 Author: Sebastian Andrzej Siewior Date: Fri Nov 13 22:22:48 2020 +0100 orinoco: Annotate ezusb_read_pda() ezusb_read_pda() is invoked via ->read_pda() while firmware is loaded in preemtible context. Use ezusb_req_ctx_wait_compl() in ezusb_read_pda(). Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201113212252.2243570-7-bigeasy@linutronix.de commit 69476b25a4bac1186e9b6f091d5e3e9377a01f43 Author: Sebastian Andrzej Siewior Date: Fri Nov 13 22:22:47 2020 +0100 orinoco: Annotate firmware loading The ezusb_program() is invoked via ->program() in preemptible context during firmware loading. This is also true for the ->program_init() and ->program_end() callback. Use ezusb_req_ctx_wait_compl() in ezusb_program_init(), ezusb_program_bytes(), ezusb_program_end() which are part of firmware loading during device probe. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201113212252.2243570-6-bigeasy@linutronix.de commit 46233f77860480f34de658aa785e2b4b8fef6fdf Author: Sebastian Andrzej Siewior Date: Fri Nov 13 22:22:46 2020 +0100 orinoco: Annotate ezusb_init() ezusb_init() is always invoked in preemptible context during device probe. Only orinoco_up() -> orinoco_reinit_firmware() may invoke the function from atomic context but this is never used for the USB interface. Use ezusb_req_ctx_wait_compl() for the ezusb_write_ltv() and ezusb_docmd_wait() invocations from within ezusb_init(). Preserve the generic versions which have still other user via the callback. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201113212252.2243570-5-bigeasy@linutronix.de commit 29b2fe3f6f2071ba5b0dab709e3ffbf0eaa2a1e4 Author: Sebastian Andrzej Siewior Date: Fri Nov 13 22:22:45 2020 +0100 orinoco: Annotate ezusb_xmit() ezusb_xmit() sets ->in_rid in its request which means it does not wait for an answer. Use the ezusb_req_ctx_wait_skip() to denote that an answer is not expected. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201113212252.2243570-4-bigeasy@linutronix.de commit 915fd9db418f3f99c002dcca8a089923c96ec80a Author: Sebastian Andrzej Siewior Date: Fri Nov 13 22:22:44 2020 +0100 orinoco: Prepare stubs for in_interrupt() removal ezusb_access_ltv() sends the prepared request to the USB device. Requests which have ->in_rid set expect an answer from the USB device and the function has to wait until the URB with the answer arrives. The function uses in_interrupt() to determine if it can simply sleep on the completion and be woken up once the answer arrives or if it needs to poll on the completion. The usage of in_interrupt() in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be separated or the context be conveyed in an argument passed by the caller, which usually knows the context. Aside of that in_interrupt() is not correct as it does not catch preempt disabled regions in which sleeping is also not allowed. Provide stubs which can be used as a replacement. The current default is the current behaviour which sleeps/polls depending on in_interrupt(). The goal is to audit all callers and use either the poll or sleep version. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201113212252.2243570-3-bigeasy@linutronix.de commit a31eb615646a63370aa1da1053c45439c7653d83 Author: Sebastian Andrzej Siewior Date: Fri Nov 13 22:22:43 2020 +0100 orinoco: Move context allocation after processing the skb ezusb_xmit() allocates a context which is leaked if orinoco_process_xmit_skb() returns an error. Move ezusb_alloc_ctx() after the invocation of orinoco_process_xmit_skb() because the context is not needed so early. ezusb_access_ltv() will cleanup the context in case of an error. Fixes: bac6fafd4d6a0 ("orinoco: refactor xmit path") Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201113212252.2243570-2-bigeasy@linutronix.de commit 37ff144d29acd7bca3d465ce2fc4cb5c7072a7e5 Author: Zhang Changzhong Date: Fri Nov 13 14:28:16 2020 +0800 brcmfmac: fix error return code in brcmf_cfg80211_connect() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 3b1e0a7bdfee ("brcmfmac: add support for SAE authentication offload") Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Reviewed-by: Chi-hsien Lin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1605248896-16812-1-git-send-email-zhangchangzhong@huawei.com commit 07f995ca1951604755cd9e76c8129222d6300120 Author: Yejune Deng Date: Tue Nov 10 14:58:11 2020 +0800 cw1200: replace a set of atomic_add() a set of atomic_inc() looks more readable Signed-off-by: Yejune Deng Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1604991491-27908-1-git-send-email-yejune.deng@gmail.com commit c0802b721c7d3257aeb459c3a6b8036e91851ee4 Merge: a1158e36f876f 0b74e40a4e41f Author: Linus Walleij Date: Tue Nov 24 15:38:07 2020 +0100 Merge tag 'intel-pinctrl-v5.11-1' of gitolite.kernel.org:pub/scm/linux/kernel/git/pinctrl/intel into devel intel-pinctrl for v5.11-1 * Add Intel Alder Lake-S pin controller support * Add Intel Elkhart Lake pin controller support * Add Intel Lakefield driver pin controller support * Miscellaneous fixes for Intel Lynxpoint driver The following is an automated git shortlog grouped by driver: intel: - Add Intel Alder Lake-S pin controller support - Add Intel Elkhart Lake pin controller support - Add blank line before endif in Kconfig - Add Intel Lakefield pin controller support lynxpoint: - Enable pin configuration setting for GPIO chip - Use defined constant for disabled bias explicitly - Unify initcall location in the code commit 15b8d9372f27c47e17c91f6f16d359314cf11404 Author: Geert Uytterhoeven Date: Tue Nov 24 14:06:56 2020 +0100 sh/irq: Add missing closing parentheses in arch_show_interrupts() arch/sh/kernel/irq.c: In function ‘arch_show_interrupts’: arch/sh/kernel/irq.c:47:58: error: expected ‘)’ before ‘;’ token 47 | seq_printf(p, "%10u ", per_cpu(irq_stat.__nmi_count, j); | ^ Fixes: fe3f1d5d7cd3062c ("sh: Get rid of nmi_count()") Signed-off-by: Geert Uytterhoeven Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201124130656.2741743-1-geert+renesas@glider.be commit 036b7334ee6dc10115fbaebd8b04c9e4a17eccb2 Author: Michael Klein Date: Mon Nov 23 12:45:35 2020 +0100 ARM: dts: sun8i-h2-plus-bananapi-m2-zero: add gpio-line-names Add gpio-line-names as documented in the Banana Pi wiki [1] and in the schematics [2]. [1]: http://wiki.banana-pi.org/Banana_Pi_BPI-M2_ZERO#GPIO_PIN_define [2]: https://drive.google.com/file/d/0B4PAo2nW2KfnMW5sVkxWSW9qa28/view Signed-off-by: Michael Klein Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20201123114535.1605939-1-michael@fossekall.de commit 8223e885e74b6424cd5b0ab1de4581ca017b7a4e Author: Fabio Estevam Date: Mon Nov 23 17:30:04 2020 -0300 mmc: mxc: Convert the driver to DT-only Since 5.10-rc1 i.MX is a devicetree-only platform, so simplify the code by removing the unused non-DT support. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20201123203004.18792-1-festevam@gmail.com Signed-off-by: Ulf Hansson commit d33b5b6857204578e308b6c8f8e060a6c92cb183 Author: Fabio Estevam Date: Mon Nov 23 16:19:56 2020 -0300 mmc: mxs: Remove the unused .id_table The mxs-mmc driver is only used by DT platforms and the .id_table is unused. Get rid of it to simplify the code. While at it, use of_device_get_match_data() to retrieve the driver data. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20201123191956.10542-1-festevam@gmail.com Signed-off-by: Ulf Hansson commit a6f483b2e4415bca7af90346204f93f63b90acdd Author: Marek Szyprowski Date: Tue Nov 24 14:15:23 2020 +0100 spi: Fix potential NULL pointer dereference in spi_shutdown() Shutdown bus function might be called on the unbound device, so add a check if there is a driver before calling its shutdown function. This fixes following kernel panic obserbed during system reboot: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000018 ... Call trace: spi_shutdown+0x10/0x38 kernel_restart_prepare+0x34/0x40 kernel_restart+0x14/0x88 __do_sys_reboot+0x148/0x248 __arm64_sys_reboot+0x1c/0x28 el0_svc_common.constprop.3+0x74/0x198 do_el0_svc+0x20/0x98 el0_sync_handler+0x140/0x1a8 el0_sync+0x140/0x180 Code: f9403402 d1008041 f100005f 9a9f1021 (f9400c21) ---[ end trace 266c07205a2d632e ]--- Fixes: 9db34ee64ce4 (spi: Use bus_type functions for probe, remove and shutdown) Signed-off-by: Marek Szyprowski Link: https://lore.kernel.org/r/20201124131523.32287-1-m.szyprowski@samsung.com Signed-off-by: Mark Brown commit a3096ec649ea77a921d7612f71aa926d822641f5 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:37:13 2020 -0600 mmc: sdhci-of-arasan: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Acked-by: Michal Simek Link: https://lore.kernel.org/r/387cab3a466038aa5d1fc34b8b6a7c4f693826ea.1605896060.git.gustavoars@kernel.org Signed-off-by: Ulf Hansson commit 34c5aa2666db54c4bd330fb2759f6e4d4544ad7a Author: John Stultz Date: Mon Nov 23 22:23:59 2020 +0000 regulator: Kconfig: Fix REGULATOR_QCOM_RPMH dependencies to avoid build error The kernel test robot reported the following build error: All errors (new ones prefixed by >>): xtensa-linux-ld: drivers/regulator/qcom-rpmh-regulator.o: in function `rpmh_regulator_vrm_get_voltage_sel': qcom-rpmh-regulator.c:(.text+0x270): undefined reference to `rpmh_write' xtensa-linux-ld: drivers/regulator/qcom-rpmh-regulator.o: in function `rpmh_regulator_send_request': qcom-rpmh-regulator.c:(.text+0x2f2): undefined reference to `rpmh_write' xtensa-linux-ld: drivers/regulator/qcom-rpmh-regulator.o: in function `rpmh_regulator_vrm_get_voltage_sel': >> qcom-rpmh-regulator.c:(.text+0x274): undefined reference to `rpmh_write_async' xtensa-linux-ld: drivers/regulator/qcom-rpmh-regulator.o: in function `rpmh_regulator_send_request': qcom-rpmh-regulator.c:(.text+0x2fc): undefined reference to `rpmh_write_async' Which is due to REGULATOR_QCOM_RPMH depending on QCOM_RPMH || COMPILE_TEST. The problem is that QOM_RPMH can now be a module, which in that case requires REGULATOR_QCOM_RPMH=m to build. However, if COMPILE_TEST is enabled, REGULATOR_QCOM_RPMH can be set to =y while QCOM_RPMH=m which will cause build failures. The fix here is to add (QCOM_RPMH=n && COMPILE_TEST) to the dependency. Feedback would be appreciated! Cc: Todd Kjos Cc: Saravana Kannan Cc: Andy Gross Cc: Bjorn Andersson Cc: Rajendra Nayak Cc: Maulik Shah Cc: Stephen Boyd Cc: Liam Girdwood Cc: Mark Brown Cc: linux-arm-msm@vger.kernel.org Reported-by: kernel test robot Signed-off-by: John Stultz Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20201123222359.103822-1-john.stultz@linaro.org Signed-off-by: Mark Brown commit e6e9354b58307c120afbdc2719a6093638c37446 Author: Philippe Duplessis-Guindon Date: Tue Nov 24 08:57:30 2020 -0500 regmap: Remove duplicate `type` field from regmap `regcache_sync` trace event I have an error saying that `regcache_sync` has 2 fields named `type` while using libtraceevent. Erase the `int field` type, which is not assigned. This field is introduced by mistake and this commit removes it. Fixes: 593600890110c ("regmap: Add the regcache_sync trace event") Signed-off-by: Philippe Duplessis-Guindon Link: https://lore.kernel.org/r/20201124135730.9185-1-pduplessis@efficios.com Signed-off-by: Mark Brown commit 4785cff7cb9c8bcbff3891013d2f8eb973d676f3 Author: Stephen Boyd Date: Sat Nov 21 19:41:49 2020 -0800 arm64: dts: sdm845: Add iommus property to qup The SMMU that sits in front of the QUP needs to be programmed properly so that the i2c geni driver can allocate DMA descriptors. Failure to do this leads to faults when using devices such as an i2c touchscreen where the transaction is larger than 32 bytes and we use a DMA buffer. arm-smmu 15000000.iommu: Unexpected global fault, this could be serious arm-smmu 15000000.iommu: GFSR 0x00000002, GFSYNR0 0x00000002, GFSYNR1 0x000006c0, GFSYNR2 0x00000000 Add the right SID and mask so this works. Reviewed-by: Vinod Koul Tested-by: Caleb Connolly Tested-by: Vinod Koul Signed-off-by: Stephen Boyd [bjorn: Define for second QUP as well, be more specific in sdm845.dtsi] Link: https://lore.kernel.org/r/20201122034149.626045-1-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit 6acb71fd344adb08633b2b1d8261a876fbd2bb18 Author: Jonathan Marek Date: Mon Nov 23 23:10:03 2020 -0500 arm64: dts: qcom: sort sm8150 usb_2 node Fix an error introduced resolving conflicts with camnoc_virt node. Fixes: 0c9dde0d2015 ("arm64: dts: qcom: sm8150: Add secondary USB and PHY nodes") Signed-off-by: Jonathan Marek Link: https://lore.kernel.org/r/20201124041003.3600-1-jonathan@marek.ca Signed-off-by: Bjorn Andersson commit 7e015a279853e747f5d4f957855ec5310848c501 Author: Thomas Gleixner Date: Wed Nov 18 20:48:46 2020 +0100 x86/crashdump/32: Simplify copy_oldmem_page() Replace kmap_atomic_pfn() with kmap_local_pfn() which is preemptible and can take page faults. Remove the indirection of the dump page and the related cruft which is not longer required. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20201118204007.670851839@linutronix.de commit e66f6e095486f0210fcf3c5eb3ecf13fa348be4c Author: Thomas Gleixner Date: Wed Nov 18 20:48:45 2020 +0100 io-mapping: Provide iomap_local variant Similar to kmap local provide a iomap local variant which only disables migration, but neither disables pagefaults nor preemption. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20201118204007.561220818@linutronix.de commit f3ba3c710ac5a30cd058615a9eb62d2ad95bb782 Author: Thomas Gleixner Date: Wed Nov 18 20:48:44 2020 +0100 mm/highmem: Provide kmap_local* Now that the kmap atomic index is stored in task struct provide a preemptible variant. On context switch the maps of an outgoing task are removed and the map of the incoming task are restored. That's obviously slow, but highmem is slow anyway. The kmap_local.*() functions can be invoked from both preemptible and atomic context. kmap local sections disable migration to keep the resulting virtual mapping address correct, but disable neither pagefaults nor preemption. A wholesale conversion of kmap_atomic to be fully preemptible is not possible because some of the usage sites might rely on the preemption disable for serialization or on the implicit pagefault disable. Needs to be done on a case by case basis. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20201118204007.468533059@linutronix.de commit 5fbda3ecd14a5343644979c98d6eb65b7e7de9d8 Author: Thomas Gleixner Date: Wed Nov 18 20:48:43 2020 +0100 sched: highmem: Store local kmaps in task struct Instead of storing the map per CPU provide and use per task storage. That prepares for local kmaps which are preemptible. The context switch code is preparatory and not yet in use because kmap_atomic() runs with preemption disabled. Will be made usable in the next step. The context switch logic is safe even when an interrupt happens after clearing or before restoring the kmaps. The kmap index in task struct is not modified so any nesting kmap in an interrupt will use unused indices and on return the counter is the same as before. Also add an assert into the return to user space code. Going back to user space with an active kmap local is a nono. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20201118204007.372935758@linutronix.de commit 14df32670291588036a498051a54cd8462d7f611 Author: Thomas Gleixner Date: Wed Nov 18 20:48:41 2020 +0100 x86: Support kmap_local() forced debugging kmap_local() and related interfaces are NOOPs on 64bit and only create temporary fixmaps for highmem pages on 32bit. That means the test coverage for this code is pretty small. CONFIG_KMAP_LOCAL can be enabled independent from CONFIG_HIGHMEM, which allows to provide support for enforced kmap_local() debugging even on 64bit. For 32bit the support is unconditional, for 64bit it's only supported when CONFIG_NR_CPUS <= 4096 as supporting it for 8192 CPUs would require to set up yet another fixmap PGT. If CONFIG_KMAP_LOCAL_FORCE_DEBUG is enabled then kmap_local()/kmap_atomic() will use the temporary fixmap mapping path. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20201118204007.169209557@linutronix.de commit 0e91a0c6984c837a7c6760e3f28e8e1c532abf87 Author: Thomas Gleixner Date: Wed Nov 18 20:48:40 2020 +0100 mm/highmem: Provide CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP CONFIG_DEBUG_KMAP_LOCAL, which is selected by CONFIG_DEBUG_HIGHMEM is only providing guard pages, but does not provide a mechanism to enforce the usage of the kmap_local() infrastructure. Provide CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP which forces the temporary mapping even for lowmem pages. This needs to be a seperate config switch because this only works on architectures which do not have cache aliasing problems. Suggested-by: Linus Torvalds Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20201118204007.028261233@linutronix.de commit 6e799cb69a70eedbb41561b750f7180c12cff280 Author: Thomas Gleixner Date: Wed Nov 18 20:48:39 2020 +0100 mm/highmem: Provide and use CONFIG_DEBUG_KMAP_LOCAL CONFIG_KMAP_LOCAL can be enabled by x86/32bit even if CONFIG_HIGHMEM is not enabled for temporary MMIO space mappings. Provide it as a seperate config option which depends on CONFIG_KMAP_LOCAL and let CONFIG_DEBUG_HIGHMEM select it. This won't increase the debug coverage of this significantly but it paves the way to do so. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20201118204006.869487226@linutronix.de commit 72ceec58685f8a5c2ec22d9617c7b1e239e2e809 Author: Vasiliy Kupriakov Date: Sat Aug 29 00:49:30 2020 +0300 platform/x86: asus-wmi: Add userspace notification for performance mode change When user presses Fn-F5, the driver automatically changes throttle thermal policy (or fan boost mode, depending on laptop model). It would be convenient for userspace software to be able to poll on corresponding sysfs variable. For example, to show a notification about mode change. Note that there is currently no way to handle Fn-F5 from userspace directly, driver does not pass it. Signed-off-by: Vasiliy Kupriakov Link: https://lore.kernel.org/r/20200828214932.20866-2-rublag-ns@yandex.ru Signed-off-by: Hans de Goede commit aeaaf005da1de075929e56562dced4a58238efc4 Author: Andy Lutomirski Date: Mon Nov 2 11:51:11 2020 -0800 selftests/x86: Add missing .note.GNU-stack sections Several of the x86 selftests end up with executable stacks because the asm was missing the annotation that says that they are modern and don't need executable stacks. Add the annotations. Signed-off-by: Andy Lutomirski Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/6f043c03e9e0e4557e1e975a63b07a4d18965a68.1604346596.git.luto@kernel.org commit 716572b0003ef67a4889bd7d85baf5099c5a0248 Author: Andy Lutomirski Date: Mon Nov 2 11:51:10 2020 -0800 selftests/x86/fsgsbase: Fix GS == 1, 2, and 3 tests Setting GS to 1, 2, or 3 causes a nonsensical part of the IRET microcode to change GS back to zero on a return from kernel mode to user mode. The result is that these tests fail randomly depending on when interrupts happen. Detect when this happens and let the test pass. Signed-off-by: Andy Lutomirski Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/7567fd44a1d60a9424f25b19a998f12149993b0d.1604346596.git.luto@kernel.org commit bb81dcd4eda208d00c3dc3372792da497813e958 Author: Hans de Goede Date: Tue Nov 24 12:04:54 2020 +0100 platform/x86: touchscreen_dmi: Add info for the Irbis TW118 tablet Add touchscreen info for the Irbis TW118 tablet. Reported-and-tested-by: russianneuromancer Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20201124110454.114286-1-hdegoede@redhat.com commit 07b211992d6c0d80b321403244d43bbd2d6cf48c Author: Max Verevkin Date: Tue Nov 24 15:16:52 2020 +0200 platform/x86: intel-vbtn: Support for tablet mode on HP Pavilion 13 x360 PC The Pavilion 13 x360 PC has a chassis-type which does not indicate it is a convertible, while it is actually a convertible. Add it to the dmi_switches_allow_list. Signed-off-by: Max Verevkin Link: https://lore.kernel.org/r/20201124131652.11165-1-me@maxverevkin.tk Signed-off-by: Hans de Goede commit 96adb419099cc042962c66cec6cd2ad905fee181 Author: Benjamin Berg Date: Mon Nov 23 14:21:57 2020 +0100 platform/x86: thinkpad_acpi: Send tablet mode switch at wakeup time The lid state may change while the machine is suspended. As such, we may need to re-check the state at wake-up time (at least when waking up from hibernation). Add the appropriate call to the resume handler in order to sync the SW_TABLET_MODE switch state with the hardware state. Fixes: dda3ec0aa631 ("platform/x86: thinkpad_acpi: Implement tablet mode using GMMS method") BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=210269 Signed-off-by: Benjamin Berg Acked-by: Henrique de Moraes Holschuh Link: https://lore.kernel.org/r/20201123132157.866303-1-benjamin@sipsolutions.net Signed-off-by: Hans de Goede commit bf753400280d1384abb783efc0b42c491d6deec3 Author: Hans de Goede Date: Mon Nov 23 16:16:25 2020 +0100 platform/x86: acer-wmi: Add ACER_CAP_KBD_DOCK quirk for the Aspire Switch 10E SW3-016 Add the Acer Aspire Switch 10E SW3-016 to the list of models which use the Acer Switch WMI interface for reporting SW_TABLET_MODE. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20201123151625.5530-1-hdegoede@redhat.com commit 5af8be6b0c7e49124cd04ad144d3aae615e3daea Author: Kaixu Xia Date: Sun Nov 22 13:49:37 2020 +0800 platform/x86: toshiba_acpi: Fix the wrong variable assignment The commit 78429e55e4057 ("platform/x86: toshiba_acpi: Clean up variable declaration") cleans up variable declaration in video_proc_write(). Seems it does the variable assignment in the wrong place, this results in dead code and changes the source code logic. Fix it by doing the assignment at the beginning of the funciton. Fixes: 78429e55e4057 ("platform/x86: toshiba_acpi: Clean up variable declaration") Reported-by: Tosk Robot Signed-off-by: Kaixu Xia Link: https://lore.kernel.org/r/1606024177-16481-1-git-send-email-kaixuxia@tencent.com Signed-off-by: Hans de Goede commit 25df3e1f64f54cfb4b23ff3ed1292c3eba94b22e Author: Jisheng Zhang Date: Mon Nov 9 17:05:29 2020 +0800 arm64: dts: hisilicon: Use generic "ngpios" rather than "snps,nr-gpios" This is to remove similar errors as below: OF: /.../gpio-port@0: could not find phandle Commit 7569486d79ae ("gpio: dwapb: Add ngpios DT-property support") explained the reason of above errors well and added the generic "ngpios" property, let's use it. Signed-off-by: Jisheng Zhang Reviewed-by: Linus Walleij Signed-off-by: Wei Xu commit 4dc5288f5a5a60daaf9fbc56bed9b127f6e7e60f Author: Serge Semin Date: Wed Nov 11 12:15:50 2020 +0300 arm64: dts: hi3660: Harmonize DWC USB3 DT nodes name In accordance with the DWC USB3 bindings the corresponding node name is suppose to comply with the Generic USB HCD DT schema, which requires the USB nodes to have the name acceptable by the regexp: "^usb(@.*)?" . Make sure the "snps,dwc3"-compatible nodes are correctly named. Signed-off-by: Serge Semin Acked-by: Krzysztof Kozlowski Signed-off-by: Wei Xu commit c4cbd0356c60c71dd717bd0c3825bb0646a6d347 Author: Zhen Lei Date: Mon Oct 12 21:17:39 2020 +0800 arm64: dts: hisilicon: list all clocks required by snps-dw-apb-uart.yaml The snps,dw-apb-uart binding need to specify two clocks: "baudclk", "apb_pclk". But only "apb_pclk" is specified now. Because the driver preferentially matches the first clock. Otherwise, it matches the second clock instead of both clocks. So both of them use the same clock don't change the function. Signed-off-by: Zhen Lei Signed-off-by: Wei Xu commit 58dd4736b8c716984a15a996e432484921e1c1e9 Author: Zhen Lei Date: Mon Oct 12 21:17:38 2020 +0800 arm64: dts: hisilicon: list all clocks required by pl011.yaml The arm,pl011 binding need to specify two clocks: "uartclk", "apb_pclk". But only "apb_pclk" is specified now. Because the driver preferentially matches the first clock. Otherwise, it matches the second clock instead of both clocks. So both of them use the same clock don't change the function. Signed-off-by: Zhen Lei Signed-off-by: Wei Xu commit c85731abd6946234c9359212fff1d5f0b3013852 Author: Zhen Lei Date: Mon Oct 12 21:17:37 2020 +0800 arm64: dts: hisilicon: list all clocks required by spi-pl022.yaml The arm,pl022 binding need to specify two clocks: "sspclk", "apb_pclk". But only "apb_pclk" is specified now. Because the driver preferentially matches the first clock. Otherwise, it matches the second clock instead of both clocks. So both of them use the same clock don't change the function. Signed-off-by: Zhen Lei Signed-off-by: Wei Xu commit bf69b8622b940feaf61a266e304e90722875b588 Author: Zhen Lei Date: Mon Oct 12 21:17:36 2020 +0800 arm64: dts: hisilicon: normalize the node name of the UART devices Change the node name of the UART devices to match "^serial(@[0-9a-f,]+)*$". Signed-off-by: Zhen Lei Signed-off-by: Wei Xu commit 4d2b9b98e3265a464445f9bbaa6d24213845a594 Author: Zhen Lei Date: Mon Oct 12 21:17:35 2020 +0800 arm64: dts: hisilicon: normalize the node name of the usb devices Change the node name of the usb devices to match "^usb(@.*)?". These errors are detected by generic-ehci.yaml and generic-ohci.yaml. Signed-off-by: Zhen Lei Signed-off-by: Wei Xu commit d7d45d5d116739eea6174798a0147b8e51a2e719 Author: Zhen Lei Date: Mon Oct 12 21:17:34 2020 +0800 arm64: dts: hisilicon: normalize the node name of the SMMU devices Change the node name of the SMMU devices to match "^iommu@[0-9a-f]*". Otherwise, the errors similar to the following will be reported by arm,smmu-v3.yaml. smmu_pcie: $nodename:0: 'smmu_pcie' does not match '^iommu@[0-9a-f]*' Signed-off-by: Zhen Lei Signed-off-by: Wei Xu commit ee6ff04f7fe93e46b54d0b2782c7642bb1573f77 Author: Zhen Lei Date: Mon Oct 12 21:17:33 2020 +0800 arm64: dts: hisilicon: place clock-names "biu" before "ciu" Look at the clock-names schema defined in synopsys-dw-mshc.yaml: clock-names: items: - const: biu - const: ciu The "biu" needs to be placed before the "ciu". Signed-off-by: Zhen Lei Signed-off-by: Wei Xu commit 60780744d959b70fee31c053dbe7ae4a0387a8b2 Author: Zhen Lei Date: Mon Oct 12 21:17:32 2020 +0800 arm64: dts: hisilicon: remove unused property pinctrl-names uart1 and uart5 are not used as pinctrl, so the property "pinctrl-names" can be deleted. In fact, the property "pinctrl-names" depends on the property "pinctrl-0". So the errors similar to the following will be reported by pinctrl-consumer.yaml. serial@fdf00000: 'pinctrl-0' is a dependency of 'pinctrl-names' Signed-off-by: Zhen Lei Signed-off-by: Wei Xu commit 8c563f55ee1d0241b834dd4b43be11cf7a47732b Author: Zhen Lei Date: Mon Oct 12 21:17:31 2020 +0800 arm64: dts: hisilicon: write the values of property-units into a uint32 array Use <> to separate the values of property-units will be treated as multiple arrays. The errors similar to the following will be reported by property-units.yaml. ufs@ff3c0000: freq-table-hz: [[0, 0], [0, 0]] is too long Signed-off-by: Zhen Lei Signed-off-by: Wei Xu commit 24402ce1e26e303ce2049e783a4fc3f6e122e169 Author: Zhen Lei Date: Mon Oct 12 21:17:30 2020 +0800 arm64: dts: hisilicon: separate each group of data in the property "reg" Do not write the "reg" of multiple groups of data into a uint32 array, use <> to separate them. Otherwise, the errors similar to the following will be reported by reg.yaml. soc: dsa@c7000000:reg:0: [0, 3305111552, 0, 8978432, 0, 3338665984, 0, \ 6291456] is too long Signed-off-by: Zhen Lei Signed-off-by: Wei Xu commit c25b846425e34929c6201ef0592444147e65fbb3 Author: Zhen Lei Date: Mon Oct 12 21:17:29 2020 +0800 arm64: dts: hisilicon: normalize the node name of the ITS devices Change the node name of the ITS devices to match "^(msi-controller|gic-its|interrupt-controller)@[0-9a-f]+$". Although "interrupt-controller" is allowed, but "msi-controller" is preferred. Otherwise, "interrupt-controller@b7000000: False schema does not allow" will be reported by arm,gic-v3.yaml. Signed-off-by: Zhen Lei Signed-off-by: Wei Xu commit b970b732ff4f0d9c88361a3e5bb239f7822f719b Author: Maximilian Luz Date: Fri Nov 13 23:39:35 2020 +0100 platform/surface: gpe: Add support for 15" Intel version of Surface Laptop 3 In addition to a 13" version, there is also a 15" (business) version of the Surface Laptop 3 based on Intel CPUs. This version also handles wakeup by lid via (unmarked) GPEs, so add support for it as well. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20201113223935.2073847-1-luzmaximilian@gmail.com Signed-off-by: Hans de Goede commit d3d73d25e0d9bc43fd2a6f4b4e58ff182e55b217 Author: Dan Carpenter Date: Tue Nov 17 10:22:51 2020 +0300 platform/x86: pmt: Fix a potential Oops on error in probe The "ns->attr_grp" pointer can be NULL so this error handling code needs to check for that to avoid an Oops. Fixes: e2729113ce66 ("platform/x86: Intel PMT class driver") Signed-off-by: Dan Carpenter Reviewed-by: David E. Box Link: https://lore.kernel.org/r/20201117072251.GC1111239@mwanda Signed-off-by: Hans de Goede commit d48b6ef74ab06c5b29bd9ee9e830bdc639b196ee Author: Zhen Lei Date: Mon Oct 12 14:12:23 2020 +0800 ARM: dts: hisilicon: fix errors detected by syscon.yaml The DT binding for system controller is not allowed to contain only the compatible string "syscon", the Hisilicon peripheral subsystem controller should add compatible string "hisilicon,peri-subctrl". Otherwise, the error "compatible: ['syscon'] is too short" will be reported. Signed-off-by: Zhen Lei Signed-off-by: Wei Xu commit 4c246408f0bdbc4100c95a5dad9e0688b4a3cfd0 Author: Zhen Lei Date: Mon Oct 12 14:12:22 2020 +0800 ARM: dts: hisilicon: fix errors detected by spi-pl022.yaml 1. Change clock-names to "sspclk", "apb_pclk". Both of them use the same clock. Signed-off-by: Zhen Lei Signed-off-by: Wei Xu commit 05484c171d39433daa8b75c0c4c5fb454091e9b7 Author: Zhen Lei Date: Mon Oct 12 14:12:21 2020 +0800 ARM: dts: hisilicon: fix errors detected by synopsys-dw-mshc.yaml Look at the clock-names schema defined in synopsys-dw-mshc.yaml: clock-names: items: - const: biu - const: ciu The "biu" needs to be placed before the "ciu". Signed-off-by: Zhen Lei Signed-off-by: Wei Xu commit e0b09c35ae072be666bdd847dddf9a51bd4d57dc Author: Zhen Lei Date: Mon Oct 12 14:12:20 2020 +0800 ARM: dts: hisilicon: fix errors detected by root-node.yaml Make the memory node name match the regex "^memory(@[0-9a-f]+)?$" which is described in memory.yaml. Otherwise, it will be treated as root node, and misreported by root-node.yaml. Errors misreported by root-node.yaml: /: memory: False schema does not allow {'device_type': ['memory'], 'reg': Signed-off-by: Zhen Lei Signed-off-by: Wei Xu commit 8e9e8dd7ce093344a89792deaeb6caedde636dcf Author: Zhen Lei Date: Mon Oct 12 14:12:19 2020 +0800 ARM: dts: hisilicon: fix errors detected by simple-bus.yaml Change bus node name from "amba" to "amba-bus" to match '^([a-z][a-z0-9\\-]+-bus|bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$' Signed-off-by: Zhen Lei Signed-off-by: Wei Xu commit 64f5b52554a1de47a53972a47b9b58d8d66ee5aa Author: Zhen Lei Date: Mon Oct 12 14:12:18 2020 +0800 ARM: dts: hisilicon: fix errors detected by usb yaml 1. Change node name to match '^usb(@.*)?' These errors are detected by generic-ehci.yaml and generic-ohci.yaml. Signed-off-by: Zhen Lei Signed-off-by: Wei Xu commit e5e225fd495ef1dffc64b81b2094e427f9cc4016 Author: Zhen Lei Date: Mon Oct 12 14:12:17 2020 +0800 ARM: dts: hisilicon: fix errors detected by pl011.yaml 1. Change node name to match '^serial(@[0-9a-f,]+)*$' 2. Change clock-names to "uartclk", "apb_pclk". Both of them use the same clock. 3. Change pinctrl-names to "default", "sleep". Signed-off-by: Zhen Lei Signed-off-by: Wei Xu commit 30ea026e33c6dda48849d9fe0d15c1d280a92d53 Author: Zhen Lei Date: Mon Oct 12 14:12:16 2020 +0800 ARM: dts: hisilicon: fix errors detected by snps-dw-apb-uart.yaml 1. Change node name to match '^serial(@[0-9a-f,]+)*$' 2. Change clock-names to "baudclk", "apb_pclk". Both of them use the same clock. Signed-off-by: Zhen Lei Signed-off-by: Wei Xu commit 0f1d9961d64faf819f79c471b74e53c63c9209fc Author: Ben Chuang Date: Mon Nov 23 13:37:02 2020 +0800 mmc: sdhci-pci-gli: Reduce power consumption for GL9755 For GL9755, reduce power consumption by lowering the LFCLK and disabling the DMACLK on low-power. Signed-off-by: Ben Chuang Link: https://lore.kernel.org/r/20201123053702.6083-1-benchuanggli@gmail.com Signed-off-by: Ulf Hansson commit b61d468d969f74acf704b3ec61c29c46b825e0c5 Author: Krzysztof Kozlowski Date: Sun Nov 22 13:00:56 2020 +0100 mmc: mediatek: depend on COMMON_CLK to fix compile tests The MFD_OMAP_USB_HOST uses Common Clock Framework thus it cannot be built on platforms without it (e.g. compile test on MIPS with LANTIQ): mips-linux-ld: drivers/mmc/host/mtk-sd.o: in function `msdc_ops_set_ios': mtk-sd.c:(.text+0x2bbc): undefined reference to `clk_get_parent' Reported-by: kernel test robot Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201122120056.100045-1-krzk@kernel.org Signed-off-by: Ulf Hansson commit d7b819b5d33869d41bdaa427aeb98ae24c57a38b Author: Zhihao Cheng Date: Sat Nov 21 10:14:31 2020 +0800 mmc: pxamci: Fix error return code in pxamci_probe Fix to return the error code from devm_gpiod_get_optional() instaed of 0 in pxamci_probe(). Fixes: f54005b508b9a9d9c ("mmc: pxa: Use GPIO descriptor for power") Reported-by: Hulk Robot Signed-off-by: Zhihao Cheng Link: https://lore.kernel.org/r/20201121021431.3168506-1-chengzhihao1@huawei.com Signed-off-by: Ulf Hansson commit c5b1c6dc13daec60405ecd31eaa5379a9f798fa8 Author: Jeremy Linton Date: Fri Nov 20 17:38:31 2020 -0600 mmc: sdhci: Update firmware interface API The device_* calls were added a few years ago to abstract DT/ACPI/fwnode firmware interfaces. Lets convert the two sdhci caps fields to use the generic calls rather than the OF specific ones. This has the side effect of allowing ACPI based devices to quirk themselves when the caps field is broken. Signed-off-by: Jeremy Linton Link: https://lore.kernel.org/r/20201120233831.447365-1-jeremy.linton@arm.com Signed-off-by: Ulf Hansson commit e1062fa7292f1e3744db0a487c4ac0109e09b03d Author: Cristian Birsan Date: Wed Nov 18 14:00:19 2020 +0200 ARM: dts: at91: sama5d3_xplained: add pincontrol for USB Host The pincontrol node is needed for USB Host since Linux v5.7-rc1. Without it the driver probes but VBus is not powered because of wrong pincontrol configuration. Fixes: b7c2b61570798 ("ARM: at91: add Atmel's SAMA5D3 Xplained board") Signed-off-by: Cristian Birsan Signed-off-by: Alexandre Belloni Acked-by: Ludovic Desroches Link: https://lore.kernel.org/r/20201118120019.1257580-4-cristian.birsan@microchip.com commit be4dd2d448816a27c1446f8f37fce375daf64148 Author: Cristian Birsan Date: Wed Nov 18 14:00:18 2020 +0200 ARM: dts: at91: sama5d4_xplained: add pincontrol for USB Host The pincontrol node is needed for USB Host since Linux v5.7-rc1. Without it the driver probes but VBus is not powered because of wrong pincontrol configuration. Fixes: 38153a017896f ("ARM: at91/dt: sama5d4: add dts for sama5d4 xplained board") Signed-off-by: Cristian Birsan Signed-off-by: Alexandre Belloni Acked-by: Ludovic Desroches Link: https://lore.kernel.org/r/20201118120019.1257580-3-cristian.birsan@microchip.com commit 5ba6291086d2ae8006be9e0f19bf2001a85c9dc1 Author: Cristian Birsan Date: Wed Nov 18 14:00:17 2020 +0200 ARM: dts: at91: sam9x60: add pincontrol for USB Host The pincontrol node is needed for USB Host since Linux v5.7-rc1. Without it the driver probes but VBus is not powered because of wrong pincontrol configuration. Fixes: 1e5f532c2737 ("ARM: dts: at91: sam9x60: add device tree for soc and board") Signed-off-by: Cristian Birsan Signed-off-by: Alexandre Belloni Acked-by: Ludovic Desroches Link: https://lore.kernel.org/r/20201118120019.1257580-2-cristian.birsan@microchip.com commit 2fd8a07886e00dd7b1c41cbc22911fad37fff639 Author: Cristian Ciocaltea Date: Fri Nov 20 01:56:02 2020 +0200 dt-bindings: mmc: owl: Add compatible string for Actions Semi S500 SoC Add a new compatible string corresponding to the MMC controller found in the S500 variant of the Actions Semi Owl SoCs family. Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/713f57f4a66fff9a50a8d93643a7987d6560becb.1605823502.git.cristian.ciocaltea@gmail.com Signed-off-by: Ulf Hansson commit e24f7fac3b973ad24b0fd96f6de47695c90f6528 Author: Maxime Ripard Date: Tue Nov 24 11:35:46 2020 +0100 soc: sunxi: Fix compilation of sunxi_mbus dma_direct_set_offset has been moved from dma-mapping.h to dma-map-ops.h, but our driver hasn't been updated resulting in a build breakage. Let's change the header to fix the build. Fixes: 16fee29b0735 ("dma-mapping: remove the dma_direct_set_offset export") Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20201124103546.839711-1-maxime@cerno.tech' Signed-off-by: Arnd Bergmann commit 469bc41c29e616cadd641ac39070bde9b63acfdf Author: Andy Shevchenko Date: Thu Nov 5 13:05:30 2020 +0200 platform/x86: i2c-multi-instantiate: Use device_get_match_data() to get driver data Use device_get_match_data() to get driver data instead of boilerplate code. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201105110530.27888-4-andriy.shevchenko@linux.intel.com Signed-off-by: Hans de Goede commit 1208e75176ca4161d88119f948313d6322c60956 Merge: e3e9ced5c9380 a42a7ec9bb99a Author: Ulf Hansson Date: Tue Nov 24 11:28:38 2020 +0100 Merge branch 'fixes' into next commit e3e9ced5c93803d5b2ea1942c4bf0192622531d6 Author: Qinglang Miao Date: Fri Nov 20 15:48:46 2020 +0800 memstick: fix a double-free bug in memstick_check kfree(host->card) has been called in put_device so that another kfree would raise cause a double-free bug. Fixes: 0193383a5833 ("memstick: core: fix device_register() error handling") Reported-by: Hulk Robot Signed-off-by: Qinglang Miao Link: https://lore.kernel.org/r/20201120074846.31322-1-miaoqinglang@huawei.com Signed-off-by: Ulf Hansson commit bf3023e6e863fb4c6607553708392de477d4983b Author: Krzysztof Kozlowski Date: Fri Nov 20 17:23:44 2020 +0100 mmc: sdhci-st: drop of_match_ptr from of_device_id table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant here). This fixes compile warning (!CONFIG_OF on x86_64): drivers/mmc/host/sdhci-st.c:512:34: warning: ‘st_sdhci_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201120162344.485921-2-krzk@kernel.org Signed-off-by: Ulf Hansson commit a96e6523d0162b75b01b13a9af7fb11ae2565fbf Author: Krzysztof Kozlowski Date: Fri Nov 20 17:23:43 2020 +0100 mmc: sdhci-sprd: drop of_match_ptr from of_device_id table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant here). This fixes compile warning (!CONFIG_OF on x86_64): drivers/mmc/host/sdhci-sprd.c:723:34: warning: ‘sdhci_sprd_of_match’ defined but not used [-Wunused-const-variable=] Reported-by: kernel test robot Signed-off-by: Krzysztof Kozlowski Acked-by: Chunyan Zhang Link: https://lore.kernel.org/r/20201120162344.485921-1-krzk@kernel.org Signed-off-by: Ulf Hansson commit 13c8da5db43ad6d9b8637295ff50ddb66a0af05f Merge: a0e169978303e 74d862b682f51 Author: Thomas Gleixner Date: Tue Nov 24 11:26:11 2020 +0100 Merge branch 'sched/core' into core/mm Pull the migrate disable mechanics which is a prerequisite for preemptible kmap_local(). commit 74d862b682f51e45d25b95b1ecf212428a4967b0 Author: Thomas Gleixner Date: Wed Nov 18 20:48:42 2020 +0100 sched: Make migrate_disable/enable() independent of RT Now that the scheduler can deal with migrate disable properly, there is no real compelling reason to make it only available for RT. There are quite some code pathes which needlessly disable preemption in order to prevent migration and some constructs like kmap_atomic() enforce it implicitly. Making it available independent of RT allows to provide a preemptible variant of kmap_atomic() and makes the code more consistent in general. Signed-off-by: Thomas Gleixner Grudgingly-Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20201118204007.269943012@linutronix.de commit a9d1c25004820b1fa7dcd99626ad5c73e023fb6d Author: Andy Shevchenko Date: Thu Nov 5 13:05:28 2020 +0200 platform/x86: i2c-multi-instantiate: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201105110530.27888-2-andriy.shevchenko@linux.intel.com Signed-off-by: Hans de Goede commit 6c328c347ac3dae3c89c2610bc3d0a3ac8574e07 Author: Andy Shevchenko Date: Thu Nov 5 13:05:27 2020 +0200 platform/x86: i2c-multi-instantiate: Drop redundant ACPI_PTR() The driver depends on ACPI, ACPI_PTR() resolution is always the same. Otherwise a compiler may produce a warning. That said, the rule of thumb either ugly ifdeffery with ACPI_PTR or none should be used in a driver. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201105110530.27888-1-andriy.shevchenko@linux.intel.com Signed-off-by: Hans de Goede commit afe76eca862ccde2a0c30105fc97a46a0b59339b Author: Borislav Petkov Date: Mon Nov 23 11:11:17 2020 +0100 x86/sgx: Fix sgx_ioc_enclave_provision() kernel-doc comment Fix ./arch/x86/kernel/cpu/sgx/ioctl.c:666: warning: Function parameter or member \ 'encl' not described in 'sgx_ioc_enclave_provision' ./arch/x86/kernel/cpu/sgx/ioctl.c:666: warning: Excess function parameter \ 'enclave' description in 'sgx_ioc_enclave_provision' Reported-by: Stephen Rothwell Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201123181922.0c009406@canb.auug.org.au commit 69d5c4b50165754bf3bb22d5dc4152369de7dbac Merge: f287c536d9431 9a3a238b3de97 Author: Jani Nikula Date: Tue Nov 24 11:31:16 2020 +0200 Merge tag 'gvt-next-2020-11-23' of https://github.com/intel/gvt-linux into drm-intel-next-queued gvt-next-2020-11-23 - Fix host suspend/resume with vGPU (Colin) - optimize idr init (Varma) - Change intel_gvt_mpt as const (Julian) - One comment error fix (Yan) Signed-off-by: Jani Nikula From: Zhenyu Wang Link: https://patchwork.freedesktop.org/patch/msgid/20201123090517.GC16939@zhen-hp.sh.intel.com commit 8d201d368aaa2b90a364cbd351a4e5f52b49cd55 Author: Brian Norris Date: Thu Nov 12 10:14:32 2020 -0800 rtw88: wow: print key type when failing It's much easier to spot what went wrong when you print out the unhandled key type. Signed-off-by: Brian Norris Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201112181432.2958021-1-briannorris@chromium.org commit 362c4a5cc886e9c369bf2106ab648c2ad076abb6 Author: Ching-Te Ku Date: Thu Nov 12 11:14:30 2020 +0800 rtw88: coex: change the decode method from firmware Fix sometimes FW information will be parsed as wrong value, do a correction of sign bit to show the correct information. (Ex, Value should be 20, but it shows 236.) Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201112031430.4846-12-pkshih@realtek.com commit 2485bc7c781694b5a367cb70a6d2da81301310d2 Author: Ching-Te Ku Date: Thu Nov 12 11:14:29 2020 +0800 rtw88: coex: remove unnecessary WLAN slot extend Remove extend 5 ms related operation at WLAN media status notify. The mechanism should be enable only while DUT connect to a AP that it doesn't follow our power save control or its rate is decreasing unusually sensitive. So we extend a extra slot to save the transmission rate. The original logic will always extend WLAN slot. It will lead to BT slot always decrease 5 ms. Remove write scoreboard action at WLAN media status notify. It has already done in WLAN info notify. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201112031430.4846-11-pkshih@realtek.com commit 72b14be751117c0250d37b8df34b01dcf52c43a6 Author: Ching-Te Ku Date: Thu Nov 12 11:14:28 2020 +0800 rtw88: coex: remove write scan bit to scoreboard in scan and connect notify Remove some action which were writing scan bit to scoreboard, since these behaviors are redundant. It is already done in WLAN info notify. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201112031430.4846-10-pkshih@realtek.com commit e098c3c3314eba7a80d439c91cc07ac10621b1ba Author: Ching-Te Ku Date: Thu Nov 12 11:14:27 2020 +0800 rtw88: coex: fix BT performance drop during initial/power-on step Force set the coexistence to BT high priority during WLAN initial/power-on step. Since the duration the related setting may be not ready yet. The score board is not related to scan when initialing, remove the scan parameter. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201112031430.4846-9-pkshih@realtek.com commit 65c6861f6382391149605631432af4bf8d7e8c9a Author: Ching-Te Ku Date: Thu Nov 12 11:14:26 2020 +0800 rtw88: coex: Change antenna setting to enhance free-run performance While the mechanism goes to 2G_free_run or WL5G_BT2G, set BT to hardware PTA mode to get a more efficiently performance. Add a flag to indicate antenna switch is supported or not so that the IC serials which has different antenna structure can set antenna correctly. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201112031430.4846-8-pkshih@realtek.com commit 22a9dc720f106715e76546db8268fd6e99bdeb93 Author: Ching-Te Ku Date: Thu Nov 12 11:14:25 2020 +0800 rtw88: coex: update the TDMA parameter when leave LPS The updated parameter and original parameter all means TDMA-OFF. The original setting write 0x8 to firmware, but it only works for some old IC series. To avoid the confusing, update a proper parameter. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201112031430.4846-7-pkshih@realtek.com commit a9359faaa47d22301437336cc8c46d4bcf8ec8a5 Author: Ching-Te Ku Date: Thu Nov 12 11:14:24 2020 +0800 rtw88: coex: add the mechanism for RF4CE Add the related coexistence mechanism about RF4CE and WLAN connected flag to decide control packet is whether higher or normal priority. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201112031430.4846-6-pkshih@realtek.com commit 3a6616f96624febe9053b8b9e94434f7482e563a Author: Ching-Te Ku Date: Thu Nov 12 11:14:23 2020 +0800 rtw88: coex: Add force flag for coexistence table function Because sometimes hardware action may be unpredictable. (Ex: after WLAN LPS...etc) Add a check mechanism if the action is triggered by some concerned case, it can force to write the table again. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201112031430.4846-5-pkshih@realtek.com commit 513fb27f6a52ca352c148062fcf246ecf707642f Author: Ching-Te Ku Date: Thu Nov 12 11:14:22 2020 +0800 rtw88: coex: add write scoreboard action when WLAN in critical procedure When WLAN in critical procedure, such as connecting, scan and so on, coexistence will notify BT by scoreboard. While BT firmware received the scoreboard interrupt, it will adjust BT page priority lower to avoid WLAN critical procedure suffering impact. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201112031430.4846-4-pkshih@realtek.com commit ca30905b1d6a3c461c600442ad007c24aa2e388a Author: Ching-Te Ku Date: Thu Nov 12 11:14:21 2020 +0800 rtw88: coex: remove unnecessary feature/function Because the WLAN RSSI report feature had been implemented at WLAN link info update function, it is redundant to update WLAN RSSI while BT is updating link info, so remove the update WLAN RSSI part. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201112031430.4846-3-pkshih@realtek.com commit 7ed9e062178ddb7c630fbdc698f3718345dcb39b Author: Ching-Te Ku Date: Thu Nov 12 11:14:20 2020 +0800 rtw88: coex: update TDMA settings for different beacon interval Add considering for different WLAN beacon interval in coexistence mechanism. Because the WLAN beacon period may be not 100 ms, so it's necessary to consider any beacon period and set timer according to the interval. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201112031430.4846-2-pkshih@realtek.com commit 760bb2abfef252a0a2bed5aba2f4ab56dec50b72 Author: Ping-Ke Shih Date: Mon Nov 9 17:01:23 2020 +0800 rtw88: add CCK_PD debug log In order to help debugging in field, we add some log messages. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201109090123.9254-2-pkshih@realtek.com commit 8f0cb24ceefec6744cad2103e92de314598d7626 Author: Ping-Ke Shih Date: Mon Nov 9 17:01:22 2020 +0800 rtw88: 8723d: add cck pd seetings CCK PD can reduce the number of false alarm of the CCK rates. It dynamically adjusts the power threshold and CS ratio. The values are compared to the values of the previous level, if the level is changed, set new values of power threshold and CS ratio. Implement rtw_chip_ops::cck_pd_set() for 8723d. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201109090123.9254-1-pkshih@realtek.com commit eaf7697b6febe2b086503f525f070d8e3ca1ea0f Author: David Lechner Date: Mon Oct 12 16:12:29 2020 -0500 ARM: omap2plus_defconfig: Enable TI eQEP counter driver This enables the TI eQEP counter driver that is used by BeagleBone Blue. Signed-off-by: David Lechner Signed-off-by: Tony Lindgren commit a1158e36f876f6269978a4176e3a1d48d27fe7a1 Author: Yangtao Li Date: Tue Nov 10 14:24:40 2020 +0800 pinctrl: sunxi: Always call chained_irq_{enter, exit} in sunxi_pinctrl_irq_handler It is found on many allwinner soc that there is a low probability that the interrupt status cannot be read in sunxi_pinctrl_irq_handler. This will cause the interrupt status of a gpio bank to always be active on gic, preventing gic from responding to other spi interrupts correctly. So we should call the chained_irq_* each time enter sunxi_pinctrl_irq_handler(). Signed-off-by: Yangtao Li Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/85263ce8b058e80cea25c6ad6383eb256ce96cc8.1604988979.git.frank@allwinnertech.com Signed-off-by: Linus Walleij commit fd5198dde36af5ae54940c3ea6923fa6459da88c Author: Yangtao Li Date: Tue Nov 10 14:23:44 2020 +0800 pinctrl: sunxi: Mark the irq bank not found in sunxi_pinctrl_irq_handler() with WARN_ON The interrupt descriptor cannot be found in the interrupt processing function, and this situation cannot happen when the system is running normally. It doesn't seem right to return directly to the status of not handling gic. In this case, it must be a bug, let's mark it with WARN_ON. Signed-off-by: Yangtao Li Link: https://lore.kernel.org/r/470ebae22fc5434ad5409c4f6e29255467b3cef6.1604988979.git.frank@allwinnertech.com Signed-off-by: Linus Walleij commit 6de7ed693c631d4689acfe90c434147598d75543 Author: Yangtao Li Date: Tue Nov 10 14:22:55 2020 +0800 pinctrl: sunxi: fix irq bank map for the Allwinner A100 pin controller A100's pin starts with PB, so it should start with 1. Fixes: 473436e7647d6 ("pinctrl: sunxi: add support for the Allwinner A100 pin controller") Signed-off-by: Yangtao Li Link: https://lore.kernel.org/r/9db51667bf9065be55beafd56e5c319e3bbe8310.1604988979.git.frank@allwinnertech.com Signed-off-by: Linus Walleij commit b7cab9be7c16128a0de21ed7ae67211838813437 Author: Pierre-Louis Bossart Date: Wed Nov 4 23:23:58 2020 +0800 soundwire: SDCA: detect sdca_cascade interrupt The SoundWire 1.2 specification defines an "SDCA cascade" bit which handles a logical OR of all SDCA interrupt sources (up to 30 defined). Due to limitations of the addressing space, this bit is located in the SDW_DP0_INT register when DP0 is used, or alternatively in the DP0_SDCA_Support_INTSTAT register when DP0 is not used. To allow for both cases to be handled, this bit will be checked in the main device-level interrupt handling code. This will result in the register being read twice if DP0 is enabled, but it's not clear how to optimize this case. It's also more logical to deal with this interrupt at the device than the port level, this bit is really not DP0 specific and its location in the DP0_INTSTAT bit is only due to the lack of free space in SCP_INTSTAT_1. The SDCA_Cascade bit cannot be masked or cleared, so the interrupt handling only forwards the detection to the Slave driver, which will deal with reading the relevant SDCA status bits and clearing them. The bus driver only signals the detection. The communication with the Slave driver is based on the same interrupt callback, with only an extension to provide the status of the sdca_cascade bit. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20201104152358.9518-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit e6db818a3f51781ba12ac4d52b8773f74d57b06b Author: Srinivas Kandagatla Date: Wed Nov 4 11:29:41 2020 +0000 soundwire: Fix DEBUG_LOCKS_WARN_ON for uninitialized attribute running kernel with CONFIG_DEBUG_LOCKS_ALLOC enabled will below warning: BUG: key ffff502e09807098 has not been registered! DEBUG_LOCKS_WARN_ON(1) WARNING: CPU: 5 PID: 129 at kernel/locking/lockdep.c:4623 lockdep_init_map_waits+0xe8/0x250 Modules linked in: CPU: 5 PID: 129 Comm: kworker/5:1 Tainted: G W 5.10.0-rc1-00277-ged49f224ca3f-dirty #1210 Hardware name: Qualcomm Technologies, Inc. Robotics RB5 (DT) Workqueue: events deferred_probe_work_func pstate: 80c00005 (Nzcv daif +PAN +UAO -TCO BTYPE=--) pc : lockdep_init_map_waits+0xe8/0x250 lr : lockdep_init_map_waits+0xe8/0x250 [ Trimmed ] Call trace: lockdep_init_map_waits+0xe8/0x250 __kernfs_create_file+0x78/0x180 sysfs_add_file_mode_ns+0x94/0x1c8 internal_create_group+0x110/0x3e0 sysfs_create_group+0x18/0x28 devm_device_add_group+0x4c/0xb0 add_all_attributes+0x438/0x490 sdw_slave_sysfs_dpn_init+0x128/0x138 sdw_slave_sysfs_init+0x80/0xa0 sdw_drv_probe+0x94/0x170 really_probe+0x118/0x3e0 driver_probe_device+0x5c/0xc0 [ Trimmed ] CPU: 5 PID: 129 Comm: kworker/5:1 Tainted: G W 5.10.0-rc1-00277-ged49f224ca3f-dirty #1210 Hardware name: Qualcomm Technologies, Inc. Robotics RB5 (DT) Workqueue: events deferred_probe_work_func Call trace: dump_backtrace+0x0/0x1c0 show_stack+0x18/0x68 dump_stack+0xd8/0x134 __warn+0xa0/0x158 report_bug+0xc8/0x178 bug_handler+0x20/0x78 brk_handler+0x70/0xc8 [ Trimmed ] Fix this by initializing dynamically allocated sysfs attribute to keep lockdep happy! Fixes: bcac59029955 ("soundwire: add Slave sysfs support") Signed-off-by: Srinivas Kandagatla Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20201104112941.1134-1-srinivas.kandagatla@linaro.org Signed-off-by: Vinod Koul commit ecb454594c43456bdeb1bd5cd68ac454db51b2c6 Author: Rajendra Nayak Date: Thu Nov 5 15:26:32 2020 +0530 pinctrl: qcom: Add sc7280 pinctrl driver Add initial pinctrl driver to support pin configuration with pinctrl framework for SC7280 SoC Signed-off-by: Rajendra Nayak Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/1604570192-15057-2-git-send-email-rnayak@codeaurora.org [Change select PINCTRL_MSM to depends on PINCTRL_MSM] Signed-off-by: Linus Walleij commit 5913f635a28df654632965db7fe9ff90116f31b5 Author: Rajendra Nayak Date: Thu Nov 5 15:26:31 2020 +0530 dt-bindings: pinctrl: qcom: Add sc7280 pinctrl bindings Add device tree binding Documentation details for Qualcomm SC7280 TLMM block. Signed-off-by: Rajendra Nayak Reviewed-by: Rob Herring Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/1604570192-15057-1-git-send-email-rnayak@codeaurora.org Signed-off-by: Linus Walleij commit 2a984219b53422261cd90feb8a1bb5c1583be3fb Author: John Stultz Date: Tue Nov 10 21:56:19 2020 +0000 pinctrl: qcom: Fix msm8953 Kconfig entry to depend on, not select PINCTRL_MSM One fixup following my patch commit be117ca32261 ("pinctrl: qcom: Kconfig: Rework PINCTRL_MSM to be a depenency rather then a selected config") being queued in LinusW's tree, as a new config entry was added for the msm8953 that also needs the change. Applies to LinusW's pinctrl devel tree. Signed-off-by: John Stultz Reviewed-by: Bjorn Andersson Cc: Andy Gross Cc: Prasad Sodagudi Cc: Vladimir Lypak Cc: Bjorn Andersson Cc: Linus Walleij Cc: linux-arm-msm@vger.kernel.org Cc: linux-gpio@vger.kernel.org Link: https://lore.kernel.org/r/20201110215619.86076-1-john.stultz@linaro.org Signed-off-by: Linus Walleij commit 32228ff5f7e1b1c8916e811d525b6e15e3d21b3d Author: Thomas Zimmermann Date: Fri Nov 20 11:25:45 2020 +0100 drm/fb-helper: Acquire modeset lock around shadow-buffer flushing Flushing the fbdev's shadow buffer requires vmap'ing the BO memory, which in turn requires pinning the BO. While being pinned, the BO cannot be moved into VRAM for scanout. Consequently, a concurrent modeset operation that involves the fbdev framebuffer would likely fail. Resolve this problem be acquiring the modeset lock of the planes that use the fbdev framebuffer. On non-atomic drivers, also acquire the mode-config lock. This serializes the flushing of the framebuffer with concurrent modeset operations. v2: * only acquire struct drm_fb_helper.lock in damage blitter (Daniel, Christian) Signed-off-by: Thomas Zimmermann Acked-by: Maxime Ripard Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201120102545.4047-11-tzimmermann@suse.de commit 7d4d269c0973f7a8324d9cd2534b3b24e62c72ff Author: Thomas Zimmermann Date: Fri Nov 20 11:25:44 2020 +0100 drm/fb-helper: Copy dma-buf map before flushing shadow fb Copy the vmap()'ed instance of struct dma_buf_map before modifying it, in case the implementation of vunmap() depends on the exact address. Signed-off-by: Thomas Zimmermann Acked-by: Maxime Ripard Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201120102545.4047-10-tzimmermann@suse.de commit 4270d6f60d68e99e2fefd4da98eead05d2df022c Author: Thomas Zimmermann Date: Fri Nov 20 11:25:43 2020 +0100 drm/fb-helper: Restore damage area upon errors If the damage handling fails, restore the damage area. The next invocation of the damage worker will then perform the update. v3: * Use drm_WARN_ONCE() with an error message to print warning v2: * print a single warning if dirty callback fails (Daniel, Sebastian) * update comment Signed-off-by: Thomas Zimmermann Acked-by: Maxime Ripard Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201120102545.4047-9-tzimmermann@suse.de commit 1d46491d4a08d7ee657e09808f87d169444a2652 Author: Thomas Zimmermann Date: Fri Nov 20 11:25:42 2020 +0100 drm/fb-helper: Move damage blit code and its setup into separate routine Introduce a separate function for the blit code and its vmap setup. Done in preparation of additional changes. No functional changes are made. v3: * Use drm_WARN_ONCE() with an error message to print warning v2: * print a single warning if damage blitter fails Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20201120102545.4047-8-tzimmermann@suse.de commit fd2d856538bb3880ec78eae71bbbd928962bee35 Author: Thomas Zimmermann Date: Fri Nov 20 11:25:41 2020 +0100 drm/fb-helper: Separate shadow-buffer flushing and calling dirty callback Flushing the shadow framebuffer and invoking the dirty callback are two separate operations, so do them separately. The flush operation is paired with calls to vmap and vunmap. They are not needed for the dirty callback, which performs its own invocations if necessary. Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20201120102545.4047-7-tzimmermann@suse.de commit 2b5f31aaa8d10b72aa1ca3098ac5427ff2e47cd0 Author: Thomas Zimmermann Date: Fri Nov 20 11:25:40 2020 +0100 drm/fb-helper: Return early in damage worker Returning early in the damage worker if no update is required. Makes the code more readable. No functional changes are being made. v3: * s/dirty/damage in commit message (Sam) Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20201120102545.4047-6-tzimmermann@suse.de commit 9622349ea1b6234d24f2348552bffa1de1c7c2d1 Author: Thomas Zimmermann Date: Fri Nov 20 11:25:39 2020 +0100 drm/fb-helper: Rename dirty worker to damage worker The dirty worker handles all damage updates, instead of just calling the framebuffer's dirty callback. Rename it to damage worker. Also rename related variables accordingly. No functional changes are made. Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20201120102545.4047-5-tzimmermann@suse.de commit c1acbf08eb49721246f64fb55a78e416840dfcf3 Author: Thomas Zimmermann Date: Fri Nov 20 11:25:38 2020 +0100 drm/client: Depend on GEM object kmap ref-counting DRM client's vmap/vunmap functions don't allow for multiple vmap operations. Calling drm_client_buffer_vmap() twice returns the same mapping, then calling drm_client_buffer_vunmap() twice already unmaps on the first call. This leads to unbalanced vmap refcounts. Fix this by calling drm_gem_vmap() unconditionally in drm_client_buffer_vmap(). All drivers that support DRM clients have to implement correct ref- counting for their vmap operations, or not vunmap at all. This is the case for drivers that use CMA, SHMEM and VRAM helpers, and QXL. Other drivers are not affected. Signed-off-by: Thomas Zimmermann Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20201120102545.4047-4-tzimmermann@suse.de commit 763aea17bf575ecea62e4e18c29a8452a770cb1e Author: Thomas Zimmermann Date: Fri Nov 20 11:25:37 2020 +0100 drm/fb-helper: Unmap client buffer during shutdown The fbdev helper's generic probe function establishes a mapping for framebuffers without shadow buffer. The clean-up function did not unmap the buffer object. Add the unmap operation. As fbdev devices are usally released during system shutdown, this has not been a problem in practice. Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20201120102545.4047-3-tzimmermann@suse.de commit a102172c7f818bfb32c0652552983e262d11990e Author: Thomas Zimmermann Date: Fri Nov 20 11:25:36 2020 +0100 drm/fb-helper: Call dirty helper after writing to fbdev If fbdev uses a shadow framebuffer, call the damage handler. Otherwise the update might not make it to the screen. v2: * mark virtual screen as dirty (Ville) Signed-off-by: Thomas Zimmermann Fixes: 222ec45f4c69 ("drm/fb_helper: Support framebuffers in I/O memory") Acked-by: Maxime Ripard Acked-by: Sam Ravnborg Cc: Thomas Zimmermann Cc: Daniel Vetter Cc: Sam Ravnborg Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: David Airlie Cc: Daniel Vetter Cc: Gerd Hoffmann Cc: dri-devel@lists.freedesktop.org Cc: virtualization@lists.linux-foundation.org Link: https://patchwork.freedesktop.org/patch/msgid/20201120102545.4047-2-tzimmermann@suse.de commit 43906287380f962a7178059cf8da1e03d94da3e0 Merge: 9ac05523d38d4 29b105d947c66 Author: Takashi Iwai Date: Tue Nov 24 09:12:37 2020 +0100 Merge branch 'topic/usb-audio-refactoring' into for-next Pull the USB audio improvement Signed-off-by: Takashi Iwai commit 2f04636f496d723f4ab685d44aad12c257e832c6 Author: Thomas Zimmermann Date: Tue Nov 17 14:31:56 2020 +0100 drm/shmem-helper: Removed drm_gem_shmem_create_object_cached() Cached page mappings are now the default for SHMEM GEM objects. Remove the obsolete create function for cached mappings. Signed-off-by: Thomas Zimmermann Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20201117133156.26822-3-tzimmermann@suse.de commit 0cf2ef46c6c0f1a0b475a63633706af8194484df Author: Thomas Zimmermann Date: Tue Nov 17 14:31:55 2020 +0100 drm/shmem-helper: Use cached mappings by default SHMEM-buffer backing storage is allocated from system memory; which is typically cachable. The default mode for SHMEM objects is writecombine though. Unify SHMEM semantics by defaulting to cached mappings. The exception is pages imported via dma-buf. DMA memory is usually not cached. DRM drivers that require write-combined mappings set the map_wc flag in struct drm_gem_shmem_object to true. This currently affects lima, panfrost and v3d. The drivers mgag200, udl, virtio and vkms continue to use default shmem mappings. The drivers cirrus and gm12u320 change caching flags. Both used writecombine and now switch over to shmem defaults. Both drivers use SHMEM objects as shadow buffers for internal video memory, so cached mappings will not affect them negatively. v3: * set value of shmem pointer before dereferencing it in __drm_gem_shmem_create() (Dan, kernel test robot) v2: * recreate patch on top of latest SHMEM helpers * update lima, panfrost, v3d to select writecombine (Daniel, Rob) Signed-off-by: Thomas Zimmermann Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20201117133156.26822-2-tzimmermann@suse.de commit 749c1e1481e1d242ded9dd1bf210ddb7c0d22a4f Merge: f65b243d6ab85 16be06aa1a28b Author: Greg Kroah-Hartman Date: Tue Nov 24 08:30:08 2020 +0100 Merge tag 'iio-for-5.11a' of https://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.11 cycle Usual mixed bag of new drivers / device support + cleanups etc with the addition of a fairly big set of yaml conversions. Txt to yaml format conversions. In some cases dropped separate binding and moved to trivial devices (drop). Listed by manufacturer - dht11 temperature(drop) - adi,ad2s90 adi,ad5272 adi,ad5592r adi,ad5758 adi,ad5933 adi,ad7303 adi,adis16480 adi,adf4350 - ams,as3935 - asahi-kasei,ak8974 - atmel,sama5d2-adc - avago,apds9300 avago,apds9960 - bosch,bma180 bosch,bmc150_magn bosch,bme680 bosch,bmg180 - brcm,iproc-static-adc - capella,cm36651 - domintech,dmard06(drop) - fsl,mag3110 fsl,mma8452 fsl,vf610-dac - hoperf,hp03 - honeywell,hmc5843 - kionix,kxcjk1013 - maxim,ds1803(drop) maxim,ds4424 maxim,max30100 maxim,max30102 maxim,max31856 maxim,max31855k maxim,max44009 maxim,max5481 maxim,max5821 - meas,htu21(drop) meas,ms5367(drop) meas,ms5611 meas,tsys01(drop) - mediatek,mt2701-auxadc - melexis,mlx90614 melexis,mlx90632 - memsic,mmc35240(drop) - microchip,mcp41010 microchip,mcp4131 microchip,mcp4725 - murata,zap2326 - nxp,fxas21002c nxp,lpc1850-dac - pni,rm3100 - qcom,pm8018-adc qcom,spmi-iadc - renesas,isl29501 renesas,rcar-gyroadc - samsung,sensorhub-rinato - sensiron,sgp30 - sentech,sx9500 - sharp,gp2ap020a00f - st,hts221 st,lsm6dsx st,st-sensors(many!) st,uvis25 st,vcl53l0x st,vl6180 - ti,adc084s021 ti,ads124s08 ti,dac5571 ti,dac7311 ti,dac7512 ti,dac7612 ti,hdc1000(drop) ti,palmas-gpadc ti,opt3001 ti,tmp07 - upisemi,us51882 - vishay,vcnl4035 - x-powers,axp209 New device support * adi,ad5685 - Add support for AD5338R dual output 10-bit DAC - Add DT-binding doc. * mediatek,mt6360 - New driver for this SoC ADC with bindings and using new channel label support in the IIO core. * st,lsm6dsx - Add support for LSM6DST Core: * Add "label" to device channels, provided via a new core callback. Including DT docs for when that is the source, and ABI docs. * Add devm_iio_triggered_buffer_setup_ext to take extra attributes. * dmaengine, unwrap use of iio_buffer_set_attrs() * Drop iio_buffer_set_attrs() * Centralize ioctl call handling. Later fix to ensure -EINVAL returned if no handler has run. * Fix an issue with IIO_VAL_FRACTIONAL and negative values - doesn't affect any known existing drivers, but will impact a future one. * kernel-doc fix in trigger.h * file-ops ordering cleanup Features * semtech,sx9310 - Add control of hardware gain, proximity thresholds, hysteresis and debounce. - Increase what information on hardware configuration can be provided via DT. Cleanup and minor features * adi,ad5685 - Add of_match_table * adi,ad7292 - Drop pointless spi_set_drvdata() call * adi,ad7298 - Drop platform data and tidy up external reference config. * adi,ad7303 - Drop platform data handling as unused. * adi,ad7768 - Add new label attribute for channels provided from dt. * adi,ad7887 - devm_ usage in probe simplifying remove and error handling. * adi,adis16201 - Drop pointless spi_set_drvdata() call * adi,adis16209 - Drop pointless spi_set_drvdata() call * adi,adis16240 - White space fixup * adi,adxl372 - use new devm_iio_triggered-buffer_setup_ext() * amlogic,meson-saradc - Drop pointless semicolon. * amstaos,tsl2563 - Put back i2c_device_id table as needed for greybus probing. * atmel,at91_adc - Use of_device_get_match_data() instead of open coding it. - Constify some driver data - Add KCONFIG dep on CONFIG_OF and drop of_match_ptr() - Drop platform data as mostly dead code. - Tidy up reference voltage logic * atmel-sama5d2 - Drop a pointless semicolon - Merge buffer and trigger init into a separate function - Use new devm_iio_triggered_buff_setup_ext() * avago,apds9960 - Drop a pointless semicolon * bosch,bmc150 - Drop a pointless semicolon - Use new iio_triggered_buffer_setup_ext() * bosch,bmp280 - Drop a pointless semicolon * fsl,mma8452 - Constification * (google),cros_ec - Use new devm_iio_triggered_buffer_setup_ext() * hid-sensors - Use new iio_triggered_buffer_setup_ext() * ingenic,adc - Drop a pointless semicolon * invensense,icm426xx - Fix MAINTAINERS entry missing : * mediatek,mt6577_audxac - Add binding doc for mt8516 compatible with mt8173 * motorola,cpcap-adc - Fix an implicit fallthrough marking that clang needs to avoid warning. * samsung,exynos-adc - Stop relying on users counter form input device in ISR. * st,lsm6dsx - add vdd and vddio regulator control (including binding update) * st,stm32-adc - Tidy up code for dma transfers. - Adapt clock duty cycle for proper functioning. Note no known problems with existing boards. * st,vl53l0x-i2c - Put back i2c_device_id table as needed for greybus probing. * vishay,vcnl4035 - Put back i2c_device_id table as needed for greybus probing. * tag 'iio-for-5.11a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (126 commits) dt-bindings:iio:adc:x-powers,axp209-adc: txt to yaml conversion dt-bindings:iio:adc:renesas,rcar-gyroadc: txt to yaml conversion. dt-bindings:iio:adc:atmel,sama5d2-adc: txt to yaml conversion dt-bindings:iio:magnetometer:pni,rm3100: txt to yaml conversion. dt-bindings:iio:magnetometer:honeywell,hmc5843: txt to yaml format conversion dt-bindings:iio:magnetometer:bosch,bmc150_magn: txt to yaml conversion. dt-bindings:iio:magnetometer:asahi-kasei,ak8974: txt to yaml format conversion dt-bindings:iio:magnetometer:fsl,mag3110: txt to yaml conversion dt-bindings:iio:light:st,vl6180: txt to yaml format conversion. dt-bindings:iio:light:vishay,vcnl4035: txt to yaml conversion dt-bindings:iio:light:st,uvis25: txt to yaml conversion for this UV sensor dt-bindings:iio:light:upisemi,us51882: txt to yaml conversion. dt-bindings:iio:light:ti,opt3001: txt to yaml conversion dt-bindings:iio:light:maxim,max44009: txt to yaml conversion. dt-bindings:iio:light:sharp,gp2ap020a00f: txt to yaml conversion. dt-bindings:iio:light:capella,cm36651: txt to yaml conversion. dt-bindings:iio:light:avago,apds9960: txt to yaml conversion dt-bindings:iio:light:avago,apds9300: txt to yaml conversion. dt-bindings:iio:imu:st,lsm6dsx: txt to yaml conversion dt-bindings:iio:imu:adi,adis16480: txt to yaml conversion ... commit 2802821a66f99955afd75ec76209064bfb678697 Author: Jonathan Marek Date: Mon Nov 23 09:35:38 2020 -0500 arm64: dts: qcom: fix serial output for sm8250-hdk The uart2 node has been renamed, apply the change to sm8250-hdk dts too so that serial output works. Fixes: 91ed0e90fc49 ("arm64: dts: qcom: add sm8250 hdk dts") Signed-off-by: Jonathan Marek Link: https://lore.kernel.org/r/20201123143538.14198-1-jonathan@marek.ca Signed-off-by: Bjorn Andersson commit dd8f52660cb1f6fac0b4cc8adb3f008edd2c14d2 Author: Rikard Falkeborn Date: Mon Nov 23 00:45:40 2020 +0100 remoteproc: qcom_sysmon: Constify qmi_indication_handler The only usage of qmi_indication_handler[] is to pass its address to qmi_handle_init() which accepts a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20201122234540.34623-1-rikard.falkeborn@gmail.com Signed-off-by: Bjorn Andersson commit 3256b4682386298ec106c1d1896b064f6a291f88 Author: Karan Tilak Kumar Date: Fri Nov 20 18:33:37 2020 -0800 scsi: fnic: Validate io_req before others We need to check for a valid io_req before we check other data. Also, remove redundant checks. Link: https://lore.kernel.org/r/20201121023337.19295-1-kartilak@cisco.com Reviewed-by: Arulprabhu Ponnusamy Co-developed-by: Satish Kharat Signed-off-by: Satish Kharat Signed-off-by: Karan Tilak Kumar Signed-off-by: Martin K. Petersen commit 74ae6d6a6805f9fe162e4527d8ff0f7d2f9bc0d0 Author: Karan Tilak Kumar Date: Fri Nov 20 17:51:34 2020 -0800 scsi: fnic: Set scsi_set_resid() only for underflow Set scsi_set_resid() only if FCPIO_ICMND_CMPL_RESID_UNDER is set. Link: https://lore.kernel.org/r/20201121015134.18872-1-kartilak@cisco.com Reviewed-by: Arulprabhu Ponnusamy Co-developed-by: Satish Kharat Signed-off-by: Satish Kharat Signed-off-by: Karan Tilak Kumar Signed-off-by: Martin K. Petersen commit 875d4eda3bd67315418f4e6f6725a877aa1786b5 Author: Karan Tilak Kumar Date: Fri Nov 20 17:37:39 2020 -0800 scsi: fnic: Change shost_printk() to FNIC_MAIN_DBG() Replace shost_printk() with FNIC_MAIN_DBG() so that these log messages are controlled by fnic_log_level flag in fnic_handle_link. Link: https://lore.kernel.org/r/20201121013739.18701-1-kartilak@cisco.com Reviewed-by: Arulprabhu Ponnusamy Co-developed-by: Satish Kharat Signed-off-by: Satish Kharat Signed-off-by: Karan Tilak Kumar Signed-off-by: Martin K. Petersen commit f9e2beb990f0836b642e5e7d1bed285bbc137c83 Author: Karan Tilak Kumar Date: Fri Nov 20 17:21:45 2020 -0800 scsi: fnic: Avoid looping in TRANS ETH on unload Avoid looping in fnic_scsi_abort_io() before sending fw reset when fnic is in TRANS ETH state and when we have not received any link events. Link: https://lore.kernel.org/r/20201121012145.18522-1-kartilak@cisco.com Reviewed-by: Arulprabhu Ponnusamy Co-developed-by: Satish Kharat Signed-off-by: Satish Kharat Signed-off-by: Karan Tilak Kumar Signed-off-by: Martin K. Petersen commit bde493349025ca0559e2fff88592935af3b8df19 Author: Eric Biggers Date: Fri Nov 13 13:19:18 2020 -0800 fs-verity: move structs needed for file signing to UAPI header Although it isn't used directly by the ioctls, "struct fsverity_descriptor" is required by userspace programs that need to compute fs-verity file digests in a standalone way. Therefore it's also needed to sign files in a standalone way. Similarly, "struct fsverity_formatted_digest" (previously called "struct fsverity_signed_digest" which was misleading) is also needed to sign files if the built-in signature verification is being used. Therefore, move these structs to the UAPI header. While doing this, try to make it clear that the signature-related fields in fsverity_descriptor aren't used in the file digest computation. Acked-by: Luca Boccassi Link: https://lore.kernel.org/r/20201113211918.71883-5-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 90b3a938031fd2da2000f84e58223971ad8f6df3 Author: Karan Tilak Kumar Date: Fri Nov 20 14:07:12 2020 -0800 scsi: fnic: Change shost_printk() to FNIC_FCS_DBG() Replacing shost_printk with FNIC_FCS_DBG() so that these log messages are controlled by fnic_log_level flag in fnic_fip_handler_timer. Bumping up version number from 47 to 49 to maintain same level as internal version. Link: https://lore.kernel.org/r/20201120220712.16708-1-kartilak@cisco.com Reviewed-by: Arulprabhu Ponnusamy Co-developed-by: Satish Kharat Signed-off-by: Satish Kharat Signed-off-by: Karan Tilak Kumar Signed-off-by: Martin K. Petersen commit 89eddb401080a1969f0ef67fbd19123062e64a0b Author: Joe Perches Date: Fri Nov 20 15:16:10 2020 -0800 scsi: pm8001: Make implicit use of pm8001_ha in pm8001_printk() explicit Make the pm8001_printk() macro take an explicit HBA instead of assuming the existence of an unspecified pm8001_ha argument. Miscellanea: - Add pm8001_ha to the few uses of pm8001_printk() - Add HBA to the pm8001_dbg macro call to pm8001_printk() Link: https://lore.kernel.org/r/0e17a4c845f15e18f98b346ffb9b039584d21cdd.1605914030.git.joe@perches.com Acked-by: Jack Wang Signed-off-by: Joe Perches Signed-off-by: Martin K. Petersen commit 1b5d2793283dcb97b401b3b2c02b8a94eee29af1 Author: Joe Perches Date: Fri Nov 20 15:16:09 2020 -0800 scsi: pm8001: Neaten debug logging macros and uses Every PM8001__DBG macro uses an internal call to pm8001_printk. Convert all uses of: PM8001__DBG(hba, pm8001_printk(fmt, ...)) to pm8001_dbg(hba, , fmt, ...) so the visual complexity of each macro is reduced. The repetitive macro definitions are converted to a single pm8001_dbg and the level is concatenated using PM8001_##level##_LOGGING for the specific level test. Done with coccinelle, checkpatch and a little typing of the new macro definition. Miscellanea: - Coalesce formats - Realign arguments - Add missing terminating newlines to formats - Remove trailing spaces from formats - Change defective loop with printk(KERN_INFO... to emit a 16 byte hex block to %p16h Link: https://lore.kernel.org/r/49f36a93af7752b613d03c89a87078243567fd9a.1605914030.git.joe@perches.com Reported-by: kernel test robot Acked-by: Jack Wang Signed-off-by: Joe Perches Signed-off-by: Martin K. Petersen commit 27a34943bd89c101d3fb4a895d51d41a3c35ccab Author: Xu Wang Date: Fri Nov 20 08:36:48 2020 +0000 scsi: pm8001: Remove typecast for pointer returned by kcalloc() Stop typecasting the value returned by kcalloc(). Link: https://lore.kernel.org/r/20201120083648.9319-1-vulab@iscas.ac.cn Acked-by: Jack Wang Signed-off-by: Xu Wang Signed-off-by: Martin K. Petersen commit bdd1cc0377d3ce96683d178f30714da478f6a955 Author: Finn Thain Date: Fri Nov 20 15:39:56 2020 +1100 scsi: NCR5380: Reduce NCR5380_maybe_release_dma_irq() call sites Refactor to avoid needless calls to NCR5380_maybe_release_dma_irq(). This makes the machine code smaller and the source more readable. Link: https://lore.kernel.org/r/c1317ae8fdcb498460de5d7ea0bd62a42f5eeca8.1605847196.git.fthain@telegraphics.com.au Tested-by: Michael Schmitz Reviewed-by: Michael Schmitz Signed-off-by: Finn Thain Signed-off-by: Martin K. Petersen commit 03fe6a640a05c5dc04b6bcdddfb981d015e84ed4 Author: Finn Thain Date: Fri Nov 20 15:39:56 2020 +1100 scsi: atari_scsi: Fix race condition between .queuecommand and EH It is possible that bus_reset_cleanup() or .eh_abort_handler could be invoked during NCR5380_queuecommand(). If that takes place before the new command is enqueued and after the ST-DMA "lock" has been acquired, the ST-DMA "lock" will be released again. This will result in a lost DMA interrupt and a command timeout. Fix this by excluding EH and interrupt handlers while the new command is enqueued. Link: https://lore.kernel.org/r/af25163257796b50bb99d4ede4025cea55787b8f.1605847196.git.fthain@telegraphics.com.au Tested-by: Michael Schmitz Reviewed-by: Michael Schmitz Signed-off-by: Finn Thain Signed-off-by: Martin K. Petersen commit 66df79ccbc2f617a2bbaa7108a2b50a6869de5d4 Author: Bjorn Andersson Date: Fri Nov 20 20:48:10 2020 -0800 scsi: ufs: Adjust logic in common ADAPT helper The introduction of ufshcd_dme_configure_adapt() refactored out duplication from the Mediatek and Qualcomm drivers. Both these implementations had the logic of: gear_tx == UFS_HS_G4 => PA_INITIAL_ADAPT gear_tx != UFS_HS_G4 => PA_NO_ADAPT but now both implementations pass PA_INITIAL_ADAPT as "adapt_val" and if gear_tx is not UFS_HS_G4 that is replaced with PA_INITIAL_ADAPT. In other words, it's PA_INITIAL_ADAPT in both above cases. The result is that e.g. Qualcomm SM8150 has no longer functional UFS, so adjust the logic to match the previous implementation. Link: https://lore.kernel.org/r/20201121044810.507288-1-bjorn.andersson@linaro.org Fixes: fc85a74e28fe ("scsi: ufs: Refactor ADAPT configuration function") Reviewed-by: Can Guo Reviewed-by: Stanley Chu Signed-off-by: Bjorn Andersson Signed-off-by: Martin K. Petersen commit 5112cf59d76d799b1c4d66af92417e2673fb1d5b Author: Christophe JAILLET Date: Sun Nov 22 19:07:04 2020 +0100 sctp: Fix some typo s/tranport/transport/ Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/20201122180704.1366636-1-christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski commit 9a7e3d7f056831a6193d6d737fb7a26dfdceb04b Author: Dan Williams Date: Mon Nov 23 17:43:53 2020 -0800 ACPI: NFIT: Fix input validation of bus-family Dan reports that smatch thinks userspace can craft an out-of-bound bus family number. However, nd_cmd_clear_to_send() blocks all non-zero values of bus-family since only the kernel can initiate these commands. However, in the speculation path, family is a user controlled array index value so mask it for speculation safety. Also, since the nd_cmd_clear_to_send() safety is non-obvious and possibly may change in the future include input validation as if userspace could get past the nd_cmd_clear_to_send() gatekeeper. Link: http://lore.kernel.org/r/20201111113000.GA1237157@mwanda Reported-by: Dan Carpenter Fixes: 6450ddbd5d8e ("ACPI: NFIT: Define runtime firmware activation commands") Cc: Signed-off-by: Dan Williams commit cc69837fcaf467426ca19e5790085c26146a2300 Author: Jakub Kicinski Date: Fri Nov 20 14:50:52 2020 -0800 net: don't include ethtool.h from netdevice.h linux/netdevice.h is included in very many places, touching any of its dependecies causes large incremental builds. Drop the linux/ethtool.h include, linux/netdevice.h just needs a forward declaration of struct ethtool_ops. Fix all the places which made use of this implicit include. Acked-by: Johannes Berg Acked-by: Shannon Nelson Reviewed-by: Jesse Brandeburg Link: https://lore.kernel.org/r/20201120225052.1427503-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit e95f287deed2454b8cad5b27859271db30130b2b Author: Biwen Li Date: Mon Nov 2 15:26:50 2020 +0800 soc: fsl: handle RCPM errata A-008646 on SoC LS1021A Hardware issue: - Reading register RCPM_IPPDEXPCR1 always return zero, this causes system firmware could not get correct information and wrongly do clock gating for all wakeup source IP during system suspend. Then those IPs will never get chance to wake system. Workaround: - Copy register RCPM_IPPDEXPCR1's setting to register SCFG_SPARECR8 to allow system firmware's psci method read it and do things accordingly. Signed-off-by: Biwen Li Signed-off-by: Ran Wang Signed-off-by: Li Yang commit 7fd6372e273e67d6d8b49a3cd8d9a00b44d92e97 Author: Christophe JAILLET Date: Sat Nov 21 10:03:30 2020 +0100 net: pch_gbe: Use 'dma_free_coherent()' to undo 'dma_alloc_coherent()' Memory allocation are done with 'dma_alloc_coherent()'. Be consistent and use 'dma_free_coherent()' to free the corresponding memory. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/20201121090330.1332543-1-christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski commit 8ff39301efd9d21cd62caad3504aa8d6e35d8304 Author: Christophe JAILLET Date: Sat Nov 21 10:03:02 2020 +0100 net: pch_gbe: Use dma_set_mask_and_coherent to simplify code 'pci_set_dma_mask()' + 'pci_set_consistent_dma_mask()' can be replaced by an equivalent 'dma_set_mask_and_coherent()' which is much less verbose. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/20201121090302.1332491-1-christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski commit 1119ea801955d93169b652f4dd3d46c455272c88 Merge: 2fc9e6842fb8f ed5ef9fb2023c Author: Jakub Kicinski Date: Mon Nov 23 16:57:23 2020 -0800 Merge branch 'net-dsa-hellcreek-minor-cleanups' Kurt Kanzenbach says: ==================== net: dsa: hellcreek: Minor cleanups fix two minor issues in the hellcreek driver. ==================== Link: https://lore.kernel.org/r/20201121114455.22422-1-kurt@linutronix.de Signed-off-by: Jakub Kicinski commit ed5ef9fb2023cb6e6a85ff6617a30acd8df63075 Author: Kurt Kanzenbach Date: Sat Nov 21 12:44:55 2020 +0100 net: dsa: hellcreek: Don't print error message on defer When DSA is not loaded when the driver is probed an error message is printed. But, that's not really an error, just a defer. Use dev_err_probe() instead. Signed-off-by: Kurt Kanzenbach Reviewed-by: Florian Fainelli Reviewed-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit 8551fad63cd3e9e86926966da68d66fc19a6928d Author: Kurt Kanzenbach Date: Sat Nov 21 12:44:54 2020 +0100 net: dsa: tag_hellcreek: Cleanup includes Remove unused and add needed includes. No functional change. Suggested-by: Vladimir Oltean Signed-off-by: Kurt Kanzenbach Reviewed-by: Florian Fainelli Reviewed-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit ff8b941a39d1d09db0ca51fb479172c7b5b88659 Author: Lee Jones Date: Mon Nov 16 17:40:50 2020 +0000 drm/msm/disp/dpu1/dpu_encoder: Remove a bunch of unused variables Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c: In function ‘dpu_encoder_virt_mode_set’: drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:981:31: warning: variable ‘num_dspp’ set but not used [-Wunused-but-set-variable] drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:976:30: warning: variable ‘topology’ set but not used [-Wunused-but-set-variable] drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c: In function ‘_dpu_encoder_virt_enable_helper’: drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:1099:26: warning: variable ‘priv’ set but not used [-Wunused-but-set-variable] drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c: In function ‘dpu_encoder_virt_disable’: drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:1210:18: warning: variable ‘dpu_kms’ set but not used [-Wunused-but-set-variable] Cc: Rob Clark Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: linux-arm-msm@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org Signed-off-by: Lee Jones Reviewed-by: Abhinav Kumar Signed-off-by: Rob Clark commit bd011f4d3828fa6c45c7b89e7b91910cace67f44 Author: Lee Jones Date: Mon Nov 16 17:40:49 2020 +0000 drm/msm/disp/dpu1/dpu_core_perf: Remove set but unused variable 'dpu_cstate' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c: In function ‘_dpu_core_perf_calc_crtc’: drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c:113:25: warning: variable ‘dpu_cstate’ set but not used [-Wunused-but-set-variable] Cc: Rob Clark Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: Kalyan Thota Cc: linux-arm-msm@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org Signed-off-by: Lee Jones Reviewed-by: Abhinav Kumar Signed-off-by: Rob Clark commit da640b3ee28d54531695725a6ff4e9dcb3249725 Author: Lee Jones Date: Mon Nov 16 17:40:48 2020 +0000 drm/msm/disp/mdp5/mdp5_kms: Make local functions 'mdp5_{en, dis}able()' static Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c:299:5: warning: no previous prototype for ‘mdp5_disable’ [-Wmissing-prototypes] drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c:319:5: warning: no previous prototype for ‘mdp5_enable’ [-Wmissing-prototypes] Cc: Rob Clark Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: Thomas Zimmermann Cc: linux-arm-msm@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org Signed-off-by: Lee Jones Reviewed-by: Abhinav Kumar Signed-off-by: Rob Clark commit 59521c138feac9fef6e6ba41dc882998d54fe3b1 Author: Lee Jones Date: Mon Nov 16 17:40:46 2020 +0000 drm/msm/disp/mdp5/mdp5_crtc: Make local function 'mdp5_crtc_setup_pipeline()' static Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c:581:5: warning: no previous prototype for ‘mdp5_crtc_setup_pipeline’ [-Wmissing-prototypes] Cc: Rob Clark Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: Thomas Zimmermann Cc: linux-arm-msm@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org Signed-off-by: Lee Jones Reviewed-by: Abhinav Kumar Signed-off-by: Rob Clark commit 991a2719d31585d9b1ce1beae26f6d73c06fed9b Author: Lee Jones Date: Mon Nov 16 17:40:45 2020 +0000 drm/msm/adreno/a6xx_gpu: Staticise local function 'a6xx_idle' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/msm/adreno/a6xx_gpu.c:33:6: warning: no previous prototype for ‘a6xx_idle’ [-Wmissing-prototypes] Cc: Rob Clark Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: linux-arm-msm@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Rob Clark commit 6f6e2dcbb82b9b2ea304fe32635789fedd4e9868 Author: Xi Wang Date: Sat Nov 14 17:58:36 2020 +0800 RDMA/hns: Refactor the hns_roce_buf allocation flow Add a group of flags to control the 'struct hns_roce_buf' allocation flow, this is used to support the caller running in atomic context. Link: https://lore.kernel.org/r/1605347916-15964-1-git-send-email-liweihang@huawei.com Signed-off-by: Xi Wang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 3df98d79215ace13d1e91ddfc5a67a0f5acbd83f Author: Paul Moore Date: Sun Sep 27 22:38:26 2020 -0400 lsm,selinux: pass flowi_common instead of flowi to the LSM hooks As pointed out by Herbert in a recent related patch, the LSM hooks do not have the necessary address family information to use the flowi struct safely. As none of the LSMs currently use any of the protocol specific flowi information, replace the flowi pointers with pointers to the address family independent flowi_common struct. Reported-by: Herbert Xu Acked-by: James Morris Signed-off-by: Paul Moore commit b2d99bcb27225fe420a8923b21861aef2bb43d9b Author: Gustavo A. R. Silva Date: Fri Nov 20 12:32:26 2020 -0600 selinux: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Paul Moore commit 3d1d8f2943e23bd329b63548cdcc915b3657c4d2 Author: Lee Jones Date: Tue Nov 3 15:28:38 2020 +0000 soc: fsl: qbman: qman: Remove unused variable 'dequeue_wq' Fixes the following W=1 kernel build warning(s): drivers/soc/fsl/qbman/qman.c: In function ‘qman_shutdown_fq’: drivers/soc/fsl/qbman/qman.c:2700:8: warning: variable ‘dequeue_wq’ set but not used [-Wunused-but-set-variable] Cc: Li Yang Cc: YueHaibing Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Lee Jones Signed-off-by: Li Yang commit 0d0807bc2e05844db9c2fb78d1f36d98ddc8a3fa Author: Lee Jones Date: Tue Nov 3 15:28:24 2020 +0000 soc: fsl: qe: qe_common: Fix misnamed function attribute 'addr' Fixes the following W=1 kernel build warning(s): drivers/soc/fsl/qe/qe_common.c:237: warning: Function parameter or member 'addr' not described in 'cpm_muram_dma' drivers/soc/fsl/qe/qe_common.c:237: warning: Excess function parameter 'offset' description in 'cpm_muram_dma' Cc: Qiang Zhao Cc: Li Yang Cc: Scott Wood Cc: act Cc: Dan Malek Cc: "Software, Inc" Cc: Vitaly Bordug Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Lee Jones Signed-off-by: Li Yang commit 3a78f064a679e44cbd77df9fcb30ebac32f5b46a Author: Linus Walleij Date: Thu Nov 19 15:07:07 2020 +0100 drm/mcde: Fix uninitialized value "val" isn't initialized on the default: errorpath. Just return from the function if this happens. Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Linus Walleij Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201119140707.1008407-1-linus.walleij@linaro.org commit b636d36e3e0a5072b339b3164da18d6d0934e03e Author: Lee Jones Date: Tue Nov 3 15:28:17 2020 +0000 soc: fsl: dpio: qbman-portal: Fix a bunch of kernel-doc misdemeanours Fixes the following W=1 kernel build warning(s): drivers/soc/fsl/dpio/qbman-portal.c:430: warning: Function parameter or member 'inhibit' not described in 'qbman_swp_interrupt_set_inhibit' drivers/soc/fsl/dpio/qbman-portal.c:430: warning: Excess function parameter 'mask' description in 'qbman_swp_interrupt_set_inhibit' drivers/soc/fsl/dpio/qbman-portal.c:518: warning: Function parameter or member 'd' not described in 'qbman_eq_desc_clear' drivers/soc/fsl/dpio/qbman-portal.c:529: warning: Function parameter or member 'respond_success' not described in 'qbman_eq_desc_set_no_orp' drivers/soc/fsl/dpio/qbman-portal.c:529: warning: Excess function parameter 'response_success' description in 'qbman_eq_desc_set_no_orp' drivers/soc/fsl/dpio/qbman-portal.c:941: warning: Function parameter or member 's' not described in 'qbman_swp_push_get' drivers/soc/fsl/dpio/qbman-portal.c:941: warning: Excess function parameter 'p' description in 'qbman_swp_push_get' drivers/soc/fsl/dpio/qbman-portal.c:955: warning: Function parameter or member 's' not described in 'qbman_swp_push_set' drivers/soc/fsl/dpio/qbman-portal.c:955: warning: Excess function parameter 'p' description in 'qbman_swp_push_set' drivers/soc/fsl/dpio/qbman-portal.c:1052: warning: Function parameter or member 'd' not described in 'qbman_pull_desc_set_fq' drivers/soc/fsl/dpio/qbman-portal.c:1065: warning: Function parameter or member 'd' not described in 'qbman_pull_desc_set_wq' drivers/soc/fsl/dpio/qbman-portal.c:1079: warning: Function parameter or member 'd' not described in 'qbman_pull_desc_set_channel' drivers/soc/fsl/dpio/qbman-portal.c:1403: warning: Function parameter or member 'd' not described in 'qbman_release_desc_clear' drivers/soc/fsl/dpio/qbman-portal.c:1412: warning: Function parameter or member 'd' not described in 'qbman_release_desc_set_bpid' drivers/soc/fsl/dpio/qbman-portal.c:1412: warning: Function parameter or member 'bpid' not described in 'qbman_release_desc_set_bpid' drivers/soc/fsl/dpio/qbman-portal.c:1421: warning: Function parameter or member 'd' not described in 'qbman_release_desc_set_rcdi' drivers/soc/fsl/dpio/qbman-portal.c:1421: warning: Function parameter or member 'enable' not described in 'qbman_release_desc_set_rcdi' Cc: Roy Pledge Cc: Li Yang Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Lee Jones Signed-off-by: Li Yang commit d795fd322063246f23ca20ba0125cf3ed89cc1d3 Author: Linus Walleij Date: Thu Nov 12 15:29:25 2020 +0100 drm/mcde: Support DPI output This implements support for DPI output using the port node in the device tree to connect a DPI LCD display to the MCDE. The block also supports TV-out but we leave that for another day when we have a hardware using it. We implement parsing and handling of the "port" node, and follow that to the DPI endpoint. The clock divider used by the MCDE to divide down the "lcdclk" (this has been designed for TV-like frequencies) is represented by an ordinary clock provider internally in the MCDE. This idea was inspired by the PL111 solution by Eric Anholt: the divider also works very similar to the Pl111 clock divider. We take care to clear up some errors regarding the number of available formatters and their type. We have 6 DSI formatters and 2 DPI formatters. Tested on the Samsung GT-I9070 Janice mobile phone. Signed-off-by: Linus Walleij Acked-by: Sam Ravnborg Cc: Stephan Gerhold Cc: phone-devel@vger.kernel.org Cc: upstreaming@lists.sr.ht Link: https://patchwork.freedesktop.org/patch/msgid/20201112142925.2571179-2-linus.walleij@linaro.org commit bfbc5e3b1774073ec92129995c7a6291015008af Author: Linus Walleij Date: Thu Nov 12 15:29:24 2020 +0100 drm/mcde: Break out DSI set-up routine To be able to support DPI without messing things up we first break out the DSI set-up to a separate function. Signed-off-by: Linus Walleij Acked-by: Sam Ravnborg Cc: Stephan Gerhold Cc: phone-devel@vger.kernel.org Cc: upstreaming@lists.sr.ht Link: https://patchwork.freedesktop.org/patch/msgid/20201112142925.2571179-1-linus.walleij@linaro.org commit 77f512bde99ad1ebc88f094d18702fa9589c2206 Author: Linus Walleij Date: Tue Nov 17 18:54:13 2020 +0100 drm/mcde: Fix RGB/BGR bug I was confused when the graphics came out with blue penguins on the DPI panel. It turns out that the so-called "packed RGB666" mode on the DSI formatter is incorrect: this mode is the actual RGB888 mode, and the mode called RGB888 is BGR888. The claims that the MCDE had inverse RGB/BGR buffer formats was wrong, so correct this and the buggy register and everything is much more consistent, and graphics look good on all targets, both DPI and DSI. Signed-off-by: Linus Walleij Reviewed-by: Sam Ravnborg Cc: phone-devel@vger.kernel.org Cc: Stephan Gerhold Link: https://patchwork.freedesktop.org/patch/msgid/20201117175413.869871-1-linus.walleij@linaro.org commit 2fc9e6842fb8fcbaee95bc7cbb99220d08dac3a9 Merge: fc0d3b24bdb7a 34890b30dc731 Author: Jakub Kicinski Date: Mon Nov 23 13:43:48 2020 -0800 Merge branch 'net-ptp-introduce-common-defines-for-ptp-message-types' Christian Eggers says: ==================== net: ptp: introduce common defines for PTP message types This series introduces commen defines for PTP event messages. Driver internal defines are removed and some uses of magic numbers are replaced by the new defines. ==================== Link: https://lore.kernel.org/r/20201120084106.10046-1-ceggers@arri.de Signed-off-by: Jakub Kicinski commit 34890b30dc73175c4dfdd58e3e5985bdd3fe318e Author: Christian Eggers Date: Fri Nov 20 09:41:06 2020 +0100 ptp: ptp_ines: use new PTP_MSGTYPE_* define(s) Remove driver internal defines for this. Masking msgtype with 0xf is already done within ptp_get_msgtype(). Signed-off-by: Christian Eggers Cc: Kurt Kanzenbach Reviewed-by: Vladimir Oltean Reviewed-by: Richard Cochran Signed-off-by: Jakub Kicinski commit 6b6817c5d81d168b03b0e9c3adc4eb42d3713e08 Author: Christian Eggers Date: Fri Nov 20 09:41:05 2020 +0100 dpaa2-eth: use new PTP_MSGTYPE_* define(s) Remove usage of magic numbers. Signed-off-by: Christian Eggers Cc: Ioana Ciornei Cc: Ioana Radulescu Cc: Yangbo Lu Reviewed-by: Vladimir Oltean Reviewed-by: Richard Cochran Signed-off-by: Jakub Kicinski commit 076d38b88c4146fd5506933d440b881741b6ab60 Author: Christian Eggers Date: Fri Nov 20 09:41:04 2020 +0100 net: ptp: introduce common defines for PTP message types Using PTP wide defines will obsolete different driver internal defines and uses of magic numbers. Signed-off-by: Christian Eggers Cc: Kurt Kanzenbach Reviewed-by: Vladimir Oltean Reviewed-by: Richard Cochran Signed-off-by: Jakub Kicinski commit fc0d3b24bdb7a523e973e49648c45d240320ee95 Author: Jakub Kicinski Date: Sat Nov 21 13:48:44 2020 -0800 compat: always include linux/compat.h from net/compat.h We're about to do reshuffling in networking headers and eliminate some implicit includes. This results in: In file included from ../net/ipv4/netfilter/arp_tables.c:26: include/net/compat.h:60:40: error: unknown type name ‘compat_uptr_t’; did you mean ‘compat_ptr_ioctl’? struct sockaddr __user **save_addr, compat_uptr_t *ptr, ^~~~~~~~~~~~~ compat_ptr_ioctl include/net/compat.h:61:4: error: unknown type name ‘compat_size_t’; did you mean ‘compat_sigset_t’? compat_size_t *len); ^~~~~~~~~~~~~ compat_sigset_t Currently net/compat.h depends on linux/compat.h being included first. After the upcoming changes this would break the 32bit build. Reviewed-by: Arnd Bergmann Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20201121214844.1488283-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 93035242d9e22f2aad6ac0b886f19444713c0089 Author: Maor Gottlieb Date: Sun Nov 15 14:06:50 2020 +0200 tools/testing/scatterlist: Test dynamic __sg_alloc_table_from_pages Add few cases to test the dynamic allocation flow of __sg_alloc_table_from_pages. Link: https://lore.kernel.org/r/20201115120650.139277-1-leon@kernel.org Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit ed92f6a52b84c0c03ae9d829cf118c6e38e456fb Merge: df0e4de29c75f 418baf2c28f34 Author: Jason Gunthorpe Date: Mon Nov 23 16:50:59 2020 -0400 Merge tag 'v5.10-rc5' into rdma.git for-next For dependencies in following patches Signed-off-by: Jason Gunthorpe commit 4ce4be5d28deeeb6aa3f724c3fcb3c1627e40f10 Merge: d4f97711b3b36 124f035310adc Author: Arnd Bergmann Date: Mon Nov 23 21:44:35 2020 +0100 Merge tag 'samsung-drivers-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/drivers Samsung SoC drivers changes for v5.11 1. Limit the big.LITTLE cpuidle driver to Peach-Pit/Pi Chromebooks only because these are the only platforms were the driver works properly. 2. Convert the Exynos CLKOUT driver to a full module which solves boot-probe ordering issues (e.g. if device nodes in DTS are moved). This also brings modularization and compile testing. 3. Few minor cleanups in documentation and code. * tag 'samsung-drivers-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: clk: samsung: allow building the clkout driver as module soc: samsung: s3c-pm-check: Fix incorrectly named variable 'val' soc: samsung: exynos5422-asv: remove unneeded semicolon serial: s3c: Update path of Samsung S3C machine file Documentation: Update paths of Samsung S3C machine files clk: samsung: exynos-clkout: convert to module driver soc: samsung: exynos-pmu: instantiate clkout driver as MFD cpuidle: big.LITTLE: enable driver only on Peach-Pit/Pi Chromebooks Link: https://lore.kernel.org/r/20201113162211.10020-1-krzk@kernel.org Signed-off-by: Arnd Bergmann commit 2ed6e3bac15242c18bef5af12547a13b25b65ac8 Author: Qing Zhang Date: Sat Nov 21 11:43:51 2020 +0800 spi: amd: Use devm_platform_ioremap_resource() in amd_spi_probe Simplify this function implementation by using a known wrapper function. Signed-off-by: Qing Zhang Link: https://lore.kernel.org/r/1605930231-19448-1-git-send-email-zhangqing@loongson.cn Signed-off-by: Mark Brown commit 0fbeae70ee7ce98e18a47337cd1f205dd88589e9 Author: Cristian Marussi Date: Mon Nov 23 20:23:36 2020 +0000 regulator: add SCMI driver Add a simple regulator based on SCMI Voltage Domain Protocol. Signed-off-by: Cristian Marussi ---- v6 --> v7 - add proper blank lines between semantic blocks - fix return value on error path of scmi_reg_is_enabled() - use generic Failure message on err path of info_get() - fix comment containing apostrophe v3 --> v4 - using of_match_full_name core regulator flag - avoid coccinelle falde complaints about pointer-sized allocations v2 --> v3 - remove multiple linear mappings support - removed duplicated voltage name printout - added a few comments - simplified return path in scmi_reg_set_voltage_sel() v1 --> v2 - removed duplicate regulator naming - removed redundant .get/set_voltage ops: only _sel variants implemented - removed condexpr on fail path to increase readability v0 --> v1 - fixed init_data constraint parsing - fixes for v5.8 (linear_range.h) - fixed commit message content and subject line format - factored out SCMI core specific changes to distinct patch - reworked Kconfig and Makefile to keep proper alphabetic order - fixed SPDX comment style - removed unneeded inline functions - reworked conditionals for legibility - fixed some return paths to properly report SCMI original errors codes - added some more descriptive error messages when fw returns invalid ranges - removed unneeded explicit devm_regulator_unregister from .remove() Link: https://lore.kernel.org/r/20201123202336.46701-4-cristian.marussi@arm.com Signed-off-by: Mark Brown commit e8056bf01080eeb13b0229f3fa4cb25a5a2de6a5 Author: Cristian Marussi Date: Mon Nov 23 20:23:34 2020 +0000 dt-bindings: arm: remove optional properties for SCMI Regulators Remove optional properties bindings descriptions for SCMI Regulators. Signed-off-by: Cristian Marussi Link: https://lore.kernel.org/r/20201123202336.46701-2-cristian.marussi@arm.com Signed-off-by: Mark Brown commit 6a8b8b582db13a18235f3b0400f103a0573c7859 Author: Fabio Estevam Date: Mon Nov 23 17:09:17 2020 -0300 ASoC: imx-audmux: Remove unused .id_table Since 5.10-rc1 i.MX is a devicetree-only platform and the existing .id_table support in this driver was only useful for old non-devicetree platforms. Get rid of the .id_table since it is no longer used. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20201123200917.16447-1-festevam@gmail.com Signed-off-by: Mark Brown commit b3cf78e0dacb7fba50d0c1eb9dfa6f92d31529e2 Author: Krzysztof Kozlowski Date: Mon Nov 16 18:51:33 2020 +0100 ASoC: ti: depend on COMMON_CLK to fix compile tests The TI/OMAP sound drivers use Common Clock Framework thus they cannot be built on platforms without it (e.g. compile test on MIPS with RALINK and SOC_RT305X): /usr/bin/mips-linux-gnu-ld: sound/soc/ti/davinci-mcasp.o:davinci-mcasp.c:(.text+0x1c64): more undefined references to `clk_set_parent' follow /usr/bin/mips-linux-gnu-ld: sound/soc/ti/omap-dmic.o: in function `omap_dmic_set_dai_sysclk': omap-dmic.c:(.text+0xa5c): undefined reference to `clk_get_parent' Reported-by: kernel test robot Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201116175133.402553-4-krzk@kernel.org Signed-off-by: Mark Brown commit 82ceffce96336ee9863f3dfde63aef5748ca4ab1 Author: Krzysztof Kozlowski Date: Mon Nov 16 18:51:32 2020 +0100 ASoC: stm: depend on COMMON_CLK to fix compile tests The STM32 I2S drivers use Common Clock Framework thus they cannot be built on platforms without it (e.g. compile test on MIPS with RALINK and SOC_RT305X): /usr/bin/mips-linux-gnu-ld: sound/soc/stm/stm32_i2s.o: in function `stm32_i2s_hw_params': stm32_i2s.c:(.text+0x1870): undefined reference to `clk_set_parent' Reported-by: kernel test robot Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201116175133.402553-3-krzk@kernel.org Signed-off-by: Mark Brown commit c3d900dc905b78788c94f3a063b769bdbad16a98 Author: Krzysztof Kozlowski Date: Mon Nov 16 18:51:31 2020 +0100 ASoC: sh: depend on COMMON_CLK to fix compile tests The SH4 FSI sound drivers use SuperH clocks thus they cannot be built on platforms without proper clock support (e.g. compile test on MIPS with RALINK and SOC_RT305X): /usr/bin/mips-linux-gnu-ld: sound/soc/sh/fsi.o: in function `fsi_clk_set_rate_external': fsi.c:(.text+0x2714): undefined reference to `clk_set_parent' Reported-by: kernel test robot Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201116175133.402553-2-krzk@kernel.org Signed-off-by: Mark Brown commit df0e4de29c75fab2d59b67b7542ea1e10d32c6e1 Author: Christophe JAILLET Date: Sat Nov 21 10:51:27 2020 +0100 IB/qib: Use dma_set_mask_and_coherent to simplify code 'pci_set_dma_mask()' + 'pci_set_consistent_dma_mask()' can be replaced by an equivalent 'dma_set_mask_and_coherent()' which is much less verbose. Link: https://lore.kernel.org/r/20201121095127.1335228-1-christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Acked-by: Mike Marciniszyn Signed-off-by: Jason Gunthorpe commit 5d16a4f9540e5af41418adb94a1cec8805226c12 Merge: b52b417ccac4f e7095c35abfc5 Author: Mark Brown Date: Mon Nov 23 20:36:50 2020 +0000 Merge series "Add support for SCMIv3.0 Voltage Domain Protocol and SCMI-Regulator" from Cristian Marussi : Hi, this series introduces the support for the new SCMI Voltage Domain Protocol defined by the upcoming SCMIv3.0 specification, whose BETA release is available at [1]. Afterwards, a new generic SCMI Regulator driver is developed on top of the new SCMI VD Protocol. In V4 Patch 3/5 introduced a needed fix in Regulator framework to cope with generic named nodes. The series is currently based on for-next/scmi [2] on top of: commit b141fca08207 ("firmware: arm_scmi: Fix missing destroy_workqueue()") Any feedback welcome, Thanks, Cristian --- v5 --> v6 - reordered dt bindings patch - removed single field struct - reviewed args to scmi_init_voltage_levels() - allocating scmi_voltage_info_array contiguously v4 --> v5 - rebased - VD Protocol - removed inline - moved segmented intervals defines - fixed some macros complaints by checkpatch v3 --> v4 - DT bindings - using generic node names - listing explicitly subset of supported regulators bindings - SCMI Regulator - using of_match_full_name core regulator flag - avoid coccinelle false flag complaints - VD Protocol - avoid coccinelle false flag complaints - avoiding fixed size typing v2 --> v3 - DT bindings - avoid awkard examples based on _cpu/_gpu regulators - SCMI Regulator - remove multiple linear mappings support - removed duplicated voltage name printout - added a few comments - simplified return path in scmi_reg_set_voltage_sel() - VD Protocol - restrict segmented voltage domain descriptors to one triplet - removed unneeded inline - free allocated resources for invalid voltage domain - added __must_check to info_get voltage operations - added a few comments - removed fixed size typing from struct voltage_info v1 --> v2 - rebased on for-next/scmi v5.10 - DT bindings - removed any reference to negative voltages - SCMI Regulator - removed duplicate regulator naming - removed redundant .get/set_voltage ops: only _sel variants implemented - removed condexpr on fail path to increase readability - VD Protocol - fix voltage levels query loop to reload full cmd description between iterations as reported by Etienne Carriere - ensure transport rx buffer is properly sized calli scmi_reset_rx_to_maxsz between transfers [1]:https://developer.arm.com/documentation/den0056/c/ [2]:https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux.git/log/?h=for-next/scmi Cristian Marussi (5): firmware: arm_scmi: Add Voltage Domain Support firmware: arm_scmi: add SCMI Voltage Domain devname regulator: core: add of_match_full_name boolean flag dt-bindings: arm: add support for SCMI Regulators regulator: add SCMI driver .../devicetree/bindings/arm/arm,scmi.txt | 43 ++ drivers/firmware/arm_scmi/Makefile | 2 +- drivers/firmware/arm_scmi/common.h | 1 + drivers/firmware/arm_scmi/driver.c | 3 + drivers/firmware/arm_scmi/voltage.c | 380 ++++++++++++++++ drivers/regulator/Kconfig | 9 + drivers/regulator/Makefile | 1 + drivers/regulator/of_regulator.c | 8 +- drivers/regulator/scmi-regulator.c | 409 ++++++++++++++++++ include/linux/regulator/driver.h | 3 + include/linux/scmi_protocol.h | 64 +++ 11 files changed, 920 insertions(+), 3 deletions(-) create mode 100644 drivers/firmware/arm_scmi/voltage.c create mode 100644 drivers/regulator/scmi-regulator.c -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel commit 16be06aa1a28b3bc967f0f32e7e4668889bd5131 Author: Jonathan Cameron Date: Sat Oct 31 18:48:39 2020 +0000 dt-bindings:iio:adc:x-powers,axp209-adc: txt to yaml conversion This is a very small binding. It might make sense at some stage to just roll it into the parent mfd. For now, converted as is. The main advantage of this document is the identification of the channel index values when this is used as a provider of ADC channels to consumers. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201031184854.745828-32-jic23@kernel.org commit 82101630222fc6caa21502df0d02e0153aaf25d2 Author: Rikard Falkeborn Date: Sat Nov 21 01:25:29 2020 +0100 RDMA/i40iw: Constify ops structs The ops structs are never modified. Make them const to allow the compiler to put them in read-only memory. Link: https://lore.kernel.org/r/20201121002529.89148-1-rikard.falkeborn@gmail.com Signed-off-by: Rikard Falkeborn Signed-off-by: Jason Gunthorpe commit 6d8285e604e0221b67bd5db736921b7ddce37d00 Author: Kamal Heib Date: Sun Nov 8 15:20:07 2020 +0200 RDMA/cxgb4: Validate the number of CQEs Before create CQ, make sure that the requested number of CQEs is in the supported range. Fixes: cfdda9d76436 ("RDMA/cxgb4: Add driver for Chelsio T4 RNIC") Link: https://lore.kernel.org/r/20201108132007.67537-1-kamalheib1@gmail.com Signed-off-by: Kamal Heib Signed-off-by: Jason Gunthorpe commit a9d2e9ae953f0ddd0327479c81a085adaa76d903 Author: Jason Gunthorpe Date: Fri Nov 6 10:00:49 2020 -0400 RDMA/siw,rxe: Make emulated devices virtual in the device tree This moves siw and rxe to be virtual devices in the device tree: lrwxrwxrwx 1 root root 0 Nov 6 13:55 /sys/class/infiniband/rxe0 -> ../../devices/virtual/infiniband/rxe0/ Previously they were trying to parent themselves to the physical device of their attached netdev, which doesn't make alot of sense. My hope is this will solve some weird syzkaller hits related to sysfs as it could be possible that the parent of a netdev is another netdev, eg under bonding or some other syzkaller found netdev configuration. Nesting a ib_device under anything but a physical device is going to cause inconsistencies in sysfs during destructions. Link: https://lore.kernel.org/r/0-v1-dcbfc68c4b4a+d6-virtual_dev_jgg@nvidia.com Signed-off-by: Jason Gunthorpe commit 808b2c925dd0308a89e717df57721a9ed015c243 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:31:49 2020 -0600 IB/mlx5: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding the new pseudo-keyword fallthrough; instead of letting the code fall through to the next case. Link: https://lore.kernel.org/r/2b0c87362bc86f6adfe56a5a6685837b71022bbf.1605896059.git.gustavoars@kernel.org Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Acked-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit c6191f83be6a9d671c5e9bff99e5d03e338252f8 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:28:56 2020 -0600 IB/qedr: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of just letting the code fall through to the next case. Link: https://lore.kernel.org/r/8d7cf00ec3a4b27a895534e02077c2c9ed8a5f8e.1605896059.git.gustavoars@kernel.org Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Acked-by: Michal Kalderon  Signed-off-by: Jason Gunthorpe commit 667d457fa84f27c3cd9e0f96557422e398f96fee Author: Gustavo A. R. Silva Date: Fri Nov 20 12:28:49 2020 -0600 IB/mlx4: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of just letting the code fall through to the next case. Link: https://lore.kernel.org/r/0153716933e01608d46155941c447d011c59c1e4.1605896059.git.gustavoars@kernel.org Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Jason Gunthorpe commit 4846bf44e1a8b5038f73bd7460d402e519971492 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:25:27 2020 -0600 IB/hfi1: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of just letting the code fall through to the next case. Link: https://lore.kernel.org/r/13cc2fe2cf8a71a778dbb3d996b07f5e5d04fd40.1605896059.git.gustavoars@kernel.org Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Tested-by: Mike Marciniszyn Signed-off-by: Jason Gunthorpe commit d7d775b1ffb15408a60ec12dc9d02d4751e6b10a Author: David Howells Date: Wed Sep 16 01:34:39 2020 +0100 rxrpc: Ask the security class how much space to allow in a packet Ask the security class how much header and trailer space to allow for when allocating a packet, given how much data is remaining. This will allow the rxgk security class to stick both a trailer in as well as a header as appropriate in the future. Signed-off-by: David Howells commit 2a39a30f0d9b5243962a19b2d5a48a8ac3a9a292 Author: Rafael J. Wysocki Date: Mon Nov 23 20:01:01 2020 +0100 ACPI: EC: Clean up status flags checks in advance_transaction() Eliminate comparisons from the status flags checks in advance_transaction() (especially from the one that is only correct, because the value of the flag checked in there is 1) and rearrange the code for more clarity while at it. No intentional functional impact. Signed-off-by: Rafael J. Wysocki commit 631734fce3fa27ec5d6f456fc1dd3699617c9efb Author: Rafael J. Wysocki Date: Mon Nov 23 20:00:42 2020 +0100 ACPI: EC: Untangle error handling in advance_transaction() Introduce acpi_ec_spurious_interrupt() for recording spurious interrupts and use it for error handling in advance_transaction(), drop the (now redundant) original error handling block from there along with a frew goto statements that are not necessary any more. No intentional functional impact. Signed-off-by: Rafael J. Wysocki commit 902675fa87e3a3d433481a2df6e50c10da5e20c2 Author: Rafael J. Wysocki Date: Mon Nov 23 20:00:34 2020 +0100 ACPI: EC: Simplify error handling in advance_transaction() Notice that the value of t in advance_transaction() does not change after its initialization and: - Initialize t upfront (and rearrange the definitions of local variables while at it). - Check it against NULL in a block executed when it is NULL. - Skip error handling for t == NULL, because a valid pointer value of t is required for the error handling. - Drop the (now redundant) check of t against NULL from the error handling block and reduce the indentation level in there. No intentional functional impact. Signed-off-by: Rafael J. Wysocki commit d2a2e6ccebb80d297f9827743f49d0f70b4a2daa Author: Rafael J. Wysocki Date: Mon Nov 23 20:00:25 2020 +0100 ACPI: EC: Rename acpi_ec_is_gpe_raised() Rename acpi_ec_is_gpe_raised() into acpi_ec_gpe_status_set(), update its callers accordingly and drop the ternary operator (which isn't really necessary in there) from it. No intentional functional impact. Signed-off-by: Rafael J. Wysocki commit d269fb031392d99386b3d11e899e88ae76af9466 Author: Rafael J. Wysocki Date: Mon Nov 23 20:00:18 2020 +0100 ACPI: EC: Fold acpi_ec_clear_gpe() into its caller Fold acpi_ec_clear_gpe() which is only used in one place into its caller and clean up comments related to that function while at it. No intentional functional impact. Signed-off-by: Rafael J. Wysocki commit b52b417ccac4fae5b1f2ec4f1d46eb91e4493dc5 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:33:08 2020 -0600 regulator: as3722: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a fallthrough pseudo-keyword instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/c0efb81064f71837f19408f65b52d155103ee514.1605896059.git.gustavoars@kernel.org Signed-off-by: Mark Brown commit e7095c35abfc5a5d566941a87434c0fd5ffb570f Author: Cristian Marussi Date: Thu Nov 19 19:10:49 2020 +0000 regulator: core: add of_match_full_name boolean flag During regulators registration, if .of_match and .regulators_node are defined as non-null strings in struct regulator_desc the core searches the DT subtree rooted at .regulators_node trying to match, at first, .of_match against the 'regulator-compatible' property and, then, falling back to use the name of the node itself to determine a good match. Property 'regulator-compatible', though, is now deprecated and falling back to match against the node name, works fine only as long as the involved nodes are named in an unique way across the searched subtree; if that's not the case, like when using @ style naming for properties indexed via 'reg' property (as advised by the standard), the above matching mechanism based on the simple common name will lead to multiple matches and the only viable alternative would be to properly define the now deprecated 'regulator-compatible' as the node full name, i.e. @. In order to address this case without using such deprecated binding, define a new boolean flag .of_match_full_name in struct regulator_desc to force the core to match against the node full-name instead of the plain name. Signed-off-by: Cristian Marussi Link: https://lore.kernel.org/r/20201119191051.46363-4-cristian.marussi@arm.com Signed-off-by: Mark Brown commit 25ce4f2b3593fa6bba70ddabbd2ee297b262784f Author: Cheng-Yi Chiang Date: Wed Nov 18 12:38:52 2020 +0800 ASoC: hdmi-codec: Get ELD in before reporting plugged event In plugged callback, ELD should be updated from display driver so that user space can query information from ELD immediately after receiving jack plugged event. When jack is unplugged, clear ELD buffer so that user space does not get obsolete information of unplugged HDMI. Signed-off-by: Cheng-Yi Chiang Link: https://lore.kernel.org/r/20201118043852.1338877-1-cychiang@chromium.org Signed-off-by: Mark Brown commit 8e1e33ffa696b2d779dd5cd422a80960b88e508c Author: Martin Schiller Date: Wed Nov 18 07:39:19 2020 +0100 net/tun: Call type change netdev notifiers Call netdev notifiers before and after changing the device type. Signed-off-by: Martin Schiller Link: https://lore.kernel.org/r/20201118063919.29485-1-ms@dev.tdt.de Signed-off-by: Jakub Kicinski commit dceec3ff78076757311d92a388d50d0251fb7dbb Author: Peter Collingbourne Date: Fri Nov 20 12:33:46 2020 -0800 arm64: expose FAR_EL1 tag bits in siginfo The kernel currently clears the tag bits (i.e. bits 56-63) in the fault address exposed via siginfo.si_addr and sigcontext.fault_address. However, the tag bits may be needed by tools in order to accurately diagnose memory errors, such as HWASan [1] or future tools based on the Memory Tagging Extension (MTE). Expose these bits via the arch_untagged_si_addr mechanism, so that they are only exposed to signal handlers with the SA_EXPOSE_TAGBITS flag set. [1] http://clang.llvm.org/docs/HardwareAssistedAddressSanitizerDesign.html Signed-off-by: Peter Collingbourne Reviewed-by: Catalin Marinas Link: https://linux-review.googlesource.com/id/Ia8876bad8c798e0a32df7c2ce1256c4771c81446 Link: https://lore.kernel.org/r/0010296597784267472fa13b39f8238d87a72cf8.1605904350.git.pcc@google.com Signed-off-by: Catalin Marinas commit 77429eebd9b1af516bf1b6898e63b098ed748374 Author: kernel test robot Date: Mon Nov 23 11:18:50 2020 +0800 EDAC/igen6: ecclog_llist can be static Fixes: 10590a9d4f23 ("EDAC/igen6: Add EDAC driver for Intel client SoCs using IBECC") Reported-by: kernel test robot Signed-off-by: kernel test robot Link: https://lore.kernel.org/r/20201123031850.GA20416@aef56166e5fc Signed-off-by: Tony Luck commit ceff522db2cc2915d50ca7f019df1cc8b19c871c Author: David Howells Date: Tue Sep 29 21:48:50 2020 +0100 rxrpc: rxkad: Don't use pskb_pull() to advance through the response packet In the rxkad security class, don't use pskb_pull() to advance through the contents of the response packet. There's no point, especially as the next and last access to the skbuff still has to allow for the wire header in the offset (which we didn't advance over). Better to just add the displacement to the next offset. Signed-off-by: David Howells commit 521bb3049c4df06c6c302f5c6fef691c57ea3cc0 Author: David Howells Date: Tue Sep 22 13:36:17 2020 +0100 rxrpc: Organise connection security to use a union Organise the security information in the rxrpc_connection struct to use a union to allow for different data for different security classes. Signed-off-by: David Howells commit f4bdf3d683183d2d9f06c9f165fa48bb854988a4 Author: David Howells Date: Thu Sep 17 23:23:38 2020 +0100 rxrpc: Don't reserve security header in Tx DATA skbuff Insert the security header into the skbuff representing a DATA packet to be transmitted rather than using skb_reserve() when the packet is allocated. This makes it easier to apply crypto that spans the security header and the data, particularly in the upcoming RxGK class where we have a common encrypt-and-checksum function that is used in a number of circumstances. Signed-off-by: David Howells commit 8d47a43c48af31c0027e1e08fce7af5f9aaa83c7 Author: David Howells Date: Wed Sep 16 01:38:15 2020 +0100 rxrpc: Merge prime_packet_security into init_connection_security Merge the ->prime_packet_security() into the ->init_connection_security() hook as they're always called together. Signed-off-by: David Howells commit 177b8989661bf7f90851c7ab3dc174b1aa117989 Author: David Howells Date: Thu Oct 15 15:47:45 2020 +0100 rxrpc: Fix example key name in a comment Fix an example of an rxrpc key name in a comment. Signed-off-by: David Howells commit 9a0e6464f45b056163e6f04b14df44b15f02ed3a Author: David Howells Date: Thu Oct 15 15:59:36 2020 +0100 rxrpc: Ignore unknown tokens in key payload unless no known tokens When parsing a payload for an rxrpc-type key, ignore any tokens that are not of a known type and don't give an error for them - unless there are no tokens of a known type. Signed-off-by: David Howells commit 4c20c33340269e2924d2040a5f1ca2571fd8b258 Author: David Howells Date: Sun Sep 27 11:17:03 2020 +0100 rxrpc: Make the parsing of xdr payloads more coherent Make the parsing of xdr-encoded payloads, as passed to add_key, more coherent. Shuttling back and forth between various variables was a bit hard to follow. Signed-off-by: David Howells commit d5953f6543b50ccdaa550b2d25bc1a16e31a2f42 Author: David Howells Date: Sun Sep 27 11:13:04 2020 +0100 rxrpc: Allow security classes to give more info on server keys Allow a security class to give more information on an rxrpc_s-type key when it is viewed in /proc/keys. This will allow the upcoming RxGK security class to show the enctype name here. Signed-off-by: David Howells commit d2ae4e918218f543214fbd906db68a6c580efbbb Author: David Howells Date: Sun Sep 27 11:07:21 2020 +0100 rxrpc: Don't leak the service-side session key to userspace Don't let someone reading a service-side rxrpc-type key get access to the session key that was exchanged with the client. The server application will, at some point, need to be able to read the information in the ticket, but this probably shouldn't include the key material. Signed-off-by: David Howells commit 12da59fcab5a05d01773e7cb413b8b8f3bb4e334 Author: David Howells Date: Wed Sep 16 08:37:29 2020 +0100 rxrpc: Hand server key parsing off to the security class Hand responsibility for parsing a server key off to the security class. We can determine which class from the description. This is necessary as rxgk server keys have different lookup requirements and different content requirements (dependent on crypto type) to those of rxkad server keys. Signed-off-by: David Howells commit ca7fb10059a5755908d46db81d1f3738cd26aa9f Author: David Howells Date: Wed Sep 16 08:25:08 2020 +0100 rxrpc: Split the server key type (rxrpc_s) into its own file Split the server private key type (rxrpc_s) out into its own file rather than mingling it with the authentication/client key type (rxrpc) since they don't really bear any relation. Signed-off-by: David Howells commit ec832bd06d6fdf08b0455ab7c2a7a9104e029638 Author: David Howells Date: Wed Sep 16 08:00:44 2020 +0100 rxrpc: Don't retain the server key in the connection Don't retain a pointer to the server key in the connection, but rather get it on demand when the server has to deal with a response packet. This is necessary to implement RxGK (GSSAPI-mediated transport class), where we can't know which key we'll need until we've challenged the client and got back the response. This also means that we don't need to do a key search in the accept path in softirq mode. Also, whilst we're at it, allow the security class to ask for a kvno and encoding-type variant of a server key as RxGK needs different keys for different encoding types. Keys of this type have an extra bit in the description: ":::" Signed-off-by: David Howells commit 41057ebde0025b0179b852dd785c9f3f0f08adad Author: David Howells Date: Wed Sep 16 08:19:12 2020 +0100 rxrpc: Support keys with multiple authentication tokens rxrpc-type keys can have multiple tokens attached for different security classes. Currently, rxrpc always picks the first one, whether or not the security class it indicates is supported. Add preliminary support for choosing which security class will be used (this will need to be directed from a higher layer) and go through the tokens to find one that's supported. Signed-off-by: David Howells commit 0727d3ec38074d0cef3fbef1d64f2d0a92ace046 Author: David Howells Date: Tue Sep 8 22:30:52 2020 +0100 rxrpc: List the held token types in the key description in /proc/keys When viewing an rxrpc-type key through /proc/keys, display a list of held token types. Signed-off-by: David Howells commit 8a5dc321158fb3032cf990deb7473e22826e7346 Author: David Howells Date: Thu Sep 3 08:21:58 2020 +0100 rxrpc: Remove the rxk5 security class as it's now defunct Remove the rxrpc rxk5 security class as it's now defunct and nothing uses it anymore. Signed-off-by: David Howells commit 8eb621698fd4c49703d512fe437d84ab822bc59e Author: David Howells Date: Wed Sep 16 11:12:03 2020 +0100 keys: Provide the original description to the key preparser Provide the proposed description (add key) or the original description (update/instantiate key) when preparsing a key so that the key type can validate it against the data. This is important for rxrpc server keys as we need to check that they have the right amount of key material present - and it's better to do that when the key is loaded rather than deep in trying to process a response packet. Signed-off-by: David Howells cc: Jarkko Sakkinen cc: keyrings@vger.kernel.org commit 11af6de4799ee6eeae3730f18fd417414d212e2d Author: Maharaja Kennadyrajan Date: Wed Nov 11 16:08:37 2020 +0530 ath11k: Fix the rx_filter flag setting for peer rssi stats Set the rx_filter in ath11k_mac_config_mon_status_default(), only when the rx_filter value exists in ath11k_debug_rx_filter(). Without this change, rx_filter gets set to 0 and peer rssi stats aren't updating properly from firmware. Tested-on: IPQ8074 WLAN.HK.2.1.0.1-01230-QCAHKSWPL_SILICONZ-4 Fixes: ec48d28ba291 ("ath11k: Fix rx_filter flags setting for per peer rx_stats") Signed-off-by: Maharaja Kennadyrajan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1605091117-11005-1-git-send-email-mkenna@codeaurora.org commit 9af7c32ceca85da27867dd863697d2aafc80a3f8 Author: Venkateswara Naralasetty Date: Fri Nov 6 15:40:42 2020 +0530 ath10k: add target IRAM recovery feature support This target IRAM recovery feature support is to copy target IRAM contents available at ATH10K_MEM_REGION_TYPE_REG to host memory for back up after firmware loaded. Target IRAM contents are copied to wmi memory chunks allocated for the WMI_IRAM_RECOVERY_HOST_MEM_REQ_ID and provide the wmi chunks address to the firmware through wmi init command. If firmware detects andy IRAM corruption through periodic checksum validation, It will download the IRAM contents back from the provided wmi memory chunks address using hif_memcpy. This IRAM recovery feature prevent target assert in case of unexpected target IRAM corruptions. This patch also introduce a new feature flag 'iram-recovery' for backward compatibility. Tested-on: QCA9888 10.4-3.9.0.2-00094 Signed-off-by: Venkateswara Naralasetty Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1604657442-23674-1-git-send-email-vnaralas@codeaurora.org commit 1057db1b8b7661c5031caa0244dfa6bee9adc938 Author: Ramya Gnanasekar Date: Mon Nov 9 20:17:09 2020 +0530 ath11k: Fix beamformee STS in HE cap STS Beamformee capability sent from firmware is overwritten as num_tx_chains - 1. When num_tx_chains is 2, then STS is set to invalid value 1. Since STS is not limited by number of TX chain, not overwriting the capability received from firmware. Tested on: IPQ6018 WLAN.HK.2.4.0.1-00303-QCAHKSWPL_SILICONZ-1 Signed-off-by: Ramya Gnanasekar Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1604933229-15815-1-git-send-email-rgnanase@codeaurora.org commit 0eaa4c1d34c5635e293b7068ae170152ce0d60ff Author: P Praneesh Date: Mon Nov 9 15:11:55 2020 +0530 ath11k: add processor_id based ring_selector logic Current ring selector logic follows round-robin scheduling, when a process switch from one processor to another each time, the data in the cache would have to be invalidated and re-loaded from RAM leads to poor cache utilization. Therefore smp_processor_id() attempt to keep processes on the same processor via processor affinity which improves cache utilization. Also, ring selection could be chosen round robin when the processor_id based ring selection does not have the resources. Tested-on : IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-00874-QCAHKSWPL_SILICONZ-1 Signed-off-by: P Praneesh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1604914915-12831-1-git-send-email-ppranees@codeaurora.org commit a94ef811f7c3748736b85db0406da8e4ea391ac6 Author: Lina Iyer Date: Thu Nov 19 09:43:25 2020 -0700 PM: domains: replace -ENOTSUPP with -EOPNOTSUPP While submitting a patch to add next_wakeup, checkpatch reported this - WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP + return -ENOTSUPP; Address the above warning in other functions in pm_domain.h. Reviewed-by: Ulf Hansson Signed-off-by: Lina Iyer Signed-off-by: Rafael J. Wysocki commit 4e1d9a737d00f2cc811dc5654f82c92c7d80e98c Author: Patrice Chotard Date: Thu Nov 19 08:25:39 2020 +0100 PM: sleep: Add dev_wakeup_path() helper Add dev_wakeup_path() helper to avoid to spread dev->power.wakeup_path test in drivers. Signed-off-by: Patrice Chotard Reviewed-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki commit b4ba76fb1c999384c1b0840d216d42abcd611024 Author: Lukasz Luba Date: Tue Nov 17 13:47:59 2020 +0000 powercap: Adjust printing the constraint name with new line The constrain name has limit of size 30, which sometimes might be hit. When this happens the new line might get lost. Prevent this and set the max limit for name string length equal 29. This would result is proper string clamping (when needed) and storing '\n' at index 29 and '\0' at 30, so similarly as desired originally. Signed-off-by: Lukasz Luba Signed-off-by: Rafael J. Wysocki commit ce10f6ca9654410a66c81a3a68e680feca6b59d2 Merge: ab97800e088ac ec88381936954 Author: Mark Brown Date: Mon Nov 23 17:27:46 2020 +0000 Merge tag 'scmi-voltage-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into regulator-5.11 SCMI voltage domain management protocol support for v5.11 SCMI v3.0 voltage domain protocol support to discover the voltage levels supported by the domains and to set/get the configuration and voltage level of any given domain. commit ab150c3f80dcce670926ab3ca412be5047011d22 Author: Alex Shi Date: Fri Nov 13 16:58:10 2020 +0800 PM / suspend: fix kernel-doc markup Add parameter explanation to fix kernel-doc marks: kernel/power/suspend.c:233: warning: Function parameter or member 'state' not described in 'suspend_valid_only_mem' kernel/power/suspend.c:344: warning: Function parameter or member 'state' not described in 'suspend_prepare' Signed-off-by: Alex Shi [ rjw: Change the proposed parameter descriptions. ] Signed-off-by: Rafael J. Wysocki commit d23e95c09067618eabd6d0e8cff372f0ce517c84 Author: Todd Brandt Date: Tue Nov 10 18:36:17 2020 -0800 pm-graph v5.8 - if wakeups occur in s2idle: "freeze time: N (-x ms waking y times) ms" - change FREEZELOOP and FREEZEWAKE to S2LOOP and S2WAKE for brevity - returns all sysfs vals to their initial state after testing - use the dmesg log for debugging until the test is completed, instrument the executeSuspend process to have a full trace, if test completes, formal dmesg log overwrites the debug log - fix CPU_ON and CPU_OFF devices in the timeline, should include [n] Signed-off-by: Todd Brandt Signed-off-by: Rafael J. Wysocki commit f65b243d6ab856d768aa8039da8a2a47603b8847 Author: Ioana Ciornei Date: Thu Nov 19 18:50:17 2020 +0200 staging: dpaa2-switch: pack the firmware command structures The structures defined in the dpsw-cmd.h header file describe exactly the layout of commands accepted by the MC firmware. Make sure that all these structures are packed. Signed-off-by: Ioana Ciornei Link: https://lore.kernel.org/r/20201119165017.806696-4-ciorneiioana@gmail.com Signed-off-by: Greg Kroah-Hartman commit dab4812705c91f35e54ca8e605ca2891a364d65c Author: Ioana Ciornei Date: Thu Nov 19 18:50:16 2020 +0200 staging: dpaa2-switch: make sure that the VLAN is not already configured When in the PREPARE state of a switchdev transaction, check if the requested VLAN is not already configured on the switch port. This keeps us from getting into a WARNING as below. [ 1389.683296] dpaa2_ethsw dpsw.0 eth0: VLAN 2 already configured [ 1389.689125] ------------[ cut here ]------------ [ 1389.694084] eth0: Commit of object (id=1) failed. [ 1389.698863] WARNING: CPU: 0 PID: 613 at net/switchdev/switchdev.c:277 switchdev_port_obj_add_now+0xcc/0x110 [ 1389.708589] Modules linked in: [ 1389.711634] CPU: 0 PID: 613 Comm: bridge Not tainted 5.9.0-rc2-next-20200828-00112-g7172078477c5 #59 [ 1389.720753] Hardware name: NXP Layerscape LX2160ARDB (DT) [ 1389.726139] pstate: 40000005 (nZcv daif -PAN -UAO BTYPE=--) [ 1389.731698] pc : switchdev_port_obj_add_now+0xcc/0x110 [ 1389.736824] lr : switchdev_port_obj_add_now+0xcc/0x110 Signed-off-by: Ioana Ciornei Link: https://lore.kernel.org/r/20201119165017.806696-3-ciorneiioana@gmail.com Signed-off-by: Greg Kroah-Hartman commit 54289aad812e83a6e416b49c121a1a805d94cd6a Author: Ionut-robert Aron Date: Thu Nov 19 18:50:15 2020 +0200 staging: dpaa2-switch: export the 'no buffer' counter in ethtool Export the DPSW_CNT_ING_NO_BUFFER_DISCARD counter in ethtool for each switch interface. This is useful for debugging purposes. Signed-off-by: Ionut-robert Aron Signed-off-by: Ioana Ciornei Link: https://lore.kernel.org/r/20201119165017.806696-2-ciorneiioana@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8a3f7b9665c8194f32afec9a7bb60e2376f896c6 Author: Kaixu Xia Date: Sat Nov 21 20:17:21 2020 +0800 staging: rtl8723bs: remove redundant statements The bool variable is2T is true, so the if statement is redundant. we can directly set the variable bound to 8 and remove the if statement. Reported-by: Tosk Robot Signed-off-by: Kaixu Xia Link: https://lore.kernel.org/r/1605961041-12875-1-git-send-email-kaixuxia@tencent.com Signed-off-by: Greg Kroah-Hartman commit 9822b90444000b81d450e42a04a044f077c1d0c9 Author: Kaixu Xia Date: Sun Nov 15 20:13:20 2020 +0800 staging: rtl8188eu: clean up the useless code The two bool variables singletone and carrier_sup are always false and the following if statement can't be true, these code are useless, so remove them. Reported-by: Tosk Robot Signed-off-by: Kaixu Xia Link: https://lore.kernel.org/r/1605442400-16108-1-git-send-email-kaixuxia@tencent.com Signed-off-by: Greg Kroah-Hartman commit 6b8fb5ecf7f357d6a70a87f87d94c967c174cb97 Author: Ding Xiang Date: Tue Nov 17 10:59:33 2020 +0800 staging: fieldbus: use kobj_to_dev() to get device Use kobj_to_dev() instead of container_of() Signed-off-by: Ding Xiang Link: https://lore.kernel.org/r/20201117025933.668938-1-dingxiang@cmss.chinamobile.com Signed-off-by: Greg Kroah-Hartman commit ba3e4a2a0b3c639d3835f2f1dce27d79576ae453 Author: Wang Hai Date: Wed Nov 18 18:37:24 2020 +0800 staging: mfd: hi6421-spmi-pmic: fix error return code in hi6421_spmi_pmic_probe() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 4524ac56cdca ("staging: mfd: add a PMIC driver for HiSilicon 6421 SPMI version") Reported-by: Hulk Robot Signed-off-by: Wang Hai Link: https://lore.kernel.org/r/20201118103724.57451-1-wanghai38@huawei.com Signed-off-by: Greg Kroah-Hartman commit 1f59b0663d2db724d4fe8b8704cada916f795518 Author: David Gow Date: Thu Nov 19 00:29:03 2020 -0800 staging: hikey9xx: Specify HAS_IOMEM dependency for MFD_HI6421_SPMI MFD_CORE is selected by MFD_HI6421_SPMI, and MFD_CORE depends on HAS_IOMEM. If HAS_IOMEM is not set, this can cause a conflict in Kconfig resolution, yielding the following error: WARNING: unmet direct dependencies detected for MFD_CORE Depends on [n]: HAS_IOMEM [=n] Selected by [y]: - MFD_HI6421_SPMI [=y] && STAGING [=y] && OF [=y] && SPMI [=y] By specifying HAS_IOMEM as a dependency for MFD_HI6421_SPMI (as SPMI_HISI3670 already dows), this issue is resolved, and no such warning appears when building on architectures without HAS_IOMEM. Signed-off-by: David Gow Link: https://lore.kernel.org/r/20201119082903.3601758-1-davidgow@google.com Signed-off-by: Greg Kroah-Hartman commit 1b9419d1f676b7e5597e5c4593f3d8bbb28372ff Author: Juan Antonio Aldea-Armenteros Date: Thu Nov 19 13:27:38 2020 +0100 staging: trivial: hikey9xx: fix be32<->u32 casting warnings This patch fixes the following warnings reported by sparse, by adding missing __force annotations. drivers/staging/hikey9xx/hisi-spmi-controller.c:164:24: warning: cast to restricted __be32 drivers/staging/hikey9xx/hisi-spmi-controller.c:164:24: warning: cast to restricted __be32 drivers/staging/hikey9xx/hisi-spmi-controller.c:164:24: warning: cast to restricted __be32 drivers/staging/hikey9xx/hisi-spmi-controller.c:164:24: warning: cast to restricted __be32 drivers/staging/hikey9xx/hisi-spmi-controller.c:164:24: warning: cast to restricted __be32 drivers/staging/hikey9xx/hisi-spmi-controller.c:164:24: warning: cast to restricted __be32 drivers/staging/hikey9xx/hisi-spmi-controller.c:239:25: warning: cast from restricted __be32 Rationale for #164: data is declared as u32, and it is read and then converted by means of be32_to_cpu(). Said function expects a __be32 but data is u32, therefore there's a type missmatch here. Rationale for #239: Is the dual of #164. This time data going to be written so it needs to be converted from cpu to __be32, but writel() expects u32 and the output of cpu_to_be32 returns a __be32. Signed-off-by: Juan Antonio Aldea-Armenteros Link: https://lore.kernel.org/r/20201119122737.189675-1-juant.aldea@gmail.com Signed-off-by: Greg Kroah-Hartman commit 390029c27ea74099a7f56f7ae502d11953fa1187 Author: Flavio Suligoi Date: Fri Nov 20 12:11:25 2020 +0100 Documentation: ACPI: enumeration: add PCI hierarchy representation For "fixed" PCI devices, such as chips directly soldered on the main board (ethernet, Wi-Fi, serial ports, etc.), it is possible to find an ACPI enumeration. This allows to add useful properties to these devices. Just for an example: the property "gpio-line-names" can be added to the pins of a GPIO expander on the PCI bus. In order to find the ACPI name of a PCI device, it's necessary to disassemble the BIOS ACPI tables (in particular the DSDT) and also to analyze the PCI bus topology of the board. This patch, with a practical example, show how to do this. Signed-off-by: Flavio Suligoi Reviewed-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit 41d02747c4d12fdbf63f9148befc33b0b9f7c634 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:39:57 2020 -0600 staging: vt6656: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/5a5a8f2489fbf61f65f0241c349737f7c9ad59ca.1605896060.git.gustavoars@kernel.org Signed-off-by: Greg Kroah-Hartman commit 8002998e1f3efc7d284ccdd101e65587076bcfeb Author: Gustavo A. R. Silva Date: Fri Nov 20 12:39:51 2020 -0600 staging: qlge: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/673bd9f27bcc2df8c9d12be94f54001d8066d4ab.1605896060.git.gustavoars@kernel.org Signed-off-by: Greg Kroah-Hartman commit 6a8ce97113b3b26dcf3ecc6752ee556f145cb49e Author: Gustavo A. R. Silva Date: Fri Nov 20 12:27:44 2020 -0600 staging: vt6655: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of just letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/863fda60074850bc976974af48fa769c64725e64.1605896059.git.gustavoars@kernel.org Signed-off-by: Greg Kroah-Hartman commit 2811861be7e3f312511243c53c562a936c7c8051 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:27:37 2020 -0600 staging: rtl8723bs: core: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of just letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/cd07e3ebc11b44a3fe016341438e24cf950994a3.1605896059.git.gustavoars@kernel.org Signed-off-by: Greg Kroah-Hartman commit 93c747ed00c1c74316645f7761f0cdb3f3d3952d Author: Gustavo A. R. Silva Date: Fri Nov 20 12:40:27 2020 -0600 usb: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break/return/fallthrough statements instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/a76da7ca5b4f41c13d27b298accb8222d0b04e61.1605896060.git.gustavoars@kernel.org Signed-off-by: Greg Kroah-Hartman commit f83eb664cdb45169338b9633f22eaafc23764f05 Merge: e945927dc7c2d ec88381936954 Author: Sudeep Holla Date: Mon Nov 23 16:37:27 2020 +0000 Merge tag 'scmi-voltage-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into for-next/scmi SCMI voltage domain management protocol support for v5.11 SCMI v3.0 voltage domain protocol support to discover the voltage levels supported by the domains and to set/get the configuration and voltage level of any given domain. * tag 'scmi-voltage-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_scmi: Add support to enumerated SCMI voltage domain device firmware: arm_scmi: Add voltage domain management protocol support dt-bindings: arm: Add support for SCMI Regulators commit e945927dc7c2d844b1955b2ec7ace07d2f6a6dcb Author: Cristian Marussi Date: Mon Nov 23 16:20:08 2020 +0000 firmware: arm_scmi: Remove residual _le structs naming For sake of consistency, remove any residual naming based on _le suffixes in SCMI sensors protocol, since little endianness is already assumed across all of SCMI implementation and, as such, all currently existent names do not explicitly state their endianness. No functional change. Link: https://lore.kernel.org/r/20201123162008.35814-1-cristian.marussi@arm.com Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 6ac05e832a9e96f9b1c42a8917cdd317d7b6c8fa Author: Peter Collingbourne Date: Fri Nov 20 12:33:45 2020 -0800 signal: define the SA_EXPOSE_TAGBITS bit in sa_flags Architectures that support address tagging, such as arm64, may want to expose fault address tag bits to the signal handler to help diagnose memory errors. However, these bits have not been previously set, and their presence may confuse unaware user applications. Therefore, introduce a SA_EXPOSE_TAGBITS flag bit in sa_flags that a signal handler may use to explicitly request that the bits are set. The generic signal handler APIs expect to receive tagged addresses. Architectures may specify how to untag addresses in the case where SA_EXPOSE_TAGBITS is clear by defining the arch_untagged_si_addr function. Signed-off-by: Peter Collingbourne Acked-by: "Eric W. Biederman" Link: https://linux-review.googlesource.com/id/I16dd0ed2081f091fce97be0190cb8caa874c26cb Link: https://lkml.kernel.org/r/13cf24d00ebdd8e1f55caf1821c7c29d54100191.1605904350.git.pcc@google.com Signed-off-by: Eric W. Biederman commit a54f0dfda754c5cecc89a14dab68a3edc1e497b5 Author: Peter Collingbourne Date: Mon Nov 16 19:17:25 2020 -0800 signal: define the SA_UNSUPPORTED bit in sa_flags Define a sa_flags bit, SA_UNSUPPORTED, which will never be supported in the uapi. The purpose of this flag bit is to allow userspace to distinguish an old kernel that does not clear unknown sa_flags bits from a kernel that supports every flag bit. In other words, if userspace does something like: act.sa_flags |= SA_UNSUPPORTED; sigaction(SIGSEGV, &act, 0); sigaction(SIGSEGV, 0, &oldact); and finds that SA_UNSUPPORTED remains set in oldact.sa_flags, it means that the kernel cannot be trusted to have cleared unknown flag bits from sa_flags, so no assumptions about flag bit support can be made. Signed-off-by: Peter Collingbourne Reviewed-by: Dave Martin Link: https://linux-review.googlesource.com/id/Ic2501ad150a3a79c1cf27fb8c99be342e9dffbcb Link: https://lkml.kernel.org/r/bda7ddff8895a9bc4ffc5f3cf3d4d37a32118077.1605582887.git.pcc@google.com Signed-off-by: Eric W. Biederman commit 7da5082a2f9a1d16eded00c204fdb52a855c2bb2 Author: Peter Collingbourne Date: Mon Nov 16 19:17:24 2020 -0800 arch: provide better documentation for the arch-specific SA_* flags Instead of documenting the arch-specific flag values in a comment at the top where they may be easily overlooked, document them in comments inline with the definitions in numerical order so that it is clear why specific values must be chosen for new generic flags and to reduce the likelihood of conflicts between generic and arch-specific flags. Signed-off-by: Peter Collingbourne Link: https://linux-review.googlesource.com/id/I40a129cf7c3a71ba1bfd6d936c544072ee3b7ce6 Link: https://lkml.kernel.org/r/198c8b68c76bf3ed73117d817c7cdf9bc0eb174f.1605582887.git.pcc@google.com Signed-off-by: Eric W. Biederman commit 23acdc76f1798b090bb9dcc90671cd29d929834e Author: Peter Collingbourne Date: Thu Nov 12 18:53:34 2020 -0800 signal: clear non-uapi flag bits when passing/returning sa_flags Previously we were not clearing non-uapi flag bits in sigaction.sa_flags when storing the userspace-provided sa_flags or when returning them via oldact. Start doing so. This allows userspace to detect missing support for flag bits and allows the kernel to use non-uapi bits internally, as we are already doing in arch/x86 for two flag bits. Now that this change is in place, we no longer need the code in arch/x86 that was hiding these bits from userspace, so remove it. This is technically a userspace-visible behavior change for sigaction, as the unknown bits returned via oldact.sa_flags are no longer set. However, we are free to define the behavior for unknown bits exactly because their behavior is currently undefined, so for now we can define the meaning of each of them to be "clear the bit in oldact.sa_flags unless the bit becomes known in the future". Furthermore, this behavior is consistent with OpenBSD [1], illumos [2] and XNU [3] (FreeBSD [4] and NetBSD [5] fail the syscall if unknown bits are set). So there is some precedent for this behavior in other kernels, and in particular in XNU, which is probably the most popular kernel among those that I looked at, which means that this change is less likely to be a compatibility issue. Link: [1] https://github.com/openbsd/src/blob/f634a6a4b5bf832e9c1de77f7894ae2625e74484/sys/kern/kern_sig.c#L278 Link: [2] https://github.com/illumos/illumos-gate/blob/76f19f5fdc974fe5be5c82a556e43a4df93f1de1/usr/src/uts/common/syscall/sigaction.c#L86 Link: [3] https://github.com/apple/darwin-xnu/blob/a449c6a3b8014d9406c2ddbdc81795da24aa7443/bsd/kern/kern_sig.c#L480 Link: [4] https://github.com/freebsd/freebsd/blob/eded70c37057857c6e23fae51f86b8f8f43cd2d0/sys/kern/kern_sig.c#L699 Link: [5] https://github.com/NetBSD/src/blob/3365779becdcedfca206091a645a0e8e22b2946e/sys/kern/sys_sig.c#L473 Signed-off-by: Peter Collingbourne Reviewed-by: Dave Martin Acked-by: "Eric W. Biederman" Link: https://linux-review.googlesource.com/id/I35aab6f5be932505d90f3b3450c083b4db1eca86 Link: https://lkml.kernel.org/r/878dbcb5f47bc9b11881c81f745c0bef5c23f97f.1605235762.git.pcc@google.com Signed-off-by: Eric W. Biederman commit 1d82b7898f2ad9cc414805aef23b99b742218f10 Author: Peter Collingbourne Date: Thu Nov 12 18:53:33 2020 -0800 arch: move SA_* definitions to generic headers Most architectures with the exception of alpha, mips, parisc and sparc use the same values for these flags. Move their definitions into asm-generic/signal-defs.h and allow the architectures with non-standard values to override them. Also, document the non-standard flag values in order to make it easier to add new generic flags in the future. A consequence of this change is that on powerpc and x86, the constants' values aside from SA_RESETHAND change signedness from unsigned to signed. This is not expected to impact realistic use of these constants. In particular the typical use of the constants where they are or'ed together and assigned to sa_flags (or another int variable) would not be affected. Signed-off-by: Peter Collingbourne Acked-by: Geert Uytterhoeven Acked-by: "Eric W. Biederman" Reviewed-by: Dave Martin Link: https://linux-review.googlesource.com/id/Ia3849f18b8009bf41faca374e701cdca36974528 Link: https://lkml.kernel.org/r/b6d0d1ec34f9ee93e1105f14f288fba5f89d1f24.1605235762.git.pcc@google.com Signed-off-by: Eric W. Biederman commit 161d36dfc7b56c357e5f291679c8e159527797a6 Author: Peter Collingbourne Date: Thu Nov 12 18:53:32 2020 -0800 parisc: start using signal-defs.h We currently include signal-defs.h on all architectures except parisc. Make parisc fall in line. This will make maintenance easier once the flag bits are moved here. Signed-off-by: Peter Collingbourne Acked-by: Helge Deller Acked-by: "Eric W. Biederman" Link: https://linux-review.googlesource.com/id/If03a5135fb514fe96548fb74610e6c3586a04064 Link: https://lkml.kernel.org/r/be8f3680ef2d0a1a120994e3ae0b11d82f373279.1605235762.git.pcc@google.com Signed-off-by: Eric W. Biederman commit 8663daeac7a1fd1b200e3365ccc9403f026f2fc8 Author: Helge Deller Date: Thu Nov 12 18:53:31 2020 -0800 parisc: Drop parisc special case for __sighandler_t I believe we can and *should* drop this parisc-specific typedef for __sighandler_t when compiling a 64-bit kernel. The reasons: 1. We don't have a 64-bit userspace yet, so nothing (on userspace side) can break. 2. Inside the Linux kernel, this is only used in kernel/signal.c, in function kernel_sigaction() where the signal handler is compared against SIG_IGN. SIG_IGN is defined as (__sighandler_t)1), so only the pointers are compared. 3. Even when a 64-bit userspace gets added at some point, I think __sighandler_t should be defined what it is: a function pointer struct. I compiled kernel/signal.c with and without the patch, and the produced code is identical in both cases. Signed-off-by: Helge Deller Signed-off-by: Peter Collingbourne Acked-by: "Eric W. Biederman" Reviewed-by: Peter Collingbourne Link: https://linux-review.googlesource.com/id/I21c43f21b264f339e3aa395626af838646f62d97 Link: https://lkml.kernel.org/r/a75b8eb7bb9eac1cf73fb119eb53e5892d6e9656.1605235762.git.pcc@google.com Signed-off-by: Eric W. Biederman commit d4f97711b3b36e1cb1d3d4b1eea72c1185449adb Merge: ec565b0e1a9e9 16fee29b07358 Author: Arnd Bergmann Date: Mon Nov 23 17:20:46 2020 +0100 Merge tag 'sunxi-rework-mbus' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mripard/linux into arm/drivers Allwinner MBUS and DMA-ops rework The Allwinner SoCs have a number of high-bandwidth devices connected to a memory bus with a different RAM mapping than the CPU. This was addressed before through drivers setting the DMA offsets directly, and subsequently changed to calls to dma_direct_set_offset. However that wasn't really meant to be exported to modules (and thus drivers). The duplicated code also led to small inconsistencies across drivers in how we dealt with DT backward compatibility. Move all that DMA setup code into a platform bus notifier to share that code and remove the export on dma_direct_set_offset. * tag 'sunxi-rework-mbus' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mripard/linux: dma-mapping: remove the dma_direct_set_offset export media: sun8i-di: Remove the call to of_dma_configure media: cedrus: Remove the MBUS quirks media: sun6i: Remove the MBUS quirks media: sun4i: Remove the MBUS quirks drm/sun4i: backend: Remove the MBUS quirks soc: sunxi: Deal with the MBUS DMA offsets in a central place drm/sun4i: backend: Fix probe failure with multiple backends Signed-off-by: Arnd Bergmann commit ec565b0e1a9e9670052c29259b80bfb3c405427e Merge: 6bc9d7391ad66 cf25d802e029c Author: Arnd Bergmann Date: Mon Nov 23 17:18:16 2020 +0100 Merge tag 'renesas-drivers-for-v5.11-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/drivers Renesas driver updates for v5.11 - Fix a mapping leak in the failure path of the R-Mobile System Controller driver. * tag 'renesas-drivers-for-v5.11-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: soc: renesas: rmobile-sysc: Fix some leaks in rmobile_init_pm_domains() Link: https://lore.kernel.org/r/20201113150854.3923885-4-geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 8195fceca0316c36c87db25750a5c5db84ded4e7 Author: Grygorii Strashko Date: Fri Oct 30 14:46:50 2020 +0200 ARM: multi_v7_defconfig: ti: Enable networking options for nfs boot Enable networking options required for NFS boot on TI platforms, which is widely for automated test systems. - enable new TI CPSW switch driver and related NET_SWITCHDEV config - enable TI DP83867 phy - explicitly enable PTP clock support to ensure dependent networking drivers will stay built-in. vmlinux size changes: - before: text data bss dec hex filename 14703736 8024602 444976 23173314 16198c2 ./omap-arm/vmlinux - after: text data bss dec hex filename 14727271 8029150 444528 23200949 16204b5 ./omap-arm/vmlinux diff: 27635 (dec) Signed-off-by: Grygorii Strashko Reviewed-by: Nishanth Menon Cc: Tony Lindgren Link: https://lore.kernel.org/r/20201030124650.20349-1-grygorii.strashko@ti.com' Signed-off-by: Arnd Bergmann commit a65183ff1535ed15c28c526f6b69ed03c21d34b4 Author: Linus Walleij Date: Thu Nov 5 14:45:10 2020 +0100 ARM: config: ux500: Update U8500 defconfig This updates the defconfig for the U8500 platform with some of the changes from the v5.9 and v5.10 kernel cycles: - No need to select the schedutil cpufreq governor because it is the default now. - Enable the CY8CTMA140 touchscreen as used on the Samsung Skomer GT-S7710. - Enable the Samsung S6E63M0 DSI panel as used on the Samsung Golden GT-I8810. - Enable the KTD253 backlight as used on the Samsung Skomer GT-S7710. - Drop CONFIG_USB as we only use the gadget mode of the MUSB driver. - Add selection of the CONFIG_LEDS_LP55XX_COMMON lest the LP5521 LEDs will not work. - Move the config entry for CONFIG_DEBUG_FS. Signed-off-by: Linus Walleij Cc: Stephan Gerhold Link: https://lore.kernel.org/r/20201105134510.1417639-1-linus.walleij@linaro.org' Signed-off-by: Arnd Bergmann commit c7cf673399144361e696be5bdf5848a7e6f1053a Merge: b2d91953b66c7 ef5704b535194 Author: Arnd Bergmann Date: Mon Nov 23 17:15:25 2020 +0100 Merge tag 'ux500-dts-for-v5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson into arm/dt Ux500 DTS updates for the v5.11 kernels: - Rename the DSI controllers to match the preferred schema. - Pull down the SDI2 feedback clock on the Skomer. - Add proper supplies to the MaxToch touchscreen on the Golden. * tag 'ux500-dts-for-v5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson: ARM: dts: ux500-golden: Add proper supplies to touchscreen ARM: dts: ux500: skomer: Pull down SDI2 FBCLK ARM: dts: ux500: Rename DSI controller nodes Link: https://lore.kernel.org/r/CACRpkdY_M4xj++QhRPqX6N3x9YmFNJkz70DnvBj7Ai-dOtCJSQ@mail.gmail.com Signed-off-by: Arnd Bergmann commit 36f4fa6886a81266d7c82b1c90a65205e73a7c85 Author: Jens Axboe Date: Sat Sep 5 11:14:22 2020 -0600 io_uring: add support for shutdown(2) This adds support for the shutdown(2) system call, which is useful for dealing with sockets. shutdown(2) may block, so we have to punt it to async context. Suggested-by: Norman Maurer Signed-off-by: Jens Axboe commit b713c195d59332277a31a59c91f755e53b5b302b Author: Jens Axboe Date: Sat Sep 5 11:13:35 2020 -0600 net: provide __sys_shutdown_sock() that takes a socket No functional changes in this patch, needed to provide io_uring support for shutdown(2). Cc: netdev@vger.kernel.org Cc: David S. Miller Acked-by: Jakub Kicinski Signed-off-by: Jens Axboe commit ce59fc69b1c2da555706f6b0e77fc099f80e9d0e Author: Jens Axboe Date: Wed Sep 2 13:28:09 2020 -0600 io_uring: allow SQPOLL with CAP_SYS_NICE privileges CAP_SYS_ADMIN is too restrictive for a lot of uses cases, allow CAP_SYS_NICE based on the premise that such users are already allowed to raise the priority of tasks. Signed-off-by: Jens Axboe commit b2d91953b66c724eaf8d7f84f37c006d966f67ac Author: Tomer Maimon Date: Thu Nov 19 10:00:02 2020 +0200 ARM: dts: add Nuvoton NPCM730 device tree Add Nuvoton NPCM730 SoC device tree. The Nuvoton NPCN730 SoC is a part of the Nuvoton NPCM7xx SoCs family. Signed-off-by: Tomer Maimon Reviewed-by: Benjamin Fair Link: https://lore.kernel.org/r/20201119080002.100342-1-tmaimon77@gmail.com' Signed-off-by: Arnd Bergmann commit 1e548b67828087a29c6b8294629c1620826fba15 Merge: 019d70bffd35b 73f882a0f3a83 Author: Arnd Bergmann Date: Mon Nov 23 16:52:04 2020 +0100 Merge tag 'samsung-dt-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Samsung DTS ARM changes for v5.11 1. Many cleanups of DTS and alignments to dtschema. Most of them do not have any functional effect except passing dtschema checks or dtc W=2 builds. 2. Fix USB 3.0 ports on Odroid XU board: wrong roles assigned to two ports, missing supply to the USB over-current and VBUS control pins and finally missing pin configuration for these pins. 3. Switch Exynos5422 DMC driver to monitoring/polling mode, instead of using interrupts. 4. Correct the usage of "opp-shared" properties which lead to disabling the bus frequency and voltage scaling. 5. Enable Bluetooth on few Exynos4210 and Exynos4412 boards. 6. Enable dual-role USB on Odroid U3+ board. 7. Add Ethernet description in multiple Odroid DTS allowing also easy MAC address filling by bootloader. 8. Add Ethernet to Artik 5 (Exynos3250) board. 9. Add interconnect properties to Exynos4412 to fix old Mixer issues. * tag 'samsung-dt-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: (36 commits) ARM: dts: exynos: use hyphens in MFC reserved memory node names ARM: dts: exynos: use hyphens in Exynos5 node names ARM: dts: exynos: use generic name for max77693 motor in Midas ARM: dts: exynos: use hyphens in Exynos4 node names ARM: dts: exynos: use hyphens in Exynos3250 node names ARM: dts: exynos: Add interconnects to Exynos4412 mixer ARM: dts: exynos: Add interconnect properties to Exynos4412 bus nodes ARM: dts: exynos: Add Ethernet to Artik 5 board ARM: dts: exynos: Add a placeholder for a MAC address ARM: dts: exynos: Add Ethernet interface description for Odroid X/X2 ARM: dts: exynos: Add Ethernet interface description for Odroid U3 ARM: dts: exynos: Add Ethernet interface description for Odroid XU ARM: dts: exynos: Add Ethernet interface description for Odroid XU3 Lite ARM: dts: exynos: Enable DWC2 dual-role support on OdroidU3+ boards ARM: dts: s5pv210: adjust node names to DT spec ARM: dts: exynos: adjust node names to DT spec in Exynos542x boards ARM: dts: exynos: adjust node names to DT spec in Odroid XU ARM: dts: exynos: adjust node names to DT spec in Exynos5250 boards ARM: dts: exynos: remove redundant status=okay in Exynos4412 boards ARM: dts: exynos: adjust node names to DT spec in Exynos4412 boards ... Link: https://lore.kernel.org/r/20201113162211.10020-2-krzk@kernel.org Signed-off-by: Arnd Bergmann commit 019d70bffd35bc721482ef8312d9dbb7c9702436 Merge: 95f595d1f0059 5649789d9706e Author: Arnd Bergmann Date: Mon Nov 23 16:50:35 2020 +0100 Merge tag 'renesas-dt-bindings-for-v5.11-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/dt Renesas DT binding updates for v5.11 - Document suport for the R-Car M3-W+ ULCB/Kingfisher board combo. * tag 'renesas-dt-bindings-for-v5.11-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: dt-bindings: arm: renesas: Add R-Car M3-W+ ULCB with Kingfisher Link: https://lore.kernel.org/r/20201113150854.3923885-5-geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 95f595d1f005918891555818719c91e2fad9fa95 Merge: f8394f232b1ea 43bba65761952 Author: Arnd Bergmann Date: Mon Nov 23 16:48:48 2020 +0100 Merge tag 'renesas-arm-dt-for-v5.11-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/dt Renesas ARM DT updates for v5.11 - Touch screen and OV5640 camera support for the iWave RainboW Qseven board (G21D), and its camera expansion board, - Support for the AISTARVISION MIPI Adapter V2.1 board connected to HiHope RZ/G2 boards, - SPI (MSIOF) support for the R-Car M3-W+ SoC, - Digital Radio Interface (DRIF) support for the R-Car M3-N SoC, - Initial support for the R-Car M3-W+ ULCB/Kingfisher board combo, - Minor fixes and improvements. * tag 'renesas-arm-dt-for-v5.11-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: arm64: dts: renesas: hihope-rev4: Add a comment explaining switch SW2404 arm64: dts: renesas: r8a77961: ulcb-kf: Initial device tree arm64: dts: renesas: r8a77961: Add CAN{0,1} placeholder nodes arm64: dts: renesas: beacon-renesom-baseboard: Move connector node out of hd3ss3220 device arm64: dts: renesas: cat874: Move connector node out of hd3ss3220 device arm64: dts: renesas: rzg2: Convert EtherAVB to explicit delay handling arm64: dts: renesas: rcar-gen3: Convert EtherAVB to explicit delay handling arm64: dts: renesas: r8a77965: Add DRIF support arm64: dts: renesas: Add support for MIPI Adapter V2.1 connected to HiHope RZ/G2N arm64: dts: renesas: Add support for MIPI Adapter V2.1 connected to HiHope RZ/G2M arm64: dts: renesas: Add support for MIPI Adapter V2.1 connected to HiHope RZ/G2H arm64: dts: renesas: aistarvision-mipi-adapter-2.1: Add parent macro for each sensor arm64: dts: renesas: cat875: Remove rxc-skew-ps from ethernet-phy node arm64: dts: renesas: hihope-rzg2-ex: Drop rxc-skew-ps from ethernet-phy node ARM: dts: r8a7742-iwg21d-q7-dbcm-ca: Enable VIN instances arm64: dts: renesas: r8a77961: Add MSIOF nodes arm64: dts: renesas: Align GPIO hog names with dtschema ARM: dts: r8a7742-iwg21d-q7: Add LCD support Link: https://lore.kernel.org/r/20201113150854.3923885-3-geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 4b44b61a683e7b1100559b238867e544899a97e7 Merge: f8394f232b1ea bc518da26e3a9 Author: Arnd Bergmann Date: Mon Nov 23 16:44:29 2020 +0100 Merge tag 'renesas-arm-defconfig-for-v5.11-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/defconfig Renesas ARM defconfig updates for v5.11 - Enable support for the new R-Car V3U SoC in the arm64 defconfig, - Refresh shmobile_defconfig for v5.10-rc1. * tag 'renesas-arm-defconfig-for-v5.11-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: arm64: defconfig: Enable R8A779A0 SoC ARM: shmobile: defconfig: Refresh for v5.10-rc1 Link: https://lore.kernel.org/r/20201113150854.3923885-2-geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit ef5704b535194fb98ee1ceb00f6952e2f01e39a6 Author: Linus Walleij Date: Fri Nov 20 13:42:12 2020 +0100 ARM: dts: ux500-golden: Add proper supplies to touchscreen This sets up the Atmel maXTouch touchscreen to use proper VDDA and VDD supplies as now supported by bindings and driver. Cc: Stephan Gerhold Cc: Nick Reitemeyer Cc: Nick Dyer Link: https://lore.kernel.org/r/20201120124212.1086063-1-linus.walleij@linaro.org Signed-off-by: Linus Walleij commit 29b105d947c661e521bf7b1005868c02441732be Author: Dylan Robinson Date: Mon Nov 23 09:53:47 2020 +0100 ALSA: usb-audio: Fix MOTU M-Series quirks Now that the usb audio driver correctly finds implicit feedback endpoints, the implicit feedback quirk for the MOTU M-Series is no longer required. This also removes some unnecessary vendor specific messages from the MOTU M-Series boot quirk. The removed vendor specific messages turned on vendor specific interrupts to the host every 32 samples. The only thing the boot quirk needs to do is wait for 2 seconds. Tested-by: Dylan Robinson Signed-off-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-42-tiwai@suse.de Signed-off-by: Takashi Iwai commit ad0e6a3511824f8fdbe3eb63dbabc0ef35e732b9 Author: Takashi Iwai Date: Mon Nov 23 09:53:46 2020 +0100 ALSA: usb-audio: Fix quirks for other BOSS devices A few other BOSS devices (BR-80, GT-100v2, Katana) seem requiring the same quirk as BOSS GT-001, i.e. no implicit feedback for playback but tying with capture. Add and correct the corresponding quirk table entries for them. Reported-and-tested-by: Keith Milner Link: https://lore.kernel.org/r/20201123085347.19667-41-tiwai@suse.de Signed-off-by: Takashi Iwai commit 62abd092f97b33a33fcdb98c30bc01f2b1c55d04 Author: Takashi Iwai Date: Mon Nov 23 09:53:45 2020 +0100 ALSA: usb-audio: Add implicit_fb module option A new module option, implicit_fb, is added to specify the driver looking for the implicit feedback sync. This can be useful for a device that could be working better in the implicit feed back mode and user wants to test it quickly. When this works, we can add the quirk entry easily. Tested-by: Keith Milner Tested-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-40-tiwai@suse.de Signed-off-by: Takashi Iwai commit 83b7dcbc51c930fc2079ab6c6fc9d719768321f1 Author: Takashi Iwai Date: Mon Nov 23 09:53:44 2020 +0100 ALSA: usb-audio: Add generic implicit fb parsing This patch extends the implicit feedback mode parser code to check the description more generically, so that the quirk entries can be added without the explicit EP and interface numbers. The search is done for the next and the previous interface of the given altset, and if both entries are ASYNC mode and the direction matches, it just takes as the sync endpoint. The generic parser is applicable only for the playback stream. As of now, only a few M-Audio devices have been converted to use this mode. Tested-by: Keith Milner Tested-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-39-tiwai@suse.de Signed-off-by: Takashi Iwai commit 9fddc15e803945a744f357a4d1c94301e1ed6681 Author: Takashi Iwai Date: Mon Nov 23 09:53:43 2020 +0100 ALSA: usb-audio: Factor out the implicit feedback quirk code The code dealing with the implicit feedback mode grew recently, and it's becoming messy. As we receive more and more devices that need the similar handling, it's better to be processed through a table instead of the open code. This patch moves the code that is relevant with parsing the implicit feedback mode and some helpers into another file, implicit.c. The detection and the setup of the implicit feedback sync EPs are rewritten to use the ID/class matching table instead. There should be no functional changes. Tested-by: Keith Milner Tested-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-38-tiwai@suse.de Signed-off-by: Takashi Iwai commit 2f7e8c553e98d6fcddeaf18aa90ea908e3f1418e Author: Jean-Philippe Brucker Date: Fri Nov 6 16:50:50 2020 +0100 iommu/arm-smmu-v3: Hook up ATC invalidation to mm ops The invalidate_range() notifier is called for any change to the address space. Perform the required ATC invalidations. Signed-off-by: Jean-Philippe Brucker Link: https://lore.kernel.org/r/20201106155048.997886-5-jean-philippe@linaro.org Signed-off-by: Will Deacon commit 32784a9562fb0518b12e9797ee2aec52214adf6f Author: Jean-Philippe Brucker Date: Fri Nov 6 16:50:49 2020 +0100 iommu/arm-smmu-v3: Implement iommu_sva_bind/unbind() The sva_bind() function allows devices to access process address spaces using a PASID (aka SSID). (1) bind() allocates or gets an existing MMU notifier tied to the (domain, mm) pair. Each mm gets one PASID. (2) Any change to the address space calls invalidate_range() which sends ATC invalidations (in a subsequent patch). (3) When the process address space dies, the release() notifier disables the CD to allow reclaiming the page tables. Since release() has to be light we do not instruct device drivers to stop DMA here, we just ignore incoming page faults from this point onwards. To avoid any event 0x0a print (C_BAD_CD) we disable translation without clearing CD.V. PCIe Translation Requests and Page Requests are silently denied. Don't clear the R bit because the S bit can't be cleared when STALL_MODEL==0b10 (forced), and clearing R without clearing S is useless. Faulting transactions will stall and will be aborted by the IOPF handler. (4) After stopping DMA, the device driver releases the bond by calling unbind(). We release the MMU notifier, free the PASID and the bond. Three structures keep track of bonds: * arm_smmu_bond: one per {device, mm} pair, the handle returned to the device driver for a bind() request. * arm_smmu_mmu_notifier: one per {domain, mm} pair, deals with ATS/TLB invalidations and clearing the context descriptor on mm exit. * arm_smmu_ctx_desc: one per mm, holds the pinned ASID and pgd. Signed-off-by: Jean-Philippe Brucker Link: https://lore.kernel.org/r/20201106155048.997886-4-jean-philippe@linaro.org Signed-off-by: Will Deacon commit cfc78dfd9b36dcda7c3ca9cdfca343f84c72252f Author: Jean-Philippe Brucker Date: Fri Nov 6 16:50:48 2020 +0100 iommu/sva: Add PASID helpers Let IOMMU drivers allocate a single PASID per mm. Store the mm in the IOASID set to allow refcounting and searching mm by PASID, when handling an I/O page fault. Signed-off-by: Jean-Philippe Brucker Reviewed-by: Lu Baolu Link: https://lore.kernel.org/r/20201106155048.997886-3-jean-philippe@linaro.org Signed-off-by: Will Deacon commit cb4789b0d19ff231ce9f73376a023341300aed96 Author: Jean-Philippe Brucker Date: Fri Nov 6 16:50:47 2020 +0100 iommu/ioasid: Add ioasid references Let IOASID users take references to existing ioasids with ioasid_get(). ioasid_put() drops a reference and only frees the ioasid when its reference number is zero. It returns true if the ioasid was freed. For drivers that don't call ioasid_get(), ioasid_put() is the same as ioasid_free(). Signed-off-by: Jean-Philippe Brucker Reviewed-by: Eric Auger Reviewed-by: Lu Baolu Link: https://lore.kernel.org/r/20201106155048.997886-2-jean-philippe@linaro.org Signed-off-by: Will Deacon commit 6234fdc1cede3c1deda8324bdbb8274c0f4ff192 Author: Takashi Iwai Date: Mon Nov 23 09:53:42 2020 +0100 ALSA: usb-audio: Quirk for BOSS GT-001 The capture stream of BOSS GT-001 seems always requiring to be tied with the playback stream. OTOH, the playback stream of this device doesn't seem working in the implicit fb mode, per se, since the playback must be running before the capture stream. This patch tries to address the points above: - Avoid the implicit fb mode for the playback - Set up a fake sync EP for the capture stream with the hard-coded playback stream using the implicit fb mode Reported-by: Keith Milner Tested-by: Keith Milner Tested-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-37-tiwai@suse.de Signed-off-by: Takashi Iwai commit 8ec08b1a5cf8e4de1db8919a27d0e2a801b09d24 Author: Takashi Iwai Date: Mon Nov 23 09:53:41 2020 +0100 ALSA: usb-audio: Show sync endpoint information in proc outputs Now the sync endpoints have been parsed at the beginning and won't be changed dynamically, let's show them in the proc outputs for helping debugging. Tested-by: Keith Milner Tested-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-36-tiwai@suse.de Signed-off-by: Takashi Iwai commit 89fa3f686c10c9edde0f41e5a1c71afa0e43ff87 Author: Takashi Iwai Date: Mon Nov 23 09:53:40 2020 +0100 ALSA: usb-audio: Use unsigned char for iface and altsettings fields Just for consistency, use unsigned char for iface and altsetting in allover places. Also rearrange the field positions of snd_usb_endpiont and tidy up with some comments. Tested-by: Keith Milner Tested-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-35-tiwai@suse.de Signed-off-by: Takashi Iwai commit 53837b4ac2bd33ede5cd799940341ce5ea7b2902 Author: Takashi Iwai Date: Mon Nov 23 09:53:39 2020 +0100 ALSA: usb-audio: Replace slave/master terms Follow the inclusive terminology, just replace sync_master/sync_slave with sync_source/sync_sink. It's also a bit clearer from its meaning, too. Tested-by: Keith Milner Tested-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-34-tiwai@suse.de Signed-off-by: Takashi Iwai commit 13ee03361fc5c9284067f4bfaaea4ebadbd874cf Author: Takashi Iwai Date: Mon Nov 23 09:53:38 2020 +0100 ALSA: usb-audio: Simplify rate_min/max and rates set up There are multiple places in format.c performing the similar code for setting the rate_min, rate_max and rates fields. This patch unifies those in a helper function and calls it at the end of the parser phase so that all rate_table entries have been already determined. No functional changes, just a minor code refactoring. Tested-by: Keith Milner Tested-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-33-tiwai@suse.de Signed-off-by: Takashi Iwai commit 3d58760f4d0015cc1e7765b580daa007d759d86b Author: Takashi Iwai Date: Mon Nov 23 09:53:37 2020 +0100 ALSA: usb-audio: Unify the code for the next packet size calculation There are two places calculating the next packet size for the playback stream in the exactly same way. Provide the single helper for this purpose and use it from both places gracefully. Tested-by: Keith Milner Tested-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-32-tiwai@suse.de Signed-off-by: Takashi Iwai commit 6aa719d15a1903eb3fd0e052ae53f3b024ad4d05 Author: Takashi Iwai Date: Mon Nov 23 09:53:36 2020 +0100 ALSA: usb-audio: Drop unneeded snd_usb_substream fields Some fields like interface and alt_idx in snd_usb_substream are mostly useless now as they can be referred via either cur_audiofmt or data_endpoint assigned to the substream. Drop those, and also assure the concurrency about the access of cur_audiofmt field. Tested-by: Keith Milner Tested-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-31-tiwai@suse.de Signed-off-by: Takashi Iwai commit d0f09d1e4a88647695739d2ff4268e9fdcf5b35d Author: Takashi Iwai Date: Mon Nov 23 09:53:35 2020 +0100 ALSA: usb-audio: Refactoring endpoint URB deactivation Minor code refactoring to consolidate the URB deactivation code in endpoint.c. A slight behavior change is that the error handling in snd_usb_endpoint_start() leaves EP_FLAG_STOPPING now. This should be synced with the later PCM sync_stop callback. Tested-by: Keith Milner Tested-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-30-tiwai@suse.de Signed-off-by: Takashi Iwai commit 43b81e84068d26d630b63fa877e682909a0102fe Author: Takashi Iwai Date: Mon Nov 23 09:53:34 2020 +0100 ALSA: usb-audio: Use atomic_t for endpoint use_count The endpoint objects may be started/stopped concurrently by different substreams in the case of implicit feedback mode, while the current code handles the reference counter without any protection. This patch changes the refcount to atomic_t for avoiding the inconsistency. We need no reference_t here as the refcount goes only up to 2. Also the name "use_count" is renamed to "running" since this is about actually the running status, not the open refcount. Tested-by: Keith Milner Tested-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-29-tiwai@suse.de Signed-off-by: Takashi Iwai commit cab941b7e5cf054502b01f776db724400ee5c1b6 Author: Takashi Iwai Date: Mon Nov 23 09:53:33 2020 +0100 ALSA: usb-audio: Constify audioformat pointer references The audioformat is referred in many places but most of usages are read-only. Let's add const prefix in the possible places. Tested-by: Keith Milner Tested-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-28-tiwai@suse.de Signed-off-by: Takashi Iwai commit c15871e17fc6efb98176b92b4152019876dbec24 Author: Takashi Iwai Date: Mon Nov 23 09:53:32 2020 +0100 ALSA: usb-audio: Fix possible stall of implicit fb packet ring-buffer The implicit feedback mode uses a ring buffer for storing the received packet sizes from the feedback source, and the code has a slight flaw; when a playback stream stalls by some reason and the URBs aren't processed, the next_packet FIFO might become empty, but the driver can't distinguish whether it's empty or full because it's managed with read_poss and write_pos. This patch addresses those by changing the next_packet array management. Instead of keeping read and write positions, now the head position and the queued amount are kept. It's easier to understand about the emptiness. Also, the URB active flag is now cleared before calling queue_pending_output_urbs() for avoiding (theoretically) possible inconsistency. Tested-by: Keith Milner Tested-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-27-tiwai@suse.de Signed-off-by: Takashi Iwai commit bf6313a0ff766925462e97b4e733d5952de02367 Author: Takashi Iwai Date: Mon Nov 23 09:53:31 2020 +0100 ALSA: usb-audio: Refactor endpoint management This is an intensive surgery for the endpoint and stream management for achieving more robust and clean code. The goals of this patch are: - More clear endpoint resource changes - The interface altsetting control in a single place Below are brief description of the whole changes. First off, most of the endpoint operations are moved into endpoint.c, so that the snd_usb_endpoint object is only referred in other places. The endpoint object is acquired and released via the new functions snd_usb_endpoint_open() and snd_usb_endpoint_close() that are called at PCM hw_params and hw_free callbacks, respectively. Those are ref-counted and EPs can manage the multiple opens. The open callback receives the audioformat and hw_params arguments, and those are used for initializing the EP parameters; especially the endpoint, interface and altset numbers are read from there, as well as the PCM parameters like the format, rate and channels. Those are stored in snd_usb_endpoint object. If it's the secondary open, the function checks whether the given parameters are compatible with the already opened EP setup, too. The coupling with a sync EP (including an implicit feedback sync) is done by the sole snd_usb_endpoint_set_sync() call. The configuration of each endpoint is done in a single shot via snd_usb_endpoint_configure() call. This is the place where most of PCM configurations are done. A few flags and special handling in the snd_usb_substream are dropped along with this change. A significant difference wrt the configuration from the previous code is the order of USB host interface setups. Now the interface is always disabled at beginning and (re-)enabled at the last step of snd_usb_endpoint_configure(), in order to be compliant with the standard UAC2/3. For UAC1, the interface is set before the parameter setups since there seem devices that require it (e.g. Yamaha THR10), just like how it was done in the previous driver code. The start/stop are almost same as before, also single-shots. The URB callbacks need to be set via snd_usb_endpoint_set_callback() like the previous code at the trigger phase, too. Finally, the flag for the re-setup is set at the device suspend through the full EP list, instead of PCM trigger. This catches the overlooked cases where the PCM hasn't been running yet but the device needs the full setup after resume. Tested-by: Keith Milner Tested-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-26-tiwai@suse.de Signed-off-by: Takashi Iwai commit 61cc2d775e0941ca61b9666760a656919d80077a Author: Takashi Iwai Date: Mon Nov 23 09:53:30 2020 +0100 ALSA: usb-audio: Fix EP matching for continuous rates The function to evaluate the match of the parameters with an EP assumes only the discrete rate tables and doesn't handle the continuous rates properly. This patch fixes match_endpoint_audioformats() to handle the continuous rates. Also the almost useless debug prints there are dropped. Tested-by: Keith Milner Tested-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-25-tiwai@suse.de Signed-off-by: Takashi Iwai commit 75c16b5147ee42270b18b5f32bc3f17f8b74b5eb Author: Takashi Iwai Date: Mon Nov 23 09:53:29 2020 +0100 ALSA: usb-audio: Always set up the parameters after resume The commit 92adc96f8eec ("ALSA: usb-audio: set the interface format after resume on Dell WD19") introduced the workaround for the broken setup after the resume specifically on a Dell dock model. However, the full setup should have been performed after the resume on all devices, as we can't guarantee the same state. So this patch removes the conditional check and applies the workaround always. Tested-by: Keith Milner Tested-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-24-tiwai@suse.de Signed-off-by: Takashi Iwai commit 96e221f379e887f58d29969f10ed330ae1be4d80 Author: Takashi Iwai Date: Mon Nov 23 09:53:28 2020 +0100 ALSA: usb-audio: Set callbacks via snd_usb_endpoint_set_callback() The prepare_data_urb and retire_data_urb fields of the endpoint object are set dynamically at PCM trigger start/stop. Those are evaluated in the endpoint handler, but there can be a race, especially if two different PCM substreams are handling the same endpoint for the implicit feedback case. Also, the data_subs field of the endpoint is set and accessed dynamically, too, which has the same risk. As a slight improvement for the concurrency, this patch introduces the function to set the callbacks and the data in a shot with the memory barrier. In the reader side, it's also fetched with the memory barrier. There is still a room of race if prepare and retire callbacks are set during executing the URB completion. But such an inconsistency may happen only for the implicit fb source, i.e. it's only about the capture stream. And luckily, the capture stream never sets the prepare callback, hence the problem doesn't happen practically. Tested-by: Keith Milner Tested-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-23-tiwai@suse.de Signed-off-by: Takashi Iwai commit 57234bc1038517437d5c589595caf77b2118529e Author: Takashi Iwai Date: Mon Nov 23 09:53:27 2020 +0100 ALSA: usb-audio: Stop both endpoints properly at error start_endpoints() may leave the data endpoint running if an error happens at starting the sync endpoint. We should stop both streams properly, instead. While we're at it, move the debug prints into the endpoint.c that is a more suitable place. Tested-by: Keith Milner Tested-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-22-tiwai@suse.de Signed-off-by: Takashi Iwai commit 73037c8dc1c8cf994a38fedba4a5af7e6da5e4f1 Author: Takashi Iwai Date: Mon Nov 23 09:53:26 2020 +0100 ALSA: usb-audio: Simplify snd_usb_init_pitch() arguments A preliminary change for the later big changes. This is a minor code refactoring to drop the unnecessary arguments that can be retrieved in a different way. Tested-by: Keith Milner Tested-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-21-tiwai@suse.de Signed-off-by: Takashi Iwai commit 953a446b50fd6c68f0a40f0cd79a2a903faf3243 Author: Takashi Iwai Date: Mon Nov 23 09:53:25 2020 +0100 ALSA: usb-audio: Simplify snd_usb_init_sample_rate() arguments A preliminary change for the later big changes. This is a minor code refactoring to drop the unnecessary arguments that can be retrieved in a different way. Tested-by: Keith Milner Tested-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-20-tiwai@suse.de Signed-off-by: Takashi Iwai commit d767aba2023c80ff0247b45526358d9a30af8293 Author: Takashi Iwai Date: Mon Nov 23 09:53:24 2020 +0100 ALSA: usb-audio: Pass snd_usb_audio object to quirk functions A preliminary patch for the later big change. Just a minor code refactoring. Tested-by: Keith Milner Tested-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-19-tiwai@suse.de Signed-off-by: Takashi Iwai commit c7f902015e1e86117e6cd3dde17d5964d88a9559 Author: Takashi Iwai Date: Mon Nov 23 09:53:23 2020 +0100 ALSA: usb-audio: Don't set altsetting before initializing sample rate Setting the active altsetting at changing sample rate seems unrecommended. The host should deselect the altsetting at first before that, then select it again. Tested-by: Keith Milner Tested-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-18-tiwai@suse.de Signed-off-by: Takashi Iwai commit e42a09bc520e94375501a8f8e769b867d8063d9d Author: Takashi Iwai Date: Mon Nov 23 09:53:22 2020 +0100 ALSA: usb-audio: Add snd_usb_get_host_interface() helper Add a helper function to retrieve the usb_host_interface object from the given interface and altsetting number pair, which is a commonly used procedure in the driver code. No functional changes, just minor code refactoring. Tested-by: Keith Milner Tested-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-17-tiwai@suse.de Signed-off-by: Takashi Iwai commit 982150560c7c1310d8826abf73857b76000e7db8 Author: Takashi Iwai Date: Mon Nov 23 09:53:21 2020 +0100 ALSA: usb-audio: Drop keep_interface flag again This behavior turned out to be invalid from the USB spec POV and shouldn't be applied. As it's an optional flag that is set only via an card control element that must be hardly used, let's drop it again. Tested-by: Keith Milner Tested-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-16-tiwai@suse.de Signed-off-by: Takashi Iwai commit 54cb31901b831befb4f9347dd002dcc8ff2cc263 Author: Takashi Iwai Date: Mon Nov 23 09:53:20 2020 +0100 ALSA: usb-audio: Create endpoint objects at parsing phase Currently snd_usb_endpoint objects are created at first when the substream is opened and tries to assign the endpoints corresponding to the matching audioformat. But since basically the all endpoints have been already parsed and the information have been obtained, we may create the endpoint objects statically at the init phase. It's easier to manage for the implicit fb case, for example. This patch changes the endpoint object management and lets the parser to create the all endpoint objects. This change shouldn't bring any functional changes. Tested-by: Keith Milner Tested-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-15-tiwai@suse.de Signed-off-by: Takashi Iwai commit 5fd255f4fe9707b5274e60d94d4aa64536f67ec3 Author: Takashi Iwai Date: Mon Nov 23 09:53:19 2020 +0100 ALSA: usb-audio: Avoid doubly initialization for implicit fb The implicit feedback mode initializes both the main data stream and the sync data stream. When a sync stream was already opened, this would result in the doubly initialization and might screw up things. Add the check of already opened sync streams and skip the unnecessary initialization. Tested-by: Keith Milner Tested-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-14-tiwai@suse.de Signed-off-by: Takashi Iwai commit 7ec827b9465c427511f05bab02dddbcfdd4ecc53 Author: Takashi Iwai Date: Mon Nov 23 09:53:18 2020 +0100 ALSA: usb-audio: Drop debug.h The file debug.h contains a simple macro for debug prints, and it's used only in two places, the format parser and the hw_params rules. The former actually should print a more informative message instead, so the only users are the hw_parmas rules. This patch moves the contents of debug.h into the hw_params rules local code and remove the unneeded includes. Also, the debug print in the format parser is replaced with the information print with more useful information, and the raw printk() call is replaced with pr_debug(). Tested-by: Keith Milner Tested-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-13-tiwai@suse.de Signed-off-by: Takashi Iwai commit 7726dce14c5e7eaa78567be8c1e417acd6c83415 Author: Takashi Iwai Date: Mon Nov 23 09:53:17 2020 +0100 ALSA: usb-audio: Simplify hw_params rules Several hw_params functions narrows the interval via min/max rule in the very similar way, so factor out those into a helper function and use commonly. No functional changes, just minor code refactoring. Tested-by: Keith Milner Tested-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-12-tiwai@suse.de Signed-off-by: Takashi Iwai commit 5a6c3e11c9c9bc764cd4e2621cdb48cc9afb28a1 Author: Takashi Iwai Date: Mon Nov 23 09:53:16 2020 +0100 ALSA: usb-audio: Add hw constraint for implicit fb sync In the current code, there is no check at the stream open time whether the endpoint is being already used by others. In the normal operations, this shouldn't happen, but in the case of the implicit feedback mode, it's a common problem with the full duplex operation, because the capture stream is always opened by the playback stream as an implicit sync source. Although we recently introduced the check of such a conflict of parameters at the PCM hw_params time, it doesn't give any hint at the hw_params itself and just gives the error. This isn't quite comfortable, and it caused problems on many applications. This patch attempts to make the parameter handling easier by introducing the strict hw constraint matching with the counterpart stream that is being used. That said, when an implicit feedback playback stream is running before a capture stream is opened, the capture stream carries the PCM hw-constraint to allow only the same sample rate, format, periods and period frames as the running playback stream. If not opened or there is no conflict of endpoints, the behavior remains as same as before. Note that this kind of "weak link" should work for most cases, but this is no concrete solution; e.g. if an application changes the hw params multiple times while another stream is opened, this would lead to inconsistencies. Tested-by: Keith Milner Tested-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-11-tiwai@suse.de Signed-off-by: Takashi Iwai commit 1865211d6789e8404c75278754f0fa4735165600 Author: Takashi Iwai Date: Mon Nov 23 09:53:15 2020 +0100 ALSA: usb-audio: Move snd_usb_autoresume() call out of setup_hw_info() This is a preliminary work for the upcoming hw-constraint change for the implicit feedback mode. Currently snd_usb_autoresume() is called at the end of setup_hwinfo(). It's a bit confusing; because of this implicit refcount usage, the caller side needs to call snd_usb_autosuspend() later in the error path although it's not seen inside the function. Instead, it's clearer to call both snd_usb_autoresume() and suspend() in the very same function. It's only refactoring and no functional changes. Tested-by: Keith Milner Tested-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-10-tiwai@suse.de Signed-off-by: Takashi Iwai commit f6581c0e5d297cc1e0d7eb7c2603097f532e629a Author: Takashi Iwai Date: Mon Nov 23 09:53:14 2020 +0100 ALSA: usb-audio: Track implicit fb sync endpoint in audioformat list Instead of parsing and evaluating the sync endpoint and the implicit feedback mode at each time the audio stream is opened, let's parse it once at the probe time, as the all needed information can be obtained statically from the descriptor or from the quirk. This patch extends audioformat struct to record the sync endpoint, interface and altsetting as well as the implicit feedback flag, which are filled at parsing the streams. Then, set_sync_endpoint() is much simplified just to follow the already parsed data. Tested-by: Keith Milner Tested-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-9-tiwai@suse.de Signed-off-by: Takashi Iwai commit e93e890e16ef5a0605b7cdc52b3bde50d88d7207 Author: Takashi Iwai Date: Mon Nov 23 09:53:13 2020 +0100 ALSA: usb-audio: Improve some debug prints There are a few rooms for improvements wrt the debug prints: - The EP debug print is shown only at starting, not at stopping - The EP debug print contains useless object addresses - Some helpers show the urb and the EP object addresses, too This patch addresses those shortcomings. Tested-by: Keith Milner Tested-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-8-tiwai@suse.de Signed-off-by: Takashi Iwai commit 1803503fe963afe850b26769f5447f871b1c6f83 Author: Takashi Iwai Date: Mon Nov 23 09:53:12 2020 +0100 ALSA: usb-audio: Set and clear sync EP link properly The sync EP setup isn't cleared at stopping the stream but expected to be cleared at the next stream start. This may leave the sync link setup stale and can spoof wrongly when full duplex streams were running in the implicit fb sync. Let's initialize them properly at start and end of the stream. Tested-by: Keith Milner Tested-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-7-tiwai@suse.de Signed-off-by: Takashi Iwai commit c7474d09777c3d321f9f7f6a416f276204926c54 Author: Takashi Iwai Date: Mon Nov 23 09:53:11 2020 +0100 ALSA: usb-audio: Add snd_usb_get_endpoint() helper Factor out the code to obtain snd_usb_endpoint object matching with the given endpoint. It'll be used in the later patch to add the implicit feedback hw-constraint. No functional change by this patch itself. Tested-by: Keith Milner Tested-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-6-tiwai@suse.de Signed-off-by: Takashi Iwai commit 2e43aae2bf5a4ede98cbe0c85ad104dd7ba5dfd2 Author: Takashi Iwai Date: Mon Nov 23 09:53:10 2020 +0100 ALSA: usb-audio: Check implicit feedback EP generically for UAC2 It seems that many UAC2 devices are with the implicit feedback, but they couldn't be probed properly because the assumption the driver takes currently isn't applied: they have the single endpoint for both data and implicit-fb streams, while we checked only the classical sync endpoints assigned to the next altsetting in the same interface. This patch extends the search to match with those typical cases where the implicit fb stream is found in the next interface number. While we're at it, slightly refactor the code, not returning 0/-ERROR but use the standard bool to success/failur, which is more intuitive in this particular case. Reported-by: Dylan Robinson Tested-by: Keith Milner Tested-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-5-tiwai@suse.de Signed-off-by: Takashi Iwai commit 93db51d06b32227319dae2ac289029ccf1b33181 Author: Takashi Iwai Date: Mon Nov 23 09:53:09 2020 +0100 ALSA: usb-audio: Check valid altsetting at parsing rates for UAC2/3 The current driver code assumes blindly that all found sample rates for the same endpoint from the UAC2 and UAC3 descriptors can be used no matter which altsetting, but actually this was wrong: some devices accept only limited sample rates in each altsetting. For determining which altsetting supports which rate, we need to verify each sample rate and check the validity via UAC2_AS_VAL_ALT_SETTINGS. This control reports back the available altsettings as a bitmap. This patch implements the missing piece above, the verification and reconstructs the sample rate tables based on the result. An open question is how to deal with the altsettings that ended up with no valid sample rates after verification. At least, there is a device that showed this problem although the sample rates did work in the later usage (see bug link). For now, we accept such an altset as is, assuming that it's a firmware bug. Reported-by: Dylan Robinson Tested-by: Keith Milner Tested-by: Dylan Robinson BugLink: https://bugzilla.suse.com/show_bug.cgi?id=1178203 Link: https://lore.kernel.org/r/20201123085347.19667-4-tiwai@suse.de Signed-off-by: Takashi Iwai commit 4974b7950929e4a28d4eaee48e4ad07f168ac132 Author: Takashi Iwai Date: Mon Nov 23 09:53:08 2020 +0100 ALSA: usb-audio: Don't call usb_set_interface() at trigger callback The PCM trigger callback is atomic, hence we must not call a function like usb_set_interface() there. Calling it from there would lead to a kernel Oops. Fix it by moving the usb_set_interface() call to set_sync_endpoint(). Also, apply the snd_usb_set_interface_quirk() for consistency, too. Tested-by: Keith Milner Tested-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-3-tiwai@suse.de Signed-off-by: Takashi Iwai commit bc4e94aa8e72e79598e63a0b73febdcd8aeb541f Author: Takashi Iwai Date: Mon Nov 23 09:53:07 2020 +0100 ALSA: usb-audio: Handle discrete rates properly in hw constraints In the current code, when the device provides the discrete sample rate tables with unusual sample rates, the driver tries to gather the whole values from the audioformat entries and create a hw-constraint rule to restrict with this single rate list. This is rather inefficient and may overlook the rates that are associated only with the certain audioformat entries. This patch improves the hw constraint setup by rewriting the existing hw_rule_rate(). The discrete sample rates (identified by rate_table and nr_rates of format entry) are checked in the existing hw_rule_rate() instead of extra rules; in the case of discrete rates, the function compares with each rate table entry and calculates the min/max values from there. For the contiguous rates, the behavior doesn't change. Along with it, snd_usb_pcm_check_knot() and snb_usb_substream rate_list field become superfluous, thus those are dropped. Tested-by: Keith Milner Tested-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit a8b6cfdf978602dbbb0b9b19e74f25af7a8ca389 Author: Flavio Suligoi Date: Thu Nov 19 13:58:01 2020 +0100 Documentation: ACPI: _DSD: enable hyperlink in final references For inline web links, no special markup is needed. Signed-off-by: Flavio Suligoi Acked-by: Sakari Ailus [ rjw: Subject edits ] Signed-off-by: Rafael J. Wysocki commit 40e49564e189a81094fccac830818d6c89dde376 Author: Masaharu Hayakawa Date: Tue Nov 17 14:13:37 2020 +0100 mmc: tmio: Fix command error processing If some errors are detected at the same time as the access end interrupt, the access end interrupt was not cleared. Especially with DMA, because then the access end interrupt was never enabled and, thus, never cleared. Clear the interrupt register always when a command error occurs. Signed-off-by: Masaharu Hayakawa [saito: rebase to v5.4] Signed-off-by: Takeshi Saito [wsa: rebase and extension of the commit message] Signed-off-by: Wolfram Sang Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20201117131337.35307-1-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 854a22997ad5d6c9860a2d695c40cd4004151d5b Author: Fabio Estevam Date: Tue Nov 17 08:37:50 2020 -0300 mmc: sdhci-esdhc-imx: Convert the driver to DT-only Since 5.10-rc1 i.MX is a devicetree-only platform, so simplify the code by removing the unused non-DT support. Signed-off-by: Fabio Estevam Reviewed-by: Haibo Chen Link: https://lore.kernel.org/r/20201117113750.25053-1-festevam@gmail.com Signed-off-by: Ulf Hansson commit 2e84ea5a3269f9e1d4e7658a9893f5eac4aee5ec Author: Sebastian Andrzej Siewior Date: Fri Nov 13 19:13:17 2020 +0100 ACPI: EC: Eliminate in_interrupt() usage advance_transaction() is using in_interrupt() to distinguish between an invocation from the interrupt handler and an invocation from another part of the stack. This looks misleading because chains like acpi_update_all_gpes() -> acpi_ev_gpe_detect() -> acpi_ev_detect_gpe() -> acpi_ec_gpe_handler() should probably also behave as if they were called from an interrupt handler. Replace in_interrupt() usage with a function parameter. Set this parameter to `true' if invoked from an interrupt handler (acpi_ec_gpe_handler() and acpi_ec_irq_handler()) and `false' otherwise. Signed-off-by: Sebastian Andrzej Siewior [ rjw: Subject edits ] Signed-off-by: Rafael J. Wysocki commit 8dc248665f3a4261907ac35200687c4cb6e16cc0 Author: Linus Walleij Date: Mon Nov 23 13:33:20 2020 +0100 Revert "firmware: QCOM_SCM: Allow qcom_scm driver to be loadable as a permenent module" This reverts commit d0511b5496c03cdbcda55a9b57c32cdd751920ed. After some time it was noticed that the Tegra186 among others were experiencing problems when making this into a module. Signed-off-by: Linus Walleij commit 423282af887b88bad97d1362129c9999593bc608 Merge: 4fba15fbb8106 8b62740472c4f Author: Rafael J. Wysocki Date: Mon Nov 23 12:50:17 2020 +0100 Merge ACPI APEI material for v5.11. commit 0f6e2cb45bcb003e5b3a5332b4de79bf82814f45 Merge: c39de538a06e7 670c90def0342 Author: Rafael J. Wysocki Date: Mon Nov 23 12:49:28 2020 +0100 Merge back cpuidle changes for v5.11. commit e524f252c42fc4f2bc4a2c3f99fe8659af5576a8 Author: Hans de Goede Date: Sun Nov 22 11:33:23 2020 +0100 Bluetooth: hci_h5: Add OBDA0623 ACPI HID Add OBDA0623 ACPI HID to the acpi_device_id table. This HID is used for the RTL8723BS Bluetooth part on the Acer Switch 10E SW3-016. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1665610 Signed-off-by: Hans de Goede Signed-off-by: Marcel Holtmann commit 5c3b5796866f85354a5ce76a28f8ffba0dcefc7e Author: Hans de Goede Date: Sun Nov 22 13:17:25 2020 +0100 Bluetooth: revert: hci_h5: close serdev device and free hu in h5_close There have been multiple revisions of the patch fix the h5->rx_skb leak. Accidentally the first revision (which is buggy) and v5 have both been merged: v1 commit 70f259a3f427 ("Bluetooth: hci_h5: close serdev device and free hu in h5_close"); v5 commit 855af2d74c87 ("Bluetooth: hci_h5: fix memory leak in h5_close") The correct v5 makes changes slightly higher up in the h5_close() function, which allowed both versions to get merged without conflict. The changes from v1 unconditionally frees the h5 data struct, this is wrong because in the serdev enumeration case the memory is allocated in h5_serdev_probe() like this: h5 = devm_kzalloc(dev, sizeof(*h5), GFP_KERNEL); So its lifetime is tied to the lifetime of the driver being bound to the serdev and it is automatically freed when the driver gets unbound. In the serdev case the same h5 struct is re-used over h5_close() and h5_open() calls and thus MUST not be free-ed in h5_close(). The serdev_device_close() added to h5_close() is incorrect in the same way, serdev_device_close() is called on driver unbound too and also MUST no be called from h5_close(). This reverts the changes made by merging v1 of the patch, so that just the changes of the correct v5 remain. Cc: Anant Thazhemadam Signed-off-by: Hans de Goede Signed-off-by: Marcel Holtmann commit 80f06306240e0ad1c75116111be11950474dfda7 Author: Heiko Carstens Date: Mon Nov 16 08:06:41 2020 +0100 s390/vdso: reimplement getcpu vdso syscall Implement the previously removed getcpu vdso syscall by using the TOD programmable field to pass the cpu number to user space. Reviewed-by: Sven Schnelle Signed-off-by: Heiko Carstens commit 062e527956d05fae02f143c0d5ff9e8525c6799f Author: Heiko Carstens Date: Mon Nov 16 08:06:41 2020 +0100 s390/mm: add debug user asce support Verify on exit to user space that always - the primary ASCE (cr1) is set to kernel ASCE - the secondary ASCE (cr7) is set to user ASCE If this is not the case: panic since something went terribly wrong. Reviewed-by: Sven Schnelle Signed-off-by: Heiko Carstens commit 0290c9e328e04052e317171953feb18177a34aed Author: Heiko Carstens Date: Mon Nov 16 08:06:41 2020 +0100 s390/mm: use invalid asce instead of kernel asce Create a region 3 page table which contains only invalid entries, and use that via "s390_invalid_asce" instead of the kernel ASCE whenever there is either - no user address space available, e.g. during early startup - as an intermediate ASCE when address spaces are switched This makes sure that user space accesses in such situations are guaranteed to fail. Reviewed-by: Sven Schnelle Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens commit 87d5986345219a7e4f204726d9085ea87f3e22d0 Author: Heiko Carstens Date: Mon Nov 16 08:06:40 2020 +0100 s390/mm: remove set_fs / rework address space handling Remove set_fs support from s390. With doing this rework address space handling and simplify it. As a result address spaces are now setup like this: CPU running in | %cr1 ASCE | %cr7 ASCE | %cr13 ASCE ----------------------------|-----------|-----------|----------- user space | user | user | kernel kernel, normal execution | kernel | user | kernel kernel, kvm guest execution | gmap | user | kernel To achieve this the getcpu vdso syscall is removed in order to avoid secondary address mode and a separate vdso address space in for user space. The getcpu vdso syscall will be implemented differently with a subsequent patch. The kernel accesses user space always via secondary address space. This happens in different ways: - with mvcos in home space mode and directly read/write to secondary address space - with mvcs/mvcp in primary space mode and copy from primary space to secondary space or vice versa - with e.g. cs in secondary space mode and access secondary space Switching translation modes happens with sacf before and after instructions which access user space, like before. Lazy handling of control register reloading is removed in the hope to make everything simpler, but at the cost of making kernel entry and exit a bit slower. That is: on kernel entry the primary asce is always changed to contain the kernel asce, and on kernel exit the primary asce is changed again so it contains the user asce. In kernel mode there is only one exception to the primary asce: when kvm guests are executed the primary asce contains the gmap asce (which describes the guest address space). The primary asce is reset to kernel asce whenever kvm guest execution is interrupted, so that this doesn't has to be taken into account for any user space accesses. Reviewed-by: Sven Schnelle Signed-off-by: Heiko Carstens commit 77663819d4901e1f982e69ca336daa1bc830c5d6 Merge: 334ef6ed06fa1 1179f170b6f0a Author: Heiko Carstens Date: Mon Nov 23 12:00:42 2020 +0100 Merge branch 'fixes' into features * fixes: s390: fix fpu restore in entry.S Signed-off-by: Heiko Carstens commit 66930e7e1e58880046a0d39eacccf67e8027d980 Merge: 68dd9d89eaf56 fc0021aa340af Author: Will Deacon Date: Mon Nov 23 10:46:43 2020 +0000 Merge branch 'stable/for-linus-5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb into for-next/iommu/vt-d Merge swiotlb updates from Konrad, as we depend on the updated function prototype for swiotlb_tbl_map_single(), which dropped the 'tbl_dma_addr' argument in -rc4. * 'stable/for-linus-5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb: swiotlb: remove the tbl_dma_addr argument to swiotlb_tbl_map_single swiotlb: fix "x86: Don't panic if can not alloc buffer for swiotlb" commit a7b5458ce73b235be027cf2658c39b19b7e58cf2 Author: Finn Thain Date: Sun Nov 22 10:28:17 2020 +1100 m68k: Fix WARNING splat in pmac_zilog driver Don't add platform resources that won't be used. This avoids a recently-added warning from the driver core, that can show up on a multi-platform kernel when !MACH_IS_MAC. ------------[ cut here ]------------ WARNING: CPU: 0 PID: 0 at drivers/base/platform.c:224 platform_get_irq_optional+0x8e/0xce 0 is an invalid IRQ number Modules linked in: CPU: 0 PID: 0 Comm: swapper Not tainted 5.9.0-multi #1 Stack from 004b3f04: 004b3f04 00462c2f 00462c2f 004b3f20 0002e128 004754db 004b6ad4 004b3f4c 0002e19c 004754f7 000000e0 00285ba0 00000009 00000000 004b3f44 ffffffff 004754db 004b3f64 004b3f74 00285ba0 004754f7 000000e0 00000009 004754db 004fdf0c 005269e2 004fdf0c 00000000 004b3f88 00285cae 004b6964 00000000 004fdf0c 004b3fac 0051cc68 004b6964 00000000 004b6964 00000200 00000000 0051cc3e 0023c18a 004b3fc0 0051cd8a 004fdf0c 00000002 0052b43c 004b3fc8 Call Trace: [<0002e128>] __warn+0xa6/0xd6 [<0002e19c>] warn_slowpath_fmt+0x44/0x76 [<00285ba0>] platform_get_irq_optional+0x8e/0xce [<00285ba0>] platform_get_irq_optional+0x8e/0xce [<00285cae>] platform_get_irq+0x12/0x4c [<0051cc68>] pmz_init_port+0x2a/0xa6 [<0051cc3e>] pmz_init_port+0x0/0xa6 [<0023c18a>] strlen+0x0/0x22 [<0051cd8a>] pmz_probe+0x34/0x88 [<0051cde6>] pmz_console_init+0x8/0x28 [<00511776>] console_init+0x1e/0x28 [<0005a3bc>] printk+0x0/0x16 [<0050a8a6>] start_kernel+0x368/0x4ce [<005094f8>] _sinittext+0x4f8/0xc48 random: get_random_bytes called from print_oops_end_marker+0x56/0x80 with crng_init=0 ---[ end trace 392d8e82eed68d6c ]--- Commit a85a6c86c25b ("driver core: platform: Clarify that IRQ 0 is invalid"), which introduced the WARNING, suggests that testing for irq == 0 is undesirable. Instead of that comparison, just test for resource existence. Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Joshua Thompson Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: stable@vger.kernel.org # v5.8+ Reported-by: Laurent Vivier Signed-off-by: Finn Thain Link: https://lore.kernel.org/r/0c0fe1e4f11ccec202d4df09ea7d9d98155d101a.1606001297.git.fthain@telegraphics.com.au Signed-off-by: Geert Uytterhoeven commit 428ec5f9dde73fa93d1bb2dc27db1db167dd9530 Author: Youling Tang Date: Fri Nov 20 14:08:14 2020 +0800 m68k: Add a missing ELF_DETAILS in link script Commit c604abc3f6e3 ("vmlinux.lds.h: Split ELF_DETAILS from STABS_DEBUG") after should add a missing ELF_DETAILS, at the same time, the .comment section has been included in the ELF_DETAILS. Signed-off-by: Youling Tang Link: https://lore.kernel.org/r/1605852494-23515-1-git-send-email-tangyouling@loongson.cn Signed-off-by: Geert Uytterhoeven commit 549aeec256caa80e03607c88f1030b58fb87aaf3 Author: Youling Tang Date: Fri Nov 20 14:07:54 2020 +0800 m68k: Drop redundant NOTES in link script Commit eaf937075c9a ("vmlinux.lds.h: Move NOTES into RO_DATA") after should remove redundant NOTES. Signed-off-by: Youling Tang Link: https://lore.kernel.org/r/1605852474-23446-1-git-send-email-tangyouling@loongson.cn Signed-off-by: Geert Uytterhoeven commit 07ce9b7ab0bff8f7e2b51db43e69d36f018c8118 Author: Finn Thain Date: Fri Nov 20 15:39:56 2020 +1100 m68k: mac: Update Kconfig help There is still some missing hardware support that affects all models, such as sound chip and localtalk support. However, many models are well supported, including the Quadra 800 emulated by QEMU. Missing hardware support is mostly documented at the web site, so add the URL. Cc: Joshua Thompson Signed-off-by: Finn Thain Link: https://lore.kernel.org/r/bb327f05f8fb61eeb332cc2ba4e8335570976474.1605847196.git.fthain@telegraphics.com.au Signed-off-by: Geert Uytterhoeven commit 0c450b8e7882e42c3f65ab434c48cc110640de92 Author: Finn Thain Date: Fri Nov 20 15:39:56 2020 +1100 m68k: mac: Remove redundant VIA register writes There's no need to write the same value to the timer latch and timer counter registers. Values written to the counter registers get stored in the latches anyway. The write to vT1CH copies the latch values to the counter. Cc: Joshua Thompson Tested-by: Stan Johnson Signed-off-by: Finn Thain Link: https://lore.kernel.org/r/c6b1d9620af3e8f89dd0157a41fa4147294b251d.1605847196.git.fthain@telegraphics.com.au Signed-off-by: Geert Uytterhoeven commit 471037e2c9bbc96048a024b68bc9873b588fbe96 Author: Finn Thain Date: Fri Nov 20 15:39:56 2020 +1100 m68k: mac: Remove dead code Cc: Joshua Thompson Signed-off-by: Finn Thain Link: https://lore.kernel.org/r/effef6339c919a4ef2e81a47e4383f712cdd7626.1605847196.git.fthain@telegraphics.com.au Signed-off-by: Geert Uytterhoeven commit 266994e3ac78955f2f7f4ac3fe588002c7bd679c Author: Finn Thain Date: Fri Nov 20 15:39:56 2020 +1100 m68k: mac: Refactor iop_preinit() and iop_init() The idea behind iop_preinit() was to put the SCC IOP into bypass mode. However, that remains unimplemented and implementing it would be difficult. Let the comments and code reflect this. Even if iop_preinit() worked as described in the comments, it gets called immediately before iop_init() so it might as well part of iop_init(). Cc: Joshua Thompson Tested-by: Stan Johnson Signed-off-by: Finn Thain Link: https://lore.kernel.org/r/0a7b09f5e5f48e270b82041c19e8f20f54c69216.1605847196.git.fthain@telegraphics.com.au Signed-off-by: Geert Uytterhoeven commit 44a9e78f9242872c889f176782777fa2ed535650 Author: Sylwester Nawrocki Date: Fri Nov 20 16:57:31 2020 +0100 clk: samsung: Prevent potential endless loop in the PLL ops The PLL status polling loops in the set_rate callbacks of some PLLs have no timeout detection and may become endless loops when something goes wrong with the PLL. For some PLLs there is already the ktime API based timeout detection, but it will not work in all conditions when .set_rate gets called. In particular, before the clocksource is initialized or when the timekeeping is suspended. This patch adds a common helper with the PLL status bit polling and timeout detection. For conditions where the timekeeping API should not be used a simple readl_relaxed/cpu_relax() busy loop is added with the iterations limit derived from measurements of readl_relaxed() execution time for various PLL types and Exynos SoCs variants. Actual PLL lock time depends on the P divider value, the VCO frequency and a constant PLL type specific LOCK_FACTOR and can be calculated as lock_time = Pdiv * LOCK_FACTOR / VCO_freq For the ktime API use cases a common timeout value of 20 ms is applied for all the PLLs with an assumption that maximum possible value of Pdiv is 64, maximum possible LOCK_FACTOR value is 3000 and minimum VCO frequency is 24 MHz. Link: https://lore.kernel.org/r/20201120155731.26898-1-s.nawrocki@samsung.com Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sylwester Nawrocki commit 46bc965df0387539adb0aaafa27927815d918aa6 Author: Jaehoon Chung Date: Fri Nov 13 18:01:38 2020 +0100 phy: samsung: phy-exynos-pcie: rework driver to support Exynos5433 PCIe PHY Exynos5440 SoC support has been dropped since commit 8c83315da1cf ("ARM: dts: exynos: Remove Exynos5440"). Rework this driver to support PCIe PHY variant found in the Exynos5433 SoCs. [mszyprow: reworked the driver to support only Exynos5433 variant, rebased onto current kernel code, rewrote commit message] Acked-By: Vinod Koul Link: https://lore.kernel.org/r/20201113170139.29956-5-m.szyprowski@samsung.com Signed-off-by: Jaehoon Chung Signed-off-by: Marek Szyprowski Signed-off-by: Lorenzo Pieralisi Reviewed-by: Jingoo Han Acked-by: Krzysztof Kozlowski commit a7b4dba9a71d64e07fbc9802bbc1eaad5494f071 Author: Marek Szyprowski Date: Fri Nov 13 18:01:37 2020 +0100 dt-bindings: phy: exynos: add the samsung,exynos-pcie-phy binding Add dt-bindings for the Samsung Exynos PCIe PHY controller (Exynos5433 variant). Based on the text dt-binding posted by Jaehoon Chung. Link: https://lore.kernel.org/r/20201113170139.29956-4-m.szyprowski@samsung.com Signed-off-by: Marek Szyprowski Signed-off-by: Lorenzo Pieralisi Reviewed-by: Krzysztof Kozlowski Reviewed-by: Rob Herring commit eea23e4a00d479eea6d15a78b79f0c58e8ee4467 Author: Marek Szyprowski Date: Fri Nov 13 18:01:36 2020 +0100 dt-bindings: PCI: exynos: add the samsung,exynos-pcie binding Add dt-bindings for the Samsung Exynos PCIe controller (Exynos5433 variant). Based on the text dt-binding posted by Jaehoon Chung. Link: https://lore.kernel.org/r/20201113170139.29956-3-m.szyprowski@samsung.com Signed-off-by: Marek Szyprowski Signed-off-by: Lorenzo Pieralisi Reviewed-by: Krzysztof Kozlowski Reviewed-by: Rob Herring commit 83fbffcd1329dfd5254f020b542857b7833d227b Author: Marek Szyprowski Date: Fri Nov 13 18:01:35 2020 +0100 dt-bindings: PCI: exynos: drop samsung,exynos5440-pcie binding Exynos5440 SoC support has been dropped since commit 8c83315da1cf ("ARM: dts: exynos: Remove Exynos5440"). Drop the obsolete bindings for exynos5440-pcie. Link: https://lore.kernel.org/r/20201113170139.29956-2-m.szyprowski@samsung.com Signed-off-by: Marek Szyprowski Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Reviewed-by: Jingoo Han commit f6b7bb847ca821a8aaa1b6da10ee65311e6f15bf Author: Jon Derrick Date: Mon Nov 2 15:22:23 2020 -0700 PCI: vmd: Offset Client VMD MSI-X vectors Client VMD platforms have a software-triggered MSI-X vector 0 that will not forward hardware-remapped MSI from the sub-device domain. This causes an issue with VMD platforms that use AHCI behind VMD and have a single MSI-X vector remapped to VMD vector 0. Add a VMD MSI-X vector offset for these platforms. Link: https://lore.kernel.org/r/20201102222223.92978-1-jonathan.derrick@intel.com Tested-by: Jian-Hong Pan Signed-off-by: Jon Derrick Signed-off-by: Lorenzo Pieralisi commit 8fca3c8a3451514c6f20dd26d5e66e78220d16e3 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:28:25 2020 -0600 ext2: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of just letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Link: https://lore.kernel.org/r/73d8ae2d06d639815672ee9ee4550ea4bfa08489.1605896059.git.gustavoars@kernel.org Signed-off-by: Gustavo A. R. Silva Signed-off-by: Jan Kara commit ae9ef58996a4447dd44aa638759f913c883ba816 Author: Thomas Gleixner Date: Fri Nov 13 15:02:18 2020 +0100 softirq: Move related code into one section To prepare for adding a RT aware variant of softirq serialization and processing move related code into one section so the necessary #ifdeffery is reduced to one. Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20201113141733.974214480@linutronix.de commit 15115830c88751ba83068aa37da996602ddc6a61 Author: Thomas Gleixner Date: Fri Nov 13 15:02:17 2020 +0100 preempt: Cleanup the macro maze a bit Make the macro maze consistent and prepare it for adding the RT variant for BH accounting. - Use nmi_count() for the NMI portion of preempt count - Introduce in_hardirq() to make the naming consistent and non-ambiguos - Use the macros to create combined checks (e.g. in_task()) so the softirq representation for RT just falls into place. - Update comments and move the deprecated macros aside Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20201113141733.864469886@linutronix.de commit e091bc90cd2d65f48e4688faead2911558d177d7 Author: Thomas Gleixner Date: Fri Nov 13 15:02:16 2020 +0100 irqstat: Move declaration into asm-generic/hardirq.h Move the declaration of the irq_cpustat per cpu variable to asm-generic/hardirq.h and remove the now empty linux/irq_cpustat.h header. Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20201113141733.737377332@linutronix.de commit fd15c1941f0ae0b46d48431d0020edfc843abd33 Author: Thomas Gleixner Date: Fri Nov 13 15:02:15 2020 +0100 sh: irqstat: Use the generic irq_cpustat_t SH can now use the generic irq_cpustat_t. Define ack_bad_irq so the generic header does not emit the generic version of it. Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20201113141733.625146223@linutronix.de commit 1adb99eabce9deefb55985c19181d375ba6ff4aa Author: Thomas Gleixner Date: Fri Nov 13 15:02:14 2020 +0100 asm-generic/irqstat: Add optional __nmi_count member Add an optional __nmi_count member to irq_cpustat_t so more architectures can use the generic version. Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20201113141733.501611990@linutronix.de commit 2cb0837e56e1b04b773ed05df72297de4e010063 Author: Thomas Gleixner Date: Fri Nov 13 15:02:13 2020 +0100 arm64: irqstat: Get rid of duplicated declaration irq_cpustat_t is exactly the same as the asm-generic one. Define ack_bad_irq so the generic header does not emit the generic version of it. Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Acked-by: Will Deacon Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20201113141733.392015387@linutronix.de commit 7fd70c65faacd39628ba5f670be6490010c8132f Author: Thomas Gleixner Date: Fri Nov 13 15:02:12 2020 +0100 ARM: irqstat: Get rid of duplicated declaration irq_cpustat_t is exactly the same as the asm-generic one. Define ack_bad_irq so the generic header does not emit the generic version of it. Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Reviewed-by: Valentin Schneider Link: https://lore.kernel.org/r/20201113141733.276505871@linutronix.de commit e83694a7b249de63beb1d8b45474b796dce3cd45 Author: Thomas Gleixner Date: Fri Nov 13 15:02:11 2020 +0100 um/irqstat: Get rid of the duplicated declarations irq_cpustat_t and ack_bad_irq() are exactly the same as the asm-generic ones. Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20201113141733.156361337@linutronix.de commit 769dda58d1f647a45270db2f02efe2e2de856709 Author: Thomas Gleixner Date: Fri Nov 13 15:02:10 2020 +0100 irqstat: Get rid of nmi_count() and __IRQ_STAT() Nothing uses this anymore. Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20201113141733.005212732@linutronix.de commit fe3f1d5d7cd3062c0cb8fe70dd77470019dedd19 Author: Thomas Gleixner Date: Fri Nov 13 15:02:09 2020 +0100 sh: Get rid of nmi_count() nmi_count() is a historical leftover and SH is the only user. Replace it with regular per cpu accessors. Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20201113141732.844232404@linutronix.de commit 9f112156f8da016df2dcbe77108e5b070aa58992 Author: Thomas Gleixner Date: Fri Nov 13 15:02:08 2020 +0100 parisc: Remove bogus __IRQ_STAT macro This is a leftover from a historical array based implementation and unused. Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20201113141732.680780121@linutronix.de commit e44cdff05145b84293e3f424daa17e4f3ce0109c Author: Krzysztof Kozlowski Date: Thu Nov 19 17:45:09 2020 +0100 clk: samsung: Allow compile testing of Exynos, S3C64xx and S5Pv210 So far all Exynos, S3C64xx and S5Pv210 clock units were selected by respective SOC/ARCH Kconfig option. On a kernel built for selected SoCs, this allowed to build only limited set of matching clock drivers. However compile testing was not possible in such case as Makefile object depends on SOC/ARCH option. Add separate Kconfig options for each of them to be able to compile test. Link: https://lore.kernel.org/r/20201119164509.754851-1-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski Acked-by: Chanwoo Choi Signed-off-by: Sylwester Nawrocki commit 9ad9a52cce2828d932ae9495181e3d6414f72c07 Author: Nicolas Pitre Date: Wed Nov 11 17:05:10 2020 -0500 i3c/master: introduce the mipi-i3c-hci driver This adds basic support for hardware implementing the MIPI I3C HCI specification. This driver is currently limited by the capabilities of the I3C subsystem, meaning things like scheduled commands, auto-commands and NCM mode are not yet supported. This supports version 1.0 of the MIPI I3C HCI spec, as well as the imminent release of version 1.1. Support for draft version 2.0 of the spec is also largely included with the caveat that future adjustments to this code are likely as the spec is still a work in progress. This is also lightly tested as actual hardware is still very scarce, even for HCI v1.0. Hence the EXPERIMENTAL tag. Further contributions to this driver are expected once vendor implementations and new I3C devices become available. Signed-off-by: Nicolas Pitre Signed-off-by: Boris Brezillon Link: https://lore.kernel.org/linux-i3c/20201111220510.3622216-3-nico@fluxnic.net commit c307912d28cac3ca9c68af55e79c4061e5b1a54c Author: Nicolas Pitre Date: Wed Nov 11 17:05:09 2020 -0500 dt-bindings: i3c: MIPI I3C Host Controller Interface The MIPI I3C HCI (Host Controller Interface) specification defines a common software driver interface to support compliant MIPI I3C host controller hardware implementations from multiple vendors. All that is needed is an I/O area and an interrupt signal;. The hardware is self-advertising wrt its implementor and implemented capabilities so there is currently no details that the driver can't figure out on its own. Signed-off-by: Nicolas Pitre Reviewed-by: Rob Herring Signed-off-by: Boris Brezillon Link: https://lore.kernel.org/linux-i3c/20201111220510.3622216-2-nico@fluxnic.net commit 59165d16c699182b86b5c65181013f1fd88feb62 Author: Qinglang Miao Date: Wed Oct 28 17:15:43 2020 +0800 i3c master: fix missing destroy_workqueue() on error in i3c_master_register Add the missing destroy_workqueue() before return from i3c_master_register in the error handling case. Signed-off-by: Qinglang Miao Signed-off-by: Boris Brezillon Link: https://lore.kernel.org/linux-i3c/20201028091543.136167-1-miaoqinglang@huawei.com commit 9a3a238b3de97b4210c6de66aa88b2d7021ac086 Author: Julian Stecklina Date: Wed Nov 11 18:28:11 2020 +0100 drm/i915/gvt: treat intel_gvt_mpt as const in gvt code The current interface of intel_gvt_register_hypervisor() expects a non-const pointer to struct intel_gvt_mpt, even though the mediator never modifies (or should modifiy) the content of this struct. Change the function signature and relevant struct members to const to properly express the API's intent and allow instances of intel_gvt_mpt to be allocated as const. While I was here, I also made KVM's instance of this struct const to reduce the number of writable function pointers in the kernel. Cc: Zhenyu Wang Cc: intel-gvt-dev@lists.freedesktop.org Reviewed-by: Zhenyu Wang Signed-off-by: Julian Stecklina Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20201111172811.558443-1-julian.stecklina@cyberus-technology.de commit d4a617c9bbef94e4a776901cf12c95eafd54504a Author: Geert Uytterhoeven Date: Tue Nov 17 15:24:47 2020 +0100 ARM: shmobile: Stop using __raw_*() I/O accessors There is no reason to keep on using the __raw_{read,write}l() I/O accessors in Renesas ARM platform code. Switch to using the plain {read,write}l() I/O accessors, to have a chance that this works on big-endian. Suggested-by: Arnd Bergmann Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20201117142447.2205664-1-geert+renesas@glider.be commit 5705747c0c8f90aee5a433a94f58c9ffad8a5a37 Author: Geert Uytterhoeven Date: Tue Nov 17 11:30:22 2020 +0100 ARM: shmobile: sh73a0: Remove obsolete static mapping There are no more users of the statically mapped IOMEM region on SH-Mobile AG5. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201117103022.2136527-8-geert+renesas@glider.be commit a0a6624dbec851ab5c136efbecd87a49617a5cc9 Author: Geert Uytterhoeven Date: Tue Nov 17 11:30:21 2020 +0100 ARM: shmobile: sh73a0: Use ioremap() to map SMP registers Replace using the legacy IOMEM() macro to map various registers related to secondary CPU bringup by ioremap(). Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201117103022.2136527-7-geert+renesas@glider.be commit cc85e21d6d18ffea52eef061f987978153c2aa0a Author: Geert Uytterhoeven Date: Tue Nov 17 11:30:20 2020 +0100 ARM: shmobile: sh73a0: Use ioremap() to map L2C registers Replace using the legacy IOMEM() macro to map the L2C registers by ioremap(). Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201117103022.2136527-6-geert+renesas@glider.be commit 5b0480f53dbfe58b6aa291f462a708f178c4bd40 Author: Geert Uytterhoeven Date: Tue Nov 17 11:30:19 2020 +0100 ARM: shmobile: r8a7779: Remove obsolete static mappings There are no more users of the statically mapped IOMEM regions on R-Car H1. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201117103022.2136527-5-geert+renesas@glider.be commit 617ff9e657c4c4a6ffca325740e36d0d5e1f636e Author: Geert Uytterhoeven Date: Tue Nov 17 11:30:18 2020 +0100 ARM: shmobile: r8a7779: Use ioremap() to map SMP registers Replace using the legacy IOMEM() macro to map the ARM Reset Vector Address Register (AVECR) by ioremap(). Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201117103022.2136527-4-geert+renesas@glider.be commit caf67a935740d7a4e9a7b0a3176237ad22a677e8 Author: Geert Uytterhoeven Date: Tue Nov 17 11:30:17 2020 +0100 ARM: shmobile: r8a7779: Use ioremap() to map INTC2 registers Replace using the legacy IOMEM() macro to map various registers related to INTC2 configuration by ioremap(). Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201117103022.2136527-3-geert+renesas@glider.be commit ae04aad75b3718b84df559bb0352f27695045fe0 Author: Geert Uytterhoeven Date: Tue Nov 17 11:30:16 2020 +0100 ARM: shmobile: r8a7778: Introduce HPBREG_BASE Replace the hardcoded address of the HPB Register block by a macro. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201117103022.2136527-2-geert+renesas@glider.be commit 7ba4a9591a8ac058bf976485975f78128c273800 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:31:44 2020 -0600 pinctrl: renesas: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/da20103af0c22424c5d08a12f7107771bf4c01c5.1605896059.git.gustavoars@kernel.org Signed-off-by: Geert Uytterhoeven commit ffcd7f812dec2f1f27fe73b89c17a04ef6586325 Author: Lad Prabhakar Date: Thu Nov 19 13:09:26 2020 +0000 pinctrl: renesas: r8a77965: Add QSPI[01] pins, groups and functions Add pins, groups and functions for QSPIO[01]. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Link: https://lore.kernel.org/r/20201119130926.25692-5-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 4356497e9eda8ec7dcd095b1ecd947ffe12917aa Author: Lad Prabhakar Date: Thu Nov 19 13:09:25 2020 +0000 pinctrl: renesas: r8a7796: Add QSPI[01] pins, groups and functions Add pins, groups and functions for QSPIO[01]. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Link: https://lore.kernel.org/r/20201119130926.25692-4-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 590567bf6f6d989ba9d0fc406282d7a18cf5fa96 Author: Lad Prabhakar Date: Thu Nov 19 13:09:24 2020 +0000 pinctrl: renesas: r8a77951: Add QSPI[01] pins, groups and functions Add pins, groups and functions for QSPIO[01]. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Link: https://lore.kernel.org/r/20201119130926.25692-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 89ad953e1e727640e85beb82db3c71d45a59b177 Author: Lad Prabhakar Date: Thu Nov 19 13:09:23 2020 +0000 pinctrl: renesas: r8a77990: Add QSPI[01] pins, groups and functions Add pins, groups and functions for QSPIO[01]. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Link: https://lore.kernel.org/r/20201119130926.25692-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 20425f6319480e84f48261fc7c0e4ce61a6d333e Author: Kevin Hilman Date: Wed Nov 18 11:14:05 2020 -0800 clk: meson: enable building as modules Make it possible to build all clk drivers as modules, but default remains built-in. No functional changes. Signed-off-by: Kevin Hilman Signed-off-by: Jerome Brunet Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/20201118191405.36798-1-khilman@baylibre.com commit bae69bfa3a586493469078ec4ca35499b754ba5c Author: Kevin Hilman Date: Wed Nov 18 11:09:30 2020 -0800 clk: meson: Kconfig: fix dependency for G12A When building only G12A, ensure that VID_PLL_DIV clock driver is selected, otherwise results in this build error: ERROR: modpost: "meson_vid_pll_div_ro_ops" [drivers/clk/meson/g12a.ko] undefined! Fixes: 085a4ea93d54 ("clk: meson: g12a: add peripheral clock controller") Signed-off-by: Kevin Hilman Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20201118190930.34352-1-khilman@baylibre.com commit e80d8510ffef3a9d2b2ce15882f5fd004d1e1645 Author: Neil Armstrong Date: Tue Sep 15 14:45:53 2020 +0200 clk: meson: axg: add MIPI DSI Host clock This adds the MIPI DSI Host clock, used to measure the signal timings (ENC VSYNC or DW-MIPI-DSI eDPI timings). Signed-off-by: Neil Armstrong Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20200915124553.8056-5-narmstrong@baylibre.com commit 14ebb3154b8f3d562cb18331b08ff1a22609ae59 Author: Neil Armstrong Date: Tue Sep 15 14:45:52 2020 +0200 clk: meson: axg: add Video Clocks Add the clocks entries used in the video clock path, the clock path is doubled to permit having different synchronized clocks for different parts of the video pipeline. The AXG only has a single ENCL CTS clock and even if VCLK exist along VCLK2, only VCLK2 is used since it clocks the MIPI DSI IP directly. All dividers are flagged with CLK_GET_RATE_NOCACHE, and all gates are flagged with CLK_IGNORE_UNUSED since they are currently directly handled by the Meson DRM Driver. Once the DRM Driver is fully migrated to using the Common Clock Framework to handle the video clock tree, the CLK_GET_RATE_NOCACHE and CLK_IGNORE_UNUSED will be dropped. Signed-off-by: Neil Armstrong Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20200915124553.8056-4-narmstrong@baylibre.com commit f069e7e752dbb5b69c919ed3eb1c3cfff780fc42 Merge: e6fb7aee486c7 cd3caa573ebd1 Author: Jerome Brunet Date: Mon Nov 23 09:07:51 2020 +0100 Merge branch 'v5.11/headers' into integ commit cd3caa573ebd1f32727962cf7dead43f5144d080 Author: Neil Armstrong Date: Tue Sep 15 14:45:51 2020 +0200 dt-bindings: clk: axg-clkc: add MIPI DSI Host clock binding Add the clock ID for the MIPI DSI Host clock. Signed-off-by: Neil Armstrong Signed-off-by: Jerome Brunet Acked-by: Rob Herring Link: https://lore.kernel.org/r/20200915124553.8056-3-narmstrong@baylibre.com commit b5330c565e4e481df579f602246073ecee265bc6 Author: Neil Armstrong Date: Tue Sep 15 14:45:50 2020 +0200 dt-bindings: clk: axg-clkc: add Video Clocks Add clock IDs for the video clocks. Signed-off-by: Neil Armstrong Signed-off-by: Jerome Brunet Acked-by: Rob Herring Link: https://lore.kernel.org/r/20200915124553.8056-2-narmstrong@baylibre.com commit 3b3e23092449a57f4ba57cd60506ab14055b1642 Merge: 660beb0ffdc9f 418baf2c28f34 Author: Greg Kroah-Hartman Date: Mon Nov 23 08:25:08 2020 +0100 Merge 5.10-rc5 into tty-next We need the tty/serial fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 03c1136af504bbc2cabda76af6b27fd5f7cf8a7d Merge: 0d79a48440f55 418baf2c28f34 Author: Greg Kroah-Hartman Date: Mon Nov 23 08:21:37 2020 +0100 Merge 5.10-rc5 into staging-testing We want the staging/IIO fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 98fd9972ed60d26915227a8c7febbd86e262a96b Author: Dmitry Osipenko Date: Mon Nov 23 03:27:15 2020 +0300 PM / devfreq: tegra20: Deprecate in a favor of emc-stat based driver Remove tegra20-devfreq in order to replace it with a EMC_STAT based devfreq driver. Previously we were going to use MC_STAT based tegra20-devfreq driver because EMC_STAT wasn't working properly, but now that problem is resolved. This resolves complications imposed by the removed driver since it was depending on both EMC and MC drivers simultaneously. Acked-by: Chanwoo Choi Signed-off-by: Dmitry Osipenko Signed-off-by: Chanwoo Choi commit f7bda6662fd4f39113b4dee00f7ded44f846b7f4 Author: Gustavo A. R. Silva Date: Sun Nov 22 22:15:43 2020 -0800 Input: libps2 - fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by replacing a /* Fall through */ comment with the new pseudo-keyword macro fallthrough. Notice that Clang doesn't recognize /* Fall through */ comments as implicit fall-through markings. Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/d2944854e3e118b837755abf4cbdb497662001b7.1605896060.git.gustavoars@kernel.org Signed-off-by: Dmitry Torokhov commit e9a710bc8d90cc8044b4082c2919b0663043c7ed Author: Gustavo A. R. Silva Date: Sun Nov 22 22:15:30 2020 -0800 Input: pcspkr - fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of just letting the code fall through to the next case. Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/4b659e3e65f2fa3c8bb7ed153e2016c3fb395bbc.1605896059.git.gustavoars@kernel.org Signed-off-by: Dmitry Torokhov commit 59bbf83835f591b95c3bdd09d900f3584fa227af Author: Zhang Qilong Date: Fri Nov 20 16:36:49 2020 -0800 Input: omap4-keypad - fix runtime PM error handling In omap4_keypad_probe, the patch fix several bugs. 1) pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to pm_runtime_put_noidle will result in reference leak. 2) In err_unmap, forget to disable runtime of device, pm_runtime_enable will increase power disable depth. Thus a pairing decrement is needed on the error handling path to keep it balanced. 3) In err_pm_disable, it will call pm_runtime_put_sync twice not one time. To fix this we factor out code reading revision and disabling touchpad, and drop PM reference once we are done talking to the device. Fixes: f77621cc640a7 ("Input: omap-keypad - dynamically handle register offsets") Fixes: 5ad567ffbaf20 ("Input: omap4-keypad - wire up runtime PM handling") Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20201120133918.2559681-1-zhangqilong3@huawei.com Signed-off-by: Dmitry Torokhov commit 0af104d729614de44c8eb5069353c8985cb17442 Author: Rikard Falkeborn Date: Mon Nov 23 00:28:18 2020 +0100 soc: qcom: pdr: Constify static qmi structs Their only usage is to pass their address to qmi_handle_init() which accepts const pointers to both qmi_ops and qmi_msg_handler. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20201122232818.32072-1-rikard.falkeborn@gmail.com Signed-off-by: Bjorn Andersson commit 26664c593adc047da121e9c78f706fefac77b132 Author: Matthias Kaehlcke Date: Wed Nov 11 12:03:43 2020 -0800 arm64: dts: qcom: sc7180: Set 'polling-delay-passive' for thermal zones back to 250 ms Commit 22337b91022d ("arm64: dts: qcom: sc7180: Changed polling mode in Thermal-zones node") sets both 'polling-delay' and 'polling-delay-passive' to zero with the rationale that TSENS interrupts are enabled. A TSENS interrupt fires when the temperature of a thermal zone reaches a trip point, which makes regular polling below the passive trip point temperature unnecessary. However the situation is different when passive cooling is active, regular polling is still needed to trigger a periodic evaluation of the thermal zone by the thermal governor. Change 'polling-delay-passive' back to the original value of 250 ms. Commit 2315ae70af95 ("arm64: dts: qcom: sc7180: Add gpu cooling support") recently changed the value for the GPU thermal zones from zero to 100 ms, also set it to 250 ms for uniformity. If some zones really need different values these can be changed in dedicated patches. Reviewed-by: Douglas Anderson Fixes: 22337b91022d ("arm64: dts: qcom: sc7180: Changed polling mode in Thermal-zones node") Signed-off-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/20201111120334.1.Ifc04ea235c3c370e3b21ec3b4d5dead83cc403b4@changeid Signed-off-by: Bjorn Andersson commit 4e8692c2ee3d4ac6b669f7e306364d77a574c810 Author: Nikita Travkin Date: Fri Nov 13 22:59:17 2020 +0500 arm64: dts: qcom: msm8916-samsung-a2015: Disable muic i2c pin bias Some versions of the firmware leave i2c gpios in a wrong state. Add pinctrl that disables pin bias since external pull-up resistors are present. Reviewed-by: Stephan Gerhold Fixes: 1329c1ab0730 ("arm64: dts: qcom: Add device tree for Samsung Galaxy A3U/A5U") Signed-off-by: Nikita Travkin Link: https://lore.kernel.org/r/20201113175917.189123-6-nikitos.tr@gmail.com Signed-off-by: Bjorn Andersson commit 38260b9e6310505f984bf3e026f4a4b6682c3526 Author: Nikita Travkin Date: Fri Nov 13 22:59:16 2020 +0500 arm64: dts: qcom: msm8916-longcheer-l8150: Add notification LED L8150 uses aw2013 LED contriller for notification LED on the front of the device. Add it to the device tree Reviewed-by: Stephan Gerhold Signed-off-by: Nikita Travkin Link: https://lore.kernel.org/r/20201113175917.189123-5-nikitos.tr@gmail.com Signed-off-by: Bjorn Andersson commit 6b4ad4be646994e7e8c5707c87cc38725fd31e1b Author: Nikita Travkin Date: Fri Nov 13 22:59:15 2020 +0500 arm64: dts: qcom: msm8916-longcheer-l8150: Add flash LED L8150 uses SGM3785 Flash LED driver. It is similar to SGM3140 but can also be controlled with PWM. Since SoC doesn't have PWM, add led to the device tree using sgm3140 driver. Reviewed-by: Stephan Gerhold Signed-off-by: Nikita Travkin Link: https://lore.kernel.org/r/20201113175917.189123-4-nikitos.tr@gmail.com Signed-off-by: Bjorn Andersson commit 6bd2cae7ddd6e7b454d4d8267d9a8952856f8283 Author: Nikita Travkin Date: Fri Nov 13 22:59:14 2020 +0500 arm64: dts: msm8916-longcheer-l8150: Add position sensors L8150 has: - BMC156 accelerometer and magnetic sensor - BMG160 gyroscope sensor Add them to the device tree. Reviewed-by: Stephan Gerhold Signed-off-by: Nikita Travkin Link: https://lore.kernel.org/r/20201113175917.189123-3-nikitos.tr@gmail.com Signed-off-by: Bjorn Andersson commit 6eb815289a3794264eee597c2daa311e051ff6fc Author: Nikita Travkin Date: Fri Nov 13 22:59:13 2020 +0500 arm64: dts: msm8916-longcheer-l8150: Add touchscreen L8150 has RMI4 compatible Synaptics touchscreen on blsp_i2c5. It is powered by fixed regulator. Add both to the device tree. Reviewed-by: Stephan Gerhold Signed-off-by: Nikita Travkin Link: https://lore.kernel.org/r/20201113175917.189123-2-nikitos.tr@gmail.com Signed-off-by: Bjorn Andersson commit 0af8bbdb6bb83b2b3cf0d005f1cfff5afe75c7c1 Author: Nikita Travkin Date: Fri Nov 13 22:59:12 2020 +0500 arm64: dts: qcom: msm8916-longcheer-l8150: Enable PM8916 vibrator L8150 has a vibrator connected to PM8916. Add it to the device tree. Reviewed-by: Stephan Gerhold Signed-off-by: Nikita Travkin Link: https://lore.kernel.org/r/20201113175917.189123-1-nikitos.tr@gmail.com Signed-off-by: Bjorn Andersson commit e76be113d4a72573b8d892ca65642e5f171a1f81 Author: Michael Srba Date: Sun Nov 15 20:50:58 2020 +0100 arm64: dts: qcom: msm8916-samsung-a3u: add nodes for touchscreen This patch wires up touchscreen support on Samsung Galaxy A3 2015. Reviewed-by: Stephan Gerhold Signed-off-by: Michael Srba Link: https://lore.kernel.org/r/20201115195058.27097-1-michael.srba@seznam.cz Signed-off-by: Bjorn Andersson commit fee5dc31a588fffa543f3dfaaeebed55263b4ad2 Author: Stephen Boyd Date: Fri Nov 20 10:38:25 2020 -0800 arm64: dts: qcom: sc7180: Add prox sensor to LTE sku Lazor boards There's a proximity sensor on Lazor devices, but only for LTE SKUs. Enable it only on the Lazor LTE SKUs and also configure it properly so it works. Cc: Douglas Anderson Cc: Matthias Kaehlcke Reviewed-by: Douglas Anderson Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20201120183825.547310-1-swboyd@chromium.org Signed-off-by: Bjorn Andersson commit d5276bfa0ca6af7f65896c222b1b60493d189f27 Author: Stephen Boyd Date: Fri Nov 20 12:09:13 2020 -0800 arm64: dts: qcom: sc7180: Remove double pull-up on p-sensor-int-l This interrupt has an external pull-up so we don't need to pull it up again. Drop the internal pull here. Note I don't think this really changes anything, just noticed while looking at this irq pin. Reviewed-by: Douglas Anderson Cc: Douglas Anderson Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20201120200913.618274-1-swboyd@chromium.org Signed-off-by: Bjorn Andersson commit 256958086de9f06291042b106b05804a450d5e8e Author: Jonathan Marek Date: Tue Sep 8 09:15:00 2020 -0400 arm64: dts: qcom: add sm8250 fastrpc nodes Add fastrpc nodes for sDSP, cDSP, and aDSP. Signed-off-by: Jonathan Marek Link: https://lore.kernel.org/r/20200908131500.19891-1-jonathan@marek.ca Signed-off-by: Bjorn Andersson commit 52c90664f122eee2509dee934499b561b1a8959f Author: Manivannan Sadhasivam Date: Thu Sep 17 13:56:22 2020 +0530 arm64: dts: qcom: qrb5165-rb5: Add USB support RB5 makes use of the two USB controllers onboard. USB0 is connected to the Type C port and USB1 is connected to USB3.1 HUB which exposes following downstream ports: * 2 Type A ports * 2 HS/SS ports on the expansion connector * USB to LAN device Hence, enable these two controllers with the required PHYs. Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20200917082622.6823-4-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit 65389ce636241c1226fa03b553f32c9ba178d549 Author: Manivannan Sadhasivam Date: Mon Sep 21 12:28:06 2020 +0530 arm64: dts: qcom: sm8250: Add support for PRNG EE RNG (Random Number Generator) in SM8250 features PRNG EE (Execution Environment), hence add devicetree support for it. Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20200921065806.10928-1-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit d371a931540bc36fd1199de3ec365a1187b7b282 Author: Dmitry Baryshkov Date: Wed Sep 30 14:21:33 2020 +0300 arm64: dts: qcom: sm8250: correct compatible for sm8250-mtp Qualcomm boards should define two compatible strings: one for board, anoter one for SoC family. sm8250-mtp.dts lists just the board compatible, which makes it incompatible with qcom.yaml schema. Reviewed-by: Vinod Koul Signed-off-by: Dmitry Baryshkov Fixes: 60378f1a171e ("arm64: dts: qcom: sm8250: Add sm8250 dts file") Link: https://lore.kernel.org/r/20200930112133.2091505-1-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 8530939383f5770120cbdb107393012d4239654e Author: Dmitry Baryshkov Date: Sat Oct 10 16:21:25 2020 +0300 arm64: dts: qcom: sm8250: add iommus entry to QUP nodes Enable IOMMUs configuration for QUP nodes to stop SM8250 boards from rebooting when using I2C DMA transfers. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20201010132125.416064-1-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 53a8ccf1c7e5c901342f7dcf43bb7ddb6027984b Author: Manivannan Sadhasivam Date: Wed Oct 28 22:09:55 2020 +0300 arm64: dts: qcom: rb5: Add support for uSD card Add support for uSD card on RB5 using the SDHC2 interface. Signed-off-by: Manivannan Sadhasivam [DB: disabled 1.8V support to get SDHC to work] Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20201028190955.1264526-2-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit c4cf0300be84c2233ffa1b7516be66b167bc81f5 Author: Manivannan Sadhasivam Date: Wed Oct 28 22:09:54 2020 +0300 arm64: dts: qcom: sm8250: Add support for SDC2 Add support for SDC2 which can be used to interface uSD card. Signed-off-by: Manivannan Sadhasivam [DB: minor fixes: clocks, iommus, opps] Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20201028190955.1264526-1-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 91ed0e90fc491b427aa50eaa8efb40090355153a Author: Jonathan Marek Date: Tue Jun 9 15:40:26 2020 -0400 arm64: dts: qcom: add sm8250 hdk dts Add initial HDK865 dts, based on sm8250-mtp, with a few changes. Notably, regulator configs are changed a bit. Signed-off-by: Jonathan Marek Link: https://lore.kernel.org/r/20200609194030.17756-9-jonathan@marek.ca Signed-off-by: Bjorn Andersson commit 0ab1b2d10afe60178e82cdde3ab7f3d5f458b8f7 Author: Jonathan Marek Date: Tue Jun 9 15:40:25 2020 -0400 arm64: dts: qcom: add sm8150 hdk dts Add initial HDK855 dts, based on sm8150-mtp, with a few changes. Signed-off-by: Jonathan Marek Link: https://lore.kernel.org/r/20200609194030.17756-8-jonathan@marek.ca Signed-off-by: Bjorn Andersson commit 46a6f297d7dd62ddf03aaf2882f73a6ba20f99d1 Author: Jonathan Marek Date: Tue Jun 9 15:40:24 2020 -0400 arm64: dts: qcom: sm8250: Add USB and PHY device nodes Add device nodes for the USB3 controller, QMP SS PHY and SNPS HS PHY. Signed-off-by: Jonathan Marek Link: https://lore.kernel.org/r/20200609194030.17756-7-jonathan@marek.ca Signed-off-by: Bjorn Andersson commit 0c9dde0d201548d2297a8cd8d7eac25c76b875ef Author: Jonathan Marek Date: Tue Jun 9 15:40:23 2020 -0400 arm64: dts: qcom: sm8150: Add secondary USB and PHY nodes Add dts nodes for the secondary USB controller and related PHY nodes. Signed-off-by: Jonathan Marek Link: https://lore.kernel.org/r/20200609194030.17756-6-jonathan@marek.ca Signed-off-by: Bjorn Andersson commit 04295bc3362d4e4259cc48128c89657735768fbc Author: Gustavo A. R. Silva Date: Fri Nov 20 12:40:38 2020 -0600 video: fbdev: pm2fb: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a fallthrough pseudo-keyword. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/0eedb3972a0032da4997a2a47cf0665fbe9c56ca.1605896060.git.gustavoars@kernel.org commit 2c3a1e49696fd05b52ec5eeb7c006ac32724c915 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:40:32 2020 -0600 video: fbdev: lxfb_ops: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/9c1dcb12aae7c7ff0907ffb99ffd227656cbe444.1605896060.git.gustavoars@kernel.org commit 0b08d08ddfb6e45a319084594f586003de08351c Author: Gustavo A. R. Silva Date: Fri Nov 20 12:35:54 2020 -0600 drm/via: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/c21a588bf9e222826f6b138db91de26a2b21df33.1605896060.git.gustavoars@kernel.org commit 8ce9daf8856df41c7c4f217e26bf33afa554e116 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:35:17 2020 -0600 drm: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/111e9d3d55c686892357aa5269022024b4d48330.1605896059.git.gustavoars@kernel.org commit 8c41245872e206ec932c24d1fd63f8ff054e9855 Author: Jonathan Cameron Date: Sat Oct 31 18:48:38 2020 +0000 dt-bindings:iio:adc:renesas,rcar-gyroadc: txt to yaml conversion. This is a somewhat unusual device, in that it effectively does spi offload. That means that it doesn't act as a full SPI master, but supports some functionality. As such it supports a subset of specific SPI ADCs. There is potential for a future clash in bindings, but as these are simple devices hopefully that will not occur. One addition to this from testing it against existing dts files was to add a resets property. This is specified in arch/arm/boot/dts/r8a7791.dtsi If it's the dtsi that is wrong and not the binding doc, then we can fix that instead. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Marek Vasut Link: https://lore.kernel.org/r/20201031184854.745828-31-jic23@kernel.org commit 58ff1b519753b48d18bcde16c90740ea0a182b82 Author: Jonathan Cameron Date: Sat Oct 31 18:48:36 2020 +0000 dt-bindings:iio:adc:atmel,sama5d2-adc: txt to yaml conversion Whilst this binding has a lot of elements they are all fairly standard. Hence pretty much direct txt to yaml line by line conversion. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Ludovic Desroches Cc: Eugen Hristev Link: https://lore.kernel.org/r/20201031184854.745828-29-jic23@kernel.org commit f383069be33e3f86334804950df7baa0b811f77b Author: Jonathan Cameron Date: Sat Oct 31 18:48:35 2020 +0000 dt-bindings:iio:magnetometer:pni,rm3100: txt to yaml conversion. Simple binding format conversion. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Song Qiang Link: https://lore.kernel.org/r/20201031184854.745828-28-jic23@kernel.org commit e3811190acf85c63518fbddaa28bcbfab2baa58d Author: Cristian Marussi Date: Thu Nov 19 17:49:06 2020 +0000 firmware: arm_scmi: Add SCMI v3.0 sensor notifications Add support for new SCMI v3.0 SENSOR_UPDATE notification. Link: https://lore.kernel.org/r/20201119174906.43862-7-cristian.marussi@arm.com Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 7b83c5f41088987d04e24c3af0e1fb9f43b747b5 Author: Cristian Marussi Date: Thu Nov 19 17:49:05 2020 +0000 firmware: arm_scmi: Add SCMI v3.0 sensor configuration support Add SCMI v3.0 sensor support for CONFIG_GET/CONFIG_SET commands. Link: https://lore.kernel.org/r/20201119174906.43862-6-cristian.marussi@arm.com Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit e2083d36739168f7b612312160cf7bb45b251408 Author: Cristian Marussi Date: Thu Nov 19 17:49:04 2020 +0000 firmware: arm_scmi: Add SCMI v3.0 sensors timestamped reads Add new .reading_get_timestamped() method to sensor_ops to support SCMI v3.0 timestamped reads. Link: https://lore.kernel.org/r/20201119174906.43862-5-cristian.marussi@arm.com Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit d7971d57d2737002dc0ef2f9d9c9494184d41348 Author: Cristian Marussi Date: Thu Nov 19 17:49:03 2020 +0000 hwmon: (scmi) Update hwmon internal scale data type Use an int to calculate scale values inside scmi_hwmon_scale() to match the updated scale data type in struct scmi_sensor_info. Link: https://lore.kernel.org/r/20201119174906.43862-4-cristian.marussi@arm.com Cc: linux-hwmon@vger.kernel.org Acked-by: Guenter Roeck Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 2bb6f3e8d861413031f513b83a98735b55f413a0 Author: Jonathan Cameron Date: Sat Oct 31 18:48:34 2020 +0000 dt-bindings:iio:magnetometer:honeywell,hmc5843: txt to yaml format conversion Mostly a straight conversion, but the txt file had an oddity. It documented a gpios property for what appeared to be in interrupt line. There are mainline dts that have this as interrupts, so I've converted it to that. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Neil Brown Link: https://lore.kernel.org/r/20201031184854.745828-27-jic23@kernel.org commit ab6eeb9c76b2e1584714d5a5ebfcc6d9d5a4c47c Author: Jonathan Cameron Date: Sat Oct 31 18:48:33 2020 +0000 dt-bindings:iio:magnetometer:bosch,bmc150_magn: txt to yaml conversion. This describes the bindings for both stand along magnetometers and ones which form part of a multi chip package. Given original author hasn't been active remotely recently I've put myself as maintainer for this one. I would of course like to hand this over to someone more appropriate so shout out if this is you! Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201031184854.745828-26-jic23@kernel.org commit 63d147d4c0c5240b012d694fa727c6e61e0eceaa Author: Jonathan Cameron Date: Sat Oct 31 18:48:32 2020 +0000 dt-bindings:iio:magnetometer:asahi-kasei,ak8974: txt to yaml format conversion Simple conversion. I have pruned descriptions that did not add much useful detail. Note that the mount-matrix description will form part of a generic IIO binding. No need to repeat that in every driver that uses it. Signed-off-by: Jonathan Cameron Reviewed-by: Linus Walleij Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201031184854.745828-25-jic23@kernel.org commit a7d6eb9dbb835f9c2bf6c75881bf163772a0ba9f Author: Jonathan Cameron Date: Sat Oct 31 18:48:31 2020 +0000 dt-bindings:iio:magnetometer:fsl,mag3110: txt to yaml conversion Dropped a few bits of help text in here that didn't seem to add anything that wasn't fairly obvious. Otherwise simple format conversion Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Anson Huang Link: https://lore.kernel.org/r/20201031184854.745828-24-jic23@kernel.org commit 2d948d057558cea0ebec82f4cf6e6dd1fa1c6d65 Author: Jonathan Cameron Date: Sat Oct 31 18:48:30 2020 +0000 dt-bindings:iio:light:st,vl6180: txt to yaml format conversion. I'm not sure anyone would use this part primarily as an ALS, given the time of flight laser also present, but I'll stick with the original decision on where to put the binding. Added interrupts property as the device has a GPIO interrupt even if the driver is not currently using it. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Acked-by: Manivannan Sadhasivam Cc: Manivannan Sadhasivam Cc: Peter Meerwald-Stadler Link: https://lore.kernel.org/r/20201031184854.745828-23-jic23@kernel.org commit de4dc0221cff114b2d3fdcc3d038c966ab3943b1 Author: Jonathan Cameron Date: Sat Oct 31 18:48:29 2020 +0000 dt-bindings:iio:light:vishay,vcnl4035: txt to yaml conversion Only significant change in here was dropping the statement that the i2c address should be 60. The datasheet suggests there are variants available with several different addresses. Parthiban's email address is bouncing, so I've listed myself as maintainer for this one until someone else steps up. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201031184854.745828-22-jic23@kernel.org commit 52a04bfbc9f29e42c6a539bfadb27e888f7bfcdc Author: Jonathan Cameron Date: Sat Oct 31 18:48:28 2020 +0000 dt-bindings:iio:light:st,uvis25: txt to yaml conversion for this UV sensor For the example, node name is uv-sensor because the standard option of light-sensor seemed a little too generic for this. This one could have just been moved to trivial-devices.yaml but for now I have kept it as a separate doc. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Lorenzo Bianconi Link: https://lore.kernel.org/r/20201031184854.745828-21-jic23@kernel.org commit 6032afbdfb6164cfacd0721381b0802fabf64df9 Author: Jonathan Cameron Date: Sat Oct 31 18:48:27 2020 +0000 dt-bindings:iio:light:upisemi,us51882: txt to yaml conversion. I don't have an up to date address for Adriana Reus so I've put myself as the binding maintainer for this one. I'm happy to hand over to Adriana or anyone else who wants take it on! This has a lot of optional tuning parameters. The docs are modified to try and put the default values in the description of each one rather than a forwards reference to the example. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201031184854.745828-20-jic23@kernel.org commit 23205227b79958cbc13f032d3e8ead6ab1e84d65 Author: Jonathan Cameron Date: Sat Oct 31 18:48:26 2020 +0000 dt-bindings:iio:light:ti,opt3001: txt to yaml conversion Straight forward format conversion of this simple binding. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Andreas Dannenberg Link: https://lore.kernel.org/r/20201031184854.745828-19-jic23@kernel.org commit 8b38b180f13df35389f2172070b5f50c2ee40b7f Author: Jonathan Cameron Date: Sat Oct 31 18:48:25 2020 +0000 dt-bindings:iio:light:maxim,max44009: txt to yaml conversion. Straight forward format conversion. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Robert Eshleman Link: https://lore.kernel.org/r/20201031184854.745828-18-jic23@kernel.org commit 787f6145ed63d0927c6ad8d55a72e3b715bb70c6 Author: Jonathan Cameron Date: Sat Oct 31 18:48:24 2020 +0000 dt-bindings:iio:light:sharp,gp2ap020a00f: txt to yaml conversion. Simple conversion. Jacek's email bounced, by Kyungmin's still seems good so just dropped Jacek from maintainer list. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Kyungmin Park Link: https://lore.kernel.org/r/20201031184854.745828-17-jic23@kernel.org commit b8a8dab1dbe7bbd63a25afeddf7a3fe8780fa53d Author: Jonathan Cameron Date: Sat Oct 31 18:48:23 2020 +0000 dt-bindings:iio:light:capella,cm36651: txt to yaml conversion. Straight forward conversion with no changes beyond the node name in the example Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Beomho Seo Link: https://lore.kernel.org/r/20201031184854.745828-16-jic23@kernel.org commit c10fe4474d363423bcfbf5c7b4121710df23181c Author: Jonathan Cameron Date: Sat Oct 31 18:48:22 2020 +0000 dt-bindings:iio:light:avago,apds9960: txt to yaml conversion Very simple binding that we could move into trivial-devices.yaml with a small loss of documentation. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Acked-by: Matt Ranostay Link: https://lore.kernel.org/r/20201031184854.745828-15-jic23@kernel.org commit e24ed929d1490cac513f9779c7251930992ea095 Author: Jonathan Cameron Date: Sat Oct 31 18:48:21 2020 +0000 dt-bindings:iio:light:avago,apds9300: txt to yaml conversion. This could have gone in trivial-devices.yaml, but there was a datasheet link so I've given it a minimal file of it's own. Very simple binding and so a very simple conversion. Oleksandr's email address is bouncing so I've put myself as fallback maintainer until someone else steps forward. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201031184854.745828-14-jic23@kernel.org commit 7a2cf8e91390e88142bf3d82ad22e331ff2c5b0f Author: Jonathan Cameron Date: Sat Oct 31 18:48:20 2020 +0000 dt-bindings:iio:imu:st,lsm6dsx: txt to yaml conversion Straight forward conversion, but there are a few generic properties in here like wakeup-source which should probably have schema in a more generic location. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Lorenzo Bianconi Link: https://lore.kernel.org/r/20201031184854.745828-13-jic23@kernel.org commit 3ead692b7548afee81ae3370876593334b9e3cf1 Author: Jonathan Cameron Date: Sat Oct 31 18:48:19 2020 +0000 dt-bindings:iio:imu:adi,adis16480: txt to yaml conversion Alexandru is currently listed as maintainer on basis of last person to touch the binding. Whilst the driver only uses one interrupt, the hardware can route events to one and dataready signal to the other so we should allow for either 1 or 2 interrupts. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Alexandru Ardelean Link: https://lore.kernel.org/r/20201031184854.745828-12-jic23@kernel.org commit 5a6a65b11e3ae5afc9e256fd294c765399a941b0 Author: Jonathan Cameron Date: Sat Oct 31 18:48:18 2020 +0000 dt-bindings:iio:health:maxim,max30102: txt to yaml conversion Straight forward binding. Title was a bit of a challenge to keep short as this binding covers sensors for two entirely different purposes. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Acked-by: Matt Ranostay Cc: Matt Ranostay Link: https://lore.kernel.org/r/20201031184854.745828-11-jic23@kernel.org commit f0c49ea47e2cd4aae5c0ded4af50691bdcefe35b Author: Jonathan Cameron Date: Sat Oct 31 18:48:17 2020 +0000 dt-bindings:iio:health:maxim,max30100: txt to yaml conversion Straight forward conversion. As with other bindings I've dropped any standrd description, but kept the unusual bits, in thisscase the maxim,led-current-microamp and it's description. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Acked-by: Matt Ranostay Link: https://lore.kernel.org/r/20201031184854.745828-10-jic23@kernel.org commit b9c320157ce3db813eaa9f0c900a33a9b7cc60a6 Author: Jonathan Cameron Date: Sat Oct 31 18:48:14 2020 +0000 dt-bindings:iio:samsung,sensorhub-rinato: yaml conversion Renamed to be more specific as I would be surprised if this is the only sensorhub Samsung have ever shipped. Fixed missing reg property in the example Karol's email address from original patch is bouncing, so I've put myself as maintainer until someone else steps up. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201031184854.745828-7-jic23@kernel.org commit f97cee494dc92395a668445bcd24d34c89f4ff8c Author: Jonathan Cameron Date: Sat Oct 31 18:48:13 2020 +0000 dt-bindings:iio:impedance-analyzer:adi,ad5933 yaml conversion. The example in this one had a completely wrong compatible so I've fixed that. Otherwise, a fairly simple conversion. Note the driver itself is still in staging. Looking back at the last discussion around this, I think we were just waiting for some test results on some refactors. As such the binding should be stable even if the driver might need a little more love and attention. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Marcelo Schmitt Cc: Gabriel Capella Cc: Alexandru Ardelean Link: https://lore.kernel.org/r/20201031184854.745828-6-jic23@kernel.org commit 818ede057c60bcaa5d89bc320d48d695f71af66b Author: Jonathan Cameron Date: Sat Oct 31 18:48:12 2020 +0000 dt-bindings:iio:potentiometer:microchip,mcp41010 txt to yaml conversion A simple binding that I almost just move to trivial devices. The small amount of additional documentation and relatively large number of compatible entries convinced me to suggest we keep this one separately documented. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Chris Coffey Link: https://lore.kernel.org/r/20201031184854.745828-5-jic23@kernel.org commit 05c6330c4347bbaab75a2f362768180502bc32c2 Author: Jonathan Cameron Date: Sat Oct 31 18:48:10 2020 +0000 dt-bindings:iio:potentiometer:adi,ad5272 yaml conversion Simple direct conversion from txt to yaml as part of a general aim of converting all IIO bindings to this machine readable format. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Reviewed-by: Phil Reid Cc: Phil Reid Link: https://lore.kernel.org/r/20201031184854.745828-3-jic23@kernel.org commit 9a7dc81714c5eeb9bc6ab2b73c4389adacffb1da Author: Jonathan Cameron Date: Sat Oct 31 18:48:11 2020 +0000 dt-bindings:iio:potentiometer:microchip,mcp4131 txt to yaml conversion This binding is very simple, but I think the very large number of compatible values make it unsuitable for moving to trivial-devices.yaml. Main change in the conversion was reordering the compatible list to numerical order. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Reviewed-by: Slawomir Stepien Link: https://lore.kernel.org/r/20201031184854.745828-4-jic23@kernel.org commit e7bae9bbc2674a03ca89143e677bcb400b37c739 Author: Jonathan Cameron Date: Sat Oct 31 18:48:09 2020 +0000 dt-bindings:iio:resolver:adi,ad2s90: Conversion of binding to yaml. Simple binding with a good description of why the spi-max-frequency is, in practice not as high as the datasheet implies. I've set the maximum as per the value established in the description. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Matheus Tavares Cc: Alexandru Ardelean Link: https://lore.kernel.org/r/20201031184854.745828-2-jic23@kernel.org commit d963ab0f15fb0797ddd65b2653f3d65c2d7a08ec Author: John Stultz Date: Sat Nov 21 23:50:02 2020 +0000 dma-buf: system_heap: Allocate higher order pages if available While the system heap can return non-contiguous pages, try to allocate larger order pages if possible. This will allow slight performance gains and make implementing page pooling easier. Cc: Sumit Semwal Cc: Liam Mark Cc: Laura Abbott Cc: Brian Starkey Cc: Hridya Valsaraju Cc: Suren Baghdasaryan Cc: Sandeep Patil Cc: Daniel Mentz Cc: Chris Goldsworthy Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Reviewed-by: Brian Starkey Signed-off-by: John Stultz Signed-off-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20201121235002.69945-6-john.stultz@linaro.org commit 4c68e499bb9d6d9ec3e18fcb2f68641abb22464a Author: John Stultz Date: Sat Nov 21 23:50:01 2020 +0000 dma-buf: heaps: Skip sync if not mapped This patch is basically a port of Ørjan Eide's similar patch for ION https://lore.kernel.org/lkml/20200414134629.54567-1-orjan.eide@arm.com/ Only sync the sg-list of dma-buf heap attachment when the attachment is actually mapped on the device. dma-bufs may be synced at any time. It can be reached from user space via DMA_BUF_IOCTL_SYNC, so there are no guarantees from callers on when syncs may be attempted, and dma_buf_end_cpu_access() and dma_buf_begin_cpu_access() may not be paired. Since the sg_list's dma_address isn't set up until the buffer is used on the device, and dma_map_sg() is called on it, the dma_address will be NULL if sync is attempted on the dma-buf before it's mapped on a device. Before v5.0 (commit 55897af63091 ("dma-direct: merge swiotlb_dma_ops into the dma_direct code")) this was a problem as the dma-api (at least the swiotlb_dma_ops on arm64) would use the potentially invalid dma_address. How that failed depended on how the device handled physical address 0. If 0 was a valid address to physical ram, that page would get flushed a lot, while the actual pages in the buffer would not get synced correctly. While if 0 is an invalid physical address it may cause a fault and trigger a crash. In v5.0 this was incidentally fixed by commit 55897af63091 ("dma-direct: merge swiotlb_dma_ops into the dma_direct code"), as this moved the dma-api to use the page pointer in the sg_list, and (for Ion buffers at least) this will always be valid if the sg_list exists at all. But, this issue is re-introduced in v5.3 with commit 449fa54d6815 ("dma-direct: correct the physical addr in dma_direct_sync_sg_for_cpu/device") moves the dma-api back to the old behaviour and picks the dma_address that may be invalid. dma-buf core doesn't ensure that the buffer is mapped on the device, and thus have a valid sg_list, before calling the exporter's begin_cpu_access. Logic and commit message originally by: Ørjan Eide Cc: Sumit Semwal Cc: Liam Mark Cc: Laura Abbott Cc: Brian Starkey Cc: Hridya Valsaraju Cc: Suren Baghdasaryan Cc: Sandeep Patil Cc: Daniel Mentz Cc: Chris Goldsworthy Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Reviewed-by: Brian Starkey Signed-off-by: John Stultz Signed-off-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20201121235002.69945-5-john.stultz@linaro.org commit 064fae53c068a13987733ef2898d12d93a34545c Author: John Stultz Date: Sat Nov 21 23:50:00 2020 +0000 dma-buf: heaps: Remove heap-helpers code The heap-helpers code was not as generic as initially hoped and it is now not being used, so remove it from the tree. Cc: Sumit Semwal Cc: Liam Mark Cc: Laura Abbott Cc: Brian Starkey Cc: Hridya Valsaraju Cc: Suren Baghdasaryan Cc: Sandeep Patil Cc: Daniel Mentz Cc: Chris Goldsworthy Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Reviewed-by: Brian Starkey Signed-off-by: John Stultz Signed-off-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20201121235002.69945-4-john.stultz@linaro.org commit a5d2d29e24be8967ef78a1b1fb2292413e3b3df9 Author: John Stultz Date: Sat Nov 21 23:49:59 2020 +0000 dma-buf: heaps: Move heap-helper logic into the cma_heap implementation Since the heap-helpers logic ended up not being as generic as hoped, move the heap-helpers dma_buf_ops implementations into the cma_heap directly. This will allow us to remove the heap_helpers code in a following patch. Cc: Sumit Semwal Cc: Liam Mark Cc: Laura Abbott Cc: Brian Starkey Cc: Hridya Valsaraju Cc: Suren Baghdasaryan Cc: Sandeep Patil Cc: Daniel Mentz Cc: Chris Goldsworthy Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Reviewed-by: Brian Starkey Signed-off-by: John Stultz Signed-off-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20201121235002.69945-3-john.stultz@linaro.org commit 3812957587923ca325308ed9c4a5be5ca935e903 Author: John Stultz Date: Sat Nov 21 23:49:58 2020 +0000 dma-buf: system_heap: Rework system heap to use sgtables instead of pagelists In preparation for some patches to optmize the system heap code, rework the dmabuf exporter to utilize sgtables rather then pageslists for tracking the associated pages. This will allow for large order page allocations, as well as more efficient page pooling. In doing so, the system heap stops using the heap-helpers logic which sadly is not quite as generic as I was hoping it to be, so this patch adds heap specific implementations of the dma_buf_ops function handlers. Cc: Sumit Semwal Cc: Liam Mark Cc: Laura Abbott Cc: Brian Starkey Cc: Hridya Valsaraju Cc: Suren Baghdasaryan Cc: Sandeep Patil Cc: Daniel Mentz Cc: Chris Goldsworthy Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Reviewed-by: Brian Starkey Signed-off-by: John Stultz Signed-off-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20201121235002.69945-2-john.stultz@linaro.org commit 988187e8810364dc02f3ceb7cab497f4a2e9003f Author: Yejune Deng Date: Mon Nov 16 16:01:47 2020 +0800 ipvs: replace atomic_add_return() atomic_inc_return() looks better Signed-off-by: Yejune Deng Acked-by: Julian Anastasov Signed-off-by: Pablo Neira Ayuso commit fd2d6bc4c2b1857663178357d5f37d762e58a03d Author: Randy Dunlap Date: Sun Nov 15 19:42:03 2020 -0800 netfilter: nft_reject_bridge: fix build errors due to code movement Fix build errors in net/bridge/netfilter/nft_reject_bridge.ko by selecting NF_REJECT_IPV4, which provides the missing symbols. ERROR: modpost: "nf_reject_skb_v4_tcp_reset" [net/bridge/netfilter/nft_reject_bridge.ko] undefined! ERROR: modpost: "nf_reject_skb_v4_unreach" [net/bridge/netfilter/nft_reject_bridge.ko] undefined! Fixes: fa538f7cf05a ("netfilter: nf_reject: add reject skbuff creation helpers") Reported-by: kernel test robot Signed-off-by: Randy Dunlap Signed-off-by: Pablo Neira Ayuso commit afbd0bdebe0d82c4846dbbce53625110889c5de8 Author: Martin Jücker Date: Fri Nov 20 17:00:54 2020 +0100 ARM: dts: exynos: switch Atmel mxt reset GPIO to active low on P4 Note The reset GPIO logic of the Atmel maxtouch driver was changed to be active low at around the same time P4 Note device tree was accepted into the kernel. Adjust the configuration so that the touchscreen is in a usable state. Signed-off-by: Martin Jücker Link: https://lore.kernel.org/r/20201120160053.18942-1-martin.juecker@gmail.com Signed-off-by: Krzysztof Kozlowski commit a161ffe4b877721d8917e18e70461d255a090f19 Author: Tom Rix Date: Wed Aug 19 11:46:37 2020 -0700 soc: qcom: initialize local variable clang static analysis reports this problem pdr_interface.c:596:6: warning: Branch condition evaluates to a garbage value if (!req.service_path[0]) ^~~~~~~~~~~~~~~~~~~~ This check that req.service_path was set in an earlier loop. However req is a stack variable and its initial value is undefined. So initialize req to 0. Fixes: fbe639b44a82 ("soc: qcom: Introduce Protection Domain Restart helpers") Reviewed-by: Sibi Sankar Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20200819184637.15648-1-trix@redhat.com Signed-off-by: Bjorn Andersson commit 903b08340b885689646713bc2ec5ae10c7dbe8db Author: Vladimir Lypak Date: Sun Oct 4 11:22:24 2020 +0300 soc: qcom: socinfo: add soc ids for msm8953 variants Add SoC IDs for MSM8953, APQ8053, SDM(SDA)450, SDM(SDA)632. Signed-off-by: Vladimir Lypak Link: https://lore.kernel.org/r/20201004082223.324019-1-junak.pub@gmail.com Signed-off-by: Bjorn Andersson commit ea270ef71db64715cb46d15b85f30e77775ff88a Author: Peter Ujfalusi Date: Sat Nov 21 19:26:32 2020 -0800 ARM: dts: keystone-k2g-evm: add HDMI and analog audio data The board is using McASP2 for both analog (tlv320aic3106) and HDMI (SiI9022) audio. 12.288MHz oscillator provides the MCLK for both aic3106 and SiI9022. Signed-off-by: Peter Ujfalusi Signed-off-by: Santosh Shilimkar commit c16756c1187034c759c17db5c56b5365618173ba Author: Roja Rani Yarubandi Date: Fri Oct 30 20:29:57 2020 +0530 soc: qcom: geni: Remove "iova" check Remove "iova" check from geni_se_tx_dma_unprep and geni_se_rx_dma_unprep functions as checking with dma_mapping_error() is enough. Signed-off-by: Roja Rani Yarubandi Link: https://lore.kernel.org/r/20201030145959.505-2-rojay@codeaurora.org Signed-off-by: Bjorn Andersson commit 4cba398f37f868f515ff12868418dc28574853a1 Author: Zhihao Cheng Date: Sat Nov 21 19:22:38 2020 -0800 drivers: soc: ti: knav_qmss_queue: Fix error return code in knav_queue_probe Fix to return the error code from of_get_child_by_name() instaed of 0 in knav_queue_probe(). Fixes: 41f93af900a20d1a0a ("soc: ti: add Keystone Navigator QMSS driver") Reported-by: Hulk Robot Signed-off-by: Zhihao Cheng Signed-off-by: Santosh Shilimkar commit b4fa73358c306d747a2200aec6f7acb97e5750e6 Author: Zhang Qilong Date: Sat Nov 21 19:22:37 2020 -0800 soc: ti: Fix reference imbalance in knav_dma_probe The patch fix two reference leak. 1) pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to call put operation will result in reference leak. 2) The pm_runtime_enable will increase power disable depth. Thus a pairing decrement is needed on the error handling path to keep it balanced. We fix it by: 1) adding call pm_runtime_put_noidle or pm_runtime_put_sync in error handling. 2) adding pm_runtime_disable in error handling, to keep usage counter and disable depth balanced. Fixes: 88139ed030583 ("soc: ti: add Keystone Navigator DMA support") Signed-off-by: Zhang Qilong Signed-off-by: Santosh Shilimkar commit 8465c7d1001a86e87f03124dc4a35760e731af62 Author: Grzegorz Jaszczyk Date: Sat Nov 21 19:22:25 2020 -0800 soc: ti: pruss: Remove wrong check against *get_match_data return value Since the of_device_get_match_data() doesn't return error code, remove wrong IS_ERR test. Proper check against NULL pointer is already done later before usage: if (data && data->...). Additionally, proceeding with empty device data is valid (e.g. in case of "ti,am3356-pruss"). Reported-by: Wei Yongjun Signed-off-by: Grzegorz Jaszczyk Signed-off-by: Santosh Shilimkar commit e83b2358ab7ef0d39563b4e66233b356f99b7e77 Author: Nishanth Menon Date: Sat Nov 21 19:22:01 2020 -0800 soc: ti: Kconfig: Drop ARM64 SoC specific configs With the integration of chip-id detection scheme in kernel[1], there is no specific need to maintain multitudes of SoC specific config options, discussed as per [2], we have deprecated the usage in other places for v5.10-rc1. Drop the configuration for the follow on kernel. [1] drivers/soc/ti/k3-socinfo.c commit 907a2b7e2fc7 ("soc: ti: add k3 platforms chipid module driver") Signed-off-by: Nishanth Menon Signed-off-by: Santosh Shilimkar commit 50883affe17e11dab530c97b407652193e60471c Author: Lee Jones Date: Sat Nov 21 19:22:01 2020 -0800 soc: ti: k3-ringacc: Provide documentation for 'k3_ring's 'state' Fixes the following W=1 kernel build warning(s): drivers/soc/ti/k3-ringacc.c:163: warning: Function parameter or member 'state' not described in 'k3_ring' Cc: Santosh Shilimkar Signed-off-by: Lee Jones Signed-off-by: Santosh Shilimkar commit 7be1c9c1c00c39ac04e182f3de613c6f30da3d9c Author: Lee Jones Date: Sat Nov 21 19:22:01 2020 -0800 soc: ti: wkup_m3_ipc: Document 'm3_ipc' parameter throughout Fixes the following W=1 kernel build warning(s): drivers/soc/ti/wkup_m3_ipc.c:227: warning: Function parameter or member 'm3_ipc' not described in 'wkup_m3_set_mem_type' drivers/soc/ti/wkup_m3_ipc.c:236: warning: Function parameter or member 'm3_ipc' not described in 'wkup_m3_set_resume_address' drivers/soc/ti/wkup_m3_ipc.c:248: warning: Function parameter or member 'm3_ipc' not described in 'wkup_m3_request_pm_status' drivers/soc/ti/wkup_m3_ipc.c:268: warning: Function parameter or member 'm3_ipc' not described in 'wkup_m3_prepare_low_power' drivers/soc/ti/wkup_m3_ipc.c:322: warning: Function parameter or member 'm3_ipc' not described in 'wkup_m3_finish_low_power' drivers/soc/ti/wkup_m3_ipc.c:369: warning: Function parameter or member 'm3_ipc' not described in 'wkup_m3_set_rtc_only' drivers/soc/ti/wkup_m3_ipc.c:369: warning: Excess function parameter 'wkup_m3_wakeup' description in 'wkup_m3_set_rtc_only' Cc: Santosh Shilimkar Cc: Dave Gerlach Signed-off-by: Lee Jones Signed-off-by: Santosh Shilimkar commit edac869ed010814d56f766745c64476d5a96bbdd Author: Lee Jones Date: Sat Nov 21 19:22:01 2020 -0800 soc: ti: pm33xx: Remove set but unused variable 'ret' Fixes the following W=1 kernel build warning(s): drivers/soc/ti/pm33xx.c: In function ‘am33xx_do_sram_idle’: drivers/soc/ti/pm33xx.c:138:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] Cc: Santosh Shilimkar Signed-off-by: Lee Jones Signed-off-by: Santosh Shilimkar commit ed93a9e2a1a8448597b4ed4f28b5b7048d4e09e8 Author: Lee Jones Date: Sat Nov 21 19:22:00 2020 -0800 soc: ti: knav_dma: Fix a kernel function doc formatting issue Fixes the following W=1 kernel build warning(s): drivers/soc/ti/knav_dma.c:507: warning: Function parameter or member 'channel' not described in 'knav_dma_close_channel' Cc: Santosh Shilimkar Cc: Sandeep Nair Cc: Cyril Chemparathy Signed-off-by: Lee Jones Signed-off-by: Santosh Shilimkar commit e8ebf411966f65d74693d21bd7b2ea7554a36b19 Author: Lee Jones Date: Sat Nov 21 19:22:00 2020 -0800 soc: ti: knav_qmss_queue: Fix a whole host of function documentation issues Fixes the following W=1 kernel build warning(s): drivers/soc/ti/knav_qmss_queue.c:528: warning: Function parameter or member 'flags' not described in 'knav_queue_open' drivers/soc/ti/knav_qmss_queue.c:528: warning: Function parameter or member 'id' not described in 'knav_queue_open' drivers/soc/ti/knav_qmss_queue.c:528: warning: Function parameter or member 'name' not described in 'knav_queue_open' drivers/soc/ti/knav_qmss_queue.c:551: warning: Excess function parameter 'qh' description in 'knav_queue_close' drivers/soc/ti/knav_qmss_queue.c:551: warning: Function parameter or member 'qhandle' not described in 'knav_queue_close' drivers/soc/ti/knav_qmss_queue.c:583: warning: Excess function parameter 'qh' description in 'knav_queue_device_control' drivers/soc/ti/knav_qmss_queue.c:583: warning: Function parameter or member 'arg' not described in 'knav_queue_device_control' drivers/soc/ti/knav_qmss_queue.c:583: warning: Function parameter or member 'cmd' not described in 'knav_queue_device_control' drivers/soc/ti/knav_qmss_queue.c:583: warning: Function parameter or member 'qhandle' not described in 'knav_queue_device_control' drivers/soc/ti/knav_qmss_queue.c:635: warning: Excess function parameter 'data' description in 'knav_queue_push' drivers/soc/ti/knav_qmss_queue.c:635: warning: Excess function parameter 'qh' description in 'knav_queue_push' drivers/soc/ti/knav_qmss_queue.c:635: warning: Function parameter or member 'dma' not described in 'knav_queue_push' drivers/soc/ti/knav_qmss_queue.c:635: warning: Function parameter or member 'flags' not described in 'knav_queue_push' drivers/soc/ti/knav_qmss_queue.c:635: warning: Function parameter or member 'qhandle' not described in 'knav_queue_push' drivers/soc/ti/knav_qmss_queue.c:635: warning: Function parameter or member 'size' not described in 'knav_queue_push' drivers/soc/ti/knav_qmss_queue.c:655: warning: Excess function parameter 'qh' description in 'knav_queue_pop' drivers/soc/ti/knav_qmss_queue.c:655: warning: Function parameter or member 'qhandle' not described in 'knav_queue_pop' drivers/soc/ti/knav_qmss_queue.c:655: warning: Function parameter or member 'size' not described in 'knav_queue_pop' drivers/soc/ti/knav_qmss_queue.c:759: warning: Function parameter or member 'name' not described in 'knav_pool_create' drivers/soc/ti/knav_qmss_queue.c:759: warning: Function parameter or member 'num_desc' not described in 'knav_pool_create' drivers/soc/ti/knav_qmss_queue.c:759: warning: Function parameter or member 'region_id' not described in 'knav_pool_create' drivers/soc/ti/knav_qmss_queue.c:862: warning: Excess function parameter 'pool' description in 'knav_pool_destroy' drivers/soc/ti/knav_qmss_queue.c:862: warning: Function parameter or member 'ph' not described in 'knav_pool_destroy' drivers/soc/ti/knav_qmss_queue.c:892: warning: Excess function parameter 'pool' description in 'knav_pool_desc_get' drivers/soc/ti/knav_qmss_queue.c:892: warning: Function parameter or member 'ph' not described in 'knav_pool_desc_get' drivers/soc/ti/knav_qmss_queue.c:911: warning: Excess function parameter 'pool' description in 'knav_pool_desc_put' drivers/soc/ti/knav_qmss_queue.c:911: warning: Function parameter or member 'desc' not described in 'knav_pool_desc_put' drivers/soc/ti/knav_qmss_queue.c:911: warning: Function parameter or member 'ph' not described in 'knav_pool_desc_put' drivers/soc/ti/knav_qmss_queue.c:931: warning: Excess function parameter 'pool' description in 'knav_pool_desc_map' drivers/soc/ti/knav_qmss_queue.c:931: warning: Function parameter or member 'desc' not described in 'knav_pool_desc_map' drivers/soc/ti/knav_qmss_queue.c:931: warning: Function parameter or member 'dma' not described in 'knav_pool_desc_map' drivers/soc/ti/knav_qmss_queue.c:931: warning: Function parameter or member 'dma_sz' not described in 'knav_pool_desc_map' drivers/soc/ti/knav_qmss_queue.c:931: warning: Function parameter or member 'ph' not described in 'knav_pool_desc_map' drivers/soc/ti/knav_qmss_queue.c:931: warning: Function parameter or member 'size' not described in 'knav_pool_desc_map' drivers/soc/ti/knav_qmss_queue.c:956: warning: Excess function parameter 'pool' description in 'knav_pool_desc_unmap' drivers/soc/ti/knav_qmss_queue.c:956: warning: Function parameter or member 'dma' not described in 'knav_pool_desc_unmap' drivers/soc/ti/knav_qmss_queue.c:956: warning: Function parameter or member 'dma_sz' not described in 'knav_pool_desc_unmap' drivers/soc/ti/knav_qmss_queue.c:956: warning: Function parameter or member 'ph' not described in 'knav_pool_desc_unmap' drivers/soc/ti/knav_qmss_queue.c:975: warning: Excess function parameter 'pool' description in 'knav_pool_count' drivers/soc/ti/knav_qmss_queue.c:975: warning: Function parameter or member 'ph' not described in 'knav_pool_count' Cc: Santosh Shilimkar Cc: Sandeep Nair Cc: Cyril Chemparathy Signed-off-by: Lee Jones Signed-off-by: Santosh Shilimkar commit e72501099c4c8308aa5f1a7eed92a0839ab0cbbd Author: Lee Jones Date: Sat Nov 21 19:22:00 2020 -0800 soc: ti: knav_qmss_queue: Remove set but unchecked variable 'ret' Fixes the following W=1 kernel build warning(s): drivers/soc/ti/knav_qmss_queue.c: In function ‘knav_setup_queue_pools’: drivers/soc/ti/knav_qmss_queue.c:1310:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] Cc: Santosh Shilimkar Cc: Sandeep Nair Cc: Cyril Chemparathy Signed-off-by: Lee Jones Signed-off-by: Santosh Shilimkar commit fd79aebe5f7cc0bdc9656ddf1a52f04da9480cd7 Author: Tony Lindgren Date: Sat Nov 21 19:22:00 2020 -0800 soc: ti: omap-prm: Do not check rstst bit on deassert if already deasserted If a rstctrl reset bit is already deasserted, we can just bail out early not wait for rstst to clear. Otherwise we can have deassert fail for already deasserted resets. Fixes: c5117a78dd88 ("soc: ti: omap-prm: poll for reset complete during de-assert") Signed-off-by: Tony Lindgren Signed-off-by: Santosh Shilimkar commit ec8684847d8062496c4619bc3fcff31c19d56847 Author: Zhang Qilong Date: Sat Nov 21 19:22:00 2020 -0800 soc: ti: knav_qmss: fix reference leak in knav_queue_probe pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to pm_runtime_put_noidle will result in reference leak in knav_queue_probe, so we should fix it. Fixes: 41f93af900a20 ("soc: ti: add Keystone Navigator QMSS driver") Signed-off-by: Zhang Qilong Signed-off-by: Santosh Shilimkar commit f8c76863394daacb3dbe7088e57ae4845629c989 Author: Lee Jones Date: Thu Nov 12 19:00:39 2020 +0000 drm/mediatek/mtk_disp_ovl: Fix formatting and provide missing member description Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/mediatek/mtk_disp_ovl.c:75: warning: Function parameter or member 'ddp_comp' not described in 'mtk_disp_ovl' drivers/gpu/drm/mediatek/mtk_disp_ovl.c:75: warning: Function parameter or member 'crtc' not described in 'mtk_disp_ovl' drivers/gpu/drm/mediatek/mtk_disp_ovl.c:75: warning: Function parameter or member 'data' not described in 'mtk_disp_ovl' Cc: Chun-Kuang Hu Cc: Philipp Zabel Cc: David Airlie Cc: Daniel Vetter Cc: Matthias Brugger Cc: dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Signed-off-by: Lee Jones Signed-off-by: Chun-Kuang Hu commit 4e1848d4c49a711e47709212de47cda6b3a07004 Author: Lee Jones Date: Thu Nov 12 19:00:37 2020 +0000 drm/mediatek/mtk_disp_color: Fix formatting and provide missing member description Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/mediatek/mtk_disp_color.c:40: warning: Function parameter or member 'ddp_comp' not described in 'mtk_disp_color' drivers/gpu/drm/mediatek/mtk_disp_color.c:40: warning: Function parameter or member 'crtc' not described in 'mtk_disp_color' drivers/gpu/drm/mediatek/mtk_disp_color.c:40: warning: Function parameter or member 'data' not described in 'mtk_disp_color' Cc: Chun-Kuang Hu Cc: Philipp Zabel Cc: David Airlie Cc: Daniel Vetter Cc: Matthias Brugger Cc: dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Signed-off-by: Lee Jones Signed-off-by: Chun-Kuang Hu commit 398328af5d17aa0674431fefb9432c343b1c5016 Author: Lee Jones Date: Fri Nov 13 13:49:08 2020 +0000 drm/mediatek/mtk_drm_drv: Staticise local function invoked by reference Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/mediatek/mtk_drm_drv.c:316:24: warning: no previous prototype for ‘mtk_drm_gem_prime_import’ [-Wmissing-prototypes] Cc: Chun-Kuang Hu Cc: Philipp Zabel Cc: David Airlie Cc: Daniel Vetter Cc: Matthias Brugger Cc: Sumit Semwal Cc: "Christian König" Cc: YT SHEN Cc: dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Chun-Kuang Hu commit 20c39e11dded8e316f75550332affaadcddf6611 Author: Lee Jones Date: Fri Nov 13 13:49:05 2020 +0000 drm/mediatek/mtk_disp_rdma: Fix formatting and supply missing struct member description Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/mediatek/mtk_disp_rdma.c:66: warning: Function parameter or member 'ddp_comp' not described in 'mtk_disp_rdma' drivers/gpu/drm/mediatek/mtk_disp_rdma.c:66: warning: Function parameter or member 'crtc' not described in 'mtk_disp_rdma' drivers/gpu/drm/mediatek/mtk_disp_rdma.c:66: warning: Function parameter or member 'data' not described in 'mtk_disp_rdma' Cc: Chun-Kuang Hu Cc: Philipp Zabel Cc: David Airlie Cc: Daniel Vetter Cc: Matthias Brugger Cc: dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Signed-off-by: Lee Jones Signed-off-by: Chun-Kuang Hu commit 31855cff03222521f7feb63b6061b526856bcb31 Author: Robin Murphy Date: Thu Sep 3 21:59:14 2020 +0100 drm/mediatek: Drop local dma_parms Since commit 9495b7e92f71 ("driver core: platform: Initialize dma_parms for platform devices"), struct platform_device already provides a dma_parms structure, so we can save allocating another one. Also the DMA segment size is simply a size, not a bitmask. Signed-off-by: Robin Murphy Signed-off-by: Chun-Kuang Hu commit f9e425e99b0756c1479042afe761073779df2a30 Author: George Cherian Date: Fri Nov 20 15:09:06 2020 +0530 octeontx2-af: Add support for RSS hashing based on Transport protocol field Add support to choose RSS flow key algorithm with IPv4 transport protocol field included in hashing input data. This will be enabled by default. There-by enabling 3/5 tuple hash Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: George Cherian Link: https://lore.kernel.org/r/20201120093906.2873616-1-george.cherian@marvell.com Signed-off-by: Jakub Kicinski commit 5e08723967c8a5cd3f8c6d0ca033acf4a1e04a3a Merge: 7609ecb2ed286 275f6010b6994 Author: Jakub Kicinski Date: Sat Nov 21 14:58:11 2020 -0800 Merge tag 'linux-can-next-for-5.11-20201120' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== pull-request: can-next 2020-11-20 The first patch is by Yegor Yefremov and he improves the j1939 documentaton by adding tables for the CAN identifier and its fields. Then there are 8 patches by Oliver Hartkopp targeting the CAN driver infrastructure and drivers. These add support for optional DLC element to the Classical CAN frame structure. See patch ea7800565a12 ("can: add optional DLC element to Classical CAN frame structure") for details. Oliver's last patch adds len8_dlc support to several drivers. Stefan Mätje provides a patch to add len8_dlc support to the esd_usb2 driver. The next patch is by Oliver Hartkopp, too and adds support for modification of Classical CAN DLCs to CAN GW sockets. The next 3 patches target the nxp,flexcan DT bindings. One patch by my adds the missing uint32 reference to the clock-frequency property. Joakim Zhang's patches fix the fsl,clk-source property and add the IMX_SC_R_CAN() macro to the imx firmware header file, which will be used in the flexcan driver later. Another patch by Joakim Zhang prepares the flexcan driver for SCU based stop-mode, by giving the existing, GPR based stop-mode, a _GPR postfix. The next 5 patches are by me, target the flexcan driver, and clean up the .ndo_open and .ndo_stop callbacks. These patches try to fix a sporadically hanging flexcan_close() during simultanious ifdown, sending of CAN messages and probably open CAN bus. I was never able to reproduce, but these seem to fix the problem at the reporting user. As these changes are rather big, I'd like to mainline them via net-next/master. The next patches are by Jimmy Assarsson and Christer Beskow, they add support for new USB devices to the existing kvaser_usb driver. The last patch is by Kaixu Xia and simplifies the return in the mcp251xfd_chip_softreset() function in the mcp251xfd driver. * tag 'linux-can-next-for-5.11-20201120' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next: (25 commits) can: mcp251xfd: remove useless code in mcp251xfd_chip_softreset can: kvaser_usb: Add new Kvaser hydra devices can: kvaser_usb: kvaser_usb_hydra: Add support for new device variant can: kvaser_usb: Add new Kvaser Leaf v2 devices can: kvaser_usb: Add USB_{LEAF,HYDRA}_PRODUCT_ID_END defines can: flexcan: flexcan_close(): change order if commands to properly shut down the controller can: flexcan: flexcan_open(): completely initialize controller before requesting IRQ can: flexcan: flexcan_rx_offload_setup(): factor out mailbox and rx-offload setup into separate function can: flexcan: move enabling/disabling of interrupts from flexcan_chip_{start,stop}() to callers can: flexcan: factor out enabling and disabling of interrupts into separate function can: flexcan: rename macro FLEXCAN_QUIRK_SETUP_STOP_MODE -> FLEXCAN_QUIRK_SETUP_STOP_MODE_GPR dt-bindings: firmware: add IMX_SC_R_CAN(x) macro for CAN dt-bindings: can: fsl,flexcan: fix fsl,clk-source property dt-bindings: can: fsl,flexcan: add uint32 reference to clock-frequency property can: gw: support modification of Classical CAN DLCs can: drivers: add len8_dlc support for esd_usb2 CAN adapter can: drivers: add len8_dlc support for various CAN adapters can: drivers: introduce helpers to access Classical CAN DLC values can: update documentation for DLC usage in Classical CAN can: rename CAN FD related can_len2dlc and can_dlc2len helpers ... ==================== Link: https://lore.kernel.org/r/20201120133318.3428231-1-mkl@pengutronix.de Signed-off-by: Jakub Kicinski commit 7609ecb2ed2868a253ca5ea995d845802dbf1865 Author: Heiner Kallweit Date: Fri Nov 20 12:22:23 2020 +0100 net: bridge: switch to net core statistics counters handling Use netdev->tstats instead of a member of net_bridge for storing a pointer to the per-cpu counters. This allows us to use core functionality for statistics handling. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/9bad2be2-fd84-7c6e-912f-cee433787018@gmail.com Signed-off-by: Jakub Kicinski commit 9c89cc9b7fad80b6827334da4ea776c6b84addc4 Merge: 16de5970e08df c331ecf1afc12 Author: Jakub Kicinski Date: Sat Nov 21 14:33:49 2020 -0800 Merge branch 'net-hns3-misc-updates-for-next' Huazhong Tan says: ==================== net: hns3: misc updates for -next This series includes some misc updates for the HNS3 ethernet driver. #1 adds support for 1280 queues #2 adds mapping for BAR45 which is needed by RoCE client. #3 extend the interrupt resources. #4 add support to query firmware's calculated shaping parameters. ==================== Link: https://lore.kernel.org/r/1605863783-36995-1-git-send-email-tanhuazhong@huawei.com Signed-off-by: Jakub Kicinski commit c331ecf1afc1211ce927cc4bd3a978b3655c0854 Author: Yonglong Liu Date: Fri Nov 20 17:16:23 2020 +0800 net: hns3: adds debugfs to dump more info of shaping parameters Adds debugfs to dump new shaping parameters: rate and flag. Signed-off-by: Yonglong Liu Signed-off-by: Huazhong Tan Signed-off-by: Jakub Kicinski commit e364ad303fe3e96ff30fb05c031774ecbbce4af1 Author: Yonglong Liu Date: Fri Nov 20 17:16:22 2020 +0800 net: hns3: add support to utilize the firmware calculated shaping parameters Since the calculation of the driver is fixed, if the number of queue or clock changed, the calculated result may be inaccurate. So for compatible and maintainable, add a new flag to tell the firmware to calculate the shaping parameters with the specified rate. Signed-off-by: Yonglong Liu Signed-off-by: Huazhong Tan Signed-off-by: Jakub Kicinski commit 3a6863e4e8ee212c7f86594299d9ff0d6a15ecbc Author: Yufeng Mo Date: Fri Nov 20 17:16:21 2020 +0800 net: hns3: add support for pf querying new interrupt resources For HNAE3_DEVICE_VERSION_V3, a maximum of 1281 interrupt resources are supported. To utilize these new resources, extend the corresponding field or variable to 16bit type, and remove the restriction of NIC client that only use a maximum of 65 interrupt vectors. In addition, the I/O address of the extended interrupt resources are different, so an extra handler is needed. Currently, the total number of interrupts is the sum of RoCE's number and RoCE's offset (RoCE is in front of NIC), since the number of both NIC and RoCE are same. For readability, rewrite the corresponding field of the command, rename the RoCE's offset field as the number of NIC interrupts, then the total number of interrupts is sum of the number of RoCE and NIC, and replace vport->back with hdev in hclge_init_roce_base_info() for simplifying the code. Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan Signed-off-by: Jakub Kicinski commit 30ae7f8a6aa730e6dab8d86ccbbacdcbec1c389f Author: Huazhong Tan Date: Fri Nov 20 17:16:20 2020 +0800 net: hns3: add support for mapping device memory For device who has device memory accessed through the PCI BAR4, IO descriptor push of NIC and direct WQE(Work Queue Element) of RoCE will use this device memory, so add support for mapping this device memory, and add this info to the RoCE client whose new feature needs. Signed-off-by: Huazhong Tan Signed-off-by: Jakub Kicinski commit 9a5ef4aa5457ceab3ad9772fa7360b34192f9463 Author: Yonglong Liu Date: Fri Nov 20 17:16:19 2020 +0800 net: hns3: add support for 1280 queues For DEVICE_VERSION_V1/2, there are total 1024 queues and queue sets. For DEVICE_VERSION_V3, it increases to 1280, and can be assigned to one pf, so remove the limitation of 1024. To keep compatible with DEVICE_VERSION_V1/2 and old driver version, the queue number is split into two part: tqp_num(range 0~1023) and ext_tqp_num(range 1024~1279). Signed-off-by: Yonglong Liu Signed-off-by: Huazhong Tan Signed-off-by: Jakub Kicinski commit 3edfa30f2340e6c361b34fc0c53a5f3d3bbf9704 Author: Rob Clark Date: Mon Nov 16 09:48:51 2020 -0800 drm/msm/shrinker: Only iterate dontneed objs In situations where the GPU is mostly idle, all or nearly all buffer objects will be in the inactive list. But if the system is under memory pressure (from something other than GPU), we could still get a lot of shrinker calls. Which results in traversing a list of thousands of objs and in the end finding nothing to shrink. Which isn't so efficient. Instead split the inactive_list into two lists, one inactive objs which are shrinkable, and a second one for those that are not. This way we can avoid traversing objs which we know are not shrinker candidates. v2: Fix inverted logic think-o Signed-off-by: Rob Clark commit fcd371c23c3a0a89bf6f3f415b14f75658c55c1c Author: Rob Clark Date: Mon Nov 16 09:48:50 2020 -0800 drm/msm/shrinker: We can vmap shrink active_list too Just because a obj is active, if the vmap_count is zero, we can still tear down the vmap. Signed-off-by: Rob Clark commit ab5c54cb88350e224632e5b0fcd7f86ece06beb9 Author: Rob Clark Date: Mon Nov 16 09:48:49 2020 -0800 drm/msm: Protect obj->active_count under obj lock Previously we only held obj lock in the _active_get() path, and relied on atomic_dec_return() to not be racy in the _active_put() path where obj lock was not held. But this is a false sense of security. Unlike obj lifetime refcnt, where you do not expect to *increase* the refcnt after the last put (which would mean that something has gone horribly wrong with the object liveness reference counting), the active_count can increase again from zero. Racing _active_put()s and _active_get()s could leave the obj on the wrong mm list. But in the retire path, immediately after the _active_put(), the _unpin_iova() would acquire obj lock. So just move the locking earlier and rely on that to protect obj->active_count. Fixes: c5c1643cef7a ("drm/msm: Drop struct_mutex from the retire path") Signed-off-by: Rob Clark commit 74d826da3842ce893e943f9f23ddb7f07fc8d7fe Author: Alexandru Ardelean Date: Tue Nov 17 11:51:54 2020 +0200 iio: core: return -EINVAL when no ioctl handler has been run It seems that when this was tested the happy case was more tested. A few of the userspace apps rely on this returning negative error codes in case an ioctl() is not available. When running multiple ioctl() handlers or when calling an ioctl() that doesn't exist, IIO_IOCTL_UNHANDLED is returned. In that case -EINVAL should be returned. Fixes: 8dedcc3eee3a ("iio: core: centralize ioctl() calls to the main chardev") Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201117095154.7189-1-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit ee8caea0c1449271d6f03145d367423dc5d8749c Author: Alexandru Ardelean Date: Tue Nov 17 12:37:53 2020 +0200 iio: core: organize buffer file-ops in the order defined in the struct The change is mostly cosmetic. This organizes the order of assignment of the members of 'iio_buffer_fileops' to be similar to the one as defined in the 'struct file_operations' type. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201117103753.8450-1-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit d59377023d4a30e0bb0eac38c813224ce8bc61ec Author: Alexandru Ardelean Date: Thu Nov 19 16:18:06 2020 +0200 iio: accel: adis16209: remove unneeded spi_set_drvdata() There is no matching spi_get_drvdata() in the driver. This looks like a left-over from before the driver was converted to device-managed functions. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201119141806.84827-1-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 9ff2497337088925d1a486479dfd3f80273dc9a1 Author: Alexandru Ardelean Date: Thu Nov 19 16:17:29 2020 +0200 iio: accel: adis16201: remove unneeded spi_set_drvdata() There is no matching spi_get_drvdata() in the driver. This looks like a left-over from before the driver was converted to device-managed functions. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201119141729.84185-1-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 24da9627e674305187a9908b328ffabcca65e2b5 Author: Alexandru Ardelean Date: Thu Nov 19 16:27:20 2020 +0200 iio: adc: ad7292: remove unneeded spi_set_drvdata() This seems to have been copied from a driver that calls spi_set_drvdata() but doesn't call spi_get_drvdata(). Setting a private object on the SPI device's object isn't necessary if it won't be accessed. This change removes the spi_set_drvdata() call. Signed-off-by: Alexandru Ardelean Tested-by: Marcelo Schmitt Reviewed-by: Marcelo Schmitt Link: https://lore.kernel.org/r/20201119142720.86326-1-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 39996252f6af8f887516bb5f80223df26cb8c904 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:36:26 2020 -0600 iio: adc: cpcap: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Signed-off-by: Gustavo A. R. Silva Link: https://github.com/KSPP/linux/issues/115 Link: https://lore.kernel.org/r/b3c1c3f9c76f2f0e832f956587f227e44af57d3d.1605896060.git.gustavoars@kernel.org Signed-off-by: Jonathan Cameron commit 21232b4456ba5e1eea7385bd3c4b1994994fd409 Author: Alexandru Ardelean Date: Tue Sep 29 15:59:49 2020 +0300 iio: buffer: remove iio_buffer_set_attrs() helper The iio_buffer_set_attrs() is no longer used in the drivers, so it can be removed now. Signed-off-by: Alexandru Ardelean Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200929125949.69934-10-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit fc02a7315b1e48289d31ba02996b468d5ffa2b57 Author: Alexandru Ardelean Date: Tue Sep 29 15:59:48 2020 +0300 iio: hid-sensors: use iio_triggered_buffer_setup_ext() This change switches to the new iio_triggered_buffer_setup_ext() function and removes the iio_buffer_set_attrs() call, for assigning the HW FIFO attributes to the buffer. Signed-off-by: Alexandru Ardelean Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200929125949.69934-9-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 165aea80e2e2c77775bf36d944e5aeea4f4e892d Author: Alexandru Ardelean Date: Tue Sep 29 15:59:47 2020 +0300 iio: cros_ec: use devm_iio_triggered_buffer_setup_ext() This change switches to the new devm_iio_triggered_buffer_setup_ext() function and removes the iio_buffer_set_attrs() call, for assigning the HW FIFO attributes to the buffer. Signed-off-by: Alexandru Ardelean Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200929125949.69934-8-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit a2f283555b86c3f43651af2875ddbcb17c78091f Author: Alexandru Ardelean Date: Tue Sep 29 15:59:46 2020 +0300 iio: adc: at91-sama5d2_adc: use devm_iio_triggered_buffer_setup_ext() This change switches to the new devm_iio_triggered_buffer_setup_ext() function and removes the iio_buffer_set_attrs() call, for assigning the HW FIFO attributes to the buffer. Signed-off-by: Alexandru Ardelean Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200929125949.69934-7-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 1864c829c91e8c65b0eba2f822ee66f227e29bcb Author: Alexandru Ardelean Date: Tue Sep 29 15:59:45 2020 +0300 iio: accel: bmc150: use iio_triggered_buffer_setup_ext() This change switches to the new iio_triggered_buffer_setup_ext() function and removes the iio_buffer_set_attrs() call, for assigning the HW FIFO attributes to the buffer. Signed-off-by: Alexandru Ardelean Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200929125949.69934-6-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit abef6bc928718520f984b536cb48bc03e5d0fdc9 Author: Alexandru Ardelean Date: Tue Sep 29 15:59:44 2020 +0300 iio: accel: adxl372: use devm_iio_triggered_buffer_setup_ext() This change switches to the new devm_iio_triggered_buffer_setup_ext() function and removes the iio_buffer_set_attrs() call, for assigning the HW FIFO attributes to the buffer. Signed-off-by: Alexandru Ardelean Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200929125949.69934-5-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 5164c788985702ad94fa4ce6adca29bf280876df Author: Alexandru Ardelean Date: Tue Sep 29 15:59:43 2020 +0300 iio: triggered-buffer: add {devm_}iio_triggered_buffer_setup_ext variants This change adds a parameter to the {devm_}iio_triggered_buffer_setup() functions to assign the extra sysfs buffer attributes that are typically assigned via iio_buffer_set_attrs(). The functions also get renamed to iio_triggered_buffer_setup_ext() & devm_iio_triggered_buffer_setup_ext(). For backwards compatibility the old {devm_}iio_triggered_buffer_setup() functions are now macros wrap the new (renamed) functions with NULL for the buffer attrs. The aim is to remove iio_buffer_set_attrs(), so in the iio_triggered_buffer_setup_ext() function the attributes are assigned directly to 'buffer->attrs'. When adding multiple IIO buffers per IIO device, it can be pretty cumbersome to first allocate a set of buffers, then to dig them out of IIO to assign extra attributes (with iio_buffer_set_attrs()). Naturally, the best way would be to provide them at allocation time, which is what this change does. At this moment, buffers allocated with {devm_}iio_triggered_buffer_setup() are the only ones in mainline IIO to call iio_buffer_set_attrs(). Signed-off-by: Alexandru Ardelean Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200929125949.69934-4-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 789976accb6a7b93226fcf8441ffc95edff3d371 Author: Alexandru Ardelean Date: Tue Sep 29 15:59:42 2020 +0300 iio: adc: at91-sama5d2_adc: merge buffer & trigger init into a function This change is mostly cosmetic, but it's also a pre-cursor to the the change for 'iio_buffer_set_attrs()', where the helper gets updated to better support multiple IIO buffers for 1 IIO device. The only functional change is that the error message for the trigger alloc failure is bound to the parent device vs the IIO device object. Also, the new at91_adc_buffer_and_trigger_init() function was moved after the definition of the 'at91_adc_fifo_attributes'. Signed-off-by: Alexandru Ardelean Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200929125949.69934-3-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 5e6dc43e2caa145627d2de2b5a7c65545f3fb639 Author: Alexandru Ardelean Date: Tue Sep 29 15:59:41 2020 +0300 iio: buffer: dmaengine: unwrap the use of iio_buffer_set_attrs() The iio_buffer_set_attrs() helper will be removed in this series. So, just assign the attributes of the DMAEngine buffer logic directly. This is IIO buffer core context, so there is direct access to the buffer->attrs object. Signed-off-by: Alexandru Ardelean Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200929125949.69934-2-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit d7a3fd7f00ee33fe0035f1a8269ac498010fbc48 Author: Cengiz Can Date: Fri Nov 13 18:06:19 2020 +0300 dt-bindings: fsl-imx-drm: fix example compatible string Example `display-subsystem` has an incorrect compatible string. Required properties section tells that developers should use "fsl,imx-display-subsystem" as "compatible" string but the example misses 'imx-' prefix. Change example to have correct "compatible" string. Signed-off-by: Cengiz Can Link: https://lore.kernel.org/r/20201113150618.417424-1-cengiz@kernel.wtf Signed-off-by: Rob Herring commit 4a24d80b8c3e9f89d6a6a7b89bd057c463b638d3 Author: Smita Koralahalli Date: Thu Nov 19 12:29:38 2020 -0600 x86/mce, cper: Pass x86 CPER through the MCA handling chain The kernel uses ACPI Boot Error Record Table (BERT) to report fatal errors that occurred in a previous boot. The MCA errors in the BERT are reported using the x86 Processor Error Common Platform Error Record (CPER) format. Currently, the record prints out the raw MSR values and AMD relies on the raw record to provide MCA information. Extract the raw MSR values of MCA registers from the BERT and feed them into mce_log() to decode them properly. The implementation is SMCA-specific as the raw MCA register values are given in the register offset order of the SMCA address space. [ bp: Massage. ] [ Fix a build breakage in patch v1. ] Reported-by: kernel test robot Signed-off-by: Smita Koralahalli Signed-off-by: Borislav Petkov Reviewed-by: Punit Agrawal Acked-by: Ard Biesheuvel Link: https://lkml.kernel.org/r/20201119182938.151155-1-Smita.KoralahalliChannabasappa@amd.com commit 9ac05523d38d4c2f40c9e41fc1453146fcd74368 Author: Christophe JAILLET Date: Sat Nov 21 09:37:47 2020 +0100 ALSA: emu10k1: Use dma_set_mask_and_coherent to simplify code 'pci_set_dma_mask()' + 'pci_set_consistent_dma_mask()' can be replaced by an equivalent 'dma_set_mask_and_coherent()' which is much less verbose. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/20201121083747.1330299-1-christophe.jaillet@wanadoo.fr Signed-off-by: Takashi Iwai commit ab09b58e4bdfdbcec425e54ebeaf6e209a96318f Author: Uros Bizjak Date: Thu Oct 29 17:02:58 2020 +0100 x86/boot/compressed/64: Use TEST %reg,%reg instead of CMP $0,%reg Use TEST %reg,%reg which sets the zero flag in the same way as CMP $0,%reg, but the encoding uses one byte less. Signed-off-by: Uros Bizjak Signed-off-by: Borislav Petkov Reviewed-by: Andy Lutomirski Link: https://lkml.kernel.org/r/20201029160258.139216-1-ubizjak@gmail.com commit e714fa93898f3b1050356a16bef72168166ade2a Author: Rikard Falkeborn Date: Sat Nov 21 00:10:46 2020 +0100 ALSA: aloop: Constify ops structs The only usage of the ops field in the loopback_cable struct is to call its members, the field it self is never changed. Make it a pointer to const. This allows us to constify two static loopback_ops structs to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20201120231046.76758-1-rikard.falkeborn@gmail.com Signed-off-by: Takashi Iwai commit 45bbe6c95e427511f8d5a401d886b5261c673e30 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:34:12 2020 -0600 ALSA: sb: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/0f6d5b94f1890be2b8f88d6f930fc75779e26345.1605896059.git.gustavoars@kernel.org Signed-off-by: Takashi Iwai commit 59e3d501cfaa51890f1a712f10065914632e1c91 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:34:01 2020 -0600 ALSA: pcsp: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/9705120ac2310bb20035e375862410413359611d.1605896059.git.gustavoars@kernel.org Signed-off-by: Takashi Iwai commit 704cbc4eb314bfe009680f4a5891d6734cf2cea7 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:33:52 2020 -0600 ALSA: hdspm: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/3f70182b366fca7e085a3b57cb2eb193be04eed8.1605896059.git.gustavoars@kernel.org Signed-off-by: Takashi Iwai commit 16de5970e08df789044f13ece3b52759ef4f24a2 Merge: c900378316d37 41ed0a00ffcd9 Author: Jakub Kicinski Date: Fri Nov 20 19:51:44 2020 -0800 Merge branch 'ibmvnic-performance-improvements-and-other-updates' Thomas Falcon says: ==================== ibmvnic: Performance improvements and other updates The first three patches utilize a hypervisor call allowing multiple TX and RX buffer replenishment descriptors to be sent in one operation, which significantly reduces hypervisor call overhead. The xmit_more and Byte Queue Limit API's are leveraged to provide this support for TX descriptors. The subsequent two patches remove superfluous code and members in TX completion handling function and TX buffer structure, respectively, and remove unused routines. Finally, four patches which ensure that device queue memory is cache-line aligned, resolving slowdowns observed in PCI traces, as well as optimize the driver's NAPI polling function and to RX buffer replenishment are provided by Dwip Banerjee. This series provides significant performance improvements, allowing the driver to fully utilize 100Gb NIC's. ==================== Link: https://lore.kernel.org/r/1605748345-32062-1-git-send-email-tlfalcon@linux.ibm.com Signed-off-by: Jakub Kicinski commit 41ed0a00ffcd903ece4304a4a65d95706115ffcb Author: Dwip N. Banerjee Date: Wed Nov 18 19:12:25 2020 -0600 ibmvnic: Do not replenish RX buffers after every polling loop Reduce the amount of time spent replenishing RX buffers by only doing so once available buffers has fallen under a certain threshold, in this case half of the total number of buffers, or if the polling loop exits before the packets processed is less than its budget. Non-exhaustion of NAPI budget implies lower incoming packet pressure, allowing the leeway to refill the buffers in preparation for any impending burst. Signed-off-by: Dwip N. Banerjee Signed-off-by: Jakub Kicinski commit e552aa313bbaf118b5f7b7f7fba7e28593f8d90d Author: Dwip N. Banerjee Date: Wed Nov 18 19:12:24 2020 -0600 ibmvnic: Use netdev_alloc_skb instead of alloc_skb to replenish RX buffers Take advantage of the additional optimizations in netdev_alloc_skb when allocating socket buffers to be used for packet reception. Signed-off-by: Dwip N. Banerjee Acked-by: Lijun Pan Signed-off-by: Jakub Kicinski commit ec20f36bb41aec786407b525ac1c2ba982c925fd Author: Dwip N. Banerjee Date: Wed Nov 18 19:12:23 2020 -0600 ibmvnic: Correctly re-enable interrupts in NAPI polling routine If the current NAPI polling loop exits without completing it's budget, only re-enable interrupts if there are no entries remaining in the queue and napi_complete_done is successful. If there are entries remaining on the queue that were missed, restart the polling loop. Signed-off-by: Dwip N. Banerjee Signed-off-by: Jakub Kicinski commit 9a87c3fca2372af3177cb454c7aa381c7080307f Author: Dwip N. Banerjee Date: Wed Nov 18 19:12:22 2020 -0600 ibmvnic: Ensure that device queue memory is cache-line aligned PCI bus slowdowns were observed on IBM VNIC devices as a result of partial cache line writes and non-cache aligned full cache line writes. Ensure that packet data buffers are cache-line aligned to avoid these slowdowns. Signed-off-by: Dwip N. Banerjee Signed-off-by: Jakub Kicinski commit 8ed589f3832a0aee3438bee2820fa90b33b40c24 Author: Thomas Falcon Date: Wed Nov 18 19:12:21 2020 -0600 ibmvnic: Remove send_subcrq function It is not longer used, so remove it. Signed-off-by: Thomas Falcon Acked-by: Lijun Pan Signed-off-by: Jakub Kicinski commit c62aa3734f2188a0f4af6a7c2f9e263a131623b0 Author: Thomas Falcon Date: Wed Nov 18 19:12:20 2020 -0600 ibmvnic: Clean up TX code and TX buffer data structure Remove unused and superfluous code and members in existing TX implementation and data structures. Signed-off-by: Thomas Falcon Signed-off-by: Jakub Kicinski commit 0d973388185d49add56b81ca82fa5e4348019df8 Author: Thomas Falcon Date: Wed Nov 18 19:12:19 2020 -0600 ibmvnic: Introduce xmit_more support using batched subCRQ hcalls Include support for the xmit_more feature utilizing the H_SEND_SUB_CRQ_INDIRECT hypervisor call which allows the sending of multiple subordinate Command Response Queue descriptors in one hypervisor call via a DMA-mapped buffer. This update reduces hypervisor calls and thus hypervisor call overhead per TX descriptor. Signed-off-by: Thomas Falcon Signed-off-by: Jakub Kicinski commit 4f0b6812e9b9a05887b51c773642c6f354d69650 Author: Thomas Falcon Date: Wed Nov 18 19:12:18 2020 -0600 ibmvnic: Introduce batched RX buffer descriptor transmission Utilize the H_SEND_SUB_CRQ_INDIRECT hypervisor call to send multiple RX buffer descriptors to the device in one hypervisor call operation. This change will reduce the number of hypervisor calls and thus hypervisor call overhead needed to transmit RX buffer descriptors to the device. Signed-off-by: Thomas Falcon Signed-off-by: Jakub Kicinski commit f019fb6392e59f4d383ff42b4eb39e768f29af5f Author: Thomas Falcon Date: Wed Nov 18 19:12:17 2020 -0600 ibmvnic: Introduce indirect subordinate Command Response Queue buffer This patch introduces the infrastructure to send batched subordinate Command Response Queue descriptors, which are used by the ibmvnic driver to send TX frame and RX buffer descriptors. Signed-off-by: Thomas Falcon Acked-by: Lijun Pan Signed-off-by: Jakub Kicinski commit 48cb5b6829e2acb4b600153142889f879115e172 Author: Tzung-Bi Shih Date: Mon Nov 16 16:44:12 2020 +0800 remoteproc/mediatek: skip if filesz is 0 The main purpose of the loop is to load the memory to the SCP SRAM. If filesz is 0, can go to next program header directly. We don't need to try to validate the FW binary for those filesz==0 segments. Reviewed-by: Mathieu Poirier Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20201116084413.3312631-3-tzungbi@google.com Signed-off-by: Bjorn Andersson commit 71ffb5a22b49ad1c6266aad237cf8f1f5b13fe9a Author: Tzung-Bi Shih Date: Mon Nov 16 16:44:11 2020 +0800 remoteproc/mediatek: fix boundary check It is valid if offset+length == sram_size. For example, sram_size=100, offset=99, length=1. Accessing offset 99 with length 1 is valid. Reviewed-by: Mathieu Poirier Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20201116084413.3312631-2-tzungbi@google.com Signed-off-by: Bjorn Andersson commit 903635cbc75763a5ce78db60934494dd51a66778 Author: Tzung-Bi Shih Date: Mon Nov 16 16:25:37 2020 +0800 remoteproc/mediatek: fix sparse errors on dma_alloc and dma_free Fixes the following sparse errors on dma_alloc_coherent() and dma_free_coherent(). On drivers/remoteproc/mtk_scp.c:559:23: warning: incorrect type in assignment (different address spaces) expected void [noderef] __iomem *cpu_addr got void * On drivers/remoteproc/mtk_scp.c:572:56: warning: incorrect type in argument 3 (different address spaces) expected void *cpu_addr got void [noderef] __iomem *cpu_addr The cpu_addr is not a __iomem address. Removes the marker. Reviewed-by: Nicolas Boichat Reviewed-by: Mathieu Poirier Reported-by: kernel test robot Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20201116082537.3287009-3-tzungbi@google.com Signed-off-by: Bjorn Andersson commit 778f2664fa34634001c51f46bc64c6e9ef91611a Author: Tzung-Bi Shih Date: Mon Nov 16 16:25:36 2020 +0800 remoteproc/mediatek: fix sparse errors on sram power on and off Fixes the following sparse errors on sram power on and off: On drivers/remoteproc/mtk_scp.c:306:17: warning: incorrect type in argument 2 (different address spaces) expected void volatile [noderef] __iomem *addr got void *addr On drivers/remoteproc/mtk_scp.c:307:9: warning: incorrect type in argument 2 (different address spaces) expected void volatile [noderef] __iomem *addr got void *addr On drivers/remoteproc/mtk_scp.c:314:9: warning: incorrect type in argument 2 (different address spaces) expected void volatile [noderef] __iomem *addr got void *addr On drivers/remoteproc/mtk_scp.c:316:17: warning: incorrect type in argument 2 (different address spaces) expected void volatile [noderef] __iomem *addr got void *addr Reviewed-by: Nicolas Boichat Reviewed-by: Mathieu Poirier Reported-by: kernel test robot Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20201116082537.3287009-2-tzungbi@google.com Signed-off-by: Bjorn Andersson commit f722fbac1e533ea1fe750d99d09c244efff59d59 Merge: ab7eff24a1e99 278407a53c3b3 Author: Florian Fainelli Date: Fri Nov 20 19:14:01 2020 -0800 Merge tag 'tags/bcm2835-dt-next-2020-11-20' into devicetree/next - Maxime introduces a quirk to avoid EMI between WiFi and HDMI@1440p on RPi4b. - Pavel fixes dwc2's fifo size to properly support isochronous transfers. Signed-off-by: Florian Fainelli commit ab7eff24a1e993b649d0383ec831a7fab30fe369 Author: Kurt Kanzenbach Date: Sat Oct 10 18:46:26 2020 +0200 dt-bindings: net: dsa: b53: Add YAML bindings Convert the b53 DSA device tree bindings to YAML in order to allow for automatic checking and such. Reviewed-by: Rob Herring Suggested-by: Florian Fainelli Signed-off-by: Kurt Kanzenbach commit 51e40c25aa18d926a8eb1c07289d01611b21123a Author: Florian Fainelli Date: Mon Nov 9 17:44:33 2020 -0800 ARM: dts: NSP: Provide defaults ports container node Provide an empty 'ports' container node with the correct #address-cells and #size-cells properties. This silences the following warning: arch/arm/boot/dts/bcm958522er.dt.yaml: ethernet-switch@36000: 'oneOf' conditional failed, one must be fixed: 'ports' is a required property 'ethernet-ports' is a required property From schema: Documentation/devicetree/bindings/net/dsa/b53.yaml Reviewed-by: Vladimir Oltean Signed-off-by: Florian Fainelli commit 42791b317db4cda36751f57bada27857849811d3 Author: Florian Fainelli Date: Mon Nov 9 17:41:32 2020 -0800 ARM: dts: NSP: Add a SRAB compatible string for each board Provide a valid compatible string for the Ethernet switch node based on the board including the switch. This allows us to have sane defaults and silences the following warnings: arch/arm/boot/dts/bcm958522er.dt.yaml: ethernet-switch@36000: compatible: 'oneOf' conditional failed, one must be fixed: ['brcm,bcm5301x-srab'] is too short 'brcm,bcm5325' was expected 'brcm,bcm53115' was expected 'brcm,bcm53125' was expected 'brcm,bcm53128' was expected 'brcm,bcm5365' was expected 'brcm,bcm5395' was expected 'brcm,bcm5389' was expected 'brcm,bcm5397' was expected 'brcm,bcm5398' was expected 'brcm,bcm11360-srab' was expected 'brcm,bcm5301x-srab' is not one of ['brcm,bcm53010-srab', 'brcm,bcm53011-srab', 'brcm,bcm53012-srab', 'brcm,bcm53018-srab', 'brcm,bcm53019-srab'] 'brcm,bcm5301x-srab' is not one of ['brcm,bcm11404-srab', 'brcm,bcm11407-srab', 'brcm,bcm11409-srab', 'brcm,bcm58310-srab', 'brcm,bcm58311-srab', 'brcm,bcm58313-srab'] 'brcm,bcm5301x-srab' is not one of ['brcm,bcm58522-srab', 'brcm,bcm58523-srab', 'brcm,bcm58525-srab', 'brcm,bcm58622-srab', 'brcm,bcm58623-srab', 'brcm,bcm58625-srab', 'brcm,bcm88312-srab'] 'brcm,bcm5301x-srab' is not one of ['brcm,bcm3384-switch', 'brcm,bcm6328-switch', 'brcm,bcm6368-switch'] From schema: Documentation/devicetree/bindings/net/dsa/b53.yaml Reviewed-by: Vladimir Oltean Signed-off-by: Florian Fainelli commit 8b0235d1deace8f1bd8cdd149d698fee3974fdf4 Author: Florian Fainelli Date: Mon Nov 9 12:06:15 2020 -0800 ARM: dts: NSP: Fix Ethernet switch SGMII register name The register name should be "sgmii_config", not "sgmii", this is not a functional change since no code is currently looking for that register by name (or at all). Reviewed-by: Vladimir Oltean Signed-off-by: Florian Fainelli commit fd66cd0d79cb836badecb91fdd19afd32afbb443 Author: Florian Fainelli Date: Mon Nov 9 12:02:08 2020 -0800 ARM: dts: NSP: Update ethernet switch node name Update the switch unit name from srab to ethernet-switch, allowing us to fix warnings such as: CHECK arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dt.yaml arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dt.yaml: srab@18007000: $nodename:0: 'srab@18007000' does not match '^(ethernet-)?switch(@.*)?$' From schema: Documentation/devicetree/bindings/net/dsa/b53.yaml Reviewed-by: Vladimir Oltean Signed-off-by: Florian Fainelli commit fd577b41421bc24e2d04cab96d387301b649eb14 Author: Florian Fainelli Date: Mon Nov 9 17:20:17 2020 -0800 ARM: dts: BCM5301X: Provide defaults ports container node Provide an empty 'ports' container node with the correct #address-cells and #size-cells properties. This silences the following warning: arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dt.yaml: ethernet-switch@18007000: 'oneOf' conditional failed, one must be fixed: 'ports' is a required property 'ethernet-ports' is a required property From schema: Documentation/devicetree/bindings/net/dsa/b53.yaml Acked-by: Rafał Miłecki Signed-off-by: Florian Fainelli commit 953efcb0c0234f8c488ebd4090378e949d6ba78b Author: Florian Fainelli Date: Mon Nov 9 16:42:09 2020 -0800 ARM: dts: BCM5301X: Add a default compatible for switch node Provide a default compatible string which is based on the 53011 SRAB compatible by default. The 4709 and 47094 default to the 53012 SRAB compatible. This allows us to have sane defaults and silences the following warnings: arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dt.yaml: ethernet-switch@18007000: compatible: 'oneOf' conditional failed, one must be fixed: ['brcm,bcm5301x-srab'] is too short 'brcm,bcm5325' was expected 'brcm,bcm53115' was expected 'brcm,bcm53125' was expected 'brcm,bcm53128' was expected 'brcm,bcm5365' was expected 'brcm,bcm5395' was expected 'brcm,bcm5389' was expected 'brcm,bcm5397' was expected 'brcm,bcm5398' was expected 'brcm,bcm11360-srab' was expected 'brcm,bcm5301x-srab' is not one of ['brcm,bcm53010-srab', 'brcm,bcm53011-srab', 'brcm,bcm53012-srab', 'brcm,bcm53018-srab', 'brcm,bcm53019-srab'] 'brcm,bcm5301x-srab' is not one of ['brcm,bcm11404-srab', 'brcm,bcm11407-srab', 'brcm,bcm11409-srab', 'brcm,bcm58310-srab', 'brcm,bcm58311-srab', 'brcm,bcm58313-srab'] 'brcm,bcm5301x-srab' is not one of ['brcm,bcm58522-srab', 'brcm,bcm58523-srab', 'brcm,bcm58525-srab', 'brcm,bcm58622-srab', 'brcm,bcm58623-srab', 'brcm,bcm58625-srab', 'brcm,bcm88312-srab'] 'brcm,bcm5301x-srab' is not one of ['brcm,bcm3384-switch', 'brcm,bcm6328-switch', 'brcm,bcm6368-switch'] From schema: Documentation/devicetree/bindings/net/dsa/b53.yaml Acked-by: Rafał Miłecki Signed-off-by: Florian Fainelli commit f527cb6f3345f7faa8e61dd9f3c437437327428c Author: Florian Fainelli Date: Mon Nov 9 11:41:01 2020 -0800 ARM: dts: BCM5301X: Update Ethernet switch node name Update the switch unit name from srab to ethernet-switch, allowing us to fix warnings such as: CHECK arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dt.yaml arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dt.yaml: srab@18007000: $nodename:0: 'srab@18007000' does not match '^(ethernet-)?switch(@.*)?$' From schema: Documentation/devicetree/bindings/net/dsa/b53.yaml Reviewed-by: Vladimir Oltean Signed-off-by: Florian Fainelli commit d2868fc9335c7ec557fe6ec7e485a32bb610e9dc Author: Florian Fainelli Date: Mon Nov 9 19:12:26 2020 -0800 dt-bindings: net: dsa: Document sfp and managed properties The 'sfp' and 'managed' properties are commonly used to describe Ethernet switch ports connecting to SFP/SFF cages, describe these two properties as valid that we inherit from ethernet-controller.yaml. Acked-by: Rob Herring Signed-off-by: Florian Fainelli commit 91d1d92a89e0865c5b0cf76605f2f1581f3f0904 Author: Florian Fainelli Date: Mon Nov 9 11:38:04 2020 -0800 dt-bindings: net: dsa: Extend switch nodes pattern Upon discussion with Kurt, Rob and Vladimir it appears that we should be allowing ethernet-switch as a node name, update dsa.yaml accordingly. Reviewed-by: Vladimir Oltean Acked-by: Rob Herring Signed-off-by: Florian Fainelli commit 9dd97064e21fc9cba391d4f4983aff4861a7cce8 Author: Kefeng Wang Date: Fri Nov 13 14:42:22 2020 +0800 riscv: Make stack walk callback consistent with generic code In order to use generic arch_stack_walk() code, make stack walk callback consistent with it. Signed-off-by: Kefeng Wang Signed-off-by: Palmer Dabbelt commit 99c168fccbfedbc10ce1cb2dcb9eb790c478d833 Author: Kefeng Wang Date: Fri Nov 13 14:42:21 2020 +0800 riscv: Cleanup stacktrace 1. add asm/stacktrace.h for walk_stackframe and struct stackframe 2. remove unnecessary blank lines in stacktrace.c 3. fix warning "no previous prototype for ‘fill_callchain’" Signed-off-by: Kefeng Wang Signed-off-by: Palmer Dabbelt commit c900378316d37d3af592ec378bc28e1f6b355188 Merge: 0ee6de264b830 ae1d72f9779fb Author: Jakub Kicinski Date: Fri Nov 20 18:45:55 2020 -0800 Merge branch 'net-ipa-add-a-driver-shutdown-callback' Alex Elder says: ==================== net: ipa: add a driver shutdown callback The final patch in this series adds a driver shutdown callback for the IPA driver. The patches leading up to that address some issues encountered while ensuring that callback worked as expected: - The first just reports a little more information when channels or event rings are in unexpected states - The second patch recognizes a condition where an as-yet-unused channel does not require a reset during teardown - The third patch explicitly ignores a certain error condition, because it can't be avoided, and is harmless if it occurs - The fourth properly handles requests to retry a channel HALT request - The fifth makes a second attempt to stop modem activity during shutdown if it's busy The shutdown callback is implemented by calling the existing remove callback function (reporting if that returns an error). ==================== Link: https://lore.kernel.org/r/20201119224929.23819-1-elder@linaro.org Signed-off-by: Jakub Kicinski commit ae1d72f9779fbd05808517c030a2dae327cb038d Author: Alex Elder Date: Thu Nov 19 16:49:29 2020 -0600 net: ipa: add driver shutdown callback A system shutdown can happen at essentially any time, and it's possible that the IPA driver is busy when a shutdown is underway. IPA hardware accesses IMEM and SMEM memory regions using an IOMMU, and at some point during shutdown, needed I/O mappings could become invalid. This could be disastrous for any "in flight" IPA activity. Avoid this by defining a new driver shutdown callback that stops all IPA activity and cleanly shuts down the driver. It merely calls the driver's existing remove callback, reporting the error if it returns one. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 7c80e83829dbc86c1e564017867a48805e459de0 Author: Alex Elder Date: Thu Nov 19 16:49:28 2020 -0600 net: ipa: retry modem stop if busy The IPA driver remove callback, ipa_remove(), calls ipa_modem_stop() if the setup stage of initialization is complete. If a concurrent call to ipa_modem_start() or ipa_modem_stop() has begin but not completed, ipa_modem_stop() can return an error (-EBUSY). The next patch adds a driver shutdown callback, which will simply call ipa_remove(). We really want our shutdown callback to clean things up. So add a single retry to the ipa_modem_stop() call in ipa_remove() after a short (millisecond) delay. This offers no guarantee the shutdown will complete successfully, but we'll at least try a little harder before giving up. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 1136145660f3116cb92794c1a7571bf49e4a1938 Author: Alex Elder Date: Thu Nov 19 16:49:27 2020 -0600 net: ipa: support retries on generic GSI commands When stopping an AP RX channel, there can be a transient period while the channel enters STOP_IN_PROC state before reaching the final STOPPED state. In that case we make another attempt to stop the channel. Similarly, when stopping a modem channel (using a GSI generic command issued from the AP), it's possible that multiple attempts will be required before the channel reaches STOPPED state. Add a field to the GSI structure to record an errno representing the result code provided when a generic command completes. If the result learned in gsi_isr_gp_int1() is RETRY, record -EAGAIN in the result code, otherwise record 0 for success, or -EIO for any other result. If we time out nf gsi_generic_command() waiting for the command to complete, return -ETIMEDOUT (as before). Otherwise return the result stashed by gsi_isr_gp_int1(). Add a loop in gsi_modem_channel_halt() to reissue the HALT command if the result code indicates -EAGAIN. Limit this to 10 retries (after the initial attempt). Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit f849afcc8c3b27d7b50827e95b60557f24184df0 Author: Alex Elder Date: Thu Nov 19 16:49:26 2020 -0600 net: ipa: ignore CHANNEL_NOT_RUNNING errors IPA v4.2 has a hardware quirk that requires the AP to allocate GSI channels for the modem to use. It is recommended that these modem channels get stopped (with a HALT generic command) by the AP when its IPA driver gets removed. The AP has no way of knowing the current state of a modem channel. So when the IPA driver issues a HALT command it's possible the channel is not running, and in that case we get an error indication. This error simply means we didn't need to stop the channel, so we can ignore it. This patch adds an explanation for this situation, and arranges for this condition to *not* report an error message. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 5d28913d4ee655cf15756ba67d4075cac9204a90 Author: Alex Elder Date: Thu Nov 19 16:49:25 2020 -0600 net: ipa: don't reset an ALLOCATED channel If the rmnet_ipa0 network device has not been opened at the time we remove or shut down the IPA driver, its underlying TX and RX GSI channels will not have been started, and they will still be in ALLOCATED state. The RESET command on a channel is meant to return a channel to ALLOCATED state after it's been stopped. But if it was never started, its state will still be ALLOCATED, the RESET command is not required. Quietly skip doing the reset without printing an error message if a channel is already in ALLOCATED state when we request it be reset. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit f8d3bdd561a7c95269a8f908d82249e41badc2aa Author: Alex Elder Date: Thu Nov 19 16:49:24 2020 -0600 net: ipa: print channel/event ring number on error When a GSI command is used to change the state of a channel or event ring we check the state before and after the command to ensure it is as expected. If not, we print an error message, but it does not include the channel or event ring id, and it easily can. Add the channel or event ring id to these error messages. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 0ee6de264b8305d2c55f32a80e00c054736b10f9 Merge: 0a12ad5929556 91d02f9551501 Author: Jakub Kicinski Date: Fri Nov 20 18:45:03 2020 -0800 Merge branch 'net-ipa-platform-specific-clock-and-interconnect-rates' Alex Elder says: ==================== net: ipa: platform-specific clock and interconnect rates This series changes the way the IPA core clock rate and the bandwidth parameters for interconnects are specified. Previously these were specified with hard-wired constants, with the same values used for the SDM845 and SC7180 platforms. Now these parameters are recorded in platform-specific configuration data. For the SC7180 this means we use an all-new core clock rate and interconnect parameters. Additionally, while developing this I learned that the average bandwidth setting for two of the interconnects is ignored (on both platforms). Zero is now used explicitly as that unused bandwidth value. This means the SDM845 bandwidth settings are also changed by this series. ==================== Link: https://lore.kernel.org/r/20201119224041.16066-1-elder@linaro.org Signed-off-by: Jakub Kicinski commit 91d02f9551501fe63e2031d7821d0e7fd4ea5a21 Author: Alex Elder Date: Thu Nov 19 16:40:41 2020 -0600 net: ipa: use config data for clocking Stop assuming a fixed IPA core clock rate and interconnect bandwidths. Use the configuration data defined for these things instead. Get rid of the previously-used constants. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit f08c99226458765c6a929b0a57ea79db8d67cdc4 Author: Alex Elder Date: Thu Nov 19 16:40:40 2020 -0600 net: ipa: populate clock and interconnect data Populate the core clock rate and interconnect average and peak bandwidth data for SDM845 and SC7180 in their configuration data files. At this point we still don't *use* this data. Note that SC7180 actually defines a new core clock rate (100 MHz instead of 75 MHz) and new interconnect bandwidth values. They will be activated in the next commit, which uses the configured values rather than the fixed constants. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit dfccb8b13c0ce32666c596fbb712c60c7c0ab325 Author: Alex Elder Date: Thu Nov 19 16:40:39 2020 -0600 net: ipa: define clock and interconnect data Define a new type of configuration data, used to initialize the IPA core clock and interconnects. This is the first of three patches, and defines the data types and interface but doesn't yet use them. Switch the return value if there is no matching configuration data to ENODEV instead of ENOTSUPP (to avoid using the nonstandard errno). Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 0a12ad5929556195fbdf1c58a14ec8e5b01b006c Author: Grygorii Strashko Date: Thu Nov 19 22:34:46 2020 +0200 mdio_bus: suppress err message for reset gpio EPROBE_DEFER The mdio_bus may have dependencies from GPIO controller and so got deferred. Now it will print error message every time -EPROBE_DEFER is returned which from: __mdiobus_register() |-devm_gpiod_get_optional() without actually identifying error code. "mdio_bus 4a101000.mdio: mii_bus 4a101000.mdio couldn't get reset GPIO" Hence, suppress error message for devm_gpiod_get_optional() returning -EPROBE_DEFER case by using dev_err_probe(). Signed-off-by: Grygorii Strashko Link: https://lore.kernel.org/r/20201119203446.20857-1-grygorii.strashko@ti.com Signed-off-by: Jakub Kicinski commit bf7b0bf68ec94a0745f10fb7c971f9807faa4c89 Author: Heiner Kallweit Date: Thu Nov 19 22:00:11 2020 +0100 r8169: use dev_err_probe in rtl_get_ether_clk Tiny improvement, let dev_err_probe() deal with EPROBE_DEFER. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/b0c4ebcf-2047-e933-b890-8a20e4bdb19f@gmail.com Signed-off-by: Jakub Kicinski commit 94d8a98e6235c2ac4d188e21cab6ea4d43c98806 Author: Heiner Kallweit Date: Thu Nov 19 21:57:27 2020 +0100 r8169: reduce number of workaround doorbell rings Some chip versions have a hw bug resulting in lost door bell rings. To work around this the doorbell is also rung whenever we still have tx descriptors in flight after having cleaned up tx descriptors. These PCI(e) writes come at a cost, therefore let's reduce the number of extra doorbell rings. If skb is NULL then this means: - last cleaned-up descriptor belongs to a skb with at least one fragment and last fragment isn't marked as sent yet - hw is in progress sending the skb, therefore no extra doorbell ring is needed for this skb - once last fragment is marked as transmitted hw will trigger a tx done interrupt and we come here again (with skb != NULL) and ring the doorbell if needed Therefore skip the workaround doorbell ring if skb is NULL. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/0a15a83c-aecf-ab51-8071-b29d9dcd529a@gmail.com Signed-off-by: Jakub Kicinski commit 31564b8b6dbaf9035d27131982d3296c10742baa Author: Kefeng Wang Date: Wed Oct 28 12:28:42 2020 +0800 riscv: Add HAVE_IRQ_TIME_ACCOUNTING RISCV_TIMER/CLINT_TIMER is required for RISC-V system, and it provides sched_clock, which allow us to enable IRQ_TIME_ACCOUNTING. Signed-off-by: Kefeng Wang Signed-off-by: Palmer Dabbelt commit da815582cf4594e96defa1cddb72cd00b1e7aac5 Author: Kefeng Wang Date: Sat Oct 31 14:01:12 2020 +0800 riscv: Enable CMA support riscv has selected HAVE_DMA_CONTIGUOUS, but doesn't call dma_contiguous_reserve(). This calls dma_contiguous_reserve(), which enables CMA. Signed-off-by: Kefeng Wang Signed-off-by: Palmer Dabbelt commit 9e8ac63fe1bc346275b27d5d8016e465402d3c34 Merge: 3cd336c517990 ea4ca586b16ff Author: Jakub Kicinski Date: Fri Nov 20 15:33:27 2020 -0800 Merge branch 'mptcp-more-miscellaneous-mptcp-fixes' Mat Martineau says: ==================== mptcp: More miscellaneous MPTCP fixes Here's another batch of fixup and enhancement patches that we have collected in the MPTCP tree. Patch 1 removes an unnecessary flag and related code. Patch 2 fixes a bug encountered when closing fallback sockets. Patches 3 and 4 choose a better transmit subflow, with a self test. Patch 5 adjusts tracking of unaccepted subflows Patches 6-8 improve handling of long ADD_ADDR options, with a test. Patch 9 more reliably tracks the MPTCP-level window shared with peers. Patch 10 sends MPTCP-level acknowledgements more aggressively, so the peer can send more data without extra delay. ==================== Link: https://lore.kernel.org/r/20201119194603.103158-1-mathew.j.martineau@linux.intel.com Signed-off-by: Jakub Kicinski commit ea4ca586b16ff2eb6157fe13969eb72d2403a3a1 Author: Paolo Abeni Date: Thu Nov 19 11:46:03 2020 -0800 mptcp: refine MPTCP-level ack scheduling Send timely MPTCP-level ack is somewhat difficult when the insertion into the msk receive level is performed by the worker. It needs TCP-level dup-ack to notify the MPTCP-level ack_seq increase, as both the TCP-level ack seq and the rcv window are unchanged. We can actually avoid processing incoming data with the worker, and let the subflow or recevmsg() send ack as needed. When recvmsg() moves the skbs inside the msk receive queue, the msk space is still unchanged, so tcp_cleanup_rbuf() could end-up skipping TCP-level ack generation. Anyway, when __mptcp_move_skbs() is invoked, a known amount of bytes is going to be consumed soon: we update rcv wnd computation taking them in account. Additionally we need to explicitly trigger tcp_cleanup_rbuf() when recvmsg() consumes a significant amount of the receive buffer. Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit fa3fe2b150316b294f2c662653501273ff25bba8 Author: Florian Westphal Date: Thu Nov 19 11:46:02 2020 -0800 mptcp: track window announced to peer OoO handling attempts to detect when packet is out-of-window by testing current ack sequence and remaining space vs. sequence number. This doesn't work reliably. Store the highest allowed sequence number that we've announced and use it to detect oow packets. Do this when mptcp options get written to the packet (wire format). For this to work we need to move the write_options call until after stack selected a new tcp window. Acked-by: Paolo Abeni Signed-off-by: Florian Westphal Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit 523514ed0a998fda389b9b6f00d0f2054ba30d25 Author: Geliang Tang Date: Thu Nov 19 11:46:01 2020 -0800 selftests: mptcp: add ADD_ADDR IPv6 test cases This patch added IPv6 support for do_transfer, and the test cases for ADD_ADDR IPv6. Acked-by: Paolo Abeni Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit 84dfe3677a6f45b3d0dfdd564e55717a1a5e60cc Author: Geliang Tang Date: Thu Nov 19 11:46:00 2020 -0800 mptcp: send out dedicated ADD_ADDR packet When ADD_ADDR suboption includes an IPv6 address, the size is 28 octets. It will not fit when other MPTCP suboptions are included in this packet, e.g. DSS. So here we send out an ADD_ADDR dedicated packet to carry only ADD_ADDR suboption, no other MPTCP suboptions. In mptcp_pm_announce_addr, we check whether this is an IPv6 ADD_ADDR. If it is, we set the flag MPTCP_ADD_ADDR_IPV6 to true. Then we call mptcp_pm_nl_add_addr_send_ack to sent out a new pure ACK packet. In mptcp_established_options_add_addr, we check whether this is a pure ACK packet for ADD_ADDR. If it is, we drop all other MPTCP suboptions in this packet, only put ADD_ADDR suboption in it. Suggested-by: Paolo Abeni Acked-by: Paolo Abeni Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit d91d322a72a390702376787b925711ce8338daec Author: Geliang Tang Date: Thu Nov 19 11:45:59 2020 -0800 mptcp: change add_addr_signal type This patch changed the 'add_addr_signal' type from bool to char, so that we could encode the addr type there. Suggested-by: Paolo Abeni Acked-by: Paolo Abeni Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit 0397c6d85f9c6f81f6dc3a0a166331b2475b325c Author: Paolo Abeni Date: Thu Nov 19 11:45:58 2020 -0800 mptcp: keep unaccepted MPC subflow into join list This will simplify all operation dealing with subflows before accept time (e.g. data fin processing, add_addr). The join list is already flushed by mptcp_stream_accept() before returning the newly created msk to the user space. This also fixes an potential bug present into the old code: conn_list was manipulated without helding the msk lock in mptcp_stream_accept(). Tested-by: Geliang Tang Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit 8b819a84d4b12c4a91cc9f91ad69ca09c3e0606d Author: Florian Westphal Date: Thu Nov 19 11:45:57 2020 -0800 selftests: mptcp: add link failure test case Add a test case where a link fails with multiple subflows. The expectation is that MPTCP will transmit any data that could not be delivered via the failed link on another subflow. Co-developed-by: Geliang Tang Signed-off-by: Geliang Tang Signed-off-by: Florian Westphal Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit 860975c6f80adae9d2c7654bde04a99dd28bc94f Author: Florian Westphal Date: Thu Nov 19 11:45:56 2020 -0800 mptcp: skip to next candidate if subflow has unacked data In case a subflow path is blocked, MPTCP-level retransmit may not take place anymore because such subflow is likely to have unacked data left in its write queue. Ignore subflows that have experienced loss and test next candidate. Fixes: 3b1d6210a95773691 ("mptcp: implement and use MPTCP-level retransmission") Signed-off-by: Florian Westphal Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit 26aa231439fef49f11284ea9d9245e074d69197a Author: Paolo Abeni Date: Thu Nov 19 11:45:55 2020 -0800 mptcp: fix state tracking for fallback socket We need to cope with some more state transition for fallback sockets, or could still end-up moving to TCP_CLOSE too early and avoid spooling some pending data Fixes: e16163b6e2b7 ("mptcp: refactor shutdown and close") Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit b2771d2419fa6e978dec9ba6ccb93c5c76106374 Author: Paolo Abeni Date: Thu Nov 19 11:45:54 2020 -0800 mptcp: drop WORKER_RUNNING status bit Only mptcp_close() can actually cancel the workqueue, no need to add and use this flag. Reviewed-by: Matthieu Baerts Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit 3853f9123c185eb4018f5ccd3cdda5968efb5e10 Author: Zhenzhong Duan Date: Tue Nov 17 13:44:09 2020 +0800 PCI: Avoid duplicate IDs in driver dynamic IDs list When a device ID is written to /sys/bus/pci/drivers/.../new_id, we previously only checked the driver's static ID table for duplicates. Writing the same ID several times added it to the dynamic IDs list several times. This doesn't cause user-visible broken behavior, but remove_id_store() only removes one of the duplicate IDs, so if we add an ID several times, we would have to remove it the same number of times before it's completely gone. Fix it by calling pci_match_device(), which checks both dynamic and static IDs to avoid inserting duplicate IDs in dynamic IDs list. After fix, attempts to add an ID more than once cause an error: # echo "1af4 1041" > /sys/bus/pci/drivers/vfio-pci/new_id # echo "1af4 1041" > /sys/bus/pci/drivers/vfio-pci/new_id bash: echo: write error: File exists Link: https://lore.kernel.org/r/20201117054409.3428-3-zhenzhong.duan@gmail.com Signed-off-by: Zhenzhong Duan Signed-off-by: Bjorn Helgaas commit 3cd336c517990850897f50845270be216d2aaca8 Merge: 30abc9cd9c6bd e035146d65603 Author: Jakub Kicinski Date: Fri Nov 20 15:20:23 2020 -0800 Merge branch 'mlxsw-add-support-for-nexthop-objects' Ido Schimmel says: ==================== mlxsw: Add support for nexthop objects This patch set adds support for nexthop objects in mlxsw. Nexthop objects are treated as another front-end for programming nexthops, in addition to the existing IPv4 and IPv6 front-ends. Patch #1 registers a listener to the nexthop notification chain and parses the nexthop information into the existing mlxsw data structures that are already used by the IPv4 and IPv6 front-ends. Blackhole nexthops are currently rejected. Support will be added in a follow-up patch set. Patch #2 extends mlxsw to resolve its internal nexthop objects from the nexthop identifier encoded in the FIB info of the notified routes. Patch #3 finally removes the limitation of rejecting routes that use nexthop objects. Patch #4 adds a selftest. Patches #5-#8 add generic forwarding selftests that can be used with veth pairs or physical loopbacks. ==================== Link: https://lore.kernel.org/r/20201119130848.407918-1-idosch@idosch.org Signed-off-by: Jakub Kicinski commit e035146d65603165078629671afa9409f659a358 Author: Ido Schimmel Date: Thu Nov 19 15:08:48 2020 +0200 selftests: forwarding: Add multipath tunneling nexthop test Add a nexthop objects version of gre_multipath.sh. Unlike the original test, it also tests IPv6 overlay which is not possible with the legacy nexthop implementation. See commit 9a2ad3623868 ("selftests: forwarding: gre_multipath: Drop IPv6 tests") for more info. Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit e96fa54bbd90e487a8c230155db4231d9326ebcc Author: Ido Schimmel Date: Thu Nov 19 15:08:47 2020 +0200 selftests: forwarding: Add device-only nexthop test In a similar fashion to router_multipath.sh and its nexthop objects version router_mpath_nh.sh, create a nexthop objects version of router.sh. It reuses the same topology, but uses device-only nexthop objects instead of legacy ones. Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit 3600f29ad1399a1335af2030e8106ac8bbe9261a Author: Ido Schimmel Date: Thu Nov 19 15:08:46 2020 +0200 selftests: forwarding: Test IPv4 routes with IPv6 link-local nexthops In addition to IPv4 multipath tests with IPv4 nexthops, also test IPv4 multipath with nexthops that use IPv6 link-local addresses. Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit ffb721515bf3352f38457fd2ab19f575e75e190e Author: Ido Schimmel Date: Thu Nov 19 15:08:45 2020 +0200 selftests: forwarding: Do not configure nexthop objects twice routing_nh_obj() is used to configure the nexthop objects employed by the test, but it is called twice resulting in "RTNETLINK answers: File exists" messages. Remove the first call, so that the function is only called after setup_wait(), when all the interfaces are up and ready. Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit 20ac8f8690535161d9357f5b4af4dfdf88c56578 Author: Ido Schimmel Date: Thu Nov 19 15:08:44 2020 +0200 selftests: mlxsw: Add nexthop objects configuration tests Test that unsupported nexthop objects are rejected and that offload indication is correctly set on: nexthop objects, nexthop group objects and routes associated these objects. Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit cdd6cfc54c6405db98dd60cc465d105b207d7bf5 Author: Ido Schimmel Date: Thu Nov 19 15:08:43 2020 +0200 mlxsw: spectrum_router: Allow programming routes with nexthop objects Now that the driver supports nexthop objects, the check is no longer necessary. Remove it. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit c25db3a77f61ce82f645545f18c865b671db50ea Author: Ido Schimmel Date: Thu Nov 19 15:08:42 2020 +0200 mlxsw: spectrum_router: Enable resolution of nexthop groups from nexthop objects If the FIB info (i.e, 'struct fib_info', 'struct fib6_info') uses a nexthop object, then use the object's identifier to resolve the nexthop group. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit 2a014b200bbd973cc96e082a5bc445fe20b50f32 Author: Ido Schimmel Date: Thu Nov 19 15:08:41 2020 +0200 mlxsw: spectrum_router: Add support for nexthop objects Register a listener to the nexthop notification chain and parse notified nexthop objects into the existing mlxsw nexthop data structures. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit 30abc9cd9c6bdd44d23fc49a9c2526a86fba4305 Author: Christian Eggers Date: Thu Nov 19 12:09:06 2020 +0100 net: dsa: avoid potential use-after-free error If dsa_switch_ops::port_txtstamp() returns false, clone will be freed immediately. Shouldn't store a pointer to freed memory. Signed-off-by: Christian Eggers Reviewed-by: Vladimir Oltean Tested-by: Vladimir Oltean Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20201119110906.25558-1-ceggers@arri.de Signed-off-by: Jakub Kicinski commit d8398bf840f8964220508aff7901c924e322f5e8 Author: Stafford Horne Date: Sat Nov 21 06:54:56 2020 +0900 openrisc: add local64.h to fix blk-iocost build As of 5.10 OpenRISC allyesconfig builds fail with the following error. $ make ARCH=openrisc CROSS_COMPILE=or1k-elf- block/blk-iocost.o CALL scripts/checksyscalls.sh CALL scripts/atomic/check-atomics.sh CC block/blk-iocost.o block/blk-iocost.c:183:10: fatal error: asm/local64.h: No such file or directory 183 | #include | ^~~~~~~~~~~~~~~ compilation terminated. The new include of local64.h was added in commit 5e124f74325d ("blk-iocost: use local[64]_t for percpu stat") by Tejun. Adding the generic version of local64.h to OpenRISC fixes the build issue. Cc: Tejun Heo Signed-off-by: Stafford Horne commit 1f40704bb01b9fba9925006662a37373d514f26b Author: Zhenzhong Duan Date: Tue Nov 17 13:44:08 2020 +0800 PCI: Move pci_match_device() ahead of new_id_store() Move pci_match_device() and its dependencies (pci_match_id() and pci_device_id_any) ahead of new_id_store(). This is preparation work for calling pci_match_device() in new_id_store(). No functional changes. [bhelgaas: update function comments] Link: https://lore.kernel.org/r/20201117054409.3428-2-zhenzhong.duan@gmail.com Signed-off-by: Zhenzhong Duan Signed-off-by: Bjorn Helgaas commit 3e95dfb315de27bb6c6d7012659e396eb5b91e5e Author: Rob Herring Date: Fri Nov 20 15:37:44 2020 -0600 dt-bindings: Don't error out on yamllint and dt-doc-validate errors A broken schema file now causes make to exit and 'make -k' no longer works now that dt-doc-validate is called from a single make rule. As yamllint is optional, we shouldn't stop on yamllint errors either. Also, it seems some old versions of yamllint don't work. Signed-off-by: Rob Herring commit 2ed03e5a84cacddfbf2c8e4442b18679c219bb68 Merge: fc9840fbef0c3 fbb7a1f8137df Author: Jakub Kicinski Date: Fri Nov 20 12:51:56 2020 -0800 Merge branch 'netdevsim-add-ethtool-coalesce-and-ring-settings' Antonio Cardace says: ==================== netdevsim: add ethtool coalesce and ring settings Output of ethtool-ring.sh and ethtool-coalesce.sh selftests: # ./ethtool-ring.sh PASSED all 4 checks # ./ethtool-coalesce.sh PASSED all 22 checks # ./ethtool-pause.sh PASSED all 7 checks ==================== Link: https://lore.kernel.org/r/20201118204522.5660-1-acardace@redhat.com Signed-off-by: Jakub Kicinski commit fbb7a1f8137df4a693ea2b44096ad8ec518e3db1 Author: Antonio Cardace Date: Wed Nov 18 21:45:22 2020 +0100 selftests: add ring and coalesce selftests Add scripts to test ring and coalesce settings of netdevsim. Signed-off-by: Antonio Cardace Signed-off-by: Jakub Kicinski commit 9e48ee80ac4e04c9985379d58248dd2a96a170ef Author: Antonio Cardace Date: Wed Nov 18 21:45:21 2020 +0100 selftests: refactor get_netdev_name function As pointed out by Michal Kubecek, getting the name with the previous approach was racy, it's better and easier to get the name of the device with this patch's approach. Essentialy the function doesn't need to exist anymore as it's a simple 'ls' command. Signed-off-by: Antonio Cardace Signed-off-by: Jakub Kicinski commit fbb8531e58bd989868db3c2513d06870c46bd87f Author: Antonio Cardace Date: Wed Nov 18 21:45:20 2020 +0100 selftests: extract common functions in ethtool-common.sh Factor out some useful functions so that they can be reused by other ethtool-netdevsim scripts. Signed-off-by: Antonio Cardace Signed-off-by: Jakub Kicinski commit a7fc6db099b5cb0278935f6015cd7a0bb11bcb51 Author: Antonio Cardace Date: Wed Nov 18 21:45:19 2020 +0100 netdevsim: support ethtool ring and coalesce settings Add ethtool ring and coalesce settings support for testing. Signed-off-by: Antonio Cardace Reviewed-by: Michal Kubecek Signed-off-by: Jakub Kicinski commit 77f9591b21ed2bcf46c54b13a107fcfbcd6dc988 Author: Antonio Cardace Date: Wed Nov 18 21:45:18 2020 +0100 netdevsim: move ethtool pause params in separate struct This will help the refactoring in the next commit when coalesce and ring settings are added. Signed-off-by: Antonio Cardace Reviewed-by: Michal Kubecek Signed-off-by: Jakub Kicinski commit 4ae21993f07422ec1cb83e9530f87fa61bff02bd Author: Antonio Cardace Date: Wed Nov 18 21:45:17 2020 +0100 ethtool: add ETHTOOL_COALESCE_ALL_PARAMS define This bitmask represents all existing coalesce parameters. Signed-off-by: Antonio Cardace Reviewed-by: Michal Kubecek Signed-off-by: Jakub Kicinski commit d024f27de11c2cb5460894eed09d5e616b81587d Author: Jack Wang Date: Tue Oct 13 09:43:42 2020 +0200 RDMA/ipoib: Distribute cq completion vector better Currently ipoib choose cq completion vector based on port number, when HCA only have one port, all the interface recv queue completion are bind to cq completion vector 0. To better distribute the load, use same method as __ib_alloc_cq_any to choose completion vector, with the change, each interface now use different completion vectors. Link: https://lore.kernel.org/r/20201013074342.15867-1-jinpu.wang@cloud.ionos.com Signed-off-by: Jack Wang Reviewed-by: Gioh Kim Signed-off-by: Jason Gunthorpe commit fc9840fbef0c3740e0fc3640eb8628d70fcb2215 Author: Randy Dunlap Date: Wed Nov 18 11:44:38 2020 -0800 net: stream: fix TCP references when INET is not enabled Fix build of net/core/stream.o when CONFIG_INET is not enabled. Fixes these build errors (sample): ld: net/core/stream.o: in function `sk_stream_write_space': (.text+0x27e): undefined reference to `tcp_stream_memory_free' ld: (.text+0x29c): undefined reference to `tcp_stream_memory_free' ld: (.text+0x2ab): undefined reference to `tcp_stream_memory_free' ld: net/core/stream.o: in function `sk_stream_wait_memory': (.text+0x5a1): undefined reference to `tcp_stream_memory_free' ld: (.text+0x5bf): undefined reference to `tcp_stream_memory_free' Fixes: 1c5f2ced136a ("tcp: avoid indirect call to tcp_stream_memory_free()") Signed-off-by: Randy Dunlap Reported-by: Randy Dunlap Link: https://lore.kernel.org/r/20201118194438.674-1-rdunlap@infradead.org Signed-off-by: Jakub Kicinski commit 7ef95e3dbcee74caa303fe4b23c451ae4462f609 Merge: fab686eb03071 4c222f31fb1db Author: Kees Cook Date: Fri Nov 20 11:39:39 2020 -0800 Merge branch 'for-linus/seccomp' into for-next/seccomp commit fab686eb0307121e7a2890b6d6c57edd2457863d Author: Jann Horn Date: Fri Nov 20 18:05:45 2020 +0100 seccomp: Remove bogus __user annotations Buffers that are passed to read_actions_logged() and write_actions_logged() are in kernel memory; the sysctl core takes care of copying from/to userspace. Fixes: 32927393dc1c ("sysctl: pass kernel pointers to ->proc_handler") Reviewed-by: Tyler Hicks Signed-off-by: Jann Horn Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20201120170545.1419332-1-jannh@google.com commit 91b2db27d3ff9ad29e8b3108dfbf1e2f49fe9bd3 Author: Song Liu Date: Thu Nov 19 16:28:33 2020 -0800 bpf: Simplify task_file_seq_get_next() Simplify task_file_seq_get_next() by removing two in/out arguments: task and fstruct. Use info->task and info->files instead. Signed-off-by: Song Liu Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20201120002833.2481110-1-songliubraving@fb.com commit 5bc0d7561aa0973016d46c2e387a58c5e66565dc Merge: 7bd5175918eb4 f7d933388f11f Author: Kevin Hilman Date: Fri Nov 20 11:34:10 2020 -0800 Merge tag 'amlogic-fixes' into v5.11/dt64 Amlogic fixes for v5.10-rc1 - misc DT only fixes commit 3371c6f9f4115d8949e093be8299a9c1ebe29137 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:23:50 2020 -0600 ASoC: codecs: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of just letting the code fall through, and also add fallthrough pseudo-keywords in places where the code is intended to fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/d17b4d8300dbb6aff0d055b06b487c96ca264757.1605896059.git.gustavoars@kernel.org Signed-off-by: Mark Brown commit 0d8315dddd2899f519fe1ca3d4d5cdaf44ea421e Author: YiFei Zhu Date: Wed Nov 11 07:33:54 2020 -0600 seccomp/cache: Report cache data through /proc/pid/seccomp_cache Currently the kernel does not provide an infrastructure to translate architecture numbers to a human-readable name. Translating syscall numbers to syscall names is possible through FTRACE_SYSCALL infrastructure but it does not provide support for compat syscalls. This will create a file for each PID as /proc/pid/seccomp_cache. The file will be empty when no seccomp filters are loaded, or be in the format of: where ALLOW means the cache is guaranteed to allow the syscall, and filter means the cache will pass the syscall to the BPF filter. For the docker default profile on x86_64 it looks like: x86_64 0 ALLOW x86_64 1 ALLOW x86_64 2 ALLOW x86_64 3 ALLOW [...] x86_64 132 ALLOW x86_64 133 ALLOW x86_64 134 FILTER x86_64 135 FILTER x86_64 136 FILTER x86_64 137 ALLOW x86_64 138 ALLOW x86_64 139 FILTER x86_64 140 ALLOW x86_64 141 ALLOW [...] This file is guarded by CONFIG_SECCOMP_CACHE_DEBUG with a default of N because I think certain users of seccomp might not want the application to know which syscalls are definitely usable. For the same reason, it is also guarded by CAP_SYS_ADMIN. Suggested-by: Jann Horn Link: https://lore.kernel.org/lkml/CAG48ez3Ofqp4crXGksLmZY6=fGrF_tWyUCg7PBkAetvbbOPeOA@mail.gmail.com/ Signed-off-by: YiFei Zhu Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/94e663fa53136f5a11f432c661794d1ee7060779.1605101222.git.yifeifz2@illinois.edu commit 445247b02342a05b7d528bba6d85d2d418875b69 Author: YiFei Zhu Date: Wed Nov 11 07:33:53 2020 -0600 xtensa: Enable seccomp architecture tracking To enable seccomp constant action bitmaps, we need to have a static mapping to the audit architecture and system call table size. Add these for xtensa. Signed-off-by: YiFei Zhu Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/79669648ba167d668ea6ffb4884250abcd5ed254.1605101222.git.yifeifz2@illinois.edu commit 4c18bc054bffe415bec9e0edaa9ff1a84c1a6973 Author: YiFei Zhu Date: Wed Nov 11 07:33:52 2020 -0600 sh: Enable seccomp architecture tracking To enable seccomp constant action bitmaps, we need to have a static mapping to the audit architecture and system call table size. Add these for sh. Signed-off-by: YiFei Zhu Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/61ae084cd4783b9b50860d9dedb4a348cf1b7b6f.1605101222.git.yifeifz2@illinois.edu commit c09058eda2654c37fd7ac28c2004c3aae8b988e9 Author: YiFei Zhu Date: Wed Nov 11 07:33:51 2020 -0600 s390: Enable seccomp architecture tracking To enable seccomp constant action bitmaps, we need to have a static mapping to the audit architecture and system call table size. Add these for s390. Signed-off-by: YiFei Zhu Acked-by: Heiko Carstens Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/a381b10aa2c5b1e583642f3cd46ced842d9d4ce5.1605101222.git.yifeifz2@illinois.edu commit 673a11a7e4152b101bad6851c4e4c34c7c6d6dde Author: YiFei Zhu Date: Wed Nov 11 07:33:50 2020 -0600 riscv: Enable seccomp architecture tracking To enable seccomp constant action bitmaps, we need to have a static mapping to the audit architecture and system call table size. Add these for riscv. Signed-off-by: YiFei Zhu Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/58ef925d00505cbb77478fa6bd2b48ab2d902460.1605101222.git.yifeifz2@illinois.edu commit e7bcb4622ddf4473da6c03fa8423919a568c57dc Author: YiFei Zhu Date: Wed Nov 11 07:33:49 2020 -0600 powerpc: Enable seccomp architecture tracking To enable seccomp constant action bitmaps, we need to have a static mapping to the audit architecture and system call table size. Add these for powerpc. __LITTLE_ENDIAN__ is used here instead of CONFIG_CPU_LITTLE_ENDIAN to keep it consistent with asm/syscall.h. Signed-off-by: YiFei Zhu Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/0b64925362671cdaa26d01bfe50b3ba5e164adfd.1605101222.git.yifeifz2@illinois.edu commit 6aa7923c8737d1f8fd2a06154155d68dec646464 Author: YiFei Zhu Date: Wed Nov 11 07:33:48 2020 -0600 parisc: Enable seccomp architecture tracking To enable seccomp constant action bitmaps, we need to have a static mapping to the audit architecture and system call table size. Add these for parisc. Signed-off-by: YiFei Zhu Acked-by: Helge Deller Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/9bb86c546eda753adf5270425e7353202dbce87c.1605101222.git.yifeifz2@illinois.edu commit 6e9ae6f98809e0d123ff4d769ba2e6f652119138 Author: YiFei Zhu Date: Wed Nov 11 07:33:47 2020 -0600 csky: Enable seccomp architecture tracking To enable seccomp constant action bitmaps, we need to have a static mapping to the audit architecture and system call table size. Add these for csky. Signed-off-by: YiFei Zhu Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/f9219026d4803b22f3e57e3768b4e42e004ef236.1605101222.git.yifeifz2@illinois.edu commit 424c9102fa7b2a5c15afe47fd14278c849f4eefb Author: Kees Cook Date: Tue Oct 27 12:26:58 2020 -0700 arm: Enable seccomp architecture tracking To enable seccomp constant action bitmaps, we need to have a static mapping to the audit architecture and system call table size. Add these for arm. Signed-off-by: Kees Cook commit ffde703470b03b1000017ed35c4f90a90caa22cf Author: Kees Cook Date: Tue Oct 27 12:23:19 2020 -0700 arm64: Enable seccomp architecture tracking To enable seccomp constant action bitmaps, we need to have a static mapping to the audit architecture and system call table size. Add these for arm64. Signed-off-by: Kees Cook commit 192cf32243ce39af65bd095625aec374b38c03df Author: Kees Cook Date: Sun Oct 11 10:47:45 2020 -0500 selftests/seccomp: Compare bitmap vs filter overhead As part of the seccomp benchmarking, include the expectations with regard to the timing behavior of the constant action bitmaps, and report inconsistencies better. Example output with constant action bitmaps on x86: $ sudo ./seccomp_benchmark 100000000 Current BPF sysctl settings: net.core.bpf_jit_enable = 1 net.core.bpf_jit_harden = 0 Benchmarking 200000000 syscalls... 129.359381409 - 0.008724424 = 129350656985 (129.4s) getpid native: 646 ns 264.385890006 - 129.360453229 = 135025436777 (135.0s) getpid RET_ALLOW 1 filter (bitmap): 675 ns 399.400511893 - 264.387045901 = 135013465992 (135.0s) getpid RET_ALLOW 2 filters (bitmap): 675 ns 545.872866260 - 399.401718327 = 146471147933 (146.5s) getpid RET_ALLOW 3 filters (full): 732 ns 696.337101319 - 545.874097681 = 150463003638 (150.5s) getpid RET_ALLOW 4 filters (full): 752 ns Estimated total seccomp overhead for 1 bitmapped filter: 29 ns Estimated total seccomp overhead for 2 bitmapped filters: 29 ns Estimated total seccomp overhead for 3 full filters: 86 ns Estimated total seccomp overhead for 4 full filters: 106 ns Estimated seccomp entry overhead: 29 ns Estimated seccomp per-filter overhead (last 2 diff): 20 ns Estimated seccomp per-filter overhead (filters / 4): 19 ns Expectations: native ≤ 1 bitmap (646 ≤ 675): ✔️ native ≤ 1 filter (646 ≤ 732): ✔️ per-filter (last 2 diff) ≈ per-filter (filters / 4) (20 ≈ 19): ✔️ 1 bitmapped ≈ 2 bitmapped (29 ≈ 29): ✔️ entry ≈ 1 bitmapped (29 ≈ 29): ✔️ entry ≈ 2 bitmapped (29 ≈ 29): ✔️ native + entry + (per filter * 4) ≈ 4 filters total (755 ≈ 752): ✔️ [YiFei: Changed commit message to show stats for this patch series] Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/1b61df3db85c5f7f1b9202722c45e7b39df73ef2.1602431034.git.yifeifz2@illinois.edu commit 25db91209a910a0ccf8b093743088d0f4bf5659f Author: Kees Cook Date: Sun Oct 11 10:47:44 2020 -0500 x86: Enable seccomp architecture tracking Provide seccomp internals with the details to calculate which syscall table the running kernel is expecting to deal with. This allows for efficient architecture pinning and paves the way for constant-action bitmaps. Co-developed-by: YiFei Zhu Signed-off-by: YiFei Zhu Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/da58c3733d95c4f2115dd94225dfbe2573ba4d87.1602431034.git.yifeifz2@illinois.edu commit 8e01b51a31a1e08e2c3e8fcc0ef6790441be2f61 Author: YiFei Zhu Date: Sun Oct 11 10:47:43 2020 -0500 seccomp/cache: Add "emulator" to check if filter is constant allow SECCOMP_CACHE will only operate on syscalls that do not access any syscall arguments or instruction pointer. To facilitate this we need a static analyser to know whether a filter will return allow regardless of syscall arguments for a given architecture number / syscall number pair. This is implemented here with a pseudo-emulator, and stored in a per-filter bitmap. In order to build this bitmap at filter attach time, each filter is emulated for every syscall (under each possible architecture), and checked for any accesses of struct seccomp_data that are not the "arch" nor "nr" (syscall) members. If only "arch" and "nr" are examined, and the program returns allow, then we can be sure that the filter must return allow independent from syscall arguments. Nearly all seccomp filters are built from these cBPF instructions: BPF_LD | BPF_W | BPF_ABS BPF_JMP | BPF_JEQ | BPF_K BPF_JMP | BPF_JGE | BPF_K BPF_JMP | BPF_JGT | BPF_K BPF_JMP | BPF_JSET | BPF_K BPF_JMP | BPF_JA BPF_RET | BPF_K BPF_ALU | BPF_AND | BPF_K Each of these instructions are emulated. Any weirdness or loading from a syscall argument will cause the emulator to bail. The emulation is also halted if it reaches a return. In that case, if it returns an SECCOMP_RET_ALLOW, the syscall is marked as good. Emulator structure and comments are from Kees [1] and Jann [2]. Emulation is done at attach time. If a filter depends on more filters, and if the dependee does not guarantee to allow the syscall, then we skip the emulation of this syscall. [1] https://lore.kernel.org/lkml/20200923232923.3142503-5-keescook@chromium.org/ [2] https://lore.kernel.org/lkml/CAG48ez1p=dR_2ikKq=xVxkoGg0fYpTBpkhJSv1w-6BG=76PAvw@mail.gmail.com/ Suggested-by: Jann Horn Signed-off-by: YiFei Zhu Reviewed-by: Jann Horn Co-developed-by: Kees Cook Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/71c7be2db5ee08905f41c3be5c1ad6e2601ce88f.1602431034.git.yifeifz2@illinois.edu commit f9d480b6ffbeb336bf7f6ce44825c00f61b3abae Author: YiFei Zhu Date: Sun Oct 11 10:47:42 2020 -0500 seccomp/cache: Lookup syscall allowlist bitmap for fast path The overhead of running Seccomp filters has been part of some past discussions [1][2][3]. Oftentimes, the filters have a large number of instructions that check syscall numbers one by one and jump based on that. Some users chain BPF filters which further enlarge the overhead. A recent work [6] comprehensively measures the Seccomp overhead and shows that the overhead is non-negligible and has a non-trivial impact on application performance. We observed some common filters, such as docker's [4] or systemd's [5], will make most decisions based only on the syscall numbers, and as past discussions considered, a bitmap where each bit represents a syscall makes most sense for these filters. The fast (common) path for seccomp should be that the filter permits the syscall to pass through, and failing seccomp is expected to be an exceptional case; it is not expected for userspace to call a denylisted syscall over and over. When it can be concluded that an allow must occur for the given architecture and syscall pair (this determination is introduced in the next commit), seccomp will immediately allow the syscall, bypassing further BPF execution. Each architecture number has its own bitmap. The architecture number in seccomp_data is checked against the defined architecture number constant before proceeding to test the bit against the bitmap with the syscall number as the index of the bit in the bitmap, and if the bit is set, seccomp returns allow. The bitmaps are all clear in this patch and will be initialized in the next commit. When only one architecture exists, the check against architecture number is skipped, suggested by Kees Cook [7]. [1] https://lore.kernel.org/linux-security-module/c22a6c3cefc2412cad00ae14c1371711@huawei.com/T/ [2] https://lore.kernel.org/lkml/202005181120.971232B7B@keescook/T/ [3] https://github.com/seccomp/libseccomp/issues/116 [4] https://github.com/moby/moby/blob/ae0ef82b90356ac613f329a8ef5ee42ca923417d/profiles/seccomp/default.json [5] https://github.com/systemd/systemd/blob/6743a1caf4037f03dc51a1277855018e4ab61957/src/shared/seccomp-util.c#L270 [6] Draco: Architectural and Operating System Support for System Call Security https://tianyin.github.io/pub/draco.pdf, MICRO-53, Oct. 2020 [7] https://lore.kernel.org/bpf/202010091614.8BB0EB64@keescook/ Co-developed-by: Dimitrios Skarlatos Signed-off-by: Dimitrios Skarlatos Signed-off-by: YiFei Zhu Reviewed-by: Jann Horn Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/10f91a367ec4fcdea7fc3f086de3f5f13a4a7436.1602431034.git.yifeifz2@illinois.edu commit 76483980174c6ff80cc4d02a444f2815073d203d Author: Colin Ian King Date: Wed Nov 18 14:38:03 2020 +0000 octeontx2-af: Fix access of iter->entry after iter object has been kfree'd The call to pc_delete_flow can kfree the iter object, so the following dev_err message that accesses iter->entry can accessmemory that has just been kfree'd. Fix this by adding a temporary variable 'entry' that has a copy of iter->entry and also use this when indexing into the array mcam->entry2target_pffunc[]. Also print the unsigned value using the %u format specifier rather than %d. Addresses-Coverity: ("Read from pointer after free") Fixes: 55307fcb9258 ("octeontx2-af: Add mbox messages to install and delete MCAM rules") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20201118143803.463297-1-colin.king@canonical.com Signed-off-by: Jakub Kicinski commit dd6028a3cb5da85d6c8ff20a593a7a70d10d650c Author: Colin Ian King Date: Wed Nov 18 13:25:02 2020 +0000 octeontx2-af: Fix return of uninitialized variable err Currently the variable err may be uninitialized if several of the if statements are not executed in function nix_tx_vtag_decfg and a garbage value in err is returned. Fix this by initialized ret at the start of the function. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: 9a946def264d ("octeontx2-af: Modify nix_vtag_cfg mailbox to support TX VTAG entries") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20201118132502.461098-1-colin.king@canonical.com Signed-off-by: Jakub Kicinski commit 583b273dea75720ce74cc45afeeb96d88246e582 Author: Colin Ian King Date: Wed Nov 18 13:05:20 2020 +0000 octeontx2-pf: Fix unintentional sign extension issue The shifting of the u16 result from ntohs(proto) by 16 bits to the left will be promoted to a 32 bit signed int and then sign-extended to a u64. In the event that the top bit of the return from ntohs(proto) is set then all then all the upper 32 bits of a 64 bit long end up as also being set because of the sign-extension. Fix this by casting to a u64 long before the shift. Addresses-Coverity: ("Unintended sign extension") Fixes: f0c2982aaf98 ("octeontx2-pf: Add support for SR-IOV management function") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20201118130520.460365-1-colin.king@canonical.com Signed-off-by: Jakub Kicinski commit b5fb0b1bbb5021339cfe9e9fe8177a50047545f1 Merge: 1a0058cf0c8f5 76638a2e58509 Author: Jakub Kicinski Date: Fri Nov 20 11:01:56 2020 -0800 Merge branch 'add-support-for-marvell-octeontx2-cryptographic' Srujana Challa says: ==================== Add Support for Marvell OcteonTX2 Cryptographic This patchset adds support for CPT in OcteonTX2 admin function(AF). CPT is a cryptographic accelerator unit and it includes microcoded Giga Cipher engines. OcteonTX2 SOC's resource virtualization unit (RVU) supports multiple physical and virtual functions. Each of the PF/VF's functionality is determined by what kind of resources are attached to it. When the CPT block is attached to a VF, it can function as a security device. The following document provides an overview of the hardware and different drivers for the OcteonTX2 SOC: https://www.kernel.org/doc/Documentation/networking/device_drivers/marvell/octeontx2.rst This patch series includes: - Patch to update existing Marvell sources to support CPT. - Patch that adds mailbox messages to the admin function (AF) driver, to configure CPT HW registers. - Patch to provide debug information about CPT. ==================== Link: https://lore.kernel.org/r/20201118114416.28307-1-schalla@marvell.com Signed-off-by: Jakub Kicinski commit 76638a2e585097c92a77138a354bf03b2af6c851 Author: Srujana Challa Date: Wed Nov 18 17:14:16 2020 +0530 octeontx2-af: add debugfs entries for CPT block Add entries to debugfs at /sys/kernel/debug/octeontx2/cpt. cpt_pc: dump cpt performance HW registers. Usage: cat /sys/kernel/debug/octeontx2/cpt/cpt_pc cpt_ae_sts: show cpt asymmetric engines current state Usage: cat /sys/kernel/debug/octeontx2/cpt/cpt_ae_sts cpt_se_sts: show cpt symmetric engines current state Usage: cat /sys/kernel/debug/octeontx2/cpt/cpt_se_sts cpt_engines_info: dump cpt engine control registers. Usage: cat /sys/kernel/debug/octeontx2/cpt/cpt_engines_info cpt_lfs_info: dump cpt lfs control registers. Usage: cat /sys/kernel/debug/octeontx2/cpt/cpt_lfs_info cpt_err_info: dump cpt error registers. Usage: cat /sys/kernel/debug/octeontx2/cpt/cpt_err_info Signed-off-by: Suheil Chandran Signed-off-by: Srujana Challa Signed-off-by: Jakub Kicinski commit ae454086e3c227f78acb718249064aecb94da1e8 Author: Srujana Challa Date: Wed Nov 18 17:14:15 2020 +0530 octeontx2-af: add mailbox interface for CPT On OcteonTX2 SoC, the admin function (AF) is the only one with all priviliges to configure HW and alloc resources, PFs and it's VFs have to request AF via mailbox for all their needs. This patch adds a mailbox interface for CPT PFs and VFs to allocate resources for cryptography. It also adds hardware CPT AF register defines. Signed-off-by: Suheil Chandran Signed-off-by: Lukasz Bartosik Signed-off-by: Srujana Challa Signed-off-by: Jakub Kicinski commit 956fb852181e4e4b16ccad62511e0038d3ed4928 Author: Srujana Challa Date: Wed Nov 18 17:14:14 2020 +0530 octeontx2-pf: move lmt flush to include/linux/soc On OcteonTX2 platform CPT instruction enqueue and NIX packet send are only possible via LMTST operations which uses LDEOR instruction. This patch moves lmt flush function from OcteonTX2 nic driver to include/linux/soc since it will be used by OcteonTX2 CPT and NIC driver for LMTST. Signed-off-by: Suheil Chandran Signed-off-by: Srujana Challa Signed-off-by: Jakub Kicinski commit 1a0058cf0c8f5f7ecb2ef2bfe6cfc004d6598769 Author: Tariq Toukan Date: Wed Nov 18 12:34:27 2020 +0200 net/mlx4_en: Remove unused performance counters Performance analysis counters are maintained under the MLX4_EN_PERF_STAT definition, which is never set. Clean them up, with all related structures and logic. Signed-off-by: Tariq Toukan Reviewed-by: Moshe Shemesh Link: https://lore.kernel.org/r/20201118103427.4314-1-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit dea87d0889dd663bd32e86824a0b35cd617ae1d0 Author: Lakshmi Ramasubramanian Date: Thu Nov 12 12:39:59 2020 -0800 ima: select ima-buf template for buffer measurement The default IMA template used for all policy rules is the value set for CONFIG_IMA_DEFAULT_TEMPLATE if the policy rule does not specify a template. The default IMA template for buffer measurements should be 'ima-buf' - so that the measured buffer is correctly included in the IMA measurement log entry. With the default template format, buffer measurements are added to the measurement list, but do not include the buffer data, making it difficult, if not impossible, to validate. Including 'ima-buf' template records in the measurement list by default, should not impact existing attestation servers without 'ima-buf' template support. Initialize a global 'ima-buf' template and select that template, by default, for buffer measurements. Signed-off-by: Lakshmi Ramasubramanian Signed-off-by: Mimi Zohar commit 341917490d7d68d2f7267a265b8820fc3f8ead1b Author: Gustavo Pimentel Date: Wed Nov 18 23:49:20 2020 +0100 PCI: Decode PCIe 64 GT/s link speed PCIe r6.0, sec 7.5.3.18, defines a new 64.0 GT/s bit in the Supported Link Speeds Vector of Link Capabilities 2. This patch does not affect the speed of the link, which should be negotiated automatically by the hardware; it only adds decoding when showing the speed to the user. Decode this new speed. Previously, reading the speed of a link operating at this speed showed "Unknown speed" instead of "64.0 GT/s". Link: https://lore.kernel.org/r/aaaab33fe18975e123a84aebce2adb85f44e2bbe.1605739760.git.gustavo.pimentel@synopsys.com Signed-off-by: Gustavo Pimentel Signed-off-by: Bjorn Helgaas Reviewed-by: Krzysztof Wilczyński commit 334ef6ed06fa1a54e35296b77b693bcf6d63ee9e Author: Heiko Carstens Date: Wed Nov 18 21:32:33 2020 +0100 init/Kconfig: make COMPILE_TEST depend on !S390 While allmodconfig and allyesconfig build for s390 there are also various bots running compile tests with randconfig, where PCI is disabled. This reveals that a lot of drivers should actually depend on HAS_IOMEM. Adding this to each device driver would be a never ending story, therefore just disable COMPILE_TEST for s390. The reasoning is more or less the same as described in commit bc083a64b6c0 ("init/Kconfig: make COMPILE_TEST depend on !UML"). Reported-by: kernel test robot Suggested-by: Arnd Bergmann Signed-off-by: Heiko Carstens commit 12bb4c682354740e4aaf0103a9bf283df42adaa9 Author: Alexander Gordeev Date: Tue Nov 10 10:36:23 2020 +0100 s390/vmem: make variable and function names consistent Rename some variable and functions to better clarify what they are and what they do. Signed-off-by: Alexander Gordeev Signed-off-by: Heiko Carstens commit af71657c153fc18d7bcd35a3d5240fbd1ac7ebbd Author: Alexander Gordeev Date: Tue Nov 10 10:36:21 2020 +0100 s390/vmem: remove redundant check Reviewed-by: David Hildenbrand Signed-off-by: Alexander Gordeev Signed-off-by: Heiko Carstens commit 074ff04e279ab8a3f97fefd1b8a313b1e4f04e9b Author: Julian Wiedmann Date: Wed Nov 11 08:13:14 2020 +0100 s390/stp: let subsys_system_register() sysfs attributes Instead of creating the sysfs attributes for the stp root_dev by hand, pass them to subsys_system_register() as parameter. This also ensures that the attributes are available when the KOBJ_ADD event is raised. Signed-off-by: Julian Wiedmann Signed-off-by: Heiko Carstens commit ba1a6be994e8444baf23c14d7be045811197ccb3 Author: Vasily Gorbik Date: Tue Nov 10 23:30:23 2020 +0100 s390/decompressor: print cmdline and BEAR on pgm_check Add kernel command line and last breaking event. The kernel command line is taken from early_command_line and printed only if kernel is not running as protected virtualization guest and if it has been already initialized from the "COMMAND_LINE". Linux version 5.10.0-rc3-22794-gecaa72788df0-dirty (gor@tuxmaker) #28 SMP PREEMPT Mon Nov 9 17:41:20 CET 2020 Kernel command line: audit_enable=0 audit=0 selinux=0 crashkernel=296M root=/dev/dasda1 dasd=ec5b memblock=debug die Kernel fault: interruption code 0005 ilc:2 PSW : 0000000180000000 0000000000012f92 (parse_boot_command_line+0x27a/0x46c) R:0 T:0 IO:0 EX:0 Key:0 M:0 W:0 P:0 AS:0 CC:0 PM:0 RI:0 EA:3 GPRS: 0000000000000000 00ffffffffffffff 0000000000000000 000000000001a65c 000000000000bf60 0000000000000000 00000000000003c0 0000000000000000 0000000000000080 000000000002322d 000000007f29ef20 0000000000efd018 000000000311c000 0000000000010070 0000000000012f82 000000000000bea8 Call Trace: (sp:000000000000bea8 [<000000000002016e>] 000000000002016e) sp:000000000000bf18 [<0000000000012408>] startup_kernel+0x88/0x2fc sp:000000000000bf60 [<00000000000100c4>] startup_normal+0xb0/0xb0 Last Breaking-Event-Address: [<00000000000135ba>] strcmp+0x22/0x24 Reviewed-by: Alexander Egorenkov Acked-by: Viktor Mihajlovski Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit 8977ab65b894d889c3919581bf545ed106a9a1a5 Author: Vasily Gorbik Date: Tue Nov 10 17:05:35 2020 +0100 s390/decompressor: add stacktrace support Decompressor works on a single statically allocated stack. Stacktrace implementation with -mbackchain just takes few lines of code. Linux version 5.10.0-rc3-22793-g0f84a355b776-dirty (gor@tuxmaker) #27 SMP PREEMPT Mon Nov 9 17:30:18 CET 2020 Kernel fault: interruption code 0005 ilc:2 PSW : 0000000180000000 0000000000012f92 (parse_boot_command_line+0x27a/0x46c) R:0 T:0 IO:0 EX:0 Key:0 M:0 W:0 P:0 AS:0 CC:0 PM:0 RI:0 EA:3 GPRS: 0000000000000000 00ffffffffffffff 0000000000000000 000000000001a62c 000000000000bf60 0000000000000000 00000000000003c0 0000000000000000 0000000000000080 000000000002322d 000000007f29ef20 0000000000efd018 000000000311c000 0000000000010070 0000000000012f82 000000000000bea8 Call Trace: (sp:000000000000bea8 [<000000000002016e>] 000000000002016e) sp:000000000000bf18 [<0000000000012408>] startup_kernel+0x88/0x2fc sp:000000000000bf60 [<00000000000100c4>] startup_normal+0xb0/0xb0 Reviewed-by: Alexander Egorenkov Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit 246218962e2175cd1dfa1e5467e9bffae5cc7b5e Author: Vasily Gorbik Date: Wed Nov 11 10:59:40 2020 +0100 s390/decompressor: add symbols support Information printed by print_pgm_check_info() is crucial for debugging decompressor problems. Printing instruction addresses is better than nothing, but turns further debugging into tedious job of figuring out which function those addresses correspond to. This change adds simplistic symbols resolution support. And adds %pS format specifier support to decompressor_printk(). Decompressor symbols list is extracted and sorted with nm -n -S: ... 0000000000010000 0000000000000014 T startup 0000000000010014 00000000000000b0 t startup_normal 0000000000010180 00000000000000b2 t startup_kdump ... Then functions are filtered and contracted to a form: "10000 14 startup\0""10014 b0 startup_normal\0""10180 b2 startup_kdump\0" ... Which makes it trivial to find beginning of an entry and names are 0 terminated, so could be used as is. Symbols are binary-searched. To get symbols list with final addresses and then get it into the decompressor's image the same trick as for kallsyms is used. Decompressor's vmlinux is linked twice. Symbols are stored in .decompressor.syms section, current size is about 2kb. Reviewed-by: Alexander Egorenkov Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit ec55d1e1dbea990145644bd6838c061e8113cc4d Author: Vasily Gorbik Date: Tue Nov 10 17:05:29 2020 +0100 s390/decompressor: correct some asm symbols annotations Use SYM_CODE_* annotations for asm functions, so that function lengths are recognized correctly. Also currently the most part of startup is marked as startup_kdump. Move misplaced startup_kdump where it belongs. $ nm -n -S arch/s390/boot/compressed/vmlinux Before: 0000000000010000 T startup 0000000000010010 T startup_kdump After: 0000000000010000 0000000000000014 T startup 0000000000010014 00000000000000b0 t startup_normal 0000000000010180 00000000000000b2 t startup_kdump Reviewed-by: Alexander Egorenkov Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit 9a78c70a1ba03cb4a8fb96964c6ee77236dd487b Author: Vasily Gorbik Date: Tue Nov 10 17:05:26 2020 +0100 s390/decompressor: add decompressor_printk The decompressor does not have any special debug means. Running the kernel under qemu with gdb is helpful but tedious exercise if done repeatedly. It is also not applicable to debugging under LPAR and z/VM. One special thing which stands out is a working sclp_early_printk, which could be used once the kernel switches to 64-bit addressing mode. But sclp_early_printk does not provide any string formating capabilities. Formatting and printing string without printk-alike function is a not fun. The lack of printk-alike function means people would save up on testing and introduce more bugs. So, finally, provide decompressor_printk function, which fits on one screen and trades features for simplicity. It only supports "%s", "%x" and "%lx" specifiers and zero padding for hex values. Reviewed-by: Alexander Egorenkov Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit c9343637d6b265127dfe37cd7e09eb6feac03032 Author: Vasily Gorbik Date: Thu Nov 12 15:54:47 2020 +0100 s390/ftrace: assume -mhotpatch or -mrecord-mcount always available Currently the kernel minimal compiler requirement is gcc 4.9 or clang 10.0.1. * gcc -mhotpatch option is supported since 4.8. * A combination of -pg -mrecord-mcount -mnop-mcount -mfentry flags is supported since gcc 9 and since clang 10. Drop support for old -pg function prologues. Which leaves binary compatible -mhotpatch / -mnop-mcount -mfentry prologues in a form: brcl 0,0 Which are also do not require initial nop optimization / conversion and presence of _mcount symbol. Signed-off-by: Vasily Gorbik Reviewed-by: Heiko Carstens Signed-off-by: Heiko Carstens commit 73045a08cf5549cc7dee14463431fbeb2134dd67 Author: Vasily Gorbik Date: Mon Oct 19 11:01:33 2020 +0200 s390: unify identity mapping limits handling Currently we have to consider too many different values which in the end only affect identity mapping size. These are: 1. max_physmem_end - end of physical memory online or standby. Always <= end of the last online memory block (get_mem_detect_end()). 2. CONFIG_MAX_PHYSMEM_BITS - the maximum size of physical memory the kernel is able to support. 3. "mem=" kernel command line option which limits physical memory usage. 4. OLDMEM_BASE which is a kdump memory limit when the kernel is executed as crash kernel. 5. "hsa" size which is a memory limit when the kernel is executed during zfcp/nvme dump. Through out kernel startup and run we juggle all those values at once but that does not bring any amusement, only confusion and complexity. Unify all those values to a single one we should really care, that is our identity mapping size. Signed-off-by: Vasily Gorbik Reviewed-by: Alexander Gordeev Acked-by: Heiko Carstens Signed-off-by: Heiko Carstens commit 1e632eaa0f4b7f65a81301205ca122024991e1d3 Author: Julian Wiedmann Date: Thu Nov 5 09:34:34 2020 +0200 s390/prng: let misc_register() add the prng sysfs attributes Instead of creating the sysfs attributes for the prng devices by hand, describe them in .groups and let the misdevice core handle it. This also ensures that the attributes are available when the KOBJ_ADD event is raised. Signed-off-by: Julian Wiedmann Reviewed-by: Harald Freudenberger Signed-off-by: Heiko Carstens commit 5ec11d0966406e4857a642539c5781fe72cc6e22 Author: Mauro Carvalho Chehab Date: Mon Nov 16 11:18:00 2020 +0100 s390/cio: fix kernel-doc markups in cio driver. Fix typo in the kernel-doc markups 1. ccw driver -> ccw_driver 2. ccw_device_id_is_equal() -> ccw_dev_id_is_equal Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Cornelia Huck [vneethv@linux.ibm.com: slight modification in the changelog] Reviewed-by: Vineeth Vijayan Signed-off-by: Heiko Carstens commit 0cd9b7230cc57b0f9cfd13ef5c3830c7db1a68d4 Author: Heiko Carstens Date: Wed Nov 11 18:46:26 2020 +0100 s390: add separate program check exit path System call and program check handler both use the system call exit path when returning to previous context. However the program check handler jumps right to the end of the system call exit path if the previous context is kernel context. This lead to the quite odd double disabling of interrupts in the system call exit path introduced with commit ce9dfafe29be ("s390: fix system call exit path"). To avoid that have a separate program check handler exit path if the previous context is kernel context. Reviewed-by: Sven Schnelle Signed-off-by: Heiko Carstens commit 6c816038016f96751ec2bd992f0ca702eadabff0 Merge: b971cbd03ee0a 78d732e1f326f Author: Heiko Carstens Date: Fri Nov 20 19:15:58 2020 +0100 Merge branch 'fixes' into features * fixes: s390/cpum_sf.c: fix file permission for cpum_sfb_size s390: update defconfigs s390: fix system call exit path Signed-off-by: Heiko Carstens commit 12f4bd86225e348ef3a3c8d2bb42dc23ee0f0a4c Author: Paolo Abeni Date: Tue Nov 17 19:43:49 2020 +0100 net: add annotation for sock_{lock,unlock}_fast The static checker is fooled by the non-static locking scheme implemented by the mentioned helpers. Let's make its life easier adding some unconditional annotation so that the helpers are now interpreted as a plain spinlock from sparse. v1 -> v2: - add __releases() annotation to unlock_sock_fast() Signed-off-by: Paolo Abeni Link: https://lore.kernel.org/r/6ed7ae627d8271fb7f20e0a9c6750fbba1ac2635.1605634911.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski commit c3bc2adb051b27ad1d7fcef6ff80673915c43b0d Author: Lorenzo Bianconi Date: Tue Nov 17 10:35:28 2020 +0100 net: netsec: add xdp tx return bulking support Convert netsec driver to xdp_return_frame_bulk APIs. Rely on xdp_return_frame_rx_napi for XDP_TX in order to try to recycle the page in the "in-irq" page_pool cache. Co-developed-by: Jesper Dangaard Brouer Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/01487b8f5167d62649339469cdd0c6d8df885902.1605605531.git.lorenzo@kernel.org Signed-off-by: Jakub Kicinski commit e2ef5203c817a60bfb591343ffd851b6537370ff Author: Numan Siddique Date: Mon Nov 16 18:31:26 2020 +0530 net: openvswitch: Be liberal in tcp conntrack. There is no easy way to distinguish if a conntracked tcp packet is marked invalid because of tcp_in_window() check error or because it doesn't belong to an existing connection. With this patch, openvswitch sets liberal tcp flag for the established sessions so that out of window packets are not marked invalid. A helper function - nf_ct_set_tcp_be_liberal(nf_conn) is added which sets this flag for both the directions of the nf_conn. Suggested-by: Florian Westphal Signed-off-by: Numan Siddique Acked-by: Florian Westphal Link: https://lore.kernel.org/r/20201116130126.3065077-1-nusiddiq@redhat.com Signed-off-by: Jakub Kicinski commit e87d17ca6af5ba4466538de87785cfc8c20af59a Author: Kishon Vijay Abraham I Date: Fri Nov 6 20:41:07 2020 +0530 PCI: cadence: Do not error if "cdns,max-outbound-regions" is not found Now that "cdns,max-outbound-regions" is made an optional property, do not error out if "cdns,max-outbound-regions" device tree property is not found. Link: http://lore.kernel.org/r/20201105165331.GA55814@bogus Link: https://lore.kernel.org/r/20201106151107.3987-3-kishon@ti.com Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit 4a2b9125c9851b0f7894b93daeaf4900ec95606f Author: Kishon Vijay Abraham I Date: Fri Nov 6 20:41:06 2020 +0530 dt-bindings: PCI: Make "cdns,max-outbound-regions" optional property Make "cdns,max-outbound-regions" optional property with the default being 32. Link: http://lore.kernel.org/r/20201105165331.GA55814@bogus Link: https://lore.kernel.org/r/20201106151107.3987-2-kishon@ti.com Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit 64fc0a030987eec45c5362618bacdef7227783d5 Author: Lad Prabhakar Date: Wed Nov 4 10:58:16 2020 +0900 dt-bindings: PCI: rcar-pci-host: Document r8a774e1 bindings Document the RZ/G2H (a.k.a. R8A774E1) SoC in the R-Car PCIe bingings. [shimoda: minor change the subject and description] Link: https://lore.kernel.org/r/1604455096-13923-4-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Lad Prabhakar Signed-off-by: Yoshihiro Shimoda Signed-off-by: Lorenzo Pieralisi Reviewed-by: Marian-Cristian Rotariu Reviewed-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Acked-by: Rob Herring commit 2228af80935aa5440dff2e5b3a2c5d25d9d61334 Author: Yoshihiro Shimoda Date: Wed Nov 4 10:58:15 2020 +0900 dt-bindings: PCI: rcar-pci-host: Document r8a77965 bindings Document the R-Car M3-N (R8A77965) SoC in the R-Car PCIe bindings. Link: https://lore.kernel.org/r/1604455096-13923-3-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Yoshihiro Shimoda Signed-off-by: Lorenzo Pieralisi Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring commit 0d69ce3c2c63d4db06b369ef67cb6e73b06a8ad8 Author: Yoshihiro Shimoda Date: Wed Nov 4 10:58:14 2020 +0900 dt-bindings: PCI: rcar-pci-host: Convert bindings to json-schema Convert Renesas PCIe Host controller bindings documentation to json-schema. Note that some compatible doesn't contain on the original documentation so that incremental patches are required for it. Link: https://lore.kernel.org/r/1604455096-13923-2-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Yoshihiro Shimoda Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit e47756c6b4223d045706c5c7fea82c430da30cd2 Author: Bjorn Helgaas Date: Thu Nov 5 08:52:30 2020 -0600 PCI: ibmphp: Remove unneeded break A break is not needed if it is preceded by a return. Based on Tom Rix's treewide patch; this instance extracted from Joe Perches' list. Link: https://lore.kernel.org/r/20201017160928.12698-1-trix@redhat.com Link: https://lore.kernel.org/r/f530b7aeecbbf9654b4540cfa20023a4c2a11889.camel@perches .com Signed-off-by: Bjorn Helgaas Cc: Tom Rix Cc: Joe Perches commit 4257f7e008ea394fcecc050f1569c3503b8bcc15 Author: Vidya Sagar Date: Sun Oct 25 00:34:42 2020 +0530 PCI/ASPM: Save/restore L1SS Capability for suspend/resume Previously ASPM L1 Substates control registers (CTL1 and CTL2) weren't saved and restored during suspend/resume leading to L1 Substates configuration being lost post-resume. Save the L1 Substates control registers so that the configuration is retained post-resume. Link: https://lore.kernel.org/r/20201024190442.871-1-vidyas@nvidia.com Signed-off-by: Vidya Sagar Signed-off-by: Bjorn Helgaas commit ddaff0af653136ee1e0b49116ecf2988c2fc64ca Author: Jim Quinlan Date: Mon Nov 2 15:57:12 2020 -0500 PCI: brcmstb: Initialize "tmp" before use The variable 'tmp' is used multiple times in the brcm_pcie_setup() function. One such usage did not initialize 'tmp' to the current value of the target register. By luck the mistake does not currently affect behavior; regardless 'tmp' is now initialized properly. Suggested-by: Rafał Miłecki Link: https://lore.kernel.org/r/20201102205712.23332-1-james.quinlan@broadcom.com Fixes: c0452137034b ("PCI: brcmstb: Add Broadcom STB PCIe host controller driver") Signed-off-by: Jim Quinlan Signed-off-by: Lorenzo Pieralisi Acked-by: Nicolas Saenz Julienne Acked-by: Florian Fainelli commit 6e8e137abeaba31d48a9d385a8a425cfab4125a4 Author: Lad Prabhakar Date: Fri Oct 23 17:20:08 2020 +0100 PCI: rcar: Drop unused members from struct rcar_pcie_host Drop unused members dev and base from struct rcar_pcie_host. Link: https://lore.kernel.org/r/20201023162008.967-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Lad Prabhakar Signed-off-by: Lorenzo Pieralisi Reviewed-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven commit 695cd09cc9b27ece3315331b5d12195c8b67946b Author: Andy Shevchenko Date: Fri Nov 6 12:05:26 2020 +0200 PCI: Use predefined Pericom Vendor ID Pericom has predefined Vendor ID, use it instead of hard-coded value. Link: https://lore.kernel.org/r/20201106100526.17726-2-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Signed-off-by: Bjorn Helgaas commit f83c37941e881224885f2e694e0626bea358e96b Author: Andy Shevchenko Date: Fri Nov 6 12:05:25 2020 +0200 PCI: Disable MSI for Pericom PCIe-USB adapter Pericom PCIe-USB adapter advertises MSI, but documentation says "The MSI Function is not implemented on this device" in chapters 7.3.27, 7.3.29-7.3.31, and Alberto found that MSI in fact does not work. Disable MSI for these devices. Datasheet: https://www.diodes.com/assets/Datasheets/PI7C9X440SL.pdf Fixes: 306c54d0edb6 ("usb: hcd: Try MSI interrupts on PCI devices") Link: https://lore.kernel.org/linux-usb/20201030134826.GP4077@smile.fi.intel.com/ Link: https://lore.kernel.org/r/20201106100526.17726-1-andriy.shevchenko@linux.intel.com Reported-by: alberto.vignani@fastwebnet.it Signed-off-by: Andy Shevchenko Signed-off-by: Bjorn Helgaas commit 2dd2a1740ee19cd2636d247276cf27bfa434b0e2 Author: Dan Williams Date: Fri Nov 20 08:50:07 2020 -0800 libnvdimm/namespace: Fix reaping of invalidated block-window-namespace labels A recent change to ndctl to attempt to reconfigure namespaces in place uncovered a label accounting problem in block-window-type namespaces. The ndctl "create.sh" test is able to trigger this signature: WARNING: CPU: 34 PID: 9167 at drivers/nvdimm/label.c:1100 __blk_label_update+0x9a3/0xbc0 [libnvdimm] [..] RIP: 0010:__blk_label_update+0x9a3/0xbc0 [libnvdimm] [..] Call Trace: uuid_store+0x21b/0x2f0 [libnvdimm] kernfs_fop_write+0xcf/0x1c0 vfs_write+0xcc/0x380 ksys_write+0x68/0xe0 When allocated capacity for a namespace is renamed (new UUID) the labels with the old UUID need to be deleted. The ndctl behavior to always destroy namespaces on reconfiguration hid this problem. The immediate impact of this bug is limited since block-window-type namespaces only seem to exist in the specification and not in any shipping products. However, the label handling code is being reused for other technologies like CXL region labels, so there is a benefit to making sure both vertical labels sets (block-window) and horizontal label sets (pmem) have a functional reference implementation in libnvdimm. Fixes: c4703ce11c23 ("libnvdimm/namespace: Fix label tracking error") Cc: Cc: Vishal Verma Cc: Dave Jiang Cc: Ira Weiny Signed-off-by: Dan Williams commit 61b39ad9a7d26fe14a2f5f23e5e940e7f9664d41 Author: Wang Qing Date: Mon Nov 9 11:45:41 2020 +0800 x86/head64: Remove duplicate include Remove duplicate header include. Signed-off-by: Wang Qing Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/1604893542-20961-1-git-send-email-wangqing@vivo.com commit 278407a53c3b33fb820332c4d39eb39316c3879a Author: Pavel Hofman Date: Fri Nov 20 17:39:20 2020 +0100 ARM: dts: bcm283x: increase dwc2's RX FIFO size The previous version of the dwc2 overlay set the RX FIFO size to 256 4-byte words. This is not enough for 1024 bytes of the largest isochronous high speed packet allowed, because it doesn't take into account extra space needed by dwc2. RX FIFO's size is calculated based on the following (in 4byte words): - 13 locations for SETUP packets 5*n + 8 for Slave and Buffer DMA mode where n is number of control endpoints which is 1 on the bcm283x core - 1 location for Global OUT NAK - 2 * 257 locations for status information and the received packet. Typically two spaces are recommended so that when the previous packet is being transferred to AHB, the USB can receive the subsequent packet. - 10 * 1 location for transfer complete status for last packet of each endpoint. The bcm283x core has 5 IN and 5 OUT EPs - 10 * 1 additional location for EPDisable status for each endpoint - 5 * 2 additional locations are recommended for each OUT endpoint Total is 558 locations. Signed-off-by: Phil Elwell Signed-off-by: Pavel Hofman Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/e9e7d070-593c-122f-3a5c-2435bb147ab2@ivitera.com/ commit 358afb8b746d4a7ebaeeeaab7a1523895a8572c2 Author: Maxime Ripard Date: Thu Oct 29 14:40:18 2020 +0100 ARM: dts: rpi-4: disable wifi frequencies The RPi4 WiFi chip and HDMI outputs have some frequency overlap with crosstalk around 2.4GHz. Let's mark it as such so we can use some evasive maneuvers. Signed-off-by: Maxime Ripard Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20201029134018.1948636-3-maxime@cerno.tech commit f805e7e09c8f6d56f3e9bd2e7cec729f9d0855d0 Author: Ranjani Sridharan Date: Fri Nov 20 16:16:53 2020 +0200 ASoC: SOF: nocodec: modify DAI link definitions The ignore_machine field in the component driver is used to ignore the FE DAI links defined in the machine driver, override BE fixups and set the stream names for the DAI links defined in the machine driver. This is required to make SOF compatible with the legacy machine drivers. In the case of the nocodec machine driver in SOF, there is no need to rely upon this ignore_machine logic in the core. Modify the machine driver to set DAI link stream names and the BE hw_params_fixup callback appropriately. Signed-off-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20201120141653.2160134-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 7c1d0e554a359cca77bfabd2a29b06f5322d172d Author: Curtis Malainey Date: Fri Nov 20 16:40:25 2020 +0200 ASoC: SOF: IPC: fix implicit type overflow Implicit values may have a length of 15bits (s16) so we need to declare the proper size so we don't get undefined behaviour. This appears to be arch and compiler dependent. This commit is to keep the headers aligned between the firmware and kernel. UBSan discovered this bug in the firmware. Signed-off-by: Curtis Malainey Reviewed-by: Guennadi Liakhovetski Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20201120144025.2166023-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 6160aca443148416994c022a35c77daeba948ea6 Author: Nicolin Chen Date: Wed Oct 28 17:48:20 2020 -0700 clk: tegra: Do not return 0 on failure Return values from read_dt_param() will be either TRUE (1) or FALSE (0), while dfll_fetch_pwm_params() returns 0 on success or an ERR code on failure. So this patch fixes the bug of returning 0 on failure. Fixes: 36541f0499fe ("clk: tegra: dfll: support PWM regulator control") Cc: Signed-off-by: Nicolin Chen Signed-off-by: Thierry Reding commit 6b114d8b4dedab4712bfa77b4bdd81813aba3895 Merge: 991e74d149eb9 6e85530496a49 Author: Mark Brown Date: Fri Nov 20 16:09:46 2020 +0000 Merge series "ASoC: mt6359: Fix regulator_dev_lookup() fails for id "LDO_VAUD18"" from Jiaxin Yu : This series fixed "LDO_VAUD18-supply" regulator register fail. We can see the error log "mt6359-sound supply LDO_VAUD18 not found, using dummy regulator" when register the DAPM widget "LDO_VAUD18" Otherwise, the power can not be turned on correctly when recording. Jiaxin Yu (2): ASoC: mediatek: mt6359: Fix regulator_dev_lookup() fails for id "LDO_VAUD18" dt-bindings: mediatek: mt6359: remove unused property for mt6359 Documentation/devicetree/bindings/sound/mt6359.yaml | 9 --------- sound/soc/codecs/mt6359.c | 7 ++++--- 2 files changed, 4 insertions(+), 12 deletions(-) -- 2.18.0 commit 991e74d149eb9027881bd7423a8cdb87c212396a Merge: ddf1c4b3944ad d512ef22d77b0 Author: Mark Brown Date: Fri Nov 20 16:09:39 2020 +0000 Merge series "ASoC: Intel/SOF: extend run-time driver selection to ACPI devices" from Pierre-Louis Bossart : The module snd-intel-dspcfg, suggested by Jaroslav last year, currently provide the means to select a PCI driver at run-time, based on quirks, recommendations or user selection via a kernel parameter. This capability removed a lot of confusions in distributions and removed the need for recompilations to select legacy HDaudio, SST or SOF drivers. This patchset extends the concept to ACPI devices. This was driven by the desire to at some point deprecate the Atom/SST driver for Baytrail and Cherrytrail, which is no longer maintained by Intel. By having the SOF driver enabled by distributions for Baytrail/Cherrytrail, we can enable more end-user tests and make the transition easier for distributions (likely in 2021 at this point). This patchset provides the same solution for Broadwell, mainly to have a single build for all Intel platforms. SOF on Broadwell remains an option not recommended for distributions, as long as the 'catpt' driver is maintained there is no burning desire to make SOF the default on the three Broadwell-based platforms with the DSP enabled. Pierre-Louis Bossart (14): ASoC: Intel: broadwell: add missing pm_ops ASoC: Intel: bdw-rt5677: add missing pm_ops ALSA: hda: intel-dsp-config: add helper for ACPI DSP driver selection ASoC: soc-acpi: add helper to identify parent driver. ASoC: Intel: boards: byt/cht: set card and driver name at run time ASoC: Intel: byt/cht: set pm ops dynamically ASoC: SOF: acpi: add dynamic selection of DSP driver ASoC: Intel: Atom: add dynamic selection of DSP driver ASoC: SOF: Intel: allow for coexistence between SOF and Atom/SST drivers ALSA: hda: intel-dsp-config: add Broadwell ACPI DSP driver selection ASoC: Intel: broadwell: set card and driver name dynamically ASoC: Intel: catpt: add dynamic selection of DSP driver ASoC: SOF: Intel: allow for coexistence between SOF and catpt drivers ALSA: hda: intel-dsp-config: ignore dsp_driver parameter for PCI legacy devices include/sound/intel-dsp-config.h | 7 ++ include/sound/soc-acpi.h | 6 + sound/hda/intel-dsp-config.c | 111 +++++++++++++++++++ sound/soc/intel/Kconfig | 2 + sound/soc/intel/atom/sst/sst_acpi.c | 8 ++ sound/soc/intel/boards/bdw-rt5650.c | 17 ++- sound/soc/intel/boards/bdw-rt5677.c | 18 ++- sound/soc/intel/boards/broadwell.c | 20 ++-- sound/soc/intel/boards/bytcht_cx2072x.c | 27 +++-- sound/soc/intel/boards/bytcht_da7213.c | 27 +++-- sound/soc/intel/boards/bytcht_es8316.c | 29 +++-- sound/soc/intel/boards/bytcr_rt5640.c | 30 +++-- sound/soc/intel/boards/bytcr_rt5651.c | 27 +++-- sound/soc/intel/boards/cht_bsw_max98090_ti.c | 29 +++-- sound/soc/intel/boards/cht_bsw_nau8824.c | 29 +++-- sound/soc/intel/boards/cht_bsw_rt5645.c | 38 ++++--- sound/soc/intel/boards/cht_bsw_rt5672.c | 29 +++-- sound/soc/intel/catpt/device.c | 12 ++ sound/soc/sof/intel/Kconfig | 33 +++--- sound/soc/sof/sof-acpi-dev.c | 14 ++- 20 files changed, 392 insertions(+), 121 deletions(-) -- 2.25.1 commit ddf1c4b3944add7939f6778d8fb71df01e74d45f Author: Dmitry Baryshkov Date: Thu Nov 19 15:31:45 2020 +0300 ASoC: qcom: sm8250: fix HDMI audio playback Current code does not setup CPU dai (causing -EIO errors on playback) and does not pass SND_SOC_DAIFMT_I2S to codec fmt (causing i2s-hifi errors). Fix both errors to enable HDMI audio playback on SM8250. Tested on RB5 platform. Signed-off-by: Dmitry Baryshkov Fixes: aa2e2785545a ("ASoC: qcom: sm8250: add sound card qrb5165-rb5 support") Cc: Srinivas Kandagatla Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20201119123145.709891-1-dmitry.baryshkov@linaro.org Signed-off-by: Mark Brown commit 2b6cb81b95d1e8abfb6d32cf194a5bd2992c315c Author: Marc Zyngier Date: Fri Nov 20 09:42:05 2020 +0000 drm/meson: dw-hdmi: Enable the iahb clock early enough Instead of moving meson_dw_hdmi_init() around which breaks existing platform, let's enable the clock meson_dw_hdmi_init() depends on. This means we don't have to worry about this clock being enabled or not, depending on the boot-loader features. Fixes: b33340e33acd ("drm/meson: dw-hdmi: Ensure that clocks are enabled before touching the TOP registers") Reported-by: "kernelci.org bot" Signed-off-by: Marc Zyngier Tested-by: Guillaume Tucker Reviewed-by: Neil Armstrong [narmstrong: changed reported by to kernelci.org bot] Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20201120094205.525228-3-maz@kernel.org commit 1dfeea904550c11eccf3fd5f6256e4b0f0208dfe Author: Marc Zyngier Date: Fri Nov 20 09:42:04 2020 +0000 drm/meson: dw-hdmi: Disable clocks on driver teardown The HDMI driver request clocks early, but never disable them, leaving the clocks on even when the driver is removed. Fix it by slightly refactoring the clock code, and register a devm action that will eventually disable/unprepare the enabled clocks. Signed-off-by: Marc Zyngier Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20201120094205.525228-2-maz@kernel.org commit ec88381936954a146f260a21bf8466ca07e5c71e Author: Cristian Marussi Date: Thu Nov 19 19:10:48 2020 +0000 firmware: arm_scmi: Add support to enumerated SCMI voltage domain device Add SCMI voltage domain device name to the core list of supported protocol devices so that it can be enumerated if the firmware supports it. Link: https://lore.kernel.org/r/20201119191051.46363-3-cristian.marussi@arm.com Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 2add5cacff3531e54c50b0832128299faa9f0563 Author: Cristian Marussi Date: Thu Nov 19 19:10:47 2020 +0000 firmware: arm_scmi: Add voltage domain management protocol support SCMI v3.0 introduces voltage domain protocol which provides commands to: - Discover the voltage levels supported by a domain - Get the configuration and voltage level of a domain - Set the configuration and voltage level of a domain Let us add support for the same. Link: https://lore.kernel.org/r/20201119191051.46363-2-cristian.marussi@arm.com Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 0f80fcec08e9c50b8d2992cf26495673765ebaba Author: Cristian Marussi Date: Thu Nov 19 19:10:50 2020 +0000 dt-bindings: arm: Add support for SCMI Regulators Add devicetree bindings to support regulators based on SCMI Voltage Domain Protocol. Link: https://lore.kernel.org/r/20201119191051.46363-5-cristian.marussi@arm.com Reviewed-by: Rob Herring Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 450d060e8f752a6ce052a2bffd3f01633472e330 Author: Yonghong Song Date: Wed Nov 18 23:30:39 2020 -0800 bpftool: Add {i,d}tlb_misses support for bpftool profile Commit 47c09d6a9f67("bpftool: Introduce "prog profile" command") introduced "bpftool prog profile" command which can be used to profile bpf program with metrics like # of instructions, This patch added support for itlb_misses and dtlb_misses. During an internal bpf program performance evaluation, I found these two metrics are also very useful. The following is an example output: $ bpftool prog profile id 324 duration 3 cycles itlb_misses 1885029 run_cnt 5134686073 cycles 306893 itlb_misses $ bpftool prog profile id 324 duration 3 cycles dtlb_misses 1827382 run_cnt 4943593648 cycles 5975636 dtlb_misses $ bpftool prog profile id 324 duration 3 cycles llc_misses 1836527 run_cnt 5019612972 cycles 4161041 llc_misses From the above, we can see quite some dtlb misses, 3 dtlb misses perf prog run. This might be something worth further investigation. Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20201119073039.4060095-1-yhs@fb.com commit f0aee45ffc8b97e38274808de2480ddf4807b27c Author: Linus Walleij Date: Tue Nov 17 18:56:21 2020 +0100 drm/panel: s6e63m0: Fix init sequence The init sequence consist of a number of unknown settings for the display controller. This patch achieves two things: - Fix an error that must have happened when the driver was converted from the backlight subsystem: the 0xb8 configuration command was lost and added as a tail to the previous command. - Update some minor settings in some bytes here and there according to changes in the Samsung GT-I9070 and Samsung GT-S7710 code dumps. Since two other devices use these settings they probably reflect trimmings later found to be better for the display rather than customizations for these devices. Signed-off-by: Linus Walleij Reviewed-by: Guido Günther Cc: Stephan Gerhold Cc: Paweł Chmiel Link: https://patchwork.freedesktop.org/patch/msgid/20201117175621.870085-3-linus.walleij@linaro.org commit 9c3f0a0dd6a1da86b3476b3ef57d4a17ea5130cf Author: Linus Walleij Date: Tue Nov 17 18:56:20 2020 +0100 drm/panel: s6e63m0: Implement 28 backlight levels A later version of the s6e63m0 driver in the Samsung GT-I9070 vendor tree provides 28 different backlight levels making use of elaborate control of the ACL and ELVSS regulator. Implement this more fine-grained backlight control. Signed-off-by: Linus Walleij Reviewed-by: Guido Günther Cc: Stephan Gerhold Cc: Paweł Chmiel Link: https://patchwork.freedesktop.org/patch/msgid/20201117175621.870085-2-linus.walleij@linaro.org commit c8917fd74f93f63bfb2e0a4ae11a215fecc0c791 Author: Linus Walleij Date: Tue Nov 17 18:56:19 2020 +0100 drm/panel: s6e63m0: Fix and extend MCS table Fix up the format of the manufacturer command set table to be TAB-indented and lowercase. Add the MCS_TEMP_SWIRE command that we will make use of. Signed-off-by: Linus Walleij Reviewed-by: Guido Günther Cc: Stephan Gerhold Cc: Paweł Chmiel Link: https://patchwork.freedesktop.org/patch/msgid/20201117175621.870085-1-linus.walleij@linaro.org commit 7795d4757502d8615bf092d628d424300bb31e5f Author: Uwe Kleine-König Date: Thu Nov 19 17:16:04 2020 +0100 spi: Warn when a driver's remove callback returns an error The driver core ignores the return value of struct device_driver::remove (because in general there is nothing that can be done about that). So add a warning when an spi driver returns an error. This simplifies the quest to make struct device_driver::remove return void. A consequent change would be to make struct spi_driver::remove return void, but I'm keeping this quest for later (or someone else). Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20201119161604.2633521-3-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 9db34ee64ce492c7ede3555ed690c8253d9935e4 Author: Uwe Kleine-König Date: Thu Nov 19 17:16:03 2020 +0100 spi: Use bus_type functions for probe, remove and shutdown The eventual goal is to get rid of the callbacks in struct device_driver. Other than not using driver callbacks there should be no side effect of this patch. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20201119161604.2633521-2-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 440408dbadfe47a615afd0a0a4a402e629be658a Author: Uwe Kleine-König Date: Thu Nov 19 17:16:02 2020 +0100 spi: fix resource leak for drivers without .remove callback Consider an spi driver with a .probe but without a .remove callback (e.g. rtc-ds1347). The function spi_drv_probe() is called to bind a device and so dev_pm_domain_attach() is called. As there is no remove callback spi_drv_remove() isn't called at unbind time however and so calling dev_pm_domain_detach() is missed and the pm domain keeps active. To fix this always use both spi_drv_probe() and spi_drv_remove() and make them handle the respective callback not being set. This has the side effect that for a (hypothetical) driver that has neither .probe nor remove the clk and pm domain setup is done. Fixes: 33cf00e57082 ("spi: attach/detach SPI device to the ACPI power domain") Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20201119161604.2633521-1-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 82d1aeb8a40740cf4208ce864cbcaa5e8bbabf4e Author: Kyle Russell Date: Wed Nov 18 22:41:06 2020 -0500 ASoC: mmp-sspa: set phase two word length register If hw params enables dual phase transmission, then the word length for the second phase should be set to match the sample format instead of remaining at the reset default. This matches the configuration already being done for the first phase. This driver already sets the phase two sample size, so this should complete the phase two configuration. Signed-off-by: Kyle Russell Link: https://lore.kernel.org/r/20201119034106.1273906-1-bkylerussell@gmail.com Signed-off-by: Mark Brown commit 2b3f6f4af95594d8e9c137ddc8d6bec61f04dbb5 Author: Srinivas Kandagatla Date: Fri Nov 20 12:38:13 2020 +0000 ASoC: codecs: lpass-va-macro: add missing MODULE_DEVICE_TABLE Fix module loading due by adding missing MODULE_DEVICE_TABLE. Fixes: 908e6b1df26e ("ASoC: codecs: lpass-va-macro: Add support to VA Macro") Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20201120123813.14059-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 73d2784ecf09d49e319631aea682cb360959355a Author: Rob Herring Date: Thu Nov 19 10:18:48 2020 -0600 ASoC: dt-bindings: renesas, rsnd: Fix duplicate 'allOf' entries Commit e52f3f291152 ("ASoC: audio-graph-card: Refactor schema") added an 'allOf' entry, but one is already present in the schema. Multiple keys is not valid and results in an error: ruamel.yaml.constructor.DuplicateKeyError: while constructing a mapping in "", line 4, column 1 found duplicate key "allOf" with value "[]" (original value: "[]") in "", line 262, column 1 Fixes: e52f3f291152 ("ASoC: audio-graph-card: Refactor schema") Cc: Liam Girdwood Cc: Mark Brown Cc: Kuninori Morimoto Cc: Sameer Pujar Cc: alsa-devel@alsa-project.org Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20201119161848.3379929-1-robh@kernel.org Signed-off-by: Mark Brown commit fca18e62984a0d797da8379a422a6bb644d68244 Author: Jaska Uimonen Date: Wed Nov 11 19:31:05 2020 +0200 ASoC: SOF: control: override volume info callback ASoC dapm controls currently don't support more than 2 channels. This is a problem for SOF-based devices where individual volume control cannot be provided on the 4 DMIC input path. If we want to provide controls for more than 2 channels, this patch suggests a simple solution based on an override of the info callback. For example, in the case with 4 channel DMIC PGAs, a sof_info callback would be used. Mono and stereo cases will keep using the existing dapm info callback. A longer-term solution would be to remove the limits to 2 channels in ASoC/DAPM/topology. This is a topic Intel is currently looking into, e.g. by removing the use of 'reg' and 'rreg' fields and use arrays instead. Such changes will be rather intrusive and touch multiple codec and platform drivers. Removing restrictions is the right thing to do, but this will need to be done in steps with lots of validation. Signed-off-by: Jaska Uimonen Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20201111173105.1927466-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 6e85530496a496616ece6c444df23522afc81520 Author: Jiaxin Yu Date: Fri Nov 20 11:06:13 2020 +0800 ASoC: mt6359: remove unused property for mt6359 This reverts commit 08651373808e16b01d3b12207f52504c17b6774c. ("dt-bindings: mediatek: mt6359: Add new property for mt6359") Remove unused property "LDO_VAUD18-supply" in mt6359codec. Signed-off-by: Jiaxin Yu Link: https://lore.kernel.org/r/1605841573-1442-3-git-send-email-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown commit 9546c76c73a1ee8b662b09f7308bcb63d2cd0d51 Author: Jiaxin Yu Date: Fri Nov 20 11:06:12 2020 +0800 ASoC: mediatek: mt6359: Fix regulator_dev_lookup() fails for id "LDO_VAUD18" Mt6359 platform device is instantiated by mfd_add_devices(). In the case, dev->of_node is NULL so that always fails to get the regulator_dev. Use regualator-name "vaud18" that in dts node instead of "LDO_VAUD19-supply". So that we can get regulator_dev through regulator_lookup_by_name() directly. Fixes: 64a70744b778 ("ASoC: Fix vaud18 power leakage of mt6359") Signed-off-by: Jiaxin Yu Link: https://lore.kernel.org/r/1605841573-1442-2-git-send-email-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown commit bab202ab87ba4da48018daf0f6810b22705a570d Author: Lukas Bulwahn Date: Mon Sep 28 12:00:04 2020 +0200 x86/mm: Declare 'start' variable where it is used It is not required to initialize the local variable start in memory_map_top_down(), as the variable will be initialized in any path before it is used. make clang-analyzer on x86_64 tinyconfig reports: arch/x86/mm/init.c:612:15: warning: Although the value stored to 'start' \ is used in the enclosing expression, the value is never actually read \ from 'start' [clang-analyzer-deadcode.DeadStores] Move the variable declaration into the loop, where it is used. No code changed: # arch/x86/mm/init.o: text data bss dec hex filename 7105 1424 26768 35297 89e1 init.o.before 7105 1424 26768 35297 89e1 init.o.after md5: a8d76c1bb5fce9cae251780a7ee7730f init.o.before.asm a8d76c1bb5fce9cae251780a7ee7730f init.o.after.asm [ bp: Massage. ] Signed-off-by: Lukas Bulwahn Signed-off-by: Borislav Petkov Acked-by: Dave Hansen Link: https://lkml.kernel.org/r/20200928100004.25674-1-lukas.bulwahn@gmail.com commit 22ca56a34b32862a7eb621ec1c5b3bd3c6aae7ca Author: Lee Jones Date: Mon Nov 9 18:22:06 2020 +0000 mtd: devices: powernv_flash: Add function names to headers and fix 'dev' Fixes the following W=1 kernel build warning(s): drivers/mtd/devices/powernv_flash.c:129: warning: Cannot understand * @mtd: the device drivers/mtd/devices/powernv_flash.c:145: warning: Cannot understand * @mtd: the device drivers/mtd/devices/powernv_flash.c:161: warning: Cannot understand * @mtd: the device drivers/mtd/devices/powernv_flash.c:184: warning: Function parameter or member 'dev' not described in 'powernv_flash_set_driver_info' Cc: Miquel Raynal Cc: Richard Weinberger Cc: Vignesh Raghavendra Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: linux-mtd@lists.infradead.org Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Lee Jones Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201109182206.3037326-24-lee.jones@linaro.org commit 2dc3d1e06e569c7a8e191ee1fc84384235f16677 Author: Lee Jones Date: Mon Nov 9 18:22:05 2020 +0000 mtd: onenand: Fix some kernel-doc misdemeanours Fixes the following W=1 kernel build warning(s): drivers/mtd/nand/onenand/onenand_base.c:140: warning: Function parameter or member 'mtd' not described in 'onenand_ooblayout_32_64_ecc' drivers/mtd/nand/onenand/onenand_base.c:140: warning: Function parameter or member 'section' not described in 'onenand_ooblayout_32_64_ecc' drivers/mtd/nand/onenand/onenand_base.c:140: warning: Function parameter or member 'oobregion' not described in 'onenand_ooblayout_32_64_ecc' drivers/mtd/nand/onenand/onenand_base.c:1436: warning: bad line: drivers/mtd/nand/onenand/onenand_base.c:1971: warning: Function parameter or member 'ops' not described in 'onenand_write_oob_nolock' drivers/mtd/nand/onenand/onenand_base.c:1971: warning: Excess function parameter 'len' description in 'onenand_write_oob_nolock' drivers/mtd/nand/onenand/onenand_base.c:1971: warning: Excess function parameter 'retlen' description in 'onenand_write_oob_nolock' drivers/mtd/nand/onenand/onenand_base.c:1971: warning: Excess function parameter 'buf' description in 'onenand_write_oob_nolock' drivers/mtd/nand/onenand/onenand_base.c:1971: warning: Excess function parameter 'mode' description in 'onenand_write_oob_nolock' drivers/mtd/nand/onenand/onenand_base.c:2156: warning: Function parameter or member 'block_size' not described in 'onenand_multiblock_erase' drivers/mtd/nand/onenand/onenand_base.c:2156: warning: Excess function parameter 'region' description in 'onenand_multiblock_erase' drivers/mtd/nand/onenand/onenand_base.c:2771: warning: Function parameter or member 'ops' not described in 'onenand_otp_write_oob_nolock' drivers/mtd/nand/onenand/onenand_base.c:2771: warning: Excess function parameter 'len' description in 'onenand_otp_write_oob_nolock' drivers/mtd/nand/onenand/onenand_base.c:2771: warning: Excess function parameter 'retlen' description in 'onenand_otp_write_oob_nolock' drivers/mtd/nand/onenand/onenand_base.c:2771: warning: Excess function parameter 'buf' description in 'onenand_otp_write_oob_nolock' drivers/mtd/nand/onenand/onenand_base.c:3387: warning: Function parameter or member 'mtd' not described in 'flexonenand_get_boundary' drivers/mtd/nand/onenand/onenand_base.c:3387: warning: Excess function parameter 'onenand_info' description in 'flexonenand_get_boundary' drivers/mtd/nand/onenand/onenand_base.c:3509: warning: Function parameter or member 'mtd' not described in 'flexonenand_check_blocks_erased' drivers/mtd/nand/onenand/onenand_base.c:3509: warning: Excess function parameter 'mtd_info' description in 'flexonenand_check_blocks_erased' drivers/mtd/nand/onenand/onenand_base.c:3557: warning: Function parameter or member 'die' not described in 'flexonenand_set_boundary' drivers/mtd/nand/onenand/onenand_base.c:3557: warning: Function parameter or member 'boundary' not described in 'flexonenand_set_boundary' drivers/mtd/nand/onenand/onenand_base.c:3557: warning: Function parameter or member 'lock' not described in 'flexonenand_set_boundary' Cc: Kyungmin Park Cc: Miquel Raynal Cc: Richard Weinberger Cc: Vignesh Raghavendra Cc: linux-mtd@lists.infradead.org Signed-off-by: Lee Jones Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201109182206.3037326-23-lee.jones@linaro.org commit b489681b87bf5c2cd185c5d39d33395f3eb9f7e8 Author: Lee Jones Date: Mon Nov 9 18:22:04 2020 +0000 mtd: rawnand: arasan: Document 'anfc_op's 'buf' member Fixes the following W=1 kernel build warning(s): drivers/mtd/nand/raw/arasan-nand-controller.c:133: warning: Function parameter or member 'buf' not described in 'anfc_op' Cc: Naga Sureshkumar Relli Cc: Miquel Raynal Cc: Richard Weinberger Cc: Vignesh Raghavendra Cc: Choudary Kalluri Cc: linux-mtd@lists.infradead.org Signed-off-by: Lee Jones Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201109182206.3037326-22-lee.jones@linaro.org commit 0d5c506d360733c3aa94f2c3c6c66b8cb164998a Author: Lee Jones Date: Mon Nov 9 18:22:03 2020 +0000 mtd: rawnand: sunxi: Document 'sunxi_nfc's 'caps' member Fixes the following W=1 kernel build warning(s): drivers/mtd/nand/raw/sunxi_nand.c:250: warning: Function parameter or member 'caps' not described in 'sunxi_nfc' Cc: Miquel Raynal Cc: Richard Weinberger Cc: Vignesh Raghavendra Cc: Maxime Ripard Cc: Chen-Yu Tsai Cc: Philipp Zabel Cc: Boris BREZILLON Cc: Qiang Yu Cc: Dmitriy B Cc: Sergey Lapin Cc: linux-mtd@lists.infradead.org Signed-off-by: Lee Jones Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201109182206.3037326-21-lee.jones@linaro.org commit 2425a57b1a0cc4ee9acdce5d1e7352673b46075e Author: Lee Jones Date: Mon Nov 9 18:22:02 2020 +0000 mtd: rawnand: omap2: Fix a bunch of kernel-doc misdemeanours Fixes the following W=1 kernel build warning(s): drivers/mtd/nand/raw/omap2.c:191: warning: Function parameter or member 'info' not described in 'omap_prefetch_enable' drivers/mtd/nand/raw/omap2.c:221: warning: Function parameter or member 'cs' not described in 'omap_prefetch_reset' drivers/mtd/nand/raw/omap2.c:221: warning: Function parameter or member 'info' not described in 'omap_prefetch_reset' drivers/mtd/nand/raw/omap2.c:946: warning: Function parameter or member 'chip' not described in 'omap_enable_hwecc' drivers/mtd/nand/raw/omap2.c:946: warning: Excess function parameter 'mtd' description in 'omap_enable_hwecc' drivers/mtd/nand/raw/omap2.c:1017: warning: Function parameter or member 'chip' not described in 'omap_dev_ready' drivers/mtd/nand/raw/omap2.c:1017: warning: Excess function parameter 'mtd' description in 'omap_dev_ready' drivers/mtd/nand/raw/omap2.c:1036: warning: Function parameter or member 'chip' not described in 'omap_enable_hwecc_bch' drivers/mtd/nand/raw/omap2.c:1036: warning: Excess function parameter 'mtd' description in 'omap_enable_hwecc_bch' drivers/mtd/nand/raw/omap2.c:1142: warning: Function parameter or member 'ecc_calc' not described in '_omap_calculate_ecc_bch' drivers/mtd/nand/raw/omap2.c:1142: warning: Excess function parameter 'ecc_code' description in '_omap_calculate_ecc_bch' drivers/mtd/nand/raw/omap2.c:1270: warning: Function parameter or member 'ecc_calc' not described in 'omap_calculate_ecc_bch_sw' drivers/mtd/nand/raw/omap2.c:1270: warning: Excess function parameter 'ecc_code' description in 'omap_calculate_ecc_bch_sw' drivers/mtd/nand/raw/omap2.c:1284: warning: Function parameter or member 'ecc_calc' not described in 'omap_calculate_ecc_bch_multi' drivers/mtd/nand/raw/omap2.c:1284: warning: Excess function parameter 'ecc_code' description in 'omap_calculate_ecc_bch_multi' drivers/mtd/nand/raw/omap2.c:1681: warning: Function parameter or member 'info' not described in 'is_elm_present' drivers/mtd/nand/raw/omap2.c:1681: warning: Function parameter or member 'elm_node' not described in 'is_elm_present' drivers/mtd/nand/raw/omap2.c:1681: warning: Excess function parameter 'omap_nand_info' description in 'is_elm_present' Cc: Miquel Raynal Cc: Richard Weinberger Cc: Vignesh Raghavendra Cc: Jian Zhang Cc: linux-mtd@lists.infradead.org Signed-off-by: Lee Jones Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201109182206.3037326-20-lee.jones@linaro.org commit a318b95a4235d303a113225ec10f217670cbc516 Author: Lee Jones Date: Mon Nov 9 18:22:01 2020 +0000 mtd: rawnand: omap_elm: Finish half populated function header, demote empty ones Fixes the following W=1 kernel build warning(s): drivers/mtd/nand/raw/omap_elm.c:102: warning: Function parameter or member 'ecc_steps' not described in 'elm_config' drivers/mtd/nand/raw/omap_elm.c:102: warning: Function parameter or member 'ecc_step_size' not described in 'elm_config' drivers/mtd/nand/raw/omap_elm.c:102: warning: Function parameter or member 'ecc_syndrome_size' not described in 'elm_config' drivers/mtd/nand/raw/omap_elm.c:440: warning: Function parameter or member 'info' not described in 'elm_context_save' drivers/mtd/nand/raw/omap_elm.c:488: warning: Function parameter or member 'info' not described in 'elm_context_restore' Cc: Miquel Raynal Cc: Richard Weinberger Cc: Vignesh Raghavendra Cc: linux-mtd@lists.infradead.org Signed-off-by: Lee Jones Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201109182206.3037326-19-lee.jones@linaro.org commit 5a933b0dae2ee70c9963f68cb9a7ba6c4194069a Author: Lee Jones Date: Mon Nov 9 18:22:00 2020 +0000 mtd: rawnand: s3c2410: Add documentation for 2 missing struct members Correct 'controller' typo while we're at it. Fixes the following W=1 kernel build warning(s): drivers/mtd/nand/raw/s3c2410.c:172: warning: Function parameter or member 'controller' not described in 's3c2410_nand_info' drivers/mtd/nand/raw/s3c2410.c:172: warning: Function parameter or member 'freq_transition' not described in 's3c2410_nand_info' Cc: Miquel Raynal Cc: Richard Weinberger Cc: Vignesh Raghavendra Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc: Ben Dooks Cc: linux-mtd@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Signed-off-by: Lee Jones Reviewed-by: Krzysztof Kozlowski Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201109182206.3037326-18-lee.jones@linaro.org commit da6debc470c08fc99ab958bd4efb6abf5315d0c2 Author: Lee Jones Date: Mon Nov 9 18:21:59 2020 +0000 mtd: rawnand: cafe_nand: Remove superfluous param doc and add another Fixes the following W=1 kernel build warning(s): drivers/mtd/nand/raw/cafe_nand.c:372: warning: Function parameter or member 'page' not described in 'cafe_nand_read_page' drivers/mtd/nand/raw/cafe_nand.c:372: warning: Excess function parameter 'mtd' description in 'cafe_nand_read_page' Cc: Miquel Raynal Cc: Richard Weinberger Cc: Vignesh Raghavendra Cc: Boris Brezillon Cc: David Woodhouse Cc: linux-mtd@lists.infradead.org Signed-off-by: Lee Jones Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201109182206.3037326-17-lee.jones@linaro.org commit 63c34f214f9343a18d06eba3ce8bc91e9c20f2b1 Author: Lee Jones Date: Mon Nov 9 18:21:58 2020 +0000 mtd: rawnand: diskonchip: Marking unused variables as __always_unused 'dummy' is never checked (as per the nomenclature) and the use of 'emtpymatch' is currently #if 0'ed out. We could also #if 0 the declaration, but #ifery is pretty ugly, so I like to keep it to a minimum. Fixes the following W=1 kernel build warning(s): drivers/mtd/nand/raw/diskonchip.c: In function ‘DoC_Delay’: drivers/mtd/nand/raw/diskonchip.c:219:16: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable] drivers/mtd/nand/raw/diskonchip.c: In function ‘doc200x_calculate_ecc’: drivers/mtd/nand/raw/diskonchip.c:706:6: warning: variable ‘emptymatch’ set but not used [-Wunused-but-set-variable] Cc: Miquel Raynal Cc: Richard Weinberger Cc: Vignesh Raghavendra Cc: Boris Brezillon Cc: Dan Brown Cc: David Woodhouse Cc: Thomas Gleixner Cc: linux-mtd@lists.infradead.org Signed-off-by: Lee Jones Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201109182206.3037326-16-lee.jones@linaro.org commit 46c60dbf4b0fb2925d3ebc52a1114698fe009884 Author: Lee Jones Date: Mon Nov 9 18:21:57 2020 +0000 mtd: ubi: gluebi: Fix misnamed function parameter documentation Fixes the following W=1 kernel build warning(s): drivers/mtd/ubi/gluebi.c:446: warning: Function parameter or member 'ns_ptr' not described in 'gluebi_notify' drivers/mtd/ubi/gluebi.c:446: warning: Excess function parameter 'ptr' description in 'gluebi_notify' Cc: Richard Weinberger Cc: Miquel Raynal Cc: Vignesh Raghavendra Cc: linux-mtd@lists.infradead.org Signed-off-by: Lee Jones Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201109182206.3037326-15-lee.jones@linaro.org commit fa985e221a7c20fa46beff128a29c2d83c798f85 Author: Lee Jones Date: Mon Nov 9 18:21:56 2020 +0000 mtd: rawnand: brcmnand: Demote non-conformant kernel-doc headers Fixes the following W=1 kernel build warning(s): drivers/mtd/nand/raw/brcmnand/brcmnand.c:1854: warning: Function parameter or member 'host' not described in 'brcmnand_edu_trans' drivers/mtd/nand/raw/brcmnand/brcmnand.c:1854: warning: Function parameter or member 'addr' not described in 'brcmnand_edu_trans' drivers/mtd/nand/raw/brcmnand/brcmnand.c:1854: warning: Function parameter or member 'buf' not described in 'brcmnand_edu_trans' drivers/mtd/nand/raw/brcmnand/brcmnand.c:1854: warning: Function parameter or member 'len' not described in 'brcmnand_edu_trans' drivers/mtd/nand/raw/brcmnand/brcmnand.c:1854: warning: Function parameter or member 'cmd' not described in 'brcmnand_edu_trans' drivers/mtd/nand/raw/brcmnand/brcmnand.c:1951: warning: Function parameter or member 'host' not described in 'brcmnand_fill_dma_desc' drivers/mtd/nand/raw/brcmnand/brcmnand.c:1951: warning: Function parameter or member 'desc' not described in 'brcmnand_fill_dma_desc' drivers/mtd/nand/raw/brcmnand/brcmnand.c:1951: warning: Function parameter or member 'addr' not described in 'brcmnand_fill_dma_desc' drivers/mtd/nand/raw/brcmnand/brcmnand.c:1951: warning: Function parameter or member 'buf' not described in 'brcmnand_fill_dma_desc' drivers/mtd/nand/raw/brcmnand/brcmnand.c:1951: warning: Function parameter or member 'len' not described in 'brcmnand_fill_dma_desc' drivers/mtd/nand/raw/brcmnand/brcmnand.c:1951: warning: Function parameter or member 'dma_cmd' not described in 'brcmnand_fill_dma_desc' drivers/mtd/nand/raw/brcmnand/brcmnand.c:1951: warning: Function parameter or member 'begin' not described in 'brcmnand_fill_dma_desc' drivers/mtd/nand/raw/brcmnand/brcmnand.c:1951: warning: Function parameter or member 'end' not described in 'brcmnand_fill_dma_desc' drivers/mtd/nand/raw/brcmnand/brcmnand.c:1951: warning: Function parameter or member 'next_desc' not described in 'brcmnand_fill_dma_desc' drivers/mtd/nand/raw/brcmnand/brcmnand.c:1977: warning: Function parameter or member 'host' not described in 'brcmnand_dma_run' drivers/mtd/nand/raw/brcmnand/brcmnand.c:1977: warning: Function parameter or member 'desc' not described in 'brcmnand_dma_run' Cc: Brian Norris Cc: Kamal Dasu Cc: Miquel Raynal Cc: Richard Weinberger Cc: Vignesh Raghavendra Cc: linux-mtd@lists.infradead.org Cc: bcm-kernel-feedback-list@broadcom.com Signed-off-by: Lee Jones Acked-by: Florian Fainelli Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201109182206.3037326-14-lee.jones@linaro.org commit ab4e4de9fd8b469823a645f05f2c142e9270b012 Author: Lee Jones Date: Mon Nov 9 18:21:55 2020 +0000 mtd: ubi: wl: Fix a couple of kernel-doc issues Fixes the following W=1 kernel build warning(s): drivers/mtd/ubi/wl.c:584: warning: Function parameter or member 'nested' not described in 'schedule_erase' drivers/mtd/ubi/wl.c:1075: warning: Excess function parameter 'shutdown' description in '__erase_worker' Cc: Richard Weinberger Cc: Miquel Raynal Cc: Vignesh Raghavendra Cc: linux-mtd@lists.infradead.org Signed-off-by: Lee Jones Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201109182206.3037326-13-lee.jones@linaro.org commit e1eb368d72fbd90bb515532ad5d23266b478b629 Author: Lee Jones Date: Mon Nov 9 18:21:54 2020 +0000 mtd: ubi: eba: Fix a couple of misdocumentation issues Fixes the following W=1 kernel build warning(s): drivers/mtd/ubi/eba.c:1304: warning: Function parameter or member 'vidb' not described in 'ubi_eba_copy_leb' drivers/mtd/ubi/eba.c:1304: warning: Excess function parameter 'vid_hdr' description in 'ubi_eba_copy_leb' drivers/mtd/ubi/eba.c:1483: warning: Function parameter or member 'ai' not described in 'print_rsvd_warning' Cc: Richard Weinberger Cc: Miquel Raynal Cc: Vignesh Raghavendra Cc: linux-mtd@lists.infradead.org Signed-off-by: Lee Jones Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201109182206.3037326-12-lee.jones@linaro.org commit b6baa9962648aee4a22c8b6a31ce69585b03d173 Author: Lee Jones Date: Mon Nov 9 18:21:53 2020 +0000 mtd: ubi: kapi: Correct documentation for 'ubi_leb_read_sg's 'sgl' parameter Fixes the following W=1 kernel build warning(s): drivers/mtd/ubi/kapi.c:464: warning: Function parameter or member 'sgl' not described in 'ubi_leb_read_sg' drivers/mtd/ubi/kapi.c:464: warning: Excess function parameter 'buf' description in 'ubi_leb_read_sg' Cc: Richard Weinberger Cc: Miquel Raynal Cc: Vignesh Raghavendra Cc: linux-mtd@lists.infradead.org Signed-off-by: Lee Jones Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201109182206.3037326-11-lee.jones@linaro.org commit 6a21a1176f3b83464ee20687d48d7618b508de37 Author: Lee Jones Date: Mon Nov 9 18:21:52 2020 +0000 mtd: spinand: toshiba: Demote non-conformant kernel-doc header Fixes the following W=1 kernel build warning(s): drivers/mtd/nand/spi/toshiba.c:36: warning: Function parameter or member 'write_cache_variants' not described in 'SPINAND_OP_VARIANTS' drivers/mtd/nand/spi/toshiba.c:36: warning: Function parameter or member '0' not described in 'SPINAND_OP_VARIANTS' Cc: Miquel Raynal Cc: Richard Weinberger Cc: Vignesh Raghavendra Cc: Yoshio Furuyama Cc: Frieder Schrempf Cc: linux-mtd@lists.infradead.org Signed-off-by: Lee Jones Reviewed-by: Frieder Schrempf Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201109182206.3037326-10-lee.jones@linaro.org commit 9efbb507b7e66137dc0814c7fb9517dbdd410cc0 Author: Lee Jones Date: Mon Nov 9 18:21:51 2020 +0000 mtd: ubi: build: Document 'ubi_num' in struct mtd_dev_param Fixes the following W=1 kernel build warning(s): drivers/mtd/ubi/build.c:61: warning: Function parameter or member 'ubi_num' not described in 'mtd_dev_param' Cc: Richard Weinberger Cc: Miquel Raynal Cc: Vignesh Raghavendra Cc: linux-mtd@lists.infradead.org Signed-off-by: Lee Jones Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201109182206.3037326-9-lee.jones@linaro.org commit d67b272f236b14cdd4051b8dcba7c3fd3ed02241 Author: Lee Jones Date: Mon Nov 9 18:21:50 2020 +0000 mtd: spi-nor: hisi-sfc: Demote non-conformant kernel-doc Fixes the following W=1 kernel build warning(s): drivers/mtd/spi-nor/controllers/hisi-sfc.c:328: warning: Function parameter or member 'np' not described in 'hisi_spi_nor_register' drivers/mtd/spi-nor/controllers/hisi-sfc.c:328: warning: Function parameter or member 'host' not described in 'hisi_spi_nor_register' Cc: Tudor Ambarus Cc: Miquel Raynal Cc: Richard Weinberger Cc: Vignesh Raghavendra Cc: Sumit Semwal Cc: "Christian König" Cc: linux-mtd@lists.infradead.org Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Reviewed-by: Vignesh Raghavendra Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201109182206.3037326-8-lee.jones@linaro.org commit 8fed6e0ae5a98bc37b1be5d9f8158aae0de82663 Author: Lee Jones Date: Mon Nov 9 18:21:49 2020 +0000 mtd: onenand: onenand_bbt: Fix expected kernel-doc formatting Fixes the following W=1 kernel build warning(s): drivers/mtd/nand/onenand/onenand_bbt.c:33: warning: Function parameter or member 'buf' not described in 'check_short_pattern' drivers/mtd/nand/onenand/onenand_bbt.c:33: warning: Function parameter or member 'len' not described in 'check_short_pattern' drivers/mtd/nand/onenand/onenand_bbt.c:33: warning: Function parameter or member 'paglen' not described in 'check_short_pattern' drivers/mtd/nand/onenand/onenand_bbt.c:33: warning: Function parameter or member 'td' not described in 'check_short_pattern' drivers/mtd/nand/onenand/onenand_bbt.c:57: warning: Function parameter or member 'mtd' not described in 'create_bbt' drivers/mtd/nand/onenand/onenand_bbt.c:57: warning: Function parameter or member 'buf' not described in 'create_bbt' drivers/mtd/nand/onenand/onenand_bbt.c:57: warning: Function parameter or member 'bd' not described in 'create_bbt' drivers/mtd/nand/onenand/onenand_bbt.c:57: warning: Function parameter or member 'chip' not described in 'create_bbt' drivers/mtd/nand/onenand/onenand_bbt.c:132: warning: Function parameter or member 'mtd' not described in 'onenand_memory_bbt' drivers/mtd/nand/onenand/onenand_bbt.c:132: warning: Function parameter or member 'bd' not described in 'onenand_memory_bbt' drivers/mtd/nand/onenand/onenand_bbt.c:145: warning: Function parameter or member 'mtd' not described in 'onenand_isbad_bbt' drivers/mtd/nand/onenand/onenand_bbt.c:145: warning: Function parameter or member 'offs' not described in 'onenand_isbad_bbt' drivers/mtd/nand/onenand/onenand_bbt.c:145: warning: Function parameter or member 'allowbbt' not described in 'onenand_isbad_bbt' drivers/mtd/nand/onenand/onenand_bbt.c:182: warning: Function parameter or member 'mtd' not described in 'onenand_scan_bbt' drivers/mtd/nand/onenand/onenand_bbt.c:182: warning: Function parameter or member 'bd' not described in 'onenand_scan_bbt' drivers/mtd/nand/onenand/onenand_bbt.c:230: warning: Function parameter or member 'mtd' not described in 'onenand_default_bbt' Cc: Kyungmin Park Cc: Miquel Raynal Cc: Richard Weinberger Cc: Vignesh Raghavendra Cc: linux-mtd@lists.infradead.org Signed-off-by: Lee Jones Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201109182206.3037326-7-lee.jones@linaro.org commit 6361f5360e5177b794c397f620c2c3a9b664cf0d Author: Lee Jones Date: Mon Nov 9 18:21:48 2020 +0000 mtd: Fix misspelled function parameter 'section' Fixes the following W=1 kernel build warning(s): drivers/mtd/mtdcore.c:1592: warning: Function parameter or member 'section' not described in 'mtd_ooblayout_find_eccregion' drivers/mtd/mtdcore.c:1592: warning: Excess function parameter 'sectionp' description in 'mtd_ooblayout_find_eccregion' Cc: Miquel Raynal Cc: Richard Weinberger Cc: Vignesh Raghavendra Cc: David Woodhouse Cc: linux-mtd@lists.infradead.org Signed-off-by: Lee Jones Reviewed-by: Alexander Dahl Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201109182206.3037326-6-lee.jones@linaro.org commit 9712fb212535a8e30ff2e6f43ded93a0588887cc Author: Lee Jones Date: Mon Nov 9 18:21:47 2020 +0000 mtd: devices: docg3: Fix kernel-doc 'bad line' and 'excessive doc' issues This patch also places the descriptions in the correct order. Fixes the following W=1 kernel build warning(s): drivers/mtd/devices/docg3.c:819: warning: bad line: drivers/mtd/devices/docg3.c:1799: warning: Excess function parameter 'base' description in 'doc_probe_device' Cc: Robert Jarzmik Cc: Miquel Raynal Cc: Richard Weinberger Cc: Vignesh Raghavendra Cc: linux-mtd@lists.infradead.org Signed-off-by: Lee Jones Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201109182206.3037326-5-lee.jones@linaro.org commit 720ae74ddf0aa4098f54711b538dd00a9d8ea51e Author: Lee Jones Date: Mon Nov 9 18:21:46 2020 +0000 mtd: onenand: onenand_base: Fix expected kernel-doc formatting Fixes the following W=1 kernel build warning(s): drivers/mtd/nand/onenand/onenand_base.c:140: warning: Function parameter or member 'mtd' not described in 'onenand_ooblayout_32_64_ecc' drivers/mtd/nand/onenand/onenand_base.c:140: warning: Function parameter or member 'section' not described in 'onenand_ooblayout_32_64_ecc' drivers/mtd/nand/onenand/onenand_base.c:140: warning: Function parameter or member 'oobregion' not described in 'onenand_ooblayout_32_64_ecc' drivers/mtd/nand/onenand/onenand_base.c:200: warning: Function parameter or member 'addr' not described in 'onenand_readw' drivers/mtd/nand/onenand/onenand_base.c:212: warning: Function parameter or member 'value' not described in 'onenand_writew' drivers/mtd/nand/onenand/onenand_base.c:212: warning: Function parameter or member 'addr' not described in 'onenand_writew' drivers/mtd/nand/onenand/onenand_base.c:225: warning: Function parameter or member 'this' not described in 'onenand_block_address' drivers/mtd/nand/onenand/onenand_base.c:225: warning: Function parameter or member 'block' not described in 'onenand_block_address' drivers/mtd/nand/onenand/onenand_base.c:242: warning: Function parameter or member 'this' not described in 'onenand_bufferram_address' drivers/mtd/nand/onenand/onenand_base.c:242: warning: Function parameter or member 'block' not described in 'onenand_bufferram_address' NB: Snipped 200 lines for brevity. Cc: Kyungmin Park Cc: Miquel Raynal Cc: Richard Weinberger Cc: Vignesh Raghavendra Cc: Adrian Hunter Cc: linux-mtd@lists.infradead.org Signed-off-by: Lee Jones Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201109182206.3037326-4-lee.jones@linaro.org commit 5fddeda7d3a87b5bb945cc756875d6adc7e77389 Author: Lee Jones Date: Mon Nov 9 18:21:45 2020 +0000 mtd: devices: phram: File headers are not good candidates for kernel-doc Fixes the following W=1 kernel build warning(s): drivers/mtd/devices/phram.c:19: warning: Function parameter or member 'fmt' not described in 'pr_fmt' Cc: Miquel Raynal Cc: Richard Weinberger Cc: Vignesh Raghavendra Cc: "Jochen Schäuble" Cc: linux-mtd@lists.infradead.org Signed-off-by: Lee Jones Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201109182206.3037326-3-lee.jones@linaro.org commit 620747ee41294589f20073d393adaa2e50c108a9 Author: Lee Jones Date: Mon Nov 9 18:21:44 2020 +0000 mtd: mtdpart: Fix misdocumented function parameter 'mtd' Fixes the following W=1 kernel build warning(s): drivers/mtd/mtdpart.c:300: warning: Function parameter or member 'mtd' not described in '__mtd_del_partition' drivers/mtd/mtdpart.c:300: warning: Excess function parameter 'priv' description in '__mtd_del_partition' Cc: Miquel Raynal Cc: Richard Weinberger Cc: Vignesh Raghavendra Cc: Nicolas Pitre Cc: Thomas Gleixner Cc: David Woodhouse Cc: linux-mtd@lists.infradead.org Signed-off-by: Lee Jones Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201109182206.3037326-2-lee.jones@linaro.org commit 3cffa06aeef7ece30f6b5ac0ea51f264e8fea4d0 Author: Petr Mladek Date: Wed Nov 11 14:54:50 2020 +0100 printk/console: Allow to disable console output by using console="" or console=null The commit 48021f98130880dd74 ("printk: handle blank console arguments passed in.") prevented crash caused by empty console= parameter value. Unfortunately, this value is widely used on Chromebooks to disable the console output. The above commit caused performance regression because the messages were pushed on slow console even though nobody was watching it. Use ttynull driver explicitly for console="" and console=null parameters. It has been created for exactly this purpose. It causes that preferred_console is set. As a result, ttySX and ttyX are not used as a fallback. And only ttynull console gets registered by default. It still allows to register other consoles either by additional console= parameters or SPCR. It prevents regression because it worked this way even before. Also it is a sane semantic. Preventing output on all consoles should be done another way, for example, by introducing mute_console parameter. Link: https://lore.kernel.org/r/20201006025935.GA597@jagdpanzerIV.localdomain Suggested-by: Sergey Senozhatsky Reviewed-by: Guenter Roeck Tested-by: Guenter Roeck Acked-by: Sergey Senozhatsky Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20201111135450.11214-3-pmladek@suse.com commit eca22edb37d29f29306fab6e6b59fe92c633960b Author: Maxime Ripard Date: Wed Nov 18 10:47:58 2020 +0100 drm: Pass the full state to connectors atomic functions The current atomic helpers have either their object state being passed as an argument or the full atomic state. The former is the pattern that was done at first, before switching to the latter for new hooks or when it was needed. Now that the CRTCs have been converted, let's move forward with the connectors to provide a consistent interface. The conversion was done using the coccinelle script below, and built tested on all the drivers. @@ identifier connector, connector_state; @@ struct drm_connector_helper_funcs { ... struct drm_encoder* (*atomic_best_encoder)(struct drm_connector *connector, - struct drm_connector_state *connector_state); + struct drm_atomic_state *state); ... } @@ identifier connector, connector_state; @@ struct drm_connector_helper_funcs { ... void (*atomic_commit)(struct drm_connector *connector, - struct drm_connector_state *connector_state); + struct drm_atomic_state *state); ... } @@ struct drm_connector_helper_funcs *FUNCS; identifier state; identifier connector, connector_state; identifier f; @@ f(..., struct drm_atomic_state *state, ...) { <+... - FUNCS->atomic_commit(connector, connector_state); + FUNCS->atomic_commit(connector, state); ...+> } @@ struct drm_connector_helper_funcs *FUNCS; identifier state; identifier connector, connector_state; identifier var, f; @@ f(struct drm_atomic_state *state, ...) { <+... - var = FUNCS->atomic_best_encoder(connector, connector_state); + var = FUNCS->atomic_best_encoder(connector, state); ...+> } @ connector_atomic_func @ identifier helpers; identifier func; @@ ( static struct drm_connector_helper_funcs helpers = { ..., .atomic_best_encoder = func, ..., }; | static struct drm_connector_helper_funcs helpers = { ..., .atomic_commit = func, ..., }; ) @@ identifier connector_atomic_func.func; identifier connector; symbol state; @@ func(struct drm_connector *connector, - struct drm_connector_state *state + struct drm_connector_state *connector_state ) { ... - state + connector_state ... } @ ignores_state @ identifier connector_atomic_func.func; identifier connector, connector_state; @@ func(struct drm_connector *connector, struct drm_connector_state *connector_state) { ... when != connector_state } @ adds_state depends on connector_atomic_func && !ignores_state @ identifier connector_atomic_func.func; identifier connector, connector_state; @@ func(struct drm_connector *connector, struct drm_connector_state *connector_state) { + struct drm_connector_state *connector_state = drm_atomic_get_new_connector_state(state, connector); ... } @ depends on connector_atomic_func @ identifier connector_atomic_func.func; identifier connector_state; identifier connector; @@ func(struct drm_connector *connector, - struct drm_connector_state *connector_state + struct drm_atomic_state *state ) { ... } @ include depends on adds_state @ @@ #include @ no_include depends on !include && adds_state @ @@ + #include #include Signed-off-by: Maxime Ripard Reviewed-by: Rodrigo Siqueira Reviewed-by: Ville Syrjälä Acked-by: Thomas Zimmermann Acked-by: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Ben Skeggs Cc: Rodrigo Siqueira Cc: Melissa Wen Cc: Haneen Mohammed Link: https://patchwork.freedesktop.org/patch/msgid/20201118094758.506730-1-maxime@cerno.tech commit 757055ae8dedf5333af17b3b5b4b70ba9bc9da4e Author: Petr Mladek Date: Wed Nov 11 14:54:49 2020 +0100 init/console: Use ttynull as a fallback when there is no console stdin, stdout, and stderr standard I/O stream are created for the init process. They are not available when there is no console registered for /dev/console. It might lead to a crash when the init process tries to use them, see the commit 48021f98130880dd742 ("printk: handle blank console arguments passed in."). Normally, ttySX and ttyX consoles are used as a fallback when no consoles are defined via the command line, device tree, or SPCR. But there will be no console registered when an invalid console name is configured or when the configured consoles do not exist on the system. Users even try to avoid the console intentionally, for example, by using console="" or console=null. It is used on production systems where the serial port or terminal are not visible to users. Pushing messages to these consoles would just unnecessary slowdown the system. Make sure that stdin, stdout, stderr, and /dev/console are always available by a fallback to the existing ttynull driver. It has been implemented for exactly this purpose but it was used only when explicitly configured. Reviewed-by: Greg Kroah-Hartman Reviewed-by: Guenter Roeck Tested-by: Guenter Roeck Acked-by: Sergey Senozhatsky Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20201111135450.11214-2-pmladek@suse.com commit 275f6010b6994ad286a859062c03be050e8073ad Author: Kaixu Xia Date: Tue Nov 17 17:29:12 2020 +0800 can: mcp251xfd: remove useless code in mcp251xfd_chip_softreset It would directly return if the variable err equals to 0 or other errors. Only when the err equals to -ETIMEDOUT it can reach the 'if (err)' statement, so the 'if (err)' and last 'return -ETIMEDOUT' statements are useless. Romove them. Reported-by: Tosk Robot Signed-off-by: Kaixu Xia Link: https://lore.kernel.org/r/1605605352-25298-1-git-send-email-kaixuxia@tencent.com Signed-off-by: Marc Kleine-Budde commit 887e5a9ace74419a9797bbf665d521dd9c0bdf4b Author: Jimmy Assarsson Date: Sun Nov 15 17:30:27 2020 +0100 can: kvaser_usb: Add new Kvaser hydra devices Add new Kvaser hydra devices. Signed-off-by: Jimmy Assarsson Link: https://lore.kernel.org/r/20201115163027.16851-6-jimmyassarsson@gmail.com Signed-off-by: Marc Kleine-Budde commit 1f597d418ee3b69198c9c79789e3dfea3912032d Author: Christer Beskow Date: Sun Nov 15 17:30:26 2020 +0100 can: kvaser_usb: kvaser_usb_hydra: Add support for new device variant Add support for a new variant of devices using the hydra platform, based on NXP i.MX RT (flexcan). Signed-off-by: Christer Beskow Signed-off-by: Jimmy Assarsson Link: https://lore.kernel.org/r/20201115163027.16851-5-jimmyassarsson@gmail.com Signed-off-by: Marc Kleine-Budde commit 8396604379e6f713bd29698b412ecbe831163e28 Author: Jimmy Assarsson Date: Sun Nov 15 17:30:25 2020 +0100 can: kvaser_usb: Add new Kvaser Leaf v2 devices Add new Kvaser Leaf v2 devices. Signed-off-by: Jimmy Assarsson Link: https://lore.kernel.org/r/20201115163027.16851-4-jimmyassarsson@gmail.com Signed-off-by: Marc Kleine-Budde commit e110c8409fb6299eded1089164c830f4d59b9165 Author: Jimmy Assarsson Date: Sun Nov 15 17:30:24 2020 +0100 can: kvaser_usb: Add USB_{LEAF,HYDRA}_PRODUCT_ID_END defines Add USB_{LEAF,HYDRA}_PRODUCT_ID_END defines, representing the last USB PID entry in respectively family. This removes the need to update the kvaser_is_{leaf,hydra}() functions whenever new devices are added. Signed-off-by: Jimmy Assarsson Link: https://lore.kernel.org/r/20201115163027.16851-3-jimmyassarsson@gmail.com Signed-off-by: Marc Kleine-Budde commit 6b6e986864fd356e7f7d442ea36e58dde058b5e7 Author: Marc Kleine-Budde Date: Thu Nov 19 11:09:17 2020 +0100 can: flexcan: flexcan_close(): change order if commands to properly shut down the controller There haven been reports, that the flexcan_close() soradically hangs during simultanious ifdown, sending of CAN messages and probably open CAN bus: | (__schedule) from [<808bbd34>] (schedule+0x90/0xb8) | (schedule) from [<808bf274>] (schedule_timeout+0x1f8/0x24c) | (schedule_timeout) from [<8016be44>] (msleep+0x18/0x1c) | (msleep) from [<80746a64>] (napi_disable+0x60/0x70) | (napi_disable) from [<8052fdd0>] (flexcan_close+0x2c/0x140) | (flexcan_close) from [<80744930>] (__dev_close_many+0xb8/0xd8) | (__dev_close_many) from [<8074db9c>] (__dev_change_flags+0xd0/0x1a0) | (__dev_change_flags) from [<8074dc84>] (dev_change_flags+0x18/0x48) | (dev_change_flags) from [<80760c24>] (do_setlink+0x44c/0x7b4) | (do_setlink) from [<80761560>] (rtnl_newlink+0x374/0x68c) I was unable to reproduce the issue, but a cleanup of the flexcan close sequence has probably fixed the problem at the reporting user. This patch changes the sequence in flexcan_close() to: - stop the TX queue - disable the interrupts on the chip level and wait via free_irq() synchronously for the interrupt handler to finish - disable RX offload, which disables synchronously NAPI - disable the flexcan on the chip level - free RX offload - disable the transceiver - close the CAN device - disable the clocks Link: https://lore.kernel.org/r/20201119100917.3013281-6-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 648a34b1d57d65d01784ca3659558794d5c00ae1 Author: Marc Kleine-Budde Date: Thu Nov 19 11:09:16 2020 +0100 can: flexcan: flexcan_open(): completely initialize controller before requesting IRQ This patch changes the order in which the flexcan controller is brought up during flexcan_open(). It makes sure that the chip is completely initialized before the IRQs are requested and finally enabled. Link: https://lore.kernel.org/r/20201119100917.3013281-5-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit f3f2a5466578e297f5eeff940c9eb98c4ea5f0b3 Author: Marc Kleine-Budde Date: Thu Nov 19 11:09:15 2020 +0100 can: flexcan: flexcan_rx_offload_setup(): factor out mailbox and rx-offload setup into separate function In an upcoming patch the order of operations in flexcan_open() are changed. Introduce convenience function to make that patch simpler. Link: https://lore.kernel.org/r/20201119100917.3013281-4-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 49dea0443918da38f1cce94e74e17d2972c03016 Author: Marc Kleine-Budde Date: Thu Nov 19 11:09:14 2020 +0100 can: flexcan: move enabling/disabling of interrupts from flexcan_chip_{start,stop}() to callers The function flexcan_chip_start() first configures the CAN controller and then enables the interrupt, flexcan_chip_stop() does the opposite. In an upcoming patch the order of operations in flexcan_open() and flexcan_close() are changed. This requires flexcan_chip_start()/flexcan_chip_stop_disable_on_error() and flexcan_chip_interrupts_{enable,disable}() to be independent of each other. This patch moves the enabling of the interrupts from flexcan_chip_start() to its callers flexcan_open() and flexcan_resume(). Likewise the disabling of the interrupts is moved from __flexcan_chip_stop() to its indirect callers flexcan_close() and flexcan_suspend(). Link: https://lore.kernel.org/r/20201119100917.3013281-3-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 1c5e6dbe4c4f83bb44735656f52a501ebbe3281a Author: Marc Kleine-Budde Date: Thu Nov 19 11:09:13 2020 +0100 can: flexcan: factor out enabling and disabling of interrupts into separate function The upcoming patches are going to move the enabling and disabling of the interrupts. Introduce convenience functions to make these patches simpler. Link: https://lore.kernel.org/r/20201119100917.3013281-2-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 1457998a6d3a507d6e213623f915c919297c37b1 Author: Joakim Zhang Date: Fri Nov 6 18:56:25 2020 +0800 can: flexcan: rename macro FLEXCAN_QUIRK_SETUP_STOP_MODE -> FLEXCAN_QUIRK_SETUP_STOP_MODE_GPR This patch intends to rename FLEXCAN_QUIRK_SETUP_STOP_MODE quirk to FLEXCAN_QUIRK_SETUP_STOP_MODE_GRP for non-scu SoCs, coming patch will add quirk for scu SoCs. For non-scu SoCs, setup stop mode with GPR register. For scu SoCs, setup stop mode with SCU firmware. Signed-off-by: Joakim Zhang Link: https://lore.kernel.org/r/20201106105627.31061-4-qiangqing.zhang@nxp.com Signed-off-by: Marc Kleine-Budde commit cefd754d131a65756ff6c2b428b935240c7a0a10 Author: Joakim Zhang Date: Fri Nov 6 18:56:26 2020 +0800 dt-bindings: firmware: add IMX_SC_R_CAN(x) macro for CAN Add IMX_SC_R_CAN(x) macro for CAN. Suggested-by: Marc Kleine-Budde Acked-by: Shawn Guo Signed-off-by: Joakim Zhang Link: https://lore.kernel.org/r/20201106105627.31061-5-qiangqing.zhang@nxp.com Signed-off-by: Marc Kleine-Budde commit 07b6b3e23cbd531977535b4d1bbef741d13af264 Author: Joakim Zhang Date: Fri Nov 6 18:56:23 2020 +0800 dt-bindings: can: fsl,flexcan: fix fsl,clk-source property Correct fsl,clk-source example since flexcan driver uses "of_property_read_u8" to get this property. Fixes: 9d733992772d ("dt-bindings: can: flexcan: add PE clock source property to device tree") Signed-off-by: Joakim Zhang Link: https://lore.kernel.org/r/20201106105627.31061-2-qiangqing.zhang@nxp.com Signed-off-by: Marc Kleine-Budde commit 4e20b3a1b02eb64c10c2d2c8b7e026a679fdb1c8 Author: Marc Kleine-Budde Date: Wed Nov 11 09:08:28 2020 +0100 dt-bindings: can: fsl,flexcan: add uint32 reference to clock-frequency property This patch adds the missing reference to the clock-frequency property. The driver uses a of_property_read_u32() to read the property to mark it as uint32. Fixes: e5ab9aa7e49b ("dt-bindings: can: flexcan: convert fsl,*flexcan bindings to yaml") Link: https://lore.kernel.org/r/20201119073357.2858925-1-mkl@pengutronix.de Cc: Joakim Zhang Cc: Oleksij Rempel Signed-off-by: Marc Kleine-Budde commit 94c23097f991cd4568388564b3d2816b0b83f924 Author: Oliver Hartkopp Date: Thu Nov 19 09:49:21 2020 +0100 can: gw: support modification of Classical CAN DLCs Add support for data length code modifications for Classical CAN. The netlink configuration interface always allowed to pass any value that fits into a byte, therefore only the modification process had to be extended to handle the raw DLC represenation of Classical CAN frames. When a DLC value from 0 .. F is provided for Classical CAN frame modifications the 'len' value is modified as-is with the exception that potentially existing 9 .. F DLC values in the len8_dlc element are moved to the 'len' element for the modification operation by mod_retrieve_ccdlc(). After the modification the Classical CAN frame DLC information is brought back into the correct format by mod_store_ccdlc() which is filling 'len' and 'len8_dlc' accordingly. Signed-off-by: Oliver Hartkopp Link: https://lore.kernel.org/r/20201119084921.2621-1-socketcan@hartkopp.net Signed-off-by: Marc Kleine-Budde commit 396b3cedc9cf54bf6266a89150136d72af7fcb1e Author: Stefan Mätje Date: Mon Nov 16 19:44:30 2020 +0100 can: drivers: add len8_dlc support for esd_usb2 CAN adapter Support the Classical CAN raw DLC functionality to send and receive DLC values from 9 .. 15 for the Classical CAN capable CAN network driver esd_usb that supports the esd CAN-USB/2 and CAN-USB/Micro devices: - esd_usb2 Signed-off-by: Stefan Mätje Tested-by: Stefan Mätje Link: https://lore.kernel.org/r/20201116184430.25462-2-stefan.maetje@esd.eu [mkl: rewrapped some long lines] Signed-off-by: Marc Kleine-Budde commit 4c01fc87675e6974d42383eba9a043123d8e13c3 Author: Oliver Hartkopp Date: Wed Nov 11 10:59:23 2020 +0100 can: drivers: add len8_dlc support for various CAN adapters Support the Classical CAN raw DLC functionality to send and receive DLC values from 9 .. 15 on various Classical CAN capable CAN network drivers: - sja1000 - gs_usb - pcan_usb - pcan_usb_fd - usb_8dev Signed-off-by: Oliver Hartkopp Tested-by: Oliver Hartkopp Link: https://lore.kernel.org/r/20201111095923.2535-1-socketcan@hartkopp.net [mkl: usb_8dev: changed indention] Signed-off-by: Marc Kleine-Budde commit e8e73562ce0b24d691ad35df3de34b324248458f Author: Oliver Hartkopp Date: Tue Nov 10 16:49:12 2020 +0100 can: drivers: introduce helpers to access Classical CAN DLC values This patch adds the following helper to functions to access Classical CAN DLC values. can_get_cc_dlc(): get the data length code for Classical CAN raw DLC access can_frame_set_cc_len(): set len and len8_dlc value for Classical CAN raw DLC access Signed-off-by: Oliver Hartkopp Link: https://lore.kernel.org/r/20201110154913.1404582-2-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 75191707c7f5299764f00c8d2e9996af662ac2dd Author: Oliver Hartkopp Date: Tue Nov 10 11:18:50 2020 +0100 can: update documentation for DLC usage in Classical CAN The extension of struct can_frame with the len8_dlc element and the can_dlc naming issue required an update of the documentation. Additionally introduce the term 'Classical CAN' which has been established by CAN in Automation to separate the original CAN2.0 A/B from CAN FD. Updated some data structures and flags. Signed-off-by: Oliver Hartkopp Link: https://lore.kernel.org/r/20201110101852.1973-7-socketcan@hartkopp.net Signed-off-by: Marc Kleine-Budde commit 3ab4ce0d6fa8c93d41df4a74ec8d2c9198be2109 Author: Oliver Hartkopp Date: Tue Nov 10 11:18:49 2020 +0100 can: rename CAN FD related can_len2dlc and can_dlc2len helpers The helper functions can_len2dlc and can_dlc2len are only relevant for CAN FD data length code (DLC) conversion. To fit the introduced can_cc_dlc2len for Classical CAN we rename: can_dlc2len -> can_fd_dlc2len to get the payload length from the DLC can_len2dlc -> can_fd_len2dlc to get the DLC from the payload length Suggested-by: Vincent Mailhol Signed-off-by: Oliver Hartkopp Link: https://lore.kernel.org/r/20201110101852.1973-6-socketcan@hartkopp.net Signed-off-by: Marc Kleine-Budde commit c7b74967799b1af52b3045d69d4c26836b2d41de Author: Oliver Hartkopp Date: Fri Nov 20 11:04:44 2020 +0100 can: replace can_dlc as variable/element for payload length The naming of can_dlc as element of struct can_frame and also as variable name is misleading as it claims to be a 'data length CODE' but in reality it always was a plain data length. With the indroduction of a new 'len' element in struct can_frame we can now remove can_dlc as name and make clear which of the former uses was a plain length (-> 'len') or a data length code (-> 'dlc') value. Signed-off-by: Oliver Hartkopp Link: https://lore.kernel.org/r/20201120100444.3199-1-socketcan@hartkopp.net [mkl: gs_usb: keep struct gs_host_frame::can_dlc as is] Signed-off-by: Marc Kleine-Budde commit 1fe00b8b4276ddf335216f884cb719edbea129e1 Author: Cristian Marussi Date: Thu Nov 19 17:49:02 2020 +0000 firmware: arm_scmi: Add SCMI v3.0 sensors descriptors extensions Add support for new SCMI v3.0 Sensors extensions related to new sensors' features, like multiple axis and update intervals, while keeping compatibility with SCMI v2.0 features. While at that, refactor and simplify all the internal helpers macros and move struct scmi_sensor_info to use only non-fixed-size typing. Link: https://lore.kernel.org/r/20201119174906.43862-3-cristian.marussi@arm.com Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 22f0d89805a44c06a263f36a0d0f192f333df16e Author: Simon Ser Date: Fri Nov 20 09:46:28 2020 +0000 drm: document drm_mode_modeinfo This allows `struct drm_mode_modeinfo` references to be linkified. Some descriptions are borrowed from struct drm_display_mode. Signed-off-by: Simon Ser Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/BBtyuxgs3DvcrMtbRyb7KBEWUviGy1dtWO61eB4@cp3-web-016.plabs.ch commit 607a4672b458b12674b96724e2f9bd42a5e928c6 Author: Sudeep Holla Date: Fri Nov 20 10:55:17 2020 +0000 firmware: arm_scmi: Add full list of sensor type enumeration SCMI v2.0 provides a big list of sensor type enumeration from the sensorUnits enumeration table of Distributed Management Task Force(DMTF) specification number DSP 0248 (Platform Level Data Model for Platform Monitoring and Control Specification). It is however not an exact replica of the sensorUnits enumeration table. Let us just update the table as per SCMI v2.0 specification. Link: https://lore.kernel.org/r/20201119174906.43862-3-cristian.marussi@arm.com Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 2ac5ef3b23629e9740000948c48f4141bacb5abb Author: Simon Ser Date: Fri Nov 20 08:57:33 2020 +0000 drm: document drm_mode_get_connector Document how to perform a GETCONNECTOR ioctl. Document the various struct fields. Also document how to perform a forced probe, and when should user-space do it. Signed-off-by: Simon Ser Reviewed-by: Daniel Vetter Cc: Pekka Paalanen Link: https://patchwork.freedesktop.org/patch/msgid/4NxrTtynzPiPX4SOCzxmA1sRB8fVLfeiabVpi5j3Y@cp7-web-041.plabs.ch commit f25fb6de67205c71c542f51d7d2fbf16de16362a Author: Cristian Marussi Date: Thu Nov 19 17:49:01 2020 +0000 firmware: arm_scmi: Rework scmi_sensors_protocol_init Properly handle return values from initialization helpers and avoid setting sensor_ops before sensor_priv. Link: https://lore.kernel.org/r/20201119174906.43862-2-cristian.marussi@arm.com Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 768a711e2d4b5e348962254a1c4f9fbfb6f13904 Author: Vinod Koul Date: Fri Nov 20 16:04:01 2020 +0530 phy: samsung: phy-exynos-pcie: fix typo 'tunning' Fix the typo s/tunning/tuning Fixes: 496db029142f ("phy: samsung: phy-exynos-pcie: rework driver to support Exynos5433 PCIe PHY") Signed-off-by: Vinod Koul commit 496db029142f1392b8eebc19bcc49796feb7c8ba Author: Jaehoon Chung Date: Fri Nov 20 11:26:27 2020 +0100 phy: samsung: phy-exynos-pcie: rework driver to support Exynos5433 PCIe PHY Exynos5440 SoC support has been dropped since commit 8c83315da1cf ("ARM: dts: exynos: Remove Exynos5440"). Rework this driver to support PCIe PHY variant found in the Exynos5433 SoCs. Signed-off-by: Jaehoon Chung [mszyprow: reworked the driver to support only Exynos5433 variant, rebased onto current kernel code, rewrote commit message] Signed-off-by: Marek Szyprowski Acked-by: Krzysztof Kozlowski Reviewed-by: Jingoo Han Link: https://lore.kernel.org/r/20201120102627.14450-1-m.szyprowski@samsung.com Signed-off-by: Vinod Koul commit 864788c00fd75d76c1e3183ab54fcf4fac22f3b7 Author: Amelie Delaunay Date: Mon Nov 16 18:19:17 2020 +0100 dt-bindings: phy: phy-stm32-usbphyc: convert bindings to json-schema Convert the STM32 USB PHY Controller (USBPHYC) bindings to DT schema format using json-schema. Signed-off-by: Amelie Delaunay Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201116171917.10447-1-amelie.delaunay@st.com Signed-off-by: Vinod Koul commit 8eff8b4e22d9885f1509a68bf9a7cc1961c5dee4 Author: Neil Armstrong Date: Mon Nov 16 11:16:47 2020 +0100 phy: amlogic: phy-meson-axg-mipi-pcie-analog: add support for MIPI DSI analog The AXG Analog MIPI-DSI PHY also provides functions to the PCIe PHY, thus we need to have inclusive support for both interfaces at runtime. This fixes the regmap get from parent node, removes cell param to select a mode and implement runtime configuration & power on/off for both functions since they are not exclusive. Signed-off-by: Neil Armstrong Reviewed-by: Remi Pommarel Link: https://lore.kernel.org/r/20201116101647.73448-4-narmstrong@baylibre.com Signed-off-by: Vinod Koul commit 87c3cdecb3d5150270f1529ac140e7d0c192ba9d Author: Neil Armstrong Date: Mon Nov 16 11:16:46 2020 +0100 dt-bindings: phy: amlogic,meson-axg-mipi-pcie-analog: remove phy cell parameter The Amlogic AXG MIPI + PCIe Analog PHY provides function for both PCIe and MIPI DSI at the same time, and is not exclusive. Thus remove the invalid phy cell parameter. Signed-off-by: Neil Armstrong Acked-by: Rob Herring Link: https://lore.kernel.org/r/20201116101647.73448-3-narmstrong@baylibre.com Signed-off-by: Vinod Koul commit 76aefb221146dbe0de124f566329c76d5dcf118a Author: Neil Armstrong Date: Mon Nov 16 11:13:15 2020 +0100 phy: amlogic: Add AXG MIPI D-PHY driver The Amlogic AXG SoCs embeds a MIPI D-PHY used to communicate with DSI panels. Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20201116101315.71720-3-narmstrong@baylibre.com Signed-off-by: Vinod Koul commit 450889074f4fafaff0ea82c2c4c7e0a93b3cd5c7 Author: Neil Armstrong Date: Mon Nov 16 11:16:45 2020 +0100 dt-bindings: phy: amlogic,meson-axg-mipi-pcie-analog: remove reg attribute The PHY registers happens to be at the beginning of a large zone containing interleaved system registers (mainly clocks, power management, PHY control..), found in all Amlogic SoC so far. The goal is to model it the same way as the other "features" of this zone, like Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.txt and Documentation/devicetree/bindings/power/amlogic,meson-ee-pwrc.yaml and have a coherent bindings scheme over the Amlogic SoCs. This update the description, removed the reg attribute then updates the example accordingly. Signed-off-by: Neil Armstrong Acked-by: Rob Herring Link: https://lore.kernel.org/r/20201116101647.73448-2-narmstrong@baylibre.com Signed-off-by: Vinod Koul commit e1404d203139d871946df9091a6e042b1154bd63 Author: Neil Armstrong Date: Mon Nov 16 11:13:14 2020 +0100 dt-bindings: phy: add Amlogic AXG MIPI D-PHY bindings The Amlogic AXg SoCs embeds a MIPI D-PHY to communicate with DSI panels, this adds the bindings. This D-PHY depends on a separate analog PHY. Signed-off-by: Neil Armstrong Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201116101315.71720-2-narmstrong@baylibre.com Signed-off-by: Vinod Koul commit 65f8453dc69159fd499e0c5b7fafbba771a1dfe2 Author: Gurchetan Singh Date: Wed Nov 18 17:08:09 2020 -0800 drm/virtio: rename sync_seq and last_seq To be clearer about our intentions to associate sequence numbers and fence IDs, let's rename these variables. Signed-off-by: Gurchetan Singh Reviewed-by: Anthoine Bourgeois Link: http://patchwork.freedesktop.org/patch/msgid/20201119010809.528-5-gurchetansingh@chromium.org Signed-off-by: Gerd Hoffmann commit bb53a604a74b38e6d71ae12174c8c1d229c2e2b1 Author: Gurchetan Singh Date: Wed Nov 18 17:08:08 2020 -0800 drm/virtio: use fence_id when processing fences Currently, the fence ID, which can be used to identify a virtgpu fence, is the same as the fence sequence number. Let's use the fence_id name to clearly signal this. Signed-off-by: Gurchetan Singh Reviewed-by: Anthoine Bourgeois Link: http://patchwork.freedesktop.org/patch/msgid/20201119010809.528-4-gurchetansingh@chromium.org Signed-off-by: Gerd Hoffmann commit c12096085b623024416d02db435005cdf79a71bb Author: Anthoine Bourgeois Date: Wed Nov 18 17:08:07 2020 -0800 virtio-gpu api: Add a comment on VIRTIO_GPU_SHM_ID_HOST_VISIBLE This provides a description of how the kernel driver uses the shmid to determine capabilities. Signed-off-by: Anthoine Bourgeois Link: http://patchwork.freedesktop.org/patch/msgid/20201119010809.528-3-gurchetansingh@chromium.org Signed-off-by: Gerd Hoffmann commit 7efb5f38ac9e9694128e03e949139c78b7829e01 Author: Anthoine Bourgeois Date: Wed Nov 18 17:08:06 2020 -0800 drm/virtio: fix a file name comment reference Easier to find where declarations are implemented. Signed-off-by: Anthoine Bourgeois Link: http://patchwork.freedesktop.org/patch/msgid/20201119010809.528-2-gurchetansingh@chromium.org Signed-off-by: Gerd Hoffmann commit a651341b269c3d6ea0551db815bbe21a0dae127f Author: Anthoine Bourgeois Date: Wed Nov 18 17:08:05 2020 -0800 drm/virtio: suffix create blob call with _ioctl like any ioctl For coherency, all ioctls are suffixed Signed-off-by: Anthoine Bourgeois Link: http://patchwork.freedesktop.org/patch/msgid/20201119010809.528-1-gurchetansingh@chromium.org Signed-off-by: Gerd Hoffmann commit 053af9e6e817fe58191b0d27bc67ba329d94ced2 Author: Davidlohr Bueso Date: Thu Nov 19 20:53:00 2020 -0800 USB: serial: mos7720: defer state restore to a workqueue The parallel port restore operation currently defers writes to a tasklet, if it sees a locked disconnect mutex. The driver goes to a lot of trouble to ensure writes happen in a non-blocking context, but things can be greatly simplified if it's done in regular process context and this is not a system performance critical path. As such, instead of doing the state restore writes in softirq context, use a workqueue and just do regular synchronous writes. In addition to the cleanup, this also imposes less on the overall system as tasklets have been deprecated because of it's softirq implications, potentially blocking a higher priority task from running. Signed-off-by: Davidlohr Bueso Link: https://lore.kernel.org/r/20201120045300.28804-1-dave@stgolabs.net [johan: amend commit message ("softirq context")] Signed-off-by: Johan Hovold commit 04435217f96869ac3a8f055ff68c5237a60bcd7e Author: Nicolas Saenz Julienne Date: Thu Nov 19 18:53:59 2020 +0100 mm: Remove examples from enum zone_type comment We can't really list every setup in common code. On top of that they are unlikely to stay true for long as things change in the arch trees independently of this comment. Suggested-by: Christoph Hellwig Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20201119175400.9995-8-nsaenzjulienne@suse.de Signed-off-by: Catalin Marinas commit 2b8652936f0ca9ca2e6c984ae76c7bfcda1b3f22 Author: Ard Biesheuvel Date: Thu Nov 19 18:53:58 2020 +0100 arm64: mm: Set ZONE_DMA size based on early IORT scan We recently introduced a 1 GB sized ZONE_DMA to cater for platforms incorporating masters that can address less than 32 bits of DMA, in particular the Raspberry Pi 4, which has 4 or 8 GB of DRAM, but has peripherals that can only address up to 1 GB (and its PCIe host bridge can only access the bottom 3 GB) Instructing the DMA layer about these limitations is straight-forward, even though we had to fix some issues regarding memory limits set in the IORT for named components, and regarding the handling of ACPI _DMA methods. However, the DMA layer also needs to be able to allocate memory that is guaranteed to meet those DMA constraints, for bounce buffering as well as allocating the backing for consistent mappings. This is why the 1 GB ZONE_DMA was introduced recently. Unfortunately, it turns out the having a 1 GB ZONE_DMA as well as a ZONE_DMA32 causes problems with kdump, and potentially in other places where allocations cannot cross zone boundaries. Therefore, we should avoid having two separate DMA zones when possible. So let's do an early scan of the IORT, and only create the ZONE_DMA if we encounter any devices that need it. This puts the burden on the firmware to describe such limitations in the IORT, which may be redundant (and less precise) if _DMA methods are also being provided. However, it should be noted that this situation is highly unusual for arm64 ACPI machines. Also, the DMA subsystem still gives precedence to the _DMA method if implemented, and so we will not lose the ability to perform streaming DMA outside the ZONE_DMA if the _DMA method permits it. [nsaenz: unified implementation with DT's counterpart] Signed-off-by: Ard Biesheuvel Signed-off-by: Nicolas Saenz Julienne Tested-by: Jeremy Linton Acked-by: Lorenzo Pieralisi Acked-by: Hanjun Guo Cc: Jeremy Linton Cc: Lorenzo Pieralisi Cc: Nicolas Saenz Julienne Cc: Rob Herring Cc: Christoph Hellwig Cc: Robin Murphy Cc: Hanjun Guo Cc: Sudeep Holla Cc: Anshuman Khandual Link: https://lore.kernel.org/r/20201119175400.9995-7-nsaenzjulienne@suse.de Signed-off-by: Catalin Marinas commit 8424ecdde7df99d5426e1a1fd9f0fb36f4183032 Author: Nicolas Saenz Julienne Date: Thu Nov 19 18:53:57 2020 +0100 arm64: mm: Set ZONE_DMA size based on devicetree's dma-ranges We recently introduced a 1 GB sized ZONE_DMA to cater for platforms incorporating masters that can address less than 32 bits of DMA, in particular the Raspberry Pi 4, which has 4 or 8 GB of DRAM, but has peripherals that can only address up to 1 GB (and its PCIe host bridge can only access the bottom 3 GB) The DMA layer also needs to be able to allocate memory that is guaranteed to meet those DMA constraints, for bounce buffering as well as allocating the backing for consistent mappings. This is why the 1 GB ZONE_DMA was introduced recently. Unfortunately, it turns out the having a 1 GB ZONE_DMA as well as a ZONE_DMA32 causes problems with kdump, and potentially in other places where allocations cannot cross zone boundaries. Therefore, we should avoid having two separate DMA zones when possible. So, with the help of of_dma_get_max_cpu_address() get the topmost physical address accessible to all DMA masters in system and use that information to fine-tune ZONE_DMA's size. In the absence of addressing limited masters ZONE_DMA will span the whole 32-bit address space, otherwise, in the case of the Raspberry Pi 4 it'll only span the 30-bit address space, and have ZONE_DMA32 cover the rest of the 32-bit address space. Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20201119175400.9995-6-nsaenzjulienne@suse.de Signed-off-by: Catalin Marinas commit 07d13a1d6120d453c3c1f020578693d072deded5 Author: Nicolas Saenz Julienne Date: Thu Nov 19 18:53:56 2020 +0100 of: unittest: Add test for of_dma_get_max_cpu_address() Introduce a test for of_dma_get_max_cup_address(), it uses the same DT data as the rest of dma-ranges unit tests. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201119175400.9995-5-nsaenzjulienne@suse.de Signed-off-by: Catalin Marinas commit 964db79d6c186cc2ecc6ae46f98eed7e0ea8cf71 Author: Nicolas Saenz Julienne Date: Thu Nov 19 18:53:55 2020 +0100 of/address: Introduce of_dma_get_max_cpu_address() Introduce of_dma_get_max_cpu_address(), which provides the highest CPU physical address addressable by all DMA masters in the system. It's specially useful for setting memory zones sizes at early boot time. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201119175400.9995-4-nsaenzjulienne@suse.de Signed-off-by: Catalin Marinas commit 9804f8c69b04a39d0ba41d19e6bdc6aa91c19725 Author: Nicolas Saenz Julienne Date: Thu Nov 19 18:53:54 2020 +0100 arm64: mm: Move zone_dma_bits initialization into zone_sizes_init() zone_dma_bits's initialization happens earlier that it's actually needed, in arm64_memblock_init(). So move it into the more suitable zone_sizes_init(). Signed-off-by: Nicolas Saenz Julienne Tested-by: Jeremy Linton Link: https://lore.kernel.org/r/20201119175400.9995-3-nsaenzjulienne@suse.de Signed-off-by: Catalin Marinas commit 0a30c53573b07d5561457e41fb0ab046cd857da5 Author: Nicolas Saenz Julienne Date: Thu Nov 19 18:53:53 2020 +0100 arm64: mm: Move reserve_crashkernel() into mem_init() crashkernel might reserve memory located in ZONE_DMA. We plan to delay ZONE_DMA's initialization after unflattening the devicetree and ACPI's boot table initialization, so move it later in the boot process. Specifically into bootmem_init() since request_standard_resources() depends on it. Signed-off-by: Nicolas Saenz Julienne Tested-by: Jeremy Linton Link: https://lore.kernel.org/r/20201119175400.9995-2-nsaenzjulienne@suse.de Signed-off-by: Catalin Marinas commit 2687275a5843d1089687f08fc64eb3f3b026a169 Author: Catalin Marinas Date: Thu Nov 19 17:55:56 2020 +0000 arm64: Force NO_BLOCK_MAPPINGS if crashkernel reservation is required mem_init() currently relies on knowing the boundaries of the crashkernel reservation to map such region with page granularity for later unmapping via set_memory_valid(..., 0). If the crashkernel reservation is deferred, such boundaries are not known when the linear mapping is created. Simply parse the command line for "crashkernel" and, if found, create the linear map with NO_BLOCK_MAPPINGS. Signed-off-by: Catalin Marinas Tested-by: Nicolas Saenz Julienne Reviewed-by: Nicolas Saenz Julienne Acked-by: James Morse Cc: James Morse Cc: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20201119175556.18681-1-catalin.marinas@arm.com Signed-off-by: Catalin Marinas commit cd1124e76d740327be5d8f9ce3785ce1119daf4b Author: Oliver Hartkopp Date: Tue Nov 10 11:18:47 2020 +0100 can: remove obsolete get_canfd_dlc() macro The macro was always used together with can_dlc2len() which sanitizes the given dlc value on its own. Signed-off-by: Oliver Hartkopp Link: https://lore.kernel.org/r/20201110101852.1973-4-socketcan@hartkopp.net Signed-off-by: Marc Kleine-Budde commit 69d98969a0540039fc04e0f22bbe9f41b0a13d66 Author: Oliver Hartkopp Date: Tue Nov 10 11:18:46 2020 +0100 can: rename get_can_dlc() macro with can_cc_dlc2len() The get_can_dlc() macro is used to ensure the payload length information of the Classical CAN frame to be max 8 bytes (the CAN_MAX_DLEN). Rename the macro and use the correct constant in preparation of the len/dlc cleanup for Classical CAN frames. Signed-off-by: Oliver Hartkopp Link: https://lore.kernel.org/r/20201110101852.1973-3-socketcan@hartkopp.net Signed-off-by: Marc Kleine-Budde commit ea7800565a128c1adafa1791ce80afd6016fe21c Author: Oliver Hartkopp Date: Tue Nov 10 11:18:45 2020 +0100 can: add optional DLC element to Classical CAN frame structure ISO 11898-1 Chapter 8.4.2.3 defines a 4 bit data length code (DLC) table which maps the DLC to the payload length of the CAN frame in bytes: DLC -> payload length 0 .. 8 -> 0 .. 8 9 .. 15 -> 8 Although the DLC values 8 .. 15 in Classical CAN always result in a payload length of 8 bytes these DLC values are transparently transmitted on the CAN bus. As the struct can_frame only provides a 'len' element (formerly 'can_dlc') which contains the plain payload length ( 0 .. 8 ) of the CAN frame, the raw DLC is not visible to the application programmer, e.g. for testing use-cases. To access the raw DLC values 9 .. 15 the len8_dlc element is introduced, which is only valid when the payload length 'len' is 8 and the DLC is greater than 8. The len8_dlc element is filled by the CAN interface driver and used for CAN frame creation by the CAN driver when the CAN_CTRLMODE_CC_LEN8_DLC flag is supported by the driver and enabled via netlink configuration interface. Reported-by: Vincent Mailhol Signed-off-by: Oliver Hartkopp Link: https://lore.kernel.org/r/20201110101852.1973-2-socketcan@hartkopp.net Signed-off-by: Marc Kleine-Budde commit b7d3c0e5930deb3c8f69d7572e17baf2f07c56db Author: Yegor Yefremov Date: Wed Nov 4 16:57:30 2020 +0100 can: j1939: add tables for the CAN identifier and its fields Use table markup to show the structure of the CAN identifier, PGN, PDU1, and PDU2 formats. Also add introductory sentence. Signed-off-by: Yegor Yefremov Link: https://lore.kernel.org/r/20201104155730.25196-1-yegorslists@googlemail.com [mkl: removed trailing whitespace] Signed-off-by: Marc Kleine-Budde commit 52a0372a38b45899368b44147db52f7360aaea31 Author: Prashant Malani Date: Thu Nov 19 22:35:22 2020 -0800 usb: typec: Fix num_altmodes kernel-doc error The commit to introduce the num_altmodes attribute for partner had an error where one of the parameters was named differently in the comment and the function signature. Fix the version in the comment to align with what is in the function signature. This fixes the following htmldocs warning: drivers/usb/typec/class.c:632: warning: Excess function parameter 'num_alt_modes' description in 'typec_partner_set_num_altmodes' Fixes: a0ccdc4a77a1 ("usb: typec: Add number of altmodes partner attr") Reviewed-by: Heikki Krogerus Signed-off-by: Prashant Malani Link: https://lore.kernel.org/r/20201120063523.4159877-1-pmalani@chromium.org Reported-by: Stephen Rothwell Signed-off-by: Greg Kroah-Hartman commit 52aa300fabe5ee17fd1dc85cef4723816b62f4b6 Author: Simon Ser Date: Thu Nov 19 10:03:20 2020 +0000 drm: improve kernel-docs in drm_mode.h - Remove duplicate doc-comments for struct members - Add missing @member markers for in-line member comments Signed-off-by: Simon Ser Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/grZIqIAOSUM7eNL0PurBsaWoILFwN2hEKd40Ylgzg@cp7-web-041.plabs.ch commit f287c536d9431f5788916b204febab8d27a5ce55 Author: Aditya Swarup Date: Tue Nov 17 00:48:36 2020 -0800 drm/i915/dg1: Enable ports For DG1 we have a little of mix up wrt to DDI/port names and indexes. Bspec refers to the ports as DDIA, DDIB, DDI USBC1 and DDI USBC2 (besides the DDIA, DDIB, DDIC, DDID), but the previous naming is the most unambiguous one. This means that for any register on Display Engine we should use the index of A, B, D and E. However in some places this is not true: - VBT: uses C and D and have to be mapped to D/E - IO/Combo: uses C and D, but we already differentiate those when we created the phy vs port distinction. This additional mapping for VBT and phy are already covered in previous patches, so now we can initialize all the DDIs as A, B, D and E. v2: Squash previous patch enabling just ports A and B since most of the pumbling code is already merged now Cc: Matt Roper Cc: Clinton Taylor Signed-off-by: Aditya Swarup Reviewed-by: Lucas De Marchi Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20201117084836.2318234-1-lucas.demarchi@intel.com commit 7b7e4cee0299eddd73ea3874fa485a545a0ec2bc Merge: 6cc1716102b55 2ca7e30d3b1ee Author: Manivannan Sadhasivam Date: Fri Nov 20 11:56:55 2020 +0530 Merge branch 'mhi-ath11k-immutable' into mhi-next commit 2ca7e30d3b1ee370c96201e58f8c05ba2bdcd6d2 Author: Bhaumik Bhatt Date: Wed Nov 18 10:20:25 2020 -0800 net: qrtr: Unprepare MHI channels during remove Reset MHI device channels when driver remove is called due to module unload or any crash scenario. This will make sure that MHI channels no longer remain enabled for transfers since the MHI stack does not take care of this anymore after the auto-start channels feature was removed. Signed-off-by: Bhaumik Bhatt Acked-by: Jakub Kicinski Reviewed-by: Manivannan Sadhasivam Signed-off-by: Manivannan Sadhasivam commit 4082c502bf9c8a6afe4268c654d4e93ab7dfeb69 Merge: 6b13d8f71fb37 0dfd294c92411 Author: Jakub Kicinski Date: Thu Nov 19 22:05:44 2020 -0800 Merge branch 'enetc-clean-endianness-warnings-up' Claudiu Manoil says: ==================== enetc: Clean endianness warnings up Cleanup patches to address the outstanding endianness issues in the driver reported by sparse. ==================== Link: https://lore.kernel.org/r/20201119101215.19223-1-claudiu.manoil@nxp.com Signed-off-by: Jakub Kicinski commit 0dfd294c92411da47041cca4ef790ee6112d6b68 Author: Claudiu Manoil Date: Thu Nov 19 12:12:15 2020 +0200 enetc: Fix endianness issues for enetc_qos Currently the control buffer descriptor (cbd) fields have endianness restrictions while the commands passed into the control buffers don't (with one exception). This patch fixes offending code, by adding endianness accessors for cbd fields and removing the unnecessary ones in case of data buffer fields. Currently there's no need to convert all commands to little endian format, the patch only focuses on fixing current endianness issues reported by sparse. Signed-off-by: Claudiu Manoil Signed-off-by: Jakub Kicinski commit d548d3930ab635653d1549c864ce1a002dc3b218 Author: Claudiu Manoil Date: Thu Nov 19 12:12:14 2020 +0200 enetc: Fix endianness issues for enetc_ethtool These particular fields are specified in the H/W reference manual as having network byte order format, so enforce big endian annotation for them and clear the related sparse warnings in the process. Signed-off-by: Claudiu Manoil Signed-off-by: Jakub Kicinski commit 6b13d8f71fb37c573993eccdf190e566d136c117 Author: Oliver Herms Date: Thu Nov 19 00:06:51 2020 +0100 IPv6: RTM_GETROUTE: Add RTA_ENCAP to result This patch adds an IPv6 routes encapsulation attribute to the result of netlink RTM_GETROUTE requests (i.e. ip route get 2001:db8::). Signed-off-by: Oliver Herms Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20201118230651.GA8861@tws Signed-off-by: Jakub Kicinski commit b680a214ec281dbd44b5ebbf3f126a57f1ecf0f7 Author: Paolo Abeni Date: Wed Nov 18 23:05:34 2020 +0100 mptcp: update rtx timeout only if required. We must start the retransmission timer only there are pending data in the rtx queue. Otherwise we can hit a WARN_ON in mptcp_reset_timer(), as syzbot demonstrated. Reported-and-tested-by: syzbot+42aa53dafb66a07e5a24@syzkaller.appspotmail.com Fixes: d9ca1de8c0cd ("mptcp: move page frag allocation in mptcp_sendmsg()") Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Reported-by: Naresh Kamboju Tested-by: Naresh Kamboju Link: https://lore.kernel.org/r/1a72039f112cae048c44d398ffa14e0a1432db3d.1605737083.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski commit ac75b09624ed679e239b75081923a6d33ae35876 Merge: 56495a2442a47 52cc5f3a166a3 Author: Jakub Kicinski Date: Thu Nov 19 21:41:08 2020 -0800 Merge branch 'devlink-move-common-flash_update-calls-to-core' Jacob Keller says: ==================== devlink: move common flash_update calls to core This series moves a couple common pieces done by all drivers of the ->flash_update interface into devlink.c flash update handler. Specifically, the core code will now request_firmware and devlink_flash_update_(begin|end)_notify. This cleanup is intended to simplify driver implementations so that they have less work to do and are less capable of doing the "wrong" thing. For request_firmware, this simplification is done as it is not expected that drivers would do anything else. It also standardizes all drivers so that they use the same interface (request_firmware, as opposed to request_firmware_direct), and allows reporting the netlink extended ack with the file name attribute. For status notification, this change prevents drivers from sending a status message without properly sending the status end notification. The current userspace implementation of devlink relies on this end notification to properly close the flash update channel. Without this, the flash update process may hang indefinitely. By moving the begin and end calls into the core code, it is no longer possible for a driver author to get this wrong. Changes since v3 * picked up acked-by and reviewed-by comments * fixed the ionic driver to leave the print statement in place For the original patch that moved request_firmware, see [1]. For the v2 see [2]. For further discussion of the issues with devlink flash status see [3]. For v3 see [4]. [1] https://lore.kernel.org/netdev/20201113000142.3563690-1-jacob.e.keller@intel.com/ [2] https://lore.kernel.org/netdev/20201113224559.3910864-1-jacob.e.keller@intel.com/ [3] https://lore.kernel.org/netdev/6352e9d3-02af-721e-3a54-ef99a666be29@intel.com/ [4] https://lore.kernel.org/netdev/20201117200820.854115-1-jacob.e.keller@intel.com/ ==================== Link: https://lore.kernel.org/r/20201118190636.1235045-1-jacob.e.keller@intel.com Signed-off-by: Jakub Kicinski commit 52cc5f3a166a33012ebca2cdefebf4c689110068 Author: Jacob Keller Date: Wed Nov 18 11:06:36 2020 -0800 devlink: move flash end and begin to core devlink When performing a flash update via devlink, device drivers may inform user space of status updates via devlink_flash_update_(begin|end|timeout|status)_notify functions. It is expected that drivers do not send any status notifications unless they send a begin and end message. If a driver sends a status notification without sending the appropriate end notification upon finishing (regardless of success or failure), the current implementation of the devlink userspace program can get stuck endlessly waiting for the end notification that will never come. The current ice driver implementation may send such a status message without the appropriate end notification in rare cases. Fixing the ice driver is relatively simple: we just need to send the begin_notify at the start of the function and always send an end_notify no matter how the function exits. Rather than assuming driver authors will always get this right in the future, lets just fix the API so that it is not possible to get wrong. Make devlink_flash_update_begin_notify and devlink_flash_update_end_notify static, and call them in devlink.c core code. Always send the begin_notify just before calling the driver's flash_update routine. Always send the end_notify just after the routine returns regardless of success or failure. Doing this makes the status notification easier to use from the driver, as it no longer needs to worry about catching failures and cleaning up by calling devlink_flash_update_end_notify. It is now no longer possible to do the wrong thing in this regard. We also save a couple of lines of code in each driver. Signed-off-by: Jacob Keller Acked-by: Vasundhara Volam Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit b44cfd4f5b912454387a4bf735d42eb4e7078ca8 Author: Jacob Keller Date: Wed Nov 18 11:06:35 2020 -0800 devlink: move request_firmware out of driver All drivers which implement the devlink flash update support, with the exception of netdevsim, use either request_firmware or request_firmware_direct to locate the firmware file. Rather than having each driver do this separately as part of its .flash_update implementation, perform the request_firmware within net/core/devlink.c Replace the file_name parameter in the struct devlink_flash_update_params with a pointer to the fw object. Use request_firmware rather than request_firmware_direct. Although most Linux distributions today do not have the fallback mechanism implemented, only about half the drivers used the _direct request, as compared to the generic request_firmware. In the event that a distribution does support the fallback mechanism, the devlink flash update ought to be able to use it to provide the firmware contents. For distributions which do not support the fallback userspace mechanism, there should be essentially no difference between request_firmware and request_firmware_direct. Signed-off-by: Jacob Keller Acked-by: Shannon Nelson Acked-by: Vasundhara Volam Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit a89441fcd09d754439ad37c9e804f9232cba8223 Author: Jonathan Marek Date: Tue Jun 9 15:40:22 2020 -0400 arm64: dts: qcom: sm8250: add apps_smmu node Add the apps_smmu node for sm8250. For UFS, now that the kernel initializes the iommu, the stream mappings set by the bootloader are cleared. Adding the iommus property is required so that new mappings are created for UFS. Signed-off-by: Jonathan Marek Link: https://lore.kernel.org/r/20200609194030.17756-5-jonathan@marek.ca Signed-off-by: Bjorn Andersson commit 4815623259f533aec4513c72da20a0ac1c80233b Author: Jonathan Marek Date: Tue Jun 9 15:40:21 2020 -0400 arm64: dts: qcom: sm8150: add apps_smmu node Add the apps_smmu node for sm8150. For UFS, now that the kernel initializes the iommu, the stream mappings set by the bootloader are cleared. Adding the iommus property is required so that new mappings are created for UFS. Signed-off-by: Jonathan Marek Reviewed-by: Sai Prakash Ranjan Tested-by: Sai Prakash Ranjan Link: https://lore.kernel.org/r/20200609194030.17756-4-jonathan@marek.ca Signed-off-by: Bjorn Andersson commit ded5ed04d85e299770dcb7e82c2127b8054a00c8 Author: Souradeep Chowdhury Date: Wed Sep 30 13:44:13 2020 +0530 soc: qcom: llcc: Add configuration data for SM8150 Add LLCC configuration data for SM8150 SoC which controls LLCC behaviour. Signed-off-by: Souradeep Chowdhury Link: https://lore.kernel.org/r/957e3ae50c75720ef6227529d5ce3d4b457802e9.1601452132.git.schowdhu@codeaurora.org Signed-off-by: Bjorn Andersson commit bb1f7cf68a2d47c5008050177884be9662673537 Author: Souradeep Chowdhury Date: Wed Sep 30 13:44:14 2020 +0530 arm64: dts: qcom: sm8150: Add LLC support for sm8150 Add LLCC system cache controller entry for sm8150 to support sm8150 for LLCC. Signed-off-by: Souradeep Chowdhury Link: https://lore.kernel.org/r/8f0e818485941076d62a8dc9f711b0fb868ba080.1601452132.git.schowdhu@codeaurora.org Signed-off-by: Bjorn Andersson commit 3aa40a1ad36717114d9a267b08d884a387489fab Author: Lee Jones Date: Thu Nov 19 19:20:33 2020 -0800 Input: vmmouse - demote obvious abuse of kernel-doc header Fixes the following W=1 kernel build warning(s): drivers/input/mouse/vmmouse.c:99: warning: Function parameter or member 'cmd' not described in 'VMMOUSE_CMD' drivers/input/mouse/vmmouse.c:99: warning: Function parameter or member 'in1' not described in 'VMMOUSE_CMD' drivers/input/mouse/vmmouse.c:99: warning: Function parameter or member 'out1' not described in 'VMMOUSE_CMD' drivers/input/mouse/vmmouse.c:99: warning: Function parameter or member 'out2' not described in 'VMMOUSE_CMD' drivers/input/mouse/vmmouse.c:99: warning: Function parameter or member 'out3' not described in 'VMMOUSE_CMD' drivers/input/mouse/vmmouse.c:99: warning: Function parameter or member 'out4' not described in 'VMMOUSE_CMD' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201112110204.2083435-16-lee.jones@linaro.org Signed-off-by: Dmitry Torokhov commit 39f4879e99a42d3ebcf9876bf4201d95679445d3 Author: Lee Jones Date: Thu Nov 19 19:20:09 2020 -0800 Input: applespi - provide missing struct 'message' descriptions Fixes the following W=1 kernel build warning(s): drivers/input/keyboard/applespi.c:306: warning: Function parameter or member 'keyboard' not described in 'message' drivers/input/keyboard/applespi.c:306: warning: Function parameter or member 'touchpad' not described in 'message' drivers/input/keyboard/applespi.c:306: warning: Function parameter or member 'tp_info' not described in 'message' drivers/input/keyboard/applespi.c:306: warning: Function parameter or member 'tp_info_command' not described in 'message' drivers/input/keyboard/applespi.c:306: warning: Function parameter or member 'init_mt_command' not described in 'message' drivers/input/keyboard/applespi.c:306: warning: Function parameter or member 'capsl_command' not described in 'message' drivers/input/keyboard/applespi.c:306: warning: Function parameter or member 'bl_command' not described in 'message' drivers/input/keyboard/applespi.c:306: warning: Function parameter or member 'data' not described in 'message' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201112110204.2083435-15-lee.jones@linaro.org Signed-off-by: Dmitry Torokhov commit 584da78cba791fc7b015416953a751a8269d375a Author: Lee Jones Date: Thu Nov 19 19:19:38 2020 -0800 Input: goodix - fix misspelling of 'ctx' Fixes the following W=1 kernel build warning(s): drivers/input/touchscreen/goodix.c:1168: warning: Function parameter or member 'ctx' not described in 'goodix_config_cb' drivers/input/touchscreen/goodix.c:1168: warning: Excess function parameter 'ts' description in 'goodix_config_cb' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201112110204.2083435-14-lee.jones@linaro.org Signed-off-by: Dmitry Torokhov commit 732b764099f651a088fd931d7b8121b6aa84e62e Author: Corentin Labbe Date: Sun Nov 15 19:08:07 2020 +0000 crypto: sun8i-ce - fix two error path's memory leak This patch fixes the following smatch warnings: drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c:412 sun8i_ce_hash_run() warn: possible memory leak of 'result' Note: "buf" is leaked as well. Furthermore, in case of ENOMEM, crypto_finalize_hash_request() was not called which was an error. Fixes: 56f6d5aee88d ("crypto: sun8i-ce - support hash algorithms") Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 2e0e386af88429ec28fb9ab4531096a370578e97 Author: Colin Ian King Date: Sat Nov 14 12:12:27 2020 +0000 crypto: kconfig - fix a couple of spelling mistakes There are a couple of spelling mistakes in two crypto Kconfig files. Fix these. Signed-off-by: Colin Ian King Signed-off-by: Herbert Xu commit 8c8268166e83425243789c5781c92e7fa33b703b Author: Giovanni Cabiddu Date: Fri Nov 13 16:46:43 2020 +0000 crypto: qat - add qat_4xxx driver Add support for QAT 4xxx devices. Signed-off-by: Giovanni Cabiddu Reviewed-by: Fiona Trahe Signed-off-by: Herbert Xu commit 6644f49e7b71e13bcc5498d9fea8862c5ce96388 Author: Giovanni Cabiddu Date: Fri Nov 13 16:46:42 2020 +0000 crypto: qat - add hook to initialize vector routing table Add an hook to initialize the vector routing table with the default values before MSIx is enabled. The new function set_msix_rttable() is called only if present in the struct adf_hw_device_data of the device. This is to allow for QAT devices that do not support that functionality. Signed-off-by: Giovanni Cabiddu Reviewed-by: Fiona Trahe Signed-off-by: Herbert Xu commit e73916f20829be09932326ab0c9627b29df553e8 Author: Giovanni Cabiddu Date: Fri Nov 13 16:46:41 2020 +0000 crypto: qat - target fw images to specific AEs Introduce support for devices that require multiple firmware images. If a device requires more than a firmware image to operate, load the image to the appropriate Acceleration Engine (AE). Signed-off-by: Giovanni Cabiddu Reviewed-by: Fiona Trahe Signed-off-by: Herbert Xu commit ff8107200367f4abe0e5bce66a245e8d0f2d229e Author: Zhang Qilong Date: Fri Nov 13 21:17:28 2020 +0800 crypto: omap-aes - Fix PM disable depth imbalance in omap_aes_probe The pm_runtime_enable will increase power disable depth. Thus a pairing decrement is needed on the error handling path to keep it balanced according to context. Fixes: f7b2b5dd6a62a ("crypto: omap-aes - add error check for pm_runtime_get_sync") Signed-off-by: Zhang Qilong Signed-off-by: Herbert Xu commit 1dc440355e472a60a98cb4ec9aa5ec56267a96fc Author: Yang Shen Date: Fri Nov 13 17:32:35 2020 +0800 crypto: hisilicon/zip - add a work_queue for zip irq The patch 'irqchip/gic-v3-its: Balance initial LPI affinity across CPUs' set the IRQ to an uncentain CPU. If an IRQ is bound to the CPU used by the thread which is sending request, the throughput will be just half. So allocate a 'work_queue' and set as 'WQ_UNBOUND' to do the back half work on some different CPUS. Signed-off-by: Yang Shen Reviewed-by: Zaibo Xu Reviewed-by: Zhou Wang Signed-off-by: Herbert Xu commit 1201581c57925b8bc2cba8628b61add3d16d4615 Author: Herbert Xu Date: Fri Nov 13 17:12:59 2020 +1100 crypto: lib/curve25519 - Move selftest prototype into header file This patch moves the curve25519_selftest into curve25519.h so we don't get a warning from gcc complaining about a missing prototype. Reported-by: kernel test robot Signed-off-by: Herbert Xu commit a24d22b225ce158651378869a6b88105c4bdb887 Author: Eric Biggers Date: Thu Nov 12 21:20:21 2020 -0800 crypto: sha - split sha.h into sha1.h and sha2.h Currently contains declarations for both SHA-1 and SHA-2, and contains declarations for SHA-3. This organization is inconsistent, but more importantly SHA-1 is no longer considered to be cryptographically secure. So to the extent possible, SHA-1 shouldn't be grouped together with any of the other SHA versions, and usage of it should be phased out. Therefore, split into two headers and , and make everyone explicitly specify whether they want the declarations for SHA-1, SHA-2, or both. This avoids making the SHA-1 declarations visible to files that don't want anything to do with SHA-1. It also prepares for potentially moving sha1.h into a new insecure/ or dangerous/ directory. Signed-off-by: Eric Biggers Acked-by: Ard Biesheuvel Acked-by: Jason A. Donenfeld Signed-off-by: Herbert Xu commit 5bdad829c31a09069fd508534f03c2ea1576ac75 Author: Nathan Chancellor Date: Thu Nov 12 13:07:02 2020 -0700 crypto: crypto4xx - Replace bitwise OR with logical OR in crypto4xx_build_pd Clang warns: drivers/crypto/amcc/crypto4xx_core.c:921:60: warning: operator '?:' has lower precedence than '|'; '|' will be evaluated first [-Wbitwise-conditional-parentheses] (crypto_tfm_alg_type(req->tfm) == CRYPTO_ALG_TYPE_AEAD) ? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ drivers/crypto/amcc/crypto4xx_core.c:921:60: note: place parentheses around the '|' expression to silence this warning (crypto_tfm_alg_type(req->tfm) == CRYPTO_ALG_TYPE_AEAD) ? ^ ) drivers/crypto/amcc/crypto4xx_core.c:921:60: note: place parentheses around the '?:' expression to evaluate it first (crypto_tfm_alg_type(req->tfm) == CRYPTO_ALG_TYPE_AEAD) ? ^ ( 1 warning generated. It looks like this should have been a logical OR so that PD_CTL_HASH_FINAL gets added to the w bitmask if crypto_tfm_alg_type is either CRYPTO_ALG_TYPE_AHASH or CRYPTO_ALG_TYPE_AEAD. Change the operator so that everything works properly. Fixes: 4b5b79998af6 ("crypto: crypto4xx - fix stalls under heavy load") Link: https://github.com/ClangBuiltLinux/linux/issues/1198 Signed-off-by: Nathan Chancellor Reviewed-by: Christian Lamparter Signed-off-by: Herbert Xu commit 0049a1329bb9569196a551bb658500394d98ed50 Author: Horia Geantă Date: Thu Nov 12 11:21:46 2020 +0200 crypto: caam/qi - simplify error path for context allocation Wang Qing reports that IS_ERR_OR_NULL() should be matched with PTR_ERR_OR_ZERO(), not PTR_ERR(). As it turns out, the error path always returns an error code, i.e. NULL is never returned. Update the code accordingly - s/IS_ERR_OR_NULL/IS_ERR. Reported-by: Wang Qing Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu commit 3ad99c22cebee84034bc53e42f5115dbc97490e8 Author: Ard Biesheuvel Date: Tue Nov 10 10:10:42 2020 +0100 crypto: arm64/gcm - move authentication tag check to SIMD domain Instead of copying the calculated authentication tag to memory and calling crypto_memneq() to verify it, use vector bytewise compare and min across vector instructions to decide whether the tag is valid. This is more efficient, and given that the tag is only transiently held in a NEON register, it is also safer, given that calculated tags for failed decryptions should be withheld. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 5761498c4d074560b38a203000afc6e971ffaa7f Author: Kai Ye Date: Mon Nov 9 17:00:27 2020 +0800 crypto: hisilicon/sec2 - Fix aead authentication setting key error Fix aead auth setting key process error. if use soft shash function, driver need to use digest size replace of the user input key length. Signed-off-by: Kai Ye Signed-off-by: Herbert Xu commit 50df51d12c3175573de9c94968639bdd625ec549 Merge: c4638ff0644bb b6ff30849ca72 Author: Paul E. McKenney Date: Thu Nov 19 19:38:53 2020 -0800 Merge branch 'lkmm.2020.11.06a' into HEAD lkmm.2020.11.06a: Linux-kernel memory model (LKMM) updates. commit c4638ff0644bb114b27c65fbc975a1597030beb0 Merge: 7fc91fc845065 1d094cefc37e5 Author: Paul E. McKenney Date: Thu Nov 19 19:38:25 2020 -0800 Merge branch 'kcsan.2020.11.06a' into HEAD kcsan.2020.11.06a: Kernel concurrency sanitizer (KCSAN) updates. commit 7fc91fc8450655e7ba941d61663afcaf65cefb78 Merge: 3fcd6a230fa7d c386e29d43728 50edb988534c6 65e9eb1ccfe56 75dc2da5ecd65 01f9e708d9eae Author: Paul E. McKenney Date: Thu Nov 19 19:37:47 2020 -0800 Merge branches 'cpuinfo.2020.11.06a', 'doc.2020.11.06a', 'fixes.2020.11.19b', 'lockdep.2020.11.02a', 'tasks.2020.11.06a' and 'torture.2020.11.06a' into HEAD cpuinfo.2020.11.06a: Speedups for /proc/cpuinfo. doc.2020.11.06a: Documentation updates. fixes.2020.11.19b: Miscellaneous fixes. lockdep.2020.11.02a: Lockdep-RCU updates to avoid "unused variable". tasks.2020.11.06a: Tasks-RCU updates. torture.2020.11.06a': Torture-test updates. commit 50edb988534c621a56ca103c0c16ac59e7399f01 Author: Paul E. McKenney Date: Thu Sep 10 11:54:42 2020 -0700 srcu: Take early exit on memory-allocation failure It turns out that init_srcu_struct() can be invoked from usermode tasks, and that fatal signals received by these tasks can cause memory-allocation failures. These failures are not handled well by init_srcu_struct(), so much so that NULL pointer dereferences can result. This commit therefore causes init_srcu_struct() to take an early exit upon detection of memory-allocation failure. Link: https://lore.kernel.org/lkml/20200908144306.33355-1-aik@ozlabs.ru/ Reported-by: Alexey Kardashevskiy Tested-by: Alexey Kardashevskiy Signed-off-by: Paul E. McKenney commit 56292e8609e39537297a7468dda4d87b9bd81d6a Author: Uladzislau Rezki (Sony) Date: Thu Oct 29 17:50:04 2020 +0100 rcu/tree: Defer kvfree_rcu() allocation to a clean context The current memmory-allocation interface causes the following difficulties for kvfree_rcu(): a) If built with CONFIG_PROVE_RAW_LOCK_NESTING, the lockdep will complain about violation of the nesting rules, as in "BUG: Invalid wait context". This Kconfig option checks for proper raw_spinlock vs. spinlock nesting, in particular, it is not legal to acquire a spinlock_t while holding a raw_spinlock_t. This is a problem because kfree_rcu() uses raw_spinlock_t whereas the "page allocator" internally deals with spinlock_t to access to its zones. The code also can be broken from higher level of view: raw_spin_lock(&some_lock); kfree_rcu(some_pointer, some_field_offset); b) If built with CONFIG_PREEMPT_RT, spinlock_t is converted into sleeplock. This means that invoking the page allocator from atomic contexts results in "BUG: scheduling while atomic". c) Please note that call_rcu() is already invoked from raw atomic context, so it is only reasonable to expaect that kfree_rcu() and kvfree_rcu() will also be called from atomic raw context. This commit therefore defers page allocation to a clean context using the combination of an hrtimer and a workqueue. The hrtimer stage is required in order to avoid deadlocks with the scheduler. This deferred allocation is required only when kvfree_rcu()'s per-CPU page cache is empty. Link: https://lore.kernel.org/lkml/20200630164543.4mdcf6zb4zfclhln@linutronix.de/ Fixes: 3042f83f19be ("rcu: Support reclaim for head-less object") Reported-by: Sebastian Andrzej Siewior Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney commit bfb3aa735f82c8d98b32a669934ee7d6b346264d Author: Paul E. McKenney Date: Fri Oct 30 13:11:24 2020 -0700 rcu: Do not report strict GPs for outgoing CPUs An outgoing CPU is marked offline in a stop-machine handler and most of that CPU's services stop at that point, including IRQ work queues. However, that CPU must take another pass through the scheduler and through a number of CPU-hotplug notifiers, many of which contain RCU readers. In the past, these readers were not a problem because the outgoing CPU has interrupts disabled, so that rcu_read_unlock_special() would not be invoked, and thus RCU would never attempt to queue IRQ work on the outgoing CPU. This changed with the advent of the CONFIG_RCU_STRICT_GRACE_PERIOD Kconfig option, in which rcu_read_unlock_special() is invoked upon exit from almost all RCU read-side critical sections. Worse yet, because interrupts are disabled, rcu_read_unlock_special() cannot immediately report a quiescent state and will therefore attempt to defer this reporting, for example, by queueing IRQ work. Which fails with a splat because the CPU is already marked as being offline. But it turns out that there is no need to report this quiescent state because rcu_report_dead() will do this job shortly after the outgoing CPU makes its final dive into the idle loop. This commit therefore makes rcu_read_unlock_special() refrain from queuing IRQ work onto outgoing CPUs. Fixes: 44bad5b3cca2 ("rcu: Do full report for .need_qs for strict GPs") Signed-off-by: Paul E. McKenney Cc: Jann Horn commit 354c3f0e22dcb17c10d0b79f6e1c5ba286eec0b0 Author: Zhouyi Zhou Date: Thu Oct 15 03:53:03 2020 +0000 rcu: Fix a typo in rcu_blocking_is_gp() header comment This commit fixes a typo in the rcu_blocking_is_gp() function's header comment. Signed-off-by: Zhouyi Zhou Signed-off-by: Paul E. McKenney commit 4d60b475f858ebdb06c1339f01a890f287b5e587 Author: Paul E. McKenney Date: Tue Oct 13 12:39:23 2020 -0700 rcu: Prevent lockdep-RCU splats on lock acquisition/release The rcu_cpu_starting() and rcu_report_dead() functions transition the current CPU between online and offline state from an RCU perspective. Unfortunately, this means that the rcu_cpu_starting() function's lock acquisition and the rcu_report_dead() function's lock releases happen while the CPU is offline from an RCU perspective, which can result in lockdep-RCU splats about using RCU from an offline CPU. And this situation can also result in too-short grace periods, especially in guest OSes that are subject to vCPU preemption. This commit therefore uses sequence-count-like synchronization to forgive use of RCU while RCU thinks a CPU is offline across the full extent of the rcu_cpu_starting() and rcu_report_dead() function's lock acquisitions and releases. One approach would have been to use the actual sequence-count primitives provided by the Linux kernel. Unfortunately, the resulting code looks completely broken and wrong, and is likely to result in patches that break RCU in an attempt to address this appearance of broken wrongness. Plus there is no net savings in lines of code, given the additional explicit memory barriers required. Therefore, this sequence count is instead implemented by a new ->ofl_seq field in the rcu_node structure. If this counter's value is an odd number, RCU forgives RCU read-side critical sections on other CPUs covered by the same rcu_node structure, even if those CPUs are offline from an RCU perspective. In addition, if a given leaf rcu_node structure's ->ofl_seq counter value is an odd number, rcu_gp_init() delays starting the grace period until that counter value changes. [ paulmck: Apply Peter Zijlstra feedback. ] Signed-off-by: Paul E. McKenney commit bd56e0a4a291bc9db2cbaddef20ec61a1aad4208 Author: Joel Fernandes (Google) Date: Wed Oct 7 13:50:36 2020 -0700 rcu/tree: nocb: Avoid raising softirq for offloaded ready-to-execute CBs Testing showed that rcu_pending() can return 1 when offloaded callbacks are ready to execute. This invokes RCU core processing, for example, by raising RCU_SOFTIRQ, eventually resulting in a call to rcu_core(). However, rcu_core() explicitly avoids in any way manipulating offloaded callbacks, which are instead handled by the rcuog and rcuoc kthreads, which work independently of rcu_core(). One exception to this independence is that rcu_core() invokes do_nocb_deferred_wakeup(), however, rcu_pending() also checks rcu_nocb_need_deferred_wakeup() in order to correctly handle this case, invoking rcu_core() when needed. This commit therefore avoids needlessly invoking RCU core processing by checking rcu_segcblist_ready_cbs() only on non-offloaded CPUs. This reduces overhead, for example, by reducing softirq activity. This change passed 30 minute tests of TREE01 through TREE09 each. On TREE08, there is at most 150us from the time that rcu_pending() chose not to invoke RCU core processing to the time when the ready callbacks were invoked by the rcuoc kthread. This provides further evidence that there is no need to invoke rcu_core() for offloaded callbacks that are ready to invoke. Cc: Neeraj Upadhyay Reviewed-by: Frederic Weisbecker Reviewed-by: Neeraj Upadhyay Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit d2098b4440981705e844c50254540ba7b5f82795 Author: Peter Zijlstra Date: Tue Sep 29 13:33:40 2020 +0200 rcu,ftrace: Fix ftrace recursion Kim reported that perf-ftrace made his box unhappy. It turns out that commit: ff5c4f5cad33 ("rcu/tree: Mark the idle relevant functions noinstr") removed one too many notrace qualifiers, probably due to there not being a helpful comment. This commit therefore reinstates the notrace and adds a comment to avoid losing it again. [ paulmck: Apply Steven Rostedt's feedback on the comment. ] Fixes: ff5c4f5cad33 ("rcu/tree: Mark the idle relevant functions noinstr") Reported-by: Kim Phillips Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Paul E. McKenney commit 7c47ee5aa00817d8b10f415b4a92d5fb3ac35273 Author: Joe Perches Date: Sat Oct 3 17:18:08 2020 -0700 rcu/tree: Make struct kernel_param_ops definitions const These should be const, so make it so. Signed-off-by: Joe Perches Signed-off-by: Paul E. McKenney commit 9f866dac94292f93d3b6bf8dbe860a44b954e555 Author: Joel Fernandes (Google) Date: Tue Sep 29 15:29:27 2020 -0400 rcu/tree: Add a warning if CPU being onlined did not report QS already Currently, rcu_cpu_starting() checks to see if the RCU core expects a quiescent state from the incoming CPU. However, the current interaction between RCU quiescent-state reporting and CPU-hotplug operations should mean that the incoming CPU never needs to report a quiescent state. First, the outgoing CPU reports a quiescent state if needed. Second, the race where the CPU is leaving just as RCU is initializing a new grace period is handled by an explicit check for this condition. Third, the CPU's leaf rcu_node structure's ->lock serializes these checks. This means that if rcu_cpu_starting() ever feels the need to report a quiescent state, then there is a bug somewhere in the CPU hotplug code or the RCU grace-period handling code. This commit therefore adds a WARN_ON_ONCE() to bring that bug to everyone's attention. Cc: Neeraj Upadhyay Suggested-by: Paul E. McKenney Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit a3941517fcd6625adc540aef5ec3f717c8fa71e8 Author: Neeraj Upadhyay Date: Thu Sep 24 12:04:10 2020 +0530 rcu: Clarify nocb kthreads naming in RCU_NOCB_CPU config This commit clarifies that the "p" and the "s" in the in the RCU_NOCB_CPU config-option description refer to the "x" in the "rcuox/N" kthread name. Signed-off-by: Neeraj Upadhyay [ paulmck: While in the area, update description and advice. ] Signed-off-by: Paul E. McKenney commit ed73860cecc3ec12aa50a6dcfb4900e5b4ae9507 Author: Neeraj Upadhyay Date: Wed Sep 23 12:59:33 2020 +0530 rcu: Fix single-CPU check in rcu_blocking_is_gp() Currently, for CONFIG_PREEMPTION=n kernels, rcu_blocking_is_gp() uses num_online_cpus() to determine whether there is only one CPU online. When there is only a single CPU online, the simple fact that synchronize_rcu() could be legally called implies that a full grace period has elapsed. Therefore, in the single-CPU case, synchronize_rcu() simply returns immediately. Unfortunately, num_online_cpus() is unreliable while a CPU-hotplug operation is transitioning to or from single-CPU operation because: 1. num_online_cpus() uses atomic_read(&__num_online_cpus) to locklessly sample the number of online CPUs. The hotplug locks are not held, which means that an incoming CPU can concurrently update this count. This in turn means that an RCU read-side critical section on the incoming CPU might observe updates prior to the grace period, but also that this critical section might extend beyond the end of the optimized synchronize_rcu(). This breaks RCU's fundamental guarantee. 2. In addition, num_online_cpus() does no ordering, thus providing another way that RCU's fundamental guarantee can be broken by the current code. 3. The most probable failure mode happens on outgoing CPUs. The outgoing CPU updates the count of online CPUs in the CPUHP_TEARDOWN_CPU stop-machine handler, which is fine in and of itself due to preemption being disabled at the call to num_online_cpus(). Unfortunately, after that stop-machine handler returns, the CPU takes one last trip through the scheduler (which has RCU readers) and, after the resulting context switch, one final dive into the idle loop. During this time, RCU needs to keep track of two CPUs, but num_online_cpus() will say that there is only one, which in turn means that the surviving CPU will incorrectly ignore the outgoing CPU's RCU read-side critical sections. This problem is illustrated by the following litmus test in which P0() corresponds to synchronize_rcu() and P1() corresponds to the incoming CPU. The herd7 tool confirms that the "exists" clause can be satisfied, thus demonstrating that this breakage can happen according to the Linux kernel memory model. { int x = 0; atomic_t numonline = ATOMIC_INIT(1); } P0(int *x, atomic_t *numonline) { int r0; WRITE_ONCE(*x, 1); r0 = atomic_read(numonline); if (r0 == 1) { smp_mb(); } else { synchronize_rcu(); } WRITE_ONCE(*x, 2); } P1(int *x, atomic_t *numonline) { int r0; int r1; atomic_inc(numonline); smp_mb(); rcu_read_lock(); r0 = READ_ONCE(*x); smp_rmb(); r1 = READ_ONCE(*x); rcu_read_unlock(); } locations [x;numonline;] exists (1:r0=0 /\ 1:r1=2) It is important to note that these problems arise only when the system is transitioning to or from single-CPU operation. One solution would be to hold the CPU-hotplug locks while sampling num_online_cpus(), which was in fact the intent of the (redundant) preempt_disable() and preempt_enable() surrounding this call to num_online_cpus(). Actually blocking CPU hotplug would not only result in excessive overhead, but would also unnecessarily impede CPU-hotplug operations. This commit therefore follows long-standing RCU tradition by maintaining a separate RCU-specific set of CPU-hotplug books. This separate set of books is implemented by a new ->n_online_cpus field in the rcu_state structure that maintains RCU's count of the online CPUs. This count is incremented early in the CPU-online process, so that the critical transition away from single-CPU operation will occur when there is only a single CPU. Similarly for the critical transition to single-CPU operation, the counter is decremented late in the CPU-offline process, again while there is only a single CPU. Because there is only ever a single CPU when the ->n_online_cpus field undergoes the critical 1->2 and 2->1 transitions, full memory ordering and mutual exclusion is provided implicitly and, better yet, for free. In the case where the CPU is coming online, nothing will happen until the current CPU helps it come online. Therefore, the new CPU will see all accesses prior to the optimized grace period, which means that RCU does not need to further delay this new CPU. In the case where the CPU is going offline, the outgoing CPU is totally out of the picture before the optimized grace period starts, which means that this outgoing CPU cannot see any of the accesses following that grace period. Again, RCU needs no further interaction with the outgoing CPU. This does mean that synchronize_rcu() will unnecessarily do a few grace periods the hard way just before the second CPU comes online and just after the second-to-last CPU goes offline, but it is not worth optimizing this uncommon case. Reviewed-by: Joel Fernandes (Google) Signed-off-by: Neeraj Upadhyay Signed-off-by: Paul E. McKenney commit e3771c850d3b9349b48449c9a91c98944a08650c Author: Frederic Weisbecker Date: Mon Sep 21 14:43:40 2020 +0200 rcu: Implement rcu_segcblist_is_offloaded() config dependent This commit simplifies the use of the rcu_segcblist_is_offloaded() API so that its callers no longer need to check the RCU_NOCB_CPU Kconfig option. Note that rcu_segcblist_is_offloaded() is defined in the header file, which means that the generated code should be just as efficient as before. Suggested-by: Paul E. McKenney Signed-off-by: Frederic Weisbecker Cc: Paul E. McKenney Cc: Josh Triplett Cc: Steven Rostedt Cc: Mathieu Desnoyers Cc: Lai Jiangshan Cc: Joel Fernandes Signed-off-by: Paul E. McKenney commit 1eafe075bf9cb4db575be4ddf1b1c8256758714a Author: Asif Rasheed Date: Sun Sep 20 17:31:54 2020 +0400 list.h: Update comment to explicitly note circular lists The students in the Operating System Lecture Section at the American University of Sharjah were confused by the header comment in include/linux/list.h, which says "Simple doubly linked list implementation". This comment means "simple" as in "not complex", but "simple" is often used in this context to mean "not circular". This commit therefore avoids this ambiguity by explicitly calling out "circular". Signed-off-by: Asif Rasheed Signed-off-by: Paul E. McKenney commit dfe564045c653d9e6969ccca57a8a04771d333f7 Author: chao Date: Sun Aug 30 23:41:17 2020 -0700 rcu: Panic after fixed number of stalls Some stalls are transient, so that system fully recovers. This commit therefore allows users to configure the number of stalls that must happen in order to trigger kernel panic. Signed-off-by: chao Signed-off-by: Paul E. McKenney commit 29368e09392123800e5e2bf0f3eda91f16972e52 Author: Paul E. McKenney Date: Tue Oct 20 21:13:55 2020 -0700 x86/smpboot: Move rcu_cpu_starting() earlier The call to rcu_cpu_starting() in mtrr_ap_init() is not early enough in the CPU-hotplug onlining process, which results in lockdep splats as follows: ============================= WARNING: suspicious RCU usage 5.9.0+ #268 Not tainted ----------------------------- kernel/kprobes.c:300 RCU-list traversed in non-reader section!! other info that might help us debug this: RCU used illegally from offline CPU! rcu_scheduler_active = 1, debug_locks = 1 no locks held by swapper/1/0. stack backtrace: CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.9.0+ #268 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.10.2-1ubuntu1 04/01/2014 Call Trace: dump_stack+0x77/0x97 __is_insn_slot_addr+0x15d/0x170 kernel_text_address+0xba/0xe0 ? get_stack_info+0x22/0xa0 __kernel_text_address+0x9/0x30 show_trace_log_lvl+0x17d/0x380 ? dump_stack+0x77/0x97 dump_stack+0x77/0x97 __lock_acquire+0xdf7/0x1bf0 lock_acquire+0x258/0x3d0 ? vprintk_emit+0x6d/0x2c0 _raw_spin_lock+0x27/0x40 ? vprintk_emit+0x6d/0x2c0 vprintk_emit+0x6d/0x2c0 printk+0x4d/0x69 start_secondary+0x1c/0x100 secondary_startup_64_no_verify+0xb8/0xbb This is avoided by moving the call to rcu_cpu_starting up near the beginning of the start_secondary() function. Note that the raw_smp_processor_id() is required in order to avoid calling into lockdep before RCU has declared the CPU to be watched for readers. Link: https://lore.kernel.org/lkml/160223032121.7002.1269740091547117869.tip-bot2@tip-bot2/ Reported-by: Qian Cai Suggested-by: Peter Zijlstra Signed-off-by: Paul E. McKenney commit 6dbce04d8417ae706596366e16841d77c454ba52 Author: Peter Zijlstra Date: Mon Nov 16 13:10:12 2020 +0100 rcu: Allow rcu_irq_enter_check_tick() from NMI Eugenio managed to tickle #PF from NMI context which resulted in hitting a WARN in RCU through irqentry_enter() -> __rcu_irq_enter_check_tick(). However, this situation is perfectly sane and does not warrant an WARN. The #PF will (necessarily) be atomic and not require messing with the tick state, so early return is correct. This commit therefore removes the WARN. Fixes: aaf2bc50df1f ("rcu: Abstract out rcu_irq_enter_check_tick() from rcu_nmi_enter()") Reported-by: "Eugenio Pérez" Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Andy Lutomirski Signed-off-by: Paul E. McKenney commit 1606173c53340fe165b2bffb51d16e713a1c0921 Author: Souradeep Chowdhury Date: Wed Sep 30 13:44:12 2020 +0530 dt-bindings: msm: Add LLCC for SM8150 Add LLCC compatible for SM8150 SoC. Acked-by: Rob Herring Signed-off-by: Souradeep Chowdhury Link: https://lore.kernel.org/r/141e7cf03932859243edec83451c04c655ba640b.1601452132.git.schowdhu@codeaurora.org Signed-off-by: Bjorn Andersson commit 6998ff4e21619d47ebf4f5eb4cafa65c65856221 Author: James Smart Date: Thu Nov 19 12:34:07 2020 -0800 scsi: lpfc: Fix variable 'vport' set but not used in lpfc_sli4_abts_err_handler() Remove vport variable that is assigned but not used in lpfc_sli4_abts_err_handler(). Link: https://lore.kernel.org/r/20201119203407.121913-1-james.smart@broadcom.com Fixes: e7dab164a9aa ("scsi: lpfc: Fix scheduling call while in softirq context in lpfc_unreg_rpi") Reported-by: kernel test robot Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 185d17e11e7f98e0d1f499d702d9792a4ed5ae47 Author: James Smart Date: Thu Nov 19 12:33:16 2020 -0800 scsi: lpfc: Fix missing prototype for lpfc_nvmet_prep_abort_wqe() lpfc_nvmet_prep_abort_wqe() needs to be declared static. Link: https://lore.kernel.org/r/20201119203316.121725-1-james.smart@broadcom.com Fixes: db7531d2b377 ("scsi: lpfc: Convert abort handling to SLI-3 and SLI-4 handlers") Reported-by: kernel test robot Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 09b15e35071d35947b6e6da5b1a1d0cab73c12a6 Author: James Smart Date: Thu Nov 19 12:33:53 2020 -0800 scsi: lpfc: Fix set but unused variables in lpfc_dev_loss_tmo_handler() Remove set but not used variable shost in lpfc_dev_loss_tmo_handler(). Link: https://lore.kernel.org/r/20201119203353.121866-1-james.smart@broadcom.com Fixes: 52edb2caf675 ("scsi: lpfc: Remove ndlp when a PLOGI/ADISC/PRLI/REG_RPI ultimately fails") Reported-by: kernel test robot Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 4a119d8a4c6058d445db89c22db87ef8316c4286 Author: James Smart Date: Thu Nov 19 12:33:40 2020 -0800 scsi: lpfc: Fix set but not used warnings from Rework remote port lock handling Remove local variables that are set but not used. Link: https://lore.kernel.org/r/20201119203340.121819-1-james.smart@broadcom.com Fixes: c6adba150191 ("scsi: lpfc: Rework remote port lock handling") Reported-by: kernel test robot Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 809032ddf9c6c779a9eb0f0c55c21a1e8913557f Author: James Smart Date: Thu Nov 19 12:33:28 2020 -0800 scsi: lpfc: Fix missing prototype warning for lpfc_fdmi_vendor_attr_mi() Function needs to be declared as static. Link: https://lore.kernel.org/r/20201119203328.121772-1-james.smart@broadcom.com Fixes: 8aaa7bcf07a2 ("scsi: lpfc: Add FDMI Vendor MIB support") Reported-by: kernel test robot Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 58e5183ac869b98f3b17aa91fea11df3b718b3f2 Author: Lee Jones Date: Thu Nov 19 19:15:44 2020 -0800 Input: synaptics - demote non-conformant kernel-doc header Fixes the following W=1 kernel build warning(s): drivers/input/mouse/synaptics.c:1781: warning: Function parameter or member 'psmouse' not described in 'synaptics_setup_intertouch' drivers/input/mouse/synaptics.c:1781: warning: Function parameter or member 'info' not described in 'synaptics_setup_intertouch' drivers/input/mouse/synaptics.c:1781: warning: Function parameter or member 'leave_breadcrumbs' not described in 'synaptics_setup_intertouch' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201112110204.2083435-13-lee.jones@linaro.org Signed-off-by: Dmitry Torokhov commit b324009d21ae50fafe628b665d9758403dbbf670 Author: Lee Jones Date: Thu Nov 19 19:14:04 2020 -0800 Input: wm97xx-ts - provide missing description for 'status' Fixes the following W=1 kernel build warning(s): drivers/input/touchscreen/wm97xx-core.c:204: warning: Function parameter or member 'status' not described in 'wm97xx_set_gpio' Signed-off-by: Lee Jones Acked-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20201112110204.2083435-12-lee.jones@linaro.org Signed-off-by: Dmitry Torokhov commit aea1f3ffb110afbe17f53c2f13d2cad2402a9fee Author: Lee Jones Date: Thu Nov 19 19:13:46 2020 -0800 Input: surface3_spi - fix naming issue with 'surface3_spi_get_gpio_config's header Fixes the following W=1 kernel build warning(s): drivers/input/touchscreen/surface3_spi.c: In function ‘surface3_spi_process_touch’: drivers/input/touchscreen/surface3_spi.c:97:6: warning: variable ‘timestamp’ set but not used [-Wunused-but-set-variable] drivers/input/touchscreen/surface3_spi.c:225: warning: Function parameter or member 'data' not described in 'surface3_spi_get_gpio_config' drivers/input/touchscreen/surface3_spi.c:225: warning: Excess function parameter 'ts' description in 'surface3_spi_get_gpio_config' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201112110204.2083435-11-lee.jones@linaro.org Signed-off-by: Dmitry Torokhov commit ced8c61fa8c79b02d29a351a7e87ce3b413f04e4 Author: Lee Jones Date: Thu Nov 19 19:13:20 2020 -0800 Input: wm831x-on - source file headers are not good candidates for kernel-doc Fixes the following W=1 kernel build warning(s): drivers/input/misc/wm831x-on.c:30: warning: cannot understand function prototype: 'struct wm831x_on ' Signed-off-by: Lee Jones Acked-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20201112110204.2083435-10-lee.jones@linaro.org Signed-off-by: Dmitry Torokhov commit cb69046526cc1d1582b7bf3ab6169cf1961cc1b1 Author: Lee Jones Date: Thu Nov 19 19:12:42 2020 -0800 Input: goodix - provide some missing function parameter descriptions Fixes the following W=1 kernel build warning(s): drivers/input/touchscreen/goodix.c:569: warning: Function parameter or member 'len' not described in 'goodix_check_cfg' drivers/input/touchscreen/goodix.c:587: warning: Function parameter or member 'len' not described in 'goodix_send_cfg' drivers/input/touchscreen/goodix.c:1165: warning: Function parameter or member 'cfg' not described in 'goodix_config_cb' drivers/input/touchscreen/goodix.c:1165: warning: Function parameter or member 'ctx' not described in 'goodix_config_cb' drivers/input/touchscreen/goodix.c:1165: warning: Excess function parameter 'ts' description in 'goodix_config_cb' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201112110204.2083435-5-lee.jones@linaro.org Signed-off-by: Dmitry Torokhov commit 7d52613d1c93bfe0116b9147b0232604592e4716 Author: Lee Jones Date: Thu Nov 19 19:12:16 2020 -0800 Input: mc13783-pwrbutton - file headers are not good candidates for kernel-doc Fixes the following W=1 kernel build warning(s): drivers/input/misc/mc13783-pwrbutton.c:32: warning: cannot understand function prototype: 'struct mc13783_pwrb ' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201112110204.2083435-4-lee.jones@linaro.org Signed-off-by: Dmitry Torokhov commit 35b076b99546941c0f7841ec7c80225e7e4817a7 Author: Lee Jones Date: Thu Nov 19 19:11:55 2020 -0800 Input: xpad - demote non-conformant kernel-doc header Fixes the following W=1 kernel build warning(s): drivers/input/joystick/xpad.c:1361: warning: Function parameter or member 'xpad' not described in 'xpad_send_led_command' drivers/input/joystick/xpad.c:1361: warning: Function parameter or member 'command' not described in 'xpad_send_led_command' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201112110204.2083435-2-lee.jones@linaro.org Signed-off-by: Dmitry Torokhov commit 478a57072a4c4fafd83e10c329c9c8ad5c0ff97b Author: Dmitry Torokhov Date: Thu Nov 19 10:11:22 2020 -0800 Input: adp5589-keys - use BIT() Let's use BIT() macro instead of explicitly shifting '1'. Acked-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201119072440.GA116840@dtor-ws Signed-off-by: Dmitry Torokhov commit a26506788320d8dda4e3520dd1b020f20cc7a2fd Author: Dmitry Torokhov Date: Thu Nov 19 10:10:58 2020 -0800 Input: adp5589-keys - mark suspend and resume methods as __maybe_unused This improves compile coverage of the code; unused code will be dropped by the linker. Acked-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201119072418.GA114677@dtor-ws Signed-off-by: Dmitry Torokhov commit 14c1dd9504112ffe86688ff0cd64149e16d36772 Author: Colin Ian King Date: Wed Nov 18 14:13:14 2020 +0000 scsi: lpfc: Fix memory leak on lcb_context Currently there is an error return path that neglects to free the allocation for lcb_context. Fix this by adding a new error free exit path that kfree's lcb_context before returning. Use this new kfree exit path in another exit error path that also kfree's the same object, allowing a line of code to be removed. Link: https://lore.kernel.org/r/20201118141314.462471-1-colin.king@canonical.com Fixes: 4430f7fd09ec ("scsi: lpfc: Rework locations of ndlp reference taking") Reviewed-by: James Smart Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen Addresses-Coverity: ("Resource leak") commit 61795a5316ad8786fb4bb896198733188a60eab8 Author: Colin Ian King Date: Wed Nov 18 13:37:44 2020 +0000 scsi: lpfc: Remove dead code on second !ndlp check Currently there is a null check on the pointer ndlp that exits via error path issue_ct_rsp_exit followed by another null check on the same pointer that is almost identical to the previous null check stanza and yet can never can be reached because the previous check exited via issue_ct_rsp_exit. This is deadcode and can be removed. Link: https://lore.kernel.org/r/20201118133744.461385-1-colin.king@canonical.com Reviewed-by: James Smart Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen Addresses-Coverity: ("Logically dead code") commit 1e7dddb2e76a593627643c42f9bf57e5c0078f06 Author: Colin Ian King Date: Wed Nov 18 13:13:45 2020 +0000 scsi: lpfc: Fix pointer defereference before it is null checked issue There is a null check on pointer lpfc_cmd after the pointer has been dereferenced when pointers rdata and ndlp are initialized at the start of the function. Fix this by only assigning rdata and ndlp after the pointer lpfc_cmd has been null checked. Link: https://lore.kernel.org/r/20201118131345.460631-1-colin.king@canonical.com Fixes: 96e209be6ecb ("scsi: lpfc: Convert SCSI I/O completions to SLI-3 and SLI-4 handlers") Reviewed-by: James Smart Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen Addresses-Coverity: ("Dereference before null check") commit e4af87b7079ebf1bba86c7011ef5d5df45af8f56 Author: Tyrel Datwyler Date: Tue Nov 17 19:11:04 2020 -0600 scsi: ibmvfc: Advertise client support for targetWWPN using v2 commands The previous patch added support for the targetWWPN field in version 2 MADs and vfcFrame structures. Set the IBMVFC_CAN_SEND_VF_WWPN bit in our capabailites flag during NPIV Login to inform the VIOS that this client supports the feature. Link: https://lore.kernel.org/r/20201118011104.296999-7-tyreld@linux.ibm.com Acked-by: Brian King Signed-off-by: Tyrel Datwyler Signed-off-by: Martin K. Petersen commit ebc7c74bd2dcdb5b9b1aa54036a0f4e9c90ce0d4 Author: Tyrel Datwyler Date: Tue Nov 17 19:11:03 2020 -0600 scsi: ibmvfc: Add support for target_wwpn field in v2 MADs and vfcFrame Several version 2 MADs and the version 2 vfcFrame structures introduced a new targetWWPN field for better identification of a target over the scsi_id. Set this field and MAD versioning fields when the VIOS advertises the IBMVFC_HANDLE_VF_WWPN capability. Link: https://lore.kernel.org/r/20201118011104.296999-6-tyreld@linux.ibm.com Acked-by: Brian King Signed-off-by: Tyrel Datwyler Signed-off-by: Martin K. Petersen commit 5a9d16f71c264addd7ed6fffd8f27839b0ad8433 Author: Tyrel Datwyler Date: Tue Nov 17 19:11:02 2020 -0600 scsi: ibmvfc: Add FC payload retrieval routines for versioned vfcFrames The FC iu and response payloads are located at different offsets depending on the ibmvfc_cmd version. This is a result of the version 2 vfcFrame definition adding an extra 64bytes of reserved space to the structure prior to the payloads. Add helper routines to determine the current vfcFrame version and return a pointer to the proper iu or response structure within that ibmvfc_cmd. Link: https://lore.kernel.org/r/20201118011104.296999-5-tyreld@linux.ibm.com Acked-by: Brian King Signed-off-by: Tyrel Datwyler Signed-off-by: Martin K. Petersen commit a318c2b71ccee720134e9a43b9b1afbea50f0578 Author: Tyrel Datwyler Date: Tue Nov 17 19:11:01 2020 -0600 scsi: ibmvfc: Add helper for testing capability flags Testing the NPIV Login response capabilities is a long winded process of dereferencing the vhost->login_buf->resp.capabilities field, then byte swapping that value to host endian, and performing the bitwise test. Currently we only ever check this in ibmvfc_cancel_all(), but follow-up patches will need to regularly check for targetWWPN and channelization support. Add a helper to simplify checking various VIOS capabilities, namely ibmvfc_check_caps(). Link: https://lore.kernel.org/r/20201118011104.296999-4-tyreld@linux.ibm.com Acked-by: Brian King Signed-off-by: Tyrel Datwyler Signed-off-by: Martin K. Petersen commit c16b8a6d8af15364e562ed4d61b05fb826151712 Author: Tyrel Datwyler Date: Tue Nov 17 19:11:00 2020 -0600 scsi: ibmvfc: Add new fields for version 2 of several MADs Introduce a target_wwpn field to several MADs. Its possible that a SCSI ID of a target can change due to some fabric changes. The WWPN of the SCSI target provides a better way to identify the target. Also, add flags for receiving MAD versioning information and advertising client support for targetWWPN with the VIOS. This latter capability flag will be required for future clients capable of requesting multiple hardware queues from the host adapter. Link: https://lore.kernel.org/r/20201118011104.296999-3-tyreld@linux.ibm.com Acked-by: Brian King Signed-off-by: Tyrel Datwyler Signed-off-by: Martin K. Petersen commit fad74a1be2dbeae02d71e072418eeb307ce46103 Author: Tyrel Datwyler Date: Tue Nov 17 19:10:59 2020 -0600 scsi: ibmvfc: Deduplicate common ibmvfc_cmd init code The virtual FC frame command exchanged with the VIOS is used for device reset and command abort TMF as well as normally queued commands. When initializing the ibmvfc_cmd there are several elements of the command that are set the same way regardless of the command type. Deduplicate code by moving these commonally set fields into a initialization helper routine, namely ibmvfc_init_vfc_cmd(). Link: https://lore.kernel.org/r/20201118011104.296999-2-tyreld@linux.ibm.com Acked-by: Brian King Signed-off-by: Tyrel Datwyler Signed-off-by: Martin K. Petersen commit 56495a2442a47d0ea752db62434913b3346fe5a5 Merge: 657bc1d10bfc2 4d02da974ea85 Author: Jakub Kicinski Date: Thu Nov 19 19:08:46 2020 -0800 Merge https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Signed-off-by: Jakub Kicinski commit 2aa0102c6688306548d81a958a6293936904ca75 Author: Tyrel Datwyler Date: Tue Nov 17 12:50:31 2020 -0600 scsi: ibmvfc: Use correlation token to tag commands The vfcFrame correlation field is a 64bit handle that is intended to trace I/O operations through both the client stack and VIOS stack when the underlying physical FC adapter supports tagging. Tag vfcFrames with the associated ibmvfc_event pointer handle. Link: https://lore.kernel.org/r/20201117185031.129939-3-tyreld@linux.ibm.com Signed-off-by: Tyrel Datwyler Signed-off-by: Martin K. Petersen commit 4e0716199ab656815c14de41740b658bb918e85e Author: Tyrel Datwyler Date: Tue Nov 17 12:50:30 2020 -0600 scsi: ibmvfc: Remove trailing semicolon Remove a superfluous semicolon following a closing function block bracket. Link: https://lore.kernel.org/r/20201117185031.129939-2-tyreld@linux.ibm.com Signed-off-by: Tyrel Datwyler Signed-off-by: Martin K. Petersen commit 61bdb4eec8d1efc0dc3259d8392e43e20a01deae Author: Tyrel Datwyler Date: Tue Nov 17 12:50:29 2020 -0600 scsi: ibmvfc: Byte swap login_buf.resp values in attribute show functions Both ibmvfc_show_host_(capabilities|npiv_version) functions retrieve values from vhost->login_buf.resp buffer. This is the MAD response buffer from the VIOS and as such any multi-byte non-string values are in big endian format. Byte swap these values to host CPU endian format for better human readability. Link: https://lore.kernel.org/r/20201117185031.129939-1-tyreld@linux.ibm.com Signed-off-by: Tyrel Datwyler Signed-off-by: Martin K. Petersen commit 3754cde8df9106bda396b2956ea6f9758e26b25e Author: Leo Liou Date: Tue Nov 17 08:58:39 2020 -0800 scsi: ufs: Show LBA and length for UNMAP commands We have LBA and length for unmap commands. Link: https://lore.kernel.org/r/20201117165839.1643377-8-jaegeuk@kernel.org Reviewed-by: Stanley Chu Reviewed-by: Can Guo Signed-off-by: Leo Liou Signed-off-by: Jaegeuk Kim Signed-off-by: Martin K. Petersen commit 8eb456be75af7e5a7ac0cd223eaa198cf7ee2ac1 Author: Jaegeuk Kim Date: Tue Nov 17 08:58:38 2020 -0800 scsi: ufs: Fix clkgating on/off The following call stack prevents clk_gating at every I/O completion. We can remove the condition, ufshcd_any_tag_in_use(), since clkgating_work will check it again. ufshcd_complete_requests(struct ufs_hba *hba) ufshcd_transfer_req_compl() __ufshcd_transfer_req_compl() __ufshcd_release(hba) if (ufshcd_any_tag_in_use() == 1) return; ufshcd_tmc_handler(hba); blk_mq_tagset_busy_iter(); Note that this still requires work to deal with a potential race condition when user sets clkgating.delay_ms to very small value. That can cause preventing clkgating by the check of ufshcd_any_tag_in_use() in gate_work. Link: https://lore.kernel.org/r/20201117165839.1643377-7-jaegeuk@kernel.org Fixes: 7252a3603015 ("scsi: ufs: Avoid busy-waiting by eliminating tag conflicts") Reviewed-by: Asutosh Das Reviewed-by: Can Guo Signed-off-by: Jaegeuk Kim Signed-off-by: Martin K. Petersen commit 69a314d6a155c5bfa9720b25d6456656f0b38bd1 Author: Jaegeuk Kim Date: Tue Nov 17 08:58:37 2020 -0800 scsi: ufs: Add more contexts in the ufs tracepoints This adds user-friendly tracepoints with group id. Link: https://lore.kernel.org/r/20201117165839.1643377-6-jaegeuk@kernel.org Reviewed-by: Can Guo Signed-off-by: Jaegeuk Kim Signed-off-by: Martin K. Petersen commit e93e6e49fa31989b149c48526d4098b278205c8a Author: Jaegeuk Kim Date: Tue Nov 17 08:58:36 2020 -0800 scsi: ufs: Use WQ_HIGHPRI for gating work Must have WQ_MEM_RECLAIM ``WQ_MEM_RECLAIM`` All workqueues which might be used in the memory reclaim paths **MUST** have this flag set. The wq is guaranteed to have at least one execution context regardless of memory pressure. Link: https://lore.kernel.org/r/20201117165839.1643377-5-jaegeuk@kernel.org Reviewed-by: Asutosh Das Signed-off-by: Jaegeuk Kim Signed-off-by: Martin K. Petersen commit 4f3e900b628226011a5f71c19e53b175c014eb58 Author: Jaegeuk Kim Date: Tue Nov 17 08:58:35 2020 -0800 scsi: ufs: Clear UAC for FFU and RPMB LUNs In order to conduct FFU or RPMB operations, UFS needs to clear UNIT ATTENTION condition. Clear it explicitly so that we get no failures during initialization. Link: https://lore.kernel.org/r/20201117165839.1643377-4-jaegeuk@kernel.org Signed-off-by: Jaegeuk Kim Signed-off-by: Martin K. Petersen commit b664511297644eac34038df877b3ad7bcaa81913 Author: Jaegeuk Kim Date: Tue Nov 17 08:58:34 2020 -0800 scsi: ufs: Atomic update for clkgating_enable While running a stress test which enables/disables clkgating, we occasionally hit device timeout. This patch avoids a subtle race condition to address it. Link: https://lore.kernel.org/r/20201117165839.1643377-3-jaegeuk@kernel.org Reviewed-by: Can Guo Signed-off-by: Jaegeuk Kim Signed-off-by: Martin K. Petersen commit fd62de114f8c9df098dcd43b5d83c5714176dd12 Author: Jaegeuk Kim Date: Tue Nov 17 08:58:33 2020 -0800 scsi: ufs: Avoid to call REQ_CLKS_OFF to CLKS_OFF Once UFS is gated with CLKS_OFF, it should not call REQ_CLKS_OFF again. This can lead to hibern8_enter failure. Link: https://lore.kernel.org/r/20201117165839.1643377-2-jaegeuk@kernel.org Reviewed-by: Can Guo Signed-off-by: Jaegeuk Kim Signed-off-by: Martin K. Petersen commit 9533fd8019fba6c59bb90313d2664a53160e007e Author: Manasi Navare Date: Thu Nov 19 15:26:15 2020 -0800 drm/i915: Do not call hsw_set_frame_start_delay for dsi This should fix the boot oops for dsi v2: * Fix indent (Manasi) v3: * Remove redundant condition (Matt Roper) Fixes: 4e3cdb4535e7 ("drm/i915/dp: Master/Slave enable/disable sequence for bigjoiner") Signed-off-by: Manasi Navare Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20201119232615.23231-1-manasi.d.navare@intel.com commit 479f58dda25bb46daeb937f124718e8b4aea6781 Author: Qiuxu Zhuo Date: Tue Nov 17 20:49:53 2020 +0800 EDAC/i10nm: Add Intel Sapphire Rapids server support The Sapphire Rapids CPU model shares the same memory controller architecture with Ice Lake server. There are some configurations different from Ice Lake server as below: - The device ID for configuration agent. - The size for per channel memory-mapped I/O. - The DDR5 memory support. So add the above configurations and the Sapphire Rapids CPU model ID for EDAC support. Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck commit bc1c99a5971aa7571e8b9731c28fa32abe12cab8 Author: Qiuxu Zhuo Date: Tue Nov 17 20:49:52 2020 +0800 EDAC: Add DDR5 new memory type Add a new entry to 'enum mem_type' and a new string to 'edac_mem_types[]' for DDR5 new memory type. Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck commit 83ff51c4e3fecf6b8587ce4d46f6eac59f5d7c5a Author: Qiuxu Zhuo Date: Tue Nov 17 20:49:51 2020 +0800 EDAC/i10nm: Use readl() to access MMIO registers Instead of raw access, use readl() to access MMIO registers of memory controller to avoid possible compiler re-ordering. Fixes: d4dc89d069aa ("EDAC, i10nm: Add a driver for Intel 10nm server processors") Cc: Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck commit 41545aabff1ef71f83efe56dd4fec91a7fe65027 Author: Tony Luck Date: Thu Nov 5 10:39:16 2020 -0800 MAINTAINERS: Add entry for Intel IGEN6 EDAC driver New driver for "client" system on chip CPUs. Signed-off-by: Tony Luck commit 2223d8c781a0c1a8cf26b1d8f13aff84557ecbfc Author: Qiuxu Zhuo Date: Thu Nov 5 15:49:34 2020 +0800 EDAC/igen6: Add debugfs interface for Intel client SoC EDAC driver Add debugfs support to fake memory correctable errors to test the error reporting path and the error address decoding logic in the igen6_edac driver. Please note that the fake errors are also reported to EDAC core and then the CE counter in EDAC sysfs is also increased. Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck commit 10590a9d4f23e0a519730d79d39331df60ad2079 Author: Qiuxu Zhuo Date: Thu Nov 5 15:49:14 2020 +0800 EDAC/igen6: Add EDAC driver for Intel client SoCs using IBECC This driver supports Intel client SoC with integrated memory controller using In-Band ECC(IBECC). The memory correctable and uncorrectable errors are reported via NMIs. The driver handles the NMIs and decodes the memory error address to platform specific address. The first IBECC-supported SoC is Elkhart Lake. [Tony: s/#include /#include / to fix randconfig build] Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck commit a0e169978303ee5873142599c8c9660b2d296243 Author: Thomas Gleixner Date: Thu Nov 19 20:45:03 2020 +0100 microblaze/mm/highmem: Add dropped #ifdef back The conversion to generic kmap atomic broke microblaze by removing the build fail. Add it back. Fixes: 7ac1b26b0a72 ("microblaze/mm/highmem: Switch to generic kmap atomic") Reported-by: Randy Dunlap Signed-off-by: Thomas Gleixner Cc: Michal Simek commit afd4cf78a189fa3376fe0f6ceddb91be17a2ba68 Author: Chris Wilson Date: Thu Nov 19 09:07:17 2020 +0000 drm/i915/display: Whitespace cleanups drivers/gpu/drm/i915/display/intel_display.c:3634 intel_find_initial_plane_obj() warn: inconsistent indenting drivers/gpu/drm/i915/display/intel_display.c:15367 kill_bigjoiner_slave() warn: inconsistent indenting Signed-off-by: Chris Wilson Reviewed-by: Manasi Navare Signed-off-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20201119090717.30687-1-chris@chris-wilson.co.uk commit d512ef22d77b0779e9b0e9a91a63b291357079f9 Author: Pierre-Louis Bossart Date: Thu Nov 12 16:38:24 2020 -0600 ASoC: SOF: Intel: allow for coexistence between SOF and catpt drivers Now that we have all the support needed for coexistence between ACPI drivers for Broadwell, remove mutual exclusion in the Kconfig file. The selection is done by playing with the snd_intel_dspcfg module 'dsp_driver' parameter. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20201112223825.39765-14-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 0e5cc22162e55c19255f4e25dadf9fda76eac11c Author: Pierre-Louis Bossart Date: Thu Nov 12 16:38:25 2020 -0600 ALSA: hda: intel-dsp-config: ignore dsp_driver parameter for PCI legacy devices On Haswell/Broadwell/Baytrail/Braswell, the DSP is not used for the HDMI/DP interface, and setting the dsp_driver parameter to a value > 1 has the side effect of preventing the HDaudio legacy driver from probing. The DSP driver selection should really only handle cases where a DSP is actually used. This patch traps all known PCI devices and makes sure the HDaudio driver can always be probed. Signed-off-by: Pierre-Louis Bossart Acked-by: Takashi Iwai Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20201112223825.39765-15-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit ec8a15d3a7c7d6e9acd2e0637d2020ac17fb7820 Author: Pierre-Louis Bossart Date: Thu Nov 12 16:38:23 2020 -0600 ASoC: Intel: catpt: add dynamic selection of DSP driver Follow PCI example and stop the probe when another driver is desired for the same ACPI HID. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20201112223825.39765-13-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 8643e85aab878fe0d8031ae4622b40cfb78d4172 Author: Pierre-Louis Bossart Date: Thu Nov 12 16:38:22 2020 -0600 ASoC: Intel: broadwell: set card and driver name dynamically Remove last hard-coded build-time dependency Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20201112223825.39765-12-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 803e591337e6f7953350e0f56284ebbabb600808 Author: Pierre-Louis Bossart Date: Thu Nov 12 16:38:21 2020 -0600 ALSA: hda: intel-dsp-config: add Broadwell ACPI DSP driver selection Add ACPI IDs for Broadwell (and Haswell for consistency). This addition is required for dynamic selection of drivers on those devices. Signed-off-by: Pierre-Louis Bossart Acked-by: Takashi Iwai Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20201112223825.39765-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit b405b4318c77db061fdf1c8c4b9329ea30e807ee Author: Pierre-Louis Bossart Date: Thu Nov 12 16:38:20 2020 -0600 ASoC: SOF: Intel: allow for coexistence between SOF and Atom/SST drivers Now that we have all the support needed for coexistence between ACPI drivers for Baytrail and Cherrytrail, remove mutual exclusion in the Kconfig file. The selection is done by playing with the snd_intel_dsp module parameter. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20201112223825.39765-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit df5f5edaef4b653fa731dcf3753e71766f95c2cd Author: Pierre-Louis Bossart Date: Thu Nov 12 16:38:19 2020 -0600 ASoC: Intel: Atom: add dynamic selection of DSP driver Follow PCI example and stop the probe when another driver is desired for the same ACPI HID. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20201112223825.39765-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit f7313f9fc28781ad0801d8b9c692222445e664ca Author: Pierre-Louis Bossart Date: Thu Nov 12 16:38:18 2020 -0600 ASoC: SOF: acpi: add dynamic selection of DSP driver Follow PCI example and stop the probe when another driver is desired for the same ACPI HID. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20201112223825.39765-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 05ff312badb6079f18c0b05d89e21733a9dafe32 Author: Pierre-Louis Bossart Date: Thu Nov 12 16:38:17 2020 -0600 ASoC: Intel: byt/cht: set pm ops dynamically The Atom/SST driver does not rely on ASoC power management, but the SOF driver does. Rather than using a hard-coded build-time assignment, we can set this pm_ops dynamically depending on what the parent is. That will remove the last build-time dependency and allow for coexistence of both SST and SOF drivers for Baytrail/Cherrytrail. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20201112223825.39765-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 41656c3dc2acfe2aef3d7c4e1cd2b92f49b6e3a7 Author: Pierre-Louis Bossart Date: Thu Nov 12 16:38:16 2020 -0600 ASoC: Intel: boards: byt/cht: set card and driver name at run time To avoid hard-coded variations between SOF and SST drivers, set the card name and driver dynamically depending on the parent type. This is the first pass required to let distributions select which drivers to use with kernel parameters instead of build-time selection. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20201112223825.39765-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 644eebdbbf1154c995d6319c133d7d5b898c5ed2 Author: Pierre-Louis Bossart Date: Thu Nov 12 16:38:15 2020 -0600 ASoC: soc-acpi: add helper to identify parent driver. Intel machine drivers are used by parent platform drivers based on closed-source firmware (Atom/SST and catpt) and SOF-based ones. In some cases for ACPI-based platforms, the behavior of machine drivers needs to be modified depending on the parent type, typically for card names and power management. An initial solution based on passing a boolean flag as a platform device parameter was tested earlier. Since it looked overkill, this patch suggests instead a simple string comparison to identify an SOF parent device/driver. Suggested-by: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20201112223825.39765-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit b5682305297db24b456e55ba209574cb8f9318f9 Author: Pierre-Louis Bossart Date: Thu Nov 12 16:38:14 2020 -0600 ALSA: hda: intel-dsp-config: add helper for ACPI DSP driver selection Mirror capabilities provided for PCI devices, so that distributions can select which ACPI driver is loaded at run-time with kernel parameters and DMI tables instead of forcing a build-time selection. The "legacy" option supported for HDaudio has no meaning here and will be ignored. The 'SST' driver based on closed-source firmware has the priority to avoid any impact on users, and the choice to use SOF is strictly opt-in. This may change at some point when the 'SST' driver is deprecated on Baytrail/Cherrytrail. Signed-off-by: Pierre-Louis Bossart Acked-by: Takashi Iwai Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20201112223825.39765-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 791ab8b2e3db0c6e4295467d10398800ec29144c Author: Catalin Marinas Date: Wed Nov 18 18:58:09 2020 +0000 arm64: Ignore any DMA offsets in the max_zone_phys() calculation Currently, the kernel assumes that if RAM starts above 32-bit (or zone_bits), there is still a ZONE_DMA/DMA32 at the bottom of the RAM and such constrained devices have a hardwired DMA offset. In practice, we haven't noticed any such hardware so let's assume that we can expand ZONE_DMA32 to the available memory if no RAM below 4GB. Similarly, ZONE_DMA is expanded to the 4GB limit if no RAM addressable by zone_bits. Signed-off-by: Catalin Marinas Tested-by: Nicolas Saenz Julienne Reviewed-by: Nicolas Saenz Julienne Cc: Nicolas Saenz Julienne Cc: Robin Murphy Link: https://lore.kernel.org/r/20201118185809.1078362-1-catalin.marinas@arm.com Signed-off-by: Catalin Marinas commit 2002d2951398317d0f46e64ae6d8dd58ed541c6d Author: Rikard Falkeborn Date: Wed Nov 11 00:02:28 2020 +0100 x86/resctrl: Constify kernfs_ops The only usage of the kf_ops field in the rftype struct is to pass it as argument to __kernfs_create_file(), which accepts a pointer to const. Make it a pointer to const. This makes it possible to make rdtgroup_kf_single_ops and kf_mondata_ops const, which allows the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Signed-off-by: Borislav Petkov Acked-by: Reinette Chatre Link: https://lkml.kernel.org/r/20201110230228.801785-1-rikard.falkeborn@gmail.com commit 657bc1d10bfc23ac06d5d687ce45826c760744f9 Author: Hayes Wang Date: Wed Nov 18 14:43:58 2020 +0800 r8153_ecm: avoid to be prior to r8152 driver Avoid r8153_ecm is compiled as built-in, if r8152 driver is compiled as modules. Otherwise, the r8153_ecm would be used, even though the device is supported by r8152 driver. Fixes: c1aedf015ebd ("net/usb/r8153_ecm: support ECM mode for RTL8153") Reported-by: Marek Szyprowski Signed-off-by: Hayes Wang Tested-by: Marek Szyprowski Link: https://lore.kernel.org/r/1394712342-15778-394-Taiwan-albertk@realtek.com Signed-off-by: Jakub Kicinski commit 5bfe97d7382b5c1ec351c59a878e742c9fd73d38 Author: Dominique Martinet Date: Thu Nov 19 15:11:04 2020 +0100 9p: Fix writeback fid incorrectly being attached to dentry v9fs_dir_release needs fid->ilist to have been initialized for filp's fid, not the inode's writeback fid's. With refcounting this can be improved on later but this appears to fix null deref issues. Link: http://lkml.kernel.org/r/1605802012-31133-3-git-send-email-asmadeus@codewreck.org Fixes: 6636b6dcc3db ("fs/9p: track open fids") Signed-off-by: Dominique Martinet commit ff5e72ebef41068789c93b0666cebde80cc8bd8c Author: Dominique Martinet Date: Tue Nov 3 09:35:57 2020 +0100 9p: apply review requests for fid refcounting Fix style issues in parent commit ("apply review requests for fid refcounting"), no functional change. Link: http://lkml.kernel.org/r/1605802012-31133-2-git-send-email-asmadeus@codewreck.org Fixes: 6636b6dcc3db ("9p: add refcount to p9_fid struct") Signed-off-by: Dominique Martinet commit 6636b6dcc3db2258cd0585b8078c1c225c4b6dde Author: Jianyong Wu Date: Wed Sep 23 22:11:46 2020 +0800 9p: add refcount to p9_fid struct Fix race issue in fid contention. Eric's and Greg's patch offer a mechanism to fix open-unlink-f*syscall bug in 9p. But there is race issue in fid parallel accesses. As Greg's patch stores all of fids from opened files into according inode, so all the lookup fid ops can retrieve fid from inode preferentially. But there is no mechanism to handle the fid contention issue. For example, there are two threads get the same fid in the same time and one of them clunk the fid before the other thread ready to discard the fid. In this scenario, it will lead to some fatal problems, even kernel core dump. I introduce a mechanism to fix this race issue. A counter field introduced into p9_fid struct to store the reference counter to the fid. When a fid is allocated from the inode or dentry, the counter will increase, and will decrease at the end of its occupation. It is guaranteed that the fid won't be clunked before the reference counter go down to 0, then we can avoid the clunked fid to be used. tests: race issue test from the old test case: for file in {01..50}; do touch f.${file}; done seq 1 1000 | xargs -n 1 -P 50 -I{} cat f.* > /dev/null open-unlink-f*syscall test: I have tested for f*syscall include: ftruncate fstat fchown fchmod faccessat. Link: http://lkml.kernel.org/r/20200923141146.90046-5-jianyong.wu@arm.com Fixes: 478ba09edc1f ("fs/9p: search open fids first") Signed-off-by: Jianyong Wu Signed-off-by: Dominique Martinet commit 91ccc45d1ec4d08851de004eb5d68c67e1232694 Author: Bjorn Andersson Date: Wed Nov 18 08:25:28 2020 -0800 arm64: defconfig: Enable QCOM_SCM as builtin The Qualcomm SCM driver was never explicitly enabled in the defconfig. Instead it was (apparently) selected by DRM_MSM and by the recent change to make it tristate now became =m. Unfortunately this removes the ability for PINCTRL_MSM and ARM_SMMU to be =y and with deferred_probe_timeout defaulting to 0 this means that things such as UART, USB, PCIe and SDHCI probes with their dependencies ignored. The lack of pinctrl results in invalid pin configuration and the lack of iommu results in the system locking up as soon as any form of data transfer is attempted from any of the affected peripherals. Mark QCOM_SCM as builtin, to avoid this. Reviewed-by: Vinod Koul Cc: John Stultz Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20201118162528.454729-1-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit b9a98c3437e353b269ebf3567acc5c3dc757c7a5 Author: Ben Gardon Date: Tue Oct 27 10:59:44 2020 -0700 kvm: x86/mmu: Add TDP MMU SPTE changed trace point Add an extremely verbose trace point to the TDP MMU to log all SPTE changes, regardless of callstack / motivation. This is useful when a complete picture of the paging structure is needed or a change cannot be explained with the other, existing trace points. Tested: ran the demand paging selftest on an Intel Skylake machine with all the trace points used by the TDP MMU enabled and observed them firing with expected values. This patch can be viewed in Gerrit at: https://linux-review.googlesource.com/c/virt/kvm/kvm/+/3813 Signed-off-by: Ben Gardon Message-Id: <20201027175944.1183301-2-bgardon@google.com> Signed-off-by: Paolo Bonzini commit 33dd3574f5fef57c2c6caccf98925d63aa2a8d09 Author: Ben Gardon Date: Tue Oct 27 10:59:43 2020 -0700 kvm: x86/mmu: Add existing trace points to TDP MMU The TDP MMU was initially implemented without some of the usual tracepoints found in mmu.c. Correct this discrepancy by adding the missing trace points to the TDP MMU. Tested: ran the demand paging selftest on an Intel Skylake machine with all the trace points used by the TDP MMU enabled and observed them firing with expected values. This patch can be viewed in Gerrit at: https://linux-review.googlesource.com/c/virt/kvm/kvm/+/3812 Signed-off-by: Ben Gardon Message-Id: <20201027175944.1183301-1-bgardon@google.com> Signed-off-by: Paolo Bonzini commit 36b90846c5d52b0bab38a3a91794187a5b64e941 Merge: a27b421f1d04b 58aad93015b9d Author: Mark Brown Date: Thu Nov 19 15:32:25 2020 +0000 Merge series "ASoC: codecs: add support for LPASS Codec macros" from Srinivas Kandagatla : This patchset adds support for two Codec Macro blocks( WSA and VA) available in Qualcomm LPASS (Low Power Audio SubSystem). There are WSA, VA, TX and RX Macros on LPASS IP, each of the Macro block has specific connectivity like WSA Macros are intended to connect to WSA Smart speaker codecs via SoundWire. VA Macro is intended for DMICs, and TX/RX for Analog codecs via SoundWire like other WCD Codecs to provide headphone/ear/lineout etc .. Most of the work is derived from downstream Qualcomm kernels. Credits to various Qualcomm authors from Patrick Lai's team who have contributed to this code. This patchset has been tested on support to Qualcomm Robotics RB5 Development Kit based on QRB5165 Robotics SoC. This board has 2 WSA881X smart speakers with onboard DMIC connected to internal LPASS codec via WSA and VA macros respectively. Thanks, srini -Changes since v2: - various unnecessary variable intializations removed, suggested by Pierre - fixed a static checker error - collected reviews for dt-bindings. - fixed licence headers as suggested by Pierre. Srinivas Kandagatla (6): ASoC: qcom: dt-bindings: add bindings for lpass wsa macro codec ASoC: codecs: lpass-wsa-macro: Add support to WSA Macro ASoC: codecs: lpass-wsa-macro: add dapm widgets and route ASoC: qcom: dt-bindings: add bindings for lpass va macro codec ASoC: codecs: lpass-va-macro: Add support to VA Macro ASoC: codecs: lpass-va-macro: add dapm widgets and routes .../bindings/sound/qcom,lpass-va-macro.yaml | 67 + .../bindings/sound/qcom,lpass-wsa-macro.yaml | 69 + sound/soc/codecs/Kconfig | 8 + sound/soc/codecs/Makefile | 4 + sound/soc/codecs/lpass-va-macro.c | 1503 ++++++++++ sound/soc/codecs/lpass-wsa-macro.c | 2464 +++++++++++++++++ sound/soc/codecs/lpass-wsa-macro.h | 17 + 7 files changed, 4132 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml create mode 100644 Documentation/devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml create mode 100644 sound/soc/codecs/lpass-va-macro.c create mode 100644 sound/soc/codecs/lpass-wsa-macro.c create mode 100644 sound/soc/codecs/lpass-wsa-macro.h -- 2.21.0 commit 059a0beb486344a577ff476acce75e69eab704be Author: Lionel Landwerlin Date: Tue Nov 17 15:01:24 2020 +0200 drm/i915/perf: workaround register corruption in OATAILPTR After having written the entire OA buffer with reports, the HW will write again at the beginning of the OA buffer. It'll indicate it by setting the WRAP bits in the OASTATUS register. When a wrap happens and that at the end of the read vfunc we write the OASTATUS register back to clear the REPORT_LOST bit, we sometimes see that the OATAILPTR register is reset to a previous position on Gen8/9 (apparently not the case on Gen11+). This leads the next call to the read vfunc to process reports we've already read. Because we've marked those as read by clearing the reason & timestamp dwords, they're discarded and a "Skipping spurious, invalid OA report" message is emitted. The workaround to avoid this OATAILPTR value reset seems to be to set the wrap bits when writing back OASTATUS. This change has no impact on userspace, it only avoids a bunch of DRM_NOTE("Skipping spurious, invalid OA report\n") messages. Signed-off-by: Lionel Landwerlin Fixes: 19f81df2859eb1 ("drm/i915/perf: Add OA unit support for Gen 8+") Reviewed-by: Umesh Nerlige Ramappa Link: https://patchwork.freedesktop.org/patch/msgid/20201117130124.829979-1-lionel.g.landwerlin@intel.com commit 36f9ff9e03de89691274a6aec45aa079bd3ae405 Author: Gustavo A. R. Silva Date: Thu Nov 19 07:11:44 2020 -0600 lib: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of letting the code fall through to the next case, and by replacing a number of /* fall through */ comments with the new pseudo-keyword macro fallthrough. Notice that Clang doesn't recognize /* Fall through */ comments as implicit fall-through markings. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva commit baa2a611762f9ad033392d15efa3b5aeb5c69d50 Author: Tony Lindgren Date: Thu Nov 19 14:50:46 2020 +0200 ARM: dts: Configure power domain for omap5 dss This allows shutting down dss domain when the screen blanks. Signed-off-by: Tony Lindgren commit ee9ddfd78150d5af7da2b60fa0e920f1c5851fab Author: Tero Kristo Date: Thu Nov 12 10:59:11 2020 +0200 ARM: dts: omap5: add remaining PRM instances Add remaining PRM instances for the omap5 SoC. Additionally enable the genpd support for them. Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren commit 0a000aeb8ba06790011960f95b2462985645ec7a Author: Tero Kristo Date: Fri Aug 21 15:53:32 2020 +0300 soc: ti: omap-prm: omap5: add genpd support for remaining PRM instances Add genpd support for mpu, dsp, coreaon, core, iva, cam, dss, gpu, l3init, custefuse, wkupaon and emu instances. Cc: Santosh Shilimkar Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren commit 11fdf598d041e86972e4bd5ecef8968ffe641d1c Author: Tony Lindgren Date: Mon Oct 19 10:45:58 2020 +0300 ARM: OMAP2+: Drop legacy platform data for dra7 gpmc 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. Cc: Roger Quadros Signed-off-by: Tony Lindgren commit ae57d1558908aa797437a45e3c8f91712d2c3114 Author: Tony Lindgren Date: Thu Nov 12 11:57:03 2020 +0200 ARM: dts: Configure interconnect target module for dra7 iva We can now probe devices with device tree only configuration using ti-sysc interconnect target module driver. Cc: Suman Anna Signed-off-by: Tony Lindgren commit 1021b37ecdc83d494846923abe1b381b1f494fa4 Author: Tero Kristo Date: Wed Nov 11 15:57:20 2020 +0200 ARM: dts: dra7: add remaining PRM instances Add remaining PRM instances for the dra7 SoC. Additionally enable the genpd support for them. Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren commit 5a68c87afde01fe8b4eb445a3d04bdb6c8cfba1f Author: Tero Kristo Date: Wed Nov 11 15:13:54 2020 +0200 soc: ti: omap-prm: dra7: add genpd support for remaining PRM instances Add genpd support for mpu, dsp, ipu, coreaon, core, iva, cam, dss, gpu, l3init, l4per, custefuse, wkupaon, emu, eve, rtc and vpe instances. Cc: Santosh Shilimkar Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren commit 57f57201360e443e7ec36124861a2e025d3d39ba Author: Tony Lindgren Date: Thu Nov 19 14:24:29 2020 +0200 clk: ti: dra7: Drop idlest polling from IVA clkctrl clocks Similar to what we've done for IPU and DSP let's ignore the status bit for the IVA clkctrl register. The clkctrl status won't change unless the related rstctrl is deasserted, and the rstctrl status won't change unless the clkctrl is enabled. Cc: linux-clk@vger.kernel.org Cc: Michael Turquette Cc: Stephen Boyd Cc: Suman Anna Cc: Tero Kristo Signed-off-by: Tony Lindgren commit a27b421f1d04b201c474a15ee1591919c81fb413 Author: Ranjani Sridharan Date: Tue Nov 17 13:50:01 2020 -0800 ASoC: pcm: call snd_soc_dapm_stream_stop() in soc_pcm_hw_clean Currently, the SND_SOC_DAPM_STREAM_START event is sent during pcm_prepare() but the SND_SOC_DAPM_STREAM_STOP event is sent only in dpcm_fe_dai_shutdown() after soc_pcm_close(). This results in an imbalance between when the DAPM widgets receive the PRE/POST_PMU/PMD events. So call snd_soc_dapm_stream_stop() in soc_pcm_hw_clean() before the snd_soc_pcm_component_hw_free() to keep the stream_stop DAPM event balanced with the stream_start event in soc_pm_prepare(). Also, in order to prevent duplicate DAPM stream events, remove the call for DAPM STREAM_START event in dpcm_fe_dai_prepare() and the call for DAPM STREAM_STOP event in dpcm_fe_dai_shutdown(). Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Signed-off-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20201117215001.163107-1-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown commit caebea04b9125c677e6e747793fbc7fab077727b Author: Kai Vehmanen Date: Wed Nov 18 16:05:45 2020 +0200 ASoC: SOF: Intel: add hw specific PCM constraints Part of PCM constraints are set based on DSP topology, but rest should be set based on hardware capabilities. Add PCM constraints for Intel platforms: - Add constraint for the period count to be integer. This avoids wrap-arounds of the DMA circular buffer in middle of a period. - Align period size to dword/32bit as per HDA spec. Both constraints are aligned with current implementation in snd-hda-intel driver. Signed-off-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20201118140545.2138895-2-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 9983ac49b7db34258facf47439463e96522e1d5a Author: Kai Vehmanen Date: Wed Nov 18 16:05:44 2020 +0200 ASoC: SOF: relax PCM period and buffer size constraints Current SOF implementation limits period and buffer sizes to multiples of period_min. Period_min is defined in topology, but is in practise set to align with the SOF DSP timer tick (typically 1ms). While this approach helps user-space to avoid period sizes, which are not aligned to the DSP timer tick, it causes problems to applications which want to align data processing size to that of ALSA period size. One example is JACK audio server, which limits period sizes to power of two values. Other ALSA drivers where audio data transfer is driven by a timer tick, like USB, do not constraint period and buffer sizes to exact multiple of the timer tick. To align SOF to follow the same behaviour, drop the additional alignment constraints. As a side-effect, this patch can cause irregularity to period wakeup timing. This happens when application chooses settings which were previously forbidden. For example, if application configures period size to 2^14 bytes and audio config of S32_LE/2ch/48000Hz, one period represents 42.667ms of audio. Without this patch, this configuration is not allowed by SOF. With the patch applied, configuration is allowed but the wakeups are paced by the DSP timer tick, which is typically 1ms. Application will see period wakeups with a 42/43/42/43ms repeating pattern. Both approaches are valid within ALSA context, but relaxing the constraints is better aligned with existing applications and other ALSA drivers like USB audio. Signed-off-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20201118140545.2138895-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 73ea3a5dbbefa792746e258e267a1e066a6ac855 Author: Piotr Maziarz Date: Tue Nov 17 15:52:23 2020 +0100 ASoC: Intel: catpt: select WANT_DEV_COREDUMP Select WANT_DEV_COREDUMP for catpt driver. Signed-off-by: Piotr Maziarz Signed-off-by: Gustaw Lewandowski -- Changes in v2: - change should be added to catpt only Acked-by: Cezary Rojewski Link: https://lore.kernel.org/r/20201117145223.21222-1-gustaw.lewandowski@linux.intel.com Signed-off-by: Mark Brown commit 53233e40c142b1e0e1df9d9ac0ffc0945cfffbc9 Author: Shengjiu Wang Date: Thu Nov 19 14:40:38 2020 +0800 ASoC: fsl_sai: Correct the clock source for mclk0 On VF610, mclk0 = bus_clk; On i.MX6SX/6UL/6ULL/7D, mclk0 = mclk1; On i.MX7ULP, mclk0 = bus_clk; On i.MX8QM/8QXP, mclk0 = bus_clk; On i.MX8MQ/8MN/8MM/8MP, mclk0 = bus_clk; So add variable mclk0_is_mclk1 in fsl_sai_soc_data to distinguish these platforms. Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/1605768038-4582-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 61349f0f2715d08f9ab4448bc9004810fc74b531 Author: Krzysztof Kozlowski Date: Wed Nov 18 21:14:20 2020 +0100 ASoC: sunxi: do not select COMMON_CLK to fix builds COMMON_CLK is a user-selectable option with its own dependencies. The most important dependency is !HAVE_LEGACY_CLK. User-selectable drivers should not select COMMON_CLK because they will create a dependency cycle and build failures. For example on MIPS a configuration with COMMON_CLK (selected by SND_SUN8I_CODEC) and HAVE_LEGACY_CLK (selected by SOC_RT305X) is possible: WARNING: unmet direct dependencies detected for COMMON_CLK Depends on [n]: !HAVE_LEGACY_CLK [=y] Selected by [y]: - SND_SUN8I_CODEC [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && (ARCH_SUNXI || COMPILE_TEST [=y]) && OF [=y] && (MACH_SUN8I || ARM64 && ARCH_SUNXI || COMPILE_TEST [=y]) /usr/bin/mips-linux-gnu-ld: drivers/clk/clk.o: in function `clk_set_rate': (.text+0xaeb4): multiple definition of `clk_set_rate'; arch/mips/ralink/clk.o:(.text+0x88): first defined here Signed-off-by: Krzysztof Kozlowski Reviewed-by: Samuel Holland Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/20201118201420.4878-1-krzk@kernel.org Signed-off-by: Mark Brown commit cf7f4a5320cda6fc533ae96601b4ce767d1af0f8 Author: Pierre-Louis Bossart Date: Thu Nov 12 16:38:13 2020 -0600 ASoC: Intel: bdw-rt5677: add missing pm_ops For some reason this ops is missing in 2 out of the 3 broadwell drivers. Add to make sure ASoC takes care of power management. Tested-by: Cezary Rojewski Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20201112223825.39765-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 7998c168a94de9c593ab07455924e827ad5f1bd7 Author: Pierre-Louis Bossart Date: Thu Nov 12 16:38:12 2020 -0600 ASoC: Intel: broadwell: add missing pm_ops For some reason this ops is missing in 2 out of the 3 broadwell drivers. Add to make sure ASoC takes care of power management. Tested-by: Cezary Rojewski Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20201112223825.39765-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 58aad93015b9dc7cb8966c1dc775ec69f0280b79 Author: Srinivas Kandagatla Date: Thu Nov 5 11:34:58 2020 +0000 ASoC: codecs: lpass-va-macro: add dapm widgets and routes Add dapm widgets and routes for this codec. Signed-off-by: Srinivas Kandagatla Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20201105113458.12360-7-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 908e6b1df26efc9d2df70c9a7bf4f5eae5c5702f Author: Srinivas Kandagatla Date: Thu Nov 5 11:34:57 2020 +0000 ASoC: codecs: lpass-va-macro: Add support to VA Macro Qualcomm LPASS (Low Power Audio SubSystem) has internal codec VA macro block which is used for connecting with DMICs. This patch adds support to the codec part of the VA Macro block Signed-off-by: Srinivas Kandagatla Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20201105113458.12360-6-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 67d99b23c881b1411fc6907bc844d63565b536d6 Author: Srinivas Kandagatla Date: Thu Nov 5 11:34:56 2020 +0000 ASoC: qcom: dt-bindings: add bindings for lpass va macro codec This binding is for LPASS has internal codec VA macro which is for connecting with DMICs. Signed-off-by: Srinivas Kandagatla Reviewed-by: Rob Herring Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20201105113458.12360-5-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 2c4066e5d428d47a28f87407b3d73ebe40c06fd4 Author: Srinivas Kandagatla Date: Thu Nov 5 11:34:55 2020 +0000 ASoC: codecs: lpass-wsa-macro: add dapm widgets and route This patch adds dapm widgets and routes on this codec Signed-off-by: Srinivas Kandagatla Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20201105113458.12360-4-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 809bcbcecebff86003e13f07444d21b9d6652a64 Author: Srinivas Kandagatla Date: Thu Nov 5 11:34:54 2020 +0000 ASoC: codecs: lpass-wsa-macro: Add support to WSA Macro Qualcomm LPASS (Low Power Audio SubSystem) has internal codec WSA macro block which is used for connecting with WSA Smart speakers over soundwire. This patch adds support to the codec part of the WSA Macro block. Signed-off-by: Srinivas Kandagatla Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20201105113458.12360-3-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit ccbd847f15b0f08f8c6ed3ab5384e5f7055b08e5 Author: Srinivas Kandagatla Date: Thu Nov 5 11:34:53 2020 +0000 ASoC: qcom: dt-bindings: add bindings for lpass wsa macro codec This binding is for LPASS has internal codec WSA macro which is for connecting with WSA Smart speakers. Signed-off-by: Srinivas Kandagatla Reviewed-by: Rob Herring Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20201105113458.12360-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 368ffd9adc7a01234c0c68ffd72cc76840f20134 Author: Qinglang Miao Date: Thu Nov 19 15:08:39 2020 +0800 ipmi: msghandler: Suppress suspicious RCU usage warning while running ipmi, ipmi_smi_watcher_register() caused a suspicious RCU usage warning. ----- ============================= WARNING: suspicious RCU usage 5.10.0-rc3+ #1 Not tainted ----------------------------- drivers/char/ipmi/ipmi_msghandler.c:750 RCU-list traversed in non-reader section!! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 2 locks held by syz-executor.0/4254: stack backtrace: CPU: 0 PID: 4254 Comm: syz-executor.0 Not tainted 5.10.0-rc3+ #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1 04/ 01/2014 Call Trace: dump_stack+0x19d/0x200 ipmi_smi_watcher_register+0x2d3/0x340 [ipmi_msghandler] acpi_ipmi_init+0xb1/0x1000 [acpi_ipmi] do_one_initcall+0x149/0x7e0 do_init_module+0x1ef/0x700 load_module+0x3467/0x4140 __do_sys_finit_module+0x10d/0x1a0 do_syscall_64+0x34/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x468ded ----- It is safe because smi_watchers_mutex is locked and srcu_read_lock has been used, so simply pass lockdep_is_held() to the list_for_each_entry_rcu() to suppress this warning. Reported-by: Hulk Robot Signed-off-by: Qinglang Miao Message-Id: <20201119070839.381-1-miaoqinglang@huawei.com> Signed-off-by: Corey Minyard commit 4da595ddc06909d9ba8fcedcce0c4e1e0a4c3244 Author: Joel Stanley Date: Thu Nov 19 22:47:04 2020 +1030 soc: aspeed: Enable drivers with ARCH_ASPEED Default the drivers to on as most configurations will use them. Signed-off-by: Joel Stanley commit 0f0c9c702241d839dbb1d355b77e5712a5a5793f Author: Dan Carpenter Date: Fri Nov 13 13:08:50 2020 +0300 soc: aspeed: Fix a reference leak in aspeed_socinfo_init() This needs to call of_node_put(np) before returning if of_iomap() fails. Fixes: e0218dca5787 ("soc: aspeed: Add soc info driver") Signed-off-by: Dan Carpenter Reviewed-by: Andrew Jeffery Link: https://lore.kernel.org/r/20201113100850.GA168908@mwanda Signed-off-by: Joel Stanley commit 959b981dc7bc144e0e256f8fe34b6ce23e839525 Author: Tom Rix Date: Sun Nov 1 07:06:22 2020 -0800 soc: aspeed: remove unneeded semicolon A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20201101150622.2288203-1-trix@redhat.com Signed-off-by: Joel Stanley commit 91c7a7e0656de077911332f2acdb60f6fd4a134f Author: Tiezhu Yang Date: Thu Nov 19 15:53:01 2020 +0800 MIPS: Loongson64: Fix wrong scache size when execute lscpu As the user manual and code comment said, Loongson-3 has 4-scache banks, while Loongson-2K has only 2 banks, so we should multiply the number of scache banks, this multiply operation should be done by c->scache.sets instead of scache_size, otherwise we will get the wrong scache size when execute lscpu. For example, the scache size should be 8192K instead of 2048K on the Loongson 3A3000 and 3A4000 platform, we can see the related info in the following boot message: [loongson@linux ~]$ dmesg | grep "Unified secondary cache" [ 0.000000] Unified secondary cache 8192kB 16-way, linesize 64 bytes. [ 4.061909] Unified secondary cache 8192kB 16-way, linesize 64 bytes. [ 4.125629] Unified secondary cache 8192kB 16-way, linesize 64 bytes. [ 4.188379] Unified secondary cache 8192kB 16-way, linesize 64 bytes. E.g. without this patch: [loongson@linux ~]$ cat /sys/devices/system/cpu/cpu*/cache/index2/size 2048K 2048K 2048K 2048K [loongson@linux ~]$ lscpu | grep "L2 cache" L2 cache: 2048K With this patch: [loongson@linux ~]$ cat /sys/devices/system/cpu/cpu*/cache/index2/size 8192K 8192K 8192K 8192K [loongson@linux ~]$ lscpu | grep "L2 cache" L2 cache: 8192K Signed-off-by: Tiezhu Yang Signed-off-by: Thomas Bogendoerfer commit 6ce91ba8589ab08143939f9d6a58993e36773e75 Author: Tiezhu Yang Date: Thu Nov 19 15:53:00 2020 +0800 MIPS: Remove cpu_has_6k_cache and cpu_has_8k_cache in cpu_cache_init() Since commit 02cf2119684e ("Cleanup the mess in cpu_cache_init."), cpu_has_6k_cache and cpu_has_8k_cache have no user, r6k_cache_init() and r8k_cache_init() are not defined for over 15 years, just remove them. Signed-off-by: Tiezhu Yang Signed-off-by: Thomas Bogendoerfer commit 0df162e1377a585ced8adb932f7d6e4164e91ccf Author: Thomas Bogendoerfer Date: Fri Nov 13 12:09:52 2020 +0100 MIPS: mm: Clean up setup of protection map Protection map difference between RIXI and non RIXI cpus is _PAGE_NO_EXEC and _PAGE_NO_READ usage. Both already take care of cpu_has_rixi while setting up the page bits. So we just need one setup of protection map and can drop the now unused (and broken for RIXI) PAGE_* defines. Signed-off-by: Thomas Bogendoerfer commit ed2adb74217a4054a92e0a0746e31ec6f5e466c8 Author: Thomas Bogendoerfer Date: Fri Nov 13 12:09:51 2020 +0100 MIPS: mm: shorten lines by using macro Introduce helper macro to make lines shorter. Signed-off-by: Thomas Bogendoerfer commit 411406a8c758d9ad6f908fab3a6cf1d3d89e1d08 Author: Thomas Bogendoerfer Date: Fri Nov 13 12:09:50 2020 +0100 MIPS: kvm: Use vm_get_page_prot to get protection bits MIPS protection bits are setup during runtime so using defines like PAGE_SHARED ignores this runtime changes. Using vm_get_page_prot to get correct page protection fixes this. Signed-off-by: Thomas Bogendoerfer commit fb0bf6aa8d5bd673d294b0b21b7c871d0308ae87 Author: Tony Lindgren Date: Thu Nov 19 14:19:01 2020 +0200 ARM: OMAP2+: Drop legacy platform data for omap4 gpmc 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. Cc: Roger Quadros Signed-off-by: Tony Lindgren commit dfdaf8643e4e24e1876f279c81d9a1baea0af981 Author: Tony Lindgren Date: Thu Nov 19 14:18:54 2020 +0200 ARM: OMAP2+: Drop legacy platform data for omap4 iva 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. Cc: Suman Anna Signed-off-by: Tony Lindgren commit 399882c1997509e2c2dcfe05e3491e2480be3e63 Author: Tony Lindgren Date: Thu Nov 19 14:18:45 2020 +0200 ARM: dts: Configure power domain for omap4 dsp This allows shutting down the dsp domain when not in use. Signed-off-by: Tony Lindgren commit 0c7815f306e3f3f836b846976352bd886dfb9fce Author: Tony Lindgren Date: Thu Nov 19 14:18:08 2020 +0200 ARM: dts: Configure power domain for omap4 dss This allows shutting down dss domain when the screen blanks. Signed-off-by: Tony Lindgren commit 6d4b65e31a3fce0943801248637fd72b14ca6e69 Author: Tero Kristo Date: Thu Nov 12 14:21:52 2020 +0200 ARM: dts: omap4: add remaining PRM instances Add remaining PRM instances for the omap4 SoC. Additionally enable the genpd support for them. Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren commit 773f0d89ac8d20d820e65347e11274c6458d9010 Author: Tero Kristo Date: Wed Sep 30 13:48:46 2020 +0300 soc: ti: omap-prm: omap4: add genpd support for remaining PRM instances Add genpd support for mpu, tesla, always_on_core, core, ivahd, cam, dss, gfx, l3init, l4per, cefuse, wkup and emu instances. Cc: Santosh Shilimkar Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren commit 724d554a117a0552c2c982f0b5cd1d685274d678 Author: Thomas Bogendoerfer Date: Fri Nov 13 12:09:49 2020 +0100 MIPS: vdso: Use vma page protection for remapping MIPS protection bits are setup during runtime so using defines like PAGE_READONLY ignores these runtime changes. To fix this we simply use the page protection of the setup vma. Signed-off-by: Thomas Bogendoerfer commit 3614fb09f998c8f710142fb722ba216ddc79db24 Author: Tony Lindgren Date: Thu Nov 19 14:18:17 2020 +0200 clk: ti: omap4: Drop idlest polling from IVA clkctrl clocks Similar to what we've done for IPU and DSP let's ignore the status bit for the IVA clkctrl register. The clkctrl status won't change unless the related rstctrl is deasserted, and the rstctrl status won't change unless the clkctrl is enabled. Cc: linux-clk@vger.kernel.org Cc: Michael Turquette Cc: Stephen Boyd Cc: Suman Anna Cc: Tero Kristo Signed-off-by: Tony Lindgren commit 3e3e59ef0cbe9bfbe8e55c4c8165dd98148decf2 Author: Christian König Date: Tue Nov 17 16:50:45 2020 +0100 drm/ttm: fix DMA32 handling in the global page pool When we have mixed DMA32 and non DMA32 device in one system it could otherwise happen that the DMA32 device gets pages it can't work with. Signed-off-by: Christian König Reviewed-by: Huang Rui Link: https://patchwork.freedesktop.org/patch/401317/ commit 2ba56f464f0c1a7264160f8675063b3df92e7966 Author: Joel Stanley Date: Thu Jun 11 11:04:33 2020 +0930 ARM: dts: aspeed: ast2600evb: Add MAC0 MAC0 was not functional in the AST2600A0 SoC. This has been resolved with the A1, so allow use of this port on EVBs with the A1 and subsequent revisions. A0 EVBs will still boot with this change, but the first Ethernet device will not be functional. Signed-off-by: Joel Stanley commit c680dd4e60456305434bb6babc36804d1301e0ff Author: Andrew Jeffery Date: Fri Oct 2 16:04:14 2020 +0930 ARM: dts: aspeed: rainier: Don't shout addresses Make them lowercase. Signed-off-by: Andrew Jeffery Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20201002063414.275161-4-andrew@aj.id.au Signed-off-by: Joel Stanley commit bb74fdbd8a6c4eb6da18cef9c65da755b4ae5bcb Author: Eddie James Date: Mon Nov 2 13:47:13 2020 -0600 ARM: dts: aspeed: rainier: Mark FSI SPI controllers as restricted Some of the FSI-attached SPI controllers can't use the loop command due to security requirements. Indicate this in the devicetree with the restricted compatible string. Signed-off-by: Eddie James Link: https://lore.kernel.org/r/20201102194713.14812-1-eajames@linux.ibm.com Signed-off-by: Joel Stanley commit 673536cc5f21b34785e386dd05510659bf6d92db Author: Alexandre Belloni Date: Wed Nov 18 01:27:47 2020 +0100 rtc: pcf8523: use BIT Use the BIT macro to define register bits. Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201118002747.1346504-3-alexandre.belloni@bootlin.com commit 219cc0f9189759cf6e22a935c20df3654331037f Author: Alexandre Belloni Date: Wed Nov 18 01:27:46 2020 +0100 rtc: pcf8523: set range Set the th RTC range, it is a classic BCD RTC, considering 00 as a leap year. Let the core handle range checking. Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201118002747.1346504-2-alexandre.belloni@bootlin.com commit 886144058d53db85b269256922e71b5462c53c60 Author: Alexandre Belloni Date: Wed Nov 18 01:27:45 2020 +0100 rtc: pcf8523: switch to devm_rtc_allocate_device Switch to devm_rtc_allocate_device/devm_rtc_register_device, this allows for further improvement of the driver. Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201118002747.1346504-1-alexandre.belloni@bootlin.com commit 0d6d7a390b32ef23d957960d3bb8586a49d6af7c Author: Bartosz Golaszewski Date: Tue Nov 10 10:42:05 2020 +0100 rtc: destroy mutex when releasing the device Not destroying mutexes doesn't lead to resource leak but it's the correct thing to do for mutex debugging accounting. Signed-off-by: Bartosz Golaszewski Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201110094205.8972-1-brgl@bgdev.pl commit 1bfc485b73579bff5326ac481fd9be7e24a5d5d1 Author: Bartosz Golaszewski Date: Mon Nov 9 17:34:09 2020 +0100 rtc: shrink devm_rtc_allocate_device() We don't need to use devres_alloc() & devres_add() manually if all we want to manage is a single pointer. We can shrink the code by using devm_add_action_or_reset() instead. The number of allocations stays the same. Signed-off-by: Bartosz Golaszewski Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201109163409.24301-9-brgl@bgdev.pl commit fdcfd854333be5b30377dc5daa9cd0fa1643a979 Author: Bartosz Golaszewski Date: Mon Nov 9 17:34:08 2020 +0100 rtc: rework rtc_register_device() resource management rtc_register_device() is a managed interface but it doesn't use devres by itself - instead it marks an rtc_device as "registered" and the devres callback for devm_rtc_allocate_device() takes care of resource release. This doesn't correspond with the design behind devres where managed structures should not be aware of being managed. The correct solution here is to register a separate devres callback for unregistering the device. While at it: rename rtc_register_device() to devm_rtc_register_device() and add it to the list of managed interfaces in devres.rst. This way we can avoid any potential confusion of driver developers who may expect there to exist a corresponding unregister function. Signed-off-by: Bartosz Golaszewski Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201109163409.24301-8-brgl@bgdev.pl commit 6746bc095bbd1da719aadd9a11fe2c75a12f22e0 Author: Bartosz Golaszewski Date: Mon Nov 9 17:34:07 2020 +0100 rtc: nvmem: emit an error message when nvmem registration fails Some users check the return value of devm_rtc_nvmem_register() only in order to emit an error message and then continue probing. This is fine as an rtc can function without exposing nvmem but let's generalize it: let's make the registration function emit the error message so that users don't have to. Signed-off-by: Bartosz Golaszewski Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201109163409.24301-7-brgl@bgdev.pl commit 3a905c2d9544a418953d6c18668f0f853fbd9be9 Author: Bartosz Golaszewski Date: Mon Nov 9 17:34:06 2020 +0100 rtc: add devm_ prefix to rtc_nvmem_register() rtc_nvmem_register() is a managed interface. It doesn't require any release function to be called at driver detach. To avoid confusing driver authors, let's rename it to devm_rtc_nvmem_register() and add it to the list of managed interfaces in Documentation/. Signed-off-by: Bartosz Golaszewski Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201109163409.24301-6-brgl@bgdev.pl commit 25ece30561d247b2931b0d11d92e9c976a668771 Author: Alexandre Belloni Date: Mon Nov 9 17:34:05 2020 +0100 rtc: nvmem: remove nvram ABI The nvram sysfs attributes have been deprecated at least since v4.13, more than 3 years ago and nobody ever complained about the deprecation warning. Remove the sysfs attributes now. [Bartosz: remove the declaration of rtc_nvmem_unregister()] Signed-off-by: Alexandre Belloni Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20201109163409.24301-5-brgl@bgdev.pl commit 4d49ffc7a20dd0b05efb82fbf5b52d7aa57e9f4b Author: Bartosz Golaszewski Date: Mon Nov 9 17:34:04 2020 +0100 Documentation: list RTC devres helpers in devres.rst It's customary to list all devres helpers in devres.rst. Add missing RTC routines. Signed-off-by: Bartosz Golaszewski Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201109163409.24301-4-brgl@bgdev.pl commit 7c45c9741ab2063e76ed716ac7aae05f97143f9c Author: Bartosz Golaszewski Date: Mon Nov 9 17:34:02 2020 +0100 rtc: omap: use devm_pinctrl_register() Use a managed variant of pinctrl_register(). This way we can shorten the remove() callback as well as drop a goto label from probe(). Signed-off-by: Bartosz Golaszewski Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201109163409.24301-2-brgl@bgdev.pl commit 7d9d4868ec0b34dbfc74b3075dc1e896cc98f783 Author: Alexandre Belloni Date: Tue Nov 17 22:22:01 2020 +0100 rtc: sc27xx: Always read normal alarm The RTC core only reads the alarm from the hardware at boot time, to know whether an alarm was already set before booting. It keeps track of all the alarms after that so there is no need to ever read the auxiliary alarm. Commit 3822d1bb0df1 ("rtc: sc27xx: Always read normal alarm when registering RTC device") already effectively removed the capability to read the auxiliary alarm as .read_alarm is always called with rtc->registered set to false. Signed-off-by: Alexandre Belloni Reviewed-by: Chunyan Zhang Link: https://lore.kernel.org/r/20201117212201.1288608-1-alexandre.belloni@bootlin.com commit 281f1f99cf3a761b45f611943721dfb1895c68a3 Author: Rob Herring Date: Thu Nov 5 15:11:59 2020 -0600 PCI: dwc: Detect number of iATU windows Currently the number of inbound and outbound iATU windows are determined from DT properties. Unfortunately, there's 'num-viewport' for RC mode and 'num-ib-windows' and 'num-ob-windows' for EP mode, yet the number of windows is not mode dependent. Also, 'num-viewport' is not clear whether that's inbound, outbound or both. We can probably assume it's outbound windows as that's all RC mode uses. However, using DT properties isn't really needed as the number of regions can be detected at runtime by poking the iATU registers. The basic algorithm is just writing a target address and reading back what we wrote. In the unrolled ATU case, we have to take care not to go past the mapped region. With this, we can drop num_viewport in favor of num_ob_windows instead. Link: https://lore.kernel.org/r/20201105211159.1814485-17-robh@kernel.org Tested-by: Marek Szyprowski Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Jingoo Han Cc: Gustavo Pimentel Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Thierry Reding Cc: Jonathan Hunter Cc: linux-tegra@vger.kernel.org commit 9ca17af552bcd28cb91b6317edd945b4134411fa Author: Rob Herring Date: Thu Nov 5 15:11:58 2020 -0600 PCI: dwc: Move inbound and outbound windows to common struct The number of inbound and outbound windows are defined by the h/w and apply to both RC and EP modes, so move them to the appropriate struct. Link: https://lore.kernel.org/r/20201105211159.1814485-16-robh@kernel.org Tested-by: Marek Szyprowski Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Jingoo Han Cc: Gustavo Pimentel Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit fcde397422ef621e52dac509e253d5e8a8f43b23 Author: Rob Herring Date: Thu Nov 5 15:11:57 2020 -0600 Revert "PCI: dwc/keystone: Drop duplicated 'num-viewport'" This reverts commit 421063efaf1e8f2ac6248cca0064e5877e375f87. In preparation to detect the number of iATU regions instead of using DT properties, we need to keep reading 'num-viewport' for the Keystone driver which doesn't use the iATU in older versions of the IP. However, note that Keystone has been broken for some time with upstream dts files which don't set 'num-viewports'. The reverted commit did make the property optional, but now it's mandatory again. Link: https://lore.kernel.org/r/20201105211159.1814485-15-robh@kernel.org Tested-by: Marek Szyprowski Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Murali Karicheri Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit 60f5b73fa0f298e8f7321deeb634e618b1c3d074 Author: Rob Herring Date: Thu Nov 5 15:11:56 2020 -0600 PCI: dwc: Remove unnecessary wrappers around dw_pcie_host_init() Many calls to dw_pcie_host_init() are in a wrapper function with nothing else now. Let's remove the pointless extra layer. Link: https://lore.kernel.org/r/20201105211159.1814485-14-robh@kernel.org Tested-by: Marek Szyprowski Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Richard Zhu Cc: Lucas Stach Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Cc: Murali Karicheri Cc: Minghuan Lian Cc: Mingkai Hu Cc: Roy Zang Cc: Yue Wang Cc: Kevin Hilman Cc: Neil Armstrong Cc: Jerome Brunet Cc: Martin Blumenstingl Cc: Jonathan Chocron Cc: Jesper Nilsson Cc: Xiaowei Song Cc: Binghui Wang Cc: Kunihiko Hayashi Cc: Masahiro Yamada Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-amlogic@lists.infradead.org Cc: linux-arm-kernel@axis.com commit b9ac0f9dc8ea4b91362694e82a1e66313a6c6dc6 Author: Rob Herring Date: Thu Nov 5 15:11:55 2020 -0600 PCI: dwc: Move dw_pcie_setup_rc() to DWC common code All RC complex drivers must call dw_pcie_setup_rc(). The ordering of the call shouldn't be too important other than being after any RC resets. There's a few calls of dw_pcie_setup_rc() left as drivers implementing suspend/resume need it. Link: https://lore.kernel.org/r/20201105211159.1814485-13-robh@kernel.org Tested-by: Marek Szyprowski Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Acked-by: Jingoo Han Cc: Kishon Vijay Abraham I Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc: Richard Zhu Cc: Lucas Stach Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Cc: Murali Karicheri Cc: Minghuan Lian Cc: Mingkai Hu Cc: Roy Zang Cc: Yue Wang Cc: Kevin Hilman Cc: Neil Armstrong Cc: Jerome Brunet Cc: Martin Blumenstingl Cc: Thomas Petazzoni Cc: Jesper Nilsson Cc: Gustavo Pimentel Cc: Xiaowei Song Cc: Binghui Wang Cc: Andy Gross Cc: Bjorn Andersson Cc: Stanimir Varbanov Cc: Pratyush Anand Cc: Kunihiko Hayashi Cc: Masahiro Yamada Cc: linux-omap@vger.kernel.org Cc: linux-samsung-soc@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-amlogic@lists.infradead.org Cc: linux-arm-kernel@axis.com Cc: linux-arm-msm@vger.kernel.org commit 59fbab1ae40eb048eb2bd2385a5b981051513458 Author: Rob Herring Date: Thu Nov 5 15:11:54 2020 -0600 PCI: dwc: Move dw_pcie_msi_init() into core The host drivers which call dw_pcie_msi_init() are all the ones using the built-in MSI controller, so let's move it into the common DWC code. Link: https://lore.kernel.org/r/20201105211159.1814485-12-robh@kernel.org Tested-by: Marek Szyprowski Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Acked-by: Jingoo Han Cc: Kishon Vijay Abraham I Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc: Richard Zhu Cc: Lucas Stach Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Cc: Yue Wang Cc: Kevin Hilman Cc: Neil Armstrong Cc: Jerome Brunet Cc: Martin Blumenstingl Cc: Jesper Nilsson Cc: Gustavo Pimentel Cc: Xiaowei Song Cc: Binghui Wang Cc: Stanimir Varbanov Cc: Andy Gross Cc: Bjorn Andersson Cc: Pratyush Anand Cc: Thierry Reding Cc: Jonathan Hunter Cc: Kunihiko Hayashi Cc: Masahiro Yamada Cc: linux-omap@vger.kernel.org Cc: linux-samsung-soc@vger.kernel.org Cc: linux-amlogic@lists.infradead.org Cc: linux-arm-kernel@axis.com Cc: linux-arm-msm@vger.kernel.org Cc: linux-tegra@vger.kernel.org commit 886a9c1347558f0568e87fbbe7bcc3a76102bf0b Author: Rob Herring Date: Thu Nov 5 15:11:53 2020 -0600 PCI: dwc: Move link handling into common code All the DWC drivers do link setup and checks at roughly the same time. Let's use the existing .start_link() hook (currently only used in EP mode) and move the link handling to the core code. The behavior for a link down was inconsistent as some drivers would fail probe in that case while others succeed. Let's standardize this to succeed as there are usecases where devices (and the link) appear later even without hotplug. For example, a reconfigured FPGA device. Link: https://lore.kernel.org/r/20201105211159.1814485-11-robh@kernel.org Tested-by: Marek Szyprowski Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Acked-by: Jingoo Han Cc: Kishon Vijay Abraham I Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc: Richard Zhu Cc: Lucas Stach Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Cc: Murali Karicheri Cc: Yue Wang Cc: Kevin Hilman Cc: Neil Armstrong Cc: Jerome Brunet Cc: Martin Blumenstingl Cc: Thomas Petazzoni Cc: Jesper Nilsson Cc: Gustavo Pimentel Cc: Xiaowei Song Cc: Binghui Wang Cc: Andy Gross Cc: Bjorn Andersson Cc: Stanimir Varbanov Cc: Pratyush Anand Cc: Thierry Reding Cc: Jonathan Hunter Cc: Kunihiko Hayashi Cc: Masahiro Yamada Cc: linux-omap@vger.kernel.org Cc: linux-samsung-soc@vger.kernel.org Cc: linux-amlogic@lists.infradead.org Cc: linux-arm-kernel@axis.com Cc: linux-arm-msm@vger.kernel.org Cc: linux-tegra@vger.kernel.org commit f78f02638af5941eb45a402fa52c0edf4ac0f507 Author: Rob Herring Date: Thu Nov 5 15:11:52 2020 -0600 PCI: dwc: Rework MSI initialization There are 3 possible MSI implementations for the DWC host. The first is using the built-in DWC MSI controller. The 2nd is a custom MSI controller as part of the PCI host (keystone only). The 3rd is an external MSI controller (typically GICv3 ITS). Currently, the last 2 are distinguished with a .msi_host_init() hook with the 3rd option using an empty function. However we can detect the 3rd case with the presence of 'msi-parent' or 'msi-map' properties, so let's do that instead and remove the empty functions. Link: https://lore.kernel.org/r/20201105211159.1814485-10-robh@kernel.org Tested-by: Marek Szyprowski Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Acked-by: Jingoo Han Cc: Murali Karicheri Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Minghuan Lian Cc: Mingkai Hu Cc: Roy Zang Cc: Gustavo Pimentel Cc: linuxppc-dev@lists.ozlabs.org commit 5bcb1757e637a4f6d130f1f5106ce030516316b8 Author: Rob Herring Date: Thu Nov 5 15:11:51 2020 -0600 PCI: dwc: Move MSI interrupt setup into DWC common code Platforms using the built-in DWC MSI controller all have a dedicated interrupt with "msi" name or at index 0, so let's move setting up the interrupt to the common DWC code. spear13xx and dra7xx are the 2 oddballs with muxed interrupts, so we need to prevent configuring the MSI interrupt by setting msi_irq to negative. Link: https://lore.kernel.org/r/20201105211159.1814485-9-robh@kernel.org Tested-by: Marek Szyprowski Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Acked-by: Jingoo Han Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc: Richard Zhu Cc: Lucas Stach Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Cc: Yue Wang Cc: Kevin Hilman Cc: Neil Armstrong Cc: Jerome Brunet Cc: Martin Blumenstingl Cc: Jesper Nilsson Cc: Gustavo Pimentel Cc: Xiaowei Song Cc: Binghui Wang Cc: Stanimir Varbanov Cc: Andy Gross Cc: Bjorn Andersson Cc: Pratyush Anand Cc: Thierry Reding Cc: Jonathan Hunter Cc: Kunihiko Hayashi Cc: Masahiro Yamada Cc: linux-samsung-soc@vger.kernel.org Cc: linux-amlogic@lists.infradead.org Cc: linux-arm-kernel@axis.com Cc: linux-arm-msm@vger.kernel.org Cc: linux-tegra@vger.kernel.org commit 331e9bcead5252364e52fc95efbbe7273667b07d Author: Rob Herring Date: Thu Nov 5 15:11:50 2020 -0600 PCI: dwc: Drop the .set_num_vectors() host op There's no reason for the .set_num_vectors() host op. Drivers needing a non-default value can just initialize pcie_port.num_vectors directly. Link: https://lore.kernel.org/r/20201105211159.1814485-8-robh@kernel.org Tested-by: Marek Szyprowski Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Acked-by: Jingoo Han Cc: Gustavo Pimentel Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Thierry Reding Cc: Jonathan Hunter Cc: linux-tegra@vger.kernel.org commit 7f170d35f58311362e8b01b6774ca1053c0641b8 Author: Rob Herring Date: Thu Nov 5 15:11:49 2020 -0600 PCI: dwc/dra7xx: Use the common MSI irq_chip The dra7xx MSI irq_chip implementation is identical to the default DWC one. The only difference is the interrupt handler as the MSI interrupt is muxed with other interrupts, but that doesn't affect the irq_chip part of it. Link: https://lore.kernel.org/r/20201105211159.1814485-7-robh@kernel.org Tested-by: Marek Szyprowski Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Kishon Vijay Abraham I Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: linux-omap@vger.kernel.org commit 458ad06c4cddac4b85f70ee00c295e2c5127ff3c Author: Rob Herring Date: Thu Nov 5 15:11:48 2020 -0600 PCI: dwc: Ensure all outbound ATU windows are reset The Layerscape driver clears the ATU registers which may have been configured by the bootloader. Any driver could have the same issue and doing it for all drivers doesn't hurt, so let's move it into the common DWC code. Link: https://lore.kernel.org/r/20201105211159.1814485-6-robh@kernel.org Tested-by: Marek Szyprowski Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Acked-by: Jingoo Han Cc: Minghuan Lian Cc: Mingkai Hu Cc: Roy Zang Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Jingoo Han Cc: Gustavo Pimentel Cc: linuxppc-dev@lists.ozlabs.org commit 1cc9a559993a4a69e7bdfb24a2a75955d08cd542 Author: Rob Herring Date: Thu Nov 5 15:11:47 2020 -0600 PCI: dwc/intel-gw: Remove some unneeded function wrappers Remove some of the pointless levels of functions that just wrap or group a series of other functions. Link: https://lore.kernel.org/r/20201105211159.1814485-5-robh@kernel.org Tested-by: Marek Szyprowski Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit a0fd361db8e508b8ce71c284b5ae3961759a0b3b Author: Rob Herring Date: Thu Nov 5 15:11:46 2020 -0600 PCI: dwc: Move "dbi", "dbi2", and "addr_space" resource setup into common code Most DWC drivers use the common register resource names "dbi", "dbi2", and "addr_space", so let's move their setup into the DWC common code. This means 'dbi_base' in particular is setup later, but it looks like no drivers touch DBI registers before dw_pcie_host_init or dw_pcie_ep_init. Link: https://lore.kernel.org/r/20201105211159.1814485-4-robh@kernel.org Tested-by: Marek Szyprowski Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Acked-by: Jingoo Han Cc: Kishon Vijay Abraham I Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Murali Karicheri Cc: Minghuan Lian Cc: Mingkai Hu Cc: Roy Zang Cc: Jonathan Chocron Cc: Jesper Nilsson Cc: Gustavo Pimentel Cc: Xiaowei Song Cc: Binghui Wang Cc: Andy Gross Cc: Bjorn Andersson Cc: Stanimir Varbanov Cc: Pratyush Anand Cc: Thierry Reding Cc: Jonathan Hunter Cc: Kunihiko Hayashi Cc: Masahiro Yamada Cc: linux-omap@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-arm-kernel@axis.com Cc: linux-arm-msm@vger.kernel.org Cc: linux-tegra@vger.kernel.org commit 1d567aac46101c8743e49990b94560f86740bb1e Author: Rob Herring Date: Thu Nov 5 15:11:45 2020 -0600 PCI: dwc/intel-gw: Move ATU offset out of driver match data The ATU offset should be a register range in DT called 'atu', not driver match data. Any future platforms with a different ATU offset should add it to their DT. This is also in preparation to do DBI resource setup in the core DWC code, so let's move setting atu_base later in intel_pcie_rc_setup(). Link: https://lore.kernel.org/r/20201105211159.1814485-3-robh@kernel.org Tested-by: Marek Szyprowski Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit 476b70b4d1adff4465e9ff68021c52858555ac28 Author: Alex Dewar Date: Sun Sep 6 20:51:27 2020 +0100 PCI: keystone: Enable compile-testing on !ARM Currently the Keystone driver can only be compile-tested on ARM, but this restriction seems unnecessary. Get rid of it to increase test coverage. Build-tested with allyesconfig on x86, ppc, mips and riscv. Link: https://lore.kernel.org/r/20200906195128.279342-1-alex.dewar90@gmail.com Signed-off-by: Alex Dewar Signed-off-by: Lorenzo Pieralisi Acked-by: Rob Herring commit b9ce9b0f83b536a4ac7de7567a265d28d13e5bea Author: Nicolin Chen Date: Wed Nov 18 20:44:57 2020 -0800 soc/tegra: fuse: Fix index bug in get_process_id This patch simply fixes a bug of referencing speedos[num] in every for-loop iteration in get_process_id function. Fixes: 0dc5a0d83675 ("soc/tegra: fuse: Add Tegra210 support") Cc: Signed-off-by: Nicolin Chen Signed-off-by: Thierry Reding commit cb09a379724d299c603a7a79f444f52a9a75b8d2 Author: Yazen Ghannam Date: Mon Nov 9 21:06:59 2020 +0000 x86/topology: Set cpu_die_id only if DIE_TYPE found CPUID Leaf 0x1F defines a DIE_TYPE level (nb: ECX[8:15] level type == 0x5), but CPUID Leaf 0xB does not. However, detect_extended_topology() will set struct cpuinfo_x86.cpu_die_id regardless of whether a valid Die ID was found. Only set cpu_die_id if a DIE_TYPE level is found. CPU topology code may use another value for cpu_die_id, e.g. the AMD NodeId on AMD-based systems. Code ordering should be maintained so that the CPUID Leaf 0x1F Die ID value will take precedence on systems that may use another value. Suggested-by: Borislav Petkov Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201109210659.754018-5-Yazen.Ghannam@amd.com commit 8de0c9917cc1297bc5543b61992d5bdee4ce621a Author: Yazen Ghannam Date: Mon Nov 9 21:06:58 2020 +0000 EDAC/mce_amd: Use struct cpuinfo_x86.cpu_die_id for AMD NodeId The edac_mce_amd module calls decode_dram_ecc() on AMD Family17h and later systems. This function is used in amd64_edac_mod to do system-specific decoding for DRAM ECC errors. The function takes a "NodeId" as a parameter. In AMD documentation, NodeId is used to identify a physical die in a system. This can be used to identify a node in the AMD_NB code and also it is used with umc_normaddr_to_sysaddr(). However, the input used for decode_dram_ecc() is currently the NUMA node of a logical CPU. In the default configuration, the NUMA node and physical die will be equivalent, so this doesn't have an impact. But the NUMA node configuration can be adjusted with optional memory interleaving modes. This will cause the NUMA node enumeration to not match the physical die enumeration. The mismatch will cause the address translation function to fail or report incorrect results. Use struct cpuinfo_x86.cpu_die_id for the node_id parameter to ensure the physical ID is used. Fixes: fbe63acf62f5 ("EDAC, mce_amd: Use cpu_to_node() to find the node ID") Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201109210659.754018-4-Yazen.Ghannam@amd.com commit db970bd231c2264a062e0de4dcf4ead5e6669e7a Author: Yazen Ghannam Date: Mon Nov 9 21:06:57 2020 +0000 x86/CPU/AMD: Remove amd_get_nb_id() The Last Level Cache ID is returned by amd_get_nb_id(). In practice, this value is the same as the AMD NodeId for callers of this function. The NodeId is saved in struct cpuinfo_x86.cpu_die_id. Replace calls to amd_get_nb_id() with the logical CPU's cpu_die_id and remove the function. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201109210659.754018-3-Yazen.Ghannam@amd.com commit 028c221ed1904af9ac3c5162ee98f48966de6b3d Author: Yazen Ghannam Date: Mon Nov 9 21:06:56 2020 +0000 x86/CPU/AMD: Save AMD NodeId as cpu_die_id AMD systems provide a "NodeId" value that represents a global ID indicating to which "Node" a logical CPU belongs. The "Node" is a physical structure equivalent to a Die, and it should not be confused with logical structures like NUMA nodes. Logical nodes can be adjusted based on firmware or other settings whereas the physical nodes/dies are fixed based on hardware topology. The NodeId value can be used when a physical ID is needed by software. Save the AMD NodeId to struct cpuinfo_x86.cpu_die_id. Use the value from CPUID or MSR as appropriate. Default to phys_proc_id otherwise. Do so for both AMD and Hygon systems. Drop the node_id parameter from cacheinfo_*_init_llc_id() as it is no longer needed. Update the x86 topology documentation. Suggested-by: Borislav Petkov Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201109210659.754018-2-Yazen.Ghannam@amd.com commit 48a0962d2e2d26785ada80c9c757af875963c43b Author: Gustavo Pimentel Date: Mon Aug 17 22:27:34 2020 +0200 MAINTAINERS: Add missing documentation references to PCI Endpoint Subsystem Adds documentation reference created by Kishon Abraham to the MAINTAINERS list relative with the PCI endpoint subsystem section. Link: https://lore.kernel.org/r/4fa78c7a24e8f8ec3206e1e8960dc18f505c9e29.1597695880.git.gustavo.pimentel@synopsys.com Signed-off-by: Gustavo Pimentel Signed-off-by: Lorenzo Pieralisi Acked-by: Rob Herring Cc: Kishon Vijay Abraham I Cc: Lorenzo Pieralisi commit fa50e2b452c60cff9f4000de5b372a61d6695c26 Author: Ionela Voinescu Date: Tue Oct 27 18:07:13 2020 +0000 sched/topology: Condition EAS enablement on FIE support In order to make accurate predictions across CPUs and for all performance states, Energy Aware Scheduling (EAS) needs frequency-invariant load tracking signals. EAS task placement aims to minimize energy consumption, and does so in part by limiting the search space to only CPUs with the highest spare capacity (CPU capacity - CPU utilization) in their performance domain. Those candidates are the placement choices that will keep frequency at its lowest possible and therefore save the most energy. But without frequency invariance, a CPU's utilization is relative to the CPU's current performance level, and not relative to its maximum performance level, which determines its capacity. As a result, it will fail to correctly indicate any potential spare capacity obtained by an increase in a CPU's performance level. Therefore, a non-invariant utilization signal would render the EAS task placement logic invalid. Now that we properly report support for the Frequency Invariance Engine (FIE) through arch_scale_freq_invariant() for arm and arm64 systems, while also ensuring a re-evaluation of the EAS use conditions for possible invariance status change, we can assert this is the case when initializing EAS. Warn and bail out otherwise. Suggested-by: Quentin Perret Signed-off-by: Ionela Voinescu Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201027180713.7642-4-ionela.voinescu@arm.com commit ecec9e86d1a366f97c827ab4a8134ec06ccf031a Author: Ionela Voinescu Date: Tue Oct 27 18:07:12 2020 +0000 arm64: Rebuild sched domains on invariance status changes Task scheduler behavior depends on frequency invariance (FI) support and the resulting invariant load tracking signals. For example, in order to make accurate predictions across CPUs for all performance states, Energy Aware Scheduling (EAS) needs frequency-invariant load tracking signals and therefore it has a direct dependency on FI. This dependency is known, but EAS enablement is not yet conditioned on the presence of FI during the built of the scheduling domain hierarchy. Before this is done, the following must be considered: while arch_scale_freq_invariant() will see changes in FI support and could be used to condition the use of EAS, it could return different values during system initialisation. For arm64, such a scenario will happen for a system that does not support cpufreq driven FI, but does support counter-driven FI. For such a system, arch_scale_freq_invariant() will return false if called before counter based FI initialisation, but change its status to true after it. If EAS becomes explicitly dependent on FI this would affect the task scheduler behavior which builds its scheduling domain hierarchy well before the late counter-based FI init. During that process, EAS would be disabled due to its dependency on FI. Two points of future early calls to arch_scale_freq_invariant() which would determine EAS enablement are: - (1) drivers/base/arch_topology.c:126 <> rebuild_sched_domains(); This will happen after CPU capacity initialisation. - (2) kernel/sched/cpufreq_schedutil.c:917 <> rebuild_sched_domains_energy(); -->rebuild_sched_domains(); This will happen during sched_cpufreq_governor_change() for the schedutil cpufreq governor. Therefore, before enforcing the presence of FI support for the use of EAS, ensure the following: if there is a change in FI support status after counter init, use the existing rebuild_sched_domains_energy() function to trigger a rebuild of the scheduling and performance domains that in turn will determine the enablement of EAS. Signed-off-by: Ionela Voinescu Signed-off-by: Peter Zijlstra (Intel) Acked-by: Catalin Marinas Link: https://lkml.kernel.org/r/20201027180713.7642-3-ionela.voinescu@arm.com commit 31f6a8c0a471be7d7d05c93eac50fcb729e79b9d Author: Ionela Voinescu Date: Tue Oct 27 18:07:11 2020 +0000 sched/topology,schedutil: Wrap sched domains rebuild Add the rebuild_sched_domains_energy() function to wrap the functionality that rebuilds the scheduling domains if any of the Energy Aware Scheduling (EAS) initialisation conditions change. This functionality is used when schedutil is added or removed or when EAS is enabled or disabled through the sched_energy_aware sysctl. Therefore, create a single function that is used in both these cases and that can be later reused. Signed-off-by: Ionela Voinescu Signed-off-by: Peter Zijlstra (Intel) Acked-by: Quentin Perret Acked-by: Rafael J. Wysocki Link: https://lkml.kernel.org/r/20201027180713.7642-2-ionela.voinescu@arm.com commit 480a6ca2dc6ed82c783faf7e4a9644769b8397d8 Author: Dietmar Eggemann Date: Fri Nov 13 12:34:54 2020 +0100 sched/uclamp: Allow to reset a task uclamp constraint value In case the user wants to stop controlling a uclamp constraint value for a task, use the magic value -1 in sched_util_{min,max} with the appropriate sched_flags (SCHED_FLAG_UTIL_CLAMP_{MIN,MAX}) to indicate the reset. The advantage over the 'additional flag' approach (i.e. introducing SCHED_FLAG_UTIL_CLAMP_RESET) is that no additional flag has to be exported via uapi. This avoids the need to document how this new flag has be used in conjunction with the existing uclamp related flags. The following subtle issue is fixed as well. When a uclamp constraint value is set on a !user_defined uclamp_se it is currently first reset and then set. Fix this by AND'ing !user_defined with !SCHED_FLAG_UTIL_CLAMP which stands for the 'sched class change' case. The related condition 'if (uc_se->user_defined)' moved from __setscheduler_uclamp() into uclamp_reset(). Signed-off-by: Dietmar Eggemann Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Yun Hsiang Link: https://lkml.kernel.org/r/20201113113454.25868-1-dietmar.eggemann@arm.com commit b19a888c1e9bdf12e0d8dd9aeb887ca7de91c8a5 Author: Tal Zussman Date: Thu Nov 12 19:51:56 2020 -0500 sched/core: Fix typos in comments Signed-off-by: Tal Zussman Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201113005156.GA8408@charmander commit 9032dc211523f7cd5395302a0658c306249553f4 Author: Barry Song Date: Sat Nov 14 00:50:18 2020 +1300 Documentation: scheduler: fix information on arch SD flags, sched_domain and sched_debug This document seems to be out of date for many, many years. Even it has misspelled from the first day. ARCH_HASH_SCHED_TUNE should be ARCH_HAS_SCHED_TUNE ARCH_HASH_SCHED_DOMAIN should be ARCH_HAS_SCHED_DOMAIN Since v2.6.14, kernel completely deleted the relevant code and even arch_init_sched_domains() was deleted. Right now, kernel is asking architectures to call set_sched_topology() to override the default sched domains. On the other hand, to print the schedule debug information, users need to set sched_debug cmdline or enable it by sysfs entry. So this patch also adds the description for sched_debug. Signed-off-by: Barry Song Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Link: https://lkml.kernel.org/r/20201113115018.1628-1-song.bao.hua@hisilicon.com commit b5b217346de85ed1b03fdecd5c5076b34fbb2f0b Author: Valentin Schneider Date: Tue Nov 10 18:43:00 2020 +0000 sched/topology: Warn when NUMA diameter > 2 NUMA topologies where the shortest path between some two nodes requires three or more hops (i.e. diameter > 2) end up being misrepresented in the scheduler topology structures. This is currently detected when booting a kernel with CONFIG_SCHED_DEBUG=y + sched_debug on the cmdline, although this will only yield a warning about sched_group spans not matching sched_domain spans: ERROR: groups don't span domain->span Add an explicit warning for that case, triggered regardless of CONFIG_SCHED_DEBUG, and decorate it with an appropriate comment. The topology described in the comment can be booted up on QEMU by appending the following to your usual QEMU incantation: -smp cores=4 \ -numa node,cpus=0,nodeid=0 -numa node,cpus=1,nodeid=1, \ -numa node,cpus=2,nodeid=2, -numa node,cpus=3,nodeid=3, \ -numa dist,src=0,dst=1,val=20, -numa dist,src=0,dst=2,val=30, \ -numa dist,src=0,dst=3,val=40, -numa dist,src=1,dst=2,val=20, \ -numa dist,src=1,dst=3,val=30, -numa dist,src=2,dst=3,val=20 A somewhat more realistic topology (6-node mesh) with the same affliction can be conjured with: -smp cores=6 \ -numa node,cpus=0,nodeid=0 -numa node,cpus=1,nodeid=1, \ -numa node,cpus=2,nodeid=2, -numa node,cpus=3,nodeid=3, \ -numa node,cpus=4,nodeid=4, -numa node,cpus=5,nodeid=5, \ -numa dist,src=0,dst=1,val=20, -numa dist,src=0,dst=2,val=30, \ -numa dist,src=0,dst=3,val=40, -numa dist,src=0,dst=4,val=30, \ -numa dist,src=0,dst=5,val=20, \ -numa dist,src=1,dst=2,val=20, -numa dist,src=1,dst=3,val=30, \ -numa dist,src=1,dst=4,val=20, -numa dist,src=1,dst=5,val=30, \ -numa dist,src=2,dst=3,val=20, -numa dist,src=2,dst=4,val=30, \ -numa dist,src=2,dst=5,val=40, \ -numa dist,src=3,dst=4,val=20, -numa dist,src=3,dst=5,val=30, \ -numa dist,src=4,dst=5,val=20 Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Acked-by: Mel Gorman Link: https://lore.kernel.org/lkml/jhjtux5edo2.mognet@arm.com commit 406100f3da08066c00105165db8520bbc7694a36 Author: Daniel Jordan Date: Thu Nov 12 12:17:11 2020 -0500 cpuset: fix race between hotplug work and later CPU offline One of our machines keeled over trying to rebuild the scheduler domains. Mainline produces the same splat: BUG: unable to handle page fault for address: 0000607f820054db CPU: 2 PID: 149 Comm: kworker/1:1 Not tainted 5.10.0-rc1-master+ #6 Workqueue: events cpuset_hotplug_workfn RIP: build_sched_domains Call Trace: partition_sched_domains_locked rebuild_sched_domains_locked cpuset_hotplug_workfn It happens with cgroup2 and exclusive cpusets only. This reproducer triggers it on an 8-cpu vm and works most effectively with no preexisting child cgroups: cd $UNIFIED_ROOT mkdir cg1 echo 4-7 > cg1/cpuset.cpus echo root > cg1/cpuset.cpus.partition # with smt/control reading 'on', echo off > /sys/devices/system/cpu/smt/control RIP maps to sd->shared = *per_cpu_ptr(sdd->sds, sd_id); from sd_init(). sd_id is calculated earlier in the same function: cpumask_and(sched_domain_span(sd), cpu_map, tl->mask(cpu)); sd_id = cpumask_first(sched_domain_span(sd)); tl->mask(cpu), which reads cpu_sibling_map on x86, returns an empty mask and so cpumask_first() returns >= nr_cpu_ids, which leads to the bogus value from per_cpu_ptr() above. The problem is a race between cpuset_hotplug_workfn() and a later offline of CPU N. cpuset_hotplug_workfn() updates the effective masks when N is still online, the offline clears N from cpu_sibling_map, and then the worker uses the stale effective masks that still have N to generate the scheduling domains, leading the worker to read N's empty cpu_sibling_map in sd_init(). rebuild_sched_domains_locked() prevented the race during the cgroup2 cpuset series up until the Fixes commit changed its check. Make the check more robust so that it can detect an offline CPU in any exclusive cpuset's effective mask, not just the top one. Fixes: 0ccea8feb980 ("cpuset: Make generate_sched_domains() work with partition") Signed-off-by: Daniel Jordan Signed-off-by: Peter Zijlstra (Intel) Acked-by: Tejun Heo Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20201112171711.639541-1-daniel.m.jordan@oracle.com commit 1293771e4353c148d5f6908fb32d1c1cfd653e47 Author: Peter Zijlstra Date: Tue Nov 17 12:14:51 2020 +0100 sched: Fix migration_cpu_stop() WARN Oleksandr reported hitting the WARN in the 'task_rq(p) != rq' branch of migration_cpu_stop(). Valentin noted that using cpu_of(rq) in that case is just plain wrong to begin with, since per the earlier branch that isn't the actual CPU of the task. Replace both instances of is_cpu_allowed() by a direct p->cpus_mask test using task_cpu(). Reported-by: Oleksandr Natalenko Debugged-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) commit d707faa64d03d26b529cc4aea59dab1b016d4d33 Author: Valentin Schneider Date: Fri Nov 13 11:24:14 2020 +0000 sched/core: Add missing completion for affine_move_task() waiters Qian reported that some fuzzer issuing sched_setaffinity() ends up stuck on a wait_for_completion(). The problematic pattern seems to be: affine_move_task() // task_running() case stop_one_cpu(); wait_for_completion(&pending->done); Combined with, on the stopper side: migration_cpu_stop() // Task moved between unlocks and scheduling the stopper task_rq(p) != rq && // task_running() case dest_cpu >= 0 => no complete_all() This can happen with both PREEMPT and !PREEMPT, although !PREEMPT should be more likely to see this given the targeted task has a much bigger window to block and be woken up elsewhere before the stopper runs. Make migration_cpu_stop() always look at pending affinity requests; signal their completion if the stopper hits a rq mismatch but the task is still within its allowed mask. When Migrate-Disable isn't involved, this matches the previous set_cpus_allowed_ptr() vs migration_cpu_stop() behaviour. Fixes: 6d337eab041d ("sched: Fix migrate_disable() vs set_cpus_allowed_ptr()") Reported-by: Qian Cai Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/lkml/8b62fd1ad1b18def27f18e2ee2df3ff5b36d0762.camel@redhat.com commit d1f250e2205eca9f1264f8e2d3a41fcf38f92d91 Author: Frederic Weisbecker Date: Tue Nov 17 16:16:37 2020 +0100 x86: Support HAVE_CONTEXT_TRACKING_OFFSTACK A lot of ground work has been performed on x86 entry code. Fragile path between user_enter() and user_exit() have IRQs disabled. Uses of RCU and intrumentation in these fragile areas have been explicitly annotated and protected. This architecture doesn't need exception_enter()/exception_exit() anymore and has therefore earned CONFIG_HAVE_CONTEXT_TRACKING_OFFSTACK. Signed-off-by: Frederic Weisbecker Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201117151637.259084-6-frederic@kernel.org commit 6775de4984ea83ce39f19a40c09f8813d7423831 Author: Frederic Weisbecker Date: Tue Nov 17 16:16:36 2020 +0100 context_tracking: Only define schedule_user() on !HAVE_CONTEXT_TRACKING_OFFSTACK archs schedule_user() was traditionally used by the entry code's tail to preempt userspace after the call to user_enter(). Indeed the call to user_enter() used to be performed upon syscall exit slow path which was right before the last opportunity to schedule() while resuming to userspace. The context tracking state had to be saved on the task stack and set back to CONTEXT_KERNEL temporarily in order to safely switch to another task. Only a few archs use it now (namely sparc64 and powerpc64) and those implementing HAVE_CONTEXT_TRACKING_OFFSTACK definetly can't rely on it. Signed-off-by: Frederic Weisbecker Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201117151637.259084-5-frederic@kernel.org commit 9f68b5b74c48761bcbd7d90cf1426049bdbaabb7 Author: Frederic Weisbecker Date: Tue Nov 17 16:16:35 2020 +0100 sched: Detect call to schedule from critical entry code Detect calls to schedule() between user_enter() and user_exit(). Those are symptoms of early entry code that either forgot to protect a call to schedule() inside exception_enter()/exception_exit() or, in the case of HAVE_CONTEXT_TRACKING_OFFSTACK, enabled interrupts or preemption in a wrong spot. Signed-off-by: Frederic Weisbecker Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201117151637.259084-4-frederic@kernel.org commit 179a9cf79212bb3b96fb69a314583189cd863c5b Author: Frederic Weisbecker Date: Tue Nov 17 16:16:34 2020 +0100 context_tracking: Don't implement exception_enter/exit() on CONFIG_HAVE_CONTEXT_TRACKING_OFFSTACK The typical steps with context tracking are: 1) Task runs in userspace 2) Task enters the kernel (syscall/exception/IRQ) 3) Task switches from context tracking state CONTEXT_USER to CONTEXT_KERNEL (user_exit()) 4) Task does stuff in kernel 5) Task switches from context tracking state CONTEXT_KERNEL to CONTEXT_USER (user_enter()) 6) Task exits the kernel If an exception fires between 5) and 6), the pt_regs and the context tracking disagree on the context of the faulted/trapped instruction. CONTEXT_KERNEL must be set before the exception handler, that's unconditional for those handlers that want to be able to call into schedule(), but CONTEXT_USER must be restored when the exception exits whereas pt_regs tells that we are resuming to kernel space. This can't be fixed with storing the context tracking state in a per-cpu or per-task variable since another exception may fire onto the current one and overwrite the saved state. Also the task can schedule. So it has to be stored in a per task stack. This is how exception_enter()/exception_exit() paper over the problem: 5) Task switches from context tracking state CONTEXT_KERNEL to CONTEXT_USER (user_enter()) 5.1) Exception fires 5.2) prev_state = exception_enter() // save CONTEXT_USER to prev_state // and set CONTEXT_KERNEL 5.3) Exception handler 5.4) exception_enter(prev_state) // restore CONTEXT_USER 5.5) Exception resumes 6) Task exits the kernel The condition to live without exception_enter()/exception_exit() is to forbid exceptions and IRQs between 2) and 3) and between 5) and 6), or if any is allowed to trigger, it won't call into context tracking, eg: NMIs, and it won't schedule. These requirements are met by architectures supporting CONFIG_HAVE_CONTEXT_TRACKING_OFFSTACK and those can therefore afford not to implement this hack. Signed-off-by: Frederic Weisbecker Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201117151637.259084-3-frederic@kernel.org commit 83c2da2e605c73aafcc02df04b2dbf1ccbfc24c0 Author: Frederic Weisbecker Date: Tue Nov 17 16:16:33 2020 +0100 context_tracking: Introduce HAVE_CONTEXT_TRACKING_OFFSTACK Historically, context tracking had to deal with fragile entry code path, ie: before user_exit() is called and after user_enter() is called, in case some of those spots would call schedule() or use RCU. On such cases, the site had to be protected between exception_enter() and exception_exit() that save the context tracking state in the task stack. Such sleepable fragile code path had many different origins: tracing, exceptions, early or late calls to context tracking on syscalls... Aside of that not being pretty, saving the context tracking state on the task stack forces us to run context tracking on all CPUs, including housekeepers, and prevents us to completely shutdown nohz_full at runtime on a CPU in the future as context tracking and its overhead would still need to run system wide. Now thanks to the extensive efforts to sanitize x86 entry code, those conditions have been removed and we can now get rid of these workarounds in this architecture. Create a Kconfig feature to express this achievement. Signed-off-by: Frederic Weisbecker Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201117151637.259084-2-frederic@kernel.org commit aabe19b8279340c43294688b4d9527a893c60463 Author: Hui Su Date: Mon Nov 16 02:00:54 2020 +0800 nsproxy: use put_nsproxy() in switch_task_namespaces() We already have a dedicated helper that handles reference count checking so stop open-coding the reference count check in switch_task_namespaces() and use the dedicated put_nsproxy() helper instead. Take the change to fix a whitespace issue too. Signed-off-by: Hui Su [christian.brauner@ubuntu.com: expand commit message] Acked-by: Christian Brauner Link: https://lore.kernel.org/r/20201115180054.GA371317@rlk Signed-off-by: Christian Brauner commit 14132a5b807bb5caf778fe7ae1597e630971e949 Author: Jarkko Sakkinen Date: Wed Nov 18 23:39:32 2020 +0200 x86/sgx: Return -ERESTARTSYS in sgx_ioc_enclave_add_pages() Return -ERESTARTSYS instead of -EINTR in sgx_ioc_enclave_add_pages() when interrupted before any pages have been processed. At this point ioctl can be obviously safely restarted. Reported-by: Haitao Huang Signed-off-by: Jarkko Sakkinen Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201118213932.63341-1-jarkko@kernel.org commit b996544916429946bf4934c1c01a306d1690972c Author: Thomas Gleixner Date: Tue Nov 17 14:19:49 2020 +0100 tick: Get rid of tick_period The variable tick_period is initialized to NSEC_PER_TICK / HZ during boot and never updated again. If NSEC_PER_TICK is not an integer multiple of HZ this computation is less accurate than TICK_NSEC which has proper rounding in place. Aside of the inaccuracy there is no reason for having this variable at all. It's just a pointless indirection and all usage sites can just use the TICK_NSEC constant. Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201117132006.766643526@linutronix.de commit 896b969e6732b68ee3c12ae4e1aeddf5db99bc46 Author: Yunfeng Ye Date: Tue Nov 17 14:19:48 2020 +0100 tick/sched: Release seqcount before invoking calc_load_global() calc_load_global() does not need the sequence count protection. [ tglx: Split it up properly and added comments ] Signed-off-by: Yunfeng Ye Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201117132006.660902274@linutronix.de commit 7a35bf2a6a871cd0252cd371d741e7d070b53af9 Author: Thomas Gleixner Date: Tue Nov 17 14:19:47 2020 +0100 tick/sched: Optimize tick_do_update_jiffies64() further Now that it's clear that there is always one tick to account, simplify the calculations some more. Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201117132006.565663056@linutronix.de commit 94ad2e3cedb82af034f6d97c58022f162b669f9b Author: Yunfeng Ye Date: Tue Nov 17 14:19:46 2020 +0100 tick/sched: Reduce seqcount held scope in tick_do_update_jiffies64() If jiffies are up to date already (caller lost the race against another CPU) there is no point to change the sequence count. Doing that just forces other CPUs into the seqcount retry loop in tick_nohz_next_event() for nothing. Just bail out early. [ tglx: Rewrote most of it ] Signed-off-by: Yunfeng Ye Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201117132006.462195901@linutronix.de commit 372acbbaa80940189593f9d69c7c069955f24f7a Author: Thomas Gleixner Date: Tue Nov 17 14:19:45 2020 +0100 tick/sched: Use tick_next_period for lockless quick check No point in doing calculations. tick_next_period = last_jiffies_update + tick_period Just check whether now is before tick_next_period to figure out whether jiffies need an update. Add a comment why the intentional data race in the quick check is safe or not so safe in a 32bit corner case and why we don't worry about it. Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201117132006.337366695@linutronix.de commit c398960cd82b233886fbff163986f998b5a5c008 Author: Thomas Gleixner Date: Tue Nov 17 14:19:44 2020 +0100 tick: Document protections for tick related data The protection rules for tick_next_period and last_jiffies_update are blury at best. Clarify this. Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201117132006.197713794@linutronix.de commit f73f64d5687192bc8eb7f3d9521ca6256b79f224 Author: Thomas Gleixner Date: Tue Nov 17 14:19:43 2020 +0100 tick/broadcast: Serialize access to tick_next_period tick_broadcast_setup_oneshot() accesses tick_next_period twice without any serialization. This is wrong in two aspects: - Reading it twice might make the broadcast data inconsistent if the variable is updated concurrently. - On 32bit systems the access might see an partial update Protect it with jiffies_lock. That's safe as none of the callchains leading up to this function can create a lock ordering violation: timer interrupt run_local_timers() hrtimer_run_queues() hrtimer_switch_to_hres() tick_init_highres() tick_switch_to_oneshot() tick_broadcast_switch_to_oneshot() or tick_check_oneshot_change() tick_nohz_switch_to_nohz() tick_switch_to_oneshot() tick_broadcast_switch_to_oneshot() Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201117132006.061341507@linutronix.de commit b023fd5f741f34d2cd90258ccc3f245924d2eadd Author: Borislav Petkov Date: Wed Nov 18 13:34:07 2020 +0100 x86/msr: Downgrade unrecognized MSR message It is a warning and not an error so use pr_warn(). Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201118123806.19672-1-bp@alien8.de commit 2e023b938048c9857af09b96ce672e9a31dbfb38 Author: Tang Bin Date: Thu Sep 10 19:06:40 2020 +0800 ARM: OMAP1: clock: Use IS_ERR_OR_NULL() to clean code Use IS_ERR_OR_NULL() to make the code cleaner. Signed-off-by: Zhang Shengju Signed-off-by: Tang Bin Signed-off-by: Tony Lindgren commit e106698cbb901d9b74dea4c9a3b5a7e6598ae481 Author: Xu Wang Date: Wed Nov 4 06:45:05 2020 +0000 ARM: OMAP2+: Remove redundant null check before clk_prepare_enable/clk_disable_unprepare Because clk_prepare_enable() and clk_disable_unprepare() already checked NULL clock parameter, so the additional checks are unnecessary, just remove them. Signed-off-by: Xu Wang Signed-off-by: Tony Lindgren commit 6d9be9376b0e29211b6e6c1775ba6f81fb6c4ea5 Author: Jing Xiangfeng Date: Sat Sep 19 11:43:31 2020 +0800 ARM: OMAP2+: Remove redundant assignment to variable ret The variable ret has been initialized with '-ENOMEM'. The assignment in the if branch is redundant. So remove it. Signed-off-by: Jing Xiangfeng Signed-off-by: Tony Lindgren commit c3f244d5776ecd236657fc1c4b7c5d1d4d01ca7e Author: Youling Tang Date: Sat Nov 14 12:07:20 2020 +0800 ARM: OMAP2+: Fix kfree NULL pointer in omap2xxx_clkt_vps_init The returns pointer is NULL when kzalloc fails to apply for space, so fix kfree NULL pointer. Signed-off-by: Youling Tang Signed-off-by: Tony Lindgren commit 3c5902d270edb6ccc3049acfe5d3e96653c87dcd Author: Youling Tang Date: Sat Nov 14 12:06:58 2020 +0800 ARM: OMAP2+: Fix memleak in omap2xxx_clkt_vps_init If the clk_register fails, we should free hw before function returns to prevent memleak. Signed-off-by: Youling Tang Signed-off-by: Tony Lindgren commit 295992fb815e791d14b18ef7cdbbaf1a76211a31 Author: Christian König Date: Mon Sep 14 15:09:33 2020 +0200 mm: introduce vma_set_file function v5 Add the new vma_set_file() function to allow changing vma->vm_file with the necessary refcount dance. v2: add more users of this. v3: add missing EXPORT_SYMBOL, rebase on mmap cleanup, add comments why we drop the reference on two occasions. v4: make it clear that changing an anonymous vma is illegal. v5: move vma_set_file to mm/util.c Signed-off-by: Christian König Reviewed-by: Daniel Vetter (v2) Reviewed-by: Jason Gunthorpe Acked-by: Andrew Morton Link: https://patchwork.freedesktop.org/patch/399360/ commit 1527f926fd04490f648c42f42b45218a04754f87 Author: Christian König Date: Fri Oct 9 15:08:55 2020 +0200 mm: mmap: fix fput in error path v2 Patch "495c10cc1c0c CHROMIUM: dma-buf: restore args..." adds a workaround for a bug in mmap_region. As the comment states ->mmap() callback can change vma->vm_file and so we might call fput() on the wrong file. Revert the workaround and proper fix this in mmap_region. v2: drop the extra if in dma_buf_mmap as well Signed-off-by: Christian König Reviewed-by: Jason Gunthorpe Acked-by: Andrew Morton Link: https://patchwork.freedesktop.org/patch/399359/ commit 14639a22de657eabbb776f503a816594393cc935 Author: Tony Lindgren Date: Wed Nov 11 19:06:13 2020 +0200 mfd: cpcap: Fix interrupt regression with regmap clear_ack With commit 3a6f0fb7b8eb ("regmap: irq: Add support to clear ack registers"), the cpcap interrupts are no longer getting acked properly leading to a very unresponsive device with CPUs fully loaded spinning in the threaded IRQ handlers. To me it looks like the clear_ack commit above actually fixed a long standing bug in regmap_irq_thread() where we unconditionally acked the interrupts earlier without considering ack_invert. And the issue with cpcap started happening as we now also consider ack_invert. Tim Harvey tried to fix this issue earlier with "[PATCH v2] regmap: irq: fix ack-invert", but the reading of the ack register was considered unnecessary for just ack_invert, and we did not have clear_ack available yet. As the cpcap irqs worked both with and without ack_invert earlier because of the unconditional ack, the problem remained hidden until now. Also, looks like the earlier v3.0.8 based Motorola Android Linux kernel does clear_ack style read-clear-write with "ireg_val & ~mreg_val" instead of just ack_invert style write. So let's switch cpcap to use clear_ack to fix the issue. Fixes: 3a6f0fb7b8eb ("regmap: irq: Add support to clear ack registers") Cc: Carl Philipp Klemm Cc: Laxminath Kasam Cc: Merlijn Wajer Cc: Mark Brown Cc: Pavel Machek Cc: Sebastian Reichel Cc: Tim Harvey Signed-off-by: Tony Lindgren Tested-by: Pavel Machek Reviewed-By: Tim Harvey Signed-off-by: Lee Jones commit d75846ed08e6f4135ec73778575c34d9c0ace993 Author: Amelie Delaunay Date: Fri Nov 13 13:27:25 2020 +0100 mfd: stmfx: Fix dev_err_probe() call in stmfx_chip_init() 'ret' may be 0 so, dev_err_probe() should be called only when 'ret' is an error code. Fixes: 41c9c06c491a ("mfd: stmfx: Simplify with dev_err_probe()") Signed-off-by: Amelie Delaunay Signed-off-by: Lee Jones commit de1292817cf736c04fab31903a6aa9d9ffe60b79 Author: Geert Uytterhoeven Date: Tue Nov 10 16:57:27 2020 +0100 mfd: MFD_SL28CPLD should depend on ARCH_LAYERSCAPE Currently the Kontron sl28cpld Board Management Controller is found only on Kontron boards equipped with a Freescale Layerscape SoC. Hence add a dependency on ARCH_LAYERSCAPE, to prevent asking the user about a driver for this controller when configuring a kernel without Layerscape support. Fixes: a538ad229bbee4f8 ("mfd: simple-mfd-i2c: Add sl28cpld support") Signed-off-by: Geert Uytterhoeven Acked-by: Michael Walle Signed-off-by: Lee Jones commit 4556fe8f16e0225f5df7a57d123e0d55717bf2aa Author: Michael Srba Date: Tue Nov 10 14:00:47 2020 +0100 mfd: rt5033: Fix errorneous defines Fix regulators on rt5033 by converting some values to bitmasks which were errorneously not defined as such in the header file. Cc: Beomho Seo Fixes: 0b271258544b ("mfd: rt5033: Add Richtek RT5033 driver core.") Signed-off-by: Michael Srba Signed-off-by: Lee Jones commit 15ad304878f7412e8c8c5dd50533bc725948c641 Author: Johan Jonker Date: Sat Nov 7 18:00:59 2020 +0100 dt-binding: mfd: syscon: add Rockchip QoS register compatibles With the conversion of syscon.yaml minItems for compatibles was set to 2. Current Rockchip dtsi files only use "syscon" for QoS registers. Add Rockchip QoS compatibles to reduce notifications produced with: make ARCH=arm dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/mfd/syscon.yaml make ARCH=arm64 dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/mfd/syscon.yaml Signed-off-by: Johan Jonker Reviewed-by: Rob Herring Signed-off-by: Lee Jones commit 9a463284706c5217872c3cadaca863d47129bd95 Author: Jing Xiangfeng Date: Fri Nov 6 15:43:46 2020 +0800 mfd: htc-i2cpld: Add the missed i2c_put_adapter() in htcpld_register_chip_i2c() htcpld_register_chip_i2c() misses to call i2c_put_adapter() in an error path. Add the missed function call to fix it. Fixes: 6048a3dd2371 ("mfd: Add HTCPLD driver") Signed-off-by: Jing Xiangfeng Signed-off-by: Lee Jones commit 4c5840b909f3a12fc5f1275024d0cff6fd23235f Author: Codrin Ciubotariu Date: Tue Nov 3 11:32:46 2020 +0200 mfd: at91-usart: Do not use compatible to register child devices There are no separate serial/SPI devices under the at91-usart MFD, but actually the MFD is used as a serial or a SPI device. There are no DT sub-nodes for the MFD children, so we should use platform device API to register the drivers. Suggested-by: Lee Jones Signed-off-by: Codrin Ciubotariu Signed-off-by: Lee Jones commit a233d4ebfc6f5b83ca576331090189686ae22118 Author: Michał Mirosław Date: Sun Sep 27 01:59:15 2020 +0200 gpio: tps65910: use regmap accessors Use regmap accessors directly for register manipulation - removing one layer of abstraction. Signed-off-by: Michał Mirosław Acked-by: Bartosz Golaszewski Acked-by: Linus Walleij Signed-off-by: Lee Jones commit f594d01bb4aff35dc582f5418e6823f79e28834b Author: Charles Keepax Date: Tue Oct 27 09:41:32 2020 +0000 mfd: madera: Add special errata reset handling for cs47l15 An errata exists for cs47l15 where the reset must be handled differently and removed before DCVDD is applied. A soft reset is used for situations where a reset is required to reset state. This does however, make this part unsuitable for DCVDD supplies with a rise time greater than 2mS. Signed-off-by: Charles Keepax Signed-off-by: Lee Jones commit 1cd7b935d298c6497581f86c3f74d2d2be54f294 Author: Charles Keepax Date: Tue Oct 27 09:41:31 2020 +0000 mfd: madera: Add reset as part of resume The DCVDD supply does not always power down when the CODEC enters suspend, for example shared regulators or always-on regulators. In these cases if a register is written back to the default value whilst the CODEC is in suspend that register will retain the previous value. As DCVDD never powered down, the register retains its old value and as the cache sync only synchronises registers that differ from the default the new value is never written out. Ensure the registers are in the expected state after suspend by always resetting the CODEC on resume. This also has the benefit of being recommended by the datasheet for DCVDD supplies that take longer than 2mS to rise. Signed-off-by: Charles Keepax Signed-off-by: Lee Jones commit 21ca0f5b5c04f10c12aa977b04e6bbdbed2196ca Author: Krzysztof Kozlowski Date: Thu Sep 17 21:37:54 2020 +0200 dt-bindings: mfd: rohm,bd71837-pmic: Add common properties Add common properties appearing in DTSes (clock-names, clock-output-names) with the common values (actually used in DTSes) to fix dtbs_check warnings like: arch/arm64/boot/dts/freescale/imx8mq-librem5-r2.dt.yaml: pmic@4b: 'clock-names', 'clock-output-names', do not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Acked-By: Matti Vaittinen Reviewed-by: Rob Herring Signed-off-by: Lee Jones commit 4f2785939fe058455426ebfcbe6f568aec97d8ac Author: Lee Jones Date: Wed Nov 4 14:49:05 2020 +0000 mfd: tps65910: Fix a bunch of alignment issues reported-by Checkpatch CHECK: Alignment should match open parenthesis #24: FILE: drivers/mfd/tps65910.c:296: + ret = regmap_clear_bits(tps65910->regmap, TPS65910_DEVCTRL, DEVCTRL_CK32K_CTRL_MASK); CHECK: Alignment should match open parenthesis #33: FILE: drivers/mfd/tps65910.c:318: + ret = regmap_set_bits(tps65910->regmap, TPS65910_DEVCTRL, DEVCTRL_DEV_SLP_MASK); CHECK: Alignment should match open parenthesis #42: FILE: drivers/mfd/tps65910.c:326: + ret = regmap_set_bits(tps65910->regmap, TPS65910_SLEEP_KEEP_RES_ON, CHECK: Alignment should match open parenthesis #51: FILE: drivers/mfd/tps65910.c:336: + ret = regmap_set_bits(tps65910->regmap, TPS65910_SLEEP_KEEP_RES_ON, CHECK: Alignment should match open parenthesis #60: FILE: drivers/mfd/tps65910.c:346: + ret = regmap_set_bits(tps65910->regmap, TPS65910_SLEEP_KEEP_RES_ON, CHECK: Alignment should match open parenthesis #69: FILE: drivers/mfd/tps65910.c:358: + regmap_clear_bits(tps65910->regmap, TPS65910_DEVCTRL, DEVCTRL_DEV_SLP_MASK); CHECK: Alignment should match open parenthesis #78: FILE: drivers/mfd/tps65910.c:440: + if (regmap_set_bits(tps65910->regmap, TPS65910_DEVCTRL, DEVCTRL_PWR_OFF_MASK) < 0) CHECK: Alignment should match open parenthesis #83: FILE: drivers/mfd/tps65910.c:444: + regmap_clear_bits(tps65910->regmap, TPS65910_DEVCTRL, DEVCTRL_DEV_ON_MASK); Signed-off-by: Lee Jones commit 9f5b98f3f4149a10c315ddb4d0bed033f398e8ec Author: Michał Mirosław Date: Sun Sep 27 01:59:18 2020 +0200 mfd: tps65910: Remove unused pointers Client pointers in tps65910 data are not used in the drivers. Remove those fields. Signed-off-by: Michał Mirosław Signed-off-by: Lee Jones commit 28faad777c2d1480dfdda6697e58c06cf9011ebc Author: Michał Mirosław Date: Sun Sep 27 01:59:17 2020 +0200 mfd: tps65910: Clean up after switching to regmap Remove wrappers around regmap calls to remove now-useless indirection. Signed-off-by: Michał Mirosław Signed-off-by: Lee Jones commit da7d203f46c00cfb6070be7fbf3cfce4e2c88135 Author: Michał Mirosław Date: Sun Sep 27 01:59:17 2020 +0200 mfd: tps65911-comparator: Use regmap accessors Use regmap accessors directly for register manipulation - removing one layer of abstraction. Signed-off-by: Michał Mirosław Signed-off-by: Lee Jones commit a4b9be29f4bfc391da2eafc1a2cbc96b6774ab79 Author: AngeloGioacchino Del Regno Date: Sat Sep 26 14:55:48 2020 +0200 mfd: qcom-spmi-pmic: Add support for PM660/PM660L Add the subtype and compatible strings for PM660 and PM660L, found in various SoCs, including SDM630, SDM636, SDM660 and SDA variants. Signed-off-by: AngeloGioacchino Del Regno Signed-off-by: Lee Jones commit 68a90a6c6443b07036ae4a878f6d85bf141471fd Author: Richard Fitzgerald Date: Fri Sep 25 10:14:46 2020 +0100 mfd: madera: Delete register field xxx_WIDTH defines The register field xxx_WIDTH defines are not used in current code. Signed-off-by: Richard Fitzgerald Signed-off-by: Lee Jones commit c4a164f41554d2899bed94bdcc499263f41787b4 Author: Rikard Falkeborn Date: Tue Sep 22 21:26:59 2020 +0200 mfd: Constify static struct resources Constify a number of static struct resource. The only usage of the structs are to assign their address to the resources field in the mfd_cell struct. This allows the compiler to put them in read-only memory. Done with the help of Coccinelle. Signed-off-by: Rikard Falkeborn Signed-off-by: Lee Jones commit 4bdcbbb9a3a840a4b8105fd971dda319389a593f Author: Rikard Falkeborn Date: Tue Sep 22 21:26:58 2020 +0200 mfd: sun4i-gpadc: Constify static struct resource Constify adc_resources[]. The only usage is to assign its address to the resources field of the mfd_cell struct. This allows the compiler to put it in read-only memory. Done with the help of Coccinelle. Signed-off-by: Rikard Falkeborn Signed-off-by: Lee Jones commit 8d7b3a6dac4eae22c58b0853696cbd256966741b Author: Rikard Falkeborn Date: Tue Sep 22 21:26:57 2020 +0200 mfd: stmpe: Constify static struct resource Constify a couple of static struct resource. The only usage of the structs is to assign their address to the resources field in the mfd_cell struct. This allows the compiler to put them in read-only memory. Done with the help of Coccinelle. Signed-off-by: Rikard Falkeborn Signed-off-by: Lee Jones commit 5a1acf2b9308ee1c9496567b2e92eca2265777ce Author: Rikard Falkeborn Date: Tue Sep 22 21:26:56 2020 +0200 mfd: lp8788: Constify static struct resource Constify a couple of static struct resource. The only usage of the structs is to assign their address to the resources field in the mfd_cell struct. This allows the compiler to put them in read-only memory. Done with the help of Coccinelle. Signed-off-by: Rikard Falkeborn Signed-off-by: Lee Jones commit f977284ad22fdb5f5114b2833f3b65d7603582ed Author: Rikard Falkeborn Date: Tue Sep 22 21:26:55 2020 +0200 mfd: wm8xxx-core: Constify static struct resource Constify a number of static struct resource. The only usage of the structs are to assign their address to the resources field in the mfd_cell struct. This allows the compiler to put them in read-only memory. Done with the help of Coccinelle. Signed-off-by: Rikard Falkeborn Acked-by: Charles Keepax Signed-off-by: Lee Jones commit 0aefed0eb805b09899ad37c9603f33a72903ae20 Author: Rikard Falkeborn Date: Tue Sep 22 21:26:54 2020 +0200 mfd: tps65xxx: Constify static struct resource in OMAP2+ drivers Constify a number of static struct resource. The only usage of the structs are to assign their address to the resources field in the mfd_cell struct. This allows the compiler to put them in read-only memory. Done with the help of Coccinelle. Signed-off-by: Rikard Falkeborn Signed-off-by: Lee Jones commit bf4cceb6e00915556cff80cfe70070e3dbbc14f1 Author: Rikard Falkeborn Date: Tue Sep 22 21:26:53 2020 +0200 mfd: intel: Constify static struct resource Constify a number of static struct resource. The only usage of the structs are to assign their address to the resources field in the mfd_cell struct. This allows the compiler to put them in read-only memory. Done with the help of Coccinelle. Signed-off-by: Rikard Falkeborn Reviewed-by: Andy Shevchenko Signed-off-by: Lee Jones commit a0fa0abeb508360bea82a84ce83aea49769641d3 Author: Rikard Falkeborn Date: Tue Sep 22 21:26:52 2020 +0200 mfd: da9xxx-core: Constify static struct resource Constify a number of static struct resource. The only usage of the structs are to assign their address to the resources field in the mfd_cell struct. This allows the compiler to put them in read-only memory. Done with the help of Coccinelle. Signed-off-by: Rikard Falkeborn Acked-by: Adam Thomson Signed-off-by: Lee Jones commit f8d86e2998e91d5a9f62b4934445d1ecadd00b30 Merge: 5ef9998c96b0c 86b9d170da98b Author: Lee Jones Date: Thu Nov 19 08:33:45 2020 +0000 Merge branch 'ib-mfd-mediatek-5.11' into ibs-for-mfd-merged commit 86b9d170da98bae13b307d621638954aef645331 Author: Enric Balletbo i Serra Date: Tue Nov 10 17:13:37 2020 +0100 mfd: syscon: Add syscon_regmap_lookup_by_phandle_optional() function. This adds syscon_regmap_lookup_by_phandle_optional() function to get an optional regmap. It behaves the same as syscon_regmap_lookup_by_phandle() except where there is no regmap phandle. In this case, instead of returning -ENODEV, the function returns NULL. This makes error checking simpler when the regmap phandle is optional. Suggested-by: Nicolas Boichat Signed-off-by: Enric Balletbo i Serra Reviewed-by: Matthias Brugger Reviewed-by: Arnd Bergmann Signed-off-by: Lee Jones commit 30df385e35a48f773b85117fc490152c2395e45b Author: Alexandru Ardelean Date: Wed Nov 18 22:55:39 2020 -0800 Input: adp5589-keys - use devm_add_action_or_reset() for register clear The driver clears the general configuration register during the remove() hook. This should also be done in case the driver exits on error. This change move the clear of that register to the devm_add_action_or_reset() hook. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201112074308.71351-6-alexandru.ardelean@analog.com Signed-off-by: Dmitry Torokhov commit 74f2c59324a3cb0e69937c2289a13f36231a6f3e Author: Alexandru Ardelean Date: Wed Nov 18 22:50:02 2020 -0800 Input: adp5589-keys - use devm_gpiochip_add_data() for gpios This change makes use of the devm_gpiochip_add_data() function. With this the gpiochip_remove() function can be removed, and the adp5589_gpio_remove() function as well. The kpad->export_gpio variable is also redundant now, and has been removed. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201112074308.71351-5-alexandru.ardelean@analog.com Signed-off-by: Dmitry Torokhov commit 3b95bc57c86b064fd140ccec3642ad14f40b687f Author: Alexandru Ardelean Date: Wed Nov 18 22:49:27 2020 -0800 Input: adp5589-keys - remove setup/teardown hooks for gpios This is currently just dead code. It's from around a time when platform-data was used, and a board could hook it's own special callback for setup/teardown, and a private object (via 'context'). This change removes it, as there are no more users in mainline for this. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201112074308.71351-4-alexandru.ardelean@analog.com Signed-off-by: Dmitry Torokhov commit 760a1219ff264c4bb68ae561bf4d5eea5daac8dc Author: Alexandru Ardelean Date: Wed Nov 18 22:41:46 2020 -0800 Input: adp5589-keys - use device-managed function in adp5589_keypad_add() This change makes use of the devm_input_allocate_device() function, which gets rid of the input_free_device() and input_unregister_device() calls. When a device is allocated via input_allocate_device(), the input_register_device() call will also be device-managed, so there is no longer need to manually call unregister. Also, the irq is allocated with the devm_request_threaded_irq(), so with these two changes, the adp5589_keypad_remove() function is no longer needed. This cleans up the error & exit paths. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201112074308.71351-3-alexandru.ardelean@analog.com Signed-off-by: Dmitry Torokhov commit 41d7d26b8fb26e7e8056c1a3b6cf358d40cb367a Author: Alexandru Ardelean Date: Wed Nov 18 22:40:22 2020 -0800 Input: adp5589-keys - use devm_kzalloc() to allocate the kpad object This removes the need to manually free the kpad object and cleans up some exit/error paths. The error path cleanup should reduce the risk of any memory leaks with this object. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201112074308.71351-2-alexandru.ardelean@analog.com Signed-off-by: Dmitry Torokhov commit 14579c76f5ca35dbf119685994aa0a5c5a0d9630 Author: Lancelot Kao Date: Mon Nov 16 17:21:27 2020 -0600 ARM: dts: nuvoton: Add Fii Kudo system Add device tree for the Kudo BMC. Kudo is an Ampere (Altra) server platform manufactured by Fii and is based on a Nuvoton NPCM730 SoC. Signed-off-by: Mustatfa Shehabi Signed-off-by: Mohaimen alsmarai Signed-off-by: Lancelot Kao Reviewed-by: Vivekanand Veeracholan Reviewed-by: Benjamin Fair Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20201116232127.7066-1-lancelot.kao@fii-usa.com Signed-off-by: Joel Stanley commit 0e0610d24ee6e661dab5696197f2e68a9b29cd67 Author: Tomer Maimon Date: Wed Sep 25 15:26:38 2019 +0300 ARM: dts: nuvoton: Add NPCM7xx RunBMC Olympus Quanta machine Add Nuvoton NPCM7xx RunBMC Olympus Quanta board device tree. Signed-off-by: Tomer Maimon Signed-off-by: Joel Stanley commit 59f5abe09f0a7a20be45003706fa1b0d1a916690 Author: Fran Hsu Date: Fri May 31 21:24:39 2019 +0800 ARM: dts: nuvoton: Add Quanta GSJ BMC The Quanta GSJ BMC uses the Nuvoton NPCM730 SoC. Included features: 1. Image partitions 2. PWM fan controller 3. USB device 4. Serial port 5. FIU 6. LEDs and GPIOs Signed-off-by: Fran Hsu Reviewed-by: Benjamin Fair Signed-off-by: Joel Stanley commit c2a983a7a8861e4d6bfd923ea84c919fd9d5261c Author: Fran Hsu Date: Fri May 31 21:24:38 2019 +0800 ARM: dts: nuvoton: Add Quanta GSJ BMC pinctrl Add pinctrl definition for the Quanta GSJ BMC machine. Signed-off-by: Fran Hsu Reviewed-by: Benjamin Fair Signed-off-by: Joel Stanley commit 136b2124d7cbc03a3b8fb88336f6bc1ba75b412f Author: Tomer Maimon Date: Wed Nov 18 12:03:58 2020 +0200 ARM: dts: nuvoton: Add Nuvoton NPCM730 device tree The Nuvoton NPCN730 SoC is a part of the Nuvoton NPCM7xx SoCs family. Signed-off-by: Tomer Maimon Signed-off-by: Joel Stanley commit 36a94760c98954e50ea621f7a9603fee3621deb7 Author: Rafał Miłecki Date: Fri Nov 13 12:34:23 2020 +0100 phy: phy-bcm-ns-usb3: drop support for deprecated DT binding Initially this PHY driver was implementing MDIO access on its own. It was caused by lack of proper hardware design understanding. It has been changed back in 2017. DT bindings were changed and driver was updated to use MDIO layer. It should be really safe now to drop the old deprecated code. All Linux stored DT files don't use it for 3,5 year. There is close to 0 chance there is any bootloader with its own DTB using old the binding. Signed-off-by: Rafał Miłecki Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20201113113423.9466-1-zajec5@gmail.com Signed-off-by: Vinod Koul commit 7af8109efad54ee015626e5dcac133a6f4e473da Author: Yangtao Li Date: Tue Nov 10 14:32:21 2020 +0800 phy: sun4i-usb: remove enable_pmu_unk1 from sun50i_h6_cfg For the current code, enable_pmu_unk1 only works in non-a83t and non-h6 types. So let's delete it from the sun50i_h6_cfg. Signed-off-by: Yangtao Li Link: https://lore.kernel.org/r/dc8cbb7b3cd59902a6719f207d18a232903fac8a.1604988979.git.frank@allwinnertech.com Signed-off-by: Vinod Koul commit 0bd4b96d99108b7ea9bac0573957483be7781d70 Author: David Hildenbrand Date: Wed Nov 11 15:53:22 2020 +0100 powernv/memtrace: don't abuse memory hot(un)plug infrastructure for memory allocations Let's use alloc_contig_pages() for allocating memory and remove the linear mapping manually via arch_remove_linear_mapping(). Mark all pages PG_offline, such that they will definitely not get touched - e.g., when hibernating. When freeing memory, try to revert what we did. The original idea was discussed in: https://lkml.kernel.org/r/48340e96-7e6b-736f-9e23-d3111b915b6e@redhat.com This is similar to CONFIG_DEBUG_PAGEALLOC handling on other architectures, whereby only single pages are unmapped from the linear mapping. Let's mimic what memory hot(un)plug would do with the linear mapping. We now need MEMORY_HOTPLUG and CONTIG_ALLOC as dependencies. Add a TODO that we want to use __GFP_ZERO for clearing once alloc_contig_pages() understands that. Tested with in QEMU/TCG with 10 GiB of main memory: [root@localhost ~]# echo 0x40000000 > /sys/kernel/debug/powerpc/memtrace/enable [ 105.903043][ T1080] memtrace: Allocated trace memory on node 0 at 0x0000000080000000 [root@localhost ~]# echo 0x40000000 > /sys/kernel/debug/powerpc/memtrace/enable [ 145.042493][ T1080] radix-mmu: Mapped 0x0000000080000000-0x00000000c0000000 with 64.0 KiB pages [ 145.049019][ T1080] memtrace: Freed trace memory back on node 0 [ 145.333960][ T1080] memtrace: Allocated trace memory on node 0 at 0x0000000080000000 [root@localhost ~]# echo 0x80000000 > /sys/kernel/debug/powerpc/memtrace/enable [ 213.606916][ T1080] radix-mmu: Mapped 0x0000000080000000-0x00000000c0000000 with 64.0 KiB pages [ 213.613855][ T1080] memtrace: Freed trace memory back on node 0 [ 214.185094][ T1080] memtrace: Allocated trace memory on node 0 at 0x0000000080000000 [root@localhost ~]# echo 0x100000000 > /sys/kernel/debug/powerpc/memtrace/enable [ 234.874872][ T1080] radix-mmu: Mapped 0x0000000080000000-0x0000000100000000 with 64.0 KiB pages [ 234.886974][ T1080] memtrace: Freed trace memory back on node 0 [ 234.890153][ T1080] memtrace: Failed to allocate trace memory on node 0 [root@localhost ~]# echo 0x40000000 > /sys/kernel/debug/powerpc/memtrace/enable [ 259.490196][ T1080] memtrace: Allocated trace memory on node 0 at 0x0000000080000000 I also made sure allocated memory is properly zeroed. Note 1: We currently won't be allocating from ZONE_MOVABLE - because our pages are not movable. However, as we don't run with any memory hot(un)plug mechanism around, we could make an exception to increase the chance of allocations succeeding. Note 2: PG_reserved isn't sufficient. E.g., kernel_page_present() used along PG_reserved in hibernation code will always return "true" on powerpc, resulting in the pages getting touched. It's too generic - e.g., indicates boot allocations. Note 3: For now, we keep using memory_block_size_bytes() as minimum granularity. Suggested-by: Michal Hocko Signed-off-by: David Hildenbrand Reviewed-by: Oscar Salvador Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201111145322.15793-9-david@redhat.com commit ca2c36cae9d48b180ea51259e35ab3d95d327df2 Author: David Hildenbrand Date: Wed Nov 11 15:53:21 2020 +0100 powerpc/mm: remove linear mapping if __add_pages() fails in arch_add_memory() Let's revert what we did in case something goes wrong and we return an error - as already done on arm64 and s390x. Signed-off-by: David Hildenbrand Reviewed-by: Oscar Salvador Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201111145322.15793-8-david@redhat.com commit d8bd9a121c2f2bc8b36da930dc91b69fd2a705e2 Author: David Hildenbrand Date: Wed Nov 11 15:53:20 2020 +0100 powerpc/book3s64/hash: Drop WARN_ON in hash__remove_section_mapping() The single caller (arch_remove_linear_mapping()) prints a proper warning when this function fails. No need to eventually crash the kernel - let's drop this WARN_ON. Suggested-by: Oscar Salvador Signed-off-by: David Hildenbrand Reviewed-by: Oscar Salvador Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201111145322.15793-7-david@redhat.com commit 1f73ad3e8d755dbec52fcec98618a7ce4de12af2 Author: David Hildenbrand Date: Wed Nov 11 15:53:19 2020 +0100 powerpc/mm: print warning in arch_remove_linear_mapping() Let's print a warning similar to in arch_add_linear_mapping() instead of WARN_ON_ONCE() and eventually crashing the kernel. Signed-off-by: David Hildenbrand Reviewed-by: Oscar Salvador Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201111145322.15793-6-david@redhat.com commit e5b2af044f31bf18defa557a8cd11c23caefa34c Author: David Hildenbrand Date: Wed Nov 11 15:53:18 2020 +0100 powerpc/mm: protect linear mapping modifications by a mutex This code currently relies on mem_hotplug_begin()/mem_hotplug_done() - create_section_mapping()/remove_section_mapping() implementations cannot tollerate getting called concurrently. Let's prepare for callers (memtrace) not holding any such locks (and don't force them to mess with memory hotplug locks). Other parts in these functions don't seem to rely on external locking. Signed-off-by: David Hildenbrand Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201111145322.15793-5-david@redhat.com commit 4abb1e5b63ac3281275315fc6b0cde0b9c2e2e42 Author: David Hildenbrand Date: Wed Nov 11 15:53:17 2020 +0100 powerpc/mm: factor out creating/removing linear mapping We want to stop abusing memory hotplug infrastructure in memtrace code to perform allocations and remove the linear mapping. Instead we will use alloc_contig_pages() and remove the linear mapping manually. Let's factor out creating/removing the linear mapping into arch_create_linear_mapping() / arch_remove_linear_mapping() - so in the future, we might be able to have whole arch_add_memory() / arch_remove_memory() be implemented in common code. Signed-off-by: David Hildenbrand Reviewed-by: Oscar Salvador Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201111145322.15793-4-david@redhat.com commit d6718941a2767fb383e105d257d2105fe4f15f0e Author: David Hildenbrand Date: Wed Nov 11 15:53:16 2020 +0100 powerpc/powernv/memtrace: Fix crashing the kernel when enabling concurrently It's very easy to crash the kernel right now by simply trying to enable memtrace concurrently, hammering on the "enable" interface loop.sh: #!/bin/bash dmesg --console-off while true; do echo 0x40000000 > /sys/kernel/debug/powerpc/memtrace/enable done [root@localhost ~]# loop.sh & [root@localhost ~]# loop.sh & Resulting quickly in a kernel crash. Let's properly protect using a mutex. Fixes: 9d5171a8f248 ("powerpc/powernv: Enable removal of memory for in memory tracing") Cc: stable@vger.kernel.org# v4.14+ Signed-off-by: David Hildenbrand Reviewed-by: Oscar Salvador Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201111145322.15793-3-david@redhat.com commit c74cf7a3d59a21b290fe0468f5b470d0b8ee37df Author: David Hildenbrand Date: Wed Nov 11 15:53:15 2020 +0100 powerpc/powernv/memtrace: Don't leak kernel memory to user space We currently leak kernel memory to user space, because memory offlining doesn't do any implicit clearing of memory and we are missing explicit clearing of memory. Let's keep it simple and clear pages before removing the linear mapping. Reproduced in QEMU/TCG with 10 GiB of main memory: [root@localhost ~]# dd obs=9G if=/dev/urandom of=/dev/null [... wait until "free -m" used counter no longer changes and cancel] 19665802+0 records in 1+0 records out 9663676416 bytes (9.7 GB, 9.0 GiB) copied, 135.548 s, 71.3 MB/s [root@localhost ~]# cat /sys/devices/system/memory/block_size_bytes 40000000 [root@localhost ~]# echo 0x40000000 > /sys/kernel/debug/powerpc/memtrace/enable [ 402.978663][ T1086] page:000000001bc4bc74 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x24900 [ 402.980063][ T1086] flags: 0x7ffff000001000(reserved) [ 402.980415][ T1086] raw: 007ffff000001000 c00c000000924008 c00c000000924008 0000000000000000 [ 402.980627][ T1086] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000 [ 402.980845][ T1086] page dumped because: unmovable page [ 402.989608][ T1086] Offlined Pages 16384 [ 403.324155][ T1086] memtrace: Allocated trace memory on node 0 at 0x0000000200000000 Before this patch: [root@localhost ~]# hexdump -C /sys/kernel/debug/powerpc/memtrace/00000000/trace | head 00000000 c8 25 72 51 4d 26 36 c5 5c c2 56 15 d5 1a cd 10 |.%rQM&6.\.V.....| 00000010 19 b9 50 b2 cb e3 60 b8 ec 0a f3 ec 4b 3c 39 f0 |..P...`.....K<9.|$ 00000020 4e 5a 4c cf bd 26 19 ff 37 79 13 67 24 b7 b8 57 |NZL..&..7y.g$..W|$ 00000030 98 3e f5 be 6f 14 6a bd a4 52 bc 6e e9 e0 c1 5d |.>..o.j..R.n...]|$ 00000040 76 b3 ae b5 88 d7 da e3 64 23 85 2c 10 88 07 b6 |v.......d#.,....|$ 00000050 9a d8 91 de f7 50 27 69 2e 64 9c 6f d3 19 45 79 |.....P'i.d.o..Ey|$ 00000060 6a 6f 8a 61 71 19 1f c7 f1 df 28 26 ca 0f 84 55 |jo.aq.....(&...U|$ 00000070 01 3f be e4 e2 e1 da ff 7b 8c 8e 32 37 b4 24 53 |.?......{..27.$S|$ 00000080 1b 70 30 45 56 e6 8c c4 0e b5 4c fb 9f dd 88 06 |.p0EV.....L.....|$ 00000090 ef c4 18 79 f1 60 b1 5c 79 59 4d f4 36 d7 4a 5c |...y.`.\yYM.6.J\|$ After this patch: [root@localhost ~]# hexdump -C /sys/kernel/debug/powerpc/memtrace/00000000/trace | head 00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 40000000 Fixes: 9d5171a8f248 ("powerpc/powernv: Enable removal of memory for in memory tracing") Cc: stable@vger.kernel.org # v4.14+ Reported-by: Michael Ellerman Signed-off-by: David Hildenbrand Reviewed-by: Oscar Salvador Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201111145322.15793-2-david@redhat.com commit 2ca13a4cc56c920a6c9fc8ee45d02bccacd7f46c Author: Madhavan Srinivasan Date: Wed Oct 21 14:23:29 2020 +0530 powerpc/perf: Use regs->nip when SIAR is zero In power10 DD1, there is an issue where the SIAR (Sampled Instruction Address Register) is not latching to the sampled address during random sampling. This results in value of 0s in the SIAR. Add a check to use regs->nip when SIAR is zero. Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201021085329.384535-5-maddy@linux.ibm.com commit d9f7088dd6d8859f385565ca8acd2681e1f700f9 Author: Athira Rajeev Date: Wed Oct 21 14:23:27 2020 +0530 powerpc/perf: Use the address from SIAR register to set cpumode flags While setting the processor mode for any sample, perf_get_misc_flags() expects the privilege level to differentiate the userspace and kernel address. On power10 DD1, there is an issue that causes MSR_HV MSR_PR bits of Sampled Instruction Event Register (SIER) not to be set for marked events. Hence add a check to use the address in SIAR (Sampled Instruction Address Register) to identify the privilege level. Signed-off-by: Athira Rajeev Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201021085329.384535-3-maddy@linux.ibm.com commit fdf13a657508a12cd21a4d7b988cb260cb8fbd38 Author: Athira Rajeev Date: Wed Oct 21 14:23:26 2020 +0530 powerpc/perf: Drop the check for SIAR_VALID In power10 DD1, there is an issue that causes the SIAR_VALID bit of the SIER (Sampled Instruction Event Register) to not be set. But the SIAR_VALID bit is used for fetching the instruction address from the SIAR (Sampled Instruction Address Register), and marked events are sampled only if the SIAR_VALID bit is set. So drop the check for SIAR_VALID and return true always incase of power10 DD1. Signed-off-by: Athira Rajeev Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201021085329.384535-2-maddy@linux.ibm.com commit 9e8d13697c38a86e0fcf1bb20d419e3d6103e085 Author: Athira Rajeev Date: Wed Oct 21 14:23:25 2020 +0530 powerpc/perf: Add new power PMU flag "PPMU_P10_DD1" for power10 DD1 Add a new power PMU flag "PPMU_P10_DD1" which can be used to conditionally add any code path for power10 DD1 processor version. Also modify power10 PMU driver code to set this flag only for DD1, based on the Processor Version Register (PVR) value. Signed-off-by: Athira Rajeev Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201021085329.384535-1-maddy@linux.ibm.com commit b84bf098fcc49ed6bf4b0a8bed52e9df0e8f1de7 Author: Kaixu Xia Date: Tue Nov 10 10:56:01 2020 +0800 powerpc/mm: Fix comparing pointer to 0 warning Fixes coccicheck warning: ./arch/powerpc/mm/pgtable_32.c:87:11-12: WARNING comparing pointer to 0 Avoid pointer type value compared to 0. Reported-by: Tosk Robot Signed-off-by: Kaixu Xia Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1604976961-20441-1-git-send-email-kaixuxia@tencent.com commit 62182e6c0faf75117f8d1719c118bb5fc8574012 Author: Christophe Leroy Date: Sun Nov 8 16:57:37 2020 +0000 powerpc: Remove RFI macro RFI macro is just there to add an infinite loop past rfi in order to avoid prefetch on 40x in half a dozen of places in entry_32 and head_32. Those places are already full of #ifdefs, so just add a few more to explicitely show those loops and remove RFI. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/f7e9cb9e9240feec63cb330abf40b67d1aad852f.1604854583.git.christophe.leroy@csgroup.eu commit 120c0518ec321f33cdc4670059fb76e96ceb56eb Author: Christophe Leroy Date: Sun Nov 8 16:57:36 2020 +0000 powerpc: Replace RFI by rfi on book3s/32 and booke For book3s/32 and for booke, RFI is just an rfi. Only 40x has a non trivial RFI. CONFIG_PPC_RTAS is never selected by 40x platforms. Make it more explicit by replacing RFI by rfi wherever possible. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/b901ddfdeb8a0a3b7cb59999599cdfde1bbfe834.1604854583.git.christophe.leroy@csgroup.eu commit 879add7720172ffd2986c44587510fabb7af52f5 Author: Christophe Leroy Date: Sun Nov 8 16:57:35 2020 +0000 powerpc/64s: Replace RFI by RFI_TO_KERNEL and remove RFI In head_64.S, we have two places using RFI to return to kernel. Use RFI_TO_KERNEL instead. They are the two only places using RFI on book3s/64, so the RFI macro can go away. Signed-off-by: Christophe Leroy Acked-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/7719261b0a0d2787772339484c33eb809723bca7.1604854583.git.christophe.leroy@csgroup.eu commit 027717a45ca251a7ba67a63db359994836962cd2 Author: Kaixu Xia Date: Tue Nov 10 19:19:30 2020 +0800 powerpc/powernv/sriov: fix unsigned int win compared to less than zero Fix coccicheck warning: arch/powerpc/platforms/powernv/pci-sriov.c:443:7-10: WARNING: Unsigned expression compared with zero: win < 0 arch/powerpc/platforms/powernv/pci-sriov.c:462:7-10: WARNING: Unsigned expression compared with zero: win < 0 Fixes: 39efc03e3ee8 ("powerpc/powernv/sriov: Move M64 BAR allocation into a helper") Reported-by: Tosk Robot Signed-off-by: Kaixu Xia Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1605007170-22171-1-git-send-email-kaixuxia@tencent.com commit a40fdaf1420d6e6bda0dd2df1e6806013e58dbe1 Author: Zhang Xiaoxu Date: Tue Nov 10 21:07:52 2020 -0500 Revert "powerpc/pseries/hotplug-cpu: Remove double free in error path" This reverts commit a0ff72f9f5a780341e7ff5e9ba50a0dad5fa1980. Since the commit b015f6bc9547 ("powerpc/pseries: Add cpu DLPAR support for drc-info property"), the 'cpu_drcs' wouldn't be double freed when the 'cpus' node not found. So we needn't apply this patch, otherwise, the memory will be leaked. Fixes: a0ff72f9f5a7 ("powerpc/pseries/hotplug-cpu: Remove double free in error path") Reported-by: Hulk Robot Signed-off-by: Zhang Xiaoxu [mpe: Caused by me applying a patch to a function that had changed in the interim] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201111020752.1686139-1-zhangxiaoxu5@huawei.com commit 987c426320cce72d1b28f55c8603b239e4f7187c Author: Nicholas Piggin Date: Wed Nov 11 22:01:51 2020 +1000 powerpc/64s/perf: perf interrupt does not have to get_user_pages to access user memory read_user_stack_slow that walks user address translation by hand is only required on hash, because a hash fault can not be serviced from "NMI" context (to avoid re-entering the hash code) so the user stack can be mapped into Linux page tables but not accessible by the CPU. Radix MMU mode does not have this restriction. A page fault failure would indicate the page is not accessible via get_user_pages either, so avoid this on radix. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201111120151.3150658-1-npiggin@gmail.com commit fdcfeaba38e5b183045f5b079af94f97658eabe6 Author: Youling Tang Date: Wed Nov 4 18:59:10 2020 +0800 powerpc: Use the common INIT_DATA_SECTION macro in vmlinux.lds.S Use the common INIT_DATA_SECTION rule for the linker script in an effort to regularize the linker script. Signed-off-by: Youling Tang Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1604487550-20040-1-git-send-email-tangyouling@loongson.cn commit c1fc133f5bd06949037192c0a48c3dab85a140fd Author: Andrew Jeffery Date: Thu Oct 22 12:17:31 2020 +1030 ARM: dts: tacoma: Add reserved memory for ramoops Reserve a 1.5MiB region of memory to record kmsg dumps, console and userspace message state into 16kiB ring-buffer slots. The sizing allows for up to 16 dumps to be captured and read out. Set max-reason to KMSG_DUMP_EMERG to capture bad-path reboots. Signed-off-by: Andrew Jeffery Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20201022014731.2035438-7-andrew@aj.id.au Signed-off-by: Joel Stanley commit c7b74131c755bb73eb836bcb46fcc28fbab39717 Author: Andrew Jeffery Date: Thu Oct 22 12:17:30 2020 +1030 ARM: dts: rainier: Add reserved memory for ramoops Reserve a 1.5MiB region of memory to record kmsg dumps, console and userspace message state into 16kiB ring-buffer slots. The sizing allows for up to 16 dumps to be captured and read out. Set max-reason to KMSG_DUMP_EMERG to capture bad-path reboots. Signed-off-by: Andrew Jeffery Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20201022014731.2035438-6-andrew@aj.id.au Signed-off-by: Joel Stanley commit cbee028da69d31cb927142e2828710de55a49f2a Author: Andrew Jeffery Date: Thu Oct 22 12:17:26 2020 +1030 ARM: dts: tacoma: Fix node vs reg mismatch for flash memory The mismatch lead to a miscalculation of regions in another patch, and shouldn't be mismatched anyway, so make them consistent. Fixes: 575640201e66 ("ARM: dts: aspeed: tacoma: Use 64MB for firmware memory") Signed-off-by: Andrew Jeffery Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20201022014731.2035438-2-andrew@aj.id.au Signed-off-by: Joel Stanley commit 78665179e569c7e1fe102fb6c21d0f5b6951f084 Author: Christophe Leroy Date: Tue Nov 3 18:07:12 2020 +0000 powerpc/feature: Fix CPU_FTRS_ALWAYS by removing CPU_FTRS_GENERIC_32 On 8xx, we get the following features: [ 0.000000] cpu_features = 0x0000000000000100 [ 0.000000] possible = 0x0000000000000120 [ 0.000000] always = 0x0000000000000000 This is not correct. As CONFIG_PPC_8xx is mutually exclusive with all other configurations, the three lines should be equal. The problem is due to CPU_FTRS_GENERIC_32 which is taken when CONFIG_BOOK3S_32 is NOT selected. This CPU_FTRS_GENERIC_32 is pointless because there is no generic configuration supporting all 32 bits but book3s/32. Remove this pointless generic features definition to unbreak the calculation of 'possible' features and 'always' features. Fixes: 76bc080ef5a3 ("[POWERPC] Make default cputable entries reflect selected CPU family") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/76a85f30bf981d1aeaae00df99321235494da254.1604426550.git.christophe.leroy@csgroup.eu commit e80639405c40127727812a0e1f8a65ba9979f146 Author: Aneesh Kumar K.V Date: Wed Oct 7 11:03:05 2020 +0530 powerpc/mm: Update tlbiel loop on POWER10 With POWER10, single tlbiel instruction invalidates all the congruence class of the TLB and hence we need to issue only one tlbiel with SET=0. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201007053305.232879-1-aneesh.kumar@linux.ibm.com commit a7223f5bfcaeade4a86d35263493bcda6c940891 Author: Ard Biesheuvel Date: Wed Oct 28 09:04:33 2020 +0100 powerpc: Avoid broken GCC __attribute__((optimize)) Commit 7053f80d9696 ("powerpc/64: Prevent stack protection in early boot") introduced a couple of uses of __attribute__((optimize)) with function scope, to disable the stack protector in some early boot code. Unfortunately, and this is documented in the GCC man pages [0], overriding function attributes for optimization is broken, and is only supported for debug scenarios, not for production: the problem appears to be that setting GCC -f flags using this method will cause it to forget about some or all other optimization settings that have been applied. So the only safe way to disable the stack protector is to disable it for the entire source file. [0] https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html Fixes: 7053f80d9696 ("powerpc/64: Prevent stack protection in early boot") Signed-off-by: Ard Biesheuvel [mpe: Drop one remaining use of __nostackprotector, reported by snowpatch] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201028080433.26799-1-ardb@kernel.org commit ffa1797040c5da391859a9556be7b735acbe1242 Author: Qinglang Miao Date: Wed Oct 28 17:15:51 2020 +0800 powerpc: sysdev: add missing iounmap() on error in mpic_msgr_probe() I noticed that iounmap() of msgr_block_addr before return from mpic_msgr_probe() in the error handling case is missing. So use devm_ioremap() instead of just ioremap() when remapping the message register block, so the mapping will be automatically released on probe failure. Signed-off-by: Qinglang Miao Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201028091551.136400-1-miaoqinglang@huawei.com commit f5eca0b279117f25020112a2f65ec9c3ea25f3ac Author: Po-Hsu Lin Date: Fri Oct 23 10:45:39 2020 +0800 selftests/powerpc/eeh: disable kselftest timeout setting for eeh-basic The eeh-basic test got its own 60 seconds timeout (defined in commit 414f50434aa2 "selftests/eeh: Bump EEH wait time to 60s") per breakable device. And we have discovered that the number of breakable devices varies on different hardware. The device recovery time ranges from 0 to 35 seconds. In our test pool it will take about 30 seconds to run on a Power8 system that with 5 breakable devices, 60 seconds to run on a Power9 system that with 4 breakable devices. Extend the timeout setting in the kselftest framework to 5 minutes to give it a chance to finish. Signed-off-by: Po-Hsu Lin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201023024539.9512-1-po-hsu.lin@canonical.com commit cb5d4c465f31bc44b8bbd4934678c2b140a2ad29 Author: Michael Ellerman Date: Fri Oct 23 14:13:05 2020 +1100 powerpc/ps3: Drop unused DBG macro This DBG macro is unused, and has been unused since the file was originally merged into mainline. Just drop it. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201023031305.3284819-1-mpe@ellerman.id.au commit ef78f2dd2398ce8ed9eeaab9c9f8af2e15f5d870 Author: Michael Ellerman Date: Fri Oct 23 13:08:38 2020 +1100 powerpc/85xx: Fix declaration made after definition Currently the clang build of corenet64_smp_defconfig fails with: arch/powerpc/platforms/85xx/corenet_generic.c:210:1: error: attribute declaration must precede definition machine_arch_initcall(corenet_generic, corenet_gen_publish_devices); Fix it by moving the initcall definition prior to the machine definition, and directly below the function it calls, which is the usual style anyway. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201023020838.3274226-1-mpe@ellerman.id.au commit 53f45ecc9cd04b4b963f3040f2a54c3baf03b229 Author: Aneesh Kumar K.V Date: Thu Oct 22 14:41:15 2020 +0530 powerpc/mm: Move setting PTE specific flags to pfn_pmd() powerpc used to set the PTE specific flags in set_pte_at(). That is different from other architectures. To be consistent with other architectures powerpc updated pfn_pte() to set _PAGE_PTE in commit 379c926d6334 ("powerpc/mm: move setting pte specific flags to pfn_pte") That commit didn't do the same for pfn_pmd() because we expect pmd_mkhuge() to do that. But as per Linus that is a bad rule: The rule that you must use "pmd_mkhuge()" seems _completely_ wrong. The only valid use to ever make a pmd out of a pfn is to make a huge-page. Hence update pfn_pmd() to set _PAGE_PTE. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201022091115.39568-1-aneesh.kumar@linux.ibm.com commit 1891ef21d92c4801ea082ee8ed478e304ddc6749 Author: Christophe Leroy Date: Thu Oct 22 14:05:46 2020 +0000 powerpc/bitops: Fix possible undefined behaviour with fls() and fls64() fls() and fls64() are using __builtin_ctz() and _builtin_ctzll(). On powerpc, those builtins trivially use ctlzw and ctlzd power instructions. Allthough those instructions provide the expected result with input argument 0, __builtin_ctz() and __builtin_ctzll() are documented as undefined for value 0. The easiest fix would be to use fls() and fls64() functions defined in include/asm-generic/bitops/builtin-fls.h and include/asm-generic/bitops/fls64.h, but GCC output is not optimal: 00000388 : 388: 2c 03 00 00 cmpwi r3,0 38c: 41 82 00 10 beq 39c 390: 7c 63 00 34 cntlzw r3,r3 394: 20 63 00 20 subfic r3,r3,32 398: 4e 80 00 20 blr 39c: 38 60 00 00 li r3,0 3a0: 4e 80 00 20 blr 000003b0 : 3b0: 2c 03 00 00 cmpwi r3,0 3b4: 40 82 00 1c bne 3d0 3b8: 2f 84 00 00 cmpwi cr7,r4,0 3bc: 38 60 00 00 li r3,0 3c0: 4d 9e 00 20 beqlr cr7 3c4: 7c 83 00 34 cntlzw r3,r4 3c8: 20 63 00 20 subfic r3,r3,32 3cc: 4e 80 00 20 blr 3d0: 7c 63 00 34 cntlzw r3,r3 3d4: 20 63 00 40 subfic r3,r3,64 3d8: 4e 80 00 20 blr When the input of fls(x) is a constant, just check x for nullity and return either 0 or __builtin_clz(x). Otherwise, use cntlzw instruction directly. For fls64() on PPC64, do the same but with __builtin_clzll() and cntlzd instruction. On PPC32, lets take the generic fls64() which will use our fls(). The result is as expected: 00000388 : 388: 7c 63 00 34 cntlzw r3,r3 38c: 20 63 00 20 subfic r3,r3,32 390: 4e 80 00 20 blr 000003a0 : 3a0: 2c 03 00 00 cmpwi r3,0 3a4: 40 82 00 10 bne 3b4 3a8: 7c 83 00 34 cntlzw r3,r4 3ac: 20 63 00 20 subfic r3,r3,32 3b0: 4e 80 00 20 blr 3b4: 7c 63 00 34 cntlzw r3,r3 3b8: 20 63 00 40 subfic r3,r3,64 3bc: 4e 80 00 20 blr Fixes: 2fcff790dcb4 ("powerpc: Use builtin functions for fls()/__fls()/fls64()") Cc: stable@vger.kernel.org Signed-off-by: Christophe Leroy Acked-by: Segher Boessenkool Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/348c2d3f19ffcff8abe50d52513f989c4581d000.1603375524.git.christophe.leroy@csgroup.eu commit 344fbab991a568dc33ad90711b489d870e18d26d Author: Jordan Niethe Date: Wed Oct 14 18:28:37 2020 +1100 powerpc/64s: Convert some cpu_setup() and cpu_restore() functions to C The only thing keeping the cpu_setup() and cpu_restore() functions used in the cputable entries for Power7, Power8, Power9 and Power10 in assembly was cpu_restore() being called before there was a stack in generic_secondary_smp_init(). Commit ("powerpc/64: Set up a kernel stack for secondaries before cpu_restore()") means that it is now possible to use C. Rewrite the functions in C so they are a little bit easier to read. This is not changing their functionality. Signed-off-by: Jordan Niethe [mpe: Tweak copyright and authorship notes] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201014072837.24539-2-jniethe5@gmail.com commit 4e99d115d865d45e17e83478d757b58d8fa66d3c Merge: d055126180564 6007b23cc7555 Author: Andrii Nakryiko Date: Wed Nov 18 17:39:41 2020 -0800 Merge branch 'RISC-V selftest/bpf fixes' Björn Töpel says: ==================== This series contain some fixes for selftests/bpf when building/running on a RISC-V host. Details can be found in each individual commit. v2: Makefile cosmetics. (Andrii) Simplified unpriv check and added comment. (Andrii) ==================== Signed-off-by: Andrii Nakryiko commit 6007b23cc7555df882be870433dc589841d4eb06 Author: Björn Töpel Date: Wed Nov 18 08:16:40 2020 +0100 selftests/bpf: Mark tests that require unaligned memory access A lot of tests require unaligned memory access to work. Mark the tests as such, so that they can be avoided on unsupported architectures such as RISC-V. Signed-off-by: Björn Töpel Signed-off-by: Andrii Nakryiko Acked-by: Luke Nelson Link: https://lore.kernel.org/bpf/20201118071640.83773-4-bjorn.topel@gmail.com commit c77b0589ca29ad1859fe7d7c1ecd63c0632379fa Author: Björn Töpel Date: Wed Nov 18 08:16:39 2020 +0100 selftests/bpf: Avoid running unprivileged tests with alignment requirements Some architectures have strict alignment requirements. In that case, the BPF verifier detects if a program has unaligned accesses and rejects them. A user can pass BPF_F_ANY_ALIGNMENT to a program to override this check. That, however, will only work when a privileged user loads a program. An unprivileged user loading a program with this flag will be rejected prior entering the verifier. Hence, it does not make sense to load unprivileged programs without strict alignment when testing the verifier. This patch avoids exactly that. Signed-off-by: Björn Töpel Signed-off-by: Andrii Nakryiko Acked-by: Luke Nelson Link: https://lore.kernel.org/bpf/20201118071640.83773-3-bjorn.topel@gmail.com commit 6016df8fe874e1cf36f6357d71438b384198ce06 Author: Björn Töpel Date: Wed Nov 18 08:16:38 2020 +0100 selftests/bpf: Fix broken riscv build The selftests/bpf Makefile includes system include directories from the host, when building BPF programs. On RISC-V glibc requires that __riscv_xlen is defined. This is not the case for "clang -target bpf", which messes up __WORDSIZE (errno.h -> ... -> wordsize.h) and breaks the build. By explicitly defining __risc_xlen correctly for riscv, we can workaround this. Fixes: 167381f3eac0 ("selftests/bpf: Makefile fix "missing" headers on build with -idirafter") Signed-off-by: Björn Töpel Signed-off-by: Andrii Nakryiko Acked-by: Luke Nelson Link: https://lore.kernel.org/bpf/20201118071640.83773-2-bjorn.topel@gmail.com commit e76d795ecb5bb67741fb9e304dcce7950c7aeea0 Author: Bongsu Jeon Date: Tue Nov 17 17:11:37 2020 +0900 nfc: s3fwrn5: Change the error code ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bongsu Jeon Link: https://lore.kernel.org/r/20201117081137epcms2p84b5dd8d84ca608f44b0bb722b48f50b1@epcms2p8 Signed-off-by: Jakub Kicinski commit 074376007e425543ec57ed92bfc3d87f39de3b80 Author: Bongsu Jeon Date: Tue Nov 17 17:09:50 2020 +0900 nfc: s3fwrn5: Fix the misspelling in a comment stucture should be replaced by structure. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bongsu Jeon Link: https://lore.kernel.org/r/20201117080950epcms2p4d332688ce351321c3222734bca680b57@epcms2p4 Signed-off-by: Jakub Kicinski commit b50e29645627c9372bca45c19d040d96011f77de Author: Bongsu Jeon Date: Tue Nov 17 17:08:24 2020 +0900 nfc: s3fwrn5: Remove the max_payload max_payload is unused. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bongsu Jeon Link: https://lore.kernel.org/r/20201117080824epcms2p36f70e06e2d8bd51d1af278b26ca65725@epcms2p3 Signed-off-by: Jakub Kicinski commit aa8f2cbd5748114e6f283b878f65e743f528d978 Merge: bd4bdeb4f2902 235db5278316c Author: Jakub Kicinski Date: Wed Nov 18 17:34:21 2020 -0800 Merge branch 's390-qeth-updates-2020-11-17' Julian Wiedmann says: ==================== s390/qeth: updates 2020-11-17 This brings some cleanups, and a bunch of improvements for our .get_link_ksettings() code. ==================== Link: https://lore.kernel.org/r/20201117161520.1089-1-jwi@linux.ibm.com Signed-off-by: Jakub Kicinski commit 235db5278316cc516de6b44e161a2afa5ccac61c Author: Julian Wiedmann Date: Tue Nov 17 17:15:20 2020 +0100 s390/qeth: improve selection of ethtool link modes The link mode is a combination of port speed and port mode. But we currently only consider the speed, and then typically select the corresponding TP-based link mode. For 1G and 10G Fibre links this means we display the wrong link modes. Move the SPEED_* switch statements inside the PORT_* cases, and only consider valid combinations where we can select the corresponding link mode. Add the relevant link modes (1000baseX, 10000baseSR and 1000baseLR) that were introduced back with commit 5711a9822144 ("net: ethtool: add support for 1000BaseX and missing 10G link modes"). To differentiate between 10000baseSR and 10000baseLR, use the detailed media_type information that QUERY OAT provides. Signed-off-by: Julian Wiedmann Signed-off-by: Jakub Kicinski commit e92d42e7602b97b9eb73ce810c5bf62cc65cbb7a Author: Julian Wiedmann Date: Tue Nov 17 17:15:19 2020 +0100 s390/qeth: use QUERY OAT for initial link info Improve the initial link info with data obtained from QUERY OAT. Doing so _only_ at initialization time avoids 1. dealing with multi-part replies, and 2. sifting through all the data that may get returned at runtime. This allows us to determine the correct port type for the 1000BT variant of recent OSA adapter generations (where the .card_type field in QUERY CARD INFO is no longer sufficient). Signed-off-by: Julian Wiedmann Signed-off-by: Jakub Kicinski commit f252fa8ea0a0fa3fe05c0b1af5087313c8ec7813 Author: Julian Wiedmann Date: Tue Nov 17 17:15:18 2020 +0100 s390/qeth: clean up default cases for ethtool link mode Remove the default case for PORT_* and SPEED_* in our ethtool code. The only time these could be hit is if qeth_init_link_info() was unable to determine the port type from an OSA adapter's link_type. We already throw a message in this case, so reduce the noise and don't report bad data (ie. it's much more likely that any future link_type will represent a PORT_FIBRE link ...). Signed-off-by: Julian Wiedmann Signed-off-by: Jakub Kicinski commit baf7998d5f2116ab991236ac0d67f7021dc2ae55 Author: Julian Wiedmann Date: Tue Nov 17 17:15:17 2020 +0100 s390/qeth: set static link info during initialization Hard-code the minimal link info at initialization time, after we obtained the link_type. qeth_get_link_ksettings() can still override this with more accurate data from QUERY CARD INFO later on. Don't set arbitrary defaults for unknown OSA link types, they certainly won't match any future type. Signed-off-by: Julian Wiedmann Signed-off-by: Jakub Kicinski commit 4139b2b138dd44ca215976a06846839774ca7cd4 Author: Julian Wiedmann Date: Tue Nov 17 17:15:16 2020 +0100 s390/qeth: improve QUERY CARD INFO processing Move all the HW reply data parsing into qeth_query_card_info_cb(), and use common ethtool enums for transporting the information back to the caller. Also only look at the .port_speed field when we couldn't determine the speed from the .card_type field, and introduce some 'default' cases for SPEED_UNKNOWN, PORT_OTHER and DUPLEX_UNKNOWN. Signed-off-by: Julian Wiedmann Signed-off-by: Jakub Kicinski commit 88ad4d9bb16624e6ea81aac9fb83dc34cd12460f Author: Julian Wiedmann Date: Tue Nov 17 17:15:15 2020 +0100 s390/qeth: tolerate error when querying card info By the time that our .get_link_ksettings() code issues a QUERY CARD INFO cmd to get link-related information, we already set up a good amount of static link data. Return this data when the cmd fails, same as when the cmd is not supported. Signed-off-by: Julian Wiedmann Signed-off-by: Jakub Kicinski commit 215d2836d714dbc1f52c7d14c6c1716bd4f4ff7b Author: Kaixu Xia Date: Tue Nov 17 17:15:14 2020 +0100 s390/qeth: remove useless if/else Fix the following coccinelle report: ./drivers/s390/net/qeth_l3_main.c:107:2-4: WARNING: possible condition with no effect (if == else) Both branches are the same since commit ab29c480b194 ("s390/qeth: replace deprecated simple_stroul()"), so remove them. Reported-by: Tosk Robot Signed-off-by: Kaixu Xia [jwi: point to the commit that introduced this] Signed-off-by: Julian Wiedmann Signed-off-by: Jakub Kicinski commit 09840f70b088df1ec24f9b4e345983e7d5f63628 Author: Julian Wiedmann Date: Tue Nov 17 17:15:13 2020 +0100 s390/qeth: reduce rtnl locking for switchdev events call_switchdev_notifiers() doesn't require holding the RTNL lock since commit ff5cf100110c ("net: switchdev: Change notifier chain to be atomic"). We still need it for the "lost event" slow path, to avoid racing against a concurrent .ndo_bridge_setlink(). Signed-off-by: Julian Wiedmann Reviewed-by: Alexandra Winter Signed-off-by: Jakub Kicinski commit bd4bdeb4f29027199c68104fbdfa07ad45390cc1 Author: Heiner Kallweit Date: Tue Nov 17 21:34:09 2020 +0100 r8169: remove not needed check in rtl8169_start_xmit In rtl_tx() the released descriptors are zero'ed by rtl8169_unmap_tx_skb(). And in the beginning of rtl8169_start_xmit() we check that enough descriptors are free, therefore there's no way the DescOwn bit can be set here. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/6965d665-6c50-90c5-70e6-0bb335d4ea47@gmail.com Signed-off-by: Jakub Kicinski commit 281cc2843b180fe99c9b9999a625682e9cad5278 Author: Heiner Kallweit Date: Tue Nov 17 21:25:42 2020 +0100 net: bridge: replace struct br_vlan_stats with pcpu_sw_netstats Struct br_vlan_stats duplicates pcpu_sw_netstats (apart from br_vlan_stats not defining an alignment requirement), therefore switch to using the latter one. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/04d25c3d-c5f6-3611-6d37-c2f40243dae2@gmail.com Signed-off-by: Jakub Kicinski commit 280bb3f98bf8ae89e377311f164dfa9ef87c3a5a Merge: 030946fdb9901 2de680dea6a88 Author: Jakub Kicinski Date: Wed Nov 18 16:44:02 2020 -0800 Merge branch 'atm-replace-in_interrupt-usage' Sebastian Andrzej Siewior says: ==================== atm: Replace in_interrupt usage this mini series contains the removal of in_interrupt() in drivers/atm ==================== Link: https://lore.kernel.org/r/20201116162117.387191-1-bigeasy@linutronix.de Signed-off-by: Jakub Kicinski commit 2de680dea6a888271087521a9501a74af57fa076 Author: Sebastian Andrzej Siewior Date: Mon Nov 16 17:21:16 2020 +0100 atm: lanai: Remove in_interrupt() usage lanai_shutdown_tx_vci() uses in_interrupt() to issue a warning message if the function was used in context in which it is not safe to sleep. The usage of in_interrupt() in driver code is deprecated as it can not always detect all states where it is not allowed to sleep. msleep() has debug code which will trigger a warning if used in bad context. Remove in_interrupt(). Cc: Chas Williams <3chas3@gmail.com> Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Jakub Kicinski commit f2bcc2fa275b913093ff5b403be5d11342fdb055 Author: Sebastian Andrzej Siewior Date: Mon Nov 16 17:21:15 2020 +0100 atm: nicstar: Replace in_interrupt() usage push_scqe() uses in_interrupt() to figure out if it is allowed to sleep. The usage of in_interrupt() in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be separated or the context be conveyed in an argument passed by the caller, which usually knows the context. Aside of that in_interrupt() is not correct as it does not catch preempt disabled regions which neither can sleep. ns_send() (the only caller of push_scqe()) has the following callers: - vcc_sendmsg() used as proto_ops::sendmsg is expected to be invoked in preemtible context. -> vcc->dev->ops->send() (ns_send()) - atm_vcc::send via atmdev_ops::send either directly (pointer copied by atm_init_aal34() or atm_init_aal5()) or via atm_send_aal0(). This is invoked by drivers (like br2684, clip, pppoatm, ...) which are called from net_device_ops::ndo_start_xmit with BH disabled. Add atmdev_ops::send_bh which is used by callers from BH context (atm_send_aal*()) and if this callback missing then ::send is used instead. Implement this callback in nicstar and use it to replace in_interrupt(). Cc: Chas Williams <3chas3@gmail.com> Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Jakub Kicinski commit 030946fdb99018938feb0e23a3b4f9c3831fb77d Merge: 2b8473d2fb228 716a115b4f5c7 Author: Jakub Kicinski Date: Wed Nov 18 15:53:51 2020 -0800 Merge branch 'net-ipa-ipa-register-cleanup' Alex Elder says: ==================== net: ipa: IPA register cleanup This series consists of cleanup patches, almost entirely related to the definitions for IPA registers. Some comments are updated or added to provide better information about defined IPA registers. Other cleanups ensure symbol names and their assigned values are defined consistently. Some essentially duplicate definitions get consolidated for simplicity. In a few cases some minor bugs (missing definitions) are fixed. With these changes, all IPA register offsets and associated field masks should be correct for IPA versions 3.5.1, 4.0, 4.1, and 4.2. ==================== Link: https://lore.kernel.org/r/20201116233805.13775-1-elder@linaro.org Signed-off-by: Jakub Kicinski commit 716a115b4f5c78c2919437bf875fc3ba46087c57 Author: Alex Elder Date: Mon Nov 16 17:38:05 2020 -0600 net: ipa: a few last IPA register cleanups Some last cleanups for the existing IPA register definitions: - Remove the definition of IPA_REG_ENABLED_PIPES_OFFSET, because it is not used. - Use "IPA_" instead of "BAM_" as the prefix on fields associated with the FLAVOR_0 register. We use GSI (not BAM), but the fields apply to both GSI and BAM. - Get rid of the definition of IPA_CS_RSVD; it is never used. - Add two missing field mask definitions for the INIT_DEAGGR endpoint register. - Eliminate a few of the defined sequencer types, because they are unused. We can add them back when needed. - Add a field mask to indicate which bit causes an interrupt on the microcontroller. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 322053105f09513da0546ca36942fceec473982a Author: Alex Elder Date: Mon Nov 16 17:38:04 2020 -0600 net: ipa: move definition of enum ipa_irq_id Move the definition of the ipa_irq_id enumerated type out of "ipa_interrupt.h" and into "ipa_reg.h", and flesh out its set of defined values. Each interrupt id indicates a particular type of IPA interrupt that can be signaled. Their numeric values define bit positions in the IPA_IRQ_* registers, so should their definitions should accompany the definition of those register offsets. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 74fbbbbe80d146ae21fc5e3e3f65f069a5da0759 Author: Alex Elder Date: Mon Nov 16 17:38:03 2020 -0600 net: ipa: rearrange a few IPA register definitions Move a few things around in "ipa_reg.h": - Move the definition of ipa_reg_state_aggr_active_offset() down a bit in the file so definitions are ordered by offset (for the lowest supported IPA version) like all other definitions. - Move the definition TIMER_FREQUENCY to be immediately above the definition of ipa_aggr_granularity_val() where it's used. - Move each register field value enumerated type definition to immediately follow the definitions of the register and field it is associated with. No code functionality is modified by this patch. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 3413e61337ded76cd17130b4b1ecf339c2b1c37d Author: Alex Elder Date: Mon Nov 16 17:38:02 2020 -0600 net: ipa: fix up IPA register comments Revise or add comments in "ipa_reg.h" for to provide more information, and to improve clarity and consistency. - Always provide a comment to define when a register or field is supported (or not) for certain versions of IPA hardware. - Try to be specific about *which* or *how many* definitions a comment refers to. - Move comments stating that ipa->available defines the valid bits in various registers *above* the register offset definition, to avoid some checkpatch.pl warnings. No code is changed by this patch. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 8701cb00d78a41a222fd770691e297c47ecbb218 Author: Alex Elder Date: Mon Nov 16 17:38:01 2020 -0600 net: ipa: define enumerated types consistently Consistently define numeric values for enumerated type members using hexidecimal (rather than decimal) format values. Align the values assigned in the same column in each file. Only assign values where they really matter, for example don't assign IPA_ENDPOINT_AP_MODEM_TX the value 0. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit fb14f7229122073e87608aec7b94d941829f554b Author: Alex Elder Date: Mon Nov 16 17:38:00 2020 -0600 net: ipa: fix BCR register field definitions The backward compatibility register field masks are defined using single-bit masks defined with BIT(x) rather than GENMASK(x, x). Change this one set of definitions to follow the GENMASK() pattern used everywhere else. Add a few missing field definitions for this register as well. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit c3bf353fdbf26b970b811b85a7d237a75159fc44 Author: Alex Elder Date: Mon Nov 16 17:37:59 2020 -0600 net: ipa: use _FMASK consistently Several IPA register field masks are defined without the "_FMASK" suffix naming convention. Rename these, so all field masks are consistently named. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit f3ae1616c54de852720b2cad5746c5fa770a45d6 Author: Alex Elder Date: Mon Nov 16 17:37:58 2020 -0600 net: ipa: fix two inconsistent IPA register names Rename two suspend IRQ registers so they follow the IPA_REG_IRQ_xxx naming convention used elsewhere. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 6833a09673001f7767b1d61875cf84af6209c0ab Author: Alex Elder Date: Mon Nov 16 17:37:57 2020 -0600 net: ipa: support more versions for HOLB timer IPA version 3.5.1 represents the timer used in avoiding head-of-line blocking with a simple tick count. IPA v4.2 changes that, instead splitting the timer field into two parts (base and scale) to represent the ticks in the timer period. IPA v4.0 and IPA v4.1 use the same method as IPA v3.5.1. Change the test in ipa_reg_init_hol_block_timer_val() so the result is correct for those versions as well. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 5f87d77bb3bda034d234da1a8ade8ed41af175e0 Author: Alex Elder Date: Mon Nov 16 17:37:56 2020 -0600 net: ipa: make filter/routing hash enable register variable For IPA v3.5.1, the IPA filter/routing hash enable register actually does exist, but it is at offset 0x8c into the IPA register space. For newer versions of IPA it is at offset 0x148. Define a new inline function ipa_reg_filt_rout_hash_en_offset() to return the appropriate value for a given version of IPA hardware. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 4d715380b4b8d979f00fa9fc96b1ff088d7cb142 Author: Alex Elder Date: Mon Nov 16 17:37:55 2020 -0600 net: ipa: share field mask values for IPA hash registers The IPA filter/routing hash enable register and filter/routing hash flush register each have four single-bit fields representing the four hashed tables to be enabled or flushed. The field positions are identical, so just use a single set of field masks to represent the fields for both registers. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit d055126180564a57fe533728a4e93d0cb53d49b3 Author: Dmitrii Banshchikov Date: Tue Nov 17 18:45:49 2020 +0000 bpf: Add bpf_ktime_get_coarse_ns helper The helper uses CLOCK_MONOTONIC_COARSE source of time that is less accurate but more performant. We have a BPF CGROUP_SKB firewall that supports event logging through bpf_perf_event_output(). Each event has a timestamp and currently we use bpf_ktime_get_ns() for it. Use of bpf_ktime_get_coarse_ns() saves ~15-20 ns in time required for event logging. bpf_ktime_get_ns(): EgressLogByRemoteEndpoint 113.82ns 8.79M bpf_ktime_get_coarse_ns(): EgressLogByRemoteEndpoint 95.40ns 10.48M Signed-off-by: Dmitrii Banshchikov Signed-off-by: Daniel Borkmann Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20201117184549.257280-1-me@ubique.spb.ru commit f9f92e7c583f9b120bbb09edae6a587b73feb3a9 Author: Daniel Vetter Date: Tue Nov 17 22:40:29 2020 +0100 char/agp: Disable frontend without CONFIG_DRM_LEGACY It's probably full of bugs ready for exploiting by userspace. And there's not going to be any userspace for this without any of the drm legacy drivers enabled too. So just couple it together. Note that the frontend is only the /dev/agp ioctl interface, which per Adam is only used by the i810 userspace drivers. All other drivers go through the drm bufmap agp handling abstraction apparently. v2: Augment commit message a bit from m-l feedback. Acked-by: Adam Jackson Acked-by: Christian König Acked-by: Thomas Zimmermann Signed-off-by: Daniel Vetter Cc: David Airlie Cc: Adam Jackson Link: https://patchwork.freedesktop.org/patch/msgid/20201117214029.591896-1-daniel.vetter@ffwll.ch commit 58a74c6f1d6f3cf615c8f12281d42859ac7363a9 Author: Bernard Zhao Date: Wed Nov 18 03:40:19 2020 -0800 drm/via: fix assignment in if condition Fix check_patch.pl warning: ERROR: do not use assignment in if condition + if ((HALCYON_HEADER2 == (cmd = *buf)) && ERROR: do not use assignment in if condition + if (HALCYON_HEADER2 == (cmd = *buf)) Signed-off-by: Bernard Zhao Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201118114021.105502-1-bernard@vivo.com commit 1482304db126551c867434c5cc3fadf089beb417 Merge: de3de881db8e0 bab78c238025c Author: Mark Brown Date: Wed Nov 18 20:56:23 2020 +0000 Merge series "ASoC: soc-component: add snd_soc_component_xxx()" from Kuninori Morimoto : Hi Mark These are v2 of snd_soc_component_compr_xxx() function patches. I think component related function should be implemented at soc-component.c, otherwise it is confusable to read. These are for it. v1 -> v2 - fixup function return timing on snd_soc_component_compr_get_params() snd_soc_component_compr_get_metadata() - use mutex at compr side on snd_soc_component_compr_get_caps() snd_soc_component_compr_get_codec_caps() snd_soc_component_compr_copy() Link: https://lore.kernel.org/r/878sb78ac4.wl-kuninori.morimoto.gx@renesas.com Kuninori Morimoto (12): ASoC: soc-component: add snd_soc_component_compr_open() ASoC: soc-component: add snd_soc_component_compr_free() ASoC: soc-component: add snd_soc_component_compr_trigger() ASoC: soc-component: add snd_soc_component_compr_set_params() ASoC: soc-component: add snd_soc_component_compr_get_params() ASoC: soc-component: add snd_soc_component_compr_get_caps() ASoC: soc-component: add snd_soc_component_compr_get_codec_caps() ASoC: soc-component: add snd_soc_component_compr_ack() ASoC: soc-component: add snd_soc_component_compr_pointer() ASoC: soc-component: add snd_soc_component_compr_copy() ASoC: soc-component: add snd_soc_component_compr_set_metadata() ASoC: soc-component: add snd_soc_component_compr_get_metadata() include/sound/soc-component.h | 22 +++ sound/soc/soc-component.c | 255 ++++++++++++++++++++++++++++++++ sound/soc/soc-compress.c | 263 ++++------------------------------ 3 files changed, 303 insertions(+), 237 deletions(-) -- 2.25.1 commit de3de881db8e072a5c35b702e0a14ac971fffcb1 Merge: 7d94ca3c8acd0 251bf658558f9 Author: Mark Brown Date: Wed Nov 18 20:56:22 2020 +0000 Merge series "ASoC: graph card schema rework" from Rob Herring : This series updates Sameer's patch to repartition the graph card binding schema and incorporate the OF graph schema. The schema was also mixing card node and DAI node properties, so I've split the DAI part (the 'port' node) into a separate schema. There's another problem that 'frame-master' and 'bitclock-master' have inconsistent types of boolean and phandle. Having the properties just point to the local or remote endpoint within an endpoint node is kind of pointless. We should have gone with just boolean, but looks like we already have several users. MMP OLPC is the one platform using boolean, but it happens to work because the properties are effectively ignored and CPU DAI as the master is the default. Rob Rob Herring (3): ASoC: dt-bindings: Use OF graph schema ASoC: dt-bindings: marvell,mmp-sspa: Use audio-graph-port schema ASoC: dt-bindings: Refine 'frame-master' and 'bitclock-master' type Sameer Pujar (1): ASoC: audio-graph-card: Refactor schema .../bindings/sound/audio-graph-card.yaml | 106 +----------------- .../bindings/sound/audio-graph-port.yaml | 72 ++++++++++++ .../bindings/sound/audio-graph.yaml | 45 ++++++++ .../bindings/sound/marvell,mmp-sspa.yaml | 25 +---- .../bindings/sound/renesas,rsnd.yaml | 12 +- .../bindings/sound/simple-card.yaml | 6 +- 6 files changed, 132 insertions(+), 134 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/audio-graph-port.yaml create mode 100644 Documentation/devicetree/bindings/sound/audio-graph.yaml base-commit: e2e99930ec006c6fe1d62af339a765ade71a0d9a -- 2.25.1 commit ac7711427014a84ba08353df2b77f115565216d8 Author: Federico Vaga Date: Sat Nov 14 09:33:42 2020 +0100 doc:it_IT: align Italian documentation Translation for the following patches commit 0aa78b105f57 ("Documentation/changes: Raise minimum supported binutils version to 2.23") commit 7d7178873560 ("Documentation: include sign off for reverts") commit 905705a8fd43 ("docs: programming-languages: refresh blurb on clang support") commit 5ff4aa70bf34 ("docs: submitting-patches: use :doc: for references") commit 030f066f677f ("docs: submitting-patches: describe preserving review/test tags") commit 68e4cd17e218 ("docs: deprecated.rst: Add zero-length and one-element arrays") commit 5429ef62bcf3 ("compiler/gcc: Raise minimum GCC version for kernel builds to 4.8") commit 5b5bbb8cc51b ("docs: process: Add an example for creating a fixes tag") commit 858e6845654d ("docs: dt: convert submitting-patches.txt to ReST format") commit cca73e4946c4 ("docs: Correct the release date of 5.2 stable") commit c170f2eb9648 ("docs: Document cross-referencing between documentation pages") commit 7c8b9e3000f8 ("kernel-doc: Update "cross-referencing from rST" section to use automarkup") commit 27def953b63b ("docs: deprecated.rst: Expand str*cpy() replacement notes") commit 17dca0502314 ("docs: deprecated.rst: Update zero-length/one-element arrays section") commit 3519c4d6e08e ("Documentation: add minimum clang/llvm version") commit 0bddd227f3dc ("Documentation: update for gcc 4.9 requirement") commit 9f364b605f34 ("submitting-patches.rst: presume git will be used") commit 4ebdf7be21d6 ("Documentation/maintainer: rehome sign-off process") commit 7433ff33e8ba ("Documentation/process: expand plain-text advice") commit eb45fb2fb16d ("docs: process: Add cross-link to security-bugs") commit bdc48fa11e46 ("checkpatch/coding-style: deprecate 80-column warning") commit f67281a72b30 ("Documentation: process: step 2: Link to email list fixed") Signed-off-by: Federico Vaga Link: https://lore.kernel.org/r/20201114083342.13935-1-federico.vaga@vaga.pv.it Signed-off-by: Jonathan Corbet commit 992082d1dc5aea9557f3d197c1d5eff2b9b1f70d Author: Wang Qing Date: Mon Nov 16 14:47:50 2020 +0800 doc: zh_CN: add tmpfs to index tree Add tmpfs to the index tree while adding tmppfs translation. Signed-off-by: Wang Qing Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/1605509272-13770-1-git-send-email-wangqing@vivo.com Signed-off-by: Jonathan Corbet commit c12af30b6d7cac3edf95258b796c1a4427f99f81 Author: Tiezhu Yang Date: Mon Nov 16 17:42:47 2020 +0800 Documentation: kgdb: Fix a typo "to into" -> "into" Reported-by: Sergei Shtylyov Signed-off-by: Tiezhu Yang Acked-by: Daniel Thompson Link: https://lore.kernel.org/r/1605519767-25502-1-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Jonathan Corbet commit 49a41365052849be798716b374fabd436cce3ad0 Author: Nick Desaulniers Date: Sun Nov 15 20:35:32 2020 -0800 powerpc: fix -Wimplicit-fallthrough The "fallthrough" pseudo-keyword was added as a portable way to denote intentional fallthrough. Clang will still warn on cases where there is a fallthrough to an immediate break. Add explicit breaks for those cases. Signed-off-by: Nick Desaulniers Tested-by: Nathan Chancellor Reviewed-by: Gustavo A. R. Silva Reviewed-by: Miguel Ojeda Reviewed-by: Nathan Chancellor Acked-by: Michael Ellerman Link: https://github.com/ClangBuiltLinux/linux/issues/236 Signed-off-by: Gustavo A. R. Silva commit 4c1ca831adb1010e473a18eb01b3fbef7595f230 Author: Nick Desaulniers Date: Sun Nov 15 20:35:31 2020 -0800 Revert "lib: Revert use of fallthrough pseudo-keyword in lib/" This reverts commit 6a9dc5fd6170 ("lib: Revert use of fallthrough pseudo-keyword in lib/") Now that we can build arch/powerpc/boot/ free of -Wimplicit-fallthrough, re-enable these fixes for lib/. Signed-off-by: Nick Desaulniers Tested-by: Nathan Chancellor Reviewed-by: Nathan Chancellor Reviewed-by: Gustavo A. R. Silva Reviewed-by: Miguel Ojeda Link: https://github.com/ClangBuiltLinux/linux/issues/236 Signed-off-by: Gustavo A. R. Silva commit 77433830ed164a0bc38dd43877bab3f7f7fd7fa3 Author: Nick Desaulniers Date: Sun Nov 15 20:35:30 2020 -0800 powerpc: boot: include compiler_attributes.h The kernel uses `-include` to include include/linux/compiler_types.h into all translation units (see scripts/Makefile.lib), which #includes compiler_attributes.h. arch/powerpc/boot/ uses different compiler flags from the rest of the kernel. As such, it doesn't contain the definitions from these headers, and redefines a few that it needs. For the purpose of enabling -Wimplicit-fallthrough for ppc, include compiler_attributes.h via `-include`. It was also noted in 6a9dc5fd6170 that we could -D__KERNEL__ and -include compiler_types.h like the main kernel does, though testing that produces a whole sea of warnings to cleanup. This approach is minimally invasive. And it also helps to entice a cleanup. Signed-off-by: Nick Desaulniers Tested-by: Nathan Chancellor Reviewed-by: Nathan Chancellor Acked-by: Gustavo A. R. Silva Acked-by: Miguel Ojeda Acked-by: Michael Ellerman Link: https://github.com/ClangBuiltLinux/linux/issues/236 [ Gustavo: Massage a bit as per Miguel's suggestion. ] Signed-off-by: Gustavo A. R. Silva commit 2b8473d2fb228d1cd814e075ed626cf764262caa Author: Xie He Date: Wed Nov 18 04:42:26 2020 -0800 Documentation: Remove the deleted "framerelay" document from the index commit f73659192b0b ("net: wan: Delete the DLCI / SDLA drivers") deleted "Documentation/networking/framerelay.rst". However, it is still referenced in "Documentation/networking/index.rst". We need to remove the reference, too. Reported-by: Stephen Rothwell Signed-off-by: Xie He Link: https://lore.kernel.org/r/20201118124226.15588-1-xie.he.0141@gmail.com Signed-off-by: Jakub Kicinski commit d1adcfbb520c43c10fc22fcdccdd4204e014fb53 Author: David Woodhouse Date: Wed Nov 11 12:09:01 2020 +0000 iommu/amd: Fix IOMMU interrupt generation in X2APIC mode The AMD IOMMU has two modes for generating its own interrupts. The first is very much based on PCI MSI, and can be configured by Linux precisely that way. But like legacy unmapped PCI MSI it's limited to 8 bits of APIC ID. The second method does not use PCI MSI at all in hardawre, and instead configures the INTCAPXT registers in the IOMMU directly with the APIC ID and vector. In the latter case, the IOMMU driver would still use pci_enable_msi(), read back (through MMIO) the MSI message that Linux wrote to the PCI MSI table, then swizzle those bits into the appropriate register. Historically, this worked because__irq_compose_msi_msg() would silently generate an invalid MSI message with the high bits of the APIC ID in the high bits of the MSI address. That hack was intended only for the Intel IOMMU, and I recently enforced that, introducing a warning in __irq_msi_compose_msg() if it was invoked with an APIC ID above 255. Fix the AMD IOMMU not to depend on that hack any more, by having its own irqdomain and directly putting the bits from the irq_cfg into the right place in its ->activate() method. Fixes: 47bea873cf80 "x86/msi: Only use high bits of MSI address for DMAR unit") Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Tested-by: Suravee Suthikulpanit Link: https://lore.kernel.org/r/05e3a5ba317f5ff48d2f8356f19e617f8b9d23a4.camel@infradead.org commit f24afa1083b79dd348208254f8d3409bf66956c7 Merge: d04a53b1c4876 e3ddfb45bacdc Author: Jakub Kicinski Date: Wed Nov 18 11:51:21 2020 -0800 Merge branch 'mlxsw-preparations-for-nexthop-objects-support-part-2-2' Ido Schimmel says: ==================== mlxsw: Preparations for nexthop objects support - part 2/2 This patch set contains the second round of preparations towards nexthop objects support in mlxsw. Follow up patches can be found here [1]. The patches are mostly small and trivial and contain non-functional changes aimed at making it easier to integrate nexthop objects with mlxsw. Patch #1 is a fix for an issue introduced in previous submission. Found by Coverity. [1] https://github.com/idosch/linux/tree/submit/nexthop_objects ==================== Link: https://lore.kernel.org/r/20201117174704.291990-1-idosch@idosch.org Signed-off-by: Jakub Kicinski commit e3ddfb45bacdc623eedea7f7bf9e7879257471d6 Author: Ido Schimmel Date: Tue Nov 17 19:47:04 2020 +0200 mlxsw: spectrum_router: Allow returning errors from mlxsw_sp_nexthop_group_refresh() The function is responsible for allocating the adjacency entries used by the nexthop group and populating them with the adjacency information such as egress RIF and MAC address. Allow the function to return an error when it encounters a problem and have the relevant call sites check it. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit 2efca2bfba995e67a5372288a4d745fcefc6e8ce Author: Ido Schimmel Date: Tue Nov 17 19:47:03 2020 +0200 mlxsw: spectrum_router: Add an indication if a nexthop group can be destroyed Currently, a nexthop group is destroyed when the last FIB entry is detached from it. When nexthop objects are supported, this can no longer be the case, as the group is a separate object whose lifetime is managed by user space. Add an indication if a nexthop group can be destroyed and always set it to true for the existing IPv4 and IPv6 nexthop groups. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit a9a711a3f78ba38badd32d1a06f844bc44863840 Author: Ido Schimmel Date: Tue Nov 17 19:47:02 2020 +0200 mlxsw: spectrum_router: Only clear offload indication from valid IPv6 FIB info When the IPv6 FIB info has a nexthop object, the nexthop offload indication is set on the nexthop object and not on the FIB info itself. Therefore, do not try to clear the offload indication from the FIB info when it has a nexthop object. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit 5b9954e1e7b839ac6a5a773cb498884dd4f947f1 Author: Ido Schimmel Date: Tue Nov 17 19:47:01 2020 +0200 mlxsw: spectrum_router: Re-order mlxsw_sp_nexthop6_group_get() Attach the FIB entry to the nexthop group after setting the offload flag on the IPv6 FIB info (i.e., 'struct fib6_info'). The second operation is not needed when the nexthop group is a nexthop object. This will allow us to have a common exit path from the function, regardless of the nexthop group's type. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit c0351b7c25ffd52408c1297fbe552f185d5aac3f Author: Ido Schimmel Date: Tue Nov 17 19:47:00 2020 +0200 mlxsw: spectrum_router: Set FIB entry's type based on nexthop group The previous patch associated a nexthop group with the FIB entry before the entry's type is determined. Make use of the nexthop group when determining the entry's type instead of relying on helpers that assume that the nexthop info is not a nexthop object (i.e., 'struct nexthop'). Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit 5c9a3b24518c8b5c446b247ccd0e8a98f65abf2a Author: Ido Schimmel Date: Tue Nov 17 19:46:59 2020 +0200 mlxsw: spectrum_router: Set FIB entry's type after creating nexthop group Each FIB entry has a type (e.g., remote, local) that determines how the entry is programmed to the device. In order to determine if the entry is local (directly connected) or remote (has a gateway) the relevant FIB info structures (e.g., 'struct fib_info') are checked. When entries that use nexthop objects are supported, these checks will need to be changed to take into account 'struct nexthop'. Instead, first associate the entry with a nexthop group so that the next patch could determine the entry's type based on the associated nexthop group's type. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit c68e248d538b72a7643496afc99baca15604c38f Author: Ido Schimmel Date: Tue Nov 17 19:46:58 2020 +0200 mlxsw: spectrum_router: Pass ifindex to mlxsw_sp_ipip_entry_find_by_decap() The sole caller of the function will soon only have the ifindex available, instead of the pointer itself. Therefore, change the function to take the ifindex as input and have it get the pointer. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit ff8a24182acc4558a979f04e7030514e97e552be Author: Ido Schimmel Date: Tue Nov 17 19:46:57 2020 +0200 mlxsw: spectrum_router: Set ifindex for IPv4 nexthops The ifindex of the nexthop device was never set for IPv4 nexthops, unlike IPv6 nexthops. This went unnoticed since only IPv6 nexthops use it. Set the ifindex for IPv4 nexthops in order to be consistent with IPv6 and also because it will be used by a later patch. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit fbf805bf1fcd125461541a171194f9dcdb2732d7 Author: Ido Schimmel Date: Tue Nov 17 19:46:56 2020 +0200 mlxsw: spectrum_router: Fix wrong kfree() in error path The function allocates 'nhgi', not 'nh_grp', so it needs to free the former in its error path. Fixes: 7f7a417e6a11 ("mlxsw: spectrum_router: Split nexthop group configuration to a different struct") Addresses-Coverity: ("Memory - corruptions (USE_AFTER_FREE)") Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit 1a57b1a3e11086a4f183b245754b213b1d9b2d40 Author: Zhen Lei Date: Wed Nov 18 15:35:17 2020 +0800 ACPI/nfit: avoid accessing uninitialized memory in acpi_nfit_ctl() The ACPI_ALLOCATE() does not zero the "buf", so when the condition "integer->type != ACPI_TYPE_INTEGER" in int_to_buf() is met, the result is unpredictable in acpi_nfit_ctl(). Signed-off-by: Zhen Lei Reviewed-by: Dan Williams Link: https://lore.kernel.org/r/20201118073517.1884-1-thunder.leizhen@huawei.com Signed-off-by: Dan Williams commit 919c2299a8930229f2c56a2de27dcacdae0a373f Author: Ville Syrjälä Date: Tue Nov 17 11:47:18 2020 -0800 drm/i915: Enable bigjoiner Enough plumbing should be in place to throw the bigjoiner switch. Signed-off-by: Ville Syrjälä Signed-off-by: Manasi Navare Reviewed-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20201117194718.11462-16-manasi.d.navare@intel.com commit 75c4fa30f92272df6ac13cccf46f8397b0fcb169 Author: Ville Syrjälä Date: Tue Nov 17 11:47:17 2020 -0800 drm/i915: Add bigjoiner state dump Add a big of bigjoiner information to the state dump. Signed-off-by: Ville Syrjälä Signed-off-by: Manasi Navare Reviewed-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20201117194718.11462-15-manasi.d.navare@intel.com commit bf473cb531d9eb47d445ae4a5650bac28537b65e Author: Ville Syrjälä Date: Tue Nov 17 11:47:16 2020 -0800 drm/i915: Fix cursor src/dst rectangle with bigjoiner We can't call drm_plane_state_src() this late for the slave plane since it would consult the wrong uapi state. We've alreayd done the correct uapi->hw copy earlier, so let's just preserve the unclipped src/dst rects using a temp copy across the intel_atomic_plane_check_clipping() call. Signed-off-by: Ville Syrjälä Signed-off-by: Manasi Navare Reviewed-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20201117194718.11462-14-manasi.d.navare@intel.com commit 756c1b8767a54a270f60c00a7d95a2cdd67d70f9 Author: Ville Syrjälä Date: Tue Nov 17 11:47:15 2020 -0800 drm/i915: Disable legacy cursor fastpath for bigjoiner The legacy cursor fastpath code doesn't deal with bigjoiner. Disable the fastpath for now. Signed-off-by: Ville Syrjälä Reviewed-by: Manasi Navare Signed-off-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20201117194718.11462-13-manasi.d.navare@intel.com commit 498fab06f65816650f8eb9e4297c49f945058710 Author: Maarten Lankhorst Date: Tue Nov 17 11:47:14 2020 -0800 drm/i915: Add debugfs dumping for bigjoiner, v3. Dump debugfs and planar links as well, this will make it easier to debug when things go wrong. v4: * Rebase Changes since v1: - Report planar slaves as such, now that we have the plane_state switch. Changes since v2: - Rebase on top of the new plane format dumping Signed-off-by: Maarten Lankhorst Signed-off-by: Manasi Navare Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20201117194718.11462-12-manasi.d.navare@intel.com commit 9f05a7c0adb9ee26dffb8de74b8acfd829629e4a Author: Maarten Lankhorst Date: Tue Nov 17 11:47:13 2020 -0800 drm/i915: Add bigjoiner aware plane clipping checks We need to look at hw.fb for the framebuffer, and add the translation for the slave_plane_state. With these changes we set the correct rectangle on the bigjoiner slave, and don't set incorrect src/dst/visibility on the slave plane. v2: * Manual rebase (Manasi) v3: * hw.rotation instead of uapi.rotation (Ville) Signed-off-by: Maarten Lankhorst Signed-off-by: Manasi Navare Reviewed-by: Stanislav Lisovskiy Link: https://patchwork.freedesktop.org/patch/msgid/20201117194718.11462-11-manasi.d.navare@intel.com commit 8246d9c7ea5e8a1ad66ce7e17184096f51d93912 Author: Ville Syrjälä Date: Tue Nov 17 11:47:12 2020 -0800 drm/i915: Get the uapi state from the correct plane when bigjoiner is used When using bigjoiner userspace is only controlling the "master" plane, so use its uapi state for the "slave" plane as well. hw.crtc needs a bit of magic since we don't want to copy that from the uapi state (as it points to the wrong pipe for the "slave " plane). Instead we pass the right crtc in explicitly but only assign it when the uapi state indicates the plane to be logically enabled (ie. uapi.crtc != NULL). Signed-off-by: Ville Syrjälä Reviewed-by: Manasi Navare Signed-off-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20201117194718.11462-10-manasi.d.navare@intel.com commit 1cf6adb70dedcce139f8b7d94abda9eefb243ec4 Author: Ville Syrjälä Date: Tue Nov 17 11:47:11 2020 -0800 drm/i915: Add planes affected by bigjoiner to the state Make sure both the bigjoiner "master" and "slave" plane are in the state whenever either of them is in the state. Signed-off-by: Ville Syrjälä Reviewed-by: Manasi Navare Signed-off-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20201117194718.11462-9-manasi.d.navare@intel.com commit d321634bd7cf7643cddacf84f300f2a194fee201 Author: Ville Syrjälä Date: Tue Nov 17 11:47:10 2020 -0800 drm/i915: Add crtcs affected by bigjoiner to the state Make sure both crtcs participating in the bigjoiner stuff are in the state. Signed-off-by: Ville Syrjälä Reviewed-by: Manasi Navare Signed-off-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20201117194718.11462-8-manasi.d.navare@intel.com commit 0385ecead5178fffb11c89c3c84a7804a3b42690 Author: Manasi Navare Date: Tue Nov 17 11:47:09 2020 -0800 drm/i915: HW state readout for Bigjoiner case Skip iterating over bigjoiner slaves, only the master has the state we care about. Add the width of the bigjoiner slave to the reconstructed fb. Hide the bigjoiner slave to userspace, and double the mode on bigjoiner master. And last, disable bigjoiner slave from primary if reconstruction fails. v3: * Fix the ddi_get_config slave error (Ankit Nautiyal) v2: * Unsupported bigjoiner config for initial fb (Ville) Signed-off-by: Manasi Navare [vsyrjala: * Don't do any hw->uapi state copy for bigjoiner slave * We still have hw.mode so no need to pass it in * Appease checkpatch] Signed-off-by: Ville Syrjälä Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20201117194718.11462-7-manasi.d.navare@intel.com commit 4e3cdb4535e7cbc860c0cf91df95b7f3a9c84578 Author: Manasi Navare Date: Tue Nov 17 11:47:08 2020 -0800 drm/i915/dp: Master/Slave enable/disable sequence for bigjoiner Enabling is done in a special sequence and so should plane updates be. Ideally the end user never notices the second pipe is used. This way ideally everything will be tear free, and updates are really atomic as userspace expects it. This uses generic modeset_enables() calls like trans port sync but still has special handling for disable since for slave we should not disable things like encoder, plls that are not enabled for slave. Signed-off-by: Manasi Navare [vsyrjala: Appease checkpatch] Signed-off-by: Ville Syrjälä Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20201117194718.11462-6-manasi.d.navare@intel.com commit 8a029c113b179188ed74d3624bf10d56f8a98aa9 Author: Manasi Navare Date: Tue Nov 17 11:47:07 2020 -0800 drm/i915/dp: Modify VDSC helpers to configure DSC for Bigjoiner slave Make vdsc work when no output is enabled. The big joiner needs VDSC on the slave, so enable it and set the appropriate bits. So remove encoder usage from dsc functions. Signed-off-by: Manasi Navare Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20201117194718.11462-5-manasi.d.navare@intel.com commit 19f65a3dbf75b820914ab2fd58a90fa2ce37dc60 Author: Maarten Lankhorst Date: Tue Nov 17 11:47:06 2020 -0800 drm/i915: Try to make bigjoiner work in atomic check When the clock is higher than the dotclock, try with 2 pipes enabled. If we can enable 2, then we will go into big joiner mode, and steal the adjacent crtc. This only links the crtc's in software, no hardware or plane programming is done yet. Blobs are also copied from the master's crtc_state, so it doesn't depend at commit time on the other crtc_state. v6: * Enable dSC for any mode->hdisplay > 5120 v5: * Remove intel_dp_max_dotclock (Manasi) v4: * Fixes in intel_crtc_compute_config (Ville) v3: * Manual Rebase (Manasi) Changes since v1: - Rename pipe timings to transcoder timings, as they are now different. Changes since v2: - Rework bigjoiner checks; always disable slave when recalculating master. No need to have a separate bigjoiner pass any more. - Use pipe_mode instead of transcoder_mode, to clean up the code. Signed-off-by: Maarten Lankhorst Signed-off-by: Manasi Navare [vsyrjala: * hskew isn't a thing * Do the dsc compute if bigjoiner is enabled, not the other way around] Signed-off-by: Ville Syrjälä Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20201117194718.11462-4-manasi.d.navare@intel.com commit 63dc014e37b97e2f5fad6ab3e68c876e4a0f9886 Author: Maarten Lankhorst Date: Tue Nov 17 11:47:05 2020 -0800 drm/i915/dp: Allow big joiner modes in intel_dp_mode_valid(), v3. Small changes to intel_dp_mode_valid(), allow listing modes that can only be supported in the bigjoiner configuration, which is not supported yet. v13: * Allow bigjoiner if hdisplay >5120 v12: * slice_count logic simplify (Ville) * Fix unnecessary changes in downstream_mode_valid (Ville) v11: * Make intel_dp_can_bigjoiner non static so it can be used in intel_display (Manasi) v10: * Simplify logic (Ville) * Allow bigjoiner on edp (Ville) v9: * Restric Bigjoiner on PORT A (Ville) v8: * use source dotclock for max dotclock (Manasi) v7: * Add can_bigjoiner() helper (Ville) * Pass bigjoiner to plane_size validation (Ville) v6: * Rebase after dp_downstream mode valid changes (Manasi) v5: * Increase max plane width to support 8K with bigjoiner (Maarten) v4: * Rebase (Manasi) Changes since v1: - Disallow bigjoiner on eDP. Changes since v2: - Rename intel_dp_downstream_max_dotclock to intel_dp_max_dotclock, and split off the downstream and source checking to its own function. (Ville) v3: * Rebase (Manasi) Signed-off-by: Manasi Navare Signed-off-by: Maarten Lankhorst [vsyrjala: * Keep bigjoiner disabled until everything is ready * Appease checkpatch] Signed-off-by: Ville Syrjälä Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20201117194718.11462-3-manasi.d.navare@intel.com commit e85e7458298783fe3b3a43383090df1a0de1bfa4 Author: Ville Syrjälä Date: Tue Nov 17 11:47:04 2020 -0800 drm/i915: Copy the plane hw state directly for Y planes When doing the plane state copy from the UV plane to the Y plane let's just copy the hw state directly instead of using the original uapi state. The UV plane has already had its uapi state copied into its hw state, so this extra detour via the uapi state for the Y plane is pointless. Signed-off-by: Ville Syrjälä Reviewed-by: Stanislav Lisovskiy Signed-off-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20201117194718.11462-2-manasi.d.navare@intel.com commit e7de4aee0a0ad741397822e1b7887e790b3944a8 Author: Tao Zhou Date: Fri Oct 2 13:55:53 2020 -0400 drm/amdgpu: add DID for dimgrey_cavefish Add device id for dimgrey_cavefish. Signed-off-by: Tao Zhou Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit 2c1eadddec8c1732d96fa5505451e8173257d064 Author: Tao Zhou Date: Mon Jun 8 16:48:02 2020 +0800 drm/amdgpu: add device ID for navy_flounder (v2) add device ID for navy_flounder v2: squash in updates Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 31c0ed90b978f9fe99d48dc4a624ed0fe0dc21b7 Author: Bhawanpreet Lakha Date: Thu Sep 26 17:44:50 2019 -0400 drm/amd/display: Add comments to hdcp property change code [Why] These comments are helpful in understanding which case each if statement handles. [How] Add comments for state transitions (9 possible cases) Signed-off-by: Bhawanpreet Lakha Reviewed-by: Zhan Liu Signed-off-by: Alex Deucher commit 97f6c91787d9fc5c468bac398f11685179f64e8a Author: Bhawanpreet Lakha Date: Thu Sep 26 16:55:24 2019 -0400 drm/amd/display: Add display only once. [Why] We call add display multiple times because DESIRED->ENABLED cannot happen instantaneously. We can't compare the new_state/old_state to avoid this because on unplug we set the state to DESIRED and on hotplug the state will still be DESIRED. [How] Add a flag to dm_connector_state to keep track of when to enable or disable HDCP Signed-off-by: Bhawanpreet Lakha Reviewed-by: Zhan Liu Signed-off-by: Alex Deucher commit c28f91dc5e4d640be5dc737c50bd46fc0afa1ab4 Author: Tao Zhou Date: Tue Nov 17 14:24:17 2020 +0800 drm/amd/pm: support runtime PPTable update for dimgrey_cavefish There is no need to reset DPM for PPTable uploading on dimgrey_cavefish and PMFW can handle it, same as navy_flounder. Signed-off-by: Tao Zhou Reviewed-by: Jiansong Chen Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit eb45604e29481ce20e737ec20fdd41a40b222742 Author: Ryan Taylor Date: Tue Nov 10 14:20:08 2020 -0800 drm/amd/pm: fix smu_v11_0_init_power power_context allocation Allocate smu_power->power_context to size of smu_11_0_power_context instead of smu_11_0_dpm_context. Signed-off-by: Ryan Taylor Reviewed-by: Alex Deucher Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 8976f73b676eb96d27ac1f7034fb36dd22292e21 Author: Rodrigo Siqueira Date: Tue Nov 17 09:33:51 2020 -0500 drm/amd/display: Always get CRTC updated constant values inside commit tail We recently improved our display atomic commit and tail sequence to avoid some issues related to concurrency. One of the major changes consisted of moving the interrupt disable and the stream release from our atomic commit to our atomic tail (commit 6d90a208cfff ("drm/amd/display: Move disable interrupt into commit tail")) . However, the new code introduced inside our commit tail function was inserted right after the function drm_atomic_helper_update_legacy_modeset_state(), which has routines for updating internal data structs related to timestamps. As a result, in certain conditions, the display module can reach a situation where we update our constants and, after that, clean it. This situation generates the following warning: amdgpu 0000:03:00.0: drm_WARN_ON_ONCE(drm_drv_uses_atomic_modeset(dev)) WARNING: CPU: 6 PID: 1269 at drivers/gpu/drm/drm_vblank.c:722 drm_crtc_vblank_helper_get_vblank_timestamp_internal+0x32b/0x340 [drm] ... RIP: 0010:drm_crtc_vblank_helper_get_vblank_timestamp_internal+0x32b/0x340 [drm] ... Call Trace: ? dc_stream_get_vblank_counter+0x57/0x60 [amdgpu] drm_crtc_vblank_helper_get_vblank_timestamp+0x1c/0x20 [drm] drm_get_last_vbltimestamp+0xad/0xc0 [drm] drm_reset_vblank_timestamp+0x63/0xd0 [drm] drm_crtc_vblank_on+0x85/0x150 [drm] amdgpu_dm_atomic_commit_tail+0xaf1/0x2330 [amdgpu] commit_tail+0x99/0x130 [drm_kms_helper] drm_atomic_helper_commit+0x123/0x150 [drm_kms_helper] amdgpu_dm_atomic_commit+0x11/0x20 [amdgpu] drm_atomic_commit+0x4a/0x50 [drm] drm_atomic_helper_set_config+0x7c/0xc0 [drm_kms_helper] drm_mode_setcrtc+0x20b/0x7e0 [drm] ? tomoyo_path_number_perm+0x6f/0x200 ? drm_mode_getcrtc+0x190/0x190 [drm] drm_ioctl_kernel+0xae/0xf0 [drm] drm_ioctl+0x245/0x400 [drm] ? drm_mode_getcrtc+0x190/0x190 [drm] amdgpu_drm_ioctl+0x4e/0x80 [amdgpu] __x64_sys_ioctl+0x91/0xc0 do_syscall_64+0x38/0x90 entry_SYSCALL_64_after_hwframe+0x44/0xa9 ... For fixing this issue we rely upon a refactor introduced on drm_atomic_helper_update_legacy_modeset_state ("Remove the timestamping constant update from drm_atomic_helper_update_legacy_modeset_state()") which decouples constant values update from drm_atomic_helper_update_legacy_modeset_state to a new helper. Basically, this commit uses this new helper and place it right after our release module to avoid a situation where our CRTC struct gets wrong values. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1373 Reviewed-by: Harry Wentland Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit d04a53b1c48766665806eb75b73137734abdaa95 Author: Ahmad Fatoum Date: Tue Nov 17 22:38:26 2020 +0100 ptp: document struct ptp_clock_request members It's arguable most people interested in configuring a PPS signal want it as external output, not as kernel input. PTP_CLK_REQ_PPS is for input though. Add documentation to nudge readers into the correct direction. Signed-off-by: Ahmad Fatoum Acked-by: Richard Cochran Link: https://lore.kernel.org/r/20201117213826.18235-1-a.fatoum@pengutronix.de Signed-off-by: Jakub Kicinski commit 7d94ca3c8acd0117200f34523536ee01615e7dc3 Author: Jiaxin Yu Date: Wed Nov 11 16:05:20 2020 +0800 ASoC: mt8192: revert "add audio afe document" This reverts commit 1afc60e00de3abbb6c559da409c5c1bb8c1d98ec (dt-bindings: mediatek: mt8192: add audio afe document). https://mailman.alsa-project.org/pipermail/alsa-devel/2020-November/176873.html These dependency are continuing to upstream, I will revert this patch first. After the dependencies are merged, I will send 'mt8192-afe-pcm.yaml' again. [Massaged commit message to put hint about issue being fixed into there rather than the trailer -- broonie] Signed-off-by: Jiaxin Yu Acked-by: Rob Herring Link: https://lore.kernel.org/r/1605081920-11848-1-git-send-email-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown commit 03fc41afaa6549baa2dab7a84e1afaf5cadb5b18 Author: Zhang Qilong Date: Fri Nov 6 09:24:21 2020 +0800 spi: mxs: fix reference leak in mxs_spi_probe pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to pm_runtime_put_noidle will result in reference leak in mxs_spi_probe, so we should fix it. Fixes: b7969caf41a1d ("spi: mxs: implement runtime pm") Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20201106012421.95420-1-zhangqilong3@huawei.com Signed-off-by: Mark Brown commit 45f366ec7941932d1a14576f3bd73d831fe9da95 Author: Zou Wei Date: Mon Nov 16 20:29:00 2020 +0800 ASoC: samsung: fix platform_no_drv_owner.cocci warnings ./sound/soc/samsung/midas_wm1811.c:534:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Zou Wei Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/1605529740-68757-1-git-send-email-zou_wei@huawei.com Signed-off-by: Mark Brown commit b88b31f4fa0abcd698045362d4aefcddc50cba59 Author: Kyle Russell Date: Fri Nov 6 09:59:05 2020 -0500 ASoC: mmp-sspa: clear transmit phase bit for non-stereo formats The transmit phase register value is never cleared during hw params. So once hw params sets this bit to handle a two channel format, it remains configured for dual-phase, which is not desirable for mono playback. Signed-off-by: Kyle Russell Link: https://lore.kernel.org/r/20201106145905.365903-1-bkylerussell@gmail.com Signed-off-by: Mark Brown commit a5ec7c9e007b1095d04146eb94bac3863d35a69d Author: Kaixu Xia Date: Fri Nov 6 16:53:36 2020 +0800 ASoC: wcd9335: Remove unnecessary conversion to bool The '>=' expression itself is bool, no need to convert it to bool. Fix the following coccicheck warning: ./sound/soc/codecs/wcd9335.c:3982:25-30: WARNING: conversion to bool not needed here Reported-by: Tosk Robot Signed-off-by: Kaixu Xia Link: https://lore.kernel.org/r/1604652816-1330-1-git-send-email-kaixuxia@tencent.com Signed-off-by: Mark Brown commit 251bf658558f9feff8a92ddcde402ffa220d13b8 Author: Rob Herring Date: Mon Nov 16 19:33:49 2020 -0600 ASoC: dt-bindings: Refine 'frame-master' and 'bitclock-master' type 'frame-master' and 'bitclock-master' are only a single phandle, so use the more specific 'phandle' type definition instead. Signed-off-by: Rob Herring Acked-by: Sameer Pujar Link: https://lore.kernel.org/r/20201117013349.2458416-5-robh@kernel.org Signed-off-by: Mark Brown commit fd97ee45ec63759593b06be010a8ed395b299cce Author: Rob Herring Date: Mon Nov 16 19:33:48 2020 -0600 ASoC: dt-bindings: marvell, mmp-sspa: Use audio-graph-port schema Now that we have a graph schema, reference it from the marvell,mmp-sspa schema. Signed-off-by: Rob Herring Acked-by: Lubomir Rintel Link: https://lore.kernel.org/r/20201117013349.2458416-4-robh@kernel.org Signed-off-by: Mark Brown commit e52f3f291152042f1759b2b8838e7ca24556997e Author: Sameer Pujar Date: Mon Nov 16 19:33:46 2020 -0600 ASoC: audio-graph-card: Refactor schema There can be customized sound cards which are based on generic audio graph. In such cases most of the stuff is reused from generic audio graph. To facilitate this, refactor audio graph schema into multiple files and the base schema can be reused for specific sound cards. The graph card nodes and port nodes are separate entities, so they should be separate schemas. Signed-off-by: Sameer Pujar Cc: Kuninori Morimoto [robh: Split out port schema. Add graph.yaml in subsequent commit] Signed-off-by: Rob Herring Acked-by: Sameer Pujar Link: https://lore.kernel.org/r/20201117013349.2458416-2-robh@kernel.org Signed-off-by: Mark Brown commit bab78c238025c89df771631c54f6229f6c56fb26 Author: Kuninori Morimoto Date: Fri Nov 13 13:16:41 2020 +0900 ASoC: soc-component: add snd_soc_component_compr_get_metadata() component related function should be implemented at soc-component.c. This patch adds snd_soc_component_compr_get_metadata(). Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/87zh3l6gl8.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 1b308fb138eba8dd57198b25235d8369a42af293 Author: Kuninori Morimoto Date: Fri Nov 13 13:16:36 2020 +0900 ASoC: soc-component: add snd_soc_component_compr_set_metadata() component related function should be implemented at soc-component.c. This patch adds snd_soc_component_compr_set_metadata(). Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/871rgx7v5t.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit b5852e66b115172dc3a88cb476b99c21ac6ffed8 Author: Kuninori Morimoto Date: Fri Nov 13 13:16:30 2020 +0900 ASoC: soc-component: add snd_soc_component_compr_copy() component related function should be implemented at soc-component.c. This patch adds snd_soc_component_compr_copy(). Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/87361d7v5z.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 03ecea64e0ae26d7a8b53bce05a39b78022e1312 Author: Kuninori Morimoto Date: Fri Nov 13 13:16:24 2020 +0900 ASoC: soc-component: add snd_soc_component_compr_pointer() component related function should be implemented at soc-component.c. This patch adds snd_soc_component_compr_pointer(). Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/874klt7v65.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 0506b88503645e71c18152693caee9cfa1dbf093 Author: Kuninori Morimoto Date: Fri Nov 13 13:16:17 2020 +0900 ASoC: soc-component: add snd_soc_component_compr_ack() component related function should be implemented at soc-component.c. This patch adds snd_soc_component_compr_ack(). Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/875z697v6c.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 0f6fe09720a3f307ab9f218f052d40b7d4e42b4c Author: Kuninori Morimoto Date: Fri Nov 13 13:16:11 2020 +0900 ASoC: soc-component: add snd_soc_component_compr_get_codec_caps() component related function should be implemented at soc-component.c. This patch adds snd_soc_component_compr_get_codec_caps(). Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/877dqp7v6i.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit d67fcb2d8f15df6f98698f411d9cb8c221ab6c91 Author: Kuninori Morimoto Date: Fri Nov 13 13:16:03 2020 +0900 ASoC: soc-component: add snd_soc_component_compr_get_caps() component related function should be implemented at soc-component.c. This patch adds snd_soc_component_compr_get_caps(). Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/878sb57v6q.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 77c221ecfed8762f65d17f3a6ee7b4f2cec61ae4 Author: Kuninori Morimoto Date: Fri Nov 13 13:15:56 2020 +0900 ASoC: soc-component: add snd_soc_component_compr_get_params() component related function should be implemented at soc-component.c. This patch adds snd_soc_component_compr_get_params(). Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/87a6vl7v6x.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit ff08cf80addacbf42d419c2ef5561562f765bda3 Author: Kuninori Morimoto Date: Fri Nov 13 13:15:49 2020 +0900 ASoC: soc-component: add snd_soc_component_compr_set_params() component related function should be implemented at soc-component.c. This patch moves soc-compress soc_compr_components_set_params() to soc-component as snd_soc_component_compr_set_params(). Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/87blg17v74.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 08aee25114426ba988ccb27af057dcf7faaa61ac Author: Kuninori Morimoto Date: Fri Nov 13 13:15:33 2020 +0900 ASoC: soc-component: add snd_soc_component_compr_trigger() component related function should be implemented at soc-component.c. This patch moves soc-compress soc_compr_components_trigger() to soc-component as snd_soc_component_compr_trigger(). Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/87d00h7v7k.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit dbde5e21140cd2ad9d9e8eeeb104755f5294ce9f Author: Kuninori Morimoto Date: Fri Nov 13 13:15:26 2020 +0900 ASoC: soc-component: add snd_soc_component_compr_free() component related function should be implemented at soc-component.c. This patch moves soc-compress soc_compr_components_free() to soc-component as snd_soc_component_compr_free(). Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/87eekx7v7r.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit a4e427c59a266dc3eb0eb5d52879b067a6f6e73b Author: Kuninori Morimoto Date: Fri Nov 13 13:15:20 2020 +0900 ASoC: soc-component: add snd_soc_component_compr_open() component related function should be implemented at soc-component.c. This patch moves soc-compress soc_compr_components_open() to soc-component as snd_soc_component_compr_open(). Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/87ft5d7v7x.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 61d35648c06cac042d88c6d0b8df8f8c8c72a4d4 Author: Zhang Xiaoxu Date: Mon Nov 16 08:58:10 2020 -0500 EDAC/synopsys: Return the correct value in mc_probe() Return the error value if the inject sysfs file creation fails, rather than returning 0, to signal to the upper layer that the ->probe function failed. [ bp: Massage. ] Signed-off-by: Zhang Xiaoxu Signed-off-by: Borislav Petkov Reviewed-by: Michal Simek Link: https://lkml.kernel.org/r/20201116135810.3130845-1-zhangxiaoxu5@huawei.com commit ed30aef3c864f99111e16d4ea5cf29488d99a278 Author: Gustavo A. R. Silva Date: Tue Nov 17 11:13:47 2020 -0600 nfp: tls: Fix unreachable code issue Fix the following unreachable code issue: drivers/net/ethernet/netronome/nfp/crypto/tls.c: In function 'nfp_net_tls_add': include/linux/compiler_attributes.h:208:41: warning: statement will never be executed [-Wswitch-unreachable] 208 | # define fallthrough __attribute__((__fallthrough__)) | ^~~~~~~~~~~~~ drivers/net/ethernet/netronome/nfp/crypto/tls.c:299:3: note: in expansion of macro 'fallthrough' 299 | fallthrough; | ^~~~~~~~~~~ Reported-by: kernel test robot Signed-off-by: Gustavo A. R. Silva Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20201117171347.GA27231@embeddedor Signed-off-by: Jakub Kicinski commit 0eaa8d153a1d573e53b8283c90db44057d1376f6 Author: Jarkko Sakkinen Date: Wed Nov 18 19:06:40 2020 +0200 selftests/sgx: Use a statically generated 3072-bit RSA key Use a statically generated key for signing the enclave, because generating keys on the fly can eat the kernel entropy pool. Another good reason for doing this is predictable builds. The RSA has been arbitrarily selected. It's contents do not matter. This also makes the selftest execute a lot quicker instead of the delay that it had before (because of slow key generation). [ bp: Disambiguate "static key" which means something else in the kernel, fix typos. ] Signed-off-by: Jarkko Sakkinen Signed-off-by: Borislav Petkov Cc: linux-kselftest@vger.kernel.org Link: https://lkml.kernel.org/r/20201118170640.39629-1-jarkko@kernel.org commit 67655b57f8f59467506463055d9a8398d2836377 Author: Dave Hansen Date: Mon Nov 16 14:25:31 2020 -0800 x86/sgx: Clarify 'laundry_list' locking Short Version: The SGX section->laundry_list structure is effectively thread-local, but declared next to some shared structures. Its semantics are clear as mud. Fix that. No functional changes. Compile tested only. Long Version: The SGX hardware keeps per-page metadata. This can provide things like permissions, integrity and replay protection. It also prevents things like having an enclave page mapped multiple times or shared between enclaves. But, that presents a problem for kexec()'d kernels (or any other kernel that does not run immediately after a hardware reset). This is because the last kernel may have been rude and forgotten to reset pages, which would trigger the "shared page" sanity check. To fix this, the SGX code "launders" the pages by running the EREMOVE instruction on all pages at boot. This is slow and can take a long time, so it is performed off in the SGX-specific ksgxd instead of being synchronous at boot. The init code hands the list of pages to launder in a per-SGX-section list: ->laundry_list. The only code to touch this list is the init code and ksgxd. This means that no locking is necessary for ->laundry_list. However, a lock is required for section->page_list, which is accessed while creating enclaves and by ksgxd. This lock (section->lock) is acquired by ksgxd while also processing ->laundry_list. It is easy to confuse the purpose of the locking as being for ->laundry_list and ->page_list. Rename ->laundry_list to ->init_laundry_list to make it clear that this is not normally used at runtime. Also add some comments clarifying the locking, and reorganize 'sgx_epc_section' to put 'lock' near the things it protects. Note: init_laundry_list is 128 bytes of wasted space at runtime. It could theoretically be dynamically allocated and then freed after the laundering process. But it would take nearly 128 bytes of extra instructions to do that. Signed-off-by: Jarkko Sakkinen Signed-off-by: Dave Hansen Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201116222531.4834-1-dave.hansen@intel.com commit bc4bac2ecef0e47fd5c02f9c6f9585fd477f9beb Author: Jarkko Sakkinen Date: Fri Nov 13 00:01:35 2020 +0200 x86/sgx: Update MAINTAINERS Add the maintainer information for the SGX subsystem. Signed-off-by: Jarkko Sakkinen Signed-off-by: Borislav Petkov Acked-by: Jethro Beekman Link: https://lkml.kernel.org/r/20201112220135.165028-25-jarkko@kernel.org commit 3fa97bf001262a1d88ec9b4ac5ae6abe0ed1356c Author: Jarkko Sakkinen Date: Fri Nov 13 00:01:34 2020 +0200 Documentation/x86: Document SGX kernel architecture Document the Intel SGX kernel architecture. The fine-grained architecture details can be looked up from Intel SDM Volume 3D. Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Signed-off-by: Jarkko Sakkinen Signed-off-by: Borislav Petkov Acked-by: Jethro Beekman Cc: linux-doc@vger.kernel.org Link: https://lkml.kernel.org/r/20201112220135.165028-24-jarkko@kernel.org commit 739003c6428387432d42b9b80be185cde93978aa Author: Peter Collingbourne Date: Tue Nov 17 19:20:51 2020 -0800 arm64: mte: optimize asynchronous tag check fault flag check We don't need to check for MTE support before checking the flag because it can only be set if the hardware supports MTE. As a result we can unconditionally check the flag bit which is expected to be in a register and therefore the check can be done in a single instruction instead of first needing to load the hwcaps. On a DragonBoard 845c with a kernel built with CONFIG_ARM64_MTE=y with the powersave governor this reduces the cost of a kernel entry/exit (invalid syscall) from 465.1ns to 463.8ns. Signed-off-by: Peter Collingbourne Link: https://linux-review.googlesource.com/id/If4dc3501fd4e4f287322f17805509613cfe47d24 Link: https://lore.kernel.org/r/20201118032051.1405907-1-pcc@google.com [catalin.marinas@arm.com: remove IS_ENABLED(CONFIG_ARM64_MTE)] Signed-off-by: Catalin Marinas commit 31d8546033053b98de00846ede8088bdbe38651d Author: Arvind Sankar Date: Mon Oct 5 11:12:08 2020 -0400 x86/head/64: Remove unused GET_CR2_INTO() macro Commit 4b47cdbda6f1 ("x86/head/64: Move early exception dispatch to C code") removed the usage of GET_CR2_INTO(). Drop the definition as well, and related definitions in paravirt.h and asm-offsets.h Signed-off-by: Arvind Sankar Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201005151208.2212886-3-nivedita@alum.mit.edu commit 947c6e11fa4310b31c10016ae9816cdca3f1694e Author: Jarkko Sakkinen Date: Fri Nov 13 00:01:33 2020 +0200 x86/sgx: Add ptrace() support for the SGX driver Enclave memory is normally inaccessible from outside the enclave. This makes enclaves hard to debug. However, enclaves can be put in a debug mode when they are being built. In that mode, enclave data *can* be read and/or written by using the ENCLS[EDBGRD] and ENCLS[EDBGWR] functions. This is obviously only for debugging and destroys all the protections present with normal enclaves. But, enclaves know their own debug status and can adjust their behavior appropriately. Add a vm_ops->access() implementation which can be used to read and write memory inside debug enclaves. This is typically used via ptrace() APIs. [ bp: Massage. ] Signed-off-by: Jarkko Sakkinen Signed-off-by: Borislav Petkov Tested-by: Jethro Beekman Link: https://lkml.kernel.org/r/20201112220135.165028-23-jarkko@kernel.org commit 1728ab54b4be94aed89276eeb8e750a345659765 Author: Jarkko Sakkinen Date: Fri Nov 13 00:01:32 2020 +0200 x86/sgx: Add a page reclaimer Just like normal RAM, there is a limited amount of enclave memory available and overcommitting it is a very valuable tool to reduce resource use. Introduce a simple reclaim mechanism for enclave pages. In contrast to normal page reclaim, the kernel cannot directly access enclave memory. To get around this, the SGX architecture provides a set of functions to help. Among other things, these functions copy enclave memory to and from normal memory, encrypting it and protecting its integrity in the process. Implement a page reclaimer by using these functions. Picks victim pages in LRU fashion from all the enclaves running in the system. A new kernel thread (ksgxswapd) reclaims pages in the background based on watermarks, similar to normal kswapd. All enclave pages can be reclaimed, architecturally. But, there are some limits to this, such as the special SECS metadata page which must be reclaimed last. The page version array (used to mitigate replaying old reclaimed pages) is also architecturally reclaimable, but not yet implemented. The end result is that the vast majority of enclave pages are currently reclaimable. Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Signed-off-by: Jarkko Sakkinen Signed-off-by: Borislav Petkov Acked-by: Jethro Beekman Link: https://lkml.kernel.org/r/20201112220135.165028-22-jarkko@kernel.org commit 2adcba79e69d4a4c0ac3bb86f466d8b5df301608 Author: Jarkko Sakkinen Date: Fri Nov 13 00:01:31 2020 +0200 selftests/x86: Add a selftest for SGX Add a selftest for SGX. It is a trivial test where a simple enclave copies one 64-bit word of memory between two memory locations, but ensures that all SGX hardware and software infrastructure is functioning. Signed-off-by: Jarkko Sakkinen Signed-off-by: Borislav Petkov Acked-by: Jethro Beekman Cc: linux-kselftest@vger.kernel.org Link: https://lkml.kernel.org/r/20201112220135.165028-21-jarkko@kernel.org commit 84664369520170f48546c55cbc1f3fbde9b1e140 Author: Sean Christopherson Date: Fri Nov 13 00:01:30 2020 +0200 x86/vdso: Implement a vDSO for Intel SGX enclave call Enclaves encounter exceptions for lots of reasons: everything from enclave page faults to NULL pointer dereferences, to system calls that must be “proxied” to the kernel from outside the enclave. In addition to the code contained inside an enclave, there is also supporting code outside the enclave called an “SGX runtime”, which is virtually always implemented inside a shared library. The runtime helps build the enclave and handles things like *re*building the enclave if it got destroyed by something like a suspend/resume cycle. The rebuilding has traditionally been handled in SIGSEGV handlers, registered by the library. But, being process-wide, shared state, signal handling and shared libraries do not mix well. Introduce a vDSO function call that wraps the enclave entry functions (EENTER/ERESUME functions of the ENCLU instruciton) and returns information about any exceptions to the caller in the SGX runtime. Instead of generating a signal, the kernel places exception information in RDI, RSI and RDX. The kernel-provided userspace portion of the vDSO handler will place this information in a user-provided buffer or trigger a user-provided callback at the time of the exception. The vDSO function calling convention uses the standard RDI RSI, RDX, RCX, R8 and R9 registers. This makes it possible to declare the vDSO as a C prototype, but other than that there is no specific support for SystemV ABI. Things like storing XSAVE are the responsibility of the enclave and the runtime. [ bp: Change vsgx.o build dependency to CONFIG_X86_SGX. ] Suggested-by: Andy Lutomirski Signed-off-by: Sean Christopherson Co-developed-by: Cedric Xing Signed-off-by: Cedric Xing Co-developed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen Signed-off-by: Borislav Petkov Tested-by: Jethro Beekman Link: https://lkml.kernel.org/r/20201112220135.165028-20-jarkko@kernel.org commit 334872a0919890a70cccd00b8e11931020a819be Author: Sean Christopherson Date: Fri Nov 13 00:01:29 2020 +0200 x86/traps: Attempt to fixup exceptions in vDSO before signaling vDSO functions can now leverage an exception fixup mechanism similar to kernel exception fixup. For vDSO exception fixup, the initial user is Intel's Software Guard Extensions (SGX), which will wrap the low-level transitions to/from the enclave, i.e. EENTER and ERESUME instructions, in a vDSO function and leverage fixup to intercept exceptions that would otherwise generate a signal. This allows the vDSO wrapper to return the fault information directly to its caller, obviating the need for SGX applications and libraries to juggle signal handlers. Attempt to fixup vDSO exceptions immediately prior to populating and sending signal information. Except for the delivery mechanism, an exception in a vDSO function should be treated like any other exception in userspace, e.g. any fault that is successfully handled by the kernel should not be directly visible to userspace. Although it's debatable whether or not all exceptions are of interest to enclaves, defer to the vDSO fixup to decide whether to do fixup or generate a signal. Future users of vDSO fixup, if there ever are any, will undoubtedly have different requirements than SGX enclaves, e.g. the fixup vs. signal logic can be made function specific if/when necessary. Suggested-by: Andy Lutomirski Signed-off-by: Sean Christopherson Signed-off-by: Jarkko Sakkinen Signed-off-by: Borislav Petkov Acked-by: Jethro Beekman Link: https://lkml.kernel.org/r/20201112220135.165028-19-jarkko@kernel.org commit cd072dab453a9b4a9f7927f9eddca5a156fbd87d Author: Sean Christopherson Date: Fri Nov 13 00:01:28 2020 +0200 x86/fault: Add a helper function to sanitize error code vDSO exception fixup is a replacement for signals in limited situations. Signals and vDSO exception fixup need to provide similar information to userspace, including the hardware error code. That hardware error code needs to be sanitized. For instance, if userspace accesses a kernel address, the error code could indicate to userspace whether the address had a Present=1 PTE. That can leak information about the kernel layout to userspace, which is bad. The existing signal code does this sanitization, but fairly late in the signal process. The vDSO exception code runs before the sanitization happens. Move error code sanitization out of the signal code and into a helper. Call the helper in the signal code. Signed-off-by: Sean Christopherson Signed-off-by: Jarkko Sakkinen Signed-off-by: Borislav Petkov Acked-by: Jethro Beekman Link: https://lkml.kernel.org/r/20201112220135.165028-18-jarkko@kernel.org commit 8382c668ce4f367d902f4a340a1bfa9e46096ec1 Author: Sean Christopherson Date: Fri Nov 13 00:01:27 2020 +0200 x86/vdso: Add support for exception fixup in vDSO functions Signals are a horrid little mechanism. They are especially nasty in multi-threaded environments because signal state like handlers is global across the entire process. But, signals are basically the only way that userspace can “gracefully” handle and recover from exceptions. The kernel generally does not like exceptions to occur during execution. But, exceptions are a fact of life and must be handled in some circumstances. The kernel handles them by keeping a list of individual instructions which may cause exceptions. Instead of truly handling the exception and returning to the instruction that caused it, the kernel instead restarts execution at a *different* instruction. This makes it obvious to that thread of execution that the exception occurred and lets *that* code handle the exception instead of the handler. This is not dissimilar to the try/catch exceptions mechanisms that some programming languages have, but applied *very* surgically to single instructions. It effectively changes the visible architecture of the instruction. Problem ======= SGX generates a lot of signals, and the code to enter and exit enclaves and muck with signal handling is truly horrid. At the same time, an approach like kernel exception fixup can not be easily applied to userspace instructions because it changes the visible instruction architecture. Solution ======== The vDSO is a special page of kernel-provided instructions that run in userspace. Any userspace calling into the vDSO knows that it is special. This allows the kernel a place to legitimately rewrite the user/kernel contract and change instruction behavior. Add support for fixing up exceptions that occur while executing in the vDSO. This replaces what could traditionally only be done with signal handling. This new mechanism will be used to replace previously direct use of SGX instructions by userspace. Just introduce the vDSO infrastructure. Later patches will actually replace signal generation with vDSO exception fixup. Suggested-by: Andy Lutomirski Signed-off-by: Sean Christopherson Signed-off-by: Jarkko Sakkinen Signed-off-by: Borislav Petkov Acked-by: Jethro Beekman Link: https://lkml.kernel.org/r/20201112220135.165028-17-jarkko@kernel.org commit c82c61865024b9981f00358433bebed92ca20c00 Author: Jarkko Sakkinen Date: Fri Nov 13 00:01:26 2020 +0200 x86/sgx: Add SGX_IOC_ENCLAVE_PROVISION The whole point of SGX is to create a hardware protected place to do “stuff”. But, before someone is willing to hand over the keys to the castle , an enclave must often prove that it is running on an SGX-protected processor. Provisioning enclaves play a key role in providing proof. There are actually three different enclaves in play in order to make this happen: 1. The application enclave. The familiar one we know and love that runs the actual code that’s doing real work. There can be many of these on a single system, or even in a single application. 2. The quoting enclave (QE). The QE is mentioned in lots of silly whitepapers, but, for the purposes of kernel enabling, just pretend they do not exist. 3. The provisioning enclave. There is typically only one of these enclaves per system. Provisioning enclaves have access to a special hardware key. They can use this key to help to generate certificates which serve as proof that enclaves are running on trusted SGX hardware. These certificates can be passed around without revealing the special key. Any user who can create a provisioning enclave can access the processor-unique Provisioning Certificate Key which has privacy and fingerprinting implications. Even if a user is permitted to create normal application enclaves (via /dev/sgx_enclave), they should not be able to create provisioning enclaves. That means a separate permissions scheme is needed to control provisioning enclave privileges. Implement a separate device file (/dev/sgx_provision) which allows creating provisioning enclaves. This device will typically have more strict permissions than the plain enclave device. The actual device “driver” is an empty stub. Open file descriptors for this device will represent a token which allows provisioning enclave duty. This file descriptor can be passed around and ultimately given as an argument to the /dev/sgx_enclave driver ioctl(). [ bp: Touchups. ] Suggested-by: Andy Lutomirski Signed-off-by: Jarkko Sakkinen Signed-off-by: Borislav Petkov Cc: linux-security-module@vger.kernel.org Link: https://lkml.kernel.org/r/20201112220135.165028-16-jarkko@kernel.org commit 9d0c151b41fed7b879030f4e533143d098781701 Author: Jarkko Sakkinen Date: Fri Nov 13 00:01:25 2020 +0200 x86/sgx: Add SGX_IOC_ENCLAVE_INIT Enclaves have two basic states. They are either being built and are malleable and can be modified by doing things like adding pages. Or, they are locked down and not accepting changes. They can only be run after they have been locked down. The ENCLS[EINIT] function induces the transition from being malleable to locked-down. Add an ioctl() that performs ENCLS[EINIT]. After this, new pages can no longer be added with ENCLS[EADD]. This is also the time where the enclave can be measured to verify its integrity. Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Signed-off-by: Jarkko Sakkinen Signed-off-by: Borislav Petkov Tested-by: Jethro Beekman Link: https://lkml.kernel.org/r/20201112220135.165028-15-jarkko@kernel.org commit c6d26d370767fa227fc44b98a8bdad112efdf563 Author: Jarkko Sakkinen Date: Fri Nov 13 00:01:24 2020 +0200 x86/sgx: Add SGX_IOC_ENCLAVE_ADD_PAGES SGX enclave pages are inaccessible to normal software. They must be populated with data by copying from normal memory with the help of the EADD and EEXTEND functions of the ENCLS instruction. Add an ioctl() which performs EADD that adds new data to an enclave, and optionally EEXTEND functions that hash the page contents and use the hash as part of enclave “measurement” to ensure enclave integrity. The enclave author gets to decide which pages will be included in the enclave measurement with EEXTEND. Measurement is very slow and has sometimes has very little value. For instance, an enclave _could_ measure every page of data and code, but would be slow to initialize. Or, it might just measure its code and then trust that code to initialize the bulk of its data after it starts running. Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Signed-off-by: Jarkko Sakkinen Signed-off-by: Borislav Petkov Tested-by: Jethro Beekman Link: https://lkml.kernel.org/r/20201112220135.165028-14-jarkko@kernel.org commit 888d249117876239593fe3039b6ead8ad6849035 Author: Jarkko Sakkinen Date: Fri Nov 13 00:01:23 2020 +0200 x86/sgx: Add SGX_IOC_ENCLAVE_CREATE Add an ioctl() that performs the ECREATE function of the ENCLS instruction, which creates an SGX Enclave Control Structure (SECS). Although the SECS is an in-memory data structure, it is present in enclave memory and is not directly accessible by software. Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Signed-off-by: Jarkko Sakkinen Signed-off-by: Borislav Petkov Tested-by: Jethro Beekman Link: https://lkml.kernel.org/r/20201112220135.165028-13-jarkko@kernel.org commit 3fe0778edac8628637e2fd23835996523b1a3372 Author: Jarkko Sakkinen Date: Fri Nov 13 00:01:22 2020 +0200 x86/sgx: Add an SGX misc driver interface Intel(R) SGX is a new hardware functionality that can be used by applications to set aside private regions of code and data called enclaves. New hardware protects enclave code and data from outside access and modification. Add a driver that presents a device file and ioctl API to build and manage enclaves. [ bp: Small touchups, remove unused encl variable in sgx_encl_find() as Reported-by: kernel test robot ] Signed-off-by: Jarkko Sakkinen Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Signed-off-by: Borislav Petkov Tested-by: Jethro Beekman Link: https://lkml.kernel.org/r/20201112220135.165028-12-jarkko@kernel.org commit 3a37b918946e04da7902b83917764f73cc0bd90c Author: Steven Rostedt (VMware) Date: Mon Nov 16 15:46:52 2020 -0500 ftrace/documentation: Fix RST C code blocks Some C code in the ftrace-users.rst document is missing RST C block annotation, which has to be added. Link: https://lore.kernel.org/r/20201116173502.392a769c@canb.auug.org.au Acked-by: Jonathan Corbet Reported-by: Stephen Rothwell Signed-off-by: Steven Rostedt (VMware) commit b1246bd4a18b50c0f424a877ab64605ce8ebad86 Author: Luben Tuikov Date: Tue Nov 10 00:15:48 2020 -0500 drm/amdgpu: Fix missing prototype warning Fix a missing prototype warning for function amdgpu_info_ioctl(), drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c:482:5: warning: no previous prototype for 'amdgpu_info_ioctl' [-Wmissing-prototypes] Signed-off-by: Luben Tuikov Reported-by: kernel test robot Reviewed-by: Souptick Joarder Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20201110051548.685725-1-luben.tuikov@amd.com commit 74081de4a1f70d14870c824a70e86aa0c1414945 Author: Vidya Sagar Date: Wed Nov 18 20:16:26 2020 +0530 PCI: dwc: Add support to program ATU for >4GB memory Add support to program the ATU to enable translations for >4GB sizes of the prefetchable memory apertures. Link: https://lore.kernel.org/r/20201118144626.32189-3-vidyas@nvidia.com Tested-by: Thierry Reding Tested-by: Jon Hunter Signed-off-by: Vidya Sagar Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Acked-by: Jingoo commit fede8526cc4880d2a1ac4cfe357c299c4e1fd848 Author: Vidya Sagar Date: Wed Nov 18 20:16:25 2020 +0530 PCI: of: Warn if non-prefetchable memory aperture size is > 32-bit As per PCIe spec r5.0, sec 7.5.1.3.8 only 32-bit BAR registers are defined for non-prefetchable memory and hence a warning should be reported when the size of them go beyond 32-bits. Link: https://lore.kernel.org/r/20201118144626.32189-2-vidyas@nvidia.com Tested-by: Thierry Reding Tested-by: Jon Hunter Signed-off-by: Vidya Sagar Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit 5445a0c0d3366358e7ac44efa108b6fd359873e3 Author: Krzysztof Kozlowski Date: Thu Oct 29 20:33:57 2020 +0100 memory: pl353-smc: fix compile test on !ARM_AMBA The pl353-smc driver uses module_amba_driver so it has a build dependency on CONFIG_ARM_AMBA: /usr/bin/arm-linux-gnueabi-ld: drivers/memory/pl353-smc.o: in function `pl353_smc_driver_init': pl353-smc.c:(.init.text+0x10): undefined reference to `amba_driver_register' However it still can be compile tested on platforms other than ARM, which in practice is limited to those selecting ARM_AMBA (so only ARM64). Fixes: ea0c0ad6b6eb ("memory: Enable compile testing for most of the drivers") Reported-by: kernel test robot Signed-off-by: Krzysztof Kozlowski Acked-by: Michal Simek Link: https://lore.kernel.org/r/20201029193357.389593-1-krzk@kernel.org commit 9f9e59a4809563f24e3d1377aa804a4b7386a418 Author: Rob Herring Date: Mon Oct 26 13:16:52 2020 -0500 PCI: dwc: Support multiple ATU memory regions The current ATU setup only supports a single memory resource which isn't sufficient if there are also prefetchable memory regions. In order to support multiple memory regions, we need to move away from fixed ATU slots and rework the assignment. As there's always an ATU entry for config space, let's assign index 0 to config space. Then we assign memory resources to index 1 and up. Finally, if we have an I/O region and slots remaining, we assign the I/O region last. If there aren't remaining slots, we keep the same config and I/O space sharing. Link: https://lore.kernel.org/r/20201026181652.418729-1-robh@kernel.org Tested-by: Vidya Sagar Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Reviewed-by: Vidya Sagar Acked-by: Jingoo Han Cc: Vidya Sagar Cc: Jingoo Han Cc: Gustavo Pimentel Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit aefec40938e4a0e1214f9121520aba4d51697cd9 Author: Christian König Date: Mon Nov 16 20:12:03 2020 +0100 drm/amdgpu: fix check order in amdgpu_bo_move Reorder the code to fix checking if blitting is available. Signed-off-by: Christian König Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/401019/ commit 0ac317e89791b76055ef11b952625ef77a1d2eba Author: Arvind Sankar Date: Mon Oct 5 11:12:07 2020 -0400 x86/boot: Remove unused finalize_identity_maps() Commit 8570978ea030 ("x86/boot/compressed/64: Don't pre-map memory in KASLR code") removed all the references to finalize_identity_maps(), but neglected to delete the actual function. Remove it. Signed-off-by: Arvind Sankar Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201005151208.2212886-2-nivedita@alum.mit.edu commit 83566d13704a2bfe75d0700a445d4ea30de60673 Author: Ville Syrjälä Date: Tue Nov 17 17:40:28 2020 +0200 drm/i915: Fix the DDI encoder names I totally fumbled the ?: usage when generating the DDI encoder names. Reverse the things that need reversing, and to make it a bit less messy add a few macros to hide the arithmetic on the port enums. Cc: Jani Nikula Fixes: 2d709a5a624c ("drm/i915: Give DDI encoders even better names") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201117154028.8516-1-ville.syrjala@linux.intel.com Reviewed-by: Lucas De Marchi commit f74faa0ca3d56df7d135602bca80f6e39be9f4ad Author: Fabio Estevam Date: Mon Nov 16 17:24:03 2020 -0300 dmaengine: imx-sdma: Remove unused .id_table support Since 5.10-rc1 i.MX is a devicetree-only platform and the existing .id_table support in this driver was only useful for old non-devicetree platforms. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20201116202403.29749-1-festevam@gmail.com Signed-off-by: Vinod Koul commit 907f8eb8e0eb2b3312b292e67dc4dbc493424747 Author: Thomas Gleixner Date: Tue Nov 17 21:23:35 2020 +0100 x86/uaccess: Document copy_from_user_nmi() Document the functionality of copy_from_user_nmi() to avoid further confusion. Fix the typo in the existing comment while at it. Requested-by: Borislav Petkov Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201117202753.806376613@linutronix.de commit e1e52361c61afdf81d81cfbbfa3ce08971e60f50 Author: Prashant Malani Date: Mon Nov 16 12:11:42 2020 -0800 usb: typec: Add plug num_altmodes sysfs attr Add a field to the typec_plug struct to record the number of available altmodes as well as the corresponding sysfs attribute to expose this to userspace. This allows userspace to determine whether there are any remaining alternate modes left to be registered by the kernel driver. It can begin executing any policy state machine after all available alternate modes have been registered with the connector class framework. This value is set to "-1" initially, signifying that a valid number of alternate modes haven't been set for the plug. The sysfs file remains hidden as long as the attribute value is -1. We re-use the partner attribute for number_of_alternate_modes since the usage and name is similar, and update the corresponding *_show() command to support both partner and plugs. Signed-off-by: Prashant Malani Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20201116201150.2919178-4-pmalani@chromium.org Signed-off-by: Greg Kroah-Hartman commit 660beb0ffdc9fc0695321dde5e115cd8cc384c94 Author: Fabio Estevam Date: Sun Nov 15 08:03:41 2020 -0300 serial: imx: Remove unused .id_table support Since 5.10-rc1 i.MX is a devicetree-only platform and the existing .id_table support in this driver was only useful for old non-devicetree platforms. Get rid of the .id_table since it is no longer used. Acked-by: Uwe Kleine-König Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20201115110341.22761-1-festevam@gmail.com Signed-off-by: Greg Kroah-Hartman commit a07c81ac5015ac5cbcf1f8e20b9ca2974d276b87 Author: Badhri Jagan Sridharan Date: Wed Oct 28 23:31:30 2020 -0700 usb: typec: tcpci_maxim: Fix the compatible string Changing compatible string to include the part number. Signed-off-by: Badhri Jagan Sridharan Link: https://lore.kernel.org/r/20201029063138.1429760-3-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit 6393734ebb8c128edabcc1d357c8344f8c38d80f Author: Badhri Jagan Sridharan Date: Wed Oct 28 23:31:29 2020 -0700 dt-bindings: usb: Maxim type-c controller device tree binding document Add device tree binding document for Maxim 33359 Type-C chip driver Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201029063138.1429760-2-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit 7695cae24b29edd2dbd3b3a77a7264cd6d9ca67a Author: Badhri Jagan Sridharan Date: Wed Oct 28 23:31:38 2020 -0700 usb: typec: tcpci_maxim: Fix uninitialized return variable New smatch warnings: drivers/usb/typec/tcpm/tcpci_maxim.c:324 max_tcpci_irq() error: uninitialized symbol 'irq_return'. drivers/usb/typec/tcpm/tcpci_maxim.c:407 max_tcpci_probe() warn: passing zero to 'PTR_ERR' The change fixes the above warnings by initializing irq_return and replacing IS_ERR_OR_NULL with IS_ERR. Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Badhri Jagan Sridharan Link: https://lore.kernel.org/r/20201029063138.1429760-11-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit cccaee0e0aadb36edf38298d400ed76e3de21dd5 Author: Badhri Jagan Sridharan Date: Wed Oct 28 23:31:37 2020 -0700 usb: typec: tcpci_maxim: Enable auto discharge disconnect Enable auto discharge disconnect for Maxim TCPC. Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20201029063138.1429760-10-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit e1a97bf80a022cdd7a5746a7de8e19f02203d112 Author: Badhri Jagan Sridharan Date: Wed Oct 28 23:31:36 2020 -0700 usb: typec: tcpci: Implement Auto discharge disconnect callbacks vImplement callbacks for enabling/disabling POWER_CONTROL.AutoDischargeDisconnect. Programs VBUS_SINK_DISCONNECT_THRESHOLD based on the voltage requested as sink, mode of operation. The programmed threshold is based on vSinkDisconnect and vSinkDisconnectPD values. Add auto_discharge_disconnect to tdata to allow TCPC chip level drivers enable AutoDischargeDisconnect. Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20201029063138.1429760-9-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit f321a02caebdd0c56e167610cda2fa148cd96e8b Author: Badhri Jagan Sridharan Date: Wed Oct 28 23:31:35 2020 -0700 usb: typec: tcpm: Implement enabling Auto Discharge disconnect support TCPCI spec allows TCPC hardware to autonomously discharge the vbus capacitance upon disconnect. The expectation is that the TCPM enables AutoDischargeDisconnect while entering SNK/SRC_ATTACHED states. Hardware then automously discharges vbus when the vbus falls below a certain threshold i.e. VBUS_SINK_DISCONNECT_THRESHOLD. Apart from enabling the vbus discharge circuit, AutoDischargeDisconnect is also used a flag to move TCPCI based TCPC implementations into Attached.Snk/Attached.Src state as mentioned in Figure 4-15. TCPC State Diagram before a Connection of the USB Type-C Port Controller Interface Specification. In such TCPC implementations, setting AutoDischargeDisconnect would prevent TCPC into entering "Connection_Invalid" state as well. Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20201029063138.1429760-8-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit 2fc58b36e919902ae2f17531783d8debadcc2a27 Author: Badhri Jagan Sridharan Date: Wed Oct 28 23:31:34 2020 -0700 usb: typec: tcpci_maxim: Fix vbus stuck on upon diconnecting sink Occasionally, POWER_STATUS.sourcing_vbus takes a while to clear after writing to MAX_BUCK_BOOST_OP register. This causes vbus to turn back on while disconnecting the sink. Overcome this issue by writing into MAX_BUCK_BOOST_OP during frs while sourcing vbu, instead of always into the register whenever POWER_STATUS.sourcing_vbus is set. Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20201029063138.1429760-7-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit a57d253fc0582d223464705a5103cfb1930a06cd Author: Badhri Jagan Sridharan Date: Wed Oct 28 23:31:33 2020 -0700 usb: typec: tcpci: frs sourcing vbus callback During FRS hardware autonomously starts to source vbus. Provide callback to perform chip specific operations. Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20201029063138.1429760-6-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit a30a00e37ceb094f949e4d96c2c586e6503b5d1d Author: Badhri Jagan Sridharan Date: Wed Oct 28 23:31:32 2020 -0700 usb: typec: tcpm: frs sourcing vbus callback During FRS hardware autonomously starts to source vbus. Provide callback to perform chip specific operations. Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20201029063138.1429760-5-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit 8115240c4fbd1c2705d1369f66168ec77fa2a7e4 Author: Badhri Jagan Sridharan Date: Wed Oct 28 23:31:31 2020 -0700 usb: typec: tcpm: Refactor logic for new-source-frs-typec-current New source's current capability is now defined as string based device tree property through new-source-frs-typec-current. Refactor tcpm code to parse new-source-frs-typec-current and infer local port's new source current capability during frs. Signed-off-by: Badhri Jagan Sridharan Link: https://lore.kernel.org/r/20201029063138.1429760-4-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit a0ccdc4a77a1b36b682ae60361879eca0a0f88d6 Author: Prashant Malani Date: Mon Nov 16 12:11:40 2020 -0800 usb: typec: Add number of altmodes partner attr Add a user-visible attribute for the number of alternate modes available in a partner. This allows userspace to determine whether there are any remaining alternate modes left to be registered by the kernel driver. It can begin executing any policy state machine after all available alternate modes have been registered with the connector class framework. This value is set to "-1" initially, signifying that a valid number of alternate modes haven't been set for the partner. Also add a sysfs file which exposes this attribute. The file remains hidden as long as the attribute value is -1. Cc: Benson Leung Cc: Heikki Krogerus Signed-off-by: Prashant Malani Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20201116201150.2919178-3-pmalani@chromium.org Signed-off-by: Greg Kroah-Hartman commit 8a5ca78f603977d6b9b2d7dcb3b1b6ef601d3cc7 Author: Prashant Malani Date: Mon Nov 16 12:11:38 2020 -0800 usb: pd: Add captive Type C cable type The USB Power Delivery Specification R3.0 adds a captive cable type to the "USB Type-C plug to USB Type-C/Captive" field (Bits 19-18, Passive/Active Cable VDO, Table 6-38 & 6-39). Add the corresponding definition to the Cable VDO header. Also add a helper macro to get the Type C cable connector type, when provided the cable VDO. Cc: Heikki Krogerus Signed-off-by: Prashant Malani Reviewed-by: Benson Leung Reviewed-by: Greg Kroah-Hartman Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20201116201150.2919178-2-pmalani@chromium.org Signed-off-by: Greg Kroah-Hartman commit b0eec52fbe63fd8c3cffb8ef8d442c6fafb909b0 Author: Lucas Tanure Date: Sun Nov 15 10:28:37 2020 +0000 USB: apple-mfi-fastcharge: Fix kfree after failed kzalloc kfree don't need to be called after a failed kzalloc Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20201115102837.331335-1-tanure@linux.com Signed-off-by: Greg Kroah-Hartman commit 5a569343e8a618dc73edebe0957eb42f2ab476bd Author: Yang Yingliang Date: Tue Nov 17 14:15:00 2020 +0800 usb/max3421: fix return error code in max3421_probe() retval may be reassigned to 0 after max3421_of_vbus_en_pin(), if allocate memory failed after this, max3421_probe() cann't return ENOMEM, fix this by moving assign retval afther max3421_probe(). Fixes: 721fdc83b31b ("usb: max3421: Add devicetree support") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20201117061500.3454223-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman commit 523a97aa3b756c1e0efe33ae48d450f8b0052073 Author: Utkarsh Patel Date: Fri Nov 13 12:24:59 2020 -0800 usb: typec: Remove one bit support for the Thunderbolt rounded/non-rounded cable Two bits support for the Thunderbolt rounded/non-rounded cable has been added to the header file. Hence, removing unused TBT_CABLE_ROUNDED definition from the header file. Signed-off-by: Utkarsh Patel Reviewed-by: Heikki Krogerus -- changes in v2: - Removed the fixes tag as there is no functional implication. -- Link: https://lore.kernel.org/r/20201113202503.6559-5-utkarsh.h.patel@intel.com Signed-off-by: Greg Kroah-Hartman commit c4f81392d5a6833a63ec5809e8bc5c2d0da565d8 Author: Utkarsh Patel Date: Fri Nov 13 12:24:58 2020 -0800 usb: typec: intel_pmc_mux: Configure Thunderbolt cable generation bits Thunderbolt cable generation bits received as a part of Thunderbolt 3 cable discover mode VDO needs to be configured for Thunderbolt rounded and non-rounded cable support in the Thunderbolt alternate mode. Signed-off-by: Utkarsh Patel Reviewed-by: Heikki Krogerus -- Changes in v2: - No change. -- Link: https://lore.kernel.org/r/20201113202503.6559-4-utkarsh.h.patel@intel.com Signed-off-by: Greg Kroah-Hartman commit 5384cffd7bce4652271c80ca081f5d39118e4923 Author: Utkarsh Patel Date: Fri Nov 13 12:24:57 2020 -0800 platform/chrome: cros_ec_typec: Correct the Thunderbolt rounded/non-rounded cable support Thunderbolt rounded/non-rounded cable support is two bits value. Correcting it as per the Thunderbolt 3 cable discover mode VDO changes done in the Thunderbolt 3 alternate mode header. Signed-off-by: Utkarsh Patel Reviewed-by: Heikki Krogerus Acked-by: Enric Balletbo i Serra -- Changes in v2: - Removed the fixes tag as there is no functional implication. -- Link: https://lore.kernel.org/r/20201113202503.6559-3-utkarsh.h.patel@intel.com Signed-off-by: Greg Kroah-Hartman commit 13d40ff85da8a85935e3fd47061dee71a02af0d4 Author: Utkarsh Patel Date: Fri Nov 13 12:24:56 2020 -0800 usb: typec: Correct the bit values for the Thunderbolt rounded/non-rounded cable support Rounded and non-rounded Thunderbolt cables are represented by two bits as per USB Type-C Connector specification v2.0 section F.2.6. Corrected that in the Thunderbolt 3 cable discover mode VDO. Signed-off-by: Utkarsh Patel Reviewed-by: Heikki Krogerus -- Changes in v2: - Removed the fixes tag as there is no functional implication. -- Link: https://lore.kernel.org/r/20201113202503.6559-2-utkarsh.h.patel@intel.com Signed-off-by: Greg Kroah-Hartman commit b971cbd03ee0a24f7af47b681e8f911794c69780 Author: Sumanth Korikkar Date: Wed Nov 11 01:03:02 2020 -0600 s390/sclp: provide extended sccb support As the number of cpus increases, the sccb response can exceed 4k for read cpu and read scp info sclp commands. Hence, all cpu info entries cant be embedded within a sccb response Solution: To overcome this limitation, extended sccb facility is provided by sclp. 1. Check if the extended sccb facility is installed. 2. If extended sccb is installed, perform the read scp and read cpu command considering a max sccb length of three page size. This max length is based on factors like max cpus, sccb header. 3. If extended sccb is not installed, perform the read scp and read cpu sclp command considering a max sccb length of one page size. Signed-off-by: Sumanth Korikkar Reviewed-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit d25d23e134a43457759fa602a15c1e9fce741727 Author: Sumanth Korikkar Date: Sun Nov 8 14:21:14 2020 -0600 s390/sclp: avoid copy of sclp_info_sccb For extended sccb support, sccb size could be up to 3 pages. Hence avoid copy of sclp_info_sccb. Signed-off-by: Sumanth Korikkar Reviewed-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit 08ab919d0dccc4ed6fb12231b20758cef112bd26 Author: Sumanth Korikkar Date: Sat Nov 7 22:55:51 2020 -0600 s390/sclp: use memblock for early read cpu info sclp early read cpu info is used to detect the number of configured cpus, which is utilized by smp_detect_cpus() in early startup. * For read cpu info, the sccb block should be below 2gb. * smp_detect_cpus() utilizes read cpu info early, but after memblock initialization. Thus use memblock_allow_low() instead. * Avoid copy of sclp_core_info structure. * sclp_early_init_core_info(), sclp_early_core_info and sclp_early_core_info_valid initdata are no longer required. * smp_get_core_info() is called only once during early stage. Hence for early sclp_get_core_info(), directly call read cpu command. No need to maintain sclp_early_core_info_valid. Signed-off-by: Sumanth Korikkar Reviewed-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit da78693e6e496ccd5cb6b0e9025007803e8f93c2 Author: Niklas Schnelle Date: Mon Oct 26 10:01:24 2020 +0100 s390/pci: inform when missing required facilities when we're missing the necessary machine facilities zPCI can not function. Until now it would silently fail to be initialized, add an informational print. Signed-off-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit 07b552732edd1b09aecc0f57d479e5eccf11c295 Author: Yangtao Li Date: Tue Nov 10 14:28:02 2020 +0800 dmaengine: sun6i: Add support for A100 DMA The dma of a100 is similar to h6, with some minor changes to support greater addressing capabilities. Add support for it. Signed-off-by: Yangtao Li Link: https://lore.kernel.org/r/719852c6a9a597bd2e82d01a268ca02b9dee826c.1604988979.git.frank@allwinnertech.com Signed-off-by: Vinod Koul commit 613ff7e19c5877d62118cb6612d4e336272620e7 Author: Yangtao Li Date: Tue Nov 10 14:26:38 2020 +0800 dt-bindings: dma: allwinner,sun50i-a64-dma: Add A100 compatible Add a binding for A100's dma controller. Signed-off-by: Yangtao Li Acked-by: Rob Herring Link: https://lore.kernel.org/r/f15a18e9b8868e8853db1b5a3d1e411b0ac1c63a.1604988979.git.frank@allwinnertech.com Signed-off-by: Vinod Koul commit 46d613fd8da84d41fb2adb2ccb97230979d38af8 Author: 周琰杰 (Zhou Yanjie) Date: Sat Nov 7 20:20:16 2020 +0800 dt-bindings: dmaengine: Add X2000 bindings. Add the dmaengine bindings for the X2000 SoC from Ingenic. Signed-off-by: 周琰杰 (Zhou Yanjie) Acked-by: Rob Herring Link: https://lore.kernel.org/r/20201107122016.89859-3-zhouyanjie@wanyeetech.com Signed-off-by: Vinod Koul commit 5b7b41cbf2f9b473ccd13f69337d7c26f4d138c2 Author: 周琰杰 (Zhou Yanjie) Date: Sat Nov 7 20:20:15 2020 +0800 dt-bindings: dmaengine: Add JZ4775 bindings. Add the dmaengine bindings for the JZ4775 SoC from Ingenic. Signed-off-by: 周琰杰 (Zhou Yanjie) Acked-by: Rob Herring Link: https://lore.kernel.org/r/20201107122016.89859-2-zhouyanjie@wanyeetech.com Signed-off-by: Vinod Koul commit fa388231fec99b60346319d56495ae531b666275 Author: Daniel Vetter Date: Wed Nov 18 08:36:37 2020 +0100 drm/docs: Fix todo.rst I didnt' format the thing correctly :-( Fixes: 39aead8373b3 ("fbcon: Disable accelerated scrolling") Reviewed-by: Simon Ser Reported-by: Stephen Rothwell Cc: Stephen Rothwell Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201118073637.597206-1-daniel.vetter@ffwll.ch commit 94ffd9b86284ab01464b4546b4a927e419b8be34 Author: Lee Jones Date: Mon Nov 16 17:41:12 2020 +0000 include/drm/drm_atomic: Make use of 'new_crtc_state' In the macro for_each_oldnew_crtc_in_state() 'crtc_state' is provided as a container for state->crtcs[i].new_state, but is not utilised in some use-cases, so we fake-use it instead. Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/imx/ipuv3-plane.c: In function ‘ipu_planes_assign_pre’: drivers/gpu/drm/imx/ipuv3-plane.c:746:42: warning: variable ‘crtc_state’ set but not used [-Wunused-but-set-variable] Cc: Philipp Zabel Cc: David Airlie Cc: Daniel Vetter Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201116174112.1833368-43-lee.jones@linaro.org commit 3b21fe6896c2525d99a3165bb750734cdc8c4a99 Author: Lee Jones Date: Mon Nov 16 17:41:10 2020 +0000 drm/vc4/vc4_debugfs: Demote non-conformant kernel-doc headers Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/vc4/vc4_debugfs.c:25: warning: Function parameter or member 'minor' not described in 'vc4_debugfs_init' drivers/gpu/drm/vc4/vc4_debugfs.c:62: warning: Function parameter or member 'dev' not described in 'vc4_debugfs_add_file' drivers/gpu/drm/vc4/vc4_debugfs.c:62: warning: Function parameter or member 'name' not described in 'vc4_debugfs_add_file' drivers/gpu/drm/vc4/vc4_debugfs.c:62: warning: Function parameter or member 'show' not described in 'vc4_debugfs_add_file' drivers/gpu/drm/vc4/vc4_debugfs.c:62: warning: Function parameter or member 'data' not described in 'vc4_debugfs_add_file' Cc: Eric Anholt Cc: Maxime Ripard Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201116174112.1833368-41-lee.jones@linaro.org commit 06e094199cfc5d23b4dfdeb5304e2824c5b3f530 Author: Lee Jones Date: Mon Nov 16 17:41:09 2020 +0000 drm/vc4/vc4_v3d: Demote non-conformant kernel-doc headers Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/vc4/vc4_v3d.c:131: warning: Function parameter or member 'vc4' not described in 'vc4_v3d_pm_get' drivers/gpu/drm/vc4/vc4_v3d.c:231: warning: Function parameter or member 'vc4' not described in 'bin_bo_alloc' Cc: Eric Anholt Cc: Maxime Ripard Cc: David Airlie Cc: Daniel Vetter Cc: Rob Clark Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201116174112.1833368-40-lee.jones@linaro.org commit 2bac959c5a6d3ba0c2a9e79312ac5b66810ba73f Author: Lee Jones Date: Mon Nov 16 17:41:08 2020 +0000 drm/vc4/vc4_hdmi: Remove set but unused variable 'ret' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/vc4/vc4_hdmi.c: In function ‘vc4_hdmi_set_audio_infoframe’: drivers/gpu/drm/vc4/vc4_hdmi.c:334:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] Cc: Eric Anholt Cc: Maxime Ripard Cc: David Airlie Cc: Daniel Vetter Cc: Philipp Zabel Cc: Rob Clark Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201116174112.1833368-39-lee.jones@linaro.org commit 705477b8961ee21cd691e1874436b37483ed0a1d Author: Lee Jones Date: Mon Nov 16 17:41:07 2020 +0000 drm/vc4/vc4_hdmi_regs: Mark some data sets as __maybe_unused The alternative is to move them into the source file that uses then, but they are large and intrusive, so that strategy is being avoided. Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/vc4/vc4_hdmi_regs.h:282:39: warning: ‘vc5_hdmi_hdmi1_fields’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/vc4/vc4_hdmi_regs.h:206:39: warning: ‘vc5_hdmi_hdmi0_fields’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/vc4/vc4_hdmi_regs.h:145:39: warning: ‘vc4_hdmi_fields’ defined but not used [-Wunused-const-variable=] Cc: Eric Anholt Cc: Maxime Ripard Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201116174112.1833368-38-lee.jones@linaro.org commit 35552c7cb672d2cfd6c4aa2e28b15fdd12315555 Author: Thierry Reding Date: Wed Nov 18 11:51:11 2020 +0100 arm64: defconfig: Enable Tegra234 support Support for Tegra234 was merged in v5.10-rc1, so we might as well enable it by default. Signed-off-by: Thierry Reding commit d49c4b2c07325aeb0064836f70ea7ed1836fb159 Author: Lee Jones Date: Mon Nov 16 17:41:06 2020 +0000 drm/v3d/v3d_sched: Demote non-conformant kernel-doc header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/v3d/v3d_sched.c:75: warning: Function parameter or member 'sched_job' not described in 'v3d_job_dependency' drivers/gpu/drm/v3d/v3d_sched.c:75: warning: Function parameter or member 's_entity' not described in 'v3d_job_dependency' Cc: Eric Anholt Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: "Christian König" Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201116174112.1833368-37-lee.jones@linaro.org commit 5c62634fc65101d350cbd47722fb76f02693059d Author: Hui Su Date: Wed Nov 18 00:17:50 2020 +0800 namespace: make timens_on_fork() return nothing timens_on_fork() always return 0, and maybe not need to judge the return value in copy_namespaces(). So make timens_on_fork() return nothing and do not judge its return val in copy_namespaces(). Signed-off-by: Hui Su Link: https://lore.kernel.org/r/20201117161750.GA45121@rlk Signed-off-by: Christian Brauner commit 6cc1716102b55497dd557e8295a3177315332f9a Author: Bhaumik Bhatt Date: Mon Nov 9 12:47:31 2020 -0800 bus: mhi: core: Remove MHI event ring IRQ handlers when powering down While powering down, the device may or may not acknowledge an MHI RESET issued by host for a graceful shutdown scenario and end up sending an incoming data packet after tasklets have been killed. If a rogue device sends this interrupt for a data transfer event ring update, it can result in a tasklet getting scheduled while a clean up is ongoing or has completed and cause access to freed memory leading to a NULL pointer exception. Remove the interrupt handlers for MHI event rings early on to avoid this scenario. Signed-off-by: Bhaumik Bhatt Reviewed-by: Manivannan Sadhasivam Signed-off-by: Manivannan Sadhasivam commit a03c7a86e12721da9f6bb509dddda19fd9ae8c6c Author: Bhaumik Bhatt Date: Mon Nov 9 12:47:30 2020 -0800 bus: mhi: core: Mark and maintain device states early on after power down mhi_power_down() does not ensure that the PM state is moved to an inaccessible state soon enough as the system can encounter scheduling delays till mhi_pm_disable_transition() gets called. Additionally, if an MHI controller decides that the device is now inaccessible and issues a power down, the register inaccessible state is not maintained by moving from MHI_PM_LD_ERR_FATAL_DETECT to MHI_PM_SHUTDOWN_PROCESS. This can result in bus errors if a client driver attempted to read registers when powering down. Close these gaps and avoid any race conditions to prevent such activity. Signed-off-by: Bhaumik Bhatt Reviewed-by: Manivannan Sadhasivam Signed-off-by: Manivannan Sadhasivam commit 556bbb442bbb44f429dbaa9f8b48e0b4cda6e088 Author: Bhaumik Bhatt Date: Mon Nov 9 12:47:29 2020 -0800 bus: mhi: core: Separate system error and power down handling Currently, there exist a set of if...else statements in the mhi_pm_disable_transition() function which make handling system error and disable transitions differently complex. To make that cleaner and facilitate differences in behavior, separate these two transitions for MHI host. Signed-off-by: Bhaumik Bhatt Reviewed-by: Manivannan Sadhasivam Signed-off-by: Manivannan Sadhasivam commit 40c3127187cb38ed255ba4473e11cd70385c7431 Author: Bhaumik Bhatt Date: Mon Nov 9 12:47:28 2020 -0800 bus: mhi: core: Check for IRQ availability during registration Current design allows a controller to register with MHI successfully without the need to have any IRQs available for use. If no IRQs are available, power up requests to MHI can fail after a successful registration with MHI. Improve the design by checking for the number of IRQs available sooner within the mhi_regsiter_controller() API as it is required to be specified by the controller. Signed-off-by: Bhaumik Bhatt Reviewed-by: Manivannan Sadhasivam Signed-off-by: Manivannan Sadhasivam commit dc53d862eab89000ebc87240274943793f0af682 Author: Bhaumik Bhatt Date: Mon Nov 9 12:47:27 2020 -0800 bus: mhi: core: Move to an error state on mission mode failure If the host receives a mission mode event and by the time it can get to processing it, the register accesses fail implying a connectivity error, MHI should move to an error state. This helps avoid longer wait times from a synchronous power up perspective and accurately reflects the MHI execution environment and power management states. Signed-off-by: Bhaumik Bhatt Reviewed-by: Manivannan Sadhasivam Signed-off-by: Manivannan Sadhasivam commit faa257075bcc35e2c2ee68eb83e4e53d3bb02a90 Author: Bhaumik Bhatt Date: Mon Nov 9 12:47:26 2020 -0800 bus: mhi: core: Use appropriate label in firmware load handler API Correct the "error_read" label to say "error_ready_state" as that is the appropriate usage of the label. Signed-off-by: Bhaumik Bhatt Reviewed-by: Manivannan Sadhasivam Signed-off-by: Manivannan Sadhasivam commit 12e050c77be036377fee479dccd479202d8d6853 Author: Bhaumik Bhatt Date: Mon Nov 9 12:47:25 2020 -0800 bus: mhi: core: Move to an error state on any firmware load failure Move MHI to a firmware download error state for a failure to find the firmware files or to load SBL or EBL image using BHI/BHIe. This helps detect an error state sooner and shortens the wait for a synchronous power up timeout. Signed-off-by: Bhaumik Bhatt Reviewed-by: Manivannan Sadhasivam Signed-off-by: Manivannan Sadhasivam commit 0c76b3fa580da8f65333b8774205f0a72ffe844c Author: Bhaumik Bhatt Date: Mon Nov 9 12:47:24 2020 -0800 bus: mhi: core: Prevent sending multiple RDDM entry callbacks If an mhi_power_down() is initiated after the device has entered RDDM and a status callback was provided for it, it is possible that another BHI interrupt fires while waiting for the MHI RESET to be cleared. If that happens, MHI host would have moved a "disabled" execution environment and the check to allow sending an RDDM status callback will pass when it is should not. Add a check to see if MHI is in an active state before proceeding. Signed-off-by: Bhaumik Bhatt Reviewed-by: Manivannan Sadhasivam Signed-off-by: Manivannan Sadhasivam commit 3fb81a4d5f2f55b1596cb5cffca98c97ca43f07a Author: Bhaumik Bhatt Date: Mon Nov 9 12:47:23 2020 -0800 bus: mhi: core: Move to SYS_ERROR regardless of RDDM capability In some cases, the entry of device to RDDM execution environment can occur after a significant amount of time has elapsed and a SYS_ERROR state change event has already arrived. This can result in scenarios where MHI controller and client drivers are unaware of the error state of the device. Remove the check for rddm_image when processing the SYS_ERROR state change as it is present in mhi_pm_sys_err_handler() already and prevent further activity until the expected RDDM execution environment change occurs or the controller driver decides further action. Signed-off-by: Bhaumik Bhatt Reviewed-by: Manivannan Sadhasivam Signed-off-by: Manivannan Sadhasivam commit 8e0559921f9afc01fe0457c5e136ce4a7ae8f0d3 Author: Bhaumik Bhatt Date: Mon Nov 9 12:47:22 2020 -0800 bus: mhi: core: Skip device wake in error or shutdown states MHI client drivers can request a device wake even if the device may be in an error state or undergoing a shutdown. To prevent unnecessary device wake processing, check for the device state and bail out early so that the clients are made aware of the device state sooner. Signed-off-by: Bhaumik Bhatt Reviewed-by: Manivannan Sadhasivam Signed-off-by: Manivannan Sadhasivam commit 8f70397876872789b2a5deba804eb6216fb5deb7 Author: Bhaumik Bhatt Date: Mon Nov 9 12:47:21 2020 -0800 bus: mhi: core: Move to using high priority workqueue MHI work is currently scheduled on the global/system workqueue and can encounter delays on a stressed system. To avoid those unforeseen delays which can hamper bootup or shutdown times, use a dedicated high priority workqueue instead of the global/system workqueue. Signed-off-by: Bhaumik Bhatt Reviewed-by: Manivannan Sadhasivam Signed-off-by: Manivannan Sadhasivam commit 1b55c16a5e4718f58ed58cfdfe37fe4cd4d89f88 Author: Bhaumik Bhatt Date: Mon Nov 9 12:47:20 2020 -0800 bus: mhi: core: Use appropriate names for firmware load functions mhi_fw_load_sbl() function is currently used to transfer SBL or EDL images over BHI (Boot Host Interface). Same goes with mhi_fw_load_amss() which uses BHIe. However, the contents of these functions do not indicate support for a specific set of images. Since these can be used for any image download over BHI or BHIe, rename them based on the protocol used. Signed-off-by: Bhaumik Bhatt Reviewed-by: Manivannan Sadhasivam Signed-off-by: Manivannan Sadhasivam commit da7bdbf67db232234bb55e083c57b930c2010f95 Author: Bhaumik Bhatt Date: Fri Nov 6 09:44:50 2020 -0800 bus: mhi: core: Skip RDDM download for unknown execution environment If MHI is unable to determine the execution environment during the panic path, host must skip the RDDM download. This can happen if the BHI offset read or the BHI_EXECENV register read fails indicating that the underlying transport is unresponsive. Hence, there is no need to trigger an RDDM using SYSERR or request an SOC reset. Suggested-by: Hemant Kumar Signed-off-by: Bhaumik Bhatt Reviewed-by: Manivannan Sadhasivam Signed-off-by: Manivannan Sadhasivam commit 9e1660e5c396ee081907386d0b95b8e0804a6c86 Author: Bhaumik Bhatt Date: Fri Nov 6 09:44:49 2020 -0800 bus: mhi: core: Rename RDDM download function to use proper words mhi_download_rddm_img() uses a shorter version of the word image. Expand it and rename the function to mhi_download_rddm_image(). Signed-off-by: Bhaumik Bhatt Reviewed-by: Manivannan Sadhasivam Signed-off-by: Manivannan Sadhasivam commit bca7218099e0796901a9c27366e145d9f485c81a Author: Bhaumik Bhatt Date: Fri Nov 6 09:44:48 2020 -0800 bus: mhi: core: Remove unused mhi_fw_load_worker() declaration The mhi_fw_load_worker() function no longer exists. Remove its declaration as part of code clean-up. Signed-off-by: Bhaumik Bhatt Reviewed-by: Manivannan Sadhasivam Signed-off-by: Manivannan Sadhasivam commit 78e1d22687ff1fd320abac12e8a607ea79782c48 Author: Bhaumik Bhatt Date: Fri Nov 6 09:44:47 2020 -0800 bus: mhi: core: Expose mhi_get_exec_env() API for controllers The mhi_get_exec_env() APIs can be used by the controller drivers to query the execution environment of the MHI device. Expose it so it can be used in some scenarios to determine behavior of controllers. Signed-off-by: Bhaumik Bhatt Reviewed-by: Manivannan Sadhasivam Signed-off-by: Manivannan Sadhasivam commit a8ca15a9c73f92703492e8afe25103a34504851b Author: Bhaumik Bhatt Date: Fri Nov 6 09:44:46 2020 -0800 bus: mhi: core: Add missing EXPORT_SYMBOL for mhi_get_mhi_state() Add missing EXPORT_SYMBOL_GPL() declaration for mhi_get_mhi_state() API. Signed-off-by: Bhaumik Bhatt Reviewed-by: Manivannan Sadhasivam Signed-off-by: Manivannan Sadhasivam commit 56c8ea864018a995c96810c9536d98a879b89218 Author: Bhaumik Bhatt Date: Fri Nov 6 09:44:45 2020 -0800 bus: mhi: core: Remove unnecessary counter from mhi_firmware_copy() There is an extra 'i' counter in the mhi_firmware_copy() function which is unused. Remove it to clean-up code and reduce stack space as well as improve efficiency of the function. Fixes: cd457afb1667 ("bus: mhi: core: Add support for downloading firmware over BHIe") Reported-by: kernel test robot Signed-off-by: Bhaumik Bhatt Reviewed-by: Manivannan Sadhasivam Signed-off-by: Manivannan Sadhasivam commit a7f422f2f89e7d48aa66e6488444a4c7f01269d5 Author: Loic Poulain Date: Fri Oct 9 11:07:14 2020 +0200 bus: mhi: Fix channel close issue on driver remove Some MHI device drivers need to stop the channels in their driver remove callback (e.g. module unloading), but the unprepare function is aborted because MHI core moved the channels to suspended state prior calling driver remove callback. This prevents the driver to send a proper MHI RESET CHAN command to the device. Device is then unaware of the stopped state of these channels. This causes issue when driver tries to start the channels again (e.g. module is reloaded), since device considers channels as already started (inconsistent state). Fix this by allowing channel reset when channel is suspended. Signed-off-by: Loic Poulain Reviewed-by: Manivannan Sadhasivam Reviewed-by: Bhaumik Bhatt Signed-off-by: Manivannan Sadhasivam commit f4d0b39c842585c74bce8f8a80553369181b72df Author: Carl Yin Date: Mon Nov 2 20:27:10 2020 +0800 bus: mhi: core: Fix null pointer access when parsing MHI configuration Functions parse_ev_cfg() and parse_ch_cfg() access mhi_cntrl->mhi_dev before it is set in function mhi_register_controller(), use cntrl_dev instead of mhi_dev. Fixes: 0cbf260820fa ("bus: mhi: core: Add support for registering MHI controllers") Signed-off-by: Carl Yin Reviewed-by: Bhaumik Bhatt Reviewed-by: Hemant Kumar Reviewed-by: Manivannan Sadhasivam Signed-off-by: Manivannan Sadhasivam commit 855a70c12021bdc5df60512f1d3f6d492dc715be Author: Loic Poulain Date: Wed Oct 21 19:18:19 2020 +0200 bus: mhi: Add MHI PCI support for WWAN modems This is a generic MHI-over-PCI controller driver for MHI only devices such as QCOM modems. For now it supports registering of Qualcomm SDX55 based PCIe modules. The MHI channels have been extracted from mhi downstream driver. This driver is for MHI-only devices which have all functionalities exposed through MHI channels and accessed by the corresponding MHI device drivers (no out-of-band communication). Signed-off-by: Loic Poulain Reviewed-by: Bhaumik Bhatt Reviewed-by: Hemant Kumar Reviewed-by: Manivannan Sadhasivam [mani: fixed up the Makefile rule] Signed-off-by: Manivannan Sadhasivam commit 8ff3f7bdde45b32f9294fc87e4bd76f369178664 Author: Jeffrey Hugo Date: Tue Oct 20 14:29:45 2020 -0600 bus: mhi: core: fix potential operator-precedence with BHI macros The BHI_MSMHWID and BHI_OEMPKHASH macros take a value 'n' which is a BHI register index. If 'n' is an expression rather than a simple value, there can be an operator precedence issue which can result in the incorrect calculation of the register offset. Adding parentheses around the macro parameter can prevent such issues. Signed-off-by: Jeffrey Hugo Reviewed-by: Manivannan Sadhasivam Reviewed-by: Hemant Kumar Signed-off-by: Manivannan Sadhasivam commit 9b627c25e70816a5e1dca940444b5029065b4d60 Author: Bhaumik Bhatt Date: Thu Oct 15 11:47:51 2020 -0700 bus: mhi: core: Remove double locking from mhi_driver_remove() There is double acquisition of the pm_lock from mhi_driver_remove() function. Remove the read_lock_bh/read_unlock_bh calls for pm_lock taken during a call to mhi_device_put() as the lock is acquired within the function already. This will help avoid a potential kernel panic. Fixes: 189ff97cca53 ("bus: mhi: core: Add support for data transfer") Reported-by: Shuah Khan Signed-off-by: Bhaumik Bhatt Reviewed-by: Manivannan Sadhasivam Signed-off-by: Manivannan Sadhasivam commit f52d6d8b43e51cb2d0dbd60caf7d37150391182f Author: Greentime Hu Date: Fri Nov 13 10:33:55 2020 +0800 gpio: sifive: To get gpio irq offset from device tree data We can get hwirq number of the gpio by its irq_data->hwirq so that we don't need to add more macros for different platforms. This patch is tested in SiFive Unleashed board and SiFive Unmatched board. Signed-off-by: Greentime Hu Signed-off-by: Bartosz Golaszewski commit 16fee29b07358293f135759d9fdbf1267da57ebd Author: Christoph Hellwig Date: Fri Nov 6 17:02:17 2020 +0100 dma-mapping: remove the dma_direct_set_offset export Drop the dma_direct_set_offset export and move the declaration to dma-map-ops.h now that the Allwinner drivers have stopped calling it. Signed-off-by: Christoph Hellwig Signed-off-by: Maxime Ripard commit 5739301308fd1a4c4b7a561f9bf6c1356e5c0612 Author: Maxime Ripard Date: Fri Nov 6 15:58:50 2020 +0100 media: sun8i-di: Remove the call to of_dma_configure of_dma_configure is called by the core before probe gets called so this is redundant. Signed-off-by: Maxime Ripard Reviewed-by: Chen-Yu Tsai Reviewed-by: Christoph Hellwig Acked-by: Hans Verkuil Acked-by: Daniel Vetter commit c6e95daab1ccc17a6556c3c2034affbe15db8b3b Author: Maxime Ripard Date: Fri Nov 6 15:55:05 2020 +0100 media: cedrus: Remove the MBUS quirks Now that the MBUS quirks are applied by our global notifier, we can remove them from Cedrus. Since the only quirk was whether or not we had to apply that DMA quirk, we can also remove the quirks infrastructure. Suggested-by: Christoph Hellwig Signed-off-by: Maxime Ripard Reviewed-by: Chen-Yu Tsai Reviewed-by: Christoph Hellwig Acked-by: Hans Verkuil Acked-by: Daniel Vetter commit d60ab69b607ffd72df1a9642cbd451498f924bb4 Author: Maxime Ripard Date: Fri Nov 6 15:55:05 2020 +0100 media: sun6i: Remove the MBUS quirks Now that the MBUS quirks are applied by our global notifier, we can remove them from our CSI driver for the A31. Suggested-by: Christoph Hellwig Signed-off-by: Maxime Ripard Reviewed-by: Chen-Yu Tsai Reviewed-by: Christoph Hellwig Acked-by: Hans Verkuil Acked-by: Daniel Vetter commit 13dd871011503e038a551e09ae004ae0da496a4c Author: Maxime Ripard Date: Fri Nov 6 15:55:05 2020 +0100 media: sun4i: Remove the MBUS quirks Now that the MBUS quirks are applied by our global notifier, we can remove them from our CSI driver for the A10. Suggested-by: Christoph Hellwig Signed-off-by: Maxime Ripard Reviewed-by: Chen-Yu Tsai Reviewed-by: Christoph Hellwig Acked-by: Hans Verkuil Acked-by: Daniel Vetter commit 756668ba682ec50639362b081b305f3499bb180c Author: Maxime Ripard Date: Fri Nov 6 15:55:05 2020 +0100 drm/sun4i: backend: Remove the MBUS quirks Now that the MBUS quirks are applied by our global notifier, we can remove them from our DRM driver. Suggested-by: Christoph Hellwig Signed-off-by: Maxime Ripard Reviewed-by: Chen-Yu Tsai Reviewed-by: Christoph Hellwig Acked-by: Daniel Vetter commit b4bdc4fbf8d01227702068703ae2cd82ff25c3db Author: Maxime Ripard Date: Fri Nov 6 15:52:30 2020 +0100 soc: sunxi: Deal with the MBUS DMA offsets in a central place So far most of the drivers with the MBUS quirks had to duplicate the code to deal with DT compatibility and enforcing the DMA offsets. Let's move for a more maintainable solution by putting everything in a notifier that would take care of setting up the DMA offsets for all the MBUS devices. Suggested-by: Robin Murphy Signed-off-by: Maxime Ripard Reviewed-by: Chen-Yu Tsai Reviewed-by: Christoph Hellwig Acked-by: Daniel Vetter commit 0f2c7af45d7eef8455d7ad39c5326229bf19a2ed Author: Fabio Estevam Date: Tue Nov 17 07:59:17 2020 -0300 gpio: mxc: Convert the driver to DT-only Since 5.10-rc1 i.MX is a devicetree-only platform, so simplify the code by removing the unused non-DT support. Signed-off-by: Fabio Estevam Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201117105917.27591-1-festevam@gmail.com Signed-off-by: Linus Walleij commit 8b51658347affcebfa30b82cd814201a329725fc Author: Srinivas Neeli Date: Thu Nov 12 22:42:28 2020 +0530 MAINTAINERS: add fragment for xilinx GPIO drivers Added entry for xilinx GPIO drivers. Signed-off-by: Srinivas Neeli Acked-by: Shubhrajyoti Datta Acked-by: Michal Simek Link: https://lore.kernel.org/r/1605201148-4508-10-git-send-email-srinivas.neeli@xilinx.com Signed-off-by: Linus Walleij commit bea67aeab02208cbb2f3d60e358f331e2e6f1ab1 Author: Srinivas Neeli Date: Thu Nov 12 22:42:27 2020 +0530 gpio: gpio-xilinx: Check return value of of_property_read_u32 In two different instances the return value of "of_property_read_u32" API was neither captured nor checked. Fixed it by capturing the return value and then checking for any error. Signed-off-by: Srinivas Neeli Acked-by: Michal Simek Addresses-Coverity: "check_return" Link: https://lore.kernel.org/r/1605201148-4508-9-git-send-email-srinivas.neeli@xilinx.com Signed-off-by: Linus Walleij commit 0230a41ed6a818675c0166d506c3c9386af20986 Author: Srinivas Neeli Date: Thu Nov 12 22:42:25 2020 +0530 gpio: gpio-xilinx: Add remove function Added remove function support. Signed-off-by: Srinivas Neeli Acked-by: Michal Simek Link: https://lore.kernel.org/r/1605201148-4508-7-git-send-email-srinivas.neeli@xilinx.com [dropped pm disable call] Signed-off-by: Linus Walleij commit a2e2cc0dbb1121dfa875da1c04f3dff966fec162 Author: Loic Poulain Date: Mon Sep 28 09:39:51 2020 +0530 net: qrtr: Start MHI channels during init Start MHI device channels so that transfers can be performed. The MHI stack does not auto-start channels anymore. Signed-off-by: Loic Poulain Reviewed-by: Manivannan Sadhasivam Acked-by: David S. Miller Signed-off-by: Manivannan Sadhasivam commit ed5298c7d500abaf34ed7783969e953a1f028e5b Author: Loic Poulain Date: Mon Sep 28 09:39:50 2020 +0530 bus: mhi: Remove auto-start option There is really no point having an auto-start for channels. This is confusing for the device drivers, some have to enable the channels, others don't have... and waste resources (e.g. pre allocated buffers) that may never be used. This is really up to the MHI device(channel) driver to manage the state of its channels. While at it, let's also remove the auto-start option from ath11k mhi controller. Signed-off-by: Loic Poulain Acked-by: Kalle Valo Reviewed-by: Manivannan Sadhasivam [mani: clubbed ath11k change] Signed-off-by: Manivannan Sadhasivam commit 0eee3d28ff6572f0e1afd41e863e44d396a308e2 Author: Rikard Falkeborn Date: Sun Nov 8 00:36:30 2020 +0100 remoteproc: stm32: Constify st_rproc_ops The only usage of st_rproc_ops is to pass its address to rproc_alloc() which accepts a const pointer. Make it const to allow the compiler to put it in read-only memory. Acked-by: Arnaud Pouliquen Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20201107233630.9728-3-rikard.falkeborn@gmail.com Signed-off-by: Bjorn Andersson commit bb7eda7eddf1f8002e00a5147aff91fad8caf2d5 Author: Rikard Falkeborn Date: Sun Nov 8 00:36:29 2020 +0100 remoteproc: ingenic: Constify ingenic_rproc_ops The only usage of ingenic_rproc_ops is to pass its address to devm_rproc_alloc(), which accepts a const pointer. Make it const to allow the compiler to put it in read-only memory. Acked-by: Paul Cercueil Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20201107233630.9728-2-rikard.falkeborn@gmail.com Signed-off-by: Bjorn Andersson commit 8266b809264caa23038ceab2811fc452cf936e84 Author: Chunyan Zhang Date: Thu Nov 12 15:04:10 2020 +0800 hwspinlock: sprd: fixed warning of unused variable 'sprd_hwspinlock_of_match' The macro function of_match_ptr() is NULL if CONFIG_OF is not set, in this case Clang compiler would complain the of_device_id variable is unused. Reviewed-by: Baolin Wang Reported-by: kernel test robot Fixes: d8c8bbbb1aba ("hwspinlock: sprd: Add hardware spinlock driver") Signed-off-by: Chunyan Zhang Link: https://lore.kernel.org/r/20201112070410.14810-1-zhang.lyra@gmail.com Signed-off-by: Bjorn Andersson commit c6c746508981f22ffa754e0c8fcee00da6923b9e Author: Linus Walleij Date: Mon Nov 9 18:02:50 2020 -0800 Input: atmel_mxt_ts - support regulator supplies This adds the code for the Atmel touchscreens such as mXT224 to obtain power regulators for the supply voltages AVDD and VDD. On mobile phones such as Samsung GT-I8190 (Golden) this is needed to explicitly bring power online. We just enable the regulators at probe() and disable them at remove() or in the error path for now. As regulators are naturally stubbed if not available, this should have no impact on existing systems. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20201104153032.1387747-3-linus.walleij@linaro.org Signed-off-by: Dmitry Torokhov commit 04f1842a8db6f31c9115af68c2b34fbb0f208cec Author: Linus Walleij Date: Mon Nov 9 18:01:03 2020 -0800 Input: atmel_mxt_ts - convert bindings to YAML and extend This converts the Armel MXT touchscreen bindings to YAML format and extends them with the following two properties: - vdda-supply: the optional analog supply voltage - vdd-supply: the optional digital supply voltage Tested the schema with all in-tree users and they verify fine. Signed-off-by: Linus Walleij Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201104153032.1387747-2-linus.walleij@linaro.org Signed-off-by: Dmitry Torokhov commit feedaacdadfc332e1a6e436f3adfbc67e244db47 Author: Linus Walleij Date: Mon Nov 9 18:00:06 2020 -0800 Input: atmel_mxt_ts - fix up inverted RESET handler This driver uses GPIO descriptors to drive the touchscreen RESET line. In the existing device trees this has in conflict with intution been flagged as GPIO_ACTIVE_HIGH and the driver then applies the reverse action by driving the line low (setting to 0) to enter reset state and driving the line high (setting to 1) to get out of reset state. The correct way to handle active low GPIO lines is to provide the GPIO_ACTIVE_LOW in the device tree (thus properly describing the hardware) and letting the GPIO framework invert the assertion (driving high) to a low level and vice versa. This is considered a bug since the device trees are incorrectly mis-specifying the line as active high. Fix the driver and all device trees specifying a reset line. Signed-off-by: Linus Walleij Reviewed-by: Philippe Schenker Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201104153032.1387747-1-linus.walleij@linaro.org Signed-off-by: Dmitry Torokhov commit 05909cd9a0c8811731b38697af13075e8954314f Merge: c7f0169e3bd27 bbf5c979011a0 Author: Dmitry Torokhov Date: Tue Nov 17 18:13:23 2020 -0800 Merge tag 'v5.9' into next Sync up with mainline to bring in the latest DTS files. commit ea87ae85c9b31303a2e9d4c769d9f3ee8a3a60d1 Author: KP Singh Date: Tue Nov 17 23:29:29 2020 +0000 bpf: Add tests for bpf_bprm_opts_set helper The test forks a child process, updates the local storage to set/unset the securexec bit. The BPF program in the test attaches to bprm_creds_for_exec which checks the local storage of the current task to set the secureexec bit on the binary parameters (bprm). The child then execs a bash command with the environment variable TMPDIR set in the envp. The bash command returns a different exit code based on its observed value of the TMPDIR variable. Since TMPDIR is one of the variables that is ignored by the dynamic loader when the secureexec bit is set, one should expect the child execution to not see this value when the secureexec bit is set. Signed-off-by: KP Singh Signed-off-by: Daniel Borkmann Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20201117232929.2156341-2-kpsingh@chromium.org commit 3f6719c7b62f0327c9091e26d0da10e65668229e Author: KP Singh Date: Tue Nov 17 23:29:28 2020 +0000 bpf: Add bpf_bprm_opts_set helper The helper allows modification of certain bits on the linux_binprm struct starting with the secureexec bit which can be updated using the BPF_F_BPRM_SECUREEXEC flag. secureexec can be set by the LSM for privilege gaining executions to set the AT_SECURE auxv for glibc. When set, the dynamic linker disables the use of certain environment variables (like LD_PRELOAD). Signed-off-by: KP Singh Signed-off-by: Daniel Borkmann Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20201117232929.2156341-1-kpsingh@chromium.org commit c7f0169e3bd274e576f6aaeee86ad2adf7bb14b5 Author: Lee Jones Date: Tue Nov 17 13:46:18 2020 -0800 Input: elan_i2c_core - move header inclusion inside The same clause as its use. Fixes the following W=1 kernel build warning(s): include/linux/input/elan-i2c-ids.h:26:36: warning: ‘elan_acpi_id’ defined but not used [-Wunused-const-variable=] Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201112104420.GG1997862@dell Signed-off-by: Dmitry Torokhov commit 23fd34a56ce11e1e90444c55a96fddc8398bbfa8 Author: Dmitry Torokhov Date: Wed Nov 11 17:34:49 2020 -0800 Input: ads7846 - drop unneeded asm/irq.h include This is essentially a revert of: 3ac8bf077d0f ("[PATCH] ads7846: sparc32 warning fix") By now enable_irq() and disable_irq() are properly defined in linux/interrupt.h and we do not need to pull in architecture-specific bits. Signed-off-by: Dmitry Torokhov commit 03e2c9c782f721b661a0e42b1b58f394b5298544 Author: Dmitry Torokhov Date: Wed Nov 11 17:17:11 2020 -0800 Input: ads7846 - fix unaligned access on 7845 req->sample[1] is not naturally aligned at word boundary, and therefore we should use get_unaligned_be16() when accessing it. Fixes: 3eac5c7e44f3 ("Input: ads7846 - extend the driver for ads7845 controller support") Signed-off-by: Dmitry Torokhov commit 820830ec918f6c3dcd77a54a1c6198ab57407916 Author: Oleksij Rempel Date: Tue Nov 17 15:33:24 2020 -0800 Input: ads7846 - fix integer overflow on Rt calculation In some rare cases the 32 bit Rt value will overflow if z2 and x is max, z1 is minimal value and x_plate_ohms is relatively high (for example 800 ohm). This would happen on some screen age with low pressure. There are two possible fixes: - make Rt 64bit - reorder calculation to avoid overflow The second variant seems to be preferable, since 64 bit calculation on 32 bit system is a bit more expensive. Fixes: ffa458c1bd9b6f653008d450f337602f3d52a646 ("spi: ads7846 driver") Co-developed-by: David Jander Signed-off-by: David Jander Signed-off-by: Oleksij Rempel Link: https://lore.kernel.org/r/20201113112240.1360-1-o.rempel@pengutronix.de Signed-off-by: Dmitry Torokhov commit 9c9509717b53e701469493a8d87ed42c7d782502 Author: Oleksij Rempel Date: Wed Nov 11 16:39:05 2020 -0800 Input: ads7846 - convert to full duplex Starting with 3eac5c7e44f3 ("Input: ads7846 - extend the driver for ads7845 controller support"), the ads7845 was partially converted to full duplex mode. Since it is not touchscreen controller specific, it is better to extend this conversion to cover entire driver. This will reduce CPU load and make driver more readable. Signed-off-by: Oleksij Rempel Link: https://lore.kernel.org/r/20201110085041.16303-2-o.rempel@pengutronix.de Signed-off-by: Dmitry Torokhov commit e52cd628a03f72a547dbf90ccb703ee64800504a Author: David Jander Date: Wed Nov 11 11:00:59 2020 -0800 Input: ads7846 - fix race that causes missing releases If touchscreen is released while busy reading HWMON device, the release can be missed. The IRQ thread is not started because no touch is active and BTN_TOUCH release event is never sent. Fixes: f5a28a7d4858f94a ("Input: ads7846 - avoid pen up/down when reading hwmon") Co-developed-by: Oleksij Rempel Signed-off-by: David Jander Signed-off-by: Oleksij Rempel Link: https://lore.kernel.org/r/20201027105416.18773-1-o.rempel@pengutronix.de Signed-off-by: Dmitry Torokhov commit 65bbe531b54668099783cd687e674b9587c7e56e Author: Srinivas Neeli Date: Thu Nov 12 22:42:22 2020 +0530 gpio: gpio-xilinx: Add clock support Adds clock support to the Xilinx GPIO driver. Signed-off-by: Srinivas Neeli Acked-by: Michal Simek Link: https://lore.kernel.org/r/1605201148-4508-4-git-send-email-srinivas.neeli@xilinx.com Signed-off-by: Linus Walleij commit 700a2b53bdc9c3b3f7241626eaf9a81b04c7593d Author: Srinivas Neeli Date: Thu Nov 12 22:42:21 2020 +0530 dt-bindings: gpio: gpio-xilinx: Add clk support to xilinx soft gpio IP Specify clock property in binding. Signed-off-by: Srinivas Neeli Acked-by: Michal Simek Link: https://lore.kernel.org/r/1605201148-4508-3-git-send-email-srinivas.neeli@xilinx.com Signed-off-by: Linus Walleij commit 8c669fe69a7d931d29345ab6f2ff28891a8b6a25 Author: Srinivas Neeli Date: Thu Nov 12 22:42:20 2020 +0530 gpio: gpio-xilinx: Arrange headers in sorting order Arrange header files in sorted order. Signed-off-by: Srinivas Neeli Acked-by: Michal Simek Link: https://lore.kernel.org/r/1605201148-4508-2-git-send-email-srinivas.neeli@xilinx.com Signed-off-by: Linus Walleij commit 6243f572a18db99607f29517b2d6b4209356b9fa Author: Chen Jun Date: Fri Oct 23 06:48:27 2020 +0000 iommu: Modify the description of iommu_sva_unbind_device iommu_sva_unbind_device has no return value. Remove the description of the return value of the function. Signed-off-by: Chen Jun Link: https://lore.kernel.org/r/20201023064827.74794-1-chenjun102@huawei.com Signed-off-by: Will Deacon commit 6fa3525b455ae1fde5b424907141b33651f137b0 Author: Vijayanand Jitta Date: Wed Sep 30 13:14:24 2020 +0530 iommu/iova: Free global iova rcache on iova alloc failure When ever an iova alloc request fails we free the iova ranges present in the percpu iova rcaches and then retry but the global iova rcache is not freed as a result we could still see iova alloc failure even after retry as global rcache is holding the iova's which can cause fragmentation. So, free the global iova rcache as well and then go for the retry. Signed-off-by: Vijayanand Jitta Reviewed-by: Robin Murphy Acked-by: John Garry Link: https://lore.kernel.org/r/1601451864-5956-2-git-send-email-vjitta@codeaurora.org Signed-off-by: Will Deacon commit 4e89dce725213d3d0b0475211b500eda4ef4bf2f Author: Vijayanand Jitta Date: Wed Sep 30 13:14:23 2020 +0530 iommu/iova: Retry from last rb tree node if iova search fails When ever a new iova alloc request comes iova is always searched from the cached node and the nodes which are previous to cached node. So, even if there is free iova space available in the nodes which are next to the cached node iova allocation can still fail because of this approach. Consider the following sequence of iova alloc and frees on 1GB of iova space 1) alloc - 500MB 2) alloc - 12MB 3) alloc - 499MB 4) free - 12MB which was allocated in step 2 5) alloc - 13MB After the above sequence we will have 12MB of free iova space and cached node will be pointing to the iova pfn of last alloc of 13MB which will be the lowest iova pfn of that iova space. Now if we get an alloc request of 2MB we just search from cached node and then look for lower iova pfn's for free iova and as they aren't any, iova alloc fails though there is 12MB of free iova space. To avoid such iova search failures do a retry from the last rb tree node when iova search fails, this will search the entire tree and get an iova if its available. Signed-off-by: Vijayanand Jitta Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/1601451864-5956-1-git-send-email-vjitta@codeaurora.org Signed-off-by: Will Deacon commit 68dd9d89eaf56dfab8d46bf25610aa4650247617 Author: Lukas Bulwahn Date: Sun Nov 15 21:59:51 2020 +0100 iommu/vt-d: include conditionally on CONFIG_INTEL_IOMMU_SVM Commit 6ee1b77ba3ac ("iommu/vt-d: Add svm/sva invalidate function") introduced intel_iommu_sva_invalidate() when CONFIG_INTEL_IOMMU_SVM. This function uses the dedicated static variable inv_type_granu_table and functions to_vtd_granularity() and to_vtd_size(). These parts are unused when !CONFIG_INTEL_IOMMU_SVM, and hence, make CC=clang W=1 warns with an -Wunused-function warning. Include these parts conditionally on CONFIG_INTEL_IOMMU_SVM. Fixes: 6ee1b77ba3ac ("iommu/vt-d: Add svm/sva invalidate function") Signed-off-by: Lukas Bulwahn Acked-by: Lu Baolu Link: https://lore.kernel.org/r/20201115205951.20698-1-lukas.bulwahn@gmail.com Signed-off-by: Will Deacon commit 6997faa997ba95365cfe6f3a4b594f0eb6d25700 Merge: 5cfa9a612836f 270f3385cddf5 Author: Jakub Kicinski Date: Tue Nov 17 14:15:05 2020 -0800 Merge branch 'fix-several-bad-kernel-doc-markups' Mauro Carvalho Chehab says: ==================== Fix several bad kernel-doc markups Kernel-doc has always be limited to a probably bad documented rule: The kernel-doc markups should appear *imediatelly before* the function or data structure that it documents. On other words, if a C file would contain something like this: /** * foo - function foo * @args: foo args */ static inline void bar(int args); /** * bar - function bar * @args: foo args */ static inline void foo(void *args); The output (in ReST format) will be: .. c:function:: void bar (int args) function foo **Parameters** ``int args`` foo args .. c:function:: void foo (void *args) function bar **Parameters** ``void *args`` foo args Which is clearly a wrong result. Before this changeset, not even a warning is produced on such cases. As placing such markups just before the documented data is a common practice, on most cases this is fine. However, as patches touch things, identifiers may be renamed, and people may forget to update the kernel-doc markups to follow such changes. This has been happening for quite a while, as there are lots of files with kernel-doc problems. This series address those issues and add a file at the end that will enforce that the identifier will match the kernel-doc markup, avoiding this problem from keep happening as time goes by. ==================== Link: https://lore.kernel.org/r/cover.1605521731.git.mchehab+huawei@kernel.org Signed-off-by: Jakub Kicinski commit 270f3385cddf5db3799b393459476bd9abff89f1 Author: Mauro Carvalho Chehab Date: Mon Nov 16 11:17:59 2020 +0100 net: core: fix some kernel-doc markups Some identifiers have different names between their prototypes and the kernel-doc markup. In the specific case of netif_subqueue_stopped(), keep the current markup for __netif_subqueue_stopped(), adding a new one for netif_subqueue_stopped(). Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jakub Kicinski commit c1639be98b4281ac537f2ed77b0afaa1d336ce6c Author: Mauro Carvalho Chehab Date: Mon Nov 16 11:17:58 2020 +0100 net: datagram: fix some kernel-doc markups Some identifiers have different names between their prototypes and the kernel-doc markup. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Kirill Tkhai Signed-off-by: Jakub Kicinski commit 69280228d2b1cf650b6c9fc43e3158fa911b13d1 Author: Mauro Carvalho Chehab Date: Mon Nov 16 11:17:57 2020 +0100 net: phy: fix kernel-doc markups Some functions have different names between their prototypes and the kernel-doc markup. Reviewed-by: Andrew Lunn Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jakub Kicinski commit 5cfa9a612836f06f14f8e4388a01576db558b771 Merge: f73659192b0bd 5a579667850a1 Author: Jakub Kicinski Date: Tue Nov 17 13:48:27 2020 -0800 Merge branch 'add-ethtool-ntuple-filters-support' Naveen Mamindlapalli says: ==================== Add ethtool ntuple filters support This patch series adds support for ethtool ntuple filters, unicast address filtering, VLAN offload and SR-IOV ndo handlers. All of the above features are based on the Admin Function(AF) driver support to install and delete the low level MCAM entries. Each MCAM entry is programmed with the packet fields to match and what actions to take if the match succeeds. The PF driver requests AF driver to allocate set of MCAM entries to be used to install the flows by that PF. The entries will be freed when the PF driver is unloaded. * The patches 1 to 4 adds AF driver infrastructure to install and delete the low level MCAM flow entries. * Patch 5 adds ethtool ntuple filter support. * Patch 6 adds unicast MAC address filtering. * Patch 7 adds support for dumping the MCAM entries via debugfs. * Patches 8 to 10 adds support for VLAN offload. * Patch 10 to 11 adds support for SR-IOV ndo handlers. * Patch 12 adds support to read the MCAM entries. Misc: * Removed redundant mailbox NIX_RXVLAN_ALLOC. ==================== Link: https://lore.kernel.org/r/20201114195303.25967-1-naveenm@marvell.com Signed-off-by: Jakub Kicinski commit 5a579667850a1f2c324b0899de0bf5af487137b3 Author: Subbaraya Sundeep Date: Sun Nov 15 01:23:03 2020 +0530 octeontx2-af: Delete NIX_RXVLAN_ALLOC mailbox message Since mailbox message for installing flows is in place, remove the RXVLAN_ALLOC mbox message which is redundant. Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Goutham Signed-off-by: Naveen Mamindlapalli Signed-off-by: Jakub Kicinski commit dbab48cecc9466872574f29f7c3f5fd772277f5d Author: Naveen Mamindlapalli Date: Sun Nov 15 01:23:02 2020 +0530 octeontx2-af: Add new mbox messages to retrieve MCAM entries This patch introduces new mailbox mesages to retrieve a given MCAM entry or base flow steering rule of a VF installed by its parent PF. This helps while updating the existing MCAM rules with out re-framing the whole mailbox request again. The INSTALL FLOW mailbox consumer can read-modify-write the existing entry. Similarly while installing new flow rules for a VF, the base flow steering rule match creteria is copied to the new flow rule and the deltas are appended to the new rule. Signed-off-by: Naveen Mamindlapalli Co-developed-by: Vamsi Attunuru Signed-off-by: Vamsi Attunuru Signed-off-by: Sunil Goutham Signed-off-by: Jakub Kicinski commit 4f88ed2cc5afb14c07fdca27ca1aa9122c4fe421 Author: Hariprasad Kelam Date: Sun Nov 15 01:23:01 2020 +0530 octeontx2-af: Handle PF-VF mac address changes This patch handles the VF mac address changes as given below. 1. mac addr configrued by VF will be retained until VF module unload. 2. mac addr configred by PF for VF will be retained until power cycle. 3. mac addr confgired by PF for its VF can't be overwritten by VF. Signed-off-by: Hariprasad Kelam Signed-off-by: Sunil Goutham Signed-off-by: Naveen Mamindlapalli Signed-off-by: Jakub Kicinski commit f0c2982aaf98ff508b3a25ffabbb6e23ff7e6d9a Author: Naveen Mamindlapalli Date: Sun Nov 15 01:23:00 2020 +0530 octeontx2-pf: Add support for SR-IOV management functions This patch adds support for ndo_set_vf_mac, ndo_set_vf_vlan and ndo_get_vf_config handlers. The traffic redirection based on the VF mac address or vlan id is done by installing MCAM rules. Reserved RX_VTAG_TYPE7 in each NIXLF for VF VLAN which strips the VLAN tag from ingress VLAN traffic. The NIX PF allocates two MCAM entries for VF VLAN feature, one used for ingress VTAG strip and another entry for egress VTAG insertion. This patch also updates the MAC address in PF installed VF VLAN rule upon receiving nix_lf_start_rx mbox request for VF since Administrative Function driver will assign a valid MAC addr in nix_lf_start_rx function. Signed-off-by: Naveen Mamindlapalli Co-developed-by: Tomasz Duszynski Signed-off-by: Tomasz Duszynski Signed-off-by: Sunil Goutham Signed-off-by: Hariprasad Kelam Signed-off-by: Jakub Kicinski commit fd9d7859db6c629536e89cc89dfdbb76bdc45ac9 Author: Hariprasad Kelam Date: Sun Nov 15 01:22:59 2020 +0530 octeontx2-pf: Implement ingress/egress VLAN offload This patch implements egress VLAN offload by appending NIX_SEND_EXT_S header to NIX_SEND_HDR_S. The VLAN TCI information is specified in the NIX_SEND_EXT_S. The VLAN offload in the ingress path is implemented by configuring the NIX_RX_VTAG_ACTION_S to strip and capture the outer vlan fields. The NIX PF allocates one MCAM entry for Rx VLAN offload. Signed-off-by: Hariprasad Kelam Signed-off-by: Sunil Goutham Signed-off-by: Naveen Mamindlapalli Signed-off-by: Jakub Kicinski commit 9a946def264df04778ee30937471f1aa71ce3e41 Author: Vamsi Attunuru Date: Sun Nov 15 01:22:58 2020 +0530 octeontx2-af: Modify nix_vtag_cfg mailbox to support TX VTAG entries This patch modifies the existing nix_vtag_config mailbox message to allocate and free TX VTAG entries as requested by a NIX PF. The TX VTAG entries are global resource that shared by all PFs and each entry specifies the size of VTAG to insert and the VTAG header data to insert. The mailbox response contains the entry index which is used by mailbox requester in configuring the NPC_TX_VTAG_ACTION for any MCAM entry. Signed-off-by: Vamsi Attunuru Signed-off-by: Sunil Goutham Signed-off-by: Naveen Mamindlapalli Signed-off-by: Jakub Kicinski commit 4d6beb9c8032cec849a79f9247f4f038834515d8 Author: Subbaraya Sundeep Date: Sun Nov 15 01:22:57 2020 +0530 octeontx2-af: Add debugfs entry to dump the MCAM rules Add debugfs support to dump the MCAM rules installed using NPC_INSTALL_FLOW mbox message. Debugfs file can display mcam entry, counter if any, flow type and counter hits. Ethtool will dump the ntuple flows related to the PF only. The debugfs file gives systemwide view of the MCAM rules installed by all the PF's. Below is the example output when the debugfs file is read: ~ # mount -t debugfs none /sys/kernel/debug ~ # cat /sys/kernel/debug/octeontx2/npc/mcam_rules Installed by: PF1 direction: RX mcam entry: 227 udp source port 23 mask 0xffff Forward to: PF1 VF0 action: Direct to queue 0 enabled: yes counter: 1 hits: 0 Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Goutham Signed-off-by: Naveen Mamindlapalli Signed-off-by: Jakub Kicinski commit 63ee51575f6c4a070ffed059b9caa6e4645f3872 Author: Hariprasad Kelam Date: Sun Nov 15 01:22:56 2020 +0530 octeontx2-pf: Add support for unicast MAC address filtering Add unicast MAC address filtering support using install flow message. Total of 8 MCAM entries are allocated for adding unicast mac filtering rules. If the MCAM allocation fails, the unicast filtering support will not be advertised. Signed-off-by: Hariprasad Kelam Signed-off-by: Sunil Goutham Signed-off-by: Naveen Mamindlapalli Signed-off-by: Jakub Kicinski commit f0a1913f8a6f947531c3042f9d6524946e661b57 Author: Subbaraya Sundeep Date: Sun Nov 15 01:22:55 2020 +0530 octeontx2-pf: Add support for ethtool ntuple filters This patch adds support for adding and deleting ethtool ntuple filters. The filters for ether, ipv4, ipv6, tcp, udp and sctp are supported. The mask is also supported. The supported actions are drop and direct to a queue. Additionally we support FLOW_EXT field vlan_tci and FLOW_MAC_EXT. The NIX PF will allocate total 32 MCAM entries for the use of ethtool ntuple filters. The Administrative Function(AF) will install/delete the MCAM rules when NIX PF sends mailbox message to install/delete the ntuple filters. Ethtool ntuple filters support is restricted to PFs as of now and PF can install ntuple filters to direct the traffic to its VFs. Hence added a separate callback for VFs to get/set RSS configuration. Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Goutham Signed-off-by: Naveen Mamindlapalli Signed-off-by: Jakub Kicinski commit 55307fcb925846d760ed80f4a8359dd4331c52bd Author: Subbaraya Sundeep Date: Sun Nov 15 01:22:54 2020 +0530 octeontx2-af: Add mbox messages to install and delete MCAM rules Added new mailbox messages to install and delete MCAM rules. These mailbox messages will be used for adding/deleting ethtool n-tuple filters by NIX PF. The installed MCAM rules are stored in a list that will be traversed later to delete the MCAM entries when the interface is brought down or when PCIe FLR is received. The delete mailbox supports deleting a single MCAM entry or range of entries or all the MCAM entries owned by the pcifunc. Each MCAM entry can be associated with a HW match stat entry if the mailbox requester wants to check the hit count for debugging. Modified adding default unicast DMAC match rule using install flow API. The default unicast DMAC match entry installed by Administrative Function is saved and can be changed later by the mailbox user to fit additional fields, or the default MCAM entry rule action can be used for other flow rules installed later. Modified rvu_mbox_handler_nix_lf_free mailbox to add a flag to disable or delete the MCAM entries. The MCAM entries are disabled when the interface is brought down and deleted in FLR handler. The disabled MCAM entries will be re-enabled when the interface is brought up again. Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Goutham Signed-off-by: Naveen Mamindlapalli Signed-off-by: Jakub Kicinski commit 9b179a960a96d5ffd960a3f92f4536be0dda7f37 Author: Subbaraya Sundeep Date: Sun Nov 15 01:22:53 2020 +0530 octeontx2-af: Generate key field bit mask from KEX profile Key Extraction(KEX) profile decides how the packet metadata such as layer information and selected packet data bytes at each layer are placed in MCAM search key. This patch reads the configured KEX profile parameters to find out the bit position and bit mask for each field. The information is used when programming the MCAM match data by SW to match a packet flow and take appropriate action on the flow. This patch also verifies the mandatory fields such as channel and DMAC are not overwritten by the KEX configuration of other fields. Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Goutham Signed-off-by: Naveen Mamindlapalli Signed-off-by: Jakub Kicinski commit 041a1c171581f5b7016fd9200493ee4455f0afc1 Author: Subbaraya Sundeep Date: Sun Nov 15 01:22:52 2020 +0530 octeontx2-af: Verify MCAM entry channel and PF_FUNC This patch adds support to verify the channel number sent by mailbox requester before writing MCAM entry for Ingress packets. Similarly for Egress packets, verifying the PF_FUNC sent by the mailbox user. Signed-off-by: Subbaraya Sundeep Signed-off-by: Kiran Kumar K Signed-off-by: Sunil Goutham Signed-off-by: Naveen Mamindlapalli Signed-off-by: Jakub Kicinski commit f1517f6f1d6fd97a18836b0fb6921f2cb105eeb4 Author: Stanislaw Kardach Date: Sun Nov 15 01:22:51 2020 +0530 octeontx2-af: Modify default KEX profile to extract TX packet fields The current default Key Extraction(KEX) profile can only use RX packet fields while generating the MCAM search key. The profile can't be used for matching TX packet fields. This patch modifies the default KEX profile to add support for extracting TX packet fields into MCAM search key. Enabled Tx KPU packet parsing by configuring TX PKIND in tx_parse_cfg. Modified the KEX profile to extract 2 bytes of VLAN TCI from an offset of 2 bytes from LB_PTR. The LB_PTR points to the byte offset where the VLAN header starts. The NPC KPU parser profile has been modified to point LB_PTR to the starting byte offset of VLAN header which points to the tpid field. Signed-off-by: Stanislaw Kardach Signed-off-by: Sunil Goutham Signed-off-by: Naveen Mamindlapalli Signed-off-by: Jakub Kicinski commit f73659192b0bdf7bad826587b3530cef43cc048d Author: Xie He Date: Sat Nov 14 07:09:21 2020 -0800 net: wan: Delete the DLCI / SDLA drivers The DLCI driver (dlci.c) implements the Frame Relay protocol. However, we already have another newer and better implementation of Frame Relay provided by the HDLC_FR driver (hdlc_fr.c). The DLCI driver's implementation of Frame Relay is used by only one hardware driver in the kernel - the SDLA driver (sdla.c). The SDLA driver provides Frame Relay support for the Sangoma S50x devices. However, the vendor provides their own driver (along with their own multi-WAN-protocol implementations including Frame Relay), called WANPIPE. I believe most users of the hardware would use the vendor-provided WANPIPE driver instead. (The WANPIPE driver was even once in the kernel, but was deleted in commit 8db60bcf3021 ("[WAN]: Remove broken and unmaintained Sangoma drivers.") because the vendor no longer updated the in-kernel WANPIPE driver.) Cc: Mike McLagan Signed-off-by: Xie He Link: https://lore.kernel.org/r/20201114150921.685594-1-xie.he.0141@gmail.com Signed-off-by: Jakub Kicinski commit dc80a2717e9dba059302b4de5ebcb02b3d703e3c Merge: ad9a72f9c6fd3 e709a7b5a0663 Author: Linus Walleij Date: Tue Nov 17 22:23:38 2020 +0100 Merge tag 'intel-gpio-v5.11-1' of gitolite.kernel.org:pub/scm/linux/kernel/git/andy/linux-gpio-intel into devel intel-gpio for v5.11-1 * Refactor GPIO library to support bias and debounce ACPI settings The following is an automated git shortlog grouped by driver: gpiolib: - acpi: Make Intel GPIO tree official for GPIO ACPI work - acpi: Use BIT() macro to increase readability - acpi: Convert pin_index to be u16 - acpi: Extract acpi_request_own_gpiod() helper - acpi: Make acpi_gpio_to_gpiod_flags() usable for GpioInt() - acpi: Set initial value for output pin based on bias and polarity - acpi: Move acpi_gpio_to_gpiod_flags() upper in the code - acpi: Move non-critical code outside of critical section - acpi: Take into account debounce settings - acpi: Use named item for enum gpiod_flags variable - acpi: Respect bias settings for GpioInt() resource - Introduce gpio_set_debounce_timeout() for internal use - Extract gpio_set_config_with_argument_optional() helper - move bias related code from gpio_set_config() to gpio_set_bias() - Extract gpio_set_config_with_argument() for future use - use proper API to pack pin configuration parameters - add missed break statement - Replace unsigned by unsigned int Merge tag 'intel-pinctrl-v5.10-2' into HEAD: - Merge tag 'intel-pinctrl-v5.10-2' into HEAD pinctrl: - intel: Set default bias in case no particular value given - intel: Fix 2 kOhm bias which is 833 Ohm commit ad9a72f9c6fd3998f0080701f1cc1f43a4317b7c Merge: b9bf97105f4b9 09162bc32c880 Author: Linus Walleij Date: Tue Nov 17 22:23:05 2020 +0100 Merge tag 'v5.10-rc4' into devel Linux 5.10-rc4 commit 8d1e4f90ce445248d9e87ce5276b31cb675ec84f Author: Fabio Estevam Date: Tue Nov 10 16:02:10 2020 -0300 pinctrl: imx21: Remove the driver Since commit 4b563a066611 ("ARM: imx: Remove imx21 support") the imx21 SoC is no longer supported. Get rid of its pinctrl driver too, which is now unused. Signed-off-by: Fabio Estevam Acked-by: Shawn Guo Link: https://lore.kernel.org/r/20201110190210.29376-1-festevam@gmail.com Signed-off-by: Linus Walleij commit cbf398d76534427877e5824dd61611514cf284b3 Merge: de91e631bdc7e 3106c580fb7cf Author: Daniel Borkmann Date: Tue Nov 17 22:07:40 2020 +0100 Merge branch 'af-xdp-tx-batch' Magnus Karlsson says: ==================== This patch set improves the performance of mainly the Tx processing of AF_XDP sockets. Though, patch 3 also improves the Rx path. All in all, this patch set improves the throughput of the l2fwd xdpsock application by around 11%. If we just take a look at Tx processing part, it is improved by 35% to 40%. Hopefully the new batched Tx interfaces should be of value to other drivers implementing AF_XDP zero-copy support. But patch #3 is generic and will improve performance of all drivers when using AF_XDP sockets (under the premises explained in that patch). @Daniel. In patch 3, I apply all the padding required to hinder the adjacency prefetcher to prefetch the wrong things. After this patch set, I will submit another patch set that introduces ____cacheline_padding_in_smp in include/linux/cache.h according to your suggestions. The last patch in that patch set will then convert the explicit paddings that we have now to ____cacheline_padding_in_smp. v2 -> v3: * Fixed #pragma warning with clang and defined a loop_unrolled_for macro for easier readability [lkp, Nick] * Simplified invalid descriptor handling in xskq_cons_read_desc_batch() v1 -> v2: * Removed added parameter in i40e_setup_tx_descriptors and adopted a simpler solution [Maciej] * Added test for !xs in xsk_tx_peek_release_desc_batch() [John] * Simplified return path in xsk_tx_peek_release_desc_batch() [John] * Dropped patch #1 in v1 that introduced lazy completions. Hopefully this is not needed when we get busy poll [Jakub] * Iterate over local variable in xskq_prod_reserve_addr_batch() for improved performance * Fixed the fallback path in xsk_tx_peek_release_desc_batch() so that it also produces a batch of descriptors, albeit by using the slower (but more general) older code. This improves the performance of the case when multiple sockets are sharing the same device and queue id. ==================== Signed-off-by: Daniel Borkmann commit 3106c580fb7cf26691c1ce3aba2223f3ae56d846 Author: Magnus Karlsson Date: Mon Nov 16 12:12:47 2020 +0100 i40e: Use batched xsk Tx interfaces to increase performance Use the new batched xsk interfaces for the Tx path in the i40e driver to improve performance. On my machine, this yields a throughput increase of 4% for the l2fwd sample app in xdpsock. If we instead just look at the Tx part, this patch set increases throughput with above 20% for Tx. Note that I had to explicitly loop unroll the inner loop to get to this performance level, by using a pragma. It is honored by both clang and gcc and should be ignored by versions that do not support it. Using the -funroll-loops compiler command line switch on the source file resulted in a loop unrolling on a higher level that lead to a performance decrease instead of an increase. Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/1605525167-14450-6-git-send-email-magnus.karlsson@gmail.com commit 9349eb3a9d2ae0151510dd98b6640dfaeebee9cc Author: Magnus Karlsson Date: Mon Nov 16 12:12:46 2020 +0100 xsk: Introduce batched Tx descriptor interfaces Introduce batched descriptor interfaces in the xsk core code for the Tx path to be used in the driver to write a code path with higher performance. This interface will be used by the i40e driver in the next patch. Though other drivers would likely benefit from this new interface too. Note that batching is only implemented for the common case when there is only one socket bound to the same device and queue id. When this is not the case, we fall back to the old non-batched version of the function. Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/1605525167-14450-5-git-send-email-magnus.karlsson@gmail.com commit b8c7aece29bc06e1e63efeefb9e31ab259e84ea2 Author: Magnus Karlsson Date: Mon Nov 16 12:12:45 2020 +0100 xsk: Introduce padding between more ring pointers Introduce one cache line worth of padding between the consumer pointer and the flags field as well as between the flags field and the start of the descriptors in all the lockless rings. This so that the x86 HW adjacency prefetcher will not prefetch the adjacent pointer/field when only one pointer/field is going to be used. This improves throughput performance for the l2fwd sample app with 1% on my machine with HW prefetching turned on in the BIOS. Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/1605525167-14450-4-git-send-email-magnus.karlsson@gmail.com commit f320460b9489d80355821829069fdefa6c698cb4 Author: Magnus Karlsson Date: Mon Nov 16 12:12:44 2020 +0100 i40e: Remove unnecessary sw_ring access from xsk Tx Remove the unnecessary access to the software ring for the AF_XDP zero-copy driver. This was used to record the length of the packet so that the driver Tx completion code could sum this up to produce the total bytes sent. This is now performed during the transmission of the packet, so no need to record this in the software ring. Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/1605525167-14450-3-git-send-email-magnus.karlsson@gmail.com commit 90da4b3208d32bdb5489ca08b91af16ed4a68d00 Author: Magnus Karlsson Date: Mon Nov 16 12:12:43 2020 +0100 samples/bpf: Increment Tx stats at sending Increment the statistics over how many Tx packets have been sent at the time of sending instead of at the time of completion. This as a completion event means that the buffer has been sent AND returned to user space. The packet always gets sent shortly after sendto() is called. The kernel might, for performance reasons, decide to not return every single buffer to user space immediately after sending, for example, only after a batch of packets have been transmitted. Incrementing the number of packets sent at completion, will in that case be confusing as if you send a single packet, the counter might show zero for a while even though the packet has been transmitted. Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/1605525167-14450-2-git-send-email-magnus.karlsson@gmail.com commit 3d590056b056ee93de03d951a8077a94be1e14d4 Merge: 3603a537bf791 d4aac7d439c2d Author: Linus Walleij Date: Tue Nov 17 22:03:26 2020 +0100 Merge tag 'renesas-pinctrl-for-v5.11-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: renesas: Updates for v5.11 - Add remaining video-in (VIN) pin groups on R-Car H2 and RZ/G1H, - Image size optimizations and code consolidations, - Minor fixes and improvements. commit ba7aa63000f26c5a2c87d5a716601499a02a3156 Author: Alexandre Belloni Date: Tue Nov 17 21:30:35 2020 +0100 rtc: mxc: use of_device_get_match_data Use of_device_get_match_data to simplify mxc_rtc_probe. Signed-off-by: Alexandre Belloni Reviewed-by: Fabio Estevam Link: https://lore.kernel.org/r/20201117203035.1280099-1-alexandre.belloni@bootlin.com commit 8c9e8b0a28225c46f2cca0a09a3a111bb043e874 Author: Álvaro Fernández Rojas Date: Wed Jun 17 12:50:41 2020 +0200 mips: bmips: add BCM6318 reset controller definitions BCM6318 SoCs have a reset controller for certain components. Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli Reviewed-by: Rob Herring Signed-off-by: Thomas Bogendoerfer commit b7aa228813bdf014d6ad173ca3abfced30f1ed37 Author: Álvaro Fernández Rojas Date: Wed Jun 17 12:50:40 2020 +0200 mips: bmips: dts: add BCM63268 reset controller support BCM63268 SoCs have a reset controller for certain components. Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli Reviewed-by: Rob Herring Signed-off-by: Thomas Bogendoerfer commit 7acf84e87857721d66a1ba800c2c50669089f43d Author: Álvaro Fernández Rojas Date: Wed Jun 17 12:50:39 2020 +0200 mips: bmips: dts: add BCM6368 reset controller support BCM6368 SoCs have a reset controller for certain components. Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli Reviewed-by: Rob Herring Signed-off-by: Thomas Bogendoerfer commit 226383600be58dcf2e070e4ac8a371640024fe54 Author: Álvaro Fernández Rojas Date: Wed Jun 17 12:50:38 2020 +0200 mips: bmips: dts: add BCM6362 reset controller support BCM6362 SoCs have a reset controller for certain components. Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli Reviewed-by: Rob Herring Signed-off-by: Thomas Bogendoerfer commit 8079cfba4c7b8cae900c27104b4512fa5ed1f021 Author: Álvaro Fernández Rojas Date: Wed Jun 17 12:50:37 2020 +0200 mips: bmips: dts: add BCM6358 reset controller support BCM6358 SoCs have a reset controller for certain components. Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli Reviewed-by: Rob Herring Signed-off-by: Thomas Bogendoerfer commit 83f865d7e32e40b4903b1f83537c63fc5cdf1eb8 Author: Álvaro Fernández Rojas Date: Wed Jun 17 12:50:36 2020 +0200 mips: bmips: dts: add BCM6328 reset controller support BCM6328 SoCs have a reset controller for certain components. Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli Reviewed-by: Rob Herring Signed-off-by: Thomas Bogendoerfer commit aac025437f14c1647dc6054b95daeebed34f6971 Author: Álvaro Fernández Rojas Date: Wed Jun 17 12:50:35 2020 +0200 reset: add BCM6345 reset controller driver Add support for resetting blocks through the Linux reset controller subsystem for BCM63xx SoCs. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Florian Fainelli Reviewed-by: Philipp Zabel Signed-off-by: Thomas Bogendoerfer commit 10c1e714a68b45b124157aa02d80abe244a2a61a Author: Álvaro Fernández Rojas Date: Wed Jun 17 12:50:34 2020 +0200 dt-bindings: reset: add BCM6345 reset controller bindings Add device tree binding documentation for BCM6345 reset controller. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Florian Fainelli Reviewed-by: Rob Herring Signed-off-by: Thomas Bogendoerfer commit 29906e1aac11bf9907e26608216dc7970e73a70e Author: Álvaro Fernández Rojas Date: Wed Jun 17 12:50:33 2020 +0200 mips: bmips: select ARCH_HAS_RESET_CONTROLLER This allows to add reset controllers support. Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli Signed-off-by: Thomas Bogendoerfer commit e5dab78f1f3c8d6cd1f0717c27580ddab5176bc4 Author: 周琰杰 (Zhou Yanjie) Date: Tue Nov 17 01:55:08 2020 +0800 MIPS: Ingenic: Refresh defconfig for Ingenic SoCs based boards. 1.Refresh defconfig of CI20 to support OTG and RNG. 2.Refresh defconfig of CU1000-Neo to support OTG/RNG/OST/SC16IS752. 3.Refresh defconfig of CU1830-Neo to support OTG/DTRNG/OST/SC16IS752. Tested-by: 周正 (Zhou Zheng) Tested by: H. Nikolaus Schaller # CI20/jz4780 Signed-off-by: 周琰杰 (Zhou Yanjie) Signed-off-by: Thomas Bogendoerfer commit 158c774d3c64859e84dd20e04d5fb18c8d3d318e Author: 周琰杰 (Zhou Yanjie) Date: Tue Nov 17 01:55:07 2020 +0800 MIPS: Ingenic: Add missing nodes for Ingenic SoCs and boards. 1.Add OTG/OTG PHY/RNG nodes for JZ4780, CGU/OTG nodes for CI20. 2.Add OTG/OTG PHY/RNG/OST nodes for X1000, SSI/CGU/OST/OTG/SC16IS752 nodes for CU1000-Neo. 3.Add OTG/OTG PHY/DTRNG/OST nodes for X1830, SSI/CGU/OST/OTG/SC16IS752 nodes for CU1830-Neo. Tested-by: 周正 (Zhou Zheng) Tested by: H. Nikolaus Schaller # CI20/jz4780 Signed-off-by: 周琰杰 (Zhou Yanjie) Signed-off-by: Thomas Bogendoerfer commit 7701f264a756d41c2b663c3b745dd81efc875515 Merge: a3fb655027c33 ac3b57adf87ad Author: Thomas Bogendoerfer Date: Tue Nov 17 21:35:44 2020 +0100 Merge tag 'mips_fixes_5.10_1' into mips-next Pull in mips-fixes to get memblock fix. - fix bug preventing booting on several platforms - fix for build error, when modules need has_transparent_hugepage - fix for memleak in alchemy clk setup Signed-off-by: Thomas Bogendoerfer commit f74e93032df229a8358617e586ba89f744d5dbcd Author: Jonathan Cameron Date: Sun Nov 15 19:29:50 2020 +0000 arm64: dts: exynos: Drop incorrect use of io-channel-ranges property This property is for consumers of io-channels. Here it is used in providers of those channels. Note dt-schema will currently flag this as an error due to a dependency between this property and io-channels. Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20201115192951.1073632-9-jic23@kernel.org Signed-off-by: Krzysztof Kozlowski commit 0f8159371c225a7b019b612a5c101e8b839c6c46 Author: Jonathan Cameron Date: Sun Nov 15 19:29:49 2020 +0000 ARM: dts: s5pv210: Drop unneeded io-channel-ranges property in Aries This property is only useful if a node has children as it allows them to then use io-channel properties in the parent. Here there are no children. This is harmless, but we are planning to shortly drop this property as it is rarely used correctly and there is little reason it would ever be needed as we can just provide the io-channels property to any child nodes that need it. Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20201115192951.1073632-8-jic23@kernel.org Signed-off-by: Krzysztof Kozlowski commit 43379417e31cadc7afba5ca549eaa1043f089ce5 Author: Jonathan Cameron Date: Sun Nov 15 19:29:47 2020 +0000 ARM: dts: s5pv210: Drop incorrect use of io-channel-ranges property This property is relevant to consumers of io-channels. Here it is used by a provider. dt-schema will now report and error as this property must be in the same node as io-channels and it is not here. Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20201115192951.1073632-6-jic23@kernel.org Signed-off-by: Krzysztof Kozlowski commit e73840f316cbf9df00893c0ef9f734196087403d Author: Jonathan Cameron Date: Sun Nov 15 19:29:46 2020 +0000 ARM: dts: exynos: Drop incorrect use of io-channel-ranges This property is only relevant to consumers of io-channels, not providers. All these dtsi files have it alongside #io-channel-cells which indicates they are providers of io-channels, not consumers. Note that dt-schema will now flag this up due to a dependency between this property and io-channels. Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20201115192951.1073632-5-jic23@kernel.org Signed-off-by: Krzysztof Kozlowski commit fccf111e471d0e608a96844e093bba0147bb8bba Merge: 0676a4ea28471 de25bcc47fba4 Author: Jakub Kicinski Date: Tue Nov 17 11:39:22 2020 -0800 Merge branch 'net-hns3-updates-for-next' Huazhong Tan says: ==================== net: hns3: updates for -next There are several updates relating to the interrupt coalesce for the HNS3 ethernet driver. based on the frame quantity). a fixed value in code. based on the gap time). its new usage. change log: V4 - remove #5~#10 from this series, which needs more discussion. V3 - fix a typo error in #1 reported by Jakub Kicinski. rewrite #9 commit log. remove #11 from this series. V2 - reorder #2 & #3 to fix compiler error. fix some checkpatch warnings in #10 & #11. previous version: V3: https://patchwork.ozlabs.org/project/netdev/cover/1605151998-12633-1-git-send-email-tanhuazhong@huawei.com/ V2: https://patchwork.ozlabs.org/project/netdev/cover/1604892159-19990-1-git-send-email-tanhuazhong@huawei.com/ V1: https://patchwork.ozlabs.org/project/netdev/cover/1604730681-32559-1-git-send-email-tanhuazhong@huawei.com/ ==================== Link: https://lore.kernel.org/r/1605514854-11205-1-git-send-email-tanhuazhong@huawei.com Signed-off-by: Jakub Kicinski commit de25bcc47fba49a848764fdfab76741b7e17ca2f Author: Huazhong Tan Date: Mon Nov 16 16:20:54 2020 +0800 net: hns3: rename gl_adapt_enable in struct hns3_enet_coalesce Besides GL(Gap Limiting), QL(Quantity Limiting) can be modified dynamically when DIM is supported. So rename gl_adapt_enable as adapt_enable in struct hns3_enet_coalesce. Signed-off-by: Huazhong Tan Signed-off-by: Jakub Kicinski commit 5ac84b02d372ff45bce48c78beedbffe7c9158c0 Author: Huazhong Tan Date: Mon Nov 16 16:20:53 2020 +0800 net: hns3: add support for 1us unit GL configuration For device whose version is above V3(include V3), the GL configuration can set as 1us unit, so adds support for configuring this field. Signed-off-by: Huazhong Tan Signed-off-by: Jakub Kicinski commit ab16b49cdf986172373afc16b4039f058aa3b22d Author: Huazhong Tan Date: Mon Nov 16 16:20:52 2020 +0800 net: hns3: add support for querying maximum value of GL For maintainability and compatibility, add support for querying the maximum value of GL. Signed-off-by: Huazhong Tan Signed-off-by: Jakub Kicinski commit 91bfae25eedd981b384339c7b12bef9eeaba0f34 Author: Huazhong Tan Date: Mon Nov 16 16:20:51 2020 +0800 net: hns3: add support for configuring interrupt quantity limiting QL(quantity limiting) means that hardware supports the interrupt coalesce based on the frame quantity. QL can be configured when int_ql_max in device's specification is non-zero, so add support to configure it. Also, rename two coalesce init function to fit their purpose. Signed-off-by: Huazhong Tan Signed-off-by: Jakub Kicinski commit 0676a4ea28471a20fd4d57a0b70578a8799838a3 Merge: 97f53a08cba12 1d8300d3ce9db Author: Jakub Kicinski Date: Tue Nov 17 11:37:13 2020 -0800 Merge branch 'net-phy-add-support-for-shared-interrupts-part-2' Ioana Ciornei says: ==================== net: phy: add support for shared interrupts (part 2) This patch set aims to actually add support for shared interrupts in phylib and not only for multi-PHY devices. While we are at it, streamline the interrupt handling in phylib. For a bit of context, at the moment, there are multiple phy_driver ops that deal with this subject: - .config_intr() - Enable/disable the interrupt line. - .ack_interrupt() - Should quiesce any interrupts that may have been fired. It's also used by phylib in conjunction with .config_intr() to clear any pending interrupts after the line was disabled, and before it is going to be enabled. - .did_interrupt() - Intended for multi-PHY devices with a shared IRQ line and used by phylib to discern which PHY from the package was the one that actually fired the interrupt. - .handle_interrupt() - Completely overrides the default interrupt handling logic from phylib. The PHY driver is responsible for checking if any interrupt was fired by the respective PHY and choose accordingly if it's the one that should trigger the link state machine. From my point of view, the interrupt handling in phylib has become somewhat confusing with all these callbacks that actually read the same PHY register - the interrupt status. A more streamlined approach would be to just move the responsibility to write an interrupt handler to the driver (as any other device driver does) and make .handle_interrupt() the only way to deal with interrupts. Another advantage with this approach would be that phylib would gain support for shared IRQs between different PHY (not just multi-PHY devices), something which at the moment would require extending every PHY driver anyway in order to implement their .did_interrupt() callback and duplicate the same logic as in .ack_interrupt(). The disadvantage of making .did_interrupt() mandatory would be that we are slightly changing the semantics of the phylib API and that would increase confusion instead of reducing it. What I am proposing is the following: - As a first step, make the .ack_interrupt() callback optional so that we do not break any PHY driver amid the transition. - Every PHY driver gains a .handle_interrupt() implementation that, for the most part, would look like below: irq_status = phy_read(phydev, INTR_STATUS); if (irq_status < 0) { phy_error(phydev); return IRQ_NONE; } if (!(irq_status & irq_mask)) return IRQ_NONE; phy_trigger_machine(phydev); return IRQ_HANDLED; - Remove each PHY driver's implementation of the .ack_interrupt() by actually taking care of quiescing any pending interrupts before enabling/after disabling the interrupt line. - Finally, after all drivers have been ported, remove the .ack_interrupt() and .did_interrupt() callbacks from phy_driver. This patch set is part 2 of the entire change set and it addresses the changes needed in 9 PHY drivers. The rest can be found on my Github branch here: https://github.com/IoanaCiornei/linux/commits/phylib-shared-irq ==================== Link: https://lore.kernel.org/r/20201113165226.561153-1-ciorneiioana@gmail.com Signed-off-by: Jakub Kicinski commit 1d8300d3ce9db9bfac91140bd9386cf335e935bf Author: Ioana Ciornei Date: Fri Nov 13 18:52:26 2020 +0200 net: phy: adin: remove the use of the .ack_interrupt() In preparation of removing the .ack_interrupt() callback, we must replace its occurrences (aka phy_clear_interrupt), from the 2 places where it is called from (phy_enable_interrupts and phy_disable_interrupts), with equivalent functionality. This means that clearing interrupts now becomes something that the PHY driver is responsible of doing, before enabling interrupts and after clearing them. Make this driver follow the new contract. Signed-off-by: Ioana Ciornei Acked-by: Alexandru Ardelean Signed-off-by: Jakub Kicinski commit 66d7439e83607ff8e13a2a6d3337ba26b4fa2b08 Author: Ioana Ciornei Date: Fri Nov 13 18:52:25 2020 +0200 net: phy: adin: implement generic .handle_interrupt() callback In an attempt to actually support shared IRQs in phylib, we now move the responsibility of triggering the phylib state machine or just returning IRQ_NONE, based on the IRQ status register, to the PHY driver. Having 3 different IRQ handling callbacks (.handle_interrupt(), .did_interrupt() and .ack_interrupt() ) is confusing so let the PHY driver implement directly an IRQ handler like any other device driver. Make this driver follow the new convention. Signed-off-by: Ioana Ciornei Acked-by: Alexandru Ardelean Signed-off-by: Jakub Kicinski commit e1bc534df8555c5e86b141ece9a2c900e9694882 Author: Ioana Ciornei Date: Fri Nov 13 18:52:24 2020 +0200 net: phy: ste10Xp: remove the use of .ack_interrupt() In preparation of removing the .ack_interrupt() callback, we must replace its occurrences (aka phy_clear_interrupt), from the 2 places where it is called from (phy_enable_interrupts and phy_disable_interrupts), with equivalent functionality. This means that clearing interrupts now becomes something that the PHY driver is responsible of doing, before enabling interrupts and after clearing them. Make this driver follow the new contract. Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit 80ca9ee741da60ae1d3feb35d37ab525a21e5973 Author: Ioana Ciornei Date: Fri Nov 13 18:52:23 2020 +0200 net: phy: ste10Xp: implement generic .handle_interrupt() callback In an attempt to actually support shared IRQs in phylib, we now move the responsibility of triggering the phylib state machine or just returning IRQ_NONE, based on the IRQ status register, to the PHY driver. Having 3 different IRQ handling callbacks (.handle_interrupt(), .did_interrupt() and .ack_interrupt() ) is confusing so let the PHY driver implement directly an IRQ handler like any other device driver. Make this driver follow the new convention. Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit 824ef51f0871b7d11bd6c9e43d753f4062053435 Author: Ioana Ciornei Date: Fri Nov 13 18:52:22 2020 +0200 net: phy: smsc: remove the use of .ack_interrupt() In preparation of removing the .ack_interrupt() callback, we must replace its occurrences (aka phy_clear_interrupt), from the 2 places where it is called from (phy_enable_interrupts and phy_disable_interrupts), with equivalent functionality. This means that clearing interrupts now becomes something that the PHY driver is responsible of doing, before enabling interrupts and after clearing them. Make this driver follow the new contract. Cc: Andre Edich Cc: Marco Felsch Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit 36b25c26e2caab6c494215b9b5951b44a4f2f60c Author: Ioana Ciornei Date: Fri Nov 13 18:52:21 2020 +0200 net: phy: smsc: implement generic .handle_interrupt() callback In an attempt to actually support shared IRQs in phylib, we now move the responsibility of triggering the phylib state machine or just returning IRQ_NONE, based on the IRQ status register, to the PHY driver. Having 3 different IRQ handling callbacks (.handle_interrupt(), .did_interrupt() and .ack_interrupt() ) is confusing so let the PHY driver implement directly an IRQ handler like any other device driver. Make this driver follow the new convention. Cc: Andre Edich Cc: Marco Felsch Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit 347917c7e06a6890781662db155e29b36d30a5a4 Author: Ioana Ciornei Date: Fri Nov 13 18:52:20 2020 +0200 net: phy: amd: remove the use of .ack_interrupt() In preparation of removing the .ack_interrupt() callback, we must replace its occurrences (aka phy_clear_interrupt), from the 2 places where it is called from (phy_enable_interrupts and phy_disable_interrupts), with equivalent functionality. This means that clearing interrupts now becomes something that the PHY driver is responsible of doing, before enabling interrupts and after clearing them. Make this driver follow the new contract. Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit d995a36b7e967e2f990984c741c26710eb8651d4 Author: Ioana Ciornei Date: Fri Nov 13 18:52:19 2020 +0200 net: phy: amd: implement generic .handle_interrupt() callback In an attempt to actually support shared IRQs in phylib, we now move the responsibility of triggering the phylib state machine or just returning IRQ_NONE, based on the IRQ status register, to the PHY driver. Having 3 different IRQ handling callbacks (.handle_interrupt(), .did_interrupt() and .ack_interrupt() ) is confusing so let the PHY driver implement directly an IRQ handler like any other device driver. Make this driver follow the new convention. Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit 45f52f1238512768c8ca29eb272e5794faf5b471 Author: Ioana Ciornei Date: Fri Nov 13 18:52:18 2020 +0200 net: phy: nxp-tja11xx: remove the use of .ack_interrupt() In preparation of removing the .ack_interrupt() callback, we must replace its occurrences (aka phy_clear_interrupt), from the 2 places where it is called from (phy_enable_interrupts and phy_disable_interrupts), with equivalent functionality. This means that clearing interrupts now becomes something that the PHY driver is responsible of doing, before enabling interrupts and after clearing them. Make this driver follow the new contract. Cc: Marek Vasut Cc: Oleksij Rempel Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit 52b1984a88ac1e6097ac519eb671a77afc80943d Author: Ioana Ciornei Date: Fri Nov 13 18:52:17 2020 +0200 net: phy: nxp-tja11xx: implement generic .handle_interrupt() callback In an attempt to actually support shared IRQs in phylib, we now move the responsibility of triggering the phylib state machine or just returning IRQ_NONE, based on the IRQ status register, to the PHY driver. Having 3 different IRQ handling callbacks (.handle_interrupt(), .did_interrupt() and .ack_interrupt() ) is confusing so let the PHY driver implement directly an IRQ handler like any other device driver. Make this driver follow the new convention. Cc: Marek Vasut Cc: Oleksij Rempel Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit 9a12dd6f186c26798f999877be6b02fcd0e65c13 Author: Ioana Ciornei Date: Fri Nov 13 18:52:16 2020 +0200 net: phy: lxt: remove the use of .ack_interrupt() In preparation of removing the .ack_interrupt() callback, we must replace its occurrences (aka phy_clear_interrupt), from the 2 places where it is called from (phy_enable_interrupts and phy_disable_interrupts), with equivalent functionality. This means that clearing interrupts now becomes something that the PHY driver is responsible of doing, before enabling interrupts and after clearing them. Make this driver follow the new contract. Cc: Christophe Leroy Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit 01c4a00bf347974b98f8771fc9e931743661e6cd Author: Ioana Ciornei Date: Fri Nov 13 18:52:15 2020 +0200 net: phy: lxt: implement generic .handle_interrupt() callback In an attempt to actually support shared IRQs in phylib, we now move the responsibility of triggering the phylib state machine or just returning IRQ_NONE, based on the IRQ status register, to the PHY driver. Having 3 different IRQ handling callbacks (.handle_interrupt(), .did_interrupt() and .ack_interrupt() ) is confusing so let the PHY driver implement directly an IRQ handler like any other device driver. Make this driver follow the new convention. Cc: Christophe Leroy Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit 1f6d0f267a1476ae89ddf3cf6b7aab5ec1ead2da Author: Ioana Ciornei Date: Fri Nov 13 18:52:14 2020 +0200 net: phy: marvell: remove the use of .ack_interrupt() In preparation of removing the .ack_interrupt() callback, we must replace its occurrences (aka phy_clear_interrupt), from the 2 places where it is called from (phy_enable_interrupts and phy_disable_interrupts), with equivalent functionality. This means that clearing interrupts now becomes something that the PHY driver is responsible of doing, before enabling interrupts and after clearing them. Make this driver follow the new contract. Cc: Maxim Kochetkov Cc: Baruch Siach Cc: Robert Hancock Signed-off-by: Ioana Ciornei Tested-by: Andrew Lunn Signed-off-by: Jakub Kicinski commit a0723b375f9387f82e65382239144dc89c5175e1 Author: Ioana Ciornei Date: Fri Nov 13 18:52:13 2020 +0200 net: phy: marvell: implement generic .handle_interrupt() callback In an attempt to actually support shared IRQs in phylib, we now move the responsibility of triggering the phylib state machine or just returning IRQ_NONE, based on the IRQ status register, to the PHY driver. Having 3 different IRQ handling callbacks (.handle_interrupt(), .did_interrupt() and .ack_interrupt() ) is confusing so let the PHY driver implement directly an IRQ handler like any other device driver. Make this driver follow the new convention. Cc: Maxim Kochetkov Cc: Baruch Siach Cc: Robert Hancock Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit cf499391982d877e9313d2adeedcf5f1ffe05d6e Author: Ioana Ciornei Date: Fri Nov 13 18:52:12 2020 +0200 net: phy: microchip: remove the use of .ack_interrupt() In preparation of removing the .ack_interrupt() callback, we must replace its occurrences (aka phy_clear_interrupt), from the 2 places where it is called from (phy_enable_interrupts and phy_disable_interrupts), with equivalent functionality. This means that clearing interrupts now becomes something that the PHY driver is responsible of doing, before enabling interrupts and after clearing them. Make this driver follow the new contract. Cc: Nisar Sayed Cc: Yuiko Oshino Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit e01a3feb8f69ab620b0016498603cad364f65224 Author: Ioana Ciornei Date: Fri Nov 13 18:52:11 2020 +0200 net: phy: microchip: implement generic .handle_interrupt() callback In an attempt to actually support shared IRQs in phylib, we now move the responsibility of triggering the phylib state machine or just returning IRQ_NONE, based on the IRQ status register, to the PHY driver. Having 3 different IRQ handling callbacks (.handle_interrupt(), .did_interrupt() and .ack_interrupt() ) is confusing so let the PHY driver implement directly an IRQ handler like any other device driver. Make this driver follow the new convention. Cc: Nisar Sayed Cc: Yuiko Oshino Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit e96a0d9774640af2af66965038baf3222bb43d36 Author: Ioana Ciornei Date: Fri Nov 13 18:52:10 2020 +0200 net: phy: vitesse: remove the use of .ack_interrupt() In preparation of removing the .ack_interrupt() callback, we must replace its occurrences (aka phy_clear_interrupt), from the 2 places where it is called from (phy_enable_interrupts and phy_disable_interrupts), with equivalent functionality. This means that clearing interrupts now becomes something that the PHY driver is responsible of doing, before enabling interrupts and after clearing them. Make this driver follow the new contract. Cc: Kavya Sree Kotagiri Cc: Linus Walleij Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit b606ad8fa28315436fdb87100f9832d1ba0731c4 Author: Ioana Ciornei Date: Fri Nov 13 18:52:09 2020 +0200 net: phy: vitesse: implement generic .handle_interrupt() callback In an attempt to actually support shared IRQs in phylib, we now move the responsibility of triggering the phylib state machine or just returning IRQ_NONE, based on the IRQ status register, to the PHY driver. Having 3 different IRQ handling callbacks (.handle_interrupt(), .did_interrupt() and .ack_interrupt() ) is confusing so let the PHY driver implement directly an IRQ handler like any other device driver. Make this driver follow the new convention. Cc: Kavya Sree Kotagiri Cc: Linus Walleij Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit 42882a8a22a86513c8c8c6bc7e0822bb14791999 Author: Fabio Estevam Date: Mon Nov 16 15:03:26 2020 -0300 rtc: mxc: Convert the driver to DT-only Since 5.10-rc1 i.MX is a devicetree-only platform, so simplify the code by removing the unused non-DT support. Signed-off-by: Fabio Estevam Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201116180326.5199-1-festevam@gmail.com commit afa819c2c6bf0d6b99d3e41217a2c7d3b3b53228 Author: Claudius Heine Date: Tue Nov 17 13:18:17 2020 +0100 rtc: rx6110: add i2c support The RX6110 also supports I2C, so this patch adds support for it to the driver. This also renames the SPI specific functions and variables to include `_spi_` in their names. Signed-off-by: Claudius Heine Signed-off-by: Henning Schild Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201117121817.953924-3-ch@denx.de commit 7e6066ca1f1fa5c79915dfb4720ca20c5e62edcc Author: Claudius Heine Date: Tue Nov 17 13:18:16 2020 +0100 rtc: Kconfig: Fix typo in help message of rx 6110 The help message in the Kconfig for the RX-6110 erronously stated RX-6610. Signed-off-by: Claudius Heine Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201117121817.953924-2-ch@denx.de commit e226878e1333e2177b1d6fcb41ad45d93ac97cc7 Author: Lee Jones Date: Mon Nov 16 17:41:05 2020 +0000 drm/v3d/v3d_gem: Provide descriptions for 'v3d_lookup_bos's params Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/v3d/v3d_gem.c:292: warning: Function parameter or member 'bo_handles' not described in 'v3d_lookup_bos' drivers/gpu/drm/v3d/v3d_gem.c:292: warning: Function parameter or member 'bo_count' not described in 'v3d_lookup_bos' Cc: Eric Anholt Cc: David Airlie Cc: Daniel Vetter Cc: Philipp Zabel Cc: Sumit Semwal Cc: "Christian König" Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201116174112.1833368-36-lee.jones@linaro.org commit 698fffc2705cc48804cc31021cdb2ae4290927be Author: Andy Shevchenko Date: Mon Nov 16 16:28:59 2020 +0200 rtc: ds1307: Drop of_match_ptr and CONFIG_OF protections These prevent use of this driver with ACPI via PRP0001. Drop them to remove this restriction. Also added mod_devicetable.h include given use of struct of_device_id. Signed-off-by: Andy Shevchenko Reviewed-by: Rafael J. Wysocki Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201116142859.31257-3-andriy.shevchenko@linux.intel.com commit 227ec129ad7b035ee2ae2e57e9567a8126ad93f3 Author: Andy Shevchenko Date: Mon Nov 16 16:28:58 2020 +0200 rtc: ds1307: 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 Reviewed-by: Rafael J. Wysocki Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201116142859.31257-2-andriy.shevchenko@linux.intel.com commit a31111189bb1160f84cf4cf9f910aa2ba7553d18 Author: Andy Shevchenko Date: Mon Nov 16 16:28:57 2020 +0200 rtc: ds1307: Remove non-valid ACPI IDs The commit 9c19b8930d2c ("rtc: ds1307: Add ACPI support") added invalid ACPI IDs (all of them are abusing ACPI specification). Moreover there is not even a single evidence that vendor registered any of such devices. Remove broken ACPI IDs from the driver. For prototyping one may use PRP0001 with device properties adhering to a DT binding. The following patches will add support of that to the driver. Signed-off-by: Andy Shevchenko Signed-off-by: Alexandre Belloni Reviewed-by: Rafael J. Wysocki Cc: Tin Huynh Link: https://uefi.org/PNP_ACPI_Registry Link: https://lore.kernel.org/r/20201116142859.31257-1-andriy.shevchenko@linux.intel.com commit 8b6864e3e13806ab715c4af03ed34fba0dbfecb5 Author: Lee Jones Date: Mon Nov 16 17:41:04 2020 +0000 drm/v3d/v3d_drv: Remove unused static variable 'v3d_v3d_pm_ops' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/v3d/v3d_drv.c:73:32: warning: ‘v3d_v3d_pm_ops’ defined but not used [-Wunused-const-variable=] Cc: Eric Anholt Cc: David Airlie Cc: Daniel Vetter Cc: Philipp Zabel Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201116174112.1833368-35-lee.jones@linaro.org commit 172292be01dbd6c26aba23f62e8ec090f31cdb71 Author: Christoph Hellwig Date: Fri Nov 6 19:19:41 2020 +0100 dma-mapping: remove dma_virt_ops Now that the RDMA core deals with devices that only do DMA mapping in lower layers properly, there is no user for dma_virt_ops and it can be removed. Link: https://lore.kernel.org/r/20201106181941.1878556-11-hch@lst.de Signed-off-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe commit 73063ec58c848e0eb9f888847df011a85b34e5a2 Author: Christoph Hellwig Date: Fri Nov 6 19:19:40 2020 +0100 PCI/P2PDMA: Cleanup __pci_p2pdma_map_sg a bit Remove the pointless paddr variable that was only used once. Link: https://lore.kernel.org/r/20201106181941.1878556-10-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Logan Gunthorpe Acked-by: Bjorn Helgaas Signed-off-by: Jason Gunthorpe commit 4d34d52c25a042e8fdfcaed9715774759394e32e Author: Christoph Hellwig Date: Fri Nov 6 19:19:39 2020 +0100 PCI/P2PDMA: Remove the DMA_VIRT_OPS hacks Now that all users of dma_virt_ops are gone we can remove the workaround for it in the PCI peer to peer code. Link: https://lore.kernel.org/r/20201106181941.1878556-9-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Logan Gunthorpe Acked-by: Bjorn Helgaas Signed-off-by: Jason Gunthorpe commit 5a7a9e038b032137ae9c45d5429f18a2ffdf7d42 Author: Christoph Hellwig Date: Fri Nov 6 19:19:38 2020 +0100 RDMA/core: remove use of dma_virt_ops Use the ib_dma_* helpers to skip the DMA translation instead. This removes the last user if dma_virt_ops and keeps the weird layering violation inside the RDMA core instead of burderning the DMA mapping subsystems with it. This also means the software RDMA drivers now don't have to mess with DMA parameters that are not relevant to them at all, and that in the future we can use PCI P2P transfers even for software RDMA, as there is no first fake layer of DMA mapping that the P2P DMA support. Link: https://lore.kernel.org/r/20201106181941.1878556-8-hch@lst.de Signed-off-by: Christoph Hellwig Tested-by: Mike Marciniszyn Signed-off-by: Jason Gunthorpe commit 42f2611cc1738b201701e717246e11e86bef4e1e Author: Christoph Hellwig Date: Fri Nov 6 19:19:36 2020 +0100 rds: stop using dmapool RDMA ULPs should only perform DMA through the ib_dma_* API instead of using the hidden dma_device directly. In addition using the dma coherent API family that dmapool is a part of can be very ineffcient on plaforms that are not DMA coherent. Switch to use slab allocations and the ib_dma_* APIs instead. Link: https://lore.kernel.org/r/20201106181941.1878556-6-hch@lst.de Signed-off-by: Christoph Hellwig Acked-by: Santosh Shilimkar Signed-off-by: Jason Gunthorpe commit bf3b7b7ba9e3db55d164ec7bf05e6947f79637cd Merge: 8a7904a672a1d dabbd6abcdbeb Author: Jason Gunthorpe Date: Tue Nov 17 15:20:26 2020 -0400 Merge branch 'for-rc' into rdma.git From https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git The rc RDMA branch is needed due to dependencies on the next patches. Signed-off-by: Jason Gunthorpe commit 78616b88854b2c53871ab1ffa22a400b8983c6f5 Author: Lee Jones Date: Mon Nov 16 17:41:02 2020 +0000 drm/ttm/ttm_tt: Demote kernel-doc header format abuses Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/ttm/ttm_tt.c:45: warning: Function parameter or member 'bo' not described in 'ttm_tt_create' drivers/gpu/drm/ttm/ttm_tt.c:45: warning: Function parameter or member 'zero_alloc' not described in 'ttm_tt_create' drivers/gpu/drm/ttm/ttm_tt.c:83: warning: Function parameter or member 'ttm' not described in 'ttm_tt_alloc_page_directory' Cc: Christian Koenig Cc: Huang Rui Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201116174112.1833368-33-lee.jones@linaro.org commit 0aa1e107b28abdc2b02225c58e66fd020a73fe1c Author: Lee Jones Date: Mon Nov 16 17:41:03 2020 +0000 drm/ttm/ttm_range_manager: Demote non-conformant kernel-doc header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/ttm/ttm_range_manager.c:46: warning: cannot understand function prototype: 'struct ttm_range_manager ' Reviewed-by: Christian König Cc: Christian Koenig Cc: Huang Rui Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201116174112.1833368-34-lee.jones@linaro.org commit 108cfddf00d1cb8879fdb3d0894846c93c99f87f Author: Lee Jones Date: Mon Nov 16 17:41:01 2020 +0000 drm/ttm/ttm_bo: Fix one function header - demote lots of kernel-doc abuses Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/ttm/ttm_bo.c:51: warning: Function parameter or member 'ttm_global_mutex' not described in 'DEFINE_MUTEX' drivers/gpu/drm/ttm/ttm_bo.c:286: warning: Function parameter or member 'bo' not described in 'ttm_bo_cleanup_memtype_use' drivers/gpu/drm/ttm/ttm_bo.c:359: warning: Function parameter or member 'bo' not described in 'ttm_bo_cleanup_refs' drivers/gpu/drm/ttm/ttm_bo.c:359: warning: Function parameter or member 'interruptible' not described in 'ttm_bo_cleanup_refs' drivers/gpu/drm/ttm/ttm_bo.c:359: warning: Function parameter or member 'no_wait_gpu' not described in 'ttm_bo_cleanup_refs' drivers/gpu/drm/ttm/ttm_bo.c:359: warning: Function parameter or member 'unlock_resv' not described in 'ttm_bo_cleanup_refs' drivers/gpu/drm/ttm/ttm_bo.c:424: warning: Function parameter or member 'bdev' not described in 'ttm_bo_delayed_delete' drivers/gpu/drm/ttm/ttm_bo.c:424: warning: Function parameter or member 'remove_all' not described in 'ttm_bo_delayed_delete' drivers/gpu/drm/ttm/ttm_bo.c:635: warning: Function parameter or member 'bo' not described in 'ttm_bo_evict_swapout_allowable' drivers/gpu/drm/ttm/ttm_bo.c:635: warning: Function parameter or member 'ctx' not described in 'ttm_bo_evict_swapout_allowable' drivers/gpu/drm/ttm/ttm_bo.c:635: warning: Function parameter or member 'locked' not described in 'ttm_bo_evict_swapout_allowable' drivers/gpu/drm/ttm/ttm_bo.c:635: warning: Function parameter or member 'busy' not described in 'ttm_bo_evict_swapout_allowable' drivers/gpu/drm/ttm/ttm_bo.c:769: warning: Function parameter or member 'bo' not described in 'ttm_bo_add_move_fence' drivers/gpu/drm/ttm/ttm_bo.c:769: warning: Function parameter or member 'man' not described in 'ttm_bo_add_move_fence' drivers/gpu/drm/ttm/ttm_bo.c:769: warning: Function parameter or member 'mem' not described in 'ttm_bo_add_move_fence' drivers/gpu/drm/ttm/ttm_bo.c:769: warning: Function parameter or member 'no_wait_gpu' not described in 'ttm_bo_add_move_fence' drivers/gpu/drm/ttm/ttm_bo.c:806: warning: Function parameter or member 'bo' not described in 'ttm_bo_mem_force_space' drivers/gpu/drm/ttm/ttm_bo.c:806: warning: Function parameter or member 'place' not described in 'ttm_bo_mem_force_space' drivers/gpu/drm/ttm/ttm_bo.c:806: warning: Function parameter or member 'mem' not described in 'ttm_bo_mem_force_space' drivers/gpu/drm/ttm/ttm_bo.c:806: warning: Function parameter or member 'ctx' not described in 'ttm_bo_mem_force_space' drivers/gpu/drm/ttm/ttm_bo.c:872: warning: Function parameter or member 'bo' not described in 'ttm_bo_mem_space' drivers/gpu/drm/ttm/ttm_bo.c:872: warning: Function parameter or member 'placement' not described in 'ttm_bo_mem_space' drivers/gpu/drm/ttm/ttm_bo.c:872: warning: Function parameter or member 'mem' not described in 'ttm_bo_mem_space' drivers/gpu/drm/ttm/ttm_bo.c:872: warning: Function parameter or member 'ctx' not described in 'ttm_bo_mem_space' drivers/gpu/drm/ttm/ttm_bo.c:1387: warning: Function parameter or member 'ctx' not described in 'ttm_bo_swapout' Reviewed-by: Christian König Cc: Christian Koenig Cc: Huang Rui Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201116174112.1833368-32-lee.jones@linaro.org commit 09234b88ef5598252d1cee37e4d7b26a48b6557f Author: Lee Jones Date: Mon Nov 16 17:41:00 2020 +0000 drm/selftests/test-drm_dp_mst_helper: Move 'sideband_msg_req_encode_decode' onto the heap There is too much data being stored on the stack. Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c: In function ‘sideband_msg_req_encode_decode’: drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c:168:1: warning: the frame size of 1072 bytes is larger than 1024 bytes [-Wframe-larger-than=] Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201116174112.1833368-31-lee.jones@linaro.org commit ffefe45a2d9ca4eef4b5fe88bd7a8072cdc94e05 Author: Lee Jones Date: Mon Nov 16 17:40:59 2020 +0000 drm/selftests/test-drm_dp_mst_helper: Place 'struct drm_dp_sideband_msg_req_body' onto the heap The stack is too full. Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c: In function ‘sideband_msg_req_encode_decode’: drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c:161:1: warning: the frame size of 1176 bytes is larger than 1024 bytes [-Wframe-larger-than=] Cc: David Airlie Cc: Daniel Vetter Cc: Lyude Paul Cc: David Francis Cc: dri-devel@lists.freedesktop.org Reviewed-by: Lyude Paul Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201116174112.1833368-30-lee.jones@linaro.org commit 178631700f9dc40df754acbe766b55753ddcbfec Author: Colin Ian King Date: Tue Nov 17 13:11:37 2020 +0000 drm/amd/pm: fix spelling mistakes in dev_warn messages There are two spelling mistakes in dev_warn messages. Fix these. Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit 0d4d95125d9e7c03a78b8fc62e4d70e5d7eae6c9 Author: Hawking Zhang Date: Mon Nov 16 22:45:42 2020 +0800 drm/amdgpu: make gfxhub_v1_0 callback functions to be static Those functions should be invoked through gfxhub.funcs pointer. Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 3939c49c79613d873b479a4634e3d10bd81006cd Author: Tao Zhou Date: Mon Nov 16 17:48:21 2020 +0800 drm/amd/pm: retire dimgrey_cavefish hardcode for the use of soft PPTable The PPTable provided by VBIOS can be used. Signed-off-by: Tao Zhou Reviewed-by: Jiansong Chen Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit dfa6082bb979611ea6e72b32878313f949590d17 Author: Lee Jones Date: Mon Nov 16 17:40:58 2020 +0000 drm/selftests/test-drm_framebuffer: Remove set but unused variable 'fb' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/selftests/test-drm_framebuffer.c: In function ‘execute_drm_mode_fb_cmd2’: drivers/gpu/drm/selftests/test-drm_framebuffer.c:333:26: warning: variable ‘fb’ set but not used [-Wunused-but-set-variable] Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201116174112.1833368-29-lee.jones@linaro.org commit 7df5428975e97818b30d2b800c9e8b0734ea8da9 Author: Lee Jones Date: Mon Nov 16 17:40:57 2020 +0000 drm/selftests/test-drm_mm: Mark 'hole_end' as always_unused In the macro drm_mm_for_each_hole() 'hole_end' is provided as a container for 'hole_start + pos->hole_size', but is not utilised in this use-case. We cannot simply delete the variable, so here we tell the compiler that we're intentionally discarding the read value. Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/selftests/test-drm_mm.c: In function ‘assert_no_holes’: drivers/gpu/drm/selftests/test-drm_mm.c:57:18: warning: variable ‘hole_end’ set but not used [-Wunused-but-set-variable] Cc: David Airlie Cc: Daniel Vetter Cc: "Christian König" Cc: Nirmoy Das Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201116174112.1833368-28-lee.jones@linaro.org commit 97f53a08cba128a724ebbbf34778d3553d559816 Author: Randy Dunlap Date: Mon Nov 16 13:21:08 2020 -0800 net: linux/skbuff.h: combine SKB_EXTENSIONS + KCOV handling The previous Kconfig patch led to some other build errors as reported by the 0day bot and my own overnight build testing. These are all in when KCOV is enabled but SKB_EXTENSIONS is not enabled, so fix those by combining those conditions in the header file. Fixes: 6370cc3bbd8a ("net: add kcov handle to skb extensions") Fixes: 85ce50d337d1 ("net: kcov: don't select SKB_EXTENSIONS when there is no NET") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Cc: Aleksandr Nogikh Cc: Willem de Bruijn Acked-by: Florian Westphal Link: https://lore.kernel.org/r/20201116212108.32465-1-rdunlap@infradead.org Signed-off-by: Jakub Kicinski commit f8cd9d9532c68ca00375ebba8dc71d8dca8250ba Author: Lee Jones Date: Mon Nov 16 17:40:56 2020 +0000 drm/rockchip/rockchip_lvds: Fix struct document formatting Must start with "struct " Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/rockchip/rockchip_lvds.c:49: warning: cannot understand function prototype: 'struct rockchip_lvds_soc_data ' Cc: Sandy Huang Cc: "Heiko Stübner" Cc: David Airlie Cc: Daniel Vetter Cc: Mark Yao Cc: dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201116174112.1833368-27-lee.jones@linaro.org commit fed79215df7f39d7e327958f325c0d4a8a3d3828 Author: Lee Jones Date: Mon Nov 16 17:40:55 2020 +0000 drm/rockchip/rockchip_rgb: Consume our own header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/rockchip/rockchip_rgb.c:71:22: warning: no previous prototype for ‘rockchip_rgb_init’ [-Wmissing-prototypes] drivers/gpu/drm/rockchip/rockchip_rgb.c:159:6: warning: no previous prototype for ‘rockchip_rgb_fini’ [-Wmissing-prototypes] Cc: Sandy Huang Cc: "Heiko Stübner" Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201116174112.1833368-26-lee.jones@linaro.org commit 6fbd412e648dbe392b6c100f093e73b563b155c0 Author: Lee Jones Date: Mon Nov 16 17:40:54 2020 +0000 drm/rockchip/dw-mipi-dsi-rockchip: Demote non-conformant kernel-doc headers Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c:357: warning: Function parameter or member 'dsi' not described in 'ns2bc' drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c:357: warning: Function parameter or member 'ns' not described in 'ns2bc' drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c:365: warning: Function parameter or member 'dsi' not described in 'ns2ui' drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c:365: warning: Function parameter or member 'ns' not described in 'ns2ui' Cc: Sandy Huang Cc: "Heiko Stübner" Cc: David Airlie Cc: Daniel Vetter Cc: Chris Zhong Cc: Nickey Yang Cc: dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201116174112.1833368-25-lee.jones@linaro.org commit 52769ba1301ffe1accc4ab6cc23e66091dbc54c6 Author: Lee Jones Date: Mon Nov 16 17:40:53 2020 +0000 drm/pl111/pl111_debugfs: Make local function 'pl111_debugfs_regs()' static Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/pl111/pl111_debugfs.c:33:5: warning: no previous prototype for ‘pl111_debugfs_regs’ [-Wmissing-prototypes] Cc: Eric Anholt Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201116174112.1833368-24-lee.jones@linaro.org commit 295cc38d2e562e355dadab9e4cecde60e77d0bee Author: Lee Jones Date: Mon Nov 16 17:40:52 2020 +0000 drm/pl111/pl111_display: Make local function static Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/pl111/pl111_display.c:356:6: warning: no previous prototype for ‘pl111_display_disable’ [-Wmissing-prototypes] Cc: Eric Anholt Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201116174112.1833368-23-lee.jones@linaro.org commit c6fd00a490760594e6ccb027bb8d08ed85059f59 Author: Lee Jones Date: Mon Nov 16 17:40:51 2020 +0000 drm/nouveau/nvkm/core/firmware: Fix formatting, provide missing param description ... and demote non-conformant kernel-doc header. Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/nouveau/nvkm/core/firmware.c:71: warning: Function parameter or member 'subdev' not described in 'nvkm_firmware_get' drivers/gpu/drm/nouveau/nvkm/core/firmware.c:71: warning: Function parameter or member 'fwname' not described in 'nvkm_firmware_get' drivers/gpu/drm/nouveau/nvkm/core/firmware.c:71: warning: Function parameter or member 'ver' not described in 'nvkm_firmware_get' drivers/gpu/drm/nouveau/nvkm/core/firmware.c:71: warning: Function parameter or member 'fw' not described in 'nvkm_firmware_get' drivers/gpu/drm/nouveau/nvkm/core/firmware.c:106: warning: Function parameter or member 'fw' not described in 'nvkm_firmware_put' Cc: Ben Skeggs Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Cc: nouveau@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201116174112.1833368-22-lee.jones@linaro.org commit 6e3dbfcb3c8a1ef8cc73a8637f778673f5c6e91c Author: Fabio Estevam Date: Mon Nov 16 17:26:06 2020 -0300 spi: imx: Remove unused .id_table support Since 5.10-rc1 i.MX is a devicetree-only platform and the existing .id_table support in this driver was only useful for old non-devicetree platforms. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20201116202606.29888-1-festevam@gmail.com Signed-off-by: Mark Brown commit 7c3e2b771d79327e434ac7d873f9949a7c5d7b3b Author: Sven Van Asbroeck Date: Mon Nov 16 12:01:55 2020 -0500 lan743x: replace devicetree phy parse code with library function The code in this driver which parses the devicetree to determine the phy/fixed link setup, can be replaced by a single library function: of_phy_get_and_connect(). Behaviour is identical, except that the library function will complain when 'phy-connection-type' is omitted, instead of blindly using PHY_INTERFACE_MODE_NA, which would result in an invalid phy configuration. The library function no longer brings out the exact phy_mode, but the driver doesn't need this, because phy_interface_is_rgmii() queries the phydev directly. Remove 'phy_mode' from the private adapter struct. While we're here, log info about the attached phy on connect, this is useful because the phy type and connection method is now fully configurable via the devicetree. Tested on a lan7430 chip with built-in phy. Verified that adding fixed-link/phy-connection-type in the devicetree results in a fixed-link setup. Used ethtool to verify that the devicetree settings are used. Tested-by: Sven Van Asbroeck # lan7430 Signed-off-by: Sven Van Asbroeck Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20201116170155.26967-1-TheSven73@gmail.com Signed-off-by: Jakub Kicinski commit bfca1c924d97696303491ddae0458861653d3b88 Author: Alexandre Belloni Date: Tue Nov 17 14:39:20 2020 +0100 rtc: at91rm9200: Add sam9x60 compatible Handle the sam9x60 RTC. While it can work with the at91sam9x5 fallback, it has crystal correction support and doesn't need to shadow IMR. Signed-off-by: Alexandre Belloni Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20201117133920.1229679-1-alexandre.belloni@bootlin.com commit f6a46f8b302d9bfcf347577cbf1dd22f19dfe555 Author: Alexandre Belloni Date: Mon Nov 9 00:20:00 2020 +0100 rtc: at91rm9200: add correction support The sama5d4 and sama5d2 RTCs are able to correct for imprecise crystals, up to 1953 ppm. Signed-off-by: Alexandre Belloni Reviewed-by: Nicolas Ferre Link: https://lore.kernel.org/r/20201108232001.1580128-1-alexandre.belloni@bootlin.com commit a98cabdb8cb8941965721ee8d4edfaa3c7d427d4 Author: Heiner Kallweit Date: Sun Nov 15 16:03:10 2020 +0100 net: phy: don't duplicate driver name in phy_attached_print Currently we print the driver name twice in phy_attached_print(): - phy_dev_info() prints it as part of the device info - and we print it as part of the info string This is a little bit ugly, it makes the info harder to read, especially if the driver name is a little bit longer. Therefore omit the driver name (if set) in the info string. Example from r8169 that uses phylib: old: Generic FE-GE Realtek PHY r8169-300:00: attached PHY driver \ [Generic FE-GE Realtek PHY] (mii_bus:phy_addr=r8169-300:00, irq=IGNORE) new: Generic FE-GE Realtek PHY r8169-300:00: attached PHY driver \ (mii_bus:phy_addr=r8169-300:00, irq=IGNORE) Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/8ab72586-f079-41d8-84ee-9f6a5bd97b2a@gmail.com Signed-off-by: Jakub Kicinski commit 9f84f39f5515fd412398a1019e3f50ac3ab51a80 Author: Sudarshan Rajagopalan Date: Wed Oct 14 17:51:23 2020 -0700 arm64/mm: add fallback option to allocate virtually contiguous memory When section mappings are enabled, we allocate vmemmap pages from physically continuous memory of size PMD_SIZE using vmemmap_alloc_block_buf(). Section mappings are good to reduce TLB pressure. But when system is highly fragmented and memory blocks are being hot-added at runtime, its possible that such physically continuous memory allocations can fail. Rather than failing the memory hot-add procedure, add a fallback option to allocate vmemmap pages from discontinuous pages using vmemmap_populate_basepages(). Signed-off-by: Sudarshan Rajagopalan Reviewed-by: Gavin Shan Reviewed-by: Anshuman Khandual Acked-by: Will Deacon Cc: Will Deacon Cc: Anshuman Khandual Cc: Mark Rutland Cc: Logan Gunthorpe Cc: David Hildenbrand Cc: Andrew Morton Cc: Steven Price Link: https://lore.kernel.org/r/d6c06f2ef39bbe6c715b2f6db76eb16155fdcee6.1602722808.git.sudaraja@codeaurora.org Signed-off-by: Catalin Marinas commit 09a217c10504bcaef911cf2af74e424338efe629 Author: Hui Su Date: Fri Nov 13 21:39:43 2020 +0800 x86/dumpstack: Make show_trace_log_lvl() static show_trace_log_lvl() is not used by other compilation units so make it static and remove the declaration from the header file. Signed-off-by: Hui Su Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201113133943.GA136221@rlk commit 8b27507efcb876ab366627ddd012d0df7257d644 Author: Lee Jones Date: Mon Nov 16 17:40:44 2020 +0000 drm/meson/meson_vclk: Make two local functions static Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/meson/meson_vclk.c:134:6: warning: no previous prototype for ‘meson_vid_pll_set’ [-Wmissing-prototypes] drivers/gpu/drm/meson/meson_vclk.c:490:6: warning: no previous prototype for ‘meson_hdmi_pll_set_params’ [-Wmissing-prototypes] Cc: Neil Armstrong Cc: David Airlie Cc: Daniel Vetter Cc: Kevin Hilman Cc: Jerome Brunet Cc: Martin Blumenstingl Cc: dri-devel@lists.freedesktop.org Cc: linux-amlogic@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Lee Jones Reviewed-by: Neil Armstrong Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201116174112.1833368-15-lee.jones@linaro.org commit 2bc5f1c93b97ac7998b6239a73729cfb1f79bebf Author: Lee Jones Date: Mon Nov 16 17:40:43 2020 +0000 drm/meson/meson_venc: Make local function 'meson_venc_hdmi_get_dmt_vmode' static Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/meson/meson_venc.c:893:6: warning: no previous prototype for ‘meson_venc_hdmi_get_dmt_vmode’ [-Wmissing-prototypes] Cc: Neil Armstrong Cc: David Airlie Cc: Daniel Vetter Cc: Kevin Hilman Cc: Jerome Brunet Cc: Martin Blumenstingl Cc: dri-devel@lists.freedesktop.org Cc: linux-amlogic@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Lee Jones Reviewed-by: Neil Armstrong Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201116174112.1833368-14-lee.jones@linaro.org commit 36b36f9195edde0bd4041244c8100bc7eaace0f2 Author: Lee Jones Date: Mon Nov 16 17:40:42 2020 +0000 drm/mediatek/mtk_drm_drv: Staticise local function invoked by reference Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/mediatek/mtk_drm_drv.c:316:24: warning: no previous prototype for ‘mtk_drm_gem_prime_import’ [-Wmissing-prototypes] Cc: Chun-Kuang Hu Cc: Philipp Zabel Cc: David Airlie Cc: Daniel Vetter Cc: Matthias Brugger Cc: Sumit Semwal Cc: "Christian König" Cc: YT SHEN Cc: dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201116174112.1833368-13-lee.jones@linaro.org commit eaa4d56275295a89cfb33c796b3c4cb0f175b895 Author: Lee Jones Date: Mon Nov 16 17:40:41 2020 +0000 drm/mediatek/mtk_drm_crtc: Demote seriously out-of-date struct header This needs someone with in-depth knowledge of the driver to complete. Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/mediatek/mtk_drm_crtc.c:62: warning: Function parameter or member 'pending_needs_vblank' not described in 'mtk_drm_crtc' drivers/gpu/drm/mediatek/mtk_drm_crtc.c:62: warning: Function parameter or member 'event' not described in 'mtk_drm_crtc' drivers/gpu/drm/mediatek/mtk_drm_crtc.c:62: warning: Function parameter or member 'layer_nr' not described in 'mtk_drm_crtc' drivers/gpu/drm/mediatek/mtk_drm_crtc.c:62: warning: Function parameter or member 'pending_async_planes' not described in 'mtk_drm_crtc' drivers/gpu/drm/mediatek/mtk_drm_crtc.c:62: warning: Function parameter or member 'cmdq_client' not described in 'mtk_drm_crtc' drivers/gpu/drm/mediatek/mtk_drm_crtc.c:62: warning: Function parameter or member 'cmdq_event' not described in 'mtk_drm_crtc' drivers/gpu/drm/mediatek/mtk_drm_crtc.c:62: warning: Function parameter or member 'hw_lock' not described in 'mtk_drm_crtc' Cc: Chun-Kuang Hu Cc: Philipp Zabel Cc: David Airlie Cc: Daniel Vetter Cc: Matthias Brugger Cc: dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201116174112.1833368-12-lee.jones@linaro.org commit 314fbef828f2cf8673225e9caf512711e3aea3bb Author: Lee Jones Date: Mon Nov 16 17:40:40 2020 +0000 drm/mediatek/mtk_disp_rdma: Fix formatting and supply missing struct member description Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/mediatek/mtk_disp_rdma.c:66: warning: Function parameter or member 'ddp_comp' not described in 'mtk_disp_rdma' drivers/gpu/drm/mediatek/mtk_disp_rdma.c:66: warning: Function parameter or member 'crtc' not described in 'mtk_disp_rdma' drivers/gpu/drm/mediatek/mtk_disp_rdma.c:66: warning: Function parameter or member 'data' not described in 'mtk_disp_rdma' Cc: Chun-Kuang Hu Cc: Philipp Zabel Cc: David Airlie Cc: Daniel Vetter Cc: Matthias Brugger Cc: dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201116174112.1833368-11-lee.jones@linaro.org commit e772a89ddf2e336e9212b6344143a970553ee260 Author: Lee Jones Date: Mon Nov 16 17:40:39 2020 +0000 drm/mediatek/mtk_disp_ovl: Fix formatting and provide missing member description Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/mediatek/mtk_disp_ovl.c:75: warning: Function parameter or member 'ddp_comp' not described in 'mtk_disp_ovl' drivers/gpu/drm/mediatek/mtk_disp_ovl.c:75: warning: Function parameter or member 'crtc' not described in 'mtk_disp_ovl' drivers/gpu/drm/mediatek/mtk_disp_ovl.c:75: warning: Function parameter or member 'data' not described in 'mtk_disp_ovl' Cc: Chun-Kuang Hu Cc: Philipp Zabel Cc: David Airlie Cc: Daniel Vetter Cc: Matthias Brugger Cc: dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201116174112.1833368-10-lee.jones@linaro.org commit b1d8e93eb4da5eb84f457702a037cf8f47281e90 Author: Lee Jones Date: Mon Nov 16 17:40:38 2020 +0000 drm/mediatek/mtk_disp_color: Fix formatting and provide missing member description Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/mediatek/mtk_disp_color.c:40: warning: Function parameter or member 'ddp_comp' not described in 'mtk_disp_color' drivers/gpu/drm/mediatek/mtk_disp_color.c:40: warning: Function parameter or member 'crtc' not described in 'mtk_disp_color' drivers/gpu/drm/mediatek/mtk_disp_color.c:40: warning: Function parameter or member 'data' not described in 'mtk_disp_color' Cc: Chun-Kuang Hu Cc: Philipp Zabel Cc: David Airlie Cc: Daniel Vetter Cc: Matthias Brugger Cc: dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201116174112.1833368-9-lee.jones@linaro.org commit 511881a8301fc87fa479dd67d8e56c2ba3fc8c70 Author: Lee Jones Date: Mon Nov 16 17:40:37 2020 +0000 drm/mediatek/mtk_dpi: Remove unused struct definition 'mtk_dpi_encoder_funcs' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/mediatek/mtk_dpi.c:530:39: warning: ‘mtk_dpi_encoder_funcs’ defined but not used [-Wunused-const-variable=] Cc: Chun-Kuang Hu Cc: Philipp Zabel Cc: David Airlie Cc: Daniel Vetter Cc: Matthias Brugger Cc: Jie Qiu Cc: dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201116174112.1833368-8-lee.jones@linaro.org commit dd59eed1e00b684cd332da571474ae18376395bf Author: Lee Jones Date: Mon Nov 16 17:40:36 2020 +0000 drm/exynos/exynos_drm_gsc: Supply missing description for 'num_limits' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/exynos/exynos_drm_gsc.c:129: warning: Function parameter or member 'num_limits' not described in 'gsc_driverdata' Cc: Inki Dae Cc: Joonyoung Shim Cc: Seung-Woo Kim Cc: Kyungmin Park Cc: David Airlie Cc: Daniel Vetter Cc: Krzysztof Kozlowski Cc: Eunchul Kim Cc: Jinyoung Jeon Cc: Sangmin Lee Cc: dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201116174112.1833368-7-lee.jones@linaro.org commit cc40c4752593c04ccd3f6ef6270c509823af42e0 Author: Lee Jones Date: Mon Nov 16 17:40:35 2020 +0000 drm/exynos/exynos_drm_fimd: Add missing description for param 'ctx' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/exynos/exynos_drm_fimd.c:733: warning: Function parameter or member 'ctx' not described in 'fimd_shadow_protect_win' Cc: Inki Dae Cc: Joonyoung Shim Cc: Seung-Woo Kim Cc: Kyungmin Park Cc: David Airlie Cc: Daniel Vetter Cc: Krzysztof Kozlowski Cc: dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201116174112.1833368-6-lee.jones@linaro.org commit 400fb19dd63d7d2e3ab7243631704cf731f4b5ca Author: Lee Jones Date: Mon Nov 16 17:40:34 2020 +0000 drm/exynos/exynos7_drm_decon: Supply missing description for param 'ctx' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/exynos/exynos7_drm_decon.c:354: warning: Function parameter or member 'ctx' not described in 'decon_shadow_protect_win' Cc: Inki Dae Cc: Joonyoung Shim Cc: Seung-Woo Kim Cc: Kyungmin Park Cc: David Airlie Cc: Daniel Vetter Cc: Krzysztof Kozlowski Cc: Akshu Agarwal Cc: Ajay Kumar Cc: dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201116174112.1833368-5-lee.jones@linaro.org commit 0e120f1b04b5cb7cab05ed30d1f60c6e5ae76e26 Author: Lee Jones Date: Mon Nov 16 17:40:33 2020 +0000 drm/drm_dp_mst_topology: Remove set but never used variable 'len' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/drm_dp_mst_topology.c: In function ‘drm_dp_send_query_stream_enc_status’: drivers/gpu/drm/drm_dp_mst_topology.c:3263:6: warning: variable ‘len’ set but not used [-Wunused-but-set-variable] Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201116174112.1833368-4-lee.jones@linaro.org commit f8ef48ffa9d3bfd067416785efacf60d2a25a568 Author: Lee Jones Date: Mon Nov 16 17:40:32 2020 +0000 drm/armada/armada_overlay: Staticify local function 'armada_overlay_duplicate_state' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/armada/armada_overlay.c:329:1: warning: no previous prototype for ‘armada_overlay_duplicate_state’ [-Wmissing-prototypes] Cc: Russell King Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201116174112.1833368-3-lee.jones@linaro.org commit 83c317d7b36bb3858cf1cb86d2635ec3f3bd6ea3 Author: Heiner Kallweit Date: Mon Nov 16 17:03:14 2020 +0100 r8169: remove nr_frags argument from rtl_tx_slots_avail The only time when nr_frags isn't SKB_MAX_FRAGS is when entering rtl8169_start_xmit(). However we can use SKB_MAX_FRAGS also here because when queue isn't stopped there should always be room for MAX_SKB_FRAGS + 1 descriptors. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/3d1f2ad7-31d5-2cac-4f4a-394f8a3cab63@gmail.com Signed-off-by: Jakub Kicinski commit b618c327024997589051ea3605b38d1f7ce138a7 Author: kernel test robot Date: Mon Nov 16 16:34:44 2020 +0100 net: phy: mscc: fix excluded_middle.cocci warnings Condition !A || A && B is equivalent to !A || B. Generated by: scripts/coccinelle/misc/excluded_middle.cocci Reported-by: kernel test robot Signed-off-by: kernel test robot Signed-off-by: Julia Lawall Reviewed-by: Antoine Tenart Link: https://lore.kernel.org/r/alpine.DEB.2.22.394.2011161633240.2682@hadrien Signed-off-by: Jakub Kicinski commit f85cd064cd5d7786e2196637e20fcacdf8b1188c Merge: 72308ecbf33b1 13f49b6f26227 Author: Jakub Kicinski Date: Tue Nov 17 09:16:13 2020 -0800 Merge branch 'net-dsa-tag_dsa-unify-regular-and-ethertype-dsa-taggers' Tobias Waldekranz says: ==================== net: dsa: tag_dsa: Unify regular and ethertype DSA taggers The first patch ports tag_edsa.c's handling of IGMP/MLD traps to tag_dsa.c. That way, we start from two logically equivalent taggers that are then merged. The second commit does the heavy lifting of actually fusing tag_dsa.c and tag_edsa.c. The final one just follows up with some clean up of existing comments. v2 -> v3: - Add the first patch described above as suggested by Andrew. - Better documentation of TO_SNIFFER and FORWARD tags. - Spelling. v1 -> v2: - Fixed some grammar and whitespace errors. - Removed unnecessary default value in Kconfig. - Removed unnecessary #ifdef. - Split out comment fixes from functional changes. - Fully document enum dsa_code. ==================== Link: https://lore.kernel.org/r/20201114234558.31203-1-tobias@waldekranz.com Signed-off-by: Jakub Kicinski commit 13f49b6f26227e4302200f4dbefa51557830f52f Author: Tobias Waldekranz Date: Sun Nov 15 00:45:58 2020 +0100 net: dsa: tag_dsa: Use a consistent comment style Use a consistent style of one-line/multi-line comments throughout the file. Signed-off-by: Tobias Waldekranz Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit 469ee5fe73d9b45eb4ebcdafa5f41fa654e483b1 Author: Tobias Waldekranz Date: Sun Nov 15 00:45:57 2020 +0100 net: dsa: tag_dsa: Unify regular and ethertype DSA taggers Ethertype DSA encodes exactly the same information in the DSA tag as the non-ethertype variety. So refactor out the common parts and reuse them for both protocols. This is ensures tag parsing and generation is always consistent across all mv88e6xxx chips. While we are at it, explicitly deal with all possible CPU codes on receive, making sure to set offload_fwd_mark as appropriate. Signed-off-by: Tobias Waldekranz Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit e468d141b993ec9e58bdf515ed32fd9eb4fccdd0 Author: Tobias Waldekranz Date: Sun Nov 15 00:45:56 2020 +0100 net: dsa: tag_dsa: Allow forwarding of redirected IGMP traffic When receiving an IGMP/MLD frame with a TO_CPU tag, the switch has not performed any forwarding of it. This means that we should not set the offload_fwd_mark on the skb, in case a software bridge wants it forwarded. This is a port of: 1ed9ec9b08ad ("dsa: Allow forwarding of redirected IGMP traffic") Which corrected the issue for chips using EDSA tags, but not for those using regular DSA tags. Signed-off-by: Tobias Waldekranz Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit ec2a9cea9fca8581b0cd3d994fb99050d61a8130 Author: Hanjun Guo Date: Fri Nov 13 11:00:45 2020 +0800 ACPI: acpi_drivers.h: Update the kernel doc pci_bind.c is not exist anymore, so just remove all the .c file reference as the c file reference is not useful and avoid future non-consistency update. Signed-off-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki commit 146f5f68e3d9263e385c046982ac96ffad12e574 Author: Hanjun Guo Date: Fri Nov 13 11:00:44 2020 +0800 ACPI: acpi_drivers.h: Remove the leftover dead code After commit 5ba8b1c6fe40 ("ACPI: remove dead code"), ACPI_PROCESSOR_LIMIT_* macros are not used anymore, remove it. Signed-off-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki commit 907cc9fefe8349d6cc70d6800cc8edf10acf7634 Author: Hanjun Guo Date: Fri Nov 13 10:26:44 2020 +0800 ACPI: tiny-power-button: Simplify the code using module_acpi_driver() Using module_acpi_driver() to simplify the code. Signed-off-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki commit e882b0953ccc7ad9938251f9c7e00411a4ac48d7 Author: Hanjun Guo Date: Fri Nov 13 10:25:11 2020 +0800 ACPI: SBS: Simplify the code using module_acpi_driver() Using the module_acpi_driver() to simplify the code. Signed-off-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki commit dff714087c40644d225094a1f75d2272cc8a4885 Author: Hanjun Guo Date: Fri Nov 13 10:25:10 2020 +0800 ACPI: SBS: Simplify the driver init code acpi_bus_register_driver() will check acpi_disable and return -ENODEV, so the acpi_disable check outside the acpi_bus_register_driver() is duplicated, can be removed. Also we can just return from acpi_bus_register_driver() then we can simplify the code further. Signed-off-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki commit ab5369bba5189f44538bef07943f323992fe964e Author: Hanjun Guo Date: Fri Nov 13 10:20:29 2020 +0800 ACPI: debug: Remove the not used function The inline function __acpi_aml_opened() is not used anywhere, remove it. Signed-off-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki commit eb37ba316fdec9c6af36b8b155732568c5b2a2d4 Author: Hanjun Guo Date: Fri Nov 13 10:08:44 2020 +0800 ACPI: processor: Remove the duplicated ACPI_PROCESSOR_CLASS macro The ACPI_PROCESSOR_CLASS macro is defined in , and ACPI drivers for processor already included , so we can remove those duplicated ACPI_PROCESSOR_CLASS macros. Signed-off-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki commit 5268e0bf7123c422892fec362f5be2bcae9bbb95 Author: Geert Uytterhoeven Date: Tue Nov 10 18:49:04 2020 +0100 ASoC: Fix 7/8 spaces indentation in Kconfig Some entries used 7 or 8 spaces instead if a single TAB. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201110174904.3413846-1-geert@linux-m68k.org Signed-off-by: Mark Brown commit 9a207228bdf0a4933b794c944d7111564353ea94 Author: Geert Uytterhoeven Date: Tue Nov 10 15:50:01 2020 +0100 ASoC: intel: SND_SOC_INTEL_KEEMBAY should depend on ARCH_KEEMBAY The Intel Keem Bay audio module is only present on Intel Keem Bay SoCs. Hence add a dependency on ARCH_KEEMBAY, to prevent asking the user about this driver when configuring a kernel without Intel Keem Bay platform support. Fixes: c544912bcc2dc806 ("ASoC: Intel: Add makefiles and kconfig changes for KeemBay") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201110145001.3280479-1-geert+renesas@glider.be Signed-off-by: Mark Brown commit 674226db62ec758c4575bcdb933a2410f1a29bbf Author: Geert Uytterhoeven Date: Tue Nov 10 15:51:20 2020 +0100 ASoC: fsl: SND_SOC_FSL_AUD2HTX should depend on ARCH_MXC The Freescale/NXP AUDIO TO HDMI TX module is only present on NXP i.MX 8 Series SoCs. Hence add a dependency on ARCH_MXC, to prevent asking the user about this driver when configuring a kernel without i.MX 8 platform support. Fixes: 8a24c834c053ef1b ("ASoC: fsl_aud2htx: Add aud2htx module driver") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201110145120.3280658-1-geert+renesas@glider.be Signed-off-by: Mark Brown commit e1ade4c55ae3559b082faf9f5207cc6caba1c546 Author: Bogdan Togorean Date: Tue Nov 10 17:22:13 2020 +0200 ASoc: adi: Kconfig: Remove depends on for ADI reference designs Audio ADI reference designs are also used on some ZynqMP boards, and can also be used on Intel FPGA boards and also on some more complex FPGA combinations (FPGA cards connected through PCIe). This change removes the dependency on Microblaze and Zynq architectures to allow the usage of this driver for the systems described above. Signed-off-by: Bogdan Togorean Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201110152213.37811-1-alexandru.ardelean@analog.com Signed-off-by: Mark Brown commit f077770b2675feb2ea2188ef7109d5a41545e7a9 Author: Alexandru Ardelean Date: Tue Nov 10 10:47:54 2020 +0200 ASoC: adau1977: convert text binding to yaml format This change converts the old device-tree binding for ADAU1977 from text format to the new yaml format. Signed-off-by: Alexandru Ardelean Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201110084754.46756-1-alexandru.ardelean@analog.com Signed-off-by: Mark Brown commit f7499785c8915ef4bda3cfa34c814350f07368fd Author: Andy Shevchenko Date: Tue Nov 3 22:45:10 2020 +0200 ACPI: watchdog: Replace open coded variant of resource_union() Since we have resource_union() helper, let's utilize it here. Signed-off-by: Andy Shevchenko Reviewed-by: Hanjun Guo Tested-by: Hanjun Guo Reviewed-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki commit 07aec68ecf35a2cee5173001c70e3d7b345b3d05 Author: Andy Shevchenko Date: Tue Nov 3 22:45:09 2020 +0200 PCI/ACPI: Replace open coded variant of resource_union() Since we have resource_union() helper, let's utilize it here. Signed-off-by: Andy Shevchenko Reviewed-by: Kuppuswamy Sathyanarayanan Reviewed-by: Hanjun Guo Tested-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki commit 5df38ca6afeceaf3ea911ad2f7e2101364dee48d Author: Andy Shevchenko Date: Tue Nov 3 22:45:08 2020 +0200 resource: Add test cases for new resource API Add test cases for newly added resource APIs. Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit f65674df1b23cdcb6f656a14f659ffea83e7acaa Author: Andy Shevchenko Date: Tue Nov 3 22:45:07 2020 +0200 resource: Introduce resource_intersection() for overlapping resources There will be at least one user that can utilize new helper. Provide the helper for future user and for wider use. Signed-off-by: Andy Shevchenko Reviewed-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki commit 5562f35d7feabfd68cd58a1ee28b451f90e82417 Author: Andy Shevchenko Date: Tue Nov 3 22:45:06 2020 +0200 resource: Introduce resource_union() for overlapping resources Some already present users may utilize resource_union() helper. Provide it for them and for wider use in the future. Signed-off-by: Andy Shevchenko Reviewed-by: Hanjun Guo Tested-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki commit 1f90f6a835514cb69bfede0b2752b0cb7a351bbd Author: Andy Shevchenko Date: Tue Nov 3 22:45:05 2020 +0200 resource: Group resource_overlaps() with other inline helpers For better maintenance group resource_overlaps() with other inline helpers. While at it, drop extra parentheses. Signed-off-by: Andy Shevchenko Reviewed-by: Hanjun Guo Tested-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki commit 66f4fa32eb18af9a60bbda589ee239621a49bcc1 Author: Andy Shevchenko Date: Tue Nov 3 22:45:04 2020 +0200 resource: Simplify region_intersects() by reducing conditionals Now we have for 'other' and 'type' variables other type return 0 0 REGION_DISJOINT 0 x REGION_INTERSECTS x 0 REGION_DISJOINT x x REGION_MIXED Obviously it's easier to check 'type' for 0 first instead of currently checked 'other'. Signed-off-by: Andy Shevchenko Reviewed-by: Hanjun Guo Tested-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki commit 7919385b9fb3cefe495310e5c44ca8a6d9c446e8 Author: Ard Biesheuvel Date: Tue Nov 17 13:47:29 2020 +0100 arm64: head: tidy up the Image header definition Even though support for EFI boot remains entirely optional for arm64, it is unlikely that we will ever be able to repurpose the image header fields that the EFI loader relies on, i.e., the magic NOP at offset 0x0 and the PE header address at offset 0x3c. So let's factor out the differences into a 'efi_signature_nop' macro and a local symbol representing the PE header address, and move the conditional definitions into efi-header.S, taking into account whether CONFIG_EFI is enabled or not. While at it, switch to a signature NOP that behaves more like a NOP, i.e., one that only clobbers the flags. Signed-off-by: Ard Biesheuvel Acked-by: Will Deacon Link: https://lore.kernel.org/r/20201117124729.12642-4-ardb@kernel.org Signed-off-by: Catalin Marinas commit b50a3225cdffef43b76b294fa7fb3cd1f32f50d0 Author: Ard Biesheuvel Date: Tue Nov 17 13:47:28 2020 +0100 arm64/head: avoid symbol names pointing into first 64 KB of kernel image We no longer map the first 64 KB of the kernel image, as there is nothing there that we ever need to refer back to once the kernel has booted. Even though facilities like kallsyms are very careful to only refer to the region that starts at _stext when mapping virtual addresses to symbol names, let's avoid any confusion by switching to local .L prefixed symbol names for the EFI header, as none of them have any significance to the rest of the kernel. Signed-off-by: Ard Biesheuvel Acked-by: Will Deacon Link: https://lore.kernel.org/r/20201117124729.12642-3-ardb@kernel.org Signed-off-by: Catalin Marinas commit e2a073dde9218cdef3c5431bddabf4549dd65fea Author: Ard Biesheuvel Date: Tue Nov 17 13:47:27 2020 +0100 arm64: omit [_text, _stext) from permanent kernel mapping In a previous patch, we increased the size of the EFI PE/COFF header to 64 KB, which resulted in the _stext symbol to appear at a fixed offset of 64 KB into the image. Since 64 KB is also the largest page size we support, this completely removes the need to map the first 64 KB of the kernel image, given that it only contains the arm64 Image header and the EFI header, neither of which we ever access again after booting the kernel. More importantly, we should avoid an executable mapping of non-executable and not entirely predictable data, to deal with the unlikely event that we inadvertently emitted something that looks like an opcode that could be used as a gadget for speculative execution. So let's limit the kernel mapping of .text to the [_stext, _etext) region, which matches the view of generic code (such as kallsyms) when it reasons about the boundaries of the kernel's .text section. Signed-off-by: Ard Biesheuvel Acked-by: Will Deacon Link: https://lore.kernel.org/r/20201117124729.12642-2-ardb@kernel.org Signed-off-by: Catalin Marinas commit b896898c73696a7bbe6af36e8d5e8f394a5013f2 Author: Bob Paauwe Date: Tue Nov 10 17:47:00 2020 +0530 drm/i915: Tweaked Wa_14010685332 for PCHs used on gen11 platforms The WA specifies that we need to toggle a SDE chicken bit on and then off as the final step in preparation for s0ix entry. Bspec: 33450 Bspec: 8402 However, something is happening after we toggle the bit that causes the WA to be invalidated. This makes dispcnlunit1_cp_xosc_clkreq active being already in s0ix state i.e SLP_S0 counter incremented. Tweaking the Wa_14010685332 by setting the bit on suspend and clearing it on resume turns down the dispcnlunit1_cp_xosc_clkreq. B.Spec has Documented this tweaked sequence of WA as an alternative. Let keep this tweaked WA for Gen11 platforms and keep untweaked WA for other platforms which never observed this issue. v2 (MattR): - Change the comment on the workaround to give PCH names rather than platform names. Although the bspec is setup to list workarounds by platform, the hardware team has confirmed that the actual issue being worked around here is something that was introduced back in the Cannon Lake PCH and carried forward to subsequent PCH's. - Extend the untweaked version of the workaround to include PCH_CNP as well. Note that since PCH_CNP is used to represent CMP, this will apply on CML and some variants of RKL too. - Cap the untweaked version of the workaround so that it won't apply to "fake" PCH's (i.e., DG1). The issue we're working around really is an issue in the PCH itself, not the South Display, so it shouldn't apply when there isn't a real PCH. v3: - use intel_de_rmw(). [Rodrigo] Cc: Rodrigo Vivi Signed-off-by: Bob Paauwe Signed-off-by: Anshuman Gupta Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20201110121700.4338-1-anshuman.gupta@intel.com Reviewed-by: Rodrigo Vivi commit 5bdba520c1b318578caffd325515b35d187f8a0e Author: Faiyaz Mohammed Date: Mon Nov 16 17:05:37 2020 +0530 mm: memblock: drop __init from memblock functions to make it inline __init is used with inline due to which memblock wraper functions are not getting inline. for example: [ 0.000000] memblock_alloc_try_nid: 1490 bytes align=0x40 nid=-1 from=0x0000000000000000 max_addr=0x0000000000000000 memblock_alloc+0x20/0x2c [ 0.000000] memblock_reserve: [0x000000023f09a3c0-0x000000023f09a991] memblock_alloc_range_nid+0xc0/0x188 Dropping __init from memblock wrapper functions to make it inline and it increase the debugability. After: [ 0.000000] memblock_alloc_try_nid: 1490 bytes align=0x40 nid=-1 from=0x0000000000000000 max_addr=0x0000000000000000 start_kernel+0xa4/0x568 [ 0.000000] memblock_reserve: [0x000000023f09a3c0-0x000000023f09a991] memblock_alloc_range_nid+0xc0/0x188 Signed-off-by: Faiyaz Mohammed Signed-off-by: Mike Rapoport commit 2ca5a7b85b0c2b97ef08afbd7799b022e29f192e Author: Ville Syrjälä Date: Tue Nov 10 23:04:47 2020 +0200 drm/i915: Handle max_bpc==16 EDID can declare the maximum supported bpc up to 16, and apparently there are displays that do so. Currently we assume 12 bpc is tha max. Fix the assumption and toss in a MISSING_CASE() for any other value we don't expect to see. This fixes modesets with a display with EDID max bpc > 12. Previously any modeset would just silently fail on platforms that didn't otherwise limit this via the max_bpc property. In particular we don't add the max_bpc property to HDMI ports on gmch platforms, and thus we would see the raw max_bpc coming from the EDID. I suppose we could already adjust this to also allow 16bpc, but seeing as no current platform supports that there is little point. Cc: stable@vger.kernel.org Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2632 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201110210447.27454-1-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit bb025fb6c276ac874b718b9d884b7ee1099b2c22 Author: Ionela Voinescu Date: Thu Nov 5 12:55:19 2020 +0000 cppc_cpufreq: simplify use of performance capabilities The CPPC performance capabilities are used significantly throughout the driver. Simplify the use of them by introducing a local pointer "caps" to point to cpu_data->perf_caps, in functions that access performance capabilities often. Signed-off-by: Ionela Voinescu Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 48ad8dc94032ab43f0655190d9687f6d65b98f7f Author: Ionela Voinescu Date: Thu Nov 5 12:55:18 2020 +0000 cppc_cpufreq: clean up cpu, cpu_num and cpunum variable use In order to maintain the typical naming convention in the cpufreq framework: - replace the use of "cpu" variable name for cppc_cpudata pointers with "cpu_data" - replace variable names "cpu_num" and "cpunum" with "cpu" - make cpu variables unsigned int Where pertinent, also move the initialisation of cpu_data variable to its declaration and make consistent use of the local "cpu" variable. Signed-off-by: Ionela Voinescu Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 63087265c288dc2d0f198ffba964c9fb383a61ed Author: Ionela Voinescu Date: Thu Nov 5 12:55:17 2020 +0000 cppc_cpufreq: fix misspelling, code style and readability issues Fix a few trivial issues in the cppc_cpufreq driver: - indentation of function arguments - consistent use of tabs (vs space) in defines - spelling: s/Offest/Offset, s/trasition/transition - order of local variables, from long pointers to structures to short ret and i (index) variables, to improve readability Signed-off-by: Ionela Voinescu Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit b283477d394ac41ca59ee20eb9293ae9002eb1d7 Author: Ard Biesheuvel Date: Tue Nov 3 07:50:04 2020 +0100 efi: x86/xen: switch to efi_get_secureboot_mode helper Now that we have a static inline helper to discover the platform's secure boot mode that can be shared between the EFI stub and the kernel proper, switch to it, and drop some comments about keeping them in sync manually. Signed-off-by: Ard Biesheuvel commit 8d39cee0592e0129280e5a3cc480d64649c5e63f Author: Chester Lin Date: Fri Oct 30 14:08:40 2020 +0800 arm64/ima: add ima_arch support Add arm64 IMA arch support. The code and arch policy is mainly inherited from x86. Co-developed-by: Chester Lin Signed-off-by: Chester Lin Acked-by: Mimi Zohar Acked-by: Catalin Marinas Signed-off-by: Ard Biesheuvel commit 7467389bdafb77357090512d42a452bea31d53b5 Author: Paul Cercueil Date: Sun Nov 1 09:31:50 2020 +0000 drm/panel: Add ABT Y030XX067A 3.0" 320x480 panel Add support for the ShenZhen Asia Better Technology Ltd. Y030XX067A 3.0" 320x480 IPS panel. This panel can be found in the YLM RG-280M, RG-300 and RG-99 handheld gaming consoles. While being 320x480, it is actually a horizontal 4:3 panel with non-square pixels. Signed-off-by: Paul Cercueil Signed-off-by: Christophe Branchereau Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201101093150.8071-5-paul@crapouillou.net commit 63ee07d5a8d7f279187984dbdf6bbfd571c937dd Author: Paul Cercueil Date: Sun Nov 1 09:31:49 2020 +0000 media: uapi: Add MEDIA_BUS_FMT_RGB888_3X8_DELTA media bus format Add media bus format for 24-bit panels that expect their pixel data to be sent serially on a 8-bit bus, in RGB ordering on odd lines, and in GBR ordering on even lines (aka delta-RGB). Signed-off-by: Paul Cercueil Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201101093150.8071-4-paul@crapouillou.net commit e366a644c69d0909cb3ff3921c9c9ef4cff9a41d Author: Paul Cercueil Date: Sun Nov 1 09:31:48 2020 +0000 dt-bindings: display: Add ABT Y030XX067A panel bindings The Asia Better Technology (ABT) Y030XX067A panel is a 3.0" 320x480 24-bit IPS LCD panel. Its particularity is that it has non-square pixels (as it is 4:3 for a resolution of 320x480), and that it requires odd lines to be sent as RGB and even lines to be sent as GRB on its 8-bit bus. Signed-off-by: Paul Cercueil Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201101093150.8071-3-paul@crapouillou.net commit 81b7608e2b190426c33b9e7fc69fe96ae8408ebb Author: Paul Cercueil Date: Sun Nov 1 09:31:47 2020 +0000 dt-bindings: vendor-prefixes: Add abt vendor prefix Add prefix for ShenZhen Asia Better Technology Ltd. Signed-off-by: Paul Cercueil Reviewed-by: Sam Ravnborg Acked-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20201101093150.8071-2-paul@crapouillou.net commit fd6a1e60a0496be1c903a7fd47482c67cdd5ccd7 Author: Eddie James Date: Wed Oct 28 13:56:47 2020 -0500 ARM: dts: aspeed: rainier: Add 4U device-tree Add a device-tree for the Rainier 4U system. Change the model name on the existing Rainier device-tree to 2U, and remove the two extra power supplies that are only present on the 4U system. Also add labels to the fan nodes for use in the 4U device-tree. Signed-off-by: Eddie James Reviewed-by: Andrew Jeffery Link: https://lore.kernel.org/r/20201028185647.14565-1-eajames@linux.ibm.com Signed-off-by: Joel Stanley commit b33340e33acdfe5ca6a5aa1244709575ae1e0432 Author: Marc Zyngier Date: Mon Nov 16 20:07:44 2020 +0000 drm/meson: dw-hdmi: Ensure that clocks are enabled before touching the TOP registers Removing the meson-dw-hdmi module and re-inserting it results in a hang as the driver writes to HDMITX_TOP_SW_RESET. Similar effects can be seen when booting with mainline u-boot and using the u-boot provided DT (which is highly desirable). The reason for the hang seem to be that the clocks are not always enabled by the time we enter meson_dw_hdmi_init(). Moving this call *after* dw_hdmi_probe() ensures that the clocks are enabled. Fixes: 1374b8375c2e ("drm/meson: dw_hdmi: add resume/suspend hooks") Signed-off-by: Marc Zyngier Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20201116200744.495826-5-maz@kernel.org commit 0405f94a1ae0586ca237aec0e859f1b796d6325d Author: Marc Zyngier Date: Mon Nov 16 20:07:43 2020 +0000 drm/meson: dw-hdmi: Register a callback to disable the regulator Removing the meson-dw-hdmi module results in the following splat: i[ 43.340509] WARNING: CPU: 0 PID: 572 at drivers/regulator/core.c:2125 _regulator_put.part.0+0x16c/0x174 [...] [ 43.454870] CPU: 0 PID: 572 Comm: modprobe Tainted: G W E 5.10.0-rc4-00049-gd274813a4de3-dirty #2147 [ 43.465042] Hardware name: , BIOS 2021.01-rc2-00012-gde865f7ee1 11/16/2020 [ 43.471945] pstate: 80400009 (Nzcv daif +PAN -UAO -TCO BTYPE=--) [ 43.477896] pc : _regulator_put.part.0+0x16c/0x174 [ 43.482638] lr : regulator_put+0x44/0x60 [...] [ 43.568715] Call trace: [ 43.571132] _regulator_put.part.0+0x16c/0x174 [ 43.575529] regulator_put+0x44/0x60 [ 43.579067] devm_regulator_release+0x20/0x2c [ 43.583380] release_nodes+0x1c8/0x2b4 [ 43.587087] devres_release_all+0x44/0x6c [ 43.591056] __device_release_driver+0x1a0/0x23c [ 43.595626] driver_detach+0xcc/0x160 [ 43.599249] bus_remove_driver+0x68/0xe0 [ 43.603130] driver_unregister+0x3c/0x6c [ 43.607011] platform_driver_unregister+0x20/0x2c [ 43.611678] meson_dw_hdmi_platform_driver_exit+0x18/0x4a8 [meson_dw_hdmi] [ 43.618485] __arm64_sys_delete_module+0x1bc/0x294 as the HDMI regulator is still enabled on release. In order to address this, register a callback that will deal with the disabling when the driver is unbound, solving the problem. Fixes: 161a803fe32d ("drm/meson: dw_hdmi: Add support for an optional external 5V regulator") Signed-off-by: Marc Zyngier Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20201116200744.495826-4-maz@kernel.org commit e78ad18ba3658fbc8c63629e034b68d8e51acbf1 Author: Marc Zyngier Date: Mon Nov 16 20:07:42 2020 +0000 drm/meson: Unbind all connectors on module removal Removing the meson DRM module results in the following splats: [ 42.689228] WARNING: CPU: 0 PID: 572 at drivers/gpu/drm/drm_irq.c:192 drm_irq_uninstall+0x130/0x160 [drm] [...] [ 42.812820] Hardware name: , BIOS 2021.01-rc2-00012-gde865f7ee1 11/16/2020 [ 42.819723] pstate: 80400089 (Nzcv daIf +PAN -UAO -TCO BTYPE=--) [ 42.825737] pc : drm_irq_uninstall+0x130/0x160 [drm] [ 42.830647] lr : drm_irq_uninstall+0xc4/0x160 [drm] [...] [ 42.917614] Call trace: [ 42.920086] drm_irq_uninstall+0x130/0x160 [drm] [ 42.924612] meson_drv_unbind+0x68/0xa4 [meson_drm] [ 42.929436] component_del+0xc0/0x180 [ 42.933058] meson_dw_hdmi_remove+0x28/0x40 [meson_dw_hdmi] [ 42.938576] platform_drv_remove+0x38/0x60 [ 42.942628] __device_release_driver+0x190/0x23c [ 42.947198] driver_detach+0xcc/0x160 [ 42.950822] bus_remove_driver+0x68/0xe0 [ 42.954702] driver_unregister+0x3c/0x6c [ 42.958583] platform_driver_unregister+0x20/0x2c [ 42.963243] meson_dw_hdmi_platform_driver_exit+0x18/0x4a8 [meson_dw_hdmi] [ 42.970057] __arm64_sys_delete_module+0x1bc/0x294 [ 42.974801] el0_svc_common.constprop.0+0x80/0x240 [ 42.979542] do_el0_svc+0x30/0xa0 [ 42.982821] el0_svc+0x18/0x50 [ 42.985839] el0_sync_handler+0x198/0x404 [ 42.989806] el0_sync+0x158/0x180 immediatelly followed by [ 43.002296] WARNING: CPU: 0 PID: 572 at drivers/gpu/drm/drm_mode_config.c:504 drm_mode_config_cleanup+0x2a8/0x304 [drm] [...] [ 43.128150] Hardware name: , BIOS 2021.01-rc2-00012-gde865f7ee1 11/16/2020 [ 43.135052] pstate: 80400009 (Nzcv daif +PAN -UAO -TCO BTYPE=--) [ 43.141062] pc : drm_mode_config_cleanup+0x2a8/0x304 [drm] [ 43.146492] lr : drm_mode_config_cleanup+0xac/0x304 [drm] [...] [ 43.233979] Call trace: [ 43.236451] drm_mode_config_cleanup+0x2a8/0x304 [drm] [ 43.241538] drm_mode_config_init_release+0x1c/0x2c [drm] [ 43.246886] drm_managed_release+0xa8/0x120 [drm] [ 43.251543] drm_dev_put+0x94/0xc0 [drm] [ 43.255380] meson_drv_unbind+0x78/0xa4 [meson_drm] [ 43.260204] component_del+0xc0/0x180 [ 43.263829] meson_dw_hdmi_remove+0x28/0x40 [meson_dw_hdmi] [ 43.269344] platform_drv_remove+0x38/0x60 [ 43.273398] __device_release_driver+0x190/0x23c [ 43.277967] driver_detach+0xcc/0x160 [ 43.281590] bus_remove_driver+0x68/0xe0 [ 43.285471] driver_unregister+0x3c/0x6c [ 43.289352] platform_driver_unregister+0x20/0x2c [ 43.294011] meson_dw_hdmi_platform_driver_exit+0x18/0x4a8 [meson_dw_hdmi] [ 43.300826] __arm64_sys_delete_module+0x1bc/0x294 [ 43.305570] el0_svc_common.constprop.0+0x80/0x240 [ 43.310312] do_el0_svc+0x30/0xa0 [ 43.313590] el0_svc+0x18/0x50 [ 43.316608] el0_sync_handler+0x198/0x404 [ 43.320574] el0_sync+0x158/0x180 [ 43.323852] ---[ end trace d796a3072dab01da ]--- [ 43.328561] [drm:drm_mode_config_cleanup [drm]] *ERROR* connector HDMI-A-1 leaked! both triggered by the fact that the HDMI subsystem is still active, and the DRM removal doesn't result in the connectors being torn down. Call drm_atomic_helper_shutdown() and component_unbind_all() to safely tear the module down. Fixes: 2d8f92897ad8 ("drm/meson: Uninstall IRQ handler") Signed-off-by: Marc Zyngier Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20201116200744.495826-3-maz@kernel.org commit fa62ee25280ff6ae1f720f363263cb5e7743a8c8 Author: Marc Zyngier Date: Mon Nov 16 20:07:41 2020 +0000 drm/meson: Free RDMA resources after tearing down DRM Removing the meson DRM module results in the following splat: [ 2179.451346] Hardware name: , BIOS 2021.01-rc2-00012-gde865f7ee1 11/16/2020 [ 2179.458316] Workqueue: events drm_mode_rmfb_work_fn [drm] [ 2179.463597] pstate: 80c00009 (Nzcv daif +PAN +UAO -TCO BTYPE=--) [ 2179.469558] pc : meson_rdma_writel_sync+0x44/0xb0 [meson_drm] [ 2179.475243] lr : meson_g12a_afbcd_reset+0x34/0x60 [meson_drm] [ 2179.480930] sp : ffffffc01212bb70 [ 2179.484207] x29: ffffffc01212bb70 x28: ffffff8044f66f00 [ 2179.489469] x27: ffffff8045b13800 x26: 0000000000000001 [ 2179.494730] x25: 0000000000000000 x24: 0000000000000001 [ 2179.499991] x23: 0000000000000000 x22: 0000000000000000 [ 2179.505252] x21: 0000000000280000 x20: 0000000000001a01 [ 2179.510513] x19: ffffff8046029480 x18: 0000000000000000 [ 2179.515775] x17: 0000000000000000 x16: 0000000000000000 [ 2179.521036] x15: 0000000000000000 x14: 0000000000000000 [ 2179.526297] x13: 0040000000000326 x12: 0309030303260300 [ 2179.531558] x11: 03000000054004a0 x10: 0418054004000400 [ 2179.536820] x9 : ffffffc008fe4914 x8 : ffffff8040a1adc0 [ 2179.542081] x7 : 0000000000000000 x6 : ffffff8042aa0080 [ 2179.547342] x5 : ffffff8044f66f00 x4 : ffffffc008fe5bc8 [ 2179.552603] x3 : 0000000000010101 x2 : 0000000000000001 [ 2179.557865] x1 : 0000000000000000 x0 : 0000000000000000 [ 2179.563127] Call trace: [ 2179.565548] meson_rdma_writel_sync+0x44/0xb0 [meson_drm] [ 2179.570894] meson_g12a_afbcd_reset+0x34/0x60 [meson_drm] [ 2179.576241] meson_plane_atomic_disable+0x38/0xb0 [meson_drm] [ 2179.581966] drm_atomic_helper_commit_planes+0x1e0/0x21c [drm_kms_helper] [ 2179.588684] drm_atomic_helper_commit_tail_rpm+0x68/0xb0 [drm_kms_helper] [ 2179.595410] commit_tail+0xac/0x190 [drm_kms_helper] [ 2179.600326] drm_atomic_helper_commit+0x16c/0x390 [drm_kms_helper] [ 2179.606484] drm_atomic_commit+0x58/0x70 [drm] [ 2179.610880] drm_framebuffer_remove+0x398/0x434 [drm] [ 2179.615881] drm_mode_rmfb_work_fn+0x68/0x8c [drm] [ 2179.620575] process_one_work+0x1cc/0x49c [ 2179.624538] worker_thread+0x200/0x444 [ 2179.628246] kthread+0x14c/0x160 [ 2179.631439] ret_from_fork+0x10/0x38 caused by the fact that the RDMA buffer has already been freed, resulting in meson_rdma_writel_sync() getting a NULL pointer. Move the afbcd reset and meson_rdma_free calls after the DRM unregistration is complete so that the teardown can safely complete. Fixes: d1b5e41e13a7 ("drm/meson: Add AFBCD module driver") Signed-off-by: Marc Zyngier Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20201116200744.495826-2-maz@kernel.org commit 723ae803218da993143387bf966042eccefac077 Author: Yang Yingliang Date: Tue Nov 17 14:10:45 2020 +0800 drm/omap: dmm_tiler: fix return error code in omap_dmm_probe() Return -ENOMEM when allocating refill memory failed. Fixes: 71e8831f6407 ("drm/omap: DMM/TILER support for OMAP4+ platform") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20201117061045.3452287-1-yangyingliang@huawei.com commit 95bb7c42ac8a94ce3d0eb059ad64430390351ccb Author: Sean Christopherson Date: Fri Nov 13 00:01:21 2020 +0200 mm: Add 'mprotect' hook to struct vm_operations_struct Background ========== 1. SGX enclave pages are populated with data by copying from normal memory via ioctl() (SGX_IOC_ENCLAVE_ADD_PAGES), which will be added later in this series. 2. It is desirable to be able to restrict those normal memory data sources. For instance, to ensure that the source data is executable before copying data to an executable enclave page. 3. Enclave page permissions are dynamic (just like normal permissions) and can be adjusted at runtime with mprotect(). This creates a problem because the original data source may have long since vanished at the time when enclave page permissions are established (mmap() or mprotect()). The solution (elsewhere in this series) is to force enclave creators to declare their paging permission *intent* up front to the ioctl(). This intent can be immediately compared to the source data’s mapping and rejected if necessary. The “intent” is also stashed off for later comparison with enclave PTEs. This ensures that any future mmap()/mprotect() operations performed by the enclave creator or done on behalf of the enclave can be compared with the earlier declared permissions. Problem ======= There is an existing mmap() hook which allows SGX to perform this permission comparison at mmap() time. However, there is no corresponding ->mprotect() hook. Solution ======== Add a vm_ops->mprotect() hook so that mprotect() operations which are inconsistent with any page's stashed intent can be rejected by the driver. Signed-off-by: Sean Christopherson Co-developed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen Signed-off-by: Borislav Petkov Acked-by: Jethro Beekman Acked-by: Dave Hansen Acked-by: Mel Gorman Acked-by: Hillf Danton Cc: linux-mm@kvack.org Link: https://lkml.kernel.org/r/20201112220135.165028-11-jarkko@kernel.org commit d2285493bef310b66b56dfe4eb75c1e2f431ea5c Author: Jarkko Sakkinen Date: Fri Nov 13 00:01:20 2020 +0200 x86/sgx: Add SGX page allocator functions Add functions for runtime allocation and free. This allocator and its algorithms are as simple as it gets. They do a linear search across all EPC sections and find the first free page. They are not NUMA-aware and only hand out individual pages. The SGX hardware does not support large pages, so something more complicated like a buddy allocator is unwarranted. The free function (sgx_free_epc_page()) implicitly calls ENCLS[EREMOVE], which returns the page to the uninitialized state. This ensures that the page is ready for use at the next allocation. Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Signed-off-by: Jarkko Sakkinen Signed-off-by: Borislav Petkov Acked-by: Jethro Beekman Link: https://lkml.kernel.org/r/20201112220135.165028-10-jarkko@kernel.org commit 38853a303982e3be3eccb1a1132399a5c5e2d806 Author: Jarkko Sakkinen Date: Fri Nov 13 00:01:19 2020 +0200 x86/cpu/intel: Add a nosgx kernel parameter Add a kernel parameter to disable SGX kernel support and document it. [ bp: Massage. ] Signed-off-by: Jarkko Sakkinen Signed-off-by: Borislav Petkov Reviewed-by: Sean Christopherson Acked-by: Jethro Beekman Tested-by: Sean Christopherson Link: https://lkml.kernel.org/r/20201112220135.165028-9-jarkko@kernel.org commit 224ab3527f89f69ae57dc53555826667ac46a3cc Author: Sean Christopherson Date: Fri Nov 13 00:01:18 2020 +0200 x86/cpu/intel: Detect SGX support Kernel support for SGX is ultimately decided by the state of the launch control bits in the feature control MSR (MSR_IA32_FEAT_CTL). If the hardware supports SGX, but neglects to support flexible launch control, the kernel will not enable SGX. Enable SGX at feature control MSR initialization and update the associated X86_FEATURE flags accordingly. Disable X86_FEATURE_SGX (and all derivatives) if the kernel is not able to establish itself as the authority over SGX Launch Control. All checks are performed for each logical CPU (not just boot CPU) in order to verify that MSR_IA32_FEATURE_CONTROL is correctly configured on all CPUs. All SGX code in this series expects the same configuration from all CPUs. This differs from VMX where X86_FEATURE_VMX is intentionally cleared only for the current CPU so that KVM can provide additional information if KVM fails to load like which CPU doesn't support VMX. There’s not much the kernel or an administrator can do to fix the situation, so SGX neglects to convey additional details about these kinds of failures if they occur. Signed-off-by: Sean Christopherson Co-developed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen Signed-off-by: Borislav Petkov Acked-by: Jethro Beekman Link: https://lkml.kernel.org/r/20201112220135.165028-8-jarkko@kernel.org commit 74faeee06db81a06add0def6a394210c8fef0ab7 Author: Sean Christopherson Date: Fri Nov 13 00:01:17 2020 +0200 x86/mm: Signal SIGSEGV with PF_SGX The x86 architecture has a set of page fault error codes. These indicate things like whether the fault occurred from a write, or whether it originated in userspace. The SGX hardware architecture has its own per-page memory management metadata (EPCM) [*] and hardware which is separate from the normal x86 MMU. The architecture has a new page fault error code: PF_SGX. This new error code bit is set whenever a page fault occurs as the result of the SGX MMU. These faults occur for a variety of reasons. For instance, an access attempt to enclave memory from outside the enclave causes a PF_SGX fault. PF_SGX would also be set for permission conflicts, such as if a write to an enclave page occurs and the page is marked read-write in the x86 page tables but is read-only in the EPCM. These faults do not always indicate errors, though. SGX pages are encrypted with a key that is destroyed at hardware reset, including suspend. Throwing a SIGSEGV allows user space software to react and recover when these events occur. Include PF_SGX in the PF error codes list and throw SIGSEGV when it is encountered. [*] Intel SDM: 36.5.1 Enclave Page Cache Map (EPCM) [ bp: Add bit 15 to the comment above enum x86_pf_error_code too. ] Signed-off-by: Sean Christopherson Signed-off-by: Jarkko Sakkinen Signed-off-by: Borislav Petkov Acked-by: Jethro Beekman Link: https://lkml.kernel.org/r/20201112220135.165028-7-jarkko@kernel.org commit e7e0545299d8cb0fd6fe3ba50401b7f5c3937362 Author: Sean Christopherson Date: Fri Nov 13 00:01:16 2020 +0200 x86/sgx: Initialize metadata for Enclave Page Cache (EPC) sections Although carved out of normal DRAM, enclave memory is marked in the system memory map as reserved and is not managed by the core mm. There may be several regions spread across the system. Each contiguous region is called an Enclave Page Cache (EPC) section. EPC sections are enumerated via CPUID Enclave pages can only be accessed when they are mapped as part of an enclave, by a hardware thread running inside the enclave. Parse CPUID data, create metadata for EPC pages and populate a simple EPC page allocator. Although much smaller, ‘struct sgx_epc_page’ metadata is the SGX analog of the core mm ‘struct page’. Similar to how the core mm’s page->flags encode zone and NUMA information, embed the EPC section index to the first eight bits of sgx_epc_page->desc. This allows a quick reverse lookup from EPC page to EPC section. Existing client hardware supports only a single section, while upcoming server hardware will support at most eight sections. Thus, eight bits should be enough for long term needs. Signed-off-by: Sean Christopherson Co-developed-by: Serge Ayoun Signed-off-by: Serge Ayoun Co-developed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen Signed-off-by: Borislav Petkov Acked-by: Jethro Beekman Link: https://lkml.kernel.org/r/20201112220135.165028-6-jarkko@kernel.org commit d205e0f1426e0f99e2b4f387c49f2d8b66e129dd Author: Sean Christopherson Date: Fri Nov 13 00:01:15 2020 +0200 x86/{cpufeatures,msr}: Add Intel SGX Launch Control hardware bits The SGX Launch Control hardware helps restrict which enclaves the hardware will run. Launch control is intended to restrict what software can run with enclave protections, which helps protect the overall system from bad enclaves. For the kernel's purposes, there are effectively two modes in which the launch control hardware can operate: rigid and flexible. In its rigid mode, an entity other than the kernel has ultimate authority over which enclaves can be run (firmware, Intel, etc...). In its flexible mode, the kernel has ultimate authority over which enclaves can run. Enable X86_FEATURE_SGX_LC to enumerate when the CPU supports SGX Launch Control in general. Add MSR_IA32_SGXLEPUBKEYHASH{0, 1, 2, 3}, which when combined contain a SHA256 hash of a 3072-bit RSA public key. The hardware allows SGX enclaves signed with this public key to initialize and run [*]. Enclaves not signed with this key can not initialize and run. Add FEAT_CTL_SGX_LC_ENABLED, which informs whether the SGXLEPUBKEYHASH MSRs can be written by the kernel. If the MSRs do not exist or are read-only, the launch control hardware is operating in rigid mode. Linux does not and will not support creating enclaves when hardware is configured in rigid mode because it takes away the authority for launch decisions from the kernel. Note, this does not preclude KVM from virtualizing/exposing SGX to a KVM guest when launch control hardware is operating in rigid mode. [*] Intel SDM: 38.1.4 Intel SGX Launch Control Configuration Signed-off-by: Sean Christopherson Co-developed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen Signed-off-by: Borislav Petkov Acked-by: Jethro Beekman Link: https://lkml.kernel.org/r/20201112220135.165028-5-jarkko@kernel.org commit e7b6385b01d8e9fb7a97887c3ea649abb95bb8c8 Author: Sean Christopherson Date: Fri Nov 13 00:01:14 2020 +0200 x86/cpufeatures: Add Intel SGX hardware bits Populate X86_FEATURE_SGX feature from CPUID and tie it to the Kconfig option with disabled-features.h. IA32_FEATURE_CONTROL.SGX_ENABLE must be examined in addition to the CPUID bits to enable full SGX support. The BIOS must both set this bit and lock IA32_FEATURE_CONTROL for SGX to be supported (Intel SDM section 36.7.1). The setting or clearing of this bit has no impact on the CPUID bits above, which is why it needs to be detected separately. Signed-off-by: Sean Christopherson Co-developed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen Signed-off-by: Borislav Petkov Acked-by: Jethro Beekman Link: https://lkml.kernel.org/r/20201112220135.165028-4-jarkko@kernel.org commit 2c273671d0dfcf89c9c8a319ed093406e3ff665c Author: Jarkko Sakkinen Date: Fri Nov 13 00:01:13 2020 +0200 x86/sgx: Add wrappers for ENCLS functions ENCLS is the userspace instruction which wraps virtually all unprivileged SGX functionality for managing enclaves. It is essentially the ioctl() of instructions with each function implementing different SGX-related functionality. Add macros to wrap the ENCLS functionality. There are two main groups, one for functions which do not return error codes and a “ret_” set for those that do. ENCLS functions are documented in Intel SDM section 36.6. Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Signed-off-by: Jarkko Sakkinen Signed-off-by: Borislav Petkov Acked-by: Jethro Beekman Link: https://lkml.kernel.org/r/20201112220135.165028-3-jarkko@kernel.org commit 70d3b8ddcd20d3c859676f56c43c7b2360c70266 Author: Jarkko Sakkinen Date: Fri Nov 13 00:01:12 2020 +0200 x86/sgx: Add SGX architectural data structures Define the SGX architectural data structures used by various SGX functions. This is not an exhaustive representation of all SGX data structures but only those needed by the kernel. The goal is to sequester hardware structures in "sgx/arch.h" and keep them separate from kernel-internal or uapi structures. The data structures are described in Intel SDM section 37.6. Signed-off-by: Jarkko Sakkinen Signed-off-by: Borislav Petkov Acked-by: Jethro Beekman Link: https://lkml.kernel.org/r/20201112220135.165028-2-jarkko@kernel.org commit a01a89b1db1066a6af23ae08b9a0c345b7966f0b Author: Yejune Deng Date: Mon Nov 16 15:30:07 2020 +0800 ipmi/watchdog: replace atomic_add() and atomic_sub() atomic_inc() and atomic_dec() looks better Signed-off-by: Yejune Deng Message-Id: <1605511807-7135-1-git-send-email-yejune.deng@gmail.com> Signed-off-by: Corey Minyard commit 6804a987de733c805675973e3afde128fe7a7cfa Author: Suman Anna Date: Mon Oct 26 18:26:37 2020 -0500 arm64: dts: ti: k3-j7200-som-p0: Add IPC sub-mailbox nodes Add the sub-mailbox nodes that are used to communicate between MPU and various remote processors present in the J7200 SoCs to the J7200 common processor board. These include the R5F remote processors in the dual-R5F clusters in the MCU domain (MCU_R5FSS0) and the MAIN domain (MAIN_R5FSS0). These sub-mailbox nodes utilize the System Mailbox clusters 0 and 1. All the remaining mailbox clusters are currently not used on A72 core, and so are disabled. The nodes are added in the k3-j7200-som-p0.dtsi file to co-locate these alongside future reserved-memory nodes required for remoteprocs. The sub-mailbox nodes added match the hard-coded mailbox configuration used within the TI RTOS IPC software packages. A sub-mailbox node is added for each of the R5F cores to accommodate the R5F processor sub-systems running in Split mode. Only the sub-mailbox node for the first R5F core in each cluster is used in case of Lockstep mode for that R5F cluster. NOTE: The GIC_SPI interrupts to be used are dynamically allocated and managed by the System Firmware through the ti-sci-intr irqchip driver. So, only valid interrupts that are used by the sub-mailbox devices (each cluster's User 0 IRQ output) are enabled. This is done to minimize the number of NavSS Interrupt Router outputs utilized. Signed-off-by: Suman Anna Signed-off-by: Nishanth Menon Reviewed-by: Praneeth Bajjuri Link: https://lore.kernel.org/r/20201026232637.15681-4-s-anna@ti.com commit d15d1cfbd765b4b2a113b6025e8edc7db4a7800a Author: Suman Anna Date: Mon Oct 26 18:26:36 2020 -0500 arm64: dts: ti: k3-j7200-main: Add mailbox cluster nodes The J7200 Main NavSS block contains a Mailbox IP instance with multiple clusters, and follows the same integration style as on J721E SoCs. Add all the Mailbox clusters as their own nodes under the MAIN NavSS interconnect node instead of creating an almost empty parent node for the new K3 mailbox IP and the clusters as its child nodes. All these nodes are enabled by default in the base dtsi file, but any cluster that does not define any child sub-mailbox nodes should be disabled in the corresponding board dts files. NOTE: The NavSS only has a limited number of interrupts, so none of the interrupts generated by a Mailbox IP are added by default. Only the needed interrupts that are targeted towards the A72 GIC will have to be added later on in the board dts files alongside the corresponding sub-mailbox child nodes. Signed-off-by: Suman Anna Signed-off-by: Nishanth Menon Reviewed-by: Praneeth Bajjuri Link: https://lore.kernel.org/r/20201026232637.15681-3-s-anna@ti.com commit 1d7a01c40840d844fb5d353c151f0ee0a7680c2f Author: Suman Anna Date: Mon Oct 26 18:26:35 2020 -0500 arm64: dts: ti: k3-j7200-main: Add hwspinlock node The Main NavSS block on J7200 SoCs contains a HwSpinlock IP instance that is same as the IP on AM65x and J721E SoCs. Add the DT node for this on J7200 SoCs. The node is present within the Main NavSS block, and is added as a child node under the main_navss interconnect node. Signed-off-by: Suman Anna Signed-off-by: Nishanth Menon Reviewed-by: Praneeth Bajjuri Link: https://lore.kernel.org/r/20201026232637.15681-2-s-anna@ti.com commit 4cc34aa8a208665aa0362a615deefc3db6a5d7bd Author: Nishanth Menon Date: Fri Nov 13 15:18:26 2020 -0600 arm64: dts: ti: am65/j721e/j7200: Mark firmware used uart as "reserved" Follow the device tree standards that states to set the status="reserved" if an device is operational, but used by a non-linux firmware in the system. Signed-off-by: Nishanth Menon Reviewed-by: Tony Lindgren Acked-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20201113211826.13087-6-nm@ti.com commit 90e6c38848f8e86047e0e758c0725b155e2e349b Author: Nishanth Menon Date: Fri Nov 13 15:18:25 2020 -0600 arm64: dts: ti: k3-am654-base-board: Fix up un-necessary status set to "okay" for USB The default state of a device tree node is "okay". There is no specific use of explicitly adding status = "okay" in the board dts. Signed-off-by: Nishanth Menon Reviewed-by: Tony Lindgren Acked-by: Roger Quadros Cc: Roger Quadros Link: https://lore.kernel.org/r/20201113211826.13087-5-nm@ti.com commit bfbf9be725d8effdbb60eb2ece44c06ae87a54de Author: Nishanth Menon Date: Fri Nov 13 15:18:24 2020 -0600 arm64: dts: ti: am65/j721e: Fix up un-necessary status set to "okay" for crypto The default state of a device tree node is "okay". There is no specific use of explicitly adding status = "okay" in the SoC dtsi. Signed-off-by: Nishanth Menon Reviewed-by: Tony Lindgren Reviewed-by: Keerthy Acked-by: Tero Kristo Cc: Keerthy Link: https://lore.kernel.org/r/20201113211826.13087-4-nm@ti.com commit 5d1bedf252db3ec2becb9f43c55e0f33af1fd7fc Author: Nishanth Menon Date: Fri Nov 13 15:18:23 2020 -0600 arm64: dts: ti: k3-j721e*: Cleanup disabled nodes at SoC dtsi level The device tree standard states that when the status property is not present under a node, the okay value is assumed. There are many reasons for doing the same, the number of strings in the device tree, default power management functionality, etc. are a few of the reasons. In general, after a few rounds of discussions [1] there are few options one could take when dealing with SoC dtsi and board dts a. SoC dtsi provide nodes as a super-set default (aka enabled) state and to prevent messy board files, when more boards are added per SoC, we optimize and disable commonly un-used nodes in board-common.dtsi b. SoC dtsi disables all hardware dependent nodes by default and board dts files enable nodes based on a need basis. c. Subjectively pick and choose which nodes we will disable by default in SoC dtsi and over the years we can optimize things and change default state depending on the need. While there are pros and cons on each of these approaches, the right thing to do will be to stick with device tree default standards and work within those established rules. So, we choose to go with option (a). Lets cleanup defaults of j721e SoC dtsi before this gets more harder to cleanup later on and new SoCs are added. The only functional difference between the dtb generated is status='okay' is no longer necessary for mcasp10 and depends on the default state. NOTE: There is a known risk of omission that new board dts developers might miss reviewing both the board schematics in addition to all the DT nodes of the SoC when setting appropriate nodes status to disable or reserved in the board dts. This can expose issues in drivers that may not anticipate an incomplete node (example: missing appropriate board properties) being in an "okay" state. These cases are considered bugs and need to be fixed in the drivers as and when identified. [1] https://lore.kernel.org/linux-arm-kernel/20201027130701.GE5639@atomide.com/ Signed-off-by: Nishanth Menon Reviewed-by: Tomi Valkeinen Reviewed-by: Tony Lindgren Cc: Jyri Sarha Cc: Tomi Valkeinen Cc: Peter Ujfalusi Cc: Tony Lindgren Link: https://lore.kernel.org/r/20201113211826.13087-3-nm@ti.com commit af03de2b9b908e776c233744b84ce9dbb70dcafb Author: Nishanth Menon Date: Fri Nov 13 15:18:22 2020 -0600 arm64: dts: ti: k3-am65*: Cleanup disabled nodes at SoC dtsi level The device tree standard states that when the status property is not present under a node, the okay value is assumed. There are many reasons for doing the same, the number of strings in the device tree, default power management functionality, etc. are a few of the reasons. In general, after a few rounds of discussions [1] there are few options one could take when dealing with SoC dtsi and board dts a. SoC dtsi provide nodes as a super-set default (aka enabled) state and to prevent messy board files, when more boards are added per SoC, we optimize and disable commonly un-used nodes in board-common.dtsi b. SoC dtsi disables all hardware dependent nodes by default and board dts files enable nodes based on a need basis. c. Subjectively pick and choose which nodes we will disable by default in SoC dtsi and over the years we can optimize things and change default state depending on the need. While there are pros and cons on each of these approaches, the right thing to do will be to stick with device tree default standards and work within those established rules. So, we choose to go with option (a). Lets cleanup defaults of am654 SoC dtsi before this gets more harder to cleanup later on and new SoCs are added. The dtb generated is identical with the patch and it is just cleanup to ensure we have a clean usage model NOTE: There is a known risk of omission that new board dts developers might miss reviewing both the board schematics in addition to all the DT nodes of the SoC when setting appropriate nodes status to disable or reserved in the board dts. This can expose issues in drivers that may not anticipate an incomplete node (example: missing appropriate board properties) being in an "okay" state. These cases are considered bugs and need to be fixed in the drivers as and when identified. [1] https://lore.kernel.org/linux-arm-kernel/20201027130701.GE5639@atomide.com/ Signed-off-by: Nishanth Menon Reviewed-by: Tomi Valkeinen Reviewed-by: Tony Lindgren Cc: Jyri Sarha Cc: Tomi Valkeinen Cc: Peter Ujfalusi Cc: Tony Lindgren Link: https://lore.kernel.org/r/20201113211826.13087-2-nm@ti.com commit 506f43994d4fe7a78637c4cf258e6877e18cef16 Merge: ade8e9d3fb923 d06d60d52ec0b Author: Ulf Hansson Date: Tue Nov 17 12:48:34 2020 +0100 Merge branch 'fixes' into next commit ade8e9d3fb9232ddfb87a4bc641b35b988d9757b Author: Krzysztof Kozlowski Date: Mon Nov 16 17:42:52 2020 +0100 mmc: tmio: do not print real IOMEM pointer Printing kernel pointers is discouraged because they might leak kernel memory layout. This fixes smatch warning: drivers/mmc/host/tmio_mmc.c:177 tmio_mmc_probe() warn: argument 3 to %08lx specifier is cast from pointer Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201116164252.44078-1-krzk@kernel.org Signed-off-by: Ulf Hansson commit fcc541fea394d67ad607ee41acfa891e79fe17a2 Author: Wolfram Sang Date: Mon Nov 16 14:22:06 2020 +0100 mmc: sdhci: tegra: fix wrong unit with busy_timeout 'busy_timeout' is in msecs, not in jiffies. Use the correct factor. Fixes: 5e958e4aacf4 ("sdhci: tegra: Implement Tegra specific set_timeout callback") Signed-off-by: Wolfram Sang Acked-by: Sowjanya Komatineni Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20201116132206.23518-1-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit fde71a3eeda2d285cfb7e09acb74f7b7964ab210 Author: Colin Ian King Date: Sat Nov 14 12:08:19 2020 +0000 mmc: host: Kconfig: fix spelling mistake "hardare" -> "hardware" There is a spelling mistake in the Kconfig file. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20201114120819.416311-1-colin.king@canonical.com Signed-off-by: Ulf Hansson commit 8ffbfe43e903775832484c3ca9773ae07845d478 Author: Dmitry Baryshkov Date: Thu Nov 12 20:36:36 2020 +0300 mmc: sdhci-msm: detect if tassadar_dll is used by using core version Detect if tassadar_dll is required by using core version rather than just specifying it in the sdhci_msm_variant_info. Signed-off-by: Dmitry Baryshkov Cc: Veerabhadrarao Badiganti Reviewed-by: Veerabhadrarao Badiganti Link: https://lore.kernel.org/r/20201112173636.360186-1-dmitry.baryshkov@linaro.org Signed-off-by: Ulf Hansson commit bbba85fae44134e00c493705bd5604fd63958315 Author: Zheng Liang Date: Thu Nov 12 17:25:30 2020 +0800 mmc: mediatek: fix mem leak in msdc_drv_probe It should use mmc_free_host to free mem in error patch of msdc_drv_probe. Reported-by: Hulk Robot Signed-off-by: Zheng Liang Reviewed-by: Chaotian Jing Link: https://lore.kernel.org/r/20201112092530.32446-1-zhengliang6@huawei.com Signed-off-by: Ulf Hansson commit 14c685d9eb361768bb5ca452b999e43498f15746 Author: Matheus Castello Date: Sun Nov 15 16:57:34 2020 -0300 drivers: hv: vmbus: Fix call msleep using < 20ms Fixed checkpatch warning: MSLEEP: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.rst Signed-off-by: Matheus Castello Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20201115195734.8338-7-matheus@castello.eng.br Signed-off-by: Wei Liu commit e4f2212e53c265ed9fb2f5b936b63cd57acb70ff Author: Matheus Castello Date: Sun Nov 15 16:57:31 2020 -0300 drivers: hv: vmbus: Fix checkpatch LINE_SPACING Fixed checkpatch warning: Missing a blank line after declarations checkpatch(LINE_SPACING) Signed-off-by: Matheus Castello Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20201115195734.8338-4-matheus@castello.eng.br Signed-off-by: Wei Liu commit f0434de41adc2c6dabfaa2f59882f1ca2d644fe9 Author: Matheus Castello Date: Sun Nov 15 16:57:30 2020 -0300 drivers: hv: vmbus: Replace symbolic permissions by octal permissions This fixed the below checkpatch issue: WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. Signed-off-by: Matheus Castello Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20201115195734.8338-3-matheus@castello.eng.br Signed-off-by: Wei Liu commit b18e3589722c864576a3dbeb742a742d9453f633 Author: Matheus Castello Date: Sun Nov 15 16:57:29 2020 -0300 drivers: hv: Fix hyperv_record_panic_msg path on comment Fix the kernel parameter path in the comment, in the documentation the parameter is correct but if someone who is studying the code and see this first can get confused and try to access the wrong path/parameter Signed-off-by: Matheus Castello Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20201115195734.8338-2-matheus@castello.eng.br Signed-off-by: Wei Liu commit 4d18fcc95f50950a99bd940d4e61a983f91d267a Author: Andres Beltran Date: Mon Nov 9 11:04:02 2020 +0100 hv_netvsc: Use vmbus_requestor to generate transaction IDs for VMBus hardening Currently, pointers to guest memory are passed to Hyper-V as transaction IDs in netvsc. In the face of errors or malicious behavior in Hyper-V, netvsc should not expose or trust the transaction IDs returned by Hyper-V to be valid guest memory addresses. Instead, use small integers generated by vmbus_requestor as requests (transaction) IDs. Signed-off-by: Andres Beltran Co-developed-by: Andrea Parri (Microsoft) Signed-off-by: Andrea Parri (Microsoft) Reviewed-by: Michael Kelley Acked-by: Jakub Kicinski Reviewed-by: Wei Liu Cc: "David S. Miller" Cc: Jakub Kicinski Cc: netdev@vger.kernel.org Link: https://lore.kernel.org/r/20201109100402.8946-4-parri.andrea@gmail.com Signed-off-by: Wei Liu commit 453de21c2b8281228173a7b689120b92929743d6 Author: Andres Beltran Date: Mon Nov 9 11:04:01 2020 +0100 scsi: storvsc: Use vmbus_requestor to generate transaction IDs for VMBus hardening Currently, pointers to guest memory are passed to Hyper-V as transaction IDs in storvsc. In the face of errors or malicious behavior in Hyper-V, storvsc should not expose or trust the transaction IDs returned by Hyper-V to be valid guest memory addresses. Instead, use small integers generated by vmbus_requestor as requests (transaction) IDs. Signed-off-by: Andres Beltran Co-developed-by: Andrea Parri (Microsoft) Signed-off-by: Andrea Parri (Microsoft) Reviewed-by: Michael Kelley Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Link: https://lore.kernel.org/r/20201109100402.8946-3-parri.andrea@gmail.com Acked-by: Martin K. Petersen Reviewed-by: Wei Liu Signed-off-by: Wei Liu commit e8b7db38449ac5b950a3f00519171c4be3e226ff Author: Andres Beltran Date: Mon Nov 9 11:04:00 2020 +0100 Drivers: hv: vmbus: Add vmbus_requestor data structure for VMBus hardening Currently, VMbus drivers use pointers into guest memory as request IDs for interactions with Hyper-V. To be more robust in the face of errors or malicious behavior from a compromised Hyper-V, avoid exposing guest memory addresses to Hyper-V. Also avoid Hyper-V giving back a bad request ID that is then treated as the address of a guest data structure with no validation. Instead, encapsulate these memory addresses and provide small integers as request IDs. Signed-off-by: Andres Beltran Co-developed-by: Andrea Parri (Microsoft) Signed-off-by: Andrea Parri (Microsoft) Reviewed-by: Michael Kelley Reviewed-by: Wei Liu Link: https://lore.kernel.org/r/20201109100402.8946-2-parri.andrea@gmail.com Signed-off-by: Wei Liu commit 96fb3cbef165db97c999a02efe2287ba4b8c1ceb Author: Daniel Vetter Date: Thu Oct 29 14:33:47 2020 +0100 drm/qxl: Remove fbcon acceleration leftovers These are leftovers from 13aff184ed9f ("drm/qxl: remove dead qxl fbdev emulation code"). v2: Somehow these structs provided the struct qxl_device pre-decl, reorder the header to not anger compilers. Acked-by: Gerd Hoffmann Signed-off-by: Daniel Vetter Cc: Dave Airlie Cc: Gerd Hoffmann Cc: virtualization@lists.linux-foundation.org Cc: spice-devel@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20201029133347.4088884-1-daniel.vetter@ffwll.ch commit 9b8b641f31338226fa220b2445bdb65097f2906d Author: Daniel Vetter Date: Thu Oct 29 11:14:27 2020 +0100 fbcon: Drop EXPORT_SYMBOL Every since commit 6104c37094e729f3d4ce65797002112735d49cd1 Author: Daniel Vetter Date: Tue Aug 1 17:32:07 2017 +0200 fbcon: Make fbcon a built-time depency for fbdev these are no longer distinct loadable modules, so exporting symbols is kinda pointless. Acked-by: Thomas Zimmermann Signed-off-by: Daniel Vetter Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Daniel Vetter Cc: Tetsuo Handa Cc: Helge Deller Cc: Peilin Ye Link: https://patchwork.freedesktop.org/patch/msgid/20201029101428.4058311-2-daniel.vetter@ffwll.ch commit 39aead8373b3c20bb5965c024dfb51a94e526151 Author: Daniel Vetter Date: Thu Oct 29 14:22:29 2020 +0100 fbcon: Disable accelerated scrolling So ever since syzbot discovered fbcon, we have solid proof that it's full of bugs. And often the solution is to just delete code and remove features, e.g. 50145474f6ef ("fbcon: remove soft scrollback code"). Now the problem is that most modern-ish drivers really only treat fbcon as an dumb kernel console until userspace takes over, and Oops printer for some emergencies. Looking at drm drivers and the basic vesa/efi fbdev drivers shows that only 3 drivers support any kind of acceleration: - nouveau, seems to be enabled by default - omapdrm, when a DMM remapper exists using remapper rewriting for y/xpanning - gma500, but that is getting deleted now for the GTT remapper trick, and the accelerated copyarea never set the FBINFO_HWACCEL_COPYAREA flag, so unused (and could be deleted already I think). No other driver supportes accelerated fbcon. And fbcon is the only user of this accel code (it's not exposed as uapi through ioctls), which means we could garbage collect fairly enormous amounts of code if we kill this. Plus because syzbot only runs on virtual hardware, and none of the drivers for that have acceleration, we'd remove a huge gap in testing. And there's no other even remotely comprehensive testing aside from syzbot. This patch here just disables the acceleration code by always redrawing when scrolling. The plan is that once this has been merged for well over a year in released kernels, we can start to go around and delete a lot of code. v2: - Drop a few more unused local variables, somehow I missed the compiler warnings (Sam) - Fix typo in comment (Jiri) - add a todo entry for the cleanup (Thomas) v3: Remove more unused variables (0day) Reviewed-by: Tomi Valkeinen Reviewed-by: Thomas Zimmermann Reviewed-by: Greg Kroah-Hartman Acked-by: Sam Ravnborg Cc: Jiri Slaby Cc: Bartlomiej Zolnierkiewicz Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Ben Skeggs Cc: nouveau@lists.freedesktop.org Cc: Tomi Valkeinen Cc: Daniel Vetter Cc: Jiri Slaby Cc: "Gustavo A. R. Silva" Cc: Tetsuo Handa Cc: Peilin Ye Cc: George Kennedy Cc: Nathan Chancellor Cc: Peter Rosin Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201029132229.4068359-1-daniel.vetter@ffwll.ch commit 53cde0fe020fd9594820307661e9b9c42821722d Author: Vinod Koul Date: Tue Nov 17 15:26:17 2020 +0530 phy: amlogic: Revert "phy: amlogic: Replace devm_reset_control_array_get()" This reverts commit 3cc8e86721ad ("phy: amlogic: Replace devm_reset_control_array_get()") as it caused build failure drivers/soc/amlogic/meson-ee-pwrc.c: In function 'meson_ee_pwrc_init_domain': drivers/soc/amlogic/meson-ee-pwrc.c:416:65: error: expected ';' before 'if' Reported-by: Stephen Rothwell Signed-off-by: Vinod Koul commit be133722df5168d2f304cc59b80d3d21d6ea9433 Author: Randy Dunlap Date: Mon Nov 16 18:38:07 2020 -0800 thermal: intel_pch_thermal: fix build for ACPI not enabled The reference to acpi_gbl_FADT causes a build error when ACPI is not enabled. Fix by making that conditional on CONFIG_ACPI. ../drivers/thermal/intel/intel_pch_thermal.c: In function 'pch_wpt_suspend': ../drivers/thermal/intel/intel_pch_thermal.c:217:8: error: 'acpi_gbl_FADT' undeclared (first use in this function); did you mean 'acpi_get_type'? if (!(acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0)) ^~~~~~~~~~~~~ Fixes: ef63b043ac86 ("thermal: intel: pch: fix S0ix failure due to PCH temperature above threshold") Signed-off-by: Randy Dunlap Cc: Sumeet Pawnikar Cc: Daniel Lezcano Cc: Zhang Rui Cc: Amit Kucheria Cc: linux-pm@vger.kernel.org Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201117023807.8266-1-rdunlap@infradead.org commit b5269b6664515b4de6fd06e22ca9773530c6fc57 Author: Marek Vasut Date: Thu Oct 8 21:38:00 2020 +0200 ARM: dts: stm32: Add KS8851 on FMC2 to STM32MP1 DHCOM Add bindings for the KS8851 ethernet present on the STM32MP1 DHCOM SoM. Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Maxime Coquelin Cc: Patrice Chotard Cc: Patrick Delaunay Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue commit b0c0c8b400d5047dd0fce13d73cf63f33716641a Author: Marek Vasut Date: Thu Oct 8 21:37:59 2020 +0200 ARM: dts: stm32: Add alternate pinmux for FMC EBI bus Add another mux option for FMC EBI bus, this is used on DHCOM SoM for the second ethernet and on the PDK2 devkit for SRAM. Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Maxime Coquelin Cc: Patrice Chotard Cc: Patrick Delaunay Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue commit 516728273ddfbf51b3d0fcaac05d26e299a7b456 Author: Marek Vasut Date: Thu Oct 8 21:36:18 2020 +0200 ARM: dts: stm32: Connect PHY IRQ line on DH STM32MP1 SoM On the production DHCOM STM32MP15xx SoM, the PHY IRQ line is connected to the PI11 pin. Describe it in the DT as well, so the PHY IRQ can be used e.g. to detect cable insertion and removal. Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Maxime Coquelin Cc: Patrice Chotard Cc: Patrick Delaunay Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue commit 3e1f79e4311248c8b20f3bc988f898b11aa1a887 Author: Hugues Fruchet Date: Thu Oct 8 11:09:42 2020 +0200 ARM: dts: stm32: fix DCMI DMA features on stm32mp15 family Enable FIFO mode with half-full threshold. Signed-off-by: Hugues Fruchet Signed-off-by: Alexandre Torgue commit ba236455ee750270f33998df57f982433cea4d8e Author: Yang Yingliang Date: Tue Nov 17 14:13:50 2020 +0800 video: fbdev: atmel_lcdfb: fix return error code in atmel_lcdfb_of_init() If devm_kzalloc() failed after the first time, atmel_lcdfb_of_init() can't return -ENOMEM, fix this by putting the error code in loop. Fixes: b985172b328a ("video: atmel_lcdfb: add device tree suport") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20201117061350.3453742-1-yangyingliang@huawei.com commit 9463e07df8e0f93931e32c6f415d3f82bda63f35 Author: Hans Verkuil Date: Mon Nov 9 09:47:44 2020 +0100 media: v4l2-compat-ioctl32.c: add missing #ifdef CONFIG_COMPAT_32BIT_TIMEs In two places time32 structures were defined, but they are not used if CONFIG_COMPAT_32BIT_TIME is not set. Put these two structs under #ifdef CONFIG_COMPAT_32BIT_TIME as well to clearly indicate that they are only used if that config option is set. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit dcdff74fa6bc00c32079d0bebd620764c26f2d89 Author: Qinglang Miao Date: Wed Nov 11 04:22:01 2020 +0100 media: solo6x10: fix missing snd_card_free in error handling case Fix to goto snd_error in error handling case when fails to do snd_ctl_add, as done elsewhere in this function. Fixes: 28cae868cd24 ("[media] solo6x10: move out of staging into drivers/media/pci.") Reported-by: Hulk Robot Signed-off-by: Qinglang Miao Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 23ffa0399c693246a7442b98d71265e92e827912 Author: Hans Verkuil Date: Tue Nov 10 09:10:51 2020 +0100 media: saa7134: improve f->fmt.win.clips NULL check Fix this smatch error: saa7134-video.c:1286 saa7134_g_fmt_vid_overlay() error: we previously assumed 'f->fmt.win.clips' could be null (see line 1279) This is actually a false error since if f->fmt.win.clips is NULL, clipcount will be set to 0, so the clips array won't be touched, but it doesn't hurt to make this explicit in the code. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 88c660840c7c78e7a041a88cb33492258b8dae73 Author: Zebediah Figura Date: Tue Nov 10 04:04:03 2020 +0100 media: cx231xx: Use snd_card_free_when_closed() instead of snd_card_free(). cx231xx_close_extension and hence cx231xx_audio_fini() are called with the cx231xx device lock held, but snd_cx231xx_pcm_close() also grabs that mutex when closing the file on behalf of arecord. There seems to be no reason to wait for sound card resources to be released, so let the release be asynchronous. Tested with a Hauppauge 955Q (2040:b123) and Linux 5.9.6; the hang described in the bug no longer occurs and disconnecting the device correctly terminates arecord with ENODEV. Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=204087 Signed-off-by: Zebediah Figura Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cf7f34777a5b4100a3a44ff95f3d949c62892bdd Author: Sakari Ailus Date: Tue Nov 10 00:07:22 2020 +0100 media: vim2m: Register video device after setting up internals Prevent NULL (or close to NULL) pointer dereference in various places by registering the video device only when the V4L2 m2m framework has been set up. Fixes: commit 96d8eab5d0a1 ("V4L/DVB: [v5,2/2] v4l: Add a mem-to-mem videobuf framework test device") Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 273775eea8ad94bfdde3a82b96836e8ec34dbe08 Author: Dikshita Agarwal Date: Tue Nov 3 07:57:37 2020 +0100 media: v4l2-ctrls: allow V4L2_CTRL_TYPE_BUTTON with request api remove check for V4L2_CTRL_TYPE_BUTTON from v4l2_ctrl_request_clone and v4l2_ctrl_request_setup(). Signed-off-by: Dikshita Agarwal Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cf4d4d8ebdb838ee996e09e3ee18deb9a7737dea Author: Jing Xiangfeng Date: Tue Nov 3 20:01:37 2020 +0800 scsi: qla4xxx: Remove redundant assignment to variable rval The variable rval has been initialized with 'QLA_ERROR'. The assignment is redundant in an error path. Remove it. Link: https://lore.kernel.org/r/20201103120137.109717-1-jingxiangfeng@huawei.com Signed-off-by: Jing Xiangfeng Signed-off-by: Martin K. Petersen commit d9fa1e731e243525861517ba256b179072070c1d Author: Stanley Chu Date: Mon Nov 16 14:50:54 2020 +0800 scsi: ufs: ufs-qcom: Use common ADAPT configuration function Use common ADAPT configuration function to reduce duplicated code in UFS drivers. Link: https://lore.kernel.org/r/20201116065054.7658-10-stanley.chu@mediatek.com Reviewed-by: Bean Huo Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit e1e25d1b89967035059cf8e098270cc3300b5bd9 Author: Stanley Chu Date: Mon Nov 16 14:50:53 2020 +0800 scsi: ufs: ufs-mediatek: Use common ADAPT configuration function Use common ADAPT configuration function to reduce duplicated code in UFS drivers. Link: https://lore.kernel.org/r/20201116065054.7658-9-stanley.chu@mediatek.com Reviewed-by: Bean Huo Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit fc85a74e28fe087dceb80eb69f37307ec97b6b47 Author: Stanley Chu Date: Mon Nov 16 14:50:52 2020 +0800 scsi: ufs: Refactor ADAPT configuration function Several vendors are using same code to configure ADAPT settings for HS-G4. Simply refactor it as common function. Link: https://lore.kernel.org/r/20201116065054.7658-8-stanley.chu@mediatek.com Reviewed-by: Bean Huo Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 85d6d3c18953b9653d0934c087fe73ff02e43c79 Author: Stanley Chu Date: Mon Nov 16 14:50:51 2020 +0800 scsi: ufs: ufs-hisi: Use device parameter initialization function Use common device parameter initialization function instead of initializing those parameters by vendor driver itself. Link: https://lore.kernel.org/r/20201116065054.7658-7-stanley.chu@mediatek.com Reviewed-by: Bean Huo Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 5b3573d68d9ac45c904af6d6e9bc415af45ccc41 Author: Stanley Chu Date: Mon Nov 16 14:50:50 2020 +0800 scsi: ufs: ufs-exynos: Use device parameter initialization function Use common device parameter initialization function instead of initializing those parameters by vendor driver itself. Link: https://lore.kernel.org/r/20201116065054.7658-6-stanley.chu@mediatek.com Reviewed-by: Bean Huo Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 8beef54716e652fb08ac6ab45c2ce239ec3f5856 Author: Stanley Chu Date: Mon Nov 16 14:50:49 2020 +0800 scsi: ufs: ufs-qcom: Use device parameter initialization function Use common device parameter initialization function instead of initializing those parameters by vendor driver itself. Link: https://lore.kernel.org/r/20201116065054.7658-5-stanley.chu@mediatek.com Reviewed-by: Bean Huo Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit a4b537ea656e9f48b2cbcd7b8883f21b3fc5cef9 Author: Stanley Chu Date: Mon Nov 16 14:50:48 2020 +0800 scsi: ufs: ufs-mediatek: Use device parameter initialization function Use common device parameter initialization function instead of initializing those parameters by vendor driver itself. Link: https://lore.kernel.org/r/20201116065054.7658-4-stanley.chu@mediatek.com Reviewed-by: Bean Huo Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 65858014ee20c842eaff65514e75d2c640c70007 Author: Stanley Chu Date: Mon Nov 16 14:50:47 2020 +0800 scsi: ufs: Introduce device parameter initialization function Nowadays many vendors initialize their device parameters in their own vendor drivers. The initialization code is almost the same as well as the pre-defined definitions. Introduce a common device parameter initialization function which assign the most common initial values. With this function, we could remove those duplicated codes in vendor drivers. Link: https://lore.kernel.org/r/20201116065054.7658-3-stanley.chu@mediatek.com Reviewed-by: Bean Huo Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 54770cbebe2caa89423a13ff32fa0d497c392214 Author: Stanley Chu Date: Mon Nov 16 14:50:46 2020 +0800 scsi: ufs: ufs-mediatek: Refactor performance scaling functions Refactor performance scaling related functions in MediaTek UFS driver. Link: https://lore.kernel.org/r/20201116065054.7658-2-stanley.chu@mediatek.com Reviewed-by: Bean Huo Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit e6938cc1cb7763a363f62b78147f1f2fb972f49c Author: Helen Koike Date: Fri Nov 6 13:19:37 2020 +0100 media: rockchip: rkisp1: destage Rockchip ISP1 driver All the items in the TODO list were addressed, uapi was reviewed, documentation written, checkpatch errors fixed, several bugs fixed. There is no big reason to keep this driver in staging, so move it out. Dt-bindings Verified with: make ARCH=arm64 dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/media/rockchip-isp1.yaml Fields of MAINTAINERS file sorted according to output of ./scripts/parse-maintainers.pl --input=MAINTAINERS --output=MAINTAINERS --order [dt-bindings: media: rkisp1: move rockchip-isp1 bindings out of staging] [dt-bindings: media: rkisp1: move rockchip-isp1 bindings out of staging] [hverkuil: fix various checkpatch alignment warnings] Signed-off-by: Helen Koike Acked-by: Rob Herring Reviewed-by: Tomasz Figa Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit df22026aebd863745efd753371f46f6ab28a2617 Author: Shunqian Zheng Date: Fri Nov 6 13:19:36 2020 +0100 media: videodev2.h, v4l2-ioctl: add rkisp1 meta buffer format Add the Rockchip ISP1 specific processing parameter format V4L2_META_FMT_RK_ISP1_PARAMS and metadata format V4L2_META_FMT_RK_ISP1_STAT_3A for 3A. Signed-off-by: Shunqian Zheng Signed-off-by: Jacob Chen Signed-off-by: Helen Koike Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9d28a76d406b118df484ef3fd160c02c6cd1d6e7 Author: Helen Koike Date: Sat Nov 7 00:02:36 2020 +0100 media: staging: rkisp1: cap: fix timeout when stopping the stream The dma engine should be stopped first. The driver waits for an interrupt to stop the stream in a known state after a frame. If rkisp1_cap_stream_disable() is called after stopping the rest of the pipeline, then most likely the interrupt won't arrive, we'll get a timeout and debugfs variables mp_stop_timeout or sp_stop_timeout will be incremented. Fixes: 37db540bb9d1f ("media: staging: rkisp1: cap: refactor enable/disable stream to allow multistreaming") Signed-off-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 167faadfcf9339088910e9e85a1b711fcbbef8e9 Author: Dinghao Liu Date: Mon Aug 24 14:27:46 2020 +0200 media: dvbdev: Fix memleak in dvb_register_device When device_create() fails, dvbdev and dvbdevfops should be freed just like when dvb_register_media_device() fails. Signed-off-by: Dinghao Liu Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit ee50d6e60d9a8e110e984cdd9e788d93eff540ba Author: Qinglang Miao Date: Fri Oct 30 02:34:25 2020 +0100 media: usb: dvb-usb-v2: zd1301: fix missing platform_device_unregister() Add the missing platform_device_unregister() before return from zd1301_frontend_attach in the error handling case when pdev->dev.driver is empty. There's an error handling route named err_platform_device_unregister, so just reuse it. Signed-off-by: Qinglang Miao Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 72e637fec558c7842d6f1508f480fd77c20afe3a Author: Dan Carpenter Date: Fri Oct 30 12:52:30 2020 +0100 media: rc: validate that "rc_proto" is reasonable Smatch complains that "rc_proto" comes from the user and it can result in shift wrapping in ir_raw_encode_scancode() drivers/media/rc/rc-ir-raw.c:526 ir_raw_encode_scancode() error: undefined (user controlled) shift '1 << protocol' This is true, but I reviewed the surrounding code and it appears harmless. Anyway, let's verify that "rc_proto" is valid as a kernel hardening measure. Signed-off-by: Dan Carpenter Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 7399139be6b21c7c59323a4fab56cc07cd254529 Author: Mansur Alisha Shaik Date: Thu Sep 24 08:59:46 2020 +0200 media: venus: core: add shutdown callback for venus After the SMMU translation is disabled in the arm-smmu shutdown callback during reboot, if any subsystem are still alive then IOVAs they are using will become PAs on bus, which may lead to crash. So implemented shutdown callback, which detach iommu maps. Signed-off-by: Mansur Alisha Shaik Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit de15e6231e6a3ca58d58d7e2c614a76c940dbb38 Author: Mansur Alisha Shaik Date: Thu Sep 24 08:59:45 2020 +0200 media: venus: handle use after free for iommu_map/iommu_unmap In concurrency usecase and reboot scenario we are seeing muliple crashes related to iommu_map/iommu_unamp of core->fw.iommu_domain. In one case we are seeing "Unable to handle kernel NULL pointer dereference at virtual address 0000000000000008" crash, this is because of core->fw.iommu_domain in venus_firmware_deinit() and trying to map in venus_boot() during venus_sys_error_handler() Call trace: __iommu_map+0x4c/0x348 iommu_map+0x5c/0x70 venus_boot+0x184/0x230 [venus_core] venus_sys_error_handler+0xa0/0x14c [venus_core] process_one_work+0x210/0x3d0 worker_thread+0x248/0x3f4 kthread+0x11c/0x12c ret_from_fork+0x10/0x18 In second case we are seeing "Unable to handle kernel paging request at virtual address 006b6b6b6b6b6b9b" crash, this is because of unmapping iommu domain which is already unmapped. Call trace: venus_remove+0xf8/0x108 [venus_core] venus_core_shutdown+0x1c/0x34 [venus_core] platform_drv_shutdown+0x28/0x34 device_shutdown+0x154/0x1fc kernel_restart_prepare+0x40/0x4c kernel_restart+0x1c/0x64 __arm64_sys_reboot+0x190/0x238 el0_svc_common+0xa4/0x154 el0_svc_compat_handler+0x2c/0x38 el0_svc_compat+0x8/0x10 Signed-off-by: Mansur Alisha Shaik Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 9696960f1347f28bde0ab5aeaafe1fbc8d477206 Author: Mansur Alisha Shaik Date: Thu Sep 24 08:59:44 2020 +0200 media: venus: core: handle race condititon for core ops For core ops we are having only write protect but there is no read protect, because of this in multithreading and concurrency, one CPU core is reading without wait which is causing the NULL pointer dereferece crash. one such scenario is as show below, where in one CPU core, core->ops becoming NULL and in another CPU core calling core->ops->session_init(). CPU: core-7: Call trace: hfi_session_init+0x180/0x1dc [venus_core] vdec_queue_setup+0x9c/0x364 [venus_dec] vb2_core_reqbufs+0x1e4/0x368 [videobuf2_common] vb2_reqbufs+0x4c/0x64 [videobuf2_v4l2] v4l2_m2m_reqbufs+0x50/0x84 [v4l2_mem2mem] v4l2_m2m_ioctl_reqbufs+0x2c/0x38 [v4l2_mem2mem] v4l_reqbufs+0x4c/0x5c __video_do_ioctl+0x2b0/0x39c CPU: core-0: Call trace: venus_shutdown+0x98/0xfc [venus_core] venus_sys_error_handler+0x64/0x148 [venus_core] process_one_work+0x210/0x3d0 worker_thread+0x248/0x3f4 kthread+0x11c/0x12c Signed-off-by: Mansur Alisha Shaik Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit b57cf6a0a8894d5e89848e15e8f5e4cf36124aeb Author: Mansur Alisha Shaik Date: Mon Nov 2 11:31:37 2020 +0100 media: venus: fix calculating mbps in calculate_inst_freq() Currently in calculate_inst_freq(), video driver is calculating macro blocks per frame instead of macro blocks per second(mpbs). Which results frequency is always setting to lower frequency (150MHz) as per frequency table for sc7180. Hence the playback is not smooth. Corrected this by correcting the mbps calculation in calculate_inst_freq(). Signed-off-by: Mansur Alisha Shaik Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit eff5ce02e170125936c43ca96c7dc701a86681ed Author: Mansur Alisha Shaik Date: Mon Oct 19 06:18:14 2020 +0200 media: venus: put dummy vote on video-mem path after last session release As per current implementation, video driver is unvoting "videom-mem" path for last video session during vdec_session_release(). While video playback when we try to suspend device, we see video clock warnings since votes are already removed during vdec_session_release(). corrected this by putting dummy vote on "video-mem" after last video session release and unvoting it during suspend. suspend") Fixes: 07f8f22a33a9e ("media: venus: core: remove CNOC voting while device Signed-off-by: Mansur Alisha Shaik Reviewed-by: Stephen Boyd Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 983f761cd5c5741f228c7b5dc437678899e3a64c Author: James Smart Date: Sun Nov 15 11:26:46 2020 -0800 scsi: lpfc: Update changed file copyrights for 2020 Update Copyright in files changed by the 12.8.0.6 patch set to 2020 Link: https://lore.kernel.org/r/20201115192646.12977-18-james.smart@broadcom.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit ab4dfa4dd5a121681e06b791f9a5dc81afa5e192 Author: James Smart Date: Sun Nov 15 11:26:45 2020 -0800 scsi: lpfc: Update lpfc version to 12.8.0.6 Update lpfc version to 12.8.0.6 Link: https://lore.kernel.org/r/20201115192646.12977-17-james.smart@broadcom.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit db7531d2b3775c662466e4eeda774986472c6d18 Author: James Smart Date: Sun Nov 15 11:26:44 2020 -0800 scsi: lpfc: Convert abort handling to SLI-3 and SLI-4 handlers This patch reworks the abort interfaces such that SLI-3 retains the iocb-based formatting and completions and SLI-4 now uses native WQEs and completion routines. The following changes are made: - The code is refactored from a confusing 2 routine sequence of xx_abort_iotag_issue(), which creates/formats and abort cmd, and xx_issue_abort_tag(), which then issues and handles the completion of the abort cmd - into a single interface of xx_issue_abort_iotag(). The new interface will determine whether SLI-3 or SLI-4 and then call the appropriate handler. A completion handler can now be specified to address the differences in completion handling. Note: original code is all iocb based, with SLI-4 converting to SLI-3 for the SCSI/ELS path, and NVMe natively using wqes. - The SLI-3 side is refactored: The older iocb-base lpfc_sli_issue_abort_iotag() routine is combined with the logic of lpfc_sli_abort_iotag_issue() as well as the iocb-specific code in lpfc_abort_handler() and lpfc_sli_abort_iocb() to create the new single SLI-3 abort routine that formats and issues the iocb. - The SLI-4 side is refactored and added to: The native WQE abort code in NVMe is moved to the new SLI-4 issue_abort_iotag() routine. Items in SCSI that set fields not set by NVMe is migrated into the new routine. Thus the routine supports NVMe and SCSI initiators. The nvmet block (target) formats the abort slightly different (like the old NVMe initiator) thus it has its own prep routine stolen from NVMe initiator and it retains the current code it has for issuing the WQE (does not use the commonized routine the initiators do). SLI-4 completion handlers were also added. - lpfc_abort_handler now becomes a wrapper that determines whether SLI-3 or SLI-4 and calls the proper abort handler. Link: https://lore.kernel.org/r/20201115192646.12977-16-james.smart@broadcom.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 96e209be6ecb7b96dfb56f2737401adce33aef8e Author: James Smart Date: Sun Nov 15 11:26:43 2020 -0800 scsi: lpfc: Convert SCSI I/O completions to SLI-3 and SLI-4 handlers The current driver implementation uses SLI-4 WQE to iocb conversion before calling the cmpl callback function. Rework the FCP I/O completion path to utilize the SLI-4 WQE. This patch converts the SCSI I/O completion paths from the iocb-centric interfaces to the routines are native for whether I/Os are iocb-based (SLI-3) or WQE-based (SLI-4). Most existing routines were iocb-based, so this creates a lot of SLI-4 specific routines to provide the functionality. Link: https://lore.kernel.org/r/20201115192646.12977-15-james.smart@broadcom.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit da255e2e7cc889e10820bc89752466322426571f Author: James Smart Date: Sun Nov 15 11:26:42 2020 -0800 scsi: lpfc: Convert SCSI path to use common I/O submission path This patch converts the SCSI I/O path from the iocb-centric interfaces to the common I/O submission path which supports native SLI-4 WQEs. A wrapper routine is put in place to distinguish SLI-3 from SLI. If SLI-3, the same iocb-centric paths are used, perhaps with refactored code that is explicitly for SLI-3. For SLI-4, any iocb-related formatting is replaced by wqe-based formatting, although much of that is addressed by the common wqe templates in the SLI-4 path. Link: https://lore.kernel.org/r/20201115192646.12977-14-james.smart@broadcom.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 47ff4c510f029360667eb4a61506ef9bfba5581d Author: James Smart Date: Sun Nov 15 11:26:41 2020 -0800 scsi: lpfc: Enable common send_io interface for SCSI and NVMe To set up common use by the SCSI and NVMe I/O paths, create a new routine that issues FCP I/O commands which can be used by either protocol. The new routine addresses SLI-3 vs SLI-4 differences within its implementation. Replace the (SLI-3 centric) iocb routine in the SCSI path with this new WQE-centric common routine. Link: https://lore.kernel.org/r/20201115192646.12977-13-james.smart@broadcom.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 840a470181c72f82f8bc9453b47ac0d2e79f6b4a Author: James Smart Date: Sun Nov 15 11:26:40 2020 -0800 scsi: lpfc: Enable common wqe_template support for both SCSI and NVMe The driver is currently using SLI-4 WQE templates only for NVMe. Refactor the template and the placement of the service routine so that it can be used by both SCSI and NVMe. Link: https://lore.kernel.org/r/20201115192646.12977-12-james.smart@broadcom.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit b101eb27fde072866c6f5bdbcc2c28a6bf2c9bf7 Author: James Smart Date: Sun Nov 15 11:26:39 2020 -0800 scsi: lpfc: Refactor WQE structure definitions for common use In preparation of reworking the driver to use a native SLI-4 WQE interface for the SCSI and NVMe I/O paths, start by commonizing the WQE exchange type and command type attributes. While adjusting these options also noted the variance in the pbde field. Fix this by setting templates to 0 and in NVMe, which explicitly uses this option, setting the value. Link: https://lore.kernel.org/r/20201115192646.12977-11-james.smart@broadcom.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit a70e63eee1c14257f73ce9ec6d0c9db28f77f9ad Author: James Smart Date: Sun Nov 15 11:26:38 2020 -0800 scsi: lpfc: Fix NPIV Fabric Node reference counting While testing initiator-side cable swaps with NPIV, oops occur. The reference counts for the Fabric nodes on the NPIV vports isn't balanced, resulting in premature node removal. The following fixes were made: - Removed the FC_LBIT check in lpfc_linkup_port. This removed the special case for vports that didn't have them clean up just like the physical port. - Removed the unreg_rpi call in lpfc_cleanup_node. In this section, the node is being removed in the context of a reference count release and a mailbox command can't be issued at this point. - Remove special case handling in the default mailbox completion handler that allowed the skipping of a node reference. Now, reference counting always requires the removal of the reference. - Move the location of the DEVICE_RM event is done during LOGO handling as the driver has additional work to do on the ndlp before puts/releases can be performed. Link: https://lore.kernel.org/r/20201115192646.12977-10-james.smart@broadcom.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit b3f2e67cc2dd59fffeffd35b1526a081bbec9490 Author: James Smart Date: Sun Nov 15 11:26:37 2020 -0800 scsi: lpfc: Fix NPIV discovery and Fabric Node detection While testing NPIV and link bounces, the vport would not show a fabric node for the F_Port, would not transition into NPR state during a link fault, or leave the FDMI node untouched during error injection. Cause for this was determined to be an inconsistent manner in which F_Port, Nameserver, and FDMI controller nodes were created and linked. In some cases, the nodes would never be unregistered from the transport, leaving references active. In other cases, the fabric nodes may register with the transport multiple times while still registered. The following changes were made: - Fix the FDISC issue routine, which starts vport (re)creation, to mark the F_Port as a fabric node (NLP_FABRIC) and allow the F_Port node to fully be created and show up in the node list. - When remote ports are cleaned up on vport termination, cleanup the nameserver and FDMI controller nodes on the vport so they unregister from the transport. - On link bounces, don't exclude the NPIV Fabric remote ports from transitioning to the NPR state, allowing them to avoid re-registration if already registered. Link: https://lore.kernel.org/r/20201115192646.12977-9-james.smart@broadcom.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 9d76d46751594264a91387583fef49af334ccea6 Author: James Smart Date: Sun Nov 15 11:26:36 2020 -0800 scsi: lpfc: Unsolicited ELS leaves node in incorrect state while dropping it When a target swap happens, under certain conditions the node sends a LOGO. The unsolicited ELS logic responds with a reject. The logic may allocate a new node to handle this. Afterward, the new nodes are dropped incorrectly leaving them in a mis-matched state and refcounting causes a use-after-free situation leading to a crash. It is also possible that the unsolicited els handling finds a node which is in an UNUSED state. The handling moves these nodes to NPR state with a refcount of 1. Although the end of the discovery logic assumes a final put will free such a node, there are codes paths which could increment the reference count, thus the node is in NPR state and not released. Eventually this mismatch in state and refcount leads to premature release of the node causing a crash. Fix by always using the discovery engine DEVICE RM event to decrement and release the nodes (rather than explicit code that tried to do it before). This will take care of moving the node to the UNUSED state and then removes the final ref count. If there is a trigger to reuse this node, the transition from the UNUSED state clearly indicates that the initial reference is then incremented and use can continue. Link: https://lore.kernel.org/r/20201115192646.12977-8-james.smart@broadcom.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 52edb2caf675684acf2140a125de4774c691fecd Author: James Smart Date: Sun Nov 15 11:26:35 2020 -0800 scsi: lpfc: Remove ndlp when a PLOGI/ADISC/PRLI/REG_RPI ultimately fails When a PLOGI/ADISC/PRLI/REG_RPI fails, the node remains in the nodelist in that state. Although the driver now frees a node when the ref count goes to zero, in this case the ref cnt doesn't reach zero because there isn't a mechanism to release the final reference. Discovery just stops. Fix by calling the node discovery state machine DEVICE_RM event whenever one of these commands fail. This will remove the final reference count and trigger node release. Link: https://lore.kernel.org/r/20201115192646.12977-7-james.smart@broadcom.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit c6adba150191762a7e58644f9e522d9d6d945e1c Author: James Smart Date: Sun Nov 15 11:26:34 2020 -0800 scsi: lpfc: Rework remote port lock handling Currently the discovery layers within the driver use the SCSI midlayer host_lock to access node-specific structures. This can contend with the I/O path and is too coarse of a lock. Rework the driver so that it uses a lock specific to the remote port node structure when accessing the structure contents. A few of the changes brought out spots were some slightly reorganized routines worked better. Link: https://lore.kernel.org/r/20201115192646.12977-6-james.smart@broadcom.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit e9b1108316b9b5beee03f731c7c9c7c874e537fa Author: James Smart Date: Sun Nov 15 11:26:33 2020 -0800 scsi: lpfc: Fix refcounting around SCSI and NVMe transport APIs Due to bug history and code review, the node reference counting approach in the driver isn't implemented consistently with how the scsi and nvme transport perform registrations and unregistrations and their callbacks. This resulted in many bad/stale node pointers. Reword the driver so that reference handling is performed as follows: - The initial node reference is taken on structure allocation - Take a reference on any add/register call to the transport - Remove a reference on any delete/unregister call to the transport - After the node has fully removed from both the SCSI and NVMEe transports (dev_loss_callbacks have called back) call the discovery engine DEVICE_RM event which will remove the final reference and release the node structure. - Alter dev_loss handling when a vport or base port is unloading. - Remove the put_node handling - no longer needed. - Rewrite the vport_delete handling on reference counts. Part of this effort was driven from the FDISC not registering with the transport and disrupting the model for node reference counting. - Deleted lpfc_nlp_remove. Pushed it's remaining ops into lpfc_nlp_release. - Several other small code cleanups. Link: https://lore.kernel.org/r/20201115192646.12977-5-james.smart@broadcom.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 95f0ef8a8368b2195ca9b8b4eca9a3ec8d132a75 Author: James Smart Date: Sun Nov 15 11:26:32 2020 -0800 scsi: lpfc: Fix removal of SCSI transport device get and put on dev structure The lpfc driver is calling get_device and put_device on scsi_fc_transport device structure. When this code was removed, the driver triggered an oops in "scsi_is_host_dev" when the first SCSI target was unregistered from the transport. The reason the calls were necessary is that the driver is calling scsi_remove_host too early, before the target rports are unregistered and the scsi devices disconnected from the scsi_host. The fc_host was torn down during fc_remove_host. Fix by moving the lpfc_pci_remove_one_s3/s4 calls to scsi_remove_host to after the nodes are cleaned up. Remove the get_device and put_device calls and the supporting code. Link: https://lore.kernel.org/r/20201115192646.12977-4-james.smart@broadcom.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 4430f7fd09ecb037570119e0aacbf0c17b8f98b2 Author: James Smart Date: Sun Nov 15 11:26:31 2020 -0800 scsi: lpfc: Rework locations of ndlp reference taking Now that the driver has gone to a normal ref interface (with no odd logic) the discovery logic needs to be updated to reworked so that it properly takes references when it should and give them up when it should. Rework the driver for the following get/put model: - Move gets to just before an I/O is issued. Add gets for places where an I/O was issued without one. - Ensure that failures from lpfc_nlp_get() are handled by the driver. - Check and fix the placement of lpfc_nlp_puts relative to io completions. Note: some of these paths may not release the reference on the exact io completion as the reference is held as the code takes another step in the discovery thread and which may cause another io to be issued. - Rearrange some code for error processing and calling lpfc_nlp_put. - Fix some places of incorrect reference freeing that was causing the premature releasing of the structure. - Nvmet plogi handling performs unreg_rpi's. The reference counts were unbalanced resulting in premature node removal. In some cases this caused loss of node discovery. Corrected the reftaking around nvmet plogis. Nodes that experience devloss now get released from the node list now that there is a proper reference taking. Link: https://lore.kernel.org/r/20201115192646.12977-3-james.smart@broadcom.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 307e338097dc320afb9f62493a325c7b9208d574 Author: James Smart Date: Sun Nov 15 11:26:30 2020 -0800 scsi: lpfc: Rework remote port ref counting and node freeing When a remote port is disconnected and disappears, its node structure (ndlp) stays allocated and on a vport node list. While on the list it can be matched, thus requires validation checks on state to be added in numerous code paths. If the node comes back, its possible for there to be multiple node structures for the same device on the vport node list. There is no reason to keep the node structure around after it is no longer in existence, and the current implementation creates problems for itself (multiple nodes) and lots of unnecessary code for state validation. Additionally, the reference taking on the node structure didn't follow the normal model used by the kernel kref api. It included lots of odd logic to match state with reference count. The combination of this odd logic plus the way it was implicitly used in the discovery engine made its reference taking implementation suspect and extremely hard to follow. Change the driver such that the reference taking routines are now normal ref increments/decrements and callout on refcount=0. With this in place, the rework can be done such that the node structure is fully removed and deallocated when the remote port no longer exists and all references are removed. This removal logic, and the basic ref counting are intrically tied, thus in a single patch. Link: https://lore.kernel.org/r/20201115192646.12977-2-james.smart@broadcom.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit de91e631bdc7e6411989e1a9ab65501a31527e0b Author: Alan Maguire Date: Sun Nov 15 10:46:35 2020 +0000 libbpf: bpf__find_by_name[_kind] should use btf__get_nr_types() When operating on split BTF, btf__find_by_name[_kind] will not iterate over all types since they use btf->nr_types to show the number of types to iterate over. For split BTF this is the number of types _on top of base BTF_, so it will underestimate the number of types to iterate over, especially for vmlinux + module BTF, where the latter is much smaller. Use btf__get_nr_types() instead. Fixes: ba451366bf44 ("libbpf: Implement basic split BTF support") Signed-off-by: Alan Maguire Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/1605437195-2175-1-git-send-email-alan.maguire@oracle.com commit 4ab2990a5ce15e6a689f349ba6ab1e6e23df57df Author: Zou Wei Date: Sat Nov 14 15:37:54 2020 +0800 scsi: be2iscsi: Mark beiscsi_attrs with static keyword Fix the following sparse warning: ./be_main.c:167:25: warning: symbol 'beiscsi_attrs' was not declared. Should it be static? Link: https://lore.kernel.org/r/1605339474-22329-1-git-send-email-zou_wei@huawei.com Signed-off-by: Zou Wei Signed-off-by: Martin K. Petersen commit 6ac63216a7af03e8281758d7cd32a09718531eb2 Author: Eric Biggers Date: Fri Nov 13 16:47:54 2020 -0800 scsi: ufs-qcom: Only select QCOM_SCM if SCSI_UFS_CRYPTO QCOM_SCM is only needed to make the qcom_scm_*() calls in ufs-qcom-ice.c, which is only compiled when SCSI_UFS_CRYPTO=y. So don't unnecessarily enable QCOM_SCM when SCSI_UFS_CRYPTO=n. Link: https://lore.kernel.org/r/20201114004754.235378-1-ebiggers@kernel.org Signed-off-by: Eric Biggers Signed-off-by: Martin K. Petersen commit 1fc6591951308c9923311913811717d46400100d Author: Lee Jones Date: Thu Nov 12 10:19:29 2020 +0000 scsi: hpsa: Strip out a bunch of set but unused variables Fixes the following W=1 kernel build warning(s): drivers/scsi/hpsa.c: In function ‘hpsa_volume_offline’: drivers/scsi/hpsa.c:3885:5: warning: variable ‘scsi_status’ set but not used [-Wunused-but-set-variable] drivers/scsi/hpsa.c:3884:6: warning: variable ‘cmd_status’ set but not used [-Wunused-but-set-variable] drivers/scsi/hpsa.c: In function ‘hpsa_update_scsi_devices’: drivers/scsi/hpsa.c:4354:9: warning: variable ‘n_ext_target_devs’ set but not used [-Wunused-but-set-variable] drivers/scsi/hpsa.c: In function ‘hpsa_scatter_gather’: drivers/scsi/hpsa.c:4583:36: warning: variable ‘last_sg’ set but not used [-Wunused-but-set-variable] drivers/scsi/hpsa.c: In function ‘hpsa_init_one’: drivers/scsi/hpsa.c:8639:6: warning: variable ‘dac’ set but not used [-Wunused-but-set-variable] drivers/scsi/hpsa.c: In function ‘hpsa_enter_performant_mode’: drivers/scsi/hpsa.c:9300:7: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable] Link: https://lore.kernel.org/r/20201112101929.GC1997862@dell Cc: Don Brace Cc: Bugfixes to Cc: storagedev@microchip.com Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 6081b12ceb7d6e58346ce359282cdc1ed8282b76 Author: Stanley Chu Date: Thu Nov 12 13:45:37 2020 +0800 scsi: ufs: Add retry flow for failed HBA enabling Once HBA enabling has failed, add retry mechanism and allow vendors to apply specific tweaks before the next retry. For example, vendors can do vendor-specific host reset flow in variant function "ufshcd_vops_hce_enable_notify()". Link: https://lore.kernel.org/r/20201112054537.22494-1-stanley.chu@mediatek.com Reviewed-by: Can Guo Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 5443bdc4cc777f3629f02e934fef418e9d921809 Author: Don Brace Date: Wed Nov 11 14:24:50 2020 -0600 scsi: smartpqi: Update version to 1.2.16-012 Link: https://lore.kernel.org/r/160512629093.2359.13675060282143622110.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Gerry Morong Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 408bdd7e5845d8f3e0dac0dcc18f358835175801 Author: Don Brace Date: Wed Nov 11 14:24:45 2020 -0600 scsi: smartpqi: Correct pqi_sas_smp_handler busy condition Remove unbalanced call to pqi_ctrl_unbusy. Link: https://lore.kernel.org/r/160512628513.2359.17193493825283879603.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 1bdf6e9343877030640336d93da08321719bca43 Author: Don Brace Date: Wed Nov 11 14:24:39 2020 -0600 scsi: smartpqi: Correct driver removal with HBA disks Correct rmmod hangs when using HBA disks with write cache enabled. Do not set controller flag "in_shutdown" during rmmod. SCSI SYNCHRONIZE CACHE(10) and SCSI SYNCHRONIZE CACHE(16) requests were blocked with SCSI_MLQUEUE_HOST_BUSY. Link: https://lore.kernel.org/r/160512627928.2359.10698615071827614781.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit a364a3ea32da6de55a9a7c75db311bd908fcfbb4 Author: Lee Jones Date: Mon Nov 16 10:41:19 2020 +0000 scsi: pm8001: Remove unused variable 'value' Hasn't been used since 2009. Fixes the following W=1 kernel build warning(s): drivers/scsi/pm8001/pm8001_hwi.c: In function ‘mpi_set_phys_g3_with_ssc’: drivers/scsi/pm8001/pm8001_hwi.c:415:6: warning: variable ‘value’ set but not used [-Wunused-but-set-variable] Link: https://lore.kernel.org/r/20201116104119.816527-1-lee.jones@linaro.org Cc: Jack Wang Acked-by: Jack Wang Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 883928201b00928df0b2000be37ee7a8e975be26 Author: Nick Desaulniers Date: Sat Nov 7 00:11:32 2020 -0800 scsi: core: Fix -Wformat for scsi_host Clang is more aggressive about -Wformat warnings when the format flag specifies a type smaller than the parameter. Turns out, struct Scsi_Host's member can_queue is actually an int. Fixes: [-Wformat] shost_rd_attr(can_queue, "%hd\n"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %d Link: https://github.com/ClangBuiltLinux/linux/issues/378 Link: https://lore.kernel.org/r/20201107081132.2629071-1-ndesaulniers@google.com Reviewed-by: Nathan Chancellor Signed-off-by: Nick Desaulniers Signed-off-by: Martin K. Petersen warning: format specifies type 'short' but the argument has type 'int' commit 16d6317ea438b10c5747f5d4a972ea0e68d1a6ae Author: Martin Wilck Date: Thu Oct 29 18:08:46 2020 +0100 scsi: core: Replace while-loop by for-loop in scsi_vpd_lun_id() This makes the code slightly more readable. Link: https://lore.kernel.org/r/20201029170846.14786-2-mwilck@suse.com Reviewed-by: Hannes Reinecke Signed-off-by: Martin Wilck Signed-off-by: Martin K. Petersen commit 2e4209b3806cda9b89c30fd5e7bfecb7044ec78b Author: Martin Wilck Date: Thu Oct 29 18:08:45 2020 +0100 scsi: core: Fix VPD LUN ID designator priorities The current implementation of scsi_vpd_lun_id() uses the designator length as an implicit measure of priority. This works most of the time, but not always. For example, some Hitachi storage arrays return this in VPD 0x83: VPD INQUIRY: Device Identification page Designation descriptor number 1, descriptor length: 24 designator_type: T10 vendor identification, code_set: ASCII associated with the Addressed logical unit vendor id: HITACHI vendor specific: 5030C3502025 Designation descriptor number 2, descriptor length: 6 designator_type: vendor specific [0x0], code_set: Binary associated with the Target port vendor specific: 08 03 Designation descriptor number 3, descriptor length: 20 designator_type: NAA, code_set: Binary associated with the Addressed logical unit NAA 6, IEEE Company_id: 0x60e8 Vendor Specific Identifier: 0x7c35000 Vendor Specific Identifier Extension: 0x30c35000002025 [0x60060e8007c350000030c35000002025] The current code would use the first descriptor because it's longer than the NAA descriptor. But this is wrong, the kernel is supposed to prefer NAA descriptors over T10 vendor ID. Designator length should only be used to compare designators of the same type. This patch addresses the issue by separating designator priority and length. Link: https://lore.kernel.org/r/20201029170846.14786-1-mwilck@suse.com Fixes: 9983bed3907c ("scsi: Add scsi_vpd_lun_id()") Reviewed-by: Hannes Reinecke Signed-off-by: Martin Wilck Signed-off-by: Martin K. Petersen commit e42b650f828d275840ab6403289249b8029e99e6 Author: Tomer Maimon Date: Tue Sep 29 16:18:07 2020 +0300 ARM: dts: nuvoton: Add new device nodes to NPCM750 EVB Add the following new device nodes to NPCM750 evolution board device tree: - NPCM7xx Pin controller and GPIO - NPCM7xx PWM and FAN - NPCM7xx EHCI USB - NPCM7xx KCS - NPCM Reset - NPCM Peripheral SPI - NPCM FIU SPI - NPCM HWRNG - NPCM I2C - STMicro STMMAC Signed-off-by: Tomer Maimon Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20200929131807.15378-6-tmaimon77@gmail.com Signed-off-by: Joel Stanley commit 77c72b33f0b3bfc1609d7ad8d20980ba7854e955 Author: Tomer Maimon Date: Tue Sep 29 16:18:06 2020 +0300 ARM: dts: nuvoton: Add new device nodes Add the following new device nodes to NPCM7XX: - NPCM7xx PWM and FAN. - NPCM7xx EHCI USB. - NPCM7xx KCS. - NPCM Reset. - NPCM Peripheral SPI. - NPCM FIU SPI. - NPCM HWRNG. - NPCM I2C. - STMicro STMMAC. Signed-off-by: Tomer Maimon Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20200929131807.15378-5-tmaimon77@gmail.com Signed-off-by: Joel Stanley commit 0153c82b12233012b219b03f911aa242f5fe1e2c Author: Tomer Maimon Date: Tue Sep 29 16:18:05 2020 +0300 ARM: dts: nuvoton: Add pinctrl and GPIO node Add pin controller and GPIO node to NPCM7XX device tree. Signed-off-by: Tomer Maimon Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20200929131807.15378-4-tmaimon77@gmail.com Signed-off-by: Joel Stanley commit 7a28a9957ce7b4ed5cc30560034f54039cd56ed8 Author: Tomer Maimon Date: Tue Sep 29 16:18:04 2020 +0300 ARM: dts: nuvoton: Modify timer register size Modify NPCM7xx device tree timer register size from 0x50 to 0x1C to control only the timer registers and not other hw modules. Signed-off-by: Tomer Maimon Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20200929131807.15378-3-tmaimon77@gmail.com Signed-off-by: Joel Stanley commit 3e50523fe6f4b0ade2e8e0a1428e23b7503fb85c Author: Tomer Maimon Date: Tue Sep 29 16:18:03 2020 +0300 ARM: dts: nuvoton: Modify clock parameters Modify NPCM7xx device tree clock parameter to clock constants that define at include/dt-bindings/clock/nuvoton,npcm7xx-clock.h file. Signed-off-by: Tomer Maimon Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20200929131807.15378-2-tmaimon77@gmail.com Signed-off-by: Joel Stanley commit 9b0072e2b2b588ad75c94f2c6e6c52c8f4bd2657 Author: Alex Shi Date: Sun Nov 8 14:45:42 2020 +0800 security/smack: remove unused varible 'rc' This varible isn't used and can be removed to avoid a gcc warning: security/smack/smack_lsm.c:3873:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable] Signed-off-by: Alex Shi Cc: Casey Schaufler Cc: James Morris Cc: "Serge E. Hallyn" Cc: linux-security-module@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Casey Schaufler commit b93ef089d35c3386dd197e85afb6399bbd54cfb3 Author: Martin KaFai Lau Date: Mon Nov 16 12:01:13 2020 -0800 bpf: Fix the irq and nmi check in bpf_sk_storage for tracing usage The intention of the current check is to avoid using bpf_sk_storage in irq and nmi. Jakub pointed out that the current check cannot do that. For example, in_serving_softirq() returns true if the softirq handling is interrupted by hard irq. Fixes: 8e4597c627fb ("bpf: Allow using bpf_sk_storage in FENTRY/FEXIT/RAW_TP") Suggested-by: Jakub Kicinski Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201116200113.2868539-1-kafai@fb.com commit d73cf07a094fef0ecee57be72f3e1ed5d0560c78 Merge: 1241f07875781 f32cce8483f18 Author: Mark Brown Date: Mon Nov 16 23:28:16 2020 +0000 Merge series "add axi clock control for MT8192 spi-nor" from Bayi Cheng : bayi cheng (1): spi: spi-mtk-nor: add axi clock control for MT8192 spi-nor drivers/spi/spi-mtk-nor.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) -- 1.9.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel commit 4fb87241e5192caf9226fd4ca96ce2fd861503c1 Merge: 47f667afe7161 3d32489838bbf Author: Mark Brown Date: Mon Nov 16 23:28:03 2020 +0000 Merge series "ASoC: Intel: catpt: Offload fixes and code optimization" from Cezary Rojewski : First two of the series address bugs connected mainly to offload streams: - scenarios with very low buffer sizes: RESET_STREAM IPC timeouts - fix lp clock selection when switching between PAUSE <-> RESUME states: glitches on first offload when no additional stream is opened simultaneously Follow ups are: code reduction and optimization oriented patches. This has been foretold in: [PATCH v10 00/14] ASoC: Intel: Catpt - Lynx and Wildcat point https://www.spinics.net/lists/alsa-devel/msg116440.html Note: LPT power up/down sequences might get aligned with WPT once enough testing is done as capabilities are shared for both DSPs. First, optimize applying of user settings - prevent redundand calls from happening - and then as mentioned above, streamline power on/off sequence for LPT and WPT. Cezary Rojewski (5): ASoC: Intel: catpt: Skip position update for unprepared streams ASoC: Intel: catpt: Correct clock selection for dai trigger ASoC: Intel: catpt: Optimize applying user settings ASoC: Intel: catpt: Streamline power routines across LPT and WPT ASoC: Intel: catpt: Cleanup after power routines streamlining sound/soc/intel/catpt/core.h | 10 ++- sound/soc/intel/catpt/device.c | 18 +++--- sound/soc/intel/catpt/dsp.c | 56 ++-------------- sound/soc/intel/catpt/pcm.c | 113 ++++++++++++++++----------------- 4 files changed, 74 insertions(+), 123 deletions(-) -- 2.17.1 base-commit: 3650b228f83adda7e5ee532e2b90429c03f7b9ec commit 47f667afe716113ace014691bfdc134ce9045d18 Merge: 60a973862f3c4 25d27c4f68d20 Author: Mark Brown Date: Mon Nov 16 23:23:48 2020 +0000 Merge series "ASoC: pcm512x: Patch series to set fmt from `set_fmt()`" from Kirill Marinushkin : Set format from `set_fmt()` func instead of `hw_params()`, plus supportive commits Kirill Marinushkin (4): ASoC: pcm512x: Fix not setting word length if DAIFMT_CBS_CFS ASoC: pcm512x: Rearrange operations in `hw_params()` ASoC: pcm512x: Move format check into `set_fmt()` ASoC: pcm512x: Add support for more data formats sound/soc/codecs/pcm512x.c | 134 ++++++++++++++++++++++++++++----------------- 1 file changed, 84 insertions(+), 50 deletions(-) -- 2.13.6 commit bb2585c406dccccaa2a3907f6dbfd6794867ea77 Author: Lee Jones Date: Mon Nov 16 17:40:31 2020 +0000 drm/amd/amdgpu/atombios_encoders: Remove set but unused variable 'backlight_level' Also removing the call to amdgpu_atombios_encoder_get_backlight_level_from_reg() since, according to Alex Deucher, "We call it again below indirectly". Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/atombios_encoders.c: In function ‘amdgpu_atombios_encoder_init_backlight’: drivers/gpu/drm/amd/amdgpu/atombios_encoders.c:174:5: warning: variable ‘backlight_level’ set but not used [-Wunused-but-set-variable] Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Luben Tuikov Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 4138b62b8a799cc3d1cb0ec2b443a1c42369f4dd Author: Lee Jones Date: Mon Nov 16 17:37:00 2020 +0000 drm/radeon/radeon_drv: Move 'radeon_gem_prime_import_sg_table()'s prototype to shared header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_prime.c:43:24: warning: no previous prototype for ‘radeon_gem_prime_import_sg_table’ [-Wmissing-prototypes] 43 | struct drm_gem_object *radeon_gem_prime_import_sg_table(struct drm_device *dev, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Gareth Hughes Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 312226f979958ff864617831021103a563e71966 Author: Lee Jones Date: Mon Nov 16 17:36:59 2020 +0000 drm/radeon/radeon_audio: Move 'r600_*' prototypes into shared header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/r600_hdmi.c:177:6: warning: no previous prototype for ‘r600_hdmi_update_acr’ [-Wmissing-prototypes] 177 | void r600_hdmi_update_acr(struct drm_encoder *encoder, long offset, | ^~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/r600_hdmi.c:217:6: warning: no previous prototype for ‘r600_set_avi_packet’ [-Wmissing-prototypes] 217 | void r600_set_avi_packet(struct radeon_device *rdev, u32 offset, | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/r600_hdmi.c:314:6: warning: no previous prototype for ‘r600_hdmi_audio_set_dto’ [-Wmissing-prototypes] 314 | void r600_hdmi_audio_set_dto(struct radeon_device *rdev, | ^~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/r600_hdmi.c:340:6: warning: no previous prototype for ‘r600_set_vbi_packet’ [-Wmissing-prototypes] 340 | void r600_set_vbi_packet(struct drm_encoder *encoder, u32 offset) | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/r600_hdmi.c:351:6: warning: no previous prototype for ‘r600_set_audio_packet’ [-Wmissing-prototypes] 351 | void r600_set_audio_packet(struct drm_encoder *encoder, u32 offset) | ^~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/r600_hdmi.c:393:6: warning: no previous prototype for ‘r600_set_mute’ [-Wmissing-prototypes] 393 | void r600_set_mute(struct drm_encoder *encoder, u32 offset, bool mute) | ^~~~~~~~~~~~~ drivers/gpu/drm/radeon/r600_hdmi.c:469:6: warning: no previous prototype for ‘r600_hdmi_enable’ [-Wmissing-prototypes] 469 | void r600_hdmi_enable(struct drm_encoder *encoder, bool enable) | ^~~~~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit f9eddd7ccf5be14042b7aff2bf80509fa20f853f Author: Lee Jones Date: Mon Nov 16 17:36:58 2020 +0000 drm/radeon/evergreen_cs: Move 'r600_dma_cs_next_reloc()'s prototype to shared header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/r600_cs.c:2343:5: warning: no previous prototype for ‘r600_dma_cs_next_reloc’ [-Wmissing-prototypes] 2343 | int r600_dma_cs_next_reloc(struct radeon_cs_parser *p, | ^~~~~~~~~~~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit b970fc6d1ff46fb73e35a0431a1d2336e3c7a3d6 Author: Lee Jones Date: Mon Nov 16 17:36:57 2020 +0000 drm/radeon/cik: Move 'vce_v2_0_enable_mgcg()'s prototype to shared header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/vce_v2_0.c:111:6: warning: no previous prototype for ‘vce_v2_0_enable_mgcg’ [-Wmissing-prototypes] 111 | void vce_v2_0_enable_mgcg(struct radeon_device *rdev, bool enable) | ^~~~~~~~~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit adfc56d512f5585a848ff2332769926016c7a408 Author: Lee Jones Date: Mon Nov 16 17:36:56 2020 +0000 drm/radeon/si_dpm: Move 'vce_v1_0_enable_mgcg()'s prototype to shared header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/vce_v1_0.c:102:6: warning: no previous prototype for ‘vce_v1_0_enable_mgcg’ [-Wmissing-prototypes] 102 | void vce_v1_0_enable_mgcg(struct radeon_device *rdev, bool enable) | ^~~~~~~~~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit ea115610e8a426e7f3055da12d02c75bcd1bfc96 Author: Lee Jones Date: Mon Nov 16 17:36:55 2020 +0000 drm/radeon/cik: Move 'Move 'cik_sdma_*()'s prototypes to shared header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/cik_sdma.c:331:6: warning: no previous prototype for ‘cik_sdma_enable’ [-Wmissing-prototypes] 331 | void cik_sdma_enable(struct radeon_device *rdev, bool enable) | ^~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/cik_sdma.c:528:5: warning: no previous prototype for ‘cik_sdma_resume’ [-Wmissing-prototypes] 528 | int cik_sdma_resume(struct radeon_device *rdev) | ^~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/cik_sdma.c:557:6: warning: no previous prototype for ‘cik_sdma_fini’ [-Wmissing-prototypes] 557 | void cik_sdma_fini(struct radeon_device *rdev) | ^~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 5e7c91d2791e0b8669c198ea3114d37d6e2d9404 Author: Lee Jones Date: Mon Nov 16 17:36:54 2020 +0000 drm/radeon/ci_dpm: Move 'si_*()'s prototypes to shared header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/si_dpm.c:3802:4: warning: no previous prototype for ‘si_get_ddr3_mclk_frequency_ratio’ [-Wmissing-prototypes] 3802 | u8 si_get_ddr3_mclk_frequency_ratio(u32 memory_clock) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/si_dpm.c:3815:4: warning: no previous prototype for ‘si_get_mclk_frequency_ratio’ [-Wmissing-prototypes] 3815 | u8 si_get_mclk_frequency_ratio(u32 memory_clock, bool strobe_mode) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/si_dpm.c:3897:6: warning: no previous prototype for ‘si_trim_voltage_table_to_fit_state_table’ [-Wmissing-prototypes] 3897 | void si_trim_voltage_table_to_fit_state_table(struct radeon_device *rdev, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit c580cfc90b0aa1fa4b2bf6de3f299d030e6a4326 Author: Lee Jones Date: Mon Nov 16 17:36:53 2020 +0000 drm/radeon/evergreen: Move 'cik_*()'s prototypes to shared header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/cik.c:6413:6: warning: no previous prototype for ‘cik_init_cp_pg_table’ [-Wmissing-prototypes] 6413 | void cik_init_cp_pg_table(struct radeon_device *rdev) | ^~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/cik.c:6670:5: warning: no previous prototype for ‘cik_get_csb_size’ [-Wmissing-prototypes] 6670 | u32 cik_get_csb_size(struct radeon_device *rdev) | ^~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/cik.c:6702:6: warning: no previous prototype for ‘cik_get_csb_buffer’ [-Wmissing-prototypes] 6702 | void cik_get_csb_buffer(struct radeon_device *rdev, volatile u32 *buffer) | ^~~~~~~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 0a999f7d99c0b965da468e1969d29eb740e5a84a Author: Lee Jones Date: Mon Nov 16 17:36:52 2020 +0000 drm/radeon/cik_sdma: Move 'amdgpu_cik_gpu_check_soft_reset()'s prototype to shared header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/cik.c:4845:5: warning: no previous prototype for ‘cik_gpu_check_soft_reset’ [-Wmissing-prototypes] 4845 | u32 cik_gpu_check_soft_reset(struct radeon_device *rdev) | ^~~~~~~~~~~~~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit f47a9d09670d8a82b00bf2f7355c600507461c4a Author: Lee Jones Date: Mon Nov 16 17:36:51 2020 +0000 drm/radeon/evergreen: Move 'si_get_csb_*()'s prototypes to shared header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/si.c:5678:5: warning: no previous prototype for ‘si_get_csb_size’ [-Wmissing-prototypes] 5678 | u32 si_get_csb_size(struct radeon_device *rdev) | ^~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/si.c:5710:6: warning: no previous prototype for ‘si_get_csb_buffer’ [-Wmissing-prototypes] 5710 | void si_get_csb_buffer(struct radeon_device *rdev, volatile u32 *buffer) | ^~~~~~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 7735a7c969be1e59ac7ca85dd0086ff3dcc831fe Author: Lee Jones Date: Mon Nov 16 17:36:50 2020 +0000 drm/radeon/radeon_audio: Move 'dce6_*()'s prototypes to shared header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/dce6_afmt.c:32:5: warning: no previous prototype for ‘dce6_endpoint_rreg’ [-Wmissing-prototypes] 32 | u32 dce6_endpoint_rreg(struct radeon_device *rdev, | ^~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/dce6_afmt.c:46:6: warning: no previous prototype for ‘dce6_endpoint_wreg’ [-Wmissing-prototypes] 46 | void dce6_endpoint_wreg(struct radeon_device *rdev, | ^~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/dce6_afmt.c:110:6: warning: no previous prototype for ‘dce6_afmt_select_pin’ [-Wmissing-prototypes] 110 | void dce6_afmt_select_pin(struct drm_encoder *encoder) | ^~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/dce6_afmt.c:123:6: warning: no previous prototype for ‘dce6_afmt_write_latency_fields’ [-Wmissing-prototypes] 123 | void dce6_afmt_write_latency_fields(struct drm_encoder *encoder, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/dce6_afmt.c:152:6: warning: no previous prototype for ‘dce6_afmt_hdmi_write_speaker_allocation’ [-Wmissing-prototypes] 152 | void dce6_afmt_hdmi_write_speaker_allocation(struct drm_encoder *encoder, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/dce6_afmt.c:177:6: warning: no previous prototype for ‘dce6_afmt_dp_write_speaker_allocation’ [-Wmissing-prototypes] 177 | void dce6_afmt_dp_write_speaker_allocation(struct drm_encoder *encoder, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/dce6_afmt.c:202:6: warning: no previous prototype for ‘dce6_afmt_write_sad_regs’ [-Wmissing-prototypes] 202 | void dce6_afmt_write_sad_regs(struct drm_encoder *encoder, | ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/dce6_afmt.c:268:6: warning: no previous prototype for ‘dce6_hdmi_audio_set_dto’ [-Wmissing-prototypes] 268 | void dce6_hdmi_audio_set_dto(struct radeon_device *rdev, | ^~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/dce6_afmt.c:287:6: warning: no previous prototype for ‘dce6_dp_audio_set_dto’ [-Wmissing-prototypes] 287 | void dce6_dp_audio_set_dto(struct radeo_device *rdev, | ^~~~~~~~~~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Slava Grigorev Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 1c5ae3bae612e3ca7094a46134419fda3eaf5bdb Author: Lee Jones Date: Mon Nov 16 17:36:49 2020 +0000 drm/radeon/btc_dpm: Move 'evergreen_get_pi's prototype to shared header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/rv770_dpm.c:62:30: warning: no previous prototype for ‘evergreen_get_pi’ [-Wmissing-prototypes] 62 | struct evergreen_power_info *evergreen_get_pi(struct radeon_device *rdev) | ^~~~~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit e67ceb96815edf4a5ccf1029eb0c90560005a64d Author: Lee Jones Date: Mon Nov 16 17:36:48 2020 +0000 drm/radeon/cik: Move 'si_*()'s prototypes to shared header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/si.c:4186:6: warning: no previous prototype for ‘si_vram_gtt_location’ [-Wmissing-prototypes] 4186 | void si_vram_gtt_location(struct radeon_device *rdev, | ^~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/si.c:5186:6: warning: no previous prototype for ‘si_init_uvd_internal_cg’ [-Wmissing-prototypes] 5186 | void si_init_uvd_internal_cg(struct radeon_device *rdev) | ^~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/si.c:5801:6: warning: no previous prototype for ‘si_rlc_reset’ [-Wmissing-prototypes] 5801 | void si_rlc_reset(struct radeon_device *rdev) | ^~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit d339e96528d2c832f4fc2cfe002d38fb162f7c30 Author: Lee Jones Date: Mon Nov 16 17:36:47 2020 +0000 drm/radeon/si_dma: Move 'si_gpu_check_soft_reset()'s prototype to shared header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/si.c:3768:5: warning: no previous prototype for ‘si_gpu_check_soft_reset’ [-Wmissing-prototypes] 3768 | u32 si_gpu_check_soft_reset(struct radeon_device *rdev) | ^~~~~~~~~~~~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit d93a3c2733e5a4450ba586d4e1199d6a60984cdc Author: Lee Jones Date: Mon Nov 16 17:36:46 2020 +0000 drm/radeon/si_dpm: Move 'si_mc_load_microcode()'s prototype to shared header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/si.c:1570:5: warning: no previous prototype for ‘si_mc_load_microcode’ [-Wmissing-prototypes] Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit e6a29196ae5d11f029bd48dcc6d469956b21f356 Author: Lee Jones Date: Mon Nov 16 17:36:45 2020 +0000 drm/radeon/ci_dpm: Move 'ci_*()'s prototypes to shared header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/cik.c:1868:5: warning: no previous prototype for ‘ci_mc_load_microcode’ [-Wmissing-prototypes] 1868 | int ci_mc_load_microcode(struct radeon_device *rdev) | ^~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/cik.c:5847:6: warning: no previous prototype for ‘cik_enter_rlc_safe_mode’ [-Wmissing-prototypes] 5847 | void cik_enter_rlc_safe_mode(struct radeon_device *rdev) | ^~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/cik.c:5868:6: warning: no previous prototype for ‘cik_exit_rlc_safe_mode’ [-Wmissing-prototypes] 5868 | void cik_exit_rlc_safe_mode(struct radeon_device *rdev) | ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/cik.c:6286:6: warning: no previous prototype for ‘cik_update_cg’ [-Wmissing-prototypes] 6286 | void cik_update_cg(struct radeon_device *rdev, | ^~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 64a6f8c91071c6e09ff3152916823e4d45801d28 Author: Lee Jones Date: Mon Nov 16 17:36:44 2020 +0000 drm/radeon/radeon_encoders: Move 'radeon_atom_backlight_init's prototype to shared header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/atombios_encoders.c:186:6: warning: no previous prototype for ‘radeon_atom_backlight_init’ [-Wmissing-prototypes] 186 | void radeon_atom_backlight_init(struct radeon_encoder *radeon_encoder, | ^~~~~~~~~~~~~~~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 8ab1a48ef6f9f0a7719ac65d8cc393809b872896 Author: Lee Jones Date: Mon Nov 16 17:36:43 2020 +0000 drm/radeon/radeon_atombios: Move 'radeon_add_atom_encoder()'s prototype to shared header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/atombios_encoders.c:2721:1: warning: no previous prototype for ‘radeon_add_atom_encoder’ [-Wmissing-prototypes] 2721 | radeon_add_atom_encoder(struct drm_device *dev, | ^~~~~~~~~~~~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 6faf027f51472d72b6e47654f9333486709cd667 Author: Lee Jones Date: Mon Nov 16 17:36:42 2020 +0000 drm/radeon/ni_dma: Move 'cayman_gpu_check_soft_reset()'s prototype to shared header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/ni.c:1733:5: warning: no previous prototype for ‘cayman_gpu_check_soft_reset’ [-Wmissing-prototypes] 1733 | u32 cayman_gpu_check_soft_reset(struct radeon_device *rdev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 5bacdf0606365c5f22f194b65607e793e9bf8da6 Author: Lee Jones Date: Mon Nov 16 17:36:41 2020 +0000 drm/radeon/r600: Move 'evergreen_rlc_resume()'s prototype to shared header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/evergreen.c:4380:5: warning: no previous prototype for ‘evergreen_rlc_resume’ [-Wmissing-prototypes] 4380 | int evergreen_rlc_resume(struct radeon_device *rdev) | ^~~~~~~~~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 6a86ecdec2cc9f6e957eba7a74af6f70dfe16c8e Author: Lee Jones Date: Mon Nov 16 17:36:40 2020 +0000 drm/radeon/evergreen_dma: Move 'evergreen_gpu_check_soft_reset()'s prototype to shared header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/evergreen.c:3825:5: warning: no previous prototype for ‘evergreen_gpu_check_soft_reset’ [-Wmissing-prototypes] 3825 | u32 evergreen_gpu_check_soft_reset(struct radeon_device *rdev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit eb388a881cb32c8afda379e2b1ccc1e7446b5e0e Author: Lee Jones Date: Mon Nov 16 17:36:39 2020 +0000 drm/radeon/cik: Move 'r600_ih_ring_{alloc, fini}()'s prototypes to shared header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/r600.c:3480:5: warning: no previous prototype for ‘r600_ih_ring_alloc’ [-Wmissing-prototypes] 3480 | int r600_ih_ring_alloc(struct radeon_device *rdev) | ^~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/r600.c:3516:6: warning: no previous prototype for ‘r600_ih_ring_fini’ [-Wmissing-prototypes] 3516 | void r600_ih_ring_fini(struct radeon_device *rdev) | ^~~~~~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 5561ecba10b9f1efb668430c747de11a27bcbc2f Author: Lee Jones Date: Mon Nov 16 17:36:38 2020 +0000 drm/radeon/r600_dma: Move 'r600_gpu_check_soft_reset()'s prototype to shared location Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/r600.c:1615:5: warning: no previous prototype for ‘r600_gpu_check_soft_reset’ [-Wmissing-prototypes] 1615 | u32 r600_gpu_check_soft_reset(struct radeon_device *rdev) | ^~~~~~~~~~~~~~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit ef072392682eea70d0d055724626ce5bb5bd94cc Author: Lee Jones Date: Mon Nov 16 17:36:37 2020 +0000 drm/radeon/evergreen: Move 'cayman_*()'s prototypes to shared header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/ni.c:1378:6: warning: no previous prototype for ‘cayman_cp_int_cntl_setup’ [-Wmissing-prototypes] 1378 | void cayman_cp_int_cntl_setup(struct radeon_device *rdev, | ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/ni.c:1732:5: warning: no previous prototype for ‘cayman_gpu_check_soft_reset’ [-Wmissing-prototypes] 1732 | u32 cayman_gpu_check_soft_reset(struct radeon_device *rdev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 8595a0bf3a74d1d7d324f0c3279aaebc293553df Author: Lee Jones Date: Mon Nov 16 17:36:36 2020 +0000 drm/radeon/ni_dpm: Move 'ni_get_{pi, ps}()'s into shared header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/ni_dpm.c:727:23: warning: no previous prototype for ‘ni_get_pi’ [-Wmissing-prototypes] 727 | struct ni_power_info *ni_get_pi(struct radeon_device *rdev) | ^~~~~~~~~ drivers/gpu/drm/radeon/ni_dpm.c:734:15: warning: no previous prototype for ‘ni_get_ps’ [-Wmissing-prototypes] 734 | struct ni_ps *ni_get_ps(struct radeon_ps *rps) | ^~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 586831d65c94c9b27909f1759613cca3c09afc50 Author: Lee Jones Date: Mon Nov 16 17:36:35 2020 +0000 drm/radeon/rv770: Move 'rv770_get_*()'s prototypes to shared header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/rv770_dpm.c:47:18: warning: no previous prototype for ‘rv770_get_ps’ [-Wmissing-prototypes] 47 | struct rv7xx_ps *rv770_get_ps(struct radeon_ps *rps) | ^~~~~~~~~~~~ drivers/gpu/drm/radeon/rv770_dpm.c:54:26: warning: no previous prototype for ‘rv770_get_pi’ [-Wmissing-prototypes] 54 | struct rv7xx_power_info *rv770_get_pi(struct radeon_device *rdev) | ^~~~~~~~~~~~ Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit dc872ff5ed0e8d7b2dc2e722cf4247269691fc25 Author: Lee Jones Date: Mon Nov 16 17:36:34 2020 +0000 drm/radeon/evergreen_hdmi: Move 'evergreen_*()' and 'dce4_*()' HDMI prototypes to shared header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/evergreen_hdmi.c:37:6: warning: no previous prototype for ‘dce4_audio_enable’ [-Wmissing-prototypes] drivers/gpu/drm/radeon/evergreen_hdmi.c:67:6: warning: no previous prototype for ‘evergreen_hdmi_update_acr’ [-Wmissing-prototypes] drivers/gpu/drm/radeon/evergreen_hdmi.c:97:6: warning: no previous prototype for ‘dce4_afmt_write_latency_fields’ [-Wmissing-prototypes] drivers/gpu/drm/radeon/evergreen_hdmi.c:119:6: warning: no previous prototype for ‘dce4_afmt_hdmi_write_speaker_allocation’ [-Wmissing-prototypes] drivers/gpu/drm/radeon/evergreen_hdmi.c:137:6: warning: no previous prototype for ‘dce4_afmt_dp_write_speaker_allocation’ [-Wmissing-prototypes] drivers/gpu/drm/radeon/evergreen_hdmi.c:155:6: warning: no previous prototype for ‘evergreen_hdmi_write_sad_regs’ [-Wmissing-prototypes] drivers/gpu/drm/radeon/evergreen_hdmi.c:208:6: warning: no previous prototype for ‘evergreen_set_avi_packet’ [-Wmissing-prototypes] drivers/gpu/drm/radeon/evergreen_hdmi.c:227:6: warning: no previous prototype for ‘dce4_hdmi_audio_set_dto’ [-Wmissing-prototypes] drivers/gpu/drm/radeon/evergreen_hdmi.c:270:6: warning: no previous prototype for ‘dce4_dp_audio_set_dto’ [-Wmissing-prototypes] drivers/gpu/drm/radeon/evergreen_hdmi.c:306:6: warning: no previous prototype for ‘dce4_set_vbi_packet’ [-Wmissing-prototypes] drivers/gpu/drm/radeon/evergreen_hdmi.c:317:6: warning: no previous prototype for ‘dce4_hdmi_set_color_depth’ [-Wmissing-prototypes] drivers/gpu/drm/radeon/evergreen_hdmi.c:354:6: warning: no previous prototype for ‘dce4_set_audio_packet’ [-Wmissing-prototypes] drivers/gpu/drm/radeon/evergreen_hdmi.c:389:6: warning: no previous prototype for ‘dce4_set_mute’ [-Wmissing-prototypes] drivers/gpu/drm/radeon/evergreen_hdmi.c:400:6: warning: no previous prototype for ‘evergreen_hdmi_enable’ [-Wmissing-prototypes] drivers/gpu/drm/radeon/evergreen_hdmi.c:440:6: warning: no previous prototype for ‘evergreen_dp_enable’ [-Wmissing-prototypes] Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 5acfb44bb7314240f32de2cc35f5d1e933667def Author: Lee Jones Date: Mon Nov 16 17:36:33 2020 +0000 drm/radeon/radeon_gem: Move 'radeon_gem_prime_*()'s prototypes to shared header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_prime.c:34:18: warning: no previous prototype for ‘radeon_gem_prime_get_sg_table’ [-Wmissing-prototypes] 34 | struct sg_table *radeon_gem_prime_get_sg_table(struct drm_gem_object *obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/radeon_prime.c:42:7: warning: no previous prototype for ‘radeon_gem_prime_vmap’ [-Wmissing-prototypes] 42 | void *radeon_gem_prime_vmap(struct drm_gem_object *obj) | ^~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/radeon_prime.c:55:6: warning: no previous prototype for ‘radeon_gem_prime_vunmap’ [-Wmissing-prototypes] 55 | void radeon_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr) | ^~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/radeon_prime.c:62:24: warning: no previous prototype for ‘radeon_gem_prime_import_sg_table’ [-Wmissing-prototypes] 62 | struct drm_gem_object *radeon_gem_prime_import_sg_table(struct drm_device *dev, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/radeon_prime.c:86:5: warning: no previous prototype for ‘radeon_gem_prime_pin’ [-Wmissing-prototypes] 86 | int radeon_gem_prime_pin(struct drm_gem_object *obj) | ^~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/radeon_prime.c:104:6: warning: no previous prototype for ‘radeon_gem_prime_unpin’ [-Wmissing-prototypes] 104 | void radeon_gem_prime_unpin(struct drm_gem_object *obj) | ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/radeon_prime.c:120:17: warning: no previous prototype for ‘radeon_gem_prime_export’ [-Wmissing-prototypes] 120 | struct dma_buf *radeon_gem_prime_export(struct drm_gem_object *gobj, | ^~~~~~~~~~~~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit f6a96afb3c99ab0e0d46f5652a53f66eeaff7bfb Author: Lee Jones Date: Mon Nov 16 17:36:32 2020 +0000 drm/radeon/atom: Move 'radeon_atom_hw_i2c_*()'s prototypes into shared header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/atombios_i2c.c:100:5: warning: no previous prototype for ‘radeon_atom_hw_i2c_xfer’ [-Wmissing-prototypes] 100 | int radeon_atom_hw_i2c_xfer(struct i2c_adapter *i2c_adap, | ^~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/atombios_i2c.c:150:5: warning: no previous prototype for ‘radeon_atom_hw_i2c_func’ [-Wmissing-prototypes] 150 | u32 radeon_atom_hw_i2c_func(struct i2c_adapter *adap) | ^~~~~~~~~~~~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit f3723ad110c5a6e068b8eea17a3c5f15e4f75d39 Author: Lee Jones Date: Mon Nov 16 17:36:31 2020 +0000 drm/radeon/radeon_drv: Move 'radeon_driver_irq_handler_kms's prototype into shared header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_irq_kms.c:53:13: warning: no previous prototype for ‘radeon_driver_irq_handler_kms’ [-Wmissing-prototypes] 53 | irqreturn_t radeon_driver_irq_handler_kms(int irq, void *arg) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/radeon_irq_kms.c:120:6: warning: no previous prototype for ‘radeon_driver_irq_preinstall_kms’ [-Wmissing-prototypes] 120 | void radeon_driver_irq_preinstall_kms(struct drm_device *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/radeon_irq_kms.c:152:5: warning: no previous prototype for ‘radeon_driver_irq_postinstall_kms’ [-Wmissing-prototypes] 152 | int radeon_driver_irq_postinstall_kms(struct drm_device *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/radeon_irq_kms.c:171:6: warning: no previous prototype for ‘radeon_driver_irq_uninstall_kms’ [-Wmissing-prototypes] 171 | void radeon_driver_irq_uninstall_kms(struct drm_device *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Gareth Hughes Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 0a2e8d51e4da122ae42907eb569c3edb178c85df Author: Lee Jones Date: Mon Nov 16 17:36:30 2020 +0000 drm/radeon/radeon_drv: Move 'radeon_mmap()'s prototype to shared header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_ttm.c:931:5: warning: no previous prototype for ‘radeon_mmap’ [-Wmissing-prototypes] 931 | int radeon_mmap(struct file *filp, struct vm_area_struct *vma) | ^~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Gareth Hughes Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 4fe1999e44b7b70d3d37f28f73a2b1c59810af91 Author: Lee Jones Date: Mon Nov 16 17:29:34 2020 +0000 drm/radeon/evergreen: Move 'evergreen_*' and 'sumo_*' prototypes out to shared location Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/evergreen.c:1281:6: warning: no previous prototype for ‘evergreen_fix_pci_max_read_req_size’ [-Wmissing-prototypes] 1281 | void evergreen_fix_pci_max_read_req_size(struct radeon_device *rdev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/evergreen.c:2664:6: warning: no previous prototype for ‘evergreen_mc_stop’ [-Wmissing-prototypes] 2664 | void evergreen_mc_stop(struct radeon_device *rdev, struct evergreen_mc_save *save) | ^~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/evergreen.c:2762:6: warning: no previous prototype for ‘evergreen_mc_resume’ [-Wmissing-prototypes] 2762 | void evergreen_mc_resume(struct radeon_device *rdev, struct evergreen_mc_save *save) | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/evergreen.c:2850:6: warning: no previous prototype for ‘evergreen_mc_program’ [-Wmissing-prototypes] 2850 | void evergreen_mc_program(struct radeon_device *rdev) | ^~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/evergreen.c:3710:5: warning: no previous prototype for ‘evergreen_mc_init’ [-Wmissing-prototypes] 3710 | int evergreen_mc_init(struct radeon_device *rdev) | ^~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/evergreen.c:3769:6: warning: no previous prototype for ‘evergreen_print_gpu_status_regs’ [-Wmissing-prototypes] 3769 | void evergreen_print_gpu_status_regs(struct radeon_device *rdev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/evergreen.c:3797:6: warning: no previous prototype for ‘evergreen_is_display_hung’ [-Wmissing-prototypes] 3797 | bool evergreen_is_display_hung(struct radeon_device *rdev) | ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/evergreen.c:4009:6: warning: no previous prototype for ‘evergreen_gpu_pci_config_reset’ [-Wmissing-prototypes] 4009 | void evergreen_gpu_pci_config_reset(struct radeon_device *rdev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/evergreen.c:4110:6: warning: no previous prototype for ‘sumo_rlc_fini’ [-Wmissing-prototypes] 4110 | void sumo_rlc_fini(struct radeon_device *rdev) | ^~~~~~~~~~~~~ drivers/gpu/drm/radeon/evergreen.c:4153:5: warning: no previous prototype for ‘sumo_rlc_init’ [-Wmissing-prototypes] 4153 | int sumo_rlc_init(struct radeon_device *rdev) | ^~~~~~~~~~~~~ drivers/gpu/drm/radeon/evergreen.c:4381:5: warning: no previous prototype for ‘evergreen_rlc_resume’ [-Wmissing-prototypes] 4381 | int evergreen_rlc_resume(struct radeon_device *rdev) | ^~~~~~~~~~~~~ drivers/gpu/drm/radeon/evergreen.c:4670:6: warning: no previous prototype for ‘evergreen_irq_suspend’ [-Wmissing-prototypes] 4670 | void evergreen_irq_suspend(struct radeon_device *rdev) | ^~~~~~~~~~~~~~~~~~~~~ NB: Lots more of these - snipped for brevity Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit baa65242dd985a55e4c68596d80f4d282a9d7daa Author: Lee Jones Date: Mon Nov 16 17:29:33 2020 +0000 drm/radeon/radeon_audio: Move 'dce3_2_*' prototypes to shared location Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/dce3_1_afmt.c:30:6: warning: no previous prototype for ‘dce3_2_afmt_hdmi_write_speaker_allocation’ [-Wmissing-prototypes] 30 | void dce3_2_afmt_hdmi_write_speaker_allocation(struct drm_encoder *encoder, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/dce3_1_afmt.c:48:6: warning: no previous prototype for ‘dce3_2_afmt_dp_write_speaker_allocation’ [-Wmissing-prototypes] 48 | void dce3_2_afmt_dp_write_speaker_allocation(struct drm_encoder *encoder, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/dce3_1_afmt.c:66:6: warning: no previous prototype for ‘dce3_2_afmt_write_sad_regs’ [-Wmissing-prototypes] 66 | void dce3_2_afmt_write_sad_regs(struct drm_encoder *encoder, | ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/dce3_1_afmt.c:116:6: warning: no previous prototype for ‘dce3_2_audio_set_dto’ [-Wmissing-prototypes] 116 | void dce3_2_audio_set_dto(struct radeon_device *rdev, | ^~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/dce3_1_afmt.c:170:6: warning: no previous prototype for ‘dce3_2_hdmi_update_acr’ [-Wmissing-prototypes] 170 | void dce3_2_hdmi_update_acr(struct drm_encoder *encoder, long offset, | ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/dce3_1_afmt.c:202:6: warning: no previous prototype for ‘dce3_2_set_audio_packet’ [-Wmissing-prototypes] 202 | void dce3_2_set_audio_packet(struct drm_encoder *encoder, u32 offset) | ^~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/dce3_1_afmt.c:223:6: warning: no previous prototype for ‘dce3_2_set_mute’ [-Wmissing-prototypes] 223 | void dce3_2_set_mute(struct drm_encoder *encoder, u32 offset, bool mute) | ^~~~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Slava Grigorev Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit bb29f896d69fd2450aa25ceb28494371f63982b0 Author: Lee Jones Date: Mon Nov 16 17:29:32 2020 +0000 drm/radeon/radeon_pm: Move 'radeon_pm_acpi_event_handler' prototype into shared header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_pm.c:74:6: warning: no previous prototype for ‘radeon_pm_acpi_event_handler’ [-Wmissing-prototypes] 74 | void radeon_pm_acpi_event_handler(struct radeon_device *rdev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit a9f9851f49d83814790686dcd57887ee1dba5cef Author: Lee Jones Date: Mon Nov 16 17:29:31 2020 +0000 drm/radeon/rv770: Move 'rv770_set_clk_bypass_mode' prototype to shared location Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/rv770.c:1138:6: warning: no previous prototype for ‘rv770_set_clk_bypass_mode’ [-Wmissing-prototypes] 1138 | void rv770_set_clk_bypass_mode(struct radeon_device *rdev) | ^~~~~~~~~~~~~~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit d9353b38f47a676c088fd07890305864b8d70c7c Author: Lee Jones Date: Mon Nov 16 17:29:30 2020 +0000 drm/radeon/radeon_irq_kms: Demote non-conformant kernel-doc fix another Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_irq_kms.c:56: warning: Function parameter or member 'irq' not described in 'radeon_driver_irq_handler_kms' drivers/gpu/drm/radeon/radeon_irq_kms.c:56: warning: Function parameter or member 'arg' not described in 'radeon_driver_irq_handler_kms' drivers/gpu/drm/radeon/radeon_irq_kms.c:571: warning: Function parameter or member 'n' not described in 'radeon_irq_kms_set_irq_n_enabled' drivers/gpu/drm/radeon/radeon_irq_kms.c:571: warning: Excess function parameter 'num' description in 'radeon_irq_kms_set_irq_n_enabled' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 7ddfba01151d3357ad0a12d3e8d232f8726dd6c3 Author: Lee Jones Date: Mon Nov 16 17:29:29 2020 +0000 drm/radeon/radeon_legacy_encoders: Move 'radeon_add_legacy_encoder's prototype to shared location Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_legacy_encoders.c:1746:1: warning: no previous prototype for ‘radeon_add_legacy_encoder’ [-Wmissing-prototypes] 1746 | radeon_add_legacy_encoder(struct drm_device *dev, uint32_t encoder_enum, uint32_t supported_device) | ^~~~~~~~~~~~~~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 1ae79be1aab39dabe3b5444536020fe045e01650 Author: Lee Jones Date: Mon Nov 16 17:29:28 2020 +0000 drm/radeon/radeon_legacy_encoders: Move 'radeon_add_legacy_encoder' prototype to shared header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_legacy_encoders.c:1745:1: warning: no previous prototype for ‘radeon_add_legacy_encoder’ [-Wmissing-prototypes] 1745 | radeon_add_legacy_encoder(struct drm_device *dev, uint32_t encoder_enum, uint32_t supported_device) | ^~~~~~~~~~~~~~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit afd90af890a0a30c7df5c30a4fd2a12ece17b627 Author: Lee Jones Date: Mon Nov 16 17:29:27 2020 +0000 drm/radeon: Move radeon_ttm{init, fini} to shared location Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_ttm.c: At top level: drivers/gpu/drm/radeon/radeon_ttm.c:817:5: warning: no previous prototype for ‘radeon_ttm_init’ [-Wmissing-prototypes] 817 | int radeon_ttm_init(struct radeon_device *rdev) | ^~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/radeon_ttm.c:878:6: warning: no previous prototype for ‘radeon_ttm_fini’ [-Wmissing-prototypes] 878 | void radeon_ttm_fini(struct radeon_device *rdev) | ^~~~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit f5194f70e253ce92b139b6c6db23c9211caf4452 Author: Lee Jones Date: Mon Nov 16 17:29:26 2020 +0000 drm/radeon/radeon_kms: Fix misnaming of 'radeon_info_ioctl's dev param Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_kms.c:226: warning: Function parameter or member 'dev' not described in 'radeon_info_ioctl' drivers/gpu/drm/radeon/radeon_kms.c:226: warning: Excess function parameter 'rdev' description in 'radeon_info_ioctl' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 59718dbfbb21e3a6c76cd8f4522d810d62cf9cc2 Author: Lee Jones Date: Mon Nov 16 17:29:25 2020 +0000 drm/radeon/radeon_kms: Move 'radeon_*_kms' prototypes to shared header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_kms.c:756:5: warning: no previous prototype for ‘radeon_get_vblank_counter_kms’ [-Wmissing-prototypes] 756 | u32 radeon_get_vblank_counter_kms(struct drm_crtc *crtc) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/radeon_kms.c:826:5: warning: no previous prototype for ‘radeon_enable_vblank_kms’ [-Wmissing-prototypes] 826 | int radeon_enable_vblank_kms(struct drm_crtc *crtc) | ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/radeon_kms.c:853:6: warning: no previous prototype for ‘radeon_disable_vblank_kms’ [-Wmissing-prototypes] 853 | void radeon_disable_vblank_kms(struct drm_crtc *crtc) | ^~~~~~~~~~~~~~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 4d3efadd374ac4038f556d8505c665b0cc931a46 Author: Lee Jones Date: Mon Nov 16 17:29:24 2020 +0000 drm/radeon/radeon: Move prototype into shared header Unfortunately, a suitable one didn't already exist. Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_device.c:637:6: warning: no previous prototype for ‘radeon_device_is_virtual’ [-Wmissing-prototypes] 637 | bool radeon_device_is_virtual(void) | ^~~~~~~~~~~~~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 54ae7f99aef8e3b348bfe39296a5e8ed0fec646a Author: Lee Jones Date: Mon Nov 16 17:29:23 2020 +0000 drm/radeon/atombios_encoders: Move 'radeon_atom_get_tv_timings()'s prototype into shared location Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_atombios.c:1791:6: warning: no previous prototype for ‘radeon_atom_get_tv_timings’ [-Wmissing-prototypes] 1791 | bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index, | ^~~~~~~~~~~~~~~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 8a7904a672a1d33c848e5129f886ee69e0773a2e Author: Jason Gunthorpe Date: Sun Nov 15 13:43:11 2020 +0200 RDMA/mlx5: Lower setting the umem's PAS for SRQ Some of the SRQ types are created using a WQ, and the WQ requires a different parameter set to mlx5_umem_find_best_quantized_pgoff() as it has a 5 bit page_offset. Add the umem to the mlx5_srq_attr and defer computing the PAS data until the code has figured out what kind of mailbox to use. Compute the PAS directly from the umem for each of the four unique mailbox types. This also avoids allocating memory to store the user PAS, instead it is written directly to the mailbox as in most other cases. Fixes: 01949d0109ee ("net/mlx5_core: Enable XRCs and SRQs when using ISSI > 0") Link: https://lore.kernel.org/r/20201115114311.136250-8-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 878f7b31c3a7f3e48c6601ea373b8688e7e308e0 Author: Jason Gunthorpe Date: Sun Nov 15 13:43:10 2020 +0200 RDMA/mlx5: Use ib_umem_find_best_pgsz() for devx Since devx uses the new rdma_for_each_block() to fill the PAS it can also use ib_umem_find_best_pgsz(). However, the umem constructionin devx is complicated, the umem must still respect all the HW limits such as page_offset_quantized and the IOVA alignment. Since we don't know what the user intends to use the umem for we have to limit it to PAGE_SIZE. There are users trying to mix umem's with mkeys so this makes them work reliably, at least for an identity IOVA, by ensuring the IOVA matches the selected page size. Last user of mlx5_ib_get_buf_offset() so it can also be removed. Fixes: aeae94579caf ("IB/mlx5: Add DEVX support for memory registration") Link: https://lore.kernel.org/r/20201115114311.136250-7-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit c08fbdc57741026a440d01593e09e11b60b3e210 Author: Jason Gunthorpe Date: Sun Nov 15 13:43:09 2020 +0200 RDMA/mlx5: mlx5_umem_find_best_quantized_pgoff() for CQ This fixes a bug where the page_offset was not being considered when building a CQ. The HW specification says it 'must be zero', so use a variant of mlx5_umem_find_best_quantized_pgoff() with a 0 pgoff_bitmask to force this result. Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters") Link: https://lore.kernel.org/r/20201115114311.136250-6-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit a59b7b05efc827929c2aa46fc2fe561982bd19fc Author: Jason Gunthorpe Date: Sun Nov 15 13:43:08 2020 +0200 RDMA/mlx5: Use mlx5_umem_find_best_quantized_pgoff() for QP Delete custom logic in the QP in favor of more general variant. Link: https://lore.kernel.org/r/20201115114311.136250-5-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 7579dcdf737d76a28243add75dc78babf09e29fa Author: Jason Gunthorpe Date: Sun Nov 15 13:43:07 2020 +0200 RDMA/mlx5: Directly compute the PAS list for raw QP RQ's The RQ WQ created when making a raw ethernet QP copies the PAS list from a dummy QPC command created earlier in the flow. The WQC and QPC PAS lists are not fully compatible as the page_offset is a different size. Create the RQ WQ's PAS list directly and do not try to copy it from another command structure. Like the prior patch, this also means that badly aligned buffers were not correctly rejected. Link: https://lore.kernel.org/r/20201115114311.136250-4-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit ad480ea5d6ea605bf63d23f5f91447d5cac3c95e Author: Jason Gunthorpe Date: Sun Nov 15 13:43:06 2020 +0200 RDMA/mlx5: Use mlx5_umem_find_best_quantized_pgoff() for WQ This fixes a subtle bug, the WQ mailbox has only 5 bits to describe the page_offset, while mlx5_ib_get_buf_offset() is hard wired to only work with 6 bit page_offsets. Thus it did not properly reject badly aligned buffers. Fixes: 79b20a6c3014 ("IB/mlx5: Add receive Work Queue verbs") Fixes: 0fb2ed66a14c ("IB/mlx5: Add create and destroy functionality for Raw Packet QP") Link: https://lore.kernel.org/r/20201115114311.136250-3-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit b045db62f6f61c2f0f993696abe620379db34163 Author: Jason Gunthorpe Date: Sun Nov 15 13:43:05 2020 +0200 RDMA/mlx5: Use ib_umem_find_best_pgoff() for SRQ SRQ uses a quantized and scaled page_offset, which is another variation of ib_umem_find_best_pgsz(). Add mlx5_umem_find_best_quantized_pgoff() to perform this calculation for each mailbox. A macro shows how the calculation is directly connected to the mailbox format. This new routine replaces the limited mlx5_ib_cont_pages() and mlx5_ib_get_buf_offset() pairing which would reject valid configurations rather than adjust the page_size to make it work. In turn this is much more aggressive about choosing large page sizes for these objects and when THP is enabled it will now often find a single page solution. Link: https://lore.kernel.org/r/20201115114311.136250-2-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 51af3f23063946344330a77a7d1dece6fc6bb5d8 Author: Gabriel Krisman Bertazi Date: Mon Nov 16 12:42:06 2020 -0500 x86: Reclaim unused x86 TI flags Reclaim TI flags that were migrated to syscall_work flags. Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Thomas Gleixner Reviewed-by: Andy Lutomirski Link: https://lore.kernel.org/r/20201116174206.2639648-11-krisman@collabora.com commit 2991552447707d791d9d81a5dc161f9e9e90b163 Author: Gabriel Krisman Bertazi Date: Mon Nov 16 12:42:05 2020 -0500 entry: Drop usage of TIF flags in the generic syscall code Now that the flags migration in the common syscall entry code is complete and the code relies exclusively on thread_info::syscall_work, clean up the accesses to TI flags in that path. Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Thomas Gleixner Reviewed-by: Andy Lutomirski Link: https://lore.kernel.org/r/20201116174206.2639648-10-krisman@collabora.com commit 785dc4eb7fd74e3b7f4eac468457b633117e1aea Author: Gabriel Krisman Bertazi Date: Mon Nov 16 12:42:04 2020 -0500 audit: Migrate to use SYSCALL_WORK flag On architectures using the generic syscall entry code the architecture independent syscall work is moved to flags in thread_info::syscall_work. This removes architecture dependencies and frees up TIF bits. Define SYSCALL_WORK_SYSCALL_AUDIT, use it in the generic entry code and convert the code which uses the TIF specific helper functions to use the new *_syscall_work() helpers which either resolve to the new mode for users of the generic entry code or to the TIF based functions for the other architectures. Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Thomas Gleixner Reviewed-by: Andy Lutomirski Link: https://lore.kernel.org/r/20201116174206.2639648-9-krisman@collabora.com commit 64eb35f701f04b30706e21d1b02636b5d31a37d2 Author: Gabriel Krisman Bertazi Date: Mon Nov 16 12:42:03 2020 -0500 ptrace: Migrate TIF_SYSCALL_EMU to use SYSCALL_WORK flag On architectures using the generic syscall entry code the architecture independent syscall work is moved to flags in thread_info::syscall_work. This removes architecture dependencies and frees up TIF bits. Define SYSCALL_WORK_SYSCALL_EMU, use it in the generic entry code and convert the code which uses the TIF specific helper functions to use the new *_syscall_work() helpers which either resolve to the new mode for users of the generic entry code or to the TIF based functions for the other architectures. Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Thomas Gleixner Reviewed-by: Andy Lutomirski Link: https://lore.kernel.org/r/20201116174206.2639648-8-krisman@collabora.com commit 64c19ba29b66e98af9306b4a7525fb22c895d252 Author: Gabriel Krisman Bertazi Date: Mon Nov 16 12:42:02 2020 -0500 ptrace: Migrate to use SYSCALL_TRACE flag On architectures using the generic syscall entry code the architecture independent syscall work is moved to flags in thread_info::syscall_work. This removes architecture dependencies and frees up TIF bits. Define SYSCALL_WORK_SYSCALL_TRACE, use it in the generic entry code and convert the code which uses the TIF specific helper functions to use the new *_syscall_work() helpers which either resolve to the new mode for users of the generic entry code or to the TIF based functions for the other architectures. Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Thomas Gleixner Reviewed-by: Andy Lutomirski Link: https://lore.kernel.org/r/20201116174206.2639648-7-krisman@collabora.com commit 524666cb5de7c38a1925e7401a6e59d68682dd8c Author: Gabriel Krisman Bertazi Date: Mon Nov 16 12:42:01 2020 -0500 tracepoints: Migrate to use SYSCALL_WORK flag On architectures using the generic syscall entry code the architecture independent syscall work is moved to flags in thread_info::syscall_work. This removes architecture dependencies and frees up TIF bits. Define SYSCALL_WORK_SYSCALL_TRACEPOINT, use it in the generic entry code and convert the code which uses the TIF specific helper functions to use the new *_syscall_work() helpers which either resolve to the new mode for users of the generic entry code or to the TIF based functions for the other architectures. Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Thomas Gleixner Reviewed-by: Andy Lutomirski Link: https://lore.kernel.org/r/20201116174206.2639648-6-krisman@collabora.com commit 23d67a54857a768acdb0804cdd6037c324a50ecd Author: Gabriel Krisman Bertazi Date: Mon Nov 16 12:42:00 2020 -0500 seccomp: Migrate to use SYSCALL_WORK flag On architectures using the generic syscall entry code the architecture independent syscall work is moved to flags in thread_info::syscall_work. This removes architecture dependencies and frees up TIF bits. Define SYSCALL_WORK_SECCOMP, use it in the generic entry code and convert the code which uses the TIF specific helper functions to use the new *_syscall_work() helpers which either resolve to the new mode for users of the generic entry code or to the TIF based functions for the other architectures. Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Thomas Gleixner Reviewed-by: Andy Lutomirski Link: https://lore.kernel.org/r/20201116174206.2639648-5-krisman@collabora.com commit b86678cf0f1d76062aa964c5f0c6c89fe5a6dcfd Author: Gabriel Krisman Bertazi Date: Mon Nov 16 12:41:59 2020 -0500 entry: Wire up syscall_work in common entry code Prepare the common entry code to use the SYSCALL_WORK flags. They will be defined in subsequent patches for each type of syscall work. SYSCALL_WORK_ENTRY/EXIT are defined for the transition, as they will replace the TIF_ equivalent defines. Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Thomas Gleixner Reviewed-by: Andy Lutomirski Link: https://lore.kernel.org/r/20201116174206.2639648-4-krisman@collabora.com commit 3136b93c3fb2b7c19e853e049203ff8f2b9dd2cd Author: Gabriel Krisman Bertazi Date: Mon Nov 16 12:41:58 2020 -0500 entry: Expose helpers to migrate TIF to SYSCALL_WORK flags With the goal to split the syscall work related flags into a separate field that is architecture independent, expose transitional helpers that resolve to either the TIF flags or to the corresponding SYSCALL_WORK flags. This will allow architectures to migrate only when they port to the generic syscall entry code. Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Thomas Gleixner Reviewed-by: Andy Lutomirski Link: https://lore.kernel.org/r/20201116174206.2639648-3-krisman@collabora.com commit b4581a52caff79eab1ea6caaaa4e08526ce2782b Author: Gabriel Krisman Bertazi Date: Mon Nov 16 12:41:57 2020 -0500 x86: Expose syscall_work field in thread_info This field will be used by SYSCALL_WORK flags, migrated from TI flags. Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Thomas Gleixner Reviewed-by: Andy Lutomirski Link: https://lore.kernel.org/r/20201116174206.2639648-2-krisman@collabora.com commit 8c030d780ad279d710dc912050e593aea32f5514 Author: Gal Pressman Date: Sun Nov 15 12:34:02 2020 +0200 RDMA/efa: Remove .create_ah callback assignment Drivers now expose two callbacks for address handle creation, one for uverbs and one for kverbs. EFA only supports uverbs so the .create_ah assignment can be removed. Fix the core code caller to check the proper function pointer. Link: https://lore.kernel.org/r/20201115103404.48829-3-galpress@amazon.com Signed-off-by: Gal Pressman Acked-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 31e2daa17ed9684e73a1e8e5080b70b0230bf59a Author: Lang Cheng Date: Thu Nov 12 21:19:44 2020 +0800 RDMA/hns: Add new PCI device ID matching for HIP09 The 200G device has a new device ID 0xA228, add it to the PCI table. Link: https://lore.kernel.org/r/1605187184-26079-1-git-send-email-liweihang@huawei.com Signed-off-by: Lang Cheng Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit ee4fb4c079a0096eb3de67121a638792b2d6e2d0 Author: Jonathan Cameron Date: Sat Oct 31 18:29:22 2020 +0000 dt-bindings:iio:accel:domintech,dmard06: Move to trivial-devices.yaml No need to maintain a separate document for such a simple binding. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201031182922.743153-8-jic23@kernel.org commit 184a99de93b829e05ff59cb0862e5ebbd7594604 Author: Jonathan Cameron Date: Sat Oct 31 18:29:21 2020 +0000 dt-bindings:iio:magnetometer:memsic,mmc35240: move to trivial-devices.yaml Extremely simple binding so no need to maintain a separate file. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Jandy Gou Link: https://lore.kernel.org/r/20201031182922.743153-7-jic23@kernel.org commit 76e11a05d2d0be9f47c80e120d60571f8dc9885c Author: Jonathan Cameron Date: Sat Oct 31 18:29:20 2020 +0000 dt-bindings:iio:light:renesas,isl29501: Move to trivial devices. This binding is so simple there is no obvious advantage in maintaining a separate binding doc file for it. As such, move it to trivial-devices.yaml Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Simon Horman Link: https://lore.kernel.org/r/20201031182922.743153-6-jic23@kernel.org commit b25e67b29078d11a9be46f6bdb8b09f278c654ca Author: Jonathan Cameron Date: Sat Oct 31 18:29:19 2020 +0000 dt-bindings:iio:potentiometer:maxim,max5481 move to trivial devices Simple SPI binding that doesn't need a separate file. During conversion I looked up the individual part number descriptions in the datasheet so that we could give slightly more detail in trivial-device.yaml. Signed-off-by: Jonathan Cameron Reviewed-by: Slawomir Stepien Reviewed-by: Rob Herring Cc: Maury Anderson Cc: Matthew Weber Cc: Slawomir Stepien Link: https://lore.kernel.org/r/20201031182922.743153-5-jic23@kernel.org commit 6d3766da16a39c2be19ce4f58c663ec245aea7f0 Author: Jonathan Cameron Date: Sat Oct 31 18:29:18 2020 +0000 dt-bindings:iio:potentiometer:maxim,ds1803 move to trivial devices. Simple binding where there is no obvious benefit in maintaining a separate file. Hence document in trivial-devices.yaml and drop the txt file. Signed-off-by: Jonathan Cameron Reviewed-by: Slawomir Stepien Reviewed-by: Rob Herring Cc: Slawomir Stepien Link: https://lore.kernel.org/r/20201031182922.743153-4-jic23@kernel.org commit 9bd4ede7480d96b6267bb32ab74082a177388850 Author: Jonathan Cameron Date: Sat Oct 31 18:29:17 2020 +0000 dt-bindings:iio:chemical:bosch,bme680: Move to trivial devices Very simple binding so no need to maintain a separate file. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Sebastien Bourdelin Cc: Himanshu Jha Link: https://lore.kernel.org/r/20201031182922.743153-3-jic23@kernel.org commit c59c1bf744701cf2851665a99fb9f5a43751856e Author: Jonathan Cameron Date: Sat Oct 31 18:29:16 2020 +0000 dt-bindings:iio:chemical:sensirion,sgp30: Move to trivial-bindings.yaml The binding for this device and the sgpc3 is very simple so lets not maintain a seperate document for this one. Of course we can always add a document again if the binding becomes more complex in future. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Andreas Brauchli Link: https://lore.kernel.org/r/20201031182922.743153-2-jic23@kernel.org commit 1eb0616c2df5b78c301eaa7bd2ee859f43915001 Author: Thomas Gleixner Date: Mon Nov 16 11:32:53 2020 -0800 xtensa/mm/highmem: Make generic kmap_atomic() work correctly The conversion to the generic kmap_atomic() implementation missed the fact that xtensa's fixmap works bottom up while all other implementations work top down. There is no real reason why xtensa needs to work that way. Cure it by: - Using the generic fix_to_virt()/virt_to_fix() functions which work top down - Adjusting the mapping defines - Using the generic index calculation for the non cache aliasing case - Making the cache colour offset reverse so the effective index is correct While at it, remove the outdated and misleading comment above the fixmap enum which originates from the initial copy&pasta of this code from i386. [ Max: Fixed the off by one in the index calculation ] Fixes: 629ed3f7dad2 ("xtensa/mm/highmem: Switch to generic kmap atomic") Reported-by: Max Filippov Signed-off-by: Thomas Gleixner Signed-off-by: Max Filippov Signed-off-by: Thomas Gleixner Tested-by: Max Filippov Link: https://lore.kernel.org/r/20201116193253.23875-1-jcmvbkbc@gmail.com commit 2cba117073525092eb370da0f9d08fa89b7f540f Author: Jonathan Cameron Date: Sat Oct 31 13:41:10 2020 +0000 dt-bindings:iio:temperature:ti,tmp07 yaml conversion Simple conversion from txt to yaml. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Acked-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20201031134110.724233-30-jic23@kernel.org commit 29a702dcf47c1193a5e8951a67f9366533f9a3a5 Author: Jonathan Cameron Date: Sat Oct 31 13:41:09 2020 +0000 dt-bindings:iio:temperature:maxim_thermocouple.txt to maxim,max31855k.yaml Given we already have another maxim thermocouple driver that isn't covered by this binding it seems a better idea to chose to name it after a specific part. I added an additional example for the maxim,max6755 to illustrate the need for spi-cpha for that part. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Acked-by: Matt Ranostay Link: https://lore.kernel.org/r/20201031134110.724233-29-jic23@kernel.org commit 17d1ffdfb643f08ca7cb60f43db6ee04f711c4b3 Author: Jonathan Cameron Date: Sat Oct 31 13:41:08 2020 +0000 dt-bindings:iio:temperature:maxim,max31856 yaml conversion. Simple txt to yaml conversion of this binding. Paresh Chaudhary's email is bouncing so for now I've listed myself as maintainer. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201031134110.724233-28-jic23@kernel.org commit 93f8dd3b8ad628e57b7ab09b27d42f92681dd817 Author: Jonathan Cameron Date: Sat Oct 31 13:41:07 2020 +0000 dt-bindings:iio:temperature:meas,tsys01 move to trivial-devices.yaml The existing binding description brings little value and the similar meas,* parts are in trivial-devices.yaml so move this one there to join them. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Acked-by: Manivannan Sadhasivam Cc: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20201031134110.724233-27-jic23@kernel.org commit 92af0fb2d443581f8e1c5619d122f3781596ba75 Author: Jonathan Cameron Date: Sat Oct 31 13:41:06 2020 +0000 dt-bindings:iio:temperature:melexis,mlx90632 conversion to yaml Technically this could have gone in trivial-devices.yaml, but I have kept it as a separate binding due to the detailed additional description from the text file. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Acked-by: Crt Mori Cc: Crt Mori Link: https://lore.kernel.org/r/20201031134110.724233-26-jic23@kernel.org commit 39616b4e4a02f54ca2c79a656cb889c476e5d0ba Author: Jonathan Cameron Date: Sat Oct 31 13:41:05 2020 +0000 dt-bindings:iio:temperature:melexis,mlx90614 yaml conversion Simple conversion from txt to yaml. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Acked-by: Crt Mori Cc: Peter Meerwald Link: https://lore.kernel.org/r/20201031134110.724233-25-jic23@kernel.org commit 60a973862f3c41bc8d4b7a74bd45eda220e248e8 Author: V Sujith Kumar Reddy Date: Sat Nov 14 00:08:22 2020 +0530 ASoC: qcom: sc7180: Register shutdown handler for lpass platform Register shutdown handler to stop sc7180 lpass platform driver and to disable audio clocks. Signed-off-by: V Sujith Kumar Reddy Signed-off-by: Srinivasa Rao Mandadapu Link: https://lore.kernel.org/r/1605292702-25046-1-git-send-email-srivasam@codeaurora.org Signed-off-by: Mark Brown commit 1e6536ee349ba9ce0383568493c645d9ceb93a28 Author: Jonathan Cameron Date: Sat Oct 31 13:41:04 2020 +0000 dt-bindings:iio:dac:adi,ad5758 yaml conversion I have put Michael as maintainer on this one. Happy to change it to someone else though. One issue in here, is I cannot have an example with a negative limit on the range. There are very few such yaml bindings in existence but the thermal-zones.yaml has the same problem. If there is any means of fixing this let me know. For now I'm sticking to positive range values in the example. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Michael Hennerich Link: https://lore.kernel.org/r/20201031134110.724233-24-jic23@kernel.org commit 313ebec48dedcac351557b5a84b8b2239951c238 Author: V Sujith Kumar Reddy Date: Mon Nov 16 13:19:15 2020 +0530 ASoC: qcom: lpass-sc7180: Add 32 bit format support for capture Add 32 bit format support for capture in lpass-sc7180 snd_soc_dai_driver capabilities. Need to add contstraints in machine driver so that only specific format allowed. Signed-off-by: V Sujith Kumar Reddy Signed-off-by: Srinivasa Rao Manidadapu Link: https://lore.kernel.org/r/1605512955-7017-1-git-send-email-srivasam@codeaurora.org Signed-off-by: Mark Brown commit 1241f0787578136ab58f49adc52f2dcd2bbc4bf2 Author: Randy Dunlap Date: Sun Nov 15 20:07:21 2020 -0800 spi: dw: fix build error by selecting MULTIPLEXER Fix build error for spi-dw-bt1.o by selecting MULTIPLEXER. hppa-linux-ld: drivers/spi/spi-dw-bt1.o: in function `dw_spi_bt1_sys_init': (.text+0x1ac): undefined reference to `devm_mux_control_get' Fixes: abf00907538e ("spi: dw: Add Baikal-T1 SPI Controller glue driver") Reported-by: kernel test robot Signed-off-by: Randy Dunlap Cc: Serge Semin Cc: Ramil Zaripov Cc: Mark Brown Cc: linux-spi@vger.kernel.org Acked-by: Serge Semin Link: https://lore.kernel.org/r/20201116040721.8001-1-rdunlap@infradead.org Signed-off-by: Mark Brown commit f32cce8483f18a098ae50b524f926ef0f2bd2e12 Author: bayi cheng Date: Wed Nov 11 16:55:02 2020 +0800 spi: spi-mtk-nor: add axi clock control for MT8192 spi-nor MT8192 spi-nor is an independent sub system, we need extra control axi bus clock for it. Add support for the additional axi clock to allow it to be configured appropriately. Signed-off-by: bayi cheng Tested-by: Ikjoon Jang Link: https://lore.kernel.org/r/1605084902-13151-2-git-send-email-bayi.cheng@mediatek.com Signed-off-by: Mark Brown commit 6c2b6bb0d34319ea8390dc8b46465332b1dae025 Author: Kai Vehmanen Date: Mon Nov 16 16:26:42 2020 +0200 ASoC: SOF: Intel: initial support for Alderlake-S Add Kconfig entries, PCI ID and chip info for Alderlake-S product. Signed-off-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20201116142642.2106067-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 299fe9937dbd1a4d9a1da6a2b6f222298534ca57 Author: Jerome Brunet Date: Mon Nov 16 18:24:23 2020 +0100 ASoC: meson: fix COMPILE_TEST error When compiled with CONFIG_HAVE_CLK, the kernel need to get provider for the clock API. This is usually selected by the platform and the sound drivers should not really care about this. However COMPILE_TEST is special and the platform required may not have been selected, leading to this type of error: > aiu-encoder-spdif.c:(.text+0x3a0): undefined reference to `clk_set_parent' Since we need a sane provider of the API with COMPILE_TEST, depends on COMMON_CLK. Fixes: 6dc4fa179fb8 ("ASoC: meson: add axg fifo base driver") Reported-by: kernel test robot Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20201116172423.546855-1-jbrunet@baylibre.com Signed-off-by: Mark Brown commit 7141f25f14e03a0b049ffb2010b12abf652a10f3 Author: Dan Carpenter Date: Mon Nov 16 15:59:50 2020 +0300 ASoC: qcom: sc7180: initialize the "no_headphone" variable The "no_headphone" variable is never set to "false" so it could be uninitialized. Fixes: e936619b7ce7 ("ASoC: qcom: sc7180: Modify machine driver for sound card") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20201116125950.GA44063@mwanda Signed-off-by: Mark Brown commit 3d32489838bbf3119bb1ea59cdbed0077d7dbf3c Author: Cezary Rojewski Date: Mon Nov 16 14:33:32 2020 +0100 ASoC: Intel: catpt: Cleanup after power routines streamlining With LPT switching to WPT-based power on/off routines, functions that have been previously used by it are rendered redundant so remove them. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20201116133332.8530-6-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit c440c72474e12fcf79bbe716d4796d16b7201031 Author: Cezary Rojewski Date: Mon Nov 16 14:33:31 2020 +0100 ASoC: Intel: catpt: Streamline power routines across LPT and WPT There is no need for separate power on/off routines for LPT and WPT as as the protocol is shared for both platforms. Make WPT routines generic and reuse them in LPT case too. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20201116133332.8530-5-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 768a3a3b327da88c2fa6856806d32852a90e75d5 Author: Cezary Rojewski Date: Mon Nov 16 14:33:30 2020 +0100 ASoC: Intel: catpt: Optimize applying user settings Initial user settings such as volume control need to be applied only once after stream is allocated. As prepare() operation can be invoked multiple times during the stream's lifetime, relocate catpt_dai_apply_usettings() and call it directly within catpt_dai_hw_params() rather than on every catpt_dai_prepare(). catpt_dai_apply_usettings() remains unchanged. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20201116133332.8530-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 25d27c4f68d2040c4772d586be3e02ee99eb71af Author: Kirill Marinushkin Date: Sun Nov 15 13:23:06 2020 +0100 ASoC: pcm512x: Add support for more data formats Currently, pcm512x driver supports only I2S data format. This commit adds RJ, LJ, DSP_A and DSP_B as well. I don't expect regression WRT existing sound cards, because: * default value in corresponding register of pcm512x codec is 0 == I2S * existing in-tree sound cards with pcm512x codec are configured for I2S * i don't see how existing off-tree sound cards with pcm512x codec could be configured differently - it would not work * tested explicitly, that there is no regression with Raspberry Pi + sound card `sound/soc/bcm/hifiberry_dacplus.c` Signed-off-by: Kirill Marinushkin Cc: Mark Brown Cc: Takashi Iwai Cc: Liam Girdwood Cc: Matthias Reichl Cc: Kuninori Morimoto Cc: Peter Ujfalusi Cc: alsa-devel@alsa-project.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20201115122306.18164-5-kmarinushkin@birdec.com Signed-off-by: Mark Brown commit 26b97d95a05d0346e1ad6096deedac3f24a4607b Author: Kirill Marinushkin Date: Sun Nov 15 13:23:05 2020 +0100 ASoC: pcm512x: Move format check into `set_fmt()` I would like to describe the reasoning by quoting Peter Ujfalusi from his review of this patch series v1 [1]: > When you bind a link you will use set_fmt for the two sides to see if > they can agree, that both can support what has been asked. > > The pcm512x driver just saves the fmt and say back to that card: > whatever, I'm fine with it. But runtime during hw_params it can fail due > to unsupported bus format, which it actually acked to be ok. > > This is the difference. > > Sure, some device have constraint based on the fmt towards the hw_params > and it is perfectly OK to do such a checks and rejections or build > rules/constraints based on fmt, but failing hw_params just because > set_fmt did not checked that the bus format is not even supported is not > a nice thing to do. [1] https://patchwork.kernel.org/project/alsa-devel/patch/ 20201109212133.25869-1-kmarinushkin@birdec.com/ Signed-off-by: Kirill Marinushkin Cc: Mark Brown Cc: Takashi Iwai Cc: Liam Girdwood Cc: Matthias Reichl Cc: Kuninori Morimoto Cc: Peter Ujfalusi Cc: alsa-devel@alsa-project.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20201115122306.18164-4-kmarinushkin@birdec.com Signed-off-by: Mark Brown commit 798714b6121d833c8abe4161761a94fdd1e73a90 Author: Kirill Marinushkin Date: Sun Nov 15 13:23:04 2020 +0100 ASoC: pcm512x: Rearrange operations in `hw_params()` This commit is a preparation for the next patch in the series. It's goal is to make format check easy-to-move-out. Theoretically, more butifications are possile in `hw_params()` func, but my intention in this commit is to keep behaviour unchanged. Signed-off-by: Kirill Marinushkin Cc: Mark Brown Cc: Takashi Iwai Cc: Liam Girdwood Cc: Matthias Reichl Cc: Kuninori Morimoto Cc: Peter Ujfalusi Cc: alsa-devel@alsa-project.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20201115122306.18164-3-kmarinushkin@birdec.com Signed-off-by: Mark Brown commit 6feaaa7c19bde25595e03bf883953f85711e4ac8 Author: Kirill Marinushkin Date: Sun Nov 15 13:23:03 2020 +0100 ASoC: pcm512x: Fix not setting word length if DAIFMT_CBS_CFS In `pcm512x_hw_params()`, the following switch-case: ~~~~ switch (pcm512x->fmt & SND_SOC_DAIFMT_MASTER_MASK) { case SND_SOC_DAIFMT_CBS_CFS: ~~~~ returns 0, which was preventing word length from being written into codecs register. Fixed by writing it into register before checking `SND_SOC_DAIFMT_MASTER_MASK`. Tested with Raspberry Pi + sound card `hifiberry_dacplus` in CBS_CFS format Signed-off-by: Kirill Marinushkin Cc: Mark Brown Cc: Takashi Iwai Cc: Liam Girdwood Cc: Matthias Reichl Cc: Kuninori Morimoto Cc: Peter Ujfalusi Cc: alsa-devel@alsa-project.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20201115122306.18164-2-kmarinushkin@birdec.com Signed-off-by: Mark Brown commit c15058d5fb87e73822f7e15aa3961ea5c418aeaf Author: Jonathan Cameron Date: Sat Oct 31 13:41:03 2020 +0000 dt-bindings:iio:dac:nxp,lpc1850-dac yaml conversion. Very similar binding to that for the ADC on the same device. Conversion from txt to yaml format. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Acked-by: Vladimir Zapolskiy Link: https://lore.kernel.org/r/20201031134110.724233-23-jic23@kernel.org commit 9de14fa28d92c94a66c96601872b790cdc7b00ed Author: Jonathan Cameron Date: Sat Oct 31 13:41:02 2020 +0000 dt-bindings:iio:dac:maxim,max5821 yaml conversion Simple txt to yaml conversion for this binding description. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Philippe Reynes Link: https://lore.kernel.org/r/20201031134110.724233-22-jic23@kernel.org commit 6ced946a4bba1de4e7a7cfa93ea3f8046a2dee2e Author: Jonathan Cameron Date: Sat Oct 31 13:41:01 2020 +0000 dt-bindings:iio:dac:microchip,mcp4725 yaml conversion I'm not sure vdd-supply absolutely has to be provided if vref-supply is, but as the previous binding docs stated it was required it seems reasonable to leave it as such. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Tomas Novotny Link: https://lore.kernel.org/r/20201031134110.724233-21-jic23@kernel.org commit 87b8092e6b9e558766f62b169859111e6d630843 Author: Jonathan Cameron Date: Sat Oct 31 13:41:00 2020 +0000 dt-bindings:iio:dac:fsl,vf610-dac yaml conversion Simple binding to convert. Example expanded a little to include an example bus. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Sanchayan Maity Link: https://lore.kernel.org/r/20201031134110.724233-20-jic23@kernel.org commit e0d8ef7d2f2934211b2af3f8d4dcb403ec4e2b0a Author: Jonathan Cameron Date: Sat Oct 31 13:40:59 2020 +0000 dt-bindings:iio:dac:maxim,ds4424 yaml conversion Simple conversion of this straight forward binding. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Ismail H. Kose Link: https://lore.kernel.org/r/20201031134110.724233-19-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 6918ed88bf35605df634db74734262b74c372920 Author: Jonathan Cameron Date: Sat Oct 31 13:40:58 2020 +0000 dt-bindings:iio:dac:adi,ad7303 yaml conversion Converted to maintain the requirement for Vdd-supply as per original file. It is possible we could relax this requirement to make it at least one of Vdd-supply and REF-supply. We need to establish the scaling of the output channel and if REF-supply is provided that is used instead of Vdd-supply, hence I cannot see why a dummy regulator cannot be used for Vdd-supply if this happens. For now, let us keep it simple. Drop adi,use-external-reference from binding example as no such binding exists. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Lars-Peter Clausen Link: https://lore.kernel.org/r/20201031134110.724233-18-jic23@kernel.org commit 8b74e06b0f4db833aa11b21e31fb40d6ded3c093 Author: Jonathan Cameron Date: Sat Oct 31 13:40:56 2020 +0000 dt-bindings:iio:dac:ti,dac7612 yaml conversion Simple conversion from txt to yaml. No significant adjustments. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Acked-by: Ricardo Ribalda Delgado Link: https://lore.kernel.org/r/20201031134110.724233-16-jic23@kernel.org commit 5034ceaff5a7d7bfc46c5c2bfbfe9276658219f8 Author: Jonathan Cameron Date: Sat Oct 31 13:40:55 2020 +0000 dt-bindings:iio:dac:ti,dac7512 yaml conversion This one is a bit interesting because the binding was moved from misc a while back, but the linux support for this device is provided via the ad5446 DAC driver which doesn't currently have a binding. For now, lets just convert this file over, but we may want to think about consolidating this with proper documentation of the bindings for the other parts supported by the ad5446 driver. As Daniel Mack does not seem to have been active since 2015, I've put myself as maintainer of this binding for now. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201031134110.724233-15-jic23@kernel.org commit b120365fa6e852256c2efcd3a2f6cec1fbeb17cd Author: Jonathan Cameron Date: Sat Oct 31 13:40:54 2020 +0000 dt-bindings:iio:dac:ti,dac7311 yaml conversion Very simple conversion of this binding from txt to yaml. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Charles-Antoine Couret Link: https://lore.kernel.org/r/20201031134110.724233-14-jic23@kernel.org commit 3eccfe575e00b9cdaed0600c079194b0be358ac9 Author: Jonathan Cameron Date: Sat Oct 31 13:40:53 2020 +0000 dt-bindings:iio:dac:ti,dac5571 yaml conversion. A few tweaks in this conversion. * The example didn't have the I2C address of 4C in the node name so fixed that. * The reference voltage in the txt file is an optional binding, but the driver is making use of it to provide the scaling of the output channels. As such I have made it required going forwards. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Acked-by: Sean Nyekjaer Link: https://lore.kernel.org/r/20201031134110.724233-13-jic23@kernel.org commit 4cffe21d4a6272ae905b3e915778b1fb1300f267 Merge: 78a56e0494ad2 c8d5ed67936fd Author: Thomas Gleixner Date: Mon Nov 16 20:51:59 2020 +0100 Merge branch 'x86/entry' into core/entry Prepare for the merging of the syscall_work series which conflicts with the TIF bits overhaul in X86. commit e9d2871f69212a5fb5a8c021dd0195cb502add44 Author: Mauro Carvalho Chehab Date: Mon Nov 16 11:18:01 2020 +0100 drm: fix some kernel-doc markups Some identifiers have different names between their prototypes and the kernel-doc markup. Others need to be fixed, as kernel-doc markups should use this format: identifier - description Signed-off-by: Mauro Carvalho Chehab Acked-by: Jani Nikula Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/12d4ca26f6843618200529ce5445063734d38c04.1605521731.git.mchehab+huawei@kernel.org commit c9afbf586e4f5a7e681aef38b6f1279fbabc368c Author: Ville Syrjälä Date: Tue Nov 10 01:12:39 2020 +0200 drm/i915: Relocate cnl_get_ddi_pll() Move cnl_get_ddi_pll() into a better spot from between icl_get_ddi_pll() and dg1_get_ddi_pll(). Also reorder the calls to the skl and bxt functions because ocd. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201109231239.17002-4-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit 3749de07bb11b1cc5ad7ec993d879446adae9505 Author: Ville Syrjälä Date: Tue Nov 10 01:12:38 2020 +0200 drm/i915: Use actual readout results for .get_freq() Currently the DPLL .get_freq() uses pll->state.hw_state which is not the thing we actually read out (except during driver load/resume). Outside of that pll->state.hw_state is just the thing we committed last time around. During state check we just read the thing into crtc_state->dpll_hw_state, so that is what we should use for calculating the DPLL output frequency. I think we used to do this so that the results of the readout were actually used, but somehow it got changed when the .get_freq() refactoring happened. Cc: Imre Deak Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201109231239.17002-3-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit b97fcaeee23c1db1dbfffbfb946a5cceeede5958 Author: Ville Syrjälä Date: Tue Nov 10 01:12:37 2020 +0200 drm/i915: Move intel_dpll_get_hw_state() into the hsw+ platform specific functions On icl+ we want to populate both crtc_state.{shared_dpll,dpll_hw_state} and crtc_state.port_dplls[] during readout, whereas on pre-icl we want to leave the latter stuff untouched. Rather than adding more ifs into hsw_get_ddi_port_state() to copy the DPLL hw state around let's just move the whole dpll readout into hsw_get_ddi_dpll() & co. Slightly repetitive, but meh. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201109231239.17002-2-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit 3ceb6543e9cf6ed87cc1fbc6f23ca2db903564cd Author: Eric Biggers Date: Fri Oct 23 17:51:31 2020 -0700 fscrypt: remove kernel-internal constants from UAPI header There isn't really any valid reason to use __FSCRYPT_MODE_MAX or FSCRYPT_POLICY_FLAGS_VALID in a userspace program. These constants are only meant to be used by the kernel internally, and they are defined in the UAPI header next to the mode numbers and flags only so that kernel developers don't forget to update them when adding new modes or flags. In https://lkml.kernel.org/r/20201005074133.1958633-2-satyat@google.com there was an example of someone wanting to use __FSCRYPT_MODE_MAX in a user program, and it was wrong because the program would have broken if __FSCRYPT_MODE_MAX were ever increased. So having this definition available is harmful. FSCRYPT_POLICY_FLAGS_VALID has the same problem. So, remove these definitions from the UAPI header. Replace FSCRYPT_POLICY_FLAGS_VALID with just listing the valid flags explicitly in the one kernel function that needs it. Move __FSCRYPT_MODE_MAX to fscrypt_private.h, remove the double underscores (which were only present to discourage use by userspace), and add a BUILD_BUG_ON() and comments to (hopefully) ensure it is kept in sync. Keep the old name FS_POLICY_FLAGS_VALID, since it's been around for longer and there's a greater chance that removing it would break source compatibility with some program. Indeed, mtd-utils is using it in an #ifdef, and removing it would introduce compiler warnings (about FS_POLICY_FLAGS_PAD_* being redefined) into the mtd-utils build. However, reduce its value to 0x07 so that it only includes the flags with old names (the ones present before Linux 5.4), and try to make it clear that it's now "frozen" and no new flags should be added to it. Fixes: 2336d0deb2d4 ("fscrypt: use FSCRYPT_ prefix for uapi constants") Cc: # v5.4+ Link: https://lore.kernel.org/r/20201024005132.495952-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit ed45e201649344412445d6f65f0473a6112f0bcd Author: Eric Biggers Date: Fri Nov 13 13:19:17 2020 -0800 fs-verity: rename "file measurement" to "file digest" I originally chose the name "file measurement" to refer to the fs-verity file digest to avoid confusion with traditional full-file digests or with the bare root hash of the Merkle tree. But the name "file measurement" hasn't caught on, and usually people are calling it something else, usually the "file digest". E.g. see "struct fsverity_digest" and "struct fsverity_formatted_digest", the libfsverity_compute_digest() and libfsverity_sign_digest() functions in libfsverity, and the "fsverity digest" command. Having multiple names for the same thing is always confusing. So to hopefully avoid confusion in the future, rename "fs-verity file measurement" to "fs-verity file digest". This leaves FS_IOC_MEASURE_VERITY as the only reference to "measure" in the kernel, which makes some amount of sense since the ioctl is actively "measuring" the file. I'll be renaming this in fsverity-utils too (though similarly the 'fsverity measure' command, which is a wrapper for FS_IOC_MEASURE_VERITY, will stay). Acked-by: Luca Boccassi Link: https://lore.kernel.org/r/20201113211918.71883-4-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 9e90f30e78572ecfc1c74c735a034c955d822ba6 Author: Eric Biggers Date: Fri Nov 13 13:19:16 2020 -0800 fs-verity: rename fsverity_signed_digest to fsverity_formatted_digest The name "struct fsverity_signed_digest" is causing confusion because it isn't actually a signed digest, but rather it's the way that the digest is formatted in order to be signed. Rename it to "struct fsverity_formatted_digest" to prevent this confusion. Also update the struct's comment to clarify that it's specific to the built-in signature verification support and isn't a requirement for all fs-verity users. I'll be renaming this struct in fsverity-utils too. Acked-by: Luca Boccassi Link: https://lore.kernel.org/r/20201113211918.71883-3-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 7bf765dd8442d2b482803f50613b9c2543491f4a Author: Eric Biggers Date: Fri Nov 13 13:19:15 2020 -0800 fs-verity: remove filenames from file comments Embedding the file path inside kernel source code files isn't particularly useful as often files are moved around and the paths become incorrect. checkpatch.pl warns about this since v5.10-rc1. Acked-by: Luca Boccassi Link: https://lore.kernel.org/r/20201113211918.71883-2-ebiggers@kernel.org Signed-off-by: Eric Biggers commit fdbc5d682e75ed53e923627d7aa79ff0cb134d79 Author: Ville Syrjälä Date: Tue Nov 10 01:12:36 2020 +0200 drm/i915: Introduce intel_dpll_get_hw_state() Add a wrapper for the pll .get_hw_state() vfunc. Makes life a bit less miserable when you don't have to worry where the function pointer is stored. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201109231239.17002-1-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit 3df3fe2412000fec34f9185f67f7c63d37b615ad Author: Ville Syrjälä Date: Fri Nov 6 19:30:42 2020 +0200 drm/i915: Remove skl_adjusted_plane_pixel_rate() Replace skl_adjusted_plane_pixel_rate() with the generic intel_plane_pixel_rate(). The two should produce identical results. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201106173042.7534-7-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit ab01630b64ce19e1b845a4d83879eb9727306aa1 Author: Ville Syrjälä Date: Fri Nov 6 19:30:41 2020 +0200 drm/i915: Store plane relative data rate in crtc_state Store the relative data rate for planes in the crtc state so that we don't have to use intel_atomic_crtc_state_for_each_plane_state() to compute it even for the planes that are no part of the current state. Should probably just nuke this stuff entirely an use the normal plane data rate instead. The two are slightly different since this relative data rate doesn't factor in the actual pixel clock, so it's a bit odd thing to even call a "data rate". And since the watermarks are computed based on the actual data rate anyway I don't really see what the point of this relative data rate is. But that's for the future... Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201106173042.7534-6-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit d08a718742aa90f8ff496fd0916d3ce242c5421b Author: Jonathan Cameron Date: Sat Oct 31 13:40:52 2020 +0000 dt-bindings:iio:proximity:ams,as3935 yaml conversion A straight forward conversion of this binding. I have added a maximum SPI frequency from the datasheet. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Acked-by: Matt Ranostay Link: https://lore.kernel.org/r/20201031134110.724233-12-jic23@kernel.org commit b4be8bd1c6a20113737428fc5583aae8d45290ae Author: Jonathan Cameron Date: Sat Oct 31 13:40:51 2020 +0000 dt-bindings:iio:proximity:st,vl53l0x yaml conversion Straight forward conversion from txt to yaml. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Song Qiang Link: https://lore.kernel.org/r/20201031134110.724233-11-jic23@kernel.org commit 9c31212b247832d71882a9942f37025544264892 Author: Ville Syrjälä Date: Fri Nov 6 19:30:40 2020 +0200 drm/i915: Precompute can_sagv for each wm level In order to remove intel_atomic_crtc_state_for_each_plane_state() from skl_crtc_can_enable_sagv() we can simply precompute whether each wm level can tolerate the SAGV block time latency or not. This has the nice side benefit that we remove the duplicated wm level latency calculation. In fact the copy of that code we had in skl_crtc_can_enable_sagv() didn't even handle WaIncreaseLatencyIPCEnabled/Display WA #1141 whereas the copy in skl_compute_plane_wm() did. So now we just have the one copy which handles all the w/as. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201106173042.7534-5-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit 7fd5da368ed5895744372edc729d54e1a9728e40 Author: Jonathan Cameron Date: Sat Oct 31 13:40:50 2020 +0000 dt-bindings:iio:proximity:semtech,sx9500 yaml conversion. Simple conversion. There hasn't been much activity around this driver for a long time and I don't think I have any up to date contact details for the original authors. As such, I've listed myself as the binding maintainer. More than happy to hand it off to someone more relevant though! Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201031134110.724233-10-jic23@kernel.org commit 1517c6a30c0d16a80e5955ef058a2978331e5bdc Author: Jonathan Cameron Date: Sat Oct 31 13:40:49 2020 +0000 dt-bindings:iio:pressure:hoperf,hp03 yaml conversion One quirk in the txt file was that the xclr gpio was specified as xclr-gpio rather than xclr-gpios. I've fixed that in the yaml version. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Marek Vasut Link: https://lore.kernel.org/r/20201031134110.724233-9-jic23@kernel.org commit b1b69ba70de7233d5424b11b05f585359c26c8a7 Author: Jonathan Cameron Date: Sat Oct 31 13:40:48 2020 +0000 dt-bindings:iio:pressure:meas,ms5611 yaml conversion. One addition here was to put in a 20MHz maximum for the SPI bus as specified in the datasheets of both support parts. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Tomasz Duszynski Link: https://lore.kernel.org/r/20201031134110.724233-8-jic23@kernel.org commit 1cf4ad3f609b86044974110ee38d4956f404c409 Author: Jonathan Cameron Date: Sat Oct 31 13:40:47 2020 +0000 dt-bindings:iio:pressure:murata,zpa2326 yaml conversion Simple conversion with a few minor tweaks: * I added 1MHz max for spi-max-frequency * I have give myself as the maintainer. This driver was written by Gregor Boirie but I don't have an up to date email address for Gregor. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201031134110.724233-7-jic23@kernel.org commit 88b448502381fd1e8e30789640f470abb32c669e Author: Jonathan Cameron Date: Sat Oct 31 13:40:46 2020 +0000 dt-bindings:iio:pressure:ms5637 Drop separate doc + add to trivial-devices Very simple binding for this i2c device with no properties beyond reg and compatible. Hence doesn't need it's own document. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201031134110.724233-6-jic23@kernel.org commit 4dd49a1b9b9f801b4a479681987bc5c9eb61bd90 Author: Jonathan Cameron Date: Sat Oct 31 13:40:45 2020 +0000 dt-bindings:iio:humidity:dht11 yaml conversion The conversion is straight forward, but leaves an open question. The compatible for this device has never had a vendor. Harald Geyer has identified as probably being made by aosong, but we have no current match to any of their more specific part numbers. As such, this is noted in the file but the compatible doesn't include the vendor prefix. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Acked-By: Harald Geyer Link: https://lore.kernel.org/r/20201031134110.724233-5-jic23@kernel.org commit 9a6ac3138258393225621c711f62c7e6ff639b78 Author: Jonathan Cameron Date: Sat Oct 31 13:40:44 2020 +0000 dt-bindings:iio:humidity:st,hts221 yaml conversion. Straight forward conversion of this temperature and pressure sensor binding. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Lorenzo Bianconi Link: https://lore.kernel.org/r/20201031134110.724233-4-jic23@kernel.org commit 3c055f31ac69c7bd6dfc864ab9c0d1331fe26ae5 Author: Jonathan Cameron Date: Sat Oct 31 13:40:43 2020 +0000 dt-bindings:iio:humidity:htu21 Drop separate doc + add to trivial-devices Very simple binding for this i2c device with no properties beyond reg and compatible. Hence doesn't need it's own document. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201031134110.724233-3-jic23@kernel.org commit 126df08e54b183fe921f14e811507d6e2b54e042 Author: Jonathan Cameron Date: Sat Oct 31 13:40:42 2020 +0000 dt-bindings:iio:humidity:hdc100x Drop separate doc + add to trivial-devices Very simple binding for this i2c device with no properties beyond reg and compatible. Hence doesn't need it's own document. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Acked-by: Matt Ranostay Link: https://lore.kernel.org/r/20201031134110.724233-2-jic23@kernel.org commit 72308ecbf33b145641aba61071be31a85ebfd92c Merge: c0a645a7f9440 7ed90803a2137 Author: Jakub Kicinski Date: Mon Nov 16 10:46:10 2020 -0800 Merge branch 'mptcp-improve-multiple-xmit-streams-support' Paolo Abeni says: ==================== mptcp: improve multiple xmit streams support This series improves MPTCP handling of multiple concurrent xmit streams. The to-be-transmitted data is enqueued to a subflow only when the send window is open, keeping the subflows xmit queue shorter and allowing for faster switch-over. The above requires a more accurate msk socket state tracking and some additional infrastructure to allow pushing the data pending in the msk xmit queue as soon as the MPTCP's send window opens (patches 6-10). As a side effect, the MPTCP socket could enqueue data to subflows after close() time - to completely spooling the data sitting in the msk xmit queue. Dealing with the requires some infrastructure and core TCP changes (patches 1-5) Finally, patches 11-12 introduce a more accurate tracking of the other end's receive window. Overall this refactor the MPTCP xmit path, without introducing new features - the new code is covered by the existing self-tests. v2 -> v3: - rebased, - fixed checkpatch issue in patch 1/13 - fixed some state tracking issues in patch 8/13 v1 -> v2: - this is just a repost, to cope with patchwork issues, no changes at all ==================== Link: https://lore.kernel.org/r/cover.1605458224.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski commit 7ed90803a213736290bdcf971764ddb8ff3fa44f Author: Paolo Abeni Date: Mon Nov 16 10:48:14 2020 +0100 mptcp: send explicit ack on delayed ack_seq incr When the worker moves some bytes from the OoO queue into the receive queue, the msk->ask_seq is updated, the MPTCP-level ack carrying that value needs to wait the next ingress packet, possibly slowing down or hanging the peer Signed-off-by: Paolo Abeni Signed-off-by: Jakub Kicinski commit 6f8a612a33e426d473f7161d1950dc00a613494b Author: Florian Westphal Date: Mon Nov 16 10:48:13 2020 +0100 mptcp: keep track of advertised windows right edge Before sending 'x' new bytes also check that the new snd_una would be within the permitted receive window. For every ACK that also contains a DSS ack, check whether its tcp-level receive window would advance the current mptcp window right edge and update it if so. Signed-off-by: Florian Westphal Co-developed-by: Paolo Abeni Signed-off-by: Paolo Abeni Signed-off-by: Jakub Kicinski commit 8edf08649eede6e5a3e39a3d38c63f30039a0c1e Author: Florian Westphal Date: Mon Nov 16 10:48:12 2020 +0100 mptcp: rework poll+nospace handling MPTCP maintains a status bit, MPTCP_SEND_SPACE, that is set when at least one subflow and the mptcp socket itself are writeable. mptcp_poll returns EPOLLOUT if the bit is set. mptcp_sendmsg makes sure MPTCP_SEND_SPACE gets cleared when last write has used up all subflows or the mptcp socket wmem. This reworks nospace handling as follows: MPTCP_SEND_SPACE is replaced with MPTCP_NOSPACE, i.e. inverted meaning. This bit is set when the mptcp socket is not writeable. The mptcp-level ack path schedule will then schedule the mptcp worker to allow it to free already-acked data (and reduce wmem usage). This will then wake userspace processes that wait for a POLLOUT event. sendmsg will set MPTCP_NOSPACE only when it has to wait for more wmem (blocking I/O case). poll path will set MPTCP_NOSPACE in case the mptcp socket is not writeable. Normal tcp-level notification (SOCK_NOSPACE) is only enabled in case the subflow socket has no available wmem. Signed-off-by: Florian Westphal Signed-off-by: Paolo Abeni Signed-off-by: Jakub Kicinski commit 813e0a683d4cacb668622bc9a1693cb82b5f8ff8 Author: Paolo Abeni Date: Mon Nov 16 10:48:11 2020 +0100 mptcp: try to push pending data on snd una updates After the previous patch we may end-up with unsent data in the write buffer. If such buffer is full, the writer will block for unlimited time. We need to trigger the MPTCP xmit path even for the subflow rx path, on MPTCP snd_una updates. Keep things simple and just schedule the work queue if needed. Signed-off-by: Paolo Abeni Signed-off-by: Jakub Kicinski commit d9ca1de8c0cd7a8ca2a0506e1741418741848e53 Author: Paolo Abeni Date: Mon Nov 16 10:48:10 2020 +0100 mptcp: move page frag allocation in mptcp_sendmsg() mptcp_sendmsg() is refactored so that first it copies the data provided from user space into the send queue, and then tries to spool the send queue via sendmsg_frag. There a subtle change in the mptcp level collapsing on consecutive data fragment: we now allow that only on unsent data. The latter don't need to deal with msghdr data anymore and can be simplified in a relevant way. snd_nxt and write_seq are now tracked independently. Overall this allows some relevant cleanup and will allow sending pending mptcp data on msk una update in later patch. Co-developed-by: Florian Westphal Signed-off-by: Florian Westphal Signed-off-by: Paolo Abeni Signed-off-by: Jakub Kicinski commit e16163b6e2b720fb74e5af758546f6dad27e6c9e Author: Paolo Abeni Date: Mon Nov 16 10:48:09 2020 +0100 mptcp: refactor shutdown and close We must not close the subflows before all the MPTCP level data, comprising the DATA_FIN has been acked at the MPTCP level, otherwise we could be unable to retransmit as needed. __mptcp_wr_shutdown() shutdown is responsible to check for the correct status and close all subflows. Is called by the output path after spooling any data and at shutdown/close time. In a similar way, __mptcp_destroy_sock() is responsible to clean-up the MPTCP level status, and is called when the msk transition to TCP_CLOSE. The protocol level close() does not force anymore the TCP_CLOSE status, but orphan the msk socket and all the subflows. Orphaned msk sockets are forciby closed after a timeout or when all MPTCP-level data is acked. There is a caveat about keeping the orphaned subflows around: the TCP stack can asynchronusly call tcp_cleanup_ulp() on them via tcp_close(). To prevent accessing freed memory on later MPTCP level operations, the msk acquires a reference to each subflow socket and prevent subflow_ulp_release() from releasing the subflow context before __mptcp_destroy_sock(). The additional subflow references are released by __mptcp_done() and the async ULP release is detected checking ULP ops. If such field has been already cleared by the ULP release path, the dangling context is freed directly by __mptcp_done(). Co-developed-by: Davide Caratti Signed-off-by: Davide Caratti Signed-off-by: Paolo Abeni Signed-off-by: Jakub Kicinski commit eaa2ffabfc35580da3fb1d31897fb696c514ea7a Author: Paolo Abeni Date: Mon Nov 16 10:48:08 2020 +0100 mptcp: introduce MPTCP snd_nxt Track the next MPTCP sequence number used on xmit, currently always equal to write_next. Signed-off-by: Paolo Abeni Signed-off-by: Jakub Kicinski commit f0e6a4cf11f16425ccdc69f4410e4fe59719a9ea Author: Paolo Abeni Date: Mon Nov 16 10:48:07 2020 +0100 mptcp: add accounting for pending data Preparation patch to track the data pending in the msk write queue. No functional change introduced here Signed-off-by: Paolo Abeni Signed-off-by: Jakub Kicinski commit caf971df01b86f33f151bcfa61b4385cf5e43822 Author: Paolo Abeni Date: Mon Nov 16 10:48:06 2020 +0100 mptcp: reduce the arguments of mptcp_sendmsg_frag The current argument list is pretty long and quite unreadable, move many of them into a specific struct. Later patches will add more stuff to such struct. Additionally drop the 'timeo' argument, now unused. Signed-off-by: Paolo Abeni Signed-off-by: Jakub Kicinski commit ba8f48f7a4d79352b764ace585b5f602ef940be0 Author: Paolo Abeni Date: Mon Nov 16 10:48:05 2020 +0100 mptcp: introduce mptcp_schedule_work remove some of code duplications an allow preventing rescheduling on close. Signed-off-by: Paolo Abeni Signed-off-by: Jakub Kicinski commit 77c3c95637526f1e4330cc9a4b2065f668c2c4fe Author: Paolo Abeni Date: Mon Nov 16 10:48:04 2020 +0100 tcp: factor out __tcp_close() helper unlocked version of protocol level close, will be used by MPTCP to allow decouple orphaning and subflow level close. Signed-off-by: Paolo Abeni Signed-off-by: Jakub Kicinski commit e2223995a2872c0e23ed44e1dbb493817b567666 Author: Paolo Abeni Date: Mon Nov 16 10:48:03 2020 +0100 mptcp: use tcp_build_frag() mptcp_push_pending() is called even on orphaned msk (and orphaned subflows), if there is outstanding data at close() time. To cope with the above MPTCP needs to handle explicitly the allocation failure on xmit. The newly introduced do_tcp_sendfrag() allows that, just plug it. We can additionally drop a couple of sanity checks, duplicate in the TCP code. Signed-off-by: Paolo Abeni Signed-off-by: Jakub Kicinski commit b796d04bd014fd24e60ab4a6c604b258ac947825 Author: Paolo Abeni Date: Mon Nov 16 10:48:02 2020 +0100 tcp: factor out tcp_build_frag() Will be needed by the next patch, as MPTCP needs to handle directly the error/memory-allocation-needed path. No functional changes intended. Additionally let MPTCP code access the tcp_remove_empty_skb() helper. Signed-off-by: Paolo Abeni Signed-off-by: Jakub Kicinski commit 4697958b056b112063e968857cefa7173ad5c732 Author: Flavio Suligoi Date: Thu Nov 12 14:15:45 2020 +0100 Documentation: ACPI: explain how to use gpio-line-names The "gpio-line-names" declaration is not fully documented, so can be useful to add some important information and one more example. Signed-off-by: Flavio Suligoi Reviewed-by: Andy Shevchenko Reviewed-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki commit c80a0c52d85c49a910d0dc0e342e8d8898677dc0 Author: Leon Romanovsky Date: Wed Nov 4 16:40:07 2020 +0200 RDMA/cma: Add missing error handling of listen_id Don't silently continue if rdma_listen() fails but destroy previously created CM_ID and return an error to the caller. Fixes: d02d1f5359e7 ("RDMA/cma: Fix deadlock destroying listen requests") Link: https://lore.kernel.org/r/20201104144008.3808124-5-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 0413755c95e76972451ac8433151bc368a065a3f Author: Leon Romanovsky Date: Wed Nov 4 16:40:06 2020 +0200 RDMA/restrack: Store all special QPs in restrack DB Special QPs (SMI and GSI) have different rules in regards of their QP numbers. While all other QP numbers are unique per-device, the QP0 and QP1 are created per-port as requested by IBTA. In multiple port devices, the number of SMI and GSI QPs with be equal to the number ports. $ rdma dev 0: ibp0s9: node_type ca fw 4.4.9999 node_guid 5254:00c0:fe12:3455 sys_image_guid 5254:00c0:fe12:3455 $ rdma link 0/1: ibp0s9/1: subnet_prefix fe80:0000:0000:0000 lid 13397 sm_lid 49151 lmc 0 state ACTIVE physical_state LINK_UP 0/2: ibp0s9/2: subnet_prefix fe80:0000:0000:0000 lid 13397 sm_lid 49151 lmc 0 state UNKNOWN physical_state UNKNOWN Before: $ rdma res show qp type SMI,GSI link ibp0s9/1 lqpn 0 type SMI state RTS sq-psn 0 comm [ib_core] link ibp0s9/1 lqpn 1 type GSI state RTS sq-psn 0 comm [ib_core] After: $ rdma res show qp type SMI,GSI link ibp0s9/1 lqpn 0 type SMI state RTS sq-psn 0 comm [ib_core] link ibp0s9/1 lqpn 1 type GSI state RTS sq-psn 0 comm [ib_core] link ibp0s9/2 lqpn 0 type SMI state RTS sq-psn 0 comm [ib_core] link ibp0s9/2 lqpn 1 type GSI state RTS sq-psn 0 comm [ib_core] Link: https://lore.kernel.org/r/20201104144008.3808124-4-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 8bc205eff3056a9ed3850937cdd2192f05e6d3cb Author: Leon Romanovsky Date: Wed Nov 4 16:40:05 2020 +0200 RDMA/counter: Combine allocation and bind logic RDMA counters are allocated and bounded to QP immediately after that. Only after this two step process they are really usable. By combining the logic, we are ensuring that once counter is returned to the caller, it will have everything set. Link: https://lore.kernel.org/r/20201104144008.3808124-3-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit dc924b062488a0376aae41d3e0a27dc99f852a5e Author: Paolo Bonzini Date: Sun Nov 15 09:44:18 2020 -0500 KVM: SVM: check CR4 changes against vcpu->arch Similarly to what vmx/vmx.c does, use vcpu->arch.cr4 to check if CR4 bits PGE, PKE and OSXSAVE have changed. When switching between VMCB01 and VMCB02, CPUID has to be adjusted every time if CR4.PKE or CR4.OSXSAVE change; without this patch, instead, CR4 would be checked against the previous value for L2 on vmentry, and against the previous value for L1 on vmexit, and CPUID would not be updated. Signed-off-by: Paolo Bonzini commit 7e8e6eed75e290526d5c98d023e88b141e2c93ec Author: Cathy Avery Date: Sun Oct 11 14:48:17 2020 -0400 KVM: SVM: Move asid to vcpu_svm KVM does not have separate ASIDs for L1 and L2; either the nested hypervisor and nested guests share a single ASID, or on older processor the ASID is used only to implement TLB flushing. Either way, ASIDs are handled at the VM level. In preparation for having different VMCBs passed to VMLOAD/VMRUN/VMSAVE for L1 and L2, store the current ASID to struct vcpu_svm and only move it to the VMCB in svm_vcpu_run. This way, TLB flushes can be applied no matter which VMCB will be active during the next svm_vcpu_run. Signed-off-by: Cathy Avery Message-Id: <20201011184818.3609-2-cavery@redhat.com> Signed-off-by: Paolo Bonzini commit 789f52c071a0fdaa15ed119912fedd840458e25f Author: Alex Shi Date: Fri Nov 6 16:39:23 2020 +0800 x86/kvm: remove unused macro HV_CLOCK_SIZE This macro is useless, and could cause gcc warning: arch/x86/kernel/kvmclock.c:47:0: warning: macro "HV_CLOCK_SIZE" is not used [-Wunused-macros] Let's remove it. Signed-off-by: Alex Shi Cc: Paolo Bonzini Cc: Sean Christopherson Cc: Vitaly Kuznetsov Cc: Wanpeng Li Cc: Jim Mattson Cc: Joerg Roedel Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: x86@kernel.org Cc: "H. Peter Anvin" Cc: kvm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Message-Id: <1604651963-10067-1-git-send-email-alex.shi@linux.alibaba.com> Signed-off-by: Paolo Bonzini commit 22f232d134e142022f5e4cf2de4587a34d5b7d65 Author: Andrew Jones Date: Wed Nov 11 13:26:35 2020 +0100 KVM: selftests: x86: Set supported CPUIDs on default VM Almost all tests do this anyway and the ones that don't don't appear to care. Only vmx_set_nested_state_test assumes that a feature (VMX) is disabled until later setting the supported CPUIDs. It's better to disable that explicitly anyway. Signed-off-by: Andrew Jones Message-Id: <20201111122636.73346-11-drjones@redhat.com> [Restore CPUID_VMX, or vmx_set_nested_state breaks. - Paolo] Signed-off-by: Paolo Bonzini commit 08d3e27718bd45ea3284b1b99a2082a233b8667c Author: Andrew Jones Date: Wed Nov 11 13:26:36 2020 +0100 KVM: selftests: Make test skipping consistent Signed-off-by: Andrew Jones Message-Id: <20201111122636.73346-12-drjones@redhat.com> Signed-off-by: Paolo Bonzini commit e44fb034b03231cd117d6db73fb8048deab6ea41 Author: Mansur Alisha Shaik Date: Mon Oct 19 06:18:13 2020 +0200 media: venus: core: vote with average bandwidth and peak bandwidth as zero As per bandwidth table video driver is voting with average bandwidth for "video-mem" and "cpu-cfg" paths as peak bandwidth is zero in bandwidth table. suspend") Fixes: 07f8f22a33a9e ("media: venus: core: remove CNOC voting while device Signed-off-by: Mansur Alisha Shaik Reviewed-by: Stephen Boyd Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 9e8efdb5787986cc0d0134925cf5c4f001bb3f2e Author: Mansur Alisha Shaik Date: Mon Oct 19 06:18:12 2020 +0200 media: venus: core: vote for video-mem path Currently video driver is voting for venus0-ebi path during buffer processing with an average bandwidth of all the instances and unvoting during session release. While video streaming when we try to do XO-SD using the command "echo mem > /sys/power/state command" , device is not entering to suspend state and from interconnect summary seeing votes for venus0-ebi Corrected this by voting for venus0-ebi path in venus_runtime_resume() and unvote during venus_runtime_suspend(). suspend") Fixes: 07f8f22a33a9e ("media: venus: core: remove CNOC voting while device Signed-off-by: Mansur Alisha Shaik Reviewed-by: Stephen Boyd Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 21926d466e3a4f35c2536244d1d56512cc81a0a9 Author: Mansur Alisha Shaik Date: Mon Oct 19 06:18:11 2020 +0200 media: venus: core: change clk enable and disable order in resume and suspend Currently video driver is voting after clk enable and un voting before clk disable. This is incorrect, video driver should vote before clk enable and unvote after clk disable. Corrected this by changing the order of clk enable and clk disable. suspend") Fixes: 07f8f22a33a9e ("media: venus: core: remove CNOC voting while device Signed-off-by: Mansur Alisha Shaik Reviewed-by: Stephen Boyd Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit de04408fd12d5d3b9fb3724034666a84cccbf190 Author: Alexandre Courbot Date: Wed Oct 21 02:09:43 2020 +0200 media: venus: vdec: return parsed crop information from stream Per the stateful codec specification, VIDIOC_G_SELECTION with a target of V4L2_SEL_TGT_COMPOSE is supposed to return the crop area of capture buffers containing the decoded frame. Until now the driver did not get that information from the firmware and just returned the dimensions of CAPTURE buffers. The firmware unfortunately does not always provide the crop information from the stream ; also make sure to detect when that happens and fallback to providing the coded size in these cases. Signed-off-by: Alexandre Courbot Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 4568ea3fa95d33cc10e8938949ae9a875046e553 Author: Stanimir Varbanov Date: Sat Oct 24 18:35:09 2020 +0200 media: venus: venc: Fix default capture format The default codec after driver open is set to be H264 but the instance format for capture is wrongly set to H263. Correct this to H264. For regular applications this is not a big issue because they set the format through S_FMT but for example v4l2-compliance does not. Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 76980f5fa06d505879ba936b1b5066a056991de0 Author: Lukas Bulwahn Date: Sun Nov 15 16:53:36 2020 +0100 tracing: Clean up after filter logic rewriting The functions event_{set,clear,}_no_set_filter_flag were only used in replace_system_preds() [now, renamed to process_system_preds()]. Commit 80765597bc58 ("tracing: Rewrite filter logic to be simpler and faster") removed the use of those functions in replace_system_preds(). Since then, the functions event_{set,clear,}_no_set_filter_flag were unused. Fortunately, make CC=clang W=1 indicates this with -Wunused-function warnings on those three functions. So, clean up these obsolete unused functions. Link: https://lkml.kernel.org/r/20201115155336.20248-1-lukas.bulwahn@gmail.com Signed-off-by: Lukas Bulwahn Signed-off-by: Steven Rostedt (VMware) commit 250fe9a5c99783bd4440018e527fb1fb71ec0ca7 Author: Mauro Carvalho Chehab Date: Mon Nov 16 11:18:06 2020 +0100 video: fix some kernel-doc markups Some identifiers have different names between their prototypes and the kernel-doc markup. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/21661aed9892a1bacc7ef76a5dc9f5c7b37f5d8f.1605521731.git.mchehab+huawei@kernel.org commit 12c5365ea6b83c622544020dacd5b1d757f6e7e5 Author: Alex Deucher Date: Mon Nov 16 10:10:52 2020 -0500 drm/amdgpu: remove experimental flag from arcturus This has been stable for a while. Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 09bec07bbef508d5e264efdc48e88f0256607453 Author: Simon Ser Date: Sun Nov 15 09:39:38 2020 +0000 drm/fourcc: fix AMD modifiers PACKERS field doc This field doesn't alias with BANK_XOR_BITS: PACKERS is bits 27:29 while BANK_XOR_BITS is bits 24:26. Fixes: 8ba16d599374 ("drm/fourcc: Add AMD DRM modifiers.") Reviewed-by: Bas Nieuwenhuizen Signed-off-by: Simon Ser Cc: Bas Nieuwenhuizen Cc: Alex Deucher Cc: Daniel Vetter Signed-off-by: Alex Deucher commit c6ce6d1971a6dd33e7960612b774669fa0e57a5d Author: Yongqiang Sun Date: Thu Sep 10 09:01:58 2020 -0400 drm/amd/display: update vgh bounding box [Why & How] Update bounding box as per spread sheet. Signed-off-by: Yongqiang Sun Acked-by: Roman Li Signed-off-by: Alex Deucher commit 54e5f12ce530dd260722033ed9756fb107972a3f Author: Wyatt Wood Date: Tue Nov 3 15:07:33 2020 -0500 drm/amd/display: Increase sr enter/exit in rn ddr4 watermark table [Why] After removing added latency for HostVM by default, DDR4 sr exit latencies were no longer large enough for some panels and caused underflow. [How] Add 1us to sr enter/exit watermark. Signed-off-by: Wyatt Wood Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit 9a31996081d7ee998aa789742329c3433396c90c Author: Aric Cyr Date: Mon Nov 9 10:50:43 2020 -0500 drm/amd/display: 3.2.112 Signed-off-by: Aric Cyr Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit f1e1f272151b650528540dc41f220cb4373c5a21 Author: Raymond Yang Date: Sat Nov 7 04:25:45 2020 +0800 drm/amd/display: correct data type [Why] We should use int for counting variable [How] Change type from bool to uint32_t Signed-off-by: Raymond Yang Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit c920888c604d72799d057bbcd9e28a6c003ccfbe Author: Wayne Lin Date: Mon Oct 19 16:32:14 2020 +0800 drm/amd/display: Expose new CRC window property [Why] Instead of calculating CRC on whole frame, add flexibility to calculate CRC on specific frame region. [How] Add few crc window coordinate properties. By default, CRC is calculated on whole frame unless user space specifies the CRC calculation window. Signed-off-by: Wayne Lin Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit c88840f342c985433ff9286dbb3083fdce85170f Author: Anthony Koo Date: Sun Nov 8 13:08:18 2020 -0500 drm/amd/display: [FW Promotion] Release 0.0.42 Signed-off-by: Anthony Koo Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit 175f097149177ec97d8dd4fb5de673e99516be09 Author: Yongqiang Sun Date: Wed Nov 4 14:26:38 2020 -0500 drm/amd/display: Add dual edp optimization flag. [Why & How] Add a dual edp power optimization flag, so driver will notify this flag to dmub FW to determine if apply the power optimization. Signed-off-by: Yongqiang Sun Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit e26c9d80b830812b0fd4dc02cb9a6ac21ddc3bb0 Author: Yongqiang Sun Date: Wed Nov 4 16:35:35 2020 -0500 drm/amd/display: set dpp dto as per requested clk for lower case. [Why] Blue screen when PNP with multiple monitor or hotplug external monitor when playing video due to dpp dto isn't programmed properly. If lower dpp clock, dpp dto need to be programmed first, and actual dpp clk not avalable yet. [How] set dpp dto as per request clk for lower case before dpp clk update, and after dpp clk updated set dpp dto again with actual dpp clk. Signed-off-by: Yongqiang Sun Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit af435e3f62525cace7d9b2a7bbfe28aee59eb1a7 Author: Jacky Liao Date: Tue Oct 27 10:56:18 2020 -0400 drm/amd/display: Add I2C memory low power support [Why] The I2C memory blocks should be powered down when they are not in use. This will reduce power consumption. [How] 1. Write to I2C_LIGHT_SLEEP_FORCE to put memory in light sleep when released 2. Added a debug option to allow this behaviour to be turned off Signed-off-by: Jacky Liao Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit 65e870dfa6741e0c1199946faa4a1113bfb23916 Author: Roy Chan Date: Fri Oct 30 18:00:02 2020 -0400 drm/amd/display: Detect dynamic backlight support in eDP sink [Why] Check if the eDP sink supports the dynamic backlight control [How] Query the dynamic backlight capability in DPCD (eDP case only) Signed-off-by: Roy Chan Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit 786b4061742be1b494f1ca046c385717e6aa4434 Author: Wenjing Liu Date: Tue Oct 6 16:22:40 2020 -0400 drm/amd/display: minor restructuring of pbn calculation functions Signed-off-by: Wenjing Liu Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit aceeeea38a869845675e1a001e5915b5aaa5527a Author: Samson Tam Date: Fri Oct 30 12:30:09 2020 -0400 drm/amd/display: fix cursor calculation for 1xnY rotated display groups [Why] Cursor is missing on displays 2 and up when doing rotated display groups in 1xnY setup. Calculation puts cursor out of bounds so it is not enabled. [How] In dcn10_set_cursor_position(), add in viewport.y into cursor calculations for 1xnY rotated display groups. For pipe split, check viewport.y for both pipes and use lower one to normalize cursor position before calculations. Add odm 2:1 support ( using same calculations as pipe split ). Signed-off-by: Samson Tam Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit 89c5ca3b5e50acdb0ed69d8af2cf5a9b7e253dae Author: Dmytro Laktyushkin Date: Thu Aug 27 15:23:53 2020 -0400 drm/amd/display: remove unused dml variables Signed-off-by: Dmytro Laktyushkin Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit 157cc88505f11bf3aa3952223cccf174067816da Author: Sung Lee Date: Mon Nov 2 15:38:04 2020 -0500 drm/amd/display: Handle Unknown Result for SMU Periodic Retraining on DCN2.1 [WHY & HOW] Currently if VBIOSSMC_Result_UnknownCmd is returned as result of smu msg there is no way to know. Put 1 in param so if 1 is returned, this unknown case is handled. Signed-off-by: Sung Lee Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit 82df77ae4639af747adb223fb4678e3493e4a8b8 Author: Sung Lee Date: Fri Oct 30 19:31:51 2020 -0400 drm/amd/display: Populate hostvm parameter before DML calculation [Why] If the system does not have hostvm enabled, disabling it for DML validation will allow more modes to pass at lower voltage levels. [How] When initializing HostVM save state to hubbub and read back when populating DML pipes from context. Signed-off-by: Sung Lee Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit b8e0b3d611e3388361d86a19f27bf2a6d7366111 Author: Wyatt Wood Date: Wed Oct 21 08:36:51 2020 -0400 drm/amd/display: Hook up PSR residency command to DSAT [Why] Use GPINT command to get PSR residency from FW. [How] Hook up PSR residency command to DSAT. Since PSR Count Request is deprecated, we will use this. Signed-off-by: Wyatt Wood Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit 58cae8ac6b87c11917e58f3f4bbe4cd1c6d86352 Author: Yongqiang Sun Date: Mon Nov 2 14:22:57 2020 -0500 drm/amd/display: Program dpp dto based on actual dpp clk [Why] dpp dto phase and modulo are programmed with actual dpp global clk and pipe clk. Need to use actual dpp clk to prgoram dpp dto modulo to get more accuracy ratio. [How] assign actual dpp clk to dccg for dpp modulo programming. Signed-off-by: Yongqiang Sun Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit acf2740f12860456869711edfe83f658f2a1facb Author: Jane Jian Date: Fri Oct 16 15:54:59 2020 +0800 drm/amdgpu/sriov: reopen sienna_child smu ip block under sriov open smu ip block meets with one-vf mode need Signed-off-by: Jane Jian Reviewed-by: Monk Liu Signed-off-by: Alex Deucher commit 94d52a355f19286c7091c11ca23e9a602fe4d25e Author: Likun Gao Date: Mon Nov 16 11:09:27 2020 +0800 drm/amdgpu: update golden setting for sienna_cichlid Update golden setting for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 34d903d1a27eeb93a4ff53ce6b897dd1d9bbdae0 Author: Likun Gao Date: Mon Nov 16 15:25:28 2020 +0800 drm/amd/pm: update driver if file for sienna cichlid Update driver if file for sienna cichlid. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 93a8024130e218821c2d9cf7a7ed1ca8cdb8f809 Author: Xiaojian Du Date: Thu Nov 12 19:08:26 2020 +0800 drm/amd/pm: enable the fine grain tuning function for vangogh This patch is to enale the fine grain tuning function for vangogh. Signed-off-by: Xiaojian Du Reviewed-by: Evan Quan Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit c98ee89736b80fd1d4f4cdd0b0b9c6ce66f5d666 Author: Xiaojian Du Date: Thu Nov 12 18:39:48 2020 +0800 drm/amd/pm: add the fine grain tuning function for vangogh This patch is to add the fine grain tuning function for vangogh. This function uses the pp_od_clk_voltage sysfs file to configure the min and max value of gfx clock frequency or restore the default value. Command guide: echo "s level value" > pp_od_clk_voltage "s" - set the sclk frequency "level" - 0 or 1, "0" represents the min value, "1" represents the max value "value" - the target value of sclk frequency, it should be limited in the safe range echo "r" > pp_od_clk_voltage "r" - reset the sclk frequency, restore the default value instantly echo "c" > pp_od_clk_voltage "c" - commit the min and max value of sclk frequency to the system only after the commit command, the setting target values by "s" command will take effect. Example: 1)check the default sclk frequency $ cat pp_od_clk_voltage OD_SCLK: 0: 200Mhz 1: 1400Mhz OD_RANGE: SCLK: 200MHz 1400MHz 2)use "s" -- set command to configure the min or max sclk frequency $ echo "s 0 600" > pp_od_clk_voltage $ echo "s 1 1000" > pp_od_clk_voltage $ echo "c" > pp_od_clk_voltage $ cat pp_od_clk_voltage OD_SCLK: 0: 600Mhz 1: 1000Mhz OD_RANGE: SCLK: 200MHz 1400MHz 3)use "r" -- reset command to restore the min and max sclk frequency $ echo "r" > pp_od_clk_voltage $ cat pp_od_clk_voltage OD_SCLK: 0: 200Mhz 1: 1400Mhz OD_RANGE: SCLK: 200MHz 1400MHz Signed-off-by: Xiaojian Du Reviewed-by: Evan Quan Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 5fe6b98ae00dc2e0ac24ef8a45d828b82a4aae90 Author: Bhawanpreet Lakha Date: Fri Nov 13 15:04:54 2020 -0500 drm/amd/display: Update dmub code There is a delta in the dmub code - add boot options - add boot status - remove unused auto_load_is_done func pointer Signed-off-by: Bhawanpreet Lakha Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit b3fcde184e5047debe5d4e07396b5bb054aa1159 Author: Nirmoy Das Date: Thu Nov 12 18:36:01 2020 +0100 drm/amdgpu: fix usable gart size calculation amdgpu_do_test_moves() is failing because of wrong usable gart size calculation and throwing: [drm:amdgpu_do_test_moves [amdgpu]] *ERROR* 0000000020bdc9f3 bind failed Signed-off-by: Nirmoy Das Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 29396cd573da08ae9ab0b75925c2f6b3cabb9dfa Author: Ian Rogers Date: Wed Aug 26 08:30:55 2020 -0700 perf expr: Force encapsulation on expr_id_data This patch resolves some undefined behavior where variables in expr_id_data were accessed (for debugging) without being defined. To better enforce the tagged union behavior, the struct is moved into expr.c and accessors provided. Tag values (kinds) are explicitly identified. Signed-off-by: Ian Rogers Reviewed-By: Kajol Jain Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20200826153055.2067780-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 3d05181a085c7a070746c838ea25aebf25f17d52 Author: Jin Yao Date: Mon Nov 2 16:00:25 2020 +0800 perf vendor events: Update Skylake client events to v50 - Update Skylake events to v50. - Update Skylake JSON metrics from TMAM 4.0. - Fix the issue in DRAM_Parallel_Reads - Fix the perf test warning Before: root@kbl-ppc:~# perf stat -M DRAM_Parallel_Reads -- sleep 1 event syntax error: '{arb/event=0x80,umask=0x2/,arb/event=0x80,umask=0x2,thresh=1/}:W' \___ unknown term 'thresh' for pmu 'uncore_arb' valid terms: event,edge,inv,umask,cmask,config,config1,config2,name,period,percore Initial error: event syntax error: '..umask=0x2/,arb/event=0x80,umask=0x2,thresh=1/}:W' \___ Cannot find PMU `arb'. Missing kernel support? root@kbl-ppc:~# perf test metrics 10: PMU events : 10.3: Parsing of PMU event table metrics : Skip (some metrics failed) 10.4: Parsing of PMU event table metrics with fake PMUs: Ok 67: Parse and process metrics : Ok After: root@kbl-ppc:~# perf stat -M MEM_Parallel_Reads -- sleep 1 Performance counter stats for 'system wide': 4,951,646 arb/event=0x80,umask=0x2/ # 26.30 MEM_Parallel_Reads (50.04%) 188,251 arb/event=0x80,umask=0x2,cmask=1/ (49.96%) 1.000867010 seconds time elapsed root@kbl-ppc:~# perf test metrics 10: PMU events : 10.3: Parsing of PMU event table metrics : Ok 10.4: Parsing of PMU event table metrics with fake PMUs: Ok 67: Parse and process metrics : Ok Signed-off-by: Jin Yao Tested-by: Namhyung Kim Acked-by: Andi Kleen Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/lkml/93fae76f-ce2b-ab0b-3ae9-cc9a2b4cbaec@linux.intel.com/ Signed-off-by: Arnaldo Carvalho de Melo commit 18741a5251d018094536a2dffe284d269ebb07fe Author: Borislav Petkov Date: Thu Oct 15 15:00:31 2020 +0200 x86/msr: Do not allow writes to MSR_IA32_ENERGY_PERF_BIAS Now that all in-kernel-tree users are converted to using the sysfs file, remove the MSR from the "allowlist". Signed-off-by: Borislav Petkov Reviewed-by: Shuah Khan Link: https://lkml.kernel.org/r/20201029190259.3476-5-bp@alien8.de commit fe0a5788624c8b8f113a35bbe4636e37f9321241 Author: Borislav Petkov Date: Thu Oct 15 14:58:48 2020 +0200 tools/power/x86_energy_perf_policy: Read energy_perf_bias from sysfs ... and stop poking at the MSR directly. Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201029190259.3476-4-bp@alien8.de commit 6d6501d912a9a5e1b73d7fbf419b90a8ec11ed7a Author: Borislav Petkov Date: Thu Oct 15 14:50:16 2020 +0200 tools/power/turbostat: Read energy_perf_bias from sysfs ... instead of poking at the MSR directly. Signed-off-by: Borislav Petkov Cc: Len Brown Cc: linux-pm@vger.kernel.org Link: https://lkml.kernel.org/r/20201029190259.3476-3-bp@alien8.de commit 8113ab20e850491b4144a1a64246f07a2d737a49 Author: Borislav Petkov Date: Thu Oct 15 12:28:58 2020 +0200 tools/power/cpupower: Read energy_perf_bias from sysfs ... instead of poking at the MSR. For that, move the accessor functions to misc.c and add a sysfs-writing function too. There should be no functional changes resulting from this. Signed-off-by: Borislav Petkov Reviewed-by: Shuah Khan Cc: Thomas Renninger Link: https://lkml.kernel.org/r/20201029190259.3476-2-bp@alien8.de commit 601366678c93618f37a685332c0ba07e5556798c Author: Namhyung Kim Date: Fri Oct 30 14:47:42 2020 +0900 perf data: Allow to use stdio functions for pipe mode When perf data is in a pipe, it reads each event separately using read(2) syscall. This is a huge performance bottleneck when processing large data like in perf inject. Also perf inject needs to use write(2) syscall for the output. So convert it to use buffer I/O functions in stdio library for pipe data. This makes inject-build-id bench time drops from 20ms to 8ms. $ perf bench internals inject-build-id # Running 'internals/inject-build-id' benchmark: Average build-id injection took: 8.074 msec (+- 0.013 msec) Average time per event: 0.792 usec (+- 0.001 usec) Average memory usage: 8328 KB (+- 0 KB) Average build-id-all injection took: 5.490 msec (+- 0.008 msec) Average time per event: 0.538 usec (+- 0.001 usec) Average memory usage: 7563 KB (+- 0 KB) This patch enables it just for perf inject when used with pipe (it's a default behavior). Maybe we could do it for perf record and/or report later.. Committer testing: Before: $ perf stat -r 5 perf bench internals inject-build-id # Running 'internals/inject-build-id' benchmark: Average build-id injection took: 13.605 msec (+- 0.064 msec) Average time per event: 1.334 usec (+- 0.006 usec) Average memory usage: 12220 KB (+- 7 KB) Average build-id-all injection took: 11.458 msec (+- 0.058 msec) Average time per event: 1.123 usec (+- 0.006 usec) Average memory usage: 11546 KB (+- 8 KB) # Running 'internals/inject-build-id' benchmark: Average build-id injection took: 13.673 msec (+- 0.057 msec) Average time per event: 1.341 usec (+- 0.006 usec) Average memory usage: 12508 KB (+- 8 KB) Average build-id-all injection took: 11.437 msec (+- 0.046 msec) Average time per event: 1.121 usec (+- 0.004 usec) Average memory usage: 11812 KB (+- 7 KB) # Running 'internals/inject-build-id' benchmark: Average build-id injection took: 13.641 msec (+- 0.069 msec) Average time per event: 1.337 usec (+- 0.007 usec) Average memory usage: 12302 KB (+- 8 KB) Average build-id-all injection took: 10.820 msec (+- 0.106 msec) Average time per event: 1.061 usec (+- 0.010 usec) Average memory usage: 11616 KB (+- 7 KB) # Running 'internals/inject-build-id' benchmark: Average build-id injection took: 13.379 msec (+- 0.074 msec) Average time per event: 1.312 usec (+- 0.007 usec) Average memory usage: 12334 KB (+- 8 KB) Average build-id-all injection took: 11.288 msec (+- 0.071 msec) Average time per event: 1.107 usec (+- 0.007 usec) Average memory usage: 11657 KB (+- 8 KB) # Running 'internals/inject-build-id' benchmark: Average build-id injection took: 13.534 msec (+- 0.058 msec) Average time per event: 1.327 usec (+- 0.006 usec) Average memory usage: 12264 KB (+- 8 KB) Average build-id-all injection took: 11.557 msec (+- 0.076 msec) Average time per event: 1.133 usec (+- 0.007 usec) Average memory usage: 11593 KB (+- 8 KB) Performance counter stats for 'perf bench internals inject-build-id' (5 runs): 4,060.05 msec task-clock:u # 1.566 CPUs utilized ( +- 0.65% ) 0 context-switches:u # 0.000 K/sec 0 cpu-migrations:u # 0.000 K/sec 101,888 page-faults:u # 0.025 M/sec ( +- 0.12% ) 3,745,833,163 cycles:u # 0.923 GHz ( +- 0.10% ) (83.22%) 194,346,613 stalled-cycles-frontend:u # 5.19% frontend cycles idle ( +- 0.57% ) (83.30%) 708,495,034 stalled-cycles-backend:u # 18.91% backend cycles idle ( +- 0.48% ) (83.48%) 5,629,328,628 instructions:u # 1.50 insn per cycle # 0.13 stalled cycles per insn ( +- 0.21% ) (83.57%) 1,236,697,927 branches:u # 304.602 M/sec ( +- 0.16% ) (83.44%) 17,564,877 branch-misses:u # 1.42% of all branches ( +- 0.23% ) (82.99%) 2.5934 +- 0.0128 seconds time elapsed ( +- 0.49% ) $ After: $ perf stat -r 5 perf bench internals inject-build-id # Running 'internals/inject-build-id' benchmark: Average build-id injection took: 8.560 msec (+- 0.125 msec) Average time per event: 0.839 usec (+- 0.012 usec) Average memory usage: 12520 KB (+- 8 KB) Average build-id-all injection took: 5.789 msec (+- 0.054 msec) Average time per event: 0.568 usec (+- 0.005 usec) Average memory usage: 11919 KB (+- 9 KB) # Running 'internals/inject-build-id' benchmark: Average build-id injection took: 8.639 msec (+- 0.111 msec) Average time per event: 0.847 usec (+- 0.011 usec) Average memory usage: 12732 KB (+- 8 KB) Average build-id-all injection took: 5.647 msec (+- 0.069 msec) Average time per event: 0.554 usec (+- 0.007 usec) Average memory usage: 12093 KB (+- 7 KB) # Running 'internals/inject-build-id' benchmark: Average build-id injection took: 8.551 msec (+- 0.096 msec) Average time per event: 0.838 usec (+- 0.009 usec) Average memory usage: 12739 KB (+- 8 KB) Average build-id-all injection took: 5.617 msec (+- 0.061 msec) Average time per event: 0.551 usec (+- 0.006 usec) Average memory usage: 12105 KB (+- 7 KB) # Running 'internals/inject-build-id' benchmark: Average build-id injection took: 8.403 msec (+- 0.097 msec) Average time per event: 0.824 usec (+- 0.010 usec) Average memory usage: 12770 KB (+- 8 KB) Average build-id-all injection took: 5.611 msec (+- 0.085 msec) Average time per event: 0.550 usec (+- 0.008 usec) Average memory usage: 12134 KB (+- 8 KB) # Running 'internals/inject-build-id' benchmark: Average build-id injection took: 8.518 msec (+- 0.102 msec) Average time per event: 0.835 usec (+- 0.010 usec) Average memory usage: 12518 KB (+- 10 KB) Average build-id-all injection took: 5.503 msec (+- 0.073 msec) Average time per event: 0.540 usec (+- 0.007 usec) Average memory usage: 11882 KB (+- 8 KB) Performance counter stats for 'perf bench internals inject-build-id' (5 runs): 2,394.88 msec task-clock:u # 1.577 CPUs utilized ( +- 0.83% ) 0 context-switches:u # 0.000 K/sec 0 cpu-migrations:u # 0.000 K/sec 103,181 page-faults:u # 0.043 M/sec ( +- 0.11% ) 3,548,172,030 cycles:u # 1.482 GHz ( +- 0.30% ) (83.26%) 81,537,700 stalled-cycles-frontend:u # 2.30% frontend cycles idle ( +- 1.54% ) (83.24%) 876,631,544 stalled-cycles-backend:u # 24.71% backend cycles idle ( +- 1.14% ) (83.45%) 5,960,361,707 instructions:u # 1.68 insn per cycle # 0.15 stalled cycles per insn ( +- 0.27% ) (83.26%) 1,269,413,491 branches:u # 530.054 M/sec ( +- 0.10% ) (83.48%) 11,372,453 branch-misses:u # 0.90% of all branches ( +- 0.52% ) (83.31%) 1.51874 +- 0.00642 seconds time elapsed ( +- 0.42% ) $ Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Ian Rogers Cc: Mark Rutland Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20201030054742.87740-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 098416e6986127f7e4c8ce4fd6bbbd80e55b0386 Author: Tony Luck Date: Tue Nov 10 16:39:54 2020 -0800 x86/mce: Use "safe" MSR functions when enabling additional error logging Booting as a guest under KVM results in error messages about unchecked MSR access: unchecked MSR access error: RDMSR from 0x17f at rIP: 0xffffffff84483f16 (mce_intel_feature_init+0x156/0x270) because KVM doesn't provide emulation for random model specific registers. Switch to using rdmsrl_safe()/wrmsrl_safe() to avoid the message. Fixes: 68299a42f842 ("x86/mce: Enable additional error logging on certain Intel CPUs") Reported-by: Qian Cai Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201111003954.GA11878@agluck-desk2.amr.corp.intel.com commit f48b5050c301f7235ef61d8cbbbf0410a5e0245f Author: Martin Jücker Date: Fri Nov 13 22:25:23 2020 +0100 ARM: dts: exynos: add Samsung's Exynos4412-based P4 Note boards The P4 Note family contains a couple of variants of the Galaxy Note 10.1 tablet with mainly different modems. The GT-N8010/GT-N8013 is the WiFi only version. Signed-off-by: Martin Jücker Link: https://lore.kernel.org/r/20201113212525.13455-3-martin.juecker@gmail.com Signed-off-by: Krzysztof Kozlowski commit 33baadaee94085fdcfab569eb01501753b074b19 Author: Martin Jücker Date: Fri Nov 13 22:25:22 2020 +0100 dt-bindings: arm: samsung: document bindings for P4 Note family board Document the GT-N8010/GT-N8013 device binding and the P4 Note common binding that it is based on. Signed-off-by: Martin Jücker Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201113212525.13455-2-martin.juecker@gmail.com Signed-off-by: Krzysztof Kozlowski commit 7e8af057bd9b3d76bd343794e71c20e8dd462372 Author: Martin Jücker Date: Fri Nov 13 22:25:25 2020 +0100 ARM: exynos_defconfig: compile Atmel MXT touchscreeen as module The Atmel MXT touchscreen can load firmware and settings from the /lib/firmware directory, it makes sense to have it as a module to have more control over the loading process. Signed-off-by: Martin Jücker Link: https://lore.kernel.org/r/20201113212525.13455-5-martin.juecker@gmail.com Signed-off-by: Krzysztof Kozlowski commit d8f0ddc8387757957c4f696e67b3332695f6525e Author: Martin Jücker Date: Fri Nov 13 22:25:24 2020 +0100 ARM: defconfig: add STMPE ADC driver for P4 Note Enable the STMPE ADC driver for the P4 Note device family in exynos and multi_v7 defconfigs. Signed-off-by: Martin Jücker Link: https://lore.kernel.org/r/20201113212525.13455-4-martin.juecker@gmail.com Signed-off-by: Krzysztof Kozlowski commit f9135aaf2767500dee419c03640f7a3784b56559 Author: Martin Jücker Date: Fri Nov 13 22:25:26 2020 +0100 ARM: exynos: extend cpuidle support to P4 Note boards The P4 Note family supports cpuidle, so allow it to make use of this feature. Signed-off-by: Martin Jücker Link: https://lore.kernel.org/r/20201113212525.13455-6-martin.juecker@gmail.com Signed-off-by: Krzysztof Kozlowski commit 351dcacc6d774258be9fec6f51c14f8ff38243f6 Author: Lars Poeschel Date: Mon Nov 16 14:41:21 2020 +0100 auxdisplay: panel: Remove redundant charlcd_ops structures The three struct charlcd_ops contain the same data, so we only need one of this structures. The other two are removed. Signed-off-by: Lars Poeschel Signed-off-by: Miguel Ojeda commit 32d917e754bdc322e22439f6ce400a1a74bbdc6e Author: Lars Poeschel Date: Mon Nov 16 14:21:55 2020 +0100 auxdisplay: panel: Fix missing print function pointer charlcd drivers need to provide some print function to charlcd. For hd44780 based panel driver this function was missing. We provide the generic hd44780_common_print function which should be suitable. Fixes: b26deabb1d915fe87d395081bbd3058b938dee89 ("auxdisplay: hd44780_common_print") Reported-by: kernel test robot Signed-off-by: Lars Poeschel Signed-off-by: Miguel Ojeda commit c0a645a7f94409043b5b1d577590bee9b2ce5333 Merge: 41294e6a434d4 872f690341948 Author: Jakub Kicinski Date: Mon Nov 16 08:09:50 2020 -0800 Merge branch 'fix-inefficiences-and-rename-nla_strlcpy' Francis Laniel says: ==================== Fix inefficiences and rename nla_strlcpy This patch set answers to first three issues listed in: https://github.com/KSPP/linux/issues/110 To sum up, the patch contributions are the following: 1. the first patch fixes an inefficiency where some bytes in dst were written twice, one with 0 the other with src content. 2. The second one modifies nla_strlcpy to return the same value as strscpy, i.e. number of bytes written or -E2BIG if src was truncated. It also modifies code that calls nla_strlcpy and checks for its return value. 3. The third renames nla_strlcpy to nla_strscpy. Unfortunately, I did not find how to create struct nlattr objects so I tested my modifications on simple char* and with GDB using tc to get to tcf_proto_check_kind. ==================== Link: https://lore.kernel.org/r/20201115170806.3578-1-laniel_francis@privacyrequired.com Signed-off-by: Jakub Kicinski commit 872f690341948b502c93318f806d821c56772c42 Author: Francis Laniel Date: Sun Nov 15 18:08:06 2020 +0100 treewide: rename nla_strlcpy to nla_strscpy. Calls to nla_strlcpy are now replaced by calls to nla_strscpy which is the new name of this function. Signed-off-by: Francis Laniel Reviewed-by: Kees Cook Signed-off-by: Jakub Kicinski commit 9ca718743ad8402958637bfc196d7b62371a1b9f Author: Francis Laniel Date: Sun Nov 15 18:08:05 2020 +0100 Modify return value of nla_strlcpy to match that of strscpy. nla_strlcpy now returns -E2BIG if src was truncated when written to dst. It also returns this error value if dstsize is 0 or higher than INT_MAX. For example, if src is "foo\0" and dst is 3 bytes long, the result will be: 1. "foG" after memcpy (G means garbage). 2. "fo\0" after memset. 3. -E2BIG is returned because src was not completely written into dst. The callers of nla_strlcpy were modified to take into account this modification. Signed-off-by: Francis Laniel Reviewed-by: Kees Cook Signed-off-by: Jakub Kicinski commit 8eeb99bc81bc1cb3d5e5323d9a82d8392e3a27b4 Author: Francis Laniel Date: Sun Nov 15 18:08:04 2020 +0100 Fix unefficient call to memset before memcpu in nla_strlcpy. Before this commit, nla_strlcpy first memseted dst to 0 then wrote src into it. This is inefficient because bytes whom number is less than src length are written twice. This patch solves this issue by first writing src into dst then fill dst with 0's. Note that, in the case where src length is higher than dst, only 0 is written. Otherwise there are as many 0's written to fill dst. For example, if src is "foo\0" and dst is 5 bytes long, the result will be: 1. "fooGG" after memcpy (G means garbage). 2. "foo\0\0" after memset. Signed-off-by: Francis Laniel Reviewed-by: Kees Cook Signed-off-by: Jakub Kicinski commit 3bfe8933f9d187f93f0d0910b741a59070f58c4c Author: Neil Armstrong Date: Mon Oct 19 16:48:09 2020 +0200 reset: meson: make it possible to build as a module In order to reduce the kernel Image size on multi-platform distributions, make it possible to build the reset controller driver as a module. This partially reverts commit 8290924e6878 ("reset: meson: make it explicitly non-modular"). Signed-off-by: Neil Armstrong Reviewed-by: Kevin Hilman Tested-by: Kevin Hilman Reviewed-by: Martin Blumenstingl Signed-off-by: Philipp Zabel commit 557acb3d2cd9c82de19f944f6cc967a347735385 Author: Amjad Ouled-Ameur Date: Fri Nov 13 00:00:43 2020 +0100 reset: make shared pulsed reset controls re-triggerable The current reset framework API does not allow to release what is done by reset_control_reset(), IOW decrement triggered_count. Add the new reset_control_rearm() call to do so. When reset_control_reset() has been called once, the counter triggered_count, in the reset framework, is incremented i.e the resource under the reset is in-use and the reset should not be done again. reset_control_rearm() would be the way to state that the resource is no longer used and, that from the caller's perspective, the reset can be fired again if necessary. Signed-off-by: Amjad Ouled-Ameur Reported-by: Jerome Brunet Signed-off-by: Philipp Zabel commit 41294e6a434d4f19e957c55b275ea0324f275009 Author: Heiner Kallweit Date: Sat Nov 14 21:49:53 2020 +0100 r8169: improve rtl8169_start_xmit Improve the following in rtl8169_start_xmit: - tp->cur_tx can be accessed in parallel by rtl_tx(), therefore annotate the race by using WRITE_ONCE - avoid checking stop_queue a second time by moving the doorbell check - netif_stop_queue() uses atomic operation set_bit() that includes a full memory barrier on some platforms, therefore use smp_mb__after_atomic to avoid overhead Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/80085451-3eaf-507a-c7c0-08d607c46fbc@gmail.com Signed-off-by: Jakub Kicinski commit c3634425ff9454510876a26e9e9738788bb88abd Author: Nicholas Piggin Date: Mon Nov 16 12:29:09 2020 +1000 h8300: Fix generic mmu_context build h8300 missed the generic nommu header conversion. Cc: Yoshinori Sato Cc: uclinux-h8-devel@lists.sourceforge.jp Cc: linux-mm@kvack.org Fixes: 94f89922e1e0 ("asm-generic: add generic MMU versions of mmu context functions") Reported-by: kernel test robot Signed-off-by: Nicholas Piggin Signed-off-by: Arnd Bergmann commit 38c212c90bf172547dc7df7c11fcaacef2c78696 Author: Corentin Labbe Date: Thu Nov 12 20:26:52 2020 +0000 ARM: configs: sunxi: enable Realtek PHY Lot of sunxi boards has a Realtek PHY, so let's enable it. Signed-off-by: Corentin Labbe Signed-off-by: Maxime Ripard Acked-by: Jernej Skrabec Link: https://lore.kernel.org/r/20201112202652.27676-1-clabbe@baylibre.com commit 5a5678ff3a495cbfccde9c734164cc8753a1ca97 Author: Christoph Hellwig Date: Mon Nov 16 15:57:14 2020 +0100 block: unexport revalidate_disk_size revalidate_disk_size is now only called from set_capacity_and_notify, so drop the export. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit ddff331a14eb7d5af08e63579ba28c289db26e20 Author: Christoph Hellwig Date: Mon Nov 16 15:57:13 2020 +0100 virtio-blk: remove a spurious call to revalidate_disk_size revalidate_disk_size just updates the block device size from the disk size. Thus calling it from virtblk_update_cache_mode doesn't actually do anything. Signed-off-by: Christoph Hellwig Acked-by: Stefan Hajnoczi Acked-by: Michael S. Tsirkin Signed-off-by: Jens Axboe commit 94d91e7f8c221260790a482373d347ea85efb7b3 Author: Christoph Hellwig Date: Mon Nov 16 15:57:12 2020 +0100 md: remove a spurious call to revalidate_disk_size in update_size None of the ->resize methods updates the disk size, so calling revalidate_disk_size here won't do anything. Signed-off-by: Christoph Hellwig Acked-by: Song Liu Signed-off-by: Jens Axboe commit 2c247c5169b50d58f63c0e82a58f457343e49d10 Author: Christoph Hellwig Date: Mon Nov 16 15:57:11 2020 +0100 md: use set_capacity_and_notify Use set_capacity_and_notify to set the size of both the disk and block device. This also gets the uevent notifications for the resize for free. Signed-off-by: Christoph Hellwig Acked-by: Song Liu Signed-off-by: Jens Axboe commit dc2985a8d583abe232e5882df9c8b67ac0d523e8 Author: Christoph Hellwig Date: Mon Nov 16 15:57:10 2020 +0100 dm-raid: use set_capacity_and_notify Use set_capacity_and_notify to set the size of both the disk and block device. This also gets the uevent notifications for the resize for free. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 6e017a3931d7722260e3656a6fc9b02de5fb3c5d Author: Christoph Hellwig Date: Mon Nov 16 15:57:09 2020 +0100 zram: use set_capacity_and_notify Use set_capacity_and_notify to set the size of both the disk and block device. This also gets the uevent notifications for the resize for free. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 230272b4f809d51c8b21d46dcec99f265b0842ec Author: Christoph Hellwig Date: Mon Nov 16 15:57:08 2020 +0100 rnbd: use set_capacity_and_notify Use set_capacity_and_notify to set the size of both the disk and block device. This also gets the uevent notifications for the resize for free. Signed-off-by: Christoph Hellwig Acked-by: Jack Wang Signed-off-by: Jens Axboe commit e864e49af3a85797b51b36876087591602de2eb4 Author: Christoph Hellwig Date: Mon Nov 16 15:57:07 2020 +0100 rbd: use set_capacity_and_notify Use set_capacity_and_notify to set the size of both the disk and block device. This also gets the uevent notifications for the resize for free. Signed-off-by: Christoph Hellwig Acked-by: Ilya Dryomov Signed-off-by: Jens Axboe commit bc254eb44f9dfce278b53b714fb7bb963253789d Author: Christoph Hellwig Date: Mon Nov 16 15:57:06 2020 +0100 drbd: use set_capacity_and_notify Use set_capacity_and_notify to set the size of both the disk and block device. This also gets the uevent notifications for the resize for free. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit d17e66aadbe50b7207187d6b2293fc2ddaab2c99 Author: Christoph Hellwig Date: Mon Nov 16 15:57:05 2020 +0100 nvme: use set_capacity_and_notify in nvme_set_queue_dying Use the block layer helper to update both the disk and block device sizes. Contrary to the name no notification is sent in this case, as a size 0 is special cased. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 657985f857c0027db6f17fa4af7e8818038e0b15 Author: Christoph Hellwig Date: Mon Nov 16 15:57:04 2020 +0100 pktcdvd: use set_capacity_and_notify Use set_capacity_and_notify to set the size of both the disk and block device. This also gets the uevent notifications for the resize for free. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit f64d9b2eacb95d4fbd17c8680cab803a5965744c Author: Christoph Hellwig Date: Mon Nov 16 15:57:03 2020 +0100 dm: use set_capacity_and_notify Use set_capacity_and_notify to set the size of both the disk and block device. This also gets the uevent notifications for the resize for free. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 8a6f7bbf29d1d61d3ff18f0a0feead9f287c9b14 Author: Christoph Hellwig Date: Mon Nov 16 15:57:02 2020 +0100 aoe: don't call set_capacity from irq context Updating the block device size from irq context can lead to torn writes of the 64-bit value, and prevents us from using normal process context locking primitives to serialize access to the 64-bit nr_sectors value. Defer the set_capacity to the already existing workqueue handler, where it can be merged with the update of the block device size by using set_capacity_and_notify. As an extra bonus this also adds proper uevent notifications for the resize. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 2ebcabf3dba50f61850efec9a331bd061c6333e0 Author: Christoph Hellwig Date: Mon Nov 16 15:57:01 2020 +0100 nbd: use set_capacity_and_notify Use set_capacity_and_notify to update the disk and block device sizes and send a RESIZE uevent to userspace. Note that blktests relies on uevents being sent also for updates that did not change the device size, so the explicit kobject_uevent remains for that case. Signed-off-by: Christoph Hellwig Reviewed-by: Josef Bacik Signed-off-by: Jens Axboe commit dcbddf541f18e367ac9cdad8e223d382cd303161 Author: Christoph Hellwig Date: Mon Nov 16 15:57:00 2020 +0100 nbd: validate the block size in nbd_set_size Move the validation of the block from the callers into nbd_set_size. Signed-off-by: Christoph Hellwig Reviewed-by: Josef Bacik Signed-off-by: Jens Axboe commit 2dc691cc4ac259f8b5bb0bd8670645af894d30eb Author: Christoph Hellwig Date: Mon Nov 16 15:56:59 2020 +0100 nbd: refactor size updates Merge nbd_size_set and nbd_size_update into a single function that also updates the nbd_config fields. This new function takes the device size in bytes as the first argument, and the blocksize as the second argument, simplifying the calculations required in most callers. Signed-off-by: Christoph Hellwig Reviewed-by: Josef Bacik Signed-off-by: Jens Axboe commit 92f93c3a1bf9dc73181dc6566497d16b690cb576 Author: Christoph Hellwig Date: Mon Nov 16 15:56:58 2020 +0100 nbd: move the task_recv check into nbd_size_update nbd_size_update is about to acquire a few more callers, so lift the check into the function. Signed-off-by: Christoph Hellwig Reviewed-by: Josef Bacik Signed-off-by: Jens Axboe commit ee4bf648635055d2b76afadaf34236c8b2d852a7 Author: Christoph Hellwig Date: Mon Nov 16 15:56:57 2020 +0100 nbd: remove the call to set_blocksize Block driver have no business setting the file system concept of a block size. Signed-off-by: Christoph Hellwig Reviewed-by: Josef Bacik Signed-off-by: Jens Axboe commit 449f4ec9892ebc2f37a7eae6d97db2cf7c65e09a Author: Christoph Hellwig Date: Mon Nov 16 15:56:56 2020 +0100 block: remove the update_bdev parameter to set_capacity_revalidate_and_notify The update_bdev argument is always set to true, so remove it. Also rename the function to the slighly less verbose set_capacity_and_notify, as propagating the disk size to the block device isn't really revalidation. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Petr Vorel Signed-off-by: Jens Axboe commit b200e38c493b2a5acff4f86d40a3e45d546c664c Author: Christoph Hellwig Date: Mon Nov 16 15:56:55 2020 +0100 sd: update the bdev size in sd_revalidate_disk This avoids the extra call to revalidate_disk_size in sd_rescan and is otherwise a no-op because the size did not change, or we are in the probe path. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Acked-by: Martin K. Petersen Signed-off-by: Jens Axboe commit 5dd55749b79cdf471ca0966ad91541daebac3e2f Author: Christoph Hellwig Date: Mon Nov 16 15:56:54 2020 +0100 nvme: let set_capacity_revalidate_and_notify update the bdev size There is no good reason to call revalidate_disk_size separately. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 3b4f85d02a4bd85cbea999a064235a47694bbb7b Author: Christoph Hellwig Date: Mon Nov 16 15:56:53 2020 +0100 loop: let set_capacity_revalidate_and_notify update the bdev size There is no good reason to call revalidate_disk_size separately. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 99473d9db93a3bf557161373a1eb33d2873edd2e Author: Christoph Hellwig Date: Mon Nov 16 15:56:52 2020 +0100 block: remove the call to __invalidate_device in check_disk_size_change __invalidate_device without the kill_dirty parameter just invalidates various clean entries in caches, which doesn't really help us with anything, but can cause all kinds of horrible lock orders due to how it calls into the file system. The only reason this hasn't been a major issue is because so many people use partitions, for which no invalidation was performed anyway. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit a1ac250a82a5e97db71f14101ff7468291a6aaef Author: Peilin Ye Date: Thu Nov 12 07:15:22 2020 -0500 fbcon: Avoid using FNTCHARCNT() and hard-coded built-in font charcount For user-provided fonts, the framebuffer layer is using a magic negative-indexing macro, FNTCHARCNT(), to keep track of their number of characters: #define FNTCHARCNT(fd) (((int *)(fd))[-3]) For built-in fonts, it is using hard-coded values (256). This results in something like the following: map.length = (ops->p->userfont) ? FNTCHARCNT(ops->p->fontdata) : 256; This is unsatisfactory. In fact, there is already a `charcount` field in our virtual console descriptor (see `struct console_font` inside `struct vc_data`), let us use it: map.length = vc->vc_font.charcount; Recently we added a `charcount` field to `struct font_desc`. Use it to set `vc->vc_font.charcount` properly. The idea is: - We only use FNTCHARCNT() on `vc->vc_font.data` and `p->fontdata`. Assume FNTCHARCNT() is working as intended; - Whenever `vc->vc_font.data` is set, also set `vc->vc_font.charcount` properly; - We can now replace `FNTCHARCNT(vc->vc_font.data)` with `vc->vc_font.charcount`; - Since `p->fontdata` always point to the same font data buffer with `vc->vc_font.data`, we can also replace `FNTCHARCNT(p->fontdata)` with `vc->vc_font.charcount`. In conclusion, set `vc->vc_font.charcount` properly in fbcon_startup(), fbcon_init(), fbcon_set_disp() and fbcon_do_set_font(), then replace FNTCHARCNT() with `vc->vc_font.charcount`. No more if-else between negative-indexing macros and hard-coded values. Do not include in fbcon_rotate.c and tileblit.c, since they no longer need it. Depends on patch "Fonts: Add charcount field to font_desc". Suggested-by: Daniel Vetter Signed-off-by: Peilin Ye Reviewed-by: Greg Kroah-Hartman Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/e460a5780e54e3022661d5f09555144583b4cc59.1605169912.git.yepeilin.cs@gmail.com commit 4497364e5f61f9e8d4a6252bc6deb9597d68bbac Author: Peilin Ye Date: Thu Nov 12 07:14:21 2020 -0500 parisc/sticore: Avoid hard-coding built-in font charcount sti_select_fbfont() and sti_cook_fonts() are hard-coding the number of characters of our built-in fonts as 256. Recently, we included that information in our kernel font descriptor `struct font_desc`, so use `fbfont->charcount` instead of hard-coded values. Depends on patch "Fonts: Add charcount field to font_desc". Signed-off-by: Peilin Ye Reviewed-by: Daniel Vetter Reviewed-by: Greg Kroah-Hartman Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/037186fb50cf3d17bb7bc9482357635b9df6076e.1605169912.git.yepeilin.cs@gmail.com commit 4ee573086bd88ff3060dda07873bf755d332e9ba Author: Peilin Ye Date: Thu Nov 12 07:13:34 2020 -0500 Fonts: Add charcount field to font_desc Subsystems are hard-coding the number of characters of our built-in fonts as 256. Include that information in our kernel font descriptor, `struct font_desc`. Signed-off-by: Peilin Ye Reviewed-by: Daniel Vetter Reviewed-by: Greg Kroah-Hartman Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/65952296d1d9486093bd955d1536f7dcd11112c6.1605169912.git.yepeilin.cs@gmail.com commit 259a252c1f4e19045b06660f81014fb51e17f3f6 Author: Peilin Ye Date: Thu Nov 12 07:11:20 2020 -0500 console: Delete dummy con_font_set() and con_font_default() callback implementations .con_font_set and .con_font_default callbacks should not pass `struct console_font *` as a parameter, since `struct console_font` is a UAPI structure. We are trying to let them use our new kernel font descriptor, `struct font_desc` instead. To make that work slightly easier, first delete all of their no-op implementations used by dummy consoles. This will make KD_FONT_OP_SET and KD_FONT_OP_SET_DEFAULT ioctl() requests on dummy consoles start to fail and return `-ENOSYS`, which is intended, since no user should ever expect such operations to succeed on dummy consoles. Suggested-by: Daniel Vetter Signed-off-by: Peilin Ye Reviewed-by: Greg Kroah-Hartman Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/9952c7538d2a32bb1a82af323be482e7afb3dedf.1605169912.git.yepeilin.cs@gmail.com commit 7a089ec7d77fe7d50f6bb7b178fa25eec9fd822b Author: Peilin Ye Date: Thu Nov 12 07:04:03 2020 -0500 console: Delete unused con_font_copy() callback implementations Recently in commit 3c4e0dff2095 ("vt: Disable KD_FONT_OP_COPY") we disabled the KD_FONT_OP_COPY ioctl() option. Delete all the con_font_copy() callbacks, since we no longer use them. Mark KD_FONT_OP_COPY as "obsolete" in include/uapi/linux/kd.h, just like what we have done for PPPIOCDETACH in commit af8d3c7c001a ("ppp: remove the PPPIOCDETACH ioctl"). Signed-off-by: Peilin Ye Reviewed-by: Greg Kroah-Hartman Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/c8d28007edf50de4387e1532eb3eb736db716f73.1605169912.git.yepeilin.cs@gmail.com commit 024cd2cbd1ca2d29e6df538855d52c4e5990cab7 Author: Santucci Pierpaolo Date: Mon Nov 16 11:30:37 2020 +0100 selftest/bpf: Fix IPV6FR handling in flow dissector From second fragment on, IPV6FR program must stop the dissection of IPV6 fragmented packet. This is the same approach used for IPV4 fragmentation. This fixes the flow keys calculation for the upper-layer protocols. Note that according to RFC8200, the first fragment packet must include the upper-layer header. Signed-off-by: Santucci Pierpaolo Signed-off-by: Daniel Borkmann Reviewed-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/X7JUzUj34ceE2wBm@santucci.pierpaolo commit 4d063e646b4bfe8e74c0b4b78bf11c3a7b5d962a Author: Jan Höppner Date: Thu Oct 8 15:13:36 2020 +0200 s390/dasd: Process FCES path event notification If the Fibre Channel Endpoint-Security status of a path changes, a corresponding path event is received from the CIO layer. Process this event by re-reading the FCES information. As the information is retrieved for all paths on a single CU in one call, the internal status can also be updated for all paths and no processing per path is necessary. Signed-off-by: Jan Höppner Signed-off-by: Stefan Haberland Reviewed-by: Stefan Haberland Reviewed-by: Cornelia Huck Signed-off-by: Jens Axboe commit b72949328869dfd45f6452c2410647afd7db5f1a Author: Jan Höppner Date: Thu Oct 8 15:13:35 2020 +0200 s390/dasd: Prepare for additional path event handling As more path events need to be handled for ECKD the current path verification infrastructure can be reused. Rename all path verifcation code to fit the more broadly based task of path event handling and put the path verification in a new separate function. Signed-off-by: Jan Höppner Signed-off-by: Stefan Haberland Reviewed-by: Stefan Haberland Reviewed-by: Cornelia Huck Signed-off-by: Jens Axboe commit 19508b2047403cc88d2255118e2640ab1d3bf8a1 Author: Jan Höppner Date: Thu Oct 8 15:13:34 2020 +0200 s390/dasd: Display FC Endpoint Security information via sysfs Add a new sysfs attribute (fc_security) per device and per operational channel path. The information of the current FC Endpoint Security state is received through the CIO layer. The state of the FC Endpoint Security can be either "Unsupported", "Authentication", or "Encryption". For example: $ cat /sys/bus/ccw/devices/0.0.c600/fc_security Encryption If any of the operational paths is in a state different from all others, the device sysfs attribute will display the additional state "Inconsistent". The sysfs attributes per paths are organised in a new directory called "paths_info" with subdirectories for each path. /sys/bus/ccw/devices/0.0.c600/paths_info/ ├── 0.38 │   └── fc_security ├── 0.39 │   └── fc_security ├── 0.3a │   └── fc_security └── 0.3b └── fc_security Signed-off-by: Jan Höppner Signed-off-by: Stefan Haberland Reviewed-by: Stefan Haberland Reviewed-by: Cornelia Huck Signed-off-by: Jens Axboe commit 9e34c8ba91697cb7441805c36d92ab3e695df6e0 Author: Jan Höppner Date: Thu Oct 8 15:13:33 2020 +0200 s390/dasd: Fix operational path inconsistency During online processing and setting up a DASD device, the configuration data for operational paths is read and validated two times (dasd_eckd_read_conf()). The first time to provide information that are necessary for the LCU setup. A second time after the LCU setup as a device might report different configuration data then. When the configuration setup for each operational path is being validated, an initial call to dasd_eckd_clear_conf_data() is issued. This call wipes all previously available configuration data and path information for each path. However, the operational path mask is not updated during this process. As a result, the stored operational path mask might no longer correspond to the operational paths mask reported by the CIO layer, as several paths might be gone between the two dasd_eckd_read_conf() calls. This inconsistency leads to more severe issues in later path handling changes. Fix this by removing the channel paths from the operational path mask during the dasd_eckd_clear_conf_data() call. Signed-off-by: Jan Höppner Signed-off-by: Stefan Haberland Reviewed-by: Stefan Haberland Reviewed-by: Cornelia Huck Signed-off-by: Jens Axboe commit 460181217a2496defc6c279b0a7eb810b05b9145 Author: Jan Höppner Date: Thu Oct 8 15:13:32 2020 +0200 s390/dasd: Store path configuration data during path handling Currently, the configuration data for a path is retrieved during a path verification and used only temporarily. If a path is newly added to the I/O setup after a boot, no configuration data will be stored for this particular path. However, this data is required for later use and should be present for a valid I/O path anyway. Store this data during the path verification so that newly added paths can provide all information necessary. [sth@linux.ibm.com: fix conf_data memleak] Signed-off-by: Jan Höppner Signed-off-by: Stefan Haberland Reviewed-by: Stefan Haberland Reviewed-by: Cornelia Huck Signed-off-by: Jens Axboe commit d2a527580c0a0c83f1d98eff32804cde4280d721 Author: Jan Höppner Date: Thu Oct 8 15:13:31 2020 +0200 s390/dasd: Move duplicate code to separate function For storing retrieved path information both the if and else block in dasd_eckd_read_conf() use the same code. To avoid duplicate code this should be done after the if/else block. To further increase readability, move the code to a new function, dasd_eckd_store_conf_data(). Signed-off-by: Jan Höppner Signed-off-by: Stefan Haberland Reviewed-by: Stefan Haberland Reviewed-by: Cornelia Huck Signed-off-by: Jens Axboe commit e03c5941f904afcc0237295e84e756c36619e058 Author: Jan Höppner Date: Thu Oct 8 15:13:30 2020 +0200 s390/dasd: Remove unused parameter from dasd_generic_probe() The discipline argument in dasd_generic_probe() isn't used and there is no history how it was used in the past. Remove it. Signed-off-by: Jan Höppner Signed-off-by: Stefan Haberland Reviewed-by: Stefan Haberland Reviewed-by: Cornelia Huck Signed-off-by: Jens Axboe commit 32ef938815c1fb42d65212aac860ab153a64de1a Author: Vineeth Vijayan Date: Thu Oct 8 15:13:29 2020 +0200 s390/cio: Add support for FCES status notification Fibre Channel Endpoint-Security event is received as an sei:nt0 type in the CIO layer. This information needs to be shared with the CCW device drivers using the path_events callback. Co-developed-by: Sebastian Ott Signed-off-by: Vineeth Vijayan Signed-off-by: Sebastian Ott Signed-off-by: Stefan Haberland Reviewed-by: Peter Oberparleiter Acked-by: Vasily Gorbik Signed-off-by: Jens Axboe commit 4cd6094d9d609f73694783553df72572e302a5e9 Author: Vineeth Vijayan Date: Thu Oct 8 15:13:28 2020 +0200 s390/cio: Provide Endpoint-Security Mode per CU Add an interface in the CIO layer to retrieve the information about the Endpoint-Security Mode (ESM) of the specified CU. The ESM values are defined as 0-None, 1-Authenticated or 2, 3-Encrypted. [vneethv@linux.ibm.com: cleaned-up and modified description] Signed-off-by: Sebastian Ott Signed-off-by: Vineeth Vijayan Signed-off-by: Stefan Haberland Reviewed-by: Peter Oberparleiter Acked-by: Vasily Gorbik Acked-by: Cornelia Huck Signed-off-by: Jens Axboe commit 8b8b0915ba8daef9b4320d6dc75a2ec14e1fe2df Author: Sebastian Ott Date: Thu Oct 8 15:13:27 2020 +0200 s390/cio: Export information about Endpoint-Security Capability Add a new sysfs attribute 'esc' per chpid. This new attribute exports the Endpoint-Security-Capability byte of channel-path description block, which could be 0-None, 1-Authentication, 2 and 3-Encryption. For example: $ cat /sys/devices/css0/chp0.34/esc 0 [vneethv@linux.ibm.com: cleaned-up & modified description] Signed-off-by: Sebastian Ott Signed-off-by: Vineeth Vijayan Signed-off-by: Stefan Haberland Reviewed-by: Jan Höppner Reviewed-by: Peter Oberparleiter Reviewed-by: Cornelia Huck Acked-by: Vasily Gorbik Signed-off-by: Jens Axboe commit e2b6b301871719d1db0b1ed7a1ed9e06750c80fc Author: Christoph Hellwig Date: Sat Nov 14 18:08:21 2020 +0100 block: fix the kerneldoc comment for __register_blkdev Switch the comment to talk about __register_blkdev instead of register_blkdev and document the new probe parameter. Fixes: 3da1a61e7046 ("block: add an optional probe callback to major_names") Reported-by: Stephen Rothwell Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit e418de3abcda8b102f737919e830024d1455938f Author: Christoph Hellwig Date: Thu Oct 29 15:58:41 2020 +0100 block: switch gendisk lookup to a simple xarray Now that bdev_map is only used for finding gendisks, we can use a simple xarray instead of the regions tracking structure for it. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Greg Kroah-Hartman Signed-off-by: Jens Axboe commit 76487f0241423497218f6ec505aa93cc29c8ddcd Author: Christoph Hellwig Date: Thu Oct 29 15:58:40 2020 +0100 z2ram: use separate gendisk for the different modes Use separate gendisks (which share a tag_set) for the different operating modes instead of redirecting the gendisk lookup using a probe callback. This avoids potential problems with aliased block_device instances and will eventually allow for removing the blk_register_region framework. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 6c3a05e127058ed9626a2f39e779c5e595c13a9b Author: Christoph Hellwig Date: Thu Oct 29 15:58:39 2020 +0100 z2ram: reindent reindent the driver using Lident as the code style was far away from normal Linux code. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit bf9c0538e485b591a2ee02d9adb8a99db4be5a2a Author: Christoph Hellwig Date: Thu Oct 29 15:58:38 2020 +0100 ataflop: use a separate gendisk for each media format The Atari floppy driver usually autodetects the media when used with the ormal /dev/fd? devices, which also are the only nodes created by udev. But it also supports various aliases that force a given media format. That is currently supported using the blk_register_region framework which finds the floppy gendisk even for a 'mismatched' dev_t. The problem with this (besides the code complexity) is that it creates multiple struct block_device instances for the whole device of a single gendisk, which can lead to interesting issues in code not aware of that fact. To fix this just create a separate gendisk for each of the aliases if they are accessed. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 0033a9b41fc219e1e0d673e0a42179577a7d68ad Author: Christoph Hellwig Date: Thu Oct 29 15:58:37 2020 +0100 amiflop: use separate gendisks for Amiga vs MS-DOS mode Use separate gendisks (which share a tag_set) for the native Amgiga vs the MS-DOS mode instead of redirecting the gendisk lookup using a probe callback. This avoids potential problems with aliased block_device instances and will eventually allow for removing the blk_register_region framework. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 302cfee150291c6cd85b1ca197d062d0b423d09c Author: Christoph Hellwig Date: Thu Oct 29 15:58:36 2020 +0100 floppy: use a separate gendisk for each media format The floppy driver usually autodetects the media when used with the normal /dev/fd? devices, which also are the only nodes created by udev. But it also supports various aliases that force a given media format. That is currently supported using the blk_register_region framework which finds the floppy gendisk even for a 'mismatched' dev_t. The problem with this (besides the code complexity) is that it creates multiple struct block_device instances for the whole device of a single gendisk, which can lead to interesting issues in code not aware of that fact. To fix this just create a separate gendisk for each of the aliases if they are accessed. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit bbc26e8d93946e23c20e63830fc6e69345ec63b3 Author: Christoph Hellwig Date: Thu Oct 29 15:58:35 2020 +0100 ide: switch to __register_blkdev for command set probing ide is the last user of the blk_register_region framework except for the tracking of allocated gendisk. Switch to __register_blkdev, even if that doesn't allow us to trivially find out which command set to probe for. That means we now always request all modules when a user tries to access an unclaimed ide device node, but except for a few potentially loaded modules for a fringe use case of a deprecated and soon to be removed driver that doesn't make a difference. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 28144f9998e047a9bac31421914335c6bc6eaa67 Author: Christoph Hellwig Date: Thu Oct 29 15:58:34 2020 +0100 md: use __register_blkdev to allocate devices on demand Use the simpler mechanism attached to major_name to allocate a md device when a currently unregistered minor is accessed. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Acked-by: Song Liu Signed-off-by: Jens Axboe commit 8410d38c255200f71b67ddb37021c36273e7e78c Author: Christoph Hellwig Date: Thu Oct 29 15:58:33 2020 +0100 loop: use __register_blkdev to allocate devices on demand Use the simpler mechanism attached to major_name to allocate a brd device when a currently unregistered minor is accessed. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 7cc178a6b994b7c994f1811c4b9fedc015ee0c9e Author: Christoph Hellwig Date: Thu Oct 29 15:58:32 2020 +0100 brd: use __register_blkdev to allocate devices on demand Use the simpler mechanism attached to major_name to allocate a brd device when a currently unregistered minor is accessed. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 996e509bbc956d60f761dc955f5c5131e9a8fb13 Author: Christoph Hellwig Date: Thu Oct 29 15:58:31 2020 +0100 sd: use __register_blkdev to avoid a modprobe for an unregistered dev_t Switch from using blk_register_region to the probe callback passed to __register_blkdev to disable the request_module call for an unclaimed dev_t in the SD majors. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Acked-by: Martin K. Petersen Signed-off-by: Jens Axboe commit f9550f1b3981755b0ba9bd385c3c6efdfadd8fe4 Author: Christoph Hellwig Date: Thu Oct 29 15:58:30 2020 +0100 swim: don't call blk_register_region The swim driver (unlike various other floppy drivers) doesn't have magic device nodes for certain modes, and already registers a gendisk for each of the floppies supported by a device. Thus the region registered is a no-op and can be removed. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit d18e8b1bf9e2ee814a7f886a156bf762d52e178b Author: Christoph Hellwig Date: Thu Oct 29 15:58:29 2020 +0100 ide: remove ide_{,un}register_region There is no need to ever register the fake gendisk used for ide-tape. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit a160c6159d4a0cf82f28bc1658a958e278ec3688 Author: Christoph Hellwig Date: Thu Oct 29 15:58:28 2020 +0100 block: add an optional probe callback to major_names Add a callback to the major_names array that allows a driver to override how to probe for dev_t that doesn't currently have a gendisk registered. This will help separating the lookup of the gendisk by dev_t vs probe action for a not currently registered dev_t. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit bd8eff3ba2caca53ea72cf3cc87a7797771dd7d2 Author: Christoph Hellwig Date: Thu Oct 29 15:58:27 2020 +0100 block: rework requesting modules for unclaimed devices Instead of reusing the ranges in bdev_map, add a new helper that is called if no ranges was found. This is a first step to unpeel and eventually remove the complex ranges structure. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit e49fbbbf0aa14f011ab037086f37f58bd058a6ee Author: Christoph Hellwig Date: Thu Oct 29 15:58:26 2020 +0100 block: split block_class_lock Split the block_class_lock mutex into one each to protect bdev_map and major_names. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 62b508f8b6b1b52843cd90f0b2068ed963f25bd3 Author: Christoph Hellwig Date: Thu Oct 29 15:58:25 2020 +0100 block: open code kobj_map into in block/genhd.c Copy and paste the kobj_map functionality in the block code in preparation for completely rewriting it. Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Signed-off-by: Jens Axboe commit 6b3ba9762f9f9f651873af34481ca20e4a6791e7 Author: Christoph Hellwig Date: Thu Oct 29 15:58:24 2020 +0100 block: cleanup del_gendisk a bit Merge three hidden gendisk checks into one. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit a7cb3d2f09c8405aed59d97a7d02cebea43cd3c7 Author: Christoph Hellwig Date: Tue Nov 3 11:00:18 2020 +0100 block: remove __blkdev_driver_ioctl Just open code it in the few callers. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 98f49b63e84d4ee1a5c327d0b5f4e8699f6c70fe Author: Christoph Hellwig Date: Tue Nov 3 11:00:17 2020 +0100 block: remove set_device_ro Fold set_device_ro into its only remaining caller. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 7a2f0ce19f2e2ed93b5ace60375b908392ec8afb Author: Christoph Hellwig Date: Tue Nov 3 11:00:16 2020 +0100 loop: use set_disk_ro Use set_disk_ro instead of set_device_ro to match all other block drivers and to ensure all partitions mirror the read-only flag. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 732e12d805a77f74c907c0a28ece271ef1e81e01 Author: Christoph Hellwig Date: Tue Nov 3 11:00:15 2020 +0100 block: don't call into the driver for BLKROSET Now that all drivers that want to hook into setting or clearing the read-only flag use the set_read_only method, this code can be removed. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 2c1b6ec170423bb032e825d4d9b2780bac4ce1a9 Author: Christoph Hellwig Date: Tue Nov 3 11:00:14 2020 +0100 dasd: implement ->set_read_only to hook into BLKROSET processing Implement the ->set_read_only method instead of parsing the actual ioctl command. Signed-off-by: Christoph Hellwig Reviewed-by: Stefan Haberland Signed-off-by: Jens Axboe commit 118cf084adb3964d06e1667cf7d702e56e5cd2c5 Author: Christoph Hellwig Date: Tue Nov 3 11:00:13 2020 +0100 md: implement ->set_read_only to hook into BLKROSET processing Implement the ->set_read_only method instead of parsing the actual ioctl command. Signed-off-by: Christoph Hellwig Acked-by: Song Liu Signed-off-by: Jens Axboe commit 34919e3ba23a106e04f042f19348d9e55739b35a Author: Christoph Hellwig Date: Tue Nov 3 11:00:12 2020 +0100 rbd: implement ->set_read_only to hook into BLKROSET processing Implement the ->set_read_only method instead of parsing the actual ioctl command. Signed-off-by: Christoph Hellwig Acked-by: Ilya Dryomov Signed-off-by: Jens Axboe commit e00adcadf3af7a8335026d71ab9f0e0a922191ac Author: Christoph Hellwig Date: Tue Nov 3 11:00:11 2020 +0100 block: add a new set_read_only method Add a new method to allow for driver-specific processing when setting or clearing the block device read-only state. This allows to replace the cumbersome and error-prone override of the whole ioctl implementation. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 4a9d6d667f0bafed55a9e9f5ae8bceb3680749d7 Author: Christoph Hellwig Date: Tue Nov 3 11:00:10 2020 +0100 block: don't call into the driver for BLKFLSBUF BLKFLSBUF is entirely contained in the block core, and there is no good reason to give the driver a hook into processing it. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit daaedb820ad716e00210af8859b194c404202b78 Author: Christoph Hellwig Date: Tue Nov 3 11:00:09 2020 +0100 mtd_blkdevs: don't override BLKFLSBUF BLKFLSBUF is not supposed to actually send a flush command to the device, but to tear down buffer cache structures. Remove the mtd_blkdevs implementation and just use the default semantics instead. Signed-off-by: Christoph Hellwig Acked-by: Richard Weinberger Signed-off-by: Jens Axboe commit 8c67d247dcad67fbdd07c8bab9818d0b8d9240bf Author: Mauro Carvalho Chehab Date: Mon Nov 16 11:18:15 2020 +0100 genirq: Fix kernel-doc markups Some identifiers have different names between their prototypes and the kernel-doc markup. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/13a44f4f0c3135e14b16ae8fcce4af1eab27cb5f.1605521731.git.mchehab+huawei@kernel.org commit 66981c37b3199d293c58f84cf2366e86a06e1a3d Author: Mauro Carvalho Chehab Date: Mon Nov 16 11:18:14 2020 +0100 hrtimer: Fix kernel-doc markups The hrtimer_get_remaining() markup is documenting, instead, __hrtimer_get_remaining(), as it is placed at the C file. In order to properly document it, a kernel-doc markup is needed together with the function prototype. So, add a new one, while preserving the existing one, just fixing the function name. The hrtimer_is_queued prototype has a typo: it is using '=' instead of '-' to split: identifier - description as required by kernel-doc markup. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/9dc87808c2fd07b7e050bafcd033c5ef05808fea.1605521731.git.mchehab+huawei@kernel.org commit cc947f2b9c04113d84eeef67cc7c6326e1982019 Author: Thomas Gleixner Date: Mon Nov 16 10:53:38 2020 +0100 timers: Make run_local_timers() static No users outside of the timer code. Move the caller below this function to avoid a pointless forward declaration. Signed-off-by: Thomas Gleixner commit ef7ece9a9b1fde9cf6a455981a0f39e342ee0f8c Merge: fcb3a1ab79904 220989d37c47a Author: Rafael J. Wysocki Date: Mon Nov 16 13:20:31 2020 +0100 Merge back cpufreq updates for v5.11. commit e709a7b5a066362b697d65dda90edc71f913df70 Author: Andy Shevchenko Date: Mon Nov 9 22:53:32 2020 +0200 gpiolib: acpi: Make Intel GPIO tree official for GPIO ACPI work Make Intel GPIO tree official for GPIO ACPI work. Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Reviewed-by: Mika Westerberg commit 2c4d00cb8fc5e01004eb2e84d13c09a2d9ecab0f Author: Andy Shevchenko Date: Mon Nov 9 22:53:31 2020 +0200 gpiolib: acpi: Use BIT() macro to increase readability We may use BIT() macro to increase readability in acpi_gpio_adr_space_handler(). Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Reviewed-by: Hans de Goede Reviewed-by: Mika Westerberg commit 74301f2781586d0e6669466b2b4d59d94c63fa5a Author: Andy Shevchenko Date: Mon Nov 9 22:53:30 2020 +0200 gpiolib: acpi: Convert pin_index to be u16 As specified by ACPI the pin index is 16-bit unsigned integer. Define the variable, which holds it, accordingly. Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Reviewed-by: Hans de Goede Reviewed-by: Mika Westerberg commit 2e2b496cebefb9514fc04adcb4658df4f82ceb0d Author: Andy Shevchenko Date: Wed Nov 11 23:35:33 2020 +0200 gpiolib: acpi: Extract acpi_request_own_gpiod() helper It appears that we are using similar code excerpts for ACPI OpRegion and event handling. Deduplicate those excerpts by extracting a new acpi_request_own_gpiod() helper. Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Reviewed-by: Hans de Goede Reviewed-by: Mika Westerberg commit bca404802ceade19d7649a840178c415316814cc Author: Andy Shevchenko Date: Mon Nov 9 22:53:28 2020 +0200 gpiolib: acpi: Make acpi_gpio_to_gpiod_flags() usable for GpioInt() GpioInt() implies input configuration of the pin. Add this to the acpi_gpio_to_gpiod_flags() and make usable for GpioInt(). Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Reviewed-by: Hans de Goede Reviewed-by: Mika Westerberg commit 56f7058af0dc0fb07b03cb49b945d8793dc3264a Author: Vasile-Laurentiu Stanimir Date: Thu Oct 1 20:12:12 2020 +0300 gpiolib: acpi: Set initial value for output pin based on bias and polarity GpioIo() resources don't contain an initial value for the output pin. Therefore instead of deducting its value solely based on bias field we should deduce that value from the polarity and the bias fields. Typical scenario is, when pin is defined in the table and its polarity, specified in _DSD or via platform code, is defined as active low, in the following call chain: -> acpi_populate_gpio_lookup() -> acpi_gpio_to_gpiod_flags() it will return GPIOD_OUT_HIGH if bias is set no matter if polarity is GPIO_ACTIVE_LOW, so it will return the current level instead of the logical level. Cc: Hans de Goede Signed-off-by: Vasile-Laurentiu Stanimir Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Reviewed-by: Mika Westerberg commit 1a81f19154b4afcd4216a7253938adf1c0e65ea9 Author: Andy Shevchenko Date: Mon Nov 9 22:53:27 2020 +0200 gpiolib: acpi: Move acpi_gpio_to_gpiod_flags() upper in the code Move acpi_gpio_to_gpiod_flags() upper in the code to allow further refactoring. Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Reviewed-by: Hans de Goede Reviewed-by: Mika Westerberg commit ce698f4ec18c56ca1f5f725fcf6f7e2c04d90be1 Author: Andy Shevchenko Date: Wed Nov 11 20:01:52 2020 +0200 gpiolib: acpi: Move non-critical code outside of critical section Mika noticed that some code is run under mutex when it doesn't require the lock, like an error code assignment. Move non-critical code outside of critical section. Suggested-by: Mika Westerberg Cc: Hans de Goede Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Reviewed-by: Mika Westerberg commit 8dcb7a15a585b6d0fee15751ce11d7a68cfedd56 Author: Andy Shevchenko Date: Mon Nov 9 22:53:26 2020 +0200 gpiolib: acpi: Take into account debounce settings We didn't take into account the debounce settings supplied by ACPI. This change is targeting the mentioned gap. Reported-by: Coiby Xu Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Reviewed-by: Hans de Goede Reviewed-by: Mika Westerberg commit 32fa65527ce13607de0fbf2e7aeddb978ea2220a Author: Andy Shevchenko Date: Mon Nov 9 22:53:25 2020 +0200 gpiolib: acpi: Use named item for enum gpiod_flags variable Use named item instead of plain integer for enum gpiod_flags to make it clear that even 0 has its own meaning. Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Reviewed-by: Hans de Goede Reviewed-by: Mika Westerberg commit e7b731327aeac9c5b3c5c8677102813a34cc380a Author: Andy Shevchenko Date: Mon Nov 9 22:53:24 2020 +0200 gpiolib: acpi: Respect bias settings for GpioInt() resource In some cases the GpioInt() resource is coming with bias settings which may affect system functioning. Respect bias settings for GpioInt() resource by calling acpi_gpio_update_gpiod_*flags() API in acpi_dev_gpio_irq_get(). Reported-by: Jamie McClymont Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Reviewed-by: Hans de Goede Reviewed-by: Mika Westerberg commit f725edd86b6b2415db9ae9bb6293f8300b9dbce9 Author: Andy Shevchenko Date: Mon Nov 9 22:53:23 2020 +0200 gpiolib: Introduce gpio_set_debounce_timeout() for internal use In some cases we would like to have debounce setter which doesn't fail when a feature is not supported by a controller. Cc: Mika Westerberg Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Reviewed-by: Hans de Goede commit baca3b15cd2a171fa967223e2d7aea6e5f98ba9e Author: Andy Shevchenko Date: Wed Nov 11 20:49:30 2020 +0200 gpiolib: Extract gpio_set_config_with_argument_optional() helper This function is useful for internal use in the GPIO library. There will be new user coming, prepare a helper for the new comer and the existing ones. Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Reviewed-by: Hans de Goede Reviewed-by: Mika Westerberg commit 6aa32ad70759a9e4f6ceee137b06ac55d36a71e3 Author: Andy Shevchenko Date: Mon Nov 9 22:53:21 2020 +0200 gpiolib: move bias related code from gpio_set_config() to gpio_set_bias() Move bias related code from gpio_set_config() to gpio_set_bias(). Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Reviewed-by: Hans de Goede Reviewed-by: Mika Westerberg commit 0c4d86663ba134cfe216eec5dd2c1ed3d52767e6 Author: Andy Shevchenko Date: Mon Nov 9 22:53:20 2020 +0200 gpiolib: Extract gpio_set_config_with_argument() for future use In the future we will need to have a separate function that takes an arbitrary argument value. Extract gpio_set_config_with_argument() for that purpose. Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Reviewed-by: Hans de Goede Reviewed-by: Mika Westerberg commit 8b69461c2b7c801e37259dc6e71b126c23c3f20d Author: Andy Shevchenko Date: Mon Nov 9 22:53:18 2020 +0200 gpiolib: use proper API to pack pin configuration parameters Instead of open coded macro use, call pinconf_to_config_packed(). Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Reviewed-by: Hans de Goede Reviewed-by: Mika Westerberg commit 6900fad60ac6987b7c1e4dee2e99e28701a2b8fb Author: Andy Shevchenko Date: Mon Nov 9 22:53:17 2020 +0200 gpiolib: add missed break statement It's no difference in the functionality, but after the change the code is less error prone to various checkers. Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Reviewed-by: Hans de Goede Reviewed-by: Mika Westerberg commit 13daf48978280ea8bce38f1e0598b913b09f5395 Author: Andy Shevchenko Date: Mon Nov 9 22:53:16 2020 +0200 gpiolib: Replace unsigned by unsigned int Replace unsigned by unsigned int in GPIO library code. Note, legacy API left untouched. Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Reviewed-by: Hans de Goede Reviewed-by: Mika Westerberg commit 018ce2214740ed0958e6c9e5185fc0381e47b1ee Merge: 27b5ea2fcb90d f3c75e7a9349d Author: Andy Shevchenko Date: Mon Nov 16 14:14:22 2020 +0200 Merge tag 'intel-pinctrl-v5.10-2' into HEAD intel-pinctrl for v5.10-2 * Respect bias setting when comes from ACPI The following is an automated git shortlog grouped by driver: intel: - Set default bias in case no particular value given - Fix 2 kOhm bias which is 833 Ohm commit ab07a1356043f07142ba351253904ef8c42ecd4f Author: Wolfram Sang Date: Wed Nov 11 11:02:44 2020 +0100 mmc: renesas_sdhi: sort includes Better prevent double includes. Signed-off-by: Wolfram Sang Reviewed-by: Niklas Söderlund Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20201111100244.15823-4-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 0e08a411585214360938022ca3f50a9f1cd91753 Author: Wolfram Sang Date: Wed Nov 11 11:02:43 2020 +0100 mmc: renesas_sdhi: don't hardcode SDIF values Use a macro to name the hardcoded values. Also, move the SDIF register definition into the SDHI driver because this is an SDHI extension. Signed-off-by: Wolfram Sang Reviewed-by: Niklas Söderlund Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20201111100244.15823-3-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 4533c3eb893d8d6881f792a855fa5e11d5ddf0c2 Author: Wolfram Sang Date: Wed Nov 11 11:02:42 2020 +0100 mmc: renesas_sdhi: improve HOST_MODE usage HOST_MODE should have a CTL_ prefix, too. This makes the code more readable because we immediately know what it is. Also, remove the hardcoded values with something readable, too. Signed-off-by: Wolfram Sang Reviewed-by: Niklas Söderlund Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20201111100244.15823-2-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 8c8310a6c2a6b86edadf15d511f4c1b332516b21 Author: Wolfram Sang Date: Tue Nov 10 17:21:51 2020 +0100 mmc: renesas_sdhi: remove superfluous SCLKEN All previously called functions handle SCLKEN on their own, no need to enable it again in sdhi_reset(). Signed-off-by: Wolfram Sang Tested-by: Niklas Söderlund Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20201110162151.37622-4-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 80d0be81102405f1172f9b017feef323e5931959 Author: Wolfram Sang Date: Tue Nov 10 17:21:50 2020 +0100 mmc: renesas_sdhi: merge the SCC reset functions There is no user of renesas_sdhi_reset_scc() anymore, only renesas_sdhi_disable_scc() so merge these functions into one. I guess the seperation was cruft anyhow. The BSP doesn't have it anymore and I can't recall the reason we had it. Signed-off-by: Wolfram Sang Tested-by: Niklas Söderlund Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20201110162151.37622-3-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 183edc060e6969a3afe83f663b534f6324fb7e3a Author: Wolfram Sang Date: Tue Nov 10 17:21:49 2020 +0100 mmc: renesas_sdhi: clear TAPEN when resetting, too We want to clear TAPEN in a software reset, too, to have a completely known state. Especially when we doing the initial reset during boot to clear previous firmware states. Signed-off-by: Wolfram Sang Tested-by: Niklas Söderlund Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20201110162151.37622-2-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 9f809065d86dec2070263acedaa5758f8c9e95a9 Author: Wolfram Sang Date: Tue Nov 10 15:20:58 2020 +0100 mmc: renesas_sdhi: simplify reset routine a little The 'reset' pointer is only populated for Gen2+. So, we don't need to check for that flag inside the routine. Signed-off-by: Wolfram Sang Reviewed-by: Niklas Söderlund Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20201110142058.36393-5-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit d14ac691bb6f6ebaa7eeec21ca04dd47300ff5b6 Author: Wolfram Sang Date: Tue Nov 10 15:20:57 2020 +0100 mmc: renesas_sdhi: populate SCC pointer at the proper place The SCC pointer is currently filled whenever the SoC is Gen2+. This is wrong because there is a Gen2-variant without SCC (SDHI_VER_GEN2_SDR50). We have been lucky because the writes to unintended registers have not caused problems so far. But further refactoring work exposed the problem. So, move the pointer initialization to the place where we know that the SDHI instance supports tuning. And also populate the 'reset' pointer unconditionally to make sure the interrupt enable register is always properly set for Gen2+. Signed-off-by: Wolfram Sang Reviewed-by: Niklas Söderlund Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20201110142058.36393-4-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit b161d87dfd3d9f3fb064a089a9e521d0e5d3e38f Author: Wolfram Sang Date: Tue Nov 10 15:20:56 2020 +0100 mmc: renesas_sdhi: probe into TMIO after SCC parameters have been setup Setting up the SCC parameters does not need a probed TMIO device. But in the near future, probing the TMIO device needs the SCC parameters setup. So, fix the ordering. Signed-off-by: Wolfram Sang Reviewed-by: Niklas Söderlund Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20201110142058.36393-3-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 45bffc371fefd8537804b001080a47c6b69d5efa Author: Wolfram Sang Date: Tue Nov 10 15:20:55 2020 +0100 mmc: renesas_sdhi: only reset SCC when its pointer is populated Only re-initialize SCC and tuning when an SCC was found during probe(). This is currently a noop because all R-Car Gen2+ are considered to have an SCC. But this will change in a later patch, so we need this preparation. Signed-off-by: Wolfram Sang Reviewed-by: Niklas Söderlund Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20201110142058.36393-2-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 1f71b0bf4ef8992ae7749f917b6593fd902ec476 Author: Zou Wei Date: Mon Nov 9 10:25:06 2020 +0800 mmc: owl-mmc: use true and false for bool variables Fix coccicheck warnings: ./owl-mmc.c:524:2-18: WARNING: Assignment of 0/1 to bool variable ./owl-mmc.c:528:2-18: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: Zou Wei Link: https://lore.kernel.org/r/1604888706-63429-1-git-send-email-zou_wei@huawei.com Signed-off-by: Ulf Hansson commit d7356a7ab125c3a4fee521b7530f3122bc842ac4 Author: Alexander Shiyan Date: Wed Nov 11 18:59:10 2020 +0300 ARM: dts: am335x: Fix comments for AM335X_PIN_GPMC_WPN pin in GPIO mode According to AM335x datasheet pin AM335X_PIN_GPMC_WPN in MODE7 works as GPIO0[31]. Signed-off-by: Alexander Shiyan Signed-off-by: Tony Lindgren commit 672081b5dd94a4f81e545c79c96e3a1dfdffd2f1 Author: David Lechner Date: Mon Oct 12 16:12:28 2020 -0500 ARM: dts: am335x-boneblue: Enable eQEP This enables the Enhanced Quadrature Encoder Pulse (eQEP) module for connectors E1, E2 and E3 on BeagleBone Blue. Signed-off-by: David Lechner Signed-off-by: Tony Lindgren commit 02564e1ad77e5fe1bbae87ed8490dc503c6f9570 Author: David Lechner Date: Mon Oct 12 16:12:27 2020 -0500 ARM: dts: am33xx: Add nodes for eQEP This adds new nodes for the Texas Instruments Enhanced Quadrature Encoder Pulse (eQEP) module in the PWM subsystem on AM33XX. Signed-off-by: David Lechner Signed-off-by: Tony Lindgren commit be5cd39a5e2cfa9cd78ccd00e7886029e21ceaf1 Author: Tero Kristo Date: Mon Sep 7 12:52:46 2020 +0300 ARM: dts: dra7: add second SHA instance DRA7 SoC has two SHA instances, add the missing second one under the main dts file. Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren commit df6c2ec872a62cf81dff86ef62818dea89cc9d98 Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 ARM: OMAP2+: Drop legacy remaining legacy platform data for am4 We can now drop the remaining legacy platform data as we are probing devices with device tree data. Signed-off-by: Tony Lindgren commit 4cf6a21411b7a29b6e46f9e3fb2118edb3b602d2 Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 ARM: dts: Use simple-pm-bus for genpd for am4 l3 We can now enable simple-pm-bus to use genpd. Signed-off-by: Tony Lindgren commit 994b86e8fd017d06fb3c333fbd6c25aa3c9edfca Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 ARM: dts: Move am4 l3 noc to a separate node In preparation for probing l3 with simple-pm-bus and genpd, we must move l3 noc to a separate node to prevent omap_l3_noc.c driver from claiming the whole l3 instance before simple-pm-bus has a chance to probe. Signed-off-by: Tony Lindgren commit 2e4da7eab473585c1a041b3e2e106ea99a684747 Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 ARM: dts: Use simple-pm-bus for genpd for am4 l4_per We can now enable simple-pm-bus to use genpd. Signed-off-by: Tony Lindgren commit 3de94f076cda64b1081ecc3ec4b706ff3222e63c Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 ARM: dts: Use simple-pm-bus for genpd for am4 l4_fast We can now enable simple-pm-bus to use genpd. Signed-off-by: Tony Lindgren commit 209ca3e8add0fb3331f5ccdf29bdb1a82b10533c Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 ARM: dts: Use simple-pm-bus for genpd for am4 l4_wkup We can now enable simple-pm-bus to use genpd. Signed-off-by: Tony Lindgren commit 98e6c0ae1444b97ba1ad2078847d50cb324a070e Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 ARM: OMAP2+: Drop legacy platform data for am4 mpuss We can now probe devices with ti-sysc interconnect driver and dts data. Let's drop the related platform data and custom ti,hwmods dts property. Signed-off-by: Tony Lindgren commit ffbf46a3624cad94ee087a5d486b423e43f6bc1f Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 ARM: OMAP2+: Drop legacy platform data for am4 ocmcram 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. Note that we need to use "ti,no-idle" here. Cc: Dave Gerlach Cc: Suman Anna Signed-off-by: Tony Lindgren commit 04af40fc7433555d31d73b698f0fb292b0bf9d7c Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 ARM: OMAP2+: Drop legacy platform data for am4 emif We can now probe devices with ti-sysc interconnect driver and dts data. Let's drop the related platform data and custom ti,hwmods dts property. Cc: Dave Gerlach Cc: Suman Anna Signed-off-by: Tony Lindgren commit f7ddc2c9746984524c44a85e1b11eaa221593089 Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 ARM: OMAP2+: Drop legacy platform data for am4 wkup_m3 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: Dave Gerlach Cc: Suman Anna Signed-off-by: Tony Lindgren commit 302502efaf8fa0f553634b736723e1f9aedbda10 Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 ARM: dts: Configure interconnect target module for am4 wkup_m3 We can now probe devices with device tree only configuration using ti-sysc interconnect target module driver. Note that we no longer need ti,no-reset-on-init as the rstctrl resets are properly handled by the reset driver and claimed by the RTC driver. And we need to squash together the module ranges for driver compability. Cc: Dave Gerlach Cc: Suman Anna Signed-off-by: Tony Lindgren commit d8fecb36f42da03f40fe15bf7900ccd32a8122e2 Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 ARM: dts: Configure RTC powerdomain for am4 For genpd we need the RTC powerdomain configured. Cc: Dave Gerlach Cc: Suman Anna Signed-off-by: Tony Lindgren commit 2b999ae15b64643e7c6b79982cc4a8e2dd6db797 Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 ARM: OMAP2+: Drop legacy platform data for am4 control module 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. To drop the legacy platform data for am3 control module, we need to configure the missing functional clock and tag the module to not idle as platform data also had it configured with HWMOD_INIT_NO_IDLE. Signed-off-by: Tony Lindgren commit 00cb24bec0abcf177613abbfc32d7710ac8d6544 Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 ARM: dts: Configure also interconnect clocks for am4 system timer We now manage clocksource and clockevent clocks directly with timer-ti-dm-systimer. In order to use genpd with prm_omap, GENPD_FLAG_PM_CLK and simple-pm-bus, we need to keep the system timer related interconnect clocks enabled until clocksource suspend is done. Signed-off-by: Tony Lindgren commit 50896b745187b0a9ffca5bcf832424ce7501b2b5 Author: Tero Kristo Date: Mon Nov 16 12:57:13 2020 +0200 ARM: dts: am43xx: add remaining PRM instances Add remaining PRM instances for the am43xx SoC. Additionally enable the genpd support for them. Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren commit f32f0cbd52c48d51d0134c64cd503a8e8b4a08d6 Author: Tero Kristo Date: Mon Nov 16 12:57:13 2020 +0200 soc: ti: omap-prm: am4: add genpd support for remaining PRM instances Add genpd support for mpu, rtc, tamper, cefuse, per and wkup instances. Cc: Santosh Shilimkar Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren commit d36edb048f48babb3fbf9a4b249df115b7fab152 Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 clk: ti: am437x: Keep am4 l3 main clock always on for genpd In order for suspend and resume to work with genpd on am4, we must keep l3 main clock always on. Otherwise prm_omap driver will shut down the l3 main clock on suspend when simple-pm-bus and GENPD_FLAG_PM_CLK are used. Note that we already keep the l3 main clock always on with the legacy platform code. Later on we may want to start managing the l3 main clock with a dedicated interconnect driver instead of using simple-pm-bus and GENPD_FLAG_PM_CLK. Cc: linux-clk@vger.kernel.org Cc: Michael Turquette Cc: Stephen Boyd Cc: Tero Kristo Signed-off-by: Tony Lindgren commit c24aa7b160f558c5ca4f05168dfab021987601c9 Author: Kaixu Xia Date: Sun Nov 8 23:00:48 2020 +0800 mmc: sdhci-pic32: Make pic32_sdhci_probe_platform() void pic32_sdhci_probe_platform() always returned 0, so there's no reason for a return value. In addition, pic32_sdhci_probe() checked the return value for possible error which is unnecessary. Convert pic32_sdhci_probe_platform() to a void function and remove the return value check. Fix the following Coccinelle warning: ./drivers/mmc/host/sdhci-pic32.c:127:5-8: Unneeded variable: "ret". Return "0" on line 137 Reported-by: Tosk Robot Signed-off-by: Kaixu Xia Link: https://lore.kernel.org/r/1604847648-13036-1-git-send-email-kaixuxia@tencent.com Signed-off-by: Ulf Hansson commit 9f7d4c916c42ec310d17dc0ea8f4ebf64aa1bbf1 Author: Tian Tao Date: Fri Nov 6 09:56:53 2020 +0800 mmc: dw_mmc: replace spin_lock_irqsave by spin_lock in hard IRQ The code has been in a irq-disabled context since it is hard IRQ. There is no necessity to do it again. Signed-off-by: Tian Tao Link: https://lore.kernel.org/r/1604627813-59785-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Ulf Hansson commit e2c01e9192758d0d011df1f4ed20eac2bdca2a3b Author: Krzysztof Kozlowski Date: Tue Nov 3 17:30:46 2020 +0100 mmc: meson-gx: drop of_match_ptr from of_device_id table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant here). This fixes compile warning (!CONFIG_OF && !CONFIG_MODULES): drivers/mmc/host/meson-gx-mmc.c:1252:34: warning: ‘meson_mmc_of_match’ defined but not used [-Wunused-const-variable=] Reported-by: kernel test robot Signed-off-by: Krzysztof Kozlowski Acked-by: Kevin Hilman Link: https://lore.kernel.org/r/20201103163046.14336-1-krzk@kernel.org Signed-off-by: Ulf Hansson commit 5eefe22d223573a32afb9be7e53bff2acff6423a Author: Rui Feng Date: Tue Nov 3 17:55:21 2020 +0800 misc: rtsx: Fix clock timing for RTS5261 This patch fix clock timing for RTS5261, using 256 divide for the version higher than version C. Signed-off-by: Rui Feng Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/1604397321-3026-1-git-send-email-rui_feng@realsil.com.cn Signed-off-by: Ulf Hansson commit 1672617d512880f31d1d43ca0eb0d13d50b8c680 Author: Rui Feng Date: Tue Nov 3 17:55:12 2020 +0800 misc: rtsx: Add hardware auto power off for RTS5261 This patch enable hardware auto power off when card is removed. Signed-off-by: Rui Feng Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/1604397312-2991-1-git-send-email-rui_feng@realsil.com.cn Signed-off-by: Ulf Hansson commit 1da3c51512ce01dec42ad763421ab24c3dc1e3dd Author: Rui Feng Date: Tue Nov 3 17:55:05 2020 +0800 misc: rtsx: Add CD & WP reverse support for RTS5261 This patch add CD & WP reverse support for RTS5261 Signed-off-by: Rui Feng Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/1604397305-2956-1-git-send-email-rui_feng@realsil.com.cn Signed-off-by: Ulf Hansson commit 5b0f429ede5af1e6da80d60a0b164346008e30ec Author: Rui Feng Date: Tue Nov 3 17:54:58 2020 +0800 misc: rtsx: Check mmc support for RTS5261 This patch check mmc support when RTS5261 initialize, and not support mmc default. Signed-off-by: Rui Feng Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/1604397298-2921-1-git-send-email-rui_feng@realsil.com.cn Signed-off-by: Ulf Hansson commit 6f61dd284475a82e8224b16f4376a118e01e303b Author: Rui Feng Date: Tue Nov 3 17:54:51 2020 +0800 misc: rtsx: Fix PAD driving for RTS5261 This patch fix PAD driving for RTS5261 Signed-off-by: Rui Feng Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/1604397291-2885-1-git-send-email-rui_feng@realsil.com.cn Signed-off-by: Ulf Hansson commit 0a3bbf92df7faf8b30c8e4560db5021bbf07766d Author: Rui Feng Date: Tue Nov 3 17:54:45 2020 +0800 misc: rtsx: Fix aspm for RTS5261 This patch fix the bug that LDO is off when aspm is enabled. Signed-off-by: Rui Feng Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/1604397285-2850-1-git-send-email-rui_feng@realsil.com.cn Signed-off-by: Ulf Hansson commit c28e3fb28f87cc0dba915f1303f4d018686363b8 Author: Rui Feng Date: Tue Nov 3 17:54:38 2020 +0800 misc: rtsx: Fix OCP function for RTS5261 This patch fix the bug that when there is over current but reader can't enable OCP. Signed-off-by: Rui Feng Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/1604397278-2815-1-git-send-email-rui_feng@realsil.com.cn Signed-off-by: Ulf Hansson commit 6b7b58f425c3359787483479d73c0bb98ffc65b8 Author: Rui Feng Date: Tue Nov 3 17:54:29 2020 +0800 mmc: rtsx: Add test mode for RTS5261 This patch add test mode for RTS5261. If test mode is set, reader will switch to SD Express mode mandatorily, and this mode is used by factory testing only. Signed-off-by: Rui Feng Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/1604397269-2780-1-git-send-email-rui_feng@realsil.com.cn Signed-off-by: Ulf Hansson commit 13b4e1e92411d4f375c7ffe1b72abb162369ab53 Author: Wenbin Mei Date: Mon Nov 2 17:28:22 2020 +0800 mmc: mediatek: add HS400 enhanced strobe support Add support for HS400ES mode to MediaTek MMC Card Driver. Signed-off-by: Wenbin Mei Link: https://lore.kernel.org/r/20201102092822.5301-2-wenbin.mei@mediatek.com Signed-off-by: Ulf Hansson commit fa4c9a497c2cdc6d398cbde146c1358d006f6608 Author: Tian Tao Date: Mon Nov 2 08:52:17 2020 +0800 mmc: owl-mmc: replace spin_lock_irqsave by spin_lock in hard IRQ The code has been in a irq-disabled context since it is hard IRQ. There is no necessity to do it again. Signed-off-by: Tian Tao Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1604278337-55624-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Ulf Hansson commit 291a81c3b0610c5dc4689d13e94b8557069788fe Author: Tian Tao Date: Tue Nov 3 11:48:43 2020 +0800 mmc: meson-mx-sdio: replace spin_lock_irqsave by spin_lock in hard IRQ The code has been in a irq-disabled context since it is hard IRQ. There is no necessity to do it again. Signed-off-by: Tian Tao Reviewed-by: Jerome Brunet Link: https://lore.kernel.org/r/1604375323-33556-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Ulf Hansson commit 120ae805fbb96424ecf28bda3a0316faa3361a3e Author: Tian Tao Date: Fri Oct 30 09:28:39 2020 +0800 mmc: moxart: replace spin_lock_irqsave by spin_lock in hard IRQ The code has been in a irq-disabled context since it is hard IRQ. There is no necessity to do it again. Signed-off-by: Tian Tao Link: https://lore.kernel.org/r/1604021319-31338-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Ulf Hansson commit 86d9bf50af08ab696c3f29a30cfb0b04cc59a78c Author: Tom Rix Date: Sat Oct 31 08:27:08 2020 -0700 mmc: davinci: remove unneeded semicolon A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20201031152708.2146690-1-trix@redhat.com Signed-off-by: Ulf Hansson commit a85344d347284cc3d81e8fc230788d3f82b9bb45 Author: Tom Rix Date: Sat Oct 31 07:27:56 2020 -0700 memstick: tifm: remove unneeded semicolon A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20201031142756.2140029-1-trix@redhat.com Signed-off-by: Ulf Hansson commit 8c3c0aca1a0cef20ac739b63f26971849b0f453a Author: Tom Rix Date: Sat Oct 31 06:48:18 2020 -0700 memstick: mspro_block: remove unneeded semicolon A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20201031134818.2135446-1-trix@redhat.com Signed-off-by: Ulf Hansson commit fb8298631b11ba81e4326f8a8e54505e8439d28d Author: Tom Rix Date: Sat Oct 31 07:25:05 2020 -0700 memstick: jmb38x_ms: remove unneeded semicolon A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20201031142505.2139539-1-trix@redhat.com Signed-off-by: Ulf Hansson commit 9ff43c7be9b417ed712de0f6a0918974f60beacf Author: Rui Feng Date: Thu Oct 29 09:58:23 2020 +0800 mmc: rtsx_pci: Add SD Express mode support for RTS5261 RTS5261 support SD mode and PCIe/NVMe mode. The workflow is as follows. 1.RTS5261 work in SD mode and set MMC_CAPS2_SD_EXP flag. 2.If card is plugged in, Host send CMD8 to ask card's PCIe availability. 3.If the card has PCIe availability and WP is not set, init_sd_express() will be invoked, RTS5261 switch to PCIe/NVMe mode. 4.Mmc driver handover it to NVMe driver. 5.If card is unplugged, RTS5261 will switch to SD mode. Signed-off-by: Rui Feng Link: https://lore.kernel.org/r/1603936703-3403-1-git-send-email-rui_feng@realsil.com.cn Signed-off-by: Ulf Hansson commit 5afe802132f242f5520d2acac09ea05d31e3c7cf Author: Rui Feng Date: Thu Oct 29 09:57:48 2020 +0800 misc: rtsx: Add SD Express mode support for RTS5261 RTS5261 support SD mode and PCIe/NVMe mode. The workflow is as follows. 1.RTS5261 work in SD mode and set MMC_CAPS2_SD_EXP flag. 2.If card is plugged in, Host send CMD8 to ask card's PCIe availability. 3.If the card has PCIe availability and WP is not set, init_sd_express() will be invoked, RTS5261 switch to PCIe/NVMe mode. 4.Mmc driver handover it to NVMe driver. 5.If card is unplugged, RTS5261 will switch to SD mode. Signed-off-by: Rui Feng Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/1603936668-3363-1-git-send-email-rui_feng@realsil.com.cn Signed-off-by: Ulf Hansson commit ead49373d2916080509f51fc6a4ee8f9bc021b9b Author: Ulf Hansson Date: Thu Oct 29 09:57:16 2020 +0800 mmc: core: Initial support for SD express card/host In the SD specification v7.10 the SD express card has been added. This new type of removable SD card, can be managed via a PCIe/NVMe based interface, while also allowing backwards compatibility towards the legacy SD interface. To keep the backwards compatibility, it's required to start the initialization through the legacy SD interface. If it turns out that the mmc host and the SD card, both supports the PCIe/NVMe interface, then a switch should be allowed. Therefore, let's introduce some basic support for this type of SD cards to the mmc core. The mmc host, should set MMC_CAP2_SD_EXP if it supports this interface and MMC_CAP2_SD_EXP_1_2V, if also 1.2V is supported, as to inform the core about it. To deal with the switch to the PCIe/NVMe interface, the mmc host is required to implement a new host ops, ->init_sd_express(). Based on the initial communication between the host and the card, host->ios.timing is set to either MMC_TIMING_SD_EXP or MMC_TIMING_SD_EXP_1_2V, depending on if 1.2V is supported or not. In this way, the mmc host can check these values in its ->init_sd_express() ops, to know how to proceed with the handover. Note that, to manage card insert/removal, the mmc core sticks with using the ->get_cd() callback, which means it's the host's responsibility to make sure it provides valid data, even if the card may be managed by PCIe/NVMe at the moment. As long as the card seems to be present, the mmc core keeps the card powered on. Cc: Greg Kroah-Hartman Cc: Arnd Bergmann Cc: Christoph Hellwig Cc: Rui Feng Signed-off-by: Ulf Hansson Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/1603936636-3126-1-git-send-email-rui_feng@realsil.com.cn commit 9baf7c5e3ab364c038070a3b396de3b8a10016cd Author: Tian Tao Date: Mon Oct 19 08:43:13 2020 +0800 mmc: mediatek: Replace spin_lock_irqsave by spin_lock in hard IRQ The code has been in a irq-disabled context since it is hard IRQ. Therefore there no need to do it again. Signed-off-by: Tian Tao Link: https://lore.kernel.org/r/1603068193-44688-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Ulf Hansson commit f5eccd94b63f6abf74b890770f268bfc8f59a9bb Author: Wenbin Mei Date: Wed Oct 14 11:08:46 2020 +0800 mmc: mediatek: Add subsys clock control for MT8192 msdc MT8192 msdc is an independent sub system, we need control more bus clocks for it. Add support for the additional subsys clocks to allow it to be configured appropriately. Signed-off-by: Wenbin Mei Reviewed-by: Nicolas Boichat Link: https://lore.kernel.org/r/20201014030846.12428-5-wenbin.mei@mediatek.com Signed-off-by: Ulf Hansson commit 59a23395d8aa2662725ec9f162b9d3b0f34d56ce Author: Wenbin Mei Date: Wed Oct 14 11:08:44 2020 +0800 dt-bindings: mmc: Add support for MT8192 SoC MT8192 mmc host IP is compatible with MT8183, let's add support for this. Signed-off-by: Wenbin Mei Link: https://lore.kernel.org/r/20201014030846.12428-3-wenbin.mei@mediatek.com Signed-off-by: Ulf Hansson commit c626695ecd8b8a5f66982519d07207423107c077 Author: Wenbin Mei Date: Wed Oct 14 11:08:43 2020 +0800 dt-bindings: mmc: Convert mtk-sd to json-schema Convert the mtk-sd binding to DT schema format using json-schema. Signed-off-by: Wenbin Mei Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201014030846.12428-2-wenbin.mei@mediatek.com Signed-off-by: Ulf Hansson commit e10f480902da770db895b6a1d2f10b11d80fe5d8 Author: Raul E Rangel Date: Tue Oct 27 19:46:12 2020 +1100 mmc: sdhci-acpi: AMDI0040: Allow changing HS200/HS400 driver strength This change will allow platform designers better control over signal integrity by allowing them to tune the HS200 and HS400 driver strengths. The driver strength was previously hard coded to A to solve boot problems with certain platforms. This driver strength does not universally apply to all platforms so we need a knob to adjust it. All older platforms currently have the SDR104 preset hard coded to A in the firmware. This means that switching from the hard coded value in the kernel to reading the SDR104 preset is a no-op for these platforms. Newer platforms will have properly set presets. So this change will support both new and old platforms. Signed-off-by: Raul E Rangel Signed-off-by: Victor Ding Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20201027084612.528301-1-victording@google.com Signed-off-by: Ulf Hansson commit b733775fb68f2a179dd28e6b41ff189fbcd3e95b Author: Krzysztof Kozlowski Date: Mon Oct 26 16:38:10 2020 +0100 mmc: sunxi: drop of_match_ptr from of_device_id table The driver can match only via DT table so it should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant for sunxi). This fixes compile warning: drivers/mmc/host/sunxi-mmc.c:1181:34: warning: ‘sunxi_mmc_of_match’ defined but not used [-Wunused-const-variable=] Reported-by: kernel test robot Signed-off-by: Krzysztof Kozlowski Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/20201026153810.89512-3-krzk@kernel.org Signed-off-by: Ulf Hansson commit 1b0e4a2141c7bf6a122f1e04cbc1690b835707cf Author: Krzysztof Kozlowski Date: Mon Oct 26 16:38:09 2020 +0100 mmc: s3cmci: enable compile testing The driver can be compile tested to increase build coverage. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201026153810.89512-2-krzk@kernel.org Signed-off-by: Ulf Hansson commit 1dc575490bff8b1c491d6b723b772ab6f02865a5 Author: Krzysztof Kozlowski Date: Mon Oct 26 16:38:08 2020 +0100 mmc: s3cmci: include GPIO descriptor consumer header The driver uses GPIO Descriptor Consumer Interface so include proper header to fix compile test errors like: drivers/mmc/host/s3cmci.c: In function ‘s3cmci_check_sdio_irq’: drivers/mmc/host/s3cmci.c:304:7: error: implicit declaration of function ‘gpiod_get_value’; did you mean ‘gpio_get_value’? [-Werror=implicit-function-declaration] drivers/mmc/host/s3cmci.c: In function ‘s3cmci_probe_pdata’: drivers/mmc/host/s3cmci.c:1451:19: error: implicit declaration of function ‘devm_gpiod_get_index’ [-Werror=implicit-function-declaration] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201026153810.89512-1-krzk@kernel.org Signed-off-by: Ulf Hansson commit 133ad7ab7005dc951fb66d3de9e29a8259fe9744 Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 ARM: OMAP2+: Build hwmod related code as needed If we have only am3 selected, there's no need to build the hwmod related code as we are probing devices with device tree data. Signed-off-by: Tony Lindgren commit 68fc5990b8be229274964a22547c7e078342bad1 Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 ARM: OMAP2+: Drop legacy remaining legacy platform data for am3 We can now drop the remaining legacy platform data as we are probing devices with device tree data. Signed-off-by: Tony Lindgren commit 472931c641dfa5f8cdb4f2a637e4afdf78dba63c Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 ARM: dts: Use simple-pm-bus for genpd for am3 l3 We can now enable simple-pm-bus to use genpd. Signed-off-by: Tony Lindgren commit 25ddbb2b88cf3e82a11cb3f661afec5e34d23eb5 Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 ARM: dts: Use simple-pm-bus for genpd for am3 l4_per We can now enable simple-pm-bus to use genpd. Signed-off-by: Tony Lindgren commit ac1c14f51a8216764d6bb446def98092c7c95f1a Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 ARM: dts: Use simple-pm-bus for genpd for am3 l4_fast We can now enable simple-pm-bus to use genpd. Signed-off-by: Tony Lindgren commit 5a230524f87926f24d637fe62fd689f7f86f5036 Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 ARM: dts: Use simple-pm-bus for genpd for am3 l4_wkup We can now enable simple-pm-bus to use genpd. Signed-off-by: Tony Lindgren commit b0625afe305253d0831af9289b37c906c18a781b Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 ARM: OMAP2+: Drop legacy platform data for am3 mpuss We can now probe devices with ti-sysc interconnect driver and dts data. Let's drop the related platform data and custom ti,hwmods dts property. As we're just dropping data, and the early platform data init is based on the custom ti,hwmods property, we want to drop both the platform data and ti,hwmods property in a single patch. Signed-off-by: Tony Lindgren commit 675755705f08fb30164f2022fe30ee3b18d52bd4 Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 ARM: OMAP2+: Drop legacy platform data for am3 instr We can now probe devices with ti-sysc interconnect driver and dts data. Let's drop the related platform data and custom ti,hwmods dts property. Signed-off-by: Tony Lindgren commit 2e5395684b213fd128f0e9fb0fa3d70cf5bfd4b1 Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 ARM: OMAP2+: Drop legacy platform data for am3 ocmcram 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. Note that we need to use "ti,no-idle" here. Cc: Dave Gerlach Cc: Suman Anna Signed-off-by: Tony Lindgren commit 966c5e9f149fa1b1ee57b440fef3cd5405dfdd41 Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 ARM: OMAP2+: Drop legacy platform data for am3 emif We can now probe devices with ti-sysc interconnect driver and dts data. Let's drop the related platform data and custom ti,hwmods dts property. Cc: Dave Gerlach Cc: Suman Anna Signed-off-by: Tony Lindgren commit e990ebae4c27bc5bd06bbfefffa9564dc4f2417a Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 ARM: OMAP2+: Drop legacy platform data for am3 debugss We can now probe devices with ti-sysc interconnect driver and dts data. Let's drop the related platform data and custom ti,hwmods dts property. Signed-off-by: Tony Lindgren commit df7f2f95042850bfd890afec41e0dbe3de8ae1bd Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 ARM: OMAP2+: Drop legacy platform data for am3 and am4 gpmc 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: Roger Quadros Signed-off-by: Tony Lindgren commit 3856e86f86d6793fcf1e30fbc2976a61ca816737 Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 ARM: OMAP2+: Drop legacy platform data for am3 wkup_m3 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: Dave Gerlach Cc: Suman Anna Signed-off-by: Tony Lindgren commit b2304c5b0cf347b688694ac63a2bc434709beed2 Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 ARM: dts: Configure interconnect target module for am3 wkup_m3 We can now probe devices with device tree only configuration using ti-sysc interconnect target module driver. Note that we no longer need ti,no-reset-on-init as the rstctrl resets are properly handled by the reset driver and claimed by the RTC driver. And we need to squash together the module ranges for driver compability. Cc: Dave Gerlach Cc: Suman Anna Signed-off-by: Tony Lindgren commit bfbad30690195996774ed2ddc8a55fb32cce0de0 Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 ARM: dts: Configure RTC powerdomain for am3 For genpd we need the RTC powerdomain configured. Cc: Dave Gerlach Cc: Suman Anna Signed-off-by: Tony Lindgren commit 6bcc5f9989402e30347e72e22ec0bc22844c5824 Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 ARM: OMAP2+: Drop legacy platform data for am3 control module 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. To drop the legacy platform data for am3 control module, we need to configure the missing functional clock and tag the module to not idle as platform data also had it configured with HWMOD_INIT_NO_IDLE. Signed-off-by: Tony Lindgren commit b7427dc49fcc8dfa95502f8c8e009738d4906d4e Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 ARM: dts: Configure also interconnect clocks for am4 system timer We now manage clocksource and clockevent clocks directly with timer-ti-dm-systimer. In order to use genpd with prm_omap, GENPD_FLAG_PM_CLK and simple-pm-bus, we need to keep the system timer related interconnect clocks enabled until clocksource suspend is done. Signed-off-by: Tony Lindgren commit 1041b2d0ca22e3e57f9f8393c28134419c92eb5c Author: Tero Kristo Date: Mon Nov 16 12:57:13 2020 +0200 ARM: dts: am33xx: add remaining PRM instances Add remaining PRM instances for the am33xx SoC. Additionally, enable the genpd support for them. Signed-off-by: Tero Kristo [tony@atomide.com: fixed a typo for #power-domain-cells] Signed-off-by: Tony Lindgren commit 57df7e370d2ab83a64c07acd157acfed4169f114 Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 remoteproc/wkup_m3: Use reset control driver if available In order to move wkup_m3 to probe without platform data, let's add support for using optional reset control driver if configured in the dts. With this change and the related dts change, we can start dropping the platform data for am335x. And once wkup_m3 no longer needs platform data, we can simply drop the related legacy reset platform data callbacks from wkup_m3 driver later on after also am437x no longer depends on it. Cc: linux-remoteproc@vger.kernel.org Cc: Bjorn Andersson Cc: Dave Gerlach Cc: Philipp Zabel Cc: Suman Anna Signed-off-by: Tony Lindgren commit 74033131d2467fda6b76ba10bc80a75fb47e03d1 Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 soc: ti: pm33xx: Enable basic PM runtime support for genpd To prepare for moving to use genpd, let's enable basic PM runtime support. Cc: Dave Gerlach Cc: Santosh Shilimkar Cc: Suman Anna Signed-off-by: Tony Lindgren commit f29ef9807f85ba5b6afe84d9dca4743211b3507a Author: Tero Kristo Date: Mon Nov 16 12:57:13 2020 +0200 soc: ti: omap-prm: am3: add genpd support for remaining PRM instances Add genpd support for per, wkup, mpu, rtc and cefuse instances. Cc: Santosh Shilimkar Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren commit 176958dd8ea4e9adb373c929bd2590c4056cd617 Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 soc: ti: omap-prm: Add pm_clk for genpd In order to probe l3 and l4 interconnects with simple-pm-bus, we want genpd to manage the clocks for the interconnects. For interconnect target modules, we already have ti-sysc manage the clocks so let's skipe managing clocks for ti-sysc modules. Cc: Santosh Shilimkar Signed-off-by: Tony Lindgren commit 9fac08999c1010e7d1c95ed136a5e2551b82a527 Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 clk: ti: am33xx: Keep am3 l3 main clock always on for genpd In order for suspend and resume to work with genpd on am3, we must keep l3 main clock always on. Otherwise prm_omap driver will shut down the l3 main clock on suspend when simple-pm-bus and GENPD_FLAG_PM_CLK are used. Note that we already keep the l3 main clock always on with the legacy platform code. Later on we may want to start managing the l3 main clock with a dedicated interconnect driver instead of using simple-pm-bus and GENPD_FLAG_PM_CLK. Cc: linux-clk@vger.kernel.org Cc: Michael Turquette Cc: Stephen Boyd Cc: Tero Kristo Signed-off-by: Tony Lindgren commit cfeeea60af2f01c13b94d57a9bb1291e7bc181da Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 bus: ti-sysc: Implement GPMC debug quirk to drop platform data We need to enable no-reset-on-init quirk for GPMC if the config option for CONFIG_OMAP_GPMC_DEBUG is set. Otherwise the GPMC driver code is unable to show the bootloader configured timings. Signed-off-by: Tony Lindgren commit 2928135c93f873b260ba1a88023f0bbe0f67e315 Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 bus: ti-sysc: Support modules without control registers Some modules like MPU have a powerdomain and functional clock but not necessarily any control registers. Let's allow configuring interconnect target modules with no control registers. Signed-off-by: Tony Lindgren commit ae5f70f707889dfd056905d9ea69e3f72dace213 Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 ARM: OMAP2+: Probe PRCM first to probe l4_wkup with simple-pm-bus In preparation for probing the interconnects with simple-pm-bus to make use of genpd, we need to probe the always-on PRCM first for the clocks needed by l4_wkup instance. Signed-off-by: Tony Lindgren commit 9261c5b2f51996e7d4e10089f73ea472ae9e996f Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 ARM: OMAP2+: Check for inited flag If we have no hwmods configured and omap_hwmod_init() is not called, we don't want to call omap_hwmod_setup_all() as it will fail with checks for configured MPU at least. Signed-off-by: Tony Lindgren commit 4097c9a64d1009d97dcee772bd8b15381bc7507d Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 bus: ti-sysc: Assert reset only after disabling clocks The rstctrl reset must be asserted after gating the module clock as described in the TRM at least for IVA. Otherwise the rstctrl reset done with module clock enabled can hang the system. Note that this issue is has been only seen with related IVA changes that we do not currently have merged. So probably no need to apply this patch as a fix. Signed-off-by: Tony Lindgren commit 4f6a36fed71dfe51df0ae9a282dc87c76d629bff Author: Will Deacon Date: Fri Nov 13 11:38:47 2020 +0000 KVM: arm64: Remove redundant hyp vectors entry The hyp vectors entry corresponding to HYP_VECTOR_DIRECT (i.e. when neither Spectre-v2 nor Spectre-v3a are present) is unused, as we can simply dispatch straight to __kvm_hyp_vector in this case. Remove the redundant vector, and massage the logic for resolving a slot to a vectors entry. Reported-by: Marc Zyngier Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201113113847.21619-11-will@kernel.org commit cd1f56b930e857c170d8a04f0f989bfb8a1b5ac1 Author: Will Deacon Date: Fri Nov 13 11:38:46 2020 +0000 arm64: spectre: Consolidate spectre-v3a detection The spectre-v3a mitigation is split between cpu_errata.c and spectre.c, with the former handling detection of the problem and the latter handling enabling of the workaround. Move the detection logic alongside the enabling logic, like we do for the other spectre mitigations. Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Cc: Marc Zyngier Cc: Quentin Perret Link: https://lore.kernel.org/r/20201113113847.21619-10-will@kernel.org commit c4792b6dbc5070fe67f4cdcfdad39416333acbe0 Author: Will Deacon Date: Fri Nov 13 11:38:45 2020 +0000 arm64: spectre: Rename ARM64_HARDEN_EL2_VECTORS to ARM64_SPECTRE_V3A Since ARM64_HARDEN_EL2_VECTORS is really a mitigation for Spectre-v3a, rename it accordingly for consistency with the v2 and v4 mitigation. Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Cc: Marc Zyngier Cc: Quentin Perret Link: https://lore.kernel.org/r/20201113113847.21619-9-will@kernel.org commit b881cdce77b48bd488f268041f32951bab89bb0f Author: Will Deacon Date: Fri Nov 13 11:38:44 2020 +0000 KVM: arm64: Allocate hyp vectors statically The EL2 vectors installed when a guest is running point at one of the following configurations for a given CPU: - Straight at __kvm_hyp_vector - A trampoline containing an SMC sequence to mitigate Spectre-v2 and then a direct branch to __kvm_hyp_vector - A dynamically-allocated trampoline which has an indirect branch to __kvm_hyp_vector - A dynamically-allocated trampoline containing an SMC sequence to mitigate Spectre-v2 and then an indirect branch to __kvm_hyp_vector The indirect branches mean that VA randomization at EL2 isn't trivially bypassable using Spectre-v3a (where the vector base is readable by the guest). Rather than populate these vectors dynamically, configure everything statically and use an enumerated type to identify the vector "slot" corresponding to one of the configurations above. This both simplifies the code, but also makes it much easier to implement at EL2 later on. Signed-off-by: Will Deacon [maz: fixed double call to kvm_init_vector_slots() on nVHE] Signed-off-by: Marc Zyngier Cc: Marc Zyngier Cc: Quentin Perret Link: https://lore.kernel.org/r/20201113113847.21619-8-will@kernel.org commit da592e68a5a333b81111bd6336838764732f723e Author: Will Deacon Date: Fri Nov 13 11:38:43 2020 +0000 KVM: arm64: Re-jig logic when patching hardened hyp vectors The hardened hyp vectors are not used on systems running with VHE or CPUs without the ARM64_HARDEN_EL2_VECTORS capability. Re-jig the checking logic slightly in kvm_patch_vector_branch() so that it's a bit clearer what we're looking for. This is purely cosmetic. Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Cc: Marc Zyngier Cc: Quentin Perret Link: https://lore.kernel.org/r/20201113113847.21619-7-will@kernel.org commit 6279017e807708a07db5edace462713a93625da3 Author: Will Deacon Date: Fri Nov 13 11:38:42 2020 +0000 KVM: arm64: Move BP hardening helpers into spectre.h The BP hardening helpers are an integral part of the Spectre-v2 mitigation, so move them into asm/spectre.h and inline the arm64_get_bp_hardening_data() function at the same time. Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Cc: Marc Zyngier Cc: Quentin Perret Link: https://lore.kernel.org/r/20201113113847.21619-6-will@kernel.org commit 07cf8aa922db7747cd6e100d2e3f7ca839c7a419 Author: Will Deacon Date: Fri Nov 13 11:38:41 2020 +0000 KVM: arm64: Make BP hardening globals static instead Branch predictor hardening of the hyp vectors is partially driven by a couple of global variables ('__kvm_bp_vect_base' and '__kvm_harden_el2_vector_slot'). However, these are only used within a single compilation unit, so internalise them there instead. Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Cc: Marc Zyngier Cc: Quentin Perret Link: https://lore.kernel.org/r/20201113113847.21619-5-will@kernel.org commit 042c76a9502bf281befc0ae2793ef1de55b65544 Author: Will Deacon Date: Fri Nov 13 11:38:40 2020 +0000 KVM: arm64: Move kvm_get_hyp_vector() out of header file kvm_get_hyp_vector() has only one caller, so move it out of kvm_mmu.h and inline it into a new function, cpu_set_hyp_vector(), for setting the vector. Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Cc: Marc Zyngier Cc: Quentin Perret Link: https://lore.kernel.org/r/20201113113847.21619-4-will@kernel.org commit de5bcdb48498abeb019ae075d139850c52661627 Author: Will Deacon Date: Fri Nov 13 11:38:39 2020 +0000 KVM: arm64: Tidy up kvm_map_vector() The bulk of the work in kvm_map_vector() is conditional on the ARM64_HARDEN_EL2_VECTORS capability, so return early if that is not set and make the code a bit easier to read. Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Cc: Marc Zyngier Cc: Quentin Perret Link: https://lore.kernel.org/r/20201113113847.21619-3-will@kernel.org commit 8934c8454064757efd8d3fb0a729db7eb2d0e5f5 Author: Will Deacon Date: Fri Nov 13 11:38:38 2020 +0000 KVM: arm64: Remove redundant Spectre-v2 code from kvm_map_vector() '__kvm_bp_vect_base' is only used when dealing with the hardened vectors so remove the redundant assignments in kvm_map_vectors(). Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Cc: Marc Zyngier Cc: Quentin Perret Link: https://lore.kernel.org/r/20201113113847.21619-2-will@kernel.org commit 3c6e73e47afc874c231b48157be669efaf768471 Author: Bartosz Golaszewski Date: Tue Nov 10 10:39:21 2020 +0100 gpiolib: devres: shrink devm_gpiochip_add_data_with_key() If all we want to manage is a single pointer, there's no need to manually allocate and add a new devres. We can simply use devm_add_action_or_reset() and shrink the code by a good bit. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij commit 5bc5cc2819c2c0adb644919e3e790b504ea47e0a Author: Boris Brezillon Date: Thu Nov 5 16:17:04 2020 +0100 drm/panfrost: Move the GPU reset bits outside the timeout handler We've fixed many races in panfrost_job_timedout() but some remain. Instead of trying to fix it again, let's simplify the logic and move the reset bits to a separate work scheduled when one of the queue reports a timeout. v5: - Simplify panfrost_scheduler_stop() (Steven Price) - Always restart the queue in panfrost_scheduler_start() even if the status is corrupted (Steven Price) v4: - Rework the logic to prevent a race between drm_sched_start() (reset work) and drm_sched_job_timedout() (timeout work) - Drop Steven's R-b - Add dma_fence annotation to the panfrost_reset() function (Daniel Vetter) v3: - Replace the atomic_cmpxchg() by an atomic_xchg() (Robin Murphy) - Add Steven's R-b v2: - Use atomic_cmpxchg() to conditionally schedule the reset work (Steven Price) Fixes: 1a11a88cfd9a ("drm/panfrost: Fix job timeout handling") Cc: Signed-off-by: Boris Brezillon Reviewed-by: Steven Price Signed-off-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/20201105151704.2010667-1-boris.brezillon@collabora.com commit 0b74e40a4e41f3cbad76dff4c50850d47b525b26 Author: Andy Shevchenko Date: Thu Nov 12 21:03:01 2020 +0200 pinctrl: baytrail: Avoid clearing debounce value when turning it off Baytrail pin control has a common register to set up debounce timeout. When a pin configuration requested debounce to be disabled, the rest of the pins may still want to have debounce enabled and thus rely on the common timeout value. Avoid clearing debounce value when turning it off for one pin while others may still use it. Fixes: 658b476c742f ("pinctrl: baytrail: Add debounce configuration") Depends-on: 04ff5a095d66 ("pinctrl: baytrail: Rectify debounce support") Depends-on: 827e1579e1d5 ("pinctrl: baytrail: Rectify debounce support (part 2)") Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 8ae0b65ac7e5b7a93b8d6abc520351ca11d91867 Author: Geert Uytterhoeven Date: Mon Oct 26 13:26:22 2020 +0100 m68k: defconfig: Enable KUnit tests Enable KUnit and all KUnit tests for modular builds, so they are available when needed, just like non-KUnit tests. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201026122622.3092658-1-geert@linux-m68k.org commit 95526cccc4863ea93c29917faa8bf4bc4d19d199 Author: Geert Uytterhoeven Date: Mon Oct 26 13:25:49 2020 +0100 m68k: defconfig: Update defconfigs for v5.10-rc1 - Enable modular build of SM2 crypto algorithm, - Drop CONFIG_CRYPTO_SM3=m (auto-enabled by CONFIG_CRYPTO_SM2), - Drop CONFIG_TEST_BITFIELD=m (converted to KUnit in commit d2585f5164c298aa ("lib: kunit: add bitfield test conversion to KUnit")), - Enable modular build of the freeing pages test module. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201026122549.3092526-1-geert@linux-m68k.org commit 50c0133cd154090446bc19e466df57502f422644 Author: Jon Hunter Date: Wed Nov 11 10:37:08 2020 +0000 phy: tegra: Don't warn on probe deferral Deferred probe is an expected return value for devm_regulator_bulk_get(). Given that the driver deals with it properly, there's no need to output a warning that may potentially confuse users. Signed-off-by: Jon Hunter Acked-by: Thierry Reding Acked-by: JC Kuo Link: https://lore.kernel.org/r/20201111103708.152566-1-jonathanh@nvidia.com Signed-off-by: Vinod Koul commit 839034d8bd7f380b13b3493e057239f95bb8672a Author: Florian Fainelli Date: Thu Oct 22 13:50:56 2020 -0700 phy: phy-brcm-sata: Allow configuration SATA AFE TX amplitude Read the 'brcm,tx-amplitude-millivolt' property from Device Tree and propagate its value into the appropriate test transmit register to change the TX amplitude. Signed-off-by: Florian Fainelli Link: https://lore.kernel.org/r/20201022205056.233879-3-f.fainelli@gmail.com Signed-off-by: Vinod Koul commit 6d3b3f88423e4edc0fad5853c10558b42e1a91dd Author: Florian Fainelli Date: Thu Oct 22 13:50:55 2020 -0700 dt-bindings: phy: Allow defining the SATA AFE TX amplitude Document a new property which allows the selection of the SATA AFE TX amplitude in milli Volts. Possible values are 400, 500, 600 and 800mV. Acked-by: Rob Herring Signed-off-by: Florian Fainelli Link: https://lore.kernel.org/r/20201022205056.233879-2-f.fainelli@gmail.com Signed-off-by: Vinod Koul commit 13ea8e0eee4580686a9d2993ac64938cb5141526 Author: Amelie Delaunay Date: Tue Nov 10 11:23:05 2020 +0100 phy: stm32: defer probe for reset controller Change stm32-usbphyc driver to defer its probe when the expected reset control has its probe operation deferred. Signed-off-by: Etienne Carriere Signed-off-by: Amelie Delaunay Link: https://lore.kernel.org/r/20201110102305.27205-2-amelie.delaunay@st.com Signed-off-by: Vinod Koul commit f98130b34515544d3004ea64ea1dc9db77e9c65a Author: Amelie Delaunay Date: Tue Nov 10 14:05:31 2020 +0100 phy: stm32: don't print an error on probe deferral Change stm32-usbphyc driver to not print an error message when the device probe operation is deferred. Signed-off-by: Etienne Carriere Signed-off-by: Amelie Delaunay Link: https://lore.kernel.org/r/20201110130531.7610-1-amelie.delaunay@st.com Signed-off-by: Vinod Koul commit b064945517ee368bfb6343bf3fb4613d537c4bbb Author: Mauro Carvalho Chehab Date: Fri Oct 23 16:08:10 2020 +0200 media: fix kernel-doc markups Some identifiers have different names between their prototypes and the kernel-doc markup. Seome seems to be due to cut-and-paste related issues. Others need to be fixed, as kernel-doc markups should use this format: identifier - description Acked-by: Sakari Ailus # IPU3 and V4L2 Signed-off-by: Mauro Carvalho Chehab commit 0d72f489995bb8565f6fe30539d4504c88356a9e Author: Yu Kuai Date: Wed Nov 4 13:41:36 2020 +0100 media: platform: add missing put_device() call in mtk_jpeg_probe() and mtk_jpeg_remove() if mtk_jpeg_clk_init() succeed, mtk_jpeg_probe() and mtk_jpeg_remove() doesn't have a corresponding put_device(). Thus add a new helper mtk_jpeg_clk_release() to fix it. Fixes: b2f0d2724ba4 ("[media] vcodec: mediatek: Add Mediatek JPEG Decoder Driver") Signed-off-by: Yu Kuai Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f50613c1a83070a5212bbf394559ebd4b09e3f20 Author: Jernej Skrabec Date: Tue Aug 25 19:35:22 2020 +0200 media: cedrus: Add support for R40 Video engine in R40 is very similar to that in A33 but it runs on lower speed, at least according to OS images released by board designer. Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d41662e52a0321e6263278d9a9791ef4b03b5af7 Author: Jernej Skrabec Date: Tue Aug 25 19:35:21 2020 +0200 media: dt-bindings: media: allwinner,sun4i-a10-video-engine: Add R40 compatible Allwinner R40 SoC contains video engine. Add compatible for it. Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b2d3bef1aa7858b2ae5e0d01adb214121ba00b9f Author: Ezequiel Garcia Date: Wed Nov 4 18:43:11 2020 +0100 media: coda: Add a V4L2 user for control error macroblocks count To avoid potentially overflowing the kernel logs in the case of corrupted streams, this commit replaces an error message with a per-stream counter to be read through a driver-specific control. Applications can read the per-stream accumulated error macroblocks count. The old error message is replaced by a rate-limited debug message. Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8297ae5c29fc715d1da2e057852053dd900c99a6 Author: Ezequiel Garcia Date: Tue Nov 3 22:32:37 2020 +0100 media: coda: coda_buffer_meta housekeeping fix It's possible that the VPU was initialized using just one buffer, containing only codec headers. In this case, right after the initialization and after updating the FIFO read pointer, we need to iterate through all the coda_buffer_meta and release any metas that have been already used by the VPU. This issue is affecting indirectly the bitstream buffer fill threshold, which depends on the meta end position of the first queued meta, which is passed to coda_bitstream_can_fetch_past(). Without this fix, it's possible that for certain videos, the bitstream buffer level is not filled properly, resulting in a PIC_RUN timeout. Reported-by: Benjamin Bara Signed-off-by: Ezequiel Garcia Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8cb7ebe4ebd70b33a6edb30c9984febb9947a407 Author: Dafna Hirschfeld Date: Fri Oct 30 14:46:09 2020 +0100 media: staging: rkisp1: isp: set metadata pads to MEDIA_BUS_FMT_METADATA_FIXED Set the code of the metadata pads of the isp entity to MEDIA_BUS_FMT_METADATA_FIXED and set the width and height of their formats to 0. This solves the TODO item: "Fix pad format size for statistics and parameters entities." Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6ad253cc3436269fc6bcff03d704c672f368da0a Author: Dafna Hirschfeld Date: Fri Oct 30 14:46:08 2020 +0100 media: uapi: add MEDIA_BUS_FMT_METADATA_FIXED media bus format. MEDIA_BUS_FMT_METADATA_FIXED should be used when the same driver handles both sides of the link and the bus format is a fixed metadata format that is not configurable from userspace. The width and height will be set to 0 for this format. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 940727bf22f74cbdef8de327de34c4ae565c89ea Author: Zhang Qilong Date: Mon Nov 2 15:26:22 2020 +0100 media: cedrus: fix reference leak in cedrus_start_streaming pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to pm_runtime_put_noidle will result in reference leak in cedrus_start_streaming. We should fix it. Fixes: d5aecd289babf ("media: cedrus: Implement runtime PM") Signed-off-by: Zhang Qilong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4cbbe2aaa0536b0e7b3dfbd7febc3bc2ec300559 Author: Zhang Qilong Date: Mon Nov 2 15:28:52 2020 +0100 media: staging: rkisp1: cap: fix runtime PM imbalance on error pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to pm_runtime_put_noidle will result in reference imbalance in rkisp1_vb2_start_streaming, so we should fix it. Fixes: 56e3b29f9f6b2 ("media: staging: rkisp1: add streaming paths") Signed-off-by: Zhang Qilong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 652ce6769349e669e1514093a83dd913cc9b5039 Author: Liu Shixin Date: Mon Sep 21 10:24:39 2020 +0200 media: media/pci: simplify the return expression of verify_window_lock Simplify the return expression. Signed-off-by: Liu Shixin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7243f33120dd150150c5999127b3ba9fa567e1ac Author: Hsin-Yi Wang Date: Thu Sep 3 07:48:33 2020 +0200 media: mtk-vcodec: remove allocated dma_parms Commit 9495b7e92f71 ("driver core: platform: Initialize dma_parms for platform devices") included dma_parms in platform_device. There's no need to allocate again. Fixes: 13483fc2f20f ("media: mtk-vcodec: set dma max segment size") Suggested-by: Robin Murphy Signed-off-by: Hsin-Yi Wang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6651dba2bd838f34cf5a1e84229aaa579b1a94fe Author: Evgeny Novikov Date: Tue Jul 14 19:20:49 2020 +0200 media: isif: reset global state isif_probe() invokes iounmap() on error handling paths, but it does not reset the global state. So, later it can invoke iounmap() even when ioremap() fails. This is the case also for isif_remove(). The patch resets the global state after invoking iounmap() to avoid this. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Evgeny Novikov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d30ac9d81a33757467eeb8e78606c7748220fb21 Author: Sakari Ailus Date: Wed Oct 28 11:03:57 2020 +0100 media: imx258: Remove Jason Chen's e-mail Remove Jason Chen's e-mail address for it no longer works. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 68579b32e786f9680e7c6b6c7d17e26943bb02b3 Author: Hugues Fruchet Date: Tue Oct 13 11:02:23 2020 +0200 media: ov5640: fix support of BT656 bus mode Fix PCLK polarity not being taken into account. Add comments about BT656 register control. Remove useless ov5640_set_stream_bt656() function. Refine comments about MIPI IO register control. Fixes: 4039b03720f7 ("media: i2c: ov5640: Add support for BT656 mode") Signed-off-by: Hugues Fruchet Reviewed-by: Jacopo Mondi Tested-by: Lad Prabhakar Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 4b6c129e87a31289f21077090698711f3c3ea459 Author: Sakari Ailus Date: Tue Oct 13 17:01:10 2020 +0200 media: ipu3-cio2: Use v4l2_get_link_freq helper Use v4l2_get_link_freq helper and add support for sensor drivers implementing only V4L2_CID_PIXEL_RATE. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 1b888b3cebef2de3936167e95652830145040b78 Author: Sakari Ailus Date: Tue Oct 13 16:54:00 2020 +0200 media: v4l: Add a helper for obtaining the link frequency Add a helper for obtaining the link frequency from transmitter drivers. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 9d0a79e55a626165efb52bb15d714d231fc985e6 Author: Sakari Ailus Date: Tue Oct 13 16:02:27 2020 +0200 media: Documentation: v4l: Document required controls on camera sensors Raw camera sensors connected to parallel or CSI-2 busses need to implement V4L2_CID_LINK_FREQ control so receiver drivers can configure the hardware accordingly. Document this. Also say V4L2_CID_PIXEL_RATE is recommended for such hardware. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit d3ed195bc761a1c5e5f1feae519318a4f91d258c Author: Sakari Ailus Date: Tue Oct 13 15:11:37 2020 +0200 media: Documentation: v4l: Fix language Remove extra "is" from sentence explaining V4L2_CID_PIXEL_RATE may be used to tell the pixel rate used by a transmitter driver. Also call V4L2_CID_PIXEL_RATE a control. Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 98f9aafa9f411bbc4f352191340b74db0ba908a8 Author: Sakari Ailus Date: Tue Oct 13 14:12:02 2020 +0200 media: ipu3-cio2: Check receved the size against payload size, not buffer size Compare the received size of the payload size, not the allocated size of the buffer that is page aligned. This way also images that aren't aligned to page size are not warned about. Also wrap a line over 80 characters. Suggested-by: Laurent Pinchart Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Tested-by: Jean-Michel Hautbois Signed-off-by: Mauro Carvalho Chehab commit 3abafaf41ab743162cae543932d94575d483ecbb Author: Tom Rix Date: Tue Oct 6 22:38:17 2020 +0200 media: ov7670: do not aggregate returns Adding muliple status together loses individual failures. Check each status separately. Clean up some other returns for consistency. Fixed several coding style problems by running the file through checkpatch.pl --fix-inplace Signed-off-by: Tom Rix Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 734f0b0153f91b0bf79aea84593befffc85c3f98 Author: Alain Volmat Date: Wed Oct 7 18:08:25 2020 +0200 media: stm32-dcmi: add 8-bit Bayer formats support Add BA81, GBRG, GRBG, RGGB formats in the list of supported capture formats. Signed-off-by: Alain Volmat Acked-by: Hugues FRUCHET Reviewed-by: Philippe CORNU Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit ab32b2c3636b63b2a3d5ddb04627d6a3219d27d6 Author: Hugues Fruchet Date: Wed Oct 7 18:05:52 2020 +0200 media: stm32-dcmi: remove deprecated dmaengine_terminate_all() Replace dmaengine_terminate_all() by dmaengine_terminate_sync() to ensure that all pending dma operations are really finished. This is not ensured by dmaengine_terminate_all() and this API is deprecated, so better to use the _sync() variant. Signed-off-by: Hugues Fruchet Reviewed-by: Philippe CORNU Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit b9b327623b45f7e57245638d19c04392b457cab9 Author: Etienne Carriere Date: Wed Oct 7 18:02:10 2020 +0200 media: stm32-dcmi: don't print an error on probe deferral Change stm32-dcmi driver to not print an error message when the device probe operation is deferred. Signed-off-by: Etienne Carriere Acked-by: Hugues Fruchet Tested-by: Alexandre TORGUE Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 32ea5e057aad9b90504836d444355d3cd86da230 Author: Hugues Fruchet Date: Thu Oct 8 10:29:16 2020 +0200 media: ov5640: add support of 160x120 resolution Add support of 160x120 resolution. Signed-off-by: Hugues Fruchet Tested-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 61e7f892b5ee1dd10ea8bff805f3c3fe6e535959 Author: Sakari Ailus Date: Mon Oct 12 17:25:28 2020 +0200 media: ipu3-cio2: Remove traces of returned buffers If starting a video buffer queue fails, the buffers are returned to videobuf2. Remove the reference to the buffer from the driver's queue as well. Fixes: c2a6a07afe4a ("media: intel-ipu3: cio2: add new MIPI-CSI2 driver") Signed-off-by: Sakari Ailus Cc: stable@vger.kernel.org # v4.16 and up Reviewed-by: Andy Shevchenko Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit b369132f0a0b1933a5d479d3b6a9441e30553885 Author: Sakari Ailus Date: Mon Oct 12 13:52:46 2020 +0200 media: ipu3-cio2: Rename CIO2_IMAGE_MAX_LENGTH as CIO2_IMAGE_MAX_HEIGHT CIO2_IMAGE_MAX_LENGTH is the maximum height of the image. Rename it as "CIO2_IMAGE_MAX_HEIGHT" in order to better describe what it is. Suggested-by: Laurent Pinchart Signed-off-by: Sakari Ailus Reviewed-by: Andy Shevchenko Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 40f072e181550058307a2847e4a1b417b05da293 Author: Sakari Ailus Date: Mon Oct 12 11:34:30 2020 +0200 media: ipu3-cio2: Remove explicit type from frame size checks Now that the values are unsigned, we can remove the explicit cast to u32. Signed-off-by: Sakari Ailus Reviewed-by: Andy Shevchenko Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 44e6d472cef6ad2ef1954bcbca9a91505bca1bfd Author: Sakari Ailus Date: Fri Oct 9 12:02:41 2020 +0200 media: ipu3-cio2: Use unsigned values where appropriate Use unsigned values for width, height, bit shifts and registers, effectively for all definitions that are not signed. Signed-off-by: Sakari Ailus Reviewed-by: Andy Shevchenko Acked-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 219a8b9c04e54872f9a4d566633fb42f08bcbe2a Author: Sakari Ailus Date: Fri Oct 9 15:56:05 2020 +0200 media: ipu3-cio2: Make the field on subdev format V4L2_FIELD_NONE The ipu3-cio2 doesn't make use of the field and this is reflected in V4L2 buffers as well as the try format. Do this in active format, too. Fixes: c2a6a07afe4a ("media: intel-ipu3: cio2: add new MIPI-CSI2 driver") Signed-off-by: Sakari Ailus Reviewed-by: Bingbu Cao Reviewed-by: Andy Shevchenko Reviewed-by: Laurent Pinchart Cc: stable@vger.kernel.org # v4.16 and up Signed-off-by: Mauro Carvalho Chehab commit a86cf9b29e8b12811cf53c4970eefe0c1d290476 Author: Sakari Ailus Date: Thu Oct 8 21:33:26 2020 +0200 media: ipu3-cio2: Validate mbus format in setting subdev format Validate media bus code, width and height when setting the subdev format. This effectively reworks how setting subdev format is implemented in the driver. Fixes: c2a6a07afe4a ("media: intel-ipu3: cio2: add new MIPI-CSI2 driver") Signed-off-by: Sakari Ailus Reviewed-by: Andy Shevchenko Reviewed-by: Laurent Pinchart Cc: stable@vger.kernel.org # v4.16 and up Signed-off-by: Mauro Carvalho Chehab commit 55a6c6b2be3d6670bf5772364d8208bd8dc17da4 Author: Sakari Ailus Date: Thu Oct 8 21:29:38 2020 +0200 media: ipu3-cio2: Serialise access to pad format Pad format can be accessed from user space. Serialise access to it. Fixes: c2a6a07afe4a ("media: intel-ipu3: cio2: add new MIPI-CSI2 driver") Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Reviewed-by: Bingbu Cao Reviewed-by: Andy Shevchenko Cc: stable@vger.kernel.org # v4.16 and up Signed-off-by: Mauro Carvalho Chehab commit 8160e86702e0807bd36d40f82648f9f9820b9d5a Author: Sakari Ailus Date: Thu Oct 8 21:06:28 2020 +0200 media: ipu3-cio2: Return actual subdev format Return actual subdev format on ipu3-cio2 subdev pads. The earlier implementation was based on an infinite recursion that exhausted the stack. Reported-by: Tsuchiya Yuto Fixes: c2a6a07afe4a ("media: intel-ipu3: cio2: add new MIPI-CSI2 driver") Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Reviewed-by: Bingbu Cao Reviewed-by: Andy Shevchenko Cc: stable@vger.kernel.org # v4.16 and up Signed-off-by: Mauro Carvalho Chehab commit db8e94e7cf27d8bc101ef5b8ee5c1af77cd5b1c9 Author: Sakari Ailus Date: Tue Jul 5 11:41:15 2016 +0200 media: v4l: subdev: Improve link format validation debug messages The existing link format validation failure debug message in media-entity.c helped to pinpoint the point of failure but provided no additional information what's wrong. Tell the user exactly why the validation failed. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit f5c24ca7bf8c707927668dc76773616a25d0fded Author: Lad Prabhakar Date: Sat Oct 3 00:23:23 2020 +0200 media: i2c: ov772x: Add test pattern control Add support for test pattern control supported by the sensor. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit efcb7dda9b53d4569d08906eedc95aa51d2d5555 Author: Lad Prabhakar Date: Sat Oct 3 00:23:22 2020 +0200 media: i2c: ov772x: Add support for BT.656 mode Add support to read the bus-type for V4L2_MBUS_BT656 and enable BT.656 mode in the sensor if needed. For backward compatibility with older DTS where the bus-type property was not mandatory, assume V4L2_MBUS_PARALLEL as it was the only supported bus at the time. v4l2_fwnode_endpoint_alloc_parse() will not fail if 'bus-type' is not specified. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 8a10b4e3601eaefa4b7c8de9b62a0e15ccd4d99e Author: Lad Prabhakar Date: Sat Oct 3 00:23:21 2020 +0200 media: i2c: ov772x: Parse endpoint properties Parse endpoint properties using v4l2_fwnode_endpoint_alloc_parse() to determine the bus type and store it in the driver structure. Set bus_type to V4L2_MBUS_PARALLEL as it's the only supported one Signed-off-by: Lad Prabhakar Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 055e124eec851996567910def94ead0aaac8fa36 Author: Niklas Söderlund Date: Mon Sep 14 23:50:11 2020 +0200 media: rcar-csi2: Set bus type when parsing fwnode The only supported bus for the R-Car CSI-2 driver is CSI-2 DPHY, specify this before parsing the fwnode. Signed-off-by: Niklas Söderlund Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 09e73bbd3ee513bb29f327bd6d0e51bcd7b260a7 Author: Niklas Söderlund Date: Mon Sep 14 23:50:10 2020 +0200 media: rcar-csi2: Switch to using fwnode instead of OF Use the fwnode_graph_get_endpoint_by_id() interface instead of of_graph_get_endpoint_by_regs() to fetch the fwnode. This saves translating between a device_node and fwnode_handle. Signed-off-by: Niklas Söderlund Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 5b3ff3be485ec29180368e9a2d61bf6d3dfaf7e6 Author: Niklas Söderlund Date: Tue Sep 15 20:19:44 2020 +0200 media: MAINTAINERS: Add ADV7604 bindings documentation Add the YAML dt-bindings document for ADV7604. Signed-off-by: Niklas Söderlund Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 450c6b108e2876cbe391f812a52a887805e1c726 Author: Niklas Söderlund Date: Tue Sep 15 20:19:43 2020 +0200 media: dt-bindings: adv7604: Convert bindings to json-schema Convert ADV7604 video decoder documentation to json-schema. Signed-off-by: Niklas Söderlund Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 3e51ce5b1e87f4e31cbcf9971d6fd36ab1510466 Author: Niklas Söderlund Date: Tue Sep 15 20:19:42 2020 +0200 media: dt-bindings: adv7604: Fix documentation for hpd-gpios As of [1] the hpd-gpios property is optional, document it as such. 1. commit 269bd1324fbfaa52 ("[media] media: adv7604: improve usage of gpiod API") Signed-off-by: Niklas Söderlund Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 3be682fac66ca5829bb18c623c15147628a2d6f8 Author: Sakari Ailus Date: Wed Sep 30 16:34:43 2020 +0200 media: v4l2-fwnode: Say it's fine to use v4l2_fwnode_endpoint_parse Earlier it was expected that there would be more variable size endpoint properties and that most if not all drivers would need them. For that reason it was expected also that v4l2_fwnode_endpoint_parse would no longer be needed. What actually happened that not all drivers require "link-frequencies", the only variable size media endpoint property without a small upper limit. Therefore drivers that do not need that information are fine using v4l2_fwnode_endpoint_parse. So don't tell drivers to use v4l2_fwnode_endpoint_alloc_parse in all cases. Signed-off-by: Sakari Ailus Reviewed-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 20936f77347d021299301569603b317c110de712 Author: Sakari Ailus Date: Wed Sep 30 16:28:49 2020 +0200 media: v4l2-fwnode: Rework v4l2_fwnode_endpoint_parse documentation Rework the documentation of v4l2_fwnode_endpoint_parse for better readability, usefulness and correctness. Signed-off-by: Sakari Ailus Reviewed-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit c2505342ee5b9f6370ea6a90c87a44a0f3c6b5eb Author: Sakari Ailus Date: Wed Sep 30 14:28:54 2020 +0200 media: v4l2-fwnode: Don't zero parts of struct v4l2_fwnode_endpoint anymore Don't zero parts of the vep argument to v4l2_fwnode_endpoint_parse() anymore as this can no longer be done while still supporting defaults on multiple bus types. Signed-off-by: Sakari Ailus Reviewed-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit b3cc73d2bf14e7c6e0376fa9433e708349e9ddfc Author: Sakari Ailus Date: Wed Sep 30 14:08:03 2020 +0200 media: v4l2-fwnode: v4l2_fwnode_endpoint_parse caller must init vep argument Document that the caller of v4l2_fwnode_endpoint_parse() must init the fields of struct v4l2_fwnode_endpoint (vep argument) fields. It used to be that the fields were zeroed by v4l2_fwnode_endpoint_parse when bus type was set to V4L2_MBUS_UNKNOWN but with recent changes (Fixes: line below) that no longer makes sense. Fixes: bb4bba9232fc ("media: v4l2-fwnode: Make bus configuration a struct") Signed-off-by: Sakari Ailus Reviewed-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 1726b976a6aa58d0182a3094db266072acf6bb66 Author: Sakari Ailus Date: Wed Sep 30 13:49:15 2020 +0200 media: adv748x: Zero entire struct v4l2_fwnode_endpoint The v4l2_fwnode_parse_endpoint() function can make use of defaults in multiple bus types. To use this feature, all callers must zero the rest of the fields of this struct, too. All other drivers appear to do that already apart from this one. Signed-off-by: Sakari Ailus Reviewed-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit d7dc892dd46d8d5c733b39c6631a7f616cc95d94 Author: Philipp Zabel Date: Wed Sep 23 10:21:12 2020 +0200 media: dt-bindings: convert CODA VPU bindings to yaml Convert to YAML and add generic IP core compatibles "cnm,codadx6", "cnm,codahx4", "cnm,coda7541", and "cnm,coda960" in addition to the SoC specific compatibles. The new generic compatibles are already used in the SoC device trees and replace the free form comments. For example: - compatible : should be "fsl,-src" for i.MX SoCs: (a) "fsl,imx27-vpu" for CodaDx6 present in i.MX27 turns into: properties: compatible: oneOf: - items: - const: fsl,imx27-vpu - const: cnm,codadx6 This allows to properly specify the secondary JPEG unit interrupt that is only present on cnm,coda960. Also add the missing "fsl,imx6dl-vpu", "cnm,coda960" compatible. The AXI bus connection to the internal SRAM is different between i.MX6Q and i.MX6DL, which requires the driver to load a different firmware depending on the SoC. Further, specify the power-domain property for i.MX6 and change the clock order from "ahb", "per" to "per", "ahb". This order is currently used in all SoC device trees. Signed-off-by: Philipp Zabel Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit b20d9fac5bf54d5909d8538431bf53d83fbe5509 Author: Jacopo Mondi Date: Thu Sep 10 18:20:55 2020 +0200 media: dt-bindings: media: ov772x: Document endpoint props Document endpoint properties for the parallel bus type and add them to the example. Specify a few constraints: - If the bus type is BT.656 no hsync or vsync polarities can be specified. - If the bus width is 10 bits, not data-shift can be applied. Reviewed-by: Laurent Pinchart Reviewed-by: Lad Prabhakar Signed-off-by: Jacopo Mondi Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit b2d059460e5eee3b5fe8230f95e372d175aa4dc4 Author: Jacopo Mondi Date: Thu Sep 10 18:20:54 2020 +0200 media: dt-bindings: media: ov772x: Make bus-type mandatory In order to establish required properties based on the selected bus type, make the 'bus-type' property mandatory. As this change documents an endpoint property, also document the 'remote-endpoint' one now that the 'endpoint' schema has been expanded. Binary compatibility with existing DTB is kept as the driver does not enforce the property to be present, and shall fall-back to default parallel bus configuration, which was the only supported bus type, if the property is not specified. Reviewed-by: Rob Herring Reviewed-by: Laurent Pinchart Reviewed-by: Lad Prabhakar Signed-off-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 898bd5b5a4c526d8e310c398ec13b41c1b805f59 Author: Jacopo Mondi Date: Thu Sep 10 18:20:53 2020 +0200 media: dt-bindings: media: ov772x: Convert to json-schema Convert the ov772x binding document to json-schema and update the MAINTAINERS file accordingly. Reviewed-by: Lad Prabhakar Reviewed-by: Laurent Pinchart Signed-off-by: Jacopo Mondi Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 8d9b35a2da8e0f03df97196557863ce425992b10 Author: Jacopo Mondi Date: Thu Sep 10 18:20:30 2020 +0200 media: dt-bindings: media: imx214: Convert to json-schema Convert the imx214 bindings document to json-schema and update the MAINTAINERS file accordingly. Reviewed-by: Laurent Pinchart Signed-off-by: Jacopo Mondi Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 7b177d8f50d99f67b3f082d6eae30bab342a6dd7 Author: Jacopo Mondi Date: Thu Sep 10 18:19:49 2020 +0200 media: dt-bindings: media: mt9v111: Convert to json-schema Convert the mt9v111 bindings document to json-schema and update the MAINTAINERS file accordingly. Reviewed-by: Laurent Pinchart Signed-off-by: Jacopo Mondi Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit f70ad2aced307948a9a4395471f72528e32307e7 Author: Eugen Hristev Date: Tue Sep 15 11:04:42 2020 +0200 media: imx274: add support for sensor mode6, 1280x540 Add support for the mode 6 for the sensor, this mode uses 3/8 subsampling and 3 horizontal binning. Aspect ratio is changed. Split the bin_ratio variable into two parts, one for width and one for height, as the ratio is no longer preserved when doing subsampling in this mode. Signed-off-by: Eugen Hristev Reviewed-by: Luca Ceresoli Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit e599fc86717fde6741891c8b1689fe7043734348 Author: Eugen Hristev Date: Tue Sep 15 11:04:41 2020 +0200 media: imx274: remove binning enum Binning enum is unused. Remove from driver. Suggested-by: Sakari Ailus Signed-off-by: Eugen Hristev Reviewed-by: Luca Ceresoli Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit ad97bc37426c1eec1464649062352196138d5d0c Author: Sowjanya Komatineni Date: Mon Sep 21 23:39:39 2020 +0200 media: i2c: imx274: Add IMX274 power on and off sequence IMX274 has analog 2.8V supply, digital core 1.8V supply, and vddl digital io 1.2V supply which are optional based on camera module design. IMX274 also need external 24Mhz clock and is optional based on camera module design. This patch adds support for IMX274 power on and off to enable and disable these supplies and external clock. Reviewed-by: Luca Ceresoli Signed-off-by: Sowjanya Komatineni Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit f4fcf0108b42a997aace451fa1a0801e1c7de0d3 Author: Sowjanya Komatineni Date: Mon Sep 21 23:39:38 2020 +0200 media: i2c: imx274: Remove stop stream i2c writes during remove Sensor should already be in standby during remove and there is no need to configure sensor registers for stream stop. Signed-off-by: Sowjanya Komatineni Reviewed-by: Thierry Reding Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit c87bfb6240598a150efa536d2717ced2f409fe5e Author: Sowjanya Komatineni Date: Mon Sep 21 23:39:37 2020 +0200 media: i2c: imx274: Fix Y_OUT_SIZE register setting As per Sony IMX274 Y_OUT_SIZE should be the height of effective image output from the sensor which are the actual total lines sent over MIPI CSI to receiver. So, Y_OUT_SIZE should be same as crop height and this patch fixes it. Signed-off-by: Sowjanya Komatineni Reviewed-by: Thierry Reding Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 51a4756519eabb67c8bb94746462b3d4e72213ce Author: Kieran Bingham Date: Wed Sep 16 12:46:45 2020 +0200 media: v4l2-async: Fix trivial documentation typo Fix the incorrect spelling asyncrhronous as asynchronous, which is visible in the public documentation of enum v4l2_async_match_type. Fixes: ab4f5a4afc2d ("[media] v4l2-async: document the remaining stuff") Signed-off-by: Kieran Bingham Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit e0f822f8d9698e47cb6781538bc7490fba638979 Author: Sergey Senozhatsky Date: Wed Sep 30 03:13:22 2020 +0200 media: ov2740: select regmap Fix OV2740 build breakage by selecting REGMAP_I2C config: ov2740.c:1011:23: error: variable has incomplete type 'struct regmap_config' struct regmap_config regmap_config = { }; ^ ov2740.c:1011:9: note: forward declaration of 'struct regmap_config' struct regmap_config regmap_config = { }; ^ ov2740.c:1028:11: error: implicit declaration of function 'devm_regmap_init_i2c' regmap = devm_regmap_init_i2c(client, ®map_config); Signed-off-by: Sergey Senozhatsky Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 1d7b18a9ee5513fe45175ccb8a29ae08ad110fb2 Author: Bingbu Cao Date: Fri Sep 25 03:59:20 2020 +0200 media: ov2740: change the minimal exposure value to 4 The minimal valid exposure value should be 4 lines instead of 8 for ov2740 mannual exposure control. Signed-off-by: Bingbu Cao Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 1c891423d7059f65f45beff408923fe0b34d85e5 Author: Krzysztof Kozlowski Date: Mon Sep 21 18:23:42 2020 +0200 media: i2c: tvp5150: simplify getting state container The pointer to 'struct v4l2_subdev' is stored in drvdata via v4l2_i2c_subdev_init() so there is no point of a dance like: struct i2c_client *client = to_i2c_client(struct device *dev) struct v4l2_subdev *sd = i2c_get_clientdata(client); This allows to remove local variable 'client' and few pointer dereferences. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit b5783c4d1fbeb2fc2d2fc8f2844e07eb65fb2cd3 Author: Krzysztof Kozlowski Date: Mon Sep 21 18:23:41 2020 +0200 media: i2c: smiapp: simplify getting state container The pointer to 'struct v4l2_subdev' is stored in drvdata via v4l2_i2c_subdev_init() so there is no point of a dance like: struct i2c_client *client = to_i2c_client(struct device *dev) struct v4l2_subdev *sd = i2c_get_clientdata(client); This allows to remove local variable 'client' and few pointer dereferences. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 9a855b73e8ed8bb65cfc322456b6dd32143b0f69 Author: Krzysztof Kozlowski Date: Mon Sep 21 18:23:40 2020 +0200 media: i2c: ov8856: simplify getting state container The pointer to 'struct v4l2_subdev' is stored in drvdata via v4l2_i2c_subdev_init() so there is no point of a dance like: struct i2c_client *client = to_i2c_client(struct device *dev) struct v4l2_subdev *sd = i2c_get_clientdata(client); This allows to remove local variable 'client' and few pointer dereferences. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit fc7586e7c85f87f84d571260b6c4e6fcba92b445 Author: Krzysztof Kozlowski Date: Mon Sep 21 18:23:39 2020 +0200 media: i2c: ov7740: simplify getting state container The pointer to 'struct v4l2_subdev' is stored in drvdata via v4l2_i2c_subdev_init() so there is no point of a dance like: struct i2c_client *client = to_i2c_client(struct device *dev) struct v4l2_subdev *sd = i2c_get_clientdata(client); This allows to remove local variable 'client' and few pointer dereferences. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 8666b3197bcd2834d851051a5dbb232f4824622a Author: Krzysztof Kozlowski Date: Mon Sep 21 18:23:38 2020 +0200 media: i2c: ov5695: simplify getting state container The pointer to 'struct v4l2_subdev' is stored in drvdata via v4l2_i2c_subdev_init() so there is no point of a dance like: struct i2c_client *client = to_i2c_client(struct device *dev) struct v4l2_subdev *sd = i2c_get_clientdata(client); This allows to remove local variable 'client' and few pointer dereferences. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 1a74712569404be7ac5b0bef9ec5d92fb0dd3cc9 Author: Krzysztof Kozlowski Date: Mon Sep 21 18:23:37 2020 +0200 media: i2c: ov5675: simplify getting state container The pointer to 'struct v4l2_subdev' is stored in drvdata via v4l2_i2c_subdev_init() so there is no point of a dance like: struct i2c_client *client = to_i2c_client(struct device *dev) struct v4l2_subdev *sd = i2c_get_clientdata(client); This allows to remove local variable 'client' and few pointer dereferences. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit bf3965577aff6c6e88e75ac2897f06a973abea1c Author: Krzysztof Kozlowski Date: Mon Sep 21 18:23:36 2020 +0200 media: i2c: ov5670: simplify getting state container The pointer to 'struct v4l2_subdev' is stored in drvdata via v4l2_i2c_subdev_init() so there is no point of a dance like: struct i2c_client *client = to_i2c_client(struct device *dev) struct v4l2_subdev *sd = i2c_get_clientdata(client); This allows to remove local variable 'client' and few pointer dereferences. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 5fa6f1fc32ca5d3b1c7524e1ca5581602f0dab7d Author: Krzysztof Kozlowski Date: Mon Sep 21 18:23:35 2020 +0200 media: i2c: ov2740: simplify getting state container The pointer to 'struct v4l2_subdev' is stored in drvdata via v4l2_i2c_subdev_init() so there is no point of a dance like: struct i2c_client *client = to_i2c_client(struct device *dev) struct v4l2_subdev *sd = i2c_get_clientdata(client); This allows to remove local variable 'client' and few pointer dereferences. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit dab24a220e03454c79846307dee1b0f496059fe1 Author: Krzysztof Kozlowski Date: Mon Sep 21 18:23:34 2020 +0200 media: i2c: ov2685: simplify getting state container The pointer to 'struct v4l2_subdev' is stored in drvdata via v4l2_i2c_subdev_init() so there is no point of a dance like: struct i2c_client *client = to_i2c_client(struct device *dev) struct v4l2_subdev *sd = i2c_get_clientdata(client); This allows to remove local variable 'client' and few pointer dereferences. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 7519296da44f5eb15a092f7d92de6c101de2461a Author: Krzysztof Kozlowski Date: Mon Sep 21 18:23:33 2020 +0200 media: i2c: ov2680: simplify getting state container The pointer to 'struct v4l2_subdev' is stored in drvdata via v4l2_i2c_subdev_init() so there is no point of a dance like: struct i2c_client *client = to_i2c_client(struct device *dev) struct v4l2_subdev *sd = i2c_get_clientdata(client); This allows to remove local variable 'client' and few pointer dereferences. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 00dd015d176a860a30c280d9d598122797955923 Author: Krzysztof Kozlowski Date: Mon Sep 21 18:23:32 2020 +0200 media: i2c: ov13858: simplify getting state container The pointer to 'struct v4l2_subdev' is stored in drvdata via v4l2_i2c_subdev_init() so there is no point of a dance like: struct i2c_client *client = to_i2c_client(struct device *dev) struct v4l2_subdev *sd = i2c_get_clientdata(client); This allows to remove local variable 'client' and few pointer dereferences. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 34b3c34d104c70fc9bad1e34be7bfff33661ffdf Author: Krzysztof Kozlowski Date: Mon Sep 21 18:23:31 2020 +0200 media: i2c: hi556: simplify getting state container The pointer to 'struct v4l2_subdev' is stored in drvdata via v4l2_i2c_subdev_init() so there is no point of a dance like: struct i2c_client *client = to_i2c_client(struct device *dev) struct v4l2_subdev *sd = i2c_get_clientdata(client); This allows to remove local variable 'client' and few pointer dereferences. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit f6d549174f234d757405ebde1973031c6bb95177 Author: Krzysztof Kozlowski Date: Mon Sep 21 18:23:30 2020 +0200 media: i2c: et8ek8: simplify getting state container The pointer to 'struct v4l2_subdev' is stored in drvdata via v4l2_i2c_subdev_init() so there is no point of a dance like: struct i2c_client *client = to_i2c_client(struct device *dev) struct v4l2_subdev *sd = i2c_get_clientdata(client); This allows to remove local variable 'client' and few pointer dereferences. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 92172a3105d2ce32dcdc0a4b0b28d449faceb82a Author: Krzysztof Kozlowski Date: Mon Sep 21 18:23:29 2020 +0200 media: i2c: dw9768: simplify getting state container The pointer to 'struct v4l2_subdev' is stored in drvdata via v4l2_i2c_subdev_init() so there is no point of a dance like: struct i2c_client *client = to_i2c_client(struct device *dev) struct v4l2_subdev *sd = i2c_get_clientdata(client); This allows to remove local variable 'client' and few pointer dereferences. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 334abb57b271ae25a95c0436582e4e7bdb660ce1 Author: Krzysztof Kozlowski Date: Mon Sep 21 18:23:28 2020 +0200 media: i2c: ak7375: simplify getting state container The pointer to 'struct v4l2_subdev' is stored in drvdata via v4l2_i2c_subdev_init() so there is no point of a dance like: struct i2c_client *client = to_i2c_client(struct device *dev) struct v4l2_subdev *sd = i2c_get_clientdata(client); This allows to remove local variable 'client' and few pointer dereferences. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 17ed3c90dc05c1fd8ccbebaec99d59aea8288b93 Author: Krzysztof Kozlowski Date: Mon Sep 21 18:23:27 2020 +0200 media: i2c: adv7180: simplify getting state container The pointer to 'struct v4l2_subdev' is stored in drvdata via v4l2_i2c_subdev_init() so there is no point of a dance like: struct i2c_client *client = to_i2c_client(struct device *dev) struct v4l2_subdev *sd = i2c_get_clientdata(client); This allows to remove local variable 'client' and few pointer dereferences. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 22a7c931c6659804aa63ab75933939a1ed2710c5 Author: Krzysztof Kozlowski Date: Mon Sep 21 18:23:26 2020 +0200 media: i2c: adp1653: simplify getting state container The pointer to 'struct v4l2_subdev' is stored in drvdata via v4l2_i2c_subdev_init() so there is no point of a dance like: struct i2c_client *client = to_i2c_client(struct device *dev) struct v4l2_subdev *sd = i2c_get_clientdata(client); This allows to remove local variable 'client' and few pointer dereferences. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 3d5201233ad593edc92e6fb6eb3838e0158df988 Author: Krzysztof Kozlowski Date: Mon Sep 21 18:23:25 2020 +0200 media: i2c: ad5820: simplify getting state container The pointer to 'struct v4l2_subdev' is stored in drvdata via v4l2_i2c_subdev_init() so there is no point of a dance like: struct i2c_client *client = to_i2c_client(struct device *dev) struct v4l2_subdev *sd = i2c_get_clientdata(client); This allows to remove local variable 'client' and few pointer dereferences. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit bbaecc36b7e0d68d18fde9650261d4df703f110d Author: Krzysztof Kozlowski Date: Mon Sep 21 18:23:24 2020 +0200 media: i2c: imx355: silence unused acpi_device_id warning If driver is built without ACPI, the struct acpi_device_id won't be used: drivers/media/i2c/imx355.c:1836:36: warning: 'imx355_acpi_ids' defined but not used [-Wunused-const-variable=] [Sakari Ailus: Added a space before __maybe_unused] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit be0b9b6399aadc8888996ad8724c96862205a2cb Author: Krzysztof Kozlowski Date: Mon Sep 21 18:23:23 2020 +0200 media: i2c: imx355: simplify getting state container The pointer to 'struct v4l2_subdev' is stored in drvdata via v4l2_i2c_subdev_init() so there is no point of a dance like: struct i2c_client *client = to_i2c_client(struct device *dev) struct v4l2_subdev *sd = i2c_get_clientdata(client); This allows to remove local variable 'client' and few pointer dereferences. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 5347e1ed7761cf5fb62b03e488a05d90536a1bea Author: Krzysztof Kozlowski Date: Mon Sep 21 18:23:22 2020 +0200 media: i2c: imx319: silence unused acpi_device_id warning If driver is built without ACPI, the struct acpi_device_id won't be used: drivers/media/i2c/imx319.c:2536:36: warning: 'imx319_acpi_ids' defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 74290ac11b78b6eb36f0aab37bc5ef9e7a08239a Author: Krzysztof Kozlowski Date: Mon Sep 21 18:23:21 2020 +0200 media: i2c: imx319: simplify getting state container The pointer to 'struct v4l2_subdev' is stored in drvdata via v4l2_i2c_subdev_init() so there is no point of a dance like: struct i2c_client *client = to_i2c_client(struct device *dev) struct v4l2_subdev *sd = i2c_get_clientdata(client); This allows to remove local variable 'client' and few pointer dereferences. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit b50ce25de76949b3543a42f59c8386d626166765 Author: Krzysztof Kozlowski Date: Mon Sep 21 18:23:20 2020 +0200 media: i2c: imx290: simplify getting state container The pointer to 'struct v4l2_subdev' is stored in drvdata via v4l2_i2c_subdev_init() so there is no point of a dance like: struct i2c_client *client = to_i2c_client(struct device *dev) struct v4l2_subdev *sd = i2c_get_clientdata(client); This allows to remove local variable 'client' and few pointer dereferences. White at it, use 'dev' directly instead of 'imx290->dev'. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 37bb22ed9c72f56096bf8917d496922220869ed3 Author: Krzysztof Kozlowski Date: Mon Sep 21 18:23:19 2020 +0200 media: i2c: imx219: simplify getting state container The pointer to 'struct v4l2_subdev' is stored in drvdata via v4l2_i2c_subdev_init() so there is no point of a dance like: struct i2c_client *client = to_i2c_client(struct device *dev) struct v4l2_subdev *sd = i2c_get_clientdata(client); This allows to remove local variable 'client' and few pointer dereferences. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 69baf338fc16a4d55c78da8874ce3f06feb38c78 Author: Lad Prabhakar Date: Thu Sep 17 18:08:47 2020 +0200 media: v4l2-fwnode: Return -EINVAL for invalid bus-type Return -EINVAL if invalid bus-type is detected while parsing endpoints. Fixes: 26c1126c9b56 ("media: v4l: fwnode: Use media bus type for bus parser selection") Signed-off-by: Lad Prabhakar Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 57a975565c970d6dd84bc73712857decb5cae8eb Author: Colin Ian King Date: Tue Oct 20 16:46:55 2020 +0200 media: staging: rkisp1: rsz: make const array static, makes object smaller Don't populate the const array dev_names on the stack but instead it static. Makes the object code smaller by 15 bytes. Before: text data bss dec hex filename 17091 2648 64 19803 4d5b media/rkisp1/rkisp1-resizer.o After: text data bss dec hex filename 17012 2712 64 19788 4d4c media/rkisp1/rkisp1-resizer.o (gcc version 10.2.0) Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1342f51ec248324bec6149721e2aac1e4770c794 Author: Robert Foss Date: Mon Oct 19 20:56:20 2020 +0200 media: MAINTAINERS: camss: Add Robert Foss as co-maintainer I would like to contribute some of my time to co-maintain the CAMSS driver. I'm currently working to extend CAMSS to new hardware platforms. Signed-off-by: Robert Foss Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7fd85371e53c745d8e896dc89d7d37885fb6f47b Author: Tom Rix Date: Mon Oct 19 18:29:17 2020 +0200 media: remove unneeded break A break is not needed if it is preceded by a return Signed-off-by: Tom Rix Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b14e7b66b08d604689e14dcd5b82855b46201699 Author: Deepak R Varma Date: Fri Oct 16 19:46:06 2020 +0200 media: staging: media: imx: remove unnecessary variable use Use of variable vc_num is unnecessary here as it is used only once. Instead, the value can directly be used in place of the variable. Signed-off-by: Deepak R Varma Acked-by: Steve Longerbeam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c7b2c0ccd064a9866b08935e48aa132fdcf2d48f Author: Deepak R Varma Date: Fri Oct 16 19:40:33 2020 +0200 media: staging: media: imx: remove commented code The virtual channel is always treated as 0 once the stream enters CSI's. Commented code in the "#if 0" can be safely removed as it will not serve any purpose in future. Issue reported by checkpatch script. Signed-off-by: Deepak R Varma Acked-by: Steve Longerbeam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit bea2b6a4e14102fbc03eae0393eed9814521289f Author: Niklas Söderlund Date: Fri Oct 16 01:14:08 2020 +0200 media: rcar-vin: Add support for suspend and resume Add support for suspend and resume by stopping and starting the video pipeline while still retaining all buffers given to the driver by user-space and internally allocated ones, this gives the application a seamless experience. Buffers are never returned to user-space unprocessed so user-space don't notice when suspending. When resuming the driver restarts the capture session using the internal scratch buffer, this happens before user-space is unfrozen, this leads to speedy response times once the application resumes its execution. As the entire pipeline is stopped on suspend all subdevices in use are also stopped, and if they enter a shutdown state when not streaming (such as the R-Car CSI-2 driver) they too will be suspended and resumed in sync with the VIN driver. To be able to do keep track of which VINs should be resumed a new internal state SUSPENDED is added to recode this. Signed-off-by: Niklas Söderlund Reviewed-by: Jacopo Mondi Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 63a71dd813e207b3df6adf45757e864aa7f3364e Author: Niklas Söderlund Date: Fri Oct 16 01:14:07 2020 +0200 media: rcar-vin: Break out hardware start and stop to new methods To support suspend and resume the ability to start and stop the hardware needs to be available internally in the driver. Currently this code is in the start and stop callbacks of the vb2_ops struct. In these callbacks the code is intertwined with buffer allocation and freeing. Prepare for suspend and resume support by breaking out the hardware start/stop code into new methods. Signed-off-by: Niklas Söderlund Reviewed-by: Jacopo Mondi Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 43e36a222a33bf9a0ea33f2e3eb1d7881f965ff8 Author: Niklas Söderlund Date: Fri Oct 16 01:14:06 2020 +0200 media: rcar-vin: Cache the CSI-2 channel selection value In preparation of suspend/resume support cache the chsel value when written to the register so it can be restored on resume if needed. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b83a18cca8924a11eb3317354de30a5a4220aec9 Author: Niklas Söderlund Date: Fri Oct 16 01:14:05 2020 +0200 media: rcar-vin: Remove handling of user-space buffers when stopping When returning buffers to user-space it's no longer needed to examine the buffers given to hardware as recent changes guarantees the only buffer present in the hardware registers when the driver is not in the running state is the scratch buffer. Remove the special case and rename the function to better describe it now only deals with buffers queued to the driver but not yet recorded in the hardware registers. Signed-off-by: Niklas Söderlund Reviewed-by: Jacopo Mondi Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 90ed57851eef0d60320cf2c24536de9ab3183e0f Author: Niklas Söderlund Date: Fri Oct 16 01:14:04 2020 +0200 media: rcar-vin: Use scratch buffer when not in running state In its early stages the VIN driver did not use an internal scratch buffer. This leads to a unnecessary complex start and stop behavior, specially for TB/BT. The driver now always allocates a scratch buffer to deal with buffer under-runs, use the scratch buffer to also simplify starting and stopping. When capture is starting use the scratch buffer instead of a user-space buffers while syncing the driver with the hardware state. This allows the driver to know that no user-space buffer is given to the hardware before the running state is reached. When capture is stopping use the scratch buffer instead of leaving the user-space buffers in place and add a check that all user-space buffers are processed by the hardware before transitioning from the stopping to stopped state. This allows the driver to know all user-space buffers given to the hardware are fully processed. This change in itself does not improve the driver much but it paves the way for future simplifications and enhancements. One direct improvement of this change is that TB/BT buffers returned to user-space while stopping will always contain both fields, that was not guaranteed before. Signed-off-by: Niklas Söderlund Reviewed-by: Jacopo Mondi Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8b77d1f99e6403a457c2482a88539726276ec01a Author: Thomas Gleixner Date: Wed Oct 14 17:38:04 2020 +0200 media: cx231xx: Consolidate dmesg output The memory allocations in cx231xx_init_*() happen all in task context with GFP_KERNEL. Therefore a dev_err() trying to deduce whether this is called from task or interrupt context is pretty useless. Remove these historical leftovers. Signed-off-by: Thomas Gleixner Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 994388f228c66e7c8f7f4dd5e4c9d61d548b316c Author: Thomas Gleixner Date: Tue Oct 13 16:26:19 2020 +0200 media: au0828: Consolidate dmesg output The memory allocations in au0828_init_isoc() happen all in task context with GFP_KERNEL. Therefore a printk() trying to deduce whether this is called from task or interrupt context is pretty useless. Convert it to au0828_isocdbg() as the other one in that function and for completeness sake add one for the URB allocation as well. Signed-off-by: Thomas Gleixner Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9bb83e8fe252f15ad30430e80eb7f9da66cacbb9 Author: Thomas Gleixner Date: Tue Oct 13 16:26:17 2020 +0200 media: Bulk remove BUG_ON(in_interrupt()) None of these BUG_ON()'s is justified. BUG_ON() should only be used when there is really no way to survive. If at all these could be replaced by lockdep_assert_preemption_enabled() to cover all invalid caller context and not just those covered by in_interrupt(). But all functions which are invoked from those places contain already debug mechanisms to catch wrong context, so having these extra checks is not having any advantage. Signed-off-by: Thomas Gleixner Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d940d2f46bfec6e206609cf44c6bd612a81d117e Author: Yu Kuai Date: Fri Oct 9 14:38:04 2020 +0200 media: mtk-vcodec: add missing put_device() call in mtk_vcodec_release_enc_pm() mtk_vcodec_release_enc_pm() will be called in two places: a. mtk_vcodec_init_enc_pm() succeed while mtk_vcodec_probe() return error. b. mtk_vcodec_enc_remove(). In both cases put_device() call is needed, since of_find_device_by_node() was called in mtk_vcodec_init_enc_pm() previously. Thus add put_devices() call in mtk_vcodec_release_enc_pm() Signed-off-by: Yu Kuai Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4affafd7bec7c65da31777f18bd20420f1aeb5f8 Author: Yu Kuai Date: Fri Oct 9 14:38:03 2020 +0200 media: mtk-vcodec: add missing put_device() call in mtk_vcodec_init_enc_pm() if of_find_device_by_node() succeed, mtk_vcodec_init_enc_pm() doesn't have a corresponding put_device(). Thus add jump target to fix the exception handling for this function implementation. Fixes: 4e855a6efa54 ("[media] vcodec: mediatek: Add Mediatek V4L2 Video Encoder Driver") Signed-off-by: Yu Kuai Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 27c3943683f74e35e1d390ceb2e3639eff616ad6 Author: Yu Kuai Date: Fri Oct 9 14:38:02 2020 +0200 media: mtk-vcodec: add missing put_device() call in mtk_vcodec_release_dec_pm() mtk_vcodec_release_dec_pm() will be called in two places: a. mtk_vcodec_init_dec_pm() succeed while mtk_vcodec_probe() return error. b. mtk_vcodec_dec_remove(). In both cases put_device() call is needed, since of_find_device_by_node() was called in mtk_vcodec_init_dec_pm() previously. Thus add put_devices() call in mtk_vcodec_release_dec_pm() Fixes: 590577a4e525 ("[media] vcodec: mediatek: Add Mediatek V4L2 Video Decoder Driver") Signed-off-by: Yu Kuai Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5d4fa2c50125c9cda9e380d89268757cc5fa743d Author: Yu Kuai Date: Fri Oct 9 14:38:01 2020 +0200 media: mtk-vcodec: add missing put_device() call in mtk_vcodec_init_dec_pm() if of_find_device_by_node() succeed, mtk_vcodec_init_dec_pm() doesn't have a corresponding put_device(). Thus add jump target to fix the exception handling for this function implementation. Fixes: 590577a4e525 ("[media] vcodec: mediatek: Add Mediatek V4L2 Video Decoder Driver") Signed-off-by: Yu Kuai Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f28a81a3b64270da3588174feff4628c36e0ff4e Author: Yu Kuai Date: Fri Oct 9 14:37:58 2020 +0200 media: platform: add missing put_device() call in mtk_jpeg_clk_init() if of_find_device_by_node() succeeds, mtk_jpeg_clk_init() doesn't have a corresponding put_device(). Thus add put_device() to fix the exception handling for this function implementation. Fixes: 648372a87cee ("media: platform: Change the call functions of getting/enable/disable the jpeg's clock") Signed-off-by: Yu Kuai Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e91c255733d9bbb4978a372f44fb5ed689ccdbd1 Author: Hans Verkuil Date: Fri Oct 9 11:16:16 2020 +0200 media: cec-core: first mark device unregistered, then wake up fhs If a CEC device node is unregistered, then it should be marked as unregistered before waking up any filehandles that are waiting for an event. This ensures that there is no race condition where an application can call CEC_DQEVENT and have the ioctl return 0 instead of ENODEV. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 01c7a8167d497469f4da392c3c009ebf3169bf43 Author: Lukas Bulwahn Date: Fri Oct 9 06:16:21 2020 +0200 media: MAINTAINERS: rectify ZR36067 VIDEO FOR LINUX DRIVER section Commit 754f0f1ba8d9 ("media: MAINTAINERS: change maintainer of the zoran driver") added a new section in MAINTAINERS with an invalid file entry and at the wrong place for alphabetic ordering. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains: warning: no file matches F: Documentation/media/v4l-drivers/zoran.rst Point the file entry to the right location and move the section to the right place in MAINTAINERS. Signed-off-by: Lukas Bulwahn Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 41cbf0aecbf888376f4f5dc8b13af48b6a3795fa Author: Gustavo A. R. Silva Date: Fri Oct 9 00:55:53 2020 +0200 media: pxa_camera: Use fallthrough pseudo-keyword In order to enable -Wimplicit-fallthrough for Clang[1], replace the existing /* fall through */ comments with the new pseudo-keyword macro fallthrough[2]. [1] https://git.kernel.org/linus/e2079e93f562c7f7a030eb7642017ee5eabaaa10 [2] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a08ad6339e0441ca12533969ed94a87e3655426e Author: Colin Ian King Date: Thu Oct 8 23:12:23 2020 +0200 media: tm6000: Fix sizeof() mismatches The are two instances of sizeof() being used incorrectly. The sizeof(void *) is incorrect because urb_buffer is a char ** pointer, fix this by using sizeof(*dev->urb_buffer). The sizeof(dma_addr_t *) is incorrect, it should be sizeof(*dev->urb_dma), which is a dma_addr_t and not a dma_addr_t *. This errors did not cause any issues because it just so happens the sizes are the same. Addresses-Coverity: ("Sizeof not portable (SIZEOF_MISMATCH)") Fixes: 16427faf2867 ("[media] tm6000: Add parameter to keep urb bufs allocated") Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e5c0cd26d54e2e52792de2be3c32c9627168a06e Author: Hans Verkuil Date: Thu Oct 8 17:22:49 2020 +0200 media: cec-core.rst/cec-ioc-g-mode.rst: fix typos in monitor-all description cec-core.rst was missing 'are', and cec-ioc-g-mode.rst was missing a comma. In both cases this made the description of the Monitor All functionality hard to read. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit aef47f6c585a807a68803f46cd5c01d67e2ba2b7 Author: Ezequiel Garcia Date: Wed Oct 7 12:35:42 2020 +0200 media: coda: Clarify interrupt registered name Make interrupt naming more consistent by using a common pattern for video and jpeg interrupts. With this commit, interrupts are shown as: 29: 0 0 GPC 12 Level coda-video 30: 0 0 GPC 3 Level coda-jpeg Signed-off-by: Ezequiel Garcia Acked-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a22955e81a11d695c6d20486826abf09f5295e93 Author: Ezequiel Garcia Date: Wed Oct 7 12:35:41 2020 +0200 media: coda: Clarify device registered log Instead of printing just the device type, let's use the device name, which makes the message more useful. With this commit, the messages shown when the driver is registered are: coda 2040000.vpu: Firmware code revision: 570363 coda 2040000.vpu: Initialized CODA960. coda 2040000.vpu: Firmware version: 3.1.1 coda 2040000.vpu: coda-jpeg-encoder registered as video0 coda 2040000.vpu: coda-jpeg-decoder registered as video1 coda 2040000.vpu: coda-video-encoder registered as video2 coda 2040000.vpu: coda-video-decoder registered as video3 Signed-off-by: Ezequiel Garcia Acked-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ba928bbd0782d152170ff04f0a1091c0055213bc Author: Ezequiel Garcia Date: Wed Oct 7 12:35:40 2020 +0200 media: coda: Simplify H.264 small buffer padding logic The H.264 small buffer padding is done under the (ctx->qsequence == 0 && payload < 512) condition. Given this is the exact same condition immediately above, we can move it right there, making the code slightly clearer. This change shouldn't affect functionality as it's just cosmetics. Signed-off-by: Ezequiel Garcia Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f23e5f407ffa400a9958a6ef8c8db7c63b99f28e Author: Ezequiel Garcia Date: Wed Oct 7 12:35:39 2020 +0200 media: coda: Remove redundant ctx->initialized setting The ctx->initialized flag is set in __coda_decoder_seq_init, so it's redundant to set it in coda_dec_seq_init_work. Remove the redundant set, which allows to simplify the implementation quite a bit. This change shouldn't affect functionality as it's just cosmetics. Signed-off-by: Ezequiel Garcia Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit af0321a5be3e5647441eb6b79355beaa592df97a Author: Evgeny Novikov Date: Tue Oct 6 19:21:22 2020 +0200 media: zr364xx: propagate errors from zr364xx_start_readpipe() zr364xx_start_readpipe() can fail but callers do not care about that. This can result in various negative consequences. The patch adds missed error handling. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Evgeny Novikov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1671d4ea7794495ad52599932f8821e81530dace Author: Liu Shixin Date: Wed Sep 16 04:50:24 2020 +0200 media: saa7164: convert to use DEFINE_SEQ_ATTRIBUTE macro Use DEFINE_SEQ_ATTRIBUTE macro to simplify the code. Signed-off-by: Liu Shixin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 121ca877c1e870a6580a3bcb53de79e1a678f5f8 Author: YueHaibing Date: Wed Sep 9 16:24:07 2020 +0200 media: rkvdec: 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 Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 099d801bcd1e493b4de71e488c94e2dd0451eaa4 Author: Helen Koike Date: Tue Oct 20 21:38:46 2020 +0200 media: staging: rkisp1: remove unecessary clocks aclk_isp_wrap is a child of aclk_isp, and hclk_isp_wrap is a child of hclk_isp, thus we can remove parents from the list. Also, for the isp0, we only need the ISP clock, ACLK and HCLK. In the future we'll need a pixel clock for RK3288 and RK3399, and a JPEG clock for RK3288. So with the goal to cleanup the dt-bindings and remove it from staging, simplify clock names to isp, aclk and hclk. Assigned clocks are meant to refer to the full path in the clock tree, i.e. the leaf in the tree. For instance, in RK3399, the clock responsible for ACLK (ISP AXI CLOCK) is aclk_isp0_wrapper. For reference, this is the isp clock topology on RK3399: xin24m pll_npll npll clk_isp1 clk_isp0 pll_cpll cpll aclk_isp1 aclk_isp1_noc hclk_isp1 aclk_isp1_wrapper hclk_isp1_noc aclk_isp0 hclk_isp1_wrapper aclk_isp0_wrapper aclk_isp0_noc hclk_isp0 hclk_isp0_wrapper hclk_isp0_noc pclkin_isp1_wrapper Signed-off-by: Helen Koike Reviewed-by: Tomasz Figa Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4b69709aa0a26972e56d497bc16e9b2e424b3a01 Author: Helen Koike Date: Tue Oct 20 21:38:45 2020 +0200 media: staging: dt-bindings: rkisp1: drop parent unit address Fix the following error found with make ARCH=arm64 dt_binding_check: Documentation/devicetree/bindings/media/rockchip-isp1.example.dts:24.27-101.11: Warning (unit_address_vs_reg): /example-0/parent@0: node has a unit name, but no reg or ranges property Reported-by: Johan Jonker Signed-off-by: Helen Koike Acked-by: Rob Herring Reviewed-by: Tomasz Figa Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a493baf1c44ab3428518b1567f85d65faec1fe16 Author: Helen Koike Date: Tue Oct 20 21:38:44 2020 +0200 media: staging: dt-bindings: rkisp1: re-order properties Organize properties order in dt-bindings to move it out of staging. On top: compatible, reg and interrupts. Then alphabetical order, then properties starting with '#'. Signed-off-by: Helen Koike Acked-by: Rob Herring Reviewed-by: Tomasz Figa Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d55575f8f757f62174a3ab5dc55df699cb7a752b Author: Helen Koike Date: Tue Oct 20 21:38:43 2020 +0200 media: staging: dt-bindings: rkisp1: drop i2c unit address Add missing required items in Rockchip ISP1 dt-bindings example for a complete i2c node. Drop unit address to Fix error: /example-0/parent/i2c@ff160000: node has a unit name, but no reg or ranges property Remove unecessary fields for the example. Signed-off-by: Helen Koike Acked-by: Rob Herring Reviewed-by: Tomasz Figa Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 185ca93444b31b2e9a39ffd2332b63172f191e2b Author: Helen Koike Date: Tue Oct 20 21:38:42 2020 +0200 media: staging: dt-bindings: rkisp1: add missing required nodes Add missing required nodes in json-schema yaml file for Rockchip ISP1 dt-bindings. Signed-off-by: Helen Koike Acked-by: Rob Herring Reviewed-by: Tomasz Figa Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d51b5d9a277b8555346829d3783ab73d8ad90ada Author: Helen Koike Date: Mon Oct 19 18:04:34 2020 +0200 media: staging: rkisp1: cap: refactor enable/disable stream to allow multistreaming Allow streaming from self picture path and main picture path at the same time. Take care for s_stream() callbacks to not be called twice. When starting a stream, s_stream(true) shouldn't be called for the isp and the sensor if the other stream is already enabled (since it was already called). When stopping a stream, s_stream(false) shouldn't be called for isp and the sensor if the other stream is still enabled. Remove the callback function scheme for navigating through the topology, simplifying the code, improving readability. Remove multistreaming item from the TODO list. Signed-off-by: Helen Koike Reviewed-by: Dafna Hirschfeld Signed-off-by: Mauro Carvalho Chehab commit f4aefc581af4286ff3bfaea44084c5e5d9aa57c8 Author: Dafna Hirschfeld Date: Mon Oct 26 17:28:48 2020 +0100 media: staging: rkisp1: capture: set default quantization on 'set_fmt' On 's/try_fmt' ioctl, set the quantization field to V4L2_QUANTIZATION_DEFAULT. This fixes the compliance errors: fail: v4l2-test-formats.cpp(357): quantization >= 0xff fail: v4l2-test-formats.cpp(473): testColorspace(!node->is_io_mc, pix_mp.pixelformat, pix_mp.colorspace, pix_mp.ycbcr_enc, pix_mp.quantization) test VIDIOC_TRY_FMT: FAIL fail: v4l2-test-formats.cpp(357): quantization >= 0xff fail: v4l2-test-formats.cpp(473): testColorspace(!node->is_io_mc, pix_mp.pixelformat, pix_mp.colorspace, pix_mp.ycbcr_enc, pix_mp.quantization) test VIDIOC_S_FMT: FAIL Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d6a032ab1cf92dab67486c0f4a55375aa2799729 Author: Dafna Hirschfeld Date: Tue Oct 20 15:25:14 2020 +0200 media: staging: rkisp1: uapi: add "WITH Linux-syscall-note" Add "WITH Linux-syscall-note" to the uapi header SPDX comment. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit db1733ce23bd375d760466cec7e159a491ed2153 Author: Dafna Hirschfeld Date: Mon Oct 19 22:59:55 2020 +0200 media: staging: rkisp1: params: remove unnecessary parentheses There are several 'if' expression where double parentheses is used when one is enough. Remove the extra parentheses. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cdda99d70d73d08ef7a9bcac0a5a347fba8442b0 Author: Dafna Hirschfeld Date: Mon Oct 19 22:59:54 2020 +0200 media: staging: rkisp1: params: remove unnecessary "!!" There are several 'if' conditions of the form: if (!!(module_ens & SOME_FLAG)) Those can be replaced with: if (module_ens & SOME_FLAG) Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3fcd2d42a071f858a9e6050db4f87c13eeded953 Author: Dafna Hirschfeld Date: Fri Oct 2 20:42:20 2020 +0200 media: staging: rkisp1: remove the 'is_streaming' field from stats and params The params and stats entities have a field 'is_streaming'. This field is not needed since the entities can have available buffers only if they stream and therefore it is enough to check if there are buffers available. As a result, their start_stream callbacks can be removed since they only set the 'is_streaming' field. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 60fcc5beb80cbdaeb0ced74428d9a2c731e6c57c Author: Dafna Hirschfeld Date: Fri Oct 2 20:42:19 2020 +0200 media: staging: rkisp1: initialize buffer lists only on probe The buffer lists of stats and params entities are initialized in queue_setup callback with 'INIT_LIST_HEAD'. It is enough to initialize the lists only upon registration. For the stats entity the list is already initialize upon registration. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit dd48134061bb0ae2c53f40d78f7672055be06b53 Author: Dafna Hirschfeld Date: Fri Oct 2 20:42:18 2020 +0200 media: staging: rkisp1: params: in stop_streaming, use list_splice_init to move the buffers Currently the code uses 'list_cut_position' to move the buffers to a temporary list. Replace it with 'list_splice_init'. This is nicer since we don't need to access params.prev. Also, replace INIT_LIST_HEAD with the simpler LIST_HEAD. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 35d1a7bbe45626a9bada329c42353e402030bc83 Author: Dafna Hirschfeld Date: Fri Oct 2 20:42:17 2020 +0200 media: staging: rkisp1: validate links before powering and streaming In function rkisp1_vb2_start_streaming, the call to media_pipeline_start should be the first thing in order to validate the links and prevents their state from being modified before power up and streaming. Adjust stop streaming to the same logic, call media_pipeline_stop after we disable streaming on the entities in the topology. Signed-off-by: Helen Koike Signed-off-by: Dafna Hirschfeld Reviewed-by: Tomasz Figa Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6e8c09bb8d60a0b905295e9e2c999b39953c5bf3 Author: Hans Verkuil Date: Fri Oct 2 16:48:03 2020 +0200 media: vivid: fix (partially) timing issues The vivid driver is a bit flaky w.r.t. the kthread timing, esp. when running inside a virtual machine. This is caused by calling schedule_timeout_uninterruptible(1) which can actually take more than one jiffie. A while loop with schedule() turns out to be a lot more precise. Also, if mutex_trylock() fails, then just call schedule() instead of schedule_timeout_uninterruptible(1). There is no need to wait until the next jiffer, just schedule(), then try to get the lock again. This is still not precise enough, it is still relatively easy to get missed frames. This really should be converted to use a proper timer, but for now this solves the worst problems. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5e3a81d42e1d50ec66d47186da25d833750ba4e3 Author: Colin Ian King Date: Fri Oct 2 12:16:20 2020 +0200 media: zoran: fix spelling mistake and make error message more meaningful There is a spelling mistake in a pci_err error message. Fix this and make the error message a little more meaningful. Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e7531d5625ed1ec50299059949d5782d9459b8e5 Author: Hans Verkuil Date: Thu Oct 1 12:13:42 2020 +0200 media: Fix V4L2_COLORSPACE_470_SYSTEM_BG description The description of the V4L2_COLORSPACE_470_SYSTEM_BG stated that it was superseded by SMPTE 170M. That is incorrect. The probably root cause of this is that the HDMI standard does not support this colorspace and, unless otherwise signaled, will fall back to SMPTE 170M for SDTV. However, EBU Tech. 3321 states that sources should signal Rec. 709 as the colorimetry when using HDMI since the difference between Rec. 709 and Tech. 3213 are negligible. Update the text accordingly. Also drop a spurious " at the end of the Tech 3213 title in the bibliography. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 020c7b6d3cd45ef0e464961b12632a1419eaf098 Author: Ezequiel Garcia Date: Mon Sep 28 22:14:33 2020 +0200 media: uapi: h264: Add documentation to the interface header In preparation for making the interface public, document all the structures. Special care is taken to annotate those fields that depart from the H264 syntax. This commit only adds documentation and doesn't affect functionality in any way. Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit adbf7c06330ec0c01cef324c384b24c88254ae65 Author: Dafna Hirschfeld Date: Mon Sep 28 17:28:09 2020 +0200 media: staging: rkisp1: remove TODO item to document quantization handling The quantization handling is already documented in the file rkisp1.rst so this item can be removed. Fixes: 6616726907418 (media: staging: rkisp1: allow quantization setting by userspace on the isp source pad) Signed-off-by: Dafna Hirschfeld Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit acc4de3d7f4710764f20e32633bc5fe0334f0cd9 Author: Niklas Söderlund Date: Sun Sep 13 14:17:56 2020 +0200 media: rcar-vin: Remove redundant compatible values The mandatory compatible value 'renesas,rcar-gen2-vin' was added to all Gen2 DTS files in 2017, remove the redundant device specific values from the driver. Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 336934dbecd88ba218de07b054a24c1ac0285ee4 Author: YueHaibing Date: Fri Sep 11 13:27:07 2020 +0200 media: marvell-ccic: Fix -Wunused-function warnings If CONFIG_PM is n, gcc warns: drivers/media/platform/marvell-ccic/mmp-driver.c:324:12: warning: ‘mmpcam_runtime_suspend’ defined but not used [-Wunused-function] static int mmpcam_runtime_suspend(struct device *dev) ^~~~~~~~~~~~~~~~~~~~~~ drivers/media/platform/marvell-ccic/mmp-driver.c:310:12: warning: ‘mmpcam_runtime_resume’ defined but not used [-Wunused-function] static int mmpcam_runtime_resume(struct device *dev) ^~~~~~~~~~~~~~~~~~~~~ Mark them as __maybe_unused to fix this. Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8b88e2cddb9d24305b5e62730e65c54616abec94 Author: Julia Lawall Date: Tue Sep 29 15:14:43 2020 +0200 media: bttv: use semicolons rather than commas to separate statements Replace commas with semicolons. Commas introduce unnecessary variability in the code structure and are hard to see. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit abeb97ec2ea2aaed37d242a4ea93d76fa8cc4b13 Author: Julia Lawall Date: Tue Sep 29 15:14:42 2020 +0200 media: exynos4-is: use semicolons rather than commas to separate statements Replace commas with semicolons. Commas introduce unnecessary variability in the code structure and are hard to see. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 107b2c9caf6d709f29fc29aa1170a39a11e0a1c7 Author: Julia Lawall Date: Tue Sep 29 15:14:41 2020 +0200 media: rtl2832: use semicolons rather than commas to separate statements Replace commas with semicolons. Commas introduce unnecessary variability in the code structure and are hard to see. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7214f42cfcd64b4abc690e5b98cb5a151185e39f Author: Julia Lawall Date: Tue Sep 29 15:14:40 2020 +0200 media: dib0700: use semicolons rather than commas to separate statements Replace commas with semicolons. Commas introduce unnecessary variability in the code structure and are hard to see. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e095406a4010ff648ea6e0316f02de370163225b Author: Julia Lawall Date: Tue Sep 29 15:14:39 2020 +0200 media: dvbsky: use semicolons rather than commas to separate statements Replace commas with semicolons. Commas introduce unnecessary variability in the code structure and are hard to see. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c2cf441779b24cc45179cded868a8175c0397479 Author: Julia Lawall Date: Tue Sep 29 15:14:38 2020 +0200 media: au0828: use semicolons rather than commas to separate statements Replace commas with semicolons. Commas introduce unnecessary variability in the code structure and are hard to see. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ef0d21e492ced54743c7548d3f377130771cfcd5 Author: Julia Lawall Date: Tue Sep 29 15:14:37 2020 +0200 media: mt2060: use semicolons rather than commas to separate statements Replace commas with semicolons. Commas introduce unnecessary variability in the code structure and are hard to see. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0fcd8d890f625253663b477a37406c5ae8576f9d Author: Julia Lawall Date: Tue Sep 29 15:14:36 2020 +0200 media: radio-sf16fmr2: use semicolons rather than commas to separate statements Replace commas with semicolons. Commas introduce unnecessary variability in the code structure and are hard to see. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 130e820d20dfb58bf2c929397589c6128533e48b Author: Julia Lawall Date: Tue Sep 29 15:14:35 2020 +0200 media: msp3400: use semicolons rather than commas to separate statements Replace commas with semicolons. Commas introduce unnecessary variability in the code structure and are hard to see. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit fa71ae71ebaa91af45b78033ddd22fa214b8a4a1 Author: Julia Lawall Date: Tue Sep 29 15:14:34 2020 +0200 media: ts2020: use semicolons rather than commas to separate statements Replace commas with semicolons. Commas introduce unnecessary variability in the code structure and are hard to see. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e4b0e7d618984eb924ea31c7b009c297a79b7f32 Author: Julia Lawall Date: Tue Sep 29 15:14:32 2020 +0200 media: pvrusb2: use semicolons rather than commas to separate statements Replace commas with semicolons. Commas introduce unnecessary variability in the code structure and are hard to see. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 835fd614cbb535af5c7f6a05886fdbf422256c2a Author: Julia Lawall Date: Tue Sep 29 15:14:31 2020 +0200 media: sun4i-csi: use semicolons rather than commas to separate statements Replace commas with semicolons. Commas introduce unnecessary variability in the code structure and are hard to see. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f5071fd5360444ad52b70078203a42eb73427ebe Author: Julia Lawall Date: Tue Sep 29 15:14:30 2020 +0200 media: s3c-camif: use semicolons rather than commas to separate statements Replace commas with semicolons. Commas introduce unnecessary variability in the code structure and are hard to see. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c87dbeb8b195ff85c4b50e699249ff7ef61b797e Author: Julia Lawall Date: Tue Sep 29 15:14:29 2020 +0200 media: gspca: ov534-ov772x: use semicolons rather than commas to separate statements Replace commas with semicolons. Commas introduce unnecessary variability in the code structure and are hard to see. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3a3c72d69b0dacea3f106449b287eb1552a6a7ac Author: Julia Lawall Date: Tue Sep 29 15:14:28 2020 +0200 media: m88ds3103: use semicolons rather than commas to separate statements Replace commas with semicolons. Commas introduce unnecessary variability in the code structure and are hard to see. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2fad4168fbeb5d9fa09e91a0488e0737e911f506 Author: Julia Lawall Date: Tue Sep 29 15:14:27 2020 +0200 media: saa7134: use semicolons rather than commas to separate statements Replace commas with semicolons. Commas introduce unnecessary variability in the code structure and are hard to see. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 829393f700fb5cbc92be0beec23dada5e70d434e Author: Julia Lawall Date: Tue Sep 29 15:14:26 2020 +0200 media: rtl28xxu: use semicolons rather than commas to separate statements Replace commas with semicolons. Commas introduce unnecessary variability in the code structure and are hard to see. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 973c960de6a278ab34ef214bd6c600a48bff1aa3 Author: Julia Lawall Date: Tue Sep 29 15:14:25 2020 +0200 media: em28xx-audio: use semicolons rather than commas to separate statements Replace commas with semicolons. Commas introduce unnecessary variability in the code structure and are hard to see. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 67120129f95d90cc1b8875ed4f9bfaa21b914356 Author: Julia Lawall Date: Tue Sep 29 15:14:24 2020 +0200 media: coda: use semicolons rather than commas to separate statements Replace commas with semicolons. Commas introduce unnecessary variability in the code structure and are hard to see. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6df26dc6b9b7bf6b25acc20eee6877e13f040a81 Author: Arnd Bergmann Date: Fri Oct 30 17:55:29 2020 +0100 media: v4l2: remove remaining compat_ioctl There are no remaining conversions in v4l2_compat_ioctl32(), so all the infrastructure for it can be removed, with the only remaining bit being the compat_ioctl32() callback into drivers that implement their own incompatible data structures. Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 50085270a162d628dc60ecbc8cab9f33618555dc Author: Arnd Bergmann Date: Fri Oct 30 17:55:28 2020 +0100 media: v4l2: remaining compat handlers There are eight remaining ioctl commands handled by copying incompatible data structures in v4l2_compat_ioctl32(), all of them fairly simple. Change them to instead go through the native ioctl infrastructure and only special-case the data copy. Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 566f960d3c5e1f63482298b60a80de4d3cd75d68 Author: Arnd Bergmann Date: Fri Oct 30 17:55:27 2020 +0100 media: v4l2: convert v4l2_format compat ioctls Now that the 'clips' array is accessed by common code in the native ioctl handler, the same can be done for the compat version, greatly simplifying the compat code for these four ioctl commands. [hverkuil: fix: CHECK: Alignment should match open parenthesis] Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3f65c6f67e8813448d7e3cfd3470b0f8c15bfaea Author: Arnd Bergmann Date: Fri Oct 30 17:55:26 2020 +0100 media: v4l2: allocate v4l2_clip objects early The v4l2_format based ioctls can have an indirect pointer to an array of v4l2_clip structures for overlay mode, depending on the 'type' member. There are only five drivers that use the overlay mode and copy the data through the __user pointer. Change the five drivers to use memcpy() instead, and copy the data in common code using the check_array_args() helpers. This allows for a subsequent patch that use the same mechanism for compat ioctl handlers. Note that there is another pointer for a 'bitmap' that is only used in the 'vivid' driver and nowhere else. There is no easy way to use the same trick without adding complexity to the common code, so this remains a __user pointer. [hverkuil: fix: CHECK: spaces preferred around that '*' (ctx:VxV)] [hverkuil: fix: CHECK: Alignment should match open parenthesis] Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 00af58fd9a20556a25deb85f32085f82c697c178 Author: Arnd Bergmann Date: Fri Oct 30 17:55:25 2020 +0100 media: v4l2: move compat handling for v4l2_buffer The ioctl commands based on v4l2_buffer have two sets of compat calls, one for native time32 structures, and one for compat structures on 64-bit architectures. Change the compat version to use the same approach as the other simpler one, for both versions of the structure. In an earlier version of the patch, I unified the v4l2_buffer_time32 and v4l2_buffer32_time32 compatibility handling into a single implementation, but that relied on having it all in one file, rather than having the in_compat_syscall() version in v4l2-compat-ioctl32.c. [hverkuil: fix various trivial checkpatch issues] Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6c9361e739a549742a39d8372f37add56e343604 Author: Arnd Bergmann Date: Fri Oct 30 17:55:24 2020 +0100 media: v4l2: move v4l2_ext_controls conversion The v4l2_ext_controls ioctl handlers use an indirect pointer to an incompatible data structure, making the conversion particularly tricky. Moving the compat implementation to use the new v4l2_compat_get_user()/v4l2_compat_put_user() helpers makes it noticeably simpler. In v4l2_compat_get_array_args()/v4l2_compat_put_array_args(), the 'file' argument needs to get passed to determine the exact format, which is a bit unfortunate, as no other conversion needs these. [hverkuil: fix: WARNING: Missing a blank line after declarations] [hverkuil: fix: CHECK: Please don't use multiple blank lines] Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3b8bc8912adf293291bfbf1be2c7214014f6c313 Author: Arnd Bergmann Date: Fri Oct 30 17:55:23 2020 +0100 media: v4l2: remove unneeded compat ioctl handlers These seven commands are all compatible and do not need any conversion handlers. The existing ones just copy 32-bit integers around, and those are always compatible. Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8dbcc3fa387c16abfc88a628cf528c439c91b332 Author: Arnd Bergmann Date: Fri Oct 30 17:55:22 2020 +0100 media: v4l2: prepare compat-ioctl rework The v4l2-compat-ioctl32() currently takes an extra round trip through user space pointers when converting the data structure formats. In particular, this involves using the compat_alloc_user_space() and copy_in_user() helpers that often lead to worse compat handlers compared to using in_compat_syscall() checks when copying the data. The native implementation already gained a simpler method to deal with the conversion for the time32 conversion. Hook into the same places to provide a location for reading and writing user space data from inside of the generic video_usercopy() helper. Hans Verkuil rewrote the video_get_user() function here to simplify the zeroing of the extra input fields and fixed a couple of bugs in the original implementation. [hverkuil: fix: CHECK: Please don't use multiple blank lines] Co-developed-by: Hans Verkuil Signed-off-by: Hans Verkuil Signed-off-by: Arnd Bergmann Signed-off-by: Mauro Carvalho Chehab commit cb68a8580e2086fad38597af4c60d39de8df0cde Author: Martin Blumenstingl Date: Sun Nov 15 20:06:58 2020 +0100 thermal: amlogic: Add hwmon support Many monitoring tools read the CPU temperature using the hwmon interface. Expose the thermal sensors on Amlogic boards as hwmon devices. Without this lm_sensors' "sensors" tool does not find any temperature sensors. Now it prints: cpu_thermal-virtual-0 Adapter: Virtual device temp1: +44.7 C (crit = +110.0 C) ddr_thermal-virtual-0 Adapter: Virtual device temp1: +45.9 C (crit = +110.0 C) Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201115190658.631578-1-martin.blumenstingl@googlemail.com commit a6b2a18060f6b351752fa748a904f46b94edec00 Author: Carl Philipp Klemm Date: Sun Nov 8 19:53:20 2020 +0100 ARM: omap2plus_defconfig: add CONFIG_AK8975=m and CONFIG_KXCJK1013=m ARM: omap2plus_defconfig: add CONFIG_AK8975=m and CONFIG_KXCJK1013=m to support motorola xt894's magnetometer and motorola xt875's accelerometer respectivly Signed-off-by: Carl Philipp Klemm [tony@atomide.com: shortened subject a bit] Signed-off-by: Tony Lindgren commit 0003b687ee6d55b889f037530582493f353f0567 Author: Simon Ser Date: Sun Nov 15 15:39:07 2020 +0000 drm: fix oops in drm_atomic_set_crtc_for_connector crtc can be NULL. connector, extracted from conn_state, can't. Fixes: e3aae683e861 ("drm: convert drm_atomic_uapi.c to new debug helpers") Signed-off-by: Simon Ser Cc: Chris Wilson Cc: Daniel Vetter Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/7xhyNYrWtzUIt3HNrWfi9iScW0k475RZiKNfF5TbPs@cp4-web-031.plabs.ch commit a82820fcd079e38309403f595f005a8cc318a13c Author: Adam Ford Date: Fri Sep 11 07:31:57 2020 -0500 ARM: omap2plus_defconfig: Enable OMAP3_THERMAL With the additional power management options enabled, this patch enables OMAP3_THERMAL by default. Signed-off-by: Adam Ford Signed-off-by: Tony Lindgren commit 23d89aa0c2192f2d4582198b381d8805492c7925 Author: Daniel Baluta Date: Wed Nov 11 13:11:18 2020 +0200 firmware: imx-dsp: Export functions to request/free channels In order to save power, we only need to request a channel when the communication with the DSP active. For this we export the following functions: - imx_dsp_request_channel, gets a channel with a given index - imx_dsp_free_channel, frees a channel with a given index Notice that we still request channels at probe to support devices that do not have PM callbacks implemented. More explanations about why requesting a channel has an effect on power savings: - requesting an mailbox channel will call mailbox's startup function. - startup function calls pm_runtime_get_sync which increments device usage count and will keep the device active. Specifically, mailbox clock will be always ON when a mailbox channel is requested. Signed-off-by: Daniel Baluta Reviewed-by: Paul Olaru Signed-off-by: Shawn Guo commit 046326989a1845db321d3b3db637e1336383b047 Author: Daniel Baluta Date: Wed Nov 11 13:11:17 2020 +0200 firmware: imx: Save channel name for further use We want to request / free channels on demand later in order to save power. For this for each channel we save the name and use it to reference the channel later. Signed-off-by: Daniel Baluta Reviewed-by: Paul Olaru Signed-off-by: Shawn Guo commit 4d3f4f0379b637b489a3eda9524a78d515390f06 Author: Daniel Baluta Date: Wed Nov 11 13:11:16 2020 +0200 firmware: imx: Introduce imx_dsp_setup_channels Create a separate function that sets up DSP mailbox channels so that imx_dsp_probe function will be easier to read. Signed-off-by: Daniel Baluta Reviewed-by: Paul Olaru Signed-off-by: Shawn Guo commit b9639a8b5ef1fa90fc0152db15588a9fe601c4b0 Author: Jonathan Neuschäfer Date: Fri Nov 13 00:30:54 2020 +0100 ARM: dts: imx50-kobo-aura: Enable eKTF2132 touchscreen The Kobo Aura has an eKTF2132 touchscreen controller. Although the vendor kernel toggles a reset pin (GPIO5-12) during the startup sequence, the touchscreen works without it. Signed-off-by: Jonathan Neuschäfer Signed-off-by: Shawn Guo commit 0b7a8e5a61a15014a450c0c36719a6ab175f17eb Author: Mirela Rabulea Date: Thu Nov 12 05:05:49 2020 +0200 firmware: imx: scu-pd: Add power domains for imx-jpeg The power domains are for imx8qxp/imx8qm JPEG encoder & decoder. Each has 4 slots and a wrapper. Signed-off-by: Mirela Rabulea Acked-by: Daniel Baluta Signed-off-by: Shawn Guo commit 21658d51cf1ea88c04652a3852a190bb905cd91e Author: Marc Kleine-Budde Date: Wed Nov 11 14:05:05 2020 +0100 ARM: dts: imx: Change flexcan node name to "can" Change i.MX SoCs nand node name from "flexcan" to "can" to be compliant with yaml schema, it requires the nodename to be "can". This fixes the following error found by dtbs_check: arch/arm/boot/dts/imx6dl-apf6dev.dt.yaml: flexcan@2090000: $nodename:0: 'flexcan@2090000' does not match '^can(@.*)?$' From schema: Documentation/devicetree/bindings/net/can/fsl,flexcan.yaml Cc: Shawn Guo Cc: devicetree@vger.kernel.org Signed-off-by: Marc Kleine-Budde Signed-off-by: Shawn Guo commit 93c69b2d17372463ae33b79b3002c22a208945b3 Merge: ef84928cff589 09162bc32c880 Author: Greg Kroah-Hartman Date: Mon Nov 16 09:18:46 2020 +0100 Merge 5.10-rc4 into char-misc-next We need the char/misc fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 0fb2c41f992cc58aa87fe42b6ee9c6048359670f Merge: 56c62080d5b57 09162bc32c880 Author: Greg Kroah-Hartman Date: Mon Nov 16 09:16:56 2020 +0100 Merge 5.10-rc4 into here. We need the USB/Thunderbolt fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 1186a522c302e01f1737b28e353bac137c47aca8 Author: Krzysztof Kozlowski Date: Tue Nov 10 19:50:34 2020 +0100 ARM: dts: imx6q-pico: fix board compatibles There are four flavors of TechNexion PICO-IMX6 boards. They have their own DTSes, even though in Dwarf, Nymph and Pi are exactly the same. They also have their own bindings so adjust the compatibles to match the bindings. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 716ff4746cc12218cd96368e5b8714096ada0fe9 Author: Krzysztof Kozlowski Date: Tue Nov 10 19:50:33 2020 +0100 dt-bindings: arm: fsl: document i.MX7S boards Document and adjust the compatibles for i.MX7S based boards. The Toradex boards use multiple compatibles. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Shawn Guo commit 7ac76dab93a78fee7bf0a1b49c319ee5febc0396 Author: Zou Wei Date: Sat Nov 14 15:16:13 2020 +0800 drm/virtio: Make virtgpu_dmabuf_ops with static keyword Fix the following sparse warning: ./virtgpu_prime.c:46:33: warning: symbol 'virtgpu_dmabuf_ops' was not declared. Should it be static? Signed-off-by: Zou Wei Link: http://patchwork.freedesktop.org/patch/msgid/1605338173-22100-1-git-send-email-zou_wei@huawei.com Signed-off-by: Gerd Hoffmann commit 86f1a6e6c5f700f27bbee046ad330b6a50707a24 Author: Rikard Falkeborn Date: Mon Nov 9 22:58:44 2020 +0100 phy: tegra: Constify static device_type structs The only usage of tegra_xusb_pad_type and tegra_xusb_port_type is to assign their address to the type field in the device struct, which is a const pointer. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20201109215844.167954-1-rikard.falkeborn@gmail.com Signed-off-by: Vinod Koul commit 3cc8e86721adbd24de7303bbb5a82464ba9e324a Author: Yejune Deng Date: Tue Nov 3 12:37:54 2020 +0800 phy: amlogic: Replace devm_reset_control_array_get() devm_reset_control_array_get_exclusive() looks more readable Signed-off-by: Yejune Deng Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/1604378274-6860-1-git-send-email-yejune.deng@gmail.com Signed-off-by: Vinod Koul commit b5cf2d6c814829b623ccedce88d94e7bfe35cb2c Author: Faiyaz Mohammed Date: Mon Nov 16 10:14:04 2020 +0530 mm: memblock: add more debug logs It is useful to know the exact caller of memblock_phys_alloc_range() to track early memory reservations during development. Currently, when memblock debugging is enabled, the allocations done with memblock_phys_alloc_range() are only reported at memblock_reserve(): [ 0.000000] memblock_reserve: [0x000000023fc6b000-0x000000023fc6bfff] memblock_alloc_range_nid+0xc0/0x188 Add memblock_dbg() to memblock_phys_alloc_range() to get details about its usage. For example: [ 0.000000] memblock_phys_alloc_range: 4096 bytes align=0x1000 from=0x0000000000000000 max_addr=0x0000000000000000 early_pgtable_alloc+0x24/0x178 [ 0.000000] memblock_reserve: [0x000000023fc6b000-0x000000023fc6bfff] memblock_alloc_range_nid+0xc0/0x188 Signed-off-by: Faiyaz Mohammed Signed-off-by: Mike Rapoport commit ba2bf1f090ebdf36f02c6d31381a0685982ff7fe Author: Swapnil Jakhade Date: Wed Oct 28 16:22:41 2020 +0100 dt-bindings: phy: Add Cadence Sierra PHY bindings in YAML format Add Cadence Sierra PHY bindings in YAML format. Signed-off-by: Swapnil Jakhade Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1603898561-5142-1-git-send-email-sjakhade@cadence.com Signed-off-by: Vinod Koul commit 79caf207d6699419e83ac150accc5c80c5719b47 Author: Chunfeng Yun Date: Fri Nov 6 14:08:50 2020 +0800 phy: ti: convert to devm_platform_ioremap_resource(_byname) Use devm_platform_ioremap_resource(_byname) to simplify code Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1604642930-29019-17-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Vinod Koul commit 9ab4212b0a363a1edc5a52f70843dc2a5cda200d Author: Chunfeng Yun Date: Fri Nov 6 14:08:49 2020 +0800 phy: tegra: convert to devm_platform_ioremap_resource(_byname) Use devm_platform_ioremap_resource(_byname) to simplify code Signed-off-by: Chunfeng Yun Cc: JC Kuo Link: https://lore.kernel.org/r/1604642930-29019-16-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Vinod Koul commit 5a77b16c6b2b0eb5ab108d1933e99be769f5c90f Author: Chunfeng Yun Date: Fri Nov 6 14:08:48 2020 +0800 phy: phy-stm32-usbphyc: convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource to simplify code Signed-off-by: Chunfeng Yun Reviewed-by: Amelie Delaunay Link: https://lore.kernel.org/r/1604642930-29019-15-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Vinod Koul commit 2f0c9fac3be6c834427f9d2af2107ebd6602d4b1 Author: Chunfeng Yun Date: Fri Nov 6 14:08:47 2020 +0800 phy: samsung: convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource to simplify code Signed-off-by: Chunfeng Yun Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/1604642930-29019-14-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Vinod Koul commit 6824ebc047b9936bfe7b5885d85c1fe88dca014e Author: Chunfeng Yun Date: Fri Nov 6 14:08:46 2020 +0800 phy: rockchip: convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource to simplify code Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1604642930-29019-13-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Vinod Koul commit 0b5604affbec0241d72996924b2f5a33d96b860a Author: Chunfeng Yun Date: Fri Nov 6 14:08:45 2020 +0800 phy: renesas: convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource to simplify code Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1604642930-29019-12-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Vinod Koul commit fc5662127a257eafcb37133fa272b1ab0813ae07 Author: Chunfeng Yun Date: Fri Nov 6 14:08:44 2020 +0800 phy: phy-ralink-usb: convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource to simplify code Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1604642930-29019-11-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Vinod Koul commit 8a7772cdd91de4eea6dcd9df9b6fce7f4c012208 Author: Chunfeng Yun Date: Fri Nov 6 14:08:43 2020 +0800 phy: qualcomm: convert to devm_platform_ioremap_resource(_byname) Use devm_platform_ioremap_resource(_byname) to simplify code Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1604642930-29019-10-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Vinod Koul commit 7458d650e256b2b418efa4c974585846da4358a6 Author: Chunfeng Yun Date: Fri Nov 6 14:08:42 2020 +0800 phy: phy-mtk-ufs: convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource to simplify code Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1604642930-29019-9-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Vinod Koul commit 5d797059ff57b2213153523f4cf031a811e53dbf Author: Chunfeng Yun Date: Fri Nov 6 14:08:41 2020 +0800 phy: phy-xgene: convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource to simplify code Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1604642930-29019-8-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Vinod Koul commit ee55b501bd8ceb12c30ff0c0240498a301e126db Author: Chunfeng Yun Date: Fri Nov 6 14:08:40 2020 +0800 phy: marvell: convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource to simplify code Signed-off-by: Chunfeng Yun Reviewed-by: Jisheng Zhang Link: https://lore.kernel.org/r/1604642930-29019-7-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Vinod Koul commit 6c9111bc9eef0ff0302a0963ff802d31e21bfe05 Author: Chunfeng Yun Date: Fri Nov 6 14:08:39 2020 +0800 phy: lantiq: convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource to simplify code Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1604642930-29019-6-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Vinod Koul commit 0b7c4c88b83f415d4c75ba4774e0bb7ed266c7c0 Author: Chunfeng Yun Date: Fri Nov 6 14:08:38 2020 +0800 phy: freescale: convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource to simplify code Signed-off-by: Chunfeng Yun Reviewed-by: Peter Chen Link: https://lore.kernel.org/r/1604642930-29019-5-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Vinod Koul commit fa62909400fa5abc53cc76cb4917bb92b8bf3a2d Author: Chunfeng Yun Date: Fri Nov 6 14:08:37 2020 +0800 phy: cadence: convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource to simplify code Signed-off-by: Chunfeng Yun Acked-by: Peter Chen Link: https://lore.kernel.org/r/1604642930-29019-4-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Vinod Koul commit f669bc8b9f7beb6b1936882a2c3670dc1bd985ba Author: Chunfeng Yun Date: Fri Nov 6 14:08:36 2020 +0800 phy: broadcom: convert to devm_platform_ioremap_resource(_byname) Use devm_platform_ioremap_resource(_byname) to simplify code Signed-off-by: Chunfeng Yun Reviewed-by: Florian Fainelli Cc: Al Cooper Link: https://lore.kernel.org/r/1604642930-29019-3-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Vinod Koul commit 202de02556bb49ba35f5c7675934b9b14bbb2a56 Author: Chunfeng Yun Date: Fri Nov 6 14:08:35 2020 +0800 phy: amlogic: convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource to simplify code Signed-off-by: Chunfeng Yun Reviewed-by: Remi Pommarel Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/1604642930-29019-2-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Vinod Koul commit 08d4deda6970a91313955934487a37077b1792cb Author: Chunfeng Yun Date: Fri Nov 6 14:08:34 2020 +0800 phy: allwinner: convert to devm_platform_ioremap_resource(_byname) Use devm_platform_ioremap_resource(_byname) to simplify code Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1604642930-29019-1-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Vinod Koul commit a582354c92d102616dc890c1ec261a880befae4f Author: Ville Syrjälä Date: Fri Nov 6 19:30:39 2020 +0200 drm/i915: Pimp the watermark documentation a bit Document what each of the "raw" vs. "optimal" vs. "intermediate" watermarks do. Signed-off-by: Ville Syrjälä Reviewed-by: Manasi Navare Signed-off-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20201106173042.7534-4-ville.syrjala@linux.intel.com commit dbf71381d73390d1e2cedd84eb04ea9b32fd96b3 Author: Ville Syrjälä Date: Fri Nov 6 19:30:38 2020 +0200 drm/i915: Nuke intel_atomic_crtc_state_for_each_plane_state() from skl+ wm code intel_atomic_crtc_state_for_each_plane_state() peeks at the plane's current state without holding the plane's mutex, trusting that the crtc's mutex will protect it. In practice that does work since our planes can't move between pipes, but it sets a bad example. intel_atomic_crtc_state_for_each_plane_state() also relies on crtc_state.uapi.plane_mask which may be full of lies when it comes to the bigjoiner stuff, so soon we can't use it as is anyway. So best to just get rid of it entirely. Which we can easily do by switching to the g4x/vlv "raw" watermark approach. Later on we should even be able to move the "raw" watermark computation into the normal .plane_check() code, leaving only the merging/clamping of the final watermarks to the later stages. But that will require adjusting the ilk+ wm code similarly as well. Signed-off-by: Ville Syrjälä Reviewed-by: Stanislav Lisovskiy Signed-off-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20201106173042.7534-3-ville.syrjala@linux.intel.com commit ffc90033dfc1f5a857ac96ca648d1250b3fcccf9 Author: Ville Syrjälä Date: Fri Nov 6 19:30:37 2020 +0200 drm/i915: Pass intel_atomic_state around Pass the whole intel_atomic_state to skl_build_pipe_wm() and skl_allocate_pipe_ddb() so we can start to iterate stuff containerd in the commit. Signed-off-by: Ville Syrjälä Reviewed-by: Manasi Navare Signed-off-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20201106173042.7534-2-ville.syrjala@linux.intel.com commit 6ff286225d75a1bcb61cf0ff714757a579305beb Author: Paul Fertser Date: Wed Sep 30 22:25:07 2020 +0300 arm: dts: aspeed: tiogapass: Enable second MAC Tioga Pass reference design includes Intel I210 Ethernet controller connected to the BMC with NC/SI. MAC readout is not supported. Signed-off-by: Paul Fertser Reviewed-by: Vijay Khemka Tested-by: Vijay Khemka Signed-off-by: Joel Stanley commit 6edf7700a9dde8d3e494d1b390b5284329642a70 Author: Manivannan Sadhasivam Date: Tue Oct 27 22:30:30 2020 +0530 phy: qcom-qmp: Add SM8250 PCIe QMP PHYs SM8250 has multiple different PHY versions: QMP GEN3x1 PHY - 1 lane QMP GEN3x2 PHY - 2 lanes QMP Modem PHY - 2 lanes Add support for these with relevant init sequence. In order to abstract the init sequence, this commit introduces secondary tables which can be used to factor out the unique sequence for each PHY while the former tables can have the common sequence. Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20201027170033.8475-3-manivannan.sadhasivam@linaro.org Signed-off-by: Vinod Koul commit 5594b407a48b1fcf6da1ecbfe4a647f2ce3c284a Author: Manivannan Sadhasivam Date: Tue Oct 27 22:30:29 2020 +0530 dt-bindings: phy: qcom,qmp: Add SM8250 PCIe PHY bindings Add the below three PCIe PHYs found in SM8250 to the QMP binding: QMP GEN3x1 PHY - 1 lane QMP GEN3x2 PHY - 2 lanes QMP Modem PHY - 2 lanes Signed-off-by: Manivannan Sadhasivam Acked-by: Rob Herring Link: https://lore.kernel.org/r/20201027170033.8475-2-manivannan.sadhasivam@linaro.org Signed-off-by: Vinod Koul commit 2e7cd913eafcdfa008565d91e9d1f253f89f7c3b Author: Tao Ren Date: Mon Nov 9 23:24:46 2020 -0800 ARM: dts: aspeed: minipack: Fixup I2C tree Create all the i2c switches in device tree and use aliases to assign child channels with consistent bus numbers. Besides, "i2c-mux-idle-disconnect" is set for all the i2c switches to avoid potential conflicts when multiple devices (beind the switches) use the same device address. Signed-off-by: Tao Ren Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20201110072446.8218-1-rentao.bupt@gmail.com Signed-off-by: Joel Stanley commit c9f6aa9d1f50fa1b6429bfa9cb50648379b1c710 Author: Tao Ren Date: Mon Nov 9 23:21:59 2020 -0800 ARM: dts: aspeed: wedge400: Fix FMC flash0 layout Update "data0" partition's size from 8MB to 4MB to fix "partition data0 extends beyond the end of device" warning at bootup time. Signed-off-by: Tao Ren Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20201110072159.7941-1-rentao.bupt@gmail.com Signed-off-by: Joel Stanley commit 7f415677420ff97dd7792eab02dd00e25fcd1f15 Author: Jonathan Cameron Date: Sun Nov 15 19:29:45 2020 +0000 ARM: dts: Cygnus: Drop incorrect io-channel-ranges property. This property applies to consumers of io-channels. In this case we have a provider so the property is not used. Recent changes to dt-schema result int his being reported as an error as a dependency is enforced between this property and io-channels. Signed-off-by: Jonathan Cameron Cc: Florian Fainelli Signed-off-by: Florian Fainelli commit ee230706666c04798e4baeb8f4d2205aa31bda24 Author: Manasi Navare Date: Fri Nov 13 07:56:55 2020 -0800 drm/i915/dp: Add from_crtc_state to copy color blobs No functional changes here, just adds a from_crtc_state as a prep for bigjoiner v2: * More prep with intel_atomic_state (Ville) Cc: Ville Syrjälä Signed-off-by: Manasi Navare Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201113155656.17630-2-manasi.d.navare@intel.com commit aa07c1d3be699bda5a3e5d94203217a3961b0f9f Author: Manasi Navare Date: Fri Nov 13 07:56:54 2020 -0800 drm/i915: Pass intel_atomic_state instead of drm_atomic_state No functional changes, to align with previous cleanups pass intel_atomic_state instead of drm_atomic_state. Also pass this intel_atomic_state with crtc_state to some of the atomic_check functions. v2: * Squash some changes from next patch (Ville) Signed-off-by: Manasi Navare Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201113155656.17630-1-manasi.d.navare@intel.com commit a14d546f7270d017fbc8bf96b6ea2e0e933689ea Author: Viresh Kumar Date: Wed Oct 28 12:14:21 2020 +0530 drm/lima: Unconditionally call dev_pm_opp_of_remove_table() dev_pm_opp_of_remove_table() doesn't report any errors when it fails to find the OPP table with error -ENODEV (i.e. OPP table not present for the device). And we can call dev_pm_opp_of_remove_table() unconditionally here. Reviewed-by: Qiang Yu Signed-off-by: Viresh Kumar Signed-off-by: Qiang Yu Link: https://patchwork.freedesktop.org/patch/msgid/c995335d16d8b4b4ff47b1273869c33e14782b32.1603867405.git.viresh.kumar@linaro.org commit cd434e740ff2730802593bb1fceccd28ad82d5f9 Author: Lee Jones Date: Fri Nov 13 13:49:21 2020 +0000 drm/lima/lima_sched: Remove unused and unnecessary variable 'ret' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/lima/lima_sched.c: In function ‘lima_sched_run_job’: drivers/gpu/drm/lima/lima_sched.c:227:20: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] Cc: Qiang Yu Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: "Christian König" Cc: dri-devel@lists.freedesktop.org Cc: lima@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Qiang Yu Link: https://patchwork.freedesktop.org/patch/msgid/20201113134938.4004947-24-lee.jones@linaro.org commit 37d66109fe6f8f92169468db0e7805947b3ee7af Author: Lee Jones Date: Fri Nov 13 13:49:13 2020 +0000 drm/lima/lima_drv: Demote kernel-doc formatting abuse Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/lima/lima_drv.c:264: warning: cannot understand function prototype: 'const struct drm_driver lima_drm_driver = ' Cc: Qiang Yu Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Cc: lima@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Qiang Yu Link: https://patchwork.freedesktop.org/patch/msgid/20201113134938.4004947-16-lee.jones@linaro.org commit 8f9d7ef38cfa46a7a8e5d079fe817802843ce0f6 Author: Liu Shixin Date: Sat Sep 19 18:08:50 2020 +0800 drm/lima: simplify the return expression of lima_devfreq_target Simplify the return expression. Signed-off-by: Liu Shixin Signed-off-by: Qiang Yu Link: https://patchwork.freedesktop.org/patch/msgid/20200919100850.1639111-1-liushixin2@huawei.com commit db4c02e439f7b66f5a6f8a5421a4956d111bc015 Author: Linus Walleij Date: Wed Nov 11 00:46:53 2020 +0100 drm/panel: s6e63m0: Set up some display info Copy over the width/height in millimeters to the (somewhat redundant) display info, and set up the bus format and bus flags for the display. When used as DPI this display requires DE to be active low and pixel data to be output on the negative edge. It might be that it was previously used with a display controller that either does not support these settings or was hardcoded to use these as default. This information comes from the source code of the Samsung GT-I9070 mobile phone. Signed-off-by: Linus Walleij Acked-by: Sam Ravnborg Cc: Stephan Gerhold Cc: Paweł Chmiel Link: https://patchwork.freedesktop.org/patch/msgid/20201110234653.2248594-6-linus.walleij@linaro.org commit 4680e9cc9d8bc9db8a7489cb77a8d19962bd580e Author: Linus Walleij Date: Wed Nov 11 00:46:52 2020 +0100 drm/panel: s6e63m0: Support 3WIRE protocol The panel can be connected using 3WIRE, then it is however necessary that the flag SPI_3WIRE is preserved on the device, as we set this from generic device tree parsing code (or similar). Just |= the SPI mode. Signed-off-by: Linus Walleij Acked-by: Sam Ravnborg Cc: Stephan Gerhold Cc: Paweł Chmiel Link: https://patchwork.freedesktop.org/patch/msgid/20201110234653.2248594-5-linus.walleij@linaro.org commit 9cea169835dec8faa1be0e980b2ed9da7e2c9850 Author: Linus Walleij Date: Wed Nov 11 00:46:51 2020 +0100 drm/panel: s6e63m0: Add some explanations The SPI DCS code was a bit hard to understand as the device accepts 9-bit transfers packed into 16-bit words with the most significant bit in bit 9 of the 16-bit word. Add some clarifying comments. Signed-off-by: Linus Walleij Acked-by: Sam Ravnborg Cc: Stephan Gerhold Cc: Paweł Chmiel Link: https://patchwork.freedesktop.org/patch/msgid/20201110234653.2248594-4-linus.walleij@linaro.org commit 1b72ea1eaa9e4168d7486d85463fbd2d57a1452c Author: Linus Walleij Date: Wed Nov 11 00:46:50 2020 +0100 drm/panel: s6e63m0: Implement reading from panel This code was found in the Samsung vendor tree for the Samsung GT-I9070 mobile phone. Let's support reading before we implement the 3WIRE protocol for both reading and writing. Signed-off-by: Linus Walleij Acked-by: Sam Ravnborg Cc: Stephan Gerhold Cc: Paweł Chmiel Link: https://patchwork.freedesktop.org/patch/msgid/20201110234653.2248594-3-linus.walleij@linaro.org commit 49ef0c6d7dd2bdc3cee3dc004545a373742cd752 Author: Linus Walleij Date: Wed Nov 11 00:46:49 2020 +0100 drm/panel: s6e63m0: Simplify SPI writing This writing code is equivalent to the spi_write() helper in the SPI framework. Insert a comment that this will always work fine since SPI buffers are in native endianness. Signed-off-by: Linus Walleij Acked-by: Sam Ravnborg Cc: Stephan Gerhold Cc: Paweł Chmiel Link: https://patchwork.freedesktop.org/patch/msgid/20201110234653.2248594-2-linus.walleij@linaro.org commit 78a56e0494ad29feccd4c54c2b5682721f8cb988 Author: Ira Weiny Date: Wed Nov 4 15:01:57 2020 -0800 entry: Fix spelling/typo errors in irq entry code s/reguired/required/ s/Interupts/Interrupts/ s/quiescient/quiescent/ s/assemenbly/assembly/ Signed-off-by: Ira Weiny Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201104230157.3378023-1-ira.weiny@intel.com commit 6e5a91901c2dff3a0f2eb9f10e427dce2b0488fc Author: Alex Shi Date: Fri Nov 13 15:24:34 2020 +0800 timekeeping: Address parameter documentation issues for various functions The kernel-doc parser complains: kernel/time/timekeeping.c:1543: warning: Function parameter or member 'ts' not described in 'read_persistent_clock64' kernel/time/timekeeping.c:764: warning: Function parameter or member 'tk' not described in 'timekeeping_forward_now' kernel/time/timekeeping.c:1331: warning: Function parameter or member 'ts' not described in 'timekeeping_inject_offset' kernel/time/timekeeping.c:1331: warning: Excess function parameter 'tv' description in 'timekeeping_inject_offset' Add the missing parameter documentations and rename the 'tv' parameter of timekeeping_inject_offset() to 'ts' so it matches the implemention. [ tglx: Reworded a few docs and massaged changelog ] Signed-off-by: Alex Shi Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/1605252275-63652-5-git-send-email-alex.shi@linux.alibaba.com commit 29efc4612ac1b888e65da408b41dafa4dd00842f Author: Alex Shi Date: Fri Nov 13 15:24:35 2020 +0800 timekeeping: Fix parameter docs of read_persistent_wall_and_boot_offset() Address the following kernel-doc markup warnings: kernel/time/timekeeping.c:1563: warning: Function parameter or member 'wall_time' not described in 'read_persistent_wall_and_boot_offset' kernel/time/timekeeping.c:1563: warning: Function parameter or member 'boot_offset' not described in 'read_persistent_wall_and_boot_offset' The parameters are described but miss the leading '@' and the colon after the parameter names. [ tglx: Massaged changelog ] Signed-off-by: Alex Shi Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/1605252275-63652-6-git-send-email-alex.shi@linux.alibaba.com commit f27f7c3f100e74a7f451a63a15788f50c52f7cce Author: Alex Shi Date: Fri Nov 13 15:24:32 2020 +0800 timekeeping: Add missing parameter docs for pvclock_gtod_[un]register_notifier() The kernel-doc parser complains about: kernel/time/timekeeping.c:651: warning: Function parameter or member 'nb' not described in 'pvclock_gtod_register_notifier' kernel/time/timekeeping.c:670: warning: Function parameter or member 'nb' not described in 'pvclock_gtod_unregister_notifier' Add the missing parameter explanations. [ tglx: Massaged changelog ] Signed-off-by: Alex Shi Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/1605252275-63652-3-git-send-email-alex.shi@linux.alibaba.com commit c1ce406e80fb15fa52b2b48dfd48fad6f3d2a32f Author: Thomas Gleixner Date: Sun Nov 15 21:09:31 2020 +0100 timekeeping: Fix up function documentation for the NMI safe accessors Alex reported the following warning: kernel/time/timekeeping.c:464: warning: Function parameter or member 'tkf' not described in '__ktime_get_fast_ns' which is not entirely correct because the documented function is ktime_get_mono_fast_ns() which does not have a parameter, but the kernel-doc parser looks at the function declaration which follows the comment and complains about the missing parameter documentation. Aside of that the documentation for the rest of the NMI safe accessors is either incomplete or missing. - Move the function documentation to the right place - Fixup the references and inconsistencies - Add the missing documentation for ktime_get_raw_fast_ns() Reported-by: Alex Shi Signed-off-by: Thomas Gleixner commit e025b03113d27139ce2b28b82599018e4d8fa5f6 Author: Alex Shi Date: Fri Nov 13 15:24:31 2020 +0800 timekeeping: Add missing parameter documentation for update_fast_timekeeper() Address the following warning: kernel/time/timekeeping.c:415: warning: Function parameter or member 'tkf' not described in 'update_fast_timekeeper' [ tglx: Remove the bogus ktime_get_mono_fast_ns() part ] Signed-off-by: Alex Shi Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/1605252275-63652-2-git-send-email-alex.shi@linux.alibaba.com commit 199d280c884de44c3b0daeb77438db43f6db01a2 Author: Alex Shi Date: Fri Nov 13 15:24:33 2020 +0800 timekeeping: Remove static functions from kernel-doc markup Various static functions in the timekeeping code have function comments which pretend to be kernel-doc, but are incomplete and trigger parser warnings. As these functions are local to the timekeeping core code there is no need to expose them via kernel-doc. Remove the double star kernel-doc marker and remove excess newlines. [ tglx: Massaged changelog and removed excess newlines ] Signed-off-by: Alex Shi Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/1605252275-63652-4-git-send-email-alex.shi@linux.alibaba.com commit a0f5a65fa5faeef708d022698d5fcba290a35856 Author: Alex Shi Date: Fri Nov 13 15:24:30 2020 +0800 time: Add missing colons for parameter documentation of time64_to_tm() Address these kernel-doc warnings: kernel/time/timeconv.c:79: warning: Function parameter or member 'totalsecs' not described in 'time64_to_tm' kernel/time/timeconv.c:79: warning: Function parameter or member 'offset' not described in 'time64_to_tm' kernel/time/timeconv.c:79: warning: Function parameter or member 'result' not described in 'time64_to_tm' The parameters are described but lack colons after the parameter name. [ tglx: Massaged changelog ] Signed-off-by: Alex Shi Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/1605252275-63652-1-git-send-email-alex.shi@linux.alibaba.com commit 31b05212360cbf3af3c2e1b7f42e176e0eebedb5 Merge: 334a1683935fc be323a4cef022 Author: Dave Airlie Date: Mon Nov 16 07:25:46 2020 +1000 Merge branch 'linux-5.11' of git://github.com/skeggsb/linux into drm-next -next fix for type stuff. Signed-off-by: Dave Airlie From: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/CACAvsv5vuM54oU1Yp8sX5ZVmJAv+-oQRQj-AeaKFb3qs1EtP-g@mail.gmail.com commit c725dafc95f1b37027840aaeaa8b7e4e9cd20516 Author: Sebastian Andrzej Siewior Date: Tue Nov 3 20:09:37 2020 +0100 timers: Don't block on ->expiry_lock for TIMER_IRQSAFE timers PREEMPT_RT does not spin and wait until a running timer completes its callback but instead it blocks on a sleeping lock to prevent a livelock in the case that the task waiting for the callback completion preempted the callback. This cannot be done for timers flagged with TIMER_IRQSAFE. These timers can be canceled from an interrupt disabled context even on RT kernels. The expiry callback of such timers is invoked with interrupts disabled so there is no need to use the expiry lock mechanism because obviously the callback cannot be preempted even on RT kernels. Do not use the timer_base::expiry_lock mechanism when waiting for a running callback to complete if the timer is flagged with TIMER_IRQSAFE. Also add a lockdep assertion for RT kernels to validate that the expiry lock mechanism is always invoked in preemptible context. Reported-by: Mike Galbraith Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201103190937.hga67rqhvknki3tp@linutronix.de commit da88f9b3113620dcd30fc203236aa53d5430ee98 Author: Helge Deller Date: Wed Nov 4 17:34:01 2020 +0100 timer_list: Use printk format instead of open-coded symbol lookup Use the "%ps" printk format string to resolve symbol names. This works on all platforms, including ia64, ppc64 and parisc64 on which one needs to dereference pointers to function descriptors instead of function pointers. Signed-off-by: Helge Deller Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201104163401.GA3984@ls3530.fritz.box commit 846939118270863bc074fb734a1c2e0690ddb444 Author: Patrik Jakobsson Date: Sun Nov 15 18:54:20 2020 +0100 drm/gma500: Remove 2D accel code 2D acceleration is only available on PSB and MRST and very slow on both platforms. CPU acceleration is faster so don't bother with 2D accel anymore. Signed-off-by: Patrik Jakobsson Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20201115175420.32167-1-patrik.r.jakobsson@gmail.com commit ebc7d6470ac4b5f1fb3afa4da11861ff5bd5ea00 Author: Patrik Jakobsson Date: Wed Oct 28 15:36:08 2020 +0100 drm/gma500: Remove GTT roll support GTT roll support was used to accelerate fb panning on some machines. Unfortunately this never worked properly with multiple monitors and caused issues on others where the framebuffer wouldn't fit in stolen memory. Let's remove it! Signed-off-by: Patrik Jakobsson Acked-by: Daniel Vetter Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20201028143608.1284-1-patrik.r.jakobsson@gmail.com commit 87c5f35e5c958278174979f13a9e40d3c9962c0f Author: Andrew Jones Date: Wed Nov 11 13:26:34 2020 +0100 KVM: selftests: Also build dirty_log_perf_test on AArch64 Signed-off-by: Andrew Jones Message-Id: <20201111122636.73346-10-drjones@redhat.com> Signed-off-by: Paolo Bonzini commit 0aa9ec45d42779af711c7a209b5780ff7391b5bd Author: Andrew Jones Date: Wed Nov 11 13:26:30 2020 +0100 KVM: selftests: Introduce vm_create_[default_]_with_vcpus Introduce new vm_create variants that also takes a number of vcpus, an amount of per-vcpu pages, and optionally a list of vcpuids. These variants will create default VMs with enough additional pages to cover the vcpu stacks, per-vcpu pages, and pagetable pages for all. The new 'default' variant uses VM_MODE_DEFAULT, whereas the other new variant accepts the mode as a parameter. Reviewed-by: Peter Xu Reviewed-by: Ben Gardon Signed-off-by: Andrew Jones Message-Id: <20201111122636.73346-6-drjones@redhat.com> Signed-off-by: Paolo Bonzini commit ec2f18bb4783648041498b06d4bff222821efed1 Author: Andrew Jones Date: Wed Nov 11 13:26:29 2020 +0100 KVM: selftests: Make vm_create_default common The code is almost 100% the same anyway. Just move it to common and add a few arch-specific macros. Reviewed-by: Peter Xu Reviewed-by: Ben Gardon Signed-off-by: Andrew Jones Message-Id: <20201111122636.73346-5-drjones@redhat.com> Signed-off-by: Paolo Bonzini commit f63f0b68c864edea801de678bed279a3d7674f1a Author: Paolo Bonzini Date: Fri Nov 13 11:36:49 2020 -0500 KVM: selftests: always use manual clear in dirty_log_perf_test Nothing sets USE_CLEAR_DIRTY_LOG anymore, so anything it surrounds is dead code. However, it is the recommended way to use the dirty page bitmap for new enough kernel, so use it whenever KVM has the KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2 capability. Signed-off-by: Paolo Bonzini commit 2259c17f01887666220a35619c44c576aeed2a30 Author: Jim Mattson Date: Thu Oct 29 10:06:48 2020 -0700 kvm: x86: Sink cpuid update into vendor-specific set_cr4 functions On emulated VM-entry and VM-exit, update the CPUID bits that reflect CR4.OSXSAVE and CR4.PKE. This fixes a bug where the CPUID bits could continue to reflect L2 CR4 values after emulated VM-exit to L1. It also fixes a related bug where the CPUID bits could continue to reflect L1 CR4 values after emulated VM-entry to L2. The latter bug is mainly relevant to SVM, wherein CPUID is not a required intercept. However, it could also be relevant to VMX, because the code to conditionally update these CPUID bits assumes that the guest CPUID and the guest CR4 are always in sync. Fixes: 8eb3f87d903168 ("KVM: nVMX: fix guest CR4 loading when emulating L2 to L1 exit") Fixes: 2acf923e38fb6a ("KVM: VMX: Enable XSAVE/XRSTOR for guest") Fixes: b9baba86148904 ("KVM, pkeys: expose CPUID/CR4 to guest") Reported-by: Abhiroop Dabral Signed-off-by: Jim Mattson Reviewed-by: Ricardo Koller Reviewed-by: Peter Shier Cc: Haozhong Zhang Cc: Dexuan Cui Cc: Huaitong Han Message-Id: <20201029170648.483210-1-jmattson@google.com> commit 8aa426e854c475504033c176a66d038259bf64ea Author: Paolo Bonzini Date: Fri Nov 6 07:39:26 2020 -0500 selftests: kvm: keep .gitignore add to date Add tsc_msrs_test, remove clear_dirty_log_test and alphabetize everything. Signed-off-by: Paolo Bonzini commit edd3de6fc3d57deddb5cc7c7f1d8316ad26ac4e4 Author: Peter Xu Date: Wed Sep 30 21:22:41 2020 -0400 KVM: selftests: Add "-c" parameter to dirty log test It's only used to override the existing dirty ring size/count. If with a bigger ring count, we test async of dirty ring. If with a smaller ring count, we test ring full code path. Async is default. It has no use for non-dirty-ring tests. Reviewed-by: Andrew Jones Signed-off-by: Peter Xu Message-Id: <20201001012241.6208-1-peterx@redhat.com> Signed-off-by: Paolo Bonzini commit 019d321a68ea07efcfcbc308443251644ff3e71c Author: Peter Xu Date: Wed Sep 30 21:22:39 2020 -0400 KVM: selftests: Run dirty ring test asynchronously Previously the dirty ring test was working in synchronous way, because only with a vmexit (with that it was the ring full event) we'll know the hardware dirty bits will be flushed to the dirty ring. With this patch we first introduce a vcpu kick mechanism using SIGUSR1, which guarantees a vmexit and also therefore the flushing of hardware dirty bits. Once this is in place, we can keep the vcpu dirty work asynchronous of the whole collection procedure now. Still, we need to be very careful that when reaching the ring buffer soft limit (KVM_EXIT_DIRTY_RING_FULL) we must collect the dirty bits before continuing the vcpu. Further increase the dirty ring size to current maximum to make sure we torture more on the no-ring-full case, which should be the major scenario when the hypervisors like QEMU would like to use this feature. Reviewed-by: Andrew Jones Signed-off-by: Peter Xu Message-Id: <20201001012239.6159-1-peterx@redhat.com> [Use KVM_SET_SIGNAL_MASK+sigwait instead of a signal handler. - Paolo] Signed-off-by: Paolo Bonzini commit 84292e565951cecfe2718e43905a6103c9e8ac29 Author: Peter Xu Date: Wed Sep 30 21:22:37 2020 -0400 KVM: selftests: Add dirty ring buffer test Add the initial dirty ring buffer test. The current test implements the userspace dirty ring collection, by only reaping the dirty ring when the ring is full. So it's still running synchronously like this: vcpu main thread 1. vcpu dirties pages 2. vcpu gets dirty ring full (userspace exit) 3. main thread waits until full (so hardware buffers flushed) 4. main thread collects 5. main thread continues vcpu 6. vcpu continues, goes back to 1 We can't directly collects dirty bits during vcpu execution because otherwise we can't guarantee the hardware dirty bits were flushed when we collect and we're very strict on the dirty bits so otherwise we can fail the future verify procedure. A follow up patch will make this test to support async just like the existing dirty log test, by adding a vcpu kick mechanism. Signed-off-by: Peter Xu Message-Id: <20201001012237.6111-1-peterx@redhat.com> Signed-off-by: Paolo Bonzini commit 60f644fb519831edff38c79755f7970c475e2ece Author: Peter Xu Date: Wed Sep 30 21:22:35 2020 -0400 KVM: selftests: Introduce after_vcpu_run hook for dirty log test Provide a hook for the checks after vcpu_run() completes. Preparation for the dirty ring test because we'll need to take care of another exit reason. Reviewed-by: Andrew Jones Signed-off-by: Peter Xu Message-Id: <20201001012235.6063-1-peterx@redhat.com> Signed-off-by: Paolo Bonzini commit 044c59c409b7fd753707dc437890e94d2b0bd819 Author: Peter Xu Date: Wed Sep 30 21:22:26 2020 -0400 KVM: Don't allocate dirty bitmap if dirty ring is enabled Because kvm dirty rings and kvm dirty log is used in an exclusive way, Let's avoid creating the dirty_bitmap when kvm dirty ring is enabled. At the meantime, since the dirty_bitmap will be conditionally created now, we can't use it as a sign of "whether this memory slot enabled dirty tracking". Change users like that to check against the kvm memory slot flags. Note that there still can be chances where the kvm memory slot got its dirty_bitmap allocated, _if_ the memory slots are created before enabling of the dirty rings and at the same time with the dirty tracking capability enabled, they'll still with the dirty_bitmap. However it should not hurt much (e.g., the bitmaps will always be freed if they are there), and the real users normally won't trigger this because dirty bit tracking flag should in most cases only be applied to kvm slots only before migration starts, that should be far latter than kvm initializes (VM starts). Signed-off-by: Peter Xu Message-Id: <20201001012226.5868-1-peterx@redhat.com> Signed-off-by: Paolo Bonzini commit b2cc64c4f3829c25b618f23f472a493668d9cb80 Author: Peter Xu Date: Wed Sep 30 21:22:24 2020 -0400 KVM: Make dirty ring exclusive to dirty bitmap log There's no good reason to use both the dirty bitmap logging and the new dirty ring buffer to track dirty bits. We should be able to even support both of them at the same time, but it could complicate things which could actually help little. Let's simply make it the rule before we enable dirty ring on any arch, that we don't allow these two interfaces to be used together. The big world switch would be KVM_CAP_DIRTY_LOG_RING capability enablement. That's where we'll switch from the default dirty logging way to the dirty ring way. As long as kvm->dirty_ring_size is setup correctly, we'll once and for all switch to the dirty ring buffer mode for the current virtual machine. Signed-off-by: Peter Xu Message-Id: <20201001012224.5818-1-peterx@redhat.com> [Change errno from EINVAL to ENXIO. - Paolo] Signed-off-by: Paolo Bonzini commit fb04a1eddb1a65b6588a021bdc132270d5ae48bb Author: Peter Xu Date: Wed Sep 30 21:22:22 2020 -0400 KVM: X86: Implement ring-based dirty memory tracking This patch is heavily based on previous work from Lei Cao and Paolo Bonzini . [1] KVM currently uses large bitmaps to track dirty memory. These bitmaps are copied to userspace when userspace queries KVM for its dirty page information. The use of bitmaps is mostly sufficient for live migration, as large parts of memory are be dirtied from one log-dirty pass to another. However, in a checkpointing system, the number of dirty pages is small and in fact it is often bounded---the VM is paused when it has dirtied a pre-defined number of pages. Traversing a large, sparsely populated bitmap to find set bits is time-consuming, as is copying the bitmap to user-space. A similar issue will be there for live migration when the guest memory is huge while the page dirty procedure is trivial. In that case for each dirty sync we need to pull the whole dirty bitmap to userspace and analyse every bit even if it's mostly zeros. The preferred data structure for above scenarios is a dense list of guest frame numbers (GFN). This patch series stores the dirty list in kernel memory that can be memory mapped into userspace to allow speedy harvesting. This patch enables dirty ring for X86 only. However it should be easily extended to other archs as well. [1] https://patchwork.kernel.org/patch/10471409/ Signed-off-by: Lei Cao Signed-off-by: Paolo Bonzini Signed-off-by: Peter Xu Message-Id: <20201001012222.5767-1-peterx@redhat.com> Signed-off-by: Paolo Bonzini commit 28bd726aa404c0da8fd6852fe69bb4538a103b71 Author: Peter Xu Date: Wed Sep 30 21:20:34 2020 -0400 KVM: Pass in kvm pointer into mark_page_dirty_in_slot() The context will be needed to implement the kvm dirty ring. Signed-off-by: Peter Xu Message-Id: <20201001012044.5151-5-peterx@redhat.com> Signed-off-by: Paolo Bonzini commit 2f5414423ef577e9e8bdb227f32d0abdd34e4274 Author: Paolo Bonzini Date: Fri Nov 6 05:25:09 2020 -0500 KVM: remove kvm_clear_guest_page kvm_clear_guest_page is not used anymore after "KVM: X86: Don't track dirty for KVM_SET_[TSS_ADDR|IDENTITY_MAP_ADDR]", except from kvm_clear_guest. We can just inline it in its sole user. Signed-off-by: Paolo Bonzini commit ff5a983cbb3746d371de2cc95ea7dcfd982b4084 Author: Peter Xu Date: Wed Sep 30 21:20:33 2020 -0400 KVM: X86: Don't track dirty for KVM_SET_[TSS_ADDR|IDENTITY_MAP_ADDR] Originally, we have three code paths that can dirty a page without vcpu context for X86: - init_rmode_identity_map - init_rmode_tss - kvmgt_rw_gpa init_rmode_identity_map and init_rmode_tss will be setup on destination VM no matter what (and the guest cannot even see them), so it does not make sense to track them at all. To do this, allow __x86_set_memory_region() to return the userspace address that just allocated to the caller. Then in both of the functions we directly write to the userspace address instead of calling kvm_write_*() APIs. Another trivial change is that we don't need to explicitly clear the identity page table root in init_rmode_identity_map() because no matter what we'll write to the whole page with 4M huge page entries. Suggested-by: Paolo Bonzini Reviewed-by: Sean Christopherson Signed-off-by: Peter Xu Message-Id: <20201001012044.5151-4-peterx@redhat.com> Signed-off-by: Paolo Bonzini commit 8b460692fee46a47cebd66d70df88dc9aa6d6b8b Author: Vitaly Kuznetsov Date: Tue Sep 29 17:09:44 2020 +0200 KVM: selftests: test KVM_GET_SUPPORTED_HV_CPUID as a system ioctl KVM_GET_SUPPORTED_HV_CPUID is now supported as both vCPU and VM ioctl, test that. Signed-off-by: Vitaly Kuznetsov Message-Id: <20200929150944.1235688-3-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit c21d54f0307ff42a346294899107b570b98c47b5 Author: Vitaly Kuznetsov Date: Tue Sep 29 17:09:43 2020 +0200 KVM: x86: hyper-v: allow KVM_GET_SUPPORTED_HV_CPUID as a system ioctl KVM_GET_SUPPORTED_HV_CPUID is a vCPU ioctl but its output is now independent from vCPU and in some cases VMMs may want to use it as a system ioctl instead. In particular, QEMU doesn CPU feature expansion before any vCPU gets created so KVM_GET_SUPPORTED_HV_CPUID can't be used. Convert KVM_GET_SUPPORTED_HV_CPUID to 'dual' system/vCPU ioctl with the same meaning. Signed-off-by: Vitaly Kuznetsov Message-Id: <20200929150944.1235688-2-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit b59e00dd8cda75fc8303c9f6847ac720b10664e3 Author: David Woodhouse Date: Tue Oct 27 13:55:23 2020 +0000 kvm/eventfd: Drain events from eventfd in irqfd_wakeup() Don't allow the events to accumulate in the eventfd counter, drain them as they are handled. Signed-off-by: David Woodhouse Message-Id: <20201027135523.646811-4-dwmw2@infradead.org> Signed-off-by: Paolo Bonzini commit b1b397aeef8177f4f7bd91a0d5fa708f4752a499 Author: David Woodhouse Date: Tue Oct 27 13:55:22 2020 +0000 vfio/virqfd: Drain events from eventfd in virqfd_wakeup() Don't allow the events to accumulate in the eventfd counter, drain them as they are handled. Signed-off-by: David Woodhouse Message-Id: <20201027135523.646811-3-dwmw2@infradead.org> Signed-off-by: Paolo Bonzini Acked-by: Alex Williamson commit 28f1326710555bbe666f64452d08f2d7dd657cae Author: David Woodhouse Date: Tue Oct 27 13:55:21 2020 +0000 eventfd: Export eventfd_ctx_do_read() Where events are consumed in the kernel, for example by KVM's irqfd_wakeup() and VFIO's virqfd_wakeup(), they currently lack a mechanism to drain the eventfd's counter. Since the wait queue is already locked while the wakeup functions are invoked, all they really need to do is call eventfd_ctx_do_read(). Add a check for the lock, and export it for them. Signed-off-by: David Woodhouse Message-Id: <20201027135523.646811-2-dwmw2@infradead.org> Signed-off-by: Paolo Bonzini commit e8dbf19508a112d125190df77ee0464b7ba56192 Author: David Woodhouse Date: Mon Oct 26 17:53:25 2020 +0000 kvm/eventfd: Use priority waitqueue to catch events before userspace As far as I can tell, when we use posted interrupts we silently cut off the events from userspace, if it's listening on the same eventfd that feeds the irqfd. I like that behaviour. Let's do it all the time, even without posted interrupts. It makes it much easier to handle IRQ remapping invalidation without having to constantly add/remove the fd from the userspace poll set. We can just leave userspace polling on it, and the bypass will... well... bypass it. Signed-off-by: David Woodhouse Message-Id: <20201026175325.585623-2-dwmw2@infradead.org> Signed-off-by: Paolo Bonzini commit c4d51a52c67a1e3a0fa3006e5ec21cdc07649cd6 Author: David Woodhouse Date: Tue Oct 27 14:39:43 2020 +0000 sched/wait: Add add_wait_queue_priority() This allows an exclusive wait_queue_entry to be added at the head of the queue, instead of the tail as normal. Thus, it gets to consume events first without allowing non-exclusive waiters to be woken at all. The (first) intended use is for KVM IRQFD, which currently has inconsistent behaviour depending on whether posted interrupts are available or not. If they are, KVM will bypass the eventfd completely and deliver interrupts directly to the appropriate vCPU. If not, events are delivered through the eventfd and userspace will receive them when polling on the eventfd. By using add_wait_queue_priority(), KVM will be able to consistently consume events within the kernel without accidentally exposing them to userspace when they're supposed to be bypassed. This, in turn, means that userspace doesn't have to jump through hoops to avoid listening on the erroneously noisy eventfd and injecting duplicate interrupts. Signed-off-by: David Woodhouse Message-Id: <20201027143944.648769-2-dwmw2@infradead.org> Signed-off-by: Paolo Bonzini commit bf0cd88ce363a2de3684baaa48d3f194acdc516c Author: Yadong Qi Date: Fri Nov 6 14:51:22 2020 +0800 KVM: x86: emulate wait-for-SIPI and SIPI-VMExit Background: We have a lightweight HV, it needs INIT-VMExit and SIPI-VMExit to wake-up APs for guests since it do not monitor the Local APIC. But currently virtual wait-for-SIPI(WFS) state is not supported in nVMX, so when running on top of KVM, the L1 HV cannot receive the INIT-VMExit and SIPI-VMExit which cause the L2 guest cannot wake up the APs. According to Intel SDM Chapter 25.2 Other Causes of VM Exits, SIPIs cause VM exits when a logical processor is in wait-for-SIPI state. In this patch: 1. introduce SIPI exit reason, 2. introduce wait-for-SIPI state for nVMX, 3. advertise wait-for-SIPI support to guest. When L1 hypervisor is not monitoring Local APIC, L0 need to emulate INIT-VMExit and SIPI-VMExit to L1 to emulate INIT-SIPI-SIPI for L2. L2 LAPIC write would be traped by L0 Hypervisor(KVM), L0 should emulate the INIT/SIPI vmexit to L1 hypervisor to set proper state for L2's vcpu state. Handle procdure: Source vCPU: L2 write LAPIC.ICR(INIT). L0 trap LAPIC.ICR write(INIT): inject a latched INIT event to target vCPU. Target vCPU: L0 emulate an INIT VMExit to L1 if is guest mode. L1 set guest VMCS, guest_activity_state=WAIT_SIPI, vmresume. L0 set vcpu.mp_state to INIT_RECEIVED if (vmcs12.guest_activity_state == WAIT_SIPI). Source vCPU: L2 write LAPIC.ICR(SIPI). L0 trap LAPIC.ICR write(INIT): inject a latched SIPI event to traget vCPU. Target vCPU: L0 emulate an SIPI VMExit to L1 if (vcpu.mp_state == INIT_RECEIVED). L1 set CS:IP, guest_activity_state=ACTIVE, vmresume. L0 resume to L2. L2 start-up. Signed-off-by: Yadong Qi Message-Id: <20200922052343.84388-1-yadong.qi@intel.com> Signed-off-by: Paolo Bonzini Message-Id: <20201106065122.403183-1-yadong.qi@intel.com> Signed-off-by: Paolo Bonzini commit 1c96dcceaeb3a99aaf0d548eef2223e0b02a7e40 Author: Paolo Bonzini Date: Thu Nov 5 11:20:49 2020 -0500 KVM: x86: fix apic_accept_events vs check_nested_events vmx_apic_init_signal_blocked is buggy in that it returns true even in VMX non-root mode. In non-root mode, however, INITs are not latched, they just cause a vmexit. Previously, KVM was waiting for them to be processed when kvm_apic_accept_events and in the meanwhile it ate the SIPIs that the processor received. However, in order to implement the wait-for-SIPI activity state, KVM will have to process KVM_APIC_SIPI in vmx_check_nested_events, and it will not be possible anymore to disregard SIPIs in non-root mode as the code is currently doing. By calling kvm_x86_ops.nested_ops->check_events, we can force a vmexit (with the side-effect of latching INITs) before incorrectly injecting an INIT or SIPI in a guest, and therefore vmx_apic_init_signal_blocked can do the right thing. Signed-off-by: Paolo Bonzini commit 7a873e4555679a0e749422db071c142b57f80be9 Author: Sean Christopherson Date: Tue Oct 6 18:44:17 2020 -0700 KVM: selftests: Verify supported CR4 bits can be set before KVM_SET_CPUID2 Extend the KVM_SET_SREGS test to verify that all supported CR4 bits, as enumerated by KVM, can be set before KVM_SET_CPUID2, i.e. without first defining the vCPU model. KVM is supposed to skip guest CPUID checks when host userspace is stuffing guest state. Check the inverse as well, i.e. that KVM rejects KVM_SET_REGS if CR4 has one or more unsupported bits set. Signed-off-by: Sean Christopherson Message-Id: <20201007014417.29276-7-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit ee69c92bac61f4379e97f40b259a1c1257e5987f Author: Sean Christopherson Date: Tue Oct 6 18:44:16 2020 -0700 KVM: x86: Return bool instead of int for CR4 and SREGS validity checks Rework the common CR4 and SREGS checks to return a bool instead of an int, i.e. true/false instead of 0/-EINVAL, and add "is" to the name to clarify the polarity of the return value (which is effectively inverted by this change). No functional changed intended. Signed-off-by: Sean Christopherson Message-Id: <20201007014417.29276-6-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit c2fe3cd4604ac87c587db05d41843d667dc43815 Author: Sean Christopherson Date: Tue Oct 6 18:44:15 2020 -0700 KVM: x86: Move vendor CR4 validity check to dedicated kvm_x86_ops hook Split out VMX's checks on CR4.VMXE to a dedicated hook, .is_valid_cr4(), and invoke the new hook from kvm_valid_cr4(). This fixes an issue where KVM_SET_SREGS would return success while failing to actually set CR4. Fixing the issue by explicitly checking kvm_x86_ops.set_cr4()'s return in __set_sregs() is not a viable option as KVM has already stuffed a variety of vCPU state. Note, kvm_valid_cr4() and is_valid_cr4() have different return types and inverted semantics. This will be remedied in a future patch. Fixes: 5e1746d6205d ("KVM: nVMX: Allow setting the VMXE bit in CR4") Signed-off-by: Sean Christopherson Message-Id: <20201007014417.29276-5-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 311a06593b9a3944a63ed176b95cb8d857f7c83b Author: Sean Christopherson Date: Tue Oct 6 18:44:14 2020 -0700 KVM: SVM: Drop VMXE check from svm_set_cr4() Drop svm_set_cr4()'s explicit check CR4.VMXE now that common x86 handles the check by incorporating VMXE into the CR4 reserved bits, via kvm_cpu_caps. SVM obviously does not set X86_FEATURE_VMX. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20201007014417.29276-4-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit a447e38a7fadb2e554c3942dda183e55cccd5df0 Author: Sean Christopherson Date: Tue Oct 6 18:44:13 2020 -0700 KVM: VMX: Drop explicit 'nested' check from vmx_set_cr4() Drop vmx_set_cr4()'s explicit check on the 'nested' module param now that common x86 handles the check by incorporating VMXE into the CR4 reserved bits, via kvm_cpu_caps. X86_FEATURE_VMX is set in kvm_cpu_caps (by vmx_set_cpu_caps()), if and only if 'nested' is true. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20201007014417.29276-3-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit d3a9e4146a6f79f19430bca3f2a4d6ebaaffe36b Author: Sean Christopherson Date: Tue Oct 6 18:44:12 2020 -0700 KVM: VMX: Drop guest CPUID check for VMXE in vmx_set_cr4() Drop vmx_set_cr4()'s somewhat hidden guest_cpuid_has() check on VMXE now that common x86 handles the check by incorporating VMXE into the CR4 reserved bits, i.e. in cr4_guest_rsvd_bits. This fixes a bug where KVM incorrectly rejects KVM_SET_SREGS with CR4.VMXE=1 if it's executed before KVM_SET_CPUID{,2}. Fixes: 5e1746d6205d ("KVM: nVMX: Allow setting the VMXE bit in CR4") Reported-by: Stas Sergeev Signed-off-by: Sean Christopherson Message-Id: <20201007014417.29276-2-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit e906a546bd8653ed2e7a14cb300fd17952d7f862 Author: Thomas Gleixner Date: Sat Nov 14 23:36:28 2020 +0100 genirq/irqdomain: Make irq_domain_disassociate() static No users outside of the core code. Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/87a6vja7mb.fsf@nanos.tec.linutronix.de commit c0f5d3873bc806f32584558fc1c8c593758c2967 Author: Łukasz Stelmach Date: Tue Nov 3 19:44:08 2020 +0100 ARM: dts: exynos: Add an alias for the Ethernet interface on Odroid XU3 Add an alias to enable bootloaders to find the Ethernet interface and assign a MAC address. Signed-off-by: Łukasz Stelmach Link: https://lore.kernel.org/r/20201103184412.18874-3-l.stelmach@samsung.com Signed-off-by: Krzysztof Kozlowski commit f949d414fc1a9dfdfc878134629052135bd527db Author: Łukasz Stelmach Date: Tue Nov 3 19:44:07 2020 +0100 ARM: dts: exynos: Fix Ethernet interface description on Odroid XU3 Assign appropriate compatible properties matching real USB vendor and product ID. Signed-off-by: Łukasz Stelmach Link: https://lore.kernel.org/r/20201103184412.18874-2-l.stelmach@samsung.com Signed-off-by: Krzysztof Kozlowski commit 0064c5c1b3bf2a695c772c90e8dea38426a870ff Author: Lev Stipakov Date: Fri Nov 13 23:59:40 2020 +0200 net: xfrm: use core API for updating/providing stats Commit d3fd65484c781 ("net: core: add dev_sw_netstats_tx_add") has added function "dev_sw_netstats_tx_add()" to update net device per-cpu TX stats. Use this function instead of own code. While on it, remove xfrmi_get_stats64() and replace it with dev_get_tstats64(). Signed-off-by: Lev Stipakov Reviewed-by: Heiner Kallweit Link: https://lore.kernel.org/r/20201113215939.147007-1-lev@openvpn.net Signed-off-by: Jakub Kicinski commit 865e6ae02dd77e11989cc1ec3fb5987112871dd5 Author: Lev Stipakov Date: Fri Nov 13 23:53:36 2020 +0200 net: openvswitch: use core API to update/provide stats Commit d3fd65484c781 ("net: core: add dev_sw_netstats_tx_add") has added function "dev_sw_netstats_tx_add()" to update net device per-cpu TX stats. Use this function instead of own code. While on it, remove internal_get_stats() and replace it with dev_get_tstats64(). Signed-off-by: Lev Stipakov Reviewed-by: Heiner Kallweit Link: https://lore.kernel.org/r/20201113215336.145998-1-lev@openvpn.net Signed-off-by: Jakub Kicinski commit cf70b5cfab9c50669325be130089a185458d0957 Merge: 49b1cabffbf93 245f4e44d2d6f Author: Jakub Kicinski Date: Sat Nov 14 16:55:07 2020 -0800 Merge branch 'mlxsw-preparations-for-nexthop-objects-support-part-1-2' Ido Schimmel says: ==================== mlxsw: Preparations for nexthop objects support - part 1/2 This patch set contains small and non-functional changes aimed at making it easier to support nexthop objects in mlxsw. Follow up patches can be found here [1]. Patches #1-#4 add a type field to the nexthop group struct instead of the existing protocol field. This will be used later on to add a nexthop object type, which can contain both IPv4 and IPv6 nexthops. Patches #5-#7 move the IPv4 FIB info pointer (i.e., 'struct fib_info') from the nexthop group struct to the route. The pointer will not be available when the nexthop group is a nexthop object, but it needs to be accessible to routes regardless. Patch #8 is the biggest change, but it is an entirely cosmetic change and should therefore be easy to review. The motivation and the change itself are explained in detail in the commit message. Patches #9-#12 perform small changes so that two functions that are currently split between IPv4 and IPv6 could be consolidated in patches Patch #15 removes an outdated comment. [1] https://github.com/idosch/linux/tree/submit/nexthop_objects ==================== Link: https://lore.kernel.org/r/20201113160559.22148-1-idosch@idosch.org Signed-off-by: Jakub Kicinski commit 245f4e44d2d6f4107274d057f18b14f6efadaff0 Author: Ido Schimmel Date: Fri Nov 13 18:05:59 2020 +0200 mlxsw: spectrum_router: Remove outdated comment Since commit 21151f64a458 ("mlxsw: Add new FIB entry type for reject routes") this comment is no longer correct. Remove it. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit 9ed2b4d28795948303e516edbdd73e4265bdfc73 Author: Ido Schimmel Date: Fri Nov 13 18:05:58 2020 +0200 mlxsw: spectrum_router: Consolidate mlxsw_sp_nexthop{4, 6}_type_fini() The two functions are identical, so consolidate them to mlxsw_sp_nexthop_type_fini(). Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit c181a89a6db0ff8e8d10a572a0395dab688ae533 Author: Ido Schimmel Date: Fri Nov 13 18:05:57 2020 +0200 mlxsw: spectrum_router: Consolidate mlxsw_sp_nexthop{4, 6}_type_init() The two functions are now identical, so consolidate them to mlxsw_sp_nexthop_type_init(). Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit b360952bbfa18f2549c093cd687026c843029bb9 Author: Ido Schimmel Date: Fri Nov 13 18:05:56 2020 +0200 mlxsw: spectrum_router: Remove unused argument from mlxsw_sp_nexthop6_type_init() Remove it as it is unused. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit c3bde5a914bdf7e0db32b98ab02125af736a6b6c Author: Ido Schimmel Date: Fri Nov 13 18:05:55 2020 +0200 mlxsw: spectrum_router: Pass nexthop netdev to mlxsw_sp_nexthop4_type_init() Instead of passing the nexthop and resolving the nexthop netdev from it, pass the nexthop netdev directly. This will later allow us to consolidate code paths between IPv4 and IPv6 code. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit 4dd38da54aa979f41e928ab10656896115697910 Author: Ido Schimmel Date: Fri Nov 13 18:05:54 2020 +0200 mlxsw: spectrum_router: Pass nexthop netdev to mlxsw_sp_nexthop6_type_init() Instead of passing the route and resolving the nexthop netdev from it, pass the nexthop netdev directly. This will later allow us to consolidate code paths between IPv4 and IPv6 code. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit 7ba7bc55cf2dfbf5d53cf8ad9cb8bddfa3ebfc13 Author: Ido Schimmel Date: Fri Nov 13 18:05:53 2020 +0200 mlxsw: spectrum_ipip: Remove overlay protocol from can_offload() callback The overlay protocol (i.e., IPv4/IPv6) that is being encapsulated has no impact on whether a certain IP tunnel can be offloaded or not. Only the underlay protocol matters. Therefore, remove the unused overlay protocol parameter from the callback. This will later allow us to consolidate code paths between IPv4 and IPv6 code. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit 7f7a417e6a11d7dc8528712b1a624381751f26cc Author: Ido Schimmel Date: Fri Nov 13 18:05:52 2020 +0200 mlxsw: spectrum_router: Split nexthop group configuration to a different struct Currently, the individual nexthops member in the group and attributes of the group (e.g., its type) are stored in the same struct (i.e., 'struct mlxsw_sp_nexthop_group'). This is fine since the individual nexthops cannot change during the lifetime of the group. With nexthop objects this is no longer the case. An existing nexthop group can be replaced to use a new set of nexthops. Creating a new struct whenever a group is replaced entails replacing the group pointer of all the routes (i.e., 'struct mlxsw_sp_fib_entry') using the group. Avoid this inefficient step by splitting the nexthop group configuration to a different struct (i.e., 'struct mlxsw_sp_nexthop_group_info'). When a nexthop group is replaced a new group info struct is created and the individual rotues do not need to be touched. Illustration after the change: mlxsw_sp_fib_entry mlxsw_sp_nexthop_group mlxsw_sp_nexthop_group_info +-------------------+ +----------------------+ +---------------------------+ | nh_group; +--> nhgi; +--> | | | | | | | +-------------------+ +----------------------+ +---------------------------+ No functional changes intended. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit 5a49dfe51f2291c19e97ad7fd23cc00c4c1aca26 Author: Ido Schimmel Date: Fri Nov 13 18:05:51 2020 +0200 mlxsw: spectrum_router: Move IPv4 FIB info into a union in nexthop group struct Instead of storing the FIB info as 'priv' when the nexthop group represents an IPv4 nexthop group, simply store it as a FIB info with a proper comment. When nexthop objects are supported, this field will become a union with the nexthop object's identifier. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit 46d5b7b54195c34f9b045b8eb9121a61a35d5277 Author: Ido Schimmel Date: Fri Nov 13 18:05:50 2020 +0200 mlxsw: spectrum_router: Remove unused field 'prio' from IPv4 FIB entry struct Not used anywhere. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit 9ce254d9fbdda66fc60d464bf3ef815bb6585286 Author: Ido Schimmel Date: Fri Nov 13 18:05:49 2020 +0200 mlxsw: spectrum_router: Store FIB info in route When needed, IPv4 routes fetch the FIB info (i.e., 'struct fib_info') from their associated nexthop group. This will not work when the nexthop group represents a nexthop object (i.e., 'struct nexthop'), as it will only have access to the nexthop's identifier. Instead, store the FIB info in the route itself. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit 02d8fdcad7cbaf4b786fbd694b62686ed8d8935b Author: Ido Schimmel Date: Fri Nov 13 18:05:48 2020 +0200 mlxsw: spectrum_router: Associate neighbour table with nexthop instead of group As explained in the previous patch, nexthop objects can have both IPv4 and IPv6 nexthops in the same group. Therefore, move the neighbour table to be a property of the nexthop instead of the nexthop group. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit 1664dd3d5e545fb63a96f30ea71c9cbab066c892 Author: Ido Schimmel Date: Fri Nov 13 18:05:47 2020 +0200 mlxsw: spectrum_router: Use nexthop group type in hash table key Both IPv4 and IPv6 nexthop groups are hashed in the same table. The protocol field is used to indicate how the hash should be computed for each group. When nexthop group objects are supported, the hash will be computed for them based on the nexthop identifier. To differentiate between all the nexthop group types, encode the type of the group in the key instead of the protocol. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit a06191aabbb7f74de2feec346b2fb5cd39c3a51b Author: Ido Schimmel Date: Fri Nov 13 18:05:46 2020 +0200 mlxsw: spectrum_router: Add nexthop group type field Currently, the type (i.e., IPv4/IPv6) of the nexthop group is derived from the neighbour table associated with the group. This is problematic when nexthop objects are taken into account, as a nexthop group object can contain both IPv4 and IPv6 nexthops. Instead, add a new field that indicates the type of the group and initialize it during the group's creation. Currently, the types are IPv4 ('struct fib_info') and IPv6 ('struct fib6_info'). In the future another type will be added for nexthop objects ('struct nexthop'). Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit 10502d055b4e64f043e6c52e59297b6870bdd16d Author: Ido Schimmel Date: Fri Nov 13 18:05:45 2020 +0200 mlxsw: spectrum_router: Compare key with correct object type When comparing a key with a nexthop group in rhastable's obj_cmpfn() callback, make sure that the key and nexthop group are of the same type (i.e., IPv4 / IPv6). The bug is not currently visible because IPv6 nexthop groups do not populate the FIB info pointer and IPv4 nexthop groups do not set the ifindex for the individual nexthops. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit 49b1cabffbf930f2ee77e2834fdd61be2037ab79 Author: Alex Shi Date: Fri Nov 13 11:51:57 2020 +0800 nfc: refined function nci_hci_resp_received We don't use the parameter result actually, so better to remove it and skip a gcc warning for unused variable. Signed-off-by: Alex Shi Link: https://lore.kernel.org/r/1605239517-49707-1-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Jakub Kicinski commit 508c4fc27ba7375803e664a2ef0d4212763462d0 Author: Eric Dumazet Date: Fri Nov 13 03:35:53 2020 -0800 inet: unexport udp{4|6}_lib_lookup_skb() These functions do not need to be exported. Signed-off-by: Eric Dumazet Link: https://lore.kernel.org/r/20201113113553.3411756-1-eric.dumazet@gmail.com Signed-off-by: Jakub Kicinski commit 405ac7fd394c07f57d7cc9b85aec33e1d9b5c24e Merge: ae8cb93286e50 1c5f2ced136a7 Author: Jakub Kicinski Date: Sat Nov 14 16:09:59 2020 -0800 Merge branch 'tcp-avoid-indirect-call-in-__sk_stream_memory_free' Eric Dumazet says: ==================== tcp: avoid indirect call in __sk_stream_memory_free() Small improvement for CONFIG_RETPOLINE=y, when dealing with TCP sockets. ==================== Link: https://lore.kernel.org/r/20201113150809.3443527-1-eric.dumazet@gmail.com Signed-off-by: Jakub Kicinski commit 1c5f2ced136a7196c41ca2c16b8c2646e9b042ce Author: Eric Dumazet Date: Fri Nov 13 07:08:09 2020 -0800 tcp: avoid indirect call to tcp_stream_memory_free() Signed-off-by: Eric Dumazet Signed-off-by: Jakub Kicinski commit d3cd4924e3853aa771c3acf6f3ea3fb2cccdfadd Author: Eric Dumazet Date: Fri Nov 13 07:08:08 2020 -0800 tcp: uninline tcp_stream_memory_free() Both IPv4 and IPv6 needs it via a function pointer. Following patch will avoid the indirect call. Signed-off-by: Eric Dumazet Signed-off-by: Jakub Kicinski commit ae8cb93286e50ece1e45674661cbefcafe8b811c Author: Oliver Herms Date: Fri Nov 13 09:55:17 2020 +0100 IPv4: RTM_GETROUTE: Add RTA_ENCAP to result This patch adds an IPv4 routes encapsulation attribute to the result of netlink RTM_GETROUTE requests (e.g. ip route get 192.0.2.1). Signed-off-by: Oliver Herms Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20201113085517.GA1307262@tws Signed-off-by: Jakub Kicinski commit 767fbb7102c69bedb8dca5a877c4eae4bbf8cf9b Author: Alexandre Belloni Date: Sun Nov 8 23:37:10 2020 +0100 rtc: rv3032: fix nvram nvmem priv pointer The nvmem priv pointer is set to rv3032 but the rv3032_nvram_write and rv3032_nvram_read expect the regmap pointer. Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201108223710.1574331-1-alexandre.belloni@bootlin.com commit 9844484eac2bff09ba3fcdebcf5a41d94df6b6c1 Author: Jiaxun Yang Date: Sat Nov 14 21:09:21 2020 +0800 MAINTAINERS: Set myself as Goldfish RTC maintainer While Goldfish platform is dusted, the RTC driver remains valuable for us. I'm volunteering to maintain goldfish RTC driver onward. Signed-off-by: Jiaxun Yang Signed-off-by: Alexandre Belloni Cc: Miodrag Dinic Link: https://lore.kernel.org/r/20201114130921.651882-3-jiaxun.yang@flygoat.com commit 5022cfc112328e7fd489f5e3d41b7f352322880c Author: Jiaxun Yang Date: Sat Nov 14 21:09:20 2020 +0800 rtc: goldfish: Remove GOLDFISH dependency Goldfish platform is covered with dust. However the goldfish-rtc had been used as virtualized RTC in QEMU for RISC-V virt hw and MIPS loongson3-virt hw, thus we can drop other parts of goldfish but leave goldfish-rtc here. Signed-off-by: Jiaxun Yang Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201114130921.651882-2-jiaxun.yang@flygoat.com commit 081e2500df50c7f330b9346794c6759ea7f8fb81 Author: Xu Wang Date: Fri Nov 13 08:03:05 2020 +0000 rtc: snvs: Remove NULL pointer check before clk_* Because clk_* already checked NULL clock parameter, so the additional checks are unnecessary, just remove them. Signed-off-by: Xu Wang Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201113080305.65961-1-vulab@iscas.ac.cn commit 910d002d84df21da61cadba92dd510ece5e46312 Author: Xu Wang Date: Fri Nov 13 07:45:38 2020 +0000 rtc: brcmstb-waketimer: Remove redundant null check before clk_disable_unprepare Because clk_disable_unprepare() already checked NULL clock parameter, so the additional check is unnecessary, just remove it. Signed-off-by: Xu Wang Signed-off-by: Alexandre Belloni Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20201113074538.65028-1-vulab@iscas.ac.cn commit 1eab0fea2514b269e384c117f5b5772b882761f0 Author: Zheng Liang Date: Thu Nov 12 17:31:39 2020 +0800 rtc: pl031: fix resource leak in pl031_probe When devm_rtc_allocate_device is failed in pl031_probe, it should release mem regions with device. Reported-by: Hulk Robot Signed-off-by: Zheng Liang Signed-off-by: Alexandre Belloni Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20201112093139.32566-1-zhengliang6@huawei.com commit bc06cfc1c41e3b60b159132e5bba4c059a2e7f83 Author: Tian Tao Date: Tue Nov 10 17:35:47 2020 +0800 rtc: cpcap: Fix missing IRQF_ONESHOT as only threaded handler Coccinelle noticed: drivers/rtc/rtc-cpcap.c:271:7-32: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT drivers/rtc/rtc-cpcap.c:287:7-32: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT Signed-off-by: Tian Tao Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/1605000947-32882-1-git-send-email-tiantao6@hisilicon.com commit c56ac7a0f468ceb38d24db41f4446d98ab94da2d Author: Guillaume Tucker Date: Fri Nov 6 09:06:31 2020 +0000 rtc: hym8563: enable wakeup when applicable Enable wakeup in the hym8563 driver if the IRQ was successfully requested or if wakeup-source is set in the devicetree. As per the description of device_init_wakeup(), it should be enabled for "devices that everyone expects to be wakeup sources". One would expect this to be the case with a real-time clock. Tested on rk3288-rock2-square, which has an IRQ configured for the RTC. As a result, wakeup was enabled during driver initialisation. Fixes: dcaf03849352 ("rtc: add hym8563 rtc-driver") Reported-by: kernelci.org bot Signed-off-by: Guillaume Tucker Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/1ea023e2ba50a4dab6e39be93d7de3146af71a60.1604653374.git.guillaume.tucker@collabora.com commit a48c6224ae07bed02893c58073ca2942acb5c3d5 Author: Kaixu Xia Date: Fri Nov 6 16:00:37 2020 +0800 rtc: da9063: Simplify bool comparison Fix the following coccicheck warning: ./drivers/rtc/rtc-da9063.c:246:5-18: WARNING: Comparison to bool Reported-by: Tosk Robot Signed-off-by: Kaixu Xia Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/1604649637-1014-1-git-send-email-kaixuxia@tencent.com commit 825156a5eeded9bcb55e9c36d4b4b72bf20bcba6 Author: Kaixu Xia Date: Fri Nov 6 15:30:54 2020 +0800 rtc: sc27xx: Remove unnecessary conversion to bool Here we could use the '!=' expression to fix the following coccicheck warning: ./drivers/rtc/rtc-sc27xx.c:566:50-55: WARNING: conversion to bool not needed here Reported-by: Tosk Robot Signed-off-by: Kaixu Xia Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/1604647854-876-1-git-send-email-kaixuxia@tencent.com commit f296dcd629aa412a80a53215e46087f53af87f08 Author: Thomas Gleixner Date: Sat Nov 14 22:01:45 2020 +0100 genirq: Remove GENERIC_IRQ_LEGACY_ALLOC_HWIRQ Commit bb9d812643d8 ("arch: remove tile port") removed the last user of this cruft two years ago... Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/87eekvac06.fsf@nanos.tec.linutronix.de commit 2d38c5802f4626e85d280b68481c3f3ca4853ecb Merge: 9e6cad531c9de 7c8d008cc0685 Author: Jakub Kicinski Date: Sat Nov 14 13:23:01 2020 -0800 Merge branch 'ionic-updates' Shannon Nelson says: ==================== ionic updates These updates are a bit of code cleaning and a minor bit of performance tweaking. v3: convert ionic_lif_quiesce() to void v2: added void cast on call to ionic_lif_quiesce() lowered batching threshold added patch to flatten calls to ionic_lif_rx_mode added patch to change from_ndo to can_sleep ==================== Link: https://lore.kernel.org/r/20201112182208.46770-1-snelson@pensando.io Signed-off-by: Jakub Kicinski commit 7c8d008cc0685b4a66d4d1f4470bb1c3fbd6c710 Author: Shannon Nelson Date: Thu Nov 12 10:22:08 2020 -0800 ionic: useful names for booleans With a few more uses of true and false in function calls, we need to give them some useful names so we can tell from the calling point what we're doing. Signed-off-by: Shannon Nelson Reviewed-by: Saeed Mahameed Signed-off-by: Jakub Kicinski commit 81dbc24147f9250c186ae5875b3ed3136e9e293b Author: Shannon Nelson Date: Thu Nov 12 10:22:07 2020 -0800 ionic: change set_rx_mode from_ndo to can_sleep Instead of having two different ways of expressing the same sleepability concept, using opposite logic, we can rework the from_ndo to can_sleep for a more consistent usage. Fixes: 1800eee16676 ("net: ionic: Replace in_interrupt() usage.") Signed-off-by: Shannon Nelson Reviewed-by: Saeed Mahameed Signed-off-by: Jakub Kicinski commit e94f76bb206333efcd0c02da5dbb142518c941a2 Author: Shannon Nelson Date: Thu Nov 12 10:22:06 2020 -0800 ionic: flatten calls to ionic_lif_rx_mode The _ionic_lif_rx_mode() is only used once and really doesn't need to be broken out. Signed-off-by: Shannon Nelson Reviewed-by: Saeed Mahameed Signed-off-by: Jakub Kicinski commit e0243e1966592859da4c6ffe6d43e1576ec3c457 Author: Shannon Nelson Date: Thu Nov 12 10:22:05 2020 -0800 ionic: use mc sync for multicast filters We should be using the multicast sync routines for the multicast filters. Also, let's just flatten the logic a bit and pull the small unicast routine back into ionic_set_rx_mode(). Fixes: 1800eee16676 ("net: ionic: Replace in_interrupt() usage.") Signed-off-by: Shannon Nelson Reviewed-by: Saeed Mahameed Signed-off-by: Jakub Kicinski commit a8205ab6208f79bc767ebdf26d79e661219996e8 Author: Shannon Nelson Date: Thu Nov 12 10:22:04 2020 -0800 ionic: batch rx buffer refilling We don't need to refill the rx descriptors on every napi if only a few were handled. Waiting until we can batch up a few together will save us a few Rx cycles. Signed-off-by: Shannon Nelson Reviewed-by: Saeed Mahameed Signed-off-by: Jakub Kicinski commit e7e8e087acde0890eb7829c03c5bdcf24c469bed Author: Shannon Nelson Date: Thu Nov 12 10:22:03 2020 -0800 ionic: add lif quiesce After the queues are stopped, expressly quiesce the lif. This assures that even if the queues were in an odd state, the firmware will close up everything cleanly. Signed-off-by: Shannon Nelson Reviewed-by: Saeed Mahameed Signed-off-by: Jakub Kicinski commit f6e428b27ee3a33692bb263685655adf61d0c9c0 Author: Shannon Nelson Date: Thu Nov 12 10:22:02 2020 -0800 ionic: check for link after netdev registration Request a link check as soon as the netdev is registered rather than waiting for the watchdog to go off in order to get the interface operational a little more quickly. Signed-off-by: Shannon Nelson Reviewed-by: Saeed Mahameed Signed-off-by: Jakub Kicinski commit 8f56bc4dc1011be6e2a53198b615fdc588b4ef6a Author: Shannon Nelson Date: Thu Nov 12 10:22:01 2020 -0800 ionic: start queues before announcing link up Change the order of operations in the link_up handling to be sure that the queues are up and ready before we announce that the link is up. Signed-off-by: Shannon Nelson Reviewed-by: Saeed Mahameed Signed-off-by: Jakub Kicinski commit 3105c7c91feb176f8b918ebe13abd520f7651834 Author: Dmitry Baryshkov Date: Fri Oct 23 16:19:25 2020 +0300 clk: qcom: dispcc-sm8250: handle MMCX power domain On SM8250 MMCX power domain is required to access MMDS_GDSC registers. This power domain is expressed as mmcx-supply regulator property. Use this regulator as MDSS_GDSC supply. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20201023131925.334864-6-dmitry.baryshkov@linaro.org Signed-off-by: Stephen Boyd commit e6fb7aee486c7fbd4d94f4894feaa6f0424c1740 Author: Jerome Brunet Date: Wed Oct 21 18:38:47 2020 +0200 clk: meson: g12: use devm variant to register notifiers Until now, nothing was done to unregister the dvfs clock notifiers of the Amlogic g12 SoC family. This is not great but this driver was not really expected to be unloaded. With the ongoing effort to build everything as module for this platform, this needs to be cleanly handled. Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20201021163847.595189-3-jbrunet@baylibre.com Signed-off-by: Stephen Boyd commit 6d30d50d037dfa092f9d5d1fffa348ab4abb7163 Author: Jerome Brunet Date: Wed Oct 21 18:38:46 2020 +0200 clk: add devm variant of clk_notifier_register Add a memory managed variant of clk_notifier_register() to make life easier on clock consumers using notifiers Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20201021163847.595189-2-jbrunet@baylibre.com Signed-off-by: Stephen Boyd commit 8e677e7f0aa3b01c501a9a48a04a34173380ccfd Author: Jerome Brunet Date: Wed Oct 21 18:21:47 2020 +0200 clk: meson: g12: drop use of __clk_lookup() g12 clock controller used __clk_lookup() to get struct clk from a struct clk_hw. This type of hack is no longer required as CCF now provides the necessary functions to get this. Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20201021162147.563655-4-jbrunet@baylibre.com Tested-by: Kevin Hilman Signed-off-by: Stephen Boyd commit 30d6f8c15d2cd877c1f3d47d8a1064649ebe58e2 Author: Jerome Brunet Date: Wed Oct 21 18:21:46 2020 +0200 clk: add api to get clk consumer from clk_hw clk_register() is deprecated. Using 'clk' member of struct clk_hw is discouraged. With this constraint, it is difficult for driver to register clocks using the clk_hw API and then use the clock with the consumer API This adds a simple helper, clk_hw_get_clk(), to get a struct clk from a struct clk_hw. Like other clk_get() variant, each call to this helper must be balanced with a call to clk_put(). To make life easier on the consumers, a memory managed version is provided as well. Cc: Martin Blumenstingl Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20201021162147.563655-3-jbrunet@baylibre.com Tested-by: Kevin Hilman [sboyd@kernel.org: Fix kernel-doc] Signed-off-by: Stephen Boyd commit e5a4b9b99e5b70a41578e78d30349315772add1b Author: Jerome Brunet Date: Wed Oct 21 18:21:45 2020 +0200 clk: avoid devm_clk_release name clash In clk-devres.c, devm_clk_release() is used to call clk_put() memory managed clock. In clk.c the same name, in a different scope is used to call clk_unregister(). As it stands, it is not really a problem but it does not readability, especially if we need to call clk_put() on managed clock in clk.c Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20201021162147.563655-2-jbrunet@baylibre.com Tested-by: Kevin Hilman Signed-off-by: Stephen Boyd commit 9e6cad531c9de1ba39334fca535af0da5fdf8770 Author: YueHaibing Date: Thu Nov 12 22:49:36 2020 +0800 net: macb: Fix passing zero to 'PTR_ERR' Check PTR_ERR with IS_ERR to fix this. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20201112144936.54776-1-yuehaibing@huawei.com Signed-off-by: Jakub Kicinski commit 6a17849703581f11b499da8e1d6a2941b9e738dd Author: Lukas Bulwahn Date: Fri Nov 6 10:48:20 2020 +0100 clk: remove unneeded dead-store initialization make clang-analyzer on x86_64 defconfig caught my attention with: drivers/clk/clk.c:423:19: warning: Value stored to 'parent' during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct clk_core *parent = ERR_PTR(-ENOENT); ^ Commit fc0c209c147f ("clk: Allow parents to be specified without string names") introduced clk_core_fill_parent_index() with this unneeded dead-store initialization. So, simply remove this unneeded dead-store initialization to make clang-analyzer happy. As compilers will detect this unneeded assignment and optimize this anyway, the resulting object code is identical before and after this change. No functional change. No change to object code. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20201106094820.30167-1-lukas.bulwahn@gmail.com Reviewed-by: Nathan Chancellor Signed-off-by: Stephen Boyd commit 2e793878aece73260f56e84b62e62ef066a0e1fb Author: Lukas Bulwahn Date: Fri Nov 13 14:50:12 2020 +0100 ipv6: remove unused function ipv6_skb_idev() Commit bdb7cc643fc9 ("ipv6: Count interface receive statistics on the ingress netdev") removed all callees for ipv6_skb_idev(). Hence, since then, ipv6_skb_idev() is unused and make CC=clang W=1 warns: net/ipv6/exthdrs.c:909:33: warning: unused function 'ipv6_skb_idev' [-Wunused-function] So, remove this unused function and a -Wunused-function warning. Signed-off-by: Lukas Bulwahn Reviewed-by: Nathan Chancellor Link: https://lore.kernel.org/r/20201113135012.32499-1-lukas.bulwahn@gmail.com Signed-off-by: Jakub Kicinski commit 5933baa36e267e480bec59a752579c7581b0b2f5 Author: Caleb Connolly Date: Thu Nov 12 16:21:13 2020 +0000 drm/panel/samsung-sofef00: Add panel for OnePlus 6/T devices The OnePlus 6/T devices use different panels however they are functionally identical with the only differences being the resolution. The panels also don't seem to be used by any other devices, just combine them into one driver. The panels are: samsung,sofef00 and samsung,s6e3fc2x01 Signed-off-by: Caleb Connolly Signed-off-by: Sam Ravnborg [fixed checkpatch warnings] Link: https://patchwork.freedesktop.org/patch/msgid/20201112161920.2671430-2-caleb@connolly.tech commit b81cfdd6d2b48eda56432e5246cc78fe0c8a1720 Author: Caleb Connolly Date: Thu Nov 12 16:21:30 2020 +0000 dt-bindings: panel-simple-dsi: add samsung panels for OnePlus 6/T Add compatibles for the samsung,sofef00 and samsung,s6e3fc2x01 panels used in the OnePlus 6 & 6T respectively. Signed-off-by: Caleb Connolly Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201112161920.2671430-3-caleb@connolly.tech commit 8d4025943e13010d753935e37ad085fca4906e6c Author: Stephen Boyd Date: Sat Nov 14 09:44:08 2020 -0800 clk: qcom: camcc-sc7180: Use runtime PM ops instead of clk ones Let's call pm_runtime_get() here instead of calling the PM clk APIs directly. This avoids a compilation problem on CONFIG_PM=n where the pm_clk_runtime_{resume,suspend}() functions don't exist and covers the intent, i.e. enable the clks for this device so we can program PLL settings. Reported-by: Randy Dunlap Reported-by: Geert Uytterhoeven Cc: Nathan Chancellor Cc: Stephen Rothwell Cc: Taniya Das Cc: "Rafael J. Wysocki" Acked-by: Randy Dunlap # build-tested Fixes: 15d09e830bbc ("clk: qcom: camcc: Add camera clock controller driver for SC7180") Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20201114174408.579047-1-sboyd@kernel.org commit 8214e3a1a4ee1e2e5693c3364db3b6864d8a304e Author: Lee Jones Date: Fri Nov 13 13:49:11 2020 +0000 drm/panel/panel-tpo-tpg110: Correct misnaming and supply missing param description Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/panel/panel-tpo-tpg110.c:94: warning: Function parameter or member 'panel_mode' not described in 'tpg110' drivers/gpu/drm/panel/panel-tpo-tpg110.c:372: warning: Function parameter or member 'connector' not described in 'tpg110_get_modes' Cc: Linus Walleij Cc: Thierry Reding Cc: Sam Ravnborg Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201113134938.4004947-14-lee.jones@linaro.org commit e78acf7efebff9184ad4add02b62a1f486a8cde8 Author: Andres Freund Date: Fri Nov 13 12:49:16 2020 -0800 thermal: intel_pch_thermal: Add PCI ids for Lewisburg PCH. I noticed that I couldn't read the PCH temperature on my workstation (C620 series chipset, w/ 2x Xeon Gold 5215 CPUs) directly, but had to go through IPMI. Looking at the data sheet, it looks to me like the existing intel PCH thermal driver should work without changes for Lewisburg. I suspect there's some other PCI IDs missing. But I hope somebody at Intel would have an easier time figuring that out than I... Cc: Daniel Lezcano Cc: Srinivas Pandruvada Cc: Tushar Dave Cc: Zhang Rui Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/lkml/20200115184415.1726953-1-andres@anarazel.de/ Signed-off-by: Andres Freund Reviewed-by: Pandruvada, Srinivas Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201113204916.1144907-1-andres@anarazel.de commit 07cbce2e466cabb46b7c2317bd456584aa4ceacc Merge: 774626fa440e4 c14d61fca0d10 Author: Jakub Kicinski Date: Sat Nov 14 09:13:40 2020 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== pull-request: bpf-next 2020-11-14 1) Add BTF generation for kernel modules and extend BTF infra in kernel e.g. support for split BTF loading and validation, from Andrii Nakryiko. 2) Support for pointers beyond pkt_end to recognize LLVM generated patterns on inlined branch conditions, from Alexei Starovoitov. 3) Implements bpf_local_storage for task_struct for BPF LSM, from KP Singh. 4) Enable FENTRY/FEXIT/RAW_TP tracing program to use the bpf_sk_storage infra, from Martin KaFai Lau. 5) Add XDP bulk APIs that introduce a defer/flush mechanism to optimize the XDP_REDIRECT path, from Lorenzo Bianconi. 6) Fix a potential (although rather theoretical) deadlock of hashtab in NMI context, from Song Liu. 7) Fixes for cross and out-of-tree build of bpftool and runqslower allowing build for different target archs on same source tree, from Jean-Philippe Brucker. 8) Fix error path in htab_map_alloc() triggered from syzbot, from Eric Dumazet. 9) Move functionality from test_tcpbpf_user into the test_progs framework so it can run in BPF CI, from Alexander Duyck. 10) Lift hashtab key_size limit to be larger than MAX_BPF_STACK, from Florian Lehner. Note that for the fix from Song we have seen a sparse report on context imbalance which requires changes in sparse itself for proper annotation detection where this is currently being discussed on linux-sparse among developers [0]. Once we have more clarification/guidance after their fix, Song will follow-up. [0] https://lore.kernel.org/linux-sparse/CAHk-=wh4bx8A8dHnX612MsDO13st6uzAz1mJ1PaHHVevJx_ZCw@mail.gmail.com/T/ https://lore.kernel.org/linux-sparse/20201109221345.uklbp3lzgq6g42zb@ltop.local/T/ * git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (66 commits) net: mlx5: Add xdp tx return bulking support net: mvpp2: Add xdp tx return bulking support net: mvneta: Add xdp tx return bulking support net: page_pool: Add bulk support for ptr_ring net: xdp: Introduce bulking for xdp tx return path bpf: Expose bpf_d_path helper to sleepable LSM hooks bpf: Augment the set of sleepable LSM hooks bpf: selftest: Use bpf_sk_storage in FENTRY/FEXIT/RAW_TP bpf: Allow using bpf_sk_storage in FENTRY/FEXIT/RAW_TP bpf: Rename some functions in bpf_sk_storage bpf: Folding omem_charge() into sk_storage_charge() selftests/bpf: Add asm tests for pkt vs pkt_end comparison. selftests/bpf: Add skb_pkt_end test bpf: Support for pointers beyond pkt_end. tools/bpf: Always run the *-clean recipes tools/bpf: Add bootstrap/ to .gitignore bpf: Fix NULL dereference in bpf_task_storage tools/bpftool: Fix build slowdown tools/runqslower: Build bpftool using HOSTCC tools/runqslower: Enable out-of-tree build ... ==================== Link: https://lore.kernel.org/r/20201114020819.29584-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit e4accab4e0b069bd4ddc1ac769a77b989bb9ed1c Author: Dan Carpenter Date: Fri Nov 13 13:14:19 2020 +0300 clk: qcom: lpass-sc7180: Clean up on error in lpass_sc7180_init() Clean up the first driver if the second driver can't be registered. Fixes: 4ee9fe3e292b ("clk: qcom: lpass-sc7180: Disentangle the two clock devices") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20201113101419.GC168908@mwanda Reviewed-by: Douglas Anderson Signed-off-by: Stephen Boyd commit 24b284984e2d14aedc11b2f0211660df54e3b338 Author: Alexandru Ardelean Date: Fri Nov 13 11:16:48 2020 +0200 iio: adc: ad7887: convert probe to device-managed functions This is conversion of the driver to use device-managed functions. The IIO registration and triggered buffer setup both have device-managed versions. The regulator disable needs to be handled via an action_or_reset handler. With these changes, the remove hook is removed, and the error path is cleaned up in probe. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201113091648.148589-1-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 89d1f72570027aa9724f00454f51885e27221413 Author: Fabrice Gasnier Date: Fri Nov 6 17:57:26 2020 +0100 iio: adc: stm32-adc: adapt clock duty cycle for proper operation For proper operation, STM32 ADC should be used with a clock duty cycle of 50%, in the range of 49% to 51%. Depending on the clock tree, divider can be used in case clock duty cycle is out of this range. In case clk_get_scaled_duty_cycle() returns an error, kindly apply a divider by default (don't make the probe fail). Signed-off-by: Fabrice Gasnier Link: https://lore.kernel.org/r/1604681846-31234-1-git-send-email-fabrice.gasnier@st.com Signed-off-by: Jonathan Cameron commit 8dedcc3eee3aceb37832176f0a1b03d5687acda3 Author: Alexandru Ardelean Date: Thu Sep 24 11:41:55 2020 +0300 iio: core: centralize ioctl() calls to the main chardev The aim of this is to improve a bit the organization of ioctl() calls in IIO core. Currently the chardev is split across IIO core sub-modules/files. The main chardev has to be able to handle ioctl() calls, and if we need to add buffer ioctl() calls, this would complicate things. The 'industrialio-core.c' file will provide a 'iio_device_ioctl()' which will iterate over a list of ioctls registered with the IIO device. These can be event ioctl() or buffer ioctl() calls, or something else. Each ioctl() handler will have to return a IIO_IOCTL_UNHANDLED code (which is positive 1), if the ioctl() did not handle the call in any. This eliminates any potential ambiguities about negative error codes, which should fail the call altogether. If any ioctl() returns 0, it was considered that it was serviced successfully and the loop will exit. This change also moves the handling of the IIO_GET_EVENT_FD_IOCTL command inside 'industrialio-event.c', where this is better suited. This patch is a combination of 2 other patches from an older series: Patch 1: iio: core: add simple centralized mechanism for ioctl() handlers Link: https://lore.kernel.org/linux-iio/20200427131100.50845-6-alexandru.ardelean@analog.com/ Patch 2: iio: core: use new common ioctl() mechanism Link: https://lore.kernel.org/linux-iio/20200427131100.50845-7-alexandru.ardelean@analog.com/ Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20200924084155.99406-1-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 50f3d4129e7217bc89d2af9a685e4f52a76c588e Author: Simon Ser Date: Wed Nov 11 09:07:39 2020 +0000 drm: add debug logs for drm_mode_atomic_ioctl errors Be nice to user-space and log what happened when returning EINVAL in drm_mode_atomic_ioctl. v2: - Migrate to drm_dbg_atomic (Sam) - Add debug log for arg->reserved (Ville) - Drop redundant "atomic" word in log messages (Ville) Signed-off-by: Simon Ser Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: Ville Syrjala Reviewed-by: Sam Ravnborg Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/AVFi5ZzKwRVLtY8AQyxvqgIbcUfVgNebOtGVwSNMKvs@cp4-web-038.plabs.ch commit e3aae683e861a987d3d7dca593aaff93ac001bcb Author: Simon Ser Date: Wed Nov 11 09:07:36 2020 +0000 drm: convert drm_atomic_uapi.c to new debug helpers Migrate from DRM_DEBUG_ATOMIC to drm_dbg_atomic. Signed-off-by: Simon Ser Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: Ville Syrjala Reviewed-by: Sam Ravnborg Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/FpVdsmqIh7IkH7YIwBjmp5ict1qi4NZlwHrIps@cp4-web-034.plabs.ch commit 56c62080d5b57dac2c2cdd4a83571450e38ca763 Author: Sebastian Andrzej Siewior Date: Fri Nov 13 22:27:04 2020 +0100 usb: hcd.h: Remove RUN_CONTEXT The last user of RUN_CONTEXT was removed in commit 97c17beb3b668 ("[PATCH] ehci-hcd (1/2): portability (2.4), tasklet,") in the history.git repo. There are no users of RUN_CONTEXT, remove it. Signed-off-by: Sebastian Andrzej Siewior Link: https://lore.kernel.org/r/20201113212704.2243807-1-bigeasy@linutronix.de Signed-off-by: Greg Kroah-Hartman commit 65cdb4a214c0015c19fc1876896746c05396f45d Author: Alex Shi Date: Fri Nov 13 16:58:13 2020 +0800 configfs: fix kernel-doc markup issue Add explanation for 'frag' parameter to avoid kernel-doc issue: fs/configfs/dir.c:277: warning: Function parameter or member 'frag' not described in 'configfs_create_dir' Signed-off-by: Alex Shi Cc: Joel Becker Cc: Christoph Hellwig Cc: linux-kernel@vger.kernel.org Signed-off-by: Christoph Hellwig commit decbaf182d8f3a0c83be7c60d27026b5abc04c42 Author: kernel test robot Date: Wed Nov 11 17:25:59 2020 +0800 auxdisplay: fix platform_no_drv_owner.cocci warnings drivers/auxdisplay/lcd2s.c:373:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Fixes: 8c9108d014c5 ("auxdisplay: add a driver for lcd2s character display") CC: Lars Poeschel Reported-by: kernel test robot Signed-off-by: kernel test robot Signed-off-by: Miguel Ojeda commit be323a4cef022aa9685b08d5a94ddc841ccf617a Author: Ben Skeggs Date: Thu Nov 12 12:29:43 2020 +1000 drm/nouveau/ttm: avoid using nouveau_drm.ttm.type_vram prior to nv50 Pre-NV50 chipsets don't currently use the MMU subsystem that later chipsets use, and type_vram is negative here, leading to an OOB memory access. This was previously guarded by a chipset check, restore that. Reported-by: Thomas Zimmermann Fixes: 5839172f0980 ("drm/nouveau: explicitly specify caching to use") Signed-off-by: Ben Skeggs Reviewed-by: Michael J. Ruhl Reviewed-by: Christian König commit 774626fa440e4c01bcbe5213cd5220dea545c9f7 Author: Steen Hegelund Date: Thu Nov 12 10:22:50 2020 +0100 net: phy: mscc: Add PTP support for 2 more VSC PHYs Add VSC8572 and VSC8574 in the PTP configuration as they also support PTP. The relevant datasheets can be found here: - VSC8572: https://www.microchip.com/wwwproducts/en/VSC8572 - VSC8574: https://www.microchip.com/wwwproducts/en/VSC8574 Signed-off-by: Steen Hegelund Link: https://lore.kernel.org/r/20201112092250.914079-1-steen.hegelund@microchip.com Signed-off-by: Jakub Kicinski commit c14d61fca0d10498bf267c0ab1f381dd0b35d96b Merge: 6f100640ca5b2 b87c57ae12dbe Author: Daniel Borkmann Date: Sat Nov 14 02:29:00 2020 +0100 Merge branch 'xdp-redirect-bulk' Lorenzo Bianconi says: ==================== XDP bulk APIs introduce a defer/flush mechanism to return pages belonging to the same xdp_mem_allocator object (identified via the mem.id field) in bulk to optimize I-cache and D-cache since xdp_return_frame is usually run inside the driver NAPI tx completion loop. Convert mvneta, mvpp2 and mlx5 drivers to xdp_return_frame_bulk APIs. More details on benchmarks run on mlx5 can be found here: https://github.com/xdp-project/xdp-project/blob/master/areas/mem/xdp_bulk_return01.org Changes since v5: - do not keep looping over ptr_ring if the cache is full but release leftover pages running page_pool_return_page Changes since v4: - fix comments - introduce xdp_frame_bulk_init utility routine - compiler annotations for I-cache code layout - move rcu_read_lock outside fast-path - mlx5 xdp bulking code optimization Changes since v3: - align DEV_MAP_BULK_SIZE to XDP_BULK_QUEUE_SIZE - refactor page_pool_put_page_bulk to avoid code duplication Changes since v2: - move mvneta changes in a dedicated patch Changes since v1: - improve comments - rework xdp_return_frame_bulk routine logic - move count and xa fields at the beginning of xdp_frame_bulk struct - invert logic in page_pool_put_page_bulk for loop ==================== Signed-off-by: Daniel Borkmann Acked-by: Jesper Dangaard Brouer commit b87c57ae12dbecd50471b437e09e3f7dc916d8bc Author: Lorenzo Bianconi Date: Fri Nov 13 12:48:32 2020 +0100 net: mlx5: Add xdp tx return bulking support Convert mlx5 driver to xdp_return_frame_bulk APIs. XDP_REDIRECT (upstream codepath): 8.9Mpps XDP_REDIRECT (upstream codepath + bulking APIs): 10.2Mpps Co-developed-by: Jesper Dangaard Brouer Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Lorenzo Bianconi Signed-off-by: Daniel Borkmann Tested-by: Jesper Dangaard Brouer Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/250460319fd868b7b5668fc1deca74dd42813a90.1605267335.git.lorenzo@kernel.org commit dbef19ccde5d83dd16646532f091b54a67c73cd1 Author: Lorenzo Bianconi Date: Fri Nov 13 12:48:31 2020 +0100 net: mvpp2: Add xdp tx return bulking support Convert mvpp2 driver to xdp_return_frame_bulk APIs. XDP_REDIRECT (upstream codepath): 1.79Mpps XDP_REDIRECT (upstream codepath + bulking APIs): 1.93Mpps Co-developed-by: Jesper Dangaard Brouer Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Lorenzo Bianconi Signed-off-by: Daniel Borkmann Tested-by: Matteo Croce Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/0b38c295e58e8ce251ef6b4e2187a2f457f9f7a3.1605267335.git.lorenzo@kernel.org commit 2f9d09394d138be99050ad9eabe4d3ff13f79da4 Author: Lorenzo Bianconi Date: Fri Nov 13 12:48:30 2020 +0100 net: mvneta: Add xdp tx return bulking support Convert mvneta driver to xdp_return_frame_bulk APIs. XDP_REDIRECT (upstream codepath): 275Kpps XDP_REDIRECT (upstream codepath + bulking APIs): 284Kpps Co-developed-by: Jesper Dangaard Brouer Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Lorenzo Bianconi Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/9af8014006d022fc0fec78cdaa71beb56999750d.1605267335.git.lorenzo@kernel.org commit 7886244736a4dbb49987f330772842130493e050 Author: Lorenzo Bianconi Date: Fri Nov 13 12:48:29 2020 +0100 net: page_pool: Add bulk support for ptr_ring Introduce the capability to batch page_pool ptr_ring refill since it is usually run inside the driver NAPI tx completion loop. Suggested-by: Jesper Dangaard Brouer Co-developed-by: Jesper Dangaard Brouer Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Lorenzo Bianconi Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Acked-by: Ilias Apalodimas Link: https://lore.kernel.org/bpf/08dd249c9522c001313f520796faa777c4089e1c.1605267335.git.lorenzo@kernel.org commit 8965398713d831f6b893805880c249e62e9059ae Author: Lorenzo Bianconi Date: Fri Nov 13 12:48:28 2020 +0100 net: xdp: Introduce bulking for xdp tx return path XDP bulk APIs introduce a defer/flush mechanism to return pages belonging to the same xdp_mem_allocator object (identified via the mem.id field) in bulk to optimize I-cache and D-cache since xdp_return_frame is usually run inside the driver NAPI tx completion loop. The bulk queue size is set to 16 to be aligned to how XDP_REDIRECT bulking works. The bulk is flushed when it is full or when mem.id changes. xdp_frame_bulk is usually stored/allocated on the function call-stack to avoid locking penalties. Current implementation considers only page_pool memory model. Suggested-by: Jesper Dangaard Brouer Co-developed-by: Jesper Dangaard Brouer Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Lorenzo Bianconi Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Acked-by: Ilias Apalodimas Link: https://lore.kernel.org/bpf/e190c03eac71b20c8407ae0fc2c399eda7835f49.1605267335.git.lorenzo@kernel.org commit bb3222f71b57caa2ba80db2dce4677f84ba4bd37 Author: Jisheng Zhang Date: Thu Nov 12 09:27:37 2020 +0800 net: stmmac: platform: use optional clk/reset get APIs Use the devm_reset_control_get_optional() and devm_clk_get_optional() rather than open coding them. Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20201112092606.5173aa6f@xhacker.debian Signed-off-by: Jakub Kicinski commit ca1ab89cd2d654661f559bd83ad9fc7323cb6c86 Author: Heiner Kallweit Date: Wed Nov 11 22:56:29 2020 +0100 r8169: improve rtl_tx We can simplify the for() condition and eliminate variable tx_left. The change also considers that tp->cur_tx may be incremented by a racing rtl8169_start_xmit(). In addition replace the write to tp->dirty_tx and the following smp_mb() with an equivalent call to smp_store_mb(). This implicitly adds a WRITE_ONCE() to the write. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/c2e19e5e-3d3f-d663-af32-13c3374f5def@gmail.com Signed-off-by: Jakub Kicinski commit 95f3c5458dfa5856bb110e31d156e00d894d0134 Author: Heiner Kallweit Date: Wed Nov 11 22:14:27 2020 +0100 r8169: use READ_ONCE in rtl_tx_slots_avail tp->dirty_tx and tp->cur_tx may be changed by a racing rtl_tx() or rtl8169_start_xmit(). Use READ_ONCE() to annotate the races and ensure that the compiler doesn't use cached values. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/5676fee3-f6b4-84f2-eba5-c64949a371ad@gmail.com Signed-off-by: Jakub Kicinski commit 932f8c64d38bb08f69c8c26a2216ba0c36c6daa8 Author: Lukas Bulwahn Date: Fri Nov 13 18:20:12 2020 +0100 futex: Remove unused empty compat_exit_robust_list() Commit ba31c1a48538 ("futex: Move futex exit handling into futex code") introduced compat_exit_robust_list() with a full-fledged implementation for CONFIG_COMPAT, and an empty-body function for !CONFIG_COMPAT. However, compat_exit_robust_list() is only used in futex_mm_release() under #ifdef CONFIG_COMPAT. Hence for !CONFIG_COMPAT, make CC=clang W=1 warns: kernel/futex.c:314:20: warning: unused function 'compat_exit_robust_list' [-Wunused-function] There is no need to declare the unused empty function for !CONFIG_COMPAT. Simply remove it. Signed-off-by: Lukas Bulwahn Signed-off-by: Thomas Gleixner Reviewed-by: Nathan Chancellor Link: https://lore.kernel.org/r/20201113172012.27221-1-lukas.bulwahn@gmail.com commit 2caf08e757ef7a396cf496eecd7730dceec2dd35 Merge: 992c75ae2f30f 0a5096ec2a350 Author: Jakub Kicinski Date: Fri Nov 13 15:37:10 2020 -0800 Merge branch 'net-ipa-two-fixes' Alex Elder says: ==================== net: ipa: two fixes This small series makes two fixes to the IPA code: - While reviewing something else I found that one of the resource limits on the SDM845 used the wrong value. The first patch fixes this. The correct value allocates more resources of this type for IPA to use, and otherwise does not change behavior. - When the IPA-resident microcontroller starts up it generates an event, which triggers an AP interrupt. The event merely provides some information for logging, which we don't support. We already ignore the event, and that's harmless. So this patch explicitly ignores it rather than issuing a warning when it occurs. ==================== Link: https://lore.kernel.org/r/20201112121157.19784-1-elder@linaro.org Signed-off-by: Jakub Kicinski commit 0a5096ec2a3501bd468853153a8129bb682e4f09 Author: Alex Elder Date: Thu Nov 12 06:20:00 2020 -0600 net: ipa: ignore the microcontroller log event The IPA-resident microcontroller has the ability to log various activity in an area of IPA shared memory. When the microcontroller starts it generates an event to the AP to provide information about the log. We don't support reading this log, and we can safely ignore the event. So do that rather than treating the log info event we receive as "unsupported." Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 3ce6da1b2e476c14ff56086fb689429832e14977 Author: Alex Elder Date: Thu Nov 12 06:11:56 2020 -0600 net: ipa: fix source packet contexts limit I have discovered that the maximum number of source packet contexts configured for SDM845 is incorrect. Fix this error. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 992c75ae2f30f8f4e3d105e61116b3bbc7cbc67a Merge: 72ac50b206768 c5122cf584128 Author: Jakub Kicinski Date: Fri Nov 13 15:33:37 2020 -0800 Merge branch 'sfc-further-ef100-encap-tso-features' Edward Cree says: ==================== sfc: further EF100 encap TSO features This series adds support for GRE and GRE_CSUM TSO on EF100 NICs, as well as improving the handling of UDP tunnel TSO. ==================== Link: https://lore.kernel.org/r/eda2de73-edf2-8b92-edb9-099ebda09ebc@solarflare.com Signed-off-by: Jakub Kicinski commit c5122cf584128f9d42655189e69fda7151c1f275 Author: Edward Cree Date: Thu Nov 12 15:20:05 2020 +0000 sfc: support GRE TSO on EF100 We can treat SKB_GSO_GRE almost exactly the same as UDP tunnels, except that we don't want to edit the outer UDP len (as there isn't one). For SKB_GSO_GRE_CSUM, we have to use GSO_PARTIAL as the device doesn't support offload of non-UDP outer L4 checksums. Signed-off-by: Edward Cree Signed-off-by: Jakub Kicinski Acked-by: Martin Habets Reviewed-by: Alexander Duyck commit 42bfd69a9fdd84b6b99324e745c4817878bbe0b7 Author: Edward Cree Date: Thu Nov 12 15:19:47 2020 +0000 sfc: correctly support non-partial GSO_UDP_TUNNEL_CSUM on EF100 By asking the HW for the correct edits, we can make UDP tunnel TSO work without needing GSO_PARTIAL. So don't specify it in our netdev->gso_partial_features. However, retain GSO_PARTIAL support, as this will be used for other protocols later. Signed-off-by: Edward Cree Signed-off-by: Jakub Kicinski Acked-by: Martin Habets Reviewed-by: Alexander Duyck commit dc8d2512e697f1f4d07b4722a5ca3b1bc84759e2 Author: Edward Cree Date: Thu Nov 12 15:19:26 2020 +0000 sfc: extend bitfield macros to 19 fields Our TSO descriptors got even more fussy. Signed-off-by: Edward Cree Signed-off-by: Jakub Kicinski Acked-by: Martin Habets Reviewed-by: Alexander Duyck commit e7018751d2e603381ae6028ba4dd21ec45ce38bb Author: Fabio Estevam Date: Fri Nov 13 14:12:31 2020 -0300 usb: host: ehci-mxc: Remove the driver The ehci-mxc driver was only used by i.MX non-DT platforms. Since 5.10-rc1, i.MX has been converted to a DT-only platform and all board files are gone. Remove the ehci-mxc driver as there are no more users at all. Acked-by: Alan Stern Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20201113171231.2205-1-festevam@gmail.com Signed-off-by: Greg Kroah-Hartman commit ef84928cff589c6b42e16b3ef7d2d95469128c80 Author: Alexandru Ardelean Date: Wed Nov 11 13:38:28 2020 +0200 uio/uio_pci_generic: use device-managed function equivalents This driver can be easily converted to use the device-managed allocator function and the PCI managed enable function. With these conversions the probe error paths are no longer needed and neither is the remove function. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201111113828.64992-1-alexandru.ardelean@analog.com Signed-off-by: Greg Kroah-Hartman commit 667aef00f3f32eb10b959cb7f3bbd28e87049a4f Author: Jonathan Neuschäfer Date: Sat Nov 7 14:33:35 2020 +0100 eeprom: at25: Add example part numbers To save the interested reader some time, add examples of AT25 part numbers that correspond to EEPROMs rather than flashes. Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20201107133337.1066271-1-j.neuschaefer@gmx.net Signed-off-by: Greg Kroah-Hartman commit 60aa8782d2bf93379beffc0525e0e7496d578851 Author: Wang Qing Date: Sat Nov 7 16:19:39 2020 +0800 firmware: fix spelling typo of 'wtih' wtih -> with Acked-by: Nicolas Saenz Julienne Signed-off-by: Wang Qing Link: https://lore.kernel.org/r/1604737181-14464-1-git-send-email-wangqing@vivo.com Signed-off-by: Greg Kroah-Hartman commit b2ab5e8697ef6591aeeda23be49e096705dbbda3 Author: Rafał Miłecki Date: Fri Nov 13 10:50:12 2020 +0100 ARM: dts: BCM5301X: Enable USB 3 PHY on Luxul XWR-3150 This device has a functional USB 3 port so PHY is required. Signed-off-by: Rafał Miłecki Reported-by: kernel test robot Signed-off-by: Florian Fainelli commit 72ac50b2067688ddf2a1a9efb634554a818364d8 Merge: 2f51e5758d61d 4730ab1c1d271 Author: Jakub Kicinski Date: Fri Nov 13 15:13:45 2020 -0800 Merge branch 'net-ipa-gsi-register-consolidation' Alex Elder says: ==================== net: ipa: GSI register consolidation This series rearranges and consolidates some GSI register definitions. Its general aim is to make things more consistent, by: - Using enumerated types to define the values held in GSI register fields - Defining field values in "gsi_reg.h", together with the definition of the register (and field) that holds them - Format enumerated type members consistently, with hexidecimal numeric values, and assignments aligned on the same column There is one checkpatch "CHECK" warning requesting a blank line; I ignored that because my intention was to group certain definitions. ==================== Link: https://lore.kernel.org/r/20201110215922.23514-1-elder@linaro.org Signed-off-by: Jakub Kicinski commit 4730ab1c1d2719be997e5d1a791ad4b169e8a30b Author: Alex Elder Date: Tue Nov 10 15:59:22 2020 -0600 net: ipa: use enumerated types for GSI field values Replace constants defined with an "_FVAL" suffix with values defined in enumerated types, to be consistent with other usage in the driver. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit cec2076e432e9c41856e5c0672210fbbe011b2ad Author: Alex Elder Date: Tue Nov 10 15:59:21 2020 -0600 net: ipa: move GSI command opcode values into "gsi_reg.h" The gsi_ch_cmd_opcode, gsi_evt_cmd_opcode, and gsi_generic_cmd_opcode enumerated types are values that fields in the GSI command registers can take on. Move their definitions out of "gsi.c" and into "gsi_reg.h", alongside the definition of registers they are associated with. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 7b0ac8f65116aff11965a46c3329ad375d1c53ec Author: Alex Elder Date: Tue Nov 10 15:59:20 2020 -0600 net: ipa: move GSI error values into "gsi_reg.h" The gsi_err_code and gsi_err_type enumerated types are values that fields in the GSI ERROR_LOG register can take on. Move their definitions out of "gsi.c" and into "gsi_reg.h", alongside the definition of the ERROR_LOG register offset and field symbols. Drop the "_ERR" suffix in the names of the gsi_err_code members. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 9ed8c2a92d0140fbb99ddca510760f7ea7ec77ec Author: Alex Elder Date: Tue Nov 10 15:59:19 2020 -0600 net: ipa: move channel type values into "gsi_reg.h" The gsi_channel_type enumerated type define values used for the channel type/protocol for event rings and channels. Move its definition out of "gsi.c" and into "gsi_reg.h", alongside the definition of the CH_C_CNTXT_0 register offset and its fields. Add a comment near the definition of the EV_CH_E_CNTXT_0 register indicating this type is used for its EV_CHTYPE field. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 46dda53ef7de2910e57e66bb1131298a073f779e Author: Alex Elder Date: Tue Nov 10 15:59:18 2020 -0600 net: ipa: use common value for channel type and protocol The numeric values that represent the event ring channel type are identical to the values that represent the matching protocol used for a channel. Use a new gsi_channel_type enumerated type to represent the values programmed for both cases, using "CHANNEL_TYPE" in member names in place of "EVT_CHTYPE" and "CHANNEL_PROTOCOL". Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 6c6358cca6fd62c596acb713ff1cc25646ce0cd4 Author: Alex Elder Date: Tue Nov 10 15:59:17 2020 -0600 net: ipa: define GSI interrupt types with enums Define the GSI global interrupt types with an enumerated type whose values are the bit positions representing the global interrupt types. Similarly, define the GSI general interrupt types with an enumerated type whose values are the bit positions of general interrupt types. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 632ddf978565378e7efb9ea77c0ba239ea66bfdc Author: Rafał Miłecki Date: Fri Nov 13 11:09:19 2020 +0100 ARM: dts: BCM5301X: Disable USB 3 PHY on devices without USB 3 It seems pointless to have it enabled. Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli commit 1331e6304f5d924a8dee18064f56f13c890cb009 Author: Bas Nieuwenhuizen Date: Wed Nov 11 03:48:40 2020 +0100 drm/amd/display: Extract 3rd plane from metadata Now that we actually expose the right number of planes we get problems with modifier aware libva if we use an unsupported modifier. So this ensures that we as much as possible use a modifier that radeonsi can actually render to without going to extreme difficulty to synchronize an extra DCC metadata plane with implicit sync. Looking into the opaque metadata isn't ideal but this converts to something mainly for the purpose of the userspace driver and falls back properly if it isn't what we expect. Reviewed-by: Alex Deucher Signed-off-by: Bas Nieuwenhuizen Signed-off-by: Alex Deucher commit 816853f9dc4057b6c7ee3c45ca9bd5905649092e Author: Bas Nieuwenhuizen Date: Wed Nov 11 03:48:39 2020 +0100 drm/amd/display: Set new format info for converted metadata. If we use DCC modifiers this can increase the number of planes from the initial 1 plane with metadata, so that we get a valid modifier from getfb2. Since the code didn't update the format_info getfb2 would only ever return 1 plane with a modifier for which userspace expects > 1. This moves the format lookup to amdgpu_display.c so we do not have issues when DC is not compiled. Reviewed-by: Alex Deucher Signed-off-by: Bas Nieuwenhuizen Signed-off-by: Alex Deucher commit 3505b2ff53cdb5bda3d28bc21867deb7f78cdc96 Author: Bas Nieuwenhuizen Date: Wed Nov 11 03:48:38 2020 +0100 drm/amd/display: Store gem objects for planes 1-3 Also do the proper validation which was missed. Besides the missing validation, not storing the objects in the framebuffer led to wrong results in the getfb2 ioctl. Note that this should really have been done for multi-plane formats like NV12 already before modifiers landed. Reviewed-by: Alex Deucher Signed-off-by: Bas Nieuwenhuizen Signed-off-by: Alex Deucher commit 544645f2ec1af910284ebde00da2a6cfab7cc8c1 Author: Simon Ser Date: Fri Nov 13 17:21:35 2020 +0000 drm/fourcc: add table describing AMD modifiers bit layout The table describes how each bit in the u64 value is used. Explicitly state which values a field can take if we have defines for them. Also add a note when a field isn't always populated. Forcing people to update the table when changing the bit layout should make it more obvious when there's a mistake, I hope. If we get to the point where the bit layout gets more complicated, it might be worth it to split the table into multiple tables (e.g. one for GFX8, one for GFX9+, and so on). Signed-off-by: Simon Ser Cc: Bas Nieuwenhuizen Cc: Alex Deucher Cc: Daniel Vetter Signed-off-by: Alex Deucher commit b7397bad74db7bd380b8eee9f1d97bbfe42bdd23 Author: Bas Nieuwenhuizen Date: Fri Nov 13 18:55:33 2020 +0100 drm/fourcc: Fix modifier field mask for AMD modifiers. The DCC_MAX_COMPRESSED_BLOCK has to contain one of AMD_FMT_MOD_DCC_BLOCK_* and with 3 values this doesn't fit in 1 bit. Fix this cleanly while it is only in drm-next. Fixes: 8ba16d599374 ("drm/fourcc: Add AMD DRM modifiers.") Reviewed-by: Alex Deucher Signed-off-by: Bas Nieuwenhuizen Signed-off-by: Alex Deucher commit 52f6f16d4fe4dd6624c7d6555ba0bd95930e0a1a Author: Alex Deucher Date: Fri Nov 13 02:21:19 2020 -0500 drm/amd/display: Add missing pflip irq for dcn2.0 If we have more than 4 displays we will run into dummy irq calls or flip timout issues. Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit b3d65296545249eeea88b5906327d715837cc32f Author: Lee Jones Date: Fri Nov 13 13:49:38 2020 +0000 drm/amd/amdgpu/gfx_v7_0: Remove unused struct definition Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:5211:45: warning: ‘gfx_v7_0_ip_block’ defined but not used [-Wunused-const-variable=] Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 048df826e869c219c035f28c22ff7c4da4075fc8 Author: Lee Jones Date: Fri Nov 13 13:49:35 2020 +0000 drm/amd/amdgpu/smu_v11_0_i2c: Provide descriptions for 'control' and 'data' params Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c:225: warning: Function parameter or member 'control' not described in 'smu_v11_0_i2c_transmit' drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c:325: warning: Function parameter or member 'control' not described in 'smu_v11_0_i2c_receive' drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c:325: warning: Function parameter or member 'data' not described in 'smu_v11_0_i2c_receive' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 0507a6173227d50ef6d3cdc68940a967faac4d9f Author: Lee Jones Date: Fri Nov 13 13:49:34 2020 +0000 drm/amd/amdgpu/amdgpu_fw_attestation: Consume our own header containing prototypes Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_fw_attestation.c:130:6: warning: no previous prototype for ‘amdgpu_fw_attestation_debugfs_init’ [-Wmissing-prototypes] Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Hawking Zhang Cc: John Clements Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit dc370a67148a09dbc77f5b736ada265979bc602e Author: Lee Jones Date: Fri Nov 13 13:49:29 2020 +0000 drm/amd/amdgpu/amdgpu_vm_sdma: Fix 'amdgpu_vm_sdma_prepare()'s doc-rot Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c:63: warning: Function parameter or member 'resv' not described in 'amdgpu_vm_sdma_prepare' drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c:63: warning: Function parameter or member 'sync_mode' not described in 'amdgpu_vm_sdma_prepare' drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c:63: warning: Excess function parameter 'owner' description in 'amdgpu_vm_sdma_prepare' drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c:63: warning: Excess function parameter 'exclusive' description in 'amdgpu_vm_sdma_prepare' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 7eff65d6c59c49271c7eb2118016e9e3feea536e Author: Lee Jones Date: Fri Nov 13 13:49:28 2020 +0000 drm/amd/amdgpu/amdgpu_vm_cpu: Fix 'amdgpu_vm_cpu_prepare()'s doc-rot Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c:50: warning: Function parameter or member 'resv' not described in 'amdgpu_vm_cpu_prepare' drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c:50: warning: Function parameter or member 'sync_mode' not described in 'amdgpu_vm_cpu_prepare' drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c:50: warning: Excess function parameter 'owner' description in 'amdgpu_vm_cpu_prepare' drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c:50: warning: Excess function parameter 'exclusive' description in 'amdgpu_vm_cpu_prepare' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: Felix Kuehling Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit cd92df935065a9832fbe6779e7594779dac92fec Author: Lee Jones Date: Fri Nov 13 13:49:26 2020 +0000 drm/amd/amdgpu/amdgpu_ras: Make local function 'amdgpu_ras_error_status_query' static Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:1482:6: warning: no previous prototype for ‘amdgpu_ras_error_status_query’ [-Wmissing-prototypes] Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 32dc53480a8af5bd8b42cce697d3154382411c87 Author: Lee Jones Date: Fri Nov 13 13:49:25 2020 +0000 drm/amd/amdgpu/amdgpu_ras: Remove unused function 'amdgpu_ras_error_cure' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:908:5: warning: no previous prototype for ‘amdgpu_ras_error_cure’ [-Wmissing-prototypes] Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit ff08711cfb957c7f0b5c0f9726cef437727a6ed9 Author: Lee Jones Date: Fri Nov 13 13:49:24 2020 +0000 drm/amd/amdgpu/amdgpu_gmc: Demote one and fix another function header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c:69: warning: Function parameter or member 'bo' not described in 'amdgpu_gmc_pd_addr' drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c:121: warning: Function parameter or member 'bo' not described in 'amdgpu_gmc_agp_addr' drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c:121: warning: Excess function parameter 'tbo' description in 'amdgpu_gmc_agp_addr' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 20ed491bbb792bc86aadbbcc568c6072c0008d1e Author: Lee Jones Date: Fri Nov 13 13:49:23 2020 +0000 drm/amd/amdgpu/amdgpu_debugfs: Demote obvious abuse of kernel-doc formatting Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:308: warning: Function parameter or member 'f' not described in 'amdgpu_debugfs_regs_read' drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:308: warning: Function parameter or member 'buf' not described in 'amdgpu_debugfs_regs_read' drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:308: warning: Function parameter or member 'size' not described in 'amdgpu_debugfs_regs_read' drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:308: warning: Function parameter or member 'pos' not described in 'amdgpu_debugfs_regs_read' drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:317: warning: Function parameter or member 'f' not described in 'amdgpu_debugfs_regs_write' drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:317: warning: Function parameter or member 'buf' not described in 'amdgpu_debugfs_regs_write' drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:317: warning: Function parameter or member 'size' not described in 'amdgpu_debugfs_regs_write' drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:317: warning: Function parameter or member 'pos' not described in 'amdgpu_debugfs_regs_write' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 8ebc6df6a78dbd4e68172787d248b4dda299a267 Author: Lee Jones Date: Fri Nov 13 13:49:22 2020 +0000 drm/amd/amdgpu/amdgpu_ids: Supply missing docs for 'id' and 'vmhub' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c:271: warning: Function parameter or member 'id' not described in 'amdgpu_vmid_grab_reserved' drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c:523: warning: Function parameter or member 'vmhub' not described in 'amdgpu_vmid_reset' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: Felix Kuehling Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 793c8571338739ed26c43d736e9ff29d457b647b Author: Lee Jones Date: Fri Nov 13 13:49:20 2020 +0000 drm/amd/amdgpu/amdgpu_sched: Consume our own header containing prototypes Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c:35:5: warning: no previous prototype for ‘amdgpu_to_sched_priority’ [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c:122:5: warning: no previous prototype for ‘amdgpu_sched_ioctl’ [-Wmissing-prototypes] Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Luben Tuikov Cc: Andres Rodriguez Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 29d6a1631e5502f2f4a28c2f2a40ddfcd81a5bcb Author: Lee Jones Date: Fri Nov 13 13:49:27 2020 +0000 drm/amd/amdgpu/amdgpu_csa: Remove set but unused variable 'r' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c: In function ‘amdgpu_allocate_static_csa’: drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c:40:6: warning: variable ‘r’ set but not used [-Wunused-but-set-variable] Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Monk.liu@amd.com Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 05ed830e49a8cb8a20e9e6044376beb6c2dd7d72 Author: Lee Jones Date: Fri Nov 13 13:49:19 2020 +0000 drm/amd/amdgpu/amdgpu_virt: Make local function 'amdgpu_virt_update_vf2pf_work_item()' static Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c:560:6: warning: no previous prototype for ‘amdgpu_virt_update_vf2pf_work_item’ [-Wmissing-prototypes] Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 2c8645b7a6974b33744b677e9ddc89650776af46 Author: Lee Jones Date: Fri Nov 13 13:49:17 2020 +0000 drm/amd/amdgpu/amdgpu_vram_mgr: Add missing descriptions for 'dev' and 'dir' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:648: warning: Function parameter or member 'dev' not described in 'amdgpu_vram_mgr_free_sgt' drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:648: warning: Function parameter or member 'dir' not described in 'amdgpu_vram_mgr_free_sgt' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 1b4940bc796cdbfb20a33aafe8f3432615811017 Author: Lee Jones Date: Fri Nov 13 13:49:14 2020 +0000 drm/amd/amdgpu/amdgpu_sync: Fix misnamed, missing and extra param descriptions Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c:86: warning: Function parameter or member 'f' not described in 'amdgpu_sync_get_owner' drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c:86: warning: Excess function parameter 'fence' description in 'amdgpu_sync_get_owner' drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c:182: warning: Excess function parameter 'adev' description in 'amdgpu_sync_vm_fence' drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c:203: warning: Function parameter or member 'adev' not described in 'amdgpu_sync_resv' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: Felix Kuehling Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 211880a6036327e701a5316534e1c86fe748911a Author: Lee Jones Date: Fri Nov 13 13:49:09 2020 +0000 drm/amd/amdgpu/amdgpu_pll: Fix kernel-doc formatting, missing and extra params Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_pll.c:121: warning: Function parameter or member 'freq' not described in 'amdgpu_pll_compute' drivers/gpu/drm/amd/amdgpu/amdgpu_pll.c:121: warning: Function parameter or member 'fb_div_p' not described in 'amdgpu_pll_compute' drivers/gpu/drm/amd/amdgpu/amdgpu_pll.c:121: warning: Function parameter or member 'frac_fb_div_p' not described in 'amdgpu_pll_compute' drivers/gpu/drm/amd/amdgpu/amdgpu_pll.c:121: warning: Function parameter or member 'ref_div_p' not described in 'amdgpu_pll_compute' drivers/gpu/drm/amd/amdgpu/amdgpu_pll.c:121: warning: Function parameter or member 'post_div_p' not described in 'amdgpu_pll_compute' drivers/gpu/drm/amd/amdgpu/amdgpu_pll.c:317: warning: Excess function parameter 'encoder' description in 'amdgpu_pll_get_shared_nondp_ppll' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit ad8eb024c8721a1056c979a3f4cf62003f6c0fb4 Author: Lee Jones Date: Fri Nov 13 13:49:06 2020 +0000 drm/amd/amdgpu/amdgpu_ib: Fix some incorrect/incomplete function documentation Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c:66: warning: Function parameter or member 'adev' not described in 'amdgpu_ib_get' drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c:66: warning: Function parameter or member 'vm' not described in 'amdgpu_ib_get' drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c:66: warning: Function parameter or member 'pool_type' not described in 'amdgpu_ib_get' drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c:66: warning: Excess function parameter 'ring' description in 'amdgpu_ib_get' drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c:125: warning: Function parameter or member 'ring' not described in 'amdgpu_ib_schedule' drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c:125: warning: Function parameter or member 'job' not described in 'amdgpu_ib_schedule' drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c:125: warning: Excess function parameter 'adev' description in 'amdgpu_ib_schedule' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 80854e83d71a1b8148e14679b7537dad3b6b6910 Author: Lee Jones Date: Fri Nov 13 13:49:03 2020 +0000 drm/amd/amdgpu/amdgpu_ring: Fix misnaming of param 'max_dw' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:168: warning: Function parameter or member 'max_dw' not described in 'amdgpu_ring_init' drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:168: warning: Excess function parameter 'max_ndw' description in 'amdgpu_ring_init' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit f631eae5259b86de9c0da331647a1d0905c22ce0 Author: Lee Jones Date: Fri Nov 13 13:49:01 2020 +0000 drm/amd/display/dc/core/dc_link_ddc: Move DP_DVI_CONVERTER_ID_{4, 5} to where they're used This patch fixes >200 warnings. Fixes the following W=1 kernel build warning(s): from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:31: drivers/gpu/drm/amd/amdgpu/../display/include/ddc_service_types.h:126:22: warning: ‘DP_DVI_CONVERTER_ID_5’ defined but not used [-Wunused-const-variable=] 126 | static const uint8_t DP_DVI_CONVERTER_ID_5[] = "3393N2"; | ^~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/include/ddc_service_types.h:125:22: warning: ‘DP_DVI_CONVERTER_ID_4’ defined but not used [-Wunused-const-variable=] 125 | static const uint8_t DP_DVI_CONVERTER_ID_4[] = "m2DVIa"; | ^~~~~~~~~~~~~~~~~~~~~ Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 8dfcb24e40e4f2b2502007116e1d22294dbce026 Author: Lee Jones Date: Fri Nov 13 13:49:00 2020 +0000 drm/amd/display/dc/core/dc_link_dp: Move DP_VGA_LVDS_CONVERTER_ID_{2, 3} to where they're used This patch fixes >200 warnings. Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/include/ddc_service_types.h:123:22: warning: ‘DP_VGA_LVDS_CONVERTER_ID_3’ defined but not used [-Wunused-const-variable=] 123 | static const uint8_t DP_VGA_LVDS_CONVERTER_ID_3[] = "dnomlA"; | ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/include/ddc_service_types.h:121:22: warning: ‘DP_VGA_LVDS_CONVERTER_ID_2’ defined but not used [-Wunused-const-variable=] 121 | static const uint8_t DP_VGA_LVDS_CONVERTER_ID_2[] = "sivarT"; NB: Repeated ~100 times - snipped for brevity Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 1b98bc5dea3e56760e1debb889d6e3aeeaa6c8af Author: Lee Jones Date: Fri Nov 13 13:48:59 2020 +0000 drm/amd/include/vega10_ip_offset: Mark _BASE structs as __maybe_unused This patch fixes nearly 400 warnings! These structures are too widely used in too many varying configurations to be split-up into different headers or moved into source files. Instead, we'll mark them as __maybe_unused which tells the compiler that we're aware they're being included into source files which do not make use of them - but we've looked into it, and it's okay. Let's tidy-up whilst were here. Just alignment stuff. Fixes the following W=1 kernel build warning(s): In file included from drivers/gpu/drm/amd/amdgpu/navi14_reg_init.c:27: drivers/gpu/drm/amd/amdgpu/../include/navi14_ip_offset.h:179:29: warning: ‘USB0_BASE’ defined but not used [-Wunused-const-variable=] 179 | static const struct IP_BASE USB0_BASE ={ { { { 0x0242A800, 0x05B00000, 0, 0, 0 } }, | ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/navi14_ip_offset.h:172:29: warning: ‘UMC_BASE’ defined but not used [-Wunused-const-variable=] 172 | static const struct IP_BASE UMC_BASE ={ { { { 0x00014000, 0x02425800, 0, 0, 0 } }, | ^~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/navi14_ip_offset.h:151:29: warning: ‘SDMA_BASE’ defined but not used [-Wunused-const-variable=] 151 | static const struct IP_BASE SDMA_BASE ={ { { { 0x00001260, 0x0000A000, 0x02402C00, 0, 0 } }, | ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/navi14_ip_offset.h:144:29: warning: ‘PCIE0_BASE’ defined but not used [-Wunused-const-variable=] 144 | static const struct IP_BASE PCIE0_BASE ={ { { { 0x00000000, 0x00000014, 0x00000D20, 0x00010400, 0x0241B000 } }, | ^~~~~~~~~~ NB: Snipped for brevity Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 1a3089565e45af66b995d5fcfb4cca87aff68c7a Author: Alex Deucher Date: Tue Nov 10 18:25:01 2020 -0500 drm/amdgpu/display: fix FP handling in DCN30 Adjust the FP handling to avoid nested calls. The nested calls cause the warning below WARNING: CPU: 3 PID: 384 at arch/x86/kernel/fpu/core.c:129 kernel_fpu_begin Fixes: 582e2ce5b4ece3 ("drm/amdgpu/display: FP fixes for DCN3.x (v4)") Signed-off-by: Alex Deucher Signed-off-by: Bhawanpreet Lakha Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 2bdb83026a629905f08892a4da73e3dac2f6843c Author: Bhawanpreet Lakha Date: Wed Nov 11 17:55:49 2020 -0500 drm/amdgpu: Enable TA firmware loading for dimgrey_cavefish Signed-off-by: Bhawanpreet Lakha Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 6cb445e8030f65235e05e7e9a88c87933c718bb3 Author: Bhawanpreet Lakha Date: Wed Nov 11 17:55:24 2020 -0500 drm/amdgpu: Use PSP_FW_NAME_LEN instead of magic number Signed-off-by: Bhawanpreet Lakha Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit c4cb773c702be5519442c8375a6476d08fe2cb46 Author: Hanjun Guo Date: Fri Nov 13 11:11:14 2020 +0800 drm/amdkfd: Put ACPI table after using it The acpi_get_table() should be coupled with acpi_put_table() if the mapped table is not used at runtime to release the table mapping which can prevent the memory leak. In kfd_create_crat_image_acpi(), crat_table is copied to pcrat_image, and in kfd_create_vcrat_image_cpu(), the acpi_table is only used to get the OEM information, so those two table mappings need to be released after using it. Fixes: 174de876d6d0 ("drm/amdkfd: Group up CRAT related functions") Fixes: 520b8fb755cc ("drm/amdkfd: Add topology support for CPUs") Signed-off-by: Hanjun Guo Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 1cb027950adcc23ce020e2839eef45edf0b51bd0 Author: Hanjun Guo Date: Fri Nov 13 11:11:13 2020 +0800 drm/amdkfd: Move the ignore_crat check before the CRAT table get If the ignore_crat is set to non-zero value, it's no point getting the CRAT table, so just move the ignore_crat check before we get the CRAT table. Signed-off-by: Hanjun Guo Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 7a4894072f892ff485ee421076345369d33762ee Author: Tao Zhou Date: Fri Nov 13 14:46:50 2020 +0800 drm/amd/pm: update driver if version for dimgrey_cavefish Per PMFW 59.13.0. Signed-off-by: Tao Zhou Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit 1c990e7801f0c003d27a56a4ac9f42d6d95e48e8 Author: Hawking Zhang Date: Fri Nov 13 17:21:14 2020 +0800 drm/amdgpu: declare smuio callback function as static fix -Wmissing-protoypes warning Signed-off-by: Hawking Zhang Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit 8279bb4ec78568a34c4102e723df170b49fb7c33 Author: Prike Liang Date: Tue Oct 20 15:58:30 2020 +0800 drm/amd/pm: add gfx_state_change_set() for rn gfx power switch (v2) The gfx_state_change_set() funtion can support set GFX power change status to D0/D3. v2: make sure to register callback (Alex) Signed-off-by: Prike Liang Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 628c36d7b238e2d72158e8aba229ec79c69c157e Author: Prike Liang Date: Wed Sep 9 14:40:24 2020 +0800 drm/amdgpu: update amdgpu device suspend/resume sequence for s0i3 support - Need skip the RLC/CP/GFX disable for let GFXOFF enter during suspend period. - For s0i3 suspend only need suspend DCE and each IP interrupt. - Before VBIOS POSTed check and atom HW INT need set the GPU power status change to D0 in the resume period, otherwise the HW will be mess up and see the SDMA hang. - Need handle the GPU reset path during amdgpu device suspend. Signed-off-by: Prike Liang Reviewed-by: Alex Deucher Acked-by: Huang Rui Signed-off-by: Alex Deucher commit d90a53d65ad207d8eb73445fc4ceef461a98f861 Author: Prike Liang Date: Wed Sep 9 11:08:00 2020 +0800 drm/amdgpu: add amdgpu_gfx_state_change_set() set gfx power change entry (v2) The new amdgpu_gfx_state_change_set() funtion can support set GFX power change status to D0/D3. v2: squash in warning fix (Alex) Signed-off-by: Prike Liang Acked-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 4cd078dc654d7ead65746fba04b06e5ab7e97bff Author: Prike Liang Date: Wed Sep 9 10:55:39 2020 +0800 drm/amdgpu: add s0i3 capacity check for s0i3 routine (v2) add amdgpu_acpi_is_s0ix_supported() to check the platform whether support s0i3. v2: fix empty function parameters warning (void) Signed-off-by: Prike Liang Reviewed-by: Alex Deucher Acked-by: Huang Rui Signed-off-by: Alex Deucher commit 99d56196a700718d3110513a96b29d8400a0f82e Author: Bailu Lin Date: Thu Oct 29 21:05:41 2020 -0700 Documentation: Chinese translation of Documentation/arm64/perf.rst This is a Chinese translated version of Documentation/arm64/perf.rst Signed-off-by: Bailu Lin Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/20201030040541.8733-1-bailu.lin@vivo.com Signed-off-by: Jonathan Corbet commit 2f51e5758d61d37e517b809051048c6d0118ab41 Author: Wenlin Kang Date: Thu Nov 12 17:34:42 2020 +0800 tipc: fix -Wstringop-truncation warnings Replace strncpy() with strscpy(), fixes the following warning: In function 'bearer_name_validate', inlined from 'tipc_enable_bearer' at net/tipc/bearer.c:246:7: net/tipc/bearer.c:141:2: warning: 'strncpy' specified bound 32 equals destination size [-Wstringop-truncation] strncpy(name_copy, name, TIPC_MAX_BEARER_NAME); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Wenlin Kang Acked-by: Ying Xue Link: https://lore.kernel.org/r/20201112093442.8132-1-wenlin.kang@windriver.com Signed-off-by: Jakub Kicinski commit ae5b17e464146ddb8fee744fa2150922d6072916 Author: Andy Shevchenko Date: Mon Nov 2 19:06:37 2020 +0200 scripts: kernel-doc: Restore anonymous enum parsing The commit d38c8cfb0571 ("scripts: kernel-doc: add support for typedef enum") broke anonymous enum parsing. Restore it by relying on members rather than its name. Fixes: d38c8cfb0571 ("scripts: kernel-doc: add support for typedef enum") Reported-by: kernel test robot Signed-off-by: Andy Shevchenko Reviewed-by: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20201102170637.36138-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Corbet commit b65f3a9d6c4ff941a101455353a7e645e590947c Author: Jonathan Neuschäfer Date: Sat Nov 7 19:39:01 2020 +0100 docs: mtd: spi-nor: Fix formatting of text vs. diagrams Currently, all diagrams below "Before this framework, the layer is like" and the text in between are rendered as one monospace text block. Instead, each individual diagram should be a monospace text block. Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20201107183902.1182809-1-j.neuschaefer@gmx.net Signed-off-by: Jonathan Corbet commit 35a3c891f6487ffafe2dc30ecf44f67fe51f166d Author: Jonathan Neuschäfer Date: Sun Nov 8 14:24:14 2020 +0100 docs: filesystems: link ubifs-authentication.rst without .rst extension Specifying the .rst extension doesn't cause any problems AFAICT, but it's uncommon. Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20201108132415.1789142-1-j.neuschaefer@gmx.net Signed-off-by: Jonathan Corbet commit 8f4f0bcd3de0842603d7809262a1c64863775b04 Author: Wilken Gottwalt Date: Sun Nov 8 16:01:04 2020 +0100 documentation: arm: sunxi: add Allwinner H616 documents Add the current and cleaned Allwinner H616 datasheet and user manual. Signed-off-by: Wilken Gottwalt Link: https://lore.kernel.org/r/20201108150104.GA66507@monster.powergraphx.local Signed-off-by: Jonathan Corbet commit 86a19b3f82863cb8593e73109dbf33479fb362c6 Author: Jonathan Neuschäfer Date: Sun Nov 8 16:10:04 2020 +0100 docs: driver-api: mtd: intel-spi: Improve formatting of shell commands Format the shell commands and output in steps 6 and 8 as code blocks, for consistency with the rest of the document. Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20201108151005.1843666-1-j.neuschaefer@gmx.net Signed-off-by: Jonathan Corbet commit 09028e60fcea646752c54ff63fb347c0bb8f15b9 Author: Wang Qing Date: Mon Nov 9 09:57:47 2020 +0800 doc: zh_CN: add translatation for tmpfs Translate Documentation/filesystems/tmpfs.rst into Chinese. Signed-off-by: Wang Qing Changes in v4: - Modify as Alex required. Changes in v3: - Fix patch format issue. Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/1604887072-12997-1-git-send-email-wangqing@vivo.com Signed-off-by: Jonathan Corbet commit 4ec0b092493f3316db45373954963cc07e081492 Author: Geert Uytterhoeven Date: Tue Nov 10 15:40:33 2020 +0100 docs: ABI: Drop trailing whitespace Remove all trailing whitespace from the ABI documentation. Most of it was introduced during recent updates. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201110144033.3278499-1-geert+renesas@glider.be Signed-off-by: Jonathan Corbet commit 04d0608b4407cedb69a0951899c75002ddaf1681 Author: Geert Uytterhoeven Date: Tue Nov 10 15:41:21 2020 +0100 docs: core-api/printk-formats.rst: Clarify formatting {cpu,node}mask Clarify how to pass the field width for bitmaps, and mention the helper macros that are available to ease printing cpumask and nodemask. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201110144121.3278667-1-geert+renesas@glider.be Signed-off-by: Jonathan Corbet commit c61b3e4839007668360ed8b87d7da96d2e59fc6c Author: Dave Kleikamp Date: Fri Nov 13 14:58:46 2020 -0600 jfs: Fix array index bounds check in dbAdjTree Bounds checking tools can flag a bug in dbAdjTree() for an array index out of bounds in dmt_stree. Since dmt_stree can refer to the stree in both structures dmaptree and dmapctl, use the larger array to eliminate the false positive. Signed-off-by: Dave Kleikamp Reported-by: butt3rflyh4ck commit bfe7bf311497815d7c7a21f97598b8e9cb47cb52 Author: Casey Schaufler Date: Tue Nov 10 09:28:41 2020 -0800 docs: ABI: ABI documentation for procfs attribute files used by multiple LSMs Provide basic ABI descriptions for the process attribute entries that are shared between multiple Linux security modules. Signed-off-by: Casey Schaufler Link: https://lore.kernel.org/r/30c36660-3694-0c0d-d472-8f3b3ca4098e@schaufler-ca.com Signed-off-by: Jonathan Corbet commit 7d71788735608b1578e3615ff2646d3a089ff0a8 Author: Aditya Srivastava Date: Tue Nov 10 23:17:49 2020 +0530 Documentation: include sign off for reverts Currently, we do not have any documentation on commit reverts regarding the requirement of Signed-off-by tag for it. This may be misleading to the users. Evaluating MISSING_SIGN_OFF checkpatch warnings on v4.13..v5.8 showed that 4 out of 11 cases missing a sign-off are revert commits. Add documentation regarding the same to document the community consensus and let readers know. Signed-off-by: Aditya Srivastava Link: https://lore.kernel.org/r/20201110174749.32068-1-yashsri421@gmail.com Signed-off-by: Jonathan Corbet commit 74490422522d125451cac400fce5d4e6bb9e1fea Author: Ionela Voinescu Date: Fri Nov 13 15:53:28 2020 +0000 arm64: abort counter_read_on_cpu() when irqs_disabled() Given that smp_call_function_single() can deadlock when interrupts are disabled, abort the SMP call if irqs_disabled(). This scenario is currently not possible given the function's uses, but safeguard this for potential future uses. Signed-off-by: Ionela Voinescu Cc: Will Deacon Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20201113155328.4194-1-ionela.voinescu@arm.com [catalin.marinas@arm.com: modified following Mark's comment] Signed-off-by: Catalin Marinas commit 68c5debcc06d6d24f15dbf978780fc5efc147d5e Author: Ionela Voinescu Date: Fri Nov 6 12:53:34 2020 +0000 arm64: implement CPPC FFH support using AMUs If Activity Monitors (AMUs) are present, two of the counters can be used to implement support for CPPC's (Collaborative Processor Performance Control) delivered and reference performance monitoring functionality using FFH (Functional Fixed Hardware). Given that counters for a certain CPU can only be read from that CPU, while FFH operations can be called from any CPU for any of the CPUs, use smp_call_function_single() to provide the requested values. Therefore, depending on the register addresses, the following values are returned: - 0x0 (DeliveredPerformanceCounterRegister): AMU core counter - 0x1 (ReferencePerformanceCounterRegister): AMU constant counter The use of Activity Monitors is hidden behind the generic cpu_read_{corecnt,constcnt}() functions. Read functionality for these two registers represents the only current FFH support for CPPC. Read operations for other register values or write operation for all registers are unsupported. Therefore, keep CPPC's FFH unsupported if no CPUs have valid AMU frequency counters. For this purpose, the get_cpu_with_amu_feat() is introduced. Signed-off-by: Ionela Voinescu Reviewed-by: Sudeep Holla Cc: Will Deacon Link: https://lore.kernel.org/r/20201106125334.21570-4-ionela.voinescu@arm.com Signed-off-by: Catalin Marinas commit bc3b6562a1acc1f43ae84c7d69428cdd8ae1390e Author: Ionela Voinescu Date: Fri Nov 6 12:53:33 2020 +0000 arm64: split counter validation function In order for the counter validation function to be reused, split validate_cpu_freq_invariance_counters() into: - freq_counters_valid(cpu) - check cpu for valid cycle counters - freq_inv_set_max_ratio(int cpu, u64 max_rate, u64 ref_rate) - generic function that sets the normalization ratio used by topology_scale_freq_tick() Signed-off-by: Ionela Voinescu Reviewed-by: Sudeep Holla Cc: Will Deacon Link: https://lore.kernel.org/r/20201106125334.21570-3-ionela.voinescu@arm.com Signed-off-by: Catalin Marinas commit 4b9cf23c179a27659a95c094ace658bb92f146e5 Author: Ionela Voinescu Date: Fri Nov 6 12:53:32 2020 +0000 arm64: wrap and generalise counter read functions In preparation for other uses of Activity Monitors (AMU) cycle counters, place counter read functionality in generic functions that can reused: read_corecnt() and read_constcnt(). As a result, implement update_freq_counters_refs() to replace init_cpu_freq_invariance_counters() and both initialise and update the per-cpu reference variables. Signed-off-by: Ionela Voinescu Reviewed-by: Sudeep Holla Cc: Will Deacon Link: https://lore.kernel.org/r/20201106125334.21570-2-ionela.voinescu@arm.com Signed-off-by: Catalin Marinas commit f8fd36b95ee4eb90846b5a61061e4bc4d890f021 Merge: e1d9d7b913025 da1e9dd3a11cd Author: Jakub Kicinski Date: Fri Nov 13 12:03:21 2020 -0800 Merge tag 'mac80211-next-for-net-next-2020-11-13' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg says: ==================== Some updates: * injection/radiotap updates for new test capabilities * remove WDS support - even years ago when we turned it off by default it was already basically unusable * support for HE (802.11ax) rates for beacons * support for some vendor-specific HE rates * many other small features/cleanups * tag 'mac80211-next-for-net-next-2020-11-13' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next: (21 commits) nl80211: fix kernel-doc warning in the new SAE attribute cfg80211: remove WDS code mac80211: remove WDS-related code rt2x00: remove WDS code b43legacy: remove WDS code b43: remove WDS code carl9170: remove WDS code ath9k: remove WDS code wireless: remove CONFIG_WIRELESS_WDS mac80211: assure that certain drivers adhere to DONT_REORDER flag mac80211: don't overwrite QoS TID of injected frames mac80211: adhere to Tx control flag that prevents frame reordering mac80211: add radiotap flag to assure frames are not reordered mac80211: save HE oper info in BSS config for mesh cfg80211: add support to configure HE MCS for beacon rate nl80211: fix beacon tx rate mask validation nl80211/cfg80211: fix potential infinite loop cfg80211: Add support to calculate and report 4096-QAM HE rates cfg80211: Add support to configure SAE PWE value to drivers ieee80211: Add definition for WFA DPP ... ==================== Link: https://lore.kernel.org/r/20201113101148.25268-1-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski commit 7da31b858ec278f90603506ce7fa7eed3c53c8d7 Author: Alex Shi Date: Fri Nov 13 15:26:59 2020 +0800 Smack: fix kernel-doc interface on functions The are some kernel-doc interface issues: security/smack/smackfs.c:1950: warning: Function parameter or member 'list' not described in 'smk_parse_label_list' security/smack/smackfs.c:1950: warning: Excess function parameter 'private' description in 'smk_parse_label_list' security/smack/smackfs.c:1979: warning: Function parameter or member 'list' not described in 'smk_destroy_label_list' security/smack/smackfs.c:1979: warning: Excess function parameter 'head' description in 'smk_destroy_label_list' security/smack/smackfs.c:2141: warning: Function parameter or member 'count' not described in 'smk_read_logging' security/smack/smackfs.c:2141: warning: Excess function parameter 'cn' description in 'smk_read_logging' security/smack/smackfs.c:2278: warning: Function parameter or member 'format' not described in 'smk_user_access' Correct them in this patch. Signed-off-by: Alex Shi Cc: Casey Schaufler Cc: James Morris Cc: "Serge E. Hallyn" Cc: linux-security-module@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Casey Schaufler commit 751341b4d7841e2b76e78eec382c2e119165497f Author: Dinghao Liu Date: Thu Aug 27 15:12:38 2020 +0800 jfs: Fix memleak in dbAdjCtl When dbBackSplit() fails, mp should be released to prevent memleak. It's the same when dbJoin() fails. Signed-off-by: Dinghao Liu Signed-off-by: Dave Kleikamp commit ed1c9a7a8517fbd0b64dc1a9c62d418b890de62a Author: Randy Dunlap Date: Tue Aug 4 19:49:01 2020 -0700 jfs: delete duplicated words + other fixes Delete repeated words in fs/jfs/. {for, allocation, if, the} Insert "is" in one place to correct the grammar. Signed-off-by: Randy Dunlap Signed-off-by: Dave Kleikamp To: linux-fsdevel@vger.kernel.org Cc: jfs-discussion@lists.sourceforge.net commit ab97800e088acf34d0014845ed93605dd5c1ea2a Author: Claudiu Beznea Date: Fri Nov 13 19:56:04 2020 +0200 regulator: core: do not continue if selector match Do not continue if selector has already been located. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1605290164-11556-1-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Mark Brown commit b111545d26c0d66dd9aae668d9373669e752b075 Author: Kaixu Xia Date: Sat Nov 14 00:02:40 2020 +0800 tracing: Remove the useless value assignment in test_create_synth_event() The value of variable ret is overwritten on the delete branch in the test_create_synth_event() and we care more about the above error than this delete portion. Remove it. Link: https://lkml.kernel.org/r/1605283360-6804-1-git-send-email-kaixuxia@tencent.com Reported-by: Tosk Robot Signed-off-by: Kaixu Xia Signed-off-by: Steven Rostedt (VMware) commit 2860cd8a235375df3c8ec8039d9fe5eb2f658b86 Author: Steven Rostedt (VMware) Date: Wed Oct 28 17:15:27 2020 -0400 livepatch: Use the default ftrace_ops instead of REGS when ARGS is available When CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS is available, the ftrace call will be able to set the ip of the calling function. This will improve the performance of live kernel patching where it does not need all the regs to be stored just to change the instruction pointer. If all archs that support live kernel patching also support HAVE_DYNAMIC_FTRACE_WITH_ARGS, then the architecture specific function klp_arch_set_pc() could be made generic. It is possible that an arch can support HAVE_DYNAMIC_FTRACE_WITH_ARGS but not HAVE_DYNAMIC_FTRACE_WITH_REGS and then have access to live patching. Cc: Josh Poimboeuf Cc: Jiri Kosina Cc: live-patching@vger.kernel.org Acked-by: Peter Zijlstra (Intel) Acked-by: Miroslav Benes Signed-off-by: Steven Rostedt (VMware) commit 02a474ca266a47ea8f4d5a11f4ffa120f83730ad Author: Steven Rostedt (VMware) Date: Tue Oct 27 10:55:55 2020 -0400 ftrace/x86: Allow for arguments to be passed in to ftrace_regs by default Currently, the only way to get access to the registers of a function via a ftrace callback is to set the "FL_SAVE_REGS" bit in the ftrace_ops. But as this saves all regs as if a breakpoint were to trigger (for use with kprobes), it is expensive. The regs are already saved on the stack for the default ftrace callbacks, as that is required otherwise a function being traced will get the wrong arguments and possibly crash. And on x86, the arguments are already stored where they would be on a pt_regs structure to use that code for both the regs version of a callback, it makes sense to pass that information always to all functions. If an architecture does this (as x86_64 now does), it is to set HAVE_DYNAMIC_FTRACE_WITH_ARGS, and this will let the generic code that it could have access to arguments without having to set the flags. This also includes having the stack pointer being saved, which could be used for accessing arguments on the stack, as well as having the function graph tracer not require its own trampoline! Acked-by: Peter Zijlstra (Intel) Signed-off-by: Steven Rostedt (VMware) commit d19ad0775dcd64b49eecf4fa79c17959ebfbd26b Author: Steven Rostedt (VMware) Date: Wed Oct 28 17:42:17 2020 -0400 ftrace: Have the callbacks receive a struct ftrace_regs instead of pt_regs In preparation to have arguments of a function passed to callbacks attached to functions as default, change the default callback prototype to receive a struct ftrace_regs as the forth parameter instead of a pt_regs. For callbacks that set the FL_SAVE_REGS flag in their ftrace_ops flags, they will now need to get the pt_regs via a ftrace_get_regs() helper call. If this is called by a callback that their ftrace_ops did not have a FL_SAVE_REGS flag set, it that helper function will return NULL. This will allow the ftrace_regs to hold enough just to get the parameters and stack pointer, but without the worry that callbacks may have a pt_regs that is not completely filled. Acked-by: Peter Zijlstra (Intel) Reviewed-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 2f595d08614691a2443987496995c24ff397abf9 Merge: 0917c9db23acc bdcd1177578cd Author: Mark Brown Date: Fri Nov 13 17:09:18 2020 +0000 Merge series "regulator: mcp16502: add support for ramp delay" from Claudiu Beznea : Hi, This series adds support for ramp delay on mcp16502. It also adds some cleanup on mcp16502. Apart from that patches 1/6 fixes the selector validation in case the regulator::desc::linear_min_sel is not zero. Thank you, Claudiu Beznea Changes in v3: - fix compilation error in patch 5/6 Reported-by: kernel test robot Changes in v2: - rebase on top of regulator/for-next - checked 1/6 and 3/6 applies on top of regulator/for-5.10 Claudiu Beznea (6): regulator: core: validate selector against linear_min_sel regulator: core: do not continue if selector match regulator: mcp16502: add linear_min_sel regulator: mcp16502: adapt for get/set on other registers regulator: mcp16502: add support for ramp delay regulator: mcp16502: remove void documentation of struct mcp16502 drivers/regulator/core.c | 12 +++- drivers/regulator/helpers.c | 3 +- drivers/regulator/mcp16502.c | 135 ++++++++++++++++++++++++++++++++++++------- 3 files changed, 127 insertions(+), 23 deletions(-) -- 2.7.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel commit 3fccd03a527fa1c9490e528a369d1c9d9c622b01 Author: Bjorn Andersson Date: Fri Nov 13 08:34:44 2020 -0800 arm64: defconfig: Enable Qualcomm OSM L3 driver The OSM L3 interconnect driver is used for scaling the bus to the L3 cache on modern Qualcomm platforms, enable it. Reviewed-by: Georgi Djakov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20201113163444.3138807-1-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit bdcd1177578cd5556f7494da86d5038db8203a16 Author: Claudiu Beznea Date: Fri Nov 13 17:21:05 2020 +0200 regulator: core: validate selector against linear_min_sel There are regulators who's min selector is not zero. Selectors loops (looping b/w zero and regulator::desc::n_voltages) might throw errors because invalid selectors are used (lower than regulator::desc::linear_min_sel). For this situations validate selectors against regulator::desc::linear_min_sel. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1605280870-32432-2-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Mark Brown commit 842f44806efaddfae5ecff8f143c2607a4fa65d7 Author: Claudiu Beznea Date: Fri Nov 13 17:21:10 2020 +0200 regulator: mcp16502: remove void documentation of struct mcp16502 struct mcp16502 has no members called rdev or rmap. Remove the documentation. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1605280870-32432-7-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Mark Brown commit 322eb8666d2f50556e89d73b54cf2dad8703c4e0 Author: Claudiu Beznea Date: Fri Nov 13 17:21:09 2020 +0200 regulator: mcp16502: add support for ramp delay MCP16502 have configurable ramp delay support (via DVSR bits in regulators' CFG register). Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1605280870-32432-6-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Mark Brown commit 3e5532a011b09861abc2da3aa518b9aafc250570 Author: Claudiu Beznea Date: Fri Nov 13 17:21:08 2020 +0200 regulator: mcp16502: adapt for get/set on other registers MCP16502 have multiple registers for each regulator (as described in enum mcp16502_reg). Adapt the code to be able to get/set all these registers. This is necessary for the following commits. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1605280870-32432-5-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Mark Brown commit 478f8089161e9a8f487ef3f560e59d1423b81c05 Author: Claudiu Beznea Date: Fri Nov 13 17:21:07 2020 +0200 regulator: mcp16502: add linear_min_sel Selectors b/w zero and VDD_LOW_SEL are not valid. Use linear_min_sel. Fixes: 919261c03e7ca ("regulator: mcp16502: add regulator driver for MCP16502") Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1605280870-32432-4-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Mark Brown commit 0917c9db23accb8690d8f1987ada36eb5b1a5ac9 Author: Michał Mirosław Date: Fri Nov 13 01:20:27 2020 +0100 regulator: debug early supply resolving Help debugging the case when set_machine_constraints() needs to be repeated. Signed-off-by: Michał Mirosław Tested-by: Ahmad Fatoum # stpmic1 Link: https://lore.kernel.org/r/f9cba575580369e46661a9278ee6c6a8d8564c2a.1605226675.git.mirq-linux@rere.qmqm.pl Signed-off-by: Mark Brown commit 85288b3bf1dbe6d03ca2597791ef97507597532d Merge: 33ee67b47ba09 a6e9717a71fd8 Author: Mark Brown Date: Fri Nov 13 16:04:13 2020 +0000 Merge series "ASoC: use inclusive language for bclk/fsync/topology" from Pierre-Louis Bossart : The SOF (Sound Open Firmware) tree contains a lot of references in topology files to 'codec_slave'/'codec_master' terms, which in turn come from alsa-lib and ALSA/ASoC topology support at the kernel level. These terms are no longer compatible with the guidelines adopted by the kernel community [1], standard organizations, and need to change in backwards-compatible ways. The main/secondary terms typically suggested in guidelines don't mean anything for clocks, this patchset suggests instead the use of 'provider' and 'consumer' terms, with the 'codec' prefix kept to make it clear that the codec is the reference. The CM/CS suffixes are also replaced by CP/CC. It can be argued that the change of suffix is invasive, but finding a replacement that keeps the M and S shortcuts has proven difficult in quite a few contexts. The previous definitions are kept for backwards-compatibility so this change should not have any functional impact. It is suggested that new contributions only use the new terms but there is no requirement to transition immediately to the new definitions for existing code. Intel will however update all its past contributions related to bit clock/frame sync configurations immediately. This patchset contains the kernel changes only, the alsa-lib changes were shared separately. Feedback welcome ~Pierre [1] https://lkml.org/lkml/2020/7/4/229 Pierre-Louis Bossart (4): ASoC: topology: use inclusive language for bclk and fsync ASoC: SOF: use inclusive language for bclk and fsync ASoC: Intel: atom: use inclusive language for SSP bclk/fsync ASoC: Intel: keembay: use inclusive language for bclk and fsync include/sound/soc-dai.h | 32 +++++++++++++++--------- include/sound/sof/dai.h | 16 ++++++++---- include/uapi/sound/asoc.h | 22 ++++++++++------ sound/soc/intel/atom/sst-atom-controls.c | 12 ++++----- sound/soc/intel/atom/sst-atom-controls.h | 4 +-- sound/soc/intel/keembay/kmb_platform.c | 22 ++++++++-------- sound/soc/intel/keembay/kmb_platform.h | 8 +++--- sound/soc/soc-topology.c | 24 +++++++++--------- sound/soc/sof/topology.c | 18 ++++++------- 9 files changed, 89 insertions(+), 69 deletions(-) -- 2.25.1 commit e3e043992cb600506022761e9c5c90c85cda3386 Author: Christian König Date: Fri Nov 6 15:06:49 2020 +0100 drm/ttm: fix missing NULL check in the new page pool The pool parameter can be NULL if we free through the shrinker. Signed-off-by: Christian König Acked-by: Alex Deucher Tested-by: Martin Peres Acked-by: Martin Peres Reported-by: Andy Lavr Tested-by: Andy Lavr Link: https://patchwork.freedesktop.org/patch/399365/ commit bafcdad643462471628275a120a9e2b52262559c Author: Maarten Lankhorst Date: Thu Nov 12 21:17:18 2020 +0200 drm/i915: Add hw.pipe_mode to allow bigjoiner pipe/transcoder split With bigjoiner, there will be 2 pipes driving 2 halves of 1 transcoder, because of this, we need a pipe_mode for various calculations, including for example watermarks, plane clipping, etc. v10: * remove redundant pipe_mode assignment (Ville) v9: * pipe_mode in state dump nd state check (Ville) v8: * Add pipe_mode in readout in verify_crtc_state (Ville) v7: * Remove redundant comment (Ville) * Just keep mode instead of pipe_mode (Ville) v6: * renaming in separate function, only pipe_mode here (Ville) * Add description (Maarten) v5: * Rebase (Manasi) v4: * Manual rebase (Manasi) v3: * Change state to crtc_state, fix rebase err (Manasi) v2: * Manual Rebase (Manasi) Signed-off-by: Maarten Lankhorst Signed-off-by: Manasi Navare Reviewed-by: Animesh Manna [vsyrjala: * Fix state checker * Fix state dump * Use pipe_mode for linetime watermarks * Make sure pipe_mode normal timings are correct since the silly ddb code uses them * Drop the redundant pipe_mode copies from intel_modeset_pipe_config() and intel_crtc_copy_uapi_to_hw_state() * Use drm_mode_copy() all over] Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201112191718.16683-7-ville.syrjala@linux.intel.com commit c42773b67d82e62e4b30103f26169b3e02ad06ee Author: Ville Syrjälä Date: Thu Nov 12 21:17:17 2020 +0200 drm/i915: Introduce intel_crtc_readout_derived_state() Collect up a bunch of derived state "readout" into a common helper, which we can call from both intel_encoder_get_config() and intel_crtc_get_pipe_config(). Signed-off-by: Ville Syrjälä Reviewed-by: Manasi Navare Signed-off-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20201112191718.16683-6-ville.syrjala@linux.intel.com commit 33574ec9c1ad911871a9ff1ac915fa532557c67c Author: Ville Syrjälä Date: Thu Nov 12 21:17:16 2020 +0200 drm/i915: s/intel_mode_from_pipe_config/intel_mode_from_crtc_timings/ Generalize intel_mode_from_pipe_config() to work on any two arbitrary modes. Also relocate the code for the future, and make it static since it's not needed elsewhere. Signed-off-by: Ville Syrjälä Reviewed-by: Manasi Navare Signed-off-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20201112191718.16683-5-ville.syrjala@linux.intel.com commit 291106cbd6fa5f8daef55f2fbfa905c33ccc03a2 Author: Ville Syrjälä Date: Thu Nov 12 21:17:15 2020 +0200 drm/i915: Move hw.active assignment into intel_crtc_get_pipe_config() No reason to make the callers of intel_crtc_get_pipe_config() populate hw.active. Let's do it in intel_crtc_get_pipe_config() itself. hw.enable we leave up to the callers since it's slightly different for readout vs. state check. Signed-off-by: Ville Syrjälä Reviewed-by: Manasi Navare Signed-off-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20201112191718.16683-4-ville.syrjala@linux.intel.com commit cfd3443e2d32a655871a445b3509e5df96fa7581 Author: Alexandru Ardelean Date: Wed Nov 11 13:22:41 2020 +0200 uio: pruss: move simple allocations to dem_ equivalents This change moves the simple allocations to their device-managed equivalents. This cleans up some error/exit paths. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201111112242.62116-1-alexandru.ardelean@analog.com Signed-off-by: Greg Kroah-Hartman commit 0d79a48440f559ac939d1be2089757c5e4ab16c7 Author: Marcos Antonio de Jesus Filho Date: Sun Nov 8 18:56:41 2020 -0800 staging: vt6655: Remove useless else The else statements are not useful due to the presence of a return statement on the if block. Remove the else statements, adjust the indentation of the code, move variable declarations to the beginning of their scope and remove useless return statement. Reported by checkpatch. Signed-off-by: Marcos Antonio de Jesus Filho Link: https://lore.kernel.org/r/20201109025641.GA69196@Zangetsu Signed-off-by: Greg Kroah-Hartman commit 11f9af1657b167035fee35ef3317ff2fb0406410 Author: Manasi Navare Date: Thu Nov 12 21:17:14 2020 +0200 drm/i915: Add a wrapper function around get_pipe_config Create a new function intel_crtc_get_pipe_config() that calls platform specific hooks for get_pipe_config() No functional change here. Suggested-by: Ville Syrjälä Signed-off-by: Manasi Navare [vsyrjala: Conform to modern i915 coding style, fix patch subject] Signed-off-by: Ville Syrjälä Reviewed-by: Manasi Navare Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20201112191718.16683-3-ville.syrjala@linux.intel.com commit b809984ca2b51cea075ea856a8ab0013c525cead Author: Lee Jones Date: Thu Nov 12 13:19:59 2020 +0000 staging: net: wimax: i2400m: fw: Fix incorrectly spelt function parameter in documentation Fixes the following W=1 kernel build warning(s): drivers/net/wimax/i2400m/fw.c:647: warning: Function parameter or member '__chunk_len' not described in 'i2400m_download_chunk' drivers/net/wimax/i2400m/fw.c:647: warning: Excess function parameter 'chunk_len' description in 'i2400m_download_chunk' Cc: Greg Kroah-Hartman Cc: Inaky Perez-Gonzalez Cc: linux-wimax@intel.com Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Yanir Lubetkin Cc: netdev@vger.kernel.org Cc: devel@driverdev.osuosl.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201112131959.2213841-7-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit b5f236da89f391c1e7d7bcb3f5989f416f07e723 Author: Lee Jones Date: Thu Nov 12 13:19:58 2020 +0000 staging: net: wimax: i2400m: tx: Fix a few kernel-doc misdemeanours Fixes the following W=1 kernel build warning(s): drivers/net/wimax/i2400m/tx.c:715: warning: Function parameter or member 'i2400m' not described in 'i2400m_tx' drivers/net/wimax/i2400m/tx.c:964: warning: Function parameter or member 'i2400m' not described in 'i2400m_tx_setup' drivers/net/wimax/i2400m/tx.c:1005: warning: Function parameter or member 'i2400m' not described in 'i2400m_tx_release' Cc: Greg Kroah-Hartman Cc: Inaky Perez-Gonzalez Cc: linux-wimax@intel.com Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Yanir Lubetkin Cc: netdev@vger.kernel.org Cc: devel@driverdev.osuosl.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201112131959.2213841-6-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit c01bba5d341b4284718129899e9f949604a3c1f1 Author: Lee Jones Date: Thu Nov 12 13:19:57 2020 +0000 staging: net: wimax: i2400m: netdev: Demote non-conformant function header Fixes the following W=1 kernel build warning(s): drivers/net/wimax/i2400m/netdev.c:583: warning: Function parameter or member 'net_dev' not described in 'i2400m_netdev_setup' Cc: Greg Kroah-Hartman Cc: Inaky Perez-Gonzalez Cc: linux-wimax@intel.com Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Yanir Lubetkin Cc: netdev@vger.kernel.org Cc: devel@driverdev.osuosl.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201112131959.2213841-5-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 5d98f6a42c8603d38441ba5b518b741370d34f5e Author: Lee Jones Date: Thu Nov 12 13:19:56 2020 +0000 staging: net: wimax: i2400m: fw: Fix some function header misdemeanours Fixes the following W=1 kernel build warning(s): drivers/net/wimax/i2400m/fw.c:584: warning: Function parameter or member 'i2400m' not described in 'i2400m_bm_cmd' drivers/net/wimax/i2400m/fw.c:584: warning: Excess function parameter 'returns' description in 'i2400m_bm_cmd' drivers/net/wimax/i2400m/fw.c:646: warning: Function parameter or member 'chunk' not described in 'i2400m_download_chunk' drivers/net/wimax/i2400m/fw.c:646: warning: Function parameter or member '__chunk_len' not described in 'i2400m_download_chunk' drivers/net/wimax/i2400m/fw.c:646: warning: Excess function parameter 'buf' description in 'i2400m_download_chunk' drivers/net/wimax/i2400m/fw.c:646: warning: Excess function parameter 'buf_len' description in 'i2400m_download_chunk' drivers/net/wimax/i2400m/fw.c:1548: warning: Function parameter or member 'flags' not described in 'i2400m_dev_bootstrap' Cc: Greg Kroah-Hartman Cc: Inaky Perez-Gonzalez Cc: linux-wimax@intel.com Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Yanir Lubetkin Cc: netdev@vger.kernel.org Cc: devel@driverdev.osuosl.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201112131959.2213841-4-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 80594fb405103497eb14789d2a92db18ed7d3c62 Author: Lee Jones Date: Thu Nov 12 13:19:55 2020 +0000 staging: net: wimax: i2400m: driver: Demote some non-conformant kernel-docs, fix others Fixes the following W=1 kernel build warning(s): drivers/net/wimax/i2400m/driver.c:681: warning: Function parameter or member 'i2400m' not described in 'i2400m_dev_reset_handle' drivers/net/wimax/i2400m/driver.c:681: warning: Function parameter or member 'reason' not described in 'i2400m_dev_reset_handle' drivers/net/wimax/i2400m/driver.c:775: warning: Function parameter or member 'i2400m' not described in 'i2400m_init' drivers/net/wimax/i2400m/driver.c:842: warning: Function parameter or member 'bm_flags' not described in 'i2400m_setup' drivers/net/wimax/i2400m/driver.c:942: warning: Function parameter or member 'i2400m' not described in 'i2400m_release' Cc: Greg Kroah-Hartman Cc: Inaky Perez-Gonzalez Cc: linux-wimax@intel.com Cc: "David S. Miller" Cc: Jakub Kicinski Cc: netdev@vger.kernel.org Cc: devel@driverdev.osuosl.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201112131959.2213841-3-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 24f4aee92e51d956588328f151813f183f3b74bd Author: Lee Jones Date: Thu Nov 12 13:19:54 2020 +0000 staging: net: wimax: i2400m: control: Fix some misspellings in i2400m_set_init_config()'s docs Fixes the following W=1 kernel build warning(s): drivers/net/wimax/i2400m/control.c:1195: warning: Function parameter or member 'arg' not described in 'i2400m_set_init_config' drivers/net/wimax/i2400m/control.c:1195: warning: Excess function parameter 'arg_size' description in 'i2400m_set_init_config' Cc: Greg Kroah-Hartman Cc: Inaky Perez-Gonzalez Cc: linux-wimax@intel.com Cc: "David S. Miller" Cc: Jakub Kicinski Cc: netdev@vger.kernel.org Cc: devel@driverdev.osuosl.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201112131959.2213841-2-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 39439d7155683c3f75d6814fdb5f1b16f202197b Author: Ross Schmidt Date: Mon Nov 9 22:10:08 2020 -0600 staging: rtl8723bs: clean up leading space Convert spaces to tabs to fix coding style issues and clear checkpatch warnings. WARNING: please, no spaces at the start of a line Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201110041008.15847-10-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit cad33240aba37944f451ab73fb9c4119b643daeb Author: Ross Schmidt Date: Mon Nov 9 22:10:07 2020 -0600 staging: rtl8723bs: clean up pointer locations Move pointer locations to fix coding style issues and clear checkpatch errors. ERROR: "foo * bar" should be "foo *bar" Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201110041008.15847-9-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8ec06b9ff8a4f5ef57901fbb0e025556892e3a5e Author: Ross Schmidt Date: Mon Nov 9 22:10:06 2020 -0600 staging: rtl8723bs: clean up logical continuations Move operators to fix coding style issues and clear checkpatch checks. CHECK: Logical continuations should be on the previous line Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201110041008.15847-8-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit cf05a0086eb4397ae6f9c5cbe2ea9c1eaecdcd6c Author: Ross Schmidt Date: Mon Nov 9 22:10:05 2020 -0600 staging: rtl8723bs: clean up trailing statements Move trailing statements to the next line to fix coding style issues and clear checkpatch errors. ERROR: trailing statements should be on next line Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201110041008.15847-7-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5ddd99756c579b4c451cdb12da4d683ac71190c0 Author: Ross Schmidt Date: Mon Nov 9 22:10:04 2020 -0600 staging: rtl8723bs: clean up switch case indentation Move cases to align with switch indentation to fix coding style issues and clear checkpatch errors. ERROR: switch and case should be at the same indent Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201110041008.15847-6-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit fa7c458672641839ed9ee79a991d6f8fbce6ada7 Author: Ross Schmidt Date: Mon Nov 9 22:10:03 2020 -0600 staging: rtl8723bs: clean up open braces Move braces to fix coding style issues and clear checkpatch errors. Some braces are removed for single statements. ERROR: open brace '{' following function definitions go on the next line ERROR: that open brace { should be on the previous line Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201110041008.15847-5-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5641eeec0f5835bc39a94632f91b8836c98234f5 Author: Ross Schmidt Date: Mon Nov 9 22:10:02 2020 -0600 staging: rtl8723bs: clean up open ended lines Move declarations to fix coding style issues and clear checkpatch checks. CHECK: Lines should not end with a '(' Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201110041008.15847-4-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 79008395e593d2f5a8dff1da54f0283ecbe5e2bf Author: Ross Schmidt Date: Mon Nov 9 22:10:01 2020 -0600 staging: rtl8723bs: clean up space before tabs Remove spaces before tabs to fix coding style issues and clear checkpatch warnings. WARNING: please, no space before tabs Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201110041008.15847-3-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 70466c39ba8d0ae4c99c55474b098b7babb87db1 Author: Ross Schmidt Date: Mon Nov 9 22:10:00 2020 -0600 staging: rtl8723bs: clean up braces Add or remove braces or remove lines to fix coding style issues and clear checkpatch. WARNING: braces {} are not necessary for single statement blocks WARNING: braces {} are not necessary for any arm of this statement CHECK: Unbalanced braces around else statement CHECK: braces {} should be used on all arms of this statement CHECK: Blank lines aren't necessary before a close brace '}' CHECK: Blank lines aren't necessary after an open brace '{' Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201110041008.15847-2-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 220457125669ecf738e3c2f1fe9a408d148c7c69 Author: Ross Schmidt Date: Mon Nov 9 22:09:59 2020 -0600 staging: rtl8723bs: clean up line spacing Add or remove lines to fix coding style issues and clear checkpatch. WARNING: Missing a blank line after declarations CHECK: Please use a blank line after function/struct/union/enum declarations CHECK: Please don't use multiple blank lines Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201110041008.15847-1-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 65c1ed30b0e617a368b4326f88b668f1ed32a06f Author: Manasi Navare Date: Thu Nov 12 21:17:13 2020 +0200 drm/i915: Move encoder->get_config to a new function No functional changes, create a separate intel_encoder_get_config() function that calls encoder->get_config hook. This is needed so that later we can add beigjoienr related readout here. Signed-off-by: Manasi Navare [vsyrjala: Move the code around for the future] Signed-off-by: Ville Syrjälä Reviewed-by: Manasi Navare Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20201112191718.16683-2-ville.syrjala@linux.intel.com commit c869eaa617e41c741ce33a20be52ed32c78d02b8 Author: Roman Kiryanov Date: Thu Nov 12 15:49:07 2020 -0800 drivers: staging: retire drivers/staging/goldfish Android Studio Emulator (goldfish) migrated to Intel HDA. Signed-off-by: Roman Kiryanov Link: https://lore.kernel.org/r/20201112234907.3761694-1-rkir@google.com Signed-off-by: Greg Kroah-Hartman commit 6f100640ca5b2a2ff67b001c9fd3de21f7b12cf2 Author: KP Singh Date: Fri Nov 13 00:59:30 2020 +0000 bpf: Expose bpf_d_path helper to sleepable LSM hooks Sleepable hooks are never called from an NMI/interrupt context, so it is safe to use the bpf_d_path helper in LSM programs attaching to these hooks. The helper is not restricted to sleepable programs and merely uses the list of sleepable hooks as the initial subset of LSM hooks where it can be used. Signed-off-by: KP Singh Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20201113005930.541956-3-kpsingh@chromium.org commit 423f16108c9d832bd96059d5c882c8ef6d76eb96 Author: KP Singh Date: Fri Nov 13 00:59:29 2020 +0000 bpf: Augment the set of sleepable LSM hooks Update the set of sleepable hooks with the ones that do not trigger a warning with might_fault() when exercised with the correct kernel config options enabled, i.e. DEBUG_ATOMIC_SLEEP=y LOCKDEP=y PROVE_LOCKING=y This means that a sleepable LSM eBPF program can be attached to these LSM hooks. A new helper method bpf_lsm_is_sleepable_hook is added and the set is maintained locally in bpf_lsm.c Signed-off-by: KP Singh Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20201113005930.541956-2-kpsingh@chromium.org commit d4aac7d439c2d9307cb5137fc285464a36978107 Author: Rikard Falkeborn Date: Mon Nov 9 23:10:12 2020 +0100 pinctrl: renesas: Constify sh73a0_vccq_mc0_ops The only usage of sh73a0_vccq_mc0_ops is to assign its address to the ops field in the regulator_desc struct, which is a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20201109221012.177478-1-rikard.falkeborn@gmail.com Signed-off-by: Geert Uytterhoeven commit 7b1425f08f5620bde28aced29820004bc8c28962 Author: Geert Uytterhoeven Date: Wed Oct 28 16:16:37 2020 +0100 pinctrl: renesas: Protect GPIO leftovers by CONFIG_PINCTRL_SH_FUNC_GPIO On SuperH and ARM SH/R-Mobile SoCs, the pin control driver handles GPIOs, too. To reduce code size when compiling a kernel supporting only modern SoCs, most, but not all, of the GPIO functionality is protected by checks for CONFIG_PINCTRL_SH_FUNC_GPIO. Factor out the remaining parts when not needed: 1. sh_pfc_soc_info.{in,out}put describe GPIO pins that have input resp. output capabilities (SuperH and SH/R-Mobile). 2. sh_pfc_soc_info.gpio_irq{,_size} describe the mapping from GPIO pins to interrupt numbers (SH/R-Mobile). 3. sh_pfc_gpio_set_direction() configures GPIO direction, called from the GPIO driver through pinctrl_gpio_direction_{in,out}put() (SH/R-Mobile). Unfortunately this function cannot just be moved to drivers/pinctrl/renesas/gpio.c, as it relies on knowledge of sh_pfc_pinctrl, which is internal to drivers/pinctrl/renesas/pinctrl.c. While code size reduction is minimal, this does help in documenting depencies. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201028151637.1734130-9-geert+renesas@glider.be commit a3ee0a246df1755af04d79cd6cd53939aeb6a0db Author: Geert Uytterhoeven Date: Wed Oct 28 16:16:36 2020 +0100 pinctrl: renesas: r8a7778: Use common R-Car bias handling Currently, the rcar_pinmux_[gs]et_bias() helpers handle only SoCs that have separate LSI Pin Pull-Enable (PUEN) and Pull-Up/Down Control (PUD) registers, like R-Car Gen3 and RZ/G2. Update the function to handle SoCs that have only LSI Pin Pull-Up Control Register (PUPR), like R-Car Gen1/Gen2 and RZ/G1. Reduce code duplication by converting the R-Car M1A pin control driver to use the common handler. Note that this changes behavior in case the (invalid!) option "bias-pull-down" is used in an R-Car M1A DTS: before, it was ignored silently; after this change, it is considered the same as "bias-pull-up". Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201028151637.1734130-8-geert+renesas@glider.be commit 2d341cc3da8a0aef8b505ea7d2de39075e181088 Author: Geert Uytterhoeven Date: Wed Oct 28 16:16:35 2020 +0100 pinctrl: renesas: r8a7778: Use physical addresses for PUPR regs The handling of the LSI Pin Pull-Up Control Registers (PUPR) on R-Car M1A uses register offsets instead of register physical addresses. This is different from the handling on other R-Car parts. Convert the bias handling from register offsets to physical addresses. This increases uniformity, and prepares for consolidation of the bias handling. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201028151637.1734130-7-geert+renesas@glider.be commit 27e768a4e7fa8b2b727a05e2eabf000ac7119f5d Author: Geert Uytterhoeven Date: Wed Oct 28 16:16:34 2020 +0100 pinctrl: renesas: Factor out common R-Car Gen3 bias handling All pin control drivers for R-Car Gen3 SoCs contain identical bias handling. Reduce code duplication by moving it to the common pinctrl.c code. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201028151637.1734130-6-geert+renesas@glider.be commit 8019938a85d0f7e5ed06cd9bf0824e5edae9be2b Author: Geert Uytterhoeven Date: Wed Oct 28 16:16:33 2020 +0100 pinctrl: renesas: Optimize sh_pfc_pin_config Shrink sh_pfc_pin_config from 8 to 2 bytes: - The mux_set flag can be removed, as a non-zero mark value means the same (zero = PINMUX_RESERVED is an invalid mark value), - The gpio_enabled flag needs only a single bit, - Mark values are small integers, and can easily fit in a 15-bit bitfield. This saves 6 bytes per pin when allocating the sh_pfc_pinctrl.configs array, i.e. it reduces run-time memory consumption by ca. 1.5 KiB. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201028151637.1734130-5-geert+renesas@glider.be commit eb9d673f94fb186702c4933ef72d190232c26ce9 Author: Geert Uytterhoeven Date: Wed Oct 28 16:16:32 2020 +0100 pinctrl: renesas: Reorder struct sh_pfc_pin to remove hole On arm64, pointer size and alignment is 64-bit, hence a 4-byte hole is present in between the enum_id and name members of the sh_pfc_pin structure. Get rid of this hole by sorting the structure's members by decreasing size. This saves up to 1.5 KiB per enabled SoC, and reduces the size of a kernel including support for all R-Car Gen3 SoCs by more than 10 KiB. This has no size impact on SH and arm32. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201028151637.1734130-4-geert+renesas@glider.be commit b589f241d8715803c11b6975b6322731b664b5ef Author: Geert Uytterhoeven Date: Wed Oct 28 16:16:31 2020 +0100 pinctrl: renesas: Singular/plural grammar fixes Fix a few singular vs. plural grammar issues in comments. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201028151637.1734130-3-geert+renesas@glider.be commit b5bd0becfd42e6d007ad559c9068b80ef3ff84b8 Author: Geert Uytterhoeven Date: Wed Oct 28 16:16:30 2020 +0100 pinctrl: renesas: Remove superfluous goto in sh_pfc_gpio_set_direction() Commit b13431ed6eab808a ("pinctrl: sh-pfc: Remove incomplete flag "cfg->type"") removed the last statement in between the goto and the label. Hence remove both. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201028151637.1734130-2-geert+renesas@glider.be commit 8d3b2e3d5b1b27054c62a61bc1191131533166e5 Author: Biju Das Date: Mon Oct 19 13:42:58 2020 +0100 pinctrl: renesas: r8a7791: Optimize pinctrl image size for R8A774[34] This driver supports both RZ/G1[MN] and R-Car M2-W/M2-N SoCs. Optimize pinctrl image size for RZ/G1[MN], when support for R-Car M2-W/M2-N (R8A779[13]) is not enabled. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20201019124258.4574-7-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 529b8eecb5c3b61cc53a21b72a12304a03e83c9f Author: Biju Das Date: Mon Oct 19 13:42:57 2020 +0100 pinctrl: renesas: r8a7790: Optimize pinctrl image size for R8A7742 This driver supports both RZ/G1H and R-Car H2 SoCs. Optimize pinctrl image size for RZ/G1H, when support for R-Car H2 (R8A7790) is not enabled. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20201019124258.4574-6-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 03522a59a9e7e5f464735e907891cd235aa68b1d Author: Biju Das Date: Mon Oct 19 13:42:56 2020 +0100 pinctrl: renesas: r8a77990: Optimize pinctrl image size for R8A774C0 This driver supports both RZ/G2E and R-Car E3 SoCs. Optimize pinctrl image size for RZ/G2E, when support for R-Car E3 (R8A77990) is not enabled. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20201019124258.4574-5-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 74c5fdc5b87a9435d6afbdd7d22c874c160bafc6 Author: Biju Das Date: Mon Oct 19 13:42:55 2020 +0100 pinctrl: renesas: r8a77965: Optimize pinctrl image size for R8A774B1 This driver supports both RZ/G2N and R-Car M3-N SoCs. Optimize pinctrl image size for RZ/G2N, when support for R-Car M3-N (R8A77965) is not enabled. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20201019124258.4574-4-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 74ce7a8044b07268817828af2d6268801ddc012b Author: Biju Das Date: Mon Oct 19 14:28:05 2020 +0100 pinctrl: renesas: r8a7796: Optimize pinctrl image size for R8A774A1 This driver supports both RZ/G2M and R-Car M3-W/W+ SoCs. Optimize pinctrl image size for RZ/G2M, when support for R-Car M3-W/W+ (R8A7796[01]) is not enabled. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20201019132805.5996-1-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit b8029394efccf48687d9a7fae6c4747b81e35261 Author: Biju Das Date: Mon Oct 19 13:42:53 2020 +0100 pinctrl: renesas: r8a77951: Optimize pinctrl image size for R8A774E1 This driver supports both RZ/G2H and R-Car H3 ES2 SoCs. Optimize pinctrl image size for RZ/G2H, when support for R-Car H3 ES2 (R8A77951) is not enabled. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20201019124258.4574-2-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 383313b8c41e5f89e45d6077e5bc6805206eb612 Author: Tabot Kevin Date: Thu Nov 12 23:33:35 2020 +0100 staging: greybus: Fixed issues with alignment to open parenthesis. This patch fixes the following: - Made sure alignment matched open parenthesis. Signed-off-by: Tabot Kevin Link: https://lore.kernel.org/r/20201112223331.GA1681@tabot Signed-off-by: Greg Kroah-Hartman commit ab5b769a23af12a675b9f3d7dd529250c527f5ac Author: Jing Xiangfeng Date: Thu Nov 12 14:49:24 2020 +0800 staging: gasket: interrupt: fix the missed eventfd_ctx_put() in gasket_interrupt.c gasket_interrupt_set_eventfd() misses to call eventfd_ctx_put() in an error path. We check interrupt is valid before calling eventfd_ctx_fdget() to fix it. There is the same issue in gasket_interrupt_clear_eventfd(), Add the missed function call to fix it. Fixes: 9a69f5087ccc ("drivers/staging: Gasket driver framework + Apex driver") Signed-off-by: Jing Xiangfeng Link: https://lore.kernel.org/r/20201112064924.99680-1-jingxiangfeng@huawei.com Signed-off-by: Greg Kroah-Hartman commit 8b5b1b81935d88673e23ddb633f02dc6c842829b Author: Eduard Vintila Date: Mon Nov 9 22:20:16 2020 +0200 staging: rtl8192e: Braces should be used on all arms of statement Fixed a coding style issue by adding braces on all arms of an "if" statement. Signed-off-by: Eduard Vintila Link: https://lore.kernel.org/r/20201109202016.79329-1-eduard.vintila47@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3952659a6108f77a0d062d8e8487bdbdaf52a66c Author: Zhang Qilong Date: Mon Nov 9 21:13:46 2020 +0800 staging: greybus: codecs: Fix reference counter leak in error handling gb_pm_runtime_get_sync has increased the usage counter of the device here. Forgetting to call gb_pm_runtime_put_noidle will result in usage counter leak in the error branch of (gbcodec_hw_params and gbcodec_prepare). We fixed it by adding it. Fixes: c388ae7696992 ("greybus: audio: Update pm runtime support in dai_ops callback") Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20201109131347.1725288-2-zhangqilong3@huawei.com Signed-off-by: Greg Kroah-Hartman commit 8eddcca2a746d15f4b1e58274801f9d9acf7bbcc Author: Lee Jones Date: Thu Nov 12 10:58:54 2020 +0000 tty: tty_ldisc: Fix some kernel-doc related misdemeanours - Functions must follow directly on from their headers - Demote non-conforming kernel-doc header - Ensure notes have unique section names - Provide missing description for 'reinit' Fixes the following W=1 kernel build warning(s): drivers/tty/tty_ldisc.c:158: warning: cannot understand function prototype: 'int tty_ldisc_autoload = IS_BUILTIN(CONFIG_LDISC_AUTOLOAD); ' drivers/tty/tty_ldisc.c:199: warning: Function parameter or member 'ld' not described in 'tty_ldisc_put' drivers/tty/tty_ldisc.c:260: warning: duplicate section name 'Note' drivers/tty/tty_ldisc.c:717: warning: Function parameter or member 'reinit' not described in 'tty_ldisc_hangup' Cc: Greg Kroah-Hartman Cc: Jiri Slaby Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201112105857.2078977-2-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit bc0468ee4922b04e529da4734bfcd3f19152db8e Author: Yoshihiro Shimoda Date: Fri Nov 13 15:51:36 2020 +0900 dt-bindings: serial: renesas,scif: Document r8a779a0 bindings R-Car V3U (R8A779A0) SoC also has the R-Car Gen3 compatible SCIF ports, so document the SoC specific bindings. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Link: https://lore.kernel.org/r/1605250296-30570-1-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Greg Kroah-Hartman commit 59105f9cf6e28c51ed8c93cbc44f278caa3b2b4e Author: Lee Jones Date: Thu Nov 12 10:58:57 2020 +0000 tty: serial: pmac_zilog: Remove unused disposable variable 'garbage' Fixes the following W=1 kernel build warning(s): drivers/tty/serial/pmac_zilog.h:365:58: warning: variable ‘garbage’ set but not used [-Wunused-but-set-variable] Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: linux-serial@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201112105857.2078977-5-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit a609c58086e381c13bdad1ba97e6510a13d465e7 Author: Lee Jones Date: Thu Nov 12 10:58:55 2020 +0000 tty: serial: 8250: 8250_port: Move prototypes to shared location Fixes the following W=1 kernel build warning(s): drivers/tty/serial/8250/8250_port.c:349:14: warning: no previous prototype for ‘au_serial_in’ [-Wmissing-prototypes] drivers/tty/serial/8250/8250_port.c:359:6: warning: no previous prototype for ‘au_serial_out’ [-Wmissing-prototypes] Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Mike Hudson Cc: linux-serial@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201112105857.2078977-3-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit e625f3dede4a2df6df914b4a0fb3e49379676dfc Author: Fabio Estevam Date: Mon Nov 9 18:08:13 2020 -0300 usb: host: imx21-hcd: Remove the driver Since commit 4b563a066611 ("ARM: imx: Remove imx21 support") the imx21 SoC is no longer supported. Get rid of its USB driver too, which is now unused. Acked-by: Peter Chen Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20201109210813.21382-1-festevam@gmail.com Signed-off-by: Greg Kroah-Hartman commit 33ee67b47ba09fc30840668c9ccec5ad18c94de0 Author: Oder Chiou Date: Fri Nov 13 13:54:00 2020 +0800 ASoC: rt5682: Add a new property to the device tree. The patch adds a new property to the drice tree for the DMIC clcok driving. Signed-off-by: Oder Chiou Link: https://lore.kernel.org/r/20201113055400.11242-2-oder_chiou@realtek.com Signed-off-by: Mark Brown commit 7416f6bc5fcb1fe6700391c94b59ac1c744ad9d1 Author: Oder Chiou Date: Fri Nov 13 13:53:59 2020 +0800 ASoC: rt5682: Add a new property for the DMIC clock driving The patch adds a new property to set the DMIC clock driving. Signed-off-by: Oder Chiou Link: https://lore.kernel.org/r/20201113055400.11242-1-oder_chiou@realtek.com Signed-off-by: Mark Brown commit a6e9717a71fd825b6d18a532954d1f9daadcd875 Author: Pierre-Louis Bossart Date: Thu Nov 12 10:31:00 2020 -0600 ASoC: Intel: keembay: use inclusive language for bclk and fsync Use 'clock provider' and 'clock consumer' terms. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20201112163100.5081-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 84b53a366ebc45027e64f2e37001e4e602a93464 Author: Pierre-Louis Bossart Date: Thu Nov 12 10:30:59 2020 -0600 ASoC: Intel: atom: use inclusive language for SSP bclk/fsync Use 'provider' and 'consumer' terms. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20201112163100.5081-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit df132fa9daf4828598dbba553e1b2bb5cf36a715 Author: Pierre-Louis Bossart Date: Thu Nov 12 10:30:58 2020 -0600 ASoC: SOF: use inclusive language for bclk and fsync Mirror alsa-lib definitions w/ codec_provider (CP) and codec_consumer (CC). Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20201112163100.5081-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit f026c123001bcc15b78311495cec79a8b73c3cf2 Author: Pierre-Louis Bossart Date: Thu Nov 12 10:30:57 2020 -0600 ASoC: topology: use inclusive language for bclk and fsync Mirror suggested changes in alsa-lib. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20201112163100.5081-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 6a6516c024bb90058f835364b28ee8e1fee8037d Author: Lukas Bulwahn Date: Thu Nov 12 20:12:55 2020 +0100 USB: storage: avoid use of uninitialized values in error path When usb_stor_bulk_transfer_sglist() returns with USB_STOR_XFER_ERROR, it returns without writing to its parameter *act_len. Further, the two callers of usb_stor_bulk_transfer_sglist(): usb_stor_bulk_srb() and usb_stor_bulk_transfer_sg(), use the passed variable partial without checking the return value. Hence, the uninitialized value of partial is then used in the further execution of those two functions. Clang-analyzer detects this potential control and data flow and warns: drivers/usb/storage/transport.c:469:40: warning: The right operand of '-' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult] scsi_set_resid(srb, scsi_bufflen(srb) - partial); ^ drivers/usb/storage/transport.c:495:15: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign] length_left -= partial; ^ When a transfer error occurs, the *act_len value is probably ignored by the higher layers. But it won't hurt to set it to a valid number, just in case. For the two early-return paths in usb_stor_bulk_transfer_sglist(), the amount of data transferred is 0. So if act_len is not NULL, set *act_len to 0 in those paths. That makes clang-analyzer happy. Proposal was discussed in this mail thread: https://lore.kernel.org/linux-usb/alpine.DEB.2.21.2011112146110.13119@felia/ Reviewed-by: Nathan Chancellor Acked-by: Alan Stern Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20201112191255.13372-1-lukas.bulwahn@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1d6903a617a221f9d8295847ffaa3c39cd6b13ba Author: Nick Desaulniers Date: Tue Nov 10 17:47:14 2020 -0800 usb: fix a few cases of -Wfallthrough The "fallthrough" pseudo-keyword was added as a portable way to denote intentional fallthrough. Clang will still warn on cases where there is a fallthrough to an immediate break. Add explicit breaks for those cases. Reviewed-by: Nathan Chancellor Signed-off-by: Nick Desaulniers Link: https://lore.kernel.org/r/20201111014716.260633-1-ndesaulniers@google.com Signed-off-by: Greg Kroah-Hartman commit a7319c8f50c5e93a12997e2d0821a2f7946fb734 Author: Dan Carpenter Date: Fri Nov 13 13:15:02 2020 +0300 drm/udl: Fix missing error code in udl_handle_damage() If udl_get_urb() fails then this should return a negative error code but currently it returns success. Fixes: 798ce3fe1c3a ("drm/udl: Begin/end access to imported buffers in damage-handler") Signed-off-by: Dan Carpenter Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20201113101502.GD168908@mwanda commit 8d0dd23c6c78d140ed2132f523592ddb4cea839f Author: Tal Zussman Date: Thu Nov 12 16:56:57 2020 -0500 syscalls: Fix file comments for syscalls implemented in kernel/sys.c The relevant syscalls were previously moved from kernel/timer.c to kernel/sys.c, but the comments weren't updated to reflect this change. Fixing these comments messes up the alphabetical ordering of syscalls by filename. This could be fixed by merging the two groups of kernel/sys.c syscalls, but that would require reordering the syscalls and renumbering them to maintain the numerical order in unistd.h. Signed-off-by: Tal Zussman Link: https://lore.kernel.org/r/20201112215657.GA4539@charmander' Signed-off-by: Arnd Bergmann commit e6b4516815b61a9e6d27a31edf385d34c8009691 Author: Vignesh Raghavendra Date: Thu Oct 29 10:39:50 2020 +0530 arm64: dts: ti: k3-j7200-mcu-wakeup: Enable ADC support J7200 has a single instance of 8 channel ADC in MCU domain. Add DT node for the same. Signed-off-by: Vignesh Raghavendra Signed-off-by: Nishanth Menon Reviewed-by: Sekhar Nori Link: https://lore.kernel.org/r/20201029050950.4500-1-vigneshr@ti.com commit 6bbdb46c4b1bd57839c9c0a110bd81b0be0a4046 Author: Qinglang Miao Date: Tue Nov 10 15:42:21 2020 +0800 firmware: arm_scmi: Fix missing destroy_workqueue() destroy_workqueue is required before the return from scmi_notification_init in case devm_kcalloc fails to allocate registered_protocols. Fix this by simply moving registered_protocols allocation before alloc_workqueue. Link: https://lore.kernel.org/r/20201110074221.41235-1-miaoqinglang@huawei.com Fixes: bd31b249692e ("firmware: arm_scmi: Add notification dispatch and delivery") Suggested-by: Cristian Marussi Reviewed-by: Cristian Marussi Signed-off-by: Qinglang Miao Signed-off-by: Sudeep Holla commit a6fbd0ab3d7a1a02e61733a80c22fb01c65819b9 Author: Ira Weiny Date: Thu Nov 12 09:42:44 2020 -0800 fs/ext2: Use ext2_put_page There are 3 places in namei.c where the equivalent of ext2_put_page() is open coded on a page which was returned from the ext2_get_page() call [through the use of ext2_find_entry() and ext2_dotdot()]. Move ext2_put_page() to ext2.h and use it in namei.c Also add a comment regarding the proper way to release the page returned from ext2_find_entry() and ext2_dotdot(). Link: https://lore.kernel.org/r/20201112174244.701325-1-ira.weiny@intel.com Signed-off-by: Ira Weiny Signed-off-by: Jan Kara commit c4fc6328d6c67690a7e6e03f43a5a976a13120ef Author: Ard Biesheuvel Date: Fri Nov 6 17:39:38 2020 +0100 crypto: arm64/chacha - simplify tail block handling Based on lessons learnt from optimizing the 32-bit version of this driver, we can simplify the arm64 version considerably, by reordering the final two stores when the last block is not a multiple of 64 bytes. This removes the need to use permutation instructions to calculate the elements that are clobbered by the final overlapping store, given that the store of the penultimate block now follows it, and that one carries the correct values for those elements already. While at it, simplify the overlapping loads as well, by calculating the address of the final overlapping load upfront, and switching to this address for every load that would otherwise extend past the end of the source buffer. There is no impact on performance, but the resulting code is substantially smaller and easier to follow. Cc: Eric Biggers Cc: "Jason A . Donenfeld" Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 9c0cef2364750c00ab380cc8902dbbc91e230183 Author: Jack Xu Date: Fri Nov 6 19:28:10 2020 +0800 crypto: qat - add gen4 firmware loader Add support for the QAT gen4 devices in the firmware loader. Signed-off-by: Jack Xu Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 2778d64cf3f5517642555781df5628488e7d8186 Author: Jack Xu Date: Fri Nov 6 19:28:09 2020 +0800 crypto: qat - add support for broadcasting mode Add support for broadcasting mode in firmware loader to enable the next generation of QAT devices. Signed-off-by: Jack Xu Co-developed-by: Wojciech Ziemba Signed-off-by: Wojciech Ziemba Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit bd684d83c789dd4882a539075e45d46011a95bdf Author: Jack Xu Date: Fri Nov 6 19:28:08 2020 +0800 crypto: qat - add support for shared ustore Add support for shared ustore mode support. This is required by the next generation of QAT devices to share the same fw image across engines. Signed-off-by: Jack Xu Co-developed-by: Wojciech Ziemba Signed-off-by: Wojciech Ziemba Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 244f572cebec71f7a79a94706eded4d2213a4f1b Author: Jack Xu Date: Fri Nov 6 19:28:07 2020 +0800 crypto: qat - allow to target specific AEs Introduce new API, qat_uclo_set_cfg_ae_mask(), to allow the load of the firmware image to a subset of Acceleration Engines (AEs). This is required by the next generation of QAT devices to be able to load different firmware images to the device. Signed-off-by: Jack Xu Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit d707d3f23e69181da71877b2a687560fdad81ad0 Author: Jack Xu Date: Fri Nov 6 19:28:06 2020 +0800 crypto: qat - add FCU CSRs to chip info Add firmware control unit (FCU) CSRs to chip info so the firmware authentication code is common between all devices. Signed-off-by: Jack Xu Co-developed-by: Wojciech Ziemba Signed-off-by: Wojciech Ziemba Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 9e0f74b717e41811921e647e7a6121cc55987f41 Author: Jack Xu Date: Fri Nov 6 19:28:05 2020 +0800 crypto: qat - add CSS3K support Add support for CSS3K, which uses RSA3K as image signature algorithm, to support the next generation of QAT devices. Signed-off-by: Jack Xu Co-developed-by: Wojciech Ziemba Signed-off-by: Wojciech Ziemba Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit bf8313c71c887c3c8676c23a20b6f8eb1d56bd4f Author: Jack Xu Date: Fri Nov 6 19:28:04 2020 +0800 crypto: qat - use ae_mask Use ae_mask to decide which Accelerator Engine (AE) to target in AE related operations, instead of a sequential loop, to skip AEs that are fused out. Signed-off-by: Jack Xu Co-developed-by: Wojciech Ziemba Signed-off-by: Wojciech Ziemba Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 912eebeb72b499de3b25cda9e2b9e3f5e91bed12 Author: Jack Xu Date: Fri Nov 6 19:28:03 2020 +0800 crypto: qat - add check for null pointer Add null pointer check when freeing the memory for firmware. Signed-off-by: Jack Xu Co-developed-by: Wojciech Ziemba Signed-off-by: Wojciech Ziemba Signed-off-by: Herbert Xu commit 4f1e941560e1c29299c3b1b9f90f4aea790d12dc Author: Jack Xu Date: Fri Nov 6 19:28:02 2020 +0800 crypto: qat - add misc control CSR to chip info Add misc control CSR to chip info since the CSR offset will be different in the next generation of QAT devices. Signed-off-by: Jack Xu Co-developed-by: Wojciech Ziemba Signed-off-by: Wojciech Ziemba Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit c4909d327cc3b001583de29fde988a22856a5b38 Author: Jack Xu Date: Fri Nov 6 19:28:01 2020 +0800 crypto: qat - add wake up event to chip info Add the wake up event to chip info since this value will be different in the next generation of QAT devices. Signed-off-by: Jack Xu Co-developed-by: Wojciech Ziemba Signed-off-by: Wojciech Ziemba Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 767358119fca655056eb7340eb8a0ec4652bc888 Author: Jack Xu Date: Fri Nov 6 19:28:00 2020 +0800 crypto: qat - add clock enable CSR to chip info Add global clock enable CSR to the chip info since the CSR offset will be different in the next generation of QAT devices. Signed-off-by: Jack Xu Co-developed-by: Wojciech Ziemba Signed-off-by: Wojciech Ziemba Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit cb439361a39bb8dcdd0856e9182e29678c8327af Author: Jack Xu Date: Fri Nov 6 19:27:59 2020 +0800 crypto: qat - add reset CSR and mask to chip info Add reset CSR offset and mask to chip info since they are different in new QAT devices. This also simplifies the reset/clrReset functions by using the reset mask. Signed-off-by: Jack Xu Co-developed-by: Wojciech Ziemba Signed-off-by: Wojciech Ziemba Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 4f07195d638e82a1a1f17f55d7aa8a74dacabfe9 Author: Jack Xu Date: Fri Nov 6 19:27:58 2020 +0800 crypto: qat - add local memory size to chip info Add the local memory size to the chip info since the size of this memory will be different in the next generation of QAT devices. Signed-off-by: Jack Xu Co-developed-by: Wojciech Ziemba Signed-off-by: Wojciech Ziemba Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 8b487ae26ad58abd602ab2d0cda6988306a6da20 Author: Jack Xu Date: Fri Nov 6 19:27:57 2020 +0800 crypto: qat - add support for lm2 and lm3 Add support for local memory lm2 and lm3 which is introduced in the next generation of QAT devices. Signed-off-by: Jack Xu Co-developed-by: Wojciech Ziemba Signed-off-by: Wojciech Ziemba Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit d25cf2c7a057d6c01e44d4696fde1d05bfec11bb Author: Jack Xu Date: Fri Nov 6 19:27:56 2020 +0800 crypto: qat - add next neighbor to chip_info Introduce the next neighbor (NN) capability in chip_info as NN registers are not supported in certain SKUs of QAT. Signed-off-by: Jack Xu Co-developed-by: Wojciech Ziemba Signed-off-by: Wojciech Ziemba Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 49c1327328ad2245bf06bffc2591d3eb99b51c60 Author: Jack Xu Date: Fri Nov 6 19:27:55 2020 +0800 crypto: qat - replace check based on DID Modify condition in qat_uclo_wr_mimage() to use a capability of the device (sram_visible), rather than the device ID, so the check is not specific to devices of the same type. Signed-off-by: Jack Xu Co-developed-by: Wojciech Ziemba Signed-off-by: Wojciech Ziemba Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit fc5f3f86e5afb4008c6dea054fe4df302edd84df Author: Jack Xu Date: Fri Nov 6 19:27:54 2020 +0800 crypto: qat - introduce chip info structure Introduce the chip info structure which contains device specific information. The initialization path has been split between common and hardware specific in order to facilitate the introduction of the next generation hardware. Signed-off-by: Jack Xu Co-developed-by: Wojciech Ziemba Signed-off-by: Wojciech Ziemba Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 58c173b9cb84aa40111c971d957980e4418a1c5e Author: Jack Xu Date: Fri Nov 6 19:27:53 2020 +0800 crypto: qat - refactor long expressions Replace long expressions with local variables in the functions qat_uclo_wr_uimage_page(), qat_uclo_init_globals() and qat_uclo_init_umem_seg() to improve readability. Signed-off-by: Jack Xu Co-developed-by: Wojciech Ziemba Signed-off-by: Wojciech Ziemba Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit ecb917ad0fc2bcc6c9f9e3db005c08f6e2d22f88 Author: Jack Xu Date: Fri Nov 6 19:27:52 2020 +0800 crypto: qat - refactor qat_uclo_set_ae_mode() Refactor qat_uclo_set_ae_mode() by moving the logic that sets the AE modes to a separate function, qat_hal_set_modes(). Signed-off-by: Jack Xu Co-developed-by: Wojciech Ziemba Signed-off-by: Wojciech Ziemba Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 97b9840195307a9af1c47bed69a63880a13bbb0d Author: Jack Xu Date: Fri Nov 6 19:27:51 2020 +0800 crypto: qat - move defines to header files Move the definition of ICP_QAT_AE_OFFSET, ICP_QAT_CAP_OFFSET, LOCAL_TO_XFER_REG_OFFSET and ICP_QAT_EP_OFFSET from qat_hal.c to icp_qat_hal.h to avoid the definition of generation specific constants in qat_hal.c. Signed-off-by: Jack Xu Co-developed-by: Wojciech Ziemba Signed-off-by: Wojciech Ziemba Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 8f87b6271ec85c09af6406665324c74bb79e3216 Author: Jack Xu Date: Fri Nov 6 19:27:50 2020 +0800 crypto: qat - remove global CSRs helpers Include the offset of GLOBAL_CSR directly into the enum hal_global_csr and remove the macros SET_GLB_CSR/GET_GLB_CSR to simplify the global CSR access. Signed-off-by: Jack Xu Co-developed-by: Wojciech Ziemba Signed-off-by: Wojciech Ziemba Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 10fb050caef99d75895bf0978188090d3ed676c2 Author: Jack Xu Date: Fri Nov 6 19:27:49 2020 +0800 crypto: qat - refactor AE start Change the API and the behaviour of the qat_hal_start() function. With this change, the function starts under the hood all acceleration engines (AEs) and there is no longer need to call it for each engine. Signed-off-by: Jack Xu Co-developed-by: Wojciech Ziemba Signed-off-by: Wojciech Ziemba Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 82b3230658a90e60c36b426b4ca8d176c4d7ebc8 Author: Jack Xu Date: Fri Nov 6 19:27:48 2020 +0800 crypto: qat - change micro word data mask Change micro word data mask since the Acceleration Engine (AE) instruction codes have been changed in the new generation QAT devices. Signed-off-by: Jack Xu Co-developed-by: Wojciech Ziemba Signed-off-by: Wojciech Ziemba Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit fe278bf35c59bbc9bc695dac58bfa7120ba125ba Author: Jack Xu Date: Fri Nov 6 19:27:47 2020 +0800 crypto: qat - change type for ctx_mask Change type for ctx_mask from unsigned char to unsigned long to avoid type casting. Signed-off-by: Jack Xu Co-developed-by: Wojciech Ziemba Signed-off-by: Wojciech Ziemba Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 72b67d9507b954b5b5f4cecb74bcefff61a28d8c Author: Jack Xu Date: Fri Nov 6 19:27:46 2020 +0800 crypto: qat - add support for relative FW ucode loading Improve the way micro instructions (FW code) are uploaded to Accelerator Engines (AEs). If code starts at PC zero (absolute addressing), read uwords with no relative address. Otherwise, use relative addressing to the page region. Signed-off-by: Jack Xu Co-developed-by: Wojciech Ziemba Signed-off-by: Wojciech Ziemba Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit ee103cf1f5af03ae300dcfdbe0f51ae12ce35dec Author: Jack Xu Date: Fri Nov 6 19:27:45 2020 +0800 crypto: qat - rename qat_uclo_del_uof_obj() Rename the function qat_uclo_del_uof_obj() in qat_uclo_del_obj() since it frees the memory allocated for all firmware objects. Signed-off-by: Jack Xu Co-developed-by: Wojciech Ziemba Signed-off-by: Wojciech Ziemba Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 54fa5d4bf71246906efc3cd85ebddbc961af3498 Author: Jack Xu Date: Fri Nov 6 19:27:44 2020 +0800 crypto: qat - introduce additional parenthesis Introduce additional parenthesis to resolve a warninga reported by checkpatch. Signed-off-by: Jack Xu Co-developed-by: Wojciech Ziemba Signed-off-by: Wojciech Ziemba Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 8ec0bee5d43e8582e6320dd9907d01c58844d3d3 Author: Jack Xu Date: Fri Nov 6 19:27:43 2020 +0800 crypto: qat - remove unnecessary parenthesis Remove unnecessary parenthesis across the firmware loader. Signed-off-by: Jack Xu Co-developed-by: Wojciech Ziemba Signed-off-by: Wojciech Ziemba Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit ed8fc0c1b9c72f016130244b6a46483576fe8e5a Author: Jack Xu Date: Fri Nov 6 19:27:42 2020 +0800 crypto: qat - fix error message Change message in error path of qat_uclo_check_image_compat() to report an incompatible firmware image that contains a neighbor register table. Signed-off-by: Jack Xu Co-developed-by: Wojciech Ziemba Signed-off-by: Wojciech Ziemba Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 49a6cccec4f89777a0ffd2a6d4c3b1af33636b3a Author: Jack Xu Date: Fri Nov 6 19:27:41 2020 +0800 crypto: qat - fix CSR access Do not mask the AE number with the AE mask when accessing the AE local CSRs. Bit 12 of the local CSR address is the start of AE number so just take out the AE mask here. Signed-off-by: Jack Xu Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 3b5c130fb2e4c045369791c33c83b59f6e84f7d6 Author: Jack Xu Date: Fri Nov 6 19:27:40 2020 +0800 crypto: qat - fix status check in qat_hal_put_rel_rd_xfer() The return value of qat_hal_rd_ae_csr() is always a CSR value and never a status and should not be stored in the status variable of qat_hal_put_rel_rd_xfer(). This removes the assignment as qat_hal_rd_ae_csr() is not expected to fail. A more comprehensive handling of the theoretical corner case which could result in a fail will be submitted in a separate patch. Fixes: 8c9478a400b7 ("crypto: qat - reduce stack size with KASAN") Signed-off-by: Jack Xu Reviewed-by: Giovanni Cabiddu Reviewed-by: Fiona Trahe Signed-off-by: Herbert Xu commit f21406b0511d53f9370d9de8713dea7c09f9f248 Author: Giovanni Cabiddu Date: Fri Nov 6 19:27:39 2020 +0800 crypto: qat - support for mof format in fw loader Implement infrastructure for the Multiple Object File (MOF) format in the firmware loader. This will allow to load a specific firmware image contained inside an MOF file. This patch is based on earlier work done by Pingchao Yang. Signed-off-by: Giovanni Cabiddu Reviewed-by: Jack Xu Signed-off-by: Herbert Xu commit cd078cb6a0f2e360b073b34f78a53b9410fa3e7a Author: Herbert Xu Date: Fri Nov 6 17:53:52 2020 +1100 crypto: cavium/nitrox - Fix sparse warnings This patch fixes all the sparse warnings in cavium/nitrox: - Fix endianness warnings by adding the correct markers to unions. - Add missing header inclusions for prototypes. - Move nitrox_sriov_configure prototype into the isr header file. Signed-off-by: Herbert Xu commit 802c6c3ef3bc3eeca95d3ad55642fb7a973d185a Author: Adam Guerin Date: Tue Nov 3 17:29:36 2020 +0000 crypto: qat - replace pci with PCI in comments Change all lower case pci in comments to be upper case PCI. Suggested-by: Andy Shevchenko Signed-off-by: Adam Guerin Reviewed-by: Giovanni Cabiddu Reviewed-by: Andy Shevchenko Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 86cd97ec4b943af35562a74688bc4e909b32c3d1 Author: Ard Biesheuvel Date: Tue Nov 3 17:28:09 2020 +0100 crypto: arm/chacha-neon - optimize for non-block size multiples The current NEON based ChaCha implementation for ARM is optimized for multiples of 4x the ChaCha block size (64 bytes). This makes sense for block encryption, but given that ChaCha is also often used in the context of networking, it makes sense to consider arbitrary length inputs as well. For example, WireGuard typically uses 1420 byte packets, and performing ChaCha encryption involves 5 invocations of chacha_4block_xor_neon() and 3 invocations of chacha_block_xor_neon(), where the last one also involves a memcpy() using a buffer on the stack to process the final chunk of 1420 % 64 == 12 bytes. Let's optimize for this case as well, by letting chacha_4block_xor_neon() deal with any input size between 64 and 256 bytes, using NEON permutation instructions and overlapping loads and stores. This way, the 140 byte tail of a 1420 byte input buffer can simply be processed in one go. This results in the following performance improvements for 1420 byte blocks, without significant impact on power-of-2 input sizes. (Note that Raspberry Pi is widely used in combination with a 32-bit kernel, even though the core is 64-bit capable) Cortex-A8 (BeagleBone) : 7% Cortex-A15 (Calxeda Midway) : 21% Cortex-A53 (Raspberry Pi 3) : 3% Cortex-A72 (Raspberry Pi 4) : 19% Cc: Eric Biggers Cc: "Jason A . Donenfeld" Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit ec3c5b32fccc537e7184dcf39387b2e57d12f517 Author: Adam Guerin Date: Mon Nov 2 17:04:54 2020 +0000 crypto: qat - remove cast for mailbox CSR Remove cast for mailbox CSR in adf_admin.c as it is not needed. Suggested-by: Andy Shevchenko Signed-off-by: Adam Guerin Reviewed-by: Giovanni Cabiddu Reviewed-by: Andy Shevchenko Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 6569e3097f1c4a490bdf2b23d326855e04942dfd Author: Jason A. Donenfeld Date: Mon Nov 2 14:48:15 2020 +0100 crypto: Kconfig - CRYPTO_MANAGER_EXTRA_TESTS requires the manager The extra tests in the manager actually require the manager to be selected too. Otherwise the linker gives errors like: ld: arch/x86/crypto/chacha_glue.o: in function `chacha_simd_stream_xor': chacha_glue.c:(.text+0x422): undefined reference to `crypto_simd_disabled_for_test' Fixes: 2343d1529aff ("crypto: Kconfig - allow tests to be disabled when manager is disabled") Signed-off-by: Jason A. Donenfeld Signed-off-by: Herbert Xu commit 404d59c57b26681a370eee059f9b8ad0f34327be Author: Sylwester Nawrocki Date: Thu Nov 12 15:09:30 2020 +0100 PM / devfreq: exynos-bus: Add registration of interconnect child device This patch adds registration of a child platform device for the exynos interconnect driver. It is assumed that the interconnect provider will only be needed when #interconnect-cells property is present in the bus DT node, hence the child device will be created only when such a property is present. Acked-by: Krzysztof Kozlowski Acked-by: Chanwoo Choi Signed-off-by: Sylwester Nawrocki Signed-off-by: Chanwoo Choi commit a04c75704678cce818c8250385c11d5efa0128c4 Author: Sylwester Nawrocki Date: Thu Nov 12 15:09:27 2020 +0100 dt-bindings: devfreq: Add documentation for the interconnect properties Add documentation for new optional properties in the exynos bus nodes: interconnects, #interconnect-cells, samsung,data-clock-ratio. These properties allow to specify the SoC interconnect structure which then allows the interconnect consumer devices to request specific bandwidth requirements. Acked-by: Krzysztof Kozlowski Acked-by: Chanwoo Choi Tested-by: Chanwoo Choi Acked-by: Rob Herring Signed-off-by: Artur Świgoń Signed-off-by: Sylwester Nawrocki Signed-off-by: Chanwoo Choi commit c1995e5afaf6abf3922b5395ad1f4096951e3276 Author: Tony Lindgren Date: Mon Nov 16 12:57:13 2020 +0200 soc: ti: omap-prm: Do not check rstst bit on deassert if already deasserted If a rstctrl reset bit is already deasserted, we can just bail out early not wait for rstst to clear. Otherwise we can have deassert fail for already deasserted resets. Fixes: c5117a78dd88 ("soc: ti: omap-prm: poll for reset complete during de-assert") Signed-off-by: Tony Lindgren commit cd536aa5b438351ea170d5e5f0cd75650eaab005 Author: Lee Jones Date: Thu Nov 12 23:34:13 2020 -0800 Input: imx6ul_tsc - remove set but unused variable 'value' Fixes the following W=1 kernel build warning(s): drivers/input/touchscreen/imx6ul_tsc.c: In function ‘adc_irq_fn’: drivers/input/touchscreen/imx6ul_tsc.c:307:6: warning: variable ‘value’ set but not used [-Wunused-but-set-variable] Signed-off-by: Lee Jones Reviewed-by: Haibo Chen Link: https://lore.kernel.org/r/20201112110204.2083435-6-lee.jones@linaro.org Signed-off-by: Dmitry Torokhov commit f1556986babffb0dd75970cd7a0563e3e1ee387a Author: Lee Jones Date: Thu Nov 12 23:27:03 2020 -0800 Input: samsung-keypad - remove set but unused variable 'var' Fixes the following W=1 kernel build warning(s): drivers/input/keyboard/samsung-keypad.c: In function ‘samsung_keypad_irq’: drivers/input/keyboard/samsung-keypad.c:149:15: warning: variable ‘val’ set but not used [-Wunused-but-set-variable] Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201112110204.2083435-3-lee.jones@linaro.org Signed-off-by: Dmitry Torokhov commit fec3124dc627c2cefc276534130898c3fb38dca1 Author: Lee Jones Date: Thu Nov 12 19:00:28 2020 +0000 drm/amd/amdgpu/amdgpu_cs: Add a couple of missing function param descriptions Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c:685: warning: Function parameter or member 'backoff' not described in 'amdgpu_cs_parser_fini' drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c:1655: warning: Function parameter or member 'map' not described in 'amdgpu_cs_find_mapping' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: Jerome Glisse Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 4a00eb184234d25d132a3516f5e8b879801d39ad Author: Lee Jones Date: Thu Nov 12 19:00:24 2020 +0000 drm/amd/amdgpu/amdgpu_display: Remove pointless header It seems only to repeat the function name. Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_display.c:450: warning: Function parameter or member 'amdgpu_connector' not described in 'amdgpu_display_ddc_probe' drivers/gpu/drm/amd/amdgpu/amdgpu_display.c:450: warning: Function parameter or member 'use_aux' not described in 'amdgpu_display_ddc_probe' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: report to Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 35c7fad94cb27733beed357d714798e07041ba26 Author: Lee Jones Date: Thu Nov 12 19:00:23 2020 +0000 drm/amd/amdgpu/amdgpu_ring: Fix a bunch of function misdocumentation Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:63: warning: Excess function parameter 'adev' description in 'amdgpu_ring_alloc' drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:122: warning: Excess function parameter 'adev' description in 'amdgpu_ring_commit' drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:167: warning: Function parameter or member 'max_dw' not described in 'amdgpu_ring_init' drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:167: warning: Function parameter or member 'irq_src' not described in 'amdgpu_ring_init' drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:167: warning: Function parameter or member 'irq_type' not described in 'amdgpu_ring_init' drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:167: warning: Function parameter or member 'hw_prio' not described in 'amdgpu_ring_init' drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:167: warning: Excess function parameter 'max_ndw' description in 'amdgpu_ring_init' drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:167: warning: Excess function parameter 'nop' description in 'amdgpu_ring_init' drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:285: warning: Excess function parameter 'adev' description in 'amdgpu_ring_fini' drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:325: warning: Function parameter or member 'ring' not described in 'amdgpu_ring_emit_reg_write_reg_wait_helper' drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:325: warning: Excess function parameter 'adev' description in 'amdgpu_ring_emit_reg_write_reg_wait_helper' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 75501872b4af93e228a23534a3f7a7b53da86e84 Author: Lee Jones Date: Thu Nov 12 19:00:21 2020 +0000 drm/amd/amdgpu/amdgpu_ttm: Demote non-conformant kernel-doc headers, fix slightly lacking ones Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:464: warning: Function parameter or member 'bo' not described in 'amdgpu_move_blit' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:464: warning: Function parameter or member 'evict' not described in 'amdgpu_move_blit' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:464: warning: Function parameter or member 'new_mem' not described in 'amdgpu_move_blit' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:464: warning: Function parameter or member 'old_mem' not described in 'amdgpu_move_blit' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:522: warning: Function parameter or member 'adev' not described in 'amdgpu_mem_visible' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:522: warning: Function parameter or member 'mem' not described in 'amdgpu_mem_visible' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:548: warning: Function parameter or member 'bo' not described in 'amdgpu_bo_move' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:548: warning: Function parameter or member 'evict' not described in 'amdgpu_bo_move' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:548: warning: Function parameter or member 'ctx' not described in 'amdgpu_bo_move' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:548: warning: Function parameter or member 'new_mem' not described in 'amdgpu_bo_move' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:548: warning: Function parameter or member 'hop' not described in 'amdgpu_bo_move' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:658: warning: Function parameter or member 'bdev' not described in 'amdgpu_ttm_io_mem_reserve' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:658: warning: Function parameter or member 'mem' not described in 'amdgpu_ttm_io_mem_reserve' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:751: warning: Function parameter or member 'bo' not described in 'amdgpu_ttm_tt_get_user_pages' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:751: warning: Function parameter or member 'pages' not described in 'amdgpu_ttm_tt_get_user_pages' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:855: warning: Function parameter or member 'ttm' not described in 'amdgpu_ttm_tt_get_user_pages_done' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:892: warning: Function parameter or member 'ttm' not described in 'amdgpu_ttm_tt_set_user_pages' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:892: warning: Function parameter or member 'pages' not described in 'amdgpu_ttm_tt_set_user_pages' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:906: warning: Function parameter or member 'bdev' not described in 'amdgpu_ttm_tt_pin_userptr' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:906: warning: Function parameter or member 'ttm' not described in 'amdgpu_ttm_tt_pin_userptr' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:944: warning: Function parameter or member 'bdev' not described in 'amdgpu_ttm_tt_unpin_userptr' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:944: warning: Function parameter or member 'ttm' not described in 'amdgpu_ttm_tt_unpin_userptr' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:1029: warning: Function parameter or member 'bdev' not described in 'amdgpu_ttm_backend_bind' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:1029: warning: Function parameter or member 'ttm' not described in 'amdgpu_ttm_backend_bind' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:1029: warning: Function parameter or member 'bo_mem' not described in 'amdgpu_ttm_backend_bind' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:1087: warning: Function parameter or member 'bo' not described in 'amdgpu_ttm_alloc_gart' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:1146: warning: Function parameter or member 'tbo' not described in 'amdgpu_ttm_recover_gart' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:1168: warning: Function parameter or member 'bdev' not described in 'amdgpu_ttm_backend_unbind' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:1168: warning: Function parameter or member 'ttm' not described in 'amdgpu_ttm_backend_unbind' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:1214: warning: Function parameter or member 'page_flags' not described in 'amdgpu_ttm_tt_create' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:1247: warning: Function parameter or member 'bdev' not described in 'amdgpu_ttm_tt_populate' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:1247: warning: Function parameter or member 'ttm' not described in 'amdgpu_ttm_tt_populate' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:1247: warning: Function parameter or member 'ctx' not described in 'amdgpu_ttm_tt_populate' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:1291: warning: Function parameter or member 'bdev' not described in 'amdgpu_ttm_tt_unpopulate' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:1291: warning: Function parameter or member 'ttm' not described in 'amdgpu_ttm_tt_unpopulate' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:1357: warning: Function parameter or member 'ttm' not described in 'amdgpu_ttm_tt_get_usermm' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:1376: warning: Function parameter or member 'ttm' not described in 'amdgpu_ttm_tt_affect_userptr' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:1376: warning: Function parameter or member 'start' not described in 'amdgpu_ttm_tt_affect_userptr' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:1376: warning: Function parameter or member 'end' not described in 'amdgpu_ttm_tt_affect_userptr' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:1397: warning: Function parameter or member 'ttm' not described in 'amdgpu_ttm_tt_is_userptr' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:1410: warning: Function parameter or member 'ttm' not described in 'amdgpu_ttm_tt_is_readonly' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:1449: warning: bad line: drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:1454: warning: Function parameter or member 'adev' not described in 'amdgpu_ttm_tt_pte_flags' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:1477: warning: Function parameter or member 'bo' not described in 'amdgpu_ttm_bo_eviction_valuable' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:1477: warning: Function parameter or member 'place' not described in 'amdgpu_ttm_bo_eviction_valuable' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:1787: warning: Function parameter or member 'adev' not described in 'amdgpu_ttm_init' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:1915: warning: Function parameter or member 'adev' not described in 'amdgpu_ttm_late_init' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:1926: warning: Function parameter or member 'adev' not described in 'amdgpu_ttm_fini' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:2250: warning: Function parameter or member 'f' not described in 'amdgpu_ttm_vram_read' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:2250: warning: Function parameter or member 'buf' not described in 'amdgpu_ttm_vram_read' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:2250: warning: Function parameter or member 'size' not described in 'amdgpu_ttm_vram_read' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:2250: warning: Function parameter or member 'pos' not described in 'amdgpu_ttm_vram_read' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:2285: warning: Function parameter or member 'f' not described in 'amdgpu_ttm_vram_write' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:2285: warning: Function parameter or member 'buf' not described in 'amdgpu_ttm_vram_write' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:2285: warning: Function parameter or member 'size' not described in 'amdgpu_ttm_vram_write' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:2285: warning: Function parameter or member 'pos' not described in 'amdgpu_ttm_vram_write' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:2336: warning: Function parameter or member 'f' not described in 'amdgpu_ttm_gtt_read' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:2336: warning: Function parameter or member 'buf' not described in 'amdgpu_ttm_gtt_read' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:2336: warning: Function parameter or member 'size' not described in 'amdgpu_ttm_gtt_read' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:2336: warning: Function parameter or member 'pos' not described in 'amdgpu_ttm_gtt_read' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:2390: warning: Function parameter or member 'f' not described in 'amdgpu_iomem_read' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:2390: warning: Function parameter or member 'buf' not described in 'amdgpu_iomem_read' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:2390: warning: Function parameter or member 'size' not described in 'amdgpu_iomem_read' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:2390: warning: Function parameter or member 'pos' not described in 'amdgpu_iomem_read' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:2446: warning: Function parameter or member 'f' not described in 'amdgpu_iomem_write' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:2446: warning: Function parameter or member 'buf' not described in 'amdgpu_iomem_write' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:2446: warning: Function parameter or member 'size' not described in 'amdgpu_iomem_write' drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:2446: warning: Function parameter or member 'pos' not described in 'amdgpu_iomem_write' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: Jerome Glisse Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit f02f8c32ee3642529017226d49afc1e058db23b0 Author: Lee Jones Date: Thu Nov 12 19:00:16 2020 +0000 drm/amd/amdgpu/amdgpu_fence: Fix some issues pertaining to function documentation Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c:139: warning: Function parameter or member 'flags' not described in 'amdgpu_fence_emit' drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c:197: warning: Function parameter or member 'timeout' not described in 'amdgpu_fence_emit_polling' drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c:302: warning: Function parameter or member 't' not described in 'amdgpu_fence_fallback' drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c:302: warning: Excess function parameter 'work' description in 'amdgpu_fence_fallback' drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c:320: warning: Excess function parameter 'adev' description in 'amdgpu_fence_wait_empty' drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c:649: warning: Function parameter or member 'f' not described in 'amdgpu_fence_enable_signaling' drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c:649: warning: Excess function parameter 'fence' description in 'amdgpu_fence_enable_signaling' drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c:684: warning: Function parameter or member 'f' not described in 'amdgpu_fence_release' drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c:684: warning: Excess function parameter 'fence' description in 'amdgpu_fence_release' drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c:749: warning: Function parameter or member 'm' not described in 'amdgpu_debugfs_gpu_recover' drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c:749: warning: Function parameter or member 'data' not described in 'amdgpu_debugfs_gpu_recover' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: Jerome Glisse Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 8970b698b0cee42da523b7c02ed6fe0567932b2a Author: Lee Jones Date: Thu Nov 12 19:00:15 2020 +0000 drm/amd/amdgpu/amdgpu_kms: Fix misnaming of parameter 'dev' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c:487: warning: Function parameter or member 'dev' not described in 'amdgpu_info_ioctl' drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c:487: warning: Excess function parameter 'adev' description in 'amdgpu_info_ioctl' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit a9f5f98f796ee93a865b9886bf7cb694cf124eb5 Author: Hawking Zhang Date: Sat Sep 5 23:11:17 2020 +0800 drm/amdgpu: check hive pointer before access in case it is an invalid one Signed-off-by: Hawking Zhang Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 3f66bf401e9fde1c35bb8b02dd7975659c40411d Author: Nirmoy Das Date: Mon Nov 9 17:04:51 2020 +0100 drm/amdgpu: fix compute queue priority if num_kcq is less than 4 Compute queues are configurable with module param, num_kcq. amdgpu_gfx_is_high_priority_compute_queue was setting 1st 4 queues to high priority queue leaving a null drm scheduler in adev->gpu_sched[hw_ip]["normal_prio"].sched if num_kcq < 5. This patch tries to fix it by alternating compute queue priority between normal and high priority. Fixes: 33abcb1f5a1719b1c (drm/amdgpu: set compute queue priority at mqd_init) Signed-off-by: Nirmoy Das Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 3617e579eba427ed1f6b86050fe678623184db74 Author: Bokun Zhang Date: Tue Nov 10 15:15:50 2020 -0500 drm/amd/amdgpu: Update VCN initizalization behvaior - Issue: In the original vcn3.0 code, it assumes that the VCN's init_status is always 1, even after the MMSCH updates the header. This is incorrect since by default, it should be set to 0, and MMSCH will update it to 1 if VCN is ready. - Fix: We need to read back the table header after send it to MMSCH. After that, if a VCN instance is not ready (host disabled it), we needs to disable the ring buffer as well. Signed-off-by: Bokun Zhang Reviewed-by: Monk Liu Signed-off-by: Alex Deucher commit 6bfbfe8c4591c53bf8435af1a0f45b575ba5f53e Author: John Clements Date: Wed Nov 11 16:51:19 2020 +0800 drm/amdgpu: add UMC to ip discovery map resolve issue with UMC base offset not being set correctly in ip discovery sequence Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit 8473c1387f6f23cd3d8174f5b87def48a3297bd4 Author: Hawking Zhang Date: Fri Oct 23 21:48:19 2020 +0800 drm/amdgpu: disable rom clock gating support for APUs ROM clock gating enable/disable is not supported on APU platform. (i.e. CGTT_ROM_CLK_CTRL0 register is not availabe on APU). SMUIO callbacks will check APU flag before enable/disable rom clock gating, and skip the programming. Accordingly, query clock gating status through CGTT_ROM_CLK_CTRL0 also doesn't support on APU platform. The change applies to RAVEN/RAVEN2/PICASSO/RENOIR. Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: John Clements Signed-off-by: Alex Deucher commit 0e961589f53e6d5164f308dd10c0e3c0b655f6ee Author: Hawking Zhang Date: Tue Oct 20 23:50:46 2020 +0800 drm/amdgpu: switch to use smuio callbacks for AI family Switch to smuio callbacks: use smuio v9_0 callbacks for Vega10/12, smuio v11_0 callbacks for Vega20/Arcturus. APUs don't support enable/disable rom clock gating and also don't support read bios from rom. So APU flag check is needed in clock gating callbacks and asic funciton for read bios from rom to prevent access unknown offset on APU. Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: John Clements Signed-off-by: Alex Deucher commit d1ffa512c635d5df81e18f2686b5e5060ca03f18 Author: Hawking Zhang Date: Wed Oct 21 00:00:19 2020 +0800 drm/amdgpu: implement smuio v11_0 callbacks Vega20/Arcturus will use smuio v11_0 callbacks Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: John Clements Signed-off-by: Alex Deucher commit 09aac699c3992c5ce12e82d3c9d1e4e19e1bd090 Author: Hawking Zhang Date: Tue Oct 20 23:59:12 2020 +0800 drm/amdgpu: implement smuio v9_0 callbacks Vega10/12 will use smuio v9_0 callbacks Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: John Clements Signed-off-by: Alex Deucher commit 293f256396aa8674cb3f1794f724fcb3aacdee24 Author: Hawking Zhang Date: Sat Nov 7 22:50:05 2020 +0800 drm/amdgpu: add amdgpu_smuio structure Add amdgpu_smuio structure in amdgpu_device to provide various callback functions to support smuio ip funcitonality Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: John Clements Signed-off-by: Alex Deucher commit 4d53f5219ba5b8d15a41b36773cc57d2cf767e77 Author: mengwang Date: Tue Nov 10 12:06:46 2020 +0800 drm/amd/pm: correct table_clk_vlt memory size due to replacing one-element array with flexible-array in struct phm_clock_voltage_dependency_table Add 1 to the size passed to kzalloc after replacing one-element array. There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. Refactor the code according to the use of a flexible-array member in struct phm_ppt_v1_mm_clock_voltage_dependency_table, instead of a one-element array, and use the struct_size() helper to calculate the size for the allocation. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays Signed-off-by: Mengbing Wang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 349a32898838a4b9b78d6258fe8b20c60029438d Author: Xiaojian Du Date: Fri Oct 30 16:10:09 2020 +0800 drm/amd/pm: update the swSMU headers for vangogh This patch is to update the swSMU headers for vangogh. Signed-off-by: Xiaojian Du Reviewed-by: Huang Rui Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit fd253334a2caa1682d496256e20fc7e4b2bb0032 Author: Xiaojian Du Date: Tue Nov 3 15:53:31 2020 +0800 drm/amd/pm: add the interface to dump smu metrics table for vangogh This patch is to add the interface to dump smu metrics table for vangogh. Signed-off-by: Xiaojian Du Reviewed-by: Huang Rui Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 55a79cc25b4904a8e31def614ad48c3fd45e3885 Author: Lee Jones Date: Tue Nov 10 19:31:07 2020 +0000 drm/radeon/sumo_dpm: Move 'sumo_get_pi()'s prototype into shared header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/sumo_dpm.c:81:25: warning: no previous prototype for ‘sumo_get_pi’ [-Wmissing-prototypes] 81 | struct sumo_power_info *sumo_get_pi(struct radeon_device *rdev) | ^~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 880d8dfc6f491a3bbbf0f190a41fb96aabd0dd72 Author: Lee Jones Date: Tue Nov 10 19:31:09 2020 +0000 drm/radeon/ni: Remove set but unused variable 'mc_shared_chmap' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/ni.c: In function ‘cayman_gpu_init’: drivers/gpu/drm/radeon/ni.c:880:6: warning: variable ‘mc_shared_chmap’ set but not used [-Wunused-but-set-variable] Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 59c0e925abb9a1d4a8064fe687e34f90c769b76e Author: Lee Jones Date: Tue Nov 10 19:30:56 2020 +0000 drm/radeon/evergreen_dma: Fix doc-rot of function parameter 'resv' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/evergreen_dma.c:112: warning: Function parameter or member 'resv' not described in 'evergreen_copy_dma' drivers/gpu/drm/radeon/evergreen_dma.c:112: warning: Excess function parameter 'fence' description in 'evergreen_copy_dma' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 33761307aa97c4c07c5bc3712717c207e4a35c9e Author: Lee Jones Date: Tue Nov 10 19:31:00 2020 +0000 drm/radeon/evergreen_cs: Fix misnaming issues surrounding 'p' param Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/evergreen_cs.c:1026: warning: Function parameter or member 'p' not described in 'evergreen_cs_packet_parse_vline' drivers/gpu/drm/radeon/evergreen_cs.c:1026: warning: Excess function parameter 'parser' description in 'evergreen_cs_packet_parse_vline' drivers/gpu/drm/radeon/evergreen_cs.c:1095: warning: Function parameter or member 'p' not described in 'evergreen_cs_handle_reg' drivers/gpu/drm/radeon/evergreen_cs.c:1095: warning: Excess function parameter 'parser' description in 'evergreen_cs_handle_reg' drivers/gpu/drm/radeon/evergreen_cs.c:1757: warning: Function parameter or member 'p' not described in 'evergreen_is_safe_reg' drivers/gpu/drm/radeon/evergreen_cs.c:1757: warning: Excess function parameter 'parser' description in 'evergreen_is_safe_reg' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit f934f9379eca929dc89ea2d3570b2da143067190 Author: Lee Jones Date: Tue Nov 10 19:30:57 2020 +0000 drm/radeon/cik_sdma: Demote vague attempt at kernel-doc Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/cik_sdma.c:949: warning: Function parameter or member 'ring' not described in 'cik_dma_vm_flush' drivers/gpu/drm/radeon/cik_sdma.c:949: warning: Function parameter or member 'vm_id' not described in 'cik_dma_vm_flush' drivers/gpu/drm/radeon/cik_sdma.c:949: warning: Function parameter or member 'pd_addr' not described in 'cik_dma_vm_flush' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 0f4d60c33481cb2a13d0cd0d97268bc380e4ce2e Author: Lee Jones Date: Tue Nov 10 19:30:59 2020 +0000 drm/radeon/r600_cs: Fix some doc-rot and supply missing function param docs Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/r600_cs.c:793: warning: Function parameter or member 'p' not described in 'r600_cs_packet_parse_vline' drivers/gpu/drm/radeon/r600_cs.c:793: warning: Excess function parameter 'parser' description in 'r600_cs_packet_parse_vline' drivers/gpu/drm/radeon/r600_cs.c:826: warning: Function parameter or member 'p' not described in 'r600_cs_common_vline_parse' drivers/gpu/drm/radeon/r600_cs.c:826: warning: Excess function parameter 'parser' description in 'r600_cs_common_vline_parse' drivers/gpu/drm/radeon/r600_cs.c:968: warning: Function parameter or member 'p' not described in 'r600_cs_check_reg' drivers/gpu/drm/radeon/r600_cs.c:968: warning: Excess function parameter 'parser' description in 'r600_cs_check_reg' drivers/gpu/drm/radeon/r600_cs.c:1473: warning: Function parameter or member 'base_offset' not described in 'r600_check_texture_resource' drivers/gpu/drm/radeon/r600_cs.c:1473: warning: Function parameter or member 'mip_offset' not described in 'r600_check_texture_resource' drivers/gpu/drm/radeon/r600_cs.c:1473: warning: Function parameter or member 'tiling_flags' not described in 'r600_check_texture_resource' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 0d8357c26a9a9327310ff9a64af5d3e937351402 Author: Lee Jones Date: Tue Nov 10 19:30:58 2020 +0000 drm/radeon/r100: Fix some kernel-doc formatting, misnaming and missing issues Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/r100.c:163: warning: Function parameter or member 'async' not described in 'r100_page_flip' drivers/gpu/drm/radeon/r100.c:848: warning: Function parameter or member 'rdev' not described in 'r100_ring_hdp_flush' drivers/gpu/drm/radeon/r100.c:848: warning: Function parameter or member 'ring' not described in 'r100_ring_hdp_flush' drivers/gpu/drm/radeon/r100.c:1425: warning: Function parameter or member 'p' not described in 'r100_cs_packet_parse_vline' drivers/gpu/drm/radeon/r100.c:1425: warning: Excess function parameter 'parser' description in 'r100_cs_packet_parse_vline' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit d029ed568045b0c174a1dad5b465593a2dd0821f Author: Lee Jones Date: Tue Nov 10 19:30:55 2020 +0000 drm/radeon/radeon_mn: Supply description for 'cur_seq' even if it is unused Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_mn.c:51: warning: Function parameter or member 'cur_seq' not described in 'radeon_mn_invalidate' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit bf81a58144d241ff26a891218a5214d2e3586200 Author: Lee Jones Date: Tue Nov 10 19:30:50 2020 +0000 drm/radeon/ci_dpm: Remove set but unused variable 'dpm_event_src' And the piece of code that has never been executed. Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/ci_dpm.c: In function ‘ci_set_dpm_event_sources’: drivers/gpu/drm/radeon/ci_dpm.c:1369:28: warning: variable ‘dpm_event_src’ set but not used [-Wunused-but-set-variable] Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 7c1f03e02379f0b14251613779fd06e30419b148 Author: Lee Jones Date: Tue Nov 10 19:30:53 2020 +0000 drm/radeon/radeon_ib: Supply description for 'radeon_ib_get's get param Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_ib.c:61: warning: Function parameter or member 'vm' not described in 'radeon_ib_get' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 0f3e7b012b309d9663a915af961618d6f25a1d34 Author: Lee Jones Date: Tue Nov 10 19:30:52 2020 +0000 drm/radeon/radeon_sync: Add description for function param 'rdev' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_sync.c:92: warning: Function parameter or member 'rdev' not described in 'radeon_sync_resv' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 2c07b82719ea13ab8a8f6e35c22e69e33981242c Author: Lee Jones Date: Tue Nov 10 19:30:54 2020 +0000 drm/radeon/radeon_dp_mst: Remove unused variable 'ret' from radeon_mst_encoder_dpms() Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_dp_mst.c: In function ‘radeon_mst_encoder_dpms’: drivers/gpu/drm/radeon/radeon_dp_mst.c:366:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 3c8ea32252767a4b430e4747e2200c7fd8b13525 Author: Lee Jones Date: Tue Nov 10 19:30:48 2020 +0000 drm/radeon/trinity_dpm: Remove some defined but never used arrays Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/trinity_dpm.c:146:18: warning: ‘trinity_sysls_default’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/radeon/trinity_dpm.c:131:18: warning: ‘trinity_mgcg_shls_disable’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/radeon/trinity_dpm.c:120:18: warning: ‘trinity_mgcg_shls_enable’ defined but not used [-Wunused-const-variable=] Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 995b2e736958fecf27ada0d5988d6db0323727b4 Author: Lee Jones Date: Tue Nov 10 19:30:49 2020 +0000 drm/radeon/kv_dpm: Strip out unused functions and their tables These haven't been used since the driver was upstreamed in 2013. Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/kv_dpm.c:161:40: warning: ‘cpl_cac_config_reg’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/radeon/kv_dpm.c:156:40: warning: ‘mc3_cac_config_reg’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/radeon/kv_dpm.c:151:40: warning: ‘mc2_cac_config_reg’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/radeon/kv_dpm.c:146:40: warning: ‘mc1_cac_config_reg’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/radeon/kv_dpm.c:141:40: warning: ‘mc0_cac_config_reg’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/radeon/kv_dpm.c:136:40: warning: ‘sx0_cac_config_reg’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/radeon/kv_dpm.c:104:43: warning: ‘cpl_local_cac_cfg_kv’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/radeon/kv_dpm.c:98:43: warning: ‘mc3_local_cac_cfg_kv’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/radeon/kv_dpm.c:92:43: warning: ‘mc2_local_cac_cfg_kv’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/radeon/kv_dpm.c:86:43: warning: ‘mc1_local_cac_cfg_kv’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/radeon/kv_dpm.c:80:43: warning: ‘mc0_local_cac_cfg_kv’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/radeon/kv_dpm.c:67:43: warning: ‘sx_local_cac_cfg_kv’ defined but not used [-Wunused-const-variable=] Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 4a347d8061081f72369e0b16b12d99442de77f40 Author: Lee Jones Date: Tue Nov 10 19:30:51 2020 +0000 drm/radeon/radeon_vm: Fix some function parameter documentation Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_vm.c:131: warning: Function parameter or member 'rdev' not described in 'radeon_vm_get_bos' drivers/gpu/drm/radeon/radeon_vm.c:643: warning: Excess function parameter 'start' description in 'radeon_vm_update_page_directory' drivers/gpu/drm/radeon/radeon_vm.c:643: warning: Excess function parameter 'end' description in 'radeon_vm_update_page_directory' drivers/gpu/drm/radeon/radeon_vm.c:819: warning: Function parameter or member 'ib' not described in 'radeon_vm_update_ptes' drivers/gpu/drm/radeon/radeon_vm.c:915: warning: Function parameter or member 'bo_va' not described in 'radeon_vm_bo_update' drivers/gpu/drm/radeon/radeon_vm.c:915: warning: Excess function parameter 'vm' description in 'radeon_vm_bo_update' drivers/gpu/drm/radeon/radeon_vm.c:915: warning: Excess function parameter 'bo' description in 'radeon_vm_bo_update' drivers/gpu/drm/radeon/radeon_vm.c:1155: warning: Excess function parameter 'vm' description in 'radeon_vm_bo_invalidate' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 81fa5cc39ca6bf5c5d7230d01df5e620714b0717 Author: Lee Jones Date: Tue Nov 10 19:30:47 2020 +0000 drm/radeon/cik: Remove set but unused variable 'mc_shared_chmap' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/cik.c: In function ‘cik_gpu_init’: drivers/gpu/drm/radeon/cik.c:3180:6: warning: variable ‘mc_shared_chmap’ set but not used [-Wunused-but-set-variable] Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 19278157f8936f4ca6d59f6888ace52a6f85d096 Author: Lee Jones Date: Tue Nov 10 19:30:45 2020 +0000 drm/radeon/ni: Demote vague attempt at function header doc Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/ni.c: In function ‘cayman_gpu_init’: drivers/gpu/drm/radeon/ni.c:2679: warning: Function parameter or member 'ring' not described in 'cayman_vm_flush' drivers/gpu/drm/radeon/ni.c:2679: warning: Function parameter or member 'vm_id' not described in 'cayman_vm_flush' drivers/gpu/drm/radeon/ni.c:2679: warning: Function parameter or member 'pd_addr' not described in 'cayman_vm_flush' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit c317fcbbffe6d452fab4d3b3db734028ce5e10f8 Author: Lee Jones Date: Tue Nov 10 19:30:46 2020 +0000 drm/radeon/si: Remove set but unused variable 'mc_shared_chmap' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/si.c: In function ‘si_gpu_init’: drivers/gpu/drm/radeon/si.c:3090:6: warning: variable ‘mc_shared_chmap’ set but not used [-Wunused-but-set-variable] Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 901e860c7bdf12a88bfb8d77e8344a6512a0ba84 Author: Lee Jones Date: Tue Nov 10 19:30:43 2020 +0000 drm/radeon/evergreen: Add comment for 'evergreen_page_flip()'s 'async' param Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/evergreen.c: In function ‘evergreen_gpu_init’: drivers/gpu/drm/radeon/evergreen.c:1419: warning: Function parameter or member 'async' not described in 'evergreen_page_flip' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit ca648e3835d64e39518aa4058c8adc6d28d780a0 Author: Lee Jones Date: Tue Nov 10 19:30:44 2020 +0000 drm/radeon/evergreen: Remove set but unused variable 'mc_shared_chmap' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/evergreen.c: In function ‘evergreen_gpu_init’: drivers/gpu/drm/radeon/evergreen.c:3135:6: warning: variable ‘mc_shared_chmap’ set but not used [-Wunused-but-set-variable] Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 28ae8ea489c397f679ca9e0bff05abc41b11e5cb Author: Lee Jones Date: Mon Nov 9 21:18:55 2020 +0000 drm/radeon/cik: Fix a bunch of function parameter descriptions Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/cik.c:1869:5: warning: no previous prototype for ‘ci_mc_load_microcode’ [-Wmissing-prototypes] drivers/gpu/drm/radeon/cik.c: In function ‘cik_gpu_init’: drivers/gpu/drm/radeon/cik.c:3181:6: warning: variable ‘mc_shared_chmap’ set but not used [-Wunused-but-set-variable] drivers/gpu/drm/radeon/cik.c: At top level: drivers/gpu/drm/radeon/cik.c:4852:5: warning: no previous prototype for ‘cik_gpu_check_soft_reset’ [-Wmissing-prototypes] drivers/gpu/drm/radeon/cik.c:5850:6: warning: no previous prototype for ‘cik_enter_rlc_safe_mode’ [-Wmissing-prototypes] drivers/gpu/drm/radeon/cik.c:5871:6: warning: no previous prototype for ‘cik_exit_rlc_safe_mode’ [-Wmissing-prototypes] drivers/gpu/drm/radeon/cik.c:6289:6: warning: no previous prototype for ‘cik_update_cg’ [-Wmissing-prototypes] drivers/gpu/drm/radeon/cik.c:6421:6: warning: no previous prototype for ‘cik_init_cp_pg_table’ [-Wmissing-prototypes] drivers/gpu/drm/radeon/cik.c:6678:5: warning: no previous prototype for ‘cik_get_csb_size’ [-Wmissing-prototypes] drivers/gpu/drm/radeon/cik.c:6710:6: warning: no previous prototype for ‘cik_get_csb_buffer’ [-Wmissing-prototypes] drivers/gpu/drm/radeon/cik.c:3084: warning: Function parameter or member 'max_rb_num_per_se' not described in 'cik_get_rb_disabled' drivers/gpu/drm/radeon/cik.c:3084: warning: Excess function parameter 'max_rb_num' description in 'cik_get_rb_disabled' drivers/gpu/drm/radeon/cik.c:3084: warning: Excess function parameter 'se_num' description in 'cik_get_rb_disabled' drivers/gpu/drm/radeon/cik.c:3114: warning: Function parameter or member 'max_rb_num_per_se' not described in 'cik_setup_rb' drivers/gpu/drm/radeon/cik.c:3114: warning: Excess function parameter 'max_rb_num' description in 'cik_setup_rb' drivers/gpu/drm/radeon/cik.c:5662: warning: Function parameter or member 'mc_client' not described in 'cik_vm_decode_fault' drivers/gpu/drm/radeon/cik.c:5690: warning: Function parameter or member 'ring' not described in 'cik_vm_flush' drivers/gpu/drm/radeon/cik.c:5690: warning: Function parameter or member 'vm_id' not described in 'cik_vm_flush' drivers/gpu/drm/radeon/cik.c:5690: warning: Function parameter or member 'pd_addr' not described in 'cik_vm_flush' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 6653672acfc825f0251d0f51f367b5e53411eb93 Author: Lee Jones Date: Mon Nov 9 21:18:54 2020 +0000 drm/radeon/r600: Fix a misnamed parameter description and a formatting issue Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/r600.c:2965: warning: Function parameter or member 'resv' not described in 'r600_copy_cpdma' drivers/gpu/drm/radeon/r600.c:2965: warning: Excess function parameter 'fence' description in 'r600_copy_cpdma' drivers/gpu/drm/radeon/r600.c:4382: warning: Function parameter or member 'rdev' not described in 'r600_mmio_hdp_flush' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 3af7bbe22430402e9c36ba8ab73238cdeca408bf Author: Lee Jones Date: Mon Nov 9 21:18:53 2020 +0000 drm/radeon/radeon_display: Fix function doc formatting and missing param issues Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_display.c:264: warning: Function parameter or member '__work' not described in 'radeon_unpin_work_func' drivers/gpu/drm/radeon/radeon_display.c:406: warning: Function parameter or member '__work' not described in 'radeon_flip_work_func' drivers/gpu/drm/radeon/radeon_display.c:956: warning: Function parameter or member 'freq' not described in 'radeon_compute_pll_avivo' drivers/gpu/drm/radeon/radeon_display.c:956: warning: Function parameter or member 'fb_div_p' not described in 'radeon_compute_pll_avivo' drivers/gpu/drm/radeon/radeon_display.c:956: warning: Function parameter or member 'frac_fb_div_p' not described in 'radeon_compute_pll_avivo' drivers/gpu/drm/radeon/radeon_display.c:956: warning: Function parameter or member 'ref_div_p' not described in 'radeon_compute_pll_avivo' drivers/gpu/drm/radeon/radeon_display.c:956: warning: Function parameter or member 'post_div_p' not described in 'radeon_compute_pll_avivo' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: report to Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit f5ef92b5af0f602c2e916e7c2ffffc3d5e184784 Author: Lee Jones Date: Mon Nov 9 21:18:47 2020 +0000 drm/radeon/radeon_cs: Fix a bunch of doc-rot issues Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_cs.c:416: warning: Function parameter or member 'backoff' not described in 'radeon_cs_parser_fini' drivers/gpu/drm/radeon/radeon_cs.c:735: warning: Function parameter or member 'p' not described in 'radeon_cs_packet_parse' drivers/gpu/drm/radeon/radeon_cs.c:735: warning: Function parameter or member 'idx' not described in 'radeon_cs_packet_parse' drivers/gpu/drm/radeon/radeon_cs.c:735: warning: Excess function parameter 'parser' description in 'radeon_cs_packet_parse' drivers/gpu/drm/radeon/radeon_cs.c:844: warning: Function parameter or member 'p' not described in 'radeon_cs_packet_next_reloc' drivers/gpu/drm/radeon/radeon_cs.c:844: warning: Function parameter or member 'cs_reloc' not described in 'radeon_cs_packet_next_reloc' drivers/gpu/drm/radeon/radeon_cs.c:844: warning: Function parameter or member 'nomm' not described in 'radeon_cs_packet_next_reloc' drivers/gpu/drm/radeon/radeon_cs.c:844: warning: Excess function parameter 'parser' description in 'radeon_cs_packet_next_reloc' drivers/gpu/drm/radeon/radeon_cs.c:844: warning: Excess function parameter 'data' description in 'radeon_cs_packet_next_reloc' drivers/gpu/drm/radeon/radeon_cs.c:844: warning: Excess function parameter 'offset_start' description in 'radeon_cs_packet_next_reloc' drivers/gpu/drm/radeon/radeon_cs.c:844: warning: Excess function parameter 'offset_mask' description in 'radeon_cs_packet_next_reloc' drivers/gpu/drm/radeon/radeon_cs.c:844: warning: Excess function parameter 'reloc' description in 'radeon_cs_packet_next_reloc' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: Jerome Glisse Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 4b7ec10bb7aeef279cf92598837a19aa9464c7f0 Author: Lee Jones Date: Mon Nov 9 21:18:46 2020 +0000 drm/radeon/r600: Strip out set but unused 'tmp' variables Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/r600.c: In function ‘r600_pcie_gart_tlb_flush’: drivers/gpu/drm/radeon/r600.c:1083:7: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable] drivers/gpu/drm/radeon/r600.c: At top level: drivers/gpu/drm/radeon/r600.c: In function ‘r600_mmio_hdp_flush’: drivers/gpu/drm/radeon/r600.c:4393:7: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable] Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit b4391459605cddb55e3399cc3712ba69b61f309e Author: Lee Jones Date: Mon Nov 9 21:18:45 2020 +0000 drm/radeon/radeon_ring: Add missing function parameters 'rdev' and 'data' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_ring.c:226: warning: Function parameter or member 'rdev' not described in 'radeon_ring_unlock_undo' drivers/gpu/drm/radeon/radeon_ring.c:240: warning: Function parameter or member 'rdev' not described in 'radeon_ring_lockup_update' drivers/gpu/drm/radeon/radeon_ring.c:283: warning: Function parameter or member 'data' not described in 'radeon_ring_backup' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit e64e3ca1a3ac6a2d029fb4be57e57249439d4190 Author: Lee Jones Date: Mon Nov 9 21:18:43 2020 +0000 drm/radeon/radeon_i2c: Remove pointless function header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_i2c.c:46: warning: Function parameter or member 'radeon_connector' not described in 'radeon_ddc_probe' drivers/gpu/drm/radeon/radeon_i2c.c:46: warning: Function parameter or member 'use_aux' not described in 'radeon_ddc_probe' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 1f012246047756f6c8457a537500c400b1cf845b Author: Lee Jones Date: Mon Nov 9 21:18:42 2020 +0000 drm/radeon/radeon_display: Remove unused variable 'mod' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_display.c: In function ‘radeon_div’: drivers/gpu/drm/radeon/radeon_display.c:1094:11: warning: variable ‘mod’ set but not used [-Wunused-but-set-variable] Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: report to Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit a27d120527a58fa97b046afadc5aa770b8563335 Author: Lee Jones Date: Mon Nov 9 21:18:41 2020 +0000 drm/radeon/radeon_connectors: Strip out set but unused variable 'ret' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_connectors.c: In function ‘radeon_setup_mst_connector’: drivers/gpu/drm/radeon/radeon_connectors.c:2574:7: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit de1d598b678c7c11f39838e9f81f7220ed127858 Author: Lee Jones Date: Mon Nov 9 21:18:38 2020 +0000 drm/radeon/radeon_fence: Demote some non-conformant kernel-doc headers and fix another Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_fence.c:168: warning: Function parameter or member 'wait' not described in 'radeon_fence_check_signaled' drivers/gpu/drm/radeon/radeon_fence.c:168: warning: Function parameter or member 'mode' not described in 'radeon_fence_check_signaled' drivers/gpu/drm/radeon/radeon_fence.c:168: warning: Function parameter or member 'flags' not described in 'radeon_fence_check_signaled' drivers/gpu/drm/radeon/radeon_fence.c:168: warning: Function parameter or member 'key' not described in 'radeon_fence_check_signaled' drivers/gpu/drm/radeon/radeon_fence.c:393: warning: Function parameter or member 'f' not described in 'radeon_fence_enable_signaling' drivers/gpu/drm/radeon/radeon_fence.c:393: warning: Excess function parameter 'fence' description in 'radeon_fence_enable_signaling' drivers/gpu/drm/radeon/radeon_fence.c:1010: warning: Function parameter or member 'm' not described in 'radeon_debugfs_gpu_reset' drivers/gpu/drm/radeon/radeon_fence.c:1010: warning: Function parameter or member 'data' not described in 'radeon_debugfs_gpu_reset' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: Jerome Glisse Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 92378a4b54c1a66b08da2cff3db1b9906c41f709 Author: Lee Jones Date: Fri Nov 13 00:06:52 2020 -0500 drm/radeon/radeon_ttm: Place declaration of 'rdev' in same clause as its use Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_ttm.c: In function ‘radeon_ttm_tt_create’: drivers/gpu/drm/radeon/radeon_ttm.c:611:24: warning: variable ‘rdev’ set but not used [-Wunused-but-set-variable] Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Jerome Glisse Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit d706d409d9848762bd89781b8cbb5d6b02413f5f Author: Lee Jones Date: Fri Nov 6 21:49:48 2020 +0000 drm/radeon/atombios_crtc: Remove description of non-existent function param 'encoder' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/atombios_crtc.c:1796: warning: Excess function parameter 'encoder' description in 'radeon_get_shared_nondp_ppll' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 300f6a5c12a5ad49ef0bd89b0312ad288f3a514a Author: Lee Jones Date: Fri Nov 6 21:49:45 2020 +0000 drm/radeon: Move prototypes to shared header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_kms.c:756:5: warning: no previous prototype for ‘radeon_get_vblank_counter_kms’ [-Wmissing-prototypes] 756 | u32 radeon_get_vblank_counter_kms(struct drm_crtc *crtc) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/radeon_kms.c:826:5: warning: no previous prototype for ‘radeon_enable_vblank_kms’ [-Wmissing-prototypes] 826 | int radeon_enable_vblank_kms(struct drm_crtc *crtc) | ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/radeon_kms.c:853:6: warning: no previous prototype for ‘radeon_disable_vblank_kms’ [-Wmissing-prototypes] 853 | void radeon_disable_vblank_kms(struct drm_crtc *crtc) | ^~~~~~~~~~~~~~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 1012c55380f755330634e8fbf753258599ee480c Author: Lee Jones Date: Fri Nov 6 21:49:43 2020 +0000 drm/radeon/radeon_drv: Move prototypes to a shared headerfile Fixes the following W=1 kernel build warning(s): 62 | void radeon_driver_unload_kms(struct drm_device *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/radeon_kms.c:105:5: warning: no previous prototype for ‘radeon_driver_load_kms’ [-Wmissing-prototypes] 105 | int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags) | ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/radeon_kms.c:619:6: warning: no previous prototype for ‘radeon_driver_lastclose_kms’ [-Wmissing-prototypes] 619 | void radeon_driver_lastclose_kms(struct drm_device *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/radeon_kms.c:634:5: warning: no previous prototype for ‘radeon_driver_open_kms’ [-Wmissing-prototypes] 634 | int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv) | ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/radeon_kms.c:705:6: warning: no previous prototype for ‘radeon_driver_postclose_kms’ [-Wmissing-prototypes] 705 | void radeon_driver_postclose_kms(struct drm_device *dev, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Gareth Hughes Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 6d587203c24cd17009fee3e9a216f9fdd02e920a Author: Lee Jones Date: Fri Nov 6 21:49:41 2020 +0000 drm/radeon/radeon_drv: Source file headers are not good candidates for kernel-doc Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_drv.c:2: warning: Cannot understand * file radeon_drv.c Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Gareth Hughes Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 9c69e42e09f55b3203485325c7c20091fad76f93 Author: Lee Jones Date: Fri Nov 6 21:49:37 2020 +0000 drm/radeon/radeon_kms: Include header containing our own prototypes Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_kms.c:61:6: warning: no previous prototype for ‘radeon_driver_unload_kms’ [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_kms.c:104:5: warning: no previous prototype for ‘radeon_driver_load_kms’ [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_kms.c:618:6: warning: no previous prototype for ‘radeon_driver_lastclose_kms’ [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_kms.c:633:5: warning: no previous prototype for ‘radeon_driver_open_kms’ [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_kms.c:704:6: warning: no previous prototype for ‘radeon_driver_postclose_kms’ [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_kms.c:755:5: warning: no previous prototype for ‘radeon_get_vblank_counter_kms’ [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_kms.c:825:5: warning: no previous prototype for ‘radeon_enable_vblank_kms’ [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_kms.c:852:6: warning: no previous prototype for ‘radeon_disable_vblank_kms’ [-Wmissing-prototypes] Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit f017853ee200d5cac32099d5dd88a7e5fc30dde7 Author: Lee Jones Date: Thu Nov 5 14:45:15 2020 +0000 gpu: drm: radeon: radeon_device: Fix a bunch of kernel-doc misdemeanours - Demote non-conformant headers - Fix misnaming issues - Rename labels with identical names - Remove incorrect descriptions Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_device.c:637:6: warning: no previous prototype for ‘radeon_device_is_virtual’ [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_device.c:552: warning: duplicate section name 'Note' drivers/gpu/drm/radeon/radeon_device.c:556: warning: duplicate section name 'Note' drivers/gpu/drm/radeon/radeon_device.c:561: warning: duplicate section name 'Note' drivers/gpu/drm/radeon/radeon_device.c:564: warning: duplicate section name 'Note' drivers/gpu/drm/radeon/radeon_device.c:1106: warning: Function parameter or member 'family' not described in 'radeon_gart_size_auto' drivers/gpu/drm/radeon/radeon_device.c:1291: warning: Function parameter or member 'ddev' not described in 'radeon_device_init' drivers/gpu/drm/radeon/radeon_device.c:1565: warning: Function parameter or member 'dev' not described in 'radeon_suspend_kms' drivers/gpu/drm/radeon/radeon_device.c:1565: warning: Function parameter or member 'suspend' not described in 'radeon_suspend_kms' drivers/gpu/drm/radeon/radeon_device.c:1565: warning: Function parameter or member 'fbcon' not described in 'radeon_suspend_kms' drivers/gpu/drm/radeon/radeon_device.c:1565: warning: Function parameter or member 'freeze' not described in 'radeon_suspend_kms' drivers/gpu/drm/radeon/radeon_device.c:1565: warning: Excess function parameter 'pdev' description in 'radeon_suspend_kms' drivers/gpu/drm/radeon/radeon_device.c:1565: warning: Excess function parameter 'state' description in 'radeon_suspend_kms' drivers/gpu/drm/radeon/radeon_device.c:1669: warning: Function parameter or member 'dev' not described in 'radeon_resume_kms' drivers/gpu/drm/radeon/radeon_device.c:1669: warning: Function parameter or member 'resume' not described in 'radeon_resume_kms' drivers/gpu/drm/radeon/radeon_device.c:1669: warning: Function parameter or member 'fbcon' not described in 'radeon_resume_kms' drivers/gpu/drm/radeon/radeon_device.c:1669: warning: Excess function parameter 'pdev' description in 'radeon_resume_kms' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 02f40f82c440b70cce26ac4edd0aaf7069734af4 Author: Lee Jones Date: Thu Nov 5 14:45:16 2020 +0000 gpu: drm: amd: amdgpu: amdgpu: Mark global variables as __maybe_unused These 3 variables are used in *some* sourcefiles which include amdgpu.h, but not *all*. This leads to a flurry of build warnings. Fixes the following W=1 kernel build warning(s): from drivers/gpu/drm/amd/amdgpu/amdgpu.h:67, drivers/gpu/drm/amd/amdgpu/amdgpu.h:198:19: warning: ‘no_system_mem_limit’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/amd/amdgpu/amdgpu.h:197:19: warning: ‘debug_evictions’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/amd/amdgpu/amdgpu.h:196:18: warning: ‘sched_policy’ defined but not used [-Wunused-const-variable=] NB: Repeats ~650 times - snipped for brevity. Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 3655d1a6a90af0745352b00b52a54532ac26e8b3 Author: Lee Jones Date: Thu Nov 5 14:45:13 2020 +0000 gpu: drm: radeon: radeon_drv: Remove unused variable 'ret' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_drv.c: In function ‘radeon_pmops_runtime_suspend’: drivers/gpu/drm/radeon/radeon_drv.c:455:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Gareth Hughes Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 00d44b966d3f3a9095dca68173650dbf88af7c9e Author: Lee Jones Date: Thu Nov 5 14:45:05 2020 +0000 gpu: drm: scheduler: sched_entity: Demote non-conformant kernel-doc headers Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/scheduler/sched_entity.c:316: warning: Function parameter or member 'f' not described in 'drm_sched_entity_clear_dep' drivers/gpu/drm/scheduler/sched_entity.c:316: warning: Function parameter or member 'cb' not described in 'drm_sched_entity_clear_dep' drivers/gpu/drm/scheduler/sched_entity.c:330: warning: Function parameter or member 'f' not described in 'drm_sched_entity_wakeup' drivers/gpu/drm/scheduler/sched_entity.c:330: warning: Function parameter or member 'cb' not described in 'drm_sched_entity_wakeup' Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: "Christian König" Cc: Alex Deucher Cc: Nirmoy Das Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 26b5cf49cddaa3ca7a436d3c1bf9caa135502dfa Author: Lee Jones Date: Thu Nov 5 14:45:04 2020 +0000 gpu: drm: scheduler: sched_main: Provide missing description for 'sched' paramter Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/scheduler/sched_main.c:74: warning: Function parameter or member 'sched' not described in 'drm_sched_rq_init' Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: "Christian König" Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 334a1683935fceba346768b62cb3bb2d3e045578 Merge: 24bdae6993f7c 695dc55b57398 Author: Dave Airlie Date: Fri Nov 13 15:01:13 2020 +1000 Merge tag 'drm-intel-gt-next-2020-11-12-1' of git://anongit.freedesktop.org/drm/drm-intel into drm-next Cross-subsystem Changes: - DMA mapped scatterlist fixes in i915 to unblock merging of https://lkml.org/lkml/2020/9/27/70 (Tvrtko, Tom) Driver Changes: - Fix for user reported issue #2381 (Graphical output stops with "switching to inteldrmfb from simple"): Mark ininitial fb obj as WT on eLLC machines to avoid rcu lockup during fbdev init (Ville, Chris) - Fix for Tigerlake (and earlier) to avoid spurious empty CSB events leading to hang (Chris, Bruce) - Delay execlist processing for Tigerlake to avoid hang (Chris) - Fix for Tigerlake RCS engine health check through heartbeat (Chris) - Fix for Tigerlake reserved MOCS entries (Ayaz, Chris) - Fix Media power gate sequence on Tigerlake (Rodrigo) - Enable eLLC caching of display buffers for SKL+ (Ville) - Support parsing of oversize batches on Gen9 (Matt, Chris) - Exclude low pages (128KiB) of stolen from use to avoid thrashing during reset (Chris) - Flush engines before Tigerlake breadcrumbs (Chris) - Use the local HWSP offset during submission (Chris) - Flush coherency domains on first set-domain-ioctl (Chris, Zbigniew) - Use the active reference on the vma while capturing to avoid use-after-free (Chris) - Fix MOCS PTE setting for gen9+ (Ville) - Avoid NULL dereference on IPS driver callback while unbinding i915 (Chris) - Avoid NULL dereference from PT/PD stash allocation error (Matt) - Hold request reference for canceling an active context (Chris) - Avoid infinite loop on x86-32 when mapping a lot of objects (Chris) - Disallow WC mappings when processor doesn't support them (Chris) - Return correct error in i915_gem_object_copy_blt() error path (Dan) - Return correct error in intel_context_create_request() error path (Maarten) - Tune down GuC communication enabled/disabled messages to debug (Jani) - Fix rebased commit "Remove i915_request.lock requirement for execution callbacks" (Chris) - Cancel outstanding work after disabling heartbeats on an engine (Chris) - Signal cancelled requests (Chris) - Retire cancelled requests on unload (Chris) - Scrub HW state on driver remove (Chris) - Undo forced context restores after trivial preemptions (Chris) - Handle PCI unbind in PMU code (Tvrtko) - Fix CPU hotplug with multiple GPUs in PMU code (Trtkko) - Correctly set SFC capability for video engines (Venkata) - Update GuC code to use firmware v49.0.1 (John, Matthew B., Daniele, Oscar, Michel, Rodrigo, Michal) - Improve GuC warnings on loading failure (John) - Avoid ownership race in buffer pool by clearing age (Chris) - Use MMIO to read CSB in case of failure (Chris, Mika) - Show engine properties in engine state dump to indicate changes (Chris, Joonas) - Break up error capture compression loops with cond_resched() (Chris) - Reduce GPU error capture mutex hold time to avoid khungtaskd (Chris) - Serialise debugfs i915_gem_objects with ctx->mutex (Chris) - Always test execution status on closing the context and close if not persistent (Chris) - Avoid mixing integer types during batch copies (Chris, Jared) - Skip over MI_NOOP when parsing to avoid overhead (Chris) - Hold onto an explicit ref to i915_vma_work.pinned (Chris) - Perform all asynchronous waits prior to marking payload start (Chris) - Pull phys pread/pwrite implementations to the backend (Matt) - Improve record of hung engines in error state (Tvrtko) - Allow backends to override pread implementation (Matt) - Reinforce LRC poisoning checks to confirm context survives execution (Chris) - Fix memory region max size calculation (Matt) - Fix order when adding blocks to memory region (Matt) - Eliminate unused intel_virtual_engine_get_sibling func (Chris) - Cleanup kasan warning for on-stack (unsigned long) casting (Chris) - Onion unwind for scratch page allocation failure (Chris) - Poison stolen pages before use (Chris) - Selftest improvements (Chris) Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20201112163407.GA20320@jlahtine-mobl.ger.corp.intel.com commit 24bdae6993f7c430a48b1e3a16f27f98e414ee28 Author: Dave Airlie Date: Fri Nov 13 14:53:34 2020 +1000 drm/Kconfig: rename keembay config This all caps looked ugly. Signed-off-by: Dave Airlie commit 14346c08fac465332f229fbfb0adb1d1a75de96c Merge: 512bce50a41c5 05481f072787e Author: Dave Airlie Date: Fri Nov 13 14:16:16 2020 +1000 Merge tag 'drm-misc-next-2020-11-12' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for 5.11: UAPI Changes: Cross-subsystem Changes: Core Changes: - Remove pgprot_decrypt() before calling io_remap_pfn_range() - Revert "drm/dp_mst: Retrieve extended DPCD caps for topology manager" - ttm: Add multihop infrastructure - doc: Update dma-buf Driver Changes: - amdgpu: Use TTM multihop - kmb: select DRM_MIPI_DSI and depend on ARCH_KEEMBAY; Fix build warning; Fix typos - nouveau: Use TTM multihop; Fix out-of-bounds access - radeon: Use TTM multihop - ingenic: Search for scaling coefficients to to 102% of screen size Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20201112080115.GA7954@linux-uq9g commit 904709f63b893b275a6d84654b47b0f81b3ca38e Merge: 0a58a65cc0b0e 53632e1119466 Author: Alexei Starovoitov Date: Thu Nov 12 18:39:28 2020 -0800 Merge branch 'bpf: Enable bpf_sk_storage for FENTRY/FEXIT/RAW_TP' Martin KaFai says: ==================== This set is to allow the FENTRY/FEXIT/RAW_TP tracing program to use bpf_sk_storage. The first two patches are a cleanup. The last patch is tests. Patch 3 has the required kernel changes to enable bpf_sk_storage for FENTRY/FEXIT/RAW_TP. Please see individual patch for details. v2: - Rename some of the function prefix from sk_storage to bpf_sk_storage - Use prefix check instead of substr check ==================== Signed-off-by: Alexei Starovoitov commit 53632e11194663b7d5b043a68648892e593dc102 Author: Martin KaFai Lau Date: Thu Nov 12 13:13:20 2020 -0800 bpf: selftest: Use bpf_sk_storage in FENTRY/FEXIT/RAW_TP This patch tests storing the task's related info into the bpf_sk_storage by fentry/fexit tracing at listen, accept, and connect. It also tests the raw_tp at inet_sock_set_state. A negative test is done by tracing the bpf_sk_storage_free() and using bpf_sk_storage_get() at the same time. It ensures this bpf program cannot load. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201112211320.2587537-1-kafai@fb.com commit 8e4597c627fb48f361e2a5b012202cb1b6cbcd5e Author: Martin KaFai Lau Date: Thu Nov 12 13:13:13 2020 -0800 bpf: Allow using bpf_sk_storage in FENTRY/FEXIT/RAW_TP This patch enables the FENTRY/FEXIT/RAW_TP tracing program to use the bpf_sk_storage_(get|delete) helper, so those tracing programs can access the sk's bpf_local_storage and the later selftest will show some examples. The bpf_sk_storage is currently used in bpf-tcp-cc, tc, cg sockops...etc which is running either in softirq or task context. This patch adds bpf_sk_storage_get_tracing_proto and bpf_sk_storage_delete_tracing_proto. They will check in runtime that the helpers can only be called when serving softirq or running in a task context. That should enable most common tracing use cases on sk. During the load time, the new tracing_allowed() function will ensure the tracing prog using the bpf_sk_storage_(get|delete) helper is not tracing any bpf_sk_storage*() function itself. The sk is passed as "void *" when calling into bpf_local_storage. This patch only allows tracing a kernel function. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20201112211313.2587383-1-kafai@fb.com commit e794bfddb8b8521bd016e73b411d6b03149e9e66 Author: Martin KaFai Lau Date: Thu Nov 12 13:13:07 2020 -0800 bpf: Rename some functions in bpf_sk_storage Rename some of the functions currently prefixed with sk_storage to bpf_sk_storage. That will make the next patch have fewer prefix check and also bring the bpf_sk_storage.c to a more consistent function naming. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Acked-by: KP Singh Link: https://lore.kernel.org/bpf/20201112211307.2587021-1-kafai@fb.com commit 9e838b02b0bb795793f12049307a354e28b5749c Author: Martin KaFai Lau Date: Thu Nov 12 13:13:01 2020 -0800 bpf: Folding omem_charge() into sk_storage_charge() sk_storage_charge() is the only user of omem_charge(). This patch simplifies it by folding omem_charge() into sk_storage_charge(). Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Acked-by: KP Singh Link: https://lore.kernel.org/bpf/20201112211301.2586255-1-kafai@fb.com commit e1d9d7b91302593d1951fcb12feddda6fb58a3c0 Merge: e865802357086 db7c953555388 Author: Jakub Kicinski Date: Thu Nov 12 16:54:48 2020 -0800 Merge https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Signed-off-by: Jakub Kicinski commit b159e86b5a2ab826b3a292756072f4cc523675ab Author: Ondrej Mosnacek Date: Wed Nov 4 13:01:10 2020 +0100 selinux: drop super_block backpointer from superblock_security_struct It appears to have been needed for selinux_complete_init() in the past, but today it's useless. Signed-off-by: Ondrej Mosnacek Signed-off-by: Paul Moore commit 0a58a65cc0b0ebabbcf3cdae7642e6db29648164 Merge: c36538798fc6c cb62d34019d91 Author: Daniel Borkmann Date: Fri Nov 13 01:42:12 2020 +0100 Merge branch 'bpf-ptrs-beyond-pkt-end' Alexei Starovoitov says: ==================== v1->v2: - removed set-but-unused variable. - added Jiri's Tested-by. In some cases LLVM uses the knowledge that branch is taken to optimze the code which causes the verifier to reject valid programs. Teach the verifier to recognize that r1 = skb->data; r1 += 10; r2 = skb->data_end; if (r1 > r2) { here r1 points beyond packet_end and subsequent if (r1 > r2) // always evaluates to "true". } ==================== Signed-off-by: Daniel Borkmann commit cb62d34019d9117bb94de6ed35959449d43d6055 Author: Alexei Starovoitov Date: Tue Nov 10 19:12:13 2020 -0800 selftests/bpf: Add asm tests for pkt vs pkt_end comparison. Add few assembly tests for packet comparison. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Tested-by: Jiri Olsa Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20201111031213.25109-4-alexei.starovoitov@gmail.com commit 9cc873e85800ccde80aa2e4b2bae9f1b5fa4c478 Author: Alexei Starovoitov Date: Tue Nov 10 19:12:12 2020 -0800 selftests/bpf: Add skb_pkt_end test Add a test that currently makes LLVM generate assembly code: $ llvm-objdump -S skb_pkt_end.o 0000000000000000 : ; if (skb_shorter(skb, ETH_IPV4_TCP_SIZE)) 0: 61 12 50 00 00 00 00 00 r2 = *(u32 *)(r1 + 80) 1: 61 14 4c 00 00 00 00 00 r4 = *(u32 *)(r1 + 76) 2: bf 43 00 00 00 00 00 00 r3 = r4 3: 07 03 00 00 36 00 00 00 r3 += 54 4: b7 01 00 00 00 00 00 00 r1 = 0 5: 2d 23 02 00 00 00 00 00 if r3 > r2 goto +2 6: 07 04 00 00 0e 00 00 00 r4 += 14 ; if (skb_shorter(skb, ETH_IPV4_TCP_SIZE)) 7: bf 41 00 00 00 00 00 00 r1 = r4 0000000000000040 : 8: b4 00 00 00 ff ff ff ff w0 = -1 ; if (!(ip = get_iphdr(skb))) 9: 2d 23 05 00 00 00 00 00 if r3 > r2 goto +5 ; proto = ip->protocol; 10: 71 12 09 00 00 00 00 00 r2 = *(u8 *)(r1 + 9) ; if (proto != IPPROTO_TCP) 11: 56 02 03 00 06 00 00 00 if w2 != 6 goto +3 ; if (tcp->dest != 0) 12: 69 12 16 00 00 00 00 00 r2 = *(u16 *)(r1 + 22) 13: 56 02 01 00 00 00 00 00 if w2 != 0 goto +1 ; return tcp->urg_ptr; 14: 69 10 26 00 00 00 00 00 r0 = *(u16 *)(r1 + 38) 0000000000000078 : ; } 15: 95 00 00 00 00 00 00 00 exit Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20201111031213.25109-3-alexei.starovoitov@gmail.com commit 6d94e741a8ff818e5518da8257f5ca0aaed1f269 Author: Alexei Starovoitov Date: Tue Nov 10 19:12:11 2020 -0800 bpf: Support for pointers beyond pkt_end. This patch adds the verifier support to recognize inlined branch conditions. The LLVM knows that the branch evaluates to the same value, but the verifier couldn't track it. Hence causing valid programs to be rejected. The potential LLVM workaround: https://reviews.llvm.org/D87428 can have undesired side effects, since LLVM doesn't know that skb->data/data_end are being compared. LLVM has to introduce extra boolean variable and use inline_asm trick to force easier for the verifier assembly. Instead teach the verifier to recognize that r1 = skb->data; r1 += 10; r2 = skb->data_end; if (r1 > r2) { here r1 points beyond packet_end and subsequent if (r1 > r2) // always evaluates to "true". } Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Tested-by: Jiri Olsa Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20201111031213.25109-2-alexei.starovoitov@gmail.com commit e865802357086b36632acf3e629f726f089a6769 Author: Guillaume Nault Date: Wed Nov 11 16:05:35 2020 +0100 selftests: set conf.all.rp_filter=0 in bareudp.sh When working on the rp_filter problem, I didn't realise that disabling it on the network devices didn't cover all cases: rp_filter could also be enabled globally in the namespace, in which case it would drop packets, even if the net device has rp_filter=0. Fixes: 1ccd58331f6f ("selftests: disable rp_filter when testing bareudp") Fixes: bbbc7aa45eef ("selftests: add test script for bareudp tunnels") Signed-off-by: Guillaume Nault Link: https://lore.kernel.org/r/f2d459346471f163b239aa9d63ce3e2ba9c62895.1605107012.git.gnault@redhat.com Signed-off-by: Jakub Kicinski commit e7086213f7b479c3d08835fb0f2395479dfb6883 Merge: 85ce50d337d10 173f14cda3647 Author: Jakub Kicinski Date: Thu Nov 12 15:55:25 2020 -0800 Merge branch 'mlxsw-spectrum-prepare-for-xm-implementation-prefix-insertion-and-removal' Ido Schimmel says: ==================== mlxsw: spectrum: Prepare for XM implementation - prefix insertion and removal Jiri says: This is a preparation patchset for follow-up support of boards with extended mezzanine (XM), which is going to allow extended (scale-wise) router offload. XM requires a separate PRM register named XMDR to be used instead of RALUE to insert/update/remove FIB entries. Therefore, this patchset extends the previously introduces low-level ops to be able to have XM-specific FIB entry config implementation. Currently the existing original RALUE implementation is moved to "basic" low-level ops. Unlike legacy router, insertion/update/removal of FIB entries into XM could be done in bulks up to 4 items in a single PRM register write. That is why this patchset implements "an op context", that allows the future XM ops implementation to squash multiple FIB events to single register write. For that, the way in which the FIB events are processed by the work queue has to be changed. The conversion from 1:1 FIB event - work callback call to event queue is implemented in patch #3. Patch #4 introduces "an op context" that will allow in future to squash multiple FIB events into one XMDR register write. Patch #12 converts it from stack to be allocated per instance. Existing RALUE manipulations are pushed to ops in patch #10. Patch #13 is introducing a possibility for low-level implementation to have per FIB entry private memory. The rest of the patches are either cosmetics or smaller preparations. ==================== Link: https://lore.kernel.org/r/20201110094900.1920158-1-idosch@idosch.org Signed-off-by: Jakub Kicinski commit 173f14cda36477984e96bad04fa1659968bf2857 Author: Jiri Pirko Date: Tue Nov 10 11:49:00 2020 +0200 mlxsw: spectrum_router: Introduce FIB entry update op Follow-up patchset introducing XMDR implementation is going to need to distinguish write and update ops. Therefore introduce "update op" and call "write op" only when new FIB entry is inserted. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit a005a7fe2ffc02cf4f864114c79211d40cd684aa Author: Jiri Pirko Date: Tue Nov 10 11:48:59 2020 +0200 mlxsw: spectrum_router: Track FIB entry committed state and skip uncommitted on delete In case bulking is used, the entry that was previously added may not be yet committed to the HW as it waits in the queue for bulk send. For such entries, skip the deletion. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit ae9ce81aa726efb95d66b7fdf1ec02bd12a7266c Author: Jiri Pirko Date: Tue Nov 10 11:48:58 2020 +0200 mlxsw: spectrum_router: Introduce fib_entry priv for low-level ops Prepare for the low-level ops that need to store some data alongside the fib_entry and introduce a per-fib_entry priv for ll ops. The priv is reference counted as in the follow-up patch it is going to be saved in pack() function and used later on in commit() even in case the related fib_entry gets freed in the middle. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit 91d20d71b2f0b1e3ff4197d27a69b22da3d8de0d Author: Jiri Pirko Date: Tue Nov 10 11:48:57 2020 +0200 mlxsw: spectrum_router: Have FIB entry op context allocated for the instance Get the max size needed for FIB entry op context and allocate it once for the instance. Use it repeatedly from the scheduled work. By this, allow to extend the context to hold more data than it is wise to do when it was on the stack. Make sure to signalize that the context needs to be initialized in case families of subsequent FIB entries differ. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit 505cd65c66e82233e0791da8f39312c1e53b6791 Author: Jiri Pirko Date: Tue Nov 10 11:48:56 2020 +0200 mlxsw: spectrum_router: Prepare work context for possible bulking For XMDR register it is possible to carry multiple FIB entry operations in a single write. However the FW does not restrict mixing the types of operations, make the code easier and indicate the bulking is ok only in case the bulk contains FIB operations of the same family and event. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit 7f5c4090e46f069b089647cc8880da6fe95bea84 Author: Jiri Pirko Date: Tue Nov 10 11:48:55 2020 +0200 mlxsw: spectrum: Push RALUE packing and writing into low-level router ops With follow-up introduction of XM implementation, XMDR register is going to be optionally used instead of RALUE register. Push the RALUE packing helpers and write call into low-level router ops. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit 1a9c21d5f70f123fc79bf140f8a221efe18916e6 Author: Jiri Pirko Date: Tue Nov 10 11:48:54 2020 +0200 mlxsw: spectrum_router: Use RALUE pack helper from abort function Unify the RALUE register payload packing and use the __mlxsw_sp_fib_entry_ralue_pack() helper from __mlxsw_sp_router_set_abort_trap(). Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit 1a7fcdf75d28b4b23479580f1d80c58bd3020053 Author: Jiri Pirko Date: Tue Nov 10 11:48:53 2020 +0200 mlxsw: reg: Allow to pass NULL pointer to mlxsw_reg_ralue_pack4/6() In preparation for the change that is going to be done in the next patch, allow to pass NULL pointer to mlxsw_reg_ralue_pack4() and mlxsw_reg_ralue_pack6() helpers. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit 0c1d6b269457cb30abe457a279fef9c6e9259e0a Author: Jiri Pirko Date: Tue Nov 10 11:48:52 2020 +0200 mlxsw: spectrum_router: Pass destination IP as a pointer to mlxsw_reg_ralue_pack4() Instead of passing destination IP as a u32 value, pass it as pointer to u32. Avoid using local variable for the pointer store. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit d271cf9f298bedc4114ea4009d9488a3e58f6f82 Author: Jiri Pirko Date: Tue Nov 10 11:48:51 2020 +0200 mlxsw: spectrum: Export RALUE pack helper and use it from IPIP As the RALUE packing is going to be put into op, make the user from IPIP code use the same helper as the router code does. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit 0f6b66011a3ceee0df6ebe93dfe510777c67e4d2 Author: Jiri Pirko Date: Tue Nov 10 11:48:50 2020 +0200 mlxsw: spectrum_router: Push out RALUE pack into separate helper As the RALUE packing is going to be pushed into an op, in preparation for that push the code into a separate function in the meantime. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit 2d5bd7a111ca082f72ab845a56b0376a7145dcf6 Author: Jiri Pirko Date: Tue Nov 10 11:48:49 2020 +0200 mlxsw: spectrum: Propagate context from work handler containing RALUE payload Currently, RALUE payload is defined locally in the function that is calling the register write. With introduction of alternative register to RALUE, XMDR, it has to be possible to put multiple FIB entry operations into single register write. So in order to prepare for that, have per-work entry operation context and propagate it all the way down to the functions writing RALUE. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit c1b290d594a12b4ed3b7386947162d5a061900b2 Author: Jiri Pirko Date: Tue Nov 10 11:48:48 2020 +0200 mlxsw: spectrum_router: Introduce FIB event queue instead of separate works Currently, every FIB event is queued-up as a separate work to be processed. However, that allows to process only one FIB entry per work callback. In preparation of future XMDR register bulking of multiple FIB entries, convert to FIB event queue. Implement this by a list_head, adding new events to the end of the list in the FIB notify callback. That allows to process multiple events from the list inside the work callback. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit d57ff022866660a66bcb6b10f1f114fd5521c3df Author: Jiri Pirko Date: Tue Nov 10 11:48:47 2020 +0200 mlxsw: spectrum_router: Use RALUE-independent op arg Since the write/delete of FIB entry is going to be implemented by XMDR register for XM implementation, introduce RALUE-independent enum for op so the enum could be used in both RALUE and XMDR. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit 69ba53e72bbd7cbd7410136ba9dc04adf8a3f91a Author: Jiri Pirko Date: Tue Nov 10 11:48:46 2020 +0200 mlxsw: spectrum_router: Pass non-register proto enum to __mlxsw_sp_router_set_abort_trap() Don't pass RALXX register enum and rather pass enum mlxsw_sp_l3proto to __mlxsw_sp_router_set_abort_trap(). This is in preparation to fib entry pack implementation by XMDR register. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit 85ce50d337d10a6fd328fa70b0a15543bf5c0f64 Author: Randy Dunlap Date: Tue Nov 10 09:57:46 2020 -0800 net: kcov: don't select SKB_EXTENSIONS when there is no NET Fix kconfig warning when CONFIG_NET is not set/enabled: WARNING: unmet direct dependencies detected for SKB_EXTENSIONS Depends on [n]: NET [=n] Selected by [y]: - KCOV [=y] && ARCH_HAS_KCOV [=y] && (CC_HAS_SANCOV_TRACE_PC [=y] || GCC_PLUGINS [=n]) Fixes: 6370cc3bbd8a ("net: add kcov handle to skb extensions") Signed-off-by: Randy Dunlap Cc: Aleksandr Nogikh Cc: Willem de Bruijn Link: https://lore.kernel.org/r/20201110175746.11437-1-rdunlap@infradead.org Signed-off-by: Jakub Kicinski commit 255bf5e9d77ab2b16739fc685c7c15fc25f12d55 Merge: c9f64d1fc101c 323955a0498cc Author: Jakub Kicinski Date: Thu Nov 12 14:58:27 2020 -0800 Merge branch 'net-switch-further-drivers-to-core-functionality-for-handling-per-cpu-byte-packet-counters' Heiner Kallweit says: ==================== net: switch further drivers to core functionality for handling per-cpu byte/packet counters Switch further drivers to core functionality for handling per-cpu byte/packet counters. All changes are compile-tested only. ==================== Link: https://lore.kernel.org/r/5fbe3a1f-6625-eadc-b1c9-f76f78debb94@gmail.com Signed-off-by: Jakub Kicinski commit 323955a0498ccaa1263e369b91efd8f4310768b6 Author: Heiner Kallweit Date: Tue Nov 10 20:51:03 2020 +0100 net: usb: switch to dev_get_tstats64 and remove usbnet_get_stats64 alias Replace usbnet_get_stats64() with new identical core function dev_get_tstats64() in all users and remove usbnet_get_stats64(). Signed-off-by: Heiner Kallweit Acked-by: Bjørn Mork Signed-off-by: Jakub Kicinski commit af0c351cc34857ad7b254850b9392d99da46be9e Author: Heiner Kallweit Date: Tue Nov 10 20:50:02 2020 +0100 usbnet: switch to core handling of rx/tx byte/packet counters Use netdev->tstats instead of a member of usbnet for storing a pointer to the per-cpu counters. This allows us to use core functionality for statistics handling. Signed-off-by: Heiner Kallweit Signed-off-by: Jakub Kicinski commit 45fc3fd4308c5dbb45aa652399a084364e60d4b0 Author: Heiner Kallweit Date: Tue Nov 10 20:48:54 2020 +0100 qtnfmac: switch to core handling of rx/tx byte/packet counters Use netdev->tstats instead of a member of qtnf_vif for storing a pointer to the per-cpu counters. This allows us to use core functionality for statistics handling. The driver sets netdev->needs_free_netdev, therefore freeing the per-cpu counters at the right point in time is a little bit tricky. Best option seems to be to use the ndo_init/ndo_uninit callbacks. Signed-off-by: Heiner Kallweit Acked-by: Kalle Valo Signed-off-by: Jakub Kicinski commit 2d5c27dafe63fb8a2e879f3e8f8a73a83a97d5df Author: Heiner Kallweit Date: Tue Nov 10 20:48:14 2020 +0100 qmi_wwan: switch to core handling of rx/tx byte/packet counters Use netdev->tstats instead of a member of qmimux_priv for storing a pointer to the per-cpu counters. This allows us to use core functionality for statistics handling. Signed-off-by: Heiner Kallweit Acked-by: Bjørn Mork Signed-off-by: Jakub Kicinski commit aa0616a9bd524f8dc2461af2c4acfea90833b38c Author: Heiner Kallweit Date: Tue Nov 10 20:47:34 2020 +0100 IB/hfi1: switch to core handling of rx/tx byte/packet counters Use netdev->tstats instead of a member of hfi1_ipoib_dev_priv for storing a pointer to the per-cpu counters. This allows us to use core functionality for statistics handling. Signed-off-by: Heiner Kallweit Acked-by: Jason Gunthorpe Signed-off-by: Jakub Kicinski commit c9f64d1fc101c64ea2be1b2e562b4395127befc9 Author: Thierry Reding Date: Tue Nov 10 08:37:57 2020 +0100 net: ipconfig: Avoid spurious blank lines in boot log When dumping the name and NTP servers advertised by DHCP, a blank line is emitted if either of the lists is empty. This can lead to confusing issues such as the blank line getting flagged as warning. This happens because the blank line is the result of pr_cont("\n") and that may see its level corrupted by some other driver concurrently writing to the console. Fix this by making sure that the terminating newline is only emitted if at least one entry in the lists was printed before. Reported-by: Jon Hunter Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20201110073757.1284594-1-thierry.reding@gmail.com Signed-off-by: Jakub Kicinski commit 203cb737fbe09cc6b57d4bd46be7977e72d49281 Merge: cef211968c2da 7958ba7e6273a Author: Jakub Kicinski Date: Thu Nov 12 14:49:42 2020 -0800 Merge branch 'smsc-w-1-warning-fixes' Andrew Lunn says: ==================== smsc W=1 warning fixes Fixup various W=1 warnings, and then add COMPILE_TEST support, which explains why these where missed on the previous pass. v2: Use while (0) Rework buffer alignment to make it clearer v3: Access the length from the hardware and Use __always_unused to tell the compiler we want to discard the value. ==================== Link: https://lore.kernel.org/r/20201110030248.1480413-1-andrew@lunn.ch Signed-off-by: Jakub Kicinski commit 7958ba7e6273a02f49432a2506958d0f59b5b8da Author: Andrew Lunn Date: Tue Nov 10 04:02:48 2020 +0100 drivers: net: smsc: Add COMPILE_TEST support Improve the build testing of these SMSC drivers by enabling them when COMPILE_TEST is selected. Signed-off-by: Andrew Lunn Signed-off-by: Jakub Kicinski commit 6e4a930c40d82605afcb7aab267ee3d501a800ab Author: Andrew Lunn Date: Tue Nov 10 04:02:47 2020 +0100 drivers: net: smc911x: Fix cast from pointer to integer of different size drivers/net/ethernet/smsc/smc911x.c: In function ‘smc911x_hardware_send_pkt’: drivers/net/ethernet/smsc/smc911x.c:471:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 471 | cmdA = (((u32)skb->data & 0x3) << 16) | When built on 64bit targets, the skb->data pointer cannot be cast to a u32 in a meaningful way. Use uintptr_t instead. Suggested-by: Nicolas Pitre Signed-off-by: Andrew Lunn Signed-off-by: Jakub Kicinski commit dd5fdb3f978595bd1866e657b067cd1ed8bf364b Author: Andrew Lunn Date: Tue Nov 10 04:02:46 2020 +0100 drivers: net: smc911x: Fix passing wrong number of parameters to DBG() macro Now that the compiler always sees the parameters passed to the DBG() macro, it gives an error message about wrong parameters. The comment says it all: /* ndev is not valid yet, so avoid passing it in. */ DBG(SMC_DEBUG_FUNC, "--> %s\n", __func__); You cannot not just pass a parameter! The DBG does not seem to have any real value, to just remove it. Signed-off-by: Andrew Lunn Signed-off-by: Jakub Kicinski commit 40f6d1d9159b920e7b2722375506ecf86c633b95 Author: Andrew Lunn Date: Tue Nov 10 04:02:45 2020 +0100 drivers: net: smc911x: Fix set but unused status because of DBG macro drivers/net/ethernet/smsc/smc911x.c: In function ‘smc911x_timeout’: drivers/net/ethernet/smsc/smc911x.c:1251:6: warning: variable ‘status’ set but not used [-Wunused-but-set-variable] 1251 | int status, mask; The status is read in order to print it via the DBG macro. However, due to the way DBG is disabled, the compiler never sees it being used. Change the DBG macro to actually make use of the passed parameters, and the leave the optimiser to remove the unwanted code inside the while (0). Signed-off-by: Andrew Lunn Signed-off-by: Jakub Kicinski commit 6015e6f2efc620fe0b43e92ddd620f2446ce82e8 Author: Andrew Lunn Date: Tue Nov 10 04:02:44 2020 +0100 drivers: net: smc911x: Work around set but unused status drivers/net/ethernet/smsc/smc911x.c: In function ‘smc911x_phy_interrupt’: drivers/net/ethernet/smsc/smc911x.c:976:6: warning: variable ‘status’ set but not used [-Wunused-but-set-variable] 976 | int status; A comment indicates the status needs to be read from the PHY, otherwise bad things happen. But due to the macro magic, it is hard to perform the read without assigning it to a variable. So add _always_unused attribute to status to tell the compiler we don't expect to use the value. Signed-off-by: Andrew Lunn Signed-off-by: Jakub Kicinski commit 606ddf1f046e5e15c4865722f8dd1b9cf10042f1 Author: Andrew Lunn Date: Tue Nov 10 04:02:43 2020 +0100 drivers: net: smc91x: Fix missing kerneldoc reported by W=1 drivers/net/ethernet/smsc/smc91x.c:2199: warning: Function parameter or member 'dev' not described in 'try_toggle_control_gpio' drivers/net/ethernet/smsc/smc91x.c:2199: warning: Function parameter or member 'desc' not described in 'try_toggle_control_gpio' drivers/net/ethernet/smsc/smc91x.c:2199: warning: Function parameter or member 'name' not described in 'try_toggle_control_gpio' drivers/net/ethernet/smsc/smc91x.c:2199: warning: Function parameter or member 'index' not described in 'try_toggle_control_gpio' drivers/net/ethernet/smsc/smc91x.c:2199: warning: Function parameter or member 'value' not described in 'try_toggle_control_gpio' drivers/net/ethernet/smsc/smc91x.c:2199: warning: Function parameter or member 'nsdelay' not described in 'try_toggle_control_gpio' Document these parameters. Signed-off-by: Andrew Lunn Signed-off-by: Jakub Kicinski commit 5b320b53431eb3396b1f16935f59bdcb88ccc7e8 Author: Andrew Lunn Date: Tue Nov 10 04:02:42 2020 +0100 drivers: net: smc91x: Fix set but unused W=1 warning drivers/net/ethernet/smsc/smc91x.c:706:51: warning: variable ‘pkt_len’ set but not used [-Wunused-but-set-variable] 706 | unsigned int saved_packet, packet_no, tx_status, pkt_len; The read of the packet length in the descriptor probably needs to be kept in order to keep the hardware happy. So tell the compiler we don't expect to use the value by using the __always_unused attribute. Signed-off-by: Andrew Lunn Signed-off-by: Jakub Kicinski commit a3fb655027c33a9281d3b813798b15bdf1e75d43 Author: Alexander Lobakin Date: Sun Nov 1 15:13:01 2020 +0000 mips: boot: add support for self-extracting FIT images (vmlinuz.itb) Commit c3e2ee657418 ("MIPS: generic: Add support for zboot") added support for self-extracting images to Generic MIPS. However, the intended way to boot Generic MIPS kernels is using FIT Images and UHI boot protocol, but currently there's no way to make self-extracting FIT Image (only legacy uzImages). Add a target for this named "vmlinuz.itb", which will consist of vmlinuz.bin and selected DT blobs. It will allow to have the advantages of both UHI and self-extracting images. Signed-off-by: Alexander Lobakin Acked-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit 9d63bcb87157c90899525d9db25b37106cd0afe3 Author: Alexander Lobakin Date: Sun Nov 1 15:12:52 2020 +0000 mips: boot: clean up self-extracting targets scenarios 1. All final targets like vmlinuz.{bin,ecoff,srec} etc. should reside in $(objtree)/arch/mips/boot, not in the root $(objtree) directory. The only file that should be left there is vmlinuz, similar to other architectures. 2. Add all the targets to $(targets) variable, so they'll be properly accounted by Kbuild. This also allows to remove redundant $(clean-files) (which were missing uzImage BTW). 3. Prefix all targets with $(obj)/$(objtree), depending on their locations. Misc: fix the identation of the 'STRIP' quiet message. Signed-off-by: Alexander Lobakin Acked-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit cef211968c2dad7d6bc9ee136c16272eb18b5632 Author: Menglong Dong Date: Mon Nov 9 21:57:58 2020 -0500 net: udp: remove redundant initialization in udp_gro_complete The initialization for 'err' with '-ENOSYS' is redundant and can be removed, as it is updated soon and not used. Changes since v1: - Move the err declaration below struct sock *sk Signed-off-by: Menglong Dong Link: https://lore.kernel.org/r/5faa01d5.1c69fb81.8451c.cb5b@mx.google.com Signed-off-by: Jakub Kicinski commit fe0052018a84d50be034449b4175177f569fbf5c Author: Gregory CLEMENT Date: Tue Nov 10 12:45:08 2020 +0100 MIPS: mscc: Add serval support Add a device trees and FIT image support for the Microsemi Serval SoC which belongs to same family of the Ocelot SoC. It is based on the work of Lars Povlsen . Signed-off-by: Gregory CLEMENT Acked-by: Alexandre Belloni Signed-off-by: Thomas Bogendoerfer commit f84778f7d8c3b867d6aaca9361d7b43b222f9f6a Author: Gregory CLEMENT Date: Tue Nov 10 12:45:07 2020 +0100 MIPS: mscc: Add jaguar2 support Add a device trees and FIT image support for the Microsemi Jaguar2 SoC which belongs to same family of the Ocelot SoC. It is based on the work of Lars Povlsen . Signed-off-by: Gregory CLEMENT Acked-by: Alexandre Belloni Signed-off-by: Thomas Bogendoerfer commit 378e413fe97e8d66ff4dc90b0b5b6ef3bbc15252 Author: Gregory CLEMENT Date: Tue Nov 10 12:45:06 2020 +0100 MIPS: mscc: build FIT image for Luton Luton now has already an u-boot port so let's build FIT images. Signed-off-by: Gregory CLEMENT Acked-by: Alexandre Belloni Signed-off-by: Thomas Bogendoerfer commit 72bc5e8b25a0031354a27c1da2b89104e2bf32e3 Author: Gregory CLEMENT Date: Tue Nov 10 12:45:05 2020 +0100 MIPS: mscc: Add luton PC0B91 device tree Add a device tree for the Microsemi Luton PCB091 evaluation board. It is based on the work of Lars Povlsen . Signed-off-by: Gregory CLEMENT Acked-by: Alexandre Belloni Signed-off-by: Thomas Bogendoerfer commit 8fc72cb541e7fef8bf2b0724ee965f34d6418832 Merge: 95530a59db3d4 03dfd157670bd Author: Jakub Kicinski Date: Thu Nov 12 14:33:13 2020 -0800 Merge branch 'xilinx_emaclite-w-1-fixes' Andrew Lunn says: ==================== xilinx_emaclite W=1 fixes kerneldoc, pointer issues, and add COMPILE_TEST support to easy finding future issues via build testing. v2: - Use uintptr_t instead of long - Added Acked-by's. ==================== Link: https://lore.kernel.org/r/20201110024024.1479741-1-andrew@lunn.ch Signed-off-by: Jakub Kicinski commit 93b834e6cf0e6bbb16f9bd678106648442960aba Author: Gregory CLEMENT Date: Tue Nov 10 12:45:04 2020 +0100 MIPS: mscc: Add luton dtsi Add a device tree include file for the Microsemi Luton SoC which belongs to same family of the Ocelot SoC. It is based on the work of Lars Povlsen . Signed-off-by: Gregory CLEMENT Acked-by: Alexandre Belloni Signed-off-by: Thomas Bogendoerfer commit 03dfd157670bd715306dce1507b8998cabd38539 Author: Andrew Lunn Date: Tue Nov 10 03:40:24 2020 +0100 drivers: net: xilinx_emaclite: Add COMPILE_TEST support To improve build testing of this driver, add COMPILE_TEST support. Acked-by: Michal Simek Signed-off-by: Andrew Lunn Signed-off-by: Jakub Kicinski commit eccd5403814b4e762e270ef0464bb86fb217b1bf Author: Andrew Lunn Date: Tue Nov 10 03:40:23 2020 +0100 drivers: net: xilinx_emaclite: Fix -Wpointer-to-int-cast warnings with W=1 drivers/net/ethernet//xilinx/xilinx_emaclite.c:341:35: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 341 | addr = (void __iomem __force *)((u32 __force)addr ^ Use uintptr_t instead of u32 to avoid problems on 64 bit systems. Also, cast the address to an unsigned long for printing. Signed-off-by: Andrew Lunn Signed-off-by: Jakub Kicinski commit 27b42557988d40340c9eb219f8f756f821f3649c Author: Andrew Lunn Date: Tue Nov 10 03:40:22 2020 +0100 drivers: net: xilinx_emaclite: Add missing parameter kerneldoc The txqueue parameter to the watchdog callback is unused in this driver. But it still needs to be documented. Reviewed-by: Michal Simek Signed-off-by: Andrew Lunn Signed-off-by: Jakub Kicinski commit 2825f4c0ffcdf6e519e30ecdae4cd8c1c89a1cb9 Author: Gregory CLEMENT Date: Tue Nov 10 12:45:03 2020 +0100 MIPS: mscc: Fix configuration name for ocelot legacy boards Ocelots is supported by the generic MIPS build so make it clears that LEGACY_BOARD_OCELOT is only needed for legacy boards which didn't have bootloader supporting device tree. Signed-off-by: Gregory CLEMENT Acked-by: Alexandre Belloni Signed-off-by: Thomas Bogendoerfer commit 700364dadceb8d60ca1bb6ccd3da619a36ecdcde Author: Gregory CLEMENT Date: Tue Nov 10 12:45:02 2020 +0100 MIPS: mscc: Prepare configuration to handle more SoCs Ocelot belongs to a family of SoC named the VCore III. In order to add these new Soc, use the new symbol SOC_VCOREIII instead of a one dedicated to Ocelot. In order to avoid regression on driver building, the MSCC_OCELOT configuration symbol is kept until the driver will be converted. Signed-off-by: Gregory CLEMENT Acked-by: Alexandre Belloni Signed-off-by: Thomas Bogendoerfer commit 597fa616c49ae06a1a307750a7df9b59205f462f Author: Gregory CLEMENT Date: Tue Nov 10 12:45:01 2020 +0100 dt-bindings: mips: Add Serval and Jaguar2 Serval and Jaguar2 SoCs belong to the same family as Ocelot and Luton. Acked-by: Rob Herring Signed-off-by: Gregory CLEMENT Reviewed-by: Alexandre Belloni Signed-off-by: Thomas Bogendoerfer commit fc3553cb9fc5fee18299b599040d2cc2eb17666d Author: Gregory CLEMENT Date: Tue Nov 10 12:45:00 2020 +0100 dt-bindings: mips: Add Luton Luton SoC belongs to the same family as Ocelot. Acked-by: Rob Herring Signed-off-by: Gregory CLEMENT Reviewed-by: Alexandre Belloni Signed-off-by: Thomas Bogendoerfer commit 3a5fe2fb9635c43359c9729352f45044f3c8df6b Author: Necip Fazil Yildiran Date: Tue Nov 3 00:34:01 2020 +0300 MIPS: BCM47XX: fix kconfig dependency bug for BCM47XX_BCMA When BCM47XX_BCMA is enabled and BCMA_DRIVER_PCI is disabled, it results in the following Kbuild warning: WARNING: unmet direct dependencies detected for BCMA_DRIVER_PCI_HOSTMODE Depends on [n]: MIPS [=y] && BCMA_DRIVER_PCI [=n] && PCI_DRIVERS_LEGACY [=y] && BCMA [=y]=y Selected by [y]: - BCM47XX_BCMA [=y] && BCM47XX [=y] && PCI [=y] The reason is that BCM47XX_BCMA selects BCMA_DRIVER_PCI_HOSTMODE without depending on or selecting BCMA_DRIVER_PCI while BCMA_DRIVER_PCI_HOSTMODE depends on BCMA_DRIVER_PCI. This can also fail building the kernel. Honor the kconfig dependency to remove unmet direct dependency warnings and avoid any potential build failures. Fixes: c1d1c5d4213e ("bcm47xx: add support for bcma bus") Link: https://bugzilla.kernel.org/show_bug.cgi?id=209879 Signed-off-by: Necip Fazil Yildiran Signed-off-by: Thomas Bogendoerfer commit 09a48cbcd7af9203296938044f1100bb113ce01a Author: Necip Fazil Yildiran Date: Wed Nov 4 19:41:27 2020 +0300 MIPS: BMC47xx: fix kconfig dependency bug for BCM47XX_SSB When BCM47XX_SSB is enabled and SSB_PCIHOST is disabled, it results in the following Kbuild warning: WARNING: unmet direct dependencies detected for SSB_B43_PCI_BRIDGE Depends on [n]: SSB [=y] && SSB_PCIHOST [=n] Selected by [y]: - BCM47XX_SSB [=y] && BCM47XX [=y] && PCI [=y] The reason is that BCM47XX_SSB selects SSB_B43_PCI_BRIDGE without depending on or selecting SSB_PCIHOST while SSB_B43_PCI_BRIDGE depends on SSB_PCIHOST. This can also fail building the kernel as demonstrated in a bug report. Honor the kconfig dependency to remove unmet direct dependency warnings and avoid any potential build failures. Link: https://bugzilla.kernel.org/show_bug.cgi?id=210051 Signed-off-by: Necip Fazil Yildiran Signed-off-by: Thomas Bogendoerfer commit 3180b64aa9f1f25e0a6a743091d5c786a1a85cbd Author: Serge Semin Date: Wed Nov 11 12:15:43 2020 +0300 mips: dts: ralink: mt7628a: Harmonize EHCI/OHCI DT nodes name In accordance with the Generic EHCI/OHCI bindings the corresponding node name is suppose to comply with the Generic USB HCD DT schema, which requires the USB nodes to have the name acceptable by the regexp: "^usb(@.*)?" . Make sure the "generic-ehci" and "generic-ohci"-compatible nodes are correctly named. Signed-off-by: Serge Semin Acked-by: Krzysztof Kozlowski Signed-off-by: Thomas Bogendoerfer commit f4fc91af93924994348a88ff886129cc0322d282 Author: Serge Semin Date: Wed Nov 11 12:15:42 2020 +0300 mips: dts: sead3: Harmonize EHCI/OHCI DT nodes name In accordance with the Generic EHCI/OHCI bindings the corresponding node name is suppose to comply with the Generic USB HCD DT schema, which requires the USB nodes to have the name acceptable by the regexp: "^usb(@.*)?" . Make sure the "generic-ehci" and "generic-ohci"-compatible nodes are correctly named. Signed-off-by: Serge Semin Acked-by: Krzysztof Kozlowski Signed-off-by: Thomas Bogendoerfer commit 877f2382c487eb22dc50a805a7def819b9911313 Author: Serge Semin Date: Wed Nov 11 12:15:41 2020 +0300 mips: dts: jz47x: Harmonize EHCI/OHCI DT nodes name In accordance with the Generic EHCI/OHCI bindings the corresponding node name is suppose to comply with the Generic USB HCD DT schema, which requires the USB nodes to have the name acceptable by the regexp: "^usb(@.*)?" . Make sure the "generic-ehci" and "generic-ohci"-compatible nodes are correctly named. Signed-off-by: Serge Semin Acked-by: Paul Cercueil Acked-by: Krzysztof Kozlowski Signed-off-by: Thomas Bogendoerfer commit de0f49487db3667f5204dcec6d3482c9bd1a0a30 Author: Prashant Malani Date: Thu Oct 29 15:27:42 2020 -0700 platform/chrome: cros_ec_typec: Register partner altmodes Use the discovery data from the Chrome EC to register parter altmodes with the Type C Connector Class framework. Also introduce a node struct to keep track of the list of registered alt modes. Signed-off-by: Prashant Malani Signed-off-by: Enric Balletbo i Serra Acked-by: Heikki Krogerus Cc: Heikki Krogerus Link: https://lore.kernel.org/r/20201029222738.482366-8-pmalani@chromium.org commit f6f668118918f533676e51f3214f5a104562b59c Author: Prashant Malani Date: Thu Oct 29 15:27:40 2020 -0700 platform/chrome: cros_ec_typec: Parse partner PD ID VDOs Use EC_CMD_TYPE_DISCOVERY to retrieve and store the discovery data for the port partner. With that data, update the PD Identity VDO values for the partner, which were earlier not initialized. Signed-off-by: Prashant Malani Signed-off-by: Enric Balletbo i Serra Acked-by: Heikki Krogerus Cc: Heikki Krogerus Link: https://lore.kernel.org/r/20201029222738.482366-7-pmalani@chromium.org commit 80f8cef60d79f23c02e546ba3de2fce84d5e8bdb Author: Prashant Malani Date: Thu Oct 29 15:27:38 2020 -0700 platform/chrome: cros_ec_typec: Introduce TYPEC_STATUS Make a call to the newly introduced EC_CMD_TYPEC_STATUS command. Currently we just check to see if the SOP (port-partner) discovery was done and emit a debug level print for it. Subsequent patches will retrieve and parse the discovery data and fill out the Type C connector class data structures. Also check the EC_FEATURE_TYPEC_CMD feature flag at probe, and only call the new TYPEC_STATUS command if the feature flag is supported. Reported-by: kernel test robot Signed-off-by: Prashant Malani Signed-off-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20201029222738.482366-6-pmalani@chromium.org commit cd2c40ff90b0e385c18f881ab5e17f7137864223 Author: Prashant Malani Date: Thu Oct 29 15:27:36 2020 -0700 platform/chrome: cros_ec: Import Type C host commands Import the EC_CMD_TYPEC_STATUS and EC_CMD_TYPEC_DISCOVERY Chrome OS EC host commands from the EC code base [1]. These commands can be used by the application processor to query Power Delivery (PD) discovery information concerning connected Type C peripherals. Also add the EC_FEATURE_TYPEC_CMD feature flag, which is used to determine whether these commands are supported by the EC. [1]: https://chromium.googlesource.com/chromiumos/platform/ec/+/refs/heads/master/include/ec_commands.h Signed-off-by: Prashant Malani Signed-off-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20201029222738.482366-5-pmalani@chromium.org commit 514acf1cefd020eb21d7c180050a8d66b723d2d8 Author: Prashant Malani Date: Thu Oct 29 15:27:34 2020 -0700 platform/chrome: cros_ec_typec: Clear partner identity on device removal The partner identity struct isn't reset when a partner is removed, meaning a subsequent partner can inherit an old partner's identity VDOs before discovery is complete. So, clear that struct when a partner removal is detected. Signed-off-by: Prashant Malani Signed-off-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20201029222738.482366-4-pmalani@chromium.org commit 7ab5a673f4ce65875c76e9812d2e6da063b87fb7 Author: Prashant Malani Date: Thu Oct 29 15:27:32 2020 -0700 platform/chrome: cros_ec_typec: Fix remove partner logic The cros_unregister_ports() function can be called in situations where the partner has not been registered yet, and so its related data structures would not have been initialized. Calling cros_typec_remove_partner() in such a situation can lead to null pointer dereferences. So, only call cros_typec_remove_partner() if there is a valid registered partner pointer. Signed-off-by: Prashant Malani Signed-off-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20201029222738.482366-3-pmalani@chromium.org commit 0498710be002b35bcb43895c4133a4c4bbfd837e Author: Prashant Malani Date: Thu Oct 29 15:27:30 2020 -0700 platform/chrome: cros_ec_typec: Relocate set_port_params_v*() functions Move the cros_typec_set_port_params_v0/v1() functions closer to the place where they are called, cros_typec_port_update(). While we are performing the relocation, also move cros_typec_get_mux_info() closer to its call-site. No functional changes are introduced by this commit. Signed-off-by: Prashant Malani Signed-off-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20201029222738.482366-2-pmalani@chromium.org commit 2c686404012accc010693fd5c112943c4f0b9dbb Author: Lee Jones Date: Thu Nov 12 19:00:13 2020 +0000 drm/via/via_dma: Remove set but unused variable 'agp_base' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/via/via_dma.c: In function ‘via_cmdbuf_jump’: drivers/gpu/drm/via/via_dma.c:596:11: warning: variable ‘agp_base’ set but not used [-Wunused-but-set-variable] Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201112190039.2785914-5-lee.jones@linaro.org commit 853c1a789f5fe8e783586a5c2dcc2ad1b57ac20f Author: Stephen Boyd Date: Fri Oct 30 16:25:23 2020 -0700 platform/chrome: Don't treat RTC events as wakeup sources The EC sends an RTC host event when the RTC fires, but we don't need to treat that as a wakeup event here. The RTC class already properly handles activating and deactivating a wakeup source in rtc_update_irq() by calling pm_stay_awake() at the start of processing and pm_relax() once all expired RTC timers have been processed. This reduces one wakeup increment but not much else. I noticed this while debugging RTC wakeups and how they always incremented the wakeup count by two instead of one because this is duplicated. Signed-off-by: Stephen Boyd Signed-off-by: Enric Balletbo i Serra Cc: Guenter Roeck Cc: Alessandro Zummo Cc: Alexandre Belloni Cc: Link: https://lore.kernel.org/r/20201030232523.2654478-1-swboyd@chromium.org commit 6ec29d2bb060442315f6c11b0af02ad5da085287 Author: Manasi Navare Date: Wed Nov 11 18:39:49 2020 -0800 drm/i915/dp: Some reshuffling in mode_valid as prep for bigjoiner modes No functional changes. This patch just moves some mode checks around to prepare for adding bigjoiner related mode validation Cc: Ville Syrjälä Signed-off-by: Manasi Navare Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201112023954.12301-1-manasi.d.navare@intel.com commit a5a8ac3ca0000edee1270d1a9c8af7b415b4e618 Merge: 9c2368e353853 358f0ac1f2791 Author: Mark Brown Date: Thu Nov 12 19:35:50 2020 +0000 Merge series "ASoC: SOF: Kconfig corrections" from Pierre-Louis Bossart : Three cosmetic patches and a fix for a randconfig issue. v2: rebase to remove git am issue (worked with --3way before) Pierre-Louis Bossart (1): ASoC: SOF: Intel: fix Kconfig dependency for SND_INTEL_DSP_CONFIG Randy Dunlap (3): ASoC: SOF: imx: fix Kconfig punctuation ASoC: SOF: Kconfig: fix Kconfig punctuation and wording ASoC: SOF: Intel: fix Kconfig punctuation and wording sound/soc/sof/Kconfig | 42 ++++++++++++------------ sound/soc/sof/imx/Kconfig | 10 +++--- sound/soc/sof/intel/Kconfig | 64 ++++++++++++++++++------------------- 3 files changed, 58 insertions(+), 58 deletions(-) -- 2.25.1 commit 9c2368e353853db600b7701a44182b84e8ab3eb0 Merge: 3c3650274f9ae e936619b7ce78 Author: Mark Brown Date: Thu Nov 12 19:35:49 2020 +0000 Merge series "Support SC7180 sound card variation without headset" from xuyuqing : Use compatible string to let machine driver handle the case where ALC5682 headset codec is replaced with ADAU7002 dmic codec xuyuqing (2): ASoC: google: dt-bindings: add new compatible for sc7180-coachz ASoC: qcom: sc7180: Add machine driver for sound card .../bindings/sound/google,sc7180-trogdor.yaml | 4 +- sound/soc/qcom/Kconfig | 1 + sound/soc/qcom/sc7180.c | 86 ++++++++++++++++--- 3 files changed, 77 insertions(+), 14 deletions(-) -- 2.25.1 commit 3c3650274f9ae6671f372f6550389c7aefb88b55 Merge: 76462effbd295 f184892613ddd Author: Mark Brown Date: Thu Nov 12 19:35:48 2020 +0000 Merge series "ASoC: soundwire: SDCA device quirk and cleanups" from Pierre-Louis Bossart : Add one quirk to handle new TigerLake-SDCA device and cleanup code. Pierre-Louis Bossart (4): ASoC: Intel: sof_sdw: add quirk for new TigerLake-SDCA device ASoC: codecs: rt*.c: remove useless pointer cast ASoC: rt711: remove warnings ASoC: codecs: max98373-sdw: align regmap use with other codecs sound/soc/codecs/max98373-sdw.c | 2 +- sound/soc/codecs/rt1308-sdw.c | 2 +- sound/soc/codecs/rt5682-sdw.c | 2 +- sound/soc/codecs/rt700.c | 2 +- sound/soc/codecs/rt711-sdw.c | 15 ++++++++------- sound/soc/codecs/rt711.c | 2 +- sound/soc/codecs/rt715.c | 2 +- sound/soc/intel/boards/sof_sdw.c | 10 ++++++++++ 8 files changed, 24 insertions(+), 13 deletions(-) -- 2.25.1 commit 76462effbd29525b2f12cefb645fe994f777d3ba Merge: c31da0b196f99 5e7aace13df24 Author: Mark Brown Date: Thu Nov 12 19:35:47 2020 +0000 Merge series "ASoC: Fix error handling in wm899x" from Zhang Qilong : The first patch fixed a wrong free in wm8997_probe. The remaining three patches fixed PM disable depth imbalance on error handling. Zhang Qilong (4): ASoC: arizona: Fix a wrong free in wm8997_probe ASoC: arizona: Fix PM disable depth imbalance on error ASoC: wm8994: Fix PM disable depth imbalance on error ASoC: wm8998: Fix PM disable depth imbalance on error sound/soc/codecs/wm8994.c | 6 +++++- sound/soc/codecs/wm8997.c | 8 ++++++-- sound/soc/codecs/wm8998.c | 4 +++- 3 files changed, 14 insertions(+), 4 deletions(-) -- 2.25.4 commit c31da0b196f99c7d95c69bab96e709b72a30f509 Author: Fabio Estevam Date: Tue Nov 10 17:39:37 2020 -0300 ASoC: imx-ssi: Remove unused driver The imx-ssi driver was only used by i.MX non-DT platforms. Since 5.10-rc1, i.MX has been converted to a DT-only platform and all board files are gone. Remove the imx-ssi audio driver as there are no more users at all. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20201110203937.25684-6-festevam@gmail.com Signed-off-by: Mark Brown commit ffc64110b7e988b2fba5f68b82e18214524ac432 Author: Fabio Estevam Date: Tue Nov 10 17:39:36 2020 -0300 ASoC: fsl: eukrea: Remove the SND_SOC_IMX_SSI selection SND_SOC_IMX_SSI was only used by i.MX non-DT platforms. SND_SOC_EUKREA_TLV320 already selects the SND_SOC_FSL_SSI symbol, which is enough. Remove the unneeded SND_SOC_IMX_SSI selection. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20201110203937.25684-5-festevam@gmail.com Signed-off-by: Mark Brown commit 83e7e2278680207f1650949db11ba0e1b6fbc3f5 Author: Fabio Estevam Date: Tue Nov 10 17:39:35 2020 -0300 ASoC: imx-mc13783: Remove unused driver The imx-mc13783 was used on imx27-pdk and imx31-pdk non-DT platforms. Since 5.10-rc1, i.MX has been converted to a DT-only platform and all board files are gone. Remove the imx-mc13783 audio machine driver as there is no user at all. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20201110203937.25684-4-festevam@gmail.com Signed-off-by: Mark Brown commit 440534a0ecfd20235a091fb2a98c2c3adf86834e Author: Fabio Estevam Date: Tue Nov 10 17:39:34 2020 -0300 ASoC: phycore-ac97: Remove unused driver Since commit e1324ece2af4 ("ARM: imx: Remove i.MX35 board files"), the MACH_PCM043 and MACH_PCA100 non-DT platform are no longer supported, so get rid of their machine audio driver too. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20201110203937.25684-3-festevam@gmail.com Signed-off-by: Mark Brown commit 3fbb01fb583fd3ddd319f5a547bf10e322301a3f Author: Fabio Estevam Date: Tue Nov 10 17:39:33 2020 -0300 ASoC: mx27vis-aic32x4: Remove unused driver Since commit 879c0e5e0ac7 ("ARM: imx: Remove i.MX27 board files"), the MACH_IMX27_VISSTRIM_M10 non-DT platform is no longer supported, so get rid of its machine audio driver too. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20201110203937.25684-2-festevam@gmail.com Signed-off-by: Mark Brown commit 9c9fd07eb481cbfc89efa7820b3bb2b4a55eb303 Author: Fabio Estevam Date: Tue Nov 10 17:39:32 2020 -0300 ASoC: wm1133-ev1: Remove unused driver Since commit c93197b0041d ("ARM: imx: Remove i.MX31 board files"), the MACH_MX31ADS_WM1133_EV1 non-DT platform is no longer supported, so get rid of its machine audio driver too. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20201110203937.25684-1-festevam@gmail.com Signed-off-by: Mark Brown commit e88904bfe55d57426d7688acea229c1128588cd7 Author: Lee Jones Date: Thu Nov 12 19:00:36 2020 +0000 drm/sti/sti_hdmi: Move 'colorspace_mode_names' array to where its used Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/sti/sti_hdmi.h:36:40: warning: ‘colorspace_mode_names’ defined but not used [-Wunused-const-variable=] 36 | static const struct drm_prop_enum_list colorspace_mode_names[] = { | ^~~~~~~~~~~~~~~~~~~~~ Cc: Benjamin Gaignard Cc: Vincent Abriou Cc: David Airlie Cc: Daniel Vetter Cc: Philipp Zabel Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201112190039.2785914-28-lee.jones@linaro.org commit e232e3d4ea4a313af4ec0ce316516fcec369585e Author: Lee Jones Date: Thu Nov 12 19:00:11 2020 +0000 include: drm: drm_atomic: Artificially use 'crtc' to avoid 'not used' warning The precedent has already been set by other macros in the same file. Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/vkms/vkms_drv.c:55:19: warning: variable ‘crtc’ set but not used [-Wunused-but-set-variable] 55 | struct drm_crtc *crtc; | ^~~~ Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: Rob Clark Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201112190039.2785914-3-lee.jones@linaro.org commit eee013c1f1280946b79f9baca9f4d3b45b901fa1 Author: Lee Jones Date: Thu Nov 12 19:00:10 2020 +0000 drm/savage/savage_bci: Remove set but never used 'aper_rsrc' and 'fb_rsrc' The comment about them (also removed) says: /* fb_rsrc and aper_rsrc aren't really used currently, but still exist * in case we decide we need information on the BAR for BSD in the * future. */ Well that was written 12 years ago in 2008. We are now in the future and they are still superfluous. We can always add them again at a later date if they are ever required. Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/savage/savage_bci.c: In function ‘savage_driver_firstopen’: drivers/gpu/drm/savage/savage_bci.c:580:24: warning: variable ‘aper_rsrc’ set but not used [-Wunused-but-set-variable] drivers/gpu/drm/savage/savage_bci.c:580:15: warning: variable ‘fb_rsrc’ set but not used [-Wunused-but-set-variable] Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201112190039.2785914-2-lee.jones@linaro.org commit 4fe092fadfc53a39b7bb61647f82f67b575f230a Author: Lee Jones Date: Thu Nov 12 19:00:26 2020 +0000 drm/atmel-hlcdc/atmel_hlcdc_plane: Fix documentation formatting and add missing description Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c:283:6: warning: no previous prototype for ‘atmel_hlcdc_plane_setup_scaler’ [-Wmissing-prototypes] drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c:44: warning: cannot understand function prototype: 'struct atmel_hlcdc_plane_state ' Cc: Sam Ravnborg Cc: Boris Brezillon Cc: David Airlie Cc: Daniel Vetter Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: Ludovic Desroches Cc: dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Lee Jones Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201112190039.2785914-18-lee.jones@linaro.org commit 5f1f10998e7f0ba98a8efc27009cd9a11cff6616 Author: Lee Jones Date: Thu Nov 12 19:00:25 2020 +0000 drm/atmel-hlcdc/atmel_hlcdc_plane: Staticise local function 'atmel_hlcdc_plane_setup_scaler()' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c:283:6: warning: no previous prototype for ‘atmel_hlcdc_plane_setup_scaler’ [-Wmissing-prototypes] Cc: Sam Ravnborg Cc: Boris Brezillon Cc: David Airlie Cc: Daniel Vetter Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: Ludovic Desroches Cc: dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Lee Jones Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201112190039.2785914-17-lee.jones@linaro.org commit c2edc1fe596e00e19a0e1a46dc56406ad2128ba7 Author: Lee Jones Date: Thu Nov 12 19:00:22 2020 +0000 drm/atmel-hlcdc/atmel_hlcdc_crtc: Apply correct formatting to struct docs And fix-up a misnamed member description. Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c:33: warning: cannot understand function prototype: 'struct atmel_hlcdc_crtc_state ' drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c:52: warning: cannot understand function prototype: 'struct atmel_hlcdc_crtc ' Cc: Sam Ravnborg Cc: Boris Brezillon Cc: David Airlie Cc: Daniel Vetter Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: Ludovic Desroches Cc: Jean-Jacques Hiblot Cc: dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Lee Jones Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201112190039.2785914-14-lee.jones@linaro.org commit c36538798fc6c80bd8bdaddad803b0c86dc13d7c Author: Jean-Philippe Brucker Date: Thu Nov 12 10:10:52 2020 +0100 tools/bpf: Always run the *-clean recipes Make $(LIBBPF)-clean and $(LIBBPF_BOOTSTRAP)-clean .PHONY targets, in case those files exist. And keep consistency within the Makefile by making the directory dependencies order-only. Suggested-by: Andrii Nakryiko Signed-off-by: Jean-Philippe Brucker Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201112091049.3159055-2-jean-philippe@linaro.org commit 6a59edd832e2e353809778859d2a4a2d6c94d011 Author: Jean-Philippe Brucker Date: Thu Nov 12 10:10:50 2020 +0100 tools/bpf: Add bootstrap/ to .gitignore Commit 8859b0da5aac ("tools/bpftool: Fix cross-build") added a build-time bootstrap/ directory for bpftool, and removed bpftool-bootstrap. Update .gitignore accordingly. Reported-by: Andrii Nakryiko Signed-off-by: Jean-Philippe Brucker Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201112091049.3159055-1-jean-philippe@linaro.org commit 376ccca853fdb9959f7ac5185a428a9f91e71e86 Author: Oleksij Rempel Date: Tue Oct 27 10:57:24 2020 +0100 Input: ads7846: do not overwrite spi->mode flags set by spi framework Do not overwrite spi->mode flags set by spi framework, otherwise the chip select polarity will get lost. Signed-off-by: Oleksij Rempel Acked-by: Dmitry Torokhov Link: https://lore.kernel.org/r/20201027095724.18654-3-o.rempel@pengutronix.de Signed-off-by: Mark Brown commit 95530a59db3d4b41cf554b3bd150935eb46a44fd Author: YueHaibing Date: Thu Nov 12 22:58:52 2020 +0800 nfp: Fix passing zero to 'PTR_ERR' nfp_cpp_from_nfp6000_pcie() returns ERR_PTR() and never returns NULL. The NULL test should be removed, also return correct err. Signed-off-by: YueHaibing Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20201112145852.6580-1-yuehaibing@huawei.com Signed-off-by: Jakub Kicinski commit 6b133f475a97a0839f02e3c0b937886b9adc2933 Author: Faiz Abbas Date: Wed Nov 4 00:38:21 2020 +0530 arm64: defconfig: Enable GPIO and I2C configs for TI's J721e platform Add configs to enable regulators that supply power to the SD card on TI's J721e platform. These regulators are controlled by either SoC gpios or gpios over i2c expander. Changes to vmlinux size: Before: text data bss dec hex filename 20219067 10875634 523924 31618625 1e27641 vmlinux After: text data bss dec hex filename 20228755 10880422 524628 31633805 1e2b18d vmlinux delta: 15180 (dec) Signed-off-by: Faiz Abbas Signed-off-by: Nishanth Menon Acked-by: Tero Kristo Link: https://lore.kernel.org/r/20201103190821.30937-1-faiz_abbas@ti.com commit cfbf17e69ae82f647c287366b7573e532fc281ee Author: Nishanth Menon Date: Wed Nov 4 16:25:19 2020 -0600 arm64: dts: ti: k3-am65*/j721e*: Fix unit address format error for dss node Fix the node address to follow the device tree convention. This fixes the dtc warning: : Warning (simple_bus_reg): /bus@100000/dss@04a00000: simple-bus unit address format error, expected "4a00000" Fixes: 76921f15acc0 ("arm64: dts: ti: k3-j721e-main: Add DSS node") Fixes: fc539b90eda2 ("arm64: dts: ti: am654: Add DSS node") Signed-off-by: Nishanth Menon Reviewed-by: Jyri Sarha Reviewed-by: Tomi Valkeinen Cc: Jyri Sarha Cc: Tomi Valkeinen Link: https://lore.kernel.org/r/20201104222519.12308-1-nm@ti.com commit 0f191152bcba6758804eed4f6463f9bd32bdbfdb Author: Suman Anna Date: Wed Oct 28 22:38:02 2020 -0500 arm64: dts: ti: k3-j721e-som-p0: Add DDR carveout memory nodes for R5Fs Two carveout reserved memory nodes each have been added for each of the R5F remote processor devices within both the MCU and MAIN domains for the TI J721E EVM boards. These nodes are assigned to the respective rproc device nodes as well. The first region will be used as the DMA pool for the rproc device, and the second region will furnish the static carveout regions for the firmware memory. The current carveout addresses and sizes are defined statically for each device. The R5F processors do not have an MMU, and as such require the exact memory used by the firmwares to be set-aside. The firmware images do not require any RSC_CARVEOUT entries in their resource tables either to allocate the memory for firmware memory segments. Note that the R5F1 carveouts are needed only if the R5F cluster is running in Split (non-LockStep) mode. The reserved memory nodes can be disabled later on if there is no use-case defined to use the corresponding remote processor. Signed-off-by: Suman Anna Signed-off-by: Nishanth Menon Reviewed-by: Lokesh Vutla Link: https://lore.kernel.org/r/20201029033802.15366-9-s-anna@ti.com commit 2879b593c3784e5eafc67cae915d8b7d680455f3 Author: Suman Anna Date: Wed Oct 28 22:38:01 2020 -0500 arm64: dts: ti: k3-j721e-som-p0: Add mailboxes to R5Fs Add the required 'mboxes' property to all the R5F processors for the TI J721E common processor board. The mailboxes and some shared memory are required for running the Remote Processor Messaging (RPMsg) stack between the host processor and each of the R5Fs. The nodes are therefore added in the common k3-j721e-som-p0.dtsi file so that all of these can be co-located. The chosen sub-mailboxes match the values used in the current firmware images. This can be changed, if needed, as per the system integration needs after making appropriate changes on the firmware side as well. Note that any R5F Core1 resources are needed and used only when that R5F cluster is configured for Split-mode. Signed-off-by: Suman Anna Signed-off-by: Nishanth Menon Reviewed-by: Lokesh Vutla Link: https://lore.kernel.org/r/20201029033802.15366-8-s-anna@ti.com commit df445ff9de893146107d37e0cd5e542f800d9b39 Author: Suman Anna Date: Wed Oct 28 22:38:00 2020 -0500 arm64: dts: ti: k3-j721e-main: Add MAIN domain R5F cluster nodes The J721E SoCs have 3 dual-core Arm Cortex-R5F processor (R5FSS) subsystems/clusters. One R5F cluster (MCU_R5FSS0) is present within the MCU domain, and the remaining two clusters are present in the MAIN domain (MAIN_R5FSS0 & MAIN_R5FSS1). Each of these can be configured at boot time to be either run in a LockStep mode or in an Asymmetric Multi Processing (AMP) fashion in Split-mode. These subsystems have 64 KB each Tightly-Coupled Memory (TCM) internal memories for each core split between two banks - ATCM and BTCM (further interleaved into two banks). There are some IP integration differences from standard Arm R5 clusters such as the absence of an ACP port, presence of an additional TI-specific Region Address Translater (RAT) module for translating 32-bit CPU addresses into larger system bus addresses etc. Add the DT nodes for these two MAIN domain R5F cluster/subsystems, the two R5F cores are each added as child nodes to the corresponding main cluster node. Both the clusters are configured to run in LockStep mode by default, with the ATCMs enabled to allow the R5 cores to execute code from DDR with boot-strapping code from ATCM. The inter-processor communication between the main A72 cores and these processors is achieved through shared memory and Mailboxes. The following firmware names are used by default for these cores, and can be overridden in a board dts file if needed: MAIN R5FSS0 Core0: j7-main-r5f0_0-fw (both in LockStep and Split modes) MAIN R5FSS0 Core1: j7-main-r5f0_1-fw (needed only in Split mode) MAIN R5FSS1 Core0: j7-main-r5f1_0-fw (both in LockStep and Split modes) MAIN R5FSS1 Core1: j7-main-r5f1_1-fw (needed only in Split mode) Signed-off-by: Suman Anna Signed-off-by: Nishanth Menon Reviewed-by: Lokesh Vutla Link: https://lore.kernel.org/r/20201029033802.15366-7-s-anna@ti.com commit dd74c9459cf2c87c3143b4b9005b7c9056fccdb0 Author: Suman Anna Date: Wed Oct 28 22:37:59 2020 -0500 arm64: dts: ti: k3-j721e-mcu: Add MCU domain R5F cluster node The J721E SoCs have 3 dual-core Arm Cortex-R5F processor (R5FSS) subsystems/clusters. One R5F cluster (MCU_R5FSS0) is present within the MCU domain, and the remaining two clusters are present in the MAIN domain (MAIN_R5FSS0 & MAIN_R5FSS1). Each of these can be configured at boot time to be either run in a LockStep mode or in an Asymmetric Multi Processing (AMP) fashion in Split-mode. These subsystems have 64 KB each Tightly-Coupled Memory (TCM) internal memories for each core split between two banks - ATCM and BTCM (further interleaved into two banks). There are some IP integration differences from standard Arm R5 clusters such as the absence of an ACP port, presence of an additional TI-specific Region Address Translater (RAT) module for translating 32-bit CPU addresses into larger system bus addresses etc. Add the DT node for the MCU domain R5F cluster/subsystem, the two R5F cores are added as child nodes to the main cluster/subsystem node. The cluster is configured to run in LockStep mode by default, with the ATCMs enabled to allow the R5 cores to execute code from DDR with boot-strapping code from ATCM. The inter-processor communication between the main A72 cores and these processors is achieved through shared memory and Mailboxes. The following firmware names are used by default for these cores, and can be overridden in a board dts file if needed: MCU R5FSS0 Core0: j7-mcu-r5f0_0-fw (both in LockStep and Split modes) MCU R5FSS0 Core1: j7-mcu-r5f0_1-fw (needed only in Split mode) Signed-off-by: Suman Anna Signed-off-by: Nishanth Menon Reviewed-by: Lokesh Vutla Link: https://lore.kernel.org/r/20201029033802.15366-6-s-anna@ti.com commit f82c5e0a8bc1311aee140bfed0888fc9a99afde0 Author: Suman Anna Date: Wed Oct 28 22:37:58 2020 -0500 arm64: dts: ti: k3-am654-base-board: Reserve memory for IPC between R5F cores Add a reserved memory node to reserve a portion of the DDR memory to be used for performing inter-processor communication between all the MCU R5F remote processors running RTOS on all the TI AM654 boards. This memory shall be exercised only if the MCU R5FSS cluster is configured for Split mode. A single 1 MB of memory at 0xa2000000 is reserved for this purpose, and this accounts for all the vrings and vring buffers between pair of these R5F remote processors. Signed-off-by: Suman Anna Signed-off-by: Nishanth Menon Reviewed-by: Lokesh Vutla Link: https://lore.kernel.org/r/20201029033802.15366-5-s-anna@ti.com commit 954ec5139db091ff51cec4bf57c42f9deebc8747 Author: Suman Anna Date: Wed Oct 28 22:37:57 2020 -0500 arm64: dts: ti: k3-am654-base-board: Add DDR carveout memory nodes for R5Fs The R5F processors do not have an MMU, and as such require the exact memory used by the firmwares to be set-aside. Four carveout reserved memory nodes have been added with two each (1 MB and 15 MB in size) used for each of the MCU R5F remote processor devices on all the TI K3 AM65x boards. These nodes are assigned to the respective rproc device nodes as well. The current carveout addresses and sizes are defined statically for each device. The first region will be used as the DMA pool for the rproc device, and the second region will furnish the static carveout regions for the firmware memory. Note that the R5F1 carveouts are needed only if the corresponding R5F cluster is running in Split (non-LockStep) mode. The corresponding reserved memory nodes can be disabled later on if there is no use-case defined to use the corresponding remote processor. Signed-off-by: Suman Anna Signed-off-by: Nishanth Menon Reviewed-by: Lokesh Vutla Link: https://lore.kernel.org/r/20201029033802.15366-4-s-anna@ti.com commit 10332cd6bcf287e22dac875d121b73adb762f96b Author: Suman Anna Date: Wed Oct 28 22:37:56 2020 -0500 arm64: dts: ti: k3-am654-base-board: Add mailboxes to R5Fs Add the required 'mboxes' property to both the R5F processors on all the TI K3 AM65x boards. The mailboxes and some shared memory are required for running the Remote Processor Messaging (RPMsg) stack between the host processor and each of the R5Fs. The chosen sub-mailboxes match the values used in the current firmware images. This can be changed, if needed, as per the system integration needs after making appropriate changes on the firmware side as well. Note that the R5F Core1 resources are needed and used only when the R5F cluster is configured for Split-mode. Signed-off-by: Suman Anna Signed-off-by: Nishanth Menon Reviewed-by: Lokesh Vutla Link: https://lore.kernel.org/r/20201029033802.15366-3-s-anna@ti.com commit 5bb9e0f6e8505e31159963150104569d9b8a8911 Author: Suman Anna Date: Wed Oct 28 22:37:55 2020 -0500 arm64: dts: ti: k3-am65-mcu: Add MCU domain R5F cluster node The AM65x SoCs have a single dual-core Arm Cortex-R5F processor (R5FSS) subsystem/cluster. This R5F cluster (MCU_R5FSS0) is present within the MCU domain, and can be configured at boot time to be either run in a LockStep mode or in an Asymmetric Multi Processing (AMP) fashion in Split-mode. This subsystem has 64 KB each Tightly-Coupled Memory (TCM) internal memories for each core split between two banks - TCMA and TCMB (further interleaved into two banks). There are some IP integration differences from standard Arm R5F clusters such as the absence of an ACP port, presence of an additional TI-specific Region Address Translater (RAT) module for translating 32-bit CPU addresses into larger system bus addresses etc. Add the DT node for this R5F cluster/subsystem, the two R5F cores are added as child nodes to the main cluster node. The cluster is configured to run in LockStep mode by default, with the ATCMs enabled to allow the R5 cores to execute code from DDR with boot-strapping code from ATCM. The inter-processor communication between the main A53 cores and these processors is achieved through shared memory and Mailboxes. The following firmware names are used by default for these cores, and can be overridden in a board dts file if needed: am65x-mcu-r5f0_0-fw (LockStep mode and for Core0 in Split mode) am65x-mcu-r5f0_1-fw (Core1 in Split mode) Signed-off-by: Suman Anna Signed-off-by: Nishanth Menon Reviewed-by: Lokesh Vutla Link: https://lore.kernel.org/r/20201029033802.15366-2-s-anna@ti.com commit 50301e8815c681bc5de8ca7050c4b426923d4e19 Author: Tomi Valkeinen Date: Mon Nov 2 15:46:50 2020 +0200 arm64: dts: ti: k3-am65: mark dss as dma-coherent DSS is IO coherent on AM65, so we should mark it as such with 'dma-coherent' property in the DT file. Fixes: fc539b90eda2 ("arm64: dts: ti: am654: Add DSS node") Signed-off-by: Tomi Valkeinen Signed-off-by: Nishanth Menon Acked-by: Nikhil Devshatwar Cc: stable@vger.kernel.org # v5.8+ Link: https://lore.kernel.org/r/20201102134650.55321-1-tomi.valkeinen@ti.com commit 7af80c02c7b3cf7ac580a33f15d155730574769f Author: Weihang Li Date: Thu Nov 12 19:29:42 2020 +0800 RDMA/hns: Fix double free of the pointer to TSQ/TPQ A return statement is omitted after getting HEM table, then the newly allocated pointer will be freed directly, which will cause a calltrace when the driver was removed. Fixes: d6d91e46210f ("RDMA/hns: Add support for configuring GMV table") Link: https://lore.kernel.org/r/1605180582-46504-1-git-send-email-liweihang@huawei.com Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 22dd4c707673129ed17e803b4bf68a567b2731db Author: Christoph Hellwig Date: Fri Nov 6 19:19:35 2020 +0100 nvme-rdma: Use ibdev_to_node instead of dereferencing ->dma_device ->dma_device is a private implementation detail of the RDMA core. Use the ibdev_to_node helper to get the NUMA node for a ib_device instead of poking into ->dma_device. Link: https://lore.kernel.org/r/20201106181941.1878556-5-hch@lst.de Signed-off-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe commit 8ecfca68dc4cbee1272a0161e3f2fb9387dc6930 Author: Christoph Hellwig Date: Fri Nov 6 19:19:34 2020 +0100 RDMA: Lift ibdev_to_node from rds to common code Lift the ibdev_to_node from rds to common code and document it. Link: https://lore.kernel.org/r/20201106181941.1878556-4-hch@lst.de Signed-off-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe commit 2af29468e3b3793b49f6c4385d2cabcea43fe076 Author: Christoph Hellwig Date: Fri Nov 6 19:19:37 2020 +0100 RDMA/core: Remove ib_dma_{alloc,free}_coherent These two functions are entirely unused. Link: https://lore.kernel.org/r/20201106181941.1878556-7-hch@lst.de Signed-off-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe commit b116c702791a9834e6485f67ca6267d9fdf59b87 Author: Christoph Hellwig Date: Fri Nov 6 19:19:33 2020 +0100 RDMA/umem: Use ib_dma_max_seg_size instead of dma_get_max_seg_size RDMA ULPs must not call DMA mapping APIs directly but instead use the ib_dma_* wrappers. Fixes: 0c16d9635e3a ("RDMA/umem: Move to allocate SG table from pages") Link: https://lore.kernel.org/r/20201106181941.1878556-3-hch@lst.de Reported-by: Jason Gunthorpe Signed-off-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe commit 358f0ac1f2791c80c19cc26706cf34664c9fd756 Author: Pierre-Louis Bossart Date: Thu Nov 12 10:44:25 2020 -0600 ASoC: SOF: Intel: fix Kconfig dependency for SND_INTEL_DSP_CONFIG SND_INTEL_DSP_CONFIG is selected by the HDaudio, Skylake and SOF drivers. When the HDaudio link is not selected as a option, this Kconfig option is not touched and will default to whatever other drivers selected. In the case e.g. where HDaudio is compiled as built-in, the linker will complain: ld: sound/soc/sof/sof-pci-dev.o: in function `sof_pci_probe': sof-pci-dev.c:(.text+0x5c): undefined reference to `snd_intel_dsp_driver_probe' Adding the select for all HDaudio platforms, regardless of whether they rely on the HDaudio link or not, solves the problem. Reported-by: Randy Dunlap Acked-by: Randy Dunlap Fixes: 82d9d54a6c0ee ('ALSA: hda: add Intel DSP configuration / probe code') Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20201112164425.25603-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 66e1b65128c2bf884d39589a8308dd115c5eba67 Author: Randy Dunlap Date: Thu Nov 12 10:44:24 2020 -0600 ASoC: SOF: Intel: fix Kconfig punctuation and wording Add periods at the end of sentences in help text. Insert a "not" in one place. Fix help text indentation. Remove a duplicate "Intel(R)" in one place. Signed-off-by: Randy Dunlap Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20201112164425.25603-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit aff581aee84079b89e796d6ab26560c88d1dcd7a Author: Randy Dunlap Date: Thu Nov 12 10:44:23 2020 -0600 ASoC: SOF: Kconfig: fix Kconfig punctuation and wording Add periods at the end of sentences in help text. Drop "a" in one place where it is not needed. Fix a verb. Add some capitalization. Signed-off-by: Randy Dunlap Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20201112164425.25603-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 724d53f6a0f318390630a50ee713fa19a927fa23 Author: Randy Dunlap Date: Thu Nov 12 10:44:22 2020 -0600 ASoC: SOF: imx: fix Kconfig punctuation Add periods at the end of sentences in help text. Signed-off-by: Randy Dunlap Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20201112164425.25603-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit fbb7dc5db6dee553b5a07c27e86364a5223e244c Author: Arnd Bergmann Date: Mon Oct 26 22:12:30 2020 +0100 RDMa/mthca: Work around -Wenum-conversion warning gcc points out a suspicious mixing of enum types in a function that converts from MTHCA_OPCODE_* values to IB_WC_* values: drivers/infiniband/hw/mthca/mthca_cq.c: In function 'mthca_poll_one': drivers/infiniband/hw/mthca/mthca_cq.c:607:21: warning: implicit conversion from 'enum ' to 'enum ib_wc_opcode' [-Wenum-conversion] 607 | entry->opcode = MTHCA_OPCODE_INVALID; Nothing seems to ever check for MTHCA_OPCODE_INVALID again, no idea if this is meaningful, but it seems harmless as it deals with an invalid input. Remove MTHCA_OPCODE_INVALID and set the ib_wc_opcode to 0xFF, which is still bogus, but at least doesn't make compiler warnings. Fixes: 2a4443a69934 ("[PATCH] IB/mthca: fill in opcode field for send completions") Link: https://lore.kernel.org/r/20201026211311.3887003-1-arnd@kernel.org Signed-off-by: Arnd Bergmann Signed-off-by: Jason Gunthorpe commit c5633a72a1b8a2740bdb1495eab010f1124fd5ee Author: Leon Romanovsky Date: Wed Nov 4 16:45:56 2020 +0200 RDMA/core: Make FD destroy callback void All FD object destroy implementations return 0, so declare this callback void. Link: https://lore.kernel.org/r/20201104144556.3809085-3-leon@kernel.org Reviewed-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit efa968ee20248ebf8da8542f21d5d2811e86392f Author: Leon Romanovsky Date: Wed Nov 4 16:45:55 2020 +0200 RDMA/core: Postpone uobject cleanup on failure till FD close Remove the ib_is_destroyable_retryable() concept. The idea here was to allow the drivers to forcibly clean the HW object even if they otherwise didn't want to (eg because of usecnt). This was an attempt to clean up in a world where drivers were not allowed to fail HW object destruction. Now that we are going back to allowing HW objects to fail destroy this doesn't make sense. Instead if a uobject's HW object can't be destroyed it is left on the uobject list and it is up to uverbs_destroy_ufile_hw() to clean it. Multiple passes over the uobject list allow hidden dependencies to be resolved. If that fails the HW driver is broken, throw a WARN_ON and leak the HW object memory. All the other tricky failure paths (eg on creation error unwind) have already been updated to this new model. Link: https://lore.kernel.org/r/20201104144556.3809085-2-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 124f035310adc781d91cdf0b7c6e4fb3c7e43e23 Author: Krzysztof Kozlowski Date: Tue Nov 10 20:37:49 2020 +0100 clk: samsung: allow building the clkout driver as module The Exynos clock output driver can be built as module (it does not have to be part of core init process) for better customization. Adding a KConfig entry allows also compile testing for build coverage. Signed-off-by: Krzysztof Kozlowski Acked-by: Chanwoo Choi Acked-by: Sylwester Nawrocki Link: https://lore.kernel.org/r/20201110193749.261367-1-krzk@kernel.org commit f7d01359b0d96331fce7bd4051d3b68a4bb5ea83 Author: Lucas Tanure Date: Thu Nov 12 15:02:17 2020 +0000 regmap: Fix order of regmap write log _regmap_write can trigger a _regmap_select_page, which will call another _regmap_write that will be executed first, but the log shows the inverse order Also, keep consistency with _regmap_read which only logs in case of success Signed-off-by: Lucas Tanure Reviewed-by: Charles Keepax Link: https://lore.kernel.org/r/20201112150217.459844-1-tanureal@opensource.cirrus.com Signed-off-by: Mark Brown commit f7a95c902b020c7fe6781f0814187c2e2266a689 Author: Zou Wei Date: Tue Nov 3 19:57:54 2020 +0800 IB/isert: Do not excplicitly check == false for bool It is not the kernel style, warning reported by coccicheck: ./ib_isert.c:1104:12-24: WARNING: Comparison to bool Link: https://lore.kernel.org/r/1604404674-32998-1-git-send-email-zou_wei@huawei.com Reported-by: Hulk Robot Signed-off-by: Zou Wei Reviewed-by: Sagi Grimberg Signed-off-by: Jason Gunthorpe commit 34b93f19c92ca7720efe25e852d480bb13101dec Merge: 724d06b437bba 2a9d3716b810a Author: Jakub Kicinski Date: Thu Nov 12 07:56:32 2020 -0800 Merge branch 'selftests-pmtu-sh-improve-the-test-result-processing' Po-Hsu Lin says: ==================== selftests: pmtu.sh: improve the test result processing The pmtu.sh test script treats all non-zero return code as a failure, thus it will be marked as FAILED when some sub-test got skipped. This patchset will: 1. Use the kselftest framework skip code $ksft_skip to replace the hardcoded SKIP return code. 2. Improve the result processing, the test will be marked as PASSED if nothing goes wrong and not all the tests were skipped. ==================== Link: https://lore.kernel.org/r/20201110020049.6705-1-po-hsu.lin@canonical.com Signed-off-by: Jakub Kicinski commit 2a9d3716b810a4f2c8291b7aa8f358d11693f6e5 Author: Po-Hsu Lin Date: Tue Nov 10 10:00:49 2020 +0800 selftests: pmtu.sh: improve the test result processing This test will treat all non-zero return codes as failures, it will make the pmtu.sh test script being marked as FAILED when some sub-test got skipped. Improve the result processing by * Only mark the whole test script as SKIP when all of the sub-tests were skipped * If the sub-tests were either passed or skipped, the overall result will be PASS * If any of them has failed with return code 1 or anything bad happened (e.g. return code 127 for command not found), the overall result will be FAIL Signed-off-by: Po-Hsu Lin Signed-off-by: Jakub Kicinski commit ef1220a7d4bbdb5fc435d691776778568dfb69a8 Author: Po-Hsu Lin Date: Tue Nov 10 10:00:48 2020 +0800 selftests: pmtu.sh: use $ksft_skip for skipped return code This test uses return code 2 as a hard-coded skipped state, let's use the kselftest framework skip code variable $ksft_skip instead to make it more readable and easier to maintain. Signed-off-by: Po-Hsu Lin Signed-off-by: Jakub Kicinski commit 724d06b437bba9faf280842a983e69c04f244767 Author: Geliang Tang Date: Tue Nov 10 11:01:43 2020 +0800 mptcp: fix static checker warnings in mptcp_pm_add_timer Fix the following Smatch complaint: net/mptcp/pm_netlink.c:213 mptcp_pm_add_timer() warn: variable dereferenced before check 'msk' (see line 208) net/mptcp/pm_netlink.c 207 struct mptcp_sock *msk = entry->sock; 208 struct sock *sk = (struct sock *)msk; 209 struct net *net = sock_net(sk); ^^ "msk" dereferenced here. 210 211 pr_debug("msk=%p", msk); 212 213 if (!msk) ^^^^ Too late. 214 return; 215 Fixes: 93f323b9cccc ("mptcp: add a new sysctl add_addr_timeout") Reported-by: Dan Carpenter Reviewed-by: Dan Carpenter Reviewed-by: Matthieu Baerts Signed-off-by: Geliang Tang Link: https://lore.kernel.org/r/078a2ef5bdc4e3b2c25ef852461692001f426495.1604976945.git.geliangtang@gmail.com Signed-off-by: Jakub Kicinski commit bec58f40d6c5372d812c93cc3947f3bc97440e57 Author: Jens Axboe Date: Fri Oct 9 15:56:07 2020 -0600 xtensa: add support for TIF_NOTIFY_SIGNAL Wire up TIF_NOTIFY_SIGNAL handling for xtensa. Thanks to Max Filippov for making the asm correct. Cc: linux-xtensa@linux-xtensa.org Signed-off-by: Jens Axboe commit 32d59773da38cd83e497a70eb9754d4bbae3aeae Author: Jens Axboe Date: Fri Oct 9 16:00:49 2020 -0600 arm: add support for TIF_NOTIFY_SIGNAL Wire up TIF_NOTIFY_SIGNAL handling for arm. Cc: linux-arm-kernel@lists.infradead.org Acked-by: Russell King Signed-off-by: Jens Axboe commit b2d2440430c0fdd5e0cad3efd6d1c9e3d3d02e5b Author: Zhu Yanjun Date: Mon Nov 2 22:13:42 2020 +0800 RDMA/rxe: Remove VLAN code leftovers from RXE Since the commit fd49ddaf7e26 ("RDMA/rxe: prevent rxe creation on top of vlan interface") does not permit rxe on top of vlan device, all the stuff related with vlan should be removed. Fixes: fd49ddaf7e26 ("RDMA/rxe: prevent rxe creation on top of vlan interface") Link: https://lore.kernel.org/r/1604326422-18625-1-git-send-email-yanjunz@nvidia.com Signed-off-by: Zhu Yanjun Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 6e6eae04f5123b7b2f4265f7a702b5200fa5863b Author: Colin Ian King Date: Fri Oct 30 14:30:02 2020 +0000 SFH: fix error return check for -ERESTARTSYS Currently the check for the error return code -ERESTARTSYS is dead code and never executed because a previous check for ret < 0 is catching this and returning -ETIMEDOUT instead. Fix this by checking for -ERESTARTSYS before the more generic negative error code. Addresses-Coverity: ("Logically dead code") Fixes: 4b2c53d93a4b ("SFH:Transport Driver to add support of AMD Sensor Fusion Hub (SFH)") Signed-off-by: Colin Ian King Reviewed-by: Sandeep Singh Signed-off-by: Jiri Kosina commit 5ef76dac0f2c26aeae4ee79eb830280f16d5aceb Author: Lukas Wunner Date: Sun Nov 8 23:41:00 2020 +0100 spi: st-ssc4: Fix unbalanced pm_runtime_disable() in probe error path If the calls to devm_platform_ioremap_resource(), irq_of_parse_and_map() or devm_request_irq() fail on probe of the ST SSC4 SPI driver, the runtime PM disable depth is incremented even though it was not decremented before. Fix it. Fixes: cd050abeba2a ("spi: st-ssc4: add missed pm_runtime_disable") Signed-off-by: Lukas Wunner Cc: # v5.5+ Cc: Chuhong Yuan Link: https://lore.kernel.org/r/fbe8768c30dc829e2d77eabe7be062ca22f84024.1604874488.git.lukas@wunner.de Signed-off-by: Mark Brown commit c575e9113bff5e024d75481613faed5ef9d465b2 Author: Lukas Wunner Date: Sun Nov 8 23:41:00 2020 +0100 spi: pic32: Don't leak DMA channels in probe error path If the calls to devm_request_irq() or devm_spi_register_master() fail on probe of the PIC32 SPI driver, the DMA channels requested by pic32_spi_dma_prep() are erroneously not released. Plug the leak. Fixes: 1bcb9f8ceb67 ("spi: spi-pic32: Add PIC32 SPI master driver") Signed-off-by: Lukas Wunner Cc: # v4.7+ Cc: Purna Chandra Mandal Link: https://lore.kernel.org/r/9624250e3a7aa61274b38219a62375bac1def637.1604874488.git.lukas@wunner.de Signed-off-by: Mark Brown commit 8853b2503014aca5c793d2c7f0aabc990b32bdad Author: Lukas Wunner Date: Sun Nov 8 23:41:00 2020 +0100 spi: synquacer: Disable clock in probe error path If the calls to platform_get_irq() or devm_request_irq() fail on probe of the SynQuacer SPI driver, the clock "sspi->clk" is erroneously not unprepared and disabled. If the clock rate "master->max_speed_hz" cannot be determined, the same happens and in addition the spi_master struct is not freed. Fix it. Fixes: b0823ee35cf9 ("spi: Add spi driver for Socionext SynQuacer platform") Signed-off-by: Lukas Wunner Cc: # v5.3+ Cc: Masahisa Kojima Link: https://lore.kernel.org/r/232281df1ab91d8f0f553a62d5f97fc264ace4da.1604874488.git.lukas@wunner.de Signed-off-by: Mark Brown commit 0c7f946d6b10ea240743cdcd8a502f82a6148b10 Author: Kai Vehmanen Date: Wed Nov 11 19:33:21 2020 +0200 ASoC: SOF: loader: do not warn about unknown firmware headers The firmware extended data IPC and manifest structures are designed to be extendable without breaking the driver-firmware ABI. Driver should not raise a warning in case a new header type is detected at firmware boot. There are already checks for IPC ABI compatibility in snd_sof_ipc_valid() and if the versions are deemed compatible, extra fields in IPC messages should not trigger warnings. Signed-off-by: Kai Vehmanen Reviewed-by: Ranjani Sridharan Reviewed-by: Karol Trzciński Link: https://lore.kernel.org/r/20201111173321.1933452-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit e7ee770a3f9004a5b4ddaa28ff9efe3ff3382268 Author: Dharageswari R Date: Mon Nov 9 13:09:58 2020 -0800 ASoC: Intel: Boards: tgl_max98373: add dpcm_capture flag for speaker_smart_amp Smart_amp_speaker device has the playback stream and capture stream associated to it. Hence add the dpcm_capture = 1 flag while dailink creation. This patches fixes: ERR kernel [timestamp] SSP1-Codec: ASoC: no backend capture stream Reviewed-by: Pierre-Louis Bossart Signed-off-by: Dharageswari R Signed-off-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20201109210958.84198-1-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown commit f184892613dddcc12a1880c3b406314ec81498c7 Author: Pierre-Louis Bossart Date: Wed Nov 11 15:43:18 2020 -0600 ASoC: codecs: max98373-sdw: align regmap use with other codecs It's not clear why this driver has an additional call to regmap_mark_dirty(), remove to align with others. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Kai Vehmanen Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20201111214318.150529-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 17f6433192d858e49a40d1fa939bf61cc493a3b7 Author: Pierre-Louis Bossart Date: Wed Nov 11 15:43:17 2020 -0600 ASoC: rt711: remove warnings cppcheck complains, use separate loop variable for sink and source ports sound/soc/codecs/rt711-sdw.c:382:4: style: Variable 'i' is reassigned a value before the old one has been used. [redundantAssignment] i = 0; ^ sound/soc/codecs/rt711-sdw.c:371:4: note: i is assigned i++; ^ sound/soc/codecs/rt711-sdw.c:382:4: note: i is overwritten i = 0; ^ Signed-off-by: Pierre-Louis Bossart Reviewed-by: Kai Vehmanen Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20201111214318.150529-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 4a55000722d74e4ad1ea4700a423e21fab0d53ba Author: Pierre-Louis Bossart Date: Wed Nov 11 15:43:16 2020 -0600 ASoC: codecs: rt*.c: remove useless pointer cast Pointer cast is not necessary, remove. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Kai Vehmanen Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20201111214318.150529-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 488cdbd8931fe4bc7f374a8b429e81d0e4b7ac76 Author: Pierre-Louis Bossart Date: Wed Nov 11 15:43:15 2020 -0600 ASoC: Intel: sof_sdw: add quirk for new TigerLake-SDCA device Add quirks for jack detection, rt715 DAI and number of speakers. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20201111214318.150529-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit e936619b7ce784c808a8e2524f712a89ef245920 Author: xuyuqing Date: Thu Nov 12 09:43:28 2020 +0800 ASoC: qcom: sc7180: Modify machine driver for sound card Bypass set jack because there is no jack on coachz. Create route for dmic. Signed-off-by: xuyuqing Link: https://lore.kernel.org/r/20201112014328.695232-3-xuyuqing@huaqin.corp-partner.google.com Signed-off-by: Mark Brown commit 80e2b1208d87fc46b6980da99a173130082c7af4 Author: xuyuqing Date: Thu Nov 12 09:43:27 2020 +0800 ASoC: google: dt-bindings: add new compatible for sc7180-coachz Add devicetree bindings for coachz in documentation file Signed-off-by: xuyuqing Link: https://lore.kernel.org/r/20201112014328.695232-2-xuyuqing@huaqin.corp-partner.google.com Signed-off-by: Mark Brown commit 5e7aace13df24ff72511f29c14ebbfe638ef733c Author: Zhang Qilong Date: Wed Nov 11 21:09:20 2020 +0800 ASoC: arizona: Fix a wrong free in wm8997_probe In the normal path, we should not free the arizona, we should return immediately. It will be free when call remove operation. Fixes: 31833ead95c2c ("ASoC: arizona: Move request of speaker IRQs into bus probe") Reported-by: Richard Fitzgerald Signed-off-by: Zhang Qilong Acked-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20201111130923.220186-2-zhangqilong3@huawei.com Signed-off-by: Mark Brown commit 730b5764ea8526e48bdb85a24ed96d62de435940 Author: Geert Uytterhoeven Date: Tue Nov 10 16:58:41 2020 +0100 ARM: 9024/1: Drop useless cast of "u64" to "long long" As "u64" is equivalent to "unsigned long long", there is no need to cast a "u64" parameter for printing it using the "0x%08llx" format specifier. Signed-off-by: Geert Uytterhoeven Signed-off-by: Russell King commit df8eda0f1f58e2419875046f57c27c4d72378575 Author: Geert Uytterhoeven Date: Tue Nov 10 16:59:30 2020 +0100 ARM: 9023/1: Spelling s/mmeory/memory/ Fix a misspelling of the word "memory". Signed-off-by: Geert Uytterhoeven Signed-off-by: Russell King commit 735e8d93dc2b107f7891a9c2b1c4cfbea1fcbbbc Author: Fangrui Song Date: Fri Nov 6 21:46:11 2020 +0100 ARM: 9022/1: Change arch/arm/lib/mem*.S to use WEAK instead of .weak Commit d6d51a96c7d6 ("ARM: 9014/2: Replace string mem* functions for KASan") add .weak directives to memcpy/memmove/memset to avoid collision with KASAN interceptors. This does not work with LLVM's integrated assembler (the assembly snippet `.weak memcpy ... .globl memcpy` produces a STB_GLOBAL memcpy while GNU as produces a STB_WEAK memcpy). LLVM 12 (since https://reviews.llvm.org/D90108) will error on such an overridden symbol binding. Use the appropriate WEAK macro instead. Link: https://github.com/ClangBuiltLinux/linux/issues/1190 -- Fixes: d6d51a96c7d6 ("ARM: 9014/2: Replace string mem* functions for KASan") Reported-by: Nick Desaulniers Signed-off-by: Fangrui Song Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers Signed-off-by: Russell King commit 0446049432136abb76eb012c3ddd00fce670881b Author: José Roberto de Souza Date: Wed Nov 11 08:24:08 2020 -0800 drm/i915/display: Make get_allowed_dc_mask().max_dc set a chain of if and elses Just following what we do in many other places, DG1 is a exception so move it to the top instead of add it inside of INTEL_GEN(dev_priv) >= 12. Cc: Lucas De Marchi Cc: Anusha Srivatsa Signed-off-by: José Roberto de Souza Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20201111162408.98002-2-jose.souza@intel.com commit 02d794a34c0083057bdfd576e2f6e75b54f31e00 Author: José Roberto de Souza Date: Wed Nov 11 08:24:07 2020 -0800 drm/i915/display: Group DC9 mask set DC9 has a separate HW flow from the rest of the DC states and it is available in GEN9 LP platforms and on GEN11 and newer, so here moving the assignment of the mask to a single conditional block to simplifly code. Cc: Lucas De Marchi Cc: Anusha Srivatsa Signed-off-by: José Roberto de Souza Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20201111162408.98002-1-jose.souza@intel.com commit 0fa86fc2e28227f1e64f13867e73cf864c6d25ad Author: Andy Shevchenko Date: Wed Nov 11 14:06:05 2020 +0200 pinctrl: merrifield: Set default bias in case no particular value given When GPIO library asks pin control to set the bias, it doesn't pass any value of it and argument is considered boolean (and this is true for ACPI GpioIo() / GpioInt() resources, by the way). Thus, individual drivers must behave well, when they got the resistance value of 1 Ohm, i.e. transforming it to sane default. In case of Intel Merrifield pin control hardware the 20 kOhm sounds plausible because it gives a good trade off between weakness and minimization of leakage current (will be only 50 uA with the above choice). Fixes: 4e80c8f50574 ("pinctrl: intel: Add Intel Merrifield pin controller support") Depends-on: 2956b5d94a76 ("pinctrl / gpio: Introduce .set_config() callback for GPIO chips") Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 5aa5541eca04a1c69a05bbb747164926bbf20de4 Author: Evan Green Date: Wed Nov 11 15:17:28 2020 -0800 pinctrl: jasperlake: Fix HOSTSW_OWN offset GPIOs that attempt to use interrupts get thwarted with a message like: "pin 161 cannot be used as IRQ" (for instance with SD_CD). This is because the HOSTSW_OWN offset is incorrect, so every GPIO looks like it's owned by ACPI. Fixes: e278dcb7048b1 ("pinctrl: intel: Add Intel Jasper Lake pin controller support") Cc: stable@vger.kernel.org Signed-off-by: Evan Green Acked-by: Mika Westerberg Signed-off-by: Andy Shevchenko commit bf8b7e689de22f862c4b066ff73d8267e04905e2 Author: Andy Shevchenko Date: Tue Nov 10 21:59:23 2020 +0200 pinctrl: jasperlake: Unhide SPI group of pins If the group of pins is hidden in the pin list it affects the register offset calculation despite fixed GPIO base. Hence, the offsets of all pins after the hidden group are broken. Instead we have to unhide the group and use a flag to exclude it from GPIO number space. Fixes: e278dcb7048b ("pinctrl: intel: Add Intel Jasper Lake pin controller support") Reported-by: Divagar Mohandass Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 2a656cad337e0e1ca582f58847d7b0c7eeba4dc8 Author: Thomas Gleixner Date: Thu Nov 12 11:59:32 2020 +0100 mm/highmem: Take kmap_high_get() properly into account kunmap_local() warns when the virtual address to unmap is below PAGE_OFFSET. This is correct except for the case that the mapping was obtained via kmap_high_get() because the PKMAP addresses are right below PAGE_OFFSET. Cure it by skipping the WARN_ON() when the unmap was handled by kunmap_high(). Fixes: 298fa1ad5571 ("highmem: Provide generic variant of kmap_atomic*") Reported-by: vtolkm@googlemail.com Reported-by: Marek Szyprowski Signed-off-by: Thomas Gleixner Tested-by: Marek Szyprowski Tested-by: Sebastian Andrzej Siewior Cc: Andrew Morton Link: https://lore.kernel.org/r/87y2j6n8mj.fsf@nanos.tec.linutronix.de commit ce7c01557465e920f5bccc5878b8dec165eeb80b Author: Viresh Kumar Date: Tue Nov 10 16:13:37 2020 +0530 docs: thermal: time_in_state is displayed in msec and not usertime The sysfs stats for cooling devices shows the time_in_state in msec, remove the unwanted usertime comment. Signed-off-by: Viresh Kumar Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/d5461bdf9ab6b6fee7f28f538582edbb426aa077.1605004905.git.viresh.kumar@linaro.org commit 7cfa9770f485c03c877db4a66bbfda96df367b98 Author: Geert Uytterhoeven Date: Wed Oct 28 16:35:41 2020 +0100 dt-bindings: thermal: rcar-thermal: Improve schema validation - Factor out common required properties, - "interrupts", "clocks", and "power-domains" are required on R-Mobile APE6, too, - Invert logic to simplify descriptions. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Reviewed-by: Amit Kucheria Reviewed-by: Rob Herring Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201028153541.1736279-1-geert+renesas@glider.be commit 236761f19a4f373354f1dcf399b57753f1f4b871 Author: Zhuguangqing Date: Fri Nov 6 17:22:43 2020 +0800 thermal/drivers/cpufreq_cooling: Update cpufreq_state only if state has changed If state has not changed successfully and we updated cpufreq_state, next time when the new state is equal to cpufreq_state (not changed successfully last time), we will return directly and miss a freq_qos_update_request() that should have been. Fixes: 5130802ddbb1 ("thermal: cpu_cooling: Switch to QoS requests for freq limits") Cc: v5.4+ # v5.4+ Signed-off-by: Zhuguangqing Acked-by: Viresh Kumar Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201106092243.15574-1-zhuguangqing83@gmail.com commit a6a3a24c129d229a0eb26b329ab617e2a04245dd Author: Lee Jones Date: Tue Nov 3 15:28:18 2020 +0000 soc: rockchip: io-domain: Remove incorrect and incomplete comment header Fixes the following W=1 kernel build warning(s): drivers/soc/rockchip/io-domain.c:57: warning: Cannot understand * @supplies: voltage settings matching the register bits. Signed-off-by: Lee Jones Cc: Heiko Stuebner Cc: Liam Girdwood Cc: Mark Brown Cc: "Rafael J. Wysocki" Cc: Doug Anderson Cc: linux-rockchip@lists.infradead.org Link: https://lore.kernel.org/r/20201103152838.1290217-6-lee.jones@linaro.org Signed-off-by: Heiko Stuebner commit ab177c5d00cda2655fd814356ea034aaf179cf05 Author: Heiko Carstens Date: Tue Nov 10 14:51:32 2020 +0100 s390/mm: remove unused clear_user_asce() Signed-off-by: Heiko Carstens commit c11faf32599fee59f33896c8d59f9b3c17ca76fc Author: Chengguang Xu Date: Wed Jun 24 18:20:11 2020 +0800 ovl: fix incorrect extent info in metacopy case In metacopy case, we should use ovl_inode_realdata() instead of ovl_inode_real() to get real inode which has data, so that we can get correct information of extentes in ->fiemap operation. Signed-off-by: Chengguang Xu Reviewed-by: Amir Goldstein Signed-off-by: Miklos Szeredi commit cef4cbff06fbc3be54d6d79ee139edecc2ee8598 Author: Miklos Szeredi Date: Thu Nov 12 11:31:55 2020 +0100 ovl: expand warning in ovl_d_real() There was a syzbot report with this warning but insufficient information... Signed-off-by: Miklos Szeredi commit 13c6ad0f45fd0382e77829a6c738f3e18739c15b Author: Kevin Locke Date: Sat Aug 22 20:22:57 2020 -0600 ovl: document lower modification caveats Some overlayfs optional features are incompatible with offline changes to the lower tree and may result in -EXDEV, -EIO, or other errors. Such modification is not supported and the error behavior is intentionally not specified. Update the "Changes to underlying filesystems" section to note this restriction. Move the paragraph describing the offline behavior below the online behavior so it is adjacent to the following 3 paragraphs describing the NFS export offline modification behavior. Link: https://lore.kernel.org/linux-unionfs/20200708142353.GA103536@redhat.com/ Link: https://lore.kernel.org/linux-unionfs/CAOQ4uxi23Zsmfb4rCed1n=On0NNA5KZD74jjjeyz+et32sk-gg@mail.gmail.com/ Link: https://lore.kernel.org/linux-unionfs/20200817135651.GA637139@redhat.com/ Link: https://lore.kernel.org/linux-unionfs/20200709153616.GE150543@redhat.com/ Link: https://lore.kernel.org/linux-unionfs/20200812135529.GA122370@kevinolos/ Signed-off-by: Kevin Locke Signed-off-by: Miklos Szeredi commit 0a8d0b64dd6acfbc9e9b79022654bbe1ade4a29a Author: Kevin Locke Date: Sun Aug 23 08:38:17 2020 -0600 ovl: warn about orphan metacopy When the lower file of a metacopy is inaccessible, -EIO is returned. For users not familiar with overlayfs internals, such as myself, the meaning of this error may not be apparent or easy to determine, since the (metacopy) file is present and open/stat succeed when accessed outside of the overlay. Add a rate-limited warning for orphan metacopy to give users a hint when investigating such errors. Link: https://lore.kernel.org/linux-unionfs/CAOQ4uxi23Zsmfb4rCed1n=On0NNA5KZD74jjjeyz+et32sk-gg@mail.gmail.com/ Signed-off-by: Kevin Locke Signed-off-by: Miklos Szeredi commit 58afaf5d605f091abf7491774e34fa29d4a1994c Author: Miklos Szeredi Date: Thu Nov 12 11:31:55 2020 +0100 ovl: doc clarification Documentation says "The lower filesystem can be any filesystem supported by Linux". However, this is not the case, as Linux supports vfat and vfat doesn't work as a lower filesystem Reported-by: nerdopolis Signed-off-by: Miklos Szeredi commit 5830fb6b54f7167cc7c9d43612eb01c24312c7ca Author: Pavel Tikhomirov Date: Tue Oct 13 17:59:54 2020 +0300 ovl: introduce new "uuid=off" option for inodes index feature This replaces uuid with null in overlayfs file handles and thus relaxes uuid checks for overlay index feature. It is only possible in case there is only one filesystem for all the work/upper/lower directories and bare file handles from this backing filesystem are unique. In other case when we have multiple filesystems lets just fallback to "uuid=on" which is and equivalent of how it worked before with all uuid checks. This is needed when overlayfs is/was mounted in a container with index enabled (e.g.: to be able to resolve inotify watch file handles on it to paths in CRIU), and this container is copied and started alongside with the original one. This way the "copy" container can't have the same uuid on the superblock and mounting the overlayfs from it later would fail. That is an example of the problem on top of loop+ext4: dd if=/dev/zero of=loopbackfile.img bs=100M count=10 losetup -fP loopbackfile.img losetup -a #/dev/loop0: [64768]:35 (/loop-test/loopbackfile.img) mkfs.ext4 loopbackfile.img mkdir loop-mp mount -o loop /dev/loop0 loop-mp mkdir loop-mp/{lower,upper,work,merged} mount -t overlay overlay -oindex=on,lowerdir=loop-mp/lower,\ upperdir=loop-mp/upper,workdir=loop-mp/work loop-mp/merged umount loop-mp/merged umount loop-mp e2fsck -f /dev/loop0 tune2fs -U random /dev/loop0 mount -o loop /dev/loop0 loop-mp mount -t overlay overlay -oindex=on,lowerdir=loop-mp/lower,\ upperdir=loop-mp/upper,workdir=loop-mp/work loop-mp/merged #mount: /loop-test/loop-mp/merged: #mount(2) system call failed: Stale file handle. If you just change the uuid of the backing filesystem, overlay is not mounting any more. In Virtuozzo we copy container disks (ploops) when create the copy of container and we require fs uuid to be unique for a new container. Signed-off-by: Pavel Tikhomirov Reviewed-by: Amir Goldstein Signed-off-by: Miklos Szeredi commit 1cdb0cb662f890ff34382ceb1fa917917d3bc305 Author: Pavel Tikhomirov Date: Tue Oct 13 17:59:53 2020 +0300 ovl: propagate ovl_fs to ovl_decode_real_fh and ovl_encode_real_fh This will be used in next patch to be able to change uuid checks and add uuid nullification based on ofs->config.index for a new "uuid=off" mode. Reviewed-by: Amir Goldstein Signed-off-by: Pavel Tikhomirov Signed-off-by: Miklos Szeredi commit 030a48b0f6ce393d78b8d33debb1e2043b8cc156 Author: Bernard Zhao Date: Sun Nov 1 18:31:21 2020 -0800 thermal/drivers/hwmon: Cleanup coding style a bit Function thermal_add_hwmon_sysfs, hwmon will be NULL when new_hwmon_device = 0, so there is no need to check, kfree will handle NULL point. Signed-off-by: Bernard Zhao Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201102023121.3312-1-bernard@vivo.com commit e01aac535353e013f9a5c9675232458906b895da Author: Yangtao Li Date: Mon Nov 9 19:46:24 2020 +0800 thermal: sun8i: Use bitmap API instead of open code The bitmap_* API is the standard way to access data in the bitfield. So convert irq_ack to return an unsigned long, and make things to use bitmap API. Signed-off-by: Yangtao Li Acked-by: Maxime Ripard Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201109114624.23035-1-frank@allwinnertech.com commit 1d112baae84844f3737193c39ac5069f5980ecd1 Author: Andy Shevchenko Date: Wed Nov 11 13:34:32 2020 +0200 pinctrl: lynxpoint: Enable pin configuration setting for GPIO chip It appears that pin configuration for GPIO chip hasn't been enabled yet due to absence of ->set_config() callback. Enable it here for Intel Lynxpoint PCH. Depends-on: 2956b5d94a76 ("pinctrl / gpio: Introduce .set_config() callback for GPIO chips") Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit d25dd66ae732f7752760d8f9306ba495de9dee8e Author: Andy Shevchenko Date: Wed Nov 11 13:34:31 2020 +0200 pinctrl: lynxpoint: Use defined constant for disabled bias explicitly We have a specific constant to describe a disabled bias, i.e. GPIWP_NONE. Use it explicitly instead of making an assumption about its value. While at it, move argument assignment to the switch-case in lp_pin_config_get(). Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 1f78ae99790812481b7944cf40008aed5fd2ef18 Author: Fabio Estevam Date: Tue Nov 10 18:48:40 2020 -0300 serial: imx: Remove unused platform data support Since 5.10-rc1 i.MX is a devicetree-only platform and the existing platform data support in this driver was only useful for old non-devicetree platforms. Get rid of the platform data support since it is no longer used. Reviewed-by: Fugang Duan Acked-by: Uwe Kleine-König Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20201110214840.16768-1-festevam@gmail.com Signed-off-by: Greg Kroah-Hartman commit cb215da8369cbbbe3b6260b2ca43518f884ddc6b Author: Andy Shevchenko Date: Mon Nov 9 12:56:01 2020 +0200 vt: keyboard, 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 VT keyboard library code. Acked-by: Jiri Slaby Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201109105601.47159-3-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 6d2c52a83b926bdfc0e4311041459306eac7c48b Author: Andy Shevchenko Date: Mon Nov 9 12:56:00 2020 +0200 vt: keyboard, replace numbers with \r, \n where appropriate Instead of 10, 13 use \n, \r respectively. Acked-by: Jiri Slaby Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201109105601.47159-2-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit c050a97d05740609794f3da38f1be8ec4a65157d Author: Andy Shevchenko Date: Mon Nov 9 12:55:59 2020 +0200 vt: keyboard, use BIT() macro instead of open coded variants There are few places when BIT() macro is suitable and makes code easier to understand. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201109105601.47159-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 6f991850412963381017cfb0d691cbd4d6a551dc Author: Vignesh Raghavendra Date: Wed Nov 11 16:56:53 2020 +0530 serial: 8250: 8250_omap: Fix unused variable warning With commit 439c7183e5b9 ("serial: 8250: 8250_omap: Disable RX interrupt after DMA enable"), below warning is seen with W=1 and CONFIG_SERIAL_8250_DMA is disabled: drivers/tty/serial/8250/8250_omap.c:1199:42: warning: unused variable 'k3_soc_devices' [-Wunused-const-variable] Fix this by moving the code using k3_soc_devices array to omap_serial_fill_features_erratas() that handles other errata flags as well. Fixes: 439c7183e5b9 ("serial: 8250: 8250_omap: Disable RX interrupt after DMA enable") Reported-by: kernel test robot Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20201111112653.2710-2-vigneshr@ti.com Signed-off-by: Greg Kroah-Hartman commit d4548b14dd7e5c698f81ce23ce7b69a896373b45 Author: Vignesh Raghavendra Date: Wed Nov 11 16:56:52 2020 +0530 serial: 8250: 8250_omap: Fix possible array out of bounds access k3_soc_devices array is missing a sentinel entry which may result in out of bounds access as reported by kernel KASAN. Fix this by adding a sentinel entry. Fixes: 439c7183e5b9 ("serial: 8250: 8250_omap: Disable RX interrupt after DMA enable") Reported-by: Naresh Kamboju Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20201111112653.2710-1-vigneshr@ti.com Signed-off-by: Greg Kroah-Hartman commit c1090bb10d5e15906d296936e64317e35c43f21d Author: Ard Biesheuvel Date: Tue Nov 10 19:05:11 2020 +0100 arm64: mm: don't assume struct page is always 64 bytes Commit 8c96400d6a39be7 simplified the page-to-virt and virt-to-page conversions, based on the assumption that struct page is always 64 bytes in size, in which case we can use a single signed shift to perform the conversion (provided that the vmemmap array is placed appropriately in the kernel VA space) Unfortunately, this assumption turns out not to hold, and so we need to revert part of this commit, and go back to an affine transformation. Given that all the quantities involved are compile time constants, this should not make any practical difference. Fixes: 8c96400d6a39 ("arm64: mm: make vmemmap region a projection of the linear region") Reported-by: Geert Uytterhoeven Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20201110180511.29083-1-ardb@kernel.org Tested-by: Geert Uytterhoeven Signed-off-by: Catalin Marinas commit 439e8f6f1e5d1ca973da278499078e213dad63bb Author: Ivan Zaentsev Date: Thu Nov 12 09:49:31 2020 +0300 w1: w1_therm: Rename conflicting sysfs attribute 'eeprom' to 'eeprom_cmd' Duplicate attribute 'eeprom' is defined in: 1) Documentation/ABI/testing/sysfs-driver-w1_therm 2) Documentation/ABI/stable/sysfs-driver-w1_ds28e04 Both drivers define an attribute: /sys/bus/w1/devices/.../eeprom with conflicting behavior. Fix by renaming the newer one in w1_therm.c to 'eeprom_cmd'. Reported-by: Mauro Carvalho Chehab Suggested-by: Greg Kroah-Hartman Link: https://lore.kernel.org/lkml/20201029152845.6bbb39ce@coco.lan/ Signed-off-by: Ivan Zaentsev Link: https://lore.kernel.org/r/20201112064931.8471-1-ivan.zaentsev@wirenboard.ru Signed-off-by: Greg Kroah-Hartman commit 71b802d2d518d2bdbdc0fa5b661fc1d37b9b50d3 Author: Tao Ren Date: Wed Nov 11 15:23:30 2020 -0800 ARM: dts: aspeed: Add Facebook Galaxy100 (AST2400) BMC Add initial version of device tree for Facebook Galaxy100 (AST2400) BMC. Signed-off-by: Tao Ren Reviewed-by: Patrick Williams Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20201111232330.30843-5-rentao.bupt@gmail.com Signed-off-by: Joel Stanley commit 41376fb94c6a825674de3de27c6ee3af17065834 Author: Tao Ren Date: Wed Nov 11 15:23:29 2020 -0800 ARM: dts: aspeed: wedge100: Use common dtsi Simplify the Wedge100 device tree by using the common dtsi. In addition this enables the second firmware flash, and turns on the "i2c-mux-idle-disconnect" flag for I2C switch 7-0070. Signed-off-by: Tao Ren Reviewed-by: Patrick Williams Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20201111232330.30843-4-rentao.bupt@gmail.com Signed-off-by: Joel Stanley commit e4c1633325fa4dca3b39c260881f9f6b55ca1031 Author: Tao Ren Date: Wed Nov 11 15:23:28 2020 -0800 ARM: dts: aspeed: wedge40: Use common dtsi Simplify the Wedge40 device tree by using the common dtsi. Signed-off-by: Tao Ren Reviewed-by: Patrick Williams Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20201111232330.30843-3-rentao.bupt@gmail.com Signed-off-by: Joel Stanley commit 800b92ef92f3be6f635c31a411802afd29914dd8 Author: Tao Ren Date: Wed Nov 11 15:23:27 2020 -0800 ARM: dts: aspeed: Common dtsi for Facebook AST2400 Network BMCs This common descirption is included by all Facebook AST2400 Network BMC platforms to minimize duplicated device entries across Facebook Network BMC device trees. Signed-off-by: Tao Ren Reviewed-by: Patrick Williams Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20201111232330.30843-2-rentao.bupt@gmail.com Signed-off-by: Joel Stanley commit 776461b1795b4dc4084894cf53399044aafa1d21 Author: Rafał Miłecki Date: Wed Nov 11 15:55:38 2020 +0100 ARM: dts: BCM5301X: Move CRU devices to the CRU node Clocks and thermal blocks are part of the CRU ("Clock and Reset Unit" or "Central Resource Unit"). Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli commit c862059875cffc013ee27bf9759ac288224e7a14 Author: Vivek Unune Date: Wed Nov 4 15:29:52 2020 -0500 ARM: dts: BCM5301X: Linksys EA9500 make use of pinctrl Now that we have a pin controller, use that instead of manuplating the mdio/mdc pins directly. i.e. we no longer require the mdio-mii-mux Signed-off-by: Vivek Unune Signed-off-by: Florian Fainelli commit 2f34ae32f5e74096540cd7ce95bfd467cb74b21a Author: Vivek Unune Date: Wed Nov 4 15:29:51 2020 -0500 ARM: dts: BCM5301X: Use corretc pinctrl compatible for 4709x BCM47094 version of pinmux uses different compatible and supports MDIO pinmux pins. Hence, use the correct compatible string and defines the MDIO pins group. Signed-off-by: Vivek Unune Acked-by: Rafał Miłecki Signed-off-by: Florian Fainelli commit bd9a01e28e5d1632528e531480b42d6e2c861d88 Author: Vivek Unune Date: Sun Nov 1 15:08:03 2020 -0500 ARM: dts: BCM5301X: Linksys EA9500 add fixed partitions This router has dual paritions to store trx firmware image and dual partitions for nvram. The second one in each of these cases acts as a backup store. When tested with OpenWrt, the default partition parser causes two issues: 1. It labels both nvram partitions as nvram. In factory, second one is labeled devinfo. 2. It parses second trx image and tries to create second 'linux' partition and fails with - cannot create duplicate 'linux' partition The following patch works around both of these issues. Signed-off-by: Vivek Unune Signed-off-by: Florian Fainelli commit 4b650a20bdb5f9558007dd3055a17a1644a91c3e Author: Serge Semin Date: Tue Oct 20 14:59:46 2020 +0300 ARM: dts: BCM5310X: Harmonize xHCI DT nodes name In accordance with the Generic xHCI bindings the corresponding node name is suppose to comply with the Generic USB HCD DT schema, which requires the USB nodes to have the name acceptable by the regexp: "^usb(@.*)?" . Make sure the "generic-xhci"-compatible nodes are correctly named. Signed-off-by: Serge Semin Acked-by: Krzysztof Kozlowski Signed-off-by: Florian Fainelli commit 74abbfe99f43eb7466d26d9e48fbeb46b8f3d804 Author: Serge Semin Date: Tue Oct 20 14:59:37 2020 +0300 ARM: dts: BCM5301X: Harmonize EHCI/OHCI DT nodes name In accordance with the Generic EHCI/OHCI bindings the corresponding node name is suppose to comply with the Generic USB HCD DT schema, which requires the USB nodes to have the name acceptable by the regexp: "^usb(@.*)?" . Make sure the "generic-ehci" and "generic-ohci"-compatible nodes are correctly named. Signed-off-by: Serge Semin Acked-by: Florian Fainelli Acked-by: Krzysztof Kozlowski Signed-off-by: Florian Fainelli commit 1ca5f2430c4f9d85b98b8d6e5d93f8d4802faf8e Author: Vivek Unune Date: Wed Oct 14 15:27:27 2020 -0400 ARM: dts: BCM5301X: Linksys EA9500 add port 5 and port 7 Add ports 5 and 7 which are connected to gmac cores 1 & 2. These will be disabled for now. Signed-off-by: Vivek Unune Signed-off-by: Florian Fainelli commit 09a3dac7b579e57e7ef2d875b9216c845ae8a0e5 Author: Martin KaFai Lau Date: Wed Nov 11 16:19:19 2020 -0800 bpf: Fix NULL dereference in bpf_task_storage In bpf_pid_task_storage_update_elem(), it missed to test the !task_storage_ptr(task) which then could trigger a NULL pointer exception in bpf_local_storage_update(). Fixes: 4cf1bc1f1045 ("bpf: Implement task local storage") Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Tested-by: Roman Gushchin Acked-by: KP Singh Link: https://lore.kernel.org/bpf/20201112001919.2028357-1-kafai@fb.com commit e545f86573937142b8a90bd65d476b9f001088cf Author: Tobias Waldekranz Date: Tue Nov 10 19:57:20 2020 +0100 net: dsa: mv88e6xxx: Add helper to get a chip's max_vid Most of the other chip info constants have helpers to get at them; add one for max_vid to keep things consistent. Suggested-by: Andrew Lunn Signed-off-by: Tobias Waldekranz Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20201110185720.18228-1-tobias@waldekranz.com Signed-off-by: Jakub Kicinski commit 3a54a215410b1650798dc09d051806b1f900142d Author: Andrej Valek Date: Wed Nov 11 17:52:50 2020 -0800 Input: st1232 - add support resolution reading Hard-coding resolution for st1633 device was wrong. Some of LCDs like YTS700TLBC-02-100C has assembled Sitronix st1633 touchcontroller too. But the resolution is not 320x480 as was hard-coded. Add new function which reads correct resolution directly from register. Signed-off-by: Andrej Valek Link: https://lore.kernel.org/r/20201103073949.12198-1-andrej.valek@siemens.com Signed-off-by: Dmitry Torokhov commit ca787e0b935cdb45db1715f724d859683c5de297 Author: Ido Schimmel Date: Tue Nov 10 12:25:53 2020 +0200 ipv4: Set nexthop flags in a more consistent way Be more consistent about the way in which the nexthop flags are set and set them in one go. Suggested-by: Jakub Kicinski Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20201110102553.1924232-1-idosch@idosch.org Signed-off-by: Jakub Kicinski commit 0575bedd6a1575e3f585b5dd5621cdcd26978054 Author: Andrew Lunn Date: Tue Nov 10 03:32:22 2020 +0100 drivers: net: sky2: Fix -Wstringop-truncation with W=1 In function ‘strncpy’, inlined from ‘sky2_name’ at drivers/net/ethernet/marvell/sky2.c:4903:3, inlined from ‘sky2_probe’ at drivers/net/ethernet/marvell/sky2.c:5049:2: ./include/linux/string.h:297:30: warning: ‘__builtin_strncpy’ specified bound 16 equals destination size [-Wstringop-truncation] None of the device names are 16 characters long, so it was never an issue. But replace the strncpy with an snprintf() to prevent the theoretical overflow. Suggested-by: Stephen Hemminger Signed-off-by: Andrew Lunn Acked-by: Stephen Hemminger Link: https://lore.kernel.org/r/20201110023222.1479398-1-andrew@lunn.ch Signed-off-by: Jakub Kicinski commit 2492ae6bee24d0b7d2f51e5d0b87ec4f968a74b3 Author: Kurt Kanzenbach Date: Tue Nov 10 08:18:29 2020 +0100 MAINTAINERS: Add entry for Hirschmann Hellcreek Switch Driver Add myself to cover the Hirschmann Hellcreek TSN Ethernet Switch Driver. Suggested-by: Andrew Lunn Signed-off-by: Kurt Kanzenbach Reviewed-by: Andrew Lunn Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/20201110071829.7467-1-kurt@linutronix.de Signed-off-by: Jakub Kicinski commit fc8f29b35c187eba929562d1dcb2f7be4a61f13e Merge: c079fe2480e40 62679a8d3aa4b Author: Jakub Kicinski Date: Wed Nov 11 16:41:34 2020 -0800 Merge branch 'net-evaluate-net-ipvX-conf-all-sysctls' Vincent Bernat says: ==================== net: evaluate net.ipvX.conf.all.* sysctls Some per-interface sysctls are ignoring the "all" variant. This patchset fixes some of them when such a sysctl is handled as a boolean. This includes: - net.ipvX.conf.all.disable_policy - net.ipvX.conf.all.disable_policy.disable_xfrm - net.ipv4.conf.all.proxy_arp_pvlan - net.ipvX.conf.all.ignore_routes_with_linkdown Two sysctls are still ignoring the "all" variant as it wouldn't make much sense for them: - net.ipv4.conf.all.tag - net.ipv4.conf.all.medium_id Ideally, the "all" variant should be removed, but there is no simple alternative to DEVINET_SYSCTL_* macros that would allow one to not expose and "all" entry. ==================== Link: https://lore.kernel.org/r/20201107193515.1469030-1-vincent@bernat.ch Signed-off-by: Jakub Kicinski commit 62679a8d3aa4ba15ff63574a43e5686078d7b804 Author: Vincent Bernat Date: Sat Nov 7 20:35:15 2020 +0100 net: evaluate net.ipvX.conf.all.disable_policy and disable_xfrm The disable_policy and disable_xfrm are a per-interface sysctl to disable IPsec policy or encryption on an interface. However, while a "all" variant is exposed, it was a noop since it was never evaluated. We use the usual "or" logic for this kind of sysctls. Signed-off-by: Vincent Bernat Signed-off-by: Jakub Kicinski commit 1af5318c00a8acc33a90537af49b3f23f72a2c4b Author: Vincent Bernat Date: Sat Nov 7 20:35:14 2020 +0100 net: evaluate net.ipv4.conf.all.proxy_arp_pvlan Introduced in 65324144b50b, the "proxy_arp_vlan" sysctl is a per-interface sysctl to tune proxy ARP support for private VLANs. While the "all" variant is exposed, it was a noop and never evaluated. We use the usual "or" logic for this kind of sysctls. Fixes: 65324144b50b ("net: RFC3069, private VLAN proxy arp support") Signed-off-by: Vincent Bernat Signed-off-by: Jakub Kicinski commit c0c5a60f0f1311bcf08bbe735122096d6326fb5b Author: Vincent Bernat Date: Sat Nov 7 20:35:13 2020 +0100 net: evaluate net.ipvX.conf.all.ignore_routes_with_linkdown Introduced in 0eeb075fad73, the "ignore_routes_with_linkdown" sysctl ignores a route whose interface is down. It is provided as a per-interface sysctl. However, while a "all" variant is exposed, it was a noop since it was never evaluated. We use the usual "or" logic for this kind of sysctls. Tested with: ip link add type veth # veth0 + veth1 ip link add type veth # veth1 + veth2 ip link set up dev veth0 ip link set up dev veth1 # link-status paired with veth0 ip link set up dev veth2 ip link set up dev veth3 # link-status paired with veth2 # First available path ip -4 addr add 203.0.113.${uts#H}/24 dev veth0 ip -6 addr add 2001:db8:1::${uts#H}/64 dev veth0 # Second available path ip -4 addr add 192.0.2.${uts#H}/24 dev veth2 ip -6 addr add 2001:db8:2::${uts#H}/64 dev veth2 # More specific route through first path ip -4 route add 198.51.100.0/25 via 203.0.113.254 # via veth0 ip -6 route add 2001:db8:3::/56 via 2001:db8:1::ff # via veth0 # Less specific route through second path ip -4 route add 198.51.100.0/24 via 192.0.2.254 # via veth2 ip -6 route add 2001:db8:3::/48 via 2001:db8:2::ff # via veth2 # H1: enable on "all" # H2: enable on "veth0" for v in ipv4 ipv6; do case $uts in H1) sysctl -qw net.${v}.conf.all.ignore_routes_with_linkdown=1 ;; H2) sysctl -qw net.${v}.conf.veth0.ignore_routes_with_linkdown=1 ;; esac done set -xe # When veth0 is up, best route is through veth0 ip -o route get 198.51.100.1 | grep -Fw veth0 ip -o route get 2001:db8:3::1 | grep -Fw veth0 # When veth0 is down, best route should be through veth2 on H1/H2, # but on veth0 on H2 ip link set down dev veth1 # down veth0 ip route show [ $uts != H3 ] || ip -o route get 198.51.100.1 | grep -Fw veth0 [ $uts != H3 ] || ip -o route get 2001:db8:3::1 | grep -Fw veth0 [ $uts = H3 ] || ip -o route get 198.51.100.1 | grep -Fw veth2 [ $uts = H3 ] || ip -o route get 2001:db8:3::1 | grep -Fw veth2 Without this patch, the two last lines would fail on H1 (the one using the "all" sysctl). With the patch, everything succeeds as expected. Also document the sysctl in `ip-sysctl.rst`. Fixes: 0eeb075fad73 ("net: ipv4 sysctl option to ignore routes when nexthop link is down") Signed-off-by: Vincent Bernat Signed-off-by: Jakub Kicinski commit c079fe2480e40043aeed7c384b7abd805d169a1e Merge: a884915f4cef9 90829f07baea7 Author: Jakub Kicinski Date: Wed Nov 11 15:29:37 2020 -0800 Merge branch 'net-qrtr-add-distant-node-support' Loic Poulain says: ==================== net: qrtr: Add distant node support QRTR protocol allows a node to communicate with an other non-immediate node via an intermdediate immediate node acting as a 'bridge': node-0 <=> node-1 <=> node-2 This is currently not supported in this upstream version and this series aim to fix that. This series is V2 because changes 1, 2 and 3 have already been submitted separately on LKML. Changes in v2: - Add reviewed-by tags from Bjorn and Mani - Fixing checkpatch issue reported by Jakub ==================== Link: https://lore.kernel.org/r/1604684010-24090-1-git-send-email-loic.poulain@linaro.org Signed-off-by: Jakub Kicinski commit 90829f07baea7efe4ca77f79820f3849081186a8 Author: Loic Poulain Date: Fri Nov 6 18:33:30 2020 +0100 net: qrtr: Release distant nodes along the bridge node Distant QRTR nodes can be accessed via an other node that acts as a bridge. When the a QRTR endpoint associated to a bridge node is released, all the linked distant nodes should also be released. This patch fixes endpoint release by: - Submitting QRTR BYE message locally on behalf of all the nodes accessible through the endpoint. - Removing all the routable node IDs from radix tree pointing to the released node endpoint. Signed-off-by: Loic Poulain Signed-off-by: Jakub Kicinski commit f7dec6cb914c8923808eefc034bba8227a5dfe3a Author: Loic Poulain Date: Fri Nov 6 18:33:29 2020 +0100 net: qrtr: Add GFP flags parameter to qrtr_alloc_ctrl_packet This will be requested for allocating control packet in atomic context. Signed-off-by: Loic Poulain Signed-off-by: Jakub Kicinski commit 0baa99ee353c20e5acce15c675773d6d1b0bda05 Author: Loic Poulain Date: Fri Nov 6 18:33:28 2020 +0100 net: qrtr: Allow non-immediate node routing In order to reach non-immediate remote node services that are accessed through an intermediate node, the route to the remote node needs to be saved. E.g for a [node1 <=> node2 <=> node3] network - node2 forwards node3 service to node1 - node1 must save node2 as route for reaching node3 Signed-off-by: Loic Poulain Reviewed-by: Bjorn Andersson Signed-off-by: Jakub Kicinski commit 87f547c108e4a12c3284ca8298d2d81a371f840e Author: Loic Poulain Date: Fri Nov 6 18:33:27 2020 +0100 net: qrtr: Allow forwarded services A remote endpoint (immediate neighbors node) can forward services from other nodes (non-immadiate), in that case ctrl packet node ID (offering distant service) can differ from the qrtr source node (forwarding the packet). Signed-off-by: Loic Poulain Reviewed-by: Bjorn Andersson Reviewed-by: Manivannan Sadhasivam Signed-off-by: Jakub Kicinski commit ae068f561baa003d260475c3e441ca454b186726 Author: Loic Poulain Date: Fri Nov 6 18:33:26 2020 +0100 net: qrtr: Fix port ID for control messages The port ID for control messages was uncorrectly set with broadcast node ID value, causing message to be dropped on remote side since not passing packet filtering (cb->dst_port != QRTR_PORT_CTRL). Fixes: d27e77a3de28 ("net: qrtr: Reset the node and port ID of broadcast messages") Signed-off-by: Loic Poulain Signed-off-by: Jakub Kicinski commit c74da5cf007c49873a502eb7f4554fefb23f3f33 Author: Konstantin Aladyshev Date: Wed Nov 11 16:21:33 2020 +0300 ARM: dts: aspeed: amd-ethanolx: Add GPIO line names Add GPIO line names for AMD EthanolX customer reference board. It populates AST2500 GPIO lines (A0-A7 to AC0-AC7) with AMD EthanolX designated names. Signed-off-by: Konstantin Aladyshev Reviewed-by: Supreeth Venkatesh Link: https://lore.kernel.org/r/20201111132133.1253-1-aladyshev22@gmail.com Signed-off-by: Joel Stanley commit a884915f4cef940dd477e273009fe53c9ba7d656 Author: Jisheng Zhang Date: Mon Nov 9 16:05:14 2020 +0800 net: stmmac: dwc-qos: Change the dwc_eth_dwmac_data's .probe prototype The return pointer of dwc_eth_dwmac_data's .probe isn't used, and "probe" usually return int, so change the prototype to follow standard way. Secondly, it can simplify the tegra_eqos_probe() code. Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20201109160440.3a736ee3@xhacker.debian Signed-off-by: Jakub Kicinski commit 381ad3843b26ec9b461e7973729ef64b36ed4627 Author: Tiezhu Yang Date: Tue Nov 3 15:12:04 2020 +0800 MIPS: Loongson64: SMP: Fix up play_dead jump indicator In play_dead function, the whole 64-bit PC mailbox was used as a indicator to determine if the master core had written boot jump information. However, after we introduced CSR mailsend, the hardware will not guarante an atomic write for the 64-bit PC mailbox. Thus we have to use the lower 32-bit which is written at the last as the jump indicator instead. Signed-off-by: Lu Zeng Signed-off-by: Jun Yi Signed-off-by: Tiezhu Yang Signed-off-by: Thomas Bogendoerfer commit fed4955f304eb62acfdf86ecf05ea164856e09d8 Author: Tiezhu Yang Date: Tue Nov 3 15:12:03 2020 +0800 MIPS: Loongson64: Add Mail_Send support for 3A4000+ CPU Loongson 3A4000+ CPU has per-core Mail_Send register to send mail, there is no need to maintain register address of each core and node, just simply specify cpu number. Signed-off-by: Lu Zeng Signed-off-by: Jianmin Lv Signed-off-by: Tiezhu Yang Signed-off-by: Thomas Bogendoerfer commit 42831cd70805211c240a5bba5b4fb6be9470c91d Author: Tiezhu Yang Date: Tue Nov 3 15:12:02 2020 +0800 MIPS: Loongson64: Set IPI_Enable register per core by itself In the current code, for example, core 1 sets Core[0, 1, 2, 3]_IPI_Enalbe register and core 2, 3 do the same thing on the 1-way Loongson64 platform, this is not necessary. Set IPI_Enable register per core by itself to avoid duplicate operations and make the logic more clear. Signed-off-by: Tiezhu Yang Signed-off-by: Thomas Bogendoerfer commit fe9863a19a5a73af8227548603fb521050769611 Author: Tiezhu Yang Date: Tue Nov 3 15:12:01 2020 +0800 MIPS: Loongson64: Set the field ELPA of CP0_PAGEGRAIN only once The field ELPA of CP0_PAGEGRAIN register is set at the beginning of the kernel entry point in kernel-entry-init.h, no need to set it again in numa.c, we can remove enable_lpa() and only print the related information. Signed-off-by: Tiezhu Yang Signed-off-by: Thomas Bogendoerfer commit 4d1b3ac886b5c03e966199edcc7e0efddd5c4cb2 Author: Tiezhu Yang Date: Tue Nov 3 15:12:00 2020 +0800 MIPS: Loongson64: Do not write the read only field LPA of CP0_CONFIG3 The field LPA of CP0_CONFIG3 register is read only for Loongson64, so the write operations are meaningless, remove them. Signed-off-by: Tiezhu Yang Signed-off-by: Thomas Bogendoerfer commit 4abaacc704729ec93a6ca23f6b3a92532337959b Author: Nick Desaulniers Date: Tue Nov 10 19:21:05 2020 -0800 MIPS: remove GCC < 4.9 support Remove a tautology; since commit 0bddd227f3dc ("Documentation: update for gcc 4.9 requirement") which raised the minimally supported version of GCC to 4.9, this case is always true. Link: https://github.com/ClangBuiltLinux/linux/issues/427 Signed-off-by: Nick Desaulniers Signed-off-by: Thomas Bogendoerfer commit e1717283250aa426cd5f3ba9a1fc9faba3a2e529 Author: Geert Uytterhoeven Date: Tue Nov 10 17:36:31 2020 +0100 mips: Remove #include from Everything in arch/mips/include/uapi/asm/types.h is protected by "#ifndef __KERNEL__", so it's unused for kernelspace. Signed-off-by: Geert Uytterhoeven Signed-off-by: Thomas Bogendoerfer commit 214c798ba1a4e8ff3355d933a46b8a1f27d9a9e7 Author: Ioana Ciornei Date: Mon Nov 9 17:46:01 2020 +0200 net: phy: aquantia: do not return an error on clearing pending IRQs The referenced commit added in .config_intr() the part of code which upon configuration of the IRQ state it also clears up any pending IRQ. If there were actually pending IRQs, a read on the IRQ status register will return something non zero. This should not result in the callback returning an error. Fix this by returning an error only when the result of the phy_read_mmd() is negative. Fixes: e11ef96d44f1 ("net: phy: aquantia: remove the use of .ack_interrupt()") Signed-off-by: Ioana Ciornei Tested-by: Camelia Groza Link: https://lore.kernel.org/r/20201109154601.3812574-1-ciorneiioana@gmail.com Signed-off-by: Jakub Kicinski commit 8ed1045bb828cd04326369cd66afeb48af2582ac Merge: 70408949a35f1 bf795af1d42a6 Author: Jakub Kicinski Date: Wed Nov 11 14:07:02 2020 -0800 Merge branch 'net-ipa-little-fixes' Alex Elder says: ==================== net: ipa: little fixes This series adds a few small fixes to the IPA code. The first patch appeared in a different form in June, and got some pushback from David because he felt a problem that can be caught at build time *should* be caught at build time. https://lore.kernel.org/netdev/20200610195332.2612233-1-elder@linaro.org/ I agree with that, but in this case the "problem" was never actually a problem. There's a little more explanation on the patch, but basically now we remove the BUILD_BUG_ON() call entirely. The second deletes a line of code that isn't needed. The third converts a warning message to be a debug, as requested by Stephen Boyd. And the last one just gets rid of an error message that would be output after a different message had already reported a problem. ==================== Link: https://lore.kernel.org/r/20201109165635.5449-1-elder@linaro.org Signed-off-by: Jakub Kicinski commit bf795af1d42a6e7711e39c4fc64f452cc83dde97 Author: Alex Elder Date: Mon Nov 9 10:56:35 2020 -0600 net: ipa: drop an error message There is no need for gsi_modem_channel_halt() to report an error, because gsi_generic_command() will already have done that if the command times out. So get rid of the extra message. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 2c642c48b3620d85f4e0ac66de01195a6096b333 Author: Alex Elder Date: Mon Nov 9 10:56:34 2020 -0600 net: ipa: change a warning to debug When we determine from hardware what the size of IPA memory is we compare it against what we learned about it from DT. If DT defines a region that's larger than actual memory, we use the smaller actual size and issue a warning. If DT defines a smaller region than actual memory we issue a warning too. But in this case the difference is harmless; so rather than issuing a warning, just provide a debug message instead. Reorder these checks so the one that matters more is done first. Reported-by: Stephen Boyd Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 49e3aeeb211ca9f870e06b71b770d70343e5231f Author: Alex Elder Date: Mon Nov 9 10:56:33 2020 -0600 net: ipa: get rid of a useless line of code Delete a spurious line of code in ipa_hardware_config(). It reads a register value then ignores the value, so is completely unnecessary. Add a missing word in a comment. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 5b8b2262b3b439a7d6e29e35051720a0fe6db518 Author: Alex Elder Date: Mon Nov 9 10:56:32 2020 -0600 net: ipa: don't break build on large transaction size The following call in ipa_validate_build() is erroneous: BUILD_BUG_ON(sizeof(struct gsi_trans) > 128); The fact is, it is not a bug for the size of a GSI transaction to be bigger than 128 bytes. The correct operation of the driver is not dependent on the size of this structure. The only consequence of the transaction being large is that the amount of memory required is larger. The problem this was trying to flag is that a *slight* increase in the size of this structure will have a disproportionate effect on the amount of memory used. E.g. if the structure grew to 132 bytes the memory requirement for the transaction arrays would be about double. With various debugging build flags enabled, the size grows to 160 bytes. But there's no reason to treat that as a build-time bug. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 2df985f5e44c43f5d29d8cc3aaa8e8ac697e9de6 Author: David Woodhouse Date: Wed Nov 11 14:43:20 2020 +0000 iommu/amd: Don't register interrupt remapping irqdomain when IR is disabled Registering the remapping irq domain unconditionally is potentially allowing I/O-APIC and MSI interrupts to be parented in the IOMMU IR domain even when IR is disabled. Don't do that. Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201111144322.1659970-1-dwmw2@infradead.org commit 2fb6acf3edfeb904505f9ba3fd01166866062591 Author: David Woodhouse Date: Wed Nov 11 14:43:21 2020 +0000 iommu/amd: Fix union of bitfields in intcapxt support All the bitfields in here are overlaid on top of each other since they're a union. Change the second u64 to be in a struct so it does the intended thing. Fixes: b5c3786ee370 ("iommu/amd: Use msi_msg shadow structs") Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201111144322.1659970-2-dwmw2@infradead.org commit 28b852b1dc351efc6525234c5adfd5bc2ad6d6e1 Author: Stafford Horne Date: Sun Oct 18 06:37:01 2020 +0900 openrisc: fix trap for debugger breakpoint signalling I have been working on getting native Linux GDB support working for the OpenRISC port. The trap signal handler here was wrong in a few ways. During trap handling address (from the EEAR register) is not set by the CPU, so it is not correct to use here. We want to use trap as a break-point so use TRAP_BRKPT. Adding 4 to the pc was incorrect and causing GDB to think the breakpoint was not hit. Fixing these allows GDB to work now. Signed-off-by: Stafford Horne commit f81cc5ac8c2b5c0e2e190ea181ab2b9e5cf8497d Author: Filip Kokosinski Date: Thu Sep 19 13:42:45 2019 +0200 openrisc: add support for LiteX This adds support for a basic LiteX-based SoC with a mor1kx soft CPU. Signed-off-by: Filip Kokosinski Signed-off-by: Mateusz Holenko [shorne: Merged in soc-cntl patch, removed CROSS_COMPILE, sort MAINT.] Signed-off-by: Stafford Horne commit 05481f072787e96d08cc304cda0c10e0d02cdadc Author: Colin Ian King Date: Mon Nov 9 11:12:25 2020 +0000 drm/kmb: fix spelling mistakes in drm_info and drm_dbg messages There are two spelling mistakes of the word sync in drm_info and drm_dbg messages. Fix these. Signed-off-by: Colin Ian King Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201109111225.1485190-1-colin.king@canonical.com commit 7cb397e70f9be23fe4c7a2b8dfd8eeefb54c6017 Author: Anitha Chrisanthus Date: Tue Nov 10 13:52:49 2020 -0800 drm/kmb: Fix build warnings Fixed the following W=1 kernel build warnings drivers/gpu/drm/kmb/kmb_plane.h:74:18: warning: ‘kmb_formats_v’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/kmb/kmb_plane.h:61:18: warning: ‘kmb_formats_g’ defined but not used [-Wunused-const-variable=] Signed-off-by: Anitha Chrisanthus Cc: Sam Ravnborg Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/1605045169-2696-1-git-send-email-anitha.chrisanthus@intel.com commit 8378788cfe746d6d7222ded06d400377a3fc93e5 Merge: 7112d127984bd 0639e5e97ad9c Author: Andrii Nakryiko Date: Wed Nov 11 12:18:23 2020 -0800 Merge branch 'tools/bpftool: Some build fixes' Jean-Philippe Brucker says: ==================== A few fixes for cross and out-of-tree build of bpftool and runqslower. These changes allow to build for different target architectures, using the same source tree. Since [v2], I addressed Andrii's comments on patches 3 and 5, and added patch 7 which fixes a build slowdown. [v2] https://lore.kernel.org/bpf/20201109110929.1223538-1-jean-philippe@linaro.org/ ==================== Signed-off-by: Andrii Nakryiko commit 0639e5e97ad9c58dd15dcf6f6ccf677cfba39f98 Author: Jean-Philippe Brucker Date: Tue Nov 10 17:43:11 2020 +0100 tools/bpftool: Fix build slowdown Commit ba2fd563b740 ("tools/bpftool: Support passing BPFTOOL_VERSION to make") changed BPFTOOL_VERSION to a recursively expanded variable, forcing it to be recomputed on every expansion of CFLAGS and dramatically slowing down the bpftool build. Restore BPFTOOL_VERSION as a simply expanded variable, guarded by an ifeq(). Fixes: ba2fd563b740 ("tools/bpftool: Support passing BPFTOOL_VERSION to make") Signed-off-by: Jean-Philippe Brucker Signed-off-by: Andrii Nakryiko Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201110164310.2600671-8-jean-philippe@linaro.org commit 2d9393fefb506fb8c8a483e5dc9bbd7774657b89 Author: Jean-Philippe Brucker Date: Tue Nov 10 17:43:10 2020 +0100 tools/runqslower: Build bpftool using HOSTCC When cross building runqslower for an other architecture, the intermediate bpftool used to generate a skeleton must be built using the host toolchain. Pass HOSTCC and HOSTLD, defined in Makefile.include, to the bpftool Makefile. Signed-off-by: Jean-Philippe Brucker Signed-off-by: Andrii Nakryiko Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201110164310.2600671-7-jean-philippe@linaro.org commit 85e59344d0790379e063bf3cd3dd0fe91ce3b505 Author: Jean-Philippe Brucker Date: Tue Nov 10 17:43:09 2020 +0100 tools/runqslower: Enable out-of-tree build Enable out-of-tree build for runqslower. Only set OUTPUT=.output if it wasn't already set by the user. Signed-off-by: Jean-Philippe Brucker Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201110164310.2600671-6-jean-philippe@linaro.org commit 3290996e713315dfc9589e2c340a4c4997d90be8 Author: Jean-Philippe Brucker Date: Tue Nov 10 17:43:08 2020 +0100 tools/runqslower: Use Makefile.include Makefile.include defines variables such as OUTPUT and CC for out-of-tree build and cross-build. Include it into the runqslower Makefile and use its $(QUIET*) helpers. Signed-off-by: Jean-Philippe Brucker Signed-off-by: Andrii Nakryiko Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201110164310.2600671-5-jean-philippe@linaro.org commit 8859b0da5aac28e4e9651c8971e7af344f8ffec1 Author: Jean-Philippe Brucker Date: Tue Nov 10 17:43:07 2020 +0100 tools/bpftool: Fix cross-build The bpftool build first creates an intermediate binary, executed on the host, to generate skeletons required by the final build. When cross-building bpftool for an architecture different from the host, the intermediate binary should be built using the host compiler (gcc) and the final bpftool using the cross compiler (e.g. aarch64-linux-gnu-gcc). Generate the intermediate objects into the bootstrap/ directory using the host toolchain. Signed-off-by: Jean-Philippe Brucker Signed-off-by: Andrii Nakryiko Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201110164310.2600671-4-jean-philippe@linaro.org commit 9e8929fdbb9c9026bd3a732e9ac7dc9617c86309 Author: Jean-Philippe Brucker Date: Tue Nov 10 17:43:06 2020 +0100 tools/bpftool: Force clean of out-of-tree build Cleaning a partial build can fail if the output directory for libbpf wasn't created: $ make -C tools/bpf/bpftool O=/tmp/bpf clean /bin/sh: line 0: cd: /tmp/bpf/libbpf/: No such file or directory tools/scripts/Makefile.include:17: *** output directory "/tmp/bpf/libbpf/" does not exist. Stop. make: *** [Makefile:36: /tmp/bpf/libbpf/libbpf.a-clean] Error 2 As a result make never gets around to clearing the leftover objects. Add the libbpf output directory as clean dependency to ensure clean always succeeds (similarly to the "descend" macro). The directory is later removed by the clean recipe. Signed-off-by: Jean-Philippe Brucker Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201110164310.2600671-3-jean-philippe@linaro.org commit c8a950d0d3b926a02c7b2e713850d38217cec3d1 Author: Jean-Philippe Brucker Date: Tue Nov 10 17:43:05 2020 +0100 tools: Factor HOSTCC, HOSTLD, HOSTAR definitions Several Makefiles in tools/ need to define the host toolchain variables. Move their definition to tools/scripts/Makefile.include Signed-off-by: Jean-Philippe Brucker Signed-off-by: Andrii Nakryiko Acked-by: Jiri Olsa Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/bpf/20201110164310.2600671-2-jean-philippe@linaro.org commit 9a450b68fef7f482b334f900d9ae6d23261b17c1 Author: Lucas De Marchi Date: Fri Nov 6 14:55:31 2020 -0800 drm/i915: Do not setup hpd without display Now that hpd/display related calls are split from the rest in intel_irq_init(), skip all of that in case we don't have display. Cc: José Roberto de Souza Cc: Jani Nikula Signed-off-by: Lucas De Marchi Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20201106225531.920641-8-lucas.demarchi@intel.com commit 96bd87b7c2216e5656476ea216b8ca64fe1a26fd Author: Lucas De Marchi Date: Fri Nov 6 14:55:30 2020 -0800 drm/i915: move display-related to the end of intel_irq_init() In intel_irq_init() move what's display/hpd related after what is gt and guc. This makes it easier to support !HAS_DISPLAY() in future. Signed-off-by: Lucas De Marchi Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20201106225531.920641-7-lucas.demarchi@intel.com commit 794d61a190905ea2951f4d7d565d1375d7a0de67 Author: Lucas De Marchi Date: Fri Nov 6 14:55:29 2020 -0800 drm/i915: re-order if/else ladder for hpd_irq_setup Use the convention of new platforms first. No need to special case HAS_GMCH() since that stopped being true at the lattest on gen8 (for cherryview). Signed-off-by: Lucas De Marchi Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20201106225531.920641-6-lucas.demarchi@intel.com commit 71c8415d0daa78ef1295743d0e11ba0214d0a9b9 Author: Jani Nikula Date: Fri Nov 6 14:55:27 2020 -0800 drm/i915/display: return earlier from intel_modeset_init() without display !HAS_DISPLAY() implies !HAS_OVERLAY(), skipping overlay setup anyway, so return earlier from intel_modeset_init() for clarity. Cc: Ville Syrjälä Signed-off-by: Jani Nikula Signed-off-by: Lucas De Marchi Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20201106225531.920641-4-lucas.demarchi@intel.com commit 2c5688057f7011a0d75b2e1189695912e232b64c Author: José Roberto de Souza Date: Fri Nov 6 14:55:26 2020 -0800 drm/i915/display: Do not reset display when there is none Display is always disabled and enabled when resetting any engine, but if there is no display it should not do anything with display and only reset the needed engines. Cc: Jani Nikula Signed-off-by: José Roberto de Souza Signed-off-by: Lucas De Marchi Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20201106225531.920641-3-lucas.demarchi@intel.com commit e669ad6f1cef3f2b582ab7cab64cc90fd327348d Author: Lucas De Marchi Date: Fri Nov 6 14:55:25 2020 -0800 drm/i915/display: add namespace to intel_finish_reset Rename intel_finish_reset to intel_display_finish_reset, so it's clear from gt/ that we are calling out the display code. Signed-off-by: Lucas De Marchi Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20201106225531.920641-2-lucas.demarchi@intel.com commit 87ebfaab7f97a02c2a76623c9741eee42c16fecd Author: Lucas De Marchi Date: Fri Nov 6 14:55:24 2020 -0800 drm/i915/display: add namespace to intel_prepare_reset Rename intel_prepare_reset to intel_display_prepare_reset, so it's clear from gt/ that we are calling out the display code. Signed-off-by: Lucas De Marchi Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20201106225531.920641-1-lucas.demarchi@intel.com commit f644e3038f8875d239f1a3abdc0b469e0af19a65 Author: Thomas Zimmermann Date: Tue Nov 10 14:36:55 2020 +0100 drm/nouveau: Fix out-of-bounds access when deferencing MMU type The value of struct drm_device.ttm.type_vram can become -1 for unknown types of memory (see nouveau_ttm_init()). This leads to an out-of-bounds error when accessing struct nvif_mmu.type[]: [ 18.304116] ================================================================== [ 18.311649] BUG: KASAN: slab-out-of-bounds in nouveau_ttm_io_mem_reserve+0x17a/0x7e0 [nouveau] [ 18.320415] Read of size 1 at addr ffff88810ffac1fe by task systemd-udevd/342 [ 18.327681] [ 18.329208] CPU: 1 PID: 342 Comm: systemd-udevd Tainted: G E 5.10.0-rc2-1-default+ #581 [ 18.338681] Hardware name: Dell Inc. OptiPlex 9020/0N4YC8, BIOS A24 10/24/2018 [ 18.346032] Call Trace: [ 18.348536] dump_stack+0xae/0xe5 [ 18.351919] print_address_description.constprop.0+0x17/0xf0 [ 18.357787] ? nouveau_ttm_io_mem_reserve+0x17a/0x7e0 [nouveau] [ 18.363818] __kasan_report.cold+0x20/0x38 [ 18.368099] ? nouveau_ttm_io_mem_reserve+0x17a/0x7e0 [nouveau] [ 18.374133] kasan_report+0x3a/0x50 [ 18.377789] nouveau_ttm_io_mem_reserve+0x17a/0x7e0 [nouveau] <...> [ 18.767690] Allocated by task 342: [ 18.773087] kasan_save_stack+0x1b/0x40 [ 18.778890] __kasan_kmalloc.constprop.0+0xbf/0xd0 [ 18.785646] __kmalloc_track_caller+0x1be/0x390 [ 18.792165] kstrdup_const+0x46/0x70 [ 18.797686] kobject_set_name_vargs+0x2f/0xb0 [ 18.803992] kobject_init_and_add+0x9d/0xf0 [ 18.810117] ttm_mem_global_init+0x12c/0x210 [ttm] [ 18.816853] ttm_bo_global_init+0x4a/0x160 [ttm] [ 18.823420] ttm_bo_device_init+0x39/0x220 [ttm] [ 18.830046] nouveau_ttm_init+0x2c3/0x830 [nouveau] [ 18.836929] nouveau_drm_device_init+0x1b4/0x3f0 [nouveau] <...> [ 19.105336] ================================================================== Fix this error, by not using type_vram as an index if it's negative. Assume default values instead. The error was seen on Nvidia G72 hardware. Signed-off-by: Thomas Zimmermann Reviewed-by: Michael J. Ruhl Acked-by: Christian König Fixes: 1cf65c45183a ("drm/ttm: add caching state to ttm_bus_placement") Cc: Christian König Cc: Michael J. Ruhl Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: Ben Skeggs Cc: Dave Airlie Cc: Gerd Hoffmann Cc: Alex Deucher Cc: "Christian König" Cc: VMware Graphics Cc: Roland Scheidegger Cc: Huang Rui Cc: Felix Kuehling Cc: Hawking Zhang Cc: Jason Gunthorpe Cc: Likun Gao Cc: dri-devel@lists.freedesktop.org Cc: nouveau@lists.freedesktop.org Cc: virtualization@lists.linux-foundation.org Cc: spice-devel@lists.freedesktop.org Cc: amd-gfx@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20201110133655.13174-1-tzimmermann@suse.de commit 6ca753a3a72e4c848d91f10da270c58000ada53c Author: Geert Uytterhoeven Date: Tue Nov 10 17:51:36 2020 +0100 parisc/uapi: Use Kbuild logic to provide Uapi just includes Signed-off-by: Geert Uytterhoeven Signed-off-by: Helge Deller commit 0a04244cabc5560ce1e08555e8712a4cd20ab6ce Author: Leo Yan Date: Wed Nov 11 15:11:32 2020 +0800 perf arm-spe: Fix packet length handling When processing address packet and counter packet, if the packet contains extended header, it misses to account the extra one byte for header length calculation, thus returns the wrong packet length. To correct the packet length calculation, one possible fixing is simply to plus extra 1 for extended header, but will spread some duplicate code in the flows for processing address packet and counter packet. Alternatively, we can refine the function arm_spe_get_payload() to not only support short header and allow it to support extended header, and rely on it for the packet length calculation. So this patch refactors function arm_spe_get_payload() with a new argument 'ext_hdr' for support extended header; the packet processing flows can invoke this function to unify the packet length calculation. Signed-off-by: Leo Yan Reviewed-by: Andre Przywara Link: https://lore.kernel.org/r/20201111071149.815-6-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit b65577baf482909225c79d8a6bad44d2a62751f4 Author: Leo Yan Date: Wed Nov 11 15:11:31 2020 +0800 perf arm-spe: Refactor arm_spe_get_events() In function arm_spe_get_events(), the event packet's 'index' is assigned as payload length, but the flow is not directive: it firstly gets the packet length from the return value of arm_spe_get_payload(), the value includes header length (1) and payload length: int ret = arm_spe_get_payload(buf, len, packet); and then reduces header length from packet length, so finally get the payload length: packet->index = ret - 1; To simplify the code, this patch directly assigns payload length to event packet's index; and at the end it calls arm_spe_get_payload() to return the payload value. Signed-off-by: Leo Yan Reviewed-by: Andre Przywara Link: https://lore.kernel.org/r/20201111071149.815-5-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit b2ded2e2e2764e502fc025f615210434f1eaa2a9 Author: Leo Yan Date: Wed Nov 11 15:11:30 2020 +0800 perf arm-spe: Refactor payload size calculation This patch defines macro to extract "sz" field from header, and renames the function payloadlen() to arm_spe_payload_len(). Signed-off-by: Leo Yan Reviewed-by: Andre Przywara Link: https://lore.kernel.org/r/20201111071149.815-4-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 903b659436b706928934ff5ef59d591267e5ce1a Author: Leo Yan Date: Wed Nov 11 15:11:29 2020 +0800 perf arm-spe: Fix a typo in comment Fix a typo: s/iff/if. Signed-off-by: Leo Yan Reviewed-by: Andre Przywara Link: https://lore.kernel.org/r/20201111071149.815-3-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit c185f1cde46653cd0a7a1eaf461d16c462870781 Author: Leo Yan Date: Wed Nov 11 15:11:28 2020 +0800 perf arm-spe: Include bitops.h for BIT() macro Include header linux/bitops.h, directly use its BIT() macro and remove the self defined macros. Committer notes: Use BIT_ULL() instead of BIT to build on 32-bit arches as mentioned in review by Andre Przywara . I noticed the build failure when crossbuilding to arm32 from x86_64. Signed-off-by: Leo Yan Reviewed-by: Andre Przywara Link: https://lore.kernel.org/r/20201111071149.815-2-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 27b5ea2fcb90d2dbc3be03e3a171bc28117eef14 Merge: b72de3ff19fdc b9bf97105f4b9 Author: Linus Walleij Date: Wed Nov 11 17:38:21 2020 +0100 Merge branch 'devel' into for-next commit 476b485be03c37212fcf10d85510aae5d34316ef Author: Jianxin Xiong Date: Tue Nov 10 13:41:17 2020 -0800 dma-buf: Document that dma-buf size is fixed The fact that the size of dma-buf is invariant over the lifetime of the buffer is mentioned in the comment of 'dma_buf_ops.mmap', but is not documented at where the info is defined. Add the missing documentation. Signed-off-by: Jianxin Xiong Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1605044477-51833-7-git-send-email-jianxin.xiong@intel.com commit 9d769e6aa2524e1762e3b8681e0ed78f8acf6cad Author: Vivek Goyal Date: Fri Oct 9 14:15:12 2020 -0400 fuse: support SB_NOSEC flag to improve write performance Virtiofs can be slow with small writes if xattr are enabled and we are doing cached writes (No direct I/O). Ganesh Mahalingam noticed this. Some debugging showed that file_remove_privs() is called in cached write path on every write. And everytime it calls security_inode_need_killpriv() which results in call to __vfs_getxattr(XATTR_NAME_CAPS). And this goes to file server to fetch xattr. This extra round trip for every write slows down writes tremendously. Normally to avoid paying this penalty on every write, vfs has the notion of caching this information in inode (S_NOSEC). So vfs sets S_NOSEC, if filesystem opted for it using super block flag SB_NOSEC. And S_NOSEC is cleared when setuid/setgid bit is set or when security xattr is set on inode so that next time a write happens, we check inode again for clearing setuid/setgid bits as well clear any security.capability xattr. This seems to work well for local file systems but for remote file systems it is possible that VFS does not have full picture and a different client sets setuid/setgid bit or security.capability xattr on file and that means VFS information about S_NOSEC on another client will be stale. So for remote filesystems SB_NOSEC was disabled by default. Commit 9e1f1de02c22 ("more conservative S_NOSEC handling") mentioned that these filesystems can still make use of SB_NOSEC as long as they clear S_NOSEC when they are refreshing inode attriutes from server. So this patch tries to enable SB_NOSEC on fuse (regular fuse as well as virtiofs). And clear SB_NOSEC when we are refreshing inode attributes. This is enabled only if server supports FUSE_HANDLE_KILLPRIV_V2. This says that server will clear setuid/setgid/security.capability on chown/truncate/write as apporpriate. This should provide tighter coherency because now suid/sgid/ security.capability will be cleared even if fuse client cache has not seen these attrs. Basic idea is that fuse client will trigger suid/sgid/security.capability clearing based on its attr cache. But even if cache has gone stale, it is fine because FUSE_HANDLE_KILLPRIV_V2 will make sure WRITE clear suid/sgid/security.capability. We make this change only if server supports FUSE_HANDLE_KILLPRIV_V2. This should make sure that existing filesystems which might be relying on seucurity.capability always being queried from server are not impacted. This tighter coherency relies on WRITE showing up on server (and not being cached in guest). So writeback_cache mode will not provide that tight coherency and it is not recommended to use two together. Having said that it might work reasonably well for lot of use cases. This change improves random write performance very significantly. Running virtiofsd with cache=auto and following fio command: fio --ioengine=libaio --direct=1 --name=test --filename=/mnt/virtiofs/random_read_write.fio --bs=4k --iodepth=64 --size=4G --readwrite=randwrite Bandwidth increases from around 50MB/s to around 250MB/s as a result of applying this patch. So improvement is very significant. Link: https://github.com/kata-containers/runtime/issues/2815 Reported-by: "Mahalingam, Ganesh" Signed-off-by: Vivek Goyal Signed-off-by: Miklos Szeredi commit 643a666a89c358ef588d2b3ef9f2dc1efc421e61 Author: Vivek Goyal Date: Fri Oct 9 14:15:11 2020 -0400 fuse: add a flag FUSE_OPEN_KILL_SUIDGID for open() request With FUSE_HANDLE_KILLPRIV_V2 support, server will need to kill suid/sgid/ security.capability on open(O_TRUNC), if server supports FUSE_ATOMIC_O_TRUNC. But server needs to kill suid/sgid only if caller does not have CAP_FSETID. Given server does not have this information, client needs to send this info to server. So add a flag FUSE_OPEN_KILL_SUIDGID to fuse_open_in request which tells server to kill suid/sgid (only if group execute is set). This flag is added to the FUSE_OPEN request, as well as the FUSE_CREATE request if the create was non-exclusive, since that might result in an existing file being opened/truncated. Signed-off-by: Vivek Goyal Signed-off-by: Miklos Szeredi commit 8981bdfda7445af5d5a8c277c923bf91873a0c98 Author: Vivek Goyal Date: Fri Oct 9 14:15:10 2020 -0400 fuse: don't send ATTR_MODE to kill suid/sgid for handle_killpriv_v2 If client does a write() on a suid/sgid file, VFS will first call fuse_setattr() with ATTR_KILL_S[UG]ID set. This requires sending setattr to file server with ATTR_MODE set to kill suid/sgid. But to do that client needs to know latest mode otherwise it is racy. To reduce the race window, current code first call fuse_do_getattr() to get latest ->i_mode and then resets suid/sgid bits and sends rest to server with setattr(ATTR_MODE). This does not reduce the race completely but narrows race window significantly. With fc->handle_killpriv_v2 enabled, it should be possible to remove this race completely. Do not kill suid/sgid with ATTR_MODE at all. It will be killed by server when WRITE request is sent to server soon. This is similar to fc->handle_killpriv logic. V2 is just more refined version of protocol. Hence this patch does not send ATTR_MODE to kill suid/sgid if fc->handle_killpriv_v2 is enabled. This creates an issue if fc->writeback_cache is enabled. In that case WRITE can be cached in guest and server might not see WRITE request and hence will not kill suid/sgid. Miklos suggested that in such cases, we should fallback to a writethrough WRITE instead and that will generate WRITE request and kill suid/sgid. This patch implements that too. But this relies on client seeing the suid/sgid set. If another client sets suid/sgid and this client does not see it immideately, then we will not fallback to writethrough WRITE. So this is one limitation with both fc->handle_killpriv_v2 and fc->writeback_cache enabled. Both the options are not fully compatible. But might be good enough for many use cases. Note: This patch is not checking whether security.capability is set or not when falling back to writethrough path. If suid/sgid is not set and only security.capability is set, that will be taken care of by file_remove_privs() call in ->writeback_cache path. Signed-off-by: Vivek Goyal Signed-off-by: Miklos Szeredi commit 3179216135ec09825d7c7875580951a6e69dc5df Author: Vivek Goyal Date: Fri Oct 9 14:15:09 2020 -0400 fuse: setattr should set FATTR_KILL_SUIDGID If fc->handle_killpriv_v2 is enabled, we expect file server to clear suid/sgid/security.capbility upon chown/truncate/write as appropriate. Upon truncate (ATTR_SIZE), suid/sgid are cleared only if caller does not have CAP_FSETID. File server does not know whether caller has CAP_FSETID or not. Hence set FATTR_KILL_SUIDGID upon truncate to let file server know that caller does not have CAP_FSETID and it should kill suid/sgid as appropriate. On chown (ATTR_UID/ATTR_GID) suid/sgid need to be cleared irrespective of capabilities of calling process, so set FATTR_KILL_SUIDGID unconditionally in that case. Signed-off-by: Vivek Goyal Signed-off-by: Miklos Szeredi commit b866739596ae3c3c60c43f1cf04a516c5aa20fd1 Author: Vivek Goyal Date: Fri Oct 9 14:15:08 2020 -0400 fuse: set FUSE_WRITE_KILL_SUIDGID in cached write path With HANDLE_KILLPRIV_V2, server will need to kill suid/sgid if caller does not have CAP_FSETID. We already have a flag FUSE_WRITE_KILL_SUIDGID in WRITE request and we already set it in direct I/O path. To make it work in cached write path also, start setting FUSE_WRITE_KILL_SUIDGID in this path too. Set it only if fc->handle_killpriv_v2 is set. Otherwise client is responsible for kill suid/sgid. In case of direct I/O we set FUSE_WRITE_KILL_SUIDGID unconditionally because we don't call file_remove_privs() in that path (with cache=none option). Signed-off-by: Vivek Goyal Signed-off-by: Miklos Szeredi commit 10c52c84e3f4872689a64ac7666b34d67e630691 Author: Miklos Szeredi Date: Wed Nov 11 17:22:32 2020 +0100 fuse: rename FUSE_WRITE_KILL_PRIV to FUSE_WRITE_KILL_SUIDGID Kernel has: ATTR_KILL_PRIV -> clear "security.capability" ATTR_KILL_SUID -> clear S_ISUID ATTR_KILL_SGID -> clear S_ISGID if executable Fuse has: FUSE_WRITE_KILL_PRIV -> clear S_ISUID and S_ISGID if executable So FUSE_WRITE_KILL_PRIV implies the complement of ATTR_KILL_PRIV, which is somewhat confusing. Also PRIV implies all privileges, including "security.capability". Change the name to FUSE_WRITE_KILL_SUIDGID and make FUSE_WRITE_KILL_PRIV an alias to perserve API compatibility Signed-off-by: Miklos Szeredi commit 63f9909ff602082597849f684655e93336c50b11 Author: Vivek Goyal Date: Fri Oct 9 14:15:07 2020 -0400 fuse: introduce the notion of FUSE_HANDLE_KILLPRIV_V2 We already have FUSE_HANDLE_KILLPRIV flag that says that file server will remove suid/sgid/caps on truncate/chown/write. But that's little different from what Linux VFS implements. To be consistent with Linux VFS behavior what we want is. - caps are always cleared on chown/write/truncate - suid is always cleared on chown, while for truncate/write it is cleared only if caller does not have CAP_FSETID. - sgid is always cleared on chown, while for truncate/write it is cleared only if caller does not have CAP_FSETID as well as file has group execute permission. As previous flag did not provide above semantics. Implement a V2 of the protocol with above said constraints. Server does not know if caller has CAP_FSETID or not. So for the case of write()/truncate(), client will send information in special flag to indicate whether to kill priviliges or not. These changes are in subsequent patches. FUSE_HANDLE_KILLPRIV_V2 relies on WRITE being sent to server to clear suid/sgid/security.capability. But with ->writeback_cache, WRITES are cached in guest. So it is not recommended to use FUSE_HANDLE_KILLPRIV_V2 and writeback_cache together. Though it probably might be good enough for lot of use cases. Signed-off-by: Vivek Goyal Signed-off-by: Miklos Szeredi commit df8629af293493757beccac2d3168fe5a315636e Author: Miklos Szeredi Date: Wed Nov 11 17:22:32 2020 +0100 fuse: always revalidate if exclusive create Failure to do so may result in EEXIST even if the file only exists in the cache and not in the filesystem. The atomic nature of O_EXCL mandates that the cached state should be ignored and existence verified anew. Reported-by: Ken Schalk Signed-off-by: Miklos Szeredi commit 833c5a42e28beeefa1f9bd476a63fe8050c1e8ca Author: Miklos Szeredi Date: Wed Nov 11 17:22:32 2020 +0100 virtiofs: clean up error handling in virtio_fs_get_tree() Avoid duplicating error cleanup. Signed-off-by: Miklos Szeredi commit 6a68d1e1514d77d05898780aea4e5ac587616e93 Author: Miklos Szeredi Date: Wed Nov 11 17:22:32 2020 +0100 fuse: add fuse_sb_destroy() helper This is to avoid minor code duplication between fuse_kill_sb_anon() and fuse_kill_sb_blk(). Signed-off-by: Miklos Szeredi commit bd3bf1e85bac1bd956365a0036a6817c3ffe20fb Author: Miklos Szeredi Date: Wed Nov 11 17:22:32 2020 +0100 fuse: simplify get_fuse_conn*() All callers dereference the result, so no point in checking for NULL pointer dereference here. Signed-off-by: Miklos Szeredi commit 514b5e3ff45e6cfc39cfa7c094727d8e6d885986 Author: Miklos Szeredi Date: Wed Nov 11 17:22:32 2020 +0100 fuse: get rid of fuse_mount refcount Fuse mount now only ever has a refcount of one (before being freed) so the count field is unnecessary. Remove the refcounting and fold fuse_mount_put() into callers. The only caller of fuse_mount_put() where fm->fc was NULL is fuse_dentry_automount() and here the fuse_conn_put() can simply be omitted. Signed-off-by: Miklos Szeredi commit b19d3d00d662cfb8bfdc809ec90344ec58b0bf31 Author: Miklos Szeredi Date: Wed Nov 11 17:22:31 2020 +0100 virtiofs: simplify sb setup Currently when acquiring an sb for virtiofs fuse_mount_get() is being called from virtio_fs_set_super() if a new sb is being filled and fuse_mount_put() is called unconditionally after sget_fc() returns. The exact same result can be obtained by checking whether fs_contex->s_fs_info was set to NULL (ref trasferred to sb->s_fs_info) and only calling fuse_mount_put() if the ref wasn't transferred (error or matching sb found). This allows getting rid of virtio_fs_set_super() and fuse_mount_get(). Signed-off-by: Miklos Szeredi commit 66ab33bf6d4341574f88b511e856a73f6f2a921e Author: Miklos Szeredi Date: Wed Nov 11 17:22:31 2020 +0100 virtiofs fix leak in setup This can be triggered for example by adding the "-omand" mount option, which will be rejected and virtio_fs_fill_super() will return an error. In such a case the allocations for fuse_conn and fuse_mount will leak due to s_root not yet being set and so ->put_super() not being called. Fixes: a62a8ef9d97d ("virtio-fs: add virtiofs filesystem") Signed-off-by: Miklos Szeredi commit 3993382bb3198cc5e263c3519418e716bd57b056 Author: Miklos Szeredi Date: Wed Nov 11 17:22:31 2020 +0100 fuse: launder page should wait for page writeback Qian Cai reports that the WARNING in tree_insert() can be triggered by a fuzzer with the following call chain: invalidate_inode_pages2_range() fuse_launder_page() fuse_writepage_locked() tree_insert() The reason is that another write for the same page is already queued. The simplest fix is to wait until the pending write is completed and only after that queue the new write. Since this case is very rare, the additional wait should not be a problem. Reported-by: Qian Cai Signed-off-by: Miklos Szeredi commit ead9f7d7ea9e20843e29e688b53859cea20044ee Author: Douglas Anderson Date: Wed Nov 11 07:37:01 2020 -0800 arm64: dts: qcom: sc7180: Assign numbers to eMMC and SD After many years of struggle, commit fa2d0aa96941 ("mmc: core: Allow setting slot index via device tree alias") finally allows the use of aliases to number SD/MMC slots. Let's do that for sc7180 SoCs so that if eMMC and SD are both used they have consistent numbers across boots and kernel changes. Picking numbers can be tricky. Do we call these "1" and "2" to match the name in documentation or "0" and "1" with the assertion that we should always start at 0 and count up? While the "start counting at 0" makes sense if there are not already well-defined numbers for all sd/mmc controllers, in the case of sc7180 there _are_ well defined numbers. IMO it is less confusing to use those and match the docs. Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20201111073652.1.Ia5bccd9eab7d74ea1ea9a7780e3cdbf662f5a464@changeid Signed-off-by: Bjorn Andersson commit 7a03aeb66c410366acc5439ae2a341f110c4f845 Author: Chuck Lever Date: Mon Nov 9 14:40:19 2020 -0500 xprtrdma: Micro-optimize MR DMA-unmapping Now that rpcrdma_ep is no longer part of rpcrdma_xprt, there are four or five serial address dereferences needed to get to the IB device needed for DMA unmapping. Instead, let's use the same pattern that regbufs use: cache a pointer to the device in the MR, and use that as the indication that unmapping is necessary. This also guarantees that the exact same device is used for DMA mapping and unmapping, even if the r_xprt's ep has been replaced. I don't think this can happen today, but future changes might break this assumption. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 584da076866f38ffb952efcc25af039f9551df81 Author: Nikolay Borisov Date: Tue Nov 10 15:26:49 2020 +0200 printk: ringbuffer: Reference text_data_ring directly in callees. A bunch of functions in the new ringbuffer code take both a printk_ringbuffer struct and a separate prb_data_ring. This is a relic from an earlier version of the code when a second data ring was present. Since this is no longer the case remove the extra function argument from: - data_make_reusable() - data_push_tail() - data_alloc() - data_realloc() Signed-off-by: Nikolay Borisov Reviewed-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek commit ef2be5918ff57bea9cd1e63968c73b1358a765ca Author: Chuck Lever Date: Mon Nov 9 14:40:14 2020 -0500 xprtrdma: Move rpcrdma_mr_put() Clean up: This function is now invoked only in frwr_ops.c. The move enables deduplication of the trace_xprtrdma_mr_unmap() call site. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 8e24e191d44f49f08f857f0ebc6fe91961cd1a09 Author: Chuck Lever Date: Mon Nov 9 14:40:08 2020 -0500 xprtrdma: Trace unmap_sync calls ->buf_free is called nearly once per RPC. Only rarely does xprt_rdma_free() have to do anything, thus tracing every one of these calls seems unnecessary. Instead, just throw a trace event when that one occasional RPC still has MRs that need to be released. xprt_rdma_free() is further micro-optimized to reduce the amount of work done in the common case. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 7703db978d4cf7c51426183b7c0d03c039757a44 Author: Chuck Lever Date: Mon Nov 9 14:40:03 2020 -0500 xprtrdma: Display the task ID when reporting MR events Tie each MR event to the requesting rpc_task to make it easier to follow MR ownership and control flow. MR unmapping and recycling can happen in the background, after an MR's mr_req field is stale, so set up a separate tracepoint class for those events. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 10a58c3a308af20d4fecc99cd81ef37599890c25 Merge: e4062765bc2a4 029b42d8519ce Author: Mark Brown Date: Wed Nov 11 15:44:32 2020 +0000 Merge series "SPI/ Input: ads7846: properly handle spi->mode flags" from Oleksij Rempel : changes v2: - add SPI_MODE_X_MASK macro - ads7846: clear SPI_MODE_X_MASK bits to set driver specific mode. Oleksij Rempel (2): spi: introduce SPI_MODE_X_MASK macro Input: ads7846: do not overwrite spi->mode flags set by spi framework drivers/input/touchscreen/ads7846.c | 3 ++- include/linux/spi/spi.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) commit-base: 3650b228f83adda7e5ee532e2b90429c03f7b9ec -- 2.28.0 commit c5abd7770df4645bae55051a3cc4a8797d851537 Merge: 2aff94e47da2e 193aa0a043645 Author: Mark Brown Date: Wed Nov 11 15:44:29 2020 +0000 Merge series "Fix PM disable depth imbalance on error" from Zhang Qilong : The pm_runtime_enable will increase power disable depth. Thus a pairing decrement is needed on the error handling path to keep it balanced according to context. This series of patches fixed it. Zhang Qilong (3): ASoC: wm8994: Fix PM disable depth imbalance on error ASoC: wm8997: Fix PM disable depth imbalance on error ASoC: wm8998: Fix PM disable depth imbalance on error sound/soc/codecs/wm8994.c | 6 +++++- sound/soc/codecs/wm8997.c | 9 +++++++-- sound/soc/codecs/wm8998.c | 4 +++- 3 files changed, 15 insertions(+), 4 deletions(-) -- 2.25.4 commit 0307cdec7c3412d7665363ab0cd61fccf82bfb2d Author: Chuck Lever Date: Mon Nov 9 14:39:58 2020 -0500 xprtrdma: Clean up trace_xprtrdma_nomrs() - Rename it following the "_err" suffix convention - Replace display of kernel memory addresses - Tie MR exhaustion to a peer IP address, similar to the createmrs tracepoint Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit d11e934606ef6ce37a4bcbe89f34faf37347abb1 Author: Chuck Lever Date: Mon Nov 9 14:39:53 2020 -0500 xprtrdma: Clean up xprtrdma callback tracepoints - Replace displayed kernel memory addresses - Tie the XID and event with the peer's IP address Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 03ffd92494a53dcc4b98c909ae1f6787d1fec646 Author: Chuck Lever Date: Mon Nov 9 14:39:47 2020 -0500 xprtrdma: Clean up tracepoints in the reply path Replace unnecessary display of kernel memory addresses. Also, there are no longer any trace_xprtrdma_defer_cmp() call sites. And remove the trace_xprtrdma_leaked_rep() tracepoint because there doesn't seem to be an overwhelming need to have a tracepoint for catching a software bug that has long since been fixed. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 3a9568fedccc6cf26c1a87621c3bfed7b7432119 Author: Chuck Lever Date: Mon Nov 9 14:39:42 2020 -0500 xprtrdma: Clean up reply parsing error tracepoints - Rename the tracepoints with the "_err" suffix to indicate these are rare error events - Replace display of kernel memory addresses - Tie the XID and error to a connection IP address instead Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 40714c58630aaaf1eb3acc431fe206a6b36a03d6 Author: Leo Yan Date: Fri Nov 6 17:48:53 2020 +0800 perf mem: Support ARM SPE events This patch adds ARM SPE events for perf memory profiling: 'spe-load': event for only recording memory load ops; 'spe-store': event for only recording memory store ops; 'spe-ldst': event for recording memory load and store ops. Signed-off-by: Leo Yan Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20201106094853.21082-10-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit c825f7885178f994a2a00ca02016940d94aaed6e Author: Leo Yan Date: Fri Nov 6 17:48:52 2020 +0800 perf c2c: Support AUX trace This patch adds the AUX callbacks in session structure, so support AUX trace for "perf c2c" tool; make itrace memory event as default for "perf c2c", this tells the AUX trace decoder to synthesize samples and can be used for statistics. Signed-off-by: Leo Yan Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20201106094853.21082-9-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 36a55edfc3d5b1c2735c088bcb06967de103f299 Author: Chuck Lever Date: Mon Nov 9 14:39:37 2020 -0500 xprtrdma: Clean up trace_xprtrdma_post_linv - Replace the display of kernel memory addresses - Add "_err" to the end of its name to indicate that it's a tracepoint that fires only when there's an error Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 13e5df1e3f1ba1a90944362bc57690ea1369b3b7 Author: Leo Yan Date: Fri Nov 6 17:48:51 2020 +0800 perf mem: Support AUX trace The 'perf mem' tool doesn't support AUX trace data so it cannot receive the hardware tracing data. On arm64, although it doesn't support PMU events for memory load and store, ARM SPE is a good candidate for memory profiling, the hardware tracer can record memory accessing operations with affiliated information (e.g. physical address and virtual address for accessing, cache levels, TLB walking, latency, etc). To allow "perf mem" tool to support AUX trace, this patch adds the AUX callbacks for session structure; make itrace memory event as default for "perf mem", this tells the AUX trace decoder to synthesize memory samples. Signed-off-by: Leo Yan Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20201106094853.21082-8-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 014a771c7867fda5b40a95e1c7bc1aa5ac704c91 Author: Leo Yan Date: Fri Nov 6 17:48:50 2020 +0800 perf auxtrace: Add itrace option '-M' for memory events This patch is to add itrace option '-M' to synthesize memory event. Signed-off-by: Leo Yan Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20201106094853.21082-7-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 436cce00710a3f234ab6b735b5980256e773d388 Author: Leo Yan Date: Fri Nov 6 17:48:49 2020 +0800 perf mem: Only initialize memory event for recording It's needless to initialize memory events for reporting, this patch moves memory event initialization for only recording. Furthermore, the change allows to parse perf data on cross platforms, e.g. perf tool can report result properly even the machine doesn't support the memory events. Signed-off-by: Leo Yan Acked-by: Ian Rogers Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20201106094853.21082-6-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 8b8173b45a7a9709cc2597548469708a8efbd0d9 Author: Leo Yan Date: Fri Nov 6 17:48:48 2020 +0800 perf c2c: Support memory event PERF_MEM_EVENTS__LOAD_STORE When user doesn't specify event name, perf c2c tool enables both the load and store events, and this leads to failure for opening the duplicate PMU device for AUX trace. After the memory event PERF_MEM_EVENTS__LOAD_STORE is introduced, when the user doesn't specify event name, this patch converts the required operation to PERF_MEM_EVENTS__LOAD_STORE if the arch supports it. Otherwise, the tool still rolls back to enable events PERF_MEM_EVENTS__LOAD and PERF_MEM_EVENTS__STORE. Signed-off-by: Leo Yan Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20201106094853.21082-5-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 5ecef9c84366955f61e379140c1065d576c66ada Author: Chuck Lever Date: Mon Nov 9 14:39:31 2020 -0500 xprtrdma: Introduce FRWR completion IDs Set up a completion ID in each rpcrdma_frwr. The ID is used to match an incoming completion to a transport (CQ) and other MR-related activity. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit b2e7467f26d7813d98cbaad5e62b54960f2c071b Author: Chuck Lever Date: Mon Nov 9 14:39:26 2020 -0500 xprtrdma: Introduce Send completion IDs Set up a completion ID in each rpcrdma_req. The ID is used to match an incoming Send completion to a transport and to a previous ib_post_send(). Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit af5865d2783958294179da56a4d073a9630b3068 Author: Chuck Lever Date: Mon Nov 9 14:39:21 2020 -0500 xprtrdma: Introduce Receive completion IDs Set up a completion ID in each rpcrdma_rep. The ID is used to match an incoming Receive completion to a transport and to a previous ib_post_recv(). Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 3821e232eb3b7591f07ce4c389313ab55ebee372 Author: Chuck Lever Date: Mon Nov 9 14:39:15 2020 -0500 xprtrdma: Replace dprintk call sites in ERR_CHUNK path Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 695dc55b573985569259e18f8e6261a77924342b Author: Rodrigo Vivi Date: Wed Nov 11 09:09:36 2020 -0500 drm/i915/tgl: Fix Media power gate sequence. Some media power gates are disabled by default. commit 5d86923060fc ("drm/i915/tgl: Enable VD HCP/MFX sub-pipe power gating") tried to enable it, but it duplicated an existent register. So, the main PG setup sequences ended up overwriting it. So, let's now merge this to the main PG setup sequence. v2: (Chris): s/BIT/REG_BIT, remove useless comment, remove useless =0, use the right gt, remove rc6 sequence doubt from commit message. Fixes: 5d86923060fc ("drm/i915/tgl: Enable VD HCP/MFX sub-pipe power gating") Cc: Lucas De Marchi Cc: stable@vger.kernel.org#v5.5+ Cc: Dale B Stimson Signed-off-by: Rodrigo Vivi Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20201111072859.1186070-1-rodrigo.vivi@intel.com commit 3603a537bf791d4047b89fd0fc060f723eded458 Author: Martin Kaiser Date: Sun Nov 8 19:01:44 2020 +0100 pinctrl: pinctrl-at91-pio4: Set irq handler and data in one go Replace the two separate calls for setting the irq handler and data with a single irq_set_chained_handler_and_data() call. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20201108180144.28594-1-martin@kaiser.cx Signed-off-by: Linus Walleij commit 22ee3ea588dfc84ccb8cea5ea37051dfed91b9b9 Author: Helge Deller Date: Fri Nov 6 19:41:36 2020 +0100 parisc: Make user stack size configurable On parisc we need to initialize the memory layout for the user stack at process start time to a fixed size, which up until now was limited to the size as given by CONFIG_MAX_STACK_SIZE_MB at compile time. This hard limit was too small and showed problems when compiling ruby2.7, qmlcachegen and some Qt packages. This patch changes two things: a) It increases the default maximum stack size to 100MB. b) Users can modify the stack hard limit size with ulimit and then newly forked processes will use the given stack size which can even be bigger than the default 100MB. Reported-by: John David Anglin Signed-off-by: Helge Deller commit c984baad3d8dd8555d23f0598fb81c3e0ea04c0e Author: Helge Deller Date: Thu Oct 29 22:01:06 2020 +0100 parisc: Use _TIF_USER_WORK_MASK in entry.S The constant _TIF_USER_WORK_MASK will get extended by additional flags in the future, so check against the bits set in this mask - with the exception of _TIF_NEED_RESCHED which was tested a few lines above. Signed-off-by: Helge Deller commit 93346da8ff47cc00f953c7f38a2d6ba11977fc42 Author: Helge Deller Date: Sat Oct 24 12:43:11 2020 +0200 parisc: Drop loops_per_jiffy from per_cpu struct There is no need to keep a loops_per_jiffy value per cpu. Drop it. Signed-off-by: Helge Deller commit cba08c5dc6dc1a906a0b5ddac9a9ac6c9a64f2e8 Author: Thomas Gleixner Date: Tue Oct 27 11:09:51 2020 +0100 x86/fpu: Make kernel FPU protection RT friendly Non RT kernels need to protect FPU against preemption and bottom half processing. This is achieved by disabling bottom halfs via local_bh_disable() which implictly disables preemption. On RT kernels this protection mechanism is not sufficient because local_bh_disable() does not disable preemption. It serializes bottom half related processing via a CPU local lock. As bottom halfs are running always in thread context on RT kernels disabling preemption is the proper choice as it implicitly prevents bottom half processing. Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201027101349.588965083@linutronix.de commit 5f0c71278d6848b4809f83af90f28196e1505ab1 Author: Thomas Gleixner Date: Tue Oct 27 11:09:50 2020 +0100 x86/fpu: Simplify fpregs_[un]lock() There is no point in disabling preemption and then disabling bottom halfs. Just disabling bottom halfs is sufficient as it implicitly disables preemption on !RT kernels. Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201027101349.455380473@linutronix.de commit 4ba2452cd88f39da68a6dc05fcc95e8977fd6403 Author: Leo Yan Date: Fri Nov 6 17:48:47 2020 +0800 perf mem: Support new memory event PERF_MEM_EVENTS__LOAD_STORE On the architectures with perf memory profiling, two types of hardware events have been supported: load and store; if want to profile memory for both load and store operations, the tool will use these two events at the same time, the usage is: # perf mem record -t load,store -- uname But this cannot be applied for AUX tracing event, the same PMU event can be used to only trace memory load, or only memory store, or trace for both memory load and store. This patch introduces a new event PERF_MEM_EVENTS__LOAD_STORE, which is used to support the event which can record both memory load and store operations. When user specifies memory operation type as 'load,store', or doesn't set type so use 'load,store' as default, if the arch supports the event PERF_MEM_EVENTS__LOAD_STORE, the tool will convert the required operations to this single event; otherwise, if the arch doesn't support PERF_MEM_EVENTS__LOAD_STORE, the tool rolls back to enable both events PERF_MEM_EVENTS__LOAD and PERF_MEM_EVENTS__STORE, which keeps the same behaviour with before. Signed-off-by: Leo Yan Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20201106094853.21082-4-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit eaf6aaeec5fa301c0eb8ae92962909b15d075e5f Author: Leo Yan Date: Fri Nov 6 17:48:46 2020 +0800 perf mem: Introduce weak function perf_mem_events__ptr() Different architectures might use different event or different event parameters for memory profiling, this patch introduces a weak perf_mem_events__ptr() function which allows to return back a architecture specific memory event. Since the variable 'perf_mem_events' can be only accessed by the perf_mem_events__ptr() function, mark the variable as 'static', this allows the architectures to define its own memory event array. Signed-off-by: Leo Yan Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20201106094853.21082-3-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit f9f16dfbe76e63ba9aec68055c08242b09be297e Author: Leo Yan Date: Fri Nov 6 17:48:45 2020 +0800 perf mem: Search event name with more flexible path The perf tool searches a memory event name under the folder '/sys/devices/cpu/events/', this leads to the limitation for the selection of a memory profiling event which must be under this folder. Thus it's impossible to use any other event as memory event which is not under this specific folder, e.g. Arm SPE hardware event is not located in '/sys/devices/cpu/events/' so it cannot be enabled for memory profiling. This patch changes to search folder from '/sys/devices/cpu/events/' to '/sys/devices', so it give flexibility to find events which can be used for memory profiling. Signed-off-by: Leo Yan Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20201106094853.21082-2-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit e4062765bc2a41e025e29dd56bad798505036427 Author: Zhang Qilong Date: Fri Nov 6 09:50:35 2020 +0800 spi: sprd: fix reference leak in sprd_spi_remove pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to pm_runtime_put_noidle will result in reference leak in sprd_spi_remove, so we should fix it. Fixes: e7d973a31c24b ("spi: sprd: Add SPI driver for Spreadtrum SC9860") Signed-off-by: Zhang Qilong Acked-by: Chunyan Zhang Link: https://lore.kernel.org/r/20201106015035.139574-1-zhangqilong3@huawei.com Signed-off-by: Mark Brown commit 029b42d8519cef70c4fb5fcaccd08f1053ed2bf0 Author: Oleksij Rempel Date: Tue Oct 27 10:57:23 2020 +0100 spi: introduce SPI_MODE_X_MASK macro Provide a macro to filter all SPI_MODE_0,1,2,3 mode in one run. The latest SPI framework will parse the devicetree in following call sequence: of_register_spi_device() -> of_spi_parse_dt() So, driver do not need to pars the devicetree and will get prepared flags in the probe. On one hand it is good far most drivers. On other hand some drivers need to filter flags provide by SPI framework and apply know to work flags. This drivers may use SPI_MODE_X_MASK to filter MODE flags and set own, known flags: spi->flags &= ~SPI_MODE_X_MASK; spi->flags |= SPI_MODE_0; Signed-off-by: Oleksij Rempel Link: https://lore.kernel.org/r/20201027095724.18654-2-o.rempel@pengutronix.de Signed-off-by: Mark Brown commit 811c732f468833fea8619fe06c2bb71368d6984a Merge: 51c0a0c63fd0c c088a4985e5f6 Author: Mark Brown Date: Wed Nov 11 12:37:42 2020 +0000 Merge branch 'for-5.10' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-5.11 commit 2aff94e47da2e2006ceb53c00247218ea8a72770 Author: Jiaxin Yu Date: Wed Nov 11 10:45:22 2020 +0800 ASoC: mediatek: mt8192: skip first time data at the beginning of DMIC recording We can choose to drop away any length of data from the beginning according to project needs. Some projects don't want to throw away any data, because they want to use recorded data to do echo cancellation, so they have to make sure that they are aligned with the reference data as much as possible. Or there are other algorithms in the upper layer to eliminate this noise. Or some projects want to eliminate this noise form the kernel layer. However, the minimum recommended value is 50ms to skip pop noise. Signed-off-by: Jiaxin Yu Link: https://lore.kernel.org/r/1605062722-8711-1-git-send-email-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown commit 6b0e12a5c668c6b77c3e6d6c55c3ae7ed8bf5bd5 Author: Shane.Chien Date: Wed Nov 11 12:14:56 2020 +0800 ASoC: Remove mt6359_platform_driver_remove remove mt6359_platform_driver_remove due to it is useless. Signed-off-by: Shane.Chien Link: https://lore.kernel.org/r/1605068096-12587-1-git-send-email-shane.chien@mediatek.com Signed-off-by: Mark Brown commit 34d3daba23399440dedddd0f9ccd6c1057314139 Author: Jon Hunter Date: Wed Nov 11 10:32:45 2020 +0000 ASoC: tegra: Don't warn on probe deferral Deferred probe is an expected return value for snd_soc_register_card(). Given that the driver deals with it properly, there's no need to output a warning that may potentially confuse users. Signed-off-by: Jon Hunter Link: https://lore.kernel.org/r/20201111103245.152189-1-jonathanh@nvidia.com Signed-off-by: Mark Brown commit 193aa0a043645220d2a2f783ba06ae13d4601078 Author: Zhang Qilong Date: Wed Nov 11 12:13:26 2020 +0800 ASoC: wm8998: Fix PM disable depth imbalance on error The pm_runtime_enable will increase power disable depth. Thus a pairing decrement is needed on the error handling path to keep it balanced according to context. Fixes: 31833ead95c2c ("ASoC: arizona: Move request of speaker IRQs into bus probe") Signed-off-by: Zhang Qilong Reviewed-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20201111041326.1257558-4-zhangqilong3@huawei.com Signed-off-by: Mark Brown commit b8161cbe55a1892a19a318eaebbda92438fa708c Author: Zhang Qilong Date: Wed Nov 11 12:13:24 2020 +0800 ASoC: wm8994: Fix PM disable depth imbalance on error The pm_runtime_enable will increase power disable depth. Thus a pairing decrement is needed on the error handling path to keep it balanced according to context. Fixes: 57e265c8d71fb ("ASoC: wm8994: Move runtime PM init to platform device init") Signed-off-by: Zhang Qilong Reviewed-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20201111041326.1257558-2-zhangqilong3@huawei.com Signed-off-by: Mark Brown commit abec017c3d1f47edf7d1e48a2ed45f0e69413a80 Author: Paul Cercueil Date: Thu Nov 5 08:39:05 2020 +0000 drm/ingenic: ipu: Search for scaling coefs up to 102% of the screen Increase the scaled image's theorical width/height until we find a configuration that has valid scaling coefficients, up to 102% of the screen's resolution. This makes sure that we can scale from almost every resolution possible at the cost of a very small distorsion. The CRTC_W / CRTC_H are not modified. This algorithm was already in place but would not try to go above the screen's resolution, and as a result would only work if the CRTC_W / CRTC_H were smaller than the screen resolution. It will now try until it reaches 102% of the screen's resolution. Note that this algorithm exists mostly as a band-aid for a missing functionality: it is not possible for userspace to request the closest mode that would encapsulate the provided one, because the GEM buffer is created beforehand. If there was a way to let the kernel tweak the mode, I could write a better algorithm that would result in a better looking picture. Signed-off-by: Paul Cercueil Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201105083905.8780-1-paul@crapouillou.net commit 22fbcfc54705213fa358bcc1349db8bbdf398ddc Author: Howard Chung Date: Wed Nov 11 15:02:19 2020 +0800 Bluetooth: Replace BT_DBG with bt_dev_dbg in HCI request This replaces the BT_DBG function to bt_dev_dbg as it is cleaner to show the controller index in the debug message. Signed-off-by: Howard Chung Signed-off-by: Marcel Holtmann commit 3ae1dc756f48ba33428c7f958e9f19fa8244672c Author: Sergey Shtylyov Date: Wed Oct 7 18:54:15 2020 +0300 Bluetooth: consolidate error paths in hci_phy_link_complete_evt() hci_phy_link_complete_evt() has several duplicate error paths -- consolidate them, using the *goto* statements. Signed-off-by: Sergey Shtylyov Signed-off-by: Marcel Holtmann commit 2be43abac5a839d44bf9d14716573ae0ac920f2b Author: Venkata Lakshmi Narayana Gubba Date: Tue Oct 6 20:50:21 2020 +0530 Bluetooth: hci_qca: Wait for timeout during suspend Currently qca_suspend() is relied on IBS mechanism. During FW download and memory dump collections, IBS will be disabled. In those cases, driver will allow suspend and still uses the serdev port, which results to errors. Now added a wait timeout if suspend is triggered during FW download and memory collections. Signed-off-by: Venkata Lakshmi Narayana Gubba Signed-off-by: Balakrishna Godavarthi Reviewed-by: Abhishek Pandit-Subedi Signed-off-by: Marcel Holtmann commit f5e8e215869eed6163d5fdd309f0e674a0f23df6 Author: Colin Ian King Date: Tue Nov 10 12:39:15 2020 +0000 Bluetooth: btrtl: fix incorrect skb allocation failure check Currently the check for a failed bt_skb_alloc allocation is incorrectly checking using IS_ERR and this can lead to a null pointer dereference. Fix this by checking for a null pointer return using the !skb idiom. Addresses-Coverity: ("Dereference null return") Fixes: 1996d9cad6ad ("Bluetooth: btrtl: Ask 8821C to drop old firmware") Signed-off-by: Colin Ian King Signed-off-by: Marcel Holtmann commit 844c79bd5995185cf1ab56e4eae9dd9e50204aeb Author: Xiaolei Wang Date: Tue Nov 10 18:13:11 2020 +0800 Bluetooth: hci_ll: add a small delay for wl1271 enable bt_en When using the wl1271 Bluetooth function of am335x, it is found that the Bluetooth module cannot respond in time after Bluetooth is enabled, and a small delay is needed to work normally, so whether to add a small mdelay. Signed-off-by: Xiaolei Wang Signed-off-by: Marcel Holtmann commit f496297e76a69db7b52257898570bd38b8b9c92b Author: Julian Pidancet Date: Mon Nov 9 17:47:22 2020 +0100 Bluetooth: btusb: Add support for 1358:c123 Realtek 8822CE device Huawei Matebook 13 2020 AMD laptops (and probably other Matebook models) are equiped with a RTL8822CE chip using the 1358:c123 USB identifiers. This patch adds firmware loading support for it. T: Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0 D: Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=1358 ProdID=c123 Rev= 0.00 S: Manufacturer=Realtek S: Product=Bluetooth Radio S: SerialNumber=00e04c000001 C:* #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms Signed-off-by: Julian Pidancet Signed-off-by: Marcel Holtmann commit 99719449a4a6e4a86e741f8636723e811b843efc Author: Nigel Christian Date: Tue Nov 10 23:55:38 2020 -0500 Bluetooth: hci_qca: resolve various warnings Replace symbolic permissions with octal values. Use usleep_range for small msec values due to the fact that msleep() less than 20ms may have unexpected behavior/sleep longer. - https://lkml.org/lkml/2016/8/2/1945 - Documentation/timers/timers-howto.rst Signed-off-by: Nigel Christian Signed-off-by: Marcel Holtmann commit 9e80587aba4cdb9f50b2ffc546e2640ef0a33c48 Author: Balakrishna Godavarthi Date: Wed Nov 11 10:44:13 2020 +0530 Bluetooth: hci_qca: Enhance retry logic in qca_setup Currently driver only retries to download FW if FW downloading is failed. Sometimes observed command timeout for version request command, if this happen on some platforms during boot time, then a reboot is needed to turn ON BT. Instead to avoid a reboot, now extended retry logic for version request command too. Signed-off-by: Balakrishna Godavarthi Reviewed-by: Abhishek Pandit-Subedi Signed-off-by: Marcel Holtmann commit 288c06973daae4637f25a0d1bdaf65fdbf8455f9 Author: Archie Pusaka Date: Wed Nov 11 14:32:20 2020 +0800 Bluetooth: Enforce key size of 16 bytes on FIPS level According to the spec Ver 5.2, Vol 3, Part C, Sec 5.2.2.8: Device in security mode 4 level 4 shall enforce: 128-bit equivalent strength for link and encryption keys required using FIPS approved algorithms (E0 not allowed, SAFER+ not allowed, and P-192 not allowed; encryption key not shortened) This patch rejects connection with key size below 16 for FIPS level services. Signed-off-by: Archie Pusaka Reviewed-by: Alain Michaud Signed-off-by: Marcel Holtmann commit e77ce5ec8b9d63bd980ca8a2ab9c28222cacb3ba Author: Linus Walleij Date: Wed Nov 11 01:25:13 2020 +0100 ARM: dts: ux500: skomer: Pull down SDI2 FBCLK The feedback clock on SDI2 needs to be pulled down on this machine. Link: https://lore.kernel.org/r/20201111002513.2271351-1-linus.walleij@linaro.org Signed-off-by: Linus Walleij commit 80f1803dbc0506c5d192ef4df4e851690ca68114 Author: Vinod Koul Date: Wed Nov 11 10:06:10 2020 +0530 pinctrl: qcom: sdx55: update kconfig dependency Commit be117ca32261 ("pinctrl: qcom: Kconfig: Rework PINCTRL_MSM to be a dependency rather then a selected config") moved the qcom pinctrl drivers to have PINCTRL_MSM as dependency rather then a selected config, so do this change for SDX55 pinctrl driver as well. Signed-off-by: Vinod Koul Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20201111043610.177168-1-vkoul@kernel.org Signed-off-by: Linus Walleij commit a4872f905b71e180f2b19bf646b25b732169de61 Author: Linus Walleij Date: Wed Nov 11 00:23:30 2020 +0100 pinctrl: nomadik: db8500: Add more detailed LCD groups We need a more granular distribution among funcion A and function B for the LCD pins for the Samsung GT-I9070. Provide some new pin groups so we can configure this phone properly. Link: https://lore.kernel.org/r/20201110232330.2242167-1-linus.walleij@linaro.org Signed-off-by: Linus Walleij commit da1e9dd3a11cda85b58dafe64f091734934b2f6c Author: Johannes Berg Date: Tue Nov 10 09:49:11 2020 +0100 nl80211: fix kernel-doc warning in the new SAE attribute Format the items as a definition list, to avoid the warning from the rst parsing. Fixes: 9f0ffa418483 ("cfg80211: Add support to configure SAE PWE value to drivers") Link: https://lore.kernel.org/r/20201110094911.bb020e863aa0.I960caf90e2a8cc23f6bf9245d77524df6a4d8f37@changeid Signed-off-by: Johannes Berg commit e7e0517c1004991908bc7f20b4c9a7b678277358 Author: Johannes Berg Date: Mon Nov 9 10:57:47 2020 +0100 cfg80211: remove WDS code Remove all the code that was there to configure WDS interfaces, now that there's no way to reach it anymore. Link: https://lore.kernel.org/r/20201109105103.8f5b98e4068d.I5f5129041649ef2862b69683574bb3344743727b@changeid Signed-off-by: Johannes Berg commit 70d9c59909df637da220e732672e4bf229702bde Author: Johannes Berg Date: Mon Nov 9 10:57:46 2020 +0100 mac80211: remove WDS-related code Now that all the mac80211-based drivers have removed WDS code and in particular the ability to advertise such devices, also remove all the code related to WDS here. Link: https://lore.kernel.org/r/20201109105103.38960c413d46.I3603c90a44562d847c39d15d5ff33d8c00df5834@changeid Signed-off-by: Johannes Berg commit 801a46bda516c4e3816d670e12022b95dffc02ea Author: Johannes Berg Date: Mon Nov 9 10:57:45 2020 +0100 rt2x00: remove WDS code The ability to reach this code was hidden behind CONFIG_WIRELESS_WDS, which was just removed. Clean up the driver accordingly. Link: https://lore.kernel.org/r/20201109105103.c3248409e449.I74954b87e5bdd23c99a5314d2b265889292a6cb5@changeid Acked-by: Kalle Valo Signed-off-by: Johannes Berg commit 8c21fc4569132fcf27d2187ccd2802bc43b78da9 Author: Johannes Berg Date: Mon Nov 9 10:57:44 2020 +0100 b43legacy: remove WDS code The ability to reach this code was hidden behind CONFIG_WIRELESS_WDS, which was just removed. Clean up the driver accordingly. Link: https://lore.kernel.org/r/20201109105103.daa66065cc71.Ie6280e1606fa9aa892b2a342a62aabd42e241f9c@changeid Acked-by: Kalle Valo Signed-off-by: Johannes Berg commit 81c9b7d408c44d1c3027af6f37fab08f3990c871 Author: Johannes Berg Date: Mon Nov 9 10:57:43 2020 +0100 b43: remove WDS code The ability to reach this code was hidden behind CONFIG_WIRELESS_WDS, which was just removed. Clean up the driver accordingly. Link: https://lore.kernel.org/r/20201109105103.f1d9486874fc.I081f5771478ec3a45c2a22c158ed9aea661336e1@changeid Acked-by: Kalle Valo Signed-off-by: Johannes Berg commit bcc857f8d1efcc65d2c49983bd6306aafd039cde Author: Johannes Berg Date: Mon Nov 9 10:57:42 2020 +0100 carl9170: remove WDS code The ability to reach this code was hidden behind CONFIG_WIRELESS_WDS, which was just removed. Clean up the driver accordingly. Link: https://lore.kernel.org/r/20201109105103.1e9c64789510.Ifc4f55c8099e7b7c31a8059befe102523d65e945@changeid Acked-by: Kalle Valo Signed-off-by: Johannes Berg commit f489921875779b5bac40e3e36f66e1745b8a8c4b Author: Johannes Berg Date: Mon Nov 9 10:57:41 2020 +0100 ath9k: remove WDS code The ability to reach this code was hidden behind CONFIG_WIRELESS_WDS, which was just removed. Clean up the driver accordingly. Link: https://lore.kernel.org/r/20201109105103.e1d48ee20b0a.I89f8af0d50a02ce16a922fa790d6c1908f31a496@changeid Acked-by: Kalle Valo Signed-off-by: Johannes Berg commit 1987f112f1425cba2671d878f6952087e9456a0a Author: Frankie.Chang Date: Wed Nov 11 11:02:43 2020 +0800 binder: add trace at free transaction. Since the original trace_binder_transaction_received cannot precisely present the real finished time of transaction, adding a trace_binder_txn_latency_free at the point of free transaction may be more close to it. Signed-off-by: Frankie.Chang Acked-by: Todd Kjos Link: https://lore.kernel.org/r/1605063764-12930-3-git-send-email-Frankie.Chang@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 421518a2740fc95ab3a47109228bf230dee4040b Author: Frankie.Chang Date: Wed Nov 11 11:02:42 2020 +0800 binder: move structs from core file to header file Moving all structs to header file makes module more extendable, and makes all these structs to be defined in the same file. Signed-off-by: Frankie.Chang Acked-by: Todd Kjos Link: https://lore.kernel.org/r/1605063764-12930-2-git-send-email-Frankie.Chang@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 4e58171aa93fe8caf4f6e5e9972b7abe117c0014 Author: Isaac Hazan Date: Tue Nov 3 15:57:32 2020 +0300 MAINTAINERS: Add Isaac as maintainer of Thunderbolt DMA traffic test driver I will be maintaining the Thunderbolt DMA traffic test driver. Signed-off-by: Isaac Hazan Signed-off-by: Mika Westerberg Acked-by: Yehezkel Bernat Reviewed-by: Greg Kroah-Hartman commit edc0f494ed966e39e5619be7cdaeb9873e1f4fe1 Author: Isaac Hazan Date: Thu Sep 24 11:44:02 2020 +0300 thunderbolt: Add DMA traffic test driver This driver allows sending DMA traffic over XDomain connection. Specifically over a loopback connection using either a Thunderbolt/USB4 cable that is connected back to the host router port, or a special loopback dongle that has RX and TX lines crossed. This can be useful at manufacturing floor to check whether Thunderbolt/USB4 ports are functional. The driver exposes debugfs directory under the XDomain service that can be used to configure the driver, start the test and check the results. If a loopback dongle is used the steps to send and receive 1000 packets can be done like: # modprobe thunderbolt_dma_test # echo 1000 > /sys/kernel/debug/thunderbolt//dma_test/packets_to_receive # echo 1000 > /sys/kernel/debug/thunderbolt//dma_test/packets_to_send # echo 1 > /sys/kernel/debug/thunderbolt//dma_test/test # cat /sys/kernel/debug/thunderbolt//dma_test/status When a cable is connected back to host then there are two Thunderbolt services, one is configured for receiving (does not matter which one): # modprobe thunderbolt_dma_test # echo 1000 > /sys/kernel/debug/thunderbolt//dma_test/packets_to_receive # echo 1 > /sys/kernel/debug/thunderbolt//dma_test/test The other one for sending: # echo 1000 > /sys/kernel/debug/thunderbolt//dma_test/packets_to_send # echo 1 > /sys/kernel/debug/thunderbolt//dma_test/test Results can be read from both services status attributes. Signed-off-by: Isaac Hazan Signed-off-by: Mika Westerberg Acked-by: Yehezkel Bernat Reviewed-by: Greg Kroah-Hartman commit afe704a2d0618ebdb559b5ddb059f6cdbfc78783 Author: Mika Westerberg Date: Mon Oct 19 19:15:20 2020 +0300 thunderbolt: Add support for end-to-end flow control USB4 spec defines end-to-end (E2E) flow control that can be used between hosts to prevent overflow of a RX ring. We previously had this partially implemented but that code was removed with commit 53f13319d131 ("thunderbolt: Get rid of E2E workaround") with the idea that we add it back properly if there ever is need. Now that we are going to add DMA traffic test driver (in subsequent patches) this can be useful. For this reason we modify tb_ring_alloc_rx/tx() so that they accept RING_FLAG_E2E and configure the hardware ring accordingly. The RX side also requires passing TX HopID (e2e_tx_hop) used in the credit grant packets. Signed-off-by: Mika Westerberg Acked-by: Yehezkel Bernat Reviewed-by: Greg Kroah-Hartman commit 5bf722df5d37e82fd252b1d3e37cde4eab355c1c Author: Mika Westerberg Date: Wed Oct 7 18:17:12 2020 +0300 thunderbolt: Make it possible to allocate one directional DMA tunnel With DMA tunnels it is possible that the service using it does not require bi-directional paths so make RX and TX optional (but of course one of them needs to be set). Signed-off-by: Mika Westerberg Acked-by: Yehezkel Bernat Reviewed-by: Greg Kroah-Hartman commit 407ac931aefda91ac90498c6b6e6893982173613 Author: Mika Westerberg Date: Wed Oct 7 17:53:44 2020 +0300 thunderbolt: Create debugfs directory automatically for services This allows service drivers to use it as parent directory if they need to add their own debugfs entries. Signed-off-by: Mika Westerberg Acked-by: Yehezkel Bernat Reviewed-by: Greg Kroah-Hartman commit 5cc0df9ce10a860aaeac53f8df1cc8754c5c7b03 Author: Isaac Hazan Date: Thu Sep 24 11:44:01 2020 +0300 thunderbolt: Add functions for enabling and disabling lane bonding on XDomain These can be used by service drivers to enable and disable lane bonding as needed. Signed-off-by: Isaac Hazan Signed-off-by: Mika Westerberg Acked-by: Yehezkel Bernat Reviewed-by: Greg Kroah-Hartman commit 4210d50f0b3e423e10a7a254b2a67f5c5318868e Author: Isaac Hazan Date: Thu Sep 24 11:43:58 2020 +0300 thunderbolt: Add link_speed and link_width to XDomain Link speed and link width are needed for checking expected values in case of using a loopback service. Signed-off-by: Isaac Hazan Signed-off-by: Mika Westerberg Acked-by: Yehezkel Bernat Reviewed-by: Greg Kroah-Hartman commit 47844ecb8cec2916abaad9c1d1b801f49ed6265d Author: Mika Westerberg Date: Wed Oct 7 18:19:28 2020 +0300 thunderbolt: Create XDomain devices for loops back to the host It is perfectly possible to have loops back from the routers to the host, or even from one host port to another. Instead of ignoring these, we create XDomain devices for each. This allows creating services such as DMA traffic test that is used in manufacturing for example. Signed-off-by: Mika Westerberg Acked-by: Yehezkel Bernat Reviewed-by: Greg Kroah-Hartman commit d67274bacb8a2bc2a6cfd2a0cef4963379e3eb26 Author: Mika Westerberg Date: Wed Oct 7 17:01:43 2020 +0300 thunderbolt: Find XDomain by route instead of UUID We are going to represent loops back to the host also as XDomains and they all have the same (host) UUID, so finding them needs to use route string instead. This also requires that we check if the XDomain device is added to the bus before its properties can be updated. Otherwise the remote UUID might not be populated yet. Signed-off-by: Mika Westerberg Acked-by: Yehezkel Bernat Reviewed-by: Greg Kroah-Hartman commit 81816f5048bac5f4b202ed1443e9788dfc31a18c Author: Mika Westerberg Date: Wed Oct 7 17:08:47 2020 +0300 thunderbolt: Do not clear USB4 router protocol adapter IFC and ISE bits These fields are marked as vendor defined in the USB4 spec and should not be modified by the software, so only clear them when we are dealing with pre-USB4 hardware. Signed-off-by: Mika Westerberg Acked-by: Yehezkel Bernat Reviewed-by: Greg Kroah-Hartman commit 1894b78ee6ff2d50e4afa4b80244d060c3773bfc Author: Lee Jones Date: Tue Nov 3 15:28:28 2020 +0000 soc: qcom: rpmh: Fix possible doc-rot in rpmh_write()'s header Fixes the following W=1 kernel build warning(s): drivers/soc/qcom/rpmh.c:266: warning: Function parameter or member 'dev' not described in 'rpmh_write' drivers/soc/qcom/rpmh.c:266: warning: Excess function parameter 'rc' description in 'rpmh_write' Cc: Andy Gross Cc: Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org Reviewed-by: Bjorn Andersson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201103152838.1290217-16-lee.jones@linaro.org Signed-off-by: Bjorn Andersson commit 9401f8dcf1ee4d18bc23a29f26c76910ab852757 Author: Lee Jones Date: Tue Nov 3 15:28:35 2020 +0000 soc: qcom: kryo-l2-accessors: Fix misnaming of 'val' Fixes the following W=1 kernel build warning(s): drivers/soc/qcom/kryo-l2-accessors.c:25: warning: Function parameter or member 'val' not described in 'kryo_l2_set_indirect_reg' drivers/soc/qcom/kryo-l2-accessors.c:25: warning: Excess function parameter 'value' description in 'kryo_l2_set_indirect_reg' Cc: Andy Gross Cc: Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org Reviewed-by: Bjorn Andersson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201103152838.1290217-23-lee.jones@linaro.org Signed-off-by: Bjorn Andersson commit 5d16af6a921f5a4e7038671be5478cba4b7cfe81 Author: Lee Jones Date: Tue Nov 3 15:28:34 2020 +0000 soc: qcom: rpmhpd: Provide some missing struct member descriptions Fixes the following W=1 kernel build warning(s): drivers/soc/qcom/rpmhpd.c:52: warning: Function parameter or member 'parent' not described in 'rpmhpd' drivers/soc/qcom/rpmhpd.c:52: warning: Function parameter or member 'corner' not described in 'rpmhpd' drivers/soc/qcom/rpmhpd.c:52: warning: Function parameter or member 'active_corner' not described in 'rpmhpd' Cc: Andy Gross Cc: Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org Reviewed-by: Bjorn Andersson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201103152838.1290217-22-lee.jones@linaro.org Signed-off-by: Bjorn Andersson commit 171c03171a4cdf23a07a6d3a63eb446b714fe45f Author: Lee Jones Date: Tue Nov 3 15:28:33 2020 +0000 soc: qcom: llcc-qcom: Fix expected kernel-doc formatting Kernel-doc expects struct documentation to start with 'struct '. Fixes the following W=1 kernel build warning(s): drivers/soc/qcom/llcc-qcom.c:77: warning: cannot understand function prototype: 'struct llcc_slice_config ' Cc: Andy Gross Cc: Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org Reviewed-by: Bjorn Andersson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201103152838.1290217-21-lee.jones@linaro.org Signed-off-by: Bjorn Andersson commit 1f8933c25f9e9f33b147b596ccd9f446a00e9862 Author: Lee Jones Date: Tue Nov 3 15:28:32 2020 +0000 soc: qcom: smp2p: Remove unused struct attribute provide another Fixes the following W=1 kernel build warning: drivers/soc/qcom/smp2p.c:149: warning: Function parameter or member 'out' not described in 'qcom_smp2p' Cc: Andy Gross Cc: Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org Reviewed-by: Bjorn Andersson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201103152838.1290217-20-lee.jones@linaro.org [bjorn: Dropped hunk that fixed the same warning in smp2p_smem_item] Signed-off-by: Bjorn Andersson commit f5c805b1f188fe1498011a57a4ee2db4238f53c8 Author: Lee Jones Date: Tue Nov 3 15:28:31 2020 +0000 soc: qcom: wcnss_ctrl: Demote non-conformant struct header and fix function headers Fixes the following W=1 kernel build warning(s): drivers/soc/qcom/wcnss_ctrl.c:81: warning: Function parameter or member 'major' not described in 'wcnss_version_resp' drivers/soc/qcom/wcnss_ctrl.c:81: warning: Function parameter or member 'minor' not described in 'wcnss_version_resp' drivers/soc/qcom/wcnss_ctrl.c:81: warning: Function parameter or member 'version' not described in 'wcnss_version_resp' drivers/soc/qcom/wcnss_ctrl.c:81: warning: Function parameter or member 'revision' not described in 'wcnss_version_resp' drivers/soc/qcom/wcnss_ctrl.c:122: warning: Function parameter or member 'rpdev' not described in 'wcnss_ctrl_smd_callback' drivers/soc/qcom/wcnss_ctrl.c:122: warning: Function parameter or member 'priv' not described in 'wcnss_ctrl_smd_callback' drivers/soc/qcom/wcnss_ctrl.c:122: warning: Function parameter or member 'addr' not described in 'wcnss_ctrl_smd_callback' drivers/soc/qcom/wcnss_ctrl.c:122: warning: Excess function parameter 'channel' description in 'wcnss_ctrl_smd_callback' drivers/soc/qcom/wcnss_ctrl.c:272: warning: Function parameter or member 'priv' not described in 'qcom_wcnss_open_channel' Cc: Andy Gross Cc: Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org Reviewed-by: Bjorn Andersson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201103152838.1290217-19-lee.jones@linaro.org Signed-off-by: Bjorn Andersson commit fac312df31ab39aeb1400eac7d3bb13a740c48fd Author: Lee Jones Date: Tue Nov 3 15:28:30 2020 +0000 soc: qcom: smsm: Fix some kernel-doc formatting and naming problems Fixes the following W=1 kernel build warning(s): drivers/soc/qcom/smsm.c:140: warning: Function parameter or member 'mask' not described in 'smsm_update_bits' drivers/soc/qcom/smsm.c:140: warning: Excess function parameter 'offset' description in 'smsm_update_bits' drivers/soc/qcom/smsm.c:257: warning: bad line: drivers/soc/qcom/smsm.c:260: warning: bad line: Cc: Andy Gross Cc: Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org Reviewed-by: Bjorn Andersson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201103152838.1290217-18-lee.jones@linaro.org Signed-off-by: Bjorn Andersson commit fc3699c69857abbdb690d7a34eba0181e93c903e Author: Lee Jones Date: Tue Nov 3 15:28:29 2020 +0000 soc: qcom: smem: Fix formatting and missing documentation issues Fixes the following W=1 kernel build warning(s): drivers/soc/qcom/smem.c:135: warning: Function parameter or member 'toc' not described in 'smem_header' drivers/soc/qcom/smem.c:275: warning: Function parameter or member 'socinfo' not described in 'qcom_smem' Cc: Andy Gross Cc: Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org Reviewed-by: Bjorn Andersson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201103152838.1290217-17-lee.jones@linaro.org Signed-off-by: Bjorn Andersson commit 08ad7061e4d4e7eace8a2993c8df53b0bd4fdf19 Author: Lee Jones Date: Tue Nov 3 15:28:25 2020 +0000 soc: qcom: qcom-geni-se: Fix misnamed function parameter 'rx_rfr' Fixes the following W=1 kernel build warning(s): drivers/soc/qcom/qcom-geni-se.c:85: warning: Cannot understand * @struct geni_wrapper - Data structure to represent the QUP Wrapper Core drivers/soc/qcom/qcom-geni-se.c:246: warning: Function parameter or member 'rx_rfr' not described in 'geni_se_init' drivers/soc/qcom/qcom-geni-se.c:246: warning: Excess function parameter 'rx_rfr_wm' description in 'geni_se_init' Cc: Andy Gross Cc: Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org Reviewed-by: Bjorn Andersson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201103152838.1290217-13-lee.jones@linaro.org Signed-off-by: Bjorn Andersson commit 96ec310d5d946372292f9abfc019a45012606c11 Author: Lee Jones Date: Tue Nov 3 15:28:16 2020 +0000 soc: qcom: qcom_aoss: Add missing description for 'cooling_devs' Fixes the following W=1 kernel build warning(s): drivers/soc/qcom/qcom_aoss.c:86: warning: Function parameter or member 'cooling_devs' not described in 'qmp' Cc: Andy Gross Cc: Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org Reviewed-by: Bjorn Andersson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201103152838.1290217-4-lee.jones@linaro.org Signed-off-by: Bjorn Andersson commit 54f8ebda0dde59ae313bc6c87d307b0225d38fc5 Author: Lee Jones Date: Tue Nov 3 15:28:15 2020 +0000 soc: qcom: qcom_aoss: Remove set but unused variable 'tlen' Fixes the following W=1 kernel build warning(s): drivers/soc/qcom/qcom_aoss.c: In function ‘qmp_send’: drivers/soc/qcom/qcom_aoss.c:228:9: warning: variable ‘tlen’ set but not used [-Wunused-but-set-variable] Cc: Andy Gross Cc: Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org Reviewed-by: Bjorn Andersson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201103152838.1290217-3-lee.jones@linaro.org Signed-off-by: Bjorn Andersson commit b7fbf46cb81c2bb432d648f52e4cd591a09593bc Author: Vinod Koul Date: Tue Oct 27 22:15:11 2020 +0530 arm64: dts: ipq8074: Fix dma node name DMA controller binding describes the node name should be dma-controller and not dma, so fix the node name Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20201027164511.476312-10-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit 58acbcdcdc33c9c7b8601b5057a272009e4fe2f6 Author: Vinod Koul Date: Tue Oct 27 22:15:10 2020 +0530 arm64: dts: ipq6018: Fix dma node name DMA controller binding describes the node name should be dma-controller and not dma, so fix the node name Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20201027164511.476312-9-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit 94ed1811aff0c4027d877d2ecf66da0d62369d99 Author: Vinod Koul Date: Tue Oct 27 22:15:09 2020 +0530 arm64: dts: msm8998: Fix dma node name DMA controller binding describes the node name should be dma-controller and not dma, so fix the node name Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20201027164511.476312-8-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit b5af3036e84c801416b699930b2b578fbe755cd1 Author: Vinod Koul Date: Tue Oct 27 22:15:08 2020 +0530 arm64: dts: msm8996: Fix dma node name DMA controller binding describes the node name should be dma-controller and not dma, so fix the node name Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20201027164511.476312-7-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit 828896c562339292f5b7c04dc95a9e8ea150544f Author: Vinod Koul Date: Tue Oct 27 22:15:07 2020 +0530 arm64: dts: msm8994: Fix dma node name DMA controller binding describes the node name should be dma-controller and not dma, so fix the node name Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20201027164511.476312-6-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit eaf61213901d2b9a4040f217498ecbea61f8e0a5 Author: Vinod Koul Date: Tue Oct 27 22:15:06 2020 +0530 arm64: dts: msm8916: Fix dma node name DMA controller binding describes the node name should be dma-controller and not dma, so fix the node name Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20201027164511.476312-5-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit 6bd61ef47eaec2775b8444dde80ae672bb797717 Author: Vinod Koul Date: Tue Oct 27 22:15:05 2020 +0530 arm64: dts: qcs404: Fix dma node name DMA controller binding describes the node name should be dma-controller and not dma, so fix the node name Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20201027164511.476312-4-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit b831fba3b0e184930747761adc9fdaccc3c49ff4 Author: Vinod Koul Date: Tue Oct 27 22:15:04 2020 +0530 arm64: dts: sdm630: Fix dma node name DMA controller binding describes the node name should be dma-controller and not dma, so fix the node name Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20201027164511.476312-3-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit a8fbc8bd8d1f8d4143c164e5f31704dd37baa386 Author: Vinod Koul Date: Tue Oct 27 22:15:03 2020 +0530 arm64: dts: sdm845: Fix dma node name DMA controller binding describes the node name should be dma-controller and not dma, so fix the node name Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20201027164511.476312-2-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit 2704ff5f02c884bd4b774da089d139f17f8e32ae Author: Konrad Dybcio Date: Mon Oct 5 17:03:11 2020 +0200 arm64: dts: qcom: Add support for Microsoft Lumia 950 XL (Cityman) Add device tree support for Microsoft Lumia 950 XL smartphone. It is based on the msm8994 chipset and is able to boot Linux using a custom EDK2 implementation. EL2 core startup is possible with spin-table, but for now, we'll stick with PSCI. The board currently supports: * Screen console via EFIFB * SDHCI * I2C * UART * PSCI core bringup Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20201005150313.149754-12-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit 1865bb197843e19e3a0f949a3c88b06a8d7abd94 Author: Konrad Dybcio Date: Mon Oct 5 17:03:10 2020 +0200 arm64: dts: qcom: msm8992: Add USB support This is a very basic dwc3 configuration (no PHYs yet), but it works. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20201005150313.149754-11-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit d9be0bc95f25d49ae260b9ad8ad9040931758fbd Author: Konrad Dybcio Date: Mon Oct 5 17:03:09 2020 +0200 arm64: dts: qcom: msm8994: Add USB support This is a very basic dwc3 configuration (no PHYs yet), but it works. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20201005150313.149754-10-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit a0b3e3629748f1535f4945f213134182fc008160 Author: Konrad Dybcio Date: Mon Oct 5 17:03:08 2020 +0200 arm64: dts: qcom: talkman: Add Synaptics RMI4 touchscreen This adds touchscreen capabilities to the Lumia 950. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20201005150313.149754-9-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit b97def9c0557a9354c718b13d09a81f26e128129 Author: Konrad Dybcio Date: Mon Oct 5 17:03:07 2020 +0200 arm64: dts: qcom: msm8992: Add BLSP_I2C1 support This will be required to support touchscreen on Lumia devices. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20201005150313.149754-8-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit f3d1939f115d696acf61f24d97443b42408d2449 Author: Konrad Dybcio Date: Mon Oct 5 17:03:06 2020 +0200 arm64: dts: qcom: msm8994: Add SDHCI2 node Add SDHCI2 to enable use of uSD cards on msm8994. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20201005150313.149754-7-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit 211ea9b34919bfbab208073a675d15ec68156dc9 Author: Konrad Dybcio Date: Mon Oct 5 17:03:05 2020 +0200 arm64: dts: qcom: msm8992: Add support for SDHCI2 This will let us use SD cards on our devices. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20201005150313.149754-6-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit 8939304880dee9c57b7bd41e4679d4741a85d6e7 Author: Konrad Dybcio Date: Mon Oct 5 17:03:04 2020 +0200 arm64: dts: qcom: pm8994: Fix up spmi-gpio node Add a common compatible and switch to gpio-ranges. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20201005150313.149754-5-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit 0763f58540419874ebeb25eb9869638666d62ed4 Author: Konrad Dybcio Date: Mon Oct 5 17:03:03 2020 +0200 arm64: dts: qcom: pm8994: Add thermal-zones for temp alarm This will shut down the platform in case the PMIC overheats. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20201005150313.149754-4-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit 4778b2f1a3f0c97caa184a695b308b874cb2d3cd Author: Konrad Dybcio Date: Mon Oct 5 17:03:02 2020 +0200 arm64: dts: qcom: pm8994: Add temperature alarm node Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20201005150313.149754-3-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit 183d4cafa711acd4ca2b1d682c8b867d549f2bc4 Author: Konrad Dybcio Date: Mon Oct 5 17:03:01 2020 +0200 arm64: dts: qcom: pm8994: Add VADC node Add VADC note and some of its channels to allow for voltage/temperature reading. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20201005150313.149754-2-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit 2315ae70af95589e67d8d119c3b3fcaa8746dae8 Author: Akhil P Oommen Date: Fri Oct 30 16:17:11 2020 +0530 arm64: dts: qcom: sc7180: Add gpu cooling support Add cooling-cells property and the cooling maps for the gpu tzones to support GPU cooling. Signed-off-by: Akhil P Oommen Reviewed-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/1604054832-3114-2-git-send-email-akhilpo@codeaurora.org Signed-off-by: Bjorn Andersson commit ba73ce9d9ac581c152be92bf22d08d7b78531583 Author: Matthias Kaehlcke Date: Fri Nov 6 14:01:32 2020 -0800 arm64: dts: qcom: sc7180: Add sc7180-lazor-r2/r3 Add configs for lazor rev2 and rev3. There are no relevant deltas between rev1 and rev2, so just add the rev2 compatible string to the rev1 config. One important delta in rev3 is a switch of the power supply for the onboard USB hub from 'pp3300_l7c' to 'pp3300_a' + a load switch. The actual regulator switch is done by the patch 'arm64: dts: qcom: sc7180-trogdor: Make pp3300_a the default supply for pp3300_hub', since it affects the entire trogdor platform. Here we only add the .dts files for lazor rev3 and replace the generic compatible entries in the rev1 .dts files. Reviewed-by: Douglas Anderson Signed-off-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/20201106140125.v3.1.I5a75056d573808f40fed22ab7d28ea6be5819f84@changeid Signed-off-by: Bjorn Andersson commit 77e9c198b1558f51092eaaaed59ec68a552f990e Author: Zhen Lei Date: Fri Oct 16 17:08:33 2020 +0800 arm64: dts: qcom: clear the warnings caused by empty dma-ranges The scripts/dtc/checks.c requires that the node have empty "dma-ranges" property must have the same "#address-cells" and "#size-cells" values as the parent node. Otherwise, the following warnings is reported: arch/arm64/boot/dts/qcom/ipq6018.dtsi:185.3-14: Warning \ (dma_ranges_format): /soc:dma-ranges: empty "dma-ranges" property but \ its #address-cells (1) differs from / (2) arch/arm64/boot/dts/qcom/ipq6018.dtsi:185.3-14: Warning \ (dma_ranges_format): /soc:dma-ranges: empty "dma-ranges" property but \ its #size-cells (1) differs from / (2) Arnd Bergmann figured out why it's necessary: Also note that the #address-cells=<1> means that any device under this bus is assumed to only support 32-bit addressing, and DMA will have to go through a slow swiotlb in the absence of an IOMMU. Suggested-by: Arnd Bergmann Reviewed-by: Bjorn Andersson Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20201016090833.1892-3-thunder.leizhen@huawei.com Signed-off-by: Bjorn Andersson commit ef9a5d188d663753e73a3c8e8910ceab8e9305c4 Author: Sibi Sankar Date: Thu Oct 15 23:57:56 2020 +0530 arm64: dts: qcom: sc7180-trogdor: Fixup modem memory region The modem firmware memory requirements vary between 32M/140M on no-lte/lte skus respectively, so fixup the modem memory region to reflect the requirements. Reviewed-by: Evan Green Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/1602786476-27833-1-git-send-email-sibis@codeaurora.org Signed-off-by: Bjorn Andersson commit 876553576f27506760b44fbd7bb18a9cee650706 Author: Taniya Das Date: Sat Nov 7 00:08:27 2020 +0530 arm64: dts: sc7180: Add camera clock controller node Add the camera clock controller node supported on SC7180. Reviewed-by: Douglas Anderson Signed-off-by: Taniya Das Link: https://lore.kernel.org/r/1604687907-25712-1-git-send-email-tdas@codeaurora.org [bjorn: Dropped camcc include] Signed-off-by: Bjorn Andersson commit 7112d127984bd7b0c8ded7973b358829f16735f5 Author: Andrii Nakryiko Date: Tue Nov 10 20:06:45 2020 -0800 bpf: Compile out btf_parse_module() if module BTF is not enabled Make sure btf_parse_module() is compiled out if module BTFs are not enabled. Fixes: 36e68442d1af ("bpf: Load and verify kernel module BTFs") Reported-by: Stephen Rothwell Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201111040645.903494-1-andrii@kernel.org commit cb2b4e8f5ea69b6dc0a37ace8c6ffb1854c1f9e5 Author: Kaixu Xia Date: Sun Nov 8 00:52:00 2020 +0800 scsi: bnx2fc: Fix comparison to bool warning Fix the following coccicheck warning: ./drivers/scsi/bnx2fc/bnx2fc_fcoe.c:2089:5-23: WARNING: Comparison to bool ./drivers/scsi/bnx2fc/bnx2fc_fcoe.c:2187:5-23: WARNING: Comparison to bool Link: https://lore.kernel.org/r/1604767920-8361-1-git-send-email-kaixuxia@tencent.com Reported-by: Tosk Robot Acked-by: Saurav Kashyap Signed-off-by: Kaixu Xia Signed-off-by: Martin K. Petersen commit 44ff81f2995794982daf7b89a923c6335d57c469 Author: Vaibhav Gupta Date: Sat Nov 7 15:34:19 2020 +0530 scsi: isci: Don't use PCI helper functions PCI helper functions such as pci_enable/disable_device(), pci_save/restore_state(), pci_set_power_state(), etc. were used by the legacy framework to perform standard operations related to PCI PM. This driver is using the generic framework and thus calls for those functions should be dropped as those tasks are now performed by the PCI core. Link: https://lore.kernel.org/r/20201107100420.149521-1-vaibhavgupta40@gmail.com Acked-by: Artur Paszkiewicz Signed-off-by: Vaibhav Gupta Signed-off-by: Martin K. Petersen commit 638e6271cac2d6eba8d5d6cfd6a6ae77715a8cf6 Author: Stanley Chu Date: Thu Oct 29 19:57:50 2020 +0800 scsi: ufs-mediatek: Add HS-G4 support Provide HS-G4 support in MediaTek UFS platforms. To support HS-G4, introduce mechanism to get the MediaTek UFS controller version. With such information, driver can make right decision to apply different configurations in different controllers. Link: https://lore.kernel.org/r/20201029115750.24391-7-stanley.chu@mediatek.com Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 801909ac97530062c3de6bfdb1d7e08f3c7de8ce Author: Stanley Chu Date: Thu Oct 29 19:57:49 2020 +0800 scsi: ufs: Add enums for UniPro version higher than 1.6 Some vendors need newer UniPro version to decide if some features can be enabled or not. Simply add missing enums for the latest UniPro versions. Link: https://lore.kernel.org/r/20201029115750.24391-6-stanley.chu@mediatek.com Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit bf8fab86ab791cd24572eaf05f23af9b99dad43c Author: Stanley Chu Date: Thu Oct 29 19:57:48 2020 +0800 scsi: ufs-mediatek: Support option to disable auto-hibern8 Support an option to allow users to disable auto-hibern8 feature. Instead, enable hibern8-during-clk-gating feature to keep similar power consumption. Link: https://lore.kernel.org/r/20201029115750.24391-5-stanley.chu@mediatek.com Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit ac8c2459091cd0e2bf226278d7b332e81c4c855a Author: Stanley Chu Date: Thu Oct 29 19:57:47 2020 +0800 scsi: ufs-mediatek: Decouple features from platform bindings UFS proprietary features (including features introduced later) in MediaTek UFS platforms have complicated combinations among different platforms. To ease code readability and maintenance, decouple all proprietary features from platform bindings. Each feature would be enabled only if specific property string is defined in device tree node. Link: https://lore.kernel.org/r/20201029115750.24391-4-stanley.chu@mediatek.com Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit cf137b3ea49a04e0c843b12674afa4b1d23e827f Author: Stanley Chu Date: Thu Oct 29 19:57:46 2020 +0800 scsi: ufs-mediatek: Support VA09 regulator operations Some MediaTek UFS platforms need to control VA09 power specifically. Provide such control according to the device tree binding. Link: https://lore.kernel.org/r/20201029115750.24391-3-stanley.chu@mediatek.com Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit a004147a33199c660bbb203f11a82703459bf9f9 Author: Stanley Chu Date: Thu Oct 29 19:57:45 2020 +0800 scsi: ufs-mediatek: Assign arguments with correct type In ufs_mtk_unipro_set_lpm(), use specific unsigned values as the argument to invoke ufshcd_dme_set(). At the same time, change the name of ufs_mtk_unipro_set_pm() to ufs_mtk_unipro_set_lpm() to align the naming convention in MediaTek UFS driver. Link: https://lore.kernel.org/r/20201029115750.24391-2-stanley.chu@mediatek.com Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 0d88232010d5f40a8a31ff7b454e3f2594fd047f Author: Hannes Reinecke Date: Wed Sep 30 10:02:56 2020 +0200 scsi: core: Return BLK_STS_AGAIN for ALUA transitioning Whenever we encounter a sense code of ALUA transitioning in scsi_io_completion() it means that the SCSI midlayer ran out of retries trying to wait for ALUA transitioning. In these cases we should be passing up the error, but signalling that the I/O might be retried, preferably on another path. So return BLK_STS_AGAIN in these cases. [mkp: typo + fallthrough] Link: https://lore.kernel.org/r/20200930080256.90964-5-hare@suse.de Reviewed-by: Ewan D. Milne Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit fb908850ece3bc93a9d276f6dd8505d824b2789c Author: Hannes Reinecke Date: Wed Sep 30 10:02:55 2020 +0200 scsi: scsi_dh_alua: Set 'transitioning' state on Unit Attention We should be setting the 'transitioning' ALUA state once we get a Unit Attention indicating the array is in transitioning. There are arrays which cannot respond to an RTPG while in transitioning, and others have issues correctly reporting the state. So better to set the state during Unit Attention handling and wait for TUR / RTPG to run its course. Link: https://lore.kernel.org/r/20200930080256.90964-4-hare@suse.de Reviewed-by: Ewan D. Milne Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 268940b80fa4096397fd0a28e6ad807e64120215 Author: Hannes Reinecke Date: Wed Sep 30 10:02:54 2020 +0200 scsi: scsi_dh_alua: Return BLK_STS_AGAIN for ALUA transitioning state When the ALUA state indicates transitioning we should not retry the command immediately, but rather complete the command with BLK_STS_AGAIN to signal the completion handler that it might be retried. This allows multipathing to redirect the command to another path if possible, and avoid stalls during lengthy transitioning times. Link: https://lore.kernel.org/r/20200930080256.90964-3-hare@suse.de Reviewed-by: Ewan D. Milne Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit e21ee5a6b9c9d30fd07ce5bd3e4a5668a03af6d9 Author: Hannes Reinecke Date: Wed Sep 30 10:02:53 2020 +0200 scsi: block: Return status code in blk_mq_end_request() blk_mq_end_request() will use the block status returned from queue_rq() as argument, except in one instance in blk_mq_dispatch_rq_list(), where the generic BLK_STS_IOERR is used. Link: https://lore.kernel.org/r/20200930080256.90964-2-hare@suse.de Reviewed-by: Ewan D. Milne Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit e9326b5a6f5b434af1889a7efa64dd9a738ef90e Author: Mike Christie Date: Wed Nov 4 14:27:46 2020 -0600 scsi: MAINTAINERS: Make Bodo target_core_user maintainer Bodo knows the code better than me now, has time to review patches and is excellent at it, and has lots of ideas for how to make the driver better, so this patch adds him as the maintainer. There was no entry in there already. Andy had posted on the list here: https://www.spinics.net/lists/target-devel/msg14690.html when it got transitioned to me. I added an entry because several companies used it and I thought it would be easy for them to find Bodo. Link: https://lore.kernel.org/r/1604521666-16573-1-git-send-email-michael.christie@oracle.com Cc: Bodo Stroesser Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 6c22079e9f369e513d8195f96db99a4fbb1525a8 Author: Lee Jones Date: Mon Nov 2 14:23:58 2020 +0000 scsi: dc395x: Mark 's_stat2' as __maybe_unused It's only utilised when debugging is enabled. Fixes the following W=1 kernel build warning(s): drivers/scsi/dc395x.c: In function ‘start_scsi’: drivers/scsi/dc395x.c:1359:6: warning: variable ‘s_stat2’ set but not used [-Wunused-but-set-variable] Link: https://lore.kernel.org/r/20201102142359.561122-19-lee.jones@linaro.org Cc: Oliver Neukum Cc: Ali Akcaagac Cc: Jamie Lenehan Cc: "C.L. Huang" Cc: Erich Chen Cc: Kurt Garloff Cc: dc395x@twibble.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 67056d90f13547558a3d7661fd69acd1463146de Author: Lee Jones Date: Mon Nov 2 14:23:57 2020 +0000 scsi: dc395x: Remove a few unused variables Fixes the following W=1 kernel build warning(s): drivers/scsi/dc395x.c: In function ‘data_io_transfer’: drivers/scsi/dc395x.c:2400:16: warning: variable ‘data2’ set but not used [-Wunused-but-set-variable] drivers/scsi/dc395x.c:2400:6: warning: variable ‘data’ set but not used [-Wunused-but-set-variable] drivers/scsi/dc395x.c: In function ‘reselect’: drivers/scsi/dc395x.c:2992:5: warning: variable ‘arblostflag’ set but not used [-Wunused-but-set-variable] drivers/scsi/dc395x.c: In function ‘doing_srb_done’: drivers/scsi/dc395x.c:3393:28: warning: variable ‘dir’ set but not used [-Wunused-but-set-variable] Link: https://lore.kernel.org/r/20201102142359.561122-18-lee.jones@linaro.org Cc: Oliver Neukum Cc: Ali Akcaagac Cc: Jamie Lenehan Cc: "C.L. Huang" Cc: Erich Chen Cc: Kurt Garloff Cc: dc395x@twibble.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 90ab11234d7995530dfa2a2b072150fd6e5fc1d2 Author: Lee Jones Date: Mon Nov 2 14:23:56 2020 +0000 scsi: advansys: Relocate or remove unused variables Fixes the following W=1 kernel build warning(s): drivers/scsi/advansys.c: In function ‘asc_prt_asc_board_eeprom’: drivers/scsi/advansys.c:2879:15: warning: variable ‘asc_dvc_varp’ set but not used [-Wunused-but-set-variable] drivers/scsi/advansys.c: In function ‘asc_prt_driver_conf’: drivers/scsi/advansys.c:3174:6: warning: variable ‘chip_scsi_id’ set but not used [-Wunused-but-set-variable] drivers/scsi/advansys.c: In function ‘AdvISR’: drivers/scsi/advansys.c:6114:9: warning: variable ‘target_bit’ set but not used [-Wunused-but-set-variable] Link: https://lore.kernel.org/r/20201102142359.561122-17-lee.jones@linaro.org Cc: Matthew Wilcox Cc: Hannes Reinecke Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit bf7e38aa0ee1f06130fb3019f42d59b767da73a9 Author: Lee Jones Date: Mon Nov 2 14:23:55 2020 +0000 scsi: esas2r: esas2r_main: Demote non-conformant kernel-doc header Fixes the following W=1 kernel build warning(s): drivers/scsi/esas2r/esas2r_main.c:911: warning: Function parameter or member 'a' not described in 'esas2r_check_active_queue' drivers/scsi/esas2r/esas2r_main.c:911: warning: Function parameter or member 'abort_request' not described in 'esas2r_check_active_queue' drivers/scsi/esas2r/esas2r_main.c:911: warning: Function parameter or member 'cmd' not described in 'esas2r_check_active_queue' drivers/scsi/esas2r/esas2r_main.c:911: warning: Function parameter or member 'queue' not described in 'esas2r_check_active_queue' Link: https://lore.kernel.org/r/20201102142359.561122-16-lee.jones@linaro.org Cc: Bradley Grove Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit d3cb79fcf943040394073de14d989a3547974d7f Author: Lee Jones Date: Mon Nov 2 14:23:54 2020 +0000 scsi: lpfc: lpfc_nvmet: Fix-up some formatting and doc-rot issues Fixes the following W=1 kernel build warning(s): drivers/scsi/lpfc/lpfc_nvmet.c:386: warning: Function parameter or member 'ctx_buf' not described in 'lpfc_nvmet_ctxbuf_post' drivers/scsi/lpfc/lpfc_nvmet.c:386: warning: Excess function parameter 'ctxp' description in 'lpfc_nvmet_ctxbuf_post' drivers/scsi/lpfc/lpfc_nvmet.c:386: warning: Excess function parameter 'mp' description in 'lpfc_nvmet_ctxbuf_post' drivers/scsi/lpfc/lpfc_nvmet.c:1310: warning: Function parameter or member 'targetport' not described in 'lpfc_nvmet_ls_req' drivers/scsi/lpfc/lpfc_nvmet.c:1310: warning: Function parameter or member 'hosthandle' not described in 'lpfc_nvmet_ls_req' drivers/scsi/lpfc/lpfc_nvmet.c:1310: warning: Function parameter or member 'pnvme_lsreq' not described in 'lpfc_nvmet_ls_req' drivers/scsi/lpfc/lpfc_nvmet.c:1350: warning: Function parameter or member 'hosthandle' not described in 'lpfc_nvmet_ls_abort' drivers/scsi/lpfc/lpfc_nvmet.c:1350: warning: Function parameter or member 'pnvme_lsreq' not described in 'lpfc_nvmet_ls_abort' drivers/scsi/lpfc/lpfc_nvmet.c:3607: warning: Function parameter or member 'phba' not described in 'lpfc_nvmet_invalidate_host' drivers/scsi/lpfc/lpfc_nvmet.c:3607: warning: Function parameter or member 'ndlp' not described in 'lpfc_nvmet_invalidate_host' Link: https://lore.kernel.org/r/20201102142359.561122-15-lee.jones@linaro.org Cc: James Smart Cc: Dick Kennedy Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 6abf98de6f8ad4f078f4845589e8d7f024a851bf Author: Lee Jones Date: Mon Nov 2 14:23:53 2020 +0000 scsi: esas2r: esas2r_int: Add brackets around potentially empty if()s Fixes the following W=1 kernel build warning(s): drivers/scsi/esas2r/esas2r_int.c: In function ‘esas2r_doorbell_interrupt’: drivers/scsi/esas2r/esas2r_int.c:692:22: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] drivers/scsi/esas2r/esas2r_int.c: In function ‘esas2r_send_reset_ae’: drivers/scsi/esas2r/esas2r_int.c:868:44: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body] Link: https://lore.kernel.org/r/20201102142359.561122-14-lee.jones@linaro.org Cc: Bradley Grove Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 3e7491701a3323659d2579f785cda5240351d6f3 Author: Lee Jones Date: Mon Nov 2 14:23:52 2020 +0000 scsi: lpfc: lpfc_nvme: Fix some kernel-doc related issues Fixes the following W=1 kernel build warning(s): drivers/scsi/lpfc/lpfc_nvme.c: In function ‘lpfc_nvme_ls_abort’: drivers/scsi/lpfc/lpfc_nvme.c:943:19: warning: variable ‘phba’ set but not used [-Wunused-but-set-variable] drivers/scsi/lpfc/lpfc_nvme.c:256: warning: Excess function parameter 'lpfc_pnvme' description in 'lpfc_nvme_create_queue' drivers/scsi/lpfc/lpfc_nvme.c:804: warning: Function parameter or member 'pnvme_rport' not described in 'lpfc_nvme_ls_req' drivers/scsi/lpfc/lpfc_nvme.c:804: warning: Excess function parameter 'nvme_rport' description in 'lpfc_nvme_ls_req' drivers/scsi/lpfc/lpfc_nvme.c:1312: warning: Function parameter or member 'lpfc_ncmd' not described in 'lpfc_nvme_prep_io_cmd' drivers/scsi/lpfc/lpfc_nvme.c:1312: warning: Excess function parameter 'lpfcn_cmd' description in 'lpfc_nvme_prep_io_cmd' drivers/scsi/lpfc/lpfc_nvme.c:1416: warning: Function parameter or member 'lpfc_ncmd' not described in 'lpfc_nvme_prep_io_dma' drivers/scsi/lpfc/lpfc_nvme.c:1416: warning: Excess function parameter 'lpfcn_cmd' description in 'lpfc_nvme_prep_io_dma' drivers/scsi/lpfc/lpfc_nvme.c:1594: warning: bad line: indicated in @lpfc_nvme_rport. drivers/scsi/lpfc/lpfc_nvme.c:1605: warning: Function parameter or member 'pnvme_lport' not described in 'lpfc_nvme_fcp_io_submit' drivers/scsi/lpfc/lpfc_nvme.c:1605: warning: Function parameter or member 'pnvme_rport' not described in 'lpfc_nvme_fcp_io_submit' drivers/scsi/lpfc/lpfc_nvme.c:1605: warning: Function parameter or member 'pnvme_fcreq' not described in 'lpfc_nvme_fcp_io_submit' drivers/scsi/lpfc/lpfc_nvme.c:1605: warning: Excess function parameter 'lpfc_pnvme' description in 'lpfc_nvme_fcp_io_submit' drivers/scsi/lpfc/lpfc_nvme.c:1605: warning: Excess function parameter 'lpfc_nvme_lport' description in 'lpfc_nvme_fcp_io_submit' drivers/scsi/lpfc/lpfc_nvme.c:1605: warning: Excess function parameter 'lpfc_nvme_rport' description in 'lpfc_nvme_fcp_io_submit' drivers/scsi/lpfc/lpfc_nvme.c:1605: warning: Excess function parameter 'lpfc_nvme_fcreq' description in 'lpfc_nvme_fcp_io_submit' drivers/scsi/lpfc/lpfc_nvme.c:1852: warning: Function parameter or member 'abts_cmpl' not described in 'lpfc_nvme_abort_fcreq_cmpl' drivers/scsi/lpfc/lpfc_nvme.c:1852: warning: Excess function parameter 'rspiocb' description in 'lpfc_nvme_abort_fcreq_cmpl' drivers/scsi/lpfc/lpfc_nvme.c:1888: warning: Function parameter or member 'pnvme_lport' not described in 'lpfc_nvme_fcp_abort' drivers/scsi/lpfc/lpfc_nvme.c:1888: warning: Function parameter or member 'pnvme_rport' not described in 'lpfc_nvme_fcp_abort' drivers/scsi/lpfc/lpfc_nvme.c:1888: warning: Function parameter or member 'pnvme_fcreq' not described in 'lpfc_nvme_fcp_abort' drivers/scsi/lpfc/lpfc_nvme.c:1888: warning: Excess function parameter 'lpfc_pnvme' description in 'lpfc_nvme_fcp_abort' drivers/scsi/lpfc/lpfc_nvme.c:1888: warning: Excess function parameter 'lpfc_nvme_lport' description in 'lpfc_nvme_fcp_abort' drivers/scsi/lpfc/lpfc_nvme.c:1888: warning: Excess function parameter 'lpfc_nvme_rport' description in 'lpfc_nvme_fcp_abort' drivers/scsi/lpfc/lpfc_nvme.c:1888: warning: Excess function parameter 'lpfc_nvme_fcreq' description in 'lpfc_nvme_fcp_abort' drivers/scsi/lpfc/lpfc_nvme.c:2089: warning: Function parameter or member 'ndlp' not described in 'lpfc_get_nvme_buf' drivers/scsi/lpfc/lpfc_nvme.c:2089: warning: Function parameter or member 'idx' not described in 'lpfc_get_nvme_buf' drivers/scsi/lpfc/lpfc_nvme.c:2089: warning: Function parameter or member 'expedite' not described in 'lpfc_get_nvme_buf' drivers/scsi/lpfc/lpfc_nvme.c:2193: warning: Function parameter or member 'vport' not described in 'lpfc_nvme_create_localport' drivers/scsi/lpfc/lpfc_nvme.c:2326: warning: Function parameter or member 'vport' not described in 'lpfc_nvme_destroy_localport' drivers/scsi/lpfc/lpfc_nvme.c:2326: warning: Excess function parameter 'pnvme' description in 'lpfc_nvme_destroy_localport' drivers/scsi/lpfc/lpfc_nvme.c:2544: warning: Function parameter or member 'vport' not described in 'lpfc_nvme_rescan_port' drivers/scsi/lpfc/lpfc_nvme.c:2544: warning: Function parameter or member 'ndlp' not described in 'lpfc_nvme_rescan_port' Link: https://lore.kernel.org/r/20201102142359.561122-13-lee.jones@linaro.org Cc: James Smart Cc: Dick Kennedy Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit d23ec0b610e5cdf55853472157768d4412b3d13b Author: Lee Jones Date: Mon Nov 2 14:23:51 2020 +0000 scsi: ufs: ufshcd: Fix some function doc-rot Fixes the following W=1 kernel build warning(s): drivers/scsi/ufs/ufshcd.c:6603: warning: Function parameter or member 'hba' not described in 'ufshcd_try_to_abort_task' drivers/scsi/ufs/ufshcd.c:6603: warning: Function parameter or member 'tag' not described in 'ufshcd_try_to_abort_task' drivers/scsi/ufs/ufshcd.c:6603: warning: Excess function parameter 'cmd' description in 'ufshcd_try_to_abort_task' Link: https://lore.kernel.org/r/20201102142359.561122-12-lee.jones@linaro.org Cc: Alim Akhtar Cc: Avri Altman Cc: Santosh Yaraganavi Cc: Vinayak Holikatti Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 74d1f928162a217f5dc034b98deff78490300479 Author: Lee Jones Date: Mon Nov 2 14:23:50 2020 +0000 scsi: lpfc: lpfc_nvme: Remove unused variable 'phba' Fixes the following W=1 kernel build warning(s): drivers/scsi/lpfc/lpfc_nvme.c: In function ‘lpfc_nvme_ls_abort’: drivers/scsi/lpfc/lpfc_nvme.c:943:19: warning: variable ‘phba’ set but not used [-Wunused-but-set-variable] Link: https://lore.kernel.org/r/20201102142359.561122-11-lee.jones@linaro.org Cc: James Smart Cc: Dick Kennedy Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 433e07e08c638827e99923192e91c9be8912b5e0 Author: Lee Jones Date: Mon Nov 2 14:23:49 2020 +0000 scsi: esas2r: esas2r_init: Place brackets around a potentially empty if() Fixes the following W=1 kernel build warning(s): drivers/scsi/esas2r/esas2r_init.c: In function ‘esas2r_init_adapter’: drivers/scsi/esas2r/esas2r_init.c:418:41: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body] Link: https://lore.kernel.org/r/20201102142359.561122-10-lee.jones@linaro.org Cc: Bradley Grove Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 9a5cf98d7ee69e7705705b40b5d947a252c134ac Author: Lee Jones Date: Mon Nov 2 14:23:48 2020 +0000 scsi: esas2r: esas2r_disc: Place brackets around a potentially empty if() Fixes the following W=1 kernel build warning(s): drivers/scsi/esas2r/esas2r_disc.c: In function ‘esas2r_disc_get_phys_addr’: drivers/scsi/esas2r/esas2r_disc.c:1035:17: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] Link: https://lore.kernel.org/r/20201102142359.561122-9-lee.jones@linaro.org Cc: Bradley Grove Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit ea085dab6b9f220f0455f27e64af00deed102976 Author: Lee Jones Date: Mon Nov 2 14:23:47 2020 +0000 scsi: lpfc: lpfc_bsg: Provide correct documentation for a bunch of functions Fixes the following W=1 kernel build warning(s): drivers/scsi/lpfc/lpfc_bsg.c:917: warning: Function parameter or member 'phba' not described in 'lpfc_bsg_ct_unsol_event' drivers/scsi/lpfc/lpfc_bsg.c:917: warning: Function parameter or member 'pring' not described in 'lpfc_bsg_ct_unsol_event' drivers/scsi/lpfc/lpfc_bsg.c:1484: warning: Function parameter or member 'cmp' not described in 'lpfc_issue_ct_rsp' drivers/scsi/lpfc/lpfc_bsg.c:3900: warning: Function parameter or member 'job' not described in 'lpfc_bsg_sli_cfg_read_cmd_ext' drivers/scsi/lpfc/lpfc_bsg.c:3900: warning: Function parameter or member 'dmabuf' not described in 'lpfc_bsg_sli_cfg_read_cmd_ext' drivers/scsi/lpfc/lpfc_bsg.c:3900: warning: Excess function parameter 'mb' description in 'lpfc_bsg_sli_cfg_read_cmd_ext' drivers/scsi/lpfc/lpfc_bsg.c:3900: warning: Excess function parameter 'dmabuff' description in 'lpfc_bsg_sli_cfg_read_cmd_ext' drivers/scsi/lpfc/lpfc_bsg.c:4088: warning: Function parameter or member 'job' not described in 'lpfc_bsg_sli_cfg_write_cmd_ext' drivers/scsi/lpfc/lpfc_bsg.c:4088: warning: Function parameter or member 'nemb_tp' not described in 'lpfc_bsg_sli_cfg_write_cmd_ext' drivers/scsi/lpfc/lpfc_bsg.c:4088: warning: Function parameter or member 'dmabuf' not described in 'lpfc_bsg_sli_cfg_write_cmd_ext' drivers/scsi/lpfc/lpfc_bsg.c:4088: warning: Excess function parameter 'mb' description in 'lpfc_bsg_sli_cfg_write_cmd_ext' drivers/scsi/lpfc/lpfc_bsg.c:4088: warning: Excess function parameter 'dmabuff' description in 'lpfc_bsg_sli_cfg_write_cmd_ext' drivers/scsi/lpfc/lpfc_bsg.c:4254: warning: Function parameter or member 'job' not described in 'lpfc_bsg_handle_sli_cfg_mbox' drivers/scsi/lpfc/lpfc_bsg.c:4254: warning: Function parameter or member 'dmabuf' not described in 'lpfc_bsg_handle_sli_cfg_mbox' drivers/scsi/lpfc/lpfc_bsg.c:4254: warning: Excess function parameter 'mb' description in 'lpfc_bsg_handle_sli_cfg_mbox' drivers/scsi/lpfc/lpfc_bsg.c:4254: warning: Excess function parameter 'dmabuff' description in 'lpfc_bsg_handle_sli_cfg_mbox' drivers/scsi/lpfc/lpfc_bsg.c:4403: warning: Function parameter or member 'job' not described in 'lpfc_bsg_read_ebuf_get' drivers/scsi/lpfc/lpfc_bsg.c:4403: warning: Excess function parameter 'dmabuf' description in 'lpfc_bsg_read_ebuf_get' drivers/scsi/lpfc/lpfc_bsg.c:4474: warning: Function parameter or member 'job' not described in 'lpfc_bsg_write_ebuf_set' drivers/scsi/lpfc/lpfc_bsg.c:4600: warning: Function parameter or member 'job' not described in 'lpfc_bsg_handle_sli_cfg_ebuf' drivers/scsi/lpfc/lpfc_bsg.c:4600: warning: Function parameter or member 'dmabuf' not described in 'lpfc_bsg_handle_sli_cfg_ebuf' drivers/scsi/lpfc/lpfc_bsg.c:4600: warning: Excess function parameter 'mb' description in 'lpfc_bsg_handle_sli_cfg_ebuf' drivers/scsi/lpfc/lpfc_bsg.c:4600: warning: Excess function parameter 'dmabuff' description in 'lpfc_bsg_handle_sli_cfg_ebuf' drivers/scsi/lpfc/lpfc_bsg.c:4645: warning: Function parameter or member 'job' not described in 'lpfc_bsg_handle_sli_cfg_ext' drivers/scsi/lpfc/lpfc_bsg.c:4645: warning: Function parameter or member 'dmabuf' not described in 'lpfc_bsg_handle_sli_cfg_ext' drivers/scsi/lpfc/lpfc_bsg.c:4645: warning: Excess function parameter 'mb' description in 'lpfc_bsg_handle_sli_cfg_ext' drivers/scsi/lpfc/lpfc_bsg.c:4645: warning: Excess function parameter 'dmabuff' description in 'lpfc_bsg_handle_sli_cfg_ext' drivers/scsi/lpfc/lpfc_bsg.c:4723: warning: Function parameter or member 'job' not described in 'lpfc_bsg_issue_mbox' drivers/scsi/lpfc/lpfc_bsg.c:4723: warning: Excess function parameter 'mb' description in 'lpfc_bsg_issue_mbox' Link: https://lore.kernel.org/r/20201102142359.561122-8-lee.jones@linaro.org Cc: James Smart Cc: Dick Kennedy Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit e61e07409cf7dbdc532aeb39706f4de04f0aee2e Author: Lee Jones Date: Mon Nov 2 14:23:46 2020 +0000 scsi: lpfc: lpfc_debugfs: Fix a couple of function documentation issues Fixes the following W=1 kernel build warning(s): drivers/scsi/lpfc/lpfc_debugfs.c:4204: warning: Function parameter or member 'len' not described in 'lpfc_idiag_queacc_read_qe' drivers/scsi/lpfc/lpfc_debugfs.c:4781: warning: Function parameter or member 'ctlregid' not described in 'lpfc_idiag_ctlacc_read_reg' drivers/scsi/lpfc/lpfc_debugfs.c:4781: warning: Excess function parameter 'drbregid' description in 'lpfc_idiag_ctlacc_read_reg' Link: https://lore.kernel.org/r/20201102142359.561122-7-lee.jones@linaro.org Cc: James Smart Cc: Dick Kennedy Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit a738bd9bbe53c1a9b5134845af16e0fedf9ab2f8 Author: Lee Jones Date: Mon Nov 2 14:23:45 2020 +0000 scsi: lpfc: lpfc_attr: Fix-up a bunch of kernel-doc misdemeanours Fixes the following W=1 kernel build warning(s): from drivers/scsi/lpfc/lpfc_attr.c:26: inlined from ‘lpfc_stat_data_ctrl_store’ at drivers/scsi/lpfc/lpfc_attr.c:4165:3: drivers/scsi/lpfc/lpfc_attr.c:2537: warning: Function parameter or member 'attr' not described in 'lpfc_vport_param_init' drivers/scsi/lpfc/lpfc_attr.c:2537: warning: Function parameter or member 'default' not described in 'lpfc_vport_param_init' drivers/scsi/lpfc/lpfc_attr.c:2537: warning: Function parameter or member 'minval' not described in 'lpfc_vport_param_init' drivers/scsi/lpfc/lpfc_attr.c:2537: warning: Function parameter or member 'maxval' not described in 'lpfc_vport_param_init' drivers/scsi/lpfc/lpfc_attr.c:2537: warning: Excess function parameter 'phba' description in 'lpfc_vport_param_init' drivers/scsi/lpfc/lpfc_attr.c:2537: warning: Excess function parameter 'val' description in 'lpfc_vport_param_init' drivers/scsi/lpfc/lpfc_attr.c:2792: warning: Function parameter or member 'dev' not described in 'lpfc_soft_wwpn_store' drivers/scsi/lpfc/lpfc_attr.c:2886: warning: Function parameter or member 'dev' not described in 'lpfc_soft_wwnn_store' drivers/scsi/lpfc/lpfc_attr.c:2886: warning: Function parameter or member 'attr' not described in 'lpfc_soft_wwnn_store' drivers/scsi/lpfc/lpfc_attr.c:2886: warning: Excess function parameter 'cdev' description in 'lpfc_soft_wwnn_store' drivers/scsi/lpfc/lpfc_attr.c:3224: warning: Function parameter or member 'vpt_wwpn' not described in 'lpfc_oas_lun_state_set' drivers/scsi/lpfc/lpfc_attr.c:3224: warning: Function parameter or member 'tgt_wwpn' not described in 'lpfc_oas_lun_state_set' drivers/scsi/lpfc/lpfc_attr.c:3224: warning: Function parameter or member 'pri' not described in 'lpfc_oas_lun_state_set' drivers/scsi/lpfc/lpfc_attr.c:3224: warning: Excess function parameter 'ndlp' description in 'lpfc_oas_lun_state_set' drivers/scsi/lpfc/lpfc_attr.c:3264: warning: Function parameter or member 'lun_pri' not described in 'lpfc_oas_lun_get_next' drivers/scsi/lpfc/lpfc_attr.c:3302: warning: Function parameter or member 'pri' not described in 'lpfc_oas_lun_state_change' drivers/scsi/lpfc/lpfc_attr.c:3376: warning: Function parameter or member 'count' not described in 'lpfc_oas_lun_store' drivers/scsi/lpfc/lpfc_attr.c:3835: warning: Function parameter or member 'vport' not described in 'lpfc_tgt_queue_depth_set' drivers/scsi/lpfc/lpfc_attr.c:3835: warning: Excess function parameter 'phba' description in 'lpfc_tgt_queue_depth_set' drivers/scsi/lpfc/lpfc_attr.c:4026: warning: Function parameter or member 'dev' not described in 'lpfc_topology_store' drivers/scsi/lpfc/lpfc_attr.c:4026: warning: Function parameter or member 'attr' not described in 'lpfc_topology_store' drivers/scsi/lpfc/lpfc_attr.c:4026: warning: Function parameter or member 'buf' not described in 'lpfc_topology_store' drivers/scsi/lpfc/lpfc_attr.c:4026: warning: Function parameter or member 'count' not described in 'lpfc_topology_store' drivers/scsi/lpfc/lpfc_attr.c:4026: warning: Excess function parameter 'phba' description in 'lpfc_topology_store' drivers/scsi/lpfc/lpfc_attr.c:4026: warning: Excess function parameter 'val' description in 'lpfc_topology_store' drivers/scsi/lpfc/lpfc_attr.c:4148: warning: Function parameter or member 'attr' not described in 'lpfc_stat_data_ctrl_store' drivers/scsi/lpfc/lpfc_attr.c:4302: warning: Function parameter or member 'attr' not described in 'lpfc_stat_data_ctrl_show' drivers/scsi/lpfc/lpfc_attr.c:4383: warning: Function parameter or member 'buf' not described in 'sysfs_drvr_stat_data_read' drivers/scsi/lpfc/lpfc_attr.c:4383: warning: Excess function parameter 'buff' description in 'sysfs_drvr_stat_data_read' drivers/scsi/lpfc/lpfc_attr.c:4476: warning: Function parameter or member 'dev' not described in 'lpfc_link_speed_store' drivers/scsi/lpfc/lpfc_attr.c:4476: warning: Function parameter or member 'attr' not described in 'lpfc_link_speed_store' drivers/scsi/lpfc/lpfc_attr.c:4476: warning: Function parameter or member 'buf' not described in 'lpfc_link_speed_store' drivers/scsi/lpfc/lpfc_attr.c:4476: warning: Function parameter or member 'count' not described in 'lpfc_link_speed_store' drivers/scsi/lpfc/lpfc_attr.c:4476: warning: Excess function parameter 'phba' description in 'lpfc_link_speed_store' drivers/scsi/lpfc/lpfc_attr.c:4476: warning: Excess function parameter 'val' description in 'lpfc_link_speed_store' drivers/scsi/lpfc/lpfc_attr.c:7117: warning: Function parameter or member 'verbose' not described in 'lpfc_hba_log_verbose_init' Link: https://lore.kernel.org/r/20201102142359.561122-6-lee.jones@linaro.org Cc: James Smart Cc: Dick Kennedy Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 9176ad27acac13c3254ef45581ffd4a41795a9b5 Author: Lee Jones Date: Mon Nov 2 14:23:44 2020 +0000 scsi: lpfc: lpfc_attr: Demote kernel-doc format for redefined functions Kernel-doc does not understand this use-case. Fixes the following W=1 kernel build warning(s): from drivers/scsi/lpfc/lpfc_attr.c:26: inlined from ‘lpfc_stat_data_ctrl_store’ at drivers/scsi/lpfc/lpfc_attr.c:4164:3: drivers/scsi/lpfc/lpfc_attr.c:2315: warning: Excess function parameter 'dev' description in 'lpfc_param_show' drivers/scsi/lpfc/lpfc_attr.c:2315: warning: Excess function parameter 'buf' description in 'lpfc_param_show' drivers/scsi/lpfc/lpfc_attr.c:2343: warning: Excess function parameter 'dev' description in 'lpfc_param_hex_show' drivers/scsi/lpfc/lpfc_attr.c:2343: warning: Excess function parameter 'buf' description in 'lpfc_param_hex_show' drivers/scsi/lpfc/lpfc_attr.c:2377: warning: Function parameter or member 'attr' not described in 'lpfc_param_init' drivers/scsi/lpfc/lpfc_attr.c:2377: warning: Function parameter or member 'default' not described in 'lpfc_param_init' drivers/scsi/lpfc/lpfc_attr.c:2377: warning: Function parameter or member 'minval' not described in 'lpfc_param_init' drivers/scsi/lpfc/lpfc_attr.c:2377: warning: Function parameter or member 'maxval' not described in 'lpfc_param_init' drivers/scsi/lpfc/lpfc_attr.c:2377: warning: Excess function parameter 'phba' description in 'lpfc_param_init' drivers/scsi/lpfc/lpfc_attr.c:2377: warning: Excess function parameter 'val' description in 'lpfc_param_init' drivers/scsi/lpfc/lpfc_attr.c:2414: warning: Function parameter or member 'attr' not described in 'lpfc_param_set' drivers/scsi/lpfc/lpfc_attr.c:2414: warning: Function parameter or member 'default' not described in 'lpfc_param_set' drivers/scsi/lpfc/lpfc_attr.c:2414: warning: Function parameter or member 'minval' not described in 'lpfc_param_set' drivers/scsi/lpfc/lpfc_attr.c:2414: warning: Function parameter or member 'maxval' not described in 'lpfc_param_set' drivers/scsi/lpfc/lpfc_attr.c:2414: warning: Excess function parameter 'phba' description in 'lpfc_param_set' drivers/scsi/lpfc/lpfc_attr.c:2414: warning: Excess function parameter 'val' description in 'lpfc_param_set' drivers/scsi/lpfc/lpfc_attr.c:2454: warning: Excess function parameter 'dev' description in 'lpfc_param_store' drivers/scsi/lpfc/lpfc_attr.c:2454: warning: Excess function parameter 'buf' description in 'lpfc_param_store' drivers/scsi/lpfc/lpfc_attr.c:2454: warning: Excess function parameter 'count' description in 'lpfc_param_store' drivers/scsi/lpfc/lpfc_attr.c:2478: warning: Excess function parameter 'dev' description in 'lpfc_vport_param_show' drivers/scsi/lpfc/lpfc_attr.c:2478: warning: Excess function parameter 'buf' description in 'lpfc_vport_param_show' drivers/scsi/lpfc/lpfc_attr.c:2503: warning: Excess function parameter 'dev' description in 'lpfc_vport_param_hex_show' drivers/scsi/lpfc/lpfc_attr.c:2503: warning: Excess function parameter 'buf' description in 'lpfc_vport_param_hex_show' drivers/scsi/lpfc/lpfc_attr.c:2536: warning: Function parameter or member 'attr' not described in 'lpfc_vport_param_init' drivers/scsi/lpfc/lpfc_attr.c:2536: warning: Function parameter or member 'default' not described in 'lpfc_vport_param_init' drivers/scsi/lpfc/lpfc_attr.c:2536: warning: Function parameter or member 'minval' not described in 'lpfc_vport_param_init' drivers/scsi/lpfc/lpfc_attr.c:2536: warning: Function parameter or member 'maxval' not described in 'lpfc_vport_param_init' drivers/scsi/lpfc/lpfc_attr.c:2536: warning: Excess function parameter 'phba' description in 'lpfc_vport_param_init' drivers/scsi/lpfc/lpfc_attr.c:2536: warning: Excess function parameter 'val' description in 'lpfc_vport_param_init' drivers/scsi/lpfc/lpfc_attr.c:2572: warning: Function parameter or member 'attr' not described in 'lpfc_vport_param_set' drivers/scsi/lpfc/lpfc_attr.c:2572: warning: Function parameter or member 'default' not described in 'lpfc_vport_param_set' drivers/scsi/lpfc/lpfc_attr.c:2572: warning: Function parameter or member 'minval' not described in 'lpfc_vport_param_set' drivers/scsi/lpfc/lpfc_attr.c:2572: warning: Function parameter or member 'maxval' not described in 'lpfc_vport_param_set' drivers/scsi/lpfc/lpfc_attr.c:2572: warning: Excess function parameter 'phba' description in 'lpfc_vport_param_set' drivers/scsi/lpfc/lpfc_attr.c:2572: warning: Excess function parameter 'val' description in 'lpfc_vport_param_set' drivers/scsi/lpfc/lpfc_attr.c:2607: warning: Function parameter or member 'attr' not described in 'lpfc_vport_param_store' drivers/scsi/lpfc/lpfc_attr.c:2607: warning: Excess function parameter 'cdev' description in 'lpfc_vport_param_store' drivers/scsi/lpfc/lpfc_attr.c:2607: warning: Excess function parameter 'buf' description in 'lpfc_vport_param_store' drivers/scsi/lpfc/lpfc_attr.c:2607: warning: Excess function parameter 'count' description in 'lpfc_vport_param_store' drivers/scsi/lpfc/lpfc_attr.c:7081: warning: Function parameter or member 'field' not described in 'lpfc_rport_show_function' drivers/scsi/lpfc/lpfc_attr.c:7081: warning: Function parameter or member 'format_string' not described in 'lpfc_rport_show_function' drivers/scsi/lpfc/lpfc_attr.c:7081: warning: Function parameter or member 'sz' not described in 'lpfc_rport_show_function' drivers/scsi/lpfc/lpfc_attr.c:7081: warning: Function parameter or member 'cast' not described in 'lpfc_rport_show_function' drivers/scsi/lpfc/lpfc_attr.c:7081: warning: Excess function parameter 'cdev' description in 'lpfc_rport_show_function' drivers/scsi/lpfc/lpfc_attr.c:7081: warning: Excess function parameter 'buf' description in 'lpfc_rport_show_function' Link: https://lore.kernel.org/r/20201102142359.561122-5-lee.jones@linaro.org Cc: James Smart Cc: Dick Kennedy Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit eceee00e41565523a0010c8828a2330d04f64878 Author: Lee Jones Date: Mon Nov 2 14:23:43 2020 +0000 scsi: lpfc: lpfc_scsi: Fix a whole host of kernel-doc issues Fixes the following W=1 kernel build warning(s): drivers/scsi/lpfc/lpfc_scsi.c:331: warning: Function parameter or member 'num_to_alloc' not described in 'lpfc_new_scsi_buf_s3' drivers/scsi/lpfc/lpfc_scsi.c:331: warning: Excess function parameter 'num_to_allocate' description in 'lpfc_new_scsi_buf_s3' drivers/scsi/lpfc/lpfc_scsi.c:507: warning: Function parameter or member 'idx' not described in 'lpfc_sli4_io_xri_aborted' drivers/scsi/lpfc/lpfc_scsi.c:593: warning: Function parameter or member 'ndlp' not described in 'lpfc_get_scsi_buf_s3' drivers/scsi/lpfc/lpfc_scsi.c:593: warning: Function parameter or member 'cmnd' not described in 'lpfc_get_scsi_buf_s3' drivers/scsi/lpfc/lpfc_scsi.c:632: warning: Function parameter or member 'ndlp' not described in 'lpfc_get_scsi_buf_s4' drivers/scsi/lpfc/lpfc_scsi.c:632: warning: Function parameter or member 'cmnd' not described in 'lpfc_get_scsi_buf_s4' drivers/scsi/lpfc/lpfc_scsi.c:744: warning: Function parameter or member 'ndlp' not described in 'lpfc_get_scsi_buf' drivers/scsi/lpfc/lpfc_scsi.c:744: warning: Function parameter or member 'cmnd' not described in 'lpfc_get_scsi_buf' drivers/scsi/lpfc/lpfc_scsi.c:986: warning: Function parameter or member 'new_guard' not described in 'lpfc_bg_err_inject' drivers/scsi/lpfc/lpfc_scsi.c:1393: warning: Function parameter or member 'txop' not described in 'lpfc_sc_to_bg_opcodes' drivers/scsi/lpfc/lpfc_scsi.c:1393: warning: Function parameter or member 'rxop' not described in 'lpfc_sc_to_bg_opcodes' drivers/scsi/lpfc/lpfc_scsi.c:1393: warning: Excess function parameter 'txopt' description in 'lpfc_sc_to_bg_opcodes' drivers/scsi/lpfc/lpfc_scsi.c:1393: warning: Excess function parameter 'rxopt' description in 'lpfc_sc_to_bg_opcodes' drivers/scsi/lpfc/lpfc_scsi.c:1473: warning: Function parameter or member 'txop' not described in 'lpfc_bg_err_opcodes' drivers/scsi/lpfc/lpfc_scsi.c:1473: warning: Function parameter or member 'rxop' not described in 'lpfc_bg_err_opcodes' drivers/scsi/lpfc/lpfc_scsi.c:1473: warning: Excess function parameter 'txopt' description in 'lpfc_bg_err_opcodes' drivers/scsi/lpfc/lpfc_scsi.c:1473: warning: Excess function parameter 'rxopt' description in 'lpfc_bg_err_opcodes' drivers/scsi/lpfc/lpfc_scsi.c:1565: warning: Function parameter or member 'datasegcnt' not described in 'lpfc_bg_setup_bpl' drivers/scsi/lpfc/lpfc_scsi.c:1565: warning: Excess function parameter 'datacnt' description in 'lpfc_bg_setup_bpl' drivers/scsi/lpfc/lpfc_scsi.c:1951: warning: Function parameter or member 'datasegcnt' not described in 'lpfc_bg_setup_sgl' drivers/scsi/lpfc/lpfc_scsi.c:1951: warning: Function parameter or member 'lpfc_cmd' not described in 'lpfc_bg_setup_sgl' drivers/scsi/lpfc/lpfc_scsi.c:1951: warning: Excess function parameter 'datacnt' description in 'lpfc_bg_setup_sgl' drivers/scsi/lpfc/lpfc_scsi.c:2131: warning: Function parameter or member 'lpfc_cmd' not described in 'lpfc_bg_setup_sgl_prot' drivers/scsi/lpfc/lpfc_scsi.c:4476: warning: Function parameter or member 't' not described in 'lpfc_poll_timeout' drivers/scsi/lpfc/lpfc_scsi.c:4476: warning: Excess function parameter 'ptr' description in 'lpfc_poll_timeout' drivers/scsi/lpfc/lpfc_scsi.c:4503: warning: Function parameter or member 'shost' not described in 'lpfc_queuecommand' drivers/scsi/lpfc/lpfc_scsi.c:4503: warning: Excess function parameter 'done' description in 'lpfc_queuecommand' drivers/scsi/lpfc/lpfc_scsi.c:5035: warning: Function parameter or member 'cmnd' not described in 'lpfc_send_taskmgmt' drivers/scsi/lpfc/lpfc_scsi.c:5035: warning: Excess function parameter 'rdata' description in 'lpfc_send_taskmgmt' drivers/scsi/lpfc/lpfc_scsi.c:5688: warning: Function parameter or member 'phba' not described in 'lpfc_create_device_data' drivers/scsi/lpfc/lpfc_scsi.c:5688: warning: Function parameter or member 'pri' not described in 'lpfc_create_device_data' drivers/scsi/lpfc/lpfc_scsi.c:5688: warning: Excess function parameter 'pha' description in 'lpfc_create_device_data' drivers/scsi/lpfc/lpfc_scsi.c:5730: warning: Function parameter or member 'phba' not described in 'lpfc_delete_device_data' drivers/scsi/lpfc/lpfc_scsi.c:5730: warning: Excess function parameter 'pha' description in 'lpfc_delete_device_data' drivers/scsi/lpfc/lpfc_scsi.c:5762: warning: Function parameter or member 'phba' not described in '__lpfc_get_device_data' drivers/scsi/lpfc/lpfc_scsi.c:5762: warning: Excess function parameter 'pha' description in '__lpfc_get_device_data' drivers/scsi/lpfc/lpfc_scsi.c:5818: warning: Function parameter or member 'phba' not described in 'lpfc_find_next_oas_lun' drivers/scsi/lpfc/lpfc_scsi.c:5818: warning: Function parameter or member 'found_lun_pri' not described in 'lpfc_find_next_oas_lun' drivers/scsi/lpfc/lpfc_scsi.c:5818: warning: Excess function parameter 'pha' description in 'lpfc_find_next_oas_lun' drivers/scsi/lpfc/lpfc_scsi.c:5909: warning: Function parameter or member 'phba' not described in 'lpfc_enable_oas_lun' drivers/scsi/lpfc/lpfc_scsi.c:5909: warning: Function parameter or member 'pri' not described in 'lpfc_enable_oas_lun' drivers/scsi/lpfc/lpfc_scsi.c:5909: warning: Excess function parameter 'pha' description in 'lpfc_enable_oas_lun' drivers/scsi/lpfc/lpfc_scsi.c:5968: warning: Function parameter or member 'phba' not described in 'lpfc_disable_oas_lun' drivers/scsi/lpfc/lpfc_scsi.c:5968: warning: Function parameter or member 'pri' not described in 'lpfc_disable_oas_lun' drivers/scsi/lpfc/lpfc_scsi.c:5968: warning: Excess function parameter 'pha' description in 'lpfc_disable_oas_lun' Link: https://lore.kernel.org/r/20201102142359.561122-4-lee.jones@linaro.org Cc: James Smart Cc: Dick Kennedy Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit e330c96968680b2b72f73636f00321886792eb71 Author: Lee Jones Date: Mon Nov 2 14:23:42 2020 +0000 scsi: mpt3sas: mpt3sas_scsih: Fix function documentation formatting Fixes the following W=1 kernel build warning(s): drivers/scsi/mpt3sas/mpt3sas_scsih.c:2778: warning: Function parameter or member 'ioc' not described in 'scsih_tm_cmd_map_status' drivers/scsi/mpt3sas/mpt3sas_scsih.c:2778: warning: Function parameter or member 'channel' not described in 'scsih_tm_cmd_map_status' drivers/scsi/mpt3sas/mpt3sas_scsih.c:2829: warning: Function parameter or member 'ioc' not described in 'scsih_tm_post_processing' drivers/scsi/mpt3sas/mpt3sas_scsih.c:2829: warning: Function parameter or member 'channel' not described in 'scsih_tm_post_processing' Link: https://lore.kernel.org/r/20201102142359.561122-3-lee.jones@linaro.org Cc: Sathya Prakash Cc: Sreekanth Reddy Cc: Suganath Prabu Subramani Cc: MPT-FusionLinux.pdl@avagotech.com Cc: MPT-FusionLinux.pdl@broadcom.com Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit b2ed1babfefb072fac732d10553d290126175911 Author: Lee Jones Date: Mon Nov 2 14:23:41 2020 +0000 scsi: aic7xxx: aic79xx_osm: Remove unused variable 'saved_scsiid' Fixes the following W=1 kernel build warning(s): drivers/scsi/aic7xxx/aic79xx_osm.c: In function ‘ahd_linux_queue_abort_cmd’: drivers/scsi/aic7xxx/aic79xx_osm.c:2143:9: warning: variable ‘saved_scsiid’ set but not used [-Wunused-but-set-variable] Link: https://lore.kernel.org/r/20201102142359.561122-2-lee.jones@linaro.org Cc: Hannes Reinecke Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 412b51ffda3c8023cc017f951e864588f157a988 Author: Lee Jones Date: Mon Nov 2 10:25:43 2020 +0000 scsi: pm8001: pm8001_sas: Fix strncpy() warning when space is not left for NUL This string is not NUL terminated. Fixes the following W=1 kernel build warning(s): from drivers/scsi/pm8001/pm8001_sas.c:41: In function ‘strncpy’, inlined from ‘pm8001_issue_ssp_tmf’ at drivers/scsi/pm8001/pm8001_sas.c:919:2: include/linux/string.h:297:30: warning: ‘__builtin_strncpy’ specified bound 8 equals destination size [-Wstringop-truncation] 297 | #define __underlying_strncpy __builtin_strncpy | ^ include/linux/string.h:307:9: note: in expansion of macro ‘__underlying_strncpy’ 307 | return __underlying_strncpy(p, q, size); | ^~~~~~~~~~~~~~~~~~~~ Link: https://lore.kernel.org/r/20201102102544.1018706-2-lee.jones@linaro.org Cc: Jack Wang Acked-by: Jack Wang Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit d2a2f3794cbcb2c6051f907fbe207ecf3c69702e Author: Lee Jones Date: Mon Nov 2 10:25:42 2020 +0000 scsi: arcmsr: Stop __builtin_strncpy complaining about a lack of space for NUL SCSI strings like inqdata are not NUL terminated. Fixes the following W=1 kernel build warning(s): In file included from include/linux/bitmap.h:9, from include/linux/nodemask.h:95, from include/linux/mmzone.h:17, from include/linux/gfp.h:6, from include/linux/umh.h:4, from include/linux/kmod.h:9, from include/linux/module.h:16, from drivers/scsi/arcmsr/arcmsr_hba.c:47: In function ‘strncpy’, inlined from ‘arcmsr_handle_virtual_command’ at drivers/scsi/arcmsr/arcmsr_hba.c:3055:3: include/linux/string.h:297:30: warning: ‘__builtin_strncpy’ output truncated before terminating nul copying 4 bytes from a string of the same length [-Wstringop-truncation] 297 | #define __underlying_strncpy __builtin_strncpy | ^ include/linux/string.h:307:9: note: in expansion of macro ‘__underlying_strncpy’ 307 | return __underlying_strncpy(p, q, size); | ^~~~~~~~~~~~~~~~~~~~ In function ‘strncpy’, inlined from ‘arcmsr_handle_virtual_command’ at drivers/scsi/arcmsr/arcmsr_hba.c:3053:3: include/linux/string.h:297:30: warning: ‘__builtin_strncpy’ output truncated before terminating nul copying 16 bytes from a string of the same length [-Wstringop-truncation] 297 | #define __underlying_strncpy __builtin_strncpy | ^ include/linux/string.h:307:9: note: in expansion of macro ‘__underlying_strncpy’ 307 | return __underlying_strncpy(p, q, size); | ^~~~~~~~~~~~~~~~~~~~ In function ‘strncpy’, inlined from ‘arcmsr_handle_virtual_command’ at drivers/scsi/arcmsr/arcmsr_hba.c:3051:3: include/linux/string.h:297:30: warning: ‘__builtin_strncpy’ output truncated before terminating nul copying 8 bytes from a string of the same length [-Wstringop-truncation] 297 | #define __underlying_strncpy __builtin_strncpy | ^ include/linux/string.h:307:9: note: in expansion of macro ‘__underlying_strncpy’ 307 | return __underlying_strncpy(p, q, size); | ^~~~~~~~~~~~~~~~~~~~ Link: https://lore.kernel.org/r/20201102102544.1018706-1-lee.jones@linaro.org Cc: support@areca.com.tw Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 64e65f443a43c35967242fd13b494c251bc5d7ee Author: Deepak R Varma Date: Wed Nov 4 17:45:32 2020 +0530 drm/i915/gvt: replace idr_init() by idr_init_base() idr_init() uses base 0 which is an invalid identifier. The new function idr_init_base allows IDR to set the ID lookup from base 1. This avoids all lookups that otherwise starts from 0 since 0 is always unused. References: commit 6ce711f27500 ("idr: Make 1-based IDRs more efficient") Reviewed-by: Zhenyu Wang Signed-off-by: Deepak R Varma Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20201104121532.GA48202@localhost commit 70408949a35f1a31c327c69b6a187635cb0305fa Merge: 2776d2320ac18 7b58e63e744cb Author: Jakub Kicinski Date: Tue Nov 10 17:57:20 2020 -0800 Merge branch 'inet-prevent-skb-changes-in-udp-4-6-_lib_lookup_skb' Eric Dumazet says: ==================== inet: prevent skb changes in udp{4|6}_lib_lookup_skb() This came while reviewing Alexander Lobakin patch against UDP GRO: We want to make sure skb wont be changed by these helpers while it is owned by GRO stack. ==================== Link: https://lore.kernel.org/r/20201109231349.20946-1-eric.dumazet@gmail.com Signed-off-by: Jakub Kicinski commit 7b58e63e744cbcdeafe0a52423014fd9c9f7e346 Author: Eric Dumazet Date: Mon Nov 9 15:13:49 2020 -0800 inet: udp{4|6}_lib_lookup_skb() skb argument is const The skb is needed only to fetch the keys for the lookup. Both functions are used from GRO stack, we do not want accidental modification of the skb. Signed-off-by: Eric Dumazet Acked-by: Alexander Lobakin Signed-off-by: Jakub Kicinski commit d6bb2d1e86903d3fbf895752ac2c0c2465534579 Author: Eric Dumazet Date: Mon Nov 9 15:13:48 2020 -0800 inet: constify inet_sdif() argument inet_sdif() does not modify the skb. This will permit propagating the const qualifier in udp{4|6}_lib_lookup_skb() functions. Signed-off-by: Eric Dumazet Acked-by: Alexander Lobakin Signed-off-by: Jakub Kicinski commit 2776d2320ac186988273a9b312073317b6c50c76 Author: Colin Ian King Date: Mon Nov 9 12:40:08 2020 +0000 net: dsa: fix unintended sign extension on a u16 left shift The left shift of u16 variable high is promoted to the type int and then sign extended to a 64 bit u64 value. If the top bit of high is set then the upper 32 bits of the result end up being set by the sign extension. Fix this by explicitly casting the value in high to a u64 before left shifting by 16 places. Also, remove the initialisation of variable value to 0 at the start of each loop iteration as the value is never read and hence the assignment it is redundant. Addresses-Coverity: ("Unintended sign extension") Fixes: e4b27ebc780f ("net: dsa: Add DSA driver for Hirschmann Hellcreek switches") Signed-off-by: Colin Ian King Reviewed-by: Kurt Kanzenbach Link: https://lore.kernel.org/r/20201109124008.2079873-1-colin.king@canonical.com Signed-off-by: Jakub Kicinski commit 58954b3be8b7a8a0ebf1ced6fbbab808e8ccc4b6 Author: Lukas Bulwahn Date: Mon Nov 9 13:22:50 2020 +0100 MAINTAINERS: assign ./fs/tracefs to TRACING A check with ./scripts/get_maintainer.pl --letters -f fs/tracefs/ shows that the tracefs is not assigned to the TRACING section in MAINTAINERS. Add the file pattern for the TRACING section to rectify that. Link: https://lkml.kernel.org/r/20201109122250.31915-1-lukas.bulwahn@gmail.com Signed-off-by: Lukas Bulwahn Signed-off-by: Steven Rostedt (VMware) commit 2b5894cc33e9dea189a7010c7ed57d414786d174 Author: Qiujun Huang Date: Thu Oct 29 23:05:54 2020 +0800 tracing: Fix some typos in comments s/detetector/detector/ s/enfoced/enforced/ s/writen/written/ s/actualy/actually/ s/bascially/basically/ s/Regarldess/Regardless/ s/zeroes/zeros/ s/followd/followed/ s/incrememented/incremented/ s/separatelly/separately/ s/accesible/accessible/ s/sythetic/synthetic/ s/enabed/enabled/ s/heurisitc/heuristic/ s/assocated/associated/ s/otherwides/otherwise/ s/specfied/specified/ s/seaching/searching/ s/hierachry/hierarchy/ s/internel/internal/ s/Thise/This/ Link: https://lkml.kernel.org/r/20201029150554.3354-1-hqjagain@gmail.com Signed-off-by: Qiujun Huang Signed-off-by: Steven Rostedt (VMware) commit 045e269c1eb2db5b5df9e034af617af8f4c1b35c Author: Alex Shi Date: Fri Nov 6 22:54:46 2020 +0800 ftrace: Remove unused varible 'ret' 'ret' in 2 functions are not used. and one of them is a void function. So remove them to avoid gcc warning: kernel/trace/ftrace.c:4166:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] kernel/trace/ftrace.c:5571:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] Link: https://lkml.kernel.org/r/1604674486-52350-1-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Alex Shi Signed-off-by: Steven Rostedt (VMware) commit 28575c61ea602537a3d86fe301a53554e59452ae Author: Steven Rostedt (VMware) Date: Mon Nov 2 14:43:10 2020 -0500 ring-buffer: Add recording of ring buffer recursion into recursed_functions Add a new config RING_BUFFER_RECORD_RECURSION that will place functions that recurse from the ring buffer into the ftrace recused_functions file. Signed-off-by: Steven Rostedt (VMware) commit 7b68621f8d16689cbb4203aceaca86ffb165f1d0 Author: Steven Rostedt (VMware) Date: Fri Oct 30 17:21:00 2020 -0400 ftrace: Clean up the recursion code a bit In trace_test_and_set_recursion(), current->trace_recursion is placed into a variable, and that variable should be used for the processing, as there's no reason to dereference current multiple times. On trace_clear_recursion(), current->trace_recursion is modified and there's no reason to copy it over to a variable. Signed-off-by: Steven Rostedt (VMware) commit 60602cb549f1965a7edbc96026760dfb93911fab Author: Steven Rostedt (VMware) Date: Wed Oct 28 08:19:24 2020 -0400 fgraph: Make overruns 4 bytes in graph stack structure Inspecting the data structures of the function graph tracer, I found that the overrun value is unsigned long, which is 8 bytes on a 64 bit machine, and not only that, the depth is an int (4 bytes). The overrun can be simply an unsigned int (4 bytes) and pack the ftrace_graph_ret structure better. The depth is moved up next to the func, as it is used more often with func, and improves cache locality. Signed-off-by: Steven Rostedt (VMware) commit 28a68f828266754c2bd64b87873e8099e3f8fe0c Author: Dave Airlie Date: Thu Oct 29 13:59:45 2020 +1000 drm/radeon/ttm: use multihop This removes the code to move resources directly between SYSTEM and VRAM in favour of using the core ttm mulithop code. Signed-off-by: Dave Airlie Acked-by: Daniel Vetter Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20201109005432.861936-5-airlied@gmail.com commit 0c8c0659d7475b6304b67374caf15b56cf0be4f9 Author: Dave Airlie Date: Thu Oct 29 13:59:20 2020 +1000 drm/nouveau/ttm: use multihop This removes the code to move resources directly between SYSTEM and VRAM in favour of using the core ttm mulithop code. Signed-off-by: Dave Airlie Acked-by: Daniel Vetter Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20201109005432.861936-4-airlied@gmail.com commit f5a89a5cae812a39993be32e74c8ed7856b1e2b2 Author: Dave Airlie Date: Thu Oct 29 13:59:08 2020 +1000 drm/amdgpu/ttm: use multihop This removes the code to move resources directly between SYSTEM and VRAM in favour of using the core ttm mulithop code. Signed-off-by: Dave Airlie Acked-by: Daniel Vetter Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20201109005432.861936-3-airlied@gmail.com commit ebdf565169af006ee3be8c40eecbfc77d28a3b84 Author: Dave Airlie Date: Thu Oct 29 13:58:52 2020 +1000 drm/ttm: add multihop infrastrucutre (v3) Currently drivers get called to move a buffer, but if they have to move it temporarily through another space (SYSTEM->VRAM via TT) then they can end up with a lot of ttm->driver->ttm call stacks, if the temprorary space moves requires eviction. Instead of letting the driver do all the placement/space for the temporary, allow it to report back (-EMULTIHOP) and a placement (hop) to the move code, which will then do the temporary move, and the correct placement move afterwards. This removes a lot of code from drivers, at the expense of adding some midlayering. I've some further ideas on how to turn it inside out, but I think this is a good solution to the call stack problems. v2: separate out the driver patches, add WARN for getting MULTHOP in paths we shouldn't (Daniel) v3: use memset (Christian) Reviewed-by: Daniel Vetter Reviewed-by: hristian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20201109005432.861936-2-airlied@gmail.com commit e5a4b17da1d0d8ce5b56efe618ae107add78c7b0 Author: Menglong Dong Date: Mon Nov 9 02:02:17 2020 -0500 net: sched: fix misspellings using misspell-fixer tool Some typos are found out by misspell-fixer tool: $ misspell-fixer -rnv ./net/sched/ ./net/sched/act_api.c:686 ./net/sched/act_bpf.c:68 ./net/sched/cls_rsvp.h:241 ./net/sched/em_cmp.c:44 ./net/sched/sch_pie.c:408 Fix typos found by misspell-fixer. Signed-off-by: Menglong Dong Acked-by: John Fastabend Link: https://lore.kernel.org/r/5fa8e9d4.1c69fb81.5d889.5c64@mx.google.com Signed-off-by: Jakub Kicinski commit 9600d623dba42499e78f7dccbc12e392392a90a5 Merge: 0e6f601eb5c19 e2215b0555ccd Author: Alexei Starovoitov Date: Tue Nov 10 15:37:45 2020 -0800 Merge branch 'Remove unused test_ipip.sh test and add missed' Hangbin Liu says: ==================== In comment 173ca26e9b51 ("samples/bpf: add comprehensive ipip, ipip6, ip6ip6 test") we added some bpf tunnel tests. In commit 933a741e3b82 ("selftests/bpf: bpf tunnel test.") when we moved it to the current folder, we missed some points: 1. ip6ip6 test is not added 2. forgot to remove test_ipip.sh in sample folder 3. TCP test code is not removed in test_tunnel_kern.c In this patch set I add back ip6ip6 test and remove unused code. I'm not sure if this should be net or net-next, so just set to net. Here is the test result: ``` Testing IP6IP6 tunnel... PING ::11(::11) 56 data bytes --- ::11 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 63ms rtt min/avg/max/mdev = 0.014/1028.308/2060.906/841.361 ms, pipe 2 PING 1::11(1::11) 56 data bytes --- 1::11 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 48ms rtt min/avg/max/mdev = 0.026/0.029/0.036/0.006 ms PING 1::22(1::22) 56 data bytes --- 1::22 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 47ms rtt min/avg/max/mdev = 0.030/0.048/0.067/0.016 ms PASS: ip6ip6tnl ``` v3: Add back ICMP check as Martin suggested. v2: Keep ip6ip6 section in test_tunnel_kern.c. ==================== Acked-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov commit e2215b0555ccd5ad25e260d6c949558b5796b3dc Author: Hangbin Liu Date: Tue Nov 10 09:50:13 2020 +0800 samples/bpf: Remove unused test_ipip.sh The tcbpf2_kern.o and related kernel sections are moved to bpf selftest folder since b05cd7404323 ("samples/bpf: remove the bpf tunnel testsuite."). Remove this one as well. Fixes: b05cd7404323 ("samples/bpf: remove the bpf tunnel testsuite.") Signed-off-by: Hangbin Liu Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20201110015013.1570716-3-liuhangbin@gmail.com commit 58cfa49c2ba7f815adccc27a775e7cf8a8f7f539 Author: Hangbin Liu Date: Tue Nov 10 09:50:12 2020 +0800 selftest/bpf: Add missed ip6ip6 test back In comment 173ca26e9b51 ("samples/bpf: add comprehensive ipip, ipip6, ip6ip6 test") we added ip6ip6 test for bpf tunnel testing. But in commit 933a741e3b82 ("selftests/bpf: bpf tunnel test.") when we moved it to the current folder, we didn't add it. This patch add the ip6ip6 test back to bpf tunnel test. Update the ipip6's topology for both IPv4 and IPv6 testing. Since iperf test is removed as currect framework simplified it in purpose, I also removed unused tcp checkings in test_tunnel_kern.c. Fixes: 933a741e3b82 ("selftests/bpf: bpf tunnel test.") Signed-off-by: Hangbin Liu Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201110015013.1570716-2-liuhangbin@gmail.com commit 1aa844b92176cbcafe6b614707f5ef78487966ab Author: Kaixu Xia Date: Sun Nov 8 20:13:00 2020 +0800 net: pch_gbe: remove unneeded variable retval in __pch_gbe_suspend Fix the following coccicheck warning: ./drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:2415:5-11: Unneeded variable: "retval". Return "0" on line 2435 Reported-by: Tosk Robot Signed-off-by: Kaixu Xia Link: https://lore.kernel.org/r/1604837580-12419-1-git-send-email-kaixuxia@tencent.com Signed-off-by: Jakub Kicinski commit 0e6f601eb5c1914d4222458ee2ec43cc8c9864d8 Merge: f52b8fd332573 cecaf4a0f2dcb Author: Alexei Starovoitov Date: Tue Nov 10 15:25:53 2020 -0800 Merge branch 'Integrate kernel module BTF support' Andrii Nakryiko says: ==================== This patch set adds BTF generation for kernel modules using a compact split BTF approach. Respective patches have all the details. Kernel module BTFs rely on pahole's split BTF support, which is added in [0] and will be available starting from v1.19. Support for it is detected automatically during kernel build time. This patch set implements in-kernel support for split BTF loading and validation. It also extends GET_OBJ_INFO API for BTFs to return BTF's module name and a flag whether BTF itself is in-kernel or user-provided. vmlinux BTF is also exposed to user-space through the same BTF object iteration APIs. Follow up patch set will utilize the fact that vmlinux and module BTFs now have associated ID to provide ability to attach BPF fentry/fexit/etc programs to functions defined in kernel modules. bpftool is also extended to show module/vmlinux BTF's name. [0] https://patchwork.kernel.org/project/netdevbpf/list/?series=378699&state=* v3->v4: - copy_to_user() on ENOSPC in btf_get_info_by_fd() (Martin); v2->v3: - get rid of unnecessary gotos (Song); v2->v1: - drop WARNs, add fewer pr_warn()'s instead (Greg); - properly initialize sysfs binary attribute structure (Greg); - add __maybe_unused to any_section_objs, used conditionally by module BTF; rfc->v1: - CONFIG_DEBUG_INFO_BTF_MODULES is derived automatically (Alexei); - vmlinux BTF now has explicit "vmlinux" name (Alexei); - added sysfs ABI documentation for /sys/kernel/btf/ (Greg). Cc: Arnaldo Carvalho de Melo Cc: Greg Kroah-Hartman ==================== Signed-off-by: Alexei Starovoitov commit cecaf4a0f2dcbd7e76156f6d63748b84c176b95b Author: Andrii Nakryiko Date: Mon Nov 9 17:19:32 2020 -0800 tools/bpftool: Add support for in-kernel and named BTF in `btf show` Display vmlinux BTF name and kernel module names when listing available BTFs on the system. In human-readable output mode, module BTFs are reported with "name [module-name]", while vmlinux BTF will be reported as "name [vmlinux]". Square brackets are added by bpftool and follow kernel convention when displaying modules in human-readable text outputs. [vmuser@archvm bpf]$ sudo ../../../bpf/bpftool/bpftool btf s 1: name [vmlinux] size 4082281B 6: size 2365B prog_ids 8,6 map_ids 3 7: name [button] size 46895B 8: name [pcspkr] size 42328B 9: name [serio_raw] size 39375B 10: name [floppy] size 57185B 11: name [i2c_core] size 76186B 12: name [crc32c_intel] size 16036B 13: name [i2c_piix4] size 50497B 14: name [irqbypass] size 14124B 15: name [kvm] size 197985B 16: name [kvm_intel] size 123564B 17: name [cryptd] size 42466B 18: name [crypto_simd] size 17187B 19: name [glue_helper] size 39205B 20: name [aesni_intel] size 41034B 25: size 36150B pids bpftool(2519) In JSON mode, two fields (boolean "kernel" and string "name") are reported for each BTF object. vmlinux BTF is reported with name "vmlinux" (kernel itself returns and empty name for vmlinux BTF). [vmuser@archvm bpf]$ sudo ../../../bpf/bpftool/bpftool btf s -jp [{ "id": 1, "size": 4082281, "prog_ids": [], "map_ids": [], "kernel": true, "name": "vmlinux" },{ "id": 6, "size": 2365, "prog_ids": [8,6 ], "map_ids": [3 ], "kernel": false },{ "id": 7, "size": 46895, "prog_ids": [], "map_ids": [], "kernel": true, "name": "button" },{ ... Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Tested-by: Alan Maguire Link: https://lore.kernel.org/bpf/20201110011932.3201430-6-andrii@kernel.org commit 36e68442d1afd4f720704ee1ea8486331507e834 Author: Andrii Nakryiko Date: Mon Nov 9 17:19:31 2020 -0800 bpf: Load and verify kernel module BTFs Add kernel module listener that will load/validate and unload module BTF. Module BTFs gets ID generated for them, which makes it possible to iterate them with existing BTF iteration API. They are given their respective module's names, which will get reported through GET_OBJ_INFO API. They are also marked as in-kernel BTFs for tooling to distinguish them from user-provided BTFs. Also, similarly to vmlinux BTF, kernel module BTFs are exposed through sysfs as /sys/kernel/btf/. This is convenient for user-space tools to inspect module BTF contents and dump their types with existing tools: [vmuser@archvm bpf]$ ls -la /sys/kernel/btf total 0 drwxr-xr-x 2 root root 0 Nov 4 19:46 . drwxr-xr-x 13 root root 0 Nov 4 19:46 .. ... -r--r--r-- 1 root root 888 Nov 4 19:46 irqbypass -r--r--r-- 1 root root 100225 Nov 4 19:46 kvm -r--r--r-- 1 root root 35401 Nov 4 19:46 kvm_intel -r--r--r-- 1 root root 120 Nov 4 19:46 pcspkr -r--r--r-- 1 root root 399 Nov 4 19:46 serio_raw -r--r--r-- 1 root root 4094095 Nov 4 19:46 vmlinux Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/bpf/20201110011932.3201430-5-andrii@kernel.org commit 5f9ae91f7c0dbbc4195e2a6c8eedcaeb5b9e4cbb Author: Andrii Nakryiko Date: Mon Nov 9 17:19:30 2020 -0800 kbuild: Build kernel module BTFs if BTF is enabled and pahole supports it Detect if pahole supports split BTF generation, and generate BTF for each selected kernel module, if it does. This is exposed to Makefiles and C code as CONFIG_DEBUG_INFO_BTF_MODULES flag. Kernel module BTF has to be re-generated if either vmlinux's BTF changes or module's .ko changes. To achieve that, I needed a helper similar to if_changed, but that would allow to filter out vmlinux from the list of updated dependencies for .ko building. I've put it next to the only place that uses and needs it, but it might be a better idea to just add it along the other if_changed variants into scripts/Kbuild.include. Each kernel module's BTF deduplication is pretty fast, as it does only incremental BTF deduplication on top of already deduplicated vmlinux BTF. To show the added build time, I've first ran make only just built kernel (to establish the baseline) and then forced only BTF re-generation, without regenerating .ko files. The build was performed with -j60 parallelization on 56-core machine. The final time also includes bzImage building, so it's not a pure BTF overhead. $ time make -j60 ... make -j60 27.65s user 10.96s system 782% cpu 4.933 total $ touch ~/linux-build/default/vmlinux && time make -j60 ... make -j60 123.69s user 27.85s system 1566% cpu 9.675 total So 4.6 seconds real time, with noticeable part spent in compressed vmlinux and bzImage building. To show size savings, I've built my kernel configuration with about 700 kernel modules with full BTF per each kernel module (without deduplicating against vmlinux) and with split BTF against deduplicated vmlinux (approach in this patch). Below are top 10 modules with biggest BTF sizes. And total size of BTF data across all kernel modules. It shows that split BTF "compresses" 115MB down to 5MB total. And the biggest kernel modules get a downsize from 500-570KB down to 200-300KB. FULL BTF ======== $ for f in $(find . -name '*.ko'); do size -A -d $f | grep BTF | awk '{print $2}'; done | awk '{ s += $1 } END { print s }' 115710691 $ for f in $(find . -name '*.ko'); do printf "%s %d\n" $f $(size -A -d $f | grep BTF | awk '{print $2}'); done | sort -nr -k2 | head -n10 ./drivers/gpu/drm/i915/i915.ko 570570 ./drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.ko 520240 ./drivers/gpu/drm/radeon/radeon.ko 503849 ./drivers/infiniband/hw/mlx5/mlx5_ib.ko 491777 ./fs/xfs/xfs.ko 411544 ./drivers/net/ethernet/intel/i40e/i40e.ko 403904 ./drivers/net/ethernet/broadcom/bnx2x/bnx2x.ko 398754 ./drivers/infiniband/core/ib_core.ko 397224 ./fs/cifs/cifs.ko 386249 ./fs/nfsd/nfsd.ko 379738 SPLIT BTF ========= $ for f in $(find . -name '*.ko'); do size -A -d $f | grep BTF | awk '{print $2}'; done | awk '{ s += $1 } END { print s }' 5194047 $ for f in $(find . -name '*.ko'); do printf "%s %d\n" $f $(size -A -d $f | grep BTF | awk '{print $2}'); done | sort -nr -k2 | head -n10 ./drivers/gpu/drm/i915/i915.ko 293206 ./drivers/gpu/drm/radeon/radeon.ko 282103 ./fs/xfs/xfs.ko 222150 ./drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.ko 198503 ./drivers/infiniband/hw/mlx5/mlx5_ib.ko 198356 ./drivers/net/ethernet/broadcom/bnx2x/bnx2x.ko 113444 ./fs/cifs/cifs.ko 109379 ./arch/x86/kvm/kvm.ko 100225 ./drivers/gpu/drm/drm.ko 94827 ./drivers/infiniband/core/ib_core.ko 91188 Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201110011932.3201430-4-andrii@kernel.org commit 5329722057d41aebc31e391907a501feaa42f7d9 Author: Andrii Nakryiko Date: Mon Nov 9 17:19:29 2020 -0800 bpf: Assign ID to vmlinux BTF and return extra info for BTF in GET_OBJ_INFO Allocate ID for vmlinux BTF. This makes it visible when iterating over all BTF objects in the system. To allow distinguishing vmlinux BTF (and later kernel module BTF) from user-provided BTFs, expose extra kernel_btf flag, as well as BTF name ("vmlinux" for vmlinux BTF, will equal to module's name for module BTF). We might want to later allow specifying BTF name for user-provided BTFs as well, if that makes sense. But currently this is reserved only for in-kernel BTFs. Having in-kernel BTFs exposed IDs will allow to extend BPF APIs that require in-kernel BTF type with ability to specify BTF types from kernel modules, not just vmlinux BTF. This will be implemented in a follow up patch set for fentry/fexit/fmod_ret/lsm/etc. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20201110011932.3201430-3-andrii@kernel.org commit 951bb64621b8139c0cd99dcadc13e6510c08aa73 Author: Andrii Nakryiko Date: Mon Nov 9 17:19:28 2020 -0800 bpf: Add in-kernel split BTF support Adjust in-kernel BTF implementation to support a split BTF mode of operation. Changes are mostly mirroring libbpf split BTF changes, with the exception of start_id being 0 for in-kernel implementation due to simpler read-only mode. Otherwise, for split BTF logic, most of the logic of jumping to base BTF, where necessary, is encapsulated in few helper functions. Type numbering and string offset in a split BTF are logically continuing where base BTF ends, so most of the high-level logic is kept without changes. Type verification and size resolution is only doing an added resolution of new split BTF types and relies on already cached size and type resolution results in the base BTF. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20201110011932.3201430-2-andrii@kernel.org commit 3ec94da976fe10b6e4f74c8d35deef0a6c0dd743 Author: Kaixu Xia Date: Sun Nov 8 09:11:59 2020 +0800 net: atlantic: Remove unnecessary conversion to bool The '!=' expression itself is bool, no need to convert it to bool. Fix the following coccicheck warning: ./drivers/net/ethernet/aquantia/atlantic/aq_nic.c:1477:34-39: WARNING: conversion to bool not needed here Reported-by: Tosk Robot Signed-off-by: Kaixu Xia Link: https://lore.kernel.org/r/1604797919-10157-1-git-send-email-kaixuxia@tencent.com Signed-off-by: Jakub Kicinski commit 30e2379e823309ee015043ffaa522cf5a0cd00b1 Author: Menglong Dong Date: Sun Nov 8 09:05:41 2020 +0800 net: ipv4: remove redundant initialization in inet_rtm_deladdr The initialization for 'err' with '-EINVAL' is redundant and can be removed, as it is updated soon. Changes since v1: - Remove redundant empty line Signed-off-by: Menglong Dong Link: https://lore.kernel.org/r/20201108010541.12432-1-dong.menglong@zte.com.cn Signed-off-by: Jakub Kicinski commit 1ccd58331f6f2af73758e572f8aa0215b0cacc0e Author: Guillaume Nault Date: Sat Nov 7 17:47:17 2020 +0100 selftests: disable rp_filter when testing bareudp Some systems have rp_filter=1 as default configuration. This breaks bareudp.sh as the intermediate namespaces handle part of the routing with regular IPv4 routes but the reverse path is done with tc (flower/tunnel_key/mirred). Signed-off-by: Guillaume Nault Link: https://lore.kernel.org/r/28140b7d20161e4f766b558018fe2718f9bc1117.1604767577.git.gnault@redhat.com Signed-off-by: Jakub Kicinski commit c2e46f6b3e3551558d44c4dc518b9667cb0d5f8b Author: Sachin Sant Date: Fri Nov 6 13:10:06 2020 +0530 selftests/cgroup: Fix build on older distros On older distros struct clone_args does not have a cgroup member, leading to build errors: cgroup_util.c: In function 'clone_into_cgroup': cgroup_util.c:343:4: error: 'struct clone_args' has no member named 'cgroup' cgroup_util.c:346:33: error: invalid application of 'sizeof' to incomplete type 'struct clone_args' But the selftests already have a locally defined version of the structure which is up to date, called __clone_args. So use __clone_args which fixes the error. Signed-off-by: Michael Ellerman Signed-off-by: Sachin Sant > Acked-by: Christian Brauner Signed-off-by: Shuah Khan commit 211f737ac76ac317b67fa903742e92236d5776df Author: Tony Luck Date: Thu Nov 5 10:44:06 2020 -0800 MAINTAINERS: Clean up the F: entries for some EDAC drivers The edac_altera entry stopped at the "." and needed "[ch]" to match both the driver and the header file. The edac_skx entry only matched on ".c" files so didn't include skx_common.h Signed-off-by: Tony Luck commit 93f20eff0cca972d74cb554a2e8b47730228be16 Author: Hangbin Liu Date: Wed Oct 28 16:31:14 2020 +0800 selftests/run_kselftest.sh: fix dry-run typo Should be -d instead of -n for dry-run. Fixes: 5da1918446a1 ("selftests/run_kselftest.sh: Make each test individually selectable") Signed-off-by: Hangbin Liu Signed-off-by: Shuah Khan commit 82f147944c650a07831c796c398f5c973dbdde79 Author: Wang Qing Date: Sat Nov 7 17:19:35 2020 +0800 tool: selftests: fix spelling typo of 'writting' writting -> writing Signed-off-by: Wang Qing Reviewed-by: Mike Rapoport Signed-off-by: Shuah Khan commit 1c49e3783f8899555190a49024ac86d3d76633cd Author: Michael Ellerman Date: Wed Nov 4 21:03:05 2020 +1100 selftests/memfd: Fix implicit declaration warnings The memfd tests emit several warnings: fuse_test.c:261:7: warning: implicit declaration of function 'open' fuse_test.c:67:6: warning: implicit declaration of function 'fcntl' memfd_test.c:397:6: warning: implicit declaration of function 'fallocate' memfd_test.c:64:7: warning: implicit declaration of function 'open' memfd_test.c:90:6: warning: implicit declaration of function 'fcntl' These are all caused by the test not including fcntl.h. Instead of including linux/fcntl.h, include fcntl.h, which should eventually cause the former to be included as well. Signed-off-by: Michael Ellerman Signed-off-by: Shuah Khan commit fc4a3a1bf9ad799181e4d4ec9c2598c0405bc27d Author: Tommi Rantala Date: Mon Nov 2 09:39:18 2020 +0200 selftests: intel_pstate: ftime() is deprecated Use clock_gettime() instead of deprecated ftime(). aperf.c: In function ‘main’: aperf.c:58:2: warning: ‘ftime’ is deprecated [-Wdeprecated-declarations] 58 | ftime(&before); | ^~~~~ In file included from aperf.c:9: /usr/include/sys/timeb.h:39:12: note: declared here 39 | extern int ftime (struct timeb *__timebuf) | ^~~~~ Signed-off-by: Tommi Rantala Signed-off-by: Shuah Khan commit 85128c5bcdf9bd9b574d7cbafa49170a39fed2e1 Author: Michael Ellerman Date: Wed Nov 4 21:08:43 2020 +1100 selftests/gpio: Add to CLEAN rule rather than overriding Rather than overriding the CLEAN rule we can just append to it. Signed-off-by: Michael Ellerman Signed-off-by: Shuah Khan commit b68c1c65dec5fb5186ebd33ce52059b4c6db8500 Author: Michael Ellerman Date: Wed Nov 4 21:08:42 2020 +1100 selftests/gpio: Fix build when source tree is read only Currently the gpio selftests fail to build if the source tree is read only: make -j 160 -C tools/testing/selftests TARGETS=gpio make[1]: Entering directory '/linux/tools/testing/selftests/gpio' make OUTPUT=/linux/tools/gpio/ -C /linux/tools/gpio make[2]: Entering directory '/linux/tools/gpio' mkdir -p /linux/tools/gpio/include/linux 2>&1 || true ln -sf /linux/tools/gpio/../../include/uapi/linux/gpio.h /linux/tools/gpio/include/linux/gpio.h ln: failed to create symbolic link '/linux/tools/gpio/include/linux/gpio.h': Read-only file system This happens because we ask make to build ../../../gpio (tools/gpio) without pointing OUTPUT away from the source directory. To fix it we create a subdirectory of the existing OUTPUT directory, called tools-gpio, and tell tools/gpio to build in there. Signed-off-by: Michael Ellerman Signed-off-by: Shuah Khan commit 449539da2e237336bc750b41f1736a77f9aca25c Author: Michael Ellerman Date: Wed Nov 4 21:08:41 2020 +1100 selftests/gpio: Move include of lib.mk up Move the include of lib.mk up so that in a subsequent patch we can use OUTPUT, which is initialised by lib.mk, in the definition of the GPIO variables. Signed-off-by: Michael Ellerman Signed-off-by: Shuah Khan commit ff2c395b9257f0e617f9cd212893f3c72c80ee6c Author: Michael Ellerman Date: Wed Nov 4 21:08:40 2020 +1100 selftests/gpio: Use TEST_GEN_PROGS_EXTENDED Use TEST_GEN_PROGS_EXTENDED rather than TEST_PROGS_EXTENDED. That tells the lib.mk logic that the files it references are to be generated by the Makefile. Having done that we don't need to override the all rule. Signed-off-by: Michael Ellerman Signed-off-by: Shuah Khan commit 51c0a0c63fd0cf1953086cd6ec7d6f068418441a Merge: 285654130d5c1 d2ad981151b3a Author: Mark Brown Date: Tue Nov 10 21:36:14 2020 +0000 Merge series "regulator: bd718x7: support voltage scaling" from Matti Vaittinen : RFC for adding a support for typical voltage scaling connection In few occasions there has been a need to scale the voltage output from bucks on BD71837. Usually this is done when buck8 is used to power specific GPU which can utilize voltages down to 0.7V. As lowest the buck8 on BD71837 can go is 0.8V, and external connection is used to scale the voltages. The BD71837, BD71847 and BD71850 bucks can be adjusted by pulling up the feedback pin using suitable voltage/resistors. |---------------| | buck 8 |-------+----->Vout | | | |---------------| | | | | | +-------+--R2----+ | R1 | V FB-pull-up This will scale the voltage as follows: - Vout_o = Vo - (Vpu - Vo)*R2/R1 - Linear_step = step_orig*(R1+R2)/R1 where: Vout_o is adjusted voltage output at vsel reg value 0 Vo is original voltage output at vsel reg value 0 Vpu is the pull-up voltage V FB-pull-up in the picture R1 and R2 are resistor values. >From HW point of view this does not need to be limited to buck 8. This connection can be used to adjust output from any of the bucks on BD71837/47/50. As this seems to be a 'de-facto' way to scale the voltages on BD71837 it might be a good idea to support computing the new voltage ranges for bucks based on the V-pull-up and resistor R1/R2 values given from device-tree. This allows describing the external HW connection using DT to correctly scale the voltages. This RFC uses "rohm,feedback-pull-up-r1-ohms" and "rohm,feedback-pull-up-r2-ohms" to provide the resistor values - but these names (without the picture) might not be too descriptive. I am grateful for all suggestions as better and more descriptive names. This patch series is an RFC because this connection feels somewhat "hacky". OTOH - when hack becomes widely used, it is less of an hack and more of a standard - and occasionally supporting HW hacks using SW may benefit us all, right? :) The other thing some projects do is allowing the change of BD71837 buck8 voltages when buck8 is enabled. This however will introduce voltage spikes as buck8 was not originally designed for this. The specific HW platform must be evaluated to be able to tolerate these spikes. Thus this patch series does not support buck8 voltage changes when buck8 is enabled. I wonder if this should be allowed per some config option(?) I don't want to help people frying their boards... Opinions? Is there suggested way of allowing this type of features at own risk? Config or even Some #ifdef which is not listed in Kconfig? Device-tree property? If you have (good) suggestions I could add the optional (non default) DVS support for non DVS bucks on BD71837. Matti Vaittinen (3): dt-bindings: regulator: BD71837 support commonly used feedback connection dt-bindings: regulator: BD71847 support commonly used feedback connection regulator: bd718x7: Support external connection to scale voltages .../regulator/rohm,bd71837-regulator.yaml | 48 +++++ .../regulator/rohm,bd71847-regulator.yaml | 49 ++++++ drivers/regulator/bd718x7-regulator.c | 164 +++++++++++++++++- 3 files changed, 254 insertions(+), 7 deletions(-) base-commit: 3cea11cd5e3b00d91caf0b4730194039b45c5891 -- 2.21.3 -- Matti Vaittinen, Linux device drivers ROHM Semiconductors, Finland SWDC Kiviharjunlenkki 1E 90220 OULU FINLAND ~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~ Simon says - in Latin please. ~~~ "non cogito me" dixit Rene Descarte, deinde evanescavit ~~~ Thanks to Simon Glass for the translation =] commit 0a142f536785196397aa07aa1c81343b9db0a3b9 Merge: 4e59dd249cd51 e32b100bc6ecb Author: Mark Brown Date: Tue Nov 10 21:36:13 2020 +0000 Merge series "Audio Graph Updates" from Sameer Pujar : This series is a prepraration for using generic graph driver for Tegra210 audio. Tegra audio graph series will be sent in a separate series because it has some dependency over other series for documentation work. This series can focus on the generic ASoC driver updates. Below are the summary of changes done. * Support multiple instances of a component. For example there can be multiple I2S devices which can use the same component driver. * Support open platforms with empty Codec endpoint. Customers can plug their own HW and can populate codec endpoint. * In a component model there can be many components which can be connected together. In such cases Identify no-pcm DPCM DAI links which can be used in BE<->BE connections. * Expose structures or helpers to be re-used by other similar graph drivers. The series is based on following references where DPCM usgae for Tegra Audio and simple-card driver proposal were discussed. * https://lkml.org/lkml/2020/4/30/519 (DPCM for Tegra) * https://lkml.org/lkml/2020/6/27/4 (simple-card driver) Changelog ========= v4 -> v5 -------- * No changes in the core/audio-graph driver patches which are part of the current series. * Dropped Tegra audio patches and doc patches. This will be sent separately once the doc depdendencies are resolved. v3 -> v4 -------- * Added new patches to convert graph.txt and audio-graph-card.txt to corresponding json-schema files. Later these references are used in Tegra audio graph schema. * AHUB component binding docs are updated to reflect the usage of ports/port/endpoint * More common stuff is moved into graph_parse_of() and this is used by both generic and Tegra audio graph. * DT binding for Tegra audio graph is updated to included "ports { }" * As per the suggestion 'void *data' member is dropped from 'asoc_simple_priv' and instead container method is used to maintain required custom data internal to Tegra audio graph. v2 -> v3 -------- * Dropped new compatible addition in generic graph driver after reviewing it with Morimoto-san. Instead added Tegra audio graph driver and new compatibles are added in the same. * Added new patches to expose new members for customization in audio graph driver. * Added new patch for Tegra audio graph driver and related documentation. * Minor change in below commit where mutex version of helper is used "ASoC: audio-graph: Identify 'no_pcm' DAI links for DPCM" * DT binding is updated to use the newly exposed compatibles * No changes in other patches v1 -> v2 -------- * Re-organized ports/endpoints description for ADMAIF and XBAR. Updated DT patches accordingly. * After above change, multiple Codec endpoint support is not required and hence dropped for now. This will be considered separately if at all required in future. * Re-ordered patches in the series. Sameer Pujar (7): ASoC: soc-core: Fix component name_prefix parsing ASoC: soc-pcm: Get all BEs along DAPM path ASoC: audio-graph: Use of_node and DAI for DPCM DAI link names ASoC: audio-graph: Identify 'no_pcm' DAI links for DPCM ASoC: audio-graph: Support empty Codec endpoint ASoC: audio-graph: Expose new members for asoc_simple_priv ASoC: audio-graph: Expose helpers from audio graph include/sound/graph_card.h | 16 ++++ include/sound/simple_card_utils.h | 3 + include/sound/soc.h | 1 + sound/soc/generic/audio-graph-card.c | 175 ++++++++++++++++++++++++----------- sound/soc/soc-core.c | 3 +- sound/soc/soc-pcm.c | 3 +- 6 files changed, 143 insertions(+), 58 deletions(-) create mode 100644 include/sound/graph_card.h -- 2.7.4 commit e8c765811b1064c200829eacf237ac8c25e79cd0 Author: Abhinav Kumar Date: Mon Nov 2 17:10:23 2020 -0800 drm/msm/dp: do not notify audio subsystem if sink doesn't support audio For sinks that do not support audio, there is no need to notify audio subsystem of the connection event. This will make sure that audio routes only to the primary display when connected to such sinks. changes in v2: - Added fixes tag - Removed nested if condition and removed usage of global pointer Fixes: d13e36d7d222 ("drm/msm/dp: add audio support for Display Port on MSM") Signed-off-by: Abhinav Kumar Signed-off-by: Rob Clark commit 26b8d66a399e625f3aa2c02ccbab1bff2e00040c Author: Kuogee Hsieh Date: Tue Nov 3 12:49:02 2020 -0800 drm/msm/dp: promote irq_hpd handle to handle link training correctly Some dongles require link training done at irq_hpd request instead of plugin request. This patch promote irq_hpd handler to handle link training and setup hpd_state correctly. Signed-off-by: Kuogee Hsieh Signed-off-by: Rob Clark commit ea530388e64bd584645f2d89e40ca7dffade8eff Author: Kuogee Hsieh Date: Tue Nov 3 12:49:01 2020 -0800 drm/msm/dp: skip checking LINK_STATUS_UPDATED bit Some dongle will not clear LINK_STATUS_UPDATED bit after DPCD read which cause link training failed. This patch just read 6 bytes of DPCD link status from sink and return without checking LINK_STATUS_UPDATED bit. Only 8 bits are used to represent link rate at sinker DPCD. The really link rate is 2.7Mb times the 8 bits value. For example, 0x0A at DPCD is equal to 2.7Gb (10 * 2.7Mb). This patch also convert 8 bits value of DPCD to really link rate to fix worng link rate error during phy compliance test. Fixes: 6625e2637d93 ("drm/msm/dp: DisplayPort PHY compliance tests fixup") Signed-off-by: Kuogee Hsieh Signed-off-by: Rob Clark commit 231a04fcc6cb5b0e5f72c015d36462a17355f925 Author: Kuogee Hsieh Date: Tue Nov 3 12:49:00 2020 -0800 drm/msm/dp: deinitialize mainlink if link training failed DP compo phy have to be enable to start link training. When link training failed phy need to be disabled so that next link traning can be proceed smoothly at next plug in. This patch de-initialize mainlink to disable phy if link training failed. This prevent system crash due to disp_cc_mdss_dp_link_intf_clk stuck at "off" state. This patch also perform checking power_on flag at dp_display_enable() and dp_display_disable() to avoid crashing when unplug cable while display is off. Signed-off-by: Kuogee Hsieh Signed-off-by: Rob Clark commit 62671d2ef24bca1e2e1709a59a5bfb5c423cdc8e Author: Kuogee Hsieh Date: Tue Nov 3 14:53:36 2020 -0800 drm/msm/dp: fixes wrong connection state caused by failure of link train Connection state is not set correctly happen when either failure of link train due to cable unplugged in the middle of aux channel reading or cable plugged in while in suspended state. This patch fixes these problems. This patch also replace ST_SUSPEND_PENDING with ST_DISPLAY_OFF. Changes in V2: -- Add more information to commit message. Changes in V3: -- change base Changes in V4: -- add Fixes tag Signed-off-by: Kuogee Hsieh Signed-off-by: Rob Clark commit 19e52bcb27c2ba140699d2230d722366d7d048a1 Author: Kuogee Hsieh Date: Tue Nov 3 14:53:35 2020 -0800 drm/msm/dp: return correct connection status after suspend During suspend, dp host controller and hpd block are disabled due to both ahb and aux clock are disabled. Therefore hpd plug/unplug interrupts will not be generated. At dp_pm_resume(), reinitialize both dp host controller and hpd block so that hpd plug/unplug interrupts will be generated and handled by driver so that hpd connection state is updated correctly. This patch will fix link training flaky issues. Changes in v2: -- use container_of to cast correct dp_display_private pointer at both dp_pm_suspend() and dp_pm_resume(). Changes in v3: -- replace hpd_state atomic_t with u32 Changes in v4 -- call dp_display_host_deinit() at dp_pm_suspend() -- call dp_display_host_init() at msm_dp_display_enable() -- fix phy->init_count unbalance which causes link training failed Changes in v5 -- add Fixes tag Fixes: 8ede2ecc3e5e (drm/msm/dp: Add DP compliance tests on Snapdragon Chipsets) Tested-by: Stephen Boyd Signed-off-by: Kuogee Hsieh Signed-off-by: Rob Clark commit 670c90def03429a228229420fa48a17913fdcc0d Author: Ulf Hansson Date: Tue Nov 3 16:06:27 2020 +0100 cpuidle: psci: Enable suspend-to-idle for PSCI OSI mode To select domain idlestates for cpuidle-psci when OSI mode has been enabled, the PM domains via genpd are being managed through runtime PM. This works fine for the regular idlepath, but it doesn't during system wide suspend. More precisely, the domain idlestates becomes temporarily disabled, which is because the PM core disables runtime PM for devices during system wide suspend. Later in the system suspend phase, genpd intends to deal with this from its ->suspend_noirq() callback, but this doesn't work as expected for a device corresponding to a CPU, because the domain idlestates needs to be selected on a per CPU basis (the PM core doesn't invoke the callbacks like that). To address this problem, let's enable the syscore flag for the corresponding CPU device that becomes successfully attached to its PM domain (applicable only in OSI mode). This informs the PM core to skip invoke the system wide suspend/resume callbacks for the device, thus also prevents genpd from screwing up its internal state of it. Moreover, to properly select a domain idlestate for the CPUs during suspend-to-idle, let's assign a specific ->enter_s2idle() callback for the corresponding domain idlestate (applicable only in OSI mode). From that callback, let's invoke dev_pm_genpd_suspend|resume(), as this allows a domain idlestate to be selected for the current CPU by genpd. Signed-off-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki commit b9795a3e4e1cbf521bbb5ef240eb47803c303b02 Author: Ulf Hansson Date: Tue Nov 3 16:06:26 2020 +0100 PM: domains: Enable dev_pm_genpd_suspend|resume() for suspend-to-idle The dev_pm_genpd_suspend|resume() have so far only been used during the syscore suspend/resume phases. However, during suspend-to-idle, where the syscore phases doesn't exist, similar operations are sometimes needed. An existing example are the timekeeping_suspend|resume() functions, which are being called both through a registered syscore ops during the syscore phases, but also as regular functions calls from cpuidle (via tick_freeze()) during suspend-to-idle. For similar reasons, let's enable the dev_pm_genpd_suspend|resume() APIs to be re-used for corresponding CPU devices that are attached to a genpd, during suspend-to-idle. Signed-off-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki commit fc51989062138744b56e47190915ce68484e73f3 Author: Ulf Hansson Date: Tue Nov 3 16:06:25 2020 +0100 PM: domains: Rename pm_genpd_syscore_poweroff|poweron() To better describe what the pm_genpd_syscore_poweroff|poweron() functions actually do, let's rename them to dev_pm_genpd_suspend|resume() and update the rather few callers of them accordingly (a couple of clocksource drivers). Moreover, let's take the opportunity to add some documentation of these exported functions, as that is currently missing. Signed-off-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki commit 6c37cb9fa67650c51b3a70c53202be31730d7e29 Author: Lee Jones Date: Tue Nov 3 15:28:37 2020 +0000 soc: tegra: fuse: speedo-tegra210: Remove a group of set but unused variables Fixes the following W=1 kernel build warning(s): drivers/soc/tegra/fuse/speedo-tegra210.c: In function ‘tegra210_init_speedo_data’: drivers/soc/tegra/fuse/speedo-tegra210.c:105:56: warning: variable ‘soc_iddq’ set but not used [-Wunused-but-set-variable] drivers/soc/tegra/fuse/speedo-tegra210.c:105:46: warning: variable ‘gpu_iddq’ set but not used [-Wunused-but-set-variable] drivers/soc/tegra/fuse/speedo-tegra210.c:105:36: warning: variable ‘cpu_iddq’ set but not used [-Wunused-but-set-variable] Cc: Thierry Reding Cc: Jonathan Hunter Cc: linux-tegra@vger.kernel.org Signed-off-by: Lee Jones [treding@nvidia.com: remove unnecessary reads altogether] Signed-off-by: Thierry Reding commit ce034072f9a125b913d4869d614e414784334b8a Author: Lee Jones Date: Tue Nov 3 15:28:26 2020 +0000 soc: tegra: fuse: speedo-tegra124: Remove some set but unused variables Fixes the following W=1 kernel build warning(s): drivers/soc/tegra/fuse/speedo-tegra124.c: In function ‘tegra124_init_speedo_data’: drivers/soc/tegra/fuse/speedo-tegra124.c:105:38: warning: variable ‘soc_iddq_value’ set but not used [-Wunused-but-set-variable] drivers/soc/tegra/fuse/speedo-tegra124.c:105:22: warning: variable ‘gpu_iddq_value’ set but not used [-Wunused-but-set-variable] drivers/soc/tegra/fuse/speedo-tegra124.c:105:6: warning: variable ‘cpu_iddq_value’ set but not used [-Wunused-but-set-variable] Cc: Thierry Reding Cc: Jonathan Hunter Cc: linux-tegra@vger.kernel.org Signed-off-by: Lee Jones [treding@nvidia.com: remove unnecessary reads altogether] Signed-off-by: Thierry Reding commit b56a352c0d3ca4640c3c6364e592be360ac0d6d4 Author: Lukasz Luba Date: Tue Nov 3 09:06:00 2020 +0000 PM: EM: Update Energy Model with new flag indicating power scale Update description and meaning of a new flag, which indicates the type of power scale used for a registered Energy Model (EM) device. Reviewed-by: Quentin Perret Signed-off-by: Lukasz Luba Signed-off-by: Rafael J. Wysocki commit f2c90b12e700fff6a0b5a1c32f446f05f9d0890c Author: Lukasz Luba Date: Tue Nov 3 09:05:59 2020 +0000 PM: EM: update the comments related to power scale The Energy Model supports power values expressed in milli-Watts or in an 'abstract scale'. Update the related comments is the code to reflect that state. Reviewed-by: Quentin Perret Signed-off-by: Lukasz Luba Signed-off-by: Rafael J. Wysocki commit 5a64f775691647c242aa40d34f3512e7b179a921 Author: Lukasz Luba Date: Tue Nov 3 09:05:58 2020 +0000 PM: EM: Clarify abstract scale usage for power values in Energy Model The Energy Model (EM) can store power values in milli-Watts or in abstract scale. This might cause issues in the subsystems which use the EM for estimating the device power, such as: - mixing of different scales in a subsystem which uses multiple (cooling) devices (e.g. thermal Intelligent Power Allocation (IPA)) - assuming that energy [milli-Joules] can be derived from the EM power values which might not be possible since the power scale doesn't have to be in milli-Watts To avoid misconfiguration add the requisite documentation to the EM and related subsystems: EAS and IPA. Signed-off-by: Lukasz Luba Signed-off-by: Rafael J. Wysocki commit 5c0e684074d573c75145d1064f92c1be615901ef Author: Bernard Zhao Date: Tue Nov 10 00:03:13 2020 -0800 amd/display/amdgpu_dm: delete same check in if condition In function amdgpu_dm_connector_get_modes, drm_edid_is_valid will check weather (!edid), no need to check again in the if branch. Reviewed-by: Harry Wentland Signed-off-by: Bernard Zhao Signed-off-by: Alex Deucher commit e5285ac82d7fd5ae0d7b290d4aa08718e4197b2b Author: Tian Tao Date: Tue Nov 10 19:34:58 2020 +0800 drm/amd/pm: Use kmemdup instead of kmalloc and memcpy Fixes coccicheck warning: drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_processpptables.c:255: 36-43: WARNING opportunity for kmemdup Signed-off-by: Tian Tao Signed-off-by: Alex Deucher commit 03cc904cb1903912159ede500fb371db90702db7 Author: Tao Zhou Date: Tue Nov 10 11:51:14 2020 +0800 drm/amdgpu: update gfx golden setting for dimgrey_cavefish Set LDS_CONFIG to 0x20 on dimgrey_cavefish to fix GPU hang. Signed-off-by: Tao Zhou Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit f4d4f53ffd909bb8066e7e815a99b7ee9a7a2b92 Author: Bhaskar Chowdhury Date: Tue Nov 10 02:37:25 2020 +0530 drivers: amdgpu: amdgpu_display: Fixed the spelling of falg to flag s/falg/flag/p Reviewed-by: Christian König Signed-off-by: Bhaskar Chowdhury Signed-off-by: Alex Deucher commit dda818a09bf032c60b948f2a05eb39990d2f4a1e Author: Alex Deucher Date: Fri Nov 6 09:50:22 2020 -0500 drm/amdgpu/pm/smu11: cache smu firmware version So we print the proper SMU firmware version in debugfs, ioctls, etc. for vangogh. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit c15015b8310a224b636fe66bbde3f7a73df7c01d Author: Alex Deucher Date: Fri Nov 6 09:49:10 2020 -0500 drm/amdgpu/pm/smu12: cache smu firmware version So we print the proper SMU firmware version in debugfs, ioctls, etc. for Renoir. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit a5a52a43eac06869191214a0f2384d95dc395560 Author: Lee Jones Date: Fri Nov 6 21:49:46 2020 +0000 drm/amd/amdgpu/amdgpu_kms: Remove 'struct drm_amdgpu_info_device dev_info' from the stack Place it on the heap instead. Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c: In function ‘amdgpu_info_ioctl’: drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c:979:1: warning: the frame size of 1128 bytes is larger than 1024 bytes [-Wframe-larger-than=] Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 20b15c0ad7c5c9daf1d220ac35bd758d53154e46 Author: Lee Jones Date: Fri Nov 6 21:49:42 2020 +0000 drm/amd/display/dc/basics/fixpt31_32: Move variables to where they're used Also rid some unused ones. This patch solves 2000 warnings! Fixes the following W=1 kernel build warning(s): In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:33, from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30, from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h:35, from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_helpers.c:35: At top level: drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:76:32: warning: ‘dc_fixpt_ln2_div_2’ defined but not used [-Wunused-const-variable=] 76 | static const struct fixed31_32 dc_fixpt_ln2_div_2 = { 1488522236LL }; | ^~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:75:32: warning: ‘dc_fixpt_ln2’ defined but not used [-Wunused-const-variable=] 75 | static const struct fixed31_32 dc_fixpt_ln2 = { 2977044471LL }; | ^~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:74:32: warning: ‘dc_fixpt_e’ defined but not used [-Wunused-const-variable=] 74 | static const struct fixed31_32 dc_fixpt_e = { 11674931555LL }; | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:73:32: warning: ‘dc_fixpt_two_pi’ defined but not used [-Wunused-const-variable=] 73 | static const struct fixed31_32 dc_fixpt_two_pi = { 26986075409LL }; | ^~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:72:32: warning: ‘dc_fixpt_pi’ defined but not used [-Wunused-const-variable=] 72 | static const struct fixed31_32 dc_fixpt_pi = { 13493037705LL }; | ^~~~~~~~~~~ Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 22f453fbd5d089cd6711352d3b8267583a78c40d Author: Lee Jones Date: Fri Nov 6 21:49:44 2020 +0000 drm/amd/amdgpu/amdgpu_device: Provide documentation for 'reg_addr' params Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:594: warning: Function parameter or member 'reg_addr' not described in 'amdgpu_device_indirect_rreg' drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:624: warning: Function parameter or member 'reg_addr' not described in 'amdgpu_device_indirect_rreg64' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit debbcf9f3b85dadb0452073f057389ac4be57394 Author: Bhaskar Chowdhury Date: Mon Nov 9 14:08:24 2020 +0530 drivers: amdgpu: amdgpu_display.c: Fix a spelling doens\'t to doesn\'t s/doens't/doesn't/p Signed-off-by: Bhaskar Chowdhury Signed-off-by: Alex Deucher commit de21e4aeb2b26128dcc5be1bcb2fafa73d041e51 Author: Bokun Zhang Date: Mon Nov 9 14:09:03 2020 -0500 drm/amd/amdgpu: Add rev_id workaround logic for SRIOV setup - When we are under SRIOV setup, the rev_id cannot be read properly. Therefore, we will return default value for it Signed-off-by: Bokun Zhang Reviewed-by: Monk Liu Signed-off-by: Alex Deucher commit 25a35065c066496935217748b1662a7fcf26ed58 Author: Bokun Zhang Date: Mon Nov 9 13:59:27 2020 -0500 drm/amd/amdgpu: Fix incorrect logic to increment VCN doorbell index - The original logic uses a counter based index assignment, which is incorrect if we only assign VCN1 to this VF but no VCN0 The doorbell index is absolute, so we can calculate it by using index variable i and j Signed-off-by: Bokun Zhang Reviewed-by: Monk Liu Signed-off-by: Alex Deucher commit 880af2eaedd3f63d413a439ef29edcc0a5fbdc73 Author: Yongqiang Sun Date: Sun Nov 1 13:05:11 2020 -0500 drm/amd/display: cap dpp dto phase not more than modulo. [Why] 4K monitor shows corruption if dpp dto phase is larger than modulo. [How] cap phase value never larger than modulo. Signed-off-by: Yongqiang Sun Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit 4b0b1d05265b044472a23b76d5fda8d7fb218144 Author: Yongqiang Sun Date: Fri Oct 30 09:29:07 2020 -0400 drm/amd/display: check actual clock value. [Why] Actual dpp/disp clock PMFW set are always equal or more than requested. Need to cache the actual clock for debugging purpose. [How] Add actuall dpp/disp clk in clock manager and save it when set clocks. Add an ASSERT in case of actual clock less than requested. Signed-off-by: Yongqiang Sun Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit b5fce050f041618cc6f9185d90c84f5d9599ce45 Author: Aric Cyr Date: Mon Nov 2 10:20:29 2020 -0500 drm/amd/display: 3.2.111 Signed-off-by: Aric Cyr Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit 45b790dd8552bda5140f51bf5c85372f3c082f64 Author: Anthony Koo Date: Sun Nov 1 15:49:31 2020 -0500 drm/amd/display: [FW Promotion] Release 0.0.41 Signed-off-by: Anthony Koo Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit 4f6274b3b9a9d5395b1a5b757132a81023236808 Author: Alvin Lee Date: Fri Oct 30 13:49:46 2020 -0400 drm/amd/display: Check other planes for iflip only if GSL already enabled [Why] We don't want GSL to be enabled when only updating plane address [How] Only check other pipes for immediate flip if GSL is already enabled Signed-off-by: Alvin Lee Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit 5c68c65295de0bc7856580e8b16d8fa0782ae2d3 Author: Victor Lu Date: Fri Oct 23 13:38:58 2020 -0400 drm/amd/display: Explicitly disable cursor when disabling CRTC [why] On DCE, the cursor is not being disabled on commits where there is no CRTC or FB enabled. [how] Explicitly disable the cursor in the commit tail only if the pending commit disables the CRTC. Signed-off-by: Victor Lu Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit c07cbc1f04ecba00f99e313de3190db5e7438e81 Author: Yongqiang Sun Date: Mon Oct 26 12:33:24 2020 -0400 drm/amd/display: update dpp dto phase and modulo. [Why & How] Program modulo with ref dpp clk Mhz/10. Program phase with pipe dpp clk Mhz /10. DMUB FW could use these value to determine optimization clk for PSR power saving. Signed-off-by: Yongqiang Sun Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit c6160900239e20d32ee9025fca7d926f8744f448 Author: Jing Zhou Date: Wed Oct 28 15:50:53 2020 +0800 drm/amd/display: force use sRGB for video TF is sRGB or BT709 [Why] When mpo enabled, video comes is 709. Desktop use sRGB. So color change easily noticeable especially when switch between mpo/non-mpo. [How] Force use sRGB for video TF is sRGB or BT709. DCN1/DCN2 use predefined type with YUV. DCN3 use distributed points type with YUV. Signed-off-by: Jing Zhou Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit e9917ef822bdfa9b881c87934f160a3e48125f00 Author: Aric Cyr Date: Thu Oct 29 17:40:51 2020 -0400 drm/amd/display: Only wait for flip pending on immediate flips [Why] We want to make sure all immediate flips are completed before locking the pipes, but not pipes that are not flip immediate as they will be locked by the OTG [How] Skip non flip immediate pipes when checking for flip pending. Signed-off-by: Aric Cyr Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit 06d55ffaeaea9badfee7376100759f1f86397e94 Author: Eric Bernstein Date: Mon Oct 26 13:33:28 2020 -0400 drm/amd/display: Move common speakersToChannels definition to hw_shared.h Signed-off-by: Eric Bernstein Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit 74d7f445e8a1b4d81d6c511ace743482cc00cbe1 Author: Dmytro Laktyushkin Date: Wed Oct 28 10:05:36 2020 -0400 drm/amd/display: correct dml dsc bpc assignment Signed-off-by: Dmytro Laktyushkin Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit 1d496907f1c50c1c5f9617d4b7628a635fdd9cb1 Author: Krunoslav Kovac Date: Tue Oct 20 16:23:15 2020 -0400 drm/amd/display: Engage PSR synchronously [Why & How] The intended use is to force PSR into active state and ignore all events until explicit EXIT. A new event force_static is added to power module. It is then sent to FW. Signed-off-by: Krunoslav Kovac Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit fa896813b441115545349752e15a7d66f3fa2240 Author: Isabel Zhang Date: Fri Oct 23 11:55:32 2020 -0400 drm/amd/display: Prevent freesync power optimization during validation [Why] Due to the freesync power optimization increasing vtotal, the driver believes that MPO is supported. MPO is turned on. Freesync then exits, MPO can no longer be supported and immediate flip fails. This causes corruption on the panel. [How] Avoid the freesync optimization when doing validation so in the case freesync exits, driver can still support the configuration. Signed-off-by: Isabel Zhang Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit 103cd0b1295c2bad29d5a6bc3ec4efc7d7fcd840 Author: Isabel Zhang Date: Wed Oct 21 14:01:26 2020 -0400 drm/amd/display: Add fallback to prefetch mode 1 if 0 fails [Why] In some cases, prefetch mode 0 is unsupported but prefetch 1 is supported. Due to previous change always forcing prefetch mode to 0, we are failing bandwidth validation in cases where we should not. [How] By default try prefetch mode 0 but in the case validation fails, attempt to do prefetch mode 1 to see if it is supported. Signed-off-by: Isabel Zhang Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit 8301f6b990ada8f5e9b23ed7d4a0d60b00d49238 Author: Tianci.Yin Date: Fri Nov 6 14:56:35 2020 +0800 drm/amdgpu: enable DCN for navi10 headless SKU There is a NULL pointer crash when DCN disabled on headless SKU. On normal SKU, the variable adev->ddev.mode_config.funcs is initialized in dm_hw_init(), and it is fine to access it in amdgpu_device_resume(). But on headless SKU, DCN is disabled, the funcs variable is not initialized, then crash arises. Enable DCN to fix this issue. Reviewed-by: Alex Deucher Reviewed-by: Guchun Chen Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit c250d50fe2ce627ca9805d9c8ac11cbbf922a4a6 Author: Lukasz Luba Date: Thu Nov 5 12:50:01 2020 +0000 PM: EM: Add a flag indicating units of power values in Energy Model There are different platforms and devices which might use different scale for the power values. Kernel sub-systems might need to check if all Energy Model (EM) devices are using the same scale. Address that issue and store the information inside EM for each device. Thanks to that they can be easily compared and proper action triggered. Suggested-by: Daniel Lezcano Reviewed-by: Quentin Perret Signed-off-by: Lukasz Luba Signed-off-by: Rafael J. Wysocki commit 3ac2bc7609f6844d8a911658749b8a4064ec5ccd Author: Ramesh Errabolu Date: Fri Nov 6 13:01:20 2020 -0600 drm/amd/amdgpu: Import amdgpu_amdkfd_gfx_v9 header file into implementation [Why] Prevent compiler warnings when building amdgpu kernel module [How] Add the include directive for amdgpu_amdkfd_gfx_v9 header file Fixes: aeee2a48ec9239 ("drm/amd/amdgpu: Enable arcturus devices to access the method kgd_gfx_v9_get_cu_occupancy that is already defined") Reviewed-by: Harish Kasiviswanathan Signed-off-by: Ramesh Errabolu Signed-off-by: Alex Deucher Reported-by: kernel test robot commit 9294996f0be40e9da818ed891c82397ab63c00d0 Author: Arnd Bergmann Date: Mon Oct 26 17:49:21 2020 +0100 firmware: tegra: fix strncpy()/strncat() confusion The way that bpmp_populate_debugfs_inband() uses strncpy() and strncat() makes no sense since the size argument for the first is insufficient to contain the trailing '/' and the second passes the length of the input rather than the output, which triggers a warning: In function 'strncat', inlined from 'bpmp_populate_debugfs_inband' at ../drivers/firmware/tegra/bpmp-debugfs.c:422:4: include/linux/string.h:289:30: warning: '__builtin_strncat' specified bound depends on the length of the source argument [-Wstringop-overflow=] 289 | #define __underlying_strncat __builtin_strncat | ^ include/linux/string.h:367:10: note: in expansion of macro '__underlying_strncat' 367 | return __underlying_strncat(p, q, count); | ^~~~~~~~~~~~~~~~~~~~ drivers/firmware/tegra/bpmp-debugfs.c: In function 'bpmp_populate_debugfs_inband': include/linux/string.h:288:29: note: length computed here 288 | #define __underlying_strlen __builtin_strlen | ^ include/linux/string.h:321:10: note: in expansion of macro '__underlying_strlen' 321 | return __underlying_strlen(p); Simplify this to use an snprintf() instead. Fixes: 5e37b9c137ee ("firmware: tegra: Add support for in-band debug") Signed-off-by: Arnd Bergmann Acked-by: Jon Hunter Signed-off-by: Thierry Reding commit 9713158cb2a918c3f6f5522eed23cdeb61f22e75 Author: Bhawanpreet Lakha Date: Thu Nov 5 13:37:35 2020 -0500 drm/amdgpu: Add and use seperate reg headers for dcn302 Currently we are using dcn3 reg headers for dcn302. The offsets are different between the two so they need seperate headers. Add dcn302 header files and use these instead of dcn3 header Signed-off-by: Bhawanpreet Lakha Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 29d36369a59fd364191eec102296624430f759e8 Author: Roman Li Date: Mon Oct 26 17:12:34 2020 -0400 drm/amdgpu: add ta firmware load for green-sardine [Why] In preparation to enabling hdcp on green sardine. [How] Add green-sardine ta f/w loading in psp_v12 Signed-off-by: Roman Li Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 5771de5d5b3bfaf279e5c262a113d4b6fbe54355 Author: Rob Clark Date: Tue Nov 10 10:39:46 2020 -0800 drm/msm/a5xx: Clear shadow on suspend Similar to the previous patch, clear shadow on suspend to avoid timeouts waiting for ringbuffer space. Fixes: 8907afb476ac ("drm/msm: Allow a5xx to mark the RPTR shadow as privileged") Signed-off-by: Rob Clark commit e8b0b994c3a5881f0648d53f90435120089c56ad Author: Rob Clark Date: Tue Nov 10 10:23:06 2020 -0800 drm/msm/a6xx: Clear shadow on suspend Clear the shadow rptr on suspend. Otherwise, when we resume, we can have a stale value until CP_WHERE_AM_I executes. If we suspend near the ringbuffer wraparound point, this can lead to a chicken/egg situation where we are waiting for ringbuffer space to write the CP_WHERE_AM_I (or CP_INIT) packet, because we mistakenly believe that the ringbuffer is full (due to stale rptr value in the shadow). Fixes errors like: [drm:adreno_wait_ring [msm]] *ERROR* timeout waiting for space in ringbuffer 0 in the resume path. Fixes: d3a569fccfa0 ("drm/msm: a6xx: Use WHERE_AM_I for eligible targets") Signed-off-by: Rob Clark commit 8a9d881f22d7a0e06a46a326d0880fb45a06d3b5 Author: Kim Phillips Date: Tue Oct 27 07:23:57 2020 +0000 powercap: RAPL: Add AMD Fam19h RAPL support AMD Family 19h's RAPL MSRs are identical to Family 17h's. Extend Family 17h's support to Family 19h. Signed-off-by: Kim Phillips Signed-off-by: Victor Ding Signed-off-by: Rafael J. Wysocki commit 43756a298928c9a4e8201baaeb205c0c103728af Author: Victor Ding Date: Tue Oct 27 07:23:56 2020 +0000 powercap: Add AMD Fam17h RAPL support Enable AMD Fam17h RAPL support for the power capping framework. The support is as per AMD Fam17h Model31h (Zen2) and model 00-ffh (Zen1) PPR. Tested by comparing the results of following two sysfs entries and the values directly read from corresponding MSRs via /dev/cpu/[x]/msr: /sys/class/powercap/intel-rapl/intel-rapl:0/energy_uj /sys/class/powercap/intel-rapl/intel-rapl:0/intel-rapl:0:0/energy_uj Signed-off-by: Victor Ding Acked-by: Kim Phillips [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki commit a2c32fa736a590a7ab6e9601066a6772ae09869b Author: Victor Ding Date: Tue Oct 27 07:23:55 2020 +0000 powercap/intel_rapl_msr: Convert rapl_msr_priv into pointer Changes the static struct rapl_msr_priv to a pointer to allow using a different RAPL MSR interface, preparing for supporting AMD's RAPL MSR interface. No functional changes. Signed-off-by: Victor Ding Acked-by: Kim Phillips [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki commit 298ed2b31f55280624417f80a09de0e28db8f786 Author: Victor Ding Date: Tue Oct 27 07:23:54 2020 +0000 x86/msr-index: sort AMD RAPL MSRs by address MSRs in the rest of this file are sorted by their addresses; fixing the two outliers. No functional changes. Signed-off-by: Victor Ding Acked-by: Kim Phillips Signed-off-by: Rafael J. Wysocki commit 1ccaa898868d1971a6480d7d55668de522f5847f Author: Ching-Te Ku Date: Mon Nov 9 16:59:09 2020 +0800 rtw88: coex: simplify the setting and condition about WLAN TX limitation Life time related setting is related to WLAN active port number, not its mode. The original setting may cause poor WLAN performance. In most case, WLAN TX limitation is helpful for BT in coexistence scenario, especially for A2DP quality. So this is necessary to fix the setting and constraint it. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201109085909.9143-12-pkshih@realtek.com commit 21020fc80d3bad1400cc0b7df347a5a67ce7ffe4 Author: Ching-Te Ku Date: Mon Nov 9 16:59:08 2020 +0800 rtw88: coex: add debug message Since coexistence issue is related to WL/BT and each digital/analog/rf, and these issues are often critical with low failure rate, add more debugging information is helpful to clarify issues. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201109085909.9143-11-pkshih@realtek.com commit ec06c4adac960eb22a400cd7658e9da495fd8de4 Author: Ching-Te Ku Date: Mon Nov 9 16:59:07 2020 +0800 rtw88: coex: update WLAN 5G AFH parameter for 8822b Adaptive Frequency Hopping(AFH) is a method of transmitting radio signals by rapidly changing the carrier frequency among many distinct frequencies, which can avoid interference. Add this feature to update AFH parameter for 8822b. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201109085909.9143-10-pkshih@realtek.com commit 150ce8e34a45e6ebe1f3343b8a7bcce5bb9eab39 Author: Ching-Te Ku Date: Mon Nov 9 16:59:06 2020 +0800 rtw88: coex: change the parameter for A2DP when WLAN connecting The original mechanism may cause A2DP glitch during WiFi connecting AP. Because the original TDMA may decrease too much A2DP slot. This patch add a timer and variable to let the case A2DP + WL_Connecting performed more well. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201109085909.9143-9-pkshih@realtek.com commit 37a59b940fc61cd47ea178079d12060ea60f8239 Author: Ching-Te Ku Date: Mon Nov 9 16:59:05 2020 +0800 rtw88: coex: modified for BT info notify Add counter to count BT info C2H command for debug usage. It could present the C2H channel situation. Fix BT IQK state decision condition for counting. The original condition is wrong, it would cause coexistence mechanism going to the wrong strategy. New format supports getting TDMA parameter from WL firmware, since coexistence needs current TDMA parameter to decide strategy. Remove unnecessary operations about scoreboard, it is not a must for current version. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201109085909.9143-8-pkshih@realtek.com commit 32c3a8c7d91f1de83d570b9f0f8ceb20a7c8a270 Author: Ching-Te Ku Date: Mon Nov 9 16:59:04 2020 +0800 rtw88: coex: add separate flag for manual control The original stop_dm flag is shared with the wifi and coexistence mechanism internal usage, which represent two meanings, and makes developers hard to debug. Add a new flag manual_control for coexistence mechanism usage only. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201109085909.9143-7-pkshih@realtek.com commit ae8732d7673d455a2f4c64c7628fc36605ba6921 Author: Ching-Te Ku Date: Mon Nov 9 16:59:03 2020 +0800 rtw88: coex: Modify the timing of set_ant_path/set_rf_para To make sure the related ANT/RF_PARA setting will be expected result in COEX. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201109085909.9143-6-pkshih@realtek.com commit d8350768d629acaa009b32580e603fb4df4539df Author: Ching-Te Ku Date: Mon Nov 9 16:59:02 2020 +0800 rtw88: coex: coding style adjustment Adjust space and comments, and fix "line over 80 characters" warnings reported by checkpatch. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201109085909.9143-5-pkshih@realtek.com commit 1d82c49764aa606ceb769585a23ccb7bf3a863ab Author: Ching-Te Ku Date: Mon Nov 9 16:59:01 2020 +0800 rtw88: coex: reduce magic number Use macro definition to replace magic number. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201109085909.9143-4-pkshih@realtek.com commit 19ecd61d2c3c5afbc90c2694821c1ac0302f4fd5 Author: Ching-Te Ku Date: Mon Nov 9 16:59:00 2020 +0800 rtw88: coex: update coex parameter to improve A2DP quality Update COEX parameters and logic to enhance WL/BT performance while WL_Busy + A2DP in a less interference environment. It can avoid the interference comes cross from each other and earned more performance. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201109085909.9143-3-pkshih@realtek.com commit 3f3fef5f6a8ff96f1bd7fc65a76fbe4ccc87b14a Author: Ching-Te Ku Date: Mon Nov 9 16:58:59 2020 +0800 rtw88: coex: fixed some wrong register definition and setting Some register definition and bit definition were incorrect. e.g. REG_BT_COEX_V2 should be word alignment to meet the coding style. e.g. set REG_BT_TDMA_TIME[5:0]=0x5, But the original is to set REG_BT_TDMA_TIME[7:0]=0x5. This will cause unexpected hardware behavior. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201109085909.9143-2-pkshih@realtek.com commit dd90fc4630d285db429e393522d7b3844fbf79e9 Author: Wang Qing Date: Sat Nov 7 16:40:37 2020 +0800 rtlwifi: fix spelling typo of workaround workarould -> workaround Signed-off-by: Wang Qing Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1604738439-24794-1-git-send-email-wangqing@vivo.com commit abd131a19f6b862dac3eacba153e472ffc96b8f7 Author: Marek Vasut Date: Tue Nov 3 19:09:41 2020 +0100 rsi: Clean up loop in the interrupt handler The inner do { ... } while loop is completely useless, all it does is iterate over a switch-case statement, one bit at a time. This can easily be replaced by simple if (status & bit) { ... } tests for each bit. No functional change. Signed-off-by: Marek Vasut Cc: Angus Ainslie Cc: David S. Miller Cc: Jakub Kicinski Cc: Kalle Valo Cc: Lee Jones Cc: Martin Kepplinger Cc: Sebastian Krzyszkowiak Cc: Siva Rebbagondla Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201103180941.443528-2-marex@denx.de commit 287431463e786766e05e4dc26d0a11d5f8ac8815 Author: Marek Vasut Date: Tue Nov 3 19:09:40 2020 +0100 rsi: Move card interrupt handling to RX thread The interrupt handling of the RS911x is particularly heavy. For each RX packet, the card does three SDIO transactions, one to read interrupt status register, one to RX buffer length, one to read the RX packet(s). This translates to ~330 uS per one cycle of interrupt handler. In case there is more incoming traffic, this will be more. The drivers/mmc/core/sdio_irq.c has the following comment, quote "Just like traditional hard IRQ handlers, we expect SDIO IRQ handlers to be quick and to the point, so that the holding of the host lock does not cover too much work that doesn't require that lock to be held." The RS911x interrupt handler does not fit that. This patch therefore changes it such that the entire IRQ handler is moved to the RX thread instead, and the interrupt handler only wakes the RX thread. This is OK, because the interrupt handler only does things which can also be done in the RX thread, that is, it checks for firmware loading error(s), it checks buffer status, it checks whether a packet arrived and if so, reads out the packet and passes it to network stack. Moreover, this change permits removal of a code which allocated an skbuff only to get 4-byte-aligned buffer, read up to 8kiB of data into the skbuff, queue this skbuff into local private queue, then in RX thread, this buffer is dequeued, the data in the skbuff as passed to the RSI driver core, and the skbuff is deallocated. All this is replaced by directly calling the RSI driver core with local buffer. Signed-off-by: Marek Vasut Cc: Angus Ainslie Cc: David S. Miller Cc: Jakub Kicinski Cc: Kalle Valo Cc: Lee Jones Cc: Martin Kepplinger Cc: Sebastian Krzyszkowiak Cc: Siva Rebbagondla Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Tested-by: Martin Kepplinger Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201103180941.443528-1-marex@denx.de commit 4add4d988f95f47493500a7a19c623827061589b Author: Tsuchiya Yuto Date: Wed Oct 28 23:23:46 2020 +0900 mwifiex: pcie: skip cancel_work_sync() on reset failure path If a reset is performed, but even the reset fails for some reasons (e.g., on Surface devices, the fw reset requires another quirks), cancel_work_sync() hangs in mwifiex_cleanup_pcie(). # firmware went into a bad state [...] [ 1608.281690] mwifiex_pcie 0000:03:00.0: info: shutdown mwifiex... [ 1608.282724] mwifiex_pcie 0000:03:00.0: rx_pending=0, tx_pending=1, cmd_pending=0 [ 1608.292400] mwifiex_pcie 0000:03:00.0: PREP_CMD: card is removed [ 1608.292405] mwifiex_pcie 0000:03:00.0: PREP_CMD: card is removed # reset performed after firmware went into a bad state [ 1609.394320] mwifiex_pcie 0000:03:00.0: WLAN FW already running! Skip FW dnld [ 1609.394335] mwifiex_pcie 0000:03:00.0: WLAN FW is active # but even the reset failed [ 1619.499049] mwifiex_pcie 0000:03:00.0: mwifiex_cmd_timeout_func: Timeout cmd id = 0xfa, act = 0xe000 [ 1619.499094] mwifiex_pcie 0000:03:00.0: num_data_h2c_failure = 0 [ 1619.499103] mwifiex_pcie 0000:03:00.0: num_cmd_h2c_failure = 0 [ 1619.499110] mwifiex_pcie 0000:03:00.0: is_cmd_timedout = 1 [ 1619.499117] mwifiex_pcie 0000:03:00.0: num_tx_timeout = 0 [ 1619.499124] mwifiex_pcie 0000:03:00.0: last_cmd_index = 0 [ 1619.499133] mwifiex_pcie 0000:03:00.0: last_cmd_id: fa 00 07 01 07 01 07 01 07 01 [ 1619.499140] mwifiex_pcie 0000:03:00.0: last_cmd_act: 00 e0 00 00 00 00 00 00 00 00 [ 1619.499147] mwifiex_pcie 0000:03:00.0: last_cmd_resp_index = 3 [ 1619.499155] mwifiex_pcie 0000:03:00.0: last_cmd_resp_id: 07 81 07 81 07 81 07 81 07 81 [ 1619.499162] mwifiex_pcie 0000:03:00.0: last_event_index = 2 [ 1619.499169] mwifiex_pcie 0000:03:00.0: last_event: 58 00 58 00 58 00 58 00 58 00 [ 1619.499177] mwifiex_pcie 0000:03:00.0: data_sent=0 cmd_sent=1 [ 1619.499185] mwifiex_pcie 0000:03:00.0: ps_mode=0 ps_state=0 [ 1619.499215] mwifiex_pcie 0000:03:00.0: info: _mwifiex_fw_dpc: unregister device # mwifiex_pcie_work hang happening [ 1823.233923] INFO: task kworker/3:1:44 blocked for more than 122 seconds. [ 1823.233932] Tainted: G WC OE 5.10.0-rc1-1-mainline #1 [ 1823.233935] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 1823.233940] task:kworker/3:1 state:D stack: 0 pid: 44 ppid: 2 flags:0x00004000 [ 1823.233960] Workqueue: events mwifiex_pcie_work [mwifiex_pcie] [ 1823.233965] Call Trace: [ 1823.233981] __schedule+0x292/0x820 [ 1823.233990] schedule+0x45/0xe0 [ 1823.233995] schedule_timeout+0x11c/0x160 [ 1823.234003] wait_for_completion+0x9e/0x100 [ 1823.234012] __flush_work.isra.0+0x156/0x210 [ 1823.234018] ? flush_workqueue_prep_pwqs+0x130/0x130 [ 1823.234026] __cancel_work_timer+0x11e/0x1a0 [ 1823.234035] mwifiex_cleanup_pcie+0x28/0xd0 [mwifiex_pcie] [ 1823.234049] mwifiex_free_adapter+0x24/0xe0 [mwifiex] [ 1823.234060] _mwifiex_fw_dpc+0x294/0x560 [mwifiex] [ 1823.234074] mwifiex_reinit_sw+0x15d/0x300 [mwifiex] [ 1823.234080] mwifiex_pcie_reset_done+0x50/0x80 [mwifiex_pcie] [ 1823.234087] pci_try_reset_function+0x5c/0x90 [ 1823.234094] process_one_work+0x1d6/0x3a0 [ 1823.234100] worker_thread+0x4d/0x3d0 [ 1823.234107] ? rescuer_thread+0x410/0x410 [ 1823.234112] kthread+0x142/0x160 [ 1823.234117] ? __kthread_bind_mask+0x60/0x60 [ 1823.234124] ret_from_fork+0x22/0x30 [...] This is a deadlock caused by calling cancel_work_sync() in mwifiex_cleanup_pcie(): - Device resets are done via mwifiex_pcie_card_reset() - which schedules card->work to call mwifiex_pcie_card_reset_work() - which calls pci_try_reset_function(). - This leads to mwifiex_pcie_reset_done() be called on the same workqueue, which in turn calls - mwifiex_reinit_sw() and that calls - _mwifiex_fw_dpc(). The problem is now that _mwifiex_fw_dpc() calls mwifiex_free_adapter() in case firmware initialization fails. That ends up calling mwifiex_cleanup_pcie(). Note that all those calls are still running on the workqueue. So when mwifiex_cleanup_pcie() now calls cancel_work_sync(), it's really waiting on itself to complete, causing a deadlock. This commit fixes the deadlock by skipping cancel_work_sync() on a reset failure path. After this commit, when reset fails, the following output is expected to be shown: kernel: mwifiex_pcie 0000:03:00.0: info: _mwifiex_fw_dpc: unregister device kernel: mwifiex: Failed to bring up adapter: -5 kernel: mwifiex_pcie 0000:03:00.0: reinit failed: -5 To reproduce this issue, for example, try putting the root port of wifi into D3 (replace "00:1d.3" with your setup). # put into D3 (root port) sudo setpci -v -s 00:1d.3 CAP_PM+4.b=0b Cc: Maximilian Luz Signed-off-by: Tsuchiya Yuto Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201028142346.18355-1-kitakar@gmail.com commit 566b4cb9587eb6dae2294989b5f1c35c0694dd15 Author: Tsuchiya Yuto Date: Wed Oct 28 23:21:10 2020 +0900 mwifiex: update comment for shutdown_sw()/reinit_sw() to reflect current state The functions mwifiex_shutdown_sw() and mwifiex_reinit_sw() can be used for more general purposes than the PCIe function level reset. Also, these are even not PCIe-specific. So, let's update the comments at the top of each function accordingly. Signed-off-by: Tsuchiya Yuto Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201028142110.18144-3-kitakar@gmail.com commit fa74cb1dc0f4da46c441b735ca865ac52de42c0e Author: Tsuchiya Yuto Date: Wed Oct 28 23:21:09 2020 +0900 mwifiex: fix mwifiex_shutdown_sw() causing sw reset failure When a PCIe function level reset (FLR) is performed but without fw reset for some reasons (e.g., on Microsoft Surface devices, fw reset requires other quirks), it fails to reset wifi properly. You can trigger the issue on such devices via debugfs entry for reset: $ echo 1 | sudo tee /sys/kernel/debug/mwifiex/mlan0/reset and the resulting dmesg log: [ 45.740508] mwifiex_pcie 0000:03:00.0: Resetting per request [ 45.742937] mwifiex_pcie 0000:03:00.0: info: successfully disconnected from [BSSID]: reason code 3 [ 45.744666] mwifiex_pcie 0000:03:00.0: info: shutdown mwifiex... [ 45.751530] mwifiex_pcie 0000:03:00.0: PREP_CMD: card is removed [ 45.751539] mwifiex_pcie 0000:03:00.0: PREP_CMD: card is removed [ 45.771691] mwifiex_pcie 0000:03:00.0: PREP_CMD: card is removed [ 45.771695] mwifiex_pcie 0000:03:00.0: deleting the crypto keys [ 45.771697] mwifiex_pcie 0000:03:00.0: PREP_CMD: card is removed [ 45.771698] mwifiex_pcie 0000:03:00.0: deleting the crypto keys [ 45.771699] mwifiex_pcie 0000:03:00.0: PREP_CMD: card is removed [ 45.771701] mwifiex_pcie 0000:03:00.0: deleting the crypto keys [ 45.771702] mwifiex_pcie 0000:03:00.0: PREP_CMD: card is removed [ 45.771703] mwifiex_pcie 0000:03:00.0: deleting the crypto keys [ 45.771704] mwifiex_pcie 0000:03:00.0: PREP_CMD: card is removed [ 45.771705] mwifiex_pcie 0000:03:00.0: deleting the crypto keys [ 45.771707] mwifiex_pcie 0000:03:00.0: PREP_CMD: card is removed [ 45.771708] mwifiex_pcie 0000:03:00.0: deleting the crypto keys [ 53.099343] mwifiex_pcie 0000:03:00.0: info: trying to associate to '[SSID]' bssid [BSSID] [ 53.241870] mwifiex_pcie 0000:03:00.0: info: associated to bssid [BSSID] successfully [ 75.377942] mwifiex_pcie 0000:03:00.0: cmd_wait_q terminated: -110 [ 85.385491] mwifiex_pcie 0000:03:00.0: info: successfully disconnected from [BSSID]: reason code 15 [ 87.539408] mwifiex_pcie 0000:03:00.0: cmd_wait_q terminated: -110 [ 87.539412] mwifiex_pcie 0000:03:00.0: deleting the crypto keys [ 99.699917] mwifiex_pcie 0000:03:00.0: cmd_wait_q terminated: -110 [ 99.699925] mwifiex_pcie 0000:03:00.0: deleting the crypto keys [ 111.859802] mwifiex_pcie 0000:03:00.0: cmd_wait_q terminated: -110 [ 111.859808] mwifiex_pcie 0000:03:00.0: deleting the crypto keys [...] When comparing mwifiex_shutdown_sw() with mwifiex_pcie_remove(), it lacks mwifiex_init_shutdown_fw(). This commit fixes mwifiex_shutdown_sw() by adding the missing mwifiex_init_shutdown_fw(). Fixes: 4c5dae59d2e9 ("mwifiex: add PCIe function level reset support") Signed-off-by: Tsuchiya Yuto Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201028142110.18144-2-kitakar@gmail.com commit fdd99a4103c91a2067c096a4931518cc05ca9206 Author: Anshuman Khandual Date: Mon Nov 9 09:58:57 2020 +0530 arm64/mm/hotplug: Ensure early memory sections are all online This adds a validation function that scans the entire boot memory and makes sure that all early memory sections are online. This check is essential for the memory notifier to work properly, as it cannot prevent any boot memory from offlining, if all sections are not online to begin with. Although the boot section scanning is selectively enabled with DEBUG_VM. Signed-off-by: Anshuman Khandual Cc: Will Deacon Cc: Mark Rutland Cc: Marc Zyngier Cc: Steve Capper Cc: Mark Brown Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/1604896137-16644-4-git-send-email-anshuman.khandual@arm.com Signed-off-by: Catalin Marinas commit 9fb3d4a303380ea76ebf49d930a777dd9c9dbc25 Author: Anshuman Khandual Date: Mon Nov 9 09:58:56 2020 +0530 arm64/mm/hotplug: Enable MEM_OFFLINE event handling This enables MEM_OFFLINE memory event handling. It will help intercept any possible error condition such as if boot memory some how still got offlined even after an explicit notifier failure, potentially by a future change in generic hot plug framework. This would help detect such scenarios and help debug further. While here, also call out the first section being attempted for offline or got offlined. Signed-off-by: Anshuman Khandual Reviewed-by: Gavin Shan Cc: Will Deacon Cc: Mark Rutland Cc: Marc Zyngier Cc: Steve Capper Cc: Mark Brown Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/1604896137-16644-3-git-send-email-anshuman.khandual@arm.com Signed-off-by: Catalin Marinas commit cb45babe1b80090fd0272da76bf39e781439f1d6 Author: Anshuman Khandual Date: Mon Nov 9 09:58:55 2020 +0530 arm64/mm/hotplug: Register boot memory hot remove notifier earlier This moves memory notifier registration earlier in the boot process from device_initcall() to early_initcall() which will help in guarding against potential early boot memory offline requests. Even though there should not be any actual offlinig requests till memory block devices are initialized with memory_dev_init() but then generic init sequence might just change in future. Hence an early registration for the memory event notifier would be helpful. While here, just skip the registration if CONFIG_MEMORY_HOTREMOVE is not enabled and also call out when memory notifier registration fails. Signed-off-by: Anshuman Khandual Reviewed-by: Gavin Shan Reviewed-by: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: Marc Zyngier Cc: Steve Capper Cc: Mark Brown Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/1604896137-16644-2-git-send-email-anshuman.khandual@arm.com Signed-off-by: Catalin Marinas commit 97d6786e0669daa5c2f2d07a057f574e849dfd3e Author: Ard Biesheuvel Date: Wed Oct 14 10:18:57 2020 +0200 arm64: mm: account for hotplug memory when randomizing the linear region As a hardening measure, we currently randomize the placement of physical memory inside the linear region when KASLR is in effect. Since the random offset at which to place the available physical memory inside the linear region is chosen early at boot, it is based on the memblock description of memory, which does not cover hotplug memory. The consequence of this is that the randomization offset may be chosen such that any hotplugged memory located above memblock_end_of_DRAM() that appears later is pushed off the end of the linear region, where it cannot be accessed. So let's limit this randomization of the linear region to ensure that this can no longer happen, by using the CPU's addressable PA range instead. As it is guaranteed that no hotpluggable memory will appear that falls outside of that range, we can safely put this PA range sized window anywhere in the linear region. Signed-off-by: Ard Biesheuvel Cc: Anshuman Khandual Cc: Will Deacon Cc: Steven Price Cc: Robin Murphy Link: https://lore.kernel.org/r/20201014081857.3288-1-ardb@kernel.org Signed-off-by: Catalin Marinas commit f39ee99f5118a71ea162f8f66d743a8c4c401540 Author: Chen Yu Date: Fri Oct 23 19:02:54 2020 +0800 PM: sleep: Print driver flags for all devices during suspend/resume Currently there are 4 driver flags to control system suspend/resume behavior: DPM_FLAG_NO_DIRECT_COMPLETE, DPM_FLAG_SMART_PREPARE, DPM_FLAG_SMART_SUSPEND and DPM_FLAG_MAY_SKIP_RESUME. Print these flags during suspend/resume so as to get a brief understanding of the expected behavior of each device, and to facilitate suspend/resume debugging/tuning. To enable this tracing: echo 'file drivers/base/power/main.c +p' > /sys/kernel/debug/dynamic_debug/control Signed-off-by: Chen Yu [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 230edf78ed4b96224802a9b2bfde4bc9996f84a2 Author: Ville Syrjälä Date: Thu Sep 24 21:51:13 2020 +0300 drm/i915: Add plane .{min,max}_width() and .max_height() vfuncs Reduce this maintenance nightmare a bit by converting the plane min/max width/height stuff into vfuncs. Now, if I could just think of a nice way to also use this for intel_mode_valid_max_plane_size()... Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200924185113.30849-1-ville.syrjala@linux.intel.com Reviewed-by: Aditya Swarup commit 0edaee42eb8c0f3b767ec3c51bee4a3855aa2555 Author: Anshuman Khandual Date: Mon Nov 9 17:08:36 2020 +0530 arm64/smp: Drop the macro S(x,s) Mapping between IPI type index and its string is direct without requiring an additional offset. Hence the existing macro S(x, s) is now redundant and can just be dropped. This also makes the code clean and simple. Signed-off-by: Anshuman Khandual Acked-by: Mark Rutland Cc: Will Deacon Cc: Mark Rutland Cc: Marc Zyngier Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/1604921916-23368-1-git-send-email-anshuman.khandual@arm.com Signed-off-by: Catalin Marinas commit d45d3621d679ce74b555bc79bab9055b6f7edb61 Author: Krzysztof Kozlowski Date: Thu Nov 5 19:45:06 2020 +0100 arm64: dts: exynos: use hyphens in Exynos5433 node names Use hyphens instead of underscores in the Exynos5433 node names which is expected by naming convention, multiple dtschema files and pointed out by dtc W=2 builds. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201105184506.215648-6-krzk@kernel.org commit 73f882a0f3a833d589c1a0b6b83045567244e71e Author: Krzysztof Kozlowski Date: Thu Nov 5 19:45:05 2020 +0100 ARM: dts: exynos: use hyphens in MFC reserved memory node names Use hyphens instead of underscores in the MFC reserved memory node names which is expected by naming convention, multiple dtschema files and pointed out by dtc W=2 builds. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201105184506.215648-5-krzk@kernel.org commit 9b846ba7c1d237476267bc2e05d4920691651ca2 Author: Krzysztof Kozlowski Date: Thu Nov 5 19:45:04 2020 +0100 ARM: dts: exynos: use hyphens in Exynos5 node names Use hyphens instead of underscores in the Exynos5250 and Exynos542x node names which is expected by naming convention, multiple dtschema files and pointed out by dtc W=2 builds. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201105184506.215648-4-krzk@kernel.org commit 32f9abc326ee21d8fe01c9979d493c7a92dedd59 Author: Krzysztof Kozlowski Date: Thu Nov 5 19:45:03 2020 +0100 ARM: dts: exynos: use generic name for max77693 motor in Midas Use a generic name for the max77693 motor driver in Exynos4412 Midas boards to align with Devicetree specification naming convention. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201105184506.215648-3-krzk@kernel.org commit 1c6831b472f2e31c42eff579f35a5dd2b5da5435 Author: Krzysztof Kozlowski Date: Thu Nov 5 19:45:02 2020 +0100 ARM: dts: exynos: use hyphens in Exynos4 node names Use hyphens instead of underscores in the Exynos4210 and Exynos4412 node names which is expected by naming convention, multiple dtschema files and pointed out by dtc W=2 builds. Use also generic "ppmu" node name for PPMU nodes to match Devicetree specification. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201105184506.215648-2-krzk@kernel.org commit b357e6aa41011c003b18637024243bf37a3c7369 Author: Krzysztof Kozlowski Date: Thu Nov 5 19:41:08 2020 +0100 ARM: dts: exynos: use hyphens in Exynos3250 node names Use hyphens instead of underscores in the Exynos3250 node names which is expected by naming convention, multiple dtschema files and pointed out by dtc W=2 builds. Use also generic "ppmu" node name for PPMU nodes to match Devicetree specification. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201105184506.215648-1-krzk@kernel.org commit c134d1f8c436d96b3f62896c630278e3ec001280 Author: Alex Dewar Date: Sat Nov 7 10:16:29 2020 +0200 ath11k: Handle errors if peer creation fails ath11k_peer_create() is called without its return value being checked, meaning errors will be unhandled. Add missing check and, as the mutex is unconditionally unlocked on leaving this function, simplify the exit path. Addresses-Coverity-ID: 1497531 ("Code maintainability issues") Fixes: 701e48a43e15 ("ath11k: add packet log support for QCA6390") Signed-off-by: Alex Dewar Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201004100218.311653-1-alex.dewar90@gmail.com commit 4f19d071f9bee1bb2040ae73436314a5ec9ede44 Author: Alexander Aring Date: Mon Nov 2 20:04:28 2020 -0500 fs: dlm: check on existing node address This patch checks if we add twice the same address to a per node address array. This should never be the case and we report -EEXIST to the user space. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 40c6b83e5a07d1dc3952a5ad040eb1c7c966c4fe Author: Alexander Aring Date: Mon Nov 2 20:04:27 2020 -0500 fs: dlm: constify addr_compare This patch just constify some function parameter which should be have a read access only. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 1a26bfafbce0f2ec8cfe04d9cdcaead0e6dd58ec Author: Alexander Aring Date: Mon Nov 2 20:04:26 2020 -0500 fs: dlm: fix check for multi-homed hosts This patch will use the runtime array size dlm_local_count variable to check the actual size of the dlm_local_addr array. There exists currently a cleanup bug, because the tcp_listen_for_all() functionality might check on a dangled pointer. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit d11ccd451b655617388ace167ab2440b4b4cc95b Author: Alexander Aring Date: Mon Nov 2 20:04:25 2020 -0500 fs: dlm: listen socket out of connection hash This patch introduces a own connection structure for the listen socket handling instead of handling the listen socket as normal connection structure in the connection hash. We can remove some nodeid equals zero validation checks, because this nodeid should not exists anymore inside the node hash. This patch also removes the sock mutex in accept_from_sock() function because this function can't occur in another parallel context if it's scheduled on only one workqueue. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 13004e8afedcaab5a2e4c1fac4fbeafa629bca07 Author: Alexander Aring Date: Mon Nov 2 20:04:24 2020 -0500 fs: dlm: refactor sctp sock parameter This patch refactors sctp_bind_addrs() to work with a socket parameter instead of a connection parameter. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 42873c903bd712b40d827c2bed100ccefa66fce8 Author: Alexander Aring Date: Mon Nov 2 20:04:23 2020 -0500 fs: dlm: move shutdown action to node creation This patch move the assignment for the shutdown action callback to the node creation functionality. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 0672c3c280efd33b8037863fc2bbc3510670a7d3 Author: Alexander Aring Date: Mon Nov 2 20:04:22 2020 -0500 fs: dlm: move connect callback in node creation This patch moves the assignment for the connect callback to the node creation instead of assign some dummy functionality. The assignment which connect functionality will be used will be detected according to the configfs setting. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 6cde210a975879a6da74b5755065c7ea3ccbcb90 Author: Alexander Aring Date: Mon Nov 2 20:04:21 2020 -0500 fs: dlm: add helper for init connection This patch will move the connection structure initialization into an own function. This avoids cases to update the othercon initialization. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 19633c7e204b99fe9b952c70b712778b24a8d137 Author: Alexander Aring Date: Mon Nov 2 20:04:20 2020 -0500 fs: dlm: handle non blocked connect event The manpage of connect shows that in non blocked mode a writeability indicates successful connection event. This patch is handling this event inside the writeability callback. In case of SCTP we use blocking connect functionality which indicates a successful connect when the function returns with a successful return value. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 53a5edaa05c1073e47668f167ec9788383c780e1 Author: Alexander Aring Date: Mon Nov 2 20:04:19 2020 -0500 fs: dlm: flush othercon at close This patch ensures we also flush the othercon writequeue when a lowcomms close occurs. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 692f51c8cbe752cb16ea2a75016ea0a497d00b1c Author: Alexander Aring Date: Mon Nov 2 20:04:18 2020 -0500 fs: dlm: add get buffer error handling This patch adds an error handling to the get buffer functionality if the user is requesting a buffer length which is more than possible of the internal buffer allocator. This should never happen because specific handling decided by compile time, but will warn if somebody forget about to handle this limitation right. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 9f8f9c774ad10aa1c15952c36f580d7e3711a100 Author: Alexander Aring Date: Mon Nov 2 20:04:17 2020 -0500 fs: dlm: define max send buffer This patch will set the maximum transmit buffer size for rcom messages with "names" to 4096 bytes. It's a leftover change of commit 4798cbbfbd00 ("fs: dlm: rework receive handling"). Fact is that we cannot allocate a contiguous transmit buffer length above of 4096 bytes. It seems at some places the upper layer protocol will calculate according to dlm_config.ci_buffer_size the possible payload of a dlm recovery message. As compiler setting we will use now the maximum possible message which dlm can send out. Commit 4e192ee68e5af ("fs: dlm: disallow buffer size below default") disallow a buffer setting smaller than the 4096 bytes and above 4096 bytes is definitely wrong because we will then write out of buffer space as we cannot allocate a contiguous buffer above 4096 bytes. The ci_buffer_size is still there to define the possible maximum receive buffer size of a recvmsg() which should be at least the maximum possible dlm message size. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 5cbec208dc994de860ae72d3340bc54f14e71b39 Author: Alexander Aring Date: Mon Nov 2 20:04:16 2020 -0500 fs: dlm: fix proper srcu api call This patch will use call_srcu() instead of call_rcu() because the related datastructure resource are handled under srcu context. I assume the current code is fine anyway since free_conn() must be called when the related resource are not in use otherwise. However it will correct the overall handling in a srcu context. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit b96fab4e36023ee37ed1aad331ddd11b77c46c42 Author: Arnd Bergmann Date: Sat Nov 7 10:16:27 2020 +0200 ath9k: work around false-positive gcc warning gcc-10 shows a false-positive warning with CONFIG_KASAN: drivers/net/wireless/ath/ath9k/dynack.c: In function 'ath_dynack_sample_tx_ts': include/linux/etherdevice.h:290:14: warning: writing 4 bytes into a region of size 0 [-Wstringop-overflow=] 290 | *(u32 *)dst = *(const u32 *)src; | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ Until gcc is fixed, work around this by using memcpy() in place of ether_addr_copy(). Hopefully gcc-11 will not have this problem. Link: https://godbolt.org/z/sab1MK Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97490 Signed-off-by: Arnd Bergmann [kvalo@codeaurora.org: remove ifdef and add a comment] Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201026213040.3889546-8-arnd@kernel.org commit 246c1a37f5ff897edec750b6d9325860143cefde Author: Artur Świgoń Date: Wed Nov 4 11:36:56 2020 +0100 ARM: dts: exynos: Add interconnects to Exynos4412 mixer This patch adds an 'interconnects' property to Exynos4412 DTS in order to declare the interconnect path used by the mixer. Please note that the 'interconnect-names' property is not needed when there is only one path in 'interconnects', in which case calling of_icc_get() with a NULL name simply returns the right path. Signed-off-by: Artur Świgoń Signed-off-by: Sylwester Nawrocki Tested-by: Chanwoo Choi Reviewed-by: Chanwoo Choi Link: https://lore.kernel.org/r/20201104103657.18007-7-s.nawrocki@samsung.com Signed-off-by: Krzysztof Kozlowski commit 5334df3a4bc50f422684291d045aa2c821d7ff0b Author: Sylwester Nawrocki Date: Wed Nov 4 11:36:55 2020 +0100 ARM: dts: exynos: Add interconnect properties to Exynos4412 bus nodes This patch adds the following properties for Exynos4412 interconnect bus nodes: - interconnects: to declare connections between nodes in order to guarantee PM QoS requirements between nodes, - #interconnect-cells: required by the interconnect framework, - samsung,data-clk-ratio: which allows to specify minimum data clock frequency corresponding to requested bandwidth for each bus. Note that #interconnect-cells is always zero and node IDs are not hardcoded anywhere. Signed-off-by: Artur Świgoń Signed-off-by: Sylwester Nawrocki Tested-by: Chanwoo Choi Reviewed-by: Chanwoo Choi Link: https://lore.kernel.org/r/20201104103657.18007-6-s.nawrocki@samsung.com Signed-off-by: Krzysztof Kozlowski commit c42c3f05faa072d7833fc37b92f3c117128ca98a Author: Rob Clark Date: Sat Sep 5 13:04:26 2020 -0700 arm: dts: qcom: sc7180: Set the compatible string for the GPU SMMU Set the qcom,adreno-smmu compatible string for the GPU SMMU to enable split pagetables and per-instance pagetables for drm/msm. Signed-off-by: Rob Clark Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20200905200454.240929-21-robdclark@gmail.com Signed-off-by: Bjorn Andersson commit 7e5258b0b79d8be916abd064b5f4aa2715580478 Author: Jordan Crouse Date: Mon Nov 9 11:47:28 2020 -0700 arm: dts: qcom: sm845: Set the compatible string for the GPU SMMU Set the qcom,adreno-smmu compatible string for the GPU SMMU to enable split pagetables and per-instance pagetables for drm/msm. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20201109184728.2463097-5-jcrouse@codeaurora.org Signed-off-by: Bjorn Andersson commit d60cd06331a3566d3305b3c7b566e79edf4e2095 Author: Kai-Heng Feng Date: Fri Oct 30 15:06:57 2020 +0800 PM: ACPI: reboot: Use S5 for reboot After reboot, it's not possible to use hotkeys to enter BIOS setup and boot menu on some HP laptops. BIOS folks identified the root cause is the missing _PTS call, and BIOS is expecting _PTS to do proper reset. Using S5 for reboot is default behavior under Windows, "A full shutdown (S5) occurs when a system restart is requested" [1], so let's do the same here. [1] https://docs.microsoft.com/en-us/windows/win32/power/system-power-states Signed-off-by: Kai-Heng Feng [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki commit aec8da04e4d71afdd4ab3025ea34a6517435f363 Author: Thomas Gleixner Date: Tue Nov 10 15:34:32 2020 +0100 x86/ioapic: Correct the PCI/ISA trigger type selection PCI's default trigger type is level and ISA's is edge. The recent refactoring made it the other way round, which went unnoticed as it seems only to cause havoc on some AMD systems. Make the comment and code do the right thing again. Fixes: a27dca645d2c ("x86/io_apic: Cleanup trigger/polarity helpers") Reported-by: Tom Lendacky Reported-by: Borislav Petkov Reported-by: Qian Cai Signed-off-by: Thomas Gleixner Tested-by: Tom Lendacky Cc: David Woodhouse Link: https://lore.kernel.org/r/87d00lgu13.fsf@nanos.tec.linutronix.de commit 2dcab875e7637f1d3f9b978566e61ed1cbbba054 Author: Koba Ko Date: Tue Nov 3 11:49:07 2020 +0800 Revert "drm/dp_mst: Retrieve extended DPCD caps for topology manager" This reverts commit ad44c03208e46b83e4ae3269e32c9e524aa71cf8. Currently DRM driver assume the source device caps is higher than the MST device caps. With this commit, this statement would be broken. e.g. the source device only support DP1.2 and the mst device support DP1.4. Signed-off-by: Koba Ko Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20201103034907.72129-1-koba.ko@canonical.com commit dc824eb898534cd8e34582874dae3bb7cf2fa008 Author: Valentin Schneider Date: Mon Nov 2 18:45:14 2020 +0000 sched/fair: Dissociate wakeup decisions from SD flag value The CFS wakeup code will only ever go through EAS / its fast path on "regular" wakeups (i.e. not on forks or execs). These are currently gated by a check against 'sd_flag', which would be SD_BALANCE_WAKE at wakeup. However, we now have a flag that explicitly tells us whether a wakeup is a "regular" one, so hinge those conditions on that flag instead. Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201102184514.2733-4-valentin.schneider@arm.com commit 3aef1551e942860a3881087171ef0cd45f6ebda7 Author: Valentin Schneider Date: Mon Nov 2 18:45:13 2020 +0000 sched: Remove select_task_rq()'s sd_flag parameter Only select_task_rq_fair() uses that parameter to do an actual domain search, other classes only care about what kind of wakeup is happening (fork, exec, or "regular") and thus just translate the flag into a wakeup type. WF_TTWU and WF_EXEC have just been added, use these along with WF_FORK to encode the wakeup types we care about. For select_task_rq_fair(), we can simply use the shiny new WF_flag : SD_flag mapping. Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201102184514.2733-3-valentin.schneider@arm.com commit 17770579059258c5f1eef759e941af5f1a54f482 Author: Valentin Schneider Date: Mon Nov 2 18:45:12 2020 +0000 sched: Add WF_TTWU, WF_EXEC wakeup flags To remove the sd_flag parameter of select_task_rq(), we need another way of encoding wakeup types. There already is a WF_FORK flag, add the missing two. With that said, we still need an easy way to turn WF_foo into SD_bar (e.g. WF_TTWU into SD_BALANCE_WAKE). As suggested by Peter, let's make our lives easier and make them match exactly, and throw in some compile-time checks for good measure. Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201102184514.2733-2-valentin.schneider@arm.com commit cdb310474dece99985e4cdd2b96b1324e39c1c9d Author: Hui Su Date: Fri Oct 30 22:46:21 2020 +0800 sched/fair: Remove superfluous lock section in do_sched_cfs_slack_timer() Since ab93a4bc955b ("sched/fair: Remove distribute_running fromCFS bandwidth"), there is nothing to protect between raw_spin_lock_irqsave/store() in do_sched_cfs_slack_timer(). Signed-off-by: Hui Su Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Phil Auld Reviewed-by: Ben Segall Link: https://lkml.kernel.org/r/20201030144621.GA96974@rlk commit 12fa97c64dce2f3c2e6eed5dc618bb9046e40bf0 Merge: b6d37a764a5b8 c777d847107e8 Author: Peter Zijlstra Date: Tue Nov 10 18:39:04 2020 +0100 Merge branch 'sched/migrate-disable' commit c777d847107e80df24dae87fc9cf4b4c0bf4dfed Author: Valentin Schneider Date: Tue Oct 13 15:01:16 2020 +0100 sched: Comment affine_move_task() Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201013140116.26651-2-valentin.schneider@arm.com commit 885b3ba47aa5cc16550beb8a42181ad5e8302ceb Author: Valentin Schneider Date: Tue Oct 13 15:01:15 2020 +0100 sched: Deny self-issued __set_cpus_allowed_ptr() when migrate_disable() migrate_disable(); set_cpus_allowed_ptr(current, {something excluding task_cpu(current)}); affine_move_task(); <-- never returns Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201013140116.26651-1-valentin.schneider@arm.com commit 86fbcd3b4ba2c3e19daf705bc13d90fb53aab648 Author: Peter Zijlstra Date: Mon Oct 5 12:49:16 2020 +0200 sched/proc: Print accurate cpumask vs migrate_disable() Ensure /proc/*/status doesn't print 'random' cpumasks due to migrate_disable(). Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Reviewed-by: Daniel Bristot de Oliveira Link: https://lkml.kernel.org/r/20201023102347.593984734@infradead.org commit a7c81556ec4d341dfdbf2cc478ead89d73e474a7 Author: Peter Zijlstra Date: Mon Sep 28 17:06:07 2020 +0200 sched: Fix migrate_disable() vs rt/dl balancing In order to minimize the interference of migrate_disable() on lower priority tasks, which can be deprived of runtime due to being stuck below a higher priority task. Teach the RT/DL balancers to push away these higher priority tasks when a lower priority task gets selected to run on a freshly demoted CPU (pull). This adds migration interference to the higher priority task, but restores bandwidth to system that would otherwise be irrevocably lost. Without this it would be possible to have all tasks on the system stuck on a single CPU, each task preempted in a migrate_disable() section with a single high priority task running. This way we can still approximate running the M highest priority tasks on the system. Migrating the top task away is (ofcourse) still subject to migrate_disable() too, which means the lower task is subject to an interference equivalent to the worst case migrate_disable() section. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Daniel Bristot de Oliveira Link: https://lkml.kernel.org/r/20201023102347.499155098@infradead.org commit ded467dc83ac7173f1532bb0faa25022ff8769e5 Author: Peter Zijlstra Date: Thu Oct 1 16:13:01 2020 +0200 sched, lockdep: Annotate ->pi_lock recursion There's a valid ->pi_lock recursion issue where the actual PI code tries to wake up the stop task. Make lockdep aware so it doesn't complain about this. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Reviewed-by: Daniel Bristot de Oliveira Link: https://lkml.kernel.org/r/20201023102347.406912197@infradead.org commit 95158a89dd50035b4ff5b8aa913854166b50fe6d Author: Peter Zijlstra Date: Thu Oct 1 16:05:39 2020 +0200 sched,rt: Use the full cpumask for balancing We want migrate_disable() tasks to get PULLs in order for them to PUSH away the higher priority task. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Reviewed-by: Daniel Bristot de Oliveira Link: https://lkml.kernel.org/r/20201023102347.310519774@infradead.org commit 14e292f8d45380c519a83d9b0f37089a17eedcdf Author: Peter Zijlstra Date: Thu Oct 1 15:54:14 2020 +0200 sched,rt: Use cpumask_any*_distribute() Replace a bunch of cpumask_any*() instances with cpumask_any*_distribute(), by injecting this little bit of random in cpu selection, we reduce the chance two competing balance operations working off the same lowest_mask pick the same CPU. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Reviewed-by: Daniel Bristot de Oliveira Link: https://lkml.kernel.org/r/20201023102347.190759694@infradead.org commit 3015ef4b98f53fe7eba4f5f82f562c0e074d213c Author: Thomas Gleixner Date: Wed Aug 26 14:08:10 2020 +0200 sched/core: Make migrate disable and CPU hotplug cooperative On CPU unplug tasks which are in a migrate disabled region cannot be pushed to a different CPU until they returned to migrateable state. Account the number of tasks on a runqueue which are in a migrate disabled section and make the hotplug wait mechanism respect that. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Reviewed-by: Daniel Bristot de Oliveira Link: https://lkml.kernel.org/r/20201023102347.067278757@infradead.org commit 6d337eab041d56bb8f0e7794f39906c21054c512 Author: Peter Zijlstra Date: Fri Sep 18 17:24:31 2020 +0200 sched: Fix migrate_disable() vs set_cpus_allowed_ptr() Concurrent migrate_disable() and set_cpus_allowed_ptr() has interesting features. We rely on set_cpus_allowed_ptr() to not return until the task runs inside the provided mask. This expectation is exported to userspace. This means that any set_cpus_allowed_ptr() caller must wait until migrate_enable() allows migrations. At the same time, we don't want migrate_enable() to schedule, due to patterns like: preempt_disable(); migrate_disable(); ... migrate_enable(); preempt_enable(); And: raw_spin_lock(&B); spin_unlock(&A); this means that when migrate_enable() must restore the affinity mask, it cannot wait for completion thereof. Luck will have it that that is exactly the case where there is a pending set_cpus_allowed_ptr(), so let that provide storage for the async stop machine. Much thanks to Valentin who used TLA+ most effective and found lots of 'interesting' cases. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Reviewed-by: Daniel Bristot de Oliveira Link: https://lkml.kernel.org/r/20201023102346.921768277@infradead.org commit af449901b84c98cbd84a0113223ba3bcfcb12a26 Author: Peter Zijlstra Date: Thu Sep 17 10:38:30 2020 +0200 sched: Add migrate_disable() Add the base migrate_disable() support (under protest). While migrate_disable() is (currently) required for PREEMPT_RT, it is also one of the biggest flaws in the system. Notably this is just the base implementation, it is broken vs sched_setaffinity() and hotplug, both solved in additional patches for ease of review. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Reviewed-by: Daniel Bristot de Oliveira Link: https://lkml.kernel.org/r/20201023102346.818170844@infradead.org commit 9cfc3e18adb0362533e911bf3ce6ec8c821cfccc Author: Peter Zijlstra Date: Wed Sep 16 14:59:08 2020 +0200 sched: Massage set_cpus_allowed() Thread a u32 flags word through the *set_cpus_allowed*() callchain. This will allow adding behavioural tweaks for future users. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Reviewed-by: Daniel Bristot de Oliveira Link: https://lkml.kernel.org/r/20201023102346.729082820@infradead.org commit 120455c514f7321981c907a01c543b05aff3f254 Author: Peter Zijlstra Date: Fri Sep 25 16:42:31 2020 +0200 sched: Fix hotplug vs CPU bandwidth control Since we now migrate tasks away before DYING, we should also move bandwidth unthrottle, otherwise we can gain tasks from unthrottle after we expect all tasks to be gone already. Also; it looks like the RT balancers don't respect cpu_active() and instead rely on rq->online in part, complete this. This too requires we do set_rq_offline() earlier to match the cpu_active() semantics. (The bigger patch is to convert RT to cpu_active() entirely) Since set_rq_online() is called from sched_cpu_activate(), place set_rq_offline() in sched_cpu_deactivate(). Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Reviewed-by: Daniel Bristot de Oliveira Link: https://lkml.kernel.org/r/20201023102346.639538965@infradead.org commit 1cf12e08bc4d50a76b80c42a3109c53d8794a0c9 Author: Thomas Gleixner Date: Wed Sep 16 09:27:18 2020 +0200 sched/hotplug: Consolidate task migration on CPU unplug With the new mechanism which kicks tasks off the outgoing CPU at the end of schedule() the situation on an outgoing CPU right before the stopper thread brings it down completely is: - All user tasks and all unbound kernel threads have either been migrated away or are not running and the next wakeup will move them to a online CPU. - All per CPU kernel threads, except cpu hotplug thread and the stopper thread have either been unbound or parked by the responsible CPU hotplug callback. That means that at the last step before the stopper thread is invoked the cpu hotplug thread is the last legitimate running task on the outgoing CPU. Add a final wait step right before the stopper thread is kicked which ensures that any still running tasks on the way to park or on the way to kick themself of the CPU are either sleeping or gone. This allows to remove the migrate_tasks() crutch in sched_cpu_dying(). If sched_cpu_dying() detects that there is still another running task aside of the stopper thread then it will explode with the appropriate fireworks. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Reviewed-by: Daniel Bristot de Oliveira Link: https://lkml.kernel.org/r/20201023102346.547163969@infradead.org commit 06249738a41a70f2201a148866899f84cbebc45e Author: Peter Zijlstra Date: Fri Sep 25 15:45:11 2020 +0200 workqueue: Manually break affinity on hotplug Don't rely on the scheduler to force break affinity for us -- it will stop doing that for per-cpu-kthreads. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Acked-by: Tejun Heo Reviewed-by: Daniel Bristot de Oliveira Link: https://lkml.kernel.org/r/20201023102346.464718669@infradead.org commit f2469a1fb43f85d243ce72638367fb6e15c33491 Author: Thomas Gleixner Date: Mon Sep 14 14:47:28 2020 +0200 sched/core: Wait for tasks being pushed away on hotplug RT kernels need to ensure that all tasks which are not per CPU kthreads have left the outgoing CPU to guarantee that no tasks are force migrated within a migrate disabled section. There is also some desire to (ab)use fine grained CPU hotplug control to clear a CPU from active state to force migrate tasks which are not per CPU kthreads away for power control purposes. Add a mechanism which waits until all tasks which should leave the CPU after the CPU active flag is cleared have moved to a different online CPU. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Reviewed-by: Daniel Bristot de Oliveira Link: https://lkml.kernel.org/r/20201023102346.377836842@infradead.org commit 2558aacff8586699bcd248b406febb28b0a25de2 Author: Peter Zijlstra Date: Fri Sep 11 09:54:27 2020 +0200 sched/hotplug: Ensure only per-cpu kthreads run during hotplug In preparation for migrate_disable(), make sure only per-cpu kthreads are allowed to run on !active CPUs. This is ran (as one of the very first steps) from the cpu-hotplug task which is a per-cpu kthread and completion of the hotplug operation only requires such tasks. This constraint enables the migrate_disable() implementation to wait for completion of all migrate_disable regions on this CPU at hotplug time without fear of any new ones starting. This replaces the unlikely(rq->balance_callbacks) test at the tail of context_switch with an unlikely(rq->balance_work), the fast path is not affected. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Reviewed-by: Daniel Bristot de Oliveira Link: https://lkml.kernel.org/r/20201023102346.292709163@infradead.org commit 565790d28b1e33ee2f77bad5348b99f6dfc366fd Author: Peter Zijlstra Date: Mon May 11 14:13:00 2020 +0200 sched: Fix balance_callback() The intent of balance_callback() has always been to delay executing balancing operations until the end of the current rq->lock section. This is because balance operations must often drop rq->lock, and that isn't safe in general. However, as noted by Scott, there were a few holes in that scheme; balance_callback() was called after rq->lock was dropped, which means another CPU can interleave and touch the callback list. Rework code to call the balance callbacks before dropping rq->lock where possible, and otherwise splice the balance list onto a local stack. This guarantees that the balance list must be empty when we take rq->lock. IOW, we'll only ever run our own balance callbacks. Reported-by: Scott Wood Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Reviewed-by: Daniel Bristot de Oliveira Link: https://lkml.kernel.org/r/20201023102346.203901269@infradead.org commit a8b62fd0850503cf1e557d7e5a98d3f1f5c25eef Author: Peter Zijlstra Date: Mon Sep 21 12:58:17 2020 +0200 stop_machine: Add function and caller debug info Crashes in stop-machine are hard to connect to the calling code, add a little something to help with that. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Reviewed-by: Daniel Bristot de Oliveira Link: https://lkml.kernel.org/r/20201023102346.116513635@infradead.org commit d2ad981151b3a812e961c8ee0ffd7e349b4027d6 Author: Matti Vaittinen Date: Tue Nov 10 10:20:17 2020 +0200 regulator: bd718x7: Support external connection to scale voltages Setups where regulator (especially the buck8) output voltage is scaled by adding external connection where some other regulator output is connected to feedback-pin (over suitable resistors) is getting popular amongst users of BD71837. This allows for example scaling down the buck8 voltages to suit lover GPU voltages for projects where buck8 is (ab)used to supply power for GPU. As a note - some setups do allow DVS for buck8. This do produce voltage spikes and the HW must be evaluated to be able to survive them. Thus this commit still keep the DVS disabled for non DVS bucks by default. Let's not help you burn your proto board. Allow describing this external connection from DT and scale the voltages accordingly. This is what the connection should look like: |------------| | buck 8 |-------+----->Vout | | | |------------| | | FB pin | | | +-------+--R2---+ | R1 | V FB-pull-up Here the buck output is sifted according to formula: Vout_o = Vo - (Vpu - Vo)*R2/R1 Linear_step = step_orig*(R1+R2)/R1 where: Vout_o is adjusted voltage output at vsel reg value 0 Vo is original voltage output at vsel reg value 0 Vpu is the pull-up voltage V FB-pull-up in the picture R1 and R2 are resistor values. Bring support for specifying the Vpu, R1 and R2 from device tree and scale voltages if they are given. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/89b2be87074f307a8823f15f34e1f662023cbf36.1604994184.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Mark Brown commit b54a27d8109fc8f18cec3e0663f8e81ea727e3c6 Author: Matti Vaittinen Date: Tue Nov 10 10:19:58 2020 +0200 regulator: BD71847 support commonly used feedback connection The BD71847 buck output voltages are in a few cases scaled using external connection which adds a pull-up to regulator feedback pin. This connection will adjust output voltage from regulator in a deterministic way. Add support for describing this HW connection so that driver can adjust voltage ranges accordingly. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/9b6b3d8233071d478f7d1e93b498f5a2141941e6.1604994184.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Mark Brown commit 1e908b2419ea828dfad9819e5c01322a93665356 Author: Matti Vaittinen Date: Tue Nov 10 10:19:38 2020 +0200 regulator: BD71837 support commonly used feedback connection The BD71837 buck output voltages are in a few cases scaled using external connection which adds a pull-up to regulator feedback pin. This connection will adjust output voltage from regulator in a deterministic way. Add support for describing this HW connection so that driver can adjust voltage ranges accordingly. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/9959924313db7c7165598604f9a07bf227f471a8.1604994184.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Mark Brown commit 833be850f1cabd0e3b5337c0fcab20a6e936dd48 Author: Mark Rutland Date: Tue Nov 3 10:22:29 2020 +0000 arm64: consistently use reserved_pg_dir Depending on configuration options and specific code paths, we either use the empty_zero_page or the configuration-dependent reserved_ttbr0 as a reserved value for TTBR{0,1}_EL1. To simplify this code, let's always allocate and use the same reserved_pg_dir, replacing reserved_ttbr0. Note that this is allocated (and hence pre-zeroed), and is also marked as read-only in the kernel Image mapping. Keeping this separate from the empty_zero_page potentially helps with robustness as the empty_zero_page is used in a number of cases where a failure to map it read-only could allow it to become corrupted. The (presently unused) swapper_pg_end symbol is also removed, and comments are added wherever we rely on the offsets between the pre-allocated pg_dirs to keep these cases easily identifiable. Signed-off-by: Mark Rutland Cc: Will Deacon Link: https://lore.kernel.org/r/20201103102229.8542-1-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 4e59dd249cd513a211e2ecce2cb31f4e29a5ce5b Author: Dan Carpenter Date: Thu Nov 5 15:51:54 2020 +0300 ASoC: qcom: common: Fix refcounting in qcom_snd_parse_of() There are two issues in this function. 1) We can't drop the refrences on "cpu", "codec" and "platform" before we take the reference. This doesn't cause a problem on the first iteration because those pointers start as NULL so the of_node_put() is a no-op. But on the subsequent iterations, it will lead to a use after free. 2) If the devm_kzalloc() allocation failed then the code returned directly instead of cleaning up. Fixes: c1e6414cdc37 ("ASoC: qcom: common: Fix refcount imbalance on error") Fixes: 1e36ea360ab9 ("ASoC: qcom: common: use modern dai_link style") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20201105125154.GA176426@mwanda Signed-off-by: Mark Brown commit 048751de568816de52dedf0fa967cceada7885f1 Author: Viorel Suman Date: Mon Nov 2 18:18:10 2020 +0200 ASoC: fsl_xcvr: fix break condition The break condition copied by mistake as same as loop condition in the previous version, but must be the opposite. So fix it. Signed-off-by: Viorel Suman Link: https://lore.kernel.org/r/20201102161810.902464-1-viorel.suman@oss.nxp.com Signed-off-by: Mark Brown commit e32b100bc6ecbc390aae728fc7d2a3e247faa8a7 Author: Sameer Pujar Date: Mon Nov 2 20:40:14 2020 +0530 ASoC: audio-graph: Expose helpers from audio graph This commit exposes following functions which can be used by a sound card driver based on generic audio graph driver. Idea is vendors can have a thin driver and re-use common stuff from audio graph driver. - graph_card_probe() - graph_parse_of() In doing so a new header file is added for above. The graph_probe() function is simplified by moving more common stuff to graph_parse_of(). Signed-off-by: Sameer Pujar Cc: Kuninori Morimoto Link: https://lore.kernel.org/r/1604329814-24779-8-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown commit d09c774f2f9ff25817866b70f1fb9603e5196971 Author: Sameer Pujar Date: Mon Nov 2 20:40:13 2020 +0530 ASoC: audio-graph: Expose new members for asoc_simple_priv Add new members in struct 'asoc_simple_priv'. Idea is to leverage simple or graph card driver as much as possible and vendor can maintain a thin driver to control the behavior by populating these newly exposed members. Following are the members added in 'asoc_simple_priv': - 'ops' struct: In some cases SoC vendor drivers may want to implement 'snd_soc_ops' callbacks differently. In such cases custom callbacks would be used. - 'force_dpcm' flag: Right now simple or graph card drivers detect DAI links as DPCM links if: * The dpcm_selectable is set AND * Codec is connected to multiple CPU endpoints or aconvert property is used for rate/channels. So there is no way to directly specify usage of DPCM alone. So a flag is exposed to mark all links as DPCM. Vendor driver can set this if required. - 'dpcm_selectable': Currently simple or audio graph drivers provide a way to enable this for specific compatibles. However vendor driver may want to define some additional info. Thus expose this variable where vendor drivers can set this if required. Audio graph driver is updated to consider above flags or callbacks. Subsequent patches in the series illustrate usage for above. Signed-off-by: Sameer Pujar Cc: Kuninori Morimoto Link: https://lore.kernel.org/r/1604329814-24779-7-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown commit 930dd47d74023e7c94a7c256279e12924c14475d Author: Sameer Pujar Date: Mon Nov 2 20:40:12 2020 +0530 ASoC: audio-graph: Support empty Codec endpoint For open platforms, which can support pluggable audio cards, Codec endpoint is not fixed always. It actually depends on the compatible HW module that is going to be connected. From SoC side the given I/O interface is always available. Hence such links have fixed CPU endpoint but no Codec endpoint. This patch helps to support such links where user can populate Codec endpoint only and its fields in Platform DT depending on the plugged HW. Signed-off-by: Sameer Pujar Cc: Kuninori Morimoto Link: https://lore.kernel.org/r/1604329814-24779-6-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown commit c21cbb526c0a105d582299839a9c4244dd6bf38a Author: Sameer Pujar Date: Mon Nov 2 20:40:11 2020 +0530 ASoC: audio-graph: Identify 'no_pcm' DAI links for DPCM PCM devices are created for FE dai links with 'no-pcm' flag as '0'. Such DAI links have CPU component which implement either pcm_construct() or pcm_new() at component or dai level respectively. Based on this, current patch exposes a helper function to identify such components and populate 'no_pcm' flag for DPCM DAI link. This helps to have BE<->BE component links where PCM devices need not be created for CPU component involved in such links. Signed-off-by: Sameer Pujar Cc: Kuninori Morimoto Link: https://lore.kernel.org/r/1604329814-24779-5-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown commit e6aeb375d25dba56c4089b1d6aa0a77fe218ef3b Author: Sameer Pujar Date: Mon Nov 2 20:40:10 2020 +0530 ASoC: audio-graph: Use of_node and DAI for DPCM DAI link names For multiple instances of components, using DAI name alone for DAI links is causing conflicts. Components can define multiple DAIs and hence using just a device name won't help either. Thus DT device node reference and DAI names are used to uniquely represent DAI link names. Signed-off-by: Sameer Pujar Acked-by: Kuninori Morimoto Link: https://lore.kernel.org/r/1604329814-24779-4-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown commit aa293777bfeb75fb8872565ef99cc0e8b98b5c7d Author: Sameer Pujar Date: Mon Nov 2 20:40:09 2020 +0530 ASoC: soc-pcm: Get all BEs along DAPM path dpcm_end_walk_at_be() stops the graph walk when first BE is found for the given FE component. In a component model we may want to connect multiple DAIs from different components. A new flag is introduced in 'snd_soc_card', which when set allows DAI/component chaining. Later PCM operations can be called for all these listed components for a valid DAPM path. Signed-off-by: Sameer Pujar Link: https://lore.kernel.org/r/1604329814-24779-3-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown commit 3256ef984b016fc8491f34cad594168b4b500317 Author: Sameer Pujar Date: Mon Nov 2 20:40:08 2020 +0530 ASoC: soc-core: Fix component name_prefix parsing The "prefix" can be defined in DAI link node or it can be specified as part of the component node itself. Currently "sound-name-prefix" defined in a component is not taking effect. Actually the property is not getting parsed. It can be fixed by parsing "sound-name-prefix" property whenever "prefix" is missing in DAI link Codec node. Signed-off-by: Sameer Pujar Link: https://lore.kernel.org/r/1604329814-24779-2-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown commit ba090f9cafd53dbabe0f0a8c4ccae44203d3731b Author: Masami Hiramatsu Date: Tue Nov 3 14:49:04 2020 +0100 arm64: kprobes: Remove redundant kprobe_step_ctx The kprobe_step_ctx (kcb->ss_ctx) has ss_pending and match_addr, but those are redundant because those can be replaced by KPROBE_HIT_SS and &cur_kprobe->ainsn.api.insn[1] respectively. To simplify the code, remove the kprobe_step_ctx. Signed-off-by: Masami Hiramatsu Reviewed-by: Jean-Philippe Brucker Acked-by: Will Deacon Link: https://lore.kernel.org/r/20201103134900.337243-2-jean-philippe@linaro.org Signed-off-by: Catalin Marinas commit ed2124c0b9a8d2c09e3b5b9ca9827187c5fcbe71 Author: Jens Axboe Date: Thu Oct 29 10:16:19 2020 -0600 microblaze: add support for TIF_NOTIFY_SIGNAL Wire up TIF_NOTIFY_SIGNAL handling for microblaze. Cc: Michal Simek Signed-off-by: Jens Axboe Link: https://lore.kernel.org/r/a2b78afc-5f60-8590-9df5-17302e356552@kernel.dk Signed-off-by: Michal Simek commit e167a59c654a788cacbb0c2dd93859a715824d5c Author: Geert Uytterhoeven Date: Tue Nov 10 16:48:51 2020 +0100 microblaze: Replace by The MicroBlaze 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 Link: https://lore.kernel.org/r/20201110154851.3285695-1-geert+renesas@glider.be Signed-off-by: Michal Simek commit 23d6ab1d4c503660632e7b18cbb571d62d9bf792 Author: Jason Gunthorpe Date: Thu Nov 5 13:00:19 2020 -0400 drm: remove pgprot_decrypted() before calls to io_remap_pfn_range() commit f8f6ae5d077a ("mm: always have io_remap_pfn_range() set pgprot_decrypted()") moves the pgprot_decrypted() into io_remap_pfn_range(). Delete any, now confusing, open coded calls that directly precede io_remap_pfn_range(): - drm_io_prot() is only in drm_mmap_locked() to call io_remap_pfn_range() - fb_mmap() immediately calls vm_iomap_memory() which is a convenience wrapper for io_remap_pfn_range() Signed-off-by: Jason Gunthorpe Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/0-v1-2e6a0db57868+166-drm_sme_clean_jgg@nvidia.com commit ade896460e4a62f5e4a892a98d254937f6f5b64c Author: Geert Uytterhoeven Date: Tue Nov 10 15:43:50 2020 +0100 drm: DRM_KMB_DISPLAY should depend on ARCH_KEEMBAY The Intel Keem Bay display controller is only present on Intel Keem Bay SoCs. Hence add a dependency on ARCH_KEEMBAY, to prevent asking the user about this driver when configuring a kernel without Intel Keem Bay platform support. Note that: 1. The dependency on ARM is dropped, as Keem Bay SoCs are only supported in arm64 kernel builds, 2. The dependencies on OF and COMMON_CLK can be dropped for compile-testing, as the driver builds fine regardless. Fixes: ed794057b052b52a ("drm/kmb: Build files for KeemBay Display driver") Signed-off-by: Geert Uytterhoeven Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201110144350.3279147-1-geert+renesas@glider.be commit dc0636b837ae0496134cd3c8107f527ae6579f85 Author: Geert Uytterhoeven Date: Tue Nov 10 15:42:19 2020 +0100 drm: DRM_KMB_DISPLAY should select DRM_MIPI_DSI If CONFIG_DRM_MIPI_DSI=n: aarch64-linux-gnu-ld: drivers/gpu/drm/kmb/kmb_dsi.o: in function `kmb_dsi_host_unregister': kmb_dsi.c:(.text+0xa48): undefined reference to `mipi_dsi_host_unregister' aarch64-linux-gnu-ld: drivers/gpu/drm/kmb/kmb_dsi.o: in function `kmb_dsi_host_bridge_init': kmb_dsi.c:(.text+0xb14): undefined reference to `mipi_dsi_host_register' Fix this be selecting DRM_MIPI_DSI, like other drivers do. Fixes: ed794057b052b52a ("drm/kmb: Build files for KeemBay Display driver") Signed-off-by: Geert Uytterhoeven Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201110144219.3278831-1-geert+renesas@glider.be commit 112e505a76de69f8667e2fe8da38433f754364a8 Merge: 55c8bcaeccaa5 512bce50a41c5 Author: Thomas Zimmermann Date: Tue Nov 10 17:11:37 2020 +0100 Merge drm/drm-next into drm-misc-next We need commit f8f6ae5d077a ("mm: always have io_remap_pfn_range() set pgprot_decrypted()") to be able to merge Jason's cleanup patch. Signed-off-by: Thomas Zimmermann commit 1dcbdd944824369d4569959f8130336fe6fe5f39 Author: Zhang Qilong Date: Mon Nov 2 22:58:35 2020 +0800 spi: imx: fix reference leak in two imx operations pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to pm_runtime_put_noidle will result in reference leak in callers(spi_imx_prepare_message and spi_imx_remove), so we should fix it. Fixes: 525c9e5a32bd7 ("spi: imx: enable runtime pm support") Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20201102145835.4765-1-zhangqilong3@huawei.com Signed-off-by: Mark Brown commit 0e685017c7ba1a2fe9f6f1e7a9302890747d934c Author: Lukas Wunner Date: Sun Nov 8 23:41:00 2020 +0100 spi: atmel-quadspi: Disable clock in probe error path If the call to of_device_get_match_data() fails on probe of the Atmel QuadSPI driver, the clock "aq->pclk" is erroneously not unprepared and disabled. Fix it. Fixes: 2e5c88887358 ("spi: atmel-quadspi: add support for sam9x60 qspi controller") Signed-off-by: Lukas Wunner Cc: # v5.1+ Cc: Tudor Ambarus Cc: Boris Brezillon Reviewed-by: Tudor Ambarus Link: https://lore.kernel.org/r/8f8dc2815aa97b2378528f08f923bf81e19611f0.1604874488.git.lukas@wunner.de Signed-off-by: Mark Brown commit 513e22f384f04f205c9501372d04ece070cfc1b4 Merge: 50dc5f5c73580 3cfbf07c6d277 Author: Mark Brown Date: Tue Nov 10 15:57:39 2020 +0000 Merge series "Modify documentation and machine driver for SC7180 sound card" from Ajye Huang : Note: - The patch is made by the collaboration of Ajye Huang Cheng-Yi Chiang v6: - Documentation: Addressed suggestions from Rob Herring. - Define "maxItems: 1" in dmic-gpios property. - Only keep one example and add dmic-gpios property in. v5: - Machine driver: - Fix a format string warning (Reported-by: kernel test robot ). detailed info at https://lore.kernel.org/patchwork/patch/1331087/ v4: - Machine driver: Addressed suggestions from Tzung-Bi. - Remove redundant judgments in dmic_set() and dmic_get(). - Remove 1 level indent of judgment of IS_ERR(data->dmic_sel). v3: - Machine driver: Addressed suggestions from Tzung-Bi. - Move variables "dmic_switch" and "dmic_sel" into struct sc7180_snd_data. - Remove redundant judgments in dmic_set(). v2: - Documentation: Modify the dimc-gpios property description and examples. - Machine driver: - Remove "qcom,sc7180-sndcard-rt5682-m98357-2mic" compatible - See gpio property and use anadditional control. Thanks for the review! Ajye Huang (2): ASoC: google: dt-bindings: modify machine bindings for two MICs case ASoC: qcom: sc7180: Modify machine driver for 2mic .../bindings/sound/google,sc7180-trogdor.yaml | 8 ++- sound/soc/qcom/sc7180.c | 61 +++++++++++++++++++ 2 files changed, 68 insertions(+), 1 deletion(-) -- 2.25.1 commit 50dc5f5c735807abf04012ee5ad6149eef64508a Merge: 068904bdb562c 08651373808e1 Author: Mark Brown Date: Tue Nov 10 15:57:38 2020 +0000 Merge series "Fix vaud18 power leakage of mt6359" from Shane Chien "Shane.Chien" : From: "Shane.Chien" This series of patches is to fix vaud18 power leakage problem. vaud18 will be enable only when mt6359 audio path is turned on. Change since v2: - fix dt-binnding syntex error Change since v1: - use dapm regulator supply widget for vaud18 control. - add vaud18 regulator property in mt6359 dt-binding. Shane.Chien (2): ASoC: Fix vaud18 power leakage of mt6359 dt-bindings: mediatek: mt6359: Add new property for mt6359 .../devicetree/bindings/sound/mt6359.yaml | 9 +++++++ sound/soc/codecs/mt6359.c | 25 +------------------- sound/soc/codecs/mt6359.h | 8 ------- 3 files changed, 10 insertions(+), 32 deletions(-) -- 1.7.9.5 commit 068904bdb562cf4f426f85f90d0e191dea0d33b7 Merge: 9352d45a6e458 7428d8c8bd793 Author: Mark Brown Date: Tue Nov 10 15:57:37 2020 +0000 Merge series "ASoC: soc-compress: tidyup STREAM vs COMPRESS" from Kuninori Morimoto : Hi Mark These are v2 of tidyup patch-set for SNDRV_PCM_STREAM_xxx and SND_COMPRESS_xxx. soc-compress is using both SNDRV_PCM_STREAM_xxx and SND_COMPRESS_xxx, but mixed use. This is confusable, but no problem. Because these are defined as UAPI and are using same value. This patch-set make sure these are same value. v1 -> v2 - checks COMPRESS vs PCM_STREAM by using BUILD_BUG_ON() Link: https://lore.kernel.org/r/87wnzcfnkk.wl-kuninori.morimoto.gx@renesas.com Kuninori Morimoto (2): ASoC: soc-compress: tidyup STREAM vs COMPRESS ASoC: soc-compress: assume SNDRV_PCM_STREAM_xxx and SND_COMPRESS_xxx are same sound/soc/soc-compress.c | 63 +++++++++++++++------------------------- 1 file changed, 23 insertions(+), 40 deletions(-) -- 2.25.1 commit ac43c44a7a375ae0f0e96e10e227e226f2f2cb70 Author: Jeevan Shriram Date: Mon Nov 9 11:56:20 2020 +0530 pinctrl: qcom: Add SDX55 pincontrol driver Add initial Qualcomm SDX55 pinctrl driver to support pin configuration with pinctrl framework for SDX55 SoC. [ported from downstream and tidy up] Signed-off-by: Jeevan Shriram Signed-off-by: Vinod Koul Reviewed-by: Bjorn Andersson Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20201109062620.14566-3-vkoul@kernel.org Signed-off-by: Linus Walleij commit c82d4776a1ddf8cb16b7683ad1fe6844bf396ac8 Author: Vinod Koul Date: Mon Nov 9 11:56:19 2020 +0530 dt-bindings: pinctrl: qcom: Add SDX55 pinctrl bindings Add device tree binding Documentation details for Qualcomm SDX55 pinctrl driver. Signed-off-by: Vinod Koul Reviewed-by: Bjorn Andersson Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201109062620.14566-2-vkoul@kernel.org Signed-off-by: Linus Walleij commit 68af6d2483dbd0385317bc87a338b155be75eeb6 Author: Ard Biesheuvel Date: Tue Nov 10 14:08:51 2020 +0100 Documentation/arm64: fix RST layout of memory.rst Stephen reports that commit f4693c2716b3 ("arm64: mm: extend linear region for 52-bit VA configurations") triggers the following warnings when building the htmldocs make target of today's linux-next: Documentation/arm64/memory.rst:35: WARNING: Literal block ends without a blank line; unexpected unindent. Documentation/arm64/memory.rst:53: WARNING: Literal block ends without a blank line; unexpected unindent. Let's tweak the memory layout table to work around this. Reported-by: Stephen Rothwell Signed-off-by: Ard Biesheuvel Fixes: f4693c2716b3 ("arm64: mm: extend linear region for 52-bit VA configurations") Link: https://lore.kernel.org/r/20201110130851.15751-1-ardb@kernel.org Signed-off-by: Catalin Marinas commit 9352d45a6e4588b8c7ddded871e08d89e0e6b79f Author: David Lin Date: Tue Nov 10 17:58:25 2020 +0800 ASoC: nau8315: revise the power event of EN_PIN dapm widget for symmetry This patch is to revise the power event of EN_PIN dapm widget for symmetry. Signed-off-by: David Lin Link: https://lore.kernel.org/r/20201110095823.3512447-1-CTLIN0@nuvoton.com Signed-off-by: Mark Brown commit 4d1a9952dda649284413e6ff12b81db3a2bc4115 Author: David Lin Date: Mon Nov 2 10:32:13 2020 +0800 ASoC: nau8315: add codec driver Add codec driver for Nuvoton NAU8315. Signed-off-by: David Lin Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20201102023212.594137-1-CTLIN0@nuvoton.com Signed-off-by: Mark Brown commit 7428d8c8bd7936840b4615df674cee5fce1eb385 Author: Kuninori Morimoto Date: Fri Oct 30 10:01:22 2020 +0900 ASoC: soc-compress: assume SNDRV_PCM_STREAM_xxx and SND_COMPRESS_xxx are same soc-compress.c is using both SND_COMPRESS_xxx and SND_PCM_STREAM_xxx. These are defined as UAPI, and has same value. enum { SNDRV_PCM_STREAM_PLAYBACK = 0, SNDRV_PCM_STREAM_CAPTURE, ... }; enum snd_compr_direction { SND_COMPRESS_PLAYBACK = 0, SND_COMPRESS_CAPTURE }; Essentially both COMPRESS and PCM_STREAM definitions are identical, and can be never different because of ABI compatibility, which means it's safe to mix both variants in the code. This patch checks it by BUILD_BUG_ON(), and merge to use. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87361wmsyg.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit eb84959ab8c0ca2897e69575110bdaaf2d532eb7 Author: Kuninori Morimoto Date: Fri Oct 30 10:01:15 2020 +0900 ASoC: soc-compress: tidyup STREAM vs COMPRESS snd_soc_runtime_activate() and snd_soc_dai_digital_mute() need SNDRV_PCM_STREAM_xxx instead of SND_COMPRESS_xxx. These are bug but nothing happen because these are same value. enum { SNDRV_PCM_STREAM_PLAYBACK = 0, SNDRV_PCM_STREAM_CAPTURE, ... }; enum snd_compr_direction { SND_COMPRESS_PLAYBACK = 0, SND_COMPRESS_CAPTURE }; This patch tidyup it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/874kmcmsyn.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 3cfbf07c6d2779d24a6f5b999a91f400256b1d4e Author: Ajye Huang Date: Fri Nov 6 14:14:33 2020 +0800 ASoC: qcom: sc7180: Modify machine driver for 2mic In addition, having mixer control to switch between DMICs by using "dmic-gpios" property. Refer to this one as an example, commit b7a742cff3f6 ("ASoC: AMD: Use mixer control to switch between DMICs") Signed-off-by: Ajye Huang Reviewed-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20201106061433.1483129-3-ajye_huang@compal.corp-partner.google.com Signed-off-by: Mark Brown commit 0e38d93493c7b11bc250113dd5b7b9d17ba8c54d Author: Ajye Huang Date: Fri Nov 6 14:14:32 2020 +0800 ASoC: google: dt-bindings: modify machine bindings for two MICs case Add a property "dmic-gpios" for switching between two MICs. Signed-off-by: Ajye Huang Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201106061433.1483129-2-ajye_huang@compal.corp-partner.google.com Signed-off-by: Mark Brown commit 08651373808e16b01d3b12207f52504c17b6774c Author: Shane.Chien Date: Tue Nov 10 10:31:32 2020 +0800 dt-bindings: mediatek: mt6359: Add new property for mt6359 This patch add "LDO_VAUD18-supply" property to control vaud18 regulator. It is labeled as required due to mt6359 audio path always need to enable vaud18. Signed-off-by: Shane.Chien Link: https://lore.kernel.org/r/1604975492-6142-3-git-send-email-shane.chien@mediatek.com Signed-off-by: Mark Brown commit 64a70744b77898a15d7a5b2b4dc0fa9523a75cde Author: Shane.Chien Date: Tue Nov 10 10:31:31 2020 +0800 ASoC: Fix vaud18 power leakage of mt6359 vaud18 is power of mt6359 audio path. It should only enable when audio is used, instead of in boot up stage. Once mt6359 audio path is enabled or disabled, vaud18 is controlled by regulator supply widget "LDO_VAUD18". Due to vaud18 is controlled by regulator dapm macro instead of regmap, the macro MT6359_LDO_VAUD18_CON0 and variable avdd_reg is no used and removed from mt6359.h. Signed-off-by: Shane.Chien Link: https://lore.kernel.org/r/1604975492-6142-2-git-send-email-shane.chien@mediatek.com Signed-off-by: Mark Brown commit 55c8bcaeccaa5c6d9e7a432ebd0a1717f488a3f4 Author: Daniel Abrecht Date: Sun Nov 8 21:00:01 2020 +0000 drm: mxsfb: Implement .format_mod_supported This will make sure applications which use the IN_FORMATS blob to figure out which modifiers they can use will pick up the linear modifier which is needed by mxsfb. Such applications will not work otherwise if an incompatible implicit modifier ends up being selected. Before commit ae1ed0093281 ("drm: mxsfb: Stop using DRM simple display pipeline helper"), the DRM simple display pipeline helper took care of this. Signed-off-by: Daniel Abrecht Fixes: ae1ed0093281 ("drm: mxsfb: Stop using DRM simple display pipeline helper") Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/2a99ffffc2378209307e0992a6e97e70@nodmarc.danielabrecht.ch commit 05854d482a5fe6a497be2e134805cb188a9ea361 Author: Deepak R Varma Date: Thu Nov 5 23:06:46 2020 +0530 drm/vgem: replace idr_init() by idr_init_base() idr_init() uses base 0 which is an invalid identifier. The new function idr_init_base allows IDR to set the ID lookup from base 1. This avoids all lookups that otherwise starts from 0 since 0 is always unused. References: commit 6ce711f27500 ("idr: Make 1-based IDRs more efficient") Signed-off-by: Deepak R Varma Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201105173646.GA41732@localhost commit 6e6347e2daf52123127a60e92d808f6a3d674b4b Author: Lars Povlsen Date: Fri Nov 6 10:31:18 2020 +0100 pinctrl: ocelot: Add support for Serval platforms This patch adds support for Serval pinctrl, using the ocelot driver as basis. It adds pinconfig support as well, as supported by the platform. gclement: Split from a larger patch adding support all platforms in the same time. Signed-off-by: Lars Povlsen Signed-off-by: Gregory CLEMENT Link: https://lore.kernel.org/r/20201106093118.965152-5-gregory.clement@bootlin.com Signed-off-by: Linus Walleij commit 8f27440decb75cc92ab37ce3140c73198689feaf Author: Lars Povlsen Date: Fri Nov 6 10:31:17 2020 +0100 pinctrl: ocelot: Add support for Luton platforms This patch adds support for Luton pinctrl, using the ocelot driver as basis. It adds pinconfig support as well, as supported by the platform. gclement: Split from a larger patch adding support all platforms in the same time. Signed-off-by: Lars Povlsen Signed-off-by: Gregory CLEMENT Link: https://lore.kernel.org/r/20201106093118.965152-4-gregory.clement@bootlin.com Signed-off-by: Linus Walleij commit e1822384d6d680a31724872b3134ce03eb6a27bc Author: Gregory CLEMENT Date: Fri Nov 6 10:31:16 2020 +0100 dt-bindings: pinctrl: ocelot: Add Serval SoC support Add the documentation for the Microsemi Serval pinmuxing and gpio controller. Signed-off-by: Gregory CLEMENT Link: https://lore.kernel.org/r/20201106093118.965152-3-gregory.clement@bootlin.com Signed-off-by: Linus Walleij commit ad3b508c90ad20c63ac4fcd076e22b9f0294124d Author: Gregory CLEMENT Date: Fri Nov 6 10:31:15 2020 +0100 dt-bindings: pinctrl: ocelot: Add Luton SoC support Add the documentation for the Microsemi Luton pinmuxing and gpio controller. Signed-off-by: Gregory CLEMENT Link: https://lore.kernel.org/r/20201106093118.965152-2-gregory.clement@bootlin.com Signed-off-by: Linus Walleij commit 54515257ca3acc99e26117727874a7566148e64b Author: Kaixu Xia Date: Fri Nov 6 16:36:35 2020 +0800 pinctrl: ocelot: Remove unnecessary conversion to bool Fix the following coccicheck warning: ./drivers/pinctrl/pinctrl-ocelot.c:732:28-33: WARNING: conversion to bool not needed here Reported-by: Tosk Robot Signed-off-by: Kaixu Xia Link: https://lore.kernel.org/r/1604651795-1220-1-git-send-email-kaixuxia@tencent.com Signed-off-by: Linus Walleij commit d0511b5496c03cdbcda55a9b57c32cdd751920ed Author: John Stultz Date: Fri Nov 6 04:27:10 2020 +0000 firmware: QCOM_SCM: Allow qcom_scm driver to be loadable as a permenent module Allow the qcom_scm driver to be loadable as a permenent module. This still uses the "depends on QCOM_SCM || !QCOM_SCM" bit to ensure that drivers that call into the qcom_scm driver are also built as modules. While not ideal in some cases its the only safe way I can find to avoid build errors without having those drivers select QCOM_SCM and have to force it on (as QCOM_SCM=n can be valid for those drivers). Signed-off-by: John Stultz Reviewed-by: Bjorn Andersson Acked-by: Kalle Valo Acked-by: Greg Kroah-Hartman Cc: Catalin Marinas Cc: Will Deacon Cc: Andy Gross Cc: Bjorn Andersson Cc: Joerg Roedel Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Cc: Linus Walleij Cc: Vinod Koul Cc: Kalle Valo Cc: Maulik Shah Cc: Lina Iyer Cc: Saravana Kannan Cc: Todd Kjos Cc: Greg Kroah-Hartman Cc: linux-arm-msm@vger.kernel.org Cc: iommu@lists.linux-foundation.org Cc: linux-gpio@vger.kernel.org Link: https://lore.kernel.org/r/20201106042710.55979-3-john.stultz@linaro.org Signed-off-by: Linus Walleij commit 38e86f5c2645f3c16f698fa7e66b4eb23da5369c Author: John Stultz Date: Fri Nov 6 04:27:09 2020 +0000 pinctrl: qcom: Allow pinctrl-msm code to be loadable as a module Tweaks to allow pinctrl-msm code to be loadable as a module. This is needed in order to support having the qcom-scm driver, which pinctrl-msm calls into, configured as a module. This requires that we tweak Kconfigs selecting PINCTRL_MSM to also depend on QCOM_SCM || QCOM_SCM=n so that we match the module setting of QCOM_SCM. Signed-off-by: John Stultz Reviewed-by: Bjorn Andersson Cc: Catalin Marinas Cc: Will Deacon Cc: Andy Gross Cc: Bjorn Andersson Cc: Joerg Roedel Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Cc: Linus Walleij Cc: Vinod Koul Cc: Kalle Valo Cc: Maulik Shah Cc: Lina Iyer Cc: Saravana Kannan Cc: Todd Kjos Cc: Greg Kroah-Hartman Cc: linux-arm-msm@vger.kernel.org Cc: iommu@lists.linux-foundation.org Cc: linux-gpio@vger.kernel.org Link: https://lore.kernel.org/r/20201106042710.55979-2-john.stultz@linaro.org Signed-off-by: Linus Walleij commit be117ca32261c3331b614f440c737650791a6998 Author: John Stultz Date: Fri Nov 6 04:27:08 2020 +0000 pinctrl: qcom: Kconfig: Rework PINCTRL_MSM to be a depenency rather then a selected config This patch reworks PINCTRL_MSM to be a visible option, and instead of having the various SoC specific drivers select PINCTRL_MSM, this switches those configs to depend on PINCTRL_MSM. This is useful, as it will be needed in order to cleanly support having the qcom-scm driver, which pinctrl-msm calls into, configured as a module. Without this change, we would eventually have to add dependency lines to every config that selects PINCTRL_MSM, and that would becomes a maintenance headache. We also add PINCTRL_MSM to the arm64 defconfig to avoid surprises as otherwise PINCTRL_MSM/IPQ* options previously enabled, will be off. Signed-off-by: John Stultz Reviewed-by: Bjorn Andersson Cc: Catalin Marinas Cc: Will Deacon Cc: Andy Gross Cc: Bjorn Andersson Cc: Joerg Roedel Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Cc: Linus Walleij Cc: Vinod Koul Cc: Kalle Valo Cc: Maulik Shah Cc: Lina Iyer Cc: Saravana Kannan Cc: Todd Kjos Cc: Greg Kroah-Hartman Cc: linux-arm-msm@vger.kernel.org Cc: iommu@lists.linux-foundation.org Cc: linux-gpio@vger.kernel.org Link: https://lore.kernel.org/r/20201106042710.55979-1-john.stultz@linaro.org Signed-off-by: Linus Walleij commit 39cc1d3397053f340776c99e55b733a063fa2c69 Author: Coiby Xu Date: Fri Nov 6 07:19:11 2020 +0800 pinctrl: amd: print debounce filter info in debugfs Print the status of debounce filter as follows, $ cat /sys/kernel/debug/gpio pin129 interrupt is disabled | interrupt is masked | disable wakeup in S0i3 state | disable wakeup in S3 state | disable wakeup in S4/S5 state| input is high | pull-up is disabled | Pull-down is disabled | output is disabled | debouncing filter disabled | 0x50000 pin130 interrupt is disabled | interrupt is masked | disable wakeup in S0i3 state | disable wakeup in S3 state | disable wakeup in S4/S5 state | input is high | pull-up is disabled | Pull-down is disabled | output is disabled | debouncing filter (high) enabled | debouncing timeout is 124800 (us)| 0x503c8 Signed-off-by: Coiby Xu Link: https://lore.kernel.org/r/20201105231912.69527-4-coiby.xu@gmail.com Signed-off-by: Linus Walleij commit 016e054d6926390a583a6422f3193e222be62eb9 Author: Paul Cercueil Date: Sun Nov 1 09:01:04 2020 +0000 pinctrl: ingenic: Add lcd-8bit group for JZ4770 Add the "lcd-8bit" group to the "lcd" function. As "lcd-24bit" is a superset of "lcd-8bit", in theory the former could be modified to only contain the pins not already included in "lcd-8bit", just like how it's done for the JZ4740 and JZ4725B platforms. However, we can't do that without breaking Device Tree ABI, so in that case we have no choice but to have two groups containing the same pins. Signed-off-by: Paul Cercueil Tested-by: 周琰杰 (Zhou Yanjie) Link: https://lore.kernel.org/r/20201101090104.5088-3-paul@crapouillou.net Signed-off-by: Linus Walleij commit bb42b59310ebc33ab73dddd9a075d24003d1adac Author: Paul Cercueil Date: Sun Nov 1 09:01:03 2020 +0000 pinctrl: ingenic: Get rid of repetitive data Abuse the pin function pointer to store the pin function value directly, when all the pins of a group have the same function value. Now when the pointer value is <= 3 (unsigned), the pointer value is used as the pin function; otherwise it is used as a regular pointer. This drastically reduces the number of pin function tables needed, and drops .data usage by about 2 KiB. Additionally, the few pin function tables that are still around now contain u8 instead of int, since the largest number that will be stored is 3. Signed-off-by: Paul Cercueil Tested-by: 周琰杰 (Zhou Yanjie) Link: https://lore.kernel.org/r/20201101090104.5088-2-paul@crapouillou.net Signed-off-by: Linus Walleij commit 57972641810a97566ffd13e4be3f6a66d61eb3b5 Author: Frank Wunderlich Date: Fri Oct 16 22:40:19 2020 +0200 pinctrl: mt7622: drop pwm ch7 as mt7622 only has 6 channels mt7622 is reported by mediatek to have only 6 pwm channels so drop pindefines for 7th channel Signed-off-by: Frank Wunderlich Acked-by: Sean Wang Link: https://lore.kernel.org/r/20201016204019.2606-4-linux@fw-web.de Signed-off-by: Linus Walleij commit 3d417196e2447811f9c73b0efe7ba02f5cb20fff Author: Vladimir Lypak Date: Wed Oct 7 19:06:12 2020 +0300 dt-bindings: pinctrl: qcom: add msm8953 pinctrl bindings Add device tree bindings documentation for Qualcomm MSM8953 pinctrl driver. Signed-off-by: Vladimir Lypak Reviewed-by: Bjorn Andersson Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201007160611.942754-2-junak.pub@gmail.com Signed-off-by: Linus Walleij commit 0e74abf3a0a3a711145f11f3a782432a2df5f744 Author: Vladimir Lypak Date: Wed Oct 7 19:06:11 2020 +0300 pinctrl: qcom: add pinctrl driver for msm8953 Add inititial pinctrl driver for MSM8953 platform. Compatible SoCs are: MSM8953, APQ8053, SDM(SDA)450, SDM(SDA)632. Based off CAF implementation. Signed-off-by: Prasad Sodagudi Signed-off-by: Vladimir Lypak Acked-by: Bjorn Andersson Link: https://lore.kernel.org/r/20201007160611.942754-1-junak.pub@gmail.com Signed-off-by: Linus Walleij commit ce99a277644cc812eb22e0700731165092ac003a Author: Kenneth Chan Date: Tue Aug 25 18:13:41 2020 +0800 MAINTAINERS: new panasonic-laptop maintainer Take over maintainership of panasonic-laptop from Harald Welte. Signed-off-by: Kenneth Chan Acked-by: Harald Welte Link: https://lore.kernel.org/r/20200825101341.5699-1-kenneth.t.chan@gmail.com Signed-off-by: Hans de Goede commit 25dd390c6206c3e0f9e0551fca030a5f909564eb Author: Kenneth Chan Date: Sat Aug 22 02:14:33 2020 +0800 platform/x86: panasonic-laptop: Add sysfs attributes for firmware brightness registers Panasonic laptops (at least from CF-W4 onwards) have dedicated firmware registers for saving ac/dc and current brightness. They are a bit confusing so here's some explanations: AC_MIN_BRIGHT, AC_MAX_BRIGHT, DC_MIN_BRIGHT, DC_MAX_BRIGHT: Read-only. Values: 0x01 and 0x15 respectively. AC_CUR_BRIGHT, DC_CUR_BRIGHT: Read-Write. 0x00-0xFF. Store user-defined AC/DC brightness. However, they do not represent current brightness so they should be named AC_BRIGHT and DC_BRIGHT instead. CUR_BRIGHT (present since CF-W4): Read-Write. 0x00-0xFF. It sets the current brightness. It won't update itself if brightness is changed via other means, e.g. acpi_video0. Another CUR_BRIGHT (added since CF-W5): Read-Write. 0x01-0x15. Its value always synchronizes with current brightness. Not implemented in this version. Currently the backlight API interacts with AC_CUR_BRIGHT (probably because it's the only bl register available in earlier models?). This patch adds sysfs attributes for AC_CUR_BRIGHT, DC_CUR_BRIGHT and CUR_BRIGHT. It also fixes the error of https://lkml.org/lkml/2020/8/19/1264. PS: I think the backlight API should interact with CUR_BRIGHT instead of AC_CUR_BRIGHT. But it involves complications like mapping between 0x01-0x15 or 0x00-0x14 (the backlight API) and 0x00-0xFF (CUR_BRIGHT). I'll leave the discussion for a later version. Signed-off-by: Kenneth Chan Link: https://lore.kernel.org/r/20200821181433.17653-10-kenneth.t.chan@gmail.com Signed-off-by: Hans de Goede commit 468f96bfa3a045450f54c96e63db786b0b5fcab2 Author: Kenneth Chan Date: Sat Aug 22 02:14:32 2020 +0800 platform/x86: panasonic-laptop: Add support for battery charging threshold (eco mode) Add battery charging threshold (aka ECO mode) support. NOTE: The state of ECO mode is persistent until the next POST cycle which reset it to previous state. Signed-off-by: Kenneth Chan Link: https://lore.kernel.org/r/20200821181433.17653-9-kenneth.t.chan@gmail.com Signed-off-by: Hans de Goede commit ed83c9171829ff16a08e29b58df6c11190a83740 Author: Kenneth Chan Date: Sat Aug 22 02:14:31 2020 +0800 platform/x86: panasonic-laptop: Resolve hotkey double trigger bug Sometimes double ACPI events are triggered for brightness, vol and mute hotkeys. This patch fixes it. Signed-off-by: Kenneth Chan Link: https://lore.kernel.org/r/20200821181433.17653-8-kenneth.t.chan@gmail.com Signed-off-by: Hans de Goede commit e3a9afbbc309c51421d9beb3390ba42522fa6afe Author: Kenneth Chan Date: Sat Aug 22 02:14:30 2020 +0800 platform/x86: panasonic-laptop: Add write support to mute Add write support to the mute platform device Signed-off-by: Kenneth Chan Link: https://lore.kernel.org/r/20200821181433.17653-7-kenneth.t.chan@gmail.com Signed-off-by: Hans de Goede commit 008563513348a5ab0324fb8976172fe56c939450 Author: Kenneth Chan Date: Sat Aug 22 02:14:29 2020 +0800 platform/x86: panasonic-laptop: Fix sticky key init bug The return value of the sticky key on some models (e.g. CF-W5) do not reflect its state. How to retrieve its state from firmware is unknown. The safest bet is to reset it at module init and store its state in pcc struct. Signed-off-by: Kenneth Chan Link: https://lore.kernel.org/r/20200821181433.17653-6-kenneth.t.chan@gmail.com Signed-off-by: Hans de Goede commit 80373ad0edb53b5f044795918a5c9bdaa4e7f697 Author: Kenneth Chan Date: Sat Aug 22 02:14:28 2020 +0800 platform/x86: panasonic-laptop: Fix naming of platform files for consistency with other modules Change platform device function names for consistency with other modules Signed-off-by: Kenneth Chan Link: https://lore.kernel.org/r/20200821181433.17653-5-kenneth.t.chan@gmail.com Signed-off-by: Hans de Goede commit 0119fbc0215a1843764b0d977f8aed7b2526ddb2 Author: Kenneth Chan Date: Sat Aug 22 02:14:27 2020 +0800 platform/x86: panasonic-laptop: Split MODULE_AUTHOR() by one author per macro call In reply to https://lkml.org/lkml/2020/8/19/186 to split MODULE_AUTHOR() per macro call. Signed-off-by: Kenneth Chan Link: https://lore.kernel.org/r/20200821181433.17653-4-kenneth.t.chan@gmail.com Signed-off-by: Hans de Goede commit f1aaf914654a08f3a54ffa83f55bea23f224140c Author: Kenneth Chan Date: Sat Aug 22 02:14:26 2020 +0800 platform/x86: panasonic-laptop: Replace ACPI prints with pr_*() macros Replace ACPI prints with pr_*() macros for consistency with other platform devices. Clean up obsolete ACPI_HOTKEY_COMPONENT code. Signed-off-by: Kenneth Chan Link: https://lore.kernel.org/r/20200821181433.17653-3-kenneth.t.chan@gmail.com Signed-off-by: Hans de Goede commit d5a81d8e864bb1faebeafac0c79b39937701008f Author: Kenneth Chan Date: Sat Aug 22 02:14:25 2020 +0800 platform/x86: panasonic-laptop: Add support for optical driver power in Y and W series The physical optical drive switch is present in Y and W series that switches on the drive but fails to turn it off. The idea is to be able to toggle the drive power by software and/or hardware. This patch merges Martin Lucina 's work that took care of the software part. Code is also added for the physical switch to power off the drive. Signed-off-by: Kenneth Chan Link: https://lore.kernel.org/r/20200821181433.17653-2-kenneth.t.chan@gmail.com Signed-off-by: Hans de Goede commit c993158281484f2d86b6a32b07e353e5a871334d Merge: f487e6d6c5c6d 5a7b624037625 Author: Tony Lindgren Date: Tue Nov 10 15:42:31 2020 +0200 Merge branch 'omap-for-v5.11/dt-mot-take2' into omap-for-v5.11/dt commit 512bce50a41c528fa15c4c014293e7bebf018658 Merge: 5b8c596976d43 f8394f232b1ea Author: Daniel Vetter Date: Tue Nov 10 13:58:05 2020 +0100 Merge v5.10-rc3 into drm-next We need commit f8f6ae5d077a ("mm: always have io_remap_pfn_range() set pgprot_decrypted()") to be able to merge Jason's cleanup patch. Signed-off-by: Daniel Vetter commit 5a7b624037625adcfd247299aa6f9d9257c97371 Author: Carl Philipp Klemm Date: Sun Nov 8 19:43:39 2020 +0100 ARM: dts: xt875: add section for kionix kxtf9 Add section for kionix kxtf9. Signed-off-by: Carl Philipp Klemm [tony@atomide.com: removed extra header from description] Signed-off-by: Tony Lindgren commit 06607cfa0ffe2e8b2a3cb56fb1c2ef39ba0c22a3 Author: Carl Philipp Klemm Date: Sun Nov 8 19:49:56 2020 +0100 ARM: dts: mapphone: separate out xt894 specific things Remove xt894 specific things from motorola-mapphone-common.dtsi and add them to omap4-droid4-xt894.dts and omap4-droid-bionic-xt875.dts as applicable. Signed-off-by: Carl Philipp Klemm [tony@atomide.com: shortened subject, wrapped description] Signed-off-by: Tony Lindgren commit f487e6d6c5c6d1adb56d1752ca16b9d6c7c24068 Author: Alexander Dahl Date: Mon Oct 5 22:34:48 2020 +0200 ARM: dts: omap: Fix schema warnings for pwm-leds The node names for devices using the pwm-leds driver follow a certain naming scheme (now). Parent node name is not enforced, but recommended by DT project. DTC arch/arm/boot/dts/omap3-beagle-xm.dt.yaml CHECK arch/arm/boot/dts/omap3-beagle-xm.dt.yaml /home/alex/build/linux/arch/arm/boot/dts/omap3-beagle-xm.dt.yaml: pwmleds: 'pmu_stat' does not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+' From schema: /home/alex/src/linux/leds/Documentation/devicetree/bindings/leds/leds-pwm.yaml DTC arch/arm/boot/dts/omap3-beagle-xm-ab.dt.yaml CHECK arch/arm/boot/dts/omap3-beagle-xm-ab.dt.yaml /home/alex/build/linux/arch/arm/boot/dts/omap3-beagle-xm-ab.dt.yaml: pwmleds: 'pmu_stat' does not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+' From schema: /home/alex/src/linux/leds/Documentation/devicetree/bindings/leds/leds-pwm.yaml DTC arch/arm/boot/dts/omap3-overo-alto35.dt.yaml CHECK arch/arm/boot/dts/omap3-overo-alto35.dt.yaml /home/alex/build/linux/arch/arm/boot/dts/omap3-overo-alto35.dt.yaml: pwmleds: 'overo' does not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+' From schema: /home/alex/src/linux/leds/Documentation/devicetree/bindings/leds/leds-pwm.yaml DTC arch/arm/boot/dts/omap3-overo-chestnut43.dt.yaml CHECK arch/arm/boot/dts/omap3-overo-chestnut43.dt.yaml /home/alex/build/linux/arch/arm/boot/dts/omap3-overo-chestnut43.dt.yaml: pwmleds: 'overo' does not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+' From schema: /home/alex/src/linux/leds/Documentation/devicetree/bindings/leds/leds-pwm.yaml DTC arch/arm/boot/dts/omap3-overo-gallop43.dt.yaml CHECK arch/arm/boot/dts/omap3-overo-gallop43.dt.yaml /home/alex/build/linux/arch/arm/boot/dts/omap3-overo-gallop43.dt.yaml: pwmleds: 'overo' does not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+' From schema: /home/alex/src/linux/leds/Documentation/devicetree/bindings/leds/leds-pwm.yaml DTC arch/arm/boot/dts/omap3-overo-palo35.dt.yaml CHECK arch/arm/boot/dts/omap3-overo-palo35.dt.yaml /home/alex/build/linux/arch/arm/boot/dts/omap3-overo-palo35.dt.yaml: pwmleds: 'overo' does not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+' From schema: /home/alex/src/linux/leds/Documentation/devicetree/bindings/leds/leds-pwm.yaml DTC arch/arm/boot/dts/omap3-overo-palo43.dt.yaml CHECK arch/arm/boot/dts/omap3-overo-palo43.dt.yaml /home/alex/build/linux/arch/arm/boot/dts/omap3-overo-palo43.dt.yaml: pwmleds: 'overo' does not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+' From schema: /home/alex/src/linux/leds/Documentation/devicetree/bindings/leds/leds-pwm.yaml DTC arch/arm/boot/dts/omap3-overo-storm-alto35.dt.yaml CHECK arch/arm/boot/dts/omap3-overo-storm-alto35.dt.yaml /home/alex/build/linux/arch/arm/boot/dts/omap3-overo-storm-alto35.dt.yaml: pwmleds: 'overo' does not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+' From schema: /home/alex/src/linux/leds/Documentation/devicetree/bindings/leds/leds-pwm.yaml DTC arch/arm/boot/dts/omap3-overo-storm-chestnut43.dt.yaml CHECK arch/arm/boot/dts/omap3-overo-storm-chestnut43.dt.yaml /home/alex/build/linux/arch/arm/boot/dts/omap3-overo-storm-chestnut43.dt.yaml: pwmleds: 'overo' does not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+' From schema: /home/alex/src/linux/leds/Documentation/devicetree/bindings/leds/leds-pwm.yaml DTC arch/arm/boot/dts/omap3-overo-storm-gallop43.dt.yaml CHECK arch/arm/boot/dts/omap3-overo-storm-gallop43.dt.yaml /home/alex/build/linux/arch/arm/boot/dts/omap3-overo-storm-gallop43.dt.yaml: pwmleds: 'overo' does not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+' From schema: /home/alex/src/linux/leds/Documentation/devicetree/bindings/leds/leds-pwm.yaml DTC arch/arm/boot/dts/omap3-overo-storm-palo35.dt.yaml CHECK arch/arm/boot/dts/omap3-overo-storm-palo35.dt.yaml /home/alex/build/linux/arch/arm/boot/dts/omap3-overo-storm-palo35.dt.yaml: pwmleds: 'overo' does not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+' From schema: /home/alex/src/linux/leds/Documentation/devicetree/bindings/leds/leds-pwm.yaml DTC arch/arm/boot/dts/omap3-overo-storm-palo43.dt.yaml CHECK arch/arm/boot/dts/omap3-overo-storm-palo43.dt.yaml /home/alex/build/linux/arch/arm/boot/dts/omap3-overo-storm-palo43.dt.yaml: pwmleds: 'overo' does not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+' From schema: /home/alex/src/linux/leds/Documentation/devicetree/bindings/leds/leds-pwm.yaml DTC arch/arm/boot/dts/omap3-overo-storm-summit.dt.yaml CHECK arch/arm/boot/dts/omap3-overo-storm-summit.dt.yaml /home/alex/build/linux/arch/arm/boot/dts/omap3-overo-storm-summit.dt.yaml: pwmleds: 'overo' does not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+' From schema: /home/alex/src/linux/leds/Documentation/devicetree/bindings/leds/leds-pwm.yaml DTC arch/arm/boot/dts/omap3-overo-storm-tobi.dt.yaml CHECK arch/arm/boot/dts/omap3-overo-storm-tobi.dt.yaml /home/alex/build/linux/arch/arm/boot/dts/omap3-overo-storm-tobi.dt.yaml: pwmleds: 'overo' does not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+' From schema: /home/alex/src/linux/leds/Documentation/devicetree/bindings/leds/leds-pwm.yaml DTC arch/arm/boot/dts/omap3-overo-storm-tobiduo.dt.yaml CHECK arch/arm/boot/dts/omap3-overo-storm-tobiduo.dt.yaml /home/alex/build/linux/arch/arm/boot/dts/omap3-overo-storm-tobiduo.dt.yaml: pwmleds: 'overo' does not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+' From schema: /home/alex/src/linux/leds/Documentation/devicetree/bindings/leds/leds-pwm.yaml DTC arch/arm/boot/dts/omap3-overo-summit.dt.yaml CHECK arch/arm/boot/dts/omap3-overo-summit.dt.yaml /home/alex/build/linux/arch/arm/boot/dts/omap3-overo-summit.dt.yaml: pwmleds: 'overo' does not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+' From schema: /home/alex/src/linux/leds/Documentation/devicetree/bindings/leds/leds-pwm.yaml DTC arch/arm/boot/dts/omap3-overo-tobi.dt.yaml CHECK arch/arm/boot/dts/omap3-overo-tobi.dt.yaml /home/alex/build/linux/arch/arm/boot/dts/omap3-overo-tobi.dt.yaml: pwmleds: 'overo' does not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+' From schema: /home/alex/src/linux/leds/Documentation/devicetree/bindings/leds/leds-pwm.yaml DTC arch/arm/boot/dts/omap3-overo-tobiduo.dt.yaml CHECK arch/arm/boot/dts/omap3-overo-tobiduo.dt.yaml /home/alex/build/linux/arch/arm/boot/dts/omap3-overo-tobiduo.dt.yaml: pwmleds: 'overo' does not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+' From schema: /home/alex/src/linux/leds/Documentation/devicetree/bindings/leds/leds-pwm.yaml DTC arch/arm/boot/dts/omap4-kc1.dt.yaml CHECK arch/arm/boot/dts/omap4-kc1.dt.yaml /home/alex/build/linux/arch/arm/boot/dts/omap4-kc1.dt.yaml: pwmleds: 'green', 'orange' do not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+' From schema: /home/alex/src/linux/leds/Documentation/devicetree/bindings/leds/leds-pwm.yaml DTC arch/arm/boot/dts/omap4-sdp.dt.yaml CHECK arch/arm/boot/dts/omap4-sdp.dt.yaml /home/alex/build/linux/arch/arm/boot/dts/omap4-sdp.dt.yaml: pwmleds: 'charging', 'kpad' do not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+' From schema: /home/alex/src/linux/leds/Documentation/devicetree/bindings/leds/leds-pwm.yaml DTC arch/arm/boot/dts/omap4-sdp-es23plus.dt.yaml CHECK arch/arm/boot/dts/omap4-sdp-es23plus.dt.yaml /home/alex/build/linux/arch/arm/boot/dts/omap4-sdp-es23plus.dt.yaml: pwmleds: 'charging', 'kpad' do not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+' From schema: /home/alex/src/linux/leds/Documentation/devicetree/bindings/leds/leds-pwm.yaml Signed-off-by: Alexander Dahl Signed-off-by: Tony Lindgren commit bdb65ec381f5503b257e41669f9998492b6083aa Author: Serge Semin Date: Tue Oct 20 14:59:52 2020 +0300 ARM: dts: omap5: Harmonize DWC USB3 DT nodes name In accordance with the DWC USB3 bindings the corresponding node name is suppose to comply with the Generic USB HCD DT schema, which requires the USB nodes to have the name acceptable by the regexp: "^usb(@.*)?" . Make sure the "snps,dwc3"-compatible nodes are correctly named. Signed-off-by: Serge Semin Acked-by: Krzysztof Kozlowski Signed-off-by: Tony Lindgren commit 35f9a0d32effa3411798c68d7b46f2c7a4d41f9d Author: Serge Semin Date: Tue Oct 20 14:59:33 2020 +0300 ARM: dts: am437x: Correct DWC USB3 compatible string Syonpsys IP cores are supposed to be defined with "snps" vendor-prefix. Use it instead of the deprecated "synopsys" one. Signed-off-by: Serge Semin Reviewed-by: Krzysztof Kozlowski Signed-off-by: Tony Lindgren commit b86516452cfd94321900abe7c8ac843c146a8c53 Author: H. Nikolaus Schaller Date: Sat Oct 3 16:10:01 2020 +0200 ARM: dts: pandaboard es: add bluetooth uart for HCI The wl271 bluetooth uart is connected to uart2. Setup a serdev uart child and separate bluetooth and uart2 pinmux from wl12xx pinmux to better group the pins and muxes. Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren commit df9dbaf2c415cd94ad520067a1eccfee62f00a33 Author: H. Nikolaus Schaller Date: Sat Oct 3 16:10:00 2020 +0200 ARM: dts: pandaboard: fix pinmux for gpio user button of Pandaboard ES The pinmux control register offset passed to OMAP4_IOPAD is odd. Fixes: ab9a13665e7c ("ARM: dts: pandaboard: add gpio user button") Cc: stable@vger.kernel.org Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren commit a5d704d33245b0799947a3008f9f376dba4d5c91 Author: Dinghao Liu Date: Sat Aug 22 14:57:33 2020 +0800 drm/omap: Fix runtime PM imbalance on error pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code. However, users of its direct wrappers in omapdrm assume that PM usage counter will not change on error. Thus a pairing decrement is needed on the error handling path for these wrappers to keep the counter balanced. Signed-off-by: Dinghao Liu Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20200822065743.13671-1-dinghao.liu@zju.edu.cn commit 1b409fda60414186688d94a125ce5306f323af6d Author: Alexander A. Klimov Date: Mon Jul 13 14:28:59 2020 +0200 drm: omapdrm: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20200713122859.34135-1-grandmaster@al2klimov.de commit 3945ac0ea8ca213e09e6d62c0ce14f3b3941ad2c Author: Wang Xiaojun Date: Thu Sep 17 14:29:58 2020 +0800 drm/tidss: use devm_platform_ioremap_resource_byname Use the devm_platform_ioremap_resource_byname() helper instead of calling platform_get_resource_byname() and devm_ioremap_resource() separately. Signed-off-by: Wang Xiaojun Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20200917062958.2183496-1-wangxiaojun11@huawei.com commit a29bbb0861f487a5e144dc997a9f71a36c7a2404 Author: Jordan Crouse Date: Mon Nov 9 11:47:27 2020 -0700 dt-bindings: arm-smmu: Add compatible string for Adreno GPU SMMU Every Qcom Adreno GPU has an embedded SMMU for its own use. These devices depend on unique features such as split pagetables, different stall/halt requirements and other settings. Identify them with a compatible string so that they can be identified in the arm-smmu implementation specific code. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark Reviewed-by: Rob Herring Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20201109184728.2463097-4-jcrouse@codeaurora.org Signed-off-by: Will Deacon commit bffb2eaf0ba2c0bdd7fc2c4e194dab6783f5d8c1 Author: Rob Clark Date: Mon Nov 9 11:47:26 2020 -0700 iommu/arm-smmu: Add a way for implementations to influence SCTLR For the Adreno GPU's SMMU, we want SCTLR.HUPCF set to ensure that pending translations are not terminated on iova fault. Otherwise a terminated CP read could hang the GPU by returning invalid command-stream data. Add a hook to for the implementation to modify the sctlr value if it wishes. Co-developed-by: Jordan Crouse Signed-off-by: Rob Clark Signed-off-by: Jordan Crouse Link: https://lore.kernel.org/r/20201109184728.2463097-3-jcrouse@codeaurora.org Signed-off-by: Will Deacon commit 5c7469c66f953a2eb223468d7aa40062af9c14ab Author: Jordan Crouse Date: Mon Nov 9 11:47:25 2020 -0700 iommu/arm-smmu-qcom: Add implementation for the adreno GPU SMMU Add a special implementation for the SMMU attached to most Adreno GPU target triggered from the qcom,adreno-smmu compatible string. The new Adreno SMMU implementation will enable split pagetables (TTBR1) for the domain attached to the GPU device (SID 0) and hard code it context bank 0 so the GPU hardware can implement per-instance pagetables. Co-developed-by: Rob Clark Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20201109184728.2463097-2-jcrouse@codeaurora.org Signed-off-by: Will Deacon commit ae36fcccfaf5f3666beb3cf30aea9127b926ab64 Author: Lee Jones Date: Thu Nov 5 14:45:06 2020 +0000 drm/omap: dsi: Rework and remove a few unused variables Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/omapdrm/dss/dsi.c: In function ‘_dsi_print_reset_status’: drivers/gpu/drm/omapdrm/dss/dsi.c:1131:6: warning: variable ‘l’ set but not used [-Wunused-but-set-variable] drivers/gpu/drm/omapdrm/dss/dsi.c: In function ‘dsi_update’: drivers/gpu/drm/omapdrm/dss/dsi.c:3943:10: warning: variable ‘dh’ set but not used [-Wunused-but-set-variable] drivers/gpu/drm/omapdrm/dss/dsi.c:3943:6: warning: variable ‘dw’ set but not used [-Wunused-but-set-variable] Cc: Tomi Valkeinen Cc: David Airlie Cc: Daniel Vetter Cc: Laurent Pinchart Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Reviewed-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20201105144517.1826692-9-lee.jones@linaro.org commit 67daa52ddcf91b1857d89e4cde97f2be2f75cf6e Author: Lee Jones Date: Thu Nov 5 14:45:02 2020 +0000 drm/omap: omap_irq: Fix a couple of doc-rot issues The API has been updated, but the header was not. Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/omapdrm/omap_irq.c:115: warning: Function parameter or member 'crtc' not described in 'omap_irq_enable_vblank' drivers/gpu/drm/omapdrm/omap_irq.c:115: warning: Excess function parameter 'dev' description in 'omap_irq_enable_vblank' drivers/gpu/drm/omapdrm/omap_irq.c:115: warning: Excess function parameter 'pipe' description in 'omap_irq_enable_vblank' drivers/gpu/drm/omapdrm/omap_irq.c:142: warning: Function parameter or member 'crtc' not described in 'omap_irq_disable_vblank' drivers/gpu/drm/omapdrm/omap_irq.c:142: warning: Excess function parameter 'dev' description in 'omap_irq_disable_vblank' drivers/gpu/drm/omapdrm/omap_irq.c:142: warning: Excess function parameter 'pipe' description in 'omap_irq_disable_vblank' Cc: Tomi Valkeinen Cc: David Airlie Cc: Daniel Vetter Cc: Rob Clark Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20201105144517.1826692-5-lee.jones@linaro.org commit fc4ef6b121259ae13d92132069d57b6e69d04908 Author: Lee Jones Date: Fri Nov 6 21:49:39 2020 +0000 drm/omap: dmm_tiler: Demote abusive use of kernel-doc format Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:313: warning: Function parameter or member 'dmm' not described in 'dmm_txn_init' drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:313: warning: Function parameter or member 'tcm' not described in 'dmm_txn_init' drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:353: warning: Function parameter or member 'txn' not described in 'dmm_txn_append' drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:353: warning: Function parameter or member 'area' not described in 'dmm_txn_append' drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:353: warning: Function parameter or member 'pages' not described in 'dmm_txn_append' drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:353: warning: Function parameter or member 'npages' not described in 'dmm_txn_append' drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:353: warning: Function parameter or member 'roll' not described in 'dmm_txn_append' drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:399: warning: Function parameter or member 'txn' not described in 'dmm_txn_commit' drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:399: warning: Function parameter or member 'wait' not described in 'dmm_txn_commit' Cc: Tomi Valkeinen Cc: David Airlie Cc: Daniel Vetter Cc: Rob Clark Cc: Andy Gross Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20201106214949.2042120-10-lee.jones@linaro.org commit 567cd70468bf210d7aba972e4d01d9649971c95d Author: Lee Jones Date: Fri Nov 6 21:49:38 2020 +0000 drm/omap: gem: Fix misnamed and missing parameter descriptions Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/omapdrm/omap_gem.c:593: warning: Function parameter or member 'file' not described in 'omap_gem_dumb_create' drivers/gpu/drm/omapdrm/omap_gem.c:593: warning: Excess function parameter 'drm_file' description in 'omap_gem_dumb_create' drivers/gpu/drm/omapdrm/omap_gem.c:619: warning: Function parameter or member 'offset' not described in 'omap_gem_dumb_map_offset' Cc: Tomi Valkeinen Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: "Christian König" Cc: Rob Clark Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20201106214949.2042120-9-lee.jones@linaro.org commit 3045fe45abbcba2ae4c3ce9b3c610523651be1c7 Author: Kaixu Xia Date: Sat Nov 7 18:20:39 2020 +0800 iommu/arm-smmu-v3: Assign boolean values to a bool variable Fix the following coccinelle warnings: ./drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:36:12-26: WARNING: Assignment of 0/1 to bool variable Signed-off-by: Kaixu Xia Link: https://lore.kernel.org/r/1604744439-6846-1-git-send-email-kaixuxia@tencent.com Signed-off-by: Will Deacon commit 253f28b6237264216b052ac0848fd7fc917b5259 Author: Maxime Ripard Date: Thu Nov 5 17:45:18 2020 +0100 drm: Use state helper instead of CRTC state pointer Many drivers reference the crtc->pointer in order to get the current CRTC state in their atomic_begin or atomic_flush hooks, which would be the new CRTC state in the global atomic state since _swap_state happened when those hooks are run. Use the drm_atomic_get_new_crtc_state helper to get that state to make it more obvious. This was made using the coccinelle script below: @ crtc_atomic_func @ identifier helpers; identifier func; @@ ( static struct drm_crtc_helper_funcs helpers = { ..., .atomic_begin = func, ..., }; | static struct drm_crtc_helper_funcs helpers = { ..., .atomic_flush = func, ..., }; ) @@ identifier crtc_atomic_func.func; identifier crtc, state; symbol crtc_state; expression e; @@ func(struct drm_crtc *crtc, struct drm_atomic_state *state) { ... - struct tegra_dc_state *crtc_state = e; + struct tegra_dc_state *dc_state = e; <+... - crtc_state + dc_state ...+> } @@ identifier crtc_atomic_func.func; identifier crtc, state; symbol crtc_state; expression e; @@ func(struct drm_crtc *crtc, struct drm_atomic_state *state) { ... - struct mtk_crtc_state *crtc_state = e; + struct mtk_crtc_state *mtk_crtc_state = e; <+... - crtc_state + mtk_crtc_state ...+> } @ replaces_new_state @ identifier crtc_atomic_func.func; identifier crtc, state, crtc_state; @@ func(struct drm_crtc *crtc, struct drm_atomic_state *state) { ... - struct drm_crtc_state *crtc_state = crtc->state; + struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state, crtc); ... } @@ identifier crtc_atomic_func.func; identifier crtc, state, crtc_state; @@ func(struct drm_crtc *crtc, struct drm_atomic_state *state) { struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state, crtc); ... - crtc->state + crtc_state ... } @ adds_new_state @ identifier crtc_atomic_func.func; identifier crtc, state; @@ func(struct drm_crtc *crtc, struct drm_atomic_state *state) { + struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state, crtc); ... - crtc->state + crtc_state ... } @ include depends on adds_new_state || replaces_new_state @ @@ #include @ no_include depends on !include && (adds_new_state || replaces_new_state) @ @@ + #include #include Suggested-by: Ville Syrjälä Signed-off-by: Maxime Ripard Reviewed-by: Ville Syrjälä Acked-by: Thomas Zimmermann Cc: "James (Qian) Wang" Cc: Liviu Dudau Cc: Mihail Atanassov Cc: Brian Starkey Cc: Russell King Cc: Paul Cercueil Cc: Chun-Kuang Hu Cc: Philipp Zabel Cc: Sandy Huang Cc: "Heiko Stübner" Cc: Thierry Reding Cc: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20201105164518.392891-1-maxime@cerno.tech commit 6ac4a5ac50d1d25a61aa00e660eebb21a2ff9b96 Author: Marc Zyngier Date: Mon Nov 2 18:11:16 2020 +0000 KVM: arm64: Drop kvm_coproc.h kvm_coproc.h used to serve as a compatibility layer for the files shared between the 32 and 64 bit ports. Another one bites the dust... Signed-off-by: Marc Zyngier commit 5f7e02aebdf0c8d255f3ff2df8595fd220e7d5ce Author: Marc Zyngier Date: Thu Oct 29 17:21:37 2020 +0000 KVM: arm64: Drop legacy copro shadow register Finally remove one of the biggest 32bit legacy: the copro shadow mapping. We won't missit. Signed-off-by: Marc Zyngier commit 50f304532770c19a127b1e1b6769c0538abda58f Author: Marc Zyngier Date: Thu Oct 29 17:20:49 2020 +0000 KVM: arm64: Drop is_aarch32 trap attribute is_aarch32 is only used once, and can be trivially replaced by testing Op0 instead. Drop it. Signed-off-by: Marc Zyngier commit 2d27fd784893a767ec4162afc6d8c86eec2d1bfe Author: Marc Zyngier Date: Thu Oct 29 17:20:13 2020 +0000 KVM: arm64: Drop is_32bit trap attribute The is_32bit attribute is now completely unused, drop it. Signed-off-by: Marc Zyngier commit 1da42c34d7c42fe2840bfe3de83cd0b5aa374859 Author: Marc Zyngier Date: Thu Oct 29 17:17:23 2020 +0000 KVM: arm64: Map AArch32 cp14 register to AArch64 sysregs Similarly to what has been done on the cp15 front, repaint the debug registers to use their AArch64 counterparts. This results in some simplification as we can remove the 32bit-specific accessors. Signed-off-by: Marc Zyngier commit b1ea1d760d3331da19e33650bf8c09ce028a0a49 Author: Marc Zyngier Date: Thu Oct 29 17:14:20 2020 +0000 KVM: arm64: Map AArch32 cp15 register to AArch64 sysregs Move all the cp15 registers over to their AArch64 counterpart. This requires the annotation of a few of them (such as the usual DFAR/IFAR vs FAR_EL1), and a new helper that generates mask/shift pairs for the various configurations. Signed-off-by: Marc Zyngier commit 6ed6750f2b6d4a51f27615f3323d1850449299e3 Author: Marc Zyngier Date: Thu Oct 29 17:09:12 2020 +0000 KVM: arm64: Add AArch32 mapping annotation In order to deal with the few AArch32 system registers that map to only a particular half of their AArch64 counterpart (such as DFAR and IFAR being colocated in FAR_EL1), let's add an optional annotation to the sysreg descriptor structure, indicating whether a register maps to the upper or lower 32bits of a register. Nothing is using these annotation yet. Signed-off-by: Marc Zyngier commit 4ff3fc316d78daa2ed6de2f13616fb33a2926d8e Author: Marc Zyngier Date: Tue Oct 27 22:23:28 2020 +0000 KVM: arm64: Move AArch32 exceptions over to AArch64 sysregs The use of the AArch32-specific accessors have always been a bit annoying on 64bit, and it is time for a change. Let's move the AArch32 exception injection over to the AArch64 encoding, which requires us to split the two halves of FAR_EL1 into DFAR and IFAR. This enables us to drop the preempt_disable() games on VHE, and to kill the last user of the vcpu_cp15() macro. Signed-off-by: Marc Zyngier commit ca4e514774930f30b66375a974b5edcbebaf0e7e Author: Marc Zyngier Date: Tue Nov 10 11:10:15 2020 +0000 KVM: arm64: Introduce handling of AArch32 TTBCR2 traps ARMv8.2 introduced TTBCR2, which shares TCR_EL1 with TTBCR. Gracefully handle traps to this register when HCR_EL2.TVM is set. Cc: stable@vger.kernel.org Reported-by: James Morse Signed-off-by: Marc Zyngier commit b6d37a764a5b852db63101b3f2db0e699574b903 Author: Peng Wang Date: Tue Nov 10 10:11:59 2020 +0800 sched/fair: Reorder throttle_cfs_rq() path As commit: 39f23ce07b93 ("sched/fair: Fix unthrottle_cfs_rq() for leaf_cfs_rq list") does in unthrottle_cfs_rq(), throttle_cfs_rq() can also use the same pattern as dequeue_task_fair(). No functional changes. Signed-off-by: Peng Wang Signed-off-by: Ingo Molnar Cc: Vincent Guittot Cc: Peter Zijlstra (Intel) Cc: Phil Auld Cc: Ben Segall Link: https://lore.kernel.org/r/f11dd2e3ab35cc538e2eb57bf0c99b6eaffce127.1604973978.git.rocking@linux.alibaba.com commit 19cf70546b24ff3e944f0df323774351e830e203 Author: Timo Witte Date: Tue Aug 4 02:14:23 2020 +0200 platform/x86: acer-wmi: add automatic keyboard background light toggle key as KEY_LIGHTS_TOGGLE Got a dmesg message on my AMD Renoir based Acer laptop: "acer_wmi: Unknown key number - 0x84" when toggling keyboard background light Signed-off-by: Timo Witte Reviewed-by: "Lee, Chun-Yi" Link: https://lore.kernel.org/r/20200804001423.36778-1-timo.witte@gmail.com Signed-off-by: Hans de Goede commit 7e542ff8b463c747a4b9878fc88eebc956cbf072 Author: Thomas Zimmermann Date: Mon Nov 9 11:32:42 2020 +0100 drm/mediatek: Use struct dma_buf_map in GEM vmap ops Fixes a build failure with mediatek. This change was supposed to be part of commit 49a3f51dfeee ("drm/gem: Use struct dma_buf_map in GEM vmap ops and convert GEM backends"), but mediatek was forgotten. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Fixes: 49a3f51dfeee ("drm/gem: Use struct dma_buf_map in GEM vmap ops and convert GEM backends") Cc: Thomas Zimmermann Cc: Christian König Cc: David Airlie Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Dave Airlie Cc: Lucas Stach Cc: Russell King Cc: Christian Gmeiner Cc: Qiang Yu Cc: Ben Skeggs Cc: Rob Herring Cc: Tomeu Vizoso Cc: Steven Price Cc: Alyssa Rosenzweig Cc: Gerd Hoffmann Cc: Alex Deucher Cc: "Christian König" Cc: Sandy Huang Cc: "Heiko Stübner" Cc: Hans de Goede Cc: Sean Paul Cc: Eric Anholt Cc: Rodrigo Siqueira Cc: Melissa Wen Cc: Haneen Mohammed Cc: Oleksandr Andrushchenko Cc: Sumit Semwal Cc: Emil Velikov Cc: Marek Szyprowski Cc: Arunpravin Cc: Huang Rui Cc: Luben Tuikov Cc: Madhav Chauhan Cc: Nirmoy Das Cc: Jason Gunthorpe Cc: Sam Ravnborg Cc: Chris Wilson Cc: dri-devel@lists.freedesktop.org Cc: etnaviv@lists.freedesktop.org Cc: lima@lists.freedesktop.org Cc: nouveau@lists.freedesktop.org Cc: virtualization@lists.linux-foundation.org Cc: spice-devel@lists.freedesktop.org Cc: amd-gfx@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Cc: xen-devel@lists.xenproject.org Link: https://patchwork.freedesktop.org/patch/msgid/20201109103242.19544-3-tzimmermann@suse.de commit b47f9f92d6fec1be1648ec38ad70529d4285247f Author: Thomas Zimmermann Date: Mon Nov 9 11:32:41 2020 +0100 drm/msm: Use struct dma_buf_map in GEM vmap ops Fixes a build failure with msm. This change was supposed to be part of commit 49a3f51dfeee ("drm/gem: Use struct dma_buf_map in GEM vmap ops and convert GEM backends"), but msm was forgotten. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Fixes: 49a3f51dfeee ("drm/gem: Use struct dma_buf_map in GEM vmap ops and convert GEM backends") Cc: Thomas Zimmermann Cc: Christian König Cc: David Airlie Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Dave Airlie Cc: Lucas Stach Cc: Russell King Cc: Christian Gmeiner Cc: Qiang Yu Cc: Ben Skeggs Cc: Rob Herring Cc: Tomeu Vizoso Cc: Steven Price Cc: Alyssa Rosenzweig Cc: Gerd Hoffmann Cc: Alex Deucher Cc: "Christian König" Cc: Sandy Huang Cc: "Heiko Stübner" Cc: Hans de Goede Cc: Sean Paul Cc: Eric Anholt Cc: Rodrigo Siqueira Cc: Melissa Wen Cc: Haneen Mohammed Cc: Oleksandr Andrushchenko Cc: Sumit Semwal Cc: Emil Velikov Cc: Luben Tuikov Cc: Marek Szyprowski Cc: Arunpravin Cc: Huang Rui Cc: Madhav Chauhan Cc: Jason Gunthorpe Cc: Sam Ravnborg Cc: Chris Wilson Cc: Qinglang Miao Cc: dri-devel@lists.freedesktop.org Cc: etnaviv@lists.freedesktop.org Cc: lima@lists.freedesktop.org Cc: nouveau@lists.freedesktop.org Cc: virtualization@lists.linux-foundation.org Cc: spice-devel@lists.freedesktop.org Cc: amd-gfx@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Cc: xen-devel@lists.xenproject.org Link: https://patchwork.freedesktop.org/patch/msgid/20201109103242.19544-2-tzimmermann@suse.de commit a3230bd79ca4d266c45a0cc8cdef6a38a113797a Author: Geert Uytterhoeven Date: Tue Nov 10 10:01:19 2020 +0100 drm/fb_helper: Use min_t() to handle size_t and unsigned long On arm32: drivers/gpu/drm/drm_fb_helper.c: In function ‘fb_read_screen_base’: include/linux/minmax.h:18:28: warning: comparison of distinct pointer types lacks a cast ... drivers/gpu/drm/drm_fb_helper.c:2041:22: note: in expansion of macro ‘min’ 2041 | size_t alloc_size = min(count, PAGE_SIZE); | ^~~ drivers/gpu/drm/drm_fb_helper.c: In function ‘fb_write_screen_base’: include/linux/minmax.h:18:28: warning: comparison of distinct pointer types lacks a cast ... drivers/gpu/drm/drm_fb_helper.c:2115:22: note: in expansion of macro ‘min’ 2115 | size_t alloc_size = min(count, PAGE_SIZE); | ^~~ Indeed, on 32-bit size_t is "unsigned int", not "unsigned long". Fixes: 222ec45f4c69dfa8 ("drm/fb_helper: Support framebuffers in I/O memory") Signed-off-by: Geert Uytterhoeven Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20201110090119.2667326-1-geert+renesas@glider.be commit 326a10b90d05fd2bcf2247877d211d4064b8a0ce Author: Johannes Berg Date: Mon Nov 9 10:57:40 2020 +0100 wireless: remove CONFIG_WIRELESS_WDS WDS has long been superseded by 4-addr AP/client and lacks such fundamental features like encryption, capability negotiation, and similar. As such, it was basically always unusable as is. Back in 2016, in commit 8f20542386c5 ("wireless: deprecate WDS and disable by default") I disabled it and made the Kconfig option only available under CONFIG_EXPERT to turn it back on. Since then, nobody has complained about that, and given the severe limitations with the code, it's unlikely anyone would have a reason to. Remove the Kconfig option now, so we can clean up the associated code in follow-up patches. Link: https://lore.kernel.org/r/20201109105103.7d1e44c50e21.I2c0a1705fd6491d9ba3400c88415ee2c4832ae98@changeid Acked-by: Kalle Valo Signed-off-by: Johannes Berg commit 90c1f934ed7141a6d4c202936d12faaeb405fb66 Author: Marc Zyngier Date: Fri Oct 16 18:41:24 2020 +0100 KVM: arm64: Get rid of the AArch32 register mapping code The only use of the register mapping code was for the sake of the LR mapping, which we trivially solved in a previous patch. Get rid of the whole thing now. Signed-off-by: Marc Zyngier commit dcfba399325f919b25854ca17ef1535f5d754fe1 Author: Marc Zyngier Date: Thu Oct 15 09:45:24 2020 +0100 KVM: arm64: Consolidate exception injection Move the AArch32 exception injection code back into the inject_fault.c file, removing the need for a few non-static functions now that AArch32 host support is a thing of the past. Signed-off-by: Marc Zyngier commit 7d76b8a60350ff5e919daacd78ef3c2fe04735a2 Author: Marc Zyngier Date: Thu Oct 15 09:24:40 2020 +0100 KVM: arm64: Remove SPSR manipulation primitives The SPSR setting code is now completely unused, including that dealing with banked AArch32 SPSRs. Cleanup time. Acked-by: Mark Rutland Signed-off-by: Marc Zyngier commit 41613b519ce78bfe1328b8bd693944e80fc8b6c3 Author: Marc Zyngier Date: Wed Oct 14 19:53:49 2020 +0100 KVM: arm64: Inject AArch32 exceptions from HYP Similarly to what has been done for AArch64, move the AArch32 exception injection to HYP. In order to not use the regmap selection code at EL2, simplify the code populating the target mode's LR register by useing the compatibility aliases for LR_abt and LR_und. We also introduce new accessors for SPSR_abt and SPSR_und, and move VBAR/SCTLR to using the AArch64 accessors (the use of the AArch32 names was an ARMv7 leftover). Acked-by: Mark Rutland Signed-off-by: Marc Zyngier commit bb666c472ca25efb38d1163131cc01546b3a653a Author: Marc Zyngier Date: Wed Oct 14 19:52:29 2020 +0100 KVM: arm64: Inject AArch64 exceptions from HYP Move the AArch64 exception injection code from EL1 to HYP, leaving only the ESR_EL1 updates to EL1. In order to come with the differences between VHE and nVHE, two set of system register accessors are provided. SPSR, ELR, PC and PSTATE are now completely handled in the hypervisor. Signed-off-by: Marc Zyngier commit e650b64f1a56cbc700f0a2d2ab8d23155757e2f3 Author: Marc Zyngier Date: Wed Oct 14 19:42:38 2020 +0100 KVM: arm64: Add basic hooks for injecting exceptions from EL2 Add the basic infrastructure to describe injection of exceptions into a guest. So far, nothing uses this code path. Signed-off-by: Marc Zyngier commit 21c810017cef75435be8b8f1da2110c6d1fd887b Author: Marc Zyngier Date: Wed Oct 14 19:36:11 2020 +0100 KVM: arm64: Move VHE direct sysreg accessors into kvm_host.h As we are about to need to access system registers from the HYP code based on their internal encoding, move the direct sysreg accessors to a common include file, with a VHE-specific guard. No functionnal change. Acked-by: Mark Rutland Signed-off-by: Marc Zyngier commit defe21f49bc98b095300752aa1e19bb608f3e97d Author: Marc Zyngier Date: Wed Oct 14 12:12:45 2020 +0100 KVM: arm64: Move PC rollback on SError to HYP Instead of handling the "PC rollback on SError during HVC" at EL1 (which requires disclosing PC to a potentially untrusted kernel), let's move this fixup to ... fixup_guest_exit(), which is where we do all fixups. Isn't that neat? Signed-off-by: Marc Zyngier commit cdb5e02ed133731f8a6676a389ed40ca303cab7c Author: Marc Zyngier Date: Wed Oct 14 09:29:27 2020 +0100 KVM: arm64: Make kvm_skip_instr() and co private to HYP In an effort to remove the vcpu PC manipulations from EL1 on nVHE systems, move kvm_skip_instr() to be HYP-specific. EL1's intent to increment PC post emulation is now signalled via a flag in the vcpu structure. Signed-off-by: Marc Zyngier commit 6ddbc281e2aa21c5917e015a373958455f5eb3c1 Author: Marc Zyngier Date: Tue Oct 13 11:14:38 2020 +0100 KVM: arm64: Move kvm_vcpu_trap_il_is32bit into kvm_skip_instr32() There is no need to feed the result of kvm_vcpu_trap_il_is32bit() to kvm_skip_instr(), as only AArch32 has a variable length ISA, and this helper can equally be called from kvm_skip_instr32(), reducing the complexity at all the call sites. Acked-by: Mark Rutland Signed-off-by: Marc Zyngier commit c22588c99635ac4dace0ce2d55c1e2dc4f13cb54 Author: Marc Zyngier Date: Tue Oct 13 11:56:50 2020 +0100 KVM: arm64: Don't adjust PC on SError during SMC trap On SMC trap, the prefered return address is set to that of the SMC instruction itself. It is thus wrong to try and roll it back when an SError occurs while trapping on SMC. It is still necessary on HVC though, as HVC doesn't cause a trap, and sets ELR to returning *after* the HVC. It also became apparent that there is no 16bit encoding for an AArch32 HVC instruction, meaning that the displacement is always 4 bytes, no matter what the ISA is. Take this opportunity to simplify it. Acked-by: Mark Rutland Signed-off-by: Marc Zyngier commit 43bba65761952f58e850d918ee43b648427609bb Author: Lad Prabhakar Date: Thu Nov 5 12:11:27 2020 +0000 arm64: dts: renesas: hihope-rev4: Add a comment explaining switch SW2404 Switch SW2404 should be at position 1 so that the clock output from CS2000 is connected to AUDIO_CLKB_A. Signed-off-by: Lad Prabhakar Reviewed-by: Chris Paterson Link: https://lore.kernel.org/r/20201105121127.11830-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit dd8ecc02743cc337ab56014448bacaa763c33074 Author: Eugeniu Rosca Date: Thu Oct 29 14:37:41 2020 +0100 arm64: dts: renesas: r8a77961: ulcb-kf: Initial device tree Create a dedicated DTB for M3-ES3.0 + ULCB + Kingfisher combo. Inspire from the pre-existing ULCB-KF device trees: $ ls -1 arch/arm64/boot/dts/renesas/*ulcb-kf.dts arch/arm64/boot/dts/renesas/r8a77950-ulcb-kf.dts arch/arm64/boot/dts/renesas/r8a77951-ulcb-kf.dts arch/arm64/boot/dts/renesas/r8a77960-ulcb-kf.dts arch/arm64/boot/dts/renesas/r8a77965-ulcb-kf.dts Signed-off-by: Eugeniu Rosca Link: https://lore.kernel.org/r/20201029133741.25721-2-erosca@de.adit-jv.com Signed-off-by: Geert Uytterhoeven commit f8a1620cb59bbf5d2706290ab2de7021f4eece7c Author: Eugeniu Rosca Date: Thu Oct 29 14:37:40 2020 +0100 arm64: dts: renesas: r8a77961: Add CAN{0,1} placeholder nodes With the same background and purpose as described in v4.20-rc1 commit 92bc66bfce99cd ("arm64: dts: renesas: r8a77965: Add CAN{0,1} placeholder nodes"), add can0 and can1 placeholder nodes. Signed-off-by: Eugeniu Rosca Link: https://lore.kernel.org/r/20201029133741.25721-1-erosca@de.adit-jv.com Signed-off-by: Geert Uytterhoeven commit ca8edef172109821aa100763e38d6d8d49bcdf56 Author: Biju Das Date: Sun Sep 20 14:49:05 2020 +0100 arm64: dts: renesas: beacon-renesom-baseboard: Move connector node out of hd3ss3220 device Move connector node out of hd3ss3220 device in order to comply with usb connector bindings. Signed-off-by: Biju Das Reviewed-by: Lad Prabhakar Link: https://lore.kernel.org/r/20200920134905.4370-7-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit a511d8be4ea4c59b7eb2c65bd787b7bb90350893 Author: Biju Das Date: Sun Sep 20 14:49:04 2020 +0100 arm64: dts: renesas: cat874: Move connector node out of hd3ss3220 device Move connector node out of hd3ss3220 device in order to comply with usb connector bindings. Signed-off-by: Biju Das Reviewed-by: Lad Prabhakar Link: https://lore.kernel.org/r/20200920134905.4370-6-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit a5200e63af57d05ed8bf0ffd9a6ffefc40e01e89 Author: Geert Uytterhoeven Date: Wed Aug 19 15:43:44 2020 +0200 arm64: dts: renesas: rzg2: Convert EtherAVB to explicit delay handling Some EtherAVB variants support internal clock delay configuration, which can add larger delays than the delays that are typically supported by the PHY (using an "rgmii-*id" PHY mode, and/or "[rt]xc-skew-ps" properties). Historically, the EtherAVB driver configured these delays based on the "rgmii-*id" PHY mode. This was wrong, as these are meant solely for the PHY, not for the MAC. Hence properties were introduced for explicit configuration of these delays. Convert the RZ/G2 DTS files from the old to the new scheme: - Add default "rx-internal-delay-ps" and "tx-internal-delay-ps" properties to the SoC .dtsi files, to be overridden by board files where needed, - Convert board files from "rgmii-*id" PHY modes to "rgmii", adding the appropriate "rx-internal-delay-ps" and/or "tx-internal-delay-ps" overrides. Notes: - RZ/G2E does not support TX internal delay handling. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200819134344.27813-8-geert+renesas@glider.be commit 9b81018185965a306158b471db75ba0aca90ec9f Author: Geert Uytterhoeven Date: Wed Aug 19 15:43:43 2020 +0200 arm64: dts: renesas: rcar-gen3: Convert EtherAVB to explicit delay handling Some EtherAVB variants support internal clock delay configuration, which can add larger delays than the delays that are typically supported by the PHY (using an "rgmii-*id" PHY mode, and/or "[rt]xc-skew-ps" properties). Historically, the EtherAVB driver configured these delays based on the "rgmii-*id" PHY mode. This was wrong, as these are meant solely for the PHY, not for the MAC. Hence properties were introduced for explicit configuration of these delays. Convert the R-Car Gen3 DTS files from the old to the new scheme: - Add default "rx-internal-delay-ps" and "tx-internal-delay-ps" properties to the SoC .dtsi files, to be overridden by board files where needed, - Convert board files from "rgmii-*id" PHY modes to "rgmii", adding the appropriate "rx-internal-delay-ps" and/or "tx-internal-delay-ps" overrides. Notes: - R-Car E3 and D3 do not support TX internal delay handling, - On R-Car D3, TX internal delay handling must always be enabled, hence this fixes a bug on Draak, - On R-Car V3H, RX internal delay handling must always be enabled. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200819134344.27813-7-geert+renesas@glider.be commit 92494cea405fd2136033c70abd6abf6739b12a2f Author: Fabrizio Castro Date: Wed Oct 21 14:53:32 2020 +0100 arm64: dts: renesas: r8a77965: Add DRIF support Add the DRIF controller nodes for r8a77965 (a.k.a. R-Car M3-N). Signed-off-by: Fabrizio Castro Reviewed-by: Lad Prabhakar Link: https://lore.kernel.org/r/20201021135332.4928-6-fabrizio.castro.jz@renesas.com Signed-off-by: Geert Uytterhoeven commit bc518da26e3a98d8eaa713b7e51a326eceb3b3fd Author: Geert Uytterhoeven Date: Mon Nov 9 12:55:40 2020 +0100 arm64: defconfig: Enable R8A779A0 SoC Enable the Renesas R-Car V3U (R8A779A0) SoC in the ARM64 defconfig. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201109115540.2415328-1-geert+renesas@glider.be commit 0d484db60fc0c5f8848939a61004c6fa01fad61a Author: Max Chou Date: Tue Nov 10 11:38:37 2020 +0800 Bluetooth: btusb: btrtl: Add support for RTL8852A Add the support for RTL8852A BT controller on USB interface. The necessary firmware will be submitted to linux-firmware project. The device info from /sys/kernel/debug/usb/devices as below. T: Bus=02 Lev=02 Prnt=02 Port=05 Cnt=01 Dev#= 10 Spd=12 MxCh= 0 D: Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=0bda ProdID=c852 Rev= 0.00 S: Manufacturer=Realtek S: Product=Bluetooth Radio S: SerialNumber=00e04c000001 C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms Signed-off-by: Max Chou Signed-off-by: Marcel Holtmann commit 3a567b95b61058ea8885bf5aad189692675dc06e Author: Chris Chiu Date: Tue Nov 10 11:40:10 2020 +0800 Bluetooth: btusb: Add support for 13d3:3560 MediaTek MT7615E device The ASUS X532EQ laptop contains AzureWave AW-CB434NF WiFi/BT combo module with an associated MT7615E BT chip using a USB ID of 13d3:3560. T: Bus=03 Lev=01 Prnt=01 Port=09 Cnt=02 Dev#= 3 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=13d3 ProdID=3560 Rev= 1.00 S: Manufacturer=MediaTek Inc. S: Product=Wireless_Device S: SerialNumber=000000000 C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA A: FirstIf#= 0 IfCount= 2 Cls=e0(wlcon) Sub=01 Prot=01 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=125us E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 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 I: If#= 1 Alt= 6 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 63 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 63 Ivl=1ms Signed-off-by: Chris Chiu Signed-off-by: Marcel Holtmann commit 8461352ddf076712350eeded350c13385c80ff38 Author: Kaixu Xia Date: Sun Nov 8 00:13:31 2020 +0800 ALSA: firewire: fix comparison to bool warning Fix the following coccicheck warning: ./sound/firewire/amdtp-stream.h:273:6-19: WARNING: Comparison to bool Reported-by: Tosk Robot Signed-off-by: Kaixu Xia Link: https://lore.kernel.org/r/1604765611-8209-1-git-send-email-kaixuxia@tencent.com Signed-off-by: Takashi Iwai commit f9bd00e0ea9d9b04140aa969a9a13ad3597a1e4e Author: KuoHsiang Chou Date: Mon Nov 9 17:38:12 2020 +0800 drm/ast: Create chip AST2600 [New] Support AST2600 Signed-off-by: KuoHsiang Chou Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20201109093812.161483-1-kuohsiang_chou@aspeedtech.com commit 5b8c596976d4338942dd889b66cd06dc766424e1 Merge: c0f98d2f8b076 514ad1b6bb6e2 Author: Dave Airlie Date: Tue Nov 10 17:48:47 2020 +1000 Merge tag 'amd-drm-next-5.11-2020-11-05' of git://people.freedesktop.org/~agd5f/linux into drm-next amd-drm-next-5.11-2020-11-05: amdgpu: - Add initial support for Vangogh - Add support for Green Sardine - Add initial support for Dimgrey Cavefish - Scatter/Gather display support for Renoir - Updates for Sienna Cichlid - Updates for Navy Flounder - SMU7 power improvements - Modifier support for gfx9+ - CI BACO fixes - Arcturus SMU fixes - Lots of code cleanups - DC fixes - Kernel doc fixes - Add more GPU HW client information to page fault error logging - MPO clock tuning for RV - FP fixes for DCN3 on ARM and PPC radeon: - Expose voltage via hwmon on Sumo APUs amdkfd: - Fix unique id handling - Misc fixes From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20201105222749.201798-1-alexander.deucher@amd.com commit a5a8ef937cfa79167f4b2a5602092b8d14fd6b9a Author: Colin Xu Date: Mon Nov 9 15:39:22 2020 +0800 drm/i915/gvt: Fix virtual display setup for BXT/APL Program display related vregs to proper value at initialization, setup virtual monitor and hotplug. vGPU virtual display vregs inherit the value from pregs. The virtual DP monitor is always setup on PORT_B for BXT/APL. However the host may connect monitor on other PORT or without any monitor connected. Without properly setup PIPE/DDI/PLL related vregs, guest driver may not setup the virutal display as expected, and the guest desktop may not be created. Since only one virtual display is supported, enable PIPE_A only. And enable transcoder/DDI/PLL based on which port is setup for BXT/APL. V2: Revise commit message. V3: set_edid should on PORT_B for BXT. Inject hpd event for BXT. V4: Temporarily disable vfio edid on BXT/APL until issue fixed. V5: Rebase to use new HPD define GEN8_DE_PORT_HOTPLUG for BXT. Put vfio edid disabling on BXT/APL to a separate patch. Acked-by: Zhenyu Wang Signed-off-by: Colin Xu Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20201109073922.757759-1-colin.xu@intel.com commit 385fc38c1f97387c47113254d8de2cb0dbf133bd Author: Colin Xu Date: Tue Oct 27 12:54:06 2020 +0800 drm/i915: Add GVT resume routine to i915 This patch add gvt resume wrapper into i915_drm_resume(). GVT relies on i915 so resume gvt at last. V2: - Direct call into gvt suspend/resume wrapper in intel_gvt.h/intel_gvt.c. The wrapper and implementation will check and call gvt routine. (zhenyu) V3: Refresh. V4: Rebase. V5: Fail intel_gvt_suspend() if fail to save GGTT. V6: Save host entry to per-vGPU gtt.ggtt_mm on each host_entry update so only need the resume routine. V7: Refresh. Reviewed-by: Zhenyu Wang Signed-off-by: Hang Yuan Signed-off-by: Colin Xu Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20201027045406.159566-1-colin.xu@intel.com commit 5f60b12edcd0c2e83650a6f9aa4a969bd9fc5732 Author: Colin Xu Date: Tue Oct 27 12:53:08 2020 +0800 drm/i915/gvt: Save/restore HW status to support GVT suspend/resume This patch save/restore necessary GVT info during i915 suspend/resume so that GVT enabled QEMU VM can continue running. Only GGTT and fence regs are saved/restored now. GVT will save GGTT entries on each host_entry update, restore the saved dirty entries and re-init fence regs in resume routine. V2: - Change kzalloc/kfree to vzalloc/vfree since the space allocated from kmalloc may not enough for all saved GGTT entries. - Keep gvt suspend/resume wrapper in intel_gvt.h/intel_gvt.c and move the actual implementation to gvt.h/gvt.c. (zhenyu) - Check gvt config on and active with intel_gvt_active(). (zhenyu) V3: (zhenyu) - Incorrect copy length. Should be num entries * entry size. - Use memcpy_toio()/memcpy_fromio() instead of memcpy for iomem. - Add F_PM_SAVE flags to indicate which MMIOs to save/restore for PM. V4: Rebase. V5: Fail intel_gvt_save_ggtt as -ENOMEM if fail to alloc memory to save ggtt. Free allocated ggtt_entries on failure. V6: Save host entry to per-vGPU gtt.ggtt_mm on each host_entry update. V7: Restore GGTT entry based on present bit. Split fence restore and mmio restore in different functions. Reviewed-by: Zhenyu Wang Signed-off-by: Hang Yuan Signed-off-by: Colin Xu Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20201027045308.158955-1-colin.xu@intel.com commit 6594094f819e0020e926e137e47e2edb97ba500b Author: Yan Zhao Date: Thu Sep 10 11:54:05 2020 +0800 drm/i915/gvt: correct a false comment of flag F_UNALIGN Correct falsely removed comment of flag F_UNALIGN. Fixes: a6c5817a38cf ("drm/i915/gvt: remove flag F_CMD_ACCESSED") Reviewed-by: Zhenyu Wang Signed-off-by: Yan Zhao Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20200910035405.20273-1-yan.y.zhao@intel.com commit 8be33ecfc1ffd2da20cc29e957e4cb6eb99310cb Author: Alexander Lobakin Date: Mon Nov 9 23:47:23 2020 +0000 net: skb_vlan_untag(): don't reset transport offset if set by GRO layer Similar to commit fda55eca5a33f ("net: introduce skb_transport_header_was_set()"), avoid resetting transport offsets that were already set by GRO layer. This not only mirrors the behavior of __netif_receive_skb_core(), but also makes sense when it comes to UDP GSO fraglists forwarding: transport offset of such skbs is set only once by GRO receive callback and remains untouched and correct up to the xmitting driver in 1:1 case, but becomes junk after untagging in ingress VLAN case and breaks UDP GSO offload. This does not happen after this change, and all types of forwarding of UDP GSO fraglists work as expected. Since v1 [1]: - keep the code 1:1 with __netif_receive_skb_core() (Jakub). [1] https://lore.kernel.org/netdev/zYurwsZRN7BkqSoikWQLVqHyxz18h4LhHU4NFa2Vw@cp4-web-038.plabs.ch Signed-off-by: Alexander Lobakin Link: https://lore.kernel.org/r/7JgIkgEztzt0W6ZtC9V9Cnk5qfkrUFYcpN871syCi8@cp4-web-040.plabs.ch Signed-off-by: Jakub Kicinski commit 608f000f8a32e598ce3d7487889a499c5b5582cb Author: Krzysztof Kozlowski Date: Thu Nov 5 19:48:08 2020 +0100 dt-bindings: arm: fsl: document SolidRun LX2160A boards Document the compatible for SolidRun LX2160A based boards. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Shawn Guo commit 5fc865f8bfd2cd3b12f5fef3a57f73fcb67e1544 Author: Krzysztof Kozlowski Date: Thu Nov 5 19:48:07 2020 +0100 dt-bindings: arm: fsl: document LS1012A FRWY board Document the compatible for LS1012A FRWY board. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Shawn Guo commit 53cc6bc69e536efe6c1cef98edfb7b3f0a14fabe Author: Sven Van Asbroeck Date: Wed Nov 4 11:54:18 2020 -0500 ARM: imx: mach-imx6q: correctly identify i.MX6QP SoCs The i.MX6QP rev 1.1 SoC on my board is mis-identified by Linux: the log (incorrectly) shows "i.MX6Q rev 2.1". Correct this by assuming that every SoC that identifies as i.MX6Q with rev >= 2.0 is really an i.MX6QP. Signed-off-by: Sven Van Asbroeck Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 550b562a153f84282c60fc3cb0d98f4e5609f0b4 Author: Zou Wei Date: Wed Nov 4 19:19:31 2020 +0800 clk: imx: scu: Make pd_np with static keyword Fix the following sparse warning: ./clk-scu.c:23:20: warning: symbol 'pd_np' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: Zou Wei Reviewed-by: Stephen Boyd Signed-off-by: Shawn Guo commit 7544bfc0866f56326e47f8ec8b3f68c6db496125 Author: Fabio Estevam Date: Tue Nov 3 19:04:54 2020 -0300 ARM: imx: imx7ulp: Add a comment explaining the B2 silicon version To help the users to understand the meaning of bits 31-28 of the JTAG_ID_REG register, add a comment explaining the value that is expected from a i.MX7ULP rev B2. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 00cb754ac62253c84ea969c8d0d48884111ad909 Author: Krzysztof Kozlowski Date: Tue Nov 3 17:24:32 2020 +0100 clk: imx8mq: drop of_match_ptr from of_device_id table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might be not relevant here). This fixes compile warning (!CONFIG_OF && !CONFIG_MODULES): drivers/clk/imx/clk-imx8mq.c:626:34: warning: ‘imx8mq_clk_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Acked-by: Stephen Boyd Signed-off-by: Shawn Guo commit f32e42f09270a5298653ed6d8079fa7fddb6b393 Author: Krzysztof Kozlowski Date: Tue Nov 3 17:24:31 2020 +0100 clk: imx8mp: drop of_match_ptr from of_device_id table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might be not relevant here). This fixes compile warning (!CONFIG_OF && !CONFIG_MODULES): drivers/clk/imx/clk-imx8mp.c:751:34: warning: ‘imx8mp_clk_of_match’ defined but not used [-Wunused-const-variable=] Reported-by: kernel test robot Signed-off-by: Krzysztof Kozlowski Acked-by: Stephen Boyd Signed-off-by: Shawn Guo commit 8f8a3230929f4ddcd3a5adb659e4b3cf52d9d38e Author: Krzysztof Kozlowski Date: Tue Nov 3 17:24:30 2020 +0100 clk: imx8mn: drop of_match_ptr from of_device_id table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might be not relevant here). This fixes compile warning (!CONFIG_OF && !CONFIG_MODULES): drivers/clk/imx/clk-imx8mn.c:592:34: warning: ‘imx8mn_clk_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Acked-by: Stephen Boyd Signed-off-by: Shawn Guo commit 52643b7832d8dca9df647a6ce181e3faf86dc99f Merge: ca4d632aef031 682036b2b9fbc Author: Jakub Kicinski Date: Mon Nov 9 17:50:32 2020 -0800 Merge branch 'net-add-and-use-dev_get_tstats64' Heiner Kallweit says: ==================== net: add and use dev_get_tstats64 It's a frequent pattern to use netdev->stats for the less frequently accessed counters and per-cpu counters for the frequently accessed counters (rx/tx bytes/packets). Add a default ndo_get_stats64() implementation for this use case. Subsequently switch more drivers to use this pattern. v2: - add patches for replacing ip_tunnel_get_stats64 Requested additional migrations will come in a separate series. v3: - add atomic_long_t member rx_frame_errors in patch 3 for making counter updates atomic ==================== Link: https://lore.kernel.org/r/99273e2f-c218-cd19-916e-9161d8ad8c56@gmail.com Signed-off-by: Jakub Kicinski commit 682036b2b9fbcf98e333bad717968ad6650a0d94 Author: Heiner Kallweit Date: Sat Nov 7 21:55:11 2020 +0100 net: remove ip_tunnel_get_stats64 After having migrated all users remove ip_tunnel_get_stats64(). Signed-off-by: Heiner Kallweit Signed-off-by: Jakub Kicinski commit 98d7fc46388a749712de87ec0f91cf800b151f30 Author: Heiner Kallweit Date: Sat Nov 7 21:54:33 2020 +0100 ipv4/ipv6: switch to dev_get_tstats64 Replace ip_tunnel_get_stats64() with the new identical core function dev_get_tstats64(). Signed-off-by: Heiner Kallweit Signed-off-by: Jakub Kicinski commit 8f3feb2420818e98d5e94aa33d0276bade565ab2 Author: Heiner Kallweit Date: Sat Nov 7 21:53:53 2020 +0100 vti: switch to dev_get_tstats64 Replace ip_tunnel_get_stats64() with the new identical core function dev_get_tstats64(). Signed-off-by: Heiner Kallweit Signed-off-by: Jakub Kicinski commit 42f9e5f0c6edf4fd0ca95eb01bf9e15829493125 Author: Heiner Kallweit Date: Sat Nov 7 21:53:19 2020 +0100 wireguard: switch to dev_get_tstats64 Replace ip_tunnel_get_stats64() with the new identical core function dev_get_tstats64(). Reviewed-by: Jason A. Donenfeld Signed-off-by: Heiner Kallweit Signed-off-by: Jakub Kicinski commit 250f19c75195cd8cf8ec00e013f14be4bd4b2e4e Author: Heiner Kallweit Date: Sat Nov 7 21:52:42 2020 +0100 gtp: switch to dev_get_tstats64 Replace ip_tunnel_get_stats64() with the new identical core function dev_get_tstats64(). Acked-by: Harald Welte Signed-off-by: Heiner Kallweit Signed-off-by: Jakub Kicinski commit b220a4a79ce576149a412c030fdb703144a07832 Author: Heiner Kallweit Date: Sat Nov 7 21:52:06 2020 +0100 net: switch to dev_get_tstats64 Replace ip_tunnel_get_stats64() with the new identical core function dev_get_tstats64(). Signed-off-by: Heiner Kallweit Signed-off-by: Jakub Kicinski commit 6b840a04fe3521c3eea41e32dd5b0835418553da Author: Heiner Kallweit Date: Sat Nov 7 21:51:32 2020 +0100 ip6_tunnel: use ip_tunnel_get_stats64 as ndo_get_stats64 callback Switch ip6_tunnel to the standard statistics pattern: - use dev->stats for the less frequently accessed counters - use dev->tstats for the frequently accessed counters An additional benefit is that we now have 64bit statistics also on 32bit systems. Signed-off-by: Heiner Kallweit Signed-off-by: Jakub Kicinski commit 497a5757ce4e8f37219a3989ac6a561eb9a8e6c7 Author: Heiner Kallweit Date: Sat Nov 7 21:50:56 2020 +0100 tun: switch to net core provided statistics counters Switch tun to the standard statistics pattern: - use netdev->stats for the less frequently accessed counters - use netdev->tstats for the frequently accessed per-cpu counters v3: - add atomic_long_t member rx_frame_errors for making counter updates atomic Signed-off-by: Heiner Kallweit Signed-off-by: Jakub Kicinski commit 6a9006287959ef69556d612dcbde9e68bf16a42b Author: Heiner Kallweit Date: Sat Nov 7 21:49:46 2020 +0100 net: dsa: use net core stats64 handling Use netdev->tstats instead of a member of dsa_slave_priv for storing a pointer to the per-cpu counters. This allows us to use core functionality for statistics handling. Reviewed-by: Florian Fainelli Tested-by: Vladimir Oltean Signed-off-by: Heiner Kallweit Signed-off-by: Jakub Kicinski commit a18394269fc87276963e8d965c730900178d7e4b Author: Heiner Kallweit Date: Sat Nov 7 21:49:07 2020 +0100 net: core: add dev_get_tstats64 as a ndo_get_stats64 implementation It's a frequent pattern to use netdev->stats for the less frequently accessed counters and per-cpu counters for the frequently accessed counters (rx/tx bytes/packets). Add a default ndo_get_stats64() implementation for this use case. Reviewed-by: Florian Fainelli Signed-off-by: Heiner Kallweit Signed-off-by: Jakub Kicinski commit bdb08940236c2096ac60c99854ff8b8fdc4d8d02 Author: Krzysztof Kozlowski Date: Tue Nov 3 17:24:29 2020 +0100 clk: imx8mm: drop of_match_ptr from of_device_id table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might be not relevant here). This fixes compile warning (!CONFIG_OF && !CONFIG_MODULES): drivers/clk/imx/clk-imx8mm.c:641:34: warning: ‘imx8mm_clk_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Acked-by: Stephen Boyd Signed-off-by: Shawn Guo commit ca4d632aef031c7946c42a6eb873d24ab6474f17 Author: Tobias Waldekranz Date: Mon Nov 9 09:29:27 2020 +0100 net: dsa: mv88e6xxx: Export VTU as devlink region Export the raw VTU data and related registers in a devlink region so that it can be inspected from userspace and compared to the current bridge configuration. Signed-off-by: Tobias Waldekranz Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20201109082927.8684-1-tobias@waldekranz.com Signed-off-by: Jakub Kicinski commit 8b7e0a01dfa7eed3e60c594ac33c2ec998086f54 Author: Jisheng Zhang Date: Mon Nov 9 09:16:05 2020 +0800 net: phy: microchip_t1: Don't set .config_aneg The .config_aneg in microchip_t1 is genphy_config_aneg, so it's not needed, because the phy core will call genphy_config_aneg() if the .config_aneg is NULL. Signed-off-by: Jisheng Zhang Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20201109091605.3951c969@xhacker.debian Signed-off-by: Jakub Kicinski commit 785d21b82600378882a3b2edf72813ebc441bb70 Author: Kaixu Xia Date: Sat Nov 7 14:53:58 2020 +0800 net/mlx4: Assign boolean values to a bool variable Fix the following coccinelle warnings: ./drivers/net/ethernet/mellanox/mlx4/en_rx.c:687:1-17: WARNING: Assignment of 0/1 to bool variable Reported-by: Tosk Robot Signed-off-by: Kaixu Xia Reviewed-by: Tariq Toukan Link: https://lore.kernel.org/r/1604732038-6057-1-git-send-email-kaixuxia@tencent.com Signed-off-by: Jakub Kicinski commit f2bd43f1c97f0ef6612cde87aa941248a91c59c6 Author: Zou Wei Date: Tue Nov 3 19:32:14 2020 +0800 clk: imx: gate2: Remove unused variable ret This patch fixes below warning reported by coccicheck: ./clk-gate2.c:57:5-8: Unneeded variable: "ret". Return "0" on line 68 Reported-by: Hulk Robot Signed-off-by: Zou Wei Reviewed-by: Stephen Boyd Signed-off-by: Shawn Guo commit d1f1858f51be4d7900fe2bac6394c8dfc641f2c4 Author: Oleksij Rempel Date: Mon Nov 2 10:02:12 2020 +0100 ARM: dts: add Van der Laan LANMCU board Van der Laan LANMCU is a module for the food storage rooms to control proper gas composition. Co-developed-by: Robin van der Gracht Signed-off-by: Robin van der Gracht Signed-off-by: Oleksij Rempel Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 236d454b27c7c17152663426613be274effc19fc Author: Oleksij Rempel Date: Mon Nov 2 10:02:11 2020 +0100 dt-bindings: arm: fsl: add Van der Laan LANMCU board Add Van der Laan LANMCU iMX6dl based board Signed-off-by: Oleksij Rempel Reviewed-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Shawn Guo commit 7e90989141613e68ad8fceae63c1623954c96519 Author: Lee Jones Date: Wed Nov 4 11:11:56 2020 -0800 Input: synaptics-rmi4 - fix kerneldoc warnings Fixes the kerneldoc warnings from building the driver with W=1. Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201104162427.2984742-2-lee.jones@linaro.org [dtor: folded together several Lee's patches; added more descriptions] Signed-off-by: Dmitry Torokhov commit 6e822c2c2919a6c2031198ea9a642b75218f24bb Author: Menglong Dong Date: Fri Nov 6 01:42:38 2020 -0500 net: udp: remove redundant initialization in udp_dump_one The initialization for 'err' with '-EINVAL' is redundant and can be removed, as it is updated soon and not used. Signed-off-by: Menglong Dong Link: https://lore.kernel.org/r/1604644960-48378-2-git-send-email-dong.menglong@zte.com.cn Signed-off-by: Jakub Kicinski commit df0852c234d9a73ad2469cd0562ba212a422c374 Author: Oleksij Rempel Date: Fri Oct 30 15:00:29 2020 +0100 ARM: dts: add Altesco I6P board Altesco (Altus-Escon-Company BV) I6P is a part of the diagnostic system for the vehicle inspection stations. Co-developed-by: David Jander Signed-off-by: David Jander Signed-off-by: Oleksij Rempel Signed-off-by: Shawn Guo commit cffb8f6177bbfc235e7054a4bb321b126b64205c Author: Menglong Dong Date: Fri Nov 6 01:42:40 2020 -0500 net: udp: remove redundant initialization in udp_send_skb The initialization for 'err' with 0 is redundant and can be removed, as it is updated by ip_send_skb and not used before that. Signed-off-by: Menglong Dong Link: https://lore.kernel.org/r/1604644960-48378-4-git-send-email-dong.menglong@zte.com.cn Signed-off-by: Jakub Kicinski commit 0169b8205431589b945c29a576c65f2037a5bc26 Author: Horatiu Vultur Date: Fri Nov 6 22:50:49 2020 +0100 bridge: mrp: Use hlist_head instead of list_head for mrp Replace list_head with hlist_head for MRP list under the bridge. There is no need for a circular list when a linear list will work. This will also decrease the size of 'struct net_bridge'. Signed-off-by: Horatiu Vultur Link: https://lore.kernel.org/r/20201106215049.1448185-1-horatiu.vultur@microchip.com Signed-off-by: Jakub Kicinski commit cd49dccbde912ae7e6ee4d4f94f71740c690b520 Author: Oleksij Rempel Date: Fri Oct 30 15:00:28 2020 +0100 dt-bindings: arm: fsl: add Altesco I6P board Add Altus-Escon-Company BV I6P iMX6dl based board Signed-off-by: Oleksij Rempel Acked-by: Rob Herring Signed-off-by: Shawn Guo commit 7fc6622c1a8d0f69be0783245fe38fed17ad8d18 Author: Oleksij Rempel Date: Fri Oct 30 15:00:27 2020 +0100 dt-bindings: vendor-prefixes: Add an entry for Altus-Escon-Company Add "alt" entry for Altus-Escon-Company BV: https://www.altus-escon.com/ Signed-off-by: Oleksij Rempel Acked-by: Rob Herring Signed-off-by: Shawn Guo commit 084d0c13a4897a16f80950397ff3a8a8fc2ff042 Merge: a3ce2b109a59e 1db32acfde741 Author: Jakub Kicinski Date: Mon Nov 9 16:41:45 2020 -0800 Merge branch 'net-packet-make-packet_fanout-arr-size-configurable-up-to-64k' Tanner Love says: ==================== net/packet: make packet_fanout.arr size configurable up to 64K First patch makes the change; second patch adds unit tests. ==================== Link: https://lore.kernel.org/r/20201106180741.2839668-1-tannerlove.kernel@gmail.com Signed-off-by: Jakub Kicinski commit 1db32acfde741359b0b1b9962ae8cd501c2ff769 Author: Tanner Love Date: Fri Nov 6 13:07:41 2020 -0500 selftests/net: test max_num_members, fanout_args in psock_fanout Add an additional control test that verifies: -specifying two different max_num_members values fails -specifying max_num_members > PACKET_FANOUT_MAX fails In datapath tests, set max_num_members to PACKET_FANOUT_MAX. Signed-off-by: Tanner Love Signed-off-by: Jakub Kicinski commit 9c661b0b85444e426d3f23250305eeb16f6ffe88 Author: Tanner Love Date: Fri Nov 6 13:07:40 2020 -0500 net/packet: make packet_fanout.arr size configurable up to 64K One use case of PACKET_FANOUT is lockless reception with one socket per CPU. 256 is a practical limit on increasingly many machines. Increase PACKET_FANOUT_MAX to 64K. Expand setsockopt PACKET_FANOUT to take an extra argument max_num_members. Also explicitly define a fanout_args struct, instead of implicitly casting to an integer. This documents the API and simplifies the control flow. If max_num_members is not specified or is set to 0, then 256 is used, same as before. Signed-off-by: Tanner Love Signed-off-by: Willem de Bruijn Reviewed-by: Eric Dumazet Signed-off-by: Jakub Kicinski commit 93c0289c11b08467c0c998d35f050e6664bbf99c Author: Stefan Riedmueller Date: Thu Oct 29 08:03:24 2020 +0100 ARM: dts: imx6ul: segin: peb-av-02: Mark stmpe touch as wakeup-source Mark the STMPE resistive touch controller as a wakeup-source. Signed-off-by: Stefan Riedmueller Signed-off-by: Shawn Guo commit 6d4e1ff5281996efe6a2b9bc58cdcdd446bb52a4 Author: Stefan Riedmueller Date: Thu Oct 29 08:03:23 2020 +0100 ARM: dts: imx6ul: phytec: Add support for optional PEB-AV-02 LCD adapter The PHYTEC PEB-AV-02 adapter adds the capability to connect a parallel LCD display to the phyBOARD-Segin full featured, either with capacitive or resistive touch. Signed-off-by: Stefan Riedmueller Signed-off-by: Shawn Guo commit f4d0fea16ad771f1f3c930251af90f8b33d9fa66 Author: Yunus Bas Date: Thu Oct 29 08:03:22 2020 +0100 ARM: dts: imx6ul: segin: Add phyBOARD-Segin with eMMC phyCORE-i.MX6UL Add a PHYTEC phyBOARD-Segin full featured with phyCORE-i.MX 6UL with eMMC and following features: - i.MX 6UL - 512 MB RAM - eMMC - USB Host/OTG - 2x 100 Mbit/s Ethernet - RS232 - CAN Signed-off-by: Yunus Bas Signed-off-by: Stefan Riedmueller Signed-off-by: Shawn Guo commit f52b8fd332573106e60958617a3d2e30611ce1fb Author: Martin KaFai Lau Date: Fri Nov 6 14:54:02 2020 -0800 bpf: selftest: Use static globals in tcp_hdr_options and btf_skc_cls_ingress Some globals in the tcp_hdr_options test and btf_skc_cls_ingress test are not using static scope. This patch fixes it. Targeting bpf-next branch as an improvement since it currently does not break the build. Fixes: ad2f8eb0095e ("bpf: selftests: Tcp header options") Fixes: 9a856cae2217 ("bpf: selftest: Add test_btf_skc_cls_ingress") Signed-off-by: Martin KaFai Lau Signed-off-by: Andrii Nakryiko Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20201106225402.4135741-1-kafai@fb.com commit ba66a25536dd24b73d36e380c68593e95e4e06a8 Author: Jerome Brunet Date: Tue Oct 20 09:50:34 2020 +0200 arm64: meson: ship only the necessary clock controllers There now the menu entries for the amlogic clock controllers. Do not select these when ARM64 is enabled so it possible to ship only the required. Signed-off-by: Jerome Brunet Reviewed-by: Neil Armstrong Acked-by: Kevin Hilman Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20201020075034.172825-1-jbrunet@baylibre.com commit a3ce2b109a59ee9670706ae8126dcc04cfe261cd Author: Menglong Dong Date: Thu Nov 5 20:49:14 2020 -0500 net: udp: introduce UDP_MIB_MEMERRORS for udp_mem When udp_memory_allocated is at the limit, __udp_enqueue_schedule_skb will return a -ENOBUFS, and skb will be dropped in __udp_queue_rcv_skb without any counters being done. It's hard to find out what happened once this happen. So we introduce a UDP_MIB_MEMERRORS to do this job. Well, this change looks friendly to the existing users, such as netstat: $ netstat -u -s Udp: 0 packets received 639 packets to unknown port received. 158689 packet receive errors 180022 packets sent RcvbufErrors: 20930 MemErrors: 137759 UdpLite: IpExt: InOctets: 257426235 OutOctets: 257460598 InNoECTPkts: 181177 v2: - Fix some alignment problems Signed-off-by: Menglong Dong Link: https://lore.kernel.org/r/1604627354-43207-1-git-send-email-dong.menglong@zte.com.cn Signed-off-by: Jakub Kicinski commit 666475ccbf1dc99c1e61e47975d5fbf86d6236aa Author: Wang Qing Date: Sat Nov 7 16:10:50 2020 +0800 bpf, btf: Remove the duplicate btf_ids.h include Remove duplicate btf_ids.h header which is included twice. Signed-off-by: Wang Qing Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/1604736650-11197-1-git-send-email-wangqing@vivo.com commit a10b4f9610431cf0d136530c12e48cba7c6391a4 Author: Menglong Dong Date: Fri Nov 6 04:13:54 2020 -0500 samples/bpf: Remove duplicate include in hbm The 'bpf/bpf.h' include in 'samples/bpf/hbm.c' is duplicated. Signed-off-by: Menglong Dong Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/1604654034-52821-1-git-send-email-dong.menglong@zte.com.cn commit 616fde2dd60f9f956dc77ed7e284129de6dc97d2 Author: Ionut-robert Aron Date: Mon Nov 9 12:46:34 2020 +0200 dt-bindings: misc: convert fsl,dpaa2-console from txt to YAML Convert fsl,dpaa2-console to YAML in order to automate the verification process of dts files. Signed-off-by: Ionut-robert Aron Signed-off-by: Laurentiu Tudor Link: https://lore.kernel.org/r/20201109104635.21116-1-laurentiu.tudor@nxp.com Signed-off-by: Rob Herring commit e35123d83ee35c31f64ecfbdfabbe5142d3025b8 Author: Will Deacon Date: Tue Jun 30 14:02:48 2020 +0100 arm64: lto: Strengthen READ_ONCE() to acquire when CONFIG_LTO=y When building with LTO, there is an increased risk of the compiler converting an address dependency headed by a READ_ONCE() invocation into a control dependency and consequently allowing for harmful reordering by the CPU. Ensure that such transformations are harmless by overriding the generic READ_ONCE() definition with one that provides acquire semantics when building with LTO. Acked-by: Peter Zijlstra (Intel) Acked-by: Mark Rutland Signed-off-by: Will Deacon commit 5af76fb4228701bd5377880b09b0216a5fd800ef Author: Will Deacon Date: Tue Jun 30 14:06:04 2020 +0100 arm64: alternatives: Remove READ_ONCE() usage during patch operation In preparation for patching the internals of READ_ONCE() itself, replace its usage on the alternatives patching patch with a volatile variable instead. Acked-by: Peter Zijlstra (Intel) Acked-by: Mark Rutland Signed-off-by: Will Deacon commit 364a5a8ae8dc2dd457e2fefb4da3f3fd2c0ba8b1 Author: Will Deacon Date: Tue Jun 30 14:02:22 2020 +0100 arm64: cpufeatures: Add capability for LDAPR instruction Armv8.3 introduced the LDAPR instruction, which provides weaker memory ordering semantics than LDARi (RCpc vs RCsc). Generally, we provide an RCsc implementation when implementing the Linux memory model, but LDAPR can be used as a useful alternative to dependency ordering, particularly when the compiler is capable of breaking the dependencies. Since LDAPR is not available on all CPUs, add a cpufeature to detect it at runtime and allow the instruction to be used with alternative code patching. Acked-by: Peter Zijlstra (Intel) Acked-by: Mark Rutland Signed-off-by: Will Deacon commit 7cda23da52ad793a578d290e7fcc9cdc1698bba8 Author: Will Deacon Date: Tue Jun 30 13:55:59 2020 +0100 arm64: alternatives: Split up alternative.h asm/alternative.h contains both the macros needed to use alternatives, as well the type definitions and function prototypes for applying them. Split the header in two, so that alternatives can be used from core header files such as linux/compiler.h without the risk of circular includes Acked-by: Peter Zijlstra (Intel) Acked-by: Mark Rutland Signed-off-by: Will Deacon commit e2a2190a80ca0ebddd52c766caf08908d71fb949 Author: Mark Rutland Date: Mon Oct 26 13:31:47 2020 +0000 arm64: uaccess: move uao_* alternatives to asm-uaccess.h The uao_* alternative asm macros are only used by the uaccess assembly routines in arch/arm64/lib/, where they are included indirectly via asm-uaccess.h. Since they're specific to the uaccess assembly (and will lose the alternatives in subsequent patches), let's move them into asm-uaccess.h. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Christoph Hellwig Cc: James Morse Cc: Will Deacon [will: update #include in mte.S to pull in uao asm macros] Signed-off-by: Will Deacon commit 1ba1014db2586bdfe0a9680a00613e2089586c46 Author: Tejas Upadhyay Date: Tue Oct 20 11:06:57 2020 +0530 drm/i915/edp/jsl: Update vswing table for HBR and HBR2 JSL has update in vswing table for eDP. BSpec: 21257 Changes since V1: - Fixed few checkpatch errors Cc: Souza Jose Signed-off-by: Tejas Upadhyay Reviewed-by: José Roberto de Souza Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20201020053657.99890-1-tejaskumarx.surendrakumar.upadhyay@intel.com commit 11ffe972479e015d6e36017b6d51707cf746a798 Author: Lucas De Marchi Date: Fri Nov 6 13:00:06 2020 -0800 drm/i915/dg1: map/unmap pll clocks DG1 uses 2 registers for the ddi clock mapping, with PHY A and B using DPCLKA_CFGCR0 and PHY C and D using DPCLKA1_CFGCR0. Hide this behind a single macro that chooses the correct register according to the phy being accessed, use the correct bitfields for each pll/phy and implement separate functions for DG1 since it doesn't share much with ICL/TGL anymore. The previous values were correct for PHY A and B since they were using the same register as before and the bitfields were matching. v2: Add comment and try to simplify DG1_DPCLKA* macros by reusing previous ones v3: - Fix DG1_DPCLKA_CFGCR0_DDI_CLK_SEL_MASK() after wrong macro reuse - Move phy -> id map to a separate macro (Aditya) - Remove DG1_DPCLKA_CFGCR0_DDI_CLK_SEL_MASK where not required (Aditya) - Use drm_WARN_ON Cc: José Roberto de Souza Cc: Clinton Taylor Cc: Matt Roper Cc: Aditya Swarup Signed-off-by: Lucas De Marchi Reviewed-by: Aditya Swarup Link: https://patchwork.freedesktop.org/patch/msgid/20201106210006.837953-1-lucas.demarchi@intel.com commit ae386e9d809c6c7990c5414ea9ae035731ca0f81 Author: Kefeng Wang Date: Wed Nov 4 14:15:01 2020 +0800 riscv: Ignore Image.* and loader.bin Do not track all compressed Image and loader.bin. Signed-off-by: Kefeng Wang Reviewed-by: Atish Patra Signed-off-by: Palmer Dabbelt commit 2c42bcbb95ec748fc84dc061b431ae4f8ae5551a Author: Kefeng Wang Date: Wed Nov 4 14:15:00 2020 +0800 riscv: Clean up boot dir Let's remove all files under riscv boot dir by using archclean rule. Signed-off-by: Kefeng Wang Reviewed-by: Atish Patra Signed-off-by: Palmer Dabbelt commit c18d7c17c005f4988ea2716d94d3e598eb6d5c90 Author: Kefeng Wang Date: Wed Nov 4 14:14:59 2020 +0800 riscv: Fix compressed Image formats build make[1]: *** No rule to make target `Image.lzma'. Stop. When make ARCH=riscv Image.lzma, it won't work, let's fix it. Reviewed-by: Atish Patra Signed-off-by: Kefeng Wang Signed-off-by: Palmer Dabbelt commit 00ab027a3b82dbad0a698fef1e359ebcab4c205b Author: Nick Kossifidis Date: Mon Oct 12 17:24:10 2020 +0300 RISC-V: Add kernel image sections to the resource tree This patch (previously part of my kexec/kdump series) populates /proc/iomem with the various sections of the kernel image. We need this for kexec-tools to be able to prepare the crashkernel image for kdump to work. Since resource tree initialization is not related to memory initialization I added the code to kernel/setup.c and removed the original code (derived from the arm64 tree) from mm/init.c. Signed-off-by: Nick Kossifidis Signed-off-by: Palmer Dabbelt commit 9bb9ef2b3e5d9d012876e7e2d7757eb30e865bee Author: Qinglang Miao Date: Tue Nov 3 15:49:11 2020 +0800 spi: bcm63xx-hsspi: fix missing clk_disable_unprepare() on error in bcm63xx_hsspi_resume Fix the missing clk_disable_unprepare() before return from bcm63xx_hsspi_resume in the error handling case when fails to prepare and enable bs->pll_clk. Fixes: 0fd85869c2a9 ("spi/bcm63xx-hsspi: keep pll clk enabled") Signed-off-by: Qinglang Miao Link: https://lore.kernel.org/r/20201103074911.195530-1-miaoqinglang@huawei.com Signed-off-by: Mark Brown commit a042184c7fb99961ea083d4ec192614bec671969 Author: Zhang Qilong Date: Tue Nov 3 22:13:06 2020 +0800 spi: tegra114: fix reference leak in tegra spi ops pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to pm_runtime_put_noidle will result in reference leak in two callers(tegra_spi_setup and tegra_spi_resume), so we should fix it. Fixes: f333a331adfac ("spi/tegra114: add spi driver") Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20201103141306.5607-1-zhangqilong3@huawei.com Signed-off-by: Mark Brown commit 3482e797ab688da6703fe18d8bad52f94199f4f2 Author: Zhang Qilong Date: Tue Nov 3 22:13:23 2020 +0800 spi: tegra20-sflash: fix reference leak in tegra_sflash_resume pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to pm_runtime_put_noidle will result in reference leak in tegra_sflash_resume, so we should fix it. Fixes: 8528547bcc336 ("spi: tegra: add spi driver for sflash controller") Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20201103141323.5841-1-zhangqilong3@huawei.com Signed-off-by: Mark Brown commit 763eab7074f6e71babd85d796156f05a675f9510 Author: Zhang Qilong Date: Tue Nov 3 22:13:45 2020 +0800 spi: tegra20-slink: fix reference leak in slink ops of tegra20 pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to pm_runtime_put_noidle will result in reference leak in two callers(tegra_slink_setup and tegra_slink_resume), so we should fix it. Fixes: dc4dc36056392 ("spi: tegra: add spi driver for SLINK controller") Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20201103141345.6188-1-zhangqilong3@huawei.com Signed-off-by: Mark Brown commit 702b15cb97123cedcec56a39d9a21c5288eb9ae1 Author: Qinglang Miao Date: Tue Nov 3 15:49:12 2020 +0800 spi: mt7621: fix missing clk_disable_unprepare() on error in mt7621_spi_probe Fix the missing clk_disable_unprepare() before return from mt7621_spi_probe in the error handling case. Fixes: cbd66c626e16 ("spi: mt7621: Move SPI driver out of staging") Signed-off-by: Qinglang Miao Link: https://lore.kernel.org/r/20201103074912.195576-1-miaoqinglang@huawei.com Signed-off-by: Mark Brown commit 45c0cba753641e5d7c3207f04241bd0e7a021698 Author: Zhang Qilong Date: Tue Nov 3 22:09:47 2020 +0800 spi: spi-ti-qspi: fix reference leak in ti_qspi_setup pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to pm_runtime_put_noidle will result in reference leak in ti_qspi_setup, so we should fix it. Fixes: 505a14954e2d7 ("spi/qspi: Add qspi flash controller") Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20201103140947.3815-1-zhangqilong3@huawei.com Signed-off-by: Mark Brown commit 88e1419b5ee30cc50e0c4d5265bdee1ba04af539 Author: Zhang Qilong Date: Fri Nov 6 09:53:57 2020 +0800 spi: stm32-qspi: fix reference leak in stm32 qspi operations pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to pm_runtime_put_noidle will result in reference leak in two callers(stm32_qspi_exec_op and stm32_qspi_setup), so we should fix it. Fixes: 9d282c17b023a ("spi: stm32-qspi: Add pm_runtime support") Signed-off-by: Zhang Qilong Reviewed-by: Patrice Chotard Link: https://lore.kernel.org/r/20201106015357.141235-1-zhangqilong3@huawei.com Signed-off-by: Mark Brown commit 354e592a506cf565dd5ece755150f50d52b69050 Merge: 1cc3245b2c746 1b4fb70e5b28a Author: Mark Brown Date: Mon Nov 9 19:43:31 2020 +0000 Merge series "ASoC: ti: davinci-mcasp: Handle incomplete DT node gracefully" from Peter Ujfalusi : Hi, The series is inspired by the effort to standardize TI's arm64 dtsi files to keep all nodes in 'okay' state and let the board dts files disable not needed peripherals (and not properly configured): https://lore.kernel.org/lkml/20201104224356.18040-1-nm@ti.com/ In the unlikely (or likely?) event when the dts misses to disable the McASP node which is not configured we currenly and luckily just manage to not crash as we had fixup code in place for legacy pdata boots. This however prints out a message which does not really help to identify the issue. This series will reduce some of the noise during boot (first patch) then adds the needed changes to handle the variations of 'okay': A - have all required DT properties for audio B - gpiochip is enabled A && !B -> everything is OK for audio, no gpiochip registered A && B -> everything is OK for audio, gpiochip is registered !A && B -> audio is not OK, gpiochip is registered. dev_dbg() for audio and do not register SOC DAI and PCM !A && !B -> audio is not OK, no gpiochip. dev_err() and fail the probe Regards, Peter --- Peter Ujfalusi (4): ASoC: ti: davinci-mcasp: Use platform_get_irq_byname_optional ASoC: ti: davinci-mcasp: Remove legacy dma_request parsing ASoC: ti: davinci-mcasp: Simplify the configuration parameter handling ASoC: ti: davinci-mcasp: Handle missing required DT properties sound/soc/ti/davinci-mcasp.c | 294 ++++++++++++++--------------------- 1 file changed, 119 insertions(+), 175 deletions(-) -- Peter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki commit 33c0c9bdf7a59051a654cd98b7d2b48ce0080967 Author: Mauro Carvalho Chehab Date: Fri Oct 23 18:32:56 2020 +0200 drivers: base: fix some kernel-doc markups class_create is actually defined at the header. Fix the markup there and add a new one at the right place. While here, also fix some markups for functions that have different names between their prototypes and kernel-doc comments. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/2fb6efd6a1f90d69ff73bf579566079cbb051e15.1603469755.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 17adb469bf1ef3c62e9356ab84449df6cad28ed5 Author: Furquan Shaikh Date: Thu Oct 22 00:15:50 2020 -0700 firmware: gsmi: Drop the use of dma_pool_* API functions GSMI driver uses dma_pool_* API functions for buffer allocation because it requires that the SMI buffers are allocated within 32-bit physical address space. However, this does not work well with IOMMU since there is no real device and hence no domain associated with the device. Since this is not a real device, it does not require any device address(IOVA) for the buffer allocations. The only requirement is to ensure that the physical address allocated to the buffer is within 32-bit physical address space. This is because the buffers have nothing to do with DMA at all. It is required for communication with firmware executing in SMI mode which has access only to the bottom 4GiB of memory. Hence, this change switches to using a SLAB cache created with SLAB_CACHE_DMA32 that guarantees that the allocation happens from the DMA32 memory zone. All calls to dma_pool_* are replaced with kmem_cache_*. In addition to that, all the code for managing the dma_pool for GSMI platform device is dropped. Signed-off-by: Furquan Shaikh Reviewed-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20201022071550.1192947-1-furquan@google.com Signed-off-by: Greg Kroah-Hartman commit 285654130d5c1bed000be6b94cd43b5110d16090 Author: Vincent Whitchurch Date: Mon Nov 9 09:54:37 2020 +0100 regulator: da9121: Use additionalProperties There's no $ref at the top level so use additionalProperties instead of unevaluatedProperties. This fixes the following warning with the latest dtschema: Documentation/devicetree/bindings/regulator/dlg,da9121.yaml: 'additionalProperties' is a required property Reported-by: Rob Herring Signed-off-by: Vincent Whitchurch Link: https://lore.kernel.org/r/20201109085438.16230-1-vincent.whitchurch@axis.com Signed-off-by: Mark Brown commit 1cc3245b2c7464b6d6ad210b0e333781676de519 Author: Shengjiu Wang Date: Sat Nov 7 10:20:43 2020 +0800 ASoC: fsl_aud2htx: Remove dev_err() usage after platform_get_irq() platform_get_irq() would print error message internally, so dev_err() after platform_get_irq() is not needed Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/1604715643-29507-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit b2fc3029308dd1bace4c11c733eca2ef941b0e29 Author: Cheng-Yi Chiang Date: Mon Nov 9 18:34:15 2020 +0800 ASoC: qcom: sc7180: Add missing PM ops Use PM ops snd_soc_pm_ops to handle suspend/resume like other machine drivers. Signed-off-by: Cheng-Yi Chiang Link: https://lore.kernel.org/r/20201109103415.607495-1-cychiang@chromium.org Signed-off-by: Mark Brown commit 95370acdb87d73b12a0e6895fa422a6409d14a01 Author: Jack Yu Date: Mon Nov 9 14:29:58 2020 +0800 ASoC: rt1015: modification for calibration to get better performance Modification for calibration to get better performance. Signed-off-by: Jack Yu Link: https://lore.kernel.org/r/20201109062958.16917-1-jack.yu@realtek.com Signed-off-by: Mark Brown commit 88f6c77927e4aee04e0193fd94e13a55753a72b0 Author: Zhang Qilong Date: Mon Oct 26 19:03:14 2020 +0800 binder: change error code from postive to negative in binder_transaction Depending on the context, the error return value here (extra_buffers_size < added_size) should be negative. Acked-by: Martijn Coenen Acked-by: Christian Brauner Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20201026110314.135481-1-zhangqilong3@huawei.com Signed-off-by: Greg Kroah-Hartman commit 6c20032c22d9823f35cd673b7f69ce73a49582b0 Author: Andrew Bridges Date: Tue Oct 27 22:56:55 2020 +0000 Android: binder: added a missing blank line after declaration Fixed a coding style issue. Signed-off-by: Andrew Bridges Link: https://lore.kernel.org/r/20201027225655.650922-1-andrew@slova.app Signed-off-by: Greg Kroah-Hartman commit 385997dc17ab4927bad332c1283dc461a973ab1d Author: Kai Ye Date: Mon Nov 2 17:39:25 2020 +0800 uacce: modify the module author information. The spelling of "Hisilicon" is modified. Reviewed-by: Zhou Wang Reviewed-by: Jonathan Cameron Acked-by: Zhangfei Gao Signed-off-by: Kai Ye Link: https://lore.kernel.org/r/1604309965-21752-3-git-send-email-yekai13@huawei.com Signed-off-by: Greg Kroah-Hartman commit a67c43ac37f80b5e7e1876e8f5f7df62027445c8 Author: Kai Ye Date: Mon Nov 2 17:39:24 2020 +0800 uacce: delete some redundant code. Delete some redundant code. Reviewed-by: Zhou Wang Reviewed-by: Jonathan Cameron Acked-by: Zhangfei Gao Signed-off-by: Kai Ye Link: https://lore.kernel.org/r/1604309965-21752-2-git-send-email-yekai13@huawei.com Signed-off-by: Greg Kroah-Hartman commit 8bd160690a6c064fd4459d006e50ba7cc7a7669c Author: Mauro Carvalho Chehab Date: Fri Oct 23 18:33:20 2020 +0200 vme: fix two kernel-doc markups Some identifiers have different names between their prototypes and the kernel-doc markup. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/51bfb6724975302f66d64e4ad71de451a7cbbf99.1603469755.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 9f38abefd37af8726d59706b9b84530630b6b620 Author: Mauro Carvalho Chehab Date: Fri Oct 23 18:33:17 2020 +0200 uio: fix some kernel-doc markups The definitions for (devm_)uio_register_device should be at the header file, as the macros are there. The ones inside uio.c refer, instead, to __(devm_)uio_register_device. Update them and add new kernel-doc markups for the macros. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/82ab7b68d271aeda7396e369ff8a629491b9d628.1603469755.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 7bbd2584ead19a8fdd72c19b1fdf25369954aee6 Author: Mauro Carvalho Chehab Date: Fri Oct 23 18:33:03 2020 +0200 mei: bus: fix a kernel-doc markup A function has a different name between their prototype and its kernel-doc markup. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/56b4cc6308fe6b6133b95c7d9116ed6fbaaabe9f.1603469755.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 7008e58c63bc8468e8d16154e25d780198b3ecfc Author: Saravana Kannan Date: Wed Nov 4 12:54:30 2020 -0800 driver core: Fix lockdep warning on wfs_lock There's a potential deadlock with the following cycle: wfs_lock --> device_links_lock --> kn->count Fix this by simply dropping the lock around a list_empty() check that's just exported to a sysfs file. The sysfs file output is an instantaneous check anyway and the lock doesn't really add any protection. Lockdep log: [ 48.808132] [ 48.808132] the existing dependency chain (in reverse order) is: [ 48.809069] [ 48.809069] -> #2 (kn->count){++++}: [ 48.809707] __kernfs_remove.llvm.7860393000964815146+0x2d4/0x460 [ 48.810537] kernfs_remove_by_name_ns+0x54/0x9c [ 48.811171] sysfs_remove_file_ns+0x18/0x24 [ 48.811762] device_del+0x2b8/0x5a8 [ 48.812269] __device_link_del+0x98/0xb8 [ 48.812829] device_links_driver_bound+0x210/0x2d8 [ 48.813496] driver_bound+0x44/0xf8 [ 48.814000] really_probe+0x340/0x6e0 [ 48.814526] driver_probe_device+0xb8/0x100 [ 48.815117] device_driver_attach+0x78/0xb8 [ 48.815708] __driver_attach+0xe0/0x194 [ 48.816255] bus_for_each_dev+0xa8/0x11c [ 48.816816] driver_attach+0x24/0x30 [ 48.817331] bus_add_driver+0x100/0x1e0 [ 48.817880] driver_register+0x78/0x114 [ 48.818427] __platform_driver_register+0x44/0x50 [ 48.819089] 0xffffffdbb3227038 [ 48.819551] do_one_initcall+0xd8/0x1e0 [ 48.820099] do_init_module+0xd8/0x298 [ 48.820636] load_module+0x3afc/0x44c8 [ 48.821173] __arm64_sys_finit_module+0xbc/0xf0 [ 48.821807] el0_svc_common+0xbc/0x1d0 [ 48.822344] el0_svc_handler+0x74/0x98 [ 48.822882] el0_svc+0x8/0xc [ 48.823310] [ 48.823310] -> #1 (device_links_lock){+.+.}: [ 48.824036] __mutex_lock_common+0xe0/0xe44 [ 48.824626] mutex_lock_nested+0x28/0x34 [ 48.825185] device_link_add+0xd4/0x4ec [ 48.825734] of_link_to_suppliers+0x158/0x204 [ 48.826347] of_fwnode_add_links+0x50/0x64 [ 48.826928] device_link_add_missing_supplier_links+0x90/0x11c [ 48.827725] fw_devlink_resume+0x58/0x130 [ 48.828296] of_platform_default_populate_init+0xb4/0xd0 [ 48.829030] do_one_initcall+0xd8/0x1e0 [ 48.829578] do_initcall_level+0xb8/0xcc [ 48.830137] do_basic_setup+0x60/0x7c [ 48.830662] kernel_init_freeable+0x128/0x1ac [ 48.831275] kernel_init+0x18/0x29c [ 48.831781] ret_from_fork+0x10/0x18 [ 48.832297] [ 48.832297] -> #0 (wfs_lock){+.+.}: [ 48.832922] __lock_acquire+0xe04/0x2e20 [ 48.833480] lock_acquire+0xbc/0xec [ 48.833984] __mutex_lock_common+0xe0/0xe44 [ 48.834577] mutex_lock_nested+0x28/0x34 [ 48.835136] waiting_for_supplier_show+0x3c/0x98 [ 48.835781] dev_attr_show+0x48/0xb4 [ 48.836295] sysfs_kf_seq_show+0xe8/0x184 [ 48.836864] kernfs_seq_show+0x48/0x8c [ 48.837401] seq_read+0x1c8/0x600 [ 48.837884] kernfs_fop_read+0x68/0x204 [ 48.838431] __vfs_read+0x60/0x214 [ 48.838925] vfs_read+0xbc/0x15c [ 48.839397] ksys_read+0x78/0xe4 [ 48.839869] __arm64_sys_read+0x1c/0x28 [ 48.840416] el0_svc_common+0xbc/0x1d0 [ 48.840953] el0_svc_handler+0x74/0x98 [ 48.841490] el0_svc+0x8/0xc [ 48.841917] [ 48.841917] other info that might help us debug this: [ 48.841917] [ 48.842920] Chain exists of: [ 48.842920] wfs_lock --> device_links_lock --> kn->count [ 48.842920] [ 48.844152] Possible unsafe locking scenario: [ 48.844152] [ 48.844895] CPU0 CPU1 [ 48.845463] ---- ---- [ 48.846032] lock(kn->count); [ 48.846417] lock(device_links_lock); [ 48.847203] lock(kn->count); [ 48.847902] lock(wfs_lock); [ 48.848276] [ 48.848276] *** DEADLOCK *** Reported-by: Cheng-Jui.Wang@mediatek.com Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20201104205431.3795207-1-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit f96a15c7698ede0e60bf5b4b9b5d0c7d0a0b505f Author: Samuel Thibault Date: Sun Nov 8 19:18:24 2020 +0100 speakup: Document read_all_doc shortcut This was implemented a long time ago, but never actually added to the documentation. Signed-off-by: Samuel Thibault Link: https://lore.kernel.org/r/20201108181824.bso5exam72b4p4tk@function Signed-off-by: Greg Kroah-Hartman commit 508155944752f6e51dbc0a7273d933e954e4ed64 Author: Samuel Thibault Date: Mon Nov 2 10:59:45 2020 +0100 speakup: document the usage of enum values The cursor tracking modes enum, the edge enum, and the read_all commands enum should be used as such in the source code, to make it more readable and make gcc catch missing values in switches. Also, some values of enums are coupled with others, we at least need to document these. Signed-off-by: Samuel Thibault Link: https://lore.kernel.org/r/20201102095945.ap4pdff2dn47hijh@function Signed-off-by: Greg Kroah-Hartman commit 9ad7c6d5e75b160c9ce5775db610d964af45b83f Author: Ard Biesheuvel Date: Thu Oct 8 17:36:02 2020 +0200 arm64: mm: tidy up top of kernel VA space Tidy up the way the top of the kernel VA space is organized, by mirroring the 256 MB region we have below the vmalloc space, and populating it top down with the PCI I/O space, some guard regions, and the fixmap region. The latter region is itself populated top down, and today only covers about 4 MB, and so 224 MB is ample, and no guard region is therefore required. The resulting layout is identical between 48-bit/4k and 52-bit/64k configurations. Signed-off-by: Ard Biesheuvel Reviewed-by: Steve Capper Link: https://lore.kernel.org/r/20201008153602.9467-5-ardb@kernel.org Signed-off-by: Catalin Marinas commit 8c96400d6a39be763130a5c493647c57726f7013 Author: Ard Biesheuvel Date: Thu Oct 8 17:36:01 2020 +0200 arm64: mm: make vmemmap region a projection of the linear region Now that we have reverted the introduction of the vmemmap struct page pointer and the separate physvirt_offset, we can simplify things further, and place the vmemmap region in the VA space in such a way that virtual to page translations and vice versa can be implemented using a single arithmetic shift. One happy coincidence resulting from this is that the 48-bit/4k and 52-bit/64k configurations (which are assumed to be the two most prevalent) end up with the same placement of the vmemmap region. In a subsequent patch, we will take advantage of this, and unify the memory maps even more. Signed-off-by: Ard Biesheuvel Reviewed-by: Steve Capper Link: https://lore.kernel.org/r/20201008153602.9467-4-ardb@kernel.org Signed-off-by: Catalin Marinas commit f4693c2716b35d0846fd45a4ad7db78bfb25efc8 Author: Ard Biesheuvel Date: Thu Oct 8 17:36:00 2020 +0200 arm64: mm: extend linear region for 52-bit VA configurations For historical reasons, the arm64 kernel VA space is configured as two equally sized halves, i.e., on a 48-bit VA build, the VA space is split into a 47-bit vmalloc region and a 47-bit linear region. When support for 52-bit virtual addressing was added, this equal split was kept, resulting in a substantial waste of virtual address space in the linear region: 48-bit VA 52-bit VA 0xffff_ffff_ffff_ffff +-------------+ +-------------+ | vmalloc | | vmalloc | 0xffff_8000_0000_0000 +-------------+ _PAGE_END(48) +-------------+ | linear | : : 0xffff_0000_0000_0000 +-------------+ : : : : : : : : : : : : : : : : : currently : : unusable : : : : : : unused : : by : : : : : : : : hardware : : : : : : : 0xfff8_0000_0000_0000 : : _PAGE_END(52) +-------------+ : : | | : : | | : : | | : : | | : : | | : unusable : | | : : | linear | : by : | | : : | region | : hardware : | | : : | | : : | | : : | | : : | | : : | | : : | | 0xfff0_0000_0000_0000 +-------------+ PAGE_OFFSET +-------------+ As illustrated above, the 52-bit VA kernel uses 47 bits for the vmalloc space (as before), to ensure that a single 64k granule kernel image can support any 64k granule capable system, regardless of whether it supports the 52-bit virtual addressing extension. However, due to the fact that the VA space is still split in equal halves, the linear region is only 2^51 bytes in size, wasting almost half of the 52-bit VA space. Let's fix this, by abandoning the equal split, and simply assigning all VA space outside of the vmalloc region to the linear region. The KASAN shadow region is reconfigured so that it ends at the start of the vmalloc region, and grows downwards. That way, the arrangement of the vmalloc space (which contains kernel mappings, modules, BPF region, the vmemmap array etc) is identical between non-KASAN and KASAN builds, which aids debugging. Signed-off-by: Ard Biesheuvel Reviewed-by: Steve Capper Link: https://lore.kernel.org/r/20201008153602.9467-3-ardb@kernel.org Signed-off-by: Catalin Marinas commit a79db45fa54e2420c9fe977a6a5835c466888b5a Author: Samuel Thibault Date: Sun Nov 1 19:39:13 2020 +0100 speakup_dummy: log about characters received by the dummy driver The dummy speakup driver is used to check that speakup is working properly, without the need for actually owning the hardware. Some drivers require receiving characters, so we need a way to check that this is working properly. Signed-off-by: Samuel Thibault Link: https://lore.kernel.org/r/20201101183913.yg35cbqpn2ba6cew@function Signed-off-by: Greg Kroah-Hartman commit 21774fd81a51ec1eccd59caf922d387977acd2aa Author: Willem de Bruijn Date: Thu Oct 15 14:57:26 2020 -0400 kernfs: bring names in comments in line with code Fix two stragglers in the comments of the below rename operation. Fixes: adc5e8b58f48 ("kernfs: drop s_ prefix from kernfs_node members") Acked-by: Tejun Heo Signed-off-by: Willem de Bruijn Link: https://lore.kernel.org/r/20201015185726.1386868-1-willemdebruijn.kernel@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7cd0aaafaadcaaf280887f8b478393a9fcfc69e3 Author: Marc Zyngier Date: Sun Oct 11 18:17:38 2020 +0100 KVM: arm64: Turn host HVC handling into a dispatch table Now that we can use function pointer, use a dispatch table to call the individual HVC handlers, leading to more maintainable code. Further improvements include helpers to declare the mapping of local variables to values passed in the host context. Reviewed-by: Alexandru Elisei Signed-off-by: Marc Zyngier commit 1db9d9ded771389aae5760d20dd1bac113451b9c Author: Marc Zyngier Date: Wed Oct 21 20:48:02 2020 +0100 KVM: arm64: Add kimg_hyp_va() helper KVM/arm64 is so far unable to deal with function pointers, as the compiler will generate the kernel's runtime VA, and not the linear mapping address, meaning that kern_hyp_va() will give the wrong result. We so far have been able to use PC-relative addressing, but that's not always easy to use, and prevents the implementation of things like the mapping of an index to a pointer. To allow this, provide a new helper that computes the required translation from the kernel image to the HYP VA space. Signed-off-by: Marc Zyngier commit 2b076054e524a92e3a303de487dfb7cf85d8e149 Author: Peter Zijlstra Date: Mon Nov 9 12:39:12 2020 +0100 remove boolinit.cocci 0/1 for booleans is perfectly valid C. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Julia Lawall commit f4ea089e429e0d366cd1a34a2cbe3c7b13d98d75 Author: Jens Axboe Date: Fri Oct 9 15:13:57 2020 -0600 microblaze: add support for TIF_NOTIFY_SIGNAL Wire up TIF_NOTIFY_SIGNAL handling for microblaze. Acked-by: Michal Simek Signed-off-by: Jens Axboe commit aeec8193578a71d0aee21218351849d38121ce90 Author: Jens Axboe Date: Fri Oct 9 14:45:22 2020 -0600 hexagon: add support for TIF_NOTIFY_SIGNAL Wire up TIF_NOTIFY_SIGNAL handling for hexagon. Cc: linux-hexagon@vger.kernel.org Acked-by: Brian Cain Signed-off-by: Jens Axboe commit f3924d763c8af4c5d441b666c01f4de03ac9449e Author: Jens Axboe Date: Fri Oct 9 14:39:00 2020 -0600 csky: add support for TIF_NOTIFY_SIGNAL Wire up TIF_NOTIFY_SIGNAL handling for csky. Cc: linux-csky@vger.kernel.org Acked-by: Guo Ren Signed-off-by: Jens Axboe commit e181c0aa2e532af2b17128fbde699f8578cc0562 Author: Jens Axboe Date: Fri Oct 9 15:24:46 2020 -0600 openrisc: add support for TIF_NOTIFY_SIGNAL Wire up TIF_NOTIFY_SIGNAL handling for openrisc. Cc: openrisc@lists.librecores.org Acked-by: Stafford Horne Signed-off-by: Jens Axboe commit 6d3a273355e3c8471ddf9e8ce9a7cc4472bf1ccc Author: Jens Axboe Date: Fri Oct 9 15:36:35 2020 -0600 sh: add support for TIF_NOTIFY_SIGNAL Wire up TIF_NOTIFY_SIGNAL handling for sh. Cc: linux-sh@vger.kernel.org Signed-off-by: Jens Axboe commit a5b3cd32ff238b87e94d47b927aff117e22d13c0 Author: Jens Axboe Date: Fri Oct 9 15:47:28 2020 -0600 um: add support for TIF_NOTIFY_SIGNAL Wire up TIF_NOTIFY_SIGNAL handling for um. Cc: linux-um@lists.infradead.org Acked-By: Anton Ivanov Signed-off-by: Jens Axboe commit 75309018a24ddfb930c51bad8f4070b9bc2c923b Author: Jens Axboe Date: Fri Oct 9 15:34:12 2020 -0600 s390: add support for TIF_NOTIFY_SIGNAL Wire up TIF_NOTIFY_SIGNAL handling for s390. Cc: linux-s390@vger.kernel.org Acked-by: Heiko Carstens Acked-by: Sven Schnelle Signed-off-by: Jens Axboe commit f45c184bce15f4a314c0210519bc3b4aab408838 Author: Jens Axboe Date: Fri Oct 9 15:16:02 2020 -0600 mips: add support for TIF_NOTIFY_SIGNAL Wire up TIF_NOTIFY_SIGNAL handling for mips. Cc: linux-mips@vger.kernel.org Acked-By: Thomas Bogendoerfer Signed-off-by: Jens Axboe commit 900f0713fdd730fab0f0bfa4a8ca4db2a8985bbe Author: Jens Axboe Date: Thu Oct 22 20:11:56 2020 -0600 powerpc: add support for TIF_NOTIFY_SIGNAL Wire up TIF_NOTIFY_SIGNAL handling for powerpc. Cc: linuxppc-dev@lists.ozlabs.org Acked-by: Michael Ellerman Signed-off-by: Jens Axboe commit 18cb3281285d2190c0605d2e53543802319bd1a1 Author: Jens Axboe Date: Fri Oct 9 15:27:02 2020 -0600 parisc: add support for TIF_NOTIFY_SIGNAL Wire up TIF_NOTIFY_SIGNAL handling for parisc. Cc: linux-parisc@vger.kernel.org Acked-by: Helge Deller Signed-off-by: Jens Axboe commit 42020064274c235d720d9c4b7d9a678b133e59cf Author: Jens Axboe Date: Fri Oct 9 15:21:21 2020 -0600 nios32: add support for TIF_NOTIFY_SIGNAL Wire up TIF_NOTIFY_SIGNAL handling for nios32. Cc: Ley Foon Tan Acked-by: Ley Foon Tan Signed-off-by: Jens Axboe commit e660653cd9f2df470d156c249631f68b9dee51ee Author: Jens Axboe Date: Fri Oct 9 15:10:55 2020 -0600 m68k: add support for TIF_NOTIFY_SIGNAL Wire up TIF_NOTIFY_SIGNAL handling for m68k. Cc: linux-m68k@lists.linux-m68k.org Acked-by: Geert Uytterhoeven Signed-off-by: Jens Axboe commit 192caabd4dd92c98d23ed4334d7596af05af2fb4 Author: Jens Axboe Date: Thu Oct 22 20:09:23 2020 -0600 arm64: add support for TIF_NOTIFY_SIGNAL Wire up TIF_NOTIFY_SIGNAL handling for arm64. Cc: linux-arm-kernel@lists.infradead.org Acked-by: Will Deacon Acked-by: Catalin Marinas Signed-off-by: Jens Axboe commit 53855e12588743ea128ee31f913d1c6e2f1d32c8 Author: Jens Axboe Date: Mon Oct 12 07:15:37 2020 -0600 arc: add support for TIF_NOTIFY_SIGNAL Wire up TIF_NOTIFY_SIGNAL handling for arc. Cc: linux-snps-arc@lists.infradead.org Acked-by: Vineet Gupta Signed-off-by: Jens Axboe commit 88f93de1de0c4633332631eb148bc36e8e8eb28f Merge: 29701d69b98d0 c8d5ed67936fd Author: Jens Axboe Date: Mon Nov 9 08:16:48 2020 -0700 Merge branch 'x86/entry' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into tif-task_work.arch * 'x86/entry' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86: Wire up TIF_NOTIFY_SIGNAL x86: Reclaim TIF_IA32 and TIF_X32 x86/mm: Convert mmu context ia32_compat into a proper flags field x86/elf: Use e_machine to check for x32/ia32 in setup_additional_pages() elf: Expose ELF header on arch_setup_additional_pages() x86/elf: Use e_machine to select start_thread for x32 elf: Expose ELF header in compat_start_thread() x86/elf: Use e_machine to choose DLINFO in compat x86/oprofile: Avoid TIF_IA32 when checking 64bit mode x86/compat: Simplify compat syscall userspace allocation perf/x86: Avoid TIF_IA32 when checking 64bit mode commit 552c08a8e03f09ee7f44950d0f6d9bd4599ff1f6 Author: Tom Rix Date: Mon Oct 19 12:32:27 2020 -0700 ipack: iopctal: remove unneeded break A break is not needed if it is preceded by a return Acked-by: Samuel Iglesias Gonsalvez Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20201019193227.12738-1-trix@redhat.com Signed-off-by: Greg Kroah-Hartman commit 6a80467a21ca4268f1d97daa1f43b66b86fe3887 Author: Tom Rix Date: Mon Oct 19 09:51:12 2020 -0700 vme: remove unneeded break A break is not needed if it is preceded by a return or goto Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20201019165112.29091-1-trix@redhat.com Signed-off-by: Greg Kroah-Hartman commit b61fe3b5963db935dad5bae8f9ced3bed695bb62 Author: Tom Rix Date: Mon Oct 19 12:45:03 2020 -0700 char: mwave: remove unneeded break A break is not needed if it is preceded by a return Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20201019194503.14426-1-trix@redhat.com Signed-off-by: Greg Kroah-Hartman commit 061e5379f327c77647b6a16beaf898b1ee71d731 Author: Tom Rix Date: Mon Oct 19 12:46:28 2020 -0700 char: lp: remove unneeded break A break is not needed if it is preceded by a return Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20201019194628.14731-1-trix@redhat.com Signed-off-by: Greg Kroah-Hartman commit 2356eb80ca42deba0bf2523c62530d4c79dad08f Author: Jonathan Neuschäfer Date: Sun Nov 8 01:40:45 2020 +0100 docs: filesystems: Reduce ext2.rst to one top-level heading This prevents the other headings like "Options" and "Specification" from leaking out and being listed separately in the table of contents. Link: https://lore.kernel.org/r/20201108004045.1378676-1-j.neuschaefer@gmx.net Signed-off-by: Jonathan Neuschäfer Signed-off-by: Jan Kara commit 29701d69b98d0a132abd63fe2e51125f478fbc53 Merge: f8394f232b1ea 114518eb6430b Author: Jens Axboe Date: Mon Nov 9 07:19:32 2020 -0700 Merge tag 'core-entry-notify-signal' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into tif-task_work.arch Core changes to support TASK_NOTIFY_SIGNAL * tag 'core-entry-notify-signal' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: task_work: Use TIF_NOTIFY_SIGNAL if available entry: Add support for TIF_NOTIFY_SIGNAL signal: Add task_sigpending() helper commit 97ab4516205eedde0b6565e47175d825b88d6759 Author: Zhen Gong Date: Sun Nov 8 01:23:19 2020 -0800 platform/x86: intel-hid: fix _DSM function index handling According to the ACPI spec 9.1.1 _DSM (Device Specific Method), intel_hid_dsm_fn_mask, acquired from function index 0, is "a buffer containing one bit for each function index". When validitaing fn_index, it should be compared with corresponding bit. This buffer is usually longer than a byte. Depending on whether INTEL_HID_DSM_HEBC_V2_FN exist, it could be either "Buffer (0x02) { 0xFF, 0x01 }" or "Buffer (0x02) { 0xFF, 0x03 }". Probably it won't grow larger according to the description. On older platforms, available functions could be fewer or not supported at all, i.e., "Buffer (One) { 0x00 }". Signed-off-by: Zhen Gong Link: https://lore.kernel.org/r/CAJCLVRCyp0ASdWTx-PxsrDC9zFBPw0U2AtPip+_Hpj2r5gUPwA@mail.gmail.com Signed-off-by: Hans de Goede commit 92890123749bafc317bbfacbe0a62ce08d78efb7 Author: Waiman Long Date: Sun Nov 8 22:59:31 2020 -0500 inotify: Increase default inotify.max_user_watches limit to 1048576 The default value of inotify.max_user_watches sysctl parameter was set to 8192 since the introduction of the inotify feature in 2005 by commit 0eeca28300df ("[PATCH] inotify"). Today this value is just too small for many modern usage. As a result, users have to explicitly set it to a larger value to make it work. After some searching around the web, these are the inotify.max_user_watches values used by some projects: - vscode: 524288 - dropbox support: 100000 - users on stackexchange: 12228 - lsyncd user: 2000000 - code42 support: 1048576 - monodevelop: 16384 - tectonic: 524288 - openshift origin: 65536 Each watch point adds an inotify_inode_mark structure to an inode to be watched. It also pins the watched inode. Modeled after the epoll.max_user_watches behavior to adjust the default value according to the amount of addressable memory available, make inotify.max_user_watches behave in a similar way to make it use no more than 1% of addressable memory within the range [8192, 1048576]. We estimate the amount of memory used by inotify mark to size of inotify_inode_mark plus two times the size of struct inode (we double the inode size to cover the additional filesystem private inode part). That means that a 64-bit system with 128GB or more memory will likely have the maximum value of 1048576 for inotify.max_user_watches. This default should be big enough for most use cases. Link: https://lore.kernel.org/r/20201109035931.4740-1-longman@redhat.com Reviewed-by: Amir Goldstein Signed-off-by: Waiman Long Signed-off-by: Jan Kara commit 3be3955315bdf7e4511514a520a76675a23e86e6 Author: Kaixu Xia Date: Sat Nov 7 20:53:41 2020 +0800 platform/x86: intel_pmc_core: Assign boolean values to a bool variable Fix the following coccinelle warnings: ./drivers/platform/x86/intel_pmc_core.c:932:1-16: WARNING: Assignment of 0/1 to bool variable Signed-off-by: Kaixu Xia Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/1604753621-7387-1-git-send-email-kaixuxia@tencent.com Signed-off-by: Hans de Goede commit 156ec4731cb22b06c08e27debc1ef9f16f4bbb5e Author: Shyam Sundar S K Date: Thu Nov 5 19:35:31 2020 +0530 platform/x86: amd-pmc: Add AMD platform support for S2Idle AMD Power Management Controller driver a.k.a. amd-pmc driver is the controller which is meant for the final S2Idle transaction that goes to the PMFW running on the AMD SMU (System Management Unit) responsible for tuning of the VDD. Once all the monitored list or the idle constraints are met, this driver would go and set the OS_HINT (meaning all the devices have reached to their lowest state possible) via the SMU mailboxes. This driver would also provide some debug capabilities via debugfs. Signed-off-by: Shyam Sundar S K Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201105140531.2955555-1-Shyam-sundar.S-k@amd.com Signed-off-by: Hans de Goede commit 330b7d33056bb0fa7d7f672d4a98495f200fe9d4 Author: Matthew Auld Date: Mon Nov 9 11:12:49 2020 +0000 drm/i915/region: fix order when adding blocks When performing an allocation we try split it down into the largest possible power-of-two blocks/pages-sizes, and for the common case we expect to allocate the blocks in descending order. This also naturally fits with our GTT alignment tricks(including the hugepages selftest), where we sometimes try to align to the largest possible GTT page-size for the allocation, in the hope that translates to bigger GTT page-sizes. Currently, we seem to incorrectly add the blocks in the opposite order, which is definitely not the intended behaviour. Reported-by: CQ Tang Signed-off-by: Matthew Auld Cc: Chris Wilson Cc: CQ Tang Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20201109111249.109365-1-matthew.auld@intel.com commit 3cd420b2ebd8400f09484e3d07ea347a43bb3f7b Author: Hans de Goede Date: Mon Nov 9 11:35:50 2020 +0100 platform/x86: thinkpad_acpi: Add BAT1 is primary battery quirk for Thinkpad Yoga 11e 4th gen The Thinkpad Yoga 11e 4th gen with the N3450 / Celeron CPU only has one battery which is named BAT1 instead of the expected BAT0, add a quirk for this. This fixes not being able to set the charging tresholds on this model; and this alsoe fixes the following errors in dmesg: ACPI: \_SB_.PCI0.LPCB.EC__.HKEY: BCTG evaluated but flagged as error thinkpad_acpi: Error probing battery 2 battery: extension failed to load: ThinkPad Battery Extension battery: extension unregistered: ThinkPad Battery Extension Note that the added quirk is for the "R0K" BIOS versions which are used on the Thinkpad Yoga 11e 4th gen's with a Celeron CPU, there is a separate "R0L" BIOS for the i3/i5 based versions. This may also need the same quirk, but if that really is necessary is unknown. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20201109103550.16265-1-hdegoede@redhat.com commit 685489a32c61a043114af5d5749e640ee277b52e Author: Hans de Goede Date: Fri Nov 6 15:01:30 2020 +0100 platform/x86: thinkpad_acpi: Do not report SW_TABLET_MODE on Yoga 11e The Yoga 11e series has 2 accelerometers described by a BOSC0200 ACPI node. This setup relies on a Windows service which reads both accelerometers and then calculates the angle between the 2 halves to determine laptop / tent / tablet mode and then reports the calculated mode back to the EC by calling special ACPI methods on the BOSC0200 node. The bmc150 iio driver does not support this (it involves double calculations requiring sqrt and arccos so this really needs to be done in userspace), as a result of this on the Yoga 11e the thinkpad_acpi code always reports SW_TABLET_MODE=0, starting with GNOME 3.38 reporting SW_TABLET_MODE=0 causes GNOME to: 1. Not show the onscreen keyboard when a text-input field is focussed with the touchscreen. 2. Disable accelerometer based auto display-rotation. This makes sense when in laptop-mode but not when in tablet-mode. But since for the Yoga 11e the thinkpad_acpi code always reports SW_TABLET_MODE=0, GNOME does not know when the device is in tablet-mode. Stop reporting the broken (always 0) SW_TABLET_MODE on Yoga 11e models to fix this. Note there are plans for userspace to support 360 degree hinges style 2-in-1s with 2 accelerometers and figure out the mode by itself, see: https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/issues/216 Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20201106140130.46820-1-hdegoede@redhat.com commit c758be8e1d06f3989d2cfd0efd182b67773a88f9 Author: Iakov 'Jake' Kirilenko Date: Thu Nov 5 18:25:56 2020 +0300 platform/x86: thinkpad_acpi: add P1 gen3 second fan support Tested on my P1 gen3, works fine with `thinkfan`. Since thinkpad_acpi fan control is off by default, it is safe to add 2nd fan control for brave overclockers Signed-off-by: Iakov 'Jake' Kirilenko Link: https://lore.kernel.org/r/20201105152556.34073-1-jake.kirilenko@gmail.com Signed-off-by: Hans de Goede commit ad624dfd7bb69a20ff06804ece25bc27200f2ea2 Author: Pratyush Yadav Date: Mon Oct 5 21:01:38 2020 +0530 mtd: spi-nor: micron-st: allow using MT35XU512ABA in Octal DTR mode Since this flash doesn't have a Profile 1.0 table, the Octal DTR capabilities are enabled in the post SFDP fixup, along with the 8D-8D-8D fast read settings. Enable Octal DTR mode with 20 dummy cycles to allow running at the maximum supported frequency of 200Mhz. The flash supports the soft reset sequence. So, add the flag in the flash's info. Signed-off-by: Pratyush Yadav Signed-off-by: Vignesh Raghavendra Reviewed-by: Tudor Ambarus Link: https://lore.kernel.org/r/20201005153138.6437-16-p.yadav@ti.com commit c3266af101f28e87505c976fad8db96c68f8afe4 Author: Pratyush Yadav Date: Mon Oct 5 21:01:37 2020 +0530 mtd: spi-nor: spansion: add support for Cypress Semper flash The Cypress Semper flash is an xSPI compliant octal DTR flash. Add support for using it in octal DTR mode. The flash by default boots in a hybrid sector mode. But the sector map table on the part I had was programmed incorrectly and the SMPT values on the flash don't match the public datasheet. Specifically, in some places erase type 3 was used instead of 4. In addition, the region sizes were incorrect in some places. So, for testing I set CFR3N[3] to enable uniform sector sizes. Since the uniform sector mode bit is a non-volatile bit, this series does not change it to avoid making any permanent changes to the flash configuration. The correct data to implement a fixup is not available right now and will be done in a follow-up patch if needed. Signed-off-by: Pratyush Yadav [vigneshr@ti.com: Drop unnecessary sleep in Octal DTR switch sequence] Signed-off-by: Vignesh Raghavendra Reviewed-by: Tudor Ambarus Link: https://lore.kernel.org/r/20201005153138.6437-15-p.yadav@ti.com commit 24b9f0d22081455b6fd739c8365958c207a69973 Author: Sergey Shtylyov Date: Sat Nov 7 23:20:52 2020 +0300 module: fix comment style Many comments in this module do not comply with the preferred multi-line comment style as reported by 'scripts/checkpatch.pl': WARNING: Block comments use * on subsequent lines WARNING: Block comments use a trailing */ on a separate line Fix those comments, along with (unreported for some reason?) the starts of the multi-line comments not being /* on their own line... Signed-off-by: Sergey Shtylyov Signed-off-by: Jessica Yu commit 2cfd72f81cf69c2659c6d2121308b55416229beb Author: Dan Carpenter Date: Fri Nov 6 22:24:15 2020 +0300 auxdisplay: fix use after free in lcd2s_i2c_remove() The kfree() needs to be moved down a line to prevent a use after free. Fixes: 8c9108d014c5 ("auxdisplay: add a driver for lcd2s character display") Signed-off-by: Dan Carpenter Signed-off-by: Miguel Ojeda commit ffdf726db7fb02a96396dcb8deb7436b4a47dd14 Author: Lars Poeschel Date: Mon Nov 9 10:31:54 2020 +0100 auxdisplay: hd44780_common: Fix build error When building the hd44780_common driver without a driver that actually uses it like panel or hd44780 you get a build error, because hd44780_common uses charlcd, but did not select it. Its users did select it. This is fixed now. hd4478_common now selects charlcd in Kconfig and panel and hd44780 do not. They only select hd44780_common. Reported-by: Randy Dunlap Signed-off-by: Lars Poeschel Signed-off-by: Miguel Ojeda commit 855af2d74c870d747bf53509f8b2d7b9dc9ee2c3 Author: Anant Thazhemadam Date: Fri Oct 16 18:44:47 2020 +0530 Bluetooth: hci_h5: fix memory leak in h5_close When h5_close() is called, h5 is directly freed when !hu->serdev. However, h5->rx_skb is not freed, which causes a memory leak. Freeing h5->rx_skb and setting it to NULL, fixes this memory leak. Fixes: ce945552fde4 ("Bluetooth: hci_h5: Add support for serdev enumerated devices") Reported-by: syzbot+6ce141c55b2f7aafd1c4@syzkaller.appspotmail.com Tested-by: syzbot+6ce141c55b2f7aafd1c4@syzkaller.appspotmail.com Signed-off-by: Anant Thazhemadam Reviewed-by: Hans de Goede Signed-off-by: Marcel Holtmann commit cca342d98bef68151a80b024f7bf5f388d1fbdea Author: Ole Bjørn Midtbø Date: Sat Oct 17 13:15:44 2020 +0200 Bluetooth: hidp: use correct wait queue when removing ctrl_wait A different wait queue was used when removing ctrl_wait than when adding it. This effectively made the remove operation without locking compared to other operations on the wait queue ctrl_wait was part of. This caused issues like below where dead000000000100 is LIST_POISON1 and dead000000000200 is LIST_POISON2. list_add corruption. next->prev should be prev (ffffffc1b0a33a08), \ but was dead000000000200. (next=ffffffc03ac77de0). ------------[ cut here ]------------ CPU: 3 PID: 2138 Comm: bluetoothd Tainted: G O 4.4.238+ #9 ... ---[ end trace 0adc2158f0646eac ]--- Call trace: [] __list_add+0x38/0xb0 [] add_wait_queue+0x4c/0x68 [] __pollwait+0xec/0x100 [] bt_sock_poll+0x74/0x200 [] sock_poll+0x110/0x128 [] do_sys_poll+0x220/0x480 [] SyS_poll+0x80/0x138 [] __sys_trace_return+0x0/0x4 Unable to handle kernel paging request at virtual address dead000000000100 ... CPU: 4 PID: 5387 Comm: kworker/u15:3 Tainted: G W O 4.4.238+ #9 ... Call trace: [] __wake_up_common+0x7c/0xa8 [] __wake_up+0x50/0x70 [] sock_def_wakeup+0x58/0x60 [] l2cap_sock_teardown_cb+0x200/0x224 [] l2cap_chan_del+0xa4/0x298 [] l2cap_conn_del+0x118/0x198 [] l2cap_disconn_cfm+0x6c/0x78 [] hci_event_packet+0x564/0x2e30 [] hci_rx_work+0x10c/0x360 [] process_one_work+0x268/0x460 [] worker_thread+0x268/0x480 [] kthread+0x118/0x128 [] ret_from_fork+0x10/0x20 ---[ end trace 0adc2158f0646ead ]--- Signed-off-by: Ole Bjørn Midtbø Signed-off-by: Marcel Holtmann commit 82493316507a720b6faa2ec23971c0ca89c6dcb0 Author: Claire Chang Date: Tue Sep 29 16:03:24 2020 +0800 Bluetooth: Move force_bredr_smp debugfs into hci_debugfs_create_bredr Avoid multiple attempts to create the debugfs entry, force_bredr_smp, by moving it from the SMP registration to the BR/EDR controller init section. hci_debugfs_create_bredr is only called when HCI_SETUP and HCI_CONFIG is not set. Signed-off-by: Claire Chang Reviewed-by: Alain Michaud Reviewed-by: Luiz Augusto von Dentz Signed-off-by: Marcel Holtmann commit 2541743e99c301f9b9659d0928bd8b22708d59df Author: Sergey Shtylyov Date: Wed Nov 4 23:35:51 2020 +0300 module: add more 'kernel-doc' comments Some functions have the proper 'kernel-doc' comments but these don't start with proper /** -- fix that, along with adding () to the function name on the following lines to fully comply with the 'kernel-doc' format. Signed-off-by: Sergey Shtylyov Signed-off-by: Jessica Yu commit 24389b610be31536328c655ae0a2cb0ef94be2c8 Author: Sergey Shtylyov Date: Wed Nov 4 23:34:59 2020 +0300 module: fix up 'kernel-doc' comments Some 'kernel-doc' function comments do not fully comply with the specified format due to: - missing () after the function name; - "RETURNS:"/"Returns:" instead of "Return:" when documenting the function's result. - empty line before describing the function's arguments. Signed-off-by: Sergey Shtylyov Signed-off-by: Jessica Yu commit 1fb17dfc258ff6208f7873cc7b8e40e27515d2d5 Author: Sathish Narasimman Date: Thu Oct 29 13:18:21 2020 +0530 Bluetooth: Fix: LL PRivacy BLE device fails to connect When adding device to white list the device is added to resolving list also. It has to be added only when HCI_ENABLE_LL_PRIVACY flag is set. HCI_ENABLE_LL_PRIVACY flag has to be tested before adding/deleting devices to resolving list. use_ll_privacy macro is used only to check if controller supports LL_Privacy. https://bugzilla.kernel.org/show_bug.cgi?id=209745 Fixes: 0eee35bdfa3b ("Bluetooth: Update resolving list when updating whitelist") Signed-off-by: Sathish Narasimman Signed-off-by: Marcel Holtmann commit 1996d9cad6ad4882a79464e9fb941a68c693f8fc Author: Kai-Heng Feng Date: Mon Oct 26 16:28:38 2020 +0800 Bluetooth: btrtl: Ask 8821C to drop old firmware Some platforms keep USB power even when they are powered off and in S5, this makes Realtek 8821C keep its firmware even after a cold boot, and make 8821C never load new firmware. So use vendor specific HCI command to ask 8821C drop its firmware after system shutdown. Newer firmware doesn't have this issue so we only use this trick for old 8821C firmware version. Suggested-by: Max Chou Signed-off-by: Kai-Heng Feng Signed-off-by: Marcel Holtmann commit 6f9ff24645f55ffae12ef717b4f221c3e7dfe115 Author: Max Chou Date: Wed Nov 4 20:04:14 2020 +0800 Bluetooth: btrtl: Refine the ic_id_table for clearer and more regular Enhance the ic_id_table that it's able to maintain regularly. To judge which chip should be initialized by LMP subversion, HCI revision, HCI version and HCI bus which were given in the ic_id_table. Also, refine the incorrect LMP subversion of ROM for RTL8723D and RTL8723A. Suggested-by: Alex Lu Signed-off-by: Max Chou Signed-off-by: Marcel Holtmann commit 73280f13c9bbcdc8ac323a5ba89a2c442d4973ed Author: Max Chou Date: Thu Nov 5 18:54:48 2020 +0800 Bluetooth: btusb: Add the more support IDs for Realtek RTL8822CE Add the more IDs to usb_device_id table for Realtek RTL8822CE and also support the wideband speech capability for all RTL8822CE devices. -Device(04c5:161f) from /sys/kernel/debug/usb/devices T: Bus=02 Lev=02 Prnt=02 Port=05 Cnt=01 Dev#= 3 Spd=12 MxCh= 0 D: Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=04c5 ProdID=161f Rev= 0.00 S: Manufacturer=Realtek S: Product=Bluetooth Radio S: SerialNumber=00e04c000001 C:* #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms -Device(0b05:18ef) from /sys/kernel/debug/usb/devices T: Bus=02 Lev=02 Prnt=02 Port=05 Cnt=01 Dev#= 4 Spd=12 MxCh= 0 D: Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=0b05 ProdID=18ef Rev= 0.00 S: Manufacturer=Realtek S: Product=Bluetooth Radio S: SerialNumber=00e04c000001 C:* #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms -Device(13d3:3549) from /sys/kernel/debug/usb/devices T: Bus=02 Lev=02 Prnt=02 Port=05 Cnt=01 Dev#= 3 Spd=12 MxCh= 0 D: Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=13d3 ProdID=3549 Rev= 0.00 S: Manufacturer=Realtek S: Product=Bluetooth Radio S: SerialNumber=00e04c000001 C:* #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms -Device(13d3:3553) from /sys/kernel/debug/usb/devices T: Bus=02 Lev=02 Prnt=02 Port=05 Cnt=01 Dev#= 3 Spd=12 MxCh= 0 D: Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=13d3 ProdID=3553 Rev= 0.00 S: Manufacturer=Realtek S: Product=Bluetooth Radio S: SerialNumber=00e04c000001 C:* #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms -Device(13d3:3555) from /sys/kernel/debug/usb/devices T: Bus=02 Lev=02 Prnt=02 Port=05 Cnt=01 Dev#= 3 Spd=12 MxCh= 0 D: Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=13d3 ProdID=3555 Rev= 0.00 S: Manufacturer=Realtek S: Product=Bluetooth Radio S: SerialNumber=00e04c000001 C:* #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms -Device(2ff8:3051) from /sys/kernel/debug/usb/devices T: Bus=02 Lev=02 Prnt=02 Port=05 Cnt=01 Dev#= 3 Spd=12 MxCh= 0 D: Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=2ff8 ProdID=3051 Rev= 0.00 S: Manufacturer=Realtek S: Product=Bluetooth Radio S: SerialNumber=00e04c000001 C:* #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms Signed-off-by: Max Chou Signed-off-by: Marcel Holtmann commit 2943d8ede38310db932eb38f91aa1094b471058c Author: Daniel Winkler Date: Fri Nov 6 15:20:19 2020 -0800 Bluetooth: Resume advertising after LE connection When an LE connection request is made, advertising is disabled and never resumed. When a client has an active advertisement, this is disruptive. This change adds resume logic for client-configured (non-directed) advertisements after the connection attempt. The patch was tested by registering an advertisement, initiating an LE connection from a remote peer, and verifying that the advertisement is re-activated after the connection is established. This is performed on Hatch and Kukui Chromebooks. Signed-off-by: Daniel Winkler Reviewed-by: Abhishek Pandit-Subedi Signed-off-by: Marcel Holtmann commit f7e0e8b2f1b0a09b527885babda3e912ba820798 Author: Peilin Ye Date: Wed Sep 9 03:17:00 2020 -0400 Bluetooth: Fix slab-out-of-bounds read in hci_le_direct_adv_report_evt() `num_reports` is not being properly checked. A malformed event packet with a large `num_reports` number makes hci_le_direct_adv_report_evt() read out of bounds. Fix it. Cc: stable@vger.kernel.org Fixes: 2f010b55884e ("Bluetooth: Add support for handling LE Direct Advertising Report events") Reported-and-tested-by: syzbot+24ebd650e20bd263ca01@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?extid=24ebd650e20bd263ca01 Signed-off-by: Peilin Ye Signed-off-by: Marcel Holtmann commit 70f259a3f4276b71db365b1d6ff1eab805ea6ec3 Author: Anant Thazhemadam Date: Wed Sep 30 00:28:15 2020 +0530 Bluetooth: hci_h5: close serdev device and free hu in h5_close When h5_close() gets called, the memory allocated for the hu gets freed only if hu->serdev doesn't exist. This leads to a memory leak. So when h5_close() is requested, close the serdev device instance and free the memory allocated to the hu entirely instead. Fixes: https://syzkaller.appspot.com/bug?extid=6ce141c55b2f7aafd1c4 Reported-by: syzbot+6ce141c55b2f7aafd1c4@syzkaller.appspotmail.com Tested-by: syzbot+6ce141c55b2f7aafd1c4@syzkaller.appspotmail.com Signed-off-by: Anant Thazhemadam Signed-off-by: Marcel Holtmann commit 6dfccd13db2ff2b709ef60a50163925d477549aa Author: Anmol Karn Date: Wed Sep 30 19:48:13 2020 +0530 Bluetooth: Fix null pointer dereference in hci_event_packet() AMP_MGR is getting derefernced in hci_phy_link_complete_evt(), when called from hci_event_packet() and there is a possibility, that hcon->amp_mgr may not be found when accessing after initialization of hcon. - net/bluetooth/hci_event.c:4945 The bug seems to get triggered in this line: bredr_hcon = hcon->amp_mgr->l2cap_conn->hcon; Fix it by adding a NULL check for the hcon->amp_mgr before checking the ev-status. Fixes: d5e911928bd8 ("Bluetooth: AMP: Process Physical Link Complete evt") Reported-and-tested-by: syzbot+0bef568258653cff272f@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?extid=0bef568258653cff272f Signed-off-by: Anmol Karn Signed-off-by: Marcel Holtmann commit 547801380ec7e6104ea679f599d03c342b4b39a0 Author: Abhishek Pandit-Subedi Date: Wed Sep 30 13:01:38 2020 -0700 Bluetooth: btqca: Add valid le states quirk WCN3991 supports connectable advertisements so we need to add the valid le states quirk so the 'central-peripheral' role is exposed in userspace. Signed-off-by: Abhishek Pandit-Subedi Signed-off-by: Marcel Holtmann commit 1da81e5562fac8286567422cc56a7fbd0dc646d4 Author: Filip Kokosinski Date: Tue Oct 13 16:46:21 2020 +0200 drivers/tty/serial: add LiteUART driver This commit adds driver for the FPGA-based LiteUART serial controller from LiteX SoC builder. The current implementation supports LiteUART configured for 32 bit data width and 8 bit CSR bus width. It does not support IRQ. Signed-off-by: Filip Kokosinski Signed-off-by: Mateusz Holenko Reviewed-by: Greg Kroah-Hartman Signed-off-by: Stafford Horne commit 79c5ef07d91eee6832bebd98f775a06ed7dd2151 Author: Filip Kokosinski Date: Tue Oct 13 16:46:05 2020 +0200 dt-bindings: serial: document LiteUART bindings Add documentation for LiteUART devicetree bindings. Signed-off-by: Filip Kokosinski Signed-off-by: Mateusz Holenko Reviewed-by: Rob Herring Signed-off-by: Stafford Horne commit 22447a99c97e353bde8f90c2353873f27681d57c Author: Pawel Czarnecki Date: Tue Oct 13 16:45:52 2020 +0200 drivers/soc/litex: add LiteX SoC Controller driver This commit adds driver for the FPGA-based LiteX SoC Controller from LiteX SoC builder. Co-developed-by: Mateusz Holenko Signed-off-by: Mateusz Holenko Signed-off-by: Pawel Czarnecki Signed-off-by: Stafford Horne commit 3399bac5efd62e031e62b042d25ed4984db8b8bf Author: Pawel Czarnecki Date: Tue Oct 13 16:45:40 2020 +0200 dt-bindings: soc: document LiteX SoC Controller bindings Add documentation for LiteX SoC Controller bindings. Signed-off-by: Pawel Czarnecki Signed-off-by: Mateusz Holenko Reviewed-by: Rob Herring Signed-off-by: Stafford Horne commit 4bf9cf0b92dfc1039ccdfac218866ec44127d72a Author: Filip Kokosinski Date: Tue Oct 13 16:45:24 2020 +0200 dt-bindings: vendor: add vendor prefix for LiteX Add vendor prefix for LiteX SoC builder. Signed-off-by: Filip Kokosinski Signed-off-by: Mateusz Holenko Acked-by: Rob Herring Signed-off-by: Stafford Horne commit 2dae0c852940189af35b65895443f9ab05e1b319 Author: Tvrtko Ursulin Date: Thu Nov 5 11:38:42 2020 +0000 drm/i915: Use ABI engine class in error state ecode Instead of printing out the internal engine mask, which can change between kernel versions making it difficult to map to actual engines, present a bitmask of hanging engines ABI classes. For example: [drm] GPU HANG: ecode 9:8:24dffffd, in gem_exec_schedu [1334] Engine ABI class is useful to quickly categorize render vs media etc hangs in bug reports. Considering virtual engine even more so than the current scheme. v2: * Do not re-order fields. (Chris) Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20201105113842.1395391-1-tvrtko.ursulin@linux.intel.com commit bda3002485a3dcf975b4ecf3fab9dd53f228db6d Author: Tvrtko Ursulin Date: Wed Nov 4 13:47:42 2020 +0000 drm/i915: Improve record of hung engines in error state Between events which trigger engine and GPU resets and capturing the error state we lose information on which engine triggered the reset. Improve this by passing in the hung engine mask down to error capture. Result is that the list of engines in user visible "GPU HANG: ecode ::, " is now a list of hanging and not just active engines. Most importantly the displayed process is now the one which was actually hung. v2: * Stub prototype. (Chris) Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20201104134743.916027-1-tvrtko.ursulin@linux.intel.com commit 0e15ca5fe2240e9f1e4c408a29505b60dbdfaddd Author: Barry Song Date: Wed Oct 28 10:52:52 2020 +1300 dmaengine: pxa_dma: remove redundant irqsave and irqrestore in hardIRQ Running in hardIRQ, disabling IRQ is redundant since hardIRQ has disabled IRQ. This patch removes the irqsave and irqstore to save some instruction cycles. Signed-off-by: Barry Song Acked-by: Robert Jarzmik Cc: Daniel Mack Cc: Haojian Zhuang Link: https://lore.kernel.org/r/20201027215252.25820-11-song.bao.hua@hisilicon.com Signed-off-by: Vinod Koul commit 618a8e383bbdf9ce5a252797046dda694bf40389 Author: Barry Song Date: Wed Oct 28 10:52:51 2020 +1300 dmaengine: ste_dma40: remove redundant irqsave and irqrestore in hardIRQ Running in hardIRQ, disabling IRQ is redundant since hardIRQ has disabled IRQ. This patch removes the irqsave and irqstore to save some instruction cycles. Signed-off-by: Barry Song Reviewed-by: Linus Walleij Cc: Linus Walleij Link: https://lore.kernel.org/r/20201027215252.25820-10-song.bao.hua@hisilicon.com Signed-off-by: Vinod Koul commit 8c94b83e0c370e72c131f5da8cb19c2cb858a1bf Author: Barry Song Date: Wed Oct 28 10:52:50 2020 +1300 dmaengine: moxart-dma: remove redundant irqsave and irqrestore in hardIRQ Running in hardIRQ, disabling IRQ is redundant since hardIRQ has disabled IRQ. This patch removes the irqsave and irqstore to save some instruction cycles. Signed-off-by: Barry Song Link: https://lore.kernel.org/r/20201027215252.25820-9-song.bao.hua@hisilicon.com Signed-off-by: Vinod Koul commit d9c8d4b278d167bf7cba83ec6fc15a0a17dfc407 Author: Barry Song Date: Wed Oct 28 10:52:49 2020 +1300 dmaengine: hisi_dma: remove redundant irqsave and irqrestore in hardIRQ Running in hardIRQ, disabling IRQ is redundant since hardIRQ has disabled IRQ. This patch removes the irqsave and irqstore to save some instruction cycles. Signed-off-by: Barry Song Acked-by: Zhou Wang Link: https://lore.kernel.org/r/20201027215252.25820-8-song.bao.hua@hisilicon.com Signed-off-by: Vinod Koul commit 1ff206561920c9998058e52ea465347d4944b635 Author: Barry Song Date: Wed Oct 28 10:52:48 2020 +1300 dmaengine: k3dma: remove redundant irqsave and irqrestore in hardIRQ Running in hardIRQ, disabling IRQ is redundant since hardIRQ has disabled IRQ. This patch removes the irqsave and irqstore to save some instruction cycles. Signed-off-by: Barry Song Link: https://lore.kernel.org/r/20201027215252.25820-7-song.bao.hua@hisilicon.com Signed-off-by: Vinod Koul commit 280e7f90d4520682d0a18b33fa43fd8cccab3439 Author: Barry Song Date: Wed Oct 28 10:52:47 2020 +1300 dmaengine: milbeaut-xdmac: remove redundant irqsave and irqrestore in hardIRQ Running in hardIRQ, disabling IRQ is redundant since hardIRQ has disabled IRQ. This patch removes the irqsave and irqstore to save some instruction cycles. Signed-off-by: Barry Song Link: https://lore.kernel.org/r/20201027215252.25820-6-song.bao.hua@hisilicon.com Signed-off-by: Vinod Koul commit 654115e3f62671a6b8bcee702697dbdfc6fce1a3 Author: Barry Song Date: Wed Oct 28 10:52:46 2020 +1300 dmaengine: tegra210-adma: remove redundant irqsave and irqrestore in hardIRQ Running in hardIRQ, disabling IRQ is redundant since hardIRQ has disabled IRQ. This patch removes the irqsave and irqstore to save some instruction cycles. Signed-off-by: Barry Song Acked-by: Jon Hunter Cc: Laxman Dewangan Cc: Thierry Reding Link: https://lore.kernel.org/r/20201027215252.25820-5-song.bao.hua@hisilicon.com Signed-off-by: Vinod Koul commit 302b3b38236a70bffb13f3a90a52bd630841aa90 Author: Barry Song Date: Wed Oct 28 10:52:45 2020 +1300 dmaengine: sf-pdma: remove redundant irqsave and irqrestore in hardIRQ Running in hardIRQ, disabling IRQ is redundant since hardIRQ has disabled IRQ. This patch removes the irqsave and irqstore to save some instruction cycles. Signed-off-by: Barry Song Cc: Green Wan Link: https://lore.kernel.org/r/20201027215252.25820-4-song.bao.hua@hisilicon.com Signed-off-by: Vinod Koul commit e991c06ed714c64d3d79696513370f894a4ab751 Author: Barry Song Date: Wed Oct 28 10:52:44 2020 +1300 dmaengine: ti: k3-udma: remove redundant irqsave and irqrestore in hardIRQ Running in hardIRQ, disabling IRQ is redundant since hardIRQ has disabled IRQ. This patch removes the irqsave and irqstore to save some instruction cycles. Signed-off-by: Barry Song Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20201027215252.25820-3-song.bao.hua@hisilicon.com Signed-off-by: Vinod Koul commit f3b1024908ec02d7af4d01a2659901828844bdd2 Author: Barry Song Date: Wed Oct 28 10:52:43 2020 +1300 dmaengine: ipu_idmac: remove redundant irqsave and restore in hardIRQ Running in hardIRQ, disabling IRQ is redundant since hardIRQ has disabled IRQ. This patch removes the irqsave and irqstore to save some instruction cycles. Signed-off-by: Barry Song Link: https://lore.kernel.org/r/20201027215252.25820-2-song.bao.hua@hisilicon.com Signed-off-by: Vinod Koul commit 20f67902824f04bc9a319814d5872c8ff6a74559 Author: Dan Carpenter Date: Tue Nov 3 13:17:35 2020 +0300 platform/x86: dell-wmi-sysman: fix init_bios_attributes() error handling Calling release_attributes_data() while holding the "wmi_priv.mutex" will lead to a dead lock. The other problem is that if kzalloc() fails then this should return -ENOMEM but currently it returns success. Fixes: e8a60aa7404b ("platform/x86: Introduce support for Systems Management Driver over WMI for Dell Systems") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20201103101735.GB1127762@mwanda Signed-off-by: Hans de Goede commit 69973b4895b35a67409c8ce1c3d62090470ef47b Author: Grygorii Strashko Date: Fri Oct 30 22:30:00 2020 +0200 dmaengine: ti: k3-udma-glue: move psi-l pairing in channel en/dis functions The NAVSS UDMA will stuck if target IP module is disabled by PM while PSI-L threads are paired UDMA<->IP and no further transfers is possible. This could be the case for IPs J721E Main CPSW (cpsw9g). Hence, to avoid such situation do PSI-L threads pairing only when UDMA channel is going to be enabled as at this time DMA consumer module expected to be active already. Signed-off-by: Grygorii Strashko Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20201030203000.4281-1-grygorii.strashko@ti.com Signed-off-by: Vinod Koul commit 6349753276a657b423460b93c2f511c73bb0a118 Author: Andy Shevchenko Date: Wed Nov 4 12:31:31 2020 +0200 dmaengine: idma64: Switch to use __maybe_unused instead of ifdeffery ifdeffery is prone to errors and makes code harder to read. Switch to use __maybe_unused instead of ifdeffery. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201104103131.89907-1-andriy.shevchenko@linux.intel.com Signed-off-by: Vinod Koul commit 842067940a3e3fc008a60fee388e000219b32632 Author: Andy Shevchenko Date: Tue Nov 3 20:39:38 2020 +0200 dmaengine: dw: Enable runtime PM When consumer requests channel power on the DMA controller device and otherwise on the freeing channel resources. Note, in some cases consumer acquires channel at the ->probe() stage and releases it at the ->remove() stage. It will mean that DMA controller device will be powered during all this time if there is no assist from hardware to idle it. The above mentioned cases should be investigated separately and individually. Signed-off-by: Andy Shevchenko Acked-by: Viresh Kumar Link: https://lore.kernel.org/r/20201103183938.64752-1-andriy.shevchenko@linux.intel.com Signed-off-by: Vinod Koul commit 2f8417a967d571bf8fb81cba95d7acf508ed334f Author: Dave Jiang Date: Fri Oct 30 08:51:56 2020 -0700 dmaengine: idxd: define table offset multiplier Convert table offset multiplier magic number to a define. Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/160407311690.839435.6941865731867828234.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 5a71270197f39ff3e526cf130bc5d6e84db8f2d7 Author: Dave Jiang Date: Fri Oct 30 08:49:06 2020 -0700 dmaengine: idxd: Update calculation of group offset to be more readable Create helper macros to make group offset calculation more readable. Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/160407294683.839093.10740868559754142070.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 220989d37c47ada2554905e388afbd88a7cbe8fb Merge: 23a881852f3ef 56a7ff75cd089 Author: Rafael J. Wysocki Date: Mon Nov 9 11:48:11 2020 +0100 Merge back cpufreq updates for v5.11. commit c5f883d1a6f3f061eb5d1acbbe2f3cbbe985f6a3 Author: Geert Uytterhoeven Date: Tue Nov 3 09:41:36 2020 +0100 ARM: shmobile: defconfig: Refresh for v5.10-rc1 Refresh the defconfig for Renesas ARM systems: - Reorder SoC-specific config options (cfr. commit 6d5aded8d57fc032 ("soc: renesas: Sort driver description title")). Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201103084136.1378875-1-geert+renesas@glider.be commit 274335f1c557fe6f714b0b3369f6c466b38485c8 Author: Maximilian Luz Date: Wed Oct 28 11:54:27 2020 +0100 platform/surface: Add Driver to set up lid GPEs on MS Surface device Conventionally, wake-up events for a specific device, in our case the lid device, are managed via the ACPI _PRW field. While this does not seem strictly necessary based on ACPI spec, the kernel disables GPE wakeups to avoid non-wakeup interrupts preventing suspend by default and only enables GPEs associated via the _PRW field with a wake-up capable device. This behavior has been introduced in commit f941d3e41da7 ("ACPI: EC / PM: Disable non-wakeup GPEs for suspend-to-idle") and is described in more detail in its commit message. Unfortunately, on MS Surface devices, there is no _PRW field present on the lid device, thus no GPE is associated with it, and therefore the GPE responsible for sending the status-change notification to the lid gets disabled during suspend, making it impossible to wake the device via the lid. This patch introduces a pseudo-device and respective driver which, based on some DMI matching, marks the corresponding GPE of the lid device for wake and enables it during suspend. The behavior of this driver models the behavior of the ACPI/PM core for normal wakeup GPEs, properly declared via the _PRW field. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20201028105427.1593764-1-luzmaximilian@gmail.com Signed-off-by: Hans de Goede commit 91de32fe6d7aeb80ae7dd5c50bebeb2b92b3a0df Merge: 83f7a38ecd335 5ef9998c96b0c Author: Hans de Goede Date: Mon Nov 9 11:39:01 2020 +0100 Merge tag 'ib-mfd-x86-v5.11' into review-hans Immutable branch between MFD and x86 due for the v5.11 merge window commit 43cb5a7c61186cde6eba344c43489b9cf95c68f8 Author: Harald Freudenberger Date: Tue Sep 1 12:48:14 2020 +0200 s390/zcrypt/pkey: introduce zcrypt_wait_api_operational() function The zcrypt api provides a new function to wait until the zcrypt api is operational: int zcrypt_wait_api_operational(void); The AP bus scan and the binding of ap devices to device drivers is an asynchronous job. This function waits until these initial jobs are done and so the zcrypt api should be ready to serve crypto requests - if there are resources available. The function uses an internal timeout of 60s. The very first caller will either wait for ap bus bindings complete or the timeout happens. This state will be remembered for further callers which will only be blocked until a decision is made (timeout or bindings complete). Reviewed-by: Ingo Franzki Signed-off-by: Harald Freudenberger Signed-off-by: Heiko Carstens commit 837cd1059a985ee610e4b72dcdddb287e7b97de0 Author: Harald Freudenberger Date: Mon Aug 31 10:16:26 2020 +0200 s390/ap: ap bus userspace notifications for some bus conditions This patch adds notifications to userspace for two important conditions of the ap bus: I) Initial ap bus scan done. This indicates that the initial scan of all the ap devices (cards, queues) is complete and ap devices have been build up for all the hardware found. This condition is signaled with 1) An ap bus change uevent send to userspace with an environment key/value pair "INITSCAN=done": # udevadm monitor -k -p ... KERNEL[97.830919] change /devices/ap (ap) ACTION=change DEVPATH=/devices/ap SUBSYSTEM=ap INITSCAN=done SEQNUM=10421 2) A sysfs attribute /sys/bus/ap/scans which shows the number of completed ap bus scans done since bus init. So a value of 1 or greater signals that the initial ap bus scan is complete. Note: The initial ap bus scan complete condition is fulfilled and will be signaled even if there was no ap resource found. II) APQN driver bindings complete. This indicates that all APQNs have been bound to an zcrypt or alternate device driver. Only with the help of an device driver an APQN can be used for crypto load. So the binding complete condition is the starting point for user space to be sure all crypto resources on the ap bus are available for use. This condition is signaled with 1) An ap bus change uevent send to userspace with an environment key/value pair "BINDINGS=complete": # udevadm monitor -k -p ... KERNEL[97.830975] change /devices/ap (ap) ACTION=change DEVPATH=/devices/ap SUBSYSTEM=ap BINDINGS=complete SEQNUM=10422 2) A sysfs attribute /sys/bus/ap/bindings showing "/ (complete)" when all available apqns have been bound to device drivers, or "/" when there are some apqns not bound to an device driver. Note: The binding complete condition is also fulfilled, when there are no apqns available to bind any device driver. In this case the binding complete will be signaled AFTER init scan is done. Note: This condition may arise multiple times when after initial scan modifications on the bindings take place. For example a manual unbind of an APQN switches the binding complete condition off. When at a later time the unbound APQNs are bound with an device driver the binding is (again) complete resulting in another uevent and marking the bindings sysfs attribute with '(complete)'. There is also a new function to be used within the kernel: int ap_wait_init_apqn_bindings_complete(unsigned long timeout) Interface to wait for the AP bus to have done one initial ap bus scan and all detected APQNs have been bound to device drivers. If these both conditions are not fulfilled, this function blocks on a condition with wait_for_completion_interruptible_timeout(). If these both conditions are fulfilled (before the timeout hits) the return value is 0. If the timeout (in jiffies) hits instead -ETIME is returned. On failures negative return values are returned to the caller. Please note that further unbind/bind actions after initial binding complete is through do not cause this function to block again. Reviewed-by: Ingo Franzki Signed-off-by: Harald Freudenberger Signed-off-by: Heiko Carstens commit d041315ef75cf52df19613f56a2da2c5911c163c Author: Christian Borntraeger Date: Tue Sep 29 10:03:51 2020 +0200 s390/trng: set quality to 1024 The s390-trng does provide 100% entropy. The quality value is supported to be between 1 and 1024 and not 1..1000. Use 1024 to make this driver the preferred one. If we ever have a better driver that has the same quality but is faster we can change this again when merging the new driver. No need to be conservative. This makes sure that the hw variant is preferred over things like virtio-rng, where the hypervisor has a potential to be misconfigured and thus should have a slightly lower confidence. Cc: Harald Freudenberger Signed-off-by: Christian Borntraeger Signed-off-by: Heiko Carstens commit a67a88b0b8de16b4cd6ad50bfe0e03605904dc75 Author: Daniel Vetter Date: Wed Oct 21 10:56:47 2020 +0200 s390/pci: remove races against pte updates Way back it was a reasonable assumptions that iomem mappings never change the pfn range they point at. But this has changed: - gpu drivers dynamically manage their memory nowadays, invalidating ptes with unmap_mapping_range when buffers get moved - contiguous dma allocations have moved from dedicated carvetouts to cma regions. This means if we miss the unmap the pfn might contain pagecache or anon memory (well anything allocated with GFP_MOVEABLE) - even /dev/mem now invalidates mappings when the kernel requests that iomem region when CONFIG_IO_STRICT_DEVMEM is set, see commit 3234ac664a87 ("/dev/mem: Revoke mappings when a driver claims the region") Accessing pfns obtained from ptes without holding all the locks is therefore no longer a good idea. Fix this. Since zpci_memcpy_from|toio seems to not do anything nefarious with locks we just need to open code get_pfn and follow_pfn and make sure we drop the locks only after we're done. The write function also needs the copy_from_user move, since we can't take userspace faults while holding the mmap sem. Reviewed-by: Gerald Schaefer Signed-off-by: Daniel Vetter Cc: Jason Gunthorpe Cc: Dan Williams Cc: Kees Cook Cc: Andrew Morton Cc: John Hubbard Cc: Jérôme Glisse Cc: Jan Kara Cc: linux-mm@kvack.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Cc: linux-media@vger.kernel.org Cc: Gerald Schaefer Cc: linux-s390@vger.kernel.org Cc: Niklas Schnelle Signed-off-by: Daniel Vetter Signed-off-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit d7e7fbba67a32a32c3c7fe1ee6fccef93a0a8cc5 Author: Vasily Gorbik Date: Fri Oct 9 17:14:02 2020 +0200 s390/early: rewrite program parameter setup in C And move it earlier in the decompressor. Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit 0c4ec024a481774df98910c79a4b3a105d1bb996 Author: Vasily Gorbik Date: Mon Oct 5 13:53:36 2020 +0200 s390/kasan: move memory needs estimation into a function Also correct rounding downs in estimation calculations. Reviewed-by: Alexander Egorenkov Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit e385b550faf356db47234083c53e9841e8ec05c5 Author: Vasily Gorbik Date: Mon Oct 5 09:07:43 2020 +0200 s390/kasan: make kasan header self-contained It is relying on _REGION1_SHIFT / _REGION2_SHIFT values which come from asm/pgtable.h, so include it. Reviewed-by: Alexander Egorenkov Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit 54b52981bb39ec3f33dc3677583b2ea30772b292 Author: Vasily Gorbik Date: Mon Oct 5 10:28:48 2020 +0200 s390/kasan: remove obvious parameter with the only possible value Kasan early code is only working on init_mm, remove unneeded pgd parameter from kasan_copy_shadow and rename it to kasan_copy_shadow_mapping. Reviewed-by: Alexander Egorenkov Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit 92bca2fe61f5dbb23d9466d70b8fa3f2ad263ba8 Author: Vasily Gorbik Date: Mon Oct 5 09:13:15 2020 +0200 s390/kasan: avoid confusing naming Kasan has nothing to do with vmemmap, strip vmemmap from function names to avoid confusing people. Reviewed-by: Alexander Egorenkov Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit 39f2899b9872d02ec178568a9acfe90804d7fd70 Author: Vasily Gorbik Date: Sat Oct 17 15:55:10 2020 +0200 s390/decompressor: fix build warning Fixes the following warning with CONFIG_KERNEL_UNCOMPRESSED=y arch/s390/boot/compressed/decompressor.h:6:46: warning: non-void function does not return a value [-Wreturn-type] static inline void *decompress_kernel(void) {} ^ Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit 90178c1900798633dd0c83ab693254b8705177c5 Author: Heiko Carstens Date: Fri Sep 18 12:25:37 2020 +0200 s390/mm: let vmalloc area size depend on physical memory size To make sure that the vmalloc area size is for almost all cases large enough let it depend on the (potential) physical memory size. There is still the possibility to override this with the vmalloc kernel command line parameter. Reviewed-by: Christian Borntraeger Reviewed-by: Claudio Imbrenda Reviewed-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit fc67c880e32a85786ad32129faa880f57bb6de41 Author: Heiko Carstens Date: Fri Sep 18 12:25:36 2020 +0200 s390/mm: extend default vmalloc area size to 512GB We've seen several occurences in the past where the default vmalloc size of 128GB is not sufficient. Therefore extend the default size. Reviewed-by: Claudio Imbrenda Reviewed-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit 97b142b7400bdce93aa674df044a4bc58e88f08c Author: Vasily Gorbik Date: Thu Oct 15 10:20:08 2020 +0200 s390: make sure vmemmap is top region table entry aligned Since commit 29d37e5b82f3 ("s390/protvirt: add ultravisor initialization") vmax is adjusted to the ultravisor secure storage limit. This limit is currently applied when 4-level paging is used. Later vmax is also used to align vmemmap address to the top region table entry border. When vmax is set to the ultravisor secure storage limit this is no longer the case. Instead of changing vmax, make only MODULES_END be affected by the secure storage limit, so that vmax stays intact for further vmemmap address alignment. Reviewed-by: Alexander Gordeev Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit a3453d923ece6760689894bad5b6d5e00c0ffe2d Author: Vasily Gorbik Date: Thu Oct 15 10:01:42 2020 +0200 s390/kasan: remove 3-level paging support Compiling the kernel with Kasan disables automatic 3-level vs 4-level kernel space paging selection, because the shadow memory offset has to be known at compile time and there is no such offset which would be acceptable for both 3 and 4-level paging. Instead S390_4_LEVEL_PAGING option was introduced which allowed to pick how many paging levels to use under Kasan. With the introduction of protected virtualization, kernel memory layout may be affected due to ultravisor secure storage limit. This adds additional complexity into how memory layout would look like in combination with Kasan predefined shadow memory offsets. To simplify this make Kasan 4-level paging default and remove Kasan 3-level paging support. Suggested-by: Heiko Carstens Reviewed-by: Alexander Gordeev Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit f38b0a743904cc785f5ba0d65dd1f60e17e80387 Author: Vasily Gorbik Date: Thu Sep 24 17:12:08 2020 +0200 s390: remove unused s390_base_ext_handler s390_base_ext_handler_fn haven't been used since its introduction in commit ab14de6c37fa ("[S390] Convert memory detection into C code."). s390_base_ext_handler itself is currently falsely storing 16 registers at __LC_SAVE_AREA_ASYNC rewriting several following lowcore values: cpu_flags, return_psw, return_mcck_psw, sync_enter_timer and async_enter_timer. Besides that s390_base_ext_handler itself is only potentially hiding EXT interrupts which should not have happen in the first place. Any piece of code which requires EXT interrupts before fully functional ext_int_handler is enabled has to do it on its own, like this is done by sclp_early_cmd() which is doing EXT interrupts handling synchronously in sclp_early_wait_irq(). With s390_base_ext_handler removed unexpected EXT interrupt leads to disabled wait with the address 0x1b0 (__LC_EXT_NEW_PSW), which is currently setup in the decompressor. Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit 85cde0192a983b227341be11af2c3625d39bc374 Author: Vasily Gorbik Date: Tue Oct 13 22:35:27 2020 +0200 s390/udelay: make it work for the early code Currently udelay relies on working EXT interrupts handler, which is not the case during early startup. In such cases udelay_simple() has to be used instead. To avoid mistakes of calling udelay too early, which could happen from the common code as well - make udelay work for the early code by introducing static branch and redirecting all udelay calls to udelay_simple until EXT interrupts handler is fully initialized and async stack is allocated. Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit 13b5bd8af41ca56fd11cc0281f2a1201d8342233 Author: Vasily Gorbik Date: Tue Oct 13 16:19:37 2020 +0200 s390/head: set io/ext handlers to disabled wait Set io/ext handlers to disabled wait in the initial lowcore, so that they are effective right from the kernel start, when a boot method used does not rewrite this part of the lowcore for its own needs (i.e. kexec, z/vm ipl reader boot, qemu direct boot, load from removable media or server). When the kernel is loaded by zipl, scsi loader or qemu loader, some or all of the io/ext/pgm handlers addresses might be rewritten. Rewrite them to initial values again as early as possible. Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit 2c736bb4087f2cb949cbbaf4148733131b8466dc Merge: ae73ad0527075 aaac3733171fc Author: Russell King Date: Mon Nov 9 10:19:56 2020 +0000 Merge tag 'arm-adrl-replacement-for-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux into devel-stable Tidy up open coded relative references in asm Use the newly introduced adr_l/ldr_l/str_l/mov_l assembler macros to replace open coded VA-to-PA arithmetic in various places in the code. This avoids the use of literals on v7+ CPUs, reduces the footprint of the code in most cases, and generally makes the code easier to follow. Series was posted here, and reviewed by Nicolas Pitre: https://lore.kernel.org/linux-arm-kernel/20200914095706.3985-1-ardb@kernel.org/ commit ae73ad0527075a39122e5374504e1137c2e2d14f Merge: 3650b228f83ad 9443076e4330a Author: Russell King Date: Mon Nov 9 10:19:25 2020 +0000 Merge tag 'arm-p2v-for-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux into devel-stable Implement the necessary changes in the ARM assembler boot code to permit the relative alignment of the physical and the virtual addresses of the kernel to be as little as 2 MiB, as opposed to the minimum of 16 MiB we support today. Series was posted here, and reviewed by Nicolas Pitre and Linus Walleij: https://lore.kernel.org/linux-arm-kernel/20200921154117.757-1-ardb@kernel.org/ commit 9b085d6e889076928d307f05cabf76e35db1e63b Merge: 441494ec2a302 f8394f232b1ea Author: Greg Kroah-Hartman Date: Mon Nov 9 10:37:10 2020 +0100 Merge 5.10-rc3 into tty-next We need the TTY/vt/serial fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 57cde551225bb09fa40ca3938e06d59fc529ff90 Merge: 9e39aef3a105d f8394f232b1ea Author: Greg Kroah-Hartman Date: Mon Nov 9 10:35:13 2020 +0100 Merge 5.10-rc3 into usb-next We need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit b7a2657e770881b1243a77672f828cd920031bac Author: Thomas Zimmermann Date: Fri Nov 6 13:42:24 2020 +0100 drm/gma500: Remove unused function psb_gem_get_aperture() Apparently, the function was never used at all. Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201106124224.21201-1-tzimmermann@suse.de commit a39855076c859b7f6c58ed4da8f195a2a6cd3c7b Author: Thomas Zimmermann Date: Fri Nov 6 14:16:32 2020 +0100 drm/cma-helper: Make default object functions the default As GEM object functions are now mandatory, DRM drivers based on CMA helpers either set them in their implementation of gem_create_object, or use the default via drm_gem_cma_create_object_default_funcs(). Simplify this by setting the default CMA object functions for all objects that don't have any functions of their own. Follows the pattern of similar code in SHMEM and VRAM helpers. The function drm_gem_cma_create_object_default_funcs() is redundant and therefore being removed. Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201106131632.6796-1-tzimmermann@suse.de commit 222ec45f4c69dfa8cd02c72928147ac06dffffa2 Author: Thomas Zimmermann Date: Tue Nov 3 10:30:15 2020 +0100 drm/fb_helper: Support framebuffers in I/O memory At least sparc64 requires I/O-specific access to framebuffers. This patch updates the fbdev console accordingly. For drivers with direct access to the framebuffer memory, the callback functions in struct fb_ops test for the type of memory and call the rsp fb_sys_ of fb_cfb_ functions. Read and write operations are implemented internally by DRM's fbdev helper. For drivers that employ a shadow buffer, fbdev's blit function retrieves the framebuffer address as struct dma_buf_map, and uses dma_buf_map interfaces to access the buffer. The bochs driver on sparc64 uses a workaround to flag the framebuffer as I/O memory and avoid a HW exception. With the introduction of struct dma_buf_map, this is not required any longer. The patch removes the rsp code from both, bochs and fbdev. v7: * use min_t(size_t,) (kernel test robot) * return the number of bytes read/written, if any (fbdev testcase) v5: * implement fb_read/fb_write internally (Daniel, Sam) v4: * move dma_buf_map changes into separate patch (Daniel) * TODO list: comment on fbdev updates (Daniel) Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Reviewed-by: Sam Ravnborg Tested-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201103093015.1063-11-tzimmermann@suse.de commit b4e7090c242ec64bfa77a69ea7c3cceba21c7a65 Author: Thomas Zimmermann Date: Tue Nov 3 10:30:14 2020 +0100 dma-buf-map: Add memcpy and pointer-increment interfaces To do framebuffer updates, one needs memcpy from system memory and a pointer-increment function. Add both interfaces with documentation. v5: * include to build on sparc64 (Sam) Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Tested-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201103093015.1063-10-tzimmermann@suse.de commit a85955568939e20e573cf42095d90c8476c9cec1 Author: Thomas Zimmermann Date: Tue Nov 3 10:30:13 2020 +0100 drm/gem: Store client buffer mappings as struct dma_buf_map Kernel DRM clients now store their framebuffer address in an instance of struct dma_buf_map. Depending on the buffer's location, the address refers to system or I/O memory. Callers of drm_client_buffer_vmap() receive a copy of the value in the call's supplied arguments. It can be accessed and modified with dma_buf_map interfaces. v6: * don't call page_to_phys() on framebuffers in I/O memory; warn instead (Daniel) Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Tested-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201103093015.1063-9-tzimmermann@suse.de commit a745fb1c26d3802caad532a4675f43a661f01fa6 Author: Thomas Zimmermann Date: Tue Nov 3 10:30:12 2020 +0100 drm/gem: Update internal GEM vmap/vunmap interfaces to use struct dma_buf_map GEM's vmap and vunmap interfaces now wrap memory pointers in struct dma_buf_map. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Tested-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201103093015.1063-8-tzimmermann@suse.de commit 49a3f51dfeeecb52c5aa28c5cb9592fe5e39bf95 Author: Thomas Zimmermann Date: Tue Nov 3 10:30:11 2020 +0100 drm/gem: Use struct dma_buf_map in GEM vmap ops and convert GEM backends This patch replaces the vmap/vunmap's use of raw pointers in GEM object functions with instances of struct dma_buf_map. GEM backends are converted as well. For most of them, this simply changes the returned type. TTM-based drivers now return information about the location of the memory, either system or I/O memory. GEM VRAM helpers and qxl now use ttm_bo_vmap() et al. Amdgpu, nouveau and radeon use drm_gem_ttm_vmap() et al instead of implementing their own vmap callbacks. v7: * init QXL cursor to mapped BO buffer (kernel test robot) v5: * update vkms after switch to shmem v4: * use ttm_bo_vmap(), drm_gem_ttm_vmap(), et al. (Daniel, Christian) * fix a trailing { in drm_gem_vmap() * remove several empty functions instead of converting them (Daniel) * comment uses of raw pointers with a TODO (Daniel) * TODO list: convert more helpers to use struct dma_buf_map Signed-off-by: Thomas Zimmermann Acked-by: Christian König Tested-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201103093015.1063-7-tzimmermann@suse.de commit 43676605f890b218e551f396a55dbaea7799acb4 Author: Thomas Zimmermann Date: Tue Nov 3 10:30:10 2020 +0100 drm/ttm: Add vmap/vunmap to TTM and TTM GEM helpers The new functions ttm_bo_{vmap,vunmap}() map and unmap a TTM BO in kernel address space. The mapping's address is returned as struct dma_buf_map. Each function is a simplified version of TTM's existing kmap code. Both functions respect the memory's location ani/or writecombine flags. On top TTM's functions, GEM TTM helpers got drm_gem_ttm_{vmap,vunmap}(), two helpers that convert a GEM object into the TTM BO and forward the call to TTM's vmap/vunmap. These helpers can be dropped into the rsp GEM object callbacks. v5: * use size_t for storing mapping size (Christian) * ignore premapped memory areas correctly in ttm_bo_vunmap() * rebase onto latest TTM interfaces (Christian) * remove BUG() from ttm_bo_vmap() (Christian) v4: * drop ttm_kmap_obj_to_dma_buf() in favor of vmap helpers (Daniel, Christian) Signed-off-by: Thomas Zimmermann Reviewed-by: Christian König Acked-by: Daniel Vetter Tested-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201103093015.1063-6-tzimmermann@suse.de commit f216fcb8e4d76038133926aec53df92bf6b15860 Author: Thomas Zimmermann Date: Tue Nov 3 10:30:09 2020 +0100 drm/exynos: Remove empty exynos_drm_gem_prime_{vmap,vunmap}() The functions exynos_drm_gem_prime_{vmap,vunmap}() are empty. Remove them before changing the interface to use struct drm_buf_map. As a side effect of removing drm_gem_prime_vmap(), the error code changes from ENOMEM to EOPNOTSUPP. Signed-off-by: Thomas Zimmermann Acked-by: Christian König Tested-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201103093015.1063-5-tzimmermann@suse.de commit 1fc90559fdd5e1be698ad1427709a371c7003a65 Author: Thomas Zimmermann Date: Tue Nov 3 10:30:08 2020 +0100 drm/etnaviv: Remove empty etnaviv_gem_prime_vunmap() The function etnaviv_gem_prime_vunmap() is empty. Remove it before changing the interface to use struct drm_buf_map. Signed-off-by: Thomas Zimmermann Acked-by: Christian König Tested-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201103093015.1063-4-tzimmermann@suse.de commit 823efa922102b0ad369840c9a619104b60690e49 Author: Thomas Zimmermann Date: Tue Nov 3 10:30:07 2020 +0100 drm/cma-helper: Remove empty drm_gem_cma_prime_vunmap() The function drm_gem_cma_prime_vunmap() is empty. Remove it before changing the interface to use struct drm_buf_map. Signed-off-by: Thomas Zimmermann Reviewed-by: Christian König Tested-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201103093015.1063-3-tzimmermann@suse.de commit 1086db71a1dbbfb32ffb42cf0d540b69956f951e Author: Thomas Zimmermann Date: Tue Nov 3 10:30:06 2020 +0100 drm/vram-helper: Remove invariant parameters from internal kmap function The parameters map and is_iomem are always of the same value. Removed them to prepares the function for conversion to struct dma_buf_map. v4: * don't check for !kmap->virtual; will always be false Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Reviewed-by: Christian König Tested-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201103093015.1063-2-tzimmermann@suse.de commit 3fb91f56aea4608adebf7798788ac98b42a13838 Author: Thomas Zimmermann Date: Tue Nov 3 12:34:56 2020 +0100 drm/udl: Retrieve USB device from struct drm_device.dev Drop the driver's udev field in favor of struct drm_device.dev. No functional changes made. v3: * upcast dev with udl_to_usb_device() v2: * upcast dev with drm_dev_get_usb_device() Signed-off-by: Thomas Zimmermann Reviewed-by: Hans de Goede Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201103113456.3066-3-tzimmermann@suse.de commit 0454bc59be9e988422793f55a089ee4e86f11f25 Author: Thomas Zimmermann Date: Tue Nov 3 12:34:55 2020 +0100 drm/tiny/gm12u320: Retrieve USB device from struct drm_device.dev Drop the driver's udev field in favor of struct drm_device.dev. No functional changes made. v3: * upcast dev with gm12u320_to_usb_device() v2: * upcast dev with drm_dev_get_usb_device() Signed-off-by: Thomas Zimmermann Reviewed-by: Hans de Goede Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201103113456.3066-2-tzimmermann@suse.de commit 2d26123dd9075df82f217364f585a3a6aab5412d Author: KuoHsiang Chou Date: Thu Nov 5 17:47:29 2020 +0800 drm/ast: Fixed 1920x1080 sync. polarity issue [Bug] Change the vertical synchroous polary of 1920x1080 @60Hz from Negtive to Positive Signed-off-by: KuoHsiang Chou Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20201105094729.106059-1-kuohsiang_chou@aspeedtech.com commit fa5226e5dd8076d32ebddf18d31c5a9fbabb35de Author: Alex Shi Date: Sun Nov 8 16:01:59 2020 +0800 video: fbdev: riva: remove some unused varibles Couple of variables are actually useless, remove them to save some gcc warning: drivers/video/fbdev/riva/riva_hw.c:250:21: warning: variable ‘mlwm’ set but not used [-Wunused-but-set-variable] drivers/video/fbdev/riva/riva_hw.c:665:15: warning: variable ‘vraw’ set but not used [-Wunused-but-set-variable] drivers/video/fbdev/riva/riva_hw.c:665:9: warning: variable ‘craw’ set but not used [-Wunused-but-set-variable] drivers/video/fbdev/riva/riva_hw.c:659:73: warning: variable ‘align’ set but not used [-Wunused-but-set-variable] drivers/video/fbdev/riva/riva_hw.c:659:50: warning: variable ‘color_key_enable’ set but not used [-Wunused-but-set-variable] Signed-off-by: Alex Shi Cc: Antonino Daplas Cc: linux-fbdev@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/1604822519-65607-1-git-send-email-alex.shi@linux.alibaba.com commit ab6fd5d44aa21ede9e566f89132f7bdda7f33093 Author: Stephen Boyd Date: Fri Nov 6 10:23:33 2020 -0800 drm/panel: simple: Add flags to boe_nv133fhm_n61 Reading the EDID of this panel shows that these flags should be set. Set them so that we match what is in the EDID. Cc: Douglas Anderson Cc: Bjorn Andersson Fixes: b0c664cc80e8 ("panel: simple: Add BOE NV133FHM-N61") Signed-off-by: Stephen Boyd Reviewed-by: Douglas Anderson Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201106182333.3080124-1-swboyd@chromium.org commit 45353186575d97a4cd35a429c0e4ec195376f4ed Author: Lee Jones Date: Sun Nov 8 22:34:17 2020 -0800 Input: cyttsp4 - move 'cyttsp4_tch_abs_string' to the only file that references it Fixes the following W=1 kernel build warning(s): In file included from drivers/input/touchscreen/cyttsp_i2c_common.c:24: drivers/input/touchscreen/cyttsp4_core.h:236:27: warning: ‘cyttsp4_tch_abs_string’ defined but not used [-Wunused-const-variable=] 236 | static const char const cyttsp4_tch_abs_string[] = { | ^~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/input/touchscreen/cyttsp4_i2c.c:17: drivers/input/touchscreen/cyttsp4_core.h:236:27: warning: ‘cyttsp4_tch_abs_string’ defined but not used [-Wunused-const-variable=] 236 | static const char * const cyttsp4_tch_abs_string[] = { | ^~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/input/touchscreen/cyttsp4_spi.c:17: drivers/input/touchscreen/cyttsp4_core.h:236:27: warning: ‘cyttsp4_tch_abs_string’ defined but not used [-Wunused-const-variable=] 236 | static const char * const cyttsp4_tch_abs_string[] = { | ^~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201104162427.2984742-16-lee.jones@linaro.org Signed-off-by: Dmitry Torokhov commit 136feb4cf3b3ea9ea07d210805911a60e85a2d0d Author: Lee Jones Date: Sun Nov 8 22:32:32 2020 -0800 Input: resistive-adc-touch - struct headers should start with 'struct ' Fixes the following W=1 kernel build warning(s): drivers/input/touchscreen/resistive-adc-touch.c:34: warning: cannot understand function prototype: 'struct grts_state ' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201104162427.2984742-10-lee.jones@linaro.org Signed-off-by: Dmitry Torokhov commit 29c2e1249cfaed365a6fcfa5a3e6a2e590f54879 Author: Zhang Qilong Date: Wed Oct 28 12:21:47 2020 -0700 Input: analog - fix formatting of error code The location of the minus sign and the error code are linked together for better human view. Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20201027135020.66632-1-zhangqilong3@huawei.com Signed-off-by: Dmitry Torokhov commit a1b5196d988afdcded74e01bc47fb11c80b366cf Author: Lee Jones Date: Wed Nov 4 11:12:15 2020 -0800 Input: cyapa_gen5 - fix obvious abuse of kernel-doc format Fixes the following W=1 kernel build warning(s): drivers/input/mouse/cyapa_gen5.c:392: warning: Function parameter or member 'cyapa' not described in 'cyapa_i2c_pip_write' drivers/input/mouse/cyapa_gen5.c:392: warning: Function parameter or member 'buf' not described in 'cyapa_i2c_pip_write' drivers/input/mouse/cyapa_gen5.c:392: warning: Function parameter or member 'size' not described in 'cyapa_i2c_pip_write' drivers/input/mouse/cyapa_gen5.c:444: warning: Function parameter or member 'cyapa' not described in 'cyapa_empty_pip_output_data' drivers/input/mouse/cyapa_gen5.c:444: warning: Function parameter or member 'buf' not described in 'cyapa_empty_pip_output_data' drivers/input/mouse/cyapa_gen5.c:444: warning: Function parameter or member 'len' not described in 'cyapa_empty_pip_output_data' drivers/input/mouse/cyapa_gen5.c:444: warning: Function parameter or member 'func' not described in 'cyapa_empty_pip_output_data' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201104162427.2984742-4-lee.jones@linaro.org Signed-off-by: Dmitry Torokhov commit 6cffd88c2f7d4b552a0bc3ba31af3c113de4d0b5 Author: Lee Jones Date: Wed Nov 4 11:12:06 2020 -0800 Input: cyapa - fix misnaming of 'cyapa_i2c_write's 'reg' param Fixes the following W=1 kernel build warning(s): drivers/input/mouse/cyapa.c:130: warning: Function parameter or member 'reg' not described in 'cyapa_i2c_write' drivers/input/mouse/cyapa.c:130: warning: Excess function parameter 'ret' description in 'cyapa_i2c_write' Signed-off-by: Lee Jones Reviewed-by: Benson Leung Link: https://lore.kernel.org/r/20201104162427.2984742-3-lee.jones@linaro.org Signed-off-by: Dmitry Torokhov commit d8c58078e8aad8378fc4d0d112ed19c34ad9fca9 Author: Lee Jones Date: Wed Nov 4 11:12:31 2020 -0800 Input: ab8500-ponkey - fix incorrect name in 'ab8500_ponkey' doc header Fixes the following W=1 kernel build warning(s): drivers/input/misc/ab8500-ponkey.c:32: warning: Function parameter or member 'idev' not described in 'ab8500_ponkey' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201104162427.2984742-5-lee.jones@linaro.org Signed-off-by: Dmitry Torokhov commit 1b65c43f7078eb6e4c2c0231c543a88c272bcb0c Author: Pratyush Yadav Date: Mon Oct 5 21:01:36 2020 +0530 mtd: spi-nor: core: disable Octal DTR mode on suspend. On resume, the init procedure will be run that will re-enable it. Signed-off-by: Pratyush Yadav Signed-off-by: Vignesh Raghavendra Reviewed-by: Tudor Ambarus Link: https://lore.kernel.org/r/20201005153138.6437-14-p.yadav@ti.com commit d73ee7534cc537b98b61bfd83dbce5bb12aecb80 Author: Pratyush Yadav Date: Mon Oct 5 21:01:35 2020 +0530 mtd: spi-nor: core: perform a Soft Reset on shutdown Perform a Soft Reset on shutdown on flashes that support it so that the flash can be reset to its initial state and any configurations made by spi-nor (given that they're only done in volatile registers) will be reset. This will hand back the flash in pristine state for any further operations on it. Signed-off-by: Pratyush Yadav Signed-off-by: Vignesh Raghavendra Reviewed-by: Tudor Ambarus Link: https://lore.kernel.org/r/20201005153138.6437-13-p.yadav@ti.com commit 1131324aa53ad3465a36c4e58a56615e1bf52932 Author: Pratyush Yadav Date: Mon Oct 5 21:01:34 2020 +0530 mtd: spi-nor: sfdp: detect Soft Reset sequence support from BFPT A Soft Reset sequence will return the flash to Power-on-Reset (POR) state. It consists of two commands: Soft Reset Enable and Soft Reset. Find out if the sequence is supported from BFPT DWORD 16. Signed-off-by: Pratyush Yadav Signed-off-by: Vignesh Raghavendra Reviewed-by: Tudor Ambarus Link: https://lore.kernel.org/r/20201005153138.6437-12-p.yadav@ti.com commit a33c89db4c3ba8e5c3df7726491329cd35d4bb59 Author: Pratyush Yadav Date: Mon Oct 5 21:01:33 2020 +0530 mtd: spi-nor: core: enable octal DTR mode when possible Allow flashes to specify a hook to enable octal DTR mode. Use this hook whenever possible to get optimal transfer speeds. Signed-off-by: Pratyush Yadav Signed-off-by: Vignesh Raghavendra Reviewed-by: Tudor Ambarus Link: https://lore.kernel.org/r/20201005153138.6437-11-p.yadav@ti.com commit 981a8d60e01f7e76d6bccb621598d087c9dd4a5d Author: Tudor Ambarus Date: Mon Oct 5 21:01:32 2020 +0530 mtd: spi-nor: Parse SFDP SCCR Map Parse just the 22nd dword and look for the 'DTR Octal Mode Enable Volatile bit'. SPI_NOR_IO_MODE_EN_VOLATILE should be set just for the flashes that don't define the optional SFDP SCCR Map. For the others, let the SFDP do its job and fill the SNOR_F_IO_MODE_EN_VOLATILE flag. We avoid this way polluting the flash flags when declaring one. Signed-off-by: Tudor Ambarus Signed-off-by: Pratyush Yadav Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20201005153138.6437-10-p.yadav@ti.com commit c6908077b194e46e7180d241ff2dbb85dc30bbd1 Author: Tudor Ambarus Date: Mon Oct 5 21:01:31 2020 +0530 mtd: spi-nor: Introduce SNOR_F_IO_MODE_EN_VOLATILE We don't want to enter a stateful mode, where a X-X-X I/O mode is entered by setting a non-volatile bit, because in case of a reset or a crash, once in the non-volatile mode, we may not be able to recover in bootloaders and we may break the SPI NOR boot. Forbid by default the I/O modes that are set via a non-volatile bit. SPI_NOR_IO_MODE_EN_VOLATILE should be set just for the flashes that don't define the optional SFDP SCCR Map, so that we don't pollute the flash info flags. Signed-off-by: Tudor Ambarus Signed-off-by: Pratyush Yadav Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20201005153138.6437-9-p.yadav@ti.com commit 354b412967016e2f99fb2d5113e7b92b539f33b6 Author: Pratyush Yadav Date: Mon Oct 5 21:01:30 2020 +0530 mtd: spi-nor: core: do 2 byte reads for SR and FSR in DTR mode Some controllers, like the cadence qspi controller, have trouble reading only 1 byte in DTR mode. So, do 2 byte reads for SR and FSR commands in DTR mode, and then discard the second byte. Signed-off-by: Pratyush Yadav Signed-off-by: Vignesh Raghavendra Reviewed-by: Tudor Ambarus Link: https://lore.kernel.org/r/20201005153138.6437-8-p.yadav@ti.com commit 6c6a2b2b8ed6dd1ad1a318afd1035777a73936e0 Author: Pratyush Yadav Date: Mon Oct 5 21:01:29 2020 +0530 mtd: spi-nor: core: use dummy cycle and address width info from SFDP The xSPI Profile 1.0 table specifies how many dummy cycles and address bytes are needed for the Read Status Register command in octal DTR mode. Use that information to send the correct Read SR command. Signed-off-by: Pratyush Yadav Signed-off-by: Vignesh Raghavendra Reviewed-by: Tudor Ambarus Link: https://lore.kernel.org/r/20201005153138.6437-7-p.yadav@ti.com commit fb27f198971a68fec59d5493b68e35e916fce62c Author: Pratyush Yadav Date: Mon Oct 5 21:01:28 2020 +0530 mtd: spi-nor: sfdp: parse xSPI Profile 1.0 table This table is indication that the flash is xSPI compliant and hence supports octal DTR mode. Extract information like the fast read opcode, dummy cycles, the number of dummy cycles needed for a Read Status Register command, and the number of address bytes needed for a Read Status Register command. We don't know what speed the controller is running at. Find the fast read dummy cycles for the fastest frequency the flash can run at to be sure we are never short of dummy cycles. If nothing is available, default to 20. Flashes that use a different value should update it in their fixup hooks. Since we want to set read settings, expose spi_nor_set_read_settings() in core.h. Signed-off-by: Pratyush Yadav Signed-off-by: Vignesh Raghavendra Reviewed-by: Tudor Ambarus Link: https://lore.kernel.org/r/20201005153138.6437-6-p.yadav@ti.com commit 0e1b2fc4e5f681ba716f5a50da710251c717413d Author: Pratyush Yadav Date: Mon Oct 5 21:01:27 2020 +0530 mtd: spi-nor: sfdp: get command opcode extension type from BFPT Some devices in DTR mode expect an extra command byte called the extension. The extension can either be same as the opcode, bitwise inverse of the opcode, or another additional byte forming a 16-byte opcode. Get the extension type from the BFPT. For now, only flashes with "repeat" and "inverse" extensions are supported. Signed-off-by: Pratyush Yadav Signed-off-by: Vignesh Raghavendra Reviewed-by: Tudor Ambarus Link: https://lore.kernel.org/r/20201005153138.6437-5-p.yadav@ti.com commit 0e30f47232ab57c685258aa91adc3a3e67bd023e Author: Pratyush Yadav Date: Mon Oct 5 21:01:26 2020 +0530 mtd: spi-nor: add support for DTR protocol Double Transfer Rate (DTR) is SPI protocol in which data is transferred on each clock edge as opposed to on each clock cycle. Make framework-level changes to allow supporting flashes in DTR mode. Right now, mixed DTR modes are not supported. So, for example a mode like 4S-4D-4D will not work. All phases need to be either DTR or STR. The xSPI spec says that "The program commands provide SPI backward compatible commands for programming data...". So 8D-8D-8D page program opcodes are populated with using 1S-1S-1S opcodes. Signed-off-by: Pratyush Yadav Signed-off-by: Vignesh Raghavendra Reviewed-by: Tudor Ambarus Link: https://lore.kernel.org/r/20201005153138.6437-4-p.yadav@ti.com commit 6e1bf55d7207aa360c8d1960dfac6af1940bd32e Author: Pratyush Yadav Date: Mon Oct 5 21:01:25 2020 +0530 mtd: spi-nor: add spi_nor_controller_ops_{read_reg, write_reg, erase}() They are thin wrappers around nor->controller_ops->{read_reg,write_reg,erase}(). In a future commit DTR support will be added. These ops can not be supported by the controller_ops hooks and these helpers will make it easier to reject those calls. Signed-off-by: Pratyush Yadav Signed-off-by: Vignesh Raghavendra Reviewed-by: Tudor Ambarus Link: https://lore.kernel.org/r/20201005153138.6437-3-p.yadav@ti.com commit 39bdfb789bac58a323b1dac56d0f55b65ed894ee Author: Pratyush Yadav Date: Mon Oct 5 21:01:24 2020 +0530 mtd: spi-nor: core: use EOPNOTSUPP instead of ENOTSUPP ENOTSUPP is not a SUSV4 error code. Using EOPNOTSUPP is preferred in its stead. Signed-off-by: Pratyush Yadav Signed-off-by: Vignesh Raghavendra Reviewed-by: Tudor Ambarus Link: https://lore.kernel.org/r/20201005153138.6437-2-p.yadav@ti.com commit e0d80b647c12d5deb163365005742739745960cf Author: Lee Jones Date: Wed Nov 4 14:51:52 2020 -0800 Input: cros_ec_keyb - struct headers should start with 'struct ' Fixes the following W=1 kernel build warning(s): drivers/input/keyboard/cros_ec_keyb.c:72: warning: cannot understand function prototype: 'struct cros_ec_bs_map ' Signed-off-by: Lee Jones Reviewed-by: Benson Leung Link: https://lore.kernel.org/r/20201104162427.2984742-8-lee.jones@linaro.org [dtor: fixed up docbook comments for cros_ec_keyb structure as well] Signed-off-by: Dmitry Torokhov commit 2216c0e414c6596b03a354b5c08ba98af4cbef85 Author: Lee Jones Date: Sun Nov 8 22:08:01 2020 -0800 Input: gpio_keys - fix misnamed function parameter 'dev' Fixes the following W=1 kernel build warning(s): drivers/input/keyboard/gpio_keys.c:119: warning: Function parameter or member 'dev' not described in 'get_bm_events_by_type' drivers/input/keyboard/gpio_keys.c:119: warning: Excess function parameter 'input' description in 'get_bm_events_by_type' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201104162427.2984742-12-lee.jones@linaro.org Signed-off-by: Dmitry Torokhov commit 93107bc736f4eb1d57a26c56eda9bb89b86d1ef0 Author: Lee Jones Date: Sun Nov 8 22:09:03 2020 -0800 Input: elantech - demote obvious abuse of kernel-doc header Fixes the following W=1 kernel build warning(s): drivers/input/mouse/elantech.c:1837: warning: Function parameter or member 'psmouse' not described in 'elantech_setup_smbus' drivers/input/mouse/elantech.c:1837: warning: Function parameter or member 'info' not described in 'elantech_setup_smbus' drivers/input/mouse/elantech.c:1837: warning: Function parameter or member 'leave_breadcrumbs' not described in 'elantech_setup_smbus' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201104162427.2984742-13-lee.jones@linaro.org Signed-off-by: Dmitry Torokhov commit 55be5087a8ab1f8a6bc225b507c924e43199774e Author: Lee Jones Date: Sun Nov 8 22:19:07 2020 -0800 Input: pmic8xxx-keypad - fix kernel-doc formatting Fixes the following W=1 kernel build warning(s): drivers/input/keyboard/pmic8xxx-keypad.c:106: warning: Function parameter or member 'num_rows' not described in 'pmic8xxx_kp' drivers/input/keyboard/pmic8xxx-keypad.c:106: warning: Function parameter or member 'num_cols' not described in 'pmic8xxx_kp' drivers/input/keyboard/pmic8xxx-keypad.c:106: warning: Function parameter or member 'input' not described in 'pmic8xxx_kp' drivers/input/keyboard/pmic8xxx-keypad.c:106: warning: Function parameter or member 'regmap' not described in 'pmic8xxx_kp' drivers/input/keyboard/pmic8xxx-keypad.c:106: warning: Function parameter or member 'key_sense_irq' not described in 'pmic8xxx_kp' drivers/input/keyboard/pmic8xxx-keypad.c:106: warning: Function parameter or member 'key_stuck_irq' not described in 'pmic8xxx_kp' drivers/input/keyboard/pmic8xxx-keypad.c:106: warning: Function parameter or member 'keycodes' not described in 'pmic8xxx_kp' drivers/input/keyboard/pmic8xxx-keypad.c:106: warning: Function parameter or member 'dev' not described in 'pmic8xxx_kp' drivers/input/keyboard/pmic8xxx-keypad.c:106: warning: Function parameter or member 'keystate' not described in 'pmic8xxx_kp' drivers/input/keyboard/pmic8xxx-keypad.c:106: warning: Function parameter or member 'stuckstate' not described in 'pmic8xxx_kp' drivers/input/keyboard/pmic8xxx-keypad.c:106: warning: Function parameter or member 'ctrl_reg' not described in 'pmic8xxx_kp' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201104162427.2984742-21-lee.jones@linaro.org Signed-off-by: Dmitry Torokhov commit 5b27585a8524cbb1c720502d3014a5fb85951ab9 Author: Lee Jones Date: Sun Nov 8 22:17:31 2020 -0800 Input: nomadik-ske-keypad - provide some missing struct member docs Fixes the following W=1 kernel build warning(s): drivers/input/keyboard/nomadik-ske-keypad.c:71: warning: Function parameter or member 'pclk' not described in 'ske_keypad' drivers/input/keyboard/nomadik-ske-keypad.c:71: warning: Function parameter or member 'ske_keypad_lock' not described in 'ske_keypad' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201104162427.2984742-20-lee.jones@linaro.org Signed-off-by: Dmitry Torokhov commit 176271110d74e70e0c56d076ff7575dd1b2ee672 Author: Lee Jones Date: Sun Nov 8 22:09:58 2020 -0800 Input: drv2667 - fix formatting and add missing member docs Fixes the following W=1 kernel build warning(s): drivers/input/misc/drv2667.c:109: warning: Function parameter or member 'input_dev' not described in 'drv2667_data' drivers/input/misc/drv2667.c:109: warning: Function parameter or member 'client' not described in 'drv2667_data' drivers/input/misc/drv2667.c:109: warning: Function parameter or member 'regmap' not described in 'drv2667_data' drivers/input/misc/drv2667.c:109: warning: Function parameter or member 'work' not described in 'drv2667_data' drivers/input/misc/drv2667.c:109: warning: Function parameter or member 'regulator' not described in 'drv2667_data' drivers/input/misc/drv2667.c:109: warning: Function parameter or member 'page' not described in 'drv2667_data' drivers/input/misc/drv2667.c:109: warning: Function parameter or member 'magnitude' not described in 'drv2667_data' drivers/input/misc/drv2667.c:109: warning: Function parameter or member 'frequency' not described in 'drv2667_data' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201104162427.2984742-19-lee.jones@linaro.org Signed-off-by: Dmitry Torokhov commit 6e9c6fcbff24b756eb757bb702dbd7f74790d67f Author: Lee Jones Date: Sun Nov 8 22:09:47 2020 -0800 Input: drv2665 - fix formatting expected by kernel-doc Fixes the following W=1 kernel build warning(s): drivers/input/misc/drv2665.c:59: warning: Function parameter or member 'input_dev' not described in 'drv2665_data' drivers/input/misc/drv2665.c:59: warning: Function parameter or member 'client' not described in 'drv2665_data' drivers/input/misc/drv2665.c:59: warning: Function parameter or member 'regmap' not described in 'drv2665_data' drivers/input/misc/drv2665.c:59: warning: Function parameter or member 'work' not described in 'drv2665_data' drivers/input/misc/drv2665.c:59: warning: Function parameter or member 'regulator' not described in 'drv2665_data' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201104162427.2984742-18-lee.jones@linaro.org Signed-off-by: Dmitry Torokhov commit 463a74c2d34db531269849c1a7d4c2089f210ea8 Author: Lee Jones Date: Sun Nov 8 22:09:26 2020 -0800 Input: drv260x - fix kernel-doc formatting and remove one abuse Fixes the following W=1 kernel build warning(s): drivers/input/misc/drv260x.c:194: warning: Function parameter or member 'input_dev' not described in 'drv260x_data' drivers/input/misc/drv260x.c:194: warning: Function parameter or member 'client' not described in 'drv260x_data' drivers/input/misc/drv260x.c:194: warning: Function parameter or member 'regmap' not described in 'drv260x_data' drivers/input/misc/drv260x.c:194: warning: Function parameter or member 'work' not described in 'drv260x_data' drivers/input/misc/drv260x.c:194: warning: Function parameter or member 'enable_gpio' not described in 'drv260x_data' drivers/input/misc/drv260x.c:194: warning: Function parameter or member 'regulator' not described in 'drv260x_data' drivers/input/misc/drv260x.c:194: warning: Function parameter or member 'magnitude' not described in 'drv260x_data' drivers/input/misc/drv260x.c:194: warning: Function parameter or member 'mode' not described in 'drv260x_data' drivers/input/misc/drv260x.c:194: warning: Function parameter or member 'library' not described in 'drv260x_data' drivers/input/misc/drv260x.c:194: warning: Function parameter or member 'rated_voltage' not described in 'drv260x_data' drivers/input/misc/drv260x.c:194: warning: Function parameter or member 'overdrive_voltage' not described in 'drv260x_data' drivers/input/misc/drv260x.c:244: warning: Function parameter or member 'voltage' not described in 'drv260x_calculate_voltage' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201104162427.2984742-17-lee.jones@linaro.org Signed-off-by: Dmitry Torokhov commit 3fe781f4fab2cfad993807e2f14fa26dec6b9172 Author: Wang Qing Date: Sun Nov 8 21:50:55 2020 -0800 Input: ads7846 - use kobj_to_dev() API Use kobj_to_dev() instead of container_of(). Signed-off-by: Wang Qing Link: https://lore.kernel.org/r/1604893436-20206-1-git-send-email-wangqing@vivo.com Signed-off-by: Dmitry Torokhov commit af5689fb5c1c0b5ad8d6bfd79ea7d018b4c16f1d Author: Jonathan Neuschäfer Date: Sun Nov 8 18:30:08 2020 -0800 Input: ektf2127 - add support for eKTF2132 touchscreen The eKTF2132 is a touchscreen controller found, for example, in the Kobo Aura ebook reader. It is similar to the ektf2127, but it uses a different packet type to report touch events. Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20201106112412.390724-3-j.neuschaefer@gmx.net Signed-off-by: Dmitry Torokhov commit cdab490e50e7ce4533b95ca24c90bee3ed1a8e99 Author: Jonathan Neuschäfer Date: Sun Nov 8 18:29:55 2020 -0800 dt-bindings: input: ektf2127: Add elan,ektf2132 compatible string The eKTF2132 is a touchscreen controller found, for example, in the Kobo Aura ebook reader. It is similar to the ektf2127, but it uses a different packet type to report touch events. Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20201106112412.390724-2-j.neuschaefer@gmx.net Signed-off-by: Dmitry Torokhov commit e786f756d52707f3c36ca0efe949407a8b978493 Author: Jagan Teki Date: Tue Sep 29 14:02:17 2020 +0530 arm64: dts: rockchip: Add Engicam PX30.Core C.TOUCH 2.0 PX30.Core is an EDIMM SOM based on Rockchip PX30 from Engicam. C.TOUCH 2.0 is a general purpose carrier board with capacitive touch interface support. PX30.Core needs to mount on top of this Carrier board for creating complete PX30.Core C.TOUCH 2.0 board. Add support for it. Signed-off-by: Jagan Teki Signed-off-by: Michael Trimarchi Link: https://lore.kernel.org/r/20200929083217.25406-8-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit 746c750a8bc4994638d014834389205c3e3bcc14 Author: Jagan Teki Date: Tue Sep 29 14:02:16 2020 +0530 arm64: dts: rockchip: Add Engicam C.TOUCH 2.0 Engicam C.TOUCH 2.0 is an EDIMM compliant general purpose carrier board with capacitive touch interface. Genaral features: - TFT 10.1" industrial, 1280x800 LVDS display - Ethernet 10/100 - Wifi/BT - USB Type A/OTG - Audio Out - CAN - LVDS panel connector SOM's like PX30.Core needs to mount on top of this Carrier board for creating complete PX30.Core C.TOUCH 2.0 board. Add support for it. Signed-off-by: Jagan Teki Signed-off-by: Michael Trimarchi Link: https://lore.kernel.org/r/20200929083217.25406-7-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit 5fccec0cf423aaf90c9c0125ef5af56c9455ba64 Author: Jagan Teki Date: Tue Sep 29 14:02:15 2020 +0530 dt-bindings: arm: rockchip: Add Engicam PX30.Core C.TOUCH 2.0 PX30.Core is an EDIMM SOM based on Rockchip PX30 from Engicam. C.TOUCH 2.0 is a general purpose carrier board with capacitive touch interface support. PX30.Core needs to mount on top of this Carrier board for creating complete PX30.Core C.TOUCH 2.0 board. Add bindings for it. Signed-off-by: Jagan Teki Acked-by: Rob Herring Link: https://lore.kernel.org/r/20200929083217.25406-6-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit 0935d7e9b1b26230e01dc5f0ed8d2af3771ced57 Author: Jagan Teki Date: Tue Sep 29 14:02:14 2020 +0530 arm64: dts: rockchip: Add Engicam PX30.Core EDIMM2.2 Starter Kit PX30.Core is an EDIMM SOM based on Rockchip PX30 from Engicam. EDIMM2.2 Starter Kit is an EDIMM 2.2 Form Factor Capacitive Evaluation Board from Engicam. PX30.Core needs to mount on top of this Evaluation board for creating complete PX30.Core EDIMM2.2 Starter Kit. Add support for it. Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20200929083217.25406-5-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit d92a7c331f53ccf6da4e0cb6b49470444cb150ce Author: Michael Trimarchi Date: Tue Sep 29 14:02:13 2020 +0530 arm64: dts: rockchip: Add Engicam PX30.Core SOM PX30.Core is an EDIMM SOM based on Rockchip PX30 from Engicam. General features: - Rockchip PX30 - Up to 2GB DDR4 - eMMC 4 GB expandible - rest of PX30 features PX30.Core needs to mount on top of Engicam baseboards for creating complete platform boards. Possible baseboards are, - EDIMM2.2 - C.TOUCH 2.0 Add support for it. Signed-off-by: Jagan Teki Signed-off-by: Michael Trimarchi Link: https://lore.kernel.org/r/20200929083217.25406-4-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit 7a180f56e01443be526061bd8ec8cf6e2c4f988d Author: Jagan Teki Date: Tue Sep 29 14:02:12 2020 +0530 arm64: dts: rockchip: Add Engicam EDIMM2.2 Starter Kit Engicam EDIMM2.2 Starter Kit is an EDIMM 2.2 Form Factor Capacitive Evaluation Board. Genaral features: - LCD 7" C.Touch - microSD slot - Ethernet 1Gb - Wifi/BT - 2x LVDS Full HD interfaces - 3x USB 2.0 - 1x USB 3.0 - HDMI Out - Mini PCIe - MIPI CSI - 2x CAN - Audio Out SOM's like PX30.Core needs to mount on top of this Evaluation board for creating complete PX30.Core EDIMM2.2 Starter Kit. Add support for it. Signed-off-by: Jagan Teki Signed-off-by: Michael Trimarchi Link: https://lore.kernel.org/r/20200929083217.25406-3-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit f36296e4ddfc003932c435cb16ca26fc87e43001 Author: Jagan Teki Date: Tue Sep 29 14:02:11 2020 +0530 dt-bindings: arm: rockchip: Add Engicam PX30.Core EDIMM2.2 Starter Kit PX30.Core is an EDIMM SOM based on Rockchip PX30 from Engicam. EDIMM2.2 Starter Kit is an EDIMM 2.2 Form Factor Capacitive Evaluation Board from Engicam. PX30.Core needs to mount on top of this Evaluation board for creating complete PX30.Core EDIMM2.2 Starter Kit. Add bindings for it. Signed-off-by: Jagan Teki Acked-by: Rob Herring Link: https://lore.kernel.org/r/20200929083217.25406-2-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit e1e47fbca668507a81bb388fcae044b89d112ecc Author: Paweł Chmiel Date: Sat Nov 7 14:39:26 2020 +0100 arm64: dts: exynos: Correct psci compatible used on Exynos7 It's not possible to reboot or poweroff Exynos7420 using PSCI. Instead we need to use syscon reboot/poweroff drivers, like it's done for other Exynos SoCs. This was confirmed by checking vendor source and testing it on Samsung Galaxy S6 device based on this SoC. To be able to use custom restart/poweroff handlers instead of PSCI functions, we need to correct psci compatible. This also requires us to provide function ids for CPU_ON and CPU_OFF. Fixes: fb026cb65247 ("arm64: dts: Add reboot node for exynos7") Fixes: b9024cbc937d ("arm64: dts: Add initial device tree support for exynos7") Signed-off-by: Paweł Chmiel Link: https://lore.kernel.org/r/20201107133926.37187-2-pawel.mikolaj.chmiel@gmail.com Signed-off-by: Krzysztof Kozlowski commit 73bc7510ea0dafb4ff1ae6808759627a8ec51f5a Author: Paweł Chmiel Date: Sat Nov 7 14:39:25 2020 +0100 arm64: dts: exynos: Include common syscon restart/poweroff for Exynos7 Exynos7 uses the same syscon reboot and poweroff nodes as other Exynos SoCs, so instead of duplicating code we can just include common dtsi file, which already contains definitions of them. After this change, poweroff node will be also available, previously this dts file did contain only reboot node. Fixes: fb026cb65247 ("arm64: dts: Add reboot node for exynos7") Fixes: b9024cbc937d ("arm64: dts: Add initial device tree support for exynos7") Signed-off-by: Paweł Chmiel Link: https://lore.kernel.org/r/20201107133926.37187-1-pawel.mikolaj.chmiel@gmail.com Signed-off-by: Krzysztof Kozlowski commit 819af2a6765a39767717ea349a3d274ba723abf4 Author: Tom Rix Date: Mon Oct 19 09:31:15 2020 -0700 drm: remove unneeded break A break is not needed if it is preceded by a return or break Signed-off-by: Tom Rix Acked-by: Sam Ravnborg Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201019163115.25814-1-trix@redhat.com commit 1f4877218f7e2c2b914aeb69a8a0f47d59c74717 Author: Gene Chen Date: Tue Oct 20 16:07:47 2020 +0800 iio: adc: mt6360: Add ADC driver for MT6360 Add MT6360 ADC driver including Charger Current, Voltage, and Temperature. Signed-off-by: Gene Chen Link: https://lore.kernel.org/r/1603181267-15610-4-git-send-email-gene.chen.richtek@gmail.com Signed-off-by: Jonathan Cameron commit d4686c52a20b51f539d8a5d09807441af490602b Author: Gene Chen Date: Tue Oct 20 16:07:46 2020 +0800 Documentation: ABI: testing: mt6360: Add ADC sysfs guideline Add ABI documentation for mt6360 ADC sysfs interfaces. Signed-off-by: Gene Chen Link: https://lore.kernel.org/r/1603181267-15610-3-git-send-email-gene.chen.richtek@gmail.com Signed-off-by: Jonathan Cameron commit 396cd5092caf8daaa72139c81f16d4aa1ecd560d Author: Gene Chen Date: Tue Oct 20 16:07:45 2020 +0800 dt-bindings: iio: adc: add bindings doc for MT6360 ADC This change adds the binding doc for the MT6360 ADC. Signed-off-by: Gene Chen Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1603181267-15610-2-git-send-email-gene.chen.richtek@gmail.com Signed-off-by: Jonathan Cameron commit 499da8bdb868ad4ca611beae98d9c6419731c572 Author: Olivier Moysan Date: Thu Nov 5 15:29:41 2020 +0100 iio: adc: stm32-adc: dma transfers cleanup - Remove processing related to DMA in irq handler as this data transfer is managed directly in DMA callback. - Update comment in stm32_adc_set_watermark() function. Signed-off-by: Olivier Moysan Reviewed-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20201105142941.27301-1-olivier.moysan@st.com Signed-off-by: Jonathan Cameron commit 7f79711533a96b02e1e24e2e36a29b08734e36e2 Author: Cristian Pop Date: Mon Sep 28 12:09:59 2020 +0300 dt-bindings:iio:adc:adc.txt: Add documentation for channel label attribute Optional attribute for better identification of the channels. Signed-off-by: Cristian Pop Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200928090959.88842-5-cristian.pop@analog.com Signed-off-by: Jonathan Cameron commit 7d4156ddf1b838b100a037d02d4bf15ccb3ccd26 Author: Cristian Pop Date: Mon Sep 28 12:09:58 2020 +0300 dt-bindings:iio:adc:adi,ad7768-1: Add documentation for channel label Optional attribute for better identification of the channels. Signed-off-by: Cristian Pop Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200928090959.88842-4-cristian.pop@analog.com Signed-off-by: Jonathan Cameron commit 75ed0be7200def4015654d896bc3c8e3b22ccefa Author: Cristian Pop Date: Mon Sep 28 12:09:57 2020 +0300 iio: adc: ad7768-1: Add channel labels. For better identification of the channels. Signed-off-by: Cristian Pop Link: https://lore.kernel.org/r/20200928090959.88842-3-cristian.pop@analog.com Signed-off-by: Jonathan Cameron commit 3079188f821cfbdbb0b12f668335931a87eb14c6 Author: Cristian Pop Date: Mon Sep 28 12:09:56 2020 +0300 iio:Documentation: Add documentation for label channel attribute If a label is defined for this channel add that to the channel specific attributes. This is useful for userspace to be able to identify an individual channel. Signed-off-by: Cristian Pop Link: https://lore.kernel.org/r/20200928090959.88842-2-cristian.pop@analog.com Signed-off-by: Jonathan Cameron commit 1d4ef9b39ebecca827642b8897d2d79ea2026682 Author: Cristian Pop Date: Mon Sep 28 12:09:55 2020 +0300 iio: core: Add optional symbolic label to a device channel If a label is defined in the device tree for this channel add that to the channel specific attributes. This is useful for userspace to be able to identify an individual channel. Signed-off-by: Cristian Pop Link: https://lore.kernel.org/r/20200928090959.88842-1-cristian.pop@analog.com Signed-off-by: Jonathan Cameron commit 397f45ed26c5dad70426ab372c250c8b903c996d Author: Jonathan Neuschäfer Date: Sun Nov 8 02:37:38 2020 +0100 MAINTAINERS: Fix 'W:' prefix in Invensense IMU entry The colon is missing, which can confuse scripts/parse-maintainers.pl. Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20201108013738.1410528-1-j.neuschaefer@gmx.net Signed-off-by: Jonathan Cameron commit 4178bd5a3c57e107b3df5e17de6dc60cb3890647 Author: Biju Das Date: Tue Oct 20 10:36:55 2020 +0100 drm/bridge: lvds-codec: Use dev_err_probe for error handling dev_err_probe function simplifies error handling. So use the same in probe function wherever possible. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201020093655.3584-1-biju.das.jz@bp.renesas.com commit 281edb9ff18b9fd0ec677cc8a53e6f6395a5ccd7 Author: Biju Das Date: Tue Oct 20 10:49:10 2020 +0100 drm/panel: panel-simple: Add connector_type for EDT ETM0700G0DH6 panel Fix the warning message "missing connector type" by adding connector_type for EDT ETM0700G0DH6 panel. Signed-off-by: Biju Das Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201020094910.4756-1-biju.das.jz@bp.renesas.com commit cc5f7e2fcbe396f2f461cd67c872af771a334bca Author: Alexandru Gagniuc Date: Tue Oct 20 17:14:58 2020 -0500 drm/bridge: sii902x: Enable I/O and core VCC supplies if present On the SII9022, the IOVCC and CVCC12 supplies must reach the correct voltage before the reset sequence is initiated. On most boards, this assumption is true at boot-up, so initialization succeeds. However, when we try to initialize the chip with incorrect supply voltages, it will not respond to I2C requests. sii902x_probe() fails with -ENXIO. To resolve this, look for the "iovcc" and "cvcc12" regulators, and make sure they are enabled before starting the reset sequence. If these supplies are not available in devicetree, then they will default to dummy-regulator. In that case everything will work like before. This was observed on a STM32MP157C-DK2 booting in u-boot falcon mode. On this board, the supplies would be set by the second stage bootloader, which does not run in falcon mode. Signed-off-by: Alexandru Gagniuc Signed-off-by: Sam Ravnborg [Fix checkpatch warnings] Link: https://patchwork.freedesktop.org/patch/msgid/20201020221501.260025-2-mr.nuke.me@gmail.com commit 4c1e054322da99cbfd293a5fddf283f2fdb3e2d0 Author: Alexandru Gagniuc Date: Tue Oct 20 17:14:59 2020 -0500 dt-bindings: display: sii902x: Add supply bindings The sii902x chip family requires IO and core voltages to reach the correct voltage before chip initialization. Add binding for describing the two supplies. Signed-off-by: Alexandru Gagniuc Acked-by: Rob Herring Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201020221501.260025-3-mr.nuke.me@gmail.com commit 91b5e26731c5d409d6134603afc061617639933e Author: Alexandru Gagniuc Date: Tue Oct 20 17:14:57 2020 -0500 drm/bridge: sii902x: Refactor init code into separate function Separate the hardware initialization code from setting up the data structures and parsing the device tree. The purpose of this change is to provide a single exit point and avoid a waterfall of 'goto's in the subsequent patch. Signed-off-by: Alexandru Gagniuc Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201020221501.260025-1-mr.nuke.me@gmail.com commit f2e66f212a9de04afc2caa5ec79057c0ac75c728 Author: Qinglang Miao Date: Sat Oct 31 09:18:56 2020 +0800 drm: panel: simple: add missing platform_driver_unregister() in panel_simple_init Add the missing platform_driver_unregister() before return from panel_simple_init in the error handling case when failed to register panel_simple_dsi_driver with CONFIG_DRM_MIPI_DSI enabled. Signed-off-by: Qinglang Miao Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201031011856.137307-1-miaoqinglang@huawei.com commit 9273cf7d3942eaaf8b6cb6e614adbd475dc6e9b2 Author: Jitao Shi Date: Thu Sep 17 15:33:05 2020 +0800 dt-bindings: display: mediatek: convert the dpi bindings to yaml Convert display/mediatek/mediatek,dpi.txt to display/mediatek/mediatek,dpi.yaml and remove the old text bindings. Signed-off-by: Jitao Shi Reviewed-by: Rob Herring Signed-off-by: Chun-Kuang Hu commit a812ca1963e5b51804236a91158d46121d4c502e Author: Bernard Zhao Date: Tue Oct 13 01:55:12 2020 -0700 drm/mediatek: Optimize functions which do not need to return Function mtk_hdmi_aud_set_input always return 0, no need to keep the return value. Functions mtk_hdmi_aud_enable_packet & mtk_hdmi_aud_on_off_hw_ncts are the same, these two functions just call next functions. Maybe it`s a bit better to just call the inner function. Signed-off-by: Bernard Zhao Signed-off-by: Chun-Kuang Hu commit c20e6dd9a953d62f14399dabf457dce61dd5611f Author: Heiko Stuebner Date: Sat Jul 4 00:14:13 2020 +0200 arm64: dts: rockchip: add adc joystick to Odroid Go Advance Add the now usable adc-joystick node that describes the analog joystick connected to two saradc channels from the rk3326 soc. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20200703221413.269800-1-heiko@sntech.de commit 62dbf80fc581a8eed7288ed7aca24446054eb616 Author: Uwe Kleine-König Date: Mon Nov 2 16:06:58 2020 +0100 dt-bindings: arm: rockchip: Add Kobol Helios64 Document the new board by Kobol introduced recently in rockchip/rk3399-kobol-helios64.dts. Signed-off-by: Uwe Kleine-König Acked-by: Rob Herring Link: https://lore.kernel.org/r/20201102150658.167161-1-uwe@kleine-koenig.org Signed-off-by: Heiko Stuebner commit bff6f1db91e330d7fba56f815cdbc412c75fe163 Author: Voon Weifeng Date: Fri Nov 6 17:43:41 2020 +0800 stmmac: intel: change all EHL/TGL to auto detect phy addr Set all EHL/TGL phy_addr to -1 so that the driver will automatically detect it at run-time by probing all the possible 32 addresses. Signed-off-by: Voon Weifeng Signed-off-by: Wong Vee Khee Link: https://lore.kernel.org/r/20201106094341.4241-1-vee.khee.wong@intel.com Signed-off-by: Jakub Kicinski commit ef9ac2091180c885208763ab1284b8c679fa553c Author: Wang Qing Date: Fri Nov 6 15:50:25 2020 +0800 net: usb: fix spelling typo in cdc_ncm.c Actually, withing should be within. Signed-off-by: Wang Qing Link: https://lore.kernel.org/r/1604649025-22559-1-git-send-email-wangqing@vivo.com Signed-off-by: Jakub Kicinski commit 75a5fb0cdbb7f2529743dfbae3ea6d1971d0734f Author: Wang Qing Date: Fri Nov 6 16:11:49 2020 +0800 net: core: fix spelling typo in flow_dissector.c withing should be within. Signed-off-by: Wang Qing Link: https://lore.kernel.org/r/1604650310-30432-1-git-send-email-wangqing@vivo.com Signed-off-by: Jakub Kicinski commit 2d152760a9e024c5a639529e85fc05a3d198e2ce Merge: f8ae7bbec726f 8194be79fbbc3 Author: Jakub Kicinski Date: Sat Nov 7 15:39:20 2020 -0800 Merge branch 'net-ipa-constrain-gsi-interrupts' Alex Elder says: ==================== net: ipa: constrain GSI interrupts The goal of this series is to more tightly control when GSI interrupts are enabled. This is a long-ish series, so I'll describe it in parts. The first patch is actually unrelated... I forgot to include it in my previous series (which exposed the GSI layer to the IPA version). It is a trivial comments-only update patch. The second patch defers registering the GSI interrupt handler until *after* all of the resources that handler touches have been initialized. In practice, we don't see this interrupt that early, but this precludes an obvious problem. The next two patches are simple changes. The first just trivially renames a field. The second switches from using constant mask values to using an enumerated type of bit positions to represent each GSI interrupt type. The rest implement the "real work." First, all interrupts are disabled at initialization time. Next, we keep track of a bitmask of enabled GSI interrupt types, updating it each time we enable or disable one of them. From there we have a set of patches that one-by-one enable each interrupt type only during the period it is required. This includes allowing a channel to generate IEOB interrupts only when it has been enabled. And finally, the last patch simplifies some code now that all GSI interrupt types are handled uniformly. ==================== Link: https://lore.kernel.org/r/20201105181407.8006-1-elder@linaro.org Signed-off-by: Jakub Kicinski commit 8194be79fbbc36dae391b7d747ba58459687792a Author: Alex Elder Date: Thu Nov 5 12:14:07 2020 -0600 net: ipa: pass a value to gsi_irq_type_update() Now that all of the GSI interrupts are handled uniformly, change gsi_irq_type_update() so it takes a value. Have the function assign that value to the cached mask of enabled GSI IRQ types before writing it to hardware. Note that gsi_irq_teardown() will only be called after gsi_irq_disable(), so it's not necessary for the former to disable all IRQ types. Get rid of that. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 352f26a886d859927310a9dfdbaf1a989dfb18ca Author: Alex Elder Date: Thu Nov 5 12:14:06 2020 -0600 net: ipa: only enable GSI general IRQs when needed Most GSI general errors are unrecoverable without a full reset. Despite that, we want to receive these errors so we can at least report what happened before whatever undefined behavior ensues. Explicitly disable all such interrupts in gsi_irq_setup(), then enable those we want in gsi_irq_enable(). List the interrupt types we are interested in (everything but breakpoint) explicitly rather than using GSI_CNTXT_GSI_IRQ_ALL, and remove that symbol's definition. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 46f748ccaf011af0beccbfc7ae27f3f6c9a56472 Author: Alex Elder Date: Thu Nov 5 12:14:05 2020 -0600 net: ipa: explicitly disallow inter-EE interrupts It is possible for other execution environments (EEs, like the modem) to request changes to local (AP) channel or event ring state. We do not support this feature. In gsi_irq_setup(), explicitly zero the mask that defines which channels are permitted to generate inter-EE channel state change interrupts. Do the same for the event ring mask. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 06c8632833c289ad660ba6699f34e9c8820d3358 Author: Alex Elder Date: Thu Nov 5 12:14:04 2020 -0600 net: ipa: only enable GSI IEOB IRQs when needed A GSI channel must be started in order to use it to perform a transfer data (or command) transaction. And the only time we'll see an IEOB interrupt is if we send a transaction to a started channel. Therefore we do not need to have the IEOB interrupt type enabled until at least one channel has been started. And once the last started channel has been stopped, we can disable the IEOB interrupt type again. We already enable the IEOB interrupt for a particular channel only when it is started. Extend that by having the IEOB interrupt *type* be enabled only when at least one channel is in STARTED state. Disallow all channels from triggering the IEOB interrupt in gsi_irq_setup(). We only enable an channel's interrupt when needed, so there is no longer any need to zero the channel mask in gsi_irq_disable(). Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit d6c9e3f506ae8f96727017d1747887aab4e68605 Author: Alex Elder Date: Thu Nov 5 12:14:03 2020 -0600 net: ipa: only enable generic command completion IRQ when needed The completion of a generic EE GSI command is signaled by a global interrupt of type GP_INT1. The only other used type for a global interrupt is a hardware error report. First, disallow all global interrupt types in gsi_irq_setup(). We want to know about hardware errors, so re-enable the interrupt type in gsi_irq_enable(), to allow hardware errors to be reported. Disable that interrupt type again in gsi_irq_disable(). We only issue generic EE commands one at a time, and there's no reason to keep the completion interrupt enabled when no generic EE command is pending. We furthermore have no need to enable the GP_INT2 or GP_INT3 interrupt types (which aren't used). The change in gsi_irq_enable() makes GSI_CNTXT_GLOB_IRQ_ALL unused, so get rid of it. Have gsi_generic_command() enable the GP_INT1 interrupt type (in addition to the ERROR_INT type) only while a generic command is pending. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit b4175f8731f783c67b042492c9000f5fb7ecee4b Author: Alex Elder Date: Thu Nov 5 12:14:02 2020 -0600 net: ipa: only enable GSI event control IRQs when needed A GSI event ring causes an event control interrupt to fire whenever its state changes (between NOT_ALLOCATED and ALLOCATED). No event ring should ever change state except when we request it to. Currently, we permit *all* events rings to generate event control interrupts--even those that are never used. And we enable event control interrupts essentially at all times, from setup to teardown. Instead, only enable the event control interrupt type for the duration of an event ring command, and when doing so, only allow the event ring being operated upon to cause the interrupt to fire. Disallow all event rings from issuing the event control interrupt in gsi_irq_setup(). Because an event ring's interrupt is only enabled when needed, there is no longer any need to zero the event channel mask in gsi_irq_disable(). Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit b054d4f9eb4b34c2187b89afb56e25b588618a9c Author: Alex Elder Date: Thu Nov 5 12:14:01 2020 -0600 net: ipa: only enable GSI channel control IRQs when needed A GSI channel causes a channel control interrupt to fire whenever its state changes (between NOT_ALLOCATED, ALLOCATED, STARTED, etc.). We do not support inter-EE channel commands (initiated by other EEs), so no channel should ever change state except when we request it to. Currently, we permit *all* channels to generate channel control interrupts--even those that are never used. And we enable channel control interrupts essentially at all times, from setup to teardown. Instead, disable all channel control interrupts initially in gsi_irq_setup(), and only enable the channel control interrupt type for the duration of a channel command. When doing so, only allow the channel being operated upon to cause the interrupt to fire. Because a channel's interrupt is now enabled only when needed (one channel at a time), there is no longer any need to zero the channel mask in gsi_irq_disable(). Add new gsi_irq_type_enable() and gsi_irq_type_disable() as helper functions to control whether a given GSI interrupt type is enabled. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 3ca97ffd984c477e6bba26a71ebba188b99f1a4c Author: Alex Elder Date: Thu Nov 5 12:14:00 2020 -0600 net: ipa: cache last-saved GSI IRQ enabled type Keep track of the set of GSI interrupt types that are currently enabled by recording the mask value to write (or last written) to the TYPE_IRQ_MSK register. Create a new helper function gsi_irq_type_update() to handle actually writing the register. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 97eb94c8c79059966cedd66312e004c6070033f6 Author: Alex Elder Date: Thu Nov 5 12:13:59 2020 -0600 net: ipa: disable all GSI interrupt types initially Introduce gsi_irq_setup() and gsi_irq_teardown() to disable all GSI interrupts when first setting up GSI hardware, and to clean things up when we're done. Re-enable all GSI interrupt types in gsi_irq_enable(), but do so only after each of the type-specific interrupt masks has been configured. Similarly, disable all interrupt types in gsi_irq_disable()--first--before zeroing out the type-specific masks. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit f9b28804ab50eb951c50f4c5afec77ab0435309a Author: Alex Elder Date: Thu Nov 5 12:13:58 2020 -0600 net: ipa: define GSI interrupt types with an enum Define the GSI interrupt types with an enumerated type whose values are the bit positions representing each interrupt type. Include a short comment describing how each interrupt type is used. Build up the enabled interrupt mask explicitly in gsi_irq_enable(), and get rid of the definition of GSI_CNTXT_TYPE_IRQ_MSK_ALL. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit a054539db1966908d3730f29ef3726534cd1f2d5 Author: Alex Elder Date: Thu Nov 5 12:13:57 2020 -0600 net: ipa: rename gsi->event_enable_bitmap Rename the "event_enable_bitmap" field of the GSI structure to be "ieob_enabled_bitmap". An upcoming patch will cache the last value stored for another interrupt mask and this is a more direct naming convention to follow. Add a few comments to explain the bitmap fields in the GSI structure. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 0b8d6761084511188f0eb197da2c1d2318524b9c Author: Alex Elder Date: Thu Nov 5 12:13:56 2020 -0600 net: ipa: request GSI IRQ later Introduce gsi_irq_init() and gsi_irq_exit(), to encapsulate looking up the GSI IRQ and registering its handler. Call gsi_irq_init() a little later in gsi_init(), and initialize the completion earlier. The IRQ handler accesses both the GSI virtual memory pointer and the completion, and this way these things will have been initialized before the gsi_irq() can ever be called. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 4a04d65c964ea47fb1b32e6821e7fa9f086cedd3 Author: Alex Elder Date: Thu Nov 5 12:13:55 2020 -0600 net: ipa: refer to IPA versions, not GSI The GSI code is now exposed to IPA version numbers, and we handle version-specific behavior based on the IPA version. Modify some comments that talk about GSI versions so they reference IPA versions instead. Correct version number errors in a couple of these comments. The (comment) mapping between IPA and GSI versions in the definition of the ipa_version enumerated type remains. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit f8ae7bbec726f4d09ca19ecea45ea147b8801e10 Author: Xie He Date: Wed Nov 4 23:34:34 2020 -0800 net: x25_asy: Delete the x25_asy driver This driver transports LAPB (X.25 link layer) frames over TTY links. I can safely say that this driver has no actual user because it was not working at all until: commit 8fdcabeac398 ("drivers/net/wan/x25_asy: Fix to make it work") The code in its current state still has problems: 1. The uses of "struct x25_asy" in x25_asy_unesc (when receiving) and in x25_asy_write_wakeup (when sending) are not protected by locks against x25_asy_change_mtu's changing of the transmitting/receiving buffers. Also, all "netif_running" checks in this driver are not protected by locks against the ndo_stop function. 2. The driver stops all TTY read/write when the netif is down. I think this is not right because this may cause the last outgoing frame before the netif goes down to be incompletely transmitted, and the first incoming frame after the netif goes up to be incompletely received. And there may also be other problems. I was planning to fix these problems but after recent discussions about deleting other old networking code, I think we may just delete this driver, too. Signed-off-by: Xie He Acked-by: Martin Schiller Link: https://lore.kernel.org/r/20201105073434.429307-1-xie.he.0141@gmail.com Signed-off-by: Jakub Kicinski commit 5f33e64110f7ea281e777d11375670250b1a070a Author: Michael Tretter Date: Fri Sep 11 15:53:58 2020 +0200 drm/encoder: remove obsolete documentation of bridge In commit 05193dc38197 ("drm/bridge: Make the bridge chain a double-linked list") the bridge has been removed and replaced by a private field. Remove the leftover documentation of the removed field. Signed-off-by: Michael Tretter Reviewed-by: Laurent Pinchart Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200911135413.3654800-2-m.tretter@pengutronix.de commit 0012eeb370f8c33e8cfb58c1fa7d3e1307940d64 Author: Parshuram Thombare Date: Thu Nov 5 18:58:33 2020 +0100 net: macb: fix NULL dereference due to no pcs_config method This patch fixes NULL pointer dereference due to NULL pcs_config in pcs_ops. Fixes: e4e143e26ce8 ("net: macb: add support for high speed interface") Reported-by: Nicolas Ferre Link: https://lore.kernel.org/netdev/2db854c7-9ffb-328a-f346-f68982723d29@microchip.com/ Signed-off-by: Parshuram Thombare Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/1604599113-2488-1-git-send-email-pthombar@cadence.com Signed-off-by: Jakub Kicinski commit 6c196f36f5243b8814f471cba608b111a33f22df Author: Min Li Date: Thu Nov 5 22:52:09 2020 -0500 ptp: idt82p33: optimize _idt82p33_adjfine Use div_s64 so that the neg_adj is not needed. Signed-off-by: Min Li Acked-by: Richard Cochran Link: https://lore.kernel.org/r/1604634729-24960-3-git-send-email-min.li.xe@renesas.com Signed-off-by: Jakub Kicinski commit e4c6eb68343fb1cfe4bffc6802180e91826f76af Author: Min Li Date: Thu Nov 5 22:52:08 2020 -0500 ptp: idt82p33: use i2c_master_send for bus write Refactor idt82p33_xfer and use i2c_master_send for write operation. Because some I2C controllers are only working with single-burst write transaction. Signed-off-by: Min Li Acked-by: Richard Cochran Link: https://lore.kernel.org/r/1604634729-24960-2-git-send-email-min.li.xe@renesas.com Signed-off-by: Jakub Kicinski commit e014ae39493f6d527f636260117709c1f81b3d57 Author: Min Li Date: Thu Nov 5 22:52:07 2020 -0500 ptp: idt82p33: add adjphase support Add idt82p33_adjphase() to support PHC write phase mode. Signed-off-by: Min Li Acked-by: Richard Cochran Link: https://lore.kernel.org/r/1604634729-24960-1-git-send-email-min.li.xe@renesas.com Signed-off-by: Jakub Kicinski commit 419a38cecf14f137c84e76e5fc5b46cac48f34c9 Author: Menglong Dong Date: Wed Nov 4 20:54:04 2020 -0500 net: macvlan: remove redundant initialization in macvlan_dev_netpoll_setup The initialization for err with 0 seems useless, as it is soon updated with -ENOMEM. So, we can remove it. Changes since v1: -Keep -ENOMEM still. Signed-off-by: Menglong Dong Link: https://lore.kernel.org/r/1604541244-3241-1-git-send-email-dong.menglong@zte.com.cn Signed-off-by: Jakub Kicinski commit ea8146c6845799142aa4ee2660741c215e340cdf Author: Kaixu Xia Date: Wed Nov 4 13:24:04 2020 +0800 cxgb4: Fix the -Wmisleading-indentation warning Fix the gcc warning: drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c:2673:9: warning: this 'for' clause does not guard... [-Wmisleading-indentation] 2673 | for (i = 0; i < n; ++i) \ Reported-by: Tosk Robot Signed-off-by: Kaixu Xia Link: https://lore.kernel.org/r/1604467444-23043-1-git-send-email-kaixuxia@tencent.com Signed-off-by: Jakub Kicinski commit 0798827b47d3d9a56ef8985f1f7c8456994572ed Merge: ad8fc41c7845f 253761a0e61b7 Author: Jakub Kicinski Date: Sat Nov 7 11:13:55 2020 -0800 Merge branch 'net-axienet-dynamically-enable-mdio-interface' Radhey Shyam Pandey says: ==================== net: axienet: Dynamically enable MDIO interface This patchset dynamically enable MDIO interface. The background for this change is coming from Cadence GEM controller(macb) in which MDC is active only during MDIO read or write operations while the PHY registers are read or written. It is implemented as an IP feature. For axiethernet as dynamic MDC enable/disable is not supported in hw we are implementing it in sw. This change doesn't affect any existing functionality. ==================== Link: https://lore.kernel.org/r/1604402770-78045-1-git-send-email-radhey.shyam.pandey@xilinx.com Signed-off-by: Jakub Kicinski commit 253761a0e61b7128460e26e74f57356e3eb2072e Author: Clayton Rayment Date: Tue Nov 3 16:56:10 2020 +0530 net: xilinx: axiethernet: Enable dynamic MDIO MDC MDIO spec does not require an MDC at all times, only when MDIO transactions are occurring. This patch allows the xilinx_axienet driver to disable the MDC when not in use, and re-enable it when needed. It also simplifies the driver by removing MDC disable and enable in device reset sequence. Signed-off-by: Clayton Rayment Signed-off-by: Radhey Shyam Pandey Signed-off-by: Jakub Kicinski commit 6c3cbaa0f0cb86376010ffa045334a1ec34689ac Author: Radhey Shyam Pandey Date: Tue Nov 3 16:56:09 2020 +0530 net: xilinx: axiethernet: Introduce helper functions for MDC enable/disable Introduce helper functions to enable/disable MDIO interface clock. This change serves a preparatory patch for the coming feature to dynamically control the management bus clock. Signed-off-by: Radhey Shyam Pandey Signed-off-by: Jakub Kicinski commit ad8fc41c7845f3813b07fb0039244be81a37d23f Merge: ae0d0bb29b311 158d31da1cc16 Author: Jakub Kicinski Date: Sat Nov 7 10:41:16 2020 -0800 Merge branch 'net-convert-tasklets-to-use-new-tasklet_setup-api' Allen Pais says: ==================== net: convert tasklets to use new tasklet_setup API Commit 12cc923f1ccc ("tasklet: Introduce new initialization API")' introduced a new tasklet initialization API. This series converts all the net/* drivers to use the new tasklet_setup() API The following series is based on net-next (9faebeb2d) v3: introduce qdisc_from_priv, suggested by Eric Dumazet. v2: get rid of QDISC_ALIGN() v1: fix kerneldoc ==================== Link: https://lore.kernel.org/r/20201103091823.586717-1-allen.lkml@gmail.com Signed-off-by: Jakub Kicinski commit 158d31da1cc168dd69a804fde2844182647e8eab Author: Allen Pais Date: Tue Nov 3 14:48:23 2020 +0530 net: xfrm: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Acked-by: Steffen Klassert Signed-off-by: Jakub Kicinski commit fcb8e3a328ed4d1624b3ccd5a4c1c67f9cd561d9 Author: Allen Pais Date: Tue Nov 3 14:48:22 2020 +0530 net: smc: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Acked-by: Karsten Graul Signed-off-by: Jakub Kicinski commit 6e1978a9a941d342a8b2e6432f52e07d4af86e21 Author: Allen Pais Date: Tue Nov 3 14:48:21 2020 +0530 net: sched: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: Jakub Kicinski commit b5bd8b62df4f58875b65e6e699ca371b4425194c Author: Allen Pais Date: Tue Nov 3 14:48:19 2020 +0530 net: mac802154: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Acked-by: Stefan Schmidt Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: Jakub Kicinski commit da1cad7342a14c7027d95e361878b3442f1d93ad Author: Allen Pais Date: Tue Nov 3 14:48:18 2020 +0530 net: mac80211: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Reviewed-by: Johannes Berg Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: Jakub Kicinski commit c6533ca87a061faac419846d792f6afcec755ffd Author: Allen Pais Date: Tue Nov 3 14:48:17 2020 +0530 net: ipv4: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: Jakub Kicinski commit fccf290f797609c77492b943176e44b883749a6f Author: Allen Pais Date: Tue Nov 3 14:48:16 2020 +0530 net: dccp: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: Jakub Kicinski commit ef63b043ac8645d2540d7b50dd3e09c53db3d504 Author: Sumeet Pawnikar Date: Fri Nov 6 22:36:33 2020 +0530 thermal: intel: pch: fix S0ix failure due to PCH temperature above threshold When system tries to enter S0ix suspend state, just after active load scenarios, it fails due to PCH current temperature is higher than set threshold. This patch introduces delay loop mechanism that allows PCH temperature to go down below threshold during suspend so it won't fail to enter S0ix. Add delay loop timeout and count as module parameters for user to tune it, if required based on system design. This change notifies the different warning messages like when PCH temperature above the threshold and executing delay loop. Also, notify the messages when it success or failure for S0ix entry. Previously out of 1000 runs around 3 to 5 times it might fail to enter S0ix just after heavy workload. With this change, S0ix failures reduced as PCH cools down below threshold. Signed-off-by: Sumeet Pawnikar Reviewed-by: Zhang Rui Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201106170633.20838-1-sumeet.r.pawnikar@intel.com commit c1ff4e3f40892cf99be91f3cdd1bd5a421f3de9c Author: Fabien Parent Date: Fri Oct 23 15:31:29 2020 +0200 drm/mediatek: Add DDP support for MT8167 Add DDP support for MT8167 SoC. Signed-off-by: Fabien Parent Signed-off-by: Chun-Kuang Hu commit f376244df414406893b7eca94cdf222d376cb5e7 Author: Fabien Parent Date: Fri Oct 23 15:31:28 2020 +0200 drm/mediatek: Add disp-color MT8167 support Add support for disp-color on MT8167 SoC. Signed-off-by: Fabien Parent Signed-off-by: Chun-Kuang Hu commit ca3407a1caa1c7e6a499b133f8b456ed637760ce Author: Fabien Parent Date: Fri Oct 23 15:31:26 2020 +0200 dt-bindings: display: mediatek: disp: add documentation for MT8167 SoC Add binding documentation for the MT8167 SoC Signed-off-by: Fabien Parent Acked-by: Rob Herring Signed-off-by: Chun-Kuang Hu commit 9db946284e07bb27309dd546b7fee528664ba82a Author: Seung-Woo Kim Date: Wed Oct 28 10:52:47 2020 +0900 brcmfmac: Fix memory leak for unpaired brcmf_{alloc/free} There are missig brcmf_free() for brcmf_alloc(). Fix memory leak by adding missed brcmf_free(). Reported-by: Jaehoon Chung Fixes: a1f5aac1765a ("brcmfmac: don't realloc wiphy during PCIe reset") Signed-off-by: Seung-Woo Kim Reviewed-by: Arend van Spriel Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1603849967-22817-1-git-send-email-sw0312.kim@samsung.com commit 398d816a64eb3614c7a7b58291292ce2c756b6a1 Author: Lee Jones Date: Mon Nov 2 11:24:03 2020 +0000 rtlwifi: rtl8821ae: Place braces around empty if() body Fixes the following W=1 kernel build warning(s): drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c: In function ‘_rtl8812ae_phy_get_txpower_limit’: drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c:2453:3: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] Cc: Ping-Ke Shih Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Larry Finger Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201102112410.1049272-35-lee.jones@linaro.org commit 29c6099a38903ee5db7581af0ef4a507eaab3aa9 Author: Lee Jones Date: Mon Nov 2 11:24:02 2020 +0000 rtlwifi: rtl8821ae: phy: Remove a couple of unused variables Fixes the following W=1 kernel build warning(s): drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c: In function ‘rtl8821ae_phy_switch_wirelessband’: drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c:597:14: warning: variable ‘rxpath’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c:597:6: warning: variable ‘txpath’ set but not used [-Wunused-but-set-variable] Cc: Ping-Ke Shih Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Larry Finger Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201102112410.1049272-34-lee.jones@linaro.org commit 44ec6d9df96ddd5b5b18a58c8bb9b45fe843bfb7 Author: Lee Jones Date: Mon Nov 2 11:24:01 2020 +0000 rtlwifi: rtl8723be: Remove set but unused variable 'cck_highpwr' Fixes the following W=1 kernel build warning(s): drivers/net/wireless/realtek/rtlwifi/rtl8723be/trx.c: In function ‘_rtl8723be_query_rxphystatus’: drivers/net/wireless/realtek/rtlwifi/rtl8723be/trx.c:53:6: warning: variable ‘cck_highpwr’ set but not used [-Wunused-but-set-variable] Cc: Ping-Ke Shih Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201102112410.1049272-33-lee.jones@linaro.org commit 28f8118762624624770784c19cef99f633ccb13b Author: Lee Jones Date: Mon Nov 2 11:23:59 2020 +0000 rtlwifi: halbtc8821a2ant: Remove a bunch of unused variables Fixes the following W=1 kernel build warning(s): drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c: In function ‘btc8821a2ant_action_bt_inquiry’: drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:1451:40: warning: variable ‘bt_rssi_state’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:1451:22: warning: variable ‘wifi_rssi_state1’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:1451:5: warning: variable ‘wifi_rssi_state’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c: In function ‘btc8821a2ant_action_wifi_idle_process’: drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:1519:40: warning: variable ‘bt_rssi_state’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:1519:5: warning: variable ‘wifi_rssi_state’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c: In function ‘btc8821a2ant_action_pan_hs’: drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:2990:22: warning: variable ‘wifi_rssi_state1’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c: In function ‘btc8821a2ant_action_hid_a2dp’: drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:3277:22: warning: variable ‘wifi_rssi_state1’ set but not used [-Wunused-but-set-variable] Cc: Ping-Ke Shih Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Larry Finger Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201102112410.1049272-31-lee.jones@linaro.org commit 6c75eab0417b9e5b05a18dbfc373e27a8ef876d8 Author: Lee Jones Date: Mon Nov 2 11:23:58 2020 +0000 rtlwifi: rtl8188ee: Remove set but unused variable 'reg_ea4' Fixes the following W=1 kernel build warning(s): drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c: In function ‘_rtl88e_phy_path_a_iqk’: drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c:1351:33: warning: variable ‘reg_ea4’ set but not used [-Wunused-but-set-variable] Cc: Ping-Ke Shih Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Larry Finger Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201102112410.1049272-30-lee.jones@linaro.org commit 0a43d993ee7ecd2c512cb529f02103616e4551c6 Author: Lee Jones Date: Mon Nov 2 11:23:57 2020 +0000 rtlwifi: rtl8723be: Remove set but unused variable 'lc_cal' Fixes the following W=1 kernel build warning(s): drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c: In function ‘_rtl8723be_phy_lc_calibrate’: drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c:2181:36: warning: variable ‘lc_cal’ set but not used [-Wunused-but-set-variable] Cc: Ping-Ke Shih Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Larry Finger Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201102112410.1049272-29-lee.jones@linaro.org commit 0c73dab72f53a75aaa6a315c7982123101581a51 Author: Lee Jones Date: Mon Nov 2 11:23:56 2020 +0000 rtlwifi: halbtc8821a1ant: Remove set but unused variable 'wifi_rssi_state' Fixes the following W=1 kernel build warning(s): drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c: In function ‘btc8821a1ant_run_coexist_mechanism’: drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c:1904:5: warning: variable ‘wifi_rssi_state’ set but not used [-Wunused-but-set-variable] Cc: Ping-Ke Shih Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Larry Finger Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201102112410.1049272-28-lee.jones@linaro.org commit 87b08d1ecb93b0625e31403bc2fd30572f7e9aba Author: Lee Jones Date: Mon Nov 2 11:23:55 2020 +0000 rtlwifi: phy: Remove set but unused variable 'bbvalue' Fixes the following W=1 kernel build warning(s): drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c: In function ‘_rtl8723e_phy_iq_calibrate’: drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c:1150:6: warning: variable ‘bbvalue’ set but not used [-Wunused-but-set-variable] Cc: Ping-Ke Shih Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Larry Finger Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201102112410.1049272-27-lee.jones@linaro.org commit bb053d0251a2c4a7418f0b2ff65472cf2dd17a95 Author: Lee Jones Date: Mon Nov 2 11:23:54 2020 +0000 rtlwifi: halbtc8723b2ant: Remove a bunch of set but unused variables Fixes the following W=1 kernel build warning(s): drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c: In function ‘btc8723b2ant_action_wifi_idle_process’: drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:1631:40: warning: variable ‘bt_rssi_state’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:1631:5: warning: variable ‘wifi_rssi_state’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c: In function ‘btc8723b2ant_action_sco’: drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:2767:5: warning: variable ‘wifi_rssi_state’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c: In function ‘btc8723b2ant_action_hid’: drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:2810:5: warning: variable ‘wifi_rssi_state’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c: In function ‘btc8723b2ant_action_a2dp’: drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:2855:5: warning: variable ‘wifi_rssi_state’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c: In function ‘btc8723b2ant_action_a2dp_pan_hs’: drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:2929:5: warning: variable ‘wifi_rssi_state’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c: In function ‘btc8723b2ant_action_pan_edr’: drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:2976:5: warning: variable ‘wifi_rssi_state’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c: In function ‘btc8723b2ant_action_pan_hs’: drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3028:22: warning: variable ‘wifi_rssi_state1’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3028:5: warning: variable ‘wifi_rssi_state’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c: In function ‘btc8723b2ant_action_pan_edr_a2dp’: drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3066:5: warning: variable ‘wifi_rssi_state’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c: In function ‘btc8723b2ant_action_pan_edr_hid’: drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3121:5: warning: variable ‘wifi_rssi_state’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c: In function ‘btc8723b2ant_action_hid_a2dp_pan_edr’: drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3185:5: warning: variable ‘wifi_rssi_state’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c: In function ‘btc8723b2ant_action_hid_a2dp’: drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3244:5: warning: variable ‘wifi_rssi_state’ set but not used [-Wunused-but-set-variable] Cc: Ping-Ke Shih Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Larry Finger Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201102112410.1049272-26-lee.jones@linaro.org commit 906a1b4f81a32492e38aedf6d6ee91675e32d83f Author: Lee Jones Date: Mon Nov 2 11:23:34 2020 +0000 rtlwifi: rtl8192cu: trx: Demote clear abuse of kernel-doc format Fixes the following W=1 kernel build warning(s): drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c:455: warning: Function parameter or member 'txdesc' not described in '_rtl_tx_desc_checksum' Cc: Ping-Ke Shih Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Larry Finger Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201102112410.1049272-6-lee.jones@linaro.org commit 230f874e4d955d7541c7ebf1e4e493a27f2094f7 Author: Lee Jones Date: Mon Nov 2 11:23:32 2020 +0000 rtlwifi: rtl8192cu: mac: Fix some missing/ill-documented function parameters Fixes the following W=1 kernel build warning(s): drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.c:124: warning: Function parameter or member 'hw' not described in 'rtl92c_llt_write' drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.c:124: warning: Excess function parameter 'io' description in 'rtl92c_llt_write' drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.c:155: warning: Function parameter or member 'hw' not described in 'rtl92c_init_llt_table' drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.c:155: warning: Excess function parameter 'io' description in 'rtl92c_init_llt_table' Cc: Ping-Ke Shih Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Larry Finger Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201102112410.1049272-4-lee.jones@linaro.org commit dff07dda8eb55b68e81629a01d8677b250fd2a66 Author: Lee Jones Date: Mon Nov 2 11:24:07 2020 +0000 rtw88: rtw8822c: Remove unused variable 'corr_val' Fixes the following W=1 kernel build warning(s): drivers/net/wireless/realtek/rtw88/rtw8822c.c: In function ‘rtw8822c_dpk_dc_corr_check’: drivers/net/wireless/realtek/rtw88/rtw8822c.c:2445:5: warning: variable ‘corr_val’ set but not used [-Wunused-but-set-variable] Cc: Yan-Hsuan Chuang Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201102112410.1049272-39-lee.jones@linaro.org Link: https://lore.kernel.org/r/20201102112410.1049272-39-lee.jones@linaro.org commit 409d1c82bf89415495e8ec1fc2268fa8e9fbe0f1 Author: Lee Jones Date: Mon Nov 2 11:24:04 2020 +0000 wlcore: spi: Demote a non-compliant function header, fix another Fixes the following W=1 kernel build warning(s): drivers/net/wireless/ti/wlcore/spi.c:403: warning: Function parameter or member 'child' not described in 'wl12xx_spi_set_block_size' drivers/net/wireless/ti/wlcore/spi.c:403: warning: Function parameter or member 'blksz' not described in 'wl12xx_spi_set_block_size' drivers/net/wireless/ti/wlcore/spi.c:440: warning: Excess function parameter 'res' description in 'wlcore_probe_of' Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Geert Uytterhoeven Cc: Luciano Coelho Cc: Juuso Oikarinen Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201102112410.1049272-36-lee.jones@linaro.org Link: https://lore.kernel.org/r/20201102112410.1049272-37-lee.jones@linaro.org commit 5e43d496cd8ee4a1c2ddf8831321ee2e0e018492 Author: Lee Jones Date: Mon Nov 2 11:24:00 2020 +0000 mwifiex: pcie: Remove a couple of unchecked 'ret's Fixes the following W=1 kernel build warning(s): drivers/net/wireless/marvell/mwifiex/pcie.c: In function ‘mwifiex_pcie_remove’: drivers/net/wireless/marvell/mwifiex/pcie.c:432:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/marvell/mwifiex/pcie.c: In function ‘mwifiex_cleanup_pcie’: drivers/net/wireless/marvell/mwifiex/pcie.c:3142:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] Cc: Amitkumar Karwar Cc: Ganapathi Bhat Cc: Xinming Hu Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201102112410.1049272-32-lee.jones@linaro.org commit 8b8a6f8c3b50193d161c598a6784e721128d6dc3 Author: Lee Jones Date: Mon Nov 2 11:23:53 2020 +0000 wl3501_cs: Fix misspelling and provide missing documentation Fixes the following W=1 kernel build warning(s): In file included from drivers/net/wireless/wl3501_cs.c:57: drivers/net/wireless/wl3501_cs.c:143: warning: Function parameter or member 'reg_domain' not described in 'iw_valid_channel' drivers/net/wireless/wl3501_cs.c:143: warning: Excess function parameter 'reg_comain' description in 'iw_valid_channel' drivers/net/wireless/wl3501_cs.c:469: warning: Function parameter or member 'data' not described in 'wl3501_send_pkt' drivers/net/wireless/wl3501_cs.c:469: warning: Function parameter or member 'len' not described in 'wl3501_send_pkt' Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Fox Chen Cc: de Melo Cc: Gustavo Niemeyer Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201102112410.1049272-25-lee.jones@linaro.org commit 9afcf32236751779f1bb2e043605de6201268cf0 Author: Lee Jones Date: Mon Nov 2 11:23:43 2020 +0000 prism54: isl_ioctl: Fix one function header and demote another Fixes the following W=1 kernel build warning(s): from drivers/net/wireless/intersil/prism54/isl_ioctl.c:22: inlined from ‘prism54_get_name’ at drivers/net/wireless/intersil/prism54/isl_ioctl.c:283:2: drivers/net/wireless/intersil/prism54/isl_ioctl.c:68: warning: Function parameter or member 'priv' not described in 'prism54_mib_mode_helper' drivers/net/wireless/intersil/prism54/isl_ioctl.c:68: warning: Excess function parameter 'mib' description in 'prism54_mib_mode_helper' drivers/net/wireless/intersil/prism54/isl_ioctl.c:127: warning: Function parameter or member 'priv' not described in 'prism54_mib_init' Cc: Luis Chamberlain Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Aurelien Alleaume Cc: Valerio Riedel Cc: "Luis R. Rodriguez" Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201102112410.1049272-15-lee.jones@linaro.org commit 641291eca88c0209a0dba1eb32413101e0002352 Author: Lee Jones Date: Mon Nov 2 11:23:38 2020 +0000 wl1251: cmd: Rename 'len' to 'buf_len' in the documentation Fixes the following W=1 kernel build warning(s): drivers/net/wireless/ti/wl1251/cmd.c:70: warning: Function parameter or member 'buf_len' not described in 'wl1251_cmd_test' drivers/net/wireless/ti/wl1251/cmd.c:70: warning: Excess function parameter 'len' description in 'wl1251_cmd_test' Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201102112410.1049272-10-lee.jones@linaro.org commit 9bd28c6607babb92888ba42f5deb6b0d5000a376 Author: Lee Jones Date: Mon Nov 2 11:23:47 2020 +0000 brcmfmac: fweh: Add missing description for 'gfp' Fixes the following W=1 kernel build warning(s): drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c:394: warning: Function parameter or member 'gfp' not described in 'brcmf_fweh_process_event' Cc: Arend van Spriel Cc: Franky Lin Cc: Hante Meuleman Cc: Chi-Hsien Lin Cc: Wright Feng Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: brcm80211-dev-list.pdl@broadcom.com Cc: brcm80211-dev-list@cypress.com Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201102112410.1049272-19-lee.jones@linaro.org commit 05cefa989e8bf9f058943a5a6a45f95cf87cf936 Author: Lee Jones Date: Mon Nov 2 11:23:36 2020 +0000 brcmfmac: pcie: Provide description for missing function parameter 'devinfo' Fixes the following W=1 kernel build warning(s): drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c:766: warning: Function parameter or member 'devinfo' not described in 'brcmf_pcie_bus_console_read' Cc: Arend van Spriel Cc: Franky Lin Cc: Hante Meuleman Cc: Chi-Hsien Lin Cc: Wright Feng Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Sumit Semwal Cc: "Christian König" Cc: linux-wireless@vger.kernel.org Cc: brcm80211-dev-list.pdl@broadcom.com Cc: brcm80211-dev-list@cypress.com Cc: netdev@vger.kernel.org Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201102112410.1049272-8-lee.jones@linaro.org commit 6f0d044fc82e304930ec0fd12ad396351c900f84 Author: Lee Jones Date: Mon Nov 2 11:23:35 2020 +0000 brcmfmac: bcmsdh: Fix description for function parameter 'pktlist' Fixes the following W=1 kernel build warning(s): drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c:380: warning: Function parameter or member 'pktlist' not described in 'brcmf_sdiod_sglist_rw' drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c:380: warning: Excess function parameter 'pkt' description in 'brcmf_sdiod_sglist_rw' Cc: Arend van Spriel Cc: Franky Lin Cc: Hante Meuleman Cc: Chi-Hsien Lin Cc: Wright Feng Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: brcm80211-dev-list.pdl@broadcom.com Cc: brcm80211-dev-list@cypress.com Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201102112410.1049272-7-lee.jones@linaro.org commit 63636b385e39e0ef1beba89cfb5c494360335196 Author: Lee Jones Date: Mon Nov 2 11:23:33 2020 +0000 rsi: rsi_91x_usb_ops: Source file headers are not good candidates for kernel-doc Fixes the following W=1 kernel build warning(s): drivers/net/wireless/rsi/rsi_91x_usb_ops.c:22: warning: Incorrect use of kernel-doc format: * rsi_usb_rx_thread() - This is a kernel thread to receive the packets from drivers/net/wireless/rsi/rsi_91x_usb_ops.c:29: warning: Function parameter or member 'common' not described in 'rsi_usb_rx_thread' Cc: Amitkumar Karwar Cc: Siva Rebbagondla Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201102112410.1049272-5-lee.jones@linaro.org commit f21e6c5822f27a5f4dfb76dde9e1e7f7220b24d5 Author: Lee Jones Date: Mon Nov 2 11:23:31 2020 +0000 rsi: rsi_91x_usb: Fix some basic kernel-doc issues Fixes the following W=1 kernel build warning(s): drivers/net/wireless/rsi/rsi_91x_usb.c:26: warning: cannot understand function prototype: 'u16 dev_oper_mode = DEV_OPMODE_STA_BT_DUAL; ' drivers/net/wireless/rsi/rsi_91x_usb.c:88: warning: Function parameter or member 'endpoint' not described in 'rsi_write_multiple' drivers/net/wireless/rsi/rsi_91x_usb.c:88: warning: Excess function parameter 'addr' description in 'rsi_write_multiple' drivers/net/wireless/rsi/rsi_91x_usb.c:320: warning: Function parameter or member 'ep_num' not described in 'rsi_rx_urb_submit' drivers/net/wireless/rsi/rsi_91x_usb.c:320: warning: Function parameter or member 'mem_flags' not described in 'rsi_rx_urb_submit' Cc: Amitkumar Karwar Cc: Siva Rebbagondla Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201102112410.1049272-3-lee.jones@linaro.org commit 5447626910f5b8d964761ed4fa4feaf1a3ac47d0 Author: Markov Mikhail Date: Wed Nov 4 15:25:24 2020 +0100 rt2x00: save survey for every channel visited rt2800 only gives you survey for current channel. Survey-based ACS algorithms are failing to perform their job when working with rt2800. Make rt2800 save survey for every channel visited and be able to give away that information. There is a bug registered https://dev.archive.openwrt.org/ticket/19081 and this patch solves the issue. Signed-off-by: Markov Mikhail sgruszka: remove unused variable Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201104142524.94375-1-stf_xl@wp.pl commit 50c61ae15865ea008b38d25b5c0c88556a662547 Author: Sebastian Andrzej Siewior Date: Sun Nov 1 22:15:36 2020 +0100 rtlwifi: Remove in_interrupt() usage in halbtc_send_bt_mp_operation() halbtc_send_bt_mp_operation() uses in_interrupt() to determine if it is safe to invoke wait_for_completion(). The usage of in_interrupt() in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be separated or the context be conveyed in an argument passed by the caller, which usually knows the context. Aside of that in_interrupt() is not correct as it does not catch preempt disabled regions which neither can sleep. halbtc_send_bt_mp_operation() is called from: rtl_watchdog_wq_callback() rtl_btc_periodical() halbtc_get() case BTC_GET_U4_BT_PATCH_VER: halbtc_get_bt_patch_version() which is preemtible context. rtl_c2h_content_parsing() btc_ops->btc_btinfo_notify() rtl_btc_btinfo_notify() exhalbtc_bt_info_notify() ex_btc8723b1ant_bt_info_notify() ex_btc8821a1ant_bt_info_notify() ex_btc8821a2ant_bt_info_notify() btcoexist->btc_set_bt_reg() halbtc_set_bt_reg() rtl_c2h_content_parsing() is in turn called from: rtl_c2hcmd_wq_callback() rtl_c2hcmd_launcher() which is preemptible context and from: _rtl_pci_rx_interrupt rtl_c2hcmd_enqueue() which is obviously not preemptible but limited to C2H_BT_MP commands which does invoke rtl_c2h_content_parsing(). Aside of that it can be reached from: halbtc_get() case BTC_GET_U4_SUPPORTED_FEATURE: halbtc_get_bt_coex_supported_feature() case BTC_GET_U4_BT_FORBIDDEN_SLOT_VAL: halbtc_get_bt_forbidden_slot_val() case BTC_GET_U4_BT_DEVICE_INFO: halbtc_get_bt_device_info() case BTC_GET_U4_SUPPORTED_VERSION: halbtc_get_bt_coex_supported_version() case BTC_GET_U4_SUPPORTED_FEATURE: halbtc_get_bt_coex_supported_feature() btcoexist->btc_get_bt_afh_map_from_bt() halbtc_get_bt_afh_map_from_bt() btcoexist->btc_get_ble_scan_para_from_bt() halbtc_get_ble_scan_para_from_bt() btcoexist->btc_get_ble_scan_type_from_bt() halbtc_get_ble_scan_type_from_bt() btcoexist->btc_get_ant_det_val_from_bt() halbtc_get_ant_det_val_from_bt() btcoexist->btc_get_bt_coex_supported_version() halbtc_get_bt_coex_supported_version() btcoexist->btc_get_bt_coex_supported_feature() halbtc_get_bt_coex_supported_feature() None of these have a caller. Welcome to the wonderful world of HALs and onion layers. Remove in_interrupt() check. Signed-off-by: Sebastian Andrzej Siewior Cc: Ping-Ke Shih Cc: Kalle Valo Cc: linux-wireless@vger.kernel.org Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201101211536.2966644-9-bigeasy@linutronix.de commit 317f688b0a541808104de9a6e8cff88c602e00cf Author: Sebastian Andrzej Siewior Date: Sun Nov 1 22:15:35 2020 +0100 rtlwifi: Remove in_interrupt() usage in is_any_client_connect_to_ap(). is_any_client_connect_to_ap() is using in_interrupt() to determine whether it should acquire the lock prior accessing the list. The usage of in_interrupt() in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be separated or the context be conveyed in an argument passed by the caller, which usually knows the context. The function is called from: - halbtc_get() - halbtc_get() halbtc_get_wifi_link_status() - halbtc_display_dbg_msg() halbtc_display_wifi_status() halbtc_get_wifi_link_status() All top level callers are part of the btc_coexist callback inferface and are never invoked from a context which can hold the lock already. The contexts which hold the lock are either protecting list add/del operations or list walks which never call into any of the btc_coexist interfaces. In fact the conditional is outright dangerous because if this function would be invoked from a BH disabled context the check would avoid taking the lock while on another CPU the list could be manipulated under the lock. Remove the in_interrupt() check and always acquire the lock. To simplify the code further use list_empty() instead of walking the list and counting the entries just to check the count for > 0 at the end. Signed-off-by: Sebastian Andrzej Siewior Cc: Ping-Ke Shih Cc: Kalle Valo Cc: linux-wireless@vger.kernel.org Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201101211536.2966644-8-bigeasy@linutronix.de commit abcda807d8681923fd7b79ea08b78f684e6cb570 Author: Sebastian Andrzej Siewior Date: Sun Nov 1 22:15:34 2020 +0100 zd1211rw: Remove in_atomic() usage. The usage of in_atomic() in driver code is deprecated as it can not always detect all states where it is not allowed to sleep. All callers are in premptible thread context and all functions invoke core functions which have checks for invalid calling contexts already. Signed-off-by: Sebastian Andrzej Siewior Cc: Ulrich Kunitz Cc: Kalle Valo Cc: linux-wireless@vger.kernel.org Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201101211536.2966644-7-bigeasy@linutronix.de commit 7534fd5e58349d74550ba7e7d492e415c3ed9368 Author: Sebastian Andrzej Siewior Date: Sun Nov 1 22:15:33 2020 +0100 hostap: Remove in_atomic() check. hostap_get_wireless_stats() is the iw_handler_if::get_wireless_stats() callback of this driver. This callback was not allowed to sleep until commit a160ee69c6a46 ("wext: let get_wireless_stats() sleep") in v2.6.32. Remove the therefore pointless in_atomic() check. Signed-off-by: Sebastian Andrzej Siewior Cc: Jouni Malinen Cc: Kalle Valo Cc: linux-wireless@vger.kernel.org Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201101211536.2966644-6-bigeasy@linutronix.de commit 494e46d08d355294689a5811b54ae4ad01cdb95b Author: Sebastian Andrzej Siewior Date: Sun Nov 1 22:15:32 2020 +0100 airo: Replace in_atomic() usage. issuecommand() is using in_atomic() to decide if it is safe to invoke schedule() while waiting for the command to be accepted. Usage of in_atomic() for this is only half correct as it can not detect all condition where it is not allowed to schedule(). Also Linus clearly requested that code which changes behaviour depending on context should either be seperated or the context be conveyed in an argument passed by the caller, which usually knows the context. Add an may_sleep argument to issuecommand() indicating when it is save to sleep and change schedule() to cond_resched() because it's pointless to invoke schedule() if there is no request to reschedule. Pass the may_sleep condition through the various call chains leading to issuecommand(). Signed-off-by: Sebastian Andrzej Siewior Cc: Kalle Valo Cc: linux-wireless@vger.kernel.org Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201101211536.2966644-5-bigeasy@linutronix.de commit 49eb01995285361a398352d2ac403dd21f5e0c62 Author: Sebastian Andrzej Siewior Date: Sun Nov 1 22:15:31 2020 +0100 airo: Always use JOB_STATS and JOB_EVENT issuecommand() is using in_atomic() to decide if it is safe to invoke schedule() while waiting for the command to be accepted. Usage of in_atomic() for this is only half correct as it can not detect all condition where it is not allowed to schedule(). Also Linus clearly requested that code which changes behaviour depending on context should either be seperated or the context be conveyed in an argument passed by the caller, which usually knows the context. Chasing the call chains leading up to issuecommand() is straight forward, but airo_link() and airo_get_stats() would require to pass the context through a quite large amount of functions. As this is ancient hardware, avoid the churn and enforce the invocation of those functions through the JOB machinery. Signed-off-by: Sebastian Andrzej Siewior Cc: Kalle Valo Cc: linux-wireless@vger.kernel.org Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201101211536.2966644-4-bigeasy@linutronix.de commit 24bf941f2c96d889df8b892adae25c68b6678787 Author: Sebastian Andrzej Siewior Date: Sun Nov 1 22:15:30 2020 +0100 airo: Invoke airo_read_wireless_stats() directly airo_get_wireless_stats() is the iw_handler_if::get_wireless_stats() callback of this driver. This callback was not allowed to sleep until commit a160ee69c6a46 ("wext: let get_wireless_stats() sleep") in v2.6.32. airo still delegates the readout to a thread, which is not longer necessary. Invoke airo_read_wireless_stats() directly from the callback and remove the now unused JOB_WSTATS handling. Signed-off-by: Sebastian Andrzej Siewior Cc: Kalle Valo Cc: linux-wireless@vger.kernel.org Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201101211536.2966644-3-bigeasy@linutronix.de commit ce4dd05cbba697c748d9b665bd05467910318811 Author: Sebastian Andrzej Siewior Date: Sun Nov 1 22:15:29 2020 +0100 orinoco: Remove BUG_ON(in_interrupt/irq()) The usage of in_irq()/in_interrupt() in drivers is phased out and the BUG_ON()'s based on those are not covering all contexts in which these functions cannot be called. Aside of that BUG_ON() should only be used as last resort, which is clearly not the case here. A broad variety of checks in the invoked functions (always enabled or debug option dependent) cover these conditions already, so the BUG_ON()'s do not really provide additional value. Just remove them. Signed-off-by: Sebastian Andrzej Siewior Cc: Kalle Valo Cc: linux-wireless@vger.kernel.org Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201101211536.2966644-2-bigeasy@linutronix.de commit 28606150768a20b291a35dbbbb0ab4dd7d4739db Author: Tokunori Ikegami Date: Mon Nov 2 02:32:36 2020 +0900 rtl8xxxu: Add Buffalo WI-U3-866D to list of supported devices Buffalo WI-U3-866D is supported by the rtl8812au driver. Also RTL8812AU software supports the product RTL8192EU also. So add Buffalo WI-U3-866D with the RTL8192EU driver info. Signed-off-by: Tokunori Ikegami Cc: linux-wireless@vger.kernel.org Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201101173236.7851-1-ikegami.t@gmail.com commit fc3ac64a3a28682f856c920b97f8359c6a5ebd2c Author: Chin-Yen Lee Date: Fri Oct 30 16:48:26 2020 +0800 rtw88: decide lps deep mode from firmware feature. This patch checks the supported lps deep mode from firmware feature, and allows different firmware have different deep power mode. Original module parameter rtw_fw_lps_deep_mode is replaced with rtw_disable_lps_deep_mode for user to disable lps deep mode. Signed-off-by: Chin-Yen Lee Signed-off-by: Tzu-En Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201030084826.9034-5-tehuang@realtek.com commit f31e039fab38fb29104ef35c6c7d29e66a37adea Author: Chin-Yen Lee Date: Fri Oct 30 16:48:25 2020 +0800 rtw88: add C2H response for checking firmware leave lps Originally driver checks if firmware has left lps via reading the setting of REG_TCR register. But this way may fail when firmware is frequently changing power state. Therefore, firmware provides a safer option for driver. When firmware leaves lps successfully, it sends a C2H response to inform driver. Signed-off-by: Chin-Yen Lee Signed-off-by: Tzu-En Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201030084826.9034-4-tehuang@realtek.com commit a95949606828e1c9d91e5b05171b39ff147ced58 Author: Chin-Yen Lee Date: Fri Oct 30 16:48:24 2020 +0800 rtw88: store firmware feature in firmware header Some functions need the support of firmware with special version. In order to get the feature of current firmware, we store the information in firmware header and parse after firmware is loaded. The current feature list in firmware header includes checking leave lps via C2H and supported lps deep mode. Signed-off-by: Chin-Yen Lee Signed-off-by: Tzu-En Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201030084826.9034-3-tehuang@realtek.com commit 690390d841d262134ea12f0cd5e208de24c99ae8 Author: Chin-Yen Lee Date: Fri Oct 30 16:48:23 2020 +0800 rtw88: sync the power state between driver and firmware In current flow, driver issues power requests to firmware for entering or leaving deep power mode. But driver does not wait for an ack from firmware via reading CPWM register when driver requests to enter deep power mode. The behavior will lead to unsynchronized state between firmware and driver. Furthermore, consecutive same power requests may confuse firmware and leads to unexpected value of CPWM register. This patch ensures that the power request will wait for an ack from firmware and only send one power request each time. Signed-off-by: Chin-Yen Lee Signed-off-by: Tzu-En Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201030084826.9034-2-tehuang@realtek.com commit 842280da81a95b7bd2804eb77fa8750e189c93e0 Author: Ching-Te Ku Date: Fri Oct 30 13:55:06 2020 +0800 rtw88: coex: separate BLE HID profile from BLE profile BT firmware will report BLE-HID and BLE-RCU in different profile. We can distinguish the two profile from BT info now. Add the coexistence for BLE-HID coexistence, it can make BLE HID work more smoothly. BLE-HID need to Tx/Rx packet more frequently to respond user operation, but RCU doesn't. In the case of RCU coexistence, it will make Wi-Fi have a higher priority to earn more Wi-Fi throughput. If BLE-HID go for the same case, it will make user feel mouse is lagging. Desired BT firmware BT-COEX version: 0x1c Desired WL firmware version: 9.9 Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201030055506.6560-1-pkshih@realtek.com commit c521d7e0ff05257bb9128ab7e68b8e2c084ed361 Author: WeitaoWangoc Date: Tue Oct 27 11:16:20 2020 +0800 rtlwifi: Fix non-canonical address access issues During realtek USB wireless NIC initialization, it's unexpected disconnection will cause urb sumbmit fail. On the one hand, _rtl_usb_cleanup_rx will be called to clean up rx stuff, especially for rtl_wq. On the other hand, disconnection will cause rtl_usb_disconnect and _rtl_usb_cleanup_rx to be called. So, rtl_wq will be flush/destroy twice, which will cause non-canonical address 0xdead000000000122 access and general protection fault. Fixed this issue by remove _rtl_usb_cleanup_rx when urb sumbmit fail. Signed-off-by: WeitaoWangoc Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1603768580-2798-1-git-send-email-WeitaoWang-oc@zhaoxin.com commit d56fd83cf99c5e4b257f5be46531420509ba5066 Author: Remi Depommier Date: Tue Oct 20 13:46:39 2020 -0400 brcmfmac: fix SDIO access for big-endian host These full-mac chips use little-endian byte ordering. This patch adds a few missing conversions to/from little-endian so that the driver may be used with a big-endian host. Signed-off-by: Remi Depommier Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201020174639.28892-1-rde@setrix.com commit a70a04b3844f59c29573a8581d5c263225060dd6 Author: Ingo Molnar Date: Sat Nov 7 12:54:49 2020 +0100 locking/atomics: Regenerate the atomics-check SHA1's The include/asm-generic/atomic-instrumented.h checksum got out of sync, so regenerate it. (No change to actual code.) Also make scripts/atomic/gen-atomics.sh executable, to make it easier to use. The auto-generated atomic header signatures are now fine: thule:~/tip> scripts/atomic/check-atomics.sh thule:~/tip> Signed-off-by: Ingo Molnar Cc: linux-kernel@vger.kernel.org Cc: Peter Zijlstra Cc: Linus Torvalds Cc: Andrew Morton Cc: Thomas Gleixner Cc: Paul E. McKenney Cc: Will Deacon Signed-off-by: Ingo Molnar commit 666fab4a3ea143315a9c059fad9f3a0f1365d54b Merge: 0a986ea81e1aa 659caaf65dc9c Author: Ingo Molnar Date: Sat Nov 7 12:50:48 2020 +0100 Merge branch 'linus' into perf/kprobes Conflicts: include/asm-generic/atomic-instrumented.h kernel/kprobes.c Use the upstream atomic-instrumented.h checksum, and pick the kprobes version of kernel/kprobes.c, which effectively reverts this upstream workaround: 645f224e7ba2: ("kprobes: Tell lockdep about kprobe nesting") Since the new code *should* be fine without nesting. Knock on wood ... Signed-off-by: Ingo Molnar commit 0a986ea81e1aa8ac17e82cda53cc95158217956e Merge: 6e426e0fcd20c 36dadef23fcca Author: Ingo Molnar Date: Sat Nov 7 13:18:49 2020 +0100 Merge branch 'linus' into perf/kprobes Merge recent kprobes updates into perf/kprobes that came from -mm. Signed-off-by: Ingo Molnar commit 6ac6546973013b4b368cd3d3515f1e853658b6ce Author: Arnd Bergmann Date: Mon Oct 26 22:29:54 2020 +0100 rtw88: remove extraneous 'const' qualifier clang -Wextra warns about functions returning a 'const' integer: drivers/net/wireless/realtek/rtw88/rtw8822b.c:90:8: warning: 'const' type qualifier on return type has no effect [-Wignored-qualifiers] static const u8 rtw8822b_get_swing_index(struct rtw_dev *rtwdev) Remove the extra qualifier here. Fixes: c97ee3e0bea2 ("rtw88: add power tracking support") Signed-off-by: Arnd Bergmann Reviewed-by: Nathan Chancellor Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201026213040.3889546-7-arnd@kernel.org commit ef41937631bfee855e2b406e1d536efdaa9ce512 Author: Arnd Bergmann Date: Mon Oct 26 22:29:53 2020 +0100 rtlwifi: fix -Wpointer-sign warning There are thousands of warnings in a W=2 build from just one file: drivers/net/wireless/realtek/rtlwifi/rtl8821ae/table.c:3788:15: warning: pointer targets in initialization of 'u8 *' {aka 'unsigned char *'} from 'char *' differ in signedness [-Wpointer-sign] Change the types to consistently use 'const char *' for the strings. Signed-off-by: Arnd Bergmann Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201026213040.3889546-6-arnd@kernel.org commit 9fdd02aa59886300b60e1cc0a4af3653796d9bd8 Author: Arnd Bergmann Date: Mon Oct 26 22:29:49 2020 +0100 net: hostap: fix function cast warning gcc -Wextra complains about the function type cast: drivers/net/wireless/intersil/hostap/hostap_hw.c:3173:48: warning: cast between incompatible function types from ‘void (*)(struct tasklet_struct *)’ to ‘void (*)(long unsigned int)’ [-Wcast-function-type] Avoid this by just using the regular tasklet_setup() function instead of the incorrect homegrown version. Fixes: 7433c9690318 ("intersil: convert tasklets to use new tasklet_setup() API") Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201026213040.3889546-2-arnd@kernel.org commit 3287953b03994870c249ec57f55967cd1f7afbb8 Author: Tom Rix Date: Tue Oct 20 05:58:41 2020 -0700 wireless: remove unneeded break A break is not needed if it is preceded by a return Signed-off-by: Tom Rix Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201020125841.26791-1-trix@redhat.com commit 65277100caa2f2c62b6f3c4648b90d6f0435f3bc Author: Marek Vasut Date: Thu Oct 15 13:16:16 2020 +0200 rsi: Fix TX EAPOL packet handling against iwlwifi AP In case RSI9116 SDIO WiFi operates in STA mode against Intel 9260 in AP mode, the association fails. The former is using wpa_supplicant during association, the later is set up using hostapd: iwl$ cat hostapd.conf interface=wlp1s0 ssid=test country_code=DE hw_mode=g channel=1 wpa=2 wpa_passphrase=test wpa_key_mgmt=WPA-PSK iwl$ hostapd -d hostapd.conf rsi$ wpa_supplicant -i wlan0 -c <(wpa_passphrase test test) The problem is that the TX EAPOL data descriptor RSI_DESC_REQUIRE_CFM_TO_HOST flag and extended descriptor EAPOL4_CONFIRM frame type are not set in case the AP is iwlwifi, because in that case the TX EAPOL packet is 2 bytes shorter. The downstream vendor driver has this change in place already [1], however there is no explanation for it, neither is there any commit history from which such explanation could be obtained. [1] https://github.com/SiliconLabs/RS911X-nLink-OSD/blob/master/rsi/rsi_91x_hal.c#L238 Signed-off-by: Marek Vasut Cc: Angus Ainslie Cc: David S. Miller Cc: Jakub Kicinski Cc: Kalle Valo Cc: Lee Jones Cc: Martin Kepplinger Cc: Sebastian Krzyszkowiak Cc: Siva Rebbagondla Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201015111616.429220-1-marex@denx.de commit a821e3858e4dec2d6505258fea46e020af8532c6 Author: Gustavo A. R. Silva Date: Thu Oct 8 17:09:05 2020 -0500 wlcore: Use fallthrough pseudo-keyword In order to enable -Wimplicit-fallthrough for Clang[1], replace the existing /* fall-through */ comments with the new pseudo-keyword macro fallthrough[2]. [1] https://git.kernel.org/linus/e2079e93f562c7f7a030eb7642017ee5eabaaa10 [2] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201008220905.GA8040@embeddedor commit 256ff2ef6c14bcb4bf9707e4547b77c582753c00 Author: Gustavo A. R. Silva Date: Thu Oct 8 17:04:22 2020 -0500 ray_cs: Use fallthrough pseudo-keyword In order to enable -Wimplicit-fallthrough for Clang[1], replace the existing /* fall through */ comments with the new pseudo-keyword macro fallthrough[2]. [1] https://git.kernel.org/linus/e2079e93f562c7f7a030eb7642017ee5eabaaa10 [2] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201008220422.GA6926@embeddedor commit 7eae05184f3a89b1491061432830416ed71d09e2 Author: Allen Pais Date: Wed Oct 7 16:03:08 2020 +0530 wireless: mt7601u: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201007103309.363737-3-allen.lkml@gmail.com commit 982f589bde7a7f4c8a9f5d4c94fad02a9e8dcf3e Author: Stephen Boyd Date: Mon Nov 2 10:11:44 2020 -0800 drm/bridge: ti-sn65dsi86: Update reply on aux failures We should be setting the drm_dp_aux_msg::reply field if a NACK or a SHORT reply happens. Update the error bit handling logic in ti_sn_aux_transfer() to handle these cases and notify upper layers that such errors have happened. This helps the retry logic understand that a timeout has happened, or to shorten the read length if the panel isn't able to handle the longest read possible. Note: I don't have any hardware that exhibits these code paths so this is written based on reading the datasheet for this bridge and inspecting the code and how this is called. Changes in v2: - Move WRITE_STATUS_UPDATE check from case to assignment Changes in v2: - Handle WRITE_STATUS_UPDATE properly Reviewed-by: Douglas Anderson Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Cc: Sean Paul Acked-by: Sam Ravnborg Signed-off-by: Stephen Boyd Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201102181144.3469197-5-swboyd@chromium.org commit 58074b08c04af1817ab34be986a80279e7267d07 Author: Stephen Boyd Date: Mon Nov 2 10:11:43 2020 -0800 drm/bridge: ti-sn65dsi86: Read EDID blob over DDC Use the DDC connection to read the EDID from the eDP panel instead of relying on the panel to tell us the modes. Reviewed-by: Douglas Anderson Reviewed-by: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Cc: Sean Paul Acked-by: Sam Ravnborg Signed-off-by: Stephen Boyd Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201102181144.3469197-4-swboyd@chromium.org commit b38558e3059a37e356e39f29fa79591d1030ee7d Author: Stephen Boyd Date: Mon Nov 2 10:11:42 2020 -0800 drm/bridge: ti-sn65dsi86: Make polling a busy loop There's no reason we need to wait here to poll a register over i2c. The i2c bus is inherently slow and delays are practically part of the protocol because we have to wait for the device to respond to any request for a register. Let's rely on the sleeping of the i2c controller instead of adding any sort of delay here in the bridge driver. Reviewed-by: Douglas Anderson Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Cc: Sean Paul Acked-by: Sam Ravnborg Signed-off-by: Stephen Boyd Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201102181144.3469197-3-swboyd@chromium.org commit e4a6c18e60029ef8cccd5a50b24324082e10dbf0 Author: Stephen Boyd Date: Mon Nov 2 10:11:41 2020 -0800 drm/bridge: ti-sn65dsi86: Combine register accesses in ti_sn_aux_transfer() These register reads and writes are sometimes directly next to each other in the register address space. Let's use regmap bulk read/write APIs to get the data with one transfer instead of multiple i2c transfers. This helps cut down on the number of transfers in the case of something like reading an EDID where we read in blocks of 16 bytes at a time and the last for loop here is sending an i2c transfer for each of those 16 bytes, one at a time. Ouch! Changes in v3: - Undid changes in v2 Changes in v2: - Combined AUX_CMD register write Reviewed-by: Douglas Anderson Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Cc: Sean Paul Acked-by: Sam Ravnborg Signed-off-by: Stephen Boyd Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201102181144.3469197-2-swboyd@chromium.org commit 0cbbd5b1a012cdc324187889956ff2632025cb17 Author: Dmitry Baryshkov Date: Mon Nov 2 04:14:35 2020 +0300 drm: bridge: add support for lontium LT9611UXC bridge Add support for Lontium LT9611UXC HDMI bridge. Lontium LT9611UXC is a DSI to HDMI bridge which supports two DSI ports and I2S port as an input and HDMI port as output. Despite name being similar to LT9611, these devices are different enough to warrant separate driver. Signed-off-by: Dmitry Baryshkov Reviewed-by: Sam Ravnborg Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201102011435.1100930-3-dmitry.baryshkov@linaro.org commit 25d7361ff96abfbcca6e3233cc39f5a80c92543d Author: Dmitry Baryshkov Date: Mon Nov 2 04:14:34 2020 +0300 dt-bindings: display: bridge: Add documentation for LT9611UXC Lontium LT9611UXC is a DSI to HDMI bridge which supports 2 DSI ports and I2S port as input and one HDMI port as output. The LT9611UXC chip is handled by a separate driver, but the bindings used are fully compatible with the LT9611 chip, so let's reuse the lt9611.yaml schema. Signed-off-by: Dmitry Baryshkov Acked-by: Vinod Koul Acked-by: Sam Ravnborg Acked-by: Rob Herring Reviewed-by: Bjorn Andersson Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201102011435.1100930-2-dmitry.baryshkov@linaro.org commit d315c627a18249930750fe4eb2b21f3fe9b32ea4 Author: Andy Shevchenko Date: Fri Oct 30 18:59:19 2020 +0200 regmap: irq: Convert to use irq_domain_create_legacy() irq_domain_create_legacy() takes a fwnode as parameter contrary to irq_domain_add_legacy() which requires a OF node. Switch the regmap irq domain creation to use that new function so it is not longer limited to OF based usage. Signed-off-by: Andy Shevchenko Signed-off-by: Thomas Gleixner Reviewed-by: Rafael J. Wysocki Acked-by: Mark Brown Link: https://lore.kernel.org/r/20201030165919.86234-6-andriy.shevchenko@linux.intel.com commit b6e95788fde8c9bc9da729102085dd36a5a0cda6 Author: Andy Shevchenko Date: Fri Oct 30 18:59:18 2020 +0200 irqdomain: Introduce irq_domain_create_legacy() API Introduce irq_domain_create_legacy() API which is functional equivalent to the existing irq_domain_add_legacy(), but takes a pointer to the struct fwnode_handle as a parameter. This is useful for non OF systems. Signed-off-by: Andy Shevchenko Signed-off-by: Thomas Gleixner Reviewed-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20201030165919.86234-5-andriy.shevchenko@linux.intel.com commit c3a877fea962d9d0fb1e3747334699978f566930 Author: Andy Shevchenko Date: Fri Oct 30 18:59:17 2020 +0200 irqdomain: Replace open coded of_node_to_fwnode() of_node_to_fwnode() should be used for conversion. Replace the open coded variant of it in of_phandle_args_to_fwspec(). Signed-off-by: Andy Shevchenko Signed-off-by: Thomas Gleixner Reviewed-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20201030165919.86234-4-andriy.shevchenko@linux.intel.com commit 08219fb1efae451c83281cb6ba4bb6c35ac88fab Author: Andy Shevchenko Date: Fri Oct 30 18:59:16 2020 +0200 irqdomain: Add forward declaration of fwnode_handle irqdomain.h is a user of struct fwnode_handle. Add forward declaration of it. Signed-off-by: Andy Shevchenko Signed-off-by: Thomas Gleixner Reviewed-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20201030165919.86234-3-andriy.shevchenko@linux.intel.com commit eda2845ae5e0ae466c1aca715d642b4977311747 Author: Andy Shevchenko Date: Fri Oct 30 18:59:15 2020 +0200 irqdomain: Remove unused of_device_id forward declaration There is no users of of_device_id in irqdomain.h. Drop it. Signed-off-by: Andy Shevchenko Signed-off-by: Thomas Gleixner Reviewed-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20201030165919.86234-2-andriy.shevchenko@linux.intel.com commit fa7572c2cfe081dff82f884fa05f1b067d4beaaa Author: Carl Huang Date: Fri Nov 6 08:55:48 2020 +0200 ath11k: fix ZERO address in probe request Host needs to pass at least on bssid with all 0xff to firmware in WMI_START_SCAN_CMDID, otherwise the bssid and receiver address in probe requeste are all ZEROs. This also fixed some hidden AP connection issue because some AP doesn't respond to probe request which receiver address are all ZEROs. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201012101733.24137-1-cjhuang@codeaurora.org commit c9621dd21e3b86c5235545ed8eb27e1647cc7da4 Author: Lee Jones Date: Mon Nov 2 11:23:30 2020 +0000 wil6210: wmi: Correct misnamed function parameter 'ptr_' Fixes the following W=1 kernel build warning(s): drivers/net/wireless/ath/wil6210/wmi.c:279: warning: Function parameter or member 'ptr_' not described in 'wmi_buffer_block' drivers/net/wireless/ath/wil6210/wmi.c:279: warning: Excess function parameter 'ptr' description in 'wmi_buffer_block' Cc: Maya Erez Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: wil6210@qti.qualcomm.com Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201102112410.1049272-2-lee.jones@linaro.org commit 5336fad96e8f8c36a3b7faef765f69efa9fafd35 Author: Bryan O'Donoghue Date: Tue Nov 3 12:17:35 2020 +0000 wcn36xx: Enable firmware offloaded keepalive This patch calls wcn36xx_smd_keep_alive_req() on the STA patch immediately after associating with an AP. This will cause the firmware to send a NULL packet out to the AP every 30 seconds, thus offloading keep-alive processing from the SoC to the firmware. Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201103121735.291324-4-bryan.odonoghue@linaro.org commit 8def9ec46a5fafc0abcf34489a9e8a787bca984d Author: Bryan O'Donoghue Date: Tue Nov 3 12:17:34 2020 +0000 wcn36xx: Enable firmware link monitoring This patch switches on CONNECTION_MONITOR. Once done it is up to the firmware to send keep alive and to monitor the link state. Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201103121735.291324-3-bryan.odonoghue@linaro.org commit e24eedc09f14a533439f7f2b92273238b9ac5096 Author: Bryan O'Donoghue Date: Tue Nov 3 12:17:33 2020 +0000 wcn36xx: Set LINK_FAIL_TX_CNT to 1000 on all wcn36xx The firmware parameter LINK_FAIL_TX_CNT maps to the prima configuration file parameter gLinkFailTxCnt and is described as: quote: " If within gLinkFailTimeout period(values is mentioned in msec) if FW doesn't receive acks for gLinkFailTxCnt number of packets, then link will be disconnected." The downstream description sets a minimum value of 1000 a maximum value of 60000 and a default value of 6000, however it appears that unless we actually set this value deliberately firmware defaults it to 0. Setting this value to non-zero results in the firmware doing link monitoring. The working example from downstream paradoxically sets the value to 200, here we opt to set the value to the minimum stipulated in the configuration file 1000. In conjunction with ieee80211_hw_set(wcn->hw, CONNECTION_MONITOR); this change effects offload of link monitoring to the firmware. Tested with: 'CNSS-PR-2-0-1-2-c1-74-130449-3' wcn3620 'CNSS-PR-2-0-1-2-c1-00083' wcn3680 Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201103121735.291324-2-bryan.odonoghue@linaro.org commit ce54bf5e9554073d41eac3b2832cf3144f891d32 Author: Arnd Bergmann Date: Mon Oct 26 22:29:56 2020 +0100 ath6kl: fix enum-conversion warning gcc -Wextra points out a type mismatch drivers/net/wireless/ath/ath6kl/wmi.c: In function 'ath6kl_wmi_cmd_send': drivers/net/wireless/ath/ath6kl/wmi.c:1825:19: warning: implicit conversion from 'enum ' to 'enum wmi_data_hdr_data_type' [-Wenum-conversion] 1825 | false, false, 0, NULL, if_idx); | ^~~~~ As far as I can tell, the numeric value is current here, so just use the correct enum literal instead of 'false'. Fixes: bdcd81707973 ("Add ath6kl cleaned up driver") Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201026213040.3889546-9-arnd@kernel.org commit cd64cae3efd42340b274ccaf42588cca3be6a246 Author: Lee Jones Date: Mon Nov 2 11:24:08 2020 +0000 ath9k: dynack: Demote non-compliant function header Fixes the following W=1 kernel build warning(s): drivers/net/wireless/ath/ath9k/dynack.c:52: warning: Function parameter or member 'old' not described in 'ath_dynack_ewma' drivers/net/wireless/ath/ath9k/dynack.c:52: warning: Function parameter or member 'new' not described in 'ath_dynack_ewma' Cc: QCA ath9k Development Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Lorenzo Bianconi Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201102112410.1049272-40-lee.jones@linaro.org commit 8cc107b57109245630cde66909c995949562155d Author: Lee Jones Date: Mon Nov 2 11:23:49 2020 +0000 ath9k: ar5008_phy: Demote half completed function headers Fixes the following W=1 kernel build warning(s): drivers/net/wireless/ath/ath9k/ar5008_phy.c:119: warning: Function parameter or member 'rfBuf' not described in 'ar5008_hw_phy_modify_rx_buffer' drivers/net/wireless/ath/ath9k/ar5008_phy.c:119: warning: Function parameter or member 'reg32' not described in 'ar5008_hw_phy_modify_rx_buffer' drivers/net/wireless/ath/ath9k/ar5008_phy.c:119: warning: Function parameter or member 'numBits' not described in 'ar5008_hw_phy_modify_rx_buffer' drivers/net/wireless/ath/ath9k/ar5008_phy.c:119: warning: Function parameter or member 'firstBit' not described in 'ar5008_hw_phy_modify_rx_buffer' Cc: QCA ath9k Development Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201102112410.1049272-21-lee.jones@linaro.org commit b5cafcb16f458f989e47448770d59384b879d19e Author: Lee Jones Date: Mon Nov 2 11:23:42 2020 +0000 ath9k: ar9003_2p2_initvals: Remove unused const variables Fixes the following W=1 kernel build warning(s): drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h:1734:18: warning: ‘ar9300PciePhy_clkreq_disable_L1_2p2’ defined but not used [-Wunused-const-variable=] drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h:1727:18: warning: ‘ar9300PciePhy_clkreq_enable_L1_2p2’ defined but not used [-Wunused-const-variable=] Cc: QCA ath9k Development Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201102112410.1049272-14-lee.jones@linaro.org commit 9190c64e4720f6ed06be4d69d8d6b8d7fe68fe37 Author: Lee Jones Date: Mon Nov 2 11:23:41 2020 +0000 ath9k: ar9485_initvals: Remove unused const variable 'ar9485_fast_clock_1_1_baseband_postamble' Fixes the following W=1 kernel build warning(s): drivers/net/wireless/ath/ath9k/ar9485_initvals.h:1009:18: warning: ‘ar9485_fast_clock_1_1_baseband_postamble’ defined but not used [-Wunused-const-variable=] Cc: QCA ath9k Development Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201102112410.1049272-13-lee.jones@linaro.org commit 30c2751b845865cfc3619620b81f21db306a0033 Author: Lee Jones Date: Mon Nov 2 11:23:40 2020 +0000 ath9k: ar9340_initvals: Remove unused const variable 'ar9340Modes_ub124_tx_gain_table_1p0' Fixes the following W=1 kernel build warning(s): drivers/net/wireless/ath/ath9k/ar9340_initvals.h:624:18: warning: ‘ar9340Modes_ub124_tx_gain_table_1p0’ defined but not used [-Wunused-const-variable=] Cc: QCA ath9k Development Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201102112410.1049272-12-lee.jones@linaro.org commit 3fc95aacc6fa62a623ae727fe631c03180efc206 Author: Lee Jones Date: Mon Nov 2 11:23:39 2020 +0000 ath9k: ar9330_1p1_initvals: Remove unused const variable 'ar9331_common_tx_gain_offset1_1' Fixes the following W=1 kernel build warning(s): drivers/net/wireless/ath/ath9k/ar9330_1p1_initvals.h:1013:18: warning: ‘ar9331_common_tx_gain_offset1_1’ defined but not used [-Wunused-const-variable=] Cc: QCA ath9k Development Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201102112410.1049272-11-lee.jones@linaro.org commit 748d250777e6eb461eb2279005e8deab4cff2845 Author: Lee Jones Date: Mon Nov 2 11:23:51 2020 +0000 ath: dfs_pri_detector: Demote zero/half completed kernel-doc headers There are only a couple of these and none of them are conformant. Fixes the following W=1 kernel build warning(s): drivers/net/wireless/ath/dfs_pri_detector.c:39: warning: Function parameter or member 'head' not described in 'pulse_elem' drivers/net/wireless/ath/dfs_pri_detector.c:46: warning: Function parameter or member 'val' not described in 'pde_get_multiple' drivers/net/wireless/ath/dfs_pri_detector.c:46: warning: Function parameter or member 'fraction' not described in 'pde_get_multiple' drivers/net/wireless/ath/dfs_pri_detector.c:46: warning: Function parameter or member 'tolerance' not described in 'pde_get_multiple' Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201102112410.1049272-23-lee.jones@linaro.org commit 206cd5800d8c7893b69bde0e607321e934815a54 Author: Lee Jones Date: Mon Nov 2 11:23:50 2020 +0000 ath: dfs_pattern_detector: Fix some function kernel-doc headers Fixes the following W=1 kernel build warning(s): drivers/net/wireless/ath/dfs_pattern_detector.c:34: warning: Function parameter or member 'region' not described in 'radar_types' drivers/net/wireless/ath/dfs_pattern_detector.c:141: warning: Function parameter or member 'region' not described in 'get_dfs_domain_radar_types' drivers/net/wireless/ath/dfs_pattern_detector.c:239: warning: Function parameter or member 'dpd' not described in 'channel_detector_get' drivers/net/wireless/ath/dfs_pattern_detector.c:239: warning: Function parameter or member 'freq' not described in 'channel_detector_get' Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201102112410.1049272-22-lee.jones@linaro.org commit aed7ee049a3e92a1f2b64da199cf93df3e6bfeb6 Author: Lee Jones Date: Mon Nov 2 11:23:48 2020 +0000 ath: regd: Provide description for ath_reg_apply_ir_flags's 'reg' param Fixes the following W=1 kernel build warning(s): drivers/net/wireless/ath/regd.c:378: warning: Function parameter or member 'reg' not described in 'ath_reg_apply_ir_flags' Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201102112410.1049272-20-lee.jones@linaro.org commit 47f1a84e2451d4fbf2904e71b56fbcc18114afba Author: Lavanya Suresh Date: Thu Nov 5 13:34:35 2020 +0530 ath11k: Add new dfs region name for JP Japan has new Radar types as per latest regulatory, included under MKK_N in FW. So adding new enum in ath11k to support it. Tested-on: IPQ8074 hw2.0 PCI WLAN.HK.2.4.0.1-00041-QCAHKSWPL_SILICONZ-1 Signed-off-by: Lavanya Suresh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1604563475-5782-1-git-send-email-lavaks@codeaurora.org commit 36c7c640ffeb87168e5ff79b7a36ae3a020bd378 Author: Karthikeyan Periyasamy Date: Wed Nov 4 23:17:00 2020 +0530 ath11k: fix wmi init configuration Assign the correct hw_op ath11k_init_wmi_config_ipq8074 to the hw IPQ8074. Also update the correct TWT radio count. Incorrect TWT radio count cause TWT feature fails on radio2 because physical device count is hardcoded to 2. so set the value dynamically. Found this during code review. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Fixes: 2d4bcbed5b7d53e1 ("ath11k: initialize wmi config based on hw_params") Signed-off-by: Karthikeyan Periyasamy Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1604512020-25197-1-git-send-email-periyasa@codeaurora.org commit ab041d060ee655be528fa4ee6ee8f8c3f52a7056 Author: Karthikeyan Periyasamy Date: Wed Nov 4 23:15:21 2020 +0530 ath11k: Fix the hal descriptor mask Below listed hal descriptor mask are incorrect, so modify it to correct one - CE destination status description meta info mask is increased from 8 bits to 16 bits from the 0th bit position - Rx Reo queue duplicate count mask is decreased from 22 bits to 16 bits - Reo threshold status counter sum mask is increased from 24 bits to 26 bits No functionality impact, these descriptors are currently not used in any supported platform. But in future if someone referred these descriptor then ended with wrong values. Found this during code review. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Karthikeyan Periyasamy Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1604511921-24840-1-git-send-email-periyasa@codeaurora.org commit 9fb13b81e1456c3911b86167470fc05dc9114a07 Author: Karthikeyan Periyasamy Date: Wed Nov 4 23:05:31 2020 +0530 ath11k: Fix single phy hw mode driver not able to bootup in the single radio configured board. single phy hw mode is converted to invalid hw mode and sent to FW through wmi init cmd. In that case driver is not receiving wmi ready event which leads to driver bootup fail. single phy hw mode is a valid for single radio configured board. so removed the conversion logic. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Karthikeyan Periyasamy Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1604511331-22477-1-git-send-email-periyasa@codeaurora.org commit 6189be7d145c3a2d48514eb8755483602ff5a4b4 Author: Sven Eckelmann Date: Fri Oct 30 11:19:40 2020 +0100 ath11k: Fix number of rules in filtered ETSI regdomain The ath11k code will try to insert wheather rader related limits when the DFS region is set to ETSI. For this reason, it will add two more entries in the array of reg_rules. But the 2.4.0.1 firmware is prefiltering the list of reg rules it returns for 2.4GHz PHYs. They will then not contain the list of 5GHz rules and thus no wheather radar band rules were inserted by this code. But the code didn't fix the n_reg_rules for this regulatory domain and PHY when this happened. This resulted in a rejection by is_valid_rd because it found rules which start and end at 0khz. This resulted in a splat like: Invalid regulatory domain detected ------------[ cut here ]------------ WARNING: at backports-20200628-4.4.60-9a94b73e75/net/wireless/reg.c:3721 [...] ath11k c000000.wifi1: failed to perform regd update : -22 The number of rules must therefore be saved after they were converted from the ath11k format to the ieee80211_regdomain format and not before. Tested with IPQ8074 WLAN.HK.2.4.0.1.r1-00019-QCAHKSWPL_SILICONZ-1 Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Signed-off-by: Sven Eckelmann Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201030101940.2387952-1-sven@narfation.org commit ff34107c22243a8f43d8aa0f100e177a4d56e95a Author: Govind Singh Date: Thu Oct 22 09:29:35 2020 +0530 ath11k: Remove unused param from wmi_mgmt_params qdf_ctx is not used in wmi_mgmt_params, remove this un-used variable. Compile tested only. Signed-off-by: Govind Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1603339175-12706-1-git-send-email-govinds@codeaurora.org commit 383a32cde4172db19d4743d4c782c00af39ff275 Author: Sven Eckelmann Date: Wed Oct 21 16:05:55 2020 +0200 ath11k: Initialize complete alpha2 for regulatory change The function ath11k_wmi_send_init_country_cmd is taking 3 byte from alpha2 of the structure wmi_init_country_params. But the function ath11k_reg_notifier is only initializing 2 bytes. The third byte is therefore always an uninitialized value. The command can happen to look like 0c 00 87 02 01 00 00 00 00 00 00 00 43 41 f8 00 instead of 0c 00 87 02 01 00 00 00 00 00 00 00 43 41 00 00 Tested-on: IPQ8074 hw2.0 WLAN.HK.2.1.0.1-01161-QCAHKSWPL_SILICONZ-1 Tested-on: IPQ8074 hw2.0 WLAN.HK.2.1.0.1-01228-QCAHKSWPL_SILICONZ-1 Tested-on: IPQ8074 hw2.0 WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Tested-on: IPQ8074 hw2.0 WLAN.HK.2.4.0.1.r1-00019-QCAHKSWPL_SILICONZ-1 Tested-on: IPQ8074 hw2.0 WLAN.HK.2.4.0.1.r1-00026-QCAHKSWPL_SILICONZ-2 Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Signed-off-by: Sven Eckelmann Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201021140555.4114715-1-sven@narfation.org commit 02f9d3c1b918a631be369350ffcaaab6cde95b22 Author: Govindaraj Saminathan Date: Fri Oct 16 20:58:31 2020 +0530 ath11k: cold boot calibration support cold boot calibration is the process to calibrate all the channels during the boot-up to avoid the calibration delay during the channel change. During the boot-up, firmware started in cold boot calibration mode Firmware calibrate all channels and generate CalDb(DDR). Subsequent wifi bringup will reuse the same CalDb. Firmware is restarted in normal mode to continue the normal operation. caldb memory address send to firmware through the QMI message.Firmware use this address to store the caldb data and use it until next reboot. This will give the improvement during the channel change. But it is increasing the boot-up time(up to 15sec depend on number of radios). So if the user want to reduce the boot-up time and accepting for channel change delay, user can disable this feature using the module param cold_boot_cal=0. Tested-on: IPQ8074 WLAN.HK.2.4.0.1-01162-QCAHKSWPL_SILICONZ-1 Signed-off-by: Govindaraj Saminathan Co-developed-by: Sowmiya Sree Elavalagan Signed-off-by: Sowmiya Sree Elavalagan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1602862111-14063-1-git-send-email-ssreeela@codeaurora.org commit 14f43c5fca57810e7a3788468aee482c85ab37a6 Author: Sven Eckelmann Date: Thu Oct 15 15:15:01 2020 +0200 ath11k: search DT for qcom,ath11k-calibration-variant Board Data File (BDF) is loaded upon driver boot-up procedure. The right board data file is identified on IPQ6018 using bus, qmi-chip-id and qmi-board-id. The problem, however, can occur when the (default) board data file cannot fulfill with the vendor requirements and it is necessary to use a different board data file. This problem was already solved on ath10k by adding a ",variant=.*" at the end of the board name. The same functionality must also be provided for ath11k. The device tree requires an additional string to define the variant name wifi@c000000 { status = "okay"; qcom,ath11k-calibration-variant = "Cigtech-WF-188"; }; This would create the boarddata identifier for the board-2.bin search * bus=ahb,qmi-chip-id=0,qmi-board-id=18,variant=Cigtech-WF-188 Signed-off-by: Sven Eckelmann Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201015131501.1939685-2-sven@narfation.org commit 77581df8639faf28ae52fea170e48cdf9870468a Author: Sven Eckelmann Date: Thu Oct 15 15:15:00 2020 +0200 dt: bindings: add new dt entry for ath11k calibration variant The bus + qmi-chip-id + qmi-board-id is not enough to identify the correct board data file on IPQ6018 based devices. Multiple different boards share the same values. Only the original reference designs can currently be identified and loaded from the board-2.bin. But these will not result in the correct calibration data when combined with the pre-calibration data from the device. An additional "variant" information has to be provided to select the correct board data for a design which was modified by an ODM. This follows the same approach as ath10k. Signed-off-by: Sven Eckelmann Reviewed-by: Rob Herring Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201015131501.1939685-1-sven@narfation.org commit bafdbd79aae4c91f38caa43e5fb7abfd911f5bf6 Author: Vasanthakumar Thiagarajan Date: Thu Oct 15 12:17:34 2020 +0530 ath11k: Remove unnecessary data sync to cpu on monitor buffer Monitor ring Rx buffer is not really modified between dma map and unmap. So remove the unnecssary data sync before dma unmap. This does not fix any visible issue, found in code review. Compile tested only. Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1602744454-22969-1-git-send-email-vthiagar@codeaurora.org commit 0f01dcb89b8b24b8d99d2ca25ed12676edae95ce Author: Allen Pais Date: Wed Oct 7 16:03:09 2020 +0530 ath11k: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201007103309.363737-4-allen.lkml@gmail.com commit 9501bc2b16b5850bcf6d87c985f1021d83cefab1 Author: Wen Gong Date: Thu Nov 5 14:33:56 2020 +0800 ath10k: cancel rx worker in hif_stop for SDIO The rx worker of SDIO should be cancelled after disable interrupt, and release rx sk_buff in queue, otherwise the rx worker maybe still run after hif_stop. And it should be cancelled before napi_synchronize in hif_stop, because the rx worker of SDIO will call napi_schedule, it should have no napi_schedule before napi_synchronize, otherwise it lead napi_synchronize wait untill napi_complete. Tested-on: QCA6174 hw3.2 SDIO WLAN.RMH.4.4.1-00049 Signed-off-by: Wen Gong Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1604558036-4056-1-git-send-email-wgong@codeaurora.org commit ee06fcb98dcdc2713c83c29e9101b007a825cd7f Author: Ben Greear Date: Tue Sep 22 12:19:57 2020 -0700 ath10k: Don't iterate over not-sdata-in-driver interfaces. This fixes possible crash scenario where interfaces that were not set up in the driver yet might still be iterated over. When originally debugged on the ath10k-ct driver, the crash looked like this: kernel BUG at /home/greearb/git/linux-4.7.dev.y/drivers/net/wireless/ath/ath10k/wmi.c:1781! invalid opcode: 0000 [#1] PREEMPT SMP KASAN Modules linked in: nf_conntrack_netlink nf_conntrack nfnetlink nf_defrag_ipv4 bridge carl9170 mac80211_hwsim ath10k_pci ath10k_core ath5k ath9k ath9k_common ath9k_hw ath mac80211 cfg80211 8021q garp mrp stp llc bnep bluetooth fuse macvlan pktgen rpcsec_gss_krb5 nfsv4 nfs fscache snd_hda_codec_hdmi coretemp hwmon intel_rapl x86_pkg_temp_thermal intel_powerclamp snd_hda_codec_realtek snd_hda_codec_generic kvm iTCO_wdt irqbypass iTCO_vendor_support joydev snd_hda_intel snd_hda_codec snd_hda_core snd_hwdep snd_seq snd_seq_device pcspkr snd_pcm snd_timer shpchp snd i2c_i801 lpc_ich soundcore tpm_tis tpm nfsd auth_rpcgss nfs_acl lockd grace sunrpc i915 serio_raw i2c_algo_bit drm_kms_helper ata_generic e1000e pata_acpi drm ptp pps_core i2c_core fjes video ipv6 [last unloaded: nf_conntrack] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.7.10+ #15 Hardware name: To be filled by O.E.M. To be filled by O.E.M./ChiefRiver, BIOS 4.6.5 06/07/2013 task: ffff8801d4f20000 ti: ffff8801d4f28000 task.ti: ffff8801d4f28000 RIP: 0010:[] [] ath10k_wmi_tx_beacons_iter+0x28b/0x290 [ath10k_core] RSP: 0018:ffff8801d6447a98 EFLAGS: 00010293 RAX: 0000000000000018 RBX: ffff8801ce97e1d8 RCX: 0000000000000000 RDX: 0000000000000018 RSI: 0000000000000003 RDI: ffffed003ac88f49 RBP: ffff8801d6447af0 R08: 0000000000000003 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000000 R13: ffff8801ce97e320 R14: ffff8801ce97e378 R15: ffff8801ce97ca40 FS: 0000000000000000(0000) GS:ffff8801d6440000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007eff191ef1ab CR3: 000000000260a000 CR4: 00000000001406e0 Stack: 1ffff1003ac88f59 0000000041b58ab3 ffffffffa0f4d52a ffff8801d4f20000 0000000000000246 0000000000000002 ffff8801ce97e1d8 ffff8801bd5d39b8 0000000000000002 0000000000000001 ffff8801ce97ca40 ffff8801d6447b48 Call Trace: [] __iterate_interfaces+0xfc/0x1d0 [mac80211] [] ? ath10k_wmi_cmd_send_nowait+0x260/0x260 [ath10k_core] [] ? ath10k_wmi_cmd_send_nowait+0x260/0x260 [ath10k_core] [] ieee80211_iterate_active_interfaces_atomic+0x67/0x100 [mac80211] [] ? ieee80211_handle_reconfig_failure+0x140/0x140 [mac80211] [] ? ath10k_tpc_config_disp_tables+0x620/0x620 [ath10k_core] [] ath10k_wmi_op_ep_tx_credits+0x2b/0x50 [ath10k_core] [] ath10k_htc_rx_completion_handler+0x422/0x5c0 [ath10k_core] [] ath10k_pci_process_rx_cb+0x37e/0x430 [ath10k_pci] [] ? ath10k_htc_build_tx_ctrl_skb+0xc0/0xc0 [ath10k_core] [] ? ath10k_pci_rx_post_pipe+0x550/0x550 [ath10k_pci] [] ? debug_lockdep_rcu_enabled+0x35/0x40 [] ? mark_held_locks+0x23/0xc0 [] ? __local_bh_enable_ip+0x6a/0xd0 [] ? trace_hardirqs_on_caller+0x18b/0x290 [] ? trace_hardirqs_on+0xd/0x10 [] ? __local_bh_enable_ip+0x6a/0xd0 [] ? _raw_spin_unlock_bh+0x30/0x40 [] ? ath10k_ce_per_engine_service+0xee/0x100 [ath10k_pci] [] ath10k_pci_htt_htc_rx_cb+0x29/0x30 [ath10k_pci] [] ath10k_ce_per_engine_service+0xa6/0x100 [ath10k_pci] [] ath10k_ce_per_engine_service_any+0xd6/0xf0 [ath10k_pci] [] ? ath10k_pci_enable_legacy_irq+0xe0/0xe0 [ath10k_pci] [] ath10k_pci_tasklet+0x5f/0xb0 [ath10k_pci] [] tasklet_action+0x245/0x2b0 [] __do_softirq+0x181/0x595 [] irq_exit+0xbc/0xc0 [] do_IRQ+0x7c/0x150 [] common_interrupt+0x8c/0x8c [] ? trace_hardirqs_on_caller+0x18b/0x290 [] ? cpuidle_enter_state+0x1ae/0x4b0 [] ? cpuidle_enter_state+0x1a7/0x4b0 [] cpuidle_enter+0x12/0x20 [] call_cpuidle+0x4e/0x90 [] cpu_startup_entry+0x3f7/0x540 [] ? default_idle_call+0x50/0x50 [] ? clockevents_config_and_register+0x5f/0x70 [] ? setup_APIC_timer+0xfa/0x110 [] start_secondary+0x253/0x2b0 [] ? set_cpu_sibling_map+0x920/0x920 Code: 4d 49 e0 8b b3 48 01 00 00 48 c7 c7 a0 ee f3 a0 e8 d9 c2 3f e0 49 81 fd 3f 1f 00 00 76 0f 49 81 fc 3f 1f 00 00 0f 87 c0 fd ff ff <0f> 0b 0f 0b 90 55 48 89 e5 41 57 41 56 48 8d 85 58 ff ff ff 41 RIP [] ath10k_wmi_tx_beacons_iter+0x28b/0x290 [ath10k_core] RSP ---[ end trace 6588464714e5163a ]--- Similar logic was tested for years in ath10k-ct driver and various firmware. Also tested with stock kernel plus this patch, with firmware 10.2.4-1.0-00037 This test case was to bring up 5 vap on a radio and fake a firmware crash. Make sure ap interfaces continue to function properly. Signed-off-by: Ben Greear Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200922191957.25257-2-greearb@candelatech.com commit b9162645117841978a3fb31546409271e007dd28 Author: Tamizh Chelvam Date: Wed Nov 4 22:07:17 2020 +0530 ath10k: fix compilation warning This change fixes below compilation warning. smatch warnings: drivers/net/wireless/ath/ath10k/mac.c:9125 ath10k_mac_op_set_tid_config() error: uninitialized symbol 'ret'. No functional changes. Compile tested only. Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Tamizh Chelvam Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1604507837-29361-1-git-send-email-tamizhr@codeaurora.org commit ae0d0bb29b311ee3c71c8796f76d309a3779c8d9 Merge: 9f32c27eb4fc4 bf3e76289cd28 Author: Jakub Kicinski Date: Fri Nov 6 17:32:55 2020 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Signed-off-by: Jakub Kicinski commit 9f32c27eb4fc4426eedd511697d921a932f7dba6 Author: Dany Madden Date: Fri Nov 6 14:17:45 2020 -0500 Revert ibmvnic merge do_change_param_reset into do_reset This reverts commit 16b5f5ce351f8709a6b518cc3cbf240c378305bf where it restructures do_reset. There are patches being tested that would require major rework if this is committed first. We will resend this after the other patches have been applied. Signed-off-by: Dany Madden Link: https://lore.kernel.org/r/20201106191745.1679846-1-drt@linux.ibm.com Signed-off-by: Jakub Kicinski commit b6ff30849ca723b78306514246b98ca5645d92f5 Author: Paul E. McKenney Date: Thu Nov 5 13:39:28 2020 -0800 tools/memory-model: Label MP tests' producers and consumers This commit adds comments that label the MP tests' producer and consumer processes, and also that label the "exists" clause as the bad outcome. Reported-by: Johannes Weiner Signed-off-by: Paul E. McKenney commit acc4bdc55dcb7d7fe0be736999572a55e121873f Author: Paul E. McKenney Date: Thu Nov 5 13:30:11 2020 -0800 tools/memory-model: Use "buf" and "flag" for message-passing tests The use of "x" and "y" for message-passing tests is fine for people familiar with memory models and litmus-test nomenclature, but is a bit obtuse for others. This commit therefore substitutes "buf" for "x" and "flag" for "y" for the MP tests. There are a few special-case MP tests that use locks and these are unchanged. There is another MP test that uses pointers, and this is changed to name the pointer "p". Reported-by: Johannes Weiner Signed-off-by: Paul E. McKenney commit 1947bfcf81a905e84a58b423063e81034a90efed Author: Paul E. McKenney Date: Thu Nov 5 13:20:56 2020 -0800 tools/memory-model: Add types to litmus tests This commit adds type information for global variables in the litmus tests in order to allow easier use with klitmus7. Signed-off-by: Paul E. McKenney commit 0a27ce6b6968866fa8e3bd70371d67752db7718f Author: Paul E. McKenney Date: Thu Oct 22 15:16:08 2020 -0700 tools/memory-model: Add a glossary of LKMM terms [ paulmck: Apply Alan Stern feedback. ] Signed-off-by: Paul E. McKenney commit d8566f15da9b1e51fd35f24321ec133095e02d06 Author: Fox Chen Date: Wed Sep 9 14:53:40 2020 +0800 docs/memory-barriers.txt: Fix a typo in CPU MEMORY BARRIERS section Commit 39323c6 ("smp_mb__{before,after}_atomic(): update Documentation") has a typo in CPU MEORY BARRIERS section: "RMW functions that do not imply are memory barrier are ..." should be "RMW functions that do not imply a memory barrier are ...". This patch fixes this typo. Signed-off-by: Fox Chen Acked-by: Will Deacon Signed-off-by: Paul E. McKenney commit ebb477cb2fb7a44ff600e0a7393bad906a0ecd80 Author: Paul E. McKenney Date: Tue Aug 11 11:27:33 2020 -0700 tools/memory-model: Document categories of ordering primitives The Linux kernel has a number of categories of ordering primitives, which are recorded in the LKMM implementation and hinted at by cheatsheet.txt. But there is no overview of these categories, and such an overview is needed in order to understand multithreaded LKMM litmus tests. This commit therefore adds an ordering.txt as well as extracting a control-dependencies.txt from memory-barriers.txt. It also updates the README file. [ paulmck: Apply Akira Yokosawa file-placement feedback. ] [ paulmck: Apply Alan Stern feedback. ] [ paulmck: Apply self-review feedback. ] Signed-off-by: Paul E. McKenney commit 1d094cefc37e5ed4dec44a41841c8628f6b548a2 Author: Marco Elver Date: Fri Nov 6 10:34:56 2020 +0100 kcsan: Fix encoding masks and regain address bit The watchpoint encoding masks for size and address were off-by-one bit each, with the size mask using 1 unnecessary bit and the address mask missing 1 bit. However, due to the way the size is shifted into the encoded watchpoint, we were effectively wasting and never using the extra bit. For example, on x86 with PAGE_SIZE==4K, we have 1 bit for the is-write bit, 14 bits for the size bits, and then 49 bits left for the address. Prior to this fix we would end up with this usage: [ write<1> | size<14> | wasted<1> | address<48> ] Fix it by subtracting 1 bit from the GENMASK() end and start ranges of size and address respectively. The added static_assert()s verify that the masks are as expected. With the fixed version, we get the expected usage: [ write<1> | size<14> | address<49> ] Functionally no change is expected, since that extra address bit is insignificant for enabled architectures. Acked-by: Boqun Feng Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit 75dc2da5ecd65bdcbfc4d59b9d9b7342c61fe374 Author: Paul E. McKenney Date: Thu Sep 17 16:17:17 2020 -0700 rcu-tasks: Make the units of ->init_fract be jiffies Currently, the units of ->init_fract are milliseconds while those of ->gp_sleep are jiffies. For consistency with each other and with the argument of schedule_timeout_idle(), this commit changes the units of ->init_fract to jiffies. This change does affect the backoff algorithm, but only on systems where HZ is not 1000, and even there the change makes more sense, given that the current setup would "back off" to the same number of jiffies repeatedly. In contrast, with this change, the number of jiffies waited increases on each pass through the loop in the rcu_tasks_wait_gp() function. Signed-off-by: Paul E. McKenney commit 01f9e708d9eae6335ae9ff25ab09893c20727a55 Author: Anna-Maria Behnsen Date: Mon Nov 2 18:12:20 2020 +0100 tools/rcutorture: Fix BUG parsing of console.log For the rcutorture test summary log file console.log of virtual machines is parsed. When a console.log contains "DEBUG", BUG counter is incremented because regular expression does not handle to ignore DEBUG. Signed-off-by: Anna-Maria Behnsen Reviewed-by: Benedikt Spranger Signed-off-by: Paul E. McKenney commit 06dc8d4591b8d8ce0ece94474718b53f0a5c5de3 Author: Bhaskar Chowdhury Date: Tue Oct 20 21:22:56 2020 +0200 tools/nolibc: Fix a spelling error in a comment Fix a spelling in the comment line. s/memry/memory/p This is on linux-next. Signed-off-by: Bhaskar Chowdhury Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit 5be7d80deb80ceef50a6bd86d83c8fd62264778a Author: Paul E. McKenney Date: Thu Oct 15 11:42:17 2020 -0700 torture: Make kvm-check-branches.sh use --allcpus Currently the kvm-check-branches.sh script calculates the number of CPUs and passes this to the kvm.sh --cpus command-line argument. This works, but this commit saves a line by instead using the new kvm.sh --allcpus command-line argument. Signed-off-by: Paul E. McKenney commit 6c5b9de2c63b2f513a580c6c80d455350012e99b Author: Samuel Hernandez Date: Sun Oct 11 14:22:31 2020 -0400 rcutorture/nolibc: Fix a typo in header file This fixes a typo. Before this, the AT_FDCWD macro would be defined regardless of whether or not it's been defined before. Signed-off-by: Samuel Hernandez Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit a7eb937b67b64b8b4645f1ebca3ac2079c6de81b Author: Paul E. McKenney Date: Fri Oct 9 19:51:55 2020 -0700 rcutorture: Don't do need_resched() testing if ->sync is NULL If cur_ops->sync is NULL, rcu_torture_fwd_prog_nr() will nevertheless attempt to call through it. This commit therefore flags cases where neither need_resched() nor call_rcu() forward-progress testing can be performed due to NULL function pointers, and also causes rcu_torture_fwd_prog_nr() to take an early exit if cur_ops->sync() is NULL. Reported-by: Tom Rix Signed-off-by: Paul E. McKenney commit 0d7202876bcb968a68f5608b9ff7a824fbc7e94d Author: Hou Tao Date: Thu Sep 24 22:18:54 2020 +0800 locktorture: Invoke percpu_free_rwsem() to do percpu-rwsem cleanup When executing the LOCK06 locktorture scenario featuring percpu-rwsem, the RCU callback rcu_sync_func() may still be pending after locktorture module is removed. This can in turn lead to the following Oops: BUG: unable to handle page fault for address: ffffffffc00eb920 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 6500a067 P4D 6500a067 PUD 6500c067 PMD 13a36c067 PTE 800000013691c163 Oops: 0000 [#1] PREEMPT SMP CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.9.0-rc5+ #4 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996) RIP: 0010:rcu_cblist_dequeue+0x12/0x30 Call Trace: rcu_core+0x1b1/0x860 __do_softirq+0xfe/0x326 asm_call_on_stack+0x12/0x20 do_softirq_own_stack+0x5f/0x80 irq_exit_rcu+0xaf/0xc0 sysvec_apic_timer_interrupt+0x2e/0xb0 asm_sysvec_apic_timer_interrupt+0x12/0x20 This commit avoids tis problem by adding an exit hook in lock_torture_ops and using it to call percpu_free_rwsem() for percpu rwsem torture during the module-cleanup function, thus ensuring that rcu_sync_func() completes before module exits. It is also necessary to call the exit hook if lock_torture_init() fails half-way, so this commit also adds an ->init_called field in lock_torture_cxt to indicate that exit hook, if present, must be called. Signed-off-by: Hou Tao Signed-off-by: Paul E. McKenney commit 85558182d545fe9c0583a39dbb6359ee954e35d5 Author: Paul E. McKenney Date: Thu Sep 24 12:11:57 2020 -0700 scftorture: Add full-test stutter capability In virtual environments on systems with hardware assist, inter-processor interrupts must do very different things based on whether the target vCPU is running or not. This commit therefore enables torture-test stuttering to better test these running/not-running transitions. Suggested-by: Chris Mason Signed-off-by: Paul E. McKenney commit a5136f4ffb44f8c1a80406c5bfd4d233433398e6 Author: Paul E. McKenney Date: Thu Sep 24 08:52:33 2020 -0700 torture: Allow alternative forms of kvm.sh command-line arguments This commit allows --build-only as a synonym for --buildonly, --kconfigs for --kconfig, and --kmake-args for --kmake-arg. Signed-off-by: Paul E. McKenney commit 293b93d66f149a9bd124aae195f048268e11870c Author: Paul E. McKenney Date: Wed Sep 23 16:46:36 2020 -0700 rcutorture: Small code cleanups The rcu_torture_cleanup() function fails to NULL out the reader_tasks pointer after freeing it and its fakewriter_tasks loop has redundant braces. This commit therefore cleans these up. Signed-off-by: Paul E. McKenney commit 7de1ca35269ee20e40c35666c810cbaea528c719 Author: Paul E. McKenney Date: Tue Sep 22 17:20:11 2020 -0700 torture: Accept time units on kvm.sh --duration argument The "--duration " has worked well for a very long time, but it can be inconvenient to compute the minutes for (say) a 28-hour run. It can also be annoying to have to let a simple boot test run for a full minute. This commit therefore permits an "s" suffix to specify seconds, "m" to specify minutes (which remains the default), "h" suffix to specify hours, and "d" to specify days. With this change, "--duration 5" still specifies that each scenario run for five minutes, but "--duration 30s" runs for only 30 seconds, "--duration 8h" runs for eight hours, and "--duration 2d" runs for two days. Signed-off-by: Paul E. McKenney commit ab1b7880dec86bbdacd31a4c5cf104de4cf903f2 Author: Paul E. McKenney Date: Tue Sep 22 16:42:42 2020 -0700 rcutorture: Make stutter_wait() caller restore priority Currently, stutter_wait() will happily spin waiting for the stutter interval to end even if the caller is running at a real-time priority level. This could starve normal-priority tasks for no good reason. This commit therefore drops the calling task's priority to SCHED_OTHER MAX_NICE if stutter_wait() needs to wait. But when it waits, stutter_wait() returns true, which allows the caller to restore the priority if needed. Callers that were already running at SCHED_OTHER MAX_NICE obviously do not need any changes, but this commit also restores priority for higher-priority callers. Signed-off-by: Paul E. McKenney commit c1e06287583e5ec496e4c02bf5b319e5e41a1fd2 Author: Paul E. McKenney Date: Mon Sep 21 13:18:48 2020 -0700 torture: Force weak-hashed pointers on console log Although the rcutorture scripting now deals correctly with full-up security-induced pointer obfuscation, it is still counter-productive for kernel hackers who are analyzing console output. This commit therefore sets the debug_boot_weak_hash kernel boot parameter, which enables printing of weak-hashed pointers for torture-test runs. Please note that this change applies only to runs initiated by the kvm.sh scripting. If you are instead using modprobe and rmmod, it is your responsibility to build and boot the underlying kernel to your taste. Please note further that this change does not result in a security hole in normal use. The rcutorture testing runs with a negligible userspace, no networking, and no user interaction. Besides which, there is no data of value that can be extracted from an rcutorture guest OS that could not also be extracted from the host that this guest is running on. Suggested-by: Anna-Maria Gleixner Signed-off-by: Paul E. McKenney commit 4994684ce10924a0302567c315c91b0a64eeef46 Author: Paul E. McKenney Date: Fri Sep 18 13:30:33 2020 -0700 rcutorture: Prevent hangs for invalid arguments If an rcutorture torture-test run is given a bad kvm.sh argument, the test will complain to the console, which is good. What is bad is that from the user's perspective, it will just hang for the time specified by the --duration argument. This commit therefore forces an immediate kernel shutdown if a rcu_torture_init()-time error occurs, thus avoiding the appearance of a hang. It also forces a console splat in this case to clearly indicate the presence of an error. Signed-off-by: Paul E. McKenney commit c64659ef29e3901be0900ec6fb0485fa3dbdcfd8 Author: Paul E. McKenney Date: Fri Sep 18 13:26:22 2020 -0700 torture: Prevent jitter processes from delaying failed run Even when the kernel panics and qemu dies, runs with jitter enabled will continue uselessly until the jitter.sh processes terminate. This can be annoying if a planned one-hour run instead dies during boot. This commit therefore kills the jitter.sh processes when the run ends more than one minute prior to the termination time specified by the kvm.sh --duration argument or its default. Signed-off-by: Paul E. McKenney commit 6b74fa0a776e3715d385b23d29db469179c825b0 Author: Paul E. McKenney Date: Fri Sep 18 11:18:06 2020 -0700 locktorture: Prevent hangs for invalid arguments If an locktorture torture-test run is given a bad kvm.sh argument, the test will complain to the console, which is good. What is bad is that from the user's perspective, it will just hang for the time specified by the --duration argument. This commit therefore forces an immediate kernel shutdown if a lock_torture_init()-time error occurs, thus avoiding the appearance of a hang. It also forces a console splat in this case to clearly indicate the presence of an error. Signed-off-by: Paul E. McKenney commit e5ace37d83af459bd491847df570b6763c602344 Author: Hou Tao Date: Fri Sep 18 19:44:24 2020 +0800 locktorture: Ignore nreaders_stress if no readlock support Exclusive locks do not have readlock support, which means that a locktorture run with the following module parameters will do nothing: torture_type=mutex_lock nwriters_stress=0 nreaders_stress=1 This commit therefore rejects this combination for exclusive locks by returning -EINVAL during module init. Signed-off-by: Hou Tao Signed-off-by: Paul E. McKenney commit 6f26d010e678249367cc00b5a827c3731c8138f3 Author: Paul E. McKenney Date: Thu Sep 17 12:34:01 2020 -0700 rcutorture: Adjust scenarios SRCU-t and SRCU-u to make kconfig happy The SRCU-u scenario expects to enable lockdep but to also disable the CONFIG_PREEMPT_COUNT kconfig option. This no longer works. This commit therefore instead enables lockdep in SRCU-t, which then allows SRCU-u to disable CONFIG_PREEMPT_COUNT. Signed-off-by: Paul E. McKenney commit bc80d353b3f565138cda7e95ed4020e6e69360b2 Author: Paul E. McKenney Date: Thu Sep 17 10:37:10 2020 -0700 refscale: Prevent hangs for invalid arguments If an refscale torture-test run is given a bad kvm.sh argument, the test will complain to the console, which is good. What is bad is that from the user's perspective, it will just hang for the time specified by the --duration argument. This commit therefore forces an immediate kernel shutdown if a ref_scale_init()-time error occurs, thus avoiding the appearance of a hang. It also forces a console splat in this case to clearly indicate the presence of an error. Signed-off-by: Paul E. McKenney commit 2f2214d43ccd27ac6d124287107c136a0f7c6053 Author: Paul E. McKenney Date: Thu Sep 17 10:30:46 2020 -0700 rcuscale: Prevent hangs for invalid arguments If an rcuscale torture-test run is given a bad kvm.sh argument, the test will complain to the console, which is good. What is bad is that from the user's perspective, it will just hang for the time specified by the --duration argument. This commit therefore forces an immediate kernel shutdown if a rcu_scale_init()-time error occurs, thus avoiding the appearance of a hang. It also forces a console splat in this case to clearly indicate the presence of an error. Signed-off-by: Paul E. McKenney commit 8d68e68a781db80606c8e8f3e4383be6974878fd Author: Paul E. McKenney Date: Wed Sep 16 10:10:10 2020 -0700 torture: Exclude "NOHZ tick-stop error" from fatal errors The "NOHZ tick-stop error: Non-RCU local softirq work is pending" warning happens frequently and appears to be irrelevant to the various torture tests. This commit therefore filters it out. If there proves to be a need to pay attention to it a later commit will add an "advice" category to allow the user to immediately see that although something happened, it was not an indictment of the system being tortured. Signed-off-by: Paul E. McKenney commit 45c7b962014da36c2ac1aee6e5014b644ba37a84 Author: Paul E. McKenney Date: Wed Sep 9 22:24:57 2020 -0700 rcuscale: Avoid divide by zero The rcuscale test module does not use batches, so there is only ever one batch. This commit therefore informs the kvm-recheck-rcuscale.sh script of this fact of life. Signed-off-by: Paul E. McKenney commit 899f317e4886f916ed21027177177c11b577cea1 Author: Paul E. McKenney Date: Wed Sep 9 12:27:03 2020 -0700 rcuscale: Add RCU Tasks Trace This commit adds the ability to test performance and scalability of RCU Tasks Trace updaters. Reported-by: Alexei Starovoitov Signed-off-by: Paul E. McKenney commit 1ac78b49d61d4a095ef8b861542549eef1823f36 Author: Paul E. McKenney Date: Thu Sep 3 13:09:47 2020 -0700 scftorture: Add an alternative IPI vector The scftorture tests currently use only smp_call_function() and friends, which means that these tests cannot locate bugs caused by interactions between different IPI vectors. This commit therefore adds the rescheduling IPI to the mix. Note that this commit permits resched_cpus() only when scftorture is built in. This is a workaround. Longer term, this will use real wakeups rather than resched_cpu(). Signed-off-by: Paul E. McKenney commit fda5ba9ed254727ac5761b81455d8e93c78eba4a Author: Paul E. McKenney Date: Wed Sep 2 21:08:41 2020 -0700 torture: Make torture_stutter() use hrtimer The torture_stutter() function uses schedule_timeout_interruptible() to time the stutter duration, but this can miss race conditions due to its being time-synchronized with everything else that is based on the timer wheels. This commit therefore converts torture_stutter() to use the high-resolution timers via schedule_hrtimeout(), and also to fuzz the stutter interval. While in the area, this commit also limits the spin-loop portion of the stutter_wait() function's wait loop to two jiffies, down from about one second. Signed-off-by: Paul E. McKenney commit 19012b786ecccb29a9fa20c4ec0a67e2cdfbc010 Author: Paul E. McKenney Date: Tue Sep 1 16:58:41 2020 -0700 torture: Periodically pause in stutter_wait() Running locktorture scenario LOCK05 results in hangs: tools/testing/selftests/rcutorture/bin/kvm.sh --allcpus --torture lock --duration 3 --configs LOCK05 The lock_torture_writer() kthreads set themselves to MAX_NICE while running SCHED_OTHER. Other locktorture kthreads run at default niceness, also SCHED_OTHER. This results in these other locktorture kthreads indefinitely preempting the lock_torture_writer() kthreads. Note that the cond_resched() in the stutter_wait() function's loop is ineffective because this scenario is built with CONFIG_PREEMPT=y. It is not clear that such indefinite preemption is supposed to happen, but in the meantime this commit prevents kthreads running in stutter_wait() from being completely CPU-bound, thus allowing the other threads to get some CPU in a timely fashion. This commit also uses hrtimers to provide very short sleeps to avoid degrading the sudden-on testing that stutter is supposed to provide. Reviewed-by: Davidlohr Bueso Signed-off-by: Paul E. McKenney commit 3480d6774f07341e3e1cf3114f58bef98ea58ae0 Author: Paul E. McKenney Date: Sun Aug 30 21:48:23 2020 -0700 locktorture: Track time of last ->writeunlock() This commit adds a last_lock_release variable that tracks the time of the last ->writeunlock() call, which allows easier diagnosing of lock hangs when using a kernel debugger. Acked-by: Davidlohr Bueso Signed-off-by: Paul E. McKenney commit c386e29d43728778ddd642fa73cc582bee684171 Author: Hui Su Date: Thu Oct 15 22:13:34 2020 +0800 docs/rcu: Update the call_rcu() API This commit updates the documented API of call_rcu() to use the rcu_callback_t typedef instead of the open-coded function definition. Signed-off-by: Hui Su Signed-off-by: Paul E. McKenney commit a1b9dbb72b7f39eeaa2fb5bd5cc619679985876e Author: Mauro Carvalho Chehab Date: Tue Oct 6 15:21:32 2020 +0200 docs: RCU: Requirements.rst: Fix a list block As warned by Sphinx: .../Documentation/RCU/Design/Requirements/Requirements.rst:1959: WARNING: Unexpected indentation. The list block is missing a space before it, making Sphinx to get it wrong. This commit therefore adds the missing space characters. Fixes: 2a721e5f0b2c ("docs: Update RCU's hotplug requirements with a bit about design") Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Paul E. McKenney commit a043260740d5d6ec5be59c3fb595c719890a0b0b Author: Joel Fernandes (Google) Date: Tue Sep 29 15:29:28 2020 -0400 docs: Update RCU's hotplug requirements with a bit about design The rcu_barrier() section of the "Hotplug CPU" section discusses deadlocks, however the description of deadlocks other than those involving rcu_barrier() is rather incomplete. This commit therefore continues the section by describing how RCU's design handles CPU hotplug in a deadlock-free way. Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 3fcd6a230fa7d03bffcb831a81b40435c146c12b Author: Paul E. McKenney Date: Thu Sep 3 15:23:29 2020 -0700 x86/cpu: Avoid cpuinfo-induced IPIing of idle CPUs Currently, accessing /proc/cpuinfo sends IPIs to idle CPUs in order to learn their clock frequency. Which is a bit strange, given that waking them from idle likely significantly changes their clock frequency. This commit therefore avoids sending /proc/cpuinfo-induced IPIs to idle CPUs. [ paulmck: Also check for idle in arch_freq_prepare_all(). ] Signed-off-by: Paul E. McKenney Cc: Rafael J. Wysocki Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: commit f4deaf90212c18d4b6d0687f0cba4c22d90b3391 Author: Paul E. McKenney Date: Wed Sep 2 13:19:12 2020 -0700 x86/cpu: Avoid cpuinfo-induced IPI pileups The aperfmperf_snapshot_cpu() function is invoked upon access to /proc/cpuinfo, and it does do an early exit if the specified CPU has recently done a snapshot. Unfortunately, the indication that a snapshot has been completed is set in an IPI handler, and the execution of this handler can be delayed by any number of unfortunate events. This means that a system that starts a number of applications, each of which parses /proc/cpuinfo, can suffer from an smp_call_function_single() storm, especially given that each access to /proc/cpuinfo invokes smp_call_function_single() for all CPUs. Please note that this is not theoretical speculation. Note also that one CPU's pending IPI serves all requests, so there is no point in ever having more than one IPI pending to a given CPU. This commit therefore suppresses duplicate IPIs to a given CPU via a new ->scfpending field in the aperfmperf_sample structure. This field is set to the value one if an IPI is pending to the corresponding CPU and to zero otherwise. The aperfmperf_snapshot_cpu() function uses atomic_xchg() to set this field to the value one and sample the old value. If this function's "wait" parameter is zero, smp_call_function_single() is called only if the old value of the ->scfpending field was zero. The IPI handler uses atomic_set_release() to set this new field to zero just before returning, so that the prior stores into the aperfmperf_sample structure are seen by future requests that get to the atomic_xchg(). Future requests that pass the elapsed-time check are ordered by the fact that on x86 loads act as acquire loads, just as was the case prior to this change. The return value is based off of the age of the prior snapshot, just as before. Reported-by: Dave Jones [ paulmck: Allow /proc/cpuinfo to take advantage of arch_freq_get_on_cpu(). ] [ paulmck: Add comment on memory barrier. ] Signed-off-by: Paul E. McKenney Cc: Rafael J. Wysocki Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: commit 0848fdf1be0b7a4dfb77a0fdeba6092b0942a835 Author: Lee Jones Date: Fri Nov 6 21:49:35 2020 +0000 drm/mga/mga_state: Remove unused variable 'buf_priv' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/mga/mga_state.c: In function ‘mga_dma_iload’: drivers/gpu/drm/mga/mga_state.c:945:22: warning: variable ‘buf_priv’ set but not used [-Wunused-but-set-variable] Cc: David Airlie Cc: Daniel Vetter Cc: by Cc: Jeff Hartmann Cc: Keith Whitwell Cc: Gareth Hughes Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201106214949.2042120-6-lee.jones@linaro.org commit 07687193d0ce65932ab2268b08a4b05eea91ef9e Author: Lee Jones Date: Fri Nov 6 21:49:34 2020 +0000 drm/mga/mga_dma: Demote kernel-doc abusers to standard comment blocks Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/mga/mga_dma.c:29: warning: Cannot understand * file mga_dma.c drivers/gpu/drm/mga/mga_dma.c:455: warning: Function parameter or member 'dev' not described in 'mga_do_agp_dma_bootstrap' drivers/gpu/drm/mga/mga_dma.c:455: warning: Function parameter or member 'dma_bs' not described in 'mga_do_agp_dma_bootstrap' drivers/gpu/drm/mga/mga_dma.c:629: warning: Function parameter or member 'dev' not described in 'mga_do_pci_dma_bootstrap' drivers/gpu/drm/mga/mga_dma.c:629: warning: Function parameter or member 'dma_bs' not described in 'mga_do_pci_dma_bootstrap' drivers/gpu/drm/mga/mga_dma.c:1150: warning: Function parameter or member 'dev' not described in 'mga_driver_unload' drivers/gpu/drm/mga/mga_dma.c:1159: warning: Function parameter or member 'dev' not described in 'mga_driver_lastclose' Cc: David Airlie Cc: Daniel Vetter Cc: by Cc: Faith Cc: Jeff Hartmann Cc: Keith Whitwell Cc: Gareth Hughes Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201106214949.2042120-5-lee.jones@linaro.org commit 6ef2b857be2acd336ae02320bc02079abcf02ba9 Author: Lee Jones Date: Fri Nov 6 21:49:32 2020 +0000 drm/r128/ati_pcigart: Source file headers are not good candidates for kernel-doc Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/r128/ati_pcigart.c:2: warning: Cannot understand * file ati_pcigart.c Cc: David Airlie Cc: Daniel Vetter Cc: Gareth Hughes Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201106214949.2042120-3-lee.jones@linaro.org commit 13f876ba77ebd5125799bb042201f22cf73df154 Author: Thomas Gleixner Date: Tue Nov 3 10:27:34 2020 +0100 highmem: High implementation details and document API Move the gory details of kmap & al into a private header and only document the interfaces which are usable by drivers. Signed-off-by: Thomas Gleixner Cc: Linus Torvalds Cc: Christoph Hellwig Cc: Andrew Morton Link: https://lore.kernel.org/r/20201103095858.827582066@linutronix.de commit 9bf6f7bab3bad4b30f108fca25aa5297dff0973f Author: Thomas Gleixner Date: Tue Nov 3 10:27:33 2020 +0100 Documentation/io-mapping: Remove outdated blurb The implementation details in the documentation are outdated and not really helpful. Remove them. Signed-off-by: Thomas Gleixner Cc: Christoph Hellwig Cc: Andrew Morton Link: https://lore.kernel.org/r/20201103095858.734064977@linutronix.de commit 351191ad55c8a1eccaf23e4187c62056229c0779 Author: Thomas Gleixner Date: Tue Nov 3 10:27:32 2020 +0100 io-mapping: Cleanup atomic iomap Switch the atomic iomap implementation over to kmap_local and stick the preempt/pagefault mechanics into the generic code similar to the kmap_atomic variants. Rename the x86 map function in preparation for a non-atomic variant. Signed-off-by: Thomas Gleixner Cc: Linus Torvalds Cc: Christoph Hellwig Cc: Andrew Morton Link: https://lore.kernel.org/r/20201103095858.625310005@linutronix.de commit 3c1016b53c311906878c703af1e2b29855a9a962 Author: Thomas Gleixner Date: Tue Nov 3 10:27:31 2020 +0100 mm/highmem: Remove the old kmap_atomic cruft All users gone. Signed-off-by: Thomas Gleixner Cc: Linus Torvalds Cc: Christoph Hellwig Cc: Andrew Morton Cc: Arnd Bergmann Link: https://lore.kernel.org/r/20201103095858.516281567@linutronix.de commit d7029e4549691ecaf1ead536d3322a00bda85659 Author: Thomas Gleixner Date: Tue Nov 3 10:27:30 2020 +0100 highmem: Get rid of kmap_types.h The header is not longer used and on alpha, ia64, openrisc, parisc and um it was completely unused anyway as these architectures have no highmem support. Signed-off-by: Thomas Gleixner Cc: Christoph Hellwig Cc: Andrew Morton Cc: Arnd Bergmann Link: https://lore.kernel.org/r/20201103095858.422094352@linutronix.de commit 629ed3f7dad2a914b3a89fad49b358e363e3e6d1 Author: Thomas Gleixner Date: Tue Nov 3 10:27:29 2020 +0100 xtensa/mm/highmem: Switch to generic kmap atomic No reason having the same code in every architecture Signed-off-by: Thomas Gleixner Cc: Chris Zankel Cc: Max Filippov Cc: Arnd Bergmann Link: https://lore.kernel.org/r/20201103095858.311016780@linutronix.de commit 3293efa9780712ad8504689e0c296d2bd33827d5 Author: Thomas Gleixner Date: Tue Nov 3 10:27:28 2020 +0100 sparc/mm/highmem: Switch to generic kmap atomic No reason having the same code in every architecture Signed-off-by: Thomas Gleixner Cc: "David S. Miller" Cc: Arnd Bergmann Link: https://lore.kernel.org/r/20201103095858.197568209@linutronix.de commit 47da42b27a56f3ee5abace2858b69e277703f707 Author: Thomas Gleixner Date: Tue Nov 3 10:27:27 2020 +0100 powerpc/mm/highmem: Switch to generic kmap atomic No reason having the same code in every architecture Signed-off-by: Thomas Gleixner Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Arnd Bergmann Link: https://lore.kernel.org/r/20201103095858.087635810@linutronix.de commit 5f037ea3b26767e0b1bdc522948321b282268b49 Author: Thomas Gleixner Date: Tue Nov 3 10:27:26 2020 +0100 nds32/mm/highmem: Switch to generic kmap atomic The mapping code is odd and looks broken. See FIXME in the comment. Also fix the harmless off by one in the FIX_KMAP_END define. Signed-off-by: Thomas Gleixner Cc: Nick Hu Cc: Greentime Hu Cc: Vincent Chen Cc: Arnd Bergmann Link: https://lore.kernel.org/r/20201103095857.980576055@linutronix.de commit a4c33e83bca133ff979e13c784c7605e1ac143df Author: Thomas Gleixner Date: Tue Nov 3 10:27:25 2020 +0100 mips/mm/highmem: Switch to generic kmap atomic No reason having the same code in every architecture Signed-off-by: Thomas Gleixner Cc: Thomas Bogendoerfer Cc: Arnd Bergmann Link: https://lore.kernel.org/r/20201103095857.885321106@linutronix.de commit 7ac1b26b0a7288fc8f87aa8978891375f23740b2 Author: Thomas Gleixner Date: Tue Nov 3 10:27:24 2020 +0100 microblaze/mm/highmem: Switch to generic kmap atomic No reason having the same code in every architecture. Signed-off-by: Thomas Gleixner Cc: Michal Simek Cc: Arnd Bergmann Link: https://lore.kernel.org/r/20201103095857.777445435@linutronix.de commit 5af627a043e39d3226eecd75753dcd2c920c16ec Author: Thomas Gleixner Date: Tue Nov 3 10:27:23 2020 +0100 csky/mm/highmem: Switch to generic kmap atomic No reason having the same code in every architecture. Signed-off-by: Thomas Gleixner Cc: Guo Ren Cc: Arnd Bergmann Link: https://lore.kernel.org/r/20201103095857.681196473@linutronix.de commit 2a15ba82fa6ca3f35502b3060f22118a938d2889 Author: Thomas Gleixner Date: Tue Nov 3 10:27:22 2020 +0100 ARM: highmem: Switch to generic kmap atomic No reason having the same code in every architecture. Signed-off-by: Thomas Gleixner Cc: Russell King Cc: Arnd Bergmann Link: https://lore.kernel.org/r/20201103095857.582196476@linutronix.de commit 39cac191ff37939544af80d5d2af6b870fd94c9b Author: Thomas Gleixner Date: Tue Nov 3 10:27:21 2020 +0100 arc/mm/highmem: Use generic kmap atomic implementation Adopt the map ordering to match the other architectures and the generic code. Also make the maximum entries limited and not dependend on the number of CPUs. With the original implementation did the following calculation: nr_slots = mapsize >> PAGE_SHIFT; The results in either 512 or 1024 total slots depending on configuration. The total slots have to be divided by the number of CPUs to get the number of slots per CPU (former KM_TYPE_NR). ARC supports up to 4k CPUs, so this just falls apart in random ways depending on the number of CPUs and the actual kmap (atomic) nesting. The comment in highmem.c: * - fixmap anyhow needs a limited number of mappings. So 2M kvaddr == 256 PTE * slots across NR_CPUS would be more than sufficient (generic code defines * KM_TYPE_NR as 20). is just wrong. KM_TYPE_NR (now KM_MAX_IDX) is the number of slots per CPU because kmap_local/atomic() needs to support nested mappings (thread, softirq, interrupt). While KM_MAX_IDX might be overestimated, the above reasoning is just wrong and clearly the highmem code was never tested with any system with more than a few CPUs. Use the default number of slots and fail the build when it does not fit. Randomly failing at runtime is not a really good option. Signed-off-by: Thomas Gleixner Cc: Vineet Gupta Cc: Arnd Bergmann Link: https://lore.kernel.org/r/20201103095857.472289952@linutronix.de commit 157e118b55113d1e6c7f8ddfcec0a1dbf3a69511 Author: Thomas Gleixner Date: Tue Nov 3 10:27:20 2020 +0100 x86/mm/highmem: Use generic kmap atomic implementation Convert X86 to the generic kmap atomic implementation and make the iomap_atomic() naming convention consistent while at it. Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201103095857.375127260@linutronix.de commit 389755c250814185938f5b04334a4f0184c30647 Author: Thomas Gleixner Date: Tue Nov 3 10:27:19 2020 +0100 highmem: Make DEBUG_HIGHMEM functional For some obscure reason when CONFIG_DEBUG_HIGHMEM is enabled the stack depth is increased from 20 to 41. But the only thing DEBUG_HIGHMEM does is to enable a few BUG_ON()'s in the mapping code. That's a leftover from the historical mapping code which had fixed entries for various purposes. DEBUG_HIGHMEM inserted guard mappings between the map types. But that got all ditched when kmap_atomic() switched to a stack based map management. Though the WITH_KM_FENCE magic survived without being functional. All the thing does today is to increase the stack depth. Add a working implementation to the generic kmap_local* implementation. Signed-off-by: Thomas Gleixner Cc: Linus Torvalds Cc: Christoph Hellwig Cc: Andrew Morton Link: https://lore.kernel.org/r/20201103095857.268258322@linutronix.de commit 298fa1ad5571f59cb3ca5497a9455f36867f065e Author: Thomas Gleixner Date: Tue Nov 3 10:27:18 2020 +0100 highmem: Provide generic variant of kmap_atomic* The kmap_atomic* interfaces in all architectures are pretty much the same except for post map operations (flush) and pre- and post unmap operations. Provide a generic variant for that. Signed-off-by: Thomas Gleixner Cc: Linus Torvalds Cc: Christoph Hellwig Cc: Andrew Morton Link: https://lore.kernel.org/r/20201103095857.175939340@linutronix.de commit 4f8b96cd47b06f1e3ec71c1a3216113efe8dbfb5 Author: Thomas Gleixner Date: Tue Nov 3 10:27:17 2020 +0100 asm-generic: Provide kmap_size.h kmap_types.h is a misnomer because the old atomic MAP based array does not exist anymore and the whole indirection of architectures including kmap_types.h is inconinstent and does not allow to provide guard page debugging for this misfeature. Add a common header file which defines the mapping stack size for all architectures. Will be used when converting architectures over to a generic kmap_local/atomic implementation. The array size is chosen with the following constraints in mind: - The deepest nest level in one context is 3 according to code inspection. - The worst case nesting for the upcoming reemptible version would be: 2 maps in task context and a fault inside 2 maps in the fault handler 3 maps in softirq 2 maps in interrupt So a total of 16 is sufficient and probably overestimated. Signed-off-by: Thomas Gleixner Acked-by: Arnd Bergmann Cc: Andrew Morton Link: https://lore.kernel.org/r/20201103095857.078043987@linutronix.de commit 673afbace459ae6fd8d03bda410e0a9f10438c99 Author: Thomas Gleixner Date: Tue Nov 3 10:27:16 2020 +0100 sh/highmem: Remove all traces of unused cruft For whatever reasons SH has highmem bits all over the place but does not enable it via Kconfig. Remove the bitrot. Signed-off-by: Thomas Gleixner Cc: Andrew Morton Link: https://lore.kernel.org/r/20201103095856.979798613@linutronix.de Cc: Yoshinori Sato Cc: Rich Felker Cc: Arnd Bergmann Cc: Andrew Morton commit e8f147dc3f1f6b4c27b2eeaf82df4f469d80d469 Author: Thomas Gleixner Date: Tue Nov 3 10:27:15 2020 +0100 fs: Remove asm/kmap_types.h includes Historical leftovers from the time where kmap() had fixed slots. Signed-off-by: Thomas Gleixner Acked-by: David Sterba Cc: Andrew Morton Link: https://lore.kernel.org/r/20201103095856.870272797@linutronix.de commit b819fd9da38508e0504624b87d9983fcc4237f3c Author: Thomas Gleixner Date: Tue Nov 3 10:27:14 2020 +0100 highmem: Remove unused functions Nothing uses totalhigh_pages_dec() and totalhigh_pages_set(). Signed-off-by: Thomas Gleixner Cc: Christoph Hellwig Cc: Andrew Morton Link: https://lore.kernel.org/r/20201103095856.732891880@linutronix.de commit 16675dda9355505245b89dd50723a2754819594b Author: Thomas Gleixner Date: Tue Nov 3 10:27:13 2020 +0100 mm/highmem: Un-EXPORT __kmap_atomic_idx() Nothing in modules can use that. Signed-off-by: Thomas Gleixner Reviewed-by: Christoph Hellwig Cc: Andrew Morton Link: https://lore.kernel.org/r/20201103095856.595767588@linutronix.de commit f055f355faf1991ef4e6b3c3517f8f2fc247805e Author: Alexei Starovoitov Date: Fri Nov 6 12:33:46 2020 -0800 selftests/bpf: Fix selftest build with old libc pidfd_open was added in 2019. Some versions of libc library don't define it. Define it manually if it's not available. Reported-by: Sergei Iudin Signed-off-by: Alexei Starovoitov commit dfe21dcabac001e0a102c1aa3bbaee00041e9e0f Author: Łukasz Stelmach Date: Tue Nov 3 16:15:36 2020 +0100 ARM: defconfig: Enable ax88796c driver for Exynos boards Enable ax88796c driver for the Ethernet chip on Exynos3250-based ARTIK5 boards in exynos and multi_v7 defconfigs. Signed-off-by: Łukasz Stelmach Link: https://lore.kernel.org/r/20201103151536.26472-6-l.stelmach@samsung.com Signed-off-by: Krzysztof Kozlowski commit 2024b130b0c8b09d6086c495910faddbd9c6be02 Author: Łukasz Stelmach Date: Tue Nov 3 16:15:35 2020 +0100 ARM: dts: exynos: Add Ethernet to Artik 5 board Add node for ax88796c ethernet chip. Signed-off-by: Łukasz Stelmach Link: https://lore.kernel.org/r/20201103151536.26472-5-l.stelmach@samsung.com Signed-off-by: Krzysztof Kozlowski commit 3b4202a4706d8da5cd0243050ed2e51708b2802f Merge: c9448e828d113 21584e6a92bd2 Author: Jakub Kicinski Date: Fri Nov 6 11:28:54 2020 -0800 Merge branch 'nexthop-add-support-for-nexthop-objects-offload' Ido Schimmel says: ==================== nexthop: Add support for nexthop objects offload This patch set adds support for nexthop objects offload with a dummy implementation over netdevsim. mlxsw support will be added later. The general idea is very similar to route offload in that notifications are sent whenever nexthop objects are changed. A listener can veto the change and the error will be communicated to user space with extack. To keep listeners as simple as possible, they not only receive notifications for the nexthop object that is changed, but also for all the other objects affected by this change. For example, when a single nexthop is replaced, a replace notification is sent for the single nexthop, but also for all the nexthop groups this nexthop is member in. This relieves listeners from the need to track such dependencies. To simplify things further for listeners, the notification info does not contain the raw nexthop data structures (e.g., 'struct nexthop'), but less complex data structures into which the raw data structures are parsed into. Tested with a new selftest over netdevsim and with fib_nexthops.sh: Tests passed: 164 Tests failed: 0 Patch set overview: Patches #1-#4 introduce the aforementioned data structures and convert existing listeners (i.e., the VXLAN driver) to use them. Patches #5-#6 add a new RTNH_F_TRAP flag and the ability to set it and RTNH_F_OFFLOAD on nexthops. This flag is used by netdevsim for testing purposes and will also be used by mlxsw. These flags are consistent with the existing RTM_F_OFFLOAD and RTM_F_TRAP flags. Patches #7-#14 gradually add the new nexthop notifications. Patches #15-#18 add a dummy implementation for nexthop offload over netdevsim and a selftest to exercise both good and bad flows. Changes since RFC [1]: Patch #1: s/is_encap/has_encap/ Patch #3: Add a blank line in __nh_notifier_single_info_init() Patch #5: Reword commit message Patch #6: s/nexthop_hw_flags_set/nexthop_set_hw_flags/ Patch #7: Reword commit message Patch #11: Allocate extack on the stack Follow-up patch sets: selftests: forwarding: Add nexthop objects tests mlxsw: Preparations for nexthop objects support - part 1/2 mlxsw: Preparations for nexthop objects support - part 2/2 mlxsw: Add support for nexthop objects mlxsw: Add support for blackhole nexthops mlxsw: Update adjacency index more efficiently [1] https://lore.kernel.org/netdev/20200908091037.2709823-1-idosch@idosch.org/ ==================== Link: https://lore.kernel.org/r/20201104133040.1125369-1-idosch@idosch.org Signed-off-by: Jakub Kicinski commit 21584e6a92bd2a85411793c0da3d48ab327e9b72 Author: Ido Schimmel Date: Wed Nov 4 15:30:40 2020 +0200 selftests: netdevsim: Add test for nexthop offload API Test various aspects of the nexthop offload API on top of the netdevsim implementation. Both good and bad flows are tested. Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit 66e58bf0707b126e2da90eca8cf00845757e9fbe Author: Ido Schimmel Date: Wed Nov 4 15:30:39 2020 +0200 netdevsim: Allow programming routes with nexthop objects Previous patches added the ability to program nexthop objects. Therefore, no longer forbid the programming of routes that point to such objects. Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: Jakub Kicinski commit 8fa84742d66625281a14b5db4c1f64f06c5b106a Author: Ido Schimmel Date: Wed Nov 4 15:30:38 2020 +0200 netdevsim: Add dummy implementation for nexthop offload Implement dummy nexthop "offload" in the driver by storing currently "programmed" nexthops in a hash table. Each nexthop in the hash table is marked with "trap" indication and increments the nexthops resource occupancy. This will later allow us to test the nexthop offload API on top of netdevsim. Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit 35266255d61c777abd69c2faaa44c92b5a0483c2 Author: Ido Schimmel Date: Wed Nov 4 15:30:37 2020 +0200 netdevsim: Add devlink resource for nexthops The Spectrum ASIC has a dedicated table where nexthops (i.e., adjacency entries) are populated. The size of this table can be controlled via devlink-resource. Add such a resource to netdevsim so that its occupancy will reflect the number of nexthop objects currently programmed to the device. By limiting the size of the resource, error paths could be exercised and tested. Example output: # devlink resource show netdevsim/netdevsim10 netdevsim/netdevsim10: name IPv4 size unlimited unit entry size_min 0 size_max unlimited size_gran 1 dpipe_tables none resources: name fib size unlimited occ 4 unit entry size_min 0 size_max unlimited size_gran 1 dpipe_tables none name fib-rules size unlimited occ 3 unit entry size_min 0 size_max unlimited size_gran 1 dpipe_tables none name IPv6 size unlimited unit entry size_min 0 size_max unlimited size_gran 1 dpipe_tables none resources: name fib size unlimited occ 1 unit entry size_min 0 size_max unlimited size_gran 1 dpipe_tables none name fib-rules size unlimited occ 2 unit entry size_min 0 size_max unlimited size_gran 1 dpipe_tables none name nexthops size unlimited occ 0 unit entry size_min 0 size_max unlimited size_gran 1 dpipe_tables none Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit bbea126c2badf677925e46083d708ca292c530f6 Author: Ido Schimmel Date: Wed Nov 4 15:30:36 2020 +0200 nexthop: Remove in-kernel route notifications when nexthop changes Remove in-kernel route notifications when the configuration of their nexthop changes. These notifications are unnecessary because the route still uses the same nexthop ID. A separate notification for the nexthop change itself is now sent in the nexthop notification chain. Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: Jakub Kicinski commit 975ff7f3324af33e218e3d0abf5797c2b67f97d7 Author: Ido Schimmel Date: Wed Nov 4 15:30:35 2020 +0200 nexthop: Replay nexthops when registering a notifier When registering a new notifier to the nexthop notification chain, replay all the existing nexthops to the new notifier so that it will have a complete picture of the available nexthops. Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit ce7e9c8a080b6daca646a7740d916ed547503a12 Author: Ido Schimmel Date: Wed Nov 4 15:30:34 2020 +0200 nexthop: Pass extack to register_nexthop_notifier() This will be used by the next patch which extends the function to replay all the existing nexthops to the notifier block being registered. Device drivers will be able to pass extack to the function since it is passed to them upon reload from devlink. Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: Jakub Kicinski commit 833a1065eeb14437a9a0dfa9dad06ea09894e0b5 Author: Ido Schimmel Date: Wed Nov 4 15:30:33 2020 +0200 nexthop: Emit a notification when a nexthop group is reduced When a single nexthop is deleted, the configuration of all the groups using the nexthop is effectively modified. In this case, emit a notification in the nexthop notification chain for each modified group so that listeners would not need to keep track of which nexthops are member in which groups. In the rare cases where the notification fails, emit an error to the kernel log. This is done by allocating extack on the stack and printing the error logged by the listener that rejected the notification. Changes since RFC: * Allocate extack on the stack Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit f17bc33d7412bcca58825273d9f4abf84a87c4cb Author: Ido Schimmel Date: Wed Nov 4 15:30:32 2020 +0200 nexthop: Emit a notification when a nexthop group is modified When a single nexthop is replaced, the configuration of all the groups using the nexthop is effectively modified. In this case, emit a notification in the nexthop notification chain for each modified group so that listeners would not need to keep track of which nexthops are member in which groups. The notification can only be emitted after the new configuration (i.e., 'struct nh_info') is pointed at by the old shell (i.e., 'struct nexthop'). Before that the configuration of the nexthop groups is still the same as before the replacement. Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: Jakub Kicinski commit 8c09c9f9d846cdd8a92604c591132985b04fd1d6 Author: Ido Schimmel Date: Wed Nov 4 15:30:31 2020 +0200 nexthop: Emit a notification when a single nexthop is replaced The notification is emitted after all the validation checks were performed, but before the new configuration (i.e., 'struct nh_info') is pointed at by the old shell (i.e., 'struct nexthop'). This prevents the need to perform rollback in case the notification is vetoed. The next patch will also emit a replace notification for all the nexthop groups in which the nexthop is used. Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit d144cc5f4f4eaf0cd2e7a1a6369054da583f6c93 Author: Ido Schimmel Date: Wed Nov 4 15:30:30 2020 +0200 nexthop: Emit a notification when a nexthop group is replaced Emit a notification in the nexthop notification chain when an existing nexthop group is replaced. The notification is emitted after all the validation checks were performed, but before the new configuration (i.e., 'struct nh_grp') is pointed at by the old shell (i.e., 'struct nexthop'). This prevents the need to perform rollback in case the notification is vetoed. Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: Jakub Kicinski commit 732d167bf5f53a8c1e8c53cf7dbffe2a13f63752 Author: Ido Schimmel Date: Wed Nov 4 15:30:29 2020 +0200 nexthop: Emit a notification when a nexthop is added Emit a notification in the nexthop notification chain when a new nexthop is added (not replaced). The nexthop can either be a new group or a single nexthop. The notification is sent after the nexthop is inserted into the red-black tree, as listeners might need to callback into the nexthop code with the nexthop ID in order to mark the nexthop as offloaded. A 'REPLACE' notification is emitted instead of 'ADD' as the distinction between the two is not important for in-kernel listeners. In case the listener is not familiar with the encoded nexthop ID, it can simply treat it as a new one. This is also consistent with the route offload API. Changes since RFC: * Reword commit message Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit e95f2592f633a334b175003f13f42d3c217dc657 Author: Ido Schimmel Date: Wed Nov 4 15:30:28 2020 +0200 nexthop: Allow setting "offload" and "trap" indications on nexthops Add a function that can be called by device drivers to set "offload" or "trap" indication on nexthops following nexthop notifications. Changes since RFC: * s/nexthop_hw_flags_set/nexthop_set_hw_flags/ Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit 968a83f8cf6fd5a107289c57ee3197a52c72f02c Author: Ido Schimmel Date: Wed Nov 4 15:30:27 2020 +0200 rtnetlink: Add RTNH_F_TRAP flag The flag indicates to user space that the nexthop is not programmed to forward packets in hardware, but rather to trap them to the CPU. This is needed, for example, when the MAC of the nexthop neighbour is not resolved and packets should reach the CPU to trigger neighbour resolution. The flag will be used in subsequent patches by netdevsim to test nexthop objects programming to device drivers and in the future by mlxsw as well. Changes since RFC: * Reword commit message Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: Jakub Kicinski commit 1ec69d187cb8f564af570df7edf2c500dcb13702 Author: Ido Schimmel Date: Wed Nov 4 15:30:26 2020 +0200 nexthop: vxlan: Convert to new notification info Convert the sole listener of the nexthop notification chain (the VXLAN driver) to the new notification info. Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit 5ca474f23454d4231e2e879d4d0daf3f85de582c Author: Ido Schimmel Date: Wed Nov 4 15:30:25 2020 +0200 nexthop: Prepare new notification info Prepare the new notification information so that it could be passed to listeners in the new patch. Changes since RFC: * Add a blank line in __nh_notifier_single_info_init() Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: Jakub Kicinski commit 3578d53dcef152a460a2d560c95dcc4399ff04cd Author: Ido Schimmel Date: Wed Nov 4 15:30:24 2020 +0200 nexthop: Pass extack to nexthop notifier The next patch will add extack to the notification info. This allows listeners to veto notifications and communicate the reason to user space. Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: Jakub Kicinski commit 1c9cac65cecd4f98d8713ec0c737c38a26e5b5c2 Author: Ido Schimmel Date: Wed Nov 4 15:30:23 2020 +0200 nexthop: Add nexthop notification data structures Add data structures that will be used for nexthop replace and delete notifications in the previously introduced nexthop notification chain. New data structures are added instead of passing the existing nexthop code structures directly for several reasons. First, the existing structures encode a lot of bookkeeping information which is irrelevant for listeners of the notification chain. Second, the existing structures can be changed without worrying about introducing regressions in listeners since they are not accessed directly by them. Third, listeners of the notification chain do not need to each parse the relatively complex nexthop code structures. They are passing the required information in a simplified way. Note that a single 'has_encap' bit is added instead of the actual encapsulation information since current listeners do not support such nexthops. Changes since RFC: * s/is_encap/has_encap/ Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: Jakub Kicinski commit 991fcb77f490390bcad89fa67d95763c58cdc04c Author: Lyude Paul Date: Thu Nov 5 18:57:02 2020 -0500 drm/edid: Fix uninitialized variable in drm_cvt_modes() Noticed this when trying to compile with -Wall on a kernel fork. We potentially don't set width here, which causes the compiler to complain about width potentially being uninitialized in drm_cvt_modes(). So, let's fix that. Changes since v1: * Don't emit an error as this code isn't reachable, just mark it as such Changes since v2: * Remove now unused variable Fixes: 3f649ab728cd ("treewide: Remove uninitialized_var() usage") Signed-off-by: Lyude Paul Reviewed-by: Ilia Mirkin Link: https://patchwork.freedesktop.org/patch/msgid/20201105235703.1328115-1-lyude@redhat.com commit c553bb54a486eab2b0d3671db4b985c8d1ba51e9 Author: Dmitry Osipenko Date: Wed Nov 4 19:48:52 2020 +0300 dt-bindings: host1x: Document new interconnect properties Most of Host1x devices have at least one memory client. These clients are directly connected to the memory controller. The new interconnect properties represent the memory client's connection to the memory controller. Signed-off-by: Dmitry Osipenko Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201104164923.21238-17-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit 254a42ac93900f92307a280daf4ccbd118c72255 Author: Dmitry Osipenko Date: Wed Nov 4 19:48:51 2020 +0300 dt-bindings: tegra30-actmon: Document OPP and interconnect properties Document EMC DFS OPP table and interconnect paths that will be used for scaling of system's memory bandwidth based on memory utilization statistics. Previously ACTMON was supposed to drive EMC clock rate directly, but now it should do it using interconnect framework in order to support shared voltage scaling in addition to the frequency scaling. Signed-off-by: Dmitry Osipenko Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201104164923.21238-16-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit 881f68ed9d4e2d9f6e4247f2f01d9c457921e6c6 Author: Dmitry Osipenko Date: Wed Nov 4 19:48:50 2020 +0300 dt-bindings: memory: tegra124: emc: Document OPP table and voltage regulator Document new OPP table and voltage regulator properties which are needed for supporting dynamic voltage-frequency scaling of the memory controller. Some boards may have a fixed core voltage regulator, hence it's optional because frequency scaling still may be desired. Signed-off-by: Dmitry Osipenko Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201104164923.21238-15-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit cf3b2deb459df1d1f3cdbd4d24b35e9f3506d92f Author: Dmitry Osipenko Date: Wed Nov 4 19:48:49 2020 +0300 dt-bindings: memory: tegra124: emc: Document new interconnect property External memory controller is interconnected with memory controller and with external memory. Document new interconnect property which turns External Memory Controller into interconnect provider. Signed-off-by: Dmitry Osipenko Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201104164923.21238-14-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit cac2a3552c9ef3ee2ff9ec72794e1ab0a1f64012 Author: Dmitry Osipenko Date: Wed Nov 4 19:48:48 2020 +0300 dt-bindings: memory: tegra124: mc: Document new interconnect property Memory controller is interconnected with memory clients and with the External Memory Controller. Document new interconnect property which turns memory controller into interconnect provider. Signed-off-by: Dmitry Osipenko Acked-by: Rob Herring Link: https://lore.kernel.org/r/20201104164923.21238-13-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit 48126d7884ab56c2352ae328d5fd42c7d2d7b125 Author: Dmitry Osipenko Date: Wed Nov 4 19:48:47 2020 +0300 dt-bindings: memory: tegra30: emc: Document OPP table and voltage regulator Document new OPP table and voltage regulator properties which are needed for supporting dynamic voltage-frequency scaling of the memory controller. Some boards may have a fixed core voltage regulator, hence it's optional because frequency scaling still may be desired. Signed-off-by: Dmitry Osipenko Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201104164923.21238-12-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit 6ec85c032aee0cde82b2c63a3e521132c97c4660 Author: Dmitry Osipenko Date: Wed Nov 4 19:48:46 2020 +0300 dt-bindings: memory: tegra30: emc: Document new interconnect property External memory controller is interconnected with memory controller and with external memory. Document new interconnect property which turns External Memory Controller into interconnect provider. Signed-off-by: Dmitry Osipenko Acked-by: Rob Herring Link: https://lore.kernel.org/r/20201104164923.21238-11-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit ed7f6f2eaae850ee836bee05feb1df722c13efad Author: Dmitry Osipenko Date: Wed Nov 4 19:48:45 2020 +0300 dt-bindings: memory: tegra30: mc: Document new interconnect property Memory controller is interconnected with memory clients and with the External Memory Controller. Document new interconnect property which turns memory controller into interconnect provider. Signed-off-by: Dmitry Osipenko Acked-by: Rob Herring Link: https://lore.kernel.org/r/20201104164923.21238-10-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit 95e638e8b0b4bd0d51262bb7d01693039fc5ae48 Author: Dmitry Osipenko Date: Wed Nov 4 19:48:44 2020 +0300 dt-bindings: memory: tegra20: emc: Document OPP table and voltage regulator The SoC core voltage can't be changed without taking into account the clock rate of External Memory Controller. Document OPP table that will be used for dynamic voltage frequency scaling, taking into account EMC voltage requirement. Document optional core voltage regulator, which is optional because some boards may have a fixed core regulator and still frequency scaling may be desired to have. Signed-off-by: Dmitry Osipenko Acked-by: Rob Herring Link: https://lore.kernel.org/r/20201104164923.21238-9-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit 5e768b1fe46e6644cdbbbfa8c879c6cccb5639ba Author: Dmitry Osipenko Date: Wed Nov 4 19:48:43 2020 +0300 dt-bindings: memory: tegra20: emc: Document new interconnect property External Memory Controller is interconnected with memory controller and with external memory. Document new interconnect property which turns EMC into interconnect provider. Signed-off-by: Dmitry Osipenko Acked-by: Rob Herring Link: https://lore.kernel.org/r/20201104164923.21238-8-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit 3ee81e021f2bd44b70312692b719995d398a84ee Author: Dmitry Osipenko Date: Wed Nov 4 19:48:42 2020 +0300 dt-bindings: memory: tegra20: mc: Document new interconnect property Memory controller is interconnected with memory clients and with the External Memory Controller. Document new interconnect property which turns memory controller into interconnect provider. Signed-off-by: Dmitry Osipenko Acked-by: Rob Herring Link: https://lore.kernel.org/r/20201104164923.21238-7-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit e51a59f079c546b8b5c31604ad98e86b06ec93e9 Author: Dmitry Osipenko Date: Wed Nov 4 19:48:41 2020 +0300 dt-bindings: memory: tegra20: emc: Document nvidia, memory-controller property Tegra20 External Memory Controller talks to DRAM chips and it needs to be reprogrammed when memory frequency changes. Tegra Memory Controller sits behind EMC and these controllers are tightly coupled. This patch adds the new phandle property which allows to properly express connection of EMC and MC hardware in a device-tree, it also put the Tegra20 EMC binding on par with Tegra30+ EMC bindings, which is handy to have. Signed-off-by: Dmitry Osipenko Acked-by: Rob Herring Link: https://lore.kernel.org/r/20201104164923.21238-6-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit 245157a31e91aec7f5b621ed26c0a8370b1c8a64 Author: Dmitry Osipenko Date: Wed Nov 4 19:48:39 2020 +0300 soc/tegra: fuse: Add stub for tegra_sku_info Drivers that use tegra_sku_info and have COMPILE_TEST are failing to be build due to the missing stub for tegra_sku_info. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20201104164923.21238-4-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit fc4fbf88ecbee88381899b4a7f97c9b52570e91a Author: Dmitry Osipenko Date: Wed Nov 4 19:48:38 2020 +0300 soc/tegra: fuse: Export tegra_read_ram_code() The tegra_read_ram_code() is used by EMC drivers and we're going to make these driver modular, hence this function needs to be exported. Signed-off-by: Dmitry Osipenko Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20201104164923.21238-3-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit 4cfdad35ae7ed400d7146aeb57d34744ce53e9dc Author: Dmitry Osipenko Date: Wed Nov 4 19:48:37 2020 +0300 clk: tegra: Export Tegra20 EMC kernel symbols We're going to modularize Tegra EMC drivers and some of the EMC-clock driver symbols need to be exported. Signed-off-by: Dmitry Osipenko Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20201104164923.21238-2-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit 15af36596ae305aefc8c502c2d3e8c58221709eb Author: Zhen Lei Date: Fri Nov 6 22:12:16 2020 +0800 x86/mce: Correct the detection of invalid notifier priorities Commit c9c6d216ed28 ("x86/mce: Rename "first" function as "early"") changed the enumeration of MCE notifier priorities. Correct the check for notifier priorities to cover the new range. [ bp: Rewrite commit message, remove superfluous brackets in conditional. ] Fixes: c9c6d216ed28 ("x86/mce: Rename "first" function as "early"") Signed-off-by: Zhen Lei Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201106141216.2062-2-thunder.leizhen@huawei.com commit 1b4fb70e5b28a477478417a7958e0228460ffe68 Author: Peter Ujfalusi Date: Fri Nov 6 09:25:51 2020 +0200 ASoC: ti: davinci-mcasp: Handle missing required DT properties McASP needs three required properties to be usable for audio: op-mode, tdm-slots and the serial-dir array. Instead of probing the driver even without the needed information we should make sure that all the parameters are provided for operation. The fact that McASP can act as a GPIO controller for it's pins complicates this a bit, but as a general rule we can: - we fail the probe if McASP is not configured to be used as gpiochip - we will not register the DAI (and PCM) if gpiochip is defined Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20201106072551.689-5-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit 1125d925990b8d8166c45396c9281e2a705c97f8 Author: Peter Ujfalusi Date: Fri Nov 6 09:25:50 2020 +0200 ASoC: ti: davinci-mcasp: Simplify the configuration parameter handling Replace the davinci_mcasp_set_pdata_from_of() function which returned a pdata pointer with davinci_mcasp_get_config() to return an actual error code and handle all pdata validation and private mcasp struct setup in there. Drop the unused ram-size-playback and sram-size-capture query from DT at the same time. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20201106072551.689-4-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit db8793a39b293d5a8983e1713a70a76cb039c2fe Author: Peter Ujfalusi Date: Fri Nov 6 09:25:49 2020 +0200 ASoC: ti: davinci-mcasp: Remove legacy dma_request parsing The legacy dma_request (which was holding the DMA request number) is no longer in use for a long time. All legacy platforms has been converted to dma_slave_map. Remove it along with the DT parsing to get tx_dma_channel and rx_dma_channel. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20201106072551.689-3-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit 372c4bd11de1793667e11d19c29fffc80495eeca Author: Peter Ujfalusi Date: Fri Nov 6 09:25:48 2020 +0200 ASoC: ti: davinci-mcasp: Use platform_get_irq_byname_optional Depending on the integration of McASP either the 'common' or the 'rx' and 'tx' or only the 'tx' interrupt number is valid, provided. By switching to platform_get_irq_byname_optional() we can clean up the bootlog from messages like: davinci-mcasp 2ba0000.mcasp: IRQ common not found The irq number == 0 is not valid, fix the check at the same time. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20201106072551.689-2-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit 54defc10c4d973d610431e02794bc77405d06e83 Author: Ville Syrjälä Date: Tue Nov 3 17:30:26 2020 +0200 drm/i915: Include fb modifier in state dumps To help diagnose modifier related issues let's include that information in the various state dumps. Cc: Simon Ser Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201103153026.16566-1-ville.syrjala@linux.intel.com Acked-by: Simon Ser commit 441494ec2a302830357d0aa59f3b907e319a8b26 Author: Vignesh Raghavendra Date: Thu Oct 29 12:23:18 2020 +0530 dt-bindings: serial: 8250_omap: Add compatible for UART controller on AM64 SoC AM64 uses a UART controller that is compatible with AM654 UART. Introduce a specific compatible to help handle the differences if necessary. Reviewed-by: Nishanth Menon Acked-by: Rob Herring Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20201029065318.2437-1-vigneshr@ti.com Signed-off-by: Greg Kroah-Hartman commit 0d66442dfdbd45019c60bb6aeaf2d5eb45534606 Author: Rikard Falkeborn Date: Thu Nov 5 00:51:34 2020 +0100 tty: serial: msm_serial: Constify msm_uart_pops The only usage of msm_uart_pops is to assign its address to the ops field in the uart_port struct, which is a pointer to const. Make it const to allow the compiler to put it in read-only memory. Reviewed-by: Jeffrey Hugo Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20201104235134.17793-1-rikard.falkeborn@gmail.com Signed-off-by: Greg Kroah-Hartman commit 439c7183e5b97952bba1747f5ffc4dea45a6a18b Author: Vignesh Raghavendra Date: Thu Oct 29 10:49:30 2020 +0530 serial: 8250: 8250_omap: Disable RX interrupt after DMA enable UARTs on TI SoCs prior to J7200 don't provide independent control over RX FIFO not empty interrupt (RHR_IT) and RX timeout interrupt. Starting with J7200 SoC, its possible to disable RHR_IT independent of RX timeout interrupt using bit 2 of IER2 register. So disable RHR_IT once RX DMA is started so as to avoid spurious interrupt being raised when data is in the RX FIFO but is yet to be drained by DMA (a known errata in older SoCs). Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20201029051930.7097-1-vigneshr@ti.com Signed-off-by: Greg Kroah-Hartman commit 80f510f5fd078379b772f3b745c49e1db949bb43 Author: Liu Xiang Date: Fri Oct 30 21:43:11 2020 +0800 tty: serial: linflexuart: Remove unnecessary '|' operation and add error count The '|' operation of status in linflex_rxint is unnecessary, so it can be removed. Signed-off-by: Liu Xiang Link: https://lore.kernel.org/r/1604065391-3790-1-git-send-email-liuxiang_1999@126.com Signed-off-by: Greg Kroah-Hartman commit cbd90e746148339ddbf6b980438b0adad990321e Author: YueHaibing Date: Sat Oct 31 11:05:30 2020 +0800 serial: mctrl_gpio: Fix passing zero to 'ERR_PTR' warning drivers/tty/serial/serial_mctrl_gpio.c:214 mctrl_gpio_init() warn: passing zero to 'ERR_PTR' gpiod_to_irq() never return 0, so remove the useless test and make code more clear. Reviewed-by: Jiri Slaby Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20201031030530.1304-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman commit 3d608a591b2b6a2cd81d6258df6d1766db05567e Author: Lee Jones Date: Thu Nov 5 12:33:57 2020 +0000 tty: Remove redundant synclinkmp driver A note from the vendor: "The hardware used with synclink.c and synclinkmp.c has not been manufactured for 15 years and was low volume. The chances of either driver still being in use is very low. Not even Microgate (me) has the ability to test either anymore (no hardware). I don’t know the policy about driver removal, but I think both could be removed without upsetting anyone." Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201105123357.708813-3-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit a1f714b44e342dc143dc4c6b909bf516f18fe412 Author: Lee Jones Date: Thu Nov 5 12:33:56 2020 +0000 tty: Remove redundant synclink driver A note from the vendor: "The hardware used with synclink.c and synclinkmp.c has not been manufactured for 15 years and was low volume. The chances of either driver still being in use is very low. Not even Microgate (me) has the ability to test either anymore (no hardware). I don’t know the policy about driver removal, but I think both could be removed without upsetting anyone." Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201105123357.708813-2-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 4170bc6baa5446e1d85e0b7647ea54ba72aa85c4 Author: KP Singh Date: Fri Nov 6 10:37:47 2020 +0000 bpf: Exercise syscall operations for inode and sk storage Use the check_syscall_operations added for task_local_storage to exercise syscall operations for other local storage maps: * Check the absence of an element for the given fd. * Create a new element, retrieve and compare its value. * Delete the element and check again for absence. Signed-off-by: KP Singh Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20201106103747.2780972-10-kpsingh@chromium.org commit 9cde3beeadb311d4b435a7d28d5ab72bcc5de65d Author: KP Singh Date: Fri Nov 6 10:37:46 2020 +0000 bpf: Add tests for task_local_storage The test exercises the syscall based map operations by creating a pidfd for the current process. For verifying kernel / LSM functionality, the test implements a simple MAC policy which denies an executable from unlinking itself. The LSM program bprm_committed_creds sets a task_local_storage with a pointer to the inode. This is then used to detect if the task is trying to unlink itself in the inode_unlink LSM hook. The test copies /bin/rm to /tmp and executes it in a child thread with the intention of deleting itself. A successful test should prevent the the running executable from deleting itself. The bpf programs are also updated to call bpf_spin_{lock, unlock} to trigger the verfier checks for spin locks. The temporary file is cleaned up later in the test. Signed-off-by: KP Singh Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20201106103747.2780972-9-kpsingh@chromium.org commit a367efa71b3f5a53281ca9772f8bf43166dfdf5f Author: KP Singh Date: Fri Nov 6 10:37:45 2020 +0000 bpf: Update selftests for local_storage to use vmlinux.h With the fixing of BTF pruning of embedded types being fixed, the test can be simplified to use vmlinux.h Signed-off-by: KP Singh Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20201106103747.2780972-8-kpsingh@chromium.org commit f0e5ba0bc481df77cf0afac2b33e420b33eeb463 Author: KP Singh Date: Fri Nov 6 10:37:44 2020 +0000 bpf: Fix tests for local_storage The {inode,sk}_storage_result checking if the correct value was retrieved was being clobbered unconditionally by the return value of the bpf_{inode,sk}_storage_delete call. Also, consistently use the newly added BPF_LOCAL_STORAGE_GET_F_CREATE flag. Fixes: cd324d7abb3d ("bpf: Add selftests for local_storage") Signed-off-by: KP Singh Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20201106103747.2780972-7-kpsingh@chromium.org commit 3ca1032ab7ab010eccb107aa515598788f7d93bb Author: KP Singh Date: Fri Nov 6 10:37:43 2020 +0000 bpf: Implement get_current_task_btf and RET_PTR_TO_BTF_ID The currently available bpf_get_current_task returns an unsigned integer which can be used along with BPF_CORE_READ to read data from the task_struct but still cannot be used as an input argument to a helper that accepts an ARG_PTR_TO_BTF_ID of type task_struct. In order to implement this helper a new return type, RET_PTR_TO_BTF_ID, is added. This is similar to RET_PTR_TO_BTF_ID_OR_NULL but does not require checking the nullness of returned pointer. Signed-off-by: KP Singh Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20201106103747.2780972-6-kpsingh@chromium.org commit 864ab0616dccf14e51618a24acc7cf23ddd2b98a Author: KP Singh Date: Fri Nov 6 10:37:42 2020 +0000 bpftool: Add support for task local storage Updates the binary to handle the BPF_MAP_TYPE_TASK_STORAGE as "task_storage" for printing and parsing. Also updates the documentation and bash completion Signed-off-by: KP Singh Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20201106103747.2780972-5-kpsingh@chromium.org commit 8885274d225985807deeb95de74642073c3b97bb Author: KP Singh Date: Fri Nov 6 10:37:41 2020 +0000 libbpf: Add support for task local storage Updates the bpf_probe_map_type API to also support BPF_MAP_TYPE_TASK_STORAGE similar to other local storage maps. Signed-off-by: KP Singh Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20201106103747.2780972-4-kpsingh@chromium.org commit 4cf1bc1f10452065a29d576fc5693fc4fab5b919 Author: KP Singh Date: Fri Nov 6 10:37:40 2020 +0000 bpf: Implement task local storage Similar to bpf_local_storage for sockets and inodes add local storage for task_struct. The life-cycle of storage is managed with the life-cycle of the task_struct. i.e. the storage is destroyed along with the owning task with a callback to the bpf_task_storage_free from the task_free LSM hook. The BPF LSM allocates an __rcu pointer to the bpf_local_storage in the security blob which are now stackable and can co-exist with other LSMs. The userspace map operations can be done by using a pid fd as a key passed to the lookup, update and delete operations. Signed-off-by: KP Singh Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20201106103747.2780972-3-kpsingh@chromium.org commit 9e7a4d9831e836eb03dedab89902277ee94eb7a6 Author: KP Singh Date: Fri Nov 6 10:37:39 2020 +0000 bpf: Allow LSM programs to use bpf spin locks Usage of spin locks was not allowed for tracing programs due to insufficient preemption checks. The verifier does not currently prevent LSM programs from using spin locks, but the helpers are not exposed via bpf_lsm_func_proto. Based on the discussion in [1], non-sleepable LSM programs should be able to use bpf_spin_{lock, unlock}. Sleepable LSM programs can be preempted which means that allowng spin locks will need more work (disabling preemption and the verifier ensuring that no sleepable helpers are called when a spin lock is held). [1]: https://lore.kernel.org/bpf/20201103153132.2717326-1-kpsingh@chromium.org/T/#md601a053229287659071600d3483523f752cd2fb Signed-off-by: KP Singh Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20201106103747.2780972-2-kpsingh@chromium.org commit 88b8138b240b43d5215bf7cb422692cd8db51f6f Author: Thomas Bogendoerfer Date: Fri Nov 6 14:03:31 2020 +0100 tty: serial: remove pnx8xxx uart driver Commit 625326ea9c84 ("MIPS: Remove PNX833x alias NXP_STB22x") removed support for PNX833x, so it's time to remove serial driver, too. Signed-off-by: Thomas Bogendoerfer Link: https://lore.kernel.org/r/20201106130332.103476-1-tsbogend@alpha.franken.de Signed-off-by: Greg Kroah-Hartman commit 37174f3341306eaea7b7f4f5cc624e0040305a98 Author: Dmitry Osipenko Date: Wed Nov 4 20:04:23 2020 +0300 gpio: tegra: Use raw_spinlock Use raw_spinlock in order to fix spurious messages about invalid context when spinlock debugging is enabled. This happens because there is a legit nested raw_spinlock->spinlock locking usage within IRQ-related code. IRQ core uses raw spinlock and then Tegra GPIO driver uses a nested spinlock. The debug code can't recognize and handle this case, hence we need to use raw spinlock in the GPIO driver. [ BUG: Invalid wait context ] ... (dump_stack) from (__lock_acquire) (__lock_acquire) from (lock_acquire) (lock_acquire) from (_raw_spin_lock_irqsave) (_raw_spin_lock_irqsave) from (tegra_gpio_irq_set_type) (tegra_gpio_irq_set_type) from (__irq_set_trigger) (__irq_set_trigger) from (__setup_irq) (__setup_irq) from (request_threaded_irq) (request_threaded_irq) from (devm_request_threaded_irq) (devm_request_threaded_irq) from (elants_i2c_probe) (elants_i2c_probe) from (i2c_device_probe) ... Tested-by: Peter Geis Signed-off-by: Dmitry Osipenko Signed-off-by: Bartosz Golaszewski commit 6ea68fc0a6049b59ff87f58faac5836e293d2801 Author: Dmitry Osipenko Date: Wed Nov 4 20:04:22 2020 +0300 gpio: tegra: Add lockdep class Add lockdep class in order to fix debug warnings that are coming from a legit nested use of irq_set_irq_wake() by the Tegra GPIO driver. WARNING: possible recursive locking detected ... (irq_set_irq_wake) from (tegra_gpio_irq_set_wake) (tegra_gpio_irq_set_wake) from (irq_set_irq_wake) (irq_set_irq_wake) from (brcmf_sdiod_intr_register [brcmfmac]) ... Tested-by: Peter Geis Reported-by: Peter Geis Signed-off-by: Dmitry Osipenko Signed-off-by: Bartosz Golaszewski commit 6cbf13e3114c8477021295d338f800282ac0653a Author: Linus Walleij Date: Wed Nov 4 14:37:58 2020 +0100 ARM: dts: ux500: Rename DSI controller nodes Rename the DSI controller nodes from "dsi-controller@" to "dsi@" so they match the naming convention in the YAML schema for DSI controllers. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20201104133758.1373298-1-linus.walleij@linaro.org Signed-off-by: Linus Walleij commit 773c16705058e9be7b0f4ce124e89cd231c120a2 Author: Steven Rostedt (VMware) Date: Thu Nov 5 21:32:46 2020 -0500 ftrace: Add recording of functions that caused recursion This adds CONFIG_FTRACE_RECORD_RECURSION that will record to a file "recursed_functions" all the functions that caused recursion while a callback to the function tracer was running. Link: https://lkml.kernel.org/r/20201106023548.102375687@goodmis.org Cc: Masami Hiramatsu Cc: Andrew Morton Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Jonathan Corbet Cc: Guo Ren Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: Thomas Gleixner Cc: Borislav Petkov Cc: x86@kernel.org Cc: "H. Peter Anvin" Cc: Kees Cook Cc: Anton Vorontsov Cc: Colin Cross Cc: Tony Luck Cc: Josh Poimboeuf Cc: Jiri Kosina Cc: Miroslav Benes Cc: Petr Mladek Cc: Joe Lawrence Cc: Kamalesh Babulal Cc: Mauro Carvalho Chehab Cc: Sebastian Andrzej Siewior Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-csky@vger.kernel.org Cc: linux-parisc@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-s390@vger.kernel.org Cc: live-patching@vger.kernel.org Signed-off-by: Steven Rostedt (VMware) commit a25d036d939a30623ff73ecad9c8b9116b02e823 Author: Steven Rostedt (VMware) Date: Thu Nov 5 21:32:45 2020 -0500 ftrace: Reverse what the RECURSION flag means in the ftrace_ops Now that all callbacks are recursion safe, reverse the meaning of the RECURSION flag and rename it from RECURSION_SAFE to simply RECURSION. Now only callbacks that request to have recursion protecting it will have the added trampoline to do so. Also remove the outdated comment about "PER_CPU" when determining to use the ftrace_ops_assist_func. Link: https://lkml.kernel.org/r/20201028115613.742454631@goodmis.org Link: https://lkml.kernel.org/r/20201106023547.904270143@goodmis.org Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Josh Poimboeuf Cc: Jiri Kosina Cc: Masami Hiramatsu Cc: Andrew Morton Cc: Jonathan Corbet Cc: Sebastian Andrzej Siewior Cc: Miroslav Benes Cc: Kamalesh Babulal Cc: Petr Mladek Cc: linux-doc@vger.kernel.org Signed-off-by: Steven Rostedt (VMware) commit 5d029b035bf112466541b844ee1b86197936db65 Author: Steven Rostedt (VMware) Date: Thu Nov 5 21:32:44 2020 -0500 perf/ftrace: Check for rcu_is_watching() in callback function If a ftrace callback requires "rcu_is_watching", then it adds the FTRACE_OPS_FL_RCU flag and it will not be called if RCU is not "watching". But this means that it will use a trampoline when called, and this slows down the function tracing a tad. By checking rcu_is_watching() from within the callback, it no longer needs the RCU flag set in the ftrace_ops and it can be safely called directly. Link: https://lkml.kernel.org/r/20201028115613.591878956@goodmis.org Link: https://lkml.kernel.org/r/20201106023547.711035826@goodmis.org Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Josh Poimboeuf Cc: Jiri Kosina Cc: Miroslav Benes Cc: Petr Mladek Cc: Masami Hiramatsu Cc: Andrew Morton Cc: Jiri Olsa Signed-off-by: Steven Rostedt (VMware) commit 5d15a624c34b11c8d1c04c8cc004782e7ac2888d Author: Steven Rostedt (VMware) Date: Thu Nov 5 21:32:43 2020 -0500 perf/ftrace: Add recursion protection to the ftrace callback If a ftrace callback does not supply its own recursion protection and does not set the RECURSION_SAFE flag in its ftrace_ops, then ftrace will make a helper trampoline to do so before calling the callback instead of just calling the callback directly. The default for ftrace_ops is going to change. It will expect that handlers provide their own recursion protection, unless its ftrace_ops states otherwise. Link: https://lkml.kernel.org/r/20201028115613.444477858@goodmis.org Link: https://lkml.kernel.org/r/20201106023547.466892083@goodmis.org Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Josh Poimboeuf Cc: Jiri Kosina Cc: Miroslav Benes Cc: Petr Mladek Cc: Masami Hiramatsu Cc: Andrew Morton Cc: Jiri Olsa Signed-off-by: Steven Rostedt (VMware) commit 4b750b573c5b3ee10e33c1573eaa94a9dad62f19 Author: Steven Rostedt (VMware) Date: Thu Nov 5 21:32:42 2020 -0500 livepatch: Trigger WARNING if livepatch function fails due to recursion If for some reason a function is called that triggers the recursion detection of live patching, trigger a warning. By not executing the live patch code, it is possible that the old unpatched function will be called placing the system into an unknown state. Link: https://lore.kernel.org/r/20201029145709.GD16774@alley Link: https://lkml.kernel.org/r/20201106023547.312639435@goodmis.org Cc: Masami Hiramatsu Cc: Andrew Morton Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Josh Poimboeuf Cc: Jiri Kosina Cc: Joe Lawrence Cc: live-patching@vger.kernel.org Suggested-by: Miroslav Benes Reviewed-by: Petr Mladek Acked-by: Miroslav Benes Signed-off-by: Steven Rostedt (VMware) commit 13f3ea9a2c829f28610bb8772a8b9c328412930e Author: Steven Rostedt (VMware) Date: Thu Nov 5 21:32:41 2020 -0500 livepatch/ftrace: Add recursion protection to the ftrace callback If a ftrace callback does not supply its own recursion protection and does not set the RECURSION_SAFE flag in its ftrace_ops, then ftrace will make a helper trampoline to do so before calling the callback instead of just calling the callback directly. The default for ftrace_ops is going to change. It will expect that handlers provide their own recursion protection, unless its ftrace_ops states otherwise. Link: https://lkml.kernel.org/r/20201028115613.291169246@goodmis.org Link: https://lkml.kernel.org/r/20201106023547.122802424@goodmis.org Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Masami Hiramatsu Cc: Andrew Morton Cc: Josh Poimboeuf Cc: Jiri Kosina Cc: Joe Lawrence Cc: live-patching@vger.kernel.org Reviewed-by: Petr Mladek Acked-by: Miroslav Benes Signed-off-by: Steven Rostedt (VMware) commit c536aa1c5b17fac1ee395932031ff7d82827f2c5 Author: Steven Rostedt (VMware) Date: Thu Nov 5 21:32:40 2020 -0500 kprobes/ftrace: Add recursion protection to the ftrace callback If a ftrace callback does not supply its own recursion protection and does not set the RECURSION_SAFE flag in its ftrace_ops, then ftrace will make a helper trampoline to do so before calling the callback instead of just calling the callback directly. The default for ftrace_ops is going to change. It will expect that handlers provide their own recursion protection, unless its ftrace_ops states otherwise. Link: https://lkml.kernel.org/r/20201028115613.140212174@goodmis.org Link: https://lkml.kernel.org/r/20201106023546.944907560@goodmis.org Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Josh Poimboeuf Cc: Jiri Kosina Cc: Miroslav Benes Cc: Petr Mladek Cc: Andrew Morton Cc: Guo Ren Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: Thomas Gleixner Cc: Borislav Petkov Cc: x86@kernel.org Cc: "H. Peter Anvin" Cc: "Naveen N. Rao" Cc: Anil S Keshavamurthy Cc: "David S. Miller" Cc: linux-csky@vger.kernel.org Cc: linux-parisc@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-s390@vger.kernel.org Acked-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 6cdf941871ec9cb1cf03227038a45a73afd8dc9a Author: Steven Rostedt (VMware) Date: Thu Nov 5 21:32:39 2020 -0500 pstore/ftrace: Add recursion protection to the ftrace callback If a ftrace callback does not supply its own recursion protection and does not set the RECURSION_SAFE flag in its ftrace_ops, then ftrace will make a helper trampoline to do so before calling the callback instead of just calling the callback directly. The default for ftrace_ops is going to change. It will expect that handlers provide their own recursion protection, unless its ftrace_ops states otherwise. Link: https://lkml.kernel.org/r/20201028115612.990886844@goodmis.org Link: https://lkml.kernel.org/r/20201106023546.720372267@goodmis.org Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Josh Poimboeuf Cc: Jiri Kosina Cc: Miroslav Benes Cc: Petr Mladek Cc: Masami Hiramatsu Cc: Andrew Morton Cc: Thomas Meyer Reviewed-by: Kees Cook Signed-off-by: Steven Rostedt (VMware) commit da5afbeb1724609996ca7bb4fbce2cd104c95914 Author: Steven Rostedt (VMware) Date: Thu Nov 5 21:32:38 2020 -0500 ftrace: Optimize testing what context current is in The preempt_count() is not a simple location in memory, it could be part of per_cpu code or more. Each access to preempt_count(), or one of its accessor functions (like in_interrupt()) takes several cycles. By reading preempt_count() once, and then doing tests to find the context against the value return is slightly faster than using in_nmi() and in_interrupt(). Link: https://lkml.kernel.org/r/20201028115612.780796355@goodmis.org Link: https://lkml.kernel.org/r/20201106023546.558881845@goodmis.org Signed-off-by: Steven Rostedt (VMware) commit 6e4eb9cb22fc8a893cb708ed42644de5ee7c3827 Author: Steven Rostedt (VMware) Date: Thu Nov 5 21:32:37 2020 -0500 ftrace: Add ftrace_test_recursion_trylock() helper function To make it easier for ftrace callbacks to have recursion protection, provide a ftrace_test_recursion_trylock() and ftrace_test_recursion_unlock() helper that tests for recursion. Link: https://lkml.kernel.org/r/20201028115612.634927593@goodmis.org Link: https://lkml.kernel.org/r/20201106023546.378584067@goodmis.org Signed-off-by: Steven Rostedt (VMware) commit 0264c8c9e1b53e9dbb41fae5e54756e84644bc60 Author: Steven Rostedt (VMware) Date: Thu Nov 5 21:32:36 2020 -0500 ftrace: Move the recursion testing into global headers Currently, if a callback is registered to a ftrace function and its ftrace_ops does not have the RECURSION flag set, it is encapsulated in a helper function that does the recursion for it. Really, all the callbacks should have their own recursion protection for performance reasons. But they should not all implement their own. Move the recursion helpers to global headers, so that all callbacks can use them. Link: https://lkml.kernel.org/r/20201028115612.460535535@goodmis.org Link: https://lkml.kernel.org/r/20201106023546.166456258@goodmis.org Signed-off-by: Steven Rostedt (VMware) commit af9da91493e5ff6179c2ecbfafa05ef203b25b5f Author: Robin Murphy Date: Mon Oct 26 12:00:22 2020 +0000 iommu/arm-smmu: Use new devm_krealloc() The implementation-specific subclassing of struct arm_smmu_device really wanted an appropriate version of realloc(). Now that one exists, take full advantage of it to clarify what's actually being done here. Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/355e8d70c7f47d462d85b386aa09f2b5c655f023.1603713428.git.robin.murphy@arm.com Signed-off-by: Will Deacon commit 04057a1afc756a95143695b7e35420ee0f540c0a Author: Ville Syrjälä Date: Fri Oct 30 18:41:24 2020 +0200 drm/i915: Sort EHL/JSL PCI IDs Sort the EHL/JSL PCI IDs numerically. Some order seems better than randomness. v2: Deal with the JSL vs. EHL split v3: Rebase due to 0x4500 removal Reviewed-by: Anusha Srivatsa #v1 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201030164124.16922-1-ville.syrjala@linux.intel.com commit 9340c293ebf0687d53a52c710a8e6fe80bfd6b6b Author: Yu-Tung Chang Date: Mon Nov 2 18:01:57 2020 +0800 ARM: dts: sun8i: h3: Add initial NanoPi R1 support The NanoPi R1 is a complete open source board developed by FriendlyElec for makers, hobbyists, fans and etc. NanoPi R1 key features - Allwinner H3, Quad-core Cortex-A7@1.2GHz - 512MB/1GB DDR3 RAM - 8GB eMMC - microSD slot - 10/100/1000M Ethernet x 1 - 10/100 Ethernet x 1 - Wifi 802.11b/g/n - Bluetooth 4.0 - Serial Debug Port - 5V 2A DC power-supply Signed-off-by: Yu-Tung Chang Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20201102100157.85801-2-mtwget@gmail.com commit 030eea2a1127700af0176345b404db943232a908 Author: Samuel Holland Date: Thu Nov 5 21:20:55 2020 -0600 arm64: dts: allwinner: pinephone: Use generic sensor node names Instead of duplicating part of the compatible string in the node name, use generic names as recommended by (and listed in) section 2.2.2 of the Devicetree Specification. Suggested-by: Maxime Ripard Signed-off-by: Samuel Holland Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20201106032055.51530-1-samuel@sholland.org commit 8ca199309f3c96e390bd6bf583a053ce200c6148 Merge: 8a24c834c053e 8d96ec9ba9e7b Author: Mark Brown Date: Fri Nov 6 11:21:24 2020 +0000 Merge series "ASoC: dt-bindings: audio-graph-card: switch to yaml base Documentation" from Kuninori Morimoto : Hi Rob, Mark Cc: Sameer These are v6 of switch to yaml base Documentation for audio-graph-card and renesas,rsnd which uses audio-graph-card. v5 -> v6 - add Acked-by/Reviewed-by on each patch - remove "audio-graph-card,xxx" property - remove un-needed if "ok" v4 -> v5 - move "endpoint" under "port" v3 -> v4 - fixuped yamllint warnings/errors v2 -> v3 - fixuped Rob's pointed points v1 -> v2 - upgrade dt-schema, and fixup errors for [2/2] patch Kuninori Morimoto (3): dt-bindings: ASoC: audio-graph-card: switch to yaml base Documentation dt-bindings: ASoC: renesas,rsnd: switch to yaml base Documentation dt-bindings: ASoC: renesas,rsnd: Add r8a77961 support .../bindings/sound/audio-graph-card.txt | 337 ------------ .../bindings/sound/audio-graph-card.yaml | 153 ++++++ .../bindings/sound/renesas,rsnd.txt | 520 ------------------ .../bindings/sound/renesas,rsnd.yaml | 451 +++++++++++++++ 4 files changed, 604 insertions(+), 857 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/audio-graph-card.txt create mode 100644 Documentation/devicetree/bindings/sound/audio-graph-card.yaml create mode 100644 Documentation/devicetree/bindings/sound/renesas,rsnd.yaml -- 2.25.1 commit 900ccdcb79bb61471df1566a70b2b39687a628d5 Author: Zhang Qilong Date: Fri Nov 6 09:52:17 2020 +0800 spi: stm32: fix reference leak in stm32_spi_resume pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to pm_runtime_put_noidle will result in reference leak in stm32_spi_resume, so we should fix it. Fixes: db96bf976a4fc ("spi: stm32: fixes suspend/resume management") Signed-off-by: Zhang Qilong Reviewed-by: Alain Volmat Link: https://lore.kernel.org/r/20201106015217.140476-1-zhangqilong3@huawei.com Signed-off-by: Mark Brown commit 77080929d56d87a57093869a15d2785b8b2d8cd5 Author: Kaixu Xia Date: Fri Nov 6 17:19:23 2020 +0800 x86/mce: Assign boolean values to a bool variable Fix the following coccinelle warnings: ./arch/x86/kernel/cpu/mce/core.c:1765:3-20: WARNING: Assignment of 0/1 to bool variable ./arch/x86/kernel/cpu/mce/core.c:1584:2-9: WARNING: Assignment of 0/1 to bool variable [ bp: Massage commit message. ] Reported-by: Tosk Robot Signed-off-by: Kaixu Xia Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/1604654363-1463-1-git-send-email-kaixuxia@tencent.com commit 9e39aef3a105d3c934d9348cc27f1ccfd9ebee01 Author: Zou Wei Date: Fri Oct 30 17:28:17 2020 +0800 usb: misc: brcmstb-usb-pinmap: Make sync_all_pins static Fix the following sparse warning: drivers/usb/misc/brcmstb-usb-pinmap.c:219:6: warning: symbol 'sync_all_pins' was not declared. Should it be static? The sync_all_pins has only call site within brcmstb-usb-pinmap.c It should be static Fixes: 517c4c44b323 ("usb: Add driver to allow any GPIO to be used for 7211 USB signals") Reported-by: Hulk Robot Signed-off-by: Zou Wei Link: https://lore.kernel.org/r/1604050097-91302-1-git-send-email-zou_wei@huawei.com Signed-off-by: Greg Kroah-Hartman commit 1528bfcfeb5b5dc6edbaba061185b5ff9b73bf96 Author: Deepak R Varma Date: Fri Nov 6 01:51:35 2020 +0530 drm/vc4: replace idr_init() by idr_init_base() idr_init() uses base 0 which is an invalid identifier for this driver. The idr_alloc for this driver uses VC4_PERFMONID_MIN as start value for ID range and it is #defined to 1. The new function idr_init_base allows IDR to set the ID lookup from base 1. This avoids all lookups that otherwise starts from 0 since 0 is always unused / available. References: commit 6ce711f27500 ("idr: Make 1-based IDRs more efficient") Signed-off-by: Deepak R Varma Reviewed-by: Eric Anholt Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20201105202135.GA145111@localhost commit 217504a055325fe76ec1142aa15f14d3db77f94f Author: Benjamin Berg Date: Fri Oct 9 16:40:47 2020 +0200 usb: typec: ucsi: Work around PPM losing change information Some/many PPMs are simply clearing the change bitfield when a notification on a port is acknowledge. Unfortunately, doing so means that any changes between the GET_CONNECTOR_STATUS and ACK_CC_CI commands is simply lost. Work around this by re-fetching the connector status afterwards. We can then infer any changes that we see have happened but that may not be respresented in the change bitfield. We end up with the following actions: 1. UCSI_GET_CONNECTOR_STATUS, store result, update unprocessed_changes 2. UCSI_GET_CAM_SUPPORTED, discard result 3. ACK connector change 4. UCSI_GET_CONNECTOR_STATUS, store result 5. Infere lost changes by comparing UCSI_GET_CONNECTOR_STATUS results 6. If PPM reported a new change, then restart in order to ACK 7. Process everything as usual. The worker is also changed to re-schedule itself if a new change notification happened while it was running. Doing this fixes quite commonly occurring issues where e.g. the UCSI power supply would remain online even thought the ThunderBolt cable was unplugged. Cc: Hans de Goede Cc: Heikki Krogerus Acked-by: Heikki Krogerus Signed-off-by: Benjamin Berg Link: https://lore.kernel.org/r/20201009144047.505957-3-benjamin@sipsolutions.net Signed-off-by: Greg Kroah-Hartman commit 47ea2929d58c35598e681212311d35b240c373ce Author: Benjamin Berg Date: Fri Oct 9 16:40:46 2020 +0200 usb: typec: ucsi: acpi: Always decode connector change information Normal commands may be reporting that a connector has changed. Always call the usci_connector_change handler and let it take care of scheduling the work when needed. Doing this makes the ACPI code path identical to the CCG one. Cc: Hans de Goede Cc: Heikki Krogerus Acked-by: Heikki Krogerus Signed-off-by: Benjamin Berg Link: https://lore.kernel.org/r/20201009144047.505957-2-benjamin@sipsolutions.net Signed-off-by: Greg Kroah-Hartman commit da42b98d5c7d5a30d963633a964586cb68a5c886 Author: Matteo Scordino Date: Thu Nov 5 18:32:31 2020 +0000 ARM: dts: sun8i: s3: Add dts for the Elimo Initium SBC The Elimo Engineering Initium is an Open Source Hardware Single Board Computer based on the Elimo Impetus SoM. It is meant as the first development platform for the Impetus, providing convenient access to the peripherals on the Impetus. It provides: USB-C power input UART-to-USB bridge on the USB-C connector, connected to UART1 USB-A connector for USB2.0 (Host, Device, OTG) Audio Line In/Out Pin header to access all signals on the M2 connector of the SoM Signed-off-by: Matteo Scordino Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20201105183231.12952-4-matteo.scordino@gmail.com commit c1c5bafd4481b40dfe4a4703702cb95930703426 Author: Matteo Scordino Date: Thu Nov 5 18:32:30 2020 +0000 dt-bindings: arm: sunxi: add Elimo bindings Document board compatible names for Elimo Engineering Impetus and Initium Signed-off-by: Matteo Scordino Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20201105183231.12952-3-matteo.scordino@gmail.com commit 33958b22f3775ed8ac6594f89fff1ed150bed3fd Author: Matteo Scordino Date: Thu Nov 5 18:32:29 2020 +0000 ARM: dts: sun8i: s3: Add dtsi for the Elimo Impetus SoM The Elimo Engineering Impetus is an Open Source Hardware System-on-Module based on the SoChip S3 SoC. It is meant for integration into carrier boards or, more generally, larger designs, and uses an M2 connector to facilitate that. Interfaces on the M.2/NGFF 42mm connector: WiFi IEEE 802. 11abgn (on-module Realtek) Bluetooth 4.2/BLE (on-module Realtek) RGB LCD Interface (on-module connector) MIPI Camera Interface (on-module connector) IEEE 802. 3u Ethernet MAC (external connecto) USB2.0 (Host, Device, OTG) (external connector) Audio Line In/Out (external connector) Signed-off-by: Matteo Scordino Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20201105183231.12952-2-matteo.scordino@gmail.com commit c424dc4cd1809e181a161723f770b7bc1e0f9927 Author: Qinglang Miao Date: Wed Oct 28 17:15:48 2020 +0800 mips: Vr41xx: add missing iounmap() on error in vr41xx_pciu_init() add missing iounmap() of pciu_base on error when failed to init io_map_base. Signed-off-by: Qinglang Miao Signed-off-by: Thomas Bogendoerfer commit 2673ecf9586551c5bcee499c1cc1949f6f7cc9a1 Author: Qinglang Miao Date: Wed Oct 28 17:15:46 2020 +0800 mips: cm: add missing iounmap() on error in mips_cm_probe() Add the missing iounmap() of iounmap(mips_gcr_base) before return from mips_cm_probe() in the error handling case. Signed-off-by: Qinglang Miao Signed-off-by: Thomas Bogendoerfer commit 5a5aa912f687204d50455d0db36f94dd8de601c2 Author: Qinglang Miao Date: Wed Oct 28 17:15:45 2020 +0800 mips: ar7: add missing iounmap() on error in ar7_gpio_init Add the missing iounmap() of gpch->regs before return from ar7_gpio_init() in the error handling case. Signed-off-by: Qinglang Miao Signed-off-by: Thomas Bogendoerfer commit 18ff14c87d904f7968a143a6202740c27b4d8e7f Author: Colin Ian King Date: Tue Oct 27 18:34:30 2020 +0000 MIPS: Kconfig: fix a few trivial spelling mistakes There are a few spelling mistakes in the Kconfig, fix these. Signed-off-by: Colin Ian King Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Bogendoerfer commit d2e850e961835825492f37346ae76670bf4758f5 Author: Chuanhong Guo Date: Mon Oct 26 20:29:25 2020 +0800 MIPS: zboot: put appended dtb into a section This will make a separated section for dtb appear in ELF, and we can then use objcopy to patch a dtb into vmlinuz when RAW_APPENDED_DTB is set in kernel config. command to patch a dtb: objcopy --set-section-flags=.appended_dtb=alloc,contents \ --update-section=.appended_dtb=.dtb vmlinuz Signed-off-by: Chuanhong Guo Signed-off-by: Thomas Bogendoerfer commit f4acd33c446b2ba97f1552a4da90050109d01ca7 Author: Ross Schmidt Date: Wed Nov 4 21:47:54 2020 -0600 staging: rtl8723bs: replace ieee80211_back_actioncode Replace the unique rtw_ieee80211_back_actioncode with the standard provided ieee80211_back_actioncode. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201105034754.12383-9-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit a9d8763889737b7e0f83956e093bd48190876044 Author: Ross Schmidt Date: Wed Nov 4 21:47:53 2020 -0600 staging: rtl8723bs: replace rtw_ieee80211_ht_actioncode Replace the unique rtw_ieee80211_ht_actioncode enum with the provided standard ieee80211_ht_actioncode. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201105034754.12383-8-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 72cac683e6f997e0e1d5fe14add81e663a3231f6 Author: Ross Schmidt Date: Wed Nov 4 21:47:52 2020 -0600 staging: rtl8723bs: replace rtw_ieee80211_spectrum_mgmt_actioncode Replace the unique rtw_ieee80211_mgmt_actioncode enum with the provided standard ieee80211_spectrum_mgmt_actioncode. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201105034754.12383-7-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit c25d8a7db434fd673d530bfd2854a5051826a295 Author: Ross Schmidt Date: Wed Nov 4 21:47:51 2020 -0600 staging: rtl8723bs: replace rtw_ieee80211_ht_cap Replace the unique rtw_ieee80211_ht_cap struct with the provided standard ieee80211_ht_cap. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201105034754.12383-6-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit d0cc39cd1fa3a4358f04cafe146592db0a354d42 Author: Ross Schmidt Date: Wed Nov 4 21:47:50 2020 -0600 staging: rtl8723bs: remove ADPT_FMT macro Remove unnecessary macro for %s and call it directly. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201105034754.12383-5-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit d72425da09a06fd52cfff7750e5541dfaa0824db Author: Ross Schmidt Date: Wed Nov 4 21:47:49 2020 -0600 staging: rtl8723bs: remove NDEV_FMT macro Remove unnecessary macro for %s and call it directly. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201105034754.12383-4-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5e364ea5ea9d5127d42d3d085ddd4de58564f3c7 Author: Ross Schmidt Date: Wed Nov 4 21:47:48 2020 -0600 staging: rtl8723bs: remove IP_FMT macro Remove unnecessary macro for %pI4 and call it directly. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201105034754.12383-3-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5d4ea6b4520239da2df61d05978d8fcd195ee846 Author: Ross Schmidt Date: Wed Nov 4 21:47:47 2020 -0600 staging: rtl8723bs: use %pM format for MAC addresses Use %pM format instead of custom printing code. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201105034754.12383-2-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit bbda3ac4f24e8cae41ec2418de8344012f0e3ca5 Author: Ross Schmidt Date: Wed Nov 4 21:47:46 2020 -0600 staging: rtl8723bs: remove MAC_FMT macro Remove unnecessary macro for %pM and call it directly. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201105034754.12383-1-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 773cfe0684a35f73068421999011f3806de8593a Author: Siddhant Gupta Date: Fri Nov 6 13:52:26 2020 +0530 staging: mt7621-dma: fix alignment warnings Fix the checkpatch warning of alignment should match open parenthesis for some dev_dbg() calls Signed-off-by: Siddhant Gupta Link: https://lore.kernel.org/r/20201106082226.GA22990@Sleakybeast Signed-off-by: Greg Kroah-Hartman commit 99c1fdae1a7f6ac09d2c2eb6cf145edd40e5de9f Author: Siddhant Gupta Date: Fri Nov 6 15:00:21 2020 +0530 Staging: mt7621-pci: Fix alignment warnings Fix the alignment issue pointed out by checkpatch Signed-off-by: Siddhant Gupta Link: https://lore.kernel.org/r/20201106093021.GA25237@Sleakybeast Signed-off-by: Greg Kroah-Hartman commit ad18fa0f5f052046cad96fee762b5c64f42dd86a Author: Venkata Sandeep Dhanalakota Date: Thu Nov 5 17:18:42 2020 -0800 drm/i915: Correctly set SFC capability for video engines SFC capability of video engines is not set correctly because i915 is testing for incorrect bits. Fixes: c5d3e39caa45 ("drm/i915: Engine discovery query") Cc: Matt Roper Cc: Tvrtko Ursulin Signed-off-by: Venkata Sandeep Dhanalakota Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Tvrtko Ursulin Cc: # v5.3+ Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20201106011842.36203-1-daniele.ceraolospurio@intel.com commit 70c5e40ca959ad48e932a343116a76dd78859e5e Author: Mathy Vanhoef Date: Wed Nov 4 10:18:22 2020 +0400 mac80211: assure that certain drivers adhere to DONT_REORDER flag Some drivers use skb->priority to determine on which queue to send a frame. An example is mt76x2u (this was tested on an AWUS036ACM). This means these drivers currently do not adhere to the DONT_REORDER flag. To fix this, we do not set skb->priority based on the QoS TID of injected frames when the DONT_REORDER flag is set. Signed-off-by: Mathy Vanhoef Link: https://lore.kernel.org/r/20201104061823.197407-5-Mathy.Vanhoef@kuleuven.be Signed-off-by: Johannes Berg commit eb27cf085cc8a487ea8a35b7cbdd2f7697c52274 Author: Christian Gromm Date: Wed Nov 4 13:50:42 2020 +0100 drivers: staging: most: use swabXX functions of kernel This patch makes use of the swab16() and swab32() functions available in the kernel instead of using own implementations. Signed-off-by: Christian Gromm Reported-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/1604494242-3414-1-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman commit 096f64905f0c5ab82918a0bdc42d503ef1bad98c Author: Bhaskar Chowdhury Date: Thu Oct 29 18:19:53 2020 +0530 drivers: staging: rtl8188eu: Fix spelling in two comments i.e defalut to default Fixed two spelling in two different comments. s/defalut/default/p Signed-off-by: Bhaskar Chowdhury Link: https://lore.kernel.org/r/20201029124953.3957-1-unixbhaskar@gmail.com Signed-off-by: Greg Kroah-Hartman commit 92576c84c8c608d65f0454ef19d7af66fb4bdebd Author: Manuel Palenzuela Date: Thu Oct 29 12:02:28 2020 +0000 Staging: rtl8723bs: core: rtw_cmd: Fixed four if-statement coding style issues Fixed four cases where the if-statement coding style wasn't following the guidelines. Signed-off-by: Manuel Palenzuela Link: https://lore.kernel.org/r/20201029120228.7029-1-manuelpalenzuelamerino@gmail.com Signed-off-by: Greg Kroah-Hartman commit 071dc1787a2f8bb636f864c1f306280deea3b1d5 Author: Zhang Qilong Date: Wed Oct 28 20:26:48 2020 +0800 staging: rtl8192u: fix wrong judgement in rtl8192_rx_isr The 'EPERM' cannot appear in the previous path, we should use '-EPERM' to check it. For example: Call trace: ->rtl8192_rx_isr ->usb_submit_urb ->usb_hcd_submit_urb ->rh_urb_enqueue ->rh_queue_status ->usb_hcd_link_urb_to_ep Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20201028122648.47959-1-zhangqilong3@huawei.com Signed-off-by: Greg Kroah-Hartman commit d1e7550ad081fa5e9260f636dd51e1c496e0fd5f Author: Qinglang Miao Date: Wed Oct 28 17:15:52 2020 +0800 staging: ks7010: fix missing destroy_workqueue() on error in ks7010_sdio_probe Add the missing destroy_workqueue() before return from ks7010_sdio_probe in the error handling case. Signed-off-by: Qinglang Miao Link: https://lore.kernel.org/r/20201028091552.136445-1-miaoqinglang@huawei.com Signed-off-by: Greg Kroah-Hartman commit 527d675969a1dff17baa270d4447ac1c87058299 Author: Mathy Vanhoef Date: Wed Nov 4 10:18:21 2020 +0400 mac80211: don't overwrite QoS TID of injected frames Currently ieee80211_set_qos_hdr sets the QoS TID of all frames based on the value assigned to skb->priority. This means it will also overwrite the QoS TID of injected frames. The commit 753ffad3d624 ("mac80211: fix TID field in monitor mode transmit") prevented injected frames from being modified because of this by setting skb->priority to the TID of the injected frame, which assured the QoS TID will not be changed to a different value. Unfortunately, this workaround complicates the handling of injected frames because we can't set skb->priority without affecting the TID value in the QoS field of injected frames. To avoid this, and to simplify the next patch, detect if a frame is injected in ieee80211_set_qos_hdr and if so do not change its QoS field. Signed-off-by: Mathy Vanhoef Link: https://lore.kernel.org/r/20201104061823.197407-4-Mathy.Vanhoef@kuleuven.be [fix typos in commit message] Signed-off-by: Johannes Berg commit 66d06c84730c8b148d93909ffbddf074fd771a48 Author: Mathy Vanhoef Date: Wed Nov 4 10:18:20 2020 +0400 mac80211: adhere to Tx control flag that prevents frame reordering When the Tx control flag is set to prevent frame reordering, send all frames that have this flag set on the same queue. This assures that frames that have this flag set are not reordered relative to other frames that have this flag set. Signed-off-by: Mathy Vanhoef Link: https://lore.kernel.org/r/20201104061823.197407-3-Mathy.Vanhoef@kuleuven.be Signed-off-by: Johannes Berg commit 30df81301c63643fe1c3b9f05a57059c35a6a953 Author: Mathy Vanhoef Date: Wed Nov 4 10:18:19 2020 +0400 mac80211: add radiotap flag to assure frames are not reordered Add a new radiotap flag to indicate injected frames must not be reordered relative to other frames that also have this flag set, independent of priority field values in the transmitted frame. Parse this radiotap flag and define and set a corresponding Tx control flag. Note that this flag has recently been standardized as part of an update to radiotap. Signed-off-by: Mathy Vanhoef Link: https://lore.kernel.org/r/20201104061823.197407-2-Mathy.Vanhoef@kuleuven.be Signed-off-by: Johannes Berg commit 16b37e7ba6fdcedbfb957408a884d3bb44013842 Author: Izabela Bakollari Date: Thu Oct 22 15:22:18 2020 +0200 staging/wlan-ng: Fix line alignment Fix code alignment. Issue reported by checkpatch.pl Signed-off-by: Izabela Bakollari Link: https://lore.kernel.org/r/20201022132218.235744-1-izabela.bakollari@gmail.com Signed-off-by: Greg Kroah-Hartman commit a296b3de30836e79c6d59d5349265d592a0e7993 Author: Lee Jones Date: Wed Nov 4 19:35:49 2020 +0000 tty: synclink: Provide missing description for 'hdlcdev_tx_timeout's 'txqueue' param Fixes the following W=1 kernel build warning(s): drivers/tty/synclink.c:7708: warning: Function parameter or member 'txqueue' not described in 'hdlcdev_tx_timeout' Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: paulkf@microgate.com Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201104193549.4026187-37-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 27122bf57a62f5f816abb48b3a52226ee273a9da Author: Lee Jones Date: Wed Nov 4 19:35:46 2020 +0000 tty: hvc: hvc_opal: Staticify function invoked by reference Fixes the following W=1 kernel build warning(s): drivers/tty/hvc/hvc_opal.c:106:6: warning: no previous prototype for ‘hvc_opal_hvsi_hangup’ [-Wmissing-prototypes] Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201104193549.4026187-34-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 109af2a82a36e0cedb54988406e6b40de67272c7 Author: Lee Jones Date: Wed Nov 4 19:35:45 2020 +0000 tty: hvc: hvc_vio: Staticify function invoked only by reference Fixes the following W=1 kernel build warning(s): drivers/tty/hvc/hvc_vio.c:181:6: warning: no previous prototype for ‘hvterm_hvsi_hangup’ [-Wmissing-prototypes] 181 | void hvterm_hvsi_hangup(struct hvc_struct *hp, int data) | ^~~~~~~~~~~~~~~~~~ Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201104193549.4026187-33-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 216daa1209e6be8cf98ebf6da2dd55e48d474ebe Author: Lee Jones Date: Wed Nov 4 19:35:43 2020 +0000 tty: serial: serial-tegra: Provide some missing struct member descriptions Fixes the following W=1 kernel build warning(s): drivers/tty/serial/serial-tegra.c:94: warning: Function parameter or member 'fifo_mode_enable_status' not described in 'tegra_uart_chip_data' drivers/tty/serial/serial-tegra.c:94: warning: Function parameter or member 'uart_max_port' not described in 'tegra_uart_chip_data' drivers/tty/serial/serial-tegra.c:94: warning: Function parameter or member 'max_dma_burst_bytes' not described in 'tegra_uart_chip_data' drivers/tty/serial/serial-tegra.c:94: warning: Function parameter or member 'error_tolerance_low_range' not described in 'tegra_uart_chip_data' drivers/tty/serial/serial-tegra.c:94: warning: Function parameter or member 'error_tolerance_high_range' not described in 'tegra_uart_chip_data' Cc: Laxman Dewangan Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Thierry Reding Cc: Jonathan Hunter Cc: Philipp Zabel Cc: Sumit Semwal Cc: "Christian König" Cc: linux-serial@vger.kernel.org Cc: linux-tegra@vger.kernel.org Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201104193549.4026187-31-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 8a3bdec1dff987293df05e90ec1f5030dd840803 Author: Lee Jones Date: Wed Nov 4 19:35:42 2020 +0000 tty: tty_ldisc: Supply missing description for 'tty_ldisc_get's 'tty' param Fixes the following W=1 kernel build warning(s): drivers/tty/tty_ldisc.c:160: warning: Function parameter or member 'tty' not described in 'tty_ldisc_get' Cc: Greg Kroah-Hartman Cc: Jiri Slaby Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201104193549.4026187-30-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 24832ca3ee85a14c42a4f23a5c8841ef5db3d029 Author: Lee Jones Date: Wed Nov 4 19:35:41 2020 +0000 tty: serial: stm32-usart: Remove set but unused 'cookie' variables Fixes the following W=1 kernel build warning(s): drivers/tty/serial/stm32-usart.c: In function ‘stm32_transmit_chars_dma’: drivers/tty/serial/stm32-usart.c:353:15: warning: variable ‘cookie’ set but not used [-Wunused-but-set-variable] drivers/tty/serial/stm32-usart.c: In function ‘stm32_of_dma_rx_probe’: drivers/tty/serial/stm32-usart.c:1090:15: warning: variable ‘cookie’ set but not used [-Wunused-but-set-variable] Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Maxime Coquelin Cc: Alexandre Torgue Cc: Gerald Baeza Cc: linux-serial@vger.kernel.org Cc: linux-stm32@st-md-mailman.stormreply.com Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201104193549.4026187-29-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 7285ff0b7d2ab4af12248b5226906f89e012899c Author: Lee Jones Date: Wed Nov 4 19:35:39 2020 +0000 tty: synclinkmp: Add missing description for function param 'txqueue' Fixes the following W=1 kernel build warning(s): drivers/tty/synclinkmp.c:1808: warning: Function parameter or member 'txqueue' not described in 'hdlcdev_tx_timeout' Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: paulkf@microgate.com Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201104193549.4026187-27-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 180bb243de730c874b6279f702c17f5277b86693 Author: Lee Jones Date: Wed Nov 4 19:35:38 2020 +0000 tty: serial: sifive: Struct headers should start with 'struct ' Also supply a missing member description. Fixes the following W=1 kernel build warning(s): drivers/tty/serial/sifive.c:157: warning: cannot understand function prototype: 'struct sifive_serial_port ' Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Paul Walmsley Cc: linux-serial@vger.kernel.org Cc: linux-riscv@lists.infradead.org Signed-off-by: Lee Jones Reviewed-by: Palmer Dabbelt Acked-by: Palmer Dabbelt Link: https://lore.kernel.org/r/20201104193549.4026187-26-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 0fd872d7160cc521cf4dad71f5f8cfd37d08c1bf Author: Lee Jones Date: Wed Nov 4 19:35:37 2020 +0000 tty: serial: serial-tegra: Struct headers should start with 'struct ' Fixes the following W=1 kernel build warning(s): drivers/tty/serial/serial-tegra.c:85: warning: cannot understand function prototype: 'struct tegra_uart_chip_data ' Cc: Laxman Dewangan Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Thierry Reding Cc: Jonathan Hunter Cc: Philipp Zabel Cc: Sumit Semwal Cc: "Christian König" Cc: linux-serial@vger.kernel.org Cc: linux-tegra@vger.kernel.org Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201104193549.4026187-25-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 71b061e2ca9365eef1cd4dcd13ca8a707a5c4a86 Author: Lee Jones Date: Wed Nov 4 19:35:36 2020 +0000 tty: synclink_gt: Demote one kernel-doc header and repair another Fixes the following W=1 kernel build warning(s): drivers/tty/synclink_gt.c:633: warning: Function parameter or member 'tty' not described in 'ldisc_receive_buf' drivers/tty/synclink_gt.c:633: warning: Function parameter or member 'data' not described in 'ldisc_receive_buf' drivers/tty/synclink_gt.c:633: warning: Function parameter or member 'flags' not described in 'ldisc_receive_buf' drivers/tty/synclink_gt.c:633: warning: Function parameter or member 'count' not described in 'ldisc_receive_buf' drivers/tty/synclink_gt.c:1683: warning: Function parameter or member 'txqueue' not described in 'hdlcdev_tx_timeout' Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: paulkf@microgate.com Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201104193549.4026187-24-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit b482bd793c55a1a40c5ec5ab20bc7b8ee20ff6c4 Author: Lee Jones Date: Wed Nov 4 19:35:35 2020 +0000 tty: serial: xilinx_uartps: Supply description for missing member 'cts_override' Fixes the following W=1 kernel build warning(s): drivers/tty/serial/xilinx_uartps.c:205: warning: Function parameter or member 'cts_override' not described in 'cdns_uart' Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Michal Simek Cc: linux-serial@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201104193549.4026187-23-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 09532ceb900a4e29f5e491043c4edec54ff2e360 Author: Lee Jones Date: Wed Nov 4 19:35:34 2020 +0000 tty: serial: ifx6x60: Fix function documentation headers Fixes the following W=1 kernel build warning(s): drivers/tty/serial/ifx6x60.c:553: warning: Function parameter or member 'tty' not described in 'ifx_port_activate' drivers/tty/serial/ifx6x60.c:728: warning: Function parameter or member 't' not described in 'ifx_spi_io' drivers/tty/serial/ifx6x60.c:728: warning: Excess function parameter 'data' description in 'ifx_spi_io' Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Filip Aben Cc: Joseph Barrow Cc: Jan Dumon Cc: Russ Gorby Cc: linux-serial@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201104193549.4026187-22-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit fe989920b4d12e6ecec3a89d379a35dc4a6d7af5 Author: Lee Jones Date: Wed Nov 4 19:35:33 2020 +0000 tty: serial: msm_serial: Remove set but unused variable 'status' Fixes the following W=1 kernel build warning(s): drivers/tty/serial/msm_serial.c: In function ‘msm_complete_tx_dma’: drivers/tty/serial/msm_serial.c:429:18: warning: variable ‘status’ set but not used [-Wunused-but-set-variable] Cc: Andy Gross Cc: Bjorn Andersson Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Robert Love Cc: linux-arm-msm@vger.kernel.org Cc: linux-serial@vger.kernel.org Signed-off-by: Lee Jones Reviewed-by: Jeffrey Hugo Link: https://lore.kernel.org/r/20201104193549.4026187-21-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit c4e3f0c0ea7982538147baa3ffe5394e164530a8 Author: Lee Jones Date: Wed Nov 4 19:35:32 2020 +0000 tty: serial: lpc32xx_hs: Remove unused variable 'tmp' Fixes the following W=1 kernel build warning(s): drivers/tty/serial/lpc32xx_hs.c: In function ‘__serial_uart_flush’: drivers/tty/serial/lpc32xx_hs.c:244:6: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable] Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Vladimir Zapolskiy Cc: Sylvain Lemieux Cc: Kevin Wells Cc: Roland Stigge Cc: linux-serial@vger.kernel.org Signed-off-by: Lee Jones Acked-by: Vladimir Zapolskiy Link: https://lore.kernel.org/r/20201104193549.4026187-20-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit b410e35dbfedcb24b74f736d69b5b6337f9eb9ba Author: Lee Jones Date: Wed Nov 4 19:35:31 2020 +0000 tty: n_gsm: Demote obvious abuse of kernel-doc and supply other missing docss Fixes the following W=1 kernel build warning(s): drivers/tty/n_gsm.c:85: warning: Function parameter or member 'ref' not described in 'gsm_mux_net' drivers/tty/n_gsm.c:85: warning: Function parameter or member 'dlci' not described in 'gsm_mux_net' drivers/tty/n_gsm.c:664: warning: Function parameter or member 'dlci' not described in 'gsm_data_kick' drivers/tty/n_gsm.c:1015: warning: Function parameter or member 'clen' not described in 'gsm_process_modem' Cc: Greg Kroah-Hartman Cc: Jiri Slaby Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201104193549.4026187-19-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 7789c1f1f0551b6430f524842bc8ecec85c7145e Author: Lee Jones Date: Wed Nov 4 19:35:30 2020 +0000 tty: serial: amba-pl011: Mark 'sbsa_uart_acpi_match' as __maybe_unused When !ACPI 'sbsa_uart_acpi_match' is not referenced. Fixes the following W=1 kernel build warning(s): drivers/tty/serial/amba-pl011.c:2792:36: warning: ‘sbsa_uart_acpi_match’ defined but not used [-Wunused-const-variable=] Cc: Russell King Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linux-serial@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201104193549.4026187-18-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 0b0a66a5d9db2017eedaf9b04971351e53309652 Author: Lee Jones Date: Wed Nov 4 19:35:29 2020 +0000 tty: pty: Provide descriptions for the 'file' parameters Fixes the following W=1 kernel build warning(s): drivers/tty/pty.c:710: warning: Function parameter or member 'file' not described in 'ptm_unix98_lookup' drivers/tty/pty.c:726: warning: Function parameter or member 'file' not described in 'pts_unix98_lookup' Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: "C. Scott Ananian" Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201104193549.4026187-17-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit ffb5d9cf650f5a0596264338d8f783e11f187af7 Author: Lee Jones Date: Wed Nov 4 19:35:28 2020 +0000 tty: tty_audit: Demote non-conformant kernel-doc headers Fixes the following W=1 kernel build warning(s): drivers/tty/tty_audit.c:91: warning: Function parameter or member 'buf' not described in 'tty_audit_buf_push' drivers/tty/tty_audit.c:129: warning: Function parameter or member 'sig' not described in 'tty_audit_fork' drivers/tty/tty_audit.c:137: warning: Function parameter or member 'tty' not described in 'tty_audit_tiocsti' drivers/tty/tty_audit.c:137: warning: Function parameter or member 'ch' not described in 'tty_audit_tiocsti' drivers/tty/tty_audit.c:202: warning: Function parameter or member 'tty' not described in 'tty_audit_add_data' drivers/tty/tty_audit.c:202: warning: Function parameter or member 'data' not described in 'tty_audit_add_data' drivers/tty/tty_audit.c:202: warning: Function parameter or member 'size' not described in 'tty_audit_add_data' Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Miloslav Trmac Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201104193549.4026187-16-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 32ed248042d1809a5b4d03027432a54edd1bc80a Author: Lee Jones Date: Wed Nov 4 19:35:27 2020 +0000 tty: serial: 8250: serial_cs: Remove unused/unchecked variable 'err' Fixes the following W=1 kernel build warning(s): drivers/tty/serial/8250/serial_cs.c: In function ‘multi_config’: drivers/tty/serial/8250/serial_cs.c:562:7: warning: variable ‘err’ set but not used [-Wunused-but-set-variable] Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Colin Ian King Cc: "David A. Hinds" Cc: linux-serial@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201104193549.4026187-15-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 08aa5042d22bb66c90e1833f2119f272863dec87 Author: Lee Jones Date: Wed Nov 4 19:35:25 2020 +0000 tty: tty_io: Fix some kernel-doc issues Demote non-conformant headers and supply some missing descriptions. Fixes the following W=1 kernel build warning(s): drivers/tty/tty_io.c:218: warning: Function parameter or member 'file' not described in 'tty_free_file' drivers/tty/tty_io.c:566: warning: Function parameter or member 'exit_session' not described in '__tty_hangup' drivers/tty/tty_io.c:1077: warning: Function parameter or member 'tty' not described in 'tty_send_xchar' drivers/tty/tty_io.c:1077: warning: Function parameter or member 'ch' not described in 'tty_send_xchar' drivers/tty/tty_io.c:1155: warning: Function parameter or member 'file' not described in 'tty_driver_lookup_tty' drivers/tty/tty_io.c:1508: warning: Function parameter or member 'tty' not described in 'release_tty' drivers/tty/tty_io.c:1508: warning: Function parameter or member 'idx' not described in 'release_tty' drivers/tty/tty_io.c:2973: warning: Function parameter or member 'driver' not described in 'alloc_tty_struct' drivers/tty/tty_io.c:2973: warning: Function parameter or member 'idx' not described in 'alloc_tty_struct' Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Nick Holloway Cc: -- Cc: Marko Kohtala Cc: Bill Hawes Cc: "C. Scott Ananian" Cc: Russell King Cc: Andrew Morton Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201104193549.4026187-13-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 5d5b53cf92a73d06181a366ae8160708a18e0e1c Author: Lee Jones Date: Wed Nov 4 19:35:24 2020 +0000 tty: serial: jsm: jsm_cls: Remove unused variable 'discard' Fixes the following W=1 kernel build warning(s): drivers/tty/serial/jsm/jsm_cls.c: In function ‘cls_copy_data_from_uart_to_queue’: drivers/tty/serial/jsm/jsm_cls.c:400:7: warning: variable ‘discard’ set but not used [-Wunused-but-set-variable] Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linux-serial@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201104193549.4026187-12-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 171044a70b5750ea621659b143c075a47c1bfe40 Author: Lee Jones Date: Wed Nov 4 19:35:23 2020 +0000 tty: n_tty: Add 2 missing parameter descriptions Fixes the following W=1 kernel build warning(s): drivers/tty/n_tty.c:405: warning: Function parameter or member 'tty' not described in 'is_continuation' drivers/tty/n_tty.c:1701: warning: Function parameter or member 'flow' not described in 'n_tty_receive_buf_common' Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: "Andrew J. Kroll" Cc: processes-Sapan Bhatia Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201104193549.4026187-11-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit d3e3232e7b588439d0651f1e6cf8f91c7ccdd186 Author: Lee Jones Date: Wed Nov 4 19:35:22 2020 +0000 tty: vt: consolemap: Demote weakly documented function header Fixes the following W=1 kernel build warning(s): drivers/tty/vt/consolemap.c:739: warning: Function parameter or member 'ct' not described in 'con_get_unimap' drivers/tty/vt/consolemap.c:739: warning: Function parameter or member 'uct' not described in 'con_get_unimap' drivers/tty/vt/consolemap.c:739: warning: Function parameter or member 'list' not described in 'con_get_unimap' Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Jakub Jelinek Cc: Stanislav Voronyi Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201104193549.4026187-10-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit bc38fe241bc320fdfb4d34f5425290319c393734 Author: Lee Jones Date: Wed Nov 4 19:35:20 2020 +0000 tty: tty_jobctrl: Add missing function parameter descriptions Fixes the following W=1 kernel build warning(s): drivers/tty/tty_jobctrl.c:32: warning: Function parameter or member 'sig' not described in '__tty_check_change' drivers/tty/tty_jobctrl.c:95: warning: Function parameter or member 'tty' not described in '__proc_set_tty' drivers/tty/tty_jobctrl.c:344: warning: Function parameter or member 'file' not described in 'tiocsctty' Cc: Greg Kroah-Hartman Cc: Jiri Slaby Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201104193549.4026187-8-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 1b1deb44d12cea1c127940e73efdab5a8c7c59f7 Author: Lee Jones Date: Wed Nov 4 19:35:19 2020 +0000 tty: tty_port: Demote obvious abuse of kernel-doc formatting Fixes the following W=1 kernel build warning(s): drivers/tty/tty_port.c:633: warning: Function parameter or member 'port' not described in 'tty_port_close' drivers/tty/tty_port.c:633: warning: Function parameter or member 'tty' not described in 'tty_port_close' drivers/tty/tty_port.c:633: warning: Function parameter or member 'filp' not described in 'tty_port_close' drivers/tty/tty_port.c:672: warning: Function parameter or member 'port' not described in 'tty_port_open' drivers/tty/tty_port.c:672: warning: Function parameter or member 'tty' not described in 'tty_port_open' drivers/tty/tty_port.c:672: warning: Function parameter or member 'filp' not described in 'tty_port_open' Cc: Greg Kroah-Hartman Cc: Jiri Slaby Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201104193549.4026187-7-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit a776f10d12cac6ac337e06457e34019f39a9ac6e Author: Lee Jones Date: Wed Nov 4 19:35:18 2020 +0000 tty: tty_buffer: Add missing description for 'limit' Fixes the following W=1 kernel build warning(s): drivers/tty/tty_buffer.c:592: warning: Function parameter or member 'limit' not described in 'tty_buffer_set_limit' Cc: Greg Kroah-Hartman Cc: Jiri Slaby Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201104193549.4026187-6-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit aec51036a166a0aecc26cba101bfbbdc53d64139 Author: Lee Jones Date: Wed Nov 4 19:35:17 2020 +0000 tty: tty_io: Move 'tty_sysctl_init's prototype to shared space Fixes the following W=1 kernel build warning(s): drivers/tty/tty_ldisc.c:883:6: warning: no previous prototype for ‘tty_sysctl_init’ [-Wmissing-prototypes] 883 | void tty_sysctl_init(void) | ^~~~~~~~~~~~~~~ Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Nick Holloway Cc: -- Cc: Marko Kohtala Cc: Bill Hawes Cc: "C. Scott Ananian" Cc: Russell King Cc: Andrew Morton Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201104193549.4026187-5-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 6e30f2835663b07b517c29107f576affbdb3de2b Author: Lee Jones Date: Wed Nov 4 19:35:16 2020 +0000 tty: tty_baudrate: Add missing description for 'tty' Fixes the following W=1 kernel build warning(s): drivers/tty/tty_baudrate.c:234: warning: Function parameter or member 'tty' not described in 'tty_encode_baud_rate' Cc: Greg Kroah-Hartman Cc: Jiri Slaby Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201104193549.4026187-4-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit fc74d98c00d5d1b6c9f6f16fc2f679287d25eca6 Author: Lee Jones Date: Wed Nov 4 19:35:15 2020 +0000 tty: serdev: core: Provide missing description for 'owner' Fixes the following W=1 kernel build warning(s): drivers/tty/serdev/core.c: In function ‘serdev_controller_remove’: drivers/tty/serdev/core.c:811: warning: Function parameter or member 'owner' not described in '__serdev_device_driver_register' Cc: Rob Herring Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linux-serial@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201104193549.4026187-3-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit c0ed8ecb177de776fd02ad3e0b00787828de1fb2 Author: Lee Jones Date: Wed Nov 4 19:35:14 2020 +0000 tty: serdev: core: Remove unused variable 'dummy' No need to have a dummy variable here. Fixes the following W=1 kernel build warning(s): drivers/tty/serdev/core.c: In function ‘serdev_controller_remove’: drivers/tty/serdev/core.c:791:6: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable] Cc: Rob Herring Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linux-serial@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201104193549.4026187-2-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 5088d6572e8ff6c25433858a4e701aa0fd9364c0 Author: Luben Tuikov Date: Wed Nov 4 11:04:25 2020 +0100 drm/amdgpu: Make struct drm_driver const Make the definition of struct drm_driver a constant, to follow the latest developments in the DRM layer. Signed-off-by: Luben Tuikov [danvet: Rebase onto devm_drm_dev_alloc patch and drop the freesync ioctl line again that escaped from internal trees.] Acked-by: Alex Deucher Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201104100425.1922351-6-daniel.vetter@ffwll.ch commit 70a59dd82959f828220bf3f5f336e1b8fd931d15 Author: Daniel Vetter Date: Wed Nov 4 11:04:24 2020 +0100 drm/: Constify struct drm_driver Only the following drivers aren't converted: - amdgpu, because of the driver_feature mangling due to virt support. Subsequent patch will address this. - nouveau, because DRIVER_ATOMIC uapi is still not the default on the platforms where it's supported (i.e. again driver_feature mangling) - vc4, again because of driver_feature mangling - qxl, because the ioctl table is somewhere else and moving that is maybe a bit too much, hence the num_ioctls assignment prevents a const driver structure. - arcpgu, because that is stuck behind a pending tiny-fication series from me. - legacy drivers, because legacy requires non-const drm_driver. Note that for armada I also went ahead and made the ioctl array const. Only cc'ing the driver people who've not been converted (everyone else is way too much). v2: Fix one misplaced const static, should be static const (0day) v3: - Improve commit message (Sam) Acked-by: Sam Ravnborg Cc: kernel test robot Acked-by: Maxime Ripard Reviewed-by: Alex Deucher Signed-off-by: Daniel Vetter Cc: Sam Ravnborg Cc: Dave Airlie Cc: Gerd Hoffmann Cc: virtualization@lists.linux-foundation.org Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: Christian König Cc: Eric Anholt Cc: Maxime Ripard Cc: Ben Skeggs Cc: nouveau@lists.freedesktop.org Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201104100425.1922351-5-daniel.vetter@ffwll.ch commit 8f5c7aa078cf6f81ef5afc3f0516b4049decb4eb Author: Daniel Vetter Date: Wed Nov 4 11:04:23 2020 +0100 drm: Allow const struct drm_driver It's nice if a big function/ioctl table like this is const. Only downside here is that we need a few more #ifdef to paper over the differences when CONFIG_DRM_LEGACY is enabled. Maybe provides more motivation to sunset that horror show :-) v2: - Fix super important checkpatch warning (Sam) - Update the kerneldoc example too (Sam) Acked-by: Maxime Ripard Reviewed-by: Sam Ravnborg Acked-by: Thomas Zimmermann Reviewed-by: Alex Deucher Signed-off-by: Daniel Vetter Cc: Sam Ravnborg Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201104100425.1922351-4-daniel.vetter@ffwll.ch commit e431eb8089eef1477082d6ae072ac252699b231f Author: Alex Deucher Date: Wed Nov 4 11:04:22 2020 +0100 drm/amdgpu/virt: fix handling of the atomic flag Use the per device drm driver feature flags rather than the global one. This way we can make the drm driver struct const. Signed-off-by: Alex Deucher Reviewed-by: Luben Tuikov Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201104100425.1922351-3-daniel.vetter@ffwll.ch commit 57bb1ee6034046be70aed33fd6d447bb2b7261fa Author: Daniel Vetter Date: Wed Nov 4 11:04:21 2020 +0100 drm: Compile out legacy chunks from struct drm_device This means some very few #ifdef in code, but it allows us to enlist the compiler to make sure this stuff isn't used anymore. More important, only legacy drivers change drm_device (for the legacy_dev_list shadow attach management), therefore this is prep to allow modern drivers to have a const driver struct. Which is nice, because there's a ton of function pointers in there. Acked-by: Maxime Ripard Reviewed-by: Sam Ravnborg Review-by: Thomas Zimmermann Reviewed-by: Alex Deucher Signed-off-by: Daniel Vetter Cc: Sam Ravnborg Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201104100425.1922351-2-daniel.vetter@ffwll.ch commit 384bc5e059d4ce8856d650f24d75b8083c0f68d6 Author: Daniel Vetter Date: Wed Nov 4 11:04:20 2020 +0100 drm/radeon: Stop changing the drm_driver struct With only the kms driver left, we can fold this in. This means we need to move the ioctl table, which means one additional ioctl must be defined in headers. Also there's a conflict between the radeon_init macro and the module init function, so rename the module functions to avoid that. Reviewed-by: Alex Deucher Signed-off-by: Daniel Vetter Cc: Alex Deucher Cc: "Christian König" Cc: amd-gfx@lists.freedesktop.org Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201104100425.1922351-1-daniel.vetter@ffwll.ch commit 70debba3ab7d1009e97310268339cee1d5c7d949 Author: Pradeep Kumar Chitrapu Date: Tue Oct 20 11:31:08 2020 -0700 mac80211: save HE oper info in BSS config for mesh Currently he_support is set only for AP mode. Storing this information for mesh BSS as well helps driver to determine HE support. Also save HE operation element params in BSS conf so that drivers can access this for any configurations instead of having to parse the beacon to fetch that info. Signed-off-by: Pradeep Kumar Chitrapu Link: https://lore.kernel.org/r/20201020183111.25458-2-pradeepc@codeaurora.org Signed-off-by: Johannes Berg commit c4a30446a92a222d2f368254dcc4ab2fda0ba924 Author: Rajkumar Manoharan Date: Fri Oct 16 13:15:27 2020 -0700 cfg80211: add support to configure HE MCS for beacon rate This allows an option to configure a single HE MCS beacon tx rate. Signed-off-by: Rajkumar Manoharan Link: https://lore.kernel.org/r/1602879327-29488-2-git-send-email-rmanohar@codeaurora.org Signed-off-by: Johannes Berg commit 857b34c4fb104cecc95cd5c5fea5052628758a0f Author: Rajkumar Manoharan Date: Fri Oct 16 13:15:26 2020 -0700 nl80211: fix beacon tx rate mask validation While adding HE MCS beacon tx rate support, it is observed that legacy beacon tx rate in VHT hwsim test suite is failed. Whenever the application doesn't explicitly set VHT/MCS rate attribute in fixed rate command, by default all HE MCS masks are enabled in cfg80211. In beacon fixed rate, more than one rate mask is not allowed. Fix that by not setting all rate mask by default in case of beacon tx rate. Signed-off-by: Rajkumar Manoharan Link: https://lore.kernel.org/r/1602879327-29488-1-git-send-email-rmanohar@codeaurora.org Signed-off-by: Johannes Berg commit ba5c25236bc3d399df82ebe923490ea8d2d35cf2 Author: Colin Ian King Date: Thu Oct 29 22:24:07 2020 +0000 nl80211/cfg80211: fix potential infinite loop The for-loop iterates with a u8 loop counter and compares this with the loop upper limit of request->n_ssids which is an int type. There is a potential infinite loop if n_ssids is larger than the u8 loop counter, so fix this by making the loop counter an int. Addresses-Coverity: ("Infinite loop") Fixes: c8cb5b854b40 ("nl80211/cfg80211: support 6 GHz scanning") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20201029222407.390218-1-colin.king@canonical.com Signed-off-by: Johannes Berg commit 9c97c88d2f4b221d99491c3196da42004c195fb5 Author: Vamsi Krishna Date: Thu Oct 29 20:34:57 2020 +0200 cfg80211: Add support to calculate and report 4096-QAM HE rates Drivers supporting 4096-QAM rates as a vendor extension in HE mode need to update the correct rate info to userspace while using 4096-QAM (MCS12 and MCS13) in HE mode. Add support to calculate bitrates of HE-MCS12 and HE-MCS13 which represent the 4096-QAM modulation schemes. The MCS12 and MCS13 bitrates are defined in IEEE P802.11be/D0.1. In addition, scale up the bitrates by 3*2048 in order to accommodate calculations for the new MCS12 and MCS13 rates without losing fraction values. Signed-off-by: Vamsi Krishna Signed-off-by: Jouni Malinen Link: https://lore.kernel.org/r/20201029183457.7005-1-jouni@codeaurora.org Signed-off-by: Johannes Berg commit 9f0ffa418483938d25a15f6ad3891389f333bc59 Author: Rohan Dutta Date: Tue Oct 27 12:09:10 2020 +0200 cfg80211: Add support to configure SAE PWE value to drivers Add support to configure SAE PWE preference from userspace to drivers in both AP and STA modes. This is needed for cases where the driver takes care of Authentication frame processing (SME in the driver) so that correct enforcement of the acceptable PWE derivation mechanism can be performed. The userspace applications can pass the sae_pwe value using the NL80211_ATTR_SAE_PWE attribute in the NL80211_CMD_CONNECT and NL80211_CMD_START_AP commands to the driver. This allows selection between the hunting-and-pecking loop and hash-to-element options for PWE derivation. For backwards compatibility, this new attribute is optional and if not included, the driver is notified of the value being unspecified. Signed-off-by: Rohan Dutta Signed-off-by: Jouni Malinen Link: https://lore.kernel.org/r/20201027100910.22283-1-jouni@codeaurora.org Signed-off-by: Johannes Berg commit 8280c07e0762ba753876c427584a792e86f3f7e7 Author: Kurt Lee Date: Mon Oct 12 03:43:46 2020 -0500 ieee80211: Add definition for WFA DPP Add Wi-Fi Alliance definition for DPP (Device Provisioning Protocol). Signed-off-by: Kurt Lee Signed-off-by: Wright Feng Link: https://lore.kernel.org/r/20201012084347.121557-2-wright.feng@cypress.com Signed-off-by: Johannes Berg commit c7287cb8c686f1f9eb1a5e557e9b5ff9b360ddae Author: Julia Lawall Date: Sun Oct 11 12:34:55 2020 +0200 mac80211: use semicolons rather than commas to separate statements Replace commas with semicolons. Commas introduce unnecessary variability in the code structure and are hard to see. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/1602412498-32025-3-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Johannes Berg commit 5d4c1edf0ddcf8308386a422840a43fd4122ffb5 Author: Deepak R Varma Date: Fri Nov 6 00:20:16 2020 +0530 drm/qxl: replace idr_init() by idr_init_base() idr_init() uses base 0 which is an invalid identifier for this driver. The idr_alloc for this driver uses 1 as start value for ID range. The new function idr_init_base allows IDR to set the ID lookup from base 1. This avoids all lookups that otherwise starts from 0 since 0 is always unused / available. References: commit 6ce711f27500 ("idr: Make 1-based IDRs more efficient") Signed-off-by: Deepak R Varma Link: http://patchwork.freedesktop.org/patch/msgid/20201105185016.GA71797@localhost Signed-off-by: Gerd Hoffmann commit 44510939b18dcb39b1d79ecd1240e2e65dbdf78b Author: Dan Carpenter Date: Fri Oct 30 14:48:08 2020 +0300 drm/virtio: Fix a double free in virtio_gpu_cmd_map() This is freed both here and in the caller (virtio_gpu_vram_map()) so it's a double free. The correct place is only in the caller. Fixes: 16845c5d5409 ("drm/virtio: implement blob resources: implement vram object") Signed-off-by: Dan Carpenter Reviewed-by: Gurchetan Singh Link: http://patchwork.freedesktop.org/patch/msgid/20201030114808.GD3251003@mwanda Signed-off-by: Gerd Hoffmann commit 9e62edac519da71bbc981e4c984fe67729b0d1f3 Author: Viresh Kumar Date: Tue Oct 27 11:49:03 2020 +0530 opp: Don't return opp_dev from _find_opp_dev() The caller of _find_opp_dev() only needs to know if the opp_dev is there in the list or not. Signed-off-by: Viresh Kumar commit 27c09484dd3d8fdb56eb3787877d6035d0e89669 Author: Viresh Kumar Date: Tue Oct 27 16:53:21 2020 +0530 opp: Allocate the OPP table outside of opp_table_lock There is no critical section which needs protection with locks while allocating an OPP table, except while adding it to the opp_tables list. And taking the opp_table_lock for the entire duration causes circular dependency issues like the one mentioned below. This patch takes another approach to reduce the size of the critical section to avoid such issues, the details of that are present within the patch. ====================================================== WARNING: possible circular locking dependency detected 5.4.72 #14 Not tainted ------------------------------------------------------ chrome/1865 is trying to acquire lock: ffffffdd34921750 (opp_table_lock){+.+.}, at: _find_opp_table+0x34/0x74 but task is already holding lock: ffffff81f0fc71a8 (reservation_ww_class_mutex){+.+.}, at: submit_lock_objects+0x70/0x1ec fscrypt: AES-256-CTS-CBC using implementation "cts-cbc-aes-ce" which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #4 (reservation_ww_class_mutex){+.+.}: __mutex_lock_common+0xec/0xc0c ww_mutex_lock_interruptible+0x5c/0xc4 msm_gem_fault+0x2c/0x124 __do_fault+0x40/0x16c handle_mm_fault+0x7cc/0xd98 do_page_fault+0x230/0x3b4 do_translation_fault+0x5c/0x78 do_mem_abort+0x4c/0xb4 el0_da+0x1c/0x20 -> #3 (&mm->mmap_sem){++++}: __might_fault+0x70/0x98 compat_filldir+0xf8/0x48c dcache_readdir+0x70/0x1dc iterate_dir+0xd4/0x180 __arm64_compat_sys_getdents+0xa0/0x19c el0_svc_common+0xa8/0x178 el0_svc_compat_handler+0x2c/0x40 el0_svc_compat+0x8/0x10 -> #2 (&sb->s_type->i_mutex_key#3){++++}: down_write+0x54/0x16c start_creating+0x68/0x128 debugfs_create_dir+0x28/0x114 opp_debug_register+0x8c/0xc0 _add_opp_dev_unlocked+0x5c/0x70 _add_opp_dev+0x38/0x58 _opp_get_opp_table+0xdc/0x1ac dev_pm_opp_get_opp_table_indexed+0x24/0x30 dev_pm_opp_of_add_table_indexed+0x48/0x84 of_genpd_add_provider_onecell+0xc0/0x1b8 rpmhpd_probe+0x240/0x268 platform_drv_probe+0x90/0xb0 really_probe+0x134/0x2ec driver_probe_device+0x64/0xfc __device_attach_driver+0x8c/0xa4 bus_for_each_drv+0x90/0xd8 __device_attach+0xc0/0x148 device_initial_probe+0x20/0x2c bus_probe_device+0x34/0x94 device_add+0x1fc/0x3b0 of_device_add+0x3c/0x4c of_platform_device_create_pdata+0xb8/0xfc of_platform_bus_create+0x1e4/0x368 of_platform_populate+0x70/0xbc devm_of_platform_populate+0x58/0xa0 rpmh_rsc_probe+0x36c/0x3cc platform_drv_probe+0x90/0xb0 really_probe+0x134/0x2ec driver_probe_device+0x64/0xfc __device_attach_driver+0x8c/0xa4 bus_for_each_drv+0x90/0xd8 __device_attach+0xc0/0x148 device_initial_probe+0x20/0x2c bus_probe_device+0x34/0x94 device_add+0x1fc/0x3b0 of_device_add+0x3c/0x4c of_platform_device_create_pdata+0xb8/0xfc of_platform_bus_create+0x1e4/0x368 of_platform_bus_create+0x230/0x368 of_platform_populate+0x70/0xbc of_platform_default_populate_init+0xa8/0xc0 do_one_initcall+0x1c8/0x3fc do_initcall_level+0xb4/0x10c do_basic_setup+0x30/0x48 kernel_init_freeable+0x124/0x1a4 kernel_init+0x14/0x104 ret_from_fork+0x10/0x18 -> #1 (&opp_table->lock){+.+.}: __mutex_lock_common+0xec/0xc0c mutex_lock_nested+0x40/0x50 _add_opp_dev+0x2c/0x58 _opp_get_opp_table+0xdc/0x1ac dev_pm_opp_get_opp_table_indexed+0x24/0x30 dev_pm_opp_of_add_table_indexed+0x48/0x84 of_genpd_add_provider_onecell+0xc0/0x1b8 rpmhpd_probe+0x240/0x268 platform_drv_probe+0x90/0xb0 really_probe+0x134/0x2ec driver_probe_device+0x64/0xfc __device_attach_driver+0x8c/0xa4 bus_for_each_drv+0x90/0xd8 __device_attach+0xc0/0x148 device_initial_probe+0x20/0x2c bus_probe_device+0x34/0x94 device_add+0x1fc/0x3b0 of_device_add+0x3c/0x4c of_platform_device_create_pdata+0xb8/0xfc of_platform_bus_create+0x1e4/0x368 of_platform_populate+0x70/0xbc devm_of_platform_populate+0x58/0xa0 rpmh_rsc_probe+0x36c/0x3cc platform_drv_probe+0x90/0xb0 really_probe+0x134/0x2ec driver_probe_device+0x64/0xfc __device_attach_driver+0x8c/0xa4 bus_for_each_drv+0x90/0xd8 __device_attach+0xc0/0x148 device_initial_probe+0x20/0x2c bus_probe_device+0x34/0x94 device_add+0x1fc/0x3b0 of_device_add+0x3c/0x4c of_platform_device_create_pdata+0xb8/0xfc of_platform_bus_create+0x1e4/0x368 of_platform_populate+0x70/0xbc devm_of_platform_populate+0x58/0xa0 rpmh_rsc_probe+0x36c/0x3cc platform_drv_probe+0x90/0xb0 really_probe+0x134/0x2ec driver_probe_device+0x64/0xfc __device_attach_driver+0x8c/0xa4 bus_for_each_drv+0x90/0xd8 __device_attach+0xc0/0x148 device_initial_probe+0x20/0x2c bus_probe_device+0x34/0x94 device_add+0x1fc/0x3b0 of_device_add+0x3c/0x4c of_platform_device_create_pdata+0xb8/0xfc of_platform_bus_create+0x1e4/0x368 of_platform_bus_create+0x230/0x368 of_platform_populate+0x70/0xbc of_platform_default_populate_init+0xa8/0xc0 do_one_initcall+0x1c8/0x3fc do_initcall_level+0xb4/0x10c do_basic_setup+0x30/0x48 kernel_init_freeable+0x124/0x1a4 kernel_init+0x14/0x104 ret_from_fork+0x10/0x18 -> #0 (opp_table_lock){+.+.}: __lock_acquire+0xee4/0x2450 lock_acquire+0x1cc/0x210 __mutex_lock_common+0xec/0xc0c mutex_lock_nested+0x40/0x50 _find_opp_table+0x34/0x74 dev_pm_opp_find_freq_exact+0x2c/0xdc a6xx_gmu_resume+0xc8/0xecc a6xx_pm_resume+0x148/0x200 adreno_resume+0x28/0x34 pm_generic_runtime_resume+0x34/0x48 __rpm_callback+0x70/0x10c rpm_callback+0x34/0x8c rpm_resume+0x414/0x550 __pm_runtime_resume+0x7c/0xa0 msm_gpu_submit+0x60/0x1c0 msm_ioctl_gem_submit+0xadc/0xb60 drm_ioctl_kernel+0x9c/0x118 drm_ioctl+0x27c/0x408 drm_compat_ioctl+0xcc/0xdc __se_compat_sys_ioctl+0x100/0x206c __arm64_compat_sys_ioctl+0x20/0x2c el0_svc_common+0xa8/0x178 el0_svc_compat_handler+0x2c/0x40 el0_svc_compat+0x8/0x10 other info that might help us debug this: Chain exists of: opp_table_lock --> &mm->mmap_sem --> reservation_ww_class_mutex Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(reservation_ww_class_mutex); lock(&mm->mmap_sem); lock(reservation_ww_class_mutex); lock(opp_table_lock); *** DEADLOCK *** 3 locks held by chrome/1865: #0: ffffff81edecc0d8 (&dev->struct_mutex){+.+.}, at: msm_ioctl_gem_submit+0x264/0xb60 #1: ffffff81d0000870 (reservation_ww_class_acquire){+.+.}, at: msm_ioctl_gem_submit+0x8e8/0xb60 #2: ffffff81f0fc71a8 (reservation_ww_class_mutex){+.+.}, at: submit_lock_objects+0x70/0x1ec stack backtrace: CPU: 0 PID: 1865 Comm: chrome Not tainted 5.4.72 #14 Hardware name: Google Lazor (rev1+) with LTE (DT) Call trace: dump_backtrace+0x0/0x158 show_stack+0x20/0x2c dump_stack+0xc8/0x160 print_circular_bug+0x2c4/0x2c8 check_noncircular+0x1a8/0x1b0 __lock_acquire+0xee4/0x2450 lock_acquire+0x1cc/0x210 __mutex_lock_common+0xec/0xc0c mutex_lock_nested+0x40/0x50 _find_opp_table+0x34/0x74 dev_pm_opp_find_freq_exact+0x2c/0xdc a6xx_gmu_resume+0xc8/0xecc a6xx_pm_resume+0x148/0x200 adreno_resume+0x28/0x34 pm_generic_runtime_resume+0x34/0x48 __rpm_callback+0x70/0x10c rpm_callback+0x34/0x8c rpm_resume+0x414/0x550 __pm_runtime_resume+0x7c/0xa0 msm_gpu_submit+0x60/0x1c0 msm_ioctl_gem_submit+0xadc/0xb60 drm_ioctl_kernel+0x9c/0x118 drm_ioctl+0x27c/0x408 drm_compat_ioctl+0xcc/0xdc __se_compat_sys_ioctl+0x100/0x206c __arm64_compat_sys_ioctl+0x20/0x2c el0_svc_common+0xa8/0x178 el0_svc_compat_handler+0x2c/0x40 el0_svc_compat+0x8/0x10 Reported-by: Rob Clark Signed-off-by: Viresh Kumar commit 98c03b6eef3f9c7d8153f96870968615ab489a6b Author: Jaehoon Chung Date: Thu Oct 29 14:40:17 2020 +0100 arm64: dts: exynos: add the WiFi/PCIe support to TM2(e) boards Add the nodes relevant to PCIe PHY and PCIe support. PCIe is used for the WiFi interface (Broadcom Limited BCM4358 802.11ac Wireless LAN SoC). [mszyprow: rewrote commit message, reworked board/generic dts/dtsi split] Signed-off-by: Jaehoon Chung Signed-off-by: Marek Szyprowski Link: https://lore.kernel.org/r/20201029134017.27400-7-m.szyprowski@samsung.com Signed-off-by: Krzysztof Kozlowski commit 25519d68344269f9dc58b5bc72f648248a1fafb9 Author: Chester Lin Date: Fri Oct 30 14:08:39 2020 +0800 ima: generalize x86/EFI arch glue for other EFI architectures Move the x86 IMA arch code into security/integrity/ima/ima_efi.c, so that we will be able to wire it up for arm64 in a future patch. Co-developed-by: Chester Lin Signed-off-by: Chester Lin Acked-by: Mimi Zohar Signed-off-by: Ard Biesheuvel commit 047679e366b9842a9da3ab82dca26fcaad8020eb Author: Aloka Dixit Date: Wed Oct 28 15:54:32 2020 +0200 ath11k: FILS discovery and unsolicited broadcast probe response support This patch adds driver support for FILS discovery and unsolicited broadcast probe response transmission features which are used for in-band discovery in 6GHz band. Currently this support is enabled only in 6GHz by setting hardware flags. Changes include WMI commands to enable transmission, set packet interval, set template, and handle events. Signed-off-by: Aloka Dixit Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201007204036.19780-1-alokad@codeaurora.org commit dbeb101d28eb89a9138055b50d5ce7a9f7a663cf Author: Alex Dewar Date: Wed Oct 28 15:54:30 2020 +0200 ath10k: sdio: remove redundant check in for loop The for loop checks whether cur_section is NULL on every iteration, but we know it can never be NULL as there is another check towards the bottom of the loop body. Refactor to avoid this unnecessary check. Also, increment the variable i inline for clarity Addresses-Coverity: 1496984 ("Null pointer dereferences) Suggested-by: Saeed Mahameed Signed-off-by: Alex Dewar Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200916165748.20927-1-alex.dewar90@gmail.com commit c0f98d2f8b076bf3e3183aa547395f919c943a14 Merge: e047c7be173ca 24e146cdf9f5a Author: Dave Airlie Date: Fri Nov 6 14:37:56 2020 +1000 Merge tag 'drm-misc-next-2020-11-05' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for 5.11: UAPI Changes: Cross-subsystem Changes: - arch/arm64: Describe G12b GPU as coherent - iommu: Support coherency for Mali LPAE Core Changes: - atomic: Pass full state to CRTC atomic_{check, begin, flush}(); Use atomic-state pointers - drm: Remove SCATTER_LIST_MAX_SEGMENT; Cleanups - doc: Document legacy_cursor_update better; cleanups - edid: Don't warn n EDIDs of zero - ttm: New backend allocation pool; Remove old page allocator; Rework no_retry handling; Replace flags with booleans in struct ttm_operation_ctx - vram-helper: Cleanups - fbdev: Cleanups - console: Store font size as unsigned value Driver Changes: - ast: Support new display mode - amdgpu: Switch to new TTM allocator - hisilicon: Cleanups - nouveau: Switch to new TTM allocator; Fix include of swiotbl.h and limits.h; Use state helper instead of CRTC state pointer - panfrost: Support cache-coherent integrations; Fix mutex corruption on open/close; Cleanupse - qxl: Cleanups - radeon: Switch to new TTM allocator - ticdc: Fix build failure - vmwgfx: Switch to new TTM allocator - xlnx: Use dma_request_chan - fbdev/sh_mobile: Cleanups Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20201105101641.GA13099@linux-uq9g commit c6bde958a62b8ca5ee8d2c1fe429aec4ad54efad Author: Florian Lehner Date: Thu Oct 29 21:14:42 2020 +0100 bpf: Lift hashtab key_size limit Currently key_size of hashtab is limited to MAX_BPF_STACK. As the key of hashtab can also be a value from a per cpu map it can be larger than MAX_BPF_STACK. The use-case for this patch originates to implement allow/disallow lists for files and file paths. The maximum length of file paths is defined by PATH_MAX with 4096 chars including nul. This limit exceeds MAX_BPF_STACK. Changelog: v5: - Fix cast overflow v4: - Utilize BPF skeleton in tests - Rebase v3: - Rebase v2: - Add a test for bpf side Signed-off-by: Florian Lehner Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201029201442.596690-1-dev@der-flo.net commit 200ea5a2292dc444a818b096ae6a32ba3caa51b9 Author: Paul Moore Date: Tue Nov 3 11:49:38 2020 -0500 selinux: fix inode_doinit_with_dentry() LABEL_INVALID error handling A previous fix, commit 83370b31a915 ("selinux: fix error initialization in inode_doinit_with_dentry()"), changed how failures were handled before a SELinux policy was loaded. Unfortunately that patch was potentially problematic for two reasons: it set the isec->initialized state without holding a lock, and it didn't set the inode's SELinux label to the "default" for the particular filesystem. The later can be a problem if/when a later attempt to revalidate the inode fails and SELinux reverts to the existing inode label. This patch should restore the default inode labeling that existed before the original fix, without affecting the LABEL_INVALID marking such that revalidation will still be attempted in the future. Fixes: 83370b31a915 ("selinux: fix error initialization in inode_doinit_with_dentry()") Reported-by: Sven Schnelle Tested-by: Sven Schnelle Reviewed-by: Ondrej Mosnacek Signed-off-by: Paul Moore commit ab95bd2aa904e4f53b7358efeea1d57693fb7889 Author: Horia Geantă Date: Sun Nov 1 22:05:53 2020 +0200 crypto: caam - fix printing on xts fallback allocation error path At the time xts fallback tfm allocation fails the device struct hasn't been enabled yet in the caam xts tfm's private context. Fix this by using the device struct from xts algorithm's private context or, when not available, by replacing dev_err with pr_err. Fixes: 9d9b14dbe077 ("crypto: caam/jr - add fallback for XTS with more than 8B IV") Fixes: 83e8aa912138 ("crypto: caam/qi - add fallback for XTS with more than 8B IV") Fixes: 36e2d7cfdcf1 ("crypto: caam/qi2 - add fallback for XTS with more than 8B IV") Signed-off-by: Horia Geantă Reviewed-by: Iuliana Prodan Signed-off-by: Herbert Xu commit fefc046f2b0e0bdbd4d5944f6b489039678e001e Author: Weili Qian Date: Sat Oct 31 17:07:08 2020 +0800 crypto: hisilicon/qm - split 'hisi_qm_init' into smaller pieces 'hisi_qm_init' initializes configuration of QM. To improve code readability, split it into two pieces. Signed-off-by: Weili Qian Reviewed-by: Zhou Wang Signed-off-by: Herbert Xu commit 53737881da6e505a435f8a10d10a19dd0c888823 Author: Weili Qian Date: Sat Oct 31 17:07:07 2020 +0800 crypto: hisilicon/qm - split 'qm_eq_ctx_cfg' into smaller pieces 'qm_eq_ctx_cfg' initializes configuration of EQ and AEQ, split it into two pieces to improve code readability. Signed-off-by: Weili Qian Reviewed-by: Zhou Wang Signed-off-by: Herbert Xu commit 3bf1ef9d513ea405672bbc245964acc1990f4e80 Author: Weili Qian Date: Sat Oct 31 17:07:06 2020 +0800 crypto: hisilicon/qm - split 'qm_qp_ctx_cfg' into smaller pieces 'qm_qp_ctx_cfg' initializes configuration of SQ and CQ, split it into two pieces to improve code readability. Signed-off-by: Weili Qian Reviewed-by: Zhou Wang Signed-off-by: Herbert Xu commit 09493afbc62781bd9fba6224af89fd78fe33b8ba Author: Weili Qian Date: Sat Oct 31 17:07:05 2020 +0800 crypto: hisilicon/qm - replace 'sprintf' with 'scnprintf' Replace 'sprintf' with 'scnprintf' to avoid overrun. Signed-off-by: Weili Qian Reviewed-by: Zhou Wang Signed-off-by: Herbert Xu commit cd1aff982af43d47557a44d1758d9d5c06247d59 Author: Weili Qian Date: Sat Oct 31 17:07:04 2020 +0800 crypto: hisilicon/qm - modify return type of 'qm_set_sqctype' Since 'qm_set_sqctype' always returns 0, change it as 'void'. Signed-off-by: Weili Qian Reviewed-by: Zhou Wang Signed-off-by: Herbert Xu commit a8ff38bd829420d4813c22d018f412d5f1bb65df Author: Weili Qian Date: Sat Oct 31 17:07:03 2020 +0800 crypto: hisilicon/qm - modify the return type of debugfs interface Since 'qm_create_debugfs_file' always returns 0, change it as 'void'. Signed-off-by: Weili Qian Reviewed-by: Zhou Wang Signed-off-by: Herbert Xu commit e926d753a6128035a72a99490daa56a4f9a49f83 Author: Weili Qian Date: Sat Oct 31 17:07:02 2020 +0800 crypto: hisilicon/qm - modify the return type of function The returns of 'qm_get_hw_error_status' and 'qm_get_dev_err_status' are values from the hardware registers, which should not be defined as 'int', so update as 'u32'. Signed-off-by: Weili Qian Reviewed-by: Zhou Wang Signed-off-by: Herbert Xu commit 1b5644f29983b2847162de4d3b5bce23faa136ab Author: Weili Qian Date: Sat Oct 31 17:07:01 2020 +0800 crypto: hisilicon/qm - numbers are replaced by macros Some numbers are replaced by macros to avoid incomprehension. Signed-off-by: Weili Qian Reviewed-by: Zhou Wang Signed-off-by: Herbert Xu commit 5bd9938e9316a903f1586b8459fbaac396fc1188 Author: Nigel Christian Date: Wed Oct 28 20:52:17 2020 -0400 hwrng: imx-rngc - irq already prints an error Clean up the check for irq. dev_err() is superfluous as platform_get_irq() already prints an error. Check for zero would indicate a bug. Remove curly braces to conform to styling requirements. Signed-off-by: Nigel Christian Signed-off-by: Herbert Xu commit a2715fbdc6fc387e85211df917a4778761ec693d Author: Horia Geantă Date: Wed Oct 28 11:03:20 2020 +0200 crypto: arm/aes-neonbs - fix usage of cbc(aes) fallback Loading the module deadlocks since: -local cbc(aes) implementation needs a fallback and -crypto API tries to find one but the request_module() resolves back to the same module Fix this by changing the module alias for cbc(aes) and using the NEED_FALLBACK flag when requesting for a fallback algorithm. Fixes: 00b99ad2bac2 ("crypto: arm/aes-neonbs - Use generic cbc encryption path") Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu commit cc9a99fb89a91b841556ff5aa97f7a9d0e01cbcc Author: Tom Rix Date: Tue Oct 27 12:04:07 2020 -0700 crypto: qat - remove unneeded semicolon A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix Signed-off-by: Tom Rix Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 76bb6a7b5b427fcbb1996f8d002888be81371320 Author: Tom Rix Date: Tue Oct 27 12:01:25 2020 -0700 crypto: cavium/nitrox - remove unneeded semicolon A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix Signed-off-by: Herbert Xu commit 519a0d7e495a6d3ce62594e485aea2a3a4a2ca0a Author: Ard Biesheuvel Date: Tue Oct 27 00:00:27 2020 +0100 crypto: arm64/poly1305-neon - reorder PAC authentication with SP update PAC pointer authentication signs the return address against the value of the stack pointer, to prevent stack overrun exploits from corrupting the control flow. However, this requires that the AUTIASP is issued with SP holding the same value as it held when the PAC value was generated. The Poly1305 NEON code got this wrong, resulting in crashes on PAC capable hardware. Fixes: f569ca164751 ("crypto: arm64/poly1305 - incorporate OpenSSL/CRYPTOGAMS ...") Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 92eb6c3060ebe3adf381fd9899451c5b047bb14d Author: Eric Biggers Date: Mon Oct 26 13:07:15 2020 -0700 crypto: af_alg - avoid undefined behavior accessing salg_name Commit 3f69cc60768b ("crypto: af_alg - Allow arbitrarily long algorithm names") made the kernel start accepting arbitrarily long algorithm names in sockaddr_alg. However, the actual length of the salg_name field stayed at the original 64 bytes. This is broken because the kernel can access indices >= 64 in salg_name, which is undefined behavior -- even though the memory that is accessed is still located within the sockaddr structure. It would only be defined behavior if the array were properly marked as arbitrary-length (either by making it a flexible array, which is the recommended way these days, or by making it an array of length 0 or 1). We can't simply change salg_name into a flexible array, since that would break source compatibility with userspace programs that embed sockaddr_alg into another struct, or (more commonly) declare a sockaddr_alg like 'struct sockaddr_alg sa = { .salg_name = "foo" };'. One solution would be to change salg_name into a flexible array only when '#ifdef __KERNEL__'. However, that would keep userspace without an easy way to actually use the longer algorithm names. Instead, add a new structure 'sockaddr_alg_new' that has the flexible array field, and expose it to both userspace and the kernel. Make the kernel use it correctly in alg_bind(). This addresses the syzbot report "UBSAN: array-index-out-of-bounds in alg_bind" (https://syzkaller.appspot.com/bug?extid=92ead4eb8e26a26d465e). Reported-by: syzbot+92ead4eb8e26a26d465e@syzkaller.appspotmail.com Fixes: 3f69cc60768b ("crypto: af_alg - Allow arbitrarily long algorithm names") Cc: # v4.12+ Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 2d653936eb2cf613526290caa512b46e4c0d71ae Author: Iuliana Prodan Date: Mon Oct 26 21:06:26 2020 +0200 crypto: caam - enable crypto-engine retry mechanism Use the new crypto_engine_alloc_init_and_set() function to initialize crypto-engine and enable retry mechanism. Set the maximum size for crypto-engine software queue based on Job Ring size (JOBR_DEPTH) and a threshold (reserved for the non-crypto-API requests that are not passed through crypto-engine). The callback for do_batch_requests is NULL, since CAAM doesn't support linked requests. Signed-off-by: Iuliana Prodan Reviewed-by: Horia Geantă Signed-off-by: Herbert Xu commit 09a5ef9644bc0e167984136b711eb08206733af8 Author: Eric Biggers Date: Mon Oct 26 09:31:12 2020 -0700 crypto: testmgr - WARN on test failure Currently, by default crypto self-test failures only result in a pr_warn() message and an "unknown" status in /proc/crypto. Both of these are easy to miss. There is also an option to panic the kernel when a test fails, but that can't be the default behavior. A crypto self-test failure always indicates a kernel bug, however, and there's already a standard way to report (recoverable) kernel bugs -- the WARN() family of macros. WARNs are noisier and harder to miss, and existing test systems already know to look for them in dmesg or via /proc/sys/kernel/tainted. Therefore, call WARN() when an algorithm fails its self-tests. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 6e5972fa4a0db6912714d465485bdae91a99ccc2 Author: Eric Biggers Date: Mon Oct 26 09:17:02 2020 -0700 crypto: testmgr - always print the actual skcipher driver name When alg_test() is called from tcrypt.ko rather than from the algorithm registration code, "driver" is actually the algorithm name, not the driver name. So it shouldn't be used in places where a driver name is wanted, e.g. when reporting a test failure or when checking whether the driver is the generic driver or not. Fix this for the skcipher algorithm tests by getting the driver name from the crypto_skcipher that actually got allocated. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 2257f4712dcfb3b15783e7b0845ef83db022018a Author: Eric Biggers Date: Mon Oct 26 09:17:01 2020 -0700 crypto: testmgr - always print the actual AEAD driver name When alg_test() is called from tcrypt.ko rather than from the algorithm registration code, "driver" is actually the algorithm name, not the driver name. So it shouldn't be used in places where a driver name is wanted, e.g. when reporting a test failure or when checking whether the driver is the generic driver or not. Fix this for the AEAD algorithm tests by getting the driver name from the crypto_aead that actually got allocated. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 79cafe9a8b16f7a1c2c800f14ff0f4d0b56f5721 Author: Eric Biggers Date: Mon Oct 26 09:17:00 2020 -0700 crypto: testmgr - always print the actual hash driver name When alg_test() is called from tcrypt.ko rather than from the algorithm registration code, "driver" is actually the algorithm name, not the driver name. So it shouldn't be used in places where a driver name is wanted, e.g. when reporting a test failure or when checking whether the driver is the generic driver or not. Fix this for the hash algorithm tests by getting the driver name from the crypto_ahash or crypto_shash that actually got allocated. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit da094e0f1b226124078dc406712264ba9533d49f Author: Eric Biggers Date: Mon Oct 26 09:16:59 2020 -0700 crypto: aead - add crypto_aead_driver_name() Add crypto_aead_driver_name(), which is analogous to crypto_skcipher_driver_name(). Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 77fdd94f091f88b045e4f45ea94cac463cbd3221 Author: Tom Rix Date: Mon Oct 19 12:36:53 2020 -0700 crypto: atmel-sha - remove unneeded break A break is not needed if it is preceded by a return Signed-off-by: Tom Rix Reviewed-by: Alexandre Belloni Signed-off-by: Herbert Xu commit b6b466a81f84e02f5d57a641db16ee3f24388923 Merge: d0b3d2d7e50de 75fa1777694c2 Author: Alexei Starovoitov Date: Thu Nov 5 18:37:31 2020 -0800 Merge branch 'libbpf: split BTF support' Andrii Nakryiko says: ==================== This patch set adds support for generating and deduplicating split BTF. This is an enhancement to the BTF, which allows to designate one BTF as the "base BTF" (e.g., vmlinux BTF), and one or more other BTFs as "split BTF" (e.g., kernel module BTF), which are building upon and extending base BTF with extra types and strings. Once loaded, split BTF appears as a single unified BTF superset of base BTF, with continuous and transparent numbering scheme. This allows all the existing users of BTF to work correctly and stay agnostic to the base/split BTFs composition. The only difference is in how to instantiate split BTF: it requires base BTF to be alread instantiated and passed to btf__new_xxx_split() or btf__parse_xxx_split() "constructors" explicitly. This split approach is necessary if we are to have a reasonably-sized kernel module BTFs. By deduping each kernel module's BTF individually, resulting module BTFs contain copies of a lot of kernel types that are already present in vmlinux BTF. Even those single copies result in a big BTF size bloat. On my kernel configuration with 700 modules built, non-split BTF approach results in 115MBs of BTFs across all modules. With split BTF deduplication approach, total size is down to 5.2MBs total, which is on part with vmlinux BTF (at around 4MBs). This seems reasonable and practical. As to why we'd need kernel module BTFs, that should be pretty obvious to anyone using BPF at this point, as it allows all the BTF-powered features to be used with kernel modules: tp_btf, fentry/fexit/fmod_ret, lsm, bpf_iter, etc. This patch set is a pre-requisite to adding split BTF support to pahole, which is a prerequisite to integrating split BTF into the Linux kernel build setup to generate BTF for kernel modules. The latter will come as a follow-up patch series once this series makes it to the libbpf and pahole makes use of it. Patch #4 introduces necessary basic support for split BTF into libbpf APIs. Patch #8 implements minimal changes to BTF dedup algorithm to allow deduplicating split BTFs. Patch #11 adds extra -B flag to bpftool to allow to specify the path to base BTF for cases when one wants to dump or inspect split BTF. All the rest are refactorings, clean ups, bug fixes and selftests. v1->v2: - addressed Song's feedback. ==================== Signed-off-by: Alexei Starovoitov commit 75fa1777694c245c1e59ac774cb1d58a15ecefeb Author: Andrii Nakryiko Date: Wed Nov 4 20:34:01 2020 -0800 tools/bpftool: Add bpftool support for split BTF Add ability to work with split BTF by providing extra -B flag, which allows to specify the path to the base BTF file. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20201105043402.2530976-12-andrii@kernel.org commit 232338fa2fb47726ab7c459419115a6ab6bfb3e3 Author: Andrii Nakryiko Date: Wed Nov 4 20:34:00 2020 -0800 selftests/bpf: Add split BTF dedup selftests Add selftests validating BTF deduplication for split BTF case. Add a helper macro that allows to validate entire BTF with raw BTF dump, not just type-by-type. This saves tons of code and complexity. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20201105043402.2530976-11-andrii@kernel.org commit 6b6e6b1d09aa20c351a1fce0ea6402da436624a4 Author: Andrii Nakryiko Date: Wed Nov 4 20:33:59 2020 -0800 libbpf: Accomodate DWARF/compiler bug with duplicated identical arrays In some cases compiler seems to generate distinct DWARF types for identical arrays within the same CU. That seems like a bug, but it's already out there and breaks type graph equivalence checks, so accommodate it anyway by checking for identical arrays, regardless of their type ID. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20201105043402.2530976-10-andrii@kernel.org commit f86524efcf9e3f3a7cf75ebcd82cf8f58ec716cc Author: Andrii Nakryiko Date: Wed Nov 4 20:33:58 2020 -0800 libbpf: Support BTF dedup of split BTFs Add support for deduplication split BTFs. When deduplicating split BTF, base BTF is considered to be immutable and can't be modified or adjusted. 99% of BTF deduplication logic is left intact (module some type numbering adjustments). There are only two differences. First, each type in base BTF gets hashed (expect VAR and DATASEC, of course, those are always considered to be self-canonical instances) and added into a table of canonical table candidates. Hashing is a shallow, fast operation, so mostly eliminates the overhead of having entire base BTF to be a part of BTF dedup. Second difference is very critical and subtle. While deduplicating split BTF types, it is possible to discover that one of immutable base BTF BTF_KIND_FWD types can and should be resolved to a full STRUCT/UNION type from the split BTF part. This is, obviously, can't happen because we can't modify the base BTF types anymore. So because of that, any type in split BTF that directly or indirectly references that newly-to-be-resolved FWD type can't be considered to be equivalent to the corresponding canonical types in base BTF, because that would result in a loss of type resolution information. So in such case, split BTF types will be deduplicated separately and will cause some duplication of type information, which is unavoidable. With those two changes, the rest of the algorithm manages to deduplicate split BTF correctly, pointing all the duplicates to their canonical counter-parts in base BTF, but also is deduplicating whatever unique types are present in split BTF on their own. Also, theoretically, split BTF after deduplication could end up with either empty type section or empty string section. This is handled by libbpf correctly in one of previous patches in the series. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20201105043402.2530976-9-andrii@kernel.org commit d8123624506cd62730c9cd9c7672c698e462703d Author: Andrii Nakryiko Date: Wed Nov 4 20:33:57 2020 -0800 libbpf: Fix BTF data layout checks and allow empty BTF Make data section layout checks stricter, disallowing overlap of types and strings data. Additionally, allow BTFs with no type data. There is nothing inherently wrong with having BTF with no types (put potentially with some strings). This could be a situation with kernel module BTFs, if module doesn't introduce any new type information. Also fix invalid offset alignment check for btf->hdr->type_off. Fixes: 8a138aed4a80 ("bpf: btf: Add BTF support to libbpf") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201105043402.2530976-8-andrii@kernel.org commit 1306c980cf892bc17e7296d3e9ab8e9082f893a1 Author: Andrii Nakryiko Date: Wed Nov 4 20:33:56 2020 -0800 selftests/bpf: Add checking of raw type dump in BTF writer APIs selftests Add re-usable btf_helpers.{c,h} to provide BTF-related testing routines. Start with adding a raw BTF dumping helpers. Raw BTF dump is the most succinct and at the same time a very human-friendly way to validate exact contents of BTF types. Cross-validate raw BTF dump and writable BTF in a single selftest. Raw type dump checks also serve as a good self-documentation. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20201105043402.2530976-7-andrii@kernel.org commit 197389da2fbfbc3cefb229268c32d858d9575c96 Author: Andrii Nakryiko Date: Wed Nov 4 20:33:55 2020 -0800 selftests/bpf: Add split BTF basic test Add selftest validating ability to programmatically generate and then dump split BTF. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20201105043402.2530976-6-andrii@kernel.org commit ba451366bf44498f22dd16c31a792083bd6f2ae1 Author: Andrii Nakryiko Date: Wed Nov 4 20:33:54 2020 -0800 libbpf: Implement basic split BTF support Support split BTF operation, in which one BTF (base BTF) provides basic set of types and strings, while another one (split BTF) builds on top of base's types and strings and adds its own new types and strings. From API standpoint, the fact that the split BTF is built on top of the base BTF is transparent. Type numeration is transparent. If the base BTF had last type ID #N, then all types in the split BTF start at type ID N+1. Any type in split BTF can reference base BTF types, but not vice versa. Programmatically construction of a split BTF on top of a base BTF is supported: one can create an empty split BTF with btf__new_empty_split() and pass base BTF as an input, or pass raw binary data to btf__new_split(), or use btf__parse_xxx_split() variants to get initial set of split types/strings from the ELF file with .BTF section. String offsets are similarly transparent and are a logical continuation of base BTF's strings. When building BTF programmatically and adding a new string (explicitly with btf__add_str() or implicitly through appending new types/members), string-to-be-added would first be looked up from the base BTF's string section and re-used if it's there. If not, it will be looked up and/or added to the split BTF string section. Similarly to type IDs, types in split BTF can refer to strings from base BTF absolutely transparently (but not vice versa, of course, because base BTF doesn't "know" about existence of split BTF). Internal type index is slightly adjusted to be zero-indexed, ignoring a fake [0] VOID type. This allows to handle split/base BTF type lookups transparently by using btf->start_id type ID offset, which is always 1 for base/non-split BTF and equals btf__get_nr_types(base_btf) + 1 for the split BTF. BTF deduplication is not yet supported for split BTF and support for it will be added in separate patch. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20201105043402.2530976-5-andrii@kernel.org commit 88a82c2a9ab5b2ce533c3de3f4517853c2f67f53 Author: Andrii Nakryiko Date: Wed Nov 4 20:33:53 2020 -0800 libbpf: Unify and speed up BTF string deduplication Revamp BTF dedup's string deduplication to match the approach of writable BTF string management. This allows to transfer deduplicated strings index back to BTF object after deduplication without expensive extra memory copying and hash map re-construction. It also simplifies the code and speeds it up, because hashmap-based string deduplication is faster than sort + unique approach. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20201105043402.2530976-4-andrii@kernel.org commit d9448f94962bd28554df7d9a342d37c7f13d6232 Author: Andrii Nakryiko Date: Wed Nov 4 20:33:52 2020 -0800 selftest/bpf: Relax btf_dedup test checks Remove the requirement of a strictly exact string section contents. This used to be true when string deduplication was done through sorting, but with string dedup done through hash table, it's no longer true. So relax test harness to relax strings checks and, consequently, type checks, which now don't have to have exactly the same string offsets. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201105043402.2530976-3-andrii@kernel.org commit c81ed6d81e0560713ceb94917ff1981848d0614e Author: Andrii Nakryiko Date: Wed Nov 4 20:33:51 2020 -0800 libbpf: Factor out common operations in BTF writing APIs Factor out commiting of appended type data. Also extract fetching the very last type in the BTF (to append members to). These two operations are common across many APIs and will be easier to refactor with split BTF, if they are extracted into a single place. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20201105043402.2530976-2-andrii@kernel.org commit c9448e828d113cd7eafe77c414127e877ca88b20 Merge: c1aedf015ebdd 514436857128c Author: Jakub Kicinski Date: Thu Nov 5 18:01:31 2020 -0800 Merge tag 'mlx5-updates-2020-11-03' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2020-11-03 This series includes updates to mlx5 software steering component. 1) Few improvements in the DR area, such as removing unneeded checks, renaming to better general names, refactor in some places, etc. 2) Software steering (DR) Memory management improvements This patch series contains SW Steering memory management improvements: using buddy allocator instead of an existing bucket allocator, and several other optimizations. The buddy system is a memory allocation and management algorithm that manages memory in power of two increments. The algorithm is well-known and well-described, such as here: https://en.wikipedia.org/wiki/Buddy_memory_allocation Linux uses this algorithm for managing and allocating physical pages, as described here: https://www.kernel.org/doc/gorman/html/understand/understand009.html In our case, although the algorithm in principal is similar to the Linux physical page allocator, the "building blocks" and the circumstances are different: in SW steering, buddy allocator doesn't really allocates a memory, but rather manages ICM (Interconnect Context Memory) that was previously allocated and registered. The ICM memory that is used in SW steering is always power of 2 (order), so buddy system is a good fit for this. Patches in this series: [PATH 4] net/mlx5: DR, Add buddy allocator utilities This patch adds a modified implementation of a well-known buddy allocator, adjusted for SW steering needs: the algorithm in principal is similar to the Linux physical page allocator, but in our case buddy allocator doesn't really allocate a memory, but rather manages ICM memory that was previously allocated and registered. [PATH 5] net/mlx5: DR, Handle ICM memory via buddy allocation instead of bucket management This patch changes ICM management of SW steering to use buddy-system mechanism Instead of the previous bucket management. [PATH 6] net/mlx5: DR, Sync chunks only during free This patch makes syncing happen only when freeing memory chunks. [PATH 7] net/mlx5: DR, ICM memory pools sync optimization This patch adds tracking of pool's "hot" memory and makes the check whether steering sync is required much shorter and faster. [PATH 8] net/mlx5: DR, Free buddy ICM memory if it is unused This patch adds tracking buddy's used ICM memory, and frees the buddy if all its memory becomes unused. 3) Misc code cleanups * tag 'mlx5-updates-2020-11-03' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux: net: mlx5: Replace in_irq() usage net/mlx5: Cleanup kernel-doc warnings net/mlx4: Cleanup kernel-doc warnings net/mlx5e: Validate stop_room size upon user input net/mlx5: DR, Free unused buddy ICM memory net/mlx5: DR, ICM memory pools sync optimization net/mlx5: DR, Sync chunks only during free net/mlx5: DR, Handle ICM memory via buddy allocation instead of buckets net/mlx5: DR, Add buddy allocator utilities net/mlx5: DR, Rename matcher functions to be more HW agnostic net/mlx5: DR, Rename builders HW specific names net/mlx5: DR, Remove unused member of action struct ==================== Link: https://lore.kernel.org/r/20201105201242.21716-1-saeedm@nvidia.com Signed-off-by: Jakub Kicinski commit c1aedf015ebdd0232757a66e2daccf1246bd609c Author: Hayes Wang Date: Wed Nov 4 10:19:22 2020 +0800 net/usb/r8153_ecm: support ECM mode for RTL8153 Support ECM mode based on cdc_ether with relative mii functions, when CONFIG_USB_RTL8152 is not set, or the device is not supported by r8152 driver. Both r8152 and r8153_ecm would check the return value of rtl8152_get_version() in porbe(). If rtl8152_get_version() return none zero value, the r8152 is used for the device with vendor mode. Otherwise, the r8153_ecm is used for the device with ECM mode. Signed-off-by: Hayes Wang Link: https://lore.kernel.org/r/1394712342-15778-392-Taiwan-albertk@realtek.com Signed-off-by: Jakub Kicinski commit 3ffec6a14f24714ced7e808360726434d463e660 Author: Loic Poulain Date: Tue Nov 3 18:23:54 2020 +0100 net: Add mhi-net driver This patch adds a new network driver implementing MHI transport for network packets. Packets can be in any format, though QMAP (rmnet) is the usual protocol (flow control + PDN mux). It support two MHI devices, IP_HW0 which is, the path to the IPA (IP accelerator) on qcom modem, And IP_SW0 which is the software driven IP path (to modem CPU). Signed-off-by: Loic Poulain Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1604424234-24446-2-git-send-email-loic.poulain@linaro.org Signed-off-by: Jakub Kicinski commit d8c4a22363853e196497b06a8ee9be9773873a14 Author: Loic Poulain Date: Tue Nov 3 18:23:53 2020 +0100 bus: mhi: Add mhi_queue_is_full function This function can be used by client driver to determine whether it's possible to queue new elements in a channel ring. Signed-off-by: Loic Poulain Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1604424234-24446-1-git-send-email-loic.poulain@linaro.org Signed-off-by: Jakub Kicinski commit 5aee9484df35033d1820382fa7b00efe32f10580 Merge: 0356010d825eb 8b43357fff61f Author: Jakub Kicinski Date: Thu Nov 5 16:32:39 2020 -0800 Merge branch 'net-phy-add-support-for-shared-interrupts-part-1' Ioana Ciornei says: ==================== net: phy: add support for shared interrupts (part 1) This patch set aims to actually add support for shared interrupts in phylib and not only for multi-PHY devices. While we are at it, streamline the interrupt handling in phylib. For a bit of context, at the moment, there are multiple phy_driver ops that deal with this subject: - .config_intr() - Enable/disable the interrupt line. - .ack_interrupt() - Should quiesce any interrupts that may have been fired. It's also used by phylib in conjunction with .config_intr() to clear any pending interrupts after the line was disabled, and before it is going to be enabled. - .did_interrupt() - Intended for multi-PHY devices with a shared IRQ line and used by phylib to discern which PHY from the package was the one that actually fired the interrupt. - .handle_interrupt() - Completely overrides the default interrupt handling logic from phylib. The PHY driver is responsible for checking if any interrupt was fired by the respective PHY and choose accordingly if it's the one that should trigger the link state machine. From my point of view, the interrupt handling in phylib has become somewhat confusing with all these callbacks that actually read the same PHY register - the interrupt status. A more streamlined approach would be to just move the responsibility to write an interrupt handler to the driver (as any other device driver does) and make .handle_interrupt() the only way to deal with interrupts. Another advantage with this approach would be that phylib would gain support for shared IRQs between different PHY (not just multi-PHY devices), something which at the moment would require extending every PHY driver anyway in order to implement their .did_interrupt() callback and duplicate the same logic as in .ack_interrupt(). The disadvantage of making .did_interrupt() mandatory would be that we are slightly changing the semantics of the phylib API and that would increase confusion instead of reducing it. What I am proposing is the following: - As a first step, make the .ack_interrupt() callback optional so that we do not break any PHY driver amid the transition. - Every PHY driver gains a .handle_interrupt() implementation that, for the most part, would look like below: irq_status = phy_read(phydev, INTR_STATUS); if (irq_status < 0) { phy_error(phydev); return IRQ_NONE; } if (!(irq_status & irq_mask)) return IRQ_NONE; phy_trigger_machine(phydev); return IRQ_HANDLED; - Remove each PHY driver's implementation of the .ack_interrupt() by actually taking care of quiescing any pending interrupts before enabling/after disabling the interrupt line. - Finally, after all drivers have been ported, remove the .ack_interrupt() and .did_interrupt() callbacks from phy_driver. This patch set is part 1 and it addresses the changes needed in phylib and 7 PHY drivers. The rest can be found on my Github branch here: https://github.com/IoanaCiornei/linux/commits/phylib-shared-irq I do not have access to most of these PHY's, therefore I Cc-ed the latest contributors to the individual PHY drivers in order to have access, hopefully, to more regression testing. Changes in v2: - Rework the .handle_interrupt() implementation for each driver so that only the enabled interrupts are taken into account when IRQ_NONE/IRQ_HANDLED it returned. The main idea is so that we avoid falsely blaming a device for triggering an interrupt when this is not the case. The only devices for which I was unable to make this adjustment were the BCM8706, BCM8727, BCMAC131 and BCM5241 since I do not have access to their datasheets. - I also updated the pseudo-code added in the cover-letter so that it's more clear how a .handle_interrupt() callback should look like. ==================== Tested-by: Andrew Lunn Link: https://lore.kernel.org/r/20201101125114.1316879-1-ciorneiioana@gmail.com Signed-off-by: Jakub Kicinski commit 8b43357fff61ffcdc8c90c195a9641c5f58ea6fd Author: Ioana Ciornei Date: Sun Nov 1 14:51:14 2020 +0200 net: phy: realtek: remove the use of .ack_interrupt() In preparation of removing the .ack_interrupt() callback, we must replace its occurrences (aka phy_clear_interrupt), from the 2 places where it is called from (phy_enable_interrupts and phy_disable_interrupts), with equivalent functionality. This means that clearing interrupts now becomes something that the PHY driver is responsible of doing, before enabling interrupts and after clearing them. Make this driver follow the new contract. Cc: Martin Blumenstingl Cc: Willy Liu Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit 0382916398f2d3cfa682a7bcb802ca8fcb4311d0 Author: Ioana Ciornei Date: Sun Nov 1 14:51:13 2020 +0200 net: phy: realtek: implement generic .handle_interrupt() callback In an attempt to actually support shared IRQs in phylib, we now move the responsibility of triggering the phylib state machine or just returning IRQ_NONE, based on the IRQ status register, to the PHY driver. Having 3 different IRQ handling callbacks (.handle_interrupt(), .did_interrupt() and .ack_interrupt() ) is confusing so let the PHY driver implement directly an IRQ handler like any other device driver. Make this driver follow the new convention. Cc: Martin Blumenstingl Cc: Willy Liu Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit 87de1f058aacc8ce4be94e36a38f77b860914a76 Author: Ioana Ciornei Date: Sun Nov 1 14:51:12 2020 +0200 net: phy: add genphy_handle_interrupt_no_ack() It seems there are cases where the interrupts are handled by another entity (ie an IRQ controller embedded inside the PHY) and do not need any other interraction from phylib. For this kind of PHYs, like the RTL8366RB, add the genphy_handle_interrupt_no_ack() function which just triggers the link state machine. Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit 0d65cc189c9a89ca609086bf1b2a39ef8c7c11ca Author: Ioana Ciornei Date: Sun Nov 1 14:51:11 2020 +0200 net: phy: davicom: remove the use of .ack_interrupt() In preparation of removing the .ack_interrupt() callback, we must replace its occurrences (aka phy_clear_interrupt), from the 2 places where it is called from (phy_enable_interrupts and phy_disable_interrupts), with equivalent functionality. This means that clearing interrupts now becomes something that the PHY driver is responsible of doing, before enabling interrupts and after clearing them. Make this driver follow the new contract. Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit e954631cd22ec4ddc7318e1537a65549d29b67cb Author: Ioana Ciornei Date: Sun Nov 1 14:51:10 2020 +0200 net: phy: davicom: implement generic .handle_interrupt() calback In an attempt to actually support shared IRQs in phylib, we now move the responsibility of triggering the phylib state machine or just returning IRQ_NONE, based on the IRQ status register, to the PHY driver. Having 3 different IRQ handling callbacks (.handle_interrupt(), .did_interrupt() and .ack_interrupt() ) is confusing so let the PHY driver implement directly an IRQ handler like any other device driver. Make this driver follow the new convention. Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit a758087f476d5af400b07ae708586def16858c77 Author: Ioana Ciornei Date: Sun Nov 1 14:51:09 2020 +0200 net: phy: cicada: remove the use of .ack_interrupt() In preparation of removing the .ack_interrupt() callback, we must replace its occurrences (aka phy_clear_interrupt), from the 2 places where it is called from (phy_enable_interrupts and phy_disable_interrupts), with equivalent functionality. This means that clearing interrupts now becomes something that the PHY driver is responsible of doing, before enabling interrupts and after clearing them. Make this driver follow the new contract. Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit e5d2b0b6c2b98bfac36c280d81a7bb7aabc5b731 Author: Ioana Ciornei Date: Sun Nov 1 14:51:08 2020 +0200 net: phy: cicada: implement the generic .handle_interrupt() callback In an attempt to actually support shared IRQs in phylib, we now move the responsibility of triggering the phylib state machine or just returning IRQ_NONE, based on the IRQ status register, to the PHY driver. Having 3 different IRQ handling callbacks (.handle_interrupt(), .did_interrupt() and .ack_interrupt() ) is confusing so let the PHY driver implement directly an IRQ handler like any other device driver. Make this driver follow the new convention. Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit 15772e4ddf3fa07db7be3c0920dd21a580a05ffa Author: Ioana Ciornei Date: Sun Nov 1 14:51:07 2020 +0200 net: phy: broadcom: remove use of ack_interrupt() In preparation of removing the .ack_interrupt() callback, we must replace its occurrences (aka phy_clear_interrupt), from the 2 places where it is called from (phy_enable_interrupts and phy_disable_interrupts), with equivalent functionality. This means that clearing interrupts now becomes something that the PHY driver is responsible of doing, before enabling interrupts and after clearing them. Make this driver follow the new contract. Cc: Michael Walle Cc: Florian Fainelli Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit 4567d5c3eb9b16dfbe8cc5103c0193affbad6491 Author: Ioana Ciornei Date: Sun Nov 1 14:51:06 2020 +0200 net: phy: broadcom: implement generic .handle_interrupt() callback In an attempt to actually support shared IRQs in phylib, we now move the responsibility of triggering the phylib state machine or just returning IRQ_NONE, based on the IRQ status register, to the PHY driver. Having 3 different IRQ handling callbacks (.handle_interrupt(), .did_interrupt() and .ack_interrupt() ) is confusing so let the PHY driver implement directly an IRQ handler like any other device driver. Make this driver follow the new convention. Cc: Florian Fainelli Signed-off-by: Ioana Ciornei Tested-by: Michael Walle Signed-off-by: Jakub Kicinski commit e11ef96d44f18b42d4caf90b9c8264afc8df6547 Author: Ioana Ciornei Date: Sun Nov 1 14:51:05 2020 +0200 net: phy: aquantia: remove the use of .ack_interrupt() In preparation of removing the .ack_interrupt() callback, we must replace its occurrences (aka phy_clear_interrupt), from the 2 places where it is called from (phy_enable_interrupts and phy_disable_interrupts), with equivalent functionality. This means that clearing interrupts now becomes something that the PHY driver is responsible of doing, before enabling interrupts and after clearing them. Make this driver follow the new contract. Cc: Heiner Kallweit Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit 6ab930df83cca98de1805d102121b842e9ef80a0 Author: Ioana Ciornei Date: Sun Nov 1 14:51:04 2020 +0200 net: phy: aquantia: implement generic .handle_interrupt() callback In an attempt to actually support shared IRQs in phylib, we now move the responsibility of triggering the phylib state machine or just returning IRQ_NONE, based on the IRQ status register, to the PHY driver. Having 3 different IRQ handling callbacks (.handle_interrupt(), .did_interrupt() and .ack_interrupt() ) is confusing so let the PHY driver implement directly an IRQ handler like any other device driver. Make this driver follow the new convention. Cc: Heiner Kallweit Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit 30446ae4675c4ad39dfbb0adf98191e800d4a27b Author: Ioana Ciornei Date: Sun Nov 1 14:51:03 2020 +0200 net: phy: mscc: remove the use of .ack_interrupt() In preparation of removing the .ack_interrupt() callback, we must replace its occurrences (aka phy_clear_interrupt), from the 2 places where it is called from (phy_enable_interrupts and phy_disable_interrupts), with equivalent functionality. This means that clearing interrupts now becomes something that the PHY driver is responsible of doing, before enabling interrupts and after clearing them. Make this driver follow the new contract. Cc: Antoine Tenart Signed-off-by: Ioana Ciornei Tested-by: Vladimir Oltean # VSC8514 Signed-off-by: Jakub Kicinski commit 4008f373eb711630aae79be0b126dc877c4f3a5d Author: Ioana Ciornei Date: Sun Nov 1 14:51:02 2020 +0200 net: phy: mscc: implement generic .handle_interrupt() callback In an attempt to actually support shared IRQs in phylib, we now move the responsibility of triggering the phylib state machine or just returning IRQ_NONE, based on the IRQ status register, to the PHY driver. Having 3 different IRQ handling callbacks (.handle_interrupt(), .did_interrupt() and .ack_interrupt() ) is confusing so let the PHY driver implement directly an IRQ handler like any other device driver. Make this driver follow the new convention. Also, remove the .did_interrupt() callback since it's not anymore used. Signed-off-by: Ioana Ciornei Tested-by: Vladimir Oltean # VSC8514 Signed-off-by: Jakub Kicinski commit f2e9060458b11a0daa20beb68219ba6b8858beba Author: Ioana Ciornei Date: Sun Nov 1 14:51:01 2020 +0200 net: phy: mscc: use phy_trigger_machine() to notify link change According to the comment describing the phy_mac_interrupt() function, it it intended to be used by MAC drivers which have noticed a link change thus its use in the mscc PHY driver is improper and, most probably, was added just because phy_trigger_machine() was not exported. Now that we have acces to trigger the link state machine, use directly the phy_trigger_machine() function to notify a link change detected by the PHY driver. Signed-off-by: Ioana Ciornei Tested-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit a3417885fc3665bf2f22ea4447015764ad66cf71 Author: Ioana Ciornei Date: Sun Nov 1 14:51:00 2020 +0200 net: phy: at803x: remove the use of .ack_interrupt() In preparation of removing the .ack_interrupt() callback, we must replace its occurrences (aka phy_clear_interrupt), from the 2 places where it is called from (phy_enable_interrupts and phy_disable_interrupts), with equivalent functionality. This means that clearing interrupts now becomes something that the PHY driver is responsible of doing, before enabling interrupts and after clearing them. Make this driver follow the new contract. Cc: Oleksij Rempel Cc: Michael Walle Signed-off-by: Ioana Ciornei Tested-by: Oleksij Rempel Signed-off-by: Jakub Kicinski commit 297730973602394606a4d9640f407aa72a57ca1a Author: Ioana Ciornei Date: Sun Nov 1 14:50:59 2020 +0200 net: phy: at803x: implement generic .handle_interrupt() callback In an attempt to actually support shared IRQs in phylib, we now move the responsibility of triggering the phylib state machine or just returning IRQ_NONE, based on the IRQ status register, to the PHY driver. Having 3 different IRQ handling callbacks (.handle_interrupt(), .did_interrupt() and .ack_interrupt() ) is confusing so let the PHY driver implement directly an IRQ handler like any other device driver. Make this driver follow the new convention. Cc: Oleksij Rempel Cc: Michael Walle Signed-off-by: Ioana Ciornei Tested-by: Oleksij Rempel Signed-off-by: Jakub Kicinski commit 7b2d59085d17ee5c1a36f723de6cf924f25dbfc3 Author: Ioana Ciornei Date: Sun Nov 1 14:50:58 2020 +0200 net: phy: make .ack_interrupt() optional As a first step into making phylib and all PHY drivers to actually have support for shared IRQs, make the .ack_interrupt() callback optional. After all drivers have been moved to implement the generic interrupt handle, the phy_drv_supports_irq() check will be changed again to only require the .handle_interrupts() callback. Cc: Alexandru Ardelean Cc: Andre Edich Cc: Antoine Tenart Cc: Baruch Siach Cc: Christophe Leroy Cc: Dan Murphy Cc: Divya Koppera Cc: Florian Fainelli Cc: Hauke Mehrtens Cc: Heiner Kallweit Cc: Jerome Brunet Cc: Kavya Sree Kotagiri Cc: Linus Walleij Cc: Marco Felsch Cc: Marek Vasut Cc: Martin Blumenstingl Cc: Mathias Kresin Cc: Maxim Kochetkov Cc: Michael Walle Cc: Neil Armstrong Cc: Nisar Sayed Cc: Oleksij Rempel Cc: Philippe Schenker Cc: Willy Liu Cc: Yuiko Oshino Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit e2f016cf775129c050d6c79483073423db15c79a Author: Ioana Ciornei Date: Sun Nov 1 14:50:57 2020 +0200 net: phy: add a shutdown procedure In case of a board which uses a shared IRQ we can easily end up with an IRQ storm after a forced reboot. For example, a 'reboot -f' will trigger a call to the .shutdown() callbacks of all devices. Because phylib does not implement that hook, the PHY is not quiesced, thus it can very well leave its IRQ enabled. At the next boot, if that IRQ line is found asserted by the first PHY driver that uses it, but _before_ the driver that is _actually_ keeping the shared IRQ asserted is probed, the IRQ is not going to be acknowledged, thus it will keep being fired preventing the boot process of the kernel to continue. This is even worse when the second PHY driver is a module. To fix this, implement the .shutdown() callback and disable the interrupts if these are used. Note that we are still susceptible to IRQ storms if the previous kernel exited with a panic or if the bootloader left the shared IRQ active, but there is absolutely nothing we can do about these cases. Cc: Alexandru Ardelean Cc: Andre Edich Cc: Antoine Tenart Cc: Baruch Siach Cc: Christophe Leroy Cc: Dan Murphy Cc: Divya Koppera Cc: Florian Fainelli Cc: Hauke Mehrtens Cc: Heiner Kallweit Cc: Jerome Brunet Cc: Kavya Sree Kotagiri Cc: Linus Walleij Cc: Marco Felsch Cc: Marek Vasut Cc: Martin Blumenstingl Cc: Mathias Kresin Cc: Maxim Kochetkov Cc: Michael Walle Cc: Neil Armstrong Cc: Nisar Sayed Cc: Oleksij Rempel Cc: Philippe Schenker Cc: Willy Liu Cc: Yuiko Oshino Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit 293e9a3d950dfebc76d9fa6931e6f91ef856b9ab Author: Ioana Ciornei Date: Sun Nov 1 14:50:56 2020 +0200 net: phy: export phy_error and phy_trigger_machine These functions are currently used by phy_interrupt() to either signal an error condition or to trigger the link state machine. In an attempt to actually support shared PHY IRQs, export these two functions so that the actual PHY drivers can use them. Cc: Alexandru Ardelean Cc: Andre Edich Cc: Antoine Tenart Cc: Baruch Siach Cc: Christophe Leroy Cc: Dan Murphy Cc: Divya Koppera Cc: Florian Fainelli Cc: Hauke Mehrtens Cc: Heiner Kallweit Cc: Jerome Brunet Cc: Kavya Sree Kotagiri Cc: Linus Walleij Cc: Marco Felsch Cc: Marek Vasut Cc: Martin Blumenstingl Cc: Mathias Kresin Cc: Maxim Kochetkov Cc: Michael Walle Cc: Neil Armstrong Cc: Nisar Sayed Cc: Oleksij Rempel Cc: Philippe Schenker Cc: Willy Liu Cc: Yuiko Oshino Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit 0356010d825eb18d9157408e8ca4ec4613d61398 Author: Xin Long Date: Wed Nov 4 14:55:32 2020 +0800 sctp: bring inet(6)_skb_parm back to sctp_input_cb inet(6)_skb_parm was removed from sctp_input_cb by Commit a1dd2cf2f1ae ("sctp: allow changing transport encap_port by peer packets"), as it thought sctp_input_cb->header is not used any more in SCTP. syzbot reported a crash: [ ] BUG: KASAN: use-after-free in decode_session6+0xe7c/0x1580 [ ] [ ] Call Trace: [ ] [ ] dump_stack+0x107/0x163 [ ] kasan_report.cold+0x1f/0x37 [ ] decode_session6+0xe7c/0x1580 [ ] __xfrm_policy_check+0x2fa/0x2850 [ ] sctp_rcv+0x12b0/0x2e30 [ ] sctp6_rcv+0x22/0x40 [ ] ip6_protocol_deliver_rcu+0x2e8/0x1680 [ ] ip6_input_finish+0x7f/0x160 [ ] ip6_input+0x9c/0xd0 [ ] ipv6_rcv+0x28e/0x3c0 It was caused by sctp_input_cb->header/IP6CB(skb) still used in sctp rx path decode_session6() but some members overwritten by sctp6_rcv(). This patch is to fix it by bring inet(6)_skb_parm back to sctp_input_cb and not overwriting it in sctp4/6_rcv() and sctp_udp_rcv(). Reported-by: syzbot+5be8aebb1b7dfa90ef31@syzkaller.appspotmail.com Fixes: a1dd2cf2f1ae ("sctp: allow changing transport encap_port by peer packets") Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Link: https://lore.kernel.org/r/136c1a7a419341487c504be6d1996928d9d16e02.1604472932.git.lucien.xin@gmail.com Signed-off-by: Jakub Kicinski commit 67438feb2b85e9850f08e3d8c601692317341ca5 Merge: 94f44f28836de d5d29d527a27d Author: Jakub Kicinski Date: Thu Nov 5 14:07:51 2020 -0800 Merge branch 'hirschmann-hellcreek-dsa-driver' Kurt Kanzenbach says: ==================== Hirschmann Hellcreek DSA driver this series adds a DSA driver for the Hirschmann Hellcreek TSN switch IP. Characteristics of that IP: * Full duplex Ethernet interface at 100/1000 Mbps on three ports * IEEE 802.1Q-compliant Ethernet Switch * IEEE 802.1Qbv Time-Aware scheduling support * IEEE 1588 and IEEE 802.1AS support That IP is used e.g. in https://www.arrow.com/en/campaigns/arrow-kairos Due to the hardware setup the switch driver is implemented using DSA. A special tagging protocol is leveraged. Furthermore, this driver supports PTP and hardware timestamping. This work is part of the AccessTSN project: https://www.accesstsn.com/ The previous versions can be found here: * https://lkml.kernel.org/netdev/20200618064029.32168-1-kurt@linutronix.de/ * https://lkml.kernel.org/netdev/20200710113611.3398-1-kurt@linutronix.de/ * https://lkml.kernel.org/netdev/20200723081714.16005-1-kurt@linutronix.de/ * https://lkml.kernel.org/netdev/20200820081118.10105-1-kurt@linutronix.de/ * https://lkml.kernel.org/netdev/20200901125014.17801-1-kurt@linutronix.de/ * https://lkml.kernel.org/netdev/20200904062739.3540-1-kurt@linutronix.de/ * https://lkml.kernel.org/netdev/20201004112911.25085-1-kurt@linutronix.de/ * https://lkml.kernel.org/netdev/20201028074221.29326-1-kurt@linutronix.de/ Changes since v7: * Simplify tagging code (rebase to net-next) * Pass info instead of ptr (Florian Fainelli) * Fix yamllint warnings (Rob Herring) Changes since v6: * Add .tail_tag = true (Vladimir Oltean) * Fix vlan_filtering=0 bridges (Vladimir Oltean) * Enforce restrictions (Vladimir Oltean) * Sort stuff alphabetically (Vladimir Oltean) * Rename hellcreek.yaml to hirschmann,hellcreek.yaml * Typo fixes Changes since v5: * Implement configure_vlan_while_not_filtering behavior (Vladimir Oltean) * Minor cleanups Changes since v4: * Fix W=1 compiler warnings (kernel test robot) * Add tags Changes since v3: * Drop TAPRIO support (David Miller) => Switch to mutexes due to the lack of hrtimers * Use more specific compatible strings and add platform data (Andrew Lunn) * Fix Kconfig ordering (Andrew Lunn) Changes since v2: * Make it compile by getting all requirements merged first (Jakub Kicinski, David Miller) * Use "tsn" for TSN register set (Rob Herring) * Fix DT binding issues (Rob Herring) Changes since v1: * Code simplifications (Florian Fainelli, Vladimir Oltean) * Fix issues with hellcreek.yaml bindings (Florian Fainelli) * Clear reserved field in ptp v2 event messages (Richard Cochran) * Make use of generic ptp parsing function (Richard Cochran, Vladimir Oltean) * Fix Kconfig (Florian Fainelli) * Add tags (Florian Fainelli, Rob Herring, Richard Cochran) Changes since RFC ordered by reviewers: * Andrew Lunn * Use dev_dbg for debug messages * Get rid of __ function names where possible * Use reverse xmas tree variable ordering * Remove redundant/useless checks * Improve comments e.g. for PTP * Fix Kconfig ordering * Make LED handling more generic and provide info via DT * Setup advertisement of PHYs according to hardware * Drop debugfs patch * Jakub Kicinski * Fix compiler warnings * Florian Fainelli * Switch to YAML DT bindings * Richard Cochran * Fix typo * Add missing NULL checks ==================== Link: https://lore.kernel.org/r/20201103071101.3222-1-kurt@linutronix.de Signed-off-by: Jakub Kicinski commit d5d29d527a27d1376a2d3773b055cb035c8e0b4f Author: Kurt Kanzenbach Date: Tue Nov 3 08:11:01 2020 +0100 dt-bindings: net: dsa: Add documentation for Hellcreek switches Add basic documentation and example. Signed-off-by: Kurt Kanzenbach Reviewed-by: Rob Herring Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit dcfb1a75ba29f46c28cb4838a898b9c75ef86dd7 Author: Kurt Kanzenbach Date: Tue Nov 3 08:11:00 2020 +0100 dt-bindings: Add vendor prefix for Hirschmann Hirschmann is building devices for automation and networking. Add them to the vendor prefixes. Signed-off-by: Kurt Kanzenbach Reviewed-by: Florian Fainelli Acked-by: Rob Herring Signed-off-by: Jakub Kicinski commit 7d9ee2e8ff1541c60dcb5cfdf41def9659204c3e Author: Kurt Kanzenbach Date: Tue Nov 3 08:10:59 2020 +0100 net: dsa: hellcreek: Add PTP status LEDs The switch has two controllable I/Os which are usually connected to LEDs. This is useful to immediately visually see the PTP status. These provide two signals: * is_gm This LED can be activated if the current device is the grand master in that PTP domain. * sync_good This LED can be activated if the current device is in sync with the network time. Expose these via the LED framework to be controlled via user space e.g. linuxptp. Signed-off-by: Kurt Kanzenbach Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit f0d4ba9eff75a79fccb7793f4d9f12303d458603 Author: Kamil Alkhouri Date: Tue Nov 3 08:10:58 2020 +0100 net: dsa: hellcreek: Add support for hardware timestamping The switch has the ability to take hardware generated time stamps per port for PTPv2 event messages in Rx and Tx direction. That is useful for achieving needed time synchronization precision for TSN devices/switches. So add support for it. There are two directions: * RX The switch has a single register per port to capture a timestamp. That mechanism is not used due to correlation problems. If the software processing is too slow and a PTPv2 event message is received before the previous one has been processed, false timestamps will be captured. Therefore, the switch can do "inline" timestamping which means it can insert the nanoseconds part of the timestamp directly into the PTPv2 event message. The reserved field (4 bytes) is leveraged for that. This might not be in accordance with (older) PTP standards, but is the only way to get reliable results. * TX In Tx direction there is no correlation problem, because the software and the driver has to ensure that only one event message is "on the fly". However, the switch provides also a mechanism to check whether a timestamp is lost. That can only happen when a timestamp is read and at this point another message is timestamped. So, that lost bit is checked just in case to indicate to the user that the driver or the software is somewhat buggy. Signed-off-by: Kamil Alkhouri Signed-off-by: Kurt Kanzenbach Acked-by: Richard Cochran Signed-off-by: Jakub Kicinski commit ddd56dfe52c987d82964595902db0600970ef406 Author: Kamil Alkhouri Date: Tue Nov 3 08:10:57 2020 +0100 net: dsa: hellcreek: Add PTP clock support The switch has internal PTP hardware clocks. Add support for it. There are three clocks: * Synchronized * Syntonized * Free running Currently the synchronized clock is exported to user space which is a good default for the beginning. The free running clock might be exported later e.g. for implementing 802.1AS-2011/2020 Time Aware Bridges (TAB). The switch also supports cross time stamping for that purpose. The implementation adds support setting/getting the time as well as offset and frequency adjustments. However, the clock only holds a partial timeofday timestamp. This is why we track the seconds completely in software (see overflow work and last_ts). Furthermore, add the PTP multicast addresses into the FDB to forward that packages only to the CPU port where they are processed by a PTP program. Signed-off-by: Kamil Alkhouri Signed-off-by: Kurt Kanzenbach Acked-by: Richard Cochran Signed-off-by: Jakub Kicinski commit e4b27ebc780fa7fa951d81d241912755532568ff Author: Kurt Kanzenbach Date: Tue Nov 3 08:10:56 2020 +0100 net: dsa: Add DSA driver for Hirschmann Hellcreek switches Add a basic DSA driver for Hirschmann Hellcreek switches. Those switches are implementing features needed for Time Sensitive Networking (TSN) such as support for the Time Precision Protocol and various shapers like the Time Aware Shaper. This driver includes basic support for networking: * VLAN handling * FDB handling * Port statistics * STP * Phylink Signed-off-by: Kurt Kanzenbach Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit e358bef7c392b6a29381b9b8fbf646a88d5968f3 Author: Vladimir Oltean Date: Tue Nov 3 08:10:55 2020 +0100 net: dsa: Give drivers the chance to veto certain upper devices Some switches rely on unique pvids to ensure port separation in standalone mode, because they don't have a port forwarding matrix configurable in hardware. So, setups like a group of 2 uppers with the same VLAN, swp0.100 and swp1.100, will cause traffic tagged with VLAN 100 to be autonomously forwarded between these switch ports, in spite of there being no bridge between swp0 and swp1. These drivers need to prevent this from happening. They need to have VLAN filtering enabled in standalone mode (so they'll drop frames tagged with unknown VLANs) and they can only accept an 8021q upper on a port as long as it isn't installed on any other port too. So give them the chance to veto bad user requests. Signed-off-by: Vladimir Oltean [Kurt: Pass info instead of ptr] Signed-off-by: Kurt Kanzenbach Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit 01ef09caad66f2e6b2a9d1b92b1db5619fa196f1 Author: Kurt Kanzenbach Date: Tue Nov 3 08:10:54 2020 +0100 net: dsa: Add tag handling for Hirschmann Hellcreek switches The Hirschmann Hellcreek TSN switches have a special tagging protocol for frames exchanged between the CPU port and the master interface. The format is a one byte trailer indicating the destination or origin port. It's quite similar to the Micrel KSZ tagging. That's why the implementation is based on that code. Signed-off-by: Kurt Kanzenbach Reviewed-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit 8902a6642771616901ea3f5341926602908eaf3a Author: Łukasz Stelmach Date: Thu Oct 1 15:52:54 2020 +0200 ARM: dts: exynos: Add a placeholder for a MAC address Add a placeholder for a MAC address. A bootloader may fill it to set the MAC address and override EEPROM settings. Signed-off-by: Łukasz Stelmach Link: https://lore.kernel.org/r/20201001135254.28178-1-l.stelmach@samsung.com Signed-off-by: Krzysztof Kozlowski commit 2f62f4990dca0e80b7f247b84d372f7a8c1b6aef Author: Lee Jones Date: Thu Nov 5 14:45:10 2020 +0000 gpu: drm: bridge: analogix: analogix_dp_reg: Remove unused function 'analogix_dp_write_byte_to_dpcd' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c:571:5: warning: no previous prototype for ‘analogix_dp_write_byte_to_dpcd’ [-Wmissing-prototypes] Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Cc: David Airlie Cc: Daniel Vetter Cc: Jason Yan Cc: Sam Ravnborg Cc: Jingoo Han Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201105144517.1826692-13-lee.jones@linaro.org commit 5d89045b3367fca5e84512808886471b58aaee08 Author: Lee Jones Date: Thu Nov 5 14:45:14 2020 +0000 drm/panel: panel-ilitek-ili9322: Demote non-conformant kernel-doc header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_SRGB_THROUGH' not described in enum 'ili9322_input' drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_SRGB_ALIGNED' not described in enum 'ili9322_input' drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_SRGB_DUMMY_320X240' not described in enum 'ili9322_input' drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_SRGB_DUMMY_360X240' not described in enum 'ili9322_input' drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_DISABLED_1' not described in enum 'ili9322_input' drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_PRGB_THROUGH' not described in enum 'ili9322_input' drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_PRGB_ALIGNED' not described in enum 'ili9322_input' drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_YUV_640X320_YCBCR' not described in enum 'ili9322_input' drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_YUV_720X360_YCBCR' not described in enum 'ili9322_input' drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_DISABLED_2' not described in enum 'ili9322_input' drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_ITU_R_BT656_720X360_YCBCR' not described in enum 'ili9322_input' drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_ITU_R_BT656_640X320_YCBCR' not described in enum 'ili9322_input' drivers/gpu/drm/panel/panel-ilitek-ili9322.c:177: warning: Enum value 'ILI9322_INPUT_UNKNOWN' not described in enum 'ili9322_input' Cc: Thierry Reding Cc: Sam Ravnborg Cc: David Airlie Cc: Daniel Vetter Cc: Linus Walleij Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Acked-by: Thierry Reding Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201105144517.1826692-17-lee.jones@linaro.org commit 084ee219efb6982c7f09670ffb7980e779dc3ef8 Author: Lee Jones Date: Thu Nov 5 14:45:09 2020 +0000 drm/panel: panel-simple: Fix 'struct panel_desc's header Struct headers should start with 'struct ' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/panel/panel-simple.c:42: warning: Cannot understand * @modes: Pointer to array of fixed modes appropriate for this panel. If Cc: Thierry Reding Cc: Sam Ravnborg Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Acked-by: Thierry Reding Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201105144517.1826692-12-lee.jones@linaro.org commit d2a58fd1f0eaf9ffa2ab8364e03df543bf74408a Author: Lee Jones Date: Thu Nov 5 14:44:59 2020 +0000 gpu/host1x: bus: Add missing description for 'driver' Fixes the following W=1 kernel build warning(s): drivers/gpu/host1x/bus.c:40: warning: Function parameter or member 'driver' not described in 'host1x_subdev_add' Cc: Thierry Reding Cc: dri-devel@lists.freedesktop.org Cc: linux-tegra@vger.kernel.org Signed-off-by: Lee Jones Acked-by: Thierry Reding Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201105144517.1826692-2-lee.jones@linaro.org commit c2530cc9610d84a5a0118ba40d0f09309605047f Author: YueHaibing Date: Mon Nov 2 22:30:24 2020 +0800 drm/bridge: tpd12s015: Fix irq registering in tpd12s015_probe gpiod_to_irq() return negative value in case of error, the existing code doesn't handle negative error codes. If the HPD gpio supports IRQs (gpiod_to_irq returns a valid number), we use the IRQ. If it doesn't (gpiod_to_irq returns an error), it gets polled via detect(). Fixes: cff5e6f7e83f ("drm/bridge: Add driver for the TI TPD12S015 HDMI level shifter") Signed-off-by: YueHaibing Reviewed-by: Laurent Pinchart Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201102143024.26216-1-yuehaibing@huawei.com commit 514436857128cad07015dc6d1d9842113ac2e798 Author: Sebastian Andrzej Siewior Date: Tue Oct 27 23:54:43 2020 +0100 net: mlx5: Replace in_irq() usage mlx5_eq_async_int() uses in_irq() to decide whether eq::lock needs to be acquired and released with spin_[un]lock() or the irq saving/restoring variants. The usage of in_*() in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be seperated or the context be conveyed in an argument passed by the caller, which usually knows the context. mlx5_eq_async_int() knows the context via the action argument already so using it for the lock variant decision is a straight forward replacement for in_irq(). Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Saeed Mahameed commit 6c6132032d7ac733d9899015a6f39d433ea8e999 Author: Saeed Mahameed Date: Mon Oct 12 15:58:47 2020 -0700 net/mlx5: Cleanup kernel-doc warnings $ git ls-files *.[ch] | egrep drivers/net/ethernet/mellanox/ | \ xargs scripts/kernel-doc -none drivers/net/ethernet/mellanox/mlx5/core/fpga/sdk.h:57: warning: Enum value 'MLX5_FPGA_ACCESS_TYPE_I2C' not described ... drivers/net/ethernet/mellanox/mlx5/core/fpga/sdk.h:57: warning: Enum value 'MLX5_FPGA_ACCESS_TYPE_DONTCARE' not described ... drivers/net/ethernet/mellanox/mlx5/core/fpga/sdk.h:118: warning: Function parameter or member 'cb_arg' not described ... drivers/net/ethernet/mellanox/mlx5/core/fpga/sdk.h:160: warning: Function parameter or member 'conn' not described ... drivers/net/ethernet/mellanox/mlx5/core/fpga/sdk.h:160: warning: Excess function parameter 'fdev' description ... Signed-off-by: Saeed Mahameed Reported-by: Moshe Shemesh Reviewed-by: Moshe Shemesh Reviewed-by: Tariq Toukan commit 7c36e785d62a7a318ff5484ab873a304c21c4829 Author: Saeed Mahameed Date: Mon Oct 12 15:47:35 2020 -0700 net/mlx4: Cleanup kernel-doc warnings $ git ls-files *.[ch] | egrep drivers/net/ethernet/mellanox/ | \ xargs scripts/kernel-doc -none drivers/net/ethernet/mellanox/mlx4/fw_qos.h:144: warning: Function parameter or member 'in_param' not described ... drivers/net/ethernet/mellanox/mlx4/fw_qos.h:144: warning: Excess function parameter 'out_param' description ... Signed-off-by: Saeed Mahameed Reported-by: Moshe Shemesh Reviewed-by: Moshe Shemesh Reviewed-by: Tariq Toukan commit 579524c6eace5c52c3487b442de064a83125db74 Author: Vladyslav Tarasiuk Date: Mon Sep 21 13:41:03 2020 +0200 net/mlx5e: Validate stop_room size upon user input Stop room is a space that may be taken by WQEs in the SQ during a packet transmit. It is used to check if next packet has enough room in the SQ. Stop room guarantees this packet can be served and if not, the queue is stopped, so no more packets are passed to the driver until it's ready. Currently, stop_room size is calculated and validated upon tx queues allocation. This makes it impossible to know if user provided valid input for certain parameters when interface is down. Instead, store stop_room in mlx5e_sq_param and create mlx5e_validate_params(), to validate its fields upon user input even when the interface is down. Signed-off-by: Vladyslav Tarasiuk Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 284836d9660d2476758fa2b82c6d27b30614fcae Author: Yevgeny Kliteynik Date: Mon Sep 14 15:07:59 2020 +0300 net/mlx5: DR, Free unused buddy ICM memory Track buddy's used ICM memory, and free it if all of the buddy's memory bacame unused. Do this only for STEs. MODIFY_ACTION buddies are much smaller, so in case there is a large amount of modify_header actions, which result in large amount of MODIFY_ACTION buddies, doing this cleanup during sync will result in performance hit while not freeing significant amount of memory. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit 1c58651412bb4ea3b75c739825f15fc7d77fd44d Author: Yevgeny Kliteynik Date: Mon Sep 14 15:07:26 2020 +0300 net/mlx5: DR, ICM memory pools sync optimization Track the pool's hot ICM memory when freeing/allocating chunk, so that when checking if the sync is required, just check if the pool hot memory has reached the sync threshold. Signed-off-by: Hamdan Igbaria Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit 3eb1006a3b3e8587b1ec9efd9e92df91f364726e Author: Yevgeny Kliteynik Date: Mon Sep 14 15:06:49 2020 +0300 net/mlx5: DR, Sync chunks only during free When freeing chunks, we want to sync the steering so that all the "hot" memory will be written to ICM and all the chunks that are in the hot_list will be actually destroyed. When allocating from the pool, we don't have a need to sync the steering, as we're not freeing anything, and sync might just hurt the performance in terms of flow-per-second offloaded. Signed-off-by: Erez Shitrit Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit a00cd87880a3afa88055aa5f43ee6386c67895a8 Author: Yevgeny Kliteynik Date: Mon Sep 14 15:05:56 2020 +0300 net/mlx5: DR, Handle ICM memory via buddy allocation instead of buckets Till now in order to manage the ICM memory we used bucket mechanism, which kept a bucket per specified size (sizes were between 1 block to 2^21 blocks). Now changing that with buddy-system mechanism, which gives us much more flexible way to manage the ICM memory. Its biggest advantage over the bucket is by using the same ICM memory area for all the sizes of blocks, which reduces the memory consumption. Signed-off-by: Erez Shitrit Signed-off-by: Yevgeny Kliteynik Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit 3b72422dea971142aa38a787b941a058e04fdb13 Author: Yevgeny Kliteynik Date: Mon Sep 14 15:05:30 2020 +0300 net/mlx5: DR, Add buddy allocator utilities Add implementation of SW Steering variation of buddy allocator. The buddy system for ICM memory uses 2 main data structures: - Bitmap per order, that keeps the current state of allocated blocks for this order - Indicator for the number of available blocks per each order Signed-off-by: Erez Shitrit Signed-off-by: Yevgeny Kliteynik Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit 8a8a1023000e7afd6f9a19319589e124c706d953 Author: Yevgeny Kliteynik Date: Mon Aug 31 11:58:26 2020 +0300 net/mlx5: DR, Rename matcher functions to be more HW agnostic Remove flex parser from the matcher function names since the matcher should not be aware of such HW specific details. Signed-off-by: Alex Vesker Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed commit de1facaf56b679677601db04b62273f637aa611f Author: Yevgeny Kliteynik Date: Mon Aug 31 11:58:07 2020 +0300 net/mlx5: DR, Rename builders HW specific names We will support multiple STE versions. The existing naming is not suitable for newer versions. Removed the HW specific details and renamed with a more general names. Signed-off-by: Alex Vesker Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed commit 77662e75e009fe91645ac3e485305851a632fb4d Author: Yevgeny Kliteynik Date: Mon Aug 31 11:57:58 2020 +0300 net/mlx5: DR, Remove unused member of action struct Struct mlx5dr_action doesn't use this member Signed-off-by: Erez Shitrit Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed commit 21d3cdd0391bb01b348a47ec117eff3b9615d3a9 Author: Dmitry Osipenko Date: Wed Nov 4 19:48:40 2020 +0300 dt-bindings: memory: tegra20: emc: Correct registers range in example There is superfluous zero in the registers base address and registers size should be twice bigger. Signed-off-by: Dmitry Osipenko Acked-by: Rob Herring Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20201104164923.21238-5-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit d9e1af3a13947742cd8bf8007ba22d977a6b170e Author: Łukasz Stelmach Date: Tue Nov 3 19:44:12 2020 +0100 ARM: dts: exynos: Add Ethernet interface description for Odroid X/X2 Add Ethernet interface description for Odroid X/X2. Add an alias to enable bootloaders to find the Ethernet interface and assign a MAC address. Signed-off-by: Łukasz Stelmach Link: https://lore.kernel.org/r/20201103184412.18874-7-l.stelmach@samsung.com Signed-off-by: Krzysztof Kozlowski commit 6eff260412bdf74ede126016f5e0026b7861db77 Author: Łukasz Stelmach Date: Tue Nov 3 19:44:11 2020 +0100 ARM: dts: exynos: Add Ethernet interface description for Odroid U3 Add Ethernet interface description for Odroid U3. Add an alias to enable bootloaders to find the Ethernet interface and assign a MAC address. Signed-off-by: Łukasz Stelmach Link: https://lore.kernel.org/r/20201103184412.18874-6-l.stelmach@samsung.com Signed-off-by: Krzysztof Kozlowski commit dff7ae5c50ebc69929973f948d87de6c661ef42d Author: Łukasz Stelmach Date: Tue Nov 3 19:44:10 2020 +0100 ARM: dts: exynos: Add Ethernet interface description for Odroid XU Add Ethernet interface description for Odroid XU. Add an alias to enable bootloaders to find the Ethernet interface and assign a MAC address. Signed-off-by: Łukasz Stelmach Link: https://lore.kernel.org/r/20201103184412.18874-5-l.stelmach@samsung.com Signed-off-by: Krzysztof Kozlowski commit 9ef3a2c5859e02afc67f71cd31ff5177771b48c1 Author: Łukasz Stelmach Date: Tue Nov 3 19:44:09 2020 +0100 ARM: dts: exynos: Add Ethernet interface description for Odroid XU3 Lite Add Ethernet interface description for Odroid XU3 Lite. Add an alias to enable bootloaders to find the Ethernet interface and assign a MAC address. Signed-off-by: Łukasz Stelmach Link: https://lore.kernel.org/r/20201103184412.18874-4-l.stelmach@samsung.com Signed-off-by: Krzysztof Kozlowski commit 852e1b3644817f071427b83859b889c788a0cf69 Author: Chris Wilson Date: Thu Nov 5 15:49:34 2020 +0000 drm/i915/gem: Pull phys pread/pwrite implementations to the backend Move the specialised interactions with the physical GEM object from the pread/pwrite ioctl handler into the phys backend. Currently, if one is able to exhaust the entire aperture and then try to pwrite into an object not backed by struct page, we accidentally invoked the phys pwrite handler on a non-phys object; calamitous. Fixes: c6790dc22312 ("drm/i915: Wean off drm_pci_alloc/drm_pci_free") Testcase: igt/gem_pwrite/exhaustion Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Cc: stable@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20201105154934.16022-2-chris@chris-wilson.co.uk commit 7bd5175918eb4b294c0979c75056f20fd90a50bf Author: Christian Hewitt Date: Sun Nov 1 02:10:12 2020 +0000 arm64: dts: meson: add watchdog to g12-common dtsi G12 vendor kernels show the watchdog on the same address as AXG so add the node to meson-g12-common.dtsi. GX boards inherit the same from meson-gx.dtsi. v2 fix typo in node name (s/wtd/wdt) Signed-off-by: Christian Hewitt Reviewed-by: Neil Armstrong Tested-by: Neil Armstrong Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20201101021012.24519-1-christianshewitt@gmail.com commit 0049b688459b846f819b6e51c24cd0781fcfde41 Author: Matthew Auld Date: Thu Nov 5 15:49:33 2020 +0000 drm/i915/gem: Allow backends to override pread implementation As there are more and more complicated interactions between the different backing stores and userspace, push the control into the backends rather than accumulate them all inside the ioctl handlers. Signed-off-by: Matthew Auld Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20201105154934.16022-1-chris@chris-wilson.co.uk commit 8e9c052a483db5f9ae098d9b686ed80e2e98a8c5 Author: Christian Hewitt Date: Mon Oct 26 13:41:01 2020 +0000 arm64: dts: meson: remove empty lines from aml-s905x-cc v2 dts Fixes: 63fafc5a046b ("arm64: dts: meson: initial support for aml-s905x-cc v2") Signed-off-by: Christian Hewitt Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20201026134101.10594-1-christianshewitt@gmail.com commit 514ad1b6bb6e2fa205b5511bd3d50e33457f6180 Author: Kent Russell Date: Thu Nov 5 10:15:08 2020 -0500 drm/amdgpu: Fix Arcturus fan speed reporting Arcturus doesn't have a fan. The assumption of "if the manual fan control bit isn't set, it's on automatic mode" does not hold true if the fan is missing, and results in exposing an invalid value for fan speed. The SMU metrics table accurately reflects the lack of fan and will return 0 for the fan speed. Trying to use the smu_v11_0_get_fan_speed_rpm function will return invalid data, so just stick with the SMU metrics for Arcturus Signed-off-by: Kent Russell Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 71037bfc78bf63a6640792ace925741767fb6bfc Author: Kevin Wang Date: Wed Nov 4 15:33:04 2020 +0800 drm/amdgpu: add missing clock gating info in amdgpu_pm_info add missing clock gating informations in amdgpu_pm_info 1. AMD_CG_SUPPORT_VCN_MGCG 2. AMD_CG_SUPPORT_HDP_DS 3. AMD_CG_SUPPORT_HDP_SD 4. AMD_CG_SUPPORT_IH_CG 5. AMD_CG_SUPPORT_JPEG_MGCG Signed-off-by: Kevin Wang Reviewed-by: Kenneth Feng Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 8d96ec9ba9e7bd606d5d0fead9f91f0c5a3366a0 Author: Kuninori Morimoto Date: Thu Nov 5 15:05:23 2020 +0900 ASoC: renesas,rsnd: Add r8a77961 support Document R-Car M3-W+ (R8A77961) SoC bindings. Signed-off-by: Kuninori Morimoto Acked-by: Rob Herring Link: https://lore.kernel.org/r/87a6vwbavq.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 2d8fc973646c8ae87b668e30730becc8b1a57a06 Author: Kuninori Morimoto Date: Thu Nov 5 15:05:10 2020 +0900 ASoC: renesas, rsnd: switch to yaml base Documentation This patch switches from .txt base to .yaml base Document. It is still keeping detail explanations at .txt Signed-off-by: Kuninori Morimoto Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/87blgcbaw4.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 97198614f6c3b019299b1189106478ffb58481c9 Author: Kuninori Morimoto Date: Thu Nov 5 15:04:57 2020 +0900 ASoC: audio-graph-card: switch to yaml base Documentation This patch switches from .txt base to .yaml base Document. Signed-off-by: Kuninori Morimoto Acked-by: Sameer Pujar Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/87d00sbawh.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 007fda302d771d818347ce85043ae8681b87b6e0 Author: Marek Szyprowski Date: Tue Nov 3 15:02:14 2020 +0100 ARM: dts: exynos: Enable DWC2 dual-role support on OdroidU3+ boards MicroUSB port on OdroidU3+ boards can operate both as peripheral or as host port. Till now it was configured as pheriperal only port, but it turned out that the DWC2 driver code already handles everything needed to support USB role-switch, so switch it to dual-role (OTG) mode. This has no effect on OdroidU3 (without 'plus') and OdroidX2, which doesn't have USB needed ID pin and VBUS wiring. Those will still operate correctly in pheriperal mode only. Signed-off-by: Marek Szyprowski Tested-by: Anand Moon Link: https://lore.kernel.org/r/20201103140214.21690-1-m.szyprowski@samsung.com Signed-off-by: Krzysztof Kozlowski commit 02c02ddce4279adf0c4ddc4ab6d113084f36c6ac Author: Yong Wu Date: Tue Nov 3 13:42:00 2020 +0800 memory: mtk-smi: Add mt8192 support Add mt8192 SMI support. Signed-off-by: Yong Wu Link: https://lore.kernel.org/r/20201103054200.21386-4-yong.wu@mediatek.com Signed-off-by: Krzysztof Kozlowski commit 31fc9f87fede778965e8ac5f902ae9106304f449 Author: Yong Wu Date: Tue Nov 3 13:41:59 2020 +0800 dt-bindings: memory: mediatek: Add mt8192 support Add mt8192 smi support in the bindings. Signed-off-by: Yong Wu Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201103054200.21386-3-yong.wu@mediatek.com Signed-off-by: Krzysztof Kozlowski commit 27bb0e42855abe22248800531beefe08e9d69eff Author: Yong Wu Date: Tue Nov 3 13:41:58 2020 +0800 dt-bindings: memory: mediatek: Convert SMI to DT schema Convert MediaTek SMI to DT schema. Signed-off-by: Yong Wu Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201103054200.21386-2-yong.wu@mediatek.com Signed-off-by: Krzysztof Kozlowski commit ed794057b052b52af2c6642bf32e8d21c6fba69c Author: Anitha Chrisanthus Date: Wed Nov 4 17:15:31 2020 -0800 drm/kmb: Build files for KeemBay Display driver v2: Added Maintainer entry v3: Added one more Maintainer entry v3: drop videomode_helpers Cc: Sam Ravnborg Signed-off-by: Anitha Chrisanthus Reviewed-by: Sam Ravnborg Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/1604538931-26726-8-git-send-email-anitha.chrisanthus@intel.com commit 98521f4d4b4cb265374a4b1e13b41287a1960243 Author: Anitha Chrisanthus Date: Wed Nov 4 17:15:30 2020 -0800 drm/kmb: Mipi DSI part of the display driver Initializes Mipi DSI and sets up connects to ADV bridge v2: removed license text upclassed dev_private, removed HAVE_IRQ. (Sam) v3: Squashed all 59 commits to one v4: review changes from Sam Ravnborg renamed dev_p to kmb v5: corrected spellings v6: corrected checkpatch warnings v7: review changes Sam Ravnborg and Thomas Zimmerman removed unnecessary logs and defines and ifdef codes (Sam) split dphy_init_sequence smaller (Sam) removed redundant checks in kmb_dsi (Sam) changed kmb_dsi_init to drm_bridge_connector_init and drm_connector_attach_encoder to bridge's connector (Sam) v8: call drm_bridge_attach with DRM_BRIDGE_ATTACH_NO_CONNECTOR v9: renamed kmb_dsi_hw_init to kmb_dsi_mode_set (Daniel V) v10: changes in driver to accommodate changes in DT to separate DSI entries (Sam R) added comments to clarify empty dsi host functions review changes from Sam to separate out DSI part, removed dependencies on drm side (Sam R) v11: review changes for separate msscam node (Sam R, Neil A) v12: fixed warnings Reported-by: kernel test robot Signed-off-by: Anitha Chrisanthus Reviewed-by: Sam Ravnborg Cc: Sam Ravnborg Cc: Thomas Zimmermann Cc: Daniel Vetter Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/1604538931-26726-7-git-send-email-anitha.chrisanthus@intel.com commit 7f7b96a8a0a185ad8b15ee1cf042f75aa1430c30 Author: Anitha Chrisanthus Date: Wed Nov 4 17:15:29 2020 -0800 drm/kmb: Add support for KeemBay Display This is a basic KMS atomic modesetting display driver for KeemBay family of SOCs. Driver has no 2D or 3D graphics. It calls into the ADV bridge driver at the connector level. Single CRTC with LCD controller->mipi DSI->ADV bridge Only 1080p resolution and single plane is supported at this time. v2: moved extern to .h, removed license text use drm_dev_init, upclassed dev_private, removed HAVE_IRQ.(Sam) v3: Squashed all 59 commits to one v4: review changes from Sam Ravnborg renamed dev_p to kmb moved clocks under kmb_clock, consolidated clk initializations use drmm functions use DRM_GEM_CMA_DRIVER_OPS_VMAP v5: corrected spellings v6: corrected checkpatch warnings v7: review changes Sam Ravnborg and Thomas Zimmerman removed kmb_crtc.h kmb_crtc_cleanup (Thomas) renamed mode_set, kmb_load, inlined unload (Thomas) moved remaining logging to drm_*(Thomas) re-orged driver initialization (Thomas) moved plane_status to drm_private (Sam) removed unnecessary logs and defines and ifdef codes (Sam) call helper_check in plane_atomic_check (Sam) renamed set to get for bpp and format functions(Sam) use drm helper functions for reset, duplicate/destroy state instead of kmb functions (Sam) removed kmb_priv from kmb_plane and removed kmb_plane_state (Sam) v8: get clk_pll0 from display node in dt v9: moved csc_coef_lcd to plane.c (Daniel Vetter) call drm_atomic_helper_shutdown in remove (Daniel V) use drm_crtc_handle_vblank (Daniel V) renamed kmb_dsi_hw_init to kmb_dsi_mode_set (Daniel V) complimentary changes to device tree changes (Rob) v10: call drm_crtc_arm_vblank_event in atomic_flush (Daniel V) moved global vars to kmb_private and added locks (Daniel V) changes in driver to accommodate changes in DT to separate DSI entries (Sam R) review changes to separate mipi DSI (Sam R) v11: review changes to separate msscam (Neil A,Sam R) v12: fixed warnings Reported-by: kernel test robot Signed-off-by: Anitha Chrisanthus Reviewed-by: Sam Ravnborg Cc: Sam Ravnborg Cc: Thomas Zimmermann Cc: Daniel Vetter Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/1604538931-26726-6-git-send-email-anitha.chrisanthus@intel.com commit 1bb8b7fcda88d4814fef4f904e4da5ca2e517f6c Author: Anitha Chrisanthus Date: Wed Nov 4 17:15:28 2020 -0800 drm/kmb: Keem Bay driver register definition Register definitions for Keem Bay display driver v2: removed license text (Sam) v3: Squashed all 59 commits to one v4: review changes from Sam Ravnborg renamed dev_p to kmb v5: corrected spellings v6: corrected checkpatch warnings v7: removed redundant definitions v8: removed redundant definitions, clean up (Sam R) Signed-off-by: Anitha Chrisanthus Reviewed-by: Sam Ravnborg Cc: Sam Ravnborg Cc: Thomas Zimmermann Cc: Daniel Vetter Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/1604538931-26726-5-git-send-email-anitha.chrisanthus@intel.com commit d7e0798925ea9272f8c8e66ceb1f7c51823e50ab Author: Anitha Chrisanthus Date: Wed Nov 4 17:15:27 2020 -0800 dt-bindings: display: bridge: Intel KeemBay DSI This patch adds bindings for Intel KeemBay MIPI DSI v2: corrected description for port Signed-off-by: Anitha Chrisanthus Reviewed-by: Sam Ravnborg Reviewed-by: Neil Armstrong Cc: Sam Ravnborg Cc: Thomas Zimmermann Cc: Daniel Vetter Cc: Rob Herring Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/1604538931-26726-4-git-send-email-anitha.chrisanthus@intel.com commit 24c81b9e8e0b5d4652656d98bbf5d802c43e04ba Author: Anitha Chrisanthus Date: Wed Nov 4 17:15:26 2020 -0800 dt-bindings: display: Intel KeemBay MSSCAM This patch add bindings for Intel KeemBay MSSCAM syscon v2: fixed compatible (Sam R.) Signed-off-by: Anitha Chrisanthus Cc: Sam Ravnborg Cc: Neil Armstrong Cc: Rob Herring Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/1604538931-26726-3-git-send-email-anitha.chrisanthus@intel.com commit 5a76b1ed73b9e7d1a31fd996fb5626edeebc0d29 Author: Anitha Chrisanthus Date: Wed Nov 4 17:15:25 2020 -0800 dt-bindings: display: Add support for Intel KeemBay Display This patch adds bindings for Intel KeemBay Display v2: review changes from Rob Herring v3: review changes from Sam Ravnborg (removed mipi dsi entries, and encoder entry, connect port to dsi) MSSCAM is part of the display submodule and its used to reset LCD and MIPI DSI clocks, so its best to be on this device tree. v4: review changes from Neil Armstrong and Sam - removed msscam entries Signed-off-by: Anitha Chrisanthus Reviewed-by: Sam Ravnborg Cc: Sam Ravnborg Cc: Neil Armstrong Cc: Thomas Zimmermann Cc: Daniel Vetter Cc: Rob Herring Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/1604538931-26726-2-git-send-email-anitha.chrisanthus@intel.com commit 8a24c834c053ef1b0cdefbd9c5bcb487cbc5068f Author: Shengjiu Wang Date: Mon Nov 2 09:52:27 2020 +0800 ASoC: fsl_aud2htx: Add aud2htx module driver The AUD2HTX is a digital module that provides a bridge between the Audio Subsystem and the HDMI RTX Subsystem. This module includes intermediate storage to queue SDMA transactions prior to being synchronized and passed to the HDMI RTX Subsystem over the Audio Link. The AUD2HTX contains a DMA request routed to the SDMA module. This DMA request is controlled based on the watermark level in the 32-entry sample buffer. Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/1604281947-26874-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 40f4c56d08f2a95f4f3b036987f171dde69ddd36 Author: Shengjiu Wang Date: Mon Nov 2 09:52:26 2020 +0800 ASoC: dt-bindings: fsl_aud2htx: Add binding doc for aud2htx module AUD2HTX (Audio Subsystem TO HDMI TX Subsystem) is a new IP module found on i.MX8MP. Signed-off-by: Shengjiu Wang Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1604281947-26874-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 06d65ba3db67618c0afd70a72df516dace49e7e7 Author: Akhil P Oommen Date: Fri Oct 30 16:17:12 2020 +0530 dt-bindings: drm/msm/gpu: Add cooling device support Add cooling device support to gpu. A cooling device is bound to a thermal zone to allow thermal mitigation. Signed-off-by: Akhil P Oommen Reviewed-by: Matthias Kaehlcke Acked-by: Rob Herring Signed-off-by: Rob Clark commit ec793cf01d1fe7f2d3eef30a0accfb3ca880abe4 Author: Akhil P Oommen Date: Fri Oct 30 16:17:10 2020 +0530 drm/msm: Add support for GPU cooling Register GPU as a devfreq cooling device so that it can be passively cooled by the thermal framework. Signed-off-by: Akhil P Oommen Tested-by: Matthias Kaehlcke Signed-off-by: Rob Clark commit 3b20369313a486246582c8ef6ff5d1d0b9c34613 Author: Qiuxu Zhuo Date: Thu Nov 5 15:48:51 2020 +0800 EDAC: Add three new memory types There are {Low-Power DDR3/4, WIO2} types of memory. Add new entries to 'enum mem_type' and new strings to 'edac_mem_types[]' for the new types. Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck commit 94f44f28836de320a318730f4952fde8601f4b58 Author: Vlad Buslov Date: Mon Nov 2 22:12:43 2020 +0200 net: sched: implement action-specific terse dump Allow user to request action terse dump with new flag value TCA_FLAG_TERSE_DUMP. Only output essential action info in terse dump (kind, stats, index and cookie, if set by the user when creating the action). This is different from filter terse dump where index is excluded (filter can be identified by its own handle). Move tcf_action_dump_terse() function to the beginning of source file in order to call it from tcf_dump_walker(). Signed-off-by: Vlad Buslov Suggested-by: Jamal Hadi Salim Acked-by: Cong Wang Link: https://lore.kernel.org/r/20201102201243.287486-1-vlad@buslov.dev Signed-off-by: Jakub Kicinski commit fcc6aa8f3e9695a4dfb6e3c4c3002adba21a2ced Author: Tejas Upadhyay Date: Wed Nov 4 10:36:55 2020 +0530 drm/i915/ehl: Implement W/A 22010492432 As per W/A implemented for TGL to program half of the nominal DCO divider fraction value which is also applicable on EHL. Changes since V2: - Apply stepping B0 till FOREVER - B0 - revid update as per Bspec 29153 Changes since V1: - ehl_ used as to keep earliest platform prefix - WA required B0 stepping onwards Cc: Deak Imre Signed-off-by: Tejas Upadhyay Reviewed-by: Imre Deak Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20201104050655.171185-1-tejaskumarx.surendrakumar.upadhyay@intel.com commit 2c16d291236b50f4af83dcdc687ee405c22ad0d3 Author: Christian König Date: Thu Nov 5 17:06:30 2020 +0100 Revert "mm: mmap: fix fput in error path v2" The kernel test robot is not happy with that. This reverts commit 0227da01f2559626396af5f6c7453360db86c1f6. Signed-off-by: Christian König Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/394772/ commit e40b0b56ffdc16edce207904a7782da6a1a47162 Author: Christian König Date: Thu Nov 5 17:05:35 2020 +0100 Revert "mm: introduce vma_set_file function v4" The kernel test robot is not happy with that. This reverts commit 2b5b95b1ff3d70a95013a45e3b5b90f1daf42348. Signed-off-by: Christian König Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/394773/ commit 00efd65a65968fddd9816315ce190c1fa3bfcd29 Author: Jianxin Xiong Date: Mon Nov 2 19:51:58 2020 -0800 dma-buf: Fix static checker warning Here is the warning message: drivers/dma-buf/dma-buf.c:917 dma_buf_map_attachment() error: 'sg_table' dereferencing possible ERR_PTR() Fix by adding error checking before dereferencing the pointer. Fixes: ac80cd17a615 ("dma-buf: Clarify that dma-buf sg lists are page aligned") Reported-by: Dan Carpenter Signed-off-by: Jianxin Xiong Reviewed-by: Christian König Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/398485/ commit b8f94957765629e6a0d89abb4ff7e06e6565f61f Author: Xu Wang Date: Thu Oct 29 09:01:04 2020 +0000 ASoC: pxa: pxa-ssp: Remove redundant null check before clk_prepare_enable/clk_disable_unprepare ecause clk_prepare_enable() and clk_disable_unprepare() already checked NULL clock parameter, so the additional checks are unnecessary, just remove them. Signed-off-by: Xu Wang Link: https://lore.kernel.org/r/20201029090104.29552-1-vulab@iscas.ac.cn Signed-off-by: Mark Brown commit ec4177c83456b9e84d796ed0bc7656fd922937cb Author: Xu Wang Date: Thu Oct 29 08:41:37 2020 +0000 ASoC: samsung: i2s: Remove redundant null check before clk_disable_unprepare Because clk_disable_unprepare() already checked NULL clock parameter, so the additional check is unnecessary, just remove it. Signed-off-by: Xu Wang Link: https://lore.kernel.org/r/20201029084137.28771-1-vulab@iscas.ac.cn Signed-off-by: Mark Brown commit ee5d28e735082a5676c85bdc578653097e4e29e2 Author: Srinivas Kandagatla Date: Thu Nov 5 11:44:35 2020 +0000 ASoC: q6afe-clocks: fix warning on symbol scope This patch fixes below warning when module is compiled with W=1 C=1 sound/soc/qcom/qdsp6/q6afe-clocks.c:122:18: warning: symbol 'q6afe_clks' was not declared. Should it be static? Fixes: 520a1c396d196 ("ASoC: q6afe-clocks: add q6afe clock controller") Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20201105114435.22860-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 4c22b80f61540ea99d9b4af0127315338755f05b Author: Cezary Rojewski Date: Mon Oct 26 11:01:29 2020 +0100 ASoC: pcm: DRAIN support reactivation soc-pcm's dpcm_fe_dai_do_trigger() supported DRAIN commnad up to kernel v5.4 where explicit switch(cmd) has been introduced which takes into account all SNDRV_PCM_TRIGGER_xxx but SNDRV_PCM_TRIGGER_DRAIN. Update switch statement to reactive support for it. As DRAIN is somewhat unique by lacking negative/stop counterpart, bring behaviour of dpcm_fe_dai_do_trigger() for said command back to its pre-v5.4 state by adding it to START/RESUME/PAUSE_RELEASE group. Fixes: acbf27746ecf ("ASoC: pcm: update FE/BE trigger order based on the command") Signed-off-by: Cezary Rojewski Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20201026100129.8216-1-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit df3d6390fa0ad48eecbe0b48acb4d364a70cd378 Author: Zou Wei Date: Thu Nov 5 20:28:07 2020 +0800 ASoC: mediatek: mt8192: Make some symbols static Fix the following sparse warnings: ./mt8192-dai-i2s.c:2040:5: warning: symbol 'mt8192_dai_i2s_get_share' was not declared. Should it be static? ./mt8192-dai-i2s.c:2060:5: warning: symbol 'mt8192_dai_i2s_set_priv' was not declared. Should it be static? ./mt8192-afe-gpio.c:15:16: warning: symbol 'aud_pinctrl' was not declared. Should it be static? ./mt8192-afe-pcm.c:70:5: warning: symbol 'mt8192_get_memif_pbuf_size' was not declared. Should it be static? ./mt8192-afe-pcm.c:2137:39: warning: symbol 'mt8192_afe_component' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: Zou Wei Acked-by: Jiaxin Yu Link: https://lore.kernel.org/r/1604579287-25251-1-git-send-email-zou_wei@huawei.com Signed-off-by: Mark Brown commit 8bfe8c967546dc05385b52bac49ad972fea5887c Author: Sudip Mukherjee Date: Thu Nov 5 12:47:47 2020 +0000 ASoC: mediatek: mt8192: Fix build failure A build of arm64 allmodconfig with next-20201105 fails with the error: ERROR: modpost: "mt8192_afe_gpio_request" undefined! ERROR: modpost: "mt8192_afe_gpio_init" undefined! Export the symbols so that mt8192-mt6359-rt1015-rt5682.ko finds it. Signed-off-by: Sudip Mukherjee Link: https://lore.kernel.org/r/20201105124747.18383-1-sudipm.mukherjee@gmail.com Signed-off-by: Mark Brown commit 20f64a1db8a06fdf4ed03375546f8d3555cb6cc9 Author: Srinivas Kandagatla Date: Thu Nov 5 11:41:00 2020 +0000 ASoC: qcom: lpass-cpu: fix warning on symbol scope This patch fixes below warning when module is compiled with W=1 C=1 lpass-cpu.c:677:22: warning: symbol 'lpass_hdmi_regmap_config' was not declared. Should it be static? Fixes: 7cb37b7bd0d3 ("ASoC: qcom: Add support for lpass hdmi driver") Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20201105114100.18647-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit a4da45dda6475816f4c8b9e0d512261991ba31e5 Author: Geert Uytterhoeven Date: Wed Oct 28 15:51:17 2020 +0100 pinctrl: Remove hole in pinctrl_gpio_range On 64-bit platforms, pointer size and alignment are 64-bit, hence two 4-byte holes are present before the pins and gc members of the pinctrl_gpio_range structure. Get rid of these holes by moving the pins pointer. This reduces kernel size of an arm64 Rockchip kernel by ca. 512 bytes. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201028145117.1731876-1-geert+renesas@glider.be Signed-off-by: Linus Walleij commit b507cb92477ad85902783a183c5ce01d16296687 Author: He Zhe Date: Wed Oct 28 18:39:21 2020 +0800 pinctrl: core: Add missing #ifdef CONFIG_GPIOLIB To fix the following build warnings when CONFIG_GPIOLIB=n. drivers/pinctrl/core.c:1607:20: warning: unused variable 'chip' [-Wunused-variable] 1608 | struct gpio_chip *chip; | ^~~~ drivers/pinctrl/core.c:1606:15: warning: unused variable 'gpio_num' [-Wunused-variable] 1607 | unsigned int gpio_num; | ^~~~~~~~ drivers/pinctrl/core.c:1605:29: warning: unused variable 'range' [-Wunused-variable] 1606 | struct pinctrl_gpio_range *range; | ^~~~~ Fixes: f1b206cf7c57 ("pinctrl: core: print gpio in pins debugfs file") Signed-off-by: He Zhe Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201028103921.22486-1-zhe.he@windriver.com Signed-off-by: Linus Walleij commit 9c65441ec823c7889fc3cd1f00208401cf7044d8 Author: Kevin Hilman Date: Mon Oct 26 11:30:25 2020 -0700 pinctrl/meson: enable building as modules Enable pinctrl drivers for 64-bit Amlogic SoCs to be built as modules. The default is still built-in, this only adds the option of building as modules. Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20201026183025.31768-1-khilman@baylibre.com Signed-off-by: Linus Walleij commit 66186acbd94c4fdd43012a1f075ca381ada56150 Author: José Roberto de Souza Date: Mon Nov 2 14:10:48 2020 -0800 drm/i915/display: Use initial_fastset_check() to compute and apply the initial PSR state Replace the previous approach to force compute the initial PSR state after i915 take over from firmware by the better and recently added initial_fastset_check() hook. Cc: Imre Deak Signed-off-by: José Roberto de Souza Reviewed-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20201102221048.104294-1-jose.souza@intel.com commit 8d1ddb5e79374fb277985a6b3faa2ed8631c5b4c Author: Boqun Feng Date: Thu Nov 5 14:23:51 2020 +0800 fcntl: Fix potential deadlock in send_sig{io, urg}() Syzbot reports a potential deadlock found by the newly added recursive read deadlock detection in lockdep: [...] ======================================================== [...] WARNING: possible irq lock inversion dependency detected [...] 5.9.0-rc2-syzkaller #0 Not tainted [...] -------------------------------------------------------- [...] syz-executor.1/10214 just changed the state of lock: [...] ffff88811f506338 (&f->f_owner.lock){.+..}-{2:2}, at: send_sigurg+0x1d/0x200 [...] but this lock was taken by another, HARDIRQ-safe lock in the past: [...] (&dev->event_lock){-...}-{2:2} [...] [...] [...] and interrupts could create inverse lock ordering between them. [...] [...] [...] other info that might help us debug this: [...] Chain exists of: [...] &dev->event_lock --> &new->fa_lock --> &f->f_owner.lock [...] [...] Possible interrupt unsafe locking scenario: [...] [...] CPU0 CPU1 [...] ---- ---- [...] lock(&f->f_owner.lock); [...] local_irq_disable(); [...] lock(&dev->event_lock); [...] lock(&new->fa_lock); [...] [...] lock(&dev->event_lock); [...] [...] *** DEADLOCK *** The corresponding deadlock case is as followed: CPU 0 CPU 1 CPU 2 read_lock(&fown->lock); spin_lock_irqsave(&dev->event_lock, ...) write_lock_irq(&filp->f_owner.lock); // wait for the lock read_lock(&fown-lock); // have to wait until the writer release // due to the fairness spin_lock_irqsave(&dev->event_lock); // wait for the lock The lock dependency on CPU 1 happens if there exists a call sequence: input_inject_event(): spin_lock_irqsave(&dev->event_lock,...); input_handle_event(): input_pass_values(): input_to_handler(): handler->event(): // evdev_event() evdev_pass_values(): spin_lock(&client->buffer_lock); __pass_event(): kill_fasync(): kill_fasync_rcu(): read_lock(&fa->fa_lock); send_sigio(): read_lock(&fown->lock); To fix this, make the reader in send_sigurg() and send_sigio() use read_lock_irqsave() and read_lock_irqrestore(). Reported-by: syzbot+22e87cdf94021b984aa6@syzkaller.appspotmail.com Reported-by: syzbot+c5e32344981ad9f33750@syzkaller.appspotmail.com Signed-off-by: Boqun Feng Signed-off-by: Jeff Layton commit 2b5b95b1ff3d70a95013a45e3b5b90f1daf42348 Author: Christian König Date: Mon Sep 14 15:09:33 2020 +0200 mm: introduce vma_set_file function v4 Add the new vma_set_file() function to allow changing vma->vm_file with the necessary refcount dance. v2: add more users of this. v3: add missing EXPORT_SYMBOL, rebase on mmap cleanup, add comments why we drop the reference on two occasions. v4: make it clear that changing an anonymous vma is illegal. Signed-off-by: Christian König Reviewed-by: Daniel Vetter (v2) Reviewed-by: Jason Gunthorpe Link: https://patchwork.freedesktop.org/patch/394773/ commit 0227da01f2559626396af5f6c7453360db86c1f6 Author: Christian König Date: Fri Oct 9 15:08:55 2020 +0200 mm: mmap: fix fput in error path v2 Patch "495c10cc1c0c CHROMIUM: dma-buf: restore args..." adds a workaround for a bug in mmap_region. As the comment states ->mmap() callback can change vma->vm_file and so we might call fput() on the wrong file. Revert the workaround and proper fix this in mmap_region. v2: drop the extra if in dma_buf_mmap as well Signed-off-by: Christian König Reviewed-by: Jason Gunthorpe Link: https://patchwork.freedesktop.org/patch/394772/ commit ea86f3defd55f141a44146e66cbf8ffb683d60da Author: Sergey Senozhatsky Date: Thu Nov 5 10:47:44 2020 +0900 drm/virtio: use kvmalloc for large allocations We observed that some of virtio_gpu_object_shmem_init() allocations can be rather costly - order 6 - which can be difficult to fulfill under memory pressure conditions. Switch to kvmalloc_array() in virtio_gpu_object_shmem_init() and let the kernel vmalloc the entries array. Signed-off-by: Sergey Senozhatsky Link: http://patchwork.freedesktop.org/patch/msgid/20201105014744.1662226-1-senozhatsky@chromium.org Signed-off-by: Gerd Hoffmann commit 976843d5e8203829adb99bc40bc6f556997881c8 Author: Ondrej Jirman Date: Wed Nov 4 23:41:35 2020 -0600 arm64: dts: allwinner: pinephone: Add Bluetooth support The PinePhone has a Realtek rtl8723cs Bluetooth controller. Signed-off-by: Ondrej Jirman Signed-off-by: Samuel Holland Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20201105054135.24860-7-samuel@sholland.org commit 4fcf6f34879908a67454d3cdcf0f6b593947f96d Author: Ondrej Jirman Date: Wed Nov 4 23:41:34 2020 -0600 arm64: dts: allwinner: pinephone: Add WiFi support The PinePhone has a Realtek rtl8723cs WiFi module. On mainboard revisions 1.0 and 1.1, the reset input is always pulled high, so no power sequence is needed. On mainboard revision 1.2, the reset input is connected to PL2. Signed-off-by: Ondrej Jirman Signed-off-by: Samuel Holland Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20201105054135.24860-6-samuel@sholland.org commit a966ef6297dd6829714ba5f6abd9ab2d67f8a935 Author: Ondrej Jirman Date: Wed Nov 4 23:41:33 2020 -0600 arm64: dts: allwinner: pinephone: Add light/proximity sensor Pinephone has STK3311-X proximity sensor. Add support for it. Signed-off-by: Ondrej Jirman Signed-off-by: Samuel Holland Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20201105054135.24860-5-samuel@sholland.org commit 085d96b88403edfc0a8ee340b7e6122c34f039c2 Author: Luca Weiss Date: Wed Nov 4 23:41:32 2020 -0600 arm64: dts: allwinner: pinephone: Add LED flash All revisions of the PinePhone have an SGM3140 LED flash. The gpios were swapped on v1.0 of the board, but this was fixed in later revisions. Signed-off-by: Luca Weiss Signed-off-by: Samuel Holland Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20201105054135.24860-4-samuel@sholland.org commit 3cf9bf3b25505d8e2a0366c35b0af6b48e7a3c40 Author: Samuel Holland Date: Wed Nov 4 23:41:31 2020 -0600 arm64: dts: allwinner: pinephone: Set ALDO3 to exactly 3v0 ALDO3 is used as the power supply for the LRADC keys voltage divider, in addition to supplying AVCC and VCC-PLL. While AVCC and VCC-PLL will accept any voltage between 2v7 and 3v3, LRADC needs a precise 3v0 input to maintain the expected 2:3 ratio between the internal 2v0 reference voltage and the external supply. Signed-off-by: Samuel Holland Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20201105054135.24860-3-samuel@sholland.org commit 37f7a7b68004807d230fedcf090b09ea501086a9 Author: Samuel Holland Date: Wed Nov 4 23:41:30 2020 -0600 arm64: dts: allwinner: pinephone: Remove AC power supply The AXP803 in the Pinephone has its ACIN and VBUS pins shorted together. In this configuration, the VBUS control registers take priority over the ACIN control registers, which means the ACIN sysfs knobs have no effect. Remove the AC power supply from the DTS, since VBUS is really the only power supply. Signed-off-by: Samuel Holland Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20201105054135.24860-2-samuel@sholland.org commit f3f0e410c6a848c8f5b2715167eaa31c407cfb70 Author: Simon Ser Date: Wed Nov 4 17:01:40 2020 +0000 drm: document that blobs are ref'counted User-space doesn't need to keep track of blobs that might be in use by the kernel. User-space can just destroy blobs as soon as they don't need them anymore. Signed-off-by: Simon Ser Signed-off-by: Daniel Stone Reviewed-by: Jonas Ådahl Reviewed-by: Pekka Paalanen Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/wgav99DTGfubfVPiurrydQEiyufYpxlJQZ0wJMWYBQ@cp7-web-042.plabs.ch commit 5f8f965287494d55e8ba3551e3727a5e9d0eb702 Merge: ba8a5cb234ba3 e047c7be173ca Author: Jani Nikula Date: Thu Nov 5 10:25:17 2020 +0200 Merge drm/drm-next into drm-intel-next-queued Catch up with v5.10-rc2 and drm-misc-next. Signed-off-by: Jani Nikula commit 975323ab8f116667676c30ca3502a6757bd89e8d Author: Johan Hovold Date: Wed Nov 4 17:47:27 2020 +0100 USB: serial: mos7720: fix parallel-port state restore The parallel-port restore operations is called when a driver claims the port and is supposed to restore the provided state (e.g. saved when releasing the port). Fixes: b69578df7e98 ("USB: usbserial: mos7720: add support for parallel port on moschip 7715") Cc: stable # 2.6.35 Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 151f1b664ffbb847c7fbbce5a5b8580f1b9b1d98 Author: Adrian Hunter Date: Tue Nov 3 16:14:03 2020 +0200 scsi: ufs: Allow an error return value from ->device_reset() It is simpler for drivers to provide a ->device_reset() callback irrespective of whether the GPIO, or firmware interface necessary to do the reset, is discovered during probe. Change ->device_reset() to return an error code. Drivers that provide the callback, but do not do the reset operation should return -EOPNOTSUPP. Link: https://lore.kernel.org/r/20201103141403.2142-3-adrian.hunter@intel.com Reviewed-by: Asutosh Das Reviewed-by: Stanley Chu Reviewed-by: Bean huo Reviewed-by: Can Guo Signed-off-by: Adrian Hunter Signed-off-by: Martin K. Petersen commit fe1d4c2ebcae994dffe8673cc3cba10102d15d11 Author: Adrian Hunter Date: Tue Nov 3 16:14:02 2020 +0200 scsi: ufs: Add DeepSleep feature DeepSleep is a UFS v3.1 feature that achieves the lowest power consumption of the device, apart from power off. In DeepSleep mode, no commands are accepted, and the only way to exit is using a hardware reset or power cycle. This patch assumes that if a power cycle was an option, then power off would be preferable, so only exit via a hardware reset is supported. Drivers that wish to support DeepSleep need to set a new capability flag UFSHCD_CAP_DEEPSLEEP and provide a hardware reset via the existing ->device_reset() callback. It is assumed that UFS devices with wspecversion >= 0x310 support DeepSleep. [mkp: dropped sysfs ABI doc due to conflicts] Link: https://lore.kernel.org/r/20201103141403.2142-2-adrian.hunter@intel.com Reviewed-by: Bean Huo Reviewed-by: Asutosh Das Reviewed-by: Stanley Chu Reviewed-by: Can Guo Acked-by: Jonathan Corbet Acked-by: Suzuki K Poulose Signed-off-by: Adrian Hunter Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman Signed-off-by: Martin K. Petersen commit 1f889b58716a5f5e3e4fe0e6742c1a4472f29ac1 Author: yuuzheng Date: Mon Nov 2 22:25:28 2020 +0530 scsi: pm80xx: Fix pm8001_mpi_get_nvmd_resp() race condition A use-after-free or null-pointer error occurs when the 251-byte response data is copied from IOMB buffer to response message buffer in function pm8001_mpi_get_nvmd_resp(). After sending the command get_nvmd_data(), the caller begins to sleep by calling wait_for_complete() and waits for the wake-up from calling complete() in pm8001_mpi_get_nvmd_resp(). Due to unexpected events (e.g., interrupt), if response buffer gets freed before memcpy(), a use-after-free error will occur. To fix this, the complete() should be called after memcpy(). Link: https://lore.kernel.org/r/20201102165528.26510-5-Viswas.G@microchip.com.com Acked-by: Jack Wang Signed-off-by: yuuzheng Signed-off-by: Viswas G Signed-off-by: Ruksar Devadi Signed-off-by: Radha Ramachandran Signed-off-by: Martin K. Petersen commit 48cd6b38eb4f2874f091c4776ea1c26e7e4f967e Author: akshatzen Date: Mon Nov 2 22:25:27 2020 +0530 scsi: pm80xx: Avoid busywait in FW ready check In function check_fw_ready() we busy wait using udelay. The CPU is not released and we see need_resched failures. Busy waiting is not necessary since we are in process context and we can sleep instead. Replace udelay with msleep of 20 ms intervals while waiting for firmware to become ready. It has been verified that check_fw_ready is not being used in interrupt context anywhere, hence it is safe to make this change. Link: https://lore.kernel.org/r/20201102165528.26510-4-Viswas.G@microchip.com.com Acked-by: Jack Wang Signed-off-by: akshatzen Signed-off-by: Viswas G Signed-off-by: Ruksar Devadi Signed-off-by: Radha Ramachandran Signed-off-by: Martin K. Petersen commit 4a2efd4b89fcaa6e9a7b4ce49a441afaacba00ea Author: Viswas G Date: Mon Nov 2 22:25:26 2020 +0530 scsi: pm80xx: Make running_req atomic Incorrect value of the running_req was causing the driver unload to be stuck during the SAS lldd_dev_gone notification handling. During SATA I/O completion, for some error status values, the driver schedules the event handler and running_req is decremented from that. However, there are some other error status values (like IO_DS_IN_RECOVERY, IO_XFER_ERR_LAST_PIO_DATAIN_CRC_ERR) where the I/O has already been completed by fw/driver so running_req is not decremented. Also during NCQ error handling, driver itself will initiate READ_LOG_EXT and ABORT_ALL. When libsas/libata initiate READ_LOG_EXT (0x2F), driver increments running_req. This will be completed by the driver in pm80xx_chip_sata_req(), but running_req was not decremented. Link: https://lore.kernel.org/r/20201102165528.26510-3-Viswas.G@microchip.com.com Acked-by: Jack Wang Signed-off-by: Viswas G Signed-off-by: Ruksar Devadi Signed-off-by: Martin K. Petersen commit 7640e1eb8c5de33dafa6c68fd4389214ff9ec1f9 Author: peter chang Date: Mon Nov 2 22:25:25 2020 +0530 scsi: pm80xx: Make mpi_build_cmd locking consistent Driver submits all internal requests (like abort_task, event acknowledgment etc.) through inbound queue 0. While submitting those, driver does not acquire any lock and this may lead to a race when there is an I/O request coming in on CPU0 and submitted through inbound queue 0. To avoid this, lock acquisition has been moved to pm8001_mpi_build_cmd(). All command submission will go through this path. Link: https://lore.kernel.org/r/20201102165528.26510-2-Viswas.G@microchip.com.com Acked-by: Jack Wang Signed-off-by: peter chang Signed-off-by: Viswas G Signed-off-by: Ruksar Devadi Signed-off-by: Radha Ramachandran Signed-off-by: Martin K. Petersen commit 94a0dfcf7d33ea96bf3eb0c33e4239942a4ff087 Author: Mike Christie Date: Sun Nov 1 12:59:34 2020 -0600 scsi: tcm_loop: Allow queues, can_queue and cmd_per_lun to be settable Make can_queue, nr_hw_queues and cmd_per_lun settable by the user instead of hard coding them. Link: https://lore.kernel.org/r/1604257174-4524-9-git-send-email-michael.christie@oracle.com Reviewed-by: Himanshu Madhani Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 1526d9f10c6184031e42afad0adbdde1213e8ad1 Author: Mike Christie Date: Sun Nov 1 12:59:33 2020 -0600 scsi: target: Make state_list per CPU Do a state_list/execute_task_lock per CPU, so we can do submissions from different CPUs without contention with each other. Note: tcm_fc was passing TARGET_SCF_USE_CPUID, but never set cpuid. The assumption is that it wanted to set the cpuid to the CPU it was submitting from so it will get this behavior with this patch. [mkp: s/printk/pr_err/ + resolve COMPARE AND WRITE patch conflict] Link: https://lore.kernel.org/r/1604257174-4524-8-git-send-email-michael.christie@oracle.com Reviewed-by: Himanshu Madhani Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 6f55b06f9b0722607cbac2140875d790395435f2 Author: Mike Christie Date: Sun Nov 1 12:59:32 2020 -0600 scsi: target: Drop sess_cmd_lock from I/O path Drop the sess_cmd_lock by: - Removing the sess_cmd_list use from LIO core, because it's been moved to qla2xxx. - Removing sess_tearing_down check in the I/O path. Instead of using that bit and the sess_cmd_lock, we rely on the cmd_count percpu ref. To do this we switch to percpu_ref_kill_and_confirm/percpu_ref_tryget_live. Link: https://lore.kernel.org/r/1604257174-4524-7-git-send-email-michael.christie@oracle.com Reviewed-by: Himanshu Madhani Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 605e74025f953b995a3a241ead43bde71c1c99b5 Author: Mike Christie Date: Sun Nov 1 12:59:31 2020 -0600 scsi: qla2xxx: Move sess cmd list/lock to driver Except for debug output in the shutdown path, tcm_qla2xxx is the only driver using the se_session sess_cmd_list. Move the list to that driver to facilitate removing the sess_cmd_lock from the main I/O path for the rest of the drivers. Link: https://lore.kernel.org/r/1604257174-4524-6-git-send-email-michael.christie@oracle.com Cc: Nilesh Javali Reviewed-by: Himanshu Madhani Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 27b0efd15d5247ada0c2ed9cbc77fd3fb3b1f26d Author: Mike Christie Date: Sun Nov 1 12:59:30 2020 -0600 scsi: target: Remove TARGET_SCF_LOOKUP_LUN_FROM_TAG TARGET_SCF_LOOKUP_LUN_FROM_TAG is no longer used so remove it. Link: https://lore.kernel.org/r/1604257174-4524-5-git-send-email-michael.christie@oracle.com Reviewed-by: Himanshu Madhani Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 8f394da36a361cbe0e1e8b1d4213e5598c8095ac Author: Mike Christie Date: Sun Nov 1 12:59:29 2020 -0600 scsi: qla2xxx: Drop TARGET_SCF_LOOKUP_LUN_FROM_TAG Only the __qlt_24xx_handle_abts() code path does not know the LUN for an abort and it uses the TARGET_SCF_LOOKUP_LUN_FROM_TAG flag to have LIO core look it up. LIO uses target_lookup_lun_from_tag to go from cmd tag to LUN for the driver. However, qla2xxx has a tcm_qla2xxx_find_cmd_by_tag() which does almost the same thing as the LIO helper (it finds the cmd but does not return the LUN). This patch has qla2xxx use its internal helper. Link: https://lore.kernel.org/r/1604257174-4524-4-git-send-email-michael.christie@oracle.com Cc: Nilesh Javali Reviewed-by: Himanshu Madhani Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 02dd4914b0bcb8fd8f8cad9817f5715a17466261 Author: Mike Christie Date: Sun Nov 1 12:59:28 2020 -0600 scsi: target: Fix cmd_count ref leak percpu_ref_init sets the refcount to 1 and percpu_ref_kill drops it. Drivers like iSCSI and loop do not call target_sess_cmd_list_set_waiting during session shutdown, though, so they have been calling percpu_ref_exit with a refcount still taken and leaking the cmd_counts memory. Link: https://lore.kernel.org/r/1604257174-4524-3-git-send-email-michael.christie@oracle.com Reviewed-by: Himanshu Madhani Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit a2b5d6f975a499bd50919a409c6a7c4cbf9d8a58 Author: Mike Christie Date: Sun Nov 1 12:59:27 2020 -0600 scsi: target: Fix LUN ref count handling Fix two bugs in the LUN refcounting: 1. For the TCM_WRITE_PROTECTED case we were returning an error after taking a ref to the LUN, but never dropping it (caller just send status and drops cmd ref). 2. We still need to do a percpu_ref_tryget_live for the virt LUN 0 like we do for other LUNs, because the TPG code does the refcount/wait process like it does with other LUNs. Link: https://lore.kernel.org/r/1604257174-4524-2-git-send-email-michael.christie@oracle.com Reviewed-by: Himanshu Madhani Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 00c00807a11002f56ca5d87463ac892c794f122f Author: Tom Rix Date: Sun Nov 1 06:40:17 2020 -0800 scsi: fcoe: Remove unneeded semicolon A semicolon is not needed after a switch statement. Link: https://lore.kernel.org/r/20201101144017.2284047-1-trix@redhat.com Signed-off-by: Tom Rix Signed-off-by: Martin K. Petersen commit 4a9435b7b04ed8bb39e2c563d93b522bc226b16f Author: Tom Rix Date: Sun Nov 1 06:38:12 2020 -0800 scsi: bnx2fc: Remove unneeded semicolon A semicolon is not needed after a switch statement. Link: https://lore.kernel.org/r/20201101143812.2283642-1-trix@redhat.com Reviewed-by: Saurav Kashyap Signed-off-by: Tom Rix Signed-off-by: Martin K. Petersen commit 749c226cf56ed47ae76c57b2f7f6b8f01b5797c4 Author: David Disseldorp Date: Sun Nov 1 00:32:11 2020 +0100 scsi: target: Return COMPARE AND WRITE miscompare offsets SBC-4 r15 5.3 COMPARE AND WRITE command states: if the compare operation does not indicate a match, then terminate the command with CHECK CONDITION status with the sense key set to MISCOMPARE and the additional sense code set to MISCOMPARE DURING VERIFY OPERATION. In the sense data (see 4.18 and SPC-5) the offset from the start of the Data-Out Buffer to the first byte of data that was not equal shall be reported in the INFORMATION field. This change implements the missing logic to report the miscompare offset in the sense data INFORMATION field. As an optimization, byte-by-byte miscompare offset calculation is only performed after memcmp() mismatch. Link: https://lore.kernel.org/r/20201031233211.5207-5-ddiss@suse.de Signed-off-by: David Disseldorp Signed-off-by: Martin K. Petersen commit ab628b9fc8c231655e52ed2b4a50758a633a2c63 Author: David Disseldorp Date: Sun Nov 1 00:32:10 2020 +0100 scsi: target: Split out COMPARE AND WRITE memcmp into helper In preparation for finding and returning the miscompare offset. Link: https://lore.kernel.org/r/20201031233211.5207-4-ddiss@suse.de Reviewed-by: Mike Christie Signed-off-by: David Disseldorp Signed-off-by: Martin K. Petersen commit 8dd992fb67f33a0777fb4bee1e22a5ee5530f024 Author: David Disseldorp Date: Sun Nov 1 00:32:09 2020 +0100 scsi: target: Rename cmd.bad_sector to cmd.sense_info cmd.bad_sector currently gets packed into the sense INFORMATION field for TCM_LOGICAL_BLOCK_{GUARD,APP_TAG,REF_TAG}_CHECK_FAILED errors, which carry an .add_sector_info flag in the sense_detail_table to ensure this. In preparation for propagating a byte offset on COMPARE AND WRITE TCM_MISCOMPARE_VERIFY error, rename cmd.bad_sector to cmd.sense_info and sense_detail.add_sector_info to sense_detail.add_sense_info so that it better reflects the sense INFORMATION field destination. [ddiss: update previously overlooked ib_isert] Link: https://lore.kernel.org/r/20201031233211.5207-3-ddiss@suse.de Reviewed-by: Mike Christie Signed-off-by: David Disseldorp Signed-off-by: Martin K. Petersen commit b455233dcc403e3eb955a642dd69b6676e12b245 Author: David Disseldorp Date: Sun Nov 1 00:32:08 2020 +0100 scsi: target: Rename struct sense_info to sense_detail This helps distinguish it from the SCSI sense INFORMATION field. Link: https://lore.kernel.org/r/20201031233211.5207-2-ddiss@suse.de Reviewed-by: Mike Christie Signed-off-by: David Disseldorp Signed-off-by: Martin K. Petersen commit bba84aeccafb57f3f175bbab0658a7facd611d18 Author: Arnd Bergmann Date: Fri Oct 30 17:44:21 2020 +0100 scsi: megaraid_sas: Simplify compat_ioctl handling There have been several attempts to fix serious problems in the compat handling in megasas_mgmt_compat_ioctl_fw(), and it also uses the compat_alloc_user_space() function. Folding the compat handling into the regular ioctl function with in_compat_syscall() simplifies it a lot and avoids some of the remaining problems: - missing handling of unaligned pointers - overflowing the ioc->frame.raw array from invalid input - compat_alloc_user_space() Link: https://lore.kernel.org/r/20201030164450.1253641-3-arnd@kernel.org Reviewed-by: Christoph Hellwig Signed-off-by: Arnd Bergmann Signed-off-by: Martin K. Petersen commit 381d34e376e3d9d27730fda8a0e870600e6c8196 Author: Arnd Bergmann Date: Fri Oct 30 17:44:20 2020 +0100 scsi: megaraid_sas: Check user-provided offsets It sounds unwise to let user space pass an unchecked 32-bit offset into a kernel structure in an ioctl. This is an unsigned variable, so checking the upper bound for the size of the structure it points into is sufficient to avoid data corruption, but as the pointer might also be unaligned, it has to be written carefully as well. While I stumbled over this problem by reading the code, I did not continue checking the function for further problems like it. Link: https://lore.kernel.org/r/20201030164450.1253641-2-arnd@kernel.org Fixes: c4a3e0a529ab ("[SCSI] MegaRAID SAS RAID: new driver") Cc: # v2.6.15+ Reviewed-by: Christoph Hellwig Signed-off-by: Arnd Bergmann Signed-off-by: Martin K. Petersen commit 077054215a7f787e389a807ece8a39247abbbc1e Author: Arnd Bergmann Date: Fri Oct 30 17:44:19 2020 +0100 scsi: aacraid: Improve compat_ioctl handlers The use of compat_alloc_user_space() can be easily replaced by handling compat arguments in the regular handler, and this will make it work for big-endian kernels as well, which at the moment get an invalid indirect pointer argument. Calling aac_ioctl() instead of aac_compat_do_ioctl() means the compat and native code paths behave the same way again, which they stopped when the adapter health check was added only in the native function. Link: https://lore.kernel.org/r/20201030164450.1253641-1-arnd@kernel.org Fixes: 572ee53a9bad ("scsi: aacraid: check adapter health") Reviewed-by: Christoph Hellwig Signed-off-by: Arnd Bergmann Signed-off-by: Martin K. Petersen commit 794aa56a78052d195641b1ce43e5538574bedf41 Author: Srinivas Kandagatla Date: Mon Oct 26 12:02:21 2020 +0000 clk: qcom: Add support to LPASS AON_CC Glitch Free Mux clocks LPASS Always ON Clock controller has one GFM mux to control VA and TX clocks to codec macro on LPASS. This patch adds support to this mux. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20201026120221.18984-5-srinivas.kandagatla@linaro.org Signed-off-by: Stephen Boyd commit a2d8f507803ee858c718b2a8d54c00ac9c5c5f09 Author: Srinivas Kandagatla Date: Mon Oct 26 12:02:20 2020 +0000 clk: qcom: Add support to LPASS AUDIO_CC Glitch Free Mux clocks GFM Muxes in AUDIO_CC control clocks to LPASS WSA and RX Codec Macros. This patch adds support to these muxes. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20201026120221.18984-4-srinivas.kandagatla@linaro.org Signed-off-by: Stephen Boyd commit 7dbe5a7a3f990d642a3166b5d161db429d9f7271 Author: Srinivas Kandagatla Date: Mon Oct 26 12:02:19 2020 +0000 dt-bindings: clock: Add support for LPASS Always ON Controller Always ON Clock controller is a block inside LPASS which controls 1 Glitch free muxes to LPASS codec Macros. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20201026120221.18984-3-srinivas.kandagatla@linaro.org Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd commit a6dee2fe778b9f79f75bfc203945ace79172623e Author: Srinivas Kandagatla Date: Mon Oct 26 12:02:18 2020 +0000 dt-bindings: clock: Add support for LPASS Audio Clock Controller Audio Clock controller is a block inside LPASS which controls 2 Glitch free muxes to LPASS codec Macros. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20201026120221.18984-2-srinivas.kandagatla@linaro.org Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd commit 4ee9fe3e292bafc915872fce5eacd2c185d7711f Author: Douglas Anderson Date: Mon Oct 19 15:49:35 2020 -0700 clk: qcom: lpass-sc7180: Disentangle the two clock devices The sc7180 lpass clock driver manages two different devices. These two devices were tangled together, using one probe and a lookup to figure out the real probe. I think it's cleaner to really separate the probe for these two devices since they're really different things, just both managed by the same driver. Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20201019154857.v5.2.I75c409497d4dea9daefa53ec5f93824081c4ecbe@changeid Reviewed-by: Taniya Das Signed-off-by: Stephen Boyd commit 7635622b77b53985d816b7f7c1a04e718c9db814 Author: Douglas Anderson Date: Mon Oct 19 15:49:34 2020 -0700 clk: qcom: lpasscc-sc7810: Use devm in probe Let's convert the lpass clock control driver to use devm. This is a few more lines of code, but it will be useful in a later patch which disentangles the two devices handled by this driver. Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20201019154857.v5.1.I4567b5e7e17bbb15ef063d447cb83fd43746cb18@changeid Signed-off-by: Stephen Boyd commit 15d09e830bbc16880840ac8b01941465602807f4 Author: Taniya Das Date: Sat Oct 17 00:13:35 2020 +0530 clk: qcom: camcc: Add camera clock controller driver for SC7180 Add support for the camera clock controller found on SC7180 based devices. This would allow camera drivers to probe and control their clocks. Signed-off-by: Taniya Das Link: https://lore.kernel.org/r/1602873815-1677-5-git-send-email-tdas@codeaurora.org [sboyd@kernel.org: Mark hw array static, add UL to big vco numbers] Signed-off-by: Stephen Boyd commit 57b971907eb07fbc8917f9f7a2df37da6304a296 Author: Taniya Das Date: Sat Oct 17 00:13:34 2020 +0530 dt-bindings: clock: Add YAML schemas for the QCOM Camera clock bindings. The Camera Subsystem clock provider have a bunch of generic properties that are needed in a device tree. Add a YAML schemas for those. Add clock ids for camera clocks which are required to bring the camera subsystem out of reset. Signed-off-by: Taniya Das Link: https://lore.kernel.org/r/1602873815-1677-4-git-send-email-tdas@codeaurora.org Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd commit a2b57943a570a69679abf82e1de01c806db084d1 Author: Taniya Das Date: Sat Oct 17 00:13:33 2020 +0530 clk: qcom: clk-alpha-pll: Add support for controlling Agera PLLs Add programming sequence support for managing the Agera PLLs. Signed-off-by: Taniya Das Link: https://lore.kernel.org/r/1602873815-1677-3-git-send-email-tdas@codeaurora.org Signed-off-by: Stephen Boyd commit 61a31292002b85529021a46e6288b29caf674fbe Author: Taniya Das Date: Sat Oct 17 00:13:32 2020 +0530 clk: qcom: clk-alpha-pll: Add support for helper functions Introduce clk_alpha_pll_write_config and alpha_pll_check_rate_margin helper functions to be across PLL configure functions and PLL set rate functions. Signed-off-by: Taniya Das Link: https://lore.kernel.org/r/1602873815-1677-2-git-send-email-tdas@codeaurora.org Signed-off-by: Stephen Boyd commit b65ca4c3887589a55f6c9e08ec838a51c2d01b2c Merge: ae23b55cc57b6 117ca1f8920cf Author: Jakub Kicinski Date: Wed Nov 4 18:05:56 2020 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next Pablo Neira Ayuso says: ==================== Netfilter updates for net-next 1) Move existing bridge packet reject infra to nf_reject_{ipv4,ipv6}.c from Jose M. Guisado. 2) Consolidate nft_reject_inet initialization and dump, also from Jose. 3) Add the netdev reject action, from Jose. 4) Allow to combine the exist flag and the destroy command in ipset, from Joszef Kadlecsik. 5) Expose bucket size parameter for hashtables, also from Jozsef. 6) Expose the init value for reproducible ipset listings, from Jozsef. 7) Use __printf attribute in nft_request_module, from Andrew Lunn. 8) Allow to use reject from the inet ingress chain. * git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next: netfilter: nft_reject_inet: allow to use reject from inet ingress netfilter: nftables: Add __printf() attribute netfilter: ipset: Expose the initval hash parameter to userspace netfilter: ipset: Add bucketsize parameter to all hash types netfilter: ipset: Support the -exist flag with the destroy command netfilter: nft_reject: add reject verdict support for netdev netfilter: nft_reject: unify reject init and dump into nft_reject netfilter: nf_reject: add reject skbuff creation helpers ==================== Link: https://lore.kernel.org/r/20201104141149.30082-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski commit 9d1c94a69d70f1b02bdf06b231cd16ad47ef06cd Author: Mauro Carvalho Chehab Date: Fri Oct 23 18:33:25 2020 +0200 clk: fix a kernel-doc markup clk_get_duty_cycle -> clk_get_scaled_duty_cycle Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/b2336f3f3cdfe6e1a2d3a7a056ab7ccc7a81b945.1603469755.git.mchehab+huawei@kernel.org Signed-off-by: Stephen Boyd commit ae23b55cc57b6bdeff90349533bad8abf2ae98db Merge: 82728b91f124b 8d014eaa9254a Author: Jakub Kicinski Date: Wed Nov 4 17:45:55 2020 -0800 Merge branch 'mptcp-miscellaneous-mptcp-fixes' Mat Martineau says: ==================== mptcp: Miscellaneous MPTCP fixes This is a collection of small fixup and minor enhancement patches that have accumulated in the MPTCP tree while net-next was closed. These are prerequisites for larger changes we have queued up. Patch 1 refines receive buffer autotuning. Patches 2 and 4 are some minor locking and refactoring changes. Patch 3 improves GRO and RX coalescing with MPTCP skbs. Patches 5-7 add a sysctl for tuning ADD_ADDR retransmission timeout, corresponding test code, and documentation. v2: Add sysctl documentation and fix signoff tags. ==================== Link: https://lore.kernel.org/r/20201103190509.27416-1-mathew.j.martineau@linux.intel.com Signed-off-by: Jakub Kicinski commit 8d014eaa9254a9b8e0841df40dd36782b451579a Author: Geliang Tang Date: Tue Nov 3 11:05:09 2020 -0800 selftests: mptcp: add ADD_ADDR timeout test case This patch added the test case for retransmitting ADD_ADDR when timeout occurs. It set NS1's add_addr_timeout to 1 second, and drop NS2's ADD_ADDR echo packets. Here we need to slow down the transfer process of all data to let the ADD_ADDR suboptions can be retransmitted three times. So we added a new parameter "speed" for do_transfer, it can be set with fast or slow. We also added three new optional parameters for run_tests, and dropped run_remove_tests function. Since we added the netfilter rules in this test case, we need to update the "config" file. Suggested-by: Matthieu Baerts Suggested-by: Paolo Abeni Acked-by: Paolo Abeni Reviewed-by: Matthieu Baerts Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit 9ce7deff92e89b1807d0968c0b319d26361a72a6 Author: Mat Martineau Date: Tue Nov 3 11:05:08 2020 -0800 docs: networking: mptcp: Add MPTCP sysctl entries Describe the two MPTCP sysctls, what the values mean, and the default settings. Acked-by: Geliang Tang Signed-off-by: Mat Martineau Reviewed-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit 93f323b9cccc1fc77660de49faefd11fdfd55017 Author: Geliang Tang Date: Tue Nov 3 11:05:07 2020 -0800 mptcp: add a new sysctl add_addr_timeout This patch added a new sysctl, named add_addr_timeout, to control the timeout value (in seconds) of the ADD_ADDR retransmission. Suggested-by: Matthieu Baerts Suggested-by: Paolo Abeni Acked-by: Paolo Abeni Reviewed-by: Matthieu Baerts Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit 95ed690ebc72ad6c89068f08197b51fe4d3c3b48 Author: Florian Westphal Date: Tue Nov 3 11:05:06 2020 -0800 mptcp: split mptcp_clean_una function mptcp_clean_una() will wake writers in case memory could be reclaimed. When called from mptcp_sendmsg the wakeup code isn't needed. Move the wakeup to a new helper and then use that from the mptcp worker. Signed-off-by: Florian Westphal Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit 5a369ca64364b49caff424d2f988901bc7658b6d Author: Paolo Abeni Date: Tue Nov 3 11:05:05 2020 -0800 tcp: propagate MPTCP skb extensions on xmit splits When the TCP stack splits a packet on the write queue, the tail half currently lose the associated skb extensions, and will not carry the DSM on the wire. The above does not cause functional problems and is allowed by the RFC, but interact badly with GRO and RX coalescing, as possible candidates for aggregation will carry different TCP options. This change tries to improve the MPTCP behavior, propagating the skb extensions on split. Additionally, we must prevent the MPTCP stack from updating the mapping after the split occur: that will both violate the RFC and fool the reader. Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit 65f49fe72f9e4063b96c78de62f3ff9a3384164e Author: Florian Westphal Date: Tue Nov 3 11:05:04 2020 -0800 mptcp: use _fast lock version in __mptcp_move_skbs The function is short and won't sleep, so this can use the _fast version. Acked-by: Paolo Abeni Signed-off-by: Florian Westphal Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit 13c7ba0c8494a4fcee9e8cc163ae332d0480bde5 Author: Florian Westphal Date: Tue Nov 3 11:05:03 2020 -0800 mptcp: adjust mptcp receive buffer limit if subflow has larger one In addition to tcp autotuning during read, it may also increase the receive buffer in tcp_clamp_window(). In this case, mptcp should adjust its receive buffer size as well so it can move all pending skbs from the subflow socket to the mptcp socket. At this time, TCP can have more skbs ready for processing than what the mptcp receive buffer size allows. In the mptcp case, the receive window announced is based on the free space of the mptcp parent socket instead of the individual subflows. Following the subflow allows mptcp to grow its receive buffer. This is especially noticeable for loopback traffic where two skbs are enough to fill the initial receive window. In mptcp_data_ready() we do not hold the mptcp socket lock, so modifying mptcp_sk->sk_rcvbuf is racy. Do it when moving skbs from subflow to mptcp socket, both sockets are locked in this case. Signed-off-by: Florian Westphal Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit 82728b91f124b5976f07cd62b3783df72e7c4a27 Author: Claudiu Manoil Date: Tue Nov 3 16:02:13 2020 +0200 enetc: Remove Tx checksumming offload code Tx checksumming has been defeatured and completely removed from the h/w reference manual. Made a little cleanup for the TSE case as this is complementary code. Signed-off-by: Claudiu Manoil Link: https://lore.kernel.org/r/20201103140213.3294-1-claudiu.manoil@nxp.com Signed-off-by: Jakub Kicinski commit ebcaa207b48545f587b879ba1652a593ed9da187 Author: Zou Wei Date: Tue Nov 3 20:05:00 2020 +0800 dpaa_eth: use false and true for bool variables Fix coccicheck warnings: ./dpaa_eth.c:2549:2-22: WARNING: Assignment of 0/1 to bool variable ./dpaa_eth.c:2562:2-22: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: Zou Wei Acked-by: Madalin Bucur Link: https://lore.kernel.org/r/1604405100-33255-1-git-send-email-zou_wei@huawei.com Signed-off-by: Jakub Kicinski commit f2531d45285467e5034b18fd51b6bba996c0b4bf Author: Alexandru Ardelean Date: Tue Nov 3 09:44:36 2020 +0200 net: phy: adin: implement cable-test support The ADIN1300/ADIN1200 support cable diagnostics using TDR. The cable fault detection is automatically run on all four pairs looking at all combinations of pair faults by first putting the PHY in standby (clear the LINK_EN bit, PHY_CTRL_3 register, Address 0x0017) and then enabling the diagnostic clock (set the DIAG_CLK_EN bit, PHY_CTRL_1 register, Address 0x0012). Cable diagnostics can then be run (set the CDIAG_RUN bit in the CDIAG_RUN register, Address 0xBA1B). The results are reported for each pair in the cable diagnostics results registers, CDIAG_DTLD_RSLTS_0, CDIAG_DTLD_RSLTS_1, CDIAG_DTLD_RSLTS_2, and CDIAG_DTLD_RSLTS_3, Address 0xBA1D to Address 0xBA20). The distance to the first fault for each pair is reported in the cable fault distance registers, CDIAG_FLT_DIST_0, CDIAG_FLT_DIST_1, CDIAG_FLT_DIST_2, and CDIAG_FLT_DIST_3, Address 0xBA21 to Address 0xBA24). This change implements support for this using phylib's cable-test support. Reviewed-by: Andrew Lunn Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201103074436.93790-2-alexandru.ardelean@analog.com Signed-off-by: Jakub Kicinski commit 85ba75bb5727d47bff647d1a1788e1d5925286cf Author: Alexandru Ardelean Date: Tue Nov 3 09:44:35 2020 +0200 net: phy: adin: disable diag clock & disable standby mode in config_aneg When the PHY powers up, the diagnostics clock isn't enabled (bit 2 in register PHY_CTRL_1 (0x0012)). Also, the PHY is not in standby mode, so bit 13 in PHY_CTRL_3 (0x0017) is always set at power up. The standby mode and the diagnostics clock are both meant to be for the cable diagnostics feature of the PHY (in phylib this would be equivalent to the cable-test support), and for the frame-generator feature of the PHY. In standby mode, the PHY doesn't negotiate links or manage links. To use the cable diagnostics/test (or frame-generator), the PHY must be first set in standby mode, so that the link operation doesn't interfere. Then, the diagnostics clock must be enabled. For the cable-test feature, when the operation finishes, the PHY goes into PHY_UP state, and the config_aneg hook is called. For the ADIN PHY, we need to make sure that during autonegotiation configuration/setup the PHY is removed from standby mode and the diagnostics clock is disabled, so that normal operation is resumed. This change does that by moving the set of the ADIN1300_LINKING_EN bit (2) in the config_aneg (to disable standby mode). Previously, this was set in the downshift setup, because the downshift retry value and the ADIN1300_LINKING_EN are in the same register. And the ADIN1300_DIAG_CLK_EN bit (13) is cleared, to disable the diagnostics clock. Reviewed-by: Andrew Lunn Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201103074436.93790-1-alexandru.ardelean@analog.com Signed-off-by: Jakub Kicinski commit 609cfc7fcf5ed8c08ea44e3fc48556a56d55ac3f Merge: 9470174e7581e 252b353c5bb30 Author: Jakub Kicinski Date: Wed Nov 4 16:55:58 2020 -0800 Merge branch 'selftests-net-bridge-add-tests-for-mldv2' Nikolay Aleksandrov says: ==================== selftests: net: bridge: add tests for MLDv2 This is the second selftests patch-set for the new multicast functionality which adds tests for the bridge's MLDv2 support. The tests use full precooked packets which are sent via mausezahn and the resulting state after each test is checked for proper X,Y sets, (*,G) source list, source list entry timers, (S,G) existence and flags, packet forwarding and blocking, exclude group expiration and (*,G) auto-add. The first 3 patches factor out common functions which are used by IGMPv3 tests in lib.sh and add support for IPv6 test UDP packet, then patch 4 adds the first test with the initial MLDv2 setup. The following new tests are added: - base case: MLDv2 report ff02::cc is_include - include -> allow report - include -> is_include report - include -> is_exclude report - include -> to_exclude report - exclude -> allow report - exclude -> is_include report - exclude -> is_exclude report - exclude -> to_exclude report - include -> block report - exclude -> block report - exclude timeout (move to include + entry deletion) - S,G port entry automatic add to a *,G,exclude port The variable names and set notation are the same as per RFC 3810, for more information check RFC 3810 sections 2.3 and 7. ==================== Link: https://lore.kernel.org/r/20201103172412.1044840-1-razor@blackwall.org Signed-off-by: Jakub Kicinski commit 252b353c5bb30ee9cc0c3d5cef128cec372e6a2c Author: Nikolay Aleksandrov Date: Tue Nov 3 19:24:12 2020 +0200 selftests: net: bridge: add test for mldv2 *,g auto-add When we have *,G ports in exclude mode and a new S,G,port is added the kernel has to automatically create an S,G entry for each exclude port to get proper forwarding. Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit d598cc6a2d45321a2a662742f8c38b43021e36e0 Author: Nikolay Aleksandrov Date: Tue Nov 3 19:24:11 2020 +0200 selftests: net: bridge: add test for mldv2 exclude timeout Test that when a group in exclude mode expires it changes mode to include and the blocked entries are deleted. Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit a2d667f0c1fb30e24ae71f6b8e832808bf18f117 Author: Nikolay Aleksandrov Date: Tue Nov 3 19:24:10 2020 +0200 selftests: net: bridge: add test for mldv2 exc -> block report The test checks for the following case: Router State Report Received New Router State Actions EXCLUDE (X,Y) BLOCK (A) EXCLUDE (X+(A-Y),Y) (A-X-Y) = Filter Timer Send Q(MA,A-Y) Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 57386215cc0b4ed483a3ebcb0d2a378ab0db14ba Author: Nikolay Aleksandrov Date: Tue Nov 3 19:24:09 2020 +0200 selftests: net: bridge: add test for mldv2 inc -> block report The test checks for the following case: Router State Report Received New Router State Actions INCLUDE (A) BLOCK (B) INCLUDE (A) Send Q(MA,A*B) Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 9eb4394db91c5ef9595872974224a38719781829 Author: Nikolay Aleksandrov Date: Tue Nov 3 19:24:08 2020 +0200 selftests: net: bridge: add test for mldv2 exc -> to_exclude report The test checks for the following case: Router State Report Received New Router State Actions EXCLUDE (X,Y) TO_EX (A) EXCLUDE (A-Y,Y*A) (A-X-Y) = Filter Timer Delete (X-A) Delete (Y-A) Send Q(MA,A-Y) Filter Timer=MALI Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit d0b19dedd6c26a797455acb2f198fe946793f209 Author: Nikolay Aleksandrov Date: Tue Nov 3 19:24:07 2020 +0200 selftests: net: bridge: add test for mldv2 exc -> is_exclude report The test checks for the following case: Router State Report Received New Router State Actions EXCLUDE (X,Y) IS_EX (A) EXCLUDE (A-Y, Y*A) (A-X-Y)=MALI Delete (X-A) Delete (Y-A) Filter Timer=MALI Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 25ba7c03ef1ab77639b00cd2932e0de3b402bed7 Author: Nikolay Aleksandrov Date: Tue Nov 3 19:24:06 2020 +0200 selftests: net: bridge: add test for mldv2 exc -> is_include report The test checks for the following case: Router State Report Received New Router State Actions EXCLUDE (X,Y) IS_IN (A) EXCLUDE (X+A, Y-A) (A)=MALI Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 0e77581fdf302547f71749e2e1cd657562189375 Author: Nikolay Aleksandrov Date: Tue Nov 3 19:24:05 2020 +0200 selftests: net: bridge: add test for mldv2 exc -> allow report The test checks for the following case: Router State Report Received New Router State Actions EXCLUDE (X,Y) ALLOW (A) EXCLUDE (X+A,Y-A) (A)=MALI Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 55852f1d6a337e63c38e9c247fffaeabb5faef16 Author: Nikolay Aleksandrov Date: Tue Nov 3 19:24:04 2020 +0200 selftests: net: bridge: add test for mldv2 inc -> to_exclude report The test checks for the following case: Router State Report Received New Router State Actions INCLUDE (A) TO_EX (B) EXCLUDE (A*B,B-A) (B-A)=0 Delete (A-B) Send Q(MA,A*B) Filter Timer=MALI Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit f9fcd55328a934a252b89b6cdde6c888a62207a7 Author: Nikolay Aleksandrov Date: Tue Nov 3 19:24:03 2020 +0200 selftests: net: bridge: add test for mldv2 inc -> is_exclude report The test checks for the following case: Router State Report Received New Router State Actions INCLUDE (A) IS_EX (B) EXCLUDE (A*B, B-A) (B-A)=0 Delete (A-B) Filter Timer=MALI Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit f44de2bc684da9d310c7703a077bd992ebdf71b1 Author: Nikolay Aleksandrov Date: Tue Nov 3 19:24:02 2020 +0200 selftests: net: bridge: add test for mldv2 inc -> is_include report The test checks for the following case: Router State Report Received New Router State Actions INCLUDE (A) IS_IN (B) INCLUDE (A+B) (B)=MALI Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 0ef10e60682ec2604e34ff8e6eff8fb39fee176c Author: Nikolay Aleksandrov Date: Tue Nov 3 19:24:01 2020 +0200 selftests: net: bridge: add test for mldv2 inc -> allow report The test checks for the following case: Router State Report Received New Router State Actions INCLUDE (A) ALLOW (B) INCLUDE (A+B) (B)=MALI Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 444c897111b02b06599b92e597436e09bd969501 Author: Nikolay Aleksandrov Date: Tue Nov 3 19:24:00 2020 +0200 selftests: net: bridge: add initial MLDv2 include test Add the initial setup for MLDv2 tests with the first test of a simple is_include report. For MLDv2 we need to setup the bridge properly and we also send the full precooked packets instead of relying on mausezahn to fill in some parts. For verification we use the generic S,G state checking functions from lib.sh. Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 95e6f430ebfee51ac174e234388e7c6e8216ff2c Author: Nikolay Aleksandrov Date: Tue Nov 3 19:23:59 2020 +0200 selftests: net: bridge: factor out and rename sg state functions Factor out S,G entry state checking functions for existence, forwarding, blocking and timer to lib.sh so they can be later used by MLDv2 tests. Add brmcast_ suffix to their name to make the relation to the bridge explicit. Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 450b0b84c6609e7ec1fb0276c8a7e4efa9e78a4c Author: Nikolay Aleksandrov Date: Tue Nov 3 19:23:58 2020 +0200 selftests: net: lib: add support for IPv6 mcast packet test In order to test an IPv6 multicast packet we need to pass different tc and mausezahn protocols only, so add a simple check for the destination address which decides if we should generate an IPv4 or IPv6 mcast packet. Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 537e48259eacbd92f3463900c20cc3acd9dd2072 Author: Nikolay Aleksandrov Date: Tue Nov 3 19:23:57 2020 +0200 selftests: net: bridge: factor out mcast_packet_test Factor out mcast_packet_test into lib.sh so it can be later extended and reused by MLDv2 tests. Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 9470174e7581e75a8ebd78964997314dfc2e706c Author: DENG Qingfang Date: Tue Nov 3 13:06:18 2020 +0800 net: dsa: mt7530: support setting MTU MT7530/7531 has a global RX packet length register, which can be used to set MTU. Supported packet length values are 1522 (1518 if untagged), 1536, 1552, and multiple of 1024 (from 2048 to 15360). Signed-off-by: DENG Qingfang Link: https://lore.kernel.org/r/20201103050618.11419-1-dqfext@gmail.com Signed-off-by: Jakub Kicinski commit 2c24eefb2462617d264398f91e75cc0fdc978e4f Merge: 3fb6928b56f67 d387c761fa8c9 Author: Jakub Kicinski Date: Wed Nov 4 16:28:07 2020 -0800 Merge branch 'net-ipa-tell-gsi-the-ipa-version' Alex Elder says: ==================== net: ipa: tell GSI the IPA version The GSI code that supports IPA avoids having knowledge about the IPA layer it serves. One result of this is that Boolean flags are used during GSI initialization to convey that certain hardware version-dependent special behaviors should be used. A given version of IPA hardware uses a fixed/well-defined version of GSI, so the IPA version really implies the GSI version. If given only the IPA version, the GSI code supporting IPA can use it to implement certain special behaviors required for IPA *or* GSI. This avoids the need to pass and maintain numerous Boolean flags. ==================== Link: https://lore.kernel.org/r/20201102175400.6282-1-elder@linaro.org Signed-off-by: Jakub Kicinski commit d387c761fa8c9026cd87b8a56a3150535205be73 Author: Alex Elder Date: Mon Nov 2 11:54:00 2020 -0600 net: ipa: eliminate legacy arguments We enable a channel doorbell engine only for IPA v3.5.1, and that is now handled directly by gsi_channel_program(). When initially setting up a channel, we want that doorbell engine enabled, and we can request that independent of the IPA version. Doing that makes the "legacy" argument to gsi_channel_setup_one() unnecessary. And with that gone we can get rid of the "legacy" argument to gsi_channel_setup(), and gsi_setup() as well. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit ce54993d01b996cdf09e15882e77bea8c10903ca Author: Alex Elder Date: Mon Nov 2 11:53:59 2020 -0600 net: ipa: use version in gsi_channel_program() Use the IPA version in gsi_channel_program() to determine whether we should enable the GSI doorbell engine when requested. This way, callers only say whether or not it should be enabled if needed, regardless of hardware version. Rename the "legacy" argument to gsi_channel_reset(), and have it indicate whether the doorbell engine should be enabled when reprogramming following the reset. Change all callers of gsi_channel_reset() to indicate whether to enable the doorbell engine after reset, independent of hardware version. Rework a little logic in ipa_endpoint_reset() to get rid of the "legacy" variable previously passed to gsi_channel_reset(). Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 9de4a4ccddb30478b15f1dc8efbf3d06609d4066 Author: Alex Elder Date: Mon Nov 2 11:53:58 2020 -0600 net: ipa: use version in gsi_channel_reset() A quirk of IPA v3.5.1 requires a channel reset on an RX channel to be performed twice. Use the IPA version in gsi_channel_reset() rather than the passed-in legacy flag to determine that. This is actually a bug fix, because this double reset is supposed to occur independent of whether we're enabling the doorbell engine. Now they will be independent. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 56dfe8dedff977e5c20fbe7ace5e5f9ddef4b4ec Author: Alex Elder Date: Mon Nov 2 11:53:57 2020 -0600 net: ipa: use version in gsi_channel_init() A quirk of IPA v4.2 requires the AP to allocate the GSI channels that are owned by the modem. Rather than pass a flag argument to gsi_channel_init(), use the IPA version directly in that function to determine whether modem channels need to be allocated. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 14dbf977dd45115a13a64ab480886598ee0ba755 Author: Alex Elder Date: Mon Nov 2 11:53:56 2020 -0600 net: ipa: record IPA version in GSI structure Record the IPA version passed to gsi_init() in the GSI structure. This allows that value to be used directly where needed, rather than passing and storing certain flag arguments through the code. In particular, for all but one supported version of IPA, the command channel is programmed to only use an "escape buffer". By storing the IPA version, we can do a simple version check in one location, and avoid storing a flag field in every channel (and passing a flag along while initializing channels to set that field properly). Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 1d0c09dee911f49e88de0ba52d1f0e57f6eb4c47 Author: Alex Elder Date: Mon Nov 2 11:53:55 2020 -0600 net: ipa: expose IPA version to the GSI layer Although GSI is integral to IPA, it is a separate hardware component and the IPA code supporting it has been structured to avoid explicit dependence on IPA details. An example of this is that gsi_init() is passed a number of Boolean flags to indicate special behaviors, whose values are dependent on the IPA hardware version. Looking ahead, newer hardware versions would require even more such special behaviors. For any given version of IPA hardware (like 3.5.1 or 4.2), the GSI hardware version is fixed (in this case, 1.3 and 2.2, respectively). So the IPA version *implies* the GSI version, and the IPA version can be used as effectively the equivalent of the GSI hardware version. Rather than proliferating new special behavior flags, just provide the IPA version to the GSI layer when it is initialized. The GSI code can then use that directly to determine whether special behaviors are required. The IPA version enumerated type is already isolated to its own header file, so the exposure of this IPA detail is very limited. For now, just change gsi_init() to pass the version rather than the Boolean flags, and set the flag values internal to that function. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit cf11c1f89d5209d20cdf4040f5b26253014026ad Author: Rob Clark Date: Fri Oct 23 09:51:23 2020 -0700 drm/msm: Drop struct_mutex in shrinker path Now that the inactive_list is protected by mm_lock, and everything else on per-obj basis is protected by obj->resv, we no longer depend on struct_mutex. Signed-off-by: Rob Clark Reviewed-by: Kristian H. Kristensen Signed-off-by: Rob Clark commit f92f026a487a53d69a4a39d0a91427c19e4a4b3f Author: Rob Clark Date: Fri Oct 23 09:51:22 2020 -0700 drm/msm: Drop struct_mutex in madvise path The obj->lock is sufficient for what we need. This *does* have the implication that userspace can try to shoot themselves in the foot by racing madvise(DONTNEED) with submit. But the result will be about the same if they did madvise(DONTNEED) before the submit ioctl, ie. they might not get want they want if they race with shrinker. But iova fault handling is robust enough, so userspace is only shooting it's own foot. Signed-off-by: Rob Clark Reviewed-by: Kristian H. Kristensen Signed-off-by: Rob Clark commit c951a9b284b907604759628d273901064c60d09f Author: Rob Clark Date: Fri Oct 23 09:51:21 2020 -0700 drm/msm: Remove msm_gem_free_work Now that we don't need struct_mutex in the free path, we can get rid of the asynchronous free altogether. Signed-off-by: Rob Clark Reviewed-by: Kristian H. Kristensen Signed-off-by: Rob Clark commit 25c49c838bdeb7785570dd84d5b078ad9e2ba085 Author: Rob Clark Date: Fri Oct 23 09:51:20 2020 -0700 drm/msm: Drop struct_mutex in free_object() path Now that active_list/inactive_list is protected by mm_lock, we no longer need dev->struct_mutex in the free_object() path. Signed-off-by: Rob Clark Reviewed-by: Kristian H. Kristensen Signed-off-by: Rob Clark commit c5c1643cef7a11c1f3a5544528087618ba9a5aab Author: Rob Clark Date: Fri Oct 23 09:51:19 2020 -0700 drm/msm: Drop struct_mutex from the retire path Now that we are not relying on dev->struct_mutex to protect the ring->submits lists, drop the struct_mutex lock. Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse Reviewed-by: Kristian H. Kristensen Signed-off-by: Rob Clark commit fb1a1fcbacefd839503e94a66a467809ade27b2c Author: Rob Clark Date: Fri Oct 23 09:51:18 2020 -0700 drm/msm: Remove obj->gpu It cannot be atomically updated with obj->active_count, and the only purpose is a useless WARN_ON() (which becomes a buggy WARN_ON() once retire_submits() is not serialized with incoming submits via struct_mutex) Signed-off-by: Rob Clark Reviewed-by: Kristian H. Kristensen Signed-off-by: Rob Clark commit 964d2f97e74b3951973bc22d8a5547f6c0d505b4 Author: Rob Clark Date: Fri Oct 23 09:51:17 2020 -0700 drm/msm: Refcount submits Before we remove dev->struct_mutex from the retire path, we have to deal with the situation of a submit retiring before the submit ioctl returns. To deal with this, ring->submits will hold a reference to the submit, which is dropped when the submit is retired. And the submit ioctl path holds it's own ref, which it drops when it is done with the submit. Also, add to submit list *after* getting/pinning bo's, to prevent badness in case the completed fence is corrupted, and retire_worker mistakenly believes the submit is done too early. Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse Reviewed-by: Kristian H. Kristensen Signed-off-by: Rob Clark commit 77d205290aa944895cf7e8bea500b8fd95a6b05b Author: Rob Clark Date: Fri Oct 23 09:51:16 2020 -0700 drm/msm: Protect ring->submits with it's own lock One less place to rely on dev->struct_mutex. Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse Reviewed-by: Kristian H. Kristensen Signed-off-by: Rob Clark commit 77c406038e830a4b6219b14a116cd2a6ac9f4908 Author: Rob Clark Date: Fri Oct 23 09:51:15 2020 -0700 drm/msm: Document and rename preempt_lock Before adding another lock, give ring->lock a more descriptive name. Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse Reviewed-by: Kristian H. Kristensen Signed-off-by: Rob Clark commit d984457b31c4c53d2af374d5e78b3eb64debd483 Author: Rob Clark Date: Fri Oct 23 09:51:14 2020 -0700 drm/msm: Add priv->mm_lock to protect active/inactive lists Rather than relying on the big dev->struct_mutex hammer, introduce a more specific lock for protecting the bo lists. Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse Reviewed-by: Kristian H. Kristensen Signed-off-by: Rob Clark commit 2a86efb1bf72d25c64de3f2ff529a89e76ce7705 Author: Rob Clark Date: Fri Oct 23 09:51:13 2020 -0700 drm/msm: Move update_fences() Small cleanup, update_fences() is used in the hangcheck path, but also in the normal retire path. Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse Reviewed-by: Kristian H. Kristensen Signed-off-by: Rob Clark commit 07ddf4c30c4d7475954ee01032844f7f458f91e7 Author: Rob Clark Date: Fri Oct 23 09:51:12 2020 -0700 drm/msm: Drop chatty trace It is somewhat redundant with the gpu tracepoints, and anyways not too useful to justify spamming the log when debug traces are enabled. Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse Reviewed-by: Kristian H. Kristensen Signed-off-by: Rob Clark commit ce0a9dc009da93cf0a347a110ab237def1eae520 Author: Rob Clark Date: Fri Oct 23 09:51:11 2020 -0700 drm/msm: Use correct drm_gem_object_put() in fail case We only want to use the _unlocked() variant in the unlocked case. Signed-off-by: Rob Clark Reviewed-by: Kristian H. Kristensen Signed-off-by: Rob Clark commit 6c0e3ea25047694f97d01fb88c23ed5c4ed44da3 Author: Rob Clark Date: Fri Oct 23 09:51:10 2020 -0700 drm/msm/gem: Switch over to obj->resv for locking This also converts the special msm_gem_get_vaddr_active() to expect the lock to already be held. There are two call-sites for this, one already has the lock held, so it is more straightforward to just open-code the locking for the other caller. Signed-off-by: Rob Clark Reviewed-by: Kristian H. Kristensen Signed-off-by: Rob Clark commit 9184b6831bbe8ffd8843eff66721981bc2cc6eff Author: Rob Clark Date: Fri Oct 23 09:51:09 2020 -0700 drm/msm: Do rpm get sooner in the submit path Unfortunately, due to an dev_pm_opp locking interaction with mm->mmap_sem, we need to do pm get before aquiring obj locks, otherwise we can have anger lockdep with the chain: opp_table_lock --> &mm->mmap_sem --> reservation_ww_class_mutex For an explicit fencing userspace, the impact should be minimal as we do all the fence waits before this point. It could result in some needless resumes in error cases, etc. Signed-off-by: Rob Clark Reviewed-by: Kristian H. Kristensen Signed-off-by: Rob Clark commit 20224d715a882210428ea62bba93f1bc4a0afe23 Author: Rob Clark Date: Fri Oct 23 09:51:08 2020 -0700 drm/msm/submit: Move copy_from_user ahead of locking bos We cannot switch to using obj->resv for locking without first moving all the copy_from_user() ahead of submit_lock_objects(). Otherwise in the mm fault path we aquire mm->mmap_sem before obj lock, but in the submit path the order is reversed. Signed-off-by: Rob Clark Reviewed-by: Kristian H. Kristensen Signed-off-by: Rob Clark commit 599089c6af68300207ee1823230d31eda1f15959 Author: Rob Clark Date: Fri Oct 23 09:51:07 2020 -0700 drm/msm/gem: Move locking in shrinker path Move grabbing the bo lock into shrinker, with a msm_gem_trylock() to skip over bo's that are already locked. This gets rid of the nested lock classes. Signed-off-by: Rob Clark Reviewed-by: Kristian H. Kristensen Signed-off-by: Rob Clark commit e4b87d227f9e826c2b2db6b662906550a70a089a Author: Rob Clark Date: Fri Oct 23 09:51:06 2020 -0700 drm/msm/gem: Add some _locked() helpers When we cut-over to using dma_resv_lock/etc instead of msm_obj->lock, we'll need these for the submit path (where resv->lock is already held). Signed-off-by: Rob Clark Reviewed-by: Kristian H. Kristensen Signed-off-by: Rob Clark commit 8f642378bfe58ac0973c9f0a17ee57dd7053d3df Author: Rob Clark Date: Fri Oct 23 09:51:05 2020 -0700 drm/msm/gem: Move prototypes to msm_gem.h Signed-off-by: Rob Clark Reviewed-by: Kristian H. Kristensen Signed-off-by: Rob Clark commit 8117e5e5bc1a3766064689b86afe8f4ba6c66801 Author: Rob Clark Date: Fri Oct 23 09:51:04 2020 -0700 drm/msm/gem: Rename internal get_iova_locked helper We'll need to introduce a _locked() version of msm_gem_get_iova(), so we need to make that name available. Signed-off-by: Rob Clark Reviewed-by: Kristian H. Kristensen Signed-off-by: Rob Clark commit a6ae74c956e72c9b57f29576bd6cb7eb1ad4006c Author: Rob Clark Date: Fri Oct 23 09:51:03 2020 -0700 drm/msm/gem: Add obj->lock wrappers This will make it easier to transition over to obj->resv locking for everything that is per-bo locking. Signed-off-by: Rob Clark Reviewed-by: Kristian H. Kristensen Signed-off-by: Rob Clark commit 96c876f127719212b1dc26e5b3ba5ddda14a0d64 Author: Rob Clark Date: Fri Oct 23 09:51:02 2020 -0700 drm/msm: Fix a couple incorrect usages of get_vaddr_active() The microcode bo's should never be madvise(WONTNEED), so these should not be using msm_gem_get_vaddr_active(). Signed-off-by: Rob Clark Reviewed-by: Kristian H. Kristensen Signed-off-by: Rob Clark commit 0e720ea8de07843cf5e0c324ff44bec2b6a7e767 Author: Dmitry Baryshkov Date: Fri Oct 30 18:12:07 2020 +0300 drm/msm/dsi: do not try reading 28nm vco rate if it's not enabled Reading VCO rate for this PLL can cause boot stalls, if it is not enabled. Guard clk_hw_get_rate with a call to dsi_pll_28nm_clk_is_enabled(). Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark commit 2030745877bdd2ecbeb43ff1846242d004482587 Author: Sreekanth Reddy Date: Tue Oct 27 18:38:47 2020 +0530 scsi: mpt3sas: Bump driver version to 35.101.00.00 Bump mpt3sas driver version to 35.101.00.00 Link: https://lore.kernel.org/r/20201027130847.9962-15-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit 324c122fc0a41d258239c853854eefd186ae1290 Author: Sreekanth Reddy Date: Tue Oct 27 18:38:46 2020 +0530 scsi: mpt3sas: Add module parameter multipath_on_hba Add module parameter multipath_on_hba to enable/disable multi-port path topology support. By default this feature is enabled on SAS3.5 HBA device and disabled on SAS3 &SAS2.5 HBA devices. When this feature is disabled then driver uses a default PhysicalPort(PortID) number i.e. 255 instead of the PhysicalPort number provided by HBA firmware. Link: https://lore.kernel.org/r/20201027130847.9962-14-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit ffa381d6373b10e83dbdac425fb72affc64084f3 Author: Sreekanth Reddy Date: Tue Oct 27 18:38:45 2020 +0530 scsi: mpt3sas: Handle vSES vphy object during HBA reset During HBA reset the Port ID of vSES device may change. As a result, it is necessary to refresh virtual_phy objects after reset. Each Port's vphy_list table needs to be updated after updating the HBA port table. The algorithm is as follows: - Loop over each port entry from HBA port table * Loop over each virtual phy entry from port's vphys_list table - Mark virtual phy entry as dirty by setting dirty bit in virtual phy entry's flags field - Read SASIOUnitPage0 page - Loop over each HBA Phy's Phy data from SASIOUnitPage0 * If phy's remote attached device is not SES device then continue with processing next HBA Phy's Phy data; * Read SASPhyPage0 data for this Phy number and determine whether current phy is a virtual phy or not. If it is not a virtual phy then continue with next Phy data; * Get the current phy's remote attached vSES device's SAS Address; * Loop over each port entry from HBA port table - If Port's vphys_mask field is zero then continue with next Port entry, - Loop over each virtual phy entry from Port's vphy_list table - If the current phy's remote SAS Address is different from virtual phy entry's SAS Address then continue with next virtual phy entry, - Set bit corresponding to current phy number in virtual phy entry's phy_mask field, - Get the HBA port table's Port entry corresponding to Phy data's 'Port' value, * If there is no Port entry corresponding to Phy data's 'Port' value in HBA port table then create a new port entry and add it to HBA port table. - If this retrieved Port entry is the same as the current Port entry then don't do anything, just clear the dirty bit from virtual phy entry's flag field and continue with processing next HBA Phy's Phy data. - If this retrieved Port entry is different from the current Port entry then move the current virtual phy entry from current Port's vphys_list to retrieved Port entry's vphys_list. * Clear current phy bit in current Port entry's vphys_mask and set the current phy bit in the retrieved Port entry's vphys_mask field. * Clear the dirty bit from virtual phy entry's flag field and continue with next HBA Phy's Phy data. - Delete the 'virtual phy' entries and HBA's 'Port table' entries which are still marked as 'dirty'. Link: https://lore.kernel.org/r/20201027130847.9962-13-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit 34b0a78532f61e6059a26c0252fbc28c73761384 Author: Sreekanth Reddy Date: Tue Oct 27 18:38:44 2020 +0530 scsi: mpt3sas: Add bypass_dirty_port_flag parameter Added a new parameter bypass_dirty_port_flag in function mpt3sas_get_port_by_id(). When this parameter is set to one then search for matching hba port entry from port_table_list even when this hba_port entry is marked as dirty. Link: https://lore.kernel.org/r/20201027130847.9962-12-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit ccc59923ba8d44ecf7cb60135e9934bbb619da10 Author: Sreekanth Reddy Date: Tue Oct 27 18:38:43 2020 +0530 scsi: mpt3sas: Handling HBA vSES device Each direct attached device will have a unique Port ID, but with an exception. HBA vSES may use the same Port ID of another direct attached device Port's ID. As a result, special handling is needed for vSES. Create a virtual_phy object when a new HBA vSES device is detected and add this virtual_phy object to vphys_list of port ID's hba_port object. When the HBA vSES device is removed then remove the corresponding virtual_phy object from its parent's hba_port's vphy_list and free this virtual_vphy object. In hba_port object add vphy_mask field to hold the list of HBA phy bits which are assigned to vSES devices. Also add vphy_list list to hold list of virtual_phy objects which holds the same portID of current hba_port's portID. Also, add a hba_vphy field in _sas_phy object to determine whether this _sas_phy object belongs to vSES device or not. - Allocate a virtual_phy object whenever a virtual phy is detected while processing the SASIOUnitPage0's phy data. And this allocated virtual_phy object to corresponding PortID's hba_port's vphy_list. - When a vSES device is added to the SML then initialize the corresponding virtual_phy objects's sas_address field with vSES device's SAS Address. - Free this virtual_phy object during driver unload time and when this vSES device is removed. Link: https://lore.kernel.org/r/20201027130847.9962-11-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit 9d0348a9d8e35142b809d0b92534312a22f6fd78 Author: Sreekanth Reddy Date: Tue Oct 27 18:38:42 2020 +0530 scsi: mpt3sas: Set valid PhysicalPort in SMPPassThrough The driver currently sets PhysicalPort field to 0xFF for SMPPassthrough Request message. In zoning topologies this SMPPassthrough command always operates on devices in one zone (default zone) even when user issues SMP command for other zone drives. Define _transport_get_port_id_by_rphy() and _transport_get_port_id_by_sas_phy() helper functions to get Physical Port number from sas_rphy & sas_phy respectively for SMPPassthrough request message so that SMP Passthrough request message is sent to intended zone device. Link: https://lore.kernel.org/r/20201027130847.9962-10-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit a5e99fda017218516d3c66bec5ed346283ae722b Author: Sreekanth Reddy Date: Tue Oct 27 18:38:41 2020 +0530 scsi: mpt3sas: Update hba_port objects after host reset During host reset there is a chance that the Port number allocated by the firmware for the attached devices may change. Also, it may be possible that some HBA phy's can go down/come up after reset. As a result, the driver can't just trust the HBA Port table that it has populated before host reset as valid. Instead it has to update the HBA Port table in such a way that it shouldn't disturb the drives which are still accessible even after host reset. Use the following algorithm to update the HBA Port table during host reset: I. After host reset operation and before marking the devices as responding/non-responding, create a temporary Port table called "New Port table" by parsing each of the HBA phy's Phy data info read from SAS IOUnit Page0: a. Check whether Phy's negotiated link rate is greater than 1.5Gbps, if not go to next Phy; b. Get the SAS Address of the attached device; c. Create a new entry in the "New Port table" with SAS Address field filled with attached device's SAS Address, port number with Phy's Port number (read from SAS IOUnit Page0) and enable bit in the 'Phy mask' field corresponding to current Phy number. New entry is created only if the driver can't find an entry in the "New Port table" which matches with attached device 'SAS Address' & 'Port Number'. If it finds an entry with matches with attached device 'SAS Address' & 'Port Number' then the driver takes that matched entry and will enable current Phy number bit in the 'Phy mask' field; d. After parsing all the HBA phy's info, the driver will have complete Port table info in "New Port table". II. Mark all the existing sas_device & sas_expander device structures as 'dirty'. III. Mark each entry of the HBA Port lists as 'dirty'. IV. Take each entry from 'New Port table' one by one and check whether the entry has any corresponding matched entry (which is marked as 'dirty') in the HBA Port table or not. While looking for a corresponding matched entry, look for matched entry in the sequence from top row to bottom row listed in the following table. If you find any matched entry (according to any of the rules tabulated below) then perform the action mentioned in the 'Action' column in that matched rule. =========================================================================== |Search |SAS | Phy Mask | Port | Possibilities| Action | |every |Address | or | Number | | required | |entry |matched?| subset of| matched?| | | |in below| | phy mask | | | | |sequence| | matched? | | | | =========================================================================== | 1 |matched | matched | matched | nothing |* unmark HBA port | | | | | | changed |table entry as | | | | | | |dirty | --------------------------------------------------------------------------- | 2 |matched | matched | not | port number |* Update port | | | | | matched | is changed |number in the | | | | | | |matched port table | | | | | | |entry | | | | | | |* unmask HBA port | | | | | | |table entry as | | | | | | |dirty | --------------------------------------------------------------------------- | 3.a |matched | subset of| matched |some phys |* Add these new | | | | phy mask | (or) |might have |phys to current | | | | matched | not |enabled which |port in STL | | | | | matched |are previously|* Update phy mask | | | | | (but |disabled |field in HBA's port| | | | | first | |table's matched | | | | | look for| |entry, | | | | | matched | |* Update port | | | | | one) | |number in the | | | | | | |matched port | | | | | | |table entry (if | | | | | | |port number is | | | | | | |changed), | | | | | | |* Unmask HBA port | | | | | | |table entry as | | | | | | |dirty | --------------------------------------------------------------------------- | 3.b |matched | subset of| matched |some phys |*Remove these phys | | | | phy mask | (or) |might have |from current port | | | | matched | not |disabled which|in STL | | | | | matched |are previously|* Update phy mask | | | | | (but |enabled |field in HBA's port| | | | | first | |tables's matched | | | | | look for| |entry, | | | | | matched | |*Update port number| | | | | one) | |in the matched port| | | | | | |table entry (if | | | | | | |port number is | | | | | | |changed), | | | | | | |* Unmask HBA port | | | | | | |table entry as | | | | | | |dirty | --------------------------------------------------------------------------- | 4 |matched | not | matched |A cable |*Remove old phys & | | | | matched | (or) |attached to an|new phys to current| | | | | not |expander is |port in STL | | | | | matched |changed to |* Update phy mask | | | | | |another HBA |field in HBA's port| | | | | |port during |tables's matched | | | | | |reset |entry, | | | | | | |*Update port number| | | | | | |in the matched port| | | | | | |table entry (if | | | | | | |port number is | | | | | | |changed), | | | | | | |* Unmask HBA port | | | | | | |table entry as | | | | | | |dirty | --------------------------------------------------------------------------- V. Delete the hba_port objects which are still marked as dirty. Link: https://lore.kernel.org/r/20201027130847.9962-9-sreekanth.reddy@broadcom.com Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit 6df6be9168f50369ba843f2a12fe8537effbaff1 Author: Sreekanth Reddy Date: Tue Oct 27 18:38:40 2020 +0530 scsi: mpt3sas: Get sas_device objects using device's rphy In the following scsi_host_template and sas_function_template callback functions the driver does not have PhysicalPort number information to retrieve the sas_device object using SAS Address & PhysicalPort number. In these callback functions the device's rphy object is used to retrieve sas_device object for the device. .target_alloc, .get_enclosure_identifier .get_bay_identifier When a rphy (of type sas_rphy) object is allocated then its address is saved in corresponding sas_device object's rphy field. In __mpt3sas_get_sdev_by_rphy(), the driver loops over all the sas_device objects from sas_device_list list to retrieve the sas_device objects whose rphy matches the provided rphy. Link: https://lore.kernel.org/r/20201027130847.9962-8-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit c71ccf93c00c0cef062c2371e9a614526fee9adb Author: Sreekanth Reddy Date: Tue Oct 27 18:38:39 2020 +0530 scsi: mpt3sas: Rename transport_del_phy_from_an_existing_port() Renamed _transport_add_phy_to_an_existing_port() to mpt3sas_transport_add_phy_to_an_existing_port() and _transport_del_phy_from_an_existing_port() to mpt3sas_transport_del_phy_from_an_existing_port() as the driver needs to call these functions from outside mpt3sas_transport.c file. Added extra function argument 'port' of type struct hba_port to above functions and check for portID before adding/removing the phy from the _sas_port object. I.e. add/remove the phy from _sas_port object only if _sas_port's port object and phy's port object are the same. Link: https://lore.kernel.org/r/20201027130847.9962-7-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit 7d310f241001e090cf1ec0f3ae836b38d8c6ebec Author: Sreekanth Reddy Date: Tue Oct 27 18:38:38 2020 +0530 scsi: mpt3sas: Get device objects using sas_address & portID Currently driver retrieves the sas_device/sas_expander objects from corresponding object's lists using just device's SAS Address. Make driver retrieve the objects from the corresponding objects list using device's SAS Address and PhysicalPort (or PortID) number. PhysicalPort number is the port number of the HBA through which this device is accessed. Link: https://lore.kernel.org/r/20201027130847.9962-6-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit e2f0cdf7525353d87ed4f51ea69ca7986070ddd5 Author: Sreekanth Reddy Date: Tue Oct 27 18:38:37 2020 +0530 scsi: mpt3sas: Update hba_port's sas_address & phy_mask Update hba_port's sas_address & phy_mask fields whenever a direct expander or sas/sata target devices are added or removed. When any direct attached device is discovered then driver: - Gets the hba_port object corresponding to device's PhysicalPort number; - Updates the hba_port's sas_address field with device's SAS Address; - Updates the hba_port's phy_mask filed with device's narrow/wide port Phy number bits; - If a sas/sata end device (not only direct-attached devices) is added then corresponding sas_device object's port variable is assigned with hba_port object's address whose port_id matches the device's PhysicalPort number. - If an expander device is added then corresponding sas_expander object's port variable is assigned with hba_port object's address whose port_id matches the expander device's PhysicalPort number. When any direct attached device is detached then driver will delete the hba_port object corresponding to device's PhysicalPort number. Whenever any HBA phy's link (of direct attached device's port) comes up then update the phy_mask field of corresponding hba_port object. Link: https://lore.kernel.org/r/20201027130847.9962-5-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit 78ca700342a5df21d80515a36ba17c4962efb35b Author: Sreekanth Reddy Date: Tue Oct 27 18:38:36 2020 +0530 scsi: mpt3sas: Rearrange _scsih_mark_responding_sas_device() Rearrange _scsih_mark_responding_sas_device function. No functional change. Link: https://lore.kernel.org/r/20201027130847.9962-4-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit e238e71b6cb2b7b06224b31eb31892d1acb75f1d Author: Sreekanth Reddy Date: Tue Oct 27 18:38:35 2020 +0530 scsi: mpt3sas: Allocate memory for hba_port objects Allocate hba_port object whenever a new HBA's wide/narrow port is identified while processing the SASIOUnitPage0's phy data and add this object to port_table_list. Deallocate these objects during driver unload. Link: https://lore.kernel.org/r/20201027130847.9962-3-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit b22a0fac8c056e88fc72f7241fa9077b804634a6 Author: Sreekanth Reddy Date: Tue Oct 27 18:38:34 2020 +0530 scsi: mpt3sas: Define hba_port structure Define a new hba_port structure which holds the following variables: - port_id: Port ID of the narrow/wide port of the HBA - sas_address: SAS Address of the remote device that is attached to the current HBA port - phy_mask: HBA's phy bits to which above SAS addressed device is attached - flags: This field is used to refresh port details during HBA reset Link: https://lore.kernel.org/r/20201027130847.9962-2-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit 582e2ce5b4ece37055c6ebe58ab48a4817d30b10 Author: Alex Deucher Date: Mon Nov 2 16:18:09 2020 -0500 drm/amdgpu/display: FP fixes for DCN3.x (v4) Add proper FP_START/END handling and adjust Makefiles per previous asics. v2: fix up harder. v3: fix clkmgr Makefile for dcn30 v4: fix old gcc handling is only required for x86 Build-tested-by: Nathan Chancellor Reviewed-by: Harry Wentland (v1) Reviewed-by: Nicholas Kazlauskas (v1) Signed-off-by: Alex Deucher commit 20f2ffe504728612d7b0c34e4f8280e34251e704 Author: Alex Deucher Date: Mon Nov 2 15:37:34 2020 -0500 drm/amdgpu: fold CONFIG_DRM_AMD_DC_DCN3* into CONFIG_DRM_AMD_DC_DCN (v3) Avoids confusion in configurations. v2: fix build when CONFIG_DRM_AMD_DC_DCN is disabled v3: rebase on latest code Reviewed-by: Luben Tuikov (v1) Signed-off-by: Alex Deucher commit aeee2a48ec9239790b7c9a5c14dfb2a12554322f Author: Ramesh Errabolu Date: Mon Nov 2 18:15:03 2020 -0600 drm/amd/amdgpu: Enable arcturus devices to access the method kgd_gfx_v9_get_cu_occupancy that is already defined [Why] Allow user to know number of compute units (CU) that are in use at any given moment. [How] Remove the keyword static for the method kgd_gfx_v9_get_cu_occupancy Reviewed-by: Felix Kuehling Signed-off-by: Ramesh Errabolu Signed-off-by: Alex Deucher commit 94254fa045fb61ad927a2b704487674510974f1e Author: Roman Li Date: Tue Nov 3 17:43:24 2020 -0500 drm/amd/display: fix psr panel lightup [Why] The change for correct asic type check caused a psr regression due to incorrect chip family id for Raven. [How] Use correct family id. Signed-off-by: Roman Li Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 4b39264f8bcf2225985c6f0b6307a279d8a8aff8 Author: Kevin Wang Date: Wed Nov 4 13:04:56 2020 +0800 drm/amdgpu: cleanup debug log in amdgpu_set_pp_features() Signed-off-by: Kevin Wang Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 5ce71f59bb9bd3d8a09b96afdbc92975cb6dc303 Author: Kenneth Feng Date: Wed Nov 4 11:24:33 2020 +0800 drm/amd/amdgpu: switch on/off vcn power profile mode switch to vcn power profile mode when a video is playing. this can optimize the power/performance when the workload is on the vcn. Signed-off-by: Kenneth Feng Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 5c9a6272e768af1d68a0490f4794b852f1e7fdc6 Author: Kevin Wang Date: Tue Nov 3 13:51:07 2020 +0800 drm/amdgpu: update module paramter doc of amdgpu_dpm the vega20 isn't supported swsmu. Signed-off-by: Kevin Wang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 87fb78331e14e91780dbcecefd5425e612c8c67b Author: Deepak R Varma Date: Tue Nov 3 00:11:47 2020 +0530 drm/amdgpu: do not initialise global variables to 0 or NULL Initializing global variable to 0 or NULL is not necessary and should be avoided. Issue reported by checkpatch script as: ERROR: do not initialise globals to 0 (or NULL). Reviewed-by: Christian König Signed-off-by: Deepak R Varma Signed-off-by: Alex Deucher commit 4b60bb0dde1baf347540253f856c54bc908e525c Author: Marek Olšák Date: Tue Nov 3 11:05:25 2020 -0500 drm/amdgpu: set LDS_CONFIG=0x20 on Navy Flounder to fix a GPU hang (v2) v2: squash in build fix Acked-by: Alex Deucher Signed-off-by: Marek Olšák Signed-off-by: Alex Deucher commit 4c7e8a9e9f3095cb636c943b4db293c6d3cb3519 Author: Gang Ba Date: Thu Oct 8 13:12:28 2020 -0400 drm/amdgpu: Change the way to determine framebuffer type Determine FRAMEBUFFER_PUBLIC/PRIVATE only based host-accessibility, not peer-accesssibility Signed-off-by: Gang Ba Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 19201c075d2ca6a58421aa1f22281977e84ae17f Author: Christian König Date: Mon Nov 2 17:22:35 2020 +0100 drm/amdgpu: fix off by one in amdgpu_vm_handle_fault The value is inclusive, not exclusive. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 413949ee1cdb9128b542a3c501686a883aec940f Author: Tao Zhou Date: Tue Nov 3 15:36:06 2020 +0800 drm/amdgpu: enable GFXOFF for dimgrey_cavefish GFXOFF has been supported by PMFW, enable it directly in driver for dimgrey_cavefish. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit c26dab27e5c743afea7f7d047baa35b31b9da3a0 Author: John Clements Date: Tue Nov 3 16:19:44 2020 +0800 drm/amdgpu: resolved ASD loading issue on sienna updated fw header v2 parser to set asd fw memory Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit a3964ec40fc12a37bb2f0c3694453c8be9f582ef Author: Jinzhou.Su Date: Tue Nov 3 14:01:59 2020 +0800 drm/amdgpu: Enable FGCG for Vangogh Add flags AMD_CG_SUPPORT_GFX_FGCG for Vangogh Signed-off-by: Jinzhou.Su Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 8c11024cf66ae073eae91b462364f381fd1ad5e4 Author: Jinzhou.Su Date: Tue Nov 3 13:57:51 2020 +0800 drm/amdgpu: Add Fine Grain Clock Gating for GFX10 1. Add FGCG for gfx10 2. Get FGCG status for pm info debugfs Signed-off-by: Jinzhou.Su Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit adf16996362e65ce63b5b5ee628e0876d90c079f Author: Jinzhou.Su Date: Tue Nov 3 11:39:39 2020 +0800 drm/amdgpu: Add GFX Fine Grain Clock Gating flag Add AMD_CG_SUPPORT_GFX_FGCG for FGCG Signed-off-by: Jinzhou.Su Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit e1ac4b2406d94eddce8ac2c5ab4235f6075a9602 Author: Chester Lin Date: Fri Oct 30 14:08:38 2020 +0800 efi: generalize efi_get_secureboot Generalize the efi_get_secureboot() function so not only efistub but also other subsystems can use it. Note that the MokSbState handling is not factored out: the variable is boot time only, and so it cannot be parameterized as easily. Also, the IMA code will switch to this version in a future patch, and it does not incorporate the MokSbState exception in the first place. Note that the new efi_get_secureboot_mode() helper treats any failures to read SetupMode as setup mode being disabled. Co-developed-by: Chester Lin Signed-off-by: Chester Lin Acked-by: Mimi Zohar Signed-off-by: Ard Biesheuvel commit b6be002bcd1dd1dedb926abf3c90c794eacb77dc Author: Thomas Gleixner Date: Mon Nov 2 12:53:16 2020 -0800 x86/entry: Move nmi entry/exit into common code Lockdep state handling on NMI enter and exit is nothing specific to X86. It's not any different on other architectures. Also the extra state type is not necessary, irqentry_state_t can carry the necessary information as well. Move it to common code and extend irqentry_state_t to carry lockdep state. [ Ira: Make exit_rcu and lockdep a union as they are mutually exclusive between the IRQ and NMI exceptions, and add kernel documentation for struct irqentry_state_t ] Signed-off-by: Thomas Gleixner Signed-off-by: Ira Weiny Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201102205320.1458656-7-ira.weiny@intel.com commit bc3955c99cd0f9a89e22b4c66118e960f120d372 Merge: 860bfa6d66ebe 8d456654839cd Author: Mark Brown Date: Wed Nov 4 20:40:40 2020 +0000 Merge series "ASoC: topology: Change to resource managed memory" from Amadeusz Sławiński: Almost all other allocations in ASoC API are resource managed, the only exception is soc-topology.c. This patchset clean ups few unnecessary functions in preparation for change and then changes to devm_ functions for allocation. Amadeusz Sławiński (6): ASoC: topology: Remove unused functions from topology API ASoC: topology: Remove multistep topology loading ASoC: topology: Unify all device references ASoC: topology: Change allocations to resource managed ASoC: topology: Remove empty functions ASoC: topology: Simplify remove_widget function include/sound/soc-topology.h | 13 +- sound/soc/intel/skylake/skl-topology.c | 9 +- sound/soc/soc-topology.c | 302 +++++-------------------- sound/soc/sof/pcm.c | 2 +- sound/soc/sof/topology.c | 4 +- 5 files changed, 57 insertions(+), 273 deletions(-) -- 2.25.1 commit 860bfa6d66ebe4206ae5fa8fd6b064fc6416b794 Merge: 7e9a2387c5fdf 4a232122124bc Author: Mark Brown Date: Wed Nov 4 20:40:39 2020 +0000 Merge series "ASoC: Mediatek: Add support for MT8192 SoC" from Jiaxin Yu : This series of patches adds support for Mediatek AFE for MT8192 SoC. At the same time, the calibration function of MT6359 is completed with real machine driver. The patch is based on broonie tree "for-next" branch. Change since v3: - use normal conditional statements to improve legiblity in [v3,3/9] - remove mtk_i2s_hd_en_event as there's trace in the core - impove mt8192_i2s_enum and mt8192_adda_enum Change since v2: - split the dai driver files as a separate patch - fix dt-bindings to GPL-2.0-only License - remove unnecessary preperty descriptions such as 'maxItems' Change since v1: - fixed some typos related to dt-bindings in [v1,3/5] and [v1,5/5] - add vendor prefix to the properties, such as "mediatek,apmixedsys" - add a dependency description to indicate the required header files Jiaxin Yu (9): ASoC: mediatek: mt6359: add the calibration functions ASoC: mediatek: mt8192: add platform driver ASoC: mediatek: mt8192: support i2s in platform driver ASoC: mediatek: mt8192: support adda in platform driver ASoC: mediatek: mt8192: support pcm in platform driver ASoC: mediatek: mt8192: support tdm in platform driver dt-bindings: mediatek: mt8192: add audio afe document ASoC: mediatek: mt8192: add machine driver with mt6359, rt1015 and rt5682 dt-bindings: mediatek: mt8192: add mt8192-mt6358-rt1015-rt5682 document .../bindings/sound/mt8192-afe-pcm.yaml | 100 + .../sound/mt8192-mt6359-rt1015-rt5682.yaml | 42 + sound/soc/codecs/mt6359.c | 110 + sound/soc/codecs/mt6359.h | 7 + sound/soc/mediatek/Kconfig | 23 + sound/soc/mediatek/Makefile | 1 + sound/soc/mediatek/common/mtk-afe-fe-dai.c | 13 +- sound/soc/mediatek/common/mtk-base-afe.h | 1 + sound/soc/mediatek/mt8192/Makefile | 16 + sound/soc/mediatek/mt8192/mt8192-afe-clk.c | 669 ++++ sound/soc/mediatek/mt8192/mt8192-afe-clk.h | 244 ++ sound/soc/mediatek/mt8192/mt8192-afe-common.h | 170 + .../soc/mediatek/mt8192/mt8192-afe-control.c | 163 + sound/soc/mediatek/mt8192/mt8192-afe-gpio.c | 306 ++ sound/soc/mediatek/mt8192/mt8192-afe-gpio.h | 19 + sound/soc/mediatek/mt8192/mt8192-afe-pcm.c | 2389 +++++++++++++ sound/soc/mediatek/mt8192/mt8192-dai-adda.c | 1471 ++++++++ sound/soc/mediatek/mt8192/mt8192-dai-i2s.c | 2110 +++++++++++ sound/soc/mediatek/mt8192/mt8192-dai-pcm.c | 409 +++ sound/soc/mediatek/mt8192/mt8192-dai-tdm.c | 778 ++++ .../mediatek/mt8192/mt8192-interconnection.h | 65 + .../mt8192/mt8192-mt6359-rt1015-rt5682.c | 1058 ++++++ sound/soc/mediatek/mt8192/mt8192-reg.h | 3131 +++++++++++++++++ 23 files changed, 13291 insertions(+), 4 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/mt8192-afe-pcm.yaml create mode 100644 Documentation/devicetree/bindings/sound/mt8192-mt6359-rt1015-rt5682.yaml create mode 100644 sound/soc/mediatek/mt8192/Makefile create mode 100644 sound/soc/mediatek/mt8192/mt8192-afe-clk.c create mode 100644 sound/soc/mediatek/mt8192/mt8192-afe-clk.h create mode 100644 sound/soc/mediatek/mt8192/mt8192-afe-common.h create mode 100644 sound/soc/mediatek/mt8192/mt8192-afe-control.c create mode 100644 sound/soc/mediatek/mt8192/mt8192-afe-gpio.c create mode 100644 sound/soc/mediatek/mt8192/mt8192-afe-gpio.h create mode 100644 sound/soc/mediatek/mt8192/mt8192-afe-pcm.c create mode 100644 sound/soc/mediatek/mt8192/mt8192-dai-adda.c create mode 100644 sound/soc/mediatek/mt8192/mt8192-dai-i2s.c create mode 100644 sound/soc/mediatek/mt8192/mt8192-dai-pcm.c create mode 100644 sound/soc/mediatek/mt8192/mt8192-dai-tdm.c create mode 100644 sound/soc/mediatek/mt8192/mt8192-interconnection.h create mode 100644 sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c create mode 100644 sound/soc/mediatek/mt8192/mt8192-reg.h -- 2.18.0 commit c02bb16b0e826bf0e19aa42c3ae60ea339f32cf5 Author: Zhang Qilong Date: Tue Nov 3 22:09:10 2020 +0800 spi: spi-mem: fix reference leak in spi_mem_access_start pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to pm_runtime_put_noidle will result in reference leak in spi_mem_access_start, so we should fix it. Fixes: f86c24f479530 ("spi: spi-mem: Split spi_mem_exec_op() code") Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20201103140910.3482-1-zhangqilong3@huawei.com Signed-off-by: Mark Brown commit 7e9a2387c5fdfb3121249b216382ec28e36d5612 Author: Shuming Fan Date: Wed Nov 4 17:20:05 2020 +0800 ASoC: rt1015: support TDM slot configuration Add TDM slot callback function to support TDM configuration Signed-off-by: Shuming Fan Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20201104092005.2227-1-shumingf@realtek.com Signed-off-by: Mark Brown commit 4a232122124bcbc241b8099c2f98a62c79699324 Author: Jiaxin Yu Date: Tue Nov 3 15:59:38 2020 +0800 dt-bindings: mediatek: mt8192: add mt8192-mt6358-rt1015-rt5682 document This patch adds document for the machine board with mt6358, rt1015 and rt5682. Signed-off-by: Jiaxin Yu Link: https://lore.kernel.org/r/1604390378-23993-10-git-send-email-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown commit 18b13ff23fab34a9d35cec60ed19aceab61dc3f9 Author: Jiaxin Yu Date: Tue Nov 3 15:59:37 2020 +0800 ASoC: mediatek: mt8192: add machine driver with mt6359, rt1015 and rt5682 This patch adds support for the machine board with mt6359, rt1015 and rt5682. Signed-off-by: Jiaxin Yu Link: https://lore.kernel.org/r/1604390378-23993-9-git-send-email-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown commit 1afc60e00de3abbb6c559da409c5c1bb8c1d98ec Author: Jiaxin Yu Date: Tue Nov 3 15:59:36 2020 +0800 dt-bindings: mediatek: mt8192: add audio afe document This patch adds mt8192 audio afe document. Signed-off-by: Jiaxin Yu Link: https://lore.kernel.org/r/1604390378-23993-8-git-send-email-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown commit 52fcd65414abfcf31206d9d8ac6dba9cc1cbbf85 Author: Jiaxin Yu Date: Tue Nov 3 15:59:35 2020 +0800 ASoC: mediatek: mt8192: support tdm in platform driver This patch adds mt8192 tdm dai driver. Signed-off-by: Jiaxin Yu Link: https://lore.kernel.org/r/1604390378-23993-7-git-send-email-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown commit c63b7866011e63038d32bc37f3abd0deabbc34f6 Author: Jiaxin Yu Date: Tue Nov 3 15:59:34 2020 +0800 ASoC: mediatek: mt8192: support pcm in platform driver This patch adds mt8192 pcm dai driver. Signed-off-by: Jiaxin Yu Link: https://lore.kernel.org/r/1604390378-23993-6-git-send-email-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown commit 607ac48595640d549a769f0dde0732e69c3a6c03 Author: Jiaxin Yu Date: Tue Nov 3 15:59:33 2020 +0800 ASoC: mediatek: mt8192: support adda in platform driver This patch adds mt8192 adda dai driver. Signed-off-by: Jiaxin Yu Link: https://lore.kernel.org/r/1604390378-23993-5-git-send-email-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown commit 2c37b4ed730bc45e936794031a2fa13d75fb4572 Author: Jiaxin Yu Date: Tue Nov 3 15:59:32 2020 +0800 ASoC: mediatek: mt8192: support i2s in platform driver This patch adds mt8192 i2s dai driver. Signed-off-by: Jiaxin Yu Link: https://lore.kernel.org/r/1604390378-23993-4-git-send-email-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown commit 125ab5d588b0b3b842064c4d53a666ca74521ae8 Author: Jiaxin Yu Date: Tue Nov 3 15:59:31 2020 +0800 ASoC: mediatek: mt8192: add platform driver This patch adds mt8192 platform and affiliated drivers. Signed-off-by: Jiaxin Yu Link: https://lore.kernel.org/r/1604390378-23993-3-git-send-email-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown commit 682c5a72a2bb0745da73211bed5f47ccccd84025 Author: Jiaxin Yu Date: Tue Nov 3 15:59:30 2020 +0800 ASoC: mediatek: mt6359: add the calibration functions Add the calibraion functions for initializing the codec when registering the machine driver. Signed-off-by: Jiaxin Yu Link: https://lore.kernel.org/r/1604390378-23993-2-git-send-email-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown commit 8d456654839cd4fd10225ffa9c70c64784615f95 Author: Amadeusz Sławiński Date: Fri Oct 30 10:54:27 2020 -0400 ASoC: topology: Simplify remove_widget function Now that enum and mixer kcontrols are freed by resource management framework, removing kcontrol becomes one function call, so simplify code in remove_widget. Reviewed-by: Guennadi Liakhovetski Signed-off-by: Amadeusz Sławiński Reviewed-by: Cezary Rojewski Link: https://lore.kernel.org/r/20201030145427.3497990-7-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 033df362ea3635179d1defed2230be69ed632c05 Author: Amadeusz Sławiński Date: Fri Oct 30 10:54:26 2020 -0400 ASoC: topology: Remove empty functions After changing memory management to resource managed one, some of the functions became no ops, remove them as they are no longer needed. Reviewed-by: Guennadi Liakhovetski Signed-off-by: Amadeusz Sławiński Reviewed-by: Cezary Rojewski Link: https://lore.kernel.org/r/20201030145427.3497990-6-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit ff922622443767b27232eb01bae1d9a8d42df073 Author: Amadeusz Sławiński Date: Fri Oct 30 10:54:25 2020 -0400 ASoC: topology: Change allocations to resource managed In order for topology to be resource managed, change all allocations to be resource managed: k*alloc -> devm_k*alloc kstrdup -> devm_kstrdup Exceptions where non resource managed allocation is left is soc_tplg_dapm_widget_create(), as it uses pointer to memory locally and frees it up after use, as well as soc_tplg_dapm_graph_elems_load(), which has temporary pointer to table of routes. After conversion all redundant calls in error and clean up paths were removed. Also removed some variables which become unneeded when there is no calls using them. Reviewed-by: Guennadi Liakhovetski Signed-off-by: Amadeusz Sławiński Reviewed-by: Cezary Rojewski Link: https://lore.kernel.org/r/20201030145427.3497990-5-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit e59db12b8df3ab07dcfe3540ecdf782d4272f263 Author: Amadeusz Sławiński Date: Fri Oct 30 10:54:24 2020 -0400 ASoC: topology: Unify all device references In few places tplg->comp->dev is used, while everywhere else tplg->dev is being used. Unify those uses towards tplg->dev, as it is being set to comp->dev during initialization anyway. Reviewed-by: Guennadi Liakhovetski Signed-off-by: Amadeusz Sławiński Reviewed-by: Cezary Rojewski Link: https://lore.kernel.org/r/20201030145427.3497990-4-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit a5b8f71c5477f4327c66a085d9714fe298510819 Author: Amadeusz Sławiński Date: Fri Oct 30 10:54:23 2020 -0400 ASoC: topology: Remove multistep topology loading In theory topology can be loaded in multiple steps by providing index to snd_soc_tplg_component_load, however, from usability point of view it doesn't make sense, as can be seen from all current users loading topology in one go. Remove the unnecessary parameter. Reviewed-by: Guennadi Liakhovetski Signed-off-by: Amadeusz Sławiński Reviewed-by: Cezary Rojewski Link: https://lore.kernel.org/r/20201030145427.3497990-3-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 841fb1096713bdd85cb2484557623136e10041d2 Author: Amadeusz Sławiński Date: Fri Oct 30 10:54:22 2020 -0400 ASoC: topology: Remove unused functions from topology API Topology API exposes snd_soc_tplg_widget_remove and snd_soc_tplg_widget_remove_all, but both are nowhere used. All current users load and unload topology as a whole. As following commits introduce resource managed memory, remove them to simplify code and reduce maintenance burden. Reviewed-by: Guennadi Liakhovetski Signed-off-by: Amadeusz Sławiński Reviewed-by: Cezary Rojewski Link: https://lore.kernel.org/r/20201030145427.3497990-2-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 01be83eea08d6d9f9209843e2e084505fba4053f Merge: 45ff510517f3b 9d820f68b2bdb Author: Thomas Gleixner Date: Wed Nov 4 18:14:52 2020 +0100 Merge branch 'core/urgent' into core/entry Pick up the entry fix before further modifications. commit 24e146cdf9f5a8fb464dd98ba8357d662d37d22f Author: Simon Ser Date: Tue Nov 3 10:31:15 2020 +0000 drm: unify formatting for color management documentation Other properties are documented with a colon character after the property name. Consistently using a colon character allows the docs to be machine-readable. Signed-off-by: Simon Ser Cc: Daniel Vetter Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/7dhjUKqlDC0IiRRON0VhWnkuoxcRDLG4EFKzyhcEA@cp7-web-043.plabs.ch commit 5785dd7a8ef0de8049f40a1a109de6a1bf17b479 Author: Akhil P Oommen Date: Wed Oct 28 20:05:11 2020 +0530 drm/msm: Fix duplicate gpu node in icc summary The dev_pm_opp_of_add_table() api initializes the icc nodes for gpu indirectly. So we can avoid using of_icc_get() api in the common probe path. To improve this, move of_icc_get() to target specific code where it is required. This patch helps to fix duplicate gpu node listed in the interconnect summary from the debugfs. Signed-off-by: Akhil P Oommen Signed-off-by: Rob Clark commit cccdeda362fafd0613b571affe7199eb7d8f3fba Author: Dmitry Baryshkov Date: Tue Oct 27 13:23:04 2020 +0300 drm/msm/dpu: fix clock scaling on non-sc7180 board c33b7c0389e1 ("drm/msm/dpu: add support for clk and bw scaling for display") has added support for handling bandwidth voting in kms path in addition to old mdss path. However this broke all other platforms since _dpu_core_perf_crtc_update_bus() will now error out instead of properly calculating bandwidth and core clocks. Fix _dpu_core_perf_crtc_update_bus() to just skip bandwidth setting instead of returning an error in case kms->num_paths == 0 (MDSS is used for bandwidth management). Signed-off-by: Dmitry Baryshkov Fixes: c33b7c0389e1 ("drm/msm/dpu: add support for clk and bw scaling for display") Reviewed-by: Abhinav Kumar Signed-off-by: Rob Clark commit 3e79527a33a83b1720a3d989b584ced67ef401ee Author: Dmitry Baryshkov Date: Thu Oct 22 16:16:58 2020 +0300 drm/msm/dpu: enable merge_3d support on sm8150/sm8250 Handle new merge_3d block setup in dpu encoder code. Pass correct mode and id. Note, that merge_3d blocks are not handled via usual RM reservation mechanism, as each merge_3d block is tied to two PPs, so by reserving PP you get merge_3d automatically. Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark commit 9ffd0e8569937c7c583597f6492f8a6cef744f49 Author: Dmitry Baryshkov Date: Thu Oct 22 16:16:57 2020 +0300 drm/msm/dpu: setup merge modes in merge_3d block Handle setting up merge mode in merge_3d hardware block. Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark commit c40e6c6733a0b6a8bdcf4a7cb0f50697c86723cb Author: Dmitry Baryshkov Date: Thu Oct 22 16:16:56 2020 +0300 drm/msm/dpu: handle merge_3d configuration in hw_ctl block Active HW CTL blocks need separate handling for merge_3d flushes. Implement necessary merge_3d configuration and flushing. Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark commit 4369c93cf36bc57d0b317ae0529a440e71d25280 Author: Dmitry Baryshkov Date: Thu Oct 22 16:16:55 2020 +0300 drm/msm/dpu: initial support for merge3D hardware block Add initial support for merge3D hardware block on SM8[12]50. Merge3D is reposible for merging contents of two LMs (two PPs) into single interface. Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark commit d8199c85f3e447717cfc530ce114f7c8fbc0982c Author: Dmitry Baryshkov Date: Thu Oct 22 16:16:54 2020 +0300 drm/msm/dpu: simplify interface flush handling Instead of calling 4 callbacks to set pending masks, call just one to update both pending_flush_mask and pending_intf_flush mask. Note, that CMD mode support incorrectly did not update pending_intf_flush mask, breaking CMD support on SC7180/SM8x50. Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark commit a04c696c0a5494fb0ce5be4d9a5196e7f6dad4c6 Author: Akhil P Oommen Date: Mon Oct 19 18:49:17 2020 +0530 drm/msm: Implement shutdown callback for adreno Implement the shutdown callback for adreno gpu platform device to safely shutdown it before a system reboot. This helps to avoid futher transactions from gpu after the smmu is moved to bypass mode. Signed-off-by: Akhil P Oommen Signed-off-by: Rob Clark commit ab38764752e0786a04d34be8b09b49f159631ec9 Author: Kuogee Hsieh Date: Tue Oct 20 15:04:54 2020 -0700 drm/msm/dp: add opp_table corner voting support base on dp_ink_clk rate Set link rate by using OPP set rate api so that CX level will be set accordingly based on the link rate. Changes in v2: -- remove dev from dp_ctrl_put() parameters -- Add more information to commit message Changes in v3: -- return when dev_pm_opp_set_clkname() failed Signed-off-by: Kuogee Hsieh Signed-off-by: Rob Clark commit dd29bd41d4c6e1fc837a28f9a68bf344500dcced Author: Tian Tao Date: Mon Oct 19 14:04:22 2020 +0800 drm/msm: Remove redundant null check clk_prepare_enable() and clk_disable_unprepare() will check NULL clock parameter, so It is not necessary to add additional checks. Signed-off-by: Tian Tao Reviewed-by: Jordan Crouse Signed-off-by: Rob Clark commit e92ce317fbeb79d1e3869324059e1a47294dab18 Author: Dmitry Baryshkov Date: Thu Oct 15 22:03:32 2020 +0300 drm/msm/dsi_phy_10nm: implement PHY disabling Implement phy_disable() callback to disable DSI PHY lanes and blocks when phy is not used. Signed-off-by: Dmitry Baryshkov Fixes: ff73ff194060 ("drm/msm/dsi: Populate the 10nm PHY funcs") Signed-off-by: Rob Clark commit b66ccc571319627931e3e61a72747329387eab45 Author: Dmitry Baryshkov Date: Thu Oct 15 22:03:31 2020 +0300 drm/msm/dsi_phy_7nm: implement PHY disabling Implement phy_disable() callback to disable DSI PHY lanes and blocks when phy is not used. Signed-off-by: Dmitry Baryshkov Fixes: 1ef7c99d145c ("drm/msm/dsi: add support for 7nm DSI PHY/PLL") Signed-off-by: Rob Clark commit a4ccc37693a271330a46208afbeaed939d54fdbb Author: Dmitry Baryshkov Date: Thu Oct 15 22:03:30 2020 +0300 drm/msm/dsi_pll_10nm: restore VCO rate during restore_state PHY disable/enable resets PLL registers to default values. Thus in addition to restoring several registers we also need to restore VCO rate settings. Signed-off-by: Dmitry Baryshkov Fixes: c6659785dfb3 ("drm/msm/dsi/pll: call vco set rate explicitly") Signed-off-by: Rob Clark commit 5047ab95bb7db0e7b2ecfd5e9bcafc7fd822c652 Author: Dmitry Baryshkov Date: Thu Oct 15 22:03:29 2020 +0300 drm/msm/dsi_pll_7nm: restore VCO rate during restore_state PHY disable/enable resets PLL registers to default values. Thus in addition to restoring several registers we also need to restore VCO rate settings. Signed-off-by: Dmitry Baryshkov Fixes: 1ef7c99d145c ("drm/msm/dsi: add support for 7nm DSI PHY/PLL") Signed-off-by: Rob Clark commit 91693cbc13c2eebaa2bffb685cc7cb6d561f33ec Author: Stephen Boyd Date: Mon Sep 28 12:16:57 2020 -0700 drm/msm/dpu: Add newline to printks Printk messages need newlines. Add it here. Cc: Abhinav Kumar Cc: Jeykumar Sankaran Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") Signed-off-by: Stephen Boyd Reviewed-by: Abhinav Kumar Signed-off-by: Rob Clark commit 6625e2637d93d2f52ef0d17656f21bfa2cb4983a Author: Tanmay Shah Date: Fri Sep 25 21:50:48 2020 -0700 drm/msm/dp: DisplayPort PHY compliance tests fixup Bandwidth code was being used as test link rate. Fix this by converting bandwidth code to test link rate Do not reset voltage and pre-emphasis level during IRQ HPD attention interrupt. Also fix pre-emphasis parsing during test link status process Signed-off-by: Tanmay Shah Fixes: 8ede2ecc3e5e ("drm/msm/dp: Add DP compliance tests on Snapdragon Chipsets") Reviewed-by: Stephen Boyd Signed-off-by: Rob Clark commit c7314613226a05758bb8c5a350521959c7db4ea9 Author: Tian Tao Date: Fri Sep 25 11:41:48 2020 +0800 drm/msm: Add missing struct identifier fix warnings reported by make W=1 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c:195: warning: cannot understand function prototype: 'const struct dpu_intr_reg dpu_intr_set[] = ' drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c:252: warning: cannot understand function prototype: 'const struct dpu_irq_type dpu_irq_map[] = ' Signed-off-by: Tian Tao Signed-off-by: Rob Clark commit 789eb04b6c569e3e5007afd040bef5d7216d2f3a Author: Alexandru Stan Date: Wed Oct 21 22:04:45 2020 -0700 backlight: pwm_bl: Fix interpolation The previous behavior was a little unexpected, its properties/problems: 1. It was designed to generate strictly increasing values (no repeats) 2. It had quantization errors when calculating step size. Resulting in unexpected jumps near the end of some segments. Example settings: brightness-levels = <0 1 2 4 8 16 32 64 128 256>; num-interpolated-steps = <16>; Whenever num-interpolated-steps was larger than the distance between 2 consecutive brightness levels the table would get really discontinuous. The slope of the interpolation would stick with integers only and if it was 0 the whole line segment would get skipped. The distances between 1 2 4 and 8 would be 1 (property #1 fighting us), and only starting with 16 it would start to interpolate properly. Property #1 is not enough. The goal here is more than just monotonically increasing. We should still care about the shape of the curve. Repeated points might be desired if we're in the part of the curve where we want to go slow (aka slope near 0). Problem #2 is plainly a bug. Imagine if the 64 entry was 63 instead, the calculated slope on the 32-63 segment will be almost half as it should be. The most expected and simplest algorithm for interpolation is linear interpolation, which would handle both problems. Let's just implement that! Take pairs of points from the brightness-levels array and linearly interpolate between them. On the X axis (what userspace sees) we'll now have equally sized intervals (num-interpolated-steps sized, as opposed to before where we were at the mercy of quantization). Signed-off-by: Alexandru Stan Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit c35f638fc2adbb9c439ce68b559d406387cbdbe8 Author: Jiri Slaby Date: Thu Oct 29 12:32:22 2020 +0100 vt: keyboard, use tty_insert_flip_string in puts_queue 'puts_queue' currently loops over characters and employs the full tty buffer machinery for every character. Do the buffer allocation only once and copy all the character at once. This is achieved using tty_insert_flip_string instead of loop+tty_insert_flip_char. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20201029113222.32640-17-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 2389cdc36007ba28ebe6640d7dd5e3494318a909 Author: Jiri Slaby Date: Thu Oct 29 12:32:21 2020 +0100 vt: keyboard, use find_next_bit in kbd_match Instead of a 'for' loop with 'test_bit's to find a bit in a range, use find_next_bit to achieve the same in a simpler and faster manner. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20201029113222.32640-16-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 6dee84d6bed747653914298a8913e91391a2ce10 Author: Jiri Slaby Date: Thu Oct 29 12:32:20 2020 +0100 vt: keyboard, make HW_RAW a function Instead of a multiline macro, convert HW_RAW to an inline function. It allows for type checking of the parameter. And given we split the code into two tests, it is now more readable too. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20201029113222.32640-15-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit cb58a5046095c0b28031f1f412c27ce21df604ae Author: Jiri Slaby Date: Thu Oct 29 12:32:19 2020 +0100 vt: keyboard, union perm checks in vt_do_kdgkb_ioctl Do the permission check on a single place. That is where perm is really checked. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20201029113222.32640-14-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 2374a045263b47f763571ec87ad7c65ea505188a Author: Jiri Slaby Date: Thu Oct 29 12:32:18 2020 +0100 vt: keyboard, remove unneeded func_* declarations Now that we removed the ugly handling of func_buf, remove unneeded declarations of func_* variables. The definitions are in the generated defkeymap.c_shipped, so we cannot really remove them (but we would love to). Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20201029113222.32640-13-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 4e1404a5cd043672e8039fe6f440d0b09c916303 Author: Jiri Slaby Date: Thu Oct 29 12:32:17 2020 +0100 vt: keyboard, extract and simplify vt_kdskbsent Setting of function key strings is now very complex. It uses a global buffer 'func_buf' which is prefilled in defkeymap.c_shipped. Then there is also an index table called 'func_table'. So initially, we have something like this: char func_buf[] = "\e[[A\0" // for F1 "\e[[B\0" // for F2 ...; char *func_table[] = { func_buf + 0, // for F1 func_buf + 5, // for F2 ... } When a user changes some specific func string by KDSKBSENT, it is changed in 'func_buf'. If it is shorter or equal to the current one, it is handled by a very quick 'strcpy'. When the user's string is longer, the whole 'func_buf' is reallocated to allow expansion somewhere in the middle. The buffer before the user's string is copied, the user's string appended and the rest appended too. Now, the index table (func_table) needs to be recomputed, of course. One more complication is the held spinlock -- we have to unlock, reallocate, lock again and do the whole thing again to be sure noone raced with us. In this patch, we chose completely orthogonal approach: when the user's string is longer than the current one, we simply assign the 'kstrdup'ed copy to the index table (func_table) and modify func_buf in no way. We only need to make sure we free the old entries. So we need a bitmap is_kmalloc and free the old entries (but not the original func_buf rodata string). Also note that we do not waste so much space as previous approach. We only allocate space for single entries which are longer, while before, the whole buffer was duplicated plus space for the longer string. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20201029113222.32640-12-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 07edff9265204e15c9fc8d07cc69e38c4c484e15 Author: Jiri Slaby Date: Thu Oct 29 12:32:16 2020 +0100 vt: keyboard, reorder user buffer handling in vt_do_kdgkb_ioctl KDGKBSENT (the getter) needs only 'user_kdgkb->kb_func' from the userspace, i.e. the index. Then it needs a buffer for a local copy of 'kb_string'. KDSKBSENT (the setter) needs a copy up to the length of 'user_kdgkb->kb_string'. That means, we obtain the index before the switch-case and use it in both paths and: 1) allocate full space in the getter case, and 2) copy the string only in the setter case. We do it by strndup_user helper now which was not available when this function was written. Given we copy the two members of 'struct kbsentry' separately, we no longer need a local definition. Hence we need to change all the sizeofs here too. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20201029113222.32640-11-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 9788c950ed4ad2020a7f2e8231abaf77e49d871a Author: Jiri Slaby Date: Thu Oct 29 12:32:15 2020 +0100 vt: keyboard, rename i to kb_func in vt_do_kdgkb_ioctl There are too many one-letter variables in vt_do_kdgkb_ioctl which is rather confusing. Rename 'i' to 'kb_func' and change its type to be the same as its originating value (struct kbsentry.kb_func) -- unsigned char. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20201029113222.32640-10-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit fe45d6578610caab01d0728878527046f0e023f8 Author: Jiri Slaby Date: Thu Oct 29 12:32:14 2020 +0100 vt: keyboard, use bool for rep rep is used as a bool in the code, so declare it as such. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20201029113222.32640-9-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 2939840c998de5f688ffa7cd6a2d490b00d67832 Author: Jiri Slaby Date: Thu Oct 29 12:32:13 2020 +0100 vt: keyboard, use DECLARE_BITMAP for key_down key_down is sued as a bitmap using test_bit, set_bit and similar. So declare it using DECLARE_BITMAP to make it obvious even from the declaration. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20201029113222.32640-8-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit ee1cf8a58273d53ef56c578810f2a94b1aeb55a4 Author: Jiri Slaby Date: Thu Oct 29 12:32:12 2020 +0100 vt: keyboard, union perm checks in vt_do_kdsk_ioctl Do the permission check on a single place. That is where perm is really checked. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20201029113222.32640-7-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit fe6416e126cc17c0454c9c32d06b81a4e58ed8b7 Author: Jiri Slaby Date: Thu Oct 29 12:32:11 2020 +0100 vt: keyboard, extract vt_kdgkbent and vt_kdskbent Split vt_do_kdsk_ioctl into three functions: * getter (KDGKBENT/vt_kdgkbent) * setter (KDSKBENT/vt_kdskbent) * switch-case helper (vt_do_kdsk_ioctl) This eliminates the need of ugly one-letter macros as we use parameters now: * i aka tmp.kb_index -> idx * s aka tmp.kb_table -> map * v aka tmp.kb_value -> val Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20201029113222.32640-6-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit e27979dace0438fabc0a8e882356d20f532eb1e3 Author: Jiri Slaby Date: Thu Oct 29 12:32:10 2020 +0100 vt: keyboard, clean up max_vals Define one limit per line and index them by their index, so that it is clear what is what. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20201029113222.32640-5-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit ee49df4505347daa68d87e318503d2037154ee6a Author: Jiri Slaby Date: Thu Oct 29 12:32:09 2020 +0100 vt: keyboard, sort key types by their number KT_LETTER was numerically missorted. So sort all KT_* entries. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20201029113222.32640-4-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 877a9c6a0439afbb2675e4e70ca4216912124772 Author: Jiri Slaby Date: Thu Oct 29 12:32:08 2020 +0100 vt: keyboard, sort includes There are many includes and it is hard to check if something is there or not. So sort them alphabetically. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20201029113222.32640-3-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 0df97c7b5b1878273925483cf43fd67df7613d84 Author: Jiri Slaby Date: Thu Oct 29 12:32:07 2020 +0100 vt: keyboard, include linux/spinlock.h We use spin locks, but don't include linux/spinlock.h in keyboards.c. So fix this up. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20201029113222.32640-2-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 6b8f8313c3174a8caa45ef5319cb9c8dde7cb8a8 Author: Jiri Slaby Date: Thu Oct 29 12:32:06 2020 +0100 vt: keyboard, remove ctrl_alt_del declaration ctrl_alt_del is already declared in linux/reboot.h which we include. So remove this second (superfluous) declaration. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20201029113222.32640-1-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 724ec7c190c1893ea55fd7143e7e1c8c5b61a0e7 Merge: da31de35cd2fb 3cea11cd5e3b0 Author: Greg Kroah-Hartman Date: Wed Nov 4 16:40:32 2020 +0100 Merge 5.10-rc2 into tty-next We need the tty/vt/serial fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit ba8a5cb234ba3bf0a585fd38e5f36d7e7ce33661 Author: Imre Deak Date: Wed Nov 4 03:00:00 2020 +0200 drm/i915/tgl: Fix typo during output setup Fix a typo that led to some MST short pulse event handling issue (the short pulse event was handled for both encoder instances, each having its own state). Fixes: 1d8ca002456b6 ("drm/i915: Add PORT_TCn aliases to enum port") Cc: Ville Syrjälä Cc: Lucas De Marchi Signed-off-by: Imre Deak Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20201104010000.4165574-1-imre.deak@intel.com commit 076aa52e402185e1e347bf5c62c61c6388fce4c7 Author: Sergey Shtylyov Date: Sat Oct 31 23:10:28 2020 +0300 module: only handle errors with the *switch* statement in module_sig_check() Let's handle the successful call of mod_verify_sig() right after that call, making the *switch* statement only handle the real errors, and then move the comment from the first *case* before *switch* itself and the comment before *default* after it. Fix the comment style, add article/comma/dash, spell out "nomem" as "lack of memory" in these comments, while at it... Suggested-by: Joe Perches Reviewed-by: Miroslav Benes Signed-off-by: Sergey Shtylyov Signed-off-by: Jessica Yu commit 10ccd1abb808599a6dc7c9389560016ea3568085 Author: Sergey Shtylyov Date: Sat Oct 31 23:09:31 2020 +0300 module: avoid *goto*s in module_sig_check() Let's move the common handling of the non-fatal errors after the *switch* statement -- this avoids *goto*s inside that *switch*... Suggested-by: Joe Perches Reviewed-by: Miroslav Benes Signed-off-by: Sergey Shtylyov Signed-off-by: Jessica Yu commit 705e9195187d85249fbb0eaa844b1604a98fbc9a Author: Sergey Shtylyov Date: Sat Oct 31 23:06:45 2020 +0300 module: merge repetitive strings in module_sig_check() The 'reason' variable in module_sig_check() points to 3 strings across the *switch* statement, all needlessly starting with the same text. Let's put the starting text into the pr_notice() call -- it saves 21 bytes of the object code (x86 gcc 10.2.1). Suggested-by: Joe Perches Reviewed-by: Miroslav Benes Signed-off-by: Sergey Shtylyov Signed-off-by: Jessica Yu commit 644bf4b0f7acde641d3db200b4db66977e96c3bd Author: John Garry Date: Thu Oct 22 19:02:27 2020 +0800 perf jevents: Add test for arch std events Recently there was an undetected breakage for std arch event support. Add support in "PMU events" testcase to detect such breakages. For this, the "test" arch needs has support added to process std arch events. And a test event is added for the test, ifself. Also add a few code comments to help understand the code a bit better. Committer testing: Before: # perf test -vv pmu |& grep l3_cache_rd # After: # perf test -vv pmu |& grep l3_cache_rd testing event table l3_cache_rd: pass testing aliases PMU cpu: matched event l3_cache_rd # Signed-off-by: John Garry Reviewed-By: Kajol Jain Tested-by: Arnaldo Carvalho de Melo Link: https://lore.kernel.org/r/1603364547-197086-3-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit fa1b41a74d1136cbdd6960f36d7b9c7aa35c8139 Author: John Garry Date: Thu Oct 22 19:02:26 2020 +0800 perf jevents: Tidy error handling There is much duplication in the error handling for directory transvering for prcessing JSONs. Factor out the common code to tidy a bit. Signed-off-by: John Garry Reviewed-By: Kajol Jain Link: https://lore.kernel.org/r/1603364547-197086-2-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit c5e6bc23355a3b33ffc170f92e315102f1e6a59c Author: Namhyung Kim Date: Fri Oct 23 11:06:28 2020 +0900 perf trace beauty: Allow header files in a different path Current script to generate mmap flags and prot checks headers from the uapi/asm-generic directory but it might come from a different directory in some environment. So change the pattern to accept it. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20201023020628.346257-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 55a4de94c64bacffbcd802c954764e0de2ab217f Author: Andi Kleen Date: Mon Oct 26 17:27:36 2020 -0700 perf stat: Add --quiet option Add a new --quiet option to 'perf stat'. This is useful with 'perf stat record' to write the data only to the perf.data file, which can lower measurement overhead because the data doesn't need to be formatted. On my 4C desktop: % time ./perf stat record -e $(python -c 'print ",".join(["cycles"]*1000)') -a -I 1000 sleep 5 ... real 0m5.377s user 0m0.238s sys 0m0.452s % time ./perf stat record --quiet -e $(python -c 'print ",".join(["cycles"]*1000)') -a -I 1000 sleep 5 real 0m5.452s user 0m0.183s sys 0m0.423s In this example it cuts the user time by 20%. On systems with more cores the savings are higher. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Cc: Alexey Budankov Link: http://lore.kernel.org/lkml/20201027002737.30942-1-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo commit bb1c15b60b981d1065d7766ccf9de6c32beedfa3 Author: Namhyung Kim Date: Tue Oct 27 16:28:55 2020 +0900 perf stat: Support regex pattern in --for-each-cgroup To make the command line even more compact with cgroups, support regex pattern matching in cgroup names. $ perf stat -a -e cpu-clock,cycles --for-each-cgroup ^foo sleep 1 3,000.73 msec cpu-clock foo # 2.998 CPUs utilized 12,530,992,699 cycles foo # 7.517 GHz (100.00%) 1,000.61 msec cpu-clock foo/bar # 1.000 CPUs utilized 4,178,529,579 cycles foo/bar # 2.506 GHz (100.00%) 1,000.03 msec cpu-clock foo/baz # 0.999 CPUs utilized 4,176,104,315 cycles foo/baz # 2.505 GHz (100.00%) 1.000892614 seconds time elapsed Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Mark Rutland Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20201027072855.655449-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 9b0a7836359443227c9af101f7aea8412e739458 Author: Namhyung Kim Date: Tue Oct 27 16:28:54 2020 +0900 perf test: Use generic event for expand_libpfm_events() I found that the UNHALTED_CORE_CYCLES event is only available in the Intel machines and it makes other vendors/archs fail on the test. As libpfm4 can parse the generic events like cycles, let's use them. Fixes: 40b74c30ffb9 ("perf test: Add expand cgroup event test") Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20201027072855.655449-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 1218838d68f5e9cc195685f17375be96a54832c7 Author: Sergey Senozhatsky Date: Tue Oct 27 15:24:21 2020 +0900 perf kvm: Add kvm-stat for arm64 Add support for 'perf kvm stat' on arm64 platform. Example: # perf kvm stat report Analyze events for all VMs, all VCPUs: VM-EXIT Samples Samples% Time% Min Time Max Time Avg time DABT_LOW 661867 98.91% 40.45% 2.19us 3364.65us 6.24us ( +- 0.34% ) IRQ 4598 0.69% 57.44% 2.89us 3397.59us 1276.27us ( +- 1.61% ) WFx 1475 0.22% 1.71% 2.22us 3388.63us 118.31us ( +- 8.69% ) IABT_LOW 1018 0.15% 0.38% 2.22us 2742.07us 38.29us ( +- 12.55% ) SYS64 180 0.03% 0.01% 2.07us 112.91us 6.57us ( +- 14.95% ) HVC64 17 0.00% 0.01% 2.19us 322.35us 42.95us ( +- 58.98% ) Total Samples:669155, Total events handled time:10216387.86us. Signed-off-by: Sergey Senozhatsky Reviewed-by: Leo Yan Tested-by: Leo Yan Cc: John Garry Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: Suleiman Souhlal Link: http://lore.kernel.org/lkml/20201027062421.463355-1-sergey.senozhatsky@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit ef0580ecd8b0306acf09b7a7508d72cafc67896d Author: Arnaldo Carvalho de Melo Date: Tue Oct 20 15:57:21 2020 -0300 perf env: Conditionally compile BPF support code on having HAVE_LIBBPF_SUPPORT If libbpf isn't selected, no need for a bunch of related code, that were not even being used, as code using these perf_env methods was also enclosed in HAVE_LIBBPF_SUPPORT. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 20e88c6076fc50ebf0560e730349000ff2da94fd Author: Arnaldo Carvalho de Melo Date: Tue Oct 20 15:48:23 2020 -0300 perf annotate: Move bpf header inclusion to inside HAVE_LIBBPF_SUPPORT No need to include it otherwise. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 38219f24116ace9b0e604f2ced9c7dbef3041058 Author: Arnaldo Carvalho de Melo Date: Tue Oct 20 15:00:51 2020 -0300 perf tests: Skip the llvm and bpf tests if HAVE_LIBBPF_SUPPORT isn't defined If either NO_LIBBPF=1 is passed, explicitely disabling it or if libbpf is not available due to some missing dependency, skip its tests, telling the user the feature isn't available. # perf test 40: LLVM search and compile : Skip (not compiled in) 41: Session topology : Ok 42: BPF filter : Skip (not compiled in) Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit c18cf78d7969db89934587fa476220eefe7bd4bd Author: Arnaldo Carvalho de Melo Date: Tue Oct 20 14:12:37 2020 -0300 perf bpf: Enclose libbpf.h include within HAVE_LIBBPF_SUPPORT As it uses the 'deprecated' attribute in a way that breaks the build with old gcc compilers, so to continue being able to build in such systems where NO_LIBBPF=1 is being used, enclose it under HAVE_LIBBPF_SUPPORT. 1 centos:6 : FAIL gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-23) 2 oraclelinux:6 : FAIL gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-23.0.1) CC /tmp/build/perf/builtin-record.o In file included from util/bpf-loader.h:11, from builtin-record.c:39: /git/linux/tools/lib/bpf/libbpf.h:203: error: wrong number of arguments specified for 'deprecated' attribute Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit cc3b964d5eb49d0c9da08760f8760bb6945f1df5 Author: Tommi Rantala Date: Fri Oct 16 16:16:50 2020 +0300 perf test: Implement skip_reason callback for watchpoint tests Currently reason for skipping the read only watchpoint test is only seen when running in verbose mode: $ perf test watchpoint 23: Watchpoint : 23.1: Read Only Watchpoint : Skip 23.2: Write Only Watchpoint : Ok 23.3: Read / Write Watchpoint : Ok 23.4: Modify Watchpoint : Ok $ perf test -v watchpoint 23: Watchpoint : 23.1: Read Only Watchpoint : --- start --- test child forked, pid 60204 Hardware does not support read only watchpoints. test child finished with -2 Implement skip_reason callback for the watchpoint tests, so that it's easy to see reason why the test is skipped: $ perf test watchpoint 23: Watchpoint : 23.1: Read Only Watchpoint : Skip (missing hardware support) 23.2: Write Only Watchpoint : Ok 23.3: Read / Write Watchpoint : Ok 23.4: Modify Watchpoint : Ok Signed-off-by: Tommi Rantala Tested-by: Arnaldo Carvalho de Melo Acked-by: Namhyung Kim Link: https://lore.kernel.org/r/20201016131650.72476-1-tommi.t.rantala@nokia.com Signed-off-by: Arnaldo Carvalho de Melo commit 248dd9b591db5bc5fb46a0e015753cfcfe60a345 Author: Leo Yan Date: Mon Oct 19 18:02:36 2020 +0800 perf tests tsc: Add checking helper is_supported() So far tsc is enabled on x86_64, i386 and Arm64 architectures, add checking helper to skip this testing for other architectures. Signed-off-by: Leo Yan Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Link: https://lore.kernel.org/r/20201019100236.23675-3-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 3989bbf9607d6716900d9df91c46a2ce8a504b93 Author: Leo Yan Date: Mon Oct 19 18:02:35 2020 +0800 perf tests tsc: Make tsc testing as a common testing x86 arch provides the testing for conversion between tsc and perf time, the testing is located in x86 arch folder. Move this testing out from x86 arch folder and place it into the common testing folder, so allows to execute tsc testing on other architectures (e.g. Arm64). This patch removes the inclusion of "arch-tests.h" from the testing code, this can avoid building failure if any arch has no this header file. Committer testing: $ perf test -v tsc Couldn't bump rlimit(MEMLOCK), failures may take place when creating BPF maps, etc 70: Convert perf time to TSC : --- start --- test child forked, pid 4032834 mmap size 528384B 1st event perf time 165409788843605 tsc 336578703793868 rdtsc time 165409788854986 tsc 336578703837038 2nd event perf time 165409788855487 tsc 336578703838935 test child finished with 0 ---- end ---- Convert perf time to TSC: Ok $ Signed-off-by: Leo Yan Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Link: https://lore.kernel.org/r/20201019100236.23675-2-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 0ee281e1e4e12f8c09b99f80a2482a55cd7d6bca Author: Leo Yan Date: Mon Oct 19 08:36:13 2020 +0800 perf mem2node: Improve warning if detected no memory nodes Some archs (e.g. x86 and Arm64) don't enable the configuration CONFIG_MEMORY_HOTPLUG by default, if this configuration is not enabled when build the kernel image, the SysFS for memory nodes will be missed. This results in perf tool has no chance to catpure the memory nodes information, when perf tool reports the result and detects no memory nodes, it outputs "assertion failed at util/mem2node.c:99". The output log doesn't give out reason for the failure and users have no clue for how to fix it. This patch changes to use explicit way for warning: it tells user that detected no memory nodes and suggests to enable CONFIG_MEMORY_HOTPLUG for kernel building. Signed-off-by: Leo Yan Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20201019003613.8399-1-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit a7c77c4f52c80fffc53b4c616a95f96d57170933 Author: Ian Rogers Date: Mon Oct 19 16:25:45 2020 -0700 perf version: Add a feature for libpfm4 If perf is built with libpfm4 (LIBPFM4=1) then advertise it in perf -vv. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20201019232545.4047264-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit a701d28e2d997705ae4376753af6e35b20029cef Author: Dengcheng Zhu Date: Mon Oct 19 15:21:24 2020 +0800 perf annotate mips: Add perf arch instructions annotate handlers Support the MIPS architecture using the ins_ops association method. With this patch, perf-annotate can work well on MIPS. Testing it with a perf.data file collected on a mips machine: $./perf annotate -i perf.data : Disassembly of section .text: : : 00000000000be6a0 : : get_next_seq(): 0.00 : be6a0: lw v0,0(a0) 0.00 : be6a4: daddiu sp,sp,-128 0.00 : be6a8: ld a7,72(a0) 0.00 : be6ac: gssq s5,s4,80(sp) 0.00 : be6b0: gssq s1,s0,48(sp) 0.00 : be6b4: gssq s8,gp,112(sp) 0.00 : be6b8: gssq s7,s6,96(sp) 0.00 : be6bc: gssq s3,s2,64(sp) 0.00 : be6c0: sd a3,0(sp) 0.00 : be6c4: move s0,a0 0.00 : be6c8: sd v0,32(sp) 0.00 : be6cc: sd a5,8(sp) 0.00 : be6d0: sd zero,8(a0) 0.00 : be6d4: sd a6,16(sp) 0.00 : be6d8: ld s2,48(a0) 8.53 : be6dc: ld s1,40(a0) 9.42 : be6e0: ld v1,32(a0) 0.00 : be6e4: nop 0.00 : be6e8: ld s4,24(a0) 0.00 : be6ec: ld s5,16(a0) 0.00 : be6f0: sd a7,40(sp) 10.11 : be6f4: ld s6,64(a0) ... The original patch link: https://lore.kernel.org/patchwork/patch/1180480/ Signed-off-by: Dengcheng Zhu Cc: Dengcheng Zhu Cc: Jiaxun Yang Cc: Peter Zijlstra Cc: Xuefeng Li Cc: linux-mips@vger.kernel.org [ fanpeng@loongson.cn: Add missing "bgtzl", "bltzl", "bgezl", "blezl", "beql" and "bnel" for pre-R6processors ] Signed-off-by: Peng Fan Signed-off-by: Arnaldo Carvalho de Melo commit 1dd88c195d59b79f0a974618cdf723f74c192b52 Author: Alexey Budankov Date: Mon Oct 19 20:18:12 2020 +0300 doc/admin-guide: Document creation of CAP_PERFMON privileged shell Document steps to create CAP_PERFMON privileged shell to unblock Perf tool usage in cases when capabilities can't be assigned to an executable due to limitations of used file system. Suggested-by: Andi Kleen Signed-off-by: Alexey Budankov Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: linux-doc@vger.kernel.org Cc: linux-man@vger.kernel.org Cc: linux-security-module@vger.kernel.org Link: http://lore.kernel.org/lkml/0abda956-de6c-95b1-61e8-49e146501079@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 4cb3fb1cd96f9e9a2c5095db42c2d7adbd5c5af9 Author: Alexey Budankov Date: Mon Oct 19 20:16:49 2020 +0300 doc/admin-guide: Note credentials consolidation under CAP_PERFMON Add note that starting from Linux v5.9 CAP_PERFMON Linux capability is enough to conduct performance monitoring and observability using perf_events API. Signed-off-by: Alexey Budankov Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: linux-doc@vger.kernel.org Cc: linux-man@vger.kernel.org Cc: linux-security-module@vger.kernel.org Link: http://lore.kernel.org/lkml/2b1a92a1-84ce-5c70-837d-8ffe96849588@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 0d32c2a72ca8d66378a7ec797ec3bf0a60ef5dcf Author: Yejune Deng Date: Tue Nov 3 09:48:02 2020 +0800 drm/panfrost: Replace devm_reset_control_array_get() devm_reset_control_array_get_optional_exclusive() looks more readable Signed-off-by: Yejune Deng Reviewed-by: Steven Price Signed-off-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/1604368082-6032-1-git-send-email-yejune.deng@gmail.com commit 5ef9998c96b0c99c49c202054586967e609286d2 Author: Alexander Duyck Date: Wed Oct 28 18:55:36 2020 -0700 platform/x86: Intel PMT Crashlog capability driver Add support for the Intel Platform Monitoring Technology crashlog interface. This interface provides a few sysfs values to allow for controlling the crashlog telemetry interface as well as a character driver to allow for mapping the crashlog memory region so that it can be accessed after a crashlog has been recorded. This driver is meant to only support the server version of the crashlog which is identified as crash_type 1 with a version of zero. Currently no other types are supported. Signed-off-by: Alexander Duyck Signed-off-by: David E. Box Reviewed-by: Hans de Goede Signed-off-by: Lee Jones commit 68fe8e6e2c4b04e2733d77834f55a4a0e172b770 Author: Alexander Duyck Date: Wed Oct 28 18:55:35 2020 -0700 platform/x86: Intel PMT Telemetry capability driver PMT Telemetry is a capability of the Intel Platform Monitoring Technology. The Telemetry capability provides access to device telemetry metrics that provide hardware performance data to users from read-only register spaces. With this driver present the intel_pmt directory can be populated with telem devices. These devices will contain the standard intel_pmt sysfs data and a "telem" binary sysfs attribute which can be used to access the telemetry data. Also create a PCI device id list for early telemetry hardware that require workarounds for known issues. Signed-off-by: Alexander Duyck Co-developed-by: David E. Box Signed-off-by: David E. Box Reviewed-by: Andy Shevchenko Reviewed-by: Hans de Goede Signed-off-by: Lee Jones commit e2729113ce66d8d21f729b41bc3ed3feaf1acf69 Author: Alexander Duyck Date: Wed Oct 28 18:55:34 2020 -0700 platform/x86: Intel PMT class driver Intel Platform Monitoring Technology is meant to provide a common way to access telemetry and system metrics. Register mappings are not provided by the driver. Instead, a GUID is read from a header for each endpoint. The GUID identifies the device and is to be used with an XML, provided by the vendor, to discover the available set of metrics and their register mapping. This allows firmware updates to modify the register space without needing to update the driver every time with new mappings. Firmware writes a new GUID in this case to specify the new mapping. Software tools with access to the associated XML file can then interpret the changes. The module manages access to all Intel PMT endpoints on a system, independent of the device exporting them. It creates an intel_pmt class to manage the devices. For each telemetry endpoint, sysfs files provide GUID and size information as well as a pointer to the parent device the telemetry came from. Software may discover the association between endpoints and devices by iterating through the list in sysfs, or by looking for the existence of the class folder under the device of interest. A binary sysfs attribute of the same name allows software to then read or map the telemetry space for direct access. Signed-off-by: Alexander Duyck Signed-off-by: David E. Box Reviewed-by: Hans de Goede Signed-off-by: Lee Jones commit 4f8217d5b0ca8ace78a27dc371b87697eedc421d Author: David E. Box Date: Wed Oct 28 18:55:33 2020 -0700 mfd: Intel Platform Monitoring Technology support Intel Platform Monitoring Technology (PMT) is an architecture for enumerating and accessing hardware monitoring facilities. PMT supports multiple types of monitoring capabilities. This driver creates platform devices for each type so that they may be managed by capability specific drivers (to be introduced). Capabilities are discovered using PCIe DVSEC ids. Support is included for the 3 current capability types, Telemetry, Watcher, and Crashlog. The features are available on new Intel platforms starting from Tiger Lake for which support is added. This patch adds support for Tiger Lake (TGL), Alder Lake (ADL), and Out-of-Band Management Services Module (OOBMSM). Also add a quirk mechanism for several early hardware differences and bugs. For Tiger Lake and Alder Lake, do not support Watcher and Crashlog capabilities since they will not be compatible with future product. Also, fix use a quirk to fix the discovery table offset. Co-developed-by: Alexander Duyck Signed-off-by: Alexander Duyck Signed-off-by: David E. Box Reviewed-by: Andy Shevchenko Reviewed-by: Hans de Goede Signed-off-by: Lee Jones commit 1dc2da5cd51f648de6d1df87e2bc6ea13f72f19c Author: David E. Box Date: Wed Oct 28 18:44:45 2020 -0700 PCI: Add defines for Designated Vendor-Specific Extended Capability Add PCIe Designated Vendor-Specific Extended Capability (DVSEC) and defines for the header offsets. Defined in PCIe r5.0, sec 7.9.6. Signed-off-by: David E. Box Acked-by: Bjorn Helgaas Reviewed-by: Andy Shevchenko Signed-off-by: Lee Jones commit 0ddebf8580fa32b1827dcc5230a6db6260096f5e Author: Andy Shevchenko Date: Mon Nov 2 14:39:11 2020 +0200 pinctrl: lynxpoint: Unify initcall location in the code Like in the other Intel pin control drivers, attach initcalls to the corresponding functions. No functional change intended. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit e789e61f9e852a4cc31042810b34552f6de667b2 Author: Andy Shevchenko Date: Thu Oct 29 13:13:15 2020 +0200 pinctrl: intel: Add Intel Alder Lake-S pin controller support This driver adds pinctrl/GPIO support for Intel Alder Lake-S SoC. The GPIO controller is based on the next generation GPIO hardware but still compatible with the one supported by the Intel core pinctrl/GPIO driver. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit c969afb4e55a2c6eec7c4195f67c5227be991393 Author: Andy Shevchenko Date: Mon Nov 2 14:21:07 2020 +0200 pinctrl: intel: Add Intel Elkhart Lake pin controller support This driver adds pinctrl/GPIO support for Intel Elkhart Lake SoC. The GPIO controller is based on the next generation GPIO hardware but still compatible with the one supported by the Intel core pinctrl/GPIO driver. Cc: Mika Westerberg Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit c44dfe4de053914cae61ed0a36421b3017f428bd Author: Christian König Date: Mon Nov 2 13:16:13 2020 +0100 drm/ttm: replace context flags with bools v2 The ttm_operation_ctx structure has a mixture of flags and bools. Drop the flags and replace them with bools as well. v2: fix typos, improve comments Signed-off-by: Christian König Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/398686/ commit 586052b0a6062e2fa98189d7f24d8cb9ccf4258b Author: Christian König Date: Mon Nov 2 13:01:53 2020 +0100 drm/ttm: rework no_retry handling v2 During eviction we do want to trigger the OOM killer. Only while doing new allocations we should try to avoid that and return -ENOMEM to the application. v2: rename the flag to gfp_retry_mayfail. Signed-off-by: Christian König Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/398685/ commit f36a74b9345aebaf5d325380df87a54720229d18 Author: David Woodhouse Date: Tue Nov 3 16:36:22 2020 +0000 x86/ioapic: Use I/O-APIC ID for finding irqdomain, not index In commit b643128b917 ("x86/ioapic: Use irq_find_matching_fwspec() to find remapping irqdomain") the I/O-APIC code was changed to find its parent irqdomain using irq_find_matching_fwspec(), but the key used for the lookup was wrong. It shouldn't use 'ioapic' which is the index into its own ioapics[] array. It should use the actual arbitration ID of the I/O-APIC in question, which is mpc_ioapic_id(ioapic). Fixes: b643128b917 ("x86/ioapic: Use irq_find_matching_fwspec() to find remapping irqdomain") Reported-by: lkp Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/57adf2c305cd0c5e9d860b2f3007a7e676fd0f9f.camel@infradead.org commit 179dfb954790410f65605f1c479c029c2cd73c55 Author: Johan Hovold Date: Mon Oct 26 11:44:21 2020 +0100 USB: serial: remove write wait queue The digi_acceleport driver is the only driver still using the port write wake queue so move it to that driver's port data. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 5098e77962e7c8947f87bd8c5869c83e000a522a Author: Johan Hovold Date: Mon Oct 26 11:43:06 2020 +0100 USB: serial: digi_acceleport: fix write-wakeup deadlocks The driver must not call tty_wakeup() while holding its private lock as line disciplines are allowed to call back into write() from write_wakeup(), leading to a deadlock. Also remove the unneeded work struct that was used to defer wakeup in order to work around a possible race in ancient times (see comment about n_tty write_chan() in commit 14b54e39b412 ("USB: serial: remove changelogs and old todo entries")). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit d981059e13ffa9ed03a73472e932d070323bd057 Author: Dexuan Cui Date: Mon Nov 2 17:11:36 2020 -0800 x86/hyperv: Enable 15-bit APIC ID if the hypervisor supports it When a Linux VM runs on Hyper-V, if the VM has CPUs with >255 APIC IDs, the CPUs can't be the destination of IOAPIC interrupts, because the IOAPIC RTE's Dest Field has only 8 bits. Currently the hackery driver drivers/iommu/hyperv-iommu.c is used to ensure IOAPIC interrupts are only routed to CPUs that don't have >255 APIC IDs. However, there is an issue with kdump, because the kdump kernel can run on any CPU, and hence IOAPIC interrupts can't work if the kdump kernel run on a CPU with a >255 APIC ID. The kdump issue can be fixed by the Extended Dest ID, which is introduced recently by David Woodhouse (for IOAPIC, see the field virt_destid_8_14 in struct IO_APIC_route_entry). Of course, the Extended Dest ID needs the support of the underlying hypervisor. The latest Hyper-V has added the support recently: with this commit, on such a Hyper-V host, Linux VM does not use hyperv-iommu.c because hyperv_prepare_irq_remapping() returns -ENODEV; instead, Linux kernel's generic support of Extended Dest ID from David is used, meaning that Linux VM is able to support up to 32K CPUs, and IOAPIC interrupts can be routed to all the CPUs. On an old Hyper-V host that doesn't support the Extended Dest ID, nothing changes with this commit: Linux VM is still able to bring up the CPUs with > 255 APIC IDs with the help of hyperv-iommu.c, but IOAPIC interrupts still can not go to such CPUs, and the kdump kernel still can not work properly on such CPUs. [ tglx: Updated comment as suggested by David ] Signed-off-by: Dexuan Cui Signed-off-by: Thomas Gleixner Acked-by: David Woodhouse Link: https://lore.kernel.org/r/20201103011136.59108-1-decui@microsoft.com commit 8c9108d014c5bd0f0da2e3544eb45dc56a6da92b Author: Lars Poeschel Date: Tue Nov 3 10:58:28 2020 +0100 auxdisplay: add a driver for lcd2s character display This driver allows to use a lcd2s 20x4 character display from Modtronix engineering as an auxdisplay charlcd device. Signed-off-by: Lars Poeschel Signed-off-by: Miguel Ojeda commit 1741b014bd5556219fc9312a9401cad7aa364385 Author: Lars Poeschel Date: Tue Nov 3 10:58:27 2020 +0100 auxdisplay: lcd2s DT binding doc Add a binding doc for the modtronix lcd2s auxdisplay driver. It also adds modtronix to the list of known vendor-prefixes. Reviewed-by: Willy Tarreau Reviewed-by: Rob Herring Signed-off-by: Lars Poeschel Signed-off-by: Miguel Ojeda commit af9470b26dc6c3a8f9ef460c90e34a66ce4f5f1d Author: Lars Poeschel Date: Tue Nov 3 10:58:26 2020 +0100 auxdisplay: charlcd: Do not print chars at end of line Skip printing characters at the end of a display line. This fits to the behaviour we already had, that the cursor is nailed to the last position of a line. This might slightly change behaviour. On hd44780 displays with one or two lines the previous implementation did still write characters to the buffer of the display even if they are currently not visible. The shift_display command could be used to set the "viewing window" to a new position in the buffer and then you could see the characters previously written. This described behaviour does not work for hd44780 displays with more than two display lines. There simply is not enough buffer. So the behaviour was a bit inconsistent across different displays. The new behaviour is to stop writing characters at the end of a visible line, even if there would be room in the buffer. This allows us to have an easy implementation, that should behave equal on all supported displays. This is not hd44780 hardware dependent anymore. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel Signed-off-by: Miguel Ojeda commit 40c2b72e4b11f0a80dff19b539fccf36472dc417 Author: Lars Poeschel Date: Tue Nov 3 10:58:25 2020 +0100 auxdisplay: Change gotoxy calling interface Change the calling interface for gotoxy from supplying the x and y coordinates in the charlcd struct to explicitly supplying x and y in the function arguments. This is more intuitive and allows for moving the cursor to positions independent from the position saved in the charlcd struct. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel Signed-off-by: Miguel Ojeda commit 6e49eea35886c7f7173796d6a646c8c2c0f6149d Author: Lars Poeschel Date: Tue Nov 3 10:58:24 2020 +0100 auxdisplay: charlcd: replace last device specific stuff These are the last bits left in charlcd.c that are device specific and they are removed now. In detail this is: * bwidth, which is the width of the display buffer per line. This is replaced by width of the display. * hwidth, which is the size of the display buffer as a whole. This is replaced by looping all chars of a line by all lines. * the hd44780_common header include can go away. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel Signed-off-by: Miguel Ojeda commit 377cf2cbfdb962579eedf2c29845c463c6973f7e Author: Lars Poeschel Date: Tue Nov 3 10:58:23 2020 +0100 auxdisplay: hd44780: Remove clear_fast We remove the hd44780_clear_fast (display) clear implementation. With the new timeout the normal clear_display is reasonably fast. So there is no need for a clear_fast anymore. Link: https://lore.kernel.org/lkml/20200922092121.GG16421@1wt.eu/ Signed-off-by: Lars Poeschel Signed-off-by: Miguel Ojeda commit 7b231bb5d0bee86afc40db9ddfd50ba39ef73769 Author: Lars Poeschel Date: Tue Nov 3 10:58:22 2020 +0100 auxdisplay: hd44780_common: Reduce clear_display timeout Digging in the hd44780 datasheet revealed that the timeout needed after clearing the whole display is only 1,64ms not 15ms. So we can reduce that timeout. Link: https://lore.kernel.org/lkml/20200922092121.GG16421@1wt.eu/ Link: https://www.crystalfontz.com/controllers/Hitachi/HD44780/433/ Signed-off-by: Lars Poeschel Signed-off-by: Miguel Ojeda commit a2060f288e15a69b2191b7e9df2e3d470e27e433 Author: Lars Poeschel Date: Tue Nov 3 10:58:21 2020 +0100 auxdisplay: Call charlcd_backlight in place This moves the call to charlcd_backlight from the end of the switch into the actual case statement that originates the change of the backlight. This is more consistent to what is now found in this switch. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel Signed-off-by: Miguel Ojeda commit 339acb082987a6b0aa7c67a5a77b29f6c81962f6 Author: Lars Poeschel Date: Tue Nov 3 10:58:20 2020 +0100 auxdisplay: Move char redefine code to hd44780_common Take the code to redefine characters out of charlcd and move it to hd44780_common, as this is hd44780 specific. There is now a function hd44780_common_redefine_char that drivers use and charlcd calls it through its ops function pointer. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel Signed-off-by: Miguel Ojeda commit 8a86270ef0ea5ebc37c9a1223589c1d45c7e07de Author: Lars Poeschel Date: Tue Nov 3 10:58:19 2020 +0100 auxdisplay: cleanup unnecessary hd44780 code in charlcd This cleans up now unnecessary hd44780 specific code from charlcd. We obsoleted this with the last patch. So another chunk of hd44780 specific code can be dropped from charlcd. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel Signed-off-by: Miguel Ojeda commit d2f2187e8f27cd884150acdce7ec96135260413b Author: Lars Poeschel Date: Tue Nov 3 10:58:18 2020 +0100 auxdisplay: implement various hd44780_common_ functions This implements various hd44780_common_ functions for hd44780 compatible display drivers to use. charlcd then calls these functions through its ops function pointer. The functions namely are: - hd44780_common_shift_cursor - hd44780_common_display_shift - hd44780_common_display - hd44780_common_cursor - hd44780_common_blink - hd44780_common_fontsize - hd44780_common_lines Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel Signed-off-by: Miguel Ojeda commit 01ec46dfa633a52ccfe38d4a194460d6adb2ba00 Author: Lars Poeschel Date: Tue Nov 3 10:58:17 2020 +0100 auxdisplay: Move init_display to hd44780_common The init_display function is moved over to hd44780_common. charlcd uses it via its ops function pointer and drivers initialize the ops with the common hd44780_common_init_display function. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel Signed-off-by: Miguel Ojeda commit bd26b181d14af003a1c9903831f5735f431530f6 Author: Lars Poeschel Date: Tue Nov 3 10:58:16 2020 +0100 auxdisplay: Make use of enum for backlight on / off To turn the backlight on or off use our new enum CHARLCD_ON / CHARLCD_OFF. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel Signed-off-by: Miguel Ojeda commit 2bf82b5a80d9c4ca3e64d273771d5629d46eb1d0 Author: Lars Poeschel Date: Tue Nov 3 10:58:15 2020 +0100 auxdisplay: make charlcd_backlight visible to hd44780_common hd44780_common wants to use the charlcd_backlight function, so make it visible. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel Signed-off-by: Miguel Ojeda commit 45421ffefbb5f195de02ead952755329ef8576d8 Author: Lars Poeschel Date: Tue Nov 3 10:58:14 2020 +0100 auxdisplay: Move clear_display to hd44780_common This moves the clear_display function from charlcd to hd44780_common. This is one more step to make charlcd independent from device specific code. The two hd44780 drivers use the new function from hd44780_common and charlcd calls this function through its function pointer in its ops structure. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel Signed-off-by: Miguel Ojeda commit 88645a86e3420cddfe5bb9cd8d7c15aff8f54b46 Author: Lars Poeschel Date: Tue Nov 3 10:58:13 2020 +0100 auxdisplay: add home to charlcd_ops This adds a home function to the charlcd_ops struct and offer an implementation for hd44780_common. This implementation is used by our two hd44780 drivers. This is to make charlcd device independent. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel Signed-off-by: Miguel Ojeda commit d3a2fb810f273b7a2c393d4de28ae91a3f76985d Author: Lars Poeschel Date: Tue Nov 3 10:58:12 2020 +0100 auxdisplay: provide hd44780_common_gotoxy Provide a hd44780_common_gotoxy function and a pointer in the ops for charlcd to use to move the cursor. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel Signed-off-by: Miguel Ojeda commit b26deabb1d915fe87d395081bbd3058b938dee89 Author: Lars Poeschel Date: Tue Nov 3 10:58:11 2020 +0100 auxdisplay: hd44780_common_print We create a hd44780_common_print function. It is derived from the original charlcd_print. charlcd_print becomes a device independent print function, that then only calls via its ops function pointers, into the print function offered by drivers. Reported-by: kernel test robot Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel Signed-off-by: Miguel Ojeda commit 11588b59cf620305e78523f57918b986b5e32214 Author: Lars Poeschel Date: Tue Nov 3 10:58:10 2020 +0100 auxdisplay: Move addr out of charlcd_priv Move out the struct addr from struct charlcd_priv into the less private struct charlcd. This member is used to pass position information. The individual drivers need to be able to read this information, so we move this out of charlcd_priv to charlcd structure. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel Signed-off-by: Miguel Ojeda commit 2c6a82f2342fadfcbd5dd92656e662c326f7a40a Author: Lars Poeschel Date: Tue Nov 3 10:58:09 2020 +0100 auxdisplay: Move write_cmd pointers to hd44780 drivers The write_cmd function is used to send commands to hd44780 displays. The individual hd44780 drivers then implement their appropriate way of doing this with their supported displays. So we move this pointer so hd44780_common. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel Signed-off-by: Miguel Ojeda commit 71ff701bbefec9e3c342f3a01d2d89b7ae026c71 Author: Lars Poeschel Date: Tue Nov 3 10:58:08 2020 +0100 auxdisplay: Move write_data pointer to hd44780_common This moves the write_data function pointer from struct charlcd_ops to struct hd44780_common. This is the function that actually writes the character to the display. This hd44780 hardware specific function is used by two drivers at the moment. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel Signed-off-by: Miguel Ojeda commit 3fc04dd7eb77b54228a17753ec01128417433e46 Author: Lars Poeschel Date: Tue Nov 3 10:58:07 2020 +0100 auxdisplay: Move ifwidth to struct hd44780_common Move struct charlcd member ifwidth to our new struct hd44780_common. ifwidth is hd44780 device specific and is used by two drivers at the moment, so we move it to a common place, where both can use this. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel Signed-off-by: Miguel Ojeda commit 2545c1c948a6a765f1a0e820c7598138b36f67ef Author: Lars Poeschel Date: Tue Nov 3 10:58:06 2020 +0100 auxdisplay: Move hwidth and bwidth to struct hd44780_common hwidth is for the hardware buffer size and bwidth is for the buffer width of one single line. This is specific to the hd44780 displays and so it is moved out from charlcd to struct hd44780_common. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel Signed-off-by: Miguel Ojeda commit 718e05ed92ecac0d9d3954bcc8064527c3ce7565 Author: Lars Poeschel Date: Tue Nov 3 10:58:05 2020 +0100 auxdisplay: Introduce hd44780_common.[ch] There is some hd44780 specific code in charlcd and this code is used by multiple drivers. To make charlcd independent from this device specific code this has to be moved to a place where the multiple drivers can share their common code. This common place is now introduced as hd44780_common. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel Signed-off-by: Miguel Ojeda commit 66ce7d5c1e124b497f45aead50df1dc3c2873382 Author: Lars Poeschel Date: Tue Nov 3 10:58:04 2020 +0100 auxdisplay: Use an enum for charlcd backlight on/off ops We use an enum for calling the functions in charlcd, that turn the backlight on or off. This enum is generic and can be used for other charlcd turn on / turn off operations as well. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel Signed-off-by: Miguel Ojeda commit 66c32e4833559d8683879b5fa6fe70332db53aec Author: Johan Hovold Date: Sun Oct 25 18:46:00 2020 +0100 USB: serial: keyspan_pda: drop redundant usb-serial pointer Drop the redundant struct usb_serial pointer from the driver port data. Acked-by: Sebastian Andrzej Siewior Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit fbbf41f64a8de352b67214c089366f97c7ac1678 Author: Johan Hovold Date: Sun Oct 25 18:45:59 2020 +0100 USB: serial: keyspan_pda: use BIT() macro Use the BIT() macro instead of open coding. Acked-by: Sebastian Andrzej Siewior Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 491d6927f0de587c1d322d8b29a1187b7e06a221 Author: Johan Hovold Date: Sun Oct 25 18:45:58 2020 +0100 USB: serial: keyspan_pda: clean up comments and whitespace Clean up comment style, remove some stale or redundant comments and drop superfluous white space. Acked-by: Sebastian Andrzej Siewior Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 7604ce70b8f675582ae68064e125be4f5174dec0 Author: Johan Hovold Date: Tue Oct 27 10:25:02 2020 +0100 USB: serial: keyspan_pda: clean up xircom/entrega support Drop the separate Kconfig symbol for Xircom / Entrega and always include support in the keyspan_pda driver. Note that all configs that enabled CONFIG_USB_SERIAL_XIRCOM also enable CONFIG_USB_SERIAL_KEYSPAN_PDA. Acked-by: Sebastian Andrzej Siewior Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 034e38e8f68767fb5438ae3e608ee82919674177 Author: Johan Hovold Date: Sun Oct 25 18:45:56 2020 +0100 USB: serial: keyspan_pda: add write-fifo support Use the port write fifo and generic chars_and_buffer and write_room implementations when writing. This not only allows for more efficient transfers, but more importantly fixes the remaining issues related to the conservative write_room() implementation which could prevent the line discipline from making forward progress (e.g. waiting for n > 1 bytes of space to become available). Note that this also allows using the driver for the system console without dropping data when the write URB is busy (including when adding carriage return on line feed). Acked-by: Sebastian Andrzej Siewior Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 6fded8bcbc2e34d2267442376bf4fe9dde196d65 Author: Johan Hovold Date: Sun Oct 25 18:45:55 2020 +0100 USB: serial: keyspan_pda: increase transmitter threshold Increase the transmitter threshold so that writing isn't resumed until 128 bytes are available in the device buffer thereby allowing for larger and more efficient transfers. Acked-by: Sebastian Andrzej Siewior Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 7184933b52a6b3e64171819b77f0bab018696cb2 Author: Johan Hovold Date: Sun Oct 25 18:45:54 2020 +0100 USB: serial: keyspan_pda: fix write implementation Fix stalled writes by checking the available buffer space after requesting an unthrottle notification in case the device buffer is already empty so that no notification is ever sent (e.g. when doing single character writes). This also means we can drop the room query from write() which was conditioned on in_interrupt() and prevented writing using this driver from atomic contexts (e.g. PPP). Acked-by: Sebastian Andrzej Siewior Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 79fe6826a5ebee2724d432a736ec04d8dca143ba Author: Johan Hovold Date: Sun Oct 25 18:45:53 2020 +0100 USB: serial: keyspan_pda: refactor write-room handling Add helper to retrieve the available device transfer-buffer space. Acked-by: Sebastian Andrzej Siewior Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 320f9028c7873c3c7710e8e93e5c979f4c857490 Author: Johan Hovold Date: Sun Oct 25 18:45:52 2020 +0100 USB: serial: keyspan_pda: fix write unthrottling The driver did not update its view of the available device buffer space until write() was called in task context. This meant that write_room() would return 0 even after the device had sent a write-unthrottle notification, something which could lead to blocked writers not being woken up (e.g. when using OPOST). Note that we must also request an unthrottle notification is case a write() request fills the device buffer exactly. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable Acked-by: Sebastian Andrzej Siewior Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 49fbb8e37a961396a5b6c82937c70df91de45e9d Author: Johan Hovold Date: Sun Oct 25 18:45:51 2020 +0100 USB: serial: keyspan_pda: fix tx-unthrottle use-after-free The driver's transmit-unthrottle work was never flushed on disconnect, something which could lead to the driver port data being freed while the unthrottle work is still scheduled. Fix this by cancelling the unthrottle work when shutting down the port. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Acked-by: Sebastian Andrzej Siewior Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 37faf50615412947868c49aee62f68233307f4e4 Author: Johan Hovold Date: Sun Oct 25 18:45:50 2020 +0100 USB: serial: keyspan_pda: fix write-wakeup use-after-free The driver's deferred write wakeup was never flushed on disconnect, something which could lead to the driver port data being freed while the wakeup work is still scheduled. Fix this by using the usb-serial write wakeup which gets cancelled properly on disconnect. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Acked-by: Sebastian Andrzej Siewior Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit c01d2c58698f710c9e13ba3e2d296328606f74fd Author: Johan Hovold Date: Sun Oct 25 18:45:49 2020 +0100 USB: serial: keyspan_pda: fix stalled writes Make sure to clear the write-busy flag also in case no new data was submitted due to lack of device buffer space so that writing is resumed once space again becomes available. Fixes: 507ca9bc0476 ("[PATCH] USB: add ability for usb-serial drivers to determine if their write urb is currently being used.") Cc: stable # 2.6.13 Acked-by: Sebastian Andrzej Siewior Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 7353cad7ee4deaefc16e94727e69285563e219f6 Author: Johan Hovold Date: Sun Oct 25 18:45:48 2020 +0100 USB: serial: keyspan_pda: fix write deadlock The write() callback can be called in interrupt context (e.g. when used as a console) so interrupts must be disabled while holding the port lock to prevent a possible deadlock. Fixes: e81ee637e4ae ("usb-serial: possible irq lock inversion (PPP vs. usb/serial)") Fixes: 507ca9bc0476 ("[PATCH] USB: add ability for usb-serial drivers to determine if their write urb is currently being used.") Cc: stable # 2.6.19 Acked-by: Sebastian Andrzej Siewior Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 696c541c8c6cfa05d65aa24ae2b9e720fc01766e Author: Johan Hovold Date: Sun Oct 25 18:45:47 2020 +0100 USB: serial: keyspan_pda: fix dropped unthrottle interrupts Commit c528fcb116e6 ("USB: serial: keyspan_pda: fix receive sanity checks") broke write-unthrottle handling by dropping well-formed unthrottle-interrupt packets which are precisely two bytes long. This could lead to blocked writers not being woken up when buffer space again becomes available. Instead, stop unconditionally printing the third byte which is (presumably) only valid on modem-line changes. Fixes: c528fcb116e6 ("USB: serial: keyspan_pda: fix receive sanity checks") Cc: stable # 4.11 Acked-by: Sebastian Andrzej Siewior Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 1a6a071f51a5373de21edd34f9b79610be2d02e3 Author: Yu Hao Date: Tue Nov 3 14:33:35 2020 -0800 ALSA: seq: remove useless function The function snd_seq_queue_client_termination() is only called from the function seq_free_client1(). The function seq_free_client1() calls the function snd_seq_queue_client_leave() and the function snd_seq_queue_client_termination() together. Because the function snd_seq_queue_client_leave() does all things, so the function snd_seq_queue_client_termination() is a useless function. Signed-off-by: Yu Hao Link: https://lore.kernel.org/r/20201103223335.21831-1-yuhaobehappy@gmail.com Signed-off-by: Takashi Iwai commit b96c0546b5908268716ed9b1d39fc604413c630b Author: Lee Jones Date: Tue Nov 3 15:28:14 2020 +0000 soc: bcm: brcmstb: pm: pm-arm: Provide prototype for brcmstb_pm_s3_finish() brcmstb_pm_s3_finish() cannot be made static because it is referenced from brcmstb_pm_s3(), so let's provide a prototype for it instead. Fixes the following W=1 kernel build warning(s): drivers/soc/bcm/brcmstb/pm/pm-arm.c:395:14: warning: no previous prototype for ‘brcmstb_pm_s3_finish’ [-Wmissing-prototypes] Cc: Florian Fainelli Cc: bcm-kernel-feedback-list@broadcom.com Signed-off-by: Lee Jones Signed-off-by: Florian Fainelli commit e047c7be173caab95f3876ab30c03ebcf654c300 Merge: 1cd260a7905e3 139caf7ca2866 Author: Dave Airlie Date: Wed Nov 4 12:16:50 2020 +1000 Merge tag 'drm-intel-next-queued-2020-11-03' of git://anongit.freedesktop.org/drm/drm-intel into drm-next drm/i915 features for v5.11 Highlights: - More DG1 enabling (Lucas, Matt, Aditya, Anshuman, Clinton, Matt, Stuart, Venkata) - Integer scaling filter support (Pankaj Bharadiya) - Asynchronous flip support (Karthik) Generic: - Fix gen12 forcewake tables (Matt) - Haswell PCI ID updates (Alexei Podtelezhnikov) Display: - ICL+ DSI command mode enabling (Vandita) - Shutdown displays grafecully on reboot/shutdown (Ville) - Don't register display debugfs when there is no display (Lucas) - Fix RKL CDCLK table (Matt) - Limit EHL/JSL eDP to HBR2 (José) - Handle incorrectly set (by BIOS) PLLs and DP link rates at probe (Imre) - Fix mode valid check wrt bpp for "YCbCr 4:2:0 only" modes (Ville) - State checker and dump fixes (Ville) - DP AUX backlight updates (Aaron Ma, Sean Paul) - Add DP LTTPR non-transparent link training mode (Imre) - PSR2 selective fetch enabling (José) - VBT updates (José) - HDCP updates (Ramalingam) Cleanups and refactoring: - HPD pin, AUX channel, and Type-C port identifier cleanup (Ville) - Hotplug and irq refactoring (Ville) - Better DDI encoder and AUX channel names (Ville) - Color LUT code cleanups (Ville) - Combo PHY code cleanups (Ville) - LSPCON code cleanups (Ville) - Documentation fixes (Mauro, Chris) Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87o8kehbaj.fsf@intel.com commit 3fb6928b56f67167406daefa13ca9d2b94d48eb0 Author: Alex Elder Date: Mon Nov 2 11:34:35 2020 -0600 net: ipa: restrict special reset to IPA v3.5.1 With IPA v3.5.1, if IPA aggregation is active at the time an underlying GSI channel reset is performed, some special handling is required. There is logic in ipa_endpoint_reset() that arranges for that special handling, but it's done for all hardware versions, not just IPA v3.5.1. Fix the logic to properly restrict the special behavior. Signed-off-by: Alex Elder Link: https://lore.kernel.org/r/20201102173435.5987-1-elder@linaro.org Signed-off-by: Jakub Kicinski commit a74e44a111fef0f5cd6145118f694dc7b35cb452 Author: Vinay Kumar Yadav Date: Mon Nov 2 21:58:33 2020 +0530 chelsio/chtls: Utilizing multiple rxq/txq to process requests patch adds a logic to utilize multiple queues to process requests. The queue selection logic uses a round-robin distribution technique using a counter. Signed-off-by: Ayush Sawal Signed-off-by: Vinay Kumar Yadav Link: https://lore.kernel.org/r/20201102162832.22344-1-vinay.yadav@chelsio.com Signed-off-by: Jakub Kicinski commit d0b3d2d7e50de5ce121f77a16df4c17e91b09421 Merge: 8aaeed81fcb91 21b5177e997c9 Author: Alexei Starovoitov Date: Tue Nov 3 17:52:37 2020 -0800 Merge branch 'selftests/bpf: Migrate test_tcpbpf_user to be a part of test_progs' Alexander Duyck says: ==================== Move the test functionality from test_tcpbpf_user into the test_progs framework so that it will be run any time the test_progs framework is run. This will help to prevent future test escapes as the individual tests, such as test_tcpbpf_user, are less likely to be run by developers and CI tests. As a part of moving it over the series goes through and updates the code to make use of the existing APIs included in the test_progs framework. This is meant to simplify and streamline the test code and avoid duplication of effort. v2: Dropped test_tcpbpf_user from .gitignore Replaced CHECK_FAIL calls with CHECK calls Minimized changes in patch 1 when moving the file Updated stg mail command line to display renames in submission Added shutdown logic to end of run_test function to guarantee close Added patch that replaces the two maps with use of global variables v3: Left err at -1 while we are performing send/recv calls w/ data Drop extra labels from test_tcpbpf_user in favor of keeping err label Dropped redundant zero init for tcpbpf_globals result and key Dropped replacing of "printf(" with "fprintf(stderr, " Fixed error in use of ASSERT_OK_PTR which was skipping of run_test Replaced "{ 0 }" with "{}" in init of global in test_tcpbpf_kern.c Added "Acked-by" from Martin KaiFai Lau and Andrii Nakryiko ==================== Acked-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov commit 21b5177e997c98643eaabd4b917f2e287395af86 Author: Alexander Duyck Date: Tue Nov 3 13:35:19 2020 -0800 selftest/bpf: Use global variables instead of maps for test_tcpbpf_kern Use global variables instead of global_map and sockopt_results_map to track test data. Doing this greatly simplifies the code as there is not need to take the extra steps of updating the maps or looking up elements. Signed-off-by: Alexander Duyck Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/160443931900.1086697.6588858453575682351.stgit@localhost.localdomain commit 0a099d1429c709020277d24a460d11ff8356a080 Author: Alexander Duyck Date: Tue Nov 3 13:35:11 2020 -0800 selftests/bpf: Migrate tcpbpf_user.c to use BPF skeleton Update tcpbpf_user.c to make use of the BPF skeleton. Doing this we can simplify test_tcpbpf_user and reduce the overhead involved in setting up the test. In addition we can clean up the remaining bits such as the one remaining CHECK_FAIL at the end of test_tcpbpf_user so that the function only makes use of CHECK as needed. Signed-off-by: Alexander Duyck Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/160443931155.1086697.17869006617113525162.stgit@localhost.localdomain commit d3813ea14b696053c076123239093822b527f0f7 Author: Alexander Duyck Date: Tue Nov 3 13:35:04 2020 -0800 selftests/bpf: Replace EXPECT_EQ with ASSERT_EQ and refactor verify_results There is already logic in test_progs.h for asserting that a value is expected to be another value. So instead of reinventing it we should just make use of ASSERT_EQ in tcpbpf_user.c. This will allow for better debugging and integrates much more closely with the test_progs framework. In addition we can refactor the code a bit to merge together the two verify functions and tie them together into a single function. Doing this helps to clean the code up a bit and makes it more readable as all the verification is now done in one function. Lastly we can relocate the verification to the end of the run_test since it is logically part of the test itself. With this we can drop the need for a return value from run_test since verification becomes the last step of the call and then immediately following is the tear down of the test setup. Signed-off-by: Alexander Duyck Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/160443930408.1086697.16101205859962113000.stgit@localhost.localdomain commit 247f0ec361b7e0c5c67db8222873182fb8be5146 Author: Alexander Duyck Date: Tue Nov 3 13:34:56 2020 -0800 selftests/bpf: Drop python client/server in favor of threads Drop the tcp_client/server.py files in favor of using a client and server thread within the test case. Specifically we spawn a new thread to play the role of the server, and the main testing thread plays the role of client. Add logic to the end of the run_test function to guarantee that the sockets are closed when we begin verifying results. Doing this we are able to reduce overhead since we don't have two python workers possibly floating around. In addition we don't have to worry about synchronization issues and as such the retry loop waiting for the threads to close the sockets can be dropped as we will have already closed the sockets in the local executable and synchronized the server thread. Signed-off-by: Alexander Duyck Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/160443929638.1086697.2430242340980315521.stgit@localhost.localdomain commit aaf376bddf68d0afe5f4b5f25fc555da358e2287 Author: Alexander Duyck Date: Tue Nov 3 13:34:48 2020 -0800 selftests/bpf: Move test_tcppbf_user into test_progs Recently a bug was missed due to the fact that test_tcpbpf_user is not a part of test_progs. In order to prevent similar issues in the future move the test functionality into test_progs. By doing this we can make certain that it is a part of standard testing and will not be overlooked. As a part of moving the functionality into test_progs it is necessary to integrate with the test_progs framework and to drop any redundant code. This patch: 1. Cleans up the include headers 2. Dropped a duplicate definition of bpf_find_map 3. Switched over to using test_progs specific cgroup functions 4. Renamed main to test_tcpbpf_user 5. Dropped return value in favor of CHECK_FAIL to check for errors The general idea is that I wanted to keep the changes as small as possible while moving the file into the test_progs framework. The follow-on patches are meant to clean up the remaining issues such as the use of CHECK_FAIL. Signed-off-by: Alexander Duyck Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/160443928881.1086697.17661359319919165370.stgit@localhost.localdomain commit 873b807c989598a7db44e7669be3da97eaa8ecde Author: Colin Ian King Date: Mon Nov 2 13:46:01 2020 +0000 octeontx2-pf: Fix sizeof() mismatch An incorrect sizeof() is being used, sizeof(u64 *) is not correct, it should be sizeof(*sq->sqb_ptrs). Addresses-Coverity: ("Sizeof not portable (SIZEOF_MISMATCH)") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20201102134601.698436-1-colin.king@canonical.com Signed-off-by: Jakub Kicinski commit 1ca47431c29c63ffc521e17bdc97be5472599776 Author: Colin Ian King Date: Mon Nov 2 12:16:15 2020 +0000 net: dev_ioctl: remove redundant initialization of variable err The variable err is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20201102121615.695196-1-colin.king@canonical.com Signed-off-by: Jakub Kicinski commit 1cd260a7905e3ba2e5dfa39b110ad6cf8f466f49 Merge: 3cea11cd5e3b0 4dfec0d1d7b99 Author: Dave Airlie Date: Wed Nov 4 10:55:11 2020 +1000 Merge tag 'drm-misc-next-2020-10-27' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for 5.11: UAPI Changes: - doc: rules for EBUSY on non-blocking commits; requirements for fourcc modifiers; on parsing EDID - fbdev/sbuslib: Remove unused FBIOSCURSOR32 - fourcc: deprecate DRM_FORMAT_MOD_NONE - virtio: Support blob resources for memory allocations; Expose host-visible and cross-device features Cross-subsystem Changes: - devicetree: Add vendor Prefix for Yes Optoelectronics, Shanghai Top Display Optoelectronics - dma-buf: Add struct dma_buf_map that stores DMA pointer and I/O-memory flag; dma_buf_vmap()/vunmap() return address in dma_buf_map; Use struct_size() macro Core Changes: - atomic: pass full state to CRTC atomic enable/disable; warn for EBUSY during non-blocking commits - dp: Prepare for DP 2.0 DPCD - dp_mst: Receive extended DPCD caps - dma-buf: Documentation - doc: Format modifiers; dma-buf-map; Cleanups - fbdev: Don't use compat_alloc_user_space(); mark as orphaned - fb-helper: Take lock in drm_fb_helper_restore_work_fb() - gem: Convert implementation and drivers to GEM object functions, remove GEM callbacks from struct drm_driver (expect gem_prime_mmap) - panel: Cleanups - pci: Add legacy infix to drm_irq_by_busid() - sched: Avoid infinite waits in drm_sched_entity_destroy() - switcheroo: Cleanups - ttm: Remove AGP support; Don't modify caching during swapout; Major refactoring of the implementation and API that affects all depending drivers; Add ttm_bo_wait_ctx(); Add ttm_bo_pin()/unpin() in favor of TTM_PL_FLAG_NO_EVICT; Remove ttm_bo_create(); Remove fault_reserve_notify() callback; Push move() implementation into drivers; Remove TTM_PAGE_FLAG_WRITE; Replace caching flags with init-time cache setting; Push ttm_tt_bind() into drivers; Replace move_notify() with delete_mem_notify(); No overlapping memcpy(); no more ttm_set_populated() - vram-helper: Fix BO top-down placement; TTM-related changes; Init GEM object functions with defaults; Default placement in system memory; Cleanups Driver Changes: - amdgpu: Use GEM object functions - armada: Use GEM object functions - aspeed: Configure output via sysfs; Init struct drm_driver with - ast: Reload LUT after FB format changes - bridge: Add driver and DT bindings for anx7625; Cleanups - bridge/dw-hdmi: Constify ops - bridge/ti-sn65dsi86: Add retries for link training - bridge/lvds-codec: Add support for regulator - bridge/tc358768: Restore connector support DRM_GEM_CMA_DRIVEROPS; Cleanups - display/ti,j721e-dss: Add DT properies assigned-clocks, assigned-clocks-parent and dma-coherent - display/ti,am65s-dss: Add DT properies assigned-clocks, assigned-clocks-parent and dma-coherent - etnaviv: Use GEM object functions - exynos: Use GEM object functions - fbdev: Cleanups and compiler fixes throughout framebuffer drivers - fbdev/cirrusfb: Avoid division by 0 - gma500: Use GEM object functions; Fix double-free of connector; Cleanups - hisilicon/hibmc: I2C-based DDC support; Use to_hibmc_drm_device(); Cleanups - i915: Use GEM object functions - imx/dcss: Init driver with DRM_GEM_CMA_DRIVER_OPS; Cleanups - ingenic: Reset pixel clock when parent clock changes; support reserved memory; Alloc F0 and F1 DMA channels at once; Support different pixel formats; Revert support for cached mmap buffers on F0/F1; support 30-bit/24-bit/8-bit-palette modes - komeda: Use DEFINE_SHOW_ATTRIBUTE - mcde: Detect platform_get_irq() errors - mediatek: Use GEM object functions - msm: Use GEM object functions - nouveau: Cleanups; TTM-related changes; Use GEM object functions - omapdrm: Use GEM object functions - panel: Add driver and DT bindings for Novatak nt36672a; Add driver and DT bindings for YTC700TLAG-05-201C; Add driver and DT bindings for TDO TL070WSH30; Cleanups - panel/mantix: Fix reset; Fix deref of NULL pointer in mantix_get_modes() - panel/otm8009a: Allow non-continuous dsi clock; Cleanups - panel/rm68200: Allow non-continuous dsi clock; Fix mode to 50 FPS - panfrost: Fix job timeout handling; Cleanups - pl111: Use GEM object functions - qxl: Cleanups; TTM-related changes; Pin new BOs with ttm_bo_init_reserved() - radeon: Cleanups; TTM-related changes; Use GEM object functions - rockchip: Use GEM object functions - shmobile: Cleanups - tegra: Use GEM object functions - tidss: Set drm_plane_helper_funcs.prepare_fb - tilcdc: Don't keep vblank interrupt enabled all the time - tve200: Detect platform_get_irq() errors - vc4: Use GEM object functions; Only register components once DSI is attached; Add Maxime as maintainer - vgem: Use GEM object functions - via: Simplify critical section in via_mem_alloc() - virtgpu: Use GEM object functions - virtio: Implement blob resources, host-visible and cross-device features; Support mapping of host-allocated resources; Use UUID APi; Cleanups - vkms: Use GEM object functions; Switch to SHMEM - vmwgfx: TTM-related changes; Inline ttm_bo_swapout_all() - xen: Use GEM object functions - xlnx: Use GEM object functions Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20201027100936.GA4858@linux-uq9g commit 4c4ac831771620f0ccc06e1287fe07401b366127 Author: kernel test robot Date: Mon Nov 2 09:38:30 2020 +0100 forcedeth: fix excluded_middle.cocci warnings Condition !A || A && B is equivalent to !A || B. Generated by: scripts/coccinelle/misc/excluded_middle.cocci Fixes: b76f0ea01312 ("coccinelle: misc: add excluded_middle.cocci script") CC: Denis Efremov Signed-off-by: kernel test robot Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/alpine.DEB.2.22.394.2011020936100.3077@hadrien Signed-off-by: Jakub Kicinski commit 74d155be2677a6e0df0a41487d3ca217bd756604 Author: Willy Liu Date: Mon Nov 2 09:52:07 2020 +0800 net: phy: realtek: Add support for RTL8221B-CG series Realtek single-port 2.5Gbps Ethernet PHYs are list as below: RTL8226-CG: the 1st generation 2.5Gbps single port PHY RTL8226B-CG/RTL8221B-CG: the 2nd generation 2.5Gbps single port PHY RTL8221B-VB-CG: the 3rd generation 2.5Gbps single port PHY RTL8221B-VM-CG: the 2.5Gbps single port PHY with MACsec feature This patch adds the minimal drivers to manage these transceivers. Signed-off-by: Willy Liu Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/1604281927-9874-1-git-send-email-willy.liu@realtek.com Signed-off-by: Jakub Kicinski commit 45e9fbf023f217982712c1cbca76ed69dfce0634 Merge: e9e13b6adc338 de3f5d9e271f7 Author: Jakub Kicinski Date: Tue Nov 3 17:41:46 2020 -0800 Merge branch 'fsl-qbman-in_interrupt-cleanup' Sebastian Andrzej Siewior says: ==================== fsl/qbman: in_interrupt() cleanup. This is the in_interrupt() clean for FSL DPAA framework and the two users. The `napi' parameter has been renamed to `sched_napi', the other parts are same as in the previous post [0]. [0] https://lkml.kernel.org/r/20201027225454.3492351-1-bigeasy@linutronix.de ==================== Link: https://lore.kernel.org/r/20201101232257.3028508-1-bigeasy@linutronix.de Signed-off-by: Jakub Kicinski commit de3f5d9e271f7d19c9bdb3ba443fa6a435075f1a Author: Sebastian Andrzej Siewior Date: Mon Nov 2 00:22:57 2020 +0100 crypto: caam: Replace in_irq() usage. The driver uses in_irq() + in_serving_softirq() magic to decide if NAPI scheduling is required or packet processing. The usage of in_*() in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be separated or the context be conveyed in an argument passed by the caller, which usually knows the context. Use the `sched_napi' argument passed by the callback. It is set true if called from the interrupt handler and NAPI should be scheduled. Signed-off-by: Sebastian Andrzej Siewior Cc: Aymen Sghaier Cc: Herbert Xu Cc: Li Yang Reviewed-by: Horia Geantă Signed-off-by: Jakub Kicinski Reviewed-by: Madalin Bucur Tested-by: Camelia Groza commit abba4b16fddda9a1012140dab4a9965045a77179 Author: Sebastian Andrzej Siewior Date: Mon Nov 2 00:22:56 2020 +0100 net: dpaa: Replace in_irq() usage. The driver uses in_irq() + in_serving_softirq() magic to decide if NAPI scheduling is required or packet processing. The usage of in_*() in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be separated or the context be conveyed in an argument passed by the caller, which usually knows the context. Use the `sched_napi' argument passed by the callback. It is set true if called from the interrupt handler and NAPI should be scheduled. Signed-off-by: Sebastian Andrzej Siewior Cc: Aymen Sghaier Cc: Herbert Xu Cc: Li Yang Signed-off-by: Jakub Kicinski Reviewed-by: Madalin Bucur Tested-by: Camelia Groza commit f84754dbc55e3abd8241e3038b615af65c745f47 Author: Sebastian Andrzej Siewior Date: Mon Nov 2 00:22:55 2020 +0100 soc/fsl/qbman: Add an argument to signal if NAPI processing is required. dpaa_eth_napi_schedule() and caam_qi_napi_schedule() schedule NAPI if invoked from: - Hard interrupt context - Any context which is not serving soft interrupts Any context which is not serving soft interrupts includes hard interrupts so the in_irq() check is redundant. caam_qi_napi_schedule() has a comment about this: /* * In case of threaded ISR, for RT kernels in_irq() does not return * appropriate value, so use in_serving_softirq to distinguish between * softirq and irq contexts. */ if (in_irq() || !in_serving_softirq()) This has nothing to do with RT. Even on a non RT kernel force threaded interrupts run obviously in thread context and therefore in_irq() returns false when invoked from the handler. The extension of the in_irq() check with !in_serving_softirq() was there when the drivers were added, but in the out of tree FSL BSP the original condition was in_irq() which got extended due to failures on RT. The usage of in_xxx() in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be separated or the context be conveyed in an argument passed by the caller, which usually knows the context. Right he is, the above construct is clearly showing why. The following callchains have been analyzed to end up in dpaa_eth_napi_schedule(): qman_p_poll_dqrr() __poll_portal_fast() fq->cb.dqrr() dpaa_eth_napi_schedule() portal_isr() __poll_portal_fast() fq->cb.dqrr() dpaa_eth_napi_schedule() Both need to schedule NAPI. The crypto part has another code path leading up to this: kill_fq() empty_retired_fq() qman_p_poll_dqrr() __poll_portal_fast() fq->cb.dqrr() dpaa_eth_napi_schedule() kill_fq() is called from task context and ends up scheduling NAPI, but that's pointless and an unintended side effect of the !in_serving_softirq() check. The code path: caam_qi_poll() -> qman_p_poll_dqrr() is invoked from NAPI and I *assume* from crypto's NAPI device and not from qbman's NAPI device. I *guess* it is okay to skip scheduling NAPI (because this is what happens now) but could be changed if it is wrong due to `budget' handling. Add an argument to __poll_portal_fast() which is true if NAPI needs to be scheduled. This requires propagating the value to the caller including `qman_cb_dqrr' typedef which is used by the dpaa and the crypto driver. Signed-off-by: Sebastian Andrzej Siewior Cc: Aymen Sghaier Cc: Herbert XS Cc: Li Yang Reviewed-by: Horia Geantă Signed-off-by: Jakub Kicinski Reviewed-by: Madalin Bucur Tested-by: Camelia Groza commit e9e13b6adc338be1eb88db87bcb392696144bd02 Author: Sergej Bauer Date: Mon Nov 2 01:35:55 2020 +0300 lan743x: fix for potential NULL pointer dereference with bare card This is the 3rd revision of the patch fix for potential null pointer dereference with lan743x card. The simpliest way to reproduce: boot with bare lan743x and issue "ethtool ethN" commant where ethN is the interface with lan743x card. Example: $ sudo ethtool eth7 dmesg: [ 103.510336] BUG: kernel NULL pointer dereference, address: 0000000000000340 ... [ 103.510836] RIP: 0010:phy_ethtool_get_wol+0x5/0x30 [libphy] ... [ 103.511629] Call Trace: [ 103.511666] lan743x_ethtool_get_wol+0x21/0x40 [lan743x] [ 103.511724] dev_ethtool+0x1507/0x29d0 [ 103.511769] ? avc_has_extended_perms+0x17f/0x440 [ 103.511820] ? tomoyo_init_request_info+0x84/0x90 [ 103.511870] ? tomoyo_path_number_perm+0x68/0x1e0 [ 103.511919] ? tty_insert_flip_string_fixed_flag+0x82/0xe0 [ 103.511973] ? inet_ioctl+0x187/0x1d0 [ 103.512016] dev_ioctl+0xb5/0x560 [ 103.512055] sock_do_ioctl+0xa0/0x140 [ 103.512098] sock_ioctl+0x2cb/0x3c0 [ 103.512139] __x64_sys_ioctl+0x84/0xc0 [ 103.512183] do_syscall_64+0x33/0x80 [ 103.512224] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 103.512274] RIP: 0033:0x7f54a9cba427 ... Previous versions can be found at: v1: initial version https://lkml.org/lkml/2020/10/28/921 v2: do not return from lan743x_ethtool_set_wol if netdev->phydev == NULL, just skip the call of phy_ethtool_set_wol() instead. https://lkml.org/lkml/2020/10/31/380 v3: in function lan743x_ethtool_set_wol: use ternary operator instead of if-else sentence (review by Markus Elfring) return -ENETDOWN insted of -EIO (review by Andrew Lunn) Signed-off-by: Sergej Bauer Link: https://lore.kernel.org/r/20201101223556.16116-1-sbauer@blackbox.su Signed-off-by: Jakub Kicinski commit 870f531e178e147e6eb48185abf16d21f3d8ca4c Author: Heiner Kallweit Date: Sun Nov 1 23:30:44 2020 +0100 r8169: set IRQF_NO_THREAD if MSI(X) is enabled We had to remove flag IRQF_NO_THREAD because it conflicts with shared interrupts in case legacy interrupts are used. Following up on the linked discussion set IRQF_NO_THREAD if MSI or MSI-X is used, because both guarantee that interrupt won't be shared. Signed-off-by: Heiner Kallweit Link: https://www.spinics.net/lists/netdev/msg695341.html Link: https://lore.kernel.org/r/446cf5b8-dddd-197f-cb96-66783141ade4@gmail.com Signed-off-by: Jakub Kicinski commit f06059c2444725919df16fc0a097691545dad9ff Author: Heiner Kallweit Date: Sun Nov 1 23:23:52 2020 +0100 r8169: align number of tx descriptors with vendor driver Lowest number of tx descriptors used in the vendor drivers is 256 in r8169. r8101/r8168/r8125 use 1024 what seems to be the hw limit. Stay on the safe side and go with 256, same as number of rx descriptors. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/a52a6de4-f792-5038-ae2f-240d3b7860eb@gmail.com Signed-off-by: Jakub Kicinski commit 923ba95ea22df4482031f07f13104c7be10bebb8 Merge: 8e6a0485d1c41 803be1085d210 Author: Jakub Kicinski Date: Tue Nov 3 17:27:17 2020 -0800 Merge branch 'mlxsw-spectrum-prepare-for-xm-implementation-lpm-trees' Ido Schimmel says: ==================== mlxsw: spectrum: Prepare for XM implementation - LPM trees Jiri says: This is a preparation patchset for follow-up support of boards with extended mezzanine (XM), which are going to allow extended (scale-wise) router offload. XM requires a separate set of PRM registers to be used to configure LPM trees. Therefore, this patchset introduces operations that allow different implementations of tree configuration for legacy router offload and the XM router offload. ==================== Link: https://lore.kernel.org/r/20201101134215.713708-1-idosch@idosch.org Signed-off-by: Jakub Kicinski commit 803be1085d210c7647554da44f8c49c03ed75968 Author: Jiri Pirko Date: Sun Nov 1 15:42:15 2020 +0200 mlxsw: spectrum_router: Introduce low-level ops and implement them for RALXX regs In preparation for support of XM router implementation which uses different registers to work with trees and FIB entries, introduce a structure to hold low-level ops and implement tree manipulation register ops. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit fb281f24f80dd48a3b91f144bb5e0f2b5bc394a7 Author: Jiri Pirko Date: Sun Nov 1 15:42:14 2020 +0200 mlxsw: reg: Add XRALXX Registers Add a couple of registers used to manipulate LPM trees on XM: The XRALTA is used to allocate the XLT LPM trees. The XRALST is used to set and query the structure of an XLT LPM tree. The XRALTB register is used to bind virtual router and protocol to an allocated LPM tree. Since the XM registers are identical to the legacy router registers with a fixed offset, re-use their pack functions. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit 8e6a0485d1c41cdddbae64fec4ee6005eadc8998 Merge: c1c0f6eac3db6 ecb8fed408b64 Author: Jakub Kicinski Date: Tue Nov 3 16:54:00 2020 -0800 Merge branch 'net-allow-virtual-netdevs-to-forward-udp-l4-and-fraglist-gso-skbs' Alexander Lobakin says: ==================== net: allow virtual netdevs to forward UDP L4 and fraglist GSO skbs NETIF_F_GSO_UDP_L4 and NETIF_F_GSO_FRAGLIST allow drivers to offload GSO UDP L4. This works well on simple setups, but when any logical netdev (e.g. VLAN) is present, kernel stack always performs software resegmentation which actually kills the performance. The full path in such cases is like: 1. Our NIC driver advertises a support for fraglists, GSO UDP L4, GSO fraglists. 2. User enables fraglisted GRO via Ethtool. 3. GRO subsystem receives UDP frames from driver and merges the packets into fraglisted GSO skb(s). 4. Networking stack queues it up for xmitting. 5. Virtual device like VLAN doesn't advertise a support for GSO UDP L4 and GSO fraglists, so skb_gso_check() doesn't allow to pass this skb as is to the real driver. 6. Kernel then has to form a bunch of regular UDP skbs from that one and pass it to the driver instead. This fallback is *extremely* slow for any GSO types, but especially for GSO fraglists. 7. All further processing performs with a series of plain UDP skbs, and the driver gets it one-by-one, despite that it supports UDP L4 and fraglisted GSO. That's not OK because: a) logical/virtual netdevs like VLANs, bridges etc. should pass GSO skbs as is; b) even if the final driver doesn't support such type of GSO, this software resegmenting should be performed right before it, not in the middle of processing -- I think I even saw that note somewhere in kernel documentation, and it's totally reasonable in terms of performance. Despite the fact that no mainline drivers currently supports fraglist GSO, this should and can be easily fixed by adding UDP L4 and fraglist GSO to the list of GSO types that can be passed-through the logical interfaces (NETIF_F_GSO_SOFTWARE). After this change, no resegmentation occurs (if a particular driver supports and advertises this), and the performance goes on par with e.g. 1:1 forwarding. The only logical netdevs that seem to be unaffected to this are bridge interfaces, as their code uses full NETIF_F_GSO_MASK. Tested on MIPS32 R2 router board with a WIP NIC driver in VLAN NAT: 20 Mbps baseline, 1 Gbps / link speed with this patch. Since v1 [1]: - handle bonding and team drivers as suggested by Willem de Bruijn; - reword and expand the introduction with the particular example. [1] https://lore.kernel.org/netdev/Mx3BWGop6fGORN6Cpo4mHIHz2b1bb0eLxeMG8vsijnk@cp3-web-020.plabs.ch ==================== Link: https://lore.kernel.org/r/NysZRGMkuWq0KPTCJ1Dz2FTjRkeJXDH3edVrsEeJkQI@cp4-web-036.plabs.ch Signed-off-by: Jakub Kicinski commit ecb8fed408b6454606bbb3cd0edb083bf0ad162a Author: Alexander Lobakin Date: Sun Nov 1 13:17:17 2020 +0000 net: bonding, dummy, ifb, team: advertise NETIF_F_GSO_SOFTWARE Virtual netdevs should use NETIF_F_GSO_SOFTWARE to forward GSO skbs as-is and let the final drivers deal with them when supported. Also remove NETIF_F_GSO_UDP_L4 from bonding and team drivers as it's now included in the "software" list. Suggested-by: Willem de Bruijn Signed-off-by: Alexander Lobakin Acked-by: Willem de Bruijn Signed-off-by: Jakub Kicinski commit 2e4ef10f58502323ea470bc30ba84d5ddd4e77f0 Author: Alexander Lobakin Date: Sun Nov 1 13:17:07 2020 +0000 net: add GSO UDP L4 and GSO fraglists to the list of software-backed types Commit e20cf8d3f1f7 ("udp: implement GRO for plain UDP sockets.") and commit 9fd1ff5d2ac7 ("udp: Support UDP fraglist GRO/GSO.") made UDP L4 and fraglisted GRO/GSO fully supported by the software fallback mode. We can safely add them to NETIF_F_GSO_SOFTWARE to allow logical/virtual netdevs to forward these types of skbs up to the real drivers. Signed-off-by: Alexander Lobakin Acked-by: Willem de Bruijn Signed-off-by: Jakub Kicinski commit c1c0f6eac3db61761dc8bfeb2e61989b1f3eeee9 Author: Lee Jones Date: Mon Nov 2 11:45:11 2020 +0000 net: net_failover: Correct parameter name 'standby_dev' Fixes the following W=1 kernel build warning(s): drivers/net/net_failover.c:711: warning: Function parameter or member 'standby_dev' not described in 'net_failover_create' drivers/net/net_failover.c:711: warning: Excess function parameter 'dev' description in 'net_failover_create' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201102114512.1062724-30-lee.jones@linaro.org Signed-off-by: Jakub Kicinski commit a8eb1a007cface8c48482d977d5831b273671f39 Author: Lee Jones Date: Mon Nov 2 11:45:10 2020 +0000 net: netconsole: Add description for 'netconsole_target's extended attribute Fixes the following W=1 kernel build warning(s): drivers/net/netconsole.c:104: warning: Function parameter or member 'extended' not described in 'netconsole_target' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201102114512.1062724-29-lee.jones@linaro.org Signed-off-by: Jakub Kicinski commit 9f07814d01ad085b2d9f1d55b4ce532fb2c27110 Author: Lee Jones Date: Mon Nov 2 11:45:09 2020 +0000 net: usb: r8152: Fix a couple of spelling errors in fw_phy_nc's docs Fixes the following W=1 kernel build warning(s): drivers/net/usb/r8152.c:992: warning: Function parameter or member 'mode_pre' not described in 'fw_phy_nc' drivers/net/usb/r8152.c:992: warning: Function parameter or member 'mode_post' not described in 'fw_phy_nc' Signed-off-by: Lee Jones Acked-by: Hayes Wang Link: https://lore.kernel.org/r/20201102114512.1062724-28-lee.jones@linaro.org Signed-off-by: Jakub Kicinski commit 50a77e5ff9bc0fd766f5c01267b2b5170e7e91e5 Author: Lee Jones Date: Mon Nov 2 11:45:08 2020 +0000 net: macvlan: Demote nonconformant function header Fixes the following W=1 kernel build warning(s): drivers/net/macvlan.c:1350: warning: Function parameter or member 'vlan' not described in 'macvlan_changelink_sources' drivers/net/macvlan.c:1350: warning: Function parameter or member 'mode' not described in 'macvlan_changelink_sources' drivers/net/macvlan.c:1350: warning: Function parameter or member 'data' not described in 'macvlan_changelink_sources' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201102114512.1062724-27-lee.jones@linaro.org Signed-off-by: Jakub Kicinski commit ecdc5689d93eab429f7a48ae058b7c516a4a3c95 Author: Lee Jones Date: Mon Nov 2 11:45:07 2020 +0000 net: macsec: Add missing documentation for 'gro_cells' Fixes the following W=1 kernel build warning(s): drivers/net/macsec.c:113: warning: Function parameter or member 'gro_cells' not described in 'macsec_dev' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201102114512.1062724-26-lee.jones@linaro.org Signed-off-by: Jakub Kicinski commit 06cd7c46b3ab3f2252c61bf85b191236cf0254e1 Author: Lee Jones Date: Mon Nov 2 11:45:06 2020 +0000 net: usb: lan78xx: Remove lots of set but unused 'ret' variables Fixes the following W=1 kernel build warning(s): drivers/net/usb/lan78xx.c: In function ‘lan78xx_read_raw_otp’: drivers/net/usb/lan78xx.c:825:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] drivers/net/usb/lan78xx.c: In function ‘lan78xx_write_raw_otp’: drivers/net/usb/lan78xx.c:879:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] drivers/net/usb/lan78xx.c: In function ‘lan78xx_deferred_multicast_write’: drivers/net/usb/lan78xx.c:1041:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] drivers/net/usb/lan78xx.c: In function ‘lan78xx_update_flowcontrol’: drivers/net/usb/lan78xx.c:1127:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] drivers/net/usb/lan78xx.c: In function ‘lan78xx_init_mac_address’: drivers/net/usb/lan78xx.c:1666:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] drivers/net/usb/lan78xx.c: In function ‘lan78xx_link_status_change’: drivers/net/usb/lan78xx.c:1841:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] drivers/net/usb/lan78xx.c: In function ‘lan78xx_irq_bus_sync_unlock’: drivers/net/usb/lan78xx.c:1920:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] drivers/net/usb/lan78xx.c: In function ‘lan8835_fixup’: drivers/net/usb/lan78xx.c:1994:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] drivers/net/usb/lan78xx.c: In function ‘lan78xx_set_rx_max_frame_length’: drivers/net/usb/lan78xx.c:2192:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] drivers/net/usb/lan78xx.c: In function ‘lan78xx_change_mtu’: drivers/net/usb/lan78xx.c:2270:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] drivers/net/usb/lan78xx.c: In function ‘lan78xx_set_mac_addr’: drivers/net/usb/lan78xx.c:2299:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] drivers/net/usb/lan78xx.c: In function ‘lan78xx_set_features’: drivers/net/usb/lan78xx.c:2333:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] drivers/net/usb/lan78xx.c: In function ‘lan78xx_set_suspend’: drivers/net/usb/lan78xx.c:3807:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201102114512.1062724-25-lee.jones@linaro.org Signed-off-by: Jakub Kicinski commit 800a328bf2e154f5d6bed2375cf601d59e283675 Author: Lee Jones Date: Mon Nov 2 11:45:05 2020 +0000 net: ieee802154: ca8210: Fix incorrectly named function param doc Fixes the following W=1 kernel build warning(s): drivers/net/ieee802154/ca8210.c:724: warning: Function parameter or member 'cas_ctl' not described in 'ca8210_rx_done' drivers/net/ieee802154/ca8210.c:724: warning: Excess function parameter 'cas_ctrl' description in 'ca8210_rx_done' Signed-off-by: Lee Jones Acked-by: Stefan Schmidt Link: https://lore.kernel.org/r/20201102114512.1062724-24-lee.jones@linaro.org Signed-off-by: Jakub Kicinski commit 34e653efb602e0651867fb5ab14369b555a61dcd Author: Lee Jones Date: Mon Nov 2 11:45:04 2020 +0000 net: usb: r8152: Provide missing documentation for some struct members Fixes the following W=1 kernel build warning(s): drivers/net/usb/r8152.c:934: warning: Function parameter or member 'blk_hdr' not described in 'fw_mac' drivers/net/usb/r8152.c:934: warning: Function parameter or member 'reserved' not described in 'fw_mac' drivers/net/usb/r8152.c:947: warning: Function parameter or member 'blk_hdr' not described in 'fw_phy_patch_key' drivers/net/usb/r8152.c:947: warning: Function parameter or member 'reserved' not described in 'fw_phy_patch_key' drivers/net/usb/r8152.c:986: warning: Function parameter or member 'blk_hdr' not described in 'fw_phy_nc' drivers/net/usb/r8152.c:986: warning: Function parameter or member 'mode_pre' not described in 'fw_phy_nc' drivers/net/usb/r8152.c:986: warning: Function parameter or member 'mode_post' not described in 'fw_phy_nc' drivers/net/usb/r8152.c:986: warning: Function parameter or member 'reserved' not described in 'fw_phy_nc' Signed-off-by: Lee Jones Acked-by: Hayes Wang Link: https://lore.kernel.org/r/20201102114512.1062724-23-lee.jones@linaro.org Signed-off-by: Jakub Kicinski commit 0e8e272f1368b26053440fcf3b0ef0693f9e706e Author: Anusha Srivatsa Date: Fri Oct 30 14:15:43 2020 -0700 drm/i915/ehl: Remove invalid PCI ID Update the EHL PCI IDs from BSpec. Remove the invalid ones. Cc: Ville Syrjälä Signed-off-by: Anusha Srivatsa Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201102193034.28055-1-anusha.srivatsa@intel.com commit c8f638b78d722e8e9b2fede3d066e29beefef60a Author: Lee Jones Date: Mon Nov 2 11:45:02 2020 +0000 net: ieee802154: ca8210: Fix a bunch of kernel-doc issues Fixes the following W=1 kernel build warning(s): drivers/net/ieee802154/ca8210.c:326: warning: Function parameter or member 'readq' not described in 'ca8210_test' drivers/net/ieee802154/ca8210.c:375: warning: Function parameter or member 'spi_transfer_complete' not described in 'ca8210_priv' drivers/net/ieee802154/ca8210.c:375: warning: Function parameter or member 'sync_exchange_complete' not described in 'ca8210_priv' drivers/net/ieee802154/ca8210.c:375: warning: Function parameter or member 'promiscuous' not described in 'ca8210_priv' drivers/net/ieee802154/ca8210.c:430: warning: Function parameter or member 'short_address' not described in 'macaddr' drivers/net/ieee802154/ca8210.c:723: warning: Function parameter or member 'cas_ctl' not described in 'ca8210_rx_done' drivers/net/ieee802154/ca8210.c:723: warning: Excess function parameter 'arg' description in 'ca8210_rx_done' drivers/net/ieee802154/ca8210.c:1289: warning: Excess function parameter 'device_ref' description in 'tdme_checkpibattribute' drivers/net/ieee802154/ca8210.c:3054: warning: Function parameter or member 'spi_device' not described in 'ca8210_remove' drivers/net/ieee802154/ca8210.c:3054: warning: Excess function parameter 'priv' description in 'ca8210_remove' drivers/net/ieee802154/ca8210.c:3104: warning: Function parameter or member 'spi_device' not described in 'ca8210_probe' drivers/net/ieee802154/ca8210.c:3104: warning: Excess function parameter 'priv' description in 'ca8210_probe' Signed-off-by: Lee Jones Acked-by: Stefan Schmidt Link: https://lore.kernel.org/r/20201102114512.1062724-21-lee.jones@linaro.org Signed-off-by: Jakub Kicinski commit f40b160db38295a8de8e807dce88aea323651a97 Author: Lee Jones Date: Mon Nov 2 11:45:01 2020 +0000 net: fddi: skfp: ess: Remove defined but unused variable 'ID_sccs' Fixes the following W=1 kernel build warning(s): drivers/net/fddi/skfp/ess.c:43:19: warning: ‘ID_sccs’ defined but not used [-Wunused-const-variable=] Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201102114512.1062724-20-lee.jones@linaro.org Signed-off-by: Jakub Kicinski commit 041f57c79b35b1eacf56fcd6e45f15a5ef2df9f3 Author: Lee Jones Date: Mon Nov 2 11:45:00 2020 +0000 net: fddi: skfp: drvfbi: Remove defined but unused variable 'ID_sccs' Fixes the following W=1 kernel build warning(s): drivers/net/fddi/skfp/drvfbi.c:26:19: warning: ‘ID_sccs’ defined but not used [-Wunused-const-variable=] Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201102114512.1062724-19-lee.jones@linaro.org Signed-off-by: Jakub Kicinski commit 6e5830d629c87aeed570b55680bfd95e700068a4 Author: Lee Jones Date: Mon Nov 2 11:44:58 2020 +0000 net: fddi: skfp: srf: Remove defined but unused variable 'ID_sccs' Fixes the following W=1 kernel build warning(s): drivers/net/fddi/skfp/srf.c:30:19: warning: ‘ID_sccs’ defined but not used [-Wunused-const-variable=] Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201102114512.1062724-17-lee.jones@linaro.org Signed-off-by: Jakub Kicinski commit e02243ed78031d63ce3394f475592205e9cb6939 Author: Lee Jones Date: Mon Nov 2 11:44:57 2020 +0000 net: fddi: skfp: hwt: Remove defined but unused variable 'ID_sccs' Fixes the following W=1 kernel build warning(s): drivers/net/fddi/skfp/hwt.c:31:19: warning: ‘ID_sccs’ defined but not used [-Wunused-const-variable=] Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201102114512.1062724-16-lee.jones@linaro.org Signed-off-by: Jakub Kicinski commit af1fc594679bb1ff446478284bf4d21901a0ed7e Author: Lee Jones Date: Mon Nov 2 11:44:56 2020 +0000 net: fddi: skfp: smttimer: Remove defined but unused variable 'ID_sccs' Fixes the following W=1 kernel build warning(s): drivers/net/fddi/skfp/smttimer.c:22:19: warning: ‘ID_sccs’ defined but not used [-Wunused-const-variable=] Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201102114512.1062724-15-lee.jones@linaro.org Signed-off-by: Jakub Kicinski commit ea3588b01ef2860e13ebee61a6c5e912af388e7c Author: Lee Jones Date: Mon Nov 2 11:44:53 2020 +0000 net: fddi: skfp: smtinit: Remove defined but unused variable 'ID_sccs' Fixes the following W=1 kernel build warning(s): drivers/net/fddi/skfp/smtinit.c:23:19: warning: ‘ID_sccs’ defined but not used [-Wunused-const-variable=] Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201102114512.1062724-12-lee.jones@linaro.org Signed-off-by: Jakub Kicinski commit bc3f7c2b306d2e1fe7809059909c2b9663615b4b Author: Lee Jones Date: Mon Nov 2 11:44:52 2020 +0000 net: fddi: skfp: smtdef: Remove defined but unused variable 'ID_sccs' Fixes the following W=1 kernel build warning(s): drivers/net/fddi/skfp/smtdef.c:26:19: warning: ‘ID_sccs’ defined but not used [-Wunused-const-variable=] Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201102114512.1062724-11-lee.jones@linaro.org Signed-off-by: Jakub Kicinski commit 8adc51b94aa681113fe7cd8d7e7d380df4e6d325 Author: Lee Jones Date: Mon Nov 2 11:44:51 2020 +0000 net: fddi: skfp: rmt: Remove defined but unused variable 'ID_sccs' Fixes the following W=1 kernel build warning(s): drivers/net/fddi/skfp/rmt.c:49:19: warning: ‘ID_sccs’ defined but not used [-Wunused-const-variable=] Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201102114512.1062724-10-lee.jones@linaro.org Signed-off-by: Jakub Kicinski commit 6a60a7a934db797019d5c34286e225f455f835ac Author: Lee Jones Date: Mon Nov 2 11:44:50 2020 +0000 net: fddi: skfp: queue: Remove defined but unused variable 'ID_sccs' Fixes the following W=1 kernel build warning(s): drivers/net/fddi/skfp/queue.c:22:19: warning: ‘ID_sccs’ defined but not used [-Wunused-const-variable=] Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201102114512.1062724-9-lee.jones@linaro.org Signed-off-by: Jakub Kicinski commit a15420dfe084c0d2eda672da48fffc6c808225c9 Author: Lee Jones Date: Mon Nov 2 11:44:49 2020 +0000 net: fddi: skfp: pmf: Remove defined but unused variable 'ID_sccs' Fixes the following W=1 kernel build warning(s): drivers/net/fddi/skfp/pmf.c:28:19: warning: ‘ID_sccs’ defined but not used [-Wunused-const-variable=] Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201102114512.1062724-8-lee.jones@linaro.org Signed-off-by: Jakub Kicinski commit b8e6ea263769a6143731d214a5ab67d1e35958e5 Author: Lee Jones Date: Mon Nov 2 11:44:45 2020 +0000 net: fddi: skfp: pcmplc: Remove defined but not used variable 'ID_sccs' Fixes the following W=1 kernel build warning(s): drivers/net/fddi/skfp/pcmplc.c:49:19: warning: ‘ID_sccs’ defined but not used [-Wunused-const-variable=] Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201102114512.1062724-4-lee.jones@linaro.org Signed-off-by: Jakub Kicinski commit 9745aab8cf492698d557f93b7a23822437b41b7d Author: Lee Jones Date: Mon Nov 2 11:44:44 2020 +0000 net: fddi: skfp: ecm: Remove seemingly unused variable 'ID_sccs' This variable is present in many source files and has not been used anywhere (at least internally) since it was introduced. Fixes the following W=1 kernel build warning(s): drivers/net/fddi/skfp/ecm.c: In function ‘ecm_fsm’: drivers/net/fddi/skfp/ecm.c:44:19: warning: ‘ID_sccs’ defined but not used [-Wunused-const-variable=] Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201102114512.1062724-3-lee.jones@linaro.org Signed-off-by: Jakub Kicinski commit 918895bf6166f806574c983d92ccd25edde1bae4 Author: Lee Jones Date: Mon Nov 2 11:44:43 2020 +0000 net: fddi: skfp: ecm: Protect 'if' when AIX_EVENT is not defined When AIX_EVENT is not defined, the 'if' body will be empty, which makes GCC complain. Place bracketing around the invocation to protect it. Fixes the following W=1 kernel build warning(s): drivers/net/fddi/skfp/ecm.c: In function ‘ecm_fsm’: drivers/net/fddi/skfp/ecm.c:153:29: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201102114512.1062724-2-lee.jones@linaro.org Signed-off-by: Jakub Kicinski commit ab8e32da3a39e558d2fa2bc46a25eb2f0e885a16 Author: Alexandru Stan Date: Wed Oct 21 22:04:44 2020 -0700 arm64: dts: qcom: trogdor: Add brightness-levels We want userspace to represent the human perceived brightness. Since the led drivers and the leds themselves don't have a linear response to the value we give them in terms of perceived brightness, we'll bake the curve into the dts. The panel also doesn't have a good response under 5%, so we'll avoid sending it anything lower than that. Note: Ideally this patch should be coupled with the driver change from "backlight: pwm_bl: Fix interpolation", but it can work without it, without looking too ugly. Acked-by: Daniel Thompson Reviewed-by: Douglas Anderson Signed-off-by: Alexandru Stan Link: https://lore.kernel.org/r/20201021220404.v3.2.Ie4d84af5a85e8dcb8f575845518fa39f324a827d@changeid Signed-off-by: Bjorn Andersson commit 626d667b19608c64d86cd71e6ecaa9ddc8650361 Author: Ido Schimmel Date: Sun Nov 1 13:39:26 2020 +0200 vxlan: Use a per-namespace nexthop listener instead of a global one The nexthop notification chain is a per-namespace chain and not a global one like the netdev notification chain. Therefore, a single (global) listener cannot be registered to all these chains simultaneously as it will result in list corruptions whenever listeners are registered / unregistered. Instead, register a different listener in each namespace. Currently this is not an issue because only the VXLAN driver registers a listener to this chain, but this is going to change with netdevsim and mlxsw also registering their own listeners. Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20201101113926.705630-1-idosch@idosch.org Signed-off-by: Jakub Kicinski commit 12c9ee3cb4dc554abced62e9e54ff86bb74fc08c Merge: 16b5f5ce351f8 54b77a77e30a5 Author: Jakub Kicinski Date: Tue Nov 3 15:19:26 2020 -0800 Merge branch 'net-hdlc_fr-improve-fr_rx-and-add-support-for-any-ethertype' Xie He says: ==================== net: hdlc_fr: Improve fr_rx and add support for any Ethertype The main purpose of this series is the last patch. The previous 4 patches are just code clean-ups so that the last patch will not make the code too messy. The patches must be applied in sequence. The receiving code of this driver doesn't support arbitrary Ethertype values. It only recognizes a few known Ethertypes when receiving and drops skbs with other Ethertypes. However, the standard document RFC 2427 allows Frame Relay to support any Ethertype values. This series adds support for this. Change from v6: Remove the explanation about why only a 2-byte address field is accepted because I think it is inadequate and unnecessary. Change from v5: Small fix to the commit messages. Change from v4: Drop the change related to the stats.rx_dropped count. Improve the commit message by stating why only a 2-byte address field is accepted. Change from v3: Split the last patch into 2 patches. Improve the commit message about the stats.rx_dropped count. Change from v2: Small fix to the commit messages. Change from v1: Small fix to the commit messages. ==================== Link: https://lore.kernel.org/r/20201031181043.805329-1-xie.he.0141@gmail.com Signed-off-by: Jakub Kicinski commit 54b77a77e30a5170a25cfd2f211e08ea5a6c0c4c Author: Xie He Date: Sat Oct 31 11:10:43 2020 -0700 net: hdlc_fr: Add support for any Ethertype Change the fr_rx function to make this driver support any Ethertype when receiving skbs on normal (non-Ethernet-emulating) PVC devices. (This driver is already able to handle any Ethertype when sending.) Originally in the fr_rx function, the code that parses the long (10-byte) header only recognizes a few Ethertype values and drops frames with other Ethertype values. This patch replaces this code to make fr_rx support any Ethertype. This patch also creates a new function fr_snap_parse as part of the new code. Cc: Krzysztof Halasa Signed-off-by: Xie He Acked-by: Willem de Bruijn Signed-off-by: Jakub Kicinski commit 77124c4463d45083e69b7284415467737f31f76b Author: Xie He Date: Sat Oct 31 11:10:42 2020 -0700 net: hdlc_fr: Improve the initial checks when we receive an skb 1. Change the skb->len check from "<= 4" to "< 4". At first we only need to ensure a 4-byte header is present. We indeed normally need the 5th byte, too, but it'd be more logical and cleaner to check its existence when we actually need it. 2. Add an fh->ea2 check to the initial checks in fr_rx. fh->ea2 == 1 means the second address byte is the final address byte. We only support the case where the address length is 2 bytes. Cc: Krzysztof Halasa Signed-off-by: Xie He Acked-by: Willem de Bruijn Signed-off-by: Jakub Kicinski commit efc790394f8ac7645d80c44f9cc110779428fe7b Author: Xie He Date: Sat Oct 31 11:10:41 2020 -0700 net: hdlc_fr: Do skb_reset_mac_header for skbs received on normal PVC devices When an skb is received on a normal (non-Ethernet-emulating) PVC device, call skb_reset_mac_header before we pass it to upper layers. This is because normal PVC devices don't have header_ops, so any header we have would not be visible to upper layer code when sending, so the header shouldn't be visible to upper layer code when receiving, either. Cc: Krzysztof Halasa Cc: Willem de Bruijn Signed-off-by: Xie He Signed-off-by: Jakub Kicinski commit 14b20704a18062249903a7a930e27c4452bc56bc Author: Xie He Date: Sat Oct 31 11:10:40 2020 -0700 net: hdlc_fr: Change the use of "dev" in fr_rx to make the code cleaner The eth_type_trans function is called when we receive frames carrying Ethernet frames. This function expects a non-NULL pointer as an argument, and assigns it directly to skb->dev. However, the code handling other types of frames first assigns the pointer to "dev", and then at the end checks whether the value is NULL, and if it is not NULL, assigns it to skb->dev. The two flows are different. Mixing them in this function makes the code messy. It's better that we convert the second flow to align with how eth_type_trans does things. So this patch changes the code to: first make sure the pointer is not NULL, then assign it directly to skb->dev. "dev" is no longer needed until the end where we use it to update stats. Cc: Krzysztof Halasa Cc: Willem de Bruijn Signed-off-by: Xie He Signed-off-by: Jakub Kicinski commit 583d5333ed7dcdc0c7a3f8ec8b818b7ae4a59e8e Author: Xie He Date: Sat Oct 31 11:10:39 2020 -0700 net: hdlc_fr: Simpify fr_rx by using "goto rx_drop" to drop frames When the fr_rx function drops a received frame (because the protocol type is not supported, or because the PVC virtual device that corresponds to the DLCI number and the protocol type doesn't exist), the function frees the skb and returns. The code for freeing the skb and returning is repeated several times, this patch uses "goto rx_drop" to replace them so that the code looks cleaner. Cc: Krzysztof Halasa Cc: Willem de Bruijn Signed-off-by: Xie He Signed-off-by: Jakub Kicinski commit c422aa82abb75436bc31e0da7970aa1f9248b090 Author: Stanimir Varbanov Date: Mon Nov 2 13:35:29 2020 +0200 arm64: dts: sdm845: Add interconnect properties for Venus Populate Venus DT node with interconnect properties. Reviewed-by: Georgi Djakov Signed-off-by: Stanimir Varbanov Link: https://lore.kernel.org/r/20201102113529.16152-1-stanimir.varbanov@linaro.org Signed-off-by: Bjorn Andersson commit 16b5f5ce351f8709a6b518cc3cbf240c378305bf Author: Lijun Pan Date: Sat Oct 31 04:46:45 2020 -0500 ibmvnic: merge do_change_param_reset into do_reset Commit b27507bb59ed ("net/ibmvnic: unlock rtnl_lock in reset so linkwatch_event can run") introduced do_change_param_reset function to solve the rtnl lock issue. Majority of the code in do_change_param_reset duplicates do_reset. Also, we can handle the rtnl lock issue in do_reset itself. Hence merge do_change_param_reset back into do_reset to clean up the code. Signed-off-by: Lijun Pan Link: https://lore.kernel.org/r/20201031094645.17255-1-ljp@linux.ibm.com Signed-off-by: Jakub Kicinski commit 5df324b5f4baa3a51990f078fa445800197dfba3 Author: Martin Kaiser Date: Sun Nov 1 18:18:07 2020 +0100 i2c: exynos5: don't check for irq 0 platform_get_irq never returns 0. Don't check for this. Make it clear that the error path always returns a negative error code. Signed-off-by: Martin Kaiser Reviewed-by: Krzysztof Kozlowski Signed-off-by: Wolfram Sang commit 40af583d16465aae2a570e469fc72a5d24438a20 Author: Martin Kaiser Date: Sun Nov 1 18:18:06 2020 +0100 i2c: exynos5: fix platform_get_irq error handling If platform_get_irq returns an error, relay this error to the caller of the probe function. Don't change all errors to -EINVAL. This breaks the case where platform_get_irq returns -EPROBE_DEFER. Signed-off-by: Martin Kaiser Reviewed-by: Krzysztof Kozlowski Signed-off-by: Wolfram Sang commit c0164159c2dce4acdd6e9901b3d2fe0995b78430 Author: Martin Kaiser Date: Sun Nov 1 18:18:05 2020 +0100 i2c: exynos5: remove duplicate error message platform_get_irq already prints an error message if the requested irq was not found. Don't print another message in the driver. Signed-off-by: Martin Kaiser Reviewed-by: Krzysztof Kozlowski Signed-off-by: Wolfram Sang commit eda03fa0279a43b5211485b50686f075bd17e5aa Author: Sagar Shrikant Kadam Date: Wed Oct 21 07:50:14 2020 -0700 i2c: ocores: fix polling mode workaround on FU540-C000 SoC The FU540-C000 has a broken IRQ and support was added earlier so that it will operate in polling mode, but seems to work only in case interrupts property is missing from the i2c0 dt-node. This should not be the case and the driver should handle polling mode with the interrupt property present in i2c0 node of the device tree. So check if it's the FU540-C000 soc and enable polling mode master xfers, as the IRQ for this chip is broken. Fixes commit c45d4ba86731 ("i2c: ocores: add polling mode workaround for Sifive FU540-C000 SoC") Signed-off-by: Sagar Shrikant Kadam Acked-by: Peter Korsgaard Signed-off-by: Wolfram Sang commit 46f8bfebf3a2ddfe949d45a1b63556de4354e706 Author: Cristian Ciocaltea Date: Fri Oct 9 00:44:41 2020 +0300 i2c: owl: Enable asynchronous probing Speed up the boot process by using the asynchronous probing feature supported by the recent kernels. For SBCs based on the Actions Semi S500 SoC, the overall boot time is expected to be reduced by 200-300 ms. Suggested-by: Manivannan Sadhasivam Signed-off-by: Cristian Ciocaltea Reviewed-by: Manivannan Sadhasivam Signed-off-by: Wolfram Sang commit b8be24ec67b6374efded49b35a10b84a1b255b30 Author: Cristian Ciocaltea Date: Fri Oct 9 00:44:40 2020 +0300 i2c: owl: Add support for atomic transfers Atomic transfers are required to properly power off a machine through an I2C controlled PMIC, such as the Actions Semi ATC260x series. System shutdown may happen with interrupts being disabled and, as a consequence, the kernel may hang if the driver does not support atomic transfers. This functionality is essentially implemented by polling the FIFO Status register until either Command Execute Completed or NACK Error bits are set. Signed-off-by: Cristian Ciocaltea Reviewed-by: Manivannan Sadhasivam [wsa: rebased to current tree] Signed-off-by: Wolfram Sang commit 0992d67bc2bcd723d57c6ee7883bda4524450179 Author: Guillaume Nault Date: Sat Oct 31 01:07:25 2020 +0100 mpls: drop skb's dst in mpls_forward() Commit 394de110a733 ("net: Added pointer check for dst->ops->neigh_lookup in dst_neigh_lookup_skb") added a test in dst_neigh_lookup_skb() to avoid a NULL pointer dereference. The root cause was the MPLS forwarding code, which doesn't call skb_dst_drop() on incoming packets. That is, if the packet is received from a collect_md device, it has a metadata_dst attached to it that doesn't implement any dst_ops function. To align the MPLS behaviour with IPv4 and IPv6, let's drop the dst in mpls_forward(). This way, dst_neigh_lookup_skb() doesn't need to test ->neigh_lookup any more. Let's keep a WARN condition though, to document the precondition and to ease detection of such problems in the future. Signed-off-by: Guillaume Nault Link: https://lore.kernel.org/r/f8c2784c13faa54469a2aac339470b1049ca6b63.1604102750.git.gnault@redhat.com Signed-off-by: Jakub Kicinski commit 4d05446ab0a61ea3519e3c389fc7435ad0557cd4 Author: Lee Jones Date: Tue Nov 3 15:28:27 2020 +0000 soc: samsung: s3c-pm-check: Fix incorrectly named variable 'val' Fixes the following W=1 kernel build warning(s): drivers/soc/samsung/s3c-pm-check.c:162: warning: Function parameter or member 'val' not described in 's3c_pm_runcheck' drivers/soc/samsung/s3c-pm-check.c:162: warning: Excess function parameter 'vak' description in 's3c_pm_runcheck' Signed-off-by: Lee Jones Cc: Ben Dooks Link: https://lore.kernel.org/r/20201103152838.1290217-15-lee.jones@linaro.org Signed-off-by: Krzysztof Kozlowski commit 46d43ee48d4fed3f8a5c93295f5a414c71a30fd4 Author: Alexandre Belloni Date: Wed Sep 30 16:56:54 2020 +0200 i2c: at91: remove legacy DMA left overs Commit dc6df6e90de9 ("i2c: at91: remove legacy DMA support") removed legcy DMA support from the driver. Remove the last use of the definitions from linux/platform_data/dma-atmel.h and stop including this header. Signed-off-by: Alexandre Belloni Reviewed-by: Codrin Ciubotariu [wsa: fixed typo in subject] Signed-off-by: Wolfram Sang commit 74bb4eb686dbf9ebb8e55fdf37ab9d74f3120183 Merge: 3cea11cd5e3b0 80e8eaab5e98f Author: Wolfram Sang Date: Tue Nov 3 21:32:11 2020 +0100 Merge tag '20201013212531.428538-1-dianders@chromium.org' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into i2c/for-5.11 v5.10-rc1 + 20201013212531.428538-1-dianders@chromium.org commit db5f5da2efd720be29e403fea964599032c542ec Author: Dmitry Baryshkov Date: Tue Nov 3 03:54:32 2020 +0300 arm64: dts: qcom: enable rtc on sm8250-mtp board Enable PMIC's RTC device on SM8250-MTP board. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20201103005432.1181832-2-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 721d10be5ccd7194446db40f1b9534cfe7088d73 Author: Dmitry Baryshkov Date: Tue Nov 3 03:54:31 2020 +0300 arm64: dts: qcom: enable rtc on qrb5165-rb5 board Enable PMIC's RTC device on RB5 board. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20201103005432.1181832-1-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit a60406787e0b757becbf36014fb1b55aadffa76f Author: Bjorn Andersson Date: Mon Nov 2 17:08:50 2020 -0800 arm64: defconfig: Enable Qualcomm Command DB driver The Qualcomm Command DB driver seems to have been indirectly enabled by the Qualcomm DRM driver and up until the introduction of '778279f4f5e4 ("soc: qcom: cmd-db: allow loading as a module")' this resulted in the driver "always" being builtin on arm64. But with the introduction of said change it, and all other RPMH related drivers, becomes =m. The immediate result is that the uart driver fails to probe, which depending on userspace's dependency on the presence of /dev/console might be fatal. For systems getting past this the default timeout of 0 seconds for probe deferral of many subsystems causes the system to be completely useless. So, make Command DB builtin. Reviewed-by: Vinod Koul Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20201103010850.757500-1-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit c648ae338e927f8fb6dd274646e5825852b7fd63 Author: Chris Wilson Date: Wed Oct 7 10:09:47 2020 +0100 drm/i915/gem: Perform all asynchronous waits prior to marking payload start The initial breadcrumb marks the transition from context wait and setup into the request payload. We use the marker to determine if the request is merely waiting to begin, or is inside the payload and hung. Forgetting to include a breadcrumb before the user payload would mean we do not reset the guilty user request, and conversely if the initial breadcrumb is too early we blame the user for a problem elsewhere. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20201007090947.19950-1-chris@chris-wilson.co.uk commit bc73e5d33048b7ab5f12b11b5d923700467a8e1d Author: Chris Wilson Date: Mon Nov 2 16:19:31 2020 +0000 drm/i915: Hold onto an explicit ref to i915_vma_work.pinned Since __vma_release is run by a kworker after the fence has been signaled, it is no longer protected by the active reference on the vma, and so the alias of vw->pinned to vma->obj is also not protected by a reference on the object. Add an explicit reference for vw->pinned so it will always be safe. Found by inspection. Fixes: 54d7195f8c64 ("drm/i915: Unpin vma->obj on early error") Reported-by: Tvrtko Ursulin Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: # v5.6+ Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20201102161931.30031-1-chris@chris-wilson.co.uk commit 09212e81e5450743e5b06b27c4e344e4c45b630d Author: Chris Wilson Date: Mon Nov 2 22:10:57 2020 +0000 drm/i915/gt: Flush xcs before tgl breadcrumbs In a simple test case that writes to scratch and then busy-waits for the batch to be signaled, we observe that the signal is before the write is posted. That is bad news. Splitting the flush + write_dword into two separate flush_dw prevents the issue from being reproduced, we can presume the post-sync op is not so post-sync. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/216 Testcase: igt/gem_exec_fence/parallel Testcase: igt/i915_selftest/live/gt_timelines Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: stable@vger.kernel.org Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20201102221057.29626-2-chris@chris-wilson.co.uk commit 2739d8cfc50aafff49d599cc0a5bc855445e99a7 Author: Chris Wilson Date: Mon Nov 2 22:10:56 2020 +0000 drm/i915/gt: Expose more parameters for emitting writes into the ring Add another lower level to emit_ggtt_write so that the GGTT nature of the write is not hardcoded into the emitter. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20201102221057.29626-1-chris@chris-wilson.co.uk commit 1119c59404141200125af31f775d3fbbba52c651 Author: Vincent Whitchurch Date: Tue Nov 3 11:00:20 2020 +0100 regulator: Add DA9121 Add bindings for the Dialog Semiconductor DA9121 voltage regulator. Signed-off-by: Vincent Whitchurch Link: https://lore.kernel.org/r/20201103100021.19603-2-vincent.whitchurch@axis.com Signed-off-by: Mark Brown commit e6ff10f24c587c1af705b898761e5df615fb0e1a Author: Vincent Whitchurch Date: Tue Nov 3 11:00:21 2020 +0100 regulator: Add support for DA9121 regulator Add support for the Dialog Semiconductor DA9121, a single-channel dual-phase buck converter controlled via I2C. Signed-off-by: Vincent Whitchurch Link: https://lore.kernel.org/r/20201103100021.19603-3-vincent.whitchurch@axis.com Signed-off-by: Mark Brown commit 32c5dca18be7ad88629c33f51ba7f05ae97930fa Author: Tom Rix Date: Sun Nov 1 08:03:12 2020 -0800 ASoC: TSCS42xx: remove unneeded semicolon A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20201101160312.2296146-1-trix@redhat.com Signed-off-by: Mark Brown commit 3d13ea9b8db71515d8f4795ec7a044e75999bd83 Author: Dan Carpenter Date: Tue Nov 3 13:18:53 2020 +0300 ASoC: qcom: sc7180: Fix some indenting in sc7180_lpass_alloc_dma_channel() This code is correct, but it should be indented one more tab. Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20201103101853.GD1127762@mwanda Signed-off-by: Mark Brown commit 0246c6cb246f36ffcac0b843da179ab6510e139b Author: Tom Rix Date: Sun Nov 1 09:24:12 2020 -0800 ASoC: tegra: remove unneeded semicolon A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix Acked-by: Sameer Pujar Link: https://lore.kernel.org/r/20201101172412.2306144-1-trix@redhat.com Signed-off-by: Mark Brown commit 19f6e424d6150b5eede2277dbc6dfd3bf42e994f Author: Zhang Qilong Date: Mon Nov 2 18:34:28 2020 +0800 ASoC: ti: davinci-mcasp: remove always zero of davinci_mcasp_get_dt_params davinci_mcasp_get_dt_params alway return zero, and its return value could be ignored by the caller. So make it 'void' type to avoid the check its return value. Fixes: 764958f2b5239 ("ASoC: ti: davinci-mcasp: Support for auxclk-fs-ratio") Signed-off-by: Zhang Qilong Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20201102103428.32678-1-zhangqilong3@huawei.com Signed-off-by: Mark Brown commit 99503469bdb54868fc9566480f1897c85dddd256 Author: Tom Rix Date: Sun Nov 1 09:17:42 2020 -0800 ASoC: TSCS454: remove unneeded semicolon A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20201101171742.2304458-1-trix@redhat.com Signed-off-by: Mark Brown commit f4bf1f4d1385b7cb61a3fc811bb4912d49aa394a Author: Codrin Ciubotariu Date: Tue Nov 3 12:05:54 2020 +0200 ASoC: atmel-i2s: do not warn if muxclk is missing Besides the fact that muxclk is optional, muxclk can be set using assigned-clocks, removing the need to set it in driver. The warning is thus unneeded, so we can transform it in a debug print, eventually to just reflect that muxclk was not set by the driver. Signed-off-by: Codrin Ciubotariu Link: https://lore.kernel.org/r/20201103100554.1307190-1-codrin.ciubotariu@microchip.com Signed-off-by: Mark Brown commit 139caf7ca2866cd0a45814ff938cb0c33920a266 Author: Jani Nikula Date: Tue Nov 3 14:21:25 2020 +0200 drm/i915: Update DRIVER_DATE to 20201103 Signed-off-by: Jani Nikula commit d74252bb8f0e38194e7457f7b4e5a8a33514bc24 Author: Maxime Ripard Date: Mon Nov 2 14:38:34 2020 +0100 drm: Use the state pointer directly in atomic_check Now that atomic_check takes the global atomic state as a parameter, we don't need to go through the pointer in the CRTC state. This was done using the following coccinelle script: @ crtc_atomic_func @ identifier helpers; identifier func; @@ static struct drm_crtc_helper_funcs helpers = { ..., .atomic_check = func, ..., }; @@ identifier crtc_atomic_func.func; identifier crtc, state; @@ func(struct drm_crtc *crtc, struct drm_atomic_state *state) { ... - struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state, crtc); ... when != crtc_state - crtc_state->state + state ... } @@ struct drm_crtc_state *crtc_state; identifier crtc_atomic_func.func; identifier crtc, state; @@ func(struct drm_crtc *crtc, struct drm_atomic_state *state) { ... - crtc_state->state + state ... } Suggested-by: Ville Syrjälä Signed-off-by: Maxime Ripard Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201102133834.1176740-3-maxime@cerno.tech commit 3fd9886815af458ab88fc4518a9f5137beb0097e Author: Maxime Ripard Date: Mon Nov 2 14:38:32 2020 +0100 drm/nouveau/kms/nv50-: Use state helper instead of crtc pointer dispnv50 references the crtc->state pointer in order to get the current CRTC state in its atomic_check hook, which would be the old CRTC state in the global atomic state. Use the drm_atomic_get_old_crtc_state helper to get that state to make it more obvious. Suggested-by: Ville Syrjälä Signed-off-by: Maxime Ripard Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201102133834.1176740-1-maxime@cerno.tech commit 895387231e54e83bd0779afdea125df4d79c91a4 Author: Jonathan Neuschäfer Date: Sat Oct 31 22:07:29 2020 +0100 ARM: dts: imx50-kobo-aura: Add 'grp' suffix to pinctrl node names i.MX pinctrl group nodes should have names that ends with 'grp'. Reported-by: Krzysztof Kozlowski Signed-off-by: Jonathan Neuschäfer Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 907286d1420d28bead47da37b9a081377c070322 Author: Jiri Kosina Date: Tue Nov 3 11:30:49 2020 +0100 HID: SFH: Add documentation Add Documentation/hid/amd-sfh-hid.rst file which was by mistake dropped by me when applying the series. Fixes: 302f0dad8c97a11ab ("SFH: Add maintainers and documentation for AMD SFH based on HID framework") Reported-by: Lukas Bulwahn Originally-by: Sandeep Singh Signed-off-by: Jiri Kosina commit 11c514a99bb960941535134f0587102855e8ddee Author: Jan Kara Date: Mon Nov 2 16:16:29 2020 +0100 quota: Sanity-check quota file headers on load Perform basic sanity checks of quota headers to avoid kernel crashes on corrupted quota files. CC: stable@vger.kernel.org Reported-by: syzbot+f816042a7ae2225f25ba@syzkaller.appspotmail.com Reviewed-by: Andreas Dilger Signed-off-by: Jan Kara commit 10f04d40a9fa29785206c619f80d8beedb778837 Author: Jan Kara Date: Mon Nov 2 16:32:10 2020 +0100 quota: Don't overflow quota file offsets The on-disk quota format supports quota files with upto 2^32 blocks. Be careful when computing quota file offsets in the quota files from block numbers as they can overflow 32-bit types. Since quota files larger than 4GB would require ~26 millions of quota users, this is mostly a theoretical concern now but better be careful, fuzzers would find the problem sooner or later anyway... Reviewed-by: Andreas Dilger Signed-off-by: Jan Kara commit a219ee41899bcfabd63cd6617256d5be13a7f4b6 Author: Xianting Tian Date: Sat Oct 10 17:43:35 2020 +0800 ext2: Remove unnecessary blank Remove unnecessary blank when calling kmalloc_array(). Link: https://lore.kernel.org/r/20201010094335.39797-1-tian.xianting@h3c.com Signed-off-by: Xianting Tian Signed-off-by: Jan Kara commit 5190db9fdd20fa5ba6084c98a3bc71c2fdf6a871 Author: Roman Anufriev Date: Sun Oct 18 05:56:54 2020 +0300 fs/quota: update quota state flags scheme with project quota flags Current quota state flags scheme doesn't include project quota and thus shows all flags after DQUOT_USAGE_ENABLED wrong. Fix this and also add DQUOT_NOLIST_DIRTY to the scheme. Link: https://lore.kernel.org/r/1602989814-28922-1-git-send-email-dotdot@yandex-team.ru Signed-off-by: Roman Anufriev Signed-off-by: Jan Kara commit 716e343f014e2b25320f332677363e884684b742 Author: Michael Weiß Date: Tue Oct 27 21:42:58 2020 +0100 selftests/timens: added selftest for /proc/stat btime Test that btime value of /proc/stat is as expected in the time namespace using a simple parser to get btime from /proc/stat. Signed-off-by: Michael Weiß Reviewed-by: Andrei Vagin Acked-by: Thomas Gleixner Acked-by: Christian Brauner Link: https://lore.kernel.org/r/20201027204258.7869-4-michael.weiss@aisec.fraunhofer.de commit 3ae700ecfae913316e3b4fe5f60c72b6131aaa1f Author: Michael Weiß Date: Tue Oct 27 21:42:57 2020 +0100 fs/proc: apply the time namespace offset to /proc/stat btime '/proc/stat' provides the field 'btime' which states the time stamp of system boot in seconds. In case of time namespaces, the offset to the boot time stamp was not applied earlier. This confuses tasks which are in another time universe, e.g., in a container of a container runtime which utilize time namespaces to virtualize boottime. Therefore, we make procfs to virtualize also the btime field by subtracting the offset of the timens boottime from 'btime' before printing the stats. Since start_boottime of processes are seconds since boottime and the boottime stamp is now shifted according to the timens offset, the offset of the time namespace also needs to be applied before the process stats are given to userspace. This avoids that processes shown, e.g., by 'ps' appear as time travelers in the corresponding time namespace. Signed-off-by: Michael Weiß Reviewed-by: Andrei Vagin Acked-by: Thomas Gleixner Acked-by: Christian Brauner Link: https://lore.kernel.org/r/20201027204258.7869-3-michael.weiss@aisec.fraunhofer.de commit 31909e3330c8d65e9a928d40833ebd5feb4f64e6 Author: Michael Weiß Date: Tue Oct 27 21:42:56 2020 +0100 timens: additional helper functions for boottime offset handling Provide functions for time_namespace to subtract the boottime offset from a timespec64 as well as to apply the boottime offset to u64 types in nanoseconds. Signed-off-by: Michael Weiß Reviewed-by: Andrei Vagin Acked-by: Thomas Gleixner Acked-by: Christian Brauner Link: https://lore.kernel.org/r/20201027204258.7869-2-michael.weiss@aisec.fraunhofer.de commit 35bed3fa9ec58a5b5406c60f66faff86f00fa86b Author: Thomas Zimmermann Date: Wed Oct 21 14:12:41 2020 +0200 drivers/video: Fix -Wstringop-truncation in hdmi.c Trying to copy into the string fields with strncpy() gives a warning from gcc. Both fields are part of a packed HDMI header and do not require a terminating \0 character. ../drivers/video/hdmi.c: In function 'hdmi_spd_infoframe_init': ../drivers/video/hdmi.c:230:2: warning: 'strncpy' specified bound 8 equals destination size [-Wstringop-truncation] 230 | strncpy(frame->vendor, vendor, sizeof(frame->vendor)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/video/hdmi.c:231:2: warning: 'strncpy' specified bound 16 equals destination size [-Wstringop-truncation] 231 | strncpy(frame->product, product, sizeof(frame->product)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Just use memcpy() instead. Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201021121241.17623-1-tzimmermann@suse.de commit 83f7a38ecd3354fd38d9024a0703452041bdc417 Author: Zou Wei Date: Sat Oct 31 09:32:02 2020 +0800 platform/x86/dell-wmi-sysman: Make some symbols static Fix the following sparse warnings: ./passobj-attributes.c:38:23: warning: symbol 'po_is_pass_set' was not declared. Should it be static? ./passobj-attributes.c:70:23: warning: symbol 'po_current_password' was not declared. Should it be static? ./passobj-attributes.c:99:23: warning: symbol 'po_new_password' was not declared. Should it be static? ./passobj-attributes.c:103:23: warning: symbol 'po_min_pass_length' was not declared. Should it be static? ./passobj-attributes.c:107:23: warning: symbol 'po_max_pass_length' was not declared. Should it be static? ./passobj-attributes.c:116:23: warning: symbol 'po_mechanism' was not declared. Should it be static? ./passobj-attributes.c:129:23: warning: symbol 'po_role' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: Zou Wei Link: https://lore.kernel.org/r/1604107922-14950-1-git-send-email-zou_wei@huawei.com Signed-off-by: Hans de Goede commit 76adf0df04c294d2e97981ec7310f93f35dfa6ee Author: Zou Wei Date: Thu Oct 29 19:39:41 2020 +0800 platform/x86/dell-wmi-sysman: Make wmi_sysman_kobj_sysfs_ops static Fix the following sparse warning: drivers/platform/x86/dell-wmi-sysman/sysman.c:258:24: warning: symbol 'wmi_sysman_kobj_sysfs_ops' was not declared. Should it be static? wmi_sysman_kobj_sysfs_ops has only call within sysman.c It should be static Reported-by: Hulk Robot Signed-off-by: Zou Wei Link: https://lore.kernel.org/r/1603971581-64135-1-git-send-email-zou_wei@huawei.com Signed-off-by: Hans de Goede commit 924ad325f55ef7d2b5f377cda7885136c00604ec Author: Lukas Bulwahn Date: Thu Oct 29 12:44:25 2020 +0100 MAINTAINERS: rectify DELL WMI SYSMAN DRIVERS section Commit e8a60aa7404b ("platform/x86: Introduce support for Systems Management Driver over WMI for Dell Systems") added a new section DELL WMI SYSMAN DRIVERS in MAINTAINERS, but slipped in a typo. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains: warning: no file matches F: drivers/platform/x86/dell-wmi-syman/* Point the file entry to the right location and add an entry for its Documentation while at it. Signed-off-by: Lukas Bulwahn Acked-by: Divya Bharathi Link: https://lore.kernel.org/r/20201029114425.22520-1-lukas.bulwahn@gmail.com Signed-off-by: Hans de Goede commit 5b09081f4c5c7159cb3789f35bb82bd9d32061c9 Author: Mauro Carvalho Chehab Date: Thu Oct 29 10:31:23 2020 +0100 docs: ABI: sysfs-class-firmware-attributes: solve some warnings The Description: tag is missing on some places, causing scripts/get_abi.pl warnings: Warning: file Documentation/ABI/testing/sysfs-class-firmware-attributes#172: What '/sys/class/firmware-attributes/*/authentication/' doesn't have a description Also, some warnings are produced when generating html documentation: .../Documentation/ABI/testing/sysfs-class-firmware-attributes:2: WARNING: Title underline too short. Dell specific class extensions -------------------------- .../Documentation/ABI/testing/sysfs-class-firmware-attributes:2: WARNING: Unexpected indentation. .../Documentation/ABI/testing/sysfs-class-firmware-attributes:2: WARNING: Unexpected indentation. .../Documentation/ABI/testing/sysfs-class-firmware-attributes:2: WARNING: Block quote ends without a blank line; unexpected unindent. .../Documentation/ABI/testing/sysfs-class-firmware-attributes:173: WARNING: Unexpected indentation. .../Documentation/ABI/testing/sysfs-class-firmware-attributes:173: WARNING: Unexpected indentation. .../Documentation/ABI/testing/sysfs-class-firmware-attributes:173: WARNING: Block quote ends without a blank line; unexpected unindent. .../Documentation/ABI/testing/sysfs-class-firmware-attributes:111: WARNING: Inline emphasis start-string without end-string. Address the warnings, making it to produce the expected output for the documentation ABI. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/44b4181b4f772fcc5ec676e72b295c10df35121b.1603963862.git.mchehab+huawei@kernel.org Signed-off-by: Hans de Goede commit c2192bbc3c507b33dda5858049e0493c073d29fb Author: Alexander Usyskin Date: Thu Oct 29 11:54:44 2020 +0200 mei: bus: deinitialize callback functions on init failure If the initialization procedure for receive or receive callback registration on the client bus has failed the caller can't re-run it. Deinitilize the callback pointers and cancel the work to allow the caller to retry. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20201029095444.957924-4-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit c7a6252b9472fd96a3dbac40c891eb9f4fe5b4f1 Author: Alexander Usyskin Date: Thu Oct 29 11:54:43 2020 +0200 mei: bus: do not start a read for disconnected clients Avoid queuing reads and registering rx callbacks in case the client is not connected, to prevent null dereferencing and memory leaks. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20201029095444.957924-3-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit a7c392c76a434c71df30ca748aae00d69684ff48 Author: Lee Jones Date: Mon Nov 2 14:20:01 2020 +0000 misc: ocxl: config: Rename function attribute description Fixes the following W=1 kernel build warning(s): drivers/misc/ocxl/config.c:81: warning: Function parameter or member 'dev' not described in 'get_function_0' drivers/misc/ocxl/config.c:81: warning: Excess function parameter 'device' description in 'get_function_0' Cc: Frederic Barrat Cc: Andrew Donnellan Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: linuxppc-dev@lists.ozlabs.org Acked-by: Frederic Barrat Acked-by: Andrew Donnellan Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201102142001.560490-2-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit e8f50d4bfc8deff61adc74146f130860c4fe356f Author: Lee Jones Date: Mon Nov 2 14:20:00 2020 +0000 misc: c2port: core: Make copying name from userspace more secure Currently the 'c2dev' device data is not initialised when it's allocated. There maybe an issue when using strncpy() to populate the 'name' attribute since a NUL terminator may not be provided in all use-cases. To prevent such a failing, let's ensure the 'c2dev' device data area is fully zeroed out on allocation. Cc: Rodolfo Giometti Cc: "Eurotech S.p.A" Cc: David Laight Reported-by: Geert Uytterhoeven Acked-by: Arnd Bergmann Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20201102142001.560490-1-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit c78c95f919539cad0308e7de0d5d0d656e4a8e98 Author: Harshal Chaudhari Date: Sun Nov 1 22:39:49 2020 +0530 misc: xilinx-sdfec: remove check for ioctl cmd and argument. if (_IOC_TYPE(cmd) != PP_IOCTL) return -ENOTTY; Invalid ioctl command check normally performs by “default” case. if (_IOC_DIR(cmd) != _IOC_NONE) { argp = (void __user *)arg; if (!argp) return -EINVAL; } And for checking ioctl arguments, copy_from_user()/copy_to_user() checks are enough. Reviewed-by: Arnd Bergmann Signed-off-by: Harshal Chaudhari Link: https://lore.kernel.org/r/20201101170949.18616-1-harshalchau04@gmail.com Signed-off-by: Greg Kroah-Hartman commit 33fcc5491897504856783335102142676dbee817 Author: Gustavo Pimentel Date: Wed Oct 21 23:28:10 2020 +0200 misc: pci_endpoint_test: Remove unnecessary verification The first condition of the if statement can never be true, because bar variable is an enum variable type defined between 0 and 5, and also bar variable acquires the value from arg function parameter which is an unsigned long variable. The constant 5 was replaced the the equivalent enum type, in this case BAR_5. Signed-off-by: Gustavo Pimentel Link: https://lore.kernel.org/r/142cbbc215bed4243a219ea17b46f4256ceccb22.1603315690.git.gustavo.pimentel@synopsys.com Signed-off-by: Greg Kroah-Hartman commit 35ad0d901eac56ac6af2e4d726f255486c1ee36c Author: Dan Carpenter Date: Mon Nov 2 10:56:55 2020 +0300 usb: misc: brcmstb-usb-pinmap: Fix an IS_ERR() vs NULL check The devm_ioremap() function doesn't return error pointers, it returns NULL on error. Fixes: 517c4c44b323 ("usb: Add driver to allow any GPIO to be used for 7211 USB signals") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20201102075655.GA4163205@mwanda Signed-off-by: Greg Kroah-Hartman commit f0f753da73b386deb274486255b857d013fa6069 Author: Tom Rix Date: Sat Oct 31 08:24:56 2020 -0700 misc: ti-st: st_core: remove unneeded semicolon A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20201031152456.2146104-1-trix@redhat.com Signed-off-by: Greg Kroah-Hartman commit f7a6e6c4073c1e03ab18d2229857cfef5e0f8b7b Author: Tom Rix Date: Mon Oct 19 12:18:08 2020 -0700 misc: mei: remove unneeded break A break is not needed if it is preceded by a return Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20201019191808.9891-1-trix@redhat.com Signed-off-by: Greg Kroah-Hartman commit c62b1f97e744039f01ec789ce01dfa0a8c9a1a99 Author: Sangmoon Kim Date: Thu Oct 29 15:28:55 2020 +0900 char: misc: increase DYNAMIC_MINORS value DYNAMIC_MINORS value has been set to 64. Due to this reason, we are facing a module loading fail problem of device driver like below. [ 45.712771] pdic_misc_init - return error : -16 We need to increase this value for registering more misc devices. Signed-off-by: Sangmoon Kim Link: https://lore.kernel.org/r/20201029062855.19757-1-sangmoon.kim@samsung.com Signed-off-by: Greg Kroah-Hartman commit 478ba09edc1f2f2ee27180a06150cb2d1a686f9c Author: Greg Kurz Date: Wed Sep 23 22:11:45 2020 +0800 fs/9p: search open fids first A previous patch fixed the "create-unlink-getattr" idiom: if getattr is called on an unlinked file, we try to find an open fid attached to the corresponding inode. We have a similar issue with file permissions and setattr: open("./test.txt", O_RDWR|O_CREAT, 0666) = 4 chmod("./test.txt", 0) = 0 truncate("./test.txt", 0) = -1 EACCES (Permission denied) ftruncate(4, 0) = -1 EACCES (Permission denied) The failure is expected with truncate() but not with ftruncate(). This happens because the lookup code does find a matching fid in the dentry list. Unfortunately, this is not an open fid and the server will be forced to rely on the path name, rather than on an open file descriptor. This is the case in QEMU: the setattr operation will use truncate() and fail because of bad write permissions. This patch changes the logic in the lookup code, so that we consider open fids first. It gives a chance to the server to match this open fid to an open file descriptor and use ftruncate() instead of truncate(). This does not change the current behaviour for truncate() and other path name based syscalls, since file permissions are checked earlier in the VFS layer. With this patch, we get: open("./test.txt", O_RDWR|O_CREAT, 0666) = 4 chmod("./test.txt", 0) = 0 truncate("./test.txt", 0) = -1 EACCES (Permission denied) ftruncate(4, 0) = 0 Link: http://lkml.kernel.org/r/20200923141146.90046-4-jianyong.wu@arm.com Signed-off-by: Greg Kurz Signed-off-by: Jianyong Wu Signed-off-by: Dominique Martinet commit 987a64850996db22bbcf2c1d0a051446a343fa2c Author: Greg Kurz Date: Wed Sep 23 22:11:44 2020 +0800 fs/9p: track open fids This patch adds accounting of open fids in a list hanging off the i_private field of the corresponding inode. This allows faster lookups compared to searching the full 9p client list. The lookup code is modified accordingly. Link: http://lkml.kernel.org/r/20200923141146.90046-3-jianyong.wu@arm.com Signed-off-by: Greg Kurz Signed-off-by: Jianyong Wu Signed-off-by: Dominique Martinet commit 154372e67d4053e56591245eb413686621941333 Author: Eric Van Hensbergen Date: Wed Sep 23 22:11:43 2020 +0800 fs/9p: fix create-unlink-getattr idiom Fixes several outstanding bug reports of not being able to getattr from an open file after an unlink. This patch cleans up transient fids on an unlink and will search open fids on a client if it detects a dentry that appears to have been unlinked. This search is necessary because fstat does not pass fd information through the VFS API to the filesystem, only the dentry which for 9p has an imperfect match to fids. Inherent in this patch is also a fix for the qid handling on create/open which apparently wasn't being set correctly and was necessary for the search to succeed. A possible optimization over this fix is to include accounting of open fids with the inode in the private data (in a similar fashion to the way we track transient fids with dentries). This would allow a much quicker search for a matching open fid. (changed v9fs_fid_find_global to v9fs_fid_find_inode in comment) Link: http://lkml.kernel.org/r/20200923141146.90046-2-jianyong.wu@arm.com Signed-off-by: Eric Van Hensbergen Signed-off-by: Greg Kurz Signed-off-by: Jianyong Wu Signed-off-by: Dominique Martinet commit 7d6763ab77b3c047cf7d31ca7c4b799808a684a6 Author: Boris Brezillon Date: Sun Nov 1 18:38:17 2020 +0100 drm/panfrost: Remove unused variables in panfrost_job_close() Commit a17d609e3e21 ("drm/panfrost: Don't corrupt the queue mutex on open/close") left unused variables behind, thus generating a warning at compilation time. Remove those variables. Fixes: a17d609e3e21 ("drm/panfrost: Don't corrupt the queue mutex on open/close") Signed-off-by: Boris Brezillon Reviewed-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/20201101173817.831769-1-boris.brezillon@collabora.com commit e991a40b3d0000a2f48729aea4ce03acf679b5ee Author: Tetsuo Handa Date: Tue Nov 3 13:17:40 2020 +0900 tomoyo: Limit wildcard recursion depth. Since wildcards that need recursion consume kernel stack memory (or might cause CPU stall warning problem), we cannot allow infinite recursion. Since TOMOYO 1.8 survived with 20 recursions limit for 5 years, nobody would complain if applying this limit to TOMOYO 2.6. Signed-off-by: Tetsuo Handa commit 6d89076e6ef09337a29a7b1ea4fdf2d892be9650 Merge: 0e8c266c59b56 261e411bb283d Author: Jakub Kicinski Date: Mon Nov 2 18:01:45 2020 -0800 Merge branch 'net-mac80211-kernel-enable-kcov-remote-coverage-collection-for-802-11-frame-handling' Aleksandr Nogikh says: ==================== net, mac80211, kernel: enable KCOV remote coverage collection for 802.11 frame handling This patch series enables remote KCOV coverage collection during 802.11 frames processing. These changes make it possible to perform coverage-guided fuzzing in search of remotely triggerable bugs. Normally, KCOV collects coverage information for the code that is executed inside the system call context. It is easy to identify where that coverage should go and whether it should be collected at all by looking at the current process. If KCOV was enabled on that process, coverage will be stored in a buffer specific to that process. Howerever, it is not always enough as handling can happen elsewhere (e.g. in separate kernel threads). When it is impossible to infer KCOV-related info just by looking at the currently running process, one needs to manually pass some information to the code that should be instrumented. The information takes the form of 64 bit integers (KCOV remote handles). Zero is the special value that corresponds to an empty handle. More details on KCOV and remote coverage collection can be found in Documentation/dev-tools/kcov.rst. The series consists of three commits. 1. Apply a minor fix to kcov_common_handle() so that it returns a valid handle (zero) when called in an interrupt context. 2. Take the remote handle from KCOV and attach it to newly allocated SKBs as an skb extension. If the allocation happens inside a system call context, the SKB will be tied to the process that issued the syscall (if that process is interested in remote coverage collection). 3. Annotate the code that processes incoming 802.11 frames with kcov_remote_start()/kcov_remote_stop(). v5: * Collecting remote coverate at ieee80211_rx_list() instead of ieee80211_rx() v4: https://lkml.kernel.org/r/20201028182018.1780842-1-aleksandrnogikh@gmail.com * CONFIG_SKB_EXTENSIONS is now automatically selected by CONFIG_KCOV. * Elaborated on a minor optimization in skb_set_kcov_handle(). v3: https://lkml.kernel.org/r/20201026150851.528148-1-aleksandrnogikh@gmail.com * kcov_handle is now stored in skb extensions instead of sk_buff itself. * Updated the cover letter. v2: https://lkml.kernel.org/r/20201009170202.103512-1-a.nogikh@gmail.com * Moved KCOV annotations from ieee80211_tasklet_handler to ieee80211_rx. * Updated kcov_common_handle() to return 0 if it is called in interrupt context. * Updated the cover letter. v1: https://lkml.kernel.org/r/20201007101726.3149375-1-a.nogikh@gmail.com ==================== Link: https://lore.kernel.org/r/20201029173620.2121359-1-aleksandrnogikh@gmail.com Signed-off-by: Jakub Kicinski commit 261e411bb283d348a6a977cccb5db393594e7695 Author: Aleksandr Nogikh Date: Thu Oct 29 17:36:20 2020 +0000 mac80211: add KCOV remote annotations to incoming frame processing Add KCOV remote annotations to ieee80211_iface_work() and ieee80211_rx_list(). This will enable coverage-guided fuzzing of mac80211 code that processes incoming 802.11 frames. Signed-off-by: Aleksandr Nogikh Reviewed-by: Johannes Berg Signed-off-by: Jakub Kicinski commit 6370cc3bbd8a0f9bf975b013781243ab147876c6 Author: Aleksandr Nogikh Date: Thu Oct 29 17:36:19 2020 +0000 net: add kcov handle to skb extensions Remote KCOV coverage collection enables coverage-guided fuzzing of the code that is not reachable during normal system call execution. It is especially helpful for fuzzing networking subsystems, where it is common to perform packet handling in separate work queues even for the packets that originated directly from the user space. Enable coverage-guided frame injection by adding kcov remote handle to skb extensions. Default initialization in __alloc_skb and __build_skb_around ensures that no socket buffer that was generated during a system call will be missed. Code that is of interest and that performs packet processing should be annotated with kcov_remote_start()/kcov_remote_stop(). An alternative approach is to determine kcov_handle solely on the basis of the device/interface that received the specific socket buffer. However, in this case it would be impossible to distinguish between packets that originated during normal background network processes or were intentionally injected from the user space. Signed-off-by: Aleksandr Nogikh Acked-by: Willem de Bruijn Signed-off-by: Jakub Kicinski commit b08e84da205023009c456bd7f33feb83c5191c60 Author: Aleksandr Nogikh Date: Thu Oct 29 17:36:18 2020 +0000 kernel: make kcov_common_handle consider the current context kcov_common_handle is a method that is used to obtain a "default" KCOV remote handle of the current process. The handle can later be passed to kcov_remote_start in order to collect coverage for the processing that is initiated by one process, but done in another. For details see Documentation/dev-tools/kcov.rst and comments in kernel/kcov.c. Presently, if kcov_common_handle is called in an IRQ context, it will return a handle for the interrupted process. This may lead to unreliable and incorrect coverage collection. Adjust the behavior of kcov_common_handle in the following way. If it is called in a task context, return the common handle for the currently running task. Otherwise, return 0. Signed-off-by: Aleksandr Nogikh Reviewed-by: Andrey Konovalov Signed-off-by: Jakub Kicinski commit 0e8c266c59b56acc94d3289d3b3fb142d22fb46c Author: Tom Rix Date: Sat Oct 31 08:30:47 2020 -0700 net: dsa: mt7530: remove unneeded semicolon A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20201031153047.2147341-1-trix@redhat.com Signed-off-by: Jakub Kicinski commit c568db7fd0017b310569515b57927dd89d31642b Author: Tom Rix Date: Sun Nov 1 06:05:28 2020 -0800 net/mlx4_core : remove unneeded semicolon A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix Reviewed-by: Tariq Toukan Link: https://lore.kernel.org/r/20201101140528.2279424-1-trix@redhat.com Signed-off-by: Jakub Kicinski commit 1c5825e6646b4907de00d7640d4d3a4b3619937e Author: Tom Rix Date: Sun Nov 1 06:07:20 2020 -0800 net: stmmac: dwmac-meson8b: remove unneeded semicolon A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20201101140720.2280013-1-trix@redhat.com Signed-off-by: Jakub Kicinski commit 5d867245c46a7c4e52acdc8d2625c11c1d3e72b1 Author: Tom Rix Date: Sun Nov 1 07:36:47 2020 -0800 net: core: remove unneeded semicolon A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20201101153647.2292322-1-trix@redhat.com Signed-off-by: Jakub Kicinski commit 9d253c02acd6bfd8c9a5c0d3a9ce18daaac84489 Author: Tom Rix Date: Sun Nov 1 07:56:01 2020 -0800 ethtool: remove unneeded semicolon A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20201101155601.2294374-1-trix@redhat.com Signed-off-by: Jakub Kicinski commit f2219c322ff2d91afbaa1236f1f91a28b785cd1e Author: Tom Rix Date: Sun Nov 1 07:58:22 2020 -0800 tipc: remove unneeded semicolon A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20201101155822.2294856-1-trix@redhat.com Signed-off-by: Jakub Kicinski commit 0b6f164d5a52920a4df854d56859a406042946f8 Merge: 92f9e238c909e 86c4ad9a78767 Author: Jakub Kicinski Date: Mon Nov 2 17:41:19 2020 -0800 Merge branch 'generic-tx-reallocation-for-dsa' Vladimir Oltean says: ==================== Generic TX reallocation for DSA Christian has reported buggy usage of skb_put() in tag_ksz.c, which is only triggerable in real life using his not-yet-published patches for IEEE 1588 timestamping on Micrel KSZ switches. The concrete problem there is that the driver can end up calling skb_put() and exceed the end of the skb data area, because even though it had reallocated the frame once before, it hadn't reallocated it large enough. Christian explained it in more detail here: https://lore.kernel.org/netdev/20201014161719.30289-1-ceggers@arri.de/ https://lore.kernel.org/netdev/20201016200226.23994-1-ceggers@arri.de/ But actually there's a bigger problem, which is that some taggers which get more rarely tested tend to do some shenanigans which are uncaught for the longest time, and in the meanwhile, their code gets copy-pasted into other taggers, creating a mess. For example, the tail tagging driver for Marvell 88E6060 currently reallocates _every_single_frame_ on TX. Is that an obvious indication that nobody is using it? Sure. Is it a good model to follow when developing a new tail tagging driver? No. DSA has all the information it needs in order to simplify the job of a tagger on TX. It knows whether it's a normal or a tail tagger, and what is the protocol overhead it incurs. So this series performs the reallocation centrally. Changes in v3: - Use dev_kfree_skb_any due to potential hardirq context in xmit path. Changes in v2: - Dropped the tx_realloc counters for now, since the patch was pretty controversial and I lack the time at the moment to introduce new UAPI for that. - Do padding for tail taggers irrespective of whether they need to reallocate the skb or not. ==================== Link: https://lore.kernel.org/r/20201101191620.589272-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 86c4ad9a7876777c12fd5a7010152e4141fcb94d Author: Vladimir Oltean Date: Sun Nov 1 21:16:20 2020 +0200 net: dsa: tag_ar9331: let DSA core deal with TX reallocation Now that we have a central TX reallocation procedure that accounts for the tagger's needed headroom in a generic way, we can remove the skb_cow_head call. Cc: Per Forlin Cc: Oleksij Rempel Signed-off-by: Vladimir Oltean Tested-by: Oleksij Rempel Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit 9b9826ae117f211bcbdc75db844d5fd8b159fc59 Author: Vladimir Oltean Date: Sun Nov 1 21:16:19 2020 +0200 net: dsa: tag_gswip: let DSA core deal with TX reallocation Now that we have a central TX reallocation procedure that accounts for the tagger's needed headroom in a generic way, we can remove the skb_cow_head call. This one is interesting, the DSA tag is 8 bytes on RX and 4 bytes on TX. Because DSA is unaware of asymmetrical tag lengths, the overhead/needed headroom is declared as 8 bytes and therefore 4 bytes larger than it needs to be. If this becomes a problem, and the GSWIP driver can't be converted to a uniform header length, we might need to make DSA aware of separate RX/TX overhead values. Cc: Hauke Mehrtens Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit 952a06345015867e3bd37f8d9045fc1429637d43 Author: Vladimir Oltean Date: Sun Nov 1 21:16:18 2020 +0200 net: dsa: tag_dsa: let DSA core deal with TX reallocation Now that we have a central TX reallocation procedure that accounts for the tagger's needed headroom in a generic way, we can remove the skb_cow_head call. Similar to the EtherType DSA tagger, the old Marvell tagger can transform an 802.1Q header if present into a DSA tag, so there is no headroom required in that case. But we are ensuring that it exists, regardless (practically speaking, the headroom must be 4 bytes larger than it needs to be). Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit 2f0d030c5ffec6660f79a32b4f522155f75a9d71 Author: Vladimir Oltean Date: Sun Nov 1 21:16:17 2020 +0200 net: dsa: tag_brcm: let DSA core deal with TX reallocation Now that we have a central TX reallocation procedure that accounts for the tagger's needed headroom in a generic way, we can remove the skb_cow_head call. Cc: Florian Fainelli Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit c6c4e1237dfe731644e79fa06d073625f28cd945 Author: Vladimir Oltean Date: Sun Nov 1 21:16:16 2020 +0200 net: dsa: tag_edsa: let DSA core deal with TX reallocation Now that we have a central TX reallocation procedure that accounts for the tagger's needed headroom in a generic way, we can remove the skb_cow_head call. Note that the VLAN code path needs a smaller extra headroom than the regular EtherType DSA path. That isn't a problem, because this tagger declares the larger tag length (8 bytes vs 4) as the protocol overhead, so we are covered in both cases. Cc: Andrew Lunn Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit 6ed94135f58372cdec34cafb60f7596893b0b371 Author: Vladimir Oltean Date: Sun Nov 1 21:16:15 2020 +0200 net: dsa: tag_lan9303: let DSA core deal with TX reallocation Now that we have a central TX reallocation procedure that accounts for the tagger's needed headroom in a generic way, we can remove the skb_cow_head call. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit 941f66beb7bb4e0e4726aa31336d9ccc1c3a3dc2 Author: Vladimir Oltean Date: Sun Nov 1 21:16:14 2020 +0200 net: dsa: tag_mtk: let DSA core deal with TX reallocation Now that we have a central TX reallocation procedure that accounts for the tagger's needed headroom in a generic way, we can remove the skb_cow_head call. Cc: DENG Qingfang Cc: Sean Wang Cc: John Crispin Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit 9c5c3bd00557e57c1049f7861f11e5e39f0fb42d Author: Vladimir Oltean Date: Sun Nov 1 21:16:13 2020 +0200 net: dsa: tag_ocelot: let DSA core deal with TX reallocation Now that we have a central TX reallocation procedure that accounts for the tagger's needed headroom in a generic way, we can remove the skb_cow_head call. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit 9bbda29ae1044bc4c1c01a5b7c44688c4765785f Author: Vladimir Oltean Date: Sun Nov 1 21:16:12 2020 +0200 net: dsa: tag_qca: let DSA core deal with TX reallocation Now that we have a central TX reallocation procedure that accounts for the tagger's needed headroom in a generic way, we can remove the skb_cow_head call. Cc: John Crispin Cc: Alexander Lobakin Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit ef3f72fee286bd270453ce2344feb7295a798508 Author: Christian Eggers Date: Sun Nov 1 21:16:11 2020 +0200 net: dsa: trailer: don't allocate additional memory for padding/tagging The caller (dsa_slave_xmit) guarantees that the frame length is at least ETH_ZLEN and that enough memory for tail tagging is available. Signed-off-by: Christian Eggers Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit 88fda8eefd9a7a7175bf4dad1d02cc0840581111 Author: Christian Eggers Date: Sun Nov 1 21:16:10 2020 +0200 net: dsa: tag_ksz: don't allocate additional memory for padding/tagging The caller (dsa_slave_xmit) guarantees that the frame length is at least ETH_ZLEN and that enough memory for tail tagging is available. Signed-off-by: Christian Eggers Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit a3b0b6479700a5b0af2c631cb2ec0fb7a0d978f2 Author: Vladimir Oltean Date: Sun Nov 1 21:16:09 2020 +0200 net: dsa: implement a central TX reallocation procedure At the moment, taggers are left with the task of ensuring that the skb headers are writable (which they aren't, if the frames were cloned for TX timestamping, for flooding by the bridge, etc), and that there is enough space in the skb data area for the DSA tag to be pushed. Moreover, the life of tail taggers is even harder, because they need to ensure that short frames have enough padding, a problem that normal taggers don't have. The principle of the DSA framework is that everything except for the most intimate hardware specifics (like in this case, the actual packing of the DSA tag bits) should be done inside the core, to avoid having code paths that are very rarely tested. So provide a TX reallocation procedure that should cover the known needs of DSA today. Note that this patch also gives the network stack a good hint about the headroom/tailroom it's going to need. Up till now it wasn't doing that. So the reallocation procedure should really be there only for the exceptional cases, and for cloned packets which need to be unshared. Signed-off-by: Vladimir Oltean Tested-by: Christian Eggers # For tail taggers only Tested-by: Kurt Kanzenbach Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit 92f9e238c909ef9b4a138f47bdca856fc0c8b78a Author: YueHaibing Date: Sat Oct 31 14:01:53 2020 +0800 openvswitch: Use IS_ERR instead of IS_ERR_OR_NULL Fix smatch warning: net/openvswitch/meter.c:427 ovs_meter_cmd_set() warn: passing zero to 'PTR_ERR' dp_meter_create() never returns NULL, use IS_ERR instead of IS_ERR_OR_NULL to fix this. Signed-off-by: YueHaibing Acked-by: Tonghao Zhang Link: https://lore.kernel.org/r/20201031060153.39912-1-yuehaibing@huawei.com Signed-off-by: Jakub Kicinski commit 9e2a5f8cfb4d9371783e21e27bba4338401f1260 Author: Daeho Jeong Date: Fri Oct 30 13:10:34 2020 +0900 f2fs: add F2FS_IOC_GET_COMPRESS_OPTION ioctl Added a new F2FS_IOC_GET_COMPRESS_OPTION ioctl to get file compression option of a file. struct f2fs_comp_option { u8 algorithm; => compression algorithm => 0:lzo, 1:lz4, 2:zstd, 3:lzorle u8 log_cluster_size; => log scale cluster size => 2 ~ 8 }; struct f2fs_comp_option option; ioctl(fd, F2FS_IOC_GET_COMPRESS_OPTION, &option); Signed-off-by: Daeho Jeong Signed-off-by: Jaegeuk Kim commit 36ed77cd0535728709d38e3f676db7958188765c Author: YueHaibing Date: Sat Oct 31 10:49:40 2020 +0800 net: hns3: Remove duplicated include Remove duplicated include. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20201031024940.29716-1-yuehaibing@huawei.com Signed-off-by: Jakub Kicinski commit 0b833eef92dec0af9ce049ecd712c39f194577d1 Author: YueHaibing Date: Sat Oct 31 10:47:44 2020 +0800 liquidio: cn68xx: Remove duplicated include Remove duplicated include. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20201031024744.39020-1-yuehaibing@huawei.com Signed-off-by: Jakub Kicinski commit 7e901ee7b6ab0b7c1a5e29b8513af23709285a29 Author: Yuchung Cheng Date: Fri Oct 30 18:34:12 2020 -0700 tcp: avoid slow start during fast recovery on new losses During TCP fast recovery, the congestion control in charge is by default the Proportional Rate Reduction (PRR) unless the congestion control module specified otherwise (e.g. BBR). Previously when tcp_packets_in_flight() is below snd_ssthresh PRR would slow start upon receiving an ACK that 1) cumulatively acknowledges retransmitted data and 2) does not detect further lost retransmission Such conditions indicate the repair is in good steady progress after the first round trip of recovery. Otherwise PRR adopts the packet conservation principle to send only the amount that was newly delivered (indicated by this ACK). This patch generalizes the previous design principle to include also the newly sent data beside retransmission: as long as the delivery is making good progress, both retransmission and new data should be accounted to make PRR more cautious in slow starting. Suggested-by: Matt Mathis Suggested-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Neal Cardwell Signed-off-by: Eric Dumazet Link: https://lore.kernel.org/r/20201031013412.1973112-1-ycheng@google.com Signed-off-by: Jakub Kicinski commit 08c7974293851da6a64989b5ce7a0750e58178b1 Author: Paul E. McKenney Date: Fri Aug 28 06:46:03 2020 -0700 torture: Don't kill gdb sessions The rcutorture scripting will do a "kill -9" on any guest OS that exceeds its --duration by more than a few minutes, which is very valuable when bugs result in hangs. However, this is a problem when the "hang" was due to a --gdb debugging session. This commit therefore refrains from killing the guest OS when a debugging session is in progress. This means that the user must manually kill the kvm.sh process group if a hang really does occur. Signed-off-by: Paul E. McKenney commit 0c6d18d84db11840dd0f3f65750c6ea0bb6b8e0d Author: Paul E. McKenney Date: Thu Aug 27 09:58:19 2020 -0700 refscale: Bounds-check module parameters The default value for refscale.nreaders is -1, which results in the code setting the value to three-quarters of the number of CPUs. On single-CPU systems, this results in three-quarters of the value one, which the C language's integer arithmetic rounds to zero. This in turn results in a divide-by-zero error. This commit therefore adds bounds checking to the refscale module parameters, so that if they are less than one, they are set to the value one. Reported-by: kernel test robot Tested-by "Chen, Rong A" Signed-off-by: Paul E. McKenney commit 27c0f1448389baf7f309b69e62d4b531c9395e88 Author: Paul E. McKenney Date: Tue Sep 15 17:08:03 2020 -0700 rcutorture: Make grace-period kthread report match RCU flavor being tested At the end of the test and after rcu_torture_writer() stalls, rcutorture invokes show_rcu_gp_kthreads() in order to dump out information on the RCU grace-period kthread. This makes a lot of sense when testing vanilla RCU, but not so much for the other flavors. This commit therefore allows per-flavor kthread-dump functions to be specified. [ paulmck: Apply feedback from kernel test robot . ] Signed-off-by: Paul E. McKenney commit 77dc174103fdb121c47621e9856d73704b7eddd2 Author: Paul E. McKenney Date: Tue Sep 15 15:41:50 2020 -0700 rcu-tasks: Convert rcu_tasks_wait_gp() for-loop to while-loop The infinite for-loop in rcu_tasks_wait_gp() has its only exit at the top of the loop, so this commit does the straightforward conversion to a while-loop, thus saving a few lines. Signed-off-by: Paul E. McKenney commit e1eb075ccf3766860b7aa3f104ca29dcb8a46ed0 Author: Paul E. McKenney Date: Tue Sep 15 14:33:38 2020 -0700 rcutorture: Make preemptible TRACE02 enable lockdep Currently, the CONFIG_PREEMPT_NONE=y rcutorture TRACE01 rcutorture scenario enables lockdep. This limits its ability to find bugs due to non-preemptible sections of code being RCU readers, and pretty much all code thus appearing to lockdep to be an RCU reader. This commit therefore moves lockdep testing to the CONFIG_PREEMPT=y rcutorture TRACE02 scenario. Signed-off-by: Paul E. McKenney commit 65e9eb1ccfe56b41a0d8bfec651ea014968413cb Author: Jakub Kicinski Date: Wed Sep 16 11:45:28 2020 -0700 rcu: Prevent RCU_LOCKDEP_WARN() from swallowing the condition We run into a unused variable warning in bridge code when variable is only used inside the condition of rcu_dereference_protected(). #define mlock_dereference(X, br) \ rcu_dereference_protected(X, lockdep_is_held(&br->multicast_lock)) Since on builds with CONFIG_PROVE_RCU=n rcu_dereference_protected() compiles to nothing the compiler doesn't see the variable use. This commit therefore prevents this warning by adding the condition as dead code. Signed-off-by: Jakub Kicinski -- CC: paulmck@kernel.org CC: josh@joshtriplett.org CC: rostedt@goodmis.org CC: mathieu.desnoyers@efficios.com CC: joel@joelfernandes.org CC: jiangshanlai@gmail.com Signed-off-by: Paul E. McKenney commit cd539cff9470fe1dacf0bf5ab3f54f37b854d6fc Author: Jakub Kicinski Date: Wed Sep 16 11:45:27 2020 -0700 lockdep: Provide dummy forward declaration of *_is_held() helpers When CONFIG_LOCKDEP is not set, lock_is_held() and lockdep_is_held() are not declared or defined. This forces all callers to use #ifdefs around these checks. Recent RCU changes added a lot of lockdep_is_held() calls inside rcu_dereference_protected(). This macro hides its argument on !LOCKDEP builds, which can lead to false-positive unused-variable warnings. This commit therefore provides forward declarations of lock_is_held() and lockdep_is_held() but without defining them. This way callers (including those internal to RCU) can keep them visible to the compiler on !LOCKDEP builds and instead depend on dead code elimination to remove the references, which in turn prevents the linker from complaining about the lack of the corresponding function definitions. [ paulmck: Apply Peter Zijlstra feedback on "extern". ] Signed-off-by: Jakub Kicinski -- CC: peterz@infradead.org CC: mingo@redhat.com CC: will@kernel.org Signed-off-by: Paul E. McKenney commit f505d4346f6129d4708338491cf23ca9cf1d8f2a Author: Jakub Kicinski Date: Wed Sep 16 11:45:26 2020 -0700 srcu: Use a more appropriate lockdep helper The lockdep_is_held() macro is defined as: #define lockdep_is_held(lock) lock_is_held(&(lock)->dep_map) This hides away the dereference, so that builds with !LOCKDEP don't break. This works in current kernels because the RCU_LOCKDEP_WARN() eliminates its condition at preprocessor time in !LOCKDEP kernels. However, later patches in this series will cause the compiler to see this condition even in !LOCKDEP kernels. This commit prepares for this upcoming change by switching from lock_is_held() to lockdep_is_held(). Signed-off-by: Jakub Kicinski -- CC: jiangshanlai@gmail.com CC: paulmck@kernel.org CC: josh@joshtriplett.org CC: rostedt@goodmis.org CC: mathieu.desnoyers@efficios.com Signed-off-by: Paul E. McKenney commit a72e9d5472055ca53faed106dc9a11c6b656e66d Author: Jakub Kicinski Date: Wed Sep 16 11:45:25 2020 -0700 net: sched: Remove broken definitions and un-hide for !LOCKDEP Currently, variables used only within lockdep expressions are flagged as unused, requiring that these variables' declarations be decorated with either #ifdef or __maybe_unused. This results in ugly code. This commit therefore causes the full definitions of the lockdep_tcf_chain_is_locked() and lockdep_tcf_proto_is_locked() functions to be visible even when lockdep is not enabled, thus removing the need for the previous empty functions that were provided in non-lockdep kernels. This approach further relies on dead-code elimination to remove any references to functions or variables that are not available in non-lockdep kernels. Signed-off-by: Jakub Kicinski -- CC: jhs@mojatatu.com CC: xiyou.wangcong@gmail.com CC: jiri@resnulli.us Signed-off-by: Paul E. McKenney commit d97f3bdf7a1c0346d3a272aa756d16633f0b8b3b Author: Jakub Kicinski Date: Wed Sep 16 11:45:24 2020 -0700 net: Un-hide lockdep_sock_is_held() for !LOCKDEP Currently, variables used only within lockdep expressions are flagged as unused, requiring that these variables' declarations be decorated with either #ifdef or __maybe_unused. This results in ugly code. This commit therefore causes the lockdep_sock_is_held() function to be visible even when lockdep is not enabled, thus removing the need for these decorations. This approach further relies on dead-code elimination to remove any references to functions or variables that are not available in non-lockdep kernels. Signed-off-by: Jakub Kicinski Signed-off-by: Paul E. McKenney commit 891cd1f99dd94746f0caf5eea0121079178ee9bf Author: Jakub Kicinski Date: Wed Sep 16 11:45:23 2020 -0700 rcu: Un-hide lockdep maps for !LOCKDEP Currently, variables used only within lockdep expressions are flagged as unused, requiring that these variables' declarations be decorated with either #ifdef or __maybe_unused. This results in ugly code. This commit therefore causes the RCU lock maps to be visible even when lockdep is not enabled, thus removing the need for these decorations. This approach further relies on dead-code elimination to remove any references to functions or variables that are not available in non-lockdep kernels. Signed-off-by: Jakub Kicinski Signed-off-by: Paul E. McKenney commit 9f14cb030d987ae5e201e88cd345c6d772bcce51 Author: Jakub Kicinski Date: Wed Sep 16 11:45:22 2020 -0700 sched: Un-hide lockdep_tasklist_lock_is_held() for !LOCKDEP Currently, variables used only within lockdep expressions are flagged as unused, requiring that these variables' declarations be decorated with either #ifdef or __maybe_unused. This results in ugly code. This commit therefore causes the lockdep_tasklist_lock_is_held() function to be visible even when lockdep is not enabled, thus removing the need for these decorations. This approach further relies on dead-code elimination to remove any references to functions or variables that are not available in non-lockdep kernels. Signed-off-by: Jakub Kicinski Signed-off-by: Paul E. McKenney commit 51e4082c7cb3feef822552252136228979ada719 Merge: 802dcb434057f 9a72068080f14 Author: Jakub Kicinski Date: Mon Nov 2 17:09:10 2020 -0800 Merge branch 'vlan-improvements-for-ocelot-switch' Vladimir Oltean says: ==================== VLAN improvements for Ocelot switch The main reason why I started this work is that deleting the bridge mdb entries fails when the bridge is deleted, as described here: https://lore.kernel.org/netdev/20201015173355.564934-1-vladimir.oltean@nxp.com/ In short, that happens because the bridge mdb entries are added with a vid of 1, but deletion is attempted with a vid of 0. So the deletion code fails to find the mdb entries. The solution is to make ocelot use a pvid of 0 when it is under a bridge with vlan_filtering 0. When vlan_filtering is 1, the pvid of the bridge is what is programmed into the hardware. The patch series also uncovers more bugs and does some more cleanup, but the above is the main idea behind it. ==================== Link: https://lore.kernel.org/r/20201031102916.667619-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 9a72068080f14a9f249507eb171df26c912757dc Author: Vladimir Oltean Date: Sat Oct 31 12:29:16 2020 +0200 net: dsa: felix: improve the workaround for multiple native VLANs on NPI port After the good discussion with Florian from here: https://lore.kernel.org/netdev/20200911000337.htwr366ng3nc3a7d@skbuf/ I realized that the VLAN settings on the NPI port (the hardware "CPU port", in DSA parlance) don't actually make any difference, because that port is hardcoded in hardware to use what mv88e6xxx would call "unmodified" egress policy for VLANs. So earlier patch 183be6f967fe ("net: dsa: felix: send VLANs on CPU port as egress-tagged") was incorrect in the sense that it didn't actually make the VLANs be sent on the NPI port as egress-tagged. It only made ocelot_port_set_native_vlan shut up. Now that we have moved the check from ocelot_port_set_native_vlan to ocelot_vlan_prepare, we can simply shunt ocelot_vlan_prepare from DSA, and avoid calling it. This is the correct way to deal with things, because the NPI port configuration is DSA-specific, so the ocelot switch library should not have the check for multiple native VLANs refined in any way, it is correct the way it is. Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit 2f0402fedf20cc97b90837f6a9e2f5dc670afd4d Author: Vladimir Oltean Date: Sat Oct 31 12:29:15 2020 +0200 net: mscc: ocelot: deny changing the native VLAN from the prepare phase Put the preparation phase of switchdev VLAN objects to some good use, and move the check we already had, for preventing the existence of more than one egress-untagged VLAN per port, to the preparation phase of the addition. Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit be0576fed6d37d620d3d7dc416fc72677fd0f422 Author: Vladimir Oltean Date: Sat Oct 31 12:29:14 2020 +0200 net: mscc: ocelot: move the logic to drop 802.1p traffic to the pvid deletion Currently, the ocelot_port_set_native_vlan() function starts dropping untagged and prio-tagged traffic when the native VLAN is removed? What is the native VLAN? It is the only egress-untagged VLAN that ocelot supports on a port. If the port is a trunk with 100 VLANs, one of those VLANs can be transmitted as egress-untagged, and that's the native VLAN. Is it wrong to drop untagged and prio-tagged traffic if there's no native VLAN? Yes and no. In this case, which is more typical, it's ok to apply that drop configuration: $ bridge vlan add dev swp0 vid 1 pvid untagged <- this is the native VLAN $ bridge vlan add dev swp0 vid 100 $ bridge vlan add dev swp0 vid 101 $ bridge vlan del dev swp0 vid 1 <- delete the native VLAN But only because the pvid and the native VLAN have the same ID. In this case, it isn't: $ bridge vlan add dev swp0 vid 1 pvid $ bridge vlan add dev swp0 vid 100 untagged <- this is the native VLAN $ bridge vlan del dev swp0 vid 101 $ bridge vlan del dev swp0 vid 100 <- delete the native VLAN It's wrong, because the switch will drop untagged and prio-tagged traffic now, despite having a valid pvid of 1. The confusion seems to stem from the fact that the native VLAN is an egress setting, while the PVID is an ingress setting. It would be correct to drop untagged and prio-tagged traffic only if there was no pvid on the port. So let's do just that. Background: https://lore.kernel.org/netdev/CA+h21hrRMrLH-RjBGhEJSTZd6_QPRSd3RkVRQF-wNKkrgKcRSA@mail.gmail.com/#t Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit e2b2e83e52f756decbaacd8202f28745bab49e07 Author: Vladimir Oltean Date: Sat Oct 31 12:29:13 2020 +0200 net: mscc: ocelot: add a "valid" boolean to struct ocelot_vlan Currently we are checking in some places whether the port has a native VLAN on egress or not, by comparing the ocelot_port->vid value with zero. That works, because VID 0 can never be a native VLAN configured by the bridge, but now we want to make similar checks for the pvid. That won't work, because there are cases when we do have the pvid set to 0 (not by the bridge, by ourselves, but still.. it's confusing). And we can't encode a negative value into an u16, so add a bool to the structure. Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit c3e58a750e3d64ea51df1e39911098a46dd0d9a6 Author: Vladimir Oltean Date: Sat Oct 31 12:29:12 2020 +0200 net: mscc: ocelot: transform the pvid and native vlan values into a structure This is a mechanical patch only. Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit 110e847ca7d5e712cabc8cb866a66b629832f4a2 Author: Vladimir Oltean Date: Sat Oct 31 12:29:11 2020 +0200 net: mscc: ocelot: don't reset the pvid to 0 when deleting it I have no idea why this code is here, but I have 2 hypotheses: 1. A desperate attempt to keep untagged traffic working when the bridge deletes the pvid on a port. There was a fairly okay discussion here: https://lore.kernel.org/netdev/CA+h21hrRMrLH-RjBGhEJSTZd6_QPRSd3RkVRQF-wNKkrgKcRSA@mail.gmail.com/#t which established that in vlan_filtering=1 mode, the absence of a pvid should denote that the ingress port should drop untagged and priority tagged traffic. While in vlan_filtering=0 mode, nothing should change. So in vlan_filtering=1 mode, we should simply let things happen, and not attempt to save the day. And in vlan_filtering=0 mode, the pvid is 0 anyway, no need to do anything. 2. The driver encodes the native VLAN (ocelot_port->vid) value of 0 as special, meaning "not valid". There are checks based on that. But there are no such checks for the ocelot_port->pvid value of 0. In fact, that's a perfectly valid value, which is used in standalone mode. Maybe there was some confusion and the author thought that 0 means "invalid" here as well. In conclusion, delete the code*. *in fact we'll add it back later, in a slightly different form, but for an entirely different reason than the one for which this exists now. Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit 75e5a554c87fd48f67d1674cfd34e47e3b454fb3 Author: Vladimir Oltean Date: Sat Oct 31 12:29:10 2020 +0200 net: mscc: ocelot: use the pvid of zero when bridged with vlan_filtering=0 Currently, mscc_ocelot ports configure pvid=0 in standalone mode, and inherit the pvid from the bridge when one is present. When the bridge has vlan_filtering=0, the software semantics are that packets should be received regardless of whether there's a pvid configured on the ingress port or not. However, ocelot does not observe those semantics today. Moreover, changing the PVID is also a problem with vlan_filtering=0. We are privately remapping the VID of FDB, MDB entries to the port's PVID when those are VLAN-unaware (i.e. when the VID of these entries comes to us as 0). But we have no logic of adjusting that remapping when the user changes the pvid and vlan_filtering is 0. So stale entries would be left behind, and untagged traffic will stop matching on them. And even if we were to solve that, there's an even bigger problem. If swp0 has pvid 1, and swp1 has pvid 2, and both are under a vlan_filtering=0 bridge, they should be able to forward traffic between one another. However, with ocelot they wouldn't do that. The simplest way of fixing this is to never configure the pvid based on what the bridge is asking for, when vlan_filtering is 0. Only if there was a VLAN that the bridge couldn't mangle, that we could use as pvid.... So, turns out, there's 0 just for that. And for a reason: IEEE 802.1Q-2018, page 247, Table 9-2-Reserved VID values says: The null VID. Indicates that the tag header contains only priority information; no VID is present in the frame. This VID value shall not be configured as a PVID or a member ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ of a VID Set, or configured in any FDB entry, or used in any Management operation. So, aren't we doing exactly what 802.1Q says not to? Well, in a way, but what we're doing here is just driver-level bookkeeping, all for the better. The fact that we're using a pvid of 0 is not observable behavior from the outside world: the network stack does not see the classified VLAN that the switch uses, in vlan_filtering=0 mode. And we're also more consistent with the standalone mode now. And now that we use the pvid of 0 in this mode, there's another advantage: we don't need to perform any VID remapping for FDB and MDB entries either, we can just use the VID of 0 that the bridge is passing to us. The only gotcha is that every time we change the vlan_filtering setting, we need to reapply the pvid (either to 0, or to the value from the bridge). A small side-effect visible in the patch is that ocelot_port_set_pvid needs to be moved above ocelot_port_vlan_filtering, so that it can be called from there without forward-declarations. Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit 55a2346c7ac4bbf6ee6972394237bf31e29a1c05 Author: Marco Elver Date: Thu Oct 22 13:45:53 2020 +0200 kcsan: Never set up watchpoints on NULL pointers Avoid setting up watchpoints on NULL pointers, as otherwise we would crash inside the KCSAN runtime (when checking for value changes) instead of the instrumented code. Because that may be confusing, skip any address less than PAGE_SIZE. Reviewed-by: Dmitry Vyukov Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit 4761612ffe3c1655e58f1ef9cf867c6f67d46fe2 Author: Marco Elver Date: Thu Oct 22 13:45:52 2020 +0200 kcsan: selftest: Ensure that address is at least PAGE_SIZE In preparation of supporting only addresses not within the NULL page, change the selftest to never use addresses that are less than PAGE_SIZE. Reviewed-by: Dmitry Vyukov Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit 86b5a7381b12b1d1d5558d8087e5bbd04b7cf702 Author: Paul E. McKenney Date: Thu Sep 24 20:53:25 2020 -0700 doc: Present the role of READ_ONCE() This commit adds an explanation of the special cases where READ_ONCE() may be used in place of a member of the rcu_dereference() family. Signed-off-by: Paul E. McKenney commit 802dcb434057fb22bb4f7ba26fd9b8c7615dc777 Merge: 2c4de211bc315 8fbc2f9edce23 Author: Jakub Kicinski Date: Mon Nov 2 16:41:09 2020 -0800 Merge branch 'net-ethernet-ti-am65-cpsw-add-multi-port-support-in-mac-only-mode' Grygorii Strashko says: ==================== net: ethernet: ti: am65-cpsw: add multi port support in mac-only mode This series adds multi-port support in mac-only mode (multi MAC mode) to TI AM65x CPSW driver in preparation for enabling support for multi-port devices, like Main CPSW0 on K3 J721E SoC or future CPSW3g on K3 AM64x SoC. The multi MAC mode is implemented by configuring every enabled port in "mac-only" mode (all ingress packets are sent only to the Host port and egress packets directed to target Ext. Port) and creating separate net_device for every enabled Ext. port. This series does not affect on existing CPSW2g one Ext. Port devices and xmit path changes are done only for multi-port devices by splitting xmit path for one-port and multi-port devices. Patches 1-3: Preparation patches to improve K3 CPSW configuration depending on DT Patches 4-5: Fix VLAN offload for multi MAC mode Patch 6: Fixes CPTS context lose issue during PM runtime transition Patch 7: Fixes TX csum offload for multi MAC mode Patches 8-9: add multi-port support to TI AM65x CPSW Patch 10: handle deferred probe with new dev_err_probe() API changes in v3: - rebased - added Reviewed-by: Jesse Brandeburg - added Patch 10 which is minor optimization changes in v2: - patch 8: xmit path split for one-port and multi-port devices to avoid performance losses - patch 9: fixed the case when Port 1 is disabled - Patch 7: added fix for TX csum offload v2: https://lore.kernel.org/patchwork/cover/1321608/ v1: https://lore.kernel.org/patchwork/cover/1315766/ ==================== Link: https://lore.kernel.org/r/20201030200707.24294-1-grygorii.strashko@ti.com Signed-off-by: Jakub Kicinski commit 8fbc2f9edce23d19fc09ef5bf8d4eb38be2db0f8 Author: Grygorii Strashko Date: Fri Oct 30 22:07:07 2020 +0200 net: ethernet: ti: am65-cpsw: handle deferred probe with dev_err_probe() Use new dev_err_probe() API to handle deferred probe properly and simplify the code. Signed-off-by: Grygorii Strashko Signed-off-by: Jakub Kicinski commit 84b4aa4932490c9f88f13d8f3b3cd1f3b6116991 Author: Grygorii Strashko Date: Fri Oct 30 22:07:06 2020 +0200 net: ethernet: ti: am65-cpsw: add multi port support in mac-only mode This patch adds final multi-port support to TI AM65x CPSW driver path in preparation for adding support for multi-port devices, like Main CPSW0 on K3 J721E SoC or future CPSW3g on K3 AM64x SoC. - the separate netdev is created for every enabled external Port; - DMA channels are common/shared for all external Ports and the RX/TX NAPI and DMA processing assigned to first available netdev; - external Ports are configured in mac-only mode, which is similar to TI "dual-mac" mode for legacy TI CPSW - packets are sent to the Host port only in ingress and directly to the Port on egress. No packet switching between external ports happens. - every port supports the same features as current AM65x CPSW on external device. Signed-off-by: Grygorii Strashko Reviewed-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit a9e60cf0b46044b5c40ac3cfd081eee43a647cdb Author: Grygorii Strashko Date: Fri Oct 30 22:07:05 2020 +0200 net: ethernet: ti: am65-cpsw: prepare xmit/rx path for multi-port devices in mac-only mode This patch adds multi-port support to TI AM65x CPSW driver xmit/rx path in preparation for adding support for multi-port devices, like Main CPSW0 on K3 J721E SoC or future CPSW3g on K3 AM64x SoC. Hence DMA channels are common/shared for all ext Ports and the RX/TX NAPI and DMA processing going to be assigned to first available netdev this patch: - ensures all RX descriptors fields are initialized; - adds synchronization for TX DMA push/pop operation (locking) as Networking core locks are not enough any more; - updates TX bql processing for every packet in am65_cpsw_nuss_tx_compl_packets() as every completed TX skb can have different ndev assigned (come from different netdevs). To avoid performance issues for existing one-port CPSW2g devices the above changes are done only for multi-port devices by splitting xmit path for one-port and multi-port devices. Signed-off-by: Grygorii Strashko Reviewed-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit 97067aaf127487788a297267dede0008cd75bb7b Author: Grygorii Strashko Date: Fri Oct 30 22:07:04 2020 +0200 net: ethernet: ti: am65-cpsw: fix tx csum offload for multi mac mode The current implementation uses .ndo_set_features() callback to track NETIF_F_HW_CSUM feature changes and update generic CPSW_P0_CONTROL_REG.RX_CHECKSUM_EN option accordingly. It's not going to work in case of multi-port devices as TX csum offload can be changed per netdev. On K3 CPSWxG devices TX csum offload enabled in the following way: - the CPSW_P0_CONTROL_REG.RX_CHECKSUM_EN option enables TX csum offload in generic and affects all TX DMA channels and packets; - corresponding fields in TX DMA descriptor have to be filed properly when upper layer wants to offload TX csum (skb->ip_summed == CHECKSUM_PARTIAL) and it's per-packet option. The Linux Network core is expected to never request TX csum offload if netdev NETIF_F_HW_CSUM feature is disabled, and, as result, TX DMA descriptors should not be modified, and per-packet TX csum offload will be disabled (or enabled) on per-netdev basis. Which, in turn, makes it safe to enable the CPSW_P0_CONTROL_REG.RX_CHECKSUM_EN option unconditionally. Hence, fix TX csum offload for multi-port devices by: - enabling the CPSW_P0_CONTROL_REG.RX_CHECKSUM_EN option in am65_cpsw_nuss_common_open() unconditionally - and removing .ndo_set_features() callback implementation, which was used only NETIF_F_HW_CSUM feature update purposes Signed-off-by: Grygorii Strashko Reviewed-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit a9c74700727791c3df8192757d0b4a146b4bc271 Author: Grygorii Strashko Date: Fri Oct 30 22:07:03 2020 +0200 net: ethernet: ti: am65-cpsw: keep active if cpts enabled Some K3 CPSW NUSS instances can lose context after PM runtime ON->OFF->ON transition depending on integration (including all submodules: CPTS, MDIO, etc), like J721E Main CPSW (CPSW9G). In case CPTS is enabled it's initialized during probe and does not expect to be reset. Hence, keep K3 CPSW active by forbidding PM runtime if CPTS is enabled. Signed-off-by: Grygorii Strashko Reviewed-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit 2d64a034328843b3548074a2e4b7673726685dc3 Author: Grygorii Strashko Date: Fri Oct 30 22:07:02 2020 +0200 net: ethernet: ti: am65-cpsw: fix vlan offload for multi mac mode The VLAN offload for AM65x CPSW2G is implemented using existing ALE APIs, which are also used by legacy CPSW drivers. So, now it always adds current Ext. Port and Host as VLAN members when VLAN is added by 8021Q core (.ndo_vlan_rx_add_vid) and forcibly removes VLAN from ALE table in .ndo_vlan_rx_kill_vid(). This works as for AM65x CPSW2G (which has only one Ext. Port) as for legacy CPSW devices (which can't support same VLAN on more then one Port in multi mac (dual-mac) mode). But it doesn't work for the new J721E and AM64x multi port CPSWxG versions doesn't have such restrictions and allow to offload the same VLAN on any number of ports. Now the attempt to add same VLAN on two (or more) K3 CPSWxG Ports will cause: - VLAN members mask overwrite when VLAN is added - VLAN removal from ALE table when any Port removes VLAN This patch fixes an issue by: - switching to use cpsw_ale_vlan_add_modify() instead of cpsw_ale_add_vlan() when VLAN is added to ALE table, so VLAN members mask will not be overwritten; - Updates cpsw_ale_del_vlan() as: if more than one ext. Port is in VLAN member mask then remove only current port from VLAN member mask else remove VLAN ALE entry Example: add: P1 | P0 (Host) -> members mask: P1 | P0 add: P2 | P0 -> members mask: P2 | P1 | P0 rem: P1 | P0 -> members mask: P2 | P0 rem: P2 | P0 -> members mask: - The VLAN is forcibly removed if port_mask=0 passed to cpsw_ale_del_vlan() to preserve existing legacy CPSW drivers functionality. Signed-off-by: Grygorii Strashko Reviewed-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit 82882bd56a9e28849405c7d37bae1e3bce0f58a5 Author: Grygorii Strashko Date: Fri Oct 30 22:07:01 2020 +0200 net: ethernet: ti: cpsw_ale: add cpsw_ale_vlan_del_modify() Add/export cpsw_ale_vlan_del_modify() and use it in cpsw_switchdev instead of generic cpsw_ale_del_vlan() to avoid mixing 8021Q and switchdev VLAN offload. This is preparation patch equired by follow up changes. Signed-off-by: Grygorii Strashko Reviewed-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit 6a40e2890e6e1dd1ba4db2e1748e59ed3907fefb Author: Grygorii Strashko Date: Fri Oct 30 22:07:00 2020 +0200 net: ethernet: ti: am65-cpsw: use cppi5_desc_is_tdcm() Use cppi5_desc_is_tdcm() helper for teardown indicator detection instead of hard-coded value. Signed-off-by: Grygorii Strashko Reviewed-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit c6275c02a09730b365fffe3372fbe768cef8eb37 Author: Grygorii Strashko Date: Fri Oct 30 22:06:59 2020 +0200 net: ethernet: ti: am65-cpsw: move free desc queue mode selection in pdata In preparation of adding more multi-port K3 CPSW versions move free descriptor queue mode selection in am65_cpsw_pdata, so it can be selected basing on DT compatibility property. Signed-off-by: Grygorii Strashko Reviewed-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit 7747d4b72f7702b2f19b9f91cc783eb38a2028bf Author: Grygorii Strashko Date: Fri Oct 30 22:06:58 2020 +0200 net: ethernet: ti: am65-cpsw: move ale selection in pdata In preparation of adding more multi-port K3 CPSW versions move ALE selection in am65_cpsw_pdata, so it can be selected basing on DT compatibility property. Signed-off-by: Grygorii Strashko Reviewed-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit 2c4de211bc315fe6270aefe6478cbcbe5928f5e8 Author: Xin Long Date: Sat Oct 31 19:30:44 2020 +0100 net: ipv6: For kerneldoc warnings with W=1 net/ipv6/addrconf.c:2005: warning: Function parameter or member 'dev' not described in 'ipv6_dev_find' net/ipv6/ip6_vti.c:138: warning: Function parameter or member 'ip6n' not described in 'vti6_tnl_bucket' net/ipv6/ip6_tunnel.c:218: warning: Function parameter or member 'ip6n' not described in 'ip6_tnl_bucket' net/ipv6/ip6_tunnel.c:238: warning: Function parameter or member 'ip6n' not described in 'ip6_tnl_link' net/ipv6/ip6_tunnel.c:254: warning: Function parameter or member 'ip6n' not described in 'ip6_tnl_unlink' net/ipv6/ip6_tunnel.c:427: warning: Function parameter or member 'raw' not described in 'ip6_tnl_parse_tlv_enc_lim' net/ipv6/ip6_tunnel.c:499: warning: Function parameter or member 'skb' not described in 'ip6_tnl_err' net/ipv6/ip6_tunnel.c:499: warning: Function parameter or member 'ipproto' not described in 'ip6_tnl_err' net/ipv6/ip6_tunnel.c:499: warning: Function parameter or member 'opt' not described in 'ip6_tnl_err' net/ipv6/ip6_tunnel.c:499: warning: Function parameter or member 'type' not described in 'ip6_tnl_err' net/ipv6/ip6_tunnel.c:499: warning: Function parameter or member 'code' not described in 'ip6_tnl_err' net/ipv6/ip6_tunnel.c:499: warning: Function parameter or member 'msg' not described in 'ip6_tnl_err' net/ipv6/ip6_tunnel.c:499: warning: Function parameter or member 'info' not described in 'ip6_tnl_err' net/ipv6/ip6_tunnel.c:499: warning: Function parameter or member 'offset' not described in 'ip6_tnl_err' ip6_tnl_err() is an internal function, so remove the kerneldoc. For the others, add the missing parameters. Signed-off-by: Xin Long Signed-off-by: Andrew Lunn Link: https://lore.kernel.org/r/20201031183044.1082193-1-andrew@lunn.ch Signed-off-by: Jakub Kicinski commit e03d8a377fcc94f7c92fbd9dcdefe7d998a053e6 Author: Andrew Lunn Date: Sat Oct 31 19:17:00 2020 +0100 net: driver: hamradio: Fix potential unterminated string With W=1 the following error is reported: In function ‘strncpy’, inlined from ‘hdlcdrv_ioctl’ at drivers/net/hamradio/hdlcdrv.c:600:4: ./include/linux/string.h:297:30: warning: ‘__builtin_strncpy’ specified bound 32 equals destination size [-Wstringop-truncation] 297 | #define __underlying_strncpy __builtin_strncpy | ^ ./include/linux/string.h:307:9: note: in expansion of macro ‘__underlying_strncpy’ 307 | return __underlying_strncpy(p, q, size); Replace strncpy with strlcpy to guarantee the string is terminated. Signed-off-by: Andrew Lunn Link: https://lore.kernel.org/r/20201031181700.1081693-1-andrew@lunn.ch Signed-off-by: Jakub Kicinski commit 5c8b3b8a182cbc1ccdfcdeea9b25dd2c12a8148f Author: Peng Fan Date: Sun Nov 1 19:29:53 2020 +0800 ARM: dts: imx: add usb alias Add usb alias for bootloader searching the controller in correct order. Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit a344a1e8532586b4e3ad742c7fd139cdce56a767 Author: Andrew Lunn Date: Sat Oct 31 19:14:17 2020 +0100 drivers: net: wan: lmc: Fix W=1 set but used variable warnings drivers/net/wan/lmc/lmc_main.c: In function ‘lmc_ioctl’: drivers/net/wan/lmc/lmc_main.c:356:25: warning: variable ‘mii’ set but not used [-Wunused-but-set-variable] 356 | u16 mii; | ^~~ drivers/net/wan/lmc/lmc_main.c:427:25: warning: variable ‘mii’ set but not used [-Wunused-but-set-variable] 427 | u16 mii; | ^~~ drivers/net/wan/lmc/lmc_main.c: In function ‘lmc_interrupt’: drivers/net/wan/lmc/lmc_main.c:1188:9: warning: variable ‘firstcsr’ set but not used [-Wunused-but-set-variable] 1188 | u32 firstcsr; This file has funky indentation, and makes little use of tabs. Keep with this style in the patch, but that makes checkpatch unhappy. Signed-off-by: Andrew Lunn Link: https://lore.kernel.org/r/20201031181417.1081511-1-andrew@lunn.ch Signed-off-by: Jakub Kicinski commit 8308678ebde1cbca9fb628ba2e7b6e4ea0b15acf Author: Chunyan Zhang Date: Fri Oct 30 11:46:54 2020 +0800 hwspinlock: sprd: use module_platform_driver() instead postcore initcall The hardware spinlock devices are defined in the DT, there's no need for init calls order, remove boilerplate code by using module_platform_driver. Reviewed-by: Baolin Wang Signed-off-by: Chunyan Zhang Link: https://lore.kernel.org/r/20201030034654.15775-3-zhang.lyra@gmail.com Signed-off-by: Bjorn Andersson commit 8ed7ec1386b646130d80d017ecd4716f866ea570 Author: Andrew Lunn Date: Sat Oct 31 19:04:35 2020 +0100 drivers: net: xen-netfront: Fixed W=1 set but unused warnings drivers/net/xen-netfront.c:2416:16: warning: variable ‘target’ set but not used [-Wunused-but-set-variable] 2416 | unsigned long target; Remove target and just discard the return value from simple_strtoul(). This patch does give a checkpatch warning, but the warning was there before anyway, as this file has lots of checkpatch warnings. Signed-off-by: Andrew Lunn Link: https://lore.kernel.org/r/20201031180435.1081127-1-andrew@lunn.ch Signed-off-by: Jakub Kicinski commit 65188f07456d4a65b4a66069a701823878e098ff Author: Abel Vesa Date: Wed Oct 28 14:59:02 2020 +0200 clk: imx: gate2: Add locking in is_enabled op Protect against enabling/disabling the gate while we're checking if it is enabled. Signed-off-by: Abel Vesa Reviewed-by: Sascha Hauer Signed-off-by: Shawn Guo commit bcd418a632b621510ebc731cb707d8fe3e873119 Author: Abel Vesa Date: Wed Oct 28 14:59:01 2020 +0200 clk: imx: gate2: Add cgr_mask for more flexible number of control bits On some i.MX8 platforms, there are HW gates that share the same bit. So in order to make this clock type more usable, use a mask to specify how many bits belong to those HW gates. Signed-off-by: Abel Vesa Reviewed-by: Sascha Hauer Signed-off-by: Shawn Guo commit 03681d06a555a6c5f39de48d68082e7444db329f Author: Abel Vesa Date: Wed Oct 28 14:59:00 2020 +0200 clk: imx: gate2: Check if clock is enabled against cgr_val Seems the logic here was wrong all along. For example, if the cgr_val is 2 (0b10), the clk_gate2_reg_is_enabled would report the clock as disabled. So check against cgr_val instead. Signed-off-by: Abel Vesa Reviewed-by: Sascha Hauer Signed-off-by: Shawn Guo commit 040adb5fe95ad39c0a714cf3b05950974caf42ed Author: Abel Vesa Date: Wed Oct 28 14:58:59 2020 +0200 clk: imx: gate2: Keep the register writing in on place Move all the register writing to the newly added clk_gate2_do_shared_clks and call that everywhere need needed. Cleans up the code a little bit. Signed-off-by: Abel Vesa Reviewed-by: Sascha Hauer Signed-off-by: Shawn Guo commit 12309428c27737c21735fb28540c6c6f69f632f6 Author: Abel Vesa Date: Wed Oct 28 14:58:58 2020 +0200 clk: imx: gate2: Remove the IMX_CLK_GATE2_SINGLE_BIT special case This was a hack which would allow multiple HW gates to be controlled by a single bit. The only user of this is the imx_dev_clk_hw_gate_shared which is not used anywhere as of now. Basically, complicates the logic of the driver for no reason. Signed-off-by: Abel Vesa Reviewed-by: Sascha Hauer Signed-off-by: Shawn Guo commit ce3f952104e0266986d8a4e6b11d8f979e18fb3e Merge: 7812e10511ce6 1bcb32c765401 Author: Jakub Kicinski Date: Mon Nov 2 15:52:23 2020 -0800 Merge branch 'davicom-w-1-fixes' Andrew Lunn says: ==================== davicom W=1 fixes Fixup various W=1 warnings, and then add COMPILE_TEST support, which explains why these where missed on the previous pass. ==================== Link: https://lore.kernel.org/r/20201031005833.1060316-1-andrew@lunn.ch Signed-off-by: Jakub Kicinski commit 1bcb32c765401b0c2323a1df720e71dfad487f85 Author: Andrew Lunn Date: Sat Oct 31 01:58:33 2020 +0100 drivers: net: davicom Add COMPILE_TEST support Improve the build testing of this davicom driver by enabling it when COMPILE_TEST is selected. Signed-off-by: Andrew Lunn Signed-off-by: Jakub Kicinski commit 3858632a0d22a56a035373924fc3f98ea1afa286 Author: Andrew Lunn Date: Sat Oct 31 01:58:32 2020 +0100 drivers: net: davicom: Fixed unused but set variable with W=1 drivers/net/ethernet/davicom//dm9000.c: In function ‘dm9000_dumpblk_8bit’: drivers/net/ethernet/davicom//dm9000.c:235:6: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable] The driver needs to read packet data from the device even when the packet is known bad. There is no need to assign the data to a variable during this discard operation. Signed-off-by: Andrew Lunn Signed-off-by: Jakub Kicinski commit 7812e10511ce66b0f7c41d33c66c7e0db75a1016 Author: Andrew Lunn Date: Sat Oct 31 01:54:45 2020 +0100 drivers: net: tulip: Fix set but not used with W=1 When compiled for platforms other than __i386__ or __x86_64__: drivers/net/ethernet/dec/tulip/tulip_core.c: In function ‘tulip_init_one’: drivers/net/ethernet/dec/tulip/tulip_core.c:1296:13: warning: variable ‘last_irq’ set but not used [-Wunused-but-set-variable] 1296 | static int last_irq; Add more #if defined() to totally remove the code when not needed. Signed-off-by: Andrew Lunn Link: https://lore.kernel.org/r/20201031005445.1060112-1-andrew@lunn.ch Signed-off-by: Jakub Kicinski commit 220175cd3979fdb860decf757cc7a5980fdd045f Author: Dong Aisheng Date: Fri Oct 30 23:37:33 2020 +0800 clk: imx: scu: fix build break when compiled as modules After commit e0d0d4d86c76 ("clk: imx8qxp: Support building i.MX8QXP clock driver as module"), clk-scu.c and clk-imx8qxp.c are complied in one module, thus there can be only one module_init() in those two files. Commit 77d8f3068c63 ("clk: imx: scu: add two cells binding support") introduced another module_init() in clk_scu.c which caused the errors below. To fix the issue, we can remove the unnecessary builtin_platform_driver from clk_scu.c and directly register the driver in imx_clk_scu_init(). CC [M] drivers/clk/imx/clk-scu.o In file included from ../include/linux/of_device.h:6, from ../include/linux/of_platform.h:12, from ../drivers/clk/imx/clk-scu.c:11: ../drivers/clk/imx/clk-scu.c: In function ‘imx_clk_scu_init’: ../drivers/clk/imx/clk-scu.c:176:35: error: ‘imx_clk_scu_driver’ undeclared (first use in this function); did you mean ‘imx_clk_scu_init’? 176 | return platform_driver_register(&imx_clk_scu_driver); | ^~~~~~~~~~~~~~~~~~ ../include/linux/platform_device.h:218:29: note: in definition of macro ‘platform_driver_register’ 218 | __platform_driver_register(drv, THIS_MODULE) | ^~~ ../drivers/clk/imx/clk-scu.c:176:35: note: each undeclared identifier is reported only once for each function it appears in 176 | return platform_driver_register(&imx_clk_scu_driver); | ^~~~~~~~~~~~~~~~~~ ../include/linux/platform_device.h:218:29: note: in definition of macro ‘platform_driver_register’ 218 | __platform_driver_register(drv, THIS_MODULE) | ^~~ ../drivers/clk/imx/clk-scu.c:177:1: error: control reaches end of non-void function [-Werror=return-type] 177 | } | ^ At top level: ../drivers/clk/imx/clk-scu.c:470:31: warning: ‘imx_clk_scu_driver’ defined but not used [-Wunused-variable] 470 | static struct platform_driver imx_clk_scu_driver = { Reported-by: kernel test robot Fixes: 77d8f3068c63 ("clk: imx: scu: add two cells binding support") Signed-off-by: Dong Aisheng Acked-by: Stephen Boyd Signed-off-by: Shawn Guo commit 39d3f3ffe79eb2ee2a93353113923eb837d92458 Author: Ioana Ciornei Date: Fri Oct 30 13:35:46 2020 +0200 dt-bindings: net: add the 10gbase-r connection type Add 10gbase-r to the list of accepted PHY connection types between an Ethernet device and a physical PHY. This is available as a valid connection type since commit c114574ebfdf ("net: phy: add PHY_INTERFACE_MODE_10GBASER") Signed-off-by: Ioana Ciornei Acked-by: Rob Herring Signed-off-by: Shawn Guo commit 0dbcd49917191c599e33725268892f9a4f006154 Author: Ioana Ciornei Date: Fri Oct 30 13:35:45 2020 +0200 dt-bindings: net: add the DPAA2 MAC DTS definition Add a documentation entry for the DTS bindings needed and supported by the dpaa2-mac driver. Signed-off-by: Ioana Ciornei Reviewed-by: Rob Herring Signed-off-by: Shawn Guo commit fa43c3de5c37f315271662bbc8cd6e110280abee Author: Meenakshi Aggarwal Date: Mon Nov 2 11:29:40 2020 +0530 dt-bindings: fsl: add compatible for LX2162A QDS Board Add support for LX2162A, LX2162A is LX2160A based SoC. Signed-off-by: Meenakshi Aggarwal Acked-by: Rob Herring Signed-off-by: Shawn Guo commit bbbc7aa45eefd4ef7ffbd5ee3bb49bd8b68a2213 Author: Guillaume Nault Date: Fri Oct 30 21:10:54 2020 +0100 selftests: add test script for bareudp tunnels Test different encapsulation modes of the bareudp module: * Unicast MPLS, * IPv4 only, * IPv4 in multiproto mode (that is, IPv4 and IPv6), * IPv6. Each mode is tested with both an IPv4 and an IPv6 underlay. v2: * Add build dependencies in config file (Willem de Bruijn). * The MPLS test now uses its own IP addresses. This minimises the amount of cleanup between tests and simplifies the script. * Verify that iproute2 supports bareudp tunnels before running the script (and other minor usability improvements). Signed-off-by: Guillaume Nault Link: https://lore.kernel.org/r/8abc0e58f8a7eeb404f82466505a73110bc43ab8.1604088587.git.gnault@redhat.com Signed-off-by: Jakub Kicinski commit 6f8ef834bd0ab28dce7cebb2a7d326d4ed8c9051 Merge: 338b5da31de0d 9ce86dc474168 Author: Jakub Kicinski Date: Mon Nov 2 15:10:55 2020 -0800 Merge branch 'add-ast2400-2500-phy-handle-support' Ivan Mikhaylov says: ==================== add ast2400/2500 phy-handle support This patch introduces ast2400/2500 phy-handle support with an embedded MDIO controller. At the current moment it is not possible to set options with this format on ast2400/2500: mac { phy-handle = <&phy>; phy-mode = "rgmii"; mdio { #address-cells = <1>; #size-cells = <0>; phy: ethernet-phy@0 { compatible = "ethernet-phy-idxxxx.yyyy"; reg = <0>; }; }; }; The patch fixes it and gets possible PHYs and register them with of_mdiobus_register. Changes from v3: 1. add dt-bindings description of MDIO node and phy-handle option with example. Changes from v2: 1. change manual phy interface type check on phy_interface_mode_is_rgmii function. 2. add err_phy_connect label. 3. split ftgmac100_destroy_mdio into ftgmac100_phy_disconnect and ftgmac100_destroy_mdio. 4. remove unneeded mdio_np checks. Changes from v1: 1. split one patch into two. ==================== Link: https://lore.kernel.org/r/20201030133707.12099-1-i.mikhaylov@yadro.com Signed-off-by: Jakub Kicinski commit 9ce86dc474168020a2097cc806fc5f9454859ab8 Author: Ivan Mikhaylov Date: Fri Oct 30 16:37:07 2020 +0300 dt-bindings: net: ftgmac100: describe phy-handle and MDIO Add the phy-handle and MDIO description and add the example with PHY and MDIO nodes. Signed-off-by: Ivan Mikhaylov Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski commit f8b7b50c8411514d84a3545f0d2072db8f9c46a1 Author: Ivan Mikhaylov Date: Fri Oct 30 16:37:06 2020 +0300 net: ftgmac100: add handling of mdio/phy nodes for ast2400/2500 phy-handle can't be handled well for ast2400/2500 which has an embedded MDIO controller. Add ftgmac100_mdio_setup for ast2400/2500 and initialize PHYs from mdio child node with of_mdiobus_register. Signed-off-by: Ivan Mikhaylov Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski commit 68ed78b52357f63562402dfd9926ff73bdfa8ca7 Author: Ivan Mikhaylov Date: Fri Oct 30 16:37:05 2020 +0300 net: ftgmac100: move phy connect out from ftgmac100_setup_mdio Split MDIO registration and PHY connect into ftgmac100_setup_mdio and ftgmac100_mii_probe. Signed-off-by: Ivan Mikhaylov Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski commit 338b5da31de0d816b5718dad0e09482a27d51504 Author: Grygorii Strashko Date: Thu Oct 29 21:09:31 2020 +0200 selftests/net: timestamping: add ptp v2 support The timestamping tool is supporting now only PTPv1 (IEEE-1588 2002) while modern HW often supports also/only PTPv2. Hence timestamping tool is still useful for sanity testing of PTP drivers HW timestamping capabilities it's reasonable to upstate it to support PTPv2. This patch adds corresponding support which can be enabled by using new parameter "PTPV2". Signed-off-by: Grygorii Strashko Acked-by: Richard Cochran Link: https://lore.kernel.org/r/20201029190931.30883-1-grygorii.strashko@ti.com Signed-off-by: Jakub Kicinski commit 8acedab0fdac989a0c148f81c9f97704aadcf6e4 Author: Deepak R Varma Date: Tue Nov 3 01:08:23 2020 +0530 drm/amdgpu: use "*" adjacent to data name When declaring pointer data, the "*" symbol should be used adjacent to the data name as per the coding standards. This resolves following issues reported by checkpatch script: ERROR: "foo * bar" should be "foo *bar" ERROR: "foo * bar" should be "foo *bar" ERROR: "foo* bar" should be "foo *bar" ERROR: "(foo*)" should be "(foo *)" Signed-off-by: Deepak R Varma Signed-off-by: Alex Deucher commit c4c5ae67d17976d058341b24908d5f562f3ce933 Author: Deepak R Varma Date: Tue Nov 3 01:07:12 2020 +0530 drm/amdgpu/amdgpu: use "*" adjacent to data name When declaring pointer data, the "*" symbol should be used adjacent to the data name as per the coding standards. This resolves following issues reported by checkpatch script: ERROR: "foo * bar" should be "foo *bar" ERROR: "foo * bar" should be "foo *bar" ERROR: "foo* bar" should be "foo *bar" ERROR: "(foo*)" should be "(foo *)" Signed-off-by: Deepak R Varma Signed-off-by: Alex Deucher commit 8e607d7e27d87484f652218d7a10d7446ab2cbe7 Author: Deepak R Varma Date: Tue Nov 3 01:06:41 2020 +0530 drm/amdgpu/sdma: use "*" adjacent to data name When declaring pointer data, the "*" symbol should be used adjacent to the data name as per the coding standards. This resolves following issues reported by checkpatch script: ERROR: "foo * bar" should be "foo *bar" ERROR: "foo * bar" should be "foo *bar" ERROR: "foo* bar" should be "foo *bar" ERROR: "(foo*)" should be "(foo *)" Signed-off-by: Deepak R Varma Signed-off-by: Alex Deucher commit 77f5c7370fc9127a1dd34d2f22328a57b8ec1f5f Author: Deepak R Varma Date: Tue Nov 3 01:06:11 2020 +0530 drm/amdgpu/jpeg: use "*" adjacent to data name When declaring pointer data, the "*" symbol should be used adjacent to the data name as per the coding standards. This resolves following issues reported by checkpatch script: ERROR: "foo * bar" should be "foo *bar" ERROR: "foo * bar" should be "foo *bar" ERROR: "foo* bar" should be "foo *bar" ERROR: "(foo*)" should be "(foo *)" Signed-off-by: Deepak R Varma Signed-off-by: Alex Deucher commit 58b5a793ff02d6a74f2d99c22e525f7bef4886e5 Author: Deepak R Varma Date: Tue Nov 3 01:05:25 2020 +0530 drm/amdgpu/umc: use "*" adjacent to data name When declaring pointer data, the "*" symbol should be used adjacent to the data name as per the coding standards. This resolves following issues reported by checkpatch script: ERROR: "foo * bar" should be "foo *bar" ERROR: "foo * bar" should be "foo *bar" ERROR: "foo* bar" should be "foo *bar" ERROR: "(foo*)" should be "(foo *)" Signed-off-by: Deepak R Varma Signed-off-by: Alex Deucher commit 715c84ffbd07e3bc472972644e6a6f7c55784e2e Author: Deepak R Varma Date: Tue Nov 3 01:04:50 2020 +0530 drm/amdgpu/vcn: use "*" adjacent to data name When declaring pointer data, the "*" symbol should be used adjacent to the data name as per the coding style standards. This resolves following issues reported by checkpatch script: ERROR: "foo * bar" should be "foo *bar" ERROR: "foo * bar" should be "foo *bar" ERROR: "foo* bar" should be "foo *bar" ERROR: "(foo*)" should be "(foo *)" Signed-off-by: Deepak R Varma Signed-off-by: Alex Deucher commit e6cd859dc65f19567fdc5e2653cbd543ada2f53c Author: Alex Deucher Date: Tue Oct 27 11:02:26 2020 -0400 drm/amdgpu/display: fix warnings when CONFIG_DRM_AMD_DC_DCN is not set Properly protect the relevant code with CONFIG_DRM_AMD_DC_DCN. Fixes: 0b08c54bb7a3 ("drm/amd/display: Fix the display corruption issue on Navi10") Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 94ba290da1a9708e52039f38fff1eb4f97ff852a Author: Deepak R Varma Date: Mon Nov 2 22:50:50 2020 +0530 drm/amdgpu: improve code indentation and alignment General code indentation and alignment changes such as replace spaces by tabs or align function arguments as per the coding style guidelines. The patch covers various .c files for this driver. Issue reported by checkpatch script. Signed-off-by: Deepak R Varma Signed-off-by: Alex Deucher commit f3729f7b1ab3c47d1fb9b445af30854d4b0949f8 Author: Deepak R Varma Date: Mon Nov 2 22:50:19 2020 +0530 drm/amdgpu/amdgpu: improve code indentation and alignment General code indentation and alignment changes such as replace spaces by tabs or align function arguments as per the coding style guidelines. The patch corrects issues for various amdgpu_*.c files for this driver. Issue reported by checkpatch script. Signed-off-by: Deepak R Varma Signed-off-by: Alex Deucher commit 983ad5283898bb3bc58d9b6cb9c2ce41c84e6a6f Author: Deepak R Varma Date: Mon Nov 2 22:49:10 2020 +0530 drm/amdgpu/nbio: improve code indentation and alignment General code indentation and alignment changes such as replace spaces by tabs or align function arguments as per the coding style guidelines. Issue reported by checkpatch script. Signed-off-by: Deepak R Varma Signed-off-by: Alex Deucher commit a971887e028edbe3fc2629dc0762421fbfc0c21a Author: Deepak R Varma Date: Mon Nov 2 22:48:21 2020 +0530 drm/amdgpu/vcn: improve code indentation and alignment General code indentation and alignment changes such as replace spaces by tabs or align function arguments as per the coding style guidelines. Issue reported by checkpatch script. Signed-off-by: Deepak R Varma Signed-off-by: Alex Deucher commit 99dac206b0e0c6215272d31f758e6aa9bc3dd3d8 Author: Deepak R Varma Date: Mon Nov 2 22:46:58 2020 +0530 drm/amdgpu/gfx: improve code indentation and alignment General code indentation and alignment changes such as replace spaces by tabs or align function arguments as per the coding style guidelines. Issue reported by checkpatch script. Signed-off-by: Deepak R Varma Signed-off-by: Alex Deucher commit ed40c578577fecd1fc99afec993a4930200c57ed Author: Deepak R Varma Date: Mon Nov 2 22:46:03 2020 +0530 drm/amdgpu/dce: improve code indentation and alignment General code indentation and alignment changes such as replace spaces by tabs or align function arguments as per the coding style guidelines. Issue reported by checkpatch script. Signed-off-by: Deepak R Varma Signed-off-by: Alex Deucher commit 7dee4d51e93113608bbb734ef68a58eb0b894d08 Author: Colin Ian King Date: Mon Nov 2 14:16:54 2020 +0000 drm/amdgpu: fix spelling mistake: "Successed" -> "Succeeded" There is a spelling mistake in a deb_dbg message. Fix it. Reviewed-by: Madhav Chauhan Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit ab8b5aafa9bf7a35f8e7c763069c7918977eef8a Author: Bernard Zhao Date: Mon Nov 2 04:57:44 2020 -0800 drm/amd: fix typoes Fix typoes. Acked-by: Christian König Signed-off-by: Bernard Zhao Signed-off-by: Alex Deucher commit 9d6f27f9deafe84cd5db255dd794d59789853ad0 Author: Alex Deucher Date: Thu Oct 29 16:30:43 2020 -0400 drm/amdgpu: allow TMZ on vangogh Uses the same pathes as navi. Reviewed-by: Aaron Liu Reviewed-by: Luben Tuikov Signed-off-by: Alex Deucher commit 9d17df77bcfaef59e99586c4db8ef38b4bfe46ea Author: Kent Russell Date: Mon Nov 2 11:17:59 2020 -0500 amdkfd: Check kvmalloc return before memcpy If we can't kvmalloc the pcrat_image, then we shouldn't memcpy Signed-off-by: Kent Russell Reported-by: kernel test robot Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 4dbcdc9cada2fd5cc05e1678213896059a097660 Author: Huang Rui Date: Mon Nov 2 12:52:08 2020 +0800 drm/amd/display: fix the NULL pointer that missed set_disp_pattern_generator callback This patch is to fix the NULL pointer that missed set_disp_pattern_generator callback on DCN301 [ 505.054167] BUG: kernel NULL pointer dereference, address: 0000000000000000 [ 505.054176] #PF: supervisor instruction fetch in kernel mode [ 505.054181] #PF: error_code(0x0010) - not-present page [ 505.054185] PGD 0 P4D 0 [ 505.054199] Oops: 0010 [#1] SMP NOPTI [ 505.054211] CPU: 6 PID: 1306 Comm: modprobe Tainted: G W OE 5.9.0-rc5-custom #1 [ 505.054216] Hardware name: AMD Chachani-VN/Chachani-VN, BIOS WCH0A29N_RAPV16.FD 10/29/2020 [ 505.054225] RIP: 0010:0x0 [ 505.054234] Code: Bad RIP value. [ 505.054239] RSP: 0018:ffffb88541c66f60 EFLAGS: 00010206 [ 505.054245] RAX: 0000000000000000 RBX: ffff912836070000 RCX: 0000000000000003 [ 505.054248] RDX: 000000000000000c RSI: ffff9128365001e8 RDI: ffff912836070000 [ 505.054252] RBP: ffffb88541c66fd8 R08: 0000000000000002 R09: ffffb88541c66fa2 [ 505.054265] R10: 0000000000009580 R11: 0000000000000008 R12: ffff9128365001e8 [ 505.054272] R13: 000000000000000c R14: 0000000000000438 R15: ffff9128a48bd000 [ 505.054279] FS: 00007f09f999f540(0000) GS:ffff9128b3f80000(0000) knlGS:0000000000000000 [ 505.054284] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 505.054288] CR2: ffffffffffffffd6 CR3: 00000002db98c000 CR4: 0000000000350ee0 [ 505.054291] Call Trace: [ 505.055024] dcn20_blank_pixel_data+0x148/0x260 [amdgpu] [ 505.055730] dcn20_enable_stream_timing+0x381/0x47c [amdgpu] [ 505.056641] dce110_apply_ctx_to_hw+0x337/0x577 [amdgpu] [ 505.056667] ? put_object+0x2f/0x40 [ 505.057329] dc_commit_state+0x4b3/0x9d0 [amdgpu] [ 505.058030] amdgpu_dm_atomic_commit_tail+0x405/0x1ec6 [amdgpu] [ 505.058053] ? update_stack_state+0x103/0x170 [ 505.058071] ? __module_text_address+0x12/0x60 Signed-off-by: Huang Rui Tested-by: Changfeng Signed-off-by: Alex Deucher commit c1059360d734577f521233f84365bb3d4e415b2f Author: Alex Sierra Date: Thu Mar 26 18:31:35 2020 -0500 drm/amdgpu: replace ih ip block for vega20 and arcturus [Why] Vega20 and Arcturus asics use oss 5.0 version. [How] Replace ih ip block by navi10 for vega20 and arcturus. Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit adc9da649190c884b38dadd69e9db2c79a07f555 Author: Evan Quan Date: Fri Oct 30 19:00:13 2020 +0800 drm/amdgpu: apply dm_pp_notify_wm_clock_changes() for Polaris only Will expand it to other ASICs after verified. Signed-off-by: Evan Quan Acked-and-tested-by: Christian König Signed-off-by: Alex Deucher commit 998d76368dffcc5e35ff10c3cee526d04ef3db95 Author: Likun Gao Date: Fri Oct 30 14:22:03 2020 +0800 drm/amdgpu: update golden setting for sienna_cichlid Update golden setting for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 0ebce667e881712a9aaae8fe48bfea07af7be133 Author: Jinzhou.Su Date: Fri Oct 30 14:52:46 2020 +0800 amdgpu: Add mmhub MGCG and MGLS for vangogh Add AMD_CG_SUPPORT_MC_MGCG and AMD_CG_SUPPORT_MC_LS Signed-off-by: Jinzhou.Su Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 57eeaf47a613c67d0380cf0afad73d8f52df2670 Author: Pratik Vishwakarma Date: Thu Oct 29 09:31:00 2020 +0530 drm/amd/display: Tune min clk values for MPO for RV [Why] Incorrect values were resulting in flash lines when MPO was enabled and system was left idle. [How] Increase min clk values only when MPO is enabled and display is active to not affect S3 power. Signed-off-by: Pratik Vishwakarma Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit ef3b2987254035f9b869f70151b4220c34f2f133 Author: Jiansong Chen Date: Fri Oct 30 19:23:07 2020 +0800 drm/amdgpu: disable gfxoff if VCN is busy Toggle on/off gfxoff during video playback to fix gpu hang. v2: change sequence to be more compatible with original code. Signed-off-by: Jiansong Chen Reviewed-by: James Zhu Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 84aef2ab0977199784671295a07043191233d7c7 Author: Dmytro Laktyushkin Date: Mon Oct 26 11:48:58 2020 -0400 drm/amd/display: fix recout calculation for left side clip Recout calculation does not corrrectly handle plane clip rect that extends beyond the left most border of stream source rect. This change adds handling by truncating the invisible clip rect. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Hersen Wu Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit a5a00117625efda225aaf734492d522c6a55cb3b Author: Aric Cyr Date: Mon Oct 26 10:02:02 2020 -0400 drm/amd/display: 3.2.110 Signed-off-by: Aric Cyr Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 672251b223c11d26a9ddad64d62a5633bba4cc73 Author: Anthony Koo Date: Fri Oct 23 21:44:44 2020 -0400 drm/amd/display: [FW Promotion] Release 0.0.40 [Header Changes] - Add command for retrieving PSR residency - Add command for forcing PSR static Signed-off-by: Anthony Koo Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 4670abbb298ed72be4d020d44f494deca21bff1e Author: Andy Shevchenko Date: Thu Oct 29 13:17:28 2020 +0200 pinctrl: intel: Add blank line before endif in Kconfig Add a blank line before endif directive in Kconfig for better readability. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 866c9c55cb283e1d86e67f065dfe42a05a760b65 Author: Andy Shevchenko Date: Mon Oct 26 21:23:25 2020 +0200 pinctrl: intel: Add Intel Lakefield pin controller support This driver adds pinctrl/GPIO support for Intel Lakefield SoC. The GPIO controller is based on the next generation GPIO hardware but still compatible with the one supported by the Intel core pinctrl/GPIO driver. Cc: Ricardo Neri Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 2475a814186beca8fde3f99df10a66e75a124be5 Author: Bhawanpreet Lakha Date: Fri Oct 16 14:57:23 2020 -0400 drm/amd/display: Add missing pflip irq If we have more than 4 displays we will run into dummy irq calls or flip timout issues. Signed-off-by: Bhawanpreet Lakha Reviewed-by: Charlene Liu Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 12f86dfc075b51a27cac81005a4583b2631234ac Author: Jake Wang Date: Thu Oct 22 15:23:16 2020 -0400 drm/amd/display: set hdcp1 wa re-auth delay to 200ms [Why] Fail and restart timing for HDCP1 retry occurs too quickly. This would cause some MST monitors to show black screen. [How] Adjusted timing of fail and restart to 200ms. Signed-off-by: Jake Wang Reviewed-by: Wenjing Liu Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit b15bfd0d861399f5981add9b4270d5f6304d1d33 Author: Joshua Aberback Date: Wed Oct 21 18:44:51 2020 -0400 drm/amd/display: Revert HUBP blank behaviour for now [Why] Commit "Blank HUBP during pixel data blank for DCN30 v2" modifies HW behaviour during blank, which might have OS dependencies. We need to assess the impact on amdgpu_dm and only re-enable HUBP blanking when all necessary changes are understood. [How] - revert functional changes - leave architectural changes intact Signed-off-by: Joshua Aberback Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 8edb94562a15374c26144b5c739a7bd42f80a337 Author: Dale Zhao Date: Wed Oct 21 21:09:16 2020 +0800 drm/amd/display: WA to ensure MUX chip gets SUPPORTED_LINK_RATES of eDP [Why] Customer make a request to add this WA by driver. Some MUX chips will power down with eDP 1.4 panel and lose previous supported link rates(DPCD 0x010) in customer's hybrid-GPU designs. As a result, during sleep resuming and screen turns on from idle, link training will be performed incorrectly and eDP will flicker or black screen. These MUX chips need source to read DPCD 0x010 again during LKT so that it can restore supported link rates of panel. For driver side, supported link rate set is fetched when link detection, no need to update but just read again as WA. [How] Read DPCD 0x010 again during link training for eDP 1.4. Signed-off-by: Dale Zhao Reviewed-by: Wenjing Liu Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 91d3156a3b1708cd1e049895217f7e0738123a9c Author: Wayne Lin Date: Mon Oct 19 15:15:34 2020 +0800 drm/amd/display: Calculate CRC on specific frame region [why] Currently, we only support calculating CRC on whole frame. We want to extend the capability to calculate CRC on specific frame area. [how] Calculate CRC on specific area once it's specified from the input parameter. Signed-off-by: Wayne Lin Reviewed-by: Nicholas Kazlauskas Reviewed-by: Tony Cheng Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit ad975f448d963d700aa9a67b9d6aa5489c00cad2 Author: Victor Lu Date: Tue Sep 29 16:03:10 2020 -0400 drm/amd/display: Do not warn NULL dc_sink if forcing connector [why] There is a DRM_ERROR when the dc_sink is NULL and there should not be this warning when the connector is forced. [how] Do not warn if dc_sink is NULL if the connector is forced. Signed-off-by: Victor Lu Reviewed-by: Nicholas Kazlauskas Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit dbf5256bbf1949f0bffb37134660db03be14fd78 Author: Joshua Aberback Date: Mon Oct 19 19:30:03 2020 -0400 drm/amd/display: Blank HUBP during pixel data blank for DCN30 v2 [Why] Prior commit "Blank HUBP during pixel data blank for DCN30" missed the call to set_disp_pattern_generator from set_crtc_test_pattern, which re-exposed the issue for which we initially blocked active-only p-state switching. [How] - remove dcn30_blank_pixel_data, set dcn30 back to dcn20 version - new hwss funciton set_disp_pattern_generator - dcn20 version just calls opp_set_disp_pattern_generator - dcn30 version implements the HUBP blank Signed-off-by: Joshua Aberback Reviewed-by: Aric Cyr Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit ec76bd6f07d0f84eed64b5491e7103e6b2b79860 Author: Alvin Lee Date: Wed Oct 21 11:59:47 2020 -0400 drm/amd/display: Reset flip_immediate to topmost plane [Why] When checking if we want to disable GSL or not, we should reset flip_immediate to be the flip type of the topmost plane before looping through the other planes. [How] Set flip_immediate to be the flip type of the topmost plane before looping through the other planes. Signed-off-by: Alvin Lee Reviewed-by: Aric Cyr Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 886876ecf7f46917af8065bb574a669f19302f96 Author: Eryk Brol Date: Thu Oct 15 13:07:09 2020 -0400 drm/amd/display: Update connector on DSC property change [Why] We want to trigger atomic check on connector when DSC debugfs properties are changed. The previous method was reverted because it accessed connector properties unsafely and would also heavily impact performance. [How] Add a flag for forcing DSC update in CRTC state and add connector to the state if the flag is set. Signed-off-by: Eryk Brol Reviewed-by: Nicholas Kazlauskas Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 3a372bed1e337efa450d8288bc75cfc9237b7bad Author: Hugo Hu Date: Tue Oct 6 17:21:00 2020 +0800 drm/amd/display: correct eDP T9 delay [Why] The current end of T9 delay is relay on polling sink status by DPCD. But the polling for sink status change after NoVideoStream_flag set to 0. [How] Add function edp_add_delay_for_T9 to add T9 delay. Move the sink status polling after blank. Signed-off-by: Hugo Hu Reviewed-by: Charlene Liu Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit cae78e0331459643e21b982e4833a6525a43e498 Author: Jacky Liao Date: Thu Oct 15 17:42:16 2020 -0400 drm/amd/display: Add OPTC memory low power support [Why] The OPTC memory blocks should be powered down when they are not in use. This will reduce power consumption. [How] 1. Set ODM_MEM_UNASSIGNED_PWR_MODE to shutdown memory when unassigned 2. Set ODM_MEM_VBLANK_PWR_MODE to light sleep mode when in vblank 3. Added a debug option to allow this behaviour to be turned off 4. Restructured debug options to use a bitfield in a way that's more clear Signed-off-by: Jacky Liao Reviewed-by: Eric Yang Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 91bda9e9d248c749f99cc85538d16444507466f7 Author: Chris Park Date: Mon Oct 19 14:32:14 2020 -0400 drm/amd/display: Update panel register [Why] Incorrect panel register settings are applied for power sequence because the register macro is not defined in resource. [How] Implement same register space to future resource files. Signed-off-by: Chris Park Reviewed-by: Joshua Aberback Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 7dd4f4df99109b280cd996602d7533cc0b2e7348 Author: Ashley Thomas Date: Mon Oct 12 21:33:27 2020 -0700 drm/amd/display: fail instead of div by zero/bugcheck [why] If pbn_per_slot is 0, fail instead of dividing by zero and bugchecking. [how] Check for zero divisor before division operation. Signed-off-by: Ashley Thomas Reviewed-by: Wyatt Wood Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 81e8da715ca7d837802dee48625f380c9a1dbd11 Author: Aric Cyr Date: Mon Oct 19 09:49:14 2020 -0400 drm/amd/display: 3.2.109 Signed-off-by: Aric Cyr Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 36f878501e5faf3634b02c8a150238efbd7ee01a Author: Joshua Aberback Date: Sun Oct 18 17:36:00 2020 -0400 drm/amd/display: Blank HUBP during pixel data blank for DCN30 [Why] There are some timings for which we support p-state switching in active, but not in blank. There was a previous issue where a timing that had active-only support would hang a p-state request when we were in an extended blanking period. The workaround for that issue was to block active-only p-state switching, but that resulted in a lack of p-state support for some common timings such as 1440p60. We want to fix that issue properly by un-blocking p-state requests while the display is blanked, so that we can re-enable active-only p-state switching. [How] - new version of blank_pixel_data for DCN30 - call hubp->set_blank from dcn30_blank_pixel_data - blank every hubp in the mpcc tree, and odm tree - on blank enable, wait until the next frame before blanking HUBP Signed-off-by: Joshua Aberback Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit e748b59fb74e8725c8774a4b0753fabba9de7b97 Author: Lewis Huang Date: Thu Oct 8 14:09:45 2020 +0800 drm/amd/display: stop top_mgr when type change to non-MST during s3 [Why] Driver keeps the invalid information cause report the incorrect monitor which save in remote sink to OS [How] When connector type change from MST to non-MST, stop the topology manager. Signed-off-by: Lewis Huang Reviewed-by: Tony Cheng Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 202ad02da33a884cad458152e5080bd75fac9440 Author: Anthony Koo Date: Fri Oct 16 16:20:00 2020 -0400 drm/amd/display: [FW Promotion] Release 0.0.39 Signed-off-by: Anthony Koo Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 6f2239ccdfc04938dc35e67dd60191b2c05dfb63 Author: Alvin Lee Date: Fri Oct 16 12:20:57 2020 -0400 drm/amd/display: Keep GSL for full updates with planes that flip VSYNC [Why] When enabling PIP in Heaven, the PIP planes are VSYNC flip and is also the top-most pipe. In this case GSL will be disabled because we only check immediate flip for the top pipe. However, the desktop planes are still flip immediate so we should at least keep GSL on until the full update. [How] Check each pipe in the tree to see if any planes are flip immediate. Maintain the GSL lock if yes, and take it down after when unlocking if any planes are flipping VSYNC. Keeping GSL on with VSYNC + flip immediate planes causes corruption. Signed-off-by: Alvin Lee Reviewed-by: Aric Cyr Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 685b4d8142dcbf11b817f74c2bc5b94eca7ee7f2 Author: Isabel Zhang Date: Fri Oct 16 10:55:54 2020 -0400 drm/amd/display: Force prefetch mode to 0 [Why] On APU should be always using prefetch mode 0. Currently, sometimes prefetch mode 1 is being used causing system to hard hang due to minTTUVBlank being too low. [How] Any ASIC running DCN21 will by default allow self refresh and mclk switch. This sets both min and max prefetch mode to 0 by default. Signed-off-by: Isabel Zhang Reviewed-by: Tony Cheng Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 850d2fcf3e346a35e4e59e310b867e90e3ef8e5a Author: Yongqiang Sun Date: Fri Oct 16 09:25:05 2020 -0400 drm/amd/display: only check available pipe to disable vbios mode. [Why & How] 1. only need to check first ODM pipe. 2. Only need to check eDP which is on. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 3e5b4cdf2668cb90bea1c8076e5a430e5ac451b9 Author: Jacky Liao Date: Tue Oct 13 18:43:34 2020 -0400 drm/amd/display: Add MPC memory shutdown support for DCN3 [Why] The MPC memory blocks in DCN3 should be powered down completely when they are not in use. This will reduce power consumption. [How] This commits changes behaviour for dcn3 and does the following: 1. Write to MPC_RMU_LOW_PWR_MODE and MPCC_OGAM_MEM_LOW_PWR_MODE to automatically shut down memory when not in use 2. mpc3_power_on_shaper_3dlut and mpc3_power_on_ogam_lut are called to disable force power on when configuration finishes 3. Added a debug option to allow this behaviour to be turned off Signed-off-by: Jacky Liao Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 585e7cedf304ce76410c922e632bef04fd316ead Author: Tao.Huang Date: Fri Sep 18 11:17:44 2020 +0300 drm/amd/display: Fix compilation error [Why] The C standard does not specify whether an enum is signed or unsigned. In the function prototype, one of the argument is defined as an enum but its declaration was unit32_t. Fix this by changing the function argument to enum in the declaration. Signed-off-by: Tao.Huang Signed-off-by: Florin Iucha Reviewed-by: Dmytro Laktyushkin Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 760b3d61fb4e4db512f4c4b7ac30c7ec3452f74a Author: Andrew Lunn Date: Sat Oct 31 19:26:55 2020 +0100 net: 9p: Fix kerneldoc warnings of missing parameters etc net/9p/client.c:420: warning: Function parameter or member 'c' not described in 'p9_client_cb' net/9p/client.c:420: warning: Function parameter or member 'req' not described in 'p9_client_cb' net/9p/client.c:420: warning: Function parameter or member 'status' not described in 'p9_client_cb' net/9p/client.c:568: warning: Function parameter or member 'uidata' not described in 'p9_check_zc_errors' net/9p/trans_common.c:23: warning: Function parameter or member 'nr_pages' not described in 'p9_release_pages' net/9p/trans_common.c:23: warning: Function parameter or member 'pages' not described in 'p9_release_pages' net/9p/trans_fd.c:132: warning: Function parameter or member 'rreq' not described in 'p9_conn' net/9p/trans_fd.c:132: warning: Function parameter or member 'wreq' not described in 'p9_conn' net/9p/trans_fd.c:56: warning: Function parameter or member 'privport' not described in 'p9_fd_opts' net/9p/trans_rdma.c:113: warning: Function parameter or member 'cqe' not described in 'p9_rdma_context' net/9p/trans_rdma.c:129: warning: Function parameter or member 'privport' not described in 'p9_rdma_opts' net/9p/trans_virtio.c:215: warning: Function parameter or member 'limit' not described in 'pack_sg_list_p' net/9p/trans_virtio.c:83: warning: Function parameter or member 'chan_list' not described in 'virtio_chan' net/9p/trans_virtio.c:83: warning: Function parameter or member 'p9_max_pages' not described in 'virtio_chan' net/9p/trans_virtio.c:83: warning: Function parameter or member 'ring_bufs_avail' not described in 'virtio_chan' net/9p/trans_virtio.c:83: warning: Function parameter or member 'tag' not described in 'virtio_chan' net/9p/trans_virtio.c:83: warning: Function parameter or member 'vc_wq' not described in 'virtio_chan' Signed-off-by: Andrew Lunn Acked-by: Dominique Martinet Link: https://lore.kernel.org/r/20201031182655.1082065-1-andrew@lunn.ch Signed-off-by: Jakub Kicinski commit f946e45f59ef01ff54ffb3b1eba3a8e7915e7326 Author: Meir Lichtinger Date: Mon Oct 26 15:37:38 2020 +0200 IB/mlx5: Add support for NDR link speed The IBTA specification has new speed - NDR. That speed supports signaling rate of 100Gb. mlx5 IB driver translates link modes reported by ConnectX device to IB speed and width. Added translation of new 100Gb, 200Gb and 400Gb link modes to NDR IB type and width of x1, x2 or x4 respectively. Link: https://lore.kernel.org/r/20201026133738.1340432-3-leon@kernel.org Signed-off-by: Meir Lichtinger Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit c7adf7717301558e8852949d8e3dc3748d1a4a97 Author: Meir Lichtinger Date: Mon Oct 26 15:37:37 2020 +0200 IB/core: Add support for NDR link speed Add new IBTA speed NDR, supporting signaling rate of 100Gb. Link: https://lore.kernel.org/r/20201026133738.1340432-2-leon@kernel.org Signed-off-by: Meir Lichtinger Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 235b6ac306951fd4e8c31861d79ca68a643cab8a Author: Meir Lichtinger Date: Mon Oct 26 15:29:04 2020 +0200 RDMA/ipoib: Add 50Gb and 100Gb link speeds to ethtool The IBTA specification has new speeds - HDR and NDR, supporting signaling rate of 50Gb and 100Gb respectively. ethtool support of ipoib driver translates IB speed to signaling rate. Added translation of HDR and NDR IB types to rates of 50Gb and 100Gb ethernet speed. Link: https://lore.kernel.org/r/20201026132904.1338526-1-leon@kernel.org Signed-off-by: Meir Lichtinger Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 24269999027e6b161c0078ad9c1557f9a1575128 Author: Mauro Carvalho Chehab Date: Fri Oct 23 18:32:57 2020 +0200 EDAC: Fix some kernel-doc markups Kernel-doc markup should use this format: identifier - description Correct that and also fix some enums' names in the kernel-doc markup. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/1d291393ba58c7b80908a3fedf02d2f53921ffe9.1603469755.git.mchehab+huawei@kernel.org commit 5c4193669b6f20b990f99cb8e15cdea80f865ac1 Author: Jason Gunthorpe Date: Fri Oct 30 11:03:05 2020 -0300 RDMA/rxe,siw: Restore uverbs_cmd_mask IB_USER_VERBS_CMD_POST_SEND These two drivers open code the call to POST_SEND and do not use the rdma-core wrapper to do it, thus their usages was missed during the audit. Both drivers use this as a doorbell to signal the kernel to start DMA. Fixes: 628c02bf38aa ("RDMA: Remove uverbs cmds from drivers that don't use them") Link: https://lore.kernel.org/r/0-v1-4608c5610afa+fb-uverbs_cmd_post_send_fix_jgg@nvidia.com Reported-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit 856c2998999958761b6a52208b4edb4d352c4037 Author: Zhang Qilong Date: Wed Oct 28 20:25:09 2020 +0800 RDMA/siw: Fix typo of EAGAIN not -EAGAIN in siw_cm_work_handler() The rv cannot be 'EAGAIN' in the previous path, we should use '-EAGAIN' to check it. For example: Call trace: ->siw_cm_work_handler ->siw_proc_mpareq ->siw_recv_mpa_rr Link: https://lore.kernel.org/r/20201028122509.47074-1-zhangqilong3@huawei.com Signed-off-by: Zhang Qilong Reviewed-by: Bernard Metzler Signed-off-by: Jason Gunthorpe commit b000d5cb954fe25ac1ea929ae6da321033ace927 Author: Ard Biesheuvel Date: Tue Oct 13 10:18:04 2020 +0200 ima: defer arch_ima_get_secureboot() call to IMA init time Chester reports that it is necessary to introduce a new way to pass the EFI secure boot status between the EFI stub and the core kernel on ARM systems. The usual way of obtaining this information is by checking the SecureBoot and SetupMode EFI variables, but this can only be done after the EFI variable workqueue is created, which occurs in a subsys_initcall(), whereas arch_ima_get_secureboot() is called much earlier by the IMA framework. However, the IMA framework itself is started as a late_initcall, and the only reason the call to arch_ima_get_secureboot() occurs so early is because it happens in the context of a __setup() callback that parses the ima_appraise= command line parameter. So let's refactor this code a little bit, by using a core_param() callback to capture the command line argument, and deferring any reasoning based on its contents to the IMA init routine. Cc: Chester Lin Cc: Dmitry Kasatkin Cc: James Morris Cc: "Serge E. Hallyn" Link: https://lore.kernel.org/linux-arm-kernel/20200904072905.25332-2-clin@suse.com/ Signed-off-by: Ard Biesheuvel Reported-by: kernel test robot [missing core_param()] [zohar@linux.ibm.com: included linux/module.h] Tested-by: Chester Lin Signed-off-by: Mimi Zohar commit d5c7916fe4613e9128b0f877f7e2dd0c85f5d2d2 Author: Jason Gunthorpe Date: Mon Oct 26 15:23:14 2020 +0200 RDMA/mlx5: Use ib_umem_find_best_pgsz() for mkc's Now that all the PAS arrays or UMR XLT's for mkcs are filled using rdma_for_each_block() we can use the common ib_umem_find_best_pgsz() algorithm. Link: https://lore.kernel.org/r/20201026132314.1336717-6-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit f1eaac37da20823816af274d69a9eed7444e9822 Author: Jason Gunthorpe Date: Mon Oct 26 15:23:13 2020 +0200 RDMA/mlx5: Split mlx5_ib_update_xlt() into ODP and non-ODP cases Mixing these together is just a mess, make a dedicated version, mlx5_ib_update_mr_pas(), which directly loads the whole MTT for a non-ODP MR. The split out version can trivially use a simple loop with rdma_for_each_block() which allows using the core code to compute the MR pages and avoids seeking in the SGL list after each chunk as the __mlx5_ib_populate_pas() call required. Significantly speeds loading large MTTs. Link: https://lore.kernel.org/r/20201026132314.1336717-5-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 4a2d2ed9bae16c14602e7aebba3f0c90f73fe786 Author: Mauro Carvalho Chehab Date: Fri Oct 23 18:32:53 2020 +0200 x86/mtrr: Fix a kernel-doc markup Kernel-doc markup should use this format: identifier - description Fix it. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/2217cd4ae9e561da2825485eb97de77c65741489.1603469755.git.mchehab+huawei@kernel.org commit 8010d74b9965b33182651767e9788ed84cf8e5f9 Author: Jason Gunthorpe Date: Mon Oct 26 15:23:12 2020 +0200 RDMA/mlx5: Split the WR setup out of mlx5_ib_update_xlt() The memory allocation is quite complicated, and makes this function hard to understand. Refactor things so that a function call sets up the WR, SG, DMA mapping and buffer, further splitting that into buffer and DMA/wr. This also slightly changes the buffer allocation logic to try an order 0 page allocation (with OOM warnings on) before going to the emergency page. Link: https://lore.kernel.org/r/20201026132314.1336717-4-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit f22c30aa6d27597a6da665db1a5f099e4903ecc7 Author: Jason Gunthorpe Date: Mon Oct 26 15:23:11 2020 +0200 RDMA/mlx5: Move xlt_emergency_page_mutex into mr.c This is the only user, so remove the wrappers. Link: https://lore.kernel.org/r/20201026132314.1336717-3-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit aab8d3966d2c2aa6c59fbacdb17d82156653754f Author: Jason Gunthorpe Date: Mon Oct 26 15:23:10 2020 +0200 RDMA/mlx5: Change mlx5_ib_populate_pas() to use rdma_for_each_block() This routine converts the umem SGL into a list of fixed pages for DMA, which is exactly what rdma_umem_for_each_dma_block() is for, use the common code directly. Link: https://lore.kernel.org/r/20201026132314.1336717-2-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit f8fb3110635c91a375399450dc5a4a79a83b0414 Author: Jason Gunthorpe Date: Mon Oct 26 15:19:36 2020 +0200 RDMA/mlx5: Remove npages from mlx5_ib_cont_pages() Most callers don't need this, and the few that do can get it as ib_umem_num_pages(umem). Link: https://lore.kernel.org/r/20201026131936.1335664-8-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 7db0eea916dcc050811f7a498b4e268d764c6d24 Author: Jason Gunthorpe Date: Mon Oct 26 15:19:35 2020 +0200 RDMA/mlx5: Remove ncont from mlx5_ib_cont_pages() This is the same as ib_umem_num_dma_blocks(umem, 1UL << page_shift), have the callers compute it directly. Link: https://lore.kernel.org/r/20201026131936.1335664-7-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 95741ee3f0f1f437720626131d866ac8dc66ab14 Author: Jason Gunthorpe Date: Mon Oct 26 15:19:34 2020 +0200 RDMA/mlx5: Remove order from mlx5_ib_cont_pages() Only alloc_mr_from_cache() needs order and can trivially compute it, so lift it to the one call site and remove the NULL arguments. Link: https://lore.kernel.org/r/20201026131936.1335664-6-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit f0093fb1a7cbff4bbfa47c1499a9e76f75359dbe Author: Jason Gunthorpe Date: Mon Oct 26 15:19:33 2020 +0200 RDMA/mlx5: Move mlx5_ib_cont_pages() to the creation of the mlx5_ib_mr For the user MR path, instead of calling this after getting the umem, call it as part of creating the struct mlx5_ib_mr and distill its output to a single page_shift stored inside the mr. This avoids passing around the tuple of its output. Based on the umem and page_shift, the output arguments can be computed using: count == ib_umem_num_pages(mr->umem) shift == mr->page_shift ncont == ib_umem_num_dma_blocks(mr->umem, 1 << mr->page_shift) order == order_base_2(ncont) And since mr->page_shift == umem_odp->page_shift then ncont == ib_umem_num_dma_blocks() == ib_umem_odp_num_pages() for ODP umems. Link: https://lore.kernel.org/r/20201026131936.1335664-5-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 1c3d247eee746016f268a3e7f6b4a11cfa205e8e Author: Jason Gunthorpe Date: Mon Oct 26 15:19:32 2020 +0200 RDMA/mlx5: Remove mlx5_ib_mr->npages This is the same value as ib_umem_num_pages(mr->umem), use that instead. Link: https://lore.kernel.org/r/20201026131936.1335664-4-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 74b01dc395364f647fe2729b6a775fd9df3f57a2 Author: Tom Rix Date: Sun Nov 1 07:28:44 2020 -0800 soc: samsung: exynos5422-asv: remove unneeded semicolon A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20201101152844.2290728-1-trix@redhat.com Signed-off-by: Krzysztof Kozlowski commit fc3325701a6353594083f08e297d4c1965c601aa Author: Jason Gunthorpe Date: Mon Oct 26 15:19:31 2020 +0200 RDMA/mlx5: Fix corruption of reg_pages in mlx5_ib_rereg_user_mr() reg_pages should always contain mr->npage since when the mr is finally de-reg'd it is always subtracted out. If there were any error exits then mlx5_ib_rereg_user_mr() would leave the reg_pages adjusted and this will cause it to be double subtracted eventually. The manipulation of reg_pages is inherently connected to the umem, so lift it out of set_mr_fields() and only adjust it around creating/destroying a umem. reg_pages is only used for diagnostics in sysfs. Fixes: 7d0cc6edcc70 ("IB/mlx5: Add MR cache for large UMR regions") Link: https://lore.kernel.org/r/20201026131936.1335664-3-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit b4d031cdae1301a8e5e9dba2a862ef028717cb17 Author: Jason Gunthorpe Date: Mon Oct 26 15:19:30 2020 +0200 RDMA/mlx5: Remove mlx5_ib_mr->order The is only ever set to non-zero if the MR is from the cache, and if it is cached then the order is in cached_ent->order. Make it clearer that use_umr_mtt_update() only returns true for cached MRs and remove the redundant data. Link: https://lore.kernel.org/r/20201026131936.1335664-2-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 56a7ff75cd08987812209971e319f78156ea2bb1 Author: Rafael J. Wysocki Date: Thu Oct 22 13:57:45 2020 +0200 cpufreq: Drop restore_freq from struct cpufreq_policy The restore_freq field in struct cpufreq_policy is only used by __target_index() in one place and a local variable in that function may as well be used instead of it, so drop it and modify __target_index() accordingly. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar commit fa4320cefb8537a70cc28c55d311a1f569697cd3 Author: Chao Yu Date: Mon Nov 2 14:21:31 2020 +0800 f2fs: move ioctl interface definitions to separated file Like other filesystem does, we introduce a new file f2fs.h in path of include/uapi/linux/, and move f2fs-specified ioctl interface definitions to that file, after then, in order to use those definitions, userspace developer only need to include the new header file rather than copy & paste definitions from fs/f2fs/f2fs.h. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 7a6e59d719ef0ec9b3d765cba3ba98ee585cbde3 Author: Chao Yu Date: Mon Nov 2 17:36:58 2020 +0800 f2fs: fix to seek incorrect data offset in inline data file As kitestramuort reported: F2FS-fs (nvme0n1p4): access invalid blkaddr:1598541474 [ 25.725898] ------------[ cut here ]------------ [ 25.725903] WARNING: CPU: 6 PID: 2018 at f2fs_is_valid_blkaddr+0x23a/0x250 [ 25.725923] Call Trace: [ 25.725927] ? f2fs_llseek+0x204/0x620 [ 25.725929] ? ovl_copy_up_data+0x14f/0x200 [ 25.725931] ? ovl_copy_up_inode+0x174/0x1e0 [ 25.725933] ? ovl_copy_up_one+0xa22/0xdf0 [ 25.725936] ? ovl_copy_up_flags+0xa6/0xf0 [ 25.725938] ? ovl_aio_cleanup_handler+0xd0/0xd0 [ 25.725939] ? ovl_maybe_copy_up+0x86/0xa0 [ 25.725941] ? ovl_open+0x22/0x80 [ 25.725943] ? do_dentry_open+0x136/0x350 [ 25.725945] ? path_openat+0xb7e/0xf40 [ 25.725947] ? __check_sticky+0x40/0x40 [ 25.725948] ? do_filp_open+0x70/0x100 [ 25.725950] ? __check_sticky+0x40/0x40 [ 25.725951] ? __check_sticky+0x40/0x40 [ 25.725953] ? __x64_sys_openat+0x1db/0x2c0 [ 25.725955] ? do_syscall_64+0x2d/0x40 [ 25.725957] ? entry_SYSCALL_64_after_hwframe+0x44/0xa9 llseek() reports invalid block address access, the root cause is if file has inline data, f2fs_seek_block() will access inline data regard as block address index in inode block, which should be wrong, fix it. Reported-by: kitestramuort Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 3acc4522d89e0a326db69e9d0afaad8cf763a54c Author: Jaegeuk Kim Date: Sun Oct 25 07:35:47 2020 -0700 f2fs: call f2fs_get_meta_page_retry for nat page When running fault injection test, if we don't stop checkpoint, some stale NAT entries were flushed which breaks consistency. Fixes: 86f33603f8c5 ("f2fs: handle errors of f2fs_get_meta_page_nofail") Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 8aaeed81fcb917b5cf4976932c5baefa1471128b Author: Eric Dumazet Date: Mon Nov 2 03:41:00 2020 -0800 bpf: Fix error path in htab_map_alloc() syzbot was able to trigger a use-after-free in htab_map_alloc() [1] htab_map_alloc() lacks a call to lockdep_unregister_key() in its error path. lockdep_register_key() and lockdep_unregister_key() can not fail, it seems better to use them right after htab allocation and before htab freeing, avoiding more goto/labels in htab_map_alloc() [1] BUG: KASAN: use-after-free in lockdep_register_key+0x356/0x3e0 kernel/locking/lockdep.c:1182 Read of size 8 at addr ffff88805fa67ad8 by task syz-executor.3/2356 CPU: 1 PID: 2356 Comm: syz-executor.3 Not tainted 5.9.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+0x107/0x163 lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xae/0x4c8 mm/kasan/report.c:385 __kasan_report mm/kasan/report.c:545 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:562 lockdep_register_key+0x356/0x3e0 kernel/locking/lockdep.c:1182 htab_init_buckets kernel/bpf/hashtab.c:144 [inline] htab_map_alloc+0x6c5/0x14a0 kernel/bpf/hashtab.c:521 find_and_alloc_map kernel/bpf/syscall.c:122 [inline] map_create kernel/bpf/syscall.c:825 [inline] __do_sys_bpf+0xa80/0x5180 kernel/bpf/syscall.c:4381 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45deb9 Code: 0d b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 db b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f0eafee1c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 0000000000001a00 RCX: 000000000045deb9 RDX: 0000000000000040 RSI: 0000000020000040 RDI: 405a020000000000 RBP: 000000000118bf60 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118bf2c R13: 00007ffd3cf9eabf R14: 00007f0eafee29c0 R15: 000000000118bf2c Allocated by task 2053: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xc2/0xd0 mm/kasan/common.c:461 kmalloc include/linux/slab.h:554 [inline] kzalloc include/linux/slab.h:666 [inline] htab_map_alloc+0xdf/0x14a0 kernel/bpf/hashtab.c:454 find_and_alloc_map kernel/bpf/syscall.c:122 [inline] map_create kernel/bpf/syscall.c:825 [inline] __do_sys_bpf+0xa80/0x5180 kernel/bpf/syscall.c:4381 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 2053: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track+0x1c/0x30 mm/kasan/common.c:56 kasan_set_free_info+0x1b/0x30 mm/kasan/generic.c:355 __kasan_slab_free+0x102/0x140 mm/kasan/common.c:422 slab_free_hook mm/slub.c:1544 [inline] slab_free_freelist_hook+0x5d/0x150 mm/slub.c:1577 slab_free mm/slub.c:3142 [inline] kfree+0xdb/0x360 mm/slub.c:4124 htab_map_alloc+0x3f9/0x14a0 kernel/bpf/hashtab.c:549 find_and_alloc_map kernel/bpf/syscall.c:122 [inline] map_create kernel/bpf/syscall.c:825 [inline] __do_sys_bpf+0xa80/0x5180 kernel/bpf/syscall.c:4381 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff88805fa67800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 728 bytes inside of 1024-byte region [ffff88805fa67800, ffff88805fa67c00) The buggy address belongs to the page: page:000000003c5582c4 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5fa60 head:000000003c5582c4 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head) raw: 00fff00000010200 ffffea0000bc1200 0000000200000002 ffff888010041140 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88805fa67980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88805fa67a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88805fa67b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88805fa67b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb Fixes: c50eb518e262 ("bpf: Use separate lockdep class for each hashtab") Reported-by: syzbot Signed-off-by: Eric Dumazet Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20201102114100.3103180-1-eric.dumazet@gmail.com commit 437145dbcdee5b62f94b6fd846a22a8671c28843 Author: Evan Green Date: Wed Oct 28 17:28:25 2020 -0700 arm64: dts: qcom: sc7180: Add soc-specific qfprom compat string Add the soc-specific compatible string so that it can be matched more specifically now that the driver cares which SoC it's on. Signed-off-by: Evan Green Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20201028172737.v3.2.Ia3b68ac843df93c692627a3a92b947b3a5785863@changeid Signed-off-by: Bjorn Andersson commit a9c52d42814a44472fe1205775320ec20f556908 Author: YueHaibing Date: Sat Oct 31 11:30:42 2020 +0800 spi: spi-mem: Fix passing zero to 'PTR_ERR' warning Fix smatch warning: drivers/spi/spi-mem.c:746 spi_mem_probe() warn: passing zero to 'PTR_ERR' Fixes: 5d27a9c8ea9e ("spi: spi-mem: Extend the SPI mem interface to set a custom memory name") Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20201031033042.42892-1-yuehaibing@huawei.com Signed-off-by: Mark Brown commit ee5558a9084584015c8754ffd029ce14a5827fa8 Author: Zhang Qilong Date: Mon Nov 2 22:56:51 2020 +0800 spi: img-spfi: fix reference leak in img_spfi_resume pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to pm_runtime_put_noidle will result in reference leak in img_spfi_resume, so we should fix it. Fixes: deba25800a12b ("spi: Add driver for IMG SPFI controller") Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20201102145651.3875-1-zhangqilong3@huawei.com Signed-off-by: Mark Brown commit c1af06a28a0176ceb1fc71408b32aabf53db4470 Author: Tom Rix Date: Sun Nov 1 09:19:43 2020 -0800 ASoC: Intel: remove unneeded semicolon A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix Acked-by: Cezary Rojewski Link: https://lore.kernel.org/r/20201101171943.2305030-1-trix@redhat.com Signed-off-by: Mark Brown commit ff3cfccba4dd87bb89ca185b58b38b9a74260138 Author: Xu Wang Date: Thu Oct 29 08:25:13 2020 +0000 ASoC: ti: davinci-evm: Remove redundant null check before clk_disable_unprepare Because clk_disable_unprepare() already checked NULL clock parameter, so the additional check is unnecessary, just remove it. Signed-off-by: Xu Wang Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20201029082513.28233-1-vulab@iscas.ac.cn Signed-off-by: Mark Brown commit 46713ed258695e2de00ab2738160f89220c0a976 Author: Tom Rix Date: Sun Nov 1 08:00:37 2020 -0800 ASoC: bcm2835-i2s: remove unneeded semicolon A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20201101160037.2295512-1-trix@redhat.com Signed-off-by: Mark Brown commit 09e006cfb43e8ec38afe28278b210dab72e6cac8 Author: Uwe Kleine-König Date: Wed Oct 14 22:00:30 2020 +0200 arm64: dts: rockchip: Add basic support for Kobol's Helios64 The hardware is described in detail on Kobol's wiki at https://wiki.kobol.io/helios64/intro/. Up to now the following peripherals are working: - UART - Micro-SD card - eMMC - ethernet port 1 - status LED - temperature sensor on i2c bus 2 Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20201014200030.845759-3-uwe@kleine-koenig.org Signed-off-by: Heiko Stuebner commit fa67f2817ff2c9bb07472d30e58d904922f1a538 Author: Uwe Kleine-König Date: Wed Oct 14 22:00:29 2020 +0200 dt-bindings: vendor-prefixes: Add kobol prefix The prefix is already used in arm/armada-388-helios4.dts. Signed-off-by: Uwe Kleine-König Acked-by: Rob Herring Link: https://lore.kernel.org/r/20201014200030.845759-2-uwe@kleine-koenig.org Signed-off-by: Heiko Stuebner commit 0347c69214f4b600f40c0dc58945dc2798e2b3d9 Author: Lubomir Rintel Date: Sat Sep 26 01:58:29 2020 +0200 phy: Add USB HSIC PHY driver for Marvell MMP3 SoC Add PHY driver for the HSICs found on Marvell MMP3 SoC. The driver is rather straightforward -- the PHY essentially just needs to be enabled. Signed-off-by: Lubomir Rintel Link: https://lore.kernel.org/r/20200925235828.228626-4-lkundrak@v3.sk Signed-off-by: Vinod Koul commit a1b87f1aac4dba2bac0e0019a9c05f7efa36c37d Author: Lubomir Rintel Date: Sat Sep 26 01:58:28 2020 +0200 dt-bindings: phy: Allow BSD licensing of marvell,mmp3-hsic-phy.yaml I wrote this binding and I'm fine with it being GPL + BSD dual-licensed, as is recommended for new DT bindings. Signed-off-by: Lubomir Rintel Acked-by: Rob Herring Link: https://lore.kernel.org/r/20200925235828.228626-3-lkundrak@v3.sk Signed-off-by: Vinod Koul commit ee19f644c4594d1b8382f1538c19396f92c3c171 Author: Lubomir Rintel Date: Sat Sep 26 01:58:27 2020 +0200 dt-bindings: phy: Drop reset-gpios from marvell,mmp3-hsic-phy This has been added in error -- the PHY block doesn't have a reset pin. Signed-off-by: Lubomir Rintel Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200925235828.228626-2-lkundrak@v3.sk Signed-off-by: Vinod Koul commit 0536f70989601c64c162107354a03112ab1bb9e6 Author: Clément Péron Date: Fri Oct 30 15:46:46 2020 +0100 arm64: defconfig: Enable Allwinner i2s driver Enable Allwinner I2S driver for arm64 defconfig. Signed-off-by: Clément Péron Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20201030144648.397824-14-peron.clem@gmail.com commit cd7c897821a0dd41b10b756601d5707f0096652b Author: Marcus Cooper Date: Fri Oct 30 15:46:48 2020 +0100 arm: dts: sunxi: h3/h5: Add I2S2 node Add H3/H5 I2S2 node connected to the HDMI interface. Signed-off-by: Jernej Skrabec Signed-off-by: Marcus Cooper Signed-off-by: Clément Péron Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20201030144648.397824-16-peron.clem@gmail.com commit 796c994e0b63400f6450a10e0a75c45e59191304 Author: Marcus Cooper Date: Fri Oct 30 15:46:45 2020 +0100 arm64: dts: allwinner: a64: Add I2S2 node Add the I2S2 node connected to the HDMI interface. Signed-off-by: Jernej Skrabec Signed-off-by: Marcus Cooper Signed-off-by: Clément Péron Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20201030144648.397824-13-peron.clem@gmail.com commit b306d9cec8de054c7ace45dd0e4c9cac4991d65f Author: Jernej Skrabec Date: Fri Oct 30 15:46:44 2020 +0100 arm64: dts: allwinner: h6: Add I2S1 node Add Allwinner H6 I2S1 node connected to HDMI interface. Signed-off-by: Jernej Skrabec Signed-off-by: Marcus Cooper Signed-off-by: Clément Péron Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20201030144648.397824-12-peron.clem@gmail.com commit 7a60c2dd0f575ab14a457e99582af0ca1e072a74 Author: Jason Gunthorpe Date: Wed Oct 28 16:15:26 2020 -0300 drm: Remove SCATTERLIST_MAX_SEGMENT Since commit 9a40401cfa13 ("lib/scatterlist: Do not limit max_segment to PAGE_ALIGNED values") the max_segment input to sg_alloc_table_from_pages() does not have to be any special value. The new algorithm will always create something less than what the user provides. Thus eliminate this confusing constant. - vmwgfx should use the HW capability, not mix in the OS page size for calling dma_set_max_seg_size() - i915 uses i915_sg_segment_size() both for sg_alloc_table_from_pages and for some open coded sgl construction. This doesn't change the value since rounddown(size, UINT_MAX) == SCATTERLIST_MAX_SEGMENT - drm_prime_pages_to_sg uses it as a default if max_segment is zero, UINT_MAX is fine to use directly. Cc: Gerd Hoffmann Cc: Daniel Vetter Cc: Thomas Hellstrom Cc: Qian Cai Cc: "Ursulin, Tvrtko" Suggested-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/0-v1-44733fccd781+13d-rm_scatterlist_max_jgg@nvidia.com commit 95d7a1a6f867f5e6acf62e07a463e0bea1d47b68 Author: Bernard Zhao Date: Sun Nov 1 19:07:36 2020 -0800 gpu/drm: delete same check in if condition In function drm_bridge_connector_get_modes_edid, drm_edid_is_valid will check weather (!edid), no need to check again in the if branch. Signed-off-by: Bernard Zhao Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20201102030736.3833-1-bernard@vivo.com commit 9bb7b689274b67ecb3641e399e76f84adc627df1 Author: KuoHsiang Chou Date: Fri Oct 30 15:42:12 2020 +0800 drm/ast: Support 1600x900 with 108MHz PCLK [New] Create the setting for 1600x900 @60Hz refresh rate by 108MHz pixel-clock. Signed-off-by: KuoHsiang Chou Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20201030074212.22401-1-kuohsiang_chou@aspeedtech.com commit 9364a2cf567187c0a075942c22d1f434c758de5d Author: Randy Dunlap Date: Sun Nov 1 23:24:56 2020 -0800 staging: wimax: depends on NET Fix build errors when CONFIG_NET is not enabled. E.g. (trimmed): ld: drivers/staging/wimax/op-msg.o: in function `wimax_msg_alloc': op-msg.c:(.text+0xa9): undefined reference to `__alloc_skb' ld: op-msg.c:(.text+0xcc): undefined reference to `genlmsg_put' ld: op-msg.c:(.text+0xfc): undefined reference to `nla_put' ld: op-msg.c:(.text+0x168): undefined reference to `kfree_skb' ld: drivers/staging/wimax/op-msg.o: in function `wimax_msg_data_len': op-msg.c:(.text+0x1ba): undefined reference to `nla_find' ld: drivers/staging/wimax/op-msg.o: in function `wimax_msg_send': op-msg.c:(.text+0x311): undefined reference to `init_net' ld: op-msg.c:(.text+0x326): undefined reference to `netlink_broadcast' ld: drivers/staging/wimax/stack.o: in function `__wimax_state_change': stack.c:(.text+0x433): undefined reference to `netif_carrier_off' ld: stack.c:(.text+0x46b): undefined reference to `netif_carrier_on' ld: stack.c:(.text+0x478): undefined reference to `netif_tx_wake_queue' ld: drivers/staging/wimax/stack.o: in function `wimax_subsys_exit': stack.c:(.exit.text+0xe): undefined reference to `genl_unregister_family' ld: drivers/staging/wimax/stack.o: in function `wimax_subsys_init': stack.c:(.init.text+0x1a): undefined reference to `genl_register_family' Cc: Greg Kroah-Hartman Cc: Jakub Kicinski Cc: Arnd Bergmann Cc: netdev@vger.kernel.org Acked-by: Arnd Bergmann Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/r/20201102072456.20303-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit f69456d3224aff06820dfc2460780046bb6544b0 Author: Konstantin Aladyshev Date: Tue Oct 27 15:37:22 2020 +0300 ARM: dts: aspeed: amd-ethanolx: Enable devices for the iKVM functionality Enable the USB 2.0 Virtual Hub Controller and the Video Engine with it's reserved memory region for the implementation of the iKVM functionality in the BMC. Signed-off-by: Konstantin Aladyshev Reviewed-by: Supreeth Venkatesh Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20201027123722.2935-3-aladyshev22@gmail.com Signed-off-by: Joel Stanley commit efc5dae95a8c272e7737a29fdaecc06d64320717 Author: Konstantin Aladyshev Date: Tue Oct 27 15:37:21 2020 +0300 ARM: dts: aspeed: amd-ethanolx: Enable KCS channel 3 The KCS interface on the LPC channel 3 in the controller is used for the in-band BMC<->BIOS IPMI communication. 0xCA2 is a default host CPU LPC IO address for this interface. Signed-off-by: Konstantin Aladyshev Reviewed-by: Supreeth Venkatesh Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20201027123722.2935-2-aladyshev22@gmail.com Signed-off-by: Joel Stanley commit f6ebe9f9c9233a6114eb922aba9a0c9ccc2d2e14 Author: Maxime Ripard Date: Wed Oct 28 13:32:22 2020 +0100 drm/atomic: Pass the full state to CRTC atomic begin and flush The current atomic helpers have either their object state being passed as an argument or the full atomic state. The former is the pattern that was done at first, before switching to the latter for new hooks or when it was needed. Let's start convert all the remaining helpers to provide a consistent interface, starting with the CRTC's atomic_begin and atomic_flush. The conversion was done using the coccinelle script below, built tested on all the drivers and actually tested on vc4. virtual report @@ struct drm_crtc_helper_funcs *FUNCS; identifier old_crtc_state, old_state; identifier crtc; identifier f; @@ f(struct drm_crtc_state *old_crtc_state) { ... struct drm_atomic_state *old_state = old_crtc_state->state; <... - FUNCS->atomic_begin(crtc, old_crtc_state); + FUNCS->atomic_begin(crtc, old_state); ...> } @@ struct drm_crtc_helper_funcs *FUNCS; identifier old_crtc_state, old_state; identifier crtc; identifier f; @@ f(struct drm_crtc_state *old_crtc_state) { ... struct drm_atomic_state *old_state = old_crtc_state->state; <... - FUNCS->atomic_flush(crtc, old_crtc_state); + FUNCS->atomic_flush(crtc, old_state); ...> } @@ struct drm_crtc_helper_funcs *FUNCS; struct drm_crtc *crtc; struct drm_crtc_state *crtc_state; identifier dev, state; identifier f; @@ f(struct drm_device *dev, struct drm_atomic_state *state, ...) { <... - FUNCS->atomic_begin(crtc, crtc_state); + FUNCS->atomic_begin(crtc, state); ...> } @@ struct drm_crtc_helper_funcs *FUNCS; struct drm_crtc *crtc; struct drm_crtc_state *crtc_state; identifier dev, state; identifier f; @@ f(struct drm_device *dev, struct drm_atomic_state *state, ...) { <... - FUNCS->atomic_flush(crtc, crtc_state); + FUNCS->atomic_flush(crtc, state); ...> } @@ identifier crtc, old_state; @@ struct drm_crtc_helper_funcs { ... - void (*atomic_begin)(struct drm_crtc *crtc, struct drm_crtc_state *old_state); + void (*atomic_begin)(struct drm_crtc *crtc, struct drm_atomic_state *state); ... - void (*atomic_flush)(struct drm_crtc *crtc, struct drm_crtc_state *old_state); + void (*atomic_flush)(struct drm_crtc *crtc, struct drm_atomic_state *state); ... } @ crtc_atomic_func @ identifier helpers; identifier func; @@ ( static struct drm_crtc_helper_funcs helpers = { ..., .atomic_begin = func, ..., }; | static struct drm_crtc_helper_funcs helpers = { ..., .atomic_flush = func, ..., }; ) @ ignores_old_state @ identifier crtc_atomic_func.func; identifier crtc, old_state; @@ void func(struct drm_crtc *crtc, struct drm_crtc_state *old_state) { ... when != old_state } @ adds_old_state depends on crtc_atomic_func && !ignores_old_state @ identifier crtc_atomic_func.func; identifier crtc, old_state; @@ void func(struct drm_crtc *crtc, struct drm_crtc_state *old_state) { + struct drm_crtc_state *old_state = drm_atomic_get_old_crtc_state(state, crtc); ... } @ depends on crtc_atomic_func @ identifier crtc_atomic_func.func; expression E; type T; @@ void func(...) { ... - T state = E; + T crtc_state = E; <+... - state + crtc_state ...+> } @ depends on crtc_atomic_func @ identifier crtc_atomic_func.func; type T; @@ void func(...) { ... - T state; + T crtc_state; <+... - state + crtc_state ...+> } @@ identifier old_state; identifier crtc; @@ void vc4_hvs_atomic_flush(struct drm_crtc *crtc, - struct drm_crtc_state *old_state + struct drm_atomic_state *state ) { + struct drm_crtc_state *old_state = drm_atomic_get_old_crtc_state(state, crtc); ... } @@ identifier old_state; identifier crtc; @@ void vc4_hvs_atomic_flush(struct drm_crtc *crtc, - struct drm_crtc_state *old_state + struct drm_atomic_state *state ); @@ identifier old_state; identifier crtc; @@ void vmw_du_crtc_atomic_begin(struct drm_crtc *crtc, - struct drm_crtc_state *old_state + struct drm_atomic_state *state ) { ... } @@ identifier old_state; identifier crtc; @@ void vmw_du_crtc_atomic_begin(struct drm_crtc *crtc, - struct drm_crtc_state *old_state + struct drm_atomic_state *state ); @@ identifier old_state; identifier crtc; @@ void vmw_du_crtc_atomic_flush(struct drm_crtc *crtc, - struct drm_crtc_state *old_state + struct drm_atomic_state *state ) { ... } @@ identifier old_state; identifier crtc; @@ void vmw_du_crtc_atomic_flush(struct drm_crtc *crtc, - struct drm_crtc_state *old_state + struct drm_atomic_state *state ); @ depends on crtc_atomic_func @ identifier crtc_atomic_func.func; identifier old_state; identifier crtc; @@ void func(struct drm_crtc *crtc, - struct drm_crtc_state *old_state + struct drm_atomic_state *state ) { ... } @ include depends on adds_old_state @ @@ #include @ no_include depends on !include && adds_old_state @ @@ + #include #include Signed-off-by: Maxime Ripard Reviewed-by: Ville Syrjälä Acked-by: Daniel Vetter Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20201028123222.1732139-2-maxime@cerno.tech commit 29b77ad7b9ca8c87152a1a9e8188970fb2a93df4 Author: Maxime Ripard Date: Wed Oct 28 13:32:21 2020 +0100 drm/atomic: Pass the full state to CRTC atomic_check The current atomic helpers have either their object state being passed as an argument or the full atomic state. The former is the pattern that was done at first, before switching to the latter for new hooks or when it was needed. Let's start convert all the remaining helpers to provide a consistent interface, starting with the CRTC's atomic_check. The conversion was done using the coccinelle script below, built tested on all the drivers and actually tested on vc4. virtual report @@ struct drm_crtc_helper_funcs *FUNCS; struct drm_crtc *crtc; struct drm_crtc_state *crtc_state; identifier dev, state; identifier ret, f; @@ f(struct drm_device *dev, struct drm_atomic_state *state) { <... - ret = FUNCS->atomic_check(crtc, crtc_state); + ret = FUNCS->atomic_check(crtc, state); ...> } @@ identifier crtc, new_state; @@ struct drm_crtc_helper_funcs { ... - int (*atomic_check)(struct drm_crtc *crtc, struct drm_crtc_state *new_state); + int (*atomic_check)(struct drm_crtc *crtc, struct drm_atomic_state *state); ... } @ crtc_atomic_func @ identifier helpers; identifier func; @@ static struct drm_crtc_helper_funcs helpers = { ..., .atomic_check = func, ..., }; @ ignores_new_state @ identifier crtc_atomic_func.func; identifier crtc, new_state; @@ int func(struct drm_crtc *crtc, struct drm_crtc_state *new_state) { ... when != new_state } @ adds_new_state depends on crtc_atomic_func && !ignores_new_state @ identifier crtc_atomic_func.func; identifier crtc, new_state; @@ int func(struct drm_crtc *crtc, struct drm_crtc_state *new_state) { + struct drm_crtc_state *new_state = drm_atomic_get_new_crtc_state(state, crtc); ... } @ depends on crtc_atomic_func @ identifier crtc_atomic_func.func; expression E; type T; @@ int func(...) { ... - T state = E; + T crtc_state = E; <+... - state + crtc_state ...+> } @ depends on crtc_atomic_func @ identifier crtc_atomic_func.func; type T; @@ int func(...) { ... - T state; + T crtc_state; <+... - state + crtc_state ...+> } @ depends on crtc_atomic_func @ identifier crtc_atomic_func.func; identifier new_state; identifier crtc; @@ int func(struct drm_crtc *crtc, - struct drm_crtc_state *new_state + struct drm_atomic_state *state ) { ... } @@ identifier new_state; identifier crtc; @@ int vmw_du_crtc_atomic_check(struct drm_crtc *crtc, - struct drm_crtc_state *new_state + struct drm_atomic_state *state ) { + struct drm_crtc_state *new_state = drm_atomic_get_new_crtc_state(state, crtc); ... } @@ identifier new_state; identifier crtc; @@ int vmw_du_crtc_atomic_check(struct drm_crtc *crtc, - struct drm_crtc_state *new_state + struct drm_atomic_state *state ); @ include depends on adds_new_state @ @@ #include @ no_include depends on !include && adds_new_state @ @@ + #include #include Signed-off-by: Maxime Ripard Reviewed-by: Ville Syrjälä Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20201028123222.1732139-1-maxime@cerno.tech commit 1fe9bacab2ac5cca29b360e1032e6f7533fbdc78 Author: Laurent Vivier Date: Fri Oct 9 11:56:21 2020 +0200 m68k: Remove unused mach_max_dma_address This information is unused since the discontinuous memory support has been introduced in 2007. Fixes: 12d810c1b8c2 ("m68k: discontinuous memory support") Signed-off-by: Laurent Vivier Link: https://lore.kernel.org/r/20201009095621.833192-1-laurent@vivier.eu Signed-off-by: Geert Uytterhoeven commit 1e10cf448f841251053c7b379dfdf0ffa77790d7 Author: Arnd Bergmann Date: Thu Oct 8 14:34:04 2020 +0200 m68k: Avoid xchg() warning gcc warns about the value of xchg()/cmpxchg() being unused in some cases: net/core/filter.c: In function 'bpf_clear_redirect_map': arch/m68k/include/asm/cmpxchg.h:137:3: warning: value computed is not used [-Wunused-value] 106 | #define cmpxchg(ptr, o, n) cmpxchg_local((ptr), (o), (n)) net/core/filter.c:3595:4: note: in expansion of macro 'cmpxchg' 3595 | cmpxchg(&ri->map, map, NULL); Shut up that warning like we do on other architectures, by turning the macro into a statement expression. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20201008123429.1133896-1-arnd@arndb.de Signed-off-by: Geert Uytterhoeven commit 95f4f40a085d899e4fe3c5cbac2708368dbe4277 Author: Maxime Ripard Date: Mon Nov 2 11:50:50 2020 +0100 drm/nouveau/ttm: Add limits.h It seems that a recent commit broke the nouveau compilation when swiotlb is disabled (which is the case on our ARM defconfig for example). Daniel says """ Since the proper fix is maybe stuck in the usual "drm abuses swiotlb internals" bikeshed, maybe best if we push a fix to including limits.h in nouveau and call it done? """ So let's go down the simplest path to fix our build, and goes back to it later if needed. Link: https://patchwork.freedesktop.org/patch/397835/ Fixes: 4dbafbd30aef ("drm/nouveu: fix swiotlb include") Acked-by: Daniel Vetter Signed-off-by: Maxime Ripard commit d7ffc7d48e437c016a65eff6d156b39884ab2594 Author: Jernej Skrabec Date: Fri Oct 30 18:25:30 2020 +0100 arm64: dts: allwinner: h6: PineH64 model B: Add wifi PineH64 model B contains RTL8723CS wifi+bt combo module. Since bluetooth support is not yet squared away, only wifi is enabled for now. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Tested-by: Acked-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20201030172530.1096394-1-jernej.skrabec@siol.net commit c489573b5b6ce6442ad4658d9d5ec77839b91622 Merge: d23bce963e7f1 3cea11cd5e3b0 Author: Maxime Ripard Date: Mon Nov 2 11:17:54 2020 +0100 Merge drm/drm-next into drm-misc-next Daniel needs -rc2 in drm-misc-next to merge some patches Signed-off-by: Maxime Ripard commit 68299a42f84288537ee3420c431ac0115ccb90b1 Author: Tony Luck Date: Fri Oct 30 12:04:00 2020 -0700 x86/mce: Enable additional error logging on certain Intel CPUs The Xeon versions of Sandy Bridge, Ivy Bridge and Haswell support an optional additional error logging mode which is enabled by an MSR. Previously, this mode was enabled from the mcelog(8) tool via /dev/cpu, but userspace should not be poking at MSRs. So move the enabling into the kernel. [ bp: Correct the explanation why this is done. ] Suggested-by: Boris Petkov Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201030190807.GA13884@agluck-desk2.amr.corp.intel.com commit 52a70e641a1fe6b0dc3ff46a8498d778ce6b99de Author: Paul Kocialkowski Date: Sat Oct 31 19:21:31 2020 +0100 ARM: dts: sun8i-v3s: Add I2C1 PB pins description I2C1 can be exposed through PB pins in addition to PE pins on the V3s. Add the device-tree description for these pins. Signed-off-by: Paul Kocialkowski Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20201031182137.1879521-4-contact@paulk.fr commit 85f296433e6c417b27c4077ed3f9479596d9c623 Author: Matteo Scordino Date: Fri Oct 30 23:43:21 2020 +0000 ARM: dts: sun8i: V3/S3: Add UART1 pin definitions to the V3/S3 dtsi The Allwinner V3 and S3 can use PG6/7 as RX/TX for UART1. Since no other functions are assigned to those pins, they are a convenient choice for a debugging or application UART. This is specific to V3/S3 as the V3s's non-BGA package did not have those pins. Signed-off-by: Matteo Scordino Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20201030234325.5865-3-matteo.scordino@gmail.com commit ddc36a2da5c88579e58361a222064264efd64f02 Author: Matteo Scordino Date: Fri Oct 30 23:43:20 2020 +0000 dt-bindings: vendors: add Elimo Engineering vendor prefix Add elimo as vendor prefix for dt bindings, since we are adding a dtsi for a SoM and a dts for an SBC Signed-off-by: Matteo Scordino Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20201030234325.5865-2-matteo.scordino@gmail.com commit 8fba56b4cd53d6c588641db46d74a13d3c0d8602 Merge: aee9ddb1d3718 3cea11cd5e3b0 Author: Greg Kroah-Hartman Date: Mon Nov 2 10:04:07 2020 +0100 Merge 5.10-rc2 into usb-next We need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 83e63b2cc416904b50895eeee8d8e0d7ea0418fe Merge: c699e02d83c98 3cea11cd5e3b0 Author: Greg Kroah-Hartman Date: Mon Nov 2 10:03:12 2020 +0100 Merge 5.10-rc2 into staging-next We need the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 5649789d9706e864b9a2af2c057da5b1706ff3a0 Author: Eugeniu Rosca Date: Fri Oct 30 09:30:51 2020 +0100 dt-bindings: arm: renesas: Add R-Car M3-W+ ULCB with Kingfisher Document the use of the Kingfisher expansion board with the R-Car Starter Kit Pro equipped with an R-Car M3-W+ (aka M3-ES3.0) SoC. Inspired from v5.5 commit 24169f0a453754 ("dt-bindings: arm: renesas: Add R-Car M3-N ULCB with Kingfisher"). Suggested-by: Geert Uytterhoeven Signed-off-by: Eugeniu Rosca Link: https://lore.kernel.org/r/20201030083051.18752-4-erosca@de.adit-jv.com Signed-off-by: Geert Uytterhoeven commit 48a3d90adafc9ed92d19c93d011f17ec9001cc34 Merge: 3f7566f494783 3cea11cd5e3b0 Author: Greg Kroah-Hartman Date: Mon Nov 2 08:47:35 2020 +0100 Merge 5.10-rc2 into char-misc-next We need the fixes/changes in here as well. Signed-off-by: Greg Kroah-Hartman commit ef43f01ac06976b2aa2b17266d307bb1a4f7e6f9 Author: Viresh Kumar Date: Thu Oct 22 12:12:27 2020 +0530 opp: Always add entries in dev_list with opp_table->lock held The readers of dev_list expect the updates to it to take place from within the opp_table->lock and this is missing in the case where the dev_list is updated for already managed OPPs. Fix that by calling _add_opp_dev() from there and remove the now unused _add_opp_dev_unlocked() callback. While at it, also reduce the length of the critical section in _add_opp_dev(). Signed-off-by: Viresh Kumar commit e643bd3809d4763cb85950782508f9a1ae78a8ac Author: Peter Ujfalusi Date: Sun Oct 25 12:10:23 2020 -0700 soc: ti: k3-socinfo: Add entry for AM64X SoC family It's JTAG PARTNO is 0xBB38. Signed-off-by: Peter Ujfalusi Signed-off-by: Santosh Shilimkar commit 8c42379e40e2db4199ceeb6a6ef9fff73ff132cf Author: Peter Ujfalusi Date: Sun Oct 25 12:10:22 2020 -0700 soc: ti: k3-ringacc: Use correct device for allocation in RING mode In RING mode the ringacc does not access the ring memory. In this access mode the ringacc coherency does not have meaning. If the ring is configured in RING mode, then the ringacc itself will not access to the ring memory. Only the requester (user) of the ring is going to read/write to the memory. Extend the ring configuration parameters with a device pointer to be used for DMA API when the ring is configured in RING mode. Extending the ring configuration struct will allow per ring selection of device to be used for allocation, thus allowing per ring coherency. To avoid regression, fall back to use the ringacc dev in case the alloc_dev is not provided. Signed-off-by: Peter Ujfalusi Reviewed-by: Grygorii Strashko Signed-off-by: Santosh Shilimkar commit fed7552f1e69296461fca62ebaa0bb5a06fec0df Author: Peter Ujfalusi Date: Sun Oct 25 12:10:07 2020 -0700 firmware: ti_sci: rm: Remove unused config() from ti_sci_rm_ringacc_ops The ringacc driver has been converted to use the new set_cfg function to configure the ring, the old config ops can be removed. Signed-off-by: Peter Ujfalusi Reviewed-by: Grygorii Strashko Signed-off-by: Santosh Shilimkar commit bb49ca00bd8a42c327c23a21a46e86142b5734a2 Author: Peter Ujfalusi Date: Sun Oct 25 12:10:07 2020 -0700 soc: ti: k3-ringacc: Use the ti_sci set_cfg callback for ring configuration Switch to the new set_cfg to configure the ring. Signed-off-by: Peter Ujfalusi Reviewed-by: Grygorii Strashko Signed-off-by: Santosh Shilimkar commit 3c2017536f3a122bf246cc87f9327e9ec138db92 Author: Peter Ujfalusi Date: Sun Oct 25 12:10:06 2020 -0700 firmware: ti_sci: rm: Add new ops for ring configuration The sysfw ring configuration message has been extended to include virtid and asel value for the ring. Add the ASEL_VALID to TI_SCI_MSG_VALUE_RM_ALL_NO_ORDER as it is required for DMA rings. Instead of extending the current .config() ops - which would need same patch change in the ringacc driver - add ti_sci_msg_rm_ring_cfg struct and a new ops using it to configure the ring. This will allow easy update path in case new members are added for the ring configuration. Signed-off-by: Peter Ujfalusi Reviewed-by: Grygorii Strashko Signed-off-by: Santosh Shilimkar commit 4d8ddf673a420aa25668eceeb4fbf33e2521fdf2 Author: Peter Ujfalusi Date: Sun Oct 25 12:10:05 2020 -0700 firmware: ti_sci: rm: Remove ring_get_config support The ring_get_cfg (0x1111 message) is not used and it is not supported by sysfw for a long time. Signed-off-by: Peter Ujfalusi Reviewed-by: Grygorii Strashko Signed-off-by: Santosh Shilimkar commit ce1feed58534d8489afb4900bee75dff15d950e0 Author: Peter Ujfalusi Date: Sun Oct 25 12:10:05 2020 -0700 firmware: ti_sci: rm: Add support for extended_ch_type for tx channel Sysfw added 'extended_ch_type' to the tx_ch_cfg_req message which should be used when BCDMA block copy channels are configured: extended_ch_type = 0 : the channel is split tx channel (tchan) extended_ch_type = 1 : the channel is block copy channel (bchan) Signed-off-by: Peter Ujfalusi Signed-off-by: Santosh Shilimkar commit f5087f68e7a55fe7f8f257283ae8aecf1b8c3a76 Author: Peter Ujfalusi Date: Sun Oct 25 12:10:04 2020 -0700 soc: ti: ti_sci_inta_msi: Add support for second range in resource ranges Allocate MSI entries for both first and second range if they are valid Signed-off-by: Peter Ujfalusi Signed-off-by: Santosh Shilimkar commit 519c5c0c558b529f835c9bb30f9a1eb2034d585c Author: Peter Ujfalusi Date: Sun Oct 25 12:10:03 2020 -0700 firmware: ti_sci: rm: Add support for second resource range Sysfw added support for a second range in the resource range API to be able to describe complex allocations mainly for DMA channels. Update the ti_sci part to consider the second range as well. Signed-off-by: Peter Ujfalusi Signed-off-by: Santosh Shilimkar commit 967a020bd3deddf9a0af73aeb4d4b46d90030937 Author: Peter Ujfalusi Date: Sun Oct 25 12:10:03 2020 -0700 firmware: ti_sci: Use struct ti_sci_resource_desc in get_range ops Use the ti_sci_resource_desc directly and update it's start and num members directly instead of requiring individual parameters for them. This will allow easy extension of the RM parameters without changing API. Signed-off-by: Peter Ujfalusi Signed-off-by: Santosh Shilimkar commit 1c552e08b29895d31bbf82bdb549811cfde31db4 Author: Peter Ujfalusi Date: Sun Oct 25 12:10:02 2020 -0700 firmware: ti_sci: rm: Add support for tx_tdtype parameter for tx channel The system controller's resource manager have support for configuring the TDTYPE of TCHAN_CFG register on j721e. With this parameter the teardown completion can be controlled: TDTYPE == 0: Return without waiting for peer to complete the teardown TDTYPE == 1: Wait for peer to complete the teardown Signed-off-by: Peter Ujfalusi Reviewed-by: Tero Kristo Tested-by: Keerthy Reviewed-by: Grygorii Strashko Signed-off-by: Santosh Shilimkar commit 3c0b976bf20d236c57adcefa80f86a0a1d737727 Author: Jordan Niethe Date: Wed Oct 14 18:28:36 2020 +1100 powerpc/64: Set up a kernel stack for secondaries before cpu_restore() Currently in generic_secondary_smp_init(), cur_cpu_spec->cpu_restore() is called before a stack has been set up in r1. This was previously fine as the cpu_restore() functions were implemented in assembly and did not use a stack. However commit 5a61ef74f269 ("powerpc/64s: Support new device tree binding for discovering CPU features") used __restore_cpu_cpufeatures() as the cpu_restore() function for a device-tree features based cputable entry. This is a C function and hence uses a stack in r1. generic_secondary_smp_init() is entered on the secondary cpus via the primary cpu using the OPAL call opal_start_cpu(). In OPAL, each hardware thread has its own stack. The OPAL call is ran in the primary's hardware thread. During the call, a job is scheduled on a secondary cpu that will start executing at the address of generic_secondary_smp_init(). Hence the value that will be left in r1 when the secondary cpu enters the kernel is part of that secondary cpu's individual OPAL stack. This means that __restore_cpu_cpufeatures() will write to that OPAL stack. This is not horribly bad as each hardware thread has its own stack and the call that enters the kernel from OPAL never returns, but it is still wrong and should be corrected. Create the temp kernel stack before calling cpu_restore(). As noted by mpe, for a kexec boot, the secondary CPUs are released from the spin loop at address 0x60 by smp_release_cpus() and then jump to generic_secondary_smp_init(). The call to smp_release_cpus() is in setup_arch(), and it comes before the call to emergency_stack_init(). emergency_stack_init() allocates an emergency stack in the PACA for each CPU. This address in the PACA is what is used to set up the temp kernel stack in generic_secondary_smp_init(). Move releasing the secondary CPUs to after the PACAs have been allocated an emergency stack, otherwise the PACA stack pointer will contain garbage and hence the temp kernel stack created from it will be broken. Fixes: 5a61ef74f269 ("powerpc/64s: Support new device tree binding for discovering CPU features") Signed-off-by: Jordan Niethe Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201014072837.24539-1-jniethe5@gmail.com commit dbb60031dd0c2b85f10ce4c12ae604c28d3aaca4 Author: Arnd Bergmann Date: Mon Oct 26 22:00:32 2020 +0100 drm/amdgpu: fix build_coefficients() argument gcc -Wextra warns about a function taking an enum argument being called with a bool: drivers/gpu/drm/amd/amdgpu/../display/modules/color/color_gamma.c: In function 'apply_degamma_for_user_regamma': drivers/gpu/drm/amd/amdgpu/../display/modules/color/color_gamma.c:1617:29: warning: implicit conversion from 'enum ' to 'enum dc_transfer_func_predefined' [-Wenum-conversion] 1617 | build_coefficients(&coeff, true); It appears that a patch was added using the old calling conventions after the type was changed, and the value should actually be 0 (TRANSFER_FUNCTION_SRGB) here instead of 1 (true). Fixes: 55a01d4023ce ("drm/amd/display: Add user_regamma to color module") Reviewed-by: Harry Wentland Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher commit a10aad137326d137a969fc6cc3555992b99ff9fc Author: Veerabadhran Gopalakrishnan Date: Thu Oct 29 19:59:46 2020 +0530 amd/amdgpu: Disable VCN DPG mode for Picasso Concurrent operation of VCN and JPEG decoder in DPG mode is causing ring timeout due to power state. Signed-off-by: Veerabadhran Gopalakrishnan Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 14f100c00f1e35e5890340d4c6a64bda5dff4320 Author: Vijay Khemka Date: Thu Aug 13 12:04:30 2020 -0700 ARM: dts: aspeed: tiogapass: Remove vuart Removed vuart for facebook tiogapass platform as it uses uart2 and uart3 pin with aspeed uart routing feature. Signed-off-by: Vijay Khemka Reviewed-by: Joel Stanley Fixes: ffdbf494821d ("ARM: dts: aspeed: tiogapass: Enable VUART") Link: https://lore.kernel.org/r/20200813190431.3331026-1-vijaykhemka@fb.com Signed-off-by: Joel Stanley commit a0b21e0ad29420b04911a98d360b9586168eeae5 Author: Robin Murphy Date: Mon Oct 26 12:48:37 2020 +0000 drm/msm: Add missing stub definition DRM_MSM fails to build with DRM_MSM_DP=n; add the missing stub. Signed-off-by: Robin Murphy Reviewed-by: Rob Clark Fixes: 8ede2ecc3e5e ("drm/msm/dp: Add DP compliance tests on Signed-off-by: Rob Clark commit 6400a8e886c6a3ee0cfcbcdc0867a3e91186683c Author: Viresh Kumar Date: Wed Oct 28 12:14:22 2020 +0530 drm/msm: Unconditionally call dev_pm_opp_of_remove_table() dev_pm_opp_of_remove_table() doesn't report any errors when it fails to find the OPP table with error -ENODEV (i.e. OPP table not present for the device). And we can call dev_pm_opp_of_remove_table() unconditionally here. While at it, also create a label to put clkname. Signed-off-by: Viresh Kumar Signed-off-by: Rob Clark commit 363bcec913d82703be6ae0ad5fe5488532f5cdac Author: Rob Clark Date: Mon Oct 19 14:10:53 2020 -0700 drm/msm/atomic: Convert to per-CRTC kthread_work Use a SCHED_FIFO kthread_worker for async atomic commits. We have a hard deadline if we don't want to miss a frame. Signed-off-by: Rob Clark commit ffe71111f4ab5aa670502f190d0b7fe10edd1784 Author: Rob Clark Date: Mon Oct 19 14:10:52 2020 -0700 drm/msm/kms: Update msm_kms_init/destroy Add msm_kms_destroy() and add err return from msm_kms_init(). Prep work for next patch. Signed-off-by: Rob Clark commit 7e688294c61bdcb7468a71f7bb5a9c2d42fbd2a8 Author: Rob Clark Date: Mon Oct 19 14:10:51 2020 -0700 drm/msm/gpu: Convert retire/recover work to kthread_worker Signed-off-by: Rob Clark commit cb21f3f882ad12811331c1067b9acfc4dd359d3f Author: Rob Clark Date: Tue Oct 20 15:26:00 2020 -0700 drm/msm/atomic: Drop per-CRTC locks in reverse order lockdep dislikes seeing locks unwound in a non-nested fashion. Fixes: b3d91800d9ac ("drm/msm: Fix race condition in msm driver with async layer updates") Signed-off-by: Rob Clark Reviewed-by: Abhinav Kumar commit b3d91800d9ac35014e0349292273a6fa7938d402 Author: Krishna Manikandan Date: Fri Oct 16 19:40:43 2020 +0530 drm/msm: Fix race condition in msm driver with async layer updates When there are back to back commits with async cursor update, there is a case where second commit can program the DPU hw blocks while first didn't complete flushing config to HW. Synchronize the compositions such that second commit waits until first commit flushes the composition. This change also introduces per crtc commit lock, such that commits on different crtcs are not blocked by each other. Changes in v2: - Use an array of mutexes in kms to handle commit lock per crtc. (Rob Clark) Changes in v3: - Add wrapper functions to handle lock and unlock of commit_lock for each crtc. (Rob Clark) Signed-off-by: Krishna Manikandan Reviewed-by: Rob Clark Signed-off-by: Rob Clark commit a3c089b9cf277304497522f231c2c03f7f8bb2fd Author: Tom Rix Date: Mon Oct 19 10:28:24 2020 -0700 iio: remove unneeded break A break is not needed if it is preceded by a return Signed-off-by: Tom Rix Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20201019172824.32166-1-trix@redhat.com Signed-off-by: Jonathan Cameron commit d884da1a75489e10ccf65fdca41ce8d917bcfbe1 Author: Vaishnav M A Date: Mon Oct 19 02:05:52 2020 +0530 iio:light:tsl2563 use generic fw accessors Replace of_property_read_u32() with device_property_read_u32(), when reading the amstaos,cover-comp-gain.This opens up the possibility of passing the properties during platform instantiation of the device by a suitable populated struct property_entry. Additionally, a minor change in logic is added to remove the of_node present check. Signed-off-by: Vaishnav M A Link: https://lore.kernel.org/r/20201018203552.GA816421@ubuntu Signed-off-by: Jonathan Cameron commit 41a4b8f13a39f846747f5cffc58c315e72a29606 Author: Vaishnav M A Date: Mon Oct 19 01:23:57 2020 +0530 iio: light: vcnl4035 add i2c_device_id Add i2c_device_id table for the vcnl4035 driver, enabling device instantiation using i2c_new_client_device() or from userspace in cases where device-tree based description is not possible now, like device(s) on a gbphy i2c adapter created by greybus. Signed-off-by: Vaishnav M A Link: https://lore.kernel.org/r/20201018195357.GA814864@ubuntu Signed-off-by: Jonathan Cameron commit 8bb97bab3f13f396f53d32defd4f267309733884 Author: Vaishnav M A Date: Mon Oct 19 01:21:02 2020 +0530 iio: proximity: vl53l0x-i2c add i2c_device_id Add i2c_device_id table for the vl53l0x-i2c driver, helps in device instantiation using i2c_new_client_device() or from userspace in cases where device-tree based description is not possible now, like device(s) on a gbphy i2c adapter created by greybus. Signed-off-by: Vaishnav M A Link: https://lore.kernel.org/r/20201018195102.GA814713@ubuntu Signed-off-by: Jonathan Cameron commit b3b3ef6a082fceeab38d2a28f69bc7e69ef80f92 Author: Tom Rix Date: Sat Oct 31 06:43:19 2020 -0700 iio: magnetometer: bmc150: remove unneeded semicolon A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20201031134319.2134314-1-trix@redhat.com Signed-off-by: Jonathan Cameron commit 3516ebc8a400fc77957059ecc369850b4e04eacf Author: Tom Rix Date: Sat Oct 31 06:45:06 2020 -0700 iio: pressure: bmp280: remove unneeded semicolon A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20201031134506.2134698-1-trix@redhat.com Signed-off-by: Jonathan Cameron commit 117ca1f8920cf4087bf82f44bd2a51b49d6aae63 Author: Pablo Neira Ayuso Date: Sat Oct 31 11:24:08 2020 +0100 netfilter: nft_reject_inet: allow to use reject from inet ingress Enhance validation to support for reject from inet ingress chains. Note that, reject from inet ingress and netdev ingress differ. Reject packets from inet ingress are sent through ip_local_out() since inet reject emulates the IP layer receive path. So the reject packet follows to classic IP output and postrouting paths. The reject action from netdev ingress assumes the packet not yet entered the IP layer, so the reject packet is sent through dev_queue_xmit(). Therefore, reject packets from netdev ingress do not follow the classic IP output and postrouting paths. Signed-off-by: Pablo Neira Ayuso commit 225c59b9235a421cdb219be5fbc13126a49714a6 Author: Alexandru Stan Date: Wed Oct 21 22:04:43 2020 -0700 ARM: dts: rockchip: Remove 0 point from brightness-levels on rk3288-veyron The extra 0 only adds one point in the userspace visible range, so this change is almost a noop with the current driver behavior. We don't need the 0% point, userspace seems to handle this just fine because it uses the bl_power property to turn off the display. Furthermore after adding "backlight: pwm_bl: Fix interpolation" patch, the backlight interpolation will work a little differently. So we need to preemptively remove the 0-3 segment since otherwise we would have a 252 long interpolation that would slowly go between 0 and 3, looking really bad in userspace. So it's almost a noop/cleanup now, but it will be required in the future. Signed-off-by: Alexandru Stan Reviewed-by: Douglas Anderson Acked-by: Daniel Thompson Link: https://lore.kernel.org/r/20201021220404.v3.1.I96b8d872ec51171f19274e43e96cadc092881271@changeid Signed-off-by: Heiko Stuebner commit 35b7ee34abdb722192635528f162ddd8cac25765 Author: Andrew Lunn Date: Sat Oct 31 19:21:44 2020 +0100 netfilter: nftables: Add __printf() attribute nft_request_module calls vsnprintf() using parameters passed to it. Make the function with __printf() attribute so the compiler can check the format and arguments. Signed-off-by: Andrew Lunn Signed-off-by: Pablo Neira Ayuso commit d23bce963e7f17738374d700f0dc5464c5f7cba2 Author: Linus Walleij Date: Fri Oct 30 01:28:50 2020 +0100 fbdev/sh_mobile: Drop unused include The driver includes but doesn't use any symbols from this file. Cc: Magnus Damm Cc: Geert Uytterhoeven Cc: linux-renesas-soc@vger.kernel.org Signed-off-by: Linus Walleij Reviewed-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven # on r8a77440/armadillo, where this is the last piece of non-DT support. Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201030002850.6495-1-linus.walleij@linaro.org commit f2644bd7413c8f2fcef208c576e83335709c5120 Author: Colin Ian King Date: Thu Oct 29 22:40:07 2020 +0000 clk: imx: remove redundant assignment to pointer np Pointer np is being initialized with a value that is never read and it is being updated with a value later on. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Reviewed-by: Dong Aisheng Signed-off-by: Shawn Guo commit 8404c66140e209794b15ee5529d4559334b3d364 Author: Tom Rix Date: Tue Oct 27 11:57:56 2020 -0700 clk: imx: remove unneeded semicolon A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix Reviewed-by: Abel Vesa Signed-off-by: Shawn Guo commit 7c685a0f809b0ccbc9201ff4395a716db4e43797 Author: Oleksij Rempel Date: Thu Oct 22 12:27:31 2020 +0200 dt-bindings: vendor-prefixes: Add an entry for Van der Laan b.v. Add "vdl" entry for Van der Laan b.v.: https://www.teamvdl.nl/ Signed-off-by: Oleksij Rempel Acked-by: Rob Herring Signed-off-by: Shawn Guo commit da2445049fafff0274d2a596a45e86021b01779b Author: Serge Semin Date: Tue Oct 20 14:59:57 2020 +0300 arm64: dts: layerscape: Harmonize DWC USB3 DT nodes name In accordance with the DWC USB3 bindings the corresponding node name is suppose to comply with the Generic USB HCD DT schema, which requires the USB nodes to have the name acceptable by the regexp: "^usb(@.*)?" . Make sure the "snps,dwc3"-compatible nodes are correctly named. Signed-off-by: Serge Semin Acked-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit f1748a1f3d49d85d57ba75065ad79ebecf728cbe Author: Adam Ford Date: Mon Oct 19 12:45:25 2020 -0500 arm64: defconfig: Enable ASRC and EASRC The i.MX8M Nano supports the EASRC driver, and it requires ASRC. Enable both of them as modules. Signed-off-by: Adam Ford Signed-off-by: Shawn Guo commit c43fd36f7fec6c227c5e8a8ddd7d3fe97472182f Author: Vladimir Oltean Date: Sun Nov 1 02:08:45 2020 +0200 net: bridge: mcast: fix stub definition of br_multicast_querier_exists The commit cited below has changed only the functional prototype of br_multicast_querier_exists, but forgot to do that for the stub prototype (the one where CONFIG_BRIDGE_IGMP_SNOOPING is disabled). Fixes: 955062b03fa6 ("net: bridge: mcast: add support for raw L2 multicast groups") Reported-by: kernel test robot Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20201101000845.190009-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 1c470b53ece5833193a5b28b6e89cb1531c1de8c Author: Heiner Kallweit Date: Thu Oct 29 19:02:53 2020 +0100 r8169: use pm_runtime_put_sync in rtl_open error path We can safely runtime-suspend the chip if rtl_open() fails. Therefore switch the error path to use pm_runtime_put_sync() as well. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/aa093b1e-f295-5700-1cb7-954b54dd8f17@gmail.com Signed-off-by: Jakub Kicinski commit 3a689e34973e8717cd57991c6fcf527dc56062b5 Author: Heiner Kallweit Date: Thu Oct 29 18:56:06 2020 +0100 r8169: remove unneeded memory barrier in rtl_tx tp->dirty_tx isn't changed outside rtl_tx(). Therefore I see no need to guarantee a specific order of reading tp->dirty_tx and tp->cur_tx. Having said that we can remove the memory barrier. In addition use READ_ONCE() when reading tp->cur_tx because it can change in parallel to rtl_tx(). Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/2264563a-fa9e-11b0-2c42-31bc6b8e2790@gmail.com Signed-off-by: Jakub Kicinski commit c24672cf59b6f7da102833569fa8455132b2b8c2 Author: Armin Wolf Date: Thu Oct 29 15:33:57 2020 +0100 ne2k: Fix Typo in RW-Bugfix Correct a typo in ne.c and ne2k-pci.c which prevented activation of the RW-Bugfix. Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20201029143357.7008-1-W_Armin@gmx.de Signed-off-by: Jakub Kicinski commit e4e143e26ce8f5f57c60a994bdc63d0ddce3a823 Author: Parshuram Thombare Date: Thu Oct 29 13:47:07 2020 +0100 net: macb: add support for high speed interface This patch adds support for 10GBASE-R interface to the linux driver for Cadence's ethernet controller. This controller has separate MAC's and PCS'es for low and high speed paths. High speed PCS supports 100M, 1G, 2.5G, 5G and 10G through rate adaptation implementation. However, since it doesn't support auto negotiation, linux driver is modified to support 10GBASE-R instead of USXGMII. Signed-off-by: Parshuram Thombare Link: https://lore.kernel.org/r/1603975627-18338-1-git-send-email-pthombar@cadence.com Signed-off-by: Jakub Kicinski commit 3752404a68e86d82b97a61aba78f6d6afae48549 Author: Karsten Graul Date: Sat Oct 31 19:19:38 2020 +0100 net/smc: improve return codes for SMC-Dv2 To allow better problem diagnosis the return codes for SMC-Dv2 are improved by this patch. A few more CLC DECLINE codes are defined and sent to the peer when an SMC connection cannot be established. There are now multiple SMC variations that are offered by the client and the server may encounter problems to initialize all of them. Because only one diagnosis code can be sent to the client the decision was made to send the first code that was encountered. Because the server tries the variations in the order of importance (SMC-Dv2, SMC-D, SMC-R) this makes sure that the diagnosis code of the most important variation is sent. v2: initialize rc in smc_listen_v2_check(). Signed-off-by: Karsten Graul Link: https://lore.kernel.org/r/20201031181938.69903-1-kgraul@linux.ibm.com Signed-off-by: Jakub Kicinski commit cfb2cffafa2aa2f5bccb382138157866c6e767ce Merge: 1a02556086fc0 e2fb373038654 Author: Jakub Kicinski Date: Sat Oct 31 14:16:49 2020 -0700 Merge branch 'support-for-octeontx2-98xx-silcion' Subbaraya Sundeep says: ==================== Support for OcteonTx2 98xx silicon OcteonTx2 series of silicons have multiple variants, the 98xx variant has two network interface controllers (NIX blocks) each of which supports upto 100Gbps. Similarly 98xx supports two crypto blocks (CPT) to double the crypto performance. The current RVU drivers support a single NIX and CPT blocks, this patchset adds support for multiple blocks of same type to be active at the same time. Also the number of serdes controllers (CGX) have increased from three to five on 98xx. Each of the CGX block supports upto 4 physical interfaces depending on the serdes mode ie upto 20 physical interfaces. At a time each CGX block can be mapped to a single NIX. The HW configuration to map CGX and NIX blocks is done by firmware. NPC has two new interfaces added NIX1_RX and NIX1_TX similar to NIX0 interfaces. Also MCAM entries is increased from 4k to 16k. To support the 16k entries extended set is added in hardware which are at completely different register offsets. Fortunately new constant registers can be read to figure out the extended set is present or not. This patch set modifies existing AF and PF drivers in below order to support 98xx: - Prepare for supporting multiple blocks of same type. Functions which operate with block type to get or set resources count are modified to operate with block address - Manage allocating and freeing LFs from new NIX1 and CPT1 RVU blocks. - NIX block specific initialization and teardown for NIX1 - Based on the mapping set by Firmware, assign the NIX block LFs to a PF/VF. - Multicast entries context is setup for NIX1 along with NIX0 - NPC changes to support extended set of MCAM entries, counters and NIX1 interfaces to NPC. - All the mailbox changes required for the new blocks in 98xx. - Since there are more CGX links in 98xx the hardcoded LBK link value needed by netdev drivers is not sufficient any more. Hence AF consumers need to get the number of all links and calculate the LBK link. - Debugfs changes to display NIX1 contexts similar to NIX0 - Debugfs change to display mapping between CGX, NIX and PF. ==================== Link: https://lore.kernel.org/r/1603948549-781-1-git-send-email-sundeep.lkml@gmail.com Signed-off-by: Jakub Kicinski commit e2fb373038654133267f564e9b15f6f82e8d248e Author: Rakesh Babu Date: Thu Oct 29 10:45:49 2020 +0530 octeontx2-af: Display CGX, NIX and PF map in debugfs. Unlike earlier silicon variants, OcteonTx2 98xx silicon has 2 NIX blocks and each of the CGX is mapped to either of the NIX blocks. Each NIX block supports 100G. Mapping btw NIX blocks and CGX is done by firmware based on CGX speed config to have a maximum possible network bandwidth. Since the mapping is not fixed, it's difficult for a user to figure out. Hence added a debugfs entry which displays mapping between CGX LMAC, NIX block and RVU PF. Sample result of this entry :: ~# cat /sys/kernel/debug/octeontx2/rvu_pf_cgx_map PCI dev RVU PF Func NIX block CGX LMAC 0002:02:00.0 0x400 NIX0 CGX0 LMAC0 Signed-off-by: Rakesh Babu Signed-off-by: Sunil Goutham Signed-off-by: Subbaraya Sundeep Signed-off-by: Jakub Kicinski commit 0f3ce484af8d57f603902deb50d10adafd75a716 Author: Rakesh Babu Date: Thu Oct 29 10:45:48 2020 +0530 octeontx2-af: Display NIX1 also in debugfs If NIX1 block is also implemented then add a new directory for NIX1 in debugfs root. Stats of NIX1 block can be read/writen from/to the files in directory "/sys/kernel/debug/octeontx2/nix1/". Signed-off-by: Rakesh Babu Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Goutham Signed-off-by: Jakub Kicinski commit 8bcf5ced6526e1c4c8a2703f9ca9135fef7409d6 Author: Subbaraya Sundeep Date: Thu Oct 29 10:45:47 2020 +0530 octeontx2-pf: Calculate LBK link instead of hardcoding CGX links are followed by LBK links but number of CGX and LBK links varies between platforms. Hence get the number of links present in hardware from AF and use it to calculate LBK link number. Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Goutham Signed-off-by: Rakesh Babu Signed-off-by: Jakub Kicinski commit a84cdcea3b4feb46730c88454b5f85e828429c2b Author: Subbaraya Sundeep Date: Thu Oct 29 10:45:46 2020 +0530 octeontx2-af: Mbox changes for 98xx This patch puts together all mailbox changes for 98xx silicon: Attach -> Modify resource attach mailbox handler to request LFs from a block address out of multiple blocks of same type. If a PF/VF need LFs from two blocks of same type then attach mbox should be called twice. Example: struct rsrc_attach *attach; .. Allocate memory for message .. attach->cptlfs = 3; /* 3 LFs from CPT0 */ .. Send message .. .. Allocate memory for message .. attach->modify = 1; attach->cpt_blkaddr = BLKADDR_CPT1; attach->cptlfs = 2; /* 2 LFs from CPT1 */ .. Send message .. Detach -> Update detach mailbox and its handler to detach resources from CPT1 and NIX1 blocks. MSIX -> Updated the MSIX mailbox and its handler to return MSIX offsets for the new block CPT1. Free resources -> Update free_rsrc mailbox and its handler to return the free resources count of new blocks NIX1 and CPT1 Links -> Number of CGX,LBK and SDP links may vary between platforms. For example, in 98xx number of CGX and LBK links are more than 96xx. Hence the info about number of links present in hardware is useful for consumers to request link configuration properly. This patch sends this info in nix_lf_alloc_rsp. Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Goutham Signed-off-by: Rakesh Babu Signed-off-by: Jakub Kicinski commit 1c1935c9945d0a921f8565885b3581737564a5d9 Author: Subbaraya Sundeep Date: Thu Oct 29 10:45:45 2020 +0530 octeontx2-af: Add NIX1 interfaces to NPC On 98xx silicon, NPC block has additional mcam entries, counters and NIX1 interfaces. Extended set of registers are present for the new mcam entries and counters. This patch does the following: - updates the register accessing macros to use extended set if present. - configures the MKEX profile for NIX1 interfaces also. - updates mcam entry write functions to use assigned NIX0/1 interfaces for the PF/VF. Signed-off-by: Subbaraya Sundeep Signed-off-by: Rakesh Babu Signed-off-by: Sunil Goutham Signed-off-by: Jakub Kicinski commit 55efcc57140b637b97f1daa6309343650f7b45ba Author: Subbaraya Sundeep Date: Thu Oct 29 10:45:44 2020 +0530 octeontx2-af: Setup MCE context for assigned NIX Initialize MCE context for the assigned NIX0/1 block for a CGX mapped PF. Modified rvu_nix_aq_enq_inst function to work with nix_hw so that MCE contexts for both NIX blocks can be inited. Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Goutham Signed-off-by: Rakesh Babu Signed-off-by: Jakub Kicinski commit c5a73b632b901c4b07d156bb8a8a2c5517678f35 Author: Subbaraya Sundeep Date: Thu Oct 29 10:45:43 2020 +0530 octeontx2-af: Map NIX block from CGX connection Firmware configures NIX block mapping for all CGXs to achieve maximum throughput. This patch reads the configuration and create mapping between RVU PF and NIX blocks. And for LBK VFs assign NIX0 for even numbered VFs and NIX1 for odd numbered VFs. Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Goutham Signed-off-by: Rakesh Babu Signed-off-by: Jakub Kicinski commit 221f3dff2999de4c7599a83d6c53eaf668699d33 Author: Rakesh Babu Date: Thu Oct 29 10:45:42 2020 +0530 octeontx2-af: Initialize NIX1 block This patch modifies NIX functions to operate with nix_hw context so that existing functions can be used for both NIX0 and NIX1 blocks. And the NIX blocks present in the system are initialized during driver init and freed during exit. Signed-off-by: Rakesh Babu Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Goutham Signed-off-by: Jakub Kicinski commit 9932fb7250f74083ae9630b74b1e1fd0237ad9a3 Author: Rakesh Babu Date: Thu Oct 29 10:45:41 2020 +0530 octeontx2-af: Manage new blocks in 98xx AF manages the tasks of allocating, freeing LFs from RVU blocks to PF and VFs. With new NIX1 and CPT1 blocks in 98xx, this patch adds support for handling new blocks too. Co-developed-by: Subbaraya Sundeep Signed-off-by: Subbaraya Sundeep Signed-off-by: Rakesh Babu Signed-off-by: Sunil Goutham Signed-off-by: Jakub Kicinski commit cdd41e878526797df29903fe592d6a26b096ac7d Author: Subbaraya Sundeep Date: Thu Oct 29 10:45:40 2020 +0530 octeontx2-af: Update get/set resource count functions Since multiple blocks of same type are present in 98xx, modify functions which get resource count and which update resource count to work with individual block address instead of block type. Reviewed-by: Jesse Brandeburg Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Goutham Signed-off-by: Rakesh Babu Signed-off-by: Jakub Kicinski commit 1a02556086fc0eb16e0a0d09043e9ffb0e31c7db Author: Robert Hancock Date: Wed Oct 28 11:14:29 2020 -0600 net: axienet: Properly handle PCS/PMA PHY for 1000BaseX mode Update the axienet driver to properly support the Xilinx PCS/PMA PHY component which is used for 1000BaseX and SGMII modes, including properly configuring the auto-negotiation mode of the PHY and reading the negotiated state from the PHY. Signed-off-by: Robert Hancock Reviewed-by: Radhey Shyam Pandey Link: https://lore.kernel.org/r/20201028171429.1699922-1-robert.hancock@calian.com Signed-off-by: Jakub Kicinski commit 624251b4b5a0c3261ce0d3f9031e26c553e9e13a Author: Alex Elder Date: Sat Oct 31 10:15:24 2020 -0500 net: ipa: avoid a bogus warning The previous commit added support for IPA having up to six source and destination resources. But currently nothing uses more than four. (Five of each are used in a newer version of the hardware.) I find that in one of my build environments the compiler complains about newly-added code in two spots. Inspection shows that the warnings have no merit, but this compiler does not recognize that. ipa_main.c:457:39: warning: array index 5 is past the end of the array (which contains 4 elements) [-Warray-bounds] (and the same warning at line 483) We can make this warning go away by changing the number of elements in the source and destination resource limit arrays--now rather than waiting until we need it to support the newer hardware. This change was coming soon anyway; make it now to get rid of the warning. Signed-off-by: Alex Elder Link: https://lore.kernel.org/r/20201031151524.32132-1-elder@linaro.org Signed-off-by: Jakub Kicinski commit 023efb15aabe12af5160840065e89c1ae6ce8f31 Merge: 4e5d79bbe82eb f1d5470594ff6 Author: Jakub Kicinski Date: Sat Oct 31 10:23:03 2020 -0700 Merge branch 'net-add-functionality-to-net-core-byte-packet-counters-and-use-it-in-r8169' Heiner Kallweit says: ==================== net: add functionality to net core byte/packet counters and use it in r8169 This series adds missing functionality to the net core handling of byte/packet counters and statistics. The extensions are then used to remove private rx/tx byte/packet counters in r8169 driver. ==================== Link: https://lore.kernel.org/r/1fdb8ecd-be0a-755d-1d92-c62ed8399e77@gmail.com Signed-off-by: Jakub Kicinski commit f1d5470594ff685fba095e07ab8836078e44dd38 Author: Heiner Kallweit Date: Thu Oct 29 18:34:39 2020 +0100 r8169: remove no longer needed private rx/tx packet/byte counters After switching to the net core rx/tx byte/packet counters we can remove the now unused private version. Signed-off-by: Heiner Kallweit Signed-off-by: Jakub Kicinski commit 5e4cb4800168671c7d599416ded360bac6c4b319 Author: Heiner Kallweit Date: Thu Oct 29 18:33:46 2020 +0100 r8169: use struct pcpu_sw_netstats for rx/tx packet/byte counters Switch to the net core rx/tx byte/packet counter infrastructure. This simplifies the code, only small drawback is some memory overhead because we use just one queue, but allocate the counters per cpu. Signed-off-by: Heiner Kallweit Signed-off-by: Jakub Kicinski commit 81b01894d792db8d4746c9c1b39c6e2a94fa0a04 Author: Heiner Kallweit Date: Thu Oct 29 18:31:21 2020 +0100 net: core: add devm_netdev_alloc_pcpu_stats We have netdev_alloc_pcpu_stats(), and we have devm_alloc_percpu(). Add a managed version of netdev_alloc_pcpu_stats, e.g. for allocating the per-cpu stats in the probe() callback of a driver. It needs to be a macro for dealing properly with the type argument. Signed-off-by: Heiner Kallweit Signed-off-by: Jakub Kicinski commit d3fd65484c78102bac92f176c53537a7691a38b2 Author: Heiner Kallweit Date: Thu Oct 29 18:29:59 2020 +0100 net: core: add dev_sw_netstats_tx_add Add dev_sw_netstats_tx_add(), complementing already existing dev_sw_netstats_rx_add(). Other than dev_sw_netstats_rx_add allow to pass the number of packets as function argument. Signed-off-by: Heiner Kallweit Signed-off-by: Jakub Kicinski commit 4e5d79bbe82eb172641f07ebdd2a62f09520e422 Merge: 68bb4665a2ce1 beca92820dc4f Author: Jakub Kicinski Date: Sat Oct 31 09:55:44 2020 -0700 Merge branch 'in_interrupt-cleanup-part-2' Sebastian Andrzej Siewior says: ==================== in_interrupt() cleanup, part 2 in the discussion about preempt count consistency across kernel configurations: https://lore.kernel.org/r/20200914204209.256266093@linutronix.de/ Linus clearly requested that code in drivers and libraries which changes behaviour based on execution context should either be split up so that e.g. task context invocations and BH invocations have different interfaces or if that's not possible the context information has to be provided by the caller which knows in which context it is executing. This includes conditional locking, allocation mode (GFP_*) decisions and avoidance of code paths which might sleep. In the long run, usage of 'preemptible, in_*irq etc.' should be banned from driver code completely. This is part two addressing remaining drivers except for orinoco-usb. ==================== Cherry picking only Ethernet changes. Link: https://lore.kernel.org/r/20201027225454.3492351-1-bigeasy@linutronix.de Signed-off-by: Jakub Kicinski commit beca92820dc4fd6f2413420c9828b586a1e77df5 Author: Sebastian Andrzej Siewior Date: Tue Oct 27 23:54:44 2020 +0100 net: tlan: Replace in_irq() usage The driver uses in_irq() to determine if the tlan_priv::lock has to be acquired in tlan_mii_read_reg() and tlan_mii_write_reg(). The interrupt handler acquires the lock outside of these functions so the in_irq() check is meant to prevent a lock recursion deadlock. But this check is incorrect when interrupt force threading is enabled because then the handler runs in thread context and in_irq() correctly returns false. The usage of in_*() in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be seperated or the context be conveyed in an argument passed by the caller, which usually knows the context. tlan_set_timer() has this conditional as well, but this function is only invoked from task context or the timer callback itself. So it always has to lock and the check can be removed. tlan_mii_read_reg(), tlan_mii_write_reg() and tlan_phy_print() are invoked from interrupt and other contexts. Split out the actual function body into helper variants which are called from interrupt context and make the original functions wrappers which acquire tlan_priv::lock unconditionally. Signed-off-by: Sebastian Andrzej Siewior Cc: Samuel Chessman Signed-off-by: Jakub Kicinski commit dc5e8bfcd12eec8032be83b334896c103cdef1aa Author: Sebastian Andrzej Siewior Date: Tue Oct 27 23:54:42 2020 +0100 net: forcedeth: Replace context and lock check with a lockdep_assert() nv_update_stats() triggers a WARN_ON() when invoked from hard interrupt context because the locks in use are not hard interrupt safe. It also has an assert_spin_locked() which was the lock check before the lockdep era. Lockdep has way broader locking correctness checks and covers both issues, so replace the warning and the lock assert with lockdep_assert_held(). Signed-off-by: Sebastian Andrzej Siewior Cc: Rain River Cc: Zhu Yanjun Signed-off-by: Jakub Kicinski commit 5ce7f3f46f6b4a01dd2e2e7230351087034d0d1b Author: Sebastian Andrzej Siewior Date: Tue Oct 27 23:54:41 2020 +0100 net: neterion: s2io: Replace in_interrupt() for context detection wait_for_cmd_complete() uses in_interrupt() to detect whether it is safe to sleep or not. The usage of in_interrupt() in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be seperated or the context be conveyed in an argument passed by the caller, which usually knows the context. in_interrupt() also is only partially correct because it fails to chose the correct code path when just preemption or interrupts are disabled. Add an argument 'may_block' to both functions and adjust the callers to pass the context information. The following call chains which end up invoking wait_for_cmd_complete() were analyzed to be safe to sleep: s2io_card_up() s2io_set_multicast() init_nic() init_tti() s2io_close() do_s2io_delete_unicast_mc() do_s2io_add_mac() s2io_set_mac_addr() do_s2io_prog_unicast() do_s2io_add_mac() s2io_reset() do_s2io_restore_unicast_mc() do_s2io_add_mc() do_s2io_add_mac() s2io_open() do_s2io_prog_unicast() do_s2io_add_mac() The following call chains which end up invoking wait_for_cmd_complete() were analyzed to be safe to sleep: __dev_set_rx_mode() s2io_set_multicast() s2io_txpic_intr_handle() s2io_link() init_tti() Add a may_sleep argument to wait_for_cmd_complete(), s2io_set_multicast() and init_tti() and hand the context information in from the call sites. Signed-off-by: Sebastian Andrzej Siewior Cc: Jon Mason Signed-off-by: Jakub Kicinski commit 3a096c2bda7d2f0c0866d466447c41bc4b8ecdec Author: Mauro Carvalho Chehab Date: Fri Oct 23 18:33:32 2020 +0200 iio: fix a kernel-doc markup A function has a different name between their prototype and its kernel-doc markup. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/46622c3bdcffb76e79719f0fe5011c2952960b32.1603469755.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Cameron commit 7f96027cc454e0d2b13938b68c1e213926eca560 Author: Tom Rix Date: Tue Oct 27 13:08:53 2020 -0700 iio: adc: at91-sama5d2_adc: remove unneeded semicolon A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20201027200853.1596699-1-trix@redhat.com Signed-off-by: Jonathan Cameron commit 4a6261c36da770369a7383c2455d54addb1a7c36 Author: Tom Rix Date: Tue Oct 27 13:11:28 2020 -0700 iio/adc: ingenic: remove unneeded semicolon A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20201027201128.1597230-1-trix@redhat.com Signed-off-by: Jonathan Cameron commit 691f453951c4af9a5dd3a4f75f4860b997e73c3a Author: Tom Rix Date: Tue Oct 27 13:14:36 2020 -0700 iio: light: apds9960: remove unneeded semicolon A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix Acked-by: Matt Ranostay Link: https://lore.kernel.org/r/20201027201436.1597726-1-trix@redhat.com Signed-off-by: Jonathan Cameron commit 675cb4ad1b9e431800bf2ffc49547ca048670257 Author: Jonathan Cameron Date: Sun Aug 9 12:17:47 2020 +0100 dt-bindings: iio: adc: ti,adc084s021 yaml conversion Simple conversion. Added the #io-channel-cells optional property to allow for consumer bindings if appropriate on a given board. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Mårten Lindahl Link: https://lore.kernel.org/r/20200809111753.156236-8-jic23@kernel.org commit c95003d895bde422e0daedab868d487dc40f84d4 Author: Rui Miguel Silva Date: Wed Oct 14 11:49:26 2020 +0100 dt-bindings: fxas21002c: convert bindings to yaml Convert fxas21002c gyroscope sensor bindings documentation to yaml schema, remove the textual bindings document and update MAINTAINERS entry. Signed-off-by: Rui Miguel Silva Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201014104926.688666-1-rmfrfs@gmail.com Signed-off-by: Jonathan Cameron commit 5a76c474e8b940dc324eed4e10d486405c4110d7 Author: Guillaume Tucker Date: Mon Aug 10 13:22:08 2020 +0100 ARM: exynos: clear prefetch bits in default l2c_aux_val Clear the L310_AUX_CTRL_DATA_PREFETCH and L310_AUX_CTRL_INSTR_PREFETCH bits in the l2c_aux_val defaults for Exynos since they can now be set using the standard l2c2x0 devicetree bindings. Signed-off-by: Guillaume Tucker Link: https://lore.kernel.org/r/e44b5226f3ad1551459830c678ed183762d8e458.1597061474.git.guillaume.tucker@collabora.com Signed-off-by: Krzysztof Kozlowski commit 3ebc0ef06e4a78522e9d1488dcf61b7d8fcfb792 Author: Krzysztof Kozlowski Date: Fri Sep 11 16:33:42 2020 +0200 serial: s3c: Update path of Samsung S3C machine file Correct the path to Samsung S3C24xx machine file, mentioned in documentation. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200911143343.498-2-krzk@kernel.org commit 0f12999e27e087cd4c832760b59efd58c9642bb2 Author: Krzysztof Kozlowski Date: Fri Sep 11 16:33:41 2020 +0200 Documentation: Update paths of Samsung S3C machine files Documentation references Samsung S3C24xx and S3C64xx machine files in multiple places but the files were traveling around the kernel multiple times. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200911143343.498-1-krzk@kernel.org commit 3976ca101990ca11ddf51f38bec7b86c19d0ca6f Author: Jozsef Kadlecsik Date: Thu Oct 29 16:39:49 2020 +0100 netfilter: ipset: Expose the initval hash parameter to userspace It makes possible to reproduce exactly the same set after a save/restore. Signed-off-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso commit ccf0a4b7fc688561428290265e4effde41446668 Author: Jozsef Kadlecsik Date: Thu Oct 29 16:39:48 2020 +0100 netfilter: ipset: Add bucketsize parameter to all hash types The parameter defines the upper limit in any hash bucket at adding new entries from userspace - if the limit would be exceeded, ipset doubles the hash size and rehashes. It means the set may consume more memory but gives faster evaluation at matching in the set. Signed-off-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso commit a304ea7daf542b1e4a136be80bc973fc713e6ca6 Author: Jozsef Kadlecsik Date: Thu Oct 29 16:39:47 2020 +0100 netfilter: ipset: Support the -exist flag with the destroy command The -exist flag was supported with the create, add and delete commands. In order to gracefully handle the destroy command with nonexistent sets, the -exist flag is added to destroy too. Signed-off-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso commit 6bbb9ad36c93d3a422de862b78bd5330b44b3fa4 Author: Jose M. Guisado Gomez Date: Thu Oct 22 21:43:53 2020 +0200 netfilter: nft_reject: add reject verdict support for netdev Adds support for reject from ingress hook in netdev family. Both stacks ipv4 and ipv6. With reject packets supporting ICMP and TCP RST. This ability is required in devices that need to REJECT legitimate clients which traffic is forwarded from the ingress hook. Joint work with Laura Garcia. Signed-off-by: Jose M. Guisado Gomez Signed-off-by: Pablo Neira Ayuso commit 312ca575a50543a886a5dfa2af1e72aa6a5b601e Author: Jose M. Guisado Gomez Date: Thu Oct 22 21:43:52 2020 +0200 netfilter: nft_reject: unify reject init and dump into nft_reject Bridge family is using the same static init and dump function as inet. This patch removes duplicate code unifying these functions body into nft_reject.c so they can be reused in the rest of families supporting reject verdict. Signed-off-by: Jose M. Guisado Gomez Signed-off-by: Pablo Neira Ayuso commit fa538f7cf05aab61cd91e01c160d4a09c81b8ffe Author: Jose M. Guisado Gomez Date: Thu Oct 22 21:43:51 2020 +0200 netfilter: nf_reject: add reject skbuff creation helpers Adds reject skbuff creation helper functions to ipv4/6 nf_reject infrastructure. Use these functions for reject verdict in bridge family. Can be reused by all different families that support reject and will not inject the reject packet through ip local out. Signed-off-by: Jose M. Guisado Gomez Signed-off-by: Pablo Neira Ayuso commit 57412197faf18683dff057f225c304b2d6dbe129 Author: Adam Ford Date: Mon Oct 19 11:50:37 2020 -0500 arm64: dts: imx8mm: Add node for SPDIF The i.MX8M Mini can support SPDIF which is compatible to the IP used on the i.MX35. Add the node. Signed-off-by: Adam Ford Signed-off-by: Shawn Guo commit 3bd0788c43d97293a4630e2f36ab31520db16a4a Author: Adam Ford Date: Mon Oct 19 11:50:36 2020 -0500 arm64: dts: imx8mm: Add support for micfil The i.MX8M Mini has supports the MICFIL digital interface. It's a 16-bit audio signal from a PDM microphone bitstream. The driver is already in the kernel, but the node is missing. This patch adds the micfil node. Signed-off-by: Adam Ford Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 338d3c474b90738ef407bd0efca706118b0e06cc Author: Adam Ford Date: Mon Oct 19 11:50:38 2020 -0500 arm64: defconfig: Enable additional sound drivers on i.MX8M Mini The i.MX8M Mini has micfil and SPDIF support but the drivers are not being loaded. This patch updates the defconfig to add support for these drivers. Signed-off-by: Adam Ford Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 73db215119963918afe446c6cec76e2d421aa33c Author: Oleksij Rempel Date: Fri Oct 16 09:51:58 2020 +0200 ARM: dts: imx6/7: sync fsl,stop-mode with current flexcan driver After this patch we need 2 arguments less for the fsl,stop-mode property: | commit d9b081e3fc4bdc33e672dcb7bb256394909432fc | Author: Marc Kleine-Budde | Date: Sun Jun 14 21:09:20 2020 +0200 | | can: flexcan: remove ack_grp and ack_bit handling from driver | | Since commit: | | 048e3a34a2e7 can: flexcan: poll MCR_LPM_ACK instead of GPR ACK for stop mode acknowledgment | | the driver polls the IP core's internal bit MCR[LPM_ACK] as stop mode | acknowledge and not the acknowledgment on chip level. | | This means the 4th and 5th value of the property "fsl,stop-mode" isn't used | anymore. This patch removes the used "ack_gpr" and "ack_bit" from the driver. This patch removes the two last arguments, as they are not needed anymore. Signed-off-by: Oleksij Rempel Reviewed-by: Joakim Zhang Signed-off-by: Shawn Guo commit 68bb4665a2ce1338a74867e71bd5182f5b214a91 Merge: 0e761ac08fd8d e5d1f896fd1a3 Author: Jakub Kicinski Date: Fri Oct 30 18:26:01 2020 -0700 Merge branch 'l2-multicast-forwarding-for-ocelot-switch' Vladimir Oltean says: ==================== L2 multicast forwarding for Ocelot switch This series enables the mscc_ocelot switch to forward raw L2 (non-IP) mdb entries as configured by the bridge driver after this patch: https://patchwork.ozlabs.org/project/netdev/patch/20201028233831.610076-1-vladimir.oltean@nxp.com/ ==================== Link: https://lore.kernel.org/r/20201029022738.722794-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit e5d1f896fd1a347be6e58b873280798233bdf15e Author: Vladimir Oltean Date: Thu Oct 29 04:27:38 2020 +0200 net: mscc: ocelot: support L2 multicast entries There is one main difference in mscc_ocelot between IP multicast and L2 multicast. With IP multicast, destination ports are encoded into the upper bytes of the multicast MAC address. Example: to deliver the address 01:00:5E:11:22:33 to ports 3, 8, and 9, one would need to program the address of 00:03:08:11:22:33 into hardware. Whereas for L2 multicast, the MAC table entry points to a Port Group ID (PGID), and that PGID contains the port mask that the packet will be forwarded to. As to why it is this way, no clue. My guess is that not all port combinations can be supported simultaneously with the limited number of PGIDs, and this was somehow an issue for IP multicast but not for L2 multicast. Anyway. Prior to this change, the raw L2 multicast code was bogus, due to the fact that there wasn't really any way to test it using the bridge code. There were 2 issues: - A multicast PGID was allocated for each MDB entry, but it wasn't in fact programmed to hardware. It was dummy. - In fact we don't want to reserve a multicast PGID for every single MDB entry. That would be odd because we can only have ~60 PGIDs, but thousands of MDB entries. So instead, we want to reserve a multicast PGID for every single port combination for multicast traffic. And since we can have 2 (or more) MDB entries delivered to the same port group (and therefore PGID), we need to reference-count the PGIDs. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit bb8d53fd9414480e751ab7a8cf8ae75b12492048 Author: Vladimir Oltean Date: Thu Oct 29 04:27:37 2020 +0200 net: mscc: ocelot: make entry_type a member of struct ocelot_multicast This saves a re-classification of the MDB address on deletion. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit 728e69ae29b0fa7174674adc24065b343b5e4534 Author: Vladimir Oltean Date: Thu Oct 29 04:27:36 2020 +0200 net: mscc: ocelot: remove the "new" variable in ocelot_port_mdb_add It is Not Needed, a comment will suffice. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit ebbd860e251ac166c4d9064d36916dc63032cd06 Author: Vladimir Oltean Date: Thu Oct 29 04:27:35 2020 +0200 net: mscc: ocelot: use ether_addr_copy Since a helper is available for copying Ethernet addresses, let's use it. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit 7c313143133a368e7cf1233606d9597fbf6a4037 Author: Vladimir Oltean Date: Thu Oct 29 04:27:34 2020 +0200 net: mscc: ocelot: classify L2 mdb entries as LOCKED ocelot.h says: /* MAC table entry types. * ENTRYTYPE_NORMAL is subject to aging. * ENTRYTYPE_LOCKED is not subject to aging. * ENTRYTYPE_MACv4 is not subject to aging. For IPv4 multicast. * ENTRYTYPE_MACv6 is not subject to aging. For IPv6 multicast. */ We don't want the permanent entries added with 'bridge mdb' to be subject to aging. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit 0e761ac08fd8d53dfc53bb762748a61ffe3fe7b8 Author: Vladimir Oltean Date: Thu Oct 29 01:48:15 2020 +0200 net: bridge: explicitly convert between mdb entry state and port group flags When creating a new multicast port group, there is implicit conversion between the __u8 state member of struct br_mdb_entry and the unsigned char flags member of struct net_bridge_port_group. This implicit conversion relies on the fact that MDB_PERMANENT is equal to MDB_PG_FLAGS_PERMANENT. Let's be more explicit and convert the state to flags manually. Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20201028234815.613226-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 955062b03fa62b802a1ee34fbb04e39f7a70ae73 Author: Nikolay Aleksandrov Date: Thu Oct 29 01:38:31 2020 +0200 net: bridge: mcast: add support for raw L2 multicast groups Extend the bridge multicast control and data path to configure routes for L2 (non-IP) multicast groups. The uapi struct br_mdb_entry union u is extended with another variant, mac_addr, which does not change the structure size, and which is valid when the proto field is zero. To be compatible with the forwarding code that is already in place, which acts as an IGMP/MLD snooping bridge with querier capabilities, we need to declare that for L2 MDB entries (for which there exists no such thing as IGMP/MLD snooping/querying), that there is always a querier. Otherwise, these entries would be flooded to all bridge ports and not just to those that are members of the L2 multicast group. Needless to say, only permanent L2 multicast groups can be installed on a bridge port. Signed-off-by: Nikolay Aleksandrov Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20201028233831.610076-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 8ece853d128b486c06dd937cb1f1ed4d1de14486 Merge: dc956588d44b2 b61e8100dcfc7 Author: Jakub Kicinski Date: Fri Oct 30 17:43:03 2020 -0700 Merge branch 'sfc-ef100-tso-enhancements' Edward Cree says: ==================== sfc: EF100 TSO enhancements Support TSO over encapsulation (with GSO_PARTIAL), and over VLANs (which the code already handled but we didn't advertise). Also correct our handling of IPID mangling. I couldn't find documentation of exactly what shaped SKBs we can get given, so patch #2 is slightly guesswork, but when I tested TSO over both underlay and (VxLAN) overlay, the checksums came out correctly, so at least in those cases the edits we're making must be the right ones. Similarly, I'm not 100% sure I've correctly understood how FIXEDID and MANGLEID are supposed to work in patch #3. ==================== Link: https://lore.kernel.org/r/6e1ea05f-faeb-18df-91ef-572445691d89@solarflare.com Signed-off-by: Jakub Kicinski commit b61e8100dcfc79c65aeb78122f98b2b6f4bbeb08 Author: Edward Cree Date: Wed Oct 28 20:44:27 2020 +0000 sfc: advertise our vlan features Signed-off-by: Edward Cree Signed-off-by: Jakub Kicinski commit dbe2f251f9eb2158d2c9ec22cc22cc2fc66370e1 Author: Edward Cree Date: Wed Oct 28 20:43:59 2020 +0000 sfc: only use fixed-id if the skb asks for it AIUI, the NETIF_F_TSO_MANGLEID flag is a signal to the stack that a driver may _need_ to mangle IDs in order to do TSO, and conversely a signal from the stack that the driver is permitted to do so. Since we support both fixed and incrementing IPIDs, we should rely on the SKB_GSO_FIXEDID flag on a per-skb basis, rather than using the MANGLEID feature to make all TSOs fixed-id. Includes other minor cleanups of ef100_make_tso_desc() coding style. Signed-off-by: Edward Cree Signed-off-by: Jakub Kicinski commit 806f9f23b6732de81daf3aafae5363bb56d29ed6 Author: Edward Cree Date: Wed Oct 28 20:43:39 2020 +0000 sfc: implement encap TSO on EF100 The NIC only needs to know where the headers it has to edit (TCP and inner and outer IPv4) are, which fits GSO_PARTIAL nicely. It also supports non-PARTIAL offload of UDP tunnels, again just needing to be told the outer transport offset so that it can edit the UDP length field. (It's not clear to me whether the stack will ever use the non-PARTIAL version with the netdev feature flags we're setting here.) Signed-off-by: Edward Cree Signed-off-by: Jakub Kicinski commit a7a375ca56613992160b7f768c408d55d0942909 Author: Edward Cree Date: Wed Oct 28 20:43:07 2020 +0000 sfc: extend bitfield macros to 17 fields We need EFX_POPULATE_OWORD_17 for an encap TSO descriptor on EF100. Signed-off-by: Edward Cree Signed-off-by: Jakub Kicinski commit dbc8c28a742d70644341148b436facb64e56641b Author: Tian Tao Date: Thu Oct 29 15:11:45 2020 +0800 drm/hisilicon: Adding a const declaration to an invariant construct Some constructs cannot be changed after being assigned a value, so add const declarations to invariant constructs. Signed-off-by: Tian Tao Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/1603955505-43942-1-git-send-email-tiantao6@hisilicon.com commit 4dbafbd30aefcc1e56086875c5aa940490c0a9c3 Author: Christian König Date: Fri Oct 30 12:11:38 2020 +0100 drm/nouveu: fix swiotlb include The check for swiotlb has moved to nouveu_ttm.c, but we forgot to move the include as well. This blows up only when merged with linux-next, not sure why drm-misc-next works stand alone. Signed-off-by: Christian König Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/397835/ commit dc956588d44b2646051633848cc2625aab5adc05 Merge: c1181f42ff1e7 4a0d7579d466e Author: Jakub Kicinski Date: Fri Oct 30 17:20:18 2020 -0700 Merge branch 'net-ipa-minor-bug-fixes' Alex Elder says: ==================== net: ipa: minor bug fixes This series fixes several bugs. They are minor, in that the code currently works on supported platforms even without these patches applied, but they're bugs nevertheless and should be fixed. Version 2 improves the commit message for the fourth patch. It also fixes a bug in two spots in the last patch. Both of these changes were suggested by Willem de Bruijn. ==================== Link: https://lore.kernel.org/r/20201028194148.6659-1-elder@linaro.org Signed-off-by: Jakub Kicinski commit 4a0d7579d466e0e3b576a31f7f4fac16cfd06219 Author: Alex Elder Date: Wed Oct 28 14:41:48 2020 -0500 net: ipa: avoid going past end of resource group array The minimum and maximum limits for resources assigned to a given resource group are programmed in pairs, with the limits for two groups set in a single register. If the number of supported resource groups is odd, only half of the register that defines these limits is valid for the last group; that group has no second group in the pair. Currently we ignore this constraint, and it turns out to be harmless, but it is not guaranteed to be. This patch addresses that, and adds support for programming the 5th resource group's limits. Rework how the resource group limit registers are programmed by having a single function program all group pairs rather than having one function program each pair. Add the programming of the 4-5 resource group pair limits to this function. If a resource group is not supported, pass a null pointer to ipa_resource_config_common() for that group and have that function write zeroes in that case. Tested-by: Sujit Kautkar Signed-off-by: Alex Elder Acked-by: Willem de Bruijn Signed-off-by: Jakub Kicinski commit 8c365f747f0218f2bc6bad0740324c92444423fb Author: Alex Elder Date: Wed Oct 28 14:41:47 2020 -0500 net: ipa: distinguish between resource group types The number of resource groups supported by the hardware can be different for source and destination resources. Determine the number supported for each using separate functions. Make the functions inline end move their definitions into "ipa_reg.h", because they determine whether certain register definitions are valid. Pass just the IPA hardware version as argument. IPA_RESOURCE_GROUP_COUNT represents the maximum number of resource groups the driver supports for any hardware version. Change that symbol to be two separate constants, one for source and the other for destination resource groups. Rename them to end with "_MAX" rather than "_COUNT", to reflect their true purpose. Tested-by: Sujit Kautkar Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 2d2653424ce5c4485978a523db3873f87e196593 Author: Alex Elder Date: Wed Oct 28 14:41:46 2020 -0500 net: ipa: assign endpoint to a resource group The IPA hardware manages various resources (e.g. descriptors) internally to perform its functions. The resources are grouped, allowing different endpoints to use separate resource pools. This way one group of endpoints can be configured to operate unaffected by the resource use of endpoints in a different group. Endpoints should be assigned to a resource group, but we currently don't do that. Define a new resource_group field in the endpoint configuration data, and use it to assign the proper resource group to use for each AP endpoint. Tested-by: Sujit Kautkar Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit d773f404c833b7c88b6e85e55d484081736666db Author: Alex Elder Date: Wed Oct 28 14:41:45 2020 -0500 net: ipa: fix resource group field mask definition The mask for the RSRC_GRP field in the INIT_RSRC_GRP endpoint initialization register is incorrectly defined for IPA v4.2 (where it is only one bit wide). So we need to fix this. The fix is not straightforward, however. Field masks are passed to functions like u32_encode_bits(), and for that they must be constant. To address this, we define a new inline function that returns the *encoded* value to use for a given RSRC_GRP field, which depends on the IPA version. The caller can then use something like this, to assign a given endpoint resource id 1: u32 offset = IPA_REG_ENDP_INIT_RSRC_GRP_N_OFFSET(endpoint_id); u32 val = rsrc_grp_encoded(ipa->version, 1); iowrite32(val, ipa->reg_virt + offset); The next patch requires this fix. Tested-by: Sujit Kautkar Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 279dc955745a6800911404fe375686626aa7fed3 Author: Alex Elder Date: Wed Oct 28 14:41:44 2020 -0500 net: ipa: assign proper packet context base At the end of ipa_mem_setup() we write the local packet processing context base register to tell it where the processing context memory is. But we are writing the wrong value. The value written turns out to be the offset of the modem header memory region (assigned earlier in the function). Fix this bug. Tested-by: Sujit Kautkar Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit c1181f42ff1e7e0158184baee171dd54e67c353a Author: Moritz Fischer Date: Wed Oct 28 10:21:25 2020 -0700 net: dec: tulip: de2104x: Add shutdown handler to stop NIC The driver does not implement a shutdown handler which leads to issues when using kexec in certain scenarios. The NIC keeps on fetching descriptors which gets flagged by the IOMMU with errors like this: DMAR: DMAR:[DMA read] Request device [5e:00.0]fault addr fffff000 DMAR: DMAR:[DMA read] Request device [5e:00.0]fault addr fffff000 DMAR: DMAR:[DMA read] Request device [5e:00.0]fault addr fffff000 DMAR: DMAR:[DMA read] Request device [5e:00.0]fault addr fffff000 DMAR: DMAR:[DMA read] Request device [5e:00.0]fault addr fffff000 Signed-off-by: Moritz Fischer Link: https://lore.kernel.org/r/20201028172125.496942-1-mdf@kernel.org Signed-off-by: Jakub Kicinski commit 1887023a5e96f98249574e0785b7aa2e5742ca68 Author: Robert Hancock Date: Wed Oct 28 11:15:40 2020 -0600 net: phy: marvell: add special handling of Finisar modules with 88E1111 The Finisar FCLF8520P2BTL 1000BaseT SFP module uses a Marvel 88E1111 PHY with a modified PHY ID. Add support for this ID using the 88E1111 methods. By default these modules do not have 1000BaseX auto-negotiation enabled, which is not generally desirable with Linux networking drivers. Add handling to enable 1000BaseX auto-negotiation when these modules are used in 1000BaseX mode. Also, some special handling is required to ensure that 1000BaseT auto-negotiation is enabled properly when desired. Based on existing handling in the AMD xgbe driver and the information in the Finisar FAQ: https://www.finisar.com/sites/default/files/resources/an-2036_1000base-t_sfp_faqreve1.pdf Signed-off-by: Robert Hancock Reviewed-by: Russell King Link: https://lore.kernel.org/r/20201028171540.1700032-1-robert.hancock@calian.com Signed-off-by: Jakub Kicinski commit e28bf1f03b01b135dc0052b3a195c2860e10f216 Author: Joe Perches Date: Wed Oct 7 19:36:27 2020 -0700 RDMA: Convert various random sprintf sysfs _show uses to sysfs_emit Manual changes for sysfs_emit as cocci scripts can't easily convert them. Link: https://lore.kernel.org/r/ecde7791467cddb570c6f6d2c908ffbab9145cac.1602122880.git.joe@perches.com Signed-off-by: Joe Perches Reviewed-by: Jason Gunthorpe Acked-by: Jack Wang Signed-off-by: Jason Gunthorpe commit 45808361d4491217de11cdf0661d657081f8f422 Author: Joe Perches Date: Wed Oct 7 19:36:26 2020 -0700 RDMA: Manual changes for sysfs_emit and neatening Make changes to use sysfs_emit in the RDMA code as cocci scripts can not be written to handle _all_ the possible variants of various sprintf family uses in sysfs show functions. While there, make the code more legible and update its style to be more like the typical kernel styles. Miscellanea: o Use intermediate pointers for dereferences o Add and use string lookup functions o return early when any intermediate call fails so normal return is at the bottom of the function o mlx4/mcg.c:sysfs_show_group: use scnprintf to format intermediate strings Link: https://lore.kernel.org/r/f5c9e4c9d8dafca1b7b70bd597ee7f8f219c31c8.1602122880.git.joe@perches.com Signed-off-by: Joe Perches Acked-by: Jack Wang Signed-off-by: Jason Gunthorpe commit be25f43aed73475f2d23b89cc755c2594644d47e Merge: 1fb74191988fd 046c052b475e7 Author: Jakub Kicinski Date: Fri Oct 30 15:24:54 2020 -0700 Merge branch 'sctp-implement-rfc6951-udp-encapsulation-of-sctp' Xin Long says: ==================== sctp: Implement RFC6951: UDP Encapsulation of SCTP Description From the RFC: The Main Reasons: o To allow SCTP traffic to pass through legacy NATs, which do not provide native SCTP support as specified in [BEHAVE] and [NATSUPP]. o To allow SCTP to be implemented on hosts that do not provide direct access to the IP layer. In particular, applications can use their own SCTP implementation if the operating system does not provide one. Implementation Notes: UDP-encapsulated SCTP is normally communicated between SCTP stacks using the IANA-assigned UDP port number 9899 (sctp-tunneling) on both ends. There are circumstances where other ports may be used on either end, and it might be required to use ports other than the registered port. Each SCTP stack uses a single local UDP encapsulation port number as the destination port for all its incoming SCTP packets, this greatly simplifies implementation design. An SCTP implementation supporting UDP encapsulation MUST maintain a remote UDP encapsulation port number per destination address for each SCTP association. Again, because the remote stack may be using ports other than the well-known port, each port may be different from each stack. However, because of remapping of ports by NATs, the remote ports associated with different remote IP addresses may not be identical, even if they are associated with the same stack. Because the well-known port might not be used, implementations need to allow other port numbers to be specified as a local or remote UDP encapsulation port number through APIs. Patches: This patchset is using the udp4/6 tunnel APIs to implement the UDP Encapsulation of SCTP with not much change in SCTP protocol stack and with all current SCTP features keeped in Linux Kernel. 1 - 4: Fix some UDP issues that may be triggered by SCTP over UDP. 5 - 7: Process incoming UDP encapsulated packets and ICMP packets. 8 -10: Remote encap port's update by sysctl, sockopt and packets. 11-14: Process outgoing pakects with UDP encapsulated and its GSO. 15-16: Add the part from draft-tuexen-tsvwg-sctp-udp-encaps-cons-03. 17: Enable this feature. Tests: - lksctp-tools/src/func_tests with UDP Encapsulation enabled/disabled: Both make v4test and v6test passed. - sctp-tests with UDP Encapsulation enabled/disabled: repeatability/procdumps/sctpdiag/gsomtuchange/extoverflow/ sctphashtable passed. Others failed as expected due to those "iptables -p sctp" rules. - netperf on lo/netns/virtio_net, with gso enabled/disabled and with ip_checksum enabled/disabled, with UDP Encapsulation enabled/disabled: No clear performance dropped. v1->v2: - Fix some incorrect code in the patches 5,6,8,10,11,13,14,17, suggested by Marcelo. - Append two patches 15-16 to add the Additional Considerations for UDP Encapsulation of SCTP from draft-tuexen-tsvwg-sctp-udp-encaps-cons-03. v2->v3: - remove the cleanup code in patch 2, suggested by Willem. - remove the patch 3 and fix the checksum in the new patch 3 after talking with Paolo, Marcelo and Guillaume. - add 'select NET_UDP_TUNNEL' in patch 4 to solve a compiling error. - fix __be16 type cast warning in patch 8. - fix the wrong endian orders when setting values in 14,16. v3->v4: - add entries in ip-sysctl.rst in patch 7,16, as Marcelo Suggested. - not create udp socks when udp_port is set to 0 in patch 16, as Marcelo noticed. v4->v5: - improve the description for udp_port and encap_port entries in patch 7, 16. - use 0 as the default udp_port. ==================== Link: https://lore.kernel.org/r/cover.1603955040.git.lucien.xin@gmail.com Signed-off-by: Jakub Kicinski commit 046c052b475e7119b6a30e3483e2888fc606a2f8 Author: Xin Long Date: Thu Oct 29 15:05:10 2020 +0800 sctp: enable udp tunneling socks This patch is to enable udp tunneling socks by calling sctp_udp_sock_start() in sctp_ctrlsock_init(), and sctp_udp_sock_stop() in sctp_ctrlsock_exit(). Also add sysctl udp_port to allow changing the listening sock's port by users. Wit this patch, the whole sctp over udp feature can be enabled and used. v1->v2: - Also update ctl_sock udp_port in proc_sctp_do_udp_port() where netns udp_port gets changed. v2->v3: - Call htons() when setting sk udp_port from netns udp_port. v3->v4: - Not call sctp_udp_sock_start() when new_value is 0. - Add udp_port entry in ip-sysctl.rst. v4->v5: - Not call sctp_udp_sock_start/stop() in sctp_ctrlsock_init/exit(). - Improve the description of udp_port in ip-sysctl.rst. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: Jakub Kicinski commit 1c16a1862595e66d22d34799a9f328defc884369 Author: Xin Long Date: Thu Oct 29 15:05:09 2020 +0800 sctp: handle the init chunk matching an existing asoc This is from Section 4 of draft-tuexen-tsvwg-sctp-udp-encaps-cons-03, and it requires responding with an abort chunk with an error cause when the udp source port of the received init chunk doesn't match the encap port of the transport. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: Jakub Kicinski commit e38d86b354f96e3ed6f5e6c7dbb442d7107fc0bd Author: Xin Long Date: Thu Oct 29 15:05:08 2020 +0800 sctp: add the error cause for new encapsulation port restart This patch is to add the function to make the abort chunk with the error cause for new encapsulation port restart, defined on Section 4.4 in draft-tuexen-tsvwg-sctp-udp-encaps-cons-03. v1->v2: - no change. v2->v3: - no need to call htons() when setting nep.cur_port/new_port. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: Jakub Kicinski commit 259db53ba5933a2a507238c47ffa52c906c27df0 Author: Xin Long Date: Thu Oct 29 15:05:07 2020 +0800 sctp: support for sending packet over udp6 sock This one basically does the similar things in sctp_v6_xmit as does for udp4 sock in the last patch, just note that: 1. label needs to be calculated, as it's the param of udp_tunnel6_xmit_skb(). 2. The 'nocheck' param of udp_tunnel6_xmit_skb() is false, as required by RFC. v1->v2: - Use sp->udp_port instead in sctp_v6_xmit(), which is more safe. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: Jakub Kicinski commit 600af7fd809ad2a307b6c53b2a3e45453a75cdb6 Author: Xin Long Date: Thu Oct 29 15:05:06 2020 +0800 sctp: support for sending packet over udp4 sock This patch does what the rfc6951#section-5.3 says for ipv4: "Within the UDP header, the source port MUST be the local UDP encapsulation port number of the SCTP stack, and the destination port MUST be the remote UDP encapsulation port number maintained for the association and the destination address to which the packet is sent (see Section 5.1). Because the SCTP packet is the UDP payload, the length of the UDP packet MUST be the length of the SCTP packet plus the size of the UDP header. The SCTP checksum MUST be computed for IPv4 and IPv6, and the UDP checksum SHOULD be computed for IPv4 and IPv6." Some places need to be adjusted in sctp_packet_transmit(): 1. For non-gso packets, when transport's encap_port is set, sctp checksum has to be done in sctp_packet_pack(), as the outer udp will use ip_summed = CHECKSUM_PARTIAL to do the offload setting for checksum. 2. Delay calling dst_clone() and skb_dst_set() for non-udp packets until sctp_v4_xmit(), as for udp packets, skb_dst_set() is not needed before calling udp_tunnel_xmit_skb(). then in sctp_v4_xmit(): 1. Go to udp_tunnel_xmit_skb() only when transport->encap_port and net->sctp.udp_port both are set, as these are one for dst port and another for src port. 2. For gso packet, SKB_GSO_UDP_TUNNEL_CSUM is set for gso_type, and with this udp checksum can be done in __skb_udp_tunnel_segment() for each segments after the sctp gso. 3. inner_mac_header and inner_transport_header are set, as these will be needed in __skb_udp_tunnel_segment() to find the right headers. 4. df and ttl are calculated, as these are the required params by udp_tunnel_xmit_skb(). 5. nocheck param has to be false, as "the UDP checksum SHOULD be computed for IPv4 and IPv6", says in rfc6951#section-5.3. v1->v2: - Use sp->udp_port instead in sctp_v4_xmit(), which is more safe. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: Jakub Kicinski commit bcd623d8e9fa5f82bbd8cd464dc418d24139157b Author: Xin Long Date: Thu Oct 29 15:05:05 2020 +0800 sctp: call sk_setup_caps in sctp_packet_transmit instead sk_setup_caps() was originally called in Commit 90017accff61 ("sctp: Add GSO support"), as: "We have to refresh this in case we are xmiting to more than one transport at a time" This actually happens in the loop of sctp_outq_flush_transports(), and it shouldn't be tied to gso, so move it out of gso part and before sctp_packet_pack(). Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: Jakub Kicinski commit f1bfe8b5415171b5e70c2a47d399c91bd7c2752e Author: Xin Long Date: Thu Oct 29 15:05:04 2020 +0800 sctp: add udphdr to overhead when udp_port is set sctp_mtu_payload() is for calculating the frag size before making chunks from a msg. So we should only add udphdr size to overhead when udp socks are listening, as only then sctp can handle the incoming sctp over udp packets and outgoing sctp over udp packets will be possible. Note that we can't do this according to transport->encap_port, as different transports may be set to different values, while the chunks were made before choosing the transport, we could not be able to meet all rfc6951#section-5.6 recommends. v1->v2: - Add udp_port for sctp_sock to avoid a potential race issue, it will be used in xmit path in the next patch. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: Jakub Kicinski commit a1dd2cf2f1aedabc2ca9bb4f90231a521c52d8eb Author: Xin Long Date: Thu Oct 29 15:05:03 2020 +0800 sctp: allow changing transport encap_port by peer packets As rfc6951#section-5.4 says: "After finding the SCTP association (which includes checking the verification tag), the UDP source port MUST be stored as the encapsulation port for the destination address the SCTP packet is received from (see Section 5.1). When a non-encapsulated SCTP packet is received by the SCTP stack, the encapsulation of outgoing packets belonging to the same association and the corresponding destination address MUST be disabled." transport encap_port should be updated by a validated incoming packet's udp src port. We save the udp src port in sctp_input_cb->encap_port, and then update the transport in two places: 1. right after vtag is verified, which is required by RFC, and this allows the existent transports to be updated by the chunks that can only be processed on an asoc. 2. right before processing the 'init' where the transports are added, and this allows building a sctp over udp connection by client with the server not knowing the remote encap port. 3. when processing ootb_pkt and creating the temporary transport for the reply pkt. Note that sctp_input_cb->header is removed, as it's not used any more in sctp. v1->v2: - Change encap_port as __be16 for sctp_input_cb. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: Jakub Kicinski commit 8dba29603b5c8bfca2bf90aeb83d05a236df967b Author: Xin Long Date: Thu Oct 29 15:05:02 2020 +0800 sctp: add SCTP_REMOTE_UDP_ENCAPS_PORT sockopt This patch is to implement: rfc6951#section-6.1: Get or Set the Remote UDP Encapsulation Port Number with the param of the struct: struct sctp_udpencaps { sctp_assoc_t sue_assoc_id; struct sockaddr_storage sue_address; uint16_t sue_port; }; the encap_port of sock, assoc or transport can be changed by users, which also means it allows the different transports of the same asoc to have different encap_port value. v1->v2: - no change. v2->v3: - fix the endian warning when setting values between encap_port and sue_port. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: Jakub Kicinski commit e8a3001c2120c760017da81a307308572a3cdbbc Author: Xin Long Date: Thu Oct 29 15:05:01 2020 +0800 sctp: add encap_port for netns sock asoc and transport encap_port is added as per netns/sock/assoc/transport, and the latter one's encap_port inherits the former one's by default. The transport's encap_port value would mostly decide if one packet should go out with udp encapsulated or not. This patch also allows users to set netns' encap_port by sysctl. v1->v2: - Change to define encap_port as __be16 for sctp_sock, asoc and transport. v2->v3: - No change. v3->v4: - Add 'encap_port' entry in ip-sysctl.rst. v4->v5: - Improve the description of encap_port in ip-sysctl.rst. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: Jakub Kicinski commit 89ba49171fb22c130be4786d5ada9dda33dd7801 Author: Xin Long Date: Thu Oct 29 15:05:00 2020 +0800 sctp: add encap_err_lookup for udp encap socks As it says in rfc6951#section-5.5: "When receiving ICMP or ICMPv6 response packets, there might not be enough bytes in the payload to identify the SCTP association that the SCTP packet triggering the ICMP or ICMPv6 packet belongs to. If a received ICMP or ICMPv6 packet cannot be related to a specific SCTP association or the verification tag cannot be verified, it MUST be discarded silently. In particular, this means that the SCTP stack MUST NOT rely on receiving ICMP or ICMPv6 messages. Implementation constraints could prevent processing received ICMP or ICMPv6 messages." ICMP or ICMPv6 packets need to be handled, and this is implemented by udp encap sock .encap_err_lookup function. The .encap_err_lookup function is called in __udp(6)_lib_err_encap() to confirm this path does need to be updated. For sctp, what we can do here is check if the corresponding asoc and transport exist. Note that icmp packet process for sctp over udp is done by udp sock .encap_err_lookup(), and it means for now we can't do as much as sctp_v4/6_err() does. Also we can't do the two mappings mentioned in rfc6951#section-5.5. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: Jakub Kicinski commit 9d6ba260a0734d5e56243929a69d57ebbf0cb245 Author: Xin Long Date: Thu Oct 29 15:04:59 2020 +0800 sctp: create udp6 sock and set its encap_rcv This patch is to add the udp6 sock part in sctp_udp_sock_start/stop(). udp_conf.use_udp6_rx_checksums is set to true, as: "The SCTP checksum MUST be computed for IPv4 and IPv6, and the UDP checksum SHOULD be computed for IPv4 and IPv6" says in rfc6951#section-5.3. v1->v2: - Add pr_err() when fails to create udp v6 sock. - Add #if IS_ENABLED(CONFIG_IPV6) not to create v6 sock when ipv6 is disabled. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: Jakub Kicinski commit 965ae44412f8c0c19945b3f62bc945ad0b15a8aa Author: Xin Long Date: Thu Oct 29 15:04:58 2020 +0800 sctp: create udp4 sock and add its encap_rcv This patch is to add the functions to create/release udp4 sock, and set the sock's encap_rcv to process the incoming udp encap sctp packets. In sctp_udp_rcv(), as we can see, all we need to do is fix the transport header for sctp_rcv(), then it would implement the part of rfc6951#section-5.4: "When an encapsulated packet is received, the UDP header is removed. Then, the generic lookup is performed, as done by an SCTP stack whenever a packet is received, to find the association for the received SCTP packet" Note that these functions will be called in the last patch of this patchset when enabling this feature. v1->v2: - Add pr_err() when fails to create udp v4 sock. v2->v3: - Add 'select NET_UDP_TUNNEL' in sctp Kconfig. v3->v4: - No change. v4->v5: - Change to set udp_port to 0 by default. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: Jakub Kicinski commit 527beb8ef9c02c11f8ca0d59fc46f7d081db1c33 Author: Xin Long Date: Thu Oct 29 15:04:57 2020 +0800 udp: support sctp over udp in skb_udp_tunnel_segment For the gso of sctp over udp packets, sctp_gso_segment() will be called in skb_udp_tunnel_segment(), we need to set transport_header to sctp header. As all the current HWs can't handle both crc checksum and udp checksum at the same time, the crc checksum has to be done in sctp_gso_segment() by removing the NETIF_F_SCTP_CRC flag from the features. Meanwhile, if the HW can't do udp checksum, csum and csum_start has to be set correctly, and udp checksum will be done in __skb_udp_tunnel_segment() by calling gso_make_checksum(). Thanks to Paolo, Marcelo and Guillaume for helping with this one. v1->v2: - no change. v2->v3: - remove the he NETIF_F_SCTP_CRC flag from the features. - set csum and csum_start in sctp_gso_make_checksum(). Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: Jakub Kicinski commit 3c7d4415db6a2fa9312e3b5a3e7ca08ed09c9f57 Author: Xin Long Date: Thu Oct 29 15:04:56 2020 +0800 udp6: move the mss check after udp gso tunnel processing For some protocol's gso, like SCTP, it's using GSO_BY_FRAGS for gso_size. When using UDP to encapsulate its packet, it will return error in udp6_ufo_fragment() as skb->len < gso_size, and it will never go to the gso tunnel processing. So we should move this check after udp gso tunnel processing, the same as udp4_ufo_fragment() does. v1->v2: - no change. v2->v3: - not do any cleanup. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: Jakub Kicinski commit d26796ae589401d209f63f462d5aee3746f3c51e Author: Xin Long Date: Thu Oct 29 15:04:55 2020 +0800 udp: check udp sock encap_type in __udp_lib_err There is a chance that __udp4/6_lib_lookup() returns a udp encap sock in __udp_lib_err(), like the udp encap listening sock may use the same port as remote encap port, in which case it should go to __udp4/6_lib_err_encap() for more validation before processing the icmp packet. This patch is to check encap_type in __udp_lib_err() for the further validation for a encap sock. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: Jakub Kicinski commit 1fb74191988fd1cc340c4b2fdaf4c47d2a7d1d17 Author: Russell King Date: Thu Oct 29 16:09:03 2020 +0000 net: dsa: mv88e6xxx: fix vlan setup DSA assumes that a bridge which has vlan filtering disabled is not vlan aware, and ignores all vlan configuration. However, the kernel software bridge code allows configuration in this state. This causes the kernel's idea of the bridge vlan state and the hardware state to disagree, so "bridge vlan show" indicates a correct configuration but the hardware lacks all configuration. Even worse, enabling vlan filtering on a DSA bridge immediately blocks all traffic which, given the output of "bridge vlan show", is very confusing. Allow the VLAN configuration to be updated on Marvell DSA bridges, otherwise we end up cutting all traffic when enabling vlan filtering. Signed-off-by: Russell King Reviewed-by: Florian Fainelli Tested-by: Vladimir Oltean Link: https://lore.kernel.org/r/E1kYAU3-00071C-1G@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 85bec4bc9198ba233afc830742437847b167b887 Author: Bhaskar Chowdhury Date: Thu Oct 29 15:25:25 2020 +0530 drivers: net: phy: Fix spelling in comment defalut to default Fixed spelling in comment like below: s/defalut/default/p This is in linux-next. Signed-off-by: Bhaskar Chowdhury Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20201029095525.20200-1-unixbhaskar@gmail.com Signed-off-by: Jakub Kicinski commit 0ad41b244ca0ca07af2a652014bc929cbdf91e87 Author: Lukas Bulwahn Date: Wed Oct 28 12:35:33 2020 +0100 net: cls_api: remove unneeded local variable in tc_dump_chain() make clang-analyzer on x86_64 defconfig caught my attention with: net/sched/cls_api.c:2964:3: warning: Value stored to 'parent' is never read [clang-analyzer-deadcode.DeadStores] parent = 0; ^ net/sched/cls_api.c:2977:4: warning: Value stored to 'parent' is never read [clang-analyzer-deadcode.DeadStores] parent = q->handle; ^ Commit 32a4f5ecd738 ("net: sched: introduce chain object to uapi") introduced tc_dump_chain() and this initial implementation already contained these unneeded dead stores. Simplify the code to make clang-analyzer happy. As compilers will detect these unneeded assignments and optimize this anyway, the resulting binary is identical before and after this change. No functional change. No change in object code. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20201028113533.26160-1-lukas.bulwahn@gmail.com Signed-off-by: Jakub Kicinski commit 400490ac2ce56774cc941e99d637400a2d042537 Author: Lukas Bulwahn Date: Wed Oct 28 12:53:49 2020 +0100 ipv6: mcast: make annotations for ip6_mc_msfget() consistent Commit 931ca7ab7fe8 ("ip*_mc_gsfget(): lift copyout of struct group_filter into callers") adjusted the type annotations for ip6_mc_msfget() at its declaration, but missed the type annotations at its definition. Hence, sparse complains on ./net/ipv6/mcast.c: mcast.c:550:5: error: symbol 'ip6_mc_msfget' redeclared with different type \ (incompatible argument 3 (different address spaces)) Make ip6_mc_msfget() annotations consistent, which also resolves this warning from sparse: mcast.c:607:34: warning: incorrect type in argument 1 (different address spaces) mcast.c:607:34: expected void [noderef] __user *to mcast.c:607:34: got struct __kernel_sockaddr_storage *p No functional change. No change in object code. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20201028115349.6855-1-lukas.bulwahn@gmail.com Signed-off-by: Jakub Kicinski commit 0774a6ed294b963dc76df2d8342ab86d030759ec Author: Arnd Bergmann Date: Thu Sep 24 11:32:40 2020 +0200 timekeeping: default GENERIC_CLOCKEVENTS to enabled Almost all machines use GENERIC_CLOCKEVENTS, so it feels wrong to require each one to select that symbol manually. Instead, enable it whenever CONFIG_LEGACY_TIMER_TICK is disabled as a simplification. It should be possible to select both GENERIC_CLOCKEVENTS and LEGACY_TIMER_TICK from an architecture now and decide at runtime between the two. For the clockevents arch-support.txt file, this means that additional architectures are marked as TODO when they have at least one machine that still uses LEGACY_TIMER_TICK, rather than being marked 'ok' when at least one machine has been converted. This means that both m68k and arm (for riscpc) revert to TODO. At this point, we could just always enable CONFIG_GENERIC_CLOCKEVENTS rather than leaving it off when not needed. I built an m68k defconfig kernel (using gcc-10.1.0) and found that this would add around 5.5KB in kernel image size: text data bss dec hex filename 3861936 1092236 196656 5150828 4e986c obj-m68k/vmlinux-no-clockevent 3866201 1093832 196184 5156217 4ead79 obj-m68k/vmlinux-clockevent On Arm (MACH_RPC), that difference appears to be twice as large, around 11KB on top of an 6MB vmlinux. Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Reviewed-by: Linus Walleij Signed-off-by: Arnd Bergmann commit 56cc7b8acfb7c763f71c0492fa8da01dca7c1760 Author: Arnd Bergmann Date: Thu Sep 24 17:39:11 2020 +0200 timekeeping: remove xtime_update There are no more users of xtime_update aside from legacy_timer_tick(), so fold it into that function and remove the declaration. update_process_times() is now only called inside of the kernel/time/ code, so the declaration can be moved there. Reviewed-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Reviewed-by: Linus Walleij Signed-off-by: Arnd Bergmann commit f9a015391e8908e68bd3147a8a5d8ac5f3ea2126 Author: Arnd Bergmann Date: Thu Sep 24 17:29:17 2020 +0200 m68k: remove timer_interrupt() function This gets passed to a number of init functions, but is ignored everywhere, so remove the function and change the mach_sched_init callback to take no arguments. Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Reviewed-by: Linus Walleij Signed-off-by: Arnd Bergmann commit 42f1d57f055064ed320d7292b95819dd81dda409 Author: Arnd Bergmann Date: Thu Sep 24 17:21:00 2020 +0200 m68k: change remaining timers to legacy_timer_tick There are nine more machines that each have their own timer interrupt calling the m68k timer_interrupt() function through an indirect pointer. This function is now the same as legacy_timer_tick, so just call that directly and select the corresponding Kconfig symbol. Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Reviewed-by: Linus Walleij Signed-off-by: Arnd Bergmann commit 09323308f63708d60aea9d5b9552ce759ef278dc Author: Arnd Bergmann Date: Thu Sep 24 17:06:38 2020 +0200 m68k: m68328: use legacy_timer_tick() A couple of machines share the m68328 timer code that is based on calling timer_interrupt(). Change these to the new and slightly more generic legacy_timer_tick() helper. Reviewed-by: Geert Uytterhoeven Reviewed-by: Linus Walleij Signed-off-by: Arnd Bergmann commit 4a1c287aabba8b3a8efbfb2381d95c38470ed171 Author: Arnd Bergmann Date: Thu Sep 24 16:40:58 2020 +0200 m68k: sun3/sun3c: use legacy_timer_tick These two are different from all other machines: * sun3 does not call timer_routine() but open-codes it except for the profile_tick() call that appears to be unintentionally missing. * sun3x has a commented-out timer irq handler but no functional timer tick I could find. Change both to calling the new legacy_timer_tick here, which includes the call to profile_tick() but does not fix sun3x as that is still commented out. Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven Reviewed-by: Linus Walleij Signed-off-by: Arnd Bergmann commit d6444094042b4f4b4623dc1a2437f61309b9b34b Author: Arnd Bergmann Date: Thu Sep 24 16:37:37 2020 +0200 m68k: split heartbeat out of timer function The heartbeat functionality is mostly separate from the actual timer interrupt handling, and it is only used on five platforms. Split it out into a separate function and call that directly from the timer irq on those platforms. Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Reviewed-by: Linus Walleij Signed-off-by: Arnd Bergmann commit 275e70e4b9dd4d59639e43fb859d0c953a374752 Author: Arnd Bergmann Date: Thu Sep 24 16:28:53 2020 +0200 m68k: coldfire: use legacy_timer_tick() Replace the indirect function calls in the timer code with direct calls to the newly added legacy_timer_tick() helper for those that have not yet been converted to generic clockevents. This makes the timer code a little more self-contained. Tested-by: Greg Ungerer Reviewed-by: Linus Walleij Signed-off-by: Arnd Bergmann commit 686092e7daaa9f43396c57ea0044799e47f0d9da Author: Arnd Bergmann Date: Thu Sep 24 15:30:34 2020 +0200 parisc: use legacy_timer_tick parisc has selected CONFIG_GENERIC_CLOCKEVENTS since commit 43b1f6abd590 ("parisc: Switch to generic sched_clock implementation"), but does not appear to actually be using it, and instead calls the low-level timekeeping functions directly. Remove the GENERIC_CLOCKEVENTS select again, and instead convert to the newly added legacy_timer_tick() helper. Reviewed-by: Linus Walleij Signed-off-by: Arnd Bergmann commit 6239da297281e2ea6284ce28a92f97ab047aa365 Author: Arnd Bergmann Date: Thu Sep 24 15:26:08 2020 +0200 ARM: rpc: use legacy_timer_tick rpc is the only user of the timer_tick() function now, and can just call the newly added generic version instead. Reviewed-by: Linus Walleij Signed-off-by: Arnd Bergmann commit 2b49ddcef2972e89922da9080809a9c1c82f9ecc Author: Arnd Bergmann Date: Thu Sep 24 15:23:13 2020 +0200 ia64: convert to legacy_timer_tick ia64 is the only architecture that calls xtime_update() in a loop, once for each jiffie that has passed since the last event. Before commit 3171a0305d62 ("[PATCH] simplify update_times (avoid jiffies/jiffies_64 aliasing problem)") in 2006, it could not actually do this any differently, but now it seems simpler to just pass the number of jiffies that passed in the meantime. While this loses the ability process interrupts in the middle of the timer tick by calling local_irq_enable(), doing so is fairly peculiar anyway and it seems better to just do what everyone else does here. Reviewed-by: Linus Walleij Signed-off-by: Arnd Bergmann commit b3550164a19d62e515af6cacb5a31f0b2b3f9501 Author: Arnd Bergmann Date: Thu Sep 24 15:21:43 2020 +0200 timekeeping: add CONFIG_LEGACY_TIMER_TICK All platforms that currently do not use generic clockevents roughly call the same set of functions in their timer interrupts: xtime_update(), update_process_times() and profile_tick(), sometimes in a different sequence. Add a helper function that performs all three of them, to make the callers more uniform and simplify the interface. Reviewed-by: Geert Uytterhoeven Reviewed-by: Linus Walleij Signed-off-by: Arnd Bergmann commit 77f6c0b87479c4578ac0798fc249637092ac45a3 Author: Arnd Bergmann Date: Thu Sep 24 12:30:50 2020 +0200 timekeeping: remove arch_gettimeoffset With Arm EBSA110 gone, nothing uses it any more, so the corresponding code and the Kconfig option can be removed. Acked-by: Thomas Gleixner Reviewed-by: Linus Walleij Signed-off-by: Arnd Bergmann commit 0d9dc7459a82f0ddd7907cd9fc0f6cc032c058da Author: Arnd Bergmann Date: Thu Sep 24 20:24:25 2020 +0200 net: remove am79c961a driver This driver was only used on the EBSA110 platform, which is now getting removed, so the driver is no longer needed either. Acked-by: Russell King Acked-by: Jakub Kicinski Signed-off-by: Arnd Bergmann commit 3e3f354bc383a052cde431d8f051efbf896f260b Author: Arnd Bergmann Date: Thu Sep 24 20:25:46 2020 +0200 ARM: remove ebsa110 platform Russell said that he is no longer using this machine, and it seems that nobody else has in a long time, so it's time to say goodbye to it. As this is the last platform using CONFIG_ARCH_USES_GETTIMEOFFSET, there are some follow-up patches to remove that as well. Acked-by: Russell King Signed-off-by: Arnd Bergmann commit 09b5678c778f389d911a8ca80c42ca4dcd349043 Author: Hoang Huu Le Date: Wed Oct 28 10:27:12 2020 +0700 tipc: remove dead code in tipc_net and relatives dist_queue is no longer used since commit 37922ea4a310 ("tipc: permit overlapping service ranges in name table") Acked-by: Jon Maloy Acked-by: Ying Xue Signed-off-by: Hoang Huu Le Link: https://lore.kernel.org/r/20201028032712.31009-1-hoang.h.le@dektech.com.au Signed-off-by: Jakub Kicinski commit cb5dc5b062a915bc92def951ea7f33bad6d2ff1f Merge: cf83b2d2e2b64 20b6cc34ea74b Author: Alexei Starovoitov Date: Fri Oct 30 13:03:29 2020 -0700 Merge branch 'bpf: safeguard hashtab locking in NMI context' Song Liu says: ==================== LOCKDEP NMI warning highlighted potential deadlock of hashtab in NMI context: [ 74.828971] ================================ [ 74.828972] WARNING: inconsistent lock state [ 74.828973] 5.9.0-rc8+ #275 Not tainted [ 74.828974] -------------------------------- [ 74.828975] inconsistent {INITIAL USE} -> {IN-NMI} usage. [ 74.828976] taskset/1174 [HC2[2]:SC0[0]:HE0:SE1] takes: [...] [ 74.828999] Possible unsafe locking scenario: [ 74.828999] [ 74.829000] CPU0 [ 74.829001] ---- [ 74.829001] lock(&htab->buckets[i].raw_lock); [ 74.829003] [ 74.829004] lock(&htab->buckets[i].raw_lock); Please refer to patch 1/2 for full trace. This warning is a false alert, as "INITIAL USE" and "IN-NMI" in the tests are from different hashtab. On the other hand, in theory, it is possible to deadlock when a hashtab is access from both non-NMI and NMI context. Patch 1/2 fixes this false alert by assigning separate lockdep class to each hashtab. Patch 2/2 introduces map_locked counters, which is similar to bpf_prog_active counter, to avoid hashtab deadlock in NMI context. ==================== Signed-off-by: Alexei Starovoitov commit 20b6cc34ea74b6a84599c1f8a70f3315b56a1883 Author: Song Liu Date: Thu Oct 29 00:19:25 2020 -0700 bpf: Avoid hashtab deadlock with map_locked If a hashtab is accessed in both non-NMI and NMI context, the system may deadlock on bucket->lock. Fix this issue with percpu counter map_locked. map_locked rejects concurrent access to the same bucket from the same CPU. To reduce memory overhead, map_locked is not added per bucket. Instead, 8 percpu counters are added to each hashtab. buckets are assigned to these counters based on the lower bits of its hash. Signed-off-by: Song Liu Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201029071925.3103400-3-songliubraving@fb.com commit c50eb518e262fa06bd334e6eec172eaf5d7a5bd9 Author: Song Liu Date: Thu Oct 29 00:19:24 2020 -0700 bpf: Use separate lockdep class for each hashtab If a hashtab is accessed in both NMI and non-NMI contexts, it may cause deadlock in bucket->lock. LOCKDEP NMI warning highlighted this issue: ./test_progs -t stacktrace [ 74.828970] [ 74.828971] ================================ [ 74.828972] WARNING: inconsistent lock state [ 74.828973] 5.9.0-rc8+ #275 Not tainted [ 74.828974] -------------------------------- [ 74.828975] inconsistent {INITIAL USE} -> {IN-NMI} usage. [ 74.828976] taskset/1174 [HC2[2]:SC0[0]:HE0:SE1] takes: [ 74.828977] ffffc90000ee96b0 (&htab->buckets[i].raw_lock){....}-{2:2}, at: htab_map_update_elem+0x271/0x5a0 [ 74.828981] {INITIAL USE} state was registered at: [ 74.828982] lock_acquire+0x137/0x510 [ 74.828983] _raw_spin_lock_irqsave+0x43/0x90 [ 74.828984] htab_map_update_elem+0x271/0x5a0 [ 74.828984] 0xffffffffa0040b34 [ 74.828985] trace_call_bpf+0x159/0x310 [ 74.828986] perf_trace_run_bpf_submit+0x5f/0xd0 [ 74.828987] perf_trace_urandom_read+0x1be/0x220 [ 74.828988] urandom_read_nowarn.isra.0+0x26f/0x380 [ 74.828989] vfs_read+0xf8/0x280 [ 74.828989] ksys_read+0xc9/0x160 [ 74.828990] do_syscall_64+0x33/0x40 [ 74.828991] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 74.828992] irq event stamp: 1766 [ 74.828993] hardirqs last enabled at (1765): [] asm_exc_page_fault+0x1e/0x30 [ 74.828994] hardirqs last disabled at (1766): [] irqentry_enter+0x37/0x60 [ 74.828995] softirqs last enabled at (856): [] fpu__clear+0xac/0x120 [ 74.828996] softirqs last disabled at (854): [] fpu__clear+0x20/0x120 [ 74.828997] [ 74.828998] other info that might help us debug this: [ 74.828999] Possible unsafe locking scenario: [ 74.828999] [ 74.829000] CPU0 [ 74.829001] ---- [ 74.829001] lock(&htab->buckets[i].raw_lock); [ 74.829003] [ 74.829004] lock(&htab->buckets[i].raw_lock); [ 74.829006] [ 74.829006] *** DEADLOCK *** [ 74.829007] [ 74.829008] 1 lock held by taskset/1174: [ 74.829008] #0: ffff8883ec3fd020 (&cpuctx_lock){-...}-{2:2}, at: perf_event_task_tick+0x101/0x650 [ 74.829012] [ 74.829013] stack backtrace: [ 74.829014] CPU: 0 PID: 1174 Comm: taskset Not tainted 5.9.0-rc8+ #275 [ 74.829015] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.11.0-2.el7 04/01/2014 [ 74.829016] Call Trace: [ 74.829016] [ 74.829017] dump_stack+0x9a/0xd0 [ 74.829018] lock_acquire+0x461/0x510 [ 74.829019] ? lock_release+0x6b0/0x6b0 [ 74.829020] ? stack_map_get_build_id_offset+0x45e/0x800 [ 74.829021] ? htab_map_update_elem+0x271/0x5a0 [ 74.829022] ? rcu_read_lock_held_common+0x1a/0x50 [ 74.829022] ? rcu_read_lock_held+0x5f/0xb0 [ 74.829023] _raw_spin_lock_irqsave+0x43/0x90 [ 74.829024] ? htab_map_update_elem+0x271/0x5a0 [ 74.829025] htab_map_update_elem+0x271/0x5a0 [ 74.829026] bpf_prog_1fd9e30e1438d3c5_oncpu+0x9c/0xe88 [ 74.829027] bpf_overflow_handler+0x127/0x320 [ 74.829028] ? perf_event_text_poke_output+0x4d0/0x4d0 [ 74.829029] ? sched_clock_cpu+0x18/0x130 [ 74.829030] __perf_event_overflow+0xae/0x190 [ 74.829030] handle_pmi_common+0x34c/0x470 [ 74.829031] ? intel_pmu_save_and_restart+0x90/0x90 [ 74.829032] ? lock_acquire+0x3f8/0x510 [ 74.829033] ? lock_release+0x6b0/0x6b0 [ 74.829034] intel_pmu_handle_irq+0x11e/0x240 [ 74.829034] perf_event_nmi_handler+0x40/0x60 [ 74.829035] nmi_handle+0x110/0x360 [ 74.829036] ? __intel_pmu_enable_all.constprop.0+0x72/0xf0 [ 74.829037] default_do_nmi+0x6b/0x170 [ 74.829038] exc_nmi+0x106/0x130 [ 74.829038] end_repeat_nmi+0x16/0x55 [ 74.829039] RIP: 0010:__intel_pmu_enable_all.constprop.0+0x72/0xf0 [ 74.829042] Code: 2f 1f 03 48 8d bb b8 0c 00 00 e8 29 09 41 00 48 ... [ 74.829043] RSP: 0000:ffff8880a604fc90 EFLAGS: 00000002 [ 74.829044] RAX: 000000070000000f RBX: ffff8883ec2195a0 RCX: 000000000000038f [ 74.829045] RDX: 0000000000000007 RSI: ffffffff82e72c20 RDI: ffff8883ec21a258 [ 74.829046] RBP: 000000070000000f R08: ffffffff8101b013 R09: fffffbfff0a7982d [ 74.829047] R10: ffffffff853cc167 R11: fffffbfff0a7982c R12: 0000000000000000 [ 74.829049] R13: ffff8883ec3f0af0 R14: ffff8883ec3fd120 R15: ffff8883e9c92098 [ 74.829049] ? intel_pmu_lbr_enable_all+0x43/0x240 [ 74.829050] ? __intel_pmu_enable_all.constprop.0+0x72/0xf0 [ 74.829051] ? __intel_pmu_enable_all.constprop.0+0x72/0xf0 [ 74.829052] [ 74.829053] perf_event_task_tick+0x48d/0x650 [ 74.829054] scheduler_tick+0x129/0x210 [ 74.829054] update_process_times+0x37/0x70 [ 74.829055] tick_sched_handle.isra.0+0x35/0x90 [ 74.829056] tick_sched_timer+0x8f/0xb0 [ 74.829057] __hrtimer_run_queues+0x364/0x7d0 [ 74.829058] ? tick_sched_do_timer+0xa0/0xa0 [ 74.829058] ? enqueue_hrtimer+0x1e0/0x1e0 [ 74.829059] ? recalibrate_cpu_khz+0x10/0x10 [ 74.829060] ? ktime_get_update_offsets_now+0x1a3/0x360 [ 74.829061] hrtimer_interrupt+0x1bb/0x360 [ 74.829062] ? rcu_read_lock_sched_held+0xa1/0xd0 [ 74.829063] __sysvec_apic_timer_interrupt+0xed/0x3d0 [ 74.829064] sysvec_apic_timer_interrupt+0x3f/0xd0 [ 74.829064] ? asm_sysvec_apic_timer_interrupt+0xa/0x20 [ 74.829065] asm_sysvec_apic_timer_interrupt+0x12/0x20 [ 74.829066] RIP: 0033:0x7fba18d579b4 [ 74.829068] Code: 74 54 44 0f b6 4a 04 41 83 e1 0f 41 80 f9 ... [ 74.829069] RSP: 002b:00007ffc9ba69570 EFLAGS: 00000206 [ 74.829071] RAX: 00007fba192084c0 RBX: 00007fba18c24d28 RCX: 00000000000007a4 [ 74.829072] RDX: 00007fba18c30488 RSI: 0000000000000000 RDI: 000000000000037b [ 74.829073] RBP: 00007fba18ca5760 R08: 00007fba18c248fc R09: 00007fba18c94c30 [ 74.829074] R10: 000000000000002f R11: 0000000000073c30 R12: 00007ffc9ba695e0 [ 74.829075] R13: 00000000000003f3 R14: 00007fba18c21ac8 R15: 00000000000058d6 However, such warning should not apply across multiple hashtabs. The system will not deadlock if one hashtab is used in NMI, while another hashtab is used in non-NMI. Use separate lockdep class for each hashtab, so that we don't get this false alert. Signed-off-by: Song Liu Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201029071925.3103400-2-songliubraving@fb.com commit aaadc1f829fdfc0fe1e328e1413b853c12cb15ae Merge: 0bc1bf241de55 bdd088ce5bfd3 Author: Mark Brown Date: Fri Oct 30 19:39:35 2020 +0000 Merge series "Add rt1015 support to CML boards" from Brent Lu : First patch adds tdm 4-slot 100fs DAI setting to avoid jitter of using 64fs on CML boards. Second patch is a DMI quirk for HP Dooly. Changes since v1: -Add comment on Dooly's DMI quirk Brent Lu (2): ASoC: intel: sof_rt5682: Add support for cml_rt1015_rt5682 ASoC: intel: sof_rt5682: Add quirk for Dooly sound/soc/intel/boards/sof_rt5682.c | 65 +++++++++++++++++-- .../intel/common/soc-acpi-intel-cml-match.c | 13 ++++ 2 files changed, 73 insertions(+), 5 deletions(-) -- 2.17.1 commit 8da1f442d32112e09541cf279b757ded28bea8a9 Author: Andrew Lunn Date: Wed Oct 28 02:33:44 2020 +0100 net: ipv6: calipso: Fix kerneldoc warnings net/ipv6/calipso.c:1236: warning: Excess function parameter 'reg' description in 'calipso_req_delattr' net/ipv6/calipso.c:1236: warning: Function parameter or member 'req' not described in 'calipso_req_delattr' net/ipv6/calipso.c:435: warning: Excess function parameter 'audit_secid' description in 'calipso_doi_remove' net/ipv6/calipso.c:435: warning: Function parameter or member 'audit_info' not described in 'calipso_doi_remove' Signed-off-by: Andrew Lunn Link: https://lore.kernel.org/r/20201028013344.931928-1-andrew@lunn.ch Signed-off-by: Jakub Kicinski commit f1f09df130811f73a20618a2a735661326ecf711 Author: Andrew Lunn Date: Wed Oct 28 02:31:23 2020 +0100 net: ipv6: rpl*: Fix strange kerneldoc warnings due to bad header net/ipv6/rpl_iptunnel.c:15: warning: cannot understand function prototype: 'struct rpl_iptunnel_encap ' The header on the file containing the author copyright message uses kerneldoc /** opener. This confuses the parser when it gets to struct rpl_iptunnel_encap { struct ipv6_rpl_sr_hdr srh[0]; }; Similarly: net//ipv6/rpl.c:10: warning: Function parameter or member 'x' not described in 'IPV6_PFXTAIL_LEN' where IPV6_PFXTAIL_LEN is a macro definition, not a function. Convert the header comments to a plain /* comment. Signed-off-by: Andrew Lunn Link: https://lore.kernel.org/r/20201028013123.931816-1-andrew@lunn.ch Signed-off-by: Jakub Kicinski commit 726e5e49c91cabc091fad3150342803d5d3d2d2e Author: Andrew Lunn Date: Wed Oct 28 02:27:03 2020 +0100 net: ipv4: Fix some kerneldoc warnings in TCP Low Priority net//ipv4/tcp_lp.c:120: warning: Function parameter or member 'sk' not described in 'tcp_lp_cong_avoid' net//ipv4/tcp_lp.c:135: warning: Function parameter or member 'sk' not described in 'tcp_lp_remote_hz_estimator' net//ipv4/tcp_lp.c:188: warning: Function parameter or member 'sk' not described in 'tcp_lp_owd_calculator' net//ipv4/tcp_lp.c:222: warning: Function parameter or member 'rtt' not described in 'tcp_lp_rtt_sample' net//ipv4/tcp_lp.c:222: warning: Function parameter or member 'sk' not described in 'tcp_lp_rtt_sample' net//ipv4/tcp_lp.c:265: warning: Function parameter or member 'sk' not described in 'tcp_lp_pkts_acked' net//ipv4/tcp_lp.c:97: warning: Function parameter or member 'sk' not described in 'tcp_lp_init' There are still a few kerneldoc warnings after this fix. Signed-off-by: Andrew Lunn Link: https://lore.kernel.org/r/20201028012703.931632-1-andrew@lunn.ch Signed-off-by: Jakub Kicinski commit 24cb4f3126971e1350a619af715bfc3ee43cc224 Author: Chris Wilson Date: Fri Oct 30 15:32:09 2020 +0000 drm/i915: Reduce severity for fixing up mistaken VBT tc->legacy_port If the VBT assigned tc->legacy_port mismatches the live_status indicator for the connector, we ignore the VBT directive and switch over to the HW setting. This is not a driver error, unless we happen to misparse the VBT or the live_status registers. However, for the system in CI where the error is only reported on 1 port out of 4, the evidence indicates the VBT is wrong. Stop flaging this as an error since the cause is beyond our control, fixup the mistake and continue on. Signed-off-by: Chris Wilson Cc: Imre Deak Reviewed-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20201030153209.14808-1-chris@chris-wilson.co.uk commit 0b609b557516b5149d5b477745d608d4a4bfee5b Author: Andrew Lunn Date: Wed Oct 28 02:14:12 2020 +0100 net: dccp: Fix most of the kerneldoc warnings net/dccp/ccids/ccid2.c:190: warning: Function parameter or member 'hc' not described in 'ccid2_update_used_window' net/dccp/ccids/ccid2.c:190: warning: Function parameter or member 'new_wnd' not described in 'ccid2_update_used_window' net/dccp/ccids/ccid2.c:360: warning: Function parameter or member 'sk' not described in 'ccid2_rtt_estimator' net/dccp/ccids/ccid3.c:112: warning: Function parameter or member 'sk' not described in 'ccid3_hc_tx_update_x' net/dccp/ccids/ccid3.c:159: warning: Function parameter or member 'hc' not described in 'ccid3_hc_tx_update_s' net/dccp/ccids/ccid3.c:268: warning: Function parameter or member 'sk' not described in 'ccid3_hc_tx_send_packet' net/dccp/ccids/ccid3.c:667: warning: Function parameter or member 'sk' not described in 'ccid3_first_li' net/dccp/ccids/ccid3.c:85: warning: Function parameter or member 'hc' not described in 'ccid3_update_send_interval' net/dccp/ccids/lib/loss_interval.c:85: warning: Function parameter or member 'lh' not described in 'tfrc_lh_update_i_mean' net/dccp/ccids/lib/loss_interval.c:85: warning: Function parameter or member 'skb' not described in 'tfrc_lh_update_i_mean' net/dccp/ccids/lib/packet_history.c:392: warning: Function parameter or member 'h' not described in 'tfrc_rx_hist_sample_rtt' net/dccp/ccids/lib/packet_history.c:392: warning: Function parameter or member 'skb' not described in 'tfrc_rx_hist_sample_rtt' net/dccp/feat.c:1003: warning: Function parameter or member 'dreq' not described in 'dccp_feat_server_ccid_dependencies' net/dccp/feat.c:1040: warning: Function parameter or member 'array_len' not described in 'dccp_feat_prefer' net/dccp/feat.c:1040: warning: Function parameter or member 'array' not described in 'dccp_feat_prefer' net/dccp/feat.c:1040: warning: Function parameter or member 'preferred_value' not described in 'dccp_feat_prefer' net/dccp/output.c:151: warning: Function parameter or member 'dp' not described in 'dccp_determine_ccmps' net/dccp/output.c:242: warning: Function parameter or member 'sk' not described in 'dccp_xmit_packet' net/dccp/output.c:305: warning: Function parameter or member 'sk' not described in 'dccp_flush_write_queue' net/dccp/output.c:305: warning: Function parameter or member 'time_budget' not described in 'dccp_flush_write_queue' net/dccp/output.c:378: warning: Function parameter or member 'sk' not described in 'dccp_retransmit_skb' net/dccp/qpolicy.c:88: warning: Function parameter or member '' not described in 'dccp_qpolicy_operations' net/dccp/qpolicy.c:88: warning: Function parameter or member '{' not described in 'dccp_qpolicy_operations' net/dccp/qpolicy.c:88: warning: Function parameter or member 'params' not described in 'dccp_qpolicy_operations' Signed-off-by: Andrew Lunn Link: https://lore.kernel.org/r/20201028011412.931250-1-andrew@lunn.ch Signed-off-by: Jakub Kicinski commit a89a501c49461e0f21101b086b77a870a0bea12e Author: Andrew Lunn Date: Wed Oct 28 02:09:13 2020 +0100 net: dcb: Fix kerneldoc warnings net//dcb/dcbnl.c:1836: warning: Function parameter or member 'app' not described in 'dcb_getapp' net//dcb/dcbnl.c:1836: warning: Function parameter or member 'dev' not described in 'dcb_getapp' net//dcb/dcbnl.c:1858: warning: Function parameter or member 'dev' not described in 'dcb_setapp' net//dcb/dcbnl.c:1858: warning: Function parameter or member 'new' not described in 'dcb_setapp' net//dcb/dcbnl.c:1899: warning: Function parameter or member 'app' not described in 'dcb_ieee_getapp_mask' net//dcb/dcbnl.c:1899: warning: Function parameter or member 'dev' not described in 'dcb_ieee_getapp_mask' net//dcb/dcbnl.c:1922: warning: Function parameter or member 'dev' not described in 'dcb_ieee_setapp' net//dcb/dcbnl.c:1922: warning: Function parameter or member 'new' not described in 'dcb_ieee_setapp' net//dcb/dcbnl.c:1953: warning: Function parameter or member 'del' not described in 'dcb_ieee_delapp' net//dcb/dcbnl.c:1953: warning: Function parameter or member 'dev' not described in 'dcb_ieee_delapp' net//dcb/dcbnl.c:1986: warning: Function parameter or member 'dev' not described in 'dcb_ieee_getapp_prio_dscp_mask_map' net//dcb/dcbnl.c:1986: warning: Function parameter or member 'p_map' not described in 'dcb_ieee_getapp_prio_dscp_mask_map' net//dcb/dcbnl.c:2016: warning: Function parameter or member 'dev' not described in 'dcb_ieee_getapp_dscp_prio_mask_map' net//dcb/dcbnl.c:2016: warning: Function parameter or member 'p_map' not described in 'dcb_ieee_getapp_dscp_prio_mask_map' net//dcb/dcbnl.c:2045: warning: Function parameter or member 'dev' not described in 'dcb_ieee_getapp_default_prio_mask' For some of these warnings, change to comments to plain comments, since no attempt is being made to follow kerneldoc syntax. Signed-off-by: Andrew Lunn Link: https://lore.kernel.org/r/20201028010913.930929-1-andrew@lunn.ch Signed-off-by: Jakub Kicinski commit 7cdda1c1c58d0c1686d41c2f789ea90bfef17709 Author: Andrew Lunn Date: Wed Oct 28 01:56:53 2020 +0100 net: nfc: Fix kerneldoc warnings net//nfc/core.c:1046: warning: Function parameter or member 'tx_headroom' not described in 'nfc_allocate_device' net//nfc/core.c:1046: warning: Function parameter or member 'tx_tailroom' not described in 'nfc_allocate_device' net//nfc/core.c:198: warning: Excess function parameter 'protocols' description in 'nfc_start_poll' net//nfc/core.c:198: warning: Function parameter or member 'im_protocols' not described in 'nfc_start_poll' net//nfc/core.c:198: warning: Function parameter or member 'tm_protocols' not described in 'nfc_start_poll' net//nfc/core.c:441: warning: Function parameter or member 'mode' not described in 'nfc_deactivate_target' net//nfc/core.c:711: warning: Function parameter or member 'dev' not described in 'nfc_alloc_send_skb' net//nfc/core.c:711: warning: Function parameter or member 'err' not described in 'nfc_alloc_send_skb' net//nfc/core.c:711: warning: Function parameter or member 'flags' not described in 'nfc_alloc_send_skb' net//nfc/core.c:711: warning: Function parameter or member 'sk' not described in 'nfc_alloc_send_skb' net//nfc/digital_core.c:470: warning: Function parameter or member 'im_protocols' not described in 'digital_start_poll' net//nfc/digital_core.c:470: warning: Function parameter or member 'nfc_dev' not described in 'digital_start_poll' net//nfc/digital_core.c:470: warning: Function parameter or member 'tm_protocols' not described in 'digital_start_poll' net//nfc/nci/core.c:1119: warning: Function parameter or member 'tx_headroom' not described in 'nci_allocate_device' net//nfc/nci/core.c:1119: warning: Function parameter or member 'tx_tailroom' not described in 'nci_allocate_device' Signed-off-by: Andrew Lunn Link: https://lore.kernel.org/r/20201028005653.930467-1-andrew@lunn.ch Signed-off-by: Jakub Kicinski commit 709565ae14aa2670d6b480be46720856e804af41 Author: Andrew Lunn Date: Wed Oct 28 01:55:27 2020 +0100 net: appletalk: fix kerneldoc warnings net/appletalk/aarp.c:68: warning: Function parameter or member 'dev' not described in 'aarp_entry' net/appletalk/aarp.c:68: warning: Function parameter or member 'expires_at' not described in 'aarp_entry' net/appletalk/aarp.c:68: warning: Function parameter or member 'hwaddr' not described in 'aarp_entry' net/appletalk/aarp.c:68: warning: Function parameter or member 'last_sent' not described in 'aarp_entry' net/appletalk/aarp.c:68: warning: Function parameter or member 'next' not described in 'aarp_entry' net/appletalk/aarp.c:68: warning: Function parameter or member 'packet_queue' not described in 'aarp_entry' net/appletalk/aarp.c:68: warning: Function parameter or member 'status' not described in 'aarp_entry' net/appletalk/aarp.c:68: warning: Function parameter or member 'target_addr' not described in 'aarp_entry' net/appletalk/aarp.c:68: warning: Function parameter or member 'xmit_count' not described in 'aarp_entry' net/appletalk/ddp.c:1422: warning: Function parameter or member 'dev' not described in 'atalk_rcv' net/appletalk/ddp.c:1422: warning: Function parameter or member 'orig_dev' not described in 'atalk_rcv' net/appletalk/ddp.c:1422: warning: Function parameter or member 'pt' not described in 'atalk_rcv' net/appletalk/ddp.c:1422: warning: Function parameter or member 'skb' not described in 'atalk_rcv' Signed-off-by: Andrew Lunn Link: https://lore.kernel.org/r/20201028005527.930388-1-andrew@lunn.ch Signed-off-by: Jakub Kicinski commit 294ea29113104487a905d0f81c00dfd64121b3d9 Author: Andrew Lunn Date: Wed Oct 28 01:53:50 2020 +0100 net: netlabel: Fix kerneldoc warnings net/netlabel/netlabel_calipso.c:376: warning: Function parameter or member 'ops' not described in 'netlbl_calipso_ops_register' Signed-off-by: Andrew Lunn Acked-by: Paul Moore Link: https://lore.kernel.org/r/20201028005350.930299-1-andrew@lunn.ch Signed-off-by: Jakub Kicinski commit 9d637f8113deef57bbeb141a2c1a4eb00e8c14c4 Author: Andrew Lunn Date: Wed Oct 28 01:50:59 2020 +0100 net: l3mdev: Fix kerneldoc warning net/l3mdev/l3mdev.c:249: warning: Function parameter or member 'arg' not described in 'l3mdev_fib_rule_match' Signed-off-by: Andrew Lunn Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20201028005059.930192-1-andrew@lunn.ch Signed-off-by: Jakub Kicinski commit 210bba6790dc150c0dd65da2cbc4de39e5fa3a74 Author: Andrew Lunn Date: Wed Oct 28 01:48:49 2020 +0100 net: openvswitch: Fix kerneldoc warnings net/openvswitch/flow.c:303: warning: Function parameter or member 'key_vh' not described in 'parse_vlan_tag' net/openvswitch/flow.c:303: warning: Function parameter or member 'skb' not described in 'parse_vlan_tag' net/openvswitch/flow.c:303: warning: Function parameter or member 'untag_vlan' not described in 'parse_vlan_tag' net/openvswitch/vport.c:122: warning: Function parameter or member 'parms' not described in 'ovs_vport_alloc' Signed-off-by: Andrew Lunn Link: https://lore.kernel.org/r/20201028004849.930094-1-andrew@lunn.ch Signed-off-by: Jakub Kicinski commit 8756f474cb9e76cf27c230ceb485228a6f7fb8d1 Author: Andrew Lunn Date: Wed Oct 28 01:46:44 2020 +0100 net: llc: Fix kerneldoc warnings net/llc/llc_conn.c:917: warning: Function parameter or member 'kern' not described in 'llc_sk_alloc' net/llc/llc_conn.c:917: warning: Function parameter or member 'prot' not described in 'llc_sk_alloc' Signed-off-by: Andrew Lunn Link: https://lore.kernel.org/r/20201028004644.929997-1-andrew@lunn.ch Signed-off-by: Jakub Kicinski commit bfa45445be797b47f83c62e469d01ca1a4df3ef4 Merge: b3b7e64bcbcb4 79b1119b851d1 Author: Jakub Kicinski Date: Fri Oct 30 11:31:46 2020 -0700 Merge branch 'markup-some-printk-like-functions' Andrew Lunn says: ==================== Markup some printk like functions W=1 warns of functions which look like printk but don't have attributes so the compile can check that arguments matches the format string. ==================== Link: https://lore.kernel.org/r/20201028003849.929490-1-andrew@lunn.ch Signed-off-by: Jakub Kicinski commit 79b1119b851d11f78b0e33b072f0bd6f347421b5 Author: Andrew Lunn Date: Wed Oct 28 01:38:49 2020 +0100 net: tipc: Add __printf() markup to fix -Wsuggest-attribute=format net/tipc/netlink_compat.c: In function ‘tipc_tlv_sprintf’: net/tipc/netlink_compat.c:137:2: warning: function ‘tipc_tlv_sprintf’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] 137 | n = vscnprintf(buf, rem, fmt, args); Signed-off-by: Andrew Lunn Signed-off-by: Jakub Kicinski commit c7bb86885e0a4712d8a8eff9816f43454e4cc5db Author: Andrew Lunn Date: Wed Oct 28 01:38:48 2020 +0100 net: dccp: Add __printf() markup to fix -Wsuggest-attribute=format net/dccp/ccid.c: In function ‘ccid_kmem_cache_create’: net/dccp/ccid.c:85:2: warning: function ‘ccid_kmem_cache_create’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] 85 | vsnprintf(slab_name_fmt, CCID_SLAB_NAME_LENGTH, fmt, args); Signed-off-by: Andrew Lunn Signed-off-by: Jakub Kicinski commit b3b7e64bcbcb46542650d1980ea22ff25f0332ee Author: Andrew Lunn Date: Wed Oct 28 01:43:33 2020 +0100 net: tipc: Fix parameter types passed to %s formater Now that the compiler is performing printf checking, we get the warning: net/tipc/netlink_compat.c: In function ‘tipc_nl_compat_link_stat_dump’: net/tipc/netlink_compat.c:591:39: warning: format ‘%s’ expects argument of type ‘char *’, but argument 3 has type ‘void *’ [-Wformat=] 591 | tipc_tlv_sprintf(msg->rep, "\nLink <%s>\n", | ~^ | | | char * | %p 592 | nla_data(link[TIPC_NLA_LINK_NAME])); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | void * There is no nla_string(), so cast to a char *. Signed-off-by: Andrew Lunn Link: https://lore.kernel.org/r/20201028004333.929816-1-andrew@lunn.ch Signed-off-by: Jakub Kicinski commit bdd088ce5bfd32b95ab1bd90b49405e7c1f1fff5 Author: Brent Lu Date: Sat Oct 31 01:05:59 2020 +0800 ASoC: intel: sof_rt5682: Add quirk for Dooly This DMI product family string of this board is "Google_Hatch" so the DMI quirk will take place. However, this board is using rt1015 speaker amp instead of max98357a specified in the quirk. Therefore, we need an new DMI quirk for this board. Signed-off-by: Brent Lu Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20201030170559.20370-3-brent.lu@intel.com Signed-off-by: Mark Brown commit 35249a5684fd01377bb40e20b8a604774cb073d8 Author: Brent Lu Date: Sat Oct 31 01:05:58 2020 +0800 ASoC: intel: sof_rt5682: Add support for cml_rt1015_rt5682 This patch adds the driver data and updates quirk info for cml with rt1015 speaker amp and rt5682 headset codec. Due to different mclk frequency on JSL and CML, we need to use 4 slot TDM 100fs to avoid the SSP m/n counter. Signed-off-by: Brent Lu Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20201030170559.20370-2-brent.lu@intel.com Signed-off-by: Mark Brown commit 9a33e8819b346864f58d31cf6b60096fd681801b Author: Bas Nieuwenhuizen Date: Fri Sep 4 16:40:52 2020 +0200 drm/amd/display: Clean up GFX9 tiling_flags path. We're unconditionally using modifiers internally for GFX9+ now. Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit faa37f54ce0462b2b5ec99bb8239a568bb8ba8d5 Author: Bas Nieuwenhuizen Date: Mon Jun 8 17:48:50 2020 +0200 drm/amd/display: Expose modifiers. This expose modifier support on GFX9+. Only modifiers that can be rendered on the current GPU are added. This is to reduce the number of modifiers exposed. The HW could expose more, but the best mechanism to decide what to expose without an explosion in modifiers is still to be decided, and in the meantime this should not regress things from pre-modifiers and does not risk regressions as we make up our mind in the future. v2: - Added comment that D on Raven is only valid for 64bpp and will be filtered based on format later. - Removed D tiling modes that weren't useful for 64bpp on GFX10+. v4: Add AMDGPU_FAMILY_VGH case. Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit dfbbfe3c17651fa0fcf2658fb90317df08e52bb2 Author: Bas Nieuwenhuizen Date: Mon Jun 8 14:26:13 2020 +0200 drm/amd/display: Add formats for DCC with 2/3 planes. For DCC we will use 2/3 planes to avoid X rendering to the frontbuffer with DCC compressed images. To make this work with the core KMS validation we need to add extra formats with the extra planes. However, due to flexibility we set bpp = 0 for the extra planes and do the validation ourselves. Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 37384b3f17cdedf60ff02f189d7dbb82add0da2c Author: Bas Nieuwenhuizen Date: Mon Jun 8 13:46:06 2020 +0200 drm/amd/display: Set DC options from modifiers. This sets the DC tiling options from the modifier, if modifiers are used for the FB. This patch by itself does not expose the support yet though. There is not much validation yet to limit the scope of this patch, but the current validation is at the same level as the BO metadata path. v2: Add modifier check to should_reset_plane. Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit a32419911f0a830db8918f6d849e0d7b4a057705 Author: Bas Nieuwenhuizen Date: Tue Jun 2 16:15:04 2020 +0200 drm/amd/display: Refactor surface tiling setup. Prepare for inserting modifiers based configuration, while sharing a bunch of DCC validation & initializing the device-based configuration. Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Alex Deucher Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 08d769151dc9690a418e974312e761989a095371 Author: Bas Nieuwenhuizen Date: Wed Sep 2 18:57:45 2020 +0200 drm/amd/display: Convert tiling_flags to modifiers. This way the modifier path gets exercised all the time, improving testing. Furthermore, for modifiers this is required as getfb2 will always return the modifier if the driver sets allow_fb_modifiers. This only triggers once allow_fb_modifiers is set. Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 6eed95b00b45ca241dbec6f684967925bfdfb0e5 Author: Bas Nieuwenhuizen Date: Wed Sep 2 14:22:38 2020 +0200 drm/amd/display: Store tiling_flags in the framebuffer. This moves the tiling_flags to the framebuffer creation. This way the time of the "tiling" decision is the same as it would be with modifiers. Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Alex Deucher Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 8ba16d5993749c3f31fd2b49e16f0dc1e1770b9c Author: Bas Nieuwenhuizen Date: Sat May 30 12:58:17 2020 +0200 drm/fourcc: Add AMD DRM modifiers. This adds modifiers for GFX9+ AMD GPUs. As the modifiers need a lot of parameters I split things out in getters and setters. - Advantage: simplifies the code a lot - Disadvantage: Makes it harder to check that you're setting all the required fields. The tiling modes seem to change every generation, but the structure of what each tiling mode is good for stays really similar. As such the core of the modifier is - the tiling mode - a version. Not explicitly a GPU generation, but splitting out a new set of tiling equations. Sometimes one or two tiling modes stay the same and for those we specify a canonical version. Then we have a bunch of parameters on how the compression works. Different HW units have different requirements for these and we actually have some conflicts here. e.g. the render backends need a specific alignment but the display unit only works with unaligned compression surfaces. To work around that we have a DCC_RETILE option where both an aligned and unaligned compression surface are allocated and a writer has to sync the aligned surface to the unaligned surface on handoff. Finally there are some GPU parameters that participate in the tiling equations. These are constant for each GPU on the rendering/texturing side. The display unit is very flexible however and supports all of them :| Some estimates: - Single GPU, render+texture: ~10 modifiers - All possible configs in a gen, display: ~1000 modifiers - Configs of actually existing GPUs in a gen: ~100 modifiers For formats with a single plane everything gets put in a separate DRM plane. However, this doesn't fit for some YUV formats, so if the format has >1 plane, we let the driver pack the surfaces into 1 DRM plane per format plane. This way we avoid X11 rendering onto the frontbuffer with DCC, but still fit into 4 DRM planes. Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit be7b9b327e79cd2db07b659af599867b629b2f66 Author: Bas Nieuwenhuizen Date: Sat Dec 21 19:05:37 2019 +0100 drm/amd/display: Honor the offset for plane 0. With modifiers I'd like to support non-dedicated buffers for images. Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Alex Deucher Reviewed-by: Nicholas Kazlauskas Cc: stable@vger.kernel.org # 5.1.0 Signed-off-by: Alex Deucher commit 53f4cb8b5580a20d01449a7d8e1cbfdaed9ff6b6 Author: Bas Nieuwenhuizen Date: Wed May 16 02:40:23 2018 +0200 drm/amd: Init modifier field of helper fb. Otherwise the field ends up being used uninitialized when enabling modifiers, failing validation with high likelyhood. v4: Use memset Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Alex Deucher (for v1) Signed-off-by: Alex Deucher commit b35ce7b364ec80b54f48a8fdf9fb74667774d2da Author: Bas Nieuwenhuizen Date: Thu Jan 2 13:40:49 2020 +0100 drm/amd/display: Do not silently accept DCC for multiplane formats. Silently accepting it could result in corruption. Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Alex Deucher Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit e31ae352b77627666a06342373257d050971956f Author: Evan Quan Date: Wed Oct 28 10:33:04 2020 +0800 drm/amd/pm: fix compile warnings about variable used uninitialized Fix the compile warnings below: >> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:1743:13: warning: variable 'min' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] >> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:1743:13: warning: variable 'max' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] Signed-off-by: Evan Quan Reported-by: kernel test robot Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 660b3bd82b4f4bb777f5a3d1910ad2cb81f44918 Author: Evan Quan Date: Wed Oct 28 10:20:30 2020 +0800 drm/amd/pm: fix compile warning about missing prototype for function Fix the warning below: >> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1234:29: warning: no previous prototype for function 'asic_internal_ss_get_ss_table' [-Wmissing-prototypes] ATOM_ASIC_INTERNAL_SS_INFO *asic_internal_ss_get_ss_table(void *device) ^ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1234:1: note: declare 'static' if the function is not intended to be used outside of this translation unit ATOM_ASIC_INTERNAL_SS_INFO *asic_internal_ss_get_ss_table(void *device) ^ static 1 warning generated. Signed-off-by: Evan Quan Reported-by: kernel test robot Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 0bc1bf241de551842535c3d0b080e0f38c11aed1 Author: Clément Péron Date: Fri Oct 30 15:46:47 2020 +0100 ASoC: sun4i-i2s: Document H3 with missing RX channel possibility Like A83T the Allwinner H3 doesn't have the DMA reception available for some audio interfaces. As it's already documented for A83T convert this to an enum and add the H3 interface. Acked-by: Rob Herring Signed-off-by: Clément Péron Link: https://lore.kernel.org/r/20201030144648.397824-15-peron.clem@gmail.com Signed-off-by: Mark Brown commit e84f44ba4604e55a51e7caf01464f220d0eabef4 Author: Jernej Skrabec Date: Fri Oct 30 15:46:43 2020 +0100 ASoC: sun4i-i2s: Add H6 compatible H6 I2S is very similar to H3, except that it supports up to 16 channels and thus few registers have fields on different position. Signed-off-by: Jernej Skrabec Signed-off-by: Marcus Cooper Acked-by: Maxime Ripard Acked-by: Rob Herring Acked-by: Chen-Yu Tsai Signed-off-by: Clément Péron Link: https://lore.kernel.org/r/20201030144648.397824-11-peron.clem@gmail.com Signed-off-by: Mark Brown commit 08c7b7d546fddce76d500e5e5767aa08836f7cae Author: Clément Péron Date: Fri Oct 30 15:46:42 2020 +0100 ASoC: sun4i-i2s: fix coding-style for callback definition Checkpatch script produces warning: WARNING: function definition argument 'const struct sun4i_i2s *' should also have an identifier name. Let's fix this by adding identifier name to get_bclk_parent_rate() and set_fmt() callback definition. Acked-by: Maxime Ripard Signed-off-by: Clément Péron Link: https://lore.kernel.org/r/20201030144648.397824-10-peron.clem@gmail.com Signed-off-by: Mark Brown commit 38d7adc0a003298013786cfffe5f4cc907009d30 Author: Samuel Holland Date: Fri Oct 30 15:46:41 2020 +0100 ASoC: sun4i-i2s: Fix setting of FIFO modes Because SUN4I_I2S_FIFO_CTRL_REG is volatile, writes done while the regmap is cache-only are ignored. To work around this, move the configuration to a callback that runs while the ASoC core has a runtime PM reference to the device. Signed-off-by: Samuel Holland Reviewed-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Clément Péron Link: https://lore.kernel.org/r/20201030144648.397824-9-peron.clem@gmail.com Signed-off-by: Mark Brown commit 64359246abe4421ad409be5b0bc9a534caa18b7d Author: Clément Péron Date: Fri Oct 30 15:46:40 2020 +0100 ASoC: sun4i-i2s: Fix sun8i volatile regs The FIFO TX reg is volatile and sun8i i2s register mapping is different from sun4i. Even if in this case it's doesn't create an issue, Avoid setting some regs that are undefined in sun8i. Acked-by: Maxime Ripard Reviewed-by: Chen-Yu Tsai Signed-off-by: Clément Péron Link: https://lore.kernel.org/r/20201030144648.397824-8-peron.clem@gmail.com Signed-off-by: Mark Brown commit 6ad7ca6297f8679162ee62ed672b603e8d004146 Author: Marcus Cooper Date: Fri Oct 30 15:46:39 2020 +0100 ASoC: sun4i-i2s: Add 20 and 24 bit support Extend the functionality of the driver to include support of 20 and 24 bits per sample. Signed-off-by: Marcus Cooper Acked-by: Maxime Ripard Reviewed-by: Chen-Yu Tsai Signed-off-by: Clément Péron Link: https://lore.kernel.org/r/20201030144648.397824-7-peron.clem@gmail.com Signed-off-by: Mark Brown commit d8659dd9a13ce7a92c017c352aea1c390f300937 Author: Marcus Cooper Date: Fri Oct 30 15:46:38 2020 +0100 ASoC: sun4i-i2s: Set sign extend sample On the newer SoCs such as the H3 and A64 this is set by default to transfer a 0 after each sample in each slot. However the A10 and A20 SoCs that this driver was developed on had a default setting where it padded the audio gain with zeros. This isn't a problem while we have only support for 16bit audio but with larger sample resolution rates in the pipeline then SEXT bits should be cleared so that they also pad at the LSB. Without this the audio gets distorted. Set sign extend sample for all the sunxi generations even if they are not affected. This will keep consistency and avoid relying on default. Signed-off-by: Marcus Cooper Reviewed-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Clément Péron Link: https://lore.kernel.org/r/20201030144648.397824-6-peron.clem@gmail.com Signed-off-by: Mark Brown commit 9c2d255f0e63f8e54bd8345f9c59c4060cf4bbd4 Author: Clément Péron Date: Fri Oct 30 15:46:37 2020 +0100 ASoC: sun4i-i2s: Change get_sr() and get_wss() to be more explicit We are actually using a complex formula to just return a bunch of simple values. Also this formula is wrong for sun4i when calling get_wss() the function return 4 instead of 3. Replace this with a simpler switch case. Also drop the i2s params which is unused and return a simple int as returning an error code could be out of range for an s8 and there is no optim to return a s8 here. Fixes: 619c15f7fac9 ("ASoC: sun4i-i2s: Change SR and WSS computation") Reviewed-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Clément Péron Link: https://lore.kernel.org/r/20201030144648.397824-5-peron.clem@gmail.com Signed-off-by: Mark Brown commit 73adf87b7a5882408b0a17da59e69df4be12a968 Author: Jernej Skrabec Date: Fri Oct 30 15:46:36 2020 +0100 ASoC: sun4i-i2s: Add support for H6 I2S H6 I2S is very similar to that in H3, except it supports up to 16 channels. Signed-off-by: Jernej Skrabec Signed-off-by: Marcus Cooper Reviewed-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Clément Péron Link: https://lore.kernel.org/r/20201030144648.397824-4-peron.clem@gmail.com Signed-off-by: Mark Brown commit c779e2de0ac6156bea63e759481ee383587336cc Author: Clément Péron Date: Fri Oct 30 15:46:35 2020 +0100 ASoC: sun4i-i2s: Change set_chan_cfg() params As slots and slot_width can be set manually using set_tdm(). These values are then kept in sun4i_i2s struct. So we need to check if these values are set or not. This is not done actually and will trigger a bug. For example, if we set to the simple soundcard in the device-tree dai-tdm-slot-width = <32> and then start a stream using S16_LE, currently we would calculate BCLK for 32-bit slots, but program lrck_period for 16-bit slots, making the sample rate double what we expected. To fix this, we need to check if these values are set or not but as this logic is already done by the caller. Avoid duplicating this logic and just pass the required values as params to set_chan_cfg(). Suggested-by: Samuel Holland Acked-by: Maxime Ripard Signed-off-by: Clément Péron Link: https://lore.kernel.org/r/20201030144648.397824-3-peron.clem@gmail.com Signed-off-by: Mark Brown commit 93c0210671d8f3ec2262da703fab93a1497158a8 Author: Clément Péron Date: Fri Oct 30 15:46:34 2020 +0100 ASoC: sun4i-i2s: Fix lrck_period computation for I2S justified mode Left and Right justified mode are computed using the same formula as DSP_A and DSP_B mode. Which is wrong and the user manual explicitly says: LRCK_PERDIOD: PCM Mode: Number of BCLKs within (Left + Right) channel width. I2S/Left-Justified/Right-Justified Mode: Number of BCLKs within each individual channel width(Left or Right) Fix this by using the same formula as the I2S mode. Fixes: 7ae7834ec446 ("ASoC: sun4i-i2s: Add support for DSP formats") Signed-off-by: Clément Péron Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/20201030144648.397824-2-peron.clem@gmail.com Signed-off-by: Mark Brown commit 23306008edd9bd21785229a0b8d13e20c3e05419 Merge: 043d2be2a7820 414ea37541498 Author: Jakub Kicinski Date: Fri Oct 30 10:50:32 2020 -0700 Merge branch 'selftests-net-bridge-add-tests-for-igmpv3' Nikolay Aleksandrov says: ==================== selftests: net: bridge: add tests for IGMPv3 This set adds tests for the bridge's new IGMPv3 support. The tests use precooked packets which are sent via mausezahn and the resulting state after each test is checked for proper X,Y sets, (*,G) source list, source list entry timers, (S,G) existence and flags, packet forwarding and blocking, exclude group expiration and (*,G) auto-add. The first 3 patches prepare the existing IGMPv2 tests, then patch 4 adds new helpers which are used throughout the rest of the v3 tests. The following new tests are added: - base case: IGMPv3 report 239.10.10.10 is_include (A) - include -> allow report - include -> is_include report - include -> is_exclude report - include -> to_exclude report - exclude -> allow report - exclude -> is_include report - exclude -> is_exclude report - exclude -> to_exclude report - include -> block report - exclude -> block report - exclude timeout (move to include + entry deletion) - S,G port entry automatic add to a *,G,exclude port The variable names and set notation are the same as per RFC 3376, for more information check RFC 3376 sections 4.2.15 and 6.4.1. MLDv2 tests will be added by a separate patch-set. ==================== Link: https://lore.kernel.org/r/20201027185934.227040-1-razor@blackwall.org Signed-off-by: Jakub Kicinski commit 414ea3754149847ec9491de9e9923750f5447331 Author: Nikolay Aleksandrov Date: Tue Oct 27 20:59:34 2020 +0200 selftests: net: bridge: add test for igmpv3 *,g auto-add When we have *,G ports in exclude mode and a new S,G,port is added the kernel has to automatically create an S,G entry for each exclude port to get proper forwarding. Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 18f66c96ea585ca7bdd5c75eae3077566b0d73c0 Author: Nikolay Aleksandrov Date: Tue Oct 27 20:59:33 2020 +0200 selftests: net: bridge: add test for igmpv3 exclude timeout Test that when a group in exclude mode expires it changes mode to include and the blocked entries are deleted. Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 9eb58e07470bfb5a1c1d4ae08806b82d662171f7 Author: Nikolay Aleksandrov Date: Tue Oct 27 20:59:32 2020 +0200 selftests: net: bridge: add test for igmpv3 exc -> block report The test checks for the following case: state report result action EXCLUDE (X,Y) BLOCK (A) EXCLUDE (X+(A-Y),Y) (A-X-Y)=Group Timer Send Q(G,A-Y) Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 80899f1b1c05a07f907bc54d6dc5bdadb37ab4f1 Author: Nikolay Aleksandrov Date: Tue Oct 27 20:59:31 2020 +0200 selftests: net: bridge: add test for igmpv3 inc -> block report The test checks for the following case: state report result action INCLUDE (A) BLOCK (B) INCLUDE (A) Send Q(G,A*B) Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 65bfc146ab95ad980134fe206467d1d7108e402e Author: Nikolay Aleksandrov Date: Tue Oct 27 20:59:30 2020 +0200 selftests: net: bridge: add test for igmpv3 exc -> to_exclude report The test checks for the following case: state report result action EXCLUDE (X,Y) TO_EX (A) EXCLUDE (A-Y,Y*A) (A-X-Y)=Group Timer Delete (X-A) Delete (Y-A) Send Q(G,A-Y) Group Timer=GMI Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 7b4f7138221a483e7642e582518814d579edf36a Author: Nikolay Aleksandrov Date: Tue Oct 27 20:59:29 2020 +0200 selftests: net: bridge: add test for igmpv3 exc -> is_exclude report The test checks for the following case: state report result action EXCLUDE (X,Y) IS_EX (A) EXCLUDE (A-Y,Y*A) (A-X-Y)=GMI Delete (X-A) Delete (Y-A) Group Timer=GMI Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit e7e7ab7c00c2ecffa64defb54fe938d61fc19d39 Author: Nikolay Aleksandrov Date: Tue Oct 27 20:59:28 2020 +0200 selftests: net: bridge: add test for igmpv3 exc -> is_include report The test checks for the following case: state report result action EXCLUDE (X,Y) IS_IN (A) EXCLUDE (X+A,Y-A) (A)=GMI Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit eecd8cfdff1b9e437ca9162d058de0cee68c1fe6 Author: Nikolay Aleksandrov Date: Tue Oct 27 20:59:27 2020 +0200 selftests: net: bridge: add test for igmpv3 exc -> allow report The test checks for the following case: state report result action EXCLUDE (X,Y) ALLOW (A) EXCLUDE (X+A,Y-A) (A)=GMI Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 735af7bec0f128e67192512854db459f61b1c278 Author: Nikolay Aleksandrov Date: Tue Oct 27 20:59:26 2020 +0200 selftests: net: bridge: add test for igmpv3 inc -> to_exclude report The test checks for the following case: state report result action INCLUDE (A) TO_EX (B) EXCLUDE (A*B,B-A) (B-A)=0 Delete (A-B) Send Q(G,A*B) Group Timer=GMI Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 3c8b9fdad00481dfb0ca4ce81a5fec6c18fd77bc Author: Nikolay Aleksandrov Date: Tue Oct 27 20:59:25 2020 +0200 selftests: net: bridge: add test for igmpv3 inc -> is_exclude report The test checks for the following case: state report result action INCLUDE (A) IS_EX (B) EXCLUDE (A*B,B-A) (B-A)=0 Delete (A-B) Group Timer=GMI Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 47021771064cc99fd106783ddc698b76684ec3f0 Author: Nikolay Aleksandrov Date: Tue Oct 27 20:59:24 2020 +0200 selftests: net: bridge: add test for igmpv3 inc -> is_include report The test checks for the following case: state report result action INCLUDE (A) IS_IN (B) INCLUDE (A+B) (B)=GMI Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 98ae11cf8104a27fcd3dddaed4714be0600df419 Author: Nikolay Aleksandrov Date: Tue Oct 27 20:59:23 2020 +0200 selftests: net: bridge: add tests for igmpv3 is_include and inc -> allow reports First we test is_include/include mode then we build on that with allow effectively achieving: state report result action INCLUDE (A) ALLOW (B) INCLUDE (A+B) (B)=GMI Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 68d3163a4b7e50bc8e9bbf689d55174fdcd44fa5 Author: Nikolay Aleksandrov Date: Tue Oct 27 20:59:22 2020 +0200 selftests: net: bridge: igmp: add IGMPv3 entries' state helpers Add helpers which will be used in subsequent tests, they are: - check_sg_entries: check for proper source list and S,G entry existence - check_sg_fwding: check for proper traffic forwarding/blocking - check_sg_state: check for proper blocked/forwarding entry state Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit f0e260db4c9e0576b2092f30bddd6816f9d37383 Author: Nikolay Aleksandrov Date: Tue Oct 27 20:59:21 2020 +0200 selftests: net: bridge: igmp: check for specific udp ip protocol We have to specifically check for udp protocol in addition to the mac address because in IGMPv3 tests group-specific queries will use the same mac address. Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 79ae3e256aa1cfaa801e23a13b7f9e1a49cacb20 Author: Nikolay Aleksandrov Date: Tue Oct 27 20:59:20 2020 +0200 selftests: net: bridge: igmp: add support for packet source address Add support for one more argument which specifies the source address to use. It will be later used for IGMPv3 S,G entry testing. Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 7afc9d8f82906754e16fce560fb4e9733bb9b75e Author: Nikolay Aleksandrov Date: Tue Oct 27 20:59:19 2020 +0200 selftests: net: bridge: rename current igmp tests to igmpv2 To prepare the bridge_igmp.sh for IGMPv3 we need to rename the current test to IGMPv2. Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 043d2be2a78202fceb31647cc1802e0183ce09e2 Author: Andy Shevchenko Date: Tue Oct 27 20:21:46 2020 +0200 net: phy: leds: Deduplicate link LED trigger registration Refactor phy_led_trigger_register() and deduplicate its functionality when registering LED trigger for link. Signed-off-by: Andy Shevchenko Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20201027182146.21355-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jakub Kicinski commit be1c7eae8c7dfc84b826ca7796d90f36d4abf58a Author: Vineetha G. Jaya Kumaran Date: Wed Oct 28 00:00:51 2020 +0800 net: stmmac: Enable EEE HW LPI timer with auto SW/HW switching This patch enables the HW LPI Timer which controls the automatic entry and exit of the LPI state. The EEE LPI timer value is configured through ethtool. The driver will auto select the LPI HW timer if the value in the HW timer supported range. Else, the driver will fallback to SW timer. Signed-off-by: Vineetha G. Jaya Kumaran Signed-off-by: Voon Weifeng Link: https://lore.kernel.org/r/20201027160051.22898-1-weifeng.voon@intel.com Signed-off-by: Jakub Kicinski commit 8911097fbfb322d234be8b4441ebd5c2ac53f1a4 Merge: 72671b355f9da f54ec58fee837 Author: Jakub Kicinski Date: Fri Oct 30 09:07:37 2020 -0700 Merge tag 'wimax-staging' of git://git.kernel.org:/pub/scm/linux/kernel/git/arnd/playground Arnd Bergmann says: ==================== wimax: move to staging After I sent a fix for what appeared to be a harmless warning in the wimax user interface code, the conclusion was that the whole thing has most likely not been used in a very long time, and the user interface possibly been broken since b61a5eea5904 ("wimax: use genl_register_family_with_ops()"). Using a shared branch between net-next and staging should help coordinate patches getting submitted against it. ==================== Signed-off-by: Jakub Kicinski commit 72671b355f9daaf4b8b9b5f13138b17c67e2959d Author: Jon Maloy Date: Thu Oct 29 21:29:38 2020 -0400 tipc: add stricter control of reserved service types TIPC reserves 64 service types for current and future internal use. Therefore, the bind() function is meant to block regular user sockets from being bound to these values, while it should let through such bindings from internal users. However, since we at the design moment saw no way to distinguish between regular and internal users the filter function ended up with allowing all bindings of the reserved types which were really in use ([0,1]), and block all the rest ([2,63]). This is risky, since a regular user may bind to the service type representing the topology server (TIPC_TOP_SRV == 1) or the one used for indicating neighboring node status (TIPC_CFG_SRV == 0), and wreak havoc for users of those services, i.e., most users. The reality is however that TIPC_CFG_SRV never is bound through the bind() function, since it doesn't represent a regular socket, and TIPC_TOP_SRV can also be made to bypass the checks in tipc_bind() by introducing a different entry function, tipc_sk_bind(). It should be noted that although this is a change of the API semantics, there is no risk we will break any currently working applications by doing this. Any application trying to bind to the values in question would be badly broken from the outset, so there is no chance we would find any such applications in real-world production systems. v2: Added warning printout when a user is blocked from binding, as suggested by Jakub Kicinski Acked-by: Yung Xue Signed-off-by: Jon Maloy Link: https://lore.kernel.org/r/20201030012938.489557-1-jmaloy@redhat.com Signed-off-by: Jakub Kicinski commit 183245c4f204bc1458163388c8de8ddfc032a607 Author: Geert Uytterhoeven Date: Wed Oct 28 15:15:04 2020 +0100 gpio: rcar: Implement gpio_chip.get_multiple() Add support for getting the state of multiple pins using a minimum of register reads. Signed-off-by: Geert Uytterhoeven Signed-off-by: Bartosz Golaszewski commit 208c80f14b5935edb9f3881c489dcc83742d8916 Author: Geert Uytterhoeven Date: Wed Oct 28 15:15:03 2020 +0100 gpio: rcar: Rework hardware features handling Reuse gpio_rcar_info inside gpio_rcar_priv instead of duplicating the individual members, so gpio_rcar_parse_dt() can copy them in one go. Signed-off-by: Geert Uytterhoeven Signed-off-by: Bartosz Golaszewski commit 677d7d613a61de948056cc8b3e4b881df5cd795c Author: Geert Uytterhoeven Date: Wed Oct 28 15:15:02 2020 +0100 gpio: rcar: Align register offsets Improve readability by aligning the offsets in the register definitions. Signed-off-by: Geert Uytterhoeven Signed-off-by: Bartosz Golaszewski commit 714d3a295854c14295fc633be1abbb947d2059a1 Author: Geert Uytterhoeven Date: Wed Oct 28 15:15:01 2020 +0100 gpio: rcar: Cache gpiochip_get_data() return value Since commit 43c54ecade400cf6 ("gpio: move the subdriver data pointer into gpio_device") changed gpiochip_get_data() to an out-of-line function, it is now worthwhile to avoid multiple calls in a row by caching its return value in a local variable. Signed-off-by: Geert Uytterhoeven Signed-off-by: Bartosz Golaszewski commit 5e2ca893d772560a0926a31b88f8c83efbc6b058 Author: Kent Gibson Date: Thu Oct 29 16:48:32 2020 +0800 gpiolib: cdev: add GPIO_V2_LINE_FLAG_EDGE_BOTH and use it in edge_irq_thread() Add GPIO_V2_LINE_FLAG_EDGE_BOTH macro and use it in edge_irq_thread() to improve readability of edge handling cases. Suggested-by: Andy Shevchenko Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit 4612bad5701e158f3c40951f2c7aa8e64b3445eb Author: Guido Günther Date: Thu Oct 29 15:20:56 2020 +0100 drm/etnaviv: Add lockdep annotations for context lock etnaviv_iommu_find_iova has it so etnaviv_iommu_insert_exact and lockdep_assert_held should have it as well. Signed-off-by: Guido Günther Signed-off-by: Lucas Stach commit a0a6d8cb552b20dc94d8a40d88126d8548fd7124 Author: Ville Syrjälä Date: Wed Oct 28 23:33:23 2020 +0200 drm/i915: Get rid of ibx_irq_pre_postinstall() ibx_irq_pre_postinstall() looks totally pointless. We can just init both SDEIMR and SDEIER at the same time before enabling the master interrupt. It's equally racy as the other order due to doing all of this from the postinstall stage with the interrupt handler already in place. That is, safe with MSI but racy with shared legacy interrupts. Fortunately we should have MSI on all ilk+. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201028213323.5423-20-ville.syrjala@linux.intel.com Reviewed-by: Lucas De Marchi commit 9696f041910284041a39c81afbd8809d6d781cda Author: Ville Syrjälä Date: Wed Oct 28 23:33:22 2020 +0200 drm/i915: Use GEN3_IRQ_INIT() to init south interrupts in icp+ No reason not to use GEN3_IRQ_INIT() on icp+. Reviewed-by: Lucas De Marchi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201028213323.5423-19-ville.syrjala@linux.intel.com commit 2ea63927b6f677f250e26126c7e822679c20a460 Author: Ville Syrjälä Date: Wed Oct 28 23:33:21 2020 +0200 drm/i915: Enable hpd logic only for ports that are present Let's enable the hardware hpd logic only for the ports we can actually use. In theory this may save some miniscule amounts of power, and more importantly it eliminates a lot if platform specific codepaths since the generic thing can now deal with any combination of ports being present on each SKU. v2: Deal with DG1 v3: Deal with DG1 some more Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201028213323.5423-18-ville.syrjala@linux.intel.com Reviewed-by: Lucas De Marchi commit 23fc86eb2f30fc975e5705bb1a2cf92956d2edd7 Author: Tudor Ambarus Date: Fri Oct 30 14:11:16 2020 +0200 spi: atmel: Downgrade to dev_dbg when dma_request_chan() fails The IP's DMA capabilities are described in the SoC dtsi, to spare users duplicating the DMA bindings in their board device tree. Users that don't want to use DMA, have to overwrite the DMA bindings in their board device tree. An example is: commit ddcdaeb88242 ("ARM: dts: at91: sama5d2: Add DMA bindings for the SPI and UART flx4 functions") When the DMA bindings are overwritten, one could see on the console: atmel_spi fc018400.spi: error -ENODEV: No TX DMA channel, DMA is disabled atmel_spi fc018400.spi: Atmel SPI Controller using PIO only Choosing to not use DMA is not a reason to print an error message. More, the user is already informed when PIO is used: "Atmel SPI Controller using PIO only". Downgrade to dev_dbg when dma_request_chan() fails. Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20201030121116.869105-1-tudor.ambarus@microchip.com Signed-off-by: Mark Brown commit ec6869b096f10526df14d9972a60ebffef72f0b9 Author: Michał Mirosław Date: Wed Oct 28 23:48:05 2020 +0100 ASoC: tegra20-spdif: remove "default m" Make tegra20-spdif default to N as all other drivers do. Signed-off-by: Michał Mirosław Fixes: 774fec338bfc ("ASoC: Tegra: Implement SPDIF CPU DAI") Link: https://lore.kernel.org/r/8756eb5aac561173aa222c9cb64dd314ab1b1f9b.1603925200.git.mirq-linux@rere.qmqm.pl Signed-off-by: Mark Brown commit e76ab2cf21c38331155ea613cdf18582f011c30f Author: Ville Syrjälä Date: Wed Oct 28 23:33:20 2020 +0200 drm/i915: Remove per-platform IIR HPD masking We no longer unmask all HPD irqs, so we can drop the ugly per-platform HPD IIR masking. IMR will prevent unsupported bits from appearing in IIR. v2: Deal with DG1 Include "HOTPLUG" in the mask names (Lucas) v3: Fix typos in subject Reviewed-by: Lucas De Marchi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201028213323.5423-17-ville.syrjala@linux.intel.com commit 9a55a6208532bc78d35c79b984dda4bd5d8388d8 Author: Ville Syrjälä Date: Wed Oct 28 23:33:19 2020 +0200 drm/i915: Rename 'tmp_mask' Replace this silly tmp_mask with hotplug_trigger/te_trigger where appropriate. Reviewed-by: Lucas De Marchi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201028213323.5423-16-ville.syrjala@linux.intel.com commit f6576e460de1f835360b511f79cc23d247b34c4f Author: Ville Syrjälä Date: Wed Oct 28 23:33:18 2020 +0200 drm/i915: Don't enable hpd detection logic from irq_postinstall() No reason that I can see why we should enable the hpd detection logic already during irq postinstall phase. We don't even do this on all the platforms. We just need it before we actually enable the hotplug interrupts in .hpd_irq_setup(), and in fact we already do it there as well. Let's just eliminate the redundant early setup. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201028213323.5423-15-ville.syrjala@linux.intel.com Reviewed-by: Lucas De Marchi commit 52c7f5f1833ddca8134b204d0596ed681781f2ab Author: Ville Syrjälä Date: Wed Oct 28 23:33:17 2020 +0200 drm/i915: Split gen11_hpd_detection_setup() into tc vs. tbt variants No reason to stuff both type-c and tbt into the same function. Let's split this so we may more easily handle platforms that lack the tbt spefific bits. Reviewed-by: Lucas De Marchi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201028213323.5423-14-ville.syrjala@linux.intel.com commit a0e066b8de13439cd75afb7378a0a6c44214a76d Author: Ville Syrjälä Date: Wed Oct 28 23:33:16 2020 +0200 drm/i915: Relocate intel_hpd_{enabled,hotplug}_irqs() Move intel_hpd_{enabled,hotplug}_irqs() closes to the beginning of the file so we can use them in more places. No functional changes. Reviewed-by: Lucas De Marchi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201028213323.5423-13-ville.syrjala@linux.intel.com commit 970113595062c26506ce6d5d50ad8403ee0005a8 Author: Ville Syrjälä Date: Wed Oct 28 23:33:15 2020 +0200 drm/i915: s/tc_port/hpd_pin/ in icp+ TC hotplug bits Parametrize the icp+ TC HPD bits using hpd_pin rather than tc_port so it's clear what kind of an animal we're dealing with. Reviewed-by: Lucas De Marchi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201028213323.5423-12-ville.syrjala@linux.intel.com commit 5b76e860010d85c7ba2fc223897fb37fb63bda35 Author: Ville Syrjälä Date: Wed Oct 28 23:33:14 2020 +0200 drm/i915: s/tc_port/hpd_pin/ in GEN11_{TC,TBT}_HOTPLUG() Use hpd_pin instead of tc_port in the GEN11_{TC,TBT}_HOTPLUG() to make it clear what they refer to. Reviewed-by: Lucas De Marchi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201028213323.5423-11-ville.syrjala@linux.intel.com commit 5f371a819705795ce6aa370909bfd7950f80f1eb Author: Ville Syrjälä Date: Wed Oct 28 23:33:13 2020 +0200 drm/i915: s/port/hpd_pin/ for icp+ ddi hpd bits Use hpd_pin instead of port in the parametrized ICP+ DDI HPD macros. Makes it clear what these refer to. v2: Handle DG1 Reviewed-by: Lucas De Marchi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201028213323.5423-10-ville.syrjala@linux.intel.com commit e5abaab30eca51d537b5ecfc01ddbe572d5b9d78 Author: Ville Syrjälä Date: Wed Oct 28 23:33:12 2020 +0200 drm/i915: Introduce GEN8_DE_PORT_HOTPLUG() Unify the BDW/BXT hotplug bits. BDW only has port A, but that matches BXT port A so we can shar the same macro for both. v2: Remember the gvt Reviewed-by: Lucas De Marchi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201028213323.5423-9-ville.syrjala@linux.intel.com commit 8625b221f307efcbc32ac892fdaa5da3d27ba93a Author: Ville Syrjälä Date: Wed Oct 28 23:33:11 2020 +0200 drm/i915: Parametrize BXT_DE_PORT_HP_DDI with hpd_pin Use hpd_pin to parametrize BXT_DE_PORT_HP_DDI() to make it clear these have nothing to do with DDI ports or PHYs as such. The only thing that matters is the HPD pin assignment. v2: Remember the gvt Reviewed-by: Lucas De Marchi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201028213323.5423-8-ville.syrjala@linux.intel.com commit 580bf195cb90fa17c8c4900e4f9ba08c6d590d10 Author: Ville Syrjälä Date: Wed Oct 28 23:33:10 2020 +0200 drm/i915: Use AUX_CH_USBCn for the RKL VBT AUX CH setup As with the VBT DVO port, RKL uses PHY based mapping for the VBT AUX CH. Adjust the code to use the new AUX_USBCn names and add a comment to explain the situation. Reviewed-by: Lucas De Marchi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201028213323.5423-7-ville.syrjala@linux.intel.com commit 570fe6ef6a2882f63319513baac05eeba93bb0dc Author: Ville Syrjälä Date: Wed Oct 28 23:33:09 2020 +0200 drm/i915: Pimp AUX CH names Let's make the AUX CH names match the spec (AUX A-F for pre-tgl, AUX A-C or AUX USBC1-6 for tgl+). And while at it let's include the full encoder name in the AUX CH name as well (as opposed to just using port_name() which wouldn't give us the right thing on tgl+). Reviewed-by: Lucas De Marchi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201028213323.5423-6-ville.syrjala@linux.intel.com commit df034b973da068664f8f94aa01b11e59a9608d65 Author: Ville Syrjälä Date: Wed Oct 28 23:33:08 2020 +0200 drm/i915: Introduce AUX_CH_USBCn Just like with the DDIs tgl+ renamed the AUX CHs to reflect the type of the DDI. Let's add the aliasing enum values for the type-C AUX CHs. Reviewed-by: Lucas De Marchi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201028213323.5423-5-ville.syrjala@linux.intel.com commit 2d709a5a624cd787f0d2563a89cff9ab2d325447 Author: Ville Syrjälä Date: Wed Oct 28 23:33:07 2020 +0200 drm/i915: Give DDI encoders even better names Let's pimp the DDI encoder->name to reflect what the spec calls them. Ie. on pre-tgl DDI A-F, on tgl+ DDI A-C or DDI TC1-6. Also since each encoder is really a combination of the DDI and the PHY we include the PHY name as well. ICL is a bit special since it already has the two different types of DDIs (combo or TC) but it still calls them just DDI A-F regarless of the type. For that let's add an extra "(TC)" note to remind is which type of DDI it really is. The code is darn ugly, but not sure there's much we can do about it. Reviewed-by: Lucas De Marchi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201028213323.5423-4-ville.syrjala@linux.intel.com commit 1d8ca002456b6c504b0af2d159c4776ba6b1ad81 Author: Ville Syrjälä Date: Wed Oct 28 23:33:06 2020 +0200 drm/i915: Add PORT_TCn aliases to enum port Since tgl the DDIs have been named A,B,C,TC1,TC2,TC3... Add the appropriate enum values for the TC DDIs to enum port. v2: Deal with rkl and dg1 Reviewed-by: Lucas De Marchi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201028213323.5423-3-ville.syrjala@linux.intel.com commit 320c670c048d3b178da6129257e8aee517c81e10 Author: Ville Syrjälä Date: Wed Oct 28 23:33:05 2020 +0200 drm/i915: s/PORT_TC/TC_PORT_/ Make the namespacing for enum tc_port better by adding the TC_ to the actual enum values. v2: Drop the extra TC (Lucas) Reviewed-by: Lucas De Marchi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201028213323.5423-2-ville.syrjala@linux.intel.com commit c699e02d83c9877a552ef2d4a89f804fb025112e Merge: c2ec4a6e54100 f54ec58fee837 Author: Greg Kroah-Hartman Date: Fri Oct 30 13:21:09 2020 +0100 Merge tag 'wimax-staging' of git://git.kernel.org:/pub/scm/linux/kernel/git/arnd/playground into staging-next Arnd writes: wimax: move to staging After I sent a fix for what appeared to be a harmless warning in the wimax user interface code, the conclusion was that the whole thing has most likely not been used in a very long time, and the user interface possibly been broken since b61a5eea5904 ("wimax: use genl_register_family_with_ops()"). Using a shared branch between net-next and staging should help coordinate patches getting submitted against it. * tag 'wimax-staging' of git://git.kernel.org:/pub/scm/linux/kernel/git/arnd/playground: wimax: move out to staging wimax: fix duplicate initializer warning commit fa15cec9cc319d276dc5f4b89b7f1119ea9d013d Author: Anson Huang Date: Mon Oct 12 20:44:02 2020 +0800 arm64: dts: imx8mp-evk: Correct WDOG_B pin configuration Different revision of i.MX8MP EVK boards may have different external pull up registor design, some are enabled while some are NOT, to make sure the WDOG_B pin works properly, better to enable internal pull up resistor. Since enabling internal pull up resistor is NOT harmful and having benefit of flexibility on different board design, just enable it for all i.MX8MP boards; And schmitt input is NOT necessary for this WDOG_B output pin, so remove it; Open drain outputs provide more flexibility to a designer as they can be pulled-up to any voltage found in the system, so enable it as well. Signed-off-by: Anson Huang Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit fa88e6e406c3c8ae9cd7f3434c6c4e4b103cb19e Author: Anson Huang Date: Mon Oct 12 20:44:01 2020 +0800 arm64: dts: imx8mn: Correct WDOG_B pin configuration Different revision of i.MX8MN EVK boards may have different external pull up registor design, some are enabled while some are NOT, to make sure the WDOG_B pin works properly, better to enable internal pull up resistor. Since enabling internal pull up resistor is NOT harmful and having benefit of flexibility on different board design, just enable it for all i.MX8MN boards; And schmitt input is NOT necessary for this WDOG_B output pin, so remove it; Open drain outputs provide more flexibility to a designer as they can be pulled-up to any voltage found in the system, so enable it as well. Signed-off-by: Anson Huang Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit b781820927c5fb0dacb2ef986b33e9b3cfc41930 Author: Anson Huang Date: Mon Oct 12 20:44:00 2020 +0800 arm64: dts: imx8mm: Correct WDOG_B pin configuration Different revision of i.MX8MM EVK boards may have different external pull up registor design, some are enabled while some are NOT, to make sure the WDOG_B pin works properly, better to enable internal pull up resistor. Since enabling internal pull up resistor is NOT harmful and having benefit of flexibility on different board design, just enable it for all i.MX8MM boards; And schmitt input is NOT necessary for this WDOG_B output pin, so remove it; Open drain outputs provide more flexibility to a designer as they can be pulled-up to any voltage found in the system, so enable it as well. Signed-off-by: Anson Huang Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit a17d609e3e216c406f7c0cec2a94086a4401ac06 Author: Steven Price Date: Thu Oct 29 17:00:47 2020 +0000 drm/panfrost: Don't corrupt the queue mutex on open/close The mutex within the panfrost_queue_state should have the lifetime of the queue, however it was erroneously initialised/destroyed during panfrost_job_{open,close} which is called every time a client opens/closes the drm node. Move the initialisation/destruction to panfrost_job_{init,fini} where it belongs. Fixes: 1a11a88cfd9a ("drm/panfrost: Fix job timeout handling") Signed-off-by: Steven Price Reviewed-by: Boris Brezillon Signed-off-by: Boris Brezillon Link: https://patchwork.freedesktop.org/patch/msgid/20201029170047.30564-1-steven.price@arm.com commit 03544505cb10ddc73df3b6176e71cdb366834134 Author: Robin Murphy Date: Tue Sep 22 15:16:50 2020 +0100 arm64: dts: meson: Describe G12b GPU as coherent According to a downstream commit I found in the Khadas vendor kernel, the GPU on G12b is wired up for ACE-lite, so (now that Panfrost knows how to handle this properly) we should describe it as such. Otherwise the mismatch leads to all manner of fun with mismatched attributes and inadvertently snooping stale data from caches, which would account for at least some of the brokenness observed on this platform. Signed-off-by: Robin Murphy Tested-by: Neil Armstrong Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/765446e529e50b304af63432da7836c4d31eb8d4.1600780574.git.robin.murphy@arm.com commit 268af50f38b1f2199a2e85e38073d7a25c20190c Author: Robin Murphy Date: Tue Sep 22 15:16:49 2020 +0100 drm/panfrost: Support cache-coherent integrations When the GPU's ACE-Lite interface is fully wired up and capable of snooping CPU caches, it may be described as "dma-coherent" in devicetree, which will already inform the DMA layer not to perform unnecessary cache maintenance. However, we still need to ensure that the GPU uses the appropriate cacheable outer-shareable attributes in order to generate the requisite snoop signals, and that CPU mappings don't create a mismatch by using a non-cacheable type either. Signed-off-by: Robin Murphy Tested-by: Neil Armstrong Reviewed-by: Steven Price Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/7024ce18c1cb1a226e918037d49175571db0b436.1600780574.git.robin.murphy@arm.com commit 728da60da7c1ec1e21ae64648e376666de3c279c Author: Robin Murphy Date: Tue Sep 22 15:16:48 2020 +0100 iommu/io-pgtable-arm: Support coherency for Mali LPAE Midgard GPUs have ACE-Lite master interfaces which allows systems to integrate them in an I/O-coherent manner. It seems that from the GPU's viewpoint, the rest of the system is its outer shareable domain, and so even when snoop signals are wired up, they are only emitted for outer shareable accesses. As such, setting the TTBR_SHARE_OUTER bit does indeed get coherent pagetable walks working nicely for the coherent T620 in the Arm Juno SoC. Signed-off-by: Robin Murphy Tested-by: Neil Armstrong Reviewed-by: Steven Price Acked-by: Will Deacon Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/8df778355378127ea7eccc9521d6427e3e48d4f2.1600780574.git.robin.murphy@arm.com commit 87e218ae976eeffe660aaae2c90e78d3f514f39a Author: Krzysztof Kozlowski Date: Fri Oct 2 18:39:40 2020 +0200 arm64: dts: mediatek: align GPIO hog names with dtschema The convention for node names is to use hyphens, not underscores. dtschema for pca95xx expects GPIO hogs to end with 'hog' suffix. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201002163940.7837-1-krzk@kernel.org Signed-off-by: Matthias Brugger commit 4749f51ddd8aee5c7aa11e6593a54f96374a77ad Author: Dave Jiang Date: Tue Oct 27 10:34:46 2020 -0700 dmaengine: idxd: Add ABI documentation for shared wq Add the sysfs attribute bits in ABI/stable for shared wq support. Signed-off-by: Jing Lin Signed-off-by: Dave Jiang Reviewed-by: Tony Luck Reviewed-by: Dan Williams Link: https://lore.kernel.org/r/160382008649.3911367.10851752182908509837.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit e4f4d8cdeb9a2fe746411c0b9a7538b5c0232c1e Author: Dave Jiang Date: Tue Oct 27 10:34:40 2020 -0700 dmaengine: idxd: Clean up descriptors with fault error Add code to "complete" a descriptor when the descriptor or its completion address hit a fault error when SVA mode is being used. This error can be triggered due to bad programming by the user. A lock is introduced in order to protect the descriptor completion lists since the fault handler will run from the system work queue after being scheduled in the interrupt handler. Signed-off-by: Dave Jiang Reviewed-by: Tony Luck Reviewed-by: Dan Williams Link: https://lore.kernel.org/r/160382008092.3911367.12766483427643278985.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 8e50d392652f20616a136165dff516b86baf5e49 Author: Dave Jiang Date: Tue Oct 27 10:34:35 2020 -0700 dmaengine: idxd: Add shared workqueue support Add shared workqueue support that includes the support of Shared Virtual memory (SVM) or in similar terms On Demand Paging (ODP). The shared workqueue uses the enqcmds command in kernel and will respond with retry if the workqueue is full. Shared workqueue only works when there is PASID support from the IOMMU. Signed-off-by: Dave Jiang Reviewed-by: Tony Luck Reviewed-by: Dan Williams Link: https://lore.kernel.org/r/160382007499.3911367.26043087963708134.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 212a93ca435ec847bdfe238f225dd6e8b77927e9 Author: Krzysztof Kozlowski Date: Mon Oct 19 17:57:56 2020 +0200 dmaengine: ppc4xx: remove xor_hw_desc assignment without reading The xor_hw_desc local variable is assigned but never read: drivers/dma/ppc4xx/adma.c: In function ‘ppc440spe_desc_set_src_mult’: drivers/dma/ppc4xx/adma.c:562:17: warning: variable ‘xor_hw_desc’ set but not used [-Wunused-but-set-variable] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201019155756.21445-2-krzk@kernel.org Signed-off-by: Vinod Koul commit 68f35add4ba4c850a33878633e10c02d7ba32d84 Author: Krzysztof Kozlowski Date: Mon Oct 19 17:57:55 2020 +0200 dmaengine: ppc4xx: make ppc440spe_adma_chan_list static The ppc440spe_adma_chan_list file-scope variable is not used outside of the unit so it can be made static. Reported-by: kernel test robot Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201019155756.21445-1-krzk@kernel.org Signed-off-by: Vinod Koul commit f40566f220a1a7ab3ac4de8d594a4a038bace156 Author: Eugen Hristev Date: Fri Oct 16 12:39:18 2020 +0300 dmaengine: at_xdmac: add AXI priority support and recommended settings The sama7g5 version of the XDMAC supports priority configuration and outstanding capabilities. Add defines for the specific registers for this configuration, together with recommended settings. However the settings are very different if the XDMAC is a mem2mem or a per2mem controller. Thus, we need to differentiate according to device tree property. Signed-off-by: Eugen Hristev Link: https://lore.kernel.org/r/20201016093918.290137-1-eugen.hristev@microchip.com Signed-off-by: Vinod Koul commit 2bec35a529b7d3bf28ee0d90ec157560fdf8d4e4 Author: Eugen Hristev Date: Fri Oct 16 12:38:50 2020 +0300 dmaengine: at_xdmac: add support for sama7g5 based at_xdmac SAMA7G5 SoC uses a slightly different variant of the AT_XDMAC. Added support by a new compatible and a layout struct that copes to the specific version considering the compatible string. Only the differences in register map are present in the layout struct. I reworked the register access for this part that has the differences. Also the Source/Destination Interface bits are no longer valid for this variant of the XDMAC. Thus, the layout also has a bool for specifying whether these bits are required or not. Signed-off-by: Eugen Hristev Link: https://lore.kernel.org/r/20201016093850.290053-1-eugen.hristev@microchip.com Signed-off-by: Vinod Koul commit 60f88c031d94f906f01df1cb155f7a866812a716 Author: Eugen Hristev Date: Fri Oct 16 12:37:25 2020 +0300 dmaengine: at_xdmac: adapt perid for mem2mem operations The PERID in the CC register for mem2mem operations must match an unused PERID. The PERID field is 7 bits, but the selected value is 0x3f. On later products we can have more reserved PERIDs for actual peripherals, thus this needs to be increased to maximum size. Changing the value to 0x7f, which is the maximum for 7 bits field. Signed-off-by: Eugen Hristev Reviewed-by: Tudor Ambarus Link: https://lore.kernel.org/r/20201016093725.289880-1-eugen.hristev@microchip.com Signed-off-by: Vinod Koul commit cb0362b6ec537619b842b54e794ae8a87a5122bb Author: Eugen Hristev Date: Fri Oct 16 11:17:51 2020 +0300 dt-bindings: dmaengine: at_xdmac: add compatible with microchip,sama7g5 Add compatible to sama7g5 SoC. Signed-off-by: Eugen Hristev Acked-by: Rob Herring Link: https://lore.kernel.org/r/20201016081754.288488-1-eugen.hristev@microchip.com Signed-off-by: Vinod Koul commit dafd8fe27a9999ef14094dddfd5aaccd49750e1d Author: Surendran K Date: Fri Oct 16 16:03:47 2020 +0530 dmaengine: pl330: Remove unreachable code _setup_req(..) never returns negative value. Hence the condition ret < 0 is never met Signed-off-by: Surendran K Link: https://lore.kernel.org/r/20201016103347.63084-1-surendran.k@samsung.com Signed-off-by: Vinod Koul commit 8145dce88a788f178dfe19376e5d8645d1b87e05 Author: Gustavo A. R. Silva Date: Thu Oct 8 09:18:28 2020 -0500 dmaengine: stm32-mdma: Use struct_size() in kzalloc() Make use of the new struct_size() helper instead of the offsetof() idiom. Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20201008141828.GA20325@embeddedor Signed-off-by: Vinod Koul commit d98793b5d4256faae76177178456214f55bc7083 Author: Dave Jiang Date: Tue Oct 27 14:34:09 2020 -0700 dmaengine: idxd: fix wq config registers offset programming DSA spec v1.1 [1] updated to include a stride size register for WQ configuration that will specify how much space is reserved for the WQ configuration register set. This change is expected to be in the final gen1 DSA hardware. Fix the driver to use WQCFG_OFFSET() for all WQ offset calculation and fixup WQCFG_OFFSET() to use the new calculated wq size. [1]: https://software.intel.com/content/www/us/en/develop/download/intel-data-streaming-accelerator-preliminary-architecture-specification.html Fixes: bfe1d56091c1 ("dmaengine: idxd: Init and probe for Intel data accelerators") Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/160383444959.48058.14249265538404901781.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 582b6d8b258d5bdc2dfde133145dc90fb9fea5e0 Author: Adam Ford Date: Wed Oct 7 09:24:08 2020 -0500 arm64: dts: imx8mm-beacon-som: Add QSPI NOR flash support imx8mm-beacon-som has a Quad-SPI NOR flash connected to the FlexSPI bus. This patch enables the FlexSPI bus and configures it to work with the flash part. Signed-off-by: Adam Ford Signed-off-by: Shawn Guo commit 56c6b4ddfd503ff4de31462c92a187ee440b796e Author: Adam Ford Date: Wed Oct 7 09:04:57 2020 -0500 arm64: dts: imx8mm-beacon-som: Configure supplies on secondary cpus Each cpu core should have a corresponding supply, but only cpu0 does. This patch adds a supply for each of the secondary cpus. Signed-off-by: Adam Ford Signed-off-by: Shawn Guo commit 97f1dd5ba28f45f1fd41285dc713c7cf391f2cd7 Author: Alexander Dahl Date: Mon Oct 5 22:34:47 2020 +0200 ARM: dts: imx: Fix schema warnings for pwm-leds The node names for devices using the pwm-leds driver follow a certain naming scheme (now). Parent node name is not enforced, but recommended by DT project. DTC arch/arm/boot/dts/imx53-ppd.dt.yaml CHECK arch/arm/boot/dts/imx53-ppd.dt.yaml arch/arm/boot/dts/imx53-ppd.dt.yaml: leds-brightness: 'alarm-brightness' does not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+' From schema: Documentation/devicetree/bindings/leds/leds-pwm.yaml DTC arch/arm/boot/dts/imx6dl-cubox-i.dt.yaml CHECK arch/arm/boot/dts/imx6dl-cubox-i.dt.yaml arch/arm/boot/dts/imx6dl-cubox-i.dt.yaml: pwmleds: 'front' does not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+' From schema: Documentation/devicetree/bindings/leds/leds-pwm.yaml DTC arch/arm/boot/dts/imx6dl-cubox-i-emmc-som-v15.dt.yaml CHECK arch/arm/boot/dts/imx6dl-cubox-i-emmc-som-v15.dt.yaml arch/arm/boot/dts/imx6dl-cubox-i-emmc-som-v15.dt.yaml: pwmleds: 'front' does not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+' From schema: Documentation/devicetree/bindings/leds/leds-pwm.yaml DTC arch/arm/boot/dts/imx6dl-cubox-i-som-v15.dt.yaml CHECK arch/arm/boot/dts/imx6dl-cubox-i-som-v15.dt.yaml arch/arm/boot/dts/imx6dl-cubox-i-som-v15.dt.yaml: pwmleds: 'front' does not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+' From schema: Documentation/devicetree/bindings/leds/leds-pwm.yaml DTC arch/arm/boot/dts/imx6sx-softing-vining-2000.dt.yaml CHECK arch/arm/boot/dts/imx6sx-softing-vining-2000.dt.yaml arch/arm/boot/dts/imx6sx-softing-vining-2000.dt.yaml: pwmleds: 'blue', 'green', 'red' do not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+' From schema: Documentation/devicetree/bindings/leds/leds-pwm.yaml Signed-off-by: Alexander Dahl Signed-off-by: Shawn Guo commit a486d18c0a14649bc86052431b9f3eb88bcb0e15 Author: Krzysztof Kozlowski Date: Thu Oct 1 19:07:59 2020 +0200 ARM: dts: imx7s-warp: correct vendor in compatible to Element14 The WaRP7 board (Wearable Development Platform) was apparently made by Element14, not by "Warp". Correct the vendor in compatible to reflect this. The compatibles were not documented in the bindings before. Link: https://www.element14.com/community/docs/DOC-79058 Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit ef8b31051a85773fd4d5c3afb78d5f172affb256 Author: Krzysztof Kozlowski Date: Thu Oct 1 19:07:58 2020 +0200 ARM: dts: imx6sl-warp: correct vendor in compatible to Revotics The WaRP board (Wearable Development Platform) was apparently made by Revolution Robotics, Inc (brand: Revotics), not by "Warp". Correct the vendor in compatible to reflect this. The compatibles were not documented in the bindings before. Link: https://revotics.com/warp Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit da2a602c03cd6bb8d0417fb35ae7c26ed04028ea Author: Krzysztof Kozlowski Date: Thu Oct 1 19:07:56 2020 +0200 dt-bindings: arm: fsl: document i.MX7D boards Document and adjust the compatibles for i.MX7D based boards. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Shawn Guo commit 156b4a654019134c16343dbaaf10e585b42c15ce Author: Krzysztof Kozlowski Date: Thu Oct 1 19:07:54 2020 +0200 dt-bindings: arm: fsl: document i.MX6ULL boards Document and adjust the compatibles for i.MX6ULL based boards. The Armadeus boards use multiple compatibles. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Shawn Guo commit f7c7c45d1e0eb7f44c1661e1c80c87e001aaeb60 Author: Krzysztof Kozlowski Date: Thu Oct 1 19:07:53 2020 +0200 dt-bindings: arm: fsl: document i.MX6UL boards Document and adjust the compatibles for i.MX6UL based boards. The Armadeus boards use multiple compatibles. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Shawn Guo commit d59dca0dff43a69874e0b4a8c0eb84f136928daf Author: Krzysztof Kozlowski Date: Thu Oct 1 19:07:52 2020 +0200 dt-bindings: arm: fsl: document i.MX6SX boards Document and adjust the compatibles for i.MX6SX based boards. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Shawn Guo commit 9fa659393ab139705669e14f615cfe665113eb5f Author: Krzysztof Kozlowski Date: Thu Oct 1 19:07:51 2020 +0200 dt-bindings: arm: fsl: document i.MX6SL boards Document and adjust the compatibles for i.MX6SL based boards. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Shawn Guo commit 691dab655c32e70d1b6d62488d1273a0b196e783 Author: Krzysztof Kozlowski Date: Thu Oct 1 19:07:50 2020 +0200 dt-bindings: arm: fsl: document i.MX6QP boards Document and adjust the compatibles for i.MX6QP based boards. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Shawn Guo commit bec0a8cbe303e41f07303d213ae6b70ed6aaa93c Author: Krzysztof Kozlowski Date: Thu Oct 1 19:07:49 2020 +0200 dt-bindings: arm: fsl: document i.MX6Q boards Document and adjust the compatibles for i.MX6Q based boards. The Toradex and the Armadeus boards use multiple compatibles. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Shawn Guo commit ea75e63105be661afc2e7fbe7f0af07d216af4cd Author: Krzysztof Kozlowski Date: Thu Oct 1 19:07:48 2020 +0200 dt-bindings: vendor-prefixes: add Element14 Document the binding for the Element14, a Premier Farnell company. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Shawn Guo commit 8668d8b2e67fe7cf65f02becd5d67c0636689e82 Author: Frieder Schrempf Date: Thu Oct 1 17:13:37 2020 +0200 arm64: dts: Add the Kontron i.MX8M Mini SoMs and baseboards Kontron Electronics GmbH offers small and powerful SoMs based on the i.MX8M Mini SoC including PMIC, LPDDR4-RAM, eMMC and SPI NOR. The matching baseboards have the same form factor and similar interfaces as the other boards from the Kontron "Board-Line" family, including SD card, 1G Ethernet, 100M Ethernet, USB Host/OTG, digital IOs, RS232, RS485, CAN, LVDS or HDMI, RTC and much more. Signed-off-by: Frieder Schrempf Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit a687b55e10e9aaed1b1c9637771938db995cba52 Author: Frieder Schrempf Date: Thu Oct 1 17:13:38 2020 +0200 dt-bindings: arm: fsl: Add Kontron i.MX8M Mini SoMs and boards Add entries for the SoMs and boards based on i.MX8MM from Kontron Electronics GmbH. Signed-off-by: Frieder Schrempf Reviewed-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 8fc8e8129e1aab1c7adfdb7c079eb0aa3d6f066b Author: Krzysztof Kozlowski Date: Wed Sep 30 21:01:42 2020 +0200 ARM: dts: imx6dl: add compatibles for Aristainetos boards The Aristainetos and Aristainetos2 boards have only SoC compatible. Cc: Heiko Schocher Signed-off-by: Krzysztof Kozlowski Reviewed-by: Heiko Schocher Signed-off-by: Shawn Guo commit 5cad03883f1b96f4736027a5ee56a14e52cdfbc1 Author: Krzysztof Kozlowski Date: Wed Sep 30 21:01:39 2020 +0200 ARM: dts: imx6dl-pico: fix board compatibles There are four flavors of TechNexion PICO-IMX6 boards. They have their own DTSes, even though in Dwarf, Nymph and Pi are exactly the same. They also have their own bindings so adjust the compatibles to match the bindings. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 676884326eeac5d6affbe3e13bb90d0de8f49cd2 Author: Krzysztof Kozlowski Date: Wed Sep 30 21:01:41 2020 +0200 dt-bindings: arm: fsl: document i.MX6DL Aristainetos boards Document and adjust the compatibles for i.MX6DL based Aristainetos boards from ABB. Cc: Heiko Schocher Signed-off-by: Krzysztof Kozlowski Reviewed-by: Heiko Schocher Acked-by: Rob Herring Signed-off-by: Shawn Guo commit 5c32a75e2ed169c01e8af1e7f153e962c08763d8 Author: Krzysztof Kozlowski Date: Wed Sep 30 21:01:40 2020 +0200 dt-bindings: vendor-prefixes: add ABB Document binding for ABB. Cc: Heiko Schocher Signed-off-by: Krzysztof Kozlowski Reviewed-by: Heiko Schocher Acked-by: Rob Herring Signed-off-by: Shawn Guo commit c470ce79fe46aa35a6c7922b00ce2be5ba15b2f4 Author: Krzysztof Kozlowski Date: Wed Sep 30 21:01:38 2020 +0200 dt-bindings: arm: fsl: document i.MX6DL boards Document and adjust the compatibles for i.MX6DL based boards. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Shawn Guo commit 9d808cbfa5e721e8e400a7d7678b9f9c28ff9512 Author: Krzysztof Kozlowski Date: Wed Sep 30 21:01:37 2020 +0200 dt-bindings: arm: fsl: document VF boards Document and adjust the compatibles for VF500 and VF600 based boards. The Toradex Colibri Evaluation Boards use multiple compatibles. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Shawn Guo commit be03d03b5cf806548547edff1a9b82ae91f679c6 Author: Krzysztof Kozlowski Date: Wed Sep 30 21:01:36 2020 +0200 dt-bindings: arm: fsl: document i.MX53 boards Document and adjust the compatibles for i.MX53 based boards. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Shawn Guo commit 5427f287976c4dd1c1ffb4c0cb94d50d3cd14244 Author: Krzysztof Kozlowski Date: Wed Sep 30 21:01:35 2020 +0200 dt-bindings: arm: fsl: document i.MX51 boards Document and adjust the compatibles for i.MX51 based boards. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Shawn Guo commit 1acb40298366b8350d34db47dd9aae72ff18691e Author: Krzysztof Kozlowski Date: Wed Sep 30 21:01:33 2020 +0200 dt-bindings: vendor-prefixes: add Revotics Document vendor prefix for Revotics (Revolution Robotics, Inc.). Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Shawn Guo commit b01222b9193e40557b5a3bdf833898812ef36dcb Author: Krzysztof Kozlowski Date: Wed Sep 30 21:01:32 2020 +0200 dt-bindings: vendor-prefixes: add MicroSys Document vendor prefix for MicroSys Electronics GmbH. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Shawn Guo commit 18d05ca4486fe38991c3166b1f4df26b8a029665 Author: Arvind Sankar Date: Sun Oct 25 10:31:19 2020 -0400 crypto: lib/sha256 - Unroll LOAD and BLEND loops Unrolling the LOAD and BLEND loops improves performance by ~8% on x86_64 (tested on Broadwell Xeon) while not increasing code size too much. Signed-off-by: Arvind Sankar Reviewed-by: Eric Biggers Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 63642d5c141f1bcbe97f7895467a724ad2e3f346 Author: Arvind Sankar Date: Sun Oct 25 10:31:18 2020 -0400 crypto: lib/sha256 - Unroll SHA256 loop 8 times intead of 64 This reduces code size substantially (on x86_64 with gcc-10 the size of sha256_update() goes from 7593 bytes to 1952 bytes including the new SHA256_K array), and on x86 is slightly faster than the full unroll (tested on Broadwell Xeon). Signed-off-by: Arvind Sankar Reviewed-by: Eric Biggers Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit b8399819b2dd6f29195ed7535217b66c01b1e57d Author: Arvind Sankar Date: Sun Oct 25 10:31:17 2020 -0400 crypto: lib/sha256 - Clear W[] in sha256_update() instead of sha256_transform() The temporary W[] array is currently zeroed out once every call to sha256_transform(), i.e. once every 64 bytes of input data. Moving it to sha256_update() instead so that it is cleared only once per update can save about 2-3% of the total time taken to compute the digest, with a reasonable memset() implementation, and considerably more (~20%) with a bad one (eg the x86 purgatory currently uses a memset() coded in C). Signed-off-by: Arvind Sankar Reviewed-by: Eric Biggers Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 7a4295f6c9d54e082474667e552a227606b4a085 Author: Arvind Sankar Date: Sun Oct 25 10:31:16 2020 -0400 crypto: lib/sha256 - Don't clear temporary variables The assignments to clear a through h and t1/t2 are optimized out by the compiler because they are unused after the assignments. Clearing individual scalar variables is unlikely to be useful, as they may have been assigned to registers, and even if stack spilling was required, there may be compiler-generated temporaries that are impossible to clear in any case. So drop the clearing of a through h and t1/t2. Signed-off-by: Arvind Sankar Reviewed-by: Eric Biggers Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 458c0480dcb338d7b72e89b2e88a622965adcea4 Author: Arvind Sankar Date: Sun Oct 25 10:31:15 2020 -0400 crypto: hash - Use memzero_explicit() for clearing state Without the barrier_data() inside memzero_explicit(), the compiler may optimize away the state-clearing if it can tell that the state is not used afterwards. Signed-off-by: Arvind Sankar Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 1762818f25f3f99c5083caa13d69e5e5aa2e4b6f Author: Arvind Sankar Date: Sun Oct 25 10:31:14 2020 -0400 crypto: lib/sha256 - Use memzero_explicit() for clearing state Without the barrier_data() inside memzero_explicit(), the compiler may optimize away the state-clearing if it can tell that the state is not used afterwards. At least in lib/crypto/sha256.c:__sha256_final(), the function can get inlined into sha256(), in which case the memset is optimized away. Signed-off-by: Arvind Sankar Reviewed-by: Eric Biggers Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 383e8a823014532ffd81c787ef9009f1c2bd3b79 Author: Zhang Qilong Date: Fri Oct 16 17:05:36 2020 +0800 crypto: omap-aes - fix the reference count leak of omap device pm_runtime_get_sync() will increment pm usage counter even when it returns an error code. We should call put operation in error handling paths of omap_aes_hw_init. Signed-off-by: Zhang Qilong Signed-off-by: Herbert Xu commit 1bc608b4655b8b1491fb100f4cf4f15ae64a8698 Author: Tianjia Zhang Date: Thu Oct 15 17:24:41 2020 +0800 crypto: sm2 - remove unnecessary reset operations This is an algorithm optimization. The reset operation when setting the public key is repeated and redundant, so remove it. At the same time, `sm2_ecc_os2ec()` is optimized to make the function more simpler and more in line with the Linux code style. Signed-off-by: Tianjia Zhang Signed-off-by: Herbert Xu commit ad0bb4e4d226e76950531cb4260402bbbb8997b5 Author: Herbert Xu Date: Thu Oct 15 14:31:53 2020 +1100 crypto: sa2ul - Reduce stack usage This patch reduces the stack usage in sa2ul: 1. Move the exported sha state into sa_prepare_iopads so that it can occupy the same space as the k_pad buffer. 2. Use one buffer for ipad/opad in sa_prepare_iopads. 3. Remove ipad/opad buffer from sa_set_sc_auth. 4. Use async skcipher fallback and remove on-stack request from sa_cipher_run. Reported-by: kernel test robot Fixes: d2c8ac187fc9 ("crypto: sa2ul - Add AEAD algorithm support") Signed-off-by: Herbert Xu commit 633e507fba02d62ed573a8dfb430fc3b881b23d6 Author: Longfang Liu Date: Thu Oct 15 10:23:04 2020 +0800 crypto: hisilicon - fixes some coding style Clean up extra blank lines Signed-off-by: Longfang Liu Signed-off-by: Herbert Xu commit e68f9cf6601b53c7ee8ece552fbafcd9cfa47faa Author: Longfang Liu Date: Thu Oct 15 10:23:03 2020 +0800 crypto: hisilicon - delete unused structure member variables 1. Remove unused member‘pending_reqs' in‘sec_qp_ctx' structure. 2. Remove unused member‘status' in‘sec_dev' structure. Signed-off-by: Longfang Liu Signed-off-by: Herbert Xu commit d4b3984c9e627eacbbf5ee81f9a60eb3191bff8e Author: Eric Biggers Date: Tue Oct 13 16:26:50 2020 -0700 crypto: x86/aes - remove unused file aes_glue.c Commit 1d2c3279311e ("crypto: x86/aes - drop scalar assembler implementations") was meant to remove aes_glue.c, but it actually left it as an unused one-line file. Remove this unused file. Cc: Ard Biesheuvel Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 3f9ae998355baa35284ed1a4c715b588c21dac08 Author: Giovanni Cabiddu Date: Mon Oct 12 21:38:47 2020 +0100 crypto: qat - extend ae_mask Change type of ae_mask in adf_hw_device_data to allow for devices with more than 16 Acceleration Engines (AEs). Signed-off-by: Giovanni Cabiddu Reviewed-by: Wojciech Ziemba Reviewed-by: Fiona Trahe Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit 657ad678e0c49a6e2f237f875b7a6c2d5065bbc8 Author: Giovanni Cabiddu Date: Mon Oct 12 21:38:46 2020 +0100 crypto: qat - allow for instances in different banks Allow for crypto instances to be configured with symmetric crypto rings that belong to a bank that is different from the one where asymmetric crypto rings are located. This is to allow for devices with banks made of a single ring pair. In these, crypto instances will be composed of two separate banks. Changed string literals are not exposed to the user space. Signed-off-by: Giovanni Cabiddu Reviewed-by: Wojciech Ziemba Reviewed-by: Fiona Trahe Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit 54e3d7538fa53e35977f1bfadafba9c4bb2bd149 Author: Giovanni Cabiddu Date: Mon Oct 12 21:38:45 2020 +0100 crypto: qat - refactor qat_crypto_dev_config() Refactor function qat_crypto_dev_config() to propagate errors to the caller. Suggested-by: Andy Shevchenko Signed-off-by: Giovanni Cabiddu Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit 533179ce377f0dc4aa56857feeae012731dbef9a Author: Giovanni Cabiddu Date: Mon Oct 12 21:38:44 2020 +0100 crypto: qat - refactor qat_crypto_create_instances() Refactor function qat_crypto_create_instances() to propagate errors to the caller. Suggested-by: Andy Shevchenko Signed-off-by: Giovanni Cabiddu Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit 48710b1f31aef65918cb4396da530ad6ba00cd32 Author: Giovanni Cabiddu Date: Mon Oct 12 21:38:43 2020 +0100 crypto: qat - change return value in adf_cfg_key_val_get() If a key is not found in the internal key value storage, return -ENODATA instead of -1 that is treated as -EPERM and may confuse. Suggested-by: Andy Shevchenko Signed-off-by: Giovanni Cabiddu Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit 69d0fc22cf91c9488fcc6e6095b70e3f228ad580 Author: Giovanni Cabiddu Date: Mon Oct 12 21:38:42 2020 +0100 crypto: qat - change return value in adf_cfg_add_key_value_param() If the parameter type provided to adf_cfg_add_key_value_param() is invalid, return -EINVAL instead of -1 that is treated as -EPERM and may confuse. Suggested-by: Andy Shevchenko Signed-off-by: Giovanni Cabiddu Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit 83ab8c4b2d893cf8718236e539287661c34df9ff Author: Giovanni Cabiddu Date: Mon Oct 12 21:38:41 2020 +0100 crypto: qat - remove unnecessary void* casts Remove superfluous casts to void* in function qat_crypto_dev_config(). Suggested-by: Andy Shevchenko Signed-off-by: Giovanni Cabiddu Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit 185aa9c3543e5b7303e3e9c97a9b8f06fec04afe Author: Giovanni Cabiddu Date: Mon Oct 12 21:38:40 2020 +0100 crypto: qat - call functions in adf_sriov if available Call the function configure_iov_threads(), adf_enable_vf2pf_interrupts() and adf_pf2vf_notify_restarting() only if present in the struct adf_hw_device_data of the device. This is to allow for QAT drivers that do not implement those functions. Signed-off-by: Giovanni Cabiddu Reviewed-by: Wojciech Ziemba Reviewed-by: Maksim Lukoshkov Reviewed-by: Fiona Trahe Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit 264f590f2beb80d29dc33d5b60f93d2787f429b8 Author: Giovanni Cabiddu Date: Mon Oct 12 21:38:39 2020 +0100 crypto: qat - remove hardcoded bank irq clear flag mask Replace hardcoded value of the bank interrupt clear flag mask with a value calculated on the fly which is based on the number of rings present in a bank. This is to support devices that have a number of rings per bank different than 16. Signed-off-by: Giovanni Cabiddu Reviewed-by: Wojciech Ziemba Reviewed-by: Fiona Trahe Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit 02690ddcb8f17e33246e66826a55ad02750f8e76 Author: Giovanni Cabiddu Date: Mon Oct 12 21:38:38 2020 +0100 crypto: qat - abstract writes to arbiter enable Abstract writes to the service arbiter enable register. This is in preparation for the introduction of the qat_4xxx driver since the arbitration enable register differes between QAT GEN2 and QAT GEN4 devices. Signed-off-by: Giovanni Cabiddu Reviewed-by: Wojciech Ziemba Reviewed-by: Maksim Lukoshkov Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit 097430ff7809c65697451a56b48fbe520b2ea27c Author: Giovanni Cabiddu Date: Mon Oct 12 21:38:37 2020 +0100 crypto: qat - use BIT_ULL() - 1 pattern for masks Replace occurrences of the pattern GENMASK_ULL(var - 1, 0)) with BIT_ULL(var) - 1 since it produces better code and it is easier to read. Suggested-by: Andy Shevchenko Signed-off-by: Giovanni Cabiddu Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit fe779a46e85fa4433c650c8698065ea6f715cdba Author: Giovanni Cabiddu Date: Mon Oct 12 21:38:36 2020 +0100 crypto: qat - replace constant masks with GENMASK Replace constant 0xFFFFFFFFFFFFFFFFULL with GENMASK_ULL(63, 0) and 0xFFFFFFFF with GENMASK(31, 0) as they are masks. This makes code less error prone. Suggested-by: Andy Shevchenko Signed-off-by: Giovanni Cabiddu Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit 95a212bb7f1c9c75a5ae72277c734f8bf8fc04e4 Author: Giovanni Cabiddu Date: Mon Oct 12 21:38:35 2020 +0100 crypto: qat - abstract build ring base Abstract the implementation of BUILD_RING_BASE_ADDR. This is in preparation for the introduction of the qat_4xxx driver since the value of the ring base differs between QAT GEN2 and QAT GEN4 devices. Signed-off-by: Giovanni Cabiddu Reviewed-by: Wojciech Ziemba Reviewed-by: Maksim Lukoshkov Reviewed-by: Fiona Trahe Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit 070a34c9dfa3eeb0b18d63c6fec5dfe7861a43ac Author: Giovanni Cabiddu Date: Mon Oct 12 21:38:34 2020 +0100 crypto: qat - enable ring after pair is programmed Enable arbitration on the TX ring only after the RX ring is programmed. Before this change, arbitration was enabled on the TX ring before the RX ring was programmed allowing the HW to process a request before having the ring pair configured. With this change, the arbitration logic is programmed only if the TX half of the ring mask matches the RX half. This change does not affect QAT GEN2 devices (c62x, c3xxx and dh895xcc), but it is a must for QAT GEN4 devices since the CSRs of the ring pair are locked after arbitration is enabled on the TX ring. Signed-off-by: Giovanni Cabiddu Reviewed-by: Wojciech Ziemba Reviewed-by: Maksim Lukoshkov Reviewed-by: Fiona Trahe Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit dbf568755e7781a4ce8bd3c587c2c388600ae661 Author: Giovanni Cabiddu Date: Mon Oct 12 21:38:33 2020 +0100 crypto: qat - register crypto instances based on capability Introduce the function adf_hw_dev_has_crypto() that returns true if a device supports symmetric crypto, asymmetric crypto and authentication services. If a device has crypto capabilities, add crypto instances to the configuration. This is done since the function that allows to retrieve crypto instances, qat_crypto_get_instance_node(), return instances that support all crypto services. Signed-off-by: Giovanni Cabiddu Reviewed-by: Wojciech Ziemba Reviewed-by: Fiona Trahe Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit ad1332aa67eca6223b130cb593621ee16439b902 Author: Marco Chiappero Date: Mon Oct 12 21:38:32 2020 +0100 crypto: qat - add support for capability detection Add logic to detect device capabilities for c62x, c3xxx and dh895xcc. Read fuses, straps and legfuses CSRs and build the device capabilities mask. This will be used to understand if a certain service is supported by a device. This patch is based on earlier work done by Conor McLoughlin. Signed-off-by: Marco Chiappero Co-developed-by: Giovanni Cabiddu Signed-off-by: Giovanni Cabiddu Reviewed-by: Wojciech Ziemba Reviewed-by: Fiona Trahe Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit 369eb4aaae46b1e40142fbe0ef27b2646c21e1e9 Author: Giovanni Cabiddu Date: Mon Oct 12 21:38:31 2020 +0100 crypto: qat - abstract arbiter access The arbiter configuration, the offset to the arbiter config CSR and the offset to the worker thread to service arbiter CSR are going to be different in QAT GEN4 devices although the logic that uses them is the same across all QAT generations. This patch reworks the gen-specific parts of the arbiter access code by introducing the arb_info structure, that contains the values that are generation specific, and a function in the structure adf_hw_device_data, get_arb_info(), that allows to get them. Since the arbiter values for QAT GEN2 devices (c62x, c3xxx and dh895xcc) are the same, a single function, adf_gen2_get_arb_info() is provided in adf_gen2_hw_data.c and referenced by each QAT GEN2 driver. Signed-off-by: Giovanni Cabiddu Reviewed-by: Fiona Trahe Reviewed-by: Wojciech Ziemba Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit c685d7a7ceb2961dca61914bf473304e08138e11 Author: Giovanni Cabiddu Date: Mon Oct 12 21:38:30 2020 +0100 crypto: qat - remove unused macros in arbiter module Remove the unused macros ADF_ARB_WTR_SIZE, ADF_ARB_WTR_OFFSET and ADF_ARB_RO_EN_OFFSET. These macros were left in commit 34074205bb9f ("crypto: qat - remove redundant arbiter configuration") that removed the logic that used those defines. Signed-off-by: Giovanni Cabiddu Reviewed-by: Fiona Trahe Reviewed-by: Wojciech Ziemba Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit 8b5b80db8b85a78929fb0ad50acea32eeefa7ebd Author: Giovanni Cabiddu Date: Mon Oct 12 21:38:29 2020 +0100 crypto: qat - remove writes into WQCFG WQCFG registers contain the correct values after reset in all generations of QAT. No need to write into them. Signed-off-by: Giovanni Cabiddu Reviewed-by: Fiona Trahe Reviewed-by: Wojciech Ziemba Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit 59ab4d9aa5c9f5361d95cf8dc306797dc48e68b4 Author: Giovanni Cabiddu Date: Mon Oct 12 21:38:28 2020 +0100 crypto: qat - update constants table Extend admin contansts table to support QAT GEN4 devices. This change does not affect QAT GEN2 devices (c62x, c3xxx and dh895xcc) as the table was extended in an unused area which is not referenced by any of those drivers and devices. Signed-off-by: Giovanni Cabiddu Reviewed-by: Fiona Trahe Reviewed-by: Wojciech Ziemba Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit 2d499c049ecdde25106bc391de644722f48793b5 Author: Giovanni Cabiddu Date: Mon Oct 12 21:38:27 2020 +0100 crypto: qat - use admin mask to send fw constants Introduce admin AE mask. If this mask set, the fw constant message is sent only to engines that belong to that set, otherwise it is sent to all engines. This is in preparation for the qat_4xxx driver where the constant message should be sent only to admin engines. In GEN2 devices (c62x, c3xxx and dh895xcc), the admin AE mask is 0 and the fw constants message is sent to all AEs. Signed-off-by: Giovanni Cabiddu Reviewed-by: Fiona Trahe Reviewed-by: Wojciech Ziemba Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit 09b08885169998134ef40a6cad6f66e833582083 Author: Giovanni Cabiddu Date: Mon Oct 12 21:38:26 2020 +0100 crypto: qat - change admin sequence Call adf_set_fw_constants() before adf_init_ae(). This is required by QAT GEN4 devices, which expect that the FW_CONSTANTS_CFG command is sent to the admin AEs before the FW_INIT_AE command. Swapping the order of the two commands (FW_INIT_AE and FW_CONSTANTS_CFG) is allowed in QAT GEN2 devices as the firmware can handle those in any order. Signed-off-by: Giovanni Cabiddu Reviewed-by: Fiona Trahe Reviewed-by: Wojciech Ziemba Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit fa7e41e649e33b54d0780af83caca6cbe573b0bb Author: Giovanni Cabiddu Date: Mon Oct 12 21:38:25 2020 +0100 crypto: qat - rename ME in AE Rename occurrences of ME in the admin module with the acronym AE (Acceleration Engine) as the two are equivalent. This is to keep a single acronym for engined in the codebase and follow the documentation in https://01.org/intel-quickassist-technology. Signed-off-by: Giovanni Cabiddu Reviewed-by: Fiona Trahe Reviewed-by: Wojciech Ziemba Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit f9ff4d3820d5966bd7b86cc97f475bd8c3c04313 Author: Giovanni Cabiddu Date: Mon Oct 12 21:38:24 2020 +0100 crypto: qat - add packed to init admin structures Add packed attribute to the structures icp_qat_fw_init_admin_req and icp_qat_fw_init_admin_resp as they are accessed by firmware. Signed-off-by: Giovanni Cabiddu Reviewed-by: Fiona Trahe Reviewed-by: Wojciech Ziemba Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit fc920eccd33b6b0ceb9ebe568ef783b5a816606f Author: Giovanni Cabiddu Date: Mon Oct 12 21:38:23 2020 +0100 crypto: qat - abstract admin interface Abstract access to admin interface and move generation specific code into adf_gen2_hw_data.c in preparation for the introduction of the qat_4xxx driver. Signed-off-by: Giovanni Cabiddu Reviewed-by: Fiona Trahe Reviewed-by: Wojciech Ziemba Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit d1e86b4c2cdc2d4a15767705696beaabbdc3a57f Author: Giovanni Cabiddu Date: Mon Oct 12 21:38:22 2020 +0100 crypto: qat - relocate GEN2 CSR access code Move gen2 specific transport macros to adf_gen2_hw_data.c. Signed-off-by: Giovanni Cabiddu Reviewed-by: Fiona Trahe Reviewed-by: Wojciech Ziemba Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit f9c697c4bfc6002d92e8015b65fe2a79acadb416 Author: Giovanni Cabiddu Date: Mon Oct 12 21:38:21 2020 +0100 crypto: qat - split transport CSR access logic Abstract access to transport CSRs and move generation specific code into adf_gen2_hw_data.c in preparation for the introduction of the qat_4xxx driver. Signed-off-by: Giovanni Cabiddu Reviewed-by: Fiona Trahe Reviewed-by: Wojciech Ziemba Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit c4e8428673425c5b0c7280387c5cb35d60959b97 Author: Giovanni Cabiddu Date: Mon Oct 12 21:38:20 2020 +0100 crypto: qat - fix configuration of iov threads The number of AE2FUNC_MAP registers is different in every QAT device (c62x, c3xxx and dh895xcc) although the logic and the register offsets are the same across devices. This patch separates the logic that configures the iov threads in a common function that takes as input the number of AE2FUNC_MAP registers supported by a device. The function is then added to the adf_hw_device_data structure of each device, and called with the appropriate parameters. The configure iov thread logic is added to a new file, adf_gen2_hw_data.c, that is going to contain code that is shared across QAT GEN2 devices. Signed-off-by: Giovanni Cabiddu Reviewed-by: Fiona Trahe Reviewed-by: Wojciech Ziemba Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit 70b9bd3929da903d54dbd7d1ca2465333077cfd9 Author: Ahsan Atta Date: Mon Oct 12 21:38:19 2020 +0100 crypto: qat - num_rings_per_bank is device dependent This change is to allow support for QAT devices that may not have 16 rings per bank. The rings structure in bank is allocated dynamically based on the number of banks supported by a device. Note that in the error path in adf_init_bank(), ring->inflights is set to NULL after the free to silence a false positive double free reported by clang scan-build. Signed-off-by: Ahsan Atta Co-developed-by: Giovanni Cabiddu Signed-off-by: Giovanni Cabiddu Reviewed-by: Fiona Trahe Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit 7b07ed5042c5d21467af5aa055f2b49b2e661a83 Author: Giovanni Cabiddu Date: Mon Oct 12 21:38:18 2020 +0100 crypto: qat - mask device capabilities with soft straps Enable acceleration engines (AEs) and accelerators based on soft straps and fuses. When looping with a number of AEs or accelerators, ignore the ones that are disabled. This patch is based on earlier work done by Conor McLoughlin. Signed-off-by: Giovanni Cabiddu Reviewed-by: Fiona Trahe Reviewed-by: Wojciech Ziemba Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit e4e37acc3bb0ce6152077e24cf9faad71f3c10b6 Author: Marco Chiappero Date: Mon Oct 12 21:38:17 2020 +0100 crypto: qat - update IV in software Do IV update calculations in software for AES-CBC and AES-CTR. This allows to embed the IV on the request descriptor and removes the allocation of the IV buffer in the data path. In addition, this change allows the support of QAT devices that are not capable of updating the IV buffer when performing an AES-CBC or AES-CTR operation. Signed-off-by: Marco Chiappero Co-developed-by: Mateusz Polrola Signed-off-by: Mateusz Polrola Co-developed-by: Giovanni Cabiddu Signed-off-by: Giovanni Cabiddu Reviewed-by: Andy Shevchenko Tested-by: Indrasena Reddy Gali Signed-off-by: Herbert Xu commit c98e233062cd9d0e2f10e445a671f0799daaef67 Author: Colin Ian King Date: Sat Oct 10 17:47:36 2020 +0100 crypto: inside-secure - Fix sizeof() mismatch An incorrect sizeof() is being used, sizeof(priv->ring[i].rdr_req) is not correct, it should be sizeof(*priv->ring[i].rdr_req). Note that since the size of ** is the same size as * this is not causing any issues. Addresses-Coverity: ("Sizeof not portable (SIZEOF_MISMATCH)") Fixes: 9744fec95f06 ("crypto: inside-secure - remove request list to improve performance") Signed-off-by: Colin Ian King Acked-by: Antoine Tenart Signed-off-by: Herbert Xu commit b2161cc0c9c461feca04cc832a5defb0ac24a513 Author: Shiju Jose Date: Fri Oct 9 09:19:38 2020 +0100 crypto: hisilicon - Fix doc warnings in sgl.c and qm.c Fix following warnings caused by mismatch between function parameters and function comments. drivers/crypto/hisilicon/sgl.c:256: warning: Excess function parameter 'hw_sgl_dma' description in 'hisi_acc_sg_buf_unmap' drivers/crypto/hisilicon/sgl.c:256: warning: Excess function parameter 'pool' description in 'hisi_acc_sg_buf_unmap' drivers/crypto/hisilicon/qm.c:1849: warning: Function parameter or member 'qp' not described in 'qm_drain_qp' drivers/crypto/hisilicon/qm.c:2420: warning: Function parameter or member 'qm' not described in 'hisi_qm_set_vft' drivers/crypto/hisilicon/qm.c:2420: warning: Function parameter or member 'fun_num' not described in 'hisi_qm_set_vft' drivers/crypto/hisilicon/qm.c:2420: warning: Function parameter or member 'base' not described in 'hisi_qm_set_vft' drivers/crypto/hisilicon/qm.c:2420: warning: Function parameter or member 'number' not described in 'hisi_qm_set_vft' drivers/crypto/hisilicon/qm.c:2620: warning: Function parameter or member 'qm' not described in 'qm_clear_queues' Signed-off-by: Shiju Jose Reviewed-by: Zhou Wang Signed-off-by: Herbert Xu commit 0237616173fd363a54bd272aa3bd376faa1d7caa Author: Christophe Leroy Date: Thu Oct 8 09:34:56 2020 +0000 crypto: talitos - Fix return type of current_desc_hdr() current_desc_hdr() returns a u32 but in fact this is a __be32, leading to a lot of sparse warnings. Change the return type to __be32 and ensure it is handled as sure by the caller. Fixes: 3e721aeb3df3 ("crypto: talitos - handle descriptor not found in error path") Signed-off-by: Christophe Leroy Signed-off-by: Herbert Xu commit 195404db27f9533c71fdcb78d32a77075c2cb4a2 Author: Christophe Leroy Date: Thu Oct 8 09:34:55 2020 +0000 crypto: talitos - Endianess in current_desc_hdr() current_desc_hdr() compares the value of the current descriptor with the next_desc member of the talitos_desc struct. While the current descriptor is obtained from in_be32() which return CPU ordered bytes, next_desc member is in big endian order. Convert the current descriptor into big endian before comparing it with next_desc. This fixes a sparse warning. Fixes: 37b5e8897eb5 ("crypto: talitos - chain in buffered data for ahash on SEC1") Signed-off-by: Christophe Leroy Signed-off-by: Herbert Xu commit d72286943212fdb6d254d08d4cfccdc70603d0ca Author: Herbert Xu Date: Thu Oct 8 16:58:18 2020 +1100 lib/mpi: Remove unused scalar_copied The scalar_copied variable is not as the scalar is never copied in that block. This patch removes it. Fixes: d58bb7e55a8a ("lib/mpi: Introduce ec implementation to...") Reported-by: Gustavo A. R. Silva Signed-off-by: Herbert Xu commit daf88f3757ecb7aed4dd05a1ca8c8b4ac378d6c3 Author: Giovanni Cabiddu Date: Wed Oct 7 13:43:45 2020 +0100 crypto: qat - remove unused function Remove unused function qat_dh_get_params(). This is to fix the following warning when compiling the driver with CC=clang W=1 drivers/crypto/qat/qat_common/qat_asym_algs.c:207:34: warning: unused function 'qat_dh_get_params' [-Wunused-function] Signed-off-by: Giovanni Cabiddu Reviewed-by: Fiona Trahe Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit c07a013a28ae171602086681b7215616591c6612 Author: Bhaskar Chowdhury Date: Thu Oct 29 15:13:46 2020 +0530 drivers: amdgpu: Correct spelling defalut to default in comment Correct spelling in one of the comment. s/defalut/default/p Signed-off-by: Bhaskar Chowdhury Signed-off-by: Alex Deucher commit a110f3750bf8b93764f13bd1402c7cba03d15d61 Author: Arnd Bergmann Date: Mon Oct 26 22:00:30 2020 +0100 drm/amdgpu: fix incorrect enum type core_link_write_dpcd() returns enum dc_status, not ddc_result: display/dc/core/dc_link_dp.c: In function 'dp_set_panel_mode': display/dc/core/dc_link_dp.c:4237:11: warning: implicit conversion from 'enum dc_status' to 'enum ddc_result' [-Wenum-conversion] Avoid the warning by using the correct enum in the caller. Fixes: 0b226322434c ("drm/amd/display: Synchronous DisplayPort Link Training") Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher commit 0b924cd60d43f411f3133fbb39c1e4c82c7b2b18 Author: Tom Rix Date: Tue Oct 27 13:07:08 2020 -0700 drm/amd/display: remove unneeded semicolon A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix Signed-off-by: Alex Deucher commit aec576f9d25f19e807b2bc748ba1755fe101a93c Author: Tom Rix Date: Tue Oct 27 12:07:26 2020 -0700 drm/amdgpu: remove unneeded semicolon A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix Signed-off-by: Alex Deucher commit 9e89ee9be138e3b93ccf9da40655e094b204dcad Author: Colin Ian King Date: Wed Oct 28 12:43:16 2020 +0000 drm/amd/pm: fix out-of-bound read on pptable->SkuReserved A recent change added two uint16_t elements to PPTable_t and reduced the uint32_t array down to 8 elements. This results in the dev_info printing of pptable->SkuReserved[8] accessing a value that is out-of-range on array SkuReserved. The array has been shrunk by 1 element, so remove this extraneous dev_info message. Addresses-Coverity: ("Out-of-bounds read") Fixes: 1dc3c5a95b08 ("drm/amd/pm: update driver if file for sienna cichlid") Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit cfeb1055e5f479f03278c0915405d182ed2f8fca Author: Zou Wei Date: Wed Oct 28 16:36:11 2020 +0800 drm/amd/display: remove useless if/else Fix the following coccinelle report: ./drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c:1367:3-5: WARNING: possible condition with no effect (if == else) Both branches are the same, so remove the if/else altogether. Fixes: 81875979f0b2 ("drm/amd/display: Remove extra pairs of parentheses in dce_calcs.c") Reported-by: Hulk Robot Signed-off-by: Zou Wei Signed-off-by: Alex Deucher commit 15047bd436a763dd2ddf8e1024b4e25af9cc11ee Author: Alex Deucher Date: Fri Oct 16 11:42:00 2020 -0400 drm/amdgpu: drop CONFIG_DRM_AMD_DC_DCN3_01 from atomfirmware.h Not needed. Reviewed-by: Luben Tuikov Signed-off-by: Alex Deucher commit 48e3c2e71191f01d5bb030c886cd6e7c60205b99 Author: Alex Deucher Date: Fri Oct 16 11:28:40 2020 -0400 drm/amdgpu/display: remove dal_cmd_tbl_helper_dcn2_get_table2 It's unused and identical to dal_cmd_tbl_helper_dce112_get_table2. Reviewed-by: Luben Tuikov Signed-off-by: Alex Deucher commit 9e245188fb1c7d7d50ad90fb4b1f24d14b47db25 Author: Alex Deucher Date: Fri Oct 16 10:25:45 2020 -0400 drm/amdgpu/display: remove DRM_AMD_DC_GREEN_SARDINE No need for a separate config option at this point. Reviewed-by: Luben Tuikov Signed-off-by: Alex Deucher commit 158d823f07afce76f17a9cfa033a812d4d2bbbf2 Author: Alex Deucher Date: Wed Oct 28 10:57:50 2020 -0400 drm/amdgpu/powerplay: Only apply optimized mclk dpm policy on polaris Leads to improper dpm on older parts. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1353 Fixes: 8d89b96fe797 ("drm/amd/powerplay: optimize the mclk dpm policy settings") Reviewed-by: Evan Quan Reviewed-by: Luben Tuikov Signed-off-by: Alex Deucher commit d8c266a104ffe27a4dc753a2562cd95d17a2b213 Author: Joe Perches Date: Thu Oct 29 17:45:16 2020 -0400 MAINTAINERS: Update AMD POWERPLAY pattern commit e098bc9612c2 ("drm/amd/pm: optimize the power related source code layout") moved the directory, update the F: file pattern to match. Signed-off-by: Joe Perches Signed-off-by: Alex Deucher commit 52934da2753a55b8f882a368f655c088437d6d92 Author: Evan Quan Date: Tue Oct 27 10:24:18 2020 +0800 drm/amd/pm: do not use ixFEATURE_STATUS for checking smc running This reverts commit f87812284172a9809820d10143b573d833cd3f75 ("drm/amdgpu: Fix bug where DPM is not enabled after hibernate and resume"). It was intended to fix Hawaii S4(hibernation) issue but break S3. As ixFEATURE_STATUS is filled with garbage data on resume which can be only cleared by reloading smc firmware(but that will involve many changes). So, we will revert this S4 fix and seek a new way. Signed-off-by: Evan Quan Tested-by: Sandeep Raghuraman Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit e6bd6890e88995004538afcb3bcf220824306d55 Author: Evan Quan Date: Fri Oct 16 10:45:26 2020 +0800 drm/amd/pm: perform SMC reset on suspend/hibernation So that the succeeding resume can be performed based on a clean state. Signed-off-by: Evan Quan Tested-by: Sandeep Raghuraman Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 0134022fa3ab0e082bb821a81ef2ffa7027ebd10 Author: Evan Quan Date: Wed Oct 28 15:37:00 2020 +0800 drm/amd/pm: enable baco reset for Hawaii Which can be used for S4(hibernation) support. Signed-off-by: Evan Quan Tested-by: Sandeep Raghuraman Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 8a76ccd199f702230e2ac96a9966387d0527040d Author: Evan Quan Date: Wed Oct 28 15:34:29 2020 +0800 drm/amd/pm: correct the baco reset sequence for CI ASICs Correct some registers bitmasks and add mmBIOS_SCRATCH_7 reset. Signed-off-by: Evan Quan Tested-by: Sandeep Raghuraman Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit aad6d96a09f321a7fbf570137f13aa882d18c6c0 Author: Evan Quan Date: Wed Oct 28 15:29:59 2020 +0800 drm/amdgpu: perform srbm soft reset always on SDMA resume This can address the random SDMA hang after pci config reset seen on Hawaii. Signed-off-by: Evan Quan Tested-by: Sandeep Raghuraman Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 93b96255bd64ca0f65d17e7cdab204a155b8d5c4 Author: Chengming Gui Date: Wed Oct 28 17:40:34 2020 +0800 drm/amd/amdgpu: simplify pa_sc_tile_steering_override check Use ">= CHIP_SIENNA_CICHLID" to replace per asic check Signed-off-by: Chengming Gui Reviewed-by: Hawking.Zhang Signed-off-by: Alex Deucher commit e3a8a5acb9cf1342db24272214ab7bdbdd149649 Author: Jinzhou.Su Date: Wed Oct 28 18:06:27 2020 +0800 amdgpu:Add flag for updating MGCG on GFX10 Add RLC_CGTT_MGCG_OVERRIDE__RLC_CGTT_SCLK_OVERRIDE_MASK Signed-off-by: Jinzhou.Su Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit e3898719832373dcd6594c4e62da1d29fd8f4f27 Author: Christian König Date: Wed Oct 28 14:46:56 2020 +0100 drm/amdgpu: cleanup gmc_v9_0_process_interrupt First of all don't snprintf into a char buffer allocated on the stack with a constant hubname. Then cleanup to exit the function early in case of a ratelimit or SRIOV. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit e0457659f8d842908510fb485c32cb4da829900d Author: Dmytro Laktyushkin Date: Tue May 5 14:32:33 2020 -0400 drm/amd/display: allow 18 bit dp output on DCN3 We need this to pass dp compliance. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Chris Park Reviewed-by: Nikola Cornij Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit d95c368ab8cf969a41ca7594a77c5c38d22a926d Author: Kent Russell Date: Wed Oct 28 08:03:31 2020 -0400 drm/amdkfd: Fix getting unique_id in topology Since the unique_id is now obtained in amdgpu in smu_late_init, topology misses getting the value during KFD device initialization. To work around this, we use amdgpu_amdkfd_get_unique_id to get the unique_id at read time. Due to this, we can remove unique_id from the kfd_dev structure, since we only need it in the KFD node properties struct Signed-off-by: Kent Russell Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 51a7e93826a05deb85db07f58cad7e97e4165e77 Author: Jinzhou.Su Date: Tue Oct 27 21:37:49 2020 +0800 amdgpu: Add GFX MGCG and MGLS for vangogh add GFX Medium Grain Light Sleep support for vangogh add AMD_CG_SUPPORT_GFX_CP_LS and AMD_CG_SUPPORT_GFX_RLC_LS v2: add GFX Medium Grain Clock Gating Signed-off-by: Jinzhou.Su Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 802a46d384f81c1d14a74316d33be7aa323338e7 Author: Xiaojian Du Date: Mon Oct 26 19:39:29 2020 +0800 drm/amd/pm: enable the rest functions of swSMU for vangogh. This patch is to enable the rest functions of swSMU for vangogh. Signed-off-by: Xiaojian Du Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 271ab489f755245e2b67a99412ac21b84bf68b9d Author: Xiaojian Du Date: Mon Oct 26 19:36:07 2020 +0800 drm/amd/pm: add some swSMU functions for vangogh. This patch is to add some swSMU functions for vangogh, to support the sensor info on "hwmon" and pm info. Signed-off-by: Xiaojian Du Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit ac70c6c62a35fe394ce44cadecdaf1d0d967422e Author: Xiaojian Du Date: Mon Oct 26 19:33:30 2020 +0800 drm/amd/pm: add one new function to get 32 bit feature mask for vangogh This patch is to add one new function to get 32 bit feature mask for vangogh. Signed-off-by: Xiaojian Du Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 10f279cbd72107caee32cff870bbac1c42adeb52 Author: Xiaojian Du Date: Mon Oct 26 19:30:52 2020 +0800 drm/amd/pm: remove some redundant smu message mapping for vangogh This patch is to remove some redundant smu message mapping for vangogh. Signed-off-by: Xiaojian Du Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 800c53d6870a93111e25cd95c6fd1ab306122d27 Author: Xiaojian Du Date: Tue Oct 13 16:43:25 2020 +0800 drm/amd/pm: set the initial value of pm info to zero This patch is to set the initial value of pm info to zero. The "value64" is ported to the hwmon and debugfs node, it is a uint64 type. When it is used for NV10/VEGA10/VEGA20, its word size is appropriate, because NV10/VEGA10/VEGA20 has a 64bit smu feature mask, which is separated to high 32bit and low 32bit. But some asic has only 32bit smu feature mask,and this 32bit mask will fill the low 32bit of "value64". So if this "value64" is not initialized to zero, the high 32bit will be filled by a meaningless value, when the whole "value64" is ported to the "SMC Feature Mask" in the "amdgpu_pm_info" on some specific asic, it will be a wrong value. Signed-off-by: Xiaojian Du Reviewed-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit ea8ca1febd3cf6bd2284a02d8601f8d2ac1e91d0 Author: Xiaojian Du Date: Tue Oct 13 16:40:59 2020 +0800 drm/amd/pm: update the smu v11.5 driver interface header for vangogh This patch is to update the smu v11.5 driver interface header for vangogh. Signed-off-by: Xiaojian Du Reviewed-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 30cc5cec39b85e880b0181811d4adf28555b3333 Author: Xiaojian Du Date: Tue Oct 13 16:31:37 2020 +0800 drm/amd/pm: add UMD Pstate Msg Parameters for vangogh temporarily This patch is to add UMD Pstate Msg Parameters for vangogh temporarily, the values refer to renoir. Signed-off-by: Xiaojian Du Reviewed-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 80abc31ebe2d4aee519fe4b1b55e02c54a5d246d Author: Xiaojian Du Date: Tue Oct 13 15:10:38 2020 +0800 drm/amd/pm: add new smc message mapping for vangogh This patch is to add new smc message mapping for vangogh. Signed-off-by: Xiaojian Du Reviewed-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 767e2451e5f2fd756a28080b572d7aae21df5e2d Author: Xiaojian Du Date: Tue Oct 13 15:05:42 2020 +0800 drm/amd/pm: update the smu v11.5 firmware header for vangogh This patch is to update the smu v11.5 firmware header for vangogh. Signed-off-by: Xiaojian Du Reviewed-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 1dd13b451834e2f406787fca7bea929b7a444164 Author: Xiaojian Du Date: Tue Oct 13 15:02:35 2020 +0800 drm/amd/pm: update the smu v11.5 smc header for vangogh This patch is to update the smu v11.5 smc header for vangogh. Signed-off-by: Xiaojian Du Reviewed-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 676deb38770582abac87447f47d1ee643bb14681 Author: Dennis Li Date: Thu Oct 22 17:44:55 2020 +0800 drm/amdgpu: fix the issue of reserving bad pages failed In amdgpu_ras_reset_gpu, because bad pages may not be freed, it has high probability to reserve bad pages failed. Change to reserve bad pages when freeing VRAM. v2: 1. avoid allocating the drm_mm node outside of amdgpu_vram_mgr.c 2. move bad page reserving into amdgpu_ras_add_bad_pages, if vram mgr reserve bad page failed, it will put it into pending list, otherwise put it into processed list; 3. remove amdgpu_ras_release_bad_pages, because retired page's info has been moved into amdgpu_vram_mgr v3: 1. formate code style; 2. rename amdgpu_vram_reserve_scope as amdgpu_vram_reservation; 3. rename scope_pending as reservations_pending; 4. rename scope_processed as reserved_pages; 5. change to iterate over all the pending ones and try to insert them with drm_mm_reserve_node(); v4: 1. rename amdgpu_vram_mgr_reserve_scope as amdgpu_vram_mgr_reserve_range; 2. remove unused include "amdgpu_ras.h"; 3. rename amdgpu_vram_mgr_check_and_reserve as amdgpu_vram_mgr_do_reserve; 4. refine amdgpu_vram_mgr_reserve_range to call amdgpu_vram_mgr_do_reserve. Reviewed-by: Christian König Reviewed-by: Hawking Zhang Signed-off-by: Dennis Li Signed-off-by: Wenhui Sheng Signed-off-by: Alex Deucher commit 5eeb45934c753322ea8f6dce6f069bf977bf5282 Author: Dennis Li Date: Mon Oct 19 14:49:00 2020 +0800 drm/amdgpu: remove redundant GPU reset Because bad pages saving has been moved to UMC error interrupt callback, which will trigger a new GPU reset after saving. Signed-off-by: Dennis Li Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 22503d803dab174b7f038fc9886c225ef30ee95c Author: Dennis Li Date: Mon Oct 19 14:19:57 2020 +0800 drm/amdgpu: change to save bad pages in UMC error interrupt callback Instead of saving bad pages in amdgpu_ras_reset_gpu, it will reduce the unnecessary calling of amdgpu_ras_save_bad_pages. Signed-off-by: Dennis Li Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 9c94b5ef75b5e5144829cd4e74ba55771613b71f Author: Flora Cui Date: Wed Oct 28 14:04:29 2020 +0800 drm/amdgpu: rename nv_is_headless_sku() for headless NAVI ASICs Signed-off-by: Flora Cui Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit dd657888e00ebc9a3f7a98fe155dcc597939a358 Author: Flora Cui Date: Tue Oct 27 14:58:19 2020 +0800 drm/amdgpu: disable DCN and VCN for Navi14 0x7340/C9 SKU Navi14 0x7340/C9 SKU has no display and video support, remove them. Signed-off-by: Flora Cui Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 29226f04fdc71fd70f947e4ea8925f6770bc8302 Author: Alex Deucher Date: Mon Oct 26 13:42:12 2020 -0400 drm/amdgpu/display: fix indentation in defer_delay_converter_wa() Fixes this warning: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_ddc.c: In function ‘defer_delay_converter_wa’: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_ddc.c:285:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 285 | if (link->dpcd_caps.branch_dev_id == DP_BRANCH_DEVICE_ID_0080E1 && | ^~ drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_ddc.c:291:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 291 | if (link->dpcd_caps.branch_dev_id == DP_BRANCH_DEVICE_ID_006037 && | ^~ Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit d90196317484b69bb46b7144c6e0e1a4f581200d Author: Julian Wiedmann Date: Wed Oct 28 19:30:52 2020 +0100 scsi: zfcp: Handle event-lost notification for Version Change events As recovery for a lost Version Change event, trigger an Exchange Config Data cmd to retrieve the current FW version. Doing so requires process context (as eg. zfcp_qdio_sbal_get() might need to sleep), so defer from tasklet context into a work item. Link: https://lore.kernel.org/r/297c7be2944c3714863fcd22d531d910312d29f0.1603908167.git.bblock@linux.ibm.com Suggested-by: Steffen Maier Reviewed-by: Steffen Maier Reviewed-by: Benjamin Block Signed-off-by: Julian Wiedmann Signed-off-by: Benjamin Block Signed-off-by: Martin K. Petersen commit a6c37abe6988eb33a5f301e252ee41ed22b8df8d Author: Julian Wiedmann Date: Wed Oct 28 19:30:51 2020 +0100 scsi: zfcp: Process Version Change events Handle notifications for a concurrent change of the FCP Channel firmware. Update the relevant user-visible fields to provide accurate data. Link: https://lore.kernel.org/r/d2c7bc57c6cf1b65eabbf7a5d0e3927b9f65647f.1603908167.git.bblock@linux.ibm.com Reviewed-by: Steffen Maier Reviewed-by: Benjamin Block Signed-off-by: Julian Wiedmann Signed-off-by: Benjamin Block Signed-off-by: Martin K. Petersen commit efd321768d2e0e85083b83aefb15c949d4c8930f Author: Julian Wiedmann Date: Wed Oct 28 19:30:50 2020 +0100 scsi: zfcp: Clarify & assert the stat_lock locking in zfcp_qdio_send() Explain why the plain spin_lock() suffices in current code, even when the stat_lock is also used by zfcp_qdio_int_req() in tasklet context. We could also promote the spin_lock() to a spin_lock_irqsave(), but that would just obfuscate the locking even further. Link: https://lore.kernel.org/r/b023b1472630f4bf9fce580577d7bb49de89ccbf.1603908167.git.bblock@linux.ibm.com Reviewed-by: Benjamin Block Reviewed-by: Steffen Maier Signed-off-by: Julian Wiedmann Signed-off-by: Benjamin Block Signed-off-by: Martin K. Petersen commit 84e7b4169f949f8185a5adf0f0bfb893030d0fda Author: Vasily Gorbik Date: Wed Oct 28 19:30:49 2020 +0100 scsi: zfcp: Remove orphaned function declarations drivers/s390/scsi/zfcp_ext.h: zfcp_sg_free_table - only declaration left after commit 58f3ead54752 ("scsi: zfcp: move SG table helper from aux to fc and make them static") drivers/s390/scsi/zfcp_ext.h: zfcp_sg_setup_table - only declaration left after commit 58f3ead54752 ("scsi: zfcp: move SG table helper from aux to fc and make them static") Link: https://lore.kernel.org/r/6854ae03c5c65805f746774eeb0f2869fcd6c397.1603908167.git.bblock@linux.ibm.com Reviewed-by: Steffen Maier Reviewed-by: Benjamin Block Signed-off-by: Vasily Gorbik Signed-off-by: Benjamin Block Signed-off-by: Martin K. Petersen commit 0b524abc2dd13c95a4427f91406c5a69ccca2ccb Author: Julian Wiedmann Date: Wed Oct 28 19:30:48 2020 +0100 scsi: zfcp: Lift Input Queue tasklet from qdio Shift the IRQ tasklet processing from the qdio layer into zfcp. This will allow for a good amount of cleanups in qdio, and provides future opportunity to improve the IRQ processing inside zfcp. We continue to use the qdio layer's internal tasklet/timer mechanism (ie. scan_threshold etc) to check for Request Queue completions. Initially we planned to check for such completions after inspecting the Response Queue - this should typically work, but there's a theoretical race where the device only presents the Request Queue completions _after_ all Response Queue processing has finished. If the Request Queue is then also _completely_ full, we could send no further IOs and thus get no interrupt that would trigger an inspection of the Request Queue. So for now stick to the old model, where we can trust that such a race would be recovered by qdio's internal timer. Code-flow wise, this establishes two levels of control: 1. The qdio layer will only deliver IRQs to the device driver if the QDIO_IRQ_DISABLED flag is cleared. zfcp manages this through qdio_start_irq() / qdio_stop_irq(). The initial state is DISABLED, and zfcp_qdio_open() schedules zfcp's IRQ tasklet once during startup to explicitly enable IRQ delivery. 2. The zfcp tasklet is initialized with tasklet_disable(), and only gets enabled once we open the qdio device. When closing the qdio device, we must disable the tasklet _before_ disabling IRQ delivery (otherwise a concurrently running tasklet could re-enable IRQ delivery after we disabled it). A final tasklet_kill() during teardown ensures that no lingering tasklet_schedule() is still accessing the tasklet structure. Link: https://lore.kernel.org/r/94a765211c48b74a7b91c5e60b158de01db98d43.1603908167.git.bblock@linux.ibm.com Reviewed-by: Benjamin Block Signed-off-by: Julian Wiedmann Signed-off-by: Benjamin Block Signed-off-by: Martin K. Petersen commit eb3b956d2c9bfd86ca38ea5ce6343efcbacff641 Author: ching Huang Date: Tue Oct 27 11:39:13 2020 +0800 scsi: arcmsr: Ensure getting a free ccb is done under the spin_lock Ensure getting a free ccb is done under the spin_lock. Link: https://lore.kernel.org/r/f3ec374cada762149911ff35e92a68a15a7d0327.camel@areca.com.tw Signed-off-by: ching Huang Signed-off-by: Martin K. Petersen commit 4f1826b8e56ffb5c0b7243a7b573bb521b919dfb Author: ching Huang Date: Tue Oct 27 11:31:31 2020 +0800 scsi: arcmsr: Configure the default command timeout value Allow configuring the default command timeout value for devices attached to arcmsr controllers. Link: https://lore.kernel.org/r/27c0cda7fd103f05021adaf67490e9298ed5cc3f.camel@areca.com.tw Signed-off-by: ching Huang Signed-off-by: Martin K. Petersen commit 37d38ece9b898ea183db9e5a6582651e6ed64c9a Author: Zhang Qilong Date: Tue Oct 27 21:51:59 2020 +0800 net/mac8390: discard unnecessary breaks The 'break' is unnecessary because of previous 'return', and we could discard it. Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20201027135159.71444-1-zhangqilong3@huawei.com Signed-off-by: Jakub Kicinski commit 8027c85c91b84bbbdcf3e28f8b9f35af1032787c Author: Łukasz Stelmach Date: Tue Oct 27 12:43:17 2020 +0100 net: mii: Report advertised link capabilities when autonegotiation is off Unify the set of information returned by mii_ethtool_get_link_ksettings(), mii_ethtool_gset() and phy_ethtool_ksettings_get(). Make the mii_*() functions report advertised settings when autonegotiation if disabled. Suggested-by: Andrew Lunn Signed-off-by: Łukasz Stelmach Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20201027114317.8259-1-l.stelmach@samsung.com Signed-off-by: Jakub Kicinski commit 61906fd465c0dba963485a138626bde82dbc6f7e Author: Asutosh Das Date: Tue Oct 27 12:10:37 2020 -0700 scsi: ufs: qcom: Enable aggressive power collapse for ufs HBA Enabling this capability to let HBA power-collapse more often to save power. Link: https://lore.kernel.org/r/1306284ab2215425ca0a3d9c802574cbd6d35ea7.1603825776.git.asutoshd@codeaurora.org Reviewed-by: Can Guo Reviewed-by: Avri Altman Signed-off-by: Asutosh Das Signed-off-by: Martin K. Petersen commit dd7143e27cb7dee8927d3ede59aff588c57bc224 Author: Can Guo Date: Tue Oct 27 12:10:36 2020 -0700 scsi: ufs: Put HBA into LPM during clk gating During clock gating, after clocks are disabled, put HBA into LPM to save more power. Link: https://lore.kernel.org/r/52198e70bff750632740d78678a815256d697e43.1603825776.git.asutoshd@codeaurora.org Reviewed-by: Avri Altman Acked-by: Stanley Chu Signed-off-by: Can Guo Signed-off-by: Asutosh Das Signed-off-by: Martin K. Petersen commit 3fb52041a832a253f708c845dff081a0c4fef35e Author: Arnd Bergmann Date: Mon Oct 26 22:49:07 2020 +0100 scsi: libfc: Fix enum-conversion warning gcc -Wextra points out an assignment between two different enum types: drivers/scsi/libfc/fc_exch.c: In function 'fc_exch_setup_hdr': ../drivers/scsi/libfc/fc_exch.c:275:26: warning: implicit conversion from 'enum fc_class' to 'enum fc_sof' [-Wenum-conversion] This seems to be intentional, as the same numeric values are used here, so shut up the warning by adding an explicit cast. Link: https://lore.kernel.org/r/20201026214911.3892701-1-arnd@kernel.org Fixes: 42e9a92fe6a9 ("[SCSI] libfc: A modular Fibre Channel library") Signed-off-by: Arnd Bergmann Signed-off-by: Martin K. Petersen commit 8fd9efca86d083bb6fe8676ed4edd1c626d19367 Author: Arnd Bergmann Date: Mon Oct 26 17:06:13 2020 +0100 scsi: libfc: Work around -Warray-bounds warning Building libfc with gcc -Warray-bounds identifies a number of cases in one file where a strncpy() is performed into a single-byte character array: In file included from include/linux/bitmap.h:9, from include/linux/cpumask.h:12, from include/linux/smp.h:13, from include/linux/lockdep.h:14, from include/linux/spinlock.h:59, from include/linux/debugobjects.h:6, from include/linux/timer.h:8, from include/scsi/libfc.h:11, from drivers/scsi/libfc/fc_elsct.c:17: In function 'strncpy', inlined from 'fc_ct_ms_fill.constprop' at drivers/scsi/libfc/fc_encode.h:235:3: include/linux/string.h:290:30: warning: '__builtin_strncpy' offset [56, 135] from the object at 'pp' is out of the bounds of referenced subobject 'value' with type '__u8[1]' {aka 'unsigned char[1]'} at offset 56 [-Warray-bounds] 290 | #define __underlying_strncpy __builtin_strncpy | ^ include/linux/string.h:300:9: note: in expansion of macro '__underlying_strncpy' 300 | return __underlying_strncpy(p, q, size); | ^~~~~~~~~~~~~~~~~~~~ This is not a bug because the 1-byte array is used as an odd way to express a variable-length data field here. I tried to convert it to a flexible-array member, but in the end could not figure out why the sizeof(struct fc_fdmi_???) are used the way they are, and how to properly convert those. Work around this instead by abstracting the string copy in a slightly higher-level function fc_ct_hdr_fill() helper that strscpy() and memset() to achieve the same result as strncpy() but does not require a zero-terminated input and does not get checked for the array overflow because gcc (so far) does not understand the behavior of strscpy(). Link: https://lore.kernel.org/r/20201026160705.3706396-2-arnd@kernel.org Signed-off-by: Arnd Bergmann Signed-off-by: Martin K. Petersen commit e31ac898ac298b7a0451b0406769a024bd286e4d Author: Arnd Bergmann Date: Mon Oct 26 17:06:12 2020 +0100 scsi: libfc: Move scsi/fc_encode.h to libfc Most of this file is only used inside of libfc, so move it to where it is actually used, with only fc_fill_fc_hdr() left inside of the header. Link: https://lore.kernel.org/r/20201026160705.3706396-1-arnd@kernel.org Reported-by: kernel test robot Signed-off-by: Arnd Bergmann Signed-off-by: Martin K. Petersen commit 6e2b243db4dc8c0fd51570244b6fd7810e16261a Merge: ae8a6e6e88188 b6d0425b816ee Author: Jakub Kicinski Date: Thu Oct 29 18:39:49 2020 -0700 Merge branch 'net-bridge-cfm-add-support-for-connectivity-fault-management-cfm' Henrik Bjoernlund says: ==================== net: bridge: cfm: Add support for Connectivity Fault Management(CFM) Connectivity Fault Management (CFM) is defined in 802.1Q section 12.14. Connectivity Fault Management (CFM) comprises capabilities for detecting, verifying, and isolating connectivity failures in Virtual Bridged Networks. These capabilities can be used in networks operated by multiple independent organizations, each with restricted management access to each other’s equipment. CFM functions are partitioned as follows: — Path discovery — Fault detection — Fault verification and isolation — Fault notification — Fault recovery The primary CFM protocol shims are called Maintenance Points (MPs). A MP can be either a MEP or a MHF. The MEP: -It is the Maintenance association End Point described in 802.1Q section 19.2. -It is created on a specific level (1-7) and is assuring that no CFM frames are passing through this MEP on lower levels. -It initiates and terminates/validates CFM frames on its level. -It can only exist on a port that is related to a bridge. The MHF: -It is the Maintenance Domain Intermediate Point (MIP) Half Function (MHF) described in 802.1Q section 19.3. -It is created on a specific level (1-7). -It is extracting/injecting certain CFM frame on this level. -It can only exist on a port that is related to a bridge. -Currently not supported. There are defined the following CFM protocol functions: -Continuity Check -Loopback. Currently not supported. -Linktrace. Currently not supported. This CFM component supports create/delete of MEP instances and configuration of the different CFM protocols. Also status information can be fetched and delivered through notification due to defect status change. The user interacts with CFM using the 'cfm' user space client program, the client talks with the kernel using netlink. Any notification emitted by CFM from the kernel can be monitored in user space by starting 'cfm_server' program. Currently this 'cfm' and 'cfm_server' programs are standalone placed in a cfm repository https://github.com/microchip-ung/cfm but it is considered to integrate this into 'iproute2'. v1 -> v2 Added the CFM switchdev interface and also added utilization by calling the interface from the kernel CFM implementation trying to offload CFM functionality to HW. This offload (CFM driver) is currently not implemented. Corrections based on RCF comments: -The single CFM kernel implementation Patch is broken up into three patches. -Changed the list of MEP instances from list_head to hlist_head. -Removed unnecessary RCU list traversing. -Solved RCU unlocking problem. -Removed unnecessary comments. -Added ASSERT_RTNL() where required. -Shaping up on error messages. -Correction NETLINK br_fill_ifinfo() to be able to handle 'filter_mask' with multiple flags asserted. v2 -> v3 -The switchdev definition and utilization has been removed as there was no switchdev implementation. -Some compiling issues are fixed as Reported-by: kernel test robot . v3 -> v4 -Fixed potential crash during hlist walk where elements are removed. -Giving all commits unique titles. -NETLINK implementation split into three commits. -Commit "bridge: cfm: Bridge port remove" is merged with commit "bridge: cfm: Kernel space implementation of CFM. MEP create/delete." v4 -> v5 -Reordered members in struct net_bridge to bring member frame_type_list to the first cache line. -Helper functions nla_get_mac() and nla_get_maid() are removed. -The NLA_POLICY_NESTED() macro is used to initialize the br_cfm_policy array. -Fixed reverse xmas tree. v5 -> v6 -Fixed that the SKB buffer was not freed during error handling return. -Removed unused struct definition. -Changed bool to u8 bitfields for space save. -Utilizing the NETLINK policy validation feature. v6 -> v7 -Removed check of parameters in br_cfm_mep_config_set() and br_cfm_cc_peer_mep_add() in first commit of MEP implementation (Patch 4 out of 10) Reviewed-by: Horatiu Vultur Signed-off-by: Henrik Bjoernlund ==================== Link: https://lore.kernel.org/r/20201027100251.3241719-1-henrik.bjoernlund@microchip.com Signed-off-by: Jakub Kicinski commit b6d0425b816eed4dbd6fc590b27dbc7a113c0248 Author: Henrik Bjoernlund Date: Tue Oct 27 10:02:51 2020 +0000 bridge: cfm: Netlink Notifications. This is the implementation of Netlink notifications out of CFM. Notifications are initiated whenever a state change happens in CFM. IFLA_BRIDGE_CFM: Points to the CFM information. IFLA_BRIDGE_CFM_MEP_STATUS_INFO: This indicate that the MEP instance status are following. IFLA_BRIDGE_CFM_CC_PEER_STATUS_INFO: This indicate that the peer MEP status are following. CFM nested attribute has the following attributes in next level. IFLA_BRIDGE_CFM_MEP_STATUS_INSTANCE: The MEP instance number of the delivered status. The type is NLA_U32. IFLA_BRIDGE_CFM_MEP_STATUS_OPCODE_UNEXP_SEEN: The MEP instance received CFM PDU with unexpected Opcode. The type is NLA_U32 (bool). IFLA_BRIDGE_CFM_MEP_STATUS_VERSION_UNEXP_SEEN: The MEP instance received CFM PDU with unexpected version. The type is NLA_U32 (bool). IFLA_BRIDGE_CFM_MEP_STATUS_RX_LEVEL_LOW_SEEN: The MEP instance received CCM PDU with MD level lower than configured level. This frame is discarded. The type is NLA_U32 (bool). IFLA_BRIDGE_CFM_CC_PEER_STATUS_INSTANCE: The MEP instance number of the delivered status. The type is NLA_U32. IFLA_BRIDGE_CFM_CC_PEER_STATUS_PEER_MEPID: The added Peer MEP ID of the delivered status. The type is NLA_U32. IFLA_BRIDGE_CFM_CC_PEER_STATUS_CCM_DEFECT: The CCM defect status. The type is NLA_U32 (bool). True means no CCM frame is received for 3.25 intervals. IFLA_BRIDGE_CFM_CC_CONFIG_EXP_INTERVAL. IFLA_BRIDGE_CFM_CC_PEER_STATUS_RDI: The last received CCM PDU RDI. The type is NLA_U32 (bool). IFLA_BRIDGE_CFM_CC_PEER_STATUS_PORT_TLV_VALUE: The last received CCM PDU Port Status TLV value field. The type is NLA_U8. IFLA_BRIDGE_CFM_CC_PEER_STATUS_IF_TLV_VALUE: The last received CCM PDU Interface Status TLV value field. The type is NLA_U8. IFLA_BRIDGE_CFM_CC_PEER_STATUS_SEEN: A CCM frame has been received from Peer MEP. The type is NLA_U32 (bool). This is cleared after GETLINK IFLA_BRIDGE_CFM_CC_PEER_STATUS_INFO. IFLA_BRIDGE_CFM_CC_PEER_STATUS_TLV_SEEN: A CCM frame with TLV has been received from Peer MEP. The type is NLA_U32 (bool). This is cleared after GETLINK IFLA_BRIDGE_CFM_CC_PEER_STATUS_INFO. IFLA_BRIDGE_CFM_CC_PEER_STATUS_SEQ_UNEXP_SEEN: A CCM frame with unexpected sequence number has been received from Peer MEP. The type is NLA_U32 (bool). When a sequence number is not one higher than previously received then it is unexpected. This is cleared after GETLINK IFLA_BRIDGE_CFM_CC_PEER_STATUS_INFO. Signed-off-by: Henrik Bjoernlund Reviewed-by: Horatiu Vultur Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit e77824d81dff5e6f9244c201537a47f418eb36cb Author: Henrik Bjoernlund Date: Tue Oct 27 10:02:50 2020 +0000 bridge: cfm: Netlink GET status Interface. This is the implementation of CFM netlink status get information interface. Add new nested netlink attributes. These attributes are used by the user space to get status information. GETLINK: Request filter RTEXT_FILTER_CFM_STATUS: Indicating that CFM status information must be delivered. IFLA_BRIDGE_CFM: Points to the CFM information. IFLA_BRIDGE_CFM_MEP_STATUS_INFO: This indicate that the MEP instance status are following. IFLA_BRIDGE_CFM_CC_PEER_STATUS_INFO: This indicate that the peer MEP status are following. CFM nested attribute has the following attributes in next level. GETLINK RTEXT_FILTER_CFM_STATUS: IFLA_BRIDGE_CFM_MEP_STATUS_INSTANCE: The MEP instance number of the delivered status. The type is u32. IFLA_BRIDGE_CFM_MEP_STATUS_OPCODE_UNEXP_SEEN: The MEP instance received CFM PDU with unexpected Opcode. The type is u32 (bool). IFLA_BRIDGE_CFM_MEP_STATUS_VERSION_UNEXP_SEEN: The MEP instance received CFM PDU with unexpected version. The type is u32 (bool). IFLA_BRIDGE_CFM_MEP_STATUS_RX_LEVEL_LOW_SEEN: The MEP instance received CCM PDU with MD level lower than configured level. This frame is discarded. The type is u32 (bool). IFLA_BRIDGE_CFM_CC_PEER_STATUS_INSTANCE: The MEP instance number of the delivered status. The type is u32. IFLA_BRIDGE_CFM_CC_PEER_STATUS_PEER_MEPID: The added Peer MEP ID of the delivered status. The type is u32. IFLA_BRIDGE_CFM_CC_PEER_STATUS_CCM_DEFECT: The CCM defect status. The type is u32 (bool). True means no CCM frame is received for 3.25 intervals. IFLA_BRIDGE_CFM_CC_CONFIG_EXP_INTERVAL. IFLA_BRIDGE_CFM_CC_PEER_STATUS_RDI: The last received CCM PDU RDI. The type is u32 (bool). IFLA_BRIDGE_CFM_CC_PEER_STATUS_PORT_TLV_VALUE: The last received CCM PDU Port Status TLV value field. The type is u8. IFLA_BRIDGE_CFM_CC_PEER_STATUS_IF_TLV_VALUE: The last received CCM PDU Interface Status TLV value field. The type is u8. IFLA_BRIDGE_CFM_CC_PEER_STATUS_SEEN: A CCM frame has been received from Peer MEP. The type is u32 (bool). This is cleared after GETLINK IFLA_BRIDGE_CFM_CC_PEER_STATUS_INFO. IFLA_BRIDGE_CFM_CC_PEER_STATUS_TLV_SEEN: A CCM frame with TLV has been received from Peer MEP. The type is u32 (bool). This is cleared after GETLINK IFLA_BRIDGE_CFM_CC_PEER_STATUS_INFO. IFLA_BRIDGE_CFM_CC_PEER_STATUS_SEQ_UNEXP_SEEN: A CCM frame with unexpected sequence number has been received from Peer MEP. The type is u32 (bool). When a sequence number is not one higher than previously received then it is unexpected. This is cleared after GETLINK IFLA_BRIDGE_CFM_CC_PEER_STATUS_INFO. Signed-off-by: Henrik Bjoernlund Reviewed-by: Horatiu Vultur Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 5e312fc0e7fbd11716c0b976d83f4392522c4f83 Author: Henrik Bjoernlund Date: Tue Oct 27 10:02:49 2020 +0000 bridge: cfm: Netlink GET configuration Interface. This is the implementation of CFM netlink configuration get information interface. Add new nested netlink attributes. These attributes are used by the user space to get configuration information. GETLINK: Request filter RTEXT_FILTER_CFM_CONFIG: Indicating that CFM configuration information must be delivered. IFLA_BRIDGE_CFM: Points to the CFM information. IFLA_BRIDGE_CFM_MEP_CREATE_INFO: This indicate that MEP instance create parameters are following. IFLA_BRIDGE_CFM_MEP_CONFIG_INFO: This indicate that MEP instance config parameters are following. IFLA_BRIDGE_CFM_CC_CONFIG_INFO: This indicate that MEP instance CC functionality parameters are following. IFLA_BRIDGE_CFM_CC_RDI_INFO: This indicate that CC transmitted CCM PDU RDI parameters are following. IFLA_BRIDGE_CFM_CC_CCM_TX_INFO: This indicate that CC transmitted CCM PDU parameters are following. IFLA_BRIDGE_CFM_CC_PEER_MEP_INFO: This indicate that the added peer MEP IDs are following. CFM nested attribute has the following attributes in next level. GETLINK RTEXT_FILTER_CFM_CONFIG: IFLA_BRIDGE_CFM_MEP_CREATE_INSTANCE: The created MEP instance number. The type is u32. IFLA_BRIDGE_CFM_MEP_CREATE_DOMAIN: The created MEP domain. The type is u32 (br_cfm_domain). It must be BR_CFM_PORT. This means that CFM frames are transmitted and received directly on the port - untagged. Not in a VLAN. IFLA_BRIDGE_CFM_MEP_CREATE_DIRECTION: The created MEP direction. The type is u32 (br_cfm_mep_direction). It must be BR_CFM_MEP_DIRECTION_DOWN. This means that CFM frames are transmitted and received on the port. Not in the bridge. IFLA_BRIDGE_CFM_MEP_CREATE_IFINDEX: The created MEP residence port ifindex. The type is u32 (ifindex). IFLA_BRIDGE_CFM_MEP_DELETE_INSTANCE: The deleted MEP instance number. The type is u32. IFLA_BRIDGE_CFM_MEP_CONFIG_INSTANCE: The configured MEP instance number. The type is u32. IFLA_BRIDGE_CFM_MEP_CONFIG_UNICAST_MAC: The configured MEP unicast MAC address. The type is 6*u8 (array). This is used as SMAC in all transmitted CFM frames. IFLA_BRIDGE_CFM_MEP_CONFIG_MDLEVEL: The configured MEP unicast MD level. The type is u32. It must be in the range 1-7. No CFM frames are passing through this MEP on lower levels. IFLA_BRIDGE_CFM_MEP_CONFIG_MEPID: The configured MEP ID. The type is u32. It must be in the range 0-0x1FFF. This MEP ID is inserted in any transmitted CCM frame. IFLA_BRIDGE_CFM_CC_CONFIG_INSTANCE: The configured MEP instance number. The type is u32. IFLA_BRIDGE_CFM_CC_CONFIG_ENABLE: The Continuity Check (CC) functionality is enabled or disabled. The type is u32 (bool). IFLA_BRIDGE_CFM_CC_CONFIG_EXP_INTERVAL: The CC expected receive interval of CCM frames. The type is u32 (br_cfm_ccm_interval). This is also the transmission interval of CCM frames when enabled. IFLA_BRIDGE_CFM_CC_CONFIG_EXP_MAID: The CC expected receive MAID in CCM frames. The type is CFM_MAID_LENGTH*u8. This is MAID is also inserted in transmitted CCM frames. IFLA_BRIDGE_CFM_CC_PEER_MEP_INSTANCE: The configured MEP instance number. The type is u32. IFLA_BRIDGE_CFM_CC_PEER_MEPID: The CC Peer MEP ID added. The type is u32. When a Peer MEP ID is added and CC is enabled it is expected to receive CCM frames from that Peer MEP. IFLA_BRIDGE_CFM_CC_RDI_INSTANCE: The configured MEP instance number. The type is u32. IFLA_BRIDGE_CFM_CC_RDI_RDI: The RDI that is inserted in transmitted CCM PDU. The type is u32 (bool). IFLA_BRIDGE_CFM_CC_CCM_TX_INSTANCE: The configured MEP instance number. The type is u32. IFLA_BRIDGE_CFM_CC_CCM_TX_DMAC: The transmitted CCM frame destination MAC address. The type is 6*u8 (array). This is used as DMAC in all transmitted CFM frames. IFLA_BRIDGE_CFM_CC_CCM_TX_SEQ_NO_UPDATE: The transmitted CCM frame update (increment) of sequence number is enabled or disabled. The type is u32 (bool). IFLA_BRIDGE_CFM_CC_CCM_TX_PERIOD: The period of time where CCM frame are transmitted. The type is u32. The time is given in seconds. SETLINK IFLA_BRIDGE_CFM_CC_CCM_TX must be done before timeout to keep transmission alive. When period is zero any ongoing CCM frame transmission will be stopped. IFLA_BRIDGE_CFM_CC_CCM_TX_IF_TLV: The transmitted CCM frame update with Interface Status TLV is enabled or disabled. The type is u32 (bool). IFLA_BRIDGE_CFM_CC_CCM_TX_IF_TLV_VALUE: The transmitted Interface Status TLV value field. The type is u8. IFLA_BRIDGE_CFM_CC_CCM_TX_PORT_TLV: The transmitted CCM frame update with Port Status TLV is enabled or disabled. The type is u32 (bool). IFLA_BRIDGE_CFM_CC_CCM_TX_PORT_TLV_VALUE: The transmitted Port Status TLV value field. The type is u8. Signed-off-by: Henrik Bjoernlund Reviewed-by: Horatiu Vultur Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 2be665c3940d367e0a2a8128eb4985ce323f99a3 Author: Henrik Bjoernlund Date: Tue Oct 27 10:02:48 2020 +0000 bridge: cfm: Netlink SET configuration Interface. This is the implementation of CFM netlink configuration set information interface. Add new nested netlink attributes. These attributes are used by the user space to create/delete/configure CFM instances. SETLINK: IFLA_BRIDGE_CFM: Indicate that the following attributes are CFM. IFLA_BRIDGE_CFM_MEP_CREATE: This indicate that a MEP instance must be created. IFLA_BRIDGE_CFM_MEP_DELETE: This indicate that a MEP instance must be deleted. IFLA_BRIDGE_CFM_MEP_CONFIG: This indicate that a MEP instance must be configured. IFLA_BRIDGE_CFM_CC_CONFIG: This indicate that a MEP instance Continuity Check (CC) functionality must be configured. IFLA_BRIDGE_CFM_CC_PEER_MEP_ADD: This indicate that a CC Peer MEP must be added. IFLA_BRIDGE_CFM_CC_PEER_MEP_REMOVE: This indicate that a CC Peer MEP must be removed. IFLA_BRIDGE_CFM_CC_CCM_TX: This indicate that the CC transmitted CCM PDU must be configured. IFLA_BRIDGE_CFM_CC_RDI: This indicate that the CC transmitted CCM PDU RDI must be configured. CFM nested attribute has the following attributes in next level. SETLINK RTEXT_FILTER_CFM_CONFIG: IFLA_BRIDGE_CFM_MEP_CREATE_INSTANCE: The created MEP instance number. The type is u32. IFLA_BRIDGE_CFM_MEP_CREATE_DOMAIN: The created MEP domain. The type is u32 (br_cfm_domain). It must be BR_CFM_PORT. This means that CFM frames are transmitted and received directly on the port - untagged. Not in a VLAN. IFLA_BRIDGE_CFM_MEP_CREATE_DIRECTION: The created MEP direction. The type is u32 (br_cfm_mep_direction). It must be BR_CFM_MEP_DIRECTION_DOWN. This means that CFM frames are transmitted and received on the port. Not in the bridge. IFLA_BRIDGE_CFM_MEP_CREATE_IFINDEX: The created MEP residence port ifindex. The type is u32 (ifindex). IFLA_BRIDGE_CFM_MEP_DELETE_INSTANCE: The deleted MEP instance number. The type is u32. IFLA_BRIDGE_CFM_MEP_CONFIG_INSTANCE: The configured MEP instance number. The type is u32. IFLA_BRIDGE_CFM_MEP_CONFIG_UNICAST_MAC: The configured MEP unicast MAC address. The type is 6*u8 (array). This is used as SMAC in all transmitted CFM frames. IFLA_BRIDGE_CFM_MEP_CONFIG_MDLEVEL: The configured MEP unicast MD level. The type is u32. It must be in the range 1-7. No CFM frames are passing through this MEP on lower levels. IFLA_BRIDGE_CFM_MEP_CONFIG_MEPID: The configured MEP ID. The type is u32. It must be in the range 0-0x1FFF. This MEP ID is inserted in any transmitted CCM frame. IFLA_BRIDGE_CFM_CC_CONFIG_INSTANCE: The configured MEP instance number. The type is u32. IFLA_BRIDGE_CFM_CC_CONFIG_ENABLE: The Continuity Check (CC) functionality is enabled or disabled. The type is u32 (bool). IFLA_BRIDGE_CFM_CC_CONFIG_EXP_INTERVAL: The CC expected receive interval of CCM frames. The type is u32 (br_cfm_ccm_interval). This is also the transmission interval of CCM frames when enabled. IFLA_BRIDGE_CFM_CC_CONFIG_EXP_MAID: The CC expected receive MAID in CCM frames. The type is CFM_MAID_LENGTH*u8. This is MAID is also inserted in transmitted CCM frames. IFLA_BRIDGE_CFM_CC_PEER_MEP_INSTANCE: The configured MEP instance number. The type is u32. IFLA_BRIDGE_CFM_CC_PEER_MEPID: The CC Peer MEP ID added. The type is u32. When a Peer MEP ID is added and CC is enabled it is expected to receive CCM frames from that Peer MEP. IFLA_BRIDGE_CFM_CC_RDI_INSTANCE: The configured MEP instance number. The type is u32. IFLA_BRIDGE_CFM_CC_RDI_RDI: The RDI that is inserted in transmitted CCM PDU. The type is u32 (bool). IFLA_BRIDGE_CFM_CC_CCM_TX_INSTANCE: The configured MEP instance number. The type is u32. IFLA_BRIDGE_CFM_CC_CCM_TX_DMAC: The transmitted CCM frame destination MAC address. The type is 6*u8 (array). This is used as DMAC in all transmitted CFM frames. IFLA_BRIDGE_CFM_CC_CCM_TX_SEQ_NO_UPDATE: The transmitted CCM frame update (increment) of sequence number is enabled or disabled. The type is u32 (bool). IFLA_BRIDGE_CFM_CC_CCM_TX_PERIOD: The period of time where CCM frame are transmitted. The type is u32. The time is given in seconds. SETLINK IFLA_BRIDGE_CFM_CC_CCM_TX must be done before timeout to keep transmission alive. When period is zero any ongoing CCM frame transmission will be stopped. IFLA_BRIDGE_CFM_CC_CCM_TX_IF_TLV: The transmitted CCM frame update with Interface Status TLV is enabled or disabled. The type is u32 (bool). IFLA_BRIDGE_CFM_CC_CCM_TX_IF_TLV_VALUE: The transmitted Interface Status TLV value field. The type is u8. IFLA_BRIDGE_CFM_CC_CCM_TX_PORT_TLV: The transmitted CCM frame update with Port Status TLV is enabled or disabled. The type is u32 (bool). IFLA_BRIDGE_CFM_CC_CCM_TX_PORT_TLV_VALUE: The transmitted Port Status TLV value field. The type is u8. Signed-off-by: Henrik Bjoernlund Reviewed-by: Horatiu Vultur Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit dc32cbb3dbd7da38c700d6e0fc6354df24920525 Author: Henrik Bjoernlund Date: Tue Oct 27 10:02:47 2020 +0000 bridge: cfm: Kernel space implementation of CFM. CCM frame RX added. This is the third commit of the implementation of the CFM protocol according to 802.1Q section 12.14. Functionality is extended with CCM frame reception. The MEP instance now contains CCM based status information. Most important is the CCM defect status indicating if correct CCM frames are received with the expected interval. Signed-off-by: Henrik Bjoernlund Reviewed-by: Horatiu Vultur Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit a806ad8ee2aa7826b279c3f92c67956eb101ae42 Author: Henrik Bjoernlund Date: Tue Oct 27 10:02:46 2020 +0000 bridge: cfm: Kernel space implementation of CFM. CCM frame TX added. This is the second commit of the implementation of the CFM protocol according to 802.1Q section 12.14. Functionality is extended with CCM frame transmission. Interface is extended with these functions: br_cfm_cc_rdi_set() br_cfm_cc_ccm_tx() br_cfm_cc_config_set() A MEP Continuity Check feature can be configured by br_cfm_cc_config_set() The Continuity Check parameters can be configured to be used when transmitting CCM. A MEP can be configured to start or stop transmission of CCM frames by br_cfm_cc_ccm_tx() The CCM will be transmitted for a selected period in seconds. Must call this function before timeout to keep transmission alive. A MEP transmitting CCM can be configured with inserted RDI in PDU by br_cfm_cc_rdi_set() Signed-off-by: Henrik Bjoernlund Reviewed-by: Horatiu Vultur Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 86a14b79e1d0fa023f82d7c2dde888fa64af2c65 Author: Henrik Bjoernlund Date: Tue Oct 27 10:02:45 2020 +0000 bridge: cfm: Kernel space implementation of CFM. MEP create/delete. This is the first commit of the implementation of the CFM protocol according to 802.1Q section 12.14. It contains MEP instance create, delete and configuration. Connectivity Fault Management (CFM) comprises capabilities for detecting, verifying, and isolating connectivity failures in Virtual Bridged Networks. These capabilities can be used in networks operated by multiple independent organizations, each with restricted management access to each others equipment. CFM functions are partitioned as follows: - Path discovery - Fault detection - Fault verification and isolation - Fault notification - Fault recovery Interface consists of these functions: br_cfm_mep_create() br_cfm_mep_delete() br_cfm_mep_config_set() br_cfm_cc_config_set() br_cfm_cc_peer_mep_add() br_cfm_cc_peer_mep_remove() A MEP instance is created by br_cfm_mep_create() -It is the Maintenance association End Point described in 802.1Q section 19.2. -It is created on a specific level (1-7) and is assuring that no CFM frames are passing through this MEP on lower levels. -It initiates and validates CFM frames on its level. -It can only exist on a port that is related to a bridge. -Attributes given cannot be changed until the instance is deleted. A MEP instance can be deleted by br_cfm_mep_delete(). A created MEP instance has attributes that can be configured by br_cfm_mep_config_set(). A MEP Continuity Check feature can be configured by br_cfm_cc_config_set() The Continuity Check Receiver state machine can be enabled and disabled. According to 802.1Q section 19.2.8 A MEP can have Peer MEPs added and removed by br_cfm_cc_peer_mep_add() and br_cfm_cc_peer_mep_remove() The Continuity Check feature can maintain connectivity status on each added Peer MEP. Signed-off-by: Henrik Bjoernlund Reviewed-by: Horatiu Vultur Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit fbaedb4129838252570410c65abb2036b5505cbd Author: Henrik Bjoernlund Date: Tue Oct 27 10:02:44 2020 +0000 bridge: uapi: cfm: Added EtherType used by the CFM protocol. This EtherType is used by all CFM protocal frames transmitted according to 802.1Q section 12.14. Signed-off-by: Henrik Bjoernlund Reviewed-by: Horatiu Vultur Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit f323aa54bec7acbf2d8edd36da9b0c300c79253e Author: Henrik Bjoernlund Date: Tue Oct 27 10:02:43 2020 +0000 bridge: cfm: Add BRIDGE_CFM to Kconfig. This makes it possible to include or exclude the CFM protocol according to 802.1Q section 12.14. Signed-off-by: Henrik Bjoernlund Reviewed-by: Horatiu Vultur Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 90c628dd47ff4178f645b34938470bf43d02d123 Author: Henrik Bjoernlund Date: Tue Oct 27 10:02:42 2020 +0000 net: bridge: extend the process of special frames This patch extends the processing of frames in the bridge. Currently MRP frames needs special processing and the current implementation doesn't allow a nice way to process different frame types. Therefore try to improve this by adding a list that contains frame types that need special processing. This list is iterated for each input frame and if there is a match based on frame type then these functions will be called and decide what to do with the frame. It can process the frame then the bridge doesn't need to do anything or don't process so then the bridge will do normal forwarding. Signed-off-by: Henrik Bjoernlund Reviewed-by: Horatiu Vultur Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit c13a7d84c4159e58127dbeac287686620a70b770 Author: Jacky Bai Date: Tue Sep 29 17:15:23 2020 +0800 arm64: dts: freescale: Add pmu support on imx8mn Add PMU node to enable pmu support on imx8mn. Signed-off-by: Jacky Bai Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 0f109a3158297ba774cdd4991b4a145738fe6202 Author: Jacky Bai Date: Tue Sep 29 17:15:22 2020 +0800 arm64: dts: freescale: Add pmu support on imx8mp Add PMU node to enable pmu support on imx8mp. Signed-off-by: Jacky Bai Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 061883e690ebf6fc5a17fdf55249a3b8d5c111fe Author: Krzysztof Kozlowski Date: Tue Sep 29 10:40:15 2020 +0200 arm64: dts: imx8mp: adjust GIC CPU mask to match number of CPUs i.MX 8M Plus has four Cortex-A CPUs, not six. Using higher value is harmless but adjust it to match real HW. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Jacky Bai Signed-off-by: Shawn Guo commit 0656e37a8fa87fca12ef255de018a9d80ba23eb8 Author: Krzysztof Kozlowski Date: Tue Sep 29 10:40:14 2020 +0200 arm64: dts: imx8mn: adjust GIC CPU mask to match number of CPUs i.MX 8M Nano has four Cortex-A CPUs, not six. Using higher value is harmless but adjust it to match real HW. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Jacky Bai Signed-off-by: Shawn Guo commit 5c22a9af414c463b3f47bc56b5bca5d7b7c6d5f0 Author: Krzysztof Kozlowski Date: Tue Sep 29 10:40:13 2020 +0200 arm64: dts: imx8mm: adjust GIC CPU mask to match number of CPUs i.MX 8M Mini has four Cortex-A CPUs, not six. Using higher value is harmless but adjust it to match real HW. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Jacky Bai Signed-off-by: Shawn Guo commit ae8a6e6e881880012705ae114a180592b88b3cfb Merge: 1c29d9899081d c3e448cdc0407 Author: Jakub Kicinski Date: Thu Oct 29 17:43:23 2020 -0700 Merge branch 'vsock-minor-clean-up-of-ioctl-error-handling' Colin Ian King says: ==================== vsock: minor clean up of ioctl error handling Two minor changes to the ioctl error handling. ==================== Link: https://lore.kernel.org/r/20201027090942.14916-1-colin.king@canonical.com Signed-off-by: Jakub Kicinski commit c3e448cdc04071d1c420e7da87bafff22022a675 Author: Colin Ian King Date: Tue Oct 27 09:09:42 2020 +0000 vsock: fix the error return when an invalid ioctl command is used Currently when an invalid ioctl command is used the error return is -EINVAL. Fix this by returning the correct error -ENOIOCTLCMD. Signed-off-by: Colin Ian King Reviewed-by: Stefano Garzarella Signed-off-by: Jakub Kicinski commit 6bc8f20c1d9348bdf9ce387228c1b16ce4a301ad Author: Colin Ian King Date: Tue Oct 27 09:09:41 2020 +0000 vsock: remove ratelimit unknown ioctl message When exercising the kernel with stress-ng with some ioctl tests the "Unknown ioctl" error message is spamming the kernel log at a high rate. Remove this message. Signed-off-by: Colin Ian King Reviewed-by: Stefano Garzarella Signed-off-by: Jakub Kicinski commit 71011f55b0ab160631a31ea1e4b23f9717e5d072 Author: Krzysztof Kozlowski Date: Thu Oct 29 17:21:33 2020 +0100 arm64: dts: freescale: align watchdog node name with dtschema The dtschema expects watchdog device node name to be "watchdog": arch/arm64/boot/dts/freescale/fsl-ls1012a-frdm.dt.yaml: wdog@2ad0000: $nodename:0: 'wdog@2ad0000' does not match '^watchdog(@.*|-[0-9a-f])?$' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit d9395d72003365dd2221922ba73a184603848124 Author: Krzysztof Kozlowski Date: Thu Oct 29 17:21:32 2020 +0100 dt-bindings: watchdog: fsl-imx: document NXP compatibles Document all ARMv5, ARMv6, ARMv7 and ARMv8 NXP (i.MX, Layerscape) compatibles used in DTSes (even though driver binds only to fsl,imx21-wdt) to fix dtbs_check warnings like: arch/arm/boot/dts/imx53-qsb.dt.yaml: gpio@53fe0000: compatible: ['fsl,imx53-gpio', 'fsl,imx35-gpio'] is not valid under any of the given schemas Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Shawn Guo commit 7ecab1f29baf8b8c43d5f7c891aceacc15c19f22 Author: Anson Huang Date: Mon Sep 28 10:21:43 2020 +0800 arm64: dts: imx8mn-evk: Add cpu-supply to enable cpufreq PMIC driver is ready on i.MX8MN EVK board, assign cpu-supply for each A53 and restore the operating points table to enable cpufreq. Signed-off-by: Anson Huang Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 2f4ac2d79eb4c09ee6dbda1d2fc2616f281094f9 Author: Anson Huang Date: Sun Sep 27 15:03:13 2020 +0800 ARM: imx: Add revision support for i.MX7ULP revision 2.2 On i.MX7ULP revision 2.2, the value is 3, so add support for this revision, otherwise, it will use default revision of 1.0 which is incorrect. Signed-off-by: Anson Huang Reviewed-by: Peng Fan Signed-off-by: Shawn Guo commit fa3bfa3527b31562dba28d49c0a18b722b42e226 Author: Chris Wilson Date: Thu Oct 29 21:30:42 2020 +0000 drm: Quieten [zero] EDID carping We have a few displays in CI that always report their EDID as a bunch of zeroes. This is consistent behaviour, so one assumes intentional indication of an "absent" EDID. Flagging these consistent warnings detracts from CI. One option would be to ignore the zero EDIDs as intentional behaviour, but Ville would like to keep the information available for debugging. The simple alternative then is to reduce the loglevel for all the EDID dumping from WARN to DEBUG so the information is present but not annoy CI. Note that the bad EDID dumping is already only shown if drm.debug=KMS, it's just the loglevel chosen was set to be caught by CI if it ever occurred as it was expected to be an internal error not external. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2203 Signed-off-by: Chris Wilson Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201029213042.11672-1-chris@chris-wilson.co.uk commit 1c29d9899081d090cbe2aab128e527354af7f343 Merge: cd29296fdfca9 07e0887302450 Author: Jakub Kicinski Date: Thu Oct 29 14:08:40 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Signed-off-by: Jakub Kicinski commit ea3186b9572a1b0299448697cfc44920061872cf Author: Arvind Sankar Date: Thu Oct 29 12:19:03 2020 -0400 x86/build: Fix vmlinux size check on 64-bit Commit b4e0409a36f4 ("x86: check vmlinux limits, 64-bit") added a check that the size of the 64-bit kernel is less than KERNEL_IMAGE_SIZE. The check uses (_end - _text), but this is not enough. The initial PMD used in startup_64() (level2_kernel_pgt) can only map upto KERNEL_IMAGE_SIZE from __START_KERNEL_map, not from _text, and the modules area (MODULES_VADDR) starts at KERNEL_IMAGE_SIZE. The correct check is what is currently done for 32-bit, since LOAD_OFFSET is defined appropriately for the two architectures. Just check (_end - LOAD_OFFSET) against KERNEL_IMAGE_SIZE unconditionally. Note that on 32-bit, the limit is not strict: KERNEL_IMAGE_SIZE is not really used by the main kernel. The higher the kernel is located, the less the space available for the vmalloc area. However, it is used by KASLR in the compressed stub to limit the maximum address of the kernel to a safe value. Clean up various comments to clarify that despite the name, KERNEL_IMAGE_SIZE is not a limit on the size of the kernel image, but a limit on the maximum virtual address that the image can occupy. Signed-off-by: Arvind Sankar Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201029161903.2553528-1-nivedita@alum.mit.edu commit f54ec58fee837ec847cb8b50593e81bfaa46107f Author: Arnd Bergmann Date: Tue Oct 27 21:12:12 2020 +0100 wimax: move out to staging There are no known users of this driver as of October 2020, and it will be removed unless someone turns out to still need it in future releases. According to https://en.wikipedia.org/wiki/List_of_WiMAX_networks, there have been many public wimax networks, but it appears that many of these have migrated to LTE or discontinued their service altogether. As most PCs and phones lack WiMAX hardware support, the remaining networks tend to use standalone routers. These almost certainly run Linux, but not a modern kernel or the mainline wimax driver stack. NetworkManager appears to have dropped userspace support in 2015 https://bugzilla.gnome.org/show_bug.cgi?id=747846, the www.linuxwimax.org site had already shut down earlier. WiMax is apparently still being deployed on airport campus networks ("AeroMACS"), but in a frequency band that was not supported by the old Intel 2400m (used in Sandy Bridge laptops and earlier), which is the only driver using the kernel's wimax stack. Move all files into drivers/staging/wimax, including the uapi header files and documentation, to make it easier to remove it when it gets to that. Only minimal changes are made to the source files, in order to make it possible to port patches across the move. Also remove the MAINTAINERS entry that refers to a broken mailing list and website. Acked-by: Jakub Kicinski Acked-by: Greg Kroah-Hartman Acked-By: Inaky Perez-Gonzalez Acked-by: Johannes Berg Suggested-by: Inaky Perez-Gonzalez Signed-off-by: Arnd Bergmann commit 72de7d965bc190cae317ed972babfe5eb87d7898 Author: Arnd Bergmann Date: Sun Oct 18 20:00:13 2020 +0200 wimax: fix duplicate initializer warning gcc -Wextra points out multiple fields that use the same index '1' in the wimax_gnl_policy definition: net/wimax/stack.c:393:29: warning: initialized field overwritten [-Woverride-init] net/wimax/stack.c:397:28: warning: initialized field overwritten [-Woverride-init] net/wimax/stack.c:398:26: warning: initialized field overwritten [-Woverride-init] This seems to work since all four use the same NLA_U32 value, but it still appears to be wrong. In addition, there is no intializer for WIMAX_GNL_MSG_PIPE_NAME, which uses the same index '2' as WIMAX_GNL_RFKILL_STATE. Johannes already changed this twice to improve it, but I don't think there is a good solution, so try to work around it by using a numeric index and adding comments. Fixes: 3b0f31f2b8c9 ("genetlink: make policy common to family") Fixes: b61a5eea5904 ("wimax: use genl_register_family_with_ops()") Acked-by: Johannes Berg Signed-off-by: Arnd Bergmann commit f9081b8ff5934b8d69c748d0200e844cadd2c667 Author: Bjorn Andersson Date: Mon Oct 19 11:23:23 2020 -0700 iommu/arm-smmu-qcom: Implement S2CR quirk The firmware found in some Qualcomm platforms intercepts writes to S2CR in order to replace bypass type streams with fault; and ignore S2CR updates of type fault. Detect this behavior and implement a custom write_s2cr function in order to trick the firmware into supporting bypass streams by the means of configuring the stream for translation using a reserved and disabled context bank. Also circumvent the problem of configuring faulting streams by configuring the stream as bypass. Cc: Signed-off-by: Bjorn Andersson Tested-by: Steev Klimaszewski Acked-by: Robin Murphy Link: https://lore.kernel.org/r/20201019182323.3162386-4-bjorn.andersson@linaro.org Signed-off-by: Will Deacon commit 07a7f2caaa5a2619934491bab3c47b261c554fb0 Author: Bjorn Andersson Date: Mon Oct 19 11:23:22 2020 -0700 iommu/arm-smmu-qcom: Read back stream mappings The Qualcomm boot loader configures stream mapping for the peripherals that it accesses and in particular it sets up the stream mapping for the display controller to be allowed to scan out a splash screen or EFI framebuffer. Read back the stream mappings during initialization and make the arm-smmu driver maintain the streams in bypass mode. Cc: Signed-off-by: Bjorn Andersson Tested-by: Steev Klimaszewski Acked-by: Robin Murphy Link: https://lore.kernel.org/r/20201019182323.3162386-3-bjorn.andersson@linaro.org Signed-off-by: Will Deacon commit 56b75b51ed6d5e7bffda59440404409bca2dff00 Author: Bjorn Andersson Date: Mon Oct 19 11:23:21 2020 -0700 iommu/arm-smmu: Allow implementation specific write_s2cr The firmware found in some Qualcomm platforms intercepts writes to the S2CR register in order to replace the BYPASS type with FAULT. Further more it treats faults at this level as catastrophic and restarts the device. Add support for providing implementation specific versions of the S2CR write function, to allow the Qualcomm driver to work around this behavior. Cc: Signed-off-by: Bjorn Andersson Tested-by: Steev Klimaszewski Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/20201019182323.3162386-2-bjorn.andersson@linaro.org Signed-off-by: Will Deacon commit bbc4e1bb5fd6577ed668e7c2ba0705dff1783bce Author: Srinivas Kandagatla Date: Thu Oct 29 10:15:50 2020 +0000 ASoC: qcom: sm8250: update compatible with new bindings Update compatible string as board compatible and device compatible should not be same!. Make the driver inline with the new bindings. Fixes: aa2e2785545a ("ASoC: qcom: sm8250: add sound card qrb5165-rb5 support") Reported-by: Rob Herring Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20201029101550.31695-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit a889583a19206636082c44625141b26392e46a62 Author: Srinivas Kandagatla Date: Thu Oct 29 10:15:49 2020 +0000 ASoC: qcom: dt-bindings: sm8250: update compatibles Update compatible string as board compatible and device compatible should not be same!. New compatible is now suffixed with -sndcard to be inline with other Qualcomm Sound cards. This also fixes the warnings/error reported by dt_binding_check. Fixes: 765c37598494 ("ASoC: qcom: dt-bindings: Add SM8250 sound card bindings") Reported-by: Rob Herring Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20201029101550.31695-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 96eaeb3dfa40576a7aa195303c538202311cffbc Author: Ville Syrjälä Date: Wed Dec 12 23:17:38 2018 +0200 drm/i915: Use _MMIO_PIPE3() for ilk+ WM0_PIPE registers Remove the hand rolled array of WM0_PIPE register offsets and use the standard _MMIO_PIPE3() instead. v2: Take care of gvt too Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181212211738.27770-1-ville.syrjala@linux.intel.com Reviewed-by: Lucas De Marchi commit c6838eeef2fbc7e3e1f83759aa016ae6b70c643e Author: dmitry.torokhov@gmail.com Date: Wed Sep 30 15:47:13 2020 -0700 HID: hid-input: occasionally report stylus battery even if not changed There are styluses that only report their battery status when they are touching the touchscreen; additionally we currently suppress battery reports if capacity has not changed. To help userspace recognize how long ago the device reported battery status, let's send the change event through if either capacity has changed, or at least 30 seconds have passed since last report we've let through. Signed-off-by: Dmitry Torokhov Signed-off-by: Jiri Kosina commit afdd34c5fa4028976ee5103ac499edbddedc813e Author: Coiby Xu Date: Wed Oct 21 22:33:05 2020 +0800 HID: i2c-hid: show the error when failing to fetch the HID descriptor i2c_hid_probe() should notify the user of the error of failing to fetch the HID Descriptor instead of silently exiting. Link: https://forum.manjaro.org/t/elan-touchpad-working-in-live-but-not-in-native-os/31860/55 Cc: Barnabás Pőcze Signed-off-by: Coiby Xu Signed-off-by: Jiri Kosina commit 4b393f0f76c8e3ce80b3bd524dc40bd674a29101 Author: Sandeep Singh Date: Wed Oct 28 14:30:10 2020 +0530 AMD_SFH: Fix for incorrect Sensor index It appears like the accelerometer/magnetometer and gyroscope indices were interchanged in the patch series which got into for-5.11/amd-sfh-hid until Mandoli/Richard reported to us. Ideally sensor indices should be 0,1,2 for the accelerometer, Gyroscope, Magnetometer respectively, but this interchanged possibly could be because i was using a test MP2 firmware on my machine. This patch fixes the earlier commit with the right sensor indices and also removing unused structures _hid_report_descriptor, _hid_device_descriptor as reported by Richard. Fixes: 4f567b9f8141 ("SFH: PCIe driver to add support of AMD sensor fusion hub 4f567b9f8141") Reported-by: Mandoli Reported-by: Richard Neumann Signed-off-by: Sandeep Singh Signed-off-by: Jiri Kosina commit 256dd44bd897055571c131703afdd02b2e4f1f29 Author: Christian König Date: Sat Oct 24 13:17:49 2020 +0200 drm/ttm: nuke old page allocator Not used any more. Signed-off-by: Christian König Reviewed-by: Dave Airlie Reviewed-by: Madhav Chauhan Tested-by: Huang Rui Link: https://patchwork.freedesktop.org/patch/397087/?series=83051&rev=1 commit fbf1c39cab37590e9b8c5a19d3b129e7fe86fee3 Author: Christian König Date: Sat Oct 24 13:16:59 2020 +0200 drm/vram_helpers: drop ttm_page_alloc.h include Not needed as far as I can see. Signed-off-by: Christian König Reviewed-by: Dave Airlie Reviewed-by: Madhav Chauhan Tested-by: Huang Rui Link: https://patchwork.freedesktop.org/patch/397085/?series=83051&rev=1 commit f9b2c9e361f661763151078e9d8aa0cd3bbc25d4 Author: Christian König Date: Sat Oct 24 13:15:35 2020 +0200 drm/qxl: drop ttm_page_alloc.h include Not needed as far as I can see. Signed-off-by: Christian König Reviewed-by: Dave Airlie Reviewed-by: Madhav Chauhan Tested-by: Huang Rui Link: https://patchwork.freedesktop.org/patch/397084/?series=83051&rev=1 commit 8567d51555c12d169c4e0f796030051fff1c318d Author: Christian König Date: Sat Oct 24 13:16:05 2020 +0200 drm/vmwgfx: switch to new allocator It should be able to handle all cases now. Signed-off-by: Christian König Reviewed-by: Dave Airlie Reviewed-by: Madhav Chauhan Tested-by: Huang Rui Link: https://patchwork.freedesktop.org/patch/397083/?series=83051&rev=1 commit 461619f5c3242aaee9ec3f0b7072719bd86ea207 Author: Christian König Date: Sat Oct 24 13:13:25 2020 +0200 drm/nouveau: switch to new allocator It should be able to handle all cases now. Signed-off-by: Christian König Reviewed-by: Dave Airlie Reviewed-by: Madhav Chauhan Tested-by: Huang Rui Link: https://patchwork.freedesktop.org/patch/397082/?series=83051&rev=1 commit 0fe3cf3a53b5c1205ec7d321be1185b075dff205 Author: Christian König Date: Sat Oct 24 13:12:23 2020 +0200 drm/radeon: switch to new allocator v2 It should be able to handle all cases here. v2: fix debugfs as well Signed-off-by: Christian König Reviewed-by: Dave Airlie Reviewed-by: Madhav Chauhan Tested-by: Huang Rui Link: https://patchwork.freedesktop.org/patch/397088/?series=83051&rev=1 commit e93b2da9799e5cb97760969f3e1f02a5bdac29fe Author: Christian König Date: Sat Oct 24 13:11:29 2020 +0200 drm/amdgpu: switch to new allocator v2 It should be able to handle all cases here. v2: fix debugfs as well Signed-off-by: Christian König Reviewed-by: Dave Airlie Reviewed-by: Madhav Chauhan Tested-by: Huang Rui Link: https://patchwork.freedesktop.org/patch/397086/?series=83051&rev=1 commit ee5d2a8e549e90325fcc31825269f89647cd6fac Author: Christian König Date: Sat Oct 24 13:10:28 2020 +0200 drm/ttm: wire up the new pool as default one v2 Provide the necessary parameters by all drivers and use the new pool alloc when no driver specific function is provided. v2: fix the GEM VRAM helpers Signed-off-by: Christian König Reviewed-by: Dave Airlie Reviewed-by: Madhav Chauhan Tested-by: Huang Rui Link: https://patchwork.freedesktop.org/patch/397081/?series=83051&rev=1 commit b92b80246e06269c1407face33fd8a57a763a145 Author: Luke D Jones Date: Tue Oct 27 10:02:17 2020 +1300 HID: asus: Add support for ASUS N-Key keyboard The ASUS N-Key keyboard uses the productId of 0x1866 and is used in almost all modern ASUS gaming laptops with slight changes to the firmware. This patch enables: Fn+key hotkeys, keyboard backlight brightness control. Additionally this keyboard requires the LED interface to be initialized before such things as keyboard backlight control work. Signed-off-by: Luke D Jones Reviewed-by: Hans de Goede Signed-off-by: Jiri Kosina commit d099fc8f540add80f725014fdd4f7f49f3c58911 Author: Christian König Date: Thu Oct 22 18:26:58 2020 +0200 drm/ttm: new TT backend allocation pool v3 This replaces the spaghetti code in the two existing page pools. First of all depending on the allocation size it is between 3 (1GiB) and 5 (1MiB) times faster than the old implementation. It makes better use of buddy pages to allow for larger physical contiguous allocations which should result in better TLB utilization at least for amdgpu. Instead of a completely braindead approach of filling the pool with one CPU while another one is trying to shrink it we only give back freed pages. This also results in much less locking contention and a trylock free MM shrinker callback, so we can guarantee that pages are given back to the system when needed. Downside of this is that it takes longer for many small allocations until the pool is filled up. We could address this, but I couldn't find an use case where this actually matters. We also don't bother freeing large chunks of pages any more since the CPU overhead in that path isn't really that important. The sysfs files are replaced with a single module parameter, allowing users to override how many pages should be globally pooled in TTM. This unfortunately breaks the UAPI slightly, but as far as we know nobody ever depended on this. Zeroing memory coming from the pool was handled inconsistently. The alloc_pages() based pool was zeroing it, the dma_alloc_attr() based one wasn't. For now the new implementation isn't zeroing pages from the pool either and only sets the __GFP_ZERO flag when necessary. The implementation has only 768 lines of code compared to the over 2600 of the old one, and also allows for saving quite a bunch of code in the drivers since we don't need specialized handling there any more based on kernel config. Additional to all of that there was a neat bug with IOMMU, coherent DMA mappings and huge pages which is now fixed in the new code as well. v2: make ttm_pool_apply_caching static as reported by the kernel bot, add some more checks v3: fix some more checkpatch.pl warnings Signed-off-by: Christian König Reviewed-by: Dave Airlie Reviewed-by: Madhav Chauhan Tested-by: Huang Rui Link: https://patchwork.freedesktop.org/patch/397080/?series=83051&rev=1 commit 1a002325d1642f6d206563870434dc027546e06e Author: Krzysztof Kozlowski Date: Sat Sep 26 18:28:03 2020 +0200 dt-bindings: arm: fsl: document i.MX25 and i.MX27 boards Document and adjust the compatibles for i.MX25 and i.MX27 based boards to fix dtbs_check warnings like: arch/arm/boot/dts/imx27-apf27dev.dt.yaml: /: compatible: ['armadeus,imx27-apf27dev', 'armadeus,imx27-apf27', 'fsl,imx27'] is not valid under any of the given schemas Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Shawn Guo commit a913e88ffb90800d531feba45025382aabf680bb Author: Krzysztof Kozlowski Date: Sat Sep 26 18:23:02 2020 +0200 ARM: dts: vf: align watchdog node name with dtschema The dtschema expects watchdog device node name to be "watchdog": arch/arm/boot/dts/vf500-colibri-eval-v3.dt.yaml: wdog@4003e000: $nodename:0: 'wdog@4003e000' does not match '^watchdog(@.*|-[0-9a-f])?$' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit cec12cd8d1861ad9090d0b6c70e14a4b87b1e1b4 Author: Krzysztof Kozlowski Date: Sat Sep 26 18:23:01 2020 +0200 ARM: dts: imx: align watchdog node name with dtschema The dtschema expects watchdog device node name to be "watchdog": arch/arm/boot/dts/imx31-bug.dt.yaml: wdog@53fdc000: $nodename:0: 'wdog@53fdc000' does not match '^watchdog(@.*|-[0-9a-f])?$' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit b9bf97105f4b9adc32604d24072147b242564fb3 Author: Deepak R Varma Date: Wed Oct 14 00:32:12 2020 +0530 gpio: 104-idi-48: improve code indentation Address code indentation warning messages by checkpatch script. Combine split function parameters on one line. This also resolves the "use tabs instead of space" warning by checkpatch script. Signed-off-by: Deepak R Varma Link: https://lore.kernel.org/r/20201013190212.GA85788@ubuntu204 Signed-off-by: Linus Walleij commit 036f224ef8f447928bfd3085220c28e158a4e4d6 Author: Eugen Hristev Date: Thu Oct 29 14:12:23 2020 +0200 ARM: configs: at91_dt: resync with media changes The media tree Kconfig has changed recently, and a lot of modules were built unintentionally, like the dvb frontends and encoders. Resync the defconfig to build the ISI drivers and tested sensors. Signed-off-by: Eugen Hristev Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201029121223.871531-1-eugen.hristev@microchip.com commit bd0cef2a797ac59a103c887b7864b6cf7bd5b512 Author: Zou Wei Date: Thu Oct 29 10:18:45 2020 +0800 drm/i915: Remove unused variable ret This patch fixes below warnings reported by coccicheck ./drivers/gpu/drm/i915/i915_debugfs.c:789:5-8: Unneeded variable: "ret". Return "0" on line 1012 Reported-by: Hulk Robot Signed-off-by: Zou Wei Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/1603937925-53176-1-git-send-email-zou_wei@huawei.com commit 0f41e31a7bdca9a1c51ae21ccfc569ccb9359e03 Author: John Harrison Date: Wed Oct 28 07:58:26 2020 -0700 drm/i915/guc: Clear pointers on free Clear out some pointers when objects have been de-allocated. This makes it much easier to track down use-after-free type issues. Signed-off-by: John Harrison Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20201028145826.2949180-4-John.C.Harrison@Intel.com commit 164e57ca151b144c6952ffb7c52cf3bf81e766f8 Author: John Harrison Date: Wed Oct 28 07:58:25 2020 -0700 drm/i915/guc: Improved reporting when GuC fails to load Rather than just saying 'GuC failed to load: -110', actually print out the GuC status register and break it down into the individual fields. Signed-off-by: John Harrison Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20201028145826.2949180-3-John.C.Harrison@Intel.com commit c784e5249e773689e38d2bc1749f08b986621a26 Author: John Harrison Date: Wed Oct 28 07:58:24 2020 -0700 drm/i915/guc: Update to use firmware v49.0.1 The latest GuC firmware includes a number of interface changes that require driver updates to match. * Starting from Gen11, the ID to be provided to GuC needs to contain the engine class in bits [0..2] and the instance in bits [3..6]. NOTE: this patch breaks pointer dereferences in some existing GuC functions that use the guc_id to dereference arrays but these functions are not used for now as we have GuC submission disabled and we will update these functions in follow up patch which requires new IDs. * The new GuC requires the additional data structure (ADS) and associated 'private_data' pointer to be setup. This is basically a scratch area of memory that the GuC owns. The size is read from the CSS header. * There is now a physical to logical engine mapping table in the ADS which needs to be configured in order for the firmware to load. For now, the table is initialised with a 1 to 1 mapping. * GUC_CTL_CTXINFO has been removed from the initialization params. * reg_state_buffer is maintained internally by the GuC as part of the private data. * The ADS layout has changed significantly. This patch updates the shared structure and also adds better documentation of the layout. * While i915 does not use GuC doorbells, the firmware now requires that some initialisation is done. * The number of engine classes and instances supported in the ADS has been increased. Signed-off-by: John Harrison Signed-off-by: Matthew Brost Signed-off-by: Daniele Ceraolo Spurio Signed-off-by: Oscar Mateo Signed-off-by: Michel Thierry Signed-off-by: Rodrigo Vivi Signed-off-by: Michal Wajdeczko Cc: Michal Winiarski Cc: Tomasz Lis Cc: Joonas Lahtinen Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20201028145826.2949180-2-John.C.Harrison@Intel.com commit 5e8ed280dab9eeabc1ba0b2db5dbe9fe6debb6b5 Author: Miroslav Benes Date: Tue Oct 27 15:03:36 2020 +0100 module: set MODULE_STATE_GOING state when a module fails to load If a module fails to load due to an error in prepare_coming_module(), the following error handling in load_module() runs with MODULE_STATE_COMING in module's state. Fix it by correctly setting MODULE_STATE_GOING under "bug_cleanup" label. Signed-off-by: Miroslav Benes Signed-off-by: Jessica Yu commit 45ff510517f3b1354a3d9c273ad5e5e8d08312cb Author: Ira Weiny Date: Wed Oct 28 09:36:32 2020 -0700 entry: Fixup irqentry_enter() comment irq_enter_from_user_mode() was changed to irqentry_enter_from_user_mode(). Update the comment within irqentry_enter() to reflect this change. Suggested-by: Thomas Gleixner Signed-off-by: Ira Weiny Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201028163632.965518-1-ira.weiny@intel.com commit c8d5ed67936fddbe2ae845fc80397718006322d7 Author: Jens Axboe Date: Mon Oct 26 14:32:29 2020 -0600 x86: Wire up TIF_NOTIFY_SIGNAL The generic entry code has support for TIF_NOTIFY_SIGNAL already. Just provide the TIF bit. [ tglx: Adopted to other TIF changes in x86 ] Signed-off-by: Jens Axboe Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201026203230.386348-4-axboe@kernel.dk commit 306e3e91edf1c6739a55312edd110d298ff498dd Author: Kan Liang Date: Mon Oct 19 09:45:29 2020 -0700 perf/x86/intel: Add event constraint for CYCLE_ACTIVITY.STALLS_MEM_ANY The event CYCLE_ACTIVITY.STALLS_MEM_ANY (0x14a3) should be available on all 8 GP counters on ICL, but it's only scheduled on the first four counters due to the current ICL constraint table. Add a line for the CYCLE_ACTIVITY.STALLS_MEM_ANY event in the ICL constraint table. Correct the comments for the CYCLE_ACTIVITY.CYCLES_MEM_ANY event. Fixes: 6017608936c1 ("perf/x86/intel: Add Icelake support") Reported-by: Andi Kleen Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20201019164529.32154-1-kan.liang@linux.intel.com commit 43bc103a8044b9f7963aa1684efbdc9bd60939de Author: Kan Liang Date: Mon Oct 19 08:35:28 2020 -0700 perf/x86/intel/uncore: Add Rocket Lake support For Rocket Lake, the MSR uncore, e.g., CBOX, ARB and CLOCKBOX, are the same as Tiger Lake. Share the perf code with it. For Rocket Lake and Tiger Lake, the 8th CBOX is not mapped into a different MSR space anymore. Add rkl_uncore_msr_init_box() to replace skl_uncore_msr_init_box(). The IMC uncore is the similar to Ice Lake. Add new PCIIDs of IMC for Rocket Lake. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201019153528.13850-4-kan.liang@linux.intel.com commit 907a196fbc70a48338ee8512da32f70fd33c97eb Author: Kan Liang Date: Mon Oct 19 08:35:27 2020 -0700 perf/x86/msr: Add Rocket Lake CPU support Like Ice Lake and Tiger Lake, PPERF and SMI_COUNT MSRs are also supported by Rocket Lake. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201019153528.13850-3-kan.liang@linux.intel.com commit cbea56395cba13173fffb9251cb23f146b51c792 Author: Kan Liang Date: Mon Oct 19 08:35:26 2020 -0700 perf/x86/cstate: Add Rocket Lake CPU support From the perspective of Intel cstate residency counters, Rocket Lake is the same as Ice Lake and Tiger Lake. Share the code with them. Update the comments for Rocket Lake. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201019153528.13850-2-kan.liang@linux.intel.com commit b14d0db5b8c86507c9810c1c8162c7d4a3c656bd Author: Kan Liang Date: Mon Oct 19 08:35:25 2020 -0700 perf/x86/intel: Add Rocket Lake CPU support From the perspective of Intel PMU, Rocket Lake is the same as Ice Lake and Tiger Lake. Share the perf code with them. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201019153528.13850-1-kan.liang@linux.intel.com commit 51b646b2d9f84d6ff6300e3c1d09f2be4329a424 Author: Peter Zijlstra Date: Fri Oct 9 11:09:27 2020 +0200 perf,mm: Handle non-page-table-aligned hugetlbfs A limited nunmber of architectures support hugetlbfs sizes that do not align with the page-tables (ARM64, Power, Sparc64). Add support for this to the generic perf_get_page_size() implementation, and also allow an architecture to override this implementation. This latter is only needed when it uses non-page-table aligned huge pages in its kernel map. Signed-off-by: Peter Zijlstra (Intel) commit 995f088efebe1eba0282a6ffa12411b37f8990c2 Author: Stephane Eranian Date: Thu Oct 1 06:57:49 2020 -0700 perf/core: Add support for PERF_SAMPLE_CODE_PAGE_SIZE When studying code layout, it is useful to capture the page size of the sampled code address. Add a new sample type for code page size. The new sample type requires collecting the ip. The code page size can be calculated from the NMI-safe perf_get_page_size(). For large PEBS, it's very unlikely that the mapping is gone for the earlier PEBS records. Enable the feature for the large PEBS. The worst case is that page-size '0' is returned. Signed-off-by: Kan Liang Signed-off-by: Stephane Eranian Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201001135749.2804-5-kan.liang@linux.intel.com commit 4cb6a42e4c4bc1902644eced67563e7405d4588e Author: Kan Liang Date: Thu Oct 1 06:57:48 2020 -0700 powerpc/perf: Support PERF_SAMPLE_DATA_PAGE_SIZE The new sample type, PERF_SAMPLE_DATA_PAGE_SIZE, requires the virtual address. Update the data->addr if the sample type is set. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201001135749.2804-4-kan.liang@linux.intel.com commit 76a5433f95f32d8a17c9f836be2084ed947c466b Author: Kan Liang Date: Thu Oct 1 06:57:47 2020 -0700 perf/x86/intel: Support PERF_SAMPLE_DATA_PAGE_SIZE The new sample type, PERF_SAMPLE_DATA_PAGE_SIZE, requires the virtual address. Update the data->addr if the sample type is set. The large PEBS is disabled with the sample type, because perf doesn't support munmap tracking yet. The PEBS buffer for large PEBS cannot be flushed for each munmap. Wrong page size may be calculated. The large PEBS can be enabled later separately when munmap tracking is supported. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201001135749.2804-3-kan.liang@linux.intel.com commit 8d97e71811aaafe4abf611dc24822fd6e73df1a1 Author: Kan Liang Date: Thu Oct 1 06:57:46 2020 -0700 perf/core: Add PERF_SAMPLE_DATA_PAGE_SIZE Current perf can report both virtual addresses and physical addresses, but not the MMU page size. Without the MMU page size information of the utilized page, users cannot decide whether to promote/demote large pages to optimize memory usage. Add a new sample type for the data MMU page size. Current perf already has a facility to collect data virtual addresses. A page walker is required to walk the pages tables and calculate the MMU page size from a given virtual address. On some platforms, e.g., X86, the page walker is invoked in an NMI handler. So the page walker must be NMI-safe and low overhead. Besides, the page walker should work for both user and kernel virtual address. The existing generic page walker, e.g., walk_page_range_novma(), is a little bit complex and doesn't guarantee the NMI-safe. The follow_page() is only for user-virtual address. Add a new function perf_get_page_size() to walk the page tables and calculate the MMU page size. In the function: - Interrupts have to be disabled to prevent any teardown of the page tables. - For user space threads, the current->mm is used for the page walker. For kernel threads and the like, the current->mm is NULL. The init_mm is used for the page walker. The active_mm is not used here, because it can be NULL. Quote from Peter Zijlstra, "context_switch() can set prev->active_mm to NULL when it transfers it to @next. It does this before @current is updated. So an NMI that comes in between this active_mm swizzling and updating @current will see !active_mm." - The MMU page size is calculated from the page table level. The method should work for all architectures, but it has only been verified on X86. Should there be some architectures, which support perf, where the method doesn't work, it can be fixed later separately. Reporting the wrong page size would not be fatal for the architecture. Some under discussion features may impact the method in the future. Quote from Dave Hansen, "There are lots of weird things folks are trying to do with the page tables, like Address Space Isolation. For instance, if you get a perf NMI when running userspace, current->mm->pgd is *different* than the PGD that was in use when userspace was running. It's close enough today, but it might not stay that way." If the case happens later, lots of consecutive page walk errors will happen. The worst case is that lots of page-size '0' are returned, which would not be fatal. In the perf tool, a check is implemented to detect this case. Once it happens, a kernel patch could be implemented accordingly then. Suggested-by: Peter Zijlstra Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201001135749.2804-2-kan.liang@linux.intel.com commit d8fcb81f1acf651a0e50eacecca43d0524984f87 Author: Julia Lawall Date: Thu Oct 22 15:15:50 2020 +0200 sched/fair: Check for idle core in wake_affine In the case of a thread wakeup, wake_affine determines whether a core will be chosen for the thread on the socket where the thread ran previously or on the socket of the waker. This is done primarily by comparing the load of the core where th thread ran previously (prev) and the load of the waker (this). commit 11f10e5420f6 ("sched/fair: Use load instead of runnable load in wakeup path") changed the load computation from the runnable load to the load average, where the latter includes the load of threads that have already blocked on the core. When a short-running daemon processes happens to run on prev, this change raised the situation that prev could appear to have a greater load than this, even when prev is actually idle. When prev and this are on the same socket, the idle prev is detected later, in select_idle_sibling. But if that does not hold, prev is completely ignored, causing the waking thread to move to the socket of the waker. In the case of N mostly active threads on N cores, this triggers other migrations and hurts performance. In contrast, before commit 11f10e5420f6, the load on an idle core was 0, and in the case of a non-idle waker core, the effect of wake_affine was to select prev as the target for searching for a core for the waking thread. To avoid unnecessary migrations, extend wake_affine_idle to check whether the core where the thread previously ran is currently idle, and if so simply return that core as the target. [1] commit 11f10e5420f6ce ("sched/fair: Use load instead of runnable load in wakeup path") This particularly has an impact when using the ondemand power manager, where kworkers run every 0.004 seconds on all cores, increasing the likelihood that an idle core will be considered to have a load. The following numbers were obtained with the benchmarking tool hyperfine (https://github.com/sharkdp/hyperfine) on the NAS parallel benchmarks (https://www.nas.nasa.gov/publications/npb.html). The tests were run on an 80-core Intel(R) Xeon(R) CPU E7-8870 v4 @ 2.10GHz. Active (intel_pstate) and passive (intel_cpufreq) power management were used. Times are in seconds. All experiments use all 160 hardware threads. v5.9/intel-pstate v5.9+patch/intel-pstate bt.C.c 24.725724+-0.962340 23.349608+-1.607214 lu.C.x 29.105952+-4.804203 25.249052+-5.561617 sp.C.x 31.220696+-1.831335 30.227760+-2.429792 ua.C.x 26.606118+-1.767384 25.778367+-1.263850 v5.9/ondemand v5.9+patch/ondemand bt.C.c 25.330360+-1.028316 23.544036+-1.020189 lu.C.x 35.872659+-4.872090 23.719295+-3.883848 sp.C.x 32.141310+-2.289541 29.125363+-0.872300 ua.C.x 29.024597+-1.667049 25.728888+-1.539772 On the smaller data sets (A and B) and on the other NAS benchmarks there is no impact on performance. This also has a major impact on the splash2x.volrend benchmark of the parsec benchmark suite that goes from 1m25 without this patch to 0m45, in active (intel_pstate) mode. Fixes: 11f10e5420f6 ("sched/fair: Use load instead of runnable load in wakeup path") Signed-off-by: Julia Lawall Signed-off-by: Peter Zijlstra (Intel) Reviewed-by Vincent Guittot Acked-by: Mel Gorman Link: https://lkml.kernel.org/r/1603372550-14680-1-git-send-email-Julia.Lawall@inria.fr commit 43c31ac0e665d942fcaba83a725a8b1aeeb7adf0 Author: Peter Zijlstra Date: Wed Oct 21 15:45:33 2020 +0200 sched: Remove relyance on STRUCT_ALIGNMENT Florian reported that all of kernel/sched/ is rebuild when CONFIG_BLK_DEV_INITRD is changed, which, while not a bug is unexpected. This is due to us including vmlinux.lds.h. Jakub explained that the problem is that we put the alignment requirement on the type instead of on a variable. Type alignment is a minimum, the compiler is free to pick any larger alignment for a specific instance of the type (eg. the variable). So force the type alignment on all individual variable definitions and remove the undesired dependency on vmlinux.lds.h. Fixes: 85c2ce9104eb ("sched, vmlinux.lds: Increase STRUCT_ALIGNMENT to 64 bytes for GCC-4.9") Reported-by: Florian Fainelli Suggested-by: Jakub Jelinek Signed-off-by: Peter Zijlstra (Intel) commit 345a957fcc95630bf5535d7668a59ed983eb49a7 Author: Thomas Gleixner Date: Tue Oct 20 16:46:55 2020 +0200 sched: Reenable interrupts in do_sched_yield() do_sched_yield() invokes schedule() with interrupts disabled which is not allowed. This goes back to the pre git era to commit a6efb709806c ("[PATCH] irqlock patch 2.5.27-H6") in the history tree. Reenable interrupts and remove the misleading comment which "explains" it. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/87r1pt7y5c.fsf@nanos.tec.linutronix.de commit 25595eb6aaa9fbb31330f1e0b400642694bc6574 Author: Mathieu Desnoyers Date: Tue Oct 20 09:47:15 2020 -0400 sched: membarrier: document memory ordering scenarios Document membarrier ordering scenarios in membarrier.c. Thanks to Alan Stern for refreshing my memory. Now that I have those in mind, it seems appropriate to serialize them to comments for posterity. Signed-off-by: Mathieu Desnoyers Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201020134715.13909-4-mathieu.desnoyers@efficios.com commit 618758ed3a4f7d790414d020b362111748ebbf9f Author: Mathieu Desnoyers Date: Tue Oct 20 09:47:14 2020 -0400 sched: membarrier: cover kthread_use_mm (v4) Add comments and memory barrier to kthread_use_mm and kthread_unuse_mm to allow the effect of membarrier(2) to apply to kthreads accessing user-space memory as well. Given that no prior kthread use this guarantee and that it only affects kthreads, adding this guarantee does not affect user-space ABI. Refine the check in membarrier_global_expedited to exclude runqueues running the idle thread rather than all kthreads from the IPI cpumask. Now that membarrier_global_expedited can IPI kthreads, the scheduler also needs to update the runqueue's membarrier_state when entering lazy TLB state. Signed-off-by: Mathieu Desnoyers Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201020134715.13909-3-mathieu.desnoyers@efficios.com commit 5bc78502322a5e4eef3f1b2a2813751dc6434143 Author: Mathieu Desnoyers Date: Tue Oct 20 09:47:13 2020 -0400 sched: fix exit_mm vs membarrier (v4) exit_mm should issue memory barriers after user-space memory accesses, before clearing current->mm, to order user-space memory accesses performed prior to exit_mm before clearing tsk->mm, which has the effect of skipping the membarrier private expedited IPIs. exit_mm should also update the runqueue's membarrier_state so membarrier global expedited IPIs are not sent when they are not needed. The membarrier system call can be issued concurrently with do_exit if we have thread groups created with CLONE_VM but not CLONE_THREAD. Here is the scenario I have in mind: Two thread groups are created, A and B. Thread group B is created by issuing clone from group A with flag CLONE_VM set, but not CLONE_THREAD. Let's assume we have a single thread within each thread group (Thread A and Thread B). The AFAIU we can have: Userspace variables: int x = 0, y = 0; CPU 0 CPU 1 Thread A Thread B (in thread group A) (in thread group B) x = 1 barrier() y = 1 exit() exit_mm() current->mm = NULL; r1 = load y membarrier() skips CPU 0 (no IPI) because its current mm is NULL r2 = load x BUG_ON(r1 == 1 && r2 == 0) Signed-off-by: Mathieu Desnoyers Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201020134715.13909-2-mathieu.desnoyers@efficios.com commit 45da7a2b0af8fa29dff2e6ba8926322068350fce Author: Peter Zijlstra Date: Tue Aug 18 10:48:17 2020 +0200 sched/fair: Exclude the current CPU from find_new_ilb() It is possible for find_new_ilb() to select the current CPU, however, this only happens from newidle balancing, in which case need_resched() will be true, and consequently nohz_csd_func() will not trigger the softirq. Exclude the current CPU from becoming an ILB target. Signed-off-by: Peter Zijlstra (Intel) commit b13772f8135633f273f0cf742143b19cffbf9e1d Author: Peter Zijlstra Date: Wed Oct 14 21:39:04 2020 +0200 sched/cpupri: Add CPUPRI_HIGHER Add CPUPRI_HIGHER above the RT99 priority to denote the CPU is in use by higher priority tasks (specifically deadline). XXX: we should probably drive PUSH-PULL from cpupri, that would automagically result in an RT-PUSH when DL sets cpupri to CPUPRI_HIGHER. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Dietmar Eggemann commit 934fc3314b39e16a89fc4d5d0d5cbfe71dcbe7b1 Author: Peter Zijlstra Date: Wed Oct 14 21:06:49 2020 +0200 sched/cpupri: Remap CPUPRI_NORMAL to MAX_RT_PRIO-1 This makes the mapping continuous and frees up 100 for other usage. Prev mapping: p->rt_priority p->prio newpri cpupri -1 -1 (CPUPRI_INVALID) 100 0 (CPUPRI_NORMAL) 1 98 98 1 ... 49 50 50 49 50 49 49 50 ... 99 0 0 99 New mapping: p->rt_priority p->prio newpri cpupri -1 -1 (CPUPRI_INVALID) 99 0 (CPUPRI_NORMAL) 1 98 98 1 ... 49 50 50 49 50 49 49 50 ... 99 0 0 99 Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Dietmar Eggemann commit 1b08782ce31f612d98e11ccccf3e3df9a147a67d Author: Dietmar Eggemann Date: Tue Sep 22 10:39:34 2020 +0200 sched/cpupri: Remove pri_to_cpu[1] pri_to_cpu[1] isn't used since cpupri_set(..., newpri) is never called with newpri = 99. The valid RT priorities RT1..RT99 (p->rt_priority = [1..99]) map into cpupri (idx of pri_to_cpu[]) = [2..100] Current mapping: p->rt_priority p->prio newpri cpupri -1 -1 (CPUPRI_INVALID) 100 0 (CPUPRI_NORMAL) 1 98 98 2 ... 49 50 50 50 50 49 49 51 ... 99 0 0 100 So cpupri = 1 isn't used. Reduce the size of pri_to_cpu[] by 1 and adapt the cpupri implementation accordingly. This will save a useless for loop with an atomic_read in cpupri_find_fitness() calling __cpupri_find(). New mapping: p->rt_priority p->prio newpri cpupri -1 -1 (CPUPRI_INVALID) 100 0 (CPUPRI_NORMAL) 1 98 98 1 ... 49 50 50 49 50 49 49 50 ... 99 0 0 99 Signed-off-by: Dietmar Eggemann Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200922083934.19275-3-dietmar.eggemann@arm.com commit 5e054bca44fe92323de5e9b71478d1904b8bb1b7 Author: Dietmar Eggemann Date: Tue Sep 22 10:39:33 2020 +0200 sched/cpupri: Remove pri_to_cpu[CPUPRI_IDLE] pri_to_cpu[CPUPRI_IDLE=0] isn't used since cpupri_set(..., newpri) is never called with newpri = MAX_PRIO (140). Current mapping: p->rt_priority p->prio newpri cpupri -1 -1 (CPUPRI_INVALID) 140 0 (CPUPRI_IDLE) 100 1 (CPUPRI_NORMAL) 1 98 98 3 ... 49 50 50 51 50 49 49 52 ... 99 0 0 101 Even when cpupri was introduced with commit 6e0534f27819 ("sched: use a 2-d bitmap for searching lowest-pri CPU") in v2.6.27, only (1) CPUPRI_INVALID (-1), (2) MAX_RT_PRIO (100), (3) an RT prio (RT1..RT99) were used as newprio in cpupri_set(..., newpri) -> convert_prio(newpri). MAX_RT_PRIO is used only in dec_rt_tasks() -> dec_rt_prio() -> dec_rt_prio_smp() -> cpupri_set() in case of !rt_rq->rt_nr_running. I.e. it stands for a non-rt task, including the IDLE task. Commit 57785df5ac53 ("sched: Fix task priority bug") removed code in v2.6.33 which did set the priority of the IDLE task to MAX_PRIO. Although this happened after the introduction of cpupri, it didn't have an effect on the values used for cpupri_set(..., newpri). Remove CPUPRI_IDLE and adapt the cpupri implementation accordingly. This will save a useless for loop with an atomic_read in cpupri_find_fitness() calling __cpupri_find(). New mapping: p->rt_priority p->prio newpri cpupri -1 -1 (CPUPRI_INVALID) 100 0 (CPUPRI_NORMAL) 1 98 98 2 ... 49 50 50 50 50 49 49 51 ... 99 0 0 100 Signed-off-by: Dietmar Eggemann Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200922083934.19275-2-dietmar.eggemann@arm.com commit a57415f5d1e43c3a5c5d412cd85e2792d7ed9b11 Author: Peng Liu Date: Thu Oct 8 23:49:42 2020 +0800 sched/deadline: Fix sched_dl_global_validate() When change sched_rt_{runtime, period}_us, we validate that the new settings should at least accommodate the currently allocated -dl bandwidth: sched_rt_handler() --> sched_dl_bandwidth_validate() { new_bw = global_rt_runtime()/global_rt_period(); for_each_possible_cpu(cpu) { dl_b = dl_bw_of(cpu); if (new_bw < dl_b->total_bw) <------- ret = -EBUSY; } } But under CONFIG_SMP, dl_bw is per root domain , but not per CPU, dl_b->total_bw is the allocated bandwidth of the whole root domain. Instead, we should compare dl_b->total_bw against "cpus*new_bw", where 'cpus' is the number of CPUs of the root domain. Also, below annotation(in kernel/sched/sched.h) implied implementation only appeared in SCHED_DEADLINE v2[1], then deadline scheduler kept evolving till got merged(v9), but the annotation remains unchanged, meaningless and misleading, update it. * With respect to SMP, the bandwidth is given on a per-CPU basis, * meaning that: * - dl_bw (< 100%) is the bandwidth of the system (group) on each CPU; * - dl_total_bw array contains, in the i-eth element, the currently * allocated bandwidth on the i-eth CPU. [1]: https://lore.kernel.org/lkml/1267385230.13676.101.camel@Palantir/ Fixes: 332ac17ef5bf ("sched/deadline: Add bandwidth management for SCHED_DEADLINE tasks") Signed-off-by: Peng Liu Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Daniel Bristot de Oliveira Acked-by: Juri Lelli Link: https://lkml.kernel.org/r/db6bbda316048cda7a1bbc9571defde193a8d67e.1602171061.git.iwtbavbm@gmail.com commit 26762423a2664692de2bcccc9de684a5ac105e23 Author: Peng Liu Date: Thu Oct 8 23:48:46 2020 +0800 sched/deadline: Optimize sched_dl_global_validate() Under CONFIG_SMP, dl_bw is per root domain, but not per CPU. When checking or updating dl_bw, currently iterating every CPU is overdoing, just need iterate each root domain once. Suggested-by: Peter Zijlstra Signed-off-by: Peng Liu Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Daniel Bristot de Oliveira Acked-by: Juri Lelli Link: https://lkml.kernel.org/r/78d21ee792cc48ff79e8cd62a5f26208463684d6.1602171061.git.iwtbavbm@gmail.com commit b9c88f752268383beff0d56e50d52b8ae62a02f8 Author: jun qian Date: Thu Oct 15 14:48:46 2020 +0800 sched/fair: Improve the accuracy of sched_stat_wait statistics When the sched_schedstat changes from 0 to 1, some sched se maybe already in the runqueue, the se->statistics.wait_start will be 0. So it will let the (rq_of(cfs_rq)) - se->statistics.wait_start) wrong. We need to avoid this scenario. Signed-off-by: jun qian Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Yafang Shao Link: https://lkml.kernel.org/r/20201015064846.19809-1-qianjun.kernel@gmail.com commit 43ddebdd096638ef8cd2ec41d6acca3400069171 Author: Vincent Whitchurch Date: Thu Oct 29 09:17:20 2020 +0100 gpio: mockup: Allow probing from device tree Allow the mockup driver to be probed via the device tree without any module parameters, allowing it to be used to configure and test higher level drivers like the leds-gpio driver and corresponding userspace before actual hardware is available. Signed-off-by: Vincent Whitchurch Signed-off-by: Bartosz Golaszewski commit 114518eb6430b832d2f9f5a008043b913ccf0e24 Author: Jens Axboe Date: Mon Oct 26 14:32:30 2020 -0600 task_work: Use TIF_NOTIFY_SIGNAL if available If the arch supports TIF_NOTIFY_SIGNAL, then use that for TWA_SIGNAL as it's more efficient than using the signal delivery method. This is especially true on threaded applications, where ->sighand is shared across threads, but it's also lighter weight on non-shared cases. io_uring is a heavy consumer of TWA_SIGNAL based task_work. A test with threads shows a nice improvement running an io_uring based echo server. stock kernel: 0.01% <= 0.1 milliseconds 95.86% <= 0.2 milliseconds 98.27% <= 0.3 milliseconds 99.71% <= 0.4 milliseconds 100.00% <= 0.5 milliseconds 100.00% <= 0.6 milliseconds 100.00% <= 0.7 milliseconds 100.00% <= 0.8 milliseconds 100.00% <= 0.9 milliseconds 100.00% <= 1.0 milliseconds 100.00% <= 1.1 milliseconds 100.00% <= 2 milliseconds 100.00% <= 3 milliseconds 100.00% <= 3 milliseconds 1378930.00 requests per second ~1600% CPU 1.38M requests/second, and all 16 CPUs are maxed out. patched kernel: 0.01% <= 0.1 milliseconds 98.24% <= 0.2 milliseconds 99.47% <= 0.3 milliseconds 99.99% <= 0.4 milliseconds 100.00% <= 0.5 milliseconds 100.00% <= 0.6 milliseconds 100.00% <= 0.7 milliseconds 100.00% <= 0.8 milliseconds 100.00% <= 0.9 milliseconds 100.00% <= 1.2 milliseconds 1666111.38 requests per second ~1450% CPU 1.67M requests/second, and we're no longer just hammering on the sighand lock. The original reporter states: "For 5.7.15 my benchmark achieves 1.6M qps and system cpu is at ~80%. for 5.7.16 or later it achieves only 1M qps and the system cpu is is at ~100%" with the only difference there being that TWA_SIGNAL is used unconditionally in 5.7.16, since it's required to be able to handle the inability to run task_work if the application is waiting in the kernel already on an event that needs task_work run to be satisfied. Also see commit 0ba9c9edcd15. Reported-by: Roman Gershman Signed-off-by: Jens Axboe Signed-off-by: Thomas Gleixner Reviewed-by: Oleg Nesterov Link: https://lore.kernel.org/r/20201026203230.386348-5-axboe@kernel.dk commit 12db8b690010ccfadf9d0b49a1e1798e47dbbe1a Author: Jens Axboe Date: Mon Oct 26 14:32:28 2020 -0600 entry: Add support for TIF_NOTIFY_SIGNAL Add TIF_NOTIFY_SIGNAL handling in the generic entry code, which if set, will return true if signal_pending() is used in a wait loop. That causes an exit of the loop so that notify_signal tracehooks can be run. If the wait loop is currently inside a system call, the system call is restarted once task_work has been processed. In preparation for only having arch_do_signal() handle syscall restarts if _TIF_SIGPENDING isn't set, rename it to arch_do_signal_or_restart(). Pass in a boolean that tells the architecture specific signal handler if it should attempt to get a signal, or just process a potential syscall restart. For !CONFIG_GENERIC_ENTRY archs, add the TIF_NOTIFY_SIGNAL handling to get_signal(). This is done to minimize the needed architecture changes to support this feature. Signed-off-by: Jens Axboe Signed-off-by: Thomas Gleixner Reviewed-by: Oleg Nesterov Link: https://lore.kernel.org/r/20201026203230.386348-3-axboe@kernel.dk commit 5c251e9dc0e127bac6fc5b8e6696363d2e35f515 Author: Jens Axboe Date: Mon Oct 26 14:32:27 2020 -0600 signal: Add task_sigpending() helper This is in preparation for maintaining signal_pending() as the decider of whether or not a schedule() loop should be broken, or continue sleeping. This is different than the core signal use cases, which really need to know whether an actual signal is pending or not. task_sigpending() returns non-zero if TIF_SIGPENDING is set. Only core kernel use cases should care about the distinction between the two, make sure those use the task_sigpending() helper. Signed-off-by: Jens Axboe Signed-off-by: Thomas Gleixner Reviewed-by: Thomas Gleixner Reviewed-by: Oleg Nesterov Link: https://lore.kernel.org/r/20201026203230.386348-2-axboe@kernel.dk commit 3f7566f4947834db9b36aeb8b308e91448ba74fc Author: Harshal Chaudhari Date: Mon Oct 26 21:28:01 2020 +0530 misc: xilinx_sdfec: add compat_ptr_ioctl() Driver has a trivial helper function to convert the pointer argument and then call the native ioctl handler. But now we have a generic implementation for that, so we can use it. Signed-off-by: Harshal Chaudhari Link: https://lore.kernel.org/r/20201026155801.16053-1-harshalchau04@gmail.com Signed-off-by: Greg Kroah-Hartman commit b36773c3912e770e92ba57fa0957c1cf4db6e8a7 Author: Sudip Mukherjee Date: Mon Oct 26 18:00:26 2020 +0000 misc: hisi_hikey_usb: use PTR_ERR_OR_ZERO Coccinelle suggested using PTR_ERR_OR_ZERO() and looking at the code, we can use PTR_ERR_OR_ZERO() instead of checking IS_ERR() and then doing 'return 0'. Tested-by: Lukas Bulwahn Signed-off-by: Sudip Mukherjee Link: https://lore.kernel.org/r/20201026180026.3350-1-sudipm.mukherjee@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5144eead3f8c80ac7f913c07139442fede94003e Author: Peter Ujfalusi Date: Fri Oct 23 12:46:02 2020 +0300 drm: xlnx: Use dma_request_chan for DMA channel request There is no need to use the of_dma_request_slave_channel() directly as dma_request_chan() is going to try to get the channel via OF as well. Signed-off-by: Peter Ujfalusi Signed-off-by: Hyun Kwon Link: https://patchwork.freedesktop.org/patch/msgid/20201023094602.5630-1-peter.ujfalusi@ti.com commit 6edcf9dc2e1aff3aa1f5a69ee420fb30dd0e968a Author: Geert Uytterhoeven Date: Wed Oct 28 16:34:02 2020 +0100 efi/libstub: EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER should not default to yes EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER is deprecated, so it should not be enabled by default. In light of commit 4da0b2b7e67524cc ("efi/libstub: Re-enable command line initrd loading for x86"), keep the default for X86. Fixes: cf6b83664895a5c7 ("efi/libstub: Make initrd file loader configurable") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201028153402.1736103-1-geert+renesas@glider.be Signed-off-by: Ard Biesheuvel commit 9484f2cb83327c4197c0809cdf3156d4213c44e5 Author: Krzysztof Kozlowski Date: Thu Oct 1 18:56:46 2020 +0200 clk: samsung: exynos-clkout: convert to module driver The Exynos clkout driver depends on board input clock (typically XXTI or XUSBXTI), however on Exynos4 boards these clocks were modeled as part of SoC clocks (Exynos4 clocks driver). Obviously this is not proper, but correcting it would break DT backward compatibility. Both drivers - clkout and Exynos4 clocks - register the clock providers with CLK_OF_DECLARE/OF_DECLARE_1 so their order is fragile (in the Makefile clkout is behind Exynos4 clock). It will work only if the Exynos4 clock driver comes up before clkout. A change in DTS adding input clock reference to Exynos4 clocks input PLL, see reverted commit eaf2d2f6895d ("ARM: dts: exynos: add input clock to CMU in Exynos4412 Odroid"), caused probe reorder: the clkout appeared before Exynos4 clock provider. Since clkout depends on Exynos4 clocks and does not support deferred probe, this did not work and caused later failure of usb3503 USB hub probe which needs clkout: [ 5.007442] usb3503 0-0008: unable to request refclk (-517) The Exynos clkout driver is not a critical/core clock so there is actually no problem in instantiating it later, as a regular module. This removes specific probe ordering and adds support for probe deferral. Signed-off-by: Krzysztof Kozlowski Tested-by: Sylwester Nawrocki Reviewed-by: Sylwester Nawrocki Link: https://lore.kernel.org/r/20201001165646.32279-3-krzk@kernel.org commit 93618e344a5ee995249ab6af813092d08313ea83 Author: Krzysztof Kozlowski Date: Thu Oct 1 18:56:45 2020 +0200 soc: samsung: exynos-pmu: instantiate clkout driver as MFD The Exynos clock output (clkout) driver uses same register address space (Power Management Unit address space) as Exynos PMU driver and same set of compatibles. It was modeled as clock provider instantiated with CLK_OF_DECLARE_DRIVER(). This however brings ordering problems and lack of probe deferral, therefore clkout driver should be converted to a regular module and instantiated as a child of PMU driver to be able to use existing compatibles and address space. Signed-off-by: Krzysztof Kozlowski Tested-by: Sylwester Nawrocki Reviewed-by: Sylwester Nawrocki Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20201001165646.32279-2-krzk@kernel.org commit cf83b2d2e2b64920bd6999b199dfa271d7e94cf8 Author: Yonghong Song Date: Tue Oct 27 23:10:54 2020 -0700 bpf: Permit cond_resched for some iterators Commit e679654a704e ("bpf: Fix a rcu_sched stall issue with bpf task/task_file iterator") tries to fix rcu stalls warning which is caused by bpf task_file iterator when running "bpftool prog". rcu: INFO: rcu_sched self-detected stall on CPU rcu: \x097-....: (20999 ticks this GP) idle=302/1/0x4000000000000000 softirq=1508852/1508852 fqs=4913 \x09(t=21031 jiffies g=2534773 q=179750) NMI backtrace for cpu 7 CPU: 7 PID: 184195 Comm: bpftool Kdump: loaded Tainted: G W 5.8.0-00004-g68bfc7f8c1b4 #6 Hardware name: Quanta Twin Lakes MP/Twin Lakes Passive MP, BIOS F09_3A17 05/03/2019 Call Trace: dump_stack+0x57/0x70 nmi_cpu_backtrace.cold+0x14/0x53 ? lapic_can_unplug_cpu.cold+0x39/0x39 nmi_trigger_cpumask_backtrace+0xb7/0xc7 rcu_dump_cpu_stacks+0xa2/0xd0 rcu_sched_clock_irq.cold+0x1ff/0x3d9 ? tick_nohz_handler+0x100/0x100 update_process_times+0x5b/0x90 tick_sched_timer+0x5e/0xf0 __hrtimer_run_queues+0x12a/0x2a0 hrtimer_interrupt+0x10e/0x280 __sysvec_apic_timer_interrupt+0x51/0xe0 asm_call_on_stack+0xf/0x20 sysvec_apic_timer_interrupt+0x6f/0x80 ... task_file_seq_next+0x52/0xa0 bpf_seq_read+0xb9/0x320 vfs_read+0x9d/0x180 ksys_read+0x5f/0xe0 do_syscall_64+0x38/0x60 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The fix is to limit the number of bpf program runs to be one million. This fixed the program in most cases. But we also found under heavy load, which can increase the wallclock time for bpf_seq_read(), the warning may still be possible. For example, calling bpf_delay() in the "while" loop of bpf_seq_read(), which will introduce artificial delay, the warning will show up in my qemu run. static unsigned q; volatile unsigned *p = &q; volatile unsigned long long ll; static void bpf_delay(void) { int i, j; for (i = 0; i < 10000; i++) for (j = 0; j < 10000; j++) ll += *p; } There are two ways to fix this issue. One is to reduce the above one million threshold to say 100,000 and hopefully rcu warning will not show up any more. Another is to introduce a target feature which enables bpf_seq_read() calling cond_resched(). This patch took second approach as the first approach may cause more -EAGAIN failures for read() syscalls. Note that not all bpf_iter targets can permit cond_resched() in bpf_seq_read() as some, e.g., netlink seq iterator, rcu read lock critical section spans through seq_ops->next() -> seq_ops->show() -> seq_ops->next(). For the kernel code with the above hack, "bpftool p" roughly takes 38 seconds to finish on my VM with 184 bpf program runs. Using the following command, I am able to collect the number of context switches: perf stat -e context-switches -- ./bpftool p >& log Without this patch, 69 context-switches With this patch, 75 context-switches This patch added additional 6 context switches, roughly every 6 seconds to reschedule, to avoid lengthy no-rescheduling which may cause the above RCU warnings. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201028061054.1411116-1-yhs@fb.com commit 29a7bb71a833e092d0012597a00a15ca84837f0b Author: Krzysztof Kozlowski Date: Tue Oct 27 18:09:47 2020 +0100 arm64: dts: exynos: remove redundant status=okay in Exynos5433 TM2 New nodes are enabled by default, so status=okay is not needed for them. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201027170947.132725-13-krzk@kernel.org commit 6c215edbdc7129e258a1158fa3284aaa734a38cb Author: Krzysztof Kozlowski Date: Tue Oct 27 18:09:46 2020 +0100 arm64: dts: exynos: adjust node names to DT spec in Exynos7 Espresso The Devicetree specification expects device node names to have a generic name, representing the class of a device. Also the convention for node names is to use hyphens, not underscores. No functional changes. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201027170947.132725-12-krzk@kernel.org commit a01f7a96a9b0069d1cf9dd1c59d279e497cecdea Author: Krzysztof Kozlowski Date: Tue Oct 27 18:09:45 2020 +0100 arm64: dts: exynos: adjust node names to DT spec in Exynos5433 TM2 The Devicetree specification expects device node names to have a generic name, representing the class of a device. Also the convention for node names is to use hyphens, not underscores. No functional changes. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201027170947.132725-11-krzk@kernel.org commit b04544ac0d1f2a51e0f3234045343aa741d64e7b Author: Krzysztof Kozlowski Date: Tue Oct 27 18:09:44 2020 +0100 ARM: dts: s5pv210: adjust node names to DT spec The Devicetree specification expects device node names to have a generic name, representing the class of a device. Also the convention for node names is to use hyphens, not underscores. No functional changes. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201027170947.132725-10-krzk@kernel.org commit 77c91853a65f689cf4198644452fed151a83e8fd Author: Krzysztof Kozlowski Date: Tue Oct 27 18:09:43 2020 +0100 ARM: dts: exynos: adjust node names to DT spec in Exynos542x boards The Devicetree specification expects device node names to have a generic name, representing the class of a device. Also the convention for node names is to use hyphens, not underscores. No functional changes. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201027170947.132725-9-krzk@kernel.org commit e5fbceb07e3e8e81226b22326756649b127aa78c Author: Krzysztof Kozlowski Date: Tue Oct 27 18:09:42 2020 +0100 ARM: dts: exynos: adjust node names to DT spec in Odroid XU The Devicetree specification expects device node names to have a generic name, representing the class of a device. Also the convention for node names is to use hyphens, not underscores. No functional changes. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201027170947.132725-8-krzk@kernel.org commit 5a1323023fb16c0b04efb24a4c85e5f2663172d8 Author: Krzysztof Kozlowski Date: Tue Oct 27 18:09:41 2020 +0100 ARM: dts: exynos: adjust node names to DT spec in Exynos5250 boards The Devicetree specification expects device node names to have a generic name, representing the class of a device. Also the convention for node names is to use hyphens, not underscores. No functional changes. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201027170947.132725-7-krzk@kernel.org commit 2d29d03003017a7a556519d2fbcbbffcee0be319 Author: Krzysztof Kozlowski Date: Tue Oct 27 18:09:40 2020 +0100 ARM: dts: exynos: remove redundant status=okay in Exynos4412 boards New nodes are enabled by default, so status=okay is not needed for them. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201027170947.132725-6-krzk@kernel.org commit 108463f568135255e1bd4847f66d41a2c1665920 Author: Krzysztof Kozlowski Date: Tue Oct 27 18:09:39 2020 +0100 ARM: dts: exynos: adjust node names to DT spec in Exynos4412 boards The Devicetree specification expects device node names to have a generic name, representing the class of a device. Also the convention for node names is to use hyphens, not underscores. No functional changes. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201027170947.132725-5-krzk@kernel.org commit 43552e6d5a6109df05ea038f512a20b45ca5010c Author: Krzysztof Kozlowski Date: Tue Oct 27 18:09:38 2020 +0100 ARM: dts: exynos: override GPIO keys node by label in Exynos4412 Odroid family Using full paths to extend or override a device tree node is error prone. If there was a typo error, a new node will be created instead of extending the existing node. This will lead to run-time errors that could be hard to detect. A mistyped label on the other hand, will cause a dtc compile error (during build time). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201027170947.132725-4-krzk@kernel.org commit d918633c8acbd42afb694a6d859f449f4bf9d3bf Author: Krzysztof Kozlowski Date: Tue Oct 27 18:09:37 2020 +0100 ARM: dts: exynos: adjust node names to DT spec in Exynos4210 boards The Devicetree specification expects device node names to have a generic name, representing the class of a device. Also the convention for node names is to use hyphens, not underscores. No functional changes. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201027170947.132725-3-krzk@kernel.org commit 157a5697f6f24aacf8017acd387e3fdc1f4c1950 Author: Krzysztof Kozlowski Date: Tue Oct 27 18:09:36 2020 +0100 ARM: dts: exynos: adjust node names to DT spec in Exynos3250 boards The Devicetree specification expects device node names to have a generic name, representing the class of a device. Also the convention for node names is to use hyphens, not underscores. No functional changes. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201027170947.132725-2-krzk@kernel.org commit ce2424d76f23be93ff745e3101630ce63224bb86 Author: Mauro Carvalho Chehab Date: Fri Oct 23 18:33:16 2020 +0200 spi: fix a typo inside a kernel-doc markup spi_split_tranfers_maxsize -> spi_split_transfers_maxsize Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/a103f4f48735caa1a09fad94c5d76e73e2ce37b8.1603469755.git.mchehab+huawei@kernel.org Signed-off-by: Mark Brown commit bcc96dc3cf8048c80af7c487af17e19be27ac57d Author: Colin Ian King Date: Wed Oct 28 11:51:12 2020 +0000 ASoC: qcom: fix unsigned int bitwidth compared to less than zero The check for an error return from the call to snd_pcm_format_width is never true as the unsigned int bitwidth can never be less than zero. Fix this by making bitwidth an int. Fixes: 7cb37b7bd0d3 ("ASoC: qcom: Add support for lpass hdmi driver") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20201028115112.109017-1-colin.king@canonical.com Signed-off-by: Mark Brown commit c9dc33d13c813e20c6dcfd5a9f54122225ca46bb Author: Bartosz Golaszewski Date: Mon Oct 26 11:46:18 2020 +0100 ARM: dts: at91: at91-sama5d27_som1: fix EEPROM compatible AT24 compatibles require a vendor prefix. Use the default "atmel". Signed-off-by: Bartosz Golaszewski Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201026104618.23415-1-brgl@bgdev.pl commit fb533fc76d341ab73fc7e3cec0ab012bd2881ca7 Author: Eugen Hristev Date: Fri Oct 16 10:51:09 2020 +0300 ARM: configs: at91: sama5: resync with media changes The media tree Kconfig has changed recently, and a lot of modules were built unintentionally, like the dvb frontends and encoders. Resync the defconfig to build the sama5 drivers and tested sensors. Signed-off-by: Eugen Hristev Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201016075109.287506-1-eugen.hristev@microchip.com commit 786c395dbe4216c2349914952b8cdb57ea8a326a Author: Kai Stuhlemmer Date: Thu Oct 8 14:50:28 2020 +0200 ARM: at91: sam9x60 SiP types added to soc description Adding SAM9X60 SIP variants to the soc description list. Signed-off-by: Kai Stuhlemmer Signed-off-by: Nicolas Ferre Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201008125028.21071-1-nicolas.ferre@microchip.com commit 970f6cf2e91465c53dbbf9d80d755a7e8139fedb Author: Marek Szyprowski Date: Tue Oct 27 21:17:16 2020 +0100 ARM: exynos: Simplify code in Exynos3250 CPU core restart path exynos_core_restart() is called by secondary CPU boot procedure, used by CPU hotplug and coupled CPU idle. Replace of_machine_is_compatible() call with a simple SoC revision check. of_machine_is_compatible() function performs a dozen of string comparisons during the full device tree walk, while soc_is_exynos3250() is a simple integer check on SoC revision variable. This change also fixes the following warning: ============================= WARNING: suspicious RCU usage 5.10.0-rc1-00001-g6f65599d1f4f-dirty #1800 Not tainted ----------------------------- ./include/trace/events/lock.h:37 suspicious rcu_dereference_check() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 RCU used illegally from extended quiescent state! no locks held by swapper/0/0. stack backtrace: CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.10.0-rc1-00001-g6f65599d1f4f-dirty #1800 Hardware name: Samsung Exynos (Flattened Device Tree) [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (dump_stack+0xb4/0xd4) [] (dump_stack) from [] (lock_acquire+0x418/0x584) [] (lock_acquire) from [] (_raw_spin_lock_irqsave+0x4c/0x60) [] (_raw_spin_lock_irqsave) from [] (of_device_is_compatible+0x1c/0x4c) [] (of_device_is_compatible) from [] (exynos_core_restart+0x14/0xb0) [] (exynos_core_restart) from [] (exynos_cpu0_enter_aftr+0x1d0/0x1dc) [] (exynos_cpu0_enter_aftr) from [] (exynos_enter_coupled_lowpower+0x44/0x74) [] (exynos_enter_coupled_lowpower) from [] (cpuidle_enter_state+0x178/0x660) [] (cpuidle_enter_state) from [] (cpuidle_enter_state_coupled+0x35c/0x378) [] (cpuidle_enter_state_coupled) from [] (cpuidle_enter+0x50/0x54) [] (cpuidle_enter) from [] (do_idle+0x224/0x2a4) [] (do_idle) from [] (cpu_startup_entry+0x18/0x1c) [] (cpu_startup_entry) from [] (start_kernel+0x640/0x67c) [] (start_kernel) from [<00000000>] (0x0) Signed-off-by: Marek Szyprowski Link: https://lore.kernel.org/r/20201027201716.15745-1-m.szyprowski@samsung.com Signed-off-by: Krzysztof Kozlowski commit 2e008ffe426f927b1697adb4ed10c1e419927ae4 Author: David Woodhouse Date: Sat Oct 24 22:35:35 2020 +0100 x86/kvm: Enable 15-bit extension when KVM_FEATURE_MSI_EXT_DEST_ID detected This allows the host to indicate that MSI emulation supports 15-bit destination IDs, allowing up to 32768 CPUs without interrupt remapping. cf. https://patchwork.kernel.org/patch/11816693/ for qemu Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Acked-by: Paolo Bonzini Link: https://lore.kernel.org/r/20201024213535.443185-36-dwmw2@infradead.org commit bf27ef8a77d8da38c9f35f8f6aab013a2dcf175f Author: David Woodhouse Date: Sat Oct 24 22:35:33 2020 +0100 iommu/hyper-v: Disable IRQ pseudo-remapping if 15 bit APIC IDs are available If the 15-bit APIC ID support is present in emulated MSI then there's no need for the pseudo-remapping support. Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201024213535.443185-34-dwmw2@infradead.org commit ab0f59c6f135289c7ea90b0e2471674bf289d884 Author: David Woodhouse Date: Sat Oct 24 22:35:32 2020 +0100 x86/apic: Support 15 bits of APIC ID in MSI where available Some hypervisors can allow the guest to use the Extended Destination ID field in the MSI address to address up to 32768 CPUs. This applies to all downstream devices which generate MSI cycles, including HPET, I/O-APIC and PCI MSI. HPET and PCI MSI use the same __irq_msi_compose_msg() function, while I/O-APIC generates its own and had support for the extended bits added in a previous commit. Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201024213535.443185-33-dwmw2@infradead.org commit 51130d21881d435fad5fa7f25bea77aa0ffc9a4e Author: David Woodhouse Date: Sat Oct 24 22:35:31 2020 +0100 x86/ioapic: Handle Extended Destination ID field in RTE Bits 63-48 of the I/OAPIC Redirection Table Entry map directly to bits 19-4 of the address used in the resulting MSI cycle. Historically, the x86 MSI format only used the top 8 of those 16 bits as the destination APIC ID, and the "Extended Destination ID" in the lower 8 bits was unused. With interrupt remapping, the lowest bit of the Extended Destination ID (bit 48 of RTE, bit 4 of MSI address) is now used to indicate a remappable format MSI. A hypervisor can use the other 7 bits of the Extended Destination ID to permit guests to address up to 15 bits of APIC IDs, thus allowing 32768 vCPUs before having to expose a vIOMMU and interrupt remapping to the guest. No behavioural change in this patch, since nothing yet permits APIC IDs above 255 to be used with the non-IR I/OAPIC domain. [ tglx: Converted it to the cleaned up entry/msi_msg format and added commentry ] Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201024213535.443185-32-dwmw2@infradead.org commit 79eb3581bcaae9b5677629d945e14da212aa76e2 Author: David Woodhouse Date: Sat Oct 24 22:35:30 2020 +0100 iommu/vt-d: Simplify intel_irq_remapping_select() Now that the old get_irq_domain() method has gone, consolidate on just the map_XXX_to_iommu() functions. Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201024213535.443185-31-dwmw2@infradead.org commit ed381fca47122f0787ee53b97e5f9d562eec7237 Author: David Woodhouse Date: Sat Oct 24 22:35:29 2020 +0100 x86: Kill all traces of irq_remapping_get_irq_domain() All users are converted to use the fwspec based parent domain lookup. Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201024213535.443185-30-dwmw2@infradead.org commit b643128b917ca8f1c8b1e14af64ebdc81147b2d1 Author: David Woodhouse Date: Sat Oct 24 22:35:28 2020 +0100 x86/ioapic: Use irq_find_matching_fwspec() to find remapping irqdomain All possible parent domains have a select method now. Make use of it. Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201024213535.443185-29-dwmw2@infradead.org commit c2a5881c28e5bb4cb901029423a1c7068c0afa2d Author: David Woodhouse Date: Sat Oct 24 22:35:27 2020 +0100 x86/hpet: Use irq_find_matching_fwspec() to find remapping irqdomain All possible parent domains have a select method now. Make use of it. Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201024213535.443185-28-dwmw2@infradead.org commit a491bb19f728cdb8cc1f4734ecc57c0afa099fac Author: David Woodhouse Date: Sat Oct 24 22:35:26 2020 +0100 iommu/hyper-v: Implement select() method on remapping irqdomain Preparatory for removing irq_remapping_get_irq_domain() Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201024213535.443185-27-dwmw2@infradead.org commit a87fb465ffe8eacd0d69032da33455e4f6fd8b41 Author: David Woodhouse Date: Sat Oct 24 22:35:25 2020 +0100 iommu/vt-d: Implement select() method on remapping irqdomain Preparatory for removing irq_remapping_get_irq_domain() Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201024213535.443185-26-dwmw2@infradead.org commit a1a785b572425ab3ca5494a4be02ab59a796df51 Author: David Woodhouse Date: Sat Oct 24 22:35:24 2020 +0100 iommu/amd: Implement select() method on remapping irqdomain Preparatory change to remove irq_remapping_get_irq_domain(). Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201024213535.443185-25-dwmw2@infradead.org commit 6452ea2a323b80868ce5e6d3030e4ccbeab9dc30 Author: David Woodhouse Date: Sat Oct 24 22:35:23 2020 +0100 x86/apic: Add select() method on vector irqdomain This will be used to select the irqdomain for I/O-APIC and HPET. Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201024213535.443185-24-dwmw2@infradead.org commit 2cbd5a45e5296b28d64224ffbbd33d427704ba1b Author: David Woodhouse Date: Sat Oct 24 22:35:22 2020 +0100 genirq/irqdomain: Implement get_name() method on irqchip fwnodes Prerequisite to make x86 more irqdomain compliant. Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20201024213535.443185-23-dwmw2@infradead.org commit 5d5a97133887b2dfd8e2ad0347c3a02cc7aaa0cb Author: David Woodhouse Date: Sat Oct 24 22:35:21 2020 +0100 x86/ioapic: Generate RTE directly from parent irqchip's MSI message The I/O-APIC generates an MSI cycle with address/data bits taken from its Redirection Table Entry in some combination which used to make sense, but now is just a bunch of bits which get passed through in some seemingly arbitrary order. Instead of making IRQ remapping drivers directly frob the I/OA-PIC RTE, let them just do their job and generate an MSI message. The bit swizzling to turn that MSI message into the I/O-APIC's RTE is the same in all cases, since it's a function of the I/O-APIC hardware. The IRQ remappers have no real need to get involved with that. The only slight caveat is that the I/OAPIC is interpreting some of those fields too, and it does want the 'vector' field to be unique to make EOI work. The AMD IOMMU happens to put its IRTE index in the bits that the I/O-APIC thinks are the vector field, and accommodates this requirement by reserving the first 32 indices for the I/O-APIC. The Intel IOMMU doesn't actually use the bits that the I/O-APIC thinks are the vector field, so it fills in the 'pin' value there instead. [ tglx: Replaced the unreadably macro maze with the cleaned up RTE/msi_msg bitfields and added commentry to explain the mapping magic ] Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201024213535.443185-22-dwmw2@infradead.org commit 341b4a7211b6ba3a7089e1dc09ac4bd576dfb05f Author: Thomas Gleixner Date: Sat Oct 24 22:35:20 2020 +0100 x86/ioapic: Cleanup IO/APIC route entry structs Having two seperate structs for the I/O-APIC RTE entries (non-remapped and DMAR remapped) requires type casts and makes it hard to map. Combine them in IO_APIC_routing_entry by defining a union of two 64bit bitfields. Use naming which reflects which bits are shared and which bits are actually different for the operating modes. [dwmw2: Fix it up and finish the job, pulling the 32-bit w1,w2 words for register access into the same union and eliminating a few more places where bits were accessed through masks and shifts.] Signed-off-by: Thomas Gleixner Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201024213535.443185-21-dwmw2@infradead.org commit a27dca645d2c0f31abb7858aa0e10b2fa0f2f659 Author: Thomas Gleixner Date: Sat Oct 24 22:35:19 2020 +0100 x86/io_apic: Cleanup trigger/polarity helpers 'trigger' and 'polarity' are used throughout the I/O-APIC code for handling the trigger type (edge/level) and the active low/high configuration. While there are defines for initializing these variables and struct members, they are not used consequently and the meaning of 'trigger' and 'polarity' is opaque and confusing at best. Rename them to 'is_level' and 'active_low' and make them boolean in various structs so it's entirely clear what the meaning is. Signed-off-by: Thomas Gleixner Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201024213535.443185-20-dwmw2@infradead.org commit 0c1883c1eb9dfa3c72af6e00425eeb1eb171a03e Author: Thomas Gleixner Date: Sat Oct 24 22:35:18 2020 +0100 x86/msi: Remove msidef.h Nothing uses the macro maze anymore. Signed-off-by: Thomas Gleixner Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201024213535.443185-19-dwmw2@infradead.org commit 41bb2115beec5e318095a89f5ad4a9c343cb21ad Author: Thomas Gleixner Date: Sat Oct 24 22:35:17 2020 +0100 x86/pci/xen: Use msi_msg shadow structs Use the msi_msg shadow structs and compose the message with named bitfields instead of the unreadable macro maze. Signed-off-by: Thomas Gleixner Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201024213535.443185-18-dwmw2@infradead.org commit 485940e0e691d6d7874fe1fe3b9453c5af41aace Author: Thomas Gleixner Date: Sat Oct 24 22:35:16 2020 +0100 x86/kvm: Use msi_msg shadow structs Use the bitfields in the x86 shadow structs instead of decomposing the 32bit value with macros. Signed-off-by: Thomas Gleixner Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201024213535.443185-17-dwmw2@infradead.org commit e16c8058a10ba8e38d0d1ad0b64e444b245ffdbd Author: Thomas Gleixner Date: Sat Oct 24 22:35:15 2020 +0100 PCI: vmd: Use msi_msg shadow structs Use the x86 shadow structs in msi_msg instead of the macros. Signed-off-by: Thomas Gleixner Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201024213535.443185-16-dwmw2@infradead.org commit b5c3786ee3704bd8cd5b29ae168526f2b1af4557 Author: Thomas Gleixner Date: Sat Oct 24 22:35:14 2020 +0100 iommu/amd: Use msi_msg shadow structs Get rid of the macro mess and use the shadow structs for the x86 specific MSI message format. Convert the intcapxt setup to use named bitfields as well while touching it anyway. Signed-off-by: Thomas Gleixner Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201024213535.443185-15-dwmw2@infradead.org commit 5c0d0e2cc6e0e7a96c25351fd67c775e7b1f11f0 Author: Thomas Gleixner Date: Sat Oct 24 22:35:13 2020 +0100 iommu/intel: Use msi_msg shadow structs Use the bitfields in the x86 shadow struct to compose the MSI message. Signed-off-by: Thomas Gleixner Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201024213535.443185-14-dwmw2@infradead.org commit 6285aa507366729c618d5295fb540b24a956088a Author: Thomas Gleixner Date: Sat Oct 24 22:35:12 2020 +0100 x86/msi: Provide msi message shadow structs Create shadow structs with named bitfields for msi_msg data, address_lo and address_hi and use them in the MSI message composer. Provide a function to retrieve the destination ID. This could be inline, but that'd create a circular header dependency. [dwmw2: fix bitfields not all to be a union] Signed-off-by: Thomas Gleixner Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201024213535.443185-13-dwmw2@infradead.org commit 8073c1ac82c12aaf1b475a3ce5328d43b3eaa4ae Author: Thomas Gleixner Date: Sat Oct 24 22:35:11 2020 +0100 genirq/msi: Allow shadow declarations of msi_msg:: $member Architectures like x86 have their MSI messages in various bits of the data, address_lo and address_hi field. Composing or decomposing these messages with bitmasks and shifts is possible, but unreadable gunk. Allow architectures to provide an architecture specific representation for each member of msi_msg. Provide empty defaults for each and stick them into an union. Signed-off-by: Thomas Gleixner Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201024213535.443185-12-dwmw2@infradead.org commit 3d7295eb3003aea9f89de35304b3a88ae4d5036b Author: David Woodhouse Date: Sat Oct 24 22:35:10 2020 +0100 x86/hpet: Move MSI support into hpet.c This isn't really dependent on PCI MSI; it's just generic MSI which is now supported by the generic x86_vector_domain. Move the HPET MSI support back into hpet.c with the rest of the HPET support. Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201024213535.443185-11-dwmw2@infradead.org commit f598181acfb36f67e1de138cbe80a7db497f7d8c Author: David Woodhouse Date: Sat Oct 24 22:35:09 2020 +0100 x86/apic: Always provide irq_compose_msi_msg() method for vector domain This shouldn't be dependent on PCI_MSI. HPET and I/O-APIC can deliver interrupts through MSI without having any PCI in the system at all. Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201024213535.443185-10-dwmw2@infradead.org commit 8c44963b603db76e3e5f57d90d027657ba43c1fe Author: Thomas Gleixner Date: Sat Oct 24 22:35:08 2020 +0100 x86/apic: Cleanup destination mode apic::irq_dest_mode is actually a boolean, but defined as u32 and named in a way which does not explain what it means. Make it a boolean and rename it to 'dest_mode_logical' Signed-off-by: Thomas Gleixner Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201024213535.443185-9-dwmw2@infradead.org commit e57d04e5fa00f7649d4c00796f8d12054799be4a Author: Thomas Gleixner Date: Sat Oct 24 22:35:07 2020 +0100 x86/apic: Get rid of apic:: Dest_logical struct apic has two members which store information about the destination mode: dest_logical and irq_dest_mode. dest_logical contains a mask which was historically used to set the destination mode in IPI messages. Over time the usage was reduced and the logical/physical functions were seperated. There are only a few places which still use 'dest_logical' but they can use 'irq_dest_mode' instead. irq_dest_mode is actually a boolean where 0 means physical destination mode and 1 means logical destination mode. Of course the name does not reflect the functionality. This will be cleaned up in a subsequent change. Remove apic::dest_logical and fixup the remaining users. Signed-off-by: Thomas Gleixner Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201024213535.443185-8-dwmw2@infradead.org commit 22e0db42097b30a49771744e514350b7e9dd26f2 Author: Thomas Gleixner Date: Sat Oct 24 22:35:06 2020 +0100 x86/apic: Replace pointless apic:: Dest_logical usage All these functions are only used for logical destination mode. So reading the destination mode mask from the apic structure is a pointless exercise. Just hand in the proper constant: APIC_DEST_LOGICAL. Signed-off-by: Thomas Gleixner Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201024213535.443185-7-dwmw2@infradead.org commit 721612994f53ed600b39a80d912b10f51960e2e3 Author: Thomas Gleixner Date: Sat Oct 24 22:35:05 2020 +0100 x86/apic: Cleanup delivery mode defines The enum ioapic_irq_destination_types and the enumerated constants starting with 'dest_' are gross misnomers because they describe the delivery mode. Rename then enum and the constants so they actually make sense. Signed-off-by: Thomas Gleixner Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201024213535.443185-6-dwmw2@infradead.org commit 2e730cb56b2cd1626fecaf23ef1537fb24721ef2 Author: Thomas Gleixner Date: Sat Oct 24 22:35:04 2020 +0100 x86/devicetree: Fix the ioapic interrupt type table The ioapic interrupt type table is wrong as it assumes that polarity in IO/APIC context means active high when set. But the IO/APIC polarity is working the other way round. This works because the ordering of the entries is consistent with the device tree and the type information is not used by the IO/APIC interrupt chip. The whole trigger and polarity business of IO/APIC is misleading and the corresponding constants which are defined as 0/1 are not used consistently and are going to be removed. Rename the type table members to 'is_level' and 'active_low' and adjust the type information for consistency sake. No functional change. Signed-off-by: Thomas Gleixner Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201024213535.443185-5-dwmw2@infradead.org commit 93b7a3d6a1f0f159d390959de7a1b9ad863d6b26 Author: Thomas Gleixner Date: Sat Oct 24 22:35:03 2020 +0100 x86/apic/uv: Fix inconsistent destination mode The UV x2apic is strictly using physical destination mode, but apic::dest_logical is initialized with APIC_DEST_LOGICAL. This does not matter much because UV does not use any of the generic functions which use apic::dest_logical, but is still inconsistent. Signed-off-by: Thomas Gleixner Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201024213535.443185-4-dwmw2@infradead.org commit 47bea873cf809f490cfac0c4e88533fd7fed6064 Author: David Woodhouse Date: Sat Oct 24 22:35:02 2020 +0100 x86/msi: Only use high bits of MSI address for DMAR unit The Intel IOMMU has an MSI-like configuration for its interrupt, but it isn't really MSI. So it gets to abuse the high 32 bits of the address, and puts the high 24 bits of the extended APIC ID there. This isn't something that can be used in the general case for real MSIs, since external devices using the high bits of the address would be performing writes to actual memory space above 4GiB, not targeted at the APIC. Factor the hack out and allow it only to be used when appropriate, adding a WARN_ON_ONCE() if other MSIs are targeted at an unreachable APIC ID. That should never happen since the compatibility MSI messages are not used when Interrupt Remapping is enabled. The x2apic_enabled() check isn't needed because Linux won't bring up CPUs with higher APIC IDs unless IR and x2apic are enabled anyway. Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201024213535.443185-3-dwmw2@infradead.org commit 26573a97746c7a99f394f9d398ce91a8853b3b89 Author: David Woodhouse Date: Sat Oct 24 22:35:01 2020 +0100 x86/apic: Fix x2apic enablement without interrupt remapping Currently, Linux as a hypervisor guest will enable x2apic only if there are no CPUs present at boot time with an APIC ID above 255. Hotplugging a CPU later with a higher APIC ID would result in a CPU which cannot be targeted by external interrupts. Add a filter in x2apic_apic_id_valid() which can be used to prevent such CPUs from coming online, and allow x2apic to be enabled even if they are present at boot time. Fixes: ce69a784504 ("x86/apic: Enable x2APIC without interrupt remapping under KVM") Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201024213535.443185-2-dwmw2@infradead.org commit d35cdc833bf415d855261ebe2c4a6349f882b265 Author: Marek Szyprowski Date: Tue Oct 27 15:23:30 2020 +0100 ARM: dts: exynos: Enable Bluetooth support for Midas board family Add a node for the BCM4334 Bluetooth chip on the serial bus #0 on the Exynos4412-based Midas board family. Signed-off-by: Marek Szyprowski Link: https://lore.kernel.org/r/20201027142330.5121-3-m.szyprowski@samsung.com Signed-off-by: Krzysztof Kozlowski commit 4e77879298541bde7271f1e735933d07fa8ae8bf Author: Marek Szyprowski Date: Tue Oct 27 15:23:29 2020 +0100 ARM: dts: exynos: Enable Bluetooth support for Universal C210 board Add a node for the BCM4330 Bluetooth chip on the serial bus #0 on the Exynos4210-based Universal C210 boards. Signed-off-by: Marek Szyprowski Link: https://lore.kernel.org/r/20201027142330.5121-2-m.szyprowski@samsung.com Signed-off-by: Krzysztof Kozlowski commit 132e900a47b89c45f760c82f0d0929903b96eb08 Author: Marek Szyprowski Date: Tue Oct 27 15:23:28 2020 +0100 ARM: dts: exynos: Enable Bluetooth support for Trats board Add a node for the BCM4334 Bluetooth chip on the serial bus #0 on the Exynos4210-based Trats boards. Signed-off-by: Marek Szyprowski Link: https://lore.kernel.org/r/20201027142330.5121-1-m.szyprowski@samsung.com Signed-off-by: Krzysztof Kozlowski commit 997ebd64df39f3916c37ca67a6eff58e79a13c73 Author: Alexander Dahl Date: Mon Oct 5 22:34:44 2020 +0200 ARM: dts: at91: Fix schema warnings for pwm-leds The node names for devices using the pwm-leds driver follow a certain naming scheme (now). Parent node name is not enforced, but recommended by DT project. DTC arch/arm/boot/dts/at91-kizbox2-2.dt.yaml CHECK arch/arm/boot/dts/at91-kizbox2-2.dt.yaml /home/alex/build/linux/arch/arm/boot/dts/at91-kizbox2-2.dt.yaml: pwm_leds: 'blue', 'green', 'red' do not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+' From schema: /home/alex/src/linux/leds/Documentation/devicetree/bindings/leds/leds-pwm.yaml DTC arch/arm/boot/dts/at91-kizbox3-hs.dt.yaml CHECK arch/arm/boot/dts/at91-kizbox3-hs.dt.yaml /home/alex/build/linux/arch/arm/boot/dts/at91-kizbox3-hs.dt.yaml: pwm_leds: 'blue', 'green', 'red', 'white' do not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+' From schema: /home/alex/src/linux/leds/Documentation/devicetree/bindings/leds/leds-pwm.yaml (Warnings above are for armv7 only, armv5 would produce similar warnings.) Signed-off-by: Alexander Dahl Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201005203451.9985-6-post@lespocky.de commit 02e46262af5db410da5a27783833d68e2bdfb352 Author: Alexander Dahl Date: Mon Oct 5 22:34:43 2020 +0200 ARM: dts: at91: smartkiz: Reference led node directly Do it the simple way like for the other kizbox boards. This will allow renaming the led controller node name later without breaking things. Signed-off-by: Alexander Dahl Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201005203451.9985-5-post@lespocky.de commit 7cb415003468d41aecd6877ae088c38f6c0fc174 Author: Peilin Ye Date: Wed Oct 28 06:56:47 2020 -0400 Fonts: Make font size unsigned in font_desc `width` and `height` are defined as unsigned in our UAPI font descriptor `struct console_font`. Make them unsigned in our kernel font descriptor `struct font_desc`, too. Also, change the corresponding printk() format identifiers from `%d` to `%u`, in sti_select_fbfont(). Signed-off-by: Peilin Ye Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201028105647.1210161-1-yepeilin.cs@gmail.com commit e000650375b65ff77c5ee852b5086f58c741179e Author: Peilin Ye Date: Tue Oct 27 12:31:08 2020 -0400 fbdev/atafb: Remove unused extern variables Remove 6 unused extern variables to reduce confusion. It is worth mentioning that lib/fonts/font_8x8.c and lib/fonts/font_8x16.c also declare `fontdata_8x8` and `fontdata_8x16` respectively, and this file has nothing to do with them. Signed-off-by: Peilin Ye Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/cb5bb49a33ff54fef41e719ee9d301a6a73c5f9c.1603788512.git.yepeilin.cs@gmail.com Link: https://patchwork.freedesktop.org/patch/msgid/20201028105647.1210161-1-yepeilin.cs@gmail.com commit 28d211919e422f58c1e6c900e5810eee4f1ce4c8 Author: Dinghao Liu Date: Tue Oct 20 14:12:26 2020 +0800 rtc: sun6i: Fix memleak in sun6i_rtc_clk_init When clk_hw_register_fixed_rate_with_accuracy() fails, clk_data should be freed. It's the same for the subsequent two error paths, but we should also unregister the already registered clocks in them. Signed-off-by: Dinghao Liu Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201020061226.6572-1-dinghao.liu@zju.edu.cn commit 00e5deb5c4f5fe367311465e720e65cfa1178792 Author: Imre Deak Date: Tue Oct 27 18:09:28 2020 +0200 drm/i915: Fix encoder lookup during PSR atomic check The atomic check hooks must look up the encoder to be used with a connector from the connector's atomic state, and not assume that it's the connector's current attached encoder. The latter one can change under the atomic check func, or can be unset yet as in the case of MST connectors. This fixes [ 7.940719] Oops: 0000 [#1] SMP NOPTI [ 7.944407] CPU: 2 PID: 143 Comm: kworker/2:2 Not tainted 5.6.0-1023-oem #23-Ubuntu [ 7.952102] Hardware name: Dell Inc. Latitude 7320/, BIOS 88.87.11 09/07/2020 [ 7.959278] Workqueue: events output_poll_execute [drm_kms_helper] [ 7.965511] RIP: 0010:intel_psr_atomic_check+0x37/0xa0 [i915] [ 7.971327] Code: 80 2d 06 00 00 20 74 42 80 b8 34 71 00 00 00 74 39 48 8b 72 08 48 85 f6 74 30 80 b8 f8 71 00 00 00 74 27 4c 8b 87 80 04 00 00 <41> 8b 78 78 83 ff 08 77 19 31 c9 83 ff 05 77 19 48 81 c1 20 01 00 [ 7.977541] input: PS/2 Generic Mouse as /devices/platform/i8042/serio1/input/input5 [ 7.990154] RSP: 0018:ffffb864c073fac8 EFLAGS: 00010202 [ 7.990155] RAX: ffff8c5d55ce0000 RBX: ffff8c5d54519000 RCX: 0000000000000000 [ 7.990155] RDX: ffff8c5d55cb30c0 RSI: ffff8c5d89a0c800 RDI: ffff8c5d55fcf800 [ 7.990156] RBP: ffffb864c073fac8 R08: 0000000000000000 R09: ffff8c5d55d9f3a0 [ 7.990156] R10: ffff8c5d55cb30c0 R11: 0000000000000009 R12: ffff8c5d55fcf800 [ 7.990156] R13: ffff8c5d55cb30c0 R14: ffff8c5d56989cc0 R15: ffff8c5d56989cc0 [ 7.990158] FS: 0000000000000000(0000) GS:ffff8c5d8e480000(0000) knlGS:0000000000000000 [ 8.047193] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 8.052970] CR2: 0000000000000078 CR3: 0000000856500005 CR4: 0000000000760ee0 [ 8.060137] PKRU: 55555554 [ 8.062867] Call Trace: [ 8.065361] intel_digital_connector_atomic_check+0x53/0x130 [i915] [ 8.071703] intel_dp_mst_atomic_check+0x5b/0x200 [i915] [ 8.077074] drm_atomic_helper_check_modeset+0x1db/0x790 [drm_kms_helper] [ 8.083942] intel_atomic_check+0x92/0xc50 [i915] [ 8.088705] ? drm_plane_check_pixel_format+0x4f/0xb0 [drm] [ 8.094345] ? drm_atomic_plane_check+0x7a/0x3a0 [drm] [ 8.099548] drm_atomic_check_only+0x2b1/0x450 [drm] [ 8.104573] drm_atomic_commit+0x18/0x50 [drm] [ 8.109070] drm_client_modeset_commit_atomic+0x1c9/0x200 [drm] [ 8.115056] drm_client_modeset_commit_force+0x55/0x160 [drm] [ 8.120866] drm_fb_helper_restore_fbdev_mode_unlocked+0x54/0xb0 [drm_kms_helper] [ 8.128415] drm_fb_helper_set_par+0x34/0x50 [drm_kms_helper] [ 8.134225] drm_fb_helper_hotplug_event.part.0+0xb4/0xe0 [drm_kms_helper] [ 8.141150] drm_fb_helper_hotplug_event+0x1c/0x30 [drm_kms_helper] [ 8.147481] intel_fbdev_output_poll_changed+0x6f/0xa0 [i915] [ 8.153287] drm_kms_helper_hotplug_event+0x2c/0x40 [drm_kms_helper] [ 8.159709] output_poll_execute+0x1aa/0x1c0 [drm_kms_helper] [ 8.165506] process_one_work+0x1e8/0x3b0 [ 8.169561] worker_thread+0x4d/0x400 [ 8.173249] kthread+0x104/0x140 [ 8.176515] ? process_one_work+0x3b0/0x3b0 [ 8.180726] ? kthread_park+0x90/0x90 [ 8.184416] ret_from_fork+0x1f/0x40 Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2361 References: https://gitlab.freedesktop.org/drm/intel/-/issues/2486 Reported-by: William Tseng Reported-by: Cooper Chiou Cc: Signed-off-by: Imre Deak Reviewed-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20201027160928.3665377-1-imre.deak@intel.com commit 32053e584e4a342be37a0932ffc1f9b13e914515 Author: Weihang Li Date: Sat Oct 24 11:07:16 2020 +0800 RDMA/hns: Add support for filling GMV table Add a interface to fill GMV(SGID/SMAC/VLAN) table for HIP09, all of above source address information is stored as an entry in GMV table. The users just need to provide the index to the hardware when POST SEND. Link: https://lore.kernel.org/r/1603508836-33054-3-git-send-email-liweihang@huawei.com Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit d6d91e46210f3adb7b6d4c667cb72bf847b5783a Author: Weihang Li Date: Sat Oct 24 11:07:15 2020 +0800 RDMA/hns: Add support for configuring GMV table HIP09 supports to store SGID/SMAC/VLAN together in a table named GMV. The driver needs to allocate memory for it and tell the information about this region to hardware. Link: https://lore.kernel.org/r/1603508836-33054-2-git-send-email-liweihang@huawei.com Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit d73e873bcfff86b0de7dae2610131b50a2970f88 Author: Mauro Carvalho Chehab Date: Fri Oct 23 18:33:13 2020 +0200 regulator: fix a kernel-doc markup It seems that the function was renamed. kernel-doc markup should follow it. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/dffad16d4d6427d7d0fc89797e4126fe7c69d5de.1603469755.git.mchehab+huawei@kernel.org Signed-off-by: Mark Brown commit 3f4e3d962dfda68e024d57cf2408cacf081cd9df Author: Guoqing Jiang Date: Fri Oct 23 09:43:53 2020 +0200 RDMA/rtrs-clt: Remove 'addr' from rtrs_clt_add_path_to_arr Remove the argument since it is not used in the function. Link: https://lore.kernel.org/r/20201023074353.21946-13-jinpu.wang@cloud.ionos.com Signed-off-by: Guoqing Jiang Signed-off-by: Jack Wang Signed-off-by: Jason Gunthorpe commit e6ab8cf50fa1c38652feba3e4921c60538236f30 Author: Guoqing Jiang Date: Fri Oct 23 09:43:52 2020 +0200 RDMA/rtrs: Introduce rtrs_post_send Since the three functions share the similar logic, let's introduce one common function for it. Link: https://lore.kernel.org/r/20201023074353.21946-12-jinpu.wang@cloud.ionos.com Signed-off-by: Guoqing Jiang Signed-off-by: Jack Wang Signed-off-by: Jason Gunthorpe commit ffea6ad1335b90be91e837aecbde730e1612087a Author: Guoqing Jiang Date: Fri Oct 23 09:43:51 2020 +0200 RDMA/rtrs-srv: Kill rtrs_srv_change_state_get_old This function isn't needed since no caller checks the old_state of sess. Link: https://lore.kernel.org/r/20201023074353.21946-11-jinpu.wang@cloud.ionos.com Signed-off-by: Guoqing Jiang Signed-off-by: Jack Wang Signed-off-by: Jason Gunthorpe commit c3b16b67d12f938408172ac0c47470f09c3f39ea Author: Gioh Kim Date: Fri Oct 23 09:43:50 2020 +0200 RDMA/rtrs-clt: Remove duplicated code process_info_rsp checks that sg_cnt is zero twice. Link: https://lore.kernel.org/r/20201023074353.21946-10-jinpu.wang@cloud.ionos.com Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Signed-off-by: Jason Gunthorpe commit 16101b60e71782b2a314a87114cdca8248b89cb3 Author: Gioh Kim Date: Fri Oct 23 09:43:49 2020 +0200 RDMA/rtrs-clt: Remove duplicated switch-case handling for CM error events The events returning the same error value are put together. Link: https://lore.kernel.org/r/20201023074353.21946-9-jinpu.wang@cloud.ionos.com Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Signed-off-by: Jason Gunthorpe commit 8bd372ace32ec88fe3ad1421929ae1604f2a2c2c Author: Gioh Kim Date: Fri Oct 23 09:43:48 2020 +0200 RDMA/rtrs: Remove unnecessary argument dir of rtrs_iu_free The direction of DMA operation is already in the rtrs_iu Link: https://lore.kernel.org/r/20201023074353.21946-8-jinpu.wang@cloud.ionos.com Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Signed-off-by: Jason Gunthorpe commit 3c8483f5a436ce00f122378ef84aa7c6b20066f1 Author: Guoqing Jiang Date: Fri Oct 23 09:43:47 2020 +0200 RDMA/rtrs-srv: Fix typo It should mean region here. Fixes: 9cb837480424 ("RDMA/rtrs: server: main functionality") Link: https://lore.kernel.org/r/20201023074353.21946-7-jinpu.wang@cloud.ionos.com Signed-off-by: Guoqing Jiang Signed-off-by: Jack Wang Signed-off-by: Jason Gunthorpe commit d715ff8acbd5876549ef2b21b755ed919f40dcc1 Author: Guoqing Jiang Date: Fri Oct 23 09:43:46 2020 +0200 RDMA/rtrs-srv: Don't guard the whole __alloc_srv with srv_mutex The purpose of srv_mutex is to protect srv_list as in put_srv, so no need to hold it when allocate memory for srv since it could be time consuming. Otherwise if one machine has limited memory, rsrv_close_work could be blocked for a longer time due to the mutex is held by get_or_create_srv since it can't get memory in time. INFO: task kworker/1:1:27478 blocked for more than 120 seconds. Tainted: G O 4.14.171-1-storage #4.14.171-1.3~deb9 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. kworker/1:1 D 0 27478 2 0x80000000 Workqueue: rtrs_server_wq rtrs_srv_close_work [rtrs_server] Call Trace: ? __schedule+0x38c/0x7e0 schedule+0x32/0x80 schedule_preempt_disabled+0xa/0x10 __mutex_lock.isra.2+0x25e/0x4d0 ? put_srv+0x44/0x100 [rtrs_server] put_srv+0x44/0x100 [rtrs_server] rtrs_srv_close_work+0x16c/0x280 [rtrs_server] process_one_work+0x1c5/0x3c0 worker_thread+0x47/0x3e0 kthread+0xfc/0x130 ? trace_event_raw_event_workqueue_execute_start+0xa0/0xa0 ? kthread_create_on_node+0x70/0x70 ret_from_fork+0x1f/0x30 Let's move all the logics from __find_srv_and_get and __alloc_srv to get_or_create_srv, and remove the two functions. Then it should be safe for multiple processes to access the same srv since it is protected with srv_mutex. And since we don't want to allocate chunks with srv_mutex held, let's check the srv->refcount after get srv because the chunks could not be allocated yet. Fixes: 9cb837480424 ("RDMA/rtrs: server: main functionality") Link: https://lore.kernel.org/r/20201023074353.21946-6-jinpu.wang@cloud.ionos.com Signed-off-by: Guoqing Jiang Signed-off-by: Jack Wang Signed-off-by: Jason Gunthorpe commit f553e7601df9566ba7644541fc09152a3a81f793 Author: Gioh Kim Date: Fri Oct 23 09:43:45 2020 +0200 RDMA/rtrs-clt: Missing error from rtrs_rdma_conn_established When rtrs_rdma_conn_established returns error (non-zero value), the error value is stored in con->cm_err and it cannot trigger rtrs_rdma_error_recovery. Finally the error of rtrs_rdma_con_established will be forgot. Fixes: 6a98d71daea1 ("RDMA/rtrs: client: main functionality") Link: https://lore.kernel.org/r/20201023074353.21946-5-jinpu.wang@cloud.ionos.com Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Signed-off-by: Jason Gunthorpe commit fcf2959da6a74e71a85ab666e732fa1ed4da2c9a Author: Jack Wang Date: Fri Oct 23 09:43:44 2020 +0200 RDMA/rtrs-clt: Avoid run destroy_con_cq_qp/create_con_cq_qp in parallel It could happen two kworkers race with each other: CPU0 CPU1 addr_resolver kworker reconnect kworker rtrs_clt_rdma_cm_handler rtrs_rdma_addr_resolved create_con_cq_qp: s.dev_ref++ "s.dev_ref is 1" wait in create_cm fails with TIMEOUT destroy_con_cq_qp: --s.dev_ref "s.dev_ref is 0" destroy_con_cq_qp: sess->s.dev = NULL rtrs_cq_qp_create -> create_qp(con, sess->dev->ib_pd...) sess->dev is NULL, panic. To fix the problem using mutex to serialize create_con_cq_qp and destroy_con_cq_qp. Fixes: 6a98d71daea1 ("RDMA/rtrs: client: main functionality") Link: https://lore.kernel.org/r/20201023074353.21946-4-jinpu.wang@cloud.ionos.com Signed-off-by: Jack Wang Reviewed-by: Gioh Kim Signed-off-by: Jason Gunthorpe commit 73385fdbc43df2e9ba07d4a459d6e0e2110ad2d8 Author: Jack Wang Date: Fri Oct 23 09:43:43 2020 +0200 RDMA/rtrs-clt: Remove outdated comment in create_con_cq_qp As run destroy_con_cq_qp many times doesn't work, remove the comments. Fixes: 6a98d71daea1 ("RDMA/rtrs: client: main functionality") Link: https://lore.kernel.org/r/20201023074353.21946-3-jinpu.wang@cloud.ionos.com Suggested-by: Gioh Kim Signed-off-by: Jack Wang Signed-off-by: Jason Gunthorpe commit 2b3062e4d997f201c1ad2bbde88b7271dd9ef35f Author: Danil Kipnis Date: Fri Oct 23 09:43:42 2020 +0200 RDMA/rtrs-clt: Remove destroy_con_cq_qp in case route resolving failed We call destroy_con_cq_qp(con) in rtrs_rdma_addr_resolved() in case route couldn't be resolved and then again in create_cm() because nothing happens. Don't call destroy_con_cq_qp from rtrs_rdma_addr_resolved, create_cm() does the clean up already. Fixes: 6a98d71daea1 ("RDMA/rtrs: client: main functionality") Link: https://lore.kernel.org/r/20201023074353.21946-2-jinpu.wang@cloud.ionos.com Signed-off-by: Danil Kipnis Signed-off-by: Jack Wang Signed-off-by: Jason Gunthorpe commit aba457ca890c6a8042ba941a71129337b858d993 Author: Lang Cheng Date: Tue Oct 20 20:04:53 2020 +0800 RDMA/hns: Support owner mode doorbell The doorbell needs to store PI information into QPC, so the RoCEE should wait for the results of storing, that is, it needs two bus operations to complete a doorbell. When ROCEE is in SDI mode, multiple doorbells may be interlocked because the RoCEE can only handle bus operations serially. So a flag to mark if HIP09 is working in SDI mode is added. When the SDI flag is set, the ROCEE will ignore the PI information of the doorbell, continue to fetch wqe and verify its validity by it's owner_bit. Link: https://lore.kernel.org/r/1603195493-22741-1-git-send-email-liweihang@huawei.com Signed-off-by: Lang Cheng Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit c36f74566cef6b2a377c8830ee216677ddb12706 Author: Robert Marko Date: Fri Oct 16 22:46:10 2020 +0200 MAINTAINERS: Add entry for Qualcomm IPQ4019 USB PHY Add maintainers entry for the Qualcomm IPQ4019 USB PHY driver. Signed-off-by: Robert Marko Cc: Luka Perkov Link: https://lore.kernel.org/r/20201016204610.2406075-1-robert.marko@sartura.hr Signed-off-by: Vinod Koul commit ae38853249538719c12cb7e7bc302550f5513dae Author: Rikard Falkeborn Date: Sat Sep 26 22:58:44 2020 +0200 phy: fsl-imx8mq-usb: Constify imx8mp_usb_phy_ops The only usage of imx8mp_usb_phy_ops is to assign its address to the data field in the of_device_id struct, which is a const void pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200926205844.34218-1-rikard.falkeborn@gmail.com Signed-off-by: Vinod Koul commit aaac3733171fca948c4fb66b78257620e3885339 Author: Ard Biesheuvel Date: Mon Sep 14 11:25:52 2020 +0300 ARM: kvm: replace open coded VA->PA calculations with adr_l call Replace the open coded calculations of the actual physical address of the KVM stub vector table with a single adr_l invocation. Reviewed-by: Nicolas Pitre Signed-off-by: Ard Biesheuvel commit 3bcf906b194cebb6817cbb2f07b69e12aa5d7f51 Author: Ard Biesheuvel Date: Mon Sep 14 11:25:46 2020 +0300 ARM: head.S: use PC relative insn sequence to calculate PHYS_OFFSET Replace the open coded arithmetic with a simple adr_l/sub pair. This removes some open coded arithmetic involving virtual addresses, avoids literal pools on v7+, and slightly reduces the footprint of the code. Reviewed-by: Nicolas Pitre Signed-off-by: Ard Biesheuvel commit d74d2b225018baa0e04e080ee9e80b21667ba3a2 Author: Ard Biesheuvel Date: Mon Sep 14 11:25:34 2020 +0300 ARM: sleep.S: use PC-relative insn sequence for sleep_save_sp/mpidr_hash Replace the open coded PC relative offset calculations with adr_l and ldr_l invocations. This removes some open coded PC relative arithmetic, avoids literal pools on v7+, and slightly reduces the footprint of the code. Note that ALT_SMP() expects a single instruction so move the macro invocation after it. Reviewed-by: Nicolas Pitre Signed-off-by: Ard Biesheuvel commit 59d2f2827dfdccf8911d5e51465136b52ba623c4 Author: Ard Biesheuvel Date: Mon Sep 14 11:25:29 2020 +0300 ARM: head: use PC-relative insn sequence for __smp_alt Now that calling __do_fixup_smp_on_up() can be done without passing the physical-to-virtual offset in r3, we can replace the open coded PC relative offset calculations with a pair of adr_l invocations. This removes some open coded arithmetic involving virtual addresses, avoids literal pools on v7+, and slightly reduces the footprint of the code. Reviewed-by: Nicolas Pitre Signed-off-by: Ard Biesheuvel commit 450abd38fe6c6313ce9bdd9dce81c1dd604f6fb0 Author: Ard Biesheuvel Date: Mon Sep 14 11:48:20 2020 +0300 ARM: kernel: use relative references for UP/SMP alternatives Currently, the .alt.smp.init section contains the virtual addresses of the patch sites. Since patching may occur both before and after switching into virtual mode, this requires some manual handling of the address when applying the UP alternative. Let's simplify this by using relative offsets in the table entries: this allows us to simply add each entry's address to its contents, regardless of whether we are running in virtual mode or not. Reviewed-by: Nicolas Pitre Signed-off-by: Ard Biesheuvel commit 91580f0dbf24c6d616091526a900213bc7aa48fe Author: Ard Biesheuvel Date: Mon Sep 14 11:25:23 2020 +0300 ARM: head.S: use PC-relative insn sequence for secondary_data Replace the open coded PC relative offset calculations with adr_l and ldr_l invocations. This removes some open coded arithmetic involving virtual addresses, avoids literal pools on v7+, and slightly reduces the footprint of the code. Note that it also removes a stale comment about the contents of r6. Reviewed-by: Nicolas Pitre Signed-off-by: Ard Biesheuvel commit 172c34c9ff0144c3e1d96a9b54d6fecfe5d17c3c Author: Ard Biesheuvel Date: Mon Sep 14 11:25:16 2020 +0300 ARM: head-common.S: use PC-relative insn sequence for idmap creation Replace the open coded PC relative offset calculations involving __turn_mmu_on and __turn_mmu_on_end with a pair of adr_l invocations. This removes some open coded arithmetic involving virtual addresses, avoids literal pools on v7+, and slightly reduces the footprint of the code. Reviewed-by: Nicolas Pitre Signed-off-by: Ard Biesheuvel commit 62c4a2e202b18e1d7176875b7e7af240f340596b Author: Ard Biesheuvel Date: Mon Sep 14 11:25:06 2020 +0300 ARM: head-common.S: use PC-relative insn sequence for __proc_info Replace the open coded PC relative offset calculations with a pair of adr_l invocations. This removes some open coded arithmetic involving virtual addresses, avoids literal pools on v7+, and slightly reduces the footprint of the code. Reviewed-by: Nicolas Pitre Signed-off-by: Ard Biesheuvel commit 67e3f828bd4bf5e4eb4214dc4eb227d8f1c8a877 Author: Ard Biesheuvel Date: Mon Sep 14 12:28:01 2020 +0300 ARM: efistub: replace adrl pseudo-op with adr_l macro invocation The ARM 'adrl' pseudo instruction is a bit problematic, as it does not exist in Thumb mode, and it is not implemented by Clang either. Since the Thumb variant has a slightly bigger range, it is sometimes necessary to emit the 'adrl' variant in ARM mode where Thumb mode can use adr just fine. However, that still leaves the Clang issue, which does not appear to be supporting this any time soon. So let's switch to the adr_l macro, which works for both ARM and Thumb, and has unlimited range. Reviewed-by: Nicolas Pitre Signed-off-by: Ard Biesheuvel commit dae7a75f1f19bffb579daf148f8d8addd2726772 Author: Max Gurtovoy Date: Mon Oct 19 12:46:28 2020 +0300 IB/isert: add module param to set sg_tablesize for IO cmd Currently, iser target support max IO size of 16MiB by default. For some adapters, allocating this amount of resources might reduce the total number of possible connections that can be created. For those adapters, it's preferred to reduce the max IO size to be able to create more connections. Since there is no handshake procedure for max IO size in iser protocol, set the default max IO size to 1MiB and add a module parameter for enabling the option to control it for suitable adapters. Fixes: 317000b926b0 ("IB/isert: allocate RW ctxs according to max IO size") Link: https://lore.kernel.org/r/20201019094628.17202-1-mgurtovoy@nvidia.com Reported-by: Krishnamraju Eraparaju Reviewed-by: Sagi Grimberg Signed-off-by: Max Gurtovoy Signed-off-by: Jason Gunthorpe commit 9443076e4330a14ae2c6114307668b98a8293b77 Author: Ard Biesheuvel Date: Fri Sep 18 11:55:42 2020 +0300 ARM: p2v: reduce p2v alignment requirement to 2 MiB The ARM kernel's linear map starts at PAGE_OFFSET, which maps to a physical address (PHYS_OFFSET) that is platform specific, and is discovered at boot. Since we don't want to slow down translations between physical and virtual addresses by keeping the offset in a variable in memory, we implement this by patching the code performing the translation, and putting the offset between PAGE_OFFSET and the start of physical RAM directly into the instruction opcodes. As we only patch up to 8 bits of offset, yielding 4 GiB >> 8 == 16 MiB of granularity, we have to round up PHYS_OFFSET to the next multiple if the start of physical RAM is not a multiple of 16 MiB. This wastes some physical RAM, since the memory that was skipped will now live below PAGE_OFFSET, making it inaccessible to the kernel. We can improve this by changing the patchable sequences and the patching logic to carry more bits of offset: 11 bits gives us 4 GiB >> 11 == 2 MiB of granularity, and so we will never waste more than that amount by rounding up the physical start of DRAM to the next multiple of 2 MiB. (Note that 2 MiB granularity guarantees that the linear mapping can be created efficiently, whereas less than 2 MiB may result in the linear mapping needing another level of page tables) This helps Zhen Lei's scenario, where the start of DRAM is known to be occupied. It also helps EFI boot, which relies on the firmware's page allocator to allocate space for the decompressed kernel as low as possible. And if the KASLR patches ever land for 32-bit, it will give us 3 more bits of randomization of the placement of the kernel inside the linear region. For the ARM code path, it simply comes down to using two add/sub instructions instead of one for the carryless version, and patching each of them with the correct immediate depending on the rotation field. For the LPAE calculation, which has to deal with a carry, it patches the MOVW instruction with up to 12 bits of offset (but we only need 11 bits anyway) For the Thumb2 code path, patching more than 11 bits of displacement would be somewhat cumbersome, but the 11 bits we need fit nicely into the second word of the u16[2] opcode, so we simply update the immediate assignment and the left shift to create an addend of the right magnitude. Suggested-by: Zhen Lei Acked-by: Nicolas Pitre Acked-by: Linus Walleij Signed-off-by: Ard Biesheuvel commit e8e00f5afb087912fb3edb225ee373aa6499bb79 Author: Ard Biesheuvel Date: Sun Sep 20 23:02:25 2020 +0200 ARM: p2v: switch to MOVW for Thumb2 and ARM/LPAE In preparation for reducing the phys-to-virt minimum relative alignment from 16 MiB to 2 MiB, switch to patchable sequences involving MOVW instructions that can more easily be manipulated to carry a 12-bit immediate. Note that the non-LPAE ARM sequence is not updated: MOVW may not be supported on non-LPAE platforms, and the sequence itself can be updated more easily to apply the 12 bits of displacement. For Thumb2, which has many more versions of opcodes, switch to a sequence that can be patched by the same patching code for both versions. Note that the Thumb2 opcodes for MOVW and MVN are unambiguous, and have no rotation bits in their immediate fields, so there is no need to use placeholder constants in the asm blocks. While at it, drop the 'volatile' qualifiers from the asm blocks: the code does not have any side effects that are invisible to the compiler, so it is free to omit these sequences if the outputs are not used. Suggested-by: Russell King Acked-by: Nicolas Pitre Reviewed-by: Linus Walleij Signed-off-by: Ard Biesheuvel commit 0e3db6c9d7f6fd0ee263325027e8d3fdac5a4c9e Author: Ard Biesheuvel Date: Sun Sep 20 19:19:32 2020 +0200 ARM: p2v: simplify __fixup_pv_table() Declutter the code in __fixup_pv_table() by using the new adr_l/str_l macros to take PC relative references to external symbols, and by using the value of PHYS_OFFSET passed in r8 to calculate the p2v offset. Acked-by: Nicolas Pitre Reviewed-by: Linus Walleij Signed-off-by: Ard Biesheuvel commit 2730e8eaa4f2baccc03296e0c5ee109c0673fe5f Author: Ard Biesheuvel Date: Sun Sep 20 18:23:35 2020 +0200 ARM: p2v: use relative references in patch site arrays Free up a register in the p2v patching code by switching to relative references, which don't require keeping the phys-to-virt displacement live in a register. Acked-by: Nicolas Pitre Reviewed-by: Linus Walleij Signed-off-by: Ard Biesheuvel commit 0869f3b9da38889faef2ccafcf675c713d4a3aa8 Author: Ard Biesheuvel Date: Fri Sep 18 10:00:24 2020 +0300 ARM: p2v: drop redundant 'type' argument from __pv_stub We always pass the same value for 'type' so pull it into the __pv_stub macro itself. Acked-by: Nicolas Pitre Reviewed-by: Linus Walleij Signed-off-by: Ard Biesheuvel commit 7a94849e81b5c10e71f0a555300313c2789d9b0d Author: Ard Biesheuvel Date: Thu Sep 17 21:36:46 2020 +0300 ARM: p2v: factor out BE8 handling The big and little endian versions of the ARM p2v patching routine only differ in the values of the constants, so factor those out into macros so that we only have one version of the logic sequence to maintain. Acked-by: Nicolas Pitre Reviewed-by: Linus Walleij Signed-off-by: Ard Biesheuvel commit 4b16421c3e955f440eb45546db6ce33d47f29c78 Author: Ard Biesheuvel Date: Thu Sep 17 21:29:36 2020 +0300 ARM: p2v: factor out shared loop processing The ARM and Thumb2 versions of the p2v patching loop have some overlap at the end of the loop, so factor that out. As numeric labels are not required to be unique, and may therefore be ambiguous, use named local labels for the start and end of the loop instead. Acked-by: Nicolas Pitre Reviewed-by: Linus Walleij Signed-off-by: Ard Biesheuvel commit eae78e1a97201a81a851342ad9659b60f61a3951 Author: Ard Biesheuvel Date: Sun Sep 20 17:51:55 2020 +0200 ARM: p2v: move patching code to separate assembler source file Move the phys2virt patching code into a separate .S file before doing some work on it. Suggested-by: Nicolas Pitre Reviewed-by: Linus Walleij Signed-off-by: Ard Biesheuvel commit 22f2d23098f7d34fc5142531cffb241d14611684 Author: Ard Biesheuvel Date: Mon Sep 14 11:24:37 2020 +0300 ARM: module: add support for place relative relocations When using the new adr_l/ldr_l/str_l macros to refer to external symbols from modules, the linker may emit place relative ELF relocations that need to be fixed up by the module loader. So add support for these. Reviewed-by: Nicolas Pitre Signed-off-by: Ard Biesheuvel commit 0b1674638a5c69cbace63278625c199100955490 Author: Ard Biesheuvel Date: Mon Sep 14 11:23:39 2020 +0300 ARM: assembler: introduce adr_l, ldr_l and str_l macros Like arm64, ARM supports position independent code sequences that produce symbol references with a greater reach than the ordinary adr/ldr instructions. Since on ARM, the adrl pseudo-instruction is only supported in ARM mode (and not at all when using Clang), having a adr_l macro like we do on arm64 is useful, and increases symmetry as well. Currently, we use open coded instruction sequences involving literals and arithmetic operations. Instead, we can use movw/movt pairs on v7 CPUs, circumventing the D-cache entirely. E.g., on v7+ CPUs, we can emit a PC-relative reference as follows: movw , #:lower16: - (1f + 8) movt , #:upper16: - (1f + 8) 1: add , , pc For older CPUs, we can emit the literal into a subsection, allowing it to be emitted out of line while retaining the ability to perform arithmetic on label offsets. E.g., on pre-v7 CPUs, we can emit a PC-relative reference as follows: ldr , 2f 1: add , , pc .subsection 1 2: .long - (1b + 8) .previous This is allowed by the assembler because, unlike ordinary sections, subsections are combined into a single section in the object file, and so the label references are not true cross-section references that are visible as relocations. (Subsections have been available in binutils since 2004 at least, so they should not cause any issues with older toolchains.) So use the above to implement the macros mov_l, adr_l, ldr_l and str_l, all of which will use movw/movt pairs on v7 and later CPUs, and use PC-relative literals otherwise. Reviewed-by: Nicolas Pitre Reviewed-by: Linus Walleij Signed-off-by: Ard Biesheuvel commit 4e79f0211b473f8e1eab8211a9fd50cc41a3a061 Author: Ard Biesheuvel Date: Mon Sep 21 00:10:16 2020 +0200 ARM: p2v: fix handling of LPAE translation in BE mode When running in BE mode on LPAE hardware with a PA-to-VA translation that exceeds 4 GB, we patch bits 39:32 of the offset into the wrong byte of the opcode. So fix that, by rotating the offset in r0 to the right by 8 bits, which will put the 8-bit immediate in bits 31:24. Note that this will also move bit #22 in its correct place when applying the rotation to the constant #0x400000. Fixes: d9a790df8e984 ("ARM: 7883/1: fix mov to mvn conversion in case of 64 bit phys_addr_t and BE") Acked-by: Nicolas Pitre Reviewed-by: Linus Walleij Signed-off-by: Ard Biesheuvel commit 7c91d02068c342918003606bf378b259f37b31ba Author: Srinivas Kandagatla Date: Wed Oct 28 14:20:01 2020 +0000 ASoC: qcom: sm8250: Fix array out of bounds access Static analysis Coverity had detected a potential array out-of-bounds write issue due to the fact that MAX AFE port Id was set to 16 instead of using AFE_PORT_MAX macro. Fix this by properly using AFE_PORT_MAX macro. Fixes: aa2e2785545a ("ASoC: qcom: sm8250: add sound card qrb5165-rb5 support") Reported-by: Colin Ian King Signed-off-by: Srinivas Kandagatla Reviewed-by: Colin Ian King Link: https://lore.kernel.org/r/20201028142001.22431-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit fc2933c133744305236793025b00c2f7d258b687 Author: Ard Biesheuvel Date: Wed Oct 28 14:20:55 2020 +0100 ARM: 9020/1: mm: use correct section size macro to describe the FDT virtual address Commit 149a3ffe62b9dbc3 ("9012/1: move device tree mapping out of linear region") created a permanent, read-only section mapping of the device tree blob provided by the firmware, and added a set of macros to get the base and size of the virtually mapped FDT based on the physical address. However, while the mapping code uses the SECTION_SIZE macro correctly, the macros use PMD_SIZE instead, which means something entirely different on ARM when using short descriptors, and is therefore not the right quantity to use here. So replace PMD_SIZE with SECTION_SIZE. While at it, change the names of the macro and its parameter to clarify that it returns the virtual address of the start of the FDT, based on the physical address in memory. Tested-by: Joel Stanley Tested-by: Marek Szyprowski Signed-off-by: Ard Biesheuvel Signed-off-by: Russell King commit 8aa16335050663357281fb1f1b0483ab91b4d8de Author: Linus Walleij Date: Mon Oct 19 15:44:29 2020 +0200 gpio: stmpe: Fix forgotten refactoring We actually handle the gpio_irq_chip set-up properly now despite what the comment says. Also assign this pointer along with the rest of the gpio_irq_chip setup code. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20201019134429.65563-1-linus.walleij@linaro.org commit f1f37abbe6fc2b1242f78157db76e48dbf9518ee Author: Linus Walleij Date: Mon Oct 19 15:40:46 2020 +0200 gpio: Retire the explicit gpio irqchip code Now that all gpiolib irqchip users have been over to use the irqchip template, we can finally retire the old code path and leave just one way in to the irqchip: set up the template when registering the gpio_chip. For a while we had two code paths for this which was a bit confusing. This brings this work to a conclusion, there is now one way of doing this. Signed-off-by: Linus Walleij Reviewed-by: Andy Shevchenko Cc: Thierry Reding Link: https://lore.kernel.org/r/20201019134046.65101-1-linus.walleij@linaro.org commit 163d1719d30f137c5118b8cbcd8db73b0a580793 Author: Andy Shevchenko Date: Wed Oct 14 13:33:15 2020 +0300 gpiolib: Switch to use compat_need_64bit_alignment_fixup() helper Use the new compat_need_64bit_alignment_fixup() helper to avoid ugly ifdeffery in IOCTL compatibility code. Signed-off-by: Andy Shevchenko Tested-by: Kent Gibson Depends-on: 527c412519eb ("compat: add a compat_need_64bit_alignment_fixup() helper") Link: https://lore.kernel.org/r/20201014103315.82662-1-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 9ef6293c0659de3fa7981e795e70786c89610374 Author: Andy Shevchenko Date: Fri Oct 9 21:43:59 2020 +0300 gpiolib: Use proper type for bias enumerator in gpio_set_bias() First of all, bias has a special type as being a part of enum pin_config_param. Second, 0 is also defined bias which is equivalent to BUS_HOLD. Taking into account above, change type of bias variable and refactor gpio_set_bias() in a way that it doesn't use BUS_HOLD as a place holder. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201009184359.16427-1-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 39613eaad3ceff320da344427a70c655e783475e Author: Viresh Kumar Date: Wed Oct 28 12:16:10 2020 +0530 qcom-geni-se: remove has_opp_table has_opp_table isn't used anymore, remove it. Signed-off-by: Viresh Kumar Link: https://lore.kernel.org/r/08ec1ee1d4252a266956abb5f1e0e0026d753564.1603867487.git.viresh.kumar@linaro.org Signed-off-by: Bjorn Andersson commit d9594e0409651a237903a13c9718df889f43d43b Author: Arnd Bergmann Date: Wed Oct 28 23:14:04 2020 +0900 tomoyo: fix clang pointer arithmetic warning clang warns about additions on NULL pointers being undefined in C: security/tomoyo/securityfs_if.c:226:59: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic] securityfs_create_file(name, mode, parent, ((u8 *) NULL) + key, Change the code to instead use a cast through uintptr_t to avoid the warning. Signed-off-by: Arnd Bergmann Signed-off-by: Tetsuo Handa commit d4fe911741e58e62db1758aa4cd7b09c1064cce1 Merge: ae7e63d1e34a6 ed8780e3f2ecc Author: Tetsuo Handa Date: Wed Oct 28 23:20:42 2020 +0900 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux commit 0d847ce7c17613d63401ac82336ee1d5df749120 Author: Borislav Petkov Date: Wed Oct 21 18:39:47 2020 +0200 x86/setup: Remove unused MCA variables Commit bb8187d35f82 ("MCA: delete all remaining traces of microchannel bus support.") removed the remaining traces of Micro Channel Architecture support but one trace remained - three variables in setup.c which have been unused since 2012 at least. Drop them finally. Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201021165614.23023-1-bp@alien8.de commit caabdd0f59a9771ed095efe3ad5a08867b976ab2 Author: Arnd Bergmann Date: Mon Oct 19 09:35:39 2020 +0200 ctype.h: remove duplicate isdigit() helper gcc warns a few thousand times about the isdigit() shadow: include/linux/ctype.h:26:19: warning: declaration of 'isdigit' shadows a built-in function [-Wshadow] As there is already a compiler builtin, just use that, and make it clear we do that by defining a macro. Unfortunately, clang does not have the isdigit() builtin, so this has to be conditional. Signed-off-by: Arnd Bergmann commit 1fcd009102ee02e217f2e7635ab65517d785da8e Author: Arvind Sankar Date: Tue Oct 27 19:06:48 2020 -0400 x86/mm/ident_map: Check for errors from ident_pud_init() Commit ea3b5e60ce80 ("x86/mm/ident_map: Add 5-level paging support") added ident_p4d_init() to support 5-level paging, but this function doesn't check and return errors from ident_pud_init(). For example, the decompressor stub uses this code to create an identity mapping. If it runs out of pages while trying to allocate a PMD pagetable, the error will be currently ignored. Fix this to propagate errors. [ bp: Space out statements for better readability. ] Fixes: ea3b5e60ce80 ("x86/mm/ident_map: Add 5-level paging support") Signed-off-by: Arvind Sankar Signed-off-by: Borislav Petkov Reviewed-by: Joerg Roedel Acked-by: Kirill A. Shutemov Link: https://lkml.kernel.org/r/20201027230648.1885111-1-nivedita@alum.mit.edu commit 16f283f0a4bbc4cc84be574882706fa0d244186e Author: Kalle Valo Date: Tue Oct 27 15:01:45 2020 +0200 ath11k: remove repeated words in comments and warnings Found by latest checkpatch. Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1603803705-22447-1-git-send-email-kvalo@codeaurora.org commit d2f3f68864a463c138b27bf2ed81f6aae2233ef8 Author: Kalle Valo Date: Tue Oct 27 14:38:08 2020 +0200 ath10k: ath10k_pci_init_irq(): workaround for checkpatch fallthrough warning Latest checkpatch complains about use of fall-through comment. But as this is a switch statement just reword the comment to workaround the problem. Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1603802288-21158-2-git-send-email-kvalo@codeaurora.org commit 762fd1aec588f71873c75b6473eb1736b3a21f4d Author: Kalle Valo Date: Tue Oct 27 14:38:07 2020 +0200 ath10k: remove repeated words in comments Found by latest checkpatch. Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1603802288-21158-1-git-send-email-kvalo@codeaurora.org commit bb3ab2979fd69db23328691cb10067861df89037 Author: Bob Pearson Date: Tue Oct 13 12:07:42 2020 -0500 RDMA/rxe: Compute PSN windows correctly The code which limited the number of unacknowledged PSNs was incorrect. The PSNs are limited to 24 bits and wrap back to zero from 0x00ffffff. The test was computing a 32 bit value which wraps at 32 bits so that qp->req.psn can appear smaller than the limit when it is actually larger. Replace '>' test with psn_compare which is used for other PSN comparisons and correctly handles the 24 bit size. Fixes: 8700e3e7c485 ("Soft RoCE driver") Link: https://lore.kernel.org/r/20201013170741.3590-1-rpearson@hpe.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit 5333499c6014224756e97fa1a1047dfa592d76d3 Author: Jing Xiangfeng Date: Fri Oct 16 15:58:45 2020 +0800 RDMA/core: Fix error return in _ib_modify_qp() Fix to return error code PTR_ERR() from the error handling case instead of 0. Fixes: 51aab12631dd ("RDMA/core: Get xmit slave for LAG") Link: https://lore.kernel.org/r/20201016075845.129562-1-jingxiangfeng@huawei.com Signed-off-by: Jing Xiangfeng Reviewed-by: Maor Gottlieb Signed-off-by: Jason Gunthorpe commit bfb972c5e1cba88c93912f271ed5ecc114e31431 Author: Arnd Bergmann Date: Mon Oct 26 17:15:39 2020 +0100 IB/verbs: avoid nested container_of() Nested container_of() calls work correctly but cause a warning when building with W=2. Invoking it from an inline function like in drivers/infiniband/hw/mlx5/mlx5_ib.h means we get hundreds of warnings like: include/linux/kernel.h:852:8: warning: declaration of '__mptr' shadows a previous local [-Wshadow] 852 | void *__mptr = (void *)(ptr); \ | ^~~~~~ include/rdma/uverbs_ioctl.h:651:11: note: in expansion of macro 'container_of' 651 | (udata ? container_of(container_of(udata, struct uverbs_attr_bundle, \ | ^~~~~~~~~~~~ include/rdma/uverbs_ioctl.h:651:24: note: in expansion of macro 'container_of' 651 | (udata ? container_of(container_of(udata, struct uverbs_attr_bundle, \ | ^~~~~~~~~~~~ drivers/infiniband/hw/mthca/mthca_qp.c:564:35: note: in expansion of macro 'rdma_udata_to_drv_context' 564 | struct mthca_ucontext *context = rdma_udata_to_drv_context( | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/kernel.h:852:8: note: shadowed declaration is here 852 | void *__mptr = (void *)(ptr); \ | ^~~~~~ include/rdma/uverbs_ioctl.h:651:11: note: in expansion of macro 'container_of' 651 | (udata ? container_of(container_of(udata, struct uverbs_attr_bundle, \ | ^~~~~~~~~~~~ drivers/infiniband/hw/mthca/mthca_qp.c:564:35: note: in expansion of macro 'rdma_udata_to_drv_context' 564 | struct mthca_ucontext *context = rdma_udata_to_drv_context( | ^~~~~~~~~~~~~~~~~~~~~~~~~ In file included from : include/linux/kernel.h:852:8: warning: declaration of '__mptr' shadows a previous local [-Wshadow] 852 | void *__mptr = (void *)(ptr); \ | ^~~~~~ Rewrite the macro to use an inline function internally, which makes it more readable and reduces the amount of useless output from make W=2. Fixes: 730623f4a56f ("IB/verbs: Add helper function rdma_udata_to_drv_context") Link: https://lore.kernel.org/r/20201026161549.3709175-1-arnd@kernel.org Signed-off-by: Arnd Bergmann Signed-off-by: Jason Gunthorpe commit da31de35cd2fb78f75788873e0b61e56d4bb1a90 Author: Laurent Vivier Date: Sat Oct 10 02:47:49 2020 +0200 tty: goldfish: use __raw_writel()/__raw_readl() gf_early_console_putchar() uses __raw_writel() but the standard driver uses writel()/readl(). This means we can't use both on the same machine as the device is either big-endian, little-endian or native-endian. As android implementation defines the endianness of the device is the one of the architecture replace all writel()/readl() by __raw_writel()/__raw_readl() https://android.googlesource.com/platform/external/qemu/+/refs/heads/emu-master-dev/hw/char/goldfish_tty.c#222 Signed-off-by: Laurent Vivier Link: https://lore.kernel.org/r/20201010004749.1201695-1-laurent@vivier.eu Signed-off-by: Greg Kroah-Hartman commit 1a460c36078e1c7c979ce2ead581ec9e40f2aac8 Author: Tom Rix Date: Mon Oct 19 10:57:32 2020 -0700 tty: nozomi: remove unneeded break A break is not needed if it is preceded by a return Add explicit fallthrough Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20201019175732.3289-1-trix@redhat.com Signed-off-by: Greg Kroah-Hartman commit 974e454d6f96da0c0ab1b4115b92587dd9406f6a Author: Andy Shevchenko Date: Wed Oct 7 11:46:35 2020 +0300 serial: max310x: Use devm_clk_get_optional() to get the input clock Simplify the code which fetches the input clock by using devm_clk_get_optional(). If no input clock is present devm_clk_get_optional() will return NULL instead of an error which matches the behavior of the old code. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201007084635.594991-2-andy.shevchenko@gmail.com Signed-off-by: Greg Kroah-Hartman commit c808fab604ca62cff19ee6b261211483830807aa Author: Andy Shevchenko Date: Wed Oct 7 11:46:34 2020 +0300 serial: max310x: Make use of device properties Device property API allows to gather device resources from different sources, such as ACPI. Convert the drivers to unleash the power of device property API. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201007084635.594991-1-andy.shevchenko@gmail.com Signed-off-by: Greg Kroah-Hartman commit aee9ddb1d3718d3ba05b50c51622d7792ae749c9 Author: Andrey Konovalov Date: Fri Oct 16 15:57:45 2020 +0200 kcov, usb: only collect coverage from __usb_hcd_giveback_urb in softirq Currently there's a KCOV remote coverage collection section in __usb_hcd_giveback_urb(). Initially that section was added based on the assumption that usb_hcd_giveback_urb() can only be called in interrupt context as indicated by a comment before it. This is what happens when syzkaller is fuzzing the USB stack via the dummy_hcd driver. As it turns out, it's actually valid to call usb_hcd_giveback_urb() in task context, provided that the caller turned off the interrupts; USB/IP does exactly that. This can lead to a nested KCOV remote coverage collection sections both trying to collect coverage in task context. This isn't supported by KCOV, and leads to a WARNING. Change __usb_hcd_giveback_urb() to only call kcov_remote_*() callbacks when it's being executed in a softirq. As the result, the coverage from USB/IP related usb_hcd_giveback_urb() calls won't be collected, but the WARNING is fixed. A potential future improvement would be to support nested remote coverage collection sections, but this patch doesn't address that. Reviewed-by: Dmitry Vyukov Acked-by: Marco Elver Signed-off-by: Andrey Konovalov Link: https://lore.kernel.org/r/f3a7a153f0719cb53ec385b16e912798bd3e4cf9.1602856358.git.andreyknvl@google.com Signed-off-by: Greg Kroah-Hartman commit 5c54cb6c627e8f50f490e6b5656051a5ac29eab4 Author: Hans de Goede Date: Mon Oct 19 20:56:28 2020 +0200 platform/x86: acer-wmi: Add support for SW_TABLET_MODE on Switch devices Add support for SW_TABLET_MODE on the Acer Switch 10 (SW5-012) and the acer Switch 10 (S1003) models. There is no way to detect if this is supported, so this uses DMI based quirks setting force_caps to ACER_CAP_KBD_DOCK (these devices have no other acer-wmi based functionality). The new SW_TABLET_MODE functionality can be tested on devices which are not in the DMI table by passing acer_wmi.force_caps=0x40 on the kernel commandline. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20201019185628.264473-6-hdegoede@redhat.com commit ecbb4dac5f6ccbc5443609ec72021994b662e06d Author: Greg Kroah-Hartman Date: Wed Oct 28 12:31:07 2020 +0100 USB: host: isp1362: delete isp1362_show_regs() No one is calling this function, so it's pointless to keep around as it is triggering automated scanning tools to try to fix up the problems with it using in_interrupt(). So delete the thing. Reported-by: Thomas Gleixner Reported-by: Sebastian Andrzej Siewior Reported-by: Ahmed S. Darwish Reviewed-by: Sebastian Andrzej Siewior Link: https://lore.kernel.org/r/20201028113107.2007742-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 5ed132db5ad4f58156ae9d28219396b6f764a9cb Author: Badhri Jagan Sridharan Date: Tue Oct 20 02:36:18 2020 -0700 dt-bindings: connector: Add property to set initial current cap for FRS This change adds frs-typec-current which allows setting the initial current capability of the new source when vSafe5V is applied during PD3.0 sink Fast Role Swap. Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201020093627.256885-2-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit 96eea5876eb01c35f6eda225f0cdc752a59b6615 Author: Ahmed S. Darwish Date: Mon Oct 19 12:06:34 2020 +0200 usb: xhci: Remove in_interrupt() checks The usage of in_interrupt() in drivers is phased out for various reasons. xhci_set_hc_event_deq() has an !in_interrupt() check which is pointless because the function is only invoked from xhci_mem_init() which is clearly task context as it does GFP_KERNEL allocations. Remove it. xhci_urb_enqueue() prints a debug message if an URB is submitted after the underlying hardware was suspended. But that warning is only issued when in_interrupt() is true, which makes no sense. Simply return -ESHUTDOWN and be done with it. Signed-off-by: Ahmed S. Darwish Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Cc: Mathias Nyman Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Link: https://lore.kernel.org/r/20201019101110.148631116@linutronix.de Signed-off-by: Greg Kroah-Hartman commit 9ca9a2525ddff9618f16a0b880ccff74ffa703cf Author: Ahmed S. Darwish Date: Mon Oct 19 12:06:36 2020 +0200 usbip: Remove in_interrupt() check The usage of in_interrupt() in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be separated or the context be conveyed in an argument passed by the caller, which usually knows the context. usbip_recv() uses in_interrupt() to conditionally print context information for debugging messages. The value is zero as the function is only called from various *_rx_loop() kthread functions. Remove it. Signed-off-by: Ahmed S. Darwish Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Shuah Khan Cc: Valentina Manea Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Link: https://lore.kernel.org/r/20201019101110.332963099@linutronix.de Signed-off-by: Greg Kroah-Hartman commit b02dfc13fa35d2d514dc24261b1cf2589d369852 Author: Ahmed S. Darwish Date: Mon Oct 19 12:06:39 2020 +0200 usb: gadget: pxa27x_udc: Replace in_interrupt() usage in comments The usage of in_interrupt() in drivers is phased out for various reasons. Documenting calling contexts of functions with 'in_interrupt()' or '!in_interrupt()' is imprecise: For a function which might sleep the condition is preemptible task context, which is not what '!in_interrupt()' describes. Replace the context docummentation with plain text and make them match reality. Signed-off-by: Ahmed S. Darwish Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: linux-arm-kernel@lists.infradead.org Cc: linux-usb@vger.kernel.org Link: https://lore.kernel.org/r/20201019101110.636378243@linutronix.de Signed-off-by: Greg Kroah-Hartman commit 82cb8a5c395ea5be20e0fe31a8fe84380a502ca5 Author: Hans de Goede Date: Mon Oct 19 20:56:27 2020 +0200 platform/x86: acer-wmi: Add ACER_CAP_SET_FUNCTION_MODE capability flag Not all devices supporting WMID_GUID3 support the wmid3_set_function_mode() call, leading to errors like these: [ 60.138358] acer_wmi: Enabling RF Button failed: 0x1 - 0xff [ 60.140036] acer_wmi: Enabling Launch Manager failed: 0x1 - 0xff Add an ACER_CAP_SET_FUNCTION_MODE capability flag, so that these calls can be disabled through the new force_caps mechanism. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20201019185628.264473-5-hdegoede@redhat.com commit 39aa009bb66f9d5fbd1e58ca4aa03d6e6f2c9915 Author: Hans de Goede Date: Mon Oct 19 20:56:26 2020 +0200 platform/x86: acer-wmi: Add new force_caps module parameter Add a new force_caps module parameter to allow overriding the drivers builtin capability detection mechanism. This can be used to for example: -Disable rfkill functionality on devices where there is an AA OEM DMI record advertising non functional rfkill switches -Force loading of the driver on devices with a missing AA OEM DMI record Note that force_caps is -1 when unset, this allows forcing the capability field to 0, which results in acer-wmi only providing WMI hotkey handling while disabling all other (led, rfkill, backlight) functionality. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20201019185628.264473-4-hdegoede@redhat.com commit 9feb0763e4985ccfae632de3bb2f029cc8389842 Author: Hans de Goede Date: Mon Oct 19 20:56:25 2020 +0200 platform/x86: acer-wmi: Cleanup accelerometer device handling Cleanup accelerometer device handling: -Drop acer_wmi_accel_destroy instead directly call input_unregister_device. -The information tracked by the CAP_ACCEL flag mirrors acer_wmi_accel_dev being NULL. Drop the CAP flag, this is a preparation change for allowing users to override the capability flags. Dropping the flag stops users from causing a NULL pointer dereference by forcing the capability. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20201019185628.264473-3-hdegoede@redhat.com commit 7c936d8d26afbc74deac0651d613dead2f76e81c Author: Hans de Goede Date: Mon Oct 19 20:56:24 2020 +0200 platform/x86: acer-wmi: Cleanup ACER_CAP_FOO defines Cleanup the ACER_CAP_FOO defines: -Switch to using BIT() macro. -The ACER_CAP_RFBTN flag is set, but it is never checked anywhere, drop it. -Drop the unused ACER_CAP_ANY define. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20201019185628.264473-2-hdegoede@redhat.com commit 6b723f4229efe8b4b86190c97226455816c821ea Author: Hans de Goede Date: Mon Oct 19 20:56:23 2020 +0200 platform/x86: acer-wmi: Drop no-op set_quirks call from find_quirks set_quirks has a "if (!interface) return;" check at its beginning and interface always is NULL when set_quirks is called from find_quirks, so it is a no-op and we can drop it. This also allows dropping the "if (!interface) return;" from set_quirks since set_quirks now always is called with interface != NULL. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20201019185628.264473-1-hdegoede@redhat.com commit ea856ec266c1e6aecd2b107032d5b5d661f0686d Author: Samuel Čavoj Date: Wed Oct 21 00:09:44 2020 +0200 platform/x86: asus-wmi: Add support for SW_TABLET_MODE on UX360 The UX360CA has a WMI device id 0x00060062, which reports whether the lid is flipped in tablet mode (1) or in normal laptop mode (0). Add a quirk (quirk_asus_use_lid_flip_devid) for devices on which this WMI device should be used to figure out the SW_TABLET_MODE state, as opposed to the quirk_asus_use_kbd_dock_devid. Additionally, the device needs to be queried on resume and restore because the firmware does not generate an event if the laptop is put to sleep while in tablet mode, flipped to normal mode, and later awoken. It is assumed other UX360* models have the same WMI device. As such, the quirk is applied to devices with DMI_MATCH(DMI_PRODUCT_NAME, "UX360"). More devices with this feature need to be tested and added accordingly. The reason for using an allowlist via the quirk mechanism is that the new WMI device (0x00060062) is also present on some models which do not have a 360 degree hinge (at least FX503VD and GL503VD from Hans' DSTS collection) and therefore its presence cannot be relied on. Signed-off-by: Samuel Čavoj Cc: Hans de Goede Link: https://lore.kernel.org/r/20201020220944.1075530-1-samuel@cavoj.net Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 41631d3616c36305fef7c0e2e6412538a915dc97 Author: Ahmed S. Darwish Date: Mon Oct 19 12:06:41 2020 +0200 usb: core: Replace in_interrupt() in comments The usage of in_interrupt() in drivers is phased out for various reasons. Various comments use !in_interrupt() to describe calling context for functions which might sleep. That's wrong because the calling context has to be preemptible task context, which is not what !in_interrupt() describes. Replace !in_interrupt() with more accurate plain text descriptions. The comment for usb_hcd_poll_rh_status() is misleading as this function is called from all kinds of contexts including preemptible task context. Remove it as there is obviously no restriction. Signed-off-by: Ahmed S. Darwish Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Alan Stern Cc: linux-usb@vger.kernel.org Link: https://lore.kernel.org/r/20201019101110.851821025@linutronix.de Signed-off-by: Greg Kroah-Hartman commit cce866155b5b96be83fa5ce8c7a56a1b0dd86cac Author: Ahmed S. Darwish Date: Mon Oct 19 12:06:40 2020 +0200 usb: gadget: udc: Remove in_interrupt()/in_irq() from comments The usage of in_irq()/in_interrupt() in drivers is phased out for various reasons. The context description for usb_gadget_giveback_request() is misleading as in_interupt() means: hard interrupt or soft interrupt or bottom half disabled regions. But it's also invoked from task context when endpoints are torn down. Remove it as it's more confusing than helpful. Replace also the in_irq() comment with plain text. Signed-off-by: Ahmed S. Darwish Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Alan Stern Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Link: https://lore.kernel.org/r/20201019101110.744172050@linutronix.de Signed-off-by: Greg Kroah-Hartman commit 2e7e9b64be4356d9c67538cc88bff16a7f8850bb Author: Thomas Gleixner Date: Mon Oct 19 12:06:38 2020 +0200 USB: host: ehci-pmcmsp: Cleanup usb_hcd_msp_remove() usb_hcd_msp_remove() has a pdev argument which isn't used and the function is used only within this file. Remove pdev and make usb_hcd_msp_remove() static. Signed-off-by: Thomas Gleixner Acked-by: Alan Stern Link: https://lore.kernel.org/r/20201019101110.530302737@linutronix.de Signed-off-by: Greg Kroah-Hartman commit 19220bac2c134f25ce06e77da746793411536af6 Author: Ahmed S. Darwish Date: Mon Oct 19 12:06:37 2020 +0200 usb: hosts: Remove in_interrupt() from comments The usage of in_interrupt() in drivers is phased out for various reasons. Various comments use !in_interrupt() to describe calling context for probe() and remove() functions. That's wrong because the calling context has to be preemptible task context, which is not what !in_interrupt() describes. Cleanup the comments. While at it add the missing kernel doc argument descriptors. Signed-off-by: Ahmed S. Darwish Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Krzysztof Kozlowski Acked-by: Alan Stern Cc: linux-usb@vger.kernel.org Cc: linux-omap@vger.kernel.org Cc: Kukjin Kim Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Link: https://lore.kernel.org/r/20201019101110.439968251@linutronix.de Signed-off-by: Greg Kroah-Hartman commit 619821936203f0577aa88cf30d31b0202650a745 Author: Tom Rix Date: Mon Oct 19 06:32:12 2020 -0700 platform/x86: remove unneeded break A break is not needed if it is preceded by a return Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20201019133212.12671-1-trix@redhat.com Signed-off-by: Hans de Goede commit 726c8277bc5e67799f2ac3ca7fc795d4bf07264f Author: Thomas Gleixner Date: Mon Oct 19 12:06:42 2020 +0200 usb: atm: Replace in_interrupt() usage in comment in_interrupt() is a pretty vague context description as it means: hard interrupt, soft interrupt or bottom half disabled regions. Replace the vague comment with a proper reasoning why spin_lock_irqsave() needs to be used. Signed-off-by: Ahmed S. Darwish Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Signed-off-by: Duncan Sands Cc: linux-usb@vger.kernel.org Link: https://lore.kernel.org/r/20201019101110.944939915@linutronix.de Signed-off-by: Greg Kroah-Hartman commit 862ee699fefe1e6d6f2c1518395f0b999b8beb15 Author: Thomas Gleixner Date: Mon Oct 19 12:06:30 2020 +0200 USB: sisusbvga: Make console support depend on BROKEN The console part of sisusbvga is broken vs. printk(). It uses in_atomic() to detect contexts in which it cannot sleep despite the big fat comment in preempt.h which says: Do not use in_atomic() in driver code. in_atomic() does not work on kernels with CONFIG_PREEMPT_COUNT=n which means that spin/rw_lock held regions are not detected by it. There is no way to make this work by handing context information through to the driver and this only can be solved once the core printk infrastructure supports sleepable console drivers. Make it depend on BROKEN for now. Fixes: 1bbb4f2035d9 ("[PATCH] USB: sisusb[vga] update") Signed-off-by: Thomas Gleixner Cc: Thomas Winischhofer Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20201019101109.603244207@linutronix.de Signed-off-by: Greg Kroah-Hartman commit 517c4c44b32372d2fdf4421822e21083c45e89f9 Author: Al Cooper Date: Mon Oct 12 16:00:07 2020 -0400 usb: Add driver to allow any GPIO to be used for 7211 USB signals The Broadcom 7211 has new functionality that allows some USB low speed side band signals, that go from the XHCI host controller to pins on the chip, to be remapped to use any GPIO pin instead of the limited set selectable by hardware. This can be done without changing the standard driver for the host controller. There is currently support for three USB signals, PWRON, VBUS_PRESENT and PWRFLT. This driver will allow the remapping of any of these three signals based on settings in the Device Tree node for the driver. The driver was written so that it could handle additional signals added in the future by just adding the correct properties to the DT node. Below is an example of a DT node that would remap all three signals: usb_pinmap: usb-pinmap@22000d0 { compatible = "brcm,usb-pinmap"; reg = <0x22000d0 0x4>; in-gpios = <&gpio 18 0>, <&gpio 19 0>; brcm,in-functions = "VBUS", "PWRFLT"; brcm,in-masks = <0x8000 0x40000 0x10000 0x80000>; out-gpios = <&gpio 20 0>; brcm,out-functions = "PWRON"; brcm,out-masks = <0x20000 0x800000 0x400000 0x200000>; interrupts = <0x0 0xb2 0x4>; }; Signed-off-by: Al Cooper Link: https://lore.kernel.org/r/20201012200007.8862-3-alcooperx@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9df556d774fda1eb9214c7ab3f1e5d0ec1265bce Author: Al Cooper Date: Mon Oct 12 16:00:06 2020 -0400 dt-bindings: Add support for Broadcom USB pin map driver Add DT bindings for the Broadcom USB pin map driver. This driver allows some USB input and output signals to be mapped to any GPIO instead of the normal dedicated pins to/from the XHCI controller. Reviewed-by: Rob Herring Signed-off-by: Al Cooper Link: https://lore.kernel.org/r/20201012200007.8862-2-alcooperx@gmail.com Signed-off-by: Greg Kroah-Hartman commit 12cb474a0f8e78228a166a665f55147b7d79ae2e Author: Tom Rix Date: Mon Oct 26 11:58:12 2020 -0700 usb: host: xhci-mem: remove unneeded break A break is not needed if it is preceded by a return. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20201026185812.1427461-1-trix@redhat.com Signed-off-by: Greg Kroah-Hartman commit e9b0c20441294717c764c80c171f37c5a5d82ac9 Author: Tom Rix Date: Mon Oct 26 12:04:57 2020 -0700 usb: storage: freecom: remove unneeded break A break is not needed if it is preceded by a return. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20201026190457.1428516-1-trix@redhat.com Signed-off-by: Greg Kroah-Hartman commit 907412c0bb2340e699b5bd1eeafa9d597d2d3045 Author: Tom Rix Date: Mon Oct 26 12:28:00 2020 -0700 usb: misc: iowarrior: remove unneeded break A break is not needed if it is preceded by a goto. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20201026192800.1431547-1-trix@redhat.com Signed-off-by: Greg Kroah-Hartman commit 23eac8531acdec3bdbd920d5ec0d7747508eaaab Author: Sudip Mukherjee Date: Sun Oct 11 21:50:08 2020 +0100 usb: host: ehci-sched: add comment about find_tt() not returning error Add a comment explaining why find_tt() will not return error even though find_tt() is checking for NULL and other errors. Acked-by: Alan Stern Signed-off-by: Sudip Mukherjee Link: https://lore.kernel.org/r/20201011205008.24369-1-sudipm.mukherjee@gmail.com Signed-off-by: Greg Kroah-Hartman commit dac76c17d255076214fb205f192d4328ed012891 Author: Hans de Goede Date: Thu Oct 15 21:49:49 2020 +0200 platform/x86: touchscreen_dmi: Add info for the Predia Basic tablet Add touchscreen info for the Predia Basic tablet. Signed-off-by: Hans de Goede Acked-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201015194949.50566-1-hdegoede@redhat.com commit 1a218d312e65ec396b2739056a8ea78493015f21 Author: Shravan Kumar Ramani Date: Thu Oct 8 08:37:17 2020 -0400 platform/mellanox: mlxbf-pmc: Add Mellanox BlueField PMC driver The performance modules in BlueField are present in several hardware blocks and each block provides access to these stats either through counters that can be programmed to monitor supported events or through memory-mapped registers that hold the relevant information. The hardware blocks that include a performance module are: * Tile (block containing 2 cores and a shared L2 cache) * TRIO (PCIe root complex) * MSS (Memory Sub-system containing the Memory Controller and L3 cache) * GIC (Interrupt controller) * SMMU (System Memory Management Unit) The mlx_pmc driver provides access to all of these performance modules through a hwmon sysfs interface. v2 --> v3 Update copyright info. v1 --> v2 Remove unused headers. Add comma to arrays where last line is not a termination. Use kstrtoint in place of sscanf. UUID manipulation follows drivers/platform/mellanox/mlxbf-bootctl.c Signed-off-by: Shravan Kumar Ramani Reviewed-by: Vadim Pasternak Reviewed-by: Jiri Pirko Link: https://lore.kernel.org/r/4e19a1e5bf4197ad27fc57981fd280eaebd23577.1602160468.git.shravankr@nvidia.com Signed-off-by: Hans de Goede commit 232b67c399424948107fbffe4402a102121a2622 Author: Tom Rix Date: Mon Oct 19 12:16:31 2020 -0700 mtd: remove unneeded break A break is not needed if it is preceded by a return Signed-off-by: Tom Rix Acked-by: Richard Weinberger Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201019191631.9604-1-trix@redhat.com commit e8a60aa7404bfef37705da5607c97737073ac38d Author: Divya Bharathi Date: Tue Oct 27 19:19:44 2020 +0530 platform/x86: Introduce support for Systems Management Driver over WMI for Dell Systems The Dell WMI Systems Management Driver provides a sysfs interface for systems management to enable BIOS configuration capability on certain Dell Systems. This driver allows user to configure Dell systems with a uniform common interface. To facilitate this, the patch introduces a generic way for driver to be able to create configurable BIOS Attributes available in Setup (F2) screen. Cc: Hans de Goede Cc: Andy Shevchenko Cc: mark gross Co-developed-by: Mario Limonciello Signed-off-by: Mario Limonciello Co-developed-by: Prasanth KSR Signed-off-by: Prasanth KSR Signed-off-by: Divya Bharathi Link: https://lore.kernel.org/r/20201027134944.316730-1-divya.bharathi@dell.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 7e2ac9deb1d66401291d456aa27f081bbb9071de Author: Michael Walle Date: Thu Oct 1 11:11:31 2020 +0200 arm64: dts: freescale: sl28: add CAN node The module supports one CAN controller. Enable it. Signed-off-by: Michael Walle Signed-off-by: Shawn Guo commit 04fa4f03e3533f51b4db19cb487435f5862a0514 Author: Michael Walle Date: Thu Oct 1 11:11:30 2020 +0200 arm64: dts: ls1028a: add missing CAN nodes The LS1028A has two FlexCAN controller. These are compatible with the ones from the LX2160A. Add the nodes. The first controller was tested on the Kontron sl28 board. Signed-off-by: Michael Walle Signed-off-by: Shawn Guo commit 95de5094f5ac50b6f355f4e7dffcb6f34bd5dada Author: Peng Fan Date: Tue Sep 22 18:24:29 2020 +0800 firmware: imx: add dummy functions add dummy functions to avoid build failure when header files are included, but drivers are not built. Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit c071ab8c20748873183d5f210aa105d6a3e2d56a Author: Chris Wilson Date: Tue Oct 27 18:47:59 2020 +0000 drm/i915/gem: Avoid synchronous binds deep within locks On bxt, we require a VT'd w/a to serialise all GGTT updates with memory transfers, and use stop_machine() for this purpose. stop_machine() is a global serialisation barrier and so dangerous to use from within critical sections, as the stop_machine() will wait for all cpus to enter the stop_machine callback, and those cpus may be waiting for the critical section already held. Fixes: d7085b0faac8 ("drm/i915/gem: Poison stolen pages before use") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20201027184759.29888-1-chris@chris-wilson.co.uk commit c2ec4a6e5410096d41bec795008a76770d9962dc Author: Amarjargal Gundjalam Date: Wed Oct 28 01:51:16 2020 +0800 staging: vc04_services: fix quoted string split across lines Fix checkpatch warning "fix quoted string split across lines". Signed-off-by: Amarjargal Gundjalam Link: https://lore.kernel.org/r/20201027175117.32826-3-amarjargal16@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3da8757576ef789ef8d74dded57478b48bf1ecdf Author: Amarjargal Gundjalam Date: Wed Oct 28 01:51:15 2020 +0800 staging: vc04_services: fix block comment style Fix block comments to adhere to the kernel coding style. Signed-off-by: Amarjargal Gundjalam Link: https://lore.kernel.org/r/20201027175117.32826-2-amarjargal16@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8f870aab80b04153222494d03f9b42c2b9a7ef38 Author: Manuel Palenzuela Date: Wed Oct 28 02:17:16 2020 +0000 Staging: rtl8723bs: core: rtw_cmd: Fixed multiple brace coding style issues Fixed multiple brace coding style issues in rtw_cmd.c Signed-off-by: Manuel Palenzuela Link: https://lore.kernel.org/r/20201028021716.622-1-manuelpalenzuelamerino@gmail.com Signed-off-by: Greg Kroah-Hartman commit 73142e110b4c8fa905f959bcf6789a1e191d4aff Author: Andy Shevchenko Date: Tue Oct 27 20:34:27 2020 +0200 staging: fieldbus: Use %pM format specifier for MAC addresses Convert to %pM instead of using custom code. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201027183427.25736-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 0d31d5a96b8c6c5914995f4352c2ab50e50a1865 Author: Stefan Riedmueller Date: Tue Sep 22 11:23:10 2020 +0200 ARM: dts: imx6: phytec: Add eeprom pagesize Defining the EEPROM pagesize can increase the write speed significantly. Set it to the pagesize stated in the EEPROM's datasheet for phyCORE-i.MX 6UL, phyCORE-i.MX 6 and phyFLEX-i.MX 6. Signed-off-by: Stefan Riedmueller Signed-off-by: Shawn Guo commit f0e24ec59076df374d4e8f15a9658e140858afb0 Author: Stefan Riedmueller Date: Tue Sep 22 11:23:09 2020 +0200 ARM: dts: imx6: phytec: Set correct eeprom compatible Set the correct EEPROM compatible for phyCORE-i.MX 6 and phyFLEX-i.MX 6, as stated in the device tree bindings. Signed-off-by: Stefan Riedmueller Signed-off-by: Shawn Guo commit a8d54a39e95f5cff7ba25b344cbab9b598bbf937 Author: Stefan Riedmueller Date: Tue Sep 22 11:23:08 2020 +0200 ARM: dts: imx6ul: segin: Fix stmpe touchscreen subnode name The touchscreen subnode name needs to be stmpe_touchscreen as mentioned in the dt-bindings. Signed-off-by: Stefan Riedmueller Signed-off-by: Shawn Guo commit 42ab1ba8873d0b144a9417231e7b15a26b6137ad Author: Matthias Schiffer Date: Fri Sep 18 13:29:42 2020 +0200 ARM: dts: imx7-mba7: set dr_mode to otg on usbotg1 USBOTG1 has a Micro-USB port that can be used in host mode (using an OTG cable) or device mode. Signed-off-by: Matthias Schiffer Signed-off-by: Shawn Guo commit b8a4f64a3277fd30b1ee04bacf03d0dd3f5ade88 Author: Matthias Schiffer Date: Fri Sep 18 13:29:41 2020 +0200 ARM: dts: imx7-mba7: specify USB over-current polarity Add over-current-active-low to usbotg1. Signed-off-by: Matthias Schiffer Signed-off-by: Shawn Guo commit 9af6702fa1e3ecdbed8c297e3c08103c2ceda112 Author: Matthias Schiffer Date: Fri Sep 18 13:29:40 2020 +0200 ARM: dts: imx7-mba7: enable RS485 on UART7 The UART7 interface is connected to a full-duplex RS485 transceiver. Signed-off-by: Matthias Schiffer Signed-off-by: Shawn Guo commit 0d5e50cf30d7c6ec56013234595ddefdaba64593 Author: Matthias Schiffer Date: Fri Sep 18 13:29:38 2020 +0200 ARM: dts: imx7-mba7: add audio support The MBa7x is equipped with a TI TLV320AIC3204 audio codec. Signed-off-by: Matthias Schiffer Signed-off-by: Shawn Guo commit ecb5ba9f112424ed43907cd95ddf6a5eb8c0e6fe Author: Matthias Schiffer Date: Fri Sep 18 13:29:37 2020 +0200 ARM: dts: imx7-mba7: update MMC aliases Together with the recently merged support for alias-based MMC host numbering, this makes the MMC devices names match what the bootloader expects. Signed-off-by: Matthias Schiffer Signed-off-by: Shawn Guo commit d50765205d8e59e4116a9dc512305cef15e70ad2 Author: Matthias Schiffer Date: Fri Sep 18 13:29:36 2020 +0200 ARM: dts: imx7-mba7: configure watchdog The external watchdog reset is necessary, as the internal reset is unreliable on i.MX7. Signed-off-by: Matthias Schiffer Signed-off-by: Shawn Guo commit e70f9b9c25eae1b1624a976773817470c51d1e9f Author: Matthias Schiffer Date: Fri Sep 18 13:29:35 2020 +0200 ARM: dts: imx7-mba7: disable ethernet PHY clock outputs The clock outputs are not connected. Disable them to improve EMI behaviour. Signed-off-by: Matthias Schiffer Signed-off-by: Shawn Guo commit 2b01d7a1571b8558dcadee84d575ab31bf39efa2 Author: Matthias Schiffer Date: Fri Sep 18 13:29:34 2020 +0200 ARM: dts: imx7-mba7: remove unsupported PHY LED setup These properties were never supported by the DP83867, and a patch implementing them was rejected in favor of a different solution. Remove them. Signed-off-by: Matthias Schiffer Signed-off-by: Shawn Guo commit f7defed53e35fada087a6bde29810be74576b86e Author: Matthias Schiffer Date: Fri Sep 18 13:29:33 2020 +0200 ARM: dts: imx7-mba7: drop incorrect num-chipselects property This property was never set correctly; it should have been num-cs. As num-cs support is being removed as well, simply drop it. Signed-off-by: Matthias Schiffer Signed-off-by: Shawn Guo commit 68e680c5faddb207ac4ebb50c88bcc88284bcd5f Author: Matthias Schiffer Date: Fri Sep 18 13:29:32 2020 +0200 ARM: dts: imx7-mba7: update compatible strings Include the SoM compatible string. Signed-off-by: Matthias Schiffer Signed-off-by: Shawn Guo commit 7ead9dbb6ff475ec616adbb97dedcb26400fbb0c Author: Matthias Schiffer Date: Fri Sep 18 13:29:30 2020 +0200 dt-bindings: arm: fsl: update TQ-Systems SoMs and boards based on i.MX7 Introduce compatible strings for the TQMa7x SoMs. Signed-off-by: Matthias Schiffer Reviewed-by: Rob Herring Signed-off-by: Shawn Guo commit 859d74f65d8734df8f41a923496eca5df7e04f29 Author: Lucas De Marchi Date: Mon Oct 26 21:46:17 2020 -0700 drm/i915/display: remove debug message from error path First check in the function is if swsci() is supported. All the error paths are easy to figure out the reason, so remove the extra debug message: it's normal not to support swsci() e.g. in dgfx. v2: Rather than special case dgfx, just remove the debug message (from Ville) Signed-off-by: Lucas De Marchi Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20201027044618.719064-2-lucas.demarchi@intel.com commit 949ab9d229a23025c7afa4e357f9affadb3fa94c Author: Lucas De Marchi Date: Mon Oct 26 21:46:16 2020 -0700 drm/i915: Guard debugfs against invalid access without display Do not create the display debugfs files when we don't have display. Based on previous patch by José Souza. Cc: José Roberto de Souza Cc: Jani Nikula Signed-off-by: Lucas De Marchi Reviewed-by: Jani Nikula Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20201027044618.719064-1-lucas.demarchi@intel.com commit faa3b6dfd2527eace517e0cd1b147154c780d582 Author: Jagan Teki Date: Fri Aug 28 21:33:02 2020 +0530 ARM: dts: imx6q-icore-ofcap10: Use 10.1" Ampire panel compatible Adding display timings directly on device tree files make it difficult to maintain as a same copy of timings may exist on different files or panel-simple driver. We have a panel-simple driver for this particular usage so supporting on this driver will help to use the same timings on any device tree files if the board mounted on a similar vendor display. Engicam C.TOUCH OF 10.1" LCD board uses Ampire 10.1" TFT LCD and it has supported by panel-simple already, so simply use that binding. Signed-off-by: Jagan Teki Signed-off-by: Shawn Guo commit 9e3ed6fa024c7a1be3c41f64da779072c2b85b7f Author: George Liu Date: Thu Oct 22 16:10:02 2020 +0800 ARM: dts: Fix label address for 64MiB OpenBMC flash layout Signed-off-by: George Liu Reviewed-by: John Wang Acked-by: Andrew Jeffery Link: https://lore.kernel.org/r/20201022081002.2665132-1-liuxiwei@inspur.com Signed-off-by: Joel Stanley commit abe75295ba70bd1c245977c200ce65575dbaf081 Author: John Wang Date: Wed Oct 14 16:30:57 2020 +0800 ARM: dts: aspeed: g220a: Add some gpios Add GPIO STRAP_BMC_BATTERY_GPIOS5, which is used for battery adc sensor. Change the INTRUDER_N to CHASSIS_INTRUSION, to make it more meaningful. Signed-off-by: John Wang Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20201014083057.1026-1-wangzhiqiang.bj@bytedance.com Signed-off-by: Joel Stanley commit b2826bdf910dccee07bede625c2005154bb6f698 Author: Lotus Xu Date: Tue Sep 29 14:39:55 2020 +0800 ARM: dts: aspeed: Add Bytedance g220a BMC machine The g220a is a server platform with an ASPEED AST2500 BMC. Signed-off-by: Lotus Xu Signed-off-by: John Wang Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20200929063955.1206-2-wangzhiqiang.bj@bytedance.com Signed-off-by: Joel Stanley commit e81059a5e4d8a4227b58a2bc7a5041d545a587a3 Author: John Wang Date: Tue Sep 29 14:39:54 2020 +0800 ARM: dts: Add 64MiB OpenBMC flash layout This is an alternate layout used by OpenBMC systems The division of space is as follows: u-boot + env: 0.5MB kernel/FIT: 5MB rofs: 42.5MB rwfs: 16MB Signed-off-by: John Wang Link: https://lore.kernel.org/r/20200929063955.1206-1-wangzhiqiang.bj@bytedance.com Signed-off-by: Joel Stanley commit 9e1cc9679776f5b9e42481d392b1550753ebd084 Author: Joel Stanley Date: Tue Sep 22 16:12:34 2020 +0930 ARM: dts: aspeed: s2600wf: Fix VGA memory region location The VGA memory region is always from the top of RAM. On this board, that is 0x80000000 + 0x20000000 - 0x01000000 = 0x9f000000. This was not an issue in practice as the region is "reserved" by the vendor's u-boot reducing the amount of available RAM, and the only user is the host VGA device poking at RAM over PCIe. That is, nothing from the ARM touches it. It is worth fixing as developers copy existing device trees when building their machines, and the XDMA driver does use the memory region from the ARM side. Fixes: c4043ecac34a ("ARM: dts: aspeed: Add S2600WF BMC Machine") Reported-by: John Wang Link: https://lore.kernel.org/r/20200922064234.163799-1-joel@jms.id.au Signed-off-by: Joel Stanley commit e3b123542cdc324d85a061356fbb6bb849bcb941 Author: Konstantin Aladyshev Date: Tue Oct 27 15:37:20 2020 +0300 ARM: dts: aspeed: amd-ethanolx: Update KCS nodes to use v2 binding KCS nodes compatible property was changed in the dtsi to use v2 binding before ethanolx was merged, making the ethanolx device tree incorrect. Update it to use the new binding so the driver loads. Fixes: fa4c8ec6feaa ("ARM: dts: aspeed: Change KCS nodes to v2 binding") Signed-off-by: Konstantin Aladyshev Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20201027123722.2935-1-aladyshev22@gmail.com Signed-off-by: Joel Stanley commit 886f82ce9f1f4559c139fdb2d79d158999ca38cd Author: Billy Tsai Date: Mon Oct 12 11:31:48 2020 +0800 ARM: dts: aspeed-g6: Fix the GPIO memory size The GPIO controller is a GPIO controller followed by some SGPIO controllers, which are a different type of device with their own binding and drivers. Make the gpio node cover the only conventional GPIO controller. Fixes: 8dbcb5b709b9 ("ARM: dts: aspeed-g6: Add gpio devices") Signed-off-by: Billy Tsai Reviewed-by: Andrew Jeffery Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20201012033150.21056-2-billy_tsai@aspeedtech.com Signed-off-by: Joel Stanley commit 44141f58e14317853698f994ca5c3785a0c230d0 Author: bauen1 Date: Fri Oct 9 14:47:11 2020 +0200 selinux: allow dontauditx and auditallowx rules to take effect without allowx This allows for dontauditing very specific ioctls e.g. TCGETS without dontauditing every ioctl or granting additional permissions. Now either an allowx, dontauditx or auditallowx rules enables checking for extended permissions. Signed-off-by: Jonathan Hettwer Signed-off-by: Paul Moore commit 83370b31a915493231e5b9addc72e4bef69f8d31 Author: Tianyue Ren Date: Fri Oct 9 09:36:30 2020 +0800 selinux: fix error initialization in inode_doinit_with_dentry() Mark the inode security label as invalid if we cannot find a dentry so that we will retry later rather than marking it initialized with the unlabeled SID. Fixes: 9287aed2ad1f ("selinux: Convert isec->lock into a spinlock") Signed-off-by: Tianyue Ren [PM: minor comment tweaks] Signed-off-by: Paul Moore commit cd29296fdfca919590e4004a7e4905544f4c4a32 Author: Robert Hancock Date: Mon Oct 26 11:58:02 2020 -0600 net: phylink: disable BMCR_ISOLATE in phylink_mii_c22_pcs_config The Xilinx PCS/PMA PHY requires that BMCR_ISOLATE be disabled for proper operation in 1000BaseX mode. It should be safe to ensure this bit is disabled in phylink_mii_c22_pcs_config in all cases. Signed-off-by: Robert Hancock Reviewed-by: Russell King Link: https://lore.kernel.org/r/20201026175802.1332477-1-robert.hancock@calian.com Signed-off-by: Jakub Kicinski commit 6d915476e67d99b73a57bceb83cff1cf153d8bf6 Author: Richard Guy Briggs Date: Tue Sep 22 08:44:50 2020 -0400 audit: trigger accompanying records when no rules present When there are no audit rules registered, mandatory records (config, etc.) are missing their accompanying records (syscall, proctitle, etc.). This is due to audit context dummy set on syscall entry based on absence of rules that signals that no other records are to be printed. Clear the dummy bit if any record is generated, open coding this in audit_log_start(). The proctitle context and dummy checks are pointless since the proctitle record will not be printed if no syscall records are printed. The fds array is reset to -1 after the first syscall to indicate it isn't valid any more, but was never set to -1 when the context was allocated to indicate it wasn't yet valid. Check ctx->pwd in audit_log_name(). The audit_inode* functions can be called without going through getname_flags() or getname_kernel() that sets audit_names and cwd, so set the cwd in audit_alloc_name() if it has not already been done so due to audit_names being valid and purge all other audit_getcwd() calls. Revert the LSM dump_common_audit_data() LSM_AUDIT_DATA_* cases from the ghak96 patch since they are no longer necessary due to cwd coverage in audit_alloc_name(). Thanks to bauen1 for reporting LSM situations in which context->cwd is not valid, inadvertantly fixed by the ghak96 patch. Please see upstream github issue https://github.com/linux-audit/audit-kernel/issues/120 This is also related to upstream github issue https://github.com/linux-audit/audit-kernel/issues/96 Signed-off-by: Richard Guy Briggs Signed-off-by: Paul Moore commit cbb5262192d9a367d89d24e54388f54069ffd2b8 Author: Mauro Carvalho Chehab Date: Fri Oct 23 18:33:38 2020 +0200 audit: fix a kernel-doc markup typo: kauditd_print_skb -> kauditd_printk_skb Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Paul Moore commit 3aefd7d6ea05a1a573a26c20e474d36c218016cd Author: Yi Li Date: Tue Oct 27 13:59:04 2020 +0800 net: core: Use skb_is_gso() in skb_checksum_help() No functional changes, just minor refactoring. Signed-off-by: Yi Li Link: https://lore.kernel.org/r/20201027055904.2683444-1-yili@winhong.com Signed-off-by: Jakub Kicinski commit b2f1c3db28870d88d1a19aa86a8374e7725d62c5 Author: Vincenzo Frascino Date: Mon Oct 26 11:49:45 2020 +0000 kselftest: Extend vdso correctness test to clock_gettime64 With the release of Linux 5.1 has been added a new syscall, clock_gettime64, that provided a 64 bit time value for a specified clock_ID to make the kernel Y2038 safe on 32 bit architectures. Extend the vdso correctness test to cover the newly exposed vdso function. Cc: Shuah Khan Signed-off-by: Vincenzo Frascino Acked-by: Thomas Gleixner Signed-off-by: Shuah Khan commit c7e5789b24d36dd5dddd36ea2b99280a606cac42 Author: Vincenzo Frascino Date: Mon Oct 26 11:49:44 2020 +0000 kselftest: Move test_vdso to the vDSO test suite Move test_vdso from x86 to the vDSO test suite. Suggested-by: Andy Lutomirski Cc: Shuah Khan Signed-off-by: Vincenzo Frascino Acked-by: Thomas Gleixner Signed-off-by: Shuah Khan commit 03f55c7952c92d8577d6e9bc695f3fd20032cfd9 Author: Vincenzo Frascino Date: Mon Oct 26 11:49:43 2020 +0000 kselftest: Extend vDSO selftest to clock_getres The current version of the multiarch vDSO selftest verifies only gettimeofday. Extend the vDSO selftest to clock_getres, to verify that the syscall and the vDSO library function return the same information. The extension has been used to verify the hrtimer_resoltion fix. Cc: Shuah Khan Signed-off-by: Vincenzo Frascino Acked-by: Thomas Gleixner Signed-off-by: Shuah Khan commit 693f5ca08ca0767b407b7ca634dbf1b783676ec3 Author: Vincenzo Frascino Date: Mon Oct 26 11:49:42 2020 +0000 kselftest: Extend vDSO selftest The current version of the multiarch vDSO selftest verifies only gettimeofday. Extend the vDSO selftest to the other library functions: - time - clock_getres - clock_gettime The extension has been used to verify the unified vdso library on the supported architectures. Cc: Shuah Khan Signed-off-by: Vincenzo Frascino Acked-by: Thomas Gleixner Signed-off-by: Shuah Khan commit 40723419f4079d0c7de98d0f3149db915557b55a Author: Vincenzo Frascino Date: Mon Oct 26 11:49:41 2020 +0000 kselftest: Enable vDSO test on non x86 platforms Currently the vDSO tests are built only on x86 platforms and cannot be cross compiled. Enable vDSO TARGET for all the platforms. Future patches will extend the tests. Cc: Shuah Khan Signed-off-by: Vincenzo Frascino Acked-by: Thomas Gleixner Signed-off-by: Shuah Khan commit 585bd812de4eb0e412e504da81d2554fb03ae652 Author: Xu Wang Date: Fri Oct 23 09:21:07 2020 +0000 net: microchip: Remove unneeded variable ret Remove unneeded variable ret used to store return value. Signed-off-by: Xu Wang Link: https://lore.kernel.org/r/20201023092107.28065-1-vulab@iscas.ac.cn Signed-off-by: Jakub Kicinski commit b6bf4776d9e2ed4b2552d1c252fff8de3786309a Author: Xu Wang Date: Fri Oct 23 16:55:33 2020 +0800 vxge: remove unnecessary cast in kfree() Remove unnecessary cast in the argument to kfree. Signed-off-by: Xu Wang Link: https://lore.kernel.org/r/20201023085533.4792-1-vulab@iscas.ac.cn Signed-off-by: Jakub Kicinski commit 827b5e6ec1144a34de27247a45a2f78b25d753a3 Author: Lina Iyer Date: Wed Oct 7 22:09:07 2020 -0600 soc: qcom: Kconfig: make RPMH match Command DB setting RPMH and drivers that use RPMH APIs need Command DB API to find the dynamic resource information. Let's match the RPMH to match the Command DB configuration. This should fix undefined symbol references reported by CI : aarch64-linux-ld: drivers/clk/qcom/clk-rpmh.o: in function `clk_rpmh_probe': >> clk-rpmh.c:(.text+0xac): undefined reference to `cmd_db_read_addr' >> aarch64-linux-ld: clk-rpmh.c:(.text+0xc0): undefined reference to `cmd_db_read_aux_data' aarch64-linux-ld: drivers/soc/qcom/rpmh-rsc.o: in function `rpmh_rsc_probe': >> rpmh-rsc.c:(.text+0x42c): undefined reference to `cmd_db_ready' aarch64-linux-ld: drivers/regulator/qcom-rpmh-regulator.o: in function `rpmh_regulator_probe': >> qcom-rpmh-regulator.c:(.text+0x3e0): undefined reference to `cmd_db_read_addr' Cc: Todd Kjos Cc: John Stultz Cc: Maulik Shah Reported-by: kernel test robot Signed-off-by: Lina Iyer Link: https://lore.kernel.org/r/20201008040907.7036-1-ilina@codeaurora.org Signed-off-by: Bjorn Andersson commit a87a9a73d0e28351cd10943e603ea8584a406b74 Author: Alex Deucher Date: Mon Oct 26 12:11:29 2020 -0400 drm/amdgpu/display: re-add surface size calculation in dcn30_hwseq.c This is required for MALL. Was accidently removed in PSR update. Fixes: 48e48e598478 ("drm/amd/display: Disable idle optimization when PSR is enabled") Fixes: 52f2e83e2fe5 ("drm/amdgpu/display: add MALL support (v2)") Acked-by: Slava Abramov Signed-off-by: Alex Deucher commit fddc611ca3a09932196c192116a596dc67206eb5 Author: Sandeep Raghuraman Date: Fri Oct 9 13:19:19 2020 +0530 drm/radeon: Expose vddc through hwmon Create hwmon attribute for vddc, that uses previously declared get_current_vddc() callback if there's an implementation available. Also hides vddc, if there is no implementation for the current chipset (as per Alexander Deucher's suggestion). Signed-off-by: Sandeep Raghuraman Signed-off-by: Alex Deucher commit c57a8308e2cc2e83a268c0123ff2060f30a38950 Author: Sandeep Raghuraman Date: Fri Oct 9 13:16:09 2020 +0530 drm/radeon: Add implementation of get_current_vddc for Sumo Add implementation of get_current_vddc() callback for Sumo. Signed-off-by: Sandeep Raghuraman Signed-off-by: Alex Deucher commit ca22f3beb6f9a9c50728994c73044d4dfabea17d Author: Sandeep Raghuraman Date: Fri Oct 9 13:13:59 2020 +0530 drm/radeon: Add new callback that exposes vddc This patch adds a callback for reporting vddc, to the dpm field of the radeon_asic structure. Signed-off-by: Sandeep Raghuraman Signed-off-by: Alex Deucher commit 4f00d6d5ba3e216188570fcd075f0bdcb7884c52 Author: Alex Deucher Date: Mon Oct 26 17:40:42 2020 -0400 drm/amdgpu/pm: fix the fan speed in fan1_input in manual mode for navi1x It has been confirmed that the SMU metrics table should always reflect the current fan speed even in manual mode. Fixes: f6eb433954bf ("drm/amdgpu/swsmu: handle manual fan readback on SMU11") Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 0df7b988d9df24d1ea120fde69b3e9cbd2555597 Author: Tom Rix Date: Mon Oct 19 12:48:05 2020 -0700 char: ipmi: remove unneeded break A break is not needed if it is preceded by a return Signed-off-by: Tom Rix Message-Id: <20201019194805.14996-1-trix@redhat.com> Signed-off-by: Corey Minyard commit e4c164d63860e9411735f7e0c1dab44e81b3900a Merge: 023e1b1f1164a 9e3ecb5b16818 Author: Mark Brown Date: Tue Oct 27 20:36:10 2020 +0000 Merge series "Add documentation and machine driver for SC7180 sound card" from Cheng-Yi Chiang : Note: - The machine driver patch is made by the collaboration of Cheng-Yi Chiang Rohit kumar Ajit Pandey But Ajit has left codeaurora. Changes from v1 to v2: - Ducumentation: Addressed all suggestions from Doug. - Machine driver: - Fix comment style for license. - Sort includes. - Remove sc7180_snd_hw_params. - Remove sc7180_dai_init and use aux device instead for headset jack registration. - Statically define format for Primary MI2S. - Atomic is not a concern because there is mutex in card to make sure startup and shutdown happen sequentially. - Fix missing return -EINVAL in startup. - Use static sound card. - Use devm_kzalloc to avoid kfree. Changes from v2 to v3: - Ducumentation: Addressed suggestions from Srini. - Machine driver: - Reuse qcom_snd_parse_of to parse properties. - Remove playback-only and capture-only. - Misc fixes to address comments. Changes from v3 to v4: - Ducumentation: Addressed suggestions from Rob. - Remove definition of dai. - Use 'sound-dai: true' for sound-dai schema. - Add reg property to pass 'make dt_binding_check' check although reg is not used in the driver. - Machine driver: - Add Reviewed-by: Tzung-Bi Shih Changes from v4 to v5: - Documentation: Addressed suggestions from Rob. - Add definition for "#address-cells" and "#size-cells". - Add additionalProperties: false - Add required properties. Changes from v5 to v6: - Documentation: Addressed suggestions from Rob. - Drop contains in compatible strings. - Only allow dai-link@[0-9] - Remove reg ref since it has a type definition already. Changes from v6 to v7 - Documentation: - Add headset-jack and hdmi-jack to specify the codec responsible for jack detection. - HDMI codec driver: - Use component set_jack ops instead of exporting hdmi_codec_set_jack_detect. - Machine driver: - Removed aux device following Stephan's suggestion. - Use headset-jack and hdmi-jack to specify the codec responsible for jack detection. - Add support for HDMI(actually DP) playback. Changes from v7 to v8 - Documentation: - Remove headset-jack and hdmi-jack. - Machine driver: - Let machine driver decide whether there is a jack on the DAI. Changes from v8 to v9 - hdmi-codec driver: - Fixed the naming. - Machine driver: - Fixed unused fields. - Moved snd_soc_card_set_drvdata - Keep the naming of HDMI as dai name until v5 of lpass-hdmi patches. Changes from v9 to v10 - Documentation: - Let compatible string be more specific for board configuration to allow for future changes. - Machine driver: - Fixed unused include and macro. - Add temporary macro SC7180_LPASS_DP for future change in sc7180-lpass.h. - Let sound card be dynamically allocated. - Change compatible string accordingly. Changes from v10 to v11 - Machine driver: - Use temporary macro LPASS_DP_RX for future change in sc7180-lpass.h. Changes from v11 to v12 - Documentation: - Change the file and title name for new compatible string google,sc7180-trogdor. - Change the example of model name. - Machine driver: - Use the definitaion of index LPASS_DP_RX in sc7180-lpass.h. - Fix for compatible string. - Replace a comma with semicolon. Ajit Pandey (1): ASoC: qcom: sc7180: Add machine driver for sound card registration Cheng-Yi Chiang (1): ASoC: google: dt-bindings: Add sc7180-trogdor machine bindings .../bindings/sound/google,sc7180-trogdor.yaml | 130 +++++++++ sound/soc/qcom/Kconfig | 12 + sound/soc/qcom/Makefile | 2 + sound/soc/qcom/sc7180.c | 266 ++++++++++++++++++ 4 files changed, 410 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/google,sc7180-trogdor.yaml create mode 100644 sound/soc/qcom/sc7180.c -- 2.29.0.rc2.309.g374f81d7ae-goog commit 65abc8ef57009b95fcded5136aed8ccaff46b903 Author: Nicolin Chen Date: Wed Oct 7 17:37:45 2020 -0700 dt-bindings: memory: tegra: Add missing swgroups According to Tegra X1 TRM, there are missing swgroups in the tegra210_swgroups list. So this patch adds them in bindings. Note that the TEGRA_SWGROUP_GPU (in list) should be actually TEGRA_SWGROUP_GPUB (in TRM), yet TEGRA_SWGROUP_GPU (in TRM) is not being used -- only TEGRA_SWGROUP_GPUB (in TRM) is. So this patch does not add TEGRA_SWGROUP_GPU (in TRM) and keeps TEGRA_SWGROUP_GPU (in list) as it is. Signed-off-by: Nicolin Chen Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20201008003746.25659-5-nicoleotsuka@gmail.com Signed-off-by: Krzysztof Kozlowski commit 65b7da27d2f6a9ad7da11ed502d0ba564bbdf17d Author: Arnd Bergmann Date: Mon Oct 26 20:41:01 2020 +0100 drm/tilcdc: avoid 'make W=2' build failure The -Wmissing-field-initializer warning when building with W=2 turns into an error because tilcdc is built with -Werror: drm/tilcdc/tilcdc_drv.c:431:33: error: missing field 'data' initializer [-Werror,-Wmissing-field-initializers] { "regs", tilcdc_regs_show, 0 }, drm/tilcdc/tilcdc_drv.c:432:33: error: missing field 'data' initializer [-Werror,-Wmissing-field-initializers] { "mm", tilcdc_mm_show, 0 }, Add the missing field initializers to address the warning. Signed-off-by: Arnd Bergmann Signed-off-by: Jyri Sarha Link: https://patchwork.freedesktop.org/patch/msgid/20201026194110.3817470-1-arnd@kernel.org commit 4868a61d498af3627c3b571aa48107a845001e51 Author: Fenghua Yu Date: Wed Oct 14 00:49:27 2020 +0000 x86/resctrl: Correct MBM total and local values Intel Memory Bandwidth Monitoring (MBM) counters may report system memory bandwidth incorrectly on some Intel processors. The errata SKX99 for Skylake server, BDF102 for Broadwell server, and the correction factor table are documented in Documentation/x86/resctrl.rst. Intel MBM counters track metrics according to the assigned Resource Monitor ID (RMID) for that logical core. The IA32_QM_CTR register (MSR 0xC8E) used to report these metrics, may report incorrect system bandwidth for certain RMID values. Due to the errata, system memory bandwidth may not match what is reported. To work around the errata, correct MBM total and local readings using a correction factor table. If rmid > rmid threshold, MBM total and local values should be multiplied by the correction factor. [ bp: Mark mbm_cf_table[] __initdata. ] Signed-off-by: Fenghua Yu Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Link: https://lkml.kernel.org/r/20201014004927.1839452-3-fenghua.yu@intel.com commit a23beead41a18c3be3ca409cb52f35bc02e601b9 Author: Marek Szyprowski Date: Fri Sep 11 14:22:36 2020 +0200 ARM: dts: exynos: Remove 'opp-shared' from Exynos4412 bus OPP-tables Commits 1019fe2c7280 ("ARM: dts: exynos: Adjust bus related OPPs to the values correct for Exynos5422 Odroids") and 9ff416cf45a0 ("ARM: dts: exynos: Disable frequency scaling for FSYS bus on Odroid XU3 family") revealed that 'opp-shared' property for the Exynos bus OPPs was used incorrectly, what had the side-effect of disabling frequency scaling for the second and latter buses sharing given OPP-table. Fix this by removing bogus 'opp-shared' properties from Exynos4412 bus OPP-tables. This restores frequency scaling for the following buses: C2C, RightBus, and MFC. Signed-off-by: Marek Szyprowski Link: https://lore.kernel.org/r/20200911122236.16805-1-m.szyprowski@samsung.com Signed-off-by: Krzysztof Kozlowski commit 950d46f7c18a928e17f866a9ce5bf9c1132e5f33 Author: Marek Szyprowski Date: Fri Sep 11 14:22:20 2020 +0200 ARM: dts: exynos: Remove 'opp-shared' from Exynos3 bus OPP-tables Commits 1019fe2c7280 ("ARM: dts: exynos: Adjust bus related OPPs to the values correct for Exynos5422 Odroids") and 9ff416cf45a0 ("ARM: dts: exynos: Disable frequency scaling for FSYS bus on Odroid XU3 family") revealed that 'opp-shared' property for the Exynos bus OPPs was used incorrectly, what had the side-effect of disabling frequency scaling for the second and latter buses sharing given OPP-table. Fix this by removing bogus 'opp-shared' properties from Exynos3 bus OPP-tables. This restores frequency scaling for the following buses: RightBus, LCD0, FSYS and MFC. Signed-off-by: Marek Szyprowski Link: https://lore.kernel.org/r/20200911122220.13698-1-m.szyprowski@samsung.com Signed-off-by: Krzysztof Kozlowski commit b898d5c50cab1f985e77d053eb5c4d2c4a7694ae Author: Selvin Xavier Date: Mon Oct 12 23:15:52 2020 -0700 RDMA/bnxt_re: Fix entry size during SRQ create Only static WQE is supported for SRQ. So always use the max supported SGEs while calculating SRQ entry size. Fixes: 2bb3c32c5c5f ("RDMA/bnxt_re: Change wr posting logic to accommodate variable wqes") Link: https://lore.kernel.org/r/1602569752-12745-1-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Devesh Sharma Signed-off-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit cfbb97fde6941f3ecf19fb303648d4e09be28f42 Author: Douglas Anderson Date: Mon Sep 21 14:27:17 2020 -0700 arm64: dts: qcom: Switch sc7180-trogdor to control SPI CS via GPIO As talked about in the patch ("arm64: dts: qcom: sc7180: Provide pinconf for SPI to use GPIO for CS"), on some boards it makes much more sense (and is much more efficient) to think of the SPI Chip Select as a GPIO. Trogdor is one such board where the SPI parts don't run in GSI mode and we do a lot of SPI traffic. Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Reviewed-by: Akash Asthana Link: https://lore.kernel.org/r/20200921142655.v3.2.I3c57d8b6d83d5bdad73a413eea1e249a98d11973@changeid Signed-off-by: Bjorn Andersson commit 37dd4b7779424cc7e26791c24e9918c52e01e1ee Author: Douglas Anderson Date: Mon Sep 21 14:27:16 2020 -0700 arm64: dts: qcom: sc7180: Provide pinconf for SPI to use GPIO for CS When the chip select line is controlled by the QUP, changing CS is a time consuming operation. We have to send a command over to the geni and wait for it to Ack us every time we want to change (both making it high and low). To send this command we have to make a choice in software when we want to control the chip select, we have to either: A) Wait for the Ack via interrupt which slows down all SPI transfers (and incurrs extra processing associated with interrupts). B) Sit in a loop and poll, waiting for the Ack. Neither A) nor B) is a great option. We can avoid all of this by realizing that, at least on some boards, there is no advantage of considering this line to be a geni line. While it's true that geni _can_ control the line, it's also true that the line can be a GPIO and there is no downside of viewing it that way. Setting a GPIO is a simple MMIO operation. This patch provides definitions so a board can easily select the GPIO mode. NOTE: apparently, it's possible to run the geni in "GSI" mode. In GSI the SPI port is allowed to be controlled by more than one user (like firmware and Linux) and also the port can operate sequences of operations in one go. In GSI mode it _would_ be invalid to look at the chip select as a GPIO because that would prevent other users from using it. In theory GSI mode would also avoid some overhead by allowing us to sequence the chip select better. However, I'll argue GSI is not relevant for all boards (and certainly not any boards supported by mainline today). Why? - Apparently to run a SPI chip in GSI mode you need to initialize it (in the bootloader) with a different firmware and then it will always run in GSI mode. Since there is no support for GSI mode in the current Linux driver, it must be that existing boards don't have firmware that's doing that. Note that the kernel device tree describes hardware but also firmware, so it is legitimate to make the assumption that we don't have GSI firmware in a given dts file. - Some boards with sc7180 have SPI connected to the Chrome OS EC or security chip (Cr50). The protocols for talking to cros_ec and cr50 are extremely complex. Both drivers in Linux fully lock the bus across several distinct SPI transfers. While I am not an expert on GSI mode it feels highly unlikely to me that we'd ever be able to enable GSI mode for these devices. From a testing perspective, running "flashrom -p ec -r /tmp/foo.bin" in a loop after this patch shows almost no reduction in time, but the number of interrupts per command goes from 32357 down to 30611 (about a 5% reduction). Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Reviewed-by: Akash Asthana Link: https://lore.kernel.org/r/20200921142655.v3.1.I997a428f58ef9d48b37a27a028360f34e66c00ec@changeid Signed-off-by: Bjorn Andersson commit 2040a6bf90b530165cc86dfa879d5daa3b85f220 Author: Geert Uytterhoeven Date: Tue Oct 27 09:19:19 2020 +0100 m68k: mmu_context: Fix Sun-3 build When building for Sun-3 (e.g. sun3_defconfig): In file included from ./arch/m68k/include/asm/mmu_context.h:312, from arch/m68k/sun3/mmu_emu.c:28: ./include/asm-generic/mmu_context.h:46:20: error: redefinition of ‘destroy_context’ 46 | static inline void destroy_context(struct mm_struct *mm) | ^~~~~~~~~~~~~~~ In file included from arch/m68k/sun3/mmu_emu.c:28: ./arch/m68k/include/asm/mmu_context.h:192:20: note: previous definition of ‘destroy_context’ was here 192 | static inline void destroy_context(struct mm_struct *mm) | ^~~~~~~~~~~~~~~ Fix this by marking destroy_context implemented by arch-specific code. Fixes: cb41155766b05935 ("m68k: use asm-generic/mmu_context.h for no-op implementations") Reported-by: noreply@ellerman.id.au Signed-off-by: Geert Uytterhoeven Signed-off-by: Arnd Bergmann commit 19cc89dcb94b47a015fece85db685f1a2563a422 Author: Alex Deucher Date: Mon Oct 26 17:30:28 2020 -0400 drm/amdgpu/swsmu: drop smu i2c bus on navi1x Stop registering the SMU i2c bus on navi1x. This leads to instability issues when userspace processes mess with the bus and also seems to cause display stability issues in some cases. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1314 Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1341 Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 923e15d634ac28c6592be12eea91921ed7409d9e Author: Christian König Date: Mon Oct 19 14:18:19 2020 +0200 drm/amdgpu: drop mem_global_referenced Not used any more. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit c345c89b64914ec701a25036ecc734c0201d4a7c Author: Huang Rui Date: Mon Oct 26 20:43:41 2020 +0800 drm/amdgpu: add vangogh apu flag This patch is to add vangogh apu flag to support more kickers that belongs vangogh series. Signed-off-by: Huang Rui Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 191a3c04799e4d1c1153442647629669bbf6c882 Author: Evan Quan Date: Wed Sep 30 14:48:11 2020 +0800 drm/amdgpu: enable MULTI_MON_PP_MCLK_SWITCH DC feature at default With this, for multiple monitors in sync(e.g. with the same model), mclk switching will be allowed. That helps saving some idle power on some ASICs(e.g. Polaris). Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit a2475e624e2e80e65f371d44b712c93a144bfad9 Author: Evan Quan Date: Wed Sep 30 14:20:38 2020 +0800 drm/amd/display: correct asic type check V2 Check chip family also to avoid wrong identification. V2: use the correct macro without AMDGPU prefix Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b1878847ac9001b2025718fe57f994213800b327 Author: Evan Quan Date: Tue Sep 29 16:51:54 2020 +0800 drm/amd/pm: drop redundant display setting As this is already performed in smu7_set_power_state_tasks(). Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 62ff83a4f691bf9f40c21c7465e3247821e6a7e3 Author: Evan Quan Date: Tue Sep 29 16:47:41 2020 +0800 drm/amd/pm: reconfigure smc on display vbitimeout setting change Reconfigure smc display settings on vbitimeout change. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit d49873c93fc56b24ad3db5d629a4137d69dce067 Author: Evan Quan Date: Thu Jun 18 15:18:56 2020 +0800 drm/amd/pm: correct the mclk switching setting Correct the mclk switching setting for multiple displays. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit b03fd3e7e68f560940f4fb050b665a94c0651486 Author: Evan Quan Date: Mon Sep 28 17:20:55 2020 +0800 drm/amd/pm: enable Polaris watermark table setting Enable watermark table setting for Polaris. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 690cdc2635849db8b782dbbcabfb1c7519c84fa1 Author: Evan Quan Date: Mon Sep 28 17:17:56 2020 +0800 drm/amd/pm: fulfill the Polaris implementation for get_clock_by_type_with_latency() Fulfill Polaris get_clock_by_type_with_latency(). Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit db6f5c7f95c46c601430f6f2bd4f9107a29a7398 Author: Evan Quan Date: Fri Sep 25 14:38:11 2020 +0800 drm/amd/pm: correct vddc_dep_on_dal_pwrl setup Correct Polaris10 setup. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 9182fefcb8ca599e1ecc6b308ebf9695ba439901 Author: Evan Quan Date: Fri Sep 25 14:36:09 2020 +0800 drm/amd/pm: correct SMC sclk/mclk boot level setup Correct Polaris smc boot level setup. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 8f97e221d64d76b8c80b5fa6b41a9a77b8ab1c9f Author: Evan Quan Date: Fri Sep 25 14:34:40 2020 +0800 drm/amd/pm: correct pcie spc cap setup Correct Polaris10 pcie spc cap setting. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit ba4601feba44b93e749abe0ddccda8c8df31be12 Author: Evan Quan Date: Fri Sep 25 14:28:47 2020 +0800 drm/amd/pm: correct clk/voltage dependence setup Correct Polaris10 clk/voltage dependence setup. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit be56f22b62534a2797cfe199bbe7ddd594881697 Author: Evan Quan Date: Fri Sep 25 14:27:16 2020 +0800 drm/amd/pm: correct the way to get the highest vddc Populate the correct highest vddc setting on Polaris. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit d765129a719f0ab1b8c8b7b7c44c581f08114d8b Author: Evan Quan Date: Fri Sep 25 14:24:04 2020 +0800 drm/amd/pm: correct sclk/mclk dpm enablement Correct Polaris10 sclk/mclk dpm enablement. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit baa495f7643609545bd9f6391aa5b5d594a85817 Author: Evan Quan Date: Fri Sep 25 14:20:56 2020 +0800 drm/amd/pm: correct smc voltage controller setup Correct Polaris10 smc voltage controller setup. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 326d0ff7aa8b0e9b5bf310e7a5d095725f914675 Author: Evan Quan Date: Fri Sep 25 14:17:01 2020 +0800 drm/amd/pm: correct platformcaps setup Correct Polaris10 platformcaps setup. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 55411d16233ed1a297e776210bb73d04b4753049 Author: Evan Quan Date: Fri Sep 25 14:10:21 2020 +0800 drm/amd/pm: correct VRconfig setting Correct Polaris VRconfig setting. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit a6d8a6eb3e10b3bfd1e393a38f1ebcc8a4e78726 Author: Evan Quan Date: Fri Sep 25 14:06:48 2020 +0800 drm/amd/pm: correct vddc phase control setting Correct Polaris10 vddc phase control. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit b23dbd603b68312b6f0c6c06a81f42f64b2941e6 Author: Evan Quan Date: Fri Sep 25 13:17:48 2020 +0800 drm/amd/pm: correct avfs fuse settings Correct Polaris10 avfs fuse setting. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit dba1953168606b6c701037b623af15c1609ae99b Author: Evan Quan Date: Fri Sep 25 13:11:02 2020 +0800 drm/amd/pm: correct Polaris DIDT configurations Correct Polaris DIDT enablement. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit d8b61d5a0d51434be469469ee8354c70c0a1c9de Author: Evan Quan Date: Fri Sep 25 13:02:40 2020 +0800 drm/amd/pm: correct Polaris powertune table setup Correct powertune table setup for Polaris. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit f6638d0e6f93501dae110d66445c159309aa366a Author: Evan Quan Date: Fri Sep 25 12:59:45 2020 +0800 drm/amd/pm: correct the checks for sclk/mclk SS support Correct sclk/mclk SS support checks. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit a8588b8bb3d6bf0cfa45644518d8aba11ac7f7eb Author: Evan Quan Date: Fri Sep 25 12:47:41 2020 +0800 drm/amd/pm: correct VR shared rail info Add VR shared rail info. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 5f92b48cf62c4241044c58f1b82797bb5ed60faa Author: Evan Quan Date: Fri Sep 25 12:41:25 2020 +0800 drm/amd/pm: add mc register table initialization Add mc register table initialization. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 8f0804c6b7d091d9a26932d7e5224cc8317f7855 Author: Evan Quan Date: Fri Sep 25 12:30:22 2020 +0800 drm/amd/pm: add edc leakage controller setting Enable edc controller table setting. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 9610a3bfde4100c67ecc3367ed34d43d918be88f Author: Evan Quan Date: Fri Sep 11 16:21:34 2020 +0800 drm/amd/pm: setup zero rpm parameters for polaris10 Only if the ZeroRPM feature is supported. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit c420418f1d7c3a6680e64a6e1052c556fe5473b8 Author: Evan Quan Date: Thu Jun 18 16:15:13 2020 +0800 drm/amd/pm: correct polaris10 clock stretcher data table setting By using the saved copy of ro_range_maximum and ro_range_minimum. Correct the setting for "LdoRefSel". Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit a90e6fbe47ff6707a57e55aa578e623b10f79b10 Author: Evan Quan Date: Fri Sep 11 14:44:17 2020 +0800 drm/amd/pm: correct the settings for ro range minimum and maximum Make the settings more precise. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 029479accac20c61e94b9cd8919ceb2c30ed98ff Author: Evan Quan Date: Fri Sep 11 14:22:12 2020 +0800 drm/amd/pm: drop redundant efuse mask calculations By moving that in atomfw_read_efuse(). Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 555440822b41f0af8e259acff3ad655aea4b8fd0 Author: Evan Quan Date: Thu Jun 18 16:42:36 2020 +0800 drm/amd/pm: optimize AC timing programming Programming AC Timing Parameters is only dependent on MCLK. No need to nest loop for each SCLK DPM level. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 18973c6ec42a6ee15978d887cf40adab2350202d Author: Evan Quan Date: Thu Jun 18 16:39:03 2020 +0800 drm/amd/powerplay: separate Polaris fan table setup from Tonga Instead of sharing the fan table setup with Tonga, Polaris has its own fan table setup. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 8c23cc29d55bf0d81620492dd8fddbe751a1ae6a Author: Evan Quan Date: Thu Jun 18 16:28:02 2020 +0800 drm/amd/pm: add PWR_CKS_CNTL setting This is for some special Polaris10 ASICs. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 92995254afae9016e1d4d27ad9d1efcb2784cd29 Author: Evan Quan Date: Thu Jun 18 16:26:27 2020 +0800 drm/amdgpu: correct CG_ACLK_CNTL setting Correct polaris CG_ACLK_CNTL setting. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 7f95a2e01c9db17cf8ecb046699eba910d353eb0 Author: Evan Quan Date: Thu Jun 18 16:23:52 2020 +0800 drm/amd/pm: drop arb table first byte workaround As this is not needed for polaris. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit e9016fc2ad7a894ea2bdddabf797a63388fd2fcd Author: Evan Quan Date: Thu Jun 18 16:20:07 2020 +0800 drm/amd/pm: add pptable VRHotLevel setting Add missing VRHotLevel setting. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 3a9f6bb21d083640c5770fa663c4ce806fd853a5 Author: Evan Quan Date: Thu Jun 18 16:16:51 2020 +0800 drm/amd/pm: correct the BootLinkLevel setup Set the BootLinkLevel as the max level. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit a193d977419c22e36aafecf0ee77deb5898f7037 Author: Evan Quan Date: Thu Jun 18 16:13:26 2020 +0800 drm/amd/pm: correct the ACPI table setup V2 Correct the setting for "ActivityLevel". V2: rich the comment Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 0232af1cea030f145ef56d071318d0fc926aa4fd Author: Evan Quan Date: Thu Jun 18 16:10:11 2020 +0800 drm/amd/pm: correct mclk table setup Correct the settings for "StutterEnable" and "EnabledForActivity". Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 374b0781a0b134fe7f68d89b5992673cdfd65613 Author: Evan Quan Date: Thu Jun 18 16:06:43 2020 +0800 drm/amd/pm: correct sclk table setup Correct Polaris10 sclk table setup. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 8849fe64f668a241d9005116078236a40f1c9e08 Author: Evan Quan Date: Thu Jun 18 15:53:05 2020 +0800 drm/amd/pm: correct vddci table setup Make sure the settings are applied only when voltage controlled by gpio. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 3df9931b0678e2207d09d636525b18558869d9d3 Author: Evan Quan Date: Thu Jun 18 15:42:07 2020 +0800 drm/amd/pm: populate smc samu table Add missing smc samu table setup. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 10efb75b58fe0967a3e69edd6ed31fc36854873d Author: Evan Quan Date: Thu Jun 18 15:30:10 2020 +0800 drm/amd/pm: populate smc vddc table Add missing vddc table setup. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 73275181f687e3c4c49aef06059d8003dd87a053 Author: Evan Quan Date: Fri Sep 25 11:54:19 2020 +0800 drm/amd/pm: correct the checks for polaris kickers By defining new Macros. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit d1b22e36e3188f47dbf8aaef54d9e79df8e91f4c Author: Fenghua Yu Date: Wed Oct 14 00:49:26 2020 +0000 Documentation/x86: Rename resctrl_ui.rst and add two errata to the file Intel Memory Bandwidth Monitoring (MBM) counters may report system memory bandwidth incorrectly on some Intel processors. This is reported in documented in erratum SKX99, erratum BDF102 and in the RDT reference manual, see Documentation/x86/index.rst. To work around the errata, MBM total and local readings are corrected using a correction factor table. Since the correction factor table is not publicly documented anywhere, document the table and the errata in Documentation/x86/resctrl.rst for future reference. [ bp: Move web links to the doc, massage. ] Suggested-by: Borislav Petkov Signed-off-by: Fenghua Yu Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Link: https://lkml.kernel.org/r/20201014004927.1839452-2-fenghua.yu@intel.com commit fa769f29f12419db48f4e447e2da9719cc83f3e8 Author: Yu-Tung Chang Date: Mon Oct 26 15:35:36 2020 +0800 ARM: dts: sun8i: add FriendlyArm ZeroPi support The ZeroPi is another fun board developed by FriendlyELEC for makers, hobbyists and fans. ZeroPi key features - Allwinner H3, Quad-core Cortex-A7@1.2GHz - 256MB/512MB DDR3 RAM - microsd slot - 10/100/1000Mbps Ethernet - Debug Serial Port - DC 5V/2A power-supply Signed-off-by: Yu-Tung Chang Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20201026073536.13617-2-mtwget@gmail.com commit 0a1c8e54c8e829f80e0d81c357efc23879ee9ca6 Author: Nicholas Piggin Date: Wed Sep 2 00:15:39 2020 +1000 xtensa: use asm-generic/mmu_context.h for no-op implementations Signed-off-by: Nicholas Piggin Acked-by: Max Filippov Cc: Chris Zankel Cc: Max Filippov Cc: linux-xtensa@linux-xtensa.org Signed-off-by: Arnd Bergmann commit 586c4f24b94a7c9487cb4d7858d6bc787a0eae82 Author: Nicholas Piggin Date: Wed Sep 2 00:15:38 2020 +1000 x86: use asm-generic/mmu_context.h for no-op implementations Signed-off-by: Nicholas Piggin Acked-by: Peter Zijlstra (Intel) Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: x86@kernel.org Cc: "H. Peter Anvin" Signed-off-by: Arnd Bergmann commit 9431da33cb89cd8856d131ca068e2ef0482fb8b2 Author: Nicholas Piggin Date: Wed Sep 2 00:15:37 2020 +1000 um: use asm-generic/mmu_context.h for no-op implementations Signed-off-by: Nicholas Piggin Cc: Jeff Dike Cc: Richard Weinberger Cc: Anton Ivanov Cc: linux-um@lists.infradead.org Signed-off-by: Arnd Bergmann commit ca0f34b575ade09b037755f2af7a015f69a37ce6 Author: Nicholas Piggin Date: Wed Sep 2 00:15:36 2020 +1000 sparc: use asm-generic/mmu_context.h for no-op implementations Signed-off-by: Nicholas Piggin Cc: "David S. Miller" Cc: sparclinux@vger.kernel.org Signed-off-by: Arnd Bergmann commit c350f8c75b6613ed76f30970d51c56cc8841a34d Author: Nicholas Piggin Date: Wed Sep 2 00:15:35 2020 +1000 sh: use asm-generic/mmu_context.h for no-op implementations Signed-off-by: Nicholas Piggin Acked-by: Rich Felker Cc: Yoshinori Sato Cc: Rich Felker Cc: linux-sh@vger.kernel.org Signed-off-by: Arnd Bergmann commit 93e2dfd394386917c97d301e7b3c03bd55e76fda Author: Nicholas Piggin Date: Wed Sep 2 00:15:34 2020 +1000 s390: use asm-generic/mmu_context.h for no-op implementations Signed-off-by: Nicholas Piggin Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: linux-s390@vger.kernel.org Signed-off-by: Arnd Bergmann commit 2b56290d9f1c73243ba8bcf25cb51ebe4181cca9 Author: Nicholas Piggin Date: Wed Sep 2 00:15:33 2020 +1000 riscv: use asm-generic/mmu_context.h for no-op implementations Signed-off-by: Nicholas Piggin Reviewed-by: Pekka Enberg Acked-by: Palmer Dabbelt Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Albert Ou Cc: linux-riscv@lists.infradead.org Signed-off-by: Arnd Bergmann commit f4b90e37e3ede5535612d9fc8374c7dc216fa8c5 Author: Nicholas Piggin Date: Wed Sep 2 00:15:32 2020 +1000 powerpc: use asm-generic/mmu_context.h for no-op implementations Signed-off-by: Nicholas Piggin Acked-by: Michael Ellerman (powerpc) Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Arnd Bergmann commit 4146bdab313d9fd851c7139b68628b8d886bbdaf Author: Nicholas Piggin Date: Wed Sep 2 00:15:31 2020 +1000 parisc: use asm-generic/mmu_context.h for no-op implementations Signed-off-by: Nicholas Piggin Acked-by: Helge Deller Cc: "James E.J. Bottomley" Cc: linux-parisc@vger.kernel.org Signed-off-by: Arnd Bergmann commit 5449edc5db3bcf43d865c477ac5a40f6f162a694 Author: Nicholas Piggin Date: Wed Sep 2 00:15:30 2020 +1000 openrisc: use asm-generic/mmu_context.h for no-op implementations Signed-off-by: Nicholas Piggin Cc: Jonas Bonn Cc: Stefan Kristiansson Cc: Stafford Horne Cc: openrisc@lists.librecores.org Signed-off-by: Arnd Bergmann commit e2e251cc47ea1b598a312bf88ee58e454e4bae3e Author: Nicholas Piggin Date: Wed Sep 2 00:15:29 2020 +1000 nios2: use asm-generic/mmu_context.h for no-op implementations Signed-off-by: Nicholas Piggin Cc: Ley Foon Tan Signed-off-by: Arnd Bergmann commit f62408e035c158569637d39cd56b6fcaab2df94e Author: Nicholas Piggin Date: Wed Sep 2 00:15:28 2020 +1000 nds32: use asm-generic/mmu_context.h for no-op implementations Signed-off-by: Nicholas Piggin Acked-by: Greentime Hu Cc: Nick Hu Cc: Vincent Chen Signed-off-by: Arnd Bergmann commit 5b3a582d94e2aaa4a6d3c013eec3cc3e5750656d Author: Nicholas Piggin Date: Wed Sep 2 00:15:27 2020 +1000 mips: use asm-generic/mmu_context.h for no-op implementations Signed-off-by: Nicholas Piggin Acked-by: Thomas Bogendoerfer Cc: Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org Signed-off-by: Arnd Bergmann commit 97f130106f2987be90a393c8527671a8cdc432e8 Author: Nicholas Piggin Date: Wed Sep 2 00:15:26 2020 +1000 microblaze: use asm-generic/mmu_context.h for no-op implementations Wire asm-generic/mmu_context.h to provide generic empty hooks for arch code simplification. Signed-off-by: Nicholas Piggin Acked-by: Michal Simek Signed-off-by: Arnd Bergmann commit 2fd171be13f061927a8f864244b17063e357bb4d Author: Nicholas Piggin Date: Wed Sep 2 00:15:25 2020 +1000 m68k: use asm-generic/mmu_context.h for no-op implementations Signed-off-by: Nicholas Piggin Acked-by: Geert Uytterhoeven Cc: linux-m68k@lists.linux-m68k.org Signed-off-by: Arnd Bergmann commit 8e51efc2d74943a14dcc75df4a414375b54e4eca Author: Nicholas Piggin Date: Wed Sep 2 00:15:24 2020 +1000 ia64: use asm-generic/mmu_context.h for no-op implementations Signed-off-by: Nicholas Piggin Cc: Tony Luck Cc: Fenghua Yu Cc: linux-ia64@vger.kernel.org Signed-off-by: Arnd Bergmann commit c96c177a9468da02dffbcf36774062574835c352 Author: Nicholas Piggin Date: Wed Sep 2 00:15:23 2020 +1000 hexagon: use asm-generic/mmu_context.h for no-op implementations Signed-off-by: Nicholas Piggin Acked-by: Brian Cain Cc: linux-hexagon@vger.kernel.org Signed-off-by: Arnd Bergmann commit 746192ff3a65d2d79a4e95312132ca6599f79a2f Author: Nicholas Piggin Date: Wed Sep 2 00:15:22 2020 +1000 csky: use asm-generic/mmu_context.h for no-op implementations Signed-off-by: Nicholas Piggin Acked-by: Guo Ren Cc: linux-csky@vger.kernel.org Signed-off-by: Arnd Bergmann commit d98295d31fc116323e1c161f1a100d76e95cde3c Author: Nicholas Piggin Date: Wed Sep 2 00:15:21 2020 +1000 arm64: use asm-generic/mmu_context.h for no-op implementations Signed-off-by: Nicholas Piggin Acked-by: Catalin Marinas Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Arnd Bergmann commit 56afb8d48017cbc5216ce3923f11d65683a8e0b6 Author: Yongxin Liu Date: Fri Nov 15 13:27:10 2019 +0800 Revert "platform/x86: wmi: Destroy on cleanup rather than unregister" This reverts commit 7b11e8989618581bc0226ad313264cdc05d48d86. Consider the following hardware setting. |-PNP0C14:00 | |-- device #1 |-PNP0C14:01 | |-- device #2 When unloading wmi driver module, device #2 will be first unregistered. But device_destroy() using MKDEV(0, 0) will locate PNP0C14:00 first and unregister it. This is incorrect. Should use device_unregister() to unregister the real parent device. Signed-off-by: Yongxin Liu Link: https://lore.kernel.org/r/20191115052710.46880-1-yongxin.liu@windriver.com Signed-off-by: Hans de Goede commit 023e1b1f1164a5e2da2ad20588cf164de9ef67bb Author: Srinivas Kandagatla Date: Tue Oct 27 11:15:26 2020 +0000 ASoC: qcom: qdsp6: make use of devm_of_platform_populate make use of devm_of_platform_populate to remove some redundant code! Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20201027111526.12326-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 9e3ecb5b16818abd0bc5f3997cf4d641a710f837 Author: Ajit Pandey Date: Tue Oct 27 11:22:34 2020 +0800 ASoC: qcom: sc7180: Add machine driver for sound card registration Add new driver to register sound card on sc7180 trogdor board and do the required configuration for lpass cpu dai and external codecs connected over MI2S interfaces. Signed-off-by: Ajit Pandey Signed-off-by: Cheng-Yi Chiang Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20201027032234.1705835-3-cychiang@chromium.org Signed-off-by: Mark Brown commit e158d2d83cab59ec7f4661548627ac171c797c9d Author: Cheng-Yi Chiang Date: Tue Oct 27 11:22:33 2020 +0800 ASoC: google: dt-bindings: Add sc7180-trogdor machine bindings Add devicetree bindings documentation file for sc7180 sound card. Signed-off-by: Cheng-Yi Chiang Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20201027032234.1705835-2-cychiang@chromium.org Signed-off-by: Mark Brown commit af702094a63e8d56f125f473461fe3b620fba1fd Author: Michael Straube Date: Tue Oct 27 12:40:43 2020 +0100 staging: rtl8188eu: remove commented defines Remove commented defines from ioctl_linux.c. They are included from include/uapi/linux/wireless.h. Also clears a checkpatch warning. WARNING: Block comments use * on subsequent lines Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20201027114043.22318-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 34557e233cf86cc3d7a0ec1519b2add434d950f5 Author: Izabela Bakollari Date: Tue Oct 27 00:23:10 2020 +0100 staging: rtl8723bs: Rewrite comparison to NULL Rewrite comparison to NULL by modifying (p != NULL) to (p). Issue reported by checkpatch. Signed-off-by: Izabela Bakollari Link: https://lore.kernel.org/r/20201026232310.48128-1-izabela.bakollari@gmail.com Signed-off-by: Greg Kroah-Hartman commit 421015713b306e47af95d4d61cdfbd96d462e4cb Author: Linus Walleij Date: Sun Oct 25 23:56:18 2020 +0100 ARM: 9017/2: Enable KASan for ARM This patch enables the kernel address sanitizer for ARM. XIP_KERNEL has not been tested and is therefore not allowed for now. Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: kasan-dev@googlegroups.com Acked-by: Dmitry Vyukov Reviewed-by: Ard Biesheuvel Tested-by: Ard Biesheuvel # QEMU/KVM/mach-virt/LPAE/8G Tested-by: Florian Fainelli # Brahma SoCs Tested-by: Ahmad Fatoum # i.MX6Q Signed-off-by: Abbott Liu Signed-off-by: Florian Fainelli Signed-off-by: Linus Walleij Signed-off-by: Russell King commit 5615f69bc2097452ecc954f5264d784e158d6801 Author: Linus Walleij Date: Sun Oct 25 23:55:16 2020 +0100 ARM: 9016/2: Initialize the mapping of KASan shadow memory This patch initializes KASan shadow region's page table and memory. There are two stage for KASan initializing: 1. At early boot stage the whole shadow region is mapped to just one physical page (kasan_zero_page). It is finished by the function kasan_early_init which is called by __mmap_switched(arch/arm/kernel/ head-common.S) 2. After the calling of paging_init, we use kasan_zero_page as zero shadow for some memory that KASan does not need to track, and we allocate a new shadow space for the other memory that KASan need to track. These issues are finished by the function kasan_init which is call by setup_arch. When using KASan we also need to increase the THREAD_SIZE_ORDER from 1 to 2 as the extra calls for shadow memory uses quite a bit of stack. As we need to make a temporary copy of the PGD when setting up shadow memory we create a helpful PGD_SIZE definition for both LPAE and non-LPAE setups. The KASan core code unconditionally calls pud_populate() so this needs to be changed from BUG() to do {} while (0) when building with KASan enabled. After the initial development by Andre Ryabinin several modifications have been made to this code: Abbott Liu - Add support ARM LPAE: If LPAE is enabled, KASan shadow region's mapping table need be copied in the pgd_alloc() function. - Change kasan_pte_populate,kasan_pmd_populate,kasan_pud_populate, kasan_pgd_populate from .meminit.text section to .init.text section. Reported by Florian Fainelli Linus Walleij : - Drop the custom mainpulation of TTBR0 and just use cpu_switch_mm() to switch the pgd table. - Adopt to handle 4th level page tabel folding. - Rewrite the entire page directory and page entry initialization sequence to be recursive based on ARM64:s kasan_init.c. Ard Biesheuvel : - Necessary underlying fixes. - Crucial bug fixes to the memory set-up code. Co-developed-by: Andrey Ryabinin Co-developed-by: Abbott Liu Co-developed-by: Ard Biesheuvel Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: kasan-dev@googlegroups.com Cc: Mike Rapoport Acked-by: Mike Rapoport Reviewed-by: Ard Biesheuvel Tested-by: Ard Biesheuvel # QEMU/KVM/mach-virt/LPAE/8G Tested-by: Florian Fainelli # Brahma SoCs Tested-by: Ahmad Fatoum # i.MX6Q Reported-by: Russell King - ARM Linux Reported-by: Florian Fainelli Signed-off-by: Andrey Ryabinin Signed-off-by: Abbott Liu Signed-off-by: Florian Fainelli Signed-off-by: Ard Biesheuvel Signed-off-by: Linus Walleij Signed-off-by: Russell King commit c12366ba441da2f6f2b915410aca2b5b39c16514 Author: Linus Walleij Date: Sun Oct 25 23:53:46 2020 +0100 ARM: 9015/2: Define the virtual space of KASan's shadow region Define KASAN_SHADOW_OFFSET,KASAN_SHADOW_START and KASAN_SHADOW_END for the Arm kernel address sanitizer. We are "stealing" lowmem (the 4GB addressable by a 32bit architecture) out of the virtual address space to use as shadow memory for KASan as follows: +----+ 0xffffffff | | | | |-> Static kernel image (vmlinux) BSS and page table | |/ +----+ PAGE_OFFSET | | | | |-> Loadable kernel modules virtual address space area | |/ +----+ MODULES_VADDR = KASAN_SHADOW_END | | | | |-> The shadow area of kernel virtual address. | |/ +----+-> TASK_SIZE (start of kernel space) = KASAN_SHADOW_START the | | shadow address of MODULES_VADDR | | | | | | | | |-> The user space area in lowmem. The kernel address | | | sanitizer do not use this space, nor does it map it. | | | | | | | | | | | | | |/ ------ 0 0 .. TASK_SIZE is the memory that can be used by shared userspace/kernelspace. It us used for userspace processes and for passing parameters and memory buffers in system calls etc. We do not need to shadow this area. KASAN_SHADOW_START: This value begins with the MODULE_VADDR's shadow address. It is the start of kernel virtual space. Since we have modules to load, we need to cover also that area with shadow memory so we can find memory bugs in modules. KASAN_SHADOW_END This value is the 0x100000000's shadow address: the mapping that would be after the end of the kernel memory at 0xffffffff. It is the end of kernel address sanitizer shadow area. It is also the start of the module area. KASAN_SHADOW_OFFSET: This value is used to map an address to the corresponding shadow address by the following formula: shadow_addr = (address >> 3) + KASAN_SHADOW_OFFSET; As you would expect, >> 3 is equal to dividing by 8, meaning each byte in the shadow memory covers 8 bytes of kernel memory, so one bit shadow memory per byte of kernel memory is used. The KASAN_SHADOW_OFFSET is provided in a Kconfig option depending on the VMSPLIT layout of the system: the kernel and userspace can split up lowmem in different ways according to needs, so we calculate the shadow offset depending on this. When kasan is enabled, the definition of TASK_SIZE is not an 8-bit rotated constant, so we need to modify the TASK_SIZE access code in the *.s file. The kernel and modules may use different amounts of memory, according to the VMSPLIT configuration, which in turn determines the PAGE_OFFSET. We use the following KASAN_SHADOW_OFFSETs depending on how the virtual memory is split up: - 0x1f000000 if we have 1G userspace / 3G kernelspace split: - The kernel address space is 3G (0xc0000000) - PAGE_OFFSET is then set to 0x40000000 so the kernel static image (vmlinux) uses addresses 0x40000000 .. 0xffffffff - On top of that we have the MODULES_VADDR which under the worst case (using ARM instructions) is PAGE_OFFSET - 16M (0x01000000) = 0x3f000000 so the modules use addresses 0x3f000000 .. 0x3fffffff - So the addresses 0x3f000000 .. 0xffffffff need to be covered with shadow memory. That is 0xc1000000 bytes of memory. - 1/8 of that is needed for its shadow memory, so 0x18200000 bytes of shadow memory is needed. We "steal" that from the remaining lowmem. - The KASAN_SHADOW_START becomes 0x26e00000, to KASAN_SHADOW_END at 0x3effffff. - Now we can calculate the KASAN_SHADOW_OFFSET for any kernel address as 0x3f000000 needs to map to the first byte of shadow memory and 0xffffffff needs to map to the last byte of shadow memory. Since: SHADOW_ADDR = (address >> 3) + KASAN_SHADOW_OFFSET 0x26e00000 = (0x3f000000 >> 3) + KASAN_SHADOW_OFFSET KASAN_SHADOW_OFFSET = 0x26e00000 - (0x3f000000 >> 3) KASAN_SHADOW_OFFSET = 0x26e00000 - 0x07e00000 KASAN_SHADOW_OFFSET = 0x1f000000 - 0x5f000000 if we have 2G userspace / 2G kernelspace split: - The kernel space is 2G (0x80000000) - PAGE_OFFSET is set to 0x80000000 so the kernel static image uses 0x80000000 .. 0xffffffff. - On top of that we have the MODULES_VADDR which under the worst case (using ARM instructions) is PAGE_OFFSET - 16M (0x01000000) = 0x7f000000 so the modules use addresses 0x7f000000 .. 0x7fffffff - So the addresses 0x7f000000 .. 0xffffffff need to be covered with shadow memory. That is 0x81000000 bytes of memory. - 1/8 of that is needed for its shadow memory, so 0x10200000 bytes of shadow memory is needed. We "steal" that from the remaining lowmem. - The KASAN_SHADOW_START becomes 0x6ee00000, to KASAN_SHADOW_END at 0x7effffff. - Now we can calculate the KASAN_SHADOW_OFFSET for any kernel address as 0x7f000000 needs to map to the first byte of shadow memory and 0xffffffff needs to map to the last byte of shadow memory. Since: SHADOW_ADDR = (address >> 3) + KASAN_SHADOW_OFFSET 0x6ee00000 = (0x7f000000 >> 3) + KASAN_SHADOW_OFFSET KASAN_SHADOW_OFFSET = 0x6ee00000 - (0x7f000000 >> 3) KASAN_SHADOW_OFFSET = 0x6ee00000 - 0x0fe00000 KASAN_SHADOW_OFFSET = 0x5f000000 - 0x9f000000 if we have 3G userspace / 1G kernelspace split, and this is the default split for ARM: - The kernel address space is 1GB (0x40000000) - PAGE_OFFSET is set to 0xc0000000 so the kernel static image uses 0xc0000000 .. 0xffffffff. - On top of that we have the MODULES_VADDR which under the worst case (using ARM instructions) is PAGE_OFFSET - 16M (0x01000000) = 0xbf000000 so the modules use addresses 0xbf000000 .. 0xbfffffff - So the addresses 0xbf000000 .. 0xffffffff need to be covered with shadow memory. That is 0x41000000 bytes of memory. - 1/8 of that is needed for its shadow memory, so 0x08200000 bytes of shadow memory is needed. We "steal" that from the remaining lowmem. - The KASAN_SHADOW_START becomes 0xb6e00000, to KASAN_SHADOW_END at 0xbfffffff. - Now we can calculate the KASAN_SHADOW_OFFSET for any kernel address as 0xbf000000 needs to map to the first byte of shadow memory and 0xffffffff needs to map to the last byte of shadow memory. Since: SHADOW_ADDR = (address >> 3) + KASAN_SHADOW_OFFSET 0xb6e00000 = (0xbf000000 >> 3) + KASAN_SHADOW_OFFSET KASAN_SHADOW_OFFSET = 0xb6e00000 - (0xbf000000 >> 3) KASAN_SHADOW_OFFSET = 0xb6e00000 - 0x17e00000 KASAN_SHADOW_OFFSET = 0x9f000000 - 0x8f000000 if we have 3G userspace / 1G kernelspace with full 1 GB low memory (VMSPLIT_3G_OPT): - The kernel address space is 1GB (0x40000000) - PAGE_OFFSET is set to 0xb0000000 so the kernel static image uses 0xb0000000 .. 0xffffffff. - On top of that we have the MODULES_VADDR which under the worst case (using ARM instructions) is PAGE_OFFSET - 16M (0x01000000) = 0xaf000000 so the modules use addresses 0xaf000000 .. 0xaffffff - So the addresses 0xaf000000 .. 0xffffffff need to be covered with shadow memory. That is 0x51000000 bytes of memory. - 1/8 of that is needed for its shadow memory, so 0x0a200000 bytes of shadow memory is needed. We "steal" that from the remaining lowmem. - The KASAN_SHADOW_START becomes 0xa4e00000, to KASAN_SHADOW_END at 0xaeffffff. - Now we can calculate the KASAN_SHADOW_OFFSET for any kernel address as 0xaf000000 needs to map to the first byte of shadow memory and 0xffffffff needs to map to the last byte of shadow memory. Since: SHADOW_ADDR = (address >> 3) + KASAN_SHADOW_OFFSET 0xa4e00000 = (0xaf000000 >> 3) + KASAN_SHADOW_OFFSET KASAN_SHADOW_OFFSET = 0xa4e00000 - (0xaf000000 >> 3) KASAN_SHADOW_OFFSET = 0xa4e00000 - 0x15e00000 KASAN_SHADOW_OFFSET = 0x8f000000 - The default value of 0xffffffff for KASAN_SHADOW_OFFSET is an error value. We should always match one of the above shadow offsets. When we do this, TASK_SIZE will sometimes get a bit odd values that will not fit into immediate mov assembly instructions. To account for this, we need to rewrite some assembly using TASK_SIZE like this: - mov r1, #TASK_SIZE + ldr r1, =TASK_SIZE or - cmp r4, #TASK_SIZE + ldr r0, =TASK_SIZE + cmp r4, r0 this is done to avoid the immediate #TASK_SIZE that need to fit into a limited number of bits. Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: kasan-dev@googlegroups.com Cc: Mike Rapoport Reviewed-by: Ard Biesheuvel Tested-by: Ard Biesheuvel # QEMU/KVM/mach-virt/LPAE/8G Tested-by: Florian Fainelli # Brahma SoCs Tested-by: Ahmad Fatoum # i.MX6Q Reported-by: Ard Biesheuvel Signed-off-by: Abbott Liu Signed-off-by: Florian Fainelli Signed-off-by: Linus Walleij Signed-off-by: Russell King commit d6d51a96c7d63b7450860a3037f2d62388286a52 Author: Linus Walleij Date: Sun Oct 25 23:52:08 2020 +0100 ARM: 9014/2: Replace string mem* functions for KASan Functions like memset()/memmove()/memcpy() do a lot of memory accesses. If a bad pointer is passed to one of these functions it is important to catch this. Compiler instrumentation cannot do this since these functions are written in assembly. KASan replaces these memory functions with instrumented variants. The original functions are declared as weak symbols so that the strong definitions in mm/kasan/kasan.c can replace them. The original functions have aliases with a '__' prefix in their name, so we can call the non-instrumented variant if needed. We must use __memcpy()/__memset() in place of memcpy()/memset() when we copy .data to RAM and when we clear .bss, because kasan_early_init cannot be called before the initialization of .data and .bss. For the kernel compression and EFI libstub's custom string libraries we need a special quirk: even if these are built without KASan enabled, they rely on the global headers for their custom string libraries, which means that e.g. memcpy() will be defined to __memcpy() and we get link failures. Since these implementations are written i C rather than assembly we use e.g. __alias(memcpy) to redirected any users back to the local implementation. Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: kasan-dev@googlegroups.com Reviewed-by: Ard Biesheuvel Tested-by: Ard Biesheuvel # QEMU/KVM/mach-virt/LPAE/8G Tested-by: Florian Fainelli # Brahma SoCs Tested-by: Ahmad Fatoum # i.MX6Q Reported-by: Russell King - ARM Linux Signed-off-by: Ahmad Fatoum Signed-off-by: Abbott Liu Signed-off-by: Florian Fainelli Signed-off-by: Linus Walleij Signed-off-by: Russell King commit d5d44e7e3507b0ad868f68e0c5bca6a57afa1b8b Author: Linus Walleij Date: Sun Oct 25 23:50:09 2020 +0100 ARM: 9013/2: Disable KASan instrumentation for some code Disable instrumentation for arch/arm/boot/compressed/* since that code is executed before the kernel has even set up its mappings and definately out of scope for KASan. Disable instrumentation of arch/arm/vdso/* because that code is not linked with the kernel image, so the KASan management code would fail to link. Disable instrumentation of arch/arm/mm/physaddr.c. See commit ec6d06efb0ba ("arm64: Add support for CONFIG_DEBUG_VIRTUAL") for more details. Disable kasan check in the function unwind_pop_register because it does not matter that kasan checks failed when unwind_pop_register() reads the stack memory of a task. Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: kasan-dev@googlegroups.com Reviewed-by: Ard Biesheuvel Tested-by: Ard Biesheuvel # QEMU/KVM/mach-virt/LPAE/8G Tested-by: Florian Fainelli # Brahma SoCs Tested-by: Ahmad Fatoum # i.MX6Q Reported-by: Florian Fainelli Reported-by: Marc Zyngier Signed-off-by: Abbott Liu Signed-off-by: Florian Fainelli Signed-off-by: Linus Walleij Signed-off-by: Russell King commit 7a1be318f5795cb66fa0dc86b3ace427fe68057f Author: Ard Biesheuvel Date: Sun Oct 11 10:21:37 2020 +0100 ARM: 9012/1: move device tree mapping out of linear region On ARM, setting up the linear region is tricky, given the constraints around placement and alignment of the memblocks, and how the kernel itself as well as the DT are placed in physical memory. Let's simplify matters a bit, by moving the device tree mapping to the top of the address space, right between the end of the vmalloc region and the start of the the fixmap region, and create a read-only mapping for it that is independent of the size of the linear region, and how it is organized. Since this region was formerly used as a guard region, which will now be populated fully on LPAE builds by this read-only mapping (which will still be able to function as a guard region for stray writes), bump the start of the [underutilized] fixmap region by 512 KB as well, to ensure that there is always a proper guard region here. Doing so still leaves ample room for the fixmap space, even with NR_CPUS set to its maximum value of 32. Tested-by: Linus Walleij Reviewed-by: Linus Walleij Reviewed-by: Nicolas Pitre Signed-off-by: Ard Biesheuvel Signed-off-by: Russell King commit e9a2f8b599d0bc22a1b13e69527246ac39c697b4 Author: Ard Biesheuvel Date: Sun Oct 11 10:20:16 2020 +0100 ARM: 9011/1: centralize phys-to-virt conversion of DT/ATAGS address Before moving the DT mapping out of the linear region, let's prepare for this change by removing all the phys-to-virt translations of the __atags_pointer variable, and perform this translation only once at setup time. Tested-by: Linus Walleij Reviewed-by: Linus Walleij Acked-by: Nicolas Pitre Signed-off-by: Ard Biesheuvel Signed-off-by: Russell King commit 411269babe8374b7777a0f154a2ad27c3c6dc218 Author: Maximilian Luz Date: Fri Oct 9 16:11:28 2020 +0200 platform/surface: Move Surface Pro 3 Button driver to platform/surface Move the Surface Pro 3 Button driver from platform/x86 to the newly created platform/surface directory. Signed-off-by: Maximilian Luz Reviewed-by: Andy Shevchenko Acked-by: Chen Yu Link: https://lore.kernel.org/r/20201009141128.683254-6-luzmaximilian@gmail.com Signed-off-by: Hans de Goede commit 85f7582cd484dbf491b6d9bb2af6ef1467a024d2 Author: Maximilian Luz Date: Fri Oct 9 16:11:27 2020 +0200 platform/surface: Move Surface 3 Power OpRegion driver to platform/surface Move the Surface 3 Power operation region driver from platform/x86 to the newly created platform/surface directory. Signed-off-by: Maximilian Luz Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201009141128.683254-5-luzmaximilian@gmail.com Signed-off-by: Hans de Goede commit 4df56c36944bece6a9b361f7fc7dc8906a9dbd20 Author: Maximilian Luz Date: Fri Oct 9 16:11:26 2020 +0200 platform/surface: Move Surface 3 Button driver to platform/surface Move the Surface 3 Button driver from platform/x86 to the newly created platform/surface directory. Signed-off-by: Maximilian Luz Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201009141128.683254-4-luzmaximilian@gmail.com Signed-off-by: Hans de Goede commit f23027ca3d48b6f93c5994069fb25b73539fdf34 Author: Maximilian Luz Date: Fri Oct 9 16:11:25 2020 +0200 platform/surface: Move Surface 3 WMI driver to platform/surface Move the Surface 3 WMI driver from platform/x86 to the newly created platform/surface directory. Signed-off-by: Maximilian Luz Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201009141128.683254-3-luzmaximilian@gmail.com Signed-off-by: Hans de Goede commit 1e3a2bc89de44ec34153ab1c1056346b51def250 Author: Maximilian Luz Date: Fri Oct 9 16:11:24 2020 +0200 platform: Add Surface platform directory It may make sense to split the Microsoft Surface hardware platform drivers out to a separate subdirectory, since some of it may be shared between ARM and x86 in the future (regarding devices like the Surface Pro X). Further, newer Surface devices will require additional platform drivers for fundamental support (mostly regarding their embedded controller), which may also warrant this split from a size perspective. This commit introduces a new platform/surface subdirectory for the Surface device family, with subsequent commits moving existing Surface drivers over from platform/x86. A new MAINTAINERS entry is added for this directory. Patches to files in this directory will be taken up by the platform-drivers-x86 team (i.e. Hans de Goede and Mark Gross) after they have been reviewed by Maximilian Luz. Signed-off-by: Maximilian Luz Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201009141128.683254-2-luzmaximilian@gmail.com Signed-off-by: Hans de Goede commit ab7cffb8d2367e5b088c7c14452724e719a10eba Author: Sam Ravnborg Date: Mon Oct 26 20:20:40 2020 +0100 MIPS: ingenic: remove unused platform_data header file There are no users of this headers file in the kernel. All users are likely migrated to device tree which is a good thing. Signed-off-by: Sam Ravnborg Cc: Thomas Bogendoerfer Cc: Paul Cercueil Cc: Harvey Hunt Cc: linux-mips@vger.kernel.org Reviewed-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit 673a8c4f8517ea624cd838f7f2246b6990190770 Author: Tiezhu Yang Date: Tue Oct 13 13:55:02 2020 +0800 Documentation: ABI: Add /sys/firmware/lefi/boardinfo description for Loongson64 Add a description for /sys/firmware/lefi/boardinfo on the Loongson platform. Signed-off-by: Tiezhu Yang Signed-off-by: Thomas Bogendoerfer commit 6c1bfbd9df8c42a1156b9f4769ca78dfc5e89045 Author: Tiezhu Yang Date: Tue Oct 13 13:55:01 2020 +0800 MIPS: Loongson64: Add /sys/firmware/lefi/boardinfo Add /sys/firmware/lefi/boardinfo to get mainboard and BIOS info easily on the Loongson platform, this is useful to point out the current used mainboard type and BIOS version when there exists problems related with hardware or firmware. The related structures are already defined in the interface specification about firmware and kernel which are common requirement and specific for Loongson64, so only add a new boardinfo.c file in arch/mips/loongson64. E.g. with this patch: [loongson@linux ~]$ cat /sys/firmware/lefi/boardinfo Board Info Manufacturer : LEMOTE Board Name : LEMOTE-LS3A4000-7A1000-1w-V01-pc Family : LOONGSON3 BIOS Info Vendor : Kunlun Version : Kunlun-A1901-V4.1.3-20200414093938 ROM Size : 4 KB Release Date : 2020-04-14 By the way, using dmidecode command can get the similar info if there exists SMBIOS in firmware, but the fact is that there is no SMBIOS on some machines, we can see nothing when execute dmidecode, like this: [root@linux loongson]# dmidecode # dmidecode 2.12 # No SMBIOS nor DMI entry point found, sorry. Signed-off-by: Tiezhu Yang Signed-off-by: Thomas Bogendoerfer commit fe50b1f832100909466db0bf68e3c3643f575120 Author: Deepak R Varma Date: Mon Oct 26 23:27:53 2020 +0530 staging: kpc2000: kpc_dma: rename show function per convention Rename show_engine_regs show function to engine_regs_show as per the convention followed. The show function macro DEVICE_ATTR also replaced by DEVICE_ATTR_RO. Issue reported by checkpatch script. Signed-off-by: Deepak R Varma Link: https://lore.kernel.org/r/9c8c0d60cec70b99f55d6e228b7585d47be695c2.1603734679.git.mh12gx2825@gmail.com Signed-off-by: Greg Kroah-Hartman commit 71f5a9124374e719e60f2f85f9179ea6eaa1fe6b Author: Deepak R Varma Date: Mon Oct 26 23:26:09 2020 +0530 staging: kpc2000: kpc_dma: rearrange lines exceeding 100 columns Reformat lines that exceed 100 column in length. Issue reported by checkpatch script. Signed-off-by: Deepak R Varma Link: https://lore.kernel.org/r/c853e015ec460b909a3e2cd529bc0f69093bce3e.1603734679.git.mh12gx2825@gmail.com Signed-off-by: Greg Kroah-Hartman commit 36f18e741a232aa5543ac687e15b47213146ba56 Author: Marcos Antonio de Jesus Filho Date: Mon Oct 26 13:17:14 2020 -0700 staging: vt6655: Fix typo Fix typo reported by checkpatch. Signed-off-by: Marcos Antonio de Jesus Filho Link: https://lore.kernel.org/r/20201026201714.GA24239@Zangetsu Signed-off-by: Greg Kroah-Hartman commit ba1c30bf3f2536f248d262c6f257b5a787305991 Author: Dan Carpenter Date: Thu Oct 22 10:04:51 2020 +0300 rtc: pcf2127: fix pcf2127_nvmem_read/write() returns These functions should return zero on success. Non-zero returns are treated as error. On some paths, this doesn't matter but in nvmem_cell_read() a non-zero return would be passed to ERR_PTR() and lead to an Oops. Fixes: d6c3029f32f7 ("rtc: pcf2127: add support for accessing internal static RAM") Signed-off-by: Dan Carpenter Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201022070451.GA2817669@mwanda commit 90855921ac92834daa809a5ce97a72de464260a7 Author: Amarjargal Gundjalam Date: Mon Oct 26 22:15:10 2020 +0800 staging: rtl8723bs: cleanup NULL check before vfree Remove redundant NULL pointer check before vfree() since vfree() does its own NULL check. Reported by coccinelle. Signed-off-by: Amarjargal Gundjalam Link: https://lore.kernel.org/r/20201026141510.GA21791@AJ-T14 Signed-off-by: Greg Kroah-Hartman commit 5d78533a0c53af9659227c803df944ba27cd56e0 Author: Uwe Kleine-König Date: Thu Sep 24 12:52:55 2020 +0200 rtc: pcf2127: move watchdog initialisation to a separate function The obvious advantages are: - The linker can drop the watchdog functions if CONFIG_WATCHDOG is off. - All watchdog stuff grouped together with only a single function call left in generic code. - Watchdog register is only read when it is actually used. - Less #ifdefery Signed-off-by: Uwe Kleine-König Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200924105256.18162-2-u.kleine-koenig@pengutronix.de commit 703456ba76e9449b5ade6597c04a90ee3421cd94 Author: Fabien Parent Date: Wed Oct 21 18:42:31 2020 +0200 thermal: mtk_thermal: make device_reset optional MT8516 does not support thermal reset. Use device_reset_optional instead of device_reset. Signed-off-by: Fabien Parent Reviewed-by: Matthias Brugger Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201021164231.3029956-3-fparent@baylibre.com commit c707f973df1706020f4a4669b5f1932e90c0f29c Author: Fabien Parent Date: Wed Oct 21 18:42:30 2020 +0200 dt-bindings: thermal: mediatek: add documentation for MT8516 SoC Add binding documentation for the MediaTek MT8516 SoC. The SoC thermal IP is similar to MT2701. Signed-off-by: Fabien Parent Acked-by: Rob Herring Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201021164231.3029956-2-fparent@baylibre.com commit 07df39d03c34bd7baf4c26e41a5dd92ec56e9081 Author: Fabien Parent Date: Wed Oct 21 18:42:29 2020 +0200 dt-bindings: thermal: mediatek: make resets property optional MT8516 Thermal IP does not support reset. Make the resets property optional in order to be able to support MT8516 SoC. Signed-off-by: Fabien Parent Acked-by: Rob Herring Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201021164231.3029956-1-fparent@baylibre.com commit 4eb7d0cd590d99b6010b5b87a88804cda09a85da Author: Tian Tao Date: Tue Oct 27 09:06:30 2020 +0800 thermal/drivers/rcar: Replace spin_lock_irqsave by spin_lock in hard IRQ On RT or even on mainline with 'threadirqs' on the command line all interrupts which are not explicitly requested with IRQF_NO_THREAD run their handlers in thread context. The same applies to soft interrupts. That means they are subject to the normal scheduler rules and no other code is going to acquire that lock from hard interrupt context either, so the irqsave() here is pointless in all cases. Signed-off-by: Tian Tao Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/1603760790-37748-1-git-send-email-tiantao6@hisilicon.com commit 7d18e2f3f29763e0714733f0e0689f14de4faa03 Author: Daniel Vetter Date: Fri Oct 23 14:39:25 2020 +0200 drm/doc: Document legacy_cursor_update better It's the horror and shouldn't be used. Realized we're not clear on this in a discussion with Rob about what msm is doing to better support async commits. v2: Refine existing todo item to include this (Thomas) Cc: Sean Paul Cc: Rob Clark Acked-by: Rob Clark Signed-off-by: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201023123925.2374863-3-daniel.vetter@ffwll.ch commit 37b2539e63d6570c9ee51b1d48bdecb334df367d Author: Bernard Zhao Date: Mon Oct 26 18:37:42 2020 -0700 drivers/thermal/core: Optimize trip points check The trip points are checked one by one with multiple condition branches where one condition is enough to disable the trip point. Merge all these conditions in a single 'OR' statement. Signed-off-by: Bernard Zhao Suggested-by: Daniel Lezcano Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201027013743.62392-1-bernard@vivo.com [dlezcano] Changed patch description commit 345a8af7ea63ac75a9000159d6298769d3d50f91 Author: Lukasz Luba Date: Thu Oct 15 12:24:41 2020 +0100 thermal: core: Move power_actor_set_power into IPA Since the power actor section has one function power_actor_set_power() move it into Intelligent Power Allocation (IPA). There is no other user of that helper function. It would also allow to remove the check of cdev_is_power_actor() because the code which calls it in IPA already does the needed check. Make the function static since only IPA use it. Signed-off-by: Lukasz Luba Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201015112441.4056-5-lukasz.luba@arm.com commit 87d2380260524e55e090e14012c1b07c1f6d4096 Author: Lukasz Luba Date: Thu Oct 15 12:24:40 2020 +0100 thermal: core: Remove unused functions in power actor section Since the Intelligent Power Allocation (IPA) uses different way to get minimum and maximum power for a given cooling device, the helper functions are not needed. There is no other code which uses them, so remove the helper functions. Signed-off-by: Lukasz Luba Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201015112441.4056-4-lukasz.luba@arm.com commit 8132df3a06a41823aa370dbb4ff08f48fa07f6df Author: Lukasz Luba Date: Thu Oct 15 12:24:39 2020 +0100 thermal: power_allocator: Respect upper and lower bounds for cooling device The thermal cooling device specified in DT might be instantiated for a thermal zone trip point with a limited set of OPPs to operate on. This configuration should be supported by Intelligent Power Allocation (IPA), since it is a standard for other governors. Change the code and allow IPA to get power value of lower and upper bound set for a given cooling device. Signed-off-by: Lukasz Luba Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201015112441.4056-3-lukasz.luba@arm.com commit d1849b9ff9f442b3720e07b2d6f6c5cf1b97b1a3 Author: Tom Rix Date: Mon Oct 26 12:14:50 2020 -0700 USB: serial: iuu_phoenix: remove unneeded break A break is not needed if it is preceded by a return. Signed-off-by: Tom Rix Signed-off-by: Johan Hovold commit 1fcf689181e95f3a289f42806fff38fb15a66b61 Author: Ahmed S. Darwish Date: Mon Oct 26 15:03:13 2020 +0100 USB: serial: digi_acceleport: remove in_interrupt() usage The usage of in_interrupt() in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be separated or the context be conveyed in an argument passed by the caller, which usually knows the context. The debug printk() in digi_write() prints in_interrupt() as context information. This information is imprecise as it does not distinguish between hard-IRQ or disabled bottom half and it does not consider disabled interrupts or preemption. It is not really helpful. Remove the in_interrupt() printout. Signed-off-by: Ahmed S. Darwish Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Link: https://lore.kernel.org/r/20201026140313.dpg3hkhkje2os4hw@linutronix.de [ johan: amend commit message ] Signed-off-by: Johan Hovold commit 78e4ea785c0737c906f4830c79d21dc6cb928f68 Author: Nicolin Chen Date: Wed Oct 7 17:37:44 2020 -0700 memory: tegra: Sort tegra210_swgroups by reg address Cleanup the list of swgroups (ordering by register address) to prepare for new ones. Signed-off-by: Nicolin Chen Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20201008003746.25659-4-nicoleotsuka@gmail.com Signed-off-by: Krzysztof Kozlowski commit f68ac0e6bd83582b1a8ebf1b76c03eacea25fa49 Author: Nicolin Chen Date: Wed Oct 7 17:37:43 2020 -0700 memory: tegra: Correct tegra210_mc_clients def values Some def values are mismatched with Tegra X1 TRM, probably because being copied from tegra124.c file. Signed-off-by: Nicolin Chen Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20201008003746.25659-3-nicoleotsuka@gmail.com Signed-off-by: Krzysztof Kozlowski commit c14bea053775e0c79a6fdd2d1b5a1d9de4fbd7c7 Author: Nicolin Chen Date: Wed Oct 7 17:37:42 2020 -0700 memory: tegra: Correct la.reg address of seswr According to Tegra X1 TRM, ALLOWANCE_SESWR is located in field [23:16] of register at address 0x3e0 with a reset value of 0x80 at register 0x3e0, while bit-1 of register 0xb98 is for enable bit of seswr. Signed-off-by: Nicolin Chen Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20201008003746.25659-2-nicoleotsuka@gmail.com Signed-off-by: Krzysztof Kozlowski commit 11b3de087a1cae288f2cf345457bc7a7f97c7aa3 Author: Mike Looijmans Date: Mon Oct 26 17:32:43 2020 +0100 dt-bindings: gpio: pca953x: Add support for the NXP PCAL9554B/C The NXP PCAL9554B is a variant of the PCA953x GPIO expander, with 8 GPIOs, latched interrupts and some advanced configuration options. The "C" version only differs in I2C address. This adds the entry to the devicetree bindings. Signed-off-by: Mike Looijmans Acked-by: Rob Herring Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 4dfec0d1d7b9970f36931de714b379dbeaed83f8 Author: Arnd Bergmann Date: Mon Oct 26 20:39:55 2020 +0100 matroxfb: avoid -Warray-bounds warning The open-coded list_for_each_entry() causes a harmless warning: drivers/video/fbdev/matrox/matroxfb_base.c: In function 'matroxfb_register_driver': include/linux/kernel.h:856:3: warning: array subscript -98 is outside array bounds of 'struct list_head[1]' [-Warray-bounds] Use the normal list_for_each_entry instead. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Arnd Bergmann Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20201026194010.3817166-1-arnd@kernel.org commit ae6b4e69a80de2cf89afe451424cc02f953a4a10 Author: Mauro Carvalho Chehab Date: Fri Oct 23 18:33:14 2020 +0200 scsi: doc: Fix some kernel-doc markups Some identifiers have different names between their prototypes and the kernel-doc markup. [mkp: fix whitespace] Link: https://lore.kernel.org/r/8ed7f149f25a363eea76e514c253c4e337c59379.1603469755.git.mchehab+huawei@kernel.org Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Martin K. Petersen commit 56ae4919f9eddf1ed60dac1e13caa1720ebf67b5 Author: James Smart Date: Tue Oct 20 13:27:19 2020 -0700 scsi: lpfc: Update lpfc version to 12.8.0.5 Update lpfc version to 12.8.0.5 Link: https://lore.kernel.org/r/20201020202719.54726-10-james.smart@broadcom.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit b67b5944328219f8ac1e0496ae0f4e45f6d43855 Author: James Smart Date: Tue Oct 20 13:27:18 2020 -0700 scsi: lpfc: Reject CT request for MIB commands Now that MIB support was registered with FDMI, the driver may receive CT requests for MIB-related commands. At this time, no command is supported. However, the driver needs to be graceful and reject the CT request. This patch adds identification of the requests as well as sending the reject response. Link: https://lore.kernel.org/r/20201020202719.54726-9-james.smart@broadcom.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 8aaa7bcf07a2eea5ffb6d4ee776379c0e0154f6d Author: James Smart Date: Tue Oct 20 13:27:17 2020 -0700 scsi: lpfc: Add FDMI Vendor MIB support Created new attribute lpfc_enable_mi, which by default is enabled. Add command definition bits for SLI-4 parameters that recognize whether the adapter has MIB information support and what revision of MIB data. Using the adapter information, register vendor-specific MIB support with FDMI. The registration will be done every link up. During FDMI registration, encountered a couple of errors when reverting to FDMI rev1. Code needed to exist once reverting. Fixed these. Link: https://lore.kernel.org/r/20201020202719.54726-8-james.smart@broadcom.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 7c30bb62ed5db15cdb59f5722122fbed7421641c Author: James Smart Date: Tue Oct 20 13:27:16 2020 -0700 scsi: lpfc: Enlarge max_sectors in scsi host templates The driver supports arbitrarily large scatter-gather lists and the current value for max_sectors is limiting. Change max_sectors to the largest value. This was actually done prior but it only corrected one template and that template was later removed. So change the remaining 2 templates. Other areas which hard-set the sectors value should be inheriting what is in the template. Link: https://lore.kernel.org/r/20201020202719.54726-7-james.smart@broadcom.com Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit f5201f87ccafd8d80283c87490bbdf78f8a026bf Author: James Smart Date: Tue Oct 20 13:27:15 2020 -0700 scsi: lpfc: Fix duplicate wq_create_version check During code reviews duplicate code sections were found to determine the WQ Create version. The duplication was potentially overriding logic that validated page size. Link: https://lore.kernel.org/r/20201020202719.54726-6-james.smart@broadcom.com Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 7cbef585a12a098e694d34e94c140b18fe0e9735 Author: James Smart Date: Tue Oct 20 13:27:14 2020 -0700 scsi: lpfc: Removed unused macros in lpfc_attr.c Removed unused MRQ-related defines that are not referenced. Link: https://lore.kernel.org/r/20201020202719.54726-5-james.smart@broadcom.com Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit e5785d3ec32f5f44dd88cd7b398e496742630469 Author: James Smart Date: Tue Oct 20 13:27:13 2020 -0700 scsi: lpfc: Re-fix use after free in lpfc_rq_buf_free() Commit 9816ef6ecbc1 ("scsi: lpfc: Use after free in lpfc_rq_buf_free()") was made to correct a use after free condition in lpfc_rq_buf_free(). Unfortunately, a subsequent patch cut on a tree without the fix inadvertently reverted the fix. Put the fix back: Move the freeing of the rqb_entry to after the print function that references it. Link: https://lore.kernel.org/r/20201020202719.54726-4-james.smart@broadcom.com Fixes: 411de511c694 ("scsi: lpfc: Fix RQ empty firmware trap") Cc: # v4.17+ Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit e7dab164a9aa457f89d4528452bdfc3e15ac98b6 Author: James Smart Date: Tue Oct 20 13:27:12 2020 -0700 scsi: lpfc: Fix scheduling call while in softirq context in lpfc_unreg_rpi The following call trace was seen during HBA reset testing: BUG: scheduling while atomic: swapper/2/0/0x10000100 ... Call Trace: dump_stack+0x19/0x1b __schedule_bug+0x64/0x72 __schedule+0x782/0x840 __cond_resched+0x26/0x30 _cond_resched+0x3a/0x50 mempool_alloc+0xa0/0x170 lpfc_unreg_rpi+0x151/0x630 [lpfc] lpfc_sli_abts_recover_port+0x171/0x190 [lpfc] lpfc_sli4_abts_err_handler+0xb2/0x1f0 [lpfc] lpfc_sli4_io_xri_aborted+0x256/0x300 [lpfc] lpfc_sli4_sp_handle_abort_xri_wcqe.isra.51+0xa3/0x190 [lpfc] lpfc_sli4_fp_handle_cqe+0x89/0x4d0 [lpfc] __lpfc_sli4_process_cq+0xdb/0x2e0 [lpfc] __lpfc_sli4_hba_process_cq+0x41/0x100 [lpfc] lpfc_cq_poll_hdler+0x1a/0x30 [lpfc] irq_poll_softirq+0xc7/0x100 __do_softirq+0xf5/0x280 call_softirq+0x1c/0x30 do_softirq+0x65/0xa0 irq_exit+0x105/0x110 do_IRQ+0x56/0xf0 common_interrupt+0x16a/0x16a With the conversion to blk_io_poll for better interrupt latency in normal cases, it introduced this code path, executed when I/O aborts or logouts are seen, which attempts to allocate memory for a mailbox command to be issued. The allocation is GFP_KERNEL, thus it could attempt to sleep. Fix by creating a work element that performs the event handling for the remote port. This will have the mailbox commands and other items performed in the work element, not the irq. A much better method as the "irq" routine does not stall while performing all this deep handling code. Ensure that allocation failures are handled and send LOGO on failure. Additionally, enlarge the mailbox memory pool to reduce the possibility of additional allocation in this path. Link: https://lore.kernel.org/r/20201020202719.54726-3-james.smart@broadcom.com Fixes: 317aeb83c92b ("scsi: lpfc: Add blk_io_poll support for latency improvment") Cc: # v5.9+ Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 62e3a931db60daf94fdb3159d685a5bc6ad4d0cf Author: James Smart Date: Tue Oct 20 13:27:11 2020 -0700 scsi: lpfc: Fix invalid sleeping context in lpfc_sli4_nvmet_alloc() The following calltrace was seen: BUG: sleeping function called from invalid context at mm/slab.h:494 ... Call Trace: dump_stack+0x9a/0xf0 ___might_sleep.cold.63+0x13d/0x178 slab_pre_alloc_hook+0x6a/0x90 kmem_cache_alloc_trace+0x3a/0x2d0 lpfc_sli4_nvmet_alloc+0x4c/0x280 [lpfc] lpfc_post_rq_buffer+0x2e7/0xa60 [lpfc] lpfc_sli4_hba_setup+0x6b4c/0xa4b0 [lpfc] lpfc_pci_probe_one_s4.isra.15+0x14f8/0x2280 [lpfc] lpfc_pci_probe_one+0x260/0x2880 [lpfc] local_pci_probe+0xd4/0x180 work_for_cpu_fn+0x51/0xa0 process_one_work+0x8f0/0x17b0 worker_thread+0x536/0xb50 kthread+0x30c/0x3d0 ret_from_fork+0x3a/0x50 A prior patch introduced a spin_lock_irqsave(hbalock) in the lpfc_post_rq_buffer() routine. Call trace is seen as the hbalock is held with interrupts disabled during a GFP_KERNEL allocation in lpfc_sli4_nvmet_alloc(). Fix by reordering locking so that hbalock not held when calling sli4_nvmet_alloc() (aka rqb_buf_list()). Link: https://lore.kernel.org/r/20201020202719.54726-2-james.smart@broadcom.com Fixes: 411de511c694 ("scsi: lpfc: Fix RQ empty firmware trap") Cc: # v4.17+ Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit ae7e63d1e34a6df87ef68692593d6d6f89448739 Merge: 4525c8781ec07 5384d92e4e026 Author: Tetsuo Handa Date: Tue Oct 27 08:44:38 2020 +0900 Merge branch 'master' of https://scm.osdn.net/gitroot/tomoyo/tomoyo-test1 commit ae0f18bef30d0e76dd62be46c59b24c75f175092 Author: Alexander Kochetkov Date: Mon Oct 19 18:03:43 2020 +0300 spi: spi-sun6i: enable autosuspend feature If SPI is used for periodic polling any sensor, significant delays sometimes appear. Switching on module clocks during resume lead to delays. Enabling autosuspend mode causes the controller to not suspend between SPI transfers and the delays disappear. The commit also remove unnecessary call to pm_runtime_idle() used to explicit put device to suspended state. Without pm_runtime_idle() PM core will put device in the suspended state just after probe() returns. Signed-off-by: Alexander Kochetkov Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/20201019150343.2520-1-akochetkov@lintech.ru Signed-off-by: Mark Brown commit 940f3bbf3dacd6e31e482a10e64c96e69b00dded Author: Alexander Kochetkov Date: Fri Oct 16 11:50:14 2020 +0300 spi: rockchip: enable autosuspend feature If SPI is used for periodic polling any sensor, significant delays sometimes appear. Switching on module clocks during resume lead to delays. Enabling autosuspend mode causes the controller to not suspend between SPI transfers and the delays disappear. Signed-off-by: Alexander Kochetkov Link: https://lore.kernel.org/r/20201016085014.31667-1-al.kochet@gmail.com Signed-off-by: Mark Brown commit ab8bcad67bee82e4be290b32f0faaf582d7c3edc Author: Paul E. McKenney Date: Tue Aug 4 14:00:17 2020 -0700 tools/memory-model: Move Documentation description to Documentation/README This commit moves the descriptions of the files residing in tools/memory-model/Documentation to a README file in that directory, leaving behind the description of tools/memory-model/Documentation/README itself. After this change, tools/memory-model/Documentation/README provides a guide to the files in the tools/memory-model/Documentation directory, guiding people with different skills and needs to the most appropriate starting point. Signed-off-by: Paul E. McKenney commit 9270e1a744f8ed953009b0e94b26ed0912d9ec1c Author: Alan Stern Date: Sat Oct 3 21:40:22 2020 -0400 tools: memory-model: Document that the LKMM can easily miss control dependencies Add a small section to the litmus-tests.txt documentation file for the Linux Kernel Memory Model explaining that the memory model often fails to recognize certain control dependencies. Suggested-by: Akira Yokosawa Signed-off-by: Alan Stern Reviewed-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit eeed6965071bfe686c36d414d9e48926baf3e757 Author: Bob Pearson Date: Fri Oct 9 11:51:13 2020 -0500 RDMA/rxe: Remove unused RXE_MR_TYPE_FMR This is a left over from the past. It is no longer used. Link: https://lore.kernel.org/r/20201009165112.271143-1-rpearson@hpe.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit 3c6bff3cf988fff5b19eee72435ac3251958229b Author: Joe Perches Date: Wed Oct 7 19:36:25 2020 -0700 RDMA: Convert sysfs kobject * show functions to use sysfs_emit() Done with cocci script: @@ identifier k_show; identifier arg1, arg2, arg3; @@ ssize_t k_show(struct kobject * - arg1 + kobj , struct kobj_attribute * - arg2 + attr , char * - arg3 + buf ) { ... ( - arg1 + kobj | - arg2 + attr | - arg3 + buf ) ... } @@ identifier k_show; identifier kobj, attr, buf; @@ ssize_t k_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) { <... return - sprintf(buf, + sysfs_emit(buf, ...); ...> } @@ identifier k_show; identifier kobj, attr, buf; @@ ssize_t k_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) { <... return - snprintf(buf, PAGE_SIZE, + sysfs_emit(buf, ...); ...> } @@ identifier k_show; identifier kobj, attr, buf; @@ ssize_t k_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) { <... return - scnprintf(buf, PAGE_SIZE, + sysfs_emit(buf, ...); ...> } @@ identifier k_show; identifier kobj, attr, buf; expression chr; @@ ssize_t k_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) { <... return - strcpy(buf, chr); + sysfs_emit(buf, chr); ...> } @@ identifier k_show; identifier kobj, attr, buf; identifier len; @@ ssize_t k_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) { <... len = - sprintf(buf, + sysfs_emit(buf, ...); ...> return len; } @@ identifier k_show; identifier kobj, attr, buf; identifier len; @@ ssize_t k_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) { <... len = - snprintf(buf, PAGE_SIZE, + sysfs_emit(buf, ...); ...> return len; } @@ identifier k_show; identifier kobj, attr, buf; identifier len; @@ ssize_t k_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) { <... len = - scnprintf(buf, PAGE_SIZE, + sysfs_emit(buf, ...); ...> return len; } @@ identifier k_show; identifier kobj, attr, buf; identifier len; @@ ssize_t k_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) { <... - len += scnprintf(buf + len, PAGE_SIZE - len, + len += sysfs_emit_at(buf, len, ...); ...> return len; } @@ identifier k_show; identifier kobj, attr, buf; expression chr; @@ ssize_t k_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) { ... - strcpy(buf, chr); - return strlen(buf); + return sysfs_emit(buf, chr); } Link: https://lore.kernel.org/r/7761c1efaebb96c432c85171d58405c25a824ccd.1602122880.git.joe@perches.com Signed-off-by: Joe Perches Reviewed-by: Jason Gunthorpe Acked-by: Jack Wang Signed-off-by: Jason Gunthorpe commit 1c7fd72687d619207e0f075dd1f1c749879d8021 Author: Joe Perches Date: Wed Oct 7 19:36:24 2020 -0700 RDMA: Convert sysfs device * show functions to use sysfs_emit() Done with cocci script: @@ identifier d_show; identifier dev, attr, buf; @@ ssize_t d_show(struct device *dev, struct device_attribute *attr, char *buf) { <... return - sprintf(buf, + sysfs_emit(buf, ...); ...> } @@ identifier d_show; identifier dev, attr, buf; @@ ssize_t d_show(struct device *dev, struct device_attribute *attr, char *buf) { <... return - snprintf(buf, PAGE_SIZE, + sysfs_emit(buf, ...); ...> } @@ identifier d_show; identifier dev, attr, buf; @@ ssize_t d_show(struct device *dev, struct device_attribute *attr, char *buf) { <... return - scnprintf(buf, PAGE_SIZE, + sysfs_emit(buf, ...); ...> } @@ identifier d_show; identifier dev, attr, buf; expression chr; @@ ssize_t d_show(struct device *dev, struct device_attribute *attr, char *buf) { <... return - strcpy(buf, chr); + sysfs_emit(buf, chr); ...> } @@ identifier d_show; identifier dev, attr, buf; identifier len; @@ ssize_t d_show(struct device *dev, struct device_attribute *attr, char *buf) { <... len = - sprintf(buf, + sysfs_emit(buf, ...); ...> return len; } @@ identifier d_show; identifier dev, attr, buf; identifier len; @@ ssize_t d_show(struct device *dev, struct device_attribute *attr, char *buf) { <... len = - snprintf(buf, PAGE_SIZE, + sysfs_emit(buf, ...); ...> return len; } @@ identifier d_show; identifier dev, attr, buf; identifier len; @@ ssize_t d_show(struct device *dev, struct device_attribute *attr, char *buf) { <... len = - scnprintf(buf, PAGE_SIZE, + sysfs_emit(buf, ...); ...> return len; } @@ identifier d_show; identifier dev, attr, buf; identifier len; @@ ssize_t d_show(struct device *dev, struct device_attribute *attr, char *buf) { <... - len += scnprintf(buf + len, PAGE_SIZE - len, + len += sysfs_emit_at(buf, len, ...); ...> return len; } @@ identifier d_show; identifier dev, attr, buf; expression chr; @@ ssize_t d_show(struct device *dev, struct device_attribute *attr, char *buf) { ... - strcpy(buf, chr); - return strlen(buf); + return sysfs_emit(buf, chr); } Link: https://lore.kernel.org/r/7f406fa8e3aa2552c022bec680f621e38d1fe414.1602122879.git.joe@perches.com Signed-off-by: Joe Perches Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 676a80adba0131e1603ef3de5f73a19a0d3d0e65 Author: Jason Gunthorpe Date: Sat Oct 3 20:20:11 2020 -0300 RDMA: Remove AH from uverbs_cmd_mask Drivers that need a uverbs AH should instead set the create_user_ah() op similar to reg_user_mr(). MODIFY_AH and QUERY_AH cmds were never implemented so are just deleted. Link: https://lore.kernel.org/r/11-v1-caa70ba3d1ab+1436e-ucmd_mask_jgg@nvidia.com Signed-off-by: Jason Gunthorpe commit 628c02bf38aa42c09c3dde61284ba348290e6650 Author: Jason Gunthorpe Date: Sat Oct 3 20:20:10 2020 -0300 RDMA: Remove uverbs cmds from drivers that don't use them Allowing userspace to invoke these commands is probably going to crash these drivers as they are not tested and not expecting to use them on a user object. For example pvrdma touches cq->ring_state which is not initialized for user QPs. These commands are effected: - IB_USER_VERBS_CMD_REQ_NOTIFY_CQ is ibv_cmd_req_notify_cq() in rdma-core, only hfi1, ipath and rxe calls it. - IB_USER_VERBS_CMD_POLL_CQ is ibv_cmd_poll_cq() in rdma-core, only ipath and hfi1 calls it. - IB_USER_VERBS_CMD_POST_SEND/RECV is ibv_cmd_post_send/recv() in rdma-core, only ipath and hfi1 call them. - IB_USER_VERBS_CMD_POST_SRQ_RECV is ibv_cmd_post_srq_recv() in rdma-core, only ipath and hfi1 calls it. - IB_USER_VERBS_CMD_PEEK_CQ isn't even implemented anywhere - IB_USER_VERBS_CMD_CREATE/DESTROY_AH is ibv_cmd_create/destroy_ah() in rdma-core, only bnxt_re, efa, hfi1, ipath, mlx5, orcrdma, and rxe call it. Link: https://lore.kernel.org/r/10-v1-caa70ba3d1ab+1436e-ucmd_mask_jgg@nvidia.com Signed-off-by: Jason Gunthorpe commit bd2a40cc2463766ed1a55d94a4ccbdcd621da323 Author: Jason Gunthorpe Date: Sat Oct 3 20:20:09 2020 -0300 RDMA/core Remove uverbs_ex_cmd_mask No driver sets it, and the core code sets a maximum mask, simply remove it. Disabled operations are now handled either by having a NULL ops pointer, or by having the common driver callbacks check for unsupported extended attributes. Link: https://lore.kernel.org/r/9-v1-caa70ba3d1ab+1436e-ucmd_mask_jgg@nvidia.com Signed-off-by: Jason Gunthorpe commit 1f11a7610e50982150b90b31d1f749f6217fbde6 Author: Jason Gunthorpe Date: Sat Oct 3 20:20:08 2020 -0300 RDMA: Check create_flags during create_qp Each driver should check that the QP attrs create_flags is supported. Unfortuantely when create_flags was added to the QP attrs the drivers were not updated. uverbs_ex_cmd_mask was used to block it - even though kernel drivers use these flags too. Check that flags is zero in all drivers that don't use it, remove IB_USER_VERBS_EX_CMD_CREATE_QP from uverbs_ex_cmd_mask. Fix the error code to be EOPNOTSUPP. Link: https://lore.kernel.org/r/8-v1-caa70ba3d1ab+1436e-ucmd_mask_jgg@nvidia.com Signed-off-by: Jason Gunthorpe commit 1c407cb5d70568a57a32a0e6f5aee27c5083ef37 Author: Jason Gunthorpe Date: Sat Oct 3 20:20:07 2020 -0300 RDMA: Check flags during create_cq Each driver should check that the CQ attrs is supported. Unfortuantely when flags was added to the CQ attrs the drivers were not updated, uverbs_ex_cmd_mask was used to block it. This was missed when create CQ was converted to ioctl, so non-zero flags could have been passed into drivers. Check that flags is zero in all drivers that don't use it, remove IB_USER_VERBS_EX_CMD_CREATE_CQ from uverbs_ex_cmd_mask. Fixes: 41b2a71fc848 ("IB/uverbs: Move ioctl path of create_cq and destroy_cq to a new file") Link: https://lore.kernel.org/r/7-v1-caa70ba3d1ab+1436e-ucmd_mask_jgg@nvidia.com Signed-off-by: Jason Gunthorpe commit 26e990badde40b2fb824bfa3cb9d4288a79584bc Author: Jason Gunthorpe Date: Sat Oct 3 20:20:06 2020 -0300 RDMA: Check attr_mask during modify_qp Each driver should check that it can support the provided attr_mask during modify_qp. IB_USER_VERBS_EX_CMD_MODIFY_QP was being used to block modify_qp_ex because the driver didn't check RATE_LIMIT. Link: https://lore.kernel.org/r/6-v1-caa70ba3d1ab+1436e-ucmd_mask_jgg@nvidia.com Signed-off-by: Jason Gunthorpe commit 652caba5b5501258a46d4b9279e0dbb6e5d42d75 Author: Jason Gunthorpe Date: Sat Oct 3 20:20:05 2020 -0300 RDMA: Check srq_type during create_srq uverbs was blocking srq_types the driver doesn't support based on the CREATE_XSRQ cmd_mask. Fix all drivers to check for supported srq_types during create_srq and move CREATE_XSRQ to the core code. Link: https://lore.kernel.org/r/5-v1-caa70ba3d1ab+1436e-ucmd_mask_jgg@nvidia.com Signed-off-by: Jason Gunthorpe commit 44ce37bc8bf30283d16c5e5f20964b638bebd429 Author: Jason Gunthorpe Date: Sat Oct 3 20:20:04 2020 -0300 RDMA: Move more uverbs_cmd_mask settings to the core These functions all depend on the driver providing a specific op: - REREG_MR is rereg_user_mr(). bnxt_re set this without providing the op - ATTACH/DEATCH_MCAST is attach_mcast()/detach_mcast(). usnic set this without providing the op - OPEN_QP doesn't involve the driver but requires a XRCD. qedr provides xrcd but forgot to set it, usnic doesn't provide XRCD but set it anyhow. - OPEN/CLOSE_XRCD are the ops alloc_xrcd()/dealloc_xrcd() - CREATE_SRQ/DESTROY_SRQ are the ops create_srq()/destroy_srq() - QUERY/MODIFY_SRQ is op query_srq()/modify_srq(). hns sets this but sometimes supplies a NULL op. - RESIZE_CQ is op resize_cq(). bnxt_re sets this boes doesn't supply an op - ALLOC/DEALLOC_MW is alloc_mw()/dealloc_mw(). cxgb4 provided an (now deleted) implementation but no userspace All drivers were checked that no drivers provide the op without also setting uverbs_cmd_mask so this should have no functional change. Link: https://lore.kernel.org/r/4-v1-caa70ba3d1ab+1436e-ucmd_mask_jgg@nvidia.com Signed-off-by: Jason Gunthorpe commit c074bb1e30f9b51032245300798613a290e42f25 Author: Jason Gunthorpe Date: Sat Oct 3 20:20:03 2020 -0300 RDMA: Remove elements in uverbs_cmd_mask that all drivers set This is a step toward eliminating uverbs_cmd_mask. Preset this list in the core code. Only the op reg_user_mr wasn't already being required from the drivers. Link: https://lore.kernel.org/r/3-v1-caa70ba3d1ab+1436e-ucmd_mask_jgg@nvidia.com Signed-off-by: Jason Gunthorpe commit b8e3130dd96b7b2d6d92e62dcd1515af30212fe2 Author: Jason Gunthorpe Date: Sat Oct 3 20:20:02 2020 -0300 RDMA: Remove uverbs_ex_cmd_mask values that are linked to functions Since a while now the uverbs layer checks if the driver implements a function before allowing the ucmd to proceed. This largely obsoletes the cmd_mask stuff, but there is some tricky bits in drivers preventing it from being removed. Remove the easy elements of uverbs_ex_cmd_mask by pre-setting them in the core code. These are triggered soley based on the related ops function pointer. query_device_ex is not triggered based on an op, but all drivers already implement something compatible with the extension, so enable it globally too. Link: https://lore.kernel.org/r/2-v1-caa70ba3d1ab+1436e-ucmd_mask_jgg@nvidia.com Signed-off-by: Jason Gunthorpe commit c8ed1ff88c02e55bf9fa3244624e431f4f374077 Author: Bodo Stroesser Date: Mon Oct 19 13:51:18 2020 +0200 scsi: target: tcmu: scatter_/gather_data_area() rework scatter_data_area() and gather_data_area() are not easy to understand since data is copied in nested loops over sg_list and tcmu dbi list. Since sg list can contain only partly filled pages, the loop has to be prepared to handle sg pages not matching dbi pages one by one. Existing implementation uses kmap_atomic()/kunmap_atomic() due to performance reasons. But instead of using these calls strictly nested for sg and dpi pages, the code holds the mappings in an overlapping way, which indeed is a bug that would trigger on archs using highmem. The scatterlist lib contains the sg_miter_start/_next/_stop functions which can be used to simplify such complicated loops. The new code now processes the dbi list in the outer loop, while sg list is handled by the inner one. That way the code can take advantage of the sg_miter_* family calls. Calling sg_miter_stop() after the end of the inner loop enforces strict nesting of atomic kmaps. Since the nested loops in scatter_/gather_data_area were very similar, I replaced them by the new helper function tcmu_copy_data(). Link: https://lore.kernel.org/r/20201019115118.11949-1-bostroesser@gmail.com Acked-by: Mike Christie Signed-off-by: Bodo Stroesser Signed-off-by: Martin K. Petersen commit a5c29a262ebe4c5b85643bac833b9e7e00ebe8a4 Author: Jason Gunthorpe Date: Sat Oct 3 20:20:01 2020 -0300 RDMA/cxgb4: Remove MW support This driver never enabled IB_USER_VERBS_CMD_ALLOC_MW so memory windows were not usable from userspace. The kernel side was removed long ago. Drop this dead code. Fixes: feb7c1e38bcc ("IB: remove in-kernel support for memory windows") Link: https://lore.kernel.org/r/1-v1-caa70ba3d1ab+1436e-ucmd_mask_jgg@nvidia.com Signed-off-by: Jason Gunthorpe commit b9dd44fd79a1ed7ee8e7c7644ddbd803b6acfd9c Author: Tom Rix Date: Mon Oct 19 12:19:50 2020 -0700 scsi: message: fusion: Remove unneeded break A break is not needed if it is preceded by a return. Link: https://lore.kernel.org/r/20201019191950.10244-1-trix@redhat.com Signed-off-by: Tom Rix Signed-off-by: Martin K. Petersen commit 170b7d2de29e6239b8dbc63a88de1fa9789b0d8d Author: Tom Rix Date: Mon Oct 19 07:23:33 2020 -0700 scsi: Remove unneeded break statements A break is not needed if it is preceded by a return or goto. Link: https://lore.kernel.org/r/20201019142333.16584-1-trix@redhat.com Signed-off-by: Tom Rix Signed-off-by: Martin K. Petersen commit 53839b51a7671eeb3fb44d479d541cf3a0f2dd45 Author: Kamal Heib Date: Wed Oct 21 14:49:52 2020 +0300 RDMA/bnxt_re: Set queue pair state when being queried The API for ib_query_qp requires the driver to set cur_qp_state on return, add the missing set. Fixes: 1ac5a4047975 ("RDMA/bnxt_re: Add bnxt_re RoCE driver") Link: https://lore.kernel.org/r/20201021114952.38876-1-kamalheib1@gmail.com Signed-off-by: Kamal Heib Acked-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit 345980a3a5e5e1c99fc621e2ce878fb150ad2287 Author: Alexander Kochetkov Date: Thu Oct 22 10:52:21 2020 +0300 spi: spi-sun6i: implement DMA-based transfer mode DMA-based transfer will be enabled if data length is larger than FIFO size (64 bytes for A64). This greatly reduce number of interrupts for transferring data. For smaller data size PIO mode will be used. In PIO mode whole buffer will be loaded into FIFO. If driver failed to request DMA channels then it fallback for PIO mode. Tested on SOPINE (https://www.pine64.org/sopine/) Signed-off-by: Alexander Kochetkov Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/20201022075221.23332-1-akochetkov@lintech.ru Signed-off-by: Mark Brown commit 434ee425195097865acc42744cfd0d73f5395cef Author: Shyam Sundar Date: Wed Oct 21 02:27:15 2020 -0700 scsi: fc: Update documentation of sysfs nodes for FPIN stats Update documentation for sysfs nodes within: /sys/class/fc_host /sys/class/fc_remote_ports Link: https://lore.kernel.org/r/20201021092715.22669-6-njavali@marvell.com Reviewed-by: James Smart Reviewed-by: Himanshu Madhani Signed-off-by: Shyam Sundar Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 846101960fdbe312efac13ae4843410f516ff599 Author: Shyam Sundar Date: Wed Oct 21 02:27:14 2020 -0700 scsi: fc: Add mechanism to update FPIN signal statistics Under fc_host_statistics add statistics for Congestion Signals that are delivered to the host as interrupt signals. Link: https://lore.kernel.org/r/20201021092715.22669-5-njavali@marvell.com Reviewed-by: James Smart Reviewed-by: Himanshu Madhani Signed-off-by: Shyam Sundar Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 3dcfe0de5a9752e646a61f4ce513ac059960c7c3 Author: Shyam Sundar Date: Wed Oct 21 02:27:13 2020 -0700 scsi: fc: Parse FPIN packets and update statistics Parse the incoming FPIN packets and update the host and rport FPIN statistics based on the FPINs. Link: https://lore.kernel.org/r/20201021092715.22669-4-njavali@marvell.com Reviewed-by: Himanshu Madhani Reviewed-by: James Smart Signed-off-by: Shyam Sundar Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 547aab51a914e1f18394d8238ef9fb4f76d5b491 Author: Shyam Sundar Date: Wed Oct 21 02:27:12 2020 -0700 scsi: fc: Add FPIN statistics to fc_host and fc_rport objects Add a structure for holding FPIN statistics, for host & rport respectively, and add associated sysfs nodes: /sys/class/fc_host/hostXX/statistics/ /sys/class/fc_remote_ports/rport-XX\:Y-Z/statistics/ Link: https://lore.kernel.org/r/20201021092715.22669-3-njavali@marvell.com Reviewed-by: James Smart Reviewed-by: Himanshu Madhani Signed-off-by: Shyam Sundar Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 874163aab75a6cd7422e71f1fbc6db12977fcf1d Author: Shyam Sundar Date: Wed Oct 21 02:27:11 2020 -0700 scsi: fc: Update formal FPIN descriptor definitions Add Fabric Performance Impact Notification (FPIN) descriptor definitions for the following FPINs: - Delivery Notification Descriptor - Peer Congestion Notification Descriptor - Congestion Notification Descriptor Link: https://lore.kernel.org/r/20201021092715.22669-2-njavali@marvell.com Reviewed-by: James Smart Reviewed-by: Himanshu Madhani Signed-off-by: Shyam Sundar Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit bb4b1e3f0c8772eff0f4d22f725f6eaba9540c52 Merge: 778279f4f5e4e 80e8eaab5e98f Author: Bjorn Andersson Date: Mon Oct 26 16:13:30 2020 -0500 Merge tag '20201013212531.428538-1-dianders@chromium.org' into drivers-for-5.11 commit 778279f4f5e4e89ff31803ba48135256563825c2 Author: Lina Iyer Date: Thu Oct 1 09:41:44 2020 -0600 soc: qcom: cmd-db: allow loading as a module This patch enables Command DB driver to be loaded as a module. Command DB is inherent to RPMH interaction and as such would never be unloaded. Add supress_bind_attrs to make it a permanently loaded module. Reviewed-by: John Stultz Reviewed-by: Greg Kroah-Hartman Tested-by: John Stultz Signed-off-by: Lina Iyer Link: https://lore.kernel.org/r/20201001154144.5226-1-ilina@codeaurora.org Signed-off-by: Bjorn Andersson commit f88d47190a1f379c5c0a113ed79832f3fff69579 Merge: 390d828f56a60 d4189bc55d5c4 Author: Mark Brown Date: Mon Oct 26 20:56:59 2020 +0000 Merge series " [PATCH v2 0/5]" from Dmitry Baryshkov : On SM8250 MDSS_GDSC (and the rest of display clock controller) is supplied power by MMCX power domain. Handle this link in GDSC code by binding the power domain in dts file. This patchset depends on [1] Changes since v1: - Define fixed-regulator-domain regulator using power domain performance state for enabling/disabling. - Rework to use new fixed regulator type (fixed-regulator-domain) instead of controlling power domain directly from gdsc code. Changes since RFC: - Fix naming of gdsc_supply_on/gdsc_supply_off functions - Fix detaching of solo gdsc's power domain in error handling code - Drop the dts patch, as respective display nodes are still not submitted to the mailing list. [1] https://lore.kernel.org/linux-arm-msm/20200927190653.13876-1-jonathan@marek.ca/ commit 390d828f56a602c9201601bff1170d9d2bf5801c Author: Colin Ian King Date: Fri Oct 16 23:22:35 2020 +0100 regulator: lp872x: make a const array static, makes object smaller Don't populate const array lp872x_num_regulators on the stack but instead make it static. Makes the object code smaller by 29 bytes. Before: text data bss dec hex filename 18441 4624 64 23129 5a59 drivers/regulator/lp872x.o After: text data bss dec hex filename 18316 4720 64 23100 5a3c drivers/regulator/lp872x.o (gcc version 10.2.0) Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20201016222235.686981-1-colin.king@canonical.com Signed-off-by: Mark Brown commit c5ff0c1950e598e144f7327fe75681b566b540cf Author: Takashi Iwai Date: Fri Oct 23 09:46:56 2020 +0200 drm/amd/display: Clean up debug macros This patch simplifies the ASSERT*() and BREAK_TO_DEBUGGER() macros: - Move the dependency check of CONFIG_KGDB into Kconfig - Unify the kgdb_breakpoint() call - Drop the non-existing CONFIG_HAVE_KGDB Also align the behavior of ASSERT() macro in both cases with and without CONFIG_DEBUG_KERNEL_DC. Acked-by: Alex Deucher Reviewed-by: Nicholas Kazlauskas Signed-off-by: Takashi Iwai Signed-off-by: Alex Deucher commit 0ca3418272a230a16d87d3302839d0ca1255f378 Author: Takashi Iwai Date: Fri Oct 23 09:46:55 2020 +0200 drm/amd/display: Don't invoke kgdb_breakpoint() unconditionally ASSERT_CRITICAL() invokes kgdb_breakpoint() whenever either CONFIG_KGDB or CONFIG_HAVE_KGDB is set. This, however, may lead to a kernel panic when no kdb stuff is attached, since the kgdb_breakpoint() call issues INT3. It's nothing but a surprise for normal end-users. For avoiding the pitfall, make the kgdb_breakpoint() call only when CONFIG_DEBUG_KERNEL_DC is set. https://bugzilla.opensuse.org/show_bug.cgi?id=1177973 Cc: Acked-by: Alex Deucher Reviewed-by: Nicholas Kazlauskas Signed-off-by: Takashi Iwai Signed-off-by: Alex Deucher commit 594b6f7370a84ae7fd87e16e2e8560874a01d70c Author: Takashi Iwai Date: Fri Oct 23 09:46:54 2020 +0200 drm/amd/display: Fix kernel panic by dal_gpio_open() error Currently both error code paths handled in dal_gpio_open_ex() issues ASSERT_CRITICAL(), and this leads to a kernel panic unnecessarily if CONFIG_KGDB is enabled. Since basically both are non-critical errors and can be recovered, drop those assert calls and use a safer one, BREAK_TO_DEBUGGER(), for allowing the debugging, instead. BugLink: https://bugzilla.opensuse.org/show_bug.cgi?id=1177973 Cc: Acked-by: Alex Deucher Reviewed-by: Nicholas Kazlauskas Signed-off-by: Takashi Iwai Signed-off-by: Alex Deucher commit 44ea03e17ef5ca4a5f527ffbb26c57d16758bac9 Author: Sumera Priyadarsini Date: Mon Oct 26 23:42:42 2020 +0530 drm/amdgpu: use true and false for bool initialisations Bool initialisation should use 'true' and 'false' values instead of 0 and 1. Modify amdgpu_amdkfd_gpuvm.c to initialise variable is_imported to false instead of 0. Issue found with Coccinelle. Signed-off-by: Sumera Priyadarsini Signed-off-by: Alex Deucher commit d4189bc55d5c40251abaa1f341796aac84ddfb10 Author: Dmitry Baryshkov Date: Fri Oct 23 16:19:21 2020 +0300 regulator: fixed: provide bindings using power domain Define bindings for fixed regulator using power domain performance state to enable/disable corresponding regulator. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20201023131925.334864-2-dmitry.baryshkov@linaro.org Signed-off-by: Mark Brown commit bf3a28cf42412c0a85631da94f198048bb37a8e5 Author: Dmitry Baryshkov Date: Fri Oct 23 16:19:22 2020 +0300 regulator: fixed: support using power domain for enable/disable Adds possibility to choose the compatible "fixed-regulator-domain" for regulators which use power domain for enabling/disabling corresponding regulator. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20201023131925.334864-3-dmitry.baryshkov@linaro.org Signed-off-by: Mark Brown commit 2316822989a33308e8a428d495e89f767b367c01 Author: Arnd Bergmann Date: Mon Oct 26 17:05:23 2020 +0100 remoteproc: ti_k3: fix -Wcast-function-type warning The function cast causes a warning with "make W=1" drivers/remoteproc/ti_k3_r5_remoteproc.c: In function 'k3_r5_probe': drivers/remoteproc/ti_k3_r5_remoteproc.c:1368:12: warning: cast between incompatible function types from 'int (*)(struct platform_device *)' to 'void (*)(void *)' [-Wcast-function-type] Rewrite the code to avoid the cast, and fix the incorrect return type of the callback. Fixes: 6dedbd1d5443 ("remoteproc: k3-r5: Add a remoteproc driver for R5F subsystem") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20201026160533.3705998-1-arnd@kernel.org Signed-off-by: Bjorn Andersson commit 4a434abc40d2a0c15032f88e30aeb7ad271ba795 Author: Kevin Hilman Date: Mon Sep 21 15:11:19 2020 -0700 firmware: meson-sm: enable build as module Enable secure module driver as module. Default remains built-in. Signed-off-by: Kevin Hilman commit 2ee1b42e8a0d698daf5553257e51432f84c230f7 Merge: 3650b228f83ad 43b6bf406cd03 Author: Mark Brown Date: Mon Oct 26 20:28:19 2020 +0000 Merge existing fixes from spi/for-5.10 commit 01c77cae836a998c4f69fa6349b31121bdaffd0c Merge: 3650b228f83ad 43c3e148830aa Author: Mark Brown Date: Mon Oct 26 20:28:11 2020 +0000 Merge existing fixes from regulator/for-5.10 commit b35f80f2e3229ddc59a616ec0f085ef73278c3bf Author: Lukasz Luba Date: Wed Jul 8 16:34:20 2020 +0100 ARM: dts: exynos: Remove interrupts from DMC controller in Exynos5422 The interrupts in Dynamic Memory Controller in Exynos5422 and Odroid XU3-family boards are no longer needed. They have been used in order to workaround some issues in scheduled work in devfreq. Now when the devfreq framework design is improved, remove the interrupt driven approach and rely on devfreq monitoring mechanism with fixed intervals. Reported-by: Willy Wolff Signed-off-by: Lukasz Luba Link: https://lore.kernel.org/r/20200708153420.29484-3-lukasz.luba@arm.com Signed-off-by: Krzysztof Kozlowski commit 6e1e90ec027509a7e8d4efbd77a65b32b5a8b3ec Author: Adrian Ratiu Date: Wed Oct 14 23:30:24 2020 +0300 regmap: mmio: add config option to allow relaxed MMIO accesses On some platforms (eg armv7 due to the CONFIG_ARM_DMA_MEM_BUFFERABLE) MMIO R/W operations always add memory barriers which can increase load, decrease battery life or in general reduce performance unnecessarily on devices which access a lot of configuration registers and where ordering does not matter (eg. media accelerators like the Verisilicon / Hantro video decoders). Drivers used to call the relaxed MMIO variants directly but since they are now accessing the MMIO registers via regmaps (to compensate for different VPU HW reg layouts via regmap fields), there is a need for a relaxed API / config to preserve existing behaviour. Cc: Mark Brown Signed-off-by: Adrian Ratiu Link: https://lore.kernel.org/r/20201014203024.954369-1-adrian.ratiu@collabora.com Signed-off-by: Mark Brown commit 748f0d70087c56226bf1df1f91a00b7ab4c8f883 Author: Brahadambal Srinivasan Date: Fri Oct 23 20:55:27 2020 +0530 cpupower: Provide online and offline CPU information When a user tries to modify cpuidle or cpufreq properties on offline CPUs, the tool returns success (exit status 0) but also does not provide any warning message regarding offline cpus that may have been specified but left unchanged. In case of all or a few CPUs being offline, it can be difficult to keep track of which CPUs didn't get the new frequency or idle state set. Silent failures are difficult to keep track of when there are a huge number of CPUs on which the action is performed. This patch adds helper functions to find both online and offline CPUs and print them out accordingly. We use these helper functions in cpuidle-set and cpufreq-set to print an additional message if the user attempts to modify offline cpus. Reported-by: Pavithra R. Prakash Signed-off-by: Brahadambal Srinivasan Signed-off-by: Shuah Khan commit c5564a50d99019f3c713fa306d5feecc3e909b10 Author: Tom Rix Date: Tue Oct 20 06:15:20 2020 -0700 pinctrl: samsung: s3c24xx: remove unneeded break A break is not needed if it is preceded by a return. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20201020131520.29117-1-trix@redhat.com Signed-off-by: Krzysztof Kozlowski commit f44ca0871b7a98b075560711d48849914a102221 Author: Arnd Bergmann Date: Mon Oct 19 09:09:21 2020 +0200 qspinlock: use signed temporaries for cmpxchg When building with W=2, the build log is flooded with include/asm-generic/qrwlock.h:65:56: warning: pointer targets in passing argument 2 of 'atomic_try_cmpxchg_acquire' differ in signedness [-Wpointer-sign] include/asm-generic/qrwlock.h:92:53: warning: pointer targets in passing argument 2 of 'atomic_try_cmpxchg_acquire' differ in signedness [-Wpointer-sign] include/asm-generic/qspinlock.h:68:55: warning: pointer targets in passing argument 2 of 'atomic_try_cmpxchg_acquire' differ in signedness [-Wpointer-sign] include/asm-generic/qspinlock.h:82:52: warning: pointer targets in passing argument 2 of 'atomic_try_cmpxchg_acquire' differ in signedness [-Wpointer-sign] The atomics are built on top of signed integers, but the caller doesn't actually care. Just use signed types as well. Fixes: 27df89689e25 ("locking/spinlocks: Remove an instruction from spin and write locks") Signed-off-by: Arnd Bergmann commit e2bcad676c6bb36af4c1cec197ff1b89fb70af64 Author: Krzysztof Kozlowski Date: Fri Oct 2 17:57:13 2020 +0200 MAINTAINERS: add dt binding headers to memory controller drivers entry Cover also the include/dt-bindings/memory/ headers in the memory controller drivers entry. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201002155713.3569-1-krzk@kernel.org commit e8ea5764bdb144847a44de6113dba8d1ab19179e Author: Serge Semin Date: Tue Oct 20 14:59:56 2020 +0300 arm64: dts: exynos: Harmonize DWC USB3 DT nodes name In accordance with the DWC USB3 bindings the corresponding node name is suppose to comply with the Generic USB HCD DT schema, which requires the USB nodes to have the name acceptable by the regexp: "^usb(@.*)?" . Make sure the "snps,dwc3"-compatible nodes are correctly named. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20201020115959.2658-27-Sergey.Semin@baikalelectronics.ru Signed-off-by: Krzysztof Kozlowski commit 3e667f65cdc324be140a99179041a08b33ee61f5 Author: Serge Semin Date: Tue Oct 20 14:59:49 2020 +0300 ARM: dts: exynos: Harmonize DWC USB3 DT nodes name In accordance with the DWC USB3 bindings the corresponding node name is suppose to comply with the Generic USB HCD DT schema, which requires the USB nodes to have the name acceptable by the regexp: "^usb(@.*)?" . Make sure the "snps,dwc3"-compatible nodes are correctly named. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20201020115959.2658-20-Sergey.Semin@baikalelectronics.ru Signed-off-by: Krzysztof Kozlowski commit 214a7c874e266f79486f31465077d67957f18010 Author: Serge Semin Date: Tue Oct 20 14:59:34 2020 +0300 ARM: dts: exynos: Correct DWC USB3 compatible string Syonpsys IP cores are supposed to be defined with "snps" vendor-prefix. Use it instead of the deprecated "synopsys" one. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20201020115959.2658-5-Sergey.Semin@baikalelectronics.ru Signed-off-by: Krzysztof Kozlowski commit 4b6533c04ad97abeb6011f3028005aa62bb7737b Author: Krzysztof Kozlowski Date: Thu Oct 15 20:20:44 2020 +0200 ARM: dts: exynos: disable pull up of USB 3.0 over-current on Odroid XU The Odroid XU has external pull ups for USB 3.0 over-current pins, so disable the internal one. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201015182044.480562-4-krzk@kernel.org Tested-by: Gabriel Ribba Esteva commit bd7e7ff56feea7810df900fb09c9741d259861d9 Author: Krzysztof Kozlowski Date: Thu Oct 15 20:20:43 2020 +0200 ARM: dts: exynos: fix USB 3.0 pins supply being turned off on Odroid XU On Odroid XU LDO12 and LDO15 supplies the power to USB 3.0 blocks but the GPK GPIO pins are supplied by LDO7 (VDDQ_LCD). LDO7 also supplies GPJ GPIO pins. The Exynos pinctrl driver does not take any supplies, so to have entire GPIO block always available, make the regulator always on. Fixes: 88644b4c750b ("ARM: dts: exynos: Configure PWM, usb3503, PMIC and thermal on Odroid XU board") Signed-off-by: Krzysztof Kozlowski Cc: Link: https://lore.kernel.org/r/20201015182044.480562-3-krzk@kernel.org Tested-by: Gabriel Ribba Esteva commit 3d992fd8f4e0f09c980726308d2f2725587b32d6 Author: Krzysztof Kozlowski Date: Thu Oct 15 20:20:42 2020 +0200 ARM: dts: exynos: fix USB 3.0 VBUS control and over-current pins on Exynos5410 The VBUS control (PWREN) and over-current pins of USB 3.0 DWC3 controllers are on Exynos5410 regular GPIOs. This is different than for example on Exynos5422 where these are special ETC pins with proper reset values (pulls, functions). Therefore these pins should be configured to enable proper USB 3.0 peripheral and host modes. This also fixes over-current warning: [ 6.024658] usb usb4-port1: over-current condition [ 6.028271] usb usb3-port1: over-current condition Fixes: cb0896562228 ("ARM: dts: exynos: Add USB to Exynos5410") Signed-off-by: Krzysztof Kozlowski Cc: Link: https://lore.kernel.org/r/20201015182044.480562-2-krzk@kernel.org Tested-by: Gabriel Ribba Esteva commit ecc1ff532b499d20304a4f682247137025814c34 Author: Krzysztof Kozlowski Date: Thu Oct 15 20:20:41 2020 +0200 ARM: dts: exynos: fix roles of USB 3.0 ports on Odroid XU On Odroid XU board the USB3-0 port is a microUSB and USB3-1 port is USB type A (host). The roles were copied from Odroid XU3 (Exynos5422) design which has it reversed. Fixes: 8149afe4dbf9 ("ARM: dts: exynos: Add initial support for Odroid XU board") Signed-off-by: Krzysztof Kozlowski Cc: Link: https://lore.kernel.org/r/20201015182044.480562-1-krzk@kernel.org Tested-by: Gabriel Ribba Esteva commit c19345ea65a86c0936a3ce04a4035532c77f0187 Author: Marek Szyprowski Date: Fri Oct 9 15:49:07 2020 +0200 ARM: multi_v7_defconfig: enable sound driver for Midas platform Sound driver for Midas platform (Exnyos4412 SoC based) has been recently merged, so enable it for tests like other sound drivers for Exynos based boards. Signed-off-by: Marek Szyprowski Link: https://lore.kernel.org/r/20201009134907.4578-1-m.szyprowski@samsung.com Signed-off-by: Krzysztof Kozlowski commit 95f075fec383bd15cb0297254d84d3bd880eba9d Author: Marek Szyprowski Date: Fri Oct 9 15:48:55 2020 +0200 ARM: exynos_defconfig: enable sound driver for Midas platform Sound driver for Midas platform (Exnyos4412 SoC based) has been recently merged, so enable it for tests like other sound drivers for Exynos based boards. Signed-off-by: Marek Szyprowski Link: https://lore.kernel.org/r/20201009134855.4520-1-m.szyprowski@samsung.com Signed-off-by: Krzysztof Kozlowski commit 4ab17ed1318609da5c36cb7e427a1d24e52a7d6f Author: Michael Kao Date: Wed Oct 7 10:43:32 2020 +0800 thermal: core: Add upper and lower limits to power_actor_set_power The upper and lower limits of thermal throttle state in the DT do not apply to the Intelligent Power Allocation (IPA) governor. Add the clamping for cooling device upper and lower limits in the power_actor_set_power() used by IPA. Signed-off-by: Michael Kao Reviewed-by: Lukasz Luba Tested-by: Lukasz Luba Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201007024332.30322-1-michael.kao@mediatek.com commit 4a6dbc65f6efa76a10ae6b64ad30ea12a991d7f0 Author: Alexander Dahl Date: Mon Oct 5 22:34:46 2020 +0200 ARM: dts: exynos: Fix schema warnings for pwm-leds The node names for devices using the pwm-leds driver follow a certain naming scheme (now). Parent node name is not enforced, but recommended by DT project. arch/arm/boot/dts/exynos5410-odroidxu.dt.yaml: pwmleds: 'blueled', 'greenled' do not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+' arch/arm/boot/dts/exynos5422-odroidhc1.dt.yaml: pwmleds: 'blueled' does not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+' From schema: Documentation/devicetree/bindings/leds/leds-pwm.yaml Signed-off-by: Alexander Dahl Link: https://lore.kernel.org/r/20201005203451.9985-8-post@lespocky.de Signed-off-by: Krzysztof Kozlowski commit 46bbf461a313a6f40d5a92d2d3fda948b1f2beae Merge: 7a25748ba0c67 64e2c37ea0354 Author: Mark Brown Date: Mon Oct 26 18:37:17 2020 +0000 Merge series "ASoC: SOF: cleanups for 5.10" from Kai Vehmanen : Series with multiple code cleanups, plus one fix to remove unnecessary kernel warnings related to firmware loading. Bard Liao (1): ASoC: SOF: loader: handle all SOF_IPC_EXT types Pierre-Louis Bossart (3): ASoC: SOF: control: remove const in sizeof() ASoC: SOF: topology: remove const in sizeof() ASoC: SOF: sof-audio: remove goto used for force-nocodec support sound/soc/sof/control.c | 20 ++++++++++---------- sound/soc/sof/loader.c | 5 +++++ sound/soc/sof/sof-audio.c | 10 +++------- sound/soc/sof/topology.c | 2 +- 4 files changed, 19 insertions(+), 18 deletions(-) -- 2.27.0 commit 7a25748ba0c67194b4760ce93c46eddf5b288fbd Merge: 0d8902d57646d 0afb88d5a6024 Author: Mark Brown Date: Mon Oct 26 18:37:16 2020 +0000 Merge series "DAI driver for new XCVR IP" from "Viorel Suman (OSS)" Viorel Suman : From: Viorel Suman DAI driver for new XCVR IP found in i.MX8MP. Viorel Suman (2): ASoC: fsl_xcvr: Add XCVR ASoC CPU DAI driver ASoC: dt-bindings: fsl_xcvr: Add document for XCVR Changes since v1: - improved 6- and 12-ch layout comment - used regmap polling function, improved clocks handling in runtime_resume - added FW size check in FW load function, improved IRQ handler, removed dummy IRQ handlers - fixed yaml file Changes since v2: - used devm_reset_control_get_exclusive instead of of_reset_control_get - moved reset_control_assert into runtime_suspend Changes since v3: - removed "firmware-name" DTS property from both documentation and source code by porting it into SoC specific 'compatible' data structure. .../devicetree/bindings/sound/fsl,xcvr.yaml | 104 ++ sound/soc/fsl/Kconfig | 10 + sound/soc/fsl/Makefile | 2 + sound/soc/fsl/fsl_xcvr.c | 1359 +++++++++++++++++ sound/soc/fsl/fsl_xcvr.h | 266 ++++ 5 files changed, 1741 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/fsl,xcvr.yaml create mode 100644 sound/soc/fsl/fsl_xcvr.c create mode 100644 sound/soc/fsl/fsl_xcvr.h -- 2.26.2 commit 0d8902d57646df202ad7bf602c734220d65fe75d Merge: 155eacf880b86 4662c59688b8d Author: Mark Brown Date: Mon Oct 26 18:37:15 2020 +0000 Merge series "ASoC: merge soc_pcm_hw_param() rollback and soc_pcm_hw_free()" from Kuninori Morimoto : Hi Mark soc_pcm_hw_params() does rollback when failed (A), but, it is almost same as soc_pcm_hw_free(). static int soc_pcm_hw_params(xxx) { ... if (ret < 0) goto xxx_err; ... return ret; ^ component_err: | ... | interface_err: (A) ... | codec_err: | ... v return ret; } This kind of duplicated code can be a hotbed of bugs, thus, this patch-set share soc_pcm_hw_free() and rollback. Kuninori Morimoto (6): ASoC: soc.h: remove for_each_rtd_dais_rollback() ASoC: soc-pcm: move soc_pcm_hw_free() next to soc_pcm_hw_params() ASoC: soc-link: add mark for snd_soc_link_hw_params/free() ASoC: soc-component: add mark for snd_soc_pcm_component_hw_params/free() ASoC: soc-dai: add mark for snd_soc_dai_hw_params/free() ASoC: soc-pcm: add soc_pcm_hw_clean() and call it from soc_pcm_hw_params/free() include/sound/soc-component.h | 6 +- include/sound/soc-dai.h | 4 +- include/sound/soc-link.h | 3 +- include/sound/soc.h | 7 +- sound/soc/soc-component.c | 19 ++--- sound/soc/soc-dai.c | 13 +++- sound/soc/soc-dapm.c | 4 +- sound/soc/soc-link.c | 12 +++- sound/soc/soc-pcm.c | 131 ++++++++++++++-------------------- 9 files changed, 97 insertions(+), 102 deletions(-) -- 2.25.1 commit 155eacf880b86b7797e20b7841611323a0918b87 Merge: 9c9c0076146b5 aa2e2785545aa Author: Mark Brown Date: Mon Oct 26 18:37:13 2020 +0000 Merge series "ASoC: qcom: add support for QRB5165 RB5 machine" from Srinivas Kandagatla : This patchset adds support to Qualcomm Robotics RB5 Development Kit based on QRB5165 Robotics SoC. This board has 2 WSA881X smart speakers with onboard DMIC connected to internal LPASS codec via WSA and VA macros respectively. Srinivas Kandagatla (2): ASoC: qcom: dt-bindings: Add SM8250 sound card bindings ASoC: qcom: sm8250: add sound card qrb5165-rb5 support .../bindings/sound/qcom,sm8250.yaml | 161 +++++++++++++ sound/soc/qcom/Kconfig | 11 + sound/soc/qcom/Makefile | 2 + sound/soc/qcom/sm8250.c | 228 ++++++++++++++++++ 4 files changed, 402 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/qcom,sm8250.yaml create mode 100644 sound/soc/qcom/sm8250.c -- 2.21.0 commit 9c9c0076146b5abc70c4f9a830c0529229ae7b49 Merge: d6981c3b575b5 a1344daeab95b Author: Mark Brown Date: Mon Oct 26 18:37:12 2020 +0000 Merge series "use semicolons rather than commas to separate statements" from Julia Lawall : These patches replace commas by semicolons. This was done using the Coccinelle semantic patch (http://coccinelle.lip6.fr/) shown below. This semantic patch ensures that commas inside for loop headers will not be transformed. It also doesn't touch macro definitions. Coccinelle ensures that braces are added as needed when a single-statement branch turns into a multi-statement one. This semantic patch has a few false positives, for variable delcarations such as: LIST_HEAD(x), *y; The semantic patch could be improved to avoid these, but for the moment they have been removed manually (2 occurrences). // @initialize:ocaml@ @@ let infunction p = (* avoid macros *) (List.hd p).current_element <> "something_else" let combined p1 p2 = (List.hd p1).line_end = (List.hd p2).line || (((List.hd p1).line_end < (List.hd p2).line) && ((List.hd p1).col < (List.hd p2).col)) @bad@ statement S; declaration d; position p; @@ S@p d // special cases where newlines are needed (hope for no more than 5) @@ expression e1,e2; statement S; position p != bad.p; position p1; position p2 : script:ocaml(p1) { infunction p1 && combined p1 p2 }; @@ - e1@p1,@S@p e2@p2; + e1; e2; @@ expression e1,e2; statement S; position p != bad.p; position p1; position p2 : script:ocaml(p1) { infunction p1 && combined p1 p2 }; @@ - e1@p1,@S@p e2@p2; + e1; e2; @@ expression e1,e2; statement S; position p != bad.p; position p1; position p2 : script:ocaml(p1) { infunction p1 && combined p1 p2 }; @@ - e1@p1,@S@p e2@p2; + e1; e2; @@ expression e1,e2; statement S; position p != bad.p; position p1; position p2 : script:ocaml(p1) { infunction p1 && combined p1 p2 }; @@ - e1@p1,@S@p e2@p2; + e1; e2; @@ expression e1,e2; statement S; position p != bad.p; position p1; position p2 : script:ocaml(p1) { infunction p1 && combined p1 p2 }; @@ - e1@p1,@S@p e2@p2; + e1; e2; @r@ expression e1,e2; statement S; position p != bad.p; @@ e1 ,@S@p e2; @@ expression e1,e2; position p1; position p2 : script:ocaml(p1) { infunction p1 && not(combined p1 p2) }; statement S; position r.p; @@ e1@p1 -,@S@p +; e2@p2 ... when any // --- sound/firewire/fireworks/fireworks_pcm.c | 2 +- sound/pci/hda/patch_ca0132.c | 2 +- sound/pci/hda/patch_hdmi.c | 2 +- sound/soc/codecs/madera.c | 4 ++-- sound/soc/codecs/wm8350.c | 3 ++- sound/soc/intel/boards/bytcr_rt5651.c | 2 +- sound/soc/samsung/snow.c | 2 +- sound/soc/soc-dapm.c | 2 +- sound/soc/sof/intel/hda-dsp.c | 2 +- 9 files changed, 11 insertions(+), 10 deletions(-) commit d6981c3b575b546c81331b7e6181241cdf93fa86 Merge: 81437cc3b0d98 5a7f34ab0232b Author: Mark Brown Date: Mon Oct 26 18:37:11 2020 +0000 Merge series "ASoC: sun8i-codec: support for AIF2 and AIF3" from Samuel Holland : This series adds support the other two AIFs present in the sun8i codec, which can be used for codec2codec DAI links. This series first fills out the DAI driver, removing assumptions that were made for AIF1 (16 bits, 2 channels, certain clock inversions). Some new logic is required to handle 3 DAIs and the ADC/DAC sharing the same clock. Finally, it adds the new DAIs, and hooks them up with DAPM widgets and routes per the hardware topology. To minimize the number of patches in this series, related device tree patches (increasing #sound-dai-cells, adding new DAI links) will be sent separately. Changes from v1: - Patches 1-8 from v1 (DAPM changes) were merged - Prefixed AIF constants with "SUN8I_CODEC_" [1, 7, 10, 16, 17] - Renamed variables in sun8i_codec_set_fmt for clarity [3] - Update sysclk->sysclk_rate if later calls to hw_params change the sample rate (thanks Chen-Yu for reminding me of this) [11] - Select COMMON_CLK for clk_set_rate_exclusive [12] - Add comments and hopefully clarify the clock protection logic [12] - Make the error message more concise and put it on one line [12] - Drop the "reg" variable holding SUN8I_AIF_CLK_CTRL(dai->id) [15] - Rename "div_reg" to "clk_reg" and adjust comments for clarity [17] - Improve the AIF2/AIF3 rate mismatch error message [17] - Minor grammar/wording fixes in commit messages [2, 4, 7, 8, 16, 17] - Added Maxime's Acked-by: [1-2, 4-9, 11, 13-14, 16] Samuel Holland (17): ASoC: sun8i-codec: Prepare to extend the DAI driver ASoC: sun8i-codec: Program DAI format before clock inversion ASoC: sun8i-codec: Enable all supported clock inversions ASoC: sun8i-codec: Use the provided word size ASoC: sun8i-codec: Round up the LRCK divisor ASoC: sun8i-codec: Correct the BCLK divisor calculation ASoC: sun8i-codec: Support the TDM slot binding ASoC: sun8i-codec: Enforce symmetric DAI parameters ASoC: sun8i-codec: Enable all supported sample rates ASoC: sun8i-codec: Automatically set the system sample rate ASoC: sun8i-codec: Constrain to compatible sample rates ASoC: sun8i-codec: Protect the clock rate while streams are open ASoC: sun8i-codec: Require an exact BCLK divisor match ASoC: sun8i-codec: Enable all supported PCM formats ASoC: sun8i-codec: Generalize AIF clock control ASoC: sun8i-codec: Add the AIF2 DAI, widgets, and routes ASoC: sun8i-codec: Add the AIF3 DAI, widgets, and routes sound/soc/sunxi/Kconfig | 1 + sound/soc/sunxi/sun8i-codec.c | 834 ++++++++++++++++++++++++++++------ 2 files changed, 699 insertions(+), 136 deletions(-) -- 2.26.2 commit 81437cc3b0d9878b00f020c555fc9686df58982d Merge: 1bfa3eaa45112 ea8650730332e Author: Mark Brown Date: Mon Oct 26 18:37:10 2020 +0000 Merge series "dt-bindings: stm32: convert audio dfsdm to json-schema" from Olivier Moysan : Some audio properties documented in st,stm32-adfsdm.txt are already documented in Documentation/devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.yaml bindings. Move remaining properties from st,stm32-adfsdm.txt to st,stm32-dfsdm-adc.yaml, and remove st,stm32-adfsdm.txt. Changes in v2: - Complete st,stm32-dfsdm-adc.yaml rather than converting st,stm32-adfsdm.txt Olivier Moysan (2): dt-bindings: stm32: dfsdm: update audio properties dt-bindings: stm32: dfsdm: remove stm32-adfsdm.txt binding .../bindings/iio/adc/st,stm32-dfsdm-adc.yaml | 7 ++- .../bindings/sound/st,stm32-adfsdm.txt | 63 ------------------- 2 files changed, 5 insertions(+), 65 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/st,stm32-adfsdm.txt -- 2.17.1 commit 1bfa3eaa4511256ab14555ab2573e6e75194b1fa Author: Shengjiu Wang Date: Tue Oct 13 10:49:20 2020 +0800 ASoC: fsl_spdif: Add support for higher sample rates Add 88200Hz and 176400Hz sample rates support for TX. Add 88200Hz, 176400Hz, 192000Hz sample rates support for RX. Signed-off-by: Viorel Suman Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Reviewed-by: Daniel Baluta Link: https://lore.kernel.org/r/1602557360-18795-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 516232e3609f485be04445b03723fbaed64a5321 Author: Shengjiu Wang Date: Thu Oct 15 13:28:48 2020 +0800 ASoC: fsl_spdif: Add support for i.MX8QM platform On i.MX8QM, there are separate interrupts for TX and RX. As the EDMA can't be configured to swing back to first FIFO after writing the second FIFO, so we need to force the burst size to be 2 on i.MX8QM. And EDMA don't support to shift the data from S24_LE to S16_LE, so the supported TX format is also different on i.MX8QM. Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/1602739728-4433-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 87b2fc1139a13cf81d0a95fb2cbaba7daeee8908 Author: Shengjiu Wang Date: Thu Oct 15 13:28:47 2020 +0800 ASoC: dt-bindings: fsl_spdif: Add new compatible string for i.MX8QM Add new compatible string "fsl,imx8qm-spdif" for supporting spdif module on i.MX8QM. Signed-off-by: Shengjiu Wang Acked-by: Rob Herring Link: https://lore.kernel.org/r/1602739728-4433-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit efb38304c550cd7abf1a855074a73dc4a8874aa0 Author: Vijendar Mukunda Date: Fri Oct 23 23:37:17 2020 +0530 ASoC: amd: support other audio modes for raven ACP supports different audio configurations other than I2S. This patch will fix acp driver probe failure for other audio configurations. Tested-by: Prike Liang Reviewed-by: Prike Liang Acked-by: Alex Deucher Signed-off-by: Vijendar Mukunda Link: https://lore.kernel.org/r/1603476441-3506-1-git-send-email-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit 79405e3e5375875f8edc7dd6c1cf5376b1ded6e7 Author: Richard Fitzgerald Date: Thu Oct 15 11:27:03 2020 +0100 ASoC: wm5102: Use get_unaligned_be16() for dac_comp_coeff Replace the two-step copy-and-convert in wm5102_out_comp_coeff_put() with get_unaligned_be16(). Apart from looking nicer, it avoids this sparse warning: wm5102.c:687:35: sparse: sparse: cast to restricted __be16 Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20201015102703.24622-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 49491418c1dceb11ccb2ab841e4e5590e844378c Author: Olivier Moysan Date: Fri Oct 9 16:10:51 2020 +0200 ASoC: dt-bindings: stm32: convert sai to json-schema Convert the STM32 SAI bindings to DT schema format using json-schema. Signed-off-by: Olivier Moysan Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201009141051.27365-1-olivier.moysan@st.com Signed-off-by: Mark Brown commit ab589bac553f79d559952aa088480a72258ac5bc Author: Alexandru Ardelean Date: Mon Oct 19 13:53:13 2020 +0300 ASoC: adau1977: remove platform data and move micbias bindings include The change removes the platform_data include/definition. It only contains some values for the MICBIAS. These are moved into 'dt-bindings/sound/adi,adau1977.h' so that they can be used inside device-trees. When moving then, they need to be converted to pre-compiler defines, so that the DT compiler can understand them. The driver then, also needs to include the new 'dt-bindings/sound/adi,adau1977.h' file. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201019105313.24862-1-alexandru.ardelean@analog.com Signed-off-by: Mark Brown commit 76b5f68bbf7df9343b69fbee04d5edf50680c231 Author: Codrin Ciubotariu Date: Mon Oct 12 17:19:11 2020 +0300 ASoC: pcm5102a: Make codec selectable The TI PCM5102A codec driver can be used with the generic sound card drivers, so it should be selectable. For example, with the addition of #sound-dai-cells = <0> property in DT, it can be used with simple/graph card drivers. Signed-off-by: Codrin Ciubotariu Link: https://lore.kernel.org/r/20201012141911.3150996-1-codrin.ciubotariu@microchip.com Signed-off-by: Mark Brown commit 81dde99f1ac64e27290990c67439b49ecc1f7c29 Author: Lars-Peter Clausen Date: Fri Oct 23 11:23:46 2020 +0200 ASoC: jz4740-i2s: Remove manual DMA peripheral ID assignment All platforms that use the jz4740-i2s driver have been switched to devicetree for a while now and the assignment of the DMA peripheral ID is done in the devicetree. It is no longer necessary to manually assign the peripheral ID in the driver, so remove that. The DMA driver does not even look at the value assigned in the driver anymore and always uses the value provided by the devicetree. Signed-off-by: Lars-Peter Clausen Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20201023092346.5777-1-lars@metafoo.de Signed-off-by: Mark Brown commit d9da1785ec0caed9a52183f994afefff0da25d7e Author: Kevin Hilman Date: Mon Oct 19 15:46:49 2020 -0700 soc: meson: enable building drivers as modules Enable SoC drivers for 64-bit Amlogic SoCs to be built as modules. Signed-off-by: Kevin Hilman commit 5d2fc13ba052149e35675da108607846659a8b14 Author: Kevin Hilman Date: Mon Oct 19 15:46:48 2020 -0700 soc: amlogic: socinfo: build for specific arch The MX driver only supports 32-bit ARM SoCs and the GX driver only supports 64-bit SoCs. Only build for the right architecture. Reviewed-by: Jerome Brunet Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman commit aa2e2785545aab21b6cb2e23f111ae0751cbcca7 Author: Srinivas Kandagatla Date: Mon Oct 26 17:09:47 2020 +0000 ASoC: qcom: sm8250: add sound card qrb5165-rb5 support Add support to Qualcomm Robotics RB5 Development Kit based on QRB5165 Robotics SoC. This board has 2 WSA881X smart speakers with onboard DMIC connected to internal LPASS codec via WSA and VA macros respectively. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20201026170947.10567-3-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 765c37598494cdb6c8f833e8e46f494af5c7d39e Author: Srinivas Kandagatla Date: Mon Oct 26 17:09:46 2020 +0000 ASoC: qcom: dt-bindings: Add SM8250 sound card bindings This patch adds bindings required for SM8250 based soundcards for example Qualcomm Robotics RB5 Development Kit which makes use of ADSP and Internal LPASS codec. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20201026170947.10567-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 34a3242baeb5a2ac26f6bdf82fead2a295d59314 Author: Zhang Qilong Date: Mon Oct 26 19:59:30 2020 +0800 drm/amdgpu: Discard unnecessary breaks The 'break' is unnecessary because of previous 'return', discard it. Signed-off-by: Zhang Qilong Signed-off-by: Alex Deucher commit 1b3c7564113a073143a8b45f5f50efa44ac0ee3c Author: Alex Deucher Date: Mon Oct 26 10:25:36 2020 -0400 drm/amdgpu/display: use kvzalloc again in dc_create_state It looks this was accidently lost in a follow up patch. dc context is large and we don't need contiguous pages. Fixes: e4863f118a7d ("drm/amd/display: Multi display cause system lag on mode change") Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher Cc: Aric Cyr Cc: Alex Xu Reported-by: Alex Xu (Hello71) Tested-by: Alex Xu (Hello71) commit 5d1b3211da033db56700fbdb3be5d90cea56a0c2 Author: Derek Lai Date: Wed Oct 14 12:43:55 2020 +0800 drm/amd/display: combined user regamma and OS GAMMA_CS_TFM_1D [Why] For user regamma we're missing this function call to combine user regamma + OS for GAMMA_CS_TFM_1D type. [How] Applied 1D LUT in the mod_color_build_user_regamma. And Set the regamma dirty as updateGamma. Signed-off-by: Derek Lai Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 7154a51b534707cae0f61190cab8f21cc9b2abdc Author: jinlong zhang Date: Fri Sep 25 22:51:04 2020 +0800 drm/amd/display: Using udelay for specific dongle while edid return defer [why] Some platform has a limitation of 2ms for udelay [how] Add 1ms udelay for specific dongle. Signed-off-by: jinlong zhang Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit a2540e34b521d7f040aa8a6b76b3f29bd679a2ae Author: George Shen Date: Fri Oct 9 19:01:11 2020 -0400 drm/amd/display: Removed unreferenced variables. Signed-off-by: George Shen Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 70bb9193728627e84e02eb0960b0aa138ae2cef5 Author: Simon Ser Date: Mon Oct 26 14:12:30 2020 +0100 drm: deprecate DRM_FORMAT_MOD_NONE DRM_FORMAT_MOD_NONE is in the list of vendors, which is pretty confusing. We already have DRM_FORMAT_MOD_VENDOR_NONE. Move it down in the list of format modifiers. DRM_FORMAT_MOD_NONE is an alias for DRM_FORMAT_MOD_LINEAR, however the name is confusing: NONE doesn't mean that the modifier is implicit, instead it means that the layout is linear. Deprecate it. Signed-off-by: Simon Ser Reviewed-by: Bas Nieuwenhuizen Reviewed-by: Pekka Paalanen Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/a2j8KTgc26k5QniSAhDSTgCw4XWZhmsNHwG8UVa6U@cp4-web-014.plabs.ch commit cadfd67c27e2a24e25cf59c9db5f04c5a381bac4 Author: Dmytro Laktyushkin Date: Thu Oct 15 14:49:56 2020 -0400 drm/amd/display: prevent null pointer access Prevent null pointer access when checking odm tree. Signed-off-by: Dmytro Laktyushkin Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher Cc: commit 13b5ca42ca9c9647f26c4aa8c4ab78ee5de35162 Author: Rodrigo Siqueira Date: Thu Sep 10 17:49:31 2020 -0400 drm/amd/display: Add tracepoint for capturing clocks state The clock state update is the source of many problems, and capturing this sort of information helps debug. This commit introduces tracepoints for capturing clock values and also add traces in DCE, DCN1, DCN2x, and DCN3. Signed-off-by: Rodrigo Siqueira Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 8b198f6e94d669810e0293d27a02401ddac4fad9 Author: Rodrigo Siqueira Date: Wed Sep 9 10:36:03 2020 -0400 drm/amd/display: Add pipe_state tracepoint This commit introduces a trace mechanism for struct pipe_ctx by adding a middle layer struct in the amdgpu_dm_trace.h for capturing the most important data from struct pipe_ctx and showing its data via tracepoint. This tracepoint was added to dc.c and dcn10_hw_sequencer, however, it can be added to other DCN architecture. Signed-off-by: Rodrigo Siqueira Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit e8a982355f9669c30785a85dc1bf6a73131a8307 Author: Rodrigo Siqueira Date: Fri Sep 4 14:37:53 2020 -0400 drm/amd/display: Add tracepoint for amdgpu_dm Debug amdgpu_dm could be a complicated task, therefore, this commit adds tracepoints in some convenient functions such as plane and connector check inside amdgpu_dm. Signed-off-by: Rodrigo Siqueira Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 21c4144582962e056729077ff0b3965152ad4cfd Author: Rodrigo Siqueira Date: Wed Sep 2 14:29:38 2020 -0400 drm/amd/display: Rework registers tracepoint amdgpu_dc_rreg and amdgpu_dc_wreg are very similar, for this reason, this commits abstract these two events by using DECLARE_EVENT_CLASS and create an instance of it for each one of these events. Signed-off-by: Rodrigo Siqueira Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 9d83722d06feae80209483351db1e985f60a1c5a Author: Rodrigo Siqueira Date: Tue Sep 15 12:33:43 2020 -0400 drm/amd/display: Decouple amdgpu_dm_trace from service Our DC currently uses some of the tracepoint function inside a DC header, which means that many other files implicitly include part of the trace function. This situation limits how we can expand this feature for other parts of the driver by generating multiple compilation errors when we try to reuse some of the existing structures. This commit decouples part of the amdgpu_dm_trace from DC core to simplify the trace enlargement in future changes. Signed-off-by: Rodrigo Siqueira Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit b51366f77b9e07572d424381931c0dedb5526a5b Author: Aric Cyr Date: Tue Oct 13 09:54:40 2020 -0400 drm/amd/display: 3.2.108 Signed-off-by: Aric Cyr Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit fd0f1d21d46c51bf5d1f8a06c77ad4e40825ecff Author: Anthony Koo Date: Sun Oct 11 21:29:52 2020 -0400 drm/amd/display: [FW Promotion] Release 0.0.38 | [Header Changes] | - Add new SCRATCH15 boot option and fw_state member to skip | phy access | - Add new SCRATCH15 boot option and fw_state member to disable | clk gating | - Add defines for AUX return status | - Add defines for HPD events Signed-off-by: Anthony Koo Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit c36f0ab0aac7e0cf924d75e40770db35d330f6d0 Author: Martin Leung Date: Wed Oct 7 12:17:22 2020 -0400 drm/amd/display: adding ddc_gpio_vga_reg_list to ddc reg def'ns why: oem-related ddc read/write fails without these regs how: copy from hw_factory_dcn20.c Signed-off-by: Martin Leung Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit def48da790ce0b6f93638d9c3225913a61bd613f Author: Felipe Clark Date: Mon Sep 28 11:03:38 2020 -0400 drm/amd/display: Fix max brightness pixel accuracy [WHY] It was detected in some Freesync HDR tests that displays were not reaching their maximum nominal brightness. [HOW] The Multi-plane combiner (MPC) Output Gamma (OGAM) block builds a discrete Lookup Table (LUT). When the display's maximum brightness falls in between two values, having to be linearly interpolated by the hardware, rounding issues might occur that will cause the display to never reach its maximum brightness. The fix involves doing the calculations backwards, ensuring that the interpolation in the maximum brightness values translates to an output of 1.0. Signed-off-by: Felipe Clark Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 35a4644c935ee8263b1d99a0fe4d5370deb4f606 Author: Aric Cyr Date: Thu Oct 8 09:25:29 2020 -0400 drm/amd/display: Don't trigger flip twice when ODM combine in use [Why] When ODM combine is in use we trigger multiple update events causing issues with variable refresh rate. [How] Only trigger on a single ODM instance. Signed-off-by: Aric Cyr Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 86c5a9e3aa66eeee663ead6104514ecdd9996925 Author: Alvin Lee Date: Thu Oct 8 13:32:35 2020 -0400 drm/amd/display: Update GSL state if leaving immediate flip [Why] We should leave GSL if we're not doing immediate flip no matter if we're doing pipe split or not [How] Check for updating GSL state whenever we're not doing immediate flip v2: Squash in build fix (Alex) Signed-off-by: Aric Cyr Signed-off-by: Alvin Lee Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit da52f579d9481b71525bf23838284db1338163a6 Author: Yu-Ting Shen Date: Tue Oct 6 13:36:56 2020 +0800 drm/amd/display: disable seamless boot for VSC_SDP [WHY] VBIOS will not enable VSC_SDP during pre-OS to lead MISC1[6] wasn't matched with driver. [HOW] disabled seamless boot if sink supports VSC_SDP Signed-off-by: Yu-Ting Shen Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit c76b169b76bb4d40ab323143ee7a9cdfdc7563e4 Author: Yongqiang Sun Date: Wed Oct 7 12:02:16 2020 -0400 drm/amd/display: Reduce height of visual confirm on right side. [Why] right side visual confirm is too thick due to it is 4 times of left side (16 lines). [How] Change factor from 4 to 2. Signed-off-by: Yongqiang Sun Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 73ec5680ba6351d848f9304690c3f0105142f4fd Author: Isabel Zhang Date: Tue Oct 6 17:34:40 2020 -0400 drm/amd/display: Revert check for flip pending before locking pipes [Why] Causes underflow regression [How] This reverts commit 99d1437aa0ac1f598e9aabca8bf0e8a40c38f8a1 Signed-off-by: Isabel Zhang Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 74d021b5631f0b657549cd76cbc7bff693cee35d Author: Brandon Syu Date: Tue Oct 6 10:15:05 2020 +0800 drm/amd/display: skip avmute action [Why] For some monitors, they can't display under BIOS with avmute enabled. [How] Add monitor patch for skip avmute action. Signed-off-by: Brandon Syu Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit df043738b7c73409e45b45035f0dc91d6842d7dd Author: Roman Li Date: Mon Oct 5 11:28:30 2020 -0400 drm/amd/display: Refactor ABM_MASK_SH_LIST_DCN301 naming [Why] All DCN3x resources share ABM_MASK_SH_LIST_DCN301 definition. The naming is misleading since it looks like DCN30 code depends on next version DCN301, which in fact is vice-versa. [How] Refactor the naming to ABM_MASK_SH_LIST_DCN30. v2: squash in build fixes (Alex) Signed-off-by: Roman Li Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit bf479f5a1d9ca3b2044da92de7795778713a862b Author: Martin Leung Date: Fri Oct 2 15:50:36 2020 -0400 drm/amd/display: adding reading OEM init_data to dcn3 why: missing OEM data to control graphics card functions how: load it into init_data. copied over from dcn2 implementation. copied destruction sequence as well. Signed-off-by: Martin Leung Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit e5df916b8581a7c3118ab3632d05739ebfd938c4 Author: Sung Lee Date: Mon Oct 5 12:14:31 2020 -0400 drm/amd/display: DCN2.1 Disable 48MHz Powerdown Debug Option [WHY & HOW] Currently disable 48mhz debug option only disables on boot. Need to put option check in update_clocks as well to make it affect more areas. Signed-off-by: Sung Lee Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit aaa0aed17e045816d21de2af258cdfd0af6f6ebd Author: Aric Cyr Date: Mon Oct 5 10:16:32 2020 -0400 drm/amd/display: 3.2.107 Signed-off-by: Aric Cyr Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 9abdf39203831215cfd298c0a7604a550621b4c5 Author: Nikola Cornij Date: Sat Oct 3 00:21:50 2020 -0400 drm/amd/display: Add an option to limit max DSC target bpp per sink [Why] Can be used for debug purposes [How] Add max target bpp override field and related handling Signed-off-by: Nikola Cornij Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 84c305b756e71af483c02ba15f70bca3d6de8120 Author: Anthony Koo Date: Mon Oct 5 08:52:25 2020 -0400 drm/amd/display: [FW Promotion] Release 0.0.37 | [Header Changes] | - Add GPINT to change timestamping mode for traces Signed-off-by: Anthony Koo Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit a10ba3827afa6a50f48b7d7c80e5f26ac5918a82 Author: Reza Amini Date: Thu Oct 1 11:33:51 2020 -0400 drm/amd/display: Define PSR ERROR Status bit VSC_SDP [why] So we can track VSC SDP errors from display [how] Define the bit, and use it in driver logic Signed-off-by: Reza Amini Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit a47cc3ab051f963ebca820dc48e887e9a7101244 Author: Taimur Hassan Date: Sun Oct 4 15:20:45 2020 -0400 drm/amd/display: Raise DPG height during timing synchronization [Why] Underflow counter increases in AGM when performing some mode switches due to timing sync, which is a known hardware issue. [How] Temporarily raise DPG height during timing sync so that underflow is not reported. Signed-off-by: Taimur Hassan Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 1db522cd03fdf692047e2317cfa16cf89bd42992 Author: Alvin Lee Date: Fri Oct 2 17:53:35 2020 -0400 drm/amd/display: Set WM set A to 0 if full pstate not supported [Why] If full pstate is not supported, we should set WM set A to 0 to prevent any hangs [How] If pstate is not supported, set watermark set A to 0 Signed-off-by: Alvin Lee Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 39a71459a032c5ec4862d4ea071431c90bc707b2 Author: Eryk Brol Date: Thu Oct 1 13:35:42 2020 -0400 drm/amd/display: Reverting "Add connector to the state if DSC debugfs is set" This reverts commit c44a22b3128d143a66421004b728eed688c21ee6. Reason for revert: Patch introduces performance issues and might cause memory consistency problems with multiple connectors. Signed-off-by: Eryk Brol Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 9248681f68b725d2647ca7dbae281c9b34977519 Author: Ashley Thomas Date: Thu Oct 1 00:16:05 2020 -0700 drm/amd/display: Source minimum HBlank support [Why] Some sink devices wish to have access to the minimum HBlank supported by the ASIC. [How] Make the ASIC minimum HBlank available in Source Device information address 0x340. Signed-off-by: Ashley Thomas Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 2e7b43e629100b4072fac5eef53bd28235e59aa3 Author: Dmytro Laktyushkin Date: Wed Sep 16 09:20:23 2020 -0400 drm/amd/display: enable odm + full screen mpo on dcn21 [WHY & HOW] Enable ODM Combine + Fullscreen MPO on DCN2.1 For lower power consumption in video use cases. Signed-off-by: Dmytro Laktyushkin Signed-off-by: Sung Lee Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit ea817dd5ad79506b7ff8df09b7d77d34b8121cf8 Author: Dmytro Laktyushkin Date: Fri Sep 18 15:05:09 2020 -0400 drm/amd/display: add dcn21 bw validation [Why&How] Create a separate dcn21_fast_validate_bw function for dcn21. Signed-off-by: Dmytro Laktyushkin Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit f2459c52c84449c0494365f928d1a0cbe52f23cf Author: Sung Lee Date: Tue Aug 25 15:52:17 2020 -0400 drm/amd/display: Add Bounding Box State for Low DF PState but High Voltage State [WHY] DF PState and Voltage State are coupled such that one cannot be raised without raising the other. This uses more power than is necessary in high bandwidth scenarios. [HOW] Add logic to create a new bounding box state that allows for DF PState to be low while Voltage State is high. Watermarks vlevel calculation logic was also udpated to assume state 1 contains the new optimized state. Signed-off-by: Sung Lee Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit a39f2a8d70666ef728497651a16bca4d23ec8816 Author: Christian König Date: Mon Oct 12 15:40:04 2020 +0200 drm/amdgpu: nuke amdgpu_vm_bo_split_mapping v2 Merge the functionality mostly into amdgpu_vm_bo_update_mapping. This way we can even handle small contiguous system pages without to much extra CPU overhead. v2: fix typo, keep the cursor as it is for now Signed-off-by: Christian König Reviewed-by: Madhav Chauhan (v1) Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit ce9a6cad3e3afea552c191e5c833b56f7b1bb4f0 Author: Christian König Date: Mon Oct 12 13:09:36 2020 +0200 drm/amdgpu: increase the reserved VM size to 2MB Ideally this should be a multiple of the VM block size. 2MB should at least fit for Vega/Navi. Signed-off-by: Christian König Reviewed-by: Madhav Chauhan Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 34c0631bbd9d731d1330b0f3cee2c4bcfb92be5e Author: Tao Zhou Date: Tue Oct 20 16:47:10 2020 +0800 drm/amd/pm: update driver if version for dimgrey_cavefish Per PMFW 59.9.0. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 19ae333001b375bbc7d1ff9eaa9cbb0a72fff65e Author: John Clements Date: Mon Oct 26 14:57:13 2020 +0800 drm/amdgpu: added support for psp fw attestation loaded fw can be queried from sys fs interface Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit 0165b85c278415d90fa8e439ab54e27d23663112 Author: Xiaomeng Hou Date: Fri Oct 23 15:39:53 2020 +0800 drm/amdgpu: enable IP discovery for vangogh enable IP discovery for vangogh. Reviewed-by: Huang Rui Signed-off-by: Xiaomeng Hou Signed-off-by: Alex Deucher commit ea8650730332ee3c707883a2de37756ea9122981 Author: Olivier Moysan Date: Tue Oct 20 17:57:09 2020 +0200 ASoC: dt-bindings: stm32: dfsdm: remove stm32-adfsdm.txt binding Device tree audio configuration for STM32 DFSDM is already covered in the following binding: Documentation/devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.yaml Remove stm32-adfsdm.txt obsolete binding. Signed-off-by: Olivier Moysan Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201020155709.2621-3-olivier.moysan@st.com Signed-off-by: Mark Brown commit f24fd10bea5961629f22e1da0f56e8c918bdb2da Author: Olivier Moysan Date: Tue Oct 20 17:57:08 2020 +0200 dt-bindings: stm32: dfsdm: update audio properties - Add missing compatible property in audio node. - Remove obsolete "st,stm32-dfsdm-pdm" compatible. - Remove useless comment in adc io-channels description. Signed-off-by: Olivier Moysan Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201020155709.2621-2-olivier.moysan@st.com Signed-off-by: Mark Brown commit 3adb776384f2042ef6bda876e91a7a7ac2872c5e Author: Dan Williams Date: Mon Oct 19 21:08:03 2020 -0700 x86, libnvdimm/test: Remove COPY_MC_TEST The COPY_MC_TEST facility has served its purpose for validating the early termination conditions of the copy_mc_fragile() implementation. Remove it and the EXPORT_SYMBOL_GPL of copy_mc_fragile(). Reported-by: Borislav Petkov Signed-off-by: Dan Williams Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/160316688322.3374697.8648308115165836243.stgit@dwillia2-desk3.amr.corp.intel.com commit 4662c59688b8db8834aab14f0d37a4f26fc0dd20 Author: Kuninori Morimoto Date: Tue Sep 29 13:32:01 2020 +0900 ASoC: soc-pcm: add soc_pcm_hw_clean() and call it from soc_pcm_hw_params/free() soc_pcm_hw_params() does rollback when failed (A), but, it is almost same as soc_pcm_hw_free(). static int soc_pcm_hw_params(xxx) { ... if (ret < 0) goto xxx_err; ... return ret; ^ component_err: | ... | interface_err: (A) ... | codec_err: | ... v return ret; } The difference is soc_pcm_hw_free() is for all dai/component/substream, rollback is for succeeded part only. This kind of duplicated code can be a hotbed of bugs, thus, we want to share soc_pcm_hw_free() and rollback. Now, soc_pcm_hw_params/free() are handling 1) snd_soc_link_hw_params/free() 2) snd_soc_pcm_component_hw_params/free() 3) snd_soc_dai_hw_params/free() Now, 1) to 3) are handled. This patch adds new soc_pcm_hw_clean() and call it from soc_pcm_hw_params() as rollback, and from soc_pcm_hw_free() as normal close handler. Other difference is that soc_pcm_hw_free() handles digital mute if it was last user. Rollback also handles it by this patch. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87h7rhgqab.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit c304c9acb6e60bcc5c4d4b5a72763ca3bdf7d76b Author: Kuninori Morimoto Date: Tue Sep 29 13:31:53 2020 +0900 ASoC: soc-dai: add mark for snd_soc_dai_hw_params/free() soc_pcm_hw_params() does rollback when failed (A), but, it is almost same as soc_pcm_hw_free(). static int soc_pcm_hw_params(xxx) { ... if (ret < 0) goto xxx_err; ... return ret; ^ component_err: | ... | interface_err: (A) ... | codec_err: | ... v return ret; } The difference is soc_pcm_hw_free() is for all dai/component/substream, rollback is for succeeded part only. This kind of duplicated code can be a hotbed of bugs, thus, we want to share soc_pcm_hw_free() and rollback. Now, soc_pcm_hw_params/free() are handling 1) snd_soc_link_hw_params/free() 2) snd_soc_pcm_component_hw_params/free() => 3) snd_soc_dai_hw_params/free() This patch is for 3) snd_soc_dai_hw_params/free(). The idea of having bit-flag or counter is not enough for this purpose. For example if one DAI is used for 2xPlaybacks for some reasons, and if 1st Playback was succeeded but 2nd Playback was failed, 2nd Playback rollback doesn't need to call shutdown. But it has succeeded bit-flag or counter via 1st Playback, thus, 2nd Playback rollback will call unneeded shutdown. And 1st Playback's necessary shutdown will not be called, because bit-flag or counter was cleared by wrong 2nd Playback rollback. To avoid such case, this patch marks substream pointer when hw_params() was succeeded. If rollback needed, it will check rollback flag and marked substream pointer. One note here is that it cares *previous* hw_params() only now, but we might want to check *whole* marked substream in the future. This patch is using macro named "push/pop", so that it can be easily update. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87imbxgqai.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 3a36a64a2de4699ef4a2479a7fb2564b85c8fb4e Author: Kuninori Morimoto Date: Tue Sep 29 13:31:41 2020 +0900 ASoC: soc-component: add mark for snd_soc_pcm_component_hw_params/free() soc_pcm_hw_params() does rollback when failed (A), but, it is almost same as soc_pcm_hw_free(). static int soc_pcm_hw_params(xxx) { ... if (ret < 0) goto xxx_err; ... return ret; ^ component_err: | ... | interface_err: (A) ... | codec_err: | ... v return ret; } The difference is soc_pcm_hw_free() is for all dai/component/substream, rollback is for succeeded part only. This kind of duplicated code can be a hotbed of bugs, thus, we want to share soc_pcm_hw_free() and rollback. Now, soc_pcm_hw_params/free() are handling 1) snd_soc_link_hw_params/free() => 2) snd_soc_pcm_component_hw_params/free() 3) snd_soc_dai_hw_params/free() This patch is for 2) snd_soc_pcm_component_hw_params/free(). The idea of having bit-flag or counter is not enough for this purpose. For example if one DAI is used for 2xPlaybacks for some reasons, and if 1st Playback was succeeded but 2nd Playback was failed, 2nd Playback rollback doesn't need to call shutdown. But it has succeeded bit-flag or counter via 1st Playback, thus, 2nd Playback rollback will call unneeded shutdown. And 1st Playback's necessary shutdown will not be called, because bit-flag or counter was cleared by wrong 2nd Playback rollback. To avoid such case, this patch marks substream pointer when hw_params() was succeeded. If rollback needed, it will check rollback flag and marked substream pointer. One note here is that it cares *previous* hw_params() only now, but we might want to check *whole* marked substream in the future. This patch is using macro named "push/pop", so that it can be easily update. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87k0wdgqav.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 918ad772c4e47f26bc1b5040a79336b7063626cf Author: Kuninori Morimoto Date: Tue Sep 29 13:31:25 2020 +0900 ASoC: soc-link: add mark for snd_soc_link_hw_params/free() soc_pcm_hw_params() does rollback when failed (A), but, it is almost same as soc_pcm_hw_free(). static int soc_pcm_hw_params(xxx) { ... if (ret < 0) goto xxx_err; ... return ret; ^ component_err: | ... | interface_err: (A) ... | codec_err: | ... v return ret; } The difference is soc_pcm_hw_free() is for all dai/component/substream, rollback is for succeeded part only. This kind of duplicated code can be a hotbed of bugs, thus, we want to share soc_pcm_hw_free() and rollback. Now, soc_pcm_hw_params/free() are handling => 1) snd_soc_link_hw_params/free() 2) snd_soc_pcm_component_hw_params/free() 3) snd_soc_dai_hw_params/free() This patch is for 1) snd_soc_link_hw_params/free(). The idea of having bit-flag or counter is not enough for this purpose. For example if one DAI is used for 2xPlaybacks for some reasons, and if 1st Playback was succeeded but 2nd Playback was failed, 2nd Playback rollback doesn't need to call shutdown. But it has succeeded bit-flag or counter via 1st Playback, thus, 2nd Playback rollback will call unneeded shutdown. And 1st Playback's necessary shutdown will not be called, because bit-flag or counter was cleared by wrong 2nd Playback rollback. To avoid such case, this patch marks substream pointer when hw_params() was succeeded. If rollback needed, it will check rollback flag and marked substream pointer. One note here ist that it cares *previous* hw_params() only now, but we might want to check *whole* marked substream in the future. This patch is using macro named "push/pop", so that it can be easily update. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87lfgtgqba.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit ab49436eecf5cc779a1ff659ba59c88779685b47 Author: Kuninori Morimoto Date: Tue Sep 29 13:31:19 2020 +0900 ASoC: soc-pcm: move soc_pcm_hw_free() next to soc_pcm_hw_params() This patch moves soc_pcm_hw_free() next to soc_pcm_hw_params(). This is prepare for soc_pcm_hw_params() cleanup Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87mu19gqbh.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 5560d8c6053c98e3ce17b988dde743792ae613c8 Author: Kuninori Morimoto Date: Tue Sep 29 13:31:11 2020 +0900 ASoC: soc.h: remove for_each_rtd_dais_rollback() commit 140a4532cdb8 ("ASoC: soc-pcm: add soc_pcm_clean() and call it from soc_pcm_open/close()") uses soc_pcm_clean() and then for_each_rtd_dais_rollback() is no longer used. This patch removes it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87o8lpgqbp.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 64e2c37ea03545ff926de13ce79c8df27b939d8a Author: Pierre-Louis Bossart Date: Wed Sep 30 18:20:25 2020 +0300 ASoC: SOF: sof-audio: remove goto used for force-nocodec support Address smatch warnings: sound/soc/sof/sof-audio.c:375 sof_machine_check() warn: inconsistent indenting sound/soc/sof/sof-audio.c:380 sof_machine_check() warn: ignoring unreachable code. No functionality change. Reported-by: kernel test robot Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Guennadi Liakhovetski Signed-off-by: Kai Vehmanen Acked-by: Jaroslav Kysela Tested-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20200930152026.3902186-4-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 3381a989a92f12f401332f1c506465fff1a8870d Author: Pierre-Louis Bossart Date: Wed Sep 30 18:20:24 2020 +0300 ASoC: SOF: topology: remove const in sizeof() We should only use the type, the const attribute makes no sense in sizeof(). Reported-by: Guennadi Liakhovetski Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Guennadi Liakhovetski Signed-off-by: Kai Vehmanen Acked-by: Jaroslav Kysela Tested-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20200930152026.3902186-3-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 5027fe36032a1203d5a56bd8c0f9279feb48775f Author: Pierre-Louis Bossart Date: Wed Sep 30 18:20:23 2020 +0300 ASoC: SOF: control: remove const in sizeof() We should only use the type, the const attribute makes no sense in sizeof(). Reported-by: Guennadi Liakhovetski Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Guennadi Liakhovetski Signed-off-by: Kai Vehmanen Acked-by: Jaroslav Kysela Tested-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20200930152026.3902186-2-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 6f6573a4044adefbd07f1bd951a2041150e888d7 Author: Arnd Bergmann Date: Wed Oct 21 17:19:09 2020 +0200 asm-generic: fix ffs -Wshadow warning gcc -Wshadow warns about the ffs() definition that has the same name as the global ffs() built-in: include/asm-generic/bitops/builtin-ffs.h:13:28: warning: declaration of 'ffs' shadows a built-in function [-Wshadow] This is annoying because 'make W=2' warns every time this header gets included. Change it to use a #define instead, making callers directly reference the builtin. Signed-off-by: Arnd Bergmann commit 80b4707a2f16e8a018543635ebe31cae53783c72 Author: Arnd Bergmann Date: Wed Oct 21 17:18:05 2020 +0200 asm-generic: percpu: avoid Wshadow warning Nesting macros that use the same local variable names causes warnings when building with "make W=2": include/asm-generic/percpu.h:117:14: warning: declaration of '__ret' shadows a previous local [-Wshadow] include/asm-generic/percpu.h:126:14: warning: declaration of '__ret' shadows a previous local [-Wshadow] These are fairly harmless, but since the warning comes from a global header, the warning happens every time the headers are included, which is fairly annoying. Rename the variables to avoid shadowing and shut up the warning. Signed-off-by: Arnd Bergmann commit 2b0ced1203c2da02ee9fe9f1f8becf834a6bff8b Author: Arnaud Pouliquen Date: Wed Oct 14 14:54:40 2020 +0200 dt-bindings: remoteproc: stm32_rproc: update syscon descriptions Align other syscon descriptions with st,syscfg-m4-state and st,syscfg-rsc-tbl descriptions by suppressing the cells description. Acked-by: Rob Herring Signed-off-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20201014125441.2457-4-arnaud.pouliquen@st.com Signed-off-by: Bjorn Andersson commit e67bae44c708b734e852077428f97b26610bccac Author: Arnaud Pouliquen Date: Wed Oct 14 14:54:39 2020 +0200 dt-bindings: remoteproc: stm32_rproc: update for firmware synchronization Add new properties description used to attach to a pre-loaded firmware according to the commit 9276536f455b3 ("remoteproc: stm32: Parse syscon that will manage M4 synchronisation") which updates the driver part. Reviewed-by: Rob Herring Signed-off-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20201014125441.2457-3-arnaud.pouliquen@st.com Signed-off-by: Bjorn Andersson commit d5123d2c71916dac01f76f9cdf517fde6936d5fa Author: Arnaud Pouliquen Date: Wed Oct 14 14:54:38 2020 +0200 dt-bindings: arm: stm32: Add compatible for syscon tamp node Since commit ad440432d1f9 ("dt-bindings: mfd: Ensure 'syscon' has a more specific compatible") It is required to provide at least 2 compatibles string for syscon node. This patch documents the new compatible for stm32 SoC to support TAMP registers access. Signed-off-by: Arnaud Pouliquen Acked-by: Rob Herring Link: https://lore.kernel.org/r/20201014125441.2457-2-arnaud.pouliquen@st.com Signed-off-by: Bjorn Andersson commit 2a45a08a5bcfb97a211c5064e81cbbbabbc32e7a Author: Viresh Kumar Date: Wed May 20 15:53:08 2020 +0530 asm-generic/sembuf: Update architecture related information in comment The structure came originally from x86_32 but is used by most of the architectures now. Update the comment which says it is for x86 only. Signed-off-by: Viresh Kumar Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/64efe033394b6f0dfef043a63fd8897a81ba6d16.1589970173.git.viresh.kumar@linaro.org' commit 0afb88d5a602488f877380ad1ec37cc20c927c68 Author: Viorel Suman Date: Tue Oct 13 15:17:33 2020 +0300 ASoC: dt-bindings: fsl_xcvr: Add document for XCVR XCVR (Audio Transceiver) is a new IP module found on i.MX8MP. Signed-off-by: Viorel Suman Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201013121733.83684-3-viorel.suman@oss.nxp.com Signed-off-by: Mark Brown commit 28564486866fa889b78264360022c94836fa8072 Author: Viorel Suman Date: Tue Oct 13 15:17:32 2020 +0300 ASoC: fsl_xcvr: Add XCVR ASoC CPU DAI driver XCVR (Audio Transceiver) is a on-chip functional module found on i.MX8MP. It support HDMI2.1 eARC, HDMI1.4 ARC and SPDIF. Signed-off-by: Viorel Suman Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/20201013121733.83684-2-viorel.suman@oss.nxp.com Signed-off-by: Mark Brown commit 292f70d7cdd506e21d12de650f626b95d31b7ec7 Author: Nicholas Piggin Date: Wed Sep 2 00:15:20 2020 +1000 arm: use asm-generic/mmu_context.h for no-op implementations Signed-off-by: Nicholas Piggin Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Arnd Bergmann commit 75e6a851d696218a446028ea10339f3039e47a35 Author: Nicholas Piggin Date: Wed Sep 2 00:15:19 2020 +1000 arc: use asm-generic/mmu_context.h for no-op implementations Signed-off-by: Nicholas Piggin Cc: Vineet Gupta Cc: linux-snps-arc@lists.infradead.org Signed-off-by: Arnd Bergmann commit 6dfc3f5bcbf53c46003b9c7387a6e51f5deac892 Author: Nicholas Piggin Date: Wed Sep 2 00:15:18 2020 +1000 alpha: use asm-generic/mmu_context.h for no-op implementations Signed-off-by: Nicholas Piggin Acked-by: Matt Turner Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: linux-alpha@vger.kernel.org Signed-off-by: Arnd Bergmann commit 94f89922e1e094f57a143965059a3e477f3f2fdc Author: Nicholas Piggin Date: Wed Sep 2 00:15:17 2020 +1000 asm-generic: add generic MMU versions of mmu context functions Many of these are no-ops on many architectures, so extend mmu_context.h to cover MMU and NOMMU, and split the NOMMU bits out to nommu_context.h Signed-off-by: Nicholas Piggin Acked-by: Mike Rapoport Acked-by: Arnd Bergmann Cc: linux-arch@vger.kernel.org Signed-off-by: Arnd Bergmann commit 80e8eaab5e98fc013fd4afb4aab1fceeb049cbfd Author: Douglas Anderson Date: Tue Oct 13 14:25:30 2020 -0700 soc: qcom: geni: Optimize/comment select fifo/dma mode The functions geni_se_select_fifo_mode() and geni_se_select_fifo_mode() are a little funny. They read/write a bunch of memory mapped registers even if they don't change or aren't relevant for the current protocol. Let's make them a little more sane. We'll also add a comment explaining why we don't do some of the operations for UART. NOTE: there is no evidence at all that this makes any performance difference and it fixes no bugs. However, it seems (to me) like it makes the functions a little easier to understand. Decreasing the amount of times we read/write memory mapped registers is also nice, even if we are using "relaxed" variants. Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20201013142448.v2.3.I646736d3969dc47de8daceb379c6ba85993de9f4@changeid Signed-off-by: Bjorn Andersson commit 9cb4c67d7717135d6f4600a49ab07b470ea4ee2f Author: Douglas Anderson Date: Tue Oct 13 14:25:29 2020 -0700 Revert "i2c: i2c-qcom-geni: Fix DMA transfer race" This reverts commit 02b9aec59243c6240fc42884acc958602146ddf6. As talked about in the patch ("soc: qcom: geni: More properly switch to DMA mode"), swapping the order of geni_se_setup_m_cmd() and geni_se_xx_dma_prep() can sometimes cause corrupted transfers. Thus we traded one problem for another. Now that we've debugged the problem further and fixed the geni helper functions to more disable FIFO interrupts when we move to DMA mode we can revert it and end up with (hopefully) zero problems! To be explicit, the patch ("soc: qcom: geni: More properly switch to DMA mode") is a prerequisite for this one. Fixes: 02b9aec59243 ("i2c: i2c-qcom-geni: Fix DMA transfer race") Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Reviewed-by: Akash Asthana Tested-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20201013142448.v2.2.I7b22281453b8a18ab16ef2bfd4c641fb1cc6a92c@changeid Signed-off-by: Bjorn Andersson commit 4b6ea87be44ef34732846fc71e44c41125f0c4fa Author: Douglas Anderson Date: Tue Oct 13 14:25:28 2020 -0700 soc: qcom: geni: More properly switch to DMA mode On geni-i2c transfers using DMA, it was seen that if you program the command (I2C_READ) before calling geni_se_rx_dma_prep() that it could cause interrupts to fire. If we get unlucky, these interrupts can just keep firing (and not be handled) blocking further progress and hanging the system. In commit 02b9aec59243 ("i2c: i2c-qcom-geni: Fix DMA transfer race") we avoided that by making sure we didn't program the command until after geni_se_rx_dma_prep() was called. While that avoided the problems, it also turns out to be invalid. At least in the TX case we started seeing sporadic corrupted transfers. This is easily seen by adding an msleep() between the DMA prep and the writing of the command, which makes the problem worse. That means we need to revert that commit and find another way to fix the bogus IRQs. Specifically, after reverting commit 02b9aec59243 ("i2c: i2c-qcom-geni: Fix DMA transfer race"), I put some traces in. I found that the when the interrupts were firing like crazy: - "m_stat" had bits for M_RX_IRQ_EN, M_RX_FIFO_WATERMARK_EN set. - "dma" was set. Further debugging showed that I could make the problem happen more reliably by adding an "msleep(1)" any time after geni_se_setup_m_cmd() ran up until geni_se_rx_dma_prep() programmed the length. A rather simple fix is to change geni_se_select_dma_mode() so it's a true inverse of geni_se_select_fifo_mode() and disables all the FIFO related interrupts. Now the problematic interrupts can't fire and we can program things in the correct order without worrying. As part of this, let's also change the writel_relaxed() in the prepare function to a writel() so that our DMA is guaranteed to be prepared now that we can't rely on geni_se_setup_m_cmd()'s writel(). NOTE: the only current user of GENI_SE_DMA in mainline is i2c. Fixes: 37692de5d523 ("i2c: i2c-qcom-geni: Add bus driver for the Qualcomm GENI I2C controller") Fixes: 02b9aec59243 ("i2c: i2c-qcom-geni: Fix DMA transfer race") Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Reviewed-by: Akash Asthana Tested-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20201013142448.v2.1.Ifdb1b69fa3367b81118e16e9e4e63299980ca798@changeid Signed-off-by: Bjorn Andersson commit a1344daeab95b93dd1d19fcfbc7dbaf2a4735129 Author: Julia Lawall Date: Sun Oct 11 11:19:39 2020 +0200 ASoC: dapm: use semicolons rather than commas to separate statements Replace commas with semicolons. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/1602407979-29038-9-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Mark Brown commit 94fa760d01c21350261388f404e167d5cb752573 Author: Julia Lawall Date: Sun Oct 11 11:19:38 2020 +0200 ASoC: madera: use semicolons rather than commas to separate statements Replace commas with semicolons. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Acked-by: Charles Keepax Link: https://lore.kernel.org/r/1602407979-29038-8-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Mark Brown commit 40faaca03bf7d7ca1480677f0c8c543016cf426d Author: Julia Lawall Date: Sun Oct 11 11:19:37 2020 +0200 ASoC: samsung: snow: use semicolons rather than commas to separate statements Replace commas with semicolons. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/1602407979-29038-7-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Mark Brown commit bed5ed644c741fd69a19a3cb811b5c1da1d50755 Author: Julia Lawall Date: Sun Oct 11 11:19:36 2020 +0200 ASoC: SOF: Intel: hda: use semicolons rather than commas to separate statements Replace commas with semicolons. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/1602407979-29038-6-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Mark Brown commit edc3f5b43a4446c84069e59df7e48663ec28579d Author: Julia Lawall Date: Sun Oct 11 11:19:34 2020 +0200 ASoC: Intel: bytcr_rt5651: use semicolons rather than commas to separate statements Replace commas with semicolons. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Acked-by: Cezary Rojewski Link: https://lore.kernel.org/r/1602407979-29038-4-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Mark Brown commit 2db5fa77cd7ea4bd18c7e1afb49417debc9f498a Author: Julia Lawall Date: Sun Oct 11 11:19:32 2020 +0200 ASoC: wm8350: use semicolons rather than commas to separate statements Replace commas with semicolons. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Acked-by: Charles Keepax Link: https://lore.kernel.org/r/1602407979-29038-2-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Mark Brown commit bd1f64bb57f7b6a6f2e8fa9a7b37be55fbc06f73 Author: Stephan Gerhold Date: Wed Sep 16 12:41:35 2020 +0200 arm64: dts: qcom: msm8916-pm8916: Stop using s1/l3 as regulators s1 (VDDCX) and l3 (VDDMX) are now managed by rpmpd as power domains. This allows us to vote for voltage corners instead of voting for raw voltages. But we cannot manage these as regulator and power domain at the same time: The votes by rpmpd would conflict with the ones from the regulator driver. All users of these regulators have been converted to power domains. Make sure that no new users are added by removing s1 and l3 from the regulator definitions. This also allows us to remove the arbitrary voltage constraints we have been using for these regulators. Not all of the voltages listed there would actually have been safe for the boards. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200916104135.25085-11-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 809f299a969873581c832bbcb1b8cccaf8af2eeb Author: Stephan Gerhold Date: Wed Sep 16 12:41:34 2020 +0200 arm64: dts: qcom: msm8916: Use power domains for MSS/WCNSS remoteprocs So far we have been making proxy votes for the remote processors through the regulator interface. Now that we have rpmpd it's better to vote for performance states through the power domain interface. This also allows us to move these supplies back to msm8916.dtsi because the device tree binding for RPMPD is independent of the underlying regulator/PMIC. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200916104135.25085-10-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 858bce9c4cddd11088695751e6e30a5230806b06 Author: Stephan Gerhold Date: Wed Sep 16 12:41:33 2020 +0200 remoteproc: qcom_wcnss: Allow replacing regulators with power domains So far we have been doing all proxy votes by voting for raw voltages/load through the regulator interface. But actually VDDCX and VDDMX represent power domains that should be preferably managed using corner votes through the power domain interface. Looking closer the code was actually never doing the proxy votes correctly: The vddcx regulator is specified as: { "vddcx", .super_turbo = true }, which is supposed to say that we should vote for the maximum corner of the VDDCX power domain. But actually "super_turbo" is unused so all we did so far is to enable the power domain. We did not vote for it to scale to the maximum performance state. Using them through the power domain interface allows voting for the maximum performance state. However, we still need to support using them through the regulator interface for old device trees. The way this is implemented here is that we check if attaching the two power domain succeeds. If yes, we skip the first "num_pd_vregs" regulators in the "vregs" list and only request the remaining ones. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200916104135.25085-9-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 20a2269c1983aff7894f432b86434ef1738e6d52 Author: Stephan Gerhold Date: Wed Sep 16 12:41:32 2020 +0200 dt-bindings: remoteproc: qcom,wcnss: Deprecate regulators for PDs So far we have been doing all proxy votes by voting for raw voltages/load through the regulator interface. But actually VDDCX and VDDMX represent power domains that should be preferably managed using corner votes through the power domain interface. Document that those should be specified as power domains for qcom,pronto-v1/2-pil and deprecate using them through the regulator interface. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200916104135.25085-8-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 8750cf39239404abbdf727f246723d4e03b54bab Author: Stephan Gerhold Date: Wed Sep 16 12:41:31 2020 +0200 remoteproc: qcom_q6v5_mss: Allow replacing regulators with power domains Newer platforms vote for necessary power domains through the power domain subsystem. For historical reasons older platforms like MSM8916 or MSM8974 still control these as regulators. Managing them as power domains is preferred since that allows us to vote for corners instead of raw voltages. Make it possible for MSM8916 and MSM8974 to manage these as power domains. For compatibility with old device trees we still need to support falling back to the regulators when necessary. The way this is implemented here is that the deprecated regulators are defined as "fallback_proxy_supply". Only if attaching the power domains fails because they are not specified (-ENODATA) we request and manage the fallback regulators instead. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200916104135.25085-7-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 0711ae454b2da902d6bb661e722ab69b6b02cf17 Author: Stephan Gerhold Date: Wed Sep 16 12:41:30 2020 +0200 dt-bindings: remoteproc: qcom: Deprecate regulators for Q6V5 PDs Newer platforms vote for necessary power domains through the power domain subsystem. For historical reasons older platforms like MSM8916 or MSM8974 still control these as regulators. Managing them as power domains is preferred since that allows us to vote for corners instead of raw voltages. Document that those should be specified as power domains and deprecate using them through the regulator interface. Reviewed-by: Rob Herring Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200916104135.25085-6-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 3116a9931fa6fa067986a2cb0cc447c58530b1f0 Author: Baolin Wang Date: Mon Jun 1 14:05:52 2020 +0800 hwspinlock: sprd: Remove redundant header files Remove redundant header files. Signed-off-by: Baolin Wang Link: https://lore.kernel.org/r/1590991552-93643-1-git-send-email-baolin.wang@linux.alibaba.com Signed-off-by: Bjorn Andersson commit 2709436ecf38d12b70c7bf4eed4ff65ba5f41f04 Author: Stephan Gerhold Date: Wed Sep 16 12:41:29 2020 +0200 arm64: dts: qcom: msm8916: Add RPM power domains MSM8916 has two RPM power domains: VDDCX and VDDMX. So far we have been managing them by voting for raw voltages through the regulator subsystem, but it's better to manage them with corners as actual power domains. Add the device tree node for rpmpd so we can manage them as real power domains instead of using the regulators. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200916104135.25085-5-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 84314cf7d0aa4f67cc791d8b858333e9b17f5371 Author: Stephan Gerhold Date: Wed Sep 16 12:41:28 2020 +0200 soc: qcom: rpmpd: Add MSM8916 power domains MSM8916 has two RPM power domains: VDDCX and VDDMX. Add the necessary definitions to manage them with rpmpd. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200916104135.25085-4-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 819f7d91ad97d0660a4915e4ff4241c786fa613a Author: Stephan Gerhold Date: Wed Sep 16 12:41:27 2020 +0200 dt-bindings: power: rpmpd: Add MSM8916 RPM power domains MSM8916 has two RPM power domains: VDDCX and VDDMX. Add the device tree bindings to manage them through rpmpd. Reviewed-by: Rob Herring Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200916104135.25085-3-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit b5a3bf66d7fa107172c7c0d013e2eea3774ec48e Author: Jun Nie Date: Wed Sep 30 18:01:45 2020 +0800 soc: qcom: rpmpd: Add MSM8939 power-domains Add the shared modemcx/cx/mx power-domains found on MSM8939. Reviewed-by: Stephan Gerhold Signed-off-by: Jun Nie Link: https://lore.kernel.org/r/20200930100145.9457-3-jun.nie@linaro.org Signed-off-by: Bjorn Andersson commit 1dd50f17d6ce36b7d92765dc58a9f4abf78f29b9 Author: Jun Nie Date: Wed Sep 30 18:01:44 2020 +0800 dt-bindings: power: rpmpd: Add MSM8939 RPM power domains MSM8939 has three RPM power domains: VDDCX and VDDMX and VDDMDCX. Add the device tree bindings to manage them through rpmpd. Reviewed-by: Stephan Gerhold Acked-by: Rob Herring Signed-off-by: Jun Nie Link: https://lore.kernel.org/r/20200930100145.9457-2-jun.nie@linaro.org Signed-off-by: Bjorn Andersson commit 043323da2255a2309af8c940c848b676e38f3a59 Author: Stephan Gerhold Date: Wed Sep 16 12:41:26 2020 +0200 soc: qcom: rpmpd: Rename MAX_8996_RPMPD_STATE to MAX_CORNER_RPMPD_STATE Older SoCs like MSM8916, MSM8939, MSM8974, MSM8996, ... use "voltage corners" instead of "voltage levels". It seems like they all use exactly the same set of corner values, a value from 0-6 where 6 is the maximum corner (super turbo). In preparation to add the power domains for MSM8916, rename MAX_8996_RPMPD_STATE to MAX_CORNER_RPMPD_STATE to make it clear that this is the max_state to be used for all SoCs using corners. - Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200916104135.25085-2-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 5fd7fb438b7ce40918fc059afe77b12b5fe46ce2 Author: Konrad Dybcio Date: Sun Oct 18 14:26:19 2020 +0200 soc: qcom: rpmpd: Add SDM660 power-domains Add the shared cx/mx and sensor sub-system's cx and mx power-domains found on SDM660. Signed-off-by: Konrad Dybcio Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20201018122620.9735-1-kholk11@gmail.com Signed-off-by: Bjorn Andersson commit ee84049c1391d45c6e3ecccf45b5f679e4914253 Author: Konrad Dybcio Date: Sun Oct 18 14:26:20 2020 +0200 dt-bindings: power: rpmpd: Add SDM660 power-domains bindings Add the new bindings for SDM660 rpmpd power domains. Signed-off-by: Konrad Dybcio Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20201018122620.9735-2-kholk11@gmail.com Signed-off-by: Bjorn Andersson commit 5a7f34ab0232bc50d39ac0627a470425227fed7d Author: Samuel Holland Date: Wed Oct 14 01:19:41 2020 -0500 ASoC: sun8i-codec: Add the AIF3 DAI, widgets, and routes AIF3 has some differences from AIF1 and AIF2: - It supports one channel only - It supports master mode only - It is not directly connected to any of the mixers; instead all audio goes through a mux with AIF2. - It does not have its own clock dividers; instead it reuses AIF2 BCLK and LRCK. This means that when both AIF2 and AIF3 are active, they must use the same sample rate and total frame width. Since AIF2 and AIF3 are only used for codec2codec DAI links, constraints are not applicable here; the only thing we can do when the rates don't match is report an error. Make the necessary adjustments to support this AIF. Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20201014061941.4306-18-samuel@sholland.org Signed-off-by: Mark Brown commit 50ec8422acd2cdadf5599cc046a5448770542aa7 Author: Samuel Holland Date: Wed Oct 14 01:19:40 2020 -0500 ASoC: sun8i-codec: Add the AIF2 DAI, widgets, and routes This adds support for AIF2, which is stereo and has fullly independent clocking capability, making it very similar to AIF1. Acked-by: Maxime Ripard Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20201014061941.4306-17-samuel@sholland.org Signed-off-by: Mark Brown commit 7a6b937ec4e256b028be9b4e244d40287282c825 Author: Samuel Holland Date: Wed Oct 14 01:19:39 2020 -0500 ASoC: sun8i-codec: Generalize AIF clock control The AIF clock control register has the same layout for all three AIFs. The only difference between them is that AIF3 is missing some fields. We can reuse the same register field definitions for all three registers, and use the DAI ID to select the correct register address. Signed-off-by: Samuel Holland Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/20201014061941.4306-16-samuel@sholland.org Signed-off-by: Mark Brown commit 342cacb92d627a7cc8df1b5fe3e404530164ea17 Author: Samuel Holland Date: Wed Oct 14 01:19:38 2020 -0500 ASoC: sun8i-codec: Enable all supported PCM formats Now that the DAI clock setup is correct for all hardware-supported PCM formats, we can enable them in the driver. With the appropriate support in the CPU DAI driver, this allows userspace to access the additional formats. Since this codec is connected to the CPU via a DAI, not directly, we do not care if the CPU DAI is using 3-byte or 4-byte formats, so we can support them both. Acked-by: Maxime Ripard Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20201014061941.4306-15-samuel@sholland.org Signed-off-by: Mark Brown commit 2464dccab7fef040bd6e85cd78ac33e2731925da Author: Samuel Holland Date: Wed Oct 14 01:19:37 2020 -0500 ASoC: sun8i-codec: Require an exact BCLK divisor match Now that we guarantee that SYSCLK is running at the optimal rate when hw_params succeeds, and that it will continue running at that rate, SYSCLK will always be an integer multiple of BCLK. So we can always pick the exact divider, not just the closest divider. Acked-by: Maxime Ripard Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20201014061941.4306-14-samuel@sholland.org Signed-off-by: Mark Brown commit 3952ec2ac55a5afcda84270fa203f17a6309af6b Author: Samuel Holland Date: Wed Oct 14 01:19:36 2020 -0500 ASoC: sun8i-codec: Protect the clock rate while streams are open The codec's clock input is shared among all AIFs, and shared with other audio-related hardware in the SoC, including I2S and SPDIF controllers. To ensure sample rates selected by userspace or by codec2codec DAI links are maintained, the clock rate must be protected while it is in use. Signed-off-by: Samuel Holland Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/20201014061941.4306-13-samuel@sholland.org Signed-off-by: Mark Brown commit 15b45912341e884a16322792525db7a2b2b9a1f9 Author: Samuel Holland Date: Wed Oct 14 01:19:35 2020 -0500 ASoC: sun8i-codec: Constrain to compatible sample rates While another stream is active, only allow userspace to use sample rates that are compatible with the current SYSCLK frequency. This ensures the actual sample rate will always match what is given in hw_params. Acked-by: Maxime Ripard Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20201014061941.4306-12-samuel@sholland.org Signed-off-by: Mark Brown commit 6c5326bebd4041a21c77b2b96461a97b7f4e39ee Author: Samuel Holland Date: Wed Oct 14 01:19:34 2020 -0500 ASoC: sun8i-codec: Automatically set the system sample rate The sun8i codec has three clock/sample rate domains: - The AIF1 domain, with a sample rate equal to AIF1 LRCK - The AIF2 domain, with a sample rate equal to AIF2 LRCK - The SYSCLK domain, containing the ADC, DAC, and effects (AGC/DRC), with a sample rate given by a divisor from SYSCLK. The divisor is controlled by the AIF1_FS or AIF2_FS field in SYS_SR_CTRL, depending on if SYSCLK's source is AIF1CLK or AIF2CLK, respectively. The exact sample rate depends on if SYSCLK is running at 22.6 MHz or 24.6 MHz. When an AIF (currently only AIF1) is active, the ADC and DAC should run at that sample rate to avoid artifacting. Sample rate conversion is only available when multiple AIFs are active and are routed to each other; this means the sample rate conversion hardware usually cannot be used. Only attach the event hook to the channel 0 AIF widgets, since we only need one event when a DAI stream starts or stops. Channel 0 is always brought up with a DAI stream, regardless of the number of channels in the stream. The ADC and DAC (along with their effects blocks) can be used even if no AIFs are in use. In that case, we should select an appropriate sample rate divisor, instead of keeping the last-used AIF sample rate. 44.1/48 kHz was chosen to balance audio quality and power consumption. Since the sample rate is tied to active AIF paths, disabling pmdown_time allows switching to the optimal sample rate immediately, instead of after a 5 second delay. Signed-off-by: Samuel Holland Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/20201014061941.4306-11-samuel@sholland.org Signed-off-by: Mark Brown commit c2b751d769669467da1247c9c6c536a494c9c96e Author: Samuel Holland Date: Wed Oct 14 01:19:33 2020 -0500 ASoC: sun8i-codec: Enable all supported sample rates The system sample rate programmed into the hardware is really a clock divider from SYSCLK to the ADC and DAC. Since we support two SYSCLK frequencies, we can use all sample rates corresponding to one of those frequencies divided by any available divisor. This commit enables support for those sample rates. It also stops advertising support for a 64 kHz sample rate, which is not supported. Acked-by: Maxime Ripard Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20201014061941.4306-10-samuel@sholland.org Signed-off-by: Mark Brown commit e557148ac220b43bc6cbc06333f56b1c61e90825 Author: Samuel Holland Date: Wed Oct 14 01:19:32 2020 -0500 ASoC: sun8i-codec: Enforce symmetric DAI parameters The AIFs have a single register controlling DAI parameters in both directions, including BCLK/LRCK divisor and word size. The DAIs produce only noise or silence if any of these parameters is wrong. Therefore, we need to enforce symmetry for these parameters, so starting a new substream will not break an existing substream. Acked-by: Maxime Ripard Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20201014061941.4306-9-samuel@sholland.org Signed-off-by: Mark Brown commit afb1a6006299a8b6b5ad04363fd74aa66a6ac79b Author: Samuel Holland Date: Wed Oct 14 01:19:31 2020 -0500 ASoC: sun8i-codec: Support the TDM slot binding Now that BCLK and LRCK rate calculations in the driver can handle any hardware-supported slot width and number of slots, allow overriding those parameters from the device tree. Acked-by: Maxime Ripard Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20201014061941.4306-8-samuel@sholland.org Signed-off-by: Mark Brown commit 68a4f2caaa17ce62890c51ef957dd008c2e42aae Author: Samuel Holland Date: Wed Oct 14 01:19:30 2020 -0500 ASoC: sun8i-codec: Correct the BCLK divisor calculation Previously, the BCLK divisor calculation assumed zero padding and exactly two slots. In order to support the TDM slot binding and 20/24-bit word sizes, those assumptions must be removed. Due to hardware limitations, the BCLK/LRCK ratio is not as simple as "slot_width * slots". However, the correct value is already calculated elsewhere in this function, since it must also be programmed into the hardware. Reuse that value to calculate the correct SYSCLK/BCLK divisor. Acked-by: Maxime Ripard Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20201014061941.4306-7-samuel@sholland.org Signed-off-by: Mark Brown commit e511aed79632e8a2dd03068f8bd11b64cb0d7170 Author: Samuel Holland Date: Wed Oct 14 01:19:29 2020 -0500 ASoC: sun8i-codec: Round up the LRCK divisor The codec supports only power-of-two BCLK/LRCK divisors. If either the slot width or the number of slots is not a power of two, the LRCK divisor must be rounded up to provide enough space. To do that, use order_base_2 (instead of ilog2, which rounds down). Since the rounded divisor is also needed for setting the SYSCLK/BCLK divisor, return the order base 2 instead of fully calculating the hardware register encoding. Acked-by: Maxime Ripard Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20201014061941.4306-6-samuel@sholland.org Signed-off-by: Mark Brown commit 1abb43aeadfb513c0a16013cd445fb7dd3b285bb Author: Samuel Holland Date: Wed Oct 14 01:19:28 2020 -0500 ASoC: sun8i-codec: Use the provided word size The hardware supports 8 to 24-bit word sizes on all three of its DAIs, only one of which is connected to the CPU DAI. Program the word size based on the actual selected format, instead of assuming limitations from another driver (which, incedentally, has patches pending to remove that limitation). Acked-by: Maxime Ripard Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20201014061941.4306-5-samuel@sholland.org Signed-off-by: Mark Brown commit c56f5f1c0b23ac0cdcf8c73bf6f7363ef0cdfbc0 Author: Samuel Holland Date: Wed Oct 14 01:19:27 2020 -0500 ASoC: sun8i-codec: Enable all supported clock inversions When using the I2S, LEFT_J, or RIGHT_J format, the hardware supports independent BCLK and LRCK inversion control. When using DSP_A or DSP_B, LRCK inversion is not supported. The register bit is repurposed to select between DSP_A and DSP_B. Extend the driver to support this. Signed-off-by: Samuel Holland Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/20201014061941.4306-4-samuel@sholland.org Signed-off-by: Mark Brown commit fd57ed2de5b1a5e153abf2f8c02fc3c1bf40de3b Author: Samuel Holland Date: Wed Oct 14 01:19:26 2020 -0500 ASoC: sun8i-codec: Program DAI format before clock inversion The LRCK inversion bit has a different meaning in DSP mode: it selects between the DSP A and DSP B formats. To support this, we need to know if the selected format is a DSP format. One easy way to do this is to set the format field before the clock inversion fields. Acked-by: Maxime Ripard Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20201014061941.4306-3-samuel@sholland.org Signed-off-by: Mark Brown commit 7826b8d15ec2cea1c1b8680ada1eb965d0660aa6 Author: Samuel Holland Date: Wed Oct 14 01:19:25 2020 -0500 ASoC: sun8i-codec: Prepare to extend the DAI driver In preparation for adding additional DAIs to this component, convert the DAI driver definition to an array. Since this changes all of the lines in the definition anyway, let's move it closer to the ops function definitions, instead of on the far side of the DAPM arrays. And while moving the DAI driver ops, rename the set_fmt hook to match the usual naming scheme. Give the existing DAI an explicit ID and more meaningful stream names, so it will remain unique as more DAIs are added. The AIF widget streams must be updated to match. Acked-by: Maxime Ripard Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20201014061941.4306-2-samuel@sholland.org Signed-off-by: Mark Brown commit cb3659268a12602a2ad1e8e8d34ce155bb43ae6e Author: John Stultz Date: Mon Oct 5 11:29:56 2020 +0530 soc: qcom: rpmh: Allow RPMH driver to be loaded as a module This patch allow the rpmh driver to be loaded as a permenent module. Meaning it can be loaded from a module, but then cannot be unloaded. Ideally, it would include a remove hook and related logic, but the rpmh driver is fairly core to the system, so once its loaded with almost anything else to get the system to go, the dependencies are not likely to ever also be removed. So making it a permanent module at least improves things slightly over requiring it to be a built in driver. Cc: Todd Kjos Cc: Saravana Kannan Cc: Andy Gross Cc: Bjorn Andersson Cc: Rajendra Nayak Cc: linux-arm-msm@vger.kernel.org Signed-off-by: John Stultz Signed-off-by: Bjorn Andersson [mkshah: Fix typos in commit message, send after removing _rcuidle trace] Signed-off-by: Maulik Shah Reviewed-by: Stephen Boyd Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/1601877596-32676-3-git-send-email-mkshah@codeaurora.org Signed-off-by: Bjorn Andersson commit 7bb7a83f4d91a09ed02f6c22d10842d26528ba40 Author: Maulik Shah Date: Mon Oct 5 11:29:55 2020 +0530 Revert "drivers: qcom: rpmh-rsc: Use rcuidle tracepoints for rpmh" Commit efde2659b0fe ("drivers: qcom: rpmh-rsc: Use rcuidle tracepoints for rpmh") was written to fix a bug seen in an unmerged series that implemented a struct generic_pm_domain::power_off() callback calling rpmh_flush(). See stack trace below. Call trace: dump_backtrace+0x0/0x174 show_stack+0x20/0x2c dump_stack+0xc8/0x124 lockdep_rcu_suspicious+0xe4/0x104 __tcs_buffer_write+0x230/0x2d0 rpmh_rsc_write_ctrl_data+0x210/0x270 rpmh_flush+0x84/0x24c rpmh_domain_power_off+0x78/0x98 _genpd_power_off+0x40/0xc0 genpd_power_off+0x168/0x208 Later the final merged solution is to use CPU PM notification to invoke rpmh_flush() and power_off() callback of genpd is not implemented in the driver. CPU PM notifiers are run with RCU enabled/watching (see cpu_pm_notify() and how it calls rcu_irq_enter_irqson() before calling the notifiers). Remove this change since RCU will not be idle during CPU PM notifications hence not required to use _rcuidle tracepoint. Using _rcuidle tracepoint prevented rpmh driver to be loadable module as these are not exported symbols. This reverts commit efde2659b0fe835732047357b2902cca14f054d9. Cc: Sai Prakash Ranjan Cc: John Stultz Cc: Stephen Rothwell Reviewed-by: Stephen Boyd Reviewed-by: Sai Prakash Ranjan Reviewed-by: Ulf Hansson Signed-off-by: Maulik Shah Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/1601877596-32676-2-git-send-email-mkshah@codeaurora.org Signed-off-by: Bjorn Andersson commit c14e64b46944fe480d94ff33512e1855b246e690 Author: Isaac J. Manjarres Date: Tue Sep 15 12:25:26 2020 +0530 soc: qcom: llcc: Support chipsets that can write to llcc Older chipsets may not be allowed to configure certain LLCC registers as that is handled by the secure side software. However, this is not the case for newer chipsets and they must configure these registers according to the contents of the SCT table, while keeping in mind that older targets may not have these capabilities. So add support to allow such configuration of registers to enable capacity based allocation and power collapse retention for capable chipsets. Reason for choosing capacity based allocation rather than the default way based allocation is because capacity based allocation allows more finer grain partition and provides more flexibility in configuration. As for the retention through power collapse, it has an advantage where the cache hits are more when we wake up from power collapse although it does burn more power but the exact power numbers are not known at the moment. Signed-off-by: Isaac J. Manjarres Reviewed-by: Douglas Anderson Reviewed-by: Stephen Boyd [saiprakash.ranjan@codeaurora.org: use existing config and reword commit msg] Signed-off-by: Sai Prakash Ranjan Link: https://lore.kernel.org/r/dac7e11cf654fc6d75a6b5ca062ab87b01547810.1600151951.git.saiprakash.ranjan@codeaurora.org Signed-off-by: Bjorn Andersson commit af7244c076374c065d42f8bd24254e7ea2fae4f1 Author: Sai Prakash Ranjan Date: Tue Sep 15 12:25:25 2020 +0530 soc: qcom: llcc: Move llcc configuration to its own function Cleanup qcom_llcc_cfg_program() by moving llcc configuration to a separate function of its own. Also correct misspelled 'instance' caught by checkpatch. Reviewed-by: Bjorn Andersson Reviewed-by: Stephen Boyd Suggested-by: Stephen Boyd Signed-off-by: Sai Prakash Ranjan Link: https://lore.kernel.org/r/51f9ad67333eedf326212dd1b040aade6978e5b1.1600151951.git.saiprakash.ranjan@codeaurora.org Signed-off-by: Bjorn Andersson commit 5434dcef54964e1f8a293e43b93ba6b45cc477ae Author: Iskren Chernev Date: Sun Sep 20 17:48:59 2020 +0300 ARM: dts: qcom: msm8974-klte: Add support for SD card The Samsung Galaxy S5 (klte), has 3 SDHCI nodes used for internal storage, WiFi, external SD card slot. The external SD card slot is similar to the internal storage. Signed-off-by: Iskren Chernev Link: https://lore.kernel.org/r/20200920144859.813032-8-iskren.chernev@gmail.com Signed-off-by: Bjorn Andersson commit 19524d5b1700616d4cfad9922238bd31ad758074 Author: Iskren Chernev Date: Sun Sep 20 17:48:58 2020 +0300 ARM: dts: qcom: msm8974-klte: Add support for wifi The Samsung Galaxy S5 (klte), uses a Broadcom 4354 Chip connected on the SDIO bus. The chip also requires a corresponding firmware + txt file[1]. [1] https://gitlab.com/postmarketOS/pmaports/-/blob/master/firmware/firmware-samsung-klte/APKBUILD Signed-off-by: Iskren Chernev Link: https://lore.kernel.org/r/20200920144859.813032-7-iskren.chernev@gmail.com Signed-off-by: Bjorn Andersson commit 99128e7503bed5475aadd10fa97b1d7ffc5a35c2 Author: Iskren Chernev Date: Sun Sep 20 17:48:57 2020 +0300 ARM: dts: qcom: msm8974-klte: Add gpio expander chip The Samsung Galaxy S5 has a GPIO Expander chip, the PCAL6416A with 16 ports on a i2c bus. These pins are used for WiFi, NFC, IR among other things. Signed-off-by: Iskren Chernev Link: https://lore.kernel.org/r/20200920144859.813032-6-iskren.chernev@gmail.com Signed-off-by: Bjorn Andersson commit 60367221d7d46d623dbef4cd30924e99c97ff2e5 Author: Iskren Chernev Date: Sun Sep 20 17:48:56 2020 +0300 ARM: dts: qcom: msm8974-klte: Add support for led The klte uses a Panasonic AN30259A LED controller for it's indicator led. Signed-off-by: Iskren Chernev Link: https://lore.kernel.org/r/20200920144859.813032-5-iskren.chernev@gmail.com Signed-off-by: Bjorn Andersson commit 972f5a62a698857f4a02a6667f53ca158ce7421d Author: Iskren Chernev Date: Sun Sep 20 17:48:55 2020 +0300 ARM: dts: qcom: msm8974-klte: Add support for touchscreen Add support for the touchscreen found on the Samsung Galaxy S5. Signed-off-by: Iskren Chernev Link: https://lore.kernel.org/r/20200920144859.813032-4-iskren.chernev@gmail.com Signed-off-by: Bjorn Andersson commit a193dc521c97c07098bf0b6345966561a1f0ab9f Author: Iskren Chernev Date: Sun Sep 20 17:48:54 2020 +0300 ARM: dts: qcom: msm8974-klte: Add support for touchkey Add support for the touchkey found on the Samsung Galaxy S5. The touchkey is responsible for handling the application and back buttons found around the home button. Signed-off-by: Iskren Chernev Link: https://lore.kernel.org/r/20200920144859.813032-3-iskren.chernev@gmail.com Signed-off-by: Bjorn Andersson commit 486d49914307e4e1ff0f5087f803cfa1e44a13bf Author: Iskren Chernev Date: Sun Sep 20 17:48:53 2020 +0300 ARM: dts: qcom: msm8974-klte: Merge pinctrl nodes commit cd13c72c1853f219e1f ("ARM: dts: qcom: msm8974-klte: Add max77826 pmic node") and commit 8bf7a360a92cc6b2aebc8 ("ARM: dts: qcom: msm8974-klte: Add sdhci1 node") both added pinctrl node. This patch merges the two nodes. Signed-off-by: Iskren Chernev Link: https://lore.kernel.org/r/20200920144859.813032-2-iskren.chernev@gmail.com Signed-off-by: Bjorn Andersson commit fc3e62e25c3896855b7c3d72df19ca6be3459c9f Author: Evan Green Date: Tue Sep 29 13:30:57 2020 -0700 soc: qcom: smp2p: Safely acquire spinlock without IRQs smp2p_update_bits() should disable interrupts when it acquires its spinlock. This is important because without the _irqsave, a priority inversion can occur. This function is called both with interrupts enabled in qcom_q6v5_request_stop(), and with interrupts disabled in ipa_smp2p_panic_notifier(). IRQ handling of spinlocks should be consistent to avoid the panic notifier deadlocking because it's sitting on the thread that's already got the lock via _request_stop(). Found via lockdep. Cc: stable@vger.kernel.org Fixes: 50e99641413e7 ("soc: qcom: smp2p: Qualcomm Shared Memory Point to Point") Reviewed-by: Bjorn Andersson Reviewed-by: Stephen Boyd Signed-off-by: Evan Green Link: https://lore.kernel.org/r/20200929133040.RESEND.1.Ideabf6dcdfc577cf39ce3d95b0e4aa1ac8b38f0c@changeid Signed-off-by: Bjorn Andersson commit 228813aaa71113d7a12313b87c4905a9d3f9df37 Author: Douglas Anderson Date: Thu Oct 1 14:18:55 2020 -0700 arm64: dts: qcom: sc7180: Fix one forgotten interconnect reference In commit e23b1220a246 ("arm64: dts: qcom: sc7180: Increase the number of interconnect cells") we missed increasing the cells on one interconnect. That's no bueno. Fix it. NOTE: it appears that things aren't totally broken without this fix, but clearly something isn't going to be working right. If nothing else, without this fix I see this in the logs: OF: /soc@0/mdss@ae00000: could not get #interconnect-cells for /soc@0/interrupt-controller@17a00000 Fixes: e23b1220a246 ("arm64: dts: qcom: sc7180: Increase the number of interconnect cells") Reviewed-by: Georgi Djakov Reviewed-by: Rob Clark Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20201001141838.1.I08054d1d976eed64ffa1b0e21d568e0dc6040b54@changeid Signed-off-by: Bjorn Andersson commit 4af5c6dc255ca64e5263a5254bb7553f05bb682c Author: Kathiravan T Date: Wed Oct 14 21:16:17 2020 +0530 arm64: dts: ipq6018: update the reserved-memory node Memory region reserved for the TZ is changed long back. Let's update the same to align with the corret region. Its size also increased to 4MB from 2MB. Along with that, bump the Q6 region size to 85MB. Fixes: 1e8277854b49 ("arm64: dts: Add ipq6018 SoC and CP01 board support") Signed-off-by: Kathiravan T Link: https://lore.kernel.org/r/1602690377-21304-1-git-send-email-kathirav@codeaurora.org Signed-off-by: Bjorn Andersson commit 95d9f84fca1ef1bbbc2be6313e29181c7f0de99f Author: Andy Shevchenko Date: Wed Oct 21 14:25:37 2020 +0300 gpiolib: split error path in gpiod_request_commit() For better maintenance and micro optimization split error path in the gpiod_request_commit(). Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 8bbff39c6c6c86405fe023ccf50eeb44feacbde9 Author: Andy Shevchenko Date: Wed Oct 21 14:25:36 2020 +0300 gpiolib: Unify expectations about ->request() returned value Half of the code in the GPIO library is written in an expectation that any non-zero value returned from the ->request() callback is an error code, while some code checks only for negative values. Unify expectations about ->request() returned value to be non-zero for an error and 0 for the success. Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 6bc9d7391ad66cfe70d5fd4b3bc6dc31c713ec36 Merge: 3650b228f83ad 57222a1be27e0 Author: Arnd Bergmann Date: Mon Oct 26 15:38:16 2020 +0100 Merge tag 'optee-use-uuid-api-for-v5.10' of git://git.linaro.org:/people/jens.wiklander/linux-tee into arm/drivers Use UUID API to export the UUID Uses export_uuid() to export and uuid_t to an u8 array instead of depending on the internals of uuid_t. * tag 'optee-use-uuid-api-for-v5.10' of git://git.linaro.org:/people/jens.wiklander/linux-tee: tee: optee: Use UUID API for exporting the UUID Link: https://lore.kernel.org/r/20201013063612.GA3325842@jade Signed-off-by: Arnd Bergmann commit 40941954f6ce1d8b92a37fc35a28f83632deda8b Author: Andy Shevchenko Date: Thu Oct 22 19:58:47 2020 +0300 gpiolib: of: Use named item for enum gpiod_flags variable Use named item instead of plain integer for enum gpiod_flags to make it clear that even 0 has its own meaning. Cc: Mika Westerberg Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit ad26098970b637f4565b110df929d74eb2c2652e Author: Tom Rix Date: Mon Oct 19 09:48:57 2020 -0700 ALSA: remove unneeded break A break is not needed if it is preceded by a return, goto or break Signed-off-by: Tom Rix Acked-by: Mark Brown Link: https://lore.kernel.org/r/20201019164857.27223-1-trix@redhat.com Signed-off-by: Takashi Iwai commit 3ffb7c45d193c771d7fc7722be0a45bc196f25f9 Author: Kent Gibson Date: Wed Oct 14 14:29:21 2020 +0800 gpiolib: cdev: document that line eflags are shared The line.eflags field is shared so document this fact and highlight it throughout using READ_ONCE() and WRITE_ONCE() accessors. Also use a local copy of the eflags in edge_irq_thread() to ensure consistent control flow even if eflags changes. This is only a defensive measure as edge_irq_thread() is currently disabled when the eflags are changed. Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit 7b58696d9a8415576317615c63e9899797026f17 Author: Andy Shevchenko Date: Wed Oct 21 17:25:28 2020 +0300 gpiolib: Extract gpiod_not_found() helper Several places in the code are using same idiom, i.e. IS_ERR(desc) && PTR_ERR(desc) == -ENOENT which meaning is GPIO description is not found. For better readability extract gpiod_not_found() helper and use it. Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit e34b8feeaa4b65725b25f49c9b08a0f8707e8e86 Author: Christian König Date: Wed Oct 21 14:06:49 2020 +0200 drm/ttm: merge ttm_dma_tt back into ttm_tt It makes no difference to kmalloc if the structure is 48 or 64 bytes in size. Signed-off-by: Christian König Reviewed-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/396950/ commit 230c079fdcf45efacd316a76c3132b9f42cd3565 Author: Christian König Date: Tue Oct 20 20:10:39 2020 +0200 drm/ttm: make num_pages uint32_t We can still allocate 16TiB with that. Signed-off-by: Christian König Reviewed-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/396946/ commit 05f8d25097050241d55c19a67c2a7bc7bbc428a9 Author: Christian König Date: Mon Oct 19 18:56:45 2020 +0200 drm/ttm: move swapin out of page alloc backend This is not related to allocating the backing store in any way. Signed-off-by: Christian König Reviewed-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/396947/ commit d1cb1f254a5b1c07788eecb84b443d59ccdfb9e0 Author: Christian König Date: Mon Oct 19 18:49:27 2020 +0200 drm/ttm: nuke ttm_tt_set_(un)populated again Neither page allocation backend nor the driver should mess with that. Signed-off-by: Christian König Reviewed-by: Dave Airlie Reviewed-by: Madhav Chauhan Link: https://patchwork.freedesktop.org/patch/396948/ commit fc7f6a054e1a8c5525bf59c73d8e6333d48a5120 Merge: 3650b228f83ad 6e5329c6e6032 Author: Mark Brown Date: Mon Oct 26 13:11:37 2020 +0000 Merge existing fixes from asoc/for-5.10 commit 8d71d2bf6efec3032208958c483a247f529ffb16 Author: Gabriel Krisman Bertazi Date: Sat Oct 3 23:25:36 2020 -0400 x86: Reclaim TIF_IA32 and TIF_X32 Now that these flags are no longer used, reclaim those TIF bits. Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201004032536.1229030-11-krisman@collabora.com commit ff170cd0595398a7b66cb40f249eb2f10c29b66d Author: Gabriel Krisman Bertazi Date: Sat Oct 3 23:25:35 2020 -0400 x86/mm: Convert mmu context ia32_compat into a proper flags field The ia32_compat attribute is a weird thing. It mirrors TIF_IA32 and TIF_X32 and is used only in two very unrelated places: (1) to decide if the vsyscall page is accessible (2) for uprobes to find whether the patched instruction is 32 or 64 bit. In preparation to remove the TIF flags, a new mechanism is required for ia32_compat, but given its odd semantics, adding a real flags field which configures these specific behaviours is the best option. So, set_personality_x64() can ask for the vsyscall page, which is not available in x32/ia32 and set_personality_ia32() can configure the uprobe code as needed. uprobe cannot rely on other methods like user_64bit_mode() to decide how to patch, so it needs some specific flag like this. Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Thomas Gleixner Acked-by: Andy Lutomirski Link: https://lore.kernel.org/r/20201004032536.1229030-10-krisman@collabora.com commit 3316ec8ccd34e19690a12e65801d605d25155031 Author: Gabriel Krisman Bertazi Date: Sat Oct 3 23:25:34 2020 -0400 x86/elf: Use e_machine to check for x32/ia32 in setup_additional_pages() Since TIF_X32 is going away, avoid using it to find the ELF type when choosing which additional pages to set up. According to SysV AMD64 ABI Draft, an AMD64 ELF object using ILP32 must have ELFCLASS32 with (E_MACHINE == EM_X86_64), so use that ELF field to differentiate a x32 object from a IA32 object when executing setup_additional_pages() in compat mode. Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201004032536.1229030-9-krisman@collabora.com commit 9a29a671902c2be05d636045a4dd365219ca716c Author: Gabriel Krisman Bertazi Date: Sat Oct 3 23:25:33 2020 -0400 elf: Expose ELF header on arch_setup_additional_pages() Like it is done for SET_PERSONALITY with ARM, which requires the ELF header to select correct personality parameters, x86 requires the headers when selecting which VDSO to load, instead of relying on the going-away TIF_IA32/X32 flags. Add an indirection macro to arch_setup_additional_pages(), that x86 can reimplement to receive the extra parameter just for ELF files. This requires no changes to other architectures, who can continue to use the original arch_setup_additional_pages for ELF and non-ELF binaries. Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201004032536.1229030-8-krisman@collabora.com commit 2424b14605c71a7187c14edd525044eb36bdea47 Author: Gabriel Krisman Bertazi Date: Sat Oct 3 23:25:32 2020 -0400 x86/elf: Use e_machine to select start_thread for x32 Since TIF_X32 is going away, avoid using it to find the ELF type in compat_start_thread. According to SysV AMD64 ABI Draft, an AMD64 ELF object using ILP32 must have ELFCLASS32 with (E_MACHINE == EM_X86_64), so use that ELF field to differentiate a x32 object from a IA32 object when executing start_thread() in compat mode. Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Thomas Gleixner Reviewed-by: Andy Lutomirski Link: https://lore.kernel.org/r/20201004032536.1229030-7-krisman@collabora.com commit bc3d7bf61a9eaecccc84dc2ecc2a9a3fa4f5ec47 Author: Gabriel Krisman Bertazi Date: Sat Oct 3 23:25:31 2020 -0400 elf: Expose ELF header in compat_start_thread() Like it is done for SET_PERSONALITY with x86, which requires the ELF header to select correct personality parameters, x86 requires the headers on compat_start_thread() to choose starting CS for ELF32 binaries, instead of relying on the going-away TIF_IA32/X32 flags. Add an indirection macro to ELF invocations of START_THREAD, that x86 can reimplement to receive the extra parameter just for ELF files. This requires no changes to other architectures who don't need the header information, they can continue to use the original start_thread for ELF and non-ELF binaries, and it prevents affecting non-ELF code paths for x86. Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201004032536.1229030-6-krisman@collabora.com commit 2656af0d5abfa26d7f1e40f92e9953fe155b950a Author: Gabriel Krisman Bertazi Date: Sat Oct 3 23:25:30 2020 -0400 x86/elf: Use e_machine to choose DLINFO in compat Since TIF_X32 is going away, avoid using it to find the ELF type on ARCH_DLINFO. According to SysV AMD64 ABI Draft, an AMD64 ELF object using ILP32 must have ELFCLASS32 with (E_MACHINE == EM_X86_64), so use that ELF field to differentiate a x32 object from a IA32 object when loading ARCH_DLINFO in compat mode. Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Thomas Gleixner Reviewed-by: Andy Lutomirski Link: https://lore.kernel.org/r/20201004032536.1229030-5-krisman@collabora.com commit 47cd4dac1fb21759ffcfe0600827c87fa6acdfa7 Author: Gabriel Krisman Bertazi Date: Sat Oct 3 23:25:29 2020 -0400 x86/oprofile: Avoid TIF_IA32 when checking 64bit mode In preparation to remove TIF_IA32, stop using it in oprofile code. Use user_64bit_mode() instead. Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201004032536.1229030-4-krisman@collabora.com commit 214f0e804358cdd13b5cbe4445189f23e30618b4 Author: Gabriel Krisman Bertazi Date: Sat Oct 3 23:25:28 2020 -0400 x86/compat: Simplify compat syscall userspace allocation When allocating user memory space for a compat system call, don't consider whether the originating code is IA32 or X32, just allocate from a safe region for both, beyond the redzone. This should be safe for IA32, and has the benefit of avoiding TIF_IA32, which is about to be removed. Suggested-by: Andy Lutomirski Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201004032536.1229030-3-krisman@collabora.com commit 375d4bfda57392f0865dae051e1c4bd2700e8d71 Author: Gabriel Krisman Bertazi Date: Sat Oct 3 23:25:27 2020 -0400 perf/x86: Avoid TIF_IA32 when checking 64bit mode In preparation to remove TIF_IA32, stop using it in perf events code. Tested by running perf on 32-bit, 64-bit and x32 applications. Suggested-by: Andy Lutomirski Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20201004032536.1229030-2-krisman@collabora.com commit 9dcd17be61e4b6343cc612a3f6c30512acee60b9 Author: Grygorii Strashko Date: Sat Aug 29 21:41:39 2020 +0300 arm64: dts: ti: k3-am65: ringacc: drop ti, dma-ring-reset-quirk Remove obsolete "ti,dma-ring-reset-quirk" Ringacc DT property. Signed-off-by: Grygorii Strashko Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20200829184139.15547-4-grygorii.strashko@ti.com commit 529adfe8f131c60938ece113379f1a07640aefb1 Author: Mauro Carvalho Chehab Date: Fri Oct 23 18:33:23 2020 +0200 locks: fix a typo at a kernel-doc markup locks_delete_lock -> locks_delete_block Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jeff Layton commit f30795fb404edaa54213b0f4297db6987ec4eb35 Author: Borislav Petkov Date: Mon Oct 26 12:59:56 2020 +0100 EDAC: Do not issue useless debug statements in the polling routine They have been spreading around the subsystem by example so remove them all. Reported-by: Raymond Bennett Suggested-by: Jason Baron Signed-off-by: Borislav Petkov commit 16238415eb9886328a89fe7a3cb0b88c7335fe16 Author: Luo Meng Date: Fri Oct 23 14:20:05 2020 +0800 locks: Fix UBSAN undefined behaviour in flock64_to_posix_lock When the sum of fl->fl_start and l->l_len overflows, UBSAN shows the following warning: UBSAN: Undefined behaviour in fs/locks.c:482:29 signed integer overflow: 2 + 9223372036854775806 cannot be represented in type 'long long int' Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0xe4/0x14e lib/dump_stack.c:118 ubsan_epilogue+0xe/0x81 lib/ubsan.c:161 handle_overflow+0x193/0x1e2 lib/ubsan.c:192 flock64_to_posix_lock fs/locks.c:482 [inline] flock_to_posix_lock+0x595/0x690 fs/locks.c:515 fcntl_setlk+0xf3/0xa90 fs/locks.c:2262 do_fcntl+0x456/0xf60 fs/fcntl.c:387 __do_sys_fcntl fs/fcntl.c:483 [inline] __se_sys_fcntl fs/fcntl.c:468 [inline] __x64_sys_fcntl+0x12d/0x180 fs/fcntl.c:468 do_syscall_64+0xc8/0x5a0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Fix it by parenthesizing 'l->l_len - 1'. Signed-off-by: Luo Meng Signed-off-by: Jeff Layton commit 632211cdd6ad0efeef32c53ac731901b4bed3b94 Author: Steve Wahl Date: Mon Oct 19 15:35:33 2020 -0500 MAINTAINERS: Cleanup SGI-related entries UV platforms are the only ones which currently use the XP/XPC/XPNET driver, so it seems fair HPE should take some responsibility as maintainers of it; so add Mike Travis and Steve Wahl. Cliff Whickman's email address is no longer valid, so remove it. Robin Holt was contacted and wishes to remain as a maintainer. Update Dimitri Sivanich's email address for the SGI GRU driver. Add Mike Travis to HPE Superdome Flex (UV) platform. [ bp: Massage commit message. ] Acked-by: Robin Holt Signed-off-by: Steve Wahl Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201019203533.GA1203217@swahl-home.5wahls.com commit 6e0781e092a150b040cc305fd1832730cf78580a Author: Robin Murphy Date: Mon Oct 26 11:17:20 2020 +0000 clk: rockchip: Add appropriate arch dependencies There's no point offering support for 32-bit platforms to users configuring a 64-bit kernel - and vice-versa - unless they are explicitly interested in compile-testing. Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/72abb0f794b8ed77e274e8ee21c22e0bd3223dfd.1603710913.git.robin.murphy@arm.com Signed-off-by: Heiko Stuebner commit 633cdaf29ec4aae29868320adb3a4f1c5b8c0eac Author: Tom Rix Date: Mon Oct 19 13:08:03 2020 -0700 x86/mce: Remove unneeded break A break is not needed if it is preceded by a return. Signed-off-by: Tom Rix Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201019200803.17619-1-trix@redhat.com commit 880396c86a1f3663c22b74fef34353f05a1263ec Author: Tom Rix Date: Mon Oct 19 13:06:29 2020 -0700 x86/microcode/amd: Remove unneeded break A break is not needed if it is preceded by a return. Signed-off-by: Tom Rix Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201019200629.17247-1-trix@redhat.com commit 2612afd9b97964b67040e7883148ee7251a42776 Author: Serge Semin Date: Tue Oct 20 14:59:54 2020 +0300 arm64: dts: allwinner: h6: Harmonize DWC USB3 DT nodes name In accordance with the DWC USB3 bindings the corresponding node name is suppose to comply with the Generic USB HCD DT schema, which requires the USB nodes to have the name acceptable by the regexp: "^usb(@.*)?" . Make sure the "snps,dwc3"-compatible nodes are correctly named. Signed-off-by: Serge Semin Signed-off-by: Maxime Ripard Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201020115959.2658-25-Sergey.Semin@baikalelectronics.ru commit f09056c1decec889721c24c72f99730376918044 Author: Tom Rix Date: Mon Oct 19 12:35:24 2020 -0700 EDAC/amd64: Remove unneeded breaks A break is not needed if it is preceded by a return. Signed-off-by: Tom Rix Signed-off-by: Borislav Petkov Reviewed-by: Robert Richter Link: https://lkml.kernel.org/r/20201019193524.13391-1-trix@redhat.com commit 1a2b85f1e2a93a3f84243e654d225e4088735336 Author: Davidlohr Bueso Date: Wed Oct 21 12:07:49 2020 -0700 timekeeping: Convert jiffies_seq to seqcount_raw_spinlock_t Use the new api and associate the seqcounter to the jiffies_lock enabling lockdep support - although for this particular case the write-side locking and non-preemptibility are quite obvious. Signed-off-by: Davidlohr Bueso Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201021190749.19363-1-dave@stgolabs.net commit 40fe44cab01cb93e124db5d9a9cc290e1ac3f14e Author: Fabien Parent Date: Wed Oct 14 18:24:04 2020 +0200 arm64: dts: mediatek: mt8516: add usb1 node The MT8516 has 2 USB instances. Add support for the second USB instance. usb1 can only work in host mode. Signed-off-by: Fabien Parent Link: https://lore.kernel.org/r/20201014162404.1312544-2-fparent@baylibre.com Signed-off-by: Matthias Brugger commit 5fae271026990f684da7e364ec5abc9df1d0563d Author: Fabien Parent Date: Wed Oct 14 18:24:03 2020 +0200 arm64: dts: mediatek: mt8516: rename usb phy The USB phy node is named usb0_phy but there is only one phy with 2 ports on MT8516. Rename the phy to make it more obvious it can also support the usb1 node. The usb1 node will be added in a follow-up commit. Signed-off-by: Fabien Parent Link: https://lore.kernel.org/r/20201014162404.1312544-1-fparent@baylibre.com Signed-off-by: Matthias Brugger commit 204b9cd58f4c27c1b43bfbeab4ad418504a3ae6b Author: Fabien Parent Date: Mon Oct 12 22:52:18 2020 +0200 arm64: dts: mediatek: mt8516: add auxadc node Add node for the auxadc IP. The IP is compatible with the one found in MT8173 SoC. Signed-off-by: Fabien Parent Link: https://lore.kernel.org/r/20201012205218.3010868-2-fparent@baylibre.com Signed-off-by: Matthias Brugger commit 54e9f3633ed1bc22033de27dec733415bd750eda Author: Fabien Parent Date: Mon Oct 12 22:52:17 2020 +0200 dt-bindings: iio: adc: auxadc: add doc for MT8516 SoC Add documentation for the auxadc binding for MT8516 SoC. Signed-off-by: Fabien Parent Reviewed-by: Matthias Brugger Acked-by: Rob Herring Link: https://lore.kernel.org/r/20201012205218.3010868-1-fparent@baylibre.com Signed-off-by: Matthias Brugger commit e55c56df43dd11de4a6c08e3ea52ca45b51c8800 Author: Fabien Parent Date: Sun Oct 18 21:42:25 2020 +0200 arm64: dts: mediatek: mt8183: fix gce incorrect mbox-cells value The binding documentation says: - #mbox-cells: Should be 2. <&phandle channel priority> phandle: Label name of a gce node. channel: Channel of mailbox. Be equal to the thread id of GCE. priority: Priority of GCE thread. Fix the value of #mbox-cells. Fixes: d3c306e31bc7 ("arm64: dts: add gce node for mt8183") Signed-off-by: Fabien Parent Link: https://lore.kernel.org/r/20201018194225.3361182-1-fparent@baylibre.com Signed-off-by: Matthias Brugger commit 4c7a6260775d596bb4ded0c0e2b3d317e0b37014 Author: Hanks Chen Date: Thu Jul 30 21:30:15 2020 +0800 arm64: dts: add dts nodes for MT6779 this adds initial MT6779 dts settings for board support, including cpu, gic, timer, ccf, pinctrl, uart, sysirq...etc. Signed-off-by: Hanks Chen Link: https://lore.kernel.org/r/1596115816-11758-3-git-send-email-hanks.chen@mediatek.com Signed-off-by: Matthias Brugger commit f74cdb1c4e9b25e3e06f8d354371d53b97ae8482 Author: Enric Balletbo i Serra Date: Wed Aug 26 11:02:17 2020 +0200 arm64: dts: mt8173-elm: Remove ddc property from panel The elm and hana devices uses an Embedded DisplayPort (eDP) as interface for its panel, so the DDC channel specified in the binding is useless. Signed-off-by: Enric Balletbo i Serra Tested-by: Bilal Wasim Link: https://lore.kernel.org/r/20200826090218.682931-1-enric.balletbo@collabora.com Signed-off-by: Matthias Brugger commit cc7a16b14f386a9f67ba16195dfb85d2a9f3a007 Author: Matthias Brugger Date: Tue Oct 20 17:26:39 2020 +0200 MAINTAINERS: change mediatek wiki page The old wiki page unfortunately got lost by server crash. The new wiki can be found on the kernel.org infrastructure Signed-off-by: Matthias Brugger Reviewed-by: Chun-Kuang Hu Link: https://lore.kernel.org/r/20201020152639.21950-1-matthias.bgg@kernel.org Signed-off-by: Matthias Brugger commit 4007844b05815717f522c7ea9914e24ad0ff6c79 Author: Nicolas Boichat Date: Mon Sep 28 11:31:35 2020 +0800 soc: mediatek: Check if power domains can be powered on at boot time In the error case, where a power domain cannot be powered on successfully at boot time (in mtk_register_power_domains), pm_genpd_init would still be called with is_off=false, and the system would later try to disable the power domain again, triggering warnings as disabled clocks are disabled again (and other potential issues). Also print a warning splat in that case, as this should never happen. Fixes: c84e358718a66f7 ("soc: Mediatek: Add SCPSYS power domain driver") Signed-off-by: Nicolas Boichat Link: https://lore.kernel.org/r/20200928113107.v2.1.I5e6f8c262031d0451fe7241b744f4f3111c1ce71@changeid Signed-off-by: Matthias Brugger commit f1118a28bef94086c89398cee26987faa6c43a01 Author: Marek Szyprowski Date: Tue Jun 16 10:12:28 2020 +0200 cpuidle: big.LITTLE: enable driver only on Peach-Pit/Pi Chromebooks This driver always worked properly only on the Exynos 5420/5800 based Chromebooks (Peach-Pit/Pi), so change the required compatible string to the 'google,peach', to avoid enabling it on the other Exynos 542x/5800 boards, which hangs in such case. The main difference between Peach-Pit/Pi and other Exynos 542x/5800 boards is the firmware - Peach platform doesn't use secure firmware at all. Signed-off-by: Marek Szyprowski Reviewed-by: Bartlomiej Zolnierkiewicz Acked-by: Daniel Lezcano Signed-off-by: Krzysztof Kozlowski commit 96999c797ec1ef41259f00b4ddf9cf33b342cb78 Author: Dan Carpenter Date: Mon Aug 3 17:36:07 2020 +0300 memory: jz4780_nemc: Fix an error pointer vs NULL check in probe() The devm_ioremap() function returns NULL on error, it doesn't return error pointers. This bug could lead to an Oops during probe. Fixes: f046e4a3f0b9 ("memory: jz4780_nemc: Only request IO memory the driver will use") Cc: Signed-off-by: Dan Carpenter Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20200803143607.GC346925@mwanda Signed-off-by: Krzysztof Kozlowski commit 81f652afa6adde6c2db248e9ae83de16c25ddb50 Author: Lad Prabhakar Date: Thu Sep 17 20:59:24 2020 +0100 pinctrl: renesas: r8a7790: Add VIN1-B and VIN2-G pins, groups and functions Add pins, groups and functions for the VIN1-B [data/sync/field/clkenb/clk] and VIN2-G8. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Reviewed-by: Ulrich Hecht Link: https://lore.kernel.org/r/20200917195924.20384-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit cf25d802e029c31efac8bdc979236927f37183bd Author: Dan Carpenter Date: Wed Sep 23 14:31:42 2020 +0300 soc: renesas: rmobile-sysc: Fix some leaks in rmobile_init_pm_domains() This code needs to call iounmap() on one error path. Fixes: 2173fc7cb681 ("ARM: shmobile: R-Mobile: Add DT support for PM domains") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20200923113142.GC1473821@mwanda Signed-off-by: Geert Uytterhoeven commit 7f2c2f38c1c0dbfc5b1e13aa57678daa753e1c96 Author: Wolfram Sang Date: Tue Sep 22 14:00:36 2020 +0200 clk: renesas: rcar-gen3: Remove stp_ck handling for SDHI There is no case (and none foreseen) where we would need to disable the SDn clock. So, for simplicity, remove its handling. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20200922120036.10298-1-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven commit bdf0c8ea8c63d9e288ff06fc300e2eb8bd332d1c Author: Lad Prabhakar Date: Tue Oct 20 13:51:34 2020 +0100 arm64: dts: renesas: Add support for MIPI Adapter V2.1 connected to HiHope RZ/G2N Add support for AISTARVISION MIPI Adapter V2.1 board connected to HiHope RZ/G2N board. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Link: https://lore.kernel.org/r/20201020125134.22625-5-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 661495164934e15bc8a192f8eafa1ec9655e74f0 Author: Lad Prabhakar Date: Tue Oct 20 13:51:33 2020 +0100 arm64: dts: renesas: Add support for MIPI Adapter V2.1 connected to HiHope RZ/G2M Add support for AISTARVISION MIPI Adapter V2.1 board connected to HiHope RZ/G2M board. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Link: https://lore.kernel.org/r/20201020125134.22625-4-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 05e6ae33cf9834dd2f0ff35001828ca09fe5af26 Author: Lad Prabhakar Date: Tue Oct 20 13:51:32 2020 +0100 arm64: dts: renesas: Add support for MIPI Adapter V2.1 connected to HiHope RZ/G2H Add support for AISTARVISION MIPI Adapter V2.1 board connected to HiHope RZ/G2H board. Common file hihope-rzg2-ex-aistarvision-mipi-adapter-2.1.dtsi is created which will be used by RZ/G2{HMN}, by default the CSI20 node is tied to ov5645 camera endpoint and the imx219 camera endpoint is tied to CSI40. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Acked-by: Niklas Söderlund Link: https://lore.kernel.org/r/20201020125134.22625-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 622007d172fbb1d7556329bafd72dc28c0baf1b8 Author: Lad Prabhakar Date: Tue Oct 20 13:51:31 2020 +0100 arm64: dts: renesas: aistarvision-mipi-adapter-2.1: Add parent macro for each sensor For HiHope RZ/G2H the OV5645 sensor is populated on i2c2 whereas the imx219 sensor is populated on i2c3 so add support for handling such cases by adding a parent macro for each sensor. Also update r8a774c0-ek874-mipi-2.1.dts to incorporate the changes. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Link: https://lore.kernel.org/r/20201020125134.22625-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 53e573dc39fba1834f3e4fa002cb754b61a30701 Author: Biju Das Date: Thu Oct 15 14:23:50 2020 +0100 arm64: dts: renesas: cat875: Remove rxc-skew-ps from ethernet-phy node The CAT875 sub board from Silicon Linux uses Realtek phy and the driver does not support rxc-skew-ps property. Fixes: 6b170cd3ed02949f ("arm64: dts: renesas: cat875: Add ethernet support") Signed-off-by: Biju Das Reviewed-by: Lad Prabhakar Link: https://lore.kernel.org/r/20201015132350.8360-2-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 67d3dcf12a3d245b6fd6ca5672893f7ae4e137ed Author: Biju Das Date: Thu Oct 15 14:23:49 2020 +0100 arm64: dts: renesas: hihope-rzg2-ex: Drop rxc-skew-ps from ethernet-phy node HiHope RZG2[HMN] boards uses Realtek phy and the driver does not support rxc-skew-ps property. So remove rxc-skew-ps from ethernet-phy node. Fixes: 7433f1fb8ec8fe ("arm64: dts: renesas: Add HiHope RZ/G2M sub board support") Signed-off-by: Biju Das Reviewed-by: Lad Prabhakar Link: https://lore.kernel.org/r/20201015132350.8360-1-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit d311d818fa8cfa791d05de9e03b0d9babfc82dd2 Author: Lad Prabhakar Date: Wed Oct 14 15:55:58 2020 +0100 ARM: dts: r8a7742-iwg21d-q7-dbcm-ca: Enable VIN instances Enable VIN instances along with OV5640 as endpoints on the adapter board. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Link: https://lore.kernel.org/r/20201014145558.12854-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit ca3b4330a5437d877e9b0093ba8b746e73695fb0 Author: Geert Uytterhoeven Date: Mon Oct 5 13:29:51 2020 +0200 arm64: dts: renesas: r8a77961: Add MSIOF nodes Add the device nodes for all Clock-Synchronized Serial Interface with FIFO (MSIOF) instances on R-Car M3-W+. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201005112951.22532-1-geert+renesas@glider.be commit e8c471588890f9939b23d628e65b7dcb3a856f7a Author: Krzysztof Kozlowski Date: Fri Oct 2 18:39:45 2020 +0200 arm64: dts: renesas: Align GPIO hog names with dtschema The convention for node names is to use hyphens, not underscores. dtschema for pca95xx expects GPIO hogs to end with 'hog' suffix. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201002163945.7885-1-krzk@kernel.org Signed-off-by: Geert Uytterhoeven commit 9b533dc8f340f5e9e7f2ed610510b2191d5e447c Author: Lad Prabhakar Date: Tue Sep 29 15:05:02 2020 +0100 ARM: dts: r8a7742-iwg21d-q7: Add LCD support The iwg21d comes with a 7" capacitive touch screen, therefore add support for it. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20200929140502.16017-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 12ec7e56ce95d7b6fd4cd74e634c1181e2b424e1 Author: Marek Behún Date: Mon Oct 19 13:08:08 2020 +0200 Documentation: leds: remove invalidated information The contents of the Future Development section of leds-class Documentation was invalidated when support for LED-private triggers was merged. Remove this section. Signed-off-by: Marek Behún Fixes: 93690cdf3060 ("leds: trigger: add support for LED-private device...") Signed-off-by: Pavel Machek commit 79bd11db8ba8046943dddf740d58baac54326f56 Author: Krzysztof Kozlowski Date: Sun Sep 20 21:57:49 2020 +0200 ARM: dts: imx: align GPIO hog names with dtschema dtschema for GPIO controllers expects GPIO hogs to end with 'hog' suffix. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit dfedd2ac4725317735bae5f8085d2d4c301959e4 Author: Krzysztof Kozlowski Date: Sun Sep 20 21:57:48 2020 +0200 arm64: dts: imx8mq-librem5: align GPIO hog names with dtschema dtschema expects GPIO hogs to end with 'hog' suffix. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 688eb28211abdf82a3f51e8997f1c8137947227d Author: Arvind Sankar Date: Sun Oct 11 10:20:12 2020 -0400 efi/x86: Only copy the compressed kernel image in efi_relocate_kernel() The image_size argument to efi_relocate_kernel() is currently specified as init_size, but this is unnecessarily large. The compressed kernel is much smaller, in fact, its image only extends up to the start of _bss, since at this point, the .bss section is still uninitialized. Depending on compression level, this can reduce the amount of data copied by 4-5x. Signed-off-by: Arvind Sankar Link: https://lore.kernel.org/r/20201011142012.96493-1-nivedita@alum.mit.edu Signed-off-by: Ard Biesheuvel commit bc13809f1c47245cd584f4ad31ad06a5c5f40e54 Author: Heinrich Schuchardt Date: Sat Oct 3 08:03:56 2020 +0200 efi/libstub/x86: simplify efi_is_native() CONFIG_EFI_MIXED depends on CONFIG_X86_64=y. There is no need to check CONFIG_X86_64 again. Signed-off-by: Heinrich Schuchardt Link: https://lore.kernel.org/r/20201003060356.4913-1-xypron.glpk@gmx.de Signed-off-by: Ard Biesheuvel commit 9ab476ba001ead1f64430a3a61c9466ac0fa91ed Author: Ivan Safonov Date: Sun Oct 18 23:11:33 2020 +0300 staging: r8188eu: inline rtw_init_netdev_name() The rtw_init_netdev_name() is a small function that is used once and does not encapsulate any logic. Signed-off-by: Ivan Safonov Link: https://lore.kernel.org/r/20201018201132.40480-1-insafonov@gmail.com Signed-off-by: Greg Kroah-Hartman commit 620d28440c10b8f58127481a95f7b17c31591300 Author: Deepak R Varma Date: Thu Oct 22 12:02:30 2020 +0530 staging: greybus: audio: code indentation and formatting changes Correct code indentation and realignment as per the coding style guidelines. Issue reported by checkpatch script. Signed-off-by: Deepak R Varma Link: https://lore.kernel.org/r/20201022063230.GA351623@ubuntu204 Signed-off-by: Greg Kroah-Hartman commit 01a050e8e468cce2e2e8659c0cedabc264c5c872 Author: Misha Gusarov Date: Sat Oct 24 22:22:21 2020 +0200 staging: gdm724x: Clarify naming of packet_type<->tty index symbols This driver was using "packet_type" for packet types and for the mapping of TTY indices to packet types. Fix the confusion by renaming the symbols. Fixes sparse warning: drivers/staging/gdm724x/gdm_mux.c:146:24: warning: symbol 'packet_type' shadows an earlier one Signed-off-by: Misha Gusarov Link: https://lore.kernel.org/r/20201024202221.60726-1-dottedmag@dottedmag.net Signed-off-by: Greg Kroah-Hartman commit e0071d318f5e778f4a683ca28ec205a2bd88f460 Author: Deepak R Varma Date: Wed Oct 21 21:41:14 2020 +0530 staging: kpc2000: Use BIT macro instead of bit masking Replace bit masking by the BIT macro. This resolves the checkpatch issue "CHECK: Prefer using the BIT macro" Signed-off-by: Deepak R Varma Link: https://lore.kernel.org/r/2269298ae71605b47fa43a2ebaee23d0ad4ed5a5.1603295576.git.mh12gx2825@gmail.com Signed-off-by: Greg Kroah-Hartman commit faf9ca25f9183b184a6888ce24b48cc893dd9746 Author: Deepak R Varma Date: Wed Oct 21 21:39:29 2020 +0530 staging: kpc2000: re-indent code for better readability Re-indent code as per the coding style guidelines. The changes improve code readability. Issue reported by checkpatch script. Signed-off-by: Deepak R Varma Link: https://lore.kernel.org/r/29cf604e69435c1f0ef46397d0d8a1b62f32fa9b.1603295576.git.mh12gx2825@gmail.com Signed-off-by: Greg Kroah-Hartman commit ae94bd537420b4ac13ffcff43fab68adbccc8062 Author: Deepak R Varma Date: Wed Oct 21 21:24:13 2020 +0530 staging: kpc2000: rearrange lines exceeding 100 columns Reformat lines that exceed 100 column in length. Issue reported by checkpatch script. Signed-off-by: Deepak R Varma Link: https://lore.kernel.org/r/809d142d109b4f0acfcb4fa204bdd03381fc051f.1603295575.git.mh12gx2825@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2ed1fa08e6748b0a9010723d404d49d07ff6ed60 Author: Deepak R Varma Date: Fri Oct 16 21:14:23 2020 +0530 staging: vt6655: rearrange lines exceeding 100 columns Rearrange lines that are longer than 100 columns in width. Issue reported by chckpatch script. Also remove unnecessary pair of braces for single line instruction post if condition. Signed-off-by: Deepak R Varma Link: https://lore.kernel.org/r/20201016154423.GA17210@ubuntu204 Signed-off-by: Greg Kroah-Hartman commit 30676f7b1f9256121fa630ff2ed3165f3089f619 Author: Elena Afanasova Date: Thu Oct 22 13:58:57 2020 -0700 staging/rtl8723bs: replace "foo * bar" with "foo *bar" Correct the coding style error reported by checkpatch.pl. Signed-off-by: Elena Afanasova Link: https://lore.kernel.org/r/20201022205857.6144-1-eafanasova@gmail.com Signed-off-by: Greg Kroah-Hartman commit 87e6059da1a3d1710d5faaca2404fb6b4ba68045 Author: Elena Afanasova Date: Tue Oct 20 08:05:59 2020 -0700 staging/qlge: fix typo Reported by checkpatch.pl. Signed-off-by: Elena Afanasova Link: https://lore.kernel.org/r/20201020150559.35667-1-eafanasova@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6b6946b25e672d269db75755bef14e3a2705b9c7 Author: Elena Afanasova Date: Tue Oct 20 08:03:56 2020 -0700 staging/qlge: add blank line after declaration Reported by checkpatch.pl. Signed-off-by: Elena Afanasova Link: https://lore.kernel.org/r/20201020150356.35605-1-eafanasova@gmail.com Signed-off-by: Greg Kroah-Hartman commit 194b11c3e2fc0636a5157c1859981dc2b6f58c4b Author: Colin Ian King Date: Fri Oct 16 23:33:03 2020 +0100 staging: wfx: make a const array static, makes object smaller Don't populate const array filter_ies on the stack but instead make it static. Makes the object code smaller by 261 bytes. Before: text data bss dec hex filename 21674 3166 448 25288 62c8 drivers/staging/wfx/sta.o After: text data bss dec hex filename 21349 3230 448 25027 61c3 drivers/staging/wfx/sta.o (gcc version 10.2.0) Reviewed-by: Jérôme Pouiller Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20201016223303.687278-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 0795f519d1afffc283b288660fad052ae6d4aae6 Author: Elena Afanasova Date: Thu Oct 22 05:35:45 2020 -0700 staging/rtl8192u/ieee80211: remove debugging line Remove unnecessary debug line from rtl8192u_dot11d_init(). Signed-off-by: Elena Afanasova Link: https://lore.kernel.org/r/20201022123545.4530-1-eafanasova@gmail.com Signed-off-by: Greg Kroah-Hartman commit e13ff19e7c5bce985e7d11da3c838bd7ffbc71b2 Author: Elena Afanasova Date: Tue Oct 20 08:08:23 2020 -0700 staging/rtl8192u/ieee80211: use __func__ macro Replace function names with __func__ macro. Remove unnecessary characters in error messages. Reported by checkpatch.pl. Signed-off-by: Elena Afanasova Link: https://lore.kernel.org/r/20201020150823.35734-1-eafanasova@gmail.com Signed-off-by: Greg Kroah-Hartman commit e93301843720778d8db73ab9d36b5f03beec3a16 Author: Deepak R Varma Date: Fri Oct 16 21:55:47 2020 +0530 staging: rtl8188eu: rearrange lines exceeding 100 columns Rearrange lines that are more than 100 columns in width to make them more readable. Issue reported by checkpatch script. Signed-off-by: Deepak R Varma Link: https://lore.kernel.org/r/20201016162547.GA18073@ubuntu204 Signed-off-by: Greg Kroah-Hartman commit 153167c5219a6c50ec02fc9606d870c123cacb82 Author: Deepak R Varma Date: Mon Oct 19 22:44:26 2020 +0530 staging: comedi: tests: Simplify conditional evaluation Boolean comparison of the condition inside unittest function is unnecessary and can be simplified by directly using the condition outcome for evaluation. Issue reported by : scripts/coccinelle/misc/boolinit.cocci Signed-off-by: Deepak R Varma Link: https://lore.kernel.org/r/20201019171426.GA72818@ubuntu204 Signed-off-by: Greg Kroah-Hartman commit a5a6e5eff467bf5d23c1b88048a6ab0008259dd3 Author: Deepak R Varma Date: Wed Oct 14 23:39:03 2020 +0530 staging: qlge: remove extra blank lines Remove unnecessary blank lines as per the coding style guidelines. Issue reported by checkpatch scrip Signed-off-by: Deepak R Varma Link: https://lore.kernel.org/r/20201014180903.GA61053@ubuntu204 Signed-off-by: Greg Kroah-Hartman commit 75f1df269d4aeba03ea1b866446d4e7ab1e1afec Author: Ivan Safonov Date: Sun Oct 11 13:50:51 2020 +0300 staging: r8188eu: use native wireless IE codes from linux/ieee80211.h IE code definitions have been replaced with native ones to avoid code duplication. The unobvious substitutions are: _SSN_IE_1_ -> WLAN_EID_VENDOR_SPECIFIC; _WPA_IE_ID_ -> WLAN_EID_VENDOR_SPECIFIC; _WPA2_IE_ID_ -> WLAN_EID_RSN. Signed-off-by: Ivan Safonov Link: https://lore.kernel.org/r/20201011105050.5896-1-insafonov@gmail.com Signed-off-by: Greg Kroah-Hartman commit 42a18f09bcb900997f5f67ac8fe29ba4bc6e79e3 Author: Ivan Safonov Date: Sun Oct 11 18:47:16 2020 +0300 staging: rtl8723bs: remove unnecessary type cast of rtw_netdev_priv() result The type cast padapter = (struct adapter *)rtw_netdev_priv(dev); do nothing because type of rtw_netdev_priv() result is (struct adapter *). Signed-off-by: Ivan Safonov Link: https://lore.kernel.org/r/20201011154715.13445-1-insafonov@gmail.com Signed-off-by: Greg Kroah-Hartman commit c854f01429631c9e7ef51d90f2a8e2bdc195163b Author: Vasily Utkin Date: Sat Oct 10 19:07:22 2020 +0200 staging: comedi: ni_mio_common: Fix newline after dereference operator Fix newline after dereference operator detected by checkpatch. Signed-off-by: Vasily Utkin Link: https://lore.kernel.org/r/20201010170721.98595-1-vautkin@teknik.io Signed-off-by: Greg Kroah-Hartman commit 4c62db88459a52522e61526b8c692c67ba180c2d Author: Deepak R Varma Date: Sun Oct 11 16:18:00 2020 +0530 staging: iio: adis16240: add blank line before struct definition Add a blank line before starting structure definition as per coding style guidelines. Issue reported by checkpatch script. Acked-by: Julia Lawall Signed-off-by: Deepak R Varma Link: https://lore.kernel.org/r/20201011104800.GA29412@ubuntu204 Signed-off-by: Greg Kroah-Hartman commit e722a295cf493388dae474745d30e91e1a2ec549 Author: Greg Kroah-Hartman Date: Thu Aug 27 14:36:27 2020 +0200 staging: ion: remove from the tree The ION android code has long been marked to be removed, now that we dma-buf support merged into the real part of the kernel. It was thought that we could wait to remove the ion kernel at a later time, but as the out-of-tree Android fork of the ion code has diverged quite a bit, and any Android device using the ion interface uses that forked version and not this in-tree version, the in-tree copy of the code is abandonded and not used by anyone. Combine this abandoned codebase with the need to make changes to it in order to keep the kernel building properly, which then causes merge issues when merging those changes into the out-of-tree Android code, and you end up with two different groups of people (the in-kernel-tree developers, and the Android kernel developers) who are both annoyed at the current situation. Because of this problem, just drop the in-kernel copy of the ion code now, as it's not used, and is only causing problems for everyone involved. Cc: "Arve Hjønnevåg" Cc: "Christian König" Cc: Christian Brauner Cc: Christoph Hellwig Cc: Hridya Valsaraju Cc: Joel Fernandes Cc: John Stultz Cc: Laura Abbott Cc: Martijn Coenen Cc: Shuah Khan Cc: Sumit Semwal Cc: Suren Baghdasaryan Cc: Todd Kjos Acked-by: Shuah Khan Link: https://lore.kernel.org/r/20200827123627.538189-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 09d56d92ad25b58113f4ec677e9b1ac1e2c3072b Author: Dmitry Osipenko Date: Mon Oct 26 01:17:33 2020 +0300 PM / devfreq: tegra30: Silence deferred probe error Tegra EMC driver was turned into a regular kernel driver, meaning that it could be compiled as a loadable kernel module now. Hence EMC clock isn't guaranteed to be available and clk_get("emc") may return -EPROBE_DEFER. Let's silence the deferred probe error. Acked-by: Chanwoo Choi Signed-off-by: Dmitry Osipenko Signed-off-by: Chanwoo Choi commit cc2a4e83612040a3dc49966c6c4ac5088ed7037f Author: Dmitry Osipenko Date: Mon Oct 26 01:17:31 2020 +0300 PM / devfreq: tegra20: Relax Kconfig dependency The Tegra EMC driver now could be compiled as a loadable kernel module. Currently devfreq driver depends on the EMC/MC drivers in Kconfig, and thus, devfreq is forced to be a kernel module if EMC is compiled as a module. This build dependency could be relaxed since devfreq driver checks MC/EMC presence on probe, allowing kernel configuration where devfreq is a built-in driver and EMC driver is a loadable module. This change puts Tegra20 devfreq Kconfig entry on a par with the Tegra30 devfreq entry. Acked-by: Chanwoo Choi Signed-off-by: Dmitry Osipenko Signed-off-by: Chanwoo Choi commit 9a93386bf667499d71e35051804438fd32dd77a8 Author: Dmitry Osipenko Date: Mon Oct 26 01:17:30 2020 +0300 PM / devfreq: tegra20: Silence deferred probe error Tegra EMC driver was turned into a regular kernel driver, meaning that it could be compiled as a loadable kernel module now. Hence EMC clock isn't guaranteed to be available and clk_get("emc") may return -EPROBE_DEFER. Let's silence the deferred probe error. Acked-by: Chanwoo Choi Signed-off-by: Dmitry Osipenko Signed-off-by: Chanwoo Choi commit ea0c5cbaf8b70fd6fe0269fb0b951965c82229cc Author: Dong Aisheng Date: Wed Jul 29 16:00:18 2020 +0800 clk: imx: lpcg: add suspend/resume support LPCG clock state may be lost when it's power domain is completely off during system suspend/resume and we need save and restore the state properly. Reviewed-by: Stephen Boyd Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo commit 18cdbad40c6c138edf62273417180227e12b198a Author: Dong Aisheng Date: Wed Jul 29 16:00:17 2020 +0800 clk: imx: clk-imx8qxp-lpcg: add runtime pm support add runtime pm support Reviewed-by: Stephen Boyd Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo commit a4bfc85ccf374fb4ff10c806a270bf241598a70a Author: Dong Aisheng Date: Wed Jul 29 16:00:16 2020 +0800 clk: imx: lpcg: allow lpcg clk to take device pointer Used to support runtime pm. Reviewed-by: Stephen Boyd Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo commit d5f1e6a2bb61db8d4bd269edac8b52a853b48ce8 Author: Dong Aisheng Date: Wed Jul 29 16:00:15 2020 +0800 clk: imx: imx8qxp-lpcg: add parsing clocks from device tree One LPCG controller supports up to 8 clock outputs while each of them is fixed to 4 bits. It supports only gating function with fixed bits. So we can use the clk-indices to fetch the corresponding clock idx from device tree. With this way, we can write a generic LPCG clock drivers. This patch add that support to parse clocks from device tree. Cc: Shawn Guo Cc: Sascha Hauer Cc: Michael Turquette Reviewed-by: Stephen Boyd Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo commit d0409631f466ae2e572a6a0ca684cced97fa1ade Author: Dong Aisheng Date: Wed Jul 29 16:00:14 2020 +0800 clk: imx: scu: add suspend/resume support Clock state will be lost when its power domain is completely off during system suspend/resume. So we save and restore the state accordingly in suspend/resume callback. Cc: Shawn Guo Cc: Sascha Hauer Cc: Michael Turquette Reviewed-by: Stephen Boyd Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo commit 78edeb080330ca2bc6c9b20d388c8ceb7a2ef8c0 Author: Dong Aisheng Date: Wed Jul 29 16:00:13 2020 +0800 clk: imx: scu: add runtime pm support Add runtime pm support Cc: Shawn Guo Cc: Sascha Hauer Cc: Michael Turquette Reviewed-by: Stephen Boyd Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo commit 2f1a2c1d00bc9417f5faa54777a23a52f054e9cf Author: Dong Aisheng Date: Wed Jul 29 16:00:12 2020 +0800 clk: imx: scu: allow scu clk to take device pointer Used to support runtime pm. Cc: Shawn Guo Cc: Sascha Hauer Cc: Michael Turquette Reviewed-by: Stephen Boyd Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo commit 0d5f1f4731b52e294f25de193978d8b181b55faa Author: Dong Aisheng Date: Wed Jul 29 16:00:11 2020 +0800 clk: imx: scu: bypass cpu power domains Bypass cpu power domains which are owned by ATF. Reviewed-by: Stephen Boyd Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo commit 77d8f3068c63ee0983f0b5ba3207d3f7cce11be4 Author: Dong Aisheng Date: Wed Jul 29 16:00:10 2020 +0800 clk: imx: scu: add two cells binding support This patch implements the new two cells binding for SCU clocks. The usage is as follows: clocks = <&uart0_clk IMX_SC_R_UART_0 IMX_SC_PM_CLK_PER> Due to each SCU clock is associated with a power domain, without power on the domain, the SCU clock can't work. So we create platform devices for each domain clock respectively and manually attach the required domain before register the clock devices, then we can register clocks in the clock platform driver accordingly. Note because we do not have power domain info in device tree and the SCU resource ID is the same for power domain and clock, so we use resource ID to find power domains. Later, we will also use this clock platform driver to support suspend/resume and runtime pm. Cc: Stephen Boyd Cc: Shawn Guo Cc: Sascha Hauer Cc: Michael Turquette Signed-off-by: Dong Aisheng Reviewed-by: Stephen Boyd Signed-off-by: Shawn Guo commit 540742fb109fa4a65f116db9edc28ab1bd2c872d Author: Dong Aisheng Date: Wed Jul 29 16:00:09 2020 +0800 dt-bindings: clock: imx-lpcg: add support to parse clocks from device tree MX8QM and MX8QXP LPCG Clocks are mostly the same except they may reside in different subsystems across CPUs and also vary a bit on the availability. Same as SCU clock, we want to move the clock definition into device tree which can fully decouple the dependency of Clock ID definition from device tree and make us be able to write a fully generic lpcg clock driver. And we can also use the existence of clock nodes in device tree to address the device and clock availability differences across different SoCs. Cc: Sascha Hauer Cc: Michael Turquette Cc: devicetree@vger.kernel.org Cc: Shawn Guo Cc: Rob Herring Cc: Stephen Boyd Signed-off-by: Dong Aisheng Reviewed-by: Rob Herring Reviewed-by: Stephen Boyd Signed-off-by: Shawn Guo commit 96ffcdf239de6f9970178bb7d643e16fd9e68ab9 Author: Chanwoo Choi Date: Tue Oct 20 15:12:12 2020 +0900 PM / devfreq: Remove redundant governor_name from struct devfreq The devfreq structure instance contains the governor_name and a governor instance. When need to show the governor name, better to use the name of devfreq_governor structure. So, governor_name variable in struct devfreq is a redundant and unneeded variable. Remove the redundant governor_name of struct devfreq and then use the name of devfreq_governor instance. Signed-off-by: Chanwoo Choi commit 5f1a9066fcb2cc1d41104c74884f6c6cf010124b Author: Chanwoo Choi Date: Fri Jul 3 17:20:27 2020 +0900 PM / devfreq: Add governor attribute flag for specifc sysfs nodes DEVFREQ supports the default governors like performance, simple_ondemand and also allows the devfreq driver to add their own governor like tegra30-devfreq.c according to their requirement. In result, some sysfs attributes are useful or not useful. Prior to that the user can access all sysfs attributes regardless of the available attributes. So, clarify the access permission of sysfs attributes according to governor. When adding the devfreq governor, can specify the available attribute information by using DEVFREQ_GOV_ATTR_* constant variable. The user can read or write the sysfs attributes in accordance to the specified attributes. When adding the governor, can add the following attributes according to the governor feature. [Definition for speific sysfs attributes] - DEVFREQ_GOV_ATTR_POLLING_INTERVAL to update polling interval for timer. : /sys/class/devfreq/[devfreq dev name]/polling_interval - DEVFREQ_GOV_ATTR_TIMER to change the type of timer on either deferrable or dealyed timer. : /sys/class/devfreq/[devfreq dev name]/timer And all devfreq governors have to support the following common attributes. The common attributes are added to devfreq class by default. - governor - available_governors - available_frequencies - cur_freq - target_freq - min_freq - max_freq - trans_stat [Table of governor attribute flags for devfreq governors] ------------------------------------------------------------------------------ | simple | perfor | power | user | passive | tegra30 | ondemand | mance | save | space| | ------------------------------------------------------------------------------ governor | O | O | O | O | O | O available_governors | O | O | O | O | O | O available_frequencies | O | O | O | O | O | O cur_freq | O | O | O | O | O | O target_freq | O | O | O | O | O | O min_freq | O | O | O | O | O | O max_freq | O | O | O | O | O | O trans_stat | O | O | O | O | O | O -------------------------------------------------------- polling_interval | O | X | X | X | X | O timer | O | X | X | X | X | X ------------------------------------------------------------------------------ Reviewed-by: Dmitry Osipenko Tested-by: Dmitry Osipenko Signed-off-by: Chanwoo Choi commit 02f5bea93cdc4f1c7e37a2347ee18053c1af8cf2 Author: Dong Aisheng Date: Wed Jul 29 16:00:08 2020 +0800 dt-bindings: firmware: imx-scu: new binding to parse clocks from device tree There's a few limitations on the original one cell clock binding (#clock-cells = <1>) that we have to define some SW clock IDs for device tree to reference. This may cause troubles if we want to use common clock IDs for multi platforms support when the clock of those platforms are mostly the same. e.g. Current clock IDs name are defined with SS prefix. However the device may reside in different SS across CPUs, that means the SS prefix may not valid anymore for a new SoC. Furthermore, the device availability of those clocks may also vary a bit. For such situation, we want to eliminate the using of SW Clock IDs and change to use a more close to HW one instead. For SCU clocks usage, only two params required: Resource id + Clock Type. Both parameters are platform independent. So we could use two cells binding to pass those parameters, Cc: Sascha Hauer Cc: Michael Turquette Cc: devicetree@vger.kernel.org Acked-by: Shawn Guo Reviewed-by: Rob Herring Reviewed-by: Stephen Boyd Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo commit 0dd25a0d12a134cd2ba950d8c0530d4ece05c63b Author: Chanwoo Choi Date: Mon Oct 5 14:48:01 2020 +0900 PM / devfreq: Add governor feature flag The devfreq governor is able to have the specific flag as follows in order to implement the specific feature. For example, devfreq allows user to change the governors on runtime via sysfs interface. But, if devfreq device uses 'passive' governor, don't allow user to change the governor. For this case, define the DEVFREQ_GOV_FLAG_IMMUTABLE and set it to flag of passive governor. [Definition for governor flag] - DEVFREQ_GOV_FLAG_IMMUTABLE : If immutable flag is set, governor is never changeable to other governors. - DEVFREQ_GOV_FLAG_IRQ_DRIVEN : Devfreq core won't schedule polling work for this governor if value is set. [Table of governor flag for devfreq governors] ------------------------------------------------------------------------------ | simple | perfor | power | user | passive | tegra30 | ondemand | mance | save | space| | ------------------------------------------------------------------------------ immutable | X | X | X | X | O | O interrupt_driven | X(polling)| X | X | X | X | O (irq) ------------------------------------------------------------------------------ Reviewed-by: Dmitry Osipenko Tested-by: Dmitry Osipenko Signed-off-by: Chanwoo Choi commit cab477d0d4fbae1ed68d3db0b52cb5449a3c5868 Author: Matthias Kaehlcke Date: Wed Oct 7 22:03:59 2020 +0900 PM / devfreq: Add tracepoint for frequency changes Add a tracepoint for frequency changes of devfreq devices and use it. Signed-off-by: Matthias Kaehlcke [cw00.choi: Move print position of tracepoint and add more information] Signed-off-by: Chanwoo Choi commit b4365423bb7adf9feb4659126eaec374dfbde806 Author: Chanwoo Choi Date: Wed Oct 7 22:02:39 2020 +0900 PM / devfreq: Unify frequency change to devfreq_update_target func The update_devfreq() and update_passive_devfreq() have the duplicate code when changing the target frequency on final stage. So, unify frequency change code to devfreq_update_target() to remove the duplicate code and to centralize the frequency change code. Signed-off-by: Chanwoo Choi commit 4281461c01f702f9427554718988b5e8fbfd64fb Author: Chanwoo Choi Date: Thu Oct 8 16:22:10 2020 +0900 trace: events: devfreq: Use fixed indentation size to improve readability Each tracepoint infromation consist of the different size value. So, in order to improve the readability, use the fixed indentation size. Signed-off-by: Chanwoo Choi commit d4948d19d47f08f926db55f0fb8cb324e43f1c19 Author: Al Viro Date: Tue Jun 30 11:02:24 2020 -0400 c6x: kill ELF_CORE_COPY_FPREGS not used anymore, now that fdpic coredump got switched to regset Signed-off-by: Al Viro commit 7848d2e26d7a2c436df378f5237105917f070212 Author: Al Viro Date: Fri May 22 20:12:06 2020 -0400 whack-a-mole: USE_ELF_CORE_DUMP It's been killed off back in 2009. Not a damn thing checks it. Just die, already... Signed-off-by: Al Viro commit 77f9c902f45f30b7fdeb82e5d3322dd498dd95a4 Author: Al Viro Date: Sat Jun 6 12:59:11 2020 -0400 [ia64] ptrace_[sg]etregs(): use access_elf_reg() instead of access_uarea() In case of positions passed by ptrace_[sg]etregs() to access_uarea() the latter sets the stack unwind up, walks all the way up the stack and proceeds to pass the resulting info to access_elf_reg(). The thing is, we'd *already* obtained that info, so we can bloody well call access_elf_reg() directly. Signed-off-by: Al Viro commit 3b2d387c5e2744060848d2fb207ec06e25410ff5 Author: Al Viro Date: Sun Jun 7 11:37:16 2020 -0400 [ia64] missed cleanups from switch to regset coredumps a bunch of function could've been made static back in 2008 when ia64 switched to regset-based coredumps Signed-off-by: Al Viro commit 1510723087d28f29112297517dbc8002ed1d4a68 Author: Al Viro Date: Tue Jun 16 00:23:07 2020 -0400 arm: kill dump_task_regs() the last user had been fdpic Signed-off-by: Al Viro commit 319c15174757aaedacc89a6e55c965416f130e64 Author: Al Viro Date: Thu Oct 1 20:45:51 2020 -0400 epoll: take epitem list out of struct file Move the head of epitem list out of struct file; for epoll ones it's moved into struct eventpoll (->refs there), for non-epoll - into the new object (struct epitem_head). In place of ->f_ep_links we leave a pointer to the list head (->f_ep). ->f_ep is protected by ->f_lock and it's zeroed as soon as the list of epitems becomes empty (that can happen only in ep_remove() by now). The list of files for reverse path check is *not* going through struct file now - it's a single-linked list going through epitem_head instances. It's terminated by ERR_PTR(-1) (== EP_UNACTIVE_POINTER), so the elements of list can be distinguished by head->next != NULL. epitem_head instances are allocated at ep_insert() time (by attach_epitem()) and freed either by ep_remove() (if it empties the set of epitems *and* epitem_head does not belong to the reverse path check list) or by clear_tfile_check_list() when the list is emptied (if the set of epitems is empty by that point). Allocations are done from a separate slab - minimal kmalloc() size is too large on some architectures. As the result, we trim struct file _and_ get rid of the games with temporary file references. Locking and barriers are interesting (aren't they always); see unlist_file() and ep_remove() for details. The non-obvious part is that ep_remove() needs to decide if it will be the one to free the damn thing *before* actually storing NULL to head->epitems.first - that's what smp_load_acquire is for in there. unlist_file() lockless path is safe, since we hit it only if we observe NULL in head->epitems.first and whoever had done that store is guaranteed to have observed non-NULL in head->next. IOW, their last access had been the store of NULL into ->epitems.first and we can safely free the sucker. OTOH, we are under rcu_read_lock() and both epitem and epitem->file have their freeing RCU-delayed. So if we see non-NULL ->epitems.first, we can grab ->f_lock (all epitems in there share the same struct file) and safely recheck the emptiness of ->epitems; again, ->next is still non-NULL, so ep_remove() couldn't have freed head yet. ->f_lock serializes us wrt ep_remove(); the rest is trivial. Note that once head->epitems becomes NULL, nothing can get inserted into it - the only remaining reference to head after that point is from the reverse path check list. Signed-off-by: Al Viro commit d9f41e3c95a17c263bd72799ea8c33ea6138dc22 Author: Al Viro Date: Thu Oct 1 16:10:11 2020 -0400 epoll: massage the check list insertion in the "non-epoll target" cases do it in ep_insert() rather than in do_epoll_ctl(), so that we do it only with some epitem is already guaranteed to exist. Signed-off-by: Al Viro commit b62d2706a754887800a7cec4eb0592a9263a38fc Author: Al Viro Date: Thu Oct 1 14:11:00 2020 -0400 lift rcu_read_lock() into reverse_path_check() Signed-off-by: Al Viro commit 44cdc1d952e3f7aa9944c1bbf38fc23f49885017 Author: Al Viro Date: Sun Sep 27 11:18:30 2020 -0400 convert ->f_ep_links/->fllink to hlist we don't care about the order of elements there Signed-off-by: Al Viro commit d1ec50adb560983635bd31263012e688cc167f31 Author: Al Viro Date: Sun Sep 27 11:03:32 2020 -0400 ep_insert(): move creation of wakeup source past the fl_ep_links insertion That's the beginning of preparations for taking f_ep_links out of struct file. If insertion might fail, we will need a new failure exit. Having wakeup source creation done after that point will simplify life there; ep_remove() can (and commonly does) live with NULL epi->ws, so it can be used for cleanup after ep_create_wakeup_source() failure. It can't be used before the rbtree insertion, though, so if we are to unify all old failure exits, we need to move that thing down. Then we would be free to do simple kmem_cache_free() on the failure to insert into f_ep_links - no wakeup source to leak on that failure exit. Signed-off-by: Al Viro commit 2c0b71c1e9c9362c9503f218fed62aeb66a2ef97 Author: Al Viro Date: Sat Sep 26 18:48:57 2020 -0400 fold ep_read_events_proc() into the only caller Signed-off-by: Al Viro commit ad9366b1361fd6ed3f85f670bdb4e8af039e450c Author: Al Viro Date: Sat Sep 26 18:32:48 2020 -0400 take the common part of ep_eventpoll_poll() and ep_item_poll() into helper The only reason why ep_item_poll() can't simply call ep_eventpoll_poll() (or, better yet, call vfs_poll() in all cases) is that we need to tell lockdep how deep into the hierarchy of ->mtx we are. So let's add a variant of ep_eventpoll_poll() that would take depth explicitly and turn ep_eventpoll_poll() into wrapper for that. Signed-off-by: Al Viro commit 85353e919f6eb28ee4a797b06de8cc4c48dec2d7 Author: Al Viro Date: Sat Sep 26 18:15:26 2020 -0400 ep_insert(): we only need tep->mtx around the insertion itself We do need ep->mtx (and we are holding it all along), but that's the lock on the epoll we are inserting into; locking of the epoll being inserted is not needed for most of that work - as the matter of fact, we only need it to provide barriers for the fastpath check (for now). Move taking and releasing it into ep_insert(). The caller (do_epoll_ctl()) doesn't need to bother with that at all. Moreover, that way we kill the kludge in ep_item_poll() - now it's always called with tep unlocked. Signed-off-by: Al Viro commit e3e096e7fc30c28cfc53fe8a1e265d65b85f60bb Author: Al Viro Date: Sat Sep 26 18:09:29 2020 -0400 ep_insert(): don't open-code ep_remove() on failure exits Signed-off-by: Al Viro commit 57804b1cc4616780c72a2d0930d1bd0d5bd3ed4c Author: Al Viro Date: Mon Aug 31 13:41:30 2020 -0400 lift locking/unlocking ep->mtx out of ep_{start,done}_scan() get rid of depth/ep_locked arguments there and document the kludge in ep_item_poll() that has lead to ep_locked existence in the first place Signed-off-by: Al Viro commit ff07952aeda8563d5080da3a0754db83ed0650f6 Author: Al Viro Date: Mon Aug 31 13:39:52 2020 -0400 ep_send_events_proc(): fold into the caller ... and get rid of struct ep_send_events_data - not needed anymore. The weird way of passing the arguments in (and real return value out - nominal return value of ep_send_events_proc() is ignored) was due to the signature forced on ep_scan_ready_list() callbacks. Signed-off-by: Al Viro commit 443f1a0422338a2c7a2e4f63dbe3977f1be566ad Author: Al Viro Date: Mon Aug 31 13:19:53 2020 -0400 lift the calls of ep_send_events_proc() into the callers ... and kill ep_scan_ready_list() Signed-off-by: Al Viro commit 1ec09974d845bdf827028aa7deb96378f54bcd06 Author: Al Viro Date: Mon Aug 31 13:16:39 2020 -0400 lift the calls of ep_read_events_proc() into the callers Expand the calls of ep_scan_ready_list() that get ep_read_events_proc(). As a side benefit we can pass depth to ep_read_events_proc() by value and not by address - the latter used to be forced by the signature expected from ep_scan_ready_list() callback. Signed-off-by: Al Viro commit db502f8a3b0bb5188f92d9d6a68aed223892689b Author: Al Viro Date: Mon Aug 31 13:06:51 2020 -0400 ep_scan_ready_list(): prepare to splitup take the stuff done before and after the callback into separate helpers Signed-off-by: Al Viro commit bde03c4c1a6b3b679a63aa8f275ac12ffdd58c65 Author: Al Viro Date: Sat Sep 26 16:50:57 2020 -0400 ep_loop_check_proc(): saner calling conventions 1) 'cookie' argument is unused; kill it. 2) 'priv' one is always an epoll struct file, and we only care about its associated struct eventpoll; pass that instead. Signed-off-by: Al Viro commit 6a3890c474795a4a3536e0a0c39f526e415eb212 Author: Al Viro Date: Sat Sep 26 16:29:02 2020 -0400 get rid of ep_push_nested() The only remaining user is loop checking. But there we only need to check that we have not walked into the epoll we are inserting into - we are adding an edge to acyclic graph, so any loop being created will have to pass through the source of that edge. So we don't need that array of cookies - we have only one eventpoll to watch out for. RIP ep_push_nested(), along with the cookies array. Signed-off-by: Al Viro commit 56c428cac5a2c361271370dde3a22cb640bc9934 Author: Al Viro Date: Sat Sep 26 16:38:44 2020 -0400 ep_loop_check_proc(): lift pushing the cookie into callers Signed-off-by: Al Viro commit d16312a46936baa1a44b5f78394f4b0d1d01762a Author: Al Viro Date: Sat Sep 26 15:54:05 2020 -0400 clean reverse_path_check_proc() a bit Signed-off-by: Al Viro commit 0c320f776ed83e1ebde4d49bc316b23e868b4737 Author: Al Viro Date: Fri Sep 25 19:48:56 2020 -0400 reverse_path_check_proc(): don't bother with cookies We know there's no loops by the time we call it; the only thing we care about is too deep reverse paths. Signed-off-by: Al Viro commit aebf15f0fbd54e8deebc56642c08da15b905027c Author: Al Viro Date: Sat Aug 22 23:29:02 2020 -0400 reverse_path_check_proc(): sane arguments no need to force its calling conventions to match the callback for late unlamented ep_call_nested()... Signed-off-by: Al Viro commit 773318eddbacf77d6c98bf6073db38b1cccc7ac4 Author: Al Viro Date: Sat Aug 22 23:13:27 2020 -0400 untangling ep_call_nested(): and there was much rejoicing Signed-off-by: Al Viro commit 99d84d4330e8a67abfab77edb985db18aa603921 Author: Al Viro Date: Sat Aug 22 23:08:37 2020 -0400 untangling ep_call_nested(): move push/pop of cookie into the callbacks Signed-off-by: Al Viro commit 3b1688efa01cd5b5dc99d624e9fac68b6112f35d Author: Al Viro Date: Sat Aug 22 23:05:44 2020 -0400 untangling ep_call_nested(): take pushing cookie into a helper Signed-off-by: Al Viro commit d01f0594d727d2346e4b6ac26ae63e416b60c3f0 Author: Al Viro Date: Sat Aug 22 22:19:12 2020 -0400 untangling ep_call_nested(): it's all serialized on epmutex. IOW, * no locking is needed to protect the list * the list is actually a stack * no need to check ->ctx * it can bloody well be a static 5-element array - nobody is going to be accessing it in parallel. Signed-off-by: Al Viro commit 8677600d796697f04adcdec57bd73a9f54c79697 Author: Al Viro Date: Sat Aug 22 22:05:06 2020 -0400 untangling ep_call_nested(): get rid of useless arguments ctx is always equal to current, ncalls - to &poll_loop_ncalls. Signed-off-by: Al Viro commit 364f374f22ba1b049b17de602a8e5eceb1df4cef Author: Al Viro Date: Wed Sep 2 11:55:09 2020 -0400 epoll: get rid of epitem->nwait we use it only to indicate allocation failures within queueing callback back to ep_insert(). Might as well use epq.epi for that reporting... Signed-off-by: Al Viro commit 80285b75c683484db4daf02c41009e4424738dd3 Author: Al Viro Date: Wed Sep 2 11:45:57 2020 -0400 epoll: switch epitem->pwqlist to single-linked list We only traverse it once to destroy all associated eppoll_entry at epitem destruction time. The order of traversal is irrelevant there. Signed-off-by: Al Viro commit b18c1eb975ce181996310a526582a3ddbc6735e9 Author: Clinton A Taylor Date: Wed Oct 21 01:20:30 2020 -0700 drm/i915/dg1: invert HPD pins HPD pins are inverted for DG1 platform. Bspec: 49956 Cc: José Roberto de Souza Cc: Matt Roper Signed-off-by: Clinton A Taylor Reviewed-by: Lucas De Marchi Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20201021082034.3170478-3-lucas.demarchi@intel.com commit 229f31e2d370d36c2345dadb821c856f61d13197 Author: Lucas De Marchi Date: Wed Oct 21 01:20:29 2020 -0700 drm/i915/dg1: add hpd interrupt handling DG1 has one more combo phy port, no TC and all irq handling goes through SDE, like for MCC. v2: Also change intel_hpd_pin_default() to include DG1 mapping v3, v4: Rebase on hpd refactor Cc: Ville Syrjälä Cc: Anshuman Gupta Cc: José Roberto de Souza Cc: Imre Deak Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20201021082034.3170478-2-lucas.demarchi@intel.com commit 71c1a4998320962f7b8362b2c5ee36610d49e8fb Author: José Roberto de Souza Date: Fri Oct 2 16:16:27 2020 -0700 drm/i915/tgl/psr: Fix glitches when doing frontbuffer modifications Writes to CURSURFLIVE in TGL are causing IOMMU errors and visual glitches that are often reproduced when executing CPU intensive workloads while a eDP 4K panel is attached. Manually exiting PSR causes the frontbuffer to be updated without glitches and the IOMMU errors are also gone but this comes at the cost of less time with PSR active. So using this workaround until this issue is root caused and a better fix is found. The current code is already ready to enable PSR after this exit if there is not other frontbuffer modifications. Adding a new if block in psr_force_hw_tracking_exit() instead of reuse the else/gen8- block because the plan is to revert this workaround as soon as a better solution is found. Cc: Gwan-gyeong Mun Cc: Ville Syrjälä Signed-off-by: José Roberto de Souza Tested-by: Gwan-gyeong Mun Reviewed-by: Gwan-gyeong Mun Link: https://patchwork.freedesktop.org/patch/msgid/20201002231627.24528-1-jose.souza@intel.com commit 3aa8d45f46e85fad02e079137822017e80f0db68 Author: David Galiffi Date: Wed Apr 29 13:31:12 2020 -0400 drm/amd/display: Fixed panic during seamless boot. [why] get_pixel_clk_frequency_100hz is undefined in clock_source_funcs. [how] set function pointer: ".get_pixel_clk_frequency_100hz = get_pixel_clk_frequency_100hz" Signed-off-by: David Galiffi Reviewed-by: Bhawanpreet Lakha Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit d836917da7e5ca9b33ef4d499972f1feeb519e00 Author: xinhui pan Date: Fri Oct 23 13:41:12 2020 +0800 drm/amdgpu: Fix size calculation when init onchip memory Size is page count here. Reviewed-by: Christian König Signed-off-by: xinhui pan Signed-off-by: Alex Deucher commit 4d154b85f30e66939bbdf038ef78da5bd30a9916 Author: Mauro Carvalho Chehab Date: Fri Oct 23 18:32:49 2020 +0200 drm/amdgpu_dm: fix a typo dm_comressor_info -> dm_compressor_info The kernel-doc markup is right, but the struct itself and their references contain a typo. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Alex Deucher commit c45dd3bda1c809eb120452597097e14a96b58c1f Author: Mauro Carvalho Chehab Date: Fri Oct 23 18:32:58 2020 +0200 drm/amdgpu: fix some kernel-doc markups Some functions have different names between their prototypes and the kernel-doc markup. Acked-by: Christian König Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Alex Deucher commit 6e3cd2a9a6ac322a9421eaf0f03ec7d43b85845e Author: Mauro Carvalho Chehab Date: Fri Oct 23 18:32:50 2020 +0200 amdgpu: fix a few kernel-doc markup issues A kernel-doc markup can't be mixed with a random comment, as it causes parsing problems. While here, change an invalid kernel-doc markup into a common comment. Acked-by: Christian König Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Alex Deucher commit 73bf5cad2696fe3a21f70101821405db839ea18e Author: Harish Kasiviswanathan Date: Thu Oct 22 09:57:54 2020 -0400 drm/amdgpu: During compute disable GFXOFF for Sienna_Cichlid Workaround to fix the soft hang observed in certain compute applications. Acked-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher commit df0e4831c3e8210783a73afc11ee40a2c8502c36 Author: Madhav Chauhan Date: Fri Oct 16 18:03:07 2020 +0530 drm/amdgpu: don't map BO in reserved region 2MB area is reserved at top inside VM. Suggested-by: Christian König Signed-off-by: Madhav Chauhan Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 52f2e83e2fe5596862ed0830df1cb340e411cc74 Author: Bhawanpreet Lakha Date: Fri May 29 15:27:06 2020 -0400 drm/amdgpu/display: add MALL support (v2) Enable Memory Access at Last Level (MALL) feature for display. v2: squash in 64 bit division fixes Signed-off-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 4005809bb1f31fd3c23b42c24c90b15ed72746c0 Author: Likun Gao Date: Fri May 1 16:24:33 2020 -0400 drm/amdgpu: add support to configure MALL for sienna_cichlid (v2) Enable Memory Access at Last Level (MALL) feature for sienna_cichlid. v2: drop module option. We need to add UAPI so userspace can request MALL per buffer. Reviewed-by: Christian König Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit d02792041c17c9f8e1f9ac1420dcfb7fe13b256c Author: Alex Deucher Date: Fri May 1 16:41:41 2020 -0400 drm/amdgpu: add GC 10.3 NOALLOC registers This adds the NOALLOC registers. Signed-off-by: Alex Deucher commit 8d96a590ed0dd9c398e1ee14b3f8c7a324c588ff Author: Tom Rix Date: Mon Oct 19 07:43:11 2020 -0700 drm/amdgpu: remove unneeded break A break is not needed if it is preceded by a return or break Reviewed-by: Harry Wentland Acked-by: Christian König Signed-off-by: Tom Rix Signed-off-by: Alex Deucher commit 8a5223b9303af0d6df476121ba81d0d834d0d827 Author: Tianci.Yin Date: Wed Oct 14 17:05:50 2020 +0800 drm/amdgpu: add DID for navi10 blockchain SKU Reviewed-by: Alex Deucher Reviewed-by: Guchun Chen Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit aa5375c55541d7559b0f444f74303bec25e76fd5 Author: Tianci.Yin Date: Thu Oct 22 11:40:26 2020 +0800 drm/amdgpu: disable DCN and VCN for navi10 blockchain SKU(v3) The blockchain SKU has no display and video support, remove them. Reviewed-by: Alex Deucher Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit 15df286d43108ceaaf842eb50f104b83e892946b Author: Likun Gao Date: Thu Oct 22 00:50:07 2020 +0800 drm/amdgpu: correct the cu and rb info for sienna cichlid Skip disabled sa to correct the cu_info and active_rbs for sienna cichlid. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 891bacb835a144479e9bee3d845685a0be16bf38 Author: Kenneth Feng Date: Wed Oct 21 17:30:02 2020 +0800 drm/amd/pm: remove the average clock value in sysfs if it's fine-grained clock dpm, remove the average clock value and reflects the real clock. Signed-off-by: Kenneth Feng Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit ef52d5853bf1d0ac1254a8d44e5b8f4edc274960 Author: Qinglang Miao Date: Thu Sep 17 20:39:49 2020 +0800 drm/komeda: Convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Qinglang Miao Acked-by: Liviu Dudau Tested-by: Carsten Haitzler Signed-off-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20200917123949.101925-1-miaoqinglang@huawei.com commit 6e7a21e7ab27dd5e42e212155200c1c84bbadbc7 Author: Chris Wilson Date: Wed Oct 21 23:04:11 2020 +0100 drm/i915/selftests: Exercise intel_timeline_read_hwsp() intel_timeline_read_hwsp() is used to support semaphore waits between engines, that may themselves be deferred for arbitrary periods -- that is the read of the target request's HWSP is at an indeterminant point in the future. To support this, we need to prevent overwriting a HWSP that is being watched across a seqno wrap (otherwise the next request will write its value into the old HWSP preventing the watcher from making progress, ad infinitum.) To simulate the observer across a wrap, let's create a request that reads from the HWSP and dispatch it at different points around a wrap to see if the value is lost. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20201021220411.5777-2-chris@chris-wilson.co.uk commit c10f6019d0b2dc8a6a62b55459f3ada5bc4e5e1a Author: Chris Wilson Date: Thu Oct 22 07:41:27 2020 +0100 drm/i915/gt: Use the local HWSP offset during submission We wrap the timeline on construction of the next request, but there may still be requests in flight that have not yet finalized the breadcrumb. (The breadcrumb is delayed as we need engine-local offsets, and for the virtual engine that is not known until execution.) As such, by the time we write to the timeline's HWSP offset it may have changed, and we should use the value we preserved in the request instead. Though the window is small and infrequent (at full flow we can expect a timeline's seqno to wrap once every 30 minutes), the impact of writing the old seqno into the new HWSP is severe: the old requests are never completed, and the new requests are completed before they are even submitted. Fixes: ebece7539242 ("drm/i915: Keep timeline HWSP allocated until idle across the system") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Cc: # v5.2+ Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20201022064127.10159-1-chris@chris-wilson.co.uk commit b1cff585784edf2ab03edb63376a7543a9c50644 Author: Chris Wilson Date: Thu Oct 22 22:08:14 2020 +0100 drm/i915/selftests: Skip RPS tests on Ironlake (only IPS) Since Ironlake uses intel_ips.ko for its dynamic frequency adjustment, we do not have direct control over the frequency management so such tests are defunct. Similarly, we can't check the gen6+ RPS registers on Ironlake. Hopefully this catches all the invalid tests now that Ironlake has rejoined the dynamic GPU frequency club. There is an opportunity for the reader to add tests to exercise MEMINTRSTS and co. Signed-off-by: Chris Wilson Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201022210814.23004-1-chris@chris-wilson.co.uk commit cc07057c7c88fb8eff3b1991131ded0f0bcfa7e3 Author: Saeed Mirzamohammadi Date: Wed Oct 21 16:57:58 2020 -0700 video: fbdev: fix divide error in fbcon_switch This patch fixes the issue due to: [ 89.572883] divide_error: 0000 [#1] SMP KASAN PTI [ 89.572897] CPU: 3 PID: 16083 Comm: repro Not tainted 5.9.0-rc7.20200930.rc1.allarch-19-g3e32d0d.syzk #5 [ 89.572902] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 0.5.1 01/01/2011 [ 89.572934] RIP: 0010:cirrusfb_check_var+0x84/0x1260 The error happens when the pixels value is calculated before performing the sanity checks on bits_per_pixel. A bits_per_pixel set to zero causes divide by zero error. This patch moves the calculation after the sanity check. Signed-off-by: Saeed Mirzamohammadi Tested-by: Saeed Mirzamohammadi Reviewed-by: Thomas Zimemrmann Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20201021235758.59993-1-saeed.mirzamohammadi@oracle.com commit 64a87088b633408a3d58a23f8252846d86df3240 Author: Dave Airlie Date: Thu Oct 22 13:11:52 2020 +1000 drm/ttm: remove overlapping memcpy support remove the overlapping memcp support as it's never used. Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20201022031152.1916925-1-airlied@gmail.com commit e44adb5d9ab9e574a7814d804d05de65dd727768 Author: Chris Wilson Date: Thu Oct 22 12:42:46 2020 +0100 drm/i915: Reset the interrupt mask on disabling interrupts As we disable the interrupt during suspend, also reset the irq_mask to short-circuit subsystems that later try to turn off their interrupt source. <4>[ 101.816730] i915 0000:00:02.0: drm_WARN_ON(!intel_irqs_enabled(dev_priv)) <4>[ 101.816853] WARNING: CPU: 3 PID: 4241 at drivers/gpu/drm/i915/i915_irq.c:343 ilk_update_display_irq+0xb3/0x130 [i915] v2: Reset irq_mask for i8xx_irq_reset as well, and split patch to focus on only i915->irq_mask Signed-off-by: Chris Wilson Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201022114246.28566-1-chris@chris-wilson.co.uk commit 37b254f11115e1c665f78a4e94237c616c99d324 Author: Maxime Ripard Date: Tue Jul 7 12:19:12 2020 +0200 drm/vc4: dsi: Only register our component once a DSI device is attached If the DSI driver is the last to probe, component_add will try to run all the bind callbacks straight away and return the error code. However, since we depend on a power domain, we're pretty much guaranteed to be in that case on the BCM2711, and are just lucky on the previous SoCs since the v3d also depends on that power domain and is further in the probe order. In that case, the DSI host will not stick around in the system: the DSI bind callback will be executed, will not find any DSI device attached and will return EPROBE_DEFER, and we will then remove the DSI host and ask to be probed later on. But since that host doesn't stick around, DSI devices like the RaspberryPi touchscreen whose probe is not linked to the DSI host (unlike the usual DSI devices that will be probed through the call to mipi_dsi_host_register) cannot attach to the DSI host, and we thus end up in a situation where the DSI host cannot probe because the panel hasn't probed yet, and the panel cannot probe because the DSI host hasn't yet. In order to break this cycle, let's wait until there's a DSI device that attaches to the DSI host to register the component and allow to progress further. Acked-by: Eric Anholt Suggested-by: Andrzej Hajda Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20200707101912.571531-1-maxime@cerno.tech commit 12767469edfad756491e4a95e86934b5c89b9685 Author: Simon Ser Date: Thu Oct 22 10:34:44 2020 +0000 drm: document that user-space should avoid parsing EDIDs User-space should avoid parsing EDIDs for metadata already exposed via other KMS interfaces and properties. For instance, user-space should not try to extract a list of modes from the EDID: the kernel might mutate the mode list (because of link capabilities or quirks for instance). Other metadata not exposed by KMS can be parsed by user-space. This includes for instance monitor identification (make/model/serial) and supported color-spaces. v2: add short explanation why user-space shouldn't do this (Brian) Signed-off-by: Simon Ser Suggested-by: Daniel Vetter Reviewed-by: Daniel Vetter Reviewed-by: Brian Starkey Acked-by: Thomas Zimmermann Cc: Pekka Paalanen Cc: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/V_APW3gKRhljvcmT28tGV3JkP7qW9Z7h45I-s2wiJvYhaaveCpYpg3tztZPsZVV2KV1NC7rUx08IUUgCJXzdRrWCsEGB0czq4ZozpdyVFLs=@emersion.fr commit 1434f9fc0e476362f3f3d153d48c0fc5c940a50a Author: Sandeep Singh Date: Sat Oct 10 01:31:38 2020 +0530 SFH: Create HID report to Enable support of AMD sensor fusion Hub (SFH) Communication between HID devices and HID core is mostly done via HID reports. HID reports are formed based on the data received from the PCI layer into the HID report descriptors. Co-developed-by: Nehal Shah Signed-off-by: Nehal Shah Signed-off-by: Sandeep Singh Signed-off-by: Jiri Kosina commit 4b2c53d93a4bc9d52cc0ec354629cfc9dc217f93 Author: Sandeep Singh Date: Sat Oct 10 01:31:37 2020 +0530 SFH:Transport Driver to add support of AMD Sensor Fusion Hub (SFH) To support AMD Sensor Fusion Hub (SFH) via the HID client's we need to register the client with the HID framework. Here we mostly address on how to register the client with the framework and define the interfaces for communication. Co-developed-by: Nehal Shah Signed-off-by: Nehal Shah Signed-off-by: Sandeep Singh Signed-off-by: Jiri Kosina commit 4f567b9f8141a86c7d878fadf136e5d1408e3e61 Author: Sandeep Singh Date: Sat Oct 10 01:31:36 2020 +0530 SFH: PCIe driver to add support of AMD sensor fusion hub AMD SFH (Sensor Fusion Hub) is a solution running on MP2 (which is ARM core connected to x86 for processing sensor data). AMD SFH uses HID over PCI bus to form the HID descriptors and talks to HID clients like the monitor-sensor/iio-proxy. MP2 which is exposed as a PCI device to the x86, uses mailboxes to talk to MP2 firmware to send/receive commands. Co-developed-by: Nehal Shah Signed-off-by: Nehal Shah Signed-off-by: Sandeep Singh Signed-off-by: Jiri Kosina commit 302f0dad8c97a11abcf145ff3c7036f8f80e1a1e Author: Sandeep Singh Date: Sat Oct 10 01:31:35 2020 +0530 SFH: Add maintainers and documentation for AMD SFH based on HID framework Add Maintainers for AMD SFH(SENSOR FUSION HUB) Solution and work flow document. Co-developed-by: Nehal Shah Signed-off-by: Nehal Shah Signed-off-by: Sandeep Singh Signed-off-by: Jiri Kosina commit 537f9c84a42754f89977bc2d19f2f69503a3a02a Author: Tvrtko Ursulin Date: Tue Oct 20 17:11:44 2020 +0100 drm/i915/pmu: Fix CPU hotplug with multiple GPUs Since we keep a driver global mask of online CPUs and base the decision whether PMU needs to be migrated upon it, we need to make sure the migration is done for all registered PMUs (so GPUs). To do this we need to track the current CPU for each PMU and base the decision on whether to migrate on a comparison between global and local state. At the same time, since dynamic CPU hotplug notification slots are a scarce resource and given how we already register the multi instance type state, we can and should add multiple instance of the i915 PMU to this same state and not allocate a new one for every GPU. v2: * Use pr_notice. (Chris) v3: * Handle a nasty interaction where unregistration which triggers a false CPU offline event. (Chris) Signed-off-by: Tvrtko Ursulin Suggested-by: Daniel Vetter # dynamic slot optimisation Cc: Chris Wilson Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20201020161144.678668-1-tvrtko.ursulin@linux.intel.com commit b00bccb3f0bb7e99052791eeffb3e2cfcfa1ae8e Author: Tvrtko Ursulin Date: Tue Oct 20 11:08:21 2020 +0100 drm/i915/pmu: Handle PCI unbind Mark the device as closed and keep references to driver data alive to allow for safe driver unbind with active PMU clients. Perf core does not otherwise handle this case so we have to do it manually like this. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20201020100822.543332-1-tvrtko.ursulin@linux.intel.com commit 44c2200afcd59f441b43f27829b4003397cc495d Author: Chris Wilson Date: Mon Oct 19 21:38:25 2020 +0100 drm/i915/gem: Flush coherency domains on first set-domain-ioctl Avoid skipping what appears to be a no-op set-domain-ioctl if the cache coherency state is inconsistent with our target domain. This also has the utility of using the population of the pages to validate the backing store. The danger in skipping the first set-domain is leaving the cache inconsistent and submitting stale data, or worse leaving the clean data in the cache and not flushing it to the GPU. The impact should be small as it requires a no-op set-domain as the very first ioctl in a particular sequence not found in typical userspace. Reported-by: Zbigniew Kempczyński Fixes: 754a25442705 ("drm/i915: Skip object locking around a no-op set-domain ioctl") Testcase: igt/gem_mmap_offset/blt-coherency Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Matthew Auld Cc: Zbigniew Kempczyński Cc: # v5.2+ Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20201019203825.10966-1-chris@chris-wilson.co.uk commit 6a6e5988a2657cd0c91f6f1a3e7d194599248b6d Author: Dave Airlie Date: Wed Oct 21 14:40:29 2020 +1000 drm/ttm: replace last move_notify with delete_mem_notify The move notify callback is only used in one place, this should be removed in the future, but for now just rename it to the use case which is to notify the driver that the GPU memory is to be deleted. Drivers can be cleaned up after this separately. Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20201021044031.1752624-2-airlied@gmail.com commit 439c3b01b87c39c3b61c841dee23c0337087dfcb Author: Dave Airlie Date: Wed Oct 21 14:40:30 2020 +1000 drm/ttm: ttm_bo_mem_placement doesn't need ctx parameter. Removed unused parameter. Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20201021044031.1752624-3-airlied@gmail.com commit 176fd2289e97161a6fc9113bf1579a3fce0d9690 Author: Chris Wilson Date: Wed Oct 21 19:56:49 2020 +0100 drm/i915/display: Unkerneldoc cnl_program_nearest_filter_coefs The block comment for cnl_program_nearest_filter_coefs() has a wonderful diagram, but although it is marked up as kerneldoc does not use the markup for providing the function definition. drivers/gpu/drm/i915/display/intel_display.c:6341: warning: Function parameter or member 'dev_priv' not described in 'cnl_program_nearest_filter_coefs' drivers/gpu/drm/i915/display/intel_display.c:6341: warning: Function parameter or member 'pipe' not described in 'cnl_program_nearest_filter_coefs' drivers/gpu/drm/i915/display/intel_display.c:6341: warning: Function parameter or member 'id' not described in 'cnl_program_nearest_filter_coefs' drivers/gpu/drm/i915/display/intel_display.c:6341: warning: Function parameter or member 'set' not described in 'cnl_program_nearest_filter_coefs' Signed-off-by: Chris Wilson Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201021185649.17759-1-chris@chris-wilson.co.uk commit a40a8305a732f4ecc2186ac7ca132ba062ed770d Author: Ville Syrjälä Date: Tue Oct 20 22:43:29 2020 +0300 drm/i915: Reject 90/270 degree rotated initial fbs We don't currently handle the initial fb readout correctly for 90/270 degree rotated scanout. Reject it. Cc: stable@vger.kernel.org Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201020194330.28568-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson commit c6073d4c923b5ce39ff33a63a07c633036656ecb Author: Ville Syrjälä Date: Wed Oct 21 16:14:43 2020 +0300 drm/i915: Clean up the irq enable/disable for ilk rps Let's unmask the PCU event irq _after_ we've set up the hardware and software to deal with the fallout. We can also drop the PCU event bit from DEIER except when we need it for rps. And on the disable side we replace the hand rolled (and unlocked) DEIER/IIR/IMR frobbing with ilk_disable_display_irq(). Ocd does require me to reorder it to be symmetric with the enable path however. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201021131443.25616-5-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson commit a9922912881531f661c4402819bca8b53d01bbbd Author: Ville Syrjälä Date: Wed Oct 21 16:14:42 2020 +0300 drm/i915: Do gen5_gt_irq_postinstall() before enabling the master interrupt Let's make sure the lower level interrupt bits are all lined up before we flip on the master interrupt. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201021131443.25616-4-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson commit d08c4e2327428d93f6d80ab0e7a79679f4c32906 Author: Ville Syrjälä Date: Wed Oct 21 16:14:41 2020 +0300 drm/i915: Fix potential overflows in ilk ips calculations A bunch of the ips calculations require 64bit math. In particular 'corr' and 'corr2' look like they can overflow on 32bit systems. Switch to explicit u64 for those. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201021131443.25616-3-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson commit e82351e74dcfc76c0f4241b5dbf8ee7c0ceb22be Author: Ville Syrjälä Date: Wed Oct 21 16:14:40 2020 +0300 drm/i915: Read actual GPU frequency from MEMSTAT_ILK on ILK There is no GEN6_RPSTAT1 on ILK. Instead of reading that let's try to get the same information from MEMSTAT_ILK. At least it seems to track MEMSWCTL frequency request perfectly on my ILK. It needs the same invert trick as the request value. We don't want to put the invert thing into intel_gpu_freq() and intel_freq_opcode() because that would incorrectly invert the min/max/etc frequencies also. One day someone might want to reverse engineer the formula for converting these numbers to Hz, but for now we'll just report them raw. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201021131443.25616-2-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson commit 982a820bac1b6432764a17b5e19fd3322c43fd46 Author: Mauro Carvalho Chehab Date: Wed Oct 21 14:17:22 2020 +0200 drm: amdgpu: kernel-doc: update some adev parameters Running "make htmldocs: produce lots of warnings on those files: ./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:177: warning: Excess function parameter 'man' description in 'amdgpu_vram_mgr_init' ./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:177: warning: Excess function parameter 'p_size' description in 'amdgpu_vram_mgr_init' ./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:211: warning: Excess function parameter 'man' description in 'amdgpu_vram_mgr_fini' ./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:177: warning: Excess function parameter 'man' description in 'amdgpu_vram_mgr_init' ./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:177: warning: Excess function parameter 'p_size' description in 'amdgpu_vram_mgr_init' ./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:211: warning: Excess function parameter 'man' description in 'amdgpu_vram_mgr_fini' ./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:177: warning: Excess function parameter 'man' description in 'amdgpu_vram_mgr_init' ./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:177: warning: Excess function parameter 'p_size' description in 'amdgpu_vram_mgr_init' ./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:211: warning: Excess function parameter 'man' description in 'amdgpu_vram_mgr_fini' ./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:177: warning: Excess function parameter 'man' description in 'amdgpu_vram_mgr_init' ./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:177: warning: Excess function parameter 'p_size' description in 'amdgpu_vram_mgr_init' ./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:211: warning: Excess function parameter 'man' description in 'amdgpu_vram_mgr_fini' ./drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c:90: warning: Excess function parameter 'man' description in 'amdgpu_gtt_mgr_init' ./drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c:90: warning: Excess function parameter 'p_size' description in 'amdgpu_gtt_mgr_init' ./drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c:134: warning: Excess function parameter 'man' description in 'amdgpu_gtt_mgr_fini' ./drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c:90: warning: Excess function parameter 'man' description in 'amdgpu_gtt_mgr_init' ./drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c:90: warning: Excess function parameter 'p_size' description in 'amdgpu_gtt_mgr_init' ./drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c:134: warning: Excess function parameter 'man' description in 'amdgpu_gtt_mgr_fini' ./drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:675: warning: Excess function parameter 'dev' description in 'amdgpu_device_asic_init' ./drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:675: warning: Excess function parameter 'dev' description in 'amdgpu_device_asic_init' ./drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:675: warning: Excess function parameter 'dev' description in 'amdgpu_device_asic_init' ./drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:675: warning: Excess function parameter 'dev' description in 'amdgpu_device_asic_init' They're related to the repacement of some parameters by adev, and due to a few renamed parameters. While here, uniform the name of the parameter for it to be the same on all functions using a pointer to struct amdgpu_device. Update the kernel-doc documentation accordingly. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Alex Deucher commit 86b6624ae27dee6898cde10e454c6b1f61cd8888 Author: Sumera Priyadarsini Date: Wed Oct 21 23:56:10 2020 +0530 drm/amdgpu: Return boolean types instead of integer values Return statements for functions returning bool should use truth and false instead of 1 and 0 respectively. Modify cik_event_interrupt.c to return false instead of 0. Issue found with Coccinelle. Signed-off-by: Sumera Priyadarsini Signed-off-by: Alex Deucher commit 0b08c54bb7a37047a3a006e36c2270ebc62fef7d Author: Yifan Zhang Date: Tue Oct 20 14:40:16 2020 +0800 drm/amd/display: Fix the display corruption issue on Navi10 [Why] Screen corruption on Navi10 card [How] Set system context in DCN only on Renoir Tested-by: Matt Coffin Acked-by: Alex Deucher Signed-off-by: Yifan Zhang Reviewed-by: Roman Li Signed-off-by: Alex Deucher commit 4e2b3e23b29d03abda30e55e072233541a141b1f Author: Kenneth Feng Date: Wed Oct 21 16:15:47 2020 +0800 drm/amd/pm: fix pp_dpm_fclk fclk value is missing in pp_dpm_fclk. add this to correctly show the current value. Signed-off-by: Kenneth Feng Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit 4d2aae33d96c0a0aae8d5582f38bdf4792ec6180 Author: John Clements Date: Wed Oct 21 16:20:42 2020 +0800 Revert drm/amdgpu: disable sienna chichlid UMC RAS This reverts commit 265c280a4807419249644156654e5c40a235ea84. Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit 1eeb03c883ff802a24598363765b397f132e8894 Author: Kenneth Feng Date: Wed Oct 21 14:03:08 2020 +0800 drm/amd/pm: fix the wrong fan speed in fan1_input fix the wrong fan speed in fan1_input when the fan control mode is manual. the fan speed value is not correct when we set manual mode to fan1_enalbe - 1. since the fan speed in the metrics table always reflects the real fan speed,we can fetch the fan speed for both auto and manual mode. Signed-off-by: Kenneth Feng Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit 4a3a1dc02fc3245aeeaa3742791e71fa2497b4a0 Author: Bas Nieuwenhuizen Date: Wed Oct 21 00:31:13 2020 +0200 drm/amd/display: Initialize num_pkrs on VANGOGH. As far a I can tell uses a variant of DCN3xx which uses num_pkrs. If we do not initialize the variable we will set the register field to ilog2(0) = -1, though the mask will reduce that to 7. Pretty sure 7 is not the value we want here. Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Marek Olšák Reviewed-and-Tested-by: Huang Rui Signed-off-by: Alex Deucher commit 1dc3c5a95b0831a8a70195eb73e3c21c93c8fb83 Author: Likun Gao Date: Tue Oct 20 16:50:03 2020 +0800 drm/amd/pm: update driver if file for sienna cichlid Update driver if file for sienna cichlid. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit f20c52f40a65a9cbbb8273b368470a9326cd694d Author: Likun Gao Date: Tue Oct 20 16:29:30 2020 +0800 drm/amd/pm: fix pcie information for sienna cichlid Fix the function used for sienna cichlid to get correct PCIE information by pp_dpm_pcie. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 5c46c4927607a7701e032e1361a0282475b857eb Author: Alex Deucher Date: Fri Oct 16 12:56:26 2020 -0400 drm/amdgpu/gmc10: remove dummy read workaround for newer chips Sienna Cichlid and newer have a hw fix so no longer require the workaround. Reviewed-by: Christian König Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 1ed685df7ebc30153b5b4c49772d6881dc18bcfb Author: Chengming Gui Date: Tue Oct 20 10:54:23 2020 +0800 drm/amd/amdgpu: enable noretry for Sienna_Cichlid/Navy_Flounder/Dimgrey_Cavefish set noretry default value to 1 for sienna_cichlid/navy_founder/dimgrey_cavefish. Signed-off-by: Chengming Gui Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 07f9c22f67508c851f9556e42870d2d3e202646c Author: Boyuan Zhang Date: Fri Oct 16 18:19:15 2020 -0400 drm/amdgpu: enable VCN PG and CG for vangogh Enable VCN 3.0 PG and CG for Vangogh by setting up flags. Signed-off-by: Boyuan Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 9a81009eda196f2a389f764556f167dda1d4f5fe Author: Jay Cornwall Date: Sat Oct 17 08:38:43 2020 -0500 drm/amdkfd: Use same SQ prefetch setting as amdgpu 0 causes instruction fetch stall at cache line boundary under some conditions on Navi10. A non-zero prefetch is the preferred default in any case. Fixes soft hang in Luxmark. Signed-off-by: Jay Cornwall Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 7aeef2aacccd002c22cf00cf00c5fa2a2dbcf2a1 Author: Kevin Wang Date: Fri Oct 16 16:59:25 2020 +0800 drm/amd/swsmu: correct wrong feature bit mapping 1. when smc feature bit isn't mapped, the feature state isn't showed on sysfs node of pp_features. 2. add pp_features table title Signed-off-by: Kevin Wang Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 40e7ed973ad99edad24993540ddb26dd45b9441e Author: Dennis Li Date: Wed Oct 14 17:11:41 2020 +0800 drm/amdgpu: protect eeprom update from GPU reset because i2c is unstable in GPU reset, driver need protect eeprom update from GPU reset, to not miss any bad page record. Signed-off-by: Dennis Li Reviewed-by: Christian König Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 2bf06370bcfb0dea5655e9a5ad460c7f7dca7739 Author: Ville Syrjälä Date: Wed Oct 21 16:14:39 2020 +0300 drm/i915: Restore ILK-M RPS support Restore RPS for ILK-M. We lost it when an extra HAS_RPS() check appeared in intel_rps_enable(). Unfortunaltey this just makes the performance worse on my ILK because intel_ips insists on limiting the GPU freq to the minimum. If we don't do the RPS init then intel_ips will not limit the frequency for whatever reason. Either it can't get at some required information and thus makes wrong decisions, or we mess up some weights/etc. and cause it to make the wrong decisions when RPS init has been done, or the entire thing is just wrong. Would require a bunch of reverse engineering to figure out what's going on. Cc: stable@vger.kernel.org Cc: Chris Wilson Fixes: 9c878557b1eb ("drm/i915/gt: Use the RPM config register to determine clk frequencies") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201021131443.25616-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson commit 83ebef47f8ebe320d5c5673db82f9903a4f40a69 Author: Matthew Auld Date: Wed Oct 21 11:36:06 2020 +0100 drm/i915/region: fix max size calculation We are incorrectly limiting the max allocation size as per the mm max_order, which is effectively the largest power-of-two that we can fit in the region size. However, it's normal to setup the region or allocator with a non-power-of-two size(for example 3G), which we should already handle correctly, except it seems for the early too-big-check. v2: make sure we also exercise the I915_BO_ALLOC_CONTIGUOUS path, which is quite different, since for that we are actually limited by the largest power-of-two that we can fit within the region size. (Chris) Fixes: b908be543e44 ("drm/i915: support creating LMEM objects") Signed-off-by: Matthew Auld Cc: Chris Wilson Cc: CQ Tang Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20201021103606.241395-1-matthew.auld@intel.com commit 8f2b4b684ae530cf7623cc1df22f05460b84cc5e Author: Chris Wilson Date: Mon Oct 19 15:28:41 2020 +0100 drm/i915/selftests: Flush the old heartbeat more gently In order to test how fast the heartbeat can respond, we measure with the interval set to its minimum. Before we measure though, we want to be sure we start with a fresh pulse, and so wait until any old one is complete. During that wait though, we were continually flushing the work, and so continually re-evaluating to see if the pulse was complete, and each attempt would count as an unresponsive system. If the engine did not complete the request in the couple of busy-spins, it would flag an error. This is unfortunate, so let's not busy-spin waiting for the old heartbeat, but terminate it and start afresh. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20201019142841.32273-1-chris@chris-wilson.co.uk commit 8df4ec51343f782fc5115a80b718ce27f38dbc9d Author: Daniel Vetter Date: Thu Oct 8 16:29:27 2020 +0200 drm: Give irq_by_busid drm_legacy_ prefix It's the only ioctl handler purely for legacy drivers that didn't have this yet. Reviewed-by: Alex Deucher Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201008142927.2819321-1-daniel.vetter@ffwll.ch commit 6d1a2fdedb2683007405762ca3c9d727b2aee6e2 Author: Pankaj Bharadiya Date: Tue Oct 20 21:44:26 2020 +0530 drm/i915: Enable scaling filter for plane and CRTC GEN >= 10 hardware supports the programmable scaler filter. Attach scaling filter property for CRTC and plane for GEN >= 10 hardwares and program scaler filter based on the selected filter type. changes since v3: * None changes since v2: * Use updated functions * Add ps_ctrl var to contain the full PS_CTRL register value (Ville) * Duplicate the scaling filter in crtc and plane hw state (Ville) changes since v1: * None Changes since RFC: * Enable properties for GEN >= 10 platforms (Ville) * Do not round off the crtc co-ordinate (Danial Stone, Ville) * Add new functions to handle scaling filter setup (Ville) * Remove coefficient set 0 hardcoding. Reviewed-by: Ville Syrjälä Reviewed-by: Uma Shankar Signed-off-by: Shashank Sharma Signed-off-by: Ankit Nautiyal Signed-off-by: Pankaj Bharadiya Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20201020161427.6941-5-pankaj.laxminarayan.bharadiya@intel.com commit cc2396ff75f2ede0cf24f56de64d0214812e226e Author: Pankaj Bharadiya Date: Tue Oct 20 21:44:25 2020 +0530 drm/i915/display: Add Nearest-neighbor based integer scaling support Integer scaling (IS) is a nearest-neighbor upscaling technique that simply scales up the existing pixels by an integer (i.e., whole number) multiplier.Nearest-neighbor (NN) interpolation works by filling in the missing color values in the upscaled image with that of the coordinate-mapped nearest source pixel value. Both IS and NN preserve the clarity of the original image. Integer scaling is particularly useful for pixel art games that rely on sharp, blocky images to deliver their distinctive look. Introduce functions to configure the scaler filter coefficients to enable nearest-neighbor filtering. Bspec: 49247 changes since v6: * Trust compiler, remove pointless inline keyword from cnl_coef_tap() & cnl_nearest_filter_coef() functions (Ville) changes since v4: * Make cnl_coef_tap(), cnl_nearest_filter_coef() inline (Uma) changes since v3: * None changes since v2: * Move APIs from 5/5 into this patch. * Change filter programming related function names to cnl_*, move filter select bits related code into inline function (Ville) changes since v1: * Rearrange skl_scaler_setup_nearest_neighbor_filter() to iterate the registers directly instead of the phases and taps (Ville) changes since RFC: * Refine the skl_scaler_setup_nearest_neighbor_filter() logic (Ville) Reviewed-by: Ville Syrjälä Reviewed-by: Uma Shankar Signed-off-by: Shashank Sharma Signed-off-by: Ankit Nautiyal Signed-off-by: Pankaj Bharadiya Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20201020161427.6941-4-pankaj.laxminarayan.bharadiya@intel.com commit 105c9e130e1df764ef2d41e2b35f51bba9c52617 Author: Pankaj Bharadiya Date: Tue Oct 20 21:44:24 2020 +0530 drm/i915: Introduce scaling filter related registers and bit fields Introduce scaler registers and bit fields needed to configure the scaling filter in prgrammed mode and configure scaling filter coefficients. changes since v3: * None changes since v2: * Change macro names to CNL_* and use +(set)*8 instead of adding another trip through _PICK_EVEN (Ville). changes since v1: * None changes since RFC: * Parametrize scaler coeffient macros by 'set' (Ville) Reviewed-by: Ville Syrjälä Reviewed-by: Uma Shankar Signed-off-by: Shashank Sharma Signed-off-by: Ankit Nautiyal Signed-off-by: Pankaj Bharadiya Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20201020161427.6941-3-pankaj.laxminarayan.bharadiya@intel.com commit 5c759eda9b04cd1047b4cda8ac1eaadf8a9e4fce Author: Pankaj Bharadiya Date: Tue Oct 20 21:44:23 2020 +0530 drm: Introduce plane and CRTC scaling filter properties Introduce per-plane and per-CRTC scaling filter properties to allow userspace to select the driver's default scaling filter or Nearest-neighbor(NN) filter for upscaling operations on CRTC and plane. Drivers can set up this property for a plane by calling drm_plane_create_scaling_filter() and for a CRTC by calling drm_crtc_create_scaling_filter(). NN filter works by filling in the missing color values in the upscaled image with that of the coordinate-mapped nearest source pixel value. NN filter for integer multiple scaling can be particularly useful for for pixel art games that rely on sharp, blocky images to deliver their distinctive look. changes since: v6: * Move property doc to existing "Standard CRTC Properties" and "Plane Composition Properties" doc comments (Simon) changes since v3: * Refactor code, add new function for common code (Ville) changes since v2: * Create per-plane and per-CRTC scaling filter property (Ville) changes since v1: * None changes since RFC: * Add separate properties for plane and CRTC (Ville) Link: https://github.com/xbmc/xbmc/pull/18194 Link: https://github.com/xbmc/xbmc/pull/18567 Reviewed-by: Ville Syrjälä Reviewed-by: Uma Shankar Acked-by: Simon Ser Acked-by: Daniel Vetter Signed-off-by: Pankaj Bharadiya Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20201020161427.6941-2-pankaj.laxminarayan.bharadiya@intel.com commit bfe5e585b44fb810e33fe54d4d822c6b2b40488c Author: Dave Airlie Date: Tue Oct 20 11:03:19 2020 +1000 drm/ttm: move last binding into the drivers. This moves the call to tt binding into the driver move, and drops the driver callback. Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20201020010319.1692445-8-airlied@gmail.com commit 6d820003295977f865257f1845bcdebc5dab4fb5 Author: Dave Airlie Date: Tue Oct 20 11:03:18 2020 +1000 drm/ttm: drop move notify around move. The drivers now do this in the move callback. move_notify is still needed in the destroy path. Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20201020010319.1692445-7-airlied@gmail.com commit 28ee846e83782e61d86075444c5848ab4a329241 Author: Dave Airlie Date: Tue Oct 20 11:03:17 2020 +1000 drm/ttm: remove move to new and inline into remainging place. This show the remaining bind callback, which my next series of patches will aim to remove. Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20201020010319.1692445-6-airlied@gmail.com commit f227ccc9612f5d2f6315874c93acf3945fd51dfb Author: Dave Airlie Date: Tue Oct 20 11:03:16 2020 +1000 drm/ttm: drop unbind callback. The drivers now control this, so drop unbinding. Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20201020010319.1692445-5-airlied@gmail.com commit 29a1d482e4044ab76d0c0f6341212f1a51f48236 Author: Dave Airlie Date: Tue Oct 20 11:03:15 2020 +1000 drm/ttm: add move to system into drivers This moves the to system move into the drivers, and moves all the unbinds in the move path under driver control Note: radeon/nouveau already wait so don't duplicate it. Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20201020010319.1692445-4-airlied@gmail.com commit a2dcf77f7583e13510da0f0ab75a2230f1af915c Author: Dave Airlie Date: Tue Oct 20 11:03:14 2020 +1000 drm/ttm: minor cleanup to move to system resource free already sets the domain to system, and old_mem isn't really needed. Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20201020010319.1692445-3-airlied@gmail.com commit 9764c35348b4c0da722a234fd355119abb371196 Author: Dave Airlie Date: Tue Oct 20 11:03:13 2020 +1000 drm/ttm: move some move binds into the drivers This just gives the driver control over some of the bind paths. Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20201020010319.1692445-2-airlied@gmail.com commit e7fc3f902d76f1c5f6e226f951a03a796e6763df Author: Manasi Navare Date: Thu Oct 8 14:45:26 2020 -0700 drm/i915/display: Rename pipe_timings to transcoder_timings No functional changes in this patch. With Bigjoiner, there are 2 pipes driving 2 halfs of 1 transcoder. The transcoder_mode has the full timings, and is used for configuring the transcoder with the intended mode after joining the 2 halves. To clear the confusion, we rename intel_set_pipe_timings to intel_set_transcoder_timings v2: * Split the renaming into separate patch (Ville) Cc: Maarten Lankhorst Cc: Ville Syrjälä Signed-off-by: Manasi Navare Reviewed-by: Animesh Manna Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201008214535.22942-2-manasi.d.navare@intel.com commit 47170f89f76b28c55f359b4766da41d6b91d9ffe Author: Matteo Franchin Date: Mon Oct 12 17:40:43 2020 +0100 drm/fourcc: Add AXBXGXRX106106106106 format Add ABGR format with 10-bit components packed in 64-bit per pixel. This format can be used to handle VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16 on little-endian architectures. Signed-off-by: Matteo Franchin Reviewed-by: Brian Starkey Acked-by: Daniel Vetter Signed-off-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20201012164043.23630-1-matteo.franchin@arm.com commit 1c831ade9f352d4690e2c3c67b674bc65cb3af3e Author: Robin Murphy Date: Thu Sep 3 21:36:13 2020 +0100 drm/komeda: Drop local dma_parms Since commit 9495b7e92f71 ("driver core: platform: Initialize dma_parms for platform devices"), struct platform_device already provides a dma_parms structure, so we can save allocating another one. Signed-off-by: Robin Murphy Reviewed-by: James Qian Wang [replaced DMA_BIT_MASK(32) with U32_MAX] Signed-off-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/8de297b5b916628c77b99068fb5aac1a69eed6f5.1599164796.git.robin.murphy@arm.com commit 605f9c290c1a21e8d9fdab29a5890aba3e482fb7 Author: Ville Syrjälä Date: Thu Jul 16 20:21:05 2020 +0300 drm/i915: Sort ICL PCI IDs Sort the ICL PCI IDs numerically. Some order seems better than randomness. Cc: Alexei Podtelezhnikov Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200716172106.2656-14-ville.syrjala@linux.intel.com Reviewed-by: Anusha Srivatsa commit 514dc424ce4f5eeb944459ca147e7e3743c4d76c Author: Ville Syrjälä Date: Thu Jul 16 20:21:04 2020 +0300 drm/i915: Sort CNL PCI IDs Sort the CNL PCI IDs numerically. Some order seems better than randomness. Cc: Alexei Podtelezhnikov Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200716172106.2656-13-ville.syrjala@linux.intel.com Reviewed-by: Anusha Srivatsa commit 32d4ec9a1681de020a5c70c1c57b0161cd9982c2 Author: Ville Syrjälä Date: Thu Jul 16 20:21:03 2020 +0300 drm/i915: Sort CFL PCI IDs Sort the CFL PCI IDs numerically. Some order seems better than randomness. Cc: Alexei Podtelezhnikov Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200716172106.2656-12-ville.syrjala@linux.intel.com Reviewed-by: Anusha Srivatsa commit df3478af1d73c1837d7a6ade39be71a3348ec25a Author: Ville Syrjälä Date: Thu Jul 16 20:21:02 2020 +0300 drm/i915: Sort CML PCI IDs Sort the CML PCI IDs numerically. Some order seems better than randomness. Cc: Alexei Podtelezhnikov Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200716172106.2656-11-ville.syrjala@linux.intel.com Reviewed-by: Anusha Srivatsa commit cd988984cbea09c0e24784e745d1621bf6fd92c5 Author: Ville Syrjälä Date: Thu Jul 16 20:21:01 2020 +0300 drm/i915: Sort KBL PCI IDs Sort the KBL PCI IDs numerically. Some order seems better than randomness. Cc: Alexei Podtelezhnikov Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200716172106.2656-10-ville.syrjala@linux.intel.com Reviewed-by: Anusha Srivatsa commit b04d36f7377127ef7b28443ce2ee5ea9e7b47c42 Author: Ville Syrjälä Date: Thu Jul 16 20:21:00 2020 +0300 drm/i915: Sort SKL PCI IDs Sort the SKL PCI IDs numerically. Some order seems better than randomness. Cc: Alexei Podtelezhnikov Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200716172106.2656-9-ville.syrjala@linux.intel.com Reviewed-by: Anusha Srivatsa commit 9c0b2d30441b5b4e8decb7d79f8586e832b72e3d Author: Ville Syrjälä Date: Thu Jul 16 20:20:59 2020 +0300 drm/i915: Sort HSW PCI IDs Sort the HSW PCI IDs numerically. Some order seems better than randomness. Cc: Alexei Podtelezhnikov Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200716172106.2656-8-ville.syrjala@linux.intel.com Reviewed-by: Anusha Srivatsa commit 79033a0a78984cb150eb3cb717cfc0fcd08bef0d Author: Ville Syrjälä Date: Thu Jul 16 20:20:58 2020 +0300 drm/i915: Ocd the HSW PCI ID hex numbers Most of the HSW PCI IDs are upper case hex numbers, but a few are lower case. Make it consistent so these don't stick out like a sore thumb. Cc: Alexei Podtelezhnikov Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200716172106.2656-7-ville.syrjala@linux.intel.com Reviewed-by: Anusha Srivatsa commit cfb3db8fdae250e1935b81292eeb38448b4a83e9 Author: Ville Syrjälä Date: Thu Jul 16 20:20:57 2020 +0300 drm/i915: Try to fix the SKL GT3/4 vs. GT3e/4e comments Bunch of the SKL SKUs currently documented as GT3/4 seem to actually be GT3e/4e. Fix up the comments. Cc: Alexei Podtelezhnikov Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200716172106.2656-6-ville.syrjala@linux.intel.com Reviewed-by: Anusha Srivatsa commit 03e399020cd20e845b40bf28454f924ae813ec44 Author: Alexei Podtelezhnikov Date: Thu Jul 16 20:20:56 2020 +0300 drm/i915: Add SKL GT1.5 PCI IDs Add three new devices 0x1913, 0x1915, and 0x1917 also known as iSKLULTGT15, iSKLULXGT15, and iSKLDTGT15. Signed-off-by: Alexei Podtelezhnikov [vsyrjala: Split separate changes into separate patchs, Sort the IDs] Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200716172106.2656-5-ville.syrjala@linux.intel.com Reviewed-by: Anusha Srivatsa commit 812f044df08cc2f9371f2f7c5f43d52ece210427 Author: Alexei Podtelezhnikov Date: Thu Jul 16 20:20:55 2020 +0300 drm/i915: Reclassify SKL 0x1923 and 0x1927 as ULT Reclassify 0x1923, 0x1927 according to specifications. Of note, the second to last digit seems to correspond to GT#. Signed-off-by: Alexei Podtelezhnikov [vsyrjala: Split separate changes into separate patches, Sort the IDs] Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200716172106.2656-4-ville.syrjala@linux.intel.com Reviewed-by: Anusha Srivatsa commit 194909a32aed0c8da06b74211b4d84c9c4e65f03 Author: Alexei Podtelezhnikov Date: Thu Jul 16 20:20:54 2020 +0300 drm/i915: Reclassify SKL 0x192a as GT3 Reclassify 0x192A according to specifications. Of note, the second to last digit seems to correspond to GT#. Signed-off-by: Alexei Podtelezhnikov [vsyrjala: Split separate changes into separate patches] Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200716172106.2656-3-ville.syrjala@linux.intel.com Reviewed-by: Anusha Srivatsa commit 82e84284ab7dd60702c0fa60773055b5e9c5ef2a Author: Alexei Podtelezhnikov Date: Thu Jul 16 20:20:53 2020 +0300 drm/i915: Update Haswell PCI IDs Reclassify 0x0426 as GT3 (GT2+) according to specifications and the second least significant digit. Signed-off-by: Alexei Podtelezhnikov [vsyrjala: s/GT2/GT3/ in the comment] Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200716172106.2656-2-ville.syrjala@linux.intel.com Reviewed-by: Anusha Srivatsa commit 2849e1af2b6de9a0fc02d21c8502d0c714fb0a1c Author: Ville Syrjälä Date: Tue Oct 6 17:33:30 2020 +0300 drm/i915: Sort the mess around ICP TC hotplugs regs Move the DSC stuff out from the middle of the ICP HPD register definitions. The location seems to have been selected by a dice roll. SHPD_FILTER_CNT addition also went astray due to the DSC mess, so we also fix that vs. ICP_TC_HPD_{SHORT,LONG}_DETECT(). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201006143349.5561-2-ville.syrjala@linux.intel.com Reviewed-by: Lucas De Marchi commit 5f51e78f0a07102ff22c5b69d85e6b5dd1f9d311 Author: Ville Syrjälä Date: Tue Oct 6 21:58:09 2020 +0300 drm/i915: Refactor .hpd_irq_setup() calls a bit Add a small wrapper for .hpd_irq_setup() which does the "do we even have the hook?" and "are display interrupts enabled?" checks. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201006185809.4655-3-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit 4c8d46510480a0e0cd92aba5b834bd137e3b4b35 Author: Ville Syrjälä Date: Tue Oct 13 21:11:37 2020 +0300 drm/i915: Reorder hpd init vs. display resume Currently we call .hpd_irq_setup() directly just before display resume, and follow it with another call via intel_hpd_init() just afterwards. Assuming the hpd pins are marked as enabled during the open-coded call these two things do exactly the same thing (ie. enable HPD interrupts). Which even makes sense since we definitely need working HPD interrupts for MST sideband during the display resume. So let's nuke the open-coded call and move the intel_hpd_init() call earlier. However we need to leave the poll_init_work stuff behind after the display resume as that will trigger display detection while we're resuming. We don't want that trampling over the display resume process. To make this a bit more symmetric we turn this into a intel_hpd_poll_{enable,disable}() pair. So we end up with the following transformation: intel_hpd_poll_init() -> intel_hpd_poll_enable() lone intel_hpd_init() -> intel_hpd_init()+intel_hpd_poll_disable() .hpd_irq_setup()+resume+intel_hpd_init() -> intel_hpd_init()+resume+intel_hpd_poll_disable() If we really would like to prevent all *long* HPD processing during display resume we'd need some kind of software mechanism to simply ignore all long HPDs. Currently we appear to have that just for fbdev via ifbdev->hpd_suspended. Since we aren't exploding left and right all the time I guess that's mostly sufficient. For a bit of history on this, we first got a mechanism to block hotplug processing during suspend in commit 15239099d7a7 ("drm/i915: enable irqs earlier when resuming") on account of moving the irq enable earlier. This then got removed in commit 50c3dc970a09 ("drm/fb-helper: Fix hpd vs. initial config races") because the fdev initial config got pushed to a later point. The second ad-hoc hpd_irq_setup() for resume was added in commit 0e32b39ceed6 ("drm/i915: add DP 1.2 MST support (v0.7)") to be able to do MST sideband during the resume. And finally we got a partial resurrection of the hpd blocking mechanism in commit e8a8fedd57fd ("drm/i915: Block fbdev HPD processing during suspend"), but this time it only prevent fbdev from handling hpd while resuming. v2: Leave the poll_init_work behind v3: Remove the extra intel_hpd_poll_disable() from display reset (Lyude) Add the missing intel_hpd_poll_disable() to display init (Imre) Cc: Lyude Paul Cc: Imre Deak Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201013181137.30560-1-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak Reviewed-by: Lyude Paul commit 0e634efd858e0e9331ea037e1a142e34a446e9e3 Author: Ville Syrjälä Date: Fri Oct 16 22:48:00 2020 +0300 drm/i915: s/intel_dp_sink_dpms/intel_dp_set_power/ Rename intel_dp_sink_dpms() to intel_dp_set_power() so one doesn't always have to convert from the DPMS enum values to the actual DP D-states. Also when dealing with a branch device this has nothing to do with any sink, so the old name was nonsense anyway. Also adjust the debug message accordingly, and pimp it with the standard encoder id+name thing. Trivial bits done with cocci: @@ expression DP; @@ ( - intel_dp_sink_dpms(DP, DRM_MODE_DPMS_OFF) + intel_dp_set_power(DP, DP_SET_POWER_D3) | - intel_dp_sink_dpms(DP, DRM_MODE_DPMS_ON) + intel_dp_set_power(DP, DP_SET_POWER_D0) ) Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201016194800.25581-2-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit 0a5a7499aaf52f5368dfbd735e1990c56faa912f Author: Ville Syrjälä Date: Fri Oct 16 22:47:59 2020 +0300 drm/i915: Move the lspcon resume from .reset() to intel_dp_sink_dpms() Rather that try to trick LSPCON back into PCON mode from the .reset() hook let's just do that as a regular part of the normal modeset sequence, which is going to take care of the system resume case. During a normal modeset this should normally be a nop as the mode should have already been switched by .detect(). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201016194800.25581-1-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit 0e65ce24a33c1d37da4bf43c34e080334ec6cb60 Author: Chris Wilson Date: Tue Aug 11 10:25:32 2020 +0100 drm/i915: Drop runtime-pm assert from vgpu io accessors The "mmio" writes into vgpu registers are simple memory traps from the guest into the host. We do not need to assert in the guest that the device is awake for the io as we do not write to the device itself. However, over time we have refactored all the mmio accessors with the result that the vgpu reuses the gen2 accessors and so inherits the assert for runtime-pm of the native device. The assert though has actually been there since commit 3be0bf5acca6 ("drm/i915: Create vGPU specific MMIO operations to reduce traps"). References: 3be0bf5acca6 ("drm/i915: Create vGPU specific MMIO operations to reduce traps") Signed-off-by: Chris Wilson Cc: Yan Zhao Cc: Zhenyu Wang Reviewed-by: Zhenyu Wang Cc: stable@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20200811092532.13753-1-chris@chris-wilson.co.uk commit f566fdcd6cc49a9d5b5d782f56e3e7cb243f01b8 Author: Chris Wilson Date: Mon Oct 19 11:15:23 2020 +0100 drm/i915: Force VT'd workarounds when running as a guest OS If i915.ko is being used as a passthrough device, it does not know if the host is using intel_iommu. Mixing the iommu and gfx causes a few issues (such as scanout overfetch) which we need to workaround inside the driver, so if we detect we are running under a hypervisor, also assume the device access is being virtualised. Reported-by: Stefan Fritsch Suggested-by: Stefan Fritsch Signed-off-by: Chris Wilson Cc: Zhenyu Wang Cc: Joonas Lahtinen Cc: Stefan Fritsch Cc: stable@vger.kernel.org Tested-by: Stefan Fritsch Reviewed-by: Zhenyu Wang Link: https://patchwork.freedesktop.org/patch/msgid/20201019101523.4145-1-chris@chris-wilson.co.uk commit d3606757e611fbd48bb239e8c2fe9779b3f50035 Author: Chris Wilson Date: Mon Oct 19 17:50:05 2020 +0100 drm/i915: Exclude low pages (128KiB) of stolen from use The GPU is trashing the low pages of its reserved memory upon reset. If we are using this memory for ringbuffers, then we will dutiful resubmit the trashed rings after the reset causing further resets, and worse. We must exclude this range from our own use. The value of 128KiB was found by empirical measurement (and verified now with a selftest) on gen9. Signed-off-by: Chris Wilson Cc: stable@vger.kernel.org Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20201019165005.18128-2-chris@chris-wilson.co.uk commit d7085b0faac8330b67e1b10ff2dadd8af6b2564e Author: Chris Wilson Date: Mon Oct 19 17:50:04 2020 +0100 drm/i915/gem: Poison stolen pages before use When allocating objects from stolen, memset() the backing store to POISON_INUSE (0x5a) to help identify any uninitialised use of a stolen object. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20201019165005.18128-1-chris@chris-wilson.co.uk commit ea40d7857d5250e5400f38c69ef9e17321e9c4a2 Author: Daniel Vetter Date: Sat Oct 10 01:21:56 2020 +0200 drm/vkms: fbdev emulation support Hooray for generic fbdev support, making this a oneliner. We just needed to fix preferred_depth fixed and the vmap support added first. This is useful for testing fbdev testcases in igt. Right now we only have a simple one in the fbdev testcases, which passes both info and mmap subtests. v2: Augment commit message as suggested by Melissa. Acked-by: Thomas Zimmermann Reviewed-by: Melissa Wen Signed-off-by: Daniel Vetter Cc: Rodrigo Siqueira Cc: Melissa Wen Cc: Haneen Mohammed Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201009232156.3916879-3-daniel.vetter@ffwll.ch commit a21906ead6a59419613f803460ca900f2560b1e1 Author: José Roberto de Souza Date: Mon Oct 19 10:56:09 2020 -0700 drm/i915/display/fbc: Implement WA 22010751166 Underruns happens when plane height + y offset is not a modulo of 4 when FBC is enabled. It happens when scanline is at vactive - 10 but that is not feasible to do from the software side so here completely disabling FBC when height + y offset matches to avoid visual glitches. Specification says that it only affects TGL display C stepping and newer but to simply the check and as TGL is already in final costumers hands, pre-production display stepping A and B was also included. BSpec: 52887 ICL BSpec: 52888 EHL/JSL BSpec: 52890/55378 TGL BSpec: 53508 DG1 BSpec: 53273 RKL Signed-off-by: José Roberto de Souza Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20201019175609.28715-1-jose.souza@intel.com commit 359d0eff8409ebf1826ab394a211859528d7692e Author: José Roberto de Souza Date: Mon Oct 19 10:39:06 2020 -0700 drm/i915/display: Program DBUF_CTL tracker state service This sequence is not part of "Sequences to Initialize Display" but as noted in the MBus page the DBUF_CTL.Tracker_state_service needs to be set to 8. BSpec: 49213 Reviewed-by: Matt Roper Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20201019173906.18892-1-jose.souza@intel.com commit 23fae9cf97cc0ba54e4d6c8e078871f56370f271 Author: Dave Airlie Date: Mon Oct 19 17:13:14 2020 +1000 drm/ttm: drop ttm_bo_move_ttm wrapper The apis to move old/new are in place everywhere so this is no longer needed. Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20201019071314.1671485-6-airlied@gmail.com commit c37d951cb42aa340513c0bc2df10b7324fa0d856 Author: Dave Airlie Date: Mon Oct 19 17:13:13 2020 +1000 drm/ttm: add move old to system to drivers. Uninline ttm_bo_move_ttm. Eventually want to unhook the unbind out. Reviewed-by: Ben Skeggs Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20201019071314.1671485-5-airlied@gmail.com commit a07e32bda0265b62ed0f85fbdfcd316c1dfc98ca Author: Dave Airlie Date: Mon Oct 19 17:13:12 2020 +1000 drm/ttm: use new move interface for known system->ttm moves In all 3 drivers there is a case where the driver knows the bo is in SYSTEM so don't call the api that checks that. Reviewed-by: Ben Skeggs Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20201019071314.1671485-4-airlied@gmail.com commit b8b99c7ddccea56b0ac589e5abf8274fe4118d4a Author: Dave Airlie Date: Mon Oct 19 17:13:11 2020 +1000 drm/ttm: split out the move to system from move ttm code Reviewed-by: Ben Skeggs Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20201019071314.1671485-3-airlied@gmail.com commit 87ed94238cb57cacb3d2b889f8e37e05a4da9c71 Author: Dave Airlie Date: Mon Oct 19 17:13:10 2020 +1000 drm/ttm: refactor out common code to setup a new tt backed resource This factors out the code to setup non-system tt. The same code was used twice in the move paths. Reviewed-by: Ben Skeggs Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20201019071314.1671485-2-airlied@gmail.com commit fa812ce96a46efc27cae4dcad866aaee9cb25d28 Author: Chris Wilson Date: Mon Oct 19 09:34:44 2020 +0100 drm/i915/gt: Onion unwind for scratch page allocation failure In switching to using objects for our ppGTT scratch pages, care was not taken to avoid trying to unref NULL objects on failure. And for gen6 ppGTT, it appears we forgot entirely to unwind after a partial allocation failure. Fixes: 89351925a477 ("drm/i915/gt: Switch to object allocations for page directories") Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: Joonas Lahtinen Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20201019083444.1286-1-chris@chris-wilson.co.uk commit cf40c66005920a6d4932a1a259076459464adf32 Author: Neil Armstrong Date: Tue Sep 15 14:19:12 2020 +0200 drm: panel: add TDO tl070wsh30 panel driver This adds support for the TDO TL070WSH30 TFT-LCD panel module. The panel has a 1024×600 resolution and uses 24 bit RGB per pixel. It provides a MIPI DSI interface to the host, a built-in LED backlight and touch controller. Signed-off-by: Neil Armstrong Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200915121912.4347-5-narmstrong@baylibre.com commit 6e3a8664322564fc50f9c2b882e1a72b55bae2f1 Author: Neil Armstrong Date: Tue Sep 15 14:19:11 2020 +0200 dt-bindings: display: panel-simple-dsi: add TDO TL070WSH30 DSI panel bindings This add the bindings for the 1024x600 TFT LCD TL070WSH30 DSI panel to panel-simple-dsi. Signed-off-by: Neil Armstrong Reviewed-by: Sam Ravnborg Acked-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20200915121912.4347-4-narmstrong@baylibre.com commit ab793f5458278c7c620937ba906ab7a2b960e41c Author: Neil Armstrong Date: Tue Sep 15 14:19:10 2020 +0200 dt-bindings: display: panel-simple-dsi: add optional reset gpio Simple DSI panels can also have a reset GPIO signal in addition/instead of an enable GPIO signal. This adds an optional reset-gpios property. Signed-off-by: Neil Armstrong Reviewed-by: Sam Ravnborg Acked-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20200915121912.4347-3-narmstrong@baylibre.com commit 0d51d44e2a1f7619bcf21901deb40141b3f8f992 Author: Neil Armstrong Date: Tue Sep 15 14:19:09 2020 +0200 dt-bindings: vendor-prefixes: Add Shanghai Top Display Optolelectronics vendor prefix Shanghai Top Display Optolelectronics Co., Ltd is a display manufacturer from Shanghai. Web site of the company: http://www.shtdo.com/ Signed-off-by: Neil Armstrong Reviewed-by: Sam Ravnborg Acked-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20200915121912.4347-2-narmstrong@baylibre.com commit d1934d2b687ae0c27c69c4dd7d74f65a8ce5083d Author: Dave Airlie Date: Wed Sep 23 10:25:08 2020 +1000 drm/ttm: drop free old node wrapper. This isn't really used anymore, if drivers needs it later, just add back an inline wrapper. Reviewed-by: Christian König Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200924051845.397177-13-airlied@gmail.com commit 5fefd25047bd443fd79a97c3e429c7de88d5c55d Author: Tian Tao Date: Fri Oct 16 08:38:31 2020 +0800 drm/hisilicon: Use the same style of variable type in hibmc_drm_drv Consistently Use the same style of variable type in hibmc_drm_drv.c and hibmc_drm_drv.h. Signed-off-by: Tian Tao Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/1602808711-65193-3-git-send-email-tiantao6@hisilicon.com commit 5b2fabf483a20fbd6ac16c1a7c60cbdda49cf931 Author: Tian Tao Date: Fri Oct 16 08:38:30 2020 +0800 drm/hisilicon: Use the same style of variable type in hibmc_drm_de Consistently Use the same style of variable type in hibmc_drm_de.c. Signed-off-by: Tian Tao Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/1602808711-65193-2-git-send-email-tiantao6@hisilicon.com commit b4ae07cde9b31bf94f38ef5c6f0750642f325c2f Author: Fabien Parent Date: Mon Oct 12 22:52:17 2020 +0200 dt-bindings: iio: adc: auxadc: add doc for MT8516 SoC Add documentation for the auxadc binding for MT8516 SoC. Signed-off-by: Fabien Parent Reviewed-by: Matthias Brugger Acked-by: Rob Herring Link: https://lore.kernel.org/r/20201012205218.3010868-1-fparent@baylibre.com Signed-off-by: Jonathan Cameron commit 14212fe77ef6f9b0ec61f9ad946dea90a22496ec Author: Bernard Zhao Date: Fri Aug 14 01:30:19 2020 -0700 drm/via: reduce no need mutex_lock area In function via_mem_alloc`s error branch, DRM_ERROR is protected in the mutex_lock(&dev->struct_mutex) area. >From the code, we see that DRM_ERROR is just an error log print without any struct element, there is no need to protect this. Signed-off-by: Bernard Zhao Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200814083021.8962-1-bernard@vivo.com commit 77bb5aaf2bb8180e7d1bb70b4df306f511707a7d Author: Krzysztof Kozlowski Date: Thu Aug 27 09:11:07 2020 +0200 drm/tve200: Fix handling of platform_get_irq() error platform_get_irq() returns -ERRNO on error. In such case comparison to 0 would pass the check. Fixes: 179c02fe90a4 ("drm/tve200: Add new driver for TVE200") Signed-off-by: Krzysztof Kozlowski Acked-by: Linus Walleij Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200827071107.27429-2-krzk@kernel.org commit e2dae672a9d5e11856fe30ede63467c65f999a81 Author: Krzysztof Kozlowski Date: Thu Aug 27 09:11:06 2020 +0200 drm/mcde: Fix handling of platform_get_irq() error platform_get_irq() returns -ERRNO on error. In such case comparison to 0 would pass the check. Fixes: 5fc537bfd000 ("drm/mcde: Add new driver for ST-Ericsson MCDE") Signed-off-by: Krzysztof Kozlowski Acked-by: Linus Walleij Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200827071107.27429-1-krzk@kernel.org commit 7a1f4fa4a62933797152578d3730058fe6861b42 Author: Jagan Teki Date: Fri Sep 4 23:38:21 2020 +0530 drm/panel: simple: Add YTC700TLAG-05-201C Add panel timings for YTC700TLAG-05-201C 7" TFT LCD panel from Yes Optoelectronics Co.,Ltd. Signed-off-by: Jagan Teki Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200904180821.302194-3-jagan@amarulasolutions.com commit b73946a2efeab26325259a07a1f3fde9cce6958f Author: Jagan Teki Date: Fri Sep 4 23:38:20 2020 +0530 dt-bindings: display: simple: Add YTC700TLAG-05-201C Add dt-bindings for YTC700TLAG-05-201C 7" TFT LCD panel from Yes Optoelectronics Co.,Ltd. Signed-off-by: Jagan Teki Acked-by: Rob Herring Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200904180821.302194-2-jagan@amarulasolutions.com commit 7924bcdbcb127b3f7d3b1eea94a8ef8ea035ca2e Author: Jagan Teki Date: Fri Sep 4 23:38:19 2020 +0530 dt-bindings: vendor-prefixes: Add Yes Optoelectronics Add vendor dt-bindings for Yes Optoelectronics Co.,Ltd. Signed-off-by: Jagan Teki Acked-by: Rob Herring Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200904180821.302194-1-jagan@amarulasolutions.com commit 83fc7f6a351464815067e48f3cbe1db372143eb6 Author: Jason Yan Date: Thu Sep 10 22:05:58 2020 +0800 video: fbdev: fsl-diu-fb: remove unneeded variable 'res' Eliminate the following coccicheck warning: drivers/video/fbdev/fsl-diu-fb.c:1428:5-8: Unneeded variable: "res". Return "0" on line 1450 Reported-by: Hulk Robot Signed-off-by: Jason Yan Acked-by: Gustavo A. R. Silva Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200910140558.1191423-1-yanaijie@huawei.com commit 2f39766ea23aa41c329cf10af207fe6df584758e Author: Jason Yan Date: Thu Sep 10 22:05:36 2020 +0800 video: fbdev: sis: remove unneeded semicolon Eliminate the following coccicheck warning: drivers/video/fbdev/sis/sis_accel.h:143:72-73: Unneeded semicolon drivers/video/fbdev/sis/sis_accel.h:144:72-73: Unneeded semicolon drivers/video/fbdev/sis/sis_accel.h:145:72-73: Unneeded semicolon drivers/video/fbdev/sis/sis_accel.h:273:75-76: Unneeded semicolon drivers/video/fbdev/sis/sis_accel.h:274:75-76: Unneeded semicolon drivers/video/fbdev/sis/sis_accel.h:275:73-74: Unneeded semicolon drivers/video/fbdev/sis/sis_accel.h:276:75-76: Unneeded semicolon Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200910140536.1191150-1-yanaijie@huawei.com commit 4caca3d8f912ebaae8af8bd12507194352584322 Author: Jason Yan Date: Sat Sep 12 11:38:09 2020 +0800 drm/panel: st7703: Make jh057n00900_panel_desc static This eliminates the following sparse warning: drivers/gpu/drm/panel/panel-sitronix-st7703.c:156:26: warning: symbol 'jh057n00900_panel_desc' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: Jason Yan Reviewed-by: Guido Günther [Use static const] Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200912033809.142773-1-yanaijie@huawei.com commit 759962b5dc99bf22d2894a41d29847ce76ac3bc8 Author: Jason Yan Date: Sat Sep 12 11:38:26 2020 +0800 drm: bridge: adv7511: make adv7511_hdmi_hw_params() static This eliminates the following sparse warning: drivers/gpu/drm/bridge/adv7511/adv7511_audio.c:58:5: warning: symbol 'adv7511_hdmi_hw_params' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200912033826.142923-1-yanaijie@huawei.com commit 7d3618fdeef1991f8fc060b7919212ea1a02fc9f Author: Jason Yan Date: Sat Sep 12 11:38:43 2020 +0800 drm/bridge: analogix_dp: make analogix_dp_start_aux_transaction() static This eliminates the following sparse warning: drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c:527:5: warning: symbol 'analogix_dp_start_aux_transaction' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200912033843.143240-1-yanaijie@huawei.com commit ba43961b2dcb0ea39b3bbed951060da891a765b8 Author: Liu Shixin Date: Tue Sep 15 11:26:23 2020 +0800 drm/panel: simplify the return expression of rb070d30_panel_enable() Simplify the return expression. Signed-off-by: Liu Shixin Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200915032623.1772361-1-liushixin2@huawei.com commit 7604caa1f09911a290fcfa1f57ff2e573af0e887 Author: Liu Shixin Date: Tue Sep 15 11:26:27 2020 +0800 omapfb: connector-dvi: simplify the return expression of dvic_connect() Simplify the return expression. Signed-off-by: Liu Shixin Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200915032627.1772517-1-liushixin2@huawei.com commit f215d6003736c48b894f2d9bf9c26855c2f3918d Author: Qilong Zhang Date: Wed Sep 16 19:13:53 2020 +0800 omapfb: use devm_platform_ioremap_resource_byname Use the devm_platform_ioremap_resource_byname() helper instead of calling platform_get_resource_byname() and devm_ioremap_resource() separately. Signed-off-by: Qilong Zhang Signed-off-by: Sam Ravnborg [fixed warning - unused variable] [fixed checkpatch warning - fixed indent] Link: https://patchwork.freedesktop.org/patch/msgid/20200916111353.105914-1-zhangqilong3@huawei.com commit 3da1781ea458f658e6089c1cc471016a72fb81cf Author: Qinglang Miao Date: Wed Sep 16 14:21:23 2020 +0800 fbdev: nvidia: use for_each_child_of_node() macro Use for_each_child_of_node() macro instead of open coding it. Signed-off-by: Qinglang Miao Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200916062123.190636-1-miaoqinglang@huawei.com commit 8bdfc5dae4e3ba4d99dfb430ef43249e5f1b7730 Author: Xin Ji Date: Fri Sep 18 18:24:18 2020 +0800 drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP The ANX7625 is an ultra-low power 4K Mobile HD Transmitter designed for portable device. It converts MIPI DSI/DPI to DisplayPort 1.3 4K. Signed-off-by: Xin Ji Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/528b76c1a4f7b6ea85371bfae4bde389aec4bb24.1600423932.git.xji@analogixsemi.com commit 9aab66010e5722fbfa2bb1f5d97b9409ec04cdf3 Author: Xin Ji Date: Fri Sep 18 18:22:57 2020 +0800 dt-bindings: drm/bridge: anx7625: MIPI to DP transmitter DT schema anx7625: MIPI to DP transmitter DT schema Signed-off-by: Xin Ji Reviewed-by: Rob Herring Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/bafa02aa50c5c29b3336ca6930c406150a3c60d2.1600423932.git.xji@analogixsemi.com commit defa1dcc5617312c385257010039dacfeb32bae3 Author: Qinglang Miao Date: Mon Sep 21 21:11:12 2020 +0800 omapfb: simplify the return expression of hdmi_pll_enable Simplify the return expression. Signed-off-by: Qinglang Miao Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200921131112.93411-1-miaoqinglang@huawei.com commit 10732a0f644a635c27f6f66da734279ec1047439 Author: Qinglang Miao Date: Mon Sep 21 21:10:52 2020 +0800 omapfb: panel-sony-acx565akm: simplify the return expression of acx565akm_connect() Simplify the return expression. Signed-off-by: Qinglang Miao Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200921131052.92707-1-miaoqinglang@huawei.com commit ea65a99bb85edf63279812662b561677e82b6636 Author: Qinglang Miao Date: Mon Sep 21 21:10:51 2020 +0800 omapfb: connector-hdmi: simplify the return expression of hdmic_connect Simplify the return expression. Signed-off-by: Qinglang Miao Signed-off-by: Sam Ravnborg # dropped gpio-cs5535.c changes Link: https://patchwork.freedesktop.org/patch/msgid/20200921131051.92661-1-miaoqinglang@huawei.com commit 63da0977f52ad67b134bfabd32edd39248d3d369 Author: Qinglang Miao Date: Mon Sep 21 21:10:49 2020 +0800 omapfb: connector-analog-tv: simplify the return expression of tvc_connect() Simplify the return expression. Signed-off-by: Qinglang Miao Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200921131049.92616-1-miaoqinglang@huawei.com commit 43624b403ba2596d15271ed103c9d25d9deca4b1 Author: Liu Shixin Date: Mon Sep 21 16:24:45 2020 +0800 omapfb: simplify the return expression of tpo_td043_connect Simplify the return expression. Signed-off-by: Liu Shixin Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200921082445.2591825-1-liushixin2@huawei.com commit 533278ca0d53b1ea554e53900774d4cf5a6be095 Author: Liu Shixin Date: Mon Sep 21 16:24:44 2020 +0800 omapfb: simplify the return expression of sharp_ls_connect Simplify the return expression. Signed-off-by: Liu Shixin Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200921082444.2591773-1-liushixin2@huawei.com commit ef27afa607e8ab0bd513d34dae014d3284e87e25 Author: Liu Shixin Date: Mon Sep 21 16:24:43 2020 +0800 omapfb: simplify the return expression of panel_dpi_connect Simplify the return expression. Signed-off-by: Liu Shixin Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200921082443.2591721-1-liushixin2@huawei.com commit 9e9b18b681f1493538e48c798587aa096a8a3a91 Author: Biju Das Date: Tue Sep 22 13:55:26 2020 +0300 drm/bridge: lvds-codec: Add support for regulator Add the support for enabling optional regulator that may be used as VCC source. Signed-off-by: Biju Das Reviewed-by: Laurent Pinchart [Replaced 'error' variable with 'ret'] [Renamed regulator from 'vcc' to 'power'] Signed-off-by: Laurent Pinchart Reviewed-by: Biju Das Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200922105526.5252-1-laurent.pinchart+renesas@ideasonboard.com commit 748855582101b6c3a2ae3debb2ce2d4555c6c677 Author: Wang Qing Date: Tue Sep 22 20:14:24 2020 +0800 video: use kobj_to_dev() Use kobj_to_dev() instead of container_of() Signed-off-by: Wang Qing Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/1600776867-24226-1-git-send-email-wangqing@vivo.com commit 0ad086e07dd553b4b56eb68f0d228d46e7543eca Author: Li Heng Date: Thu Sep 24 22:18:26 2020 +0800 video: Remove set but not used variable Fixes gcc '-Wunused-but-set-variable' warning: drivers/video/fbdev/sis/300vtbl.h:1064:28: warning: ‘SiS300_CHTVVCLKSONTSC’ defined but not used [-Wunused-const-variable=] Reported-by: Hulk Robot Signed-off-by: Li Heng Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/1600957106-13741-1-git-send-email-liheng40@huawei.com commit 37e6011b3ccf1a099be563e4067a2e339ee29f87 Author: Yannick Fertre Date: Fri Sep 25 16:16:18 2020 +0200 drm/panel: rm68200: fix mode to 50fps Compute new timings to get a framerate of 50fps with a pixel clock @54Mhz. Signed-off-by: Yannick Fertre Tested-by: Philippe Cornu Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200925141618.12097-1-yannick.fertre@st.com commit a3bab3258568fa3157b0d657328ea3c6a2d924d7 Author: Alex Deucher Date: Fri Oct 16 10:02:56 2020 -0400 drm/amdgpu: move amdgpu_num_kcq handling to a helper Add a helper so we can set per asic default values. Also, the module parameter is currently clamped to 8, but clamp it per asic just in case some asics have different limits in the future. Enable the option on gfx6,7 as well for consistency. Acked-by: Nirmoy Das Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 23d9bd60bd116c31936d012d79ba0e9972bafa9c Author: Andrey Grodzovsky Date: Fri Oct 16 10:50:44 2020 -0400 drm/amd/psp: Fix sysfs: cannot create duplicate filename psp sysfs not cleaned up on driver unload for sienna_cichlid Fixes: ce87c98db428e7 ("drm/amdgpu: Include sienna_cichlid in USBC PD FW support.") Signed-off-by: Andrey Grodzovsky Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 194f6b5d1f6264a2d17ef55d6bdaa886b7b43ad9 Author: Bhawanpreet Lakha Date: Thu Oct 15 13:32:31 2020 -0400 drm/amd/display: Fix DCN302 makefile Some setups will fail to build. So copy dcn301 makefile setup which is known to work Signed-off-by: Bhawanpreet Lakha Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 26d94a4687708fbb1622fa9edab52c35aa90698a Author: Bhawanpreet Lakha Date: Thu Oct 15 10:50:18 2020 -0400 drm/amd/display: Use amdgpu_socbb.h instead of redefining structs Signed-off-by: Bhawanpreet Lakha Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit f5213f827c8748b99741406342d75d8d6641ddcc Author: Andrey Grodzovsky Date: Wed Oct 14 13:12:30 2020 -0400 drm/amd/display: Avoid MST manager resource leak. On connector destruction call drm_dp_mst_topology_mgr_destroy to release resources allocated in drm_dp_mst_topology_mgr_init. Do it only if MST manager was initilized before otherwsie a crash is seen on driver unload/device unplug. Reviewed-by: Nicholas Kazlauskas Signed-off-by: Andrey Grodzovsky Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 06dd6f303fe2e4d013bd2039283d837308fe99d9 Author: Xu Wang Date: Wed Sep 30 08:18:59 2020 +0000 drm/bridge: ti-sn65dsi86: remove redundant null check Because clk_disable_unprepare already checked NULL clock parameter, so the additional checks are unnecessary, just remove it Signed-off-by: Xu Wang Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200930081859.52431-1-vulab@iscas.ac.cn commit 268f3a4388b0bf6cc6a344fcf576c4153b2c86c6 Author: Andrey Grodzovsky Date: Wed Oct 14 13:10:06 2020 -0400 drm/amd/display: Revert "drm/amd/display: Fix a list corruption" This fixes regression on device unplug and/or driver unload. [ 65.681501 < 0.000004>] BUG: kernel NULL pointer dereference, address: 0000000000000008 [ 65.681504 < 0.000003>] #PF: supervisor write access in kernel mode [ 65.681506 < 0.000002>] #PF: error_code(0x0002) - not-present page [ 65.681507 < 0.000001>] PGD 7c9437067 P4D 7c9437067 PUD 7c9db7067 PMD 0 [ 65.681511 < 0.000004>] Oops: 0002 [#1] SMP NOPTI [ 65.681512 < 0.000001>] CPU: 8 PID: 127 Comm: kworker/8:1 Tainted: G W O 5.9.0-rc2-dev+ #59 [ 65.681514 < 0.000002>] Hardware name: System manufacturer System Product Name/PRIME X470-PRO, BIOS 4406 02/28/2019 [ 65.681525 < 0.000011>] Workqueue: events drm_connector_free_work_fn [drm] [ 65.681535 < 0.000010>] RIP: 0010:drm_atomic_private_obj_fini+0x11/0x60 [drm] [ 65.681537 < 0.000002>] Code: de 4c 89 e7 e8 70 f2 ba f8 48 8d 65 d8 5b 41 5c 41 5d 41 5e 41 5f 5d c3 90 0f 1f 44 00 00 48 8b 47 08 48 8b 17 55 48 89 e5 53 <48> 89 42 08 48 89 10 48 b8 00 01 00 00 00 00 ad de 48 89 fb 48 89 [ 65.681541 < 0.000004>] RSP: 0018:ffffa5fa805efdd8 EFLAGS: 00010246 [ 65.681542 < 0.000001>] RAX: 0000000000000000 RBX: ffff9a4b094654d8 RCX: 0000000000000000 [ 65.681544 < 0.000002>] RDX: 0000000000000000 RSI: ffffffffba197bc2 RDI: ffff9a4b094654d8 [ 65.681545 < 0.000001>] RBP: ffffa5fa805efde0 R08: ffffffffba197b82 R09: 0000000000000040 [ 65.681547 < 0.000002>] R10: ffffa5fa805efdc8 R11: 000000000000007f R12: ffff9a4b09465888 [ 65.681549 < 0.000002>] R13: ffff9a4b36f20010 R14: ffff9a4b36f20290 R15: ffff9a4b3a692840 [ 65.681551 < 0.000002>] FS: 0000000000000000(0000) GS:ffff9a4b3ea00000(0000) knlGS:0000000000000000 [ 65.681553 < 0.000002>] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 65.681554 < 0.000001>] CR2: 0000000000000008 CR3: 00000007c9c82000 CR4: 00000000003506e0 [ 65.681556 < 0.000002>] Call Trace: [ 65.681561 < 0.000005>] drm_dp_mst_topology_mgr_destroy+0xc4/0xe0 [drm_kms_helper] [ 65.681612 < 0.000051>] amdgpu_dm_connector_destroy+0x3d/0x110 [amdgpu] [ 65.681622 < 0.000010>] drm_connector_free_work_fn+0x78/0x90 [drm] [ 65.681624 < 0.000002>] process_one_work+0x164/0x410 [ 65.681626 < 0.000002>] worker_thread+0x4d/0x450 [ 65.681628 < 0.000002>] ? rescuer_thread+0x390/0x390 [ 65.681630 < 0.000002>] kthread+0x10a/0x140 [ 65.681632 < 0.000002>] ? kthread_unpark+0x70/0x70 [ 65.681634 < 0.000002>] ret_from_fork+0x22/0x30 This reverts commit 1545fbf97eafc1dbdc2923e58b4186b16a834784. Signed-off-by: Andrey Grodzovsky Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 15d67827b000b62962e31b8571c45a47f6f8c100 Author: Jiansong Chen Date: Fri Oct 16 20:43:06 2020 +0800 drm/amd/pm: drop navy_flounder hardcode of using soft pptable Drop navy_flounder hardcode of using soft pptable, so that it can use pptable from vbios when available. Signed-off-by: Jiansong Chen Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 0e601a04dd3f0364b86908f4e14ab6df1b68b989 Author: Mihir Bhogilal Patel Date: Thu Oct 15 17:57:26 2020 +0530 drm/amdgpu: add a list in VM for BOs in the done state Add a new list in VM for done state i.e. BOs which are invalidated and updated in PTEs. Signed-off-by: Mihir Bhogilal Patel Reviewed-by: Christian König Signed-off-by: Alex Deucher commit c6b3c8779cb2a75cb7d61bc5b5093654f61290b4 Author: Likun Gao Date: Thu Oct 15 10:48:15 2020 +0800 drm/amdgpu: update golden setting for sienna_cichlid Update golden setting for sienna_cichlid. Signed-off-by: Likun Gao Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit e9073b43621ee632dda2d7d3fc374ef0e697c615 Author: Kevin Wang Date: Fri Oct 16 11:07:47 2020 +0800 drm/amd/swsmu: add missing feature map for sienna_cichlid it will cause smu sysfs node of "pp_features" show error. Signed-off-by: Kevin Wang Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit 21470d97c9f8bb818c2bba71564637eb3c58e5d1 Author: Kevin Wang Date: Wed Oct 14 20:09:57 2020 +0800 drm/amdgpu: remove gfxhub_v1_1_funcs set remove duplicate gfxhub v1.1 function set. put function of gfxhub_v1_1_get_xgmi_info to gfxhub v1_0 function set. Signed-off-by: Kevin Wang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 92aeeafb544d7b75c38cb0677e691f72c8aa1d6a Author: Chengming Gui Date: Tue Oct 13 12:18:27 2020 +0800 drm/amd/amdgpu: set the default value of noretry to 1 for some dGPUs noretry = 0 cause some dGPU's kfd page fault tests fail, so set noretry to 1 for these special ASICs: vega20/navi10/navi14 v2: merge raven and default case due to the same setting v3: remove ARCTURUS Signed-off-by: Chengming Gui Acked-by: Felix Kuhling Signed-off-by: Alex Deucher commit 84b934bc0a9481f08f399c2ec08fc2a56f95b70e Author: Huang Rui Date: Thu Oct 15 10:59:40 2020 +0800 drm/amdgpu/display: enable display ip block for vangogh This patch is to enable display IP block for vangogh platforms. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit f9dbefa884fd6618a99c29a29c64de58bdcbca85 Author: Huang Rui Date: Thu Oct 15 15:12:23 2020 +0800 drm/amdgpu/display: fix the NULL pointer reference on dmucb on dcn301 DCN301 needs to use dmub create abm instance instead of dce. [ 1138.854204] BUG: kernel NULL pointer dereference, address: 0000000000000000 [ 1138.854206] #PF: supervisor instruction fetch in kernel mode [ 1138.854207] #PF: error_code(0x0010) - not-present page [ 1138.854208] PGD 0 P4D 0 [ 1138.854212] Oops: 0010 [#1] SMP NOPTI [ 1138.854216] CPU: 6 PID: 1240 Comm: modprobe Tainted: G W OE 5.9.0-rc2-custom #1 [ 1138.854217] Hardware name: AMD Chachani-VN/Chachani-VN, BIOS BAerithA104 10/01/2020 [ 1138.854221] RIP: 0010:0x0 [ 1138.854224] Code: Bad RIP value. [ 1138.854226] RSP: 0018:ffffc90001c4f638 EFLAGS: 00010286 [ 1138.854228] RAX: 0000000000000000 RBX: ffff88804f2b2800 RCX: ffffc90001c4f740 [ 1138.854229] RDX: 00000000000000e8 RSI: ffffc90001c4f640 RDI: ffff88805816f300 [ 1138.854230] RBP: ffffc90001c4f850 R08: ffffc90001c4f644 R09: ffffc90001c4f654 [ 1138.854231] R10: ffffc90001c4f72c R11: ffffc90001c4f740 R12: ffffc90001c4f640 [ 1138.854232] R13: ffffc90001c4f728 R14: 0000000000000000 R15: ffff888007296381 [ 1138.854235] FS: 00007f5f44d84540(0000) GS:ffff88805e380000(0000) knlGS:0000000000000000 [ 1138.854236] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1138.854237] CR2: ffffffffffffffd6 CR3: 00000000194f4000 CR4: 0000000000050ee0 [ 1138.854239] Call Trace: [ 1138.854447] dmub_init_abm_config+0x220/0x267 [amdgpu] [ 1138.854654] dm_late_init+0x197/0x1ad [amdgpu] [ 1138.854846] ? dm_late_init+0x197/0x1ad [amdgpu] [ 1138.854999] amdgpu_device_ip_late_init+0x6f/0x21b [amdgpu] [ 1138.855148] amdgpu_device_init+0x1b7f/0x1cfb [amdgpu] [ 1138.855293] amdgpu_driver_load_kms+0x2c/0x26e [amdgpu] [ 1138.855437] amdgpu_pci_probe+0x1c7/0x249 [amdgpu] [ 1138.920489] local_pci_probe+0x48/0x80 [ 1138.920492] pci_device_probe+0x10f/0x1c0 Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit f0c746ce07c8df0d5b5582a87b0baf238ab49d27 Author: Yifan Zhang Date: Fri Jul 17 16:28:46 2020 +0800 drm/amd/display: add S/G support for Renoir S/G (scatter/gather) display support for display buffers in system memory. Signed-off-by: Yifan Zhang Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit c0fb85ae02b62bded71110f44e8b0fe34f11260f Author: Yifan Zhang Date: Mon Aug 31 15:56:24 2020 +0800 drm/amd/display: setup system context in dm_init [why] display S/G mode fails in Renoir [how] Setup system context in dm init. Signed-off-by: Yifan Zhang Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 137655d1ed353806b8591855b569efd090d84135 Author: Douglas Anderson Date: Fri Oct 2 14:03:51 2020 -0700 drm/bridge: ti-sn65dsi86: Add retries for link training On some panels hooked up to the ti-sn65dsi86 bridge chip we found that link training was failing. Specifically, we'd see: ti_sn65dsi86 2-002d: [drm:ti_sn_bridge_enable] *ERROR* Link training failed, link is off (-5) The panel was hooked up to a logic analyzer and it was found that, as part of link training, the bridge chip was writing a 0x1 to DPCD address 00600h and the panel responded NACK. As can be seen in header files, the write of 0x1 to DPCD address 0x600h means we were trying to write the value DP_SET_POWER_D0 to the register DP_SET_POWER. The panel vendor says that a NACK in this case is not unexpected and means "not ready, try again". In testing, we found that this panel would respond with a NACK in about 1/25 times. Adding the retry logic worked fine and the most number of tries needed was 3. Just to be safe, we'll add 10 tries here and we'll add a little blurb to the logs if we ever need more than 5. Signed-off-by: Douglas Anderson Tested-By: Steev Klimaszewski Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201002135920.1.I2adbc90b2db127763e2444bd5a4e5bf30e1db8e5@changeid commit 0af0b841c6489b8ef1adea62fca6874bc918d97c Author: Ville Syrjälä Date: Thu Sep 24 21:41:56 2020 +0300 drm/i915: Inline intel_dp_ycbcr420_config() intel_dp_ycbcr420_config() is rather pointless. Just inline it directly into intel_dp_compute_config(). This gets rid of the ugly double assignment of output_format. Not really sure what the best policy would be when the user supplies a mode classified by the display as "YCbCr 4:2:0 only", but we know that we can't do YCbCr 4:2:0 output. For now keep the current behaviour of just silently upgrade it to RGB 4:4:4. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200924184156.24491-3-ville.syrjala@linux.intel.com Reviewed-by: Uma Shankar commit ebde5f89b32a258f15a2d094b02b6de0bbdf5beb Author: Ville Syrjälä Date: Thu Sep 24 21:41:55 2020 +0300 drm/i915: Nuke lspcon_ycbcr420_config() Remove the lspcon special case from intel_dp_compute_config() and just treat it like any other DFP than can do 4:4:4->4:2:0 conversion. The only difference between the two codepaths was that the lspcon code tried to already halve port_clock. That was just total nonsense as we hadn't even computed the base port_clock at that time. All that stuff happens intel_dp_compute_link_config*() and it already takes care of the 4:2:0 clock reduction. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200924184156.24491-2-ville.syrjala@linux.intel.com Reviewed-by: Uma Shankar commit 06fa32846884fa059f87b666dedeb12f900a31c0 Author: Ville Syrjälä Date: Thu Sep 24 21:41:54 2020 +0300 drm/i915: Nuke lspcon_downsampling crtc_state->lspcon_downsampling isn't particularly useful at the moment since we can't even do proper readout for it. Let's get rid of it. Will help with unifying the LSPCON with the regular DFP YCbCr output support. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200924184156.24491-1-ville.syrjala@linux.intel.com Reviewed-by: Uma Shankar commit 2c1e63bab43081f462fa2ea2f9a5eed232876c1e Author: Ville Syrjälä Date: Wed Oct 7 15:03:27 2020 +0300 drm/i915: Mark initial fb obj as WT on eLLC machines to avoid rcu lockup during fbdev init Currently we leave the cache_level of the initial fb obj set to NONE. This means on eLLC machines the first pin_to_display() will try to switch it to WT which requires a vma unbind+bind. If that happens during the fbdev initialization rcu does not seem operational which causes the unbind to get stuck. To most appearances this looks like a dead machine on boot. Avoid the unbind by already marking the object cache_level as WT when creating it. We still do an excplicit ggtt pin which will rewrite the PTEs anyway, so they will match whatever cache level we set. Cc: # v5.7+ Suggested-by: Chris Wilson Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2381 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201007120329.17076-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson commit 4d6bde58a026c5cac263081c572aebe89bf32167 Author: Ville Syrjälä Date: Thu Jul 16 22:04:26 2020 +0300 drm/i915: Apply WAC6entrylatency to kbl/cfl WAC6entrylatency is trying to fix excessive rc6 entry latency caused by the extra delay from FBC_LLC_READ_CTRL, which is there for some extra sync with uncore for frame buffer caching in LLC. Reading through the hsd the recommendation was to set the FBC_LLC_FULLY_OPEN bit to disable this extra delay entirely. This can be done whenever fb LLC caching is not used. The alternative suggestion was to reduce the delay to eg. 0x5 via updated BIOS programming instructions. But all the kbl/cfl machines I've seen still have the default 0xff programmed. As we never use fb LLC caching let's just apply the w/a to all skl derivatives to get consistent rc6 latencies. I was able to measure the effect of FBC_LLC_READ_CTRL to rc6 latency via forcewake. Here's a graph of some of the results: sleep;fw_req=1;wait fw_ack==1;sleep;fw_req=0;wait fw_ack==0 fw_ack==1 duration 160us +----------------------------------------------------------------+ | + + $$+ + + | | $$ $ $ ******$$ ** $ $**$* #########$$######| 140us |-$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*$$$$$$$$$$$$$$$$ $$$$$$| | $ * # | | $ * # | 120us |$+ * # +-| |$ * # | |$ * # # | 100us |$+ ************######################## +-| |$ * *# | |$ ***** ######### | 80us |$+ * # #### ## +-| |$ **** ### # # | | ** #### FBC_LLC_READ_CTRL: 0x8000 ******* | 60us |-###### FBC_LLC_READ_CTRL: 0xffff #######-| |## + + FBC_LLC_READ_CTRL: 0x400000ff $$$$$$$ | +----------------------------------------------------------------+ 0ms 10ms 20ms 30ms 40ms 50ms 60ms sleep duration The default FBC_LLC_READ_CTRL value of 0xff is documented to give us a 170usec delay. That tracks well with the knees at 0xffff->~44msec and 0x8000->~22msec we see in the graph. We can see that if we sleep longer than the FBC_LLC_READ_CTRL delay we always observe the full (~145usec) rc6 wakeup latency. But if we sleep for less than the FBC_LLC_READ_CTRL delay we see a quicker fw wakeup, presumably due the hardware not having yet entered rc6 fully. The other plateaus in the graph I suspect correspond to some shallower internal rc states. v2: s/usec/msec/ typo in commit msg Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200716190426.17047-2-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson commit 693260cf23f95c579558a98af70eb66a8c46b394 Author: Matt Roper Date: Thu Oct 15 15:00:38 2020 -0700 drm/i915/rkl: Add new cdclk table A recent bspec update has provided a new cdclk table for RKL. All of the cdclk values are the same as those we've been using on ICL, TGL, etc., but we obtain them by doubling both the PLL ratio and CD2X divider numbers. Bspec: 49202 Cc: Anusha Srivatsa Signed-off-by: Matt Roper Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20201015220038.271740-1-matthew.d.roper@intel.com commit 1c902de389ff7cd6495e6a51e04b49ab00fca7d3 Author: Guido Günther Date: Tue Oct 13 12:32:48 2020 +0200 dt-binding: display: Require two resets on mantix panel We need to reset both for the panel to show an image. Signed-off-by: Guido Günther Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/15d3dc7eb4e031f380be1298ed3ac9085626f26b.1602584953.git.agx@sigxcpu.org commit 787099f8671c5cec6cadbb3da3713d97df5c7fd6 Author: Guido Günther Date: Tue Oct 13 12:32:47 2020 +0200 drm/panel: mantix: Fix panel reset The mantix panel needs two reset lines (RESX and TP_RSTN) deasserted to output an image. Only deasserting RESX is not enough and the display will stay blank. Deassert in prepare() and assert in unprepare() to keep device held in reset when off. Signed-off-by: Guido Günther Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/ba71a8ab010d263a8058dd4f711e3bcd95877bf2.1602584953.git.agx@sigxcpu.org commit f41b019aa5e05f8172db2e9396b5c2d2602305e2 Author: Guido Günther Date: Tue Oct 13 12:32:46 2020 +0200 drm/panel: mantix: Don't dereference NULL mode Don't dereference mode which was just NULL checked. Signed-off-by: Guido Günther Reported-by: Dan Carpenter Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/659158549f3c6cc1c71ceed0943e760e861c1206.1602584953.git.agx@sigxcpu.org commit 178536b8292ecd118f59d2fac4509c7e70b99854 Author: Chris Wilson Date: Fri Oct 16 10:25:27 2020 +0100 drm/i915: Use the active reference on the vma while capturing During error capture, we need to take a reference to the vma from before the reset in order to catpure the contents of the vma later. Currently we are using both an active reference and a kref, but due to nature of the i915_vma reference handling, that kref is on the vma->obj and not the vma itself. This means the vma may be destroyed as soon as it is idle, that is in between the i915_active_release(&vma->active) and the i915_vma_put(vma): <3> [197.866181] BUG: KASAN: use-after-free in intel_engine_coredump_add_vma+0x36c/0x4a0 [i915] <3> [197.866339] Read of size 8 at addr ffff8881258cb800 by task gem_exec_captur/1041 <3> [197.866467] <4> [197.866512] CPU: 2 PID: 1041 Comm: gem_exec_captur Not tainted 5.9.0-g5e4234f97efba-kasan_200+ #1 <4> [197.866521] Hardware name: Intel Corp. Broxton P/Apollolake RVP1A, BIOS APLKRVPA.X64.0150.B11.1608081044 08/08/2016 <4> [197.866530] Call Trace: <4> [197.866549] dump_stack+0x99/0xd0 <4> [197.866760] ? intel_engine_coredump_add_vma+0x36c/0x4a0 [i915] <4> [197.866783] print_address_description.constprop.8+0x3e/0x60 <4> [197.866797] ? kmsg_dump_rewind_nolock+0xd4/0xd4 <4> [197.866819] ? lockdep_hardirqs_off+0xd4/0x120 <4> [197.867037] ? intel_engine_coredump_add_vma+0x36c/0x4a0 [i915] <4> [197.867249] ? intel_engine_coredump_add_vma+0x36c/0x4a0 [i915] <4> [197.867270] kasan_report.cold.10+0x1f/0x37 <4> [197.867492] ? intel_engine_coredump_add_vma+0x36c/0x4a0 [i915] <4> [197.867710] intel_engine_coredump_add_vma+0x36c/0x4a0 [i915] <4> [197.867949] i915_gpu_coredump.part.29+0x150/0x7b0 [i915] <4> [197.868186] i915_capture_error_state+0x5e/0xc0 [i915] <4> [197.868396] intel_gt_handle_error+0x6eb/0xa20 [i915] <4> [197.868624] ? intel_gt_reset_global+0x370/0x370 [i915] <4> [197.868644] ? check_flags+0x50/0x50 <4> [197.868662] ? __lock_acquire+0xd59/0x6b00 <4> [197.868678] ? register_lock_class+0x1ad0/0x1ad0 <4> [197.868944] i915_wedged_set+0xcf/0x1b0 [i915] <4> [197.869147] ? i915_wedged_get+0x90/0x90 [i915] <4> [197.869371] ? i915_wedged_get+0x90/0x90 [i915] <4> [197.869398] simple_attr_write+0x153/0x1c0 <4> [197.869428] full_proxy_write+0xee/0x180 <4> [197.869442] ? __sb_start_write+0x1f3/0x310 <4> [197.869465] vfs_write+0x1a3/0x640 <4> [197.869492] ksys_write+0xec/0x1c0 <4> [197.869507] ? __ia32_sys_read+0xa0/0xa0 <4> [197.869525] ? lockdep_hardirqs_on_prepare+0x32b/0x4e0 <4> [197.869541] ? syscall_enter_from_user_mode+0x1c/0x50 <4> [197.869566] do_syscall_64+0x33/0x80 <4> [197.869579] entry_SYSCALL_64_after_hwframe+0x44/0xa9 <4> [197.869590] RIP: 0033:0x7fd8b7aee281 <4> [197.869604] Code: c3 0f 1f 84 00 00 00 00 00 48 8b 05 59 8d 20 00 c3 0f 1f 84 00 00 00 00 00 8b 05 8a d1 20 00 85 c0 75 16 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 57 f3 c3 0f 1f 44 00 00 41 54 55 49 89 d4 53 <4> [197.869613] RSP: 002b:00007ffea3b72008 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 <4> [197.869625] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fd8b7aee281 <4> [197.869633] RDX: 0000000000000002 RSI: 00007fd8b81a82e7 RDI: 000000000000000d <4> [197.869641] RBP: 0000000000000002 R08: 0000000000000000 R09: 0000000000000034 <4> [197.869650] R10: 0000000000000000 R11: 0000000000000246 R12: 00007fd8b81a82e7 <4> [197.869658] R13: 000000000000000d R14: 0000000000000000 R15: 0000000000000000 <3> [197.869707] <3> [197.869757] Allocated by task 1041: <4> [197.869833] kasan_save_stack+0x19/0x40 <4> [197.869843] __kasan_kmalloc.constprop.5+0xc1/0xd0 <4> [197.869853] kmem_cache_alloc+0x106/0x8e0 <4> [197.870059] i915_vma_instance+0x212/0x1930 [i915] <4> [197.870270] eb_lookup_vmas+0xe06/0x1d10 [i915] <4> [197.870475] i915_gem_do_execbuffer+0x131d/0x4080 [i915] <4> [197.870682] i915_gem_execbuffer2_ioctl+0x103/0x5d0 [i915] <4> [197.870701] drm_ioctl_kernel+0x1d2/0x270 <4> [197.870710] drm_ioctl+0x40d/0x85c <4> [197.870721] __x64_sys_ioctl+0x10d/0x170 <4> [197.870731] do_syscall_64+0x33/0x80 <4> [197.870740] entry_SYSCALL_64_after_hwframe+0x44/0xa9 <3> [197.870748] <3> [197.870798] Freed by task 22: <4> [197.870865] kasan_save_stack+0x19/0x40 <4> [197.870875] kasan_set_track+0x1c/0x30 <4> [197.870884] kasan_set_free_info+0x1b/0x30 <4> [197.870894] __kasan_slab_free+0x111/0x160 <4> [197.870903] kmem_cache_free+0xcd/0x710 <4> [197.871109] i915_vma_parked+0x618/0x800 [i915] <4> [197.871307] __gt_park+0xdb/0x1e0 [i915] <4> [197.871501] ____intel_wakeref_put_last+0xb1/0x190 [i915] <4> [197.871516] process_one_work+0x8dc/0x15d0 <4> [197.871525] worker_thread+0x82/0xb30 <4> [197.871535] kthread+0x36d/0x440 <4> [197.871545] ret_from_fork+0x22/0x30 <3> [197.871553] <3> [197.871602] The buggy address belongs to the object at ffff8881258cb740 which belongs to the cache i915_vma of size 968 Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2553 Fixes: 2850748ef876 ("drm/i915: Pull i915_vma_pin under the vm->mutex") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Cc: # v5.5+ Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20201016092527.29039-1-chris@chris-wilson.co.uk commit 89db95377be4cc4b895c27e0b5300a410fc076a6 Author: Chris Wilson Date: Thu Oct 15 20:08:16 2020 +0100 drm/i915/gt: Confirm the context survives execution Repeat our sanitychecks from before execution to after execution. One expects that if we were to see these, the gpu would already be on fire, but the timing may be informative. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20201015190816.31763-1-chris@chris-wilson.co.uk commit 6971e07b6b0cf7dd74fb98d97011dbe4546dd2cf Author: Chris Wilson Date: Tue Oct 13 12:08:45 2020 +0100 drm/i915/gt: Cleanup kasan warning for on-stack (unsigned long) casting Kasan is gving a warning for passing a u32 parameter into find_first_bit (casting to a unsigned long *, with appropriate length restrictions): [ 44.678262] BUG: KASAN: stack-out-of-bounds in find_first_bit+0x2e/0x50 [ 44.678295] Read of size 8 at addr ffff888233f4fc30 by task core_hotunplug/474 [ 44.678326] [ 44.678358] CPU: 0 PID: 474 Comm: core_hotunplug Not tainted 5.9.0+ #608 [ 44.678465] Hardware name: BESSTAR (HK) LIMITED GN41/Default string, BIOS BLT-BI-MINIPC-F4G-EX3R110-GA65A-101-D 10/12/2018 [ 44.678500] Call Trace: [ 44.678534] dump_stack+0x84/0xba [ 44.678569] print_address_description.constprop.0+0x21/0x220 [ 44.678605] ? kmsg_dump_rewind_nolock+0x5f/0x5f [ 44.678638] ? _raw_spin_lock_irqsave+0x6d/0xb0 [ 44.678669] ? _raw_write_lock_irqsave+0xb0/0xb0 [ 44.678702] ? set_task_cpu+0x1e0/0x1e0 [ 44.678733] ? find_first_bit+0x2e/0x50 [ 44.678763] kasan_report.cold+0x20/0x42 [ 44.678794] ? find_first_bit+0x2e/0x50 [ 44.678825] __asan_load8+0x69/0x90 [ 44.678856] find_first_bit+0x2e/0x50 [ 44.679027] __caps_show.isra.0+0x9e/0x1f0 [i915] Since we are only using the shorter type for our own convenience, accommodate kasan and use unsigned long. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20201013110845.16127-1-chris@chris-wilson.co.uk commit bb65548e3c6e299175a9e8c3e24b2b9577656a5d Author: Chris Wilson Date: Fri Oct 2 09:34:25 2020 +0100 drm/i915/gt: Undo forced context restores after trivial preemptions We may try to preempt the currently executing request, only to find that after unravelling all the dependencies that the original executing context is still the earliest in the topological sort and re-submitted back to HW (if we do detect some change in the ELSP that requires re-submission). However, due to the way we check for wrap-around during the unravelling, we mark any context that has been submitted just once (i.e. with the rq->wa_tail set, but the ring->tail earlier) as potentially wrapping and requiring a forced restore on resubmission. This was expected to be not a problem, as it was anticipated that most unwinding for preemption would result in a context switch and the few that did not would be lost in the noise. It did not take long for someone to find one particular workload where the cost of those extra context restores was measurable. However, since we know the wa_tail is of fixed size, and we know that a request must be larger than the wa_tail itself, we can safely maintain the check for request wrapping and check against a slightly future point in the ring that includes an expected wa_tail. (That is if the ring->tail is already set to rq->wa_tail, including another 8 bytes in the check does not invalidate the incremental wrap detection.) Fixes: 8ab3a3812aa9 ("drm/i915/gt: Incrementally check for rewinding") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Bruce Chang Cc: Ramalingam C Cc: Joonas Lahtinen Cc: # v5.4+ Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20201002083425.4605-1-chris@chris-wilson.co.uk commit 6ca7217dffaf1abba91558e67a2efb655ac91405 Author: Chris Wilson Date: Thu Oct 15 20:50:23 2020 +0100 drm/i915/gt: Delay execlist processing for tgl When running gem_exec_nop, it floods the system with many requests (with the goal of userspace submitting faster than the HW can process a single empty batch). This causes the driver to continually resubmit new requests onto the end of an active context, a flood of lite-restore preemptions. If we time this just right, Tigerlake hangs. Inserting a small delay between the processing of CS events and submitting the next context, prevents the hang. Naturally it does not occur with debugging enabled. The suspicion then is that this is related to the issues with the CS event buffer, and inserting an mmio read of the CS pointer status appears to be very successful in preventing the hang. Other registers, or uncached reads, or plain mb, do not prevent the hang, suggesting that register is key -- but that the hang can be prevented by a simple udelay, suggests it is just a timing issue like that encountered by commit 233c1ae3c83f ("drm/i915/gt: Wait for CSB entries on Tigerlake"). Also note that the hang is not prevented by applying CTX_DESC_FORCE_RESTORE, or by inserting a delay on the GPU between requests. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Bruce Chang Cc: Joonas Lahtinen Cc: stable@vger.kernel.org Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20201015195023.32346-1-chris@chris-wilson.co.uk commit 5988c2695f4074b44049cd77c4482c0748a8d632 Author: Xu Wang Date: Wed Oct 14 08:57:22 2020 +0000 video: fbdev: sh_mobile_lcdcfb: Remove redundant null check before clk_prepare_enable/clk_disable_unprepare Because clk_prepare_enable() and clk_disable_unprepare() already checked NULL clock parameter, so the additional checks are unnecessary, just remove them. Signed-off-by: Xu Wang Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20201014085722.26069-1-vulab@iscas.ac.cn commit f57074189dfc96500b866f522fb7a7b5d21b2c27 Author: Xu Wang Date: Wed Oct 14 08:49:20 2020 +0000 omapfb/dss: Remove redundant null check before clk_prepare_enable/clk_disable_unprepare Because clk_prepare_enable() and clk_disable_unprepare() already checked NULL clock parameter, so the additional checks are unnecessary, just remove them. Signed-off-by: Xu Wang Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20201014084920.25813-1-vulab@iscas.ac.cn commit a4dbcf4175e5efead0d20315051a0e2708660a36 Author: Michel Thierry Date: Wed Oct 14 12:19:37 2020 -0700 drm/i915/dgfx: define llc and snooping behaviour While we do lack the faster shared LLC, we should still have support for snooping over PCIe. Signed-off-by: Michel Thierry Signed-off-by: Matthew Auld Reviewed-by: Lucas De Marchi Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20201014191937.1266226-11-lucas.demarchi@intel.com commit 5bcc95ca382e764585e36e83e663b99298e00406 Author: Anshuman Gupta Date: Wed Oct 14 12:19:36 2020 -0700 drm/i915/dg1: Update DMC_DEBUG register Update the DMC_DEBUG_DC5 register to its new location and do not try reading the DC6 counter since DG1 doesn't support DC6. v2: Use IS_DGFX() instead of IS_DG1(). Even if not having DC6 is not directly related to DGFX, the register move to a new location is. So in future, if there is one supporting DC6, it would just need to add the other register rather than fixing the case of a wrong register being read (Matt) Cc: Uma Shankar Signed-off-by: Anshuman Gupta Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20201014191937.1266226-10-lucas.demarchi@intel.com commit cbb6ea8c6841f172efcf794bc5b2c70cb3c3f249 Author: Anshuman Gupta Date: Wed Oct 14 12:19:35 2020 -0700 drm/i915/dg1: DG1 does not support DC6 DC6 is not supported on DG1, so change the allowed DC mask for DG1. This is not yet on bspec, but it has been confirmed by HW engineers. Cc: Uma Shankar Signed-off-by: Anshuman Gupta Reviewed-by: Matt Roper Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20201014191937.1266226-9-lucas.demarchi@intel.com commit 488c888ae1d4bb7121a2935b5f46aa65bbd62937 Author: Daniel Vetter Date: Tue Oct 13 13:10:27 2020 +0200 drm/vkms: Switch to shmem helpers Inspired by a patch by Chris Wilson for vgem. Plus this gives us vmap at the gem bo level, which we need for generic fbdev emulation. Luckily shmem also tracks ->vaddr, so we just need to adjust the code all over a bit to make this fit. Also wire up handle_to_fd, dunno why that was missing. v2: - Drop now unused container_of #define (Melissa) - Make sure we keep creating cached objects, this is for testing (Thomas) Signed-off-by: Daniel Vetter Cc: Chris Wilson Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: Rodrigo Siqueira Cc: Melissa Wen Cc: Haneen Mohammed Acked-by: Thomas Zimmermann Reviewed-by: Melissa Wen Link: https://patchwork.freedesktop.org/patch/msgid/20201013111027.375999-1-daniel.vetter@ffwll.ch commit 063bc37d460990f8c9e6358bd6169809df09ccd3 Author: Daniel Vetter Date: Sat Oct 10 01:21:54 2020 +0200 drm/vkms: Set preferred depth correctly The only thing we support is xrgb8888. Acked-by: Thomas Zimmermann Reviewed-by: Melissa Wen Signed-off-by: Daniel Vetter Cc: Rodrigo Siqueira Cc: Melissa Wen Cc: Haneen Mohammed Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201009232156.3916879-1-daniel.vetter@ffwll.ch commit ac80cd17a615e472e3dcff0a5446a58540e64e6d Author: Jianxin Xiong Date: Wed Oct 14 09:16:01 2020 -0700 dma-buf: Clarify that dma-buf sg lists are page aligned The dma-buf API have been used under the assumption that the sg lists returned from dma_buf_map_attachment() are fully page aligned. Lots of stuff can break otherwise all over the place. Clarify this in the documentation and add a check when DMA API debug is enabled. Signed-off-by: Jianxin Xiong Reviewed-by: Christian König Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1602692161-107096-1-git-send-email-jianxin.xiong@intel.com commit da942750928a037d6285b64826a637918f3fe3cc Author: Stuart Summers Date: Wed Oct 14 12:19:34 2020 -0700 drm/i915/dg1: Add initial DG1 workarounds DG1 shares some workarounds with TGL and RKL and also has some additional workarounds of its own. v2: Correct location of Wa_1408615072 (JohnH). v3: Apply WAs 1606700617, 18011464164 and 22010931296 to DG1 (José) v4 (Anusha) - Add Wa_22010271021 - s/Wa_14010096844/Wa_1409836686 v5: - Extend Wa_14010919138 to all revs (Matt Atwood) - Power gate media is global gen12 design. (Rodrigo) - Rebase (Lucas) v6: use REG_BIT() to fix checkpatch warning (Lucas) BSpec: 53508 Cc: Matt Atwood Cc: Matt Roper Cc: Radhakrishna Sripada Cc: José Roberto de Souza Signed-off-by: Stuart Summers Signed-off-by: Anusha Srivatsa Signed-off-by: Rodrigo Vivi Reviewed-by: Lucas De Marchi Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20201014191937.1266226-8-lucas.demarchi@intel.com commit bb4c3cf81ce821559a57f548249505a1fda093d0 Author: Matt Atwood Date: Wed Oct 14 12:19:33 2020 -0700 drm/i915/dg1: Load DMC Add support to load DMC v2.0.2 on DG1 While we're at it, make TGL use the same GEN12 firmware size definition and remove obsolete comment. Bpec: 49230 v2: do not replace GEN12_CSR_MAX_FW_SIZE (from José) and replace stale comment Cc: Matt Roper Signed-off-by: Matt Atwood Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20201014191937.1266226-7-lucas.demarchi@intel.com commit 0dac17af0ab4e55b6b18a762141f255d3eea1e37 Author: Lucas De Marchi Date: Wed Oct 14 12:19:32 2020 -0700 drm/i915/dg1: Enable DPLL for DG1 Add DG1 DPLL Enable register macro and use the macro to enable the correct DPLL based on PLL id. Although we use _MG_PLL1_ENABLE/_MG_PLL2_ENABLE these are rather combo phys. While at it, fix coding style: wrong newlines and use if/else chain v2: Rewrite original patch from Aditya Swarup based on refactors upstream Bspec: 49443, 49206 Cc: Clinton Taylor Cc: Matt Roper Cc: Aditya Swarup Signed-off-by: Lucas De Marchi Reviewed-by: Aditya Swarup Link: https://patchwork.freedesktop.org/patch/msgid/20201014191937.1266226-6-lucas.demarchi@intel.com commit b71b477d9414fda42126fd2c55c5e8fa09347433 Author: Aditya Swarup Date: Wed Oct 14 12:19:31 2020 -0700 drm/i915/dg1: Add and setup DPLLs for DG1 Add entries for dg1 plls and setup dg1_pll_mgr to reuse ICL callbacks. Initial setup for shared dplls DPLL0/1 for DDIA/DDIB and DPLL2/3 for DDI-TC1/DDI-TC2. Configure dpll cfgcrx registers to drive the plls on DG1. v2 (Lucas): Reword commit message and add missing update_ref_clks hook (requested by Matt Roper) Signed-off-by: Aditya Swarup Reviewed-by: Lucas De Marchi Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20201014191937.1266226-5-lucas.demarchi@intel.com commit 049c651b6d93839c74be5cb24708f1d8470ec60d Author: Aditya Swarup Date: Wed Oct 14 12:19:30 2020 -0700 drm/i915/dg1: Add DPLL macros for DG1 DG1 has 4 DPLLs where DPLL0 and DPLL1 drive DDIA/B and DPLL2 and DPLL3 drive DDI-TC1/DDI-TC2. Introduce DG1_DPLL_CFCRx() helper macros to configure DPLL registers. Bspec: 50288, 50299 Cc: Matt Roper Signed-off-by: Aditya Swarup Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20201014191937.1266226-4-lucas.demarchi@intel.com commit 240abb3c76ff4b469f91a753adb8426b77cab914 Author: Lucas De Marchi Date: Wed Oct 14 12:19:29 2020 -0700 drm/i915/dg1: Add DG1 power wells TGL power wells can be re-used for DG1 with the exception of the fake power well for TC_COLD. v2: use logic to skip power wells while copying instead of duplicating the definition of TGL power wells (Matt Roper) Bspec: 49182 Cc: Matt Roper Cc: Anshuman Gupta Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20201014191937.1266226-3-lucas.demarchi@intel.com commit 62277f33e9c16d34f07bc18b8146c4befa92cb69 Author: Lucas De Marchi Date: Wed Oct 14 12:19:28 2020 -0700 drm/i915/cnl: skip PW_DDI_F on certain skus The skus guarded by IS_CNL_WITH_PORT_F() have port F and thus they need those power wells. The others don't have those. Up to now we were just overriding the number of power wells on !IS_CNL_WITH_PORT_F(), relying on those power wells to be the last ones. Now that we have logic in place to skip power wells by id, use it instead. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20201014191937.1266226-2-lucas.demarchi@intel.com commit 9ccd24e9b09164f5ddd9b5a1bea421d8edaa69e7 Author: Aditya Swarup Date: Wed Oct 14 12:19:27 2020 -0700 drm/i915/display: allow to skip certain power wells This allows us to skip power wells on a platform allowing it to re-use the table from another one instead of having to create a new table from scratch that is basically a copy with a few removals. Cc: Imre Deak Suggested-by: Matt Roper Signed-off-by: Aditya Swarup [ Adapt ignore logic to be based on pw id rather than adding a new field, as suggested by Imre ] Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20201014191937.1266226-1-lucas.demarchi@intel.com commit 57b2d834bf235daab388c3ba12d035c820ae09c6 Author: Chris Wilson Date: Thu Oct 15 12:59:54 2020 +0100 drm/i915/gem: Support parsing of oversize batches Matthew Auld noted that on more recent systems (such as the parser for gen9) we may have objects that are larger than expected by the GEM uAPI (i.e. greater than u32). These objects would have incorrect implicit batch lengths, causing the parser to reject them for being incomplete, or worse. Based on a patch by Matthew Auld. Reported-by: Matthew Auld Fixes: 435e8fc059db ("drm/i915: Allow parsing of unsized batches") Testcase: igt/gem_exec_params/larger-than-life-batch Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: Mika Kuoppala Cc: Jon Bloomfield Reviewed-by: Matthew Auld Cc: stable@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20201015115954.871-1-chris@chris-wilson.co.uk commit 73b62cdb93b68d7e2c1d373c6a411bc00c53e702 Author: Zwane Mwaikambo Date: Mon Oct 12 22:59:14 2020 -0700 drm/dp_aux_dev: check aux_dev before use in drm_dp_aux_dev_get_by_minor() I observed this when unplugging a DP monitor whilst a computer is asleep and then waking it up. This left DP chardev nodes still being present on the filesystem and accessing these device nodes caused an oops because drm_dp_aux_dev_get_by_minor() assumes a device exists if it is opened. This can also be reproduced by creating a device node with mknod(1) and issuing an open(2) [166164.933198] BUG: kernel NULL pointer dereference, address: 0000000000000018 [166164.933202] #PF: supervisor read access in kernel mode [166164.933204] #PF: error_code(0x0000) - not-present page [166164.933205] PGD 0 P4D 0 [166164.933208] Oops: 0000 [#1] PREEMPT SMP NOPTI [166164.933211] CPU: 4 PID: 99071 Comm: fwupd Tainted: G W 5.8.0-rc6+ #1 [166164.933213] Hardware name: LENOVO 20RD002VUS/20RD002VUS, BIOS R16ET25W (1.11 ) 04/21/2020 [166164.933232] RIP: 0010:drm_dp_aux_dev_get_by_minor+0x29/0x70 [drm_kms_helper] [166164.933234] Code: 00 0f 1f 44 00 00 55 48 89 e5 41 54 41 89 fc 48 c7 c7 60 01 a4 c0 e8 26 ab 30 d7 44 89 e6 48 c7 c7 80 01 a4 c0 e8 47 94 d6 d6 <8b> 50 18 49 89 c4 48 8d 78 18 85 d2 74 33 8d 4a 01 89 d0 f0 0f b1 [166164.933236] RSP: 0018:ffffb7d7c41cbbf0 EFLAGS: 00010246 [166164.933237] RAX: 0000000000000000 RBX: ffff8a90001fe900 RCX: 0000000000000000 [166164.933238] RDX: 0000000000000000 RSI: 0000000000000003 RDI: ffffffffc0a40180 [166164.933239] RBP: ffffb7d7c41cbbf8 R08: 0000000000000000 R09: ffff8a93e157d6d0 [166164.933240] R10: 0000000000000000 R11: ffffffffc0a40188 R12: 0000000000000003 [166164.933241] R13: ffff8a9402200e80 R14: ffff8a90001fe900 R15: 0000000000000000 [166164.933244] FS: 00007f7fb041eb00(0000) GS:ffff8a9411500000(0000) knlGS:0000000000000000 [166164.933245] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [166164.933246] CR2: 0000000000000018 CR3: 00000000352c2003 CR4: 00000000003606e0 [166164.933247] Call Trace: [166164.933264] auxdev_open+0x1b/0x40 [drm_kms_helper] [166164.933278] chrdev_open+0xa7/0x1c0 [166164.933282] ? cdev_put.part.0+0x20/0x20 [166164.933287] do_dentry_open+0x161/0x3c0 [166164.933291] vfs_open+0x2d/0x30 [166164.933297] path_openat+0xb27/0x10e0 [166164.933306] ? atime_needs_update+0x73/0xd0 [166164.933309] do_filp_open+0x91/0x100 [166164.933313] ? __alloc_fd+0xb2/0x150 [166164.933316] do_sys_openat2+0x210/0x2d0 [166164.933318] do_sys_open+0x46/0x80 [166164.933320] __x64_sys_openat+0x20/0x30 [166164.933328] do_syscall_64+0x52/0xc0 [166164.933336] entry_SYSCALL_64_after_hwframe+0x44/0xa9 (gdb) disassemble drm_dp_aux_dev_get_by_minor+0x29 Dump of assembler code for function drm_dp_aux_dev_get_by_minor: 0x0000000000017b10 <+0>: callq 0x17b15 0x0000000000017b15 <+5>: push %rbp 0x0000000000017b16 <+6>: mov %rsp,%rbp 0x0000000000017b19 <+9>: push %r12 0x0000000000017b1b <+11>: mov %edi,%r12d 0x0000000000017b1e <+14>: mov $0x0,%rdi 0x0000000000017b25 <+21>: callq 0x17b2a 0x0000000000017b2a <+26>: mov %r12d,%esi 0x0000000000017b2d <+29>: mov $0x0,%rdi 0x0000000000017b34 <+36>: callq 0x17b39 0x0000000000017b39 <+41>: mov 0x18(%rax),%edx <========= 0x0000000000017b3c <+44>: mov %rax,%r12 0x0000000000017b3f <+47>: lea 0x18(%rax),%rdi 0x0000000000017b43 <+51>: test %edx,%edx 0x0000000000017b45 <+53>: je 0x17b7a 0x0000000000017b47 <+55>: lea 0x1(%rdx),%ecx 0x0000000000017b4a <+58>: mov %edx,%eax 0x0000000000017b4c <+60>: lock cmpxchg %ecx,(%rdi) 0x0000000000017b50 <+64>: jne 0x17b76 0x0000000000017b52 <+66>: test %edx,%edx 0x0000000000017b54 <+68>: js 0x17b6d 0x0000000000017b56 <+70>: test %ecx,%ecx 0x0000000000017b58 <+72>: js 0x17b6d 0x0000000000017b5a <+74>: mov $0x0,%rdi 0x0000000000017b61 <+81>: callq 0x17b66 0x0000000000017b66 <+86>: mov %r12,%rax 0x0000000000017b69 <+89>: pop %r12 0x0000000000017b6b <+91>: pop %rbp 0x0000000000017b6c <+92>: retq 0x0000000000017b6d <+93>: xor %esi,%esi 0x0000000000017b6f <+95>: callq 0x17b74 0x0000000000017b74 <+100>: jmp 0x17b5a 0x0000000000017b76 <+102>: mov %eax,%edx 0x0000000000017b78 <+104>: jmp 0x17b43 0x0000000000017b7a <+106>: xor %r12d,%r12d 0x0000000000017b7d <+109>: jmp 0x17b5a End of assembler dump. (gdb) list *drm_dp_aux_dev_get_by_minor+0x29 0x17b39 is in drm_dp_aux_dev_get_by_minor (drivers/gpu/drm/drm_dp_aux_dev.c:65). 60 static struct drm_dp_aux_dev *drm_dp_aux_dev_get_by_minor(unsigned index) 61 { 62 struct drm_dp_aux_dev *aux_dev = NULL; 63 64 mutex_lock(&aux_idr_mutex); 65 aux_dev = idr_find(&aux_idr, index); 66 if (!kref_get_unless_zero(&aux_dev->refcount)) 67 aux_dev = NULL; 68 mutex_unlock(&aux_idr_mutex); 69 (gdb) p/x &((struct drm_dp_aux_dev *)(0x0))->refcount $8 = 0x18 Looking at the caller, checks on the minor are pushed down to drm_dp_aux_dev_get_by_minor() static int auxdev_open(struct inode *inode, struct file *file) { unsigned int minor = iminor(inode); struct drm_dp_aux_dev *aux_dev; aux_dev = drm_dp_aux_dev_get_by_minor(minor); <==== if (!aux_dev) return -ENODEV; file->private_data = aux_dev; return 0; } Fixes: e94cb37b34eb ("drm/dp: Add a drm_aux-dev module for reading/writing dpcd registers.") Cc: # v4.6+ Signed-off-by: Zwane Mwaikambo Reviewed-by: Lyude Paul [added Cc to stable] Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/alpine.DEB.2.21.2010122231070.38717@montezuma.home commit ff72bc40317079b775a7a6d2ba94297b04b795e4 Author: Mihir Bhogilal Patel Date: Thu Oct 8 15:46:38 2020 +0530 drm/amdgpu: Add debugfs entry for printing VM info Create new debugfs entry to print memory info using VM buffer objects. V2: Added Common function for printing BO info. Dump more VM lists for evicted, moved, relocated, invalidated. Removed dumping VM mapped BOs. V3: Fixed coding style comments, renamed print API and variables. V4: Fixed coding style comments. Signed-off-by: Mihir Bhogilal Patel Reviewed-by: Christian König Signed-off-by: Alex Deucher commit ded08454e56b70186bff74374d31f57a90cb497f Author: Evan Quan Date: Thu Oct 15 14:57:46 2020 +0800 drm/amdgpu: correct the gpu reset handling for job != NULL case Current code wrongly treat all cases as job == NULL. Signed-off-by: Evan Quan Reviewed-and-tested-by: Jane Jian Signed-off-by: Alex Deucher commit 5bab858eee046fb76cb516a4cac976abf922647a Author: Likun Gao Date: Wed Sep 30 14:34:08 2020 +0800 drm/amdgpu: add rlc iram and dram firmware support Support to load RLC iram and dram ucode when RLC firmware struct use v2.2 Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 5fe19ce8e48d11de2932bb38fc6eba10faae4fd0 Author: Likun Gao Date: Wed Oct 14 14:05:18 2020 +0800 drm/amdgpu: add function to program pbb mode for sienna cichlid Add function for sienna_cichlid to force PBB workload mode to zero by checking whether there have SE been harvested. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 9294fa6a1d94e48a015b40ae277f2928efea0590 Author: Jiansong Chen Date: Thu Oct 15 10:42:58 2020 +0800 Revert "drm/amdgpu: disable gfxoff temporarily for navy_flounder" This reverts commit 39ad082459373facaa255b0791595d018597a164. TDR issue has been resovled by pmfw update. Signed-off-by: Jiansong Chen Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 76c71f00d7eb1aaf6c3c3bb4c9f86c91fbf866ec Author: Evan Quan Date: Tue Oct 13 14:17:29 2020 +0800 drm/amd/pm: properly setting GPO feature on UMD pstate entering/exiting Disable/enable the GPO feature on UMD pstate entering/exiting. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 27747293ce24d6900614ae7a1075a1cfd38a32c3 Author: Evan Quan Date: Tue Aug 18 17:58:06 2020 +0800 drm/amdgpu: fulfill Navi gfx and pcie settings on umd pstate switching(V2) Fulfill Navi gfx and pcie settings on umd pstate switching. V2: temporarily skip the pcie ASPM setting considering the ASPM function is not fully enabled yet Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 3e66275e0946c1c11b1f130e3e82b41733276022 Author: Evan Quan Date: Tue Aug 18 17:10:48 2020 +0800 drm/amdgpu: add interface for setting MGCG perfmon Enable Navi1X MGCG perfmon setting. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit f1213b15976881db82d1dcb36e19646d09b0220f Author: Evan Quan Date: Tue Aug 18 16:50:44 2020 +0800 drm/amdgpu: add interface for setting ASPM Support NAVI10 ASPM setting. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit f2b75bc24dee364f7c251539a9bc0d1730efee8b Author: Evan Quan Date: Tue Aug 18 12:43:25 2020 +0800 drm/amd/pm: correct gfx and pcie settings on umd pstate switching(V2) For entering UMD stable Pstate, the operations to enter rlc_safe mode, disable mgcg_perfmon and disable PCIE aspm are needed. And the opposite operations should be performed on UMD stable Pstate exiting. V2: take those ASICs(CI/SI/VI) which may not support this into consideration Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 585584dbaa47e814addb8a41bddbc2c303173bad Author: Evan Quan Date: Sat Oct 10 09:58:41 2020 +0800 drm/amd/pm: populate Arcturus PCIE link state Populate current link speed, width and clock domain frequency. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 7d92c1fd11e247f4b9200c45ad810204e34872a8 Author: Evan Quan Date: Sat Oct 10 09:36:02 2020 +0800 drm/amd/pm: populate the bootup LCLK frequency As for other clock domains. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 72ca82c7d218ed57c9ce2dd5acd6d51524b920fc Author: Huang Rui Date: Wed Oct 14 22:12:02 2020 +0800 drm/amdgpu: disable gpa mode for direct loading This patch fixes the gfx hang while use firmware direct loading mode. Signed-off-by: Huang Rui Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 234de272b76fedaf71ffe40f8e80212c8d32cc23 Author: Tom Rix Date: Wed Oct 14 14:18:06 2020 -0700 drm/amdgpu: add missing newline at eof Representative checkpatch.pl warning WARNING: adding a line without newline at end of file 30: FILE: drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.h:30: +#endif Signed-off-by: Tom Rix Signed-off-by: Alex Deucher commit a04ac827366594c7244f60e9be79fcb404af69f0 Author: Chris Wilson Date: Thu Oct 15 13:21:38 2020 +0100 drm/i915/gt: Fixup tgl mocs for PTE tracking Forcing mocs:1 [used for our winsys follows-pte mode] to be cached caused display glitches. Though it is documented as deprecated (and so likely behaves as uncached) use the follow-pte bit and force it out of L3 cache. Fixes: 4d8a5cfe3b13 ("drm/i915/gt: Initialize reserved and unspecified MOCS indices") Testcase: igt/kms_frontbuffer_tracking Testcase: igt/kms_big_fb Signed-off-by: Chris Wilson Cc: Ayaz A Siddiqui Cc: Lucas De Marchi Cc: Matt Roper Cc: Ville Syrjälä Cc: Joonas Lahtinen Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201015122138.30161-4-chris@chris-wilson.co.uk commit c0888e9e22623972a8468cd18f4b5b7c6db040ee Author: Ville Syrjälä Date: Thu Oct 15 13:21:37 2020 +0100 drm/i915: Enable eLLC caching of display buffers for SKL+ Since SKL the eLLC has been sitting on the far side of the system agent, meaning the display engine can utilize it. Let's enable that. I chose WB for the caching mode, because my numbers are indicating that WT might actually be WB and WC might actually be UC. I'm not 100% sure that is indeed the case but at least my simple rendercopy based benchmark didn't see any difference in performance. Also if I configure things to do LLCeLLC+WT I still get cache dirt on my screen, suggesting that is in fact operating in WB mode anyway. This is also the reason I had to fix the MOCS target cache to really say PTE rather than LLC+eLLC. Since SKL the eLLC has been sitting on the far side of the system agent, meaning the display engine can utilize it. Let's enable that. Eero's earlier benchmarks numbers: "* Results in GfxBench and Unigine (Valley/Heaven) tests were within daily variation on the tested SKL machines * SKL GT4e (128MB eLLC) / Wayland / Weston: +15-20% SynMark TexMem512 (512MB of textures) +4-6% SynMark TerrainFly*, CSCloth, ShMapVsm -5-10% SynMark TexMem128 (128MB of textures) * SKL GT3e (64MB eLLC) / Xorg / Unity: +4-8% GpuTest Triangle fullscreen (FullHD) -5-10% GpuTest Triangle windowed (1/2 screen) * SKL GT2 (no eLLC) / Xorg / Unity: * Some of the higher FPS SynMark pixel and vertex shader tests are few percent higher, more than daily variance => Do you see any reason why this machine would be impacted although it doesn't eLLC?" Caveats: - Still haven't tested with a prime setup - Still not entirely sure this a good idea, but I've been using it on my cfl anyway :) v2: Split the MOCS PTE change out Cc: Eero Tamminen Reviewed-by: Chris Wilson Signed-off-by: Ville Syrjälä Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20201007120329.17076-3-ville.syrjala@linux.intel.com Link: https://patchwork.freedesktop.org/patch/msgid/20201015122138.30161-3-chris@chris-wilson.co.uk commit 36b6b6816989cf6f468eea82694e83211a066fa4 Author: Ville Syrjälä Date: Thu Oct 15 13:21:36 2020 +0100 drm/i915: Fix MOCS PTE setting for gen9+ Fix up the MOCS PTE setting to really get the LLC cacheability from the PTE rather than hardocoding it to LLC or LLC+eLLC. Signed-off-by: Ville Syrjälä Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20201007120329.17076-2-ville.syrjala@linux.intel.com Link: https://patchwork.freedesktop.org/patch/msgid/20201015122138.30161-2-chris@chris-wilson.co.uk commit d46b60a2e8d246f1f0faa38e52f4f5a73858c338 Author: Ville Syrjälä Date: Thu Oct 15 13:21:35 2020 +0100 drm/i915: Mark ininitial fb obj as WT on eLLC machines to avoid rcu lockup during fbdev init Currently we leave the cache_level of the initial fb obj set to NONE. This means on eLLC machines the first pin_to_display() will try to switch it to WT which requires a vma unbind+bind. If that happens during the fbdev initialization rcu does not seem operational which causes the unbind to get stuck. To most appearances this looks like a dead machine on boot. Avoid the unbind by already marking the object cache_level as WT when creating it. We still do an excplicit ggtt pin which will rewrite the PTEs anyway, so they will match whatever cache level we set. Cc: # v5.7+ Suggested-by: Chris Wilson Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2381 Signed-off-by: Ville Syrjälä Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20201007120329.17076-1-ville.syrjala@linux.intel.com Link: https://patchwork.freedesktop.org/patch/msgid/20201015122138.30161-1-chris@chris-wilson.co.uk commit ce65b874001d756294e0b7cf06c51137af964f38 Author: Christian König Date: Wed Sep 30 16:44:16 2020 +0200 drm/ttm: nuke caching placement flags Changing the caching on the fly never really worked flawlessly. So stop this completely and just let drivers specific the desired caching in the tt or bus object. Signed-off-by: Christian König Reviewed-by: Michael J. Ruhl Link: https://patchwork.freedesktop.org/patch/394256/ commit 867bcecd6ae4632e3faf38d381dd5a697b9503d1 Author: Christian König Date: Wed Sep 30 15:56:53 2020 +0200 drm/ttm: use caching instead of placement for ttm_io_prot Instead of the placement flags use the caching of the bus mapping or tt object for the page protection flags. Signed-off-by: Christian König Reviewed-by: Michael J. Ruhl Link: https://patchwork.freedesktop.org/patch/394255/ commit 1cf65c45183a6c8b4703675d40e709f7ffed935c Author: Christian König Date: Wed Sep 30 11:17:44 2020 +0200 drm/ttm: add caching state to ttm_bus_placement And implement setting it up correctly in the drivers. This allows getting rid of the placement flags for this. Signed-off-by: Christian König Reviewed-by: Michael J. Ruhl Link: https://patchwork.freedesktop.org/patch/394254/ commit 1b4ea4c5980ff3a64607166298269c30a9671d33 Author: Christian König Date: Wed Sep 30 10:38:48 2020 +0200 drm/ttm: set the tt caching state at creation time All drivers can determine the tt caching state at creation time, no need to do this on the fly during every validation. Signed-off-by: Christian König Reviewed-by: Michael J. Ruhl Link: https://patchwork.freedesktop.org/patch/394253/ commit 070c7fa58bce986eb7a504390dd429edcb068f44 Author: Sumit Semwal Date: Wed Sep 2 12:14:07 2020 +0530 drm: panel: Add novatek nt36672a panel driver Novatek NT36672a is a generic DSI IC that drives command and video mode panels. Add the driver for it. Right now adding support for some Poco F1 phones that have an LCD panel from Tianma connected with this IC, with a resolution of 1080x2246 that operates in DSI video mode. During testing, Benni Steini helped us fix the reset sequence timing (from 10ms to 20ms), to get the bootanimation to work on Android. With current AOSP, we need to increase it to 200ms - this seems to be a safe high value to avoid a white screen occasionally. Signed-off-by: Sumit Semwal Cc: Benni Steini Reviewed-by: Bjorn Andersson Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200902064407.30712-3-sumit.semwal@linaro.org commit 9528a02430dfd4e8931578cee572203fc262c63b Author: Sumit Semwal Date: Wed Sep 2 12:14:06 2020 +0530 dt-bindings: display: panel: Add bindings for Novatek nt36672a Novatek nt36672a is a display driver IC that can drive DSI panel. It is also present in the Tianma video mode panel, which is a FHD+ panel with a resolution of 1080x2246 and 6.18 inches size. It is found in some of the Poco F1 phones. This patch adds the display driver for the IC, with support added for this tianma fhd video mode panel. Signed-off-by: Sumit Semwal Reviewed-by: Rob Herring Reviewed-by: Bjorn Andersson Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200902064407.30712-2-sumit.semwal@linaro.org commit bdb4a1f9ed3ba7ea79a77e9e0164de0d3cdc75fb Author: Alex Deucher Date: Wed Oct 14 13:39:39 2020 -0400 drm/amdgpu/display: DRM_AMD_DC_DCN3_02 depends on DRM_AMD_DC_DCN3_01 Fix this to avoid build problems if DRM_AMD_DC_DCN3_02 is defined, but DRM_AMD_DC_DCN3_01 is not. Fixes: 36d26912e8d854 ("drm/amd/display: Add support for DCN302 (v2)") Acked-by: Nirmoy Das Acked-by: Randy Dunlap Reported-by: Randy Dunlap Signed-off-by: Alex Deucher commit 185b0d5a787ff9c190aae059bfba35e3c4219326 Author: Kent Russell Date: Wed Oct 14 07:47:32 2020 -0400 drm/amdkfd: Use kvfree in destroy_crat_image Now that we use kvmalloc for the crat_image, we need to use kvfree when we destroy this. Fixes: d0e63b343e575e ("drm/amdkfd: Use kvmalloc instead of kmalloc for VCRAT") Reported-by: Morris Zhang Signed-off-by: Kent Russell Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 56380c388c6a4efb0e308bb5cd597e665f58224f Author: Veerabadhran G Date: Thu Oct 8 22:30:02 2020 +0530 drm/amdgpu: vcn and jpeg ring synchronization Synchronize the ring usage for vcn1 and jpeg1 to workaround a hardware bug. Signed-off-by: Veerabadhran Gopalakrishnan Acked-by: Christian König Reviewed-by: Christian König Signed-off-by: Alex Deucher commit f099471bc5941a1cfe7b6d4cdf77028ead6c7866 Author: Hawking Zhang Date: Wed Sep 30 23:13:28 2020 +0800 drm/amdgpu: enable GDDR6 save-restore support for dimgrey_cavefish add mp0 11_0_12 for dimgrey_cavefish to the mem training supported list, otherwise the modeprobe would fail on dimgrey_cavefish with latest vbios. Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 4d5af9b7ad6fa4da93191e6d09884d86e39f8467 Author: Huang Rui Date: Tue Oct 13 19:19:31 2020 +0800 drm/amdgpu: fix the issue that apu has no smu firmware binary The driver needn't load smu binary on APU platforms. Signed-off-by: Huang Rui Reviewed-by: Kevin Wang Reviewed-by: Madhav Chauhan Signed-off-by: Alex Deucher commit 4460571beef46d17fcf5f8cfdefc2f59586c645f Author: Evan Quan Date: Wed Sep 2 16:10:10 2020 +0800 drm/amd/pm: increase mclk switch threshold to 200 us To avoid underflow seen on Polaris10 with some 3440x1440 144Hz displays. As the threshold of 190 us cuts too close to minVBlankTime of 192 us. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 23aaf8058a8d1b191a976fc3648c3a18effc75f7 Author: Mauro Carvalho Chehab Date: Tue Oct 13 13:54:20 2020 +0200 docs: amdgpu: fix a warning when building the documentation As reported by Sphinx: Documentation/gpu/amdgpu.rst:200: WARNING: Inline emphasis start-string without end-string. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Alex Deucher commit 8d8ac1a1e95ade1357aebe5b777beea88e49e861 Author: Mauro Carvalho Chehab Date: Tue Oct 13 13:54:27 2020 +0200 drm/amd/display: kernel-doc: document force_timing_sync As warned when running "make htmldocs": ./drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h:345: warning: Function parameter or member 'force_timing_sync' not described in 'amdgpu_display_manager' This new struct member was not documented at kernel-doc markup. Fixes: 3d4e52d0cf24 ("drm/amd/display: Add debugfs for forcing stream timing sync") Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Alex Deucher commit 4fbb3ae219d2da0e21352c4eb1af6269b832ac10 Author: Bernard Zhao Date: Mon Oct 12 04:46:16 2020 -0700 drm/amd/display: remove no need return value Functions (disable_all_writeback_pipes_for_stream & dc_enable_stereo & dc_post_update_surfaces_to_stream) always return true, there is no need to keep the return value. This change is to make the code a bit more readable. Signed-off-by: Bernard Zhao Signed-off-by: Alex Deucher commit 206b737240c36d3f1ddc7a1a68f13e59ad071022 Author: kernel test robot Date: Tue Oct 13 05:20:49 2020 +0800 drm/amdgpu: fix semicolon.cocci warnings drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c:608:2-3: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Fixes: b4a7db71ea06 ("drm/amdgpu: add per device user friendly xgmi events for vega20") CC: Jonathan Kim Signed-off-by: kernel test robot Signed-off-by: Alex Deucher commit cde3359acb42074b090971e287449cb9e7467cdc Author: Alex Deucher Date: Mon Oct 12 10:12:28 2020 -0400 drm/amdgpu/swsmu: init the baco mutex in early_init GPU reset might get called during init time, before sw_init has been called. Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 24ea098b7c0d80b56d62a200608e0b029056baf6 Author: Tejas Upadhyay Date: Wed Oct 14 00:59:48 2020 +0530 drm/i915/jsl: Split EHL/JSL platform info and PCI ids Recently we came across requirement to identify EHL and JSL platform to program them differently. Thus Split the basic platform definition, macros, and PCI IDs to differentiate between EHL and JSL platforms. Also, IS_ELKHARTLAKE is replaced with IS_JSL_EHL everywhere. Changes since V1 : - Rebased to avoid merge conflicts - Added missed check for jasperlake in intel_uc_fw.c Cc : Matt Roper Cc : Ville Syrjälä Signed-off-by: Tejas Upadhyay Reviewed-by: Matt Roper Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20201013192948.63470-1-tejaskumarx.surendrakumar.upadhyay@intel.com commit 412ae84cb4dd2bd1cccbeb996fee47cf4d80a3ad Author: Andy Shevchenko Date: Tue Oct 13 16:27:14 2020 +0300 drm/virtio: Use UUID API for importing the UUID There is import_uuid() function which imports u8 array to the uuid_t. Use it instead of open coding variant. This allows to hide the uuid_t internals. Reviewed-by: David Stevens Signed-off-by: Andy Shevchenko Link: http://patchwork.freedesktop.org/patch/msgid/20201013132714.70973-1-andriy.shevchenko@linux.intel.com Signed-off-by: Gerd Hoffmann commit 8bca49e43fb5994bd2a03f3f114cf89bc6f87a14 Author: Andy Shevchenko Date: Wed Apr 22 15:51:55 2020 +0300 drm: shmobile: Reduce include dependencies This file doesn't need anything provided by . All it needs are some types, which are provided by . Drop unneeded completely. Signed-off-by: Andy Shevchenko Reviewed-by: Laurent Pinchart Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20200422125201.37618-1-andriy.shevchenko@linux.intel.com commit 4d8a5cfe3b131f60903949f998c5961cc922e0b0 Author: Ayaz A Siddiqui Date: Wed Jul 29 15:55:39 2020 +0530 drm/i915/gt: Initialize reserved and unspecified MOCS indices In order to avoid functional breakage of mis-programmed applications that have grown to depend on unused MOCS entries, we are programming those entries to be equal to fully cached ("L3 + LLC") entry. These reserved and unspecified entries should not be used as they may be changed to less performant variants with better coherency in the future if more entries are needed. v2: As suggested by Lucas De Marchi to utilise __init_mocs_table for programming default value, setting I915_MOCS_PTE index of tgl_mocs_table with desired value. Cc: Chris Wilson Cc: Lucas De Marchi Cc: Tomasz Lis Cc: Matt Roper Cc: Joonas Lahtinen Cc: Francisco Jerez Cc: Mathew Alwin Cc: Mcguire Russell W Cc: Spruit Neil R Cc: Zhou Cheng Cc: Benemelis Mike G Signed-off-by: Ayaz A Siddiqui Reviewed-by: Lucas De Marchi Acked-by: Joonas Lahtinen Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200729102539.134731-2-ayaz.siddiqui@intel.com Cc: stable@vger.kernel.org commit a4e45e5d3097c2213802823794f845acb51e8bc7 Author: Maxime Ripard Date: Fri Oct 9 09:49:52 2020 +0200 MAINTAINERS: Add myself as a maintainer for vc4 Eric isn't working on vc4 anymore and I've been working on it, as well as merging patches for it, recently so let's make it official so I don't miss patches. Signed-off-by: Maxime Ripard Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20201009074952.11345-1-maxime@cerno.tech commit 57222a1be27e06ecb81cc2f945e897814d5f461c Author: Andy Shevchenko Date: Wed Apr 22 16:00:47 2020 +0300 tee: optee: Use UUID API for exporting the UUID There is export_uuid() function which exports uuid_t to the u8 array. Use it instead of open coding variant. This allows to hide the uuid_t internals. Reviewed-by: Sumit Garg Signed-off-by: Andy Shevchenko Signed-off-by: Jens Wiklander commit 055f8458d95a38c20e8360634255f684378179eb Author: Aaron Ma Date: Fri Oct 9 16:57:50 2020 +0800 drm/i915: Force DPCD backlight mode for BOE 2270 panel BOE 2270 panel failed to control backlight brightness. Add it in edid quirks to force using DPCD backlight control. Then the brightness can be controlled. Signed-off-by: Aaron Ma Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20201009085750.88490-2-aaron.ma@canonical.com commit 98e497e203a58b6419e20a8f820c8fd8c50e8da7 Author: Aaron Ma Date: Fri Oct 9 16:57:49 2020 +0800 drm/i915/dpcd_bl: uncheck PWM_PIN_CAP when detect eDP backlight capabilities BOE panel with ID 2270 claims both PWM_PIN_CAP and AUX_SET_CAP backlight control bits, but default chip backlight failed to control brightness. Check AUX_SET_CAP and proceed to check quirks or VBT backlight type. DPCD can control the brightness of this pannel. Signed-off-by: Aaron Ma Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20201009085750.88490-1-aaron.ma@canonical.com commit 4ade8f31c25bef7ce7ed4d7cbac17df7c4bad850 Author: Sean Paul Date: Thu Sep 17 20:28:42 2020 -0400 drm/i915/dp: Tweak initial dpcd backlight.enabled value In commit 79946723092b ("drm/i915: Assume 100% brightness when not in DPCD control mode"), we fixed the brightness level when DPCD control was not active to max brightness. This is as good as we can guess since most backlights go on full when uncontrolled. However in doing so we changed the semantics of the initial 'backlight.enabled' value. At least on Pixelbooks, they were relying on the brightness level in DP_EDP_BACKLIGHT_BRIGHTNESS_MSB to be 0 on boot such that enabled would be false. This causes the device to be enabled when the brightness is set. Without this, brightness control doesn't work. So by changing brightness to max, we also flipped enabled to be true on boot. To fix this, make enabled a function of brightness and backlight control mechanism. Fixes: 79946723092b ("drm/i915: Assume 100% brightness when not in DPCD control mode") Cc: Lyude Paul Cc: Jani Nikula Cc: Juha-Pekka Heikkila Cc: "Ville Syrjälä" Cc: Rodrigo Vivi Cc: Kevin Chowski > Signed-off-by: Sean Paul Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200918002845.32766-1-sean@poorly.run commit 71c0fd9221a4f79e018ffb82f9e5707d8f49a71d Author: Roman Li Date: Thu Oct 8 13:32:47 2020 -0400 drm/amd/display: Add green_sardine support to DM Display Manager support for green_sardine Signed-off-by: Roman Li Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 9ba93114c48f58164d27f7b2b18fc7a0d731204f Author: Roman Li Date: Thu Oct 8 13:28:41 2020 -0400 drm/amd/display: Add green_sardine support to DC Display Core support for green_sardine Signed-off-by: Roman Li Acked-by: Hersen Wu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 7cc656e2d070b149296fe0c73ba8da3e4c5395ef Author: Tao Zhou Date: Sat Oct 10 15:45:35 2020 +0800 drm/amdgpu: add DM block for dimgrey_cavefish Add DM block support for dimgrey_cavefish. Signed-off-by: Tao Zhou Reviewed-by: Jack Gui Signed-off-by: Alex Deucher commit 78aafee761ab001ff66532d527b47c3609d0ac7f Author: Tao Zhou Date: Sat Oct 10 15:42:46 2020 +0800 drm/amdgpu: remove ASD ucode init for dimgrey_cavefish dimgrey_cavefish has no ASD ucode currently, remove its initialization. Signed-off-by: Tao Zhou Reviewed-by: Jack Gui Signed-off-by: Alex Deucher commit 2a4112050451d0e7aeef526493ebb488279b81da Author: Bhawanpreet Lakha Date: Fri Sep 25 14:00:24 2020 -0400 drm/amd/display: Add DCN302 support in amdgpu_dm (v2) Handle CAVE_DIMGREY_CAVEFISH in amdgpu_dm v2: fix rebase typo (Alex) Signed-off-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 36d26912e8d854853e3cdb300664db274a6636cf Author: Bhawanpreet Lakha Date: Tue Sep 29 14:52:09 2020 -0400 drm/amd/display: Add support for DCN302 (v2) - add DCN302 resource, irq service, dmub loader, - handle DC_VERSION_DCN_3_02 - define DCN302 power gating functions - handle DCN302 in GPIO files - define I2C regs - add CONFIG_DRM_AMD_DC_DCN3_02 guard v2: rebase fixes (Alex) Signed-off-by: Joshua Aberback Signed-off-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 4da678390890c7cf99e068ecd9d7ee5bf0d5290b Author: Tao Zhou Date: Sun Sep 27 16:25:27 2020 +0800 drm/amdgpu/swsmu: update driver if version for dimgrey_cavefish Per PMFW 59.7.0. Signed-off-by: Tao Zhou Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit eac88a5fc63166917278a085e50039d1dd04c9a3 Author: Tao Zhou Date: Fri Oct 9 18:39:48 2020 -0400 drm/amdgpu: remove gpu_info fw support for dimgrey_cavefish Remove gpu_info fw support for dimgrey_cavefish, gpu info can be got from ip discovery. Signed-off-by: Tao Zhou Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit 8e3bfb992c1bcddcf99910c9fea40a9d9c6c62e6 Author: Tao Zhou Date: Mon Aug 10 17:48:34 2020 +0800 drm/amdgpu: enable ih CG for dimgrey_cavefish Set ih CG flag for dimgrey_cavefish. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 2c70c332a1db3cade8d189ced3e56fb1197d0370 Author: Tao Zhou Date: Mon Aug 10 17:46:17 2020 +0800 drm/amdgpu: enable hdp CG and LS for dimgrey_cavefish Set hdp CG and LS flag for dimgrey_cavefish. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit aff39cdecd225c2a1632785ede61efaedb6c0535 Author: Tao Zhou Date: Thu Jun 4 15:20:39 2020 +0800 drm/amdgpu: add psp and smu block for dimgrey_cavefish Add psp and smu block for dimgrey_cavefish with psp firmware load type. Signed-off-by: Tao Zhou Reviewed-by:Hawking Zhang Signed-off-by: Alex Deucher commit 7dc2ef4e70e12bfbbeb8d08820b048b440e98467 Author: Tao Zhou Date: Fri Oct 2 13:54:34 2020 -0400 drm/amdgpu/swsmu: update driver if version for dimgrey_cavefish(v2) Per PMFW 59.5.0. v2: refine subject and commit message, fix typo Signed-off-by: Tao Zhou Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit 4ccc957f1511e5e0ebb112ceed38fe0e4c5653bc Author: Tao Zhou Date: Fri Oct 2 13:53:49 2020 -0400 drm/amdgpu/swsmu: update driver if version for dimgrey_cavefish Update driver if version from 0x5 to 0x6 for dimgrey_cavefish, per PMFW 59.04.0. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit be6b1cd3b7e4b12b5d81f110968674825868610f Author: James Zhu Date: Thu Jul 23 12:58:12 2020 -0400 drm/amdgpu: enable jpeg3.0 for dimgrey_cavefish Enable jpeg3.0 ip block for dimgrey_cavefish. Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 0afc770ba8343a90121f3974da71a2b535b99317 Author: James Zhu Date: Thu Jul 23 12:55:54 2020 -0400 drm/amdgpu: enable vcn3.0 for dimgrey_cavefish Enable vcn3.0 ip block for dimgrey_cavefish. Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit e8afbddfa1edc4e4115e97588dd7f147adb17759 Author: Tao Zhou Date: Fri Oct 2 13:52:47 2020 -0400 drm/amdgpu/swsmu: update driver if version for dimgrey_cavefish Update driver if version from 0x4 to 0x5 for dimgrey_cavefish, per PMFW 59.02.0. Signed-off-by: Tao Zhou Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit 73da8e862865588c449aa09cf69ac0dfe51f0969 Author: Tao Zhou Date: Mon Aug 10 17:38:47 2020 +0800 drm/amdgpu: enable athub/mmhub PG for dimgrey_cavefish Set athub/mmhub PG flag for dimgrey_cavefish. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 135333a0ce4f54121f1bd25f32eb3189eef599c5 Author: Tao Zhou Date: Mon Aug 10 17:34:30 2020 +0800 drm/amdgpu: enable mc CG and LS for dimgrey_cavefish Set mc CG and LS flag for dimgrey_cavefish. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 583e5a5e908b185b4d92e6ec91d1b8b171002279 Author: Tao Zhou Date: Mon Aug 10 17:15:23 2020 +0800 drm/amdgpu: enable GFX clock gating for dimgrey_cavefish Enable GFX MGCG, CGCG and 3DCG for dimgrey_cavefish. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 4ed032bd13fa7abdc443fd29d1edfc8fa698253a Author: Tao Zhou Date: Fri Oct 2 12:24:26 2020 -0400 drm/amdgpu/swsmu: update driver if version for dimgrey_cavefish Update driver if version according to PMFW with version 0x003B0100. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit e4ed4f50d2af766f49904f91be1be9608a7b3127 Author: Tao Zhou Date: Sun Aug 9 09:12:49 2020 +0800 drm/amdgpu: support athub cg setting for dimgrey_cavefish Same as navy_flounder, the athub ip of dimgrey_cavefish is v2.1. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit f897ea3550bc9b4544063d71b142b7413c7a7554 Author: Tao Zhou Date: Fri Oct 2 12:23:07 2020 -0400 drm/amdgpu: enable front door loading for dimgrey_cavefish Support both back and front door loading for dimgrey_cavefish. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit cc6161aa708147e510f2d9260300c9b01c944cad Author: James Zhu Date: Wed Aug 5 17:59:09 2020 -0400 drm/amdgpu: enable jpeg3.0 PG and CG for dimgrey_cavefish Enable JPEG3.0 PG and CG for dimgrey_cavefish. Signed-off-by: James Zhu Reviewed-by: Leo Liu Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit d5bc1579b0e3bdd3287acc5bc4bed1a3159847c8 Author: James Zhu Date: Wed Aug 5 17:54:21 2020 -0400 drm/amdgpu: enable VCN3.0 PG and CG for dimgrey_cavefish Enable VCN3.0 PG and CG for dimgrey_cavefish Signed-off-by: James Zhu Reviewed-by: Leo Liu Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 8f72ce6421f3e2dd03304f894ac1ab14209f773b Author: Chengming Gui Date: Fri Oct 2 12:22:13 2020 -0400 drm/amdkfd: Add kfd2kgd_funcs for dimgrey_cavefish kfd support Add KFD support. Signed-off-by: Chengming Gui Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit eb5a34d48257ce29700233d5878af3b40a6d5fa4 Author: Chengming Gui Date: Fri Oct 2 12:20:32 2020 -0400 drm/amdkfd: Support dimgrey_cavefish KFD (v2) Add KFD support for dimgrey cavefish. v2: rebase (Alex) Signed-off-by: Chengming Gui Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit a1fe2ba7282b8b00aff6946304e83e0c8a850df5 Author: Tao Zhou Date: Fri Oct 2 12:04:08 2020 -0400 drm/amdgpu: add gc golden setting for dimgrey_cavefish Add gc golden setting for dimgrey_cavefish. Signed-off-by: Tao Zhou Tested-by: Chengming Gui Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit d9fa6a0b10d54798cda3c3c44c4702e527782692 Author: Tao Zhou Date: Fri Oct 2 12:00:54 2020 -0400 drm/amdgpu: support cp_fw_write_wait for dimgrey_cavefish Same as sienna_cichlid, dimgrey_cavefish supports WAIT_REG_MEM packet. Signed-off-by: Tao Zhou Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit aeec0744481633a747e39afd2d1c3127328e51e1 Author: Tao Zhou Date: Tue Jul 28 13:53:48 2020 +0800 drm/amdgpu: skip reroute ih for some ASICs Add check before reroute ih setting, it's not supported by some ASICs. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 462c272b9076e80cda8602b9db81f8d105e729b3 Author: Tao Zhou Date: Fri Oct 2 11:56:29 2020 -0400 drm/amdgpu: add psp support for dimgrey_cavefish(v2) General psp support for dimgrey_cavefish. v2: remove the checks for asd load and reroute ih. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 0a305e34c719f5d6131a3dedb5164b091999510b Author: Tao Zhou Date: Thu Jul 23 19:14:00 2020 +0800 drm/amdgpu: increase size of psp fw_name string(v2) Increase fw_name string size so longer chip name can be stored. v2: define macro for the length of psp fw name. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit db1f8a8fb276531c82c0ed7673f1a23f137486b9 Author: Tao Zhou Date: Fri Oct 2 11:51:04 2020 -0400 drm/amdgpu/swsmu: add smu support for dimgrey_cavefish(v2) Reuse sienna_cichlid pp table for dimgrey_cavefish. v2: update related comment. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 10e0d9ebb047815bec3c59057b26381474fe151f Author: Tao Zhou Date: Thu Jul 23 18:16:53 2020 +0800 drm/amdgpu/swsmu: increase size for smu fw_name string A longer chip name needs more space. v2: define macro for the length of smu fw name Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit f267242e1598ff96596fc87ffc55e963bb8c7119 Author: Tao Zhou Date: Thu Jul 23 18:10:20 2020 +0800 drm/amdgpu: add gmc cg support for dimgrey_cavefish The athub version for dimgrey_cavefish is v2.1. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 467db422cb52abf90eaa06b445ab2bdb5d99976b Author: James Zhu Date: Thu Jul 23 12:44:51 2020 -0400 drm/amdgpu/vcn: enable VCN DPG mode for dimgrey_cavefish Enable VCN DPG mode for dimgrey_cavefish. Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 0c2c02b66c672ebb728b1f27a60e0bf3b6dce85c Author: James Zhu Date: Fri Oct 2 11:47:20 2020 -0400 drm/amdgpu/vcn: add firmware support for dimgrey_cavefish Add firmware support for dimgrey_cavefish. Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 6c72c7a03ae58447478339d10406b0de54c6ec4e Author: Tao Zhou Date: Fri Oct 2 11:45:39 2020 -0400 drm/amdgpu: force pa_sc_tile_steering_override to 0 for dimgrey_cavefish pa_sc_tile_steering_override is only programmable for gfx10.0/10.1/10.2, the same as sienna_cichlid. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 76a2d9ea6998eb2542942083f44ea3c62183c01b Author: Tao Zhou Date: Wed Mar 11 12:09:57 2020 +0800 drm/amdgpu: add virtual display support for dimgrey_cavefish Add virtual ip block for dimgrey_cavefish. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit 2eb61456539d7c99943e7fe419473bef04e22168 Author: Tao Zhou Date: Fri Oct 2 11:44:16 2020 -0400 drm/amdgpu: configure dimgrey_cavefish gfx according to gfx 10.3's definition The gfx version of dimgrey_cavefish is 10.3, identical to sienna_cichlid, follow the way of sienna_cichlid. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit 0106922600cd47676dad65417eece1051647cade Author: Tao Zhou Date: Fri Oct 2 11:42:31 2020 -0400 drm/amdgpu: add sdma ip block for dimgrey_cavefish Enable sdma block for dimgrey_cavefish, same as sienna_cichlid. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit feb6329c58a81a6991426bd5e7d0b316196ee24b Author: Tao Zhou Date: Fri Oct 2 11:40:44 2020 -0400 drm/amdgpu: add gfx ip block for dimgrey_cavefish Enable gfx block for dimgrey_cavefish, same as navy_flounder. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit 771cc67ed08f544ec16d5194e509c66694428e71 Author: Tao Zhou Date: Fri Oct 2 11:39:28 2020 -0400 drm/amdgpu: add ih ip block for dimgrey_cavefish Enable ih block for dimgrey_cavefish, same as navy_flounder. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit 3e02ad447677b2791af7ae71b29aeb252d680e87 Author: Tao Zhou Date: Fri Oct 2 11:38:30 2020 -0400 drm/amdgpu: add gmc ip block for dimgrey_cavefish Enable gmc block for dimgrey_cavefish, same as sienna_cichlid. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit 2aa92b12dfce77e6073c89c6933dbd6cbf7105b2 Author: Tao Zhou Date: Fri Oct 2 11:35:47 2020 -0400 drm/amdgpu: add common ip block for dimgrey_cavefish Same as navy_flounder. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit 01cbb6b288b0ba8081bd19e56f1baf48c7b12865 Author: Tao Zhou Date: Tue Mar 10 16:30:28 2020 +0800 drm/amdgpu: add mmhub support for dimgrey_cavefish Same as navy_flounder. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit 038d757b95f51dd59ae8852c981971cb48e8df0b Author: Tao Zhou Date: Fri Oct 2 11:34:02 2020 -0400 drm/amdgpu: initialize IP offset for dimgrey_cavefish Add ip offset definition for dimgrey_cavefish and initialize it. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit 550c58e0facd55aac5a316736b104f8428c4452e Author: Tao Zhou Date: Fri Oct 2 11:30:54 2020 -0400 drm/amdgpu: add common support for dimgrey_cavefish Add external id and set clock gating for dimgrey_cavefish. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit f2a6c81d02de6c892d1ef323992f40de6f585f3f Author: Tao Zhou Date: Fri Oct 2 11:29:43 2020 -0400 drm/amdgpu: add gfx clock gating support for dimgrey_cavefish Set gfx clock gating for dimgrey_cavefish. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit a14354690f89758a8b993ff5e8c303953240118a Author: Tao Zhou Date: Fri Oct 2 11:28:43 2020 -0400 drm/amdgpu: add gmc support for dimgrey_cavefish Same as navy_flounder. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit ee64e01ef2d2114fb0e412651ad8a85e114693b4 Author: Tao Zhou Date: Fri Oct 2 11:26:17 2020 -0400 drm/amdgpu: add support for dimgrey_cavefish firmware Add support for dimgrey_cavefish cp/rlc firmware. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit 144722fa3ac32c2d47d8729cde3f0553c462053b Author: Tao Zhou Date: Fri Oct 2 11:24:30 2020 -0400 drm/amdgpu: set asic family and ip blocks for dimgrey_cavefish Same as navi series. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit a14e093619c19bfb44567eab143218f910b2cd1a Author: Tao Zhou Date: Mon Mar 9 20:00:59 2020 +0800 drm/amdgpu: set fw load type for dimgrey_cavefish Use direct load for dimgrey_cavefish. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit a0200254ec10dac6e3ffafbbc519d161c4044762 Author: Tao Zhou Date: Fri Oct 9 18:38:30 2020 -0400 drm/amdgpu: add dimgrey_cavefish gpu info firmware Load gpu info firmware for dimgrey_cavefish. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit a2468e043ae48fbeabdc966847a6675da47a7dc4 Author: Tao Zhou Date: Fri Oct 2 11:21:47 2020 -0400 drm/amdgpu: add dimgrey_cavefish asic type Add chip type for dimgrey_cavefish. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit cd294f9a645f254bb4f5e15c64eb8aec5d4a4fda Author: Rodrigo Siqueira Date: Fri Oct 9 09:36:01 2020 -0400 drm/amd/display: Fix module load hangs when connected to an eDP It was recently introduced a change that enables driver to disable streams if pixel clock changes. Consequently, the code path executed in the disable vbios function expanded to an encoder verification part. The encoder loop is nested inside the pipe count loop, and both loops share the 'i' variable in control of their flow. This situation may lead to an infinite loop because the encoder loop constantly updates the `i` variable, making the first loop always positive. As a result, we can see a soft hang during the module load (modprobe amdgpu) and a series of dmesg log that looks like this: kernel:[ 124.538727] watchdog: BUG: soft lockup - CPU#2 stuck for 22s! [modprobe:1000] RSP: 0018:ffffabbf419bf0e8 EFLAGS: 00000282 RAX: ffffffffc0809de0 RBX: ffff93b35ccc0000 RCX: ffff93b366c21800 RDX: 0000000000000000 RSI: 0000000000000141 RDI: ffff93b35ccc0000 RBP: ffffabbf419bf108 R08: ffffabbf419bf164 R09: 0000000000000001 R10: 0000000000000003 R11: 0000000000000003 R12: 0000000008677d40 R13: 0000000000000141 R14: ffff93b35cfc0000 R15: ffff93b35abc0000 FS: 00007f1400717540(0000) GS:ffff93b37f680000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005649b66b0968 CR3: 00000003e0fec000 CR4: 0000000000350ee0 Call Trace: amdgpu_device_rreg+0x17/0x20 [amdgpu] amdgpu_cgs_read_register+0x14/0x20 [amdgpu] dm_read_reg_func+0x3a/0xb0 [amdgpu] get_pixel_clk_frequency_100hz+0x30/0x50 [amdgpu] dc_commit_state+0x8f1/0xae0 [amdgpu] ? drm_calc_timestamping_constants+0x101/0x160 [drm] amdgpu_dm_atomic_commit_tail+0x39d/0x21a0 [amdgpu] ? dcn21_validate_bandwidth+0xe5/0x290 [amdgpu] ? kfree+0xc3/0x390 ? dcn21_validate_bandwidth+0xe5/0x290 [amdgpu] ... RSP: 002b:00007fff26009bd8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 RAX: ffffffffffffffda RBX: 000055a8025bea50 RCX: 00007f140085c89d RDX: 0000000000000000 RSI: 000055a8025b8290 RDI: 000000000000000c RBP: 0000000000040000 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000000c R11: 0000000000000246 R12: 000055a8025b8290 R13: 0000000000000000 R14: 000055a8025bead0 R15: 000055a8025bea50 This issue was fixed by introducing a second variable for the internal loop. Fixes: 8353d30e747f4e ("drm/amd/display: disable stream if pixel clock changed with link active") Reviewed-by: Roman Li Reviewed-by: Nicholas Kazlauskas Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 5faf37e7d38c1fcdc4b6504fb1347154287cdd3a Author: Bhawanpreet Lakha Date: Mon Oct 5 14:07:02 2020 -0400 drm/amd/display: Add missing function pointers for dcn3 These function pointers are missing from dcn30_init .calc_vupdate_position : Used to help avoid cursor stuttering .set_pipe : Needed for setting ABM So add them Signed-off-by: Bhawanpreet Lakha Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 6e426e0fcd20ce144bb93e00b70df51e9f2e08c3 Author: Peter Zijlstra Date: Sat Aug 29 22:03:56 2020 +0900 kprobes: Replace rp->free_instance with freelist Gets rid of rp->lock, and as a result kretprobes are now fully lockless. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Masami Hiramatsu Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/159870623583.1229682.17472357584134058687.stgit@devnote2 commit e563604a5f5a891283b6a8db4001cee833a7c6b8 Author: Peter Zijlstra Date: Sat Aug 29 22:03:46 2020 +0900 freelist: Implement lockless freelist A simple CAS-based lock-free free list. Not the fastest thing in the world under heavy contention, but simple and correct (assuming nodes are never freed until after the free list is destroyed), and fairly speedy under low contention. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Masami Hiramatsu Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/159870622579.1229682.16729440870040944993.stgit@devnote2 commit 29f006fdefe6f88abde973a0b0f20d2704e93fd4 Author: Peter Zijlstra Date: Sat Aug 29 22:03:35 2020 +0900 asm-generic/atomic: Add try_cmpxchg() fallbacks Only x86 provides try_cmpxchg() outside of the atomic_t interfaces, provide generic fallbacks to create this interface from the widely available cmpxchg() function. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Masami Hiramatsu Signed-off-by: Ingo Molnar Acked-by: Will Deacon Link: https://lore.kernel.org/r/159870621515.1229682.15506193091065001742.stgit@devnote2 commit d741bf41d7c7db4898bacfcb020353cddc032fd8 Author: Peter Zijlstra Date: Sat Aug 29 22:03:24 2020 +0900 kprobes: Remove kretprobe hash The kretprobe hash is mostly superfluous, replace it with a per-task variable. This gets rid of the task hash and it's related locking. Note that this may change the kprobes module-exported API for kretprobe handlers. If any out-of-tree kretprobe user uses ri->rp, use get_kretprobe(ri) instead. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Masami Hiramatsu Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/159870620431.1229682.16325792502413731312.stgit@devnote2 commit 476c5818c37a7828d558f34ae01f0c32f8bfadde Author: Peter Zijlstra Date: Sat Aug 29 22:03:13 2020 +0900 llist: Add nonatomic __llist_add() and __llist_dell_all() We'll use these in the new, lockless kretprobes code. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Masami Hiramatsu Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/159870619318.1229682.13027387548510028721.stgit@devnote2 commit b30edfd8d0b4b22f9c17c208064b39a3d93e6971 Author: Imre Deak Date: Wed Oct 7 20:09:17 2020 +0300 drm/i915: Switch to LTTPR non-transparent mode link training The DP Standard's recommendation is to use the LTTPR non-transparent mode link training if LTTPRs are detected, so let's do this. Besides power-saving, the advantages of this are that the maximum number of LTTPRs can only be used in non-transparent mode (the limit is 5-8 in transparent mode), and it provides a way to narrow down the reason for a link training failure to a given link segment. Non-transparent mode is probably also the mode that was tested the most by the industry. The changes in this patchset: - Pass the DP PHY that is currently link trained to all LT helpers, so that these can access the correct LTTPR/DPRX DPCD registers. - During LT take into account the LTTPR common lane rate/count and the per LTTPR-PHY vswing/pre-emph limits. - Switch to LTTPR non-transparent LT mode and train each link segment according to the sequence in DP Standard v2.0 (complete CR/EQ for each segment before continuing with the next segment). v2: - Switch to non-transparent mode during connector detection, which is required before reading the per-PHY LTTPR capabilities. - Move the DP_PHY_LTTPR() macro to drm_dp_helper.h (Ville) - Use the new drm_dp_dpcd_read_phy_link_status() instead of adding the same logic to intel_dp_get_link_status(). (Ville) - Make intel_dp_lttpr_phy_caps() return a pointer to the whole array instead of a pointer to its first element. (Ville) - Add the intel_dp_phy_is_downstream_of_source() helper. (Ville) - Add a code comment about the disable->enable quirk of non-transparent mode. - Add the intel_dp_training_pattern_set_reg() helper. - Fix checkpatch/sparse warns. Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20201007170917.1764556-7-imre.deak@intel.com commit 7b2a4ab8b0ef2a6dbec0b15d2cabf5a9e7acdf4c Author: Imre Deak Date: Wed Oct 7 20:09:16 2020 +0300 drm/i915: Switch to LTTPR transparent mode link training By default LTTPRs should be in transparent link training mode, nevertheless in this patch we switch to this default mode explicitly. The DP Standard recommends this, supposedly because an LTTPR may be left in the non-transparent mode (by BIOS, previous kernel, or after reset due to a firmware bug). I haven't seen this happening, but let's follow the DP Standard. v2: - Add a code comment about the explicit disabling of non-transparent mode. v3: - Move check to prevent initing LTTPRs on eDP to init_dp_lttpr_init(). Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20201007170917.1764556-6-imre.deak@intel.com commit 9782f52ab5d65a667074beda11b12490935d608b Author: Imre Deak Date: Wed Oct 7 20:09:15 2020 +0300 drm/dp: Add LTTPR helpers Add the helpers and register definitions needed to read out the common and per-PHY LTTPR capabilities and perform link training in the LTTPR non-transparent mode. v2: - Add drm_dp_dpcd_read_phy_link_status() and DP_PHY_LTTPR() here instead of adding these to i915. (Ville) v3: - Use memmove() to convert LTTPR to DPRX link status format. (Ville) Cc: dri-devel@lists.freedesktop.org Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Acked-by: Lyude Paul Acked-by: Daniel Vetter Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20201007170917.1764556-5-imre.deak@intel.com commit c43027a9a37541dbdc54e9dca647602175ff27a2 Author: Imre Deak Date: Wed Oct 7 20:09:14 2020 +0300 drm/i915: Factor out a helper to disable the DPCD training pattern To prepare for a follow-up LTTPR change factor out a helper to disable the training pattern in DPCD. We'll need to do this for each LTTPR (without programming the port to output the idle pattern) when training in LTTPR non-transparent mode. While at it also move the disable-link-training logic from intel_dp_set_link_train() to intel_dp_stop_link_train(), since the latter is the only user of this. v2: - Move the disable-link-training logic to intel_dp_stop_link_train() (Ville) Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20201007170917.1764556-4-imre.deak@intel.com commit 0a5991f5d022235ba085001e2a3926f83a0aed1b Author: Imre Deak Date: Wed Oct 7 20:09:13 2020 +0300 drm/i915: Simplify the link training functions Split the prepare, link training, fallback-handling steps into their own functions for clarity and as a preparation for the upcoming LTTPR changes. While at it also: - Unexport and inline intel_dp_set_idle_link_train(), which is used at a single place. - Add some documentation to functions that are exported or that can use a better description about which part of the LT sequence they implement. v2: (Ville) - Unexport/inline intel_dp_set_idle_link_train() - Make the documentation of intel_dp_prepare_link_train()/intel_dp_stop_link_train() more accurate wrt. HW specific details. Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20201007170917.1764556-3-imre.deak@intel.com commit 6777a855d66d27c4082d6316cc0f2a26a004ed62 Author: Imre Deak Date: Wed Oct 7 20:09:12 2020 +0300 drm/i915: Fix DP link training pattern mask An LTTPR can be trained with training pattern 4 even if the DPCD revision is < 1.4, but drm_dp_training_pattern_mask() would change pattern 4 to pattern 3 on those DPCD revisions. Since intel_dp_training_pattern() makes already sure that the proper training pattern is used, all that needs to be masked out is the scrambling disable flag, which is or'd to the mask later based on the training pattern. v2: - Use a helper instead of open-coding the masking. (Ville) Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20201007170917.1764556-2-imre.deak@intel.com commit bf296b35489b46780b73b74ad984d06750ed5479 Author: Randy Dunlap Date: Sun Oct 11 16:01:31 2020 -0700 drm/aspeed: Fix Kconfig warning & subsequent build errors Kernel test robot reported build errors (undefined references) that didn't make much sense. After reproducing them, there is also a Kconfig warning that is the root cause of the build errors, so fix that Kconfig problem. Fixes this Kconfig warning: WARNING: unmet direct dependencies detected for CMA Depends on [n]: MMU [=n] Selected by [m]: - DRM_ASPEED_GFX [=m] && HAS_IOMEM [=y] && DRM [=m] && OF [=y] && (COMPILE_TEST [=y] || ARCH_ASPEED) && HAVE_DMA_CONTIGUOUS [=y] and these dependent build errors: (.text+0x10c8c): undefined reference to `start_isolate_page_range' microblaze-linux-ld: (.text+0x10f14): undefined reference to `test_pages_isolated' microblaze-linux-ld: (.text+0x10fd0): undefined reference to `undo_isolate_page_range' Fixes: 76356a966e33 ("drm: aspeed: Clean up Kconfig options") Reported-by: kernel test robot Signed-off-by: Randy Dunlap Reviewed-by: Joel Stanley Cc: Joel Stanley Cc: Andrew Jeffery Cc: Daniel Vetter Cc: Michal Simek Cc: Andrew Morton Cc: Mike Rapoport Cc: linux-mm@kvack.org Cc: linux-aspeed@lists.ozlabs.org Cc: linux-arm-kernel@lists.infradead.org Cc: David Airlie Cc: dri-devel@lists.freedesktop.org Signed-off-by: Joel Stanley Link: https://patchwork.freedesktop.org/patch/msgid/20201011230131.4922-1-rdunlap@infradead.org Signed-off-by: Joel Stanley commit d655844f7e2122671c513c311b171a8f4b374f49 Author: Deepak R Varma Date: Sun Oct 11 16:18:00 2020 +0530 staging: iio: adis16240: add blank line before struct definition Add a blank line before starting structure definition as per coding style guidelines. Issue reported by checkpatch script. Signed-off-by: Deepak R Varma Acked-by: Julia Lawall Link: https://lore.kernel.org/r/20201011104800.GA29412@ubuntu204 Signed-off-by: Jonathan Cameron commit 681ab2ce293638480f5395c73e5430dfd517015d Author: Rikard Falkeborn Date: Thu Oct 1 01:29:39 2020 +0200 iio: accel: mma8452: Constify static struct attribute_group The only usage of mma8452_event_attribute_group is to assign its address to the event_attrs field in the iio_info struct, which is a const pointer. Make it const to allow the compiler to put it in read-only memory. This was the only non-const static struct in drivers/iio. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200930232939.31131-1-rikard.falkeborn@gmail.com Signed-off-by: Jonathan Cameron commit 223f4d9517f8d97721647297b1cde41241a45233 Author: Alexandru Ardelean Date: Thu Oct 1 17:10:04 2020 +0300 iio: dac: ad7303: remove platform data header The information in the ad7303 platform_data header is unused, so it's dead code. This change removes it and it's inclusion from the driver. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201001141004.53846-1-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 882bceffa8ca7ac7d504affca5810852a7a0a449 Author: Jyri Sarha Date: Sat Oct 10 20:00:59 2020 +0300 drm/tilcdc: Remove tilcdc_crtc_max_width(), use private data We already have a private data member for maximum display width so let's use it and get rid of the redundant tilcdc_crtc_max_width(). The LCDC version probing is moved to before reading the device tree properties so that the version information is available when private data maximum width is initialized, if "max-width" property is not found. Signed-off-by: Jyri Sarha Reviewed-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/73683d2ce151cffb811a756595b02892eeac3d84.1602349100.git.jsarha@ti.com commit b3a753f54adcd7cea01a427aa971ea4d9e0652ce Author: Jyri Sarha Date: Sat Oct 10 20:00:58 2020 +0300 drm/tilcdc: Do not keep vblank interrupts enabled all the time END_OF_FRAME interrupts have been enabled all the time since the beginning of this driver. It is about time to add this feature. Signed-off-by: Jyri Sarha Reviewed-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/fb87adebaffe8c7cb4fe7e909a45d47af08d7c6e.1602349100.git.jsarha@ti.com commit 28963f2f6b46d75bda8fed15bd5ce9923427a40d Author: Alexandru Ardelean Date: Thu Oct 1 17:10:48 2020 +0300 iio: adc: ad7298: rework external ref setup & remove platform data This change removes the old platform data for ad7298. It is only used to provide whether to use an external regulator as a reference. So, the logic is inverted a bit. The driver now tries to obtain a regulator. If one is provided, then the external ref is used. The rest of the logic should work as before. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201001141048.69050-1-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 0e7a3978a40b26b85820afe9e544f0032103f805 Author: Anand Ashok Dumbre Date: Mon Oct 5 08:05:16 2020 -0700 iio: core: Fix IIO_VAL_FRACTIONAL calculation for negative values Fixes IIO_VAL_FRACTIONAL for case when the result is negative and exponent is 0. example: if the result is -0.75, tmp0 will be 0 and tmp1 = 75 This causes the output to lose sign because of %d in snprintf which works for tmp0 <= -1. Reported-by: kernel test robot #error: uninitialized symbol tmp Reported-by: Dan Carpenter Signed-off-by: Anand Ashok Dumbre Link: https://lore.kernel.org/r/1601910316-24111-1-git-send-email-anand.ashok.dumbre@xilinx.com Signed-off-by: Jonathan Cameron commit c5bf4d645f2d5c4c216dd690c5237d778102c848 Author: dmitry.torokhov@gmail.com Date: Tue Oct 6 14:55:09 2020 -0700 iio: adc: exynos: do not rely on 'users' counter in ISR The order in which 'users' counter is decremented vs calling drivers' close() method is implementation specific, and we should not rely on it. Let's introduce driver private flag and use it to signal ISR to exit when device is being closed. This has a side-effect of fixing issue of accessing inut->users outside of input->mutex protection. Reported-by: Andrzej Pietrasiewicz Signed-off-by: Dmitry Torokhov Reviewed-by: Michał Mirosław Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201006215509.GA2556081@dtor-ws Signed-off-by: Jonathan Cameron commit 5b19ca2c78a0838976064c0347e46a2c859b541d Author: Stephen Boyd Date: Tue Oct 6 18:17:35 2020 -0700 iio: sx9310: Set various settings from DT These properties need to be set during driver probe. Parse any DT properties and replace the default register settings with the ones parsed from DT. Signed-off-by: Stephen Boyd Cc: Daniel Campello Cc: Lars-Peter Clausen Cc: Peter Meerwald-Stadler Cc: Rob Herring Cc: Cc: Douglas Anderson Cc: Gwendal Grignou Cc: Evan Green Link: https://lore.kernel.org/r/20201007011735.1346994-7-swboyd@chromium.org Signed-off-by: Jonathan Cameron commit e94b3c608a2a886758da87dc5bb383e5eddce666 Author: Stephen Boyd Date: Tue Oct 6 18:17:34 2020 -0700 dt-bindings: iio: sx9310: Add various settings as DT properties We need to set various bits in the hardware registers for this device to operate properly depending on how it is installed. Add a handful of DT properties to configure these things. Signed-off-by: Stephen Boyd Reviewed-by: Rob Herring Cc: Daniel Campello Cc: Lars-Peter Clausen Cc: Peter Meerwald-Stadler Cc: Cc: Douglas Anderson Cc: Gwendal Grignou Cc: Evan Green Link: https://lore.kernel.org/r/20201007011735.1346994-6-swboyd@chromium.org Signed-off-by: Jonathan Cameron commit 1b6872015f0b96e6800c1a321b45d581aba9381b Author: Stephen Boyd Date: Tue Oct 6 18:17:33 2020 -0700 iio: sx9310: Support setting debounce values The rising and falling directions can be debounced in the hardware as "close" and "far" debounce settings. Add support for these as rising and falling debounce settings. Signed-off-by: Stephen Boyd Cc: Daniel Campello Cc: Lars-Peter Clausen Cc: Peter Meerwald-Stadler Cc: Douglas Anderson Cc: Gwendal Grignou Cc: Evan Green Link: https://lore.kernel.org/r/20201007011735.1346994-5-swboyd@chromium.org Signed-off-by: Jonathan Cameron commit 08f0411c48f27703f0db2bd287890fdedf5bef5e Author: Stephen Boyd Date: Tue Oct 6 18:17:32 2020 -0700 iio: sx9310: Support setting hysteresis values Add support for setting the hysteresis as a shifted value of a channel's proximity threshold. Each channel can have a different threshold, but the hysteresis applies to all channels as a right shift factor. Therefore, duplicate the hysteresis value across all channels and make it depend on the channel's proximity threshold. This is sort of odd but seems to work in practice as most of the time only one channel is used. Signed-off-by: Stephen Boyd Cc: Daniel Campello Cc: Lars-Peter Clausen Cc: Peter Meerwald-Stadler Cc: Douglas Anderson Cc: Gwendal Grignou Cc: Evan Green Link: https://lore.kernel.org/r/20201007011735.1346994-4-swboyd@chromium.org Signed-off-by: Jonathan Cameron commit ad2b473e2ba39b43df4d2cad77ab6130665d8c31 Author: Stephen Boyd Date: Tue Oct 6 18:17:31 2020 -0700 iio: sx9310: Support setting proximity thresholds Add support to set the proximity thresholds for each channel. Signed-off-by: Stephen Boyd Cc: Daniel Campello Cc: Lars-Peter Clausen Cc: Peter Meerwald-Stadler Cc: Douglas Anderson Cc: Gwendal Grignou Cc: Evan Green Link: https://lore.kernel.org/r/20201007011735.1346994-3-swboyd@chromium.org Signed-off-by: Jonathan Cameron commit 227c83faa2f83293e88e7889eaab6fc7960ecee3 Author: Stephen Boyd Date: Tue Oct 6 18:17:30 2020 -0700 iio: sx9310: Support hardware gain factor Add support to set the hardware gain of the channels as a multiplier of 2x, 4x, or 8x. Signed-off-by: Stephen Boyd Cc: Daniel Campello Cc: Lars-Peter Clausen Cc: Peter Meerwald-Stadler Cc: Douglas Anderson Cc: Gwendal Grignou Cc: Evan Green Link: https://lore.kernel.org/r/20201007011735.1346994-2-swboyd@chromium.org Signed-off-by: Jonathan Cameron commit 324b9f2987441d6e53d314e64500de9fc65b0c12 Author: Lorenzo Bianconi Date: Tue Oct 6 14:07:42 2020 +0200 dt-bindings: iio: imu: st_lsm6dsx: add lsm6dst device bindings Signed-off-by: Lorenzo Bianconi Acked-by: Rob Herring Link: https://lore.kernel.org/r/05e4273f2544230049b2cd82c6bf1be788a8e483.1601985763.git.lorenzo@kernel.org Signed-off-by: Jonathan Cameron commit 4393e4c533c5f8e7bc3ef957fda902da30a75ec5 Author: Lorenzo Bianconi Date: Tue Oct 6 14:07:41 2020 +0200 iio: imu: st_lsm6dsx: add support to LSM6DST Add support to STM LSM6DST (acc + gyro) Mems sensor https://www.st.com/resource/en/datasheet/lsm6dst.pdf Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/835127b76ef5ad05aa2aac58298aee5f3073fb71.1601985763.git.lorenzo@kernel.org Signed-off-by: Jonathan Cameron commit 5483b8d5015bb366c372870cfe4448742082e41f Author: Alexandru Ardelean Date: Fri Oct 2 11:27:23 2020 +0300 iio: adc: ad7887: invert/rework external ref logic This change inverts/reworks the logic to use an external reference via a provided regulator. Now the driver tries to obtain a regulator. If one is found, then it is used. The rest of the driver logic already checks if there is a non-NULL reference to a regulator, so it should be fine. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201002082723.184810-1-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit ead1c9f376dbb2805796098ed6d2a70921c77ee5 Author: Alexandru Ardelean Date: Wed Sep 30 16:50:48 2020 +0300 iio: adc: at91_adc: remove platform data and move defs in driver file The AT91 ADC driver no longer uses the 'at91_add_device_adc' platform data type. This is no longer used (at least in mainline boards). This change removes the platform-data initialization from the driver, since it is mostly dead code now. Some definitions [from the platform data at91_adc.h include] have been moved in the driver, since they are needed in the driver. Signed-off-by: Alexandru Ardelean Reviewed-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200930135048.11530-5-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit f091d7c5fe6cc39e916b50f90e3cac67a032d0be Author: Alexandru Ardelean Date: Wed Sep 30 16:50:47 2020 +0300 iio: adc: at91_adc: add Kconfig dep on the OF symbol and remove of_match_ptr() This tries to solve a warning reported by the lkp bot: >> drivers/iio/adc/at91_adc.c:1439:34: warning: unused variable >> 'at91_adc_dt_ids' [-Wunused-const-variable] static const struct of_device_id at91_adc_dt_ids[] = { ^ 1 warning generated. This warning has appeared after the AT91_ADC driver compilation has been enabled via the COMPILE_TEST symbol dependency. The warning is caused by the 'of_match_ptr()' helper which returns NULL if OF is undefined. This driver should build only for device-tree context, so a dependency on the OF Kconfig symbol has been added. Also, the usage of of_match_ptr() helper has been removed since it shouldn't ever return NULL (because the driver should not be built for the non-OF context). Fixes: 4027860dcc4c ("iio: Kconfig: at91_adc: add COMPILE_TEST dependency to driver") Reported-by: kernel test robot Signed-off-by: Alexandru Ardelean Reviewed-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200930135048.11530-4-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 3e4ef8e8cefada6b99150011a2d36a89e2fd2380 Author: Alexandru Ardelean Date: Wed Sep 30 16:50:46 2020 +0300 iio: adc: at91_adc: const-ify some driver data The main intent is to get rid of the cast for the void-pointer returned by of_device_get_match_data(). This requires const-ifying the 'caps' and 'registers' references on the at91_adc_state struct. The caps can be obtained also from the old platform_data (in the at91_adc_probe_pdata() function), but that cast is not touched in this patch, since the old platform_data should be removed/cleaned-away. Also, that cast deals with converting a kernel_ulong_t type to a pointer. So, updating that cast doesn't yield any benefit. Signed-off-by: Alexandru Ardelean Reviewed-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200930135048.11530-3-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit ad49bd57f9d574ddc859994db3ba996014e555e0 Author: Alexandru Ardelean Date: Wed Sep 30 16:50:45 2020 +0300 iio: adc: at91_adc: use of_device_get_match_data() helper This is a small tidy-up. The of_device_get_match_data() helper retrieves the driver data from the OF table, without needed to explicitly know the table variable (since it can retrieve it from the driver object). Signed-off-by: Alexandru Ardelean Reviewed-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200930135048.11530-2-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit d93dd060809f3db32ef3198121989e26e3049e00 Author: Michael Auchter Date: Thu Sep 24 14:52:14 2020 -0500 dt-bindings: iio: dac: ad5686: add binding Add a binding for AD5686 Signed-off-by: Michael Auchter Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200924195215.49443-3-michael.auchter@ni.com Signed-off-by: Jonathan Cameron commit bf7cfa685d4d342f4656ccc960ac10d9e5c77af7 Author: Michael Auchter Date: Thu Sep 24 14:52:13 2020 -0500 iio: dac: ad5686: add of_match_table Add of_match_table to this driver, so devices can be probed based on device tree contents. Signed-off-by: Michael Auchter Link: https://lore.kernel.org/r/20200924195215.49443-2-michael.auchter@ni.com Signed-off-by: Jonathan Cameron commit 7dc8faeab3e3b985bd61131ff9fb9067e91182e3 Author: Michael Auchter Date: Thu Sep 24 14:52:12 2020 -0500 iio: dac: ad5686: add support for AD5338R The AD5338R is a 10-bit DAC with 2 outputs and an internal 2.5V reference (enabled by default). The register configuration is nearly identical to the AD5696R DAC that's already supported by this driver, with the channel selection bits being the only thing different. Signed-off-by: Michael Auchter Link: https://lore.kernel.org/r/20200924195215.49443-1-michael.auchter@ni.com Signed-off-by: Jonathan Cameron commit 3bcacad3d7a9ab727e9ac1a110dac4ddc78bca32 Author: Matt Roper Date: Fri Oct 9 12:44:42 2020 -0700 drm/i915: Update gen12 multicast register ranges The updated bspec forcewake table also provides us with new multicast ranges that should be reflected in our workaround code. Note that there are different types of multicast registers with different styles of replication and different steering registers. The i915 MCR range lists we're updating here are only used to ensure we can verify workarounds properly (i.e., if we can't steer register reads we don't want to verify workarounds where an unsteered read might hit a fused-off instance of the unit). Because of this, we don't need to include any of the multicast ranges where all instances of the register will always present and fusing doesn't play a role. Specifically, that means that we are not including the MCR ranges designated as "SQIDI" in the bspec. Bspec: 66696 Cc: Caz Yokoyama Cc: Daniele Ceraolo Spurio Cc: José Roberto de Souza Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20201009194442.3668677-4-matthew.d.roper@intel.com Reviewed-by: José Roberto de Souza commit 92f5df0d448bb0951c49f4981405a32ffaa2545d Author: Matt Roper Date: Fri Oct 9 12:44:41 2020 -0700 drm/i915: Update gen12 forcewake table The bspec's forcewake page was very stale and out of date for recent platforms. The hardware team finally provided us with an updated gen12 table (which applies to TGL, RKL, and DG1) and there are a lot of changes. v2: - Add comments showing the subregions of ranges that we've combined for ease of code review. (Jose) - Rebase on the s/FORCEWAKE_BLITTER/FORCEWAKE_GT/ patch Bspec: 66696 Cc: Caz Yokoyama Cc: Daniele Ceraolo Spurio Cc: José Roberto de Souza Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20201009194442.3668677-3-matthew.d.roper@intel.com Reviewed-by: José Roberto de Souza commit 55e3c170950f5a15f1bf8b585881eab83b308271 Author: Matt Roper Date: Fri Oct 9 12:44:40 2020 -0700 drm/i915: Rename FORCEWAKE_BLITTER to FORCEWAKE_GT The power well that we've been referring to as the 'blitter' well is actually more of a general GT power well which contains a lot of things other than the blitter engine registers. The FORCEWAKE_BLITTER name in the code was used for historic reasons, but no longer matches how the bspec describes this power well and just causes confusion for people not familiar with this area of the code. Let's rename it to FORCEWAKE_GT to more accurately describe the role of the power well and match how the modern bspec refers to it. v2: - Add a comment noting that the GT power well includes the blitter engine. (Jose) Bspec: 66696, 66534, 67609 Cc: José Roberto de Souza Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20201009194442.3668677-2-matthew.d.roper@intel.com Reviewed-by: José Roberto de Souza commit 0bcbcba78269f425a8d258be59d918ee2a36724b Author: José Roberto de Souza Date: Wed Oct 7 12:52:38 2020 -0700 drm/i915/display: Program PSR2 selective fetch registers Another step towards PSR2 selective fetch, here programming plane selective fetch registers and MAN_TRK_CTL enabling selective fetch but for now it is fetching the whole area of the planes. The damaged area calculation will come as next and final step. v2: - removed warn on when no plane is visible in state - removed calculations using plane damaged area in intel_psr2_program_plane_sel_fetch() v3: - do not shift 16 positions the plane dst coordinates, only src is shifted v4: - only setting PLANE_SEL_FETCH_CTL_ENABLE and MCURSOR_MODE in PLANE_SEL_FETCH_CTL v5: - not masking bits for cursor BSpec: 55229 Cc: Gwan-gyeong Mun Cc: Ville Syrjälä Signed-off-by: José Roberto de Souza Reviewed-by: Gwan-gyeong Mun Link: https://patchwork.freedesktop.org/patch/msgid/20201007195238.53955-3-jose.souza@intel.com commit 5c90660fcc452824b767744f3f4e09a335ce8f91 Author: José Roberto de Souza Date: Wed Oct 7 12:52:37 2020 -0700 drm/i915/display: Check PSR parameter and flag only in state compute phase Due to the debugfs flag, has_psr2 in CRTC state could have a different value than psr.psr2_enabled and it was causing PSR2 subfeatures(DC3CO and selective fetch) to be set to not a expected state. So here only taking in consideration the parameter and debugfs flag when computing PSR state, this way the CRTC state will also have the correct state. intel_psr_fastset_force() was already broken as intel_psr_compute_config() was already only enabling PSR when psr_global_enabled() and all other PSR requirements are met. So some changes was required in this function, now it iterates over all connectors, if it is a eDP connector and is active force a modeset in the CRTC driving this connector, what will cause the new PSR state to be set based on the debugfs flag. v2: - end connector iterator in error cases Cc: Gwan-gyeong Mun Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20201007195238.53955-2-jose.souza@intel.com commit 90a24b9d737c54b3a20d1a3d0a2e2cd872a442ee Author: José Roberto de Souza Date: Wed Oct 7 12:52:36 2020 -0700 drm/i915/display: Ignore IGNORE_PSR2_HW_TRACKING for platforms without sel fetch For platforms without selective fetch this register is reserved so do not write 0 to it. Cc: Gwan-gyeong Mun Cc: Ville Syrjälä Reviewed-by: Rodrigo Vivi Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20201007195238.53955-1-jose.souza@intel.com commit a23fe79ae5c0946558fcac71d14ca8f85fb728b0 Author: José Roberto de Souza Date: Thu Oct 8 14:19:32 2020 -0700 drm/i915/vbt: Add VRR VBT toggle This will be used in future but already adding to VBT so we are updated with VBT changes. Reviewed-by: Matt Roper Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20201008211932.24989-3-jose.souza@intel.com commit e4b3c3b3faafe8d471c352d64cc87ccc6a1cede6 Author: José Roberto de Souza Date: Thu Oct 8 14:19:31 2020 -0700 drm/i915/vbt: Update the version and expected size of BDB_GENERAL_DEFINITIONS map This will remove the "Expected child device config size for VBT version 235 not known" debug message seen in TGL, although this is not fixing anything it good to keep our VBT parser updated. Reviewed-by: Matt Roper Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20201008211932.24989-2-jose.souza@intel.com commit d381baad29b43511a7fc34c64402ef65029ab281 Author: José Roberto de Souza Date: Thu Oct 8 14:19:30 2020 -0700 drm/i915/vbt: Fix backlight parsing for VBT 234+ Child min_brightness is obsolete from VBT 234+, instead the new min_brightness field in the main structure should be used. This new field is 16 bits wide, so backlight_precision_bits is needed to check if value needs to be scaled down but it is only available in VBT 236+ so working around it by using the also new backlight_level in the main struct. v2: - missed that backlight_data->level is also obsolete v3: - s/backlight/brightness to better match specification - using u16 to specify brightness level instead of a u32 : 16 BSpec: 20149 Reviewed-by: Matt Roper Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20201008211932.24989-1-jose.souza@intel.com commit 73e34336270476a7ea0bf1f3d403e997a8a0aaee Author: Ye Bin Date: Fri Oct 9 15:47:58 2020 +0800 drm/amdgpu: Fix inconsistent of format with argument type in amdgpu_xgmi.c Fix follow warning: [drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c:249]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. Reported-by: Hulk Robot Signed-off-by: Ye Bin Signed-off-by: Alex Deucher commit 849007191eda2b65ff7e8bde4342968f1a4be879 Author: Ye Bin Date: Fri Oct 9 15:42:18 2020 +0800 drm/amdgpu: Fix invalid number of character '{' in amdgpu_acpi_init Fix follow warning: Checking drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c... [drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:770]: (error) Invalid number of character '{' when these macros are defined: ''. Checking drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c: CONFIG_ACPI... [drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:770]: (error) Invalid number of character '{' when these macros are defined: 'CONFIG_ACPI'. ...... Checking drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c: CONFIG_X86... [drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:770]: (error) Invalid number of character '{' when these macros are defined: 'CONFIG_X86'. Checking drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c: _X86_... [drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:770]: (error) Invalid number of character '{' when these macros are defined: '_X86_'. Checking drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c: __linux__... [drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:770]: (error) Invalid number of character '{' when these macros are defined: '__linux__'. Fixes: 97d798b276e9 ("drm/amdgpu: simplify ATIF backlight handling") Reported-by: Hulk Robot Signed-off-by: Ye Bin Signed-off-by: Alex Deucher commit 75145aab7a0d865b361de687b201e8c4b76425eb Author: Alex Deucher Date: Thu Oct 1 01:06:24 2020 -0400 drm/amdgpu/swsmu: clean up a bunch of stale interfaces These were leftover from the initial implementation, but never used. Drop them. Reviewed-by: Evan Quan Noticed-by: Ryan Taylor Signed-off-by: Alex Deucher commit 44d6e160f60abed717c3ec7d34d49d434f65ef62 Author: Evan Quan Date: Wed Sep 30 11:54:01 2020 +0800 drm/amd/pm: setup APU dpm clock table in SMU HW initialization As the dpm clock table is needed during DC HW initialization. And that (DC HW initialization) comes before smu_late_init() where current APU dpm clock table setup is performed. So, NULL pointer dereference will be triggered. By moving APU dpm clock table setup to smu_hw_init(), this can be avoided. Fixes: 02cf91c113ea ("drm/amd/powerplay: postpone operations not required for hw setup to late_init") Signed-off-by: Evan Quan Reported-by: Dirk Gouders Acked-by: Nirmoy Das Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 7ca917ecb3e7b56f13ef2460268a01e768504694 Author: Changfeng Date: Fri Oct 9 12:42:06 2020 +0800 drm/amdgpu: modify cp_flags to pg_flags in gfx_v10_cntl_power_gating It needs to use adev->pg_flags other than adev->cg_glags in gfx_v10_cntl_power_gating Signed-off-by: Changfeng Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 9ba8aa1085c0fb722b3db8785b546cea57d0a719 Author: Emily.Deng Date: Thu Oct 8 08:53:59 2020 +0800 drm/amdgpu: Remove warning for virtual_display Remove the virtual_display warning in drm_crtc_vblank_off when dev->num_crtcs is null. Reviewed-by: Andrey Grodzovsky Signed-off-by: Emily.Deng Signed-off-by: Alex Deucher commit 402bde58e7f40da4d4d87c10b74182ed6b5c97dc Author: kernel test robot Date: Wed Sep 23 10:28:28 2020 +0800 drm/amdgpu: kfd_initialized can be static Fixes: c7651b73586600 ("drm/amdgpu: Fix handling of KFD initialization failures") Signed-off-by: kernel test robot Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 201a4eb9dc960b6c081936e0990e289959707996 Author: Gustavo A. R. Silva Date: Thu Oct 8 09:34:50 2020 -0500 amd/amdgpu_ctx: Use struct_size() helper and kmalloc() (v2) Make use of the new struct_size() helper instead of the offsetof() idiom. Also, use kmalloc() instead of kcalloc(). v2: squash in kzalloc fix Signed-off-by: Gustavo A. R. Silva Signed-off-by: Alex Deucher commit 562f150fb93b44884f467f531b18cb0b8fdb2ff4 Author: Gustavo A. R. Silva Date: Thu Oct 8 09:23:05 2020 -0500 drm/amdgpu: Use struct_size() helper in kmalloc() Make use of the new struct_size() helper instead of the offsetof() idiom. Reviewed-by: Christian König Signed-off-by: Gustavo A. R. Silva Signed-off-by: Alex Deucher commit bae82e84182349d30d5f0c8dfa44cab00baf3425 Author: Gustavo A. R. Silva Date: Wed Oct 7 11:10:44 2020 -0500 drm/amd/pm: Replace one-element array with flexible-array in struct phm_ppt_v1_pcie_table There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. Refactor the code according to the use of a flexible-array member in struct phm_ppt_v1_pcie_table, instead of a one-element array, and use the struct_size() helper to calculate the size for the allocation. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays Build-tested-by: kernel test robot Link: https://lore.kernel.org/lkml/5f7db0bc.7Xivn4K83f7XW0ug%25lkp@intel.com/ Acked-by: Christian König Signed-off-by: Gustavo A. R. Silva Signed-off-by: Alex Deucher commit b44fd9ccfaebbd01bda6b9d5d4dff2469a992dd1 Author: Gustavo A. R. Silva Date: Wed Oct 7 11:10:16 2020 -0500 drm/amd/pm: Replace one-element array with flexible-array in struct phm_ppt_v1_voltage_lookup_table There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. Refactor the code according to the use of a flexible-array member in struct phm_ppt_v1_voltage_lookup_table, instead of a one-element array, and use the struct_size() helper to calculate the size for the allocation. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays Build-tested-by: kernel test robot Link: https://lore.kernel.org/lkml/5f7d61df.jWrFfnjxGbjSkPOp%25lkp@intel.com/ Acked-by: Christian König Signed-off-by: Gustavo A. R. Silva Signed-off-by: Alex Deucher commit 03f0a7b857db5dcaf5e19ca47b3b843a183ffefc Author: Gustavo A. R. Silva Date: Wed Oct 7 11:09:34 2020 -0500 drm/amd/pm: Replace one-element array with flexible-array in struct phm_ppt_v1_mm_clock_voltage_dependency_table There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. Refactor the code according to the use of a flexible-array member in struct phm_ppt_v1_mm_clock_voltage_dependency_table, instead of a one-element array, and use the struct_size() helper to calculate the size for the allocation. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays Build-tested-by: kernel test robot Link: https://lore.kernel.org/lkml/5f7d61e2.qiTVTyG2pVoG8bb0%25lkp@intel.com/ Acked-by: Christian König Signed-off-by: Gustavo A. R. Silva Signed-off-by: Alex Deucher commit 5be63325c55a0d21f57c8aa67eb31af2b743fadc Author: Gustavo A. R. Silva Date: Wed Oct 7 11:08:53 2020 -0500 drm/amd/pm: Replace one-element array with flexible-array in struct phm_ppt_v1_clock_voltage_dependency_table There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. Refactor the code according to the use of a flexible-array member in struct phm_ppt_v1_clock_voltage_dependency_table, instead of a one-element array, and use the struct_size() helper to calculate the size for the allocation. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays Build-tested-by: kernel test robot Link: https://lore.kernel.org/lkml/5f7c433c.TTk9rnA+F58kyDUy%25lkp@intel.com/ Acked-by: Christian König Signed-off-by: Gustavo A. R. Silva Signed-off-by: Alex Deucher commit 89c785bb1a7310fa18d0e32af3a6bc9947c348fe Author: Gustavo A. R. Silva Date: Wed Oct 7 11:08:08 2020 -0500 drm/amd/pm: Replace one-element array with flexible-array in struct phm_samu_clock_voltage_dependency_table There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. Refactor the code according to the use of a flexible-array member in struct phm_samu_clock_voltage_dependency_table, instead of a one-element array, and use the struct_size() helper to calculate the size for the allocation. Also, save some heap space as the original code is multiplying table->numEntries by sizeof(struct phm_samu_clock_voltage_dependency_table) when it should have been multiplied it by sizeof(struct phm_samu_clock_voltage_dependency_record) instead. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays Build-tested-by: kernel test robot Link: https://lore.kernel.org/lkml/5f7c5d3a.ryM4GmZr3e0JeZy+%25lkp@intel.com/ Acked-by: Christian König Signed-off-by: Gustavo A. R. Silva Signed-off-by: Alex Deucher commit aa8d10a10fd78443a647983cc5e4c233bbe2c963 Author: Gustavo A. R. Silva Date: Wed Oct 7 11:07:38 2020 -0500 drm/amd/pm: Replace one-element array with flexible-array in struct phm_cac_leakage_table There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. Refactor the code according to the use of a flexible-array member in struct phm_cac_leakage_table, instead of a one-element array, and use the struct_size() helper to calculate the size for the allocation. Also, save some heap space as the original code is multiplying table->ucNumEntries by sizeof(struct phm_cac_leakage_table) when it should have been multiplied it by sizeof(struct phm_cac_leakage_record) instead. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays Build-tested-by: kernel test robot Link: https://lore.kernel.org/lkml/5f7c5d38.iT%2FQTjN+659XUDo5%25lkp@intel.com/ Acked-by: Christian König Signed-off-by: Gustavo A. R. Silva Signed-off-by: Alex Deucher commit 637f7576ece1db9474a6d4700fdcef3c82ea87b5 Author: Gustavo A. R. Silva Date: Wed Oct 7 11:06:48 2020 -0500 drm/amd/pm: Replace one-element array with flexible-array in struct phm_vce_clock_voltage_dependency_table There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. Refactor the code according to the use of a flexible-array member in struct phm_vce_clock_voltage_dependency_table, instead of a one-element array, and use the struct_size() helper to calculate the size for the allocation. Also, save some heap space as the original code is multiplying table->numEntries by sizeof(struct phm_vce_clock_voltage_dependency_table) when it should have multiplied it by sizeof(struct phm_vce_clock_voltage_dependency_record) instead. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays Build-tested-by: kernel test robot Link: https://lore.kernel.org/lkml/5f7c5d35.pJToGs3H9khZK6ws%25lkp@intel.com/ Acked-by: Christian König Signed-off-by: Gustavo A. R. Silva Signed-off-by: Alex Deucher commit 9526e431c5260eeebfa575ff38f2d5cd6077f8f9 Author: Gustavo A. R. Silva Date: Wed Oct 7 11:06:14 2020 -0500 drm/amd/pm: Replace one-element array with flexible-array in struct phm_phase_shedding_limits_table There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. Refactor the code according to the use of a flexible-array member in struct phm_phase_shedding_limits_table, instead of a one-element array, and use the struct_size() helper to calculate the size for the allocation. Also, save some heap space as the original code is multiplying ptable->ucNumEntries by sizeof(struct phm_phase_shedding_limits_table) when it should have multiplied it by sizeof(struct phm_phase_shedding_limits_record) instead. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays Build-tested-by: kernel test robot Link: https://lore.kernel.org/lkml/5f7c5d36.6PStUZp2HRxAz7IM%25lkp@intel.com/ Acked-by: Christian König Signed-off-by: Gustavo A. R. Silva Signed-off-by: Alex Deucher commit 0e319cfeb3c3e13088e78bfc379df15358f59fb0 Author: Gustavo A. R. Silva Date: Wed Oct 7 11:05:22 2020 -0500 drm/amd/pm: Replace one-element array with flexible-array in struct phm_acp_clock_voltage_dependency_table There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. Refactor the code according to the use of a flexible-array member in struct phm_acp_clock_voltage_dependency_table, instead of a one-element array, and use the struct_size() helper to calculate the size for the allocation. Also, save some heap space as the original code is multiplying table->numEntries by sizeof(struct phm_acp_clock_voltage_dependency_table) when it should have multiplied it by sizeof(phm_acp_clock_voltage_dependency_record) instead. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays Build-tested-by: kernel test robot Link: https://lore.kernel.org/lkml/5f7c5d3c.TyfOhg%2FA6JycL6ZN%25lkp@intel.com/ Acked-by: Christian König Signed-off-by: Gustavo A. R. Silva Signed-off-by: Alex Deucher commit 737123d67e02fdd6597aaac168e0c17e984c4234 Author: Gustavo A. R. Silva Date: Wed Oct 7 11:04:49 2020 -0500 drm/amd/pm: Replace one-element array with flexible-array in struct phm_uvd_clock_voltage_dependency_table There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. Refactor the code according to the use of a flexible-array member in struct phm_uvd_clock_voltage_dependency_table, instead of a one-element array, and use the struct_size() helper to calculate the size for the allocation. Also, save some heap space as the original code is multiplying table->numEntries by sizeof(struct phm_uvd_clock_voltage_dependency_table) when it should have multiplied it by sizeof(phm_uvd_clock_voltage_dependency_record) instead. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays Build-tested-by: kernel test robot Link: https://lore.kernel.org/lkml/5f7c433e.pXkC6KsN6HN%2FLdhj%25lkp@intel.com/ Acked-by: Christian König Signed-off-by: Gustavo A. R. Silva Signed-off-by: Alex Deucher commit e0af7d1110121abe9801ff2b8411537332b24cd1 Author: Gustavo A. R. Silva Date: Wed Oct 7 11:04:12 2020 -0500 drm/amd/pm: Replace one-element array with flexible-array in struct phm_clock_array There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. Refactor the code according to the use of a flexible-array member in struct phm_clock_array, instead of a one-element array, and use the struct_size() helper to calculate the size for the allocation. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays Build-tested-by: kernel test robot Link: https://lore.kernel.org/lkml/5f7c433f.ZyMD+YUIVAwiHGVe%25lkp@intel.com/ Acked-by: Christian König Signed-off-by: Gustavo A. R. Silva Signed-off-by: Alex Deucher commit 2b6106575625f65b7d6025a2136405629c2eb21d Author: Gustavo A. R. Silva Date: Wed Oct 7 11:03:27 2020 -0500 drm/amd/pm: Replace one-element array with flexible-array member in struct vi_dpm_table There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. Use a flexible-array member in struct vi_dpm_table instead of a one-element array. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays Build-tested-by: kernel test robot Link: https://lore.kernel.org/lkml/5f7c433c.TTk9rnA+F58kyDUy%25lkp@intel.com/ Acked-by: Christian König Signed-off-by: Gustavo A. R. Silva Signed-off-by: Alex Deucher commit 23bdba959b3dbe241e02ee12d04bb5134d1a1d19 Author: Gustavo A. R. Silva Date: Wed Oct 7 11:02:26 2020 -0500 drm/amd/pm: Replace one-element array with flexible-array member There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. Refactor the code according to the use of a flexible-array member in struct phm_clock_voltage_dependency_table, instead of a one-element array, and use the struct_size() helper to calculate the size for the allocation. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays Build-tested-by: kernel test robot Link: https://lore.kernel.org/lkml/5f7c295c.8iqp1Ifc6oiVDq%2F%2F%25lkp@intel.com/ Acked-by: Christian König Signed-off-by: Gustavo A. R. Silva Signed-off-by: Alex Deucher commit 63b9d9aa8582f13ad265abbf15681e690cfa2109 Author: Ville Syrjälä Date: Thu Oct 8 13:16:08 2020 +0300 drm/i915: s/int/u32/ for aux_offset/alignment ggtt offsets/alignments are u32 everywhere else. Don't use a signed int for them here. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201008101608.8652-3-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit a007138e89dce8d880c0ea41324e0a75e5bbb7de Author: Ville Syrjälä Date: Fri Oct 9 15:00:28 2020 +0300 drm/i915: Skip aux plane stuff when there is no aux plane when the hardware isn't going to use the aux plane there's no real point in dealing with the relevant hardware restrictions. So let's just skip all that when not necessary. We can now also remove the offset=~0xfff behaviour for unused color planes. Let's just zero out everyting so as to not leave stale garbage behind to confuse people debugging the code. v2: Explicitly set AUX_DIST to zero when there is no aux plane Reviewed-by: Imre Deak #v1 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201009120028.32422-1-ville.syrjala@linux.intel.com commit 79148ce4b25d418327feca8abb2f7392d49f5259 Author: Ville Syrjälä Date: Thu Oct 8 13:16:06 2020 +0300 drm/i915: Set all unused color plane offsets to ~0xfff again When the number of potential color planes grew to 4 we stopped setting all unused color plane offsets to ~0xfff. The code still tries to do this, but actually does nothing since the loop limits are bogus. skl_check_main_surface() actually depends on this ~0xfff behaviour as it will make sure to move the main surface offset below the aux surface offset because the hardware AUX_DIST must be a non-negative value [1], and for simplicity it doesn't bother checking if the AUX plane is actually needed or not. So currently it may end up shuffling the main surface around based on some stale leftover AUX offset. The skl+ plane code also just blindly calculates the AUX_DIST whether or not the AUX plane is actually needed by the hw or not, and that too will now potentially use some stale AUX surface offset in the calculation. Would seem nicer to guarantee a consistent non-negative AUX_DIST always. So bring back the original ~0xfff offset behaviour for unused color planes. Though it doesn't seem super likely that this inconsistency would cause any real issues. Cc: Dhinakaran Pandiyan Cc: Lucas De Marchi Cc: Imre Deak Cc: Radhakrishna Sripada Fixes: 2dfbf9d2873a ("drm/i915/tgl: Gen-12 display can decompress surfaces compressed by the media engine") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201008101608.8652-1-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit 0f8d2a2b9fd52a554a3e00f415baf2f7eed9e9af Author: Ville Syrjälä Date: Mon Oct 5 20:14:41 2020 +0300 drm/i915: Rename i915_{save,restore}_state() i915_{save,restore}_state() are actually all about the display. Currently they are split into display part + SWF part. But since the SWF part is also related to the display let's just move that part into its own thing and flip the roles around so that the current display part is the main function. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201005171441.26612-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit f13c2a0032f025fadb57443ed7c2e8eb8e9571df Author: Ville Syrjälä Date: Thu Oct 1 18:16:40 2020 +0300 drm/i915: Wait for VLV/CHV/BXT/GLK DSI panel power cycle delay on reboot As with eDP and LVDS we should also respect the power cycle delay on DSI panels. We are not using the power sequencer for these, and we have no optimizations around the sleep duration, so we just msleep() the whole thing away. Note that the ICL+ DSI code doesn't seem to have any power off/power cycle delay handling whatsoever. The only thing it handles is the power on delay. As that looks pretty busted in general I won't bother dealing with it for the time being. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201001151640.14590-6-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit d2008827d37a69fb6b21c66ea82999b4c4ab0c7c Author: Ville Syrjälä Date: Thu Oct 1 18:16:39 2020 +0300 drm/i915: Wait for LVDS panel power cycle delay on reboot Just like with eDP let's wait for the power sequencer power cycle delay before we reboot the machine, as otherwise we can't guarantee the panel's minimum power cycle delay will be respected. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201001151640.14590-5-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit e219ef912a025a5e80e6bc9622620100763285fc Author: Ville Syrjälä Date: Thu Oct 1 18:16:38 2020 +0300 drm/i915: Wait for eDP panel power cycle delay on reboot on all platforms Extend the eDP panel power cycle delay wait on reboot handling to cover all platforms. No reason to think that VLV/CHV are in any way special since the documentation states that the hardware power cycle delay goes back to its default value on reset, and that may not be enough for all panels. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201001151640.14590-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 063348f6a72634c8825e500bd315892a9de6a13a Author: Ville Syrjälä Date: Thu Oct 1 18:16:37 2020 +0300 drm/i915: Replace the VLV/CHV eDP reboot notifier with the .shutdown() hook Currently VLV/CHV use a reboot notifier to make sure the panel power cycle delay isn't violated across a system reboot. Replace that with the new encoder .shutdown() hook. And let's also stop overriding the power cycle delay with the max value. No idea why the current code does that. The already programmed delay should be correct. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201001151640.14590-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 100fe4c01efff5e3b930c7aaff9c2ebeb78d1b87 Author: Ville Syrjälä Date: Thu Oct 1 18:16:36 2020 +0300 drm/i915: Add an encoder .shutdown() hook Add a new encoder hook .shutdown() which will get called at the end of the pci .shutdown() hook. We shall use this to deal with the panel power cycle delay issues. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201001151640.14590-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit fe0f1e3bfdfeb53e18f1206aea4f40b9bd1f291c Author: Ville Syrjälä Date: Thu Oct 1 18:16:35 2020 +0300 drm/i915: Shut down displays gracefully on reboot Implement the pci .shutdown() hook in order to quiesce the hardware prior to reboot. The main purpose here is to turn all displays off. Some displays/other drivers tend to get confused if the state after reboot isn't exactly as they expected. One specific example was the Dell UP2414Q in MST mode. It would require me to pull the power cord after a reboot or else it would just not come back to life. Sadly I don't have that at hand anymore so not sure if it's still misbehaving without the graceful shutdown, or if we managed to fix something else since I last tested it. For good measure we do a gem suspend as well, so that we match the suspend flow more closely. Also stopping all DMA and whatnot is probably a good idea for kexec. I would expect that some kind of GT reset happens on normal reboot so probably not totally necessary there. v2: Use the pci .shutdown() hook instead of a reboot notifier (Lukas) Do the gem suspend for kexec (Chris) Cc: Lukas Wunner Cc: Chris Wilson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201001151640.14590-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula Reviewed-by: Chris Wilson commit ec5722adb8b23d851a77412004e8faae4f83dfd0 Author: Simon Ser Date: Wed Jun 24 13:01:31 2020 +0000 drm/fourcc: document modifier uniqueness requirements There have suggestions to bake pitch alignment, address alignment, contiguous memory or other placement (hidden VRAM, GTT/BAR, etc) constraints into modifiers. Last time this was brought up it seemed like the consensus was to not allow this. Document this in drm_fourcc.h. There are several reasons for this. - Encoding all of these constraints in the modifiers would explode the search space pretty quickly (we only have 64 bits to work with). - Modifiers need to be unambiguous: a buffer can only have a single modifier. - Modifier users aren't expected to parse modifiers (except drivers). v2: add paragraph about aliases (Daniel) v3: fix unrelated changes sent with the patch v4: disambiguate users between driver and higher-level programs (Brian, Daniel) v5: fix AFBC example (Brian, Daniel) v6: remove duplicated paragraph (Daniel) Signed-off-by: Simon Ser Reviewed-by: Daniel Vetter Reviewed-by: Brian Starkey Cc: Daniel Stone Cc: Bas Nieuwenhuizen Cc: Dave Airlie Cc: Marek Olšák Cc: Alex Deucher Cc: Neil Armstrong Cc: Michel Dänzer Link: https://patchwork.freedesktop.org/patch/msgid/MGwgeXojKNdNXjCxuMhRlwcJM4vdYph_WJcMeGPPGMcRKtHV41XAXlh2tCc-pPJZCAhS3gwbWMWTd8f03NBA2ZYKfr0QxLhcPivpopr5c6M=@emersion.fr commit 178c72350d39d69448ac7b0e5be2dfbaef6d6d6d Author: Thomas Zimmermann Date: Fri May 22 15:52:29 2020 +0200 drm/aspeed: Set driver CMA functions with DRM_GEM_CMA_DRIVER_OPS DRM_GEM_CMA_DRIVER_OPS sets the functions in struct drm_driver to their defaults. No functional changes are made. Signed-off-by: Thomas Zimmermann Reviewed-by: Joel Stanley Acked-by: Emil Velikov Signed-off-by: Joel Stanley Link: https://patchwork.freedesktop.org/patch/msgid/20200603083132.4610-5-tzimmermann@suse.de commit 351f950db4ab28c321a1bd4b92e4bb03e34c4703 Author: Maxime Ripard Date: Thu Oct 8 14:44:08 2020 +0200 drm/atomic: Pass the full state to CRTC atomic enable/disable If the CRTC driver ever needs to access the full DRM state, it can't do so at atomic_enable / atomic_disable time since drm_atomic_helper_swap_state will have cleared the pointer from the struct drm_crtc_state to the struct drm_atomic_state before calling those hooks. In order to allow that, let's pass the full DRM state to atomic_enable and atomic_disable. The conversion was done using the coccinelle script below, built tested on all the drivers and actually tested on vc4. virtual report @@ struct drm_crtc_helper_funcs *FUNCS; identifier dev, state; identifier crtc, crtc_state; @@ disable_outputs(struct drm_device *dev, struct drm_atomic_state *state) { <... - FUNCS->atomic_disable(crtc, crtc_state); + FUNCS->atomic_disable(crtc, state); ...> } @@ struct drm_crtc_helper_funcs *FUNCS; identifier dev, state; identifier crtc, crtc_state; @@ drm_atomic_helper_commit_modeset_enables(struct drm_device *dev, struct drm_atomic_state *state) { <... - FUNCS->atomic_enable(crtc, crtc_state); + FUNCS->atomic_enable(crtc, state); ...> } @@ identifier crtc, old_state; @@ struct drm_crtc_helper_funcs { ... - void (*atomic_enable)(struct drm_crtc *crtc, struct drm_crtc_state *old_state); + void (*atomic_enable)(struct drm_crtc *crtc, struct drm_atomic_state *state); ... - void (*atomic_disable)(struct drm_crtc *crtc, struct drm_crtc_state *old_state); + void (*atomic_disable)(struct drm_crtc *crtc, struct drm_atomic_state *state); ... } @ crtc_atomic_func @ identifier helpers; identifier func; @@ ( static struct drm_crtc_helper_funcs helpers = { ..., .atomic_enable = func, ..., }; | static struct drm_crtc_helper_funcs helpers = { ..., .atomic_disable = func, ..., }; ) @ ignores_old_state @ identifier crtc_atomic_func.func; identifier crtc, old_state; @@ void func(struct drm_crtc *crtc, struct drm_crtc_state *old_state) { ... when != old_state } @ adds_old_state depends on crtc_atomic_func && !ignores_old_state @ identifier crtc_atomic_func.func; identifier crtc, old_state; @@ void func(struct drm_crtc *crtc, struct drm_crtc_state *old_state) { + struct drm_crtc_state *old_state = drm_atomic_get_old_crtc_state(state, crtc); ... } @ depends on crtc_atomic_func @ identifier crtc_atomic_func.func; expression E; type T; @@ void func(...) { ... - T state = E; + T crtc_state = E; <+... - state + crtc_state ...+> } @ depends on crtc_atomic_func @ identifier crtc_atomic_func.func; type T; @@ void func(...) { ... - T state; + T crtc_state; <+... - state + crtc_state ...+> } @ depends on crtc_atomic_func @ identifier crtc_atomic_func.func; identifier old_state; identifier crtc; @@ void func(struct drm_crtc *crtc, - struct drm_crtc_state *old_state + struct drm_atomic_state *state ) { ... } @ include depends on adds_old_state @ @@ #include @ no_include depends on !include && adds_old_state @ @@ + #include #include Signed-off-by: Maxime Ripard Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/845aa10ef171fc0ea060495efef142a0c13f7870.1602161031.git-series.maxime@cerno.tech commit c76eb35587f556f48dc380ce7964e3254cba916d Author: Ondrej Jirman Date: Sun Feb 23 00:51:52 2020 +0100 drm: aspeed: Fix GENMASK misuse Arguments to GENMASK should be msb >= lsb. Signed-off-by: Ondrej Jirman Reviewed-by: Andrew Jeffery Signed-off-by: Joel Stanley Link: https://patchwork.freedesktop.org/patch/msgid/20200222235152.242816-1-megous@megous.com commit 696029eb36c08d7b60097cae44a6269bfa68b51c Author: Joel Stanley Date: Wed Sep 16 18:04:13 2020 +0930 drm/aspeed: Add sysfs for output settings These settings are used by an ASPEED BMC to determine when the host is trying to drive the display over PCIe (vga_pw) and to switch the output between PCIe and the internal graphics device (dac_mux). The valid values for the dac mux are: 00: VGA mode (default, aka PCIe) 01: Graphics CRT (aka BMC internal graphics, this driver) 10: Pass through mode from video input port A 11: Pass through mode from video input port B Values for the read-only vga password register are: 1: Host driving the display 0: Host not driving the display Signed-off-by: Joel Stanley Reviewed-by: Andrew Jeffery Link: https://patchwork.freedesktop.org/patch/msgid/20200916083413.777307-1-joel@jms.id.au commit 82e1b93ad8b95a1667708164220ed137d6f3adfb Author: Christian König Date: Thu Oct 8 10:03:22 2020 +0200 dma-buf: use struct_size macro Instead of manually calculating the structure size. Signed-off-by: Christian König Reviewed-by: Gustavo A. R. Silva Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/394252/ commit 1a11a88cfd9a97e13be8bc880c4795f9844fbbec Author: Boris Brezillon Date: Fri Oct 2 14:25:06 2020 +0200 drm/panfrost: Fix job timeout handling If more than two jobs end up timeout-ing concurrently, only one of them (the one attached to the scheduler acquiring the lock) is fully handled. The other one remains in a dangling state where it's no longer part of the scheduling queue, but still blocks something in scheduler, leading to repetitive timeouts when new jobs are queued. Let's make sure all bad jobs are properly handled by the thread acquiring the lock. v3: - Add Steven's R-b - Don't take the sched_lock when stopping the schedulers v2: - Fix the subject prefix - Stop the scheduler before returning from panfrost_job_timedout() - Call cancel_delayed_work_sync() after drm_sched_stop() to make sure no timeout handlers are in flight when we reset the GPU (Steven Price) - Make sure we release the reset lock before restarting the schedulers (Steven Price) Fixes: f3ba91228e8e ("drm/panfrost: Add initial panfrost driver") Cc: Signed-off-by: Boris Brezillon Reviewed-by: Steven Price Signed-off-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/20201002122506.1374183-1-boris.brezillon@collabora.com commit 9073d4ed8da47ce53f5447a18ff39cd64d4aee71 Author: Daniel Vetter Date: Fri Sep 25 10:46:51 2020 +0200 drm/atomic: debug output for EBUSY Hopefully we'll have the drm crash recorder RSN, but meanwhile compositors would like to know a bit better why they get an EBUSY. v2: Move misplaced hunk to the right patch (Pekka) Acked-by: Pekka Paalanen Reviewed-by: Daniel Stone Cc: Sean Paul Cc: Daniel Stone Cc: Pekka Paalanen Cc: Simon Ser Cc: Ville Syrjälä Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200925084651.3250104-2-daniel.vetter@ffwll.ch commit fb6473a48b635c55d04eb94e579eede52ef39550 Author: Daniel Vetter Date: Fri Sep 25 10:46:50 2020 +0200 drm/atomic: document and enforce rules around "spurious" EBUSY When doing an atomic modeset with ALLOW_MODESET drivers are allowed to pull in arbitrary other resources, including CRTCs (e.g. when reconfiguring global resources). But in nonblocking mode userspace has then no idea this happened, which can lead to spurious EBUSY calls, both: - when that other CRTC is currently busy doing a page_flip the ALLOW_MODESET commit can fail with an EBUSY - on the other CRTC a normal atomic flip can fail with EBUSY because of the additional commit inserted by the kernel without userspace's knowledge For blocking commits this isn't a problem, because everyone else will just block until all the CRTC are reconfigured. Only thing userspace can notice is the dropped frames without any reason for why frames got dropped. Consensus is that we need new uapi to handle this properly, but no one has any idea what exactly the new uapi should look like. Since this has been shipping for years already compositors need to deal no matter what, so as a first step just try to enforce this across drivers better with some checks. v2: Add comments and a WARN_ON to enforce this only when allowed - we don't want to silently convert page flips into blocking plane updates just because the driver is buggy. v3: Fix inverted WARN_ON (Pekka). v4: Drop the uapi changes, only add a WARN_ON for now to enforce some rules for drivers. v5: Make the WARNING more informative (Daniel) v6: Add unconditional debug output for compositor hackers to figure out what's going on when they get an EBUSY (Daniel) v7: Fix up old/new_crtc_state confusion for real (Pekka/Ville) Acked-by: Pekka Paalanen Reviewed-by: Daniel Stone References: https://lists.freedesktop.org/archives/dri-devel/2018-July/182281.html Bugzilla: https://gitlab.freedesktop.org/wayland/weston/issues/24#note_9568 Cc: Daniel Stone Cc: Pekka Paalanen Cc: Simon Ser Cc: Ville Syrjälä Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200925084651.3250104-1-daniel.vetter@ffwll.ch commit a76fa3540fc33de4718b386aea37ed4a7236d253 Author: Daniel Vetter Date: Wed Oct 7 15:30:35 2020 +0200 drm/fb-helper: Add locking to sysrq handling We didn't take the kernel_fb_helper_lock mutex, which protects that code. While at it, simplify the code - inline the function (originally shared with kgdb I think) - drop the error tracking and all the complications - drop the pointless early out, it served nothing Acked-by: Thomas Zimmermann Signed-off-by: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201007133036.1541639-1-daniel.vetter@ffwll.ch commit 5a3884320a5753395e7167a74f4be257d490a578 Author: Melissa Wen Date: Tue Oct 6 19:30:06 2020 -0300 drm/vkms: update todo Drop issues already resolved in vkms: - CRC API Improvements to [1] add igt test to check extreme alpha values and [2] alpha blending; - [3] prime buffer sharing; - [4] writeback support; On the other hand, we also found or thought about other improvements since the last update of this document: - better support for IGT tests - improvements to writeback support - syzbot report Finally, we reorder items by the assumed complexity. [1] https://patchwork.freedesktop.org/series/55944/ [2] https://patchwork.freedesktop.org/series/80823/ [3] https://patchwork.freedesktop.org/series/63212/ [4] https://patchwork.freedesktop.org/series/81177/ v2: - Link to syzbot dashboard Cc: Daniel Vetter Cc: Rodrigo Siqueira Cc: Haneen Mohammed Signed-off-by: Melissa Wen Acked-by: Daniel Vetter Reviewed-by: Rodrigo Siqueira Link: https://patchwork.freedesktop.org/patch/msgid/20201006223006.gu55pjtuaigkh6il@smtp.gmail.com commit 67807f52e395be751fb665511d1a9a5e6a93f1f7 Author: Matt Roper Date: Tue Oct 6 17:22:10 2020 -0700 drm/i915/dg1: provide port/phy mapping for vbt As with RKL, DG1's VBT outputs are indexed according to PHY rather than DDI. Signed-off-by: Matt Roper Reviewed-by: Lucas De Marchi Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20201007002210.3678024-8-lucas.demarchi@intel.com commit e73e4c59ac43b10c771aaa4ac65602aee0bcbf8d Author: Matt Roper Date: Tue Oct 6 17:22:09 2020 -0700 drm/i915/dg1: Update comp master/slave relationships for PHYs As with RKL, DG1's PHY C acts as a comp master for PHY D. Bspec: 49291 Signed-off-by: Matt Roper Signed-off-by: Lucas De Marchi Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20201007002210.3678024-7-lucas.demarchi@intel.com commit 0642c2b837495b6c6b60349c0e4e1b4fe2bedc0a Author: Matt Roper Date: Tue Oct 6 17:22:08 2020 -0700 drm/i915/dg1: Don't program PHY_MISC for PHY-C and PHY-D The only bit we use in PHY_MISC is DE_IO_COMP_PWR_DOWN, and the bspec details for that bit tell us that it need only be set for PHY-A and PHY-B. It also turns out that there isn't even an instance of the PHY_MISC register for PHY-D on this platform. Let's extend the EHL/RKL logic that conditionally skips PHY_MISC usage to DG1 as well. Bspec: 50107 Cc: Aditya Swarup Cc: Clinton Taylor Signed-off-by: Matt Roper Signed-off-by: Lucas De Marchi Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20201007002210.3678024-6-lucas.demarchi@intel.com commit fb7318c37afac6c6c7d18f893b3df962388cf763 Author: Lucas De Marchi Date: Tue Oct 6 17:22:07 2020 -0700 drm/i915/dg1: gmbus pin mapping Add tables to map the GMBUS pin pairs to GPIO registers and port to DDC. From spec we have registers GPIO_CTL[1-4], so we should not do the 4->9 mapping as in ICL/TGL. The values for VBT seem wrong in BSpec. For the current boards we actually have a 1:1 mapping. BSpec: 49311, 49945, 20124 Cc: Aditya Swarup Cc: Matt Roper Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20201007002210.3678024-5-lucas.demarchi@intel.com commit eafeb204b4730bac1f1701183cd05c7fe2e81e0f Author: Venkata Sandeep Dhanalakota Date: Tue Oct 6 17:22:06 2020 -0700 drm/i915/dg1: Increase mmio size to 4MB On DGFX the register range has been extended to go up to 8MB. However we only actually use up to address 280000h, so let's increase it to 4MB. v2 (Lucas): add bspec reference and reword commit message to explain the 4 vs 8 MB used (requested by Matt Roper) Bspec: 53616 Cc: Daniele Ceraolo Spurio Cc: Michael J. Ruhl Signed-off-by: Venkata Sandeep Dhanalakota Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20201007002210.3678024-4-lucas.demarchi@intel.com commit 2606b269234b3180470b0408e7c2416bfc828d78 Author: Lucas De Marchi Date: Tue Oct 6 17:22:05 2020 -0700 drm/i915/dg1: Define MOCS table for DG1 DG1 has a new MOCS table. We still use the old definition of the table, but as for any dgfx card it doesn't contain the control_value values (these values don't matter as we won't program them). Bspec: 45101 v2: Reword the comment to state that the last few entries are reserved instead of "the last two". DG1 reserves four instead of two from previous platforms (from Matt Roper) Cc: Daniele Ceraolo Spurio Cc: Rodrigo Vivi Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20201007002210.3678024-3-lucas.demarchi@intel.com commit 27a6bc802bd90a08960f716e48693420226f1d03 Author: Matt Roper Date: Tue Oct 6 17:22:04 2020 -0700 drm/i915/dg1: Initialize RAWCLK properly DG1 always uses a 38.4 MHz rawclk rather than the 19.2/24 MHz frequencies on CNP+. Note that register bits associated with this frequency confusingly use 37 for the divider field rather than 38 as you might expect. For simplicity, let's just assume that this 38.4 MHz frequency will hold true for other future platforms with "fake" PCH south displays and that the CNP-style behavior will remain for other platforms with a real PCH. Bspec: 49950 Bspec: 49309 Cc: Aditya Swarup Cc: Clinton Taylor Cc: Lucas De Marchi Signed-off-by: Matt Roper Signed-off-by: Lucas De Marchi Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20201007002210.3678024-2-lucas.demarchi@intel.com commit b50b7991b739c6d63658e3324a01eaa0fafe8b7f Author: Lucas De Marchi Date: Tue Oct 6 17:22:03 2020 -0700 drm/i915/dg1: add more PCI ids Synchronize with the current list of DG1 PCI IDs. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20201007002210.3678024-1-lucas.demarchi@intel.com commit cf72562094a0930ea158ca6e7c4eab9c71deab2a Author: José Roberto de Souza Date: Mon Oct 5 10:54:47 2020 -0700 drm/i915/display/ehl: Limit eDP to HBR2 Recent update in documentation defeatured eDP HBR3 for EHL and JSL. v2: - Remove dead code in ehl_get_combo_buf_trans() v3: - Rebase BSpec: 32247 Cc: Matt Roper Cc: Vidya Srinivas Reviewed-by: Matt Roper Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20201005175447.93430-1-jose.souza@intel.com commit 5d731b5ac30167533281d5338a6ce4061df5ef3e Author: Thong Thai Date: Fri May 15 17:02:07 2020 -0400 drm/amdgpu: enable vcn support for green_sardine (v2) Enable Green_Sardine VCN support and VCN firmware loading v2: use apu flags Signed-off-by: Thong Thai Signed-off-by: Alex Deucher commit c3db2f529fa87e3c283e480c608a3c61ab1186b9 Author: Aaron Liu Date: Thu Oct 1 17:54:32 2020 -0400 drm/amdgpu: enable green_sardine_asd.bin loading (v2) This patch enable green_sardine_asd.bin loading. v2: use apu flags Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Reviewed-by: Prike Liang Signed-off-by: Alex Deucher commit f74d0535e9276acbf5ef2ced6a2d8bb5c6d9b36c Author: Prike Liang Date: Wed Nov 6 14:12:52 2019 +0800 drm/amdgpu/sdma: add sdma engine support for green_sardine (v2) Initialize the SDMA IP for green_sardine. v2: use apu flags Signed-off-by: Prike Liang Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit ad698da31fc0fc452b8d7a290df0b032dce9b7b6 Author: Prike Liang Date: Wed Nov 6 13:42:28 2019 +0800 drm/amdgpu: add gfx support for green_sardine (v2) Enable the gfx base HW function of green_sardine. v2: use apu flags Signed-off-by: Prike Liang Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 5baf415085f3e8ad15e65a9c36b4dc927b362546 Author: Prike Liang Date: Wed Nov 6 11:17:02 2019 +0800 drm/amdgpu: add soc15 common ip block support for green_sardine (v3) This patch adds common ip support for green_sardine. v2: use apu flags, squash in CG/PG enablement v3: rebase Signed-off-by: Prike Liang Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 2e62f0b5a5bc25fe164ca80f1aee253b9bebff8a Author: Prike Liang Date: Thu Oct 1 17:52:15 2020 -0400 drm/amdgpu: add green_sardine support for gpu_info and ip block setting (v2) This patch adds green_sardine support for gpu_info firmware and ip block setting. v2: use apu flag Signed-off-by: Prike Liang Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit d205c3cc1a6c9f49c3d07c22d7d471c13ecdaf62 Author: Alex Deucher Date: Fri May 15 16:32:36 2020 -0400 drm/amdgpu: add Green_Sardine APU flag Will be used for Green_Sardine which is a new APU. Signed-off-by: Alex Deucher commit e500dc638d954b9b211a6425ff31c9706bf7509f Author: Alex Deucher Date: Tue Oct 6 09:10:24 2020 -0400 drm/amdgpu: prevent spurious warning The default auto setting for kcq should not generate a warning. Fixes: a300de40f66b ("drm/amdgpu: introduce a new parameter to configure how many KCQ we want(v5)") Reviewed-by: Kent Russell Signed-off-by: Alex Deucher commit d74a09c8af5f7efc07d15e6c362b50ac43b70026 Author: Alex Deucher Date: Tue Oct 6 09:20:47 2020 -0400 drm/amdgpu/swsmu: fix ARC build errors We want to use the dev_* functions here rather than the pr_* variants. Switch to using dev_warn() which mirrors what we do on other asics. Fixes the following build errors on ARC: ../drivers/gpu/drm/amd/amdgpu/../powerplay/navi10_ppt.c: In function 'navi10_fill_i2c_req': ../arch/arc/include/asm/bug.h:24:2: error: implicit declaration of function 'pr_warn'; did you mean 'drm_warn'? [-Werror=implicit-function-declaration] ../drivers/gpu/drm/amd/amdgpu/../powerplay/sienna_cichlid_ppt.c: In function 'sienna_cichlid_fill_i2c_req': ../arch/arc/include/asm/bug.h:24:2: error: implicit declaration of function 'pr_warn'; did you mean 'drm_warn'? [-Werror=implicit-function-declaration] Reported-by: kernel test robot Cc: Randy Dunlap Cc: Evan Quan Cc: Vineet Gupta Cc: linux-snps-arc@lists.infradead.org Acked-by: Randy Dunlap Signed-off-by: Alex Deucher commit a9d17930adff802d97a58a7d705c8182c735043d Author: Jonathan Kim Date: Tue Sep 1 23:59:21 2020 -0400 drm/amdgpu: add xgmi perfmons for arcturus Add xgmi perfmons for Arcturus. v4: Align with patch 2 with struct improvements v3: Align with patch 2 streamlining perf types versus event config types. v2: Resend for re-review with alignment for v3 in patch 2. Signed-off-by: Jonathan Kim Tested-by: Chris Freehill Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher commit b4a7db71ea060218529e6a4c660c37687ecb5669 Author: Jonathan Kim Date: Tue Sep 1 20:21:00 2020 -0400 drm/amdgpu: add per device user friendly xgmi events for vega20 Non-outbound data metrics are non useful so mark them as legacy. Bucket new perf counters into device and not device ip. Bind events to chip instead of IP. Report available event counters and not number of hw counter banks. Move DF public macros to private since not needed outside of IP version. v5: cleanup by moving per chip configs into structs v4: After more discussion, replace *_LEGACY references with IP references to indicate concept of pmu-typed versus event-config-typed event registration. v3: attr groups const array is global but attr groups are allocated per device which doesn't work and causes problems on memory allocation and de-allocation for pmu unregister. Switch to building const attr groups per pmu instead to simplify solution. v2: add comments on sysfs structure and formatting. Signed-off-by: Jonathan Kim Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher commit 576e0ec26b68ff4cd58d1222a5988a4d29711e2a Author: Jonathan Kim Date: Thu Jun 18 10:40:14 2020 -0400 drm/amdgpu: fix xgmi perfmon a-b-a problem Mapping hw counters per event config will cause ABA problems so map per event instead. v2: Discontinue starting perf counters if add fails. Make it clear what's happening with pmc_start. Signed-off-by: Jonathan Kim Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher commit 955a341f33b75b8baa6536b283e08e73f3a989da Author: Christian König Date: Tue Sep 29 17:39:57 2020 +0200 drm/ttm: move ttm_set_memory.h out of include This is not something drivers should use. Signed-off-by: Christian König Reviewed-by: Michael J. Ruhl Link: https://patchwork.freedesktop.org/patch/393430/ commit 72dc6e3b948c40bd1d78c7cf1b9d32c92a756328 Author: Christian König Date: Wed Oct 7 10:51:29 2020 +0200 drm/ttm: remove ttm_bo_unmap_virtual_locked declaration v2 That was missed during the cleanup. v2: fix comment in vmwgfx as well Signed-off-by: Christian König Reviewed-by: Michael J. Ruhl Link: https://patchwork.freedesktop.org/patch/394092/ commit d7c59750f274acb0aace9b09692eda282a5b01e7 Author: Christian König Date: Thu Oct 1 16:22:42 2020 +0200 drm/vmwgfx: move ttm_bo_swapout_all into vmwgfx It is the sole user of this. Signed-off-by: Christian König Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/393498/ commit 4561b366c70e312698361154bdfe1e04f596056b Author: Christian König Date: Thu Oct 1 16:17:55 2020 +0200 drm/ttm: drop glob parameter from ttm_bo_swapout We can always access the global state. Signed-off-by: Christian König Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/393499/ commit 4ce032d64c2a30cf5b23c57b3328d5d2dab99a1f Author: Christian König Date: Thu Oct 1 15:21:00 2020 +0200 drm/ttm: nuke ttm_bo_evict_mm and rename mgr function v3 Make it more clear what the resource manager function does and nuke the wrapper function. v2: nuke the wrapper v3: fix typo in radeon, rebased Signed-off-by: Christian König Reviewed-by: Daniel Vetter (v2) Link: https://patchwork.freedesktop.org/patch/393914/ commit bf9bd6a5128a2a366b5a13e916c1f76393ff7ba8 Author: Chris Wilson Date: Tue Oct 6 10:46:53 2020 +0100 drm/i915/gt: Track the most recent pulse for the heartbeat Since we track the idle_pulse for flushing the barriers and avoid re-emitting the pulse upon idling if no futher action is required, this also impacts the heartbeat. Before emitting a fresh heartbeat, we look at the engine idle status and assume that if the pulse was the last request emitted along the heartbeat, the engine is idling and a heartbeat pulse not required. This assumption fails, but we can reuse the idle pulse as the heartbeat if we are yet to emit one, and so track the status of that pulse for our engine health check. This impacts tgl/rcs0 as we rely on the heartbeat for our healthcheck for the normal preemption detection mechanism is disabled by default. Testcase: igt/gem_exec_schedule/preempt-hang/rcs0 #tgl Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20201006094653.7558-1-chris@chris-wilson.co.uk commit 3b53d304856b85ee2357264dfd39730b9c1674f5 Author: Christian König Date: Tue Sep 29 17:32:35 2020 +0200 drm/ttm: cleanup ttm_handle_caching_state_failure Remove unused parameters, shorten the function name. Signed-off-by: Christian König Reviewed-by: Michael J. Ruhl Link: https://patchwork.freedesktop.org/patch/393431/ commit 1e17792de06fe74daf44a97a8dff7d357c783acc Author: Christian König Date: Tue Sep 29 17:33:17 2020 +0200 drm/ttm: remove TTM_PAGE_FLAG_WRITE Not used any more. Signed-off-by: Christian König Reviewed-by: Michael J. Ruhl Link: https://patchwork.freedesktop.org/patch/393429/ commit 8e6cb56b67fe2a57c0da8f8dea93dfab863d8935 Author: Dave Airlie Date: Tue Oct 6 10:06:44 2020 +1000 drm/ttm: make move callback compulstory All drivers should have a move callback now so make it compulsory. Reviewed-by: Christian König Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20201006000644.1005758-6-airlied@gmail.com commit 2b8283ff1a60d201e92f0d48c4918a035dbe82fe Author: Dave Airlie Date: Tue Oct 6 10:06:43 2020 +1000 drm/vram_helper: implement a ttm move callback. This will always do memcpy moves. Acked-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20201006000644.1005758-5-airlied@gmail.com commit bcff5d3e3bab979d820bbabd3f0be13ae6ce6cf5 Author: Dave Airlie Date: Tue Oct 6 10:06:42 2020 +1000 drm/vmwgfx: add a move callback. This just copies the fallback to vmwgfx, I'm going to iterate on this a bit until it's not the same as the fallback path. Acked-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20201006000644.1005758-4-airlied@gmail.com commit 279a3010218d517284641b7dac2d65c0ecef78ab Author: Dave Airlie Date: Tue Oct 6 10:06:41 2020 +1000 drm/vmwgfx: move null mem checks outside move notifies Both fns checked mem == NULL, just move the check outside. Acked-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20201006000644.1005758-3-airlied@gmail.com commit 881c4117957bc39390930f8344c600858a72179b Author: Dave Airlie Date: Tue Oct 6 10:06:40 2020 +1000 drm/qxl: drop unused code (v2) v2: drop the wrapper struct Acked-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20201006000644.1005758-2-airlied@gmail.com commit 934941ed5a3070a7833c688c9b1d71484fc01a68 Author: Tvrtko Ursulin Date: Tue Oct 6 10:25:08 2020 +0100 drm/i915: Fix DMA mapped scatterlist lookup As the previous patch fixed the places where we walk the whole scatterlist for DMA addresses, this patch fixes the random lookup functionality. To achieve this we have to add a second lookup iterator and add a i915_gem_object_get_sg_dma helper, to be used analoguous to existing i915_gem_object_get_sg_dma. Therefore two lookup caches are maintained per object and they are flushed at the same point for simplicity. (Strictly speaking the DMA cache should be flushed from i915_gem_gtt_finish_pages, but today this conincides with unsetting of the pages in general.) Partial VMA view is then fixed to use the new DMA lookup and properly query sg length. v2: * Checkpatch. Signed-off-by: Tvrtko Ursulin Cc: Joonas Lahtinen Cc: Chris Wilson Cc: Matthew Auld Cc: Lu Baolu Cc: Tom Murphy Cc: Logan Gunthorpe Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20201006092508.1064287-2-tvrtko.ursulin@linux.intel.com commit 8a473dbadccfc6206150de3db3223c40785da348 Author: Tvrtko Ursulin Date: Tue Oct 6 10:25:07 2020 +0100 drm/i915: Fix DMA mapped scatterlist walks When walking DMA mapped scatterlists sg_dma_len has to be used since it can be different (coalesced) from the backing store entry. This also means we have to end the walk when encountering a zero length DMA entry and cannot rely on the normal sg list end marker. Both issues were there in theory for some time but were hidden by the fact Intel IOMMU driver was never coalescing entries. As there are ongoing efforts to change this we need to start handling it. v2: * Use unsigned int for local storing sg_dma_len. (Logan) Signed-off-by: Tvrtko Ursulin References: 85d1225ec066 ("drm/i915: Introduce & use new lightweight SGL iterators") References: b31144c0daa8 ("drm/i915: Micro-optimise gen6_ppgtt_insert_entries()") Reported-by: Tom Murphy Suggested-by: Tom Murphy # __sgt_iter Suggested-by: Logan Gunthorpe # __sgt_iter Cc: Joonas Lahtinen Cc: Chris Wilson Cc: Matthew Auld Cc: Lu Baolu Reviewed-by: Logan Gunthorpe Link: https://patchwork.freedesktop.org/patch/msgid/20201006092508.1064287-1-tvrtko.ursulin@linux.intel.com commit 25dc89d5270f8bc96e792207de72300d840b7076 Author: Chris Wilson Date: Tue Sep 29 12:26:39 2020 +0100 drm/i915/gt: Scrub HW state on remove Currently we do a final scrub of the HW state upon release. However, when rebinding the device, this is too late as the device may either have been partially rebound or the device is no longer accessible. If the device has been removed before release, the reset goes astray leaving the device in an inconsistent state, unlikely to work without a full PCI reset. Furthermore, if the device is partially rebound before the HW scrubbing, there may be leftover HW state that should have been scrubbed. Either way, we need to push the scrubbing earlier before the removal, so into unregister. The danger is that on older machines, resetting the GPU also impact the display engine and so the reset should be after modesetting is disabled (and before reuse we need to recover modesetting). Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2508 Testcase: igt/core_hotunplug Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200929112639.24223-1-chris@chris-wilson.co.uk commit 0e2497e334de42dbaaee8e325241b5b5b34ede7e Author: Imre Deak Date: Sat Oct 3 03:18:46 2020 +0300 drm/i915/tgl: Fix Combo PHY DPLL fractional divider for 38.4MHz ref clock Apply Display WA #22010492432 for combo PHY PLLs too. This should fix a problem where the PLL output frequency is slightly off with the current PLL fractional divider value. I haven't seen an actual case where this causes a problem, but let's follow the spec. It's also needed on some EHL platforms, but for that we also need a way to distinguish the affected EHL SKUs, so I leave that for a follow-up. v2: - Apply the WA at one place when calculating the PLL dividers from the frequency and the frequency from the dividers for all the combo PLL use cases (DP, HDMI, TBT). (Ville) Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20201003001846.1271151-6-imre.deak@intel.com commit f9e76a6e68d39a13c269999cfb2df23054c5146b Author: Imre Deak Date: Tue Oct 6 02:01:54 2020 +0300 drm/i915: Add an encoder hook to sanitize its state during init/resume Atm, if a full modeset is performed during the initial modeset the link training will happen with uninitialized max DP rate and lane count. Make sure the corresponding encoder state is initialized by adding an encoder hook called during driver init and system resume. A better alternative would be to store all states in the CRTC state and make this state available for the link re-training code. Also instead of the DPCD read in the hook there should be really a proper sink HW readout in place. Both of these require a bigger rework, so for now opting for this minimal fix to make at least full initial modesets work. The patch is based on https://patchwork.freedesktop.org/patch/101473/?series=10354&rev=3 v2: (Ville) - s/sanitize_state/sync_state/ - No point in calling the hook when CRTC is disabled, remove the call. - No point in calling the hook for MST, remove it. v3: Check only DPCD_REV to avoid clobbering intel_dp->dpcd. (Ville) Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20201005230154.1477653-1-imre.deak@intel.com commit 7d6287a8481242cb0f324a2937258f240036dd17 Author: Imre Deak Date: Sat Oct 3 03:18:44 2020 +0300 drm/i915: Check for unsupported DP link rates during initial commit Some BIOSes set an unsupported/imprecise DP link rate (for instance on TGL A stepping). Make sure that we do an encoder recompute and a modeset in this case. Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20201003001846.1271151-4-imre.deak@intel.com commit b671d6ef8b20ffc2161e1e803f8c7b143e1b1615 Author: Imre Deak Date: Tue Oct 6 00:53:10 2020 +0300 drm/i915: Move the initial fastset commit check to encoder hooks Move the checks to decide whether a fastset is possible during the initial commit to an encoder hook. This check is really encoder specific and the next patch will also require this adding a DP encoder specific check. v2: Fix negated condition in gen11_dsi_initial_fastset_check(). v3: Make sure to call the hook for all encoders on the crtc. (Ville) Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20201005215311.1475666-1-imre.deak@intel.com commit 7a8a95f5dc4c1232b7f88b62340cacf8876f80ff Author: Imre Deak Date: Tue Oct 6 04:35:55 2020 +0300 drm/i915/skl: Work around incorrect BIOS WRPLL PDIV programming The BIOS of at least one ASUS-Z170M system with an SKL I have programs the 101b WRPLL PDIV divider value, which is the encoding for PDIV=7 with bit#0 incorrectly set. This happens with the "3840x2160": 30 262750 3840 3888 3920 4000 2160 2163 2168 2191 0x48 0x9 HDMI mode (scaled from a 1024x768 src fb) set by BIOS and the ref_clock=24000, dco_integer=383, dco_fraction=5802, pdiv=7, qdiv=1, kdiv=1 WRPLL parameters (assuming PDIV=7 was the intended setting). This corresponds to 262749 PLL frequency/port clock. Later the driver sets the same mode for which it calculates the same dco_int/dco_frac/div WRPLL parameters (with the correct PDIV=7 encoding). Based on the above, let's assume that PDIV=7 was intended and the HW just ignores bit#0 in the PDIV register field for this setting, treating 100b and 101b encodings the same way. While at it add the MISSING_CASE() for the p0,p2 divider decodings. v2: (Ville) - Add a define for the incorrect divider value. - Emit only a debug message when detecting the incorrect divider value. - Use fallthrough from the incorrect divider value case. - Add the MISSING_CASE()s. v3: Return 0 freq for incorrect divider values. (Ville) Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20201006013555.1488262-1-imre.deak@intel.com commit a6c5e2aea70451f6f1012734a606721c75c57276 Author: Chris Wilson Date: Thu Oct 1 11:26:32 2020 +0100 drm/i915: Skip over MI_NOOP when parsing Though less likely in practice, igt uses MI_NOOP frequently to pad out its batch buffers. The lookup and valiation of so many MI_NOOP command descriptions is noticeable, though the side-effect of poisoning the last-validated-command cache is more likely to impact upon real CS. Testcase: igt/gen9_exec_parse/bb-large Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20201001102632.18789-1-chris@chris-wilson.co.uk commit 8117713d7804d168f91edebcb498067664c38e6e Author: Dave Airlie Date: Thu Sep 24 15:18:28 2020 +1000 drm/nouveau/ttm: memcpy waits for bo already no need for driver to wait here. Signed-off-by: Dave Airlie Reviewed-by: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/20200924051845.397177-29-airlied@gmail.com commit 12b68474e6d550ccbe7c47b8e293b6ef05cea3eb Author: Dave Airlie Date: Thu Sep 24 15:18:05 2020 +1000 drm/nouveau/ttm: handle ttm moves properly. The idea is to flip the core over to calling the driver always, so add support for moves here. Signed-off-by: Dave Airlie Acked-by: Christian König Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200924051845.397177-6-airlied@gmail.com commit f9c730ede7d3f40900cb493890d94d868ff2f00f Author: Matt Roper Date: Wed Sep 30 23:39:17 2020 -0700 drm/i915/dg1: Wait for pcode/uncore handshake at startup DG1 does some additional pcode/uncore handshaking at boot time; this handshaking must complete before various other pcode commands are effective and before general work is submitted to the GPU. We need to poll a new pcode mailbox during startup until it reports that this handshaking is complete. The bspec doesn't give guidance on how long we may need to wait for this handshaking to complete. For now, let's just set a really long timeout; if we still don't get a completion status by the end of that timeout, we'll just continue on and hope for the best. v2 (Lucas): Rename macros to make clear the relation between command and result (requested by José) Bspec: 52065 Cc: Clinton Taylor Cc: Ville Syrjälä Cc: Radhakrishna Sripada Signed-off-by: Matt Roper Signed-off-by: Lucas De Marchi Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20201001063917.3133475-2-lucas.demarchi@intel.com commit b1e93a85f8e969721e1e28766ab54e84ba35c24e Author: Lucas De Marchi Date: Wed Sep 30 23:39:16 2020 -0700 drm/i915: don't conflate is_dgfx with fake lmem When using fake lmem for tests, we are overriding the setting in device info for dgfx devices. Current users of IS_DGFX() except one are correct. However, as we add support for DG1, we are going to use it in additional places to trigger dgfx-only code path. In future if we need we can use HAS_LMEM() instead of IS_DGFX() in the places that make sense to also contemplate fake lmem use. v2: update gen8_gmch_probe() to use HAS_LMEM(): we need to steal the mappable aperture later(which is fine since it doesn't exist on "DGFX"), and use it as a substitute for LMEMBAR. The !mappable aperture property is also useful since it exercises some other parts of the code too. (Matthew Auld) Signed-off-by: Lucas De Marchi Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20201001063917.3133475-1-lucas.demarchi@intel.com commit 4b74ed75ae1303022c7a1da07e941302da31db46 Author: Aric Cyr Date: Mon Sep 28 10:40:26 2020 -0400 drm/amd/display: 3.2.106 Signed-off-by: Aric Cyr Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit a13e25618842d4edaeee2cee73117b8b869bd3b2 Author: Anthony Koo Date: Mon Sep 28 09:12:59 2020 -0400 drm/amd/display: [FW Promotion] Release 0.0.36 Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 9485af4e4d88806d27c0ceaab1e7c56619a6f7bd Author: Alvin Lee Date: Sat Sep 26 12:46:34 2020 -0400 drm/amd/display: Only flush inst_fb if backdoor loading [Why] DAL resume from BACO time is longer if we always flush inst_fb [How] Check if backdoor loading to flush inst_fb Signed-off-by: Alvin Lee Reviewed-by: Nicholas Kazlauskas Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 480c5b8ff8757405e07ba938f5c565ecdf38d981 Author: Alvin Lee Date: Fri Sep 25 12:24:48 2020 -0400 drm/amd/display: Program meta addresses correctly [Why] When forcing 3D mode in DAL, we set the right address to be the same as the left address. We need to do the same for the meta addresses. [How] Program right meta to be same as left meta. Signed-off-by: Alvin Lee Reviewed-by: Aric Cyr Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit b98ab70e748e54b6b53abc2a20380ceb01e421fc Author: Sung Lee Date: Thu Sep 24 16:21:21 2020 -0400 drm/amd/display: Hardcode 45W Bounding Box for DCN2.1 Diags [WHY] Currently construction of clock limits gets skipped for diags. This logic would be useful to get tested in diags. [HOW] Copy existing states to clk_table such that update_bw_bounding_box logic gets used to fill the table. Signed-off-by: Sung Lee Reviewed-by: Tony Cheng Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 5dff371a7351a7e9cbb06bca9e532db16594c053 Author: Aric Cyr Date: Tue Sep 22 21:37:06 2020 -0400 drm/amd/display: FreeSync not active near lower bound of non-LFC monitor range [Why] On narrow range monitors without LFC, a margin prevents good utilization of the available range. [How] Decrease the margin for exiting fixed mode and fix the frame counter to reset if a non-consecutive render is found. Signed-off-by: Aric Cyr Reviewed-by: Anthony Koo Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 9b42868c3fd44fb1e910a9af361b5d470e2354c7 Author: Dmytro Laktyushkin Date: Wed Sep 16 16:49:08 2020 -0400 drm/amd/display: Fix OPTC_DATA_FORMAT programming This should be programmed with timing rather than with odm. Signed-off-by: Dmytro Laktyushkin Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit b15cde19c32d8d543eae2e3cc7c51ba688b12551 Author: Charlene Liu Date: Mon Sep 21 14:24:09 2020 -0400 drm/amd/display: Add i2c speed arbitration for dc_i2c and hdcp_i2c [why] HDCP 1.4 failed on SL8800 SW w/a test driver use. [how] Slow down the HW i2c speed when used by HW i2c. This request: each acquired_i2c_engine setup the i2c speed needed and sets the I2c engine for HDCP use at release_engine. This covers SW using HW i2c engine and HDCP using HW i2c engine. for dmcu using HW i2c engine, needs add similar logic in dmcu fw. Signed-off-by: Charlene Liu Reviewed-by: Chris Park Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 54e8094a76bc8cd41d1ec5c2c2a8755e64349142 Author: Yongqiang Sun Date: Fri Sep 18 16:33:55 2020 -0400 drm/amd/display: Block ABM in case of eDP ODM [Why] enable ODM on eDP panel with ABM will result in color difference on the panel due to only one ABM module to set one pipe. [How] Block ABM in case of ODM enabled on eDP. Signed-off-by: Yongqiang Sun Reviewed-by: Eric Yang Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 7c4ed1df0a59541b0c40c468df52217c2e03c210 Author: Joshua Aberback Date: Wed Sep 23 15:12:39 2020 -0400 drm/amd/display: Copy WM values from set A to other sets in hw_init [Why] When we transfer the WM range table to SMU, they can perform a watermark switch right away. This can be a problem if we're in not in accelerated mode during hw_init as SMU may initiate a dummy p-state change before the rest of the watermarks are programmed. Watermark set A is defined to be sufficient for all cases, so we can copy the values from set A to all other sets, avoiding any issues from SMU doing WM switches. [How] - new hubbub func init_watermarks - copy register values from set A to all other sets - call init_watermarks before calling notify_wm_ranges Signed-off-by: Joshua Aberback Reviewed-by: Jun Lei Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 3e19095534caec6be8f8c1a7d8fd4879e23637ed Author: Joshua Aberback Date: Wed Apr 29 19:01:14 2020 -0400 drm/amd/display: Force enable pstate on driver unload [Why] During driver unload, it is expected that p-state switching is supported. If it's not supported, PMFW will hang due to a forced p-state switch. Even if the current timing does not support p-state normally, we still want to force allow because the worst that can happen is underflow. This will match Navi10 behaviour. [How] - new hubbub func to control the force pstate register - force allow when releasing display ownership - registers are inaccessible after due to m_cgs.hwNotAvailable - explicitly disable force signal during hw_init - if driver is disabled and re-enabled, register not cleared otherwise Also, remove DCN3 part of dcn10_init_hw, we will not be going back to it. Signed-off-by: Joshua Aberback Reviewed-by: Jun Lei Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit fe984cb3dd325c4c5c7c360e43d93608d4d8870a Author: Felipe Date: Thu Sep 3 11:06:28 2020 -0400 drm/amd/display: Fixed comments (uniform style) [WHY] This change was implemented because the comment style was not uniform across the file. In some lines comments were initiated with // and in others they were in between /* ... */. Additionally, the style for multi-line comments was also not uniform and some comment lines were missing the space between the opening /* and the first word of the comment. [HOW] All comments are now in between /*.../*, multi line comments also use /*...*/ and for every comment there is now a space between the opening /* and the first word of the comment. Signed-off-by: Felipe Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit f7fb81a18f026b70e42ccc95c7d4485b0cdbfbbf Author: Aric Cyr Date: Fri Sep 18 11:45:04 2020 -0400 drm/amd/display: Check for flip pending before locking pipes [Why] When running games or benchmarking with v-sync disabled, disabling a plane (which is v-sync) can cause underflow. This is caused by flips pending before pipe locking being applied after locks are released and pipes could have been re-arranged or disconnected. This could potentially apply a flip on incorrect pipe. Also, previous logic of always locking pipes was unnecessary. [How] Only lock the pipes when there is a pipe being disabled to increase efficiency. Before the pipes are locked, check that any pending flips are cleared to ensure the flips are applied to the correct pipe. Signed-off-by: Aric Cyr Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 6fbd1e171075955852e5ddc3fadf8ac45f7ca464 Author: Alvin Lee Date: Mon Sep 21 16:23:25 2020 -0400 drm/amd/display: Don't allow pstate if no support in blank [Why] We will hang if we report switch in VACTIVE but not in VBLANK and DPG_EN = 1 [How] Block switch in ACTIVE if not supported in BLANK Signed-off-by: Alvin Lee Reviewed-by: Jun Lei Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 322b1fdd2007e7c6619ba2decb683177eeaa9e88 Author: Aric Cyr Date: Mon Sep 21 10:39:25 2020 -0400 drm/amd/display: 3.2.105 Signed-off-by: Aric Cyr Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 894052d6416bfe65af283c0265be532a834fab96 Author: Huang Rui Date: Thu Sep 17 12:03:38 2020 -0400 drm/amdgpu: add van gogh pci id Add Van Gogh PCI id support. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 469989ca4cb3da8e54bff61dd1eda684025844aa Author: Roman Li Date: Wed Sep 23 17:02:12 2020 -0400 drm/amd/display: Add dcn3.01 support to DM Update dm for vangogh support. Signed-off-by: Roman Li Signed-off-by: Alex Deucher commit 3a83e4e64bb1522ddac67ffc787d1c38291e1a65 Author: Roman Li Date: Tue Sep 29 11:21:58 2020 -0400 drm/amd/display: Add dcn3.01 support to DC (v2) Update dc for vangogh support. v2: fix compilation without DCN 301 set. Signed-off-by: Roman Li Signed-off-by: Alex Deucher commit ac0dc4c5a0760c9a9437d5864c277d9d2554a6ec Author: Huang Rui Date: Tue Sep 22 19:08:31 2020 +0800 drm/amdgpu: enable gfx clock gating and power gating for vangogh This patch is to enable the gfx cg and pg for vangogh. Signed-off-by: Huang Rui Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 3eb4c56422c7b8e3f567b2412d0c4f09f2899fb8 Author: Huang Rui Date: Tue Sep 22 18:59:07 2020 +0800 drm/amdgpu: add gfx power gating for gfx10 This patch adds power gating handler for gfx10. v2: simplify function Signed-off-by: Huang Rui Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 682b1f4c039db0f7eabf69735b038ddf0b94c73a Author: Alex Deucher Date: Thu Sep 17 12:26:27 2020 -0400 drm/amdgpu/mmhub2.3: print client id string for mmhub Print the name of the client rather than the number. This makes it easier to debug what block is causing the fault. Signed-off-by: Alex Deucher commit 8bb3aa1a833f316374d5331005d7d7d2c648c0ac Author: Alex Deucher Date: Fri Aug 28 11:42:44 2020 -0400 drm/amdgpu: IP discovery table is not ready yet for VG Fallback to legacy path for now. Signed-off-by: Alex Deucher commit 8447675327f8305aeaeebbd9e570303a219bb44d Author: Huang Rui Date: Wed Sep 30 12:37:42 2020 -0400 drm/amdgpu: disable gfxoff on vangogh for the moment (v2) GFXOFF will be enabled once it's verified on real asic. v2: move check into gfx10 module. Signed-off-by: Huang Rui Reviewed-by: Aaron Liu Signed-off-by: Alex Deucher commit ed3b73533235e21d2657cdc764cb7ce5d160559a Author: Huang Rui Date: Thu Sep 17 12:02:12 2020 -0400 drm/amdgpu: enable psp support for vangogh This patch is to enable psp support for vangogh Signed-off-by: Huang Rui Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 5120cb54098210502b200b3c77f008def0f7609f Author: Huang Rui Date: Thu Aug 27 17:33:32 2020 -0400 drm/amdgpu: add TOC firmware support for apu (v3) APU needs load toc firmware for gfx10 series on psp front door loading. v2: rebase against latest code v3: clarify error message Signed-off-by: Huang Rui Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 6fbcb00c7984fa7d49af2c361453c0397cdea400 Author: Huang Rui Date: Mon Jul 20 16:11:10 2020 +0800 drm/amdgpu: add TOC firmware definition This patch is to add TOC firmware definition on uapi. Signed-off-by: Huang Rui Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit c821e0fbb2584bd565c3276d06f0d0889c04db59 Author: Huang Rui Date: Thu May 28 15:46:41 2020 +0800 drm/amdgpu: add smu ip block for vangogh This patch is to add ip block for vangogh. Signed-off-by: Huang Rui Acked-by: Alex Deucher Reviewed-by: Aaron Liu Signed-off-by: Alex Deucher commit fd0fc24889f21fb4b10716c05752cb3a5f598dbc Author: Huang Rui Date: Thu Aug 27 11:44:54 2020 -0400 drm/amd/powerplay: add vangogh ppt into swSMU This patch is to add vangogh ppt funcions into swSMU block. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit fd8ba3f1a7352d1f8f73a6c003bc83281c770fa0 Author: Huang Rui Date: Thu Aug 27 11:38:13 2020 -0400 drm/amd/powerplay: partially enable swsmu for vangogh This patch is to partially enable swSMU for vangogh for the moment. Signed-off-by: Huang Rui Acked-by: Alex Deucher Reviewed-by: Aaron Liu Signed-off-by: Alex Deucher commit f46a221b703e617ae67d885267dc3de65490ef6a Author: Xiaojian Du Date: Thu Aug 27 11:34:01 2020 -0400 drm/amdgpu/powerplay: add smu initialize funcitons for vangogh (v4) This patch is to add smu initialize functions for vangogh. v2: squash in updates v3: drop duplicate table entries v4: rebase fixes Signed-off-by: Xiaojian Du Reviewed-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 88779658698d5c65d88b071361f70232a6557d7d Author: Xiaojian Du Date: Thu Sep 17 12:00:49 2020 -0400 drm/amdgpu/powerplay: add vangogh asic name in smu v11 (v2) This patch is to add vangogh asic name in smu v11. v2: drop smu firmware name (N/A for VG) Signed-off-by: Xiaojian Du Reviewed-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit e89616baf761215317d95c6de3e17bf5f8385b39 Author: Xiaojian Du Date: Thu Aug 27 11:28:22 2020 -0400 drm/amdgpu/powerplay: add smu v11.5 smc header for vangogh This patch is to add smu v11.5 smc header for vangogh. Signed-off-by: Xiaojian Du Reviewed-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit b44694a1111c661685aa878429ca7cbb1614d3d3 Author: Xiaojian Du Date: Thu Aug 27 11:27:38 2020 -0400 drm/amdgpu/powerplay: add smu v11.5 firmware header for vangogh (v2) This patch is to add smu v11.5 firmware header for vangogh v2: squash in updates Signed-off-by: Xiaojian Du Reviewed-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 572083bd99adeab698fce2a1579509099e910aae Author: Xiaojian Du Date: Thu Aug 27 11:26:30 2020 -0400 drm/admgpu/powerplay: add smu v11.5 driver interface header for vangogh This patch is to add smu v11.5 driver interface header for vangogh. Signed-off-by: Xiaojian Du Reviewed-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit f57d62a00a348530375f0dfca889d0848dadc782 Author: Xiaojian Du Date: Thu Sep 17 11:59:28 2020 -0400 drm/amdgpu/powerplay: add new smu messages and feature masks for vangogh (v2) This patch is to add new smu messages and feature masks for vangogh. v2: squash in updates and typo fixes Signed-off-by: Xiaojian Du Reviewed-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit a7e91bd71848db26cef3502f5f8196f83e7a8d36 Author: Huang Rui Date: Thu Aug 27 12:02:37 2020 -0400 drm/amdgpu: add nbio v7.2 for vangogh (v2) VanGogh uses nbio v7.2, and a couple of offsets are changed since nbio v2.3 for navi series, so add new nbio v7.2 block. v2: squash in fix for sdma and vcn instances Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 5de54343d5eff6b4dcd077aa3aa8e701b9232317 Author: Huang Rui Date: Thu Aug 27 12:01:26 2020 -0400 drm/amdgpu: add pcie port indirect read and write on nv This patch is to add pcie port indirect read/write callback for nv series. They will be used for new asic. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b4e532d67821e9ccd1757b6458c72a7d02b107ce Author: Thong Thai Date: Thu Aug 27 11:35:13 2020 -0400 drm/amdgpu: enable vcn3.0 for van gogh Same as other VCN 3.0 asics. Signed-off-by: Thong Thai Signed-off-by: Alex Deucher commit 4d8d75a45c7ce7f6a0b9dff510be5be8e34febb4 Author: Huang Rui Date: Mon Dec 16 16:30:13 2019 +0800 drm/amdgpu: add mmhub v2.3 for vangogh (v4) There are too many register offset mismatch between mmhub v2.0 and v2.3. E.X: mmMM_ATC_L2_MISC_CG: 0x064a(v2.0) 0x06cd(v2.3) mmMMVM_L2_PROTECTION_FAULT_CNTL: 0x0688(v2.0) 0x0708(v2.3) mmMMVM_CONTEXT0_PAGE_TABLE_BASE_ADDR_LO32: 0x072b(v2.0) 0x0940(v2.3) mmMMVM_CONTEXT0_PAGE_TABLE_BASE_ADDR_HI32: 0x072c(v2.0) 0x0941(v2.3) mmMMVM_INVALIDATE_ENG0_REQ: 0x06e3(v2.0) 0x0a01(v2.3) mmMMVM_INVALIDATE_ENG0_ACK: 0x06f5(v2.0) 0x0a02(v2.3) mmMMVM_CONTEXT0_CNTL: 0x06c0(v2.0) 0x0740(v2.3) mmMMVM_L2_PROTECTION_FAULT_STATUS: 0x068c(v2.0) 0x070c(v2.3) mmMMVM_L2_PROTECTION_FAULT_CNTL: 0x0688(v2.0) 0x0708(v2.3) mmMM_ATC_L2_MISC_CG: 0x064a(v2.0) 0x06cd(v2.3) mmDAGB0_CNTL_MISC2: 0x0071(v2.0) 0x0096(v2.3) ... Continuing using the same file mmhub v2.0 is not good choice, it will introduce a lot of checking with ASIC types. And also easy to introduce the issues that offset not align, this kind of issues are really hard to find. Van Gogh's mmhub vm invalidation is actually caused by the offset mismatch as well. So it would like to create a new file rather than stick to re-use orignal mmhub v2.0 here. v2: add missed translate_further programming. v3: sync with latest code v4: add missing callbacks Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 3a5e715de15ca8b383484f8315e38660e108574c Author: Huang Rui Date: Thu Aug 27 11:13:04 2020 -0400 drm/amdkfd: add Van Gogh KFD support This patch is to add GFX10 based APU Van Gogh KFD support. We will treat Van Gogh as "dgpu" (bypass IOMMU v2). Signed-off-by: Huang Rui Acked-by: Alex Deucher Reviewed-by: Yong Zhao Signed-off-by: Alex Deucher commit 88edbad6ed065725cdea55e86afa4ab0c399dfc1 Author: Huang Rui Date: Sat Oct 12 20:02:39 2019 +0800 drm/amdgpu: set ip blocks for van gogh Enable ip blocks for van gogh. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 54c98eacf3b93f6b8dad7c042e06ce9971663fb7 Author: Huang Rui Date: Thu Aug 27 11:05:50 2020 -0400 drm/amdgpu: add sdma support for van gogh This patch adds the sdma v5.2 support for van gogh. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 1ec743ac9ffe774fc3e9ef7943fb7a60dd8e67ab Author: Alex Deucher Date: Tue Sep 1 12:20:17 2020 -0400 drm/amdgpu/gfx10: add updated register offsets for VGH Signed-off-by: Alex Deucher commit ad088550d23205d072d15fdce6a93bf07709c99a Author: Huang Rui Date: Thu Aug 27 11:41:23 2020 -0400 drm/amdgpu: add gfx golden settings for vangogh (v3) This patch is to add gfx golden settings for vangogh post si. v2: squash in updates v3: fix SPI register offset Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 6c266fb56cb8565c4f74de9bf9a31e47a0a35820 Author: Huang Rui Date: Thu Aug 27 11:01:40 2020 -0400 drm/amdgpu: add gfx support for van gogh (v3) Add van gogh checks to gfx10 code. v2: squash in fixes v3: fix mode Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b0ebc8e9444406d16c88adab2ab29748ed34b62a Author: Huang Rui Date: Fri Oct 11 21:15:06 2019 +0800 drm/amdgpu: set fw load type for van gogh This patch sets fw load type as direct for van gogh for the moment. Will switch to psp when psp is ready. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 6405e627a0ad844ad7509989be48279f4a83d7ae Author: Huang Rui Date: Wed Sep 30 12:32:30 2020 -0400 drm/amdgpu: add gmc v10 supports for van gogh (v4) Add gfx memory controller support for van gogh. v2: don't use dynamic invalidate eng allocation for van gogh. v3: squash in other fixes v4: rebase Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 15c90a1fbcb1621be0ba492bc5d7b88edf3d2e22 Author: Huang Rui Date: Fri Aug 28 17:54:31 2020 +0800 drm/amdgpu: get the correct vram type for van gogh This patch is to get the correct vram type from atombios for van gogh. Signed-off-by: Huang Rui Signed-off-by: Alex Deucher commit b9d90cb031c488d77a47084a009655d235e3d765 Author: Roman Li Date: Sat Sep 19 16:21:53 2020 -0400 drm/amdgpu/atomfirmware: Add edp and integrated info v2.1 tables Required for vangogh. Signed-off-by: Roman Li Reviewed-by: Alex Deucher Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit af118ed9ef9fc6c6cc37f2db3d4aa2b66b2c4335 Author: Huang Rui Date: Fri Aug 28 17:50:33 2020 +0800 drm/amdgpu: update new memory types in atomfirmware header Add new nemory types in atomfirmware header. Signed-off-by: Huang Rui Signed-off-by: Alex Deucher commit 1e483203965bdab466af0739c1edf7da07da241d Author: Huang Rui Date: Fri Aug 28 17:35:12 2020 +0800 drm/amdgpu: add uapi to define van gogh memory type This patch adds van gogh memory type as DDR5. Signed-off-by: Huang Rui Signed-off-by: Alex Deucher commit bf13cb1f4620d63349e302e169f7b3365e39fbfb Author: Huang Rui Date: Thu Jul 9 11:32:50 2020 +0800 drm/amdgpu: use gpu virtual address for interrupt packet write space for vangogh The interrupts are not stable while uses guest physical address (GPA) for interrupt packet write space even on direct loading case. v2: make condition more readable Signed-off-by: Huang Rui Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit bd4f28117ef21a7bd8a4321e68293e839067052e Author: Huang Rui Date: Thu Aug 27 10:48:49 2020 -0400 drm/amdgpu: add van gogh support for ih block This patch adds the support for van gogh ih block. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit fced3c3a4655a55db34b2729007dee554e4c2306 Author: Huang Rui Date: Fri Aug 28 22:54:32 2020 +0800 drm/amdgpu: skip sdma1 in nv_allowed_read_registers list for van gogh (v2) Van gogh only has one sdma. v2: use num_instances rather than APU flag Signed-off-by: Huang Rui Signed-off-by: Alex Deucher commit 026570e633105023a9b8ea2d296df5abd2bf1134 Author: Huang Rui Date: Thu Aug 27 10:46:19 2020 -0400 drm/amdgpu: add nv common ip block support for van gogh This patch adds common ip support for van gogh. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 1f9dab43c2cc19e69e368541ab8959859676e543 Author: Huang Rui Date: Thu Aug 27 10:44:17 2020 -0400 drm/amdgpu: add vangogh_reg_base_init function for van gogh This patch adds vangogh_reg_base_init function to init the register base for van gogh. v2: make vangogh_reg_base_init void, align equality sign Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 4e52a9f8d5706b0be6b10912ed1397c9a90ccb8d Author: Huang Rui Date: Fri Sep 25 15:38:38 2020 -0400 drm/amdgpu: add van gogh support for gpu_info and ip block setting This patch adds van gogh support for gpu_info firmware and ip block setting. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit f7b2cdb23abf62bc3d33c2e0b0009a09412ff475 Author: Huang Rui Date: Fri Oct 11 15:52:30 2019 +0800 drm/amdgpu: add uapi to define van gogh series Add a flag to define van gogh series. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 4f1e9a76bde0f9c266e87f7efe8ddee6416e99ba Author: Huang Rui Date: Thu Aug 27 10:40:29 2020 -0400 drm/amdgpu: add van gogh asic_type enum (v2) This patch adds van gogh to amd_asic_type enum and amdgpu_asic_name[]. v2: add missing comma Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit a5b2c10c05ef12739be9907cc35acd33dff09020 Author: Huang Rui Date: Sun Oct 20 08:39:44 2019 +0800 drm/amdgpu: add vangogh asic header files (v2) This patch is to add vangogh asic header files. v2: squash in updates Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit dac4ec775aa1cae4ac6d37ae135c862636541e78 Author: Marek Szyprowski Date: Wed Sep 30 13:40:42 2020 +0200 drm/bridge: tc358764: restore connector support This patch restores DRM connector registration in the TC358764 bridge driver and restores usage of the old drm_panel_* API, thus allows dynamic panel registration. This fixes panel operation on Exynos5250-based Arndale board. This is equivalent to the revert of the following commits: 1644127f83bc "drm/bridge: tc358764: add drm_panel_bridge support" 385ca38da29c "drm/bridge: tc358764: drop drm_connector_(un)register" and removal of the calls to drm_panel_attach()/drm_panel_detach(), which were no-ops and has been removed in meanwhile. Signed-off-by: Marek Szyprowski Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20200930114042.5806-1-m.szyprowski@samsung.com commit f3d52908f6baffc21ba45058103d0226ca5cb073 Author: Rikard Falkeborn Date: Sun Oct 4 22:06:53 2020 +0200 drm: bridge: dw-hdmi: Constify dw_hdmi_i2s_ops The only usage of dw_hdmi_i2s_ops is to assign its address to the ops field in the hdmi_codec_pdata struct, which is a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201004200653.14702-1-rikard.falkeborn@gmail.com commit 4e19d51ca5b28a1d435a844c7b2a8e1b1b6fa237 Author: Tom Rix Date: Sat Oct 3 12:39:28 2020 -0700 drm/gma500: fix double free of gma_connector clang static analysis reports this problem: cdv_intel_dp.c:2101:2: warning: Attempt to free released memory kfree(gma_connector); ^~~~~~~~~~~~~~~~~~~~ In cdv_intel_dp_init() when the call to cdv_intel_edp_panel_vdd_off() fails, the handler calls cdv_intel_dp_destroy(connector) which does the first free of gma_connector. So adjust the goto label and skip the second free. Fixes: d112a8163f83 ("gma500/cdv: Add eDP support") Signed-off-by: Tom Rix Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201003193928.18869-1-trix@redhat.com commit 170fb58ee329bcfa8dc4c0c5eab0ea5af7fb7f3b Author: Boris Brezillon Date: Fri Oct 2 08:55:18 2020 +0200 drm/sched: Avoid infinite waits in the drm_sched_entity_destroy() path If we don't initialize the entity to idle and the entity is never scheduled before being destroyed we end up with an infinite wait in the destroy path. v2: - Add Steven's R-b Signed-off-by: Boris Brezillon Reviewed-by: Steven Price Reviewed-by: Christian König Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/393486/ commit 01370532b72e954989a3175eabe47f90fc6d2a6b Author: Gowtham Tammana Date: Wed Aug 26 16:44:09 2020 +0300 drm/tidss: Add prepare_fb to the plane helper funcs drm_gem_fb_prepare_fb() extracts fence and attaches to plane state. The fence info is needed if implicit fencing is used. Add this as prepare_fb function pointer to plane helper funcs. Signed-off-by: Gowtham Tammana Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20200826134409.473554-1-tomi.valkeinen@ti.com commit a10563c89a721a39cd30dac2d283679ef46e4cad Author: Tomi Valkeinen Date: Wed Sep 16 16:10:09 2020 +0300 dt-bindings: display: ti,j721e-dss: add missing properties to dt-schema Add assigned-clocks, assigned-clock-parents and dma-coherent optional properties. Signed-off-by: Tomi Valkeinen Reviewed-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20200916131009.221252-3-tomi.valkeinen@ti.com commit 6468f234d32d1f2bafc42c3b655108683089b1f8 Author: Tomi Valkeinen Date: Wed Sep 16 16:10:08 2020 +0300 dt-bindings: display: ti,am65x-dss: add missing properties to dt-schema Add assigned-clocks, assigned-clock-parents and dma-coherent optional properties. Signed-off-by: Tomi Valkeinen Reviewed-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20200916131009.221252-2-tomi.valkeinen@ti.com commit 21271d41a67c2ffb9afe1b0741dd042acff7a0f8 Author: Paul Cercueil Date: Sun Oct 4 16:17:58 2020 +0200 Revert "gpu/drm: ingenic: Add option to mmap GEM buffers cached" This reverts commit 37054fc81443 ("gpu/drm: ingenic: Add option to mmap GEM buffers cached") At the very moment this commit was created, the DMA API it relied on was modified in the DMA tree, which caused the driver to break in linux-next. Revert it for now, and it will be resubmitted later to work with the new DMA API. Signed-off-by: Paul Cercueil Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201004141758.1013317-1-paul@crapouillou.net commit bd1fbef7bd752d127996445da8b0453c93fa25dc Author: Daniel Vetter Date: Fri Oct 2 09:56:20 2020 +0200 drm/atomic: Make the kerneldoc a bit clearer Crank up the warning a notch and point at the right set of locking functions for atomic drivers. Acked-by: Maxime Ripard Signed-off-by: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201002075620.4157591-1-daniel.vetter@ffwll.ch commit c7da2782abca7fc1a143a8246ddf3d3175d7fbf6 Author: Ville Syrjälä Date: Fri Oct 2 12:04:46 2020 +0300 drm/i915: Make lspcon_init() static Make lspcon_init() static since it's no longer needed outside the compilation unit. This was correct in Kai-Heng's lspcon patch, but I fumbled this when applying it. Cc: Kai-Heng Feng Reported-by: kernel test robot Fixes: f542d671ffce ("drm/i915: Init lspcon after HPD in intel_dp_detect()") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201002090446.21104-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson commit f542d671ffcec772a561cd41c7e2394392d9dafb Author: Kai-Heng Feng Date: Wed Jun 10 15:55:10 2020 +0800 drm/i915: Init lspcon after HPD in intel_dp_detect() On HP 800 G4 DM, if HDMI cable isn't plugged before boot, the HDMI port becomes useless and never responds to cable hotplugging: [ 3.031904] [drm:lspcon_init [i915]] *ERROR* Failed to probe lspcon [ 3.031945] [drm:intel_ddi_init [i915]] *ERROR* LSPCON init failed on port D Seems like the lspcon chip on the system only gets powered after the cable is plugged. Consilidate lspcon_init() into lspcon_resume() to dynamically init lspcon chip, and make HDMI port work. v6: - Rebase on latest for-linux-next. v5: - Consolidate lspcon_resume() with lspcon_init(). - Move more logic into lspcon code. v4: - Trust VBT in intel_infoframe_init(). - Init lspcon in intel_dp_detect(). v3: - Make sure it's handled under long HPD case. v2: - Move lspcon_init() inside of intel_dp_hpd_pulse(). Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/203 Signed-off-by: Kai-Heng Feng Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200610075542.12882-1-kai.heng.feng@canonical.com commit ef79fafe9dae31037c48bd11676746315725452d Author: Ville Syrjälä Date: Wed Sep 30 02:34:49 2020 +0300 drm/i915: Eliminate intel_dp.regs.dp_tp_{ctl,status} Now that we've plumbed the crtc state all the way down we can eliminate the DP_TP_{CTL,STATUS} register offsets from intel_dp, and instead we derive them directly from the crtc state. And thus we can get rid of the nasty hack in intel_ddi_get_config() which mutates intel_dp during the readout. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200929233449.32323-12-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit a621860a5eb82a1b63378aac58c67fd612824013 Author: Ville Syrjälä Date: Thu Oct 1 14:10:53 2020 +0300 drm/i915: Plumb crtc_state to link training Get rid of mode crtc->config usage, and some ad-hoc intel_dp state usage by plumbing the crtc state all the way down to the link training code. Unfortunately we do have to keep some cached state in intel_dp so that we can do the "does the link need retraining?" checks from the short hpd handler. v2: Add intel_crtc_state forward declaration v3: Don't kill the PHY test code totally since it's now in the hotplug work where we can get at the states v4: Don't resurrect the debug scrambling disable bit (Imre) Use intel_dp_mst_is_master_trans() (Imre) Reviewed-by: Imre Deak Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201001111053.24451-1-ville.syrjala@linux.intel.com commit 6a41121f05501ce6af6a8f8300d27cdacd366201 Author: Ville Syrjälä Date: Wed Sep 30 02:34:47 2020 +0300 drm/i915: Split TGL DKL PHY buf trans per output type Make the mess inside the buf trans funcs a bit more manageable by splitting along the lines of output type. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200929233449.32323-10-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit 4669f5c2b7edb5666d1fcb9be13bdda2a5aec066 Author: Ville Syrjälä Date: Wed Sep 30 02:34:46 2020 +0300 drm/i915: Split TGL combo PHY buf trans per output type Make the mess inside the buf trans funcs a bit more manageable by splitting along the lines of output type. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200929233449.32323-9-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit ba30075d8d84a0e19bffc5040e989f6ad1a89fd4 Author: Ville Syrjälä Date: Wed Sep 30 02:34:45 2020 +0300 drm/i915: Split EHL combo PHY buf trans per output type Make the mess inside the buf trans funcs a bit more manageable by splitting along the lines of output type. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200929233449.32323-8-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit 5ee3e1daa8165105346a3b14dfd4917b628d2e9d Author: Ville Syrjälä Date: Wed Sep 30 02:34:44 2020 +0300 drm/i915: Split ICL MG PHY buf trans per output type Make the mess inside the buf trans funcs a bit more manageable by splitting along the lines of output type. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200929233449.32323-7-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit 6ed9aefa69fc0085a197c2a32c2e2de87164672d Author: Ville Syrjälä Date: Wed Sep 30 02:34:43 2020 +0300 drm/i915: Split ICL combo PHY buf trans per output type Make the mess inside the buf trans funcs a bit more manageable by splitting along the lines of output type. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200929233449.32323-6-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit 193af12cd6815ace3bdc93454454f5c7a053d3b6 Author: Ville Syrjälä Date: Wed Sep 30 13:04:12 2020 +0300 drm/i915: Shove the PHY test into the hotplug work Doing any kind modeset stuff from the short hpd handler is verboten. The ad-hoc PHY test modeset code violates this. And by calling various link training related functions it's now blocking further work to plumb the crtc state down into the link training code. Let's hack around that by pushing the PHY test stuff into the hotplug work where it's less of a problem. Still not great but at least acceptable. We take a few pages from the link retraining handbook to handle the locking and whatnot. v2: Fix the intel_dp_hotplug() return value Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200930100412.9313-1-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit 7ac469a0f7c627e1fd31b8d6f2e5b828b25f0877 Author: Ville Syrjälä Date: Wed Sep 30 02:34:41 2020 +0300 drm/i915: Make intel_dp_process_phy_request() static intel_dp_process_phy_request() has no business being externally visible. Make it static. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200929233449.32323-4-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit 95cef532f22286c810a74e1a067ed050b2e951cf Author: Ville Syrjälä Date: Wed Sep 30 02:34:40 2020 +0300 drm/i915: s/old_crtc_state/crtc_state/ intel_dp_enable_port() is called during the enable sequence, so there is nothing old about the passed in crtc state. Rename it. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200929233449.32323-3-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit 6694d2bea64f888b77d63adf52029dbcf27033d6 Author: Ville Syrjälä Date: Wed Sep 30 02:34:39 2020 +0300 drm/i915: s/pre_empemph/preemph/ I managed to fumble some functions names. Fix them. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200929233449.32323-2-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit 0c5036590bde1407a6250ea027e836815353820f Author: Qinglang Miao Date: Mon Sep 21 21:10:21 2020 +0800 drm/panfrost: simplify the return expression of panfrost_devfreq_target() Simplify the return expression. Signed-off-by: Qinglang Miao Reviewed-by: Steven Price Signed-off-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/20200921131021.91604-1-miaoqinglang@huawei.com commit 3c4641d4e75618fa1b5501b9ae9c19f765d75725 Author: Qinglang Miao Date: Mon Sep 21 21:10:19 2020 +0800 drm/panfrost: simplify the return expression of cz_ih_hw_init() Simplify the return expression. Signed-off-by: Qinglang Miao Reviewed-by: Philipp Zabel Reviewed-by: Steven Price Signed-off-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/20200921131019.91558-1-miaoqinglang@huawei.com commit 945b18fb4803b01e822ade6aef6cc0b6e4bd644f Author: Ville Syrjälä Date: Thu Oct 1 01:36:42 2020 +0300 drm/i915: Fix TGL DKL PHY DP vswing handling The HDMI vs. not-HDMI check got inverted whem the bogus encoder->type checks were eliminated. So now we're using 0 as the link rate on DP and potentially non-zero on HDMI, which is exactly the opposite of what we want. The original bogus check actually worked more correctly by accident since if would always evaluate to true. Due to this we now always use the RBR/HBR1 vswing table and never ever the HBR2+ vswing table. That is probably not a good way to get a high quality signal at HBR2+ rates. Fix the check so we pick the right table. Cc: stable@vger.kernel.org Cc: Vandita Kulkarni Cc: Uma Shankar Fixes: 94641eb6c696 ("drm/i915/display: Fix the encoder type check") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200930223642.28565-1-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza Reviewed-by: Vandita Kulkarni commit 562ad8add4064fb804e8067db2c3d4716b8274ba Author: Ville Syrjälä Date: Thu Sep 24 22:48:10 2020 +0300 drm/i915: Implement display WA #1142:kbl,cfl,cml Implement display w/a #1142. This supposedly fixes some underruns with FBC+VTd. Bspec says we should use the same programming regardless of circumstances. Apparently we should flip the magic bits before turning on any planes so let's put this into the early w/as. Cc: Lee Shawn C Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200924194810.10293-1-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 0dbacc89555305f2c4526b725da5e3aea64c8352 Author: Ville Syrjälä Date: Tue Sep 29 16:13:12 2020 +0300 drm/i915: Read DIMM size in Gb rather than GB CNL+ can report DIMM sizes in .5 GB units. In order to not trauncate away the .5 GB let's switch to storing the DIMM size in Gb units. Cc: Swati Sharma Signed-off-by: Ville Syrjälä Reviewed-by: José Roberto de Souza Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200929131312.12999-1-ville.syrjala@linux.intel.com commit b05734720de982a40676a14ddfdca5f87b4aab5e Author: Chris Wilson Date: Wed Sep 30 17:32:53 2020 +0100 drm/i915/gt: Retire cancelled requests on unload If we manage to hit the intel_gt_set_wedged_on_fini() while active, i.e. module unload during a stress test, we may cancel the requests but not clean up. This leads to a very slow module unload as we wait for something or other to trigger the retirement flushing, or timeout and unload with a bunch of warnings. Instead if we explicitly cancel then cleanup on an active unload, it should be instant and quiet. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200930163253.2789-3-chris@chris-wilson.co.uk commit eb3afbe18eb193a6cbf6541b3876c3fe14ad2a51 Author: Chris Wilson Date: Wed Sep 30 17:32:52 2020 +0100 drm/i915/selftests: Finish pending mock requests on cancellation. Flush all the pending requests from the mock engine when they are cancelled. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200930163253.2789-2-chris@chris-wilson.co.uk commit 5e39b4d94cad76eb6c1b0b7fd0f064a2155d0d0a Author: Chris Wilson Date: Wed Sep 30 17:32:51 2020 +0100 drm/i915/gt: Signal cancelled requests After marking the requests on an engine as cancelled upon wedging, send any signals for their completions. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200930163253.2789-1-chris@chris-wilson.co.uk commit 291e8cdd6bc57658035239315d27f3f971ec062b Author: Bartlomiej Zolnierkiewicz Date: Thu Sep 24 13:25:30 2020 +0200 MAINTAINERS: mark FRAMEBUFFER LAYER as Orphan It has been a fun ride since 2017 but unfortunately I don't have enough time to look after it properly anymore. Reviewed-by: Daniel Vetter Acked-by: Sam Ravnborg Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/7b709254-9412-8473-250c-0c4e006259b3@samsung.com commit 91e515c2f0f68d4ce137c9182eb03af4858f362e Author: Alistair Delva Date: Tue Sep 29 14:53:33 2020 -0700 virtio-gpu api: fix 64/32 compat issue with blob implementation We encountered this issue when booting blob with a 32-bit kernel. The implementation doesn't match v6 of the virtio-spec change, so fix this. Fixes: ff886cbdcc44 ("virtio-gpu api: blob resources") Signed-off-by: Alistair Delva Link: http://patchwork.freedesktop.org/patch/msgid/20200929215333.1241-1-gurchetansingh@chromium.org Signed-off-by: Gerd Hoffmann commit 4f8cc7a64af4c14ff222c2f9bab4f1ad2ddeb881 Author: Tian Tao Date: Tue Sep 29 08:45:26 2020 +0800 drm/hisilicon: Delete the unused macro The macro PADDING is no longer used. Delete it. Signed-off-by: Tian Tao Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/1601340326-14049-1-git-send-email-tiantao6@hisilicon.com commit c7a399271de0a3f9a81e4f84c52f0c3bfe3ae117 Author: Tian Tao Date: Mon Sep 28 16:49:38 2020 +0800 drm/hisilicon: Using the to_hibmc_drm_private to convert Using the to_hibmc_drm_private to convert over all uses of dev_private, and fix a little formatting issue. v2: fixed the commit message. Signed-off-by: Tian Tao Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/1601282978-45534-1-git-send-email-tiantao6@hisilicon.com commit cbdbdd8ab22b4bf2571f313ea627cfc3a04cb02f Author: Daniel Vetter Date: Tue Sep 29 17:03:33 2020 +0200 drm: update todo.rst - debugfs cleanup has moved forward thanks to the cleanup Wambui has done Acked-by: Melissa Wen Reviewed-by: Greg Kroah-Hartman Cc: Wambui Karuga Cc: Greg Kroah-Hartman Cc: Melissa Wen Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200929150333.3441576-1-daniel.vetter@ffwll.ch commit 369a7210c12775afec57769efbe462f0feda2c60 Author: Christian König Date: Tue Sep 29 13:21:26 2020 +0200 drm/qxl: fix usage of ttm_bo_init We need to use ttm_bo_init_reserved here to make sure that the BO is pinned before it becomes visible on the LRU. Signed-off-by: Christian König Reviewed-by: Daniel Vetter Reviewed-by: Gerd Hoffmann Tested-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/392561/?series=82199&rev=1 commit b7eeb2b4132ccf1a7d38f434cde7043913d1ed3c Author: Chris Wilson Date: Mon Sep 28 22:59:42 2020 +0100 drm/i915: Avoid mixing integer types during batch copies Be consistent and use unsigned long throughout the chunk copies to avoid the inherent clumsiness of mixing integer types of different widths and signs. Failing to take acount of a wider unsigned type when using min_t can lead to treating it as a negative, only for it flip back to a large unsigned value after passing a boundary check. Fixes: ed13033f0287 ("drm/i915/cmdparser: Only cache the dst vmap") Testcase: igt/gen9_exec_parse/bb-large Reported-by: "Candelaria, Jared" Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Joonas Lahtinen Cc: "Candelaria, Jared" Cc: "Bloomfield, Jon" Cc: # v4.9+ Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200928215942.31917-1-chris@chris-wilson.co.uk commit ccc22d41bd9acec58cdc7c3b012e1887aba40af4 Author: Thomas Zimmermann Date: Fri Sep 25 13:56:01 2020 +0200 dma-buf: Document struct dma_buf_map This patch adds struct dma_buf_map and its helpers to the documentation. A short tutorial is included. v3: * update documentation in a separate patch * expand docs (Daniel) * carry-over acks from patch 1 Signed-off-by: Thomas Zimmermann Reviewed-by: Christian König Reviewed-by: Daniel Vetter Acked-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20200925115601.23955-5-tzimmermann@suse.de commit 20e76f1a70596590dec32a5d1f598fba04859526 Author: Thomas Zimmermann Date: Fri Sep 25 13:56:00 2020 +0200 dma-buf: Use struct dma_buf_map in dma_buf_vunmap() interfaces This patch updates dma_buf_vunmap() and dma-buf's vunmap callback to use struct dma_buf_map. The interfaces used to receive a buffer address. This address is now given in an instance of the structure. Users of the functions are updated accordingly. This is only an interface change. It is currently expected that dma-buf memory can be accessed with system memory load/store operations. v2: * include dma-buf-heaps and i915 selftests (kernel test robot) * initialize cma_obj before using it in drm_gem_cma_free_object() (kernel test robot) Signed-off-by: Thomas Zimmermann Acked-by: Sumit Semwal Acked-by: Christian König Acked-by: Daniel Vetter Acked-by: Tomasz Figa Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200925115601.23955-4-tzimmermann@suse.de commit 6619ccf1bb1d0ebb071f758111efa83918b216fc Author: Thomas Zimmermann Date: Fri Sep 25 13:55:59 2020 +0200 dma-buf: Use struct dma_buf_map in dma_buf_vmap() interfaces This patch updates dma_buf_vmap() and dma-buf's vmap callback to use struct dma_buf_map. The interfaces used to return a buffer address. This address now gets stored in an instance of the structure that is given as an additional argument. The functions return an errno code on errors. Users of the functions are updated accordingly. This is only an interface change. It is currently expected that dma-buf memory can be accessed with system memory load/store operations. v3: * update fastrpc driver (kernel test robot) v2: * always clear map parameter in dma_buf_vmap() (Daniel) * include dma-buf-heaps and i915 selftests (kernel test robot) Signed-off-by: Thomas Zimmermann Acked-by: Sumit Semwal Acked-by: Christian König Acked-by: Daniel Vetter Acked-by: Tomasz Figa Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200925115601.23955-3-tzimmermann@suse.de commit 01fd30da0474d5528d96a154cb50ce3b0352fd19 Author: Thomas Zimmermann Date: Fri Sep 25 13:55:58 2020 +0200 dma-buf: Add struct dma-buf-map for storing struct dma_buf.vaddr_ptr The new type struct dma_buf_map represents a mapping of dma-buf memory into kernel space. It contains a flag, is_iomem, that signals users to access the mapped memory with I/O operations instead of regular loads and stores. It was assumed that DMA buffer memory can be accessed with regular load and store operations. Some architectures, such as sparc64, require the use of I/O operations to access dma-map buffers that are located in I/O memory. Providing struct dma_buf_map allows drivers to implement this. This was specifically a problem when refreshing the graphics framebuffer on such systems. [1] As the first step, struct dma_buf stores an instance of struct dma_buf_map internally. Afterwards, dma-buf's vmap and vunmap interfaces are be converted. Finally, affected drivers can be fixed. v3: * moved documentation into separate patch * test for NULL pointers with ! [1] https://lore.kernel.org/dri-devel/20200725191012.GA434957@ravnborg.org/ Signed-off-by: Thomas Zimmermann Reviewed-by: Christian König Reviewed-by: Daniel Vetter Acked-by: Sumit Semwal Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200925115601.23955-2-tzimmermann@suse.de commit 79b4d4d26bd256a0c7e3ce74c13a64797d98d1ac Author: Qinglang Miao Date: Mon Sep 21 21:10:22 2020 +0800 drm/qxl: simplify the return expression of qxl_plane_prepare_fb() Simplify the return expression. Signed-off-by: Qinglang Miao Link: http://patchwork.freedesktop.org/patch/msgid/20200921131022.91649-1-miaoqinglang@huawei.com Signed-off-by: Gerd Hoffmann commit 378f257d583072b3a6ae0a2fa73fbd6497686dac Author: Gurchetan Singh Date: Wed Sep 23 17:32:14 2020 -0700 drm/virtio: advertise features to userspace New api changes are now available to userspace. Also, the comparison to true is redundant, so remove it. Signed-off-by: Gurchetan Singh Acked-by: Tomeu Vizoso Link: http://patchwork.freedesktop.org/patch/msgid/20200924003214.662-19-gurchetansingh@chromium.org Signed-off-by: Gerd Hoffmann commit 897b4d1acaf56314652c6a8e75d9f86b5e45638d Author: Gerd Hoffmann Date: Wed Sep 23 17:32:13 2020 -0700 drm/virtio: implement blob resources: resource create blob ioctl Implement resource create blob as specified. Signed-off-by: Gerd Hoffmann Acked-by: Tomeu Vizoso Link: http://patchwork.freedesktop.org/patch/msgid/20200924003214.662-18-gurchetansingh@chromium.org Co-developed-by: Gurchetan Singh Signed-off-by: Gurchetan Singh commit 4429b5de01ad974219ca81a98f152c53c3d34f9b Author: Gurchetan Singh Date: Wed Sep 23 17:32:12 2020 -0700 drm/virtio: implement blob resources: report blob mem to userspace The stride field has never been used, so repurpose it to be "blob_mem". This way, userspace can know the memory properties of the blob if it's passed between userspace processes and no suitable userspace API exists to transmit that knowledge. Signed-off-by: Gurchetan Singh Acked-by: Tomeu Vizoso Link: http://patchwork.freedesktop.org/patch/msgid/20200924003214.662-17-gurchetansingh@chromium.org Signed-off-by: Gerd Hoffmann commit 50c3d1938ee380e2d24714ea7058d2d3fc2662de Author: Gurchetan Singh Date: Wed Sep 23 17:32:11 2020 -0700 drm/virtio: implement blob resources: fix stride discrepancy The old transfer ioctls may work on blob resources, and there is no TRANSFER_BLOB hypercall now for simplicity. The guest may have a image view on the blob resources such that the stride is not equal to width * bytes_per_pixel. For host-only blobs, we can repurpose the transfer ioctls to synchronize caches as well. For guest-only blobs, these operations are undefined for now so leave them out. Also, with seamless Wayland integration between guest/host looking increasingly attractive, it also makes sense to keep track of one value for stride. Signed-off-by: Gurchetan Singh Acked-by: Tomeu Vizoso Link: http://patchwork.freedesktop.org/patch/msgid/20200924003214.662-16-gurchetansingh@chromium.org Signed-off-by: Gerd Hoffmann commit 1e2554f49e41d3f6509c6a633e5e4dd48d93ffb9 Author: Gurchetan Singh Date: Wed Sep 23 17:32:10 2020 -0700 drm/virtio: implement blob resources: refactor UUID code somewhat For upcoming blob resources, userspace can specify that the resource will be used for cross-device sharing. This is mainly for exportable blobs that will only shared with the virtgpu display but not across devices. Signed-off-by: Gurchetan Singh Acked-by: Tomeu Vizoso Link: http://patchwork.freedesktop.org/patch/msgid/20200924003214.662-15-gurchetansingh@chromium.org Signed-off-by: Gerd Hoffmann commit 0b0f1afe6cff06cf51a1435aa0089ce335df00b5 Author: Gurchetan Singh Date: Wed Sep 23 17:32:09 2020 -0700 drm/virtio: implement blob resources: blob display integration SCANOUT_BLOB forwards the DRM framebuffer metadata to the host. The modifier is intentionally left out -- it may be possible to query the host for that. We also assume one blob resource per DRM framebuffer. That too is an intentional simplification. Signed-off-by: Gurchetan Singh Acked-by: Tomeu Vizoso Link: http://patchwork.freedesktop.org/patch/msgid/20200924003214.662-14-gurchetansingh@chromium.org Signed-off-by: Gerd Hoffmann commit c7a6ac4f60bc54a0a45de76a3a258685024c9293 Author: Gurchetan Singh Date: Wed Sep 23 17:32:08 2020 -0700 drm/virtio: implement blob resources: hypercall interface This implements the blob hypercall interface. Signed-off-by: Gurchetan Singh Acked-by: Tomeu Vizoso Link: http://patchwork.freedesktop.org/patch/msgid/20200924003214.662-13-gurchetansingh@chromium.org Signed-off-by: Gerd Hoffmann commit 16845c5d540929d2f4dc845f11fbbb238e69170a Author: Gerd Hoffmann Date: Wed Sep 23 17:32:07 2020 -0700 drm/virtio: implement blob resources: implement vram object A virtio-gpu vram object is based on range-based allocation. No guest shmemfs backing, so we call drm_gem_private_object_init. This is for host memory without any guest backing (atleast initially). Signed-off-by: Gerd Hoffmann Acked-by: Tomeu Vizoso Link: http://patchwork.freedesktop.org/patch/msgid/20200924003214.662-12-gurchetansingh@chromium.org Co-developed-by: Gurchetan Singh Signed-off-by: Gurchetan Singh commit 5c824604e5601a7150e434931243ee9e820fb473 Author: Gurchetan Singh Date: Wed Sep 23 17:32:06 2020 -0700 drm/virtio: implement blob resources: add new fields to internal structs Useful for upcoming blob resources. Signed-off-by: Gurchetan Singh Acked-by: Tomeu Vizoso Link: http://patchwork.freedesktop.org/patch/msgid/20200924003214.662-11-gurchetansingh@chromium.org Signed-off-by: Gerd Hoffmann commit f895c70713721da661588b3004424974d6125fe8 Author: Gurchetan Singh Date: Wed Sep 23 17:32:05 2020 -0700 drm/virtio: implement blob resources: expose virtio_gpu_resource_id_get VRAM object will need it. Signed-off-by: Gurchetan Singh Acked-by: Tomeu Vizoso Link: http://patchwork.freedesktop.org/patch/msgid/20200924003214.662-10-gurchetansingh@chromium.org Signed-off-by: Gerd Hoffmann commit 6076a9711dc535f1deca8014949beb7fcae8de34 Author: Gerd Hoffmann Date: Wed Sep 23 17:32:04 2020 -0700 drm/virtio: implement blob resources: probe for host visible region The availability of the host visible region means host 3D allocations can be directly mapped in the guest. Signed-off-by: Gerd Hoffmann Acked-by: Tomeu Vizoso Link: http://patchwork.freedesktop.org/patch/msgid/20200924003214.662-9-gurchetansingh@chromium.org Co-developed-by: Gurchetan Singh Signed-off-by: Gurchetan Singh commit 6815cfe602d03df1b3029081e1c4fb81a224d9fb Author: Gerd Hoffmann Date: Wed Sep 23 17:32:03 2020 -0700 drm/virtio: implement blob resources: probe for the feature. Let's proble for VIRTIO_GPU_F_RESOURCE_BLOB. Signed-off-by: Gerd Hoffmann Signed-off-by: Gurchetan Singh Acked-by: Tomeu Vizoso Link: http://patchwork.freedesktop.org/patch/msgid/20200924003214.662-8-gurchetansingh@chromium.org commit bf36dea17623b65cfbbe6219bfea1326255a89b6 Author: Gurchetan Singh Date: Wed Sep 23 17:32:02 2020 -0700 drm/virtgpu api: cross-device feature This feature was recently added to virtio-gpu, lets make it userspace queryable. It's an error to use BLOB_FLAG_USE_CROSS_DEVICE when this feature is not present. Signed-off-by: Gurchetan Singh Acked-by: Tomeu Vizoso Link: http://patchwork.freedesktop.org/patch/msgid/20200924003214.662-7-gurchetansingh@chromium.org Signed-off-by: Gerd Hoffmann commit 7a571c76ddce5928f872cdfd707ba5c7193e088c Author: Gurchetan Singh Date: Wed Sep 23 17:32:01 2020 -0700 drm/virtgpu api: host visible feature This exposes the host visible feature to userspace. Without it, it is an error to specify BLOB_MEM_HOST3D with BLOG_FLAG_USE_MAPPABLE. Signed-off-by: Gurchetan Singh Acked-by: Tomeu Vizoso Acked-by: Lingfeng Yang Link: http://patchwork.freedesktop.org/patch/msgid/20200924003214.662-6-gurchetansingh@chromium.org Signed-off-by: Gerd Hoffmann commit eda3e1018f786f8f3db93001fb2da757b193ed1a Author: Gurchetan Singh Date: Wed Sep 23 17:32:00 2020 -0700 drm/virtgpu api: blob resources This makes blob resources available to guest userspace. They are needed for GL4.5, Vulkan and zero-copy virtio-gpu. For Mesa, blob resources have been tested with Piglit's ARB_buffer_storage tests and apitraces. Apitraces of GL4.5 games show we're between 70% to 80% of host performance on Iris, based on a apitrace of a 2013 GL4.5 game: 11.204 FPS (guest) 15.947 FPS (host) This is still better than the status quo, when said game was unplayable with Virgl due to an inefficient GL4.3 fallback. But there's still room for improvement if we want to match HW-assisted virtualization. For Vulkan, blob resources have been tested with dEQP.vk.memory* and running Vulkan applications in production with the "Cuttlefish" virtual Android device. This has been done with Lingfeng Yang's "gfxstream" Vulkan implementation, which virtualizes Vulkan across many Google products. Signed-off-by: Gurchetan Singh Acked-by: Tomeu Vizoso Acked-by: Chia-I Wu Acked-by: Lingfeng Yang Link: http://patchwork.freedesktop.org/patch/msgid/20200924003214.662-5-gurchetansingh@chromium.org Signed-off-by: Gerd Hoffmann commit e5cd6cbe025570f6135f48538cb450254f8fbdd3 Author: Gerd Hoffmann Date: Wed Sep 23 17:31:59 2020 -0700 virtio-gpu api: host visible feature This patch adds a new virtgpu feature that allows directly mapping host allocated resources. This is based on virtio shared memory regions, which allows querying for memory regions using PCI transport. Each shared memory region has an associated "shmid", the meaning of which is device specific. For virtio-gpu, we can define the shared memory region with id VIRTIO_GPU_SHM_ID_HOST_VISIBLE to be the "host visible memory region". The presence of the host visible memory region means the following hypercalls are supported: 1) VIRTIO_GPU_CMD_RESOURCE_MAP_BLOB This hypercall tells the host to inject the host resource's mapping in an offset into virtio-gpu's PCI address space. This is typically done via KVM_SET_USER_MEMORY_REGION on Linux hosts. On success, VIRTIO_GPU_RESP_OK_MAP_INFO is returned, which specifies the host buffer's caching type and possibly in the future performance hints about the buffer.. 2) VIRTIO_GPU_CMD_RESOURCE_UNMAP_BLOB This hypercall tells the host to remove the host resource's mapping from the guest VM. Signed-off-by: Gerd Hoffmann Acked-by: Tomeu Vizoso Acked-by: Lingfeng Yang Link: http://patchwork.freedesktop.org/patch/msgid/20200924003214.662-4-gurchetansingh@chromium.org Co-developed-by: Gurchetan Singh Signed-off-by: Gurchetan Singh commit ff886cbdcc44334b5f876721cf65428aa955948b Author: Gerd Hoffmann Date: Wed Sep 23 17:31:58 2020 -0700 virtio-gpu api: blob resources A blob resource is a container for: - VIRTIO_GPU_BLOB_MEM_GUEST: a guest memory allocation (referred to as a "guest-only blob resource") - VIRTIO_GPU_BLOB_MEM_HOST3D: a host3d memory allocation (referred to as a "host-only blob resource") - VIRTIO_GPU_BLOB_MEM_HOST3D_GUEST: a guest + host3d memory allocation (referred to as a "default blob resource"). The memory properties of the blob resource must be described by `blob_mem`. For default and guest only blob resources set, `nents` guest system pages are assigned to the resource. For default blob resources, these guest pages are used for transfer operations. Attach/detach is also possible to allow swap-in/swap-out, but isn't required since it may not be applicable to future blob mem types (shared guest/guest vram). Host allocations depend on whether the 3D is supported. If 3D is not supported, the only valid field for `blob_mem` is VIRTIO_GPU_BLOB_MEM_GUEST. If 3D is supported, the virtio-gpu resource is created from the context local object identified by the `blob_id`. The actual host allocation done by the CMD_SUBMIT_3D. Userspace must specify if the blob resource is intended to be used for userspace mapping, sharing between virtio-gpu contexts and/or sharing between virtio devices. This is done via `blob_flags`. For 3D hosts, both VIRTIO_GPU_CMD_TRANSFER_TO_HOST_3D and VIRTIO_GPU_CMD_TRANSFER_FROM_HOST_3D may be used to update the host resource. There is no restriction on the image/buffer view the guest/host userspace has on the blob resource. VIRTIO_GPU_CMD_SET_SCANOUT_BLOB / VIRTIO_GPU_CMD_RESOURCE_FLUSH may be used with blob resources as well. The modifier is intentionally left out of SCANOUT_BLOB, and auxilary blobs are also left out as a simplification. The use case for blob resources is zero-copy, needed for coherent memory in virglrenderer. Host only blob resources are not mappable without the feature described in the next patch, but are shareable. Future work: - Emulated coherent `blob_mem` type for QEMU/vhost-user - A `blob_mem` type for guest-only resources imported in cache-coherent FOSS GPU/display drivers. - Display integration involving the blob model using seamless Wayland windows. Signed-off-by: Gerd Hoffmann Acked-by: Tomeu Vizoso Acked-by: Chia-I Wu Acked-by: Lingfeng Yang Link: http://patchwork.freedesktop.org/patch/msgid/20200924003214.662-3-gurchetansingh@chromium.org Co-developed-by: Gurchetan Singh Signed-off-by: Gurchetan Singh commit 0ce0729656382da069d64d21ab4bed5434f79559 Author: Gurchetan Singh Date: Wed Sep 23 17:31:57 2020 -0700 drm/virtio: blob prep: make CPU responses more generic RESOURCE_MAP_BLOB / RESOURCE_UNMAP_BLOB can use this. Signed-off-by: Gurchetan Singh Acked-by: Tomeu Vizoso Link: http://patchwork.freedesktop.org/patch/msgid/20200924003214.662-2-gurchetansingh@chromium.org Signed-off-by: Gerd Hoffmann commit 30172efbfb842cd898e34fea8694ed250200eaab Author: Gurchetan Singh Date: Wed Sep 23 17:31:56 2020 -0700 drm/virtio: blob prep: refactor getting pages and attaching backing Useful for upcoming blob resources. Signed-off-by: Gurchetan Singh Acked-by: Tomeu Vizoso Link: http://patchwork.freedesktop.org/patch/msgid/20200924003214.662-1-gurchetansingh@chromium.org Signed-off-by: Gerd Hoffmann commit d3bb2f9b5ee66d5e000293edd6b6575e59d11db9 Author: Chris Wilson Date: Mon Sep 28 23:15:10 2020 +0100 drm/i915/gem: Always test execution status on closing the context Verify that if a context is active at the time it is closed, that it is either persistent and preemptible (with hangcheck running) or it shall be removed from execution. Fixes: 9a40bddd47ca ("drm/i915/gt: Expose heartbeat interval via sysfs") Testcase: igt/gem_ctx_persistence/heartbeat-close Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: # v5.7+ Reviewed-by: Tvrtko Ursulin Acked-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20200928221510.26044-3-chris@chris-wilson.co.uk commit 3dd66a94de59d7792e7917eb3075342e70f06f44 Author: Chris Wilson Date: Mon Sep 28 23:15:09 2020 +0100 drm/i915/gt: Always send a pulse down the engine after disabling heartbeat Currently, we check we can send a pulse prior to disabling the heartbeat to verify that we can change the heartbeat, but since we may re-evaluate execution upon changing the heartbeat interval we need another pulse afterwards to refresh execution. v2: Tvrtko asked if we could reduce the double pulse to a single, which opened up a discussion of how we should handle the pulse-error after attempting to change the property, and the desire to serialise adjustment of the property with its validating pulse, and unwind upon failure. Fixes: 9a40bddd47ca ("drm/i915/gt: Expose heartbeat interval via sysfs") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Cc: # v5.7+ Reviewed-by: Tvrtko Ursulin Acked-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20200928221510.26044-2-chris@chris-wilson.co.uk commit 7a991cd3e3da9a56d5616b62d425db000a3242f2 Author: Chris Wilson Date: Mon Sep 28 23:15:08 2020 +0100 drm/i915: Cancel outstanding work after disabling heartbeats on an engine We only allow persistent requests to remain on the GPU past the closure of their containing context (and process) so long as they are continuously checked for hangs or allow other requests to preempt them, as we need to ensure forward progress of the system. If we allow persistent contexts to remain on the system after the the hangcheck mechanism is disabled, the system may grind to a halt. On disabling the mechanism, we sent a pulse along the engine to remove all executing contexts from the engine which would check for hung contexts -- but we did not prevent those contexts from being resubmitted if they survived the final hangcheck. Fixes: 9a40bddd47ca ("drm/i915/gt: Expose heartbeat interval via sysfs") Testcase: igt/gem_ctx_persistence/heartbeat-stop Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: # v5.7+ Reviewed-by: Tvrtko Ursulin Acked-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20200928221510.26044-1-chris@chris-wilson.co.uk commit 8f7db83e6abf863c6a2cfddbe7086f1e3251fdbf Author: Thomas Zimmermann Date: Mon Sep 28 10:16:43 2020 +0200 drm/rockchip: Include for drm_gem_cm_vm_ops Include to get drm_gem_cma_vm_ops. Fallout from the recent conversion to GEM object functions. Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Reported-by: kernel test robot Fixes: 0d590af3140d ("drm/rockchip: Convert to drm_gem_object_funcs") Cc: Thomas Zimmermann Cc: Daniel Vetter Cc: Christian König Cc: Sandy Huang Cc: "Heiko Stübner" Cc: dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Link: https://patchwork.freedesktop.org/patch/msgid/20200928081643.8575-1-tzimmermann@suse.de commit 33267703df1562a625a76a654927e1fbd4b6d0ce Author: Vandita Kulkarni Date: Thu Sep 24 18:12:09 2020 +0530 drm/i915/dsi: Enable software vblank counter In case of DSI cmd mode, we get hw vblank counter updated after the TE comes in, if we try to read the hw vblank counter in te handler we wouldnt have the udpated vblank counter yet. This will lead to a state where we would send the vblank event to the user space in the next te, though the frame update would have completed in the first TE duration itself. Hence switch to using software timestamp based vblank counter. v2: Use mode_flags from crtc_state (Ville) Acked-by: Ville Syrjälä Signed-off-by: Vandita Kulkarni Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200924124209.17916-6-vandita.kulkarni@intel.com commit 26fb0d552dc89cae2b76cc10ea87b889c4b32123 Author: Vandita Kulkarni Date: Mon Sep 28 16:38:34 2020 +0530 drm/i915/dsi: Initiate frame request in cmd mode In TE Gate mode or TE NO_GATE mode on every flip we need to set the frame update request bit. After this bit is set transcoder hardware will automatically send the frame data to the panel in case of TE NO_GATE mode, where it sends after it receives the TE event in case of TE_GATE mode. Once the frame data is sent to the panel, we see the frame counter updating. v2: Use intel_de_read/write v3: remove the usage of private_flags v4: Use icl_dsi in func names if non static, fix code formatting issues. (Jani) v5: Send frame update request at the beginning of pipe_update_end, use crtc_state mode_flags (Ville) v6: Add platform and dsi checks (Ville) Acked-by: Ville Syrjälä Signed-off-by: Vandita Kulkarni Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200928110834.15077-1-vandita.kulkarni@intel.com commit 00acb3293670afc767fd6ca3456d466db0212c05 Author: Vandita Kulkarni Date: Thu Sep 24 18:12:07 2020 +0530 drm/i915/dsi: Add TE handler for dsi cmd mode. In case of dual link, we get the TE on slave. So clear the TE on slave DSI IIR. If we are operating in TE_GATE mode, after we do a frame update, the transcoder will send the frame data to the panel, after it receives a TE. Whereas if we are operating in NO_GATE mode then the transcoder will immediately send the frame data to the panel. We are not dealing with the periodic command mode here. v2: Pass only relevant masked bits to the handler (Jani) v3: Fix the check for cmd mode in TE handler function. v4: Use intel_handle_vblank instead of drm_handle_vblank (Jani) v3: Use static on handler func (Jani) Acked-by: Ville Syrjälä Signed-off-by: Vandita Kulkarni Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200924124209.17916-4-vandita.kulkarni@intel.com commit 9c9e97c44a3406ba7aad40ae273e646504d96bee Author: Vandita Kulkarni Date: Thu Sep 24 18:12:06 2020 +0530 i915/dsi: Configure TE interrupt for cmd mode Configure TE interrupt as part of the vblank enable call flow. v2: Hide the private flags check inside configure_te (Jani) v3: Fix the position of masking de_port_masked for DSI_TE. v4: Simplify the caller of configure_te (Jani) v5: Clear IIR, remove the usage of private_flags v6: including icl_dsi header is not needed Acked-by: Ville Syrjälä Signed-off-by: Vandita Kulkarni Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200924124209.17916-3-vandita.kulkarni@intel.com commit 5682a41f932c50ab6815a658cdb927153b3d2205 Author: Vandita Kulkarni Date: Thu Sep 24 18:12:05 2020 +0530 drm/i915/dsi: Add details about TE in get_config We need details about enabling TE on which port before we enable TE through vblank enable path. This is based on the configuration that we receive from the VBT wrt ports, dual_link. Reviewed-by: Jani Nikula Acked-by: Ville Syrjälä Signed-off-by: Vandita Kulkarni Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200924124209.17916-2-vandita.kulkarni@intel.com commit 7852ddd5d60a0ed13eac30831b6dfd08943554ce Author: Ville Syrjälä Date: Fri Sep 25 16:16:56 2020 +0300 drm/i915: Replace some gamma_mode ifs with switches Since gamma_mode can have more than two values on ilk+ let's use switch statements when interpreting them. v2: Fix typo (Uma) Reviewed-by: Uma Shankar Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200925131656.10022-10-ville.syrjala@linux.intel.com commit d0a9acaa6bc28ebefb5774d4d2eab484eae5c3fd Author: Ville Syrjälä Date: Fri Sep 25 16:16:55 2020 +0300 drm/i915: Polish bdw_read_lut_10() a bit Since bdw_read_lut_10() uses the auto-increment mode we must have an equal number of entries in the software LUT and the hardware LUT. WARN if that is not the case. Reviewed-by: Uma Shankar Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200925131656.10022-9-ville.syrjala@linux.intel.com commit 3d041e904b79c03dd7e74e50c193e8e3aac8d95f Author: Ville Syrjälä Date: Fri Sep 25 16:16:54 2020 +0300 drm/i915: Relocate CHV CGM gamma masks CGM_PIPE_GAMMA_RED_MASK & co. are misplaced. Move then below the relevant register. And while at it add the degamma counterparts. Reviewed-by: Uma Shankar Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200925131656.10022-8-ville.syrjala@linux.intel.com commit d313569138c26c26cae2d5dcd54169e72870eecb Author: Ville Syrjälä Date: Fri Sep 25 16:16:53 2020 +0300 drm/i915: Shuffle chv_cgm_gamma_pack() around a bit Move chv_cgm_gamma_pack() next to the other CGM gamma functions. Right now it's stuck in the middle of the CGM degamma functions. Reviewed-by: Uma Shankar Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200925131656.10022-7-ville.syrjala@linux.intel.com commit 4073a4ee5c4a40015e2fa133e77e3f9d692faf09 Author: Ville Syrjälä Date: Fri Sep 25 16:16:52 2020 +0300 drm/i915: Reset glk degamma index after programming/readout Just for some extra consistency let's reset the glk degamma LUT index back to 0 after we're dong trawling the LUT. Reviewed-by: Uma Shankar Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200925131656.10022-6-ville.syrjala@linux.intel.com commit e0122138c24edf51a0225dcb566e3ead298d6ff5 Author: Ville Syrjälä Date: Fri Sep 25 16:16:51 2020 +0300 drm/i915: s/glk_read_lut_10/bdw_read_lut_10/ glk_read_lut_10() works just fine for all bdw+ platforms, so rename it. Reviewed-by: Uma Shankar Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200925131656.10022-5-ville.syrjala@linux.intel.com commit cfcd558cea52fdfc0cc398905a8acd1575ba17bc Author: Ville Syrjälä Date: Fri Sep 25 16:16:50 2020 +0300 drm/i915: Include the LUT sizes in the state dump Dump the sizes of the software LUTs in the state dump. Makes it a bit easier to see which is present without having to decode it from the gamma_mode and other bits of state. v2: Drop a spurious "is" in commit msg (Uma) Reviewed-by: Uma Shankar Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200925131656.10022-4-ville.syrjala@linux.intel.com commit cf52acde6ee9d806df1584136bfbcf504550a53a Author: Ville Syrjälä Date: Fri Sep 25 16:16:49 2020 +0300 drm/i915: Move MST master transcoder dump earlier Move the MST master transcoder dump next to the other transcoder bits. Reviewed-by: Uma Shankar Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200925131656.10022-3-ville.syrjala@linux.intel.com commit 504c7bd85c6f9b14b6c7f03cb5885c0818e805ad Author: Ville Syrjälä Date: Fri Sep 25 16:16:48 2020 +0300 drm/i915: Fix state checker hw.active/hw.enable readout Previously intel_dump_pipe_config() used to dump the full crtc state whether or not the crtc was logically enabled or not. As that meant occasionally dumping confusing stale garbage I changed it to check whether the crtc is logically enabled or not. However I did not realize that the state checker readout code does not populate crtc_state.hw.{active,enabled}. Hence the state checker dump would only give us a full dump of the sw state but not the hw state. Fix that by populating those bits of the hw state as well. Reviewed-by: Uma Shankar Fixes: 10d75f5428fd ("drm/i915: Fix plane state dumps") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200925131656.10022-2-ville.syrjala@linux.intel.com commit ca876a1d30e51fd1b1d1283b9a7b0988ffb30f03 Author: Tian Tao Date: Fri Sep 25 15:48:06 2020 +0800 drm/hisilicon: Deleted the drm_device declaration drm_framebuffer.h already declares struct drm_device, so there's no need to declare it in hibmc_drm_drv.h v2: fixed spelling errors in commit message. v3: rewrite the commit message. Signed-off-by: Tian Tao Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/1601020086-43652-1-git-send-email-tiantao6@hisilicon.com commit eba10ec8cfdd831488fa091356884df7d23e305c Author: Ville Syrjälä Date: Fri Sep 25 15:17:49 2020 +0300 drm/i915: Don't hide the intel_crtc_atomic_check() call Move the intel_crtc_atomic_check() call out from the variable declarations to a place where we can actually see it. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200925121749.708-2-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 7102404cb471973cdcc2d3bfe5755153b3137bca Author: Ville Syrjälä Date: Fri Sep 25 15:17:48 2020 +0300 drm/i915: Make intel_{enable,disable}_sagv() static intel_{enable,disable}_sagv() are no longer needed outside the compilation unit. Make them static. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200925121749.708-1-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 55ea1cb178ef85677b35126685fbf5d8d649b62e Author: Karthik B S Date: Mon Sep 21 16:32:10 2020 +0530 drm/i915: Enable async flips in i915 Enable asynchronous flips in i915 for gen9+ platforms. v2: -Async flip enablement should be a stand alone patch (Paulo) v3: -Move the patch to the end of the series (Paulo) v4: -Rebased. v5: -Rebased. v6: -Rebased. v7: -Rebased. v8: -Rebased. v9: -Rebased. v10: -Rebased. Signed-off-by: Karthik B S Signed-off-by: Vandita Kulkarni Reviewed-by: Ville Syrjälä Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200921110210.21182-9-karthik.b.s@intel.com commit 6914c9685e0a2376c128a3519b5b5e0619bb5f2d Author: Karthik B S Date: Mon Sep 21 16:32:09 2020 +0530 Documentation/gpu: Add asynchronous flip documentation for i915 Add the details of the implementation of asynchronous flips for i915. v7: -Rebased. v8: -Rebased. v9: -Rebased. v10: Move all documentation changes to this patch. (Ville) Signed-off-by: Karthik B S Signed-off-by: Vandita Kulkarni Reviewed-by: Ville Syrjälä Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200921110210.21182-8-karthik.b.s@intel.com commit e5cb1afba46d0a2c01605483e800f8231362022b Author: Karthik B S Date: Mon Sep 21 16:32:08 2020 +0530 drm/i915: WA for platforms with double buffered address update enable bit In Gen 9 and Gen 10 platforms, async address update enable bit is double buffered. Due to this, during the transition from async flip to sync flip we have to wait until this bit is updated before continuing with the normal commit for sync flip. v9: -Rename skl_toggle_async_sync() to skl_disable_async_flip_wa(). (Ville) -Place the declarations appropriately as per need. (Ville) -Take the lock before the reg read. (Ville) -Fix comment and formatting. (Ville) -Use IS_GEN_RANGE() for gen check. (Ville) -Move skl_disable_async_flip_wa() to intel_pre_plane_update(). (Ville) v10: -Rebased. Signed-off-by: Karthik B S Signed-off-by: Vandita Kulkarni Reviewed-by: Ville Syrjälä Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200921110210.21182-7-karthik.b.s@intel.com commit b039193d128349719b830c7acc95e8a653953d77 Author: Karthik B S Date: Mon Sep 21 16:32:07 2020 +0530 drm/i915: Add dedicated plane hook for async flip case This hook is added to avoid writing other plane registers in case of async flips, so that we do not write the double buffered registers during async surface address update. v7: -Plane ctl needs bits from skl_plane_ctl_crtc as well. (Ville) -Add a vfunc for skl_program_async_surface_address and call it from intel_update_plane. (Ville) v8: -Rebased. v9: -Use if-else instead of return in intel_update_plane(). (Ville) -Rename 'program_async_surface_address' to 'async_flip'. (Ville) v10: -Check if async_flip hook is present before calling it. Otherwise it will OOPS during legacy cursor updates. (Ville) v11: -Rename skl_program_async_surface_address(). (Ville) Signed-off-by: Karthik B S Signed-off-by: Vandita Kulkarni Reviewed-by: Ville Syrjälä Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200921110210.21182-6-karthik.b.s@intel.com commit 0bbca6097d501c8484f3ab4199b6dea457c4c489 Author: Karthik B S Date: Mon Sep 21 16:32:06 2020 +0530 drm/i915: Do not call drm_crtc_arm_vblank_event in async flips Since the flip done event will be sent in the flip_done_handler, no need to add the event to the list and delay it for later. v2: -Moved the async check above vblank_get as it was causing issues for PSR. v3: -No need to wait for vblank to pass, as this wait was causing a 16ms delay once every few flips. v4: -Rebased. v5: -Rebased. v6: -Rebased. v7: -No need of irq disable if we are not doing vblank evade. (Ville) v8: -Rebased. v9: -Move the return in intel_pipe_update_end before tracepoint. (Ville) v10: Rebased. Signed-off-by: Karthik B S Signed-off-by: Vandita Kulkarni Reviewed-by: Ville Syrjälä Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200921110210.21182-5-karthik.b.s@intel.com commit 30ff93af9e19dbe88ff8b5e711e05b26b991eec0 Author: Karthik B S Date: Mon Sep 21 16:32:05 2020 +0530 drm/i915: Add checks specific to async flips If flip is requested on any other plane, reject it. Make sure there is no change in fbc, offset and framebuffer modifiers when async flip is requested. If any of these are modified, reject async flip. v2: -Replace DRM_ERROR (Paulo) -Add check for changes in OFFSET, FBC, RC(Paulo) v3: -Removed TODO as benchmarking tests have been run now. v4: -Added more state checks for async flip (Ville) -Moved intel_atomic_check_async to the end of intel_atomic_check as the plane checks needs to pass before this. (Ville) -Removed crtc_state->enable_fbc check. (Ville) -Set the I915_MODE_FLAG_GET_SCANLINE_FROM_TIMESTAMP flag for async flip case as scanline counter is not reliable here. v5: -Fix typo and other check patch errors seen in CI in 'intel_atomic_check_async' function. v6: -Don't call intel_atomic_check_async multiple times. (Ville) -Remove the check for n_planes in intel_atomic_check_async -Added documentation for async flips. (Paulo) v7: -Replace 'intel_plane' with 'plane'. (Ville) -Replace all uapi.foo as hw.foo. (Ville) -Do not use intel_wm_need_update function. (Ville) -Add destination coordinate check. (Ville) -Do not allow async flip with linear buffer on older hw as it has issues with this. (Ville) -Remove break after intel_atomic_check_async. (Ville) v8: -Rebased. v9: -Replace DRM_DEBUG_KMS with drm_dbg_kms(). (Ville) -Fix comment formatting. (Ville) -Remove gen specific checks. (Ville) -Remove irrelevant FB size check. (Ville) -Add missing stride check. (Ville) -Use drm_rect_equals() instead of individual checks. (Ville) -Call intel_atomic_check_async before state dump. (Ville) v10: -Fix the checkpatch errors seen on CI. v11: -Use const for all plane/crtc states. (Ville) -Use 'switch' instead of 'if' for modifier check. (Ville) -Move documentation changes to a single patch. (Ville) Signed-off-by: Karthik B S Signed-off-by: Vandita Kulkarni Reviewed-by: Ville Syrjälä Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200921110210.21182-4-karthik.b.s@intel.com commit c5e07e0049eeb9654f4943e3e23c927068c1d9bf Author: Karthik B S Date: Mon Sep 21 16:32:04 2020 +0530 drm/i915: Add support for async flips in I915 Set the Async Address Update Enable bit in plane ctl when async flip is requested. v2: -Move the Async flip enablement to individual patch (Paulo) v3: -Rebased. v4: -Add separate plane hook for async flip case (Ville) v5: -Rebased. v6: -Move the plane hook to separate patch. (Paulo) -Remove the early return in skl_plane_ctl. (Paulo) v7: -Move async address update enable to skl_plane_ctl_crtc() (Ville) v8: -Rebased. v9: -Rebased. v10: -Rebased. Signed-off-by: Karthik B S Signed-off-by: Vandita Kulkarni Reviewed-by: Ville Syrjälä Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200921110210.21182-3-karthik.b.s@intel.com commit 1288f9b0990857c6eea1f8a7a6f38fb48b467b13 Author: Karthik B S Date: Mon Sep 21 16:32:03 2020 +0530 drm/i915: Add enable/disable flip done and flip done handler Add enable/disable flip done functions and the flip done handler function which handles the flip done interrupt. Enable the flip done interrupt in IER. Enable flip done function is called before writing the surface address register as the write to this register triggers the flip done interrupt Flip done handler is used to send the page flip event as soon as the surface address is written as per the requirement of async flips. The interrupt is disabled after the event is sent. v2: -Change function name from icl_* to skl_* (Paulo) -Move flip handler to this patch (Paulo) -Remove vblank_put() (Paulo) -Enable flip done interrupt for gen9+ only (Paulo) -Enable flip done interrupt in power_well_post_enable hook (Paulo) -Removed the event check in flip done handler to handle async flips without pageflip events. v3: -Move skl_disable_flip_done out of interrupt handler (Paulo) -Make the pending vblank event NULL in the beginning of flip_done_handler to remove sporadic WARN_ON that is seen. v4: -Calculate timestamps using flip done time stamp and current timestamp for async flips (Ville) v5: -Fix the sparse warning by making the function 'g4x_get_flip_counter' static.(Reported-by: kernel test robot ) -Fix the typo in commit message. v6: -Revert back to old time stamping code. -Remove the break while calling skl_enable_flip_done. (Paulo) v7: -Rebased. v8: -Rebased. v9: -Use struct drm_i915_private *i915 in new code. (Ville) -Use intel_crtc instead of drm_crtc. (Ville) -Do not mix the flip done and vblank hooks. (Ville) v10: -Rebased. Signed-off-by: Karthik B S Signed-off-by: Vandita Kulkarni Reviewed-by: Ville Syrjälä Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200921110210.21182-2-karthik.b.s@intel.com commit 45e241f8c5d7798e63a0c79b49d39fc9d38e8f59 Author: Christian König Date: Fri Sep 25 15:45:19 2020 +0200 drm/ttm: remove fault callback Another one bites the dust. Signed-off-by: Christian König Reviewed-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/392325/ commit 76fe313adde2db165aea82699aca215ea6e9b11b Author: Christian König Date: Fri Sep 25 15:42:04 2020 +0200 drm/nouveau: stop using TTMs fault callback We already implemented the fault handler ourself, just open code what is necessary here. Signed-off-by: Christian König Reviewed-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/392323/ commit d3ef581afa5e6a65cc3a40de2e62901f17b8cebc Author: Christian König Date: Fri Sep 25 15:21:49 2020 +0200 drm/amdgpu: stop using TTMs fault callback Implement the fault handler ourself using the provided TTM functions. Signed-off-by: Christian König Reviewed-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/392324/ commit 8e0310f0ff04ea311190f83cc0d18a656fe65d26 Author: Christian König Date: Fri Sep 25 14:17:09 2020 +0200 drm/radeon: stop using TTMs fault callback We already implemented the fault handler ourself, just open code what is necessary here. Signed-off-by: Christian König Reviewed-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/392322/ commit 0b5aebec2bbfb112140122732e7d10788127f682 Author: Christian König Date: Fri Sep 25 12:40:03 2020 +0200 drm/ttm: move SG flag check into ttm_bo_vm_reserve Just check earlier if a BO can be page faulted in the first place. Signed-off-by: Christian König Reviewed-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/392321/ commit 686d4b4b99afe791b0ee3f272843048b155fe53f Author: Paul Cercueil Date: Sun Sep 27 21:36:45 2020 +0200 drm/ingenic: Add support for paletted 8bpp On JZ4725B and newer, the F0 plane supports paletted 8bpp with a 256-entry palette. Add support for it. v3: Only accept a full 256-entry palette. Signed-off-by: Paul Cercueil Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200927193645.262612-2-paul@crapouillou.net commit dba09e834f4ee6121346f2a7d40b7ee96d0b4b77 Author: Paul Cercueil Date: Sat Sep 26 19:05:01 2020 +0200 drm/ingenic: Add support for 24-bit modes Starting from the JZ4725B SoC, the primary and overlay planes support 24-bit pixel modes (8 bits per color component, without dummy byte). Add support for these in the ingenic-drm driver. Signed-off-by: Paul Cercueil Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200926170501.1109197-8-paul@crapouillou.net commit bb85760572ca24a76c3de644ce45cfb69f5a731a Author: Paul Cercueil Date: Sat Sep 26 19:05:00 2020 +0200 drm/ingenic: Add support for 30-bit modes Starting from the JZ4760 SoC, the primary and overlay planes support 30-bit pixel modes (10 bits per color component). Add support for these in the ingenic-drm driver. Signed-off-by: Paul Cercueil Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200926170501.1109197-7-paul@crapouillou.net commit 3d705fb0dc43a91095de3ebc30914e50b0e20b2f Author: Paul Cercueil Date: Sat Sep 26 19:04:58 2020 +0200 drm/ingenic: Support handling different pixel formats in F0/F1 planes Until now the ingenic-drm driver supported the same pixel formats on the F0 and F1 planes, and across all SoCs. However, the F0 plane does support paletted 8bpp, while the F1 plane doesn't. Furthermore, the three SoCs currently supported all have different pixel formats available; 24bpp was added in JZ4725B, 30bpp was added in JZ4770. Prepare the inclusion of paletted 8bpp, 24bpp and 30bpp support by having separate pixel format lists for F0 and F1 planes. Signed-off-by: Paul Cercueil Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200926170501.1109197-5-paul@crapouillou.net commit 174d8e52a60f196cfbdec299688cf14f124c8b67 Author: Paul Cercueil Date: Sat Sep 26 19:04:57 2020 +0200 drm/ingenic: Alloc F0 and F1 DMA descriptors at once Instead of calling dmam_alloc_coherent() once for each 4-bit DMA hardware descriptor, we can have them both in a physical memory page, as long as they are aligned to 16 bytes. This reduces memory consumption, and will make it easier to add more DMA descriptors in the future. Note that the old code would not create the F0 descriptor on SoCs that don't support multiple planes. We don't care, because: - we don't use more memory by allocating two descriptors instead of a single one; - the only SoC that does not support multiple planes (JZ4740) still has two independent DMA channels, for an unknown reason. Signed-off-by: Paul Cercueil Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200926170501.1109197-4-paul@crapouillou.net commit 1677d31c226683236dd80f49e2eea0e6cee08a51 Author: Paul Cercueil Date: Sat Sep 26 19:04:56 2020 +0200 drm/ingenic: Add support for reserved memory Add support for static memory reserved from Device Tree. Since we're using GEM buffers backed by CMA, it is interesting to have an option to specify the CMA area where the GEM buffers will be allocated. v2: Don't abort probe if reserved memory cannot be obtained. The driver will still work fine provided the kernel configuration is sane. Signed-off-by: Paul Cercueil Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200926170501.1109197-3-paul@crapouillou.net commit 33700f6f7d9f6b4e1e6df933ef7fd388889c662c Author: Paul Cercueil Date: Sat Sep 26 19:04:55 2020 +0200 drm/ingenic: Reset pixclock rate when parent clock rate changes Old Ingenic SoCs can overclock very well, up to +50% of their nominal clock rate, whithout requiring overvolting or anything like that, just by changing the rate of the main PLL. Unfortunately, all clocks on the system are derived from that PLL, and when the PLL rate is updated, so is our pixel clock. To counter that issue, we make sure that the panel is in VBLANK before the rate change happens, and we will then re-set the pixel clock rate afterwards, once the PLL has been changed, to be as close as possible to the pixel rate requested by the encoder. v2: Add comment about mutex usage Signed-off-by: Paul Cercueil Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200926170501.1109197-2-paul@crapouillou.net commit badef44deff1fae8d21c5c1cfc4dde95fb5bf993 Author: Chris Wilson Date: Fri Sep 25 11:11:07 2020 +0100 drm/i915/gem: Hold request reference for canceling an active context We have to be very careful while walking the timeline->requests list under the RCU guard, as the requests (and so rq->link) use SLAB_TYPESAFE_BY_RCU and so the requests may be reallocated within an rcu grace period. As the requests are reallocated, they are removed from one list and placed on another, and if we are iterating over that request at that moment, the list iteration jumps from one list to the next and promptly gets confused. Verify we hold the request reference to ensure that the request is not added to a new list behind our backs. <4> [582.745252] general protection fault, probably for non-canonical address 0xcccccccccccccd5c: 0000 [#1] PREEMPT SMP PTI <4> [582.745297] CPU: 0 PID: 1475 Comm: gem_ctx_persist Not tainted 5.9.0-rc1-CI-CI_DRM_8908+ #1 <4> [582.745304] Hardware name: Intel Corporation NUC7CJYH/NUC7JYB, BIOS JYGLKCPX.86A.0027.2018.0125.1347 01/25/2018 <4> [582.745317] RIP: 0010:__lock_acquire+0x2c3/0x1f40 <4> [582.745323] Code: 00 65 8b 05 c7 8a ef 7e 85 c0 0f 85 b4 07 00 00 44 8b 9d c4 08 00 00 45 85 db 0f 84 0f 01 00 00 ba 05 00 00 00 e9 c8 06 00 00 <48> 81 3f c0 89 c7 82 b8 00 00 00 00 41 0f 45 c0 83 fe 01 41 89 c3 <4> [582.745334] RSP: 0018:ffffc9000461bc40 EFLAGS: 00010002 <4> [582.745340] RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000000000 <4> [582.745345] RDX: 0000000000000000 RSI: 0000000000000000 RDI: cccccccccccccd5c <4> [582.745350] RBP: ffff8881ec4a2880 R08: 0000000000000001 R09: 0000000000000001 <4> [582.745356] R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000000 <4> [582.745361] R13: 0000000000000000 R14: 0000000000000000 R15: cccccccccccccd5c <4> [582.745367] FS: 00007fb44da78e40(0000) GS:ffff888278000000(0000) knlGS:0000000000000000 <4> [582.745373] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 <4> [582.745378] CR2: 00007fb44daad040 CR3: 0000000268428000 CR4: 0000000000350ef0 <4> [582.745383] Call Trace: <4> [582.745390] ? __lock_acquire+0x913/0x1f40 <4> [582.745397] lock_acquire+0xb5/0x3c0 <4> [582.745526] ? kill_engines+0x19a/0x4b0 [i915] <4> [582.745533] ? find_held_lock+0x2d/0x90 <4> [582.745541] _raw_spin_lock_irq+0x30/0x40 <4> [582.745635] ? kill_engines+0x19a/0x4b0 [i915] <4> [582.745727] kill_engines+0x19a/0x4b0 [i915] <4> [582.745820] context_close+0x195/0x410 [i915] <4> [582.745912] i915_gem_context_close+0x5b/0x160 [i915] <4> [582.745994] i915_driver_postclose+0x14/0x40 [i915] <4> [582.746003] drm_file_free.part.13+0x240/0x290 <4> [582.746009] drm_release_noglobal+0x16/0x50 <4> [582.746016] __fput+0xa5/0x250 <4> [582.746021] task_work_run+0x6e/0xb0 <4> [582.746028] exit_to_user_mode_prepare+0x178/0x180 <4> [582.746034] syscall_exit_to_user_mode+0x36/0x220 <4> [582.746040] entry_SYSCALL_64_after_hwframe+0x44/0xa9 <4> [582.746045] RIP: 0033:0x7fb44d1dc421 <4> [582.746050] Code: f7 d8 64 89 02 48 c7 c0 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 8b 05 ea cf 20 00 85 c0 75 16 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 3f f3 c3 0f 1f 44 00 00 53 89 fb 48 83 ec 10 <4> [582.746062] RSP: 002b:00007ffed2e83818 EFLAGS: 00000246 ORIG_RAX: 0000000000000003 <4> [582.746069] RAX: 0000000000000000 RBX: 0000556410bfe840 RCX: 00007fb44d1dc421 <4> [582.746075] RDX: 000000000000000a RSI: 00000000c0406469 RDI: 0000000000000008 <4> [582.746080] RBP: 0000000000000008 R08: 00007fb44d1c51cc R09: 00007fb44d1c5240 <4> [582.746086] R10: 0000000000000001 R11: 0000000000000246 R12: 00000000fffffffb <4> [582.746091] R13: 0000000000000006 R14: 0000000000000000 R15: 000000000000000a <4> [582.746099] Modules linked in: vgem mei_hdcp snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio btusb btrtl btbcm btintel x86_pkg_temp_thermal coretemp crct10dif_pclmul crc32_pclmul bluetooth ghash_clmulni_intel ecdh_generic ecc i915 r8169 realtek mei_me mei snd_hda_intel i2c_hid snd_intel_dspcfg snd_hda_codec snd_hwdep snd_hda_core snd_pcm pinctrl_geminilake pinctrl_intel prime_numbers [last unloaded: test_drm_mm] Fixes: 736e785f9b28 ("drm/i915/gem: Reduce context termination list iteration guard to RCU") Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200925101107.27869-2-chris@chris-wilson.co.uk commit 35faeb7de9ef83da510a048f2016061f1e31d5fc Author: Chris Wilson Date: Fri Sep 25 11:11:06 2020 +0100 drm/i915: Redo "Remove i915_request.lock requirement for execution callbacks" The reordering and rebasing of commit 2e4c6c1a9db5 ("drm/i915: Remove i915_request.lock requirement for execution callbacks") caused it to revert an earlier correction. Let us restore commit 99f0a640d464 ("drm/i915: Remove requirement for holding i915_request.lock for breadcrumbs") Fixes: 2e4c6c1a9db5 ("drm/i915: Remove i915_request.lock requirement for execution callbacks") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Rodrigo Vivi Cc: Joonas Lahtinen Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200925101107.27869-1-chris@chris-wilson.co.uk commit ca6cf78322d1b84744dd2772546c0e8f8707c0ad Author: Arnd Bergmann Date: Fri Sep 18 12:09:06 2020 +0200 fbdev: sbuslib: remove compat_alloc_user_space usage This is one of the last users of compat_alloc_user_space() and copy_in_user(). The actual handler is implemented in the same file and could be shared, but as I couldn't test this properly I leave the native case alone and just make a straight copy of it for the compat case, with a minimum set of modifications. Signed-off-by: Arnd Bergmann Acked-by: Daniel Vetter Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200918100926.1447563-3-arnd@arndb.de commit 3f6195d10fffb85dd09833a75c793cb5be7f74e2 Author: Arnd Bergmann Date: Fri Sep 18 12:09:05 2020 +0200 fbdev: sbuslib: remove unused FBIOSCURSOR32 helper No driver implements FBIOSCURSOR, so this function has no purpose and can be removed. Apparently it was added in linux-2.1.44 to handle compatibility for drivers/sbus/char/sunfb.c but lost its purpose when that driver got rewritten in linux-2.5.63. Signed-off-by: Arnd Bergmann Acked-by: Daniel Vetter Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200918100926.1447563-2-arnd@arndb.de commit 06f4277463ba695287829e0b52d9b82be44f99bf Author: Arnd Bergmann Date: Fri Sep 18 12:09:04 2020 +0200 fbdev: simplify fb_getput_cmap() This function is one of the remaining users of compat_alloc_user_space() and copy_in_user(). Clean it up by copying to a local data structure copy instead, which also leads to more readable code. Signed-off-by: Arnd Bergmann Acked-by: Daniel Vetter Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200918100926.1447563-1-arnd@arndb.de commit 8b62740472c4fe3cee64df4588033e1d8ff3b235 Author: Jason Yan Date: Sat Sep 12 11:38:51 2020 +0800 ACPI, APEI: make apei_resources_all static This eliminates the following sparse warning: drivers/acpi/apei/apei-base.c:290:23: warning: symbol 'apei_resources_all' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: Jason Yan Reviewed-by: Borislav Petkov Signed-off-by: Rafael J. Wysocki commit 3136fed4f91e02ad754464bf1ec15e22b800cc69 Author: Robin Murphy Date: Thu Sep 3 21:40:23 2020 +0100 drm/etnaviv: Drop local dma_parms Since commit 9495b7e92f71 ("driver core: platform: Initialize dma_parms for platform devices"), struct platform_device already provides a dma_parms structure, so we can save allocating another one. Signed-off-by: Robin Murphy Signed-off-by: Lucas Stach commit a5cafb906b48573cb87a16b12625198c302e3452 Author: Christian Gmeiner Date: Fri Aug 14 11:05:04 2020 +0200 drm/etnaviv: add pipe_select(..) helper Replace the open coded pixel pipe selection pattern with a function. Signed-off-by: Christian Gmeiner Signed-off-by: Lucas Stach commit bbab2be7e514268e4d90ee6497f53243bb61d51c Author: Christian Gmeiner Date: Fri Aug 14 11:05:03 2020 +0200 drm/etnaviv: add total hi bandwidth perfcounter These two perf counters represent the total read and write GPU bandwidth in terms of 64bits. The used sequence was taken from Vivante kernel driver. Signed-off-by: Christian Gmeiner Signed-off-by: Lucas Stach commit 658690d8ebaa9bab3337f2cc8f895a97f54fb46a Author: Christian Gmeiner Date: Fri Aug 14 11:05:02 2020 +0200 drm/etnaviv: call perf_reg_read(..) Replace the open coded access pattern with a function call. Signed-off-by: Christian Gmeiner Signed-off-by: Lucas Stach commit 77dfb36a761b57878389661b5bd05ef7dfe01809 Author: Christian Gmeiner Date: Fri Aug 14 11:05:01 2020 +0200 drm/etnaviv: rename pipe_reg_read(..) pipe_reg_read(..) iterates over all pixel pipes, selects a perf counter register and sums the actual perf counter value. Rename the function to reflect more what it is actual doing. Signed-off-by: Christian Gmeiner Signed-off-by: Lucas Stach commit 8bde6c0d4e7374fedeca959af42ad6819c792e08 Author: Thomas Zimmermann Date: Tue Sep 22 16:57:00 2020 +0200 drm/vram-helper: Don't put new BOs into VRAM Most drivers that use VRAM helpers have only a few MiB of framebuffer memory available. To reduce fragmentation, new BOs are now put into system memory by default. Only pin operations are allowed to move BOs into VRAM. v2: * rebased onto latest drm-tip Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200922145700.25413-4-tzimmermann@suse.de commit 4d92d7d76dd582fc1212b25a9380acc6123535cb Author: Thomas Zimmermann Date: Tue Sep 22 16:56:59 2020 +0200 drm/vram-helper: Set object function iff they are not provided by driver Don't override the GEM object functions unconditionally. If the driver sets the GEM functions, VRAM helpers will not set them. The idea has been taken from SHMEM helpers. v2: * updated the commit message (Sam) * document the new feature for drm_gem_vram_create() Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200922145700.25413-3-tzimmermann@suse.de commit 7faa92dfdf426db40740f59fcdfce48e5cfb7210 Author: Thomas Zimmermann Date: Tue Sep 22 16:56:58 2020 +0200 drm/vram-helper: Integrate drm_gem_vram_init() into drm_gem_vram_create() The drm_gem_vram_create() function is the only caller of the internal helper drm_gem_vram_init(). Streamline the code by putting all code into the create function. v2: * rebased onto latest drm-tip * fixed typo in commit message (Sam) Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200922145700.25413-2-tzimmermann@suse.de commit d693def4fd1c23f1ca5aed1afb9993b3a2069ad2 Author: Thomas Zimmermann Date: Wed Sep 23 12:21:59 2020 +0200 drm: Remove obsolete GEM and PRIME callbacks from struct drm_driver Several GEM and PRIME callbacks have been deprecated in favor of per-instance GEM object functions. Remove the callbacks as they are now unused. The only exception is .gem_prime_mmap, which is still in use by several drivers. What is also gone is gem_vm_ops in struct drm_driver. All drivers now use struct drm_gem_object_funcs.vm_ops instead. While at it, the patch also improves error handling around calls to .free and .get_sg_table callbacks. v3: * restore default call to drm_gem_prime_export() in drm_gem_prime_handle_to_fd() * return -ENOSYS if get_sg_table is not set * drop all checks for obj->funcs * clean up TODO list and documentation v2: * update related TODO item (Sam) Signed-off-by: Thomas Zimmermann Acked-by: Daniel Vetter Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20200923102159.24084-23-tzimmermann@suse.de commit c85dce1b2e7e5037ef9f01bc64a26e40c92a9e79 Author: Thomas Zimmermann Date: Wed Sep 23 12:21:58 2020 +0200 drm/xlnx: Initialize DRM driver instance with CMA helper macro The xlnx driver uses CMA helpers with default callback functions. Initialize the driver structure with the rsp CMA helper macro. The driver is being converted to use GEM object functions as part of this change. Two callbacks, .dumb_destroy and .gem_prime_import, were initialized to their default implementations, so they are just kept empty now. v2: * initialize with DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE (Laurent) Signed-off-by: Thomas Zimmermann Reviewed-by: Laurent Pinchart Reviewed-by: Hyun Kwon Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20200923102159.24084-22-tzimmermann@suse.de commit 1adda8b8f12c22705e7f86c120499d806d09af6a Author: Thomas Zimmermann Date: Wed Sep 23 12:21:57 2020 +0200 drm/xen: Introduce GEM object functions GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces the per-driver callbacks with per-instance callbacks in xen. The only exception is gem_prime_mmap, which is non-trivial to convert. v2: * convert xen_drm_drv_free_object_unlocked() to static callback (Oleksandr) Signed-off-by: Thomas Zimmermann Acked-by: Oleksandr Andrushchenko Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20200923102159.24084-21-tzimmermann@suse.de commit b76b85b7c2e28a0e73dbd2d4cf4da7c933858924 Author: Thomas Zimmermann Date: Wed Sep 23 12:21:56 2020 +0200 drm/vkms: Introduce GEM object functions GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces the per-driver callbacks with per-instance callbacks in vkms. Signed-off-by: Thomas Zimmermann Reviewed-by: Melissa Wen Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20200923102159.24084-20-tzimmermann@suse.de commit c6069a02fa554302b93274c6d75d14251200de18 Author: Thomas Zimmermann Date: Wed Sep 23 12:21:55 2020 +0200 drm/virtgpu: Set PRIME export function in struct drm_gem_object_funcs GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces virtgpu's per-driver PRIME export function with a per-object function. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20200923102159.24084-19-tzimmermann@suse.de commit dff29810a8d5a457ecc6f5067a891c3878229e8e Author: Thomas Zimmermann Date: Wed Sep 23 12:21:54 2020 +0200 drm/vgem: Introduce GEM object functions GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces the per-driver callbacks with per-instance callbacks in vgem. The only exception is gem_prime_mmap, which is non-trivial to convert. Signed-off-by: Thomas Zimmermann Reviewed-by: Melissa Wen Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20200923102159.24084-18-tzimmermann@suse.de commit dd60202237a021d6c076546e79a08fcac863327b Author: Thomas Zimmermann Date: Wed Sep 23 12:21:53 2020 +0200 drm/vc4: Introduce GEM object functions GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces the per-driver callbacks with per-instance callbacks in vc4. The only exception is gem_prime_mmap, which is non-trivial to convert. Signed-off-by: Thomas Zimmermann Reviewed-by: Eric Anholt Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20200923102159.24084-17-tzimmermann@suse.de commit dd311c6fe8af1b176165b828a35553af16f9710c Author: Thomas Zimmermann Date: Wed Sep 23 12:21:52 2020 +0200 drm/tegra: Introduce GEM object functions GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces the per-driver callbacks with per-instance callbacks in tegra. Signed-off-by: Thomas Zimmermann Acked-by: Thierry Reding Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20200923102159.24084-16-tzimmermann@suse.de commit 0d590af3140d0f84c537a9ad252aecc780ed7aa5 Author: Thomas Zimmermann Date: Wed Sep 23 12:21:51 2020 +0200 drm/rockchip: Convert to drm_gem_object_funcs GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces the per-driver callbacks with per-instance callbacks in rockchip. The only exception is gem_prime_mmap, which is non-trivial to convert. v3: * update documentation Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20200923102159.24084-15-tzimmermann@suse.de commit 552f9d60f6cc5bc53007b0d82c1d0696fcf51a33 Author: Thomas Zimmermann Date: Wed Sep 23 12:21:50 2020 +0200 drm/radeon: Introduce GEM object functions GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces the per-driver callbacks with per-instance callbacks in radeon. v2: * move object-function instance to radeon_gem.c (Christian) * set callbacks in radeon_gem_object_create() (Christian) Signed-off-by: Thomas Zimmermann Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20200923102159.24084-14-tzimmermann@suse.de commit 4889d684fd5a59b9b5b01f3e2d8d9f1f34d99e55 Author: Thomas Zimmermann Date: Wed Sep 23 12:21:49 2020 +0200 drm/pl111: Introduce GEM object functions GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces the per-driver callbacks with per-instance callbacks in pl111. The only exception is gem_prime_mmap, which is non-trivial to convert. v2: * use drm_gem_cma_create_object_default_funcs() (Eric) Signed-off-by: Thomas Zimmermann Reviewed-by: Eric Anholt Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20200923102159.24084-13-tzimmermann@suse.de commit c5ca5e029fa64b7a6024457c4ca2a8e5372dabc7 Author: Thomas Zimmermann Date: Wed Sep 23 12:21:48 2020 +0200 drm/omapdrm: Introduce GEM object functions GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces the per-driver callbacks with per-instance callbacks in omapdrm. v2: * make omap_gem_free_object() static (Tomi) Signed-off-by: Thomas Zimmermann Reviewed-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20200923102159.24084-12-tzimmermann@suse.de commit ed853f6c3fbc9d83a987801a36e563abafaff86e Author: Thomas Zimmermann Date: Wed Sep 23 12:21:47 2020 +0200 drm/nouveau: Introduce GEM object functions GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces the per-driver callbacks with per-instance callbacks in nouveau. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20200923102159.24084-11-tzimmermann@suse.de commit 3c9edd9c85f53e047dad867da63e54e78e6f7b6d Author: Thomas Zimmermann Date: Wed Sep 23 12:21:46 2020 +0200 drm/msm: Introduce GEM object funcs GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces the per-driver callbacks with per-instance callbacks in msm. The only exception is gem_prime_mmap, which is non-trivial to convert. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20200923102159.24084-10-tzimmermann@suse.de commit 84274de61a3c2d860238142cdd7e55803f4b29e4 Author: Thomas Zimmermann Date: Wed Sep 23 12:21:45 2020 +0200 drm/mediatek: Introduce GEM object functions GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces the per-driver callbacks with per-instance callbacks in mediatek. The only exception is gem_prime_mmap, which is non-trivial to convert. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20200923102159.24084-9-tzimmermann@suse.de commit 80cf656c25b6febea689c49a4bcec98ed8776d64 Author: Thomas Zimmermann Date: Wed Sep 23 12:21:44 2020 +0200 drm/imx/dcss: Initialize DRM driver instance with CMA helper macro The i.MX DCSS driver uses CMA helpers with default callback functions. Initialize the driver structure with the rsp CMA helper macro. The driver is being converted to use GEM object functions as part of this change. Two callbacks, .gem_prime_export and .gem_prime_import, were initialized to their default implementations, so they are just kept empty now. Signed-off-by: Thomas Zimmermann Reviewed-by: Laurentiu Palcu Acked-by: Christian König Reported-by: kernel test robot Link: https://patchwork.freedesktop.org/patch/msgid/20200923102159.24084-8-tzimmermann@suse.de commit 10012620ea653e46004756b6a02c9fa509382438 Author: Thomas Zimmermann Date: Wed Sep 23 12:21:43 2020 +0200 drm/i915: Introduce GEM object functions GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces the per-driver callbacks with per-instance callbacks in i915. v2: * move object-function instance to i915_gem_object.c (Jani) Signed-off-by: Thomas Zimmermann Reviewed-by: Tvrtko Ursulin Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20200923102159.24084-7-tzimmermann@suse.de commit 7cd467d0fc661768c5d36cdb864c7115357c16ee Author: Thomas Zimmermann Date: Wed Sep 23 12:21:42 2020 +0200 drm/gma500: Introduce GEM object functions GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces the per-driver callbacks with per-instance callbacks in gma500. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20200923102159.24084-6-tzimmermann@suse.de commit a64325a1d76a9e15425c7747dfecea7c5631c82d Author: Thomas Zimmermann Date: Wed Sep 23 12:21:41 2020 +0200 drm/exynos: Introduce GEM object functions GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces the per-driver callbacks with per-instance callbacks in exynos. The only exception is gem_prime_mmap, which is non-trivial to convert. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20200923102159.24084-5-tzimmermann@suse.de commit a77306278f2c7cc3fc91fecf8a53d686b0d12431 Author: Thomas Zimmermann Date: Wed Sep 23 12:21:40 2020 +0200 drm/etnaviv: Introduce GEM object functions GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces the per-driver callbacks with per-instance callbacks in etnaviv. The only exception is gem_prime_mmap, which is non-trivial to convert. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Acked-by: Lucas Stach Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20200923102159.24084-4-tzimmermann@suse.de commit ad01dd0376afbd7a39d78da543f5a048d4ae14c9 Author: Thomas Zimmermann Date: Wed Sep 23 12:21:39 2020 +0200 drm/armada: Introduce GEM object functions GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces the per-driver callbacks with per-instance callbacks in armada. Signed-off-by: Thomas Zimmermann Acked-by: Russell King Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20200923102159.24084-3-tzimmermann@suse.de commit 246cb7e49a70e5c4b71caed5df518693c345bab7 Author: Thomas Zimmermann Date: Wed Sep 23 12:21:38 2020 +0200 drm/amdgpu: Introduce GEM object functions GEM object functions deprecate several similar callback interfaces in struct drm_driver. This patch replaces the per-driver callbacks with per-instance callbacks in amdgpu. The only exception is gem_prime_mmap, which is non-trivial to convert. v3: * remove amdgpu_object.c from patch (Christian) v2: * move object-function instance to amdgpu_gem.c (Christian) * set callbacks in amdgpu_gem_object_create() (Christian) Signed-off-by: Thomas Zimmermann Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20200923102159.24084-2-tzimmermann@suse.de commit cd460be0460fd4edeef194a26d90c7ac02a8dadd Author: Joel Stanley Date: Fri Sep 25 14:53:25 2020 +0930 soc: aspeed-lpc-ctrl: Fix driver name Clarify the string now that it supports the AST2600 too. Signed-off-by: Joel Stanley commit 4d1d81dbc9d51ac383f3979da5eba13870183c4d Author: Joel Stanley Date: Fri Sep 25 14:52:44 2020 +0930 soc: aspeed-lpc-ctrl: Fix whitespace Some misaligned indentation I noticed when applying another patch. Signed-off-by: Joel Stanley commit 5042d3f278de45e215291d2adcf1024cc3c7f73a Author: Joel Stanley Date: Thu Mar 12 22:44:13 2020 +1030 soc: aspeed-lpc-ctrl: LPC to AHB mapping on ast2600 The ast2600 disables the mapping of AHB memory regions by default, only allowing the LPC window to point to SPI NOR. In order to point the window to any AHB address, an ast2600 specific bit must be toggled. Reviewed-by: Andrew Jeffery Link: https://lore.kernel.org/r/20200312121413.294384-1-joel@jms.id.au Signed-off-by: Joel Stanley commit 6bf4ddbe2b4805f0628922446a7e85e34013cd10 Author: Andrew Jeffery Date: Thu Oct 17 10:09:50 2019 +1030 soc: aspeed-lpc-ctrl: Fail probe of lpc-ctrl if reserved memory is not aligned Alignment is a hardware constraint of the LPC2AHB bridge, and misaligned reserved memory will present as corrupted data. Signed-off-by: Andrew Jeffery Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20191016233950.10100-1-andrew@aj.id.au Signed-off-by: Joel Stanley commit 44ddc4de87a54b32ead77d3ec67f0bf93d8c0055 Author: Brad Bishop Date: Wed Sep 25 08:56:03 2019 -0400 soc: aspeed: lpc: Add AST2600 compatible strings The AST2600 has the same lpc-ctrl and lpc-snoop devices as the AST2500. Signed-off-by: Brad Bishop Acked-by: Andrew Jeffery Link: https://lore.kernel.org/r/20190925125610.12096-4-bradleyb@fuzziesquirrel.com Signed-off-by: Joel Stanley commit e8589796a6d1255f0f6cbbe9706f1f70362ba0c8 Author: Brad Bishop Date: Wed Sep 25 08:56:01 2019 -0400 dt-bindings: aspeed-lpc: Add AST2600 compatible strings The AST2600 datasheet indicates the same register set behind the LPC controller address space. Signed-off-by: Brad Bishop Reviewed-by: Andrew Jeffery Link: https://lore.kernel.org/r/20190925125610.12096-2-bradleyb@fuzziesquirrel.com Signed-off-by: Joel Stanley commit fe100b382c1c052b63c14091fd8bb3fe932453ae Author: Joel Stanley Date: Mon Sep 21 18:46:44 2020 +0930 ARM: dts: aspeed: Add silicon id node This register describes the silicon id and chip unique id. It varies between CPU revisions, but is always part of the SCU. Reviewed-by: Andrew Jeffery Link: https://lore.kernel.org/r/20200921091644.133107-4-joel@jms.id.au Signed-off-by: Joel Stanley commit e0218dca5787c851b403fcbc33cdfec795446fca Author: Joel Stanley Date: Mon Sep 21 18:46:43 2020 +0930 soc: aspeed: Add soc info driver This adds a SOC_BUS info driver for the ASPEED platform. The full ID table is preserved in this commit message in case someone finds a need to change the implemntation in the future. { "AST1100-A0", 0x00000200 }, { "AST1100-A1", 0x00000201 }, { "AST1100-A2", 0x00000202 }, { "AST1100-A3", 0x00000202 }, { "AST2050-A0", 0x00000200 }, { "AST2050-A1", 0x00000201 }, { "AST2050-A2", 0x00000202 }, { "AST2050-A3", 0x00000202 }, { "AST2100-A0", 0x00000300 }, { "AST2100-A1", 0x00000301 }, { "AST2100-A2", 0x00000302 }, { "AST2100-A3", 0x00000302 }, { "AST2150-A0", 0x00000202 }, { "AST2150-A1", 0x00000202 }, { "AST2200-A0", 0x00000102 }, { "AST2200-A1", 0x00000102 }, { "AST2300-A0", 0x01000003 }, { "AST2300-A1", 0x01010303 }, { "AST1300-A1", 0x01010003 }, { "AST1050-A1", 0x01010203 }, { "AST2400-A0", 0x02000303 }, { "AST2400-A1", 0x02010303 }, { "AST1400-A1", 0x02010103 }, { "AST1250-A1", 0x02010303 }, { "AST2500-A0", 0x04000303 }, { "AST2510-A0", 0x04000103 }, { "AST2520-A0", 0x04000203 }, { "AST2530-A0", 0x04000403 }, { "AST2500-A1", 0x04010303 }, { "AST2510-A1", 0x04010103 }, { "AST2520-A1", 0x04010203 }, { "AST2530-A1", 0x04010403 }, { "AST2500-A2", 0x04030303 }, { "AST2510-A2", 0x04030103 }, { "AST2520-A2", 0x04030203 }, { "AST2530-A2", 0x04030403 }, { "AST2600-A0", 0x05000303 }, { "AST2600-A1", 0x05010303 }, { "AST2600-A2", 0x05020303 }, { "AST2620-A1", 0x05010203 }, { "AST2620-A2", 0x05020203 }, Reviewed-by: Andrew Jeffery Link: https://lore.kernel.org/r/20200921091644.133107-3-joel@jms.id.au Signed-off-by: Joel Stanley commit 7c1f6281549bda39ab32f65eb93bfcf2aa75fe94 Author: Joel Stanley Date: Mon Sep 21 18:46:42 2020 +0930 dt-bindings: aspeed: Add silicon id node to SCU Different ASPEED families have various unique hardware silicon identifiers within the SoC. Reviewed-by: Andrew Jeffery Link: https://lore.kernel.org/r/20200921091644.133107-2-joel@jms.id.au Signed-off-by: Joel Stanley commit a0d078d06e516184e2f575f3803935697b5e3ac6 Author: Tian Tao Date: Tue Sep 22 20:44:30 2020 +0800 drm/hisilicon: Features to support reading resolutions from EDID Use drm_get_edid to get the resolution, if that fails, set it to a fixed resolution. Rewrite the desrtoy callback function to release resources. Signed-off-by: Tian Tao Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/1600778670-60370-3-git-send-email-tiantao6@hisilicon.com commit 4eb4d99dfe3018d86f4529112aa7082f43b6996a Author: Tian Tao Date: Tue Sep 22 20:44:29 2020 +0800 drm/hisilicon: Support i2c driver algorithms for bit-shift adapters Adding driver implementation to support i2c driver algorithms for bit-shift adapters, so hibmc will using the interface provided by drm to read edid. Signed-off-by: Tian Tao Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/1600778670-60370-2-git-send-email-tiantao6@hisilicon.com commit 880ee3b7615e7cc087f659cb80ce22f5db56f9a2 Author: Antonio Borneo Date: Tue Sep 22 09:42:53 2020 +0200 drm/panel: otm8009a: allow using non-continuous dsi clock The panel is able to work when dsi clock is non-continuous, thus the system power consumption can be reduced using such feature. Add MIPI_DSI_CLOCK_NON_CONTINUOUS to panel's mode_flags. Changes in v2: - Added my signed-off Signed-off-by: Antonio Borneo Signed-off-by: Yannick Fertre Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200922074253.28810-1-yannick.fertre@st.com commit a34ebe7e6d999fbf64fc567c1f0221a9b28551b0 Author: Antonio Borneo Date: Tue Sep 22 09:42:42 2020 +0200 drm/panel: otm8009a: remove hack to force commands in HS The panel is able to receive commands in LP. The current hack to force backlight commands in HS was due to workaround an incorrect settings on DSI controller that prevents sending LP commands while video out was active. Remove the hack that forces HS commands. Changes in v2: - Added my signed-off Signed-off-by: Antonio Borneo Signed-off-by: Yannick Fertre Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200922074242.28719-1-yannick.fertre@st.com commit 61c523b932ae68d90c96ef60ae78d31d88f60f06 Author: Xiaofei Tan Date: Thu Sep 17 17:19:20 2020 +0800 fbdev: mx3fb: remove unused variable 'irq' Remove the variable 'irq' that is set but never used. Signed-off-by: Xiaofei Tan Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/1600334360-4214-1-git-send-email-tanxiaofei@huawei.com commit fb4f3c92780da18f89d4e05c06b5f697b8b0a05a Author: Yannick Fertre Date: Fri Sep 18 13:47:36 2020 +0200 drm/panel: rm68200: allow using non-continuous dsi clock The panel is able to work when dsi clock is non-continuous, thus the system power consumption can be reduced using such feature. Add MIPI_DSI_CLOCK_NON_CONTINUOUS to panel's mode_flags. Signed-off-by: Antonio Borneo Signed-off-by: Yannick Fertre Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200918114736.11322-1-yannick.fertre@st.com commit 51e50e542204329e36e248de14f4c7a466d2f677 Author: Dave Airlie Date: Thu Sep 24 15:18:04 2020 +1000 drm/radeon/ttm: handle ttm moves properly The core move code currently handles use_tt moves, for radeon this was being handled also in the driver, but not using the same paths. If moving between TT/SYSTEM (all the use_tt paths on radeon) use the core move function. Eventually the core will be flipped over to calling the driver. Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200924051845.397177-5-airlied@gmail.com commit 3a08446b31e3614f6e018c6ac297b1312689a73a Author: Dave Airlie Date: Thu Sep 24 15:18:03 2020 +1000 drm/amdgpu/ttm: handle tt moves properly. The core move code currently handles use_tt moves, for amdgpu this was being handled also in the driver, but not using the same paths. If moving between TT/SYSTEM (all the use_tt paths on amdgpu) use the core move function. Eventually the core will be flipped over to calling the driver. Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200924051845.397177-4-airlied@gmail.com commit 6236d953f7aca13403a1fada9d1dd12978cf93e8 Author: Dave Airlie Date: Thu Sep 24 15:18:02 2020 +1000 drm/ttm: handle the SYSTEM->TT path in same place as others. This just consolidates the code making the flow easier to understand and also helps when moving move to the driver side. Reviewed-by: Christian König . Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200924051845.397177-3-airlied@gmail.com commit b809979f112b6079acdae2649e2696f0cc812f84 Author: Qinglang Miao Date: Mon Sep 21 21:10:18 2020 +0800 drm/panel: simplify the return expression of td028ttec1_prepare Simplify the return expression. Signed-off-by: Qinglang Miao Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200921131018.91513-1-miaoqinglang@huawei.com commit 0bf8dedc763aa7abe4b03d67d7697ccc2b72430a Author: Ville Syrjälä Date: Fri Sep 18 00:43:35 2020 +0300 drm/i915: Use the correct bpp when validating "4:2:0 only" modes When validating a "YCbCr 4:2:0 only" mode we must take into account the fact that we're going to be outputting YCbCr 4:2:0 or 4:4:4 (when a DP->HDMI protocol converter is doing the 4:2:0 downsampling). For YCbCr 4:4:4 the minimum output bpc is 8, for YCbCr 4:2:0 it'll be half that. The currently hardcoded 6bpc is only correct for RGB 4:4:4, which we will never use with these kinds of modes. Figure out what we're going to output and use the correct min bpp value to validate whether the link has sufficient bandwidth. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200917214335.3569-3-ville.syrjala@linux.intel.com Reviewed-by: Manasi Navare Reviewed-by: Vandita Kulkarni commit f1bce832500ea2c7903382ee4217e2e5e6eb6953 Author: Ville Syrjälä Date: Fri Sep 18 00:43:34 2020 +0300 drm/i915: Decouple intel_dp_{min,output}_bpp() from crtc_state Pass the output_format directly to intel_dp_{min,output}_bpp() rather than passing in the crtc_state and digging out the output_format inside the functions. This will allow us to reuse the functions for mode validation purposes. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200917214335.3569-2-ville.syrjala@linux.intel.com Reviewed-by: Manasi Navare Reviewed-by: Vandita Kulkarni commit 773bd825c4cc0e0461c8f227e813fb7e9c13d2b0 Author: Ville Syrjälä Date: Fri Sep 18 00:43:33 2020 +0300 drm/i915: Extract intel_dp_output_format() Refactor the output_format calculation into a helper so that we can reuse it for mode validation as well. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200917214335.3569-1-ville.syrjala@linux.intel.com Reviewed-by: Vandita Kulkarni commit e8c93e0c6a1207ad96e99849410f2f5f4af853ff Author: Christian König Date: Mon Sep 21 16:06:36 2020 +0200 drm/ttm: remove TTM_PL_FLAG_NO_EVICT Not used any more. Signed-off-by: Christian König Reviewed-by: Dave Airlie Reviewed-by: Huang Rui Link: https://patchwork.freedesktop.org/patch/391604/?series=81973&rev=1 commit 28578f35338f9ec021d5a84f7931eb420a850f3e Author: Christian König Date: Mon Sep 21 15:59:50 2020 +0200 drm/ttm: remove ttm_bo_create Not used any more. Signed-off-by: Christian König Reviewed-by: Dave Airlie Reviewed-by: Huang Rui Link: https://patchwork.freedesktop.org/patch/391616/?series=81973&rev=1 commit 4671078eb8e390bd44c458e2f482fbb61f5bc612 Author: Christian König Date: Mon Sep 21 15:55:39 2020 +0200 drm/amdgpu: switch over to the new pin interface Stop using TTM_PL_FLAG_NO_EVICT. Signed-off-by: Christian König Tested-by: Nirmoy Das Reviewed-by: Dave Airlie Reviewed-by: Huang Rui Link: https://patchwork.freedesktop.org/patch/391617/?series=81973&rev=1 commit 0b8793f6e7fc097c112f1848aa7dab60b9ede5a7 Author: Christian König Date: Mon Sep 21 13:18:02 2020 +0200 drm/radeon: switch over to the new pin interface Stop using TTM_PL_FLAG_NO_EVICT. Signed-off-by: Christian König Reviewed-by: Dave Airlie Reviewed-by: Huang Rui Link: https://patchwork.freedesktop.org/patch/391610/?series=81973&rev=1 commit 9d36d4320462ce2d7de9f1eb81156f5d0d4919a3 Author: Christian König Date: Mon Sep 21 15:24:53 2020 +0200 drm/qxl: switch over to the new pin interface Stop using TTM_PL_FLAG_NO_EVICT. Signed-off-by: Christian König Reviewed-by: Gerd Hoffmann Tested-by: Gerd Hoffmann Reviewed-by: Dave Airlie Reviewed-by: Huang Rui Link: https://patchwork.freedesktop.org/patch/391607/?series=81973&rev=1 commit d582723d76a4eeafdff70c0051225fcf7bc69e55 Author: Christian König Date: Mon Sep 21 14:43:59 2020 +0200 drm/vram-helper: switch over to the new pin interface Stop using TTM_PL_FLAG_NO_EVICT. Signed-off-by: Christian König Acked-by: Thomas Zimmermann Reviewed-by: Dave Airlie Reviewed-by: Huang Rui Link: https://patchwork.freedesktop.org/patch/391603/?series=81973&rev=1 commit 6797cea18d3982fce6a7d63e51b4cea0e3c8eb06 Author: Christian König Date: Mon Sep 21 15:37:12 2020 +0200 drm/nouveau: switch over to the new pin interface Stop using TTM_PL_FLAG_NO_EVICT. Signed-off-by: Christian König Reviewed-by: Dave Airlie Reviewed-by: Huang Rui Link: https://patchwork.freedesktop.org/patch/391606/?series=81973&rev=1 commit fbe86ca567919b22bbba1220ce55020b1868879f Author: Christian König Date: Mon Sep 21 14:37:25 2020 +0200 drm/vmwgfx: switch over to the new pin interface v2 Stop using TTM_PL_FLAG_NO_EVICT. v2: fix unconditional pinning Signed-off-by: Christian König Reviewed-by: Dave Airlie Reviewed-by: Huang Rui Link: https://patchwork.freedesktop.org/patch/391601/?series=81973&rev=1 commit b254557cb244e2c18e59ee1cc2293128c52d2473 Author: Christian König Date: Mon Sep 21 14:14:32 2020 +0200 drm/vmwgfx: stop using ttm_bo_create v2 Implement in the driver instead since it is the only user of that function. v2: fix usage of ttm_bo_init_reserved Signed-off-by: Christian König Reviewed-by: Dave Airlie Reviewed-by: Huang Rui Link: https://patchwork.freedesktop.org/patch/391614/?series=81973&rev=1 commit a3b3bef33519fa8edba60849dea29d93a503ebc4 Author: Christian König Date: Mon Sep 21 12:56:48 2020 +0200 drm/vmwgfx: remove unused placement combination Just some dead code cleanup. Signed-off-by: Christian König Reviewed-by: Dave Airlie Reviewed-by: Huang Rui Link: https://patchwork.freedesktop.org/patch/391599/?series=81973&rev=1 commit deb0814b43f370a448a498409d949e38c9d8f02e Author: Christian König Date: Mon Sep 21 13:05:54 2020 +0200 drm/ttm: add ttm_bo_pin()/ttm_bo_unpin() v2 As an alternative to the placement flag add a pin count to the ttm buffer object. v2: add dma_resv_assert_help() calls Signed-off-by: Christian König Reviewed-by: Dave Airlie Reviewed-by: Huang Rui Link: https://patchwork.freedesktop.org/patch/391596/?series=81973&rev=1 commit 102f5aa491f262c818e607fc4fee08a724a76c69 Author: Chris Wilson Date: Thu Jul 23 18:21:19 2020 +0100 drm/i915/gem: Serialise debugfs i915_gem_objects with ctx->mutex Since the debugfs may peek into the GEM contexts as the corresponding client/fd is being closed, we may try and follow a dangling pointer. However, the context closure itself is serialised with the ctx->mutex, so if we hold that mutex as we inspect the state coupled in the context, we know the pointers within the context are stable and will remain valid as we inspect their tables. Signed-off-by: Chris Wilson Cc: CQ Tang Cc: Daniel Vetter Cc: stable@vger.kernel.org Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200723172119.17649-3-chris@chris-wilson.co.uk commit 8e3784dfef8a03143b13e7e4011f276a954f1bc6 Author: Thomas Zimmermann Date: Tue Sep 22 16:46:55 2020 +0200 drm/ast: Reload gamma LUT after changing primary plane's color format The gamma LUT has to be reloaded after changing the primary plane's color format. This used to be done implicitly by the CRTC atomic_enable() helper after updating the primary plane. With the recent reordering of the steps, the primary plane's setup was moved last and invalidated the gamma LUT. Fix this by setting the LUT from within atomic_flush(). Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Fixes: 2f0ddd89fe32 ("drm/ast: Enable CRTC before planes") Cc: Thomas Zimmermann Cc: Daniel Vetter Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20200922144655.23624-1-tzimmermann@suse.de commit ab861424cb58283f46040fe42c2e44234a5070ea Author: Christian König Date: Thu Sep 17 13:27:35 2020 +0200 drm/ttm: remove persistent_swap_storage Not used any more. Cleanup the code as well while at it. Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/391079/?series=81804&rev=1 Reviewed-by: Dave Airlie commit 84d28b4717578888fbdade0dc2a98941cdfd12a7 Author: Christian König Date: Thu Sep 17 13:16:53 2020 +0200 drm/nouveau: stop using persistent_swap_storage According to Ben this is most likely just a leftover. Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/391078/?series=81804&rev=1 Reviewed-by: Dave Airlie commit bff88b1c8ffddf32da75a1f7e8d10c93aaa26131 Author: Ramalingam C Date: Wed Sep 23 18:54:35 2020 +0530 drm/i915: dont retry stream management at seq_num_m roll over When roll over detected for seq_num_m, we shouldn't continue with stream management with rolled over value. So we are terminating the stream management retry, on roll over of the seq_num_m. v2: using drm_dbg_kms instead of DRM_DEBUG_KMS [Anshuman] v3: dev_priv is used as i915 [JaniN] v4: roll over is detected at the start of the stream management. Signed-off-by: Ramalingam C Reviewed-by: Anshuman Gupta [v3] Tested-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20200923132435.17039-3-anshuman.gupta@intel.com commit cb88d1fac196cc7c63f0786edb849da08b6092c1 Author: Ramalingam C Date: Wed Sep 23 18:54:34 2020 +0530 drm/i915: terminate reauth at stream management failure As per the HDCP2.2 compliance test 1B-10 expectation, when stream management for a repeater fails, we retry thrice and when it fails in all retries, HDCP2.2 reauthentication aborted at kernel. v2: seq_num_m++ is extended for steam management failures too.[Anshuman] v3: use drm_dbg_kms instead of DRM_DEBUG_KMS [Anshuman] v4: dev_priv is used as i915 [JaniN] v5: Few improvisements are done [Sean] Signed-off-by: Ramalingam C Tested-by: Anshuman Gupta Reviewed-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20200923132435.17039-2-anshuman.gupta@intel.com commit 7d56927efac71dd9bf4df7bfffcc80cef1d2ccb8 Author: Jani Nikula Date: Fri Sep 18 14:40:17 2020 +0300 drm/dp: add a number of DP 2.0 DPCD definitions Prepare for future with DP 2.0 DPCD definitions, with a couple of related drive-by cleanups. No functional changes. v2: Send the version that actually builds. Reviewed-by: Manasi Navare Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200918114017.30198-2-jani.nikula@intel.com commit 6e5702980b14fccc79ba3f2a3331ff21bc6554be Author: Jani Nikula Date: Fri Sep 18 14:40:16 2020 +0300 drm/dp: add subheadings to DPCD address definitions Add the subheadings from the DP spec. No functional changes. Reviewed-by: Manasi Navare Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200918114017.30198-1-jani.nikula@intel.com commit 0ef1ed813e6b13d29331088070c7f554b350a266 Author: Dave Airlie Date: Wed Sep 23 13:04:49 2020 +1000 drm/ttm: add bo wait that takes a ctx wrapper. I'm thinking of pushing the wait into the drivers. Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200923030454.362731-6-airlied@gmail.com commit 5466186745937e950bd17ee66f3f59cc329b6b71 Author: Dave Airlie Date: Wed Sep 23 13:04:48 2020 +1000 drm/nouveau/ttm: plumb ctx through move functions. This just uses the ctx instead of passing bools and recreating it. Acked-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200923030454.362731-5-airlied@gmail.com commit b1ec2924aa5a284aee1b829a15864378e88f423a Author: Dave Airlie Date: Wed Sep 23 13:04:47 2020 +1000 drm/radeon: cleanup ttm operation ctx usage. Just pass it around move, and remove unused pieces Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200923030454.362731-4-airlied@gmail.com commit 6b7741e42a49250a98b4a5ef2798ae5f8638aba0 Author: Dave Airlie Date: Wed Sep 23 13:04:46 2020 +1000 drm/qxl: kill unused bo wait wrapper This wasn't used anywheere Acked-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200923030454.362731-3-airlied@gmail.com commit 313bbdee84542437672824edbf03ba43ea07de04 Author: Dave Airlie Date: Wed Sep 23 13:04:45 2020 +1000 drm/radeon: kill radeon_bo_wait this is unused Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200923030454.362731-2-airlied@gmail.com commit 9e9f605fb5af8ae350d59de3c2a54422cb2d9301 Author: Daniel Vetter Date: Thu Sep 17 18:47:22 2020 +0200 drm/doc: Document that modifiers are always required for fb Even for legacy userspace, since otherwise GETFB2 is broken and if you switch between modifier-less and modifier-aware compositors, smooth transitions break. Also it's just best practice to make sure modifiers are invariant for a given drm_fb, and that a modifier-aware kms drivers only has one place to store them, ignoring any old implicit bo flags or whatever else might float around. Motivated by some irc discussion with Bas about amdgpu modifier support. Acked-by: Bas Nieuwenhuizen Acked-by: Simon Ser Acked-by: Daniel Stone Acked-by: Pekka Paalanen Fixes: 455e00f1412f ("drm: Add getfb2 ioctl") Cc: Daniel Stone Cc: Juston Li Cc: Daniel Vetter Cc: Ville Syrjälä Cc: Bas Nieuwenhuizen Cc: Marek Olšák Cc: "Wentland, Harry" Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200917164721.2038541-1-daniel.vetter@ffwll.ch commit db9c1734ad69c0ba5e5e420ba31ebc1048976be6 Author: Christian König Date: Fri Sep 18 16:34:49 2020 +0200 drm/ttm: stop dangerous caching attribute change When we swapout/in a BO we try to change the caching attributes of the pages before/after doing the copy. On x86 this is done by calling set_pages_uc(), set_memory_wc() or set_pages_wb() for not highmem pages to update the linear mapping of the page. On all other platforms we do exactly nothing. Now on x86 this is unnecessary because copy_highpage() will either create a temporary mapping of the page which is wb anyway and destroyed immediately again or use the linear mapping with the correct caching attributes. So stop this nonsense and just keep the caching as it is and return an error when a driver tries to change the caching of an already populated TT object. This is much more defensive since changing caching attributes is platform and driver specific and usually doesn't work after the page was initially allocated. Signed-off-by: Christian König Reviewed-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/391293/ commit 4127a6204970b3d7cb140117472eb3dd99bd1a0d Author: Christian König Date: Fri Sep 18 16:20:20 2020 +0200 drm/ttm: remove nonsense AGP handling map_page_into_agp() and unmap_page_from_agp() are only defined on x86. On all other platforms they are defined as noops. So this code doesn't has any effect at all. Signed-off-by: Christian König Reviewed-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/391292/ commit 5ae26012a159febcd2ad7a920b5f9b33ef87c333 Author: Jani Nikula Date: Thu Sep 17 19:50:56 2020 +0300 drm/i915/uc: tune down GuC communication enabled/disabled messages The GuC communication enabled/disabled messages are too noisy in info level. Convert them from info to debug level, and switch to device based logging while at it. Reported-by: Karol Herbst Cc: Karol Herbst Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200917165056.29766-1-jani.nikula@intel.com commit ad44c03208e46b83e4ae3269e32c9e524aa71cf8 Author: Koba Ko Date: Tue Sep 22 14:53:13 2020 +0800 drm/dp_mst: Retrieve extended DPCD caps for topology manager As per DP-1.3, First check DP_EXTENDED_RECEIVER_CAP_FIELD_PRESENT. If DP_EXTENDED_RECEIVER_CAP_FIELD_PRESENT is 1,read the DP_DP13_DPCD_REV to get the faster capability. If DP_EXTENDED_RECEIVER_CAP_FIELD_PRESENT is 0,read DP_DPCD_REV. Signed-off-by: Koba Ko Reviewed-by: Lyude Paul [added aux name to drm_dbg_kms() call] Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200922065313.4794-1-koba.ko@canonical.com commit 94a4fb8a316e9380a0cb2a516ef24bf157c38cf6 Author: Mauro Carvalho Chehab Date: Tue Sep 22 13:53:57 2020 -0400 drm/dp: fix a kernel-doc issue at drm_edid.c The name of the argument is different, causing those warnings: ./drivers/gpu/drm/drm_edid.c:3754: warning: Function parameter or member 'video_code' not described in 'drm_display_mode_from_cea_vic' ./drivers/gpu/drm/drm_edid.c:3754: warning: Excess function parameter 'vic' description in 'drm_display_mode_from_cea_vic' Fixes: 7af655bce275 ("drm/dp: Add drm_dp_downstream_mode()") Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200922175357.42998-3-lyude@redhat.com commit 4d658cb7789e8cc9198c0a62b8415f0c85021ab0 Author: Mauro Carvalho Chehab Date: Tue Sep 22 13:53:56 2020 -0400 drm/dp: fix kernel-doc warnings at drm_dp_helper.c As warned by kernel-doc: ./drivers/gpu/drm/drm_dp_helper.c:385: warning: Function parameter or member 'type' not described in 'drm_dp_downstream_is_type' ./drivers/gpu/drm/drm_dp_helper.c:886: warning: Function parameter or member 'dev' not described in 'drm_dp_downstream_mode' Some function parameters weren't documented. Fixes: 38784f6f8805 ("drm/dp: Add helpers to identify downstream facing port types") Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200922175357.42998-2-lyude@redhat.com commit 9572e6693cd731268521ab5af43858315a8cfb10 Author: Qinglang Miao Date: Mon Sep 21 21:11:10 2020 +0800 vga_switcheroo: simplify the return expression of vga_switcheroo_runtime_resume Simplify the return expression. Signed-off-by: Qinglang Miao Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200921131110.93365-1-miaoqinglang@huawei.com commit ca4bd68e11c86bbaf73cfc18dbc041350096e9ab Author: Colin Ian King Date: Sun Sep 20 15:14:07 2020 +0100 drm/gma500: clean up indentation issues There are a couple of statements that are indented too deeply, remove the extraneous tabs and also an empty line. Signed-off-by: Colin Ian King Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200920141407.32672-1-colin.king@canonical.com commit b8f8dbf6495850b0babc551377bde754b7bc0eea Author: Thomas Zimmermann Date: Mon Sep 21 16:25:36 2020 +0200 drm/vram-helper: Fix use of top-down placement Commit 7053e0eab473 ("drm/vram-helper: stop using TTM placement flags") cleared the BO placement flags if top-down placement had been selected. Hence, BOs that were supposed to go into VRAM are now placed in a default location in system memory. Trying to scanout the incorrectly pinned BO results in displayed garbage and an error message. [ 146.108127] ------------[ cut here ]------------ [ 146.1V08180] WARNING: CPU: 0 PID: 152 at drivers/gpu/drm/drm_gem_vram_helper.c:284 drm_gem_vram_offset+0x59/0x60 [drm_vram_helper] ... [ 146.108591] ast_cursor_page_flip+0x3e/0x150 [ast] [ 146.108622] ast_cursor_plane_helper_atomic_update+0x8a/0xc0 [ast] [ 146.108654] drm_atomic_helper_commit_planes+0x197/0x4c0 [ 146.108699] drm_atomic_helper_commit_tail_rpm+0x59/0xa0 [ 146.108718] commit_tail+0x103/0x1c0 ... [ 146.109302] ---[ end trace d901a1ba1d949036 ]--- Fix the bug by keeping the placement flags. The top-down placement flag is stored in a separate variable. Signed-off-by: Thomas Zimmermann Reviewed-by: Christian König Fixes: 7053e0eab473 ("drm/vram-helper: stop using TTM placement flags") Cc: Christian König Cc: Dave Airlie Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20200921142536.4392-1-tzimmermann@suse.de commit 1604cb2aa7fafd83e11f9257f765a5f5dd7c19d3 Author: Matthew Auld Date: Mon Sep 21 17:08:44 2020 +0100 drm/i915: check i915_vm_alloc_pt_stash for errors If we are really unlucky and encounter an error during i915_vm_alloc_pt_stash, we end up passing an empty pt/pd stash all the way down into the low-level ppgtt alloc code, leading to explosions, since it expects at least the required number of pt/pd for the va range. [ 211.981418] BUG: kernel NULL pointer dereference, address: 0000000000000000 [ 211.981421] #PF: supervisor read access in kernel mode [ 211.981422] #PF: error_code(0x0000) - not-present page [ 211.981424] PGD 80000008439cb067 P4D 80000008439cb067 PUD 84a37f067 PMD 0 [ 211.981427] Oops: 0000 [#1] SMP PTI [ 211.981428] CPU: 1 PID: 1301 Comm: i915_selftest Tainted: G U I 5.9.0-rc5+ #3 [ 211.981430] Hardware name: /NUC6i7KYB, BIOS KYSKLi70.86A.0050.2017.0831.1924 08/31/2017 [ 211.981521] RIP: 0010:__gen8_ppgtt_alloc+0x1ed/0x3c0 [i915] [ 211.981523] Code: c1 48 c7 c7 5d 5d fe c0 65 ff 0d ee 1d 03 3f e8 d9 91 1f e2 8b 55 c4 31 c0 48 8b 75 b8 85 d2 0f 95 c0 48 8b 1c c6 48 89 45 98 <48> 8b 03 48 8b 90 58 02 00 00 48 85 d2 0f 84 07 ea 15 00 48 81 fa [ 211.981526] RSP: 0018:ffffba2cc0eb3970 EFLAGS: 00010202 [ 211.981527] RAX: 0000000000000001 RBX: 0000000000000000 RCX: 0000000000000004 [ 211.981529] RDX: 0000000000000002 RSI: ffff9be998bdb8c0 RDI: ffff9be99c844300 [ 211.981530] RBP: ffffba2cc0eb39d8 R08: 0000000000000640 R09: ffff9be97cdfd000 [ 211.981531] R10: ffff9be97cdfd614 R11: 0000000000000000 R12: 0000000000000000 [ 211.981532] R13: ffff9be98607ba20 R14: ffff9be995a0b400 R15: ffffba2cc0eb39e8 [ 211.981534] FS: 00007f0f10b31000(0000) GS:ffff9be99fc40000(0000) knlGS:0000000000000000 [ 211.981536] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 211.981538] CR2: 0000000000000000 CR3: 000000084d74e006 CR4: 00000000003706e0 [ 211.981539] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 211.981541] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 211.981542] Call Trace: [ 211.981609] gen8_ppgtt_alloc+0x79/0x90 [i915] [ 211.981678] ppgtt_bind_vma+0x36/0x80 [i915] [ 211.981756] __vma_bind+0x39/0x40 [i915] [ 211.981818] fence_work+0x21/0x98 [i915] [ 211.981879] fence_notify+0x8d/0x128 [i915] [ 211.981939] __i915_sw_fence_complete+0x62/0x240 [i915] [ 211.982018] i915_vma_pin_ww+0x1ee/0x9c0 [i915] Fixes: cd0452aa2a0d ("drm/i915: Preallocate stashes for vma page-directories") Signed-off-by: Matthew Auld Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200921160844.73186-1-matthew.auld@intel.com commit d7b1c018140fb4b513c4e05685d74ef8178ef179 Author: Jason Yan Date: Wed Sep 16 21:23:01 2020 +0800 drm/panel: samsung: make vint_table static const This eliminates the following sparse warning: drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c:217:15: warning: symbol 'vint_table' was not declared. Should it be static? While at it, make the table const as it is never modified. Reported-by: Hulk Robot Signed-off-by: Jason Yan Reviewed-by: Laurent Pinchart Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20200916132301.2914017-1-yanaijie@huawei.com commit 523be44c334bc4e4c014032738dc277b8909d009 Author: Wang ShaoBo Date: Fri Sep 11 09:44:14 2020 +0800 drm/imx/dcss: fix unused but set variable warnings Fix unused but set variable warning building with `make W=1`: drivers/gpu/drm/imx/dcss/dcss-plane.c:270:6: warning: variable ‘pixel_format’ set but not used [-Wunused-but-set-variable] u32 pixel_format; ^~~~~~~~~~~~ Fixes: 9021c317b770 ("drm/imx: Add initial support for DCSS on iMX8MQ") Reported-by: Hulk Robot Signed-off-by: Wang ShaoBo Reviewed-by: Laurentiu Palcu Signed-off-by: Lucas Stach Link: https://patchwork.freedesktop.org/patch/msgid/20200911014414.4663-1-bobo.shaobowang@huawei.com commit 592693a1f881630f744b69b8bc315caa99272d64 Author: Joel Stanley Date: Wed Sep 16 22:27:31 2020 +0930 soc: aspeed: Improve kconfig Reword the kconfig text to be consistent and reflect that most drivers are available for all supported ASPEED chips (2400, 2500 and 2600). Rearrange the symbols the SoC drivers depend on so the menu doesn't appear unless you are building for ASPEED for compile testing. The SYSCON_MFD and REGMAP options are usually selected by drivers that need them, so do this. Reviewed-by: Cédric Le Goater Reviewed-by: Andrew Jeffery Link: https://lore.kernel.org/r/20200916125731.784527-1-joel@jms.id.au Signed-off-by: Joel Stanley commit 4316b19dee27cc5cd34a95fdbc0a3a5237507701 Author: Maarten Lankhorst Date: Fri Sep 18 13:12:08 2020 +0200 drm/i915: Fix uninitialised variable in intel_context_create_request. In case backoff fails with an error, we return an undefined rq, assign err to rq correctly. Fixes: 8a929c9eb1c2 ("drm/i915: Use ww pinning for intel_context_create_request()") Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20200918111208.1392128-1-maarten.lankhorst@linux.intel.com Reviewed-by: Rodrigo Vivi commit 29545e5cd27d71640249a995ee84a8376c78a338 Author: Chris Wilson Date: Wed Aug 26 14:27:48 2020 +0100 drm/i915/gt: Remove defunct intel_virtual_engine_get_sibling() As the last user was eliminated in commit e21fecdcde40 ("drm/i915/gt: Distinguish the virtual breadcrumbs from the irq breadcrumbs"), we can remove the function. One less implementation detail creeping beyond its scope. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200826132811.17577-16-chris@chris-wilson.co.uk commit f2acf74068b0ac56289ecdd9739e9aaee1a46d21 Author: Chris Wilson Date: Wed Sep 16 10:00:59 2020 +0100 drm/i915: Reduce GPU error capture mutex hold time Shrink the hold time for the error capture mutex to just around the acquire/release of the PTE used for reading back the object via the Global GTT. For platforms that do not need the GGTT read back, we can skip the mutex entirely and allow concurrent error capture. Where we do use the GGTT, by restricting the hold time around the slow readback and compression, we are more resilient against softlockups (khungtaskd) as the heartbeat may well also trigger an error while the first is on going, and this allows the heartbeat reset to skip past the capture and not be stalled. Testcase: igt/gem_exec_capture/many-* Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200916090059.3189-3-chris@chris-wilson.co.uk commit 293f43c80c0027ff9299036c24218ac705ce584e Author: Chris Wilson Date: Wed Sep 16 10:00:58 2020 +0100 drm/i915: Break up error capture compression loops with cond_resched() As the error capture will compress user buffers as directed to by the user, it can take an arbitrary amount of time and space. Break up the compression loops with a call to cond_resched(), that will allow other processes to schedule (avoiding the soft lockups) and also serve as a warning should we try to make this loop atomic in the future. Testcase: igt/gem_exec_capture/many-* Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: stable@vger.kernel.org Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200916090059.3189-2-chris@chris-wilson.co.uk commit 0bda4b80d949d871146f85bb478f5c30c368009e Author: Chris Wilson Date: Wed Sep 16 10:00:57 2020 +0100 drm/i915/gt: Show engine properties in the pretty printer When debugging the engine state, include the user properties that may, or may not, have been adjusted by the user/test. For example, vecs0 ... Properties: heartbeat_interval_ms: 2500 [default 2500] max_busywait_duration_ns: 8000 [default 8000] preempt_timeout_ms: 640 [default 640] stop_timeout_ms: 100 [default 100] timeslice_duration_ms: 1 [default 1] Suggested-by: Joonas Lahtinen Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200916090059.3189-1-chris@chris-wilson.co.uk commit 68ba71e3ae6dd86a23486655e33c5f8c9bd90777 Author: Dan Carpenter Date: Fri Sep 11 10:52:43 2020 +0300 drm/i915: Fix an error code i915_gem_object_copy_blt() This code should use "vma[1]" instead of "vma". The "vma" variable is a valid pointer. Fixes: 6b05030496f7 ("drm/i915: Convert i915_gem_object/client_blt.c to use ww locking as well, v2.") Signed-off-by: Dan Carpenter Reviewed-by: Mika Kuoppala Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20200911075243.GG12635@kadam commit 4ff64bcfe2b11be52a3fceb6b5c23d7be7916362 Author: Chris Wilson Date: Tue Sep 15 14:49:23 2020 +0100 drm/i915/gt: Use a mmio read of the CSB in case of failure If we find the GPU didn't update the CSB within 50us, we currently fail and eventually reset the GPU. Lets report the value from the mmio space as a last resort, it may just stave off an unnecessary GPU reset. References: HSDES#22011327657 Suggested-by: Mika Kuoppala Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200915134923.30088-4-chris@chris-wilson.co.uk commit 884c40741234c12533caf344997c895ee1c37d60 Author: Chris Wilson Date: Tue Sep 15 14:49:22 2020 +0100 drm/i915/gt: Apply the CSB w/a for all Since we expect to inline the csb_parse() routines, the w/a for the stale CSB data on Tigerlake will be pulled into process_csb(), and so we might as well simply reuse the logic for all, and so will hopefully avoid any strange behaviour on Icelake that was not covered by our previous w/a. References: d8f505311717 ("drm/i915/icl: Forcibly evict stale csb entries") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Bruce Chang Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200915134923.30088-3-chris@chris-wilson.co.uk commit 233c1ae3c83f21046c6c4083da904163ece8f110 Author: Chris Wilson Date: Tue Sep 15 14:49:21 2020 +0100 drm/i915/gt: Wait for CSB entries on Tigerlake On Tigerlake, we are seeing a repeat of commit d8f505311717 ("drm/i915/icl: Forcibly evict stale csb entries") where, presumably, due to a missing Global Observation Point synchronisation, the write pointer of the CSB ringbuffer is updated _prior_ to the contents of the ringbuffer. That is we see the GPU report more context-switch entries for us to parse, but those entries have not been written, leading us to process stale events, and eventually report a hung GPU. However, this effect appears to be much more severe than we previously saw on Icelake (though it might be best if we try the same approach there as well and measure), and Bruce suggested the good idea of resetting the CSB entry after use so that we can detect when it has been updated by the GPU. By instrumenting how long that may be, we can set a reliable upper bound for how long we should wait for: 513 late, avg of 61 retries (590 ns), max of 1061 retries (10099 ns) Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2045 References: d8f505311717 ("drm/i915/icl: Forcibly evict stale csb entries") References: HSDES#22011327657, HSDES#1508287568 Suggested-by: Bruce Chang Signed-off-by: Chris Wilson Cc: Bruce Chang Cc: Mika Kuoppala Cc: stable@vger.kernel.org # v5.4 Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200915134923.30088-2-chris@chris-wilson.co.uk commit f24a44e52fbc9881fc5f3bcef536831a15a439f3 Author: Chris Wilson Date: Tue Sep 15 14:49:20 2020 +0100 drm/i915/gt: Widen CSB pointer to u64 for the parsers A CSB entry is 64b, and it is simpler for us to treat it as an array of 64b entries than as an array of pairs of 32b entries. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200915134923.30088-1-chris@chris-wilson.co.uk commit 6cb304b31293844461437fe76dc308aaffe31dc8 Author: Chris Wilson Date: Tue Sep 15 11:51:13 2020 +0100 drm/i915/gt: Check for a registered driver with IPS If the ips module calls into the driver during an unbind/bind cycle, we may see the driver while it has unregistered itself from ips and try and dereference a NULL ips_mchdev pointer. <1> [211.928844] BUG: kernel NULL pointer dereference, address: 0000000000000014 <1> [211.928861] #PF: supervisor read access in kernel mode <1> [211.928871] #PF: error_code(0x0000) - not-present page <6> [211.928881] PGD 0 P4D 0 <4> [211.928890] Oops: 0000 [#1] PREEMPT SMP PTI <4> [211.928900] CPU: 3 PID: 327 Comm: ips-monitor Not tainted 5.9.0-rc5-CI-CI_DRM_9008+ #1 <4> [211.928914] Hardware name: Hewlett-Packard HP EliteBook 8440p/172A, BIOS 68CCU Ver. F.24 09/13/2013 <4> [211.929056] RIP: 0010:mchdev_get+0x5a/0x180 [i915] <4> [211.929067] Code: c0 5a 74 0d 80 3d f1 53 29 00 00 0f 84 ab 00 00 00 48 8b 1d c8 a8 29 00 e8 d3 18 89 e1 85 c0 74 09 80 3d d1 53 29 00 00 74 65 <8b> 4b 14 48 8d 7b 14 85 c9 0f 84 09 01 00 00 8d 51 01 89 c8 f0 0f <4> [211.929095] RSP: 0018:ffffc900002efe60 EFLAGS: 00010202 <4> [211.929105] RAX: 0000000000000001 RBX: 0000000000000000 RCX: ffff8881297acf40 <4> [211.929118] RDX: 0000000000000000 RSI: ffffffff8264e2c0 RDI: ffff8881297ad820 <4> [211.929130] RBP: ffffc900002efe68 R08: ffff8881297ad820 R09: 00000000fffffffe <4> [211.929143] R10: ffff8881297acf40 R11: 00000000fff74c96 R12: ffff8881294dfa18 <4> [211.929155] R13: 0000000000000067 R14: ffff888126eff640 R15: ffff888126efe840 <4> [211.929168] FS: 0000000000000000(0000) GS:ffff888133d80000(0000) knlGS:0000000000000000 <4> [211.929182] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 <4> [211.929194] CR2: 0000000000000014 CR3: 0000000002610000 CR4: 00000000000006e0 <4> [211.929206] Call Trace: <4> [211.929294] i915_read_mch_val+0x15/0x380 [i915] <4> [211.929309] ? ips_monitor+0x3fb/0x630 [intel_ips] <4> [211.929321] ips_monitor+0x53c/0x630 [intel_ips] <4> [211.929334] ? ips_gpu_lower+0x30/0x30 [intel_ips] <4> [211.929348] kthread+0x14d/0x170 <4> [211.929358] ? kthread_park+0x80/0x80 <4> [211.929369] ret_from_fork+0x22/0x30 <4> [211.929382] Modules linked in: vgem snd_hda_codec_hdmi snd_hda_codec_generic ledtrig_audio i915 coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_intel snd_intel_dspcfg snd_hda_codec snd_hwdep snd_hda_core e1000e snd_pcm mei_me mei intel_ips lpc_ich ptp prime_numbers pps_core <4> [211.929437] CR2: 0000000000000014 Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200915105113.26564-1-chris@chris-wilson.co.uk commit 9bb34ff25c458a2a48fb61409df42f465ede37f8 Author: Chris Wilson Date: Tue Sep 15 10:14:17 2020 +0100 drm/i915/gt: Clear the buffer pool age before use If we create a new node, it is possible for the slab allocator to return us a recently freed node. If that node was just retired, it will retain the current jiffy as its node->age. There is then a miniscule window, where as that node is retired, it will appear on the free list with an incorrect age and be eligible for reuse by one thread, and then by a second thread as the correct node->age is written. Fixes: 06b73c2d0b65 ("drm/i915/gt: Delay taking the spinlock for grabbing from the buffer pool") Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200915091417.4086-3-chris@chris-wilson.co.uk commit 121ba69ffddc60df11da56f6d5b29bdb45c8eb80 Author: Chris Wilson Date: Tue Sep 15 10:14:16 2020 +0100 drm/i915/gem: Prevent using pgprot_writecombine() if PAT is not supported Let's not try and use PAT attributes for I915_MAP_WC if the CPU doesn't support PAT. Fixes: 6056e50033d9 ("drm/i915/gem: Support discontiguous lmem object maps") Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Cc: # v5.6+ Link: https://patchwork.freedesktop.org/patch/msgid/20200915091417.4086-2-chris@chris-wilson.co.uk commit 060bb115c2d664f04db9c7613a104dfaef3fdd98 Author: Chris Wilson Date: Tue Sep 15 10:14:15 2020 +0100 drm/i915/gem: Avoid implicit vmap for highmem on x86-32 On 32b, highmem using a finite set of indirect PTE (i.e. vmap) to provide virtual mappings of the high pages. As these are finite, map_new_virtual() must wait for some other kmap() to finish when it runs out. If we map a large number of objects, there is no method for it to tell us to release the mappings, and we deadlock. However, if we make an explicit vmap of the page, that uses a larger vmalloc arena, and also has the ability to tell us to release unwanted mappings. Most importantly, it will fail and propagate an error instead of waiting forever. Fixes: fb8621d3bee8 ("drm/i915: Avoid allocating a vmap arena for a single page") #x86-32 References: e87666b52f00 ("drm/i915/shrinker: Hook up vmap allocation failure notifier") Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Cc: # v4.7+ Link: https://patchwork.freedesktop.org/patch/msgid/20200915091417.4086-1-chris@chris-wilson.co.uk commit 5384d92e4e02661d2b08e9e20c7b2cd3b0b82db6 Author: Tetsuo Handa Date: Wed Sep 9 20:05:58 2020 +0900 tomoyo: Loosen pathname/domainname validation. Since commit e2dc9bf3f5275ca3 ("umd: Transform fork_usermode_blob into fork_usermode_driver") started calling execve() on a program written in a local mount which is not connected to mount tree, tomoyo_realpath_from_path() started returning a pathname in "$fsname:/$pathname" format which violates TOMOYO's domainname rule that it must start with "<$namespace>" followed by zero or more repetitions of pathnames which start with '/'. Since $fsname must not contain '.' since commit 79c0b2df79eb56fc ("add filesystem subtype support"), tomoyo_correct_path() can recognize a token which appears '/' before '.' appears (e.g. proc:/self/exe ) as a pathname while rejecting a token which appears '.' before '/' appears (e.g. exec.realpath="/bin/bash" ) as a condition parameter. Therefore, accept domainnames which contain pathnames which do not start with '/' but contain '/' before '.' (e.g. tmpfs:/bpfilter_umh ). Signed-off-by: Tetsuo Handa commit bda4c60d02e9ceeee726f73250b808fad0663dd6 Author: Miaohe Lin Date: Fri Aug 14 04:57:18 2020 -0400 sys: Convert to the new fallthrough notation Switch from using the /* fall through */ comment style notation to the new, preferred notation as outlined in our docs. Signed-off-by: Miaohe Lin Acked-by: Christian Brauner [christian.brauner@ubuntu.com: rewrite commit message] Link: https://lore.kernel.org/r/20200814085718.40326-1-linmiaohe@huawei.com Signed-off-by: Christian Brauner commit 76df441ade97556816e8fc522ae4c3b50a255fb4 Author: Miaohe Lin Date: Fri Aug 14 04:39:32 2020 -0400 signal: Convert to the new fallthrough notation Switch from using the /* fall through */ comment style notation to the new, preferred notation as outlined in our docs. Signed-off-by: Miaohe Lin Acked-by: Christian Brauner [christian.brauner@ubuntu.com: rewrite commit message] Link: https://lore.kernel.org/r/20200814083932.4975-1-linmiaohe@huawei.com Signed-off-by: Christian Brauner commit 28c41efd08bf97fc64f75304035ee3943995b68e Author: Kirill Tkhai Date: Mon Aug 3 13:17:00 2020 +0300 time: Use generic ns_common::count Switch over time namespaces to use the newly introduced common lifetime counter. Currently every namespace type has its own lifetime counter which is stored in the specific namespace struct. The lifetime counters are used identically for all namespaces types. Namespaces may of course have additional unrelated counters and these are not altered. This introduces a common lifetime counter into struct ns_common. The ns_common struct encompasses information that all namespaces share. That should include the lifetime counter since its common for all of them. It also allows us to unify the type of the counters across all namespaces. Most of them use refcount_t but one uses atomic_t and at least one uses kref. Especially the last one doesn't make much sense since it's just a wrapper around refcount_t since 2016 and actually complicates cleanup operations by having to use container_of() to cast the correct namespace struct out of struct ns_common. Having the lifetime counter for the namespaces in one place reduces maintenance cost. Not just because after switching all namespaces over we will have removed more code than we added but also because the logic is more easily understandable and we indicate to the user that the basic lifetime requirements for all namespaces are currently identical. Signed-off-by: Kirill Tkhai Reviewed-by: Kees Cook Acked-by: Christian Brauner Link: https://lore.kernel.org/r/159644982033.604812.9406853013011123238.stgit@localhost.localdomain Signed-off-by: Christian Brauner commit f387882d8d3eda7c7b13e330c73907035569ce4a Author: Kirill Tkhai Date: Mon Aug 3 13:16:50 2020 +0300 cgroup: Use generic ns_common::count Switch over cgroup namespaces to use the newly introduced common lifetime counter. Currently every namespace type has its own lifetime counter which is stored in the specific namespace struct. The lifetime counters are used identically for all namespaces types. Namespaces may of course have additional unrelated counters and these are not altered. This introduces a common lifetime counter into struct ns_common. The ns_common struct encompasses information that all namespaces share. That should include the lifetime counter since its common for all of them. It also allows us to unify the type of the counters across all namespaces. Most of them use refcount_t but one uses atomic_t and at least one uses kref. Especially the last one doesn't make much sense since it's just a wrapper around refcount_t since 2016 and actually complicates cleanup operations by having to use container_of() to cast the correct namespace struct out of struct ns_common. Having the lifetime counter for the namespaces in one place reduces maintenance cost. Not just because after switching all namespaces over we will have removed more code than we added but also because the logic is more easily understandable and we indicate to the user that the basic lifetime requirements for all namespaces are currently identical. Signed-off-by: Kirill Tkhai Reviewed-by: Kees Cook Acked-by: Christian Brauner Link: https://lore.kernel.org/r/159644980994.604812.383801057081594972.stgit@localhost.localdomain Signed-off-by: Christian Brauner commit 1a7b8969e664d6af328f00fe6eb7aabd61a71d13 Author: Kirill Tkhai Date: Mon Aug 3 13:16:42 2020 +0300 mnt: Use generic ns_common::count Switch over mount namespaces to use the newly introduced common lifetime counter. Currently every namespace type has its own lifetime counter which is stored in the specific namespace struct. The lifetime counters are used identically for all namespaces types. Namespaces may of course have additional unrelated counters and these are not altered. This introduces a common lifetime counter into struct ns_common. The ns_common struct encompasses information that all namespaces share. That should include the lifetime counter since its common for all of them. It also allows us to unify the type of the counters across all namespaces. Most of them use refcount_t but one uses atomic_t and at least one uses kref. Especially the last one doesn't make much sense since it's just a wrapper around refcount_t since 2016 and actually complicates cleanup operations by having to use container_of() to cast the correct namespace struct out of struct ns_common. Having the lifetime counter for the namespaces in one place reduces maintenance cost. Not just because after switching all namespaces over we will have removed more code than we added but also because the logic is more easily understandable and we indicate to the user that the basic lifetime requirements for all namespaces are currently identical. Signed-off-by: Kirill Tkhai Reviewed-by: Kees Cook Acked-by: Christian Brauner Link: https://lore.kernel.org/r/159644980287.604812.761686947449081169.stgit@localhost.localdomain Signed-off-by: Christian Brauner commit 265cbd62e034cb09a9da7cbff9072c8082f8df65 Author: Kirill Tkhai Date: Mon Aug 3 13:16:37 2020 +0300 user: Use generic ns_common::count Switch over user namespaces to use the newly introduced common lifetime counter. Currently every namespace type has its own lifetime counter which is stored in the specific namespace struct. The lifetime counters are used identically for all namespaces types. Namespaces may of course have additional unrelated counters and these are not altered. This introduces a common lifetime counter into struct ns_common. The ns_common struct encompasses information that all namespaces share. That should include the lifetime counter since its common for all of them. It also allows us to unify the type of the counters across all namespaces. Most of them use refcount_t but one uses atomic_t and at least one uses kref. Especially the last one doesn't make much sense since it's just a wrapper around refcount_t since 2016 and actually complicates cleanup operations by having to use container_of() to cast the correct namespace struct out of struct ns_common. Having the lifetime counter for the namespaces in one place reduces maintenance cost. Not just because after switching all namespaces over we will have removed more code than we added but also because the logic is more easily understandable and we indicate to the user that the basic lifetime requirements for all namespaces are currently identical. Signed-off-by: Kirill Tkhai Reviewed-by: Kees Cook Acked-by: Christian Brauner Link: https://lore.kernel.org/r/159644979754.604812.601625186726406922.stgit@localhost.localdomain Signed-off-by: Christian Brauner commit 8eb71d95f34a009cc22084e05e78eb9686f7ea28 Author: Kirill Tkhai Date: Mon Aug 3 13:16:32 2020 +0300 pid: Use generic ns_common::count Switch over pid namespaces to use the newly introduced common lifetime counter. Currently every namespace type has its own lifetime counter which is stored in the specific namespace struct. The lifetime counters are used identically for all namespaces types. Namespaces may of course have additional unrelated counters and these are not altered. This introduces a common lifetime counter into struct ns_common. The ns_common struct encompasses information that all namespaces share. That should include the lifetime counter since its common for all of them. It also allows us to unify the type of the counters across all namespaces. Most of them use refcount_t but one uses atomic_t and at least one uses kref. Especially the last one doesn't make much sense since it's just a wrapper around refcount_t since 2016 and actually complicates cleanup operations by having to use container_of() to cast the correct namespace struct out of struct ns_common. Having the lifetime counter for the namespaces in one place reduces maintenance cost. Not just because after switching all namespaces over we will have removed more code than we added but also because the logic is more easily understandable and we indicate to the user that the basic lifetime requirements for all namespaces are currently identical. Signed-off-by: Kirill Tkhai Reviewed-by: Kees Cook Acked-by: Christian Brauner Link: https://lore.kernel.org/r/159644979226.604812.7512601754841882036.stgit@localhost.localdomain Signed-off-by: Christian Brauner commit 137ec390fad41928307216ea9f91acf5cf6f4204 Author: Kirill Tkhai Date: Mon Aug 3 13:16:27 2020 +0300 ipc: Use generic ns_common::count Switch over ipc namespaces to use the newly introduced common lifetime counter. Currently every namespace type has its own lifetime counter which is stored in the specific namespace struct. The lifetime counters are used identically for all namespaces types. Namespaces may of course have additional unrelated counters and these are not altered. This introduces a common lifetime counter into struct ns_common. The ns_common struct encompasses information that all namespaces share. That should include the lifetime counter since its common for all of them. It also allows us to unify the type of the counters across all namespaces. Most of them use refcount_t but one uses atomic_t and at least one uses kref. Especially the last one doesn't make much sense since it's just a wrapper around refcount_t since 2016 and actually complicates cleanup operations by having to use container_of() to cast the correct namespace struct out of struct ns_common. Having the lifetime counter for the namespaces in one place reduces maintenance cost. Not just because after switching all namespaces over we will have removed more code than we added but also because the logic is more easily understandable and we indicate to the user that the basic lifetime requirements for all namespaces are currently identical. Signed-off-by: Kirill Tkhai Reviewed-by: Kees Cook Acked-by: Christian Brauner Link: https://lore.kernel.org/r/159644978697.604812.16592754423881032385.stgit@localhost.localdomain Signed-off-by: Christian Brauner commit 9a56493f6942c0e2df1579986128721da96e00d8 Author: Kirill Tkhai Date: Mon Aug 3 13:16:21 2020 +0300 uts: Use generic ns_common::count Switch over uts namespaces to use the newly introduced common lifetime counter. Currently every namespace type has its own lifetime counter which is stored in the specific namespace struct. The lifetime counters are used identically for all namespaces types. Namespaces may of course have additional unrelated counters and these are not altered. This introduces a common lifetime counter into struct ns_common. The ns_common struct encompasses information that all namespaces share. That should include the lifetime counter since its common for all of them. It also allows us to unify the type of the counters across all namespaces. Most of them use refcount_t but one uses atomic_t and at least one uses kref. Especially the last one doesn't make much sense since it's just a wrapper around refcount_t since 2016 and actually complicates cleanup operations by having to use container_of() to cast the correct namespace struct out of struct ns_common. Having the lifetime counter for the namespaces in one place reduces maintenance cost. Not just because after switching all namespaces over we will have removed more code than we added but also because the logic is more easily understandable and we indicate to the user that the basic lifetime requirements for all namespaces are currently identical. Signed-off-by: Kirill Tkhai Reviewed-by: Kees Cook Acked-by: Christian Brauner Link: https://lore.kernel.org/r/159644978167.604812.1773586504374412107.stgit@localhost.localdomain Signed-off-by: Christian Brauner commit 8b8f3e666fc6c2f33acb7ec6c0c66946307baddb Author: Christian Brauner Date: Wed Aug 19 14:06:36 2020 +0200 net: Use generic ns_common::count Switch over network namespaces to use the newly introduced common lifetime counter. Network namespaces have an additional counter named "passive". This counter does not guarantee that the network namespace is not already de-initialized and so isn't concerned with the actual lifetime of the network namespace; only the "count" counter is. So the latter is moved into struct ns_common. Currently every namespace type has its own lifetime counter which is stored in the specific namespace struct. The lifetime counters are used identically for all namespaces types. Namespaces may of course have additional unrelated counters and these are not altered. This introduces a common lifetime counter into struct ns_common. The ns_common struct encompasses information that all namespaces share. That should include the lifetime counter since its common for all of them. It also allows us to unify the type of the counters across all namespaces. Most of them use refcount_t but one uses atomic_t and at least one uses kref. Especially the last one doesn't make much sense since it's just a wrapper around refcount_t since 2016 and actually complicates cleanup operations by having to use container_of() to cast the correct namespace struct out of struct ns_common. Having the lifetime counter for the namespaces in one place reduces maintenance cost. Not just because after switching all namespaces over we will have removed more code than we added but also because the logic is more easily understandable and we indicate to the user that the basic lifetime requirements for all namespaces are currently identical. Signed-off-by: Kirill Tkhai Reviewed-by: Kees Cook Acked-by: Christian Brauner [christian.brauner@ubuntu.com: rewrite commit] Link: https://lore.kernel.org/r/159644977635.604812.1319877322927063560.stgit@localhost.localdomain Signed-off-by: Christian Brauner commit 2024f91e965f7d7a38364874031c2132dcd11992 Author: Christian Brauner Date: Wed Aug 19 13:47:15 2020 +0200 ns: Add a common refcount into ns_common Currently every namespace type has its own lifetime counter which is stored in the specific namespace struct. The lifetime counters are used identically for all namespaces types. Namespaces may of course have additional unrelated counters and these are not altered. This introduces a common lifetime counter into struct ns_common. The ns_common struct encompasses information that all namespaces share. That should include the lifetime counter since its common for all of them. It also allows us to unify the type of the counters across all namespaces. Most of them use refcount_t but one uses atomic_t and at least one uses kref. Especially the last one doesn't make much sense since it's just a wrapper around refcount_t since 2016 and actually complicates cleanup operations by having to use container_of() to cast the correct namespace struct out of struct ns_common. Having the lifetime counter for the namespaces in one place reduces maintenance cost. Not just because after switching all namespaces over we will have removed more code than we added but also because the logic is more easily understandable and we indicate to the user that the basic lifetime requirements for all namespaces are currently identical. Signed-off-by: Kirill Tkhai Reviewed-by: Kees Cook Acked-by: Christian Brauner [christian.brauner@ubuntu.com: rewrite commit & split into two patches] Signed-off-by: Christian Brauner commit 0032ce0f85a269a006e91277be5fdbc05fad8426 Author: Peilin Ye Date: Sat Aug 1 11:20:44 2020 -0400 ptrace: Prevent kernel-infoleak in ptrace_get_syscall_info() ptrace_get_syscall_info() is potentially copying uninitialized stack memory to userspace, since the compiler may leave a 3-byte hole near the beginning of `info`. Fix it by adding a padding field to `struct ptrace_syscall_info`. Fixes: 201766a20e30 ("ptrace: add PTRACE_GET_SYSCALL_INFO request") Suggested-by: Dan Carpenter Signed-off-by: Peilin Ye Reviewed-by: Dmitry V. Levin Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200801152044.230416-1-yepeilin.cs@gmail.com Signed-off-by: Christian Brauner